From 5473e0be96ad26f9c605411b55c21b4d24ab91fd Mon Sep 17 00:00:00 2001 From: Ricardo Pchevuzinske Katz Date: Fri, 29 May 2026 10:10:49 -0300 Subject: [PATCH 1/2] NO-JIRA: add a generator for plugins and reduce dependencies This CoreDNS version is based on upstream, but relies just on a very small set of dependencies and plugins. This change adds a new generator for plugins, allowing a developer to re-generate the plugin list and dependencies based on OCP install and reducing the amount of imported libraries --- Makefile.ocp | 97 +++++++++++++++++++++++++++++++++++++++++++ OPENSHIFT.md | 51 +++++++++++++++++++++++ openshift-plugins.cfg | 23 ++++++++++ 3 files changed, 171 insertions(+) create mode 100644 Makefile.ocp create mode 100644 OPENSHIFT.md create mode 100644 openshift-plugins.cfg diff --git a/Makefile.ocp b/Makefile.ocp new file mode 100644 index 0000000000..59fe296b2b --- /dev/null +++ b/Makefile.ocp @@ -0,0 +1,97 @@ +# Makefile.ocp — OpenShift plugin management for CoreDNS +# +# Usage: +# make -f Makefile.ocp generate-plugins # prune plugins and regenerate +# make -f Makefile.ocp verify-plugins # CI check: fail if tree is dirty +# +# After an upstream rebase: +# 1. (Optional) Add new plugins to openshift-plugins.cfg if needed +# 2. Run: make -f Makefile.ocp generate-plugins +# 3. Commit the result + +OPENSHIFT_PLUGINS_CFG := openshift-plugins.cfg +PLUGIN_CFG := plugin.cfg +PLUGIN_DIR := plugin + +# Infrastructure directories under plugin/ that are never plugins. +INFRA_DIRS := pkg test deprecated import + +# Plugin directories that are NOT registered in openshift-plugins.cfg but +# are imported as code dependencies by kept plugins. Update this list if +# a kept plugin gains a new cross-plugin import after an upstream rebase. +# +# debug — imported by forward +# dnstap — imported by forward +# etcd — etcd/msg imported by kubernetes +# metadata — imported by cache, kubernetes, forward +# transfer — imported by kubernetes +# whoami — imported by bufsize (tests) +# erratic — imported by ready (tests) +DEP_DIRS := debug dnstap etcd metadata transfer whoami erratic + +.PHONY: generate-plugins +generate-plugins: + @echo "==> Overwriting $(PLUGIN_CFG) with $(OPENSHIFT_PLUGINS_CFG)" + cp $(OPENSHIFT_PLUGINS_CFG) $(PLUGIN_CFG) + @echo "==> Removing unused plugin directories" + @$(call remove-unused-plugins) + @echo "==> Regenerating plugin Go files" + go generate coredns.go + @echo "==> Tidying modules" + go mod tidy + @echo "==> Vendoring dependencies" + go mod vendor + @echo "==> Done. Review changes with 'git diff --stat'" + +.PHONY: verify-plugins +verify-plugins: + @echo "==> Verifying plugin tree matches $(OPENSHIFT_PLUGINS_CFG)" + @diff -q $(OPENSHIFT_PLUGINS_CFG) $(PLUGIN_CFG) || \ + (echo "ERROR: $(PLUGIN_CFG) does not match $(OPENSHIFT_PLUGINS_CFG)"; exit 1) + @$(call check-no-unused-plugins) + @echo "==> Plugin tree is clean" + +# All directories that must be preserved: infrastructure, active plugins +# (from openshift-plugins.cfg), and code-dependency plugins (DEP_DIRS). +define kept-plugin-dirs +$$(grep -v '^\s*#' $(OPENSHIFT_PLUGINS_CFG) | grep -v '^\s*$$' | cut -d: -f2 | grep -v '/') +endef + +# remove-unused-plugins deletes plugin// directories not in the +# kept set (active plugins + DEP_DIRS + INFRA_DIRS). +define remove-unused-plugins + kept=$(kept-plugin-dirs); \ + for dir in $(PLUGIN_DIR)/*/; do \ + name=$$(basename "$$dir"); \ + skip=false; \ + for s in $(INFRA_DIRS) $(DEP_DIRS); do \ + if [ "$$name" = "$$s" ]; then skip=true; break; fi; \ + done; \ + if $$skip; then continue; fi; \ + if echo "$$kept" | grep -qx "$$name"; then continue; fi; \ + echo " removing $(PLUGIN_DIR)/$$name"; \ + rm -rf "$$dir"; \ + done +endef + +# check-no-unused-plugins fails if any plugin directories exist that +# should have been removed. +define check-no-unused-plugins + kept=$(kept-plugin-dirs); \ + stale=""; \ + for dir in $(PLUGIN_DIR)/*/; do \ + name=$$(basename "$$dir"); \ + skip=false; \ + for s in $(INFRA_DIRS) $(DEP_DIRS); do \ + if [ "$$name" = "$$s" ]; then skip=true; break; fi; \ + done; \ + if $$skip; then continue; fi; \ + if echo "$$kept" | grep -qx "$$name"; then continue; fi; \ + stale="$$stale $$name"; \ + done; \ + if [ -n "$$stale" ]; then \ + echo "ERROR: unused plugin directories found:$$stale"; \ + echo "Run 'make -f Makefile.ocp generate-plugins' to fix."; \ + exit 1; \ + fi +endef diff --git a/OPENSHIFT.md b/OPENSHIFT.md new file mode 100644 index 0000000000..5fe6f0dd66 --- /dev/null +++ b/OPENSHIFT.md @@ -0,0 +1,51 @@ +# OpenShift CoreDNS Fork + +This is the OpenShift fork of [CoreDNS](https://coredns.io). It is deployed +and managed by the +[cluster-dns-operator](https://github.com/openshift/cluster-dns-operator). + +## Plugin management + +The operator generates the CoreDNS Corefile and only uses a subset of upstream +plugins. Unused plugins are removed to reduce the binary size, dependency +footprint, and attack surface. + +The file `openshift-plugins.cfg` is the source of truth for the kept plugin +set. It uses the same `name:package` format as the upstream `plugin.cfg`. + +### Regenerating after a rebase + +After rebasing onto a new upstream version: + +``` +make -f Makefile.ocp generate-plugins +``` + +This will: + +1. Overwrite `plugin.cfg` with `openshift-plugins.cfg` +2. Remove plugin directories under `plugin/` that are not needed +3. Regenerate the Go files (`core/plugin/zplugin.go`, `core/dnsserver/zdirectives.go`) +4. Run `go mod tidy` and `go mod vendor` + +Review the result with `git diff --stat`, then commit. + +### Adding or removing a plugin + +Edit `openshift-plugins.cfg`, then run `make -f Makefile.ocp generate-plugins`. + +If a kept plugin imports another plugin as a Go package (not as a registered +Corefile directive), that dependency directory must be listed in the `DEP_DIRS` +variable in `Makefile.ocp`. The build will fail with a clear error if a +dependency is missing. + +### CI verification + +The pipeline should run: + +``` +make -f Makefile.ocp verify-plugins +``` + +This checks that `plugin.cfg` matches `openshift-plugins.cfg` and that no +unused plugin directories are present. diff --git a/openshift-plugins.cfg b/openshift-plugins.cfg new file mode 100644 index 0000000000..f77055a303 --- /dev/null +++ b/openshift-plugins.cfg @@ -0,0 +1,23 @@ +# Plugins used by the OpenShift cluster-dns-operator Corefile template. +# This is the source of truth for the OpenShift plugin set. +# +# Run `make -f Makefile.ocp generate-plugins` after editing this file. +# +# Format: : +# Internal plugins use short names (resolved to plugin/). +# External plugins use fully-qualified Go import paths. + +cancel:cancel +reload:reload +bufsize:bufsize +ready:ready +health:health +prometheus:metrics +errors:errors +log:log +chaos:chaos +ocp_dnsnameresolver:github.com/openshift/coredns-ocp-dnsnameresolver +cache:cache +kubernetes:kubernetes +loop:loop +forward:forward From 3ca76cadd0dfb3a59dcfd17e635ef7bcaa4e4d40 Mon Sep 17 00:00:00 2001 From: Ricardo Pchevuzinske Katz Date: Fri, 29 May 2026 10:16:11 -0300 Subject: [PATCH 2/2] vendor libraries after generate-plugins is executed --- core/dnsserver/zdirectives.go | 42 - core/plugin/zplugin.go | 42 - go.mod | 110 +- go.sum | 322 - plugin.cfg | 66 +- plugin/acl/README.md | 110 - plugin/acl/acl.go | 151 - plugin/acl/acl_test.go | 599 - plugin/acl/metrics.go | 39 - plugin/acl/setup.go | 155 - plugin/acl/setup_test.go | 273 - plugin/any/README.md | 36 - plugin/any/any.go | 32 - plugin/any/any_test.go | 67 - plugin/any/setup.go | 20 - plugin/any/setup_test.go | 21 - plugin/auto/README.md | 82 - plugin/auto/auto.go | 104 - plugin/auto/auto_test.go | 268 - plugin/auto/log_test.go | 5 - plugin/auto/regexp.go | 23 - plugin/auto/regexp_test.go | 27 - plugin/auto/setup.go | 176 - plugin/auto/setup_test.go | 207 - plugin/auto/walk.go | 107 - plugin/auto/walk_test.go | 84 - plugin/auto/watcher_test.go | 94 - plugin/auto/xfr.go | 31 - plugin/auto/xfr_test.go | 98 - plugin/auto/zone.go | 77 - plugin/auto/zone_test.go | 222 - plugin/autopath/README.md | 68 - plugin/autopath/autopath.go | 157 - plugin/autopath/autopath_test.go | 166 - plugin/autopath/cname.go | 25 - plugin/autopath/metrics.go | 18 - plugin/autopath/setup.go | 70 - plugin/autopath/setup_test.go | 77 - plugin/azure/README.md | 60 - plugin/azure/azure.go | 352 - plugin/azure/azure_test.go | 180 - plugin/azure/setup.go | 144 - plugin/azure/setup_test.go | 71 - plugin/bind/README.md | 110 - plugin/bind/bind.go | 17 - plugin/bind/log_test.go | 5 - plugin/bind/setup.go | 108 - plugin/bind/setup_test.go | 54 - plugin/clouddns/README.md | 73 - plugin/clouddns/clouddns.go | 227 - plugin/clouddns/clouddns_test.go | 458 - plugin/clouddns/gcp.go | 40 - plugin/clouddns/log_test.go | 5 - plugin/clouddns/setup.go | 108 - plugin/clouddns/setup_test.go | 49 - plugin/dns64/README.md | 106 - plugin/dns64/dns64.go | 205 - plugin/dns64/dns64_test.go | 556 - plugin/dns64/metrics.go | 18 - plugin/dns64/setup.go | 92 - plugin/dns64/setup_test.go | 153 - plugin/dnssec/README.md | 119 - plugin/dnssec/black_lies.go | 79 - plugin/dnssec/black_lies_bitmap_test.go | 64 - plugin/dnssec/black_lies_test.go | 258 - plugin/dnssec/cache.go | 48 - plugin/dnssec/cache_test.go | 82 - plugin/dnssec/dnskey.go | 169 - plugin/dnssec/dnssec.go | 179 - plugin/dnssec/dnssec_test.go | 288 - plugin/dnssec/handler.go | 50 - plugin/dnssec/handler_test.go | 253 - plugin/dnssec/log_test.go | 5 - plugin/dnssec/metrics.go | 32 - plugin/dnssec/responsewriter.go | 43 - plugin/dnssec/rrsig.go | 53 - plugin/dnssec/setup.go | 155 - plugin/dnssec/setup_test.go | 160 - plugin/file/README.md | 117 - plugin/file/apex_test.go | 45 - plugin/file/closest.go | 23 - plugin/file/closest_test.go | 39 - plugin/file/delegation_test.go | 229 - plugin/file/delete_test.go | 65 - plugin/file/dname.go | 44 - plugin/file/dname_test.go | 300 - plugin/file/dnssec_test.go | 348 - plugin/file/dnssex_test.go | 145 - plugin/file/ds_test.go | 77 - plugin/file/ent_test.go | 159 - plugin/file/example_org.go | 113 - plugin/file/file.go | 181 - plugin/file/file_test.go | 59 - plugin/file/fuzz.go | 50 - plugin/file/glue_test.go | 254 - plugin/file/include_test.go | 31 - plugin/file/log_test.go | 5 - plugin/file/lookup.go | 435 - plugin/file/lookup_test.go | 362 - plugin/file/notify.go | 33 - plugin/file/nsec3_test.go | 28 - plugin/file/reload.go | 69 - plugin/file/reload_test.go | 90 - plugin/file/rrutil/util.go | 18 - plugin/file/secondary.go | 198 - plugin/file/secondary_test.go | 146 - plugin/file/setup.go | 157 - plugin/file/setup_test.go | 152 - plugin/file/shutdown.go | 9 - plugin/file/tree/all.go | 21 - plugin/file/tree/auth_walk.go | 58 - plugin/file/tree/elem.go | 103 - plugin/file/tree/elem_test.go | 41 - plugin/file/tree/glue.go | 44 - plugin/file/tree/less.go | 60 - plugin/file/tree/less_test.go | 121 - plugin/file/tree/print.go | 62 - plugin/file/tree/print_test.go | 100 - plugin/file/tree/tree.go | 453 - plugin/file/tree/walk.go | 33 - plugin/file/wildcard.go | 13 - plugin/file/wildcard_test.go | 298 - plugin/file/xfr.go | 45 - plugin/file/xfr_test.go | 72 - plugin/file/zone.go | 181 - plugin/file/zone_test.go | 74 - plugin/geoip/README.md | 117 - plugin/geoip/city.go | 58 - plugin/geoip/geoip.go | 107 - plugin/geoip/geoip_test.go | 91 - plugin/geoip/setup.go | 57 - plugin/geoip/setup_test.go | 110 - plugin/geoip/testdata/GeoLite2-City.mmdb | Bin 3281 -> 0 bytes .../testdata/GeoLite2-UnknownDbType.mmdb | Bin 3280 -> 0 bytes plugin/geoip/testdata/README.md | 112 - plugin/grpc/README.md | 161 - plugin/grpc/fuzz.go | 216 - plugin/grpc/grpc.go | 171 - plugin/grpc/grpc_test.go | 181 - plugin/grpc/metrics.go | 32 - plugin/grpc/policy.go | 73 - plugin/grpc/policy_test.go | 128 - plugin/grpc/proxy.go | 125 - plugin/grpc/proxy_test.go | 148 - plugin/grpc/setup.go | 155 - plugin/grpc/setup_policy_test.go | 47 - plugin/grpc/setup_test.go | 199 - plugin/header/README.md | 63 - plugin/header/handler.go | 27 - plugin/header/header.go | 95 - plugin/header/header_test.go | 152 - plugin/header/setup.go | 67 - plugin/header/setup_test.go | 59 - plugin/hosts/README.md | 125 - plugin/hosts/hosts.go | 122 - plugin/hosts/hosts_test.go | 120 - plugin/hosts/hostsfile.go | 259 - plugin/hosts/hostsfile_test.go | 243 - plugin/hosts/log_test.go | 5 - plugin/hosts/metrics.go | 25 - plugin/hosts/setup.go | 157 - plugin/hosts/setup_test.go | 169 - plugin/k8s_external/README.md | 132 - plugin/k8s_external/apex.go | 112 - plugin/k8s_external/apex_test.go | 122 - plugin/k8s_external/external.go | 126 - plugin/k8s_external/external_test.go | 433 - plugin/k8s_external/msg_to_dns.go | 190 - plugin/k8s_external/setup.go | 88 - plugin/k8s_external/setup_test.go | 71 - plugin/k8s_external/transfer.go | 150 - plugin/k8s_external/transfer_test.go | 147 - plugin/loadbalance/README.md | 107 - plugin/loadbalance/handler.go | 25 - plugin/loadbalance/loadbalance.go | 91 - plugin/loadbalance/loadbalance_test.go | 203 - plugin/loadbalance/log_test.go | 5 - plugin/loadbalance/prefer.go | 76 - plugin/loadbalance/prefer_test.go | 96 - plugin/loadbalance/setup.go | 130 - plugin/loadbalance/setup_test.go | 100 - plugin/loadbalance/weighted.go | 329 - plugin/loadbalance/weighted_test.go | 432 - plugin/local/README.md | 52 - plugin/local/local.go | 127 - plugin/local/local_test.go | 77 - plugin/local/metrics.go | 18 - plugin/local/setup.go | 20 - plugin/minimal/README.md | 36 - plugin/minimal/minimal.go | 55 - plugin/minimal/minimal_test.go | 153 - plugin/minimal/setup.go | 24 - plugin/minimal/setup_test.go | 19 - plugin/multisocket/README.md | 68 - plugin/multisocket/multisocket.go | 51 - plugin/multisocket/multisocket_test.go | 55 - plugin/nomad/README.md | 235 - plugin/nomad/helpers.go | 68 - plugin/nomad/metrics.go | 25 - plugin/nomad/nomad.go | 158 - plugin/nomad/nomad_test.go | 204 - plugin/nomad/ready.go | 9 - plugin/nomad/setup.go | 141 - plugin/nomad/setup_test.go | 110 - plugin/nsid/README.md | 57 - plugin/nsid/log_test.go | 5 - plugin/nsid/nsid.go | 69 - plugin/nsid/nsid_test.go | 136 - plugin/nsid/setup.go | 45 - plugin/nsid/setup_test.go | 68 - plugin/pprof/README.md | 74 - plugin/pprof/log_test.go | 5 - plugin/pprof/pprof.go | 60 - plugin/pprof/pprof_test.go | 163 - plugin/pprof/setup.go | 65 - plugin/pprof/setup_test.go | 50 - plugin/quic/README.md | 48 - plugin/quic/setup.go | 79 - plugin/quic/setup_test.go | 244 - plugin/rewrite/README.md | 546 - plugin/rewrite/class.go | 44 - plugin/rewrite/cname_target.go | 162 - plugin/rewrite/cname_target_test.go | 265 - plugin/rewrite/edns0.go | 497 - plugin/rewrite/fuzz.go | 20 - plugin/rewrite/log_test.go | 5 - plugin/rewrite/name.go | 449 - plugin/rewrite/name_test.go | 370 - plugin/rewrite/rcode.go | 178 - plugin/rewrite/rcode_test.go | 72 - plugin/rewrite/reverter.go | 147 - plugin/rewrite/reverter_test.go | 197 - plugin/rewrite/rewrite.go | 149 - plugin/rewrite/rewrite_test.go | 1160 - plugin/rewrite/setup.go | 42 - plugin/rewrite/setup_test.go | 51 - plugin/rewrite/ttl.go | 205 - plugin/rewrite/ttl_test.go | 158 - plugin/rewrite/type.go | 45 - plugin/rewrite/wire.go | 35 - plugin/root/README.md | 56 - plugin/root/log_test.go | 5 - plugin/root/root.go | 38 - plugin/root/root_test.go | 102 - plugin/route53/README.md | 131 - plugin/route53/log_test.go | 5 - plugin/route53/route53.go | 301 - plugin/route53/route53_test.go | 295 - plugin/route53/setup.go | 170 - plugin/route53/setup_test.go | 88 - plugin/secondary/README.md | 73 - plugin/secondary/log_test.go | 5 - plugin/secondary/secondary.go | 13 - plugin/secondary/setup.go | 103 - plugin/secondary/setup_test.go | 71 - plugin/sign/README.md | 168 - plugin/sign/dnssec.go | 20 - plugin/sign/file.go | 92 - plugin/sign/file_test.go | 43 - plugin/sign/keys.go | 120 - plugin/sign/log_test.go | 5 - plugin/sign/nsec.go | 36 - plugin/sign/nsec_test.go | 27 - plugin/sign/resign_test.go | 40 - plugin/sign/setup.go | 106 - plugin/sign/setup_test.go | 86 - plugin/sign/sign.go | 38 - plugin/sign/signer.go | 206 - plugin/sign/signer_test.go | 177 - plugin/sign/testdata/Kmiek.nl.+013+59725.key | 5 - .../sign/testdata/Kmiek.nl.+013+59725.private | 6 - plugin/sign/testdata/db.miek.nl | 17 - plugin/sign/testdata/db.miek.nl_ns | 10 - plugin/template/README.md | 298 - plugin/template/cname_test.go | 96 - plugin/template/log_test.go | 5 - plugin/template/metrics.go | 32 - plugin/template/setup.go | 162 - plugin/template/setup_test.go | 200 - plugin/template/template.go | 227 - plugin/template/template_test.go | 679 - plugin/timeouts/README.md | 89 - plugin/timeouts/timeouts.go | 69 - plugin/timeouts/timeouts_test.go | 75 - plugin/tls/README.md | 73 - plugin/tls/log_test.go | 5 - plugin/tls/test_ca.pem | 20 - plugin/tls/test_cert.pem | 20 - plugin/tls/test_key.pem | 28 - plugin/tls/tls.go | 77 - plugin/tls/tls_test.go | 87 - plugin/trace/README.md | 113 - plugin/trace/log_test.go | 5 - plugin/trace/logger.go | 20 - plugin/trace/setup.go | 164 - plugin/trace/setup_test.go | 88 - plugin/trace/trace.go | 256 - plugin/trace/trace_test.go | 330 - plugin/tsig/README.md | 118 - plugin/tsig/setup.go | 168 - plugin/tsig/setup_test.go | 245 - plugin/tsig/tsig.go | 140 - plugin/tsig/tsig_test.go | 253 - plugin/view/README.md | 147 - plugin/view/metadata.go | 16 - plugin/view/metadata_test.go | 22 - plugin/view/setup.go | 62 - plugin/view/setup_test.go | 63 - plugin/view/view.go | 48 - plugin/view/view_test.go | 71 - vendor/cloud.google.com/go/auth/CHANGES.md | 447 - vendor/cloud.google.com/go/auth/LICENSE | 202 - vendor/cloud.google.com/go/auth/README.md | 40 - vendor/cloud.google.com/go/auth/auth.go | 616 - .../go/auth/credentials/compute.go | 102 - .../go/auth/credentials/detect.go | 317 - .../go/auth/credentials/doc.go | 45 - .../go/auth/credentials/filetypes.go | 233 - .../internal/externalaccount/aws_provider.go | 531 - .../externalaccount/executable_provider.go | 284 - .../externalaccount/externalaccount.go | 431 - .../internal/externalaccount/file_provider.go | 78 - .../internal/externalaccount/info.go | 74 - .../externalaccount/programmatic_provider.go | 30 - .../internal/externalaccount/url_provider.go | 93 - .../internal/externalaccount/x509_provider.go | 220 - .../externalaccountuser.go | 115 - .../go/auth/credentials/internal/gdch/gdch.go | 191 - .../internal/impersonate/idtoken.go | 105 - .../internal/impersonate/impersonate.go | 156 - .../internal/stsexchange/sts_exchange.go | 167 - .../go/auth/credentials/selfsignedjwt.go | 89 - .../go/auth/httptransport/httptransport.go | 247 - .../go/auth/httptransport/transport.go | 234 - .../go/auth/internal/credsfile/credsfile.go | 107 - .../go/auth/internal/credsfile/filetype.go | 158 - .../go/auth/internal/credsfile/parse.go | 98 - .../go/auth/internal/internal.go | 225 - .../go/auth/internal/jwt/jwt.go | 171 - .../go/auth/internal/transport/cba.go | 361 - .../internal/transport/cert/default_cert.go | 65 - .../transport/cert/enterprise_cert.go | 54 - .../transport/cert/secureconnect_cert.go | 124 - .../internal/transport/cert/workload_cert.go | 138 - .../go/auth/internal/transport/s2a.go | 138 - .../go/auth/internal/transport/transport.go | 107 - .../go/auth/oauth2adapt/CHANGES.md | 82 - .../go/auth/oauth2adapt/LICENSE | 202 - .../go/auth/oauth2adapt/oauth2adapt.go | 200 - .../cloud.google.com/go/auth/threelegged.go | 382 - .../go/compute/metadata/CHANGES.md | 115 - .../go/compute/metadata/LICENSE | 202 - .../go/compute/metadata/README.md | 27 - .../go/compute/metadata/log.go | 149 - .../go/compute/metadata/metadata.go | 937 - .../go/compute/metadata/retry.go | 117 - .../go/compute/metadata/retry_linux.go | 31 - .../go/compute/metadata/syscheck.go | 28 - .../go/compute/metadata/syscheck_linux.go | 30 - .../go/compute/metadata/syscheck_windows.go | 39 - .../Azure/azure-sdk-for-go/LICENSE.txt | 21 - .../Azure/azure-sdk-for-go/NOTICE.txt | 29 - .../profiles/latest/dns/mgmt/dns/models.go | 128 - .../privatedns/mgmt/privatedns/models.go | 149 - .../dns/mgmt/2018-05-01/dns/CHANGELOG.md | 2 - .../dns/mgmt/2018-05-01/dns/_meta.json | 11 - .../dns/mgmt/2018-05-01/dns/client.go | 43 - .../services/dns/mgmt/2018-05-01/dns/enums.go | 53 - .../dns/mgmt/2018-05-01/dns/models.go | 961 - .../dns/mgmt/2018-05-01/dns/recordsets.go | 774 - .../mgmt/2018-05-01/dns/resourcereference.go | 107 - .../dns/mgmt/2018-05-01/dns/version.go | 19 - .../services/dns/mgmt/2018-05-01/dns/zones.go | 606 - .../mgmt/2020-06-01/privatedns/CHANGELOG.md | 2 - .../mgmt/2020-06-01/privatedns/_meta.json | 11 - .../mgmt/2020-06-01/privatedns/client.go | 43 - .../mgmt/2020-06-01/privatedns/enums.go | 72 - .../mgmt/2020-06-01/privatedns/models.go | 1352 - .../2020-06-01/privatedns/privatezones.go | 614 - .../mgmt/2020-06-01/privatedns/recordsets.go | 640 - .../mgmt/2020-06-01/privatedns/version.go | 19 - .../privatedns/virtualnetworklinks.go | 509 - .../Azure/azure-sdk-for-go/version/version.go | 7 - .../github.com/Azure/go-autorest/.gitignore | 32 - .../github.com/Azure/go-autorest/CHANGELOG.md | 1004 - .../github.com/Azure/go-autorest/GNUmakefile | 23 - .../github.com/Azure/go-autorest/Gopkg.lock | 324 - .../github.com/Azure/go-autorest/Gopkg.toml | 59 - vendor/github.com/Azure/go-autorest/LICENSE | 191 - vendor/github.com/Azure/go-autorest/README.md | 165 - .../Azure/go-autorest/autorest/LICENSE | 191 - .../Azure/go-autorest/autorest/adal/LICENSE | 191 - .../Azure/go-autorest/autorest/adal/README.md | 294 - .../Azure/go-autorest/autorest/adal/config.go | 151 - .../go-autorest/autorest/adal/devicetoken.go | 273 - .../autorest/adal/go_mod_tidy_hack.go | 25 - .../go-autorest/autorest/adal/persist.go | 135 - .../Azure/go-autorest/autorest/adal/sender.go | 101 - .../Azure/go-autorest/autorest/adal/token.go | 1396 - .../go-autorest/autorest/adal/token_1.13.go | 76 - .../go-autorest/autorest/adal/token_legacy.go | 75 - .../go-autorest/autorest/adal/version.go | 45 - .../go-autorest/autorest/authorization.go | 353 - .../go-autorest/autorest/authorization_sas.go | 66 - .../autorest/authorization_storage.go | 307 - .../Azure/go-autorest/autorest/autorest.go | 150 - .../Azure/go-autorest/autorest/azure/async.go | 995 - .../go-autorest/autorest/azure/auth/LICENSE | 191 - .../go-autorest/autorest/azure/auth/README.md | 152 - .../go-autorest/autorest/azure/auth/auth.go | 772 - .../autorest/azure/auth/go_mod_tidy_hack.go | 25 - .../Azure/go-autorest/autorest/azure/azure.go | 388 - .../go-autorest/autorest/azure/cli/LICENSE | 191 - .../autorest/azure/cli/go_mod_tidy_hack.go | 25 - .../go-autorest/autorest/azure/cli/profile.go | 83 - .../go-autorest/autorest/azure/cli/token.go | 227 - .../autorest/azure/environments.go | 330 - .../autorest/azure/metadata_environment.go | 245 - .../Azure/go-autorest/autorest/azure/rp.go | 204 - .../Azure/go-autorest/autorest/client.go | 327 - .../Azure/go-autorest/autorest/date/LICENSE | 191 - .../Azure/go-autorest/autorest/date/date.go | 96 - .../autorest/date/go_mod_tidy_hack.go | 24 - .../Azure/go-autorest/autorest/date/time.go | 103 - .../go-autorest/autorest/date/timerfc1123.go | 100 - .../go-autorest/autorest/date/unixtime.go | 123 - .../go-autorest/autorest/date/utility.go | 25 - .../Azure/go-autorest/autorest/error.go | 103 - .../go-autorest/autorest/go_mod_tidy_hack.go | 25 - .../Azure/go-autorest/autorest/preparer.go | 548 - .../Azure/go-autorest/autorest/responder.go | 268 - .../go-autorest/autorest/retriablerequest.go | 51 - .../autorest/retriablerequest_1.7.go | 55 - .../autorest/retriablerequest_1.8.go | 66 - .../Azure/go-autorest/autorest/sender.go | 458 - .../Azure/go-autorest/autorest/to/LICENSE | 191 - .../Azure/go-autorest/autorest/to/convert.go | 152 - .../Azure/go-autorest/autorest/utility.go | 231 - .../go-autorest/autorest/utility_1.13.go | 30 - .../go-autorest/autorest/utility_legacy.go | 32 - .../Azure/go-autorest/autorest/version.go | 41 - .../Azure/go-autorest/azure-pipelines.yml | 105 - vendor/github.com/Azure/go-autorest/doc.go | 18 - .../Azure/go-autorest/logger/LICENSE | 191 - .../go-autorest/logger/go_mod_tidy_hack.go | 24 - .../Azure/go-autorest/logger/logger.go | 337 - .../Azure/go-autorest/tracing/LICENSE | 191 - .../go-autorest/tracing/go_mod_tidy_hack.go | 24 - .../Azure/go-autorest/tracing/tracing.go | 67 - .../DataDog/appsec-internal-go/LICENSE | 200 - .../apisec/internal/config/const.go | 11 - .../apisec/internal/timed/clock.go | 42 - .../apisec/internal/timed/lru.go | 211 - .../apisec/internal/timed/table.go | 181 - .../appsec-internal-go/apisec/sampler.go | 98 - .../appsec-internal-go/appsec/config.go | 283 - .../appsec-internal-go/appsec/embed.go | 20 - .../appsec-internal-go/appsec/rules.go | 23 - .../appsec-internal-go/appsec/rules.json | 10149 ------- .../appsec-internal-go/limiter/limiter.go | 154 - .../DataDog/appsec-internal-go/log/backend.go | 138 - .../DataDog/appsec-internal-go/log/log.go | 45 - .../comp/core/tagger/origindetection/LICENSE | 200 - .../tagger/origindetection/origindetection.go | 150 - .../datadog-agent/pkg/obfuscate/LICENSE | 200 - .../datadog-agent/pkg/obfuscate/cache.go | 86 - .../pkg/obfuscate/credit_cards.go | 278 - .../datadog-agent/pkg/obfuscate/http.go | 60 - .../datadog-agent/pkg/obfuscate/ip_address.go | 237 - .../datadog-agent/pkg/obfuscate/json.go | 234 - .../pkg/obfuscate/json_scanner.go | 560 - .../datadog-agent/pkg/obfuscate/memcached.go | 26 - .../datadog-agent/pkg/obfuscate/obfuscate.go | 394 - .../datadog-agent/pkg/obfuscate/redis.go | 301 - .../pkg/obfuscate/redis_tokenizer.go | 187 - .../datadog-agent/pkg/obfuscate/sql.go | 528 - .../pkg/obfuscate/sql_tokenizer.go | 939 - .../DataDog/datadog-agent/pkg/proto/LICENSE | 200 - .../pkg/proto/pbgo/trace/agent_payload.pb.go | 205 - .../pkg/proto/pbgo/trace/agent_payload_gen.go | 200 - .../pbgo/trace/agent_payload_vtproto.pb.go | 524 - .../pkg/proto/pbgo/trace/decoder_bytes.go | 275 - .../pkg/proto/pbgo/trace/decoder_v05.go | 223 - .../pkg/proto/pbgo/trace/span.pb.go | 866 - .../pkg/proto/pbgo/trace/span_gen.go | 1198 - .../pkg/proto/pbgo/trace/span_utils.go | 55 - .../pkg/proto/pbgo/trace/span_vtproto.pb.go | 2399 -- .../pkg/proto/pbgo/trace/stats.pb.go | 761 - .../pkg/proto/pbgo/trace/stats_gen.go | 1931 -- .../pkg/proto/pbgo/trace/stats_vtproto.pb.go | 2086 -- .../pkg/proto/pbgo/trace/trace.go | 52 - .../pkg/proto/pbgo/trace/trace_gen.go | 158 - .../pkg/proto/pbgo/trace/tracer_payload.pb.go | 336 - .../proto/pbgo/trace/tracer_payload_gen.go | 384 - .../proto/pbgo/trace/tracer_payload_utils.go | 35 - .../pbgo/trace/tracer_payload_vtproto.pb.go | 1067 - .../pkg/remoteconfig/state/LICENSE | 200 - .../pkg/remoteconfig/state/README.md | 5 - .../pkg/remoteconfig/state/agent_config.go | 159 - .../pkg/remoteconfig/state/configs.go | 123 - .../remoteconfig/state/configs_agent_task.go | 59 - .../pkg/remoteconfig/state/configs_asm.go | 166 - .../pkg/remoteconfig/state/path.go | 100 - .../pkg/remoteconfig/state/products.go | 109 - .../pkg/remoteconfig/state/repository.go | 457 - .../pkg/remoteconfig/state/tuf.go | 233 - .../DataDog/datadog-agent/pkg/trace/LICENSE | 200 - .../datadog-agent/pkg/trace/config/client.go | 70 - .../datadog-agent/pkg/trace/config/config.go | 728 - .../pkg/trace/config/peer_tags.go | 55 - .../pkg/trace/config/peer_tags.ini | 18 - .../datadog-agent/pkg/trace/log/buflogger.go | 97 - .../datadog-agent/pkg/trace/log/logger.go | 196 - .../datadog-agent/pkg/trace/log/throttled.go | 63 - .../pkg/trace/sampler/catalog.go | 93 - .../pkg/trace/sampler/coresampler.go | 270 - .../pkg/trace/sampler/dynamic_config.go | 115 - .../datadog-agent/pkg/trace/sampler/env.go | 23 - .../pkg/trace/sampler/metrics.go | 204 - .../pkg/trace/sampler/prioritysampler.go | 158 - .../pkg/trace/sampler/probabilistic.go | 110 - .../pkg/trace/sampler/rare_sampler.go | 227 - .../pkg/trace/sampler/sampler.go | 254 - .../pkg/trace/sampler/scoresampler.go | 133 - .../pkg/trace/sampler/signature.go | 122 - .../pkg/trace/stats/aggregation.go | 197 - .../trace/stats/client_stats_aggregator.go | 449 - .../pkg/trace/stats/concentrator.go | 201 - .../pkg/trace/stats/otel_util.go | 162 - .../pkg/trace/stats/span_concentrator.go | 261 - .../datadog-agent/pkg/trace/stats/statsraw.go | 210 - .../datadog-agent/pkg/trace/stats/weight.go | 24 - .../pkg/trace/traceutil/azure.go | 166 - .../datadog-agent/pkg/trace/traceutil/doc.go | 8 - .../trace/traceutil/normalize/normalize.go | 405 - .../pkg/trace/traceutil/normalize/truncate.go | 37 - .../pkg/trace/traceutil/otel_util.go | 637 - .../pkg/trace/traceutil/processed_trace.go | 53 - .../datadog-agent/pkg/trace/traceutil/span.go | 175 - .../pkg/trace/traceutil/trace.go | 119 - .../pkg/trace/transform/obfuscate.go | 82 - .../pkg/trace/transform/transform.go | 550 - .../pkg/trace/version/version.go | 66 - .../datadog-agent/pkg/trace/watchdog/cpu.go | 51 - .../pkg/trace/watchdog/cpu_aix.go | 111 - .../pkg/trace/watchdog/cpu_windows.go | 56 - .../datadog-agent/pkg/trace/watchdog/info.go | 99 - .../pkg/trace/watchdog/logonpanic.go | 49 - .../datadog-agent/pkg/util/log/LICENSE | 200 - .../pkg/util/log/klog_redirect.go | 59 - .../datadog-agent/pkg/util/log/levels.go | 47 - .../DataDog/datadog-agent/pkg/util/log/log.go | 1045 - .../datadog-agent/pkg/util/log/log_limit.go | 38 - .../pkg/util/log/log_not_serverless.go | 18 - .../pkg/util/log/log_podman_util.go | 27 - .../pkg/util/log/log_serverless.go | 18 - .../pkg/util/log/log_test_init.go | 20 - .../datadog-agent/pkg/util/log/logger.go | 35 - .../datadog-agent/pkg/util/log/wrapper.go | 77 - .../datadog-agent/pkg/util/scrubber/LICENSE | 200 - .../pkg/util/scrubber/default.go | 421 - .../pkg/util/scrubber/json_scrubber.go | 33 - .../pkg/util/scrubber/scrubber.go | 223 - .../pkg/util/scrubber/yaml_scrubber.go | 126 - .../DataDog/datadog-agent/pkg/version/LICENSE | 200 - .../DataDog/datadog-agent/pkg/version/base.go | 31 - .../datadog-agent/pkg/version/version.go | 95 - .../DataDog/datadog-go/v5/LICENSE.txt | 19 - .../DataDog/datadog-go/v5/statsd/README.md | 4 - .../datadog-go/v5/statsd/aggregator.go | 298 - .../DataDog/datadog-go/v5/statsd/buffer.go | 198 - .../datadog-go/v5/statsd/buffer_pool.go | 40 - .../v5/statsd/buffered_metric_context.go | 104 - .../DataDog/datadog-go/v5/statsd/container.go | 19 - .../datadog-go/v5/statsd/container_linux.go | 219 - .../datadog-go/v5/statsd/container_stub.go | 17 - .../datadog-go/v5/statsd/error_handler.go | 22 - .../DataDog/datadog-go/v5/statsd/event.go | 75 - .../DataDog/datadog-go/v5/statsd/fnv1a.go | 39 - .../DataDog/datadog-go/v5/statsd/format.go | 280 - .../DataDog/datadog-go/v5/statsd/metrics.go | 268 - .../DataDog/datadog-go/v5/statsd/noop.go | 118 - .../DataDog/datadog-go/v5/statsd/options.go | 414 - .../DataDog/datadog-go/v5/statsd/pipe.go | 13 - .../datadog-go/v5/statsd/pipe_windows.go | 81 - .../DataDog/datadog-go/v5/statsd/sender.go | 145 - .../datadog-go/v5/statsd/service_check.go | 57 - .../DataDog/datadog-go/v5/statsd/statsd.go | 907 - .../datadog-go/v5/statsd/statsd_direct.go | 69 - .../DataDog/datadog-go/v5/statsd/telemetry.go | 307 - .../DataDog/datadog-go/v5/statsd/udp.go | 39 - .../DataDog/datadog-go/v5/statsd/uds.go | 167 - .../datadog-go/v5/statsd/uds_windows.go | 15 - .../DataDog/datadog-go/v5/statsd/utils.go | 32 - .../DataDog/datadog-go/v5/statsd/worker.go | 158 - .../github.com/DataDog/dd-trace-go/v2/LICENSE | 234 - .../dd-trace-go/v2/LICENSE-3rdparty.csv | 4 - .../DataDog/dd-trace-go/v2/LICENSE-APACHE | 200 - .../DataDog/dd-trace-go/v2/LICENSE-BSD3 | 24 - .../github.com/DataDog/dd-trace-go/v2/NOTICE | 4 - .../dd-trace-go/v2/appsec/events/block.go | 32 - .../v2/datastreams/options/options.go | 11 - .../DataDog/dd-trace-go/v2/ddtrace/ddtrace.go | 36 - .../dd-trace-go/v2/ddtrace/ext/app_types.go | 79 - .../DataDog/dd-trace-go/v2/ddtrace/ext/aws.go | 34 - .../DataDog/dd-trace-go/v2/ddtrace/ext/db.go | 119 - .../dd-trace-go/v2/ddtrace/ext/graphql.go | 10 - .../dd-trace-go/v2/ddtrace/ext/log_key.go | 13 - .../dd-trace-go/v2/ddtrace/ext/messaging.go | 27 - .../dd-trace-go/v2/ddtrace/ext/peer.go | 21 - .../dd-trace-go/v2/ddtrace/ext/priority.go | 27 - .../DataDog/dd-trace-go/v2/ddtrace/ext/rpc.go | 34 - .../dd-trace-go/v2/ddtrace/ext/span_kind.go | 32 - .../dd-trace-go/v2/ddtrace/ext/system.go | 12 - .../dd-trace-go/v2/ddtrace/ext/tags.go | 144 - .../v2/ddtrace/internal/globaltracer.go | 64 - .../v2/ddtrace/internal/tracerstats/stats.go | 91 - .../mocktracer/civisibilitymocktracer.go | 174 - .../v2/ddtrace/mocktracer/data_streams.go | 45 - .../v2/ddtrace/mocktracer/mockspan.go | 269 - .../v2/ddtrace/mocktracer/mockspancontext.go | 84 - .../v2/ddtrace/mocktracer/mocktracer.go | 215 - .../dd-trace-go/v2/ddtrace/tracer/README.md | 33 - .../v2/ddtrace/tracer/abandonedspans.go | 314 - .../dd-trace-go/v2/ddtrace/tracer/api.txt | 378 - .../v2/ddtrace/tracer/civisibility_payload.go | 152 - .../ddtrace/tracer/civisibility_transport.go | 209 - .../v2/ddtrace/tracer/civisibility_tslv.go | 443 - .../ddtrace/tracer/civisibility_tslv_msgp.go | 925 - .../v2/ddtrace/tracer/civisibility_writer.go | 130 - .../dd-trace-go/v2/ddtrace/tracer/context.go | 57 - .../v2/ddtrace/tracer/data_streams.go | 73 - .../dd-trace-go/v2/ddtrace/tracer/doc.go | 110 - .../v2/ddtrace/tracer/dynamic_config.go | 119 - .../v2/ddtrace/tracer/globaltracer.go | 23 - .../dd-trace-go/v2/ddtrace/tracer/log.go | 177 - .../dd-trace-go/v2/ddtrace/tracer/logger.go | 42 - .../v2/ddtrace/tracer/meta_struct.go | 88 - .../dd-trace-go/v2/ddtrace/tracer/metrics.go | 118 - .../dd-trace-go/v2/ddtrace/tracer/noop.go | 39 - .../dd-trace-go/v2/ddtrace/tracer/option.go | 1637 -- .../v2/ddtrace/tracer/orchestrion.yml | 120 - .../v2/ddtrace/tracer/otel_dd_mappings.go | 236 - .../dd-trace-go/v2/ddtrace/tracer/payload.go | 154 - .../v2/ddtrace/tracer/propagating_tags.go | 94 - .../v2/ddtrace/tracer/propagator.go | 55 - .../dd-trace-go/v2/ddtrace/tracer/rand.go | 19 - .../v2/ddtrace/tracer/remote_config.go | 427 - .../v2/ddtrace/tracer/rules_sampler.go | 874 - .../dd-trace-go/v2/ddtrace/tracer/sampler.go | 176 - .../ddtrace/tracer/seelog_leak_workaround.go | 55 - .../dd-trace-go/v2/ddtrace/tracer/slog.go | 100 - .../dd-trace-go/v2/ddtrace/tracer/span.go | 1001 - .../v2/ddtrace/tracer/span_config.go | 143 - .../v2/ddtrace/tracer/span_event.go | 243 - .../v2/ddtrace/tracer/span_event_config.go | 36 - .../v2/ddtrace/tracer/span_event_msgp.go | 768 - .../v2/ddtrace/tracer/span_link_msgp.go | 223 - .../v2/ddtrace/tracer/span_msgp.go | 713 - .../v2/ddtrace/tracer/spancontext.go | 730 - .../dd-trace-go/v2/ddtrace/tracer/spanlink.go | 25 - .../v2/ddtrace/tracer/sqlcomment.go | 299 - .../dd-trace-go/v2/ddtrace/tracer/stats.go | 245 - .../v2/ddtrace/tracer/telemetry.go | 129 - .../dd-trace-go/v2/ddtrace/tracer/textmap.go | 1472 - .../dd-trace-go/v2/ddtrace/tracer/time.go | 17 - .../v2/ddtrace/tracer/time_windows.go | 48 - .../dd-trace-go/v2/ddtrace/tracer/tracer.go | 1021 - .../v2/ddtrace/tracer/tracer_metadata.go | 27 - .../v2/ddtrace/tracer/tracer_metadata_msgp.go | 285 - .../v2/ddtrace/tracer/transport.go | 221 - .../dd-trace-go/v2/ddtrace/tracer/util.go | 129 - .../dd-trace-go/v2/ddtrace/tracer/writer.go | 365 - .../DataDog/dd-trace-go/v2/ddtrace/v1.go | 28 - .../instrumentation/appsec/dyngo/operation.go | 381 - .../appsec/emitter/graphqlsec/README.md | 25 - .../appsec/emitter/graphqlsec/execution.go | 62 - .../appsec/emitter/graphqlsec/request.go | 74 - .../appsec/emitter/graphqlsec/resolve.go | 63 - .../appsec/emitter/grpcsec/grpc.go | 125 - .../appsec/emitter/httpsec/config.go | 30 - .../appsec/emitter/httpsec/http.go | 245 - .../appsec/emitter/httpsec/roundtripper.go | 71 - .../appsec/emitter/ossec/lfi.go | 41 - .../appsec/emitter/sqlsec/sql.go | 71 - .../appsec/emitter/waf/actions/actions.go | 63 - .../appsec/emitter/waf/actions/block.go | 161 - .../emitter/waf/actions/blocked-template.html | 1 - .../emitter/waf/actions/blocked-template.json | 1 - .../emitter/waf/actions/http_redirect.go | 54 - .../appsec/emitter/waf/actions/stacktrace.go | 44 - .../appsec/emitter/waf/addresses/addresses.go | 44 - .../appsec/emitter/waf/addresses/builder.go | 286 - .../emitter/waf/addresses/rasp_rule_type.go | 64 - .../appsec/emitter/waf/addresses/scope.go | 25 - .../appsec/trace/service_entry_span.go | 160 - .../v2/instrumentation/appsec/trace/span.go | 67 - .../appsec/trace/tag_setter.go | 29 - .../instrumentation/errortrace/errortrace.go | 162 - .../v2/instrumentation/options/options.go | 40 - .../v2/internal/active_span_key.go | 11 - .../DataDog/dd-trace-go/v2/internal/agent.go | 75 - .../dd-trace-go/v2/internal/appsec/README.md | 212 - .../dd-trace-go/v2/internal/appsec/appsec.go | 230 - .../v2/internal/appsec/config/config.go | 223 - .../v2/internal/appsec/config/wafmanager.go | 186 - .../internal/appsec/emitter/usersec/user.go | 73 - .../v2/internal/appsec/emitter/waf/context.go | 187 - .../v2/internal/appsec/emitter/waf/metrics.go | 397 - .../v2/internal/appsec/emitter/waf/run.go | 91 - .../v2/internal/appsec/features.go | 85 - .../v2/internal/appsec/listener/feature.go | 24 - .../appsec/listener/graphqlsec/graphql.go | 43 - .../internal/appsec/listener/grpcsec/grpc.go | 75 - .../appsec/listener/httpsec/clientip.go | 110 - .../internal/appsec/listener/httpsec/http.go | 152 - .../appsec/listener/httpsec/request.go | 184 - .../appsec/listener/httpsec/roundtripper.go | 41 - .../v2/internal/appsec/listener/ossec/lfi.go | 53 - .../v2/internal/appsec/listener/sqlsec/sql.go | 43 - .../internal/appsec/listener/trace/trace.go | 53 - .../internal/appsec/listener/usersec/usec.go | 71 - .../v2/internal/appsec/listener/waf/tags.go | 96 - .../v2/internal/appsec/listener/waf/waf.go | 167 - .../v2/internal/appsec/remoteconfig.go | 403 - .../v2/internal/appsec/telemetry.go | 236 - .../v2/internal/appsec/telemetry_cgo.go | 10 - .../v2/internal/appsec/telemetry_nocgo.go | 10 - .../v2/internal/civisibility/civisibility.go | 41 - .../v2/internal/civisibility/constants/ci.go | 47 - .../v2/internal/civisibility/constants/env.go | 58 - .../v2/internal/civisibility/constants/git.go | 85 - .../v2/internal/civisibility/constants/os.go | 21 - .../civisibility/constants/runtime.go | 16 - .../civisibility/constants/span_types.go | 28 - .../internal/civisibility/constants/tags.go | 71 - .../civisibility/constants/test_tags.go | 180 - .../civisibility/utils/ci_providers.go | 688 - .../internal/civisibility/utils/codeowners.go | 325 - .../civisibility/utils/environmentTags.go | 345 - .../utils/file_environmental_data.go | 275 - .../v2/internal/civisibility/utils/git.go | 1010 - .../v2/internal/civisibility/utils/home.go | 126 - .../v2/internal/civisibility/utils/names.go | 93 - .../civisibility/utils/telemetry/telemetry.go | 173 - .../utils/telemetry/telemetry_count.go | 287 - .../utils/telemetry/telemetry_distribution.go | 138 - .../v2/internal/container_linux.go | 182 - .../dd-trace-go/v2/internal/container_stub.go | 19 - .../v2/internal/datastreams/fast_queue.go | 67 - .../v2/internal/datastreams/hash_cache.go | 76 - .../v2/internal/datastreams/pathway.go | 97 - .../v2/internal/datastreams/payload.go | 85 - .../v2/internal/datastreams/payload_msgp.go | 930 - .../v2/internal/datastreams/processor.go | 536 - .../v2/internal/datastreams/propagator.go | 87 - .../v2/internal/datastreams/transport.go | 90 - .../DataDog/dd-trace-go/v2/internal/env.go | 140 - .../dd-trace-go/v2/internal/gitmetadata.go | 164 - .../v2/internal/globalconfig/globalconfig.go | 148 - .../v2/internal/hostname/azure/azure.go | 63 - .../internal/hostname/cachedfetch/fetcher.go | 86 - .../v2/internal/hostname/ec2/ec2.go | 72 - .../v2/internal/hostname/ecs/aws.go | 54 - .../v2/internal/hostname/fqdn_nix.go | 28 - .../v2/internal/hostname/fqdn_windows.go | 14 - .../v2/internal/hostname/gce/gce.go | 120 - .../v2/internal/hostname/httputils/helpers.go | 74 - .../v2/internal/hostname/providers.go | 245 - .../v2/internal/hostname/validate/validate.go | 57 - .../dd-trace-go/v2/internal/inmemoryfile.go | 12 - .../v2/internal/inmemoryfilelinux.go | 36 - .../dd-trace-go/v2/internal/log/log.go | 363 - .../v2/internal/meta_internal_types.go | 19 - .../v2/internal/namingschema/namingschema.go | 98 - .../v2/internal/normalizer/normalizer.go | 52 - .../v2/internal/orchestrion/context.go | 72 - .../v2/internal/orchestrion/context_stack.go | 62 - .../v2/internal/orchestrion/gls.go | 41 - .../internal/orchestrion/gls.orchestrion.yml | 48 - .../v2/internal/orchestrion/orchestrion.go | 22 - .../dd-trace-go/v2/internal/osinfo/osinfo.go | 54 - .../v2/internal/osinfo/osinfo_unix.go | 70 - .../v2/internal/osinfo/osinfo_windows.go | 52 - .../v2/internal/processtags/processtags.go | 155 - .../v2/internal/remoteconfig/config.go | 68 - .../v2/internal/remoteconfig/path.go | 96 - .../v2/internal/remoteconfig/remoteconfig.go | 694 - .../v2/internal/remoteconfig/types.go | 74 - .../v2/internal/samplernames/samplernames.go | 45 - .../v2/internal/stableconfig/api.go | 86 - .../v2/internal/stableconfig/stableconfig.go | 37 - .../stableconfig/stableconfigsource.go | 100 - .../v2/internal/stacktrace/event.go | 115 - .../v2/internal/stacktrace/event_msgp.go | 335 - .../v2/internal/stacktrace/stacktrace.go | 253 - .../v2/internal/stacktrace/stacktrace_msgp.go | 477 - .../DataDog/dd-trace-go/v2/internal/statsd.go | 38 - .../v2/internal/telemetry/README.md | 69 - .../dd-trace-go/v2/internal/telemetry/api.go | 176 - .../v2/internal/telemetry/client.go | 390 - .../v2/internal/telemetry/client_config.go | 290 - .../v2/internal/telemetry/configuration.go | 187 - .../v2/internal/telemetry/dependencies.go | 94 - .../v2/internal/telemetry/distributions.go | 94 - .../v2/internal/telemetry/globalclient.go | 273 - .../v2/internal/telemetry/integration.go | 41 - .../knownmetrics/known_metric.golang.go | 14 - .../knownmetrics/known_metrics.common.go | 227 - .../internal/knownmetrics/known_metrics.go | 61 - .../telemetry/internal/mapper/app_closing.go | 23 - .../telemetry/internal/mapper/app_started.go | 48 - .../telemetry/internal/mapper/default.go | 98 - .../telemetry/internal/mapper/mapper.go | 17 - .../v2/internal/telemetry/internal/range.go | 39 - .../internal/telemetry/internal/recorder.go | 53 - .../internal/telemetry/internal/ringbuffer.go | 195 - .../internal/telemetry/internal/syncpool.go | 34 - .../v2/internal/telemetry/internal/ticker.go | 92 - .../telemetry/internal/tracerconfig.go | 16 - .../internal/transport/app_closing.go | 12 - .../transport/app_configuration_change.go | 14 - .../transport/app_dependencies_loaded.go | 21 - .../transport/app_extended_heartbeat.go | 16 - .../internal/transport/app_heartbeat.go | 16 - .../transport/app_integration_change.go | 24 - .../internal/transport/app_product_change.go | 22 - .../internal/transport/app_started.go | 37 - .../telemetry/internal/transport/body.go | 150 - .../internal/transport/conf_key_value.go | 18 - .../internal/transport/distributions.go | 36 - .../telemetry/internal/transport/error.go | 12 - .../internal/transport/generate-metrics.go | 53 - .../telemetry/internal/transport/logs.go | 31 - .../internal/transport/message_batch.go | 17 - .../telemetry/internal/transport/namespace.go | 20 - .../telemetry/internal/transport/origin.go | 19 - .../telemetry/internal/transport/payload.go | 13 - .../internal/transport/requesttype.go | 55 - .../v2/internal/telemetry/internal/writer.go | 343 - .../v2/internal/telemetry/log/log.go | 54 - .../v2/internal/telemetry/logger.go | 122 - .../v2/internal/telemetry/metrichandle.go | 72 - .../v2/internal/telemetry/metrics.go | 256 - .../v2/internal/telemetry/product.go | 51 - .../dd-trace-go/v2/internal/trace_context.go | 49 - .../dd-trace-go/v2/internal/trace_source.go | 73 - .../v2/internal/traceprof/endpoint_counter.go | 105 - .../v2/internal/traceprof/profiler.go | 35 - .../v2/internal/traceprof/traceprof.go | 21 - .../DataDog/dd-trace-go/v2/internal/tracer.go | 20 - .../DataDog/dd-trace-go/v2/internal/uds.go | 19 - .../v2/internal/urlsanitizer/sanitizer.go | 70 - .../DataDog/dd-trace-go/v2/internal/utils.go | 152 - .../v2/internal/version/version.go | 117 - .../DataDog/go-libddwaf/v4/.gitattributes | 3 - .../DataDog/go-libddwaf/v4/.gitignore | 23 - .../DataDog/go-libddwaf/v4/CODEOWNERS | 2 - .../github.com/DataDog/go-libddwaf/v4/LICENSE | 200 - .../DataDog/go-libddwaf/v4/README.md | 155 - .../DataDog/go-libddwaf/v4/builder.go | 180 - .../DataDog/go-libddwaf/v4/context.go | 343 - .../DataDog/go-libddwaf/v4/decoder.go | 167 - .../DataDog/go-libddwaf/v4/diagnostics.go | 89 - .../DataDog/go-libddwaf/v4/encoder.go | 598 - .../DataDog/go-libddwaf/v4/handle.go | 169 - .../v4/internal/bindings/ctypes.go | 412 - .../v4/internal/bindings/libddwaf.go | 79 - .../go-libddwaf/v4/internal/bindings/safe.go | 47 - .../v4/internal/bindings/waf_dl.go | 250 - .../internal/bindings/waf_dl_unsupported.go | 59 - .../go-libddwaf/v4/internal/lib/.version | 1 - .../go-libddwaf/v4/internal/lib/README.md | 21 - .../go-libddwaf/v4/internal/lib/doc.go | 7 - .../v4/internal/lib/dump_waf_darwin.go | 61 - .../v4/internal/lib/dump_waf_linux.go | 58 - .../v4/internal/lib/lib_darwin_amd64.go | 15 - .../v4/internal/lib/lib_darwin_arm64.go | 15 - .../v4/internal/lib/lib_linux_amd64.go | 15 - .../v4/internal/lib/lib_linux_arm64.go | 15 - .../lib/libddwaf-darwin-amd64.dylib.gz | Bin 749074 -> 0 bytes .../lib/libddwaf-darwin-arm64.dylib.gz | Bin 692213 -> 0 bytes .../internal/lib/libddwaf-linux-amd64.so.gz | Bin 937414 -> 0 bytes .../internal/lib/libddwaf-linux-arm64.so.gz | Bin 887102 -> 0 bytes .../go-libddwaf/v4/internal/lib/version.go | 13 - .../go-libddwaf/v4/internal/log/ddwaf.h | 814 - .../go-libddwaf/v4/internal/log/log.go | 97 - .../go-libddwaf/v4/internal/log/log_cgo.go | 35 - .../go-libddwaf/v4/internal/log/log_purego.go | 37 - .../v4/internal/log/log_unsupported.go | 14 - .../go-libddwaf/v4/internal/pin/pinner.go | 53 - .../v4/internal/ruleset/.gitattributes | 1 - .../v4/internal/ruleset/recommended.json.gz | Bin 30585 -> 0 bytes .../v4/internal/ruleset/ruleset.go | 36 - .../internal/ruleset/ruleset_unsupported.go | 19 - .../v4/internal/support/waf_cgo_disabled.go | 16 - .../internal/support/waf_manually_disabled.go | 15 - .../v4/internal/support/waf_support.go | 21 - .../v4/internal/support/waf_unsupported_go.go | 15 - .../support/waf_unsupported_target.go | 20 - .../go-libddwaf/v4/internal/unsafe/utils.go | 112 - .../DataDog/go-libddwaf/v4/json/decoder.go | 138 - .../DataDog/go-libddwaf/v4/result.go | 60 - .../go-libddwaf/v4/timer/base_timer.go | 128 - .../DataDog/go-libddwaf/v4/timer/clock.go | 28 - .../DataDog/go-libddwaf/v4/timer/component.go | 28 - .../DataDog/go-libddwaf/v4/timer/config.go | 86 - .../go-libddwaf/v4/timer/node_timer.go | 138 - .../DataDog/go-libddwaf/v4/timer/timer.go | 118 - .../github.com/DataDog/go-libddwaf/v4/waf.go | 80 - .../go-libddwaf/v4/waferrors/support.go | 48 - .../DataDog/go-libddwaf/v4/waferrors/waf.go | 108 - .../go-runtime-metrics-internal/LICENSE | 201 - .../LICENSE-3rdparty.csv | 7 - .../go-runtime-metrics-internal/NOTICE | 4 - .../pkg/runtimemetrics/histogram.go | 195 - .../pkg/runtimemetrics/runtime_metrics.go | 461 - .../pkg/runtimemetrics/tags.go | 71 - .../github.com/DataDog/go-sqllexer/.gitignore | 27 - vendor/github.com/DataDog/go-sqllexer/LICENSE | 21 - .../github.com/DataDog/go-sqllexer/README.md | 93 - .../DataDog/go-sqllexer/normalizer.go | 405 - .../go-sqllexer/obfuscate_and_normalize.go | 38 - .../DataDog/go-sqllexer/obfuscator.go | 156 - .../DataDog/go-sqllexer/sqllexer.go | 637 - .../DataDog/go-sqllexer/sqllexer_utils.go | 349 - vendor/github.com/DataDog/go-tuf/LICENSE | 27 - .../DataDog/go-tuf/client/client.go | 955 - .../DataDog/go-tuf/client/delegations.go | 193 - .../DataDog/go-tuf/client/errors.go | 107 - .../DataDog/go-tuf/client/file_store.go | 90 - .../DataDog/go-tuf/client/local_store.go | 29 - .../DataDog/go-tuf/client/remote_store.go | 109 - .../DataDog/go-tuf/data/hex_bytes.go | 42 - .../github.com/DataDog/go-tuf/data/types.go | 348 - .../DataDog/go-tuf/internal/roles/roles.go | 48 - .../DataDog/go-tuf/internal/sets/strings.go | 24 - .../go-tuf/pkg/keys/deprecated_ecdsa.go | 101 - .../DataDog/go-tuf/pkg/keys/ecdsa.go | 173 - .../DataDog/go-tuf/pkg/keys/ed25519.go | 161 - .../DataDog/go-tuf/pkg/keys/keys.go | 82 - .../DataDog/go-tuf/pkg/keys/pkix.go | 56 - .../github.com/DataDog/go-tuf/pkg/keys/rsa.go | 162 - .../DataDog/go-tuf/pkg/targets/delegation.go | 102 - .../DataDog/go-tuf/pkg/targets/hash_bins.go | 113 - vendor/github.com/DataDog/go-tuf/util/util.go | 332 - vendor/github.com/DataDog/go-tuf/verify/db.go | 104 - .../DataDog/go-tuf/verify/errors.go | 73 - .../DataDog/go-tuf/verify/verify.go | 187 - .../pkg/otlp/attributes/LICENSE | 201 - .../pkg/otlp/attributes/attributes.go | 304 - .../pkg/otlp/attributes/azure/azure.go | 59 - .../pkg/otlp/attributes/ec2/ec2.go | 95 - .../pkg/otlp/attributes/gateway_usage.go | 59 - .../pkg/otlp/attributes/gcp/gcp.go | 79 - .../pkg/otlp/attributes/process.go | 56 - .../pkg/otlp/attributes/source.go | 168 - .../otlp/attributes/source/source_provider.go | 51 - .../pkg/otlp/attributes/system.go | 36 - .../pkg/otlp/attributes/translator.go | 71 - vendor/github.com/DataDog/sketches-go/LICENSE | 200 - .../DataDog/sketches-go/LICENSE-3rdparty.csv | 3 - vendor/github.com/DataDog/sketches-go/NOTICE | 4 - .../DataDog/sketches-go/ddsketch/ddsketch.go | 790 - .../sketches-go/ddsketch/encoding/encoding.go | 208 - .../sketches-go/ddsketch/encoding/flag.go | 160 - .../ddsketch/mapping/bit_operation_helper.go | 35 - .../mapping/cubically_interpolated_mapping.go | 152 - .../ddsketch/mapping/index_mapping.go | 96 - .../mapping/linearly_interpolated_mapping.go | 148 - .../ddsketch/mapping/logarithmic_mapping.go | 125 - .../ddsketch/pb/sketchpb/ddsketch.pb.go | 448 - .../pb/sketchpb/ddsketch.proto_builder.go | 161 - .../sketches-go/ddsketch/stat/summary.go | 171 - .../DataDog/sketches-go/ddsketch/store/bin.go | 28 - .../ddsketch/store/buffered_paginated.go | 681 - .../store/collapsing_highest_dense_store.go | 188 - .../store/collapsing_lowest_dense_store.go | 207 - .../sketches-go/ddsketch/store/dense_store.go | 341 - .../sketches-go/ddsketch/store/sparse.go | 194 - .../sketches-go/ddsketch/store/store.go | 153 - .../Masterminds/semver/v3/.gitignore | 1 - .../Masterminds/semver/v3/.golangci.yml | 27 - .../Masterminds/semver/v3/CHANGELOG.md | 242 - .../Masterminds/semver/v3/LICENSE.txt | 19 - .../github.com/Masterminds/semver/v3/Makefile | 31 - .../Masterminds/semver/v3/README.md | 258 - .../Masterminds/semver/v3/SECURITY.md | 19 - .../Masterminds/semver/v3/collection.go | 24 - .../Masterminds/semver/v3/constraints.go | 594 - .../github.com/Masterminds/semver/v3/doc.go | 184 - .../Masterminds/semver/v3/version.go | 645 - .../Microsoft/go-winio/.gitattributes | 1 - .../github.com/Microsoft/go-winio/.gitignore | 10 - .../Microsoft/go-winio/.golangci.yml | 147 - .../github.com/Microsoft/go-winio/CODEOWNERS | 1 - vendor/github.com/Microsoft/go-winio/LICENSE | 22 - .../github.com/Microsoft/go-winio/README.md | 89 - .../github.com/Microsoft/go-winio/SECURITY.md | 41 - .../github.com/Microsoft/go-winio/backup.go | 287 - vendor/github.com/Microsoft/go-winio/doc.go | 22 - vendor/github.com/Microsoft/go-winio/ea.go | 137 - vendor/github.com/Microsoft/go-winio/file.go | 320 - .../github.com/Microsoft/go-winio/fileinfo.go | 106 - .../github.com/Microsoft/go-winio/hvsock.go | 582 - .../Microsoft/go-winio/internal/fs/doc.go | 2 - .../Microsoft/go-winio/internal/fs/fs.go | 262 - .../go-winio/internal/fs/security.go | 12 - .../go-winio/internal/fs/zsyscall_windows.go | 61 - .../go-winio/internal/socket/rawaddr.go | 20 - .../go-winio/internal/socket/socket.go | 177 - .../internal/socket/zsyscall_windows.go | 69 - .../go-winio/internal/stringbuffer/wstring.go | 132 - vendor/github.com/Microsoft/go-winio/pipe.go | 586 - .../Microsoft/go-winio/pkg/guid/guid.go | 232 - .../go-winio/pkg/guid/guid_nonwindows.go | 16 - .../go-winio/pkg/guid/guid_windows.go | 13 - .../go-winio/pkg/guid/variant_string.go | 27 - .../Microsoft/go-winio/privilege.go | 196 - .../github.com/Microsoft/go-winio/reparse.go | 131 - vendor/github.com/Microsoft/go-winio/sd.go | 133 - .../github.com/Microsoft/go-winio/syscall.go | 5 - .../Microsoft/go-winio/zsyscall_windows.go | 378 - .../github.com/aws/aws-sdk-go-v2/LICENSE.txt | 202 - .../github.com/aws/aws-sdk-go-v2/NOTICE.txt | 3 - .../aws/accountid_endpoint_mode.go | 18 - .../aws/aws-sdk-go-v2/aws/checksum.go | 33 - .../aws/aws-sdk-go-v2/aws/config.go | 250 - .../aws/aws-sdk-go-v2/aws/context.go | 22 - .../aws/aws-sdk-go-v2/aws/credential_cache.go | 235 - .../aws/aws-sdk-go-v2/aws/credentials.go | 230 - .../aws/aws-sdk-go-v2/aws/defaults/auto.go | 38 - .../aws/defaults/configuration.go | 43 - .../aws-sdk-go-v2/aws/defaults/defaults.go | 50 - .../aws/aws-sdk-go-v2/aws/defaults/doc.go | 2 - .../aws/aws-sdk-go-v2/aws/defaultsmode.go | 95 - .../github.com/aws/aws-sdk-go-v2/aws/doc.go | 62 - .../aws/aws-sdk-go-v2/aws/endpoints.go | 247 - .../aws/aws-sdk-go-v2/aws/errors.go | 9 - .../aws/aws-sdk-go-v2/aws/from_ptr.go | 365 - .../aws-sdk-go-v2/aws/go_module_metadata.go | 6 - .../aws/aws-sdk-go-v2/aws/logging.go | 119 - .../aws/aws-sdk-go-v2/aws/logging_generate.go | 95 - .../aws-sdk-go-v2/aws/middleware/metadata.go | 213 - .../aws/middleware/middleware.go | 168 - .../aws-sdk-go-v2/aws/middleware/osname.go | 24 - .../aws/middleware/osname_go115.go | 24 - .../aws/middleware/recursion_detection.go | 94 - .../aws/middleware/request_id.go | 27 - .../aws/middleware/request_id_retriever.go | 57 - .../aws/middleware/user_agent.go | 393 - .../aws-sdk-go-v2/aws/protocol/query/array.go | 61 - .../aws/protocol/query/encoder.go | 80 - .../aws-sdk-go-v2/aws/protocol/query/map.go | 78 - .../aws/protocol/query/middleware.go | 62 - .../aws/protocol/query/object.go | 68 - .../aws-sdk-go-v2/aws/protocol/query/value.go | 117 - .../aws/protocol/restjson/decoder_util.go | 85 - .../aws/protocol/xml/error_utils.go | 48 - .../aws/aws-sdk-go-v2/aws/ratelimit/none.go | 20 - .../aws/ratelimit/token_bucket.go | 96 - .../aws/ratelimit/token_rate_limit.go | 83 - .../aws/aws-sdk-go-v2/aws/request.go | 25 - .../aws/aws-sdk-go-v2/aws/retry/adaptive.go | 156 - .../aws/retry/adaptive_ratelimit.go | 158 - .../aws/retry/adaptive_token_bucket.go | 83 - .../aws/retry/attempt_metrics.go | 51 - .../aws/aws-sdk-go-v2/aws/retry/doc.go | 80 - .../aws/aws-sdk-go-v2/aws/retry/errors.go | 20 - .../aws-sdk-go-v2/aws/retry/jitter_backoff.go | 49 - .../aws/aws-sdk-go-v2/aws/retry/metadata.go | 52 - .../aws/aws-sdk-go-v2/aws/retry/middleware.go | 418 - .../aws/aws-sdk-go-v2/aws/retry/retry.go | 90 - .../aws/retry/retryable_error.go | 228 - .../aws/aws-sdk-go-v2/aws/retry/standard.go | 269 - .../aws-sdk-go-v2/aws/retry/throttle_error.go | 60 - .../aws-sdk-go-v2/aws/retry/timeout_error.go | 52 - .../aws/aws-sdk-go-v2/aws/retryer.go | 127 - .../aws/aws-sdk-go-v2/aws/runtime.go | 14 - .../aws/signer/internal/v4/cache.go | 115 - .../aws/signer/internal/v4/const.go | 40 - .../aws/signer/internal/v4/header_rules.go | 82 - .../aws/signer/internal/v4/headers.go | 70 - .../aws/signer/internal/v4/hmac.go | 13 - .../aws/signer/internal/v4/host.go | 75 - .../aws/signer/internal/v4/scope.go | 13 - .../aws/signer/internal/v4/time.go | 36 - .../aws/signer/internal/v4/util.go | 80 - .../aws-sdk-go-v2/aws/signer/v4/middleware.go | 420 - .../aws/signer/v4/presign_middleware.go | 127 - .../aws/aws-sdk-go-v2/aws/signer/v4/stream.go | 86 - .../aws/aws-sdk-go-v2/aws/signer/v4/v4.go | 564 - .../aws/aws-sdk-go-v2/aws/to_ptr.go | 297 - .../aws/transport/http/client.go | 342 - .../aws/transport/http/content_type.go | 42 - .../aws/transport/http/response_error.go | 33 - .../http/response_error_middleware.go | 56 - .../aws/transport/http/timeout_read_closer.go | 104 - .../github.com/aws/aws-sdk-go-v2/aws/types.go | 42 - .../aws/aws-sdk-go-v2/aws/version.go | 8 - .../aws/aws-sdk-go-v2/config/CHANGELOG.md | 945 - .../aws/aws-sdk-go-v2/config/LICENSE.txt | 202 - .../config/auth_scheme_preference.go | 19 - .../aws/aws-sdk-go-v2/config/config.go | 235 - .../aws/aws-sdk-go-v2/config/defaultsmode.go | 47 - .../aws/aws-sdk-go-v2/config/doc.go | 20 - .../aws/aws-sdk-go-v2/config/env_config.go | 932 - .../aws/aws-sdk-go-v2/config/generate.go | 4 - .../config/go_module_metadata.go | 6 - .../aws/aws-sdk-go-v2/config/load_options.go | 1355 - .../aws/aws-sdk-go-v2/config/local.go | 51 - .../aws/aws-sdk-go-v2/config/provider.go | 786 - .../aws/aws-sdk-go-v2/config/resolve.go | 444 - .../config/resolve_bearer_token.go | 122 - .../config/resolve_credentials.go | 627 - .../aws/aws-sdk-go-v2/config/shared_config.go | 1696 -- .../aws-sdk-go-v2/credentials/CHANGELOG.md | 843 - .../aws/aws-sdk-go-v2/credentials/LICENSE.txt | 202 - .../aws/aws-sdk-go-v2/credentials/doc.go | 4 - .../credentials/ec2rolecreds/doc.go | 58 - .../credentials/ec2rolecreds/provider.go | 241 - .../endpointcreds/internal/client/auth.go | 48 - .../endpointcreds/internal/client/client.go | 165 - .../internal/client/endpoints.go | 20 - .../internal/client/middleware.go | 164 - .../credentials/endpointcreds/provider.go | 207 - .../credentials/go_module_metadata.go | 6 - .../credentials/processcreds/doc.go | 92 - .../credentials/processcreds/provider.go | 296 - .../aws-sdk-go-v2/credentials/ssocreds/doc.go | 81 - .../credentials/ssocreds/sso_cached_token.go | 233 - .../ssocreds/sso_credentials_provider.go | 165 - .../ssocreds/sso_token_provider.go | 147 - .../credentials/static_provider.go | 63 - .../stscreds/assume_role_provider.go | 338 - .../stscreds/web_identity_provider.go | 181 - .../feature/ec2/imds/CHANGELOG.md | 494 - .../feature/ec2/imds/LICENSE.txt | 202 - .../feature/ec2/imds/api_client.go | 358 - .../feature/ec2/imds/api_op_GetDynamicData.go | 77 - .../feature/ec2/imds/api_op_GetIAMInfo.go | 103 - .../api_op_GetInstanceIdentityDocument.go | 110 - .../feature/ec2/imds/api_op_GetMetadata.go | 77 - .../feature/ec2/imds/api_op_GetRegion.go | 73 - .../feature/ec2/imds/api_op_GetToken.go | 119 - .../feature/ec2/imds/api_op_GetUserData.go | 61 - .../aws-sdk-go-v2/feature/ec2/imds/auth.go | 48 - .../aws/aws-sdk-go-v2/feature/ec2/imds/doc.go | 12 - .../feature/ec2/imds/endpoints.go | 20 - .../feature/ec2/imds/go_module_metadata.go | 6 - .../ec2/imds/internal/config/resolvers.go | 114 - .../feature/ec2/imds/request_middleware.go | 313 - .../feature/ec2/imds/token_provider.go | 261 - .../aws/aws-sdk-go-v2/internal/auth/auth.go | 45 - .../aws/aws-sdk-go-v2/internal/auth/scheme.go | 191 - .../auth/smithy/bearer_token_adapter.go | 43 - .../smithy/bearer_token_signer_adapter.go | 35 - .../auth/smithy/credentials_adapter.go | 46 - .../internal/auth/smithy/smithy.go | 2 - .../internal/auth/smithy/v4signer_adapter.go | 57 - .../internal/configsources/CHANGELOG.md | 455 - .../internal/configsources/LICENSE.txt | 202 - .../internal/configsources/config.go | 65 - .../internal/configsources/endpoints.go | 57 - .../configsources/go_module_metadata.go | 6 - .../aws-sdk-go-v2/internal/context/context.go | 52 - .../internal/endpoints/awsrulesfn/arn.go | 94 - .../internal/endpoints/awsrulesfn/doc.go | 3 - .../internal/endpoints/awsrulesfn/generate.go | 7 - .../internal/endpoints/awsrulesfn/host.go | 51 - .../endpoints/awsrulesfn/partition.go | 76 - .../endpoints/awsrulesfn/partitions.go | 489 - .../endpoints/awsrulesfn/partitions.json | 264 - .../internal/endpoints/endpoints.go | 201 - .../internal/endpoints/v2/CHANGELOG.md | 430 - .../internal/endpoints/v2/LICENSE.txt | 202 - .../internal/endpoints/v2/endpoints.go | 302 - .../endpoints/v2/go_module_metadata.go | 6 - .../aws-sdk-go-v2/internal/ini/CHANGELOG.md | 283 - .../aws-sdk-go-v2/internal/ini/LICENSE.txt | 202 - .../aws/aws-sdk-go-v2/internal/ini/errors.go | 22 - .../internal/ini/go_module_metadata.go | 6 - .../aws/aws-sdk-go-v2/internal/ini/ini.go | 56 - .../aws/aws-sdk-go-v2/internal/ini/parse.go | 109 - .../aws-sdk-go-v2/internal/ini/sections.go | 157 - .../aws/aws-sdk-go-v2/internal/ini/strings.go | 89 - .../aws/aws-sdk-go-v2/internal/ini/token.go | 32 - .../aws-sdk-go-v2/internal/ini/tokenize.go | 92 - .../aws/aws-sdk-go-v2/internal/ini/value.go | 93 - .../internal/middleware/middleware.go | 42 - .../aws/aws-sdk-go-v2/internal/rand/rand.go | 33 - .../aws-sdk-go-v2/internal/sdk/interfaces.go | 9 - .../aws/aws-sdk-go-v2/internal/sdk/time.go | 74 - .../aws/aws-sdk-go-v2/internal/sdkio/byte.go | 12 - .../internal/shareddefaults/shared_config.go | 47 - .../aws-sdk-go-v2/internal/strings/strings.go | 11 - .../internal/sync/singleflight/LICENSE | 28 - .../internal/sync/singleflight/docs.go | 7 - .../sync/singleflight/singleflight.go | 210 - .../internal/timeconv/duration.go | 13 - .../internal/accept-encoding/CHANGELOG.md | 176 - .../internal/accept-encoding/LICENSE.txt | 202 - .../accept-encoding/accept_encoding_gzip.go | 176 - .../service/internal/accept-encoding/doc.go | 22 - .../accept-encoding/go_module_metadata.go | 6 - .../internal/presigned-url/CHANGELOG.md | 482 - .../internal/presigned-url/LICENSE.txt | 202 - .../service/internal/presigned-url/context.go | 56 - .../service/internal/presigned-url/doc.go | 3 - .../presigned-url/go_module_metadata.go | 6 - .../internal/presigned-url/middleware.go | 110 - .../service/route53/CHANGELOG.md | 724 - .../aws-sdk-go-v2/service/route53/LICENSE.txt | 202 - .../service/route53/api_client.go | 1267 - .../route53/api_op_ActivateKeySigningKey.go | 204 - .../api_op_AssociateVPCWithHostedZone.go | 237 - .../route53/api_op_ChangeCidrCollection.go | 233 - .../api_op_ChangeResourceRecordSets.go | 294 - .../route53/api_op_ChangeTagsForResource.go | 214 - .../route53/api_op_CreateCidrCollection.go | 201 - .../route53/api_op_CreateHealthCheck.go | 260 - .../route53/api_op_CreateHostedZone.go | 326 - .../route53/api_op_CreateKeySigningKey.go | 258 - .../api_op_CreateQueryLoggingConfig.go | 333 - .../api_op_CreateReusableDelegationSet.go | 254 - .../route53/api_op_CreateTrafficPolicy.go | 214 - .../api_op_CreateTrafficPolicyInstance.go | 241 - .../api_op_CreateTrafficPolicyVersion.go | 221 - ...pi_op_CreateVPCAssociationAuthorization.go | 221 - .../route53/api_op_DeactivateKeySigningKey.go | 202 - .../route53/api_op_DeleteCidrCollection.go | 186 - .../route53/api_op_DeleteHealthCheck.go | 202 - .../route53/api_op_DeleteHostedZone.go | 243 - .../route53/api_op_DeleteKeySigningKey.go | 210 - .../api_op_DeleteQueryLoggingConfig.go | 191 - .../api_op_DeleteReusableDelegationSet.go | 199 - .../route53/api_op_DeleteTrafficPolicy.go | 206 - .../api_op_DeleteTrafficPolicyInstance.go | 194 - ...pi_op_DeleteVPCAssociationAuthorization.go | 213 - .../route53/api_op_DisableHostedZoneDNSSEC.go | 197 - .../api_op_DisassociateVPCFromHostedZone.go | 245 - .../route53/api_op_EnableHostedZoneDNSSEC.go | 196 - .../service/route53/api_op_GetAccountLimit.go | 235 - .../service/route53/api_op_GetChange.go | 400 - .../route53/api_op_GetCheckerIpRanges.go | 192 - .../service/route53/api_op_GetDNSSEC.go | 201 - .../service/route53/api_op_GetGeoLocation.go | 243 - .../service/route53/api_op_GetHealthCheck.go | 197 - .../route53/api_op_GetHealthCheckCount.go | 187 - .../api_op_GetHealthCheckLastFailureReason.go | 202 - .../route53/api_op_GetHealthCheckStatus.go | 205 - .../service/route53/api_op_GetHostedZone.go | 213 - .../route53/api_op_GetHostedZoneCount.go | 187 - .../route53/api_op_GetHostedZoneLimit.go | 226 - .../route53/api_op_GetQueryLoggingConfig.go | 201 - .../api_op_GetReusableDelegationSet.go | 200 - .../api_op_GetReusableDelegationSetLimit.go | 218 - .../route53/api_op_GetTrafficPolicy.go | 204 - .../api_op_GetTrafficPolicyInstance.go | 202 - .../api_op_GetTrafficPolicyInstanceCount.go | 188 - .../service/route53/api_op_ListCidrBlocks.go | 299 - .../route53/api_op_ListCidrCollections.go | 292 - .../route53/api_op_ListCidrLocations.go | 299 - .../route53/api_op_ListGeoLocations.go | 262 - .../route53/api_op_ListHealthChecks.go | 327 - .../service/route53/api_op_ListHostedZones.go | 344 - .../route53/api_op_ListHostedZonesByName.go | 305 - .../route53/api_op_ListHostedZonesByVPC.go | 265 - .../route53/api_op_ListQueryLoggingConfigs.go | 343 - .../route53/api_op_ListResourceRecordSets.go | 338 - .../api_op_ListReusableDelegationSets.go | 232 - .../route53/api_op_ListTagsForResource.go | 210 - .../route53/api_op_ListTagsForResources.go | 211 - .../route53/api_op_ListTrafficPolicies.go | 233 - .../api_op_ListTrafficPolicyInstances.go | 273 - ..._ListTrafficPolicyInstancesByHostedZone.go | 265 - ...i_op_ListTrafficPolicyInstancesByPolicy.go | 293 - .../api_op_ListTrafficPolicyVersions.go | 240 - ...api_op_ListVPCAssociationAuthorizations.go | 228 - .../service/route53/api_op_TestDNSAnswer.go | 277 - .../route53/api_op_UpdateHealthCheck.go | 479 - .../route53/api_op_UpdateHostedZoneComment.go | 203 - .../api_op_UpdateTrafficPolicyComment.go | 206 - .../api_op_UpdateTrafficPolicyInstance.go | 237 - .../aws/aws-sdk-go-v2/service/route53/auth.go | 339 - .../service/route53/deserializers.go | 22883 ---------------- .../aws/aws-sdk-go-v2/service/route53/doc.go | 26 - .../service/route53/endpoints.go | 880 - .../service/route53/generated.json | 103 - .../service/route53/go_module_metadata.go | 6 - .../service/route53/handwritten_paginators.go | 113 - .../customizations/custom_error_deser.go | 94 - .../route53/internal/customizations/doc.go | 53 - .../internal/customizations/sanitizeurl.go | 63 - .../route53/internal/endpoints/endpoints.go | 432 - .../aws-sdk-go-v2/service/route53/options.go | 239 - .../service/route53/serializers.go | 7221 ----- .../service/route53/types/enums.go | 680 - .../service/route53/types/errors.go | 1978 -- .../service/route53/types/types.go | 2232 -- .../service/route53/validators.go | 2604 -- .../service/secretsmanager/CHANGELOG.md | 777 - .../service/secretsmanager/LICENSE.txt | 202 - .../service/secretsmanager/api_client.go | 1035 - .../api_op_BatchGetSecretValue.go | 333 - .../api_op_CancelRotateSecret.go | 227 - .../secretsmanager/api_op_CreateSecret.go | 424 - .../api_op_DeleteResourcePolicy.go | 209 - .../secretsmanager/api_op_DeleteSecret.go | 266 - .../secretsmanager/api_op_DescribeSecret.go | 321 - .../api_op_GetRandomPassword.go | 226 - .../api_op_GetResourcePolicy.go | 218 - .../secretsmanager/api_op_GetSecretValue.go | 279 - .../api_op_ListSecretVersionIds.go | 338 - .../secretsmanager/api_op_ListSecrets.go | 330 - .../api_op_PutResourcePolicy.go | 242 - .../secretsmanager/api_op_PutSecretValue.go | 369 - .../api_op_RemoveRegionsFromReplication.go | 210 - .../api_op_ReplicateSecretToRegions.go | 217 - .../secretsmanager/api_op_RestoreSecret.go | 209 - .../secretsmanager/api_op_RotateSecret.go | 311 - .../api_op_StopReplicationToReplica.go | 205 - .../secretsmanager/api_op_TagResource.go | 226 - .../secretsmanager/api_op_UntagResource.go | 223 - .../secretsmanager/api_op_UpdateSecret.go | 357 - .../api_op_UpdateSecretVersionStage.go | 247 - .../api_op_ValidateResourcePolicy.go | 224 - .../service/secretsmanager/auth.go | 339 - .../service/secretsmanager/deserializers.go | 6085 ---- .../service/secretsmanager/doc.go | 45 - .../service/secretsmanager/endpoints.go | 634 - .../service/secretsmanager/generated.json | 56 - .../secretsmanager/go_module_metadata.go | 6 - .../internal/endpoints/endpoints.go | 740 - .../service/secretsmanager/options.go | 243 - .../service/secretsmanager/serializers.go | 2156 -- .../service/secretsmanager/types/enums.go | 72 - .../service/secretsmanager/types/errors.go | 339 - .../service/secretsmanager/types/types.go | 321 - .../service/secretsmanager/validators.go | 808 - .../aws-sdk-go-v2/service/sso/CHANGELOG.md | 675 - .../aws/aws-sdk-go-v2/service/sso/LICENSE.txt | 202 - .../aws-sdk-go-v2/service/sso/api_client.go | 1019 - .../service/sso/api_op_GetRoleCredentials.go | 201 - .../service/sso/api_op_ListAccountRoles.go | 299 - .../service/sso/api_op_ListAccounts.go | 297 - .../service/sso/api_op_Logout.go | 200 - .../aws/aws-sdk-go-v2/service/sso/auth.go | 363 - .../service/sso/deserializers.go | 1172 - .../aws/aws-sdk-go-v2/service/sso/doc.go | 27 - .../aws-sdk-go-v2/service/sso/endpoints.go | 558 - .../aws-sdk-go-v2/service/sso/generated.json | 36 - .../service/sso/go_module_metadata.go | 6 - .../sso/internal/endpoints/endpoints.go | 603 - .../aws/aws-sdk-go-v2/service/sso/options.go | 239 - .../aws-sdk-go-v2/service/sso/serializers.go | 309 - .../aws-sdk-go-v2/service/sso/types/errors.go | 115 - .../aws-sdk-go-v2/service/sso/types/types.go | 63 - .../aws-sdk-go-v2/service/sso/validators.go | 175 - .../service/ssooidc/CHANGELOG.md | 671 - .../aws-sdk-go-v2/service/ssooidc/LICENSE.txt | 202 - .../service/ssooidc/api_client.go | 1019 - .../service/ssooidc/api_op_CreateToken.go | 271 - .../ssooidc/api_op_CreateTokenWithIAM.go | 318 - .../service/ssooidc/api_op_RegisterClient.go | 242 - .../api_op_StartDeviceAuthorization.go | 224 - .../aws/aws-sdk-go-v2/service/ssooidc/auth.go | 357 - .../service/ssooidc/deserializers.go | 2244 -- .../aws/aws-sdk-go-v2/service/ssooidc/doc.go | 49 - .../service/ssooidc/endpoints.go | 558 - .../service/ssooidc/generated.json | 37 - .../service/ssooidc/go_module_metadata.go | 6 - .../ssooidc/internal/endpoints/endpoints.go | 603 - .../aws-sdk-go-v2/service/ssooidc/options.go | 239 - .../service/ssooidc/serializers.go | 512 - .../service/ssooidc/types/enums.go | 44 - .../service/ssooidc/types/errors.go | 430 - .../service/ssooidc/types/types.go | 25 - .../service/ssooidc/validators.go | 184 - .../aws-sdk-go-v2/service/sts/CHANGELOG.md | 710 - .../aws/aws-sdk-go-v2/service/sts/LICENSE.txt | 202 - .../aws-sdk-go-v2/service/sts/api_client.go | 1171 - .../service/sts/api_op_AssumeRole.go | 580 - .../service/sts/api_op_AssumeRoleWithSAML.go | 488 - .../sts/api_op_AssumeRoleWithWebIdentity.go | 508 - .../service/sts/api_op_AssumeRoot.go | 253 - .../sts/api_op_DecodeAuthorizationMessage.go | 225 - .../service/sts/api_op_GetAccessKeyInfo.go | 216 - .../service/sts/api_op_GetCallerIdentity.go | 228 - .../service/sts/api_op_GetFederationToken.go | 429 - .../service/sts/api_op_GetSessionToken.go | 275 - .../aws/aws-sdk-go-v2/service/sts/auth.go | 351 - .../service/sts/deserializers.go | 2710 -- .../aws/aws-sdk-go-v2/service/sts/doc.go | 13 - .../aws-sdk-go-v2/service/sts/endpoints.go | 1139 - .../aws-sdk-go-v2/service/sts/generated.json | 43 - .../service/sts/go_module_metadata.go | 6 - .../sts/internal/endpoints/endpoints.go | 563 - .../aws/aws-sdk-go-v2/service/sts/options.go | 239 - .../aws-sdk-go-v2/service/sts/serializers.go | 1005 - .../aws-sdk-go-v2/service/sts/types/errors.go | 248 - .../aws-sdk-go-v2/service/sts/types/types.go | 144 - .../aws-sdk-go-v2/service/sts/validators.go | 347 - vendor/github.com/aws/smithy-go/.gitignore | 29 - vendor/github.com/aws/smithy-go/.travis.yml | 28 - vendor/github.com/aws/smithy-go/CHANGELOG.md | 330 - .../aws/smithy-go/CODE_OF_CONDUCT.md | 4 - .../github.com/aws/smithy-go/CONTRIBUTING.md | 90 - vendor/github.com/aws/smithy-go/LICENSE | 175 - vendor/github.com/aws/smithy-go/Makefile | 125 - vendor/github.com/aws/smithy-go/NOTICE | 1 - vendor/github.com/aws/smithy-go/README.md | 100 - vendor/github.com/aws/smithy-go/auth/auth.go | 3 - .../aws/smithy-go/auth/bearer/docs.go | 3 - .../aws/smithy-go/auth/bearer/middleware.go | 104 - .../aws/smithy-go/auth/bearer/token.go | 50 - .../aws/smithy-go/auth/bearer/token_cache.go | 208 - .../github.com/aws/smithy-go/auth/identity.go | 47 - .../github.com/aws/smithy-go/auth/option.go | 25 - .../aws/smithy-go/auth/scheme_id.go | 20 - .../aws/smithy-go/changelog-template.json | 9 - .../aws/smithy-go/context/suppress_expired.go | 81 - vendor/github.com/aws/smithy-go/doc.go | 2 - vendor/github.com/aws/smithy-go/document.go | 10 - .../github.com/aws/smithy-go/document/doc.go | 12 - .../aws/smithy-go/document/document.go | 153 - .../aws/smithy-go/document/errors.go | 75 - .../github.com/aws/smithy-go/encoding/doc.go | 4 - .../aws/smithy-go/encoding/encoding.go | 40 - .../smithy-go/encoding/httpbinding/encode.go | 123 - .../smithy-go/encoding/httpbinding/header.go | 122 - .../encoding/httpbinding/path_replace.go | 108 - .../smithy-go/encoding/httpbinding/query.go | 107 - .../aws/smithy-go/encoding/httpbinding/uri.go | 111 - .../aws/smithy-go/encoding/json/array.go | 35 - .../aws/smithy-go/encoding/json/constants.go | 15 - .../smithy-go/encoding/json/decoder_util.go | 139 - .../aws/smithy-go/encoding/json/encoder.go | 30 - .../aws/smithy-go/encoding/json/escape.go | 198 - .../aws/smithy-go/encoding/json/object.go | 40 - .../aws/smithy-go/encoding/json/value.go | 149 - .../aws/smithy-go/encoding/xml/array.go | 49 - .../aws/smithy-go/encoding/xml/constants.go | 10 - .../aws/smithy-go/encoding/xml/doc.go | 49 - .../aws/smithy-go/encoding/xml/element.go | 91 - .../aws/smithy-go/encoding/xml/encoder.go | 51 - .../aws/smithy-go/encoding/xml/error_utils.go | 51 - .../aws/smithy-go/encoding/xml/escape.go | 137 - .../aws/smithy-go/encoding/xml/map.go | 53 - .../aws/smithy-go/encoding/xml/value.go | 302 - .../aws/smithy-go/encoding/xml/xml_decoder.go | 154 - .../aws/smithy-go/endpoints/endpoint.go | 23 - vendor/github.com/aws/smithy-go/errors.go | 137 - .../aws/smithy-go/go_module_metadata.go | 6 - .../internal/sync/singleflight/LICENSE | 28 - .../internal/sync/singleflight/docs.go | 8 - .../sync/singleflight/singleflight.go | 210 - vendor/github.com/aws/smithy-go/io/byte.go | 12 - vendor/github.com/aws/smithy-go/io/doc.go | 2 - vendor/github.com/aws/smithy-go/io/reader.go | 16 - .../github.com/aws/smithy-go/io/ringbuffer.go | 94 - .../aws/smithy-go/local-mod-replace.sh | 39 - .../aws/smithy-go/logging/logger.go | 82 - .../aws/smithy-go/metrics/metrics.go | 136 - .../github.com/aws/smithy-go/metrics/nop.go | 67 - .../aws/smithy-go/middleware/context.go | 41 - .../aws/smithy-go/middleware/doc.go | 67 - .../aws/smithy-go/middleware/logging.go | 46 - .../aws/smithy-go/middleware/metadata.go | 65 - .../aws/smithy-go/middleware/middleware.go | 71 - .../aws/smithy-go/middleware/ordered_group.go | 268 - .../aws/smithy-go/middleware/stack.go | 209 - .../aws/smithy-go/middleware/stack_values.go | 100 - .../aws/smithy-go/middleware/step_build.go | 211 - .../smithy-go/middleware/step_deserialize.go | 217 - .../aws/smithy-go/middleware/step_finalize.go | 211 - .../smithy-go/middleware/step_initialize.go | 211 - .../smithy-go/middleware/step_serialize.go | 219 - vendor/github.com/aws/smithy-go/modman.toml | 9 - .../private/requestcompression/gzip.go | 30 - .../middleware_capture_request_compression.go | 52 - .../requestcompression/request_compression.go | 103 - vendor/github.com/aws/smithy-go/properties.go | 69 - vendor/github.com/aws/smithy-go/ptr/doc.go | 5 - .../github.com/aws/smithy-go/ptr/from_ptr.go | 601 - .../aws/smithy-go/ptr/gen_scalars.go | 83 - vendor/github.com/aws/smithy-go/ptr/to_ptr.go | 499 - vendor/github.com/aws/smithy-go/rand/doc.go | 3 - vendor/github.com/aws/smithy-go/rand/rand.go | 31 - vendor/github.com/aws/smithy-go/rand/uuid.go | 87 - vendor/github.com/aws/smithy-go/time/time.go | 134 - .../aws/smithy-go/tracing/context.go | 96 - .../github.com/aws/smithy-go/tracing/nop.go | 32 - .../aws/smithy-go/tracing/tracing.go | 95 - .../aws/smithy-go/transport/http/auth.go | 21 - .../smithy-go/transport/http/auth_schemes.go | 45 - .../transport/http/checksum_middleware.go | 70 - .../aws/smithy-go/transport/http/client.go | 161 - .../aws/smithy-go/transport/http/doc.go | 5 - .../smithy-go/transport/http/headerlist.go | 163 - .../aws/smithy-go/transport/http/host.go | 89 - .../smithy-go/transport/http/interceptor.go | 321 - .../transport/http/interceptor_middleware.go | 325 - .../transport/http/internal/io/safe.go | 75 - .../smithy-go/transport/http/md5_checksum.go | 25 - .../aws/smithy-go/transport/http/metrics.go | 198 - .../http/middleware_close_response_body.go | 79 - .../http/middleware_content_length.go | 84 - .../http/middleware_header_comment.go | 81 - .../transport/http/middleware_headers.go | 167 - .../transport/http/middleware_http_logging.go | 75 - .../transport/http/middleware_metadata.go | 51 - .../transport/http/middleware_min_proto.go | 79 - .../smithy-go/transport/http/properties.go | 80 - .../aws/smithy-go/transport/http/request.go | 188 - .../aws/smithy-go/transport/http/response.go | 34 - .../aws/smithy-go/transport/http/time.go | 13 - .../aws/smithy-go/transport/http/url.go | 44 - .../smithy-go/transport/http/user_agent.go | 37 - vendor/github.com/aws/smithy-go/validation.go | 140 - .../github.com/aws/smithy-go/waiter/logger.go | 36 - .../github.com/aws/smithy-go/waiter/waiter.go | 66 - vendor/github.com/cihub/seelog/LICENSE.txt | 24 - .../github.com/cihub/seelog/README.markdown | 116 - .../cihub/seelog/archive/archive.go | 198 - .../cihub/seelog/archive/gzip/gzip.go | 64 - .../cihub/seelog/archive/tar/tar.go | 72 - .../cihub/seelog/archive/zip/zip.go | 89 - .../cihub/seelog/behavior_adaptivelogger.go | 129 - .../cihub/seelog/behavior_asynclogger.go | 142 - .../cihub/seelog/behavior_asynclooplogger.go | 69 - .../cihub/seelog/behavior_asynctimerlogger.go | 82 - .../cihub/seelog/behavior_synclogger.go | 75 - vendor/github.com/cihub/seelog/cfg_config.go | 212 - vendor/github.com/cihub/seelog/cfg_errors.go | 61 - .../github.com/cihub/seelog/cfg_logconfig.go | 141 - vendor/github.com/cihub/seelog/cfg_parser.go | 1269 - .../github.com/cihub/seelog/common_closer.go | 25 - .../cihub/seelog/common_constraints.go | 162 - .../github.com/cihub/seelog/common_context.go | 234 - .../cihub/seelog/common_exception.go | 194 - .../github.com/cihub/seelog/common_flusher.go | 31 - .../cihub/seelog/common_loglevel.go | 81 - .../cihub/seelog/dispatch_custom.go | 242 - .../cihub/seelog/dispatch_dispatcher.go | 189 - .../cihub/seelog/dispatch_filterdispatcher.go | 66 - .../cihub/seelog/dispatch_splitdispatcher.go | 47 - vendor/github.com/cihub/seelog/doc.go | 175 - vendor/github.com/cihub/seelog/format.go | 466 - .../cihub/seelog/internals_baseerror.go | 10 - .../cihub/seelog/internals_fsutils.go | 320 - .../cihub/seelog/internals_xmlnode.go | 175 - vendor/github.com/cihub/seelog/log.go | 307 - vendor/github.com/cihub/seelog/logger.go | 370 - .../cihub/seelog/writers_bufferedwriter.go | 161 - .../cihub/seelog/writers_connwriter.go | 144 - .../cihub/seelog/writers_consolewriter.go | 47 - .../cihub/seelog/writers_filewriter.go | 92 - .../cihub/seelog/writers_formattedwriter.go | 62 - .../cihub/seelog/writers_rollingfilewriter.go | 763 - .../cihub/seelog/writers_smtpwriter.go | 214 - .../coredns/caddy/onevent/hook/config.go | 20 - .../coredns/caddy/onevent/hook/hook.go | 41 - vendor/github.com/coredns/caddy/onevent/on.go | 71 - .../github.com/dimchansky/utfbom/.gitignore | 37 - .../github.com/dimchansky/utfbom/.travis.yml | 29 - vendor/github.com/dimchansky/utfbom/LICENSE | 201 - vendor/github.com/dimchansky/utfbom/README.md | 66 - vendor/github.com/dimchansky/utfbom/utfbom.go | 192 - .../github.com/dustin/go-humanize/.travis.yml | 21 - vendor/github.com/dustin/go-humanize/LICENSE | 21 - .../dustin/go-humanize/README.markdown | 124 - vendor/github.com/dustin/go-humanize/big.go | 31 - .../github.com/dustin/go-humanize/bigbytes.go | 189 - vendor/github.com/dustin/go-humanize/bytes.go | 143 - vendor/github.com/dustin/go-humanize/comma.go | 116 - .../github.com/dustin/go-humanize/commaf.go | 41 - vendor/github.com/dustin/go-humanize/ftoa.go | 49 - .../github.com/dustin/go-humanize/humanize.go | 8 - .../github.com/dustin/go-humanize/number.go | 192 - .../github.com/dustin/go-humanize/ordinals.go | 25 - vendor/github.com/dustin/go-humanize/si.go | 127 - vendor/github.com/dustin/go-humanize/times.go | 117 - vendor/github.com/eapache/queue/v2/LICENSE | 21 - vendor/github.com/eapache/queue/v2/queue.go | 102 - .../github.com/ebitengine/purego/.gitignore | 1 - vendor/github.com/ebitengine/purego/LICENSE | 201 - vendor/github.com/ebitengine/purego/README.md | 97 - .../github.com/ebitengine/purego/abi_amd64.h | 99 - .../github.com/ebitengine/purego/abi_arm64.h | 39 - vendor/github.com/ebitengine/purego/cgo.go | 19 - .../github.com/ebitengine/purego/dlerror.go | 17 - vendor/github.com/ebitengine/purego/dlfcn.go | 99 - .../ebitengine/purego/dlfcn_android.go | 34 - .../ebitengine/purego/dlfcn_darwin.go | 19 - .../ebitengine/purego/dlfcn_freebsd.go | 14 - .../ebitengine/purego/dlfcn_linux.go | 16 - .../ebitengine/purego/dlfcn_nocgo_freebsd.go | 11 - .../ebitengine/purego/dlfcn_nocgo_linux.go | 19 - .../ebitengine/purego/dlfcn_playground.go | 24 - .../ebitengine/purego/dlfcn_stubs.s | 26 - vendor/github.com/ebitengine/purego/func.go | 436 - .../ebitengine/purego/go_runtime.go | 13 - .../purego/internal/cgo/dlfcn_cgo_unix.go | 56 - .../ebitengine/purego/internal/cgo/empty.go | 6 - .../purego/internal/cgo/syscall_cgo_unix.go | 55 - .../purego/internal/fakecgo/abi_amd64.h | 99 - .../purego/internal/fakecgo/abi_arm64.h | 39 - .../purego/internal/fakecgo/asm_amd64.s | 39 - .../purego/internal/fakecgo/asm_arm64.s | 36 - .../purego/internal/fakecgo/callbacks.go | 93 - .../ebitengine/purego/internal/fakecgo/doc.go | 32 - .../purego/internal/fakecgo/freebsd.go | 27 - .../internal/fakecgo/go_darwin_amd64.go | 73 - .../internal/fakecgo/go_darwin_arm64.go | 88 - .../internal/fakecgo/go_freebsd_amd64.go | 95 - .../internal/fakecgo/go_freebsd_arm64.go | 98 - .../purego/internal/fakecgo/go_libinit.go | 69 - .../purego/internal/fakecgo/go_linux_amd64.go | 95 - .../purego/internal/fakecgo/go_linux_arm64.go | 98 - .../purego/internal/fakecgo/go_setenv.go | 18 - .../purego/internal/fakecgo/go_util.go | 37 - .../purego/internal/fakecgo/iscgo.go | 19 - .../purego/internal/fakecgo/libcgo.go | 39 - .../purego/internal/fakecgo/libcgo_darwin.go | 22 - .../purego/internal/fakecgo/libcgo_freebsd.go | 16 - .../purego/internal/fakecgo/libcgo_linux.go | 16 - .../purego/internal/fakecgo/setenv.go | 19 - .../purego/internal/fakecgo/symbols.go | 201 - .../purego/internal/fakecgo/symbols_darwin.go | 29 - .../internal/fakecgo/symbols_freebsd.go | 29 - .../purego/internal/fakecgo/symbols_linux.go | 29 - .../internal/fakecgo/trampolines_amd64.s | 104 - .../internal/fakecgo/trampolines_arm64.s | 72 - .../internal/fakecgo/trampolines_stubs.s | 90 - .../purego/internal/strings/strings.go | 40 - vendor/github.com/ebitengine/purego/is_ios.go | 13 - vendor/github.com/ebitengine/purego/nocgo.go | 25 - .../ebitengine/purego/struct_amd64.go | 260 - .../ebitengine/purego/struct_arm64.go | 274 - .../ebitengine/purego/struct_other.go | 16 - .../github.com/ebitengine/purego/sys_amd64.s | 164 - .../github.com/ebitengine/purego/sys_arm64.s | 92 - .../ebitengine/purego/sys_unix_arm64.s | 70 - .../github.com/ebitengine/purego/syscall.go | 53 - .../ebitengine/purego/syscall_cgo_linux.go | 21 - .../ebitengine/purego/syscall_sysv.go | 223 - .../ebitengine/purego/syscall_windows.go | 46 - .../ebitengine/purego/zcallback_amd64.s | 2014 -- .../ebitengine/purego/zcallback_arm64.s | 4014 --- .../github.com/expr-lang/expr/.gitattributes | 1 - vendor/github.com/expr-lang/expr/.gitignore | 11 - vendor/github.com/expr-lang/expr/LICENSE | 21 - vendor/github.com/expr-lang/expr/README.md | 183 - vendor/github.com/expr-lang/expr/SECURITY.md | 22 - vendor/github.com/expr-lang/expr/ast/dump.go | 59 - vendor/github.com/expr-lang/expr/ast/find.go | 18 - vendor/github.com/expr-lang/expr/ast/node.go | 244 - vendor/github.com/expr-lang/expr/ast/print.go | 263 - .../github.com/expr-lang/expr/ast/visitor.go | 78 - .../expr-lang/expr/builtin/builtin.go | 1077 - .../expr-lang/expr/builtin/function.go | 23 - .../github.com/expr-lang/expr/builtin/lib.go | 456 - .../expr-lang/expr/builtin/utils.go | 90 - .../expr-lang/expr/builtin/validation.go | 38 - .../expr-lang/expr/checker/checker.go | 1333 - .../github.com/expr-lang/expr/checker/info.go | 125 - .../expr-lang/expr/checker/nature/nature.go | 579 - .../expr-lang/expr/checker/nature/utils.go | 233 - .../expr-lang/expr/compiler/compiler.go | 1323 - .../github.com/expr-lang/expr/conf/config.go | 107 - vendor/github.com/expr-lang/expr/conf/env.go | 76 - vendor/github.com/expr-lang/expr/expr.go | 285 - .../github.com/expr-lang/expr/file/error.go | 85 - .../expr-lang/expr/file/location.go | 6 - .../github.com/expr-lang/expr/file/source.go | 36 - .../expr-lang/expr/internal/deref/deref.go | 56 - .../expr-lang/expr/internal/ring/ring.go | 85 - .../expr-lang/expr/optimizer/const_expr.go | 81 - .../expr-lang/expr/optimizer/filter_first.go | 38 - .../expr-lang/expr/optimizer/filter_last.go | 38 - .../expr-lang/expr/optimizer/filter_len.go | 22 - .../expr-lang/expr/optimizer/filter_map.go | 33 - .../expr-lang/expr/optimizer/fold.go | 343 - .../expr-lang/expr/optimizer/in_array.go | 68 - .../expr-lang/expr/optimizer/in_range.go | 43 - .../expr-lang/expr/optimizer/optimizer.go | 79 - .../expr/optimizer/predicate_combination.go | 61 - .../expr-lang/expr/optimizer/sum_array.go | 37 - .../expr-lang/expr/optimizer/sum_map.go | 25 - .../expr-lang/expr/parser/lexer/lexer.go | 315 - .../expr-lang/expr/parser/lexer/state.go | 232 - .../expr-lang/expr/parser/lexer/token.go | 43 - .../expr-lang/expr/parser/lexer/utils.go | 222 - .../expr/parser/operator/operator.go | 69 - .../expr-lang/expr/parser/parser.go | 939 - .../expr-lang/expr/parser/utils/utils.go | 34 - .../expr/patcher/operator_override.go | 148 - .../expr-lang/expr/patcher/with_context.go | 45 - .../expr-lang/expr/patcher/with_timezone.go | 25 - .../github.com/expr-lang/expr/types/types.go | 184 - vendor/github.com/expr-lang/expr/vm/debug.go | 6 - .../github.com/expr-lang/expr/vm/debug_off.go | 6 - .../expr/vm/func_types[generated].go | 370 - .../github.com/expr-lang/expr/vm/opcodes.go | 90 - .../github.com/expr-lang/expr/vm/program.go | 391 - .../expr/vm/runtime/helpers[generated].go | 3718 --- .../expr-lang/expr/vm/runtime/runtime.go | 439 - .../expr-lang/expr/vm/runtime/sort.go | 45 - vendor/github.com/expr-lang/expr/vm/utils.go | 37 - vendor/github.com/expr-lang/expr/vm/vm.go | 767 - .../github.com/felixge/httpsnoop/.gitignore | 0 .../github.com/felixge/httpsnoop/LICENSE.txt | 19 - vendor/github.com/felixge/httpsnoop/Makefile | 10 - vendor/github.com/felixge/httpsnoop/README.md | 95 - .../felixge/httpsnoop/capture_metrics.go | 86 - vendor/github.com/felixge/httpsnoop/docs.go | 10 - .../httpsnoop/wrap_generated_gteq_1.8.go | 436 - .../httpsnoop/wrap_generated_lt_1.8.go | 278 - vendor/github.com/go-logr/logr/funcr/funcr.go | 914 - .../github.com/go-logr/logr/funcr/slogsink.go | 105 - vendor/github.com/go-logr/stdr/LICENSE | 201 - vendor/github.com/go-logr/stdr/README.md | 6 - vendor/github.com/go-logr/stdr/stdr.go | 170 - vendor/github.com/go-ole/go-ole/.travis.yml | 8 - vendor/github.com/go-ole/go-ole/ChangeLog.md | 49 - vendor/github.com/go-ole/go-ole/LICENSE | 21 - vendor/github.com/go-ole/go-ole/README.md | 46 - vendor/github.com/go-ole/go-ole/SECURITY.md | 13 - vendor/github.com/go-ole/go-ole/appveyor.yml | 68 - vendor/github.com/go-ole/go-ole/com.go | 386 - vendor/github.com/go-ole/go-ole/com_func.go | 174 - vendor/github.com/go-ole/go-ole/connect.go | 192 - vendor/github.com/go-ole/go-ole/constants.go | 153 - vendor/github.com/go-ole/go-ole/error.go | 51 - vendor/github.com/go-ole/go-ole/error_func.go | 8 - .../github.com/go-ole/go-ole/error_windows.go | 24 - vendor/github.com/go-ole/go-ole/guid.go | 284 - .../go-ole/go-ole/iconnectionpoint.go | 20 - .../go-ole/go-ole/iconnectionpoint_func.go | 21 - .../go-ole/go-ole/iconnectionpoint_windows.go | 43 - .../go-ole/iconnectionpointcontainer.go | 17 - .../go-ole/iconnectionpointcontainer_func.go | 11 - .../iconnectionpointcontainer_windows.go | 25 - vendor/github.com/go-ole/go-ole/idispatch.go | 94 - .../go-ole/go-ole/idispatch_func.go | 19 - .../go-ole/go-ole/idispatch_windows.go | 203 - .../github.com/go-ole/go-ole/ienumvariant.go | 19 - .../go-ole/go-ole/ienumvariant_func.go | 19 - .../go-ole/go-ole/ienumvariant_windows.go | 63 - .../github.com/go-ole/go-ole/iinspectable.go | 18 - .../go-ole/go-ole/iinspectable_func.go | 15 - .../go-ole/go-ole/iinspectable_windows.go | 72 - .../go-ole/go-ole/iprovideclassinfo.go | 21 - .../go-ole/go-ole/iprovideclassinfo_func.go | 7 - .../go-ole/iprovideclassinfo_windows.go | 21 - vendor/github.com/go-ole/go-ole/itypeinfo.go | 34 - .../go-ole/go-ole/itypeinfo_func.go | 7 - .../go-ole/go-ole/itypeinfo_windows.go | 21 - vendor/github.com/go-ole/go-ole/iunknown.go | 57 - .../github.com/go-ole/go-ole/iunknown_func.go | 19 - .../go-ole/go-ole/iunknown_windows.go | 58 - vendor/github.com/go-ole/go-ole/ole.go | 190 - .../go-ole/go-ole/oleutil/connection.go | 100 - .../go-ole/go-ole/oleutil/connection_func.go | 10 - .../go-ole/oleutil/connection_windows.go | 58 - .../go-ole/go-ole/oleutil/go-get.go | 6 - .../go-ole/go-ole/oleutil/oleutil.go | 127 - vendor/github.com/go-ole/go-ole/safearray.go | 27 - .../go-ole/go-ole/safearray_func.go | 211 - .../go-ole/go-ole/safearray_windows.go | 337 - .../go-ole/go-ole/safearrayconversion.go | 140 - .../go-ole/go-ole/safearrayslices.go | 33 - vendor/github.com/go-ole/go-ole/utility.go | 101 - vendor/github.com/go-ole/go-ole/variables.go | 15 - vendor/github.com/go-ole/go-ole/variant.go | 105 - .../github.com/go-ole/go-ole/variant_386.go | 11 - .../github.com/go-ole/go-ole/variant_amd64.go | 12 - .../github.com/go-ole/go-ole/variant_arm.go | 11 - .../github.com/go-ole/go-ole/variant_arm64.go | 13 - .../go-ole/go-ole/variant_date_386.go | 22 - .../go-ole/go-ole/variant_date_amd64.go | 20 - .../go-ole/go-ole/variant_date_arm.go | 22 - .../go-ole/go-ole/variant_date_arm64.go | 23 - .../go-ole/go-ole/variant_ppc64le.go | 12 - .../github.com/go-ole/go-ole/variant_s390x.go | 12 - vendor/github.com/go-ole/go-ole/vt_string.go | 58 - vendor/github.com/go-ole/go-ole/winrt.go | 99 - vendor/github.com/go-ole/go-ole/winrt_doc.go | 36 - .../go-viper/mapstructure/v2/.editorconfig | 21 - .../go-viper/mapstructure/v2/.envrc | 4 - .../go-viper/mapstructure/v2/.gitignore | 6 - .../go-viper/mapstructure/v2/.golangci.yaml | 48 - .../go-viper/mapstructure/v2/CHANGELOG.md | 104 - .../go-viper/mapstructure/v2/LICENSE | 21 - .../go-viper/mapstructure/v2/README.md | 81 - .../go-viper/mapstructure/v2/decode_hooks.go | 714 - .../go-viper/mapstructure/v2/errors.go | 244 - .../go-viper/mapstructure/v2/flake.lock | 294 - .../go-viper/mapstructure/v2/flake.nix | 46 - .../mapstructure/v2/internal/errors/errors.go | 11 - .../mapstructure/v2/internal/errors/join.go | 9 - .../v2/internal/errors/join_go1_19.go | 61 - .../go-viper/mapstructure/v2/mapstructure.go | 1712 -- .../mapstructure/v2/reflect_go1_19.go | 44 - .../mapstructure/v2/reflect_go1_20.go | 10 - .../github.com/gogo/protobuf/jsonpb/jsonpb.go | 1435 - vendor/github.com/gogo/protobuf/types/any.go | 140 - .../github.com/gogo/protobuf/types/any.pb.go | 694 - .../github.com/gogo/protobuf/types/api.pb.go | 2134 -- vendor/github.com/gogo/protobuf/types/doc.go | 35 - .../gogo/protobuf/types/duration.go | 100 - .../gogo/protobuf/types/duration.pb.go | 517 - .../gogo/protobuf/types/duration_gogo.go | 100 - .../gogo/protobuf/types/empty.pb.go | 462 - .../gogo/protobuf/types/field_mask.pb.go | 738 - .../gogo/protobuf/types/protosize.go | 34 - .../gogo/protobuf/types/source_context.pb.go | 524 - .../gogo/protobuf/types/struct.pb.go | 2271 -- .../gogo/protobuf/types/timestamp.go | 130 - .../gogo/protobuf/types/timestamp.pb.go | 539 - .../gogo/protobuf/types/timestamp_gogo.go | 94 - .../github.com/gogo/protobuf/types/type.pb.go | 3355 --- .../gogo/protobuf/types/wrappers.pb.go | 2703 -- .../gogo/protobuf/types/wrappers_gogo.go | 300 - .../github.com/golang-jwt/jwt/v4/.gitignore | 4 - vendor/github.com/golang-jwt/jwt/v4/LICENSE | 9 - .../golang-jwt/jwt/v4/MIGRATION_GUIDE.md | 22 - vendor/github.com/golang-jwt/jwt/v4/README.md | 138 - .../github.com/golang-jwt/jwt/v4/SECURITY.md | 19 - .../golang-jwt/jwt/v4/VERSION_HISTORY.md | 135 - vendor/github.com/golang-jwt/jwt/v4/claims.go | 269 - vendor/github.com/golang-jwt/jwt/v4/doc.go | 4 - vendor/github.com/golang-jwt/jwt/v4/ecdsa.go | 142 - .../golang-jwt/jwt/v4/ecdsa_utils.go | 69 - .../github.com/golang-jwt/jwt/v4/ed25519.go | 85 - .../golang-jwt/jwt/v4/ed25519_utils.go | 64 - vendor/github.com/golang-jwt/jwt/v4/errors.go | 112 - vendor/github.com/golang-jwt/jwt/v4/hmac.go | 95 - .../golang-jwt/jwt/v4/map_claims.go | 151 - vendor/github.com/golang-jwt/jwt/v4/none.go | 52 - vendor/github.com/golang-jwt/jwt/v4/parser.go | 206 - .../golang-jwt/jwt/v4/parser_option.go | 29 - vendor/github.com/golang-jwt/jwt/v4/rsa.go | 101 - .../github.com/golang-jwt/jwt/v4/rsa_pss.go | 143 - .../github.com/golang-jwt/jwt/v4/rsa_utils.go | 105 - .../golang-jwt/jwt/v4/signing_method.go | 46 - .../golang-jwt/jwt/v4/staticcheck.conf | 1 - vendor/github.com/golang-jwt/jwt/v4/token.go | 143 - vendor/github.com/golang-jwt/jwt/v4/types.go | 145 - vendor/github.com/google/s2a-go/.gitignore | 6 - .../google/s2a-go/CODE_OF_CONDUCT.md | 93 - .../github.com/google/s2a-go/CONTRIBUTING.md | 29 - vendor/github.com/google/s2a-go/LICENSE.md | 202 - vendor/github.com/google/s2a-go/README.md | 14 - .../google/s2a-go/fallback/s2a_fallback.go | 167 - .../s2a-go/internal/authinfo/authinfo.go | 119 - .../s2a-go/internal/handshaker/handshaker.go | 438 - .../internal/handshaker/service/service.go | 66 - .../proto/common_go_proto/common.pb.go | 388 - .../s2a_context_go_proto/s2a_context.pb.go | 267 - .../internal/proto/s2a_go_proto/s2a.pb.go | 1377 - .../proto/s2a_go_proto/s2a_grpc.pb.go | 174 - .../proto/v2/common_go_proto/common.pb.go | 549 - .../v2/s2a_context_go_proto/s2a_context.pb.go | 249 - .../internal/proto/v2/s2a_go_proto/s2a.pb.go | 2518 -- .../proto/v2/s2a_go_proto/s2a_grpc.pb.go | 160 - .../internal/aeadcrypter/aeadcrypter.go | 34 - .../record/internal/aeadcrypter/aesgcm.go | 70 - .../record/internal/aeadcrypter/chachapoly.go | 67 - .../record/internal/aeadcrypter/common.go | 92 - .../record/internal/halfconn/ciphersuite.go | 98 - .../record/internal/halfconn/counter.go | 60 - .../record/internal/halfconn/expander.go | 59 - .../record/internal/halfconn/halfconn.go | 193 - .../google/s2a-go/internal/record/record.go | 729 - .../s2a-go/internal/record/ticketsender.go | 178 - .../internal/tokenmanager/tokenmanager.go | 79 - .../google/s2a-go/internal/v2/README.md | 1 - .../internal/v2/certverifier/certverifier.go | 122 - .../internal/v2/remotesigner/remotesigner.go | 186 - .../google/s2a-go/internal/v2/s2av2.go | 380 - .../v2/tlsconfigstore/tlsconfigstore.go | 403 - .../github.com/google/s2a-go/retry/retry.go | 144 - vendor/github.com/google/s2a-go/s2a.go | 448 - .../github.com/google/s2a-go/s2a_options.go | 272 - vendor/github.com/google/s2a-go/s2a_utils.go | 79 - .../google/s2a-go/stream/s2a_stream.go | 39 - .../enterprise-certificate-proxy/LICENSE | 202 - .../client/client.go | 219 - .../client/util/util.go | 100 - .../gax-go/v2/.release-please-manifest.json | 3 - .../googleapis/gax-go/v2/CHANGES.md | 182 - .../github.com/googleapis/gax-go/v2/LICENSE | 27 - .../googleapis/gax-go/v2/apierror/apierror.go | 402 - .../v2/apierror/internal/proto/README.md | 30 - .../internal/proto/custom_error.pb.go | 256 - .../internal/proto/custom_error.proto | 50 - .../v2/apierror/internal/proto/error.pb.go | 280 - .../v2/apierror/internal/proto/error.proto | 46 - .../googleapis/gax-go/v2/call_option.go | 268 - .../googleapis/gax-go/v2/callctx/callctx.go | 100 - .../googleapis/gax-go/v2/content_type.go | 112 - vendor/github.com/googleapis/gax-go/v2/gax.go | 41 - .../github.com/googleapis/gax-go/v2/header.go | 200 - .../googleapis/gax-go/v2/internal/version.go | 33 - .../v2/internallog/internal/internal.go | 134 - .../gax-go/v2/internallog/internallog.go | 154 - .../github.com/googleapis/gax-go/v2/invoke.go | 114 - .../googleapis/gax-go/v2/proto_json_stream.go | 127 - .../gax-go/v2/release-please-config.json | 10 - .../github.com/gorilla/websocket/.gitignore | 25 - vendor/github.com/gorilla/websocket/AUTHORS | 9 - vendor/github.com/gorilla/websocket/LICENSE | 22 - vendor/github.com/gorilla/websocket/README.md | 32 - vendor/github.com/gorilla/websocket/client.go | 517 - .../gorilla/websocket/compression.go | 152 - vendor/github.com/gorilla/websocket/conn.go | 1246 - vendor/github.com/gorilla/websocket/doc.go | 227 - vendor/github.com/gorilla/websocket/join.go | 42 - vendor/github.com/gorilla/websocket/json.go | 60 - vendor/github.com/gorilla/websocket/mask.go | 55 - .../github.com/gorilla/websocket/mask_safe.go | 16 - .../github.com/gorilla/websocket/prepared.go | 102 - vendor/github.com/gorilla/websocket/proxy.go | 104 - vendor/github.com/gorilla/websocket/server.go | 373 - vendor/github.com/gorilla/websocket/util.go | 298 - vendor/github.com/hashicorp/cronexpr/APLv2 | 202 - .../github.com/hashicorp/cronexpr/CODEOWNERS | 1 - vendor/github.com/hashicorp/cronexpr/GPLv3 | 674 - vendor/github.com/hashicorp/cronexpr/LICENSE | 202 - .../github.com/hashicorp/cronexpr/README.md | 134 - .../github.com/hashicorp/cronexpr/cronexpr.go | 312 - .../hashicorp/cronexpr/cronexpr_next.go | 155 - .../hashicorp/cronexpr/cronexpr_parse.go | 509 - vendor/github.com/hashicorp/errwrap/LICENSE | 354 - vendor/github.com/hashicorp/errwrap/README.md | 89 - .../github.com/hashicorp/errwrap/errwrap.go | 178 - .../github.com/hashicorp/go-cleanhttp/LICENSE | 363 - .../hashicorp/go-cleanhttp/README.md | 30 - .../hashicorp/go-cleanhttp/cleanhttp.go | 58 - .../github.com/hashicorp/go-cleanhttp/doc.go | 20 - .../hashicorp/go-cleanhttp/handlers.go | 48 - .../hashicorp/go-multierror/LICENSE | 353 - .../hashicorp/go-multierror/Makefile | 31 - .../hashicorp/go-multierror/README.md | 150 - .../hashicorp/go-multierror/append.go | 43 - .../hashicorp/go-multierror/flatten.go | 26 - .../hashicorp/go-multierror/format.go | 27 - .../hashicorp/go-multierror/group.go | 38 - .../hashicorp/go-multierror/multierror.go | 121 - .../hashicorp/go-multierror/prefix.go | 37 - .../hashicorp/go-multierror/sort.go | 16 - .../hashicorp/go-rootcerts/.travis.yml | 12 - .../github.com/hashicorp/go-rootcerts/LICENSE | 363 - .../hashicorp/go-rootcerts/Makefile | 8 - .../hashicorp/go-rootcerts/README.md | 44 - .../github.com/hashicorp/go-rootcerts/doc.go | 9 - .../hashicorp/go-rootcerts/rootcerts.go | 123 - .../hashicorp/go-rootcerts/rootcerts_base.go | 12 - .../go-rootcerts/rootcerts_darwin.go | 48 - .../hashicorp/go-version/CHANGELOG.md | 64 - .../github.com/hashicorp/go-version/LICENSE | 356 - .../github.com/hashicorp/go-version/README.md | 66 - .../hashicorp/go-version/constraint.go | 298 - .../hashicorp/go-version/version.go | 441 - .../go-version/version_collection.go | 20 - .../hashicorp/nomad/api/.copywrite.hcl | 12 - vendor/github.com/hashicorp/nomad/api/LICENSE | 365 - vendor/github.com/hashicorp/nomad/api/acl.go | 1248 - .../github.com/hashicorp/nomad/api/agent.go | 606 - .../hashicorp/nomad/api/allocations.go | 646 - .../hashicorp/nomad/api/allocations_exec.go | 258 - vendor/github.com/hashicorp/nomad/api/api.go | 1297 - .../hashicorp/nomad/api/constraint.go | 33 - .../github.com/hashicorp/nomad/api/consul.go | 835 - .../hashicorp/nomad/api/contexts/contexts.go | 39 - vendor/github.com/hashicorp/nomad/api/csi.go | 658 - .../hashicorp/nomad/api/deployments.go | 307 - .../nomad/api/error_unexpected_response.go | 177 - .../hashicorp/nomad/api/evaluations.go | 183 - .../hashicorp/nomad/api/event_stream.go | 223 - vendor/github.com/hashicorp/nomad/api/fs.go | 433 - .../hashicorp/nomad/api/host_volume_claims.go | 70 - .../hashicorp/nomad/api/host_volumes.go | 253 - .../github.com/hashicorp/nomad/api/ioutil.go | 84 - vendor/github.com/hashicorp/nomad/api/jobs.go | 1713 -- .../github.com/hashicorp/nomad/api/keyring.go | 101 - .../github.com/hashicorp/nomad/api/locks.go | 377 - .../hashicorp/nomad/api/namespace.go | 169 - .../hashicorp/nomad/api/node_meta.go | 71 - .../hashicorp/nomad/api/node_pools.go | 131 - .../github.com/hashicorp/nomad/api/nodes.go | 970 - .../hashicorp/nomad/api/operator.go | 503 - .../hashicorp/nomad/api/operator_autopilot.go | 305 - .../hashicorp/nomad/api/operator_metrics.go | 90 - .../github.com/hashicorp/nomad/api/quota.go | 220 - vendor/github.com/hashicorp/nomad/api/raw.go | 49 - .../hashicorp/nomad/api/recommendations.go | 126 - .../github.com/hashicorp/nomad/api/regions.go | 27 - .../hashicorp/nomad/api/resources.go | 332 - .../github.com/hashicorp/nomad/api/retry.go | 124 - .../github.com/hashicorp/nomad/api/scaling.go | 127 - .../github.com/hashicorp/nomad/api/search.go | 101 - .../hashicorp/nomad/api/sentinel.go | 91 - .../hashicorp/nomad/api/services.go | 359 - .../github.com/hashicorp/nomad/api/status.go | 46 - .../github.com/hashicorp/nomad/api/system.go | 26 - .../hashicorp/nomad/api/task_sched.go | 14 - .../github.com/hashicorp/nomad/api/tasks.go | 1254 - .../github.com/hashicorp/nomad/api/utils.go | 44 - .../hashicorp/nomad/api/variables.go | 526 - .../github.com/infobloxopen/go-trees/LICENSE | 201 - .../infobloxopen/go-trees/iptree/iptree.go | 341 - .../infobloxopen/go-trees/numtree/node32.go | 438 - .../infobloxopen/go-trees/numtree/node64.go | 380 - vendor/github.com/lufia/plan9stats/.gitignore | 12 - vendor/github.com/lufia/plan9stats/LICENSE | 29 - vendor/github.com/lufia/plan9stats/README.md | 10 - vendor/github.com/lufia/plan9stats/cpu.go | 291 - vendor/github.com/lufia/plan9stats/disk.go | 116 - vendor/github.com/lufia/plan9stats/doc.go | 2 - vendor/github.com/lufia/plan9stats/host.go | 223 - vendor/github.com/lufia/plan9stats/int.go | 40 - vendor/github.com/lufia/plan9stats/opts.go | 21 - vendor/github.com/lufia/plan9stats/stats.go | 88 - .../github.com/mitchellh/go-homedir/LICENSE | 21 - .../github.com/mitchellh/go-homedir/README.md | 14 - .../mitchellh/go-homedir/homedir.go | 167 - .../mitchellh/mapstructure/CHANGELOG.md | 101 - .../github.com/mitchellh/mapstructure/LICENSE | 21 - .../mitchellh/mapstructure/README.md | 46 - .../mitchellh/mapstructure/decode_hooks.go | 283 - .../mitchellh/mapstructure/error.go | 50 - .../mitchellh/mapstructure/mapstructure.go | 1542 -- .../go-observer/.gitignore | 14 - .../opentracing-contrib/go-observer/LICENSE | 201 - .../opentracing-contrib/go-observer/README.md | 64 - .../go-observer/observer.go | 39 - .../mocktracer/mocklogrecord.go | 105 - .../opentracing-go/mocktracer/mockspan.go | 284 - .../opentracing-go/mocktracer/mocktracer.go | 105 - .../opentracing-go/mocktracer/propagation.go | 120 - .../zipkin-go-opentracing/.golangci.yml | 30 - .../zipkin-go-opentracing/.travis.yml | 23 - .../zipkin-go-opentracing/LICENSE | 201 - .../zipkin-go-opentracing/Makefile | 23 - .../zipkin-go-opentracing/README.md | 68 - .../zipkin-go-opentracing/appveyor.yml | 20 - .../zipkin-go-opentracing/circle.yml | 11 - .../zipkin-go-opentracing/context.go | 25 - .../zipkin-go-opentracing/propagation.go | 157 - .../zipkin-go-opentracing/span.go | 159 - .../zipkin-go-opentracing/tracer.go | 194 - .../zipkin-go-opentracing/tracer_options.go | 54 - .../openzipkin/zipkin-go/.gitattributes | 1 - .../openzipkin/zipkin-go/.gitignore | 26 - .../openzipkin/zipkin-go/.golangci.yml | 33 - .../github.com/openzipkin/zipkin-go/LICENSE | 201 - .../github.com/openzipkin/zipkin-go/Makefile | 44 - .../github.com/openzipkin/zipkin-go/README.md | 128 - .../openzipkin/zipkin-go/SECURITY.md | 13 - .../openzipkin/zipkin-go/context.go | 63 - vendor/github.com/openzipkin/zipkin-go/doc.go | 20 - .../openzipkin/zipkin-go/endpoint.go | 81 - .../zipkin-go/idgenerator/idgenerator.go | 130 - .../openzipkin/zipkin-go/model/annotation.go | 60 - .../openzipkin/zipkin-go/model/doc.go | 23 - .../openzipkin/zipkin-go/model/endpoint.go | 50 - .../openzipkin/zipkin-go/model/kind.go | 27 - .../openzipkin/zipkin-go/model/span.go | 161 - .../openzipkin/zipkin-go/model/span_id.go | 44 - .../openzipkin/zipkin-go/model/traceid.go | 75 - .../github.com/openzipkin/zipkin-go/noop.go | 48 - .../zipkin-go/propagation/b3/doc.go | 19 - .../zipkin-go/propagation/b3/grpc.go | 87 - .../zipkin-go/propagation/b3/http.go | 129 - .../zipkin-go/propagation/b3/map.go | 101 - .../zipkin-go/propagation/b3/shared.go | 44 - .../zipkin-go/propagation/b3/spancontext.go | 203 - .../zipkin-go/propagation/propagation.go | 30 - .../zipkin-go/reporter/http/http.go | 275 - .../openzipkin/zipkin-go/reporter/reporter.go | 41 - .../zipkin-go/reporter/serializer.go | 42 - .../github.com/openzipkin/zipkin-go/sample.go | 127 - .../github.com/openzipkin/zipkin-go/span.go | 58 - .../zipkin-go/span_implementation.go | 107 - .../openzipkin/zipkin-go/span_options.go | 88 - .../github.com/openzipkin/zipkin-go/tags.go | 37 - .../github.com/openzipkin/zipkin-go/tracer.go | 200 - .../openzipkin/zipkin-go/tracer_options.go | 138 - .../oschwald/geoip2-golang/.gitignore | 3 - .../oschwald/geoip2-golang/.gitmodules | 3 - .../oschwald/geoip2-golang/.golangci.yml | 177 - .../github.com/oschwald/geoip2-golang/LICENSE | 15 - .../oschwald/geoip2-golang/README.md | 93 - .../oschwald/geoip2-golang/reader.go | 422 - .../oschwald/maxminddb-golang/.gitignore | 4 - .../oschwald/maxminddb-golang/.gitmodules | 3 - .../oschwald/maxminddb-golang/.golangci.toml | 192 - .../oschwald/maxminddb-golang/LICENSE | 15 - .../oschwald/maxminddb-golang/README.md | 36 - .../oschwald/maxminddb-golang/decoder.go | 900 - .../oschwald/maxminddb-golang/deserializer.go | 31 - .../oschwald/maxminddb-golang/errors.go | 46 - .../oschwald/maxminddb-golang/mmap_unix.go | 16 - .../oschwald/maxminddb-golang/mmap_windows.go | 86 - .../oschwald/maxminddb-golang/node.go | 58 - .../oschwald/maxminddb-golang/reader.go | 310 - .../maxminddb-golang/reader_memory.go | 26 - .../oschwald/maxminddb-golang/reader_mmap.go | 64 - .../oschwald/maxminddb-golang/set_zero_120.go | 10 - .../maxminddb-golang/set_zero_pre120.go | 10 - .../oschwald/maxminddb-golang/traverse.go | 204 - .../oschwald/maxminddb-golang/verifier.go | 201 - .../outcaste-io/ristretto/.deepsource.toml | 17 - .../github.com/outcaste-io/ristretto/.mailmap | 1 - .../outcaste-io/ristretto/CHANGELOG.md | 172 - .../github.com/outcaste-io/ristretto/LICENSE | 176 - .../outcaste-io/ristretto/README.md | 237 - .../github.com/outcaste-io/ristretto/cache.go | 520 - .../outcaste-io/ristretto/metrics.go | 249 - .../outcaste-io/ristretto/policy.go | 388 - .../github.com/outcaste-io/ristretto/ring.go | 91 - .../outcaste-io/ristretto/sketch.go | 155 - .../github.com/outcaste-io/ristretto/store.go | 225 - .../github.com/outcaste-io/ristretto/test.sh | 20 - .../github.com/outcaste-io/ristretto/ttl.go | 155 - .../outcaste-io/ristretto/z/LICENSE | 64 - .../outcaste-io/ristretto/z/README.md | 129 - .../outcaste-io/ristretto/z/allocator.go | 403 - .../outcaste-io/ristretto/z/bbloom.go | 209 - .../outcaste-io/ristretto/z/btree.go | 710 - .../outcaste-io/ristretto/z/buffer.go | 543 - .../outcaste-io/ristretto/z/calloc.go | 42 - .../outcaste-io/ristretto/z/calloc_32bit.go | 14 - .../outcaste-io/ristretto/z/calloc_64bit.go | 14 - .../ristretto/z/calloc_jemalloc.go | 173 - .../ristretto/z/calloc_nojemalloc.go | 37 - .../outcaste-io/ristretto/z/file.go | 217 - .../outcaste-io/ristretto/z/file_default.go | 39 - .../outcaste-io/ristretto/z/file_linux.go | 37 - .../outcaste-io/ristretto/z/flags.go | 324 - .../outcaste-io/ristretto/z/histogram.go | 205 - .../outcaste-io/ristretto/z/mmap.go | 44 - .../outcaste-io/ristretto/z/mmap_darwin.go | 59 - .../outcaste-io/ristretto/z/mmap_linux.go | 97 - .../outcaste-io/ristretto/z/mmap_plan9.go | 44 - .../outcaste-io/ristretto/z/mmap_unix.go | 56 - .../outcaste-io/ristretto/z/mmap_wasip1.go | 40 - .../outcaste-io/ristretto/z/mmap_windows.go | 95 - .../outcaste-io/ristretto/z/rtutil.go | 75 - .../outcaste-io/ristretto/z/rtutil.s | 0 .../outcaste-io/ristretto/z/simd/baseline.go | 127 - .../outcaste-io/ristretto/z/simd/search.go | 51 - .../ristretto/z/simd/search_amd64.s | 60 - .../ristretto/z/simd/stub_search_amd64.go | 6 - .../github.com/outcaste-io/ristretto/z/z.go | 163 - vendor/github.com/philhofer/fwd/LICENSE.md | 7 - vendor/github.com/philhofer/fwd/README.md | 368 - vendor/github.com/philhofer/fwd/reader.go | 445 - vendor/github.com/philhofer/fwd/writer.go | 236 - .../philhofer/fwd/writer_appengine.go | 6 - .../github.com/philhofer/fwd/writer_tinygo.go | 13 - .../github.com/philhofer/fwd/writer_unsafe.go | 20 - .../github.com/planetscale/vtprotobuf/LICENSE | 29 - .../vtprotobuf/protohelpers/protohelpers.go | 122 - .../github.com/power-devops/perfstat/LICENSE | 23 - .../power-devops/perfstat/c_helpers.c | 159 - .../power-devops/perfstat/c_helpers.h | 58 - .../power-devops/perfstat/config.go | 19 - .../power-devops/perfstat/cpustat.go | 138 - .../power-devops/perfstat/diskstat.go | 138 - .../github.com/power-devops/perfstat/doc.go | 316 - .../power-devops/perfstat/fsstat.go | 32 - .../power-devops/perfstat/helpers.go | 819 - .../power-devops/perfstat/lparstat.go | 40 - .../power-devops/perfstat/lvmstat.go | 73 - .../power-devops/perfstat/memstat.go | 85 - .../power-devops/perfstat/netstat.go | 118 - .../power-devops/perfstat/procstat.go | 76 - .../power-devops/perfstat/sysconf.go | 196 - .../power-devops/perfstat/systemcfg.go | 662 - .../power-devops/perfstat/types_cpu.go | 186 - .../power-devops/perfstat/types_disk.go | 176 - .../power-devops/perfstat/types_fs.go | 195 - .../power-devops/perfstat/types_lpar.go | 129 - .../power-devops/perfstat/types_lvm.go | 31 - .../power-devops/perfstat/types_memory.go | 101 - .../power-devops/perfstat/types_network.go | 163 - .../power-devops/perfstat/types_process.go | 43 - .../power-devops/perfstat/uptime.go | 36 - .../github.com/puzpuzpuz/xsync/v3/.gitignore | 15 - .../puzpuzpuz/xsync/v3/BENCHMARKS.md | 133 - vendor/github.com/puzpuzpuz/xsync/v3/LICENSE | 201 - .../github.com/puzpuzpuz/xsync/v3/README.md | 195 - .../github.com/puzpuzpuz/xsync/v3/counter.go | 99 - vendor/github.com/puzpuzpuz/xsync/v3/map.go | 917 - vendor/github.com/puzpuzpuz/xsync/v3/mapof.go | 738 - .../puzpuzpuz/xsync/v3/mpmcqueue.go | 125 - .../puzpuzpuz/xsync/v3/mpmcqueueof.go | 138 - .../github.com/puzpuzpuz/xsync/v3/rbmutex.go | 188 - .../puzpuzpuz/xsync/v3/spscqueue.go | 92 - .../puzpuzpuz/xsync/v3/spscqueueof.go | 96 - vendor/github.com/puzpuzpuz/xsync/v3/util.go | 66 - .../puzpuzpuz/xsync/v3/util_hash.go | 77 - .../go-securesystemslib/LICENSE | 21 - .../cjson/canonicaljson.go | 151 - vendor/github.com/shirou/gopsutil/v4/LICENSE | 61 - .../shirou/gopsutil/v4/common/env.go | 25 - .../github.com/shirou/gopsutil/v4/cpu/cpu.go | 202 - .../shirou/gopsutil/v4/cpu/cpu_aix.go | 16 - .../shirou/gopsutil/v4/cpu/cpu_aix_cgo.go | 66 - .../shirou/gopsutil/v4/cpu/cpu_aix_nocgo.go | 157 - .../shirou/gopsutil/v4/cpu/cpu_darwin.go | 198 - .../gopsutil/v4/cpu/cpu_darwin_arm64.go | 80 - .../gopsutil/v4/cpu/cpu_darwin_fallback.go | 13 - .../shirou/gopsutil/v4/cpu/cpu_dragonfly.go | 158 - .../gopsutil/v4/cpu/cpu_dragonfly_amd64.go | 10 - .../shirou/gopsutil/v4/cpu/cpu_fallback.go | 31 - .../shirou/gopsutil/v4/cpu/cpu_freebsd.go | 170 - .../shirou/gopsutil/v4/cpu/cpu_freebsd_386.go | 10 - .../gopsutil/v4/cpu/cpu_freebsd_amd64.go | 10 - .../shirou/gopsutil/v4/cpu/cpu_freebsd_arm.go | 10 - .../gopsutil/v4/cpu/cpu_freebsd_arm64.go | 10 - .../shirou/gopsutil/v4/cpu/cpu_linux.go | 479 - .../shirou/gopsutil/v4/cpu/cpu_netbsd.go | 120 - .../gopsutil/v4/cpu/cpu_netbsd_amd64.go | 10 - .../shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go | 10 - .../gopsutil/v4/cpu/cpu_netbsd_arm64.go | 10 - .../shirou/gopsutil/v4/cpu/cpu_openbsd.go | 138 - .../shirou/gopsutil/v4/cpu/cpu_openbsd_386.go | 11 - .../gopsutil/v4/cpu/cpu_openbsd_amd64.go | 11 - .../shirou/gopsutil/v4/cpu/cpu_openbsd_arm.go | 11 - .../gopsutil/v4/cpu/cpu_openbsd_arm64.go | 11 - .../gopsutil/v4/cpu/cpu_openbsd_riscv64.go | 11 - .../shirou/gopsutil/v4/cpu/cpu_plan9.go | 51 - .../shirou/gopsutil/v4/cpu/cpu_solaris.go | 270 - .../shirou/gopsutil/v4/cpu/cpu_windows.go | 229 - .../gopsutil/v4/internal/common/binary.go | 638 - .../gopsutil/v4/internal/common/common.go | 473 - .../v4/internal/common/common_darwin.go | 403 - .../v4/internal/common/common_freebsd.go | 82 - .../v4/internal/common/common_linux.go | 358 - .../v4/internal/common/common_netbsd.go | 66 - .../v4/internal/common/common_openbsd.go | 66 - .../v4/internal/common/common_testing.go | 14 - .../v4/internal/common/common_unix.go | 42 - .../v4/internal/common/common_windows.go | 304 - .../gopsutil/v4/internal/common/endian.go | 11 - .../gopsutil/v4/internal/common/sleep.go | 22 - .../gopsutil/v4/internal/common/warnings.go | 31 - .../shirou/gopsutil/v4/mem/ex_linux.go | 40 - .../shirou/gopsutil/v4/mem/ex_windows.go | 51 - .../github.com/shirou/gopsutil/v4/mem/mem.go | 121 - .../shirou/gopsutil/v4/mem/mem_aix.go | 22 - .../shirou/gopsutil/v4/mem/mem_aix_cgo.go | 51 - .../shirou/gopsutil/v4/mem/mem_aix_nocgo.go | 78 - .../shirou/gopsutil/v4/mem/mem_bsd.go | 87 - .../shirou/gopsutil/v4/mem/mem_darwin.go | 130 - .../shirou/gopsutil/v4/mem/mem_fallback.go | 34 - .../shirou/gopsutil/v4/mem/mem_freebsd.go | 168 - .../shirou/gopsutil/v4/mem/mem_linux.go | 506 - .../shirou/gopsutil/v4/mem/mem_netbsd.go | 87 - .../shirou/gopsutil/v4/mem/mem_openbsd.go | 101 - .../shirou/gopsutil/v4/mem/mem_openbsd_386.go | 38 - .../gopsutil/v4/mem/mem_openbsd_amd64.go | 33 - .../shirou/gopsutil/v4/mem/mem_openbsd_arm.go | 38 - .../gopsutil/v4/mem/mem_openbsd_arm64.go | 38 - .../gopsutil/v4/mem/mem_openbsd_riscv64.go | 38 - .../shirou/gopsutil/v4/mem/mem_plan9.go | 69 - .../shirou/gopsutil/v4/mem/mem_solaris.go | 211 - .../shirou/gopsutil/v4/mem/mem_windows.go | 183 - .../github.com/shirou/gopsutil/v4/net/net.go | 356 - .../shirou/gopsutil/v4/net/net_aix.go | 300 - .../shirou/gopsutil/v4/net/net_aix_cgo.go | 36 - .../shirou/gopsutil/v4/net/net_aix_nocgo.go | 95 - .../shirou/gopsutil/v4/net/net_darwin.go | 271 - .../shirou/gopsutil/v4/net/net_fallback.go | 71 - .../shirou/gopsutil/v4/net/net_freebsd.go | 108 - .../shirou/gopsutil/v4/net/net_linux.go | 806 - .../shirou/gopsutil/v4/net/net_openbsd.go | 343 - .../shirou/gopsutil/v4/net/net_solaris.go | 169 - .../shirou/gopsutil/v4/net/net_unix.go | 188 - .../shirou/gopsutil/v4/net/net_windows.go | 731 - .../shirou/gopsutil/v4/process/process.go | 643 - .../shirou/gopsutil/v4/process/process_bsd.go | 76 - .../gopsutil/v4/process/process_darwin.go | 482 - .../v4/process/process_darwin_amd64.go | 258 - .../v4/process/process_darwin_arm64.go | 234 - .../gopsutil/v4/process/process_fallback.go | 203 - .../gopsutil/v4/process/process_freebsd.go | 363 - .../v4/process/process_freebsd_386.go | 218 - .../v4/process/process_freebsd_amd64.go | 224 - .../v4/process/process_freebsd_arm.go | 218 - .../v4/process/process_freebsd_arm64.go | 226 - .../gopsutil/v4/process/process_linux.go | 1206 - .../gopsutil/v4/process/process_openbsd.go | 397 - .../v4/process/process_openbsd_386.go | 203 - .../v4/process/process_openbsd_amd64.go | 202 - .../v4/process/process_openbsd_arm.go | 203 - .../v4/process/process_openbsd_arm64.go | 204 - .../v4/process/process_openbsd_riscv64.go | 205 - .../gopsutil/v4/process/process_plan9.go | 203 - .../gopsutil/v4/process/process_posix.go | 187 - .../gopsutil/v4/process/process_solaris.go | 301 - .../gopsutil/v4/process/process_windows.go | 1210 - .../v4/process/process_windows_32bit.go | 104 - .../v4/process/process_windows_64bit.go | 77 - vendor/github.com/stretchr/testify/LICENSE | 21 - .../testify/assert/assertion_compare.go | 495 - .../testify/assert/assertion_format.go | 866 - .../testify/assert/assertion_format.go.tmpl | 5 - .../testify/assert/assertion_forward.go | 1723 -- .../testify/assert/assertion_forward.go.tmpl | 5 - .../testify/assert/assertion_order.go | 81 - .../stretchr/testify/assert/assertions.go | 2295 -- .../github.com/stretchr/testify/assert/doc.go | 50 - .../stretchr/testify/assert/errors.go | 10 - .../testify/assert/forward_assertions.go | 16 - .../testify/assert/http_assertions.go | 165 - .../testify/assert/yaml/yaml_custom.go | 24 - .../testify/assert/yaml/yaml_default.go | 36 - .../stretchr/testify/assert/yaml/yaml_fail.go | 17 - .../stretchr/testify/require/doc.go | 31 - .../testify/require/forward_requirements.go | 16 - .../stretchr/testify/require/require.go | 2180 -- .../stretchr/testify/require/require.go.tmpl | 6 - .../testify/require/require_forward.go | 1724 -- .../testify/require/require_forward.go.tmpl | 5 - .../stretchr/testify/require/requirements.go | 29 - vendor/github.com/tinylib/msgp/LICENSE | 8 - .../tinylib/msgp/msgp/advise_linux.go | 25 - .../tinylib/msgp/msgp/advise_other.go | 18 - .../github.com/tinylib/msgp/msgp/circular.go | 41 - vendor/github.com/tinylib/msgp/msgp/defs.go | 151 - vendor/github.com/tinylib/msgp/msgp/edit.go | 242 - vendor/github.com/tinylib/msgp/msgp/elsize.go | 128 - .../tinylib/msgp/msgp/elsize_default.go | 21 - .../tinylib/msgp/msgp/elsize_tinygo.go | 13 - vendor/github.com/tinylib/msgp/msgp/errors.go | 393 - .../tinylib/msgp/msgp/errors_default.go | 25 - .../tinylib/msgp/msgp/errors_tinygo.go | 42 - .../github.com/tinylib/msgp/msgp/extension.go | 561 - vendor/github.com/tinylib/msgp/msgp/file.go | 93 - .../github.com/tinylib/msgp/msgp/file_port.go | 48 - .../github.com/tinylib/msgp/msgp/integers.go | 199 - vendor/github.com/tinylib/msgp/msgp/json.go | 580 - .../tinylib/msgp/msgp/json_bytes.go | 347 - vendor/github.com/tinylib/msgp/msgp/number.go | 266 - vendor/github.com/tinylib/msgp/msgp/purego.go | 16 - vendor/github.com/tinylib/msgp/msgp/read.go | 1487 - .../tinylib/msgp/msgp/read_bytes.go | 1387 - vendor/github.com/tinylib/msgp/msgp/size.go | 40 - vendor/github.com/tinylib/msgp/msgp/unsafe.go | 37 - vendor/github.com/tinylib/msgp/msgp/write.go | 886 - .../tinylib/msgp/msgp/write_bytes.go | 520 - .../tklauser/go-sysconf/.cirrus.yml | 23 - .../github.com/tklauser/go-sysconf/.gitignore | 1 - vendor/github.com/tklauser/go-sysconf/LICENSE | 29 - .../github.com/tklauser/go-sysconf/README.md | 46 - .../github.com/tklauser/go-sysconf/sysconf.go | 21 - .../tklauser/go-sysconf/sysconf_bsd.go | 37 - .../tklauser/go-sysconf/sysconf_darwin.go | 307 - .../tklauser/go-sysconf/sysconf_dragonfly.go | 220 - .../tklauser/go-sysconf/sysconf_freebsd.go | 226 - .../tklauser/go-sysconf/sysconf_generic.go | 45 - .../tklauser/go-sysconf/sysconf_linux.go | 353 - .../tklauser/go-sysconf/sysconf_netbsd.go | 250 - .../tklauser/go-sysconf/sysconf_openbsd.go | 271 - .../tklauser/go-sysconf/sysconf_posix.go | 82 - .../tklauser/go-sysconf/sysconf_solaris.go | 14 - .../go-sysconf/sysconf_unsupported.go | 16 - .../go-sysconf/zsysconf_defs_darwin.go | 252 - .../go-sysconf/zsysconf_defs_dragonfly.go | 227 - .../go-sysconf/zsysconf_defs_freebsd.go | 228 - .../go-sysconf/zsysconf_defs_linux.go | 146 - .../go-sysconf/zsysconf_defs_netbsd.go | 163 - .../go-sysconf/zsysconf_defs_openbsd.go | 262 - .../go-sysconf/zsysconf_defs_solaris.go | 138 - .../go-sysconf/zsysconf_values_freebsd_386.go | 11 - .../zsysconf_values_freebsd_amd64.go | 11 - .../go-sysconf/zsysconf_values_freebsd_arm.go | 11 - .../zsysconf_values_freebsd_arm64.go | 11 - .../zsysconf_values_freebsd_riscv64.go | 11 - .../go-sysconf/zsysconf_values_linux_386.go | 113 - .../go-sysconf/zsysconf_values_linux_amd64.go | 113 - .../go-sysconf/zsysconf_values_linux_arm.go | 113 - .../go-sysconf/zsysconf_values_linux_arm64.go | 113 - .../zsysconf_values_linux_loong64.go | 113 - .../go-sysconf/zsysconf_values_linux_mips.go | 113 - .../zsysconf_values_linux_mips64.go | 113 - .../zsysconf_values_linux_mips64le.go | 113 - .../zsysconf_values_linux_mipsle.go | 113 - .../go-sysconf/zsysconf_values_linux_ppc64.go | 113 - .../zsysconf_values_linux_ppc64le.go | 113 - .../zsysconf_values_linux_riscv64.go | 113 - .../go-sysconf/zsysconf_values_linux_s390x.go | 113 - .../go-sysconf/zsysconf_values_netbsd_386.go | 10 - .../zsysconf_values_netbsd_amd64.go | 10 - .../go-sysconf/zsysconf_values_netbsd_arm.go | 10 - .../zsysconf_values_netbsd_arm64.go | 10 - .../github.com/tklauser/numcpus/.cirrus.yml | 23 - vendor/github.com/tklauser/numcpus/LICENSE | 202 - vendor/github.com/tklauser/numcpus/README.md | 52 - vendor/github.com/tklauser/numcpus/numcpus.go | 98 - .../tklauser/numcpus/numcpus_bsd.go | 65 - .../tklauser/numcpus/numcpus_linux.go | 188 - .../numcpus/numcpus_list_unsupported.go | 33 - .../tklauser/numcpus/numcpus_solaris.go | 55 - .../tklauser/numcpus/numcpus_unsupported.go | 41 - .../tklauser/numcpus/numcpus_windows.go | 41 - vendor/github.com/yusufpapurcu/wmi/LICENSE | 20 - vendor/github.com/yusufpapurcu/wmi/README.md | 6 - .../yusufpapurcu/wmi/swbemservices.go | 261 - vendor/github.com/yusufpapurcu/wmi/wmi.go | 603 - .../auto/sdk/CONTRIBUTING.md | 27 - vendor/go.opentelemetry.io/auto/sdk/LICENSE | 201 - .../auto/sdk/VERSIONING.md | 15 - vendor/go.opentelemetry.io/auto/sdk/doc.go | 14 - .../auto/sdk/internal/telemetry/attr.go | 58 - .../auto/sdk/internal/telemetry/doc.go | 8 - .../auto/sdk/internal/telemetry/id.go | 103 - .../auto/sdk/internal/telemetry/number.go | 67 - .../auto/sdk/internal/telemetry/resource.go | 66 - .../auto/sdk/internal/telemetry/scope.go | 67 - .../auto/sdk/internal/telemetry/span.go | 472 - .../auto/sdk/internal/telemetry/status.go | 42 - .../auto/sdk/internal/telemetry/traces.go | 189 - .../auto/sdk/internal/telemetry/value.go | 450 - vendor/go.opentelemetry.io/auto/sdk/limit.go | 94 - vendor/go.opentelemetry.io/auto/sdk/span.go | 447 - vendor/go.opentelemetry.io/auto/sdk/tracer.go | 141 - .../auto/sdk/tracer_provider.go | 33 - .../collector/component/LICENSE | 202 - .../collector/component/Makefile | 1 - .../collector/component/build_info.go | 26 - .../collector/component/component.go | 196 - .../collector/component/config.go | 13 - .../collector/component/doc.go | 8 - .../collector/component/host.go | 21 - .../collector/component/identifiable.go | 173 - .../collector/component/telemetry.go | 11 - .../collector/featuregate/LICENSE | 202 - .../collector/featuregate/Makefile | 1 - .../collector/featuregate/README.md | 77 - .../collector/featuregate/flag.go | 71 - .../collector/featuregate/gate.go | 58 - .../collector/featuregate/registry.go | 211 - .../collector/featuregate/stage.go | 44 - .../collector/internal/telemetry/LICENSE | 202 - .../collector/internal/telemetry/Makefile | 1 - .../telemetry/componentattribute/attribute.go | 25 - .../componentattribute/logger_provider.go | 37 - .../componentattribute/logger_zap.go | 146 - .../componentattribute/meter_provider.go | 37 - .../componentattribute/tracer_provider.go | 60 - .../collector/internal/telemetry/telemetry.go | 60 - .../collector/pdata/LICENSE | 202 - .../collector/pdata/internal/.gitignore | 2 - .../collector/pdata/internal/data/bytesid.go | 45 - .../pdata/internal/data/profileid.go | 79 - .../collector/logs/v1/logs_service.pb.go | 844 - .../metrics/v1/metrics_service.pb.go | 844 - .../v1development/profiles_service.pb.go | 845 - .../collector/trace/v1/trace_service.pb.go | 843 - .../data/protogen/common/v1/common.pb.go | 1721 -- .../internal/data/protogen/logs/v1/logs.pb.go | 1836 -- .../data/protogen/metrics/v1/metrics.pb.go | 6650 ----- .../profiles/v1development/profiles.pb.go | 5348 ---- .../data/protogen/resource/v1/resource.pb.go | 381 - .../data/protogen/trace/v1/trace.pb.go | 3045 -- .../collector/pdata/internal/data/spanid.go | 79 - .../collector/pdata/internal/data/traceid.go | 79 - .../internal/generated_wrapper_byteslice.go | 34 - .../generated_wrapper_float64slice.go | 34 - .../generated_wrapper_instrumentationscope.go | 43 - .../internal/generated_wrapper_int32slice.go | 34 - .../internal/generated_wrapper_int64slice.go | 34 - .../internal/generated_wrapper_intslice.go | 34 - .../internal/generated_wrapper_resource.go | 41 - .../internal/generated_wrapper_stringslice.go | 34 - .../internal/generated_wrapper_uint64slice.go | 34 - .../pdata/internal/json/attribute.go | 110 - .../collector/pdata/internal/json/enum.go | 29 - .../collector/pdata/internal/json/json.go | 22 - .../collector/pdata/internal/json/number.go | 103 - .../collector/pdata/internal/json/resource.go | 27 - .../collector/pdata/internal/json/scope.go | 31 - .../collector/pdata/internal/otlp/logs.go | 19 - .../collector/pdata/internal/otlp/metrics.go | 19 - .../collector/pdata/internal/otlp/profiles.go | 12 - .../collector/pdata/internal/otlp/traces.go | 19 - .../collector/pdata/internal/state.go | 22 - .../collector/pdata/internal/wrapper_logs.go | 46 - .../collector/pdata/internal/wrapper_map.go | 38 - .../pdata/internal/wrapper_metrics.go | 46 - .../pdata/internal/wrapper_profiles.go | 46 - .../collector/pdata/internal/wrapper_slice.go | 41 - .../pdata/internal/wrapper_traces.go | 46 - .../pdata/internal/wrapper_tracestate.go | 33 - .../collector/pdata/internal/wrapper_value.go | 37 - .../pdata/pcommon/generated_byteslice.go | 131 - .../pdata/pcommon/generated_float64slice.go | 131 - .../pcommon/generated_instrumentationscope.go | 102 - .../pdata/pcommon/generated_int32slice.go | 131 - .../pdata/pcommon/generated_int64slice.go | 131 - .../pdata/pcommon/generated_intslice.go | 108 - .../pdata/pcommon/generated_resource.go | 78 - .../pdata/pcommon/generated_stringslice.go | 131 - .../pdata/pcommon/generated_uint64slice.go | 131 - .../collector/pdata/pcommon/map.go | 337 - .../collector/pdata/pcommon/slice.go | 197 - .../collector/pdata/pcommon/spanid.go | 36 - .../collector/pdata/pcommon/timestamp.go | 29 - .../collector/pdata/pcommon/trace_state.go | 57 - .../collector/pdata/pcommon/traceid.go | 37 - .../collector/pdata/pcommon/value.go | 526 - .../collector/pdata/ptrace/encoding.go | 31 - .../pdata/ptrace/generated_resourcespans.go | 80 - .../ptrace/generated_resourcespansslice.go | 172 - .../pdata/ptrace/generated_scopespans.go | 80 - .../pdata/ptrace/generated_scopespansslice.go | 172 - .../collector/pdata/ptrace/generated_span.go | 220 - .../pdata/ptrace/generated_spanevent.go | 99 - .../pdata/ptrace/generated_spaneventslice.go | 172 - .../pdata/ptrace/generated_spanlink.go | 119 - .../pdata/ptrace/generated_spanlinkslice.go | 172 - .../pdata/ptrace/generated_spanslice.go | 172 - .../pdata/ptrace/generated_status.go | 80 - .../collector/pdata/ptrace/json.go | 217 - .../collector/pdata/ptrace/pb.go | 43 - .../collector/pdata/ptrace/span_kind.go | 54 - .../collector/pdata/ptrace/status_code.go | 31 - .../collector/pdata/ptrace/traces.go | 65 - .../collector/semconv/LICENSE | 202 - .../semconv/v1.17.0/generated_event.go | 118 - .../semconv/v1.17.0/generated_resource.go | 1168 - .../semconv/v1.17.0/generated_trace.go | 2011 -- .../collector/semconv/v1.17.0/schema.go | 9 - .../collector/semconv/v1.26.0/doc.go | 9 - .../v1.26.0/generated_attribute_group.go | 5331 ---- .../semconv/v1.26.0/generated_event.go | 10 - .../semconv/v1.26.0/generated_resource.go | 10 - .../semconv/v1.26.0/generated_trace.go | 10 - .../collector/semconv/v1.26.0/schema.go | 9 - .../collector/semconv/v1.27.0/doc.go | 9 - .../v1.27.0/generated_attribute_group.go | 5843 ---- .../semconv/v1.27.0/generated_event.go | 10 - .../semconv/v1.27.0/generated_resource.go | 10 - .../semconv/v1.27.0/generated_trace.go | 10 - .../collector/semconv/v1.27.0/schema.go | 9 - .../semconv/v1.6.1/generated_resource.go | 991 - .../semconv/v1.6.1/generated_trace.go | 1587 -- .../collector/semconv/v1.6.1/nonstandard.go | 11 - .../collector/semconv/v1.6.1/schema.go | 9 - .../contrib/bridges/otelzap/LICENSE | 201 - .../contrib/bridges/otelzap/README.md | 3 - .../contrib/bridges/otelzap/convert.go | 123 - .../contrib/bridges/otelzap/core.go | 262 - .../contrib/bridges/otelzap/encoder.go | 274 - .../contrib/bridges/otelzap/gen.go | 8 - .../instrumentation/net/http/otelhttp/LICENSE | 201 - .../net/http/otelhttp/client.go | 50 - .../net/http/otelhttp/common.go | 27 - .../net/http/otelhttp/config.go | 211 - .../instrumentation/net/http/otelhttp/doc.go | 7 - .../net/http/otelhttp/handler.go | 238 - .../otelhttp/internal/request/body_wrapper.go | 80 - .../net/http/otelhttp/internal/request/gen.go | 10 - .../internal/request/resp_writer_wrapper.go | 122 - .../net/http/otelhttp/internal/semconv/env.go | 323 - .../net/http/otelhttp/internal/semconv/gen.go | 14 - .../otelhttp/internal/semconv/httpconv.go | 573 - .../http/otelhttp/internal/semconv/util.go | 127 - .../http/otelhttp/internal/semconv/v1.20.0.go | 273 - .../http/otelhttp/internal/semconvutil/gen.go | 10 - .../otelhttp/internal/semconvutil/httpconv.go | 594 - .../otelhttp/internal/semconvutil/netconv.go | 214 - .../net/http/otelhttp/labeler.go | 58 - .../net/http/otelhttp/start_time_context.go | 29 - .../net/http/otelhttp/transport.go | 265 - .../net/http/otelhttp/version.go | 10 - .../go.opentelemetry.io/otel/.clomonitor.yml | 3 - .../go.opentelemetry.io/otel/.codespellignore | 11 - vendor/go.opentelemetry.io/otel/.codespellrc | 10 - .../go.opentelemetry.io/otel/.gitattributes | 3 - vendor/go.opentelemetry.io/otel/.gitignore | 15 - vendor/go.opentelemetry.io/otel/.golangci.yml | 263 - vendor/go.opentelemetry.io/otel/.lycheeignore | 13 - .../otel/.markdownlint.yaml | 29 - vendor/go.opentelemetry.io/otel/CHANGELOG.md | 3613 --- vendor/go.opentelemetry.io/otel/CODEOWNERS | 17 - .../go.opentelemetry.io/otel/CONTRIBUTING.md | 1157 - vendor/go.opentelemetry.io/otel/LICENSE | 231 - vendor/go.opentelemetry.io/otel/Makefile | 327 - vendor/go.opentelemetry.io/otel/README.md | 115 - vendor/go.opentelemetry.io/otel/RELEASING.md | 181 - .../otel/SECURITY-INSIGHTS.yml | 203 - vendor/go.opentelemetry.io/otel/VERSIONING.md | 224 - .../otel/attribute/README.md | 3 - .../go.opentelemetry.io/otel/attribute/doc.go | 5 - .../otel/attribute/encoder.go | 135 - .../otel/attribute/filter.go | 49 - .../otel/attribute/hash.go | 92 - .../otel/attribute/internal/attribute.go | 96 - .../otel/attribute/internal/xxhash/xxhash.go | 64 - .../otel/attribute/iterator.go | 151 - .../go.opentelemetry.io/otel/attribute/key.go | 123 - .../go.opentelemetry.io/otel/attribute/kv.go | 75 - .../otel/attribute/rawhelpers.go | 37 - .../go.opentelemetry.io/otel/attribute/set.go | 436 - .../otel/attribute/type_string.go | 32 - .../otel/attribute/value.go | 270 - .../otel/baggage/README.md | 3 - .../otel/baggage/baggage.go | 1018 - .../otel/baggage/context.go | 28 - .../go.opentelemetry.io/otel/baggage/doc.go | 9 - .../go.opentelemetry.io/otel/codes/README.md | 3 - .../go.opentelemetry.io/otel/codes/codes.go | 106 - vendor/go.opentelemetry.io/otel/codes/doc.go | 10 - .../otel/dependencies.Dockerfile | 4 - vendor/go.opentelemetry.io/otel/doc.go | 25 - .../go.opentelemetry.io/otel/error_handler.go | 27 - vendor/go.opentelemetry.io/otel/handler.go | 33 - .../otel/internal/baggage/baggage.go | 32 - .../otel/internal/baggage/context.go | 81 - .../otel/internal/global/handler.go | 37 - .../otel/internal/global/instruments.go | 412 - .../otel/internal/global/internal_logging.go | 62 - .../otel/internal/global/meter.go | 625 - .../otel/internal/global/propagator.go | 71 - .../otel/internal/global/state.go | 199 - .../otel/internal/global/trace.go | 232 - .../otel/internal_logging.go | 15 - vendor/go.opentelemetry.io/otel/log/DESIGN.md | 634 - vendor/go.opentelemetry.io/otel/log/LICENSE | 201 - vendor/go.opentelemetry.io/otel/log/README.md | 3 - vendor/go.opentelemetry.io/otel/log/doc.go | 76 - .../otel/log/embedded/README.md | 3 - .../otel/log/embedded/embedded.go | 36 - .../otel/log/global/README.md | 3 - .../otel/log/global/log.go | 49 - .../otel/log/internal/global/log.go | 107 - .../otel/log/internal/global/state.go | 53 - .../go.opentelemetry.io/otel/log/keyvalue.go | 443 - .../otel/log/kind_string.go | 30 - vendor/go.opentelemetry.io/otel/log/logger.go | 140 - .../go.opentelemetry.io/otel/log/provider.go | 37 - vendor/go.opentelemetry.io/otel/log/record.go | 144 - .../go.opentelemetry.io/otel/log/severity.go | 64 - .../otel/log/severity_string.go | 47 - vendor/go.opentelemetry.io/otel/metric.go | 42 - .../go.opentelemetry.io/otel/metric/LICENSE | 231 - .../go.opentelemetry.io/otel/metric/README.md | 3 - .../otel/metric/asyncfloat64.go | 266 - .../otel/metric/asyncint64.go | 262 - .../go.opentelemetry.io/otel/metric/config.go | 111 - vendor/go.opentelemetry.io/otel/metric/doc.go | 177 - .../otel/metric/embedded/README.md | 3 - .../otel/metric/embedded/embedded.go | 243 - .../otel/metric/instrument.go | 376 - .../go.opentelemetry.io/otel/metric/meter.go | 284 - .../otel/metric/noop/README.md | 3 - .../otel/metric/noop/noop.go | 296 - .../otel/metric/syncfloat64.go | 226 - .../otel/metric/syncint64.go | 226 - .../go.opentelemetry.io/otel/propagation.go | 20 - .../otel/propagation/README.md | 3 - .../otel/propagation/baggage.go | 77 - .../otel/propagation/doc.go | 13 - .../otel/propagation/propagation.go | 168 - .../otel/propagation/trace_context.go | 156 - vendor/go.opentelemetry.io/otel/renovate.json | 35 - .../go.opentelemetry.io/otel/requirements.txt | 1 - vendor/go.opentelemetry.io/otel/sdk/LICENSE | 231 - vendor/go.opentelemetry.io/otel/sdk/README.md | 3 - .../otel/sdk/instrumentation/README.md | 3 - .../otel/sdk/instrumentation/doc.go | 13 - .../otel/sdk/instrumentation/library.go | 9 - .../otel/sdk/instrumentation/scope.go | 19 - .../otel/sdk/internal/x/README.md | 46 - .../otel/sdk/internal/x/features.go | 39 - .../otel/sdk/internal/x/x.go | 58 - .../otel/sdk/resource/README.md | 3 - .../otel/sdk/resource/auto.go | 92 - .../otel/sdk/resource/builtin.go | 116 - .../otel/sdk/resource/config.go | 195 - .../otel/sdk/resource/container.go | 89 - .../otel/sdk/resource/doc.go | 20 - .../otel/sdk/resource/env.go | 95 - .../otel/sdk/resource/host_id.go | 109 - .../otel/sdk/resource/host_id_bsd.go | 11 - .../otel/sdk/resource/host_id_darwin.go | 8 - .../otel/sdk/resource/host_id_exec.go | 18 - .../otel/sdk/resource/host_id_linux.go | 10 - .../otel/sdk/resource/host_id_readfile.go | 17 - .../otel/sdk/resource/host_id_unsupported.go | 18 - .../otel/sdk/resource/host_id_windows.go | 35 - .../otel/sdk/resource/os.go | 89 - .../otel/sdk/resource/os_release_darwin.go | 92 - .../otel/sdk/resource/os_release_unix.go | 142 - .../otel/sdk/resource/os_unix.go | 78 - .../otel/sdk/resource/os_unsupported.go | 14 - .../otel/sdk/resource/os_windows.go | 89 - .../otel/sdk/resource/process.go | 173 - .../otel/sdk/resource/resource.go | 309 - .../otel/sdk/trace/README.md | 3 - .../otel/sdk/trace/batch_span_processor.go | 445 - .../go.opentelemetry.io/otel/sdk/trace/doc.go | 13 - .../otel/sdk/trace/event.go | 26 - .../otel/sdk/trace/evictedqueue.go | 64 - .../otel/sdk/trace/id_generator.go | 69 - .../otel/sdk/trace/internal/env/env.go | 168 - .../internal/observ/batch_span_processor.go | 119 - .../otel/sdk/trace/internal/observ/doc.go | 6 - .../internal/observ/simple_span_processor.go | 97 - .../otel/sdk/trace/internal/observ/tracer.go | 223 - .../otel/sdk/trace/link.go | 23 - .../otel/sdk/trace/provider.go | 510 - .../otel/sdk/trace/sampler_env.go | 96 - .../otel/sdk/trace/sampling.go | 282 - .../otel/sdk/trace/simple_span_processor.go | 150 - .../otel/sdk/trace/snapshot.go | 133 - .../otel/sdk/trace/span.go | 959 - .../otel/sdk/trace/span_exporter.go | 36 - .../otel/sdk/trace/span_limits.go | 114 - .../otel/sdk/trace/span_processor.go | 61 - .../otel/sdk/trace/tracer.go | 188 - .../go.opentelemetry.io/otel/sdk/version.go | 10 - .../otel/semconv/v1.20.0/README.md | 3 - .../otel/semconv/v1.20.0/attribute_group.go | 1198 - .../otel/semconv/v1.20.0/doc.go | 9 - .../otel/semconv/v1.20.0/event.go | 188 - .../otel/semconv/v1.20.0/exception.go | 9 - .../otel/semconv/v1.20.0/http.go | 10 - .../otel/semconv/v1.20.0/resource.go | 2060 -- .../otel/semconv/v1.20.0/schema.go | 9 - .../otel/semconv/v1.20.0/trace.go | 2599 -- .../otel/semconv/v1.26.0/README.md | 3 - .../otel/semconv/v1.26.0/attribute_group.go | 8996 ------ .../otel/semconv/v1.26.0/doc.go | 9 - .../otel/semconv/v1.26.0/exception.go | 9 - .../otel/semconv/v1.26.0/metric.go | 1307 - .../otel/semconv/v1.26.0/schema.go | 9 - .../otel/semconv/v1.37.0/MIGRATION.md | 41 - .../otel/semconv/v1.37.0/README.md | 3 - .../otel/semconv/v1.37.0/attribute_group.go | 15193 ---------- .../otel/semconv/v1.37.0/doc.go | 9 - .../otel/semconv/v1.37.0/error_type.go | 56 - .../otel/semconv/v1.37.0/exception.go | 9 - .../otel/semconv/v1.37.0/otelconv/metric.go | 2264 -- .../otel/semconv/v1.37.0/schema.go | 9 - vendor/go.opentelemetry.io/otel/trace.go | 36 - vendor/go.opentelemetry.io/otel/trace/LICENSE | 231 - .../go.opentelemetry.io/otel/trace/README.md | 3 - vendor/go.opentelemetry.io/otel/trace/auto.go | 662 - .../go.opentelemetry.io/otel/trace/config.go | 362 - .../go.opentelemetry.io/otel/trace/context.go | 50 - vendor/go.opentelemetry.io/otel/trace/doc.go | 119 - .../otel/trace/embedded/README.md | 3 - .../otel/trace/embedded/embedded.go | 45 - vendor/go.opentelemetry.io/otel/trace/hex.go | 38 - .../otel/trace/internal/telemetry/attr.go | 58 - .../otel/trace/internal/telemetry/doc.go | 8 - .../otel/trace/internal/telemetry/id.go | 103 - .../otel/trace/internal/telemetry/number.go | 67 - .../otel/trace/internal/telemetry/resource.go | 66 - .../otel/trace/internal/telemetry/scope.go | 67 - .../otel/trace/internal/telemetry/span.go | 472 - .../otel/trace/internal/telemetry/status.go | 42 - .../otel/trace/internal/telemetry/traces.go | 189 - .../otel/trace/internal/telemetry/value.go | 453 - .../otel/trace/nonrecording.go | 16 - vendor/go.opentelemetry.io/otel/trace/noop.go | 105 - .../otel/trace/noop/README.md | 3 - .../otel/trace/noop/noop.go | 112 - .../otel/trace/provider.go | 59 - vendor/go.opentelemetry.io/otel/trace/span.go | 181 - .../go.opentelemetry.io/otel/trace/trace.go | 365 - .../go.opentelemetry.io/otel/trace/tracer.go | 37 - .../otel/trace/tracestate.go | 330 - .../otel/verify_released_changelog.sh | 42 - vendor/go.opentelemetry.io/otel/version.go | 9 - vendor/go.opentelemetry.io/otel/versions.yaml | 63 - vendor/go.uber.org/atomic/.codecov.yml | 19 - vendor/go.uber.org/atomic/.gitignore | 15 - vendor/go.uber.org/atomic/CHANGELOG.md | 127 - vendor/go.uber.org/atomic/LICENSE.txt | 19 - vendor/go.uber.org/atomic/Makefile | 79 - vendor/go.uber.org/atomic/README.md | 63 - vendor/go.uber.org/atomic/bool.go | 88 - vendor/go.uber.org/atomic/bool_ext.go | 53 - vendor/go.uber.org/atomic/doc.go | 23 - vendor/go.uber.org/atomic/duration.go | 89 - vendor/go.uber.org/atomic/duration_ext.go | 40 - vendor/go.uber.org/atomic/error.go | 72 - vendor/go.uber.org/atomic/error_ext.go | 39 - vendor/go.uber.org/atomic/float32.go | 77 - vendor/go.uber.org/atomic/float32_ext.go | 76 - vendor/go.uber.org/atomic/float64.go | 77 - vendor/go.uber.org/atomic/float64_ext.go | 76 - vendor/go.uber.org/atomic/gen.go | 27 - vendor/go.uber.org/atomic/int32.go | 109 - vendor/go.uber.org/atomic/int64.go | 109 - vendor/go.uber.org/atomic/nocmp.go | 35 - vendor/go.uber.org/atomic/pointer_go118.go | 31 - .../atomic/pointer_go118_pre119.go | 60 - vendor/go.uber.org/atomic/pointer_go119.go | 61 - vendor/go.uber.org/atomic/string.go | 72 - vendor/go.uber.org/atomic/string_ext.go | 54 - vendor/go.uber.org/atomic/time.go | 55 - vendor/go.uber.org/atomic/time_ext.go | 36 - vendor/go.uber.org/atomic/uint32.go | 109 - vendor/go.uber.org/atomic/uint64.go | 109 - vendor/go.uber.org/atomic/uintptr.go | 109 - vendor/go.uber.org/atomic/unsafe_pointer.go | 65 - vendor/go.uber.org/atomic/value.go | 31 - vendor/golang.org/x/crypto/cryptobyte/asn1.go | 825 - .../x/crypto/cryptobyte/asn1/asn1.go | 46 - .../golang.org/x/crypto/cryptobyte/builder.go | 350 - .../golang.org/x/crypto/cryptobyte/string.go | 183 - vendor/golang.org/x/crypto/ed25519/ed25519.go | 72 - .../golang.org/x/crypto/pkcs12/bmp-string.go | 50 - vendor/golang.org/x/crypto/pkcs12/crypto.go | 131 - vendor/golang.org/x/crypto/pkcs12/errors.go | 23 - .../x/crypto/pkcs12/internal/rc2/rc2.go | 268 - vendor/golang.org/x/crypto/pkcs12/mac.go | 45 - vendor/golang.org/x/crypto/pkcs12/pbkdf.go | 170 - vendor/golang.org/x/crypto/pkcs12/pkcs12.go | 364 - vendor/golang.org/x/crypto/pkcs12/safebags.go | 57 - vendor/golang.org/x/exp/LICENSE | 27 - vendor/golang.org/x/exp/PATENTS | 22 - .../x/exp/constraints/constraints.go | 54 - .../golang.org/x/net/internal/socks/client.go | 168 - .../golang.org/x/net/internal/socks/socks.go | 317 - vendor/golang.org/x/net/proxy/dial.go | 54 - vendor/golang.org/x/net/proxy/direct.go | 31 - vendor/golang.org/x/net/proxy/per_host.go | 153 - vendor/golang.org/x/net/proxy/proxy.go | 149 - vendor/golang.org/x/net/proxy/socks5.go | 42 - .../x/oauth2/authhandler/authhandler.go | 94 - .../golang.org/x/oauth2/google/appengine.go | 40 - vendor/golang.org/x/oauth2/google/default.go | 329 - vendor/golang.org/x/oauth2/google/doc.go | 53 - vendor/golang.org/x/oauth2/google/error.go | 64 - .../x/oauth2/google/externalaccount/aws.go | 575 - .../google/externalaccount/basecredentials.go | 517 - .../externalaccount/executablecredsource.go | 312 - .../google/externalaccount/filecredsource.go | 60 - .../x/oauth2/google/externalaccount/header.go | 64 - .../programmaticrefreshcredsource.go | 21 - .../google/externalaccount/urlcredsource.go | 78 - vendor/golang.org/x/oauth2/google/google.go | 308 - .../externalaccountauthorizeduser.go | 114 - .../internal/impersonate/impersonate.go | 104 - .../google/internal/stsexchange/clientauth.go | 45 - .../internal/stsexchange/sts_exchange.go | 124 - vendor/golang.org/x/oauth2/google/jwt.go | 102 - vendor/golang.org/x/oauth2/google/sdk.go | 201 - vendor/golang.org/x/oauth2/jws/jws.go | 198 - vendor/golang.org/x/oauth2/jwt/jwt.go | 182 - .../golang.org/x/sys/windows/registry/key.go | 227 - .../x/sys/windows/registry/mksyscall.go | 9 - .../x/sys/windows/registry/syscall.go | 32 - .../x/sys/windows/registry/value.go | 390 - .../sys/windows/registry/zsyscall_windows.go | 117 - vendor/golang.org/x/xerrors/LICENSE | 27 - vendor/golang.org/x/xerrors/PATENTS | 22 - vendor/golang.org/x/xerrors/README | 2 - vendor/golang.org/x/xerrors/adaptor.go | 193 - vendor/golang.org/x/xerrors/codereview.cfg | 1 - vendor/golang.org/x/xerrors/doc.go | 23 - vendor/golang.org/x/xerrors/errors.go | 33 - vendor/golang.org/x/xerrors/fmt.go | 190 - vendor/golang.org/x/xerrors/format.go | 34 - vendor/golang.org/x/xerrors/frame.go | 56 - .../golang.org/x/xerrors/internal/internal.go | 8 - vendor/golang.org/x/xerrors/wrap.go | 112 - vendor/google.golang.org/api/AUTHORS | 11 - vendor/google.golang.org/api/CONTRIBUTORS | 56 - vendor/google.golang.org/api/LICENSE | 27 - .../google.golang.org/api/dns/v1/dns-api.json | 3544 --- .../google.golang.org/api/dns/v1/dns-gen.go | 7627 ----- .../api/googleapi/googleapi.go | 537 - .../api/googleapi/transport/apikey.go | 44 - .../google.golang.org/api/googleapi/types.go | 202 - vendor/google.golang.org/api/internal/cba.go | 294 - .../api/internal/cert/default_cert.go | 58 - .../api/internal/cert/enterprise_cert.go | 54 - .../api/internal/cert/secureconnect_cert.go | 122 - .../api/internal/conn_pool.go | 30 - .../google.golang.org/api/internal/creds.go | 333 - .../api/internal/gensupport/buffer.go | 79 - .../api/internal/gensupport/doc.go | 10 - .../api/internal/gensupport/error.go | 24 - .../api/internal/gensupport/json.go | 236 - .../api/internal/gensupport/jsonfloat.go | 47 - .../api/internal/gensupport/media.go | 317 - .../api/internal/gensupport/params.go | 78 - .../api/internal/gensupport/resumable.go | 337 - .../api/internal/gensupport/retry.go | 123 - .../api/internal/gensupport/send.go | 241 - .../api/internal/gensupport/version.go | 53 - .../api/internal/impersonate/impersonate.go | 127 - vendor/google.golang.org/api/internal/s2a.go | 136 - .../api/internal/settings.go | 251 - .../internal/third_party/uritemplates/LICENSE | 27 - .../third_party/uritemplates/METADATA | 14 - .../third_party/uritemplates/uritemplates.go | 248 - .../third_party/uritemplates/utils.go | 17 - .../google.golang.org/api/internal/version.go | 8 - .../option/internaloption/internaloption.go | 317 - vendor/google.golang.org/api/option/option.go | 416 - .../api/transport/http/dial.go | 321 - .../genproto/googleapis/rpc/code/code.pb.go | 336 - .../rpc/errdetails/error_details.pb.go | 1473 - vendor/gopkg.in/ini.v1/.editorconfig | 12 - vendor/gopkg.in/ini.v1/.gitignore | 7 - vendor/gopkg.in/ini.v1/.golangci.yml | 27 - vendor/gopkg.in/ini.v1/LICENSE | 191 - vendor/gopkg.in/ini.v1/Makefile | 15 - vendor/gopkg.in/ini.v1/README.md | 43 - vendor/gopkg.in/ini.v1/codecov.yml | 16 - vendor/gopkg.in/ini.v1/data_source.go | 76 - vendor/gopkg.in/ini.v1/deprecated.go | 22 - vendor/gopkg.in/ini.v1/error.go | 49 - vendor/gopkg.in/ini.v1/file.go | 541 - vendor/gopkg.in/ini.v1/helper.go | 24 - vendor/gopkg.in/ini.v1/ini.go | 176 - vendor/gopkg.in/ini.v1/key.go | 837 - vendor/gopkg.in/ini.v1/parser.go | 520 - vendor/gopkg.in/ini.v1/section.go | 256 - vendor/gopkg.in/ini.v1/struct.go | 747 - vendor/modules.txt | 667 - 2935 files changed, 7 insertions(+), 640373 deletions(-) delete mode 100644 plugin/acl/README.md delete mode 100644 plugin/acl/acl.go delete mode 100644 plugin/acl/acl_test.go delete mode 100644 plugin/acl/metrics.go delete mode 100644 plugin/acl/setup.go delete mode 100644 plugin/acl/setup_test.go delete mode 100644 plugin/any/README.md delete mode 100644 plugin/any/any.go delete mode 100644 plugin/any/any_test.go delete mode 100644 plugin/any/setup.go delete mode 100644 plugin/any/setup_test.go delete mode 100644 plugin/auto/README.md delete mode 100644 plugin/auto/auto.go delete mode 100644 plugin/auto/auto_test.go delete mode 100644 plugin/auto/log_test.go delete mode 100644 plugin/auto/regexp.go delete mode 100644 plugin/auto/regexp_test.go delete mode 100644 plugin/auto/setup.go delete mode 100644 plugin/auto/setup_test.go delete mode 100644 plugin/auto/walk.go delete mode 100644 plugin/auto/walk_test.go delete mode 100644 plugin/auto/watcher_test.go delete mode 100644 plugin/auto/xfr.go delete mode 100644 plugin/auto/xfr_test.go delete mode 100644 plugin/auto/zone.go delete mode 100644 plugin/auto/zone_test.go delete mode 100644 plugin/autopath/README.md delete mode 100644 plugin/autopath/autopath.go delete mode 100644 plugin/autopath/autopath_test.go delete mode 100644 plugin/autopath/cname.go delete mode 100644 plugin/autopath/metrics.go delete mode 100644 plugin/autopath/setup.go delete mode 100644 plugin/autopath/setup_test.go delete mode 100644 plugin/azure/README.md delete mode 100644 plugin/azure/azure.go delete mode 100644 plugin/azure/azure_test.go delete mode 100644 plugin/azure/setup.go delete mode 100644 plugin/azure/setup_test.go delete mode 100644 plugin/bind/README.md delete mode 100644 plugin/bind/bind.go delete mode 100644 plugin/bind/log_test.go delete mode 100644 plugin/bind/setup.go delete mode 100644 plugin/bind/setup_test.go delete mode 100644 plugin/clouddns/README.md delete mode 100644 plugin/clouddns/clouddns.go delete mode 100644 plugin/clouddns/clouddns_test.go delete mode 100644 plugin/clouddns/gcp.go delete mode 100644 plugin/clouddns/log_test.go delete mode 100644 plugin/clouddns/setup.go delete mode 100644 plugin/clouddns/setup_test.go delete mode 100644 plugin/dns64/README.md delete mode 100644 plugin/dns64/dns64.go delete mode 100644 plugin/dns64/dns64_test.go delete mode 100644 plugin/dns64/metrics.go delete mode 100644 plugin/dns64/setup.go delete mode 100644 plugin/dns64/setup_test.go delete mode 100644 plugin/dnssec/README.md delete mode 100644 plugin/dnssec/black_lies.go delete mode 100644 plugin/dnssec/black_lies_bitmap_test.go delete mode 100644 plugin/dnssec/black_lies_test.go delete mode 100644 plugin/dnssec/cache.go delete mode 100644 plugin/dnssec/cache_test.go delete mode 100644 plugin/dnssec/dnskey.go delete mode 100644 plugin/dnssec/dnssec.go delete mode 100644 plugin/dnssec/dnssec_test.go delete mode 100644 plugin/dnssec/handler.go delete mode 100644 plugin/dnssec/handler_test.go delete mode 100644 plugin/dnssec/log_test.go delete mode 100644 plugin/dnssec/metrics.go delete mode 100644 plugin/dnssec/responsewriter.go delete mode 100644 plugin/dnssec/rrsig.go delete mode 100644 plugin/dnssec/setup.go delete mode 100644 plugin/dnssec/setup_test.go delete mode 100644 plugin/file/README.md delete mode 100644 plugin/file/apex_test.go delete mode 100644 plugin/file/closest.go delete mode 100644 plugin/file/closest_test.go delete mode 100644 plugin/file/delegation_test.go delete mode 100644 plugin/file/delete_test.go delete mode 100644 plugin/file/dname.go delete mode 100644 plugin/file/dname_test.go delete mode 100644 plugin/file/dnssec_test.go delete mode 100644 plugin/file/dnssex_test.go delete mode 100644 plugin/file/ds_test.go delete mode 100644 plugin/file/ent_test.go delete mode 100644 plugin/file/example_org.go delete mode 100644 plugin/file/file.go delete mode 100644 plugin/file/file_test.go delete mode 100644 plugin/file/fuzz.go delete mode 100644 plugin/file/glue_test.go delete mode 100644 plugin/file/include_test.go delete mode 100644 plugin/file/log_test.go delete mode 100644 plugin/file/lookup.go delete mode 100644 plugin/file/lookup_test.go delete mode 100644 plugin/file/notify.go delete mode 100644 plugin/file/nsec3_test.go delete mode 100644 plugin/file/reload.go delete mode 100644 plugin/file/reload_test.go delete mode 100644 plugin/file/rrutil/util.go delete mode 100644 plugin/file/secondary.go delete mode 100644 plugin/file/secondary_test.go delete mode 100644 plugin/file/setup.go delete mode 100644 plugin/file/setup_test.go delete mode 100644 plugin/file/shutdown.go delete mode 100644 plugin/file/tree/all.go delete mode 100644 plugin/file/tree/auth_walk.go delete mode 100644 plugin/file/tree/elem.go delete mode 100644 plugin/file/tree/elem_test.go delete mode 100644 plugin/file/tree/glue.go delete mode 100644 plugin/file/tree/less.go delete mode 100644 plugin/file/tree/less_test.go delete mode 100644 plugin/file/tree/print.go delete mode 100644 plugin/file/tree/print_test.go delete mode 100644 plugin/file/tree/tree.go delete mode 100644 plugin/file/tree/walk.go delete mode 100644 plugin/file/wildcard.go delete mode 100644 plugin/file/wildcard_test.go delete mode 100644 plugin/file/xfr.go delete mode 100644 plugin/file/xfr_test.go delete mode 100644 plugin/file/zone.go delete mode 100644 plugin/file/zone_test.go delete mode 100644 plugin/geoip/README.md delete mode 100644 plugin/geoip/city.go delete mode 100644 plugin/geoip/geoip.go delete mode 100644 plugin/geoip/geoip_test.go delete mode 100644 plugin/geoip/setup.go delete mode 100644 plugin/geoip/setup_test.go delete mode 100644 plugin/geoip/testdata/GeoLite2-City.mmdb delete mode 100644 plugin/geoip/testdata/GeoLite2-UnknownDbType.mmdb delete mode 100644 plugin/geoip/testdata/README.md delete mode 100644 plugin/grpc/README.md delete mode 100644 plugin/grpc/fuzz.go delete mode 100644 plugin/grpc/grpc.go delete mode 100644 plugin/grpc/grpc_test.go delete mode 100644 plugin/grpc/metrics.go delete mode 100644 plugin/grpc/policy.go delete mode 100644 plugin/grpc/policy_test.go delete mode 100644 plugin/grpc/proxy.go delete mode 100644 plugin/grpc/proxy_test.go delete mode 100644 plugin/grpc/setup.go delete mode 100644 plugin/grpc/setup_policy_test.go delete mode 100644 plugin/grpc/setup_test.go delete mode 100644 plugin/header/README.md delete mode 100644 plugin/header/handler.go delete mode 100644 plugin/header/header.go delete mode 100644 plugin/header/header_test.go delete mode 100644 plugin/header/setup.go delete mode 100644 plugin/header/setup_test.go delete mode 100644 plugin/hosts/README.md delete mode 100644 plugin/hosts/hosts.go delete mode 100644 plugin/hosts/hosts_test.go delete mode 100644 plugin/hosts/hostsfile.go delete mode 100644 plugin/hosts/hostsfile_test.go delete mode 100644 plugin/hosts/log_test.go delete mode 100644 plugin/hosts/metrics.go delete mode 100644 plugin/hosts/setup.go delete mode 100644 plugin/hosts/setup_test.go delete mode 100644 plugin/k8s_external/README.md delete mode 100644 plugin/k8s_external/apex.go delete mode 100644 plugin/k8s_external/apex_test.go delete mode 100644 plugin/k8s_external/external.go delete mode 100644 plugin/k8s_external/external_test.go delete mode 100644 plugin/k8s_external/msg_to_dns.go delete mode 100644 plugin/k8s_external/setup.go delete mode 100644 plugin/k8s_external/setup_test.go delete mode 100644 plugin/k8s_external/transfer.go delete mode 100644 plugin/k8s_external/transfer_test.go delete mode 100644 plugin/loadbalance/README.md delete mode 100644 plugin/loadbalance/handler.go delete mode 100644 plugin/loadbalance/loadbalance.go delete mode 100644 plugin/loadbalance/loadbalance_test.go delete mode 100644 plugin/loadbalance/log_test.go delete mode 100644 plugin/loadbalance/prefer.go delete mode 100644 plugin/loadbalance/prefer_test.go delete mode 100644 plugin/loadbalance/setup.go delete mode 100644 plugin/loadbalance/setup_test.go delete mode 100644 plugin/loadbalance/weighted.go delete mode 100644 plugin/loadbalance/weighted_test.go delete mode 100644 plugin/local/README.md delete mode 100644 plugin/local/local.go delete mode 100644 plugin/local/local_test.go delete mode 100644 plugin/local/metrics.go delete mode 100644 plugin/local/setup.go delete mode 100644 plugin/minimal/README.md delete mode 100644 plugin/minimal/minimal.go delete mode 100644 plugin/minimal/minimal_test.go delete mode 100644 plugin/minimal/setup.go delete mode 100644 plugin/minimal/setup_test.go delete mode 100644 plugin/multisocket/README.md delete mode 100644 plugin/multisocket/multisocket.go delete mode 100644 plugin/multisocket/multisocket_test.go delete mode 100644 plugin/nomad/README.md delete mode 100644 plugin/nomad/helpers.go delete mode 100644 plugin/nomad/metrics.go delete mode 100644 plugin/nomad/nomad.go delete mode 100644 plugin/nomad/nomad_test.go delete mode 100644 plugin/nomad/ready.go delete mode 100644 plugin/nomad/setup.go delete mode 100644 plugin/nomad/setup_test.go delete mode 100644 plugin/nsid/README.md delete mode 100644 plugin/nsid/log_test.go delete mode 100644 plugin/nsid/nsid.go delete mode 100644 plugin/nsid/nsid_test.go delete mode 100644 plugin/nsid/setup.go delete mode 100644 plugin/nsid/setup_test.go delete mode 100644 plugin/pprof/README.md delete mode 100644 plugin/pprof/log_test.go delete mode 100644 plugin/pprof/pprof.go delete mode 100644 plugin/pprof/pprof_test.go delete mode 100644 plugin/pprof/setup.go delete mode 100644 plugin/pprof/setup_test.go delete mode 100644 plugin/quic/README.md delete mode 100644 plugin/quic/setup.go delete mode 100644 plugin/quic/setup_test.go delete mode 100644 plugin/rewrite/README.md delete mode 100644 plugin/rewrite/class.go delete mode 100644 plugin/rewrite/cname_target.go delete mode 100644 plugin/rewrite/cname_target_test.go delete mode 100644 plugin/rewrite/edns0.go delete mode 100644 plugin/rewrite/fuzz.go delete mode 100644 plugin/rewrite/log_test.go delete mode 100644 plugin/rewrite/name.go delete mode 100644 plugin/rewrite/name_test.go delete mode 100644 plugin/rewrite/rcode.go delete mode 100644 plugin/rewrite/rcode_test.go delete mode 100644 plugin/rewrite/reverter.go delete mode 100644 plugin/rewrite/reverter_test.go delete mode 100644 plugin/rewrite/rewrite.go delete mode 100644 plugin/rewrite/rewrite_test.go delete mode 100644 plugin/rewrite/setup.go delete mode 100644 plugin/rewrite/setup_test.go delete mode 100644 plugin/rewrite/ttl.go delete mode 100644 plugin/rewrite/ttl_test.go delete mode 100644 plugin/rewrite/type.go delete mode 100644 plugin/rewrite/wire.go delete mode 100644 plugin/root/README.md delete mode 100644 plugin/root/log_test.go delete mode 100644 plugin/root/root.go delete mode 100644 plugin/root/root_test.go delete mode 100644 plugin/route53/README.md delete mode 100644 plugin/route53/log_test.go delete mode 100644 plugin/route53/route53.go delete mode 100644 plugin/route53/route53_test.go delete mode 100644 plugin/route53/setup.go delete mode 100644 plugin/route53/setup_test.go delete mode 100644 plugin/secondary/README.md delete mode 100644 plugin/secondary/log_test.go delete mode 100644 plugin/secondary/secondary.go delete mode 100644 plugin/secondary/setup.go delete mode 100644 plugin/secondary/setup_test.go delete mode 100644 plugin/sign/README.md delete mode 100644 plugin/sign/dnssec.go delete mode 100644 plugin/sign/file.go delete mode 100644 plugin/sign/file_test.go delete mode 100644 plugin/sign/keys.go delete mode 100644 plugin/sign/log_test.go delete mode 100644 plugin/sign/nsec.go delete mode 100644 plugin/sign/nsec_test.go delete mode 100644 plugin/sign/resign_test.go delete mode 100644 plugin/sign/setup.go delete mode 100644 plugin/sign/setup_test.go delete mode 100644 plugin/sign/sign.go delete mode 100644 plugin/sign/signer.go delete mode 100644 plugin/sign/signer_test.go delete mode 100644 plugin/sign/testdata/Kmiek.nl.+013+59725.key delete mode 100644 plugin/sign/testdata/Kmiek.nl.+013+59725.private delete mode 100644 plugin/sign/testdata/db.miek.nl delete mode 100644 plugin/sign/testdata/db.miek.nl_ns delete mode 100644 plugin/template/README.md delete mode 100644 plugin/template/cname_test.go delete mode 100644 plugin/template/log_test.go delete mode 100644 plugin/template/metrics.go delete mode 100644 plugin/template/setup.go delete mode 100644 plugin/template/setup_test.go delete mode 100644 plugin/template/template.go delete mode 100644 plugin/template/template_test.go delete mode 100644 plugin/timeouts/README.md delete mode 100644 plugin/timeouts/timeouts.go delete mode 100644 plugin/timeouts/timeouts_test.go delete mode 100644 plugin/tls/README.md delete mode 100644 plugin/tls/log_test.go delete mode 100644 plugin/tls/test_ca.pem delete mode 100644 plugin/tls/test_cert.pem delete mode 100644 plugin/tls/test_key.pem delete mode 100644 plugin/tls/tls.go delete mode 100644 plugin/tls/tls_test.go delete mode 100644 plugin/trace/README.md delete mode 100644 plugin/trace/log_test.go delete mode 100644 plugin/trace/logger.go delete mode 100644 plugin/trace/setup.go delete mode 100644 plugin/trace/setup_test.go delete mode 100644 plugin/trace/trace.go delete mode 100644 plugin/trace/trace_test.go delete mode 100644 plugin/tsig/README.md delete mode 100644 plugin/tsig/setup.go delete mode 100644 plugin/tsig/setup_test.go delete mode 100644 plugin/tsig/tsig.go delete mode 100644 plugin/tsig/tsig_test.go delete mode 100644 plugin/view/README.md delete mode 100644 plugin/view/metadata.go delete mode 100644 plugin/view/metadata_test.go delete mode 100644 plugin/view/setup.go delete mode 100644 plugin/view/setup_test.go delete mode 100644 plugin/view/view.go delete mode 100644 plugin/view/view_test.go delete mode 100644 vendor/cloud.google.com/go/auth/CHANGES.md delete mode 100644 vendor/cloud.google.com/go/auth/LICENSE delete mode 100644 vendor/cloud.google.com/go/auth/README.md delete mode 100644 vendor/cloud.google.com/go/auth/auth.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/compute.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/detect.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/doc.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/filetypes.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/aws_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/executable_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/externalaccount.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/file_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/info.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/programmatic_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/url_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/x509_provider.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/externalaccountuser/externalaccountuser.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/gdch/gdch.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/impersonate/idtoken.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/internal/stsexchange/sts_exchange.go delete mode 100644 vendor/cloud.google.com/go/auth/credentials/selfsignedjwt.go delete mode 100644 vendor/cloud.google.com/go/auth/httptransport/httptransport.go delete mode 100644 vendor/cloud.google.com/go/auth/httptransport/transport.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/credsfile/parse.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/internal.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/jwt/jwt.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/cba.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/cert/default_cert.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/cert/enterprise_cert.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/cert/secureconnect_cert.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/cert/workload_cert.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/s2a.go delete mode 100644 vendor/cloud.google.com/go/auth/internal/transport/transport.go delete mode 100644 vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md delete mode 100644 vendor/cloud.google.com/go/auth/oauth2adapt/LICENSE delete mode 100644 vendor/cloud.google.com/go/auth/oauth2adapt/oauth2adapt.go delete mode 100644 vendor/cloud.google.com/go/auth/threelegged.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/CHANGES.md delete mode 100644 vendor/cloud.google.com/go/compute/metadata/LICENSE delete mode 100644 vendor/cloud.google.com/go/compute/metadata/README.md delete mode 100644 vendor/cloud.google.com/go/compute/metadata/log.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/metadata.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/retry.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/retry_linux.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/syscheck.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/_meta.json delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/client.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/enums.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/version.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/CHANGELOG.md delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/_meta.json delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/client.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/enums.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/models.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/privatezones.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/recordsets.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/version.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/virtualnetworklinks.go delete mode 100644 vendor/github.com/Azure/azure-sdk-for-go/version/version.go delete mode 100644 vendor/github.com/Azure/go-autorest/.gitignore delete mode 100644 vendor/github.com/Azure/go-autorest/CHANGELOG.md delete mode 100644 vendor/github.com/Azure/go-autorest/GNUmakefile delete mode 100644 vendor/github.com/Azure/go-autorest/Gopkg.lock delete mode 100644 vendor/github.com/Azure/go-autorest/Gopkg.toml delete mode 100644 vendor/github.com/Azure/go-autorest/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/README.md delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/README.md delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/config.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/persist.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/sender.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/token.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/adal/version.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/authorization.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/autorest.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/async.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/auth/README.md delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/azure.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/environments.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/azure/rp.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/client.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/date.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/time.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/timerfc1123.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/unixtime.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/date/utility.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/error.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/preparer.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/responder.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/sender.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/to/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/to/convert.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/utility.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go delete mode 100644 vendor/github.com/Azure/go-autorest/autorest/version.go delete mode 100644 vendor/github.com/Azure/go-autorest/azure-pipelines.yml delete mode 100644 vendor/github.com/Azure/go-autorest/doc.go delete mode 100644 vendor/github.com/Azure/go-autorest/logger/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/logger/logger.go delete mode 100644 vendor/github.com/Azure/go-autorest/tracing/LICENSE delete mode 100644 vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go delete mode 100644 vendor/github.com/Azure/go-autorest/tracing/tracing.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/LICENSE delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/apisec/internal/config/const.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/clock.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/lru.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/table.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/apisec/sampler.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/appsec/config.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/appsec/embed.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/appsec/rules.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/appsec/rules.json delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/limiter/limiter.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/log/backend.go delete mode 100644 vendor/github.com/DataDog/appsec-internal-go/log/log.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/origindetection.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/cache.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/credit_cards.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/http.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/ip_address.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json_scanner.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/memcached.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis_tokenizer.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_gen.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_vtproto.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_bytes.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_v05.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_gen.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_utils.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_vtproto.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_gen.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_vtproto.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace_gen.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_gen.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_utils.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_vtproto.pb.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/README.md delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/agent_config.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_agent_task.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_asm.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/path.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/repository.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/tuf.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/config/client.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/log/buflogger.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/log/logger.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/log/throttled.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/catalog.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/coresampler.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/dynamic_config.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/env.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/metrics.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/prioritysampler.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/probabilistic.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/rare_sampler.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/sampler.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/scoresampler.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/signature.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/aggregation.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/client_stats_aggregator.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/concentrator.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/otel_util.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/span_concentrator.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/statsraw.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/weight.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/azure.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/doc.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/normalize.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/truncate.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/otel_util.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/processed_trace.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/span.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/trace.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/obfuscate.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/transform.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/version/version.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_aix.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_windows.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/info.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/logonpanic.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/klog_redirect.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/levels.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_limit.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_not_serverless.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_serverless.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_test_init.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/logger.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/log/wrapper.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/default.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/json_scrubber.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/scrubber.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/yaml_scrubber.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/version/LICENSE delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/version/base.go delete mode 100644 vendor/github.com/DataDog/datadog-agent/pkg/version/version.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/LICENSE.txt delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/README.md delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/aggregator.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/buffer.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/buffer_pool.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/buffered_metric_context.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/container.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/container_linux.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/container_stub.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/error_handler.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/event.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/fnv1a.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/format.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/metrics.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/noop.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/options.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/pipe.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/pipe_windows.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/sender.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/service_check.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/statsd.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/statsd_direct.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/telemetry.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/udp.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/uds.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/uds_windows.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/utils.go delete mode 100644 vendor/github.com/DataDog/datadog-go/v5/statsd/worker.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/LICENSE delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-3rdparty.csv delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-APACHE delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-BSD3 delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/NOTICE delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/appsec/events/block.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/datastreams/options/options.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ddtrace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/app_types.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/aws.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/db.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/graphql.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/log_key.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/messaging.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/peer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/priority.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/rpc.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/span_kind.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/system.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/tags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/globaltracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats/stats.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/civisibilitymocktracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/data_streams.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspan.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspancontext.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mocktracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/README.md delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/abandonedspans.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/api.txt delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_payload.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_transport.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_writer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/context.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/data_streams.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/doc.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/dynamic_config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/globaltracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/log.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/logger.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/meta_struct.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/metrics.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/noop.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/option.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/orchestrion.yml delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/otel_dd_mappings.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/payload.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagating_tags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagator.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rand.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/remote_config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rules_sampler.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sampler.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/seelog_leak_workaround.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/slog.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_link_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spancontext.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spanlink.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sqlcomment.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/stats.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/telemetry.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/textmap.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time_windows.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/transport.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/util.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/writer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/v1.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo/operation.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/README.md delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/execution.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/request.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/resolve.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec/grpc.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/http.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/roundtripper.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec/lfi.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec/sql.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/actions.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/block.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.html delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.json delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/http_redirect.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/stacktrace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/addresses.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/builder.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/rasp_rule_type.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/scope.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/service_entry_span.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/span.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/tag_setter.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace/errortrace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/options/options.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/active_span_key.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/agent.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/README.md delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/appsec.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/wafmanager.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec/user.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/context.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/metrics.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/run.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/features.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/feature.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec/graphql.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec/grpc.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/clientip.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/http.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/request.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/roundtripper.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec/lfi.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec/sql.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace/trace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec/usec.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/tags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/waf.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/remoteconfig.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_cgo.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_nocgo.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/civisibility.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/ci.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/env.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/git.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/os.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/runtime.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/span_types.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/tags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/test_tags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/ci_providers.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/codeowners.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/environmentTags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/file_environmental_data.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/git.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/home.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/names.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_count.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_distribution.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/container_linux.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/container_stub.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/fast_queue.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/hash_cache.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/pathway.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/processor.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/propagator.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/transport.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/env.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/gitmetadata.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/globalconfig/globalconfig.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/azure/azure.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch/fetcher.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2/ec2.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs/aws.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_nix.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_windows.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/gce/gce.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils/helpers.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/providers.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/validate/validate.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfile.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfilelinux.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/log/log.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/meta_internal_types.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/namingschema/namingschema.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/normalizer/normalizer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context_stack.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.orchestrion.yml delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/orchestrion.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_unix.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_windows.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/processtags/processtags.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/path.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/remoteconfig.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/types.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/samplernames/samplernames.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/api.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfig.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfigsource.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace_msgp.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/statsd.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/README.md delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/api.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client_config.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/configuration.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/dependencies.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/distributions.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/globalclient.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/integration.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metric.golang.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.common.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_closing.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_started.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/default.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/mapper.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/range.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/recorder.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ringbuffer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/syncpool.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ticker.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/tracerconfig.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_closing.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_configuration_change.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_dependencies_loaded.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_extended_heartbeat.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_heartbeat.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_integration_change.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_product_change.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_started.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/body.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/conf_key_value.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/distributions.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/error.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/generate-metrics.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/logs.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/message_batch.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/namespace.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/origin.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/payload.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/requesttype.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/writer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/log/log.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/logger.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrichandle.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrics.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/product.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_context.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_source.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/endpoint_counter.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/profiler.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/traceprof.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/tracer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/uds.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer/sanitizer.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/utils.go delete mode 100644 vendor/github.com/DataDog/dd-trace-go/v2/internal/version/version.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/.gitattributes delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/.gitignore delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/CODEOWNERS delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/LICENSE delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/README.md delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/builder.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/context.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/decoder.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/diagnostics.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/encoder.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/handle.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/ctypes.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/libddwaf.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/safe.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl_unsupported.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/.version delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/README.md delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/doc.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_darwin.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_linux.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_amd64.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_arm64.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_amd64.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_arm64.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-amd64.dylib.gz delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-arm64.dylib.gz delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-linux-amd64.so.gz delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-linux-arm64.so.gz delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/version.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/log/ddwaf.h delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_cgo.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_purego.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_unsupported.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/pin/pinner.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/.gitattributes delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/recommended.json.gz delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset_unsupported.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_cgo_disabled.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_manually_disabled.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_support.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_go.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_target.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/internal/unsafe/utils.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/json/decoder.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/result.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/base_timer.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/clock.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/component.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/config.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/node_timer.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/timer/timer.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/waf.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/waferrors/support.go delete mode 100644 vendor/github.com/DataDog/go-libddwaf/v4/waferrors/waf.go delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE-3rdparty.csv delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/NOTICE delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/histogram.go delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/runtime_metrics.go delete mode 100644 vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/tags.go delete mode 100644 vendor/github.com/DataDog/go-sqllexer/.gitignore delete mode 100644 vendor/github.com/DataDog/go-sqllexer/LICENSE delete mode 100644 vendor/github.com/DataDog/go-sqllexer/README.md delete mode 100644 vendor/github.com/DataDog/go-sqllexer/normalizer.go delete mode 100644 vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go delete mode 100644 vendor/github.com/DataDog/go-sqllexer/obfuscator.go delete mode 100644 vendor/github.com/DataDog/go-sqllexer/sqllexer.go delete mode 100644 vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go delete mode 100644 vendor/github.com/DataDog/go-tuf/LICENSE delete mode 100644 vendor/github.com/DataDog/go-tuf/client/client.go delete mode 100644 vendor/github.com/DataDog/go-tuf/client/delegations.go delete mode 100644 vendor/github.com/DataDog/go-tuf/client/errors.go delete mode 100644 vendor/github.com/DataDog/go-tuf/client/file_store.go delete mode 100644 vendor/github.com/DataDog/go-tuf/client/local_store.go delete mode 100644 vendor/github.com/DataDog/go-tuf/client/remote_store.go delete mode 100644 vendor/github.com/DataDog/go-tuf/data/hex_bytes.go delete mode 100644 vendor/github.com/DataDog/go-tuf/data/types.go delete mode 100644 vendor/github.com/DataDog/go-tuf/internal/roles/roles.go delete mode 100644 vendor/github.com/DataDog/go-tuf/internal/sets/strings.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/deprecated_ecdsa.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/ecdsa.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/ed25519.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/keys.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/pkix.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/keys/rsa.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/targets/delegation.go delete mode 100644 vendor/github.com/DataDog/go-tuf/pkg/targets/hash_bins.go delete mode 100644 vendor/github.com/DataDog/go-tuf/util/util.go delete mode 100644 vendor/github.com/DataDog/go-tuf/verify/db.go delete mode 100644 vendor/github.com/DataDog/go-tuf/verify/errors.go delete mode 100644 vendor/github.com/DataDog/go-tuf/verify/verify.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/LICENSE delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/attributes.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure/azure.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2/ec2.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gateway_usage.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp/gcp.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/process.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source/source_provider.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/system.go delete mode 100644 vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/translator.go delete mode 100644 vendor/github.com/DataDog/sketches-go/LICENSE delete mode 100644 vendor/github.com/DataDog/sketches-go/LICENSE-3rdparty.csv delete mode 100644 vendor/github.com/DataDog/sketches-go/NOTICE delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/ddsketch.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/encoding/encoding.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/encoding/flag.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/mapping/bit_operation_helper.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/mapping/cubically_interpolated_mapping.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/mapping/index_mapping.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/mapping/linearly_interpolated_mapping.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/mapping/logarithmic_mapping.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.pb.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.proto_builder.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/stat/summary.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/bin.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/buffered_paginated.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_highest_dense_store.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_lowest_dense_store.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/dense_store.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/sparse.go delete mode 100644 vendor/github.com/DataDog/sketches-go/ddsketch/store/store.go delete mode 100644 vendor/github.com/Masterminds/semver/v3/.gitignore delete mode 100644 vendor/github.com/Masterminds/semver/v3/.golangci.yml delete mode 100644 vendor/github.com/Masterminds/semver/v3/CHANGELOG.md delete mode 100644 vendor/github.com/Masterminds/semver/v3/LICENSE.txt delete mode 100644 vendor/github.com/Masterminds/semver/v3/Makefile delete mode 100644 vendor/github.com/Masterminds/semver/v3/README.md delete mode 100644 vendor/github.com/Masterminds/semver/v3/SECURITY.md delete mode 100644 vendor/github.com/Masterminds/semver/v3/collection.go delete mode 100644 vendor/github.com/Masterminds/semver/v3/constraints.go delete mode 100644 vendor/github.com/Masterminds/semver/v3/doc.go delete mode 100644 vendor/github.com/Masterminds/semver/v3/version.go delete mode 100644 vendor/github.com/Microsoft/go-winio/.gitattributes delete mode 100644 vendor/github.com/Microsoft/go-winio/.gitignore delete mode 100644 vendor/github.com/Microsoft/go-winio/.golangci.yml delete mode 100644 vendor/github.com/Microsoft/go-winio/CODEOWNERS delete mode 100644 vendor/github.com/Microsoft/go-winio/LICENSE delete mode 100644 vendor/github.com/Microsoft/go-winio/README.md delete mode 100644 vendor/github.com/Microsoft/go-winio/SECURITY.md delete mode 100644 vendor/github.com/Microsoft/go-winio/backup.go delete mode 100644 vendor/github.com/Microsoft/go-winio/doc.go delete mode 100644 vendor/github.com/Microsoft/go-winio/ea.go delete mode 100644 vendor/github.com/Microsoft/go-winio/file.go delete mode 100644 vendor/github.com/Microsoft/go-winio/fileinfo.go delete mode 100644 vendor/github.com/Microsoft/go-winio/hvsock.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/fs/doc.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/fs/fs.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/fs/security.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/socket/socket.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go delete mode 100644 vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go delete mode 100644 vendor/github.com/Microsoft/go-winio/pipe.go delete mode 100644 vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go delete mode 100644 vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go delete mode 100644 vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go delete mode 100644 vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go delete mode 100644 vendor/github.com/Microsoft/go-winio/privilege.go delete mode 100644 vendor/github.com/Microsoft/go-winio/reparse.go delete mode 100644 vendor/github.com/Microsoft/go-winio/sd.go delete mode 100644 vendor/github.com/Microsoft/go-winio/syscall.go delete mode 100644 vendor/github.com/Microsoft/go-winio/zsyscall_windows.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/context.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/request.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/aws/version.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/auth_scheme_preference.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/generate.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/local.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_BatchGetSecretValue.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetRandomPassword.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetSecretValue.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecrets.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutSecretValue.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RemoveRegionsFromReplication.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ReplicateSecretToRegions.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RestoreSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RotateSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_TagResource.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UntagResource.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecret.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecretVersionStage.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ValidateResourcePolicy.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/deserializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/serializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/enums.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go delete mode 100644 vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go delete mode 100644 vendor/github.com/aws/smithy-go/.gitignore delete mode 100644 vendor/github.com/aws/smithy-go/.travis.yml delete mode 100644 vendor/github.com/aws/smithy-go/CHANGELOG.md delete mode 100644 vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/aws/smithy-go/CONTRIBUTING.md delete mode 100644 vendor/github.com/aws/smithy-go/LICENSE delete mode 100644 vendor/github.com/aws/smithy-go/Makefile delete mode 100644 vendor/github.com/aws/smithy-go/NOTICE delete mode 100644 vendor/github.com/aws/smithy-go/README.md delete mode 100644 vendor/github.com/aws/smithy-go/auth/auth.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/bearer/docs.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/bearer/middleware.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/bearer/token.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/identity.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/option.go delete mode 100644 vendor/github.com/aws/smithy-go/auth/scheme_id.go delete mode 100644 vendor/github.com/aws/smithy-go/changelog-template.json delete mode 100644 vendor/github.com/aws/smithy-go/context/suppress_expired.go delete mode 100644 vendor/github.com/aws/smithy-go/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/document.go delete mode 100644 vendor/github.com/aws/smithy-go/document/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/document/document.go delete mode 100644 vendor/github.com/aws/smithy-go/document/errors.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/encoding.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/array.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/constants.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/encoder.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/escape.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/object.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/json/value.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/array.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/constants.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/element.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/encoder.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/escape.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/map.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/value.go delete mode 100644 vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go delete mode 100644 vendor/github.com/aws/smithy-go/endpoints/endpoint.go delete mode 100644 vendor/github.com/aws/smithy-go/errors.go delete mode 100644 vendor/github.com/aws/smithy-go/go_module_metadata.go delete mode 100644 vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE delete mode 100644 vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go delete mode 100644 vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go delete mode 100644 vendor/github.com/aws/smithy-go/io/byte.go delete mode 100644 vendor/github.com/aws/smithy-go/io/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/io/reader.go delete mode 100644 vendor/github.com/aws/smithy-go/io/ringbuffer.go delete mode 100644 vendor/github.com/aws/smithy-go/local-mod-replace.sh delete mode 100644 vendor/github.com/aws/smithy-go/logging/logger.go delete mode 100644 vendor/github.com/aws/smithy-go/metrics/metrics.go delete mode 100644 vendor/github.com/aws/smithy-go/metrics/nop.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/context.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/logging.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/metadata.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/middleware.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/ordered_group.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/stack.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/stack_values.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/step_build.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/step_deserialize.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/step_finalize.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/step_initialize.go delete mode 100644 vendor/github.com/aws/smithy-go/middleware/step_serialize.go delete mode 100644 vendor/github.com/aws/smithy-go/modman.toml delete mode 100644 vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go delete mode 100644 vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go delete mode 100644 vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go delete mode 100644 vendor/github.com/aws/smithy-go/properties.go delete mode 100644 vendor/github.com/aws/smithy-go/ptr/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/ptr/from_ptr.go delete mode 100644 vendor/github.com/aws/smithy-go/ptr/gen_scalars.go delete mode 100644 vendor/github.com/aws/smithy-go/ptr/to_ptr.go delete mode 100644 vendor/github.com/aws/smithy-go/rand/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/rand/rand.go delete mode 100644 vendor/github.com/aws/smithy-go/rand/uuid.go delete mode 100644 vendor/github.com/aws/smithy-go/time/time.go delete mode 100644 vendor/github.com/aws/smithy-go/tracing/context.go delete mode 100644 vendor/github.com/aws/smithy-go/tracing/nop.go delete mode 100644 vendor/github.com/aws/smithy-go/tracing/tracing.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/auth.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/client.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/doc.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/headerlist.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/host.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/interceptor.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/metrics.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/properties.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/request.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/response.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/time.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/url.go delete mode 100644 vendor/github.com/aws/smithy-go/transport/http/user_agent.go delete mode 100644 vendor/github.com/aws/smithy-go/validation.go delete mode 100644 vendor/github.com/aws/smithy-go/waiter/logger.go delete mode 100644 vendor/github.com/aws/smithy-go/waiter/waiter.go delete mode 100644 vendor/github.com/cihub/seelog/LICENSE.txt delete mode 100644 vendor/github.com/cihub/seelog/README.markdown delete mode 100644 vendor/github.com/cihub/seelog/archive/archive.go delete mode 100644 vendor/github.com/cihub/seelog/archive/gzip/gzip.go delete mode 100644 vendor/github.com/cihub/seelog/archive/tar/tar.go delete mode 100644 vendor/github.com/cihub/seelog/archive/zip/zip.go delete mode 100644 vendor/github.com/cihub/seelog/behavior_adaptivelogger.go delete mode 100644 vendor/github.com/cihub/seelog/behavior_asynclogger.go delete mode 100644 vendor/github.com/cihub/seelog/behavior_asynclooplogger.go delete mode 100644 vendor/github.com/cihub/seelog/behavior_asynctimerlogger.go delete mode 100644 vendor/github.com/cihub/seelog/behavior_synclogger.go delete mode 100644 vendor/github.com/cihub/seelog/cfg_config.go delete mode 100644 vendor/github.com/cihub/seelog/cfg_errors.go delete mode 100644 vendor/github.com/cihub/seelog/cfg_logconfig.go delete mode 100644 vendor/github.com/cihub/seelog/cfg_parser.go delete mode 100644 vendor/github.com/cihub/seelog/common_closer.go delete mode 100644 vendor/github.com/cihub/seelog/common_constraints.go delete mode 100644 vendor/github.com/cihub/seelog/common_context.go delete mode 100644 vendor/github.com/cihub/seelog/common_exception.go delete mode 100644 vendor/github.com/cihub/seelog/common_flusher.go delete mode 100644 vendor/github.com/cihub/seelog/common_loglevel.go delete mode 100644 vendor/github.com/cihub/seelog/dispatch_custom.go delete mode 100644 vendor/github.com/cihub/seelog/dispatch_dispatcher.go delete mode 100644 vendor/github.com/cihub/seelog/dispatch_filterdispatcher.go delete mode 100644 vendor/github.com/cihub/seelog/dispatch_splitdispatcher.go delete mode 100644 vendor/github.com/cihub/seelog/doc.go delete mode 100644 vendor/github.com/cihub/seelog/format.go delete mode 100644 vendor/github.com/cihub/seelog/internals_baseerror.go delete mode 100644 vendor/github.com/cihub/seelog/internals_fsutils.go delete mode 100644 vendor/github.com/cihub/seelog/internals_xmlnode.go delete mode 100644 vendor/github.com/cihub/seelog/log.go delete mode 100644 vendor/github.com/cihub/seelog/logger.go delete mode 100644 vendor/github.com/cihub/seelog/writers_bufferedwriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_connwriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_consolewriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_filewriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_formattedwriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_rollingfilewriter.go delete mode 100644 vendor/github.com/cihub/seelog/writers_smtpwriter.go delete mode 100644 vendor/github.com/coredns/caddy/onevent/hook/config.go delete mode 100644 vendor/github.com/coredns/caddy/onevent/hook/hook.go delete mode 100644 vendor/github.com/coredns/caddy/onevent/on.go delete mode 100644 vendor/github.com/dimchansky/utfbom/.gitignore delete mode 100644 vendor/github.com/dimchansky/utfbom/.travis.yml delete mode 100644 vendor/github.com/dimchansky/utfbom/LICENSE delete mode 100644 vendor/github.com/dimchansky/utfbom/README.md delete mode 100644 vendor/github.com/dimchansky/utfbom/utfbom.go delete mode 100644 vendor/github.com/dustin/go-humanize/.travis.yml delete mode 100644 vendor/github.com/dustin/go-humanize/LICENSE delete mode 100644 vendor/github.com/dustin/go-humanize/README.markdown delete mode 100644 vendor/github.com/dustin/go-humanize/big.go delete mode 100644 vendor/github.com/dustin/go-humanize/bigbytes.go delete mode 100644 vendor/github.com/dustin/go-humanize/bytes.go delete mode 100644 vendor/github.com/dustin/go-humanize/comma.go delete mode 100644 vendor/github.com/dustin/go-humanize/commaf.go delete mode 100644 vendor/github.com/dustin/go-humanize/ftoa.go delete mode 100644 vendor/github.com/dustin/go-humanize/humanize.go delete mode 100644 vendor/github.com/dustin/go-humanize/number.go delete mode 100644 vendor/github.com/dustin/go-humanize/ordinals.go delete mode 100644 vendor/github.com/dustin/go-humanize/si.go delete mode 100644 vendor/github.com/dustin/go-humanize/times.go delete mode 100644 vendor/github.com/eapache/queue/v2/LICENSE delete mode 100644 vendor/github.com/eapache/queue/v2/queue.go delete mode 100644 vendor/github.com/ebitengine/purego/.gitignore delete mode 100644 vendor/github.com/ebitengine/purego/LICENSE delete mode 100644 vendor/github.com/ebitengine/purego/README.md delete mode 100644 vendor/github.com/ebitengine/purego/abi_amd64.h delete mode 100644 vendor/github.com/ebitengine/purego/abi_arm64.h delete mode 100644 vendor/github.com/ebitengine/purego/cgo.go delete mode 100644 vendor/github.com/ebitengine/purego/dlerror.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_android.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_darwin.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_freebsd.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_linux.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_nocgo_freebsd.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_nocgo_linux.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_playground.go delete mode 100644 vendor/github.com/ebitengine/purego/dlfcn_stubs.s delete mode 100644 vendor/github.com/ebitengine/purego/func.go delete mode 100644 vendor/github.com/ebitengine/purego/go_runtime.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/empty.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s delete mode 100644 vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s delete mode 100644 vendor/github.com/ebitengine/purego/internal/strings/strings.go delete mode 100644 vendor/github.com/ebitengine/purego/is_ios.go delete mode 100644 vendor/github.com/ebitengine/purego/nocgo.go delete mode 100644 vendor/github.com/ebitengine/purego/struct_amd64.go delete mode 100644 vendor/github.com/ebitengine/purego/struct_arm64.go delete mode 100644 vendor/github.com/ebitengine/purego/struct_other.go delete mode 100644 vendor/github.com/ebitengine/purego/sys_amd64.s delete mode 100644 vendor/github.com/ebitengine/purego/sys_arm64.s delete mode 100644 vendor/github.com/ebitengine/purego/sys_unix_arm64.s delete mode 100644 vendor/github.com/ebitengine/purego/syscall.go delete mode 100644 vendor/github.com/ebitengine/purego/syscall_cgo_linux.go delete mode 100644 vendor/github.com/ebitengine/purego/syscall_sysv.go delete mode 100644 vendor/github.com/ebitengine/purego/syscall_windows.go delete mode 100644 vendor/github.com/ebitengine/purego/zcallback_amd64.s delete mode 100644 vendor/github.com/ebitengine/purego/zcallback_arm64.s delete mode 100644 vendor/github.com/expr-lang/expr/.gitattributes delete mode 100644 vendor/github.com/expr-lang/expr/.gitignore delete mode 100644 vendor/github.com/expr-lang/expr/LICENSE delete mode 100644 vendor/github.com/expr-lang/expr/README.md delete mode 100644 vendor/github.com/expr-lang/expr/SECURITY.md delete mode 100644 vendor/github.com/expr-lang/expr/ast/dump.go delete mode 100644 vendor/github.com/expr-lang/expr/ast/find.go delete mode 100644 vendor/github.com/expr-lang/expr/ast/node.go delete mode 100644 vendor/github.com/expr-lang/expr/ast/print.go delete mode 100644 vendor/github.com/expr-lang/expr/ast/visitor.go delete mode 100644 vendor/github.com/expr-lang/expr/builtin/builtin.go delete mode 100644 vendor/github.com/expr-lang/expr/builtin/function.go delete mode 100644 vendor/github.com/expr-lang/expr/builtin/lib.go delete mode 100644 vendor/github.com/expr-lang/expr/builtin/utils.go delete mode 100644 vendor/github.com/expr-lang/expr/builtin/validation.go delete mode 100644 vendor/github.com/expr-lang/expr/checker/checker.go delete mode 100644 vendor/github.com/expr-lang/expr/checker/info.go delete mode 100644 vendor/github.com/expr-lang/expr/checker/nature/nature.go delete mode 100644 vendor/github.com/expr-lang/expr/checker/nature/utils.go delete mode 100644 vendor/github.com/expr-lang/expr/compiler/compiler.go delete mode 100644 vendor/github.com/expr-lang/expr/conf/config.go delete mode 100644 vendor/github.com/expr-lang/expr/conf/env.go delete mode 100644 vendor/github.com/expr-lang/expr/expr.go delete mode 100644 vendor/github.com/expr-lang/expr/file/error.go delete mode 100644 vendor/github.com/expr-lang/expr/file/location.go delete mode 100644 vendor/github.com/expr-lang/expr/file/source.go delete mode 100644 vendor/github.com/expr-lang/expr/internal/deref/deref.go delete mode 100644 vendor/github.com/expr-lang/expr/internal/ring/ring.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/const_expr.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/filter_first.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/filter_last.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/filter_len.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/filter_map.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/fold.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/in_array.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/in_range.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/optimizer.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/predicate_combination.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/sum_array.go delete mode 100644 vendor/github.com/expr-lang/expr/optimizer/sum_map.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/lexer/lexer.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/lexer/state.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/lexer/token.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/lexer/utils.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/operator/operator.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/parser.go delete mode 100644 vendor/github.com/expr-lang/expr/parser/utils/utils.go delete mode 100644 vendor/github.com/expr-lang/expr/patcher/operator_override.go delete mode 100644 vendor/github.com/expr-lang/expr/patcher/with_context.go delete mode 100644 vendor/github.com/expr-lang/expr/patcher/with_timezone.go delete mode 100644 vendor/github.com/expr-lang/expr/types/types.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/debug.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/debug_off.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/func_types[generated].go delete mode 100644 vendor/github.com/expr-lang/expr/vm/opcodes.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/program.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/runtime/helpers[generated].go delete mode 100644 vendor/github.com/expr-lang/expr/vm/runtime/runtime.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/runtime/sort.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/utils.go delete mode 100644 vendor/github.com/expr-lang/expr/vm/vm.go delete mode 100644 vendor/github.com/felixge/httpsnoop/.gitignore delete mode 100644 vendor/github.com/felixge/httpsnoop/LICENSE.txt delete mode 100644 vendor/github.com/felixge/httpsnoop/Makefile delete mode 100644 vendor/github.com/felixge/httpsnoop/README.md delete mode 100644 vendor/github.com/felixge/httpsnoop/capture_metrics.go delete mode 100644 vendor/github.com/felixge/httpsnoop/docs.go delete mode 100644 vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go delete mode 100644 vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go delete mode 100644 vendor/github.com/go-logr/logr/funcr/funcr.go delete mode 100644 vendor/github.com/go-logr/logr/funcr/slogsink.go delete mode 100644 vendor/github.com/go-logr/stdr/LICENSE delete mode 100644 vendor/github.com/go-logr/stdr/README.md delete mode 100644 vendor/github.com/go-logr/stdr/stdr.go delete mode 100644 vendor/github.com/go-ole/go-ole/.travis.yml delete mode 100644 vendor/github.com/go-ole/go-ole/ChangeLog.md delete mode 100644 vendor/github.com/go-ole/go-ole/LICENSE delete mode 100644 vendor/github.com/go-ole/go-ole/README.md delete mode 100644 vendor/github.com/go-ole/go-ole/SECURITY.md delete mode 100644 vendor/github.com/go-ole/go-ole/appveyor.yml delete mode 100644 vendor/github.com/go-ole/go-ole/com.go delete mode 100644 vendor/github.com/go-ole/go-ole/com_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/connect.go delete mode 100644 vendor/github.com/go-ole/go-ole/constants.go delete mode 100644 vendor/github.com/go-ole/go-ole/error.go delete mode 100644 vendor/github.com/go-ole/go-ole/error_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/error_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/guid.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/idispatch_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/ienumvariant_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iinspectable_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/itypeinfo_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/iunknown_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/ole.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/go-get.go delete mode 100644 vendor/github.com/go-ole/go-ole/oleutil/oleutil.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray_func.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearray_windows.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearrayconversion.go delete mode 100644 vendor/github.com/go-ole/go-ole/safearrayslices.go delete mode 100644 vendor/github.com/go-ole/go-ole/utility.go delete mode 100644 vendor/github.com/go-ole/go-ole/variables.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_386.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_amd64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_arm.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_arm64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_386.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_amd64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_date_arm64.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_ppc64le.go delete mode 100644 vendor/github.com/go-ole/go-ole/variant_s390x.go delete mode 100644 vendor/github.com/go-ole/go-ole/vt_string.go delete mode 100644 vendor/github.com/go-ole/go-ole/winrt.go delete mode 100644 vendor/github.com/go-ole/go-ole/winrt_doc.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/.editorconfig delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/.envrc delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/.gitignore delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/.golangci.yaml delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/CHANGELOG.md delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/LICENSE delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/README.md delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/errors.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/flake.lock delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/flake.nix delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/errors.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/join.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/internal/errors/join_go1_19.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/mapstructure.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/reflect_go1_19.go delete mode 100644 vendor/github.com/go-viper/mapstructure/v2/reflect_go1_20.go delete mode 100644 vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/any.go delete mode 100644 vendor/github.com/gogo/protobuf/types/any.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/api.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/doc.go delete mode 100644 vendor/github.com/gogo/protobuf/types/duration.go delete mode 100644 vendor/github.com/gogo/protobuf/types/duration.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/duration_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/types/empty.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/field_mask.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/protosize.go delete mode 100644 vendor/github.com/gogo/protobuf/types/source_context.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/struct.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/timestamp.go delete mode 100644 vendor/github.com/gogo/protobuf/types/timestamp.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/timestamp_gogo.go delete mode 100644 vendor/github.com/gogo/protobuf/types/type.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/wrappers.pb.go delete mode 100644 vendor/github.com/gogo/protobuf/types/wrappers_gogo.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/.gitignore delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/LICENSE delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/README.md delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/SECURITY.md delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/claims.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/doc.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ecdsa.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ed25519.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/errors.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/hmac.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/map_claims.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/none.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/parser.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/parser_option.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/signing_method.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/token.go delete mode 100644 vendor/github.com/golang-jwt/jwt/v4/types.go delete mode 100644 vendor/github.com/google/s2a-go/.gitignore delete mode 100644 vendor/github.com/google/s2a-go/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/google/s2a-go/CONTRIBUTING.md delete mode 100644 vendor/github.com/google/s2a-go/LICENSE.md delete mode 100644 vendor/github.com/google/s2a-go/README.md delete mode 100644 vendor/github.com/google/s2a-go/fallback/s2a_fallback.go delete mode 100644 vendor/github.com/google/s2a-go/internal/authinfo/authinfo.go delete mode 100644 vendor/github.com/google/s2a-go/internal/handshaker/handshaker.go delete mode 100644 vendor/github.com/google/s2a-go/internal/handshaker/service/service.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/common_go_proto/common.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/s2a_context_go_proto/s2a_context.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a_grpc.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/v2/common_go_proto/common.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto/s2a_context.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a_grpc.pb.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aeadcrypter.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aesgcm.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/chachapoly.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/common.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/halfconn/ciphersuite.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/halfconn/counter.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/halfconn/expander.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/internal/halfconn/halfconn.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/record.go delete mode 100644 vendor/github.com/google/s2a-go/internal/record/ticketsender.go delete mode 100644 vendor/github.com/google/s2a-go/internal/tokenmanager/tokenmanager.go delete mode 100644 vendor/github.com/google/s2a-go/internal/v2/README.md delete mode 100644 vendor/github.com/google/s2a-go/internal/v2/certverifier/certverifier.go delete mode 100644 vendor/github.com/google/s2a-go/internal/v2/remotesigner/remotesigner.go delete mode 100644 vendor/github.com/google/s2a-go/internal/v2/s2av2.go delete mode 100644 vendor/github.com/google/s2a-go/internal/v2/tlsconfigstore/tlsconfigstore.go delete mode 100644 vendor/github.com/google/s2a-go/retry/retry.go delete mode 100644 vendor/github.com/google/s2a-go/s2a.go delete mode 100644 vendor/github.com/google/s2a-go/s2a_options.go delete mode 100644 vendor/github.com/google/s2a-go/s2a_utils.go delete mode 100644 vendor/github.com/google/s2a-go/stream/s2a_stream.go delete mode 100644 vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE delete mode 100644 vendor/github.com/googleapis/enterprise-certificate-proxy/client/client.go delete mode 100644 vendor/github.com/googleapis/enterprise-certificate-proxy/client/util/util.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json delete mode 100644 vendor/github.com/googleapis/gax-go/v2/CHANGES.md delete mode 100644 vendor/github.com/googleapis/gax-go/v2/LICENSE delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/README.md delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.pb.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.proto delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.pb.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.proto delete mode 100644 vendor/github.com/googleapis/gax-go/v2/call_option.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/content_type.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/gax.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/header.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/internal/version.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/internallog/internal/internal.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/internallog/internallog.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/invoke.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/proto_json_stream.go delete mode 100644 vendor/github.com/googleapis/gax-go/v2/release-please-config.json delete mode 100644 vendor/github.com/gorilla/websocket/.gitignore delete mode 100644 vendor/github.com/gorilla/websocket/AUTHORS delete mode 100644 vendor/github.com/gorilla/websocket/LICENSE delete mode 100644 vendor/github.com/gorilla/websocket/README.md delete mode 100644 vendor/github.com/gorilla/websocket/client.go delete mode 100644 vendor/github.com/gorilla/websocket/compression.go delete mode 100644 vendor/github.com/gorilla/websocket/conn.go delete mode 100644 vendor/github.com/gorilla/websocket/doc.go delete mode 100644 vendor/github.com/gorilla/websocket/join.go delete mode 100644 vendor/github.com/gorilla/websocket/json.go delete mode 100644 vendor/github.com/gorilla/websocket/mask.go delete mode 100644 vendor/github.com/gorilla/websocket/mask_safe.go delete mode 100644 vendor/github.com/gorilla/websocket/prepared.go delete mode 100644 vendor/github.com/gorilla/websocket/proxy.go delete mode 100644 vendor/github.com/gorilla/websocket/server.go delete mode 100644 vendor/github.com/gorilla/websocket/util.go delete mode 100644 vendor/github.com/hashicorp/cronexpr/APLv2 delete mode 100644 vendor/github.com/hashicorp/cronexpr/CODEOWNERS delete mode 100644 vendor/github.com/hashicorp/cronexpr/GPLv3 delete mode 100644 vendor/github.com/hashicorp/cronexpr/LICENSE delete mode 100644 vendor/github.com/hashicorp/cronexpr/README.md delete mode 100644 vendor/github.com/hashicorp/cronexpr/cronexpr.go delete mode 100644 vendor/github.com/hashicorp/cronexpr/cronexpr_next.go delete mode 100644 vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go delete mode 100644 vendor/github.com/hashicorp/errwrap/LICENSE delete mode 100644 vendor/github.com/hashicorp/errwrap/README.md delete mode 100644 vendor/github.com/hashicorp/errwrap/errwrap.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/README.md delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/doc.go delete mode 100644 vendor/github.com/hashicorp/go-cleanhttp/handlers.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-multierror/Makefile delete mode 100644 vendor/github.com/hashicorp/go-multierror/README.md delete mode 100644 vendor/github.com/hashicorp/go-multierror/append.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/flatten.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/format.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/group.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/multierror.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/prefix.go delete mode 100644 vendor/github.com/hashicorp/go-multierror/sort.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/.travis.yml delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/Makefile delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/README.md delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/doc.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go delete mode 100644 vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go delete mode 100644 vendor/github.com/hashicorp/go-version/CHANGELOG.md delete mode 100644 vendor/github.com/hashicorp/go-version/LICENSE delete mode 100644 vendor/github.com/hashicorp/go-version/README.md delete mode 100644 vendor/github.com/hashicorp/go-version/constraint.go delete mode 100644 vendor/github.com/hashicorp/go-version/version.go delete mode 100644 vendor/github.com/hashicorp/go-version/version_collection.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/.copywrite.hcl delete mode 100644 vendor/github.com/hashicorp/nomad/api/LICENSE delete mode 100644 vendor/github.com/hashicorp/nomad/api/acl.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/agent.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/allocations.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/allocations_exec.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/api.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/constraint.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/consul.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/contexts/contexts.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/csi.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/deployments.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/error_unexpected_response.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/evaluations.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/event_stream.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/fs.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/host_volume_claims.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/host_volumes.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/ioutil.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/jobs.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/keyring.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/locks.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/namespace.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/node_meta.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/node_pools.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/nodes.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/operator.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/operator_autopilot.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/operator_metrics.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/quota.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/raw.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/recommendations.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/regions.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/resources.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/retry.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/scaling.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/search.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/sentinel.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/services.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/status.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/system.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/task_sched.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/tasks.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/utils.go delete mode 100644 vendor/github.com/hashicorp/nomad/api/variables.go delete mode 100644 vendor/github.com/infobloxopen/go-trees/LICENSE delete mode 100644 vendor/github.com/infobloxopen/go-trees/iptree/iptree.go delete mode 100644 vendor/github.com/infobloxopen/go-trees/numtree/node32.go delete mode 100644 vendor/github.com/infobloxopen/go-trees/numtree/node64.go delete mode 100644 vendor/github.com/lufia/plan9stats/.gitignore delete mode 100644 vendor/github.com/lufia/plan9stats/LICENSE delete mode 100644 vendor/github.com/lufia/plan9stats/README.md delete mode 100644 vendor/github.com/lufia/plan9stats/cpu.go delete mode 100644 vendor/github.com/lufia/plan9stats/disk.go delete mode 100644 vendor/github.com/lufia/plan9stats/doc.go delete mode 100644 vendor/github.com/lufia/plan9stats/host.go delete mode 100644 vendor/github.com/lufia/plan9stats/int.go delete mode 100644 vendor/github.com/lufia/plan9stats/opts.go delete mode 100644 vendor/github.com/lufia/plan9stats/stats.go delete mode 100644 vendor/github.com/mitchellh/go-homedir/LICENSE delete mode 100644 vendor/github.com/mitchellh/go-homedir/README.md delete mode 100644 vendor/github.com/mitchellh/go-homedir/homedir.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/CHANGELOG.md delete mode 100644 vendor/github.com/mitchellh/mapstructure/LICENSE delete mode 100644 vendor/github.com/mitchellh/mapstructure/README.md delete mode 100644 vendor/github.com/mitchellh/mapstructure/decode_hooks.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/error.go delete mode 100644 vendor/github.com/mitchellh/mapstructure/mapstructure.go delete mode 100644 vendor/github.com/opentracing-contrib/go-observer/.gitignore delete mode 100644 vendor/github.com/opentracing-contrib/go-observer/LICENSE delete mode 100644 vendor/github.com/opentracing-contrib/go-observer/README.md delete mode 100644 vendor/github.com/opentracing-contrib/go-observer/observer.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/mocktracer/mocklogrecord.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/mocktracer/mockspan.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/mocktracer/mocktracer.go delete mode 100644 vendor/github.com/opentracing/opentracing-go/mocktracer/propagation.go delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.golangci.yml delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.travis.yml delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/LICENSE delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/Makefile delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/README.md delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/appveyor.yml delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/circle.yml delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/context.go delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/propagation.go delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/span.go delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer.go delete mode 100644 vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer_options.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/.gitattributes delete mode 100644 vendor/github.com/openzipkin/zipkin-go/.gitignore delete mode 100644 vendor/github.com/openzipkin/zipkin-go/.golangci.yml delete mode 100644 vendor/github.com/openzipkin/zipkin-go/LICENSE delete mode 100644 vendor/github.com/openzipkin/zipkin-go/Makefile delete mode 100644 vendor/github.com/openzipkin/zipkin-go/README.md delete mode 100644 vendor/github.com/openzipkin/zipkin-go/SECURITY.md delete mode 100644 vendor/github.com/openzipkin/zipkin-go/context.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/doc.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/endpoint.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/idgenerator/idgenerator.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/annotation.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/doc.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/endpoint.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/kind.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/span.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/span_id.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/model/traceid.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/noop.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/doc.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/grpc.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/http.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/map.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/shared.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/b3/spancontext.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/propagation/propagation.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/reporter/http/http.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/reporter/reporter.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/reporter/serializer.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/sample.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/span.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/span_implementation.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/span_options.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/tags.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/tracer.go delete mode 100644 vendor/github.com/openzipkin/zipkin-go/tracer_options.go delete mode 100644 vendor/github.com/oschwald/geoip2-golang/.gitignore delete mode 100644 vendor/github.com/oschwald/geoip2-golang/.gitmodules delete mode 100644 vendor/github.com/oschwald/geoip2-golang/.golangci.yml delete mode 100644 vendor/github.com/oschwald/geoip2-golang/LICENSE delete mode 100644 vendor/github.com/oschwald/geoip2-golang/README.md delete mode 100644 vendor/github.com/oschwald/geoip2-golang/reader.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/.gitignore delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/.gitmodules delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/.golangci.toml delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/LICENSE delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/README.md delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/decoder.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/deserializer.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/errors.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/mmap_windows.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/node.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/reader.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/reader_memory.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/reader_mmap.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/set_zero_120.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/set_zero_pre120.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/traverse.go delete mode 100644 vendor/github.com/oschwald/maxminddb-golang/verifier.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/.deepsource.toml delete mode 100644 vendor/github.com/outcaste-io/ristretto/.mailmap delete mode 100644 vendor/github.com/outcaste-io/ristretto/CHANGELOG.md delete mode 100644 vendor/github.com/outcaste-io/ristretto/LICENSE delete mode 100644 vendor/github.com/outcaste-io/ristretto/README.md delete mode 100644 vendor/github.com/outcaste-io/ristretto/cache.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/metrics.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/policy.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/ring.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/sketch.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/store.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/test.sh delete mode 100644 vendor/github.com/outcaste-io/ristretto/ttl.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/LICENSE delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/README.md delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/allocator.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/bbloom.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/btree.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/buffer.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/calloc.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/calloc_32bit.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/calloc_64bit.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/calloc_jemalloc.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/calloc_nojemalloc.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/file.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/file_default.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/file_linux.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/flags.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/histogram.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_darwin.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_linux.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_plan9.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_unix.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_wasip1.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/mmap_windows.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/rtutil.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/rtutil.s delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/simd/baseline.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/simd/search.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/simd/search_amd64.s delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/simd/stub_search_amd64.go delete mode 100644 vendor/github.com/outcaste-io/ristretto/z/z.go delete mode 100644 vendor/github.com/philhofer/fwd/LICENSE.md delete mode 100644 vendor/github.com/philhofer/fwd/README.md delete mode 100644 vendor/github.com/philhofer/fwd/reader.go delete mode 100644 vendor/github.com/philhofer/fwd/writer.go delete mode 100644 vendor/github.com/philhofer/fwd/writer_appengine.go delete mode 100644 vendor/github.com/philhofer/fwd/writer_tinygo.go delete mode 100644 vendor/github.com/philhofer/fwd/writer_unsafe.go delete mode 100644 vendor/github.com/planetscale/vtprotobuf/LICENSE delete mode 100644 vendor/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go delete mode 100644 vendor/github.com/power-devops/perfstat/LICENSE delete mode 100644 vendor/github.com/power-devops/perfstat/c_helpers.c delete mode 100644 vendor/github.com/power-devops/perfstat/c_helpers.h delete mode 100644 vendor/github.com/power-devops/perfstat/config.go delete mode 100644 vendor/github.com/power-devops/perfstat/cpustat.go delete mode 100644 vendor/github.com/power-devops/perfstat/diskstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/doc.go delete mode 100644 vendor/github.com/power-devops/perfstat/fsstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/helpers.go delete mode 100644 vendor/github.com/power-devops/perfstat/lparstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/lvmstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/memstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/netstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/procstat.go delete mode 100644 vendor/github.com/power-devops/perfstat/sysconf.go delete mode 100644 vendor/github.com/power-devops/perfstat/systemcfg.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_cpu.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_disk.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_fs.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_lpar.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_lvm.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_memory.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_network.go delete mode 100644 vendor/github.com/power-devops/perfstat/types_process.go delete mode 100644 vendor/github.com/power-devops/perfstat/uptime.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/.gitignore delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/BENCHMARKS.md delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/LICENSE delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/README.md delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/counter.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/map.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/mapof.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueue.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueueof.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/rbmutex.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/spscqueue.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/spscqueueof.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/util.go delete mode 100644 vendor/github.com/puzpuzpuz/xsync/v3/util_hash.go delete mode 100644 vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE delete mode 100644 vendor/github.com/secure-systems-lab/go-securesystemslib/cjson/canonicaljson.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/LICENSE delete mode 100644 vendor/github.com/shirou/gopsutil/v4/common/env.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_riscv64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_plan9.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_netbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_testing.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/common_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/endian.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/sleep.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/internal/common/warnings.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_aix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_bsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_netbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_riscv64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_plan9.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_solaris.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_aix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_aix_cgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_aix_nocgo.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_solaris.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_unix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/net/net_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_darwin_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_darwin_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_linux.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_386.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_amd64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_riscv64.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_posix.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_windows.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_windows_32bit.go delete mode 100644 vendor/github.com/shirou/gopsutil/v4/process/process_windows_64bit.go delete mode 100644 vendor/github.com/stretchr/testify/LICENSE delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_compare.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/assert/assertion_order.go delete mode 100644 vendor/github.com/stretchr/testify/assert/assertions.go delete mode 100644 vendor/github.com/stretchr/testify/assert/doc.go delete mode 100644 vendor/github.com/stretchr/testify/assert/errors.go delete mode 100644 vendor/github.com/stretchr/testify/assert/forward_assertions.go delete mode 100644 vendor/github.com/stretchr/testify/assert/http_assertions.go delete mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go delete mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go delete mode 100644 vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go delete mode 100644 vendor/github.com/stretchr/testify/require/doc.go delete mode 100644 vendor/github.com/stretchr/testify/require/forward_requirements.go delete mode 100644 vendor/github.com/stretchr/testify/require/require.go delete mode 100644 vendor/github.com/stretchr/testify/require/require.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go delete mode 100644 vendor/github.com/stretchr/testify/require/require_forward.go.tmpl delete mode 100644 vendor/github.com/stretchr/testify/require/requirements.go delete mode 100644 vendor/github.com/tinylib/msgp/LICENSE delete mode 100644 vendor/github.com/tinylib/msgp/msgp/advise_linux.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/advise_other.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/circular.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/defs.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/edit.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/elsize.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/elsize_default.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/elsize_tinygo.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/errors.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/errors_default.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/errors_tinygo.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/extension.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/file.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/file_port.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/integers.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/json.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/json_bytes.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/number.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/purego.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/read.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/read_bytes.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/size.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/unsafe.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/write.go delete mode 100644 vendor/github.com/tinylib/msgp/msgp/write_bytes.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/.cirrus.yml delete mode 100644 vendor/github.com/tklauser/go-sysconf/.gitignore delete mode 100644 vendor/github.com/tklauser/go-sysconf/LICENSE delete mode 100644 vendor/github.com/tklauser/go-sysconf/README.md delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_generic.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_linux.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_posix.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go delete mode 100644 vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go delete mode 100644 vendor/github.com/tklauser/numcpus/.cirrus.yml delete mode 100644 vendor/github.com/tklauser/numcpus/LICENSE delete mode 100644 vendor/github.com/tklauser/numcpus/README.md delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_bsd.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_linux.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_list_unsupported.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_solaris.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_unsupported.go delete mode 100644 vendor/github.com/tklauser/numcpus/numcpus_windows.go delete mode 100644 vendor/github.com/yusufpapurcu/wmi/LICENSE delete mode 100644 vendor/github.com/yusufpapurcu/wmi/README.md delete mode 100644 vendor/github.com/yusufpapurcu/wmi/swbemservices.go delete mode 100644 vendor/github.com/yusufpapurcu/wmi/wmi.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/LICENSE delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/doc.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/limit.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/span.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/tracer.go delete mode 100644 vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/LICENSE delete mode 100644 vendor/go.opentelemetry.io/collector/component/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/component/build_info.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/component.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/config.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/doc.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/host.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/identifiable.go delete mode 100644 vendor/go.opentelemetry.io/collector/component/telemetry.go delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/LICENSE delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/README.md delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/flag.go delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/gate.go delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/registry.go delete mode 100644 vendor/go.opentelemetry.io/collector/featuregate/stage.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/LICENSE delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/Makefile delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/attribute.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_provider.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_zap.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/meter_provider.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/tracer_provider.go delete mode 100644 vendor/go.opentelemetry.io/collector/internal/telemetry/telemetry.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/LICENSE delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/.gitignore delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/state.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go delete mode 100644 vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/LICENSE delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_event.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_trace.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.17.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_event.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_trace.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.26.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_event.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_trace.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.27.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_resource.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_trace.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.6.1/nonstandard.go delete mode 100644 vendor/go.opentelemetry.io/collector/semconv/v1.6.1/schema.go delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/LICENSE delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/README.md delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/convert.go delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/core.go delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/encoder.go delete mode 100644 vendor/go.opentelemetry.io/contrib/bridges/otelzap/gen.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go delete mode 100644 vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go delete mode 100644 vendor/go.opentelemetry.io/otel/.clomonitor.yml delete mode 100644 vendor/go.opentelemetry.io/otel/.codespellignore delete mode 100644 vendor/go.opentelemetry.io/otel/.codespellrc delete mode 100644 vendor/go.opentelemetry.io/otel/.gitattributes delete mode 100644 vendor/go.opentelemetry.io/otel/.gitignore delete mode 100644 vendor/go.opentelemetry.io/otel/.golangci.yml delete mode 100644 vendor/go.opentelemetry.io/otel/.lycheeignore delete mode 100644 vendor/go.opentelemetry.io/otel/.markdownlint.yaml delete mode 100644 vendor/go.opentelemetry.io/otel/CHANGELOG.md delete mode 100644 vendor/go.opentelemetry.io/otel/CODEOWNERS delete mode 100644 vendor/go.opentelemetry.io/otel/CONTRIBUTING.md delete mode 100644 vendor/go.opentelemetry.io/otel/LICENSE delete mode 100644 vendor/go.opentelemetry.io/otel/Makefile delete mode 100644 vendor/go.opentelemetry.io/otel/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/RELEASING.md delete mode 100644 vendor/go.opentelemetry.io/otel/SECURITY-INSIGHTS.yml delete mode 100644 vendor/go.opentelemetry.io/otel/VERSIONING.md delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/encoder.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/filter.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/hash.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/iterator.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/key.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/kv.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/set.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/type_string.go delete mode 100644 vendor/go.opentelemetry.io/otel/attribute/value.go delete mode 100644 vendor/go.opentelemetry.io/otel/baggage/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/baggage/baggage.go delete mode 100644 vendor/go.opentelemetry.io/otel/baggage/context.go delete mode 100644 vendor/go.opentelemetry.io/otel/baggage/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/codes/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/codes/codes.go delete mode 100644 vendor/go.opentelemetry.io/otel/codes/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/dependencies.Dockerfile delete mode 100644 vendor/go.opentelemetry.io/otel/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/error_handler.go delete mode 100644 vendor/go.opentelemetry.io/otel/handler.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/baggage/context.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/handler.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/instruments.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/meter.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/propagator.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/state.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal/global/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/internal_logging.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/DESIGN.md delete mode 100644 vendor/go.opentelemetry.io/otel/log/LICENSE delete mode 100644 vendor/go.opentelemetry.io/otel/log/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/log/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/embedded/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/log/embedded/embedded.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/global/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/log/global/log.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/internal/global/log.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/internal/global/state.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/keyvalue.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/kind_string.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/logger.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/provider.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/record.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/severity.go delete mode 100644 vendor/go.opentelemetry.io/otel/log/severity_string.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/LICENSE delete mode 100644 vendor/go.opentelemetry.io/otel/metric/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/asyncint64.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/config.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/embedded/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/instrument.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/meter.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/noop/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/metric/noop/noop.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/syncfloat64.go delete mode 100644 vendor/go.opentelemetry.io/otel/metric/syncint64.go delete mode 100644 vendor/go.opentelemetry.io/otel/propagation.go delete mode 100644 vendor/go.opentelemetry.io/otel/propagation/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/propagation/baggage.go delete mode 100644 vendor/go.opentelemetry.io/otel/propagation/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/propagation/propagation.go delete mode 100644 vendor/go.opentelemetry.io/otel/propagation/trace_context.go delete mode 100644 vendor/go.opentelemetry.io/otel/renovate.json delete mode 100644 vendor/go.opentelemetry.io/otel/requirements.txt delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/LICENSE delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/auto.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/config.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/container.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/env.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/process.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/resource/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/event.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/link.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/provider.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/span.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go delete mode 100644 vendor/go.opentelemetry.io/otel/sdk/version.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/MIGRATION.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go delete mode 100644 vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/LICENSE delete mode 100644 vendor/go.opentelemetry.io/otel/trace/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/trace/auto.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/config.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/context.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/embedded/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/hex.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/nonrecording.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/noop.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/noop/README.md delete mode 100644 vendor/go.opentelemetry.io/otel/trace/noop/noop.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/provider.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/span.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/trace.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/tracer.go delete mode 100644 vendor/go.opentelemetry.io/otel/trace/tracestate.go delete mode 100644 vendor/go.opentelemetry.io/otel/verify_released_changelog.sh delete mode 100644 vendor/go.opentelemetry.io/otel/version.go delete mode 100644 vendor/go.opentelemetry.io/otel/versions.yaml delete mode 100644 vendor/go.uber.org/atomic/.codecov.yml delete mode 100644 vendor/go.uber.org/atomic/.gitignore delete mode 100644 vendor/go.uber.org/atomic/CHANGELOG.md delete mode 100644 vendor/go.uber.org/atomic/LICENSE.txt delete mode 100644 vendor/go.uber.org/atomic/Makefile delete mode 100644 vendor/go.uber.org/atomic/README.md delete mode 100644 vendor/go.uber.org/atomic/bool.go delete mode 100644 vendor/go.uber.org/atomic/bool_ext.go delete mode 100644 vendor/go.uber.org/atomic/doc.go delete mode 100644 vendor/go.uber.org/atomic/duration.go delete mode 100644 vendor/go.uber.org/atomic/duration_ext.go delete mode 100644 vendor/go.uber.org/atomic/error.go delete mode 100644 vendor/go.uber.org/atomic/error_ext.go delete mode 100644 vendor/go.uber.org/atomic/float32.go delete mode 100644 vendor/go.uber.org/atomic/float32_ext.go delete mode 100644 vendor/go.uber.org/atomic/float64.go delete mode 100644 vendor/go.uber.org/atomic/float64_ext.go delete mode 100644 vendor/go.uber.org/atomic/gen.go delete mode 100644 vendor/go.uber.org/atomic/int32.go delete mode 100644 vendor/go.uber.org/atomic/int64.go delete mode 100644 vendor/go.uber.org/atomic/nocmp.go delete mode 100644 vendor/go.uber.org/atomic/pointer_go118.go delete mode 100644 vendor/go.uber.org/atomic/pointer_go118_pre119.go delete mode 100644 vendor/go.uber.org/atomic/pointer_go119.go delete mode 100644 vendor/go.uber.org/atomic/string.go delete mode 100644 vendor/go.uber.org/atomic/string_ext.go delete mode 100644 vendor/go.uber.org/atomic/time.go delete mode 100644 vendor/go.uber.org/atomic/time_ext.go delete mode 100644 vendor/go.uber.org/atomic/uint32.go delete mode 100644 vendor/go.uber.org/atomic/uint64.go delete mode 100644 vendor/go.uber.org/atomic/uintptr.go delete mode 100644 vendor/go.uber.org/atomic/unsafe_pointer.go delete mode 100644 vendor/go.uber.org/atomic/value.go delete mode 100644 vendor/golang.org/x/crypto/cryptobyte/asn1.go delete mode 100644 vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go delete mode 100644 vendor/golang.org/x/crypto/cryptobyte/builder.go delete mode 100644 vendor/golang.org/x/crypto/cryptobyte/string.go delete mode 100644 vendor/golang.org/x/crypto/ed25519/ed25519.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/bmp-string.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/crypto.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/errors.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/mac.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/pbkdf.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/pkcs12.go delete mode 100644 vendor/golang.org/x/crypto/pkcs12/safebags.go delete mode 100644 vendor/golang.org/x/exp/LICENSE delete mode 100644 vendor/golang.org/x/exp/PATENTS delete mode 100644 vendor/golang.org/x/exp/constraints/constraints.go delete mode 100644 vendor/golang.org/x/net/internal/socks/client.go delete mode 100644 vendor/golang.org/x/net/internal/socks/socks.go delete mode 100644 vendor/golang.org/x/net/proxy/dial.go delete mode 100644 vendor/golang.org/x/net/proxy/direct.go delete mode 100644 vendor/golang.org/x/net/proxy/per_host.go delete mode 100644 vendor/golang.org/x/net/proxy/proxy.go delete mode 100644 vendor/golang.org/x/net/proxy/socks5.go delete mode 100644 vendor/golang.org/x/oauth2/authhandler/authhandler.go delete mode 100644 vendor/golang.org/x/oauth2/google/appengine.go delete mode 100644 vendor/golang.org/x/oauth2/google/default.go delete mode 100644 vendor/golang.org/x/oauth2/google/doc.go delete mode 100644 vendor/golang.org/x/oauth2/google/error.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/aws.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/header.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go delete mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go delete mode 100644 vendor/golang.org/x/oauth2/google/google.go delete mode 100644 vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go delete mode 100644 vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go delete mode 100644 vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go delete mode 100644 vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go delete mode 100644 vendor/golang.org/x/oauth2/google/jwt.go delete mode 100644 vendor/golang.org/x/oauth2/google/sdk.go delete mode 100644 vendor/golang.org/x/oauth2/jws/jws.go delete mode 100644 vendor/golang.org/x/oauth2/jwt/jwt.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/key.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/mksyscall.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/syscall.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/value.go delete mode 100644 vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go delete mode 100644 vendor/golang.org/x/xerrors/LICENSE delete mode 100644 vendor/golang.org/x/xerrors/PATENTS delete mode 100644 vendor/golang.org/x/xerrors/README delete mode 100644 vendor/golang.org/x/xerrors/adaptor.go delete mode 100644 vendor/golang.org/x/xerrors/codereview.cfg delete mode 100644 vendor/golang.org/x/xerrors/doc.go delete mode 100644 vendor/golang.org/x/xerrors/errors.go delete mode 100644 vendor/golang.org/x/xerrors/fmt.go delete mode 100644 vendor/golang.org/x/xerrors/format.go delete mode 100644 vendor/golang.org/x/xerrors/frame.go delete mode 100644 vendor/golang.org/x/xerrors/internal/internal.go delete mode 100644 vendor/golang.org/x/xerrors/wrap.go delete mode 100644 vendor/google.golang.org/api/AUTHORS delete mode 100644 vendor/google.golang.org/api/CONTRIBUTORS delete mode 100644 vendor/google.golang.org/api/LICENSE delete mode 100644 vendor/google.golang.org/api/dns/v1/dns-api.json delete mode 100644 vendor/google.golang.org/api/dns/v1/dns-gen.go delete mode 100644 vendor/google.golang.org/api/googleapi/googleapi.go delete mode 100644 vendor/google.golang.org/api/googleapi/transport/apikey.go delete mode 100644 vendor/google.golang.org/api/googleapi/types.go delete mode 100644 vendor/google.golang.org/api/internal/cba.go delete mode 100644 vendor/google.golang.org/api/internal/cert/default_cert.go delete mode 100644 vendor/google.golang.org/api/internal/cert/enterprise_cert.go delete mode 100644 vendor/google.golang.org/api/internal/cert/secureconnect_cert.go delete mode 100644 vendor/google.golang.org/api/internal/conn_pool.go delete mode 100644 vendor/google.golang.org/api/internal/creds.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/buffer.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/doc.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/error.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/json.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/jsonfloat.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/media.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/params.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/resumable.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/retry.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/send.go delete mode 100644 vendor/google.golang.org/api/internal/gensupport/version.go delete mode 100644 vendor/google.golang.org/api/internal/impersonate/impersonate.go delete mode 100644 vendor/google.golang.org/api/internal/s2a.go delete mode 100644 vendor/google.golang.org/api/internal/settings.go delete mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE delete mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA delete mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go delete mode 100644 vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go delete mode 100644 vendor/google.golang.org/api/internal/version.go delete mode 100644 vendor/google.golang.org/api/option/internaloption/internaloption.go delete mode 100644 vendor/google.golang.org/api/option/option.go delete mode 100644 vendor/google.golang.org/api/transport/http/dial.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/rpc/code/code.pb.go delete mode 100644 vendor/google.golang.org/genproto/googleapis/rpc/errdetails/error_details.pb.go delete mode 100644 vendor/gopkg.in/ini.v1/.editorconfig delete mode 100644 vendor/gopkg.in/ini.v1/.gitignore delete mode 100644 vendor/gopkg.in/ini.v1/.golangci.yml delete mode 100644 vendor/gopkg.in/ini.v1/LICENSE delete mode 100644 vendor/gopkg.in/ini.v1/Makefile delete mode 100644 vendor/gopkg.in/ini.v1/README.md delete mode 100644 vendor/gopkg.in/ini.v1/codecov.yml delete mode 100644 vendor/gopkg.in/ini.v1/data_source.go delete mode 100644 vendor/gopkg.in/ini.v1/deprecated.go delete mode 100644 vendor/gopkg.in/ini.v1/error.go delete mode 100644 vendor/gopkg.in/ini.v1/file.go delete mode 100644 vendor/gopkg.in/ini.v1/helper.go delete mode 100644 vendor/gopkg.in/ini.v1/ini.go delete mode 100644 vendor/gopkg.in/ini.v1/key.go delete mode 100644 vendor/gopkg.in/ini.v1/parser.go delete mode 100644 vendor/gopkg.in/ini.v1/section.go delete mode 100644 vendor/gopkg.in/ini.v1/struct.go diff --git a/core/dnsserver/zdirectives.go b/core/dnsserver/zdirectives.go index c40f7f4c17..cf5568cb19 100644 --- a/core/dnsserver/zdirectives.go +++ b/core/dnsserver/zdirectives.go @@ -10,60 +10,18 @@ package dnsserver // (after) them during a request, but they must not // care what plugin above them are doing. var Directives = []string{ - "root", - "metadata", - "geoip", "cancel", - "tls", - "quic", - "timeouts", - "multisocket", "reload", - "nsid", "bufsize", - "bind", - "debug", - "trace", "ready", "health", - "pprof", "prometheus", "errors", "log", - "dnstap", - "local", - "dns64", - "acl", - "any", "chaos", - "loadbalance", - "tsig", "ocp_dnsnameresolver", "cache", - "rewrite", - "header", - "dnssec", - "autopath", - "minimal", - "template", - "transfer", - "hosts", - "route53", - "azure", - "clouddns", - "k8s_external", "kubernetes", - "file", - "auto", - "secondary", - "etcd", "loop", "forward", - "grpc", - "erratic", - "whoami", - "on", - "sign", - "view", - "nomad", } diff --git a/core/plugin/zplugin.go b/core/plugin/zplugin.go index bba027203a..603ce3cfa2 100644 --- a/core/plugin/zplugin.go +++ b/core/plugin/zplugin.go @@ -4,61 +4,19 @@ package plugin import ( // Include all plugins. - _ "github.com/coredns/caddy/onevent" - _ "github.com/coredns/coredns/plugin/acl" - _ "github.com/coredns/coredns/plugin/any" - _ "github.com/coredns/coredns/plugin/auto" - _ "github.com/coredns/coredns/plugin/autopath" - _ "github.com/coredns/coredns/plugin/azure" - _ "github.com/coredns/coredns/plugin/bind" _ "github.com/coredns/coredns/plugin/bufsize" _ "github.com/coredns/coredns/plugin/cache" _ "github.com/coredns/coredns/plugin/cancel" _ "github.com/coredns/coredns/plugin/chaos" - _ "github.com/coredns/coredns/plugin/clouddns" - _ "github.com/coredns/coredns/plugin/debug" - _ "github.com/coredns/coredns/plugin/dns64" - _ "github.com/coredns/coredns/plugin/dnssec" - _ "github.com/coredns/coredns/plugin/dnstap" - _ "github.com/coredns/coredns/plugin/erratic" _ "github.com/coredns/coredns/plugin/errors" - _ "github.com/coredns/coredns/plugin/etcd" - _ "github.com/coredns/coredns/plugin/file" _ "github.com/coredns/coredns/plugin/forward" - _ "github.com/coredns/coredns/plugin/geoip" - _ "github.com/coredns/coredns/plugin/grpc" - _ "github.com/coredns/coredns/plugin/header" _ "github.com/coredns/coredns/plugin/health" - _ "github.com/coredns/coredns/plugin/hosts" - _ "github.com/coredns/coredns/plugin/k8s_external" _ "github.com/coredns/coredns/plugin/kubernetes" - _ "github.com/coredns/coredns/plugin/loadbalance" - _ "github.com/coredns/coredns/plugin/local" _ "github.com/coredns/coredns/plugin/log" _ "github.com/coredns/coredns/plugin/loop" - _ "github.com/coredns/coredns/plugin/metadata" _ "github.com/coredns/coredns/plugin/metrics" - _ "github.com/coredns/coredns/plugin/minimal" - _ "github.com/coredns/coredns/plugin/multisocket" - _ "github.com/coredns/coredns/plugin/nomad" - _ "github.com/coredns/coredns/plugin/nsid" - _ "github.com/coredns/coredns/plugin/pprof" - _ "github.com/coredns/coredns/plugin/quic" _ "github.com/coredns/coredns/plugin/ready" _ "github.com/coredns/coredns/plugin/reload" - _ "github.com/coredns/coredns/plugin/rewrite" - _ "github.com/coredns/coredns/plugin/root" - _ "github.com/coredns/coredns/plugin/route53" - _ "github.com/coredns/coredns/plugin/secondary" - _ "github.com/coredns/coredns/plugin/sign" - _ "github.com/coredns/coredns/plugin/template" - _ "github.com/coredns/coredns/plugin/timeouts" - _ "github.com/coredns/coredns/plugin/tls" - _ "github.com/coredns/coredns/plugin/trace" - _ "github.com/coredns/coredns/plugin/transfer" - _ "github.com/coredns/coredns/plugin/tsig" - _ "github.com/coredns/coredns/plugin/view" - _ "github.com/coredns/coredns/plugin/whoami" _ "github.com/openshift/coredns-ocp-dnsnameresolver" ) diff --git a/go.mod b/go.mod index 8146f7560f..46b0b8611e 100644 --- a/go.mod +++ b/go.mod @@ -5,32 +5,16 @@ module github.com/coredns/coredns go 1.25.0 require ( - github.com/Azure/azure-sdk-for-go v68.0.0+incompatible - github.com/Azure/go-autorest/autorest v0.11.30 - github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 - github.com/DataDog/dd-trace-go/v2 v2.2.3 github.com/apparentlymart/go-cidr v1.1.0 - github.com/aws/aws-sdk-go-v2 v1.39.2 - github.com/aws/aws-sdk-go-v2/config v1.31.12 - github.com/aws/aws-sdk-go-v2/credentials v1.18.16 - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 - github.com/aws/aws-sdk-go-v2/service/route53 v1.58.4 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.6 github.com/coredns/caddy v1.1.4-0.20250930002214-15135a999495 github.com/dnstap/golang-dnstap v0.4.0 - github.com/expr-lang/expr v1.17.7 github.com/farsightsec/golang-framestream v0.3.0 github.com/go-logr/logr v1.4.3 github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 - github.com/hashicorp/nomad/api v0.0.0-20250909143645-a3b86c697f38 // v1.10.5 - github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 github.com/matttproud/golang_protobuf_extensions v1.0.4 github.com/miekg/dns v1.1.68 github.com/openshift/coredns-ocp-dnsnameresolver v0.0.0-20251118200623-f7b15b30153f github.com/opentracing/opentracing-go v1.2.0 - github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0 - github.com/openzipkin/zipkin-go v0.4.3 - github.com/oschwald/geoip2-golang v1.13.0 github.com/prometheus/client_golang v1.23.0 github.com/prometheus/client_model v0.6.2 github.com/prometheus/common v0.66.1 @@ -38,9 +22,8 @@ require ( go.etcd.io/etcd/api/v3 v3.6.5 go.etcd.io/etcd/client/v3 v3.6.5 go.uber.org/automaxprocs v1.6.0 - golang.org/x/crypto v0.50.0 + golang.org/x/crypto v0.50.0 // indirect golang.org/x/sys v0.43.0 - google.golang.org/api v0.251.0 google.golang.org/grpc v1.79.3 google.golang.org/protobuf v1.36.10 k8s.io/api v0.34.1 @@ -51,87 +34,27 @@ require ( ) require ( - cloud.google.com/go/auth v0.16.5 // indirect - cloud.google.com/go/auth/oauth2adapt v0.2.8 // indirect - cloud.google.com/go/compute/metadata v0.9.0 // indirect - github.com/Azure/go-autorest v14.2.0+incompatible // indirect - github.com/Azure/go-autorest/autorest/adal v0.9.22 // indirect - github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect - github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect - github.com/Azure/go-autorest/autorest/to v0.2.0 // indirect - github.com/Azure/go-autorest/logger v0.2.1 // indirect - github.com/Azure/go-autorest/tracing v0.6.0 // indirect - github.com/DataDog/appsec-internal-go v1.13.0 // indirect - github.com/DataDog/datadog-agent/comp/core/tagger/origindetection v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/obfuscate v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/proto v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.69.0 // indirect - github.com/DataDog/datadog-agent/pkg/trace v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/log v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/util/scrubber v0.67.0 // indirect - github.com/DataDog/datadog-agent/pkg/version v0.67.0 // indirect - github.com/DataDog/datadog-go/v5 v5.6.0 // indirect - github.com/DataDog/go-libddwaf/v4 v4.3.2 // indirect - github.com/DataDog/go-runtime-metrics-internal v0.0.4-0.20250721125240-fdf1ef85b633 // indirect - github.com/DataDog/go-sqllexer v0.1.6 // indirect - github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0 // indirect - github.com/DataDog/sketches-go v1.4.7 // indirect - github.com/Masterminds/semver/v3 v3.3.1 // indirect - github.com/Microsoft/go-winio v0.6.2 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 // indirect - github.com/aws/smithy-go v1.23.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/dimchansky/utfbom v1.1.1 // indirect - github.com/dustin/go-humanize v1.0.1 // indirect - github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect - github.com/ebitengine/purego v0.8.3 // indirect github.com/emicklei/go-restful/v3 v3.12.2 // indirect - github.com/felixge/httpsnoop v1.0.4 // indirect github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 // indirect github.com/fxamacker/cbor/v2 v2.9.0 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.3.0 // indirect github.com/go-openapi/jsonpointer v0.21.0 // indirect github.com/go-openapi/jsonreference v0.20.2 // indirect github.com/go-openapi/swag v0.23.0 // indirect - github.com/go-viper/mapstructure/v2 v2.4.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang-jwt/jwt/v4 v4.5.2 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/gnostic-models v0.7.0 // indirect github.com/google/go-cmp v0.7.0 // indirect - github.com/google/s2a-go v0.1.9 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect - github.com/googleapis/gax-go/v2 v2.15.0 // indirect - github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 // indirect - github.com/hashicorp/cronexpr v1.1.3 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cleanhttp v0.5.2 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-rootcerts v1.0.2 // indirect - github.com/hashicorp/go-version v1.7.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kylelemons/godebug v1.1.0 // indirect - github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect github.com/mailru/easyjson v0.7.7 // indirect - github.com/mitchellh/go-homedir v1.1.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect @@ -139,45 +62,16 @@ require ( github.com/onsi/gomega v1.36.2 // indirect github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7 // indirect github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 // indirect - github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 // indirect - github.com/oschwald/maxminddb-golang v1.13.0 // indirect - github.com/outcaste-io/ristretto v0.2.3 // indirect - github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/procfs v0.16.1 // indirect - github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect - github.com/secure-systems-lab/go-securesystemslib v0.9.0 // indirect - github.com/shirou/gopsutil/v4 v4.25.3 // indirect github.com/spf13/pflag v1.0.6 // indirect - github.com/stretchr/testify v1.11.1 // indirect - github.com/tinylib/msgp v1.2.5 // indirect - github.com/tklauser/go-sysconf v0.3.15 // indirect - github.com/tklauser/numcpus v0.10.0 // indirect github.com/x448/float16 v0.8.4 // indirect - github.com/yusufpapurcu/wmi v1.2.4 // indirect go.etcd.io/etcd/client/pkg/v3 v3.6.5 // indirect - go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/collector/component v1.31.0 // indirect - go.opentelemetry.io/collector/featuregate v1.31.0 // indirect - go.opentelemetry.io/collector/internal/telemetry v0.125.0 // indirect - go.opentelemetry.io/collector/pdata v1.31.0 // indirect - go.opentelemetry.io/collector/semconv v0.125.0 // indirect - go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect - go.opentelemetry.io/otel v1.39.0 // indirect - go.opentelemetry.io/otel/log v0.11.0 // indirect - go.opentelemetry.io/otel/metric v1.39.0 // indirect - go.opentelemetry.io/otel/sdk v1.39.0 // indirect - go.opentelemetry.io/otel/trace v1.39.0 // indirect - go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go.yaml.in/yaml/v2 v2.4.2 // indirect go.yaml.in/yaml/v3 v3.0.4 // indirect - golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect golang.org/x/mod v0.34.0 // indirect golang.org/x/net v0.53.0 // indirect golang.org/x/oauth2 v0.34.0 // indirect @@ -186,12 +80,10 @@ require ( golang.org/x/text v0.36.0 // indirect golang.org/x/time v0.13.0 // indirect golang.org/x/tools v0.43.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect - gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/kube-openapi v0.0.0-20250710124328-f3f2b991d03b // indirect k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect diff --git a/go.sum b/go.sum index ddbb4dc8b4..14d4ac50cc 100644 --- a/go.sum +++ b/go.sum @@ -1,114 +1,9 @@ -cloud.google.com/go/auth v0.16.5 h1:mFWNQ2FEVWAliEQWpAdH80omXFokmrnbDhUS9cBywsI= -cloud.google.com/go/auth v0.16.5/go.mod h1:utzRfHMP+Vv0mpOkTRQoWD2q3BatTOoWbA7gCc2dUhQ= -cloud.google.com/go/auth/oauth2adapt v0.2.8 h1:keo8NaayQZ6wimpNSmW5OPc283g65QNIiLpZnkHRbnc= -cloud.google.com/go/auth/oauth2adapt v0.2.8/go.mod h1:XQ9y31RkqZCcwJWNSx2Xvric3RrU88hAYYbjDWYDL+c= -cloud.google.com/go/compute/metadata v0.9.0 h1:pDUj4QMoPejqq20dK0Pg2N4yG9zIkYGdBtwLoEkH9Zs= -cloud.google.com/go/compute/metadata v0.9.0/go.mod h1:E0bWwX5wTnLPedCKqk3pJmVgCBSM6qQI1yTBdEb3C10= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible h1:fcYLmCpyNYRnvJbPerq7U0hS+6+I79yEDJBqVNcqUzU= -github.com/Azure/azure-sdk-for-go v68.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.28/go.mod h1:MrkzG3Y3AH668QyF9KRk5neJnGgmhQ6krbhR8Q5eMvA= -github.com/Azure/go-autorest/autorest v0.11.30 h1:iaZ1RGz/ALZtN5eq4Nr1SOFSlf2E4pDI3Tcsl+dZPVE= -github.com/Azure/go-autorest/autorest v0.11.30/go.mod h1:t1kpPIOpIVX7annvothKvb0stsrXa37i7b+xpmBW8Fs= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/adal v0.9.22 h1:/GblQdIudfEM3AWWZ0mrYJQSd7JS4S/Mbzh6F0ov0Xc= -github.com/Azure/go-autorest/autorest/adal v0.9.22/go.mod h1:XuAbAEUv2Tta//+voMI038TrJBqjKam0me7qR+L8Cmk= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 h1:Ov8avRZi2vmrE2JcXw+tu5K/yB41r7xK9GZDiBF7NdM= -github.com/Azure/go-autorest/autorest/azure/auth v0.5.13/go.mod h1:5BAVfWLWXihP47vYrPuBKKf4cS0bXI+KM9Qx6ETDJYo= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 h1:w77/uPk80ZET2F+AfQExZyEWtn+0Rk/uw17m9fv5Ajc= -github.com/Azure/go-autorest/autorest/azure/cli v0.4.6/go.mod h1:piCfgPho7BiIDdEQ1+g4VmKyD5y+p/XtSNqE6Hc4QD0= -github.com/Azure/go-autorest/autorest/date v0.3.0 h1:7gUk1U5M/CQbp9WoqinNzJar+8KY+LPI6wiWrP/myHw= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2 h1:PGN4EDXnuQbojHbU0UWoNvmu9AGVwYHG9/fkDYhtAfw= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.2.0 h1:nQOZzFCudTh+TvquAtCRjM01VEYx85e9qbwt5ncW4L8= -github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= -github.com/Azure/go-autorest/logger v0.2.1 h1:IG7i4p/mDa2Ce4TRyAO8IHnVhAVF3RFU+ZtXWSmf4Tg= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0 h1:TYi4+3m5t6K48TGI9AUdb+IzbnSxvnvUMfuitfgcfuo= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= -github.com/DataDog/appsec-internal-go v1.13.0 h1:aO6DmHYsAU8BNFuvYJByhMKGgcQT3WAbj9J/sgAJxtA= -github.com/DataDog/appsec-internal-go v1.13.0/go.mod h1:9YppRCpElfGX+emXOKruShFYsdPq7WEPq/Fen4tYYpk= -github.com/DataDog/datadog-agent/comp/core/tagger/origindetection v0.67.0 h1:2mEwRWvhIPHMPK4CMD8iKbsrYBxeMBSuuCXumQAwShU= -github.com/DataDog/datadog-agent/comp/core/tagger/origindetection v0.67.0/go.mod h1:ejJHsyJTG7NU6c6TDbF7dmckD3g+AUGSdiSXy+ZyaCE= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.67.0 h1:NcvyDVIUA0NbBDbp7QJnsYhoBv548g8bXq886795mCQ= -github.com/DataDog/datadog-agent/pkg/obfuscate v0.67.0/go.mod h1:1oPcs3BUTQhiTkmk789rb7ob105MxNV6OuBa28BdukQ= -github.com/DataDog/datadog-agent/pkg/proto v0.67.0 h1:7dO6mKYRb7qSiXEu7Q2mfeKbhp4hykCAULy4BfMPmsQ= -github.com/DataDog/datadog-agent/pkg/proto v0.67.0/go.mod h1:bKVXB7pxBg0wqXF6YSJ+KU6PeCWKDyJj83kUH1ab+7o= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.69.0 h1:/DsN4R+IkC6t1+4cHSfkxzLtDl84rBbPC5Wa9srBAoM= -github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.69.0/go.mod h1:Th2LD/IGid5Rza55pzqGu6nUdOv/Rts6wPwLjTyOSTs= -github.com/DataDog/datadog-agent/pkg/trace v0.67.0 h1:dqt+/nObo0JKyaEqIMZgfqGZbx9TfEHpCkrjQ/zzH7k= -github.com/DataDog/datadog-agent/pkg/trace v0.67.0/go.mod h1:zmZoEtKvOnaKHbJGBKH3a4xuyPrSfBaF0ZE3Q3rCoDw= -github.com/DataDog/datadog-agent/pkg/util/log v0.67.0 h1:xrH15QNqeJZkYoXYi44VCIvGvTwlQ3z2iT2QVTGiT7s= -github.com/DataDog/datadog-agent/pkg/util/log v0.67.0/go.mod h1:dfVLR+euzEyg1CeiExgJQq1c1dod42S6IeiRPj8H7Yk= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.67.0 h1:aIWF85OKxXGo7rVyqJ7jm7lm2qCQrgyXzYyFuw0T2EQ= -github.com/DataDog/datadog-agent/pkg/util/scrubber v0.67.0/go.mod h1:Lfap5FuM4b/Pw9IrTuAvWBWZEmXOvZhCya3dYv4G8O0= -github.com/DataDog/datadog-agent/pkg/version v0.67.0 h1:TB8H8r+laB1Qdttvvc6XJVyLGxp8E6j2f2Mh5IPbYmQ= -github.com/DataDog/datadog-agent/pkg/version v0.67.0/go.mod h1:kvAw/WbI7qLAsDI2wHabZfM7Cv2zraD3JA3323GEB+8= -github.com/DataDog/datadog-go/v5 v5.6.0 h1:2oCLxjF/4htd55piM75baflj/KoE6VYS7alEUqFvRDw= -github.com/DataDog/datadog-go/v5 v5.6.0/go.mod h1:K9kcYBlxkcPP8tvvjZZKs/m1edNAUFzBbdpTUKfCsuw= -github.com/DataDog/dd-trace-go/v2 v2.2.3 h1:6RvVdY9suR/rYYYZHjx4txrtSYcRZ5u5Cs2sXMsIBf4= -github.com/DataDog/dd-trace-go/v2 v2.2.3/go.mod h1:1LcqWELgQwgk6x7sO0MXUgsvxcAVjxSA423cUjvUqR0= -github.com/DataDog/go-libddwaf/v4 v4.3.2 h1:YGvW2Of1C4e1yU+p7iibmhN2zEOgi9XEchbhQjBxb/A= -github.com/DataDog/go-libddwaf/v4 v4.3.2/go.mod h1:/AZqP6zw3qGJK5mLrA0PkfK3UQDk1zCI2fUNCt4xftE= -github.com/DataDog/go-runtime-metrics-internal v0.0.4-0.20250721125240-fdf1ef85b633 h1:ZRLR9Lbym748e8RznWzmSoK+OfV+8qW6SdNYA4/IqdA= -github.com/DataDog/go-runtime-metrics-internal v0.0.4-0.20250721125240-fdf1ef85b633/go.mod h1:YFoTl1xsMzdSRFIu33oCSPS/3+HZAPGpO3oOM96wXCM= -github.com/DataDog/go-sqllexer v0.1.6 h1:skEXpWEVCpeZFIiydoIa2f2rf+ymNpjiIMqpW4w3YAk= -github.com/DataDog/go-sqllexer v0.1.6/go.mod h1:GGpo1h9/BVSN+6NJKaEcJ9Jn44Hqc63Rakeb+24Mjgo= -github.com/DataDog/go-tuf v1.1.0-0.5.2 h1:4CagiIekonLSfL8GMHRHcHudo1fQnxELS9g4tiAupQ4= -github.com/DataDog/go-tuf v1.1.0-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= -github.com/DataDog/gostackparse v0.7.0 h1:i7dLkXHvYzHV308hnkvVGDL3BR4FWl7IsXNPz/IGQh4= -github.com/DataDog/gostackparse v0.7.0/go.mod h1:lTfqcJKqS9KnXQGnyQMCugq3u1FP6UZMfWR0aitKFMM= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0 h1:5US5SqqhfkZkg/E64uvn7YmeTwnudJHtlPEH/LOT99w= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0/go.mod h1:VRo4D6rj92AExpVBlq3Gcuol9Nm1bber12KyxRjKGWw= -github.com/DataDog/sketches-go v1.4.7 h1:eHs5/0i2Sdf20Zkj0udVFWuCrXGRFig2Dcfm5rtcTxc= -github.com/DataDog/sketches-go v1.4.7/go.mod h1:eAmQ/EBmtSO+nQp7IZMZVRPT4BQTmIc5RZQ+deGlTPM= -github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4= -github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM= -github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= -github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/aws/aws-sdk-go-v2 v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I= -github.com/aws/aws-sdk-go-v2 v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= -github.com/aws/aws-sdk-go-v2/config v1.31.12 h1:pYM1Qgy0dKZLHX2cXslNacbcEFMkDMl+Bcj5ROuS6p8= -github.com/aws/aws-sdk-go-v2/config v1.31.12/go.mod h1:/MM0dyD7KSDPR+39p9ZNVKaHDLb9qnfDurvVS2KAhN8= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16 h1:4JHirI4zp958zC026Sm+V4pSDwW4pwLefKrc0bF2lwI= -github.com/aws/aws-sdk-go-v2/credentials v1.18.16/go.mod h1:qQMtGx9OSw7ty1yLclzLxXCRbrkjWAM7JnObZjmCB7I= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 h1:Mv4Bc0mWmv6oDuSWTKnk+wgeqPL5DRFu5bQL9BGPQ8Y= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9/go.mod h1:IKlKfRppK2a1y0gy1yH6zD+yX5uplJ6UuPlgd48dJiQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 h1:se2vOWGD3dWQUtfn4wEjRQJb1HK1XsNIt825gskZ970= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9/go.mod h1:hijCGH2VfbZQxqCDN7bwz/4dzxV+hkyhjawAtdPWKZA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 h1:6RBnKZLkJM4hQ+kN6E7yWFveOTg8NLPHAkqrs4ZPlTU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9/go.mod h1:V9rQKRmK7AWuEsOMnHzKj8WyrIir1yUJbZxDuZLFvXI= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 h1:oegbebPEMA/1Jny7kvwejowCaHz1FWZAQ94WXFNCyTM= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1/go.mod h1:kemo5Myr9ac0U9JfSjMo9yHLtw+pECEHsFtJ9tqCEI8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 h1:5r34CgVOD4WZudeEKZ9/iKpiT6cM1JyEROpXjOcdWv8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9/go.mod h1:dB12CEbNWPbzO2uC6QSWHteqOg4JfBVJOojbAoAUb5I= -github.com/aws/aws-sdk-go-v2/service/route53 v1.58.4 h1:KycXrohD5OxAZ5h02YechO2gevvoHfAPAaJM5l8zqb0= -github.com/aws/aws-sdk-go-v2/service/route53 v1.58.4/go.mod h1:xNLZLn4SusktBQ5moqUOgiDKGz3a7vHwF4W0KD+WBPc= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.6 h1:9PWl450XOG+m5lKv+qg5BXso1eLxpsZLqq7VPug5km0= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.6/go.mod h1:hwt7auGsDcaNQ8pzLgE2kCNyIWouYlAKSjuUu5Dqr7I= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 h1:A1oRkiSQOWstGh61y4Wc/yQ04sqrQZr1Si/oAXj20/s= -github.com/aws/aws-sdk-go-v2/service/sso v1.29.6/go.mod h1:5PfYspyCU5Vw1wNPsxi15LZovOnULudOQuVxphSflQA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 h1:5fm5RTONng73/QA73LhCNR7UT9RpFH3hR6HWL6bIgVY= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1/go.mod h1:xBEjWD13h+6nq+z4AkqSfSvqRKFgDIQeaMguAJndOWo= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 h1:p3jIvqYwUZgu/XYeI48bJxOhvm47hZb5HUQ0tn6Q9kA= -github.com/aws/aws-sdk-go-v2/service/sts v1.38.6/go.mod h1:WtKK+ppze5yKPkZ0XwqIVWD4beCwv056ZbPQNoeHqM8= -github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= -github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 h1:kHaBemcxl8o/pQ5VM1c8PVE1PubbNx3mjUr09OqWGCs= -github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575/go.mod h1:9d6lWj8KzO/fd/NrVaLscBKmPigpZpn5YawRPw+e3Yo= github.com/coredns/caddy v1.1.4-0.20250930002214-15135a999495 h1:JFeOmbjLnVRhvmLHyuO3M1pfXWlPWpwkdM8UqXZRtBg= github.com/coredns/caddy v1.1.4-0.20250930002214-15135a999495/go.mod h1:A6ntJQlAWuQfFlsd9hvigKbo2WS0VUs2l1e2F+BawD4= github.com/coreos/go-semver v0.3.1 h1:yi21YpKnrx1gt5R+la8n5WgS0kCrsPp33dmEyHReZr4= @@ -120,42 +15,20 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da h1:aIftn67I1fkbMa512G+w+Pxci9hJPB8oMnkcP3iZF38= -github.com/dgryski/go-farm v0.0.0-20240924180020-3414d57e47da/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= -github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/dnstap/golang-dnstap v0.4.0 h1:KRHBoURygdGtBjDI2w4HifJfMAhhOqDuktAokaSa234= github.com/dnstap/golang-dnstap v0.4.0/go.mod h1:FqsSdH58NAmkAvKcpyxht7i4FoBjKu8E4JUPt8ipSUs= -github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= -github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= -github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 h1:8EXxF+tCLqaVk8AOC29zl2mnhQjwyLxxOTuhUazWRsg= -github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4/go.mod h1:I5sHm0Y0T1u5YjlyqC5GVArM7aNZRUYtTjmJ8mPJFds= -github.com/ebitengine/purego v0.8.3 h1:K+0AjQp63JEZTEMZiwsI9g0+hAMNohwUOtY0RPGexmc= -github.com/ebitengine/purego v0.8.3/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/emicklei/go-restful/v3 v3.12.2 h1:DhwDP0vY3k8ZzE0RunuJy8GhNpPL6zqLkDf9B/a0/xU= github.com/emicklei/go-restful/v3 v3.12.2/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/expr-lang/expr v1.17.7 h1:Q0xY/e/2aCIp8g9s/LGvMDCC5PxYlvHgDZRQ4y16JX8= -github.com/expr-lang/expr v1.17.7/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= github.com/farsightsec/golang-framestream v0.3.0 h1:/spFQHucTle/ZIPkYqrfshQqPe2VQEzesH243TjIwqA= github.com/farsightsec/golang-framestream v0.3.0/go.mod h1:eNde4IQyEiA5br02AouhEHCu3p3UzrCdFR4LuQHklMI= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM= github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI= github.com/go-logr/logr v1.4.3/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= -github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= github.com/go-openapi/jsonpointer v0.19.6/go.mod h1:osyAmYz/mB/C3I+WsTTSgw1ONzaLJoLCyoi6/zppojs= github.com/go-openapi/jsonpointer v0.21.0 h1:YgdVicSA9vH5RiHs9TZW5oyafXZFc6+2Vc1rr/O9oNQ= github.com/go-openapi/jsonpointer v0.21.0/go.mod h1:IUyH9l/+uyhIYQ/PXVA41Rexl+kOkAPDdXEYns6fzUY= @@ -164,22 +37,11 @@ github.com/go-openapi/jsonreference v0.20.2/go.mod h1:Bl1zwGIM8/wsvqjsOQLJ/SH+En github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+VcZ0yl14= github.com/go-openapi/swag v0.23.0 h1:vsEVJDUo2hPJ2tu0/Xc+4noaxyEffXNIs3cOULZ+GrE= github.com/go-openapi/swag v0.23.0/go.mod h1:esZ8ITTYEsH1V2trKHjAN8Ai7xHb8RV+YSZ577vPjgQ= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= -github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs= -github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.5.0/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= -github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/mock v1.7.0-rc.1 h1:YojYx61/OLFsiv6Rw1Z96LpldJIy31o+UHmwAUMJ6/U= -github.com/golang/mock v1.7.0-rc.1/go.mod h1:s42URUywIqd+OcERslBJvOjepvNymP31m3q8d/GkuRs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -196,42 +58,15 @@ github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= -github.com/google/s2a-go v0.1.9 h1:LGD7gtMgezd8a/Xak7mEWL0PjoTQFvpRudN895yqKW0= -github.com/google/s2a-go v0.1.9/go.mod h1:YA0Ei2ZQL3acow2O62kdp9UlnvMmU7kA6Eutn0dXayM= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.3.6 h1:GW/XbdyBFQ8Qe+YAmFU9uHLo7OnF5tL52HFAgMmyrf4= -github.com/googleapis/enterprise-certificate-proxy v0.3.6/go.mod h1:MkHOF77EYAE7qfSuSS9PU6g4Nt4e11cnsDUowfwewLA= -github.com/googleapis/gax-go/v2 v2.15.0 h1:SyjDc1mGgZU5LncH8gimWo9lW1DtIfPibOG81vgd/bo= -github.com/googleapis/gax-go/v2 v2.15.0/go.mod h1:zVVkkxAQHa1RQpg9z2AUCMnKhi0Qld9rcmyfL1OZhoc= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= -github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= -github.com/hashicorp/cronexpr v1.1.3 h1:rl5IkxXN2m681EfivTlccqIryzYJSXRGRNa0xeG7NA4= -github.com/hashicorp/cronexpr v1.1.3/go.mod h1:P4wA0KBl9C5q2hABiMO7cp6jcIg96CDh1Efb3g1PWA4= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= -github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/nomad/api v0.0.0-20250909143645-a3b86c697f38 h1:1LTbcTpGdSdbj0ee7YZHNe4R2XqxfyWwIkSGWRhgkfM= -github.com/hashicorp/nomad/api v0.0.0-20250909143645-a3b86c697f38/go.mod h1:0Tdp+9HbvwrxprXv/LfYZ8P21bOl4oA8Afyet1kUvhI= -github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 h1:w66aaP3c6SIQ0pi3QH1Tb4AMO3aWoEPxd1CNvLphbkA= -github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9/go.mod h1:BaIJzjD2ZnHmx2acPF6XfGLPzNCMiBbMRqJr+8/8uRI= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -249,8 +84,6 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 h1:PpXWgLPs+Fqr325bN2FD2ISlRRztXibcX6e8f5FR5Dc= -github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35/go.mod h1:autxFIvghDt3jPTLoqZ9OZ7s9qTGNAWmYCjVFWPX/zg= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= @@ -258,10 +91,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfr github.com/miekg/dns v1.1.31/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.68 h1:jsSRkNozw7G/mnmXULynzMNIsgY2dHC8LO6U6Ij2JEA= github.com/miekg/dns v1.1.68/go.mod h1:fujopn7TB3Pu3JM69XaawiU0wqjpL9/8xGop5UrTPps= -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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= -github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -274,41 +103,19 @@ github.com/onsi/ginkgo/v2 v2.22.1 h1:QW7tbJAUDyVDVOM5dFa7qaybo+CRfR7bemlQUN6Z8aM github.com/onsi/ginkgo/v2 v2.22.1/go.mod h1:S6aTpoRsSq2cZOd+pssHAlKW/Q/jZt6cPrPlnj4a1xM= github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8= github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.125.0 h1:0dOJCEtabevxxDQmxed69oMzSw+gb3ErCnFwFYZFu0M= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.125.0/go.mod h1:QwzQhtxPThXMUDW1XRXNQ+l0GrI2BRsvNhX6ZuKyAds= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.125.0 h1:F68/Nbpcvo3JZpaWlRUDJtG7xs8FHBZ7A8GOMauDkyc= -github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.125.0/go.mod h1:haO4cJtAk05Y0p7NO9ME660xxtSh54ifCIIT7+PO9C0= github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7 h1:MemawsK6SpxEaE5y0NqO5sIX3yTLIIyP89w6DGKukAk= github.com/openshift/api v0.0.0-20251111193948-50e2ece149d7/go.mod h1:d5uzF0YN2nQQFA0jIEWzzOZ+edmo6wzlGLvx5Fhz4uY= github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235 h1:9JBeIXmnHlpXTQPi7LPmu1jdxznBhAE7bb1K+3D8gxY= github.com/openshift/client-go v0.0.0-20251015124057-db0dee36e235/go.mod h1:L49W6pfrZkfOE5iC1PqEkuLkXG4W0BX4w8b+L2Bv7fM= github.com/openshift/coredns-ocp-dnsnameresolver v0.0.0-20251118200623-f7b15b30153f h1:qD47fr/BfvuOiAy3lRoMql4bl1I9bNS2REUjZyRyf18= github.com/openshift/coredns-ocp-dnsnameresolver v0.0.0-20251118200623-f7b15b30153f/go.mod h1:Fi8MBsadvu5BiQViStarlv89qGT1d+DGEpCxKmg/Wp8= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0 h1:uhcF5Jd7rP9DVEL10Siffyepr6SvlKbUsjH5JpNCRi8= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0/go.mod h1:+oCZ5GXXr7KPI/DNOQORPTq5AWHfALJj9c72b0+YsEY= -github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg= -github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c= -github.com/oschwald/geoip2-golang v1.13.0 h1:Q44/Ldc703pasJeP5V9+aFSZFmBN7DKHbNsSFzQATJI= -github.com/oschwald/geoip2-golang v1.13.0/go.mod h1:P9zG+54KPEFOliZ29i7SeYZ/GM6tfEL+rgSn03hYuUo= -github.com/oschwald/maxminddb-golang v1.13.0 h1:R8xBorY71s84yO06NgTmQvqvTvlS/bnYZrrWX1MElnU= -github.com/oschwald/maxminddb-golang v1.13.0/go.mod h1:BU0z8BfFVhi1LQaonTwwGQlsHUEu9pWNdMfmq4ztm0o= -github.com/outcaste-io/ristretto v0.2.3 h1:AK4zt/fJ76kjlYObOeNwh4T3asEuaCmp26pOvUOL9w0= -github.com/outcaste-io/ristretto v0.2.3/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= -github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= -github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 h1:GFCKgmp0tecUJ0sJuv4pzYCqS9+RGSn52M3FUwPs+uo= -github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU= -github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc= @@ -319,23 +126,10 @@ github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9Z github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= -github.com/puzpuzpuz/xsync/v3 v3.5.1 h1:GJYJZwO6IdxN/IKbneznS6yPkVC+c3zyY/j19c++5Fg= -github.com/puzpuzpuz/xsync/v3 v3.5.1/go.mod h1:VjzYrABPabuM4KyBh1Ftq6u8nhwY5tBPKP9jpmh0nnA= github.com/quic-go/quic-go v0.55.0 h1:zccPQIqYCXDt5NmcEabyYvOnomjs8Tlwl7tISjJh9Mk= github.com/quic-go/quic-go v0.55.0/go.mod h1:DR51ilwU1uE164KuWXhinFcKWGlEjzys2l8zUl5Ss1U= -github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3 h1:4+LEVOB87y175cLJC/mbsgKmoDOjrBldtXvioEy96WY= -github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3/go.mod h1:vl5+MqJ1nBINuSsUI2mGgH79UweUT/B5Fy8857PqyyI= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= -github.com/secure-systems-lab/go-securesystemslib v0.9.0 h1:rf1HIbL64nUpEIZnjLZ3mcNEL9NBPB0iuVjyxvq3LZc= -github.com/secure-systems-lab/go-securesystemslib v0.9.0/go.mod h1:DVHKMcZ+V4/woA/peqr+L0joiRXbPpQ042GgJckkFgw= -github.com/shirou/gopsutil/v4 v4.25.3 h1:SeA68lsu8gLggyMbmCn8cmp97V1TI9ld9sVzAUcKcKE= -github.com/shirou/gopsutil/v4 v4.25.3/go.mod h1:xbuxyoZj+UsgnZrENu3lQivsngRR5BdjbJwf2fv4szA= -github.com/shoenig/test v1.12.1 h1:mLHfnMv7gmhhP44WrvT+nKSxKkPDiNkIuHGdIGI9RLU= -github.com/shoenig/test v1.12.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -343,32 +137,16 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/tinylib/msgp v1.2.5 h1:WeQg1whrXRFiZusidTQqzETkRpGjFjcIhW6uqWH09po= -github.com/tinylib/msgp v1.2.5/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= -github.com/tklauser/go-sysconf v0.3.15 h1:VE89k0criAymJ/Os65CSn1IXaol+1wrsFHEB8Ol49K4= -github.com/tklauser/go-sysconf v0.3.15/go.mod h1:Dmjwr6tYFIseJw7a3dRLJfsHAMXZ3nEnL/aZY+0IuI4= -github.com/tklauser/numcpus v0.10.0 h1:18njr6LDBk1zuna922MgdjQuJFjrdppsZG60sHGfjso= -github.com/tklauser/numcpus v0.10.0/go.mod h1:BiTKazU708GQTYF4mB+cmlpT2Is1gLk7XVuEeem8LsQ= -github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= -github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= -github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= -github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/etcd/api/v3 v3.6.5 h1:pMMc42276sgR1j1raO/Qv3QI9Af/AuyQUW6CBAWuntA= go.etcd.io/etcd/api/v3 v3.6.5/go.mod h1:ob0/oWA/UQQlT1BmaEkWQzI0sJ1M0Et0mMpaABxguOQ= go.etcd.io/etcd/client/pkg/v3 v3.6.5 h1:Duz9fAzIZFhYWgRjp/FgNq2gO1jId9Yae/rLn3RrBP8= @@ -377,48 +155,8 @@ go.etcd.io/etcd/client/v3 v3.6.5 h1:yRwZNFBx/35VKHTcLDeO7XVLbCBFbPi+XV4OC3QJf2U= go.etcd.io/etcd/client/v3 v3.6.5/go.mod h1:ZqwG/7TAFZ0BJ0jXRPoJjKQJtbFo/9NIY8uoFFKcCyo= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/collector/component v1.31.0 h1:9LzU8X1RhV3h8/QsAoTX23aFUfoJ3EUc9O/vK+hFpSI= -go.opentelemetry.io/collector/component v1.31.0/go.mod h1:JbZl/KywXJxpUXPbt96qlEXJSym1zQ2hauMxYMuvlxM= -go.opentelemetry.io/collector/component/componentstatus v0.125.0 h1:zlxGQZYd9kknRZSjRpOYW5SBjl0a5zYFYRPbreobXoU= -go.opentelemetry.io/collector/component/componentstatus v0.125.0/go.mod h1:bHXc2W8bqqo9adOvCgvhcO7pYzJOSpyV4cuQ1wiIl04= -go.opentelemetry.io/collector/component/componenttest v0.125.0 h1:E2mpnMQbkMpYoZ3Q8pHx4kod7kedjwRs1xqDpzCe/84= -go.opentelemetry.io/collector/component/componenttest v0.125.0/go.mod h1:pQtsE1u/SPZdTphP5BZP64XbjXSq6wc+mDut5Ws/JDI= -go.opentelemetry.io/collector/consumer v1.31.0 h1:L+y66ywxLHnAxnUxv0JDwUf5bFj53kMxCCyEfRKlM7s= -go.opentelemetry.io/collector/consumer v1.31.0/go.mod h1:rPsqy5ni+c6xNMUkOChleZYO/nInVY6eaBNZ1FmWJVk= -go.opentelemetry.io/collector/consumer/consumertest v0.125.0 h1:TUkxomGS4DAtjBvcWQd2UY4FDLLEKMQD6iOIDUr/5dM= -go.opentelemetry.io/collector/consumer/consumertest v0.125.0/go.mod h1:vkHf3y85cFLDHARO/cTREVjLjOPAV+cQg7lkC44DWOY= -go.opentelemetry.io/collector/consumer/xconsumer v0.125.0 h1:oTreUlk1KpMSWwuHFnstW+orrjGTyvs2xd3o/Dpy+hI= -go.opentelemetry.io/collector/consumer/xconsumer v0.125.0/go.mod h1:FX0G37r0W+wXRgxxFtwEJ4rlsCB+p0cIaxtU3C4hskw= -go.opentelemetry.io/collector/featuregate v1.31.0 h1:20q7plPQZwmAiaYAa6l1m/i2qDITZuWlhjr4EkmeQls= -go.opentelemetry.io/collector/featuregate v1.31.0/go.mod h1:Y/KsHbvREENKvvN9RlpiWk/IGBK+CATBYzIIpU7nccc= -go.opentelemetry.io/collector/internal/telemetry v0.125.0 h1:6lcGOxw3dAg7LfXTKdN8ZjR+l7KvzLdEiPMhhLwG4r4= -go.opentelemetry.io/collector/internal/telemetry v0.125.0/go.mod h1:5GyFslLqjZgq1DZTtFiluxYhhXrCofHgOOOybodDPGE= -go.opentelemetry.io/collector/pdata v1.31.0 h1:P5WuLr1l2JcIvr6Dw2hl01ltp2ZafPnC4Isv+BLTBqU= -go.opentelemetry.io/collector/pdata v1.31.0/go.mod h1:m41io9nWpy7aCm/uD1L9QcKiZwOP0ldj83JEA34dmlk= -go.opentelemetry.io/collector/pdata/pprofile v0.125.0 h1:Qqlx8w1HpiYZ9RQqjmMQIysI0cHNO1nh3E/fCTeFysA= -go.opentelemetry.io/collector/pdata/pprofile v0.125.0/go.mod h1:p/yK023VxAp8hm27/1G5DPTcMIpnJy3cHGAFUQZGyaQ= -go.opentelemetry.io/collector/pdata/testdata v0.125.0 h1:due1Hl0EEVRVwfCkiamRy5E8lS6yalv0lo8Zl/SJtGw= -go.opentelemetry.io/collector/pdata/testdata v0.125.0/go.mod h1:1GpEWlgdMrd+fWsBk37ZC2YmOP5YU3gFQ4rWuCu9g24= -go.opentelemetry.io/collector/pipeline v0.125.0 h1:oitBgcAFqntDB4ihQJUHJSQ8IHqKFpPkaTVbTYdIUzM= -go.opentelemetry.io/collector/pipeline v0.125.0/go.mod h1:TO02zju/K6E+oFIOdi372Wk0MXd+Szy72zcTsFQwXl4= -go.opentelemetry.io/collector/processor v1.31.0 h1:+u7sBUpnCBsHYoALp4hfr9VEjLHHYa4uKENGITe0K9Q= -go.opentelemetry.io/collector/processor v1.31.0/go.mod h1:5hDYJ7/hTdfd2tF2Rj5Hs6+mfyFz2O7CaPzVvW1qHQc= -go.opentelemetry.io/collector/processor/processorhelper v0.125.0 h1:QRpX7oFW88DAZhy+Q93npklRoaQr8ue0GKpeup7C/Fk= -go.opentelemetry.io/collector/processor/processorhelper v0.125.0/go.mod h1:oXRvslUuN62wErcoJrcEJYoTXu5wHyNyJsE+/a9Cc9s= -go.opentelemetry.io/collector/processor/processortest v0.125.0 h1:ZVAN4iZPDcWhpzKqnuok2NIuS5hwGVVQUOWkJFR12tA= -go.opentelemetry.io/collector/processor/processortest v0.125.0/go.mod h1:VAw0IRG35cWTBjBtreXeXJEgqkRegfjrH/EuLhNX2+I= -go.opentelemetry.io/collector/processor/xprocessor v0.125.0 h1:VWYPMW1VmDq6xB7M5SYjBpQCCIq3MhQ3W++wU47QpZM= -go.opentelemetry.io/collector/processor/xprocessor v0.125.0/go.mod h1:bCxUyFVlksANg8wjYZqWVsRB33lkLQ294rTrju/IZiM= -go.opentelemetry.io/collector/semconv v0.125.0 h1:SyRP617YGvNSWRSKMy7Lbk9RaJSR+qFAAfyxJOeZe4s= -go.opentelemetry.io/collector/semconv v0.125.0/go.mod h1:te6VQ4zZJO5Lp8dM2XIhDxDiL45mwX0YAQQWRQ0Qr9U= -go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 h1:ojdSRDvjrnm30beHOmwsSvLpoRF40MlwNCA+Oo93kXU= -go.opentelemetry.io/contrib/bridges/otelzap v0.10.0/go.mod h1:oTTm4g7NEtHSV2i/0FeVdPaPgUIZPfQkFbq0vbzqnv0= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 h1:F7Jx+6hwnZ41NSFTO5q4LYDtJRXBf2PD0rNBkeB/lus= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0/go.mod h1:UHB22Z8QsdRDrnAtX4PntOl36ajSxcdUMt1sF7Y6E7Q= go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= -go.opentelemetry.io/otel/log v0.11.0 h1:c24Hrlk5WJ8JWcwbQxdBqxZdOK7PcP/LFtOtwpDTe3Y= -go.opentelemetry.io/otel/log v0.11.0/go.mod h1:U/sxQ83FPmT29trrifhQg+Zj2lo1/IPN1PF6RTFqdwc= go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= @@ -427,9 +165,6 @@ go.opentelemetry.io/otel/sdk/metric v1.39.0 h1:cXMVVFVgsIf2YL6QkRF4Urbr/aMInf+2W go.opentelemetry.io/otel/sdk/metric v1.39.0/go.mod h1:xq9HEVH7qeX69/JnwEfp6fVq5wosJsY1mt4lLfYdVew= go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= -go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= @@ -447,19 +182,11 @@ go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/crypto v0.50.0 h1:zO47/JPrL6vsNkINmLoo/PH1gcxpls50DNogFvB5ZGI= golang.org/x/crypto v0.50.0/go.mod h1:3muZ7vA7PBCE6xgPX7nkzzjiUq87kRItoJQM1Yo8S+Q= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= -golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.34.0 h1:xIHgNUUnW6sYkcM5Jleh05DvLOtwc6RitGHbDk4akRI= golang.org/x/mod v0.34.0/go.mod h1:ykgH52iCZe79kzLLMhyCUzhMci+nQj+0XkbXpNYtVjY= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -467,12 +194,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.53.0 h1:d+qAbo5L0orcWAr0a9JweQpjXF19LMXJE8Ey7hwOdUA= golang.org/x/net v0.53.0/go.mod h1:JvMuJH7rrdiCfbeHoo3fCQU24Lf5JJwT9W3sJFulfgs= golang.org/x/oauth2 v0.34.0 h1:hqK/t4AKgbqWkdkcAeI8XLmbK+4m4G5YeQRrmiotGlw= @@ -481,47 +202,18 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.20.0 h1:e0PTpb7pjO8GAtTs2dQ6jYa5BWYlMuX047Dco/pItO4= golang.org/x/sync v0.20.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220627191245-f75cf1eec38b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.43.0 h1:Rlag2XtaFTxp19wS8MXlJwTvoh8ArU6ezoyFsMyCTNI= golang.org/x/sys v0.43.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/term v0.42.0 h1:UiKe+zDFmJobeJ5ggPwOshJIVt6/Ft0rcfrXZDLWAWY= golang.org/x/term v0.42.0/go.mod h1:Dq/D+snpsbazcBG5+F9Q1n2rXV8Ma+71xEjTRufARgY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.36.0 h1:JfKh3XmcRPqZPKevfXVpI1wXPTqbkE5f7JA92a55Yxg= golang.org/x/text v0.36.0/go.mod h1:NIdBknypM8iqVmPiuco0Dh6P5Jcdk8lJL0CUebqK164= golang.org/x/time v0.13.0 h1:eUlYslOIt32DgYD6utsuUeHs4d7AsEYLuIAdg7FlYgI= @@ -531,25 +223,14 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.43.0 h1:12BdW9CeB3Z+J/I/wj34VMl8X+fEXBxVR90JeMX5E7s= golang.org/x/tools v0.43.0/go.mod h1:uHkMso649BX2cZK6+RpuIPXS3ho2hZo4FVwfoy1vIk0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.16.0 h1:5+ul4Swaf3ESvrOnidPp4GZbzf0mxVQpDCYUQE7OJfk= gonum.org/v1/gonum v0.16.0/go.mod h1:fef3am4MQ93R2HHpKnLk4/Tbh/s0+wqD5nfa6Pnwy4E= -google.golang.org/api v0.251.0 h1:6lea5nHRT8RUmpy9kkC2PJYnhnDAB13LqrLSVQlMIE8= -google.golang.org/api v0.251.0/go.mod h1:Rwy0lPf/TD7+T2VhYcffCHhyyInyuxGjICxdfLqT7KI= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822 h1:rHWScKit0gvAPuOnu87KpaYtjK5zBMLcULh7gxkCXu4= -google.golang.org/genproto v0.0.0-20250603155806-513f23925822/go.mod h1:HubltRL7rMh0LfnQPkMH4NPDFEWp0jw3vixw7jEM53s= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls= google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto= google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww= @@ -571,9 +252,6 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0 h1:n6jtcsulIzXPJaxegRbvFNNrZDjbij7ny3gmSP gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWMG4EsWvDvM72M= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= -gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/plugin.cfg b/plugin.cfg index 3f092ab357..f77055a303 100644 --- a/plugin.cfg +++ b/plugin.cfg @@ -1,77 +1,23 @@ -# Directives are registered in the order they should be executed. +# Plugins used by the OpenShift cluster-dns-operator Corefile template. +# This is the source of truth for the OpenShift plugin set. # -# Ordering is VERY important. Every plugin will feel the effects of all other -# plugin below (after) them during a request, but they must not care what plugin -# above them are doing. - -# How to rebuild with updated plugin configurations: Modify the list below and -# run `go generate && go build` - -# The parser takes the input format of: -# -# : -# Or -# : -# -# External plugin example: +# Run `make -f Makefile.ocp generate-plugins` after editing this file. # -# log:github.com/coredns/coredns/plugin/log -# Local plugin example: -# log:log +# Format: : +# Internal plugins use short names (resolved to plugin/). +# External plugins use fully-qualified Go import paths. -root:root -metadata:metadata -geoip:geoip cancel:cancel -tls:tls -quic:quic -timeouts:timeouts -multisocket:multisocket reload:reload -nsid:nsid bufsize:bufsize -bind:bind -debug:debug -trace:trace ready:ready health:health -pprof:pprof prometheus:metrics errors:errors log:log -dnstap:dnstap -local:local -dns64:dns64 -acl:acl -any:any chaos:chaos -loadbalance:loadbalance -tsig:tsig ocp_dnsnameresolver:github.com/openshift/coredns-ocp-dnsnameresolver cache:cache -rewrite:rewrite -header:header -dnssec:dnssec -autopath:autopath -minimal:minimal -template:template -transfer:transfer -hosts:hosts -route53:route53 -azure:azure -clouddns:clouddns -k8s_external:k8s_external kubernetes:kubernetes -file:file -auto:auto -secondary:secondary -etcd:etcd loop:loop forward:forward -grpc:grpc -erratic:erratic -whoami:whoami -on:github.com/coredns/caddy/onevent -sign:sign -view:view -nomad:nomad diff --git a/plugin/acl/README.md b/plugin/acl/README.md deleted file mode 100644 index d957d24ec9..0000000000 --- a/plugin/acl/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# acl - -## Name - -*acl* - enforces access control policies on source ip and prevents unauthorized access to DNS servers. - -## Description - -With `acl` enabled, users are able to block or filter suspicious DNS queries by configuring IP filter rule sets, i.e. allowing authorized queries or blocking unauthorized queries. - - -When evaluating the rule sets, _acl_ uses the source IP of the TCP/UDP headers of the DNS query received by CoreDNS. -This source IP will be different than the IP of the client originating the request in cases where the source IP of the request is changed in transit. For example: -* if the request passes though an intermediate forwarding DNS server or recursive DNS server before reaching CoreDNS -* if the request traverses a Source NAT before reaching CoreDNS - -This plugin can be used multiple times per Server Block. - -## Syntax - -``` -acl [ZONES...] { - ACTION [type QTYPE...] [net SOURCE...] -} -``` - -- **ZONES** zones it should be authoritative for. If empty, the zones from the configuration block are used. -- **ACTION** (*allow*, *block*, *filter*, or *drop*) defines the way to deal with DNS queries matched by this rule. The default action is *allow*, which means a DNS query not matched by any rules will be allowed to recurse. The difference between *block* and *filter* is that block returns status code of *REFUSED* while filter returns an empty set *NOERROR*. *drop* however returns no response to the client. -- **QTYPE** is the query type to match for the requests to be allowed or blocked. Common resource record types are supported. `*` stands for all record types. The default behavior for an omitted `type QTYPE...` is to match all kinds of DNS queries (same as `type *`). -- **SOURCE** is the source IP address to match for the requests to be allowed or blocked. Typical CIDR notation and single IP address are supported. `*` stands for all possible source IP addresses. - -## Examples - -To demonstrate the usage of plugin acl, here we provide some typical examples. - -Block all DNS queries with record type A from 192.168.0.0/16: - -~~~ corefile -. { - acl { - block type A net 192.168.0.0/16 - } -} -~~~ - -Filter all DNS queries with record type A from 192.168.0.0/16: - -~~~ corefile -. { - acl { - filter type A net 192.168.0.0/16 - } -} -~~~ - -Block all DNS queries from 192.168.0.0/16 except for 192.168.1.0/24: - -~~~ corefile -. { - acl { - allow net 192.168.1.0/24 - block net 192.168.0.0/16 - } -} -~~~ - -Allow only DNS queries from 192.168.0.0/24 and 192.168.1.0/24: - -~~~ corefile -. { - acl { - allow net 192.168.0.0/24 192.168.1.0/24 - block - } -} -~~~ - -Block all DNS queries from 192.168.1.0/24 towards a.example.org: - -~~~ corefile -example.org { - acl a.example.org { - block net 192.168.1.0/24 - } -} -~~~ - -Drop all DNS queries from 192.0.2.0/24: - -~~~ corefile -. { - acl { - drop net 192.0.2.0/24 - } -} -~~~ - -## Metrics - -If monitoring is enabled (via the _prometheus_ plugin) then the following metrics are exported: - -- `coredns_acl_blocked_requests_total{server, zone, view}` - counter of DNS requests being blocked. - -- `coredns_acl_filtered_requests_total{server, zone, view}` - counter of DNS requests being filtered. - -- `coredns_acl_allowed_requests_total{server, view}` - counter of DNS requests being allowed. - -- `coredns_acl_dropped_requests_total{server, zone, view}` - counter of DNS requests being dropped. - -The `server` and `zone` labels are explained in the _metrics_ plugin documentation. diff --git a/plugin/acl/acl.go b/plugin/acl/acl.go deleted file mode 100644 index 2632326325..0000000000 --- a/plugin/acl/acl.go +++ /dev/null @@ -1,151 +0,0 @@ -package acl - -import ( - "context" - "net" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/request" - - "github.com/infobloxopen/go-trees/iptree" - "github.com/miekg/dns" -) - -// ACL enforces access control policies on DNS queries. -type ACL struct { - Next plugin.Handler - - Rules []rule -} - -// rule defines a list of Zones and some ACL policies which will be -// enforced on them. -type rule struct { - zones []string - policies []policy -} - -// action defines the action against queries. -type action int - -// policy defines the ACL policy for DNS queries. -// A policy performs the specified action (block/allow) on all DNS queries -// matched by source IP or QTYPE. -type policy struct { - action action - qtypes map[uint16]struct{} - filter *iptree.Tree -} - -const ( - // actionNone does nothing on the queries. - actionNone = iota - // actionAllow allows authorized queries to recurse. - actionAllow - // actionBlock blocks unauthorized queries towards protected DNS zones. - actionBlock - // actionFilter returns empty sets for queries towards protected DNS zones. - actionFilter - // actionDrop does not respond for queries towards the protected DNS zones. - actionDrop -) - -var log = clog.NewWithPlugin("acl") - -// ServeDNS implements the plugin.Handler interface. -func (a ACL) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - -RulesCheckLoop: - for _, rule := range a.Rules { - // check zone. - zone := plugin.Zones(rule.zones).Matches(state.Name()) - if zone == "" { - continue - } - - action := matchWithPolicies(rule.policies, w, r) - switch action { - case actionDrop: - { - RequestDropCount.WithLabelValues(metrics.WithServer(ctx), zone, metrics.WithView(ctx)).Inc() - return dns.RcodeSuccess, nil - } - case actionBlock: - { - m := new(dns.Msg). - SetRcode(r, dns.RcodeRefused). - SetEdns0(4096, true) - ede := dns.EDNS0_EDE{InfoCode: dns.ExtendedErrorCodeBlocked} - m.IsEdns0().Option = append(m.IsEdns0().Option, &ede) - w.WriteMsg(m) - RequestBlockCount.WithLabelValues(metrics.WithServer(ctx), zone, metrics.WithView(ctx)).Inc() - return dns.RcodeSuccess, nil - } - case actionAllow: - { - break RulesCheckLoop - } - case actionFilter: - { - m := new(dns.Msg). - SetRcode(r, dns.RcodeSuccess). - SetEdns0(4096, true) - ede := dns.EDNS0_EDE{InfoCode: dns.ExtendedErrorCodeFiltered} - m.IsEdns0().Option = append(m.IsEdns0().Option, &ede) - w.WriteMsg(m) - RequestFilterCount.WithLabelValues(metrics.WithServer(ctx), zone, metrics.WithView(ctx)).Inc() - return dns.RcodeSuccess, nil - } - } - } - - RequestAllowCount.WithLabelValues(metrics.WithServer(ctx), metrics.WithView(ctx)).Inc() - return plugin.NextOrFailure(state.Name(), a.Next, ctx, w, r) -} - -// matchWithPolicies matches the DNS query with a list of ACL polices and returns suitable -// action against the query. -func matchWithPolicies(policies []policy, w dns.ResponseWriter, r *dns.Msg) action { - state := request.Request{W: w, Req: r} - - var ip net.IP - if idx := strings.IndexByte(state.IP(), '%'); idx >= 0 { - ip = net.ParseIP(state.IP()[:idx]) - } else { - ip = net.ParseIP(state.IP()) - } - - // if the parsing did not return a proper response then we simply return 'actionBlock' to - // block the query - if ip == nil { - log.Errorf("Blocking request. Unable to parse source address: %v", state.IP()) - return actionBlock - } - qtype := state.QType() - for _, policy := range policies { - // dns.TypeNone matches all query types. - _, matchAll := policy.qtypes[dns.TypeNone] - _, match := policy.qtypes[qtype] - if !matchAll && !match { - continue - } - - _, contained := policy.filter.GetByIP(ip) - if !contained { - continue - } - - // matched. - return policy.action - } - return actionNone -} - -// Name implements the plugin.Handler interface. -func (a ACL) Name() string { - return "acl" -} diff --git a/plugin/acl/acl_test.go b/plugin/acl/acl_test.go deleted file mode 100644 index f867d1f529..0000000000 --- a/plugin/acl/acl_test.go +++ /dev/null @@ -1,599 +0,0 @@ -package acl - -import ( - "context" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -type testResponseWriter struct { - test.ResponseWriter - Rcode int - Msg *dns.Msg -} - -func (t *testResponseWriter) setRemoteIP(ip string) { - t.RemoteIP = ip -} - -func (t *testResponseWriter) setZone(zone string) { - t.Zone = zone -} - -// WriteMsg implement dns.ResponseWriter interface. -func (t *testResponseWriter) WriteMsg(m *dns.Msg) error { - t.Rcode = m.Rcode - t.Msg = m - return nil -} - -func NewTestControllerWithZones(input string, zones []string) *caddy.Controller { - ctr := caddy.NewTestController("dns", input) - ctr.ServerBlockKeys = append(ctr.ServerBlockKeys, zones...) - return ctr -} - -func TestACLServeDNS(t *testing.T) { - type args struct { - domain string - sourceIP string - qtype uint16 - } - tests := []struct { - name string - config string - zones []string - args args - wantRcode int - wantErr bool - wantExtendedErrorCode uint16 - expectNoResponse bool - }{ - // IPv4 tests. - { - name: "Blacklist 1 BLOCKED", - config: `acl example.org { - block type A net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 1 ALLOWED", - config: `acl example.org { - block type A net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.167.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Blacklist 2 BLOCKED", - config: ` - acl example.org { - block type * net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.0.2", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 3 BLOCKED", - config: `acl example.org { - block type A - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "10.1.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 3 ALLOWED", - config: `acl example.org { - block type A - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "10.1.0.2", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Blacklist 4 Single IP BLOCKED", - config: `acl example.org { - block type A net 192.168.1.2 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 4 Single IP ALLOWED", - config: `acl example.org { - block type A net 192.168.1.2 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.3", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Filter 1 FILTERED", - config: `acl example.org { - filter type A net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - wantExtendedErrorCode: dns.ExtendedErrorCodeFiltered, - }, - { - name: "Filter 1 ALLOWED", - config: `acl example.org { - filter type A net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.167.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Whitelist 1 ALLOWED", - config: `acl example.org { - allow net 192.168.0.0/16 - block - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Whitelist 1 REFUSED", - config: `acl example.org { - allow type * net 192.168.0.0/16 - block - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "10.1.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Drop 1 DROPPED", - config: `acl example.org { - drop net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.0.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Subnet-Order 1 REFUSED", - config: `acl example.org { - block net 192.168.1.0/24 - drop net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Subnet-Order 2 DROPPED", - config: `acl example.org { - drop net 192.168.0.0/16 - block net 192.168.1.0/24 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.1", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Drop-Type 1 DROPPED", - config: `acl example.org { - drop type A - allow net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.1", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Drop-Type 2 ALLOWED", - config: `acl example.org { - drop type A - allow net 192.168.0.0/16 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.1", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Fine-Grained 1 REFUSED", - config: `acl a.example.org { - block type * net 192.168.1.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "a.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Fine-Grained 1 ALLOWED", - config: `acl a.example.org { - block net 192.168.1.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "www.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Fine-Grained 2 REFUSED", - config: `acl example.org { - block net 192.168.1.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "a.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Fine-Grained 2 ALLOWED", - config: `acl { - block net 192.168.1.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "a.example.com.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Fine-Grained 3 REFUSED", - config: `acl a.example.org { - block net 192.168.1.0/24 - } - acl b.example.org { - block type * net 192.168.2.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "b.example.org.", - sourceIP: "192.168.2.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Fine-Grained 3 ALLOWED", - config: `acl a.example.org { - block net 192.168.1.0/24 - } - acl b.example.org { - block net 192.168.2.0/24 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "b.example.org.", - sourceIP: "192.168.1.2", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - // IPv6 tests. - { - name: "Blacklist 1 BLOCKED IPv6", - config: `acl example.org { - block type A net 2001:db8:abcd:0012::0/64 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:db8:abcd:0012::1230", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 1 ALLOWED IPv6", - config: `acl example.org { - block type A net 2001:db8:abcd:0012::0/64 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:db8:abcd:0013::0", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Blacklist 2 BLOCKED IPv6", - config: `acl example.org { - block type A - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 3 Single IP BLOCKED IPv6", - config: `acl example.org { - block type A net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Blacklist 3 Single IP ALLOWED IPv6", - config: `acl example.org { - block type A net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7335", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Fine-Grained 1 REFUSED IPv6", - config: `acl a.example.org { - block type * net 2001:db8:abcd:0012::0/64 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "a.example.org.", - sourceIP: "2001:db8:abcd:0012:2019::0", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Fine-Grained 1 ALLOWED IPv6", - config: `acl a.example.org { - block net 2001:db8:abcd:0012::0/64 - }`, - zones: []string{"example.org"}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:db8:abcd:0012:2019::0", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - }, - { - name: "Blacklist Address%ifname", - config: `acl example.org { - block type AAAA net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - zones: []string{"eth0"}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Drop 1 DROPPED IPV6", - config: `acl example.org { - drop net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Subnet-Order 1 REFUSED IPv6", - config: `acl example.org { - block net 2001:db8:abcd:0012:8000::/66 - drop net 2001:db8:abcd:0012::0/64 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:db8:abcd:0012:8000::1", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeRefused, - wantExtendedErrorCode: dns.ExtendedErrorCodeBlocked, - }, - { - name: "Subnet-Order 2 DROPPED IPv6", - config: `acl example.org { - drop net 2001:db8:abcd:0012::0/64 - block net 2001:db8:abcd:0012:8000::/66 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:db8:abcd:0012:8000::1", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Drop-Type 1 DROPPED IPv6", - config: `acl example.org { - drop type A - allow net 2001:db8:85a3:0000::0/64 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeA, - }, - wantRcode: dns.RcodeSuccess, - expectNoResponse: true, - }, - { - name: "Drop-Type 2 ALLOWED IPv6", - config: `acl example.org { - drop type A - allow net 2001:db8:85a3:0000::0/64 - }`, - zones: []string{}, - args: args{ - domain: "www.example.org.", - sourceIP: "2001:0db8:85a3:0000:0000:8a2e:0370:7334", - qtype: dns.TypeAAAA, - }, - wantRcode: dns.RcodeSuccess, - }, - } - - ctx := context.Background() - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - ctr := NewTestControllerWithZones(tt.config, tt.zones) - a, err := parse(ctr) - a.Next = test.NextHandler(dns.RcodeSuccess, nil) - if err != nil { - t.Errorf("Error: Cannot parse acl from config: %v", err) - return - } - - w := &testResponseWriter{} - m := new(dns.Msg) - w.setRemoteIP(tt.args.sourceIP) - if len(tt.zones) > 0 { - w.setZone(tt.zones[0]) - } - m.SetQuestion(tt.args.domain, tt.args.qtype) - _, err = a.ServeDNS(ctx, w, m) - if (err != nil) != tt.wantErr { - t.Errorf("Error: acl.ServeDNS() error = %v, wantErr %v", err, tt.wantErr) - return - } - if w.Rcode != tt.wantRcode { - t.Errorf("Error: acl.ServeDNS() Rcode = %v, want %v", w.Rcode, tt.wantRcode) - } - if tt.expectNoResponse && w.Msg != nil { - t.Errorf("Error: acl.ServeDNS() responded to client when not expected") - } - if tt.wantExtendedErrorCode != 0 { - matched := false - for _, opt := range w.Msg.IsEdns0().Option { - if ede, ok := opt.(*dns.EDNS0_EDE); ok { - if ede.InfoCode != tt.wantExtendedErrorCode { - t.Errorf("Error: acl.ServeDNS() Extended DNS Error = %v, want %v", ede.InfoCode, tt.wantExtendedErrorCode) - } - matched = true - } - } - if !matched { - t.Error("Error: acl.ServeDNS() missing Extended DNS Error option") - } - } - }) - } -} diff --git a/plugin/acl/metrics.go b/plugin/acl/metrics.go deleted file mode 100644 index a8d8232546..0000000000 --- a/plugin/acl/metrics.go +++ /dev/null @@ -1,39 +0,0 @@ -package acl - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // RequestBlockCount is the number of DNS requests being blocked. - RequestBlockCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "blocked_requests_total", - Help: "Counter of DNS requests being blocked.", - }, []string{"server", "zone", "view"}) - // RequestFilterCount is the number of DNS requests being filtered. - RequestFilterCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "filtered_requests_total", - Help: "Counter of DNS requests being filtered.", - }, []string{"server", "zone", "view"}) - // RequestAllowCount is the number of DNS requests being Allowed. - RequestAllowCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "allowed_requests_total", - Help: "Counter of DNS requests being allowed.", - }, []string{"server", "view"}) - // RequestDropCount is the number of DNS requests being dropped. - RequestDropCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "dropped_requests_total", - Help: "Counter of DNS requests being dropped.", - }, []string{"server", "zone", "view"}) -) diff --git a/plugin/acl/setup.go b/plugin/acl/setup.go deleted file mode 100644 index cd2e222d9e..0000000000 --- a/plugin/acl/setup.go +++ /dev/null @@ -1,155 +0,0 @@ -package acl - -import ( - "net" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - - "github.com/infobloxopen/go-trees/iptree" - "github.com/miekg/dns" -) - -const pluginName = "acl" - -func init() { plugin.Register(pluginName, setup) } - -func newDefaultFilter() *iptree.Tree { - defaultFilter := iptree.NewTree() - _, IPv4All, _ := net.ParseCIDR("0.0.0.0/0") - _, IPv6All, _ := net.ParseCIDR("::/0") - defaultFilter.InplaceInsertNet(IPv4All, struct{}{}) - defaultFilter.InplaceInsertNet(IPv6All, struct{}{}) - return defaultFilter -} - -func setup(c *caddy.Controller) error { - a, err := parse(c) - if err != nil { - return plugin.Error(pluginName, err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - a.Next = next - return a - }) - - return nil -} - -func parse(c *caddy.Controller) (ACL, error) { - a := ACL{} - for c.Next() { - r := rule{} - args := c.RemainingArgs() - r.zones = plugin.OriginsFromArgsOrServerBlock(args, c.ServerBlockKeys) - - for c.NextBlock() { - p := policy{} - - action := strings.ToLower(c.Val()) - switch action { - case "allow": - p.action = actionAllow - case "block": - p.action = actionBlock - case "filter": - p.action = actionFilter - case "drop": - p.action = actionDrop - default: - return a, c.Errf("unexpected token %q; expect 'allow', 'block', 'filter' or 'drop'", c.Val()) - } - - p.qtypes = make(map[uint16]struct{}) - p.filter = iptree.NewTree() - - hasTypeSection := false - hasNetSection := false - - remainingTokens := c.RemainingArgs() - for len(remainingTokens) > 0 { - if !isPreservedIdentifier(remainingTokens[0]) { - return a, c.Errf("unexpected token %q; expect 'type | net'", remainingTokens[0]) - } - section := strings.ToLower(remainingTokens[0]) - - i := 1 - var tokens []string - for ; i < len(remainingTokens) && !isPreservedIdentifier(remainingTokens[i]); i++ { - tokens = append(tokens, remainingTokens[i]) - } - remainingTokens = remainingTokens[i:] - - if len(tokens) == 0 { - return a, c.Errf("no token specified in %q section", section) - } - - switch section { - case "type": - hasTypeSection = true - for _, token := range tokens { - if token == "*" { - p.qtypes[dns.TypeNone] = struct{}{} - break - } - qtype, ok := dns.StringToType[token] - if !ok { - return a, c.Errf("unexpected token %q; expect legal QTYPE", token) - } - p.qtypes[qtype] = struct{}{} - } - case "net": - hasNetSection = true - for _, token := range tokens { - if token == "*" { - p.filter = newDefaultFilter() - break - } - token = normalize(token) - _, source, err := net.ParseCIDR(token) - if err != nil { - return a, c.Errf("illegal CIDR notation %q", token) - } - p.filter.InplaceInsertNet(source, struct{}{}) - } - default: - return a, c.Errf("unexpected token %q; expect 'type | net'", section) - } - } - - // optional `type` section means all record types. - if !hasTypeSection { - p.qtypes[dns.TypeNone] = struct{}{} - } - - // optional `net` means all ip addresses. - if !hasNetSection { - p.filter = newDefaultFilter() - } - - r.policies = append(r.policies, p) - } - a.Rules = append(a.Rules, r) - } - return a, nil -} - -func isPreservedIdentifier(token string) bool { - identifier := strings.ToLower(token) - return identifier == "type" || identifier == "net" -} - -// normalize appends '/32' for any single IPv4 address and '/128' for IPv6. -func normalize(rawNet string) string { - if idx := strings.IndexAny(rawNet, "/"); idx >= 0 { - return rawNet - } - - if idx := strings.IndexAny(rawNet, ":"); idx >= 0 { - return rawNet + "/128" - } - return rawNet + "/32" -} diff --git a/plugin/acl/setup_test.go b/plugin/acl/setup_test.go deleted file mode 100644 index 5cd51bb3a1..0000000000 --- a/plugin/acl/setup_test.go +++ /dev/null @@ -1,273 +0,0 @@ -package acl - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSetup(t *testing.T) { - tests := []struct { - name string - config string - wantErr bool - }{ - // IPv4 tests. - { - "Blacklist 1", - `acl { - block type A net 192.168.0.0/16 - }`, - false, - }, - { - "Blacklist 2", - `acl { - block type * net 192.168.0.0/16 - }`, - false, - }, - { - "Blacklist 3", - `acl { - block type A net * - }`, - false, - }, - { - "Blacklist 4", - `acl { - allow type * net 192.168.1.0/24 - block type * net 192.168.0.0/16 - }`, - false, - }, - { - "Filter 1", - `acl { - filter type A net 192.168.0.0/16 - }`, - false, - }, - { - "Whitelist 1", - `acl { - allow type * net 192.168.0.0/16 - block type * net * - }`, - false, - }, - { - "Drop 1", - `acl { - drop type * net 192.168.0.0/16 - }`, - false, - }, - { - "fine-grained 1", - `acl a.example.org { - block type * net 192.168.1.0/24 - }`, - false, - }, - { - "fine-grained 2", - `acl a.example.org { - block type * net 192.168.1.0/24 - } - acl b.example.org { - block type * net 192.168.2.0/24 - }`, - false, - }, - { - "Multiple Networks 1", - `acl example.org { - block type * net 192.168.1.0/24 192.168.3.0/24 - }`, - false, - }, - { - "Multiple Qtypes 1", - `acl example.org { - block type TXT ANY CNAME net 192.168.3.0/24 - }`, - false, - }, - { - "Missing argument 1", - `acl { - block A net 192.168.0.0/16 - }`, - true, - }, - { - "Missing argument 2", - `acl { - block type net 192.168.0.0/16 - }`, - true, - }, - { - "Illegal argument 1", - `acl { - block type ABC net 192.168.0.0/16 - }`, - true, - }, - { - "Illegal argument 2", - `acl { - blck type A net 192.168.0.0/16 - }`, - true, - }, - { - "Illegal argument 3", - `acl { - block type A net 192.168.0/16 - }`, - true, - }, - { - "Illegal argument 4", - `acl { - block type A net 192.168.0.0/33 - }`, - true, - }, - // IPv6 tests. - { - "Blacklist 1 IPv6", - `acl { - block type A net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - false, - }, - { - "Blacklist 2 IPv6", - `acl { - block type * net 2001:db8:85a3::8a2e:370:7334 - }`, - false, - }, - { - "Blacklist 3 IPv6", - `acl { - block type A - }`, - false, - }, - { - "Blacklist 4 IPv6", - `acl { - allow net 2001:db8:abcd:0012::0/64 - block net 2001:db8:abcd:0012::0/48 - }`, - false, - }, - { - "Filter 1 IPv6", - `acl { - filter type A net 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - }`, - false, - }, - { - "Whitelist 1 IPv6", - `acl { - allow net 2001:db8:abcd:0012::0/64 - block - }`, - false, - }, - { - "Drop 1 IPv6", - `acl { - drop net 2001:db8:abcd:0012::0/64 - }`, - false, - }, - { - "fine-grained 1 IPv6", - `acl a.example.org { - block net 2001:db8:abcd:0012::0/64 - }`, - false, - }, - { - "fine-grained 2 IPv6", - `acl a.example.org { - block net 2001:db8:abcd:0012::0/64 - } - acl b.example.org { - block net 2001:db8:abcd:0013::0/64 - }`, - false, - }, - { - "Multiple Networks 1 IPv6", - `acl example.org { - block net 2001:db8:abcd:0012::0/64 2001:db8:85a3::8a2e:370:7334/64 - }`, - false, - }, - { - "Illegal argument 1 IPv6", - `acl { - block type A net 2001::85a3::8a2e:370:7334 - }`, - true, - }, - { - "Illegal argument 2 IPv6", - `acl { - block type A net 2001:db8:85a3:::8a2e:370:7334 - }`, - true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - ctr := caddy.NewTestController("dns", tt.config) - if err := setup(ctr); (err != nil) != tt.wantErr { - t.Errorf("Error: setup() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} - -func TestNormalize(t *testing.T) { - type args struct { - rawNet string - } - tests := []struct { - name string - args args - want string - }{ - { - "Network range 1", - args{"10.218.10.8/24"}, - "10.218.10.8/24", - }, - { - "IP address 1", - args{"10.218.10.8"}, - "10.218.10.8/32", - }, - { - "IPv6 address 1", - args{"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}, - "2001:0db8:85a3:0000:0000:8a2e:0370:7334/128", - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if got := normalize(tt.args.rawNet); got != tt.want { - t.Errorf("Error: normalize() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/plugin/any/README.md b/plugin/any/README.md deleted file mode 100644 index 25e4ecf4aa..0000000000 --- a/plugin/any/README.md +++ /dev/null @@ -1,36 +0,0 @@ - -# any - -## Name - -*any* - gives a minimal response to ANY queries. - -## Description - -*any* basically blocks ANY queries by responding to them with a short HINFO reply. See [RFC -8482](https://tools.ietf.org/html/rfc8482) for details. - -## Syntax - -~~~ txt -any -~~~ - -## Examples - -~~~ corefile -example.org { - whoami - any -} -~~~ - -A `dig +nocmd ANY example.org +noall +answer` now returns: - -~~~ txt -example.org. 8482 IN HINFO "ANY obsoleted" "See RFC 8482" -~~~ - -## See Also - -[RFC 8482](https://tools.ietf.org/html/rfc8482). diff --git a/plugin/any/any.go b/plugin/any/any.go deleted file mode 100644 index 9a05e37b22..0000000000 --- a/plugin/any/any.go +++ /dev/null @@ -1,32 +0,0 @@ -package any - -import ( - "context" - - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -// Any is a plugin that returns a HINFO reply to ANY queries. -type Any struct { - Next plugin.Handler -} - -// ServeDNS implements the plugin.Handler interface. -func (a Any) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if r.Question[0].Qtype != dns.TypeANY { - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - m := new(dns.Msg) - m.SetReply(r) - hdr := dns.RR_Header{Name: r.Question[0].Name, Ttl: 8482, Class: dns.ClassINET, Rrtype: dns.TypeHINFO} - m.Answer = []dns.RR{&dns.HINFO{Hdr: hdr, Cpu: "ANY obsoleted", Os: "See RFC 8482"}} - - w.WriteMsg(m) - return 0, nil -} - -// Name implements the Handler interface. -func (a Any) Name() string { return "any" } diff --git a/plugin/any/any_test.go b/plugin/any/any_test.go deleted file mode 100644 index 846a804a0a..0000000000 --- a/plugin/any/any_test.go +++ /dev/null @@ -1,67 +0,0 @@ -package any - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestAny(t *testing.T) { - req := new(dns.Msg) - req.SetQuestion("example.org.", dns.TypeANY) - a := &Any{} - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := a.ServeDNS(context.TODO(), rec, req) - - if err != nil { - t.Errorf("Expected no error, but got %q", err) - } - - if rec.Msg.Answer[0].(*dns.HINFO).Cpu != "ANY obsoleted" { - t.Errorf("Expected HINFO, but got %q", rec.Msg.Answer[0].(*dns.HINFO).Cpu) - } -} - -func TestAnyNonANYQuery(t *testing.T) { - tests := []struct { - name string - qtype uint16 - }{ - {"A query", dns.TypeA}, - {"AAAA query", dns.TypeAAAA}, - {"MX query", dns.TypeMX}, - {"TXT query", dns.TypeTXT}, - {"CNAME query", dns.TypeCNAME}, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - req := new(dns.Msg) - req.SetQuestion("example.org.", tt.qtype) - - nextCalled := false - a := &Any{ - Next: test.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - nextCalled = true - return 0, nil - }), - } - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := a.ServeDNS(context.TODO(), rec, req) - - if err != nil { - t.Errorf("Expected no error, but got %q", err) - } - - if !nextCalled { - t.Error("Expected Next handler to be called for non-ANY query") - } - }) - } -} diff --git a/plugin/any/setup.go b/plugin/any/setup.go deleted file mode 100644 index 5c8a93b9d2..0000000000 --- a/plugin/any/setup.go +++ /dev/null @@ -1,20 +0,0 @@ -package any - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("any", setup) } - -func setup(c *caddy.Controller) error { - a := Any{} - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - a.Next = next - return a - }) - - return nil -} diff --git a/plugin/any/setup_test.go b/plugin/any/setup_test.go deleted file mode 100644 index 49c5ae827c..0000000000 --- a/plugin/any/setup_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package any - -import ( - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestSetup(t *testing.T) { - c := caddy.NewTestController("dns", `any`) - if err := setup(c); err != nil { - t.Fatalf("Expected no errors, but got: %v", err) - } - - // Check that the plugin was added to the config - cfg := dnsserver.GetConfig(c) - if len(cfg.Plugin) == 0 { - t.Error("Expected plugin to be added to config") - } -} diff --git a/plugin/auto/README.md b/plugin/auto/README.md deleted file mode 100644 index 661e419ab3..0000000000 --- a/plugin/auto/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# auto - -## Name - -*auto* - enables serving zone data from an RFC 1035-style master file, which is automatically picked up from disk. - -## Description - -The *auto* plugin is used for an "old-style" DNS server. It serves from a preloaded file that exists -on disk. If the zone file contains signatures (i.e. is signed, i.e. using DNSSEC) correct DNSSEC answers -are returned. Only NSEC is supported! If you use this setup *you* are responsible for re-signing the -zonefile. New or changed zones are automatically picked up from disk only when SOA's serial changes. If the zones are not updated via a zone transfer, the serial must be manually changed. - -## Syntax - -~~~ -auto [ZONES...] { - directory DIR [REGEXP ORIGIN_TEMPLATE] - reload DURATION -} -~~~ - -**ZONES** zones it should be authoritative for. If empty, the zones from the configuration block -are used. - -* `directory` loads zones from the specified **DIR**. If a file name matches **REGEXP** it will be - used to extract the origin. **ORIGIN_TEMPLATE** will be used as a template for the origin. Strings - like `{}` are replaced with the respective matches in the file name, e.g. `{1}` is the - first match, `{2}` is the second. The default is: `db\.(.*) {1}` i.e. from a file with the - name `db.example.com`, the extracted origin will be `example.com`. -* `reload` interval to perform reloads of zones if SOA version changes and zonefiles. It specifies how often CoreDNS should scan the directory to watch for file removal and addition. Default is one minute. - Value of `0` means to not scan for changes and reload. eg. `30s` checks zonefile every 30 seconds - and reloads zone when serial changes. - -For enabling zone transfers look at the *transfer* plugin. - -All directives from the *file* plugin are supported. Note that *auto* will load all zones found, -even though the directive might only receive queries for a specific zone. I.e: - -~~~ corefile -. { - auto example.org { - directory /etc/coredns/zones - } -} -~~~ -Will happily pick up a zone for `example.COM`, except it will never be queried, because the *auto* -directive only is authoritative for `example.ORG`. - -## Examples - -Load `org` domains from `/etc/coredns/zones/org` and allow transfers to the internet, but send -notifies to 10.240.1.1 - -~~~ corefile -org { - auto { - directory /etc/coredns/zones/org - } - transfer { - to * - to 10.240.1.1 - } -} -~~~ - -Load `org` domains from `/etc/coredns/zones/org` and looks for file names as `www.db.example.org`, -where `example.org` is the origin. Scan every 45 seconds. - -~~~ corefile -org { - auto { - directory /etc/coredns/zones/org www\.db\.(.*) {1} - reload 45s - } -} -~~~ - -## Also - -Use the *root* plugin to help you specify the location of the zone files. See the *transfer* plugin -to enable outgoing zone transfers. diff --git a/plugin/auto/auto.go b/plugin/auto/auto.go deleted file mode 100644 index fa62d8f14a..0000000000 --- a/plugin/auto/auto.go +++ /dev/null @@ -1,104 +0,0 @@ -// Package auto implements an on-the-fly loading file backend. -package auto - -import ( - "context" - "regexp" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/plugin/transfer" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -type ( - // Auto holds the zones and the loader configuration for automatically loading zones. - Auto struct { - Next plugin.Handler - *Zones - - metrics *metrics.Metrics - transfer *transfer.Transfer - loader - } - - loader struct { - directory string - template string - re *regexp.Regexp - - ReloadInterval time.Duration - upstream *upstream.Upstream // Upstream for looking up names during the resolution process. - } -) - -// ServeDNS implements the plugin.Handler interface. -func (a Auto) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - - // Precheck with the origins, i.e. are we allowed to look here? - zone := plugin.Zones(a.Zones.Origins()).Matches(qname) - if zone == "" { - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - // Now the real zone. - zone = plugin.Zones(a.Zones.Names()).Matches(qname) - if zone == "" { - // If no next plugin is configured, it's more correct to return REFUSED as auto acts as an authoritative server - if a.Next == nil { - return dns.RcodeRefused, nil - } - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - a.RLock() - z, ok := a.Z[zone] - a.RUnlock() - - if !ok || z == nil { - return dns.RcodeServerFailure, nil - } - - // If transfer is not loaded, we'll see these, answer with refused (no transfer allowed). - if state.QType() == dns.TypeAXFR || state.QType() == dns.TypeIXFR { - return dns.RcodeRefused, nil - } - - answer, ns, extra, result := z.Lookup(ctx, state, qname) - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - m.Answer, m.Ns, m.Extra = answer, ns, extra - - switch result { - case file.Success: - case file.NoData: - case file.NameError: - m.Rcode = dns.RcodeNameError - case file.Delegation: - m.Authoritative = false - case file.ServerFailure: - // If the result is SERVFAIL and the answer is non-empty, then the SERVFAIL came from an - // external CNAME lookup and the answer contains the CNAME with no target record. We should - // write the CNAME record to the client instead of sending an empty SERVFAIL response. - if len(m.Answer) == 0 { - return dns.RcodeServerFailure, nil - } - // The rcode in the response should be the rcode received from the target lookup. RFC 6604 section 3 - m.Rcode = dns.RcodeServerFailure - } - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -// Name implements the Handler interface. -func (a Auto) Name() string { return "auto" } diff --git a/plugin/auto/auto_test.go b/plugin/auto/auto_test.go deleted file mode 100644 index 9871d342d1..0000000000 --- a/plugin/auto/auto_test.go +++ /dev/null @@ -1,268 +0,0 @@ -package auto - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestAutoName(t *testing.T) { - t.Parallel() - a := Auto{} - if a.Name() != "auto" { - t.Errorf("Expected 'auto', got %s", a.Name()) - } -} - -func TestAutoServeDNS(t *testing.T) { - t.Parallel() - tests := []struct { - name string - qname string - qtype uint16 - zones []string - expectedCode int - shouldMatch bool - }{ - { - name: "valid A query", - qname: "test.example.org.", - qtype: dns.TypeA, - zones: []string{"example.org."}, - expectedCode: dns.RcodeServerFailure, // Zone exists but no data - shouldMatch: true, - }, - { - name: "AXFR query refused", - qname: "test.example.org.", - qtype: dns.TypeAXFR, - zones: []string{"example.org."}, - expectedCode: dns.RcodeRefused, - shouldMatch: true, - }, - { - name: "IXFR query refused", - qname: "test.example.org.", - qtype: dns.TypeIXFR, - zones: []string{"example.org."}, - expectedCode: dns.RcodeRefused, - shouldMatch: true, - }, - { - name: "no matching zone", - qname: "test.notfound.org.", - qtype: dns.TypeA, - zones: []string{"example.org."}, - shouldMatch: false, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - a := createTestAuto(tt.zones) - - m := new(dns.Msg) - m.SetQuestion(tt.qname, tt.qtype) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - ctx := context.Background() - - code, err := a.ServeDNS(ctx, rec, m) - - if !tt.shouldMatch { - if err == nil { - t.Errorf("Expected error for non-matching zone, got nil") - } - return - } - - if err != nil { - t.Errorf("ServeDNS returned error: %v", err) - } - - if tt.qtype == dns.TypeAXFR || tt.qtype == dns.TypeIXFR { - if code != dns.RcodeRefused { - t.Errorf("Expected RcodeRefused for %s, got %d", dns.TypeToString[tt.qtype], code) - } - return - } - - if code != tt.expectedCode { - t.Errorf("Expected code %d, got %d", tt.expectedCode, code) - } - }) - } -} - -func TestAutoServeDNSZoneMatching(t *testing.T) { - t.Parallel() - - tests := []struct { - name string - origins []string - names []string - qname string - hasZone bool - shouldRefuse bool - }{ - { - name: "exact zone match", - origins: []string{"example.org."}, - names: []string{"example.org."}, - qname: "test.example.org.", - hasZone: true, - shouldRefuse: false, - }, - { - name: "subdomain zone match", - origins: []string{"example.org."}, - names: []string{"example.org."}, - qname: "sub.test.example.org.", - hasZone: true, - shouldRefuse: false, - }, - { - name: "no origin match", - origins: []string{"other.org."}, - names: []string{"example.org."}, - qname: "test.example.org.", - hasZone: false, - shouldRefuse: false, - }, - { - name: "origin match but no name match", - origins: []string{"example.org."}, - names: []string{"other.org."}, - qname: "test.example.org.", - hasZone: false, - shouldRefuse: true, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - a := &Auto{ - Zones: &Zones{ - Z: make(map[string]*file.Zone), - origins: tt.origins, - names: tt.names, - }, - Next: nil, - } - - for _, name := range tt.names { - a.Z[name] = &file.Zone{} - } - - m := new(dns.Msg) - m.SetQuestion(tt.qname, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - ctx := context.Background() - - code, err := a.ServeDNS(ctx, rec, m) - - if tt.hasZone { - if err != nil { - t.Errorf("Expected no error for zone match, got: %v", err) - } - } else { - if tt.shouldRefuse { - if code != dns.RcodeRefused { - t.Errorf("Expected code %d, got %d", dns.RcodeRefused, code) - } - } else if err == nil { - t.Errorf("Expected error for no zone match, got nil") - } - } - }) - } -} - -func TestAutoServeDNSNilZone(t *testing.T) { - t.Parallel() - - a := &Auto{ - Zones: &Zones{ - Z: make(map[string]*file.Zone), - origins: []string{"example.org."}, - names: []string{"example.org."}, - }, - Next: nil, - } - - a.Z["example.org."] = nil - - m := new(dns.Msg) - m.SetQuestion("test.example.org.", dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - ctx := context.Background() - - code, err := a.ServeDNS(ctx, rec, m) - - if code != dns.RcodeServerFailure { - t.Errorf("Expected RcodeServerFailure for nil zone, got %d", code) - } - if err != nil { - t.Errorf("Expected no error for nil zone, got: %v", err) - } -} - -func TestAutoServeDNSMissingZone(t *testing.T) { - t.Parallel() - - a := &Auto{ - Zones: &Zones{ - Z: make(map[string]*file.Zone), - origins: []string{"example.org."}, - names: []string{"example.org."}, - }, - Next: nil, - } - - // Don't add the zone to the map to test the missing zone case - - m := new(dns.Msg) - m.SetQuestion("test.example.org.", dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - ctx := context.Background() - - code, err := a.ServeDNS(ctx, rec, m) - - if code != dns.RcodeServerFailure { - t.Errorf("Expected RcodeServerFailure for missing zone, got %d", code) - } - if err != nil { - t.Errorf("Expected no error for missing zone, got: %v", err) - } -} - -// Helper functions for testing - -func createTestAuto(zones []string) *Auto { - a := &Auto{ - Zones: &Zones{ - Z: make(map[string]*file.Zone), - origins: zones, - names: zones, - }, - Next: nil, // No next plugin for testing - } - - // Initialize with empty zones for the tests - for _, zone := range zones { - a.Z[zone] = &file.Zone{} - } - - return a -} diff --git a/plugin/auto/log_test.go b/plugin/auto/log_test.go deleted file mode 100644 index 6047eebdaa..0000000000 --- a/plugin/auto/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package auto - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/auto/regexp.go b/plugin/auto/regexp.go deleted file mode 100644 index c203e559ab..0000000000 --- a/plugin/auto/regexp.go +++ /dev/null @@ -1,23 +0,0 @@ -package auto - -import ( - "strings" -) - -// rewriteToExpand rewrites our template string to one that we can give to regexp.ExpandString. This basically -// involves prefixing any '{' with a '$'. -func rewriteToExpand(s string) string { - // Pretty dumb at the moment, every { will get a $ prefixed. - // Also wasteful as we build the string with +=. This is OKish - // as we do this during config parsing. - - var copySb strings.Builder - for _, c := range s { - if c == '{' { - copySb.WriteString("$") - } - copySb.WriteString(string(c)) - } - - return copySb.String() -} diff --git a/plugin/auto/regexp_test.go b/plugin/auto/regexp_test.go deleted file mode 100644 index 23bf094dea..0000000000 --- a/plugin/auto/regexp_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package auto - -import ( - "fmt" - "testing" -) - -func TestRewriteToExpand(t *testing.T) { - t.Parallel() - tests := []struct { - in string - expected string - }{ - {in: "", expected: ""}, - {in: "{1}", expected: "${1}"}, - {in: "{1", expected: "${1"}, - } - for i, tc := range tests { - t.Run(fmt.Sprintf("test_%d", i), func(t *testing.T) { - t.Parallel() - got := rewriteToExpand(tc.in) - if got != tc.expected { - t.Errorf("Test %d: Expected error %v, but got %v", i, tc.expected, got) - } - }) - } -} diff --git a/plugin/auto/setup.go b/plugin/auto/setup.go deleted file mode 100644 index a31d5e5bce..0000000000 --- a/plugin/auto/setup.go +++ /dev/null @@ -1,176 +0,0 @@ -package auto - -import ( - "errors" - "os" - "path/filepath" - "regexp" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/plugin/transfer" -) - -var log = clog.NewWithPlugin("auto") - -func init() { plugin.Register("auto", setup) } - -func setup(c *caddy.Controller) error { - a, err := autoParse(c) - if err != nil { - return plugin.Error("auto", err) - } - - c.OnStartup(func() error { - m := dnsserver.GetConfig(c).Handler("prometheus") - if m != nil { - (&a).metrics = m.(*metrics.Metrics) - } - t := dnsserver.GetConfig(c).Handler("transfer") - if t != nil { - (&a).transfer = t.(*transfer.Transfer) - } - return nil - }) - - walkChan := make(chan bool) - - c.OnStartup(func() error { - err := a.Walk() - if err != nil { - return err - } - if err := a.Notify(); err != nil { - log.Warning(err) - } - if a.ReloadInterval == 0 { - return nil - } - go func() { - ticker := time.NewTicker(a.ReloadInterval) - defer ticker.Stop() - for { - select { - case <-walkChan: - return - case <-ticker.C: - a.Walk() - if err := a.Notify(); err != nil { - log.Warning(err) - } - } - } - }() - return nil - }) - - c.OnShutdown(func() error { - close(walkChan) - for _, z := range a.Z { - z.Lock() - z.OnShutdown() - z.Unlock() - } - return nil - }) - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - a.Next = next - return a - }) - - return nil -} - -func autoParse(c *caddy.Controller) (Auto, error) { - nilInterval := -1 * time.Second - var a = Auto{ - loader: loader{ - template: "${1}", - re: regexp.MustCompile(`db\.(.*)`), - ReloadInterval: nilInterval, - }, - Zones: &Zones{}, - } - - config := dnsserver.GetConfig(c) - - for c.Next() { - // auto [ZONES...] - args := c.RemainingArgs() - a.origins = plugin.OriginsFromArgsOrServerBlock(args, c.ServerBlockKeys) - a.upstream = upstream.New() - - for c.NextBlock() { - switch c.Val() { - case "directory": // directory DIR [REGEXP TEMPLATE] - if !c.NextArg() { - return a, c.ArgErr() - } - a.directory = c.Val() - if !filepath.IsAbs(a.directory) && config.Root != "" { - a.directory = filepath.Join(config.Root, a.directory) - } - _, err := os.Stat(a.directory) - if err != nil { - if !os.IsNotExist(err) { - return a, c.Errf("Unable to access root path '%s': %v", a.directory, err) - } - log.Warningf("Directory does not exist: %s", a.directory) - } - - // regexp template - if c.NextArg() { - a.re, err = regexp.Compile(c.Val()) - if err != nil { - return a, err - } - if a.re.NumSubexp() == 0 { - return a, c.Errf("Need at least one sub expression") - } - - if !c.NextArg() { - return a, c.ArgErr() - } - a.template = rewriteToExpand(c.Val()) - } - - if c.NextArg() { - return Auto{}, c.ArgErr() - } - - case "reload": - t := c.RemainingArgs() - if len(t) < 1 { - return a, errors.New("reload duration value is expected") - } - d, err := time.ParseDuration(t[0]) - if d < 0 { - err = errors.New("invalid duration") - } - if err != nil { - return a, plugin.Error("file", err) - } - a.ReloadInterval = d - - case "upstream": - // remove soon - c.RemainingArgs() // eat remaining args - - default: - return Auto{}, c.Errf("unknown property '%s'", c.Val()) - } - } - } - - if a.ReloadInterval == nilInterval { - a.ReloadInterval = 60 * time.Second - } - - return a, nil -} diff --git a/plugin/auto/setup_test.go b/plugin/auto/setup_test.go deleted file mode 100644 index 9f0ede8485..0000000000 --- a/plugin/auto/setup_test.go +++ /dev/null @@ -1,207 +0,0 @@ -package auto - -import ( - "fmt" - "testing" - "time" - - "github.com/coredns/caddy" -) - -func TestAutoParse(t *testing.T) { - t.Parallel() - tests := []struct { - inputFileRules string - shouldErr bool - expectedDirectory string - expectedTempl string - expectedRe string - expectedReloadInterval time.Duration - }{ - { - `auto example.org { - directory /tmp - }`, - false, "/tmp", "${1}", `db\.(.*)`, 60 * time.Second, - }, - { - `auto 10.0.0.0/24 { - directory /tmp - }`, - false, "/tmp", "${1}", `db\.(.*)`, 60 * time.Second, - }, - { - `auto { - directory /tmp - reload 0 - }`, - false, "/tmp", "${1}", `db\.(.*)`, 0 * time.Second, - }, - { - `auto { - directory /tmp (.*) bliep - }`, - false, "/tmp", "bliep", `(.*)`, 60 * time.Second, - }, - { - `auto { - directory /tmp (.*) bliep - reload 10s - }`, - false, "/tmp", "bliep", `(.*)`, 10 * time.Second, - }, - // errors - // NO_RELOAD has been deprecated. - { - `auto { - directory /tmp - no_reload - }`, - true, "/tmp", "${1}", `db\.(.*)`, 0 * time.Second, - }, - // TIMEOUT has been deprecated. - { - `auto { - directory /tmp (.*) bliep 10 - }`, - true, "/tmp", "bliep", `(.*)`, 10 * time.Second, - }, - // TRANSFER has been deprecated. - { - `auto { - directory /tmp (.*) bliep 10 - transfer to 127.0.0.1 - }`, - true, "/tmp", "bliep", `(.*)`, 10 * time.Second, - }, - // no template specified. - { - `auto { - directory /tmp (.*) - }`, - true, "/tmp", "", `(.*)`, 60 * time.Second, - }, - // no directory specified. - { - `auto example.org { - directory - }`, - true, "", "${1}", `db\.(.*)`, 60 * time.Second, - }, - // illegal REGEXP. - { - `auto example.org { - directory /tmp * {1} - }`, - true, "/tmp", "${1}", ``, 60 * time.Second, - }, - // non-existent directory. - { - `auto example.org { - directory /foobar/coredns * {1} - }`, - true, "/tmp", "${1}", ``, 60 * time.Second, - }, - // unexpected argument. - { - `auto example.org { - directory /tmp (.*) {1} aa - }`, - true, "/tmp", "${1}", ``, 60 * time.Second, - }, - // upstream directive should not error and should consume args - { - `auto example.org { - directory /tmp - upstream 8.8.8.8 1.1.1.1 - }`, - false, "/tmp", "${1}", `db\.(.*)`, 60 * time.Second, - }, - // upstream directive with no args should not error - { - `auto example.org { - directory /tmp - upstream - }`, - false, "/tmp", "${1}", `db\.(.*)`, 60 * time.Second, - }, - } - - for i, test := range tests { - t.Run(fmt.Sprintf("test_%d", i), func(t *testing.T) { - t.Parallel() - c := caddy.NewTestController("dns", test.inputFileRules) - a, err := autoParse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } else if !test.shouldErr { - if a.directory != test.expectedDirectory { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedDirectory, a.directory) - } - if a.template != test.expectedTempl { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedTempl, a.template) - } - if a.re.String() != test.expectedRe { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedRe, a.re) - } - if a.ReloadInterval != test.expectedReloadInterval { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedReloadInterval, a.ReloadInterval) - } - } - }) - } -} - -func TestSetupReload(t *testing.T) { - t.Parallel() - tests := []struct { - name string - config string - wantErr bool - }{ - { - name: "reload valid", - config: `auto { - directory . - reload 5s - }`, - wantErr: false, - }, - { - name: "reload disable", - config: `auto { - directory . - reload 0 - }`, - wantErr: false, - }, - { - name: "reload invalid", - config: `auto { - directory . - reload -1s - }`, - wantErr: true, - }, - { - name: "reload invalid", - config: `auto { - directory . - reload - }`, - wantErr: true, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - ctr := caddy.NewTestController("dns", tt.config) - if err := setup(ctr); (err != nil) != tt.wantErr { - t.Errorf("Error: setup() error = %v, wantErr %v", err, tt.wantErr) - } - }) - } -} diff --git a/plugin/auto/walk.go b/plugin/auto/walk.go deleted file mode 100644 index e1743e232b..0000000000 --- a/plugin/auto/walk.go +++ /dev/null @@ -1,107 +0,0 @@ -package auto - -import ( - "os" - "path/filepath" - "regexp" - - "github.com/coredns/coredns/plugin/file" - - "github.com/miekg/dns" -) - -// Walk will recursively walk of the file under l.directory and adds the one that match l.re. -func (a Auto) Walk() error { - // TODO(miek): should add something so that we don't stomp on each other. - - toDelete := make(map[string]bool) - for _, n := range a.Names() { - toDelete[n] = true - } - - filepath.Walk(a.directory, func(path string, info os.FileInfo, e error) error { - if e != nil { - log.Warningf("error reading %v: %v", path, e) - } - if info == nil || info.IsDir() { - return nil - } - - match, origin := matches(a.re, info.Name(), a.template) - if !match { - return nil - } - - if z, ok := a.Z[origin]; ok { - // we already have this zone - toDelete[origin] = false - z.SetFile(path) - return nil - } - - reader, err := os.Open(filepath.Clean(path)) - if err != nil { - log.Warningf("Opening %s failed: %s", path, err) - return nil - } - defer reader.Close() - - // Serial for loading a zone is 0, because it is a new zone. - zo, err := file.Parse(reader, origin, path, 0) - if err != nil { - log.Warningf("Parse zone `%s': %v", origin, err) - return nil - } - - zo.ReloadInterval = a.ReloadInterval - zo.Upstream = a.upstream - - a.Add(zo, origin, a.transfer) - - if a.metrics != nil { - a.metrics.AddZone(origin) - } - - log.Infof("Inserting zone `%s' from: %s", origin, path) - - toDelete[origin] = false - - return nil - }) - - for origin, ok := range toDelete { - if !ok { - continue - } - - if a.metrics != nil { - a.metrics.RemoveZone(origin) - } - - a.Remove(origin) - - log.Infof("Deleting zone `%s'", origin) - } - - return nil -} - -// matches re to filename, if it is a match, the subexpression will be used to expand -// template to an origin. When match is true that origin is returned. Origin is fully qualified. -func matches(re *regexp.Regexp, filename, template string) (match bool, origin string) { - base := filepath.Base(filename) - - matches := re.FindStringSubmatchIndex(base) - if matches == nil { - return false, "" - } - - by := re.ExpandString(nil, template, base, matches) - if by == nil { - return false, "" - } - - origin = dns.Fqdn(string(by)) - - return true, origin -} diff --git a/plugin/auto/walk_test.go b/plugin/auto/walk_test.go deleted file mode 100644 index 5517085790..0000000000 --- a/plugin/auto/walk_test.go +++ /dev/null @@ -1,84 +0,0 @@ -package auto - -import ( - "os" - "path/filepath" - "regexp" - "testing" -) - -var dbFiles = []string{"db.example.org", "aa.example.org"} - -const zoneContent = `; testzone -@ IN SOA sns.dns.icann.org. noc.dns.icann.org. 2016082534 7200 3600 1209600 3600 - NS a.iana-servers.net. - NS b.iana-servers.net. - -www IN A 127.0.0.1 -` - -func TestWalk(t *testing.T) { - t.Parallel() - tempdir, err := createFiles(t) - if err != nil { - t.Fatal(err) - } - - ldr := loader{ - directory: tempdir, - re: regexp.MustCompile(`db\.(.*)`), - template: `${1}`, - } - - a := Auto{ - loader: ldr, - Zones: &Zones{}, - } - - a.Walk() - - // db.example.org and db.example.com should be here (created in createFiles) - for _, name := range []string{"example.com.", "example.org."} { - if _, ok := a.Z[name]; !ok { - t.Errorf("%s should have been added", name) - } - } -} - -func TestWalkNonExistent(t *testing.T) { - t.Parallel() - nonExistingDir := "highly_unlikely_to_exist_dir" - - ldr := loader{ - directory: nonExistingDir, - re: regexp.MustCompile(`db\.(.*)`), - template: `${1}`, - } - - a := Auto{ - loader: ldr, - Zones: &Zones{}, - } - - a.Walk() -} - -func createFiles(t *testing.T) (string, error) { - t.Helper() - dir := t.TempDir() - - for _, name := range dbFiles { - if err := os.WriteFile(filepath.Join(dir, name), []byte(zoneContent), 0644); err != nil { - return dir, err - } - } - // symlinks - if err := os.Symlink(filepath.Join(dir, "db.example.org"), filepath.Join(dir, "db.example.com")); err != nil { - return dir, err - } - if err := os.Symlink(filepath.Join(dir, "db.example.org"), filepath.Join(dir, "aa.example.com")); err != nil { - return dir, err - } - - return dir, nil -} diff --git a/plugin/auto/watcher_test.go b/plugin/auto/watcher_test.go deleted file mode 100644 index eb524678a0..0000000000 --- a/plugin/auto/watcher_test.go +++ /dev/null @@ -1,94 +0,0 @@ -package auto - -import ( - "os" - "path/filepath" - "regexp" - "testing" -) - -func TestWatcher(t *testing.T) { - t.Parallel() - tempdir, err := createFiles(t) - if err != nil { - t.Fatal(err) - } - - ldr := loader{ - directory: tempdir, - re: regexp.MustCompile(`db\.(.*)`), - template: `${1}`, - } - - a := Auto{ - loader: ldr, - Zones: &Zones{}, - } - - a.Walk() - - // example.org and example.com should exist, we have 3 apex rrs and 1 "real" record. All() returns the non-apex ones. - if x := len(a.Z["example.org."].All()); x != 1 { - t.Fatalf("Expected 1 RRs, got %d", x) - } - if x := len(a.Z["example.com."].All()); x != 1 { - t.Fatalf("Expected 1 RRs, got %d", x) - } - - // Now remove one file, rescan and see if it's gone. - if err := os.Remove(filepath.Join(tempdir, "db.example.com")); err != nil { - t.Fatal(err) - } - - a.Walk() - - if _, ok := a.Z["example.com."]; ok { - t.Errorf("Expected %q to be gone.", "example.com.") - } - if _, ok := a.Z["example.org."]; !ok { - t.Errorf("Expected %q to still be there.", "example.org.") - } -} - -func TestSymlinks(t *testing.T) { - t.Parallel() - tempdir, err := createFiles(t) - if err != nil { - t.Fatal(err) - } - - ldr := loader{ - directory: tempdir, - re: regexp.MustCompile(`db\.(.*)`), - template: `${1}`, - } - - a := Auto{ - loader: ldr, - Zones: &Zones{}, - } - - a.Walk() - - // Now create a duplicate file in a subdirectory and repoint the symlink - if err := os.Remove(filepath.Join(tempdir, "db.example.com")); err != nil { - t.Fatal(err) - } - dataDir := filepath.Join(tempdir, "..data") - if err = os.Mkdir(dataDir, 0755); err != nil { - t.Fatal(err) - } - newFile := filepath.Join(dataDir, "db.example.com") - if err = os.Symlink(filepath.Join(tempdir, "db.example.org"), newFile); err != nil { - t.Fatal(err) - } - - a.Walk() - - if storedZone, ok := a.Z["example.com."]; ok { - storedFile := storedZone.File() - if storedFile != newFile { - t.Errorf("Expected %q to reflect new path %q", storedFile, newFile) - } - } -} diff --git a/plugin/auto/xfr.go b/plugin/auto/xfr.go deleted file mode 100644 index 93e20bc291..0000000000 --- a/plugin/auto/xfr.go +++ /dev/null @@ -1,31 +0,0 @@ -package auto - -import ( - "github.com/coredns/coredns/plugin/transfer" - - "github.com/miekg/dns" -) - -// Transfer implements the transfer.Transfer interface. -func (a Auto) Transfer(zone string, serial uint32) (<-chan []dns.RR, error) { - a.RLock() - z, ok := a.Z[zone] - a.RUnlock() - - if !ok || z == nil { - return nil, transfer.ErrNotAuthoritative - } - return z.Transfer(serial) -} - -// Notify sends notifies for all zones with secondaries configured with the transfer plugin -func (a Auto) Notify() error { - var err error - for _, origin := range a.Names() { - e := a.transfer.Notify(origin) - if e != nil { - err = e - } - } - return err -} diff --git a/plugin/auto/xfr_test.go b/plugin/auto/xfr_test.go deleted file mode 100644 index 51d75fe364..0000000000 --- a/plugin/auto/xfr_test.go +++ /dev/null @@ -1,98 +0,0 @@ -package auto - -import ( - "testing" - - "github.com/coredns/coredns/plugin/file" -) - -func TestAutoNotify(t *testing.T) { - t.Parallel() - - a := &Auto{ - Zones: &Zones{ - names: []string{"example.org.", "test.org."}, - }, - transfer: nil, - } - - err := a.Notify() - if err != nil { - t.Errorf("Expected no error, got %v", err) - } -} - -func TestAutoTransferZoneCase(t *testing.T) { - t.Parallel() - - tests := []struct { - name string - zone string - expectError bool - errorType string - }{ - { - name: "exact match", - zone: "example.org.", - expectError: true, - errorType: "no SOA", - }, - { - name: "case different", - zone: "EXAMPLE.ORG.", - expectError: true, - errorType: "not authoritative", - }, - { - name: "no match", - zone: "other.org.", - expectError: true, - errorType: "not authoritative", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - a := createTestAutoForTransfer(t, []string{"example.org."}) - - ch, err := a.Transfer(tt.zone, 1234) - - if !tt.expectError { - if err != nil { - t.Errorf("Expected no error, got %v", err) - } - if ch == nil { - t.Error("Expected non-nil channel") - } - } else { - if err == nil { - t.Error("Expected error, got nil") - } - if ch != nil { - t.Error("Expected nil channel when error occurs") - } - } - }) - } -} - -// Helper functions - -func createTestAutoForTransfer(t *testing.T, zones []string) *Auto { - t.Helper() - a := &Auto{ - Zones: &Zones{ - Z: make(map[string]*file.Zone), - names: zones, - }, - } - - // Initialize with real empty zones for the tests - for _, zone := range zones { - a.Z[zone] = &file.Zone{} - } - - return a -} diff --git a/plugin/auto/zone.go b/plugin/auto/zone.go deleted file mode 100644 index bb81186136..0000000000 --- a/plugin/auto/zone.go +++ /dev/null @@ -1,77 +0,0 @@ -// Package auto implements a on-the-fly loading file backend. -package auto - -import ( - "sync" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/transfer" -) - -// Zones maps zone names to a *Zone. This keeps track of what zones we have loaded at -// any one time. -type Zones struct { - Z map[string]*file.Zone // A map mapping zone (origin) to the Zone's data. - names []string // All the keys from the map Z as a string slice. - - origins []string // Any origins from the server block. - - sync.RWMutex -} - -// Names returns the names from z. -func (z *Zones) Names() []string { - z.RLock() - n := z.names - z.RUnlock() - return n -} - -// Origins returns the origins from z. -func (z *Zones) Origins() []string { - // doesn't need locking, because there aren't multiple Go routines accessing it. - return z.origins -} - -// Zones returns a zone with origin name from z, nil when not found. -func (z *Zones) Zones(name string) *file.Zone { - z.RLock() - zo := z.Z[name] - z.RUnlock() - return zo -} - -// Add adds a new zone into z. If z.ReloadInterval is not zero, the -// reload goroutine is started. -func (z *Zones) Add(zo *file.Zone, name string, t *transfer.Transfer) { - z.Lock() - - if z.Z == nil { - z.Z = make(map[string]*file.Zone) - } - - z.Z[name] = zo - z.names = append(z.names, name) - zo.Reload(t) - - z.Unlock() -} - -// Remove removes the zone named name from z. It also stops the zone's reload goroutine. -func (z *Zones) Remove(name string) { - z.Lock() - - if zo, ok := z.Z[name]; ok { - zo.OnShutdown() - } - - delete(z.Z, name) - - // TODO(miek): just regenerate Names (might be bad if you have a lot of zones...) - z.names = []string{} - for n := range z.Z { - z.names = append(z.names, n) - } - - z.Unlock() -} diff --git a/plugin/auto/zone_test.go b/plugin/auto/zone_test.go deleted file mode 100644 index 6fc1da7f97..0000000000 --- a/plugin/auto/zone_test.go +++ /dev/null @@ -1,222 +0,0 @@ -package auto - -import ( - "testing" - - "github.com/coredns/coredns/plugin/file" -) - -func TestZonesNames(t *testing.T) { - t.Parallel() - - tests := []struct { - name string - zones []string - expected []string - }{ - { - name: "empty zones", - zones: []string{}, - expected: []string{}, - }, - { - name: "single zone", - zones: []string{"example.org."}, - expected: []string{"example.org."}, - }, - { - name: "multiple zones", - zones: []string{"example.org.", "test.org.", "another.com."}, - expected: []string{"example.org.", "test.org.", "another.com."}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - z := &Zones{ - names: tt.zones, - } - - result := z.Names() - - if len(result) != len(tt.expected) { - t.Errorf("Expected %d names, got %d", len(tt.expected), len(result)) - } - - for i, name := range tt.expected { - if i >= len(result) || result[i] != name { - t.Errorf("Expected name %s at index %d, got %s", name, i, result[i]) - } - } - }) - } -} - -func TestZonesOrigins(t *testing.T) { - t.Parallel() - - tests := []struct { - name string - origins []string - expected []string - }{ - { - name: "empty origins", - origins: []string{}, - expected: []string{}, - }, - { - name: "single origin", - origins: []string{"example.org."}, - expected: []string{"example.org."}, - }, - { - name: "multiple origins", - origins: []string{"example.org.", "test.org."}, - expected: []string{"example.org.", "test.org."}, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - z := &Zones{ - origins: tt.origins, - } - - result := z.Origins() - - if len(result) != len(tt.expected) { - t.Errorf("Expected %d origins, got %d", len(tt.expected), len(result)) - } - - for i, origin := range tt.expected { - if i >= len(result) || result[i] != origin { - t.Errorf("Expected origin %s at index %d, got %s", origin, i, result[i]) - } - } - }) - } -} - -func TestZonesZones(t *testing.T) { - t.Parallel() - - zone1 := &file.Zone{} - zone2 := &file.Zone{} - - z := &Zones{ - Z: map[string]*file.Zone{ - "example.org.": zone1, - "test.org.": zone2, - }, - } - - tests := []struct { - name string - zoneName string - expected *file.Zone - }{ - { - name: "existing zone", - zoneName: "example.org.", - expected: zone1, - }, - { - name: "another existing zone", - zoneName: "test.org.", - expected: zone2, - }, - { - name: "non-existent zone", - zoneName: "notfound.org.", - expected: nil, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - t.Parallel() - - result := z.Zones(tt.zoneName) - - if result != tt.expected { - t.Errorf("Expected zone %v, got %v", tt.expected, result) - } - }) - } -} - -func TestZonesAdd(t *testing.T) { - t.Parallel() - - z := &Zones{} - zone := &file.Zone{} - - // Test adding to empty zones - z.Add(zone, "example.org.", nil) - - if z.Z == nil { - t.Error("Expected Z map to be initialized") - } - - if z.Z["example.org."] != zone { - t.Error("Expected zone to be added to map") - } - - if len(z.names) != 1 || z.names[0] != "example.org." { - t.Errorf("Expected names to contain 'example.org.', got %v", z.names) - } - - // Test adding another zone - zone2 := &file.Zone{} - z.Add(zone2, "test.org.", nil) - - if len(z.Z) != 2 { - t.Errorf("Expected 2 zones in map, got %d", len(z.Z)) - } - - if z.Z["test.org."] != zone2 { - t.Error("Expected second zone to be added to map") - } - - if len(z.names) != 2 { - t.Errorf("Expected 2 names, got %d", len(z.names)) - } -} - -func TestZonesEmptyOperations(t *testing.T) { - t.Parallel() - - z := &Zones{} - - names := z.Names() - if len(names) != 0 { - t.Errorf("Expected empty names slice, got %v", names) - } - - origins := z.Origins() - if len(origins) != 0 { - t.Errorf("Expected empty origins slice, got %v", origins) - } - - zone := z.Zones("any.zone.") - if zone != nil { - t.Errorf("Expected nil zone, got %v", zone) - } - - z.Remove("any.zone.") - - testZone := &file.Zone{} - z.Add(testZone, "test.org.", nil) - - if z.Z == nil { - t.Error("Expected Z map to be initialized after Add") - } - if z.Z["test.org."] != testZone { - t.Error("Expected zone to be added") - } -} diff --git a/plugin/autopath/README.md b/plugin/autopath/README.md deleted file mode 100644 index 64b022e0a6..0000000000 --- a/plugin/autopath/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# autopath - -## Name - -*autopath* - allows for server-side search path completion. - -## Description - -If the *autopath* plugin sees a query that matches the first element of the configured search path, it will -follow the chain of search path elements and return the first reply that is not NXDOMAIN. On any -failures, the original reply is returned. Because *autopath* returns a reply for a name that wasn't -the original question, it will add a CNAME that points from the original name (with the search path -element in it) to the name of this answer. - -**Note**: There are several known issues, see the "Bugs" section below. - -## Syntax - -~~~ -autopath [ZONE...] RESOLV-CONF -~~~ - -* **ZONES** zones *autopath* should be authoritative for. -* **RESOLV-CONF** points to a `resolv.conf` like file or uses a special syntax to point to another - plugin. For instance `@kubernetes`, will call out to the kubernetes plugin (for each - query) to retrieve the search list it should use. - -If a plugin implements the `AutoPather` interface then it can be used by *autopath*. - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metric is exported: - -* `coredns_autopath_success_total{server}` - counter of successfully autopath-ed queries. - -The `server` label is explained in the *metrics* plugin documentation. - -## Examples - -~~~ -autopath my-resolv.conf -~~~ - -Use `my-resolv.conf` as the file to get the search path from. This file only needs to have one line: -`search domain1 domain2 ...` - -~~~ -autopath @kubernetes -~~~ - -Use the search path dynamically retrieved from the *kubernetes* plugin. - -## Bugs - -In Kubernetes, *autopath* can derive the wrong namespace of a client Pod (and therefore wrong search -path) in the following case. To properly build the search path of a client *autopath* needs to know -the namespace of the a Pod making a DNS request. To do this, it relies on the *kubernetes* plugin's -Pod cache to resolve the client's IP address to a Pod. The Pod cache is maintained by an API watch -on Pods. When Pod IP assignments change, the Kubernetes API notifies CoreDNS via the API watch. -However, that notification is not instantaneous. In the case that a Pod is deleted, and its IP is -immediately provisioned to a Pod in another namespace, and that new Pod make a DNS lookup *before* -the API watch can notify CoreDNS of the change, *autopath* will resolve the IP to the previous Pod's -namespace. - -In Kubernetes, *autopath* is not compatible with Pods running from Windows nodes. - -If the server side search ultimately results in a negative answer (e.g. `NXDOMAIN`), then the client -will fruitlessly search all paths manually, thus negating the *autopath* optimization. diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go deleted file mode 100644 index f6b3488e8b..0000000000 --- a/plugin/autopath/autopath.go +++ /dev/null @@ -1,157 +0,0 @@ -/* -Package autopath implements autopathing. This is a hack; it shortcuts the -client's search path resolution by performing these lookups on the server... - -The server has a copy (via AutoPathFunc) of the client's search path and on -receiving a query it first establishes if the suffix matches the FIRST configured -element. If no match can be found the query will be forwarded up the plugin -chain without interference (if, and only if, 'fallthrough' has been set). - -If the query is deemed to fall in the search path the server will perform the -queries with each element of the search path appended in sequence until a -non-NXDOMAIN answer has been found. That reply will then be returned to the -client - with some CNAME hackery to let the client accept the reply. - -If all queries return NXDOMAIN we return the original as-is and let the client -continue searching. The client will go to the next element in the search path, -but we won’t do any more autopathing. It means that in the failure case, you do -more work, since the server looks it up, then the client still needs to go -through the search path. - -It is assume the search path ordering is identical between server and client. - -Plugins implementing autopath, must have a function called `AutoPath` of type -autopath.Func. Note the searchpath must be ending with the empty string. - -I.e: - - func (m Plugins ) AutoPath(state request.Request) []string { - return []string{"first", "second", "last", ""} - } -*/ -package autopath - -import ( - "context" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/plugin/pkg/dnsutil" - "github.com/coredns/coredns/plugin/pkg/nonwriter" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Func defines the function plugin should implement to return a search -// path to the autopath plugin. The last element of the slice must be the empty string. -// If Func returns a nil slice, no autopathing will be done. -type Func func(request.Request) []string - -// AutoPather defines the interface that a plugin should implement in order to be -// used by AutoPath. -type AutoPather interface { - AutoPath(request.Request) []string -} - -// AutoPath performs autopath: service side search path completion. -type AutoPath struct { - Next plugin.Handler - Zones []string - - // Search always includes "" as the last element, so we try the base query with out any search paths added as well. - search []string - searchFunc Func -} - -// ServeDNS implements the plugin.Handle interface. -func (a *AutoPath) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - - zone := plugin.Zones(a.Zones).Matches(state.Name()) - if zone == "" { - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - // Check if autopath should be done, searchFunc takes precedence over the local configured search path. - var err error - searchpath := a.search - - if a.searchFunc != nil { - searchpath = a.searchFunc(state) - } - - if len(searchpath) == 0 { - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - if !firstInSearchPath(state.Name(), searchpath) { - return plugin.NextOrFailure(a.Name(), a.Next, ctx, w, r) - } - - origQName := state.QName() - - // Establish base name of the query. I.e what was originally asked. - base, err := dnsutil.TrimZone(state.QName(), searchpath[0]) - if err != nil { - return dns.RcodeServerFailure, err - } - - firstReply := new(dns.Msg) - firstRcode := 0 - var firstErr error - - ar := r.Copy() - // Walk the search path and see if we can get a non-nxdomain - if they all fail we return the first - // query we've done and return that as-is. This means the client will do the search path walk again... - for i, s := range searchpath { - newQName := base + "." + s - ar.Question[0].Name = newQName - nw := nonwriter.New(w) - - rcode, err := plugin.NextOrFailure(a.Name(), a.Next, ctx, nw, ar) - if err != nil { - // Return now - not sure if this is the best. We should also check if the write has happened. - return rcode, err - } - if i == 0 { - firstReply = nw.Msg - firstRcode = rcode - firstErr = err - } - - if !plugin.ClientWrite(rcode) { - continue - } - - if nw.Msg.Rcode == dns.RcodeNameError { - continue - } - - msg := nw.Msg - cnamer(msg, origQName) - - // Write whatever non-nxdomain answer we've found. - w.WriteMsg(msg) - autoPathCount.WithLabelValues(metrics.WithServer(ctx)).Add(1) - return rcode, err - } - if plugin.ClientWrite(firstRcode) { - w.WriteMsg(firstReply) - } - return firstRcode, firstErr -} - -// Name implements the Handler interface. -func (a *AutoPath) Name() string { return "autopath" } - -// firstInSearchPath checks if name is equal to are a sibling of the first element in the search path. -func firstInSearchPath(name string, searchpath []string) bool { - if name == searchpath[0] { - return true - } - if dns.IsSubDomain(searchpath[0], name) { - return true - } - return false -} diff --git a/plugin/autopath/autopath_test.go b/plugin/autopath/autopath_test.go deleted file mode 100644 index 5c4e554c45..0000000000 --- a/plugin/autopath/autopath_test.go +++ /dev/null @@ -1,166 +0,0 @@ -package autopath - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var autopathTestCases = []test.Case{ - { - // search path expansion. - Qname: "b.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.CNAME("b.example.org. 3600 IN CNAME b.com."), - test.A("b.com." + defaultA), - }, - }, - { - // No search path expansion - Qname: "a.example.com.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("a.example.com." + defaultA), - }, - }, -} - -func newTestAutoPath() *AutoPath { - ap := new(AutoPath) - ap.Zones = []string{"."} - ap.Next = nextHandler(map[string]int{ - "b.example.org.": dns.RcodeNameError, - "b.com.": dns.RcodeSuccess, - "a.example.com.": dns.RcodeSuccess, - }) - - ap.search = []string{"example.org.", "example.com.", "com.", ""} - return ap -} - -func TestAutoPath(t *testing.T) { - ap := newTestAutoPath() - ctx := context.TODO() - - for _, tc := range autopathTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := ap.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - continue - } - - // No sorting here as we want to check if the CNAME sits *before* the - // test of the answer. - resp := rec.Msg - - if err := test.Header(tc, resp); err != nil { - t.Error(err) - continue - } - if err := test.Section(tc, test.Answer, resp.Answer); err != nil { - t.Error(err) - } - if err := test.Section(tc, test.Ns, resp.Ns); err != nil { - t.Error(err) - } - if err := test.Section(tc, test.Extra, resp.Extra); err != nil { - t.Error(err) - } - } -} - -var autopathNoAnswerTestCases = []test.Case{ - { - // search path expansion, no answer - Qname: "c.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.CNAME("b.example.org. 3600 IN CNAME b.com."), - test.A("b.com." + defaultA), - }, - }, -} - -func TestAutoPathNoAnswer(t *testing.T) { - ap := newTestAutoPath() - ctx := context.TODO() - - for _, tc := range autopathNoAnswerTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rcode, err := ap.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - continue - } - if plugin.ClientWrite(rcode) { - t.Fatalf("Expected no client write, got one for rcode %d", rcode) - } - } -} - -// nextHandler returns a Handler that returns an answer for the question in the -// request per the domain->answer map. On success an RR will be returned: "qname 3600 IN A 127.0.0.53" -func nextHandler(mm map[string]int) test.Handler { - return test.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - rcode, ok := mm[r.Question[0].Name] - if !ok { - return dns.RcodeServerFailure, nil - } - - m := new(dns.Msg) - m.SetReply(r) - - switch rcode { - case dns.RcodeNameError: - m.Rcode = rcode - m.Ns = []dns.RR{soa} - w.WriteMsg(m) - return m.Rcode, nil - - case dns.RcodeSuccess: - m.Rcode = rcode - a, _ := dns.NewRR(r.Question[0].Name + defaultA) - m.Answer = []dns.RR{a} - - w.WriteMsg(m) - return m.Rcode, nil - default: - panic("nextHandler: unhandled rcode") - } - }) -} - -const defaultA = " 3600 IN A 127.0.0.53" - -var soa = func() dns.RR { - s, _ := dns.NewRR("example.org. 1800 IN SOA example.org. example.org. 1502165581 14400 3600 604800 14400") - return s -}() - -func TestInSearchPath(t *testing.T) { - a := AutoPath{search: []string{"default.svc.cluster.local.", "svc.cluster.local.", "cluster.local."}} - - tests := []struct { - qname string - b bool - }{ - {"google.com", false}, - {"default.svc.cluster.local.", true}, - {"a.default.svc.cluster.local.", true}, - {"a.b.svc.cluster.local.", false}, - } - for i, tc := range tests { - got := firstInSearchPath(tc.qname, a.search) - if got != tc.b { - t.Errorf("Test %d, got %v, expected %v", i, got, tc.b) - } - } -} diff --git a/plugin/autopath/cname.go b/plugin/autopath/cname.go deleted file mode 100644 index 3b2c60f4e6..0000000000 --- a/plugin/autopath/cname.go +++ /dev/null @@ -1,25 +0,0 @@ -package autopath - -import ( - "strings" - - "github.com/miekg/dns" -) - -// cnamer will prefix the answer section with a cname that points from original qname to the -// name of the first RR. It will also update the question section and put original in there. -func cnamer(m *dns.Msg, original string) { - for _, a := range m.Answer { - if strings.EqualFold(original, a.Header().Name) { - continue - } - m.Answer = append(m.Answer, nil) - copy(m.Answer[1:], m.Answer) - m.Answer[0] = &dns.CNAME{ - Hdr: dns.RR_Header{Name: original, Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: a.Header().Ttl}, - Target: a.Header().Name, - } - break - } - m.Question[0].Name = original -} diff --git a/plugin/autopath/metrics.go b/plugin/autopath/metrics.go deleted file mode 100644 index 65a6cbd89d..0000000000 --- a/plugin/autopath/metrics.go +++ /dev/null @@ -1,18 +0,0 @@ -package autopath - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // autoPathCount is counter of successfully autopath-ed queries. - autoPathCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "autopath", - Name: "success_total", - Help: "Counter of requests that did autopath.", - }, []string{"server"}) -) diff --git a/plugin/autopath/setup.go b/plugin/autopath/setup.go deleted file mode 100644 index a041e364c6..0000000000 --- a/plugin/autopath/setup.go +++ /dev/null @@ -1,70 +0,0 @@ -package autopath - -import ( - "fmt" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -func init() { plugin.Register("autopath", setup) } - -func setup(c *caddy.Controller) error { - ap, mw, err := autoPathParse(c) - if err != nil { - return plugin.Error("autopath", err) - } - - // Do this in OnStartup, so all plugin has been initialized. - c.OnStartup(func() error { - m := dnsserver.GetConfig(c).Handler(mw) - if m == nil { - return nil - } - if x, ok := m.(AutoPather); ok { - ap.searchFunc = x.AutoPath - } else { - return plugin.Error("autopath", fmt.Errorf("%s does not implement the AutoPather interface", mw)) - } - return nil - }) - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - ap.Next = next - return ap - }) - - return nil -} - -func autoPathParse(c *caddy.Controller) (*AutoPath, string, error) { - ap := &AutoPath{} - mw := "" - - for c.Next() { - zoneAndresolv := c.RemainingArgs() - if len(zoneAndresolv) < 1 { - return ap, "", fmt.Errorf("no resolv-conf specified") - } - resolv := zoneAndresolv[len(zoneAndresolv)-1] - if strings.HasPrefix(resolv, "@") { - mw = resolv[1:] - } else { - // assume file on disk - rc, err := dns.ClientConfigFromFile(resolv) - if err != nil { - return ap, "", fmt.Errorf("failed to parse %q: %v", resolv, err) - } - ap.search = rc.Search - plugin.Zones(ap.search).Normalize() - ap.search = append(ap.search, "") // sentinel value as demanded. - } - zones := zoneAndresolv[:len(zoneAndresolv)-1] - ap.Zones = plugin.OriginsFromArgsOrServerBlock(zones, c.ServerBlockKeys) - } - return ap, mw, nil -} diff --git a/plugin/autopath/setup_test.go b/plugin/autopath/setup_test.go deleted file mode 100644 index 4644c7d59b..0000000000 --- a/plugin/autopath/setup_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package autopath - -import ( - "os" - "reflect" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/test" -) - -func TestSetupAutoPath(t *testing.T) { - resolv, rm, err := test.TempFile(os.TempDir(), resolvConf) - if err != nil { - t.Fatalf("Could not create resolv.conf test file %s: %s", resolvConf, err) - } - defer rm() - - tests := []struct { - input string - shouldErr bool - expectedZone string - expectedMw string // expected plugin. - expectedSearch []string // expected search path - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - {`autopath @kubernetes`, false, "", "kubernetes", nil, ""}, - {`autopath example.org @kubernetes`, false, "example.org.", "kubernetes", nil, ""}, - {`autopath 10.0.0.0/8 @kubernetes`, false, "10.in-addr.arpa.", "kubernetes", nil, ""}, - {`autopath ` + resolv, false, "", "", []string{"bar.com.", "baz.com.", ""}, ""}, - // negative - {`autopath kubernetes`, true, "", "", nil, "open kubernetes: no such file or directory"}, - {`autopath`, true, "", "", nil, "no resolv-conf"}, - {`autopath ""`, true, "", "", nil, "no such file"}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - ap, mw, err := autoPathParse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - - if !test.shouldErr && mw != test.expectedMw { - t.Errorf("Test %d, Plugin not correctly set for input %s. Expected: %s, actual: %s", i, test.input, test.expectedMw, mw) - } - if !test.shouldErr && ap.search != nil { - if !reflect.DeepEqual(test.expectedSearch, ap.search) { - t.Errorf("Test %d, wrong searchpath for input %s. Expected: '%v', actual: '%v'", i, test.input, test.expectedSearch, ap.search) - } - } - if !test.shouldErr && test.expectedZone != "" { - if test.expectedZone != ap.Zones[0] { - t.Errorf("Test %d, expected zone %q for input %s, got: %q", i, test.expectedZone, test.input, ap.Zones[0]) - } - } - } -} - -const resolvConf = `nameserver 1.2.3.4 -domain foo.com -search bar.com baz.com -options ndots:5 -` diff --git a/plugin/azure/README.md b/plugin/azure/README.md deleted file mode 100644 index f5ed5abff0..0000000000 --- a/plugin/azure/README.md +++ /dev/null @@ -1,60 +0,0 @@ -# azure - -## Name - -*azure* - enables serving zone data from Microsoft Azure DNS service. - -## Description - -The azure plugin is useful for serving zones from Microsoft Azure DNS. The *azure* plugin supports -all the DNS records supported by Azure, viz. A, AAAA, CNAME, MX, NS, PTR, SOA, SRV, and TXT -record types. NS record type is not supported by azure private DNS. - -## Syntax - -~~~ txt -azure RESOURCE_GROUP:ZONE... { - tenant TENANT_ID - client CLIENT_ID - secret CLIENT_SECRET - subscription SUBSCRIPTION_ID - environment ENVIRONMENT - fallthrough [ZONES...] - access private -} -~~~ - -* **RESOURCE_GROUP:ZONE** is the resource group to which the hosted zones belongs on Azure, - and **ZONE** the zone that contains data. - -* **CLIENT_ID** and **CLIENT_SECRET** are the credentials for Azure, and `tenant` specifies the - **TENANT_ID** to be used. **SUBSCRIPTION_ID** is the subscription ID. All of these are needed - to access the data in Azure. - -* `environment` specifies the Azure **ENVIRONMENT**. - -* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin. - If **ZONES** is omitted, then fallthrough happens for all zones for which the plugin is - authoritative. - -* `access` specifies if the zone is `public` or `private`. Default is `public`. - -## Examples - -Enable the *azure* plugin with Azure credentials for private zones `example.org`, `example.private`: - -~~~ txt -example.org { - azure resource_group_foo:example.org resource_group_foo:example.private { - tenant 123abc-123abc-123abc-123abc - client 123abc-123abc-123abc-234xyz - subscription 123abc-123abc-123abc-563abc - secret mysecret - access private - } -} -~~~ - -## See Also - -The [Azure DNS Overview](https://docs.microsoft.com/en-us/azure/dns/dns-overview). diff --git a/plugin/azure/azure.go b/plugin/azure/azure.go deleted file mode 100644 index 369d337051..0000000000 --- a/plugin/azure/azure.go +++ /dev/null @@ -1,352 +0,0 @@ -package azure - -import ( - "context" - "fmt" - "net" - "sync" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/request" - - publicdns "github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns" - privatedns "github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns" - "github.com/miekg/dns" -) - -type zone struct { - id string - z *file.Zone - zone string - private bool -} - -type zones map[string][]*zone - -// Azure is the core struct of the azure plugin. -type Azure struct { - zoneNames []string - publicClient publicdns.RecordSetsClient - privateClient privatedns.RecordSetsClient - upstream *upstream.Upstream - zMu sync.RWMutex - zones zones - - Next plugin.Handler - Fall fall.F -} - -// New validates the input DNS zones and initializes the Azure struct. -func New(ctx context.Context, publicClient publicdns.RecordSetsClient, privateClient privatedns.RecordSetsClient, keys map[string][]string, accessMap map[string]string) (*Azure, error) { - zones := make(map[string][]*zone, len(keys)) - names := make([]string, len(keys)) - var private bool - - for resourceGroup, znames := range keys { - for _, name := range znames { - switch accessMap[resourceGroup+name] { - case "public": - if _, err := publicClient.ListAllByDNSZone(context.Background(), resourceGroup, name, nil, ""); err != nil { - return nil, err - } - private = false - case "private": - if _, err := privateClient.ListComplete(context.Background(), resourceGroup, name, nil, ""); err != nil { - return nil, err - } - private = true - } - - fqdn := dns.Fqdn(name) - if _, ok := zones[fqdn]; !ok { - names = append(names, fqdn) - } - zones[fqdn] = append(zones[fqdn], &zone{id: resourceGroup, zone: name, private: private, z: file.NewZone(fqdn, "")}) - } - } - - return &Azure{ - publicClient: publicClient, - privateClient: privateClient, - zones: zones, - zoneNames: names, - upstream: upstream.New(), - }, nil -} - -// Run updates the zone from azure. -func (h *Azure) Run(ctx context.Context) error { - if err := h.updateZones(ctx); err != nil { - return err - } - go func() { - delay := 1 * time.Minute - timer := time.NewTimer(delay) - defer timer.Stop() - for { - timer.Reset(delay) - select { - case <-ctx.Done(): - log.Debugf("Breaking out of Azure update loop for %v: %v", h.zoneNames, ctx.Err()) - return - case <-timer.C: - if err := h.updateZones(ctx); err != nil && ctx.Err() == nil { - log.Errorf("Failed to update zones %v: %v", h.zoneNames, err) - } - } - } - }() - return nil -} - -func (h *Azure) updateZones(ctx context.Context) error { - var err error - var publicSet publicdns.RecordSetListResultPage - var privateSet privatedns.RecordSetListResultPage - errs := make([]string, 0) - for zName, z := range h.zones { - for i, hostedZone := range z { - newZ := file.NewZone(zName, "") - if hostedZone.private { - for privateSet, err = h.privateClient.List(ctx, hostedZone.id, hostedZone.zone, nil, ""); privateSet.NotDone(); err = privateSet.NextWithContext(ctx) { - updateZoneFromPrivateResourceSet(privateSet, newZ) - } - } else { - for publicSet, err = h.publicClient.ListByDNSZone(ctx, hostedZone.id, hostedZone.zone, nil, ""); publicSet.NotDone(); err = publicSet.NextWithContext(ctx) { - updateZoneFromPublicResourceSet(publicSet, newZ) - } - } - if err != nil { - errs = append(errs, fmt.Sprintf("failed to list resource records for %v from azure: %v", hostedZone.zone, err)) - } - newZ.Upstream = h.upstream - h.zMu.Lock() - (*z[i]).z = newZ - h.zMu.Unlock() - } - } - - if len(errs) != 0 { - return fmt.Errorf("errors updating zones: %v", errs) - } - return nil -} - -func updateZoneFromPublicResourceSet(recordSet publicdns.RecordSetListResultPage, newZ *file.Zone) { - for _, result := range *(recordSet.Response().Value) { - resultFqdn := *(result.Fqdn) - resultTTL := uint32(*(result.TTL)) - if result.ARecords != nil { - for _, A := range *(result.ARecords) { - a := &dns.A{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeA, Class: dns.ClassINET, Ttl: resultTTL}, - A: net.ParseIP(*(A.Ipv4Address))} - newZ.Insert(a) - } - } - - if result.AaaaRecords != nil { - for _, AAAA := range *(result.AaaaRecords) { - aaaa := &dns.AAAA{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeAAAA, Class: dns.ClassINET, Ttl: resultTTL}, - AAAA: net.ParseIP(*(AAAA.Ipv6Address))} - newZ.Insert(aaaa) - } - } - - if result.MxRecords != nil { - for _, MX := range *(result.MxRecords) { - mx := &dns.MX{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: resultTTL}, - Preference: uint16(*(MX.Preference)), - Mx: dns.Fqdn(*(MX.Exchange))} - newZ.Insert(mx) - } - } - - if result.PtrRecords != nil { - for _, PTR := range *(result.PtrRecords) { - ptr := &dns.PTR{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypePTR, Class: dns.ClassINET, Ttl: resultTTL}, - Ptr: dns.Fqdn(*(PTR.Ptrdname))} - newZ.Insert(ptr) - } - } - - if result.SrvRecords != nil { - for _, SRV := range *(result.SrvRecords) { - srv := &dns.SRV{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeSRV, Class: dns.ClassINET, Ttl: resultTTL}, - Priority: uint16(*(SRV.Priority)), - Weight: uint16(*(SRV.Weight)), - Port: uint16(*(SRV.Port)), - Target: dns.Fqdn(*(SRV.Target))} - newZ.Insert(srv) - } - } - - if result.TxtRecords != nil { - for _, TXT := range *(result.TxtRecords) { - txt := &dns.TXT{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: resultTTL}, - Txt: *(TXT.Value)} - newZ.Insert(txt) - } - } - - if result.NsRecords != nil { - for _, NS := range *(result.NsRecords) { - ns := &dns.NS{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeNS, Class: dns.ClassINET, Ttl: resultTTL}, - Ns: *(NS.Nsdname)} - newZ.Insert(ns) - } - } - - if result.SoaRecord != nil { - SOA := result.SoaRecord - soa := &dns.SOA{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: resultTTL}, - Minttl: uint32(*(SOA.MinimumTTL)), - Expire: uint32(*(SOA.ExpireTime)), - Retry: uint32(*(SOA.RetryTime)), - Refresh: uint32(*(SOA.RefreshTime)), - Serial: uint32(*(SOA.SerialNumber)), - Mbox: dns.Fqdn(*(SOA.Email)), - Ns: *(SOA.Host)} - newZ.Insert(soa) - } - - if result.CnameRecord != nil { - CNAME := result.CnameRecord.Cname - cname := &dns.CNAME{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: resultTTL}, - Target: dns.Fqdn(*CNAME)} - newZ.Insert(cname) - } - } -} - -func updateZoneFromPrivateResourceSet(recordSet privatedns.RecordSetListResultPage, newZ *file.Zone) { - for _, result := range *(recordSet.Response().Value) { - resultFqdn := *(result.Fqdn) - resultTTL := uint32(*(result.TTL)) - if result.ARecords != nil { - for _, A := range *(result.ARecords) { - a := &dns.A{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeA, Class: dns.ClassINET, Ttl: resultTTL}, - A: net.ParseIP(*(A.Ipv4Address))} - newZ.Insert(a) - } - } - if result.AaaaRecords != nil { - for _, AAAA := range *(result.AaaaRecords) { - aaaa := &dns.AAAA{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeAAAA, Class: dns.ClassINET, Ttl: resultTTL}, - AAAA: net.ParseIP(*(AAAA.Ipv6Address))} - newZ.Insert(aaaa) - } - } - - if result.MxRecords != nil { - for _, MX := range *(result.MxRecords) { - mx := &dns.MX{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeMX, Class: dns.ClassINET, Ttl: resultTTL}, - Preference: uint16(*(MX.Preference)), - Mx: dns.Fqdn(*(MX.Exchange))} - newZ.Insert(mx) - } - } - - if result.PtrRecords != nil { - for _, PTR := range *(result.PtrRecords) { - ptr := &dns.PTR{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypePTR, Class: dns.ClassINET, Ttl: resultTTL}, - Ptr: dns.Fqdn(*(PTR.Ptrdname))} - newZ.Insert(ptr) - } - } - - if result.SrvRecords != nil { - for _, SRV := range *(result.SrvRecords) { - srv := &dns.SRV{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeSRV, Class: dns.ClassINET, Ttl: resultTTL}, - Priority: uint16(*(SRV.Priority)), - Weight: uint16(*(SRV.Weight)), - Port: uint16(*(SRV.Port)), - Target: dns.Fqdn(*(SRV.Target))} - newZ.Insert(srv) - } - } - - if result.TxtRecords != nil { - for _, TXT := range *(result.TxtRecords) { - txt := &dns.TXT{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: resultTTL}, - Txt: *(TXT.Value)} - newZ.Insert(txt) - } - } - - if result.SoaRecord != nil { - SOA := result.SoaRecord - soa := &dns.SOA{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: resultTTL}, - Minttl: uint32(*(SOA.MinimumTTL)), - Expire: uint32(*(SOA.ExpireTime)), - Retry: uint32(*(SOA.RetryTime)), - Refresh: uint32(*(SOA.RefreshTime)), - Serial: uint32(*(SOA.SerialNumber)), - Mbox: dns.Fqdn(*(SOA.Email)), - Ns: dns.Fqdn(*(SOA.Host))} - newZ.Insert(soa) - } - - if result.CnameRecord != nil { - CNAME := result.CnameRecord.Cname - cname := &dns.CNAME{Hdr: dns.RR_Header{Name: resultFqdn, Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: resultTTL}, - Target: dns.Fqdn(*CNAME)} - newZ.Insert(cname) - } - } -} - -// ServeDNS implements the plugin.Handler interface. -func (h *Azure) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - - zone := plugin.Zones(h.zoneNames).Matches(qname) - if zone == "" { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - zones, ok := h.zones[zone] // ok true if we are authoritative for the zone. - if !ok || zones == nil { - return dns.RcodeServerFailure, nil - } - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - var result file.Result - for _, z := range zones { - h.zMu.RLock() - m.Answer, m.Ns, m.Extra, result = z.z.Lookup(ctx, state, qname) - h.zMu.RUnlock() - - // record type exists for this name (NODATA). - if len(m.Answer) != 0 || result == file.NoData { - break - } - } - - if len(m.Answer) == 0 && result != file.NoData && h.Fall.Through(qname) { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - switch result { - case file.Success: - case file.NoData: - case file.NameError: - m.Rcode = dns.RcodeNameError - case file.Delegation: - m.Authoritative = false - case file.ServerFailure: - return dns.RcodeServerFailure, nil - } - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -// Name implements plugin.Handler.Name. -func (h *Azure) Name() string { return "azure" } diff --git a/plugin/azure/azure_test.go b/plugin/azure/azure_test.go deleted file mode 100644 index 0178300012..0000000000 --- a/plugin/azure/azure_test.go +++ /dev/null @@ -1,180 +0,0 @@ -package azure - -import ( - "context" - "reflect" - "testing" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -var demoAzure = Azure{ - Next: testHandler(), - Fall: fall.Zero, - zoneNames: []string{"example.org.", "www.example.org.", "example.org.", "sample.example.org."}, - zones: testZones(), -} - -func testZones() zones { - zones := make(map[string][]*zone) - zones["example.org."] = append(zones["example.org."], &zone{zone: "example.org."}) - newZ := file.NewZone("example.org.", "") - - for _, rr := range []string{ - "example.org. 300 IN A 1.2.3.4", - "example.org. 300 IN AAAA 2001:db8:85a3::8a2e:370:7334", - "www.example.org. 300 IN A 1.2.3.4", - "www.example.org. 300 IN A 1.2.3.4", - "org. 172800 IN NS ns3-06.azure-dns.org.", - "org. 300 IN SOA ns1-06.azure-dns.com. azuredns-hostmaster.microsoft.com. 1 3600 300 2419200 300", - "cname.example.org. 300 IN CNAME example.org", - "mail.example.org. 300 IN MX 10 mailserver.example.com", - "ptr.example.org. 300 IN PTR www.ptr-example.com", - "example.org. 300 IN SRV 1 10 5269 srv-1.example.com.", - "example.org. 300 IN SRV 1 10 5269 srv-2.example.com.", - "txt.example.org. 300 IN TXT \"TXT for example.org\"", - } { - r, _ := dns.NewRR(rr) - newZ.Insert(r) - } - zones["example.org."][0].z = newZ - return zones -} - -func testHandler() test.HandlerFunc { - return func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - m := new(dns.Msg) - rcode := dns.RcodeServerFailure - if qname == "example.gov." { // No records match, test fallthrough. - m.SetReply(r) - rr := test.A("example.gov. 300 IN A 2.4.6.8") - m.Answer = []dns.RR{rr} - m.Authoritative = true - rcode = dns.RcodeSuccess - } - m.SetRcode(r, rcode) - w.WriteMsg(m) - return rcode, nil - } -} - -func TestAzure(t *testing.T) { - tests := []struct { - qname string - qtype uint16 - wantRetCode int - wantAnswer []string - wantMsgRCode int - wantNS []string - expectedErr error - }{ - { - qname: "example.org.", - qtype: dns.TypeA, - wantAnswer: []string{"example.org. 300 IN A 1.2.3.4"}, - }, - { - qname: "example.org", - qtype: dns.TypeAAAA, - wantAnswer: []string{"example.org. 300 IN AAAA 2001:db8:85a3::8a2e:370:7334"}, - }, - { - qname: "example.org", - qtype: dns.TypeSOA, - wantAnswer: []string{"org. 300 IN SOA ns1-06.azure-dns.com. azuredns-hostmaster.microsoft.com. 1 3600 300 2419200 300"}, - }, - { - qname: "badexample.com", - qtype: dns.TypeA, - wantRetCode: dns.RcodeServerFailure, - wantMsgRCode: dns.RcodeServerFailure, - }, - { - qname: "example.gov", - qtype: dns.TypeA, - wantAnswer: []string{"example.gov. 300 IN A 2.4.6.8"}, - }, - { - qname: "example.org", - qtype: dns.TypeSRV, - wantAnswer: []string{"example.org. 300 IN SRV 1 10 5269 srv-1.example.com.", "example.org. 300 IN SRV 1 10 5269 srv-2.example.com."}, - }, - { - qname: "cname.example.org.", - qtype: dns.TypeCNAME, - wantAnswer: []string{"cname.example.org. 300 IN CNAME example.org."}, - }, - { - qname: "cname.example.org.", - qtype: dns.TypeA, - wantAnswer: []string{"cname.example.org. 300 IN CNAME example.org.", "example.org. 300 IN A 1.2.3.4"}, - }, - { - qname: "mail.example.org.", - qtype: dns.TypeMX, - wantAnswer: []string{"mail.example.org. 300 IN MX 10 mailserver.example.com."}, - }, - { - qname: "ptr.example.org.", - qtype: dns.TypePTR, - wantAnswer: []string{"ptr.example.org. 300 IN PTR www.ptr-example.com."}, - }, - { - qname: "txt.example.org.", - qtype: dns.TypeTXT, - wantAnswer: []string{"txt.example.org. 300 IN TXT \"TXT for example.org\""}, - }, - } - - for ti, tc := range tests { - req := new(dns.Msg) - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := demoAzure.ServeDNS(context.Background(), rec, req) - - if err != tc.expectedErr { - t.Fatalf("Test %d: Expected error %v, but got %v", ti, tc.expectedErr, err) - } - - if code != tc.wantRetCode { - t.Fatalf("Test %d: Expected returned status code %s, but got %s", ti, dns.RcodeToString[tc.wantRetCode], dns.RcodeToString[code]) - } - - if tc.wantMsgRCode != rec.Msg.Rcode { - t.Errorf("Test %d: Unexpected msg status code. Want: %s, got: %s", ti, dns.RcodeToString[tc.wantMsgRCode], dns.RcodeToString[rec.Msg.Rcode]) - } - - if len(tc.wantAnswer) != len(rec.Msg.Answer) { - t.Errorf("Test %d: Unexpected number of Answers. Want: %d, got: %d", ti, len(tc.wantAnswer), len(rec.Msg.Answer)) - } else { - for i, gotAnswer := range rec.Msg.Answer { - if gotAnswer.String() != tc.wantAnswer[i] { - t.Errorf("Test %d: Unexpected answer.\nWant:\n\t%s\nGot:\n\t%s", ti, tc.wantAnswer[i], gotAnswer) - } - } - } - - if len(tc.wantNS) != len(rec.Msg.Ns) { - t.Errorf("Test %d: Unexpected NS number. Want: %d, got: %d", ti, len(tc.wantNS), len(rec.Msg.Ns)) - } else { - for i, ns := range rec.Msg.Ns { - got, ok := ns.(*dns.SOA) - if !ok { - t.Errorf("Test %d: Unexpected NS type. Want: SOA, got: %v", ti, reflect.TypeOf(got)) - } - if got.String() != tc.wantNS[i] { - t.Errorf("Test %d: Unexpected NS.\nWant: %v\nGot: %v", ti, tc.wantNS[i], got) - } - } - } - } -} diff --git a/plugin/azure/setup.go b/plugin/azure/setup.go deleted file mode 100644 index f089e52271..0000000000 --- a/plugin/azure/setup.go +++ /dev/null @@ -1,144 +0,0 @@ -package azure - -import ( - "context" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/fall" - clog "github.com/coredns/coredns/plugin/pkg/log" - - publicAzureDNS "github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns" - privateAzureDNS "github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns" - azurerest "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/azure/auth" -) - -var log = clog.NewWithPlugin("azure") - -func init() { plugin.Register("azure", setup) } - -func setup(c *caddy.Controller) error { - env, keys, accessMap, fall, err := parse(c) - if err != nil { - return plugin.Error("azure", err) - } - ctx, cancel := context.WithCancel(context.Background()) - - publicDNSClient := publicAzureDNS.NewRecordSetsClient(env.Values[auth.SubscriptionID]) - if publicDNSClient.Authorizer, err = env.GetAuthorizer(); err != nil { - cancel() - return plugin.Error("azure", err) - } - - privateDNSClient := privateAzureDNS.NewRecordSetsClient(env.Values[auth.SubscriptionID]) - if privateDNSClient.Authorizer, err = env.GetAuthorizer(); err != nil { - cancel() - return plugin.Error("azure", err) - } - - h, err := New(ctx, publicDNSClient, privateDNSClient, keys, accessMap) - if err != nil { - cancel() - return plugin.Error("azure", err) - } - h.Fall = fall - if err := h.Run(ctx); err != nil { - cancel() - return plugin.Error("azure", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - h.Next = next - return h - }) - c.OnShutdown(func() error { cancel(); return nil }) - return nil -} - -func parse(c *caddy.Controller) (auth.EnvironmentSettings, map[string][]string, map[string]string, fall.F, error) { - resourceGroupMapping := map[string][]string{} - accessMap := map[string]string{} - resourceGroupSet := map[string]struct{}{} - azureEnv := azurerest.PublicCloud - env := auth.EnvironmentSettings{Values: map[string]string{}} - - var fall fall.F - var access string - var resourceGroup string - var zoneName string - - for c.Next() { - args := c.RemainingArgs() - - for i := range args { - parts := strings.SplitN(args[i], ":", 2) - if len(parts) != 2 { - return env, resourceGroupMapping, accessMap, fall, c.Errf("invalid resource group/zone: %q", args[i]) - } - resourceGroup, zoneName = parts[0], parts[1] - if resourceGroup == "" || zoneName == "" { - return env, resourceGroupMapping, accessMap, fall, c.Errf("invalid resource group/zone: %q", args[i]) - } - if _, ok := resourceGroupSet[resourceGroup+zoneName]; ok { - return env, resourceGroupMapping, accessMap, fall, c.Errf("conflicting zone: %q", args[i]) - } - - resourceGroupSet[resourceGroup+zoneName] = struct{}{} - accessMap[resourceGroup+zoneName] = "public" - resourceGroupMapping[resourceGroup] = append(resourceGroupMapping[resourceGroup], zoneName) - } - - for c.NextBlock() { - switch c.Val() { - case "subscription": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - env.Values[auth.SubscriptionID] = c.Val() - case "tenant": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - env.Values[auth.TenantID] = c.Val() - case "client": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - env.Values[auth.ClientID] = c.Val() - case "secret": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - env.Values[auth.ClientSecret] = c.Val() - case "environment": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - var err error - if azureEnv, err = azurerest.EnvironmentFromName(c.Val()); err != nil { - return env, resourceGroupMapping, accessMap, fall, c.Errf("cannot set azure environment: %q", err.Error()) - } - case "fallthrough": - fall.SetZonesFromArgs(c.RemainingArgs()) - case "access": - if !c.NextArg() { - return env, resourceGroupMapping, accessMap, fall, c.ArgErr() - } - access = c.Val() - if access != "public" && access != "private" { - return env, resourceGroupMapping, accessMap, fall, c.Errf("invalid access value: can be public/private, found: %s", access) - } - accessMap[resourceGroup+zoneName] = access - default: - return env, resourceGroupMapping, accessMap, fall, c.Errf("unknown property: %q", c.Val()) - } - } - } - - env.Values[auth.Resource] = azureEnv.ResourceManagerEndpoint - env.Environment = azureEnv - return env, resourceGroupMapping, accessMap, fall, nil -} diff --git a/plugin/azure/setup_test.go b/plugin/azure/setup_test.go deleted file mode 100644 index c6c26b17b4..0000000000 --- a/plugin/azure/setup_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package azure - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSetup(t *testing.T) { - tests := []struct { - body string - expectedError bool - }{ - {`azure`, false}, - {`azure :`, true}, - {`azure resource_set:zone`, false}, - {`azure resource_set:zone { - tenant -}`, true}, - {`azure resource_set:zone { - tenant abc -}`, false}, - {`azure resource_set:zone { - client -}`, true}, - {`azure resource_set:zone { - client abc -}`, false}, - {`azure resource_set:zone { - subscription -}`, true}, - {`azure resource_set:zone { - subscription abc -}`, false}, - {`azure resource_set:zone { - foo -}`, true}, - {`azure resource_set:zone { - tenant tenant_id - client client_id - secret client_secret - subscription subscription_id - access public -}`, false}, - {`azure resource_set:zone { - fallthrough -}`, false}, - {`azure resource_set:zone { - environment AZUREPUBLICCLOUD - }`, false}, - {`azure resource_set:zone resource_set:zone { - fallthrough - }`, true}, - {`azure resource_set:zone,zone2 { - access private - }`, false}, - {`azure resource-set:zone { - access public - }`, false}, - {`azure resource-set:zone { - access foo - }`, true}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.body) - if _, _, _, _, err := parse(c); (err == nil) == test.expectedError { - t.Fatalf("Unexpected errors: %v in test: %d\n\t%s", err, i, test.body) - } - } -} diff --git a/plugin/bind/README.md b/plugin/bind/README.md deleted file mode 100644 index fddbff741b..0000000000 --- a/plugin/bind/README.md +++ /dev/null @@ -1,110 +0,0 @@ -# bind - -## Name - -*bind* - overrides the host to which the server should bind. - -## Description - -Normally, the listener binds to the wildcard host. However, you may want the listener to bind to -another IP instead. - -If several addresses are provided, a listener will be open on each of the IP provided. - -Each address has to be an IP or name of one of the interfaces of the host. Bind by interface name, binds to the IPs on that interface at the time of startup or reload (reload will happen with a SIGHUP or if the config file changes). - -If the given argument is an interface name, and that interface has several IP addresses, CoreDNS will listen on all of the interface IP addresses (including IPv4 and IPv6). - -## Syntax - -In its basic form, a simple bind uses this syntax: - -~~~ txt -bind ADDRESS|IFACE ... -~~~ - -You can also exclude some addresses with their IP address or interface name in expanded syntax: - -~~~ -bind ADDRESS|IFACE ... { - except ADDRESS|IFACE ... -} -~~~ - - - -* **ADDRESS|IFACE** is an IP address or interface name to bind to. -When several addresses are provided a listener will be opened on each of the addresses. Please read the *Description* for more details. -* `except`, excludes interfaces or IP addresses to bind to. `except` option only excludes addresses for the current `bind` directive if multiple `bind` directives are used in the same server block. -## Examples - -To make your socket accessible only to that machine, bind to IP 127.0.0.1 (localhost): - -~~~ corefile -. { - bind 127.0.0.1 -} -~~~ - -To allow processing DNS requests only local host on both IPv4 and IPv6 stacks, use the syntax: - -~~~ corefile -. { - bind 127.0.0.1 ::1 -} -~~~ - -If the configuration comes up with several *bind* plugins, all addresses are consolidated together: -The following sample is equivalent to the preceding: - -~~~ corefile -. { - bind 127.0.0.1 - bind ::1 -} -~~~ - -The following server block, binds on localhost with its interface name (both "127.0.0.1" and "::1"): - -~~~ corefile -. { - bind lo -} -~~~ - -You can exclude some addresses by their IP or interface name (The following will only listen on `::1` or whatever addresses have been assigned to the `lo` interface): - -~~~ corefile -. { - bind lo { - except 127.0.0.1 - } -} -~~~ - -## Bugs - -### Avoiding Listener Contention - -TL;DR, When adding the _bind_ plugin to a server block, it must also be added to all other server blocks that listen on the same port. - -When more than one server block is configured to listen to a common port, those server blocks must either -all use the _bind_ plugin, or all use default binding (no _bind_ plugin). Note that "port" here refers the TCP/UDP port that -a server block is configured to serve (default 53) - not a network interface. For two server blocks listening on the same port, -if one uses the bind plugin and the other does not, two separate listeners will be created that will contend for serving -packets destined to the same address. Doing so will result in unpredictable behavior (requests may be randomly -served by either server). This happens because *without* the *bind* plugin, a server will bind to all -interfaces, and this will collide with another server if it's using *bind* to listen to an address -on the same port. For example, the following creates two servers that both listen on 127.0.0.1:53, -which would result in unpredictable behavior for queries in `a.bad.example.com`: - -``` -a.bad.example.com { - bind 127.0.0.1 - forward . 1.2.3.4 -} - -bad.example.com { - forward . 5.6.7.8 -} -``` diff --git a/plugin/bind/bind.go b/plugin/bind/bind.go deleted file mode 100644 index cada8fa987..0000000000 --- a/plugin/bind/bind.go +++ /dev/null @@ -1,17 +0,0 @@ -// Package bind allows binding to a specific interface instead of bind to all of them. -package bind - -import ( - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("bind", setup) } - -type bind struct { - Next plugin.Handler - addrs []string - except []string -} - -// Name implements plugin.Handler. -func (b *bind) Name() string { return "bind" } diff --git a/plugin/bind/log_test.go b/plugin/bind/log_test.go deleted file mode 100644 index 4ee3ffccae..0000000000 --- a/plugin/bind/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package bind - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/bind/setup.go b/plugin/bind/setup.go deleted file mode 100644 index 1e3ac53f06..0000000000 --- a/plugin/bind/setup.go +++ /dev/null @@ -1,108 +0,0 @@ -package bind - -import ( - "errors" - "fmt" - "net" - "slices" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/log" -) - -func setup(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - // addresses will be consolidated over all BIND directives available in that BlocServer - all := []string{} - ifaces, err := net.Interfaces() - if err != nil { - log.Warning(plugin.Error("bind", fmt.Errorf("failed to get interfaces list, cannot bind by interface name: %s", err))) - } - - for c.Next() { - b, err := parse(c) - if err != nil { - return plugin.Error("bind", err) - } - - ips, err := listIP(b.addrs, ifaces) - if err != nil { - return plugin.Error("bind", err) - } - - except, err := listIP(b.except, ifaces) - if err != nil { - return plugin.Error("bind", err) - } - - for _, ip := range ips { - if !slices.Contains(except, ip) { - all = append(all, ip) - } - } - } - - config.ListenHosts = all - return nil -} - -func parse(c *caddy.Controller) (*bind, error) { - b := &bind{} - b.addrs = c.RemainingArgs() - if len(b.addrs) == 0 { - return nil, errors.New("at least one address or interface name is expected") - } - for c.NextBlock() { - switch c.Val() { - case "except": - b.except = c.RemainingArgs() - if len(b.except) == 0 { - return nil, errors.New("at least one address or interface must be given to except subdirective") - } - default: - return nil, fmt.Errorf("invalid option %q", c.Val()) - } - } - return b, nil -} - -// listIP returns a list of IP addresses from a list of arguments which can be either IP-Address or Interface-Name. -func listIP(args []string, ifaces []net.Interface) ([]string, error) { - all := []string{} - var isIface bool - for _, a := range args { - isIface = false - for _, iface := range ifaces { - if a == iface.Name { - isIface = true - addrs, err := iface.Addrs() - if err != nil { - return nil, fmt.Errorf("failed to get the IP addresses of the interface: %q", a) - } - for _, addr := range addrs { - if ipnet, ok := addr.(*net.IPNet); ok { - ipa, err := net.ResolveIPAddr("ip", ipnet.IP.String()) - if err == nil { - if ipnet.IP.To4() == nil && - (ipnet.IP.IsLinkLocalMulticast() || ipnet.IP.IsLinkLocalUnicast()) { - if ipa.Zone == "" { - ipa.Zone = iface.Name - } - } - all = append(all, ipa.String()) - } - } - } - } - } - if !isIface { - if net.ParseIP(a) == nil { - return nil, fmt.Errorf("not a valid IP address or interface name: %q", a) - } - all = append(all, a) - } - } - return all, nil -} diff --git a/plugin/bind/setup_test.go b/plugin/bind/setup_test.go deleted file mode 100644 index 858edf2d18..0000000000 --- a/plugin/bind/setup_test.go +++ /dev/null @@ -1,54 +0,0 @@ -package bind - -import ( - "runtime" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestSetup(t *testing.T) { - // Skip on non-Linux systems as some tests refer to for e.g. loopback interfaces which - // are not present on all systems. - if runtime.GOOS != "linux" { - t.Skipf("Skipping bind test on %s", runtime.GOOS) - } - - for i, test := range []struct { - config string - expected []string - failing bool - }{ - {`bind 1.2.3.4`, []string{"1.2.3.4"}, false}, - {`bind`, nil, true}, - {`bind 1.2.3.invalid`, nil, true}, - {`bind 1.2.3.4 ::5`, []string{"1.2.3.4", "::5"}, false}, - {`bind ::1 1.2.3.4 ::5 127.9.9.0`, []string{"::1", "1.2.3.4", "::5", "127.9.9.0"}, false}, - {`bind ::1 1.2.3.4 ::5 127.9.9.0 noone`, nil, true}, - {`bind 1.2.3.4 lo`, []string{"1.2.3.4", "127.0.0.1", "::1"}, false}, - {"bind lo {\nexcept 127.0.0.1\n}\n", []string{"::1"}, false}, - } { - c := caddy.NewTestController("dns", test.config) - err := setup(c) - if err != nil { - if !test.failing { - t.Fatalf("Test %d, expected no errors, but got: %v", i, err) - } - continue - } - if test.failing { - t.Fatalf("Test %d, expected to failed but did not, returned values", i) - } - cfg := dnsserver.GetConfig(c) - if len(cfg.ListenHosts) != len(test.expected) { - t.Errorf("Test %d : expected the config's ListenHosts size to be %d, was %d", i, len(test.expected), len(cfg.ListenHosts)) - continue - } - for i, v := range test.expected { - if got, want := cfg.ListenHosts[i], v; got != want { - t.Errorf("Test %d : expected the config's ListenHost to be %s, was %s", i, want, got) - } - } - } -} diff --git a/plugin/clouddns/README.md b/plugin/clouddns/README.md deleted file mode 100644 index 1e122813f8..0000000000 --- a/plugin/clouddns/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# clouddns - -## Name - -*clouddns* - enables serving zone data from GCP Cloud DNS. - -## Description - -The *clouddns* plugin is useful for serving zones from resource record -sets in GCP Cloud DNS. This plugin supports all [Google Cloud DNS -records](https://cloud.google.com/dns/docs/overview#supported_dns_record_types). This plugin can -be used when CoreDNS is deployed on GCP or elsewhere. Note that this plugin accesses the resource -records through the Google Cloud API. For records in a privately hosted zone, it is not necessary to -place CoreDNS and this plugin in the associated VPC network. In fact the private hosted zone could -be created without any associated VPC and this plugin could still access the resource records under -the hosted zone. - -## Syntax - -~~~ txt -clouddns [ZONE:PROJECT_ID:HOSTED_ZONE_NAME...] { - credentials [FILENAME] - fallthrough [ZONES...] -} -~~~ - -* **ZONE** the name of the domain to be accessed. When there are multiple zones with overlapping - domains (private vs. public hosted zone), CoreDNS does the lookup in the given order here. - Therefore, for a non-existing resource record, SOA response will be from the rightmost zone. - -* **PROJECT\_ID** the project ID of the Google Cloud project. - -* **HOSTED\_ZONE\_NAME** the name of the hosted zone that contains the resource record sets to be - accessed. - -* `credentials` is used for reading the credential file from **FILENAME** (normally a .json file). - This field is optional. If this field is not provided then authentication will be done automatically, - e.g., through environmental variable `GOOGLE_APPLICATION_CREDENTIALS`. Please see - Google Cloud's [authentication method](https://cloud.google.com/docs/authentication) for more details. - -* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin. - If **[ZONES...]** is omitted, then fallthrough happens for all zones for which the plugin is - authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then - only queries for those zones will be subject to fallthrough. - -## Examples - -Enable clouddns with implicit GCP credentials and resolve CNAMEs via 10.0.0.1: - -~~~ txt -example.org { - clouddns example.org.:gcp-example-project:example-zone - forward . 10.0.0.1 -} -~~~ - -Enable clouddns with fallthrough: - -~~~ txt -example.org { - clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:example-zone-2 { - fallthrough example.gov. - } -} -~~~ - -Enable clouddns with multiple hosted zones with the same domain: - -~~~ txt -. { - clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:other-example-zone -} -~~~ diff --git a/plugin/clouddns/clouddns.go b/plugin/clouddns/clouddns.go deleted file mode 100644 index 6c912a7d60..0000000000 --- a/plugin/clouddns/clouddns.go +++ /dev/null @@ -1,227 +0,0 @@ -// Package clouddns implements a plugin that returns resource records -// from GCP Cloud DNS. -package clouddns - -import ( - "context" - "errors" - "fmt" - "strings" - "sync" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" - gcp "google.golang.org/api/dns/v1" -) - -// CloudDNS is a plugin that returns RR from GCP Cloud DNS. -type CloudDNS struct { - Next plugin.Handler - Fall fall.F - - zoneNames []string - client gcpDNS - upstream *upstream.Upstream - - zMu sync.RWMutex - zones zones -} - -type zone struct { - projectName string - zoneName string - z *file.Zone - dns string -} - -type zones map[string][]*zone - -// New reads from the keys map which uses domain names as its key and a colon separated -// string of project name and hosted zone name lists as its values, validates -// that each domain name/zone id pair does exist, and returns a new *CloudDNS. -// In addition to this, upstream is passed for doing recursive queries against CNAMEs. -// Returns error if it cannot verify any given domain name/zone id pair. -func New(ctx context.Context, c gcpDNS, keys map[string][]string, up *upstream.Upstream) (*CloudDNS, error) { - zones := make(map[string][]*zone, len(keys)) - zoneNames := make([]string, 0, len(keys)) - for dnsName, hostedZoneDetails := range keys { - for _, hostedZone := range hostedZoneDetails { - ss := strings.SplitN(hostedZone, ":", 2) - if len(ss) != 2 { - return nil, errors.New("either project or zone name missing") - } - err := c.zoneExists(ss[0], ss[1]) - if err != nil { - return nil, err - } - fqdnDNSName := dns.Fqdn(dnsName) - if _, ok := zones[fqdnDNSName]; !ok { - zoneNames = append(zoneNames, fqdnDNSName) - } - zones[fqdnDNSName] = append(zones[fqdnDNSName], &zone{projectName: ss[0], zoneName: ss[1], dns: fqdnDNSName, z: file.NewZone(fqdnDNSName, "")}) - } - } - return &CloudDNS{ - client: c, - zoneNames: zoneNames, - zones: zones, - upstream: up, - }, nil -} - -// Run executes first update, spins up an update forever-loop. -// Returns error if first update fails. -func (h *CloudDNS) Run(ctx context.Context) error { - if err := h.updateZones(ctx); err != nil { - return err - } - go func() { - delay := 1 * time.Minute - timer := time.NewTimer(delay) - defer timer.Stop() - for { - timer.Reset(delay) - select { - case <-ctx.Done(): - log.Debugf("Breaking out of CloudDNS update loop for %v: %v", h.zoneNames, ctx.Err()) - return - case <-timer.C: - if err := h.updateZones(ctx); err != nil && ctx.Err() == nil /* Don't log error if ctx expired. */ { - log.Errorf("Failed to update zones %v: %v", h.zoneNames, err) - } - } - } - }() - return nil -} - -// ServeDNS implements the plugin.Handler interface. -func (h *CloudDNS) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - - zName := plugin.Zones(h.zoneNames).Matches(qname) - if zName == "" { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - z, ok := h.zones[zName] // ok true if we are authoritative for the zone - if !ok || z == nil { - return dns.RcodeServerFailure, nil - } - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - var result file.Result - - for _, hostedZone := range z { - h.zMu.RLock() - m.Answer, m.Ns, m.Extra, result = hostedZone.z.Lookup(ctx, state, qname) - h.zMu.RUnlock() - - // Take the answer if it's non-empty OR if there is another - // record type exists for this name (NODATA). - if len(m.Answer) != 0 || result == file.NoData { - break - } - } - - if len(m.Answer) == 0 && result != file.NoData && h.Fall.Through(qname) { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - switch result { - case file.Success: - case file.NoData: - case file.NameError: - m.Rcode = dns.RcodeNameError - case file.Delegation: - m.Authoritative = false - case file.ServerFailure: - return dns.RcodeServerFailure, nil - } - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -func updateZoneFromRRS(rrs *gcp.ResourceRecordSetsListResponse, z *file.Zone) error { - for _, rr := range rrs.Rrsets { - var rfc1035 string - var r dns.RR - var err error - for _, value := range rr.Rrdatas { - if rr.Type == "CNAME" || rr.Type == "PTR" { - value = dns.Fqdn(value) - } - // Assemble RFC 1035 conforming record to pass into dns scanner. - rfc1035 = fmt.Sprintf("%s %d IN %s %s", dns.Fqdn(rr.Name), rr.Ttl, rr.Type, value) - r, err = dns.NewRR(rfc1035) - if err != nil { - return fmt.Errorf("failed to parse resource record: %v", err) - } - - err = z.Insert(r) - if err != nil { - return fmt.Errorf("failed to insert record: %v", err) - } - } - } - return nil -} - -// updateZones re-queries resource record sets for each zone and updates the -// zone object. -// Returns error if any zones error'ed out, but waits for other zones to -// complete first. -func (h *CloudDNS) updateZones(ctx context.Context) error { - errc := make(chan error) - defer close(errc) - for zName, z := range h.zones { - go func(zName string, z []*zone) { - var err error - var rrListResponse *gcp.ResourceRecordSetsListResponse - defer func() { - errc <- err - }() - - for i, hostedZone := range z { - newZ := file.NewZone(zName, "") - newZ.Upstream = h.upstream - rrListResponse, err = h.client.listRRSets(ctx, hostedZone.projectName, hostedZone.zoneName) - if err != nil { - err = fmt.Errorf("failed to list resource records for %v:%v:%v from gcp: %v", zName, hostedZone.projectName, hostedZone.zoneName, err) - return - } - updateZoneFromRRS(rrListResponse, newZ) - - h.zMu.Lock() - (*z[i]).z = newZ - h.zMu.Unlock() - } - }(zName, z) - } - // Collect errors (if any). This will also sync on all zones updates - // completion. - var errs []string - for range len(h.zones) { - err := <-errc - if err != nil { - errs = append(errs, err.Error()) - } - } - if len(errs) != 0 { - return fmt.Errorf("errors updating zones: %v", errs) - } - return nil -} - -// Name implements the Handler interface. -func (h *CloudDNS) Name() string { return "clouddns" } diff --git a/plugin/clouddns/clouddns_test.go b/plugin/clouddns/clouddns_test.go deleted file mode 100644 index 269be2b042..0000000000 --- a/plugin/clouddns/clouddns_test.go +++ /dev/null @@ -1,458 +0,0 @@ -package clouddns - -import ( - "context" - "errors" - "reflect" - "sync" - "testing" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" - gcp "google.golang.org/api/dns/v1" -) - -type fakeGCPClient struct { - *gcp.Service -} - -func (c fakeGCPClient) zoneExists(projectName, hostedZoneName string) error { - return nil -} - -func (c fakeGCPClient) listRRSets(ctx context.Context, projectName, hostedZoneName string) (*gcp.ResourceRecordSetsListResponse, error) { - if projectName == "bad-project" || hostedZoneName == "bad-zone" { - return nil, errors.New("the 'parameters.managedZone' resource named 'bad-zone' does not exist") - } - - var rr []*gcp.ResourceRecordSet - - if hostedZoneName == "sample-zone-1" { - rr = []*gcp.ResourceRecordSet{ - { - Name: "example.org.", - Ttl: 300, - Type: "A", - Rrdatas: []string{"1.2.3.4"}, - }, - { - Name: "www.example.org", - Ttl: 300, - Type: "A", - Rrdatas: []string{"1.2.3.4"}, - }, - { - Name: "*.www.example.org", - Ttl: 300, - Type: "CNAME", - Rrdatas: []string{"www.example.org"}, - }, - { - Name: "example.org.", - Ttl: 300, - Type: "AAAA", - Rrdatas: []string{"2001:db8:85a3::8a2e:370:7334"}, - }, - { - Name: "sample.example.org", - Ttl: 300, - Type: "CNAME", - Rrdatas: []string{"example.org"}, - }, - { - Name: "example.org.", - Ttl: 300, - Type: "PTR", - Rrdatas: []string{"ptr.example.org."}, - }, - { - Name: "org.", - Ttl: 300, - Type: "SOA", - Rrdatas: []string{"ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - { - Name: "com.", - Ttl: 300, - Type: "NS", - Rrdatas: []string{"ns-cloud-c4.googledomains.com."}, - }, - { - Name: "split-example.gov.", - Ttl: 300, - Type: "A", - Rrdatas: []string{"1.2.3.4"}, - }, - { - Name: "swag.", - Ttl: 300, - Type: "YOLO", - Rrdatas: []string{"foobar"}, - }, - } - } else { - rr = []*gcp.ResourceRecordSet{ - { - Name: "split-example.org.", - Ttl: 300, - Type: "A", - Rrdatas: []string{"1.2.3.4"}, - }, - { - Name: "other-example.org.", - Ttl: 300, - Type: "A", - Rrdatas: []string{"3.5.7.9"}, - }, - { - Name: "org.", - Ttl: 300, - Type: "SOA", - Rrdatas: []string{"ns-cloud-e1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - { - Name: "_dummy._tcp.example.org.", - Ttl: 300, - Type: "SRV", - Rrdatas: []string{ - "0 0 5269 split-example.org", - "0 0 5269 other-example.org", - }, - }, - } - } - - return &gcp.ResourceRecordSetsListResponse{Rrsets: rr}, nil -} - -func TestCloudDNS(t *testing.T) { - ctx := context.Background() - - r, err := New(ctx, fakeGCPClient{}, map[string][]string{"bad.": {"bad-project:bad-zone"}}, &upstream.Upstream{}) - if err != nil { - t.Fatalf("Failed to create Cloud DNS: %v", err) - } - if err = r.Run(ctx); err == nil { - t.Fatalf("Expected errors for zone bad.") - } - - r, err = New(ctx, fakeGCPClient{}, map[string][]string{"org.": {"sample-project-1:sample-zone-2", "sample-project-1:sample-zone-1"}, "gov.": {"sample-project-1:sample-zone-2", "sample-project-1:sample-zone-1"}}, &upstream.Upstream{}) - if err != nil { - t.Fatalf("Failed to create Cloud DNS: %v", err) - } - r.Fall = fall.Zero - r.Fall.SetZonesFromArgs([]string{"gov."}) - r.Next = test.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - m := new(dns.Msg) - rcode := dns.RcodeServerFailure - if qname == "example.gov." { - m.SetReply(r) - rr, err := dns.NewRR("example.gov. 300 IN A 2.4.6.8") - if err != nil { - t.Fatalf("Failed to create Resource Record: %v", err) - } - m.Answer = []dns.RR{rr} - - m.Authoritative = true - rcode = dns.RcodeSuccess - } - - m.SetRcode(r, rcode) - w.WriteMsg(m) - return rcode, nil - }) - err = r.Run(ctx) - if err != nil { - t.Fatalf("Failed to initialize Cloud DNS: %v", err) - } - - tests := []struct { - qname string - qtype uint16 - wantRetCode int - wantAnswer []string // ownernames for the records in the additional section. - wantMsgRCode int - wantNS []string - expectedErr error - }{ - // 0. example.org A found - success. - { - qname: "example.org", - qtype: dns.TypeA, - wantAnswer: []string{"example.org. 300 IN A 1.2.3.4"}, - }, - // 1. example.org AAAA found - success. - { - qname: "example.org", - qtype: dns.TypeAAAA, - wantAnswer: []string{"example.org. 300 IN AAAA 2001:db8:85a3::8a2e:370:7334"}, - }, - // 2. exampled.org PTR found - success. - { - qname: "example.org", - qtype: dns.TypePTR, - wantAnswer: []string{"example.org. 300 IN PTR ptr.example.org."}, - }, - // 3. sample.example.org points to example.org CNAME. - // Query must return both CNAME and A recs. - { - qname: "sample.example.org", - qtype: dns.TypeA, - wantAnswer: []string{ - "sample.example.org. 300 IN CNAME example.org.", - "example.org. 300 IN A 1.2.3.4", - }, - }, - // 4. Explicit CNAME query for sample.example.org. - // Query must return just CNAME. - { - qname: "sample.example.org", - qtype: dns.TypeCNAME, - wantAnswer: []string{"sample.example.org. 300 IN CNAME example.org."}, - }, - // 5. Explicit SOA query for example.org. - { - qname: "example.org", - qtype: dns.TypeNS, - wantNS: []string{"org. 300 IN SOA ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - // 6. AAAA query for split-example.org must return NODATA. - { - qname: "split-example.gov", - qtype: dns.TypeAAAA, - wantRetCode: dns.RcodeSuccess, - wantNS: []string{"org. 300 IN SOA ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - // 7. Zone not configured. - { - qname: "badexample.com", - qtype: dns.TypeA, - wantRetCode: dns.RcodeServerFailure, - wantMsgRCode: dns.RcodeServerFailure, - }, - // 8. No record found. Return SOA record. - { - qname: "bad.org", - qtype: dns.TypeA, - wantRetCode: dns.RcodeSuccess, - wantMsgRCode: dns.RcodeNameError, - wantNS: []string{"org. 300 IN SOA ns-cloud-c1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - // 9. No record found. Fallthrough. - { - qname: "example.gov", - qtype: dns.TypeA, - wantAnswer: []string{"example.gov. 300 IN A 2.4.6.8"}, - }, - // 10. other-zone.example.org is stored in a different hosted zone. success - { - qname: "other-example.org", - qtype: dns.TypeA, - wantAnswer: []string{"other-example.org. 300 IN A 3.5.7.9"}, - }, - // 11. split-example.org only has A record. Expect NODATA. - { - qname: "split-example.org", - qtype: dns.TypeAAAA, - wantNS: []string{"org. 300 IN SOA ns-cloud-e1.googledomains.com. cloud-dns-hostmaster.google.com. 1 21600 300 259200 300"}, - }, - // 12. *.www.example.org is a wildcard CNAME to www.example.org. - { - qname: "a.www.example.org", - qtype: dns.TypeA, - wantAnswer: []string{ - "a.www.example.org. 300 IN CNAME www.example.org.", - "www.example.org. 300 IN A 1.2.3.4", - }, - }, - // 13. example.org SRV found with 2 answers - success. - { - qname: "_dummy._tcp.example.org.", - qtype: dns.TypeSRV, - wantAnswer: []string{ - "_dummy._tcp.example.org. 300 IN SRV 0 0 5269 split-example.org.", - "_dummy._tcp.example.org. 300 IN SRV 0 0 5269 other-example.org.", - }, - }, - } - - for ti, tc := range tests { - req := new(dns.Msg) - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := r.ServeDNS(ctx, rec, req) - - if err != tc.expectedErr { - t.Fatalf("Test %d: Expected error %v, but got %v", ti, tc.expectedErr, err) - } - if code != tc.wantRetCode { - t.Fatalf("Test %d: Expected returned status code %s, but got %s", ti, dns.RcodeToString[tc.wantRetCode], dns.RcodeToString[code]) - } - - if tc.wantMsgRCode != rec.Msg.Rcode { - t.Errorf("Test %d: Unexpected msg status code. Want: %s, got: %s", ti, dns.RcodeToString[tc.wantMsgRCode], dns.RcodeToString[rec.Msg.Rcode]) - } - - if len(tc.wantAnswer) != len(rec.Msg.Answer) { - t.Errorf("Test %d: Unexpected number of Answers. Want: %d, got: %d", ti, len(tc.wantAnswer), len(rec.Msg.Answer)) - } else { - for i, gotAnswer := range rec.Msg.Answer { - if gotAnswer.String() != tc.wantAnswer[i] { - t.Errorf("Test %d: Unexpected answer.\nWant:\n\t%s\nGot:\n\t%s", ti, tc.wantAnswer[i], gotAnswer) - } - } - } - - if len(tc.wantNS) != len(rec.Msg.Ns) { - t.Errorf("Test %d: Unexpected NS number. Want: %d, got: %d", ti, len(tc.wantNS), len(rec.Msg.Ns)) - } else { - for i, ns := range rec.Msg.Ns { - got, ok := ns.(*dns.SOA) - if !ok { - t.Errorf("Test %d: Unexpected NS type. Want: SOA, got: %v", ti, reflect.TypeOf(got)) - } - if got.String() != tc.wantNS[i] { - t.Errorf("Test %d: Unexpected NS.\nWant: %v\nGot: %v", ti, tc.wantNS[i], got) - } - } - } - } -} - -// TestCloudDNSConcurrentServeDNS stresses r.ServeDNS directly to trigger -// concurrent Elem.Name() initialization from the file plugin. -func TestCloudDNSConcurrentServeDNS(t *testing.T) { - ctx := context.Background() - - r, err := New(ctx, - fakeGCPClient{}, - map[string][]string{ - "org.": {"sample-project-1:sample-zone-2", "sample-project-1:sample-zone-1"}, - }, - &upstream.Upstream{}, - ) - if err != nil { - t.Fatalf("Failed to create Cloud DNS: %v", err) - } - if err := r.Run(ctx); err != nil { - t.Fatalf("Failed to initialize Cloud DNS: %v", err) - } - - queries := []struct { - qname string - qtype uint16 - }{ - {"example.org", dns.TypeA}, - {"example.org", dns.TypeAAAA}, - {"sample.example.org", dns.TypeA}, - {"a.www.example.org", dns.TypeA}, - {"split-example.org", dns.TypeA}, - {"other-example.org", dns.TypeA}, - {"_dummy._tcp.example.org.", dns.TypeSRV}, - } - - var wg sync.WaitGroup - - // Concurrently refresh zones to race with Lookup reads. - wg.Add(1) - go func() { - defer wg.Done() - for range 50 { - _ = r.updateZones(ctx) - } - }() - - const workers = 32 - const iterations = 200 - for w := range workers { - wg.Add(1) - go func(id int) { - defer wg.Done() - for i := range iterations { - tc := queries[(id+i)%len(queries)] - req := new(dns.Msg) - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := r.ServeDNS(ctx, rec, req) - if err != nil { - t.Errorf("ServeDNS error: %v", err) - return - } - if code != dns.RcodeSuccess { - t.Errorf("unexpected return code: %v", code) - return - } - } - }(w) - } - - wg.Wait() -} - -// TestCloudDNSConcurrentLookupNameCache stresses hostedZone.z.Lookup -// directly to trigger concurrent Elem.Name() initialization from the file plugin. -func TestCloudDNSConcurrentLookupNameCache(t *testing.T) { - ctx := context.Background() - - r, err := New(ctx, - fakeGCPClient{}, - map[string][]string{ - "org.": {"sample-project-1:sample-zone-2", "sample-project-1:sample-zone-1"}, - }, - &upstream.Upstream{}) - if err != nil { - t.Fatalf("Failed to create Cloud DNS: %v", err) - } - if err := r.Run(ctx); err != nil { - t.Fatalf("Failed to initialize Cloud DNS: %v", err) - } - - // Use a fixed set of qnames that exist in the zones to maximize reuse of the same Elems. - queries := []struct { - qname string - qtype uint16 - }{ - {"example.org.", dns.TypeA}, - {"example.org.", dns.TypeAAAA}, - {"sample.example.org.", dns.TypeA}, - {"a.www.example.org.", dns.TypeA}, - {"split-example.org.", dns.TypeA}, - {"other-example.org.", dns.TypeA}, - {"_dummy._tcp.example.org.", dns.TypeSRV}, - } - - // Fan-out goroutines that repeatedly call Lookup on the same Zone pointer. - const workers = 32 - const iterations = 300 - - var wg sync.WaitGroup - for _, hostedZones := range r.zones { - for _, hz := range hostedZones { - z := hz.z - wg.Add(workers) - for w := range workers { - go func(id int, zptr *file.Zone) { - defer wg.Done() - for i := range iterations { - tc := queries[(id+i)%len(queries)] - req := new(dns.Msg) - req.SetQuestion(tc.qname, tc.qtype) - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - state := request.Request{W: rec, Req: req} - _, _, _, _ = zptr.Lookup(ctx, state, tc.qname) - } - }(w, z) - } - } - } - wg.Wait() -} diff --git a/plugin/clouddns/gcp.go b/plugin/clouddns/gcp.go deleted file mode 100644 index b02ab2bdaf..0000000000 --- a/plugin/clouddns/gcp.go +++ /dev/null @@ -1,40 +0,0 @@ -package clouddns - -import ( - "context" - - gcp "google.golang.org/api/dns/v1" -) - -type gcpDNS interface { - zoneExists(projectName, hostedZoneName string) error - listRRSets(ctx context.Context, projectName, hostedZoneName string) (*gcp.ResourceRecordSetsListResponse, error) -} - -type gcpClient struct { - *gcp.Service -} - -// zoneExists is a wrapper method around `gcp.Service.ManagedZones.Get` -// it checks if the provided zone name for a given project exists. -func (c gcpClient) zoneExists(projectName, hostedZoneName string) error { - _, err := c.ManagedZones.Get(projectName, hostedZoneName).Do() - if err != nil { - return err - } - return nil -} - -// listRRSets is a wrapper method around `gcp.Service.ResourceRecordSets.List` -// it fetches and returns the record sets for a hosted zone. -func (c gcpClient) listRRSets(ctx context.Context, projectName, hostedZoneName string) (*gcp.ResourceRecordSetsListResponse, error) { - req := c.ResourceRecordSets.List(projectName, hostedZoneName) - var rs []*gcp.ResourceRecordSet - if err := req.Pages(ctx, func(page *gcp.ResourceRecordSetsListResponse) error { - rs = append(rs, page.Rrsets...) - return nil - }); err != nil { - return nil, err - } - return &gcp.ResourceRecordSetsListResponse{Rrsets: rs}, nil -} diff --git a/plugin/clouddns/log_test.go b/plugin/clouddns/log_test.go deleted file mode 100644 index 148635b4be..0000000000 --- a/plugin/clouddns/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package clouddns - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/clouddns/setup.go b/plugin/clouddns/setup.go deleted file mode 100644 index 343f6c7051..0000000000 --- a/plugin/clouddns/setup.go +++ /dev/null @@ -1,108 +0,0 @@ -package clouddns - -import ( - "context" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/fall" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/pkg/upstream" - - gcp "google.golang.org/api/dns/v1" - "google.golang.org/api/option" -) - -var log = clog.NewWithPlugin("clouddns") - -func init() { plugin.Register("clouddns", setup) } - -// exposed for testing -var f = func(ctx context.Context, opt option.ClientOption) (gcpDNS, error) { - var err error - var client *gcp.Service - if opt != nil { - client, err = gcp.NewService(ctx, opt) - } else { - // if credentials file is not provided in the Corefile - // authenticate the client using env variables - client, err = gcp.NewService(ctx) - } - return gcpClient{client}, err -} - -func setup(c *caddy.Controller) error { - for c.Next() { - keyPairs := map[string]struct{}{} - keys := map[string][]string{} - - var fall fall.F - up := upstream.New() - - args := c.RemainingArgs() - - for i := range args { - parts := strings.SplitN(args[i], ":", 3) - if len(parts) != 3 { - return plugin.Error("clouddns", c.Errf("invalid zone %q", args[i])) - } - dnsName, projectName, hostedZone := parts[0], parts[1], parts[2] - if dnsName == "" || projectName == "" || hostedZone == "" { - return plugin.Error("clouddns", c.Errf("invalid zone %q", args[i])) - } - if _, ok := keyPairs[args[i]]; ok { - return plugin.Error("clouddns", c.Errf("conflict zone %q", args[i])) - } - - keyPairs[args[i]] = struct{}{} - keys[dnsName] = append(keys[dnsName], projectName+":"+hostedZone) - } - - var opt option.ClientOption - for c.NextBlock() { - switch c.Val() { - case "upstream": - c.RemainingArgs() - case "credentials": - if c.NextArg() { - opt = option.WithCredentialsFile(c.Val()) - } else { - return plugin.Error("clouddns", c.ArgErr()) - } - case "fallthrough": - fall.SetZonesFromArgs(c.RemainingArgs()) - default: - return plugin.Error("clouddns", c.Errf("unknown property %q", c.Val())) - } - } - - ctx, cancel := context.WithCancel(context.Background()) - client, err := f(ctx, opt) - if err != nil { - cancel() - return err - } - - h, err := New(ctx, client, keys, up) - if err != nil { - cancel() - return plugin.Error("clouddns", c.Errf("failed to create plugin: %v", err)) - } - h.Fall = fall - - if err := h.Run(ctx); err != nil { - cancel() - return plugin.Error("clouddns", c.Errf("failed to initialize plugin: %v", err)) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - h.Next = next - return h - }) - c.OnShutdown(func() error { cancel(); return nil }) - } - - return nil -} diff --git a/plugin/clouddns/setup_test.go b/plugin/clouddns/setup_test.go deleted file mode 100644 index ae2262e7a6..0000000000 --- a/plugin/clouddns/setup_test.go +++ /dev/null @@ -1,49 +0,0 @@ -package clouddns - -import ( - "context" - "testing" - - "github.com/coredns/caddy" - - "google.golang.org/api/option" -) - -func TestSetupCloudDNS(t *testing.T) { - f = func(ctx context.Context, opt option.ClientOption) (gcpDNS, error) { - return fakeGCPClient{}, nil - } - - tests := []struct { - body string - expectedError bool - }{ - {`clouddns`, false}, - {`clouddns :`, true}, - {`clouddns ::`, true}, - {`clouddns example.org.:example-project:zone-name`, false}, - {`clouddns example.org.:example-project:zone-name { }`, false}, - {`clouddns example.org.:example-project: { }`, true}, - {`clouddns example.org.:example-project:zone-name { }`, false}, - {`clouddns example.org.:example-project:zone-name { wat -}`, true}, - {`clouddns example.org.:example-project:zone-name { - fallthrough -}`, false}, - {`clouddns example.org.:example-project:zone-name { - credentials -}`, true}, - {`clouddns example.org.:example-project:zone-name example.org.:example-project:zone-name { - }`, true}, - - {`clouddns example.org { - }`, true}, - } - - for _, test := range tests { - c := caddy.NewTestController("dns", test.body) - if err := setup(c); (err == nil) == test.expectedError { - t.Errorf("Unexpected errors: %v", err) - } - } -} diff --git a/plugin/dns64/README.md b/plugin/dns64/README.md deleted file mode 100644 index 7975574854..0000000000 --- a/plugin/dns64/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# dns64 - -## Name - -*dns64* - enables DNS64 IPv6 transition mechanism. - -## Description - -The *dns64* plugin will when asked for a domain's AAAA records, but only finds A records, -synthesizes the AAAA records from the A records. - -The synthesis is *only* performed **if the query came in via IPv6**. - -This translation is for IPv6-only networks that have [NAT64](https://en.wikipedia.org/wiki/NAT64). - -## Syntax - -~~~ -dns64 [PREFIX] -~~~ - -* **PREFIX** defines a custom prefix instead of the default `64:ff9b::/96`. - -Or use this slightly longer form with more options: - -~~~ -dns64 [PREFIX] { - [translate_all] - prefix PREFIX - [allow_ipv4] -} -~~~ - -* `prefix` specifies any local IPv6 prefix to use, instead of the well known prefix (64:ff9b::/96) -* `translate_all` translates all queries, including responses that have AAAA results. -* `allow_ipv4` Allow translating queries if they come in over IPv4, default is IPv6 only translation. - -## Examples - -Translate with the default well known prefix. Applies to all queries (if they came in over IPv6). - -~~~ -. { - dns64 -} -~~~ - -Use a custom prefix. - -~~~ corefile -. { - dns64 64:1337::/96 -} -~~~ - -Or -~~~ corefile -. { - dns64 { - prefix 64:1337::/96 - } -} -~~~ - -Enable translation even if an existing AAAA record is present. - -~~~ corefile -. { - dns64 { - translate_all - } -} -~~~ - -Apply translation even to the requests which arrived over IPv4 network. Warning, the `allow_ipv4` feature will apply -translations to requests coming from dual-stack clients. This means that a request for a client that sends an `AAAA` -that would normal result in an `NXDOMAIN` would get a translated result. -This may cause unwanted IPv6 dns64 traffic when a dualstack client would normally use the result of an `A` record request. - -~~~ corefile -. { - dns64 { - allow_ipv4 - } -} -~~~ - -## Metrics - -If monitoring is enabled (via the _prometheus_ plugin) then the following metrics are exported: - -- `coredns_dns64_requests_translated_total{server}` - counter of DNS requests translated - -The `server` label is explained in the _prometheus_ plugin documentation. - -## Bugs - -Not all features required by DNS64 are implemented, only basic AAAA synthesis. - -* Support "mapping of separate IPv4 ranges to separate IPv6 prefixes" -* Resolve PTR records -* Make resolver DNSSEC aware. See: [RFC 6147 Section 3](https://tools.ietf.org/html/rfc6147#section-3) - -## See Also - -See [RFC 6147](https://tools.ietf.org/html/rfc6147) for more information on the DNS64 mechanism. diff --git a/plugin/dns64/dns64.go b/plugin/dns64/dns64.go deleted file mode 100644 index 01d98923be..0000000000 --- a/plugin/dns64/dns64.go +++ /dev/null @@ -1,205 +0,0 @@ -// Package dns64 implements a plugin that performs DNS64. -// -// See: RFC 6147 (https://tools.ietf.org/html/rfc6147) -package dns64 - -import ( - "context" - "errors" - "net" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/plugin/pkg/nonwriter" - "github.com/coredns/coredns/plugin/pkg/response" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// UpstreamInt wraps the Upstream API for dependency injection during testing -type UpstreamInt interface { - Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) -} - -// DNS64 performs DNS64. -type DNS64 struct { - Next plugin.Handler - Prefix *net.IPNet - TranslateAll bool // Not comply with 5.1.1 - AllowIPv4 bool - Upstream UpstreamInt -} - -// ServeDNS implements the plugin.Handler interface. -func (d *DNS64) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - // Don't proxy if we don't need to. - if !d.requestShouldIntercept(&request.Request{W: w, Req: r}) { - return plugin.NextOrFailure(d.Name(), d.Next, ctx, w, r) - } - - // Pass the request to the next plugin in the chain, but intercept the response. - nw := nonwriter.New(w) - origRc, origErr := d.Next.ServeDNS(ctx, nw, r) - if nw.Msg == nil { // somehow we didn't get a response (or raw bytes were written) - return origRc, origErr - } - - // If the response doesn't need DNS64, short-circuit. - if !d.responseShouldDNS64(nw.Msg) { - w.WriteMsg(nw.Msg) - return origRc, origErr - } - - // otherwise do the actual DNS64 request and response synthesis - msg, err := d.DoDNS64(ctx, w, r, nw.Msg) - if err != nil { - // err means we weren't able to even issue the A request - // to CoreDNS upstream - return dns.RcodeServerFailure, err - } - - RequestsTranslatedCount.WithLabelValues(metrics.WithServer(ctx)).Inc() - w.WriteMsg(msg) - return msg.Rcode, nil -} - -// Name implements the Handler interface. -func (d *DNS64) Name() string { return "dns64" } - -// requestShouldIntercept returns true if the request represents one that is eligible -// for DNS64 rewriting: -// 1. The request came in over IPv6 or the 'allow_ipv4' option is set -// 2. The request is of type AAAA -// 3. The request is of class INET -func (d *DNS64) requestShouldIntercept(req *request.Request) bool { - // Make sure that request came in over IPv4 unless AllowIPv4 option is enabled. - // Translating requests without taking into consideration client (source) IP might be problematic in dual-stack networks. - if !d.AllowIPv4 && req.Family() == 1 { - return false - } - - // Do not modify if question is not AAAA or not of class IN. See RFC 6147 5.1 - return req.QType() == dns.TypeAAAA && req.QClass() == dns.ClassINET -} - -// responseShouldDNS64 returns true if the response indicates we should attempt -// DNS64 rewriting: -// 1. The response has no valid (RFC 5.1.4) AAAA records (RFC 5.1.1) -// 2. The response code (RCODE) is not 3 (Name Error) (RFC 5.1.2) -// -// Note that requestShouldIntercept must also have been true, so the request -// is known to be of type AAAA. -func (d *DNS64) responseShouldDNS64(origResponse *dns.Msg) bool { - ty, _ := response.Typify(origResponse, time.Now().UTC()) - - // Handle NameError normally. See RFC 6147 5.1.2 - // All other error types are "equivalent" to empty response - if ty == response.NameError { - return false - } - - // If we've configured to always translate, well, then always translate. - if d.TranslateAll { - return true - } - - // if response includes AAAA record, no need to rewrite - for _, rr := range origResponse.Answer { - if rr.Header().Rrtype == dns.TypeAAAA { - return false - } - } - return true -} - -// DoDNS64 takes an (empty) response to an AAAA question, issues the A request, -// and synthesizes the answer. Returns the response message, or error on internal failure. -func (d *DNS64) DoDNS64(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, origResponse *dns.Msg) (*dns.Msg, error) { - req := request.Request{W: w, Req: r} // req is unused - resp, err := d.Upstream.Lookup(ctx, req, req.Name(), dns.TypeA) - if err != nil { - return nil, err - } - out := d.Synthesize(r, origResponse, resp) - return out, nil -} - -// Synthesize merges the AAAA response and the records from the A response -func (d *DNS64) Synthesize(origReq, origResponse, resp *dns.Msg) *dns.Msg { - ret := dns.Msg{} - ret.SetReply(origReq) - - // persist truncated state of AAAA response - ret.Truncated = resp.Truncated - - // 5.3.2: DNS64 MUST pass the additional section unchanged - ret.Extra = resp.Extra - ret.Ns = resp.Ns - - // 5.1.7: The TTL is the minimum of the A RR and the SOA RR. If SOA is - // unknown, then the TTL is the minimum of A TTL and 600 - SOATtl := uint32(600) // Default NS record TTL - for _, ns := range origResponse.Ns { - if ns.Header().Rrtype == dns.TypeSOA { - SOATtl = ns.Header().Ttl - } - } - - ret.Answer = make([]dns.RR, 0, len(resp.Answer)) - // convert A records to AAAA records - for _, rr := range resp.Answer { - header := rr.Header() - // 5.3.3: All other RR's MUST be returned unchanged - if header.Rrtype != dns.TypeA { - ret.Answer = append(ret.Answer, rr) - continue - } - - aaaa, _ := to6(d.Prefix, rr.(*dns.A).A) - - // ttl is min of SOA TTL and A TTL - ttl := min(rr.Header().Ttl, SOATtl) - - // Replace A answer with a DNS64 AAAA answer - ret.Answer = append(ret.Answer, &dns.AAAA{ - Hdr: dns.RR_Header{ - Name: header.Name, - Rrtype: dns.TypeAAAA, - Class: header.Class, - Ttl: ttl, - }, - AAAA: aaaa, - }) - } - return &ret -} - -// to6 takes a prefix and IPv4 address and returns an IPv6 address according to RFC 6052. -func to6(prefix *net.IPNet, addr net.IP) (net.IP, error) { - addr = addr.To4() - if addr == nil { - return nil, errors.New("not a valid IPv4 address") - } - - n, _ := prefix.Mask.Size() - // Assumes prefix has been validated during setup - v6 := make([]byte, 16) - i, j := 0, 0 - - for ; i < n/8; i++ { - v6[i] = prefix.IP[i] - } - for ; i < 8; i, j = i+1, j+1 { - v6[i] = addr[j] - } - if i == 8 { - i++ - } - for ; j < 4; i, j = i+1, j+1 { - v6[i] = addr[j] - } - - return v6, nil -} diff --git a/plugin/dns64/dns64_test.go b/plugin/dns64/dns64_test.go deleted file mode 100644 index a294721dc6..0000000000 --- a/plugin/dns64/dns64_test.go +++ /dev/null @@ -1,556 +0,0 @@ -package dns64 - -import ( - "context" - "fmt" - "net" - "reflect" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func To6(prefix, address string) (net.IP, error) { - _, pref, _ := net.ParseCIDR(prefix) - addr := net.ParseIP(address) - - return to6(pref, addr) -} - -func TestRequestShouldIntercept(t *testing.T) { - tests := []struct { - name string - allowIpv4 bool - remoteIP string - msg *dns.Msg - want bool - }{ - { - name: "should intercept request from IPv6 network - AAAA - IN", - allowIpv4: true, - remoteIP: "::1", - msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA), - want: true, - }, - { - name: "should intercept request from IPv4 network - AAAA - IN", - allowIpv4: true, - remoteIP: "127.0.0.1", - msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA), - want: true, - }, - { - name: "should not intercept request from IPv4 network - AAAA - IN", - allowIpv4: false, - remoteIP: "127.0.0.1", - msg: new(dns.Msg).SetQuestion("example.com", dns.TypeAAAA), - want: false, - }, - { - name: "should not intercept request from IPv6 network - A - IN", - allowIpv4: false, - remoteIP: "::1", - msg: new(dns.Msg).SetQuestion("example.com", dns.TypeA), - want: false, - }, - } - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - h := DNS64{AllowIPv4: tc.allowIpv4} - rec := dnstest.NewRecorder(&test.ResponseWriter{RemoteIP: tc.remoteIP}) - r := request.Request{W: rec, Req: tc.msg} - - actual := h.requestShouldIntercept(&r) - - if actual != tc.want { - t.Fatalf("Expected %v, but got %v", tc.want, actual) - } - }) - } -} - -func TestTo6(t *testing.T) { - v6, err := To6("64:ff9b::/96", "64.64.64.64") - if err != nil { - t.Error(err) - } - if v6.String() != "64:ff9b::4040:4040" { - t.Errorf("%d", v6) - } - - v6, err = To6("64:ff9b::/64", "64.64.64.64") - if err != nil { - t.Error(err) - } - if v6.String() != "64:ff9b::40:4040:4000:0" { - t.Errorf("%d", v6) - } - - v6, err = To6("64:ff9b::/56", "64.64.64.64") - if err != nil { - t.Error(err) - } - if v6.String() != "64:ff9b:0:40:40:4040::" { - t.Errorf("%d", v6) - } - - v6, err = To6("64::/32", "64.64.64.64") - if err != nil { - t.Error(err) - } - if v6.String() != "64:0:4040:4040::" { - t.Errorf("%d", v6) - } -} - -func TestResponseShould(t *testing.T) { - var tests = []struct { - resp dns.Msg - translateAll bool - expected bool - }{ - // If there's an AAAA record, then no - { - resp: dns.Msg{ - MsgHdr: dns.MsgHdr{ - Rcode: dns.RcodeSuccess, - }, - Answer: []dns.RR{ - test.AAAA("example.com. IN AAAA ::1"), - }, - }, - expected: false, - }, - // If there's no AAAA, then true - { - resp: dns.Msg{ - MsgHdr: dns.MsgHdr{ - Rcode: dns.RcodeSuccess, - }, - Ns: []dns.RR{ - test.SOA("example.com. IN SOA foo bar 1 1 1 1 1"), - }, - }, - expected: true, - }, - // Failure, except NameError, should be true - { - resp: dns.Msg{ - MsgHdr: dns.MsgHdr{ - Rcode: dns.RcodeNotImplemented, - }, - Ns: []dns.RR{ - test.SOA("example.com. IN SOA foo bar 1 1 1 1 1"), - }, - }, - expected: true, - }, - // NameError should be false - { - resp: dns.Msg{ - MsgHdr: dns.MsgHdr{ - Rcode: dns.RcodeNameError, - }, - Ns: []dns.RR{ - test.SOA("example.com. IN SOA foo bar 1 1 1 1 1"), - }, - }, - expected: false, - }, - // If there's an AAAA record, but translate_all is configured, then yes - { - resp: dns.Msg{ - MsgHdr: dns.MsgHdr{ - Rcode: dns.RcodeSuccess, - }, - Answer: []dns.RR{ - test.AAAA("example.com. IN AAAA ::1"), - }, - }, - translateAll: true, - expected: true, - }, - } - - d := DNS64{} - - for idx, tc := range tests { - t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) { - d.TranslateAll = tc.translateAll - actual := d.responseShouldDNS64(&tc.resp) - if actual != tc.expected { - t.Fatalf("Expected %v got %v", tc.expected, actual) - } - }) - } -} - -func TestDNS64(t *testing.T) { - var cases = []struct { - // a brief summary of the test case - name string - - // the request - req *dns.Msg - - // the initial response from the "downstream" server - initResp *dns.Msg - - // A response to provide - aResp *dns.Msg - - // the expected ultimate result - resp *dns.Msg - }{ - { - // no AAAA record, yes A record. Do DNS64 - name: "standard flow", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - initResp: &dns.Msg{ //success, no answers - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 70 IN SOA foo bar 1 1 1 1 1")}, - }, - aResp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 43, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.A("example.com. 60 IN A 192.0.2.42"), - test.A("example.com. 5000 IN A 192.0.2.43"), - }, - }, - - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.AAAA("example.com. 60 IN AAAA 64:ff9b::192.0.2.42"), - // override RR ttl to SOA ttl, since it's lower - test.AAAA("example.com. 70 IN AAAA 64:ff9b::192.0.2.43"), - }, - }, - }, - { - // name exists, but has neither A nor AAAA record - name: "a empty", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - initResp: &dns.Msg{ //success, no answers - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 3600 IN SOA foo bar 1 7200 900 1209600 86400")}, - }, - aResp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 43, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 3600 IN SOA foo bar 1 7200 900 1209600 86400")}, - }, - - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 3600 IN SOA foo bar 1 7200 900 1209600 86400")}, - Answer: []dns.RR{}, // just to make comparison happy - }, - }, - { - // Query error other than NameError - name: "non-nxdomain error", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - initResp: &dns.Msg{ // failure - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeRefused, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - aResp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 43, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.A("example.com. 60 IN A 192.0.2.42"), - test.A("example.com. 5000 IN A 192.0.2.43"), - }, - }, - - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.AAAA("example.com. 60 IN AAAA 64:ff9b::192.0.2.42"), - test.AAAA("example.com. 600 IN AAAA 64:ff9b::192.0.2.43"), - }, - }, - }, - { - // nxdomain (NameError): don't even try an A request. - name: "nxdomain", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - initResp: &dns.Msg{ // failure - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeNameError, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 3600 IN SOA foo bar 1 7200 900 1209600 86400")}, - }, - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeNameError, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 3600 IN SOA foo bar 1 7200 900 1209600 86400")}, - }, - }, - { - // AAAA record exists - name: "AAAA record", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - - initResp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.AAAA("example.com. 60 IN AAAA ::1"), - test.AAAA("example.com. 5000 IN AAAA ::2"), - }, - }, - - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.AAAA("example.com. 60 IN AAAA ::1"), - test.AAAA("example.com. 5000 IN AAAA ::2"), - }, - }, - }, - { - // no AAAA records, A record response truncated. - name: "truncated A response", - req: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - RecursionDesired: true, - Opcode: dns.OpcodeQuery, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - }, - initResp: &dns.Msg{ //success, no answers - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Ns: []dns.RR{test.SOA("example.com. 70 IN SOA foo bar 1 1 1 1 1")}, - }, - aResp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 43, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Truncated: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.A("example.com. 60 IN A 192.0.2.42"), - test.A("example.com. 5000 IN A 192.0.2.43"), - }, - }, - - resp: &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Id: 42, - Opcode: dns.OpcodeQuery, - RecursionDesired: true, - Truncated: true, - Rcode: dns.RcodeSuccess, - Response: true, - }, - Question: []dns.Question{{Name: "example.com.", Qtype: dns.TypeAAAA, Qclass: dns.ClassINET}}, - Answer: []dns.RR{ - test.AAAA("example.com. 60 IN AAAA 64:ff9b::192.0.2.42"), - // override RR ttl to SOA ttl, since it's lower - test.AAAA("example.com. 70 IN AAAA 64:ff9b::192.0.2.43"), - }, - }, - }, - } - - _, pfx, _ := net.ParseCIDR("64:ff9b::/96") - - for idx, tc := range cases { - t.Run(fmt.Sprintf("%d_%s", idx, tc.name), func(t *testing.T) { - d := DNS64{ - Next: &fakeHandler{t, tc.initResp}, - Prefix: pfx, - Upstream: &fakeUpstream{t, tc.req.Question[0].Name, tc.aResp}, - } - - rec := dnstest.NewRecorder(&test.ResponseWriter{RemoteIP: "::1"}) - rc, err := d.ServeDNS(context.Background(), rec, tc.req) - if err != nil { - t.Fatal(err) - } - actual := rec.Msg - if actual.Rcode != rc { - t.Fatalf("ServeDNS should return real result code %q != %q", actual.Rcode, rc) - } - - if !reflect.DeepEqual(actual, tc.resp) { - t.Fatalf("Final answer should match expected %q != %q", actual, tc.resp) - } - }) - } -} - -type fakeHandler struct { - t *testing.T - reply *dns.Msg -} - -func (fh *fakeHandler) ServeDNS(_ context.Context, w dns.ResponseWriter, _ *dns.Msg) (int, error) { - if fh.reply == nil { - panic("fakeHandler ServeDNS with nil reply") - } - w.WriteMsg(fh.reply) - - return fh.reply.Rcode, nil -} -func (fh *fakeHandler) Name() string { - return "fake" -} - -type fakeUpstream struct { - t *testing.T - qname string - resp *dns.Msg -} - -func (fu *fakeUpstream) Lookup(_ context.Context, _ request.Request, name string, typ uint16) (*dns.Msg, error) { - if fu.qname == "" { - fu.t.Fatalf("Unexpected A lookup for %s", name) - } - if name != fu.qname { - fu.t.Fatalf("Wrong A lookup for %s, expected %s", name, fu.qname) - } - - if typ != dns.TypeA { - fu.t.Fatalf("Wrong lookup type %d, expected %d", typ, dns.TypeA) - } - - return fu.resp, nil -} diff --git a/plugin/dns64/metrics.go b/plugin/dns64/metrics.go deleted file mode 100644 index 955231667a..0000000000 --- a/plugin/dns64/metrics.go +++ /dev/null @@ -1,18 +0,0 @@ -package dns64 - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // RequestsTranslatedCount is the number of DNS requests translated by dns64. - RequestsTranslatedCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "requests_translated_total", - Help: "Counter of DNS requests translated by dns64.", - }, []string{"server"}) -) diff --git a/plugin/dns64/setup.go b/plugin/dns64/setup.go deleted file mode 100644 index 5e061875f3..0000000000 --- a/plugin/dns64/setup.go +++ /dev/null @@ -1,92 +0,0 @@ -package dns64 - -import ( - "net" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/upstream" -) - -const pluginName = "dns64" - -func init() { plugin.Register(pluginName, setup) } - -func setup(c *caddy.Controller) error { - dns64, err := dns64Parse(c) - if err != nil { - return plugin.Error(pluginName, err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - dns64.Next = next - return dns64 - }) - - return nil -} - -func dns64Parse(c *caddy.Controller) (*DNS64, error) { - _, defaultPref, _ := net.ParseCIDR("64:ff9b::/96") - dns64 := &DNS64{ - Upstream: upstream.New(), - Prefix: defaultPref, - } - - for c.Next() { - args := c.RemainingArgs() - if len(args) == 1 { - pref, err := parsePrefix(c, args[0]) - - if err != nil { - return nil, err - } - dns64.Prefix = pref - continue - } - if len(args) > 0 { - return nil, c.ArgErr() - } - - for c.NextBlock() { - switch c.Val() { - case "prefix": - if !c.NextArg() { - return nil, c.ArgErr() - } - pref, err := parsePrefix(c, c.Val()) - - if err != nil { - return nil, err - } - dns64.Prefix = pref - case "translate_all": - dns64.TranslateAll = true - case "allow_ipv4": - dns64.AllowIPv4 = true - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - } - return dns64, nil -} - -func parsePrefix(c *caddy.Controller, addr string) (*net.IPNet, error) { - _, pref, err := net.ParseCIDR(addr) - if err != nil { - return nil, err - } - - // Test for valid prefix - n, total := pref.Mask.Size() - if total != 128 { - return nil, c.Errf("invalid netmask %d IPv6 address: %q", total, pref) - } - if n%8 != 0 || n < 32 || n > 96 { - return nil, c.Errf("invalid prefix length %q", pref) - } - - return pref, nil -} diff --git a/plugin/dns64/setup_test.go b/plugin/dns64/setup_test.go deleted file mode 100644 index e7d13f4183..0000000000 --- a/plugin/dns64/setup_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package dns64 - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSetupDns64(t *testing.T) { - tests := []struct { - inputUpstreams string - shouldErr bool - wantPrefix string - wantAllowIpv4 bool - }{ - { - `dns64`, - false, - "64:ff9b::/96", - false, - }, - { - `dns64 64:dead::/96`, - false, - "64:dead::/96", - false, - }, - { - `dns64 { - translate_all - }`, - false, - "64:ff9b::/96", - false, - }, - { - `dns64`, - false, - "64:ff9b::/96", - false, - }, - { - `dns64 { - prefix 64:ff9b::/96 - }`, - false, - "64:ff9b::/96", - false, - }, - { - `dns64 { - prefix 64:ff9b::/32 - }`, - false, - "64:ff9b::/32", - false, - }, - { - `dns64 { - prefix 64:ff9b::/52 - }`, - true, - "64:ff9b::/52", - false, - }, - { - `dns64 { - prefix 64:ff9b::/104 - }`, - true, - "64:ff9b::/104", - false, - }, - { - `dns64 { - prefix 8.8.8.8/24 - }`, - true, - "8.8.9.9/24", - false, - }, - { - `dns64 { - prefix 64:ff9b::/96 - }`, - false, - "64:ff9b::/96", - false, - }, - { - `dns64 { - prefix 2002:ac12:b083::/96 - }`, - false, - "2002:ac12:b083::/96", - false, - }, - { - `dns64 { - prefix 2002:c0a8:a88a::/48 - }`, - false, - "2002:c0a8:a88a::/48", - false, - }, - { - `dns64 foobar { - prefix 64:ff9b::/96 - }`, - true, - "64:ff9b::/96", - false, - }, - { - `dns64 foobar`, - true, - "64:ff9b::/96", - false, - }, - { - `dns64 { - foobar - }`, - true, - "64:ff9b::/96", - false, - }, - { - `dns64 { - allow_ipv4 - }`, - false, - "64:ff9b::/96", - true, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputUpstreams) - dns64, err := dns64Parse(c) - if (err != nil) != test.shouldErr { - t.Errorf("Test %d expected %v error, got %v for %s", i+1, test.shouldErr, err, test.inputUpstreams) - } - if err == nil { - if dns64.Prefix.String() != test.wantPrefix { - t.Errorf("Test %d expected prefix %s, got %v", i+1, test.wantPrefix, dns64.Prefix.String()) - } - if dns64.AllowIPv4 != test.wantAllowIpv4 { - t.Errorf("Test %d expected prefix %v, got %v", i+1, test.wantAllowIpv4, dns64.AllowIPv4) - } - } - } -} diff --git a/plugin/dnssec/README.md b/plugin/dnssec/README.md deleted file mode 100644 index f586ca9ff7..0000000000 --- a/plugin/dnssec/README.md +++ /dev/null @@ -1,119 +0,0 @@ -# dnssec - -## Name - -*dnssec* - enables on-the-fly DNSSEC signing of served data. - -## Description - -With *dnssec*, any reply that doesn't (or can't) do DNSSEC will get signed on the fly. Authenticated -denial of existence is implemented with NSEC black lies. Using ECDSA as an algorithm is preferred as -this leads to smaller signatures (compared to RSA). NSEC3 is *not* supported. - -This plugin can only be used once per Server Block. - -## Syntax - -~~~ -dnssec [ZONES... ] { - key file|aws_secretsmanager KEY... - cache_capacity CAPACITY -} -~~~ - -The signing behavior depends on the keys specified. If multiple keys are specified of which there is -at least one key with the SEP bit set and at least one key with the SEP bit unset, signing will happen -in split ZSK/KSK mode. DNSKEY records will be signed with all keys that have the SEP bit set. All other -records will be signed with all keys that do not have the SEP bit set. - -In any other case, each specified key will be treated as a CSK (common signing key), forgoing the -ZSK/KSK split. All signing operations are done online. -Authenticated denial of existence is implemented with NSEC black lies. Using ECDSA as an algorithm -is preferred as this leads to smaller signatures (compared to RSA). NSEC3 is *not* supported. - -As the *dnssec* plugin can't see the original TTL of the RRSets it signs, it will always use 3600s -as the value. - -If multiple *dnssec* plugins are specified in the same zone, the last one specified will be -used. - -* **ZONES** zones that should be signed. If empty, the zones from the configuration block - are used. - -* `key file` indicates that **KEY** file(s) should be read from disk. When multiple keys are specified, RRsets - will be signed with all keys. Generating a key can be done with `dnssec-keygen`: `dnssec-keygen -a - ECDSAP256SHA256 `. A key created for zone *A* can be safely used for zone *B*. The name of the - key file can be specified in one of the following formats - - * basename of the generated key `Kexample.org+013+45330` - * generated public key `Kexample.org+013+45330.key` - * generated private key `Kexample.org+013+45330.private` - -* `key aws_secretsmanager` indicates that **KEY** secret(s) should be read from AWS Secrets Manager. Secret - names or ARNs may be used. After generating the keys as described in the `key file` section, you can - store them in AWS Secrets Manager using the following AWS CLI v2 command: - - ```sh - aws secretsmanager create-secret --name "Kexample.org.+013+45330" \ - --description "DNSSEC keys for example.org" \ - --secret-string "$(jq -n --arg key "$(cat Kexample.org.+013+45330.key)" \ - --arg private "$(cat Kexample.org.+013+45330.private)" \ - '{key: $key, private: $private}')" - ``` - - This command reads the contents of the `.key` and `.private` files, constructs a JSON object, and stores it - as a new secret in AWS Secrets Manager with the specified name and description. CoreDNS will then fetch - the key data from AWS Secrets Manager when using the `key aws_secretsmanager` directive. - - [AWS SDK for Go V2](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials) is used - for authentication with AWS Secrets Manager. Make sure the provided AWS credentials have the necessary - permissions (e.g., `secretsmanager:GetSecretValue`) to access the specified secrets in AWS Secrets Manager. - -* `cache_capacity` indicates the capacity of the cache. The dnssec plugin uses a cache to store - RRSIGs. The default for **CAPACITY** is 10000. - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metrics are exported: - -* `coredns_dnssec_cache_entries{server, type}` - total elements in the cache, type is "signature". -* `coredns_dnssec_cache_hits_total{server}` - Counter of cache hits. -* `coredns_dnssec_cache_misses_total{server}` - Counter of cache misses. - -The label `server` indicated the server handling the request, see the *metrics* plugin for details. - -## Examples - -Sign responses for `example.org` with the key "Kexample.org.+013+45330.key". - -~~~ corefile -example.org { - dnssec { - key file Kexample.org.+013+45330 - } - whoami -} -~~~ - -Sign responses for `example.org` with the key stored in AWS Secrets Manager under the secret name -"Kexample.org.+013+45330". - -~~~ -example.org { - dnssec { - key aws_secretsmanager Kexample.org.+013+45330 - } - whoami -} -~~~ - -Sign responses for a kubernetes zone with the key "Kcluster.local+013+45129.key". - -~~~ -cluster.local { - kubernetes - dnssec { - key file Kcluster.local+013+45129 - } -} -~~~ diff --git a/plugin/dnssec/black_lies.go b/plugin/dnssec/black_lies.go deleted file mode 100644 index d01fa7c840..0000000000 --- a/plugin/dnssec/black_lies.go +++ /dev/null @@ -1,79 +0,0 @@ -package dnssec - -import ( - "strings" - - "github.com/coredns/coredns/plugin/pkg/response" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// nsec returns an NSEC useful for NXDOMAIN responses. -// See https://tools.ietf.org/html/draft-valsorda-dnsop-black-lies-00 -// For example, a request for the non-existing name a.example.com would -// cause the following NSEC record to be generated: -// -// a.example.com. 3600 IN NSEC \000.a.example.com. ( RRSIG NSEC ... ) -// -// This inturn makes every NXDOMAIN answer a NODATA one, don't forget to flip -// the header rcode to NOERROR. -func (d Dnssec) nsec(state request.Request, mt response.Type, ttl, incep, expir uint32, server string) ([]dns.RR, error) { - nsec := &dns.NSEC{} - nsec.Hdr = dns.RR_Header{Name: state.QName(), Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeNSEC} - nsec.NextDomain = "\\000." + state.QName() - if state.QName() == "." { - nsec.NextDomain = "\\000." // If You want to play as root server - } - if state.Name() == state.Zone { - nsec.TypeBitMap = filter18(state.QType(), apexBitmap, mt) - } else if mt == response.Delegation || state.QType() == dns.TypeDS { - nsec.TypeBitMap = delegationBitmap[:] - if mt == response.Delegation { - labels := dns.SplitDomainName(state.QName()) - labels[0] += "\\000" - nsec.NextDomain = strings.Join(labels, ".") + "." - } - } else { - nsec.TypeBitMap = filter14(state.QType(), zoneBitmap, mt) - } - - sigs, err := d.sign([]dns.RR{nsec}, state.Zone, ttl, incep, expir, server) - if err != nil { - return nil, err - } - - return append(sigs, nsec), nil -} - -// The NSEC bit maps we return. -var ( - delegationBitmap = [...]uint16{dns.TypeA, dns.TypeNS, dns.TypeHINFO, dns.TypeTXT, dns.TypeAAAA, dns.TypeLOC, dns.TypeSRV, dns.TypeCERT, dns.TypeSSHFP, dns.TypeRRSIG, dns.TypeNSEC, dns.TypeTLSA, dns.TypeHIP, dns.TypeOPENPGPKEY, dns.TypeSPF} - zoneBitmap = [...]uint16{dns.TypeA, dns.TypeHINFO, dns.TypeTXT, dns.TypeAAAA, dns.TypeLOC, dns.TypeSRV, dns.TypeCERT, dns.TypeSSHFP, dns.TypeRRSIG, dns.TypeNSEC, dns.TypeTLSA, dns.TypeHIP, dns.TypeOPENPGPKEY, dns.TypeSPF} - apexBitmap = [...]uint16{dns.TypeA, dns.TypeNS, dns.TypeSOA, dns.TypeHINFO, dns.TypeMX, dns.TypeTXT, dns.TypeAAAA, dns.TypeLOC, dns.TypeSRV, dns.TypeCERT, dns.TypeSSHFP, dns.TypeRRSIG, dns.TypeNSEC, dns.TypeDNSKEY, dns.TypeTLSA, dns.TypeHIP, dns.TypeOPENPGPKEY, dns.TypeSPF} -) - -// filter14 filters out t from bitmap (if it exists). If mt is not an NODATA response, just return the entire bitmap. -func filter14(t uint16, bitmap [14]uint16, mt response.Type) []uint16 { - if mt != response.NoData && mt != response.NameError || t == dns.TypeNSEC { - return zoneBitmap[:] - } - for i := range bitmap { - if bitmap[i] == t { - return append(bitmap[:i], bitmap[i+1:]...) - } - } - return zoneBitmap[:] // make a slice -} - -func filter18(t uint16, bitmap [18]uint16, mt response.Type) []uint16 { - if mt != response.NoData && mt != response.NameError || t == dns.TypeNSEC { - return apexBitmap[:] - } - for i := range bitmap { - if bitmap[i] == t { - return append(bitmap[:i], bitmap[i+1:]...) - } - } - return apexBitmap[:] // make a slice -} diff --git a/plugin/dnssec/black_lies_bitmap_test.go b/plugin/dnssec/black_lies_bitmap_test.go deleted file mode 100644 index 4e9a10cf6b..0000000000 --- a/plugin/dnssec/black_lies_bitmap_test.go +++ /dev/null @@ -1,64 +0,0 @@ -package dnssec - -import ( - "testing" - "time" - - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -const server = "dns//." - -func TestBlackLiesBitmapNoData(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"example.org."}) - defer rm1() - defer rm2() - - m := testTLSAMsg() - state := request.Request{Req: m, Zone: "example.org."} - m = d.Sign(state, time.Now().UTC(), server) - - var nsec *dns.NSEC - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - } - for _, b := range nsec.TypeBitMap { - if b == dns.TypeTLSA { - t.Errorf("Type TLSA should not be present in the type bitmap: %v", nsec.TypeBitMap) - } - } -} -func TestBlackLiesBitmapNameError(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"example.org."}) - defer rm1() - defer rm2() - - m := testTLSAMsg() - m.Rcode = dns.RcodeNameError // change to name error - state := request.Request{Req: m, Zone: "example.org."} - m = d.Sign(state, time.Now().UTC(), server) - - var nsec *dns.NSEC - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - } - for _, b := range nsec.TypeBitMap { - if b == dns.TypeTLSA { - t.Errorf("Type TLSA should not be present in the type bitmap: %v", nsec.TypeBitMap) - } - } -} - -func testTLSAMsg() *dns.Msg { - return &dns.Msg{MsgHdr: dns.MsgHdr{Rcode: dns.RcodeSuccess}, - Question: []dns.Question{{Name: "25._tcp.example.org.", Qclass: dns.ClassINET, Qtype: dns.TypeTLSA}}, - Ns: []dns.RR{test.SOA("example.org. 1800 IN SOA linode.example.org. miek.example.org. 1461471181 14400 3600 604800 14400")}, - } -} diff --git a/plugin/dnssec/black_lies_test.go b/plugin/dnssec/black_lies_test.go deleted file mode 100644 index de381e59f6..0000000000 --- a/plugin/dnssec/black_lies_test.go +++ /dev/null @@ -1,258 +0,0 @@ -package dnssec - -import ( - "testing" - "time" - - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestZoneSigningBlackLies(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testNxdomainMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 2) { - t.Errorf("Authority section should have 2 sigs") - } - var nsec *dns.NSEC - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - } - if m.Rcode != dns.RcodeSuccess { - t.Errorf("Expected rcode %d, got %d", dns.RcodeSuccess, m.Rcode) - } - if nsec == nil { - t.Fatalf("Expected NSEC, got none") - } - if nsec.Hdr.Name != "ww.miek.nl." { - t.Errorf("Expected %s, got %s", "ww.miek.nl.", nsec.Hdr.Name) - } - if nsec.NextDomain != "\\000.ww.miek.nl." { - t.Errorf("Expected %s, got %s", "\\000.ww.miek.nl.", nsec.NextDomain) - } -} - -func TestBlackLiesNoError(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testSuccessMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - - if m.Rcode != dns.RcodeSuccess { - t.Errorf("Expected rcode %d, got %d", dns.RcodeSuccess, m.Rcode) - } - - if len(m.Answer) != 2 { - t.Errorf("Answer section should have 2 RRs") - } - sig, txt := false, false - for _, rr := range m.Answer { - if _, ok := rr.(*dns.RRSIG); ok { - sig = true - } - if _, ok := rr.(*dns.TXT); ok { - txt = true - } - } - if !sig || !txt { - t.Errorf("Expected RRSIG and TXT in answer section") - } -} - -func TestBlackLiesApexNsec(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testNsecMsg() - m.SetQuestion("miek.nl.", dns.TypeNSEC) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if len(m.Ns) > 0 { - t.Error("Authority section should be empty") - } - if len(m.Answer) != 2 { - t.Errorf("Answer section should have 2 RRs") - } - sig, nsec := false, false - for _, rr := range m.Answer { - if _, ok := rr.(*dns.RRSIG); ok { - sig = true - } - if rnsec, ok := rr.(*dns.NSEC); ok { - nsec = true - var bitpresent uint - for _, typeBit := range rnsec.TypeBitMap { - switch typeBit { - case dns.TypeSOA: - bitpresent |= 4 - case dns.TypeNSEC: - bitpresent |= 1 - case dns.TypeRRSIG: - bitpresent |= 2 - } - } - if bitpresent != 7 { - t.Error("NSEC must have SOA, RRSIG and NSEC in its bitmap") - } - } - } - if !sig || !nsec { - t.Errorf("Expected RRSIG and NSEC in answer section") - } -} - -func TestBlackLiesNsec(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testNsecMsg() - m.SetQuestion("www.miek.nl.", dns.TypeNSEC) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if len(m.Ns) > 0 { - t.Error("Authority section should be empty") - } - if len(m.Answer) != 2 { - t.Errorf("Answer section should have 2 RRs") - } - sig, nsec := false, false - for _, rr := range m.Answer { - if _, ok := rr.(*dns.RRSIG); ok { - sig = true - } - if rnsec, ok := rr.(*dns.NSEC); ok { - nsec = true - var bitpresent uint - for _, typeBit := range rnsec.TypeBitMap { - switch typeBit { - case dns.TypeNSEC: - bitpresent |= 1 - case dns.TypeRRSIG: - bitpresent |= 2 - } - } - if bitpresent != 3 { - t.Error("NSEC must have RRSIG and NSEC in its bitmap") - } - } - } - if !sig || !nsec { - t.Errorf("Expected RRSIG and NSEC in answer section") - } -} - -func TestBlackLiesApexDS(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testApexDSMsg() - m.SetQuestion("miek.nl.", dns.TypeDS) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 2) { - t.Errorf("Authority section should have 2 sigs") - } - var nsec *dns.NSEC - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - } - if nsec == nil { - t.Error("Expected NSEC, got none") - } else if correctNsecForDS(nsec) { - t.Error("NSEC DS at the apex zone should cover all apex type.") - } -} - -func TestBlackLiesDS(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testApexDSMsg() - m.SetQuestion("sub.miek.nl.", dns.TypeDS) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 2) { - t.Errorf("Authority section should have 2 sigs") - } - var nsec *dns.NSEC - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - } - if nsec == nil { - t.Error("Expected NSEC, got none") - } else if !correctNsecForDS(nsec) { - t.Error("NSEC DS should cover delegation type only.") - } -} - -func correctNsecForDS(nsec *dns.NSEC) bool { - var bitmask uint - /* Coherent TypeBitMap for NSEC of DS should contain at least: - * {TypeNS, TypeNSEC, TypeRRSIG} and no SOA. - * Any missing type will confuse resolver because - * it will prove that the dns query cannot be a delegation point, - * which will break trust resolution for unsigned delegated domain. - * No SOA is obvious for none apex query. - */ - for _, typeBitmask := range nsec.TypeBitMap { - switch typeBitmask { - case dns.TypeNS: - bitmask |= 1 - case dns.TypeNSEC: - bitmask |= 2 - case dns.TypeRRSIG: - bitmask |= 4 - case dns.TypeSOA: - return false - } - } - return bitmask == 7 -} - -func testNxdomainMsg() *dns.Msg { - return &dns.Msg{MsgHdr: dns.MsgHdr{Rcode: dns.RcodeNameError}, - Question: []dns.Question{{Name: "ww.miek.nl.", Qclass: dns.ClassINET, Qtype: dns.TypeTXT}}, - Ns: []dns.RR{test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1461471181 14400 3600 604800 14400")}, - } -} - -func testSuccessMsg() *dns.Msg { - return &dns.Msg{MsgHdr: dns.MsgHdr{Rcode: dns.RcodeSuccess}, - Question: []dns.Question{{Name: "www.miek.nl.", Qclass: dns.ClassINET, Qtype: dns.TypeTXT}}, - Answer: []dns.RR{test.TXT(`www.miek.nl. 1800 IN TXT "response"`)}, - } -} - -func testNsecMsg() *dns.Msg { - return &dns.Msg{MsgHdr: dns.MsgHdr{Rcode: dns.RcodeNameError}, - Question: []dns.Question{{Name: "www.miek.nl.", Qclass: dns.ClassINET, Qtype: dns.TypeNSEC}}, - Ns: []dns.RR{test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1461471181 14400 3600 604800 14400")}, - } -} - -func testApexDSMsg() *dns.Msg { - return &dns.Msg{MsgHdr: dns.MsgHdr{Rcode: dns.RcodeNameError}, - Question: []dns.Question{{Name: "miek.nl.", Qclass: dns.ClassINET, Qtype: dns.TypeDS}}, - Ns: []dns.RR{test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1461471181 14400 3600 604800 14400")}, - } -} diff --git a/plugin/dnssec/cache.go b/plugin/dnssec/cache.go deleted file mode 100644 index 9c94efd91b..0000000000 --- a/plugin/dnssec/cache.go +++ /dev/null @@ -1,48 +0,0 @@ -package dnssec - -import ( - "hash/fnv" - "io" - "time" - - "github.com/coredns/coredns/plugin/pkg/cache" - - "github.com/miekg/dns" -) - -// hash serializes the RRset and returns a signature cache key. -func hash(rrs []dns.RR) uint64 { - h := fnv.New64() - // we need to hash the entire RRset to pick the correct sig, if the rrset - // changes for whatever reason we should resign. - // We could use wirefmt, or the string format, both create garbage when creating - // the hash key. And of course is a uint64 big enough? - for _, rr := range rrs { - io.WriteString(h, rr.String()) - } - return h.Sum64() -} - -func periodicClean(c *cache.Cache, stop <-chan struct{}) { - tick := time.NewTicker(8 * time.Hour) - defer tick.Stop() - for { - select { - case <-tick.C: - // we sign for 8 days, check if a signature in the cache reached 75% of that (i.e. 6), if found delete - // the signature - is75 := time.Now().UTC().Add(twoDays) - c.Walk(func(items map[uint64]any, key uint64) bool { - for _, rr := range items[key].([]dns.RR) { - if !rr.(*dns.RRSIG).ValidityPeriod(is75) { - delete(items, key) - } - } - return true - }) - - case <-stop: - return - } - } -} diff --git a/plugin/dnssec/cache_test.go b/plugin/dnssec/cache_test.go deleted file mode 100644 index 8d5ea88766..0000000000 --- a/plugin/dnssec/cache_test.go +++ /dev/null @@ -1,82 +0,0 @@ -package dnssec - -import ( - "testing" - "time" - - "github.com/coredns/coredns/plugin/pkg/cache" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" -) - -func TestCacheSet(t *testing.T) { - fPriv, rmPriv, _ := test.TempFile(".", privKey) - fPub, rmPub, _ := test.TempFile(".", pubKey) - defer rmPriv() - defer rmPub() - - dnskey, err := ParseKeyFile(fPub, fPriv) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - - c := cache.New(defaultCap) - m := testMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - k := hash(m.Answer) // calculate *before* we add the sig - d := New([]string{"miek.nl."}, []*DNSKEY{dnskey}, false, nil, c) - d.Sign(state, time.Now().UTC(), server) - - _, ok := d.get(k, server) - if !ok { - t.Errorf("Signature was not added to the cache") - } -} - -func TestCacheNotValidExpired(t *testing.T) { - fPriv, rmPriv, _ := test.TempFile(".", privKey) - fPub, rmPub, _ := test.TempFile(".", pubKey) - defer rmPriv() - defer rmPub() - - dnskey, err := ParseKeyFile(fPub, fPriv) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - - c := cache.New(defaultCap) - m := testMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - k := hash(m.Answer) // calculate *before* we add the sig - d := New([]string{"miek.nl."}, []*DNSKEY{dnskey}, false, nil, c) - d.Sign(state, time.Now().UTC().AddDate(0, 0, -9), server) - - _, ok := d.get(k, server) - if ok { - t.Errorf("Signature was added to the cache even though not valid") - } -} - -func TestCacheNotValidYet(t *testing.T) { - fPriv, rmPriv, _ := test.TempFile(".", privKey) - fPub, rmPub, _ := test.TempFile(".", pubKey) - defer rmPriv() - defer rmPub() - - dnskey, err := ParseKeyFile(fPub, fPriv) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - - c := cache.New(defaultCap) - m := testMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - k := hash(m.Answer) // calculate *before* we add the sig - d := New([]string{"miek.nl."}, []*DNSKEY{dnskey}, false, nil, c) - d.Sign(state, time.Now().UTC().AddDate(0, 0, +9), server) - - _, ok := d.get(k, server) - if ok { - t.Errorf("Signature was added to the cache even though not valid yet") - } -} diff --git a/plugin/dnssec/dnskey.go b/plugin/dnssec/dnskey.go deleted file mode 100644 index cfe59845ae..0000000000 --- a/plugin/dnssec/dnskey.go +++ /dev/null @@ -1,169 +0,0 @@ -package dnssec - -import ( - "context" - "crypto" - "crypto/ecdsa" - "crypto/rsa" - "encoding/json" - "errors" - "os" - "path/filepath" - "strings" - "time" - - "github.com/coredns/coredns/request" - - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager" - "github.com/miekg/dns" - "golang.org/x/crypto/ed25519" -) - -// DNSKEY holds a DNSSEC public and private key used for on-the-fly signing. -type DNSKEY struct { - K *dns.DNSKEY - D *dns.DS - s crypto.Signer - tag uint16 -} - -// SecretKeyData represents the structure of the DNS keys stored in AWS Secrets Manager. -type SecretKeyData struct { - Key string `json:"key"` - Private string `json:"private"` -} - -// ParseKeyFile read a DNSSEC keyfile as generated by dnssec-keygen or other -// utilities. It adds ".key" for the public key and ".private" for the private key. -func ParseKeyFile(pubFile, privFile string) (*DNSKEY, error) { - f, e := os.Open(filepath.Clean(pubFile)) - if e != nil { - return nil, e - } - defer f.Close() - k, e := dns.ReadRR(f, pubFile) - if e != nil { - return nil, e - } - - f, e = os.Open(filepath.Clean(privFile)) - if e != nil { - return nil, e - } - defer f.Close() - - dk, ok := k.(*dns.DNSKEY) - if !ok { - return nil, errors.New("no public key found") - } - p, e := dk.ReadPrivateKey(f, privFile) - if e != nil { - return nil, e - } - - if s, ok := p.(*rsa.PrivateKey); ok { - return &DNSKEY{K: dk, D: dk.ToDS(dns.SHA256), s: s, tag: dk.KeyTag()}, nil - } - if s, ok := p.(*ecdsa.PrivateKey); ok { - return &DNSKEY{K: dk, D: dk.ToDS(dns.SHA256), s: s, tag: dk.KeyTag()}, nil - } - if s, ok := p.(ed25519.PrivateKey); ok { - return &DNSKEY{K: dk, D: dk.ToDS(dns.SHA256), s: s, tag: dk.KeyTag()}, nil - } - return &DNSKEY{K: dk, D: dk.ToDS(dns.SHA256), s: nil, tag: 0}, errors.New("no private key found") -} - -// ParseKeyFromAWSSecretsManager retrieves and parses a DNSSEC key pair from AWS Secrets Manager. -func ParseKeyFromAWSSecretsManager(secretID string) (*DNSKEY, error) { - // Load the AWS SDK configuration - cfg, err := config.LoadDefaultConfig(context.TODO()) - if err != nil { - return nil, err - } - - // Create a Secrets Manager client - client := secretsmanager.NewFromConfig(cfg) - - // Retrieve the secret value - input := &secretsmanager.GetSecretValueInput{ - SecretId: &secretID, - } - result, err := client.GetSecretValue(context.TODO(), input) - if err != nil { - return nil, err - } - - // Parse the secret string into SecretKeyData - var secretData SecretKeyData - err = json.Unmarshal([]byte(*result.SecretString), &secretData) - if err != nil { - return nil, err - } - - // Parse the public key - rr, err := dns.NewRR(secretData.Key) - if err != nil { - return nil, err - } - dk, ok := rr.(*dns.DNSKEY) - if !ok { - return nil, errors.New("invalid public key format") - } - - // Parse the private key - p, err := dk.ReadPrivateKey(strings.NewReader(secretData.Private), secretID) - if err != nil { - return nil, err - } - - // Create the DNSKEY structure - var s crypto.Signer - var tag uint16 - switch key := p.(type) { - case *rsa.PrivateKey: - s = key - tag = dk.KeyTag() - case *ecdsa.PrivateKey: - s = key - tag = dk.KeyTag() - case ed25519.PrivateKey: - s = key - tag = dk.KeyTag() - default: - return nil, errors.New("unsupported key type") - } - - return &DNSKEY{K: dk, D: dk.ToDS(dns.SHA256), s: s, tag: tag}, nil -} - -// getDNSKEY returns the correct DNSKEY to the client. Signatures are added when do is true. -func (d Dnssec) getDNSKEY(state request.Request, zone string, do bool, server string) *dns.Msg { - keys := make([]dns.RR, len(d.keys)) - for i, k := range d.keys { - keys[i] = dns.Copy(k.K) - keys[i].Header().Name = zone - } - m := new(dns.Msg) - m.SetReply(state.Req) - m.Answer = keys - if !do { - return m - } - - incep, expir := incepExpir(time.Now().UTC()) - if sigs, err := d.sign(keys, zone, 3600, incep, expir, server); err == nil { - m.Answer = append(m.Answer, sigs...) - } - return m -} - -// Return true if, and only if, this is a zone key with the SEP bit unset. This implies a ZSK (rfc4034 2.1.1). -func (k DNSKEY) isZSK() bool { - return k.K.Flags&(1<<8) == (1<<8) && k.K.Flags&1 == 0 -} - -// Return true if, and only if, this is a zone key with the SEP bit set. This implies a KSK (rfc4034 2.1.1). -func (k DNSKEY) isKSK() bool { - return k.K.Flags&(1<<8) == (1<<8) && k.K.Flags&1 == 1 -} diff --git a/plugin/dnssec/dnssec.go b/plugin/dnssec/dnssec.go deleted file mode 100644 index 2d52c84b93..0000000000 --- a/plugin/dnssec/dnssec.go +++ /dev/null @@ -1,179 +0,0 @@ -// Package dnssec implements a plugin that signs responses on-the-fly using -// NSEC black lies. -package dnssec - -import ( - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/cache" - "github.com/coredns/coredns/plugin/pkg/response" - "github.com/coredns/coredns/plugin/pkg/singleflight" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Dnssec signs the reply on-the-fly. -type Dnssec struct { - Next plugin.Handler - - zones []string - keys []*DNSKEY - splitkeys bool - inflight *singleflight.Group - cache *cache.Cache -} - -// New returns a new Dnssec. -func New(zones []string, keys []*DNSKEY, splitkeys bool, next plugin.Handler, c *cache.Cache) Dnssec { - return Dnssec{Next: next, - zones: zones, - keys: keys, - splitkeys: splitkeys, - cache: c, - inflight: new(singleflight.Group), - } -} - -// Sign signs the message in state. it takes care of negative or nodata responses. It -// uses NSEC black lies for authenticated denial of existence. For delegations it -// will insert DS records and sign those. -// Signatures will be cached for a short while. By default we sign for 8 days, -// starting 3 hours ago. -func (d Dnssec) Sign(state request.Request, now time.Time, server string) *dns.Msg { - req := state.Req - - incep, expir := incepExpir(now) - - mt, _ := response.Typify(req, time.Now().UTC()) // TODO(miek): need opt record here? - if mt == response.Delegation { - // We either sign DS or NSEC of DS. - ttl := req.Ns[0].Header().Ttl - - ds := []dns.RR{} - for i := range req.Ns { - if req.Ns[i].Header().Rrtype == dns.TypeDS { - ds = append(ds, req.Ns[i]) - } - } - if len(ds) == 0 { - if sigs, err := d.nsec(state, mt, ttl, incep, expir, server); err == nil { - req.Ns = append(req.Ns, sigs...) - } - } else if sigs, err := d.sign(ds, state.Zone, ttl, incep, expir, server); err == nil { - req.Ns = append(req.Ns, sigs...) - } - return req - } - - if mt == response.NameError || mt == response.NoData { - if req.Ns[0].Header().Rrtype != dns.TypeSOA || len(req.Ns) > 1 { - return req - } - - ttl := req.Ns[0].Header().Ttl - - if sigs, err := d.sign(req.Ns, state.Zone, ttl, incep, expir, server); err == nil { - req.Ns = append(req.Ns, sigs...) - } - if sigs, err := d.nsec(state, mt, ttl, incep, expir, server); err == nil { - req.Ns = append(req.Ns, sigs...) - } - if len(req.Ns) > 1 { // actually added nsec and sigs, reset the rcode - req.Rcode = dns.RcodeSuccess - if state.QType() == dns.TypeNSEC { // If original query was NSEC move Ns to Answer without SOA - req.Answer = req.Ns[len(req.Ns)-2 : len(req.Ns)] - req.Ns = nil - } - } - return req - } - - for _, r := range rrSets(req.Answer) { - ttl := r[0].Header().Ttl - if sigs, err := d.sign(r, state.Zone, ttl, incep, expir, server); err == nil { - req.Answer = append(req.Answer, sigs...) - } - } - for _, r := range rrSets(req.Ns) { - ttl := r[0].Header().Ttl - if sigs, err := d.sign(r, state.Zone, ttl, incep, expir, server); err == nil { - req.Ns = append(req.Ns, sigs...) - } - } - for _, r := range rrSets(req.Extra) { - ttl := r[0].Header().Ttl - if sigs, err := d.sign(r, state.Zone, ttl, incep, expir, server); err == nil { - req.Extra = append(req.Extra, sigs...) - } - } - return req -} - -func (d Dnssec) sign(rrs []dns.RR, signerName string, ttl, incep, expir uint32, server string) ([]dns.RR, error) { - k := hash(rrs) - sgs, ok := d.get(k, server) - if ok { - return sgs, nil - } - - sigs, err := d.inflight.Do(k, func() (any, error) { - var sigs []dns.RR - for _, k := range d.keys { - if d.splitkeys { - if len(rrs) > 0 && rrs[0].Header().Rrtype == dns.TypeDNSKEY { - // We are signing a DNSKEY RRSet. With split keys, we need to use a KSK here. - if !k.isKSK() { - continue - } - } else { - // For non-DNSKEY RRSets, we want to use a ZSK. - if !k.isZSK() { - continue - } - } - } - sig := k.newRRSIG(signerName, ttl, incep, expir) - if e := sig.Sign(k.s, rrs); e != nil { - return sigs, e - } - sigs = append(sigs, sig) - } - d.set(k, sigs) - return sigs, nil - }) - return sigs.([]dns.RR), err -} - -func (d Dnssec) set(key uint64, sigs []dns.RR) { d.cache.Add(key, sigs) } - -func (d Dnssec) get(key uint64, server string) ([]dns.RR, bool) { - if s, ok := d.cache.Get(key); ok { - // we sign for 8 days, check if a signature in the cache reached 3/4 of that - is75 := time.Now().UTC().Add(twoDays) - for _, rr := range s.([]dns.RR) { - if !rr.(*dns.RRSIG).ValidityPeriod(is75) { - cacheMisses.WithLabelValues(server).Inc() - return nil, false - } - } - - cacheHits.WithLabelValues(server).Inc() - return s.([]dns.RR), true - } - cacheMisses.WithLabelValues(server).Inc() - return nil, false -} - -func incepExpir(now time.Time) (uint32, uint32) { - incep := uint32(now.Add(-3 * time.Hour).Unix()) // -(2+1) hours, be sure to catch daylight saving time and such - expir := uint32(now.Add(eightDays).Unix()) // sign for 8 days - return incep, expir -} - -const ( - eightDays = 8 * 24 * time.Hour - twoDays = 2 * 24 * time.Hour - defaultCap = 10000 // default capacity of the cache. -) diff --git a/plugin/dnssec/dnssec_test.go b/plugin/dnssec/dnssec_test.go deleted file mode 100644 index f48d9a9ec5..0000000000 --- a/plugin/dnssec/dnssec_test.go +++ /dev/null @@ -1,288 +0,0 @@ -package dnssec - -import ( - "testing" - "time" - - "github.com/coredns/coredns/plugin/pkg/cache" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestZoneSigning(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Answer, 1) { - t.Errorf("Answer section should have 1 RRSIG") - } - if !section(m.Ns, 1) { - t.Errorf("Authority section should have 1 RRSIG") - } -} - -func TestZoneSigningDouble(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - fPriv1, rmPriv1, _ := test.TempFile(".", privKey1) - fPub1, rmPub1, _ := test.TempFile(".", pubKey1) - defer rmPriv1() - defer rmPub1() - - key1, err := ParseKeyFile(fPub1, fPriv1) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - d.keys = append(d.keys, key1) - - m := testMsg() - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Answer, 2) { - t.Errorf("Answer section should have 1 RRSIG") - } - if !section(m.Ns, 2) { - t.Errorf("Authority section should have 1 RRSIG") - } -} - -// TestSigningDifferentZone tests if a key for miek.nl and be used for example.org. -func TestSigningDifferentZone(t *testing.T) { - fPriv, rmPriv, _ := test.TempFile(".", privKey) - fPub, rmPub, _ := test.TempFile(".", pubKey) - defer rmPriv() - defer rmPub() - - key, err := ParseKeyFile(fPub, fPriv) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - - m := testMsgEx() - state := request.Request{Req: m, Zone: "example.org."} - c := cache.New(defaultCap) - d := New([]string{"example.org."}, []*DNSKEY{key}, false, nil, c) - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Answer, 1) { - t.Errorf("Answer section should have 1 RRSIG") - t.Logf("%+v\n", m) - } - if !section(m.Ns, 1) { - t.Errorf("Authority section should have 1 RRSIG") - t.Logf("%+v\n", m) - } -} - -func TestSigningCname(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testMsgCname() - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Answer, 1) { - t.Errorf("Answer section should have 1 RRSIG") - } -} - -func TestSigningDname(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testMsgDname() - state := request.Request{Req: m, Zone: "miek.nl."} - // We sign *everything* we see, also the synthesized CNAME. - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Answer, 3) { - t.Errorf("Answer section should have 3 RRSIGs") - } -} - -func TestSigningEmpty(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testEmptyMsg() - m.SetQuestion("a.miek.nl.", dns.TypeA) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 2) { - t.Errorf("Authority section should have 2 RRSIGs") - } -} - -func TestDelegationSigned(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testMsgDelegationSigned() - m.SetQuestion("sub.miek.nl.", dns.TypeNS) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 1) { - t.Errorf("Authority section should have 1 RRSIGs") - } - if !section(m.Extra, 0) { - t.Error("Extra section should not have RRSIGs") - } -} - -func TestDelegationUnSigned(t *testing.T) { - d, rm1, rm2 := newDnssec(t, []string{"miek.nl."}) - defer rm1() - defer rm2() - - m := testMsgDelegationUnSigned() - m.SetQuestion("sub.miek.nl.", dns.TypeNS) - state := request.Request{Req: m, Zone: "miek.nl."} - m = d.Sign(state, time.Now().UTC(), server) - if !section(m.Ns, 1) { - t.Errorf("Authority section should have 1 RRSIG") - } - if !section(m.Extra, 0) { - t.Error("Extra section should not have RRSIG") - } - var nsec *dns.NSEC - var rrsig *dns.RRSIG - for _, r := range m.Ns { - if r.Header().Rrtype == dns.TypeNSEC { - nsec = r.(*dns.NSEC) - } - if r.Header().Rrtype == dns.TypeRRSIG { - rrsig = r.(*dns.RRSIG) - } - } - if nsec == nil { - t.Error("Authority section should hold a NSEC record") - } - if rrsig.TypeCovered != dns.TypeNSEC { - t.Errorf("RRSIG should cover type %s, got %s", - dns.TypeToString[dns.TypeNSEC], dns.TypeToString[rrsig.TypeCovered]) - } - if !correctNsecForDS(nsec) { - t.Error("NSEC as invalid TypeBitMap for a DS") - } -} - -func section(rss []dns.RR, nrSigs int) bool { - i := 0 - for _, r := range rss { - if r.Header().Rrtype == dns.TypeRRSIG { - i++ - } - } - return nrSigs == i -} - -func testMsg() *dns.Msg { - // don't care about the message header - return &dns.Msg{ - Answer: []dns.RR{test.MX("miek.nl. 1703 IN MX 1 aspmx.l.google.com.")}, - Ns: []dns.RR{test.NS("miek.nl. 1703 IN NS omval.tednet.nl.")}, - } -} -func testMsgEx() *dns.Msg { - return &dns.Msg{ - Answer: []dns.RR{test.MX("example.org. 1703 IN MX 1 aspmx.l.google.com.")}, - Ns: []dns.RR{test.NS("example.org. 1703 IN NS omval.tednet.nl.")}, - } -} - -func testMsgCname() *dns.Msg { - return &dns.Msg{ - Answer: []dns.RR{test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl.")}, - } -} - -func testMsgDname() *dns.Msg { - return &dns.Msg{ - Answer: []dns.RR{ - test.CNAME("a.dname.miek.nl. 1800 IN CNAME a.test.miek.nl."), - test.A("a.test.miek.nl. 1800 IN A 139.162.196.78"), - test.DNAME("dname.miek.nl. 1800 IN DNAME test.miek.nl."), - }, - } -} - -func testMsgDelegationSigned() *dns.Msg { - return &dns.Msg{ - Ns: []dns.RR{ - test.NS("sub.miek.nl. 1800 IN NS ns1.sub.miek.nl."), - test.DS("sub." + dsKey), - }, - Extra: []dns.RR{ - test.A("ns1.sub.miek.nl. 1800 IN A 192.0.2.1"), - }, - } -} - -func testMsgDelegationUnSigned() *dns.Msg { - return &dns.Msg{ - Ns: []dns.RR{ - test.NS("sub.miek.nl. 1800 IN NS ns1.sub.miek.nl."), - }, - Extra: []dns.RR{ - test.A("ns1.sub.miek.nl. 1800 IN A 192.0.2.1"), - }, - } -} - -func testEmptyMsg() *dns.Msg { - // don't care about the message header - return &dns.Msg{ - Ns: []dns.RR{test.SOA("miek.nl. 1800 IN SOA ns.miek.nl. dnsmaster.miek.nl. 2017100301 200 100 604800 3600")}, - } -} - -func newDnssec(t *testing.T, zones []string) (Dnssec, func(), func()) { - t.Helper() - k, rm1, rm2 := newKey(t) - c := cache.New(defaultCap) - d := New(zones, []*DNSKEY{k}, false, nil, c) - return d, rm1, rm2 -} - -func newKey(t *testing.T) (*DNSKEY, func(), func()) { - t.Helper() - fPriv, rmPriv, _ := test.TempFile(".", privKey) - fPub, rmPub, _ := test.TempFile(".", pubKey) - - key, err := ParseKeyFile(fPub, fPriv) - if err != nil { - t.Fatalf("Failed to parse key: %v\n", err) - } - return key, rmPriv, rmPub -} - -const ( - pubKey = `miek.nl. IN DNSKEY 257 3 13 0J8u0XJ9GNGFEBXuAmLu04taHG4BXPP3gwhetiOUMnGA+x09nqzgF5IY OyjWB7N3rXqQbnOSILhH1hnuyh7mmA==` - privKey = `Private-key-format: v1.3 -Algorithm: 13 (ECDSAP256SHA256) -PrivateKey: /4BZk8AFvyW5hL3cOLSVxIp1RTqHSAEloWUxj86p3gs= -Created: 20160423195532 -Publish: 20160423195532 -Activate: 20160423195532 -` - dsKey = `miek.nl. IN DS 18512 13 2 D4E806322598BC97A003EF1ACDFF352EEFF7B42DBB0D41B8224714C36AEF08D9` - pubKey1 = `example.org. IN DNSKEY 257 3 13 tVRWNSGpHZbCi7Pr7OmbADVUO3MxJ0Lb8Lk3o/HBHqCxf5K/J50lFqRa 98lkdAIiFOVRy8LyMvjwmxZKwB5MNw==` - privKey1 = `Private-key-format: v1.3 -Algorithm: 13 (ECDSAP256SHA256) -PrivateKey: i8j4OfDGT8CQt24SDwLz2hg9yx4qKOEOh1LvbAuSp1c= -Created: 20160423211746 -Publish: 20160423211746 -Activate: 20160423211746 -` -) diff --git a/plugin/dnssec/handler.go b/plugin/dnssec/handler.go deleted file mode 100644 index 1ab70ab6d0..0000000000 --- a/plugin/dnssec/handler.go +++ /dev/null @@ -1,50 +0,0 @@ -package dnssec - -import ( - "context" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// ServeDNS implements the plugin.Handler interface. -func (d Dnssec) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - - do := state.Do() - qname := state.Name() - qtype := state.QType() - zone := plugin.Zones(d.zones).Matches(qname) - if zone == "" { - return plugin.NextOrFailure(d.Name(), d.Next, ctx, w, r) - } - - state.Zone = zone - server := metrics.WithServer(ctx) - - // Intercept queries for DNSKEY, but only if one of the zones matches the qname, otherwise we let - // the query through. - if qtype == dns.TypeDNSKEY { - for _, z := range d.zones { - if qname == z { - resp := d.getDNSKEY(state, z, do, server) - resp.Authoritative = true - w.WriteMsg(resp) - return dns.RcodeSuccess, nil - } - } - } - - if do { - drr := &ResponseWriter{w, d, server} - return plugin.NextOrFailure(d.Name(), d.Next, ctx, drr, r) - } - - return plugin.NextOrFailure(d.Name(), d.Next, ctx, w, r) -} - -// Name implements the Handler interface. -func (d Dnssec) Name() string { return "dnssec" } diff --git a/plugin/dnssec/handler_test.go b/plugin/dnssec/handler_test.go deleted file mode 100644 index e82e546d34..0000000000 --- a/plugin/dnssec/handler_test.go +++ /dev/null @@ -1,253 +0,0 @@ -package dnssec - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/cache" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var dnssecTestCases = []test.Case{ - { - Qname: "miek.nl.", Qtype: dns.TypeDNSKEY, - Answer: []dns.RR{ - test.DNSKEY("miek.nl. 3600 IN DNSKEY 257 3 13 0J8u0XJ9GNGFEBXuAmLu04taHG4"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeDNSKEY, Do: true, - Answer: []dns.RR{ - test.DNSKEY("miek.nl. 3600 IN DNSKEY 257 3 13 0J8u0XJ9GNGFEBXuAmLu04taHG4"), - test.RRSIG("miek.nl. 3600 IN RRSIG DNSKEY 13 2 3600 20160503150844 20160425120844 18512 miek.nl. Iw/kNOyM"), - }, - /* Extra: []dns.RR{test.OPT(4096, true)}, this has moved to the server and can't be test here */ - }, -} - -var dnsTestCases = []test.Case{ - { - Qname: "miek.nl.", Qtype: dns.TypeDNSKEY, - Answer: []dns.RR{ - test.DNSKEY("miek.nl. 3600 IN DNSKEY 257 3 13 0J8u0XJ9GNGFEBXuAmLu04taHG4"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeNS, Do: true, - Answer: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 13 2 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - }, - }, - { - Qname: "deleg.miek.nl.", Qtype: dns.TypeNS, Do: true, - Ns: []dns.RR{ - test.DS("deleg.miek.nl. 1800 IN DS 18512 13 2 D4E806322598BC97A003EF1ACDFF352EEFF7B42DBB0D41B8224714C36AEF08D9"), - test.NS("deleg.miek.nl. 1800 IN NS ns01.deleg.miek.nl."), - test.RRSIG("deleg.miek.nl. 1800 IN RRSIG DS 13 3 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - }, - }, - { - Qname: "unsigned.miek.nl.", Qtype: dns.TypeNS, Do: true, - Ns: []dns.RR{ - test.NS("unsigned.miek.nl. 1800 IN NS ns01.deleg.miek.nl."), - test.NSEC("unsigned.miek.nl. 1800 IN NSEC unsigned\\000.miek.nl. NS RRSIG NSEC"), - test.RRSIG("unsigned.miek.nl. 1800 IN RRSIG NSEC 13 3 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - }, - }, - { // DS should not come from dnssec plugin - Qname: "deleg.miek.nl.", Qtype: dns.TypeDS, - Answer: []dns.RR{ - test.DS("deleg.miek.nl. 1800 IN DS 18512 13 2 D4E806322598BC97A003EF1ACDFF352EEFF7B42DBB0D41B8224714C36AEF08D9"), - }, - Ns: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - }, - }, - { - Qname: "unsigned.miek.nl.", Qtype: dns.TypeDS, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeDS, Do: true, - Ns: []dns.RR{ - test.NSEC("miek.nl. 1800 IN NSEC \\000.miek.nl. A HINFO NS SOA MX TXT AAAA LOC SRV CERT SSHFP RRSIG NSEC DNSKEY TLSA HIP OPENPGPKEY SPF"), - test.RRSIG("miek.nl. 1800 IN RRSIG NSEC 13 2 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 13 2 3600 20171220141741 20171212111741 18512 miek.nl. 8bLTReqmuQtw=="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "deleg.miek.nl.", Qtype: dns.TypeDS, Do: true, - Answer: []dns.RR{ - test.DS("deleg.miek.nl. 1800 IN DS 18512 13 2 D4E806322598BC97A003EF1ACDFF352EEFF7B42DBB0D41B8224714C36AEF08D9"), - test.RRSIG("deleg.miek.nl. 1800 IN RRSIG DS 13 3 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - }, - Ns: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 13 2 3600 20161217114912 20161209084912 18512 miek.nl. ad9gA8VWgF1H8ze9/0Rk2Q=="), - }, - }, - { - Qname: "unsigned.miek.nl.", Qtype: dns.TypeDS, Do: true, - Ns: []dns.RR{ - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 13 2 3600 20171220141741 20171212111741 18512 miek.nl. 8bLTReqmuQtw=="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - test.NSEC("unsigned.miek.nl. 1800 IN NSEC \\000.unsigned.miek.nl. NS RRSIG NSEC"), - test.RRSIG("unsigned.miek.nl. 1800 IN RRSIG NSEC 13 3 1800 20220101121212 20220201121212 18512 miek.nl. RandomNotChecked"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeMX, - Answer: []dns.RR{ - test.MX("miek.nl. 1800 IN MX 1 aspmx.l.google.com."), - }, - Ns: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeMX, Do: true, - Answer: []dns.RR{ - test.MX("miek.nl. 1800 IN MX 1 aspmx.l.google.com."), - test.RRSIG("miek.nl. 1800 IN RRSIG MX 13 2 3600 20160503192428 20160425162428 18512 miek.nl. 4nxuGKitXjPVA9zP1JIUvA09"), - }, - Ns: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 13 2 3600 20161217114912 20161209084912 18512 miek.nl. ad9gA8VWgF1H8ze9/0Rk2Q=="), - }, - }, - { - Qname: "www.miek.nl.", Qtype: dns.TypeAAAA, Do: true, - Answer: []dns.RR{ - test.AAAA("a.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - test.RRSIG("a.miek.nl. 1800 IN RRSIG AAAA 13 3 3600 20160503193047 20160425163047 18512 miek.nl. UAyMG+gcnoXW3"), - test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), - test.RRSIG("www.miek.nl. 1800 IN RRSIG CNAME 13 3 3600 20160503193047 20160425163047 18512 miek.nl. E3qGZn"), - }, - Ns: []dns.RR{ - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 13 2 3600 20161217114912 20161209084912 18512 miek.nl. ad9gA8VWgF1H8ze9/0Rk2Q=="), - }, - }, - { - Qname: "wwwww.miek.nl.", Qtype: dns.TypeAAAA, Do: true, - Ns: []dns.RR{ - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 13 2 3600 20171220135446 20171212105446 18512 miek.nl. hCRzzjYz6w=="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - test.NSEC("wwwww.miek.nl. 1800 IN NSEC \\000.wwwww.miek.nl. A HINFO TXT LOC SRV CERT SSHFP RRSIG NSEC TLSA HIP OPENPGPKEY SPF"), - test.RRSIG("wwwww.miek.nl. 1800 IN RRSIG NSEC 13 3 3600 20171220135446 20171212105446 18512 miek.nl. cVUQWs8xw=="), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeHINFO, Do: true, - Ns: []dns.RR{ - test.NSEC("miek.nl. 1800 IN NSEC \\000.miek.nl. A NS SOA MX TXT AAAA LOC SRV CERT SSHFP RRSIG NSEC DNSKEY TLSA HIP OPENPGPKEY SPF"), - test.RRSIG("miek.nl. 1800 IN RRSIG NSEC 13 2 3600 20171220141741 20171212111741 18512 miek.nl. GuXROL7Uu+UiPcg=="), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 13 2 3600 20171220141741 20171212111741 18512 miek.nl. 8bLTReqmuQtw=="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "www.example.org.", Qtype: dns.TypeAAAA, Do: true, - Rcode: dns.RcodeServerFailure, - }, -} - -func TestLookupZone(t *testing.T) { - zone, err := file.Parse(strings.NewReader(dbMiekNL), "miek.nl.", "stdin", 0) - if err != nil { - return - } - fm := file.File{Next: test.ErrorHandler(), Zones: file.Zones{Z: map[string]*file.Zone{"miek.nl.": zone}, Names: []string{"miek.nl."}}} - dnskey, rm1, rm2 := newKey(t) - defer rm1() - defer rm2() - c := cache.New(defaultCap) - dh := New([]string{"miek.nl."}, []*DNSKEY{dnskey}, false, fm, c) - - for _, tc := range dnsTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := dh.ServeDNS(context.TODO(), rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - if err := test.SortAndCheck(rec.Msg, tc); err != nil { - t.Error(err) - } - } -} - -func TestLookupDNSKEY(t *testing.T) { - dnskey, rm1, rm2 := newKey(t) - defer rm1() - defer rm2() - c := cache.New(defaultCap) - dh := New([]string{"miek.nl."}, []*DNSKEY{dnskey}, false, test.ErrorHandler(), c) - - for _, tc := range dnssecTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := dh.ServeDNS(context.TODO(), rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if !resp.Authoritative { - t.Errorf("Authoritative Answer should be true, got false") - } - - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - - // If there is an NSEC present in authority section check if the bitmap does not have the qtype set. - for _, rr := range resp.Ns { - if n, ok := rr.(*dns.NSEC); ok { - for i := range n.TypeBitMap { - if n.TypeBitMap[i] == tc.Qtype { - t.Errorf("Bitmap contains qtype: %d", tc.Qtype) - } - } - } - } - } -} - -const dbMiekNL = ` -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; Serial - 4H ; Refresh - 1H ; Retry - 7D ; Expire - 4H ) ; Negative Cache TTL - IN NS linode.atoom.net. - - IN MX 1 aspmx.l.google.com. - - IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 - -a IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -www IN CNAME a -deleg IN NS ns01.deleg - IN DS 18512 13 2 D4E806322598BC97A003EF1ACDFF352EEFF7B42DBB0D41B8224714C36AEF08D9 -unsigned IN NS ns01.deleg -` diff --git a/plugin/dnssec/log_test.go b/plugin/dnssec/log_test.go deleted file mode 100644 index e8f3a1ddc2..0000000000 --- a/plugin/dnssec/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package dnssec - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/dnssec/metrics.go b/plugin/dnssec/metrics.go deleted file mode 100644 index e69dbf5c3d..0000000000 --- a/plugin/dnssec/metrics.go +++ /dev/null @@ -1,32 +0,0 @@ -package dnssec - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // cacheSize is the number of elements in the dnssec cache. - cacheSize = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: plugin.Namespace, - Subsystem: "dnssec", - Name: "cache_entries", - Help: "The number of elements in the dnssec cache.", - }, []string{"server", "type"}) - // cacheHits is the count of cache hits. - cacheHits = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "dnssec", - Name: "cache_hits_total", - Help: "The count of cache hits.", - }, []string{"server"}) - // cacheMisses is the count of cache misses. - cacheMisses = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "dnssec", - Name: "cache_misses_total", - Help: "The count of cache misses.", - }, []string{"server"}) -) diff --git a/plugin/dnssec/responsewriter.go b/plugin/dnssec/responsewriter.go deleted file mode 100644 index 355b3177bf..0000000000 --- a/plugin/dnssec/responsewriter.go +++ /dev/null @@ -1,43 +0,0 @@ -package dnssec - -import ( - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// ResponseWriter signs the response on the fly. -type ResponseWriter struct { - dns.ResponseWriter - d Dnssec - server string // server label for metrics. -} - -// WriteMsg implements the dns.ResponseWriter interface. -func (d *ResponseWriter) WriteMsg(res *dns.Msg) error { - // By definition we should sign anything that comes back, we should still figure out for - // which zone it should be. - state := request.Request{W: d.ResponseWriter, Req: res} - - zone := plugin.Zones(d.d.zones).Matches(state.Name()) - if zone == "" { - return d.ResponseWriter.WriteMsg(res) - } - state.Zone = zone - - res = d.d.Sign(state, time.Now().UTC(), d.server) - cacheSize.WithLabelValues(d.server, "signature").Set(float64(d.d.cache.Len())) - // No need for EDNS0 trickery, as that is handled by the server. - - return d.ResponseWriter.WriteMsg(res) -} - -// Write implements the dns.ResponseWriter interface. -func (d *ResponseWriter) Write(buf []byte) (int, error) { - log.Warning("Dnssec called with Write: not signing reply") - n, err := d.ResponseWriter.Write(buf) - return n, err -} diff --git a/plugin/dnssec/rrsig.go b/plugin/dnssec/rrsig.go deleted file mode 100644 index 250a6035b4..0000000000 --- a/plugin/dnssec/rrsig.go +++ /dev/null @@ -1,53 +0,0 @@ -package dnssec - -import "github.com/miekg/dns" - -// newRRSIG returns a new RRSIG, with all fields filled out, except the signed data. -func (k *DNSKEY) newRRSIG(signerName string, ttl, incep, expir uint32) *dns.RRSIG { - sig := new(dns.RRSIG) - - sig.Hdr.Rrtype = dns.TypeRRSIG - sig.Algorithm = k.K.Algorithm - sig.KeyTag = k.tag - sig.SignerName = signerName - sig.Hdr.Ttl = ttl - sig.OrigTtl = origTTL - - sig.Inception = incep - sig.Expiration = expir - - return sig -} - -type rrset struct { - qname string - qtype uint16 -} - -// rrSets returns rrs as a map of RRsets. It skips RRSIG and OPT records as those don't need to be signed. -func rrSets(rrs []dns.RR) map[rrset][]dns.RR { - m := make(map[rrset][]dns.RR) - - for _, r := range rrs { - if r.Header().Rrtype == dns.TypeRRSIG || r.Header().Rrtype == dns.TypeOPT { - continue - } - - if s, ok := m[rrset{r.Header().Name, r.Header().Rrtype}]; ok { - s = append(s, r) - m[rrset{r.Header().Name, r.Header().Rrtype}] = s - continue - } - - s := make([]dns.RR, 1, 3) - s[0] = r - m[rrset{r.Header().Name, r.Header().Rrtype}] = s - } - - if len(m) > 0 { - return m - } - return nil -} - -const origTTL = 3600 diff --git a/plugin/dnssec/setup.go b/plugin/dnssec/setup.go deleted file mode 100644 index e3feae05b3..0000000000 --- a/plugin/dnssec/setup.go +++ /dev/null @@ -1,155 +0,0 @@ -package dnssec - -import ( - "fmt" - "path/filepath" - "slices" - "strconv" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/cache" - clog "github.com/coredns/coredns/plugin/pkg/log" -) - -var log = clog.NewWithPlugin("dnssec") - -func init() { plugin.Register("dnssec", setup) } - -func setup(c *caddy.Controller) error { - zones, keys, capacity, splitkeys, err := dnssecParse(c) - if err != nil { - return plugin.Error("dnssec", err) - } - - ca := cache.New(capacity) - stop := make(chan struct{}) - - c.OnShutdown(func() error { - close(stop) - return nil - }) - c.OnStartup(func() error { - go periodicClean(ca, stop) - return nil - }) - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return New(zones, keys, splitkeys, next, ca) - }) - - return nil -} - -func dnssecParse(c *caddy.Controller) ([]string, []*DNSKEY, int, bool, error) { - zones := []string{} - keys := []*DNSKEY{} - capacity := defaultCap - - i := 0 - for c.Next() { - if i > 0 { - return nil, nil, 0, false, plugin.ErrOnce - } - i++ - - // dnssec [zones...] - zones = plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - - for c.NextBlock() { - switch x := c.Val(); x { - case "key": - k, e := keyParse(c) - if e != nil { - return nil, nil, 0, false, e - } - keys = append(keys, k...) - case "cache_capacity": - if !c.NextArg() { - return nil, nil, 0, false, c.ArgErr() - } - value := c.Val() - cacheCap, err := strconv.Atoi(value) - if err != nil { - return nil, nil, 0, false, err - } - capacity = cacheCap - default: - return nil, nil, 0, false, c.Errf("unknown property '%s'", x) - } - } - } - // Check if we have both KSKs and ZSKs. - zsk, ksk := 0, 0 - for _, k := range keys { - if k.isKSK() { - ksk++ - } else if k.isZSK() { - zsk++ - } - } - splitkeys := zsk > 0 && ksk > 0 - - // Check if each keys owner name can actually sign the zones we want them to sign. - for _, k := range keys { - kname := plugin.Name(k.K.Header().Name) - ok := slices.ContainsFunc(zones, kname.Matches) - if !ok { - return zones, keys, capacity, splitkeys, fmt.Errorf("key %s (keyid: %d) can not sign any of the zones", string(kname), k.tag) - } - } - - return zones, keys, capacity, splitkeys, nil -} - -func keyParse(c *caddy.Controller) ([]*DNSKEY, error) { - keys := []*DNSKEY{} - config := dnsserver.GetConfig(c) - - if !c.NextArg() { - return nil, c.ArgErr() - } - value := c.Val() - switch value { - case "file": - ks := c.RemainingArgs() - if len(ks) == 0 { - return nil, c.ArgErr() - } - - for _, k := range ks { - base := k - // Kmiek.nl.+013+26205.key, handle .private or without extension: Kmiek.nl.+013+26205 - if strings.HasSuffix(k, ".key") { - base = k[:len(k)-4] - } - if strings.HasSuffix(k, ".private") { - base = k[:len(k)-8] - } - if !filepath.IsAbs(base) && config.Root != "" { - base = filepath.Join(config.Root, base) - } - k, err := ParseKeyFile(base+".key", base+".private") - if err != nil { - return nil, err - } - keys = append(keys, k) - } - case "aws_secretsmanager": - ks := c.RemainingArgs() - if len(ks) == 0 { - return nil, c.ArgErr() - } - - for _, k := range ks { - k, err := ParseKeyFromAWSSecretsManager(k) - if err != nil { - return nil, err - } - keys = append(keys, k) - } - } - return keys, nil -} diff --git a/plugin/dnssec/setup_test.go b/plugin/dnssec/setup_test.go deleted file mode 100644 index 66ff45f1f6..0000000000 --- a/plugin/dnssec/setup_test.go +++ /dev/null @@ -1,160 +0,0 @@ -package dnssec - -import ( - "os" - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestSetupDnssec(t *testing.T) { - if err := os.WriteFile("Kcluster.local.key", []byte(keypub), 0644); err != nil { - t.Fatalf("Failed to write pub key file: %s", err) - } - defer func() { os.Remove("Kcluster.local.key") }() - if err := os.WriteFile("Kcluster.local.private", []byte(keypriv), 0644); err != nil { - t.Fatalf("Failed to write private key file: %s", err) - } - defer func() { os.Remove("Kcluster.local.private") }() - if err := os.WriteFile("ksk_Kcluster.local.key", []byte(kskpub), 0644); err != nil { - t.Fatalf("Failed to write pub key file: %s", err) - } - defer func() { os.Remove("ksk_Kcluster.local.key") }() - if err := os.WriteFile("ksk_Kcluster.local.private", []byte(kskpriv), 0644); err != nil { - t.Fatalf("Failed to write private key file: %s", err) - } - defer func() { os.Remove("ksk_Kcluster.local.private") }() - - tests := []struct { - input string - shouldErr bool - expectedZones []string - expectedKeys []string - expectedSplitkeys bool - expectedCapacity int - expectedErrContent string - }{ - {`dnssec`, false, nil, nil, false, defaultCap, ""}, - {`dnssec example.org`, false, []string{"example.org."}, nil, false, defaultCap, ""}, - {`dnssec 10.0.0.0/8`, false, []string{"10.in-addr.arpa."}, nil, false, defaultCap, ""}, - { - `dnssec example.org { - cache_capacity 100 - }`, false, []string{"example.org."}, nil, false, 100, "", - }, - { - `dnssec cluster.local { - key file Kcluster.local - }`, false, []string{"cluster.local."}, nil, false, defaultCap, "", - }, - { - `dnssec example.org cluster.local { - key file Kcluster.local - }`, false, []string{"example.org.", "cluster.local."}, nil, false, defaultCap, "", - }, - // fails - { - `dnssec example.org { - key file Kcluster.local - }`, true, []string{"example.org."}, nil, false, defaultCap, "can not sign any", - }, - { - `dnssec example.org { - key - }`, true, []string{"example.org."}, nil, false, defaultCap, "argument count", - }, - { - `dnssec example.org { - key file - }`, true, []string{"example.org."}, nil, false, defaultCap, "argument count", - }, - {`dnssec - dnssec`, true, nil, nil, false, defaultCap, ""}, - { - `dnssec cluster.local { - key file Kcluster.local - key file ksk_Kcluster.local - }`, false, []string{"cluster.local."}, nil, true, defaultCap, "", - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - zones, keys, capacity, splitkeys, err := dnssecParse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - if !test.shouldErr { - for i, z := range test.expectedZones { - if zones[i] != z { - t.Errorf("Dnssec not correctly set for input %s. Expected: %s, actual: %s", test.input, z, zones[i]) - } - } - for i, k := range test.expectedKeys { - if k != keys[i].K.Header().Name { - t.Errorf("Dnssec not correctly set for input %s. Expected: '%s', actual: '%s'", test.input, k, keys[i].K.Header().Name) - } - } - if splitkeys != test.expectedSplitkeys { - t.Errorf("Detected split keys does not match. Expected: %t, actual %t", test.expectedSplitkeys, splitkeys) - } - if capacity != test.expectedCapacity { - t.Errorf("Dnssec not correctly set capacity for input '%s' Expected: '%d', actual: '%d'", test.input, capacity, test.expectedCapacity) - } - } - } -} - -const keypub = `; This is a zone-signing key, keyid 45330, for cluster.local. -; Created: 20170901060531 (Fri Sep 1 08:05:31 2017) -; Publish: 20170901060531 (Fri Sep 1 08:05:31 2017) -; Activate: 20170901060531 (Fri Sep 1 08:05:31 2017) -cluster.local. IN DNSKEY 256 3 5 AwEAAcFpDv+Cb23kFJowu+VU++b2N1uEHi6Ll9H0BzLasFOdJjEEclCO q/KlD4682vOMXxJNN8ZwOyiCa7Y0TEYqSwWvhHyn3bHCwuy4I6fss4Wd 7Y9dU+6QTgJ8LimGG40Iizjc9zqoU8Q+q81vIukpYWOHioHoY7hsWBvS RSlzDJk3` - -const keypriv = `Private-key-format: v1.3 -Algorithm: 5 (RSASHA1) -Modulus: wWkO/4JvbeQUmjC75VT75vY3W4QeLouX0fQHMtqwU50mMQRyUI6r8qUPjrza84xfEk03xnA7KIJrtjRMRipLBa+EfKfdscLC7Lgjp+yzhZ3tj11T7pBOAnwuKYYbjQiLONz3OqhTxD6rzW8i6SlhY4eKgehjuGxYG9JFKXMMmTc= -PublicExponent: AQAB -PrivateExponent: K5XyZFBPrjMVFX5gCZlyPyVDamNGrfSVXSIiMSqpS96BSdCXtmHAjCj4bZFPwkzi6+vs4tJN8p4ZifEVM0a6qwPZyENBrc2qbsweOXE6l8BaPVWFX30xvVRzGXuNtXxlBXE17zoHty5r5mRyRou1bc2HUS5otdkEjE30RiocQVk= -Prime1: 7RRFUxaZkVNVH1DaT/SV5Sb8kABB389qLwU++argeDCVf+Wm9BBlTrsz2U6bKlfpaUmYZKtCCd+CVxqzMyuu0w== -Prime2: 0NiY3d7Fa08IGY9L4TaFc02A721YcDNBBf95BP31qGvwnYsLFM/1xZwaEsIjohg8g+m/GpyIlvNMbK6pywIVjQ== -Exponent1: XjXO8pype9mMmvwrNNix9DTQ6nxfsQugW30PMHGZ78kGr6NX++bEC0xS50jYWjRDGcbYGzD+9iNujSScD3qNZw== -Exponent2: wkoOhLIfhUIj7etikyUup2Ld5WAbW15DSrotstg0NrgcQ+Q7reP96BXeJ79WeREFE09cyvv/EjdLzPv81/CbbQ== -Coefficient: ah4LL0KLTO8kSKHK+X9Ud8grYi94QSNdbX11ge/eFcS/41QhDuZRTAFv4y0+IG+VWd+XzojLsQs+jzLe5GzINg== -Created: 20170901060531 -Publish: 20170901060531 -Activate: 20170901060531 -` - -const kskpub = `; This is a zone-signing key, keyid 45330, for cluster.local. -; Created: 20170901060531 (Fri Sep 1 08:05:31 2017) -; Publish: 20170901060531 (Fri Sep 1 08:05:31 2017) -; Activate: 20170901060531 (Fri Sep 1 08:05:31 2017) -cluster.local. IN DNSKEY 257 3 5 AwEAAcFpDv+Cb23kFJowu+VU++b2N1uEHi6Ll9H0BzLasFOdJjEEclCO q/KlD4682vOMXxJNN8ZwOyiCa7Y0TEYqSwWvhHyn3bHCwuy4I6fss4Wd 7Y9dU+6QTgJ8LimGG40Iizjc9zqoU8Q+q81vIukpYWOHioHoY7hsWBvS RSlzDJk3` - -const kskpriv = `Private-key-format: v1.3 -Algorithm: 5 (RSASHA1) -Modulus: wWkO/4JvbeQUmjC75VT75vY3W4QeLouX0fQHMtqwU50mMQRyUI6r8qUPjrza84xfEk03xnA7KIJrtjRMRipLBa+EfKfdscLC7Lgjp+yzhZ3tj11T7pBOAnwuKYYbjQiLONz3OqhTxD6rzW8i6SlhY4eKgehjuGxYG9JFKXMMmTc= -PublicExponent: AQAB -PrivateExponent: K5XyZFBPrjMVFX5gCZlyPyVDamNGrfSVXSIiMSqpS96BSdCXtmHAjCj4bZFPwkzi6+vs4tJN8p4ZifEVM0a6qwPZyENBrc2qbsweOXE6l8BaPVWFX30xvVRzGXuNtXxlBXE17zoHty5r5mRyRou1bc2HUS5otdkEjE30RiocQVk= -Prime1: 7RRFUxaZkVNVH1DaT/SV5Sb8kABB389qLwU++argeDCVf+Wm9BBlTrsz2U6bKlfpaUmYZKtCCd+CVxqzMyuu0w== -Prime2: 0NiY3d7Fa08IGY9L4TaFc02A721YcDNBBf95BP31qGvwnYsLFM/1xZwaEsIjohg8g+m/GpyIlvNMbK6pywIVjQ== -Exponent1: XjXO8pype9mMmvwrNNix9DTQ6nxfsQugW30PMHGZ78kGr6NX++bEC0xS50jYWjRDGcbYGzD+9iNujSScD3qNZw== -Exponent2: wkoOhLIfhUIj7etikyUup2Ld5WAbW15DSrotstg0NrgcQ+Q7reP96BXeJ79WeREFE09cyvv/EjdLzPv81/CbbQ== -Coefficient: ah4LL0KLTO8kSKHK+X9Ud8grYi94QSNdbX11ge/eFcS/41QhDuZRTAFv4y0+IG+VWd+XzojLsQs+jzLe5GzINg== -Created: 20170901060531 -Publish: 20170901060531 -Activate: 20170901060531 -` diff --git a/plugin/file/README.md b/plugin/file/README.md deleted file mode 100644 index ce49827d27..0000000000 --- a/plugin/file/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# file - -## Name - -*file* - enables serving zone data from an RFC 1035-style master file. - -## Description - -The *file* plugin is used for an "old-style" DNS server. It serves from a preloaded file that exists -on disk contained RFC 1035 styled data. If the zone file contains signatures (i.e., is signed using -DNSSEC), correct DNSSEC answers are returned. Only NSEC is supported! If you use this setup *you* -are responsible for re-signing the zonefile. - -## Syntax - -~~~ -file DBFILE [ZONES...] -~~~ - -* **DBFILE** the database file to read and parse. If the path is relative, the path from the *root* - plugin will be prepended to it. -* **ZONES** zones it should be authoritative for. If empty, the zones from the configuration block - are used. - -If you want to round-robin A and AAAA responses look at the *loadbalance* plugin. - -~~~ -file DBFILE [ZONES... ] { - reload DURATION - fallthrough [ZONES...] -} -~~~ - -* `reload` interval to perform a reload of the zone if the SOA version changes. Default is one minute. - Value of `0` means to not scan for changes and reload. For example, `30s` checks the zonefile every 30 seconds - and reloads the zone when serial changes. -* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin. - If **[ZONES...]** is omitted, then fallthrough happens for all zones for which the plugin - is authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then only - queries for those zones will be subject to fallthrough. - -If you need outgoing zone transfers, take a look at the *transfer* plugin. - -## Examples - -Load the `example.org` zone from `db.example.org` and allow transfers to the internet, but send -notifies to 10.240.1.1 - -~~~ corefile -example.org { - file db.example.org - transfer { - to * 10.240.1.1 - } -} -~~~ - -Where `db.example.org` would contain RRSets () in the -(text) presentation format from RFC 1035: - -~~~ -$ORIGIN example.org. -@ 3600 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2017042745 7200 3600 1209600 3600 - 3600 IN NS a.iana-servers.net. - 3600 IN NS b.iana-servers.net. - -www IN A 127.0.0.1 - IN AAAA ::1 -~~~ - - -Or use a single zone file for multiple zones: - -~~~ corefile -. { - file example.org.signed example.org example.net - transfer example.org example.net { - to * 10.240.1.1 - } -} -~~~ - -Note that if you have a configuration like the following you may run into a problem of the origin -not being correctly recognized: - -~~~ corefile -. { - file db.example.org -} -~~~ - -We omit the origin for the file `db.example.org`, so this references the zone in the server block, -which, in this case, is the root zone. Any contents of `db.example.org` will then read with that -origin set; this may or may not do what you want. -It's better to be explicit here and specify the correct origin. This can be done in two ways: - -~~~ corefile -. { - file db.example.org example.org -} -~~~ - -Or - -~~~ corefile -example.org { - file db.example.org -} -~~~ - -## See Also - -See the *loadbalance* plugin if you need simple record shuffling. And the *transfer* plugin for zone -transfers. Lastly the *root* plugin can help you specify the location of the zone files. - -See [RFC 1035](https://www.rfc-editor.org/rfc/rfc1035.txt) for more info on how to structure zone -files. diff --git a/plugin/file/apex_test.go b/plugin/file/apex_test.go deleted file mode 100644 index 2108543c3b..0000000000 --- a/plugin/file/apex_test.go +++ /dev/null @@ -1,45 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -const exampleApexOnly = `$ORIGIN example.com. -@ IN SOA ns1.example.com. admin.example.com. ( - 2005011437 ; Serial - 1200 ; Refresh - 144 ; Retry - 1814400 ; Expire - 2h ) ; Minimum -@ IN NS ns1.example.com. -` - -func TestLookupApex(t *testing.T) { - // this tests a zone with *only* an apex. The behavior here is wrong, we should return NODATA, but we do a NXDOMAIN. - // Adding this test to document this. Note a zone that doesn't have any data is pretty useless anyway, so rather than - // fix this with an entirely new branch in lookup.go, just live with it. - zone, err := Parse(strings.NewReader(exampleApexOnly), "example.com.", "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{"example.com.": zone}, Names: []string{"example.com."}}} - ctx := context.TODO() - - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - if _, err := fm.ServeDNS(ctx, rec, m); err != nil { - t.Errorf("Expected no error, got %v", err) - } - if rec.Msg.Rcode != dns.RcodeNameError { // Should be RcodeSuccess in a perfect world. - t.Errorf("Expected rcode %d, got %d", dns.RcodeNameError, rec.Msg.Rcode) - } -} diff --git a/plugin/file/closest.go b/plugin/file/closest.go deleted file mode 100644 index 7a8efd5d91..0000000000 --- a/plugin/file/closest.go +++ /dev/null @@ -1,23 +0,0 @@ -package file - -import ( - "github.com/coredns/coredns/plugin/file/tree" - - "github.com/miekg/dns" -) - -// ClosestEncloser returns the closest encloser for qname. -func (z *Zone) ClosestEncloser(qname string) (*tree.Elem, bool) { - offset, end := dns.NextLabel(qname, 0) - for !end { - elem, _ := z.Search(qname) - if elem != nil { - return elem, true - } - qname = qname[offset:] - - offset, end = dns.NextLabel(qname, 0) - } - - return z.Search(z.origin) -} diff --git a/plugin/file/closest_test.go b/plugin/file/closest_test.go deleted file mode 100644 index 282823fcc7..0000000000 --- a/plugin/file/closest_test.go +++ /dev/null @@ -1,39 +0,0 @@ -package file - -import ( - "strings" - "testing" -) - -func TestClosestEncloser(t *testing.T) { - z, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - tests := []struct { - in, out string - }{ - {"miek.nl.", "miek.nl."}, - {"www.miek.nl.", "www.miek.nl."}, - - {"blaat.miek.nl.", "miek.nl."}, - {"blaat.www.miek.nl.", "www.miek.nl."}, - {"www.blaat.miek.nl.", "miek.nl."}, - {"blaat.a.miek.nl.", "a.miek.nl."}, - {"blaat.z.a.miek.nl.", "a.miek.nl."}, - } - - for _, tc := range tests { - ce, _ := z.ClosestEncloser(tc.in) - if ce == nil { - if z.origin != tc.out { - t.Errorf("Expected ce to be %s for %s, got %s", tc.out, tc.in, ce.Name()) - } - continue - } - if ce.Name() != tc.out { - t.Errorf("Expected ce to be %s for %s, got %s", tc.out, tc.in, ce.Name()) - } - } -} diff --git a/plugin/file/delegation_test.go b/plugin/file/delegation_test.go deleted file mode 100644 index 2372f8d73a..0000000000 --- a/plugin/file/delegation_test.go +++ /dev/null @@ -1,229 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var delegationTestCases = []test.Case{ - { - Qname: "a.delegated.miek.nl.", Qtype: dns.TypeTXT, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "delegated.miek.nl.", Qtype: dns.TypeNS, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "foo.delegated.miek.nl.", Qtype: dns.TypeA, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "foo.delegated.miek.nl.", Qtype: dns.TypeTXT, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "foo.delegated.miek.nl.", Qtype: dns.TypeSOA, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeSOA, - Answer: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - Ns: miekAuth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeAAAA, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, -} - -var secureDelegationTestCases = []test.Case{ - { - Qname: "a.delegated.example.org.", Qtype: dns.TypeTXT, Do: true, - Ns: []dns.RR{ - test.DS("delegated.example.org. 1800 IN DS 10056 5 1 EE72CABD1927759CDDA92A10DBF431504B9E1F13"), - test.DS("delegated.example.org. 1800 IN DS 10056 5 2 E4B05F87725FA86D9A64F1E53C3D0E6250946599DFE639C45955B0ED416CDDFA"), - test.NS("delegated.example.org. 1800 IN NS a.delegated.example.org."), - test.NS("delegated.example.org. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.RRSIG("delegated.example.org. 1800 IN RRSIG DS 13 3 1800 20161129153240 20161030153240 49035 example.org. rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1jHtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4jbznKKqk+DGKog=="), - }, - Extra: []dns.RR{ - test.A("a.delegated.example.org. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.example.org. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "delegated.example.org.", Qtype: dns.TypeNS, Do: true, - Ns: []dns.RR{ - test.DS("delegated.example.org. 1800 IN DS 10056 5 1 EE72CABD1927759CDDA92A10DBF431504B9E1F13"), - test.DS("delegated.example.org. 1800 IN DS 10056 5 2 E4B05F87725FA86D9A64F1E53C3D0E6250946599DFE639C45955B0ED416CDDFA"), - test.NS("delegated.example.org. 1800 IN NS a.delegated.example.org."), - test.NS("delegated.example.org. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.RRSIG("delegated.example.org. 1800 IN RRSIG DS 13 3 1800 20161129153240 20161030153240 49035 example.org. rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1jHtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4jbznKKqk+DGKog=="), - }, - Extra: []dns.RR{ - test.A("a.delegated.example.org. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.example.org. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "foo.delegated.example.org.", Qtype: dns.TypeA, Do: true, - Ns: []dns.RR{ - test.DS("delegated.example.org. 1800 IN DS 10056 5 1 EE72CABD1927759CDDA92A10DBF431504B9E1F13"), - test.DS("delegated.example.org. 1800 IN DS 10056 5 2 E4B05F87725FA86D9A64F1E53C3D0E6250946599DFE639C45955B0ED416CDDFA"), - test.NS("delegated.example.org. 1800 IN NS a.delegated.example.org."), - test.NS("delegated.example.org. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.RRSIG("delegated.example.org. 1800 IN RRSIG DS 13 3 1800 20161129153240 20161030153240 49035 example.org. rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1jHtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4jbznKKqk+DGKog=="), - }, - Extra: []dns.RR{ - test.A("a.delegated.example.org. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.example.org. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "foo.delegated.example.org.", Qtype: dns.TypeDS, Do: true, - Ns: []dns.RR{ - test.DS("delegated.example.org. 1800 IN DS 10056 5 1 EE72CABD1927759CDDA92A10DBF431504B9E1F13"), - test.DS("delegated.example.org. 1800 IN DS 10056 5 2 E4B05F87725FA86D9A64F1E53C3D0E6250946599DFE639C45955B0ED416CDDFA"), - test.NS("delegated.example.org. 1800 IN NS a.delegated.example.org."), - test.NS("delegated.example.org. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.RRSIG("delegated.example.org. 1800 IN RRSIG DS 13 3 1800 20161129153240 20161030153240 49035 example.org. rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1jHtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4jbznKKqk+DGKog=="), - }, - Extra: []dns.RR{ - test.A("a.delegated.example.org. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.example.org. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "delegated.example.org.", Qtype: dns.TypeDS, Do: true, - Answer: []dns.RR{ - test.DS("delegated.example.org. 1800 IN DS 10056 5 1 EE72CABD1927759CDDA92A10DBF431504B9E1F13"), - test.DS("delegated.example.org. 1800 IN DS 10056 5 2 E4B05F87725FA86D9A64F1E53C3D0E6250946599DFE639C45955B0ED416CDDFA"), - test.RRSIG("delegated.example.org. 1800 IN RRSIG DS 13 3 1800 20161129153240 20161030153240 49035 example.org. rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1jHtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4jbznKKqk+DGKog=="), - }, - Ns: []dns.RR{ - test.NS("example.org. 1800 IN NS a.iana-servers.net."), - test.NS("example.org. 1800 IN NS b.iana-servers.net."), - test.RRSIG("example.org. 1800 IN RRSIG NS 13 2 1800 20161129153240 20161030153240 49035 example.org. llrHoIuw="), - }, - }, -} - -var miekAuth = []dns.RR{ - test.NS("miek.nl. 1800 IN NS ext.ns.whyscream.net."), - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.NS("miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.NS("miek.nl. 1800 IN NS omval.tednet.nl."), -} - -func TestLookupDelegation(t *testing.T) { - testDelegation(t, dbMiekNLDelegation, testzone, delegationTestCases) -} - -func TestLookupSecureDelegation(t *testing.T) { - testDelegation(t, exampleOrgSigned, "example.org.", secureDelegationTestCases) -} - -func testDelegation(t *testing.T, z, origin string, testcases []test.Case) { - t.Helper() - zone, err := Parse(strings.NewReader(z), origin, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{origin: zone}, Names: []string{origin}}} - ctx := context.TODO() - - for _, tc := range testcases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %q", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -const dbMiekNLDelegation = ` -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; Serial - 4H ; Refresh - 1H ; Retry - 7D ; Expire - 4H ) ; Negative Cache TTL - IN NS linode.atoom.net. - IN NS ns-ext.nlnetlabs.nl. - IN NS omval.tednet.nl. - IN NS ext.ns.whyscream.net. - - IN MX 1 aspmx.l.google.com. - IN MX 5 alt1.aspmx.l.google.com. - IN MX 5 alt2.aspmx.l.google.com. - IN MX 10 aspmx2.googlemail.com. - IN MX 10 aspmx3.googlemail.com. - -delegated IN NS a.delegated - IN NS ns-ext.nlnetlabs.nl. - -a.delegated IN TXT "obscured" - IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 - -a IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -www IN CNAME a -archive IN CNAME a` diff --git a/plugin/file/delete_test.go b/plugin/file/delete_test.go deleted file mode 100644 index 26ee64e3a4..0000000000 --- a/plugin/file/delete_test.go +++ /dev/null @@ -1,65 +0,0 @@ -package file - -import ( - "bytes" - "fmt" - "testing" - - "github.com/coredns/coredns/plugin/file/tree" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -/* -Create a zone with: - - apex - / - a MX - a A - -Test that: we create the proper tree and that delete -deletes the correct elements -*/ - -var tz = NewZone("example.org.", "db.example.org.") - -type treebuf struct { - *bytes.Buffer -} - -func (t *treebuf) printFunc(e *tree.Elem, rrs map[uint16][]dns.RR) error { - fmt.Fprintf(t.Buffer, "%v\n", rrs) // should be fixed order in new go versions. - return nil -} - -func TestZoneInsertAndDelete(t *testing.T) { - tz.Insert(test.SOA("example.org. IN SOA 1 2 3 4 5")) - - if x := tz.Apex.SOA.Header().Name; x != "example.org." { - t.Errorf("Failed to insert SOA, expected %s, git %s", "example.org.", x) - } - - // Insert two RRs and then remove one. - tz.Insert(test.A("a.example.org. IN A 127.0.0.1")) - tz.Insert(test.MX("a.example.org. IN MX 10 mx.example.org.")) - - tz.Delete(test.MX("a.example.org. IN MX 10 mx.example.org.")) - - tb := treebuf{new(bytes.Buffer)} - - tz.Walk(tb.printFunc) - if tb.String() != "map[1:[a.example.org.\t3600\tIN\tA\t127.0.0.1]]\n" { - t.Errorf("Expected 1 A record in tree, got %s", tb.String()) - } - - tz.Delete(test.A("a.example.org. IN A 127.0.0.1")) - - tb.Reset() - - tz.Walk(tb.printFunc) - if tb.String() != "" { - t.Errorf("Expected no record in tree, got %s", tb.String()) - } -} diff --git a/plugin/file/dname.go b/plugin/file/dname.go deleted file mode 100644 index 58351a350b..0000000000 --- a/plugin/file/dname.go +++ /dev/null @@ -1,44 +0,0 @@ -package file - -import ( - "github.com/coredns/coredns/plugin/pkg/dnsutil" - - "github.com/miekg/dns" -) - -// substituteDNAME performs the DNAME substitution defined by RFC 6672, -// assuming the QTYPE of the query is not DNAME. It returns an empty -// string if there is no match. -func substituteDNAME(qname, owner, target string) string { - if dns.IsSubDomain(owner, qname) && qname != owner { - labels := dns.SplitDomainName(qname) - labels = append(labels[0:len(labels)-dns.CountLabel(owner)], dns.SplitDomainName(target)...) - - return dnsutil.Join(labels...) - } - - return "" -} - -// synthesizeCNAME returns a CNAME RR pointing to the resulting name of -// the DNAME substitution. The owner name of the CNAME is the QNAME of -// the query and the TTL is the same as the corresponding DNAME RR. -// -// It returns nil if the DNAME substitution has no match. -func synthesizeCNAME(qname string, d *dns.DNAME) *dns.CNAME { - target := substituteDNAME(qname, d.Header().Name, d.Target) - if target == "" { - return nil - } - - r := new(dns.CNAME) - r.Hdr = dns.RR_Header{ - Name: qname, - Rrtype: dns.TypeCNAME, - Class: dns.ClassINET, - Ttl: d.Header().Ttl, - } - r.Target = target - - return r -} diff --git a/plugin/file/dname_test.go b/plugin/file/dname_test.go deleted file mode 100644 index cc70bb5ace..0000000000 --- a/plugin/file/dname_test.go +++ /dev/null @@ -1,300 +0,0 @@ -package file - -/* -TODO(miek): move to test/ for full server testing - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -// RFC 6672, Section 2.2. Assuming QTYPE != DNAME. -var dnameSubstitutionTestCases = []struct { - qname string - owner string - target string - expected string -}{ - {"com.", "example.com.", "example.net.", ""}, - {"example.com.", "example.com.", "example.net.", ""}, - {"a.example.com.", "example.com.", "example.net.", "a.example.net."}, - {"a.b.example.com.", "example.com.", "example.net.", "a.b.example.net."}, - {"ab.example.com.", "b.example.com.", "example.net.", ""}, - {"foo.example.com.", "example.com.", "example.net.", "foo.example.net."}, - {"a.x.example.com.", "x.example.com.", "example.net.", "a.example.net."}, - {"a.example.com.", "example.com.", "y.example.net.", "a.y.example.net."}, - {"cyc.example.com.", "example.com.", "example.com.", "cyc.example.com."}, - {"cyc.example.com.", "example.com.", "c.example.com.", "cyc.c.example.com."}, - {"shortloop.x.x.", "x.", ".", "shortloop.x."}, - {"shortloop.x.", "x.", ".", "shortloop."}, -} - -func TestDNAMESubstitution(t *testing.T) { - for i, tc := range dnameSubstitutionTestCases { - result := substituteDNAME(tc.qname, tc.owner, tc.target) - if result != tc.expected { - if result == "" { - result = "" - } - - t.Errorf("Case %d: Expected %s -> %s, got %v", i, tc.qname, tc.expected, result) - return - } - } -} - -var dnameTestCases = []test.Case{ - { - Qname: "dname.miek.nl.", Qtype: dns.TypeDNAME, - Answer: []dns.RR{ - test.DNAME("dname.miek.nl. 1800 IN DNAME test.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "dname.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("dname.miek.nl. 1800 IN A 127.0.0.1"), - }, - Ns: miekAuth, - }, - { - Qname: "dname.miek.nl.", Qtype: dns.TypeMX, - Answer: []dns.RR{}, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "a.dname.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.CNAME("a.dname.miek.nl. 1800 IN CNAME a.test.miek.nl."), - test.A("a.test.miek.nl. 1800 IN A 139.162.196.78"), - test.DNAME("dname.miek.nl. 1800 IN DNAME test.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "www.dname.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("a.test.miek.nl. 1800 IN A 139.162.196.78"), - test.DNAME("dname.miek.nl. 1800 IN DNAME test.miek.nl."), - test.CNAME("www.dname.miek.nl. 1800 IN CNAME www.test.miek.nl."), - test.CNAME("www.test.miek.nl. 1800 IN CNAME a.test.miek.nl."), - }, - Ns: miekAuth, - }, -} - -func TestLookupDNAME(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNLDNAME), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - for _, tc := range dnameTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - test.SortAndCheck(t, resp, tc) - } -} - -var dnameDnssecTestCases = []test.Case{ - { - // We have no auth section, because the test zone does not have nameservers. - Qname: "ns.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("ns.example.org. 1800 IN A 127.0.0.1"), - }, - }, - { - Qname: "dname.example.org.", Qtype: dns.TypeDNAME, Do: true, - Answer: []dns.RR{ - test.DNAME("dname.example.org. 1800 IN DNAME test.example.org."), - test.RRSIG("dname.example.org. 1800 IN RRSIG DNAME 5 3 1800 20170702091734 20170602091734 54282 example.org. HvXtiBM="), - }, - }, - { - Qname: "a.dname.example.org.", Qtype: dns.TypeA, Do: true, - Answer: []dns.RR{ - test.CNAME("a.dname.example.org. 1800 IN CNAME a.test.example.org."), - test.DNAME("dname.example.org. 1800 IN DNAME test.example.org."), - test.RRSIG("dname.example.org. 1800 IN RRSIG DNAME 5 3 1800 20170702091734 20170602091734 54282 example.org. HvXtiBM="), - }, - }, -} - -func TestLookupDNAMEDNSSEC(t *testing.T) { - zone, err := Parse(strings.NewReader(dbExampleDNAMESigned), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{"example.org.": zone}, Names: []string{"example.org."}}} - ctx := context.TODO() - - for _, tc := range dnameDnssecTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - test.SortAndCheck(t, resp, tc) - } -} - -const dbMiekNLDNAME = ` -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; Serial - 4H ; Refresh - 1H ; Retry - 7D ; Expire - 4H ) ; Negative Cache TTL - IN NS linode.atoom.net. - IN NS ns-ext.nlnetlabs.nl. - IN NS omval.tednet.nl. - IN NS ext.ns.whyscream.net. - -test IN MX 1 aspmx.l.google.com. - IN MX 5 alt1.aspmx.l.google.com. - IN MX 5 alt2.aspmx.l.google.com. - IN MX 10 aspmx2.googlemail.com. - IN MX 10 aspmx3.googlemail.com. -a.test IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -www.test IN CNAME a.test - -dname IN DNAME test -dname IN A 127.0.0.1 -a.dname IN A 127.0.0.1 -` - -const dbExampleDNAMESigned = ` -; File written on Fri Jun 2 10:17:34 2017 -; dnssec_signzone version 9.10.3-P4-Debian -example.org. 1800 IN SOA a.example.org. b.example.org. ( - 1282630057 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 5 2 1800 ( - 20170702091734 20170602091734 54282 example.org. - mr5eQtFs1GubgwaCcqrpiF6Cgi822OkESPeV - X0OJYq3JzthJjHw8TfYAJWQ2yGqhlePHir9h - FT/uFZdYyytHq+qgIUbJ9IVCrq0gZISZdHML - Ry1DNffMR9CpD77KocOAUABfopcvH/3UGOHn - TFxkAr447zPaaoC68JYGxYLfZk8= ) - 1800 NS ns.example.org. - 1800 RRSIG NS 5 2 1800 ( - 20170702091734 20170602091734 54282 example.org. - McM4UdMxkscVQkJnnEbdqwyjpPgq5a/EuOLA - r2MvG43/cwOaWULiZoNzLi5Rjzhf+GTeVTan - jw6EsL3gEuYI1nznwlLQ04/G0XAHjbq5VvJc - rlscBD+dzf774yfaTjRNoeo2xTem6S7nyYPW - Y+1f6xkrsQPLYJfZ6VZ9QqyupBw= ) - 14400 NSEC dname.example.org. NS SOA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 5 2 14400 ( - 20170702091734 20170602091734 54282 example.org. - VT+IbjDFajM0doMKFipdX3+UXfCn3iHIxg5x - LElp4Q/YddTbX+6tZf53+EO+G8Kye3JDLwEl - o8VceijNeF3igZ+LiZuXCei5Qg/TJ7IAUnAO - xd85IWwEYwyKkKd6Z2kXbAN2pdcHE8EmboQd - wfTr9oyWhpZk1Z+pN8vdejPrG0M= ) - 1800 DNSKEY 256 3 5 ( - AwEAAczLlmTk5bMXUzpBo/Jta6MWSZYy3Nfw - gz8t/pkfSh4IlFF6vyXZhEqCeQsCBdD7ltkD - h5qd4A+nFrYOMwsi5XIjoHMlJN15xwFS9EgS - ZrZmuxePIEiYB5KccEf9JQMgM1t07Iu1FnrY - 02OuAqGWcO4tuyTLaK3QP4MLQOfAgKqf - ) ; ZSK; alg = RSASHA1; key id = 54282 - 1800 RRSIG DNSKEY 5 2 1800 ( - 20170702091734 20170602091734 54282 example.org. - MBgSRtZ6idJblLIHxZWpWL/1oqIwImb1mkl7 - hDFxqV6Hw19yLX06P7gcJEWiisdZBkVEfcOK - LeMJly05vgKfrMzLgIu2Ry4bL8AMKc8NMXBG - b1VDCEBW69P2omogj2KnORHDCZQr/BX9+wBU - 5rIMTTKlMSI5sT6ecJHHEymtiac= ) -dname.example.org. 1800 IN A 127.0.0.1 - 1800 RRSIG A 5 3 1800 ( - 20170702091734 20170602091734 54282 example.org. - LPCK2nLyDdGwvmzGLkUO2atEUjoc+aEspkC3 - keZCdXZaLnAwBH7dNAjvvXzzy0WrgWeiyDb4 - +rJ2N0oaKEZicM4QQDHKhugJblKbU5G4qTey - LSEaV3vvQnzGd0S6dCqnwfPj9czagFN7Zlf5 - DmLtdxx0aiDPCUpqT0+H/vuGPfk= ) - 1800 DNAME test.example.org. - 1800 RRSIG DNAME 5 3 1800 ( - 20170702091734 20170602091734 54282 example.org. - HvX79T1flWJ8H9/1XZjX6gz8rP/o2jbfPXJ9 - vC7ids/ZJilSReabLru4DCqcw1IV2DM/CZdE - tBnED/T2PJXvMut9tnYMrz+ZFPxoV6XyA3Z7 - bok3B0OuxizzAN2EXdol04VdbMHoWUzjQCzi - 0Ri12zLGRPzDepZ7FolgD+JtiBM= ) - 14400 NSEC a.dname.example.org. A DNAME RRSIG NSEC - 14400 RRSIG NSEC 5 3 14400 ( - 20170702091734 20170602091734 54282 example.org. - U3ZPYMUBJl3wF2SazQv/kBf6ec0CH+7n0Hr9 - w6lBKkiXz7P9WQzJDVnTHEZOrbDI6UetFGyC - 6qcaADCASZ9Wxc+riyK1Hl4ox+Y/CHJ97WHy - oS2X//vEf6qmbHQXin0WQtFdU/VCRYF40X5v - 8VfqOmrr8iKiEqXND8XNVf58mTw= ) -a.dname.example.org. 1800 IN A 127.0.0.1 - 1800 RRSIG A 5 4 1800 ( - 20170702091734 20170602091734 54282 example.org. - y7RHBWZwli8SJQ4BgTmdXmYS3KGHZ7AitJCx - zXFksMQtNoOfVEQBwnFqjAb8ezcV5u92h1gN - i1EcuxCFiElML1XFT8dK2GnlPAga9w3oIwd5 - wzW/YHcnR0P9lF56Sl7RoIt6+jJqOdRfixS6 - TDoLoXsNbOxQ+qV3B8pU2Tam204= ) - 14400 NSEC ns.example.org. A RRSIG NSEC - 14400 RRSIG NSEC 5 4 14400 ( - 20170702091734 20170602091734 54282 example.org. - Tmu27q3+xfONSZZtZLhejBUVtEw+83ZU1AFb - Rsxctjry/x5r2JSxw/sgSAExxX/7tx/okZ8J - oJqtChpsr91Kiw3eEBgINi2lCYIpMJlW4cWz - 8bYlHfR81VsKYgy/cRgrq1RRvBoJnw+nwSty - mKPIvUtt67LAvLxJheSCEMZLCKI= ) -ns.example.org. 1800 IN A 127.0.0.1 - 1800 RRSIG A 5 3 1800 ( - 20170702091734 20170602091734 54282 example.org. - mhi1SGaaAt+ndQEg5uKWKCH0HMzaqh/9dUK3 - p2wWMBrLbTZrcWyz10zRnvehicXDCasbBrer - ZpDQnz5AgxYYBURvdPfUzx1XbNuRJRE4l5PN - CEUTlTWcqCXnlSoPKEJE5HRf7v0xg2BrBUfM - 4mZnW2bFLwjrRQ5mm/mAmHmTROk= ) - 14400 NSEC example.org. A RRSIG NSEC - 14400 RRSIG NSEC 5 3 14400 ( - 20170702091734 20170602091734 54282 example.org. - loHcdjX+NIWLAkUDfPSy2371wrfUvrBQTfMO - 17eO2Y9E/6PE935NF5bjQtZBRRghyxzrFJhm - vY1Ad5ZTb+NLHvdSWbJQJog+eCc7QWp64WzR - RXpMdvaE6ZDwalWldLjC3h8QDywDoFdndoRY - eHOsmTvvtWWqtO6Fa5A8gmHT5HA= ) -` -*/ diff --git a/plugin/file/dnssec_test.go b/plugin/file/dnssec_test.go deleted file mode 100644 index 446fb8d5cb..0000000000 --- a/plugin/file/dnssec_test.go +++ /dev/null @@ -1,348 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -// All OPT RR are added in server.go, so we don't specify them in the unit tests. -var dnssecTestCases = []test.Case{ - { - Qname: "miek.nl.", Qtype: dns.TypeSOA, Do: true, - Answer: []dns.RR{ - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - Ns: auth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeAAAA, Do: true, - Answer: []dns.RR{ - test.AAAA("miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - test.RRSIG("miek.nl. 1800 IN RRSIG AAAA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. SsRT="), - }, - Ns: auth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeNS, Do: true, - Answer: []dns.RR{ - test.NS("miek.nl. 1800 IN NS ext.ns.whyscream.net."), - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.NS("miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.NS("miek.nl. 1800 IN NS omval.tednet.nl."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 8 2 1800 20160426031301 20160327031301 12051 miek.nl. ZLtsQhwaz+lHfNpztFoR1Vxs="), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeMX, Do: true, - Answer: []dns.RR{ - test.MX("miek.nl. 1800 IN MX 1 aspmx.l.google.com."), - test.MX("miek.nl. 1800 IN MX 10 aspmx2.googlemail.com."), - test.MX("miek.nl. 1800 IN MX 10 aspmx3.googlemail.com."), - test.MX("miek.nl. 1800 IN MX 5 alt1.aspmx.l.google.com."), - test.MX("miek.nl. 1800 IN MX 5 alt2.aspmx.l.google.com."), - test.RRSIG("miek.nl. 1800 IN RRSIG MX 8 2 1800 20160426031301 20160327031301 12051 miek.nl. kLqG+iOr="), - }, - Ns: auth, - }, - { - Qname: "www.miek.nl.", Qtype: dns.TypeA, Do: true, - Answer: []dns.RR{ - test.A("a.miek.nl. 1800 IN A 139.162.196.78"), - test.RRSIG("a.miek.nl. 1800 IN RRSIG A 8 3 1800 20160426031301 20160327031301 12051 miek.nl. lxLotCjWZ3kihTxk="), - test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), - test.RRSIG("www.miek.nl. 1800 RRSIG CNAME 8 3 1800 20160426031301 20160327031301 12051 miek.nl. NVZmMJaypS+wDL2Lar4Zw1zF"), - }, - Ns: auth, - }, - { - // NoData - Qname: "a.miek.nl.", Qtype: dns.TypeSRV, Do: true, - Ns: []dns.RR{ - test.NSEC("a.miek.nl. 14400 IN NSEC archive.miek.nl. A AAAA RRSIG NSEC"), - test.RRSIG("a.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160426031301 20160327031301 12051 miek.nl. GqnF6cutipmSHEao="), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "b.miek.nl.", Qtype: dns.TypeA, Do: true, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.NSEC("archive.miek.nl. 14400 IN NSEC go.dns.miek.nl. CNAME RRSIG NSEC"), - test.RRSIG("archive.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160426031301 20160327031301 12051 miek.nl. jEpx8lcp4do5fWXg="), - test.NSEC("miek.nl. 14400 IN NSEC a.miek.nl. A NS SOA MX AAAA RRSIG NSEC DNSKEY"), - test.RRSIG("miek.nl. 14400 IN RRSIG NSEC 8 2 14400 20160426031301 20160327031301 12051 miek.nl. mFfc3r/9PSC1H6oSpdC"), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "b.blaat.miek.nl.", Qtype: dns.TypeA, Do: true, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.NSEC("archive.miek.nl. 14400 IN NSEC go.dns.miek.nl. CNAME RRSIG NSEC"), - test.RRSIG("archive.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160426031301 20160327031301 12051 miek.nl. jEpx8lcp4do5fWXg="), - test.NSEC("miek.nl. 14400 IN NSEC a.miek.nl. A NS SOA MX AAAA RRSIG NSEC DNSKEY"), - test.RRSIG("miek.nl. 14400 IN RRSIG NSEC 8 2 14400 20160426031301 20160327031301 12051 miek.nl. mFfc3r/9PSC1H6oSpdC"), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "b.a.miek.nl.", Qtype: dns.TypeA, Do: true, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - // dedupped NSEC, because 1 nsec tells all - test.NSEC("a.miek.nl. 14400 IN NSEC archive.miek.nl. A AAAA RRSIG NSEC"), - test.RRSIG("a.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160426031301 20160327031301 12051 miek.nl. GqnF6cut/RRGPQ1QGQE1ipmSHEao="), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, -} - -var auth = []dns.RR{ - test.NS("miek.nl. 1800 IN NS ext.ns.whyscream.net."), - test.NS("miek.nl. 1800 IN NS linode.atoom.net."), - test.NS("miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.NS("miek.nl. 1800 IN NS omval.tednet.nl."), - test.RRSIG("miek.nl. 1800 IN RRSIG NS 8 2 1800 20160426031301 20160327031301 12051 miek.nl. ZLtsQhwazbqSpztFoR1Vxs="), -} - -func TestLookupDNSSEC(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNLSigned), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - for _, tc := range dnssecTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -func BenchmarkFileLookupDNSSEC(b *testing.B) { - zone, err := Parse(strings.NewReader(dbMiekNLSigned), testzone, "stdin", 0) - if err != nil { - return - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - tc := test.Case{ - Qname: "b.miek.nl.", Qtype: dns.TypeA, Do: true, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.NSEC("archive.miek.nl. 14400 IN NSEC go.dns.miek.nl. CNAME RRSIG NSEC"), - test.RRSIG("archive.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160426031301 20160327031301 12051 miek.nl. jEpx8lcp4do5fWXg="), - test.NSEC("miek.nl. 14400 IN NSEC a.miek.nl. A NS SOA MX AAAA RRSIG NSEC DNSKEY"), - test.RRSIG("miek.nl. 14400 IN RRSIG NSEC 8 2 14400 20160426031301 20160327031301 12051 miek.nl. mFfc3r/9PSC1H6oSpdC"), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160426031301 20160327031301 12051 miek.nl. FIrzy07acBbtyQczy1dc="), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - } - - m := tc.Msg() - - for b.Loop() { - fm.ServeDNS(ctx, rec, m) - } -} - -const dbMiekNLSigned = ` -; File written on Sun Mar 27 04:13:01 2016 -; dnssec_signzone version 9.10.3-P4-Ubuntu -miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. ( - 1459051981 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - FIrzy07acBzrf6kNW13Ypmq/ahojoMqOj0qJ - ixTevTvwOEcVuw9GlJoYIHTYg+hm1sZHtx9K - RiVmYsm8SHKsJA1WzixtT4K7vQvM+T+qbeOJ - xA6YTivKUcGRWRXQlOTUAlHS/KqBEfmxKgRS - 68G4oOEClFDSJKh7RbtyQczy1dc= ) - 1800 NS ext.ns.whyscream.net. - 1800 NS omval.tednet.nl. - 1800 NS linode.atoom.net. - 1800 NS ns-ext.nlnetlabs.nl. - 1800 RRSIG NS 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - ZLtsQhwaz+CwrgzgFiEAqbqS/JH65MYjziA3 - 6EXwlGDy41lcfGm71PpxA7cDzFhWNkJNk4QF - q48wtpP4IGPPpHbnJHKDUXj6se7S+ylAGbS+ - VgVJ4YaVcE6xA9ZVhVpz8CSSjeH34vmqq9xj - zmFjofuDvraZflHfNpztFoR1Vxs= ) - 1800 A 139.162.196.78 - 1800 RRSIG A 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - hl+6Q075tsCkxIqbop8zZ6U8rlFvooz7Izzx - MgCZYVLcg75El28EXKIhBfRb1dPaKbd+v+AD - wrJMHL131pY5sU2Ly05K+7CqmmyaXgDaVsKS - rSw/TbhGDIItBemeseeuXGAKAbY2+gE7kNN9 - mZoQ9hRB3SrxE2jhctv66DzYYQQ= ) - 1800 MX 1 aspmx.l.google.com. - 1800 MX 5 alt1.aspmx.l.google.com. - 1800 MX 5 alt2.aspmx.l.google.com. - 1800 MX 10 aspmx2.googlemail.com. - 1800 MX 10 aspmx3.googlemail.com. - 1800 RRSIG MX 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - kLqG+iOrKSzms1H9Et9me8Zts1rbyeCFSVQD - G9is/u6ec3Lqg2vwJddf/yRsjVpVgadWSAkc - GSDuD2dK8oBeP24axWc3Z1OY2gdMI7w+PKWT - Z+pjHVjbjM47Ii/a6jk5SYeOwpGMsdEwhtTP - vk2O2WGljifqV3uE7GshF5WNR10= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 - 1800 RRSIG AAAA 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - SsRTHytW4YTAuHovHQgfIMhNwMtMp4gaAU/Z - lgTO+IkBb9y9F8uHrf25gG6RqA1bnGV/gezV - NU5negXm50bf1BNcyn3aCwEbA0rCGYIL+nLJ - szlBVbBu6me/Ym9bbJlfgfHRDfsVy2ZkNL+B - jfNQtGCSDoJwshjcqJlfIVSardo= ) - 14400 NSEC a.miek.nl. A NS SOA MX AAAA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 8 2 14400 ( - 20160426031301 20160327031301 12051 miek.nl. - mFfc3r/9PSC1H6oSpdC+FDy/Iu02W2Tf0x+b - n6Lpe1gCC1uvcSUrrmBNlyAWRr5Zm+ZXssEb - cKddRGiu/5sf0bUWrs4tqokL/HUl10X/sBxb - HfwNAeD7R7+CkpMv67li5AhsDgmQzpX2r3P6 - /6oZyLvODGobysbmzeWM6ckE8IE= ) - 1800 DNSKEY 256 3 8 ( - AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6 - E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5EC - IoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb - 2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXH - Py7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz - ) ; ZSK; alg = RSASHA256; key id = 12051 - 1800 DNSKEY 257 3 8 ( - AwEAAcWdjBl4W4wh/hPxMDcBytmNCvEngIgB - 9Ut3C2+QI0oVz78/WK9KPoQF7B74JQ/mjO4f - vIncBmPp6mFNxs9/WQX0IXf7oKviEVOXLjct - R4D1KQLX0wprvtUIsQFIGdXaO6suTT5eDbSd - 6tTwu5xIkGkDmQhhH8OQydoEuCwV245ZwF/8 - AIsqBYDNQtQ6zhd6jDC+uZJXg/9LuPOxFHbi - MTjp6j3CCW0kHbfM/YHZErWWtjPj3U3Z7knQ - SIm5PO5FRKBEYDdr5UxWJ/1/20SrzI3iztvP - wHDsA2rdHm/4YRzq7CvG4N0t9ac/T0a0Sxba - /BUX2UVPWaIVBdTRBtgHi0s= - ) ; KSK; alg = RSASHA256; key id = 33694 - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - o/D6o8+/bNGQyyRvwZ2hM0BJ+3HirvNjZoko - yGhGe9sPSrYU39WF3JVIQvNJFK6W3/iwlKir - TPOeYlN6QilnztFq1vpCxwj2kxJaIJhZecig - LsKxY/fOHwZlIbBLZZadQG6JoGRLHnImSzpf - xtyVaXQtfnJFC07HHt9np3kICfE= ) - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160426031301 20160327031301 33694 miek.nl. - Ak/mbbQVQV+nUgw5Sw/c+TSoYqIwbLARzuNE - QJvJNoRR4tKVOY6qSxQv+j5S7vzyORZ+yeDp - NlEa1T9kxZVBMABoOtLX5kRqZncgijuH8fxb - L57Sv2IzINI9+DOcy9Q9p9ygtwYzQKrYoNi1 - 0hwHi6emGkVG2gGghruMinwOJASGgQy487Yd - eIpcEKJRw73nxd2le/4/Vafy+mBpKWOczfYi - 5m9MSSxcK56NFYjPG7TvdIw0m70F/smY9KBP - pGWEdzRQDlqfZ4fpDaTAFGyRX0mPFzMbs1DD - 3hQ4LHUSi/NgQakdH9eF42EVEDeL4cI69K98 - 6NNk6X9TRslO694HKw== ) -a.miek.nl. 1800 IN A 139.162.196.78 - 1800 RRSIG A 8 3 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - lxLotCjWZ3kikNNcePu6HOCqMHDINKFRJRD8 - laz2KQ9DKtgXPdnRw5RJvVITSj8GUVzw1ec1 - CYVEKu/eMw/rc953Zns528QBypGPeMNLe2vu - C6a6UhZnGHA48dSd9EX33eSJs0MP9xsC9csv - LGdzYmv++eslkKxkhSOk2j/hTxk= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 - 1800 RRSIG AAAA 8 3 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - ji3QMlaUzlK85ppB5Pc+y2WnfqOi6qrm6dm1 - bXgsEov/5UV1Lmcv8+Y5NBbTbBlXGlWcpqNp - uWpf9z3lbguDWznpnasN2MM8t7yxo/Cr7WRf - QCzui7ewpWiA5hq7j0kVbM4nnDc6cO+U93hO - mMhVbeVI70HM2m0HaHkziEyzVZk= ) - 14400 NSEC archive.miek.nl. A AAAA RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160426031301 20160327031301 12051 miek.nl. - GqnF6cut/KCxbnJj27MCjjVGkjObV0hLhHOP - E1/GXAUTEKG6BWxJq8hidS3p/yrOmP5PEL9T - 4FjBp0/REdVmGpuLaiHyMselES82p/uMMdY5 - QqRM6LHhZdO1zsRbyzOZbm5MsW6GR7K2kHlX - 9TdBIULiRRGPQ1QGQE1ipmSHEao= ) -archive.miek.nl. 1800 IN CNAME a.miek.nl. - 1800 RRSIG CNAME 8 3 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - s4zVJiDrVuUiUFr8CNQLuXYYfpqpl8rovL50 - BYsub/xK756NENiOTAOjYH6KYg7RSzsygJjV - YQwXolZly2/KXAr48SCtxzkGFxLexxiKcFaj - vm7ZDl7Btoa5l68qmBcxOX5E/W0IKITi4PNK - mhBs7dlaf0IbPGNgMxae72RosxM= ) - 14400 NSEC go.dns.miek.nl. CNAME RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160426031301 20160327031301 12051 miek.nl. - jEp7LsoK++/PRFh2HieLzasA1jXBpp90NyDf - RfpfOxdM69yRKfvXMc2bazIiMuDhxht79dGI - Gj02cn1cvX60SlaHkeFtqTdJcHdK9rbI65EK - YHFZFzGh9XVnuMJKpUsm/xS1dnUSAnXN8q+0 - xBlUDlQpsAFv/cx8lcp4do5fWXg= ) -go.dns.miek.nl. 1800 IN TXT "Hello!" - 1800 RRSIG TXT 8 4 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - O0uo1NsXTq2TTfgOmGbHQQEchrcpllaDAMMX - dTDizw3t+vZ5SR32qJ8W7y6VXLgUqJgcdRxS - Fou1pp+t5juRZSQ0LKgxMpZAgHorkzPvRf1b - E9eBKrDSuLGagsQRwHeldFGFgsXtCbf07vVH - zoKR8ynuG4/cAoY0JzMhCts+56U= ) - 14400 NSEC www.miek.nl. TXT RRSIG NSEC - 14400 RRSIG NSEC 8 4 14400 ( - 20160426031301 20160327031301 12051 miek.nl. - BW6qo7kYe3Z+Y0ebaVTWTy1c3bpdf8WUEoXq - WDQxLDEj2fFiuEBDaSN5lTWRg3wj8kZmr6Uk - LvX0P29lbATFarIgkyiAdbOEdaf88nMfqBW8 - z2T5xrPQcN0F13uehmv395yAJs4tebRxErMl - KdkVF0dskaDvw8Wo3YgjHUf6TXM= ) -www.miek.nl. 1800 IN CNAME a.miek.nl. - 1800 RRSIG CNAME 8 3 1800 ( - 20160426031301 20160327031301 12051 miek.nl. - MiQQh2lScoNiNVZmMJaypS+wDL2Lar4Zw1zF - Uo4tL16BfQOt7yl8gXdAH2JMFqoKAoIdM2K6 - XwFOwKTOGSW0oNCOcaE7ts+1Z1U0H3O2tHfq - FAzfg1s9pQ5zxk8J/bJgkVIkw2/cyB0y1/PK - EmIqvChBSb4NchTuMCSqo63LJM8= ) - 14400 NSEC miek.nl. CNAME RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160426031301 20160327031301 12051 miek.nl. - OPPZ8iaUPrVKEP4cqeCiiv1WLRAY30GRIhc/ - me0gBwFkbmTEnvB+rUp831OJZDZBNKv4QdZj - Uyc26wKUOQeUyMJqv4IRDgxH7nq9GB5JRjYZ - IVxtGD1aqWLXz+8aMaf9ARJjtYUd3K4lt8Wz - LbJSo5Wdq7GOWqhgkY5n3XD0/FA= )` diff --git a/plugin/file/dnssex_test.go b/plugin/file/dnssex_test.go deleted file mode 100644 index d9a0a4568b..0000000000 --- a/plugin/file/dnssex_test.go +++ /dev/null @@ -1,145 +0,0 @@ -package file - -const dbDnssexNLSigned = ` -; File written on Tue Mar 29 21:02:24 2016 -; dnssec_signzone version 9.10.3-P4-Ubuntu -dnssex.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. ( - 1459281744 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - CA/Y3m9hCOiKC/8ieSOv8SeP964BUdG/8MC3 - WtKljUosK9Z9bBGrVizDjjqgq++lyH8BZJcT - aabAsERs4xj5PRtcxicwQXZACX5VYjXHQeZm - CyytFU5wq2gcXSmvUH86zZzftx3RGPvn1aOo - TlcvoC3iF8fYUCpROlUS0YR8Cdw= ) - 1800 NS omval.tednet.nl. - 1800 NS linode.atoom.net. - 1800 NS ns-ext.nlnetlabs.nl. - 1800 RRSIG NS 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - dLIeEvP86jj5nd3orv9bH7hTvkblF4Na0sbl - k6fJA6ha+FPN1d6Pig3NNEEVQ/+wlOp/JTs2 - v07L7roEEUCbBprI8gMSld2gFDwNLW3DAB4M - WD/oayYdAnumekcLzhgvWixTABjWAGRTGQsP - sVDFXsGMf9TGGC9FEomgkCVeNC0= ) - 1800 A 139.162.196.78 - 1800 RRSIG A 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - LKJKLzPiSEDWOLAag2YpfD5EJCuDcEAJu+FZ - Xy+4VyOv9YvRHCTL4vbrevOo5+XymY2RxU1q - j+6leR/Fe7nlreSj2wzAAk2bIYn4m6r7hqeO - aKZsUFfpX8cNcFtGEywfHndCPELbRxFeEziP - utqHFLPNMX5nYCpS28w4oJ5sAnM= ) - 1800 TXT "Doing It Safe Is Better" - 1800 RRSIG TXT 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - f6S+DUfJK1UYdOb3AHgUXzFTTtu+yLp/Fv7S - Hv0CAGhXAVw+nBbK719igFvBtObS33WKwzxD - 1pQNMaJcS6zeevtD+4PKB1KDC4fyJffeEZT6 - E30jGR8Y29/xA+Fa4lqDNnj9zP3b8TiABCle - ascY5abkgWCALLocFAzFJQ/27YQ= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 - 1800 RRSIG AAAA 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - PWcPSawEUBAfCuv0liEOQ8RYe7tfNW4rubIJ - LE+dbrub1DUer3cWrDoCYFtOufvcbkYJQ2CQ - AGjJmAQ5J2aqYDOPMrKa615V0KT3ifbZJcGC - gkIic4U/EXjaQpRoLdDzR9MyVXOmbA6sKYzj - ju1cNkLqM8D7Uunjl4pIr6rdSFo= ) - 14400 NSEC *.dnssex.nl. A NS SOA TXT AAAA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 8 2 14400 ( - 20160428190224 20160329190224 14460 dnssex.nl. - oIvM6JZIlNc1aNKGTxv58ApSnDr1nDPPgnD9 - 9oJZRIn7eb5WnpeDz2H3z5+x6Bhlp5hJJaUp - KJ3Ss6Jg/IDnrmIvKmgq6L6gHj1Y1IiHmmU8 - VeZTRzdTsDx/27OsN23roIvsytjveNSEMfIm - iLZ23x5kg1kBdJ9p3xjYHm5lR+8= ) - 1800 DNSKEY 256 3 8 ( - AwEAAazSO6uvLPEVknDA8yxjFe8nnAMU7txp - wb19k55hQ81WV3G4bpBM1NdN6sbYHrkXaTNx - 2bQWAkvX6pz0XFx3z/MPhW+vkakIWFYpyQ7R - AT5LIJfToVfiCDiyhhF0zVobKBInO9eoGjd9 - BAW3TUt+LmNAO/Ak5D5BX7R3CuA7v9k7 - ) ; ZSK; alg = RSASHA256; key id = 14460 - 1800 DNSKEY 257 3 8 ( - AwEAAbyeaV9zg0IqdtgYoqK5jJ239anzwG2i - gvH1DxSazLyaoNvEkCIvPgMLW/JWfy7Z1mQp - SMy9DtzL5pzRyQgw7kIeXLbi6jufUFd9pxN+ - xnzKLf9mY5AcnGToTrbSL+jnMT67wG+c34+Q - PeVfucHNUePBxsbz2+4xbXiViSQyCQGv - ) ; KSK; alg = RSASHA256; key id = 18772 - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - cFSFtJE+DBGNxb52AweFaVHBe5Ue5MDpqNdC - TIneUnEhP2m+vK4zJ/TraK0WdQFpsX63pod8 - PZ9y03vHUfewivyonCCBD3DcNdoU9subhN22 - tez9Ct8Z5/9E4RAz7orXal4M1VUEhRcXSEH8 - SJW20mfVsqJAiKqqNeGB/pAj23I= ) - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160428190224 20160329190224 18772 dnssex.nl. - oiiwo/7NYacePqohEp50261elhm6Dieh4j2S - VZGAHU5gqLIQeW9CxKJKtSCkBVgUo4cvO4Rn - 2tzArAuclDvBrMXRIoct8u7f96moeFE+x5FI - DYqICiV6k449ljj9o4t/5G7q2CRsEfxZKpTI - A/L0+uDk0RwVVzL45+TnilcsmZs= ) -*.dnssex.nl. 1800 IN TXT "Doing It Safe Is Better" - 1800 RRSIG TXT 8 2 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - FUZSTyvZfeuuOpCmNzVKOfITRHJ6/ygjmnnb - XGBxVUyQjoLuYXwD5XqZWGw4iKH6QeSDfGCx - 4MPqA4qQmW7Wwth7mat9yMfA4+p2sO84bysl - 7/BG9+W2G+q1uQiM9bX9V42P2X/XuW5Y/t9Y - 8u1sljQ7D8WwS6naH/vbaJxnDBw= ) - 14400 NSEC a.dnssex.nl. TXT RRSIG NSEC - 14400 RRSIG NSEC 8 2 14400 ( - 20160428190224 20160329190224 14460 dnssex.nl. - os6INm6q2eXknD5z8TpfbK00uxVbQefMvHcR - /RNX/kh0xXvzAaaDOV+Ge/Ko+2dXnKP+J1LY - G9ffXNpdbaQy5ygzH5F041GJst4566GdG/jt - 7Z7vLHYxEBTpZfxo+PLsXQXH3VTemZyuWyDf - qJzafXJVH1F0nDrcXmMlR6jlBHA= ) -www.dnssex.nl. 1800 IN CNAME a.dnssex.nl. - 1800 RRSIG CNAME 8 3 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - Omv42q/uVvdNsWQoSrQ6m6w6U7r7Abga7uF4 - 25b3gZlse0C+WyMyGFMGUbapQm7azvBpreeo - uKJHjzd+ufoG+Oul6vU9vyoj+ejgHzGLGbJQ - HftfP+UqP5SWvAaipP/LULTWKPuiBcLDLiBI - PGTfsq0DB6R+qCDTV0fNnkgxEBQ= ) - 14400 NSEC dnssex.nl. CNAME RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160428190224 20160329190224 14460 dnssex.nl. - TBN3ddfZW+kC84/g3QlNNJMeLZoyCalPQylt - KXXLPGuxfGpl3RYRY8KaHbP+5a8MnHjqjuMB - Lofb7yKMFxpSzMh8E36vnOqry1mvkSakNj9y - 9jM8PwDjcpYUwn/ql76MsmNgEV5CLeQ7lyH4 - AOrL79yOSQVI3JHJIjKSiz88iSw= ) -a.dnssex.nl. 1800 IN A 139.162.196.78 - 1800 RRSIG A 8 3 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - OXHpFj9nSpKi5yA/ULH7MOpGAWfyJ2yC/2xa - Pw0fqSY4QvcRt+V3adcFA4H9+P1b32GpxEjB - lXmCJID+H4lYkhUR4r4IOZBVtKG2SJEBZXip - pH00UkOIBiXxbGzfX8VL04v2G/YxUgLW57kA - aknaeTOkJsO20Y+8wmR9EtzaRFI= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 - 1800 RRSIG AAAA 8 3 1800 ( - 20160428190224 20160329190224 14460 dnssex.nl. - jrepc/VnRzJypnrG0WDEqaAr3HMjWrPxJNX0 - 86gbFjZG07QxBmrA1rj0jM9YEWTjjyWb2tT7 - lQhzKDYX/0XdOVUeeOM4FoSks80V+pWR8fvj - AZ5HmX69g36tLosMDKNR4lXcrpv89QovG4Hr - /r58fxEKEFJqrLDjMo6aOrg+uKA= ) - 14400 NSEC www.dnssex.nl. A AAAA RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160428190224 20160329190224 14460 dnssex.nl. - S+UM62wXRNNFN3QDWK5YFWUbHBXC4aqaqinZ - A2ZDeC+IQgyw7vazPz7cLI5T0YXXks0HTMlr - soEjKnnRZsqSO9EuUavPNE1hh11Jjm0fB+5+ - +Uro0EmA5Dhgc0Z2VpbXVQEhNDf/pI1gem15 - RffN2tBYNykZn4Has2ySgRaaRYQ= )` diff --git a/plugin/file/ds_test.go b/plugin/file/ds_test.go deleted file mode 100644 index 74f7bbd2b0..0000000000 --- a/plugin/file/ds_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var dsTestCases = []test.Case{ - { - Qname: "a.delegated.miek.nl.", Qtype: dns.TypeDS, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - Qname: "_udp.delegated.miek.nl.", Qtype: dns.TypeDS, - Ns: []dns.RR{ - test.NS("delegated.miek.nl. 1800 IN NS a.delegated.miek.nl."), - test.NS("delegated.miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - }, - Extra: []dns.RR{ - test.A("a.delegated.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.delegated.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - }, - { - // This works *here* because we skip the server routing for DS in core/dnsserver/server.go - Qname: "_udp.miek.nl.", Qtype: dns.TypeDS, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeDS, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, -} - -func TestLookupDS(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNLDelegation), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - for _, tc := range dsTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} diff --git a/plugin/file/ent_test.go b/plugin/file/ent_test.go deleted file mode 100644 index 73f5085839..0000000000 --- a/plugin/file/ent_test.go +++ /dev/null @@ -1,159 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var entTestCases = []test.Case{ - { - Qname: "b.c.miek.nl.", Qtype: dns.TypeA, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "b.c.miek.nl.", Qtype: dns.TypeA, Do: true, - Ns: []dns.RR{ - test.NSEC("a.miek.nl. 14400 IN NSEC a.b.c.miek.nl. A RRSIG NSEC"), - test.RRSIG("a.miek.nl. 14400 IN RRSIG NSEC 8 3 14400 20160502144311 20160402144311 12051 miek.nl. d5XZEy6SUpq98ZKUlzqhAfkLI9pQPc="), - test.RRSIG("miek.nl. 1800 IN RRSIG SOA 8 2 1800 20160502144311 20160402144311 12051 miek.nl. KegoBxA3Tbrhlc4cEdkRiteIkOfsq"), - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, -} - -func TestLookupEnt(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekENTNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - for _, tc := range entTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -const dbMiekENTNL = `; File written on Sat Apr 2 16:43:11 2016 -; dnssec_signzone version 9.10.3-P4-Ubuntu -miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 8 2 1800 ( - 20160502144311 20160402144311 12051 miek.nl. - KegoBxA3Tbrhlc4cEdkRiteIkOfsqD4oCLLM - ISJ5bChWy00LGHUlAnHVu5Ti96hUjVNmGSxa - xtGSuAAMFCr52W8pAB8LBIlu9B6QZUPHMccr - SuzxAX3ioawk2uTjm+k8AGPT4RoQdXemGLAp - zJTASolTVmeMTh5J0sZTZJrtvZ0= ) - 1800 NS linode.atoom.net. - 1800 RRSIG NS 8 2 1800 ( - 20160502144311 20160402144311 12051 miek.nl. - m0cOHL6Rre/0jZPXe+0IUjs/8AFASRCvDbSx - ZQsRDSlZgS6RoMP3OC77cnrKDVlfZ2Vhq3Ce - nYPoGe0/atB92XXsilmstx4HTSU64gsV9iLN - Xkzk36617t7zGOl/qumqfaUXeA9tihItzEim - 6SGnufVZI4o8xeyaVCNDDuN0bvY= ) - 14400 NSEC a.miek.nl. NS SOA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 8 2 14400 ( - 20160502144311 20160402144311 12051 miek.nl. - BCWVgwxWrs4tBjS9QXKkftCUbiLi40NyH1yA - nbFy1wCKQ2jDH00810+ia4b66QrjlAKgxE9z - 9U7MKSMV86sNkyAtlCi+2OnjtWF6sxPdJO7k - CHeg46XBjrQuiJRY8CneQX56+IEPdufLeqPR - l+ocBQ2UkGhXmQdWp3CFDn2/eqU= ) - 1800 DNSKEY 256 3 8 ( - AwEAAcNEU67LJI5GEgF9QLNqLO1SMq1EdoQ6 - E9f85ha0k0ewQGCblyW2836GiVsm6k8Kr5EC - IoMJ6fZWf3CQSQ9ycWfTyOHfmI3eQ/1Covhb - 2y4bAmL/07PhrL7ozWBW3wBfM335Ft9xjtXH - Py7ztCbV9qZ4TVDTW/Iyg0PiwgoXVesz - ) ; ZSK; alg = RSASHA256; key id = 12051 - 1800 DNSKEY 257 3 8 ( - AwEAAcWdjBl4W4wh/hPxMDcBytmNCvEngIgB - 9Ut3C2+QI0oVz78/WK9KPoQF7B74JQ/mjO4f - vIncBmPp6mFNxs9/WQX0IXf7oKviEVOXLjct - R4D1KQLX0wprvtUIsQFIGdXaO6suTT5eDbSd - 6tTwu5xIkGkDmQhhH8OQydoEuCwV245ZwF/8 - AIsqBYDNQtQ6zhd6jDC+uZJXg/9LuPOxFHbi - MTjp6j3CCW0kHbfM/YHZErWWtjPj3U3Z7knQ - SIm5PO5FRKBEYDdr5UxWJ/1/20SrzI3iztvP - wHDsA2rdHm/4YRzq7CvG4N0t9ac/T0a0Sxba - /BUX2UVPWaIVBdTRBtgHi0s= - ) ; KSK; alg = RSASHA256; key id = 33694 - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160502144311 20160402144311 12051 miek.nl. - YNpi1jRDQKpnsQEjIjxqy+kJGaYnV16e8Iug - 40c82y4pee7kIojFUllSKP44qiJpCArxF557 - tfjfwBd6c4hkqCScGPZXJ06LMyG4u//rhVMh - 4hyKcxzQFKxmrFlj3oQGksCI8lxGX6RxiZuR - qv2ol2lUWrqetpAL+Zzwt71884E= ) - 1800 RRSIG DNSKEY 8 2 1800 ( - 20160502144311 20160402144311 33694 miek.nl. - jKpLDEeyadgM0wDgzEk6sBBdWr2/aCrkAOU/ - w6dYIafN98f21oIYQfscV1gc7CTsA0vwzzUu - x0QgwxoNLMvSxxjOiW/2MzF8eozczImeCWbl - ad/pVCYH6Jn5UBrZ5RCWMVcs2RP5KDXWeXKs - jEN/0EmQg5qNd4zqtlPIQinA9I1HquJAnS56 - pFvYyGIbZmGEbhR18sXVBeTWYr+zOMHn2quX - 0kkrx2udz+sPg7i4yRsLdhw138gPRy1qvbaC - 8ELs1xo1mC9pTlDOhz24Q3iXpVAU1lXLYOh9 - nUP1/4UvZEYXHBUQk/XPRciojniWjAF825x3 - QoSivMHblBwRdAKJSg== ) -a.miek.nl. 1800 IN A 127.0.0.1 - 1800 RRSIG A 8 3 1800 ( - 20160502144311 20160402144311 12051 miek.nl. - lUOYdSxScjyYz+Ebc+nb6iTNgCohqj7K+Dat - 97KE7haV2nP3LxdYuDCJYZpeyhsXDLHd4bFI - bInYPwJiC6DUCxPCuCWy0KYlZOWW8KCLX3Ia - BOPQbvIwLsJhnX+/tyMD9mXortoqATO79/6p - nNxvFeM8pFDwaih17fXMuFR/BsI= ) - 14400 NSEC a.b.c.miek.nl. A RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20160502144311 20160402144311 12051 miek.nl. - d5XZEy6SUp+TPRJQED+0R65zf2Yeo/1dlEA2 - jYYvkXGSHXke4sg9nH8U3nr1rLcuqA1DsQgH - uMIjdENvXuZ+WCSwvIbhC+JEI6AyQ6Gfaf/D - I3mfu60C730IRByTrKM5C2rt11lwRQlbdaUY - h23/nn/q98ZKUlzqhAfkLI9pQPc= ) -a.b.c.miek.nl. 1800 IN A 127.0.0.1 - 1800 RRSIG A 8 5 1800 ( - 20160502144311 20160402144311 12051 miek.nl. - FwgU5+fFD4hEebco3gvKQt3PXfY+dcOJr8dl - Ky4WLsONIdhP+4e9oprPisSLxImErY21BcrW - xzu1IZrYDsS8XBVV44lBx5WXEKvAOrUcut/S - OWhFZW7ncdIQCp32ZBIatiLRJEqXUjx+guHs - noFLiHix35wJWsRKwjGLIhH1fbs= ) - 14400 NSEC miek.nl. A RRSIG NSEC - 14400 RRSIG NSEC 8 5 14400 ( - 20160502144311 20160402144311 12051 miek.nl. - lXgOqm9/jRRYvaG5jC1CDvTtGYxMroTzf4t4 - jeYGb60+qI0q9sHQKfAJvoQ5o8o1qfR7OuiF - f544ipYT9eTcJRyGAOoJ37yMie7ZIoVJ91tB - r8YdzZ9Q6x3v1cbwTaQiacwhPZhGYOw63qIs - q5IQErIPos2sNk+y9D8BEce2DO4= )` diff --git a/plugin/file/example_org.go b/plugin/file/example_org.go deleted file mode 100644 index eba18e0e4d..0000000000 --- a/plugin/file/example_org.go +++ /dev/null @@ -1,113 +0,0 @@ -package file - -// exampleOrgSigned is a fake signed example.org zone with two delegations, -// one signed (with DSs) and one "normal". -const exampleOrgSigned = ` -example.org. 1800 IN SOA a.iana-servers.net. devnull.example.org. ( - 1282630057 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 13 2 1800 ( - 20161129153240 20161030153240 49035 example.org. - GVnMpFmN+6PDdgCtlYDEYBsnBNDgYmEJNvos - Bk9+PNTPNWNst+BXCpDadTeqRwrr1RHEAQ7j - YWzNwqn81pN+IA== ) - 1800 NS a.iana-servers.net. - 1800 NS b.iana-servers.net. - 1800 RRSIG NS 13 2 1800 ( - 20161129153240 20161030153240 49035 example.org. - llrHoIuwjnbo28LOt4p5zWAs98XGqrXicKVI - Qxyaf/ORM8boJvW2XrKr3nj6Y8FKMhzd287D - 5PBzVCL6MZyjQg== ) - 14400 NSEC a.example.org. NS SOA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 13 2 14400 ( - 20161129153240 20161030153240 49035 example.org. - BQROf1swrmYi3GqpP5M/h5vTB8jmJ/RFnlaX - 7fjxvV7aMvXCsr3ekWeB2S7L6wWFihDYcKJg - 9BxVPqxzBKeaqg== ) - 1800 DNSKEY 256 3 13 ( - UNTqlHbC51EbXuY0rshW19Iz8SkCuGVS+L0e - bQj53dvtNlaKfWmtTauC797FoyVLbQwoMy/P - G68SXgLCx8g+9g== - ) ; ZSK; alg = ECDSAP256SHA256; key id = 49035 - 1800 RRSIG DNSKEY 13 2 1800 ( - 20161129153240 20161030153240 49035 example.org. - LnLHyqYJaCMOt7EHB4GZxzAzWLwEGCTFiEhC - jj1X1VuQSjJcN42Zd3yF+jihSW6huknrig0Z - Mqv0FM6mJ/qPKg== ) -a.delegated.example.org. 1800 IN A 139.162.196.78 - 1800 TXT "obscured" - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 -archive.example.org. 1800 IN CNAME a.example.org. - 1800 RRSIG CNAME 13 3 1800 ( - 20161129153240 20161030153240 49035 example.org. - SDFW1z/PN9knzH8BwBvmWK0qdIwMVtGrMgRw - 7lgy4utRrdrRdCSLZy3xpkmkh1wehuGc4R0S - 05Z3DPhB0Fg5BA== ) - 14400 NSEC delegated.example.org. CNAME RRSIG NSEC - 14400 RRSIG NSEC 13 3 14400 ( - 20161129153240 20161030153240 49035 example.org. - DQqLSVNl8F6v1K09wRU6/M6hbHy2VUddnOwn - JusJjMlrAOmoOctCZ/N/BwqCXXBA+d9yFGdH - knYumXp+BVPBAQ== ) -www.example.org. 1800 IN CNAME a.example.org. - 1800 RRSIG CNAME 13 3 1800 ( - 20161129153240 20161030153240 49035 example.org. - adzujOxCV0uBV4OayPGfR11iWBLiiSAnZB1R - slmhBFaDKOKSNYijGtiVPeaF+EuZs63pzd4y - 6Nm2Iq9cQhAwAA== ) - 14400 NSEC example.org. CNAME RRSIG NSEC - 14400 RRSIG NSEC 13 3 14400 ( - 20161129153240 20161030153240 49035 example.org. - jy3f96GZGBaRuQQjuqsoP1YN8ObZF37o+WkV - PL7TruzI7iNl0AjrUDy9FplP8Mqk/HWyvlPe - N3cU+W8NYlfDDQ== ) -a.example.org. 1800 IN A 139.162.196.78 - 1800 RRSIG A 13 3 1800 ( - 20161129153240 20161030153240 49035 example.org. - 41jFz0Dr8tZBN4Kv25S5dD4vTmviFiLx7xSA - qMIuLFm0qibKL07perKpxqgLqM0H1wreT4xz - I9Y4Dgp1nsOuMA== ) - 1800 AAAA 2a01:7e00::f03c:91ff:fef1:6735 - 1800 RRSIG AAAA 13 3 1800 ( - 20161129153240 20161030153240 49035 example.org. - brHizDxYCxCHrSKIu+J+XQbodRcb7KNRdN4q - VOWw8wHqeBsFNRzvFF6jwPQYphGP7kZh1KAb - VuY5ZVVhM2kHjw== ) - 14400 NSEC archive.example.org. A AAAA RRSIG NSEC - 14400 RRSIG NSEC 13 3 14400 ( - 20161129153240 20161030153240 49035 example.org. - zIenVlg5ScLr157EWigrTGUgrv7W/1s49Fic - i2k+OVjZfT50zw+q5X6DPKkzfAiUhIuqs53r - hZUzZwV/1Wew9Q== ) -delegated.example.org. 1800 IN NS a.delegated.example.org. - 1800 IN NS ns-ext.nlnetlabs.nl. - 1800 DS 10056 5 1 ( - EE72CABD1927759CDDA92A10DBF431504B9E - 1F13 ) - 1800 DS 10056 5 2 ( - E4B05F87725FA86D9A64F1E53C3D0E625094 - 6599DFE639C45955B0ED416CDDFA ) - 1800 RRSIG DS 13 3 1800 ( - 20161129153240 20161030153240 49035 example.org. - rlNNzcUmtbjLSl02ZzQGUbWX75yCUx0Mug1j - HtKVqRq1hpPE2S3863tIWSlz+W9wz4o19OI4 - jbznKKqk+DGKog== ) - 14400 NSEC sub.example.org. NS DS RRSIG NSEC - 14400 RRSIG NSEC 13 3 14400 ( - 20161129153240 20161030153240 49035 example.org. - lNQ5kRTB26yvZU5bFn84LYFCjwWTmBcRCDbD - cqWZvCSw4LFOcqbz1/wJKIRjIXIqnWIrfIHe - fZ9QD5xZsrPgUQ== ) -sub.example.org. 1800 IN NS sub1.example.net. - 1800 IN NS sub2.example.net. - 14400 NSEC www.example.org. NS RRSIG NSEC - 14400 RRSIG NSEC 13 3 14400 ( - 20161129153240 20161030153240 49035 example.org. - VYjahdV+TTkA3RBdnUI0hwXDm6U5k/weeZZr - ix1znORpOELbeLBMJW56cnaG+LGwOQfw9qqj - bOuULDst84s4+g== ) -` diff --git a/plugin/file/file.go b/plugin/file/file.go deleted file mode 100644 index 67b81e9a53..0000000000 --- a/plugin/file/file.go +++ /dev/null @@ -1,181 +0,0 @@ -// Package file implements a file backend. -package file - -import ( - "context" - "fmt" - "io" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/fall" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/transfer" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -var log = clog.NewWithPlugin("file") - -type ( - // File is the plugin that reads zone data from disk. - File struct { - Next plugin.Handler - Zones - transfer *transfer.Transfer - - Fall fall.F - } - - // Zones maps zone names to a *Zone. - Zones struct { - Z map[string]*Zone // A map mapping zone (origin) to the Zone's data - Names []string // All the keys from the map Z as a string slice. - } -) - -// ServeDNS implements the plugin.Handle interface. -func (f File) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - - qname := state.Name() - // TODO(miek): match the qname better in the map - zone := plugin.Zones(f.Zones.Names).Matches(qname) - if zone == "" { - // If no next plugin is configured, it's more correct to return REFUSED as file acts as an authoritative server - if f.Next == nil { - return dns.RcodeRefused, nil - } - return plugin.NextOrFailure(f.Name(), f.Next, ctx, w, r) - } - - z, ok := f.Z[zone] - if !ok || z == nil { - return dns.RcodeServerFailure, nil - } - - // If transfer is not loaded, we'll see these, answer with refused (no transfer allowed). - if state.QType() == dns.TypeAXFR || state.QType() == dns.TypeIXFR { - return dns.RcodeRefused, nil - } - - // This is only for when we are a secondary zones. - if r.Opcode == dns.OpcodeNotify { - if z.isNotify(state) { - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - w.WriteMsg(m) - - log.Infof("Notify from %s for %s: checking transfer", state.IP(), zone) - ok, err := z.shouldTransfer() - if ok { - z.TransferIn() - } else { - log.Infof("Notify from %s for %s: no SOA serial increase seen", state.IP(), zone) - } - if err != nil { - log.Warningf("Notify from %s for %s: failed primary check: %s", state.IP(), zone, err) - } - return dns.RcodeSuccess, nil - } - log.Infof("Dropping notify from %s for %s", state.IP(), zone) - return dns.RcodeSuccess, nil - } - - z.RLock() - exp := z.Expired - z.RUnlock() - if exp { - log.Errorf("Zone %s is expired", zone) - return dns.RcodeServerFailure, nil - } - - answer, ns, extra, result := z.Lookup(ctx, state, qname) - - // Only on NXDOMAIN we will fallthrough. - // `z.Lookup` can also return NOERROR for NXDOMAIN see comment see comment "Hacky way to get around empty-non-terminals" inside `Zone.Lookup`. - // It's safe to fallthrough with `result` Sucess (NOERROR) since all other return points in Lookup with Success have answer(s). - if len(answer) == 0 && (result == NameError || result == Success) && f.Fall.Through(qname) { - return plugin.NextOrFailure(f.Name(), f.Next, ctx, w, r) - } - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - m.Answer, m.Ns, m.Extra = answer, ns, extra - - switch result { - case Success: - case NoData: - case NameError: - m.Rcode = dns.RcodeNameError - case Delegation: - m.Authoritative = false - case ServerFailure: - // If the result is SERVFAIL and the answer is non-empty, then the SERVFAIL came from an - // external CNAME lookup and the answer contains the CNAME with no target record. We should - // write the CNAME record to the client instead of sending an empty SERVFAIL response. - if len(m.Answer) == 0 { - return dns.RcodeServerFailure, nil - } - // The rcode in the response should be the rcode received from the target lookup. RFC 6604 section 3 - m.Rcode = dns.RcodeServerFailure - } - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -// Name implements the Handler interface. -func (f File) Name() string { return "file" } - -type serialErr struct { - err string - zone string - origin string - serial int64 -} - -func (s *serialErr) Error() string { - return fmt.Sprintf("%s for origin %s in file %s, with %d SOA serial", s.err, s.origin, s.zone, s.serial) -} - -// Parse parses the zone in filename and returns a new Zone or an error. -// If serial >= 0 it will reload the zone, if the SOA hasn't changed -// it returns an error indicating nothing was read. -func Parse(f io.Reader, origin, fileName string, serial int64) (*Zone, error) { - zp := dns.NewZoneParser(f, dns.Fqdn(origin), fileName) - zp.SetIncludeAllowed(true) - z := NewZone(origin, fileName) - seenSOA := false - for rr, ok := zp.Next(); ok; rr, ok = zp.Next() { - if !seenSOA { - if s, ok := rr.(*dns.SOA); ok { - seenSOA = true - - // -1 is valid serial is we failed to load the file on startup. - - if serial >= 0 && s.Serial == uint32(serial) { // same serial - return nil, &serialErr{err: "no change in SOA serial", origin: origin, zone: fileName, serial: serial} - } - } - } - - if err := z.Insert(rr); err != nil { - return nil, err - } - } - if !seenSOA { - return nil, fmt.Errorf("file %q has no SOA record for origin %s", fileName, origin) - } - if zp.Err() != nil { - return nil, fmt.Errorf("failed to parse file %q for origin %s with error %v", fileName, origin, zp.Err()) - } - - if err := zp.Err(); err != nil { - return nil, err - } - - return z, nil -} diff --git a/plugin/file/file_test.go b/plugin/file/file_test.go deleted file mode 100644 index e1afc7f493..0000000000 --- a/plugin/file/file_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package file - -import ( - "strings" - "testing" -) - -func BenchmarkFileParseInsert(b *testing.B) { - for b.Loop() { - Parse(strings.NewReader(dbMiekENTNL), testzone, "stdin", 0) - } -} - -func TestParseNoSOA(t *testing.T) { - _, err := Parse(strings.NewReader(dbNoSOA), "example.org.", "stdin", 0) - if err == nil { - t.Fatalf("Zone %q should have failed to load", "example.org.") - } - if !strings.Contains(err.Error(), "no SOA record") { - t.Fatalf("Zone %q should have failed to load with no soa error: %s", "example.org.", err) - } -} - -const dbNoSOA = ` -$TTL 1M -$ORIGIN example.org. - -www IN A 192.168.0.14 -mail IN A 192.168.0.15 -imap IN CNAME mail -` - -func TestParseSyntaxError(t *testing.T) { - _, err := Parse(strings.NewReader(dbSyntaxError), "example.org.", "stdin", 0) - if err == nil { - t.Fatalf("Zone %q should have failed to load", "example.org.") - } - if !strings.Contains(err.Error(), "\"invalid\"") { - t.Fatalf("Zone %q should have failed with syntax error: %s", "example.org.", err) - } -} - -const dbSyntaxError = ` -$TTL 1M -$ORIGIN example.org. - -@ IN SOA ns1.example.com. admin.example.com. ( - 2005011437 ; Serial - 1200 ; Refresh - 144 ; Retry - 1814400 ; Expire - 2h ) ; Minimum -@ IN NS ns1.example.com. - -# invalid comment -www IN A 192.168.0.14 -mail IN A 192.168.0.15 -imap IN CNAME mail -` diff --git a/plugin/file/fuzz.go b/plugin/file/fuzz.go deleted file mode 100644 index 9c59ab8da4..0000000000 --- a/plugin/file/fuzz.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build gofuzz - -package file - -import ( - "strings" - - "github.com/coredns/coredns/plugin/pkg/fuzz" - "github.com/coredns/coredns/plugin/test" -) - -// Fuzz fuzzes file. -func Fuzz(data []byte) int { - name := "miek.nl." - zone, _ := Parse(strings.NewReader(fuzzMiekNL), name, "stdin", 0) - f := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{name: zone}, Names: []string{name}}} - - return fuzz.Do(f, data) -} - -const fuzzMiekNL = ` -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; Serial - 4H ; Refresh - 1H ; Retry - 7D ; Expire - 4H ) ; Negative Cache TTL - IN NS linode.atoom.net. - IN NS ns-ext.nlnetlabs.nl. - IN NS omval.tednet.nl. - IN NS ext.ns.whyscream.net. - - IN MX 1 aspmx.l.google.com. - IN MX 5 alt1.aspmx.l.google.com. - IN MX 5 alt2.aspmx.l.google.com. - IN MX 10 aspmx2.googlemail.com. - IN MX 10 aspmx3.googlemail.com. - - IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 - -a IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -www IN CNAME a -archive IN CNAME a - -srv IN SRV 10 10 8080 a.miek.nl. -mx IN MX 10 a.miek.nl.` diff --git a/plugin/file/glue_test.go b/plugin/file/glue_test.go deleted file mode 100644 index eeddc4e335..0000000000 --- a/plugin/file/glue_test.go +++ /dev/null @@ -1,254 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -// another personal zone (helps in testing as my secondary is NSD, atoom = atom in English. -var atoomTestCases = []test.Case{ - { - Qname: atoom, Qtype: dns.TypeNS, Do: true, - Answer: []dns.RR{ - test.NS("atoom.net. 1800 IN NS linode.atoom.net."), - test.NS("atoom.net. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.NS("atoom.net. 1800 IN NS omval.tednet.nl."), - test.RRSIG("atoom.net. 1800 IN RRSIG NS 8 2 1800 20170112031301 20161213031301 53289 atoom.net. DLe+G1 jlw="), - }, - Extra: []dns.RR{ - // test.OPT(4096, true), // added by server, not test in this unit test. - test.A("linode.atoom.net. 1800 IN A 176.58.119.54"), - test.AAAA("linode.atoom.net. 1800 IN AAAA 2a01:7e00::f03c:91ff:fe79:234c"), - test.RRSIG("linode.atoom.net. 1800 IN RRSIG A 8 3 1800 20170112031301 20161213031301 53289 atoom.net. Z4Ka4OLDoyxj72CL vkI="), - test.RRSIG("linode.atoom.net. 1800 IN RRSIG AAAA 8 3 1800 20170112031301 20161213031301 53289 atoom.net. l+9Qc914zFH/okG2fzJ1q olQ="), - }, - }, -} - -func TestLookupGlue(t *testing.T) { - zone, err := Parse(strings.NewReader(dbAtoomNetSigned), atoom, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{atoom: zone}, Names: []string{atoom}}} - ctx := context.TODO() - - for _, tc := range atoomTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -const dbAtoomNetSigned = ` -; File written on Tue Dec 13 04:13:01 2016 -; dnssec_signzone version 9.10.3-P4-Debian -atoom.net. 1800 IN SOA linode.atoom.net. miek.miek.nl. ( - 1481602381 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 14400 ; minimum (4 hours) - ) - 1800 RRSIG SOA 8 2 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - GZ30uFuGATKzwHXgpEwK70qjdXSAqmbB5d4z - e7WTibvJDPLa1ptZBI7Zuod2KMOkT1ocSvhL - U7makhdv0BQx+5RSaP25mAmPIzfU7/T7R+DJ - 5q1GLlDSvOprfyMUlwOgZKZinesSdUa9gRmu - 8E+XnPNJ/jcTrGzzaDjn1/irrM0= ) - 1800 NS omval.tednet.nl. - 1800 NS linode.atoom.net. - 1800 NS ns-ext.nlnetlabs.nl. - 1800 RRSIG NS 8 2 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - D8Sd9JpXIOxOrUF5Hi1ASutyQwP7JNu8XZxA - rse86A6L01O8H8sCNib2VEoJjHuZ/dDEogng - OgmfqeFy04cpSX19GAk3bkx8Lr6aEat3nqIC - XA/xsCCfXy0NKZpI05zntHPbbP5tF/NvpE7n - 0+oLtlHSPEg1ZnEgwNoLe+G1jlw= ) - 1800 A 176.58.119.54 - 1800 RRSIG A 8 2 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - mrjiUFNCqDgCW8TuhjzcMh0V841uC224QvwH - 0+OvYhcve9twbX3Y12PSFmz77Xz3Jg9WAj4I - qhh3iHUac4dzUXyC702DT62yMF/9CMUO0+Ee - b6wRtvPHr2Tt0i/xV/BTbArInIvurXJrvKvo - LsZHOfsg7dZs6Mvdpe/CgwRExpk= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fe79:234c - 1800 RRSIG AAAA 8 2 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - EkMxX2vUaP4h0qbWlHaT4yNhm8MrPMZTn/3R - zNw+i3oF2cLMWKh6GCfuIX/x5ID706o8kfum - bxTYwuTe1LJ+GoZHWEiH8VCa1laTlh8l3qSi - PZKU8339rr5cCYluk6p9PbAuRkYYOEruNg42 - wPOx46dsAlvp2XpOaOeJtU64QGQ= ) - 14400 NSEC deb.atoom.net. A NS SOA AAAA RRSIG NSEC DNSKEY - 14400 RRSIG NSEC 8 2 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - P7Stx7lqRKl8tbTAAaJ0W6UhgJwZz3cjpM8z - eplbhXEVohKtyJ9xgptKt1vreH6lkhzciar5 - EB9Nj0VOmcthiht/+As8aEKmf8UlcJ2EbLII - NT7NUaasxsrLE2rjjX5mEtzOZ1uQAGiU8Hnk - XdGweTgIVFuiCcMCgaKpC2TRrMw= ) - 1800 DNSKEY 256 3 8 ( - AwEAAeDZTH9YT9qLMPlq4VrxX7H3GbWcqCrC - tXc9RT/hf96GN+ttnnEQVaJY8Gbly3IZpYQW - MwaCi0t30UULXE3s9FUQtl4AMbplyiz9EF8L - /XoBS1yhGm5WV5u608ihoPaRkYNyVV3egb5Y - hA5EXWy2vfsa1XWPpxvSAhlqM0YENtP3 - ) ; ZSK; alg = RSASHA256; key id = 53289 - 1800 DNSKEY 257 3 8 ( - AwEAAepN7Vo8enDCruVduVlGxTDIv7QG0wJQ - fTL1hMy4k0Yf/7dXzrn5bZT4ytBvH1hoBImH - mtTrQo6DQlBBVXDJXTyQjQozaHpN1HhTJJTz - IXl8UrdbkLWvz6QSeJPmBBYQRAqylUA2KE29 - nxyiNboheDLiIWyQ7Q/Op7lYaKMdb555kQAs - b/XT4Tb3/3BhAjcofNofNBjDjPq2i8pAo8HU - 5mW5/Pl+ZT/S0aqQPnCkHk/iofSRu3ZdBzkH - 54eoC+BdyXb7gTbPGRr+1gMbf/rzhRiZ4vnX - NoEzGAXmorKzJHANNb6KQ/932V9UDHm9wbln - 6y3s7IBvsMX5KF8vo81Stkc= - ) ; KSK; alg = RSASHA256; key id = 19114 - 1800 RRSIG DNSKEY 8 2 1800 ( - 20170112031301 20161213031301 19114 atoom.net. - IEjViubKdef8RWB5bcnirqVcqDk16irkywJZ - sBjMyNs03/a+sl0UHEGAB7qCC+Rn+RDaM5It - WF+Gha6BwRIN9NuSg3BwB2h1nJtHw61pMVU9 - 2j9Q3pq7X1xoTBAcwY95t5a1xlw0iTCaLu1L - Iu/PbVp1gj1o8BF/PiYilvZJGUjaTgsi+YNi - 2kiWpp6afO78/W4nfVx+lQBmpyfX1lwL5PEC - 9f5PMbzRmOapvUBc2XdddGywLdmlNsLHimGV - t7kkHZHOWQR1TvvMbU3dsC0bFCrBVGDhEuxC - hATR+X5YV0AyDSyrew7fOGJKrapwMWS3yRLr - FAt0Vcxno5lwQImbCQ== ) - 1800 RRSIG DNSKEY 8 2 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - sSxdgPT+gFZPN0ot6lZRGqOwvONUEsg0uEbf - kh19JlWHu/qvq5HOOK2VOW/UnswpVmtpFk0W - z/jiCNHifjpCCVn5tfCMZDLGekmPOjdobw24 - swBuGjnn0NHvxHoN6S+mb+AR6V/dLjquNUda - yzBc2Ua+XtQ7SCLKIvEhcNg9H3o= ) -deb.atoom.net. 1800 IN A 176.58.119.54 - 1800 RRSIG A 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - ZW7jm/VDa/I9DxWlE7Cm+HHymiVv4Wk5UGYI - Uf/g0EfxLCBR6SwL5QKuV1z7xoWKaiNqqrmc - gg35xgskKyS8QHgCCODhDzcIKe+MSsBXbY04 - AtrC5dV3JJQoA65Ng/48hwcyghAjXKrA2Yyq - GXf2DSvWeIV9Jmk0CsOELP24dpk= ) - 1800 TXT "v=spf1 a ip6:2a01:7e00::f03c:91ff:fe79:234c ~all" - 1800 RRSIG TXT 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - fpvVJ+Z6tzSd9yETn/PhLSCRISwRD1c3ET80 - 8twnx3XfAPQfV2R8dw7pz8Vw4TSxvf19bAZc - PWRjW682gb7gAxoJshCXBYabMfqExrBc9V1S - ezwm3D93xNMyegxzHx2b/H8qp3ZWdsMLTvvN - Azu7P4iyO+WRWT0R7bJGrdTwRz8= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fe79:234c - 1800 RRSIG AAAA 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - aaPF6NqXfWamzi+xUDVeYa7StJUVM1tDsL34 - w5uozFRZ0f4K/Z88Kk5CgztxmtpNNKGdLWa0 - iryUJsbVWAbSQfrZNkNckBtczMNxGgjqn97A - 2//F6ajH/qrR3dWcCm+VJMgu3UPqAxLiCaYO - GQUx6Y8JA1VIM/RJAM6BhgNxjD0= ) - 14400 NSEC lafhart.atoom.net. A TXT AAAA RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - 1Llad64NDWcz8CyBu2TsyANrJ9Tpfm5257sY - FPYF579p3c9Imwp9kYEO1zMEKgNoXBN/sQnd - YCugq3r2GAI6bfJj8sV5bt6GKuZcGHMESug4 - uh2gU0NDcCA4GPdBYGdusePwV0RNpcRnVCFA - fsACp+22j3uwRUbCh0re0ufbAs4= ) -lafhart.atoom.net. 1800 IN A 178.79.160.171 - 1800 RRSIG A 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - fruP6cvMVICXEV8NcheS73NWLCEKlO1FgW6B - 35D2GhtfYZe+M23V5YBRtlVCCrAdS0etdCOf - xH9yt3u2kVvDXuMRiQr1zJPRDEq3cScYumpd - bOO8cjHiCic5lEcRVWNNHXyGtpqTvrp9CxOu - IQw1WgAlZyKj43zGg3WZi6OTKLg= ) - 14400 NSEC linode.atoom.net. A RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - 2AUWXbScL0jIJ7G6UsJAlUs+bgSprZ1zY6v/ - iVB5BAYwZD6pPky7LZdzvPEHh0aNLGIFbbU8 - SDJI7u/e4RUTlE+8yyjl6obZNfNKyJFqE5xN - 1BJ8sjFrVn6KaHIDKEOZunNb1MlMfCRkLg9O - 94zg04XEgVUfaYCPxvLs3fCEgzw= ) -voordeur.atoom.net. 1800 IN A 77.249.87.46 - 1800 RRSIG A 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - SzJz0NaKLRA/lW4CxgMHgeuQLp5QqFEjQv3I - zfPtY4joQsZn8RN8RLECcpcPKjbC8Dj6mxIJ - dd2vwhsCVlZKMNcZUOfpB7eGx1TR9HnzMkY9 - OdTt30a9+tktagrJEoy31vAhj1hJqLbSgvOa - pRr1P4ZpQ53/qH8JX/LOmqfWTdg= ) - 14400 NSEC www.atoom.net. A RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - CETJhUJy1rKjVj9wsW1549gth+/Z37//BI6S - nxJ+2Oq63jEjlbznmyo5hvFW54DbVUod+cLo - N9PdlNQDr1XsRBgWhkKW37RkuoRVEPwqRykv - xzn9i7CgYKAAHFyWMGihBLkV9ByPp8GDR8Zr - DEkrG3ErDlBcwi3FqGZFsSOW2xg= ) -www.atoom.net. 1800 IN CNAME deb.atoom.net. - 1800 RRSIG CNAME 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - 1lhG6iTtbeesBCVOrA8a7+V2gogCuXzKgSi8 - 6K0Pzq2CwqTScdNcZvcDOIbLq45Am5p09PIj - lXnd2fw6WAxphwvRhmwCve3uTZMUt5STw7oi - 0rED7GMuFUSC/BX0XVly7NET3ECa1vaK6RhO - hDSsKPWFI7to4d1z6tQ9j9Kvm4Y= ) - 14400 NSEC atoom.net. CNAME RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - CC4yCYP1q75/gTmPz+mVM6Lam2foPP5oTccY - RtROuTkgbt8DtAoPe304vmNazWBlGidnWJeD - YyAAe3znIHP0CgrxjD/hRL9FUzMnVrvB3mnx - 4W13wP1rE97RqJxV1kk22Wl3uCkVGy7LCjb0 - JLFvzCe2fuMe7YcTzI+t1rioTP0= ) -linode.atoom.net. 1800 IN A 176.58.119.54 - 1800 RRSIG A 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - Z4Ka4OLDha4eQNWs3GtUd1Cumr48RUnH523I - nZzGXtpQNou70qsm5Jt8n/HmsZ4L5DoxomRz - rgZTGnrqj43+A16UUGfVEk6SfUUHOgxgspQW - zoaqk5/5mQO1ROsLKY8RqaRqzvbToHvqeZEh - VkTPVA02JK9UFlKqoyxj72CLvkI= ) - 1800 AAAA 2a01:7e00::f03c:91ff:fe79:234c - 1800 RRSIG AAAA 8 3 1800 ( - 20170112031301 20161213031301 53289 atoom.net. - l+9Qce/EQyKrTJVKLv7iatjuCO285ckd5Oie - P2LzWVsL4tW04oHzieKZwIuNBRE+px8g5qrT - LIK2TikCGL1xHAd7CT7gbCtDcZ7jHmSTmMTJ - 405nOV3G3xWelreLI5Fn5ck8noEsF64kiw1y - XfkyQn2B914zFH/okG2fzJ1qolQ= ) - 14400 NSEC voordeur.atoom.net. A AAAA RRSIG NSEC - 14400 RRSIG NSEC 8 3 14400 ( - 20170112031301 20161213031301 53289 atoom.net. - Owzmz7QrVL2Gw2njEsUVEknMl2amx1HG9X3K - tO+Ihyy4tApiUFxUjAu3P/30QdqbB85h7s// - ipwX/AmQJNoxTScR3nHt9qDqJ044DPmiuh0l - NuIjguyZRANApmKCTA6AoxXIUqToIIjfVzi/ - PxXE6T3YIPlK7Bxgv1lcCBJ1fmE= )` - -const atoom = "atoom.net." diff --git a/plugin/file/include_test.go b/plugin/file/include_test.go deleted file mode 100644 index 490f05a30d..0000000000 --- a/plugin/file/include_test.go +++ /dev/null @@ -1,31 +0,0 @@ -package file - -import ( - "strings" - "testing" - - "github.com/coredns/coredns/plugin/test" -) - -// Make sure the external miekg/dns dependency is up to date - -func TestInclude(t *testing.T) { - name, rm, err := test.TempFile(".", "foo\tIN\tA\t127.0.0.1\n") - if err != nil { - t.Fatalf("Unable to create tmpfile %q: %s", name, err) - } - defer rm() - - zone := `$ORIGIN example.org. -@ IN SOA sns.dns.icann.org. noc.dns.icann.org. 2017042766 7200 3600 1209600 3600 -$INCLUDE ` + name + "\n" - - z, err := Parse(strings.NewReader(zone), "example.org.", "test", 0) - if err != nil { - t.Errorf("Unable to parse zone %q: %s", "example.org.", err) - } - - if _, ok := z.Search("foo.example.org."); !ok { - t.Errorf("Failed to find %q in parsed zone", "foo.example.org.") - } -} diff --git a/plugin/file/log_test.go b/plugin/file/log_test.go deleted file mode 100644 index c9609eecf8..0000000000 --- a/plugin/file/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package file - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/file/lookup.go b/plugin/file/lookup.go deleted file mode 100644 index 7e1c6e8fb9..0000000000 --- a/plugin/file/lookup.go +++ /dev/null @@ -1,435 +0,0 @@ -package file - -import ( - "context" - - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin/file/rrutil" - "github.com/coredns/coredns/plugin/file/tree" - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Result is the result of a Lookup -type Result int - -const ( - // Success is a successful lookup. - Success Result = iota - // NameError indicates a nameerror - NameError - // Delegation indicates the lookup resulted in a delegation. - Delegation - // NoData indicates the lookup resulted in a NODATA. - NoData - // ServerFailure indicates a server failure during the lookup. - ServerFailure -) - -// Lookup looks up qname and qtype in the zone. When do is true DNSSEC records are included. -// Three sets of records are returned, one for the answer, one for authority and one for the additional section. -func (z *Zone) Lookup(ctx context.Context, state request.Request, qname string) ([]dns.RR, []dns.RR, []dns.RR, Result) { - qtype := state.QType() - do := state.Do() - - // If z is a secondary zone we might not have transferred it, meaning we have - // all zone context setup, except the actual record. This means (for one thing) the apex - // is empty and we don't have a SOA record. - z.RLock() - ap := z.Apex - tr := z.Tree - z.RUnlock() - if ap.SOA == nil { - return nil, nil, nil, ServerFailure - } - - if qname == z.origin { - switch qtype { - case dns.TypeSOA: - return ap.soa(do), ap.ns(do), nil, Success - case dns.TypeNS: - nsrrs := ap.ns(do) - glue := tr.Glue(nsrrs, do) // technically this isn't glue - return nsrrs, nil, glue, Success - } - } - - var ( - found, shot bool - parts string - i int - elem, wildElem *tree.Elem - ) - - loop, _ := ctx.Value(dnsserver.LoopKey{}).(int) - if loop > 8 { - // We're back here for the 9th time; we have a loop and need to bail out. - // Note the answer we're returning will be incomplete (more cnames to be followed) or - // illegal (wildcard cname with multiple identical records). For now it's more important - // to protect ourselves then to give the client a valid answer. We return with an error - // to let the server handle what to do. - return nil, nil, nil, ServerFailure - } - - // Lookup: - // * Per label from the right, look if it exists. We do this to find potential - // delegation records. - // * If the per-label search finds nothing, we will look for the wildcard at the - // level. If found we keep it around. If we don't find the complete name we will - // use the wildcard. - // - // Main for-loop handles delegation and finding or not finding the qname. - // If found we check if it is a CNAME/DNAME and do CNAME processing - // We also check if we have type and do a nodata response. - // - // If not found, we check the potential wildcard, and use that for further processing. - // If not found and no wildcard we will process this as an NXDOMAIN response. - for { - parts, shot = z.nameFromRight(qname, i) - // We overshot the name, break and check if we previously found something. - if shot { - break - } - - elem, found = tr.Search(parts) - if !found { - // Apex will always be found, when we are here we can search for a wildcard - // and save the result of that search. So when nothing match, but we have a - // wildcard we should expand the wildcard. - - wildcard := replaceWithAsteriskLabel(parts) - if wild, found := tr.Search(wildcard); found { - wildElem = wild - } - - // Keep on searching, because maybe we hit an empty-non-terminal (which aren't - // stored in the tree. Only when we have match the full qname (and possible wildcard - // we can be confident that we didn't find anything. - i++ - continue - } - - // If we see DNAME records, we should return those. - if dnamerrs := elem.Type(dns.TypeDNAME); dnamerrs != nil { - // Only one DNAME is allowed per name. We just pick the first one to synthesize from. - dname := dnamerrs[0] - if cname := synthesizeCNAME(state.Name(), dname.(*dns.DNAME)); cname != nil { - var ( - answer, ns, extra []dns.RR - rcode Result - ) - - // We don't need to chase CNAME chain for synthesized CNAME - if qtype == dns.TypeCNAME { - answer = []dns.RR{cname} - ns = ap.ns(do) - extra = nil - rcode = Success - } else { - ctx = context.WithValue(ctx, dnsserver.LoopKey{}, loop+1) - answer, ns, extra, rcode = z.externalLookup(ctx, state, elem, []dns.RR{cname}) - } - - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, dns.TypeDNAME) - dnamerrs = append(dnamerrs, sigs...) - } - - // The relevant DNAME RR should be included in the answer section, - // if the DNAME is being employed as a substitution instruction. - answer = append(dnamerrs, answer...) - - return answer, ns, extra, rcode - } - // The domain name that owns a DNAME record is allowed to have other RR types - // at that domain name, except those have restrictions on what they can coexist - // with (e.g. another DNAME). So there is nothing special left here. - } - - // If we see NS records, it means the name as been delegated, and we should return the delegation. - if nsrrs := elem.Type(dns.TypeNS); nsrrs != nil { - // If the query is specifically for DS and the qname matches the delegated name, we should - // return the DS in the answer section and leave the rest empty, i.e. just continue the loop - // and continue searching. - if qtype == dns.TypeDS && elem.Name() == qname { - i++ - continue - } - - glue := tr.Glue(nsrrs, do) - if do { - dss := typeFromElem(elem, dns.TypeDS, do) - nsrrs = append(nsrrs, dss...) - } - - return nil, nsrrs, glue, Delegation - } - - i++ - } - - // What does found and !shot mean - do we ever hit it? - if found && !shot { - return nil, nil, nil, ServerFailure - } - - // Found entire name. - if found && shot { - if rrs := elem.Type(dns.TypeCNAME); len(rrs) > 0 && qtype != dns.TypeCNAME { - ctx = context.WithValue(ctx, dnsserver.LoopKey{}, loop+1) - return z.externalLookup(ctx, state, elem, rrs) - } - - rrs := elem.Type(qtype) - - // NODATA - if len(rrs) == 0 { - ret := ap.soa(do) - if do { - nsec := typeFromElem(elem, dns.TypeNSEC, do) - ret = append(ret, nsec...) - } - return nil, ret, nil, NoData - } - - // Additional section processing for MX, SRV. Check response and see if any of the names are in bailiwick - - // if so add IP addresses to the additional section. - additional := z.additionalProcessing(rrs, do) - - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, qtype) - rrs = append(rrs, sigs...) - } - - return rrs, ap.ns(do), additional, Success - } - - // Haven't found the original name. - - // Found wildcard. - if wildElem != nil { - // set metadata value for the wildcard record that synthesized the result - metadata.SetValueFunc(ctx, "zone/wildcard", func() string { - return wildElem.Name() - }) - - if rrs := wildElem.TypeForWildcard(dns.TypeCNAME, qname); len(rrs) > 0 && qtype != dns.TypeCNAME { - ctx = context.WithValue(ctx, dnsserver.LoopKey{}, loop+1) - return z.externalLookup(ctx, state, wildElem, rrs) - } - - rrs := wildElem.TypeForWildcard(qtype, qname) - - // NODATA response. - if len(rrs) == 0 { - ret := ap.soa(do) - if do { - nsec := typeFromElem(wildElem, dns.TypeNSEC, do) - ret = append(ret, nsec...) - } - return nil, ret, nil, NoData - } - - auth := ap.ns(do) - if do { - // An NSEC is needed to say no longer name exists under this wildcard. - if deny, found := tr.Prev(qname); found { - nsec := typeFromElem(deny, dns.TypeNSEC, do) - auth = append(auth, nsec...) - } - - sigs := wildElem.TypeForWildcard(dns.TypeRRSIG, qname) - sigs = rrutil.SubTypeSignature(sigs, qtype) - rrs = append(rrs, sigs...) - } - return rrs, auth, nil, Success - } - - rcode := NameError - - // Hacky way to get around empty-non-terminals. If a longer name does exist, but this qname, does not, it - // must be an empty-non-terminal. If so, we do the proper NXDOMAIN handling, but set the rcode to be success. - if x, found := tr.Next(qname); found { - if dns.IsSubDomain(qname, x.Name()) { - rcode = Success - } - } - - ret := ap.soa(do) - if do { - deny, found := tr.Prev(qname) - if !found { - goto Out - } - nsec := typeFromElem(deny, dns.TypeNSEC, do) - ret = append(ret, nsec...) - - if rcode != NameError { - goto Out - } - - ce, found := z.ClosestEncloser(qname) - - // wildcard denial only for NXDOMAIN - if found { - // wildcard denial - wildcard := "*." + ce.Name() - if ss, found := tr.Prev(wildcard); found { - // Only add this nsec if it is different than the one already added - if ss.Name() != deny.Name() { - nsec := typeFromElem(ss, dns.TypeNSEC, do) - ret = append(ret, nsec...) - } - } - } - } -Out: - return nil, ret, nil, rcode -} - -// typeFromElem returns the type tp from e and adds signatures (if they exist) and do is true. -func typeFromElem(elem *tree.Elem, tp uint16, do bool) []dns.RR { - rrs := elem.Type(tp) - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, tp) - rrs = append(rrs, sigs...) - } - return rrs -} - -func (a Apex) soa(do bool) []dns.RR { - if do { - ret := append([]dns.RR{a.SOA}, a.SIGSOA...) - return ret - } - return []dns.RR{a.SOA} -} - -func (a Apex) ns(do bool) []dns.RR { - if do { - ret := append(a.NS, a.SIGNS...) - return ret - } - return a.NS -} - -// externalLookup adds signatures and tries to resolve CNAMEs that point to external names. -func (z *Zone) externalLookup(ctx context.Context, state request.Request, elem *tree.Elem, rrs []dns.RR) ([]dns.RR, []dns.RR, []dns.RR, Result) { - qtype := state.QType() - do := state.Do() - - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, dns.TypeCNAME) - rrs = append(rrs, sigs...) - } - - targetName := rrs[0].(*dns.CNAME).Target - elem, _ = z.Search(targetName) - if elem == nil { - lookupRRs, result := z.doLookup(ctx, state, targetName, qtype) - rrs = append(rrs, lookupRRs...) - return rrs, z.ns(do), nil, result - } - - i := 0 - -Redo: - cname := elem.Type(dns.TypeCNAME) - if len(cname) > 0 { - rrs = append(rrs, cname...) - - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, dns.TypeCNAME) - rrs = append(rrs, sigs...) - } - targetName := cname[0].(*dns.CNAME).Target - elem, _ = z.Search(targetName) - if elem == nil { - lookupRRs, result := z.doLookup(ctx, state, targetName, qtype) - rrs = append(rrs, lookupRRs...) - return rrs, z.ns(do), nil, result - } - - i++ - if i > 8 { - return rrs, z.ns(do), nil, Success - } - - goto Redo - } - - targets := elem.Type(qtype) - if len(targets) > 0 { - rrs = append(rrs, targets...) - - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, qtype) - rrs = append(rrs, sigs...) - } - } - - return rrs, z.ns(do), nil, Success -} - -func (z *Zone) doLookup(ctx context.Context, state request.Request, target string, qtype uint16) ([]dns.RR, Result) { - m, e := z.Upstream.Lookup(ctx, state, target, qtype) - if e != nil { - return nil, ServerFailure - } - if m == nil { - return nil, Success - } - if m.Rcode == dns.RcodeNameError { - return m.Answer, NameError - } - if m.Rcode == dns.RcodeServerFailure { - return m.Answer, ServerFailure - } - if m.Rcode == dns.RcodeSuccess && len(m.Answer) == 0 { - return m.Answer, NoData - } - return m.Answer, Success -} - -// additionalProcessing checks the current answer section and retrieves A or AAAA records -// (and possible SIGs) to need to be put in the additional section. -func (z *Zone) additionalProcessing(answer []dns.RR, do bool) (extra []dns.RR) { - for _, rr := range answer { - name := "" - switch x := rr.(type) { - case *dns.SRV: - name = x.Target - case *dns.MX: - name = x.Mx - } - if len(name) == 0 || !dns.IsSubDomain(z.origin, name) { - continue - } - - elem, _ := z.Search(name) - if elem == nil { - continue - } - - sigs := elem.Type(dns.TypeRRSIG) - for _, addr := range []uint16{dns.TypeA, dns.TypeAAAA} { - if a := elem.Type(addr); a != nil { - extra = append(extra, a...) - if do { - sig := rrutil.SubTypeSignature(sigs, addr) - extra = append(extra, sig...) - } - } - } - } - - return extra -} diff --git a/plugin/file/lookup_test.go b/plugin/file/lookup_test.go deleted file mode 100644 index e9aaf6df2b..0000000000 --- a/plugin/file/lookup_test.go +++ /dev/null @@ -1,362 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -var dnsTestCases = []test.Case{ - { - Qname: "www.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("a.miek.nl. 1800 IN A 139.162.196.78"), - test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "www.miek.nl.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{ - test.AAAA("a.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeSOA, - Answer: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - Ns: miekAuth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{ - test.AAAA("miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - Ns: miekAuth, - }, - { - Qname: "mIeK.NL.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{ - test.AAAA("miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - Ns: miekAuth, - }, - { - Qname: "miek.nl.", Qtype: dns.TypeMX, - Answer: []dns.RR{ - test.MX("miek.nl. 1800 IN MX 1 aspmx.l.google.com."), - test.MX("miek.nl. 1800 IN MX 10 aspmx2.googlemail.com."), - test.MX("miek.nl. 1800 IN MX 10 aspmx3.googlemail.com."), - test.MX("miek.nl. 1800 IN MX 5 alt1.aspmx.l.google.com."), - test.MX("miek.nl. 1800 IN MX 5 alt2.aspmx.l.google.com."), - }, - Ns: miekAuth, - }, - { - Qname: "a.miek.nl.", Qtype: dns.TypeSRV, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "b.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "srv.miek.nl.", Qtype: dns.TypeSRV, - Answer: []dns.RR{ - test.SRV("srv.miek.nl. 1800 IN SRV 10 10 8080 a.miek.nl."), - }, - Extra: []dns.RR{ - test.A("a.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - Ns: miekAuth, - }, - { - Qname: "mx.miek.nl.", Qtype: dns.TypeMX, - Answer: []dns.RR{ - test.MX("mx.miek.nl. 1800 IN MX 10 a.miek.nl."), - }, - Extra: []dns.RR{ - test.A("a.miek.nl. 1800 IN A 139.162.196.78"), - test.AAAA("a.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735"), - }, - Ns: miekAuth, - }, - { - Qname: "asterisk.x.miek.nl.", Qtype: dns.TypeCNAME, - Answer: []dns.RR{ - test.CNAME("asterisk.x.miek.nl. 1800 IN CNAME www.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "a.b.x.miek.nl.", Qtype: dns.TypeCNAME, - Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400"), - }, - }, - { - Qname: "asterisk.y.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("asterisk.y.miek.nl. 1800 IN A 139.162.196.78"), - }, - Ns: miekAuth, - }, - { - Qname: "foo.dname.miek.nl.", Qtype: dns.TypeCNAME, - Answer: []dns.RR{ - test.DNAME("dname.miek.nl. 1800 IN DNAME x.miek.nl."), - test.CNAME("foo.dname.miek.nl. 1800 IN CNAME foo.x.miek.nl."), - }, - Ns: miekAuth, - }, - { - Qname: "ext-cname.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.CNAME("ext-cname.miek.nl. 1800 IN CNAME example.com."), - }, - Rcode: dns.RcodeServerFailure, - Ns: miekAuth, - }, - { - Qname: "txt.miek.nl.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`txt.miek.nl. 1800 IN TXT "v=spf1 a mx ~all"`), - }, - Ns: miekAuth, - }, - { - Qname: "caa.miek.nl.", Qtype: dns.TypeCAA, - Answer: []dns.RR{ - test.CAA(`caa.miek.nl. 1800 IN CAA 0 issue letsencrypt.org`), - }, - Ns: miekAuth, - }, -} - -const ( - testzone = "miek.nl." - testzone1 = "dnssex.nl." -) - -func TestLookup(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - for _, tc := range dnsTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -func TestLookupNil(t *testing.T) { - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: nil}, Names: []string{testzone}}} - ctx := context.TODO() - - m := dnsTestCases[0].Msg() - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - fm.ServeDNS(ctx, rec, m) -} - -func TestLookUpNoDataResult(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - var noDataTestCases = []test.Case{ - { - Qname: "a.miek.nl.", Qtype: dns.TypeMX, - }, - { - Qname: "wildcard.nodata.miek.nl.", Qtype: dns.TypeMX, - }, - } - - for _, tc := range noDataTestCases { - m := tc.Msg() - state := request.Request{W: &test.ResponseWriter{}, Req: m} - _, _, _, result := fm.Z[testzone].Lookup(ctx, state, tc.Qname) - if result != NoData { - t.Errorf("Expected result == 3 but result == %v ", result) - } - } -} - -func TestLookupFallthrough(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - type FallWithTestCases struct { - Fall fall.F - Cases []test.Case - } - var fallsWithTestCases = []FallWithTestCases{ - { - Fall: fall.Root, - Cases: []test.Case{ - { - Qname: "doesnotexist.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeServerFailure, - }, - { - Qname: "x.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeServerFailure, - }, - }, - }, - { - Fall: fall.F{Zones: []string{"a.miek.nl."}}, - Cases: []test.Case{ - { - Qname: "a.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - }, - { - Qname: "doesnotexist.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeNameError, - }, - { - Qname: "passthrough.a.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeServerFailure, - Answer: []dns.RR{}, - }, - }, - }, - { - Fall: fall.F{Zones: []string{"x.miek.nl."}}, - Cases: []test.Case{ - { - Qname: "x.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeServerFailure, - }, - { - Qname: "wildcard.x.miek.nl.", Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - }, - }, - }, - } - - for _, fallWithTestCases := range fallsWithTestCases { - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}, Fall: fallWithTestCases.Fall} - ctx := context.TODO() - - for _, tc := range fallWithTestCases.Cases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - if rec.Msg.Rcode != tc.Rcode { - t.Errorf("rcode is %q, expected %q", dns.RcodeToString[rec.Msg.Rcode], dns.RcodeToString[tc.Rcode]) - return - } - } - } -} - -func BenchmarkFileLookup(b *testing.B) { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - return - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - tc := test.Case{ - Qname: "www.miek.nl.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.CNAME("www.miek.nl. 1800 IN CNAME a.miek.nl."), - test.A("a.miek.nl. 1800 IN A 139.162.196.78"), - }, - } - - m := tc.Msg() - - for b.Loop() { - fm.ServeDNS(ctx, rec, m) - } -} - -const dbMiekNL = ` -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( - 1282630057 ; Serial - 4H ; Refresh - 1H ; Retry - 7D ; Expire - 4H ) ; Negative Cache TTL - IN NS linode.atoom.net. - IN NS ns-ext.nlnetlabs.nl. - IN NS omval.tednet.nl. - IN NS ext.ns.whyscream.net. - - IN MX 1 aspmx.l.google.com. - IN MX 5 alt1.aspmx.l.google.com. - IN MX 5 alt2.aspmx.l.google.com. - IN MX 10 aspmx2.googlemail.com. - IN MX 10 aspmx3.googlemail.com. - - IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 - -a IN A 139.162.196.78 - IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -www IN CNAME a -archive IN CNAME a -*.x IN CNAME www -b.x IN CNAME a -*.y IN A 139.162.196.78 -dname IN DNAME x - -srv IN SRV 10 10 8080 a.miek.nl. -mx IN MX 10 a.miek.nl. - -txt IN TXT "v=spf1 a mx ~all" -caa IN CAA 0 issue letsencrypt.org -*.nodata IN A 139.162.196.79 -ext-cname IN CNAME example.com.` diff --git a/plugin/file/notify.go b/plugin/file/notify.go deleted file mode 100644 index 7d4e35cc35..0000000000 --- a/plugin/file/notify.go +++ /dev/null @@ -1,33 +0,0 @@ -package file - -import ( - "net" - - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// isNotify checks if state is a notify message and if so, will *also* check if it -// is from one of the configured masters. If not it will not be a valid notify -// message. If the zone z is not a secondary zone the message will also be ignored. -func (z *Zone) isNotify(state request.Request) bool { - if state.Req.Opcode != dns.OpcodeNotify { - return false - } - if len(z.TransferFrom) == 0 { - return false - } - // If remote IP matches we accept. - remote := state.IP() - for _, f := range z.TransferFrom { - from, _, err := net.SplitHostPort(f) - if err != nil { - continue - } - if from == remote { - return true - } - } - return false -} diff --git a/plugin/file/nsec3_test.go b/plugin/file/nsec3_test.go deleted file mode 100644 index ed9f74f25c..0000000000 --- a/plugin/file/nsec3_test.go +++ /dev/null @@ -1,28 +0,0 @@ -package file - -import ( - "strings" - "testing" -) - -func TestParseNSEC3PARAM(t *testing.T) { - _, err := Parse(strings.NewReader(nsec3paramTest), "miek.nl", "stdin", 0) - if err == nil { - t.Fatalf("Expected error when reading zone, got nothing") - } -} - -func TestParseNSEC3(t *testing.T) { - _, err := Parse(strings.NewReader(nsec3Test), "miek.nl", "stdin", 0) - if err == nil { - t.Fatalf("Expected error when reading zone, got nothing") - } -} - -const nsec3paramTest = `miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1460175181 14400 3600 604800 14400 -miek.nl. 1800 IN NS omval.tednet.nl. -miek.nl. 0 IN NSEC3PARAM 1 0 5 A3DEBC9CC4F695C7` - -const nsec3Test = `example.org. 1800 IN SOA sns.dns.icann.org. noc.dns.icann.org. 2016082508 7200 3600 1209600 3600 -aub8v9ce95ie18spjubsr058h41n7pa5.example.org. 284 IN NSEC3 1 1 5 D0CBEAAF0AC77314 AUB95P93VPKP55G6U5S4SGS7LS61ND85 NS SOA TXT RRSIG DNSKEY NSEC3PARAM -aub8v9ce95ie18spjubsr058h41n7pa5.example.org. 284 IN RRSIG NSEC3 8 2 600 20160910232502 20160827231002 14028 example.org. XBNpA7KAIjorPbXvTinOHrc1f630aHic2U716GHLHA4QMx9cl9ss4QjR Wj2UpDM9zBW/jNYb1xb0yjQoez/Jv200w0taSWjRci5aUnRpOi9bmcrz STHb6wIUjUsbJ+NstQsUwVkj6679UviF1FqNwr4GlJnWG3ZrhYhE+NI6 s0k=` diff --git a/plugin/file/reload.go b/plugin/file/reload.go deleted file mode 100644 index 4db8e11d24..0000000000 --- a/plugin/file/reload.go +++ /dev/null @@ -1,69 +0,0 @@ -package file - -import ( - "os" - "path/filepath" - "time" - - "github.com/coredns/coredns/plugin/transfer" -) - -// Reload reloads a zone when it is changed on disk. If z.ReloadInterval is zero, no reloading will be done. -func (z *Zone) Reload(t *transfer.Transfer) error { - if z.ReloadInterval == 0 { - return nil - } - tick := time.NewTicker(z.ReloadInterval) - - go func() { - for { - select { - case <-tick.C: - zFile := z.File() - reader, err := os.Open(filepath.Clean(zFile)) - if err != nil { - log.Errorf("Failed to open zone %q in %q: %v", z.origin, zFile, err) - continue - } - - serial := z.SOASerialIfDefined() - zone, err := Parse(reader, z.origin, zFile, serial) - reader.Close() - if err != nil { - if _, ok := err.(*serialErr); !ok { - log.Errorf("Parsing zone %q: %v", z.origin, err) - } - continue - } - - // copy elements we need - z.Lock() - z.Apex = zone.Apex - z.Tree = zone.Tree - z.Unlock() - - log.Infof("Successfully reloaded zone %q in %q with %d SOA serial", z.origin, zFile, z.SOA.Serial) - if t != nil { - if err := t.Notify(z.origin); err != nil { - log.Warningf("Failed sending notifies: %s", err) - } - } - - case <-z.reloadShutdown: - tick.Stop() - return - } - } - }() - return nil -} - -// SOASerialIfDefined returns the SOA's serial if the zone has a SOA record in the Apex, or -1 otherwise. -func (z *Zone) SOASerialIfDefined() int64 { - z.RLock() - defer z.RUnlock() - if z.SOA != nil { - return int64(z.SOA.Serial) - } - return -1 -} diff --git a/plugin/file/reload_test.go b/plugin/file/reload_test.go deleted file mode 100644 index c404bc4439..0000000000 --- a/plugin/file/reload_test.go +++ /dev/null @@ -1,90 +0,0 @@ -package file - -import ( - "context" - "os" - "strings" - "testing" - "time" - - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/plugin/transfer" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestZoneReload(t *testing.T) { - fileName, rm, err := test.TempFile(".", reloadZoneTest) - if err != nil { - t.Fatalf("Failed to create zone: %s", err) - } - defer rm() - reader, err := os.Open(fileName) - if err != nil { - t.Fatalf("Failed to open zone: %s", err) - } - z, err := Parse(reader, "miek.nl", fileName, 0) - if err != nil { - t.Fatalf("Failed to parse zone: %s", err) - } - - z.ReloadInterval = 10 * time.Millisecond - z.Reload(&transfer.Transfer{}) - time.Sleep(20 * time.Millisecond) - - ctx := context.TODO() - r := new(dns.Msg) - r.SetQuestion("miek.nl", dns.TypeSOA) - state := request.Request{W: &test.ResponseWriter{}, Req: r} - if _, _, _, res := z.Lookup(ctx, state, "miek.nl."); res != Success { - t.Fatalf("Failed to lookup, got %d", res) - } - - r = new(dns.Msg) - r.SetQuestion("miek.nl", dns.TypeNS) - state = request.Request{W: &test.ResponseWriter{}, Req: r} - if _, _, _, res := z.Lookup(ctx, state, "miek.nl."); res != Success { - t.Fatalf("Failed to lookup, got %d", res) - } - - rrs, err := z.ApexIfDefined() // all apex records. - if err != nil { - t.Fatal(err) - } - if len(rrs) != 5 { - t.Fatalf("Expected 5 RRs, got %d", len(rrs)) - } - if err := os.WriteFile(fileName, []byte(reloadZone2Test), 0644); err != nil { - t.Fatalf("Failed to write new zone data: %s", err) - } - // Could still be racy, but we need to wait a bit for the event to be seen - time.Sleep(30 * time.Millisecond) - - rrs, err = z.ApexIfDefined() - if err != nil { - t.Fatal(err) - } - if len(rrs) != 3 { - t.Fatalf("Expected 3 RRs, got %d", len(rrs)) - } -} - -func TestZoneReloadSOAChange(t *testing.T) { - _, err := Parse(strings.NewReader(reloadZoneTest), "miek.nl.", "stdin", 1460175181) - if err == nil { - t.Fatalf("Zone should not have been re-parsed") - } -} - -const reloadZoneTest = `miek.nl. 1627 IN SOA linode.atoom.net. miek.miek.nl. 1460175181 14400 3600 604800 14400 -miek.nl. 1627 IN NS ext.ns.whyscream.net. -miek.nl. 1627 IN NS omval.tednet.nl. -miek.nl. 1627 IN NS linode.atoom.net. -miek.nl. 1627 IN NS ns-ext.nlnetlabs.nl. -` - -const reloadZone2Test = `miek.nl. 1627 IN SOA linode.atoom.net. miek.miek.nl. 1460175182 14400 3600 604800 14400 -miek.nl. 1627 IN NS ext.ns.whyscream.net. -miek.nl. 1627 IN NS omval.tednet.nl. -` diff --git a/plugin/file/rrutil/util.go b/plugin/file/rrutil/util.go deleted file mode 100644 index 564b82cd15..0000000000 --- a/plugin/file/rrutil/util.go +++ /dev/null @@ -1,18 +0,0 @@ -// Package rrutil provides function to find certain RRs in slices. -package rrutil - -import "github.com/miekg/dns" - -// SubTypeSignature returns the RRSIG for the subtype. -func SubTypeSignature(rrs []dns.RR, subtype uint16) []dns.RR { - sigs := []dns.RR{} - // there may be multiple keys that have signed this subtype - for _, sig := range rrs { - if s, ok := sig.(*dns.RRSIG); ok { - if s.TypeCovered == subtype { - sigs = append(sigs, s) - } - } - } - return sigs -} diff --git a/plugin/file/secondary.go b/plugin/file/secondary.go deleted file mode 100644 index 9898c697f2..0000000000 --- a/plugin/file/secondary.go +++ /dev/null @@ -1,198 +0,0 @@ -package file - -import ( - "math/rand" - "time" - - "github.com/miekg/dns" -) - -// TransferIn retrieves the zone from the masters, parses it and sets it live. -func (z *Zone) TransferIn() error { - if len(z.TransferFrom) == 0 { - return nil - } - m := new(dns.Msg) - m.SetAxfr(z.origin) - - z1 := z.CopyWithoutApex() - var ( - Err error - tr string - ) - -Transfer: - for _, tr = range z.TransferFrom { - t := new(dns.Transfer) - c, err := t.In(m, tr) - if err != nil { - log.Errorf("Failed to setup transfer `%s' with `%q': %v", z.origin, tr, err) - Err = err - continue Transfer - } - for env := range c { - if env.Error != nil { - log.Errorf("Failed to transfer `%s' from %q: %v", z.origin, tr, env.Error) - Err = env.Error - continue Transfer - } - for _, rr := range env.RR { - if err := z1.Insert(rr); err != nil { - log.Errorf("Failed to parse transfer `%s' from: %q: %v", z.origin, tr, err) - Err = err - continue Transfer - } - } - } - Err = nil - break - } - if Err != nil { - return Err - } - - z.Lock() - z.Tree = z1.Tree - z.Apex = z1.Apex - z.Expired = false - z.Unlock() - log.Infof("Transferred: %s from %s", z.origin, tr) - return nil -} - -// shouldTransfer checks the primaries of zone, retrieves the SOA record, checks the current serial -// and the remote serial and will return true if the remote one is higher than the locally configured one. -func (z *Zone) shouldTransfer() (bool, error) { - c := new(dns.Client) - c.Net = "tcp" // do this query over TCP to minimize spoofing - m := new(dns.Msg) - m.SetQuestion(z.origin, dns.TypeSOA) - - var Err error - serial := -1 - -Transfer: - for _, tr := range z.TransferFrom { - Err = nil - ret, _, err := c.Exchange(m, tr) - if err != nil || ret.Rcode != dns.RcodeSuccess { - Err = err - continue - } - for _, a := range ret.Answer { - if a.Header().Rrtype == dns.TypeSOA { - serial = int(a.(*dns.SOA).Serial) - break Transfer - } - } - } - if serial == -1 { - return false, Err - } - if z.SOA == nil { - return true, Err - } - return less(z.SOA.Serial, uint32(serial)), Err -} - -// less returns true of a is smaller than b when taking RFC 1982 serial arithmetic into account. -func less(a, b uint32) bool { - if a < b { - return (b - a) <= MaxSerialIncrement - } - return (a - b) > MaxSerialIncrement -} - -// Update updates the secondary zone according to its SOA. It will run for the life time of the server -// and uses the SOA parameters. Every refresh it will check for a new SOA number. If that fails (for all -// server) it will retry every retry interval. If the zone failed to transfer before the expire, the zone -// will be marked expired. -func (z *Zone) Update() error { - // If we don't have a SOA, we don't have a zone, wait for it to appear. - for z.SOA == nil { - time.Sleep(1 * time.Second) - } - retryActive := false - -Restart: - refresh := time.Second * time.Duration(z.SOA.Refresh) - retry := time.Second * time.Duration(z.SOA.Retry) - expire := time.Second * time.Duration(z.SOA.Expire) - - refreshTicker := time.NewTicker(refresh) - retryTicker := time.NewTicker(retry) - expireTicker := time.NewTicker(expire) - - for { - select { - case <-expireTicker.C: - if !retryActive { - break - } - z.Expired = true - - case <-retryTicker.C: - if !retryActive { - break - } - - time.Sleep(jitter(2000)) // 2s randomize - - ok, err := z.shouldTransfer() - if err != nil { - log.Warningf("Failed retry check %s", err) - continue - } - - if ok { - if err := z.TransferIn(); err != nil { - // transfer failed, leave retryActive true - break - } - } - - // no errors, stop timers and restart - retryActive = false - refreshTicker.Stop() - retryTicker.Stop() - expireTicker.Stop() - goto Restart - - case <-refreshTicker.C: - - time.Sleep(jitter(5000)) // 5s randomize - - ok, err := z.shouldTransfer() - if err != nil { - log.Warningf("Failed refresh check %s", err) - retryActive = true - continue - } - - if ok { - if err := z.TransferIn(); err != nil { - // transfer failed - retryActive = true - break - } - } - - // no errors, stop timers and restart - retryActive = false - refreshTicker.Stop() - retryTicker.Stop() - expireTicker.Stop() - goto Restart - } - } -} - -// jitter returns a random duration between [0,n) * time.Millisecond -func jitter(n int) time.Duration { - r := rand.Intn(n) - return time.Duration(r) * time.Millisecond -} - -// MaxSerialIncrement is the maximum difference between two serial numbers. If the difference between -// two serials is greater than this number, the smaller one is considered greater. -const MaxSerialIncrement uint32 = 2147483647 diff --git a/plugin/file/secondary_test.go b/plugin/file/secondary_test.go deleted file mode 100644 index 3e36c4b4e8..0000000000 --- a/plugin/file/secondary_test.go +++ /dev/null @@ -1,146 +0,0 @@ -package file - -import ( - "fmt" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestLess(t *testing.T) { - const ( - min = 0 - max = 4294967295 - low = 12345 - high = 4000000000 - ) - - if less(min, max) { - t.Fatalf("Less: should be false") - } - if !less(max, min) { - t.Fatalf("Less: should be true") - } - if !less(high, low) { - t.Fatalf("Less: should be true") - } - if !less(7, 9) { - t.Fatalf("Less; should be true") - } -} - -type soa struct { - serial uint32 -} - -func (s *soa) Handler(w dns.ResponseWriter, req *dns.Msg) { - m := new(dns.Msg) - m.SetReply(req) - switch req.Question[0].Qtype { - case dns.TypeSOA: - m.Answer = make([]dns.RR, 1) - m.Answer[0] = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, s.serial)) - w.WriteMsg(m) - case dns.TypeAXFR: - m.Answer = make([]dns.RR, 4) - m.Answer[0] = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, s.serial)) - m.Answer[1] = test.A(fmt.Sprintf("%s IN A 127.0.0.1", testZone)) - m.Answer[2] = test.A(fmt.Sprintf("%s IN A 127.0.0.1", testZone)) - m.Answer[3] = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, s.serial)) - w.WriteMsg(m) - } -} - -func (s *soa) TransferHandler(w dns.ResponseWriter, req *dns.Msg) { - m := new(dns.Msg) - m.SetReply(req) - m.Answer = make([]dns.RR, 1) - m.Answer[0] = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, s.serial)) - w.WriteMsg(m) -} - -const testZone = "secondary.miek.nl." - -func TestShouldTransfer(t *testing.T) { - soa := soa{250} - - s := dnstest.NewServer(soa.Handler) - defer s.Close() - - z := NewZone("testzone", "test") - z.origin = testZone - z.TransferFrom = []string{s.Addr} - - // when we have a nil SOA (initial state) - should, err := z.shouldTransfer() - if err != nil { - t.Fatalf("Unable to run shouldTransfer: %v", err) - } - if !should { - t.Fatalf("ShouldTransfer should return true for serial: %d", soa.serial) - } - // Serial smaller - z.SOA = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, soa.serial-1)) - should, err = z.shouldTransfer() - if err != nil { - t.Fatalf("Unable to run shouldTransfer: %v", err) - } - if !should { - t.Fatalf("ShouldTransfer should return true for serial: %q", soa.serial-1) - } - // Serial equal - z.SOA = test.SOA(fmt.Sprintf("%s IN SOA bla. bla. %d 0 0 0 0 ", testZone, soa.serial)) - should, err = z.shouldTransfer() - if err != nil { - t.Fatalf("Unable to run shouldTransfer: %v", err) - } - if should { - t.Fatalf("ShouldTransfer should return false for serial: %d", soa.serial) - } -} - -func TestTransferIn(t *testing.T) { - soa := soa{250} - - s := dnstest.NewServer(soa.Handler) - defer s.Close() - - z := new(Zone) - z.origin = testZone - z.TransferFrom = []string{s.Addr} - - if err := z.TransferIn(); err != nil { - t.Fatalf("Unable to run TransferIn: %v", err) - } - if z.SOA.String() != fmt.Sprintf("%s 3600 IN SOA bla. bla. 250 0 0 0 0", testZone) { - t.Fatalf("Unknown SOA transferred") - } -} - -func TestIsNotify(t *testing.T) { - z := new(Zone) - z.origin = testZone - state := newRequest(testZone, dns.TypeSOA) - // need to set opcode - state.Req.Opcode = dns.OpcodeNotify - - z.TransferFrom = []string{"10.240.0.1:53"} // IP from testing/responseWriter - if !z.isNotify(state) { - t.Fatal("Should have been valid notify") - } - z.TransferFrom = []string{"10.240.0.2:53"} - if z.isNotify(state) { - t.Fatal("Should have been invalid notify") - } -} - -func newRequest(zone string, qtype uint16) request.Request { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - m.SetEdns0(4097, true) - return request.Request{W: &test.ResponseWriter{}, Req: m} -} diff --git a/plugin/file/setup.go b/plugin/file/setup.go deleted file mode 100644 index eabfcc8556..0000000000 --- a/plugin/file/setup.go +++ /dev/null @@ -1,157 +0,0 @@ -package file - -import ( - "errors" - "os" - "path/filepath" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/plugin/transfer" -) - -func init() { plugin.Register("file", setup) } - -func setup(c *caddy.Controller) error { - zones, fall, err := fileParse(c) - if err != nil { - return plugin.Error("file", err) - } - - f := File{Zones: zones, Fall: fall} - // get the transfer plugin, so we can send notifies and send notifies on startup as well. - c.OnStartup(func() error { - t := dnsserver.GetConfig(c).Handler("transfer") - if t == nil { - return nil - } - f.transfer = t.(*transfer.Transfer) // if found this must be OK. - go func() { - for _, n := range zones.Names { - f.transfer.Notify(n) - } - }() - return nil - }) - - c.OnRestartFailed(func() error { - t := dnsserver.GetConfig(c).Handler("transfer") - if t == nil { - return nil - } - go func() { - for _, n := range zones.Names { - f.transfer.Notify(n) - } - }() - return nil - }) - - for _, n := range zones.Names { - z := zones.Z[n] - c.OnShutdown(z.OnShutdown) - c.OnStartup(func() error { - z.StartupOnce.Do(func() { z.Reload(f.transfer) }) - return nil - }) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - f.Next = next - return f - }) - - return nil -} - -func fileParse(c *caddy.Controller) (Zones, fall.F, error) { - z := make(map[string]*Zone) - names := []string{} - fall := fall.F{} - - config := dnsserver.GetConfig(c) - - var openErr error - reload := 1 * time.Minute - - for c.Next() { - // file db.file [zones...] - if !c.NextArg() { - return Zones{}, fall, c.ArgErr() - } - fileName := c.Val() - - origins := plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - if !filepath.IsAbs(fileName) && config.Root != "" { - fileName = filepath.Join(config.Root, fileName) - } - - reader, err := os.Open(filepath.Clean(fileName)) - if err != nil { - openErr = err - } - - err = func() error { - defer reader.Close() - - for i := range origins { - z[origins[i]] = NewZone(origins[i], fileName) - if openErr == nil { - reader.Seek(0, 0) - zone, err := Parse(reader, origins[i], fileName, 0) - if err != nil { - return err - } - z[origins[i]] = zone - } - names = append(names, origins[i]) - } - return nil - }() - - if err != nil { - return Zones{}, fall, err - } - - for c.NextBlock() { - switch c.Val() { - case "fallthrough": - fall.SetZonesFromArgs(c.RemainingArgs()) - case "reload": - t := c.RemainingArgs() - if len(t) < 1 { - return Zones{}, fall, errors.New("reload duration value is expected") - } - d, err := time.ParseDuration(t[0]) - if err != nil { - return Zones{}, fall, plugin.Error("file", err) - } - reload = d - case "upstream": - // remove soon - c.RemainingArgs() - - default: - return Zones{}, fall, c.Errf("unknown property '%s'", c.Val()) - } - } - - for i := range origins { - z[origins[i]].ReloadInterval = reload - z[origins[i]].Upstream = upstream.New() - } - } - - if openErr != nil { - if reload == 0 { - // reload hasn't been set make this a fatal error - return Zones{}, fall, plugin.Error("file", openErr) - } - log.Warningf("Failed to open %q: trying again in %s", openErr, reload) - } - return Zones{Z: z, Names: names}, fall, nil -} diff --git a/plugin/file/setup_test.go b/plugin/file/setup_test.go deleted file mode 100644 index d7c1c58871..0000000000 --- a/plugin/file/setup_test.go +++ /dev/null @@ -1,152 +0,0 @@ -package file - -import ( - "testing" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" -) - -func TestFileParse(t *testing.T) { - zoneFileName1, rm, err := test.TempFile(".", dbMiekNL) - if err != nil { - t.Fatal(err) - } - defer rm() - - zoneFileName2, rm, err := test.TempFile(".", dbDnssexNLSigned) - if err != nil { - t.Fatal(err) - } - defer rm() - - tests := []struct { - inputFileRules string - shouldErr bool - expectedZones Zones - expectedFallthrough fall.F - }{ - { - `file ` + zoneFileName1 + ` miek.nl.`, - false, - Zones{Names: []string{"miek.nl."}}, - fall.Zero, - }, - { - `file ` + zoneFileName2 + ` dnssex.nl.`, - false, - Zones{Names: []string{"dnssex.nl."}}, - fall.Zero, - }, - { - `file ` + zoneFileName2 + ` 10.0.0.0/8`, - false, - Zones{Names: []string{"10.in-addr.arpa."}}, - fall.Zero, - }, - { - `file ` + zoneFileName2 + ` example.org. { - fallthrough - }`, - false, - Zones{Names: []string{"example.org."}}, - fall.Root, - }, - { - `file ` + zoneFileName2 + ` example.org. { - fallthrough www.example.org - }`, - false, - Zones{Names: []string{"example.org."}}, - fall.F{Zones: []string{"www.example.org."}}, - }, - // errors. - { - `file ` + zoneFileName1 + ` miek.nl { - transfer from 127.0.0.1 - }`, - true, - Zones{}, - fall.Zero, - }, - { - `file`, - true, - Zones{}, - fall.Zero, - }, - { - `file ` + zoneFileName1 + ` example.net. { - no_reload - }`, - true, - Zones{}, - fall.Zero, - }, - { - `file ` + zoneFileName1 + ` example.net. { - no_rebloat - }`, - true, - Zones{}, - fall.Zero, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - actualZones, actualFallthrough, err := fileParse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } else { - if len(actualZones.Names) != len(test.expectedZones.Names) { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedZones.Names, actualZones.Names) - } - for j, name := range test.expectedZones.Names { - if actualZones.Names[j] != name { - t.Fatalf("Test %d expected %v for %d th zone, got %v", i, name, j, actualZones.Names[j]) - } - } - if !actualFallthrough.Equal(test.expectedFallthrough) { - t.Errorf("Test %d expected fallthrough of %v, got %v", i, test.expectedFallthrough, actualFallthrough) - } - } - } -} - -func TestParseReload(t *testing.T) { - name, rm, err := test.TempFile(".", dbMiekNL) - if err != nil { - t.Fatal(err) - } - defer rm() - - tests := []struct { - input string - reload time.Duration - }{ - { - `file ` + name + ` example.org.`, - 1 * time.Minute, - }, - { - `file ` + name + ` example.org. { - reload 5s - }`, - 5 * time.Second, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - z, _, _ := fileParse(c) - if x := z.Z["example.org."].ReloadInterval; x != test.reload { - t.Errorf("Test %d expected reload to be %s, but got %s", i, test.reload, x) - } - } -} diff --git a/plugin/file/shutdown.go b/plugin/file/shutdown.go deleted file mode 100644 index 9aa5989483..0000000000 --- a/plugin/file/shutdown.go +++ /dev/null @@ -1,9 +0,0 @@ -package file - -// OnShutdown shuts down any running go-routines for this zone. -func (z *Zone) OnShutdown() error { - if 0 < z.ReloadInterval { - z.reloadShutdown <- true - } - return nil -} diff --git a/plugin/file/tree/all.go b/plugin/file/tree/all.go deleted file mode 100644 index e1fc5b392c..0000000000 --- a/plugin/file/tree/all.go +++ /dev/null @@ -1,21 +0,0 @@ -package tree - -// All traverses tree and returns all elements. -func (t *Tree) All() []*Elem { - if t.Root == nil { - return nil - } - found := t.Root.all(nil) - return found -} - -func (n *Node) all(found []*Elem) []*Elem { - if n.Left != nil { - found = n.Left.all(found) - } - found = append(found, n.Elem) - if n.Right != nil { - found = n.Right.all(found) - } - return found -} diff --git a/plugin/file/tree/auth_walk.go b/plugin/file/tree/auth_walk.go deleted file mode 100644 index 1f436716fd..0000000000 --- a/plugin/file/tree/auth_walk.go +++ /dev/null @@ -1,58 +0,0 @@ -package tree - -import ( - "github.com/miekg/dns" -) - -// AuthWalk performs fn on all authoritative values stored in the tree in -// pre-order depth first. If a non-nil error is returned the AuthWalk was interrupted -// by an fn returning that error. If fn alters stored values' sort -// relationships, future tree operation behaviors are undefined. -// -// The fn function will be called with 3 arguments, the current element, a map containing all -// the RRs for this element and a boolean if this name is considered authoritative. -func (t *Tree) AuthWalk(fn func(*Elem, map[uint16][]dns.RR, bool) error) error { - if t.Root == nil { - return nil - } - return t.Root.authwalk(make(map[string]struct{}), fn) -} - -func (n *Node) authwalk(ns map[string]struct{}, fn func(*Elem, map[uint16][]dns.RR, bool) error) error { - if n.Left != nil { - if err := n.Left.authwalk(ns, fn); err != nil { - return err - } - } - - // Check if the current name is a subdomain of *any* of the delegated names we've seen, if so, skip this name. - // The ordering of the tree and how we walk if guarantees we see parents first. - if n.Elem.Type(dns.TypeNS) != nil { - ns[n.Elem.Name()] = struct{}{} - } - - auth := true - i := 0 - for { - j, end := dns.NextLabel(n.Elem.Name(), i) - if end { - break - } - if _, ok := ns[n.Elem.Name()[j:]]; ok { - auth = false - break - } - i++ - } - - if err := fn(n.Elem, n.Elem.m, auth); err != nil { - return err - } - - if n.Right != nil { - if err := n.Right.authwalk(ns, fn); err != nil { - return err - } - } - return nil -} diff --git a/plugin/file/tree/elem.go b/plugin/file/tree/elem.go deleted file mode 100644 index 195e35a3e6..0000000000 --- a/plugin/file/tree/elem.go +++ /dev/null @@ -1,103 +0,0 @@ -package tree - -import "github.com/miekg/dns" - -// Elem is an element in the tree. -type Elem struct { - m map[uint16][]dns.RR - name string // owner name -} - -// newElem returns a new elem. -func newElem(rr dns.RR) *Elem { - e := Elem{m: make(map[uint16][]dns.RR)} - e.m[rr.Header().Rrtype] = []dns.RR{rr} - // Eagerly set the cached owner name to avoid racy lazy writes later. - e.name = rr.Header().Name - return &e -} - -// Types returns the types of the records in e. The returned list is not sorted. -func (e *Elem) Types() []uint16 { - t := make([]uint16, len(e.m)) - i := 0 - for ty := range e.m { - t[i] = ty - i++ - } - return t -} - -// Type returns the RRs with type qtype from e. -func (e *Elem) Type(qtype uint16) []dns.RR { return e.m[qtype] } - -// TypeForWildcard returns the RRs with type qtype from e. The ownername returned is set to qname. -func (e *Elem) TypeForWildcard(qtype uint16, qname string) []dns.RR { - rrs := e.m[qtype] - - if rrs == nil { - return nil - } - - copied := make([]dns.RR, len(rrs)) - for i := range rrs { - copied[i] = dns.Copy(rrs[i]) - copied[i].Header().Name = qname - } - return copied -} - -// All returns all RRs from e, regardless of type. -func (e *Elem) All() []dns.RR { - list := []dns.RR{} - for _, rrs := range e.m { - list = append(list, rrs...) - } - return list -} - -// Name returns the name for this node. -func (e *Elem) Name() string { - // Read-only: name is eagerly set in newElem and should not be mutated here. - if e.name != "" { - return e.name - } - for _, rrs := range e.m { - return rrs[0].Header().Name - } - return "" -} - -// Empty returns true is e does not contain any RRs, i.e. is an empty-non-terminal. -func (e *Elem) Empty() bool { return len(e.m) == 0 } - -// Insert inserts rr into e. If rr is equal to existing RRs, the RR will be added anyway. -func (e *Elem) Insert(rr dns.RR) { - t := rr.Header().Rrtype - if e.m == nil { - e.m = make(map[uint16][]dns.RR) - e.m[t] = []dns.RR{rr} - return - } - rrs, ok := e.m[t] - if !ok { - e.m[t] = []dns.RR{rr} - return - } - - rrs = append(rrs, rr) - e.m[t] = rrs -} - -// Delete removes all RRs of type rr.Header().Rrtype from e. -func (e *Elem) Delete(rr dns.RR) { - if e.m == nil { - return - } - - t := rr.Header().Rrtype - delete(e.m, t) -} - -// Less is a tree helper function that calls less. -func Less(a *Elem, name string) int { return less(name, a.Name()) } diff --git a/plugin/file/tree/elem_test.go b/plugin/file/tree/elem_test.go deleted file mode 100644 index d1956f5d0b..0000000000 --- a/plugin/file/tree/elem_test.go +++ /dev/null @@ -1,41 +0,0 @@ -package tree - -import ( - "testing" - - "github.com/miekg/dns" -) - -// Test that Name() falls back to reading from the stored RRs when the cached name is empty. -func TestElemName_FallbackWhenCachedEmpty(t *testing.T) { - rr, err := dns.NewRR("a.example. 3600 IN A 1.2.3.4") - if err != nil { - t.Fatalf("failed to create RR: %v", err) - } - - // Build via newElem to ensure m is populated - e := newElem(rr) - got := e.Name() - want := "a.example." - if got != want { - t.Fatalf("unexpected name; want %q, got %q", want, got) - } - - // clear the cached name - e.name = "" - - got = e.Name() - want = "a.example." - if got != want { - t.Fatalf("unexpected name; want %q, got %q", want, got) - } - - // clear the map - e.m = make(map[uint16][]dns.RR, 0) - - got = e.Name() - want = "" - if got != want { - t.Fatalf("unexpected name after clearing RR map; want %q, got %q", want, got) - } -} diff --git a/plugin/file/tree/glue.go b/plugin/file/tree/glue.go deleted file mode 100644 index 937ae54820..0000000000 --- a/plugin/file/tree/glue.go +++ /dev/null @@ -1,44 +0,0 @@ -package tree - -import ( - "github.com/coredns/coredns/plugin/file/rrutil" - - "github.com/miekg/dns" -) - -// Glue returns any potential glue records for nsrrs. -func (t *Tree) Glue(nsrrs []dns.RR, do bool) []dns.RR { - glue := []dns.RR{} - for _, rr := range nsrrs { - if ns, ok := rr.(*dns.NS); ok && dns.IsSubDomain(ns.Header().Name, ns.Ns) { - glue = append(glue, t.searchGlue(ns.Ns, do)...) - } - } - return glue -} - -// searchGlue looks up A and AAAA for name. -func (t *Tree) searchGlue(name string, do bool) []dns.RR { - glue := []dns.RR{} - - // A - if elem, found := t.Search(name); found { - glue = append(glue, elem.Type(dns.TypeA)...) - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, dns.TypeA) - glue = append(glue, sigs...) - } - } - - // AAAA - if elem, found := t.Search(name); found { - glue = append(glue, elem.Type(dns.TypeAAAA)...) - if do { - sigs := elem.Type(dns.TypeRRSIG) - sigs = rrutil.SubTypeSignature(sigs, dns.TypeAAAA) - glue = append(glue, sigs...) - } - } - return glue -} diff --git a/plugin/file/tree/less.go b/plugin/file/tree/less.go deleted file mode 100644 index 7793009018..0000000000 --- a/plugin/file/tree/less.go +++ /dev/null @@ -1,60 +0,0 @@ -package tree - -import ( - "bytes" - "strings" - - "github.com/miekg/dns" -) - -// less returns <0 when a is less than b, 0 when they are equal and -// >0 when a is larger than b. -// The function orders names in DNSSEC canonical order: RFC 4034s section-6.1 -// -// See https://bert-hubert.blogspot.co.uk/2015/10/how-to-do-fast-canonical-ordering-of.html -// for a blog article on this implementation, although here we still go label by label. -// -// The values of a and b are *not* lowercased before the comparison! -func less(a, b string) int { - i := 1 - aj := len(a) - bj := len(b) - for { - ai, oka := dns.PrevLabel(a, i) - bi, okb := dns.PrevLabel(b, i) - if oka && okb { - return 0 - } - - // sadly this []byte will allocate... TODO(miek): check if this is needed - // for a name, otherwise compare the strings. - ab := []byte(strings.ToLower(a[ai:aj])) - bb := []byte(strings.ToLower(b[bi:bj])) - doDDD(ab) - doDDD(bb) - - res := bytes.Compare(ab, bb) - if res != 0 { - return res - } - - i++ - aj, bj = ai, bi - } -} - -func doDDD(b []byte) { - lb := len(b) - for i := 0; i < lb; i++ { - if i+3 < lb && b[i] == '\\' && isDigit(b[i+1]) && isDigit(b[i+2]) && isDigit(b[i+3]) { - b[i] = dddToByte(b[i:]) - for j := i + 1; j < lb-3; j++ { - b[j] = b[j+3] - } - lb -= 3 - } - } -} - -func isDigit(b byte) bool { return b >= '0' && b <= '9' } -func dddToByte(s []byte) byte { return (s[1]-'0')*100 + (s[2]-'0')*10 + (s[3] - '0') } diff --git a/plugin/file/tree/less_test.go b/plugin/file/tree/less_test.go deleted file mode 100644 index a1af23a389..0000000000 --- a/plugin/file/tree/less_test.go +++ /dev/null @@ -1,121 +0,0 @@ -package tree - -import ( - "sort" - "strings" - "sync" - "testing" - - "github.com/miekg/dns" -) - -type set []string - -func (p set) Len() int { return len(p) } -func (p set) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p set) Less(i, j int) bool { d := less(p[i], p[j]); return d <= 0 } - -func TestLess(t *testing.T) { - tests := []struct { - in []string - out []string - }{ - { - []string{"aaa.powerdns.de", "bbb.powerdns.net.", "xxx.powerdns.com."}, - []string{"xxx.powerdns.com.", "aaa.powerdns.de", "bbb.powerdns.net."}, - }, - { - []string{"aaa.POWERDNS.de", "bbb.PoweRdnS.net.", "xxx.powerdns.com."}, - []string{"xxx.powerdns.com.", "aaa.POWERDNS.de", "bbb.PoweRdnS.net."}, - }, - { - []string{"aaa.aaaa.aa.", "aa.aaa.a.", "bbb.bbbb.bb."}, - []string{"aa.aaa.a.", "aaa.aaaa.aa.", "bbb.bbbb.bb."}, - }, - { - []string{"aaaaa.", "aaa.", "bbb."}, - []string{"aaa.", "aaaaa.", "bbb."}, - }, - { - []string{"a.a.a.a.", "a.a.", "a.a.a."}, - []string{"a.a.", "a.a.a.", "a.a.a.a."}, - }, - { - []string{"example.", "z.example.", "a.example."}, - []string{"example.", "a.example.", "z.example."}, - }, - { - []string{"a.example.", "Z.a.example.", "z.example.", "yljkjljk.a.example.", "\\001.z.example.", "example.", "*.z.example.", "\\200.z.example.", "zABC.a.EXAMPLE."}, - []string{"example.", "a.example.", "yljkjljk.a.example.", "Z.a.example.", "zABC.a.EXAMPLE.", "z.example.", "\\001.z.example.", "*.z.example.", "\\200.z.example."}, - }, - { - // RFC3034 example. - []string{"a.example.", "Z.a.example.", "z.example.", "yljkjljk.a.example.", "example.", "*.z.example.", "zABC.a.EXAMPLE."}, - []string{"example.", "a.example.", "yljkjljk.a.example.", "Z.a.example.", "zABC.a.EXAMPLE.", "z.example.", "*.z.example."}, - }, - } - -Tests: - for j, test := range tests { - // Need to lowercase these example as the Less function does lowercase for us anymore. - for i, b := range test.in { - test.in[i] = strings.ToLower(b) - } - for i, b := range test.out { - test.out[i] = strings.ToLower(b) - } - - sort.Sort(set(test.in)) - for i := range len(test.in) { - if test.in[i] != test.out[i] { - t.Errorf("Test %d: expected %s, got %s", j, test.out[i], test.in[i]) - n := "" - for k, in := range test.in { - if k+1 == len(test.in) { - n = "\n" - } - t.Logf("%s <-> %s\n%s", in, test.out[k], n) - } - continue Tests - } - } - } -} - -func TestLess_EmptyVsName(t *testing.T) { - if d := less("", "a."); d >= 0 { - t.Fatalf("expected < 0, got %d", d) - } - if d := less("a.", ""); d <= 0 { - t.Fatalf("expected > 0, got %d", d) - } -} - -func TestLess_EmptyVsEmpty(t *testing.T) { - if d := less("", ""); d != 0 { - t.Fatalf("expected 0, got %d", d) - } -} - -// Test that concurrent calls to Less (which calls Elem.Name) do not race or panic. -// See issue #7561 for reference. -func TestLess_ConcurrentNameAccess(t *testing.T) { - rr, err := dns.NewRR("a.example. 3600 IN A 1.2.3.4") - if err != nil { - t.Fatalf("failed to create RR: %v", err) - } - e := newElem(rr) - - const n = 200 - var wg sync.WaitGroup - wg.Add(n) - for range n { - go func() { - defer wg.Done() - // Compare the same name repeatedly; previously this could race due to lazy Name() writes. - _ = Less(e, "a.example.") - _ = e.Name() - }() - } - wg.Wait() -} diff --git a/plugin/file/tree/print.go b/plugin/file/tree/print.go deleted file mode 100644 index b2df70e1bd..0000000000 --- a/plugin/file/tree/print.go +++ /dev/null @@ -1,62 +0,0 @@ -package tree - -import "fmt" - -// Print prints a Tree. Main use is to aid in debugging. -func (t *Tree) Print() { - if t.Root == nil { - fmt.Println("") - } - t.Root.print() -} - -func (n *Node) print() { - q := newQueue() - q.push(n) - - nodesInCurrentLevel := 1 - nodesInNextLevel := 0 - - for !q.empty() { - do := q.pop() - nodesInCurrentLevel-- - - if do != nil { - fmt.Print(do.Elem.Name(), " ") - q.push(do.Left) - q.push(do.Right) - nodesInNextLevel += 2 - } - if nodesInCurrentLevel == 0 { - fmt.Println() - nodesInCurrentLevel = nodesInNextLevel - nodesInNextLevel = 0 - } - } - fmt.Println() -} - -type queue []*Node - -// newQueue returns a new queue. -func newQueue() queue { - q := queue([]*Node{}) - return q -} - -// push pushes n to the end of the queue. -func (q *queue) push(n *Node) { - *q = append(*q, n) -} - -// pop pops the first element off the queue. -func (q *queue) pop() *Node { - n := (*q)[0] - *q = (*q)[1:] - return n -} - -// empty returns true when the queue contains zero nodes. -func (q *queue) empty() bool { - return len(*q) == 0 -} diff --git a/plugin/file/tree/print_test.go b/plugin/file/tree/print_test.go deleted file mode 100644 index 8c6c2b3318..0000000000 --- a/plugin/file/tree/print_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package tree - -import ( - "net" - "os" - "strings" - "testing" - - "github.com/miekg/dns" -) - -func TestPrint(t *testing.T) { - rr1 := dns.A{ - Hdr: dns.RR_Header{ - Name: dns.Fqdn("server1.example.com"), - Rrtype: 1, - Class: 1, - Ttl: 3600, - Rdlength: 0, - }, - A: net.IPv4(10, 0, 1, 1), - } - rr2 := dns.A{ - Hdr: dns.RR_Header{ - Name: dns.Fqdn("server2.example.com"), - Rrtype: 1, - Class: 1, - Ttl: 3600, - Rdlength: 0, - }, - A: net.IPv4(10, 0, 1, 2), - } - rr3 := dns.A{ - Hdr: dns.RR_Header{ - Name: dns.Fqdn("server3.example.com"), - Rrtype: 1, - Class: 1, - Ttl: 3600, - Rdlength: 0, - }, - A: net.IPv4(10, 0, 1, 3), - } - rr4 := dns.A{ - Hdr: dns.RR_Header{ - Name: dns.Fqdn("server4.example.com"), - Rrtype: 1, - Class: 1, - Ttl: 3600, - Rdlength: 0, - }, - A: net.IPv4(10, 0, 1, 4), - } - tree := Tree{ - Root: nil, - Count: 0, - } - tree.Insert(&rr1) - tree.Insert(&rr2) - tree.Insert(&rr3) - tree.Insert(&rr4) - - /** - build a LLRB tree, the height of the tree is 3, look like: - - server2.example.com. - / \ - server1.example.com. server4.example.com. - / - server3.example.com. - - */ - - f, err := os.CreateTemp(t.TempDir(), "print_test_tmp") - if err != nil { - t.Error(err) - } - defer os.Remove(f.Name()) - //Redirect the printed results to a tmp file for later comparison - os.Stdout = f - - tree.Print() - /** - server2.example.com. - server1.example.com. server4.example.com. - server3.example.com. - */ - - buf := make([]byte, 256) - f.Seek(0, 0) - _, err = f.Read(buf) - if err != nil { - f.Close() - t.Error(err) - } - height := strings.Count(string(buf), ". \n") - //Compare the height of the print with the actual height of the tree - if height != 3 { - t.Fatal("The number of rows is inconsistent with the actual number of rows in the tree itself.") - } -} diff --git a/plugin/file/tree/tree.go b/plugin/file/tree/tree.go deleted file mode 100644 index e69befabff..0000000000 --- a/plugin/file/tree/tree.go +++ /dev/null @@ -1,453 +0,0 @@ -// Copyright ©2012 The bíogo Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found at the end of this file. - -// Package tree implements Left-Leaning Red Black trees as described by Robert Sedgewick. -// -// More details relating to the implementation are available at the following locations: -// -// http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf -// http://www.cs.princeton.edu/~rs/talks/LLRB/Java/RedBlackBST.java -// http://www.teachsolaisgames.com/articles/balanced_left_leaning.html -// -// Heavily modified by Miek Gieben for use in DNS zones. -package tree - -import "github.com/miekg/dns" - -const ( - td234 = iota - bu23 -) - -// Operation mode of the LLRB tree. -const mode = bu23 - -func init() { - if mode != td234 && mode != bu23 { - panic("tree: unknown mode") - } -} - -// A Color represents the color of a Node. -type Color bool - -const ( - // Red as false give us the defined behaviour that new nodes are red. Although this - // is incorrect for the root node, that is resolved on the first insertion. - red Color = false - black Color = true -) - -// A Node represents a node in the LLRB tree. -type Node struct { - Elem *Elem - Left, Right *Node - Color Color -} - -// A Tree manages the root node of an LLRB tree. Public methods are exposed through this type. -type Tree struct { - Root *Node // Root node of the tree. - Count int // Number of elements stored. -} - -// Helper methods - -// color returns the effect color of a Node. A nil node returns black. -func (n *Node) color() Color { - if n == nil { - return black - } - return n.Color -} - -// (a,c)b -rotL-> ((a,)b,)c -func (n *Node) rotateLeft() (root *Node) { - // Assumes: n has two children. - root = n.Right - n.Right = root.Left - root.Left = n - root.Color = n.Color - n.Color = red - return -} - -// (a,c)b -rotR-> (,(,c)b)a -func (n *Node) rotateRight() (root *Node) { - // Assumes: n has two children. - root = n.Left - n.Left = root.Right - root.Right = n - root.Color = n.Color - n.Color = red - return -} - -// (aR,cR)bB -flipC-> (aB,cB)bR | (aB,cB)bR -flipC-> (aR,cR)bB -func (n *Node) flipColors() { - // Assumes: n has two children. - n.Color = !n.Color - n.Left.Color = !n.Left.Color - n.Right.Color = !n.Right.Color -} - -// fixUp ensures that black link balance is correct, that red nodes lean left, -// and that 4 nodes are split in the case of BU23 and properly balanced in TD234. -func (n *Node) fixUp() *Node { - if n.Right.color() == red { - if mode == td234 && n.Right.Left.color() == red { - n.Right = n.Right.rotateRight() - } - n = n.rotateLeft() - } - if n.Left.color() == red && n.Left.Left.color() == red { - n = n.rotateRight() - } - if mode == bu23 && n.Left.color() == red && n.Right.color() == red { - n.flipColors() - } - return n -} - -func (n *Node) moveRedLeft() *Node { - n.flipColors() - if n.Right.Left.color() == red { - n.Right = n.Right.rotateRight() - n = n.rotateLeft() - n.flipColors() - if mode == td234 && n.Right.Right.color() == red { - n.Right = n.Right.rotateLeft() - } - } - return n -} - -func (n *Node) moveRedRight() *Node { - n.flipColors() - if n.Left.Left.color() == red { - n = n.rotateRight() - n.flipColors() - } - return n -} - -// Len returns the number of elements stored in the Tree. -func (t *Tree) Len() int { - return t.Count -} - -// Search returns the first match of qname in the Tree. -func (t *Tree) Search(qname string) (*Elem, bool) { - if t.Root == nil { - return nil, false - } - n, res := t.Root.search(qname) - if n == nil { - return nil, res - } - return n.Elem, res -} - -// search searches the tree for qname and type. -func (n *Node) search(qname string) (*Node, bool) { - for n != nil { - switch c := Less(n.Elem, qname); { - case c == 0: - return n, true - case c < 0: - n = n.Left - default: - n = n.Right - } - } - - return n, false -} - -// Insert inserts rr into the Tree at the first match found -// with e or when a nil node is reached. -func (t *Tree) Insert(rr dns.RR) { - var d int - t.Root, d = t.Root.insert(rr) - t.Count += d - t.Root.Color = black -} - -// insert inserts rr in to the tree. -func (n *Node) insert(rr dns.RR) (root *Node, d int) { - if n == nil { - return &Node{Elem: newElem(rr)}, 1 - } else if n.Elem == nil { - n.Elem = newElem(rr) - return n, 1 - } - - if mode == td234 { - if n.Left.color() == red && n.Right.color() == red { - n.flipColors() - } - } - - switch c := Less(n.Elem, rr.Header().Name); { - case c == 0: - n.Elem.Insert(rr) - case c < 0: - n.Left, d = n.Left.insert(rr) - default: - n.Right, d = n.Right.insert(rr) - } - - if n.Right.color() == red && n.Left.color() == black { - n = n.rotateLeft() - } - if n.Left.color() == red && n.Left.Left.color() == red { - n = n.rotateRight() - } - - if mode == bu23 { - if n.Left.color() == red && n.Right.color() == red { - n.flipColors() - } - } - - root = n - - return root, d -} - -// DeleteMin deletes the node with the minimum value in the tree. -func (t *Tree) DeleteMin() { - if t.Root == nil { - return - } - var d int - t.Root, d = t.Root.deleteMin() - t.Count += d - if t.Root == nil { - return - } - t.Root.Color = black -} - -func (n *Node) deleteMin() (root *Node, d int) { - if n.Left == nil { - return nil, -1 - } - if n.Left.color() == black && n.Left.Left.color() == black { - n = n.moveRedLeft() - } - n.Left, d = n.Left.deleteMin() - - root = n.fixUp() - - return -} - -// DeleteMax deletes the node with the maximum value in the tree. -func (t *Tree) DeleteMax() { - if t.Root == nil { - return - } - var d int - t.Root, d = t.Root.deleteMax() - t.Count += d - if t.Root == nil { - return - } - t.Root.Color = black -} - -func (n *Node) deleteMax() (root *Node, d int) { - if n.Left != nil && n.Left.color() == red { - n = n.rotateRight() - } - if n.Right == nil { - return nil, -1 - } - if n.Right.color() == black && n.Right.Left.color() == black { - n = n.moveRedRight() - } - n.Right, d = n.Right.deleteMax() - - root = n.fixUp() - - return -} - -// Delete removes all RRs of type rr.Header().Rrtype from e. If after the deletion of rr the node is empty the -// entire node is deleted. -func (t *Tree) Delete(rr dns.RR) { - if t.Root == nil { - return - } - - el, _ := t.Search(rr.Header().Name) - if el == nil { - return - } - el.Delete(rr) - if el.Empty() { - t.deleteNode(rr) - } -} - -// DeleteNode deletes the node that matches rr according to Less(). -func (t *Tree) deleteNode(rr dns.RR) { - if t.Root == nil { - return - } - var d int - t.Root, d = t.Root.delete(rr) - t.Count += d - if t.Root == nil { - return - } - t.Root.Color = black -} - -func (n *Node) delete(rr dns.RR) (root *Node, d int) { - if Less(n.Elem, rr.Header().Name) < 0 { - if n.Left != nil { - if n.Left.color() == black && n.Left.Left.color() == black { - n = n.moveRedLeft() - } - n.Left, d = n.Left.delete(rr) - } - } else { - if n.Left.color() == red { - n = n.rotateRight() - } - if n.Right == nil && Less(n.Elem, rr.Header().Name) == 0 { - return nil, -1 - } - if n.Right != nil { - if n.Right.color() == black && n.Right.Left.color() == black { - n = n.moveRedRight() - } - if Less(n.Elem, rr.Header().Name) == 0 { - n.Elem = n.Right.min().Elem - n.Right, d = n.Right.deleteMin() - } else { - n.Right, d = n.Right.delete(rr) - } - } - } - - root = n.fixUp() - return -} - -// Min returns the minimum value stored in the tree. -func (t *Tree) Min() *Elem { - if t.Root == nil { - return nil - } - return t.Root.min().Elem -} - -func (n *Node) min() *Node { - for ; n.Left != nil; n = n.Left { - } - return n -} - -// Max returns the maximum value stored in the tree. -func (t *Tree) Max() *Elem { - if t.Root == nil { - return nil - } - return t.Root.max().Elem -} - -func (n *Node) max() *Node { - for ; n.Right != nil; n = n.Right { - } - return n -} - -// Prev returns the greatest value equal to or less than the qname according to Less(). -func (t *Tree) Prev(qname string) (*Elem, bool) { - if t.Root == nil { - return nil, false - } - - n := t.Root.floor(qname) - if n == nil { - return nil, false - } - return n.Elem, true -} - -func (n *Node) floor(qname string) *Node { - if n == nil { - return nil - } - switch c := Less(n.Elem, qname); { - case c == 0: - return n - case c <= 0: - return n.Left.floor(qname) - default: - if r := n.Right.floor(qname); r != nil { - return r - } - } - return n -} - -// Next returns the smallest value equal to or greater than the qname according to Less(). -func (t *Tree) Next(qname string) (*Elem, bool) { - if t.Root == nil { - return nil, false - } - n := t.Root.ceil(qname) - if n == nil { - return nil, false - } - return n.Elem, true -} - -func (n *Node) ceil(qname string) *Node { - if n == nil { - return nil - } - switch c := Less(n.Elem, qname); { - case c == 0: - return n - case c > 0: - return n.Right.ceil(qname) - default: - if l := n.Left.ceil(qname); l != nil { - return l - } - } - return n -} - -/* -Copyright ©2012 The bíogo 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 the bíogo project nor the names of its authors and - 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 HOLDER 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/plugin/file/tree/walk.go b/plugin/file/tree/walk.go deleted file mode 100644 index e315eb03fa..0000000000 --- a/plugin/file/tree/walk.go +++ /dev/null @@ -1,33 +0,0 @@ -package tree - -import "github.com/miekg/dns" - -// Walk performs fn on all authoritative values stored in the tree in -// in-order depth first. If a non-nil error is returned the Walk was interrupted -// by an fn returning that error. If fn alters stored values' sort -// relationships, future tree operation behaviors are undefined. -func (t *Tree) Walk(fn func(*Elem, map[uint16][]dns.RR) error) error { - if t.Root == nil { - return nil - } - return t.Root.walk(fn) -} - -func (n *Node) walk(fn func(*Elem, map[uint16][]dns.RR) error) error { - if n.Left != nil { - if err := n.Left.walk(fn); err != nil { - return err - } - } - - if err := fn(n.Elem, n.Elem.m); err != nil { - return err - } - - if n.Right != nil { - if err := n.Right.walk(fn); err != nil { - return err - } - } - return nil -} diff --git a/plugin/file/wildcard.go b/plugin/file/wildcard.go deleted file mode 100644 index 7e8e806a1f..0000000000 --- a/plugin/file/wildcard.go +++ /dev/null @@ -1,13 +0,0 @@ -package file - -import "github.com/miekg/dns" - -// replaceWithAsteriskLabel replaces the left most label with '*'. -func replaceWithAsteriskLabel(qname string) (wildcard string) { - i, shot := dns.NextLabel(qname, 0) - if shot { - return "" - } - - return "*." + qname[i:] -} diff --git a/plugin/file/wildcard_test.go b/plugin/file/wildcard_test.go deleted file mode 100644 index fc6ad120c2..0000000000 --- a/plugin/file/wildcard_test.go +++ /dev/null @@ -1,298 +0,0 @@ -package file - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -// these examples don't have an additional opt RR set, because that's gets added by the server. -var wildcardTestCases = []test.Case{ - { - Qname: "wild.dnssex.nl.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`wild.dnssex.nl. 1800 IN TXT "Doing It Safe Is Better"`), - }, - Ns: dnssexAuth[:len(dnssexAuth)-1], // remove RRSIG on the end - }, - { - Qname: "a.wild.dnssex.nl.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`a.wild.dnssex.nl. 1800 IN TXT "Doing It Safe Is Better"`), - }, - Ns: dnssexAuth[:len(dnssexAuth)-1], // remove RRSIG on the end - }, - { - Qname: "wild.dnssex.nl.", Qtype: dns.TypeTXT, Do: true, - Answer: []dns.RR{ - test.RRSIG("wild.dnssex.nl. 1800 IN RRSIG TXT 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. FUZSTyvZfeuuOpCm"), - test.TXT(`wild.dnssex.nl. 1800 IN TXT "Doing It Safe Is Better"`), - }, - Ns: append([]dns.RR{ - test.NSEC("a.dnssex.nl. 14400 IN NSEC www.dnssex.nl. A AAAA RRSIG NSEC"), - test.RRSIG("a.dnssex.nl. 14400 IN RRSIG NSEC 8 3 14400 20160428190224 20160329190224 14460 dnssex.nl. S+UMs2ySgRaaRY"), - }, dnssexAuth...), - }, - { - Qname: "a.wild.dnssex.nl.", Qtype: dns.TypeTXT, Do: true, - Answer: []dns.RR{ - test.RRSIG("a.wild.dnssex.nl. 1800 IN RRSIG TXT 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. FUZSTyvZfeuuOpCm"), - test.TXT(`a.wild.dnssex.nl. 1800 IN TXT "Doing It Safe Is Better"`), - }, - Ns: append([]dns.RR{ - test.NSEC("a.dnssex.nl. 14400 IN NSEC www.dnssex.nl. A AAAA RRSIG NSEC"), - test.RRSIG("a.dnssex.nl. 14400 IN RRSIG NSEC 8 3 14400 20160428190224 20160329190224 14460 dnssex.nl. S+UMs2ySgRaaRY"), - }, dnssexAuth...), - }, - // nodata responses - { - Qname: "wild.dnssex.nl.", Qtype: dns.TypeSRV, - Ns: []dns.RR{ - test.SOA(`dnssex.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1459281744 14400 3600 604800 14400`), - }, - }, - { - Qname: "wild.dnssex.nl.", Qtype: dns.TypeSRV, Do: true, - Ns: []dns.RR{ - // TODO(miek): needs closest encloser proof as well? This is the wrong answer - test.NSEC(`*.dnssex.nl. 14400 IN NSEC a.dnssex.nl. TXT RRSIG NSEC`), - test.RRSIG(`*.dnssex.nl. 14400 IN RRSIG NSEC 8 2 14400 20160428190224 20160329190224 14460 dnssex.nl. os6INm6q2eXknD5z8TaaDOV+Ge/Ko+2dXnKP+J1fqJzafXJVH1F0nDrcXmMlR6jlBHA=`), - test.RRSIG(`dnssex.nl. 1800 IN RRSIG SOA 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. CA/Y3m9hCOiKC/8ieSOv8SeP964Bq++lyH8BZJcTaabAsERs4xj5PRtcxicwQXZiF8fYUCpROlUS0YR8Cdw=`), - test.SOA(`dnssex.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1459281744 14400 3600 604800 14400`), - }, - }, -} - -var dnssexAuth = []dns.RR{ - test.NS("dnssex.nl. 1800 IN NS linode.atoom.net."), - test.NS("dnssex.nl. 1800 IN NS ns-ext.nlnetlabs.nl."), - test.NS("dnssex.nl. 1800 IN NS omval.tednet.nl."), - test.RRSIG("dnssex.nl. 1800 IN RRSIG NS 8 2 1800 20160428190224 20160329190224 14460 dnssex.nl. dLIeEvP86jj5ndkcLzhgvWixTABjWAGRTGQsPsVDFXsGMf9TGGC9FEomgkCVeNC0="), -} - -func TestLookupWildcard(t *testing.T) { - zone, err := Parse(strings.NewReader(dbDnssexNLSigned), testzone1, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone1: zone}, Names: []string{testzone1}}} - ctx := context.TODO() - - for _, tc := range wildcardTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -var wildcardDoubleTestCases = []test.Case{ - { - Qname: "wild.w.example.org.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`wild.w.example.org. IN TXT "Wildcard"`), - }, - Ns: exampleAuth, - }, - { - Qname: "wild.c.example.org.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`wild.c.example.org. IN TXT "c Wildcard"`), - }, - Ns: exampleAuth, - }, - { - Qname: "wild.d.example.org.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`alias.example.org. IN TXT "Wildcard CNAME expansion"`), - test.CNAME(`wild.d.example.org. IN CNAME alias.example.org`), - }, - Ns: exampleAuth, - }, - { - Qname: "alias.example.org.", Qtype: dns.TypeTXT, - Answer: []dns.RR{ - test.TXT(`alias.example.org. IN TXT "Wildcard CNAME expansion"`), - }, - Ns: exampleAuth, - }, -} - -var exampleAuth = []dns.RR{ - test.NS("example.org. 3600 IN NS a.iana-servers.net."), - test.NS("example.org. 3600 IN NS b.iana-servers.net."), -} - -func TestLookupDoubleWildcard(t *testing.T) { - zone, err := Parse(strings.NewReader(exampleOrg), "example.org.", "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{"example.org.": zone}, Names: []string{"example.org."}}} - ctx := context.TODO() - - for _, tc := range wildcardDoubleTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -func TestReplaceWithAsteriskLabel(t *testing.T) { - tests := []struct { - in, out string - }{ - {".", ""}, - {"miek.nl.", "*.nl."}, - {"www.miek.nl.", "*.miek.nl."}, - } - - for _, tc := range tests { - got := replaceWithAsteriskLabel(tc.in) - if got != tc.out { - t.Errorf("Expected to be %s, got %s", tc.out, got) - } - } -} - -var apexWildcardTestCases = []test.Case{ - { - Qname: "foo.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{test.A(`foo.example.org. 3600 IN A 127.0.0.54`)}, - Ns: []dns.RR{test.NS(`example.org. 3600 IN NS b.iana-servers.net.`)}, - }, - { - Qname: "bar.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{test.A(`bar.example.org. 3600 IN A 127.0.0.53`)}, - Ns: []dns.RR{test.NS(`example.org. 3600 IN NS b.iana-servers.net.`)}, - }, -} - -func TestLookupApexWildcard(t *testing.T) { - const name = "example.org." - zone, err := Parse(strings.NewReader(apexWildcard), name, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{name: zone}, Names: []string{name}}} - ctx := context.TODO() - - for _, tc := range apexWildcardTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -var multiWildcardTestCases = []test.Case{ - { - Qname: "foo.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{test.A(`foo.example.org. 3600 IN A 127.0.0.54`)}, - Ns: []dns.RR{test.NS(`example.org. 3600 IN NS b.iana-servers.net.`)}, - }, - { - Qname: "bar.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{test.A(`bar.example.org. 3600 IN A 127.0.0.53`)}, - Ns: []dns.RR{test.NS(`example.org. 3600 IN NS b.iana-servers.net.`)}, - }, - { - Qname: "bar.intern.example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{test.A(`bar.intern.example.org. 3600 IN A 127.0.1.52`)}, - Ns: []dns.RR{test.NS(`example.org. 3600 IN NS b.iana-servers.net.`)}, - }, -} - -func TestLookupMultiWildcard(t *testing.T) { - const name = "example.org." - zone, err := Parse(strings.NewReader(doubleWildcard), name, "stdin", 0) - if err != nil { - t.Fatalf("Expect no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{name: zone}, Names: []string{name}}} - ctx := context.TODO() - - for _, tc := range multiWildcardTestCases { - m := tc.Msg() - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - resp := rec.Msg - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } -} - -const exampleOrg = `; example.org test file -$TTL 3600 -example.org. IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600 -example.org. IN NS b.iana-servers.net. -example.org. IN NS a.iana-servers.net. -example.org. IN A 127.0.0.1 -example.org. IN A 127.0.0.2 -*.w.example.org. IN TXT "Wildcard" -a.b.c.w.example.org. IN TXT "Not a wildcard" -*.c.example.org. IN TXT "c Wildcard" -*.d.example.org. IN CNAME alias.example.org. -alias.example.org. IN TXT "Wildcard CNAME expansion" -` - -const apexWildcard = `; example.org test file with wildcard at apex -$TTL 3600 -example.org. IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600 -example.org. IN NS b.iana-servers.net. -*.example.org. IN A 127.0.0.53 -foo.example.org. IN A 127.0.0.54 -` - -const doubleWildcard = `; example.org test file with wildcard at apex -$TTL 3600 -example.org. IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600 -example.org. IN NS b.iana-servers.net. -*.example.org. IN A 127.0.0.53 -*.intern.example.org. IN A 127.0.1.52 -foo.example.org. IN A 127.0.0.54 -` diff --git a/plugin/file/xfr.go b/plugin/file/xfr.go deleted file mode 100644 index eab880c33a..0000000000 --- a/plugin/file/xfr.go +++ /dev/null @@ -1,45 +0,0 @@ -package file - -import ( - "github.com/coredns/coredns/plugin/file/tree" - "github.com/coredns/coredns/plugin/transfer" - - "github.com/miekg/dns" -) - -// Transfer implements the transfer.Transfer interface. -func (f File) Transfer(zone string, serial uint32) (<-chan []dns.RR, error) { - z, ok := f.Z[zone] - if !ok || z == nil { - return nil, transfer.ErrNotAuthoritative - } - return z.Transfer(serial) -} - -// Transfer transfers a zone with serial in the returned channel and implements IXFR fallback, by just -// sending a single SOA record. -func (z *Zone) Transfer(serial uint32) (<-chan []dns.RR, error) { - // get soa and apex - apex, err := z.ApexIfDefined() - if err != nil { - return nil, err - } - - ch := make(chan []dns.RR) - go func() { - if serial != 0 && apex[0].(*dns.SOA).Serial == serial { // ixfr fallback, only send SOA - ch <- []dns.RR{apex[0]} - - close(ch) - return - } - - ch <- apex - z.Walk(func(e *tree.Elem, _ map[uint16][]dns.RR) error { ch <- e.All(); return nil }) - ch <- []dns.RR{apex[0]} - - close(ch) - }() - - return ch, nil -} diff --git a/plugin/file/xfr_test.go b/plugin/file/xfr_test.go deleted file mode 100644 index f8d4cafcd6..0000000000 --- a/plugin/file/xfr_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package file - -import ( - "context" - "fmt" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func ExampleZone_All() { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - return - } - records := zone.All() - for _, r := range records { - fmt.Printf("%+v\n", r) - } - // Output - // xfr_test.go:15: miek.nl. 1800 IN SOA linode.atoom.net. miek.miek.nl. 1282630057 14400 3600 604800 14400 - // xfr_test.go:15: www.miek.nl. 1800 IN CNAME a.miek.nl. - // xfr_test.go:15: miek.nl. 1800 IN NS linode.atoom.net. - // xfr_test.go:15: miek.nl. 1800 IN NS ns-ext.nlnetlabs.nl. - // xfr_test.go:15: miek.nl. 1800 IN NS omval.tednet.nl. - // xfr_test.go:15: miek.nl. 1800 IN NS ext.ns.whyscream.net. - // xfr_test.go:15: miek.nl. 1800 IN MX 1 aspmx.l.google.com. - // xfr_test.go:15: miek.nl. 1800 IN MX 5 alt1.aspmx.l.google.com. - // xfr_test.go:15: miek.nl. 1800 IN MX 5 alt2.aspmx.l.google.com. - // xfr_test.go:15: miek.nl. 1800 IN MX 10 aspmx2.googlemail.com. - // xfr_test.go:15: miek.nl. 1800 IN MX 10 aspmx3.googlemail.com. - // xfr_test.go:15: miek.nl. 1800 IN A 139.162.196.78 - // xfr_test.go:15: miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 - // xfr_test.go:15: archive.miek.nl. 1800 IN CNAME a.miek.nl. - // xfr_test.go:15: a.miek.nl. 1800 IN A 139.162.196.78 - // xfr_test.go:15: a.miek.nl. 1800 IN AAAA 2a01:7e00::f03c:91ff:fef1:6735 -} - -func TestAllNewZone(t *testing.T) { - zone := NewZone("example.org.", "stdin") - records := zone.All() - if len(records) != 0 { - t.Errorf("Expected %d records in empty zone, got %d", 0, len(records)) - } -} - -func TestAXFRWithOutTransferPlugin(t *testing.T) { - zone, err := Parse(strings.NewReader(dbMiekNL), testzone, "stdin", 0) - if err != nil { - t.Fatalf("Expected no error when reading zone, got %q", err) - } - - fm := File{Next: test.ErrorHandler(), Zones: Zones{Z: map[string]*Zone{testzone: zone}, Names: []string{testzone}}} - ctx := context.TODO() - - m := new(dns.Msg) - m.SetQuestion("miek.nl.", dns.TypeAXFR) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := fm.ServeDNS(ctx, rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - if code != dns.RcodeRefused { - t.Errorf("Expecting REFUSED, got %d", code) - } -} diff --git a/plugin/file/zone.go b/plugin/file/zone.go deleted file mode 100644 index aeb2a593e2..0000000000 --- a/plugin/file/zone.go +++ /dev/null @@ -1,181 +0,0 @@ -package file - -import ( - "fmt" - "path/filepath" - "strings" - "sync" - "time" - - "github.com/coredns/coredns/plugin/file/tree" - "github.com/coredns/coredns/plugin/pkg/upstream" - - "github.com/miekg/dns" -) - -// Zone is a structure that contains all data related to a DNS zone. -type Zone struct { - origin string - origLen int - file string - *tree.Tree - Apex - Expired bool - - sync.RWMutex - - StartupOnce sync.Once - TransferFrom []string - - ReloadInterval time.Duration - reloadShutdown chan bool - - Upstream *upstream.Upstream // Upstream for looking up external names during the resolution process. -} - -// Apex contains the apex records of a zone: SOA, NS and their potential signatures. -type Apex struct { - SOA *dns.SOA - NS []dns.RR - SIGSOA []dns.RR - SIGNS []dns.RR -} - -// NewZone returns a new zone. -func NewZone(name, file string) *Zone { - return &Zone{ - origin: dns.Fqdn(name), - origLen: dns.CountLabel(dns.Fqdn(name)), - file: filepath.Clean(file), - Tree: &tree.Tree{}, - reloadShutdown: make(chan bool), - } -} - -// Copy copies a zone. -func (z *Zone) Copy() *Zone { - z1 := NewZone(z.origin, z.file) - z1.TransferFrom = z.TransferFrom - z1.Expired = z.Expired - - z1.Apex = z.Apex - return z1 -} - -// CopyWithoutApex copies zone z without the Apex records. -func (z *Zone) CopyWithoutApex() *Zone { - z1 := NewZone(z.origin, z.file) - z1.TransferFrom = z.TransferFrom - z1.Expired = z.Expired - - return z1 -} - -// Insert inserts r into z. -func (z *Zone) Insert(r dns.RR) error { - // r.Header().Name = strings.ToLower(r.Header().Name) - if r.Header().Rrtype != dns.TypeSRV { - r.Header().Name = strings.ToLower(r.Header().Name) - } - - switch h := r.Header().Rrtype; h { - case dns.TypeNS: - r.(*dns.NS).Ns = strings.ToLower(r.(*dns.NS).Ns) - - if r.Header().Name == z.origin { - z.NS = append(z.NS, r) - return nil - } - case dns.TypeSOA: - r.(*dns.SOA).Ns = strings.ToLower(r.(*dns.SOA).Ns) - r.(*dns.SOA).Mbox = strings.ToLower(r.(*dns.SOA).Mbox) - - z.SOA = r.(*dns.SOA) - return nil - case dns.TypeNSEC3, dns.TypeNSEC3PARAM: - return fmt.Errorf("NSEC3 zone is not supported, dropping RR: %s for zone: %s", r.Header().Name, z.origin) - case dns.TypeRRSIG: - x := r.(*dns.RRSIG) - switch x.TypeCovered { - case dns.TypeSOA: - z.SIGSOA = append(z.SIGSOA, x) - return nil - case dns.TypeNS: - if r.Header().Name == z.origin { - z.SIGNS = append(z.SIGNS, x) - return nil - } - } - case dns.TypeCNAME: - r.(*dns.CNAME).Target = strings.ToLower(r.(*dns.CNAME).Target) - case dns.TypeMX: - r.(*dns.MX).Mx = strings.ToLower(r.(*dns.MX).Mx) - case dns.TypeSRV: - // r.(*dns.SRV).Target = strings.ToLower(r.(*dns.SRV).Target) - } - - z.Tree.Insert(r) - return nil -} - -// File retrieves the file path in a safe way. -func (z *Zone) File() string { - z.RLock() - defer z.RUnlock() - return z.file -} - -// SetFile updates the file path in a safe way. -func (z *Zone) SetFile(path string) { - z.Lock() - z.file = path - z.Unlock() -} - -// ApexIfDefined returns the apex nodes from z. The SOA record is the first record, if it does not exist, an error is returned. -func (z *Zone) ApexIfDefined() ([]dns.RR, error) { - z.RLock() - defer z.RUnlock() - if z.SOA == nil { - return nil, fmt.Errorf("no SOA") - } - - rrs := []dns.RR{z.SOA} - - if len(z.SIGSOA) > 0 { - rrs = append(rrs, z.SIGSOA...) - } - if len(z.NS) > 0 { - rrs = append(rrs, z.NS...) - } - if len(z.SIGNS) > 0 { - rrs = append(rrs, z.SIGNS...) - } - - return rrs, nil -} - -// NameFromRight returns the labels from the right, staring with the -// origin and then i labels extra. When we are overshooting the name -// the returned boolean is set to true. -func (z *Zone) nameFromRight(qname string, i int) (string, bool) { - if i <= 0 { - return z.origin, false - } - - for j := 1; j <= z.origLen; j++ { - if _, shot := dns.PrevLabel(qname, j); shot { - return qname, shot - } - } - - k := 0 - var shot bool - for j := 1; j <= i; j++ { - k, shot = dns.PrevLabel(qname, j+z.origLen) - if shot { - return qname, shot - } - } - return qname[k:], false -} diff --git a/plugin/file/zone_test.go b/plugin/file/zone_test.go deleted file mode 100644 index f81a871ff3..0000000000 --- a/plugin/file/zone_test.go +++ /dev/null @@ -1,74 +0,0 @@ -package file - -import ( - "testing" - - "github.com/coredns/coredns/plugin/file/tree" - - "github.com/miekg/dns" -) - -func TestNameFromRight(t *testing.T) { - z := NewZone("example.org.", "stdin") - - tests := []struct { - in string - labels int - shot bool - expected string - }{ - {"example.org.", 0, false, "example.org."}, - {"a.example.org.", 0, false, "example.org."}, - {"a.example.org.", 1, false, "a.example.org."}, - {"a.example.org.", 2, true, "a.example.org."}, - {"a.b.example.org.", 2, false, "a.b.example.org."}, - } - - for i, tc := range tests { - got, shot := z.nameFromRight(tc.in, tc.labels) - if got != tc.expected { - t.Errorf("Test %d: expected %s, got %s", i, tc.expected, got) - } - if shot != tc.shot { - t.Errorf("Test %d: expected shot to be %t, got %t", i, tc.shot, shot) - } - } -} - -func TestInsertPreservesSRVCase(t *testing.T) { - z := NewZone("home.arpa.", "stdin") - - // SRV with mixed case and space-escaped instance name - srv, err := dns.NewRR(`Home\032Media._smb._tcp.home.arpa. 5 IN SRV 0 0 445 samba.home.arpa.`) - if err != nil { - t.Fatalf("Failed to parse SRV RR: %v", err) - } - - if err := z.Insert(srv); err != nil { - t.Fatalf("Insert failed: %v", err) - } - - found := false - err = z.Walk(func(elem *tree.Elem, rrsets map[uint16][]dns.RR) error { - for _, rrs := range rrsets { - for _, rr := range rrs { - if srvRR, ok := rr.(*dns.SRV); ok { - if srvRR.Hdr.Name == "Home\\032Media._smb._tcp.home.arpa." { - found = true - if srvRR.Target != "samba.home.arpa." { - t.Errorf("Expected SRV target to be 'samba.home.arpa.', got %q", srvRR.Target) - } - } - } - } - } - return nil - }) - if err != nil { - t.Fatalf("Tree walk failed: %v", err) - } - - if !found { - t.Errorf("SRV record with original case not found in tree") - } -} diff --git a/plugin/geoip/README.md b/plugin/geoip/README.md deleted file mode 100644 index febad8ad75..0000000000 --- a/plugin/geoip/README.md +++ /dev/null @@ -1,117 +0,0 @@ -# geoip - -## Name - -*geoip* - Lookup maxmind geoip2 databases using the client IP, then add associated geoip data to the context request. - -## Description - -The *geoip* plugin add geo location data associated with the client IP, it allows you to configure a [geoIP2 maxmind database](https://dev.maxmind.com/geoip/docs/databases) to add the geo location data associated with the IP address. - -The data is added leveraging the *metadata* plugin, values can then be retrieved using it as well, for example: - -```go -import ( - "strconv" - "github.com/coredns/coredns/plugin/metadata" -) -// ... -if getLongitude := metadata.ValueFunc(ctx, "geoip/longitude"); getLongitude != nil { - if longitude, err := strconv.ParseFloat(getLongitude(), 64); err == nil { - // Do something useful with longitude. - } -} else { - // The metadata label geoip/longitude for some reason, was not set. -} -// ... -``` - -## Databases - -The supported databases use city schema such as `City` and `Enterprise`. Other databases types with different schemas are not supported yet. - -You can download a [free and public City database](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data). - -## Syntax - -```text -geoip [DBFILE] -``` - -or - -```text -geoip [DBFILE] { - [edns-subnet] -} -``` - -* **DBFILE** the mmdb database file path. We recommend updating your mmdb database periodically for more accurate results. -* `edns-subnet`: Optional. Use [EDNS0 subnet](https://en.wikipedia.org/wiki/EDNS_Client_Subnet) (if present) for Geo IP instead of the source IP of the DNS request. This helps identifying the closest source IP address through intermediary DNS resolvers, and it also makes GeoIP testing easy: `dig +subnet=1.2.3.4 @dns-server.example.com www.geo-aware.com`. - - **NOTE:** due to security reasons, recursive DNS resolvers may mask a few bits off of the clients' IP address, which can cause inaccuracies in GeoIP resolution. - - There is no defined mask size in the standards, but there are examples: [RFC 7871's example](https://datatracker.ietf.org/doc/html/rfc7871#section-13) conceals the last 72 bits of an IPv6 source address, and NS1 Help Center [mentions](https://help.ns1.com/hc/en-us/articles/360020256573-About-the-EDNS-Client-Subnet-ECS-DNS-extension) that ECS-enabled DNS resolvers send only the first three octets (eg. /24) of the source IPv4 address. - -## Examples - -The following configuration configures the `City` database, and looks up geolocation based on EDNS0 subnet if present. - -```txt -. { - geoip /opt/geoip2/db/GeoLite2-City.mmdb { - edns-subnet - } - metadata # Note that metadata plugin must be enabled as well. -} -``` - -The *view* plugin can use *geoip* metadata as selection criteria to provide GSLB functionality. -In this example, clients from the city "Exampleshire" will receive answers for `example.com` from the zone defined in -`example.com.exampleshire-db`. All other clients will receive answers from the zone defined in `example.com.db`. -Note that the order of the two `example.com` server blocks below is important; the default viewless server block -must be last. - -```txt -example.com { - view exampleshire { - expr metadata('geoip/city/name') == 'Exampleshire' - } - geoip /opt/geoip2/db/GeoLite2-City.mmdb - metadata - file example.com.exampleshire-db -} - -example.com { - file example.com.db -} -``` - -## Metadata Labels - -A limited set of fields will be exported as labels, all values are stored using strings **regardless of their underlying value type**, and therefore you may have to convert it back to its original type, note that numeric values are always represented in base 10. - -| Label | Type | Example | Description -| :----------------------------------- | :-------- | :-------------- | :------------------ -| `geoip/city/name` | `string` | `Cambridge` | Then city name in English language. -| `geoip/country/code` | `string` | `GB` | Country [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) code. -| `geoip/country/name` | `string` | `United Kingdom` | The country name in English language. -| `geoip/country/is_in_european_union` | `bool` | `false` | Either `true` or `false`. -| `geoip/continent/code` | `string` | `EU` | See [Continent codes](#ContinentCodes). -| `geoip/continent/name` | `string` | `Europe` | The continent name in English language. -| `geoip/latitude` | `float64` | `52.2242` | Base 10, max available precision. -| `geoip/longitude` | `float64` | `0.1315` | Base 10, max available precision. -| `geoip/timezone` | `string` | `Europe/London` | The timezone. -| `geoip/postalcode` | `string` | `CB4` | The postal code. - -## Continent Codes - -| Value | Continent (EN) | -| :---- | :------------- | -| AF | Africa | -| AN | Antarctica | -| AS | Asia | -| EU | Europe | -| NA | North America | -| OC | Oceania | -| SA | South America | diff --git a/plugin/geoip/city.go b/plugin/geoip/city.go deleted file mode 100644 index 2e5d9f7eaa..0000000000 --- a/plugin/geoip/city.go +++ /dev/null @@ -1,58 +0,0 @@ -package geoip - -import ( - "context" - "strconv" - - "github.com/coredns/coredns/plugin/metadata" - - "github.com/oschwald/geoip2-golang" -) - -const defaultLang = "en" - -func (g GeoIP) setCityMetadata(ctx context.Context, data *geoip2.City) { - // Set labels for city, country and continent names. - cityName := data.City.Names[defaultLang] - metadata.SetValueFunc(ctx, pluginName+"/city/name", func() string { - return cityName - }) - countryName := data.Country.Names[defaultLang] - metadata.SetValueFunc(ctx, pluginName+"/country/name", func() string { - return countryName - }) - continentName := data.Continent.Names[defaultLang] - metadata.SetValueFunc(ctx, pluginName+"/continent/name", func() string { - return continentName - }) - - countryCode := data.Country.IsoCode - metadata.SetValueFunc(ctx, pluginName+"/country/code", func() string { - return countryCode - }) - isInEurope := strconv.FormatBool(data.Country.IsInEuropeanUnion) - metadata.SetValueFunc(ctx, pluginName+"/country/is_in_european_union", func() string { - return isInEurope - }) - continentCode := data.Continent.Code - metadata.SetValueFunc(ctx, pluginName+"/continent/code", func() string { - return continentCode - }) - - latitude := strconv.FormatFloat(data.Location.Latitude, 'f', -1, 64) - metadata.SetValueFunc(ctx, pluginName+"/latitude", func() string { - return latitude - }) - longitude := strconv.FormatFloat(data.Location.Longitude, 'f', -1, 64) - metadata.SetValueFunc(ctx, pluginName+"/longitude", func() string { - return longitude - }) - timeZone := data.Location.TimeZone - metadata.SetValueFunc(ctx, pluginName+"/timezone", func() string { - return timeZone - }) - postalCode := data.Postal.Code - metadata.SetValueFunc(ctx, pluginName+"/postalcode", func() string { - return postalCode - }) -} diff --git a/plugin/geoip/geoip.go b/plugin/geoip/geoip.go deleted file mode 100644 index 765ac05c00..0000000000 --- a/plugin/geoip/geoip.go +++ /dev/null @@ -1,107 +0,0 @@ -// Package geoip implements a max mind database plugin. -package geoip - -import ( - "context" - "fmt" - "net" - "path/filepath" - - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" - "github.com/oschwald/geoip2-golang" -) - -var log = clog.NewWithPlugin(pluginName) - -// GeoIP is a plugin that add geo location data to the request context by looking up a maxmind -// geoIP2 database, and which data can be later consumed by other middlewares. -type GeoIP struct { - Next plugin.Handler - db db - edns0 bool -} - -type db struct { - *geoip2.Reader - // provides defines the schemas that can be obtained by querying this database, by using - // bitwise operations. - provides int -} - -const ( - city = 1 << iota -) - -var probingIP = net.ParseIP("127.0.0.1") - -func newGeoIP(dbPath string, edns0 bool) (*GeoIP, error) { - reader, err := geoip2.Open(dbPath) - if err != nil { - return nil, fmt.Errorf("failed to open database file: %v", err) - } - db := db{Reader: reader} - schemas := []struct { - provides int - name string - validate func() error - }{ - {name: "city", provides: city, validate: func() error { _, err := reader.City(probingIP); return err }}, - } - // Query the database to figure out the database type. - for _, schema := range schemas { - if err := schema.validate(); err != nil { - // If we get an InvalidMethodError then we know this database does not provide that schema. - if _, ok := err.(geoip2.InvalidMethodError); !ok { - return nil, fmt.Errorf("unexpected failure looking up database %q schema %q: %v", filepath.Base(dbPath), schema.name, err) - } - } else { - db.provides |= schema.provides - } - } - - if db.provides&city == 0 { - return nil, fmt.Errorf("database does not provide city schema") - } - - return &GeoIP{db: db, edns0: edns0}, nil -} - -// ServeDNS implements the plugin.Handler interface. -func (g GeoIP) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - return plugin.NextOrFailure(pluginName, g.Next, ctx, w, r) -} - -// Metadata implements the metadata.Provider Interface in the metadata plugin, and is used to store -// the data associated with the source IP of every request. -func (g GeoIP) Metadata(ctx context.Context, state request.Request) context.Context { - srcIP := net.ParseIP(state.IP()) - - if g.edns0 { - if o := state.Req.IsEdns0(); o != nil { - for _, s := range o.Option { - if e, ok := s.(*dns.EDNS0_SUBNET); ok { - srcIP = e.Address - break - } - } - } - } - - switch g.db.provides & city { - case city: - data, err := g.db.City(srcIP) - if err != nil { - log.Debugf("Setting up metadata failed due to database lookup error: %v", err) - return ctx - } - g.setCityMetadata(ctx, data) - } - return ctx -} - -// Name implements the Handler interface. -func (g GeoIP) Name() string { return pluginName } diff --git a/plugin/geoip/geoip_test.go b/plugin/geoip/geoip_test.go deleted file mode 100644 index 7f12be9d12..0000000000 --- a/plugin/geoip/geoip_test.go +++ /dev/null @@ -1,91 +0,0 @@ -package geoip - -import ( - "context" - "fmt" - "net" - "testing" - - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestMetadata(t *testing.T) { - tests := []struct { - label string - expectedValue string - }{ - {"geoip/city/name", "Cambridge"}, - - {"geoip/country/code", "GB"}, - {"geoip/country/name", "United Kingdom"}, - // is_in_european_union is set to true only to work around bool zero value, and test is really being set. - {"geoip/country/is_in_european_union", "true"}, - - {"geoip/continent/code", "EU"}, - {"geoip/continent/name", "Europe"}, - - {"geoip/latitude", "52.2242"}, - {"geoip/longitude", "0.1315"}, - {"geoip/timezone", "Europe/London"}, - {"geoip/postalcode", "CB4"}, - } - - knownIPAddr := "81.2.69.142" // This IP should be part of the CDIR address range used to create the database fixtures. - for _, tc := range tests { - t.Run(fmt.Sprintf("%s/%s", tc.label, "direct"), func(t *testing.T) { - geoIP, err := newGeoIP(cityDBPath, false) - if err != nil { - t.Fatalf("unable to create geoIP plugin: %v", err) - } - state := request.Request{ - Req: new(dns.Msg), - W: &test.ResponseWriter{RemoteIP: knownIPAddr}, - } - testMetadata(t, state, geoIP, tc.label, tc.expectedValue) - }) - - t.Run(fmt.Sprintf("%s/%s", tc.label, "subnet"), func(t *testing.T) { - geoIP, err := newGeoIP(cityDBPath, true) - if err != nil { - t.Fatalf("unable to create geoIP plugin: %v", err) - } - state := request.Request{ - Req: new(dns.Msg), - W: &test.ResponseWriter{RemoteIP: "127.0.0.1"}, - } - state.Req.SetEdns0(4096, false) - if o := state.Req.IsEdns0(); o != nil { - addr := net.ParseIP(knownIPAddr) - o.Option = append(o.Option, (&dns.EDNS0_SUBNET{ - SourceNetmask: 32, - Address: addr, - })) - } - testMetadata(t, state, geoIP, tc.label, tc.expectedValue) - }) - } -} - -func testMetadata(t *testing.T, state request.Request, geoIP *GeoIP, label, expectedValue string) { - t.Helper() - ctx := metadata.ContextWithMetadata(context.Background()) - rCtx := geoIP.Metadata(ctx, state) - if fmt.Sprintf("%p", ctx) != fmt.Sprintf("%p", rCtx) { - t.Errorf("returned context is expected to be the same one passed in the Metadata function") - } - - fn := metadata.ValueFunc(ctx, label) - if fn == nil { - t.Errorf("label %q not set in metadata plugin context", label) - return - } - value := fn() - if value != expectedValue { - t.Errorf("expected value for label %q should be %q, got %q instead", - label, expectedValue, value) - } -} diff --git a/plugin/geoip/setup.go b/plugin/geoip/setup.go deleted file mode 100644 index 7f6e16f3ee..0000000000 --- a/plugin/geoip/setup.go +++ /dev/null @@ -1,57 +0,0 @@ -package geoip - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -const pluginName = "geoip" - -func init() { plugin.Register(pluginName, setup) } - -func setup(c *caddy.Controller) error { - geoip, err := geoipParse(c) - if err != nil { - return plugin.Error(pluginName, err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - geoip.Next = next - return geoip - }) - - return nil -} - -func geoipParse(c *caddy.Controller) (*GeoIP, error) { - var dbPath string - var edns0 bool - - for c.Next() { - if !c.NextArg() { - return nil, c.ArgErr() - } - if dbPath != "" { - return nil, c.Errf("configuring multiple databases is not supported") - } - dbPath = c.Val() - // There shouldn't be any more arguments. - if len(c.RemainingArgs()) != 0 { - return nil, c.ArgErr() - } - - for c.NextBlock() { - if c.Val() != "edns-subnet" { - return nil, c.Errf("unknown property %q", c.Val()) - } - edns0 = true - } - } - - geoIP, err := newGeoIP(dbPath, edns0) - if err != nil { - return geoIP, c.Err(err.Error()) - } - return geoIP, nil -} diff --git a/plugin/geoip/setup_test.go b/plugin/geoip/setup_test.go deleted file mode 100644 index b9b0030ee3..0000000000 --- a/plugin/geoip/setup_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package geoip - -import ( - "fmt" - "net" - "path/filepath" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -var ( - fixturesDir = "./testdata" - cityDBPath = filepath.Join(fixturesDir, "GeoLite2-City.mmdb") - unknownDBPath = filepath.Join(fixturesDir, "GeoLite2-UnknownDbType.mmdb") -) - -func TestProbingIP(t *testing.T) { - if probingIP == nil { - t.Fatalf("Invalid probing IP: %q", probingIP) - } -} - -func TestSetup(t *testing.T) { - c := caddy.NewTestController("dns", fmt.Sprintf("%s %s", pluginName, cityDBPath)) - plugins := dnsserver.GetConfig(c).Plugin - if len(plugins) != 0 { - t.Fatalf("Expected zero plugins after setup, %d found", len(plugins)) - } - if err := setup(c); err != nil { - t.Fatalf("Expected no errors, but got: %v", err) - } - plugins = dnsserver.GetConfig(c).Plugin - if len(plugins) != 1 { - t.Fatalf("Expected one plugin after setup, %d found", len(plugins)) - } -} - -func TestGeoIPParse(t *testing.T) { - c := caddy.NewTestController("dns", fmt.Sprintf("%s %s", pluginName, cityDBPath)) - if err := setup(c); err != nil { - t.Fatalf("Expected no errors, but got: %v", err) - } - - tests := []struct { - shouldErr bool - config string - expectedErr string - expectedDBType int - }{ - // Valid - {false, fmt.Sprintf("%s %s\n", pluginName, cityDBPath), "", city}, - {false, fmt.Sprintf("%s %s { edns-subnet }", pluginName, cityDBPath), "", city}, - - // Invalid - {true, pluginName, "Wrong argument count", 0}, - {true, fmt.Sprintf("%s %s {\n\tlanguages en fr es zh-CN\n}\n", pluginName, cityDBPath), "unknown property \"languages\"", 0}, - {true, fmt.Sprintf("%s %s\n%s %s\n", pluginName, cityDBPath, pluginName, cityDBPath), "configuring multiple databases is not supported", 0}, - {true, fmt.Sprintf("%s 1 2 3", pluginName), "Wrong argument count", 0}, - {true, fmt.Sprintf("%s { }", pluginName), "Error during parsing", 0}, - {true, fmt.Sprintf("%s /dbpath { city }", pluginName), "unknown property \"city\"", 0}, - {true, fmt.Sprintf("%s /invalidPath\n", pluginName), "failed to open database file: open /invalidPath: no such file or directory", 0}, - {true, fmt.Sprintf("%s %s\n", pluginName, unknownDBPath), "reader does not support the \"UnknownDbType\" database type", 0}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.config) - geoIP, err := geoipParse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found none for input %s", i, test.config) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.config, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.config) - } - continue - } - - if geoIP.db.Reader == nil { - t.Errorf("Test %d: after parsing database reader should be initialized", i) - } - - if geoIP.db.provides&test.expectedDBType == 0 { - t.Errorf("Test %d: expected db type %d not found, database file provides %d", i, test.expectedDBType, geoIP.db.provides) - } - } - - // Set nil probingIP to test unexpected validate error() - defer func(ip net.IP) { probingIP = ip }(probingIP) - probingIP = nil - - c = caddy.NewTestController("dns", fmt.Sprintf("%s %s\n", pluginName, cityDBPath)) - _, err := geoipParse(c) - if err != nil { - expectedErr := "unexpected failure looking up database" - if !strings.Contains(err.Error(), expectedErr) { - t.Errorf("expected error to contain: %s", expectedErr) - } - } else { - t.Errorf("with a nil probingIP test is expected to fail") - } -} diff --git a/plugin/geoip/testdata/GeoLite2-City.mmdb b/plugin/geoip/testdata/GeoLite2-City.mmdb deleted file mode 100644 index cd79ed914f078563e5f22bad01f4d30044b6c2d0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3281 zcmZA22YA$E7{Kv2ZKZ%Bf+8R*C}7zlpa`-$=q|Ie)FZuwYoM1L$z7pkxN&b0w-y(Q z3*37v4xG3r;6hPUa3boL{L3BM=eg&1@AyW(T%S)w6VZ|)S&F41*@|+J9HM=o1>{0Y z#epKNh+4zGuphL6{h=)!0PUbXsELAQ4}uPGFm!}Y&>0SaF3=UaL3ii@I`o7?;V|e0 zy`c{r4tdZQ`aypf00UtV42C0M2pkDRVHgaDqu^*50mr~d7zM||Xcz-yVH}Kyd?>nH5>=iVFt{ESuh)phZEpLh`<~$ zMC3A&8pV8(C`l76m8=z+OB4$U9wYeJ=}6{=V3v|O03slA5Vy%;WmOGARf3N_hnBrg|PnI0!sh+L^^H;P=9NnTCo zHE=Cl2iL<5&;+YOf`x7hXOWxX7Pu8whXh^0=XOQ5$Qq(M)Fyruxl{3>$Xz7whI>@< zZIQK#=S9|$ych0+`{4n25FUbu;SqQg9)ri>2{rX|B2N-M1y92>@N7u)=J!0q3+bf1 z$Vsdhd5Hlp!z=J=rgHN?})sciQW@=pK%|glWJSR&g3JJ zkEwkEpTcLVwuP3@MK+P#9J1Gg$rmDDQu``hldl=~jmXwa@>`PMiELxQ_nF!cBHPnZ zF#S*INPcGA4w0RV`vrc5-{5!n1O9|v@K;Fqw7Z$?Z}=y;_kypQG9WA68ANIyd)SAl z1>{0YXa%idU)T@Y!2Zw{4uE#hK1Ak-b`a}zfP90f>=?mw-Bs1(Ye`Gr>yRYDa^gh?gN=!8UBQA(dK2M`6TN^i)WG!Nf#2LEuhBz*ZhyL z_nav@>tP`*f(B?5ZE^DU>e zz=+p)wi&bXEnn|h8g-qd?O0B7OJUSCt^A^DJvTcm;tkL{Zq~a`C`x&5!qWTm#VC%t zDJSVQd=WI|4ZnVx?MG}UVuf9X6G=I?>u9+pw(my5>5B8id8(=%J87AEx$VSEH?H?D zpJLgLtE;r>mejdXBdG>{InjtlQ=SoRhNe@43JUUvP4TRl z?I$hIGSx=+Jd-|8cO_R}u3xBk+@yEcS629`8q=<~eYHD3D`!i1HmhIJmlqUO6^A{= zMNX{FaLlljw``{>6^yS8OI7Kk_G@j=TC-t$rLm~ecFaLhH@{aCS})|5i8+FYjd*ZY+JCa(lnArjp197WJAKLD$FmP zG_XMZ5C&GLV=p%?KkC_u;D|pjvlHo6T9m4t$5KYj@+GItQLmq~ct%@V?paaSGb6s; IXf<{H7i23y`Tzg` diff --git a/plugin/geoip/testdata/GeoLite2-UnknownDbType.mmdb b/plugin/geoip/testdata/GeoLite2-UnknownDbType.mmdb deleted file mode 100644 index 23efbf3962ed1bb3ecf6c5a6e207157359a3e756..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3280 zcmZA22Y3@@7{KxO!YC*%1Pcgwh+v@%m8Bp8ZPQ7MA_WvRTyjTxklcm4q)+YXDEU$ zik(He5^V$9LO0kBwuc>HN7xCvgPJHctU7#3xL2u{-yFy>+2mN6;&|v`V4g+Bi z7zBf1Pbh&QFceB*7z~FIFcS8HyNqFYE{7VFK(A6X5`u1e0M3ltDRE zKolyW3aX(7YC*m8;5|%*dT4-Ya3CC{P(P39Lk|1eIH>pj0CvvmmJ&{{T-U_#= zL? zN5S;p=Og)naX*S|X53HkGyDR-!f)_9`~iQ4gireyll=|<1ovL>RZ|8;@|{7X_OXRd zM4h1sxx6Lb%exuW%8y`HcO6hklQ4Sir&=nMUzKkNoN41nEX zAnXByU@&n1X(dEMU?`NrFc=OaU?l7Xdjt2MHi~F8jDfK*4)%rpU_4BK{b3>;0Fz)c zOo1{ehYE;7C2;>~)kHN=3+*p_Dp5T&z%)1z4g&5!?O>uA&LWuQ4HpS0dYux2^P!)?mzW&3f2sN!nSDh3(*3SDbdn}q(jn$jA#p~asRdd zBWyiqj?QLS1dE{smWZ~ru);Eu>V*IM_jyIa&bGAGCN0-7(pJniJ48yB{}c@Zzpc!2 zYRZjt+_TN3Rc876fSQEsWNpWCvKuNAu4$D;8}*_Nk(f73FK*NOS4MN5o3Zp#z8F;r zH|J!%mQRAFk}+4zu>F|r#H_H(aAG;fb{(y#+Vud|(`>8AD4 zy6KkfxVlQ4Zgt8{7+E#&(`iN`k@Jj1OUyG&JLj)@wmPLM*_>%LO|I>G$9WrDZ?8$Y zPLkB5N7w!JduU=Uf&)F$6W@X$&Q^&~MuNVGNZyH%6ZunL#+mf;B8=VD? zyU3}C&rngFY557y&IBjCzShp<7wKH1HlEBGNz0dxwT^oG9L3|>k#(Mxa6L2T+e@rf Geg6e*pFxoT diff --git a/plugin/geoip/testdata/README.md b/plugin/geoip/testdata/README.md deleted file mode 100644 index 2f6f884c9a..0000000000 --- a/plugin/geoip/testdata/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# testdata -This directory contains mmdb database files used during the testing of this plugin. - -# Create mmdb database files -If you need to change them to add a new value, or field the best is to recreate them, the code snipped used to create them initially is provided next. - -```golang -package main - -import ( - "log" - "net" - "os" - - "github.com/maxmind/mmdbwriter" - "github.com/maxmind/mmdbwriter/inserter" - "github.com/maxmind/mmdbwriter/mmdbtype" -) - -const cdir = "81.2.69.142/32" - -// Create new mmdb database fixtures in this directory. -func main() { - createCityDB("GeoLite2-City.mmdb", "DBIP-City-Lite") - // Create unkwnon database type. - createCityDB("GeoLite2-UnknownDbType.mmdb", "UnknownDbType") -} - -func createCityDB(dbName, dbType string) { - // Load a database writer. - writer, err := mmdbwriter.New(mmdbwriter.Options{DatabaseType: dbType}) - if err != nil { - log.Fatal(err) - } - - // Define and insert the new data. - _, ip, err := net.ParseCIDR(cdir) - if err != nil { - log.Fatal(err) - } - - // TODO(snebel29): Find an alternative location in Europe Union. - record := mmdbtype.Map{ - "city": mmdbtype.Map{ - "geoname_id": mmdbtype.Uint64(2653941), - "names": mmdbtype.Map{ - "en": mmdbtype.String("Cambridge"), - "es": mmdbtype.String("Cambridge"), - }, - }, - "continent": mmdbtype.Map{ - "code": mmdbtype.String("EU"), - "geoname_id": mmdbtype.Uint64(6255148), - "names": mmdbtype.Map{ - "en": mmdbtype.String("Europe"), - "es": mmdbtype.String("Europa"), - }, - }, - "country": mmdbtype.Map{ - "iso_code": mmdbtype.String("GB"), - "geoname_id": mmdbtype.Uint64(2635167), - "names": mmdbtype.Map{ - "en": mmdbtype.String("United Kingdom"), - "es": mmdbtype.String("Reino Unido"), - }, - "is_in_european_union": mmdbtype.Bool(true), - }, - "location": mmdbtype.Map{ - "accuracy_radius": mmdbtype.Uint16(200), - "latitude": mmdbtype.Float64(52.2242), - "longitude": mmdbtype.Float64(0.1315), - "metro_code": mmdbtype.Uint64(0), - "time_zone": mmdbtype.String("Europe/London"), - }, - "postal": mmdbtype.Map{ - "code": mmdbtype.String("CB4"), - }, - "registered_country": mmdbtype.Map{ - "iso_code": mmdbtype.String("GB"), - "geoname_id": mmdbtype.Uint64(2635167), - "names": mmdbtype.Map{"en": mmdbtype.String("United Kingdom")}, - "is_in_european_union": mmdbtype.Bool(false), - }, - "subdivisions": mmdbtype.Slice{ - mmdbtype.Map{ - "iso_code": mmdbtype.String("ENG"), - "geoname_id": mmdbtype.Uint64(6269131), - "names": mmdbtype.Map{"en": mmdbtype.String("England")}, - }, - mmdbtype.Map{ - "iso_code": mmdbtype.String("CAM"), - "geoname_id": mmdbtype.Uint64(2653940), - "names": mmdbtype.Map{"en": mmdbtype.String("Cambridgeshire")}, - }, - }, - } - - if err := writer.InsertFunc(ip, inserter.TopLevelMergeWith(record)); err != nil { - log.Fatal(err) - } - - // Write the DB to the filesystem. - fh, err := os.Create(dbName) - if err != nil { - log.Fatal(err) - } - _, err = writer.WriteTo(fh) - if err != nil { - log.Fatal(err) - } -} -``` diff --git a/plugin/grpc/README.md b/plugin/grpc/README.md deleted file mode 100644 index d4ee7e0066..0000000000 --- a/plugin/grpc/README.md +++ /dev/null @@ -1,161 +0,0 @@ -# grpc - -## Name - -*grpc* - facilitates proxying DNS messages to upstream resolvers via gRPC protocol. - -## Description - -The *grpc* plugin supports gRPC and TLS. - -This plugin can only be used once per Server Block. - -## Syntax - -In its most basic form: - -~~~ -grpc FROM TO... -~~~ - -* **FROM** is the base domain to match for the request to be proxied. -* **TO...** are the destination endpoints to proxy to. The number of upstreams is - limited to 15. - -Multiple upstreams are randomized (see `policy`) on first use. When a proxy returns an error -the next upstream in the list is tried. - -Extra knobs are available with an expanded syntax: - -~~~ -grpc FROM TO... { - except IGNORED_NAMES... - tls CERT KEY CA - tls_servername NAME - policy random|round_robin|sequential - fallthrough [ZONES...] -} -~~~ - -* **FROM** and **TO...** as above. -* **IGNORED_NAMES** in `except` is a space-separated list of domains to exclude from proxying. - Requests that match none of these names will be passed through. -* `tls` **CERT** **KEY** **CA** define the TLS properties for TLS connection. From 0 to 3 arguments can be - provided with the meaning as described below - - * `tls` - no client authentication is used, and the system CAs are used to verify the server certificate - * `tls` **CA** - no client authentication is used, and the file CA is used to verify the server certificate - * `tls` **CERT** **KEY** - client authentication is used with the specified cert/key pair. - The server certificate is verified with the system CAs - * `tls` **CERT** **KEY** **CA** - client authentication is used with the specified cert/key pair. - The server certificate is verified using the specified CA file - -* `tls_servername` **NAME** allows you to set a server name in the TLS configuration; for instance 9.9.9.9 - needs this to be set to `dns.quad9.net`. Multiple upstreams are still allowed in this scenario, - but they have to use the same `tls_servername`. E.g. mixing 9.9.9.9 (QuadDNS) with 1.1.1.1 - (Cloudflare) will not work. -* `policy` specifies the policy to use for selecting upstream servers. The default is `random`. -* `fallthrough` **[ZONES...]** If a query results in NXDOMAIN from the gRPC backend, pass the request - to the next plugin instead of returning the NXDOMAIN response. This is useful when the gRPC backend - is authoritative for a zone but should not return authoritative NXDOMAIN responses for queries that - don't actually belong to that zone (e.g., search path queries). If **[ZONES...]** is omitted, then - fallthrough happens for all zones. If specific zones are listed, then only queries for those zones - will be subject to fallthrough. - -Also note the TLS config is "global" for the whole grpc proxy if you need a different -`tls-name` for different upstreams you're out of luck. - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metric are exported: - -* `coredns_grpc_request_duration_seconds{to}` - duration per upstream interaction. -* `coredns_grpc_requests_total{to}` - query count per upstream. -* `coredns_grpc_responses_total{to, rcode}` - count of RCODEs per upstream. - and we are randomly (this always uses the `random` policy) spraying to an upstream. - -## Examples - -Proxy all requests within `example.org.` to a nameserver running on a different port: - -~~~ corefile -example.org { - grpc . 127.0.0.1:9005 -} -~~~ - -Load balance all requests between three resolvers, one of which has a IPv6 address. - -~~~ corefile -. { - grpc . 10.0.0.10:53 10.0.0.11:1053 [2003::1]:53 -} -~~~ - -Forward everything except requests to `example.org` - -~~~ corefile -. { - grpc . 10.0.0.10:1234 { - except example.org - } -} -~~~ - -Proxy everything except `example.org` using the host's `resolv.conf`'s nameservers: - -~~~ corefile -. { - grpc . /etc/resolv.conf { - except example.org - } -} -~~~ - -Proxy all requests to 9.9.9.9 using the TLS protocol, and cache every answer for up to 30 -seconds. Note the `tls_servername` is mandatory if you want a working setup, as 9.9.9.9 can't be -used in the TLS negotiation. - -~~~ corefile -. { - grpc . 9.9.9.9 { - tls_servername dns.quad9.net - } - cache 30 -} -~~~ - -Or with multiple upstreams from the same provider - -~~~ corefile -. { - grpc . 1.1.1.1 1.0.0.1 { - tls_servername cloudflare-dns.com - } - cache 30 -} -~~~ - -Forward requests to a local upstream listening on a Unix domain socket. - -~~~ corefile -. { - grpc . unix:///path/to/grpc.sock -} -~~~ - -Proxy requests for `example.org.` to a gRPC backend, but fallthrough to the next plugin for NXDOMAIN responses to handle search path queries correctly. - -~~~ corefile -example.org { - grpc . 127.0.0.1:9005 { - fallthrough - } - forward . 8.8.8.8 -} -~~~ - -## Bugs - -The TLS config is global for the whole grpc proxy if you need a different `tls_servername` for -different upstreams you're out of luck. \ No newline at end of file diff --git a/plugin/grpc/fuzz.go b/plugin/grpc/fuzz.go deleted file mode 100644 index df3a917ff0..0000000000 --- a/plugin/grpc/fuzz.go +++ /dev/null @@ -1,216 +0,0 @@ -//go:build gofuzz - -package grpc - -import ( - "context" - - "github.com/coredns/coredns/pb" - "github.com/coredns/coredns/plugin/pkg/fuzz" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" - grpcgo "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// fakeClient implements pb.DnsServiceClient without doing any network I/O. -// Its behavior is controlled by the mode field. -type fakeClient struct { - mode byte - idx int -} - -func (f *fakeClient) Query(_ context.Context, in *pb.DnsPacket, _ ...grpcgo.CallOption) (*pb.DnsPacket, error) { - // Derive mode deterministically from request bytes to vary behavior per call. - m := f.mode - if len(in.GetMsg()) > 0 { - b := in.GetMsg()[f.idx%len(in.GetMsg())] - f.idx++ - m = b - } - - switch m % 12 { - case 0: - // Success echo: return the same bytes. - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - case 1: - // Return NotFound to exercise NXDOMAIN conversion and optional fallthrough. - return nil, status.Error(codes.NotFound, "not found") - case 2: - // Return a transient error to trigger retry/rotation. - return nil, status.Error(codes.Unavailable, "unavailable") - case 3: - // Corrupt response that fails dns.Msg Unpack. - return &pb.DnsPacket{Msg: []byte{0x00, 0x01, 0x02}}, nil - case 4: - // Valid DNS message with mismatched ID/qname to trigger formerr path in ServeDNS. - var req dns.Msg - if err := req.Unpack(in.GetMsg()); err != nil { - // If input isn't a DNS message, just echo to avoid blocking fuzzing. - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - resp := new(dns.Msg) - resp.SetReply(&req) - resp.Id = req.Id + 1 - // Alter question name if present. - if len(req.Question) > 0 { - resp.Question[0].Name = "example.net." - } - packed, err := resp.Pack() - if err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - return &pb.DnsPacket{Msg: packed}, nil - case 5: - // Success with EDNS and larger answer to stress flags and sizes. - var req dns.Msg - if err := req.Unpack(in.GetMsg()); err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - resp := new(dns.Msg) - resp.SetReply(&req) - // Set EDNS0 with varying UDP size and DO bit based on m. - size := uint16(512) - if (m>>1)&1 == 1 { - size = 1232 - } - if (m>>2)&1 == 1 { - size = 4096 - } - do := ((m>>3)&1 == 1) - resp.SetEdns0(size, do) - // Optionally set TC bit to exercise truncation handling. - if (m>>4)&1 == 1 { - resp.Truncated = true - } - // Add a few TXT records to grow the payload. - name := "." - if len(req.Question) > 0 { - name = req.Question[0].Name - } - n := int(1 + (m % 16)) - for range n { - resp.Answer = append(resp.Answer, &dns.TXT{Hdr: dns.RR_Header{Name: name, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 0}, Txt: []string{"aaaaaaaaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbb"}}) - } - packed, err := resp.Pack() - if err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - return &pb.DnsPacket{Msg: packed}, nil - case 6: - return nil, status.Error(codes.DeadlineExceeded, "timeout") - case 7: - return nil, status.Error(codes.Internal, "internal") - case 8: - return nil, status.Error(codes.ResourceExhausted, "quota") - case 9: - return nil, status.Error(codes.PermissionDenied, "denied") - case 10: - // NODATA: NOERROR with empty Answer and SOA in Authority. - var req dns.Msg - if err := req.Unpack(in.GetMsg()); err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - resp := new(dns.Msg) - resp.SetRcode(&req, dns.RcodeSuccess) - name := "." - if len(req.Question) > 0 { - name = req.Question[0].Name - } - resp.Ns = append(resp.Ns, &dns.SOA{Hdr: dns.RR_Header{Name: name, Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: 60}, Ns: "ns.example.", Mbox: "hostmaster.example.", Serial: 1, Refresh: 3600, Retry: 600, Expire: 86400, Minttl: 60}) - packed, err := resp.Pack() - if err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - return &pb.DnsPacket{Msg: packed}, nil - case 11: - // TC-only: truncated response without answers. - var req dns.Msg - if err := req.Unpack(in.GetMsg()); err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - resp := new(dns.Msg) - resp.SetReply(&req) - resp.Truncated = true - packed, err := resp.Pack() - if err != nil { - return &pb.DnsPacket{Msg: in.GetMsg()}, nil - } - return &pb.DnsPacket{Msg: packed}, nil - default: - // Empty/zero-length response to exercise unpack error path. - return &pb.DnsPacket{Msg: nil}, nil - } -} - -// Fuzz exercises the grpc plugin using a fake client and the shared fuzz harness. -func Fuzz(data []byte) int { - if len(data) == 0 { - return 0 - } - - cfg := data[0] - rest := data[1:] - - g := &GRPC{ - from: ".", - Next: test.ErrorHandler(), - } - - // Select policy based on cfg bits to vary list() ordering. - switch cfg % 3 { - case 0: - g.p = &random{} - case 1: - g.p = &roundRobin{} - default: - g.p = &sequential{} - } - - // Optionally enable fallthrough; choose scope based on input bit. - if cfg&0x80 != 0 { - if cfg&0x01 != 0 { - g.Fall.SetZonesFromArgs([]string{"."}) - } else { - g.Fall.SetZonesFromArgs([]string{g.from}) - } - } - - // Create 0–3 fake proxies with varied behaviors. - numProxies := int((cfg >> 4) & 0x03) - if numProxies == 0 { - if _, is := g.p.(*roundRobin); is { - // Avoid divide-by-zero in roundRobin policy when pool is empty. - g.p = &sequential{} - } - } - for i := range numProxies { - mode := byte(i) - if len(rest) > 0 { - mode = rest[i%len(rest)] - } - p := &Proxy{addr: "fake"} - p.client = &fakeClient{mode: mode} - g.proxies = append(g.proxies, p) - } - - // Deterministically set a narrow from to miss match and hit Next/SERVFAIL paths. - if cfg&0x20 != 0 { - g.from = "_not_matching_." - } - - // Optionally construct a tiny deterministic query to vary RD/CD flags. - if cfg&0x08 != 0 { - var rq dns.Msg - rq.SetQuestion("example.org.", dns.TypeA) - rq.RecursionDesired = (cfg&0x04 != 0) - rq.CheckingDisabled = (cfg&0x02 != 0) - if packed, err := rq.Pack(); err == nil { - rest = packed - } - } - - return fuzz.Do(g, rest) -} diff --git a/plugin/grpc/grpc.go b/plugin/grpc/grpc.go deleted file mode 100644 index 31c3f7de89..0000000000 --- a/plugin/grpc/grpc.go +++ /dev/null @@ -1,171 +0,0 @@ -package grpc - -import ( - "context" - "crypto/tls" - "errors" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/debug" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" - ot "github.com/opentracing/opentracing-go" -) - -// GRPC represents a plugin instance that can proxy requests to another (DNS) server via gRPC protocol. -// It has a list of proxies each representing one upstream proxy. -type GRPC struct { - proxies []*Proxy - p Policy - - from string - ignored []string - - tlsConfig *tls.Config - tlsServerName string - - Fall fall.F - Next plugin.Handler -} - -// ServeDNS implements the plugin.Handler interface. -func (g *GRPC) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - if !g.match(state) { - if g.Next != nil { - return plugin.NextOrFailure(g.Name(), g.Next, ctx, w, r) - } - // No next plugin, return SERVFAIL - return dns.RcodeServerFailure, nil - } - - var ( - span ot.Span - ret *dns.Msg - err error - i int - ) - span = ot.SpanFromContext(ctx) - list := g.list() - deadline := time.Now().Add(defaultTimeout) - - for time.Now().Before(deadline) { - if i >= len(list) { - // reached the end of list without any answer - if ret != nil { - // write empty response and finish - w.WriteMsg(ret) - } - break - } - - proxy := list[i] - i++ - - callCtx := ctx - var child ot.Span - if span != nil { - child, callCtx = ot.StartSpanFromContext(callCtx, "query") - } - - var cancel context.CancelFunc - callCtx, cancel = context.WithDeadline(callCtx, deadline) - - ret, err = proxy.query(callCtx, r) - cancel() - - if child != nil { - child.Finish() - } - if err != nil { - // Continue with the next proxy - continue - } - - // Check if the reply is correct; if not return FormErr. - if !state.Match(ret) { - debug.Hexdumpf(ret, "Wrong reply for id: %d, %s %d", ret.Id, state.QName(), state.QType()) - - formerr := new(dns.Msg) - formerr.SetRcode(state.Req, dns.RcodeFormatError) - w.WriteMsg(formerr) - return 0, nil - } - - // Check if we should fallthrough on NXDOMAIN responses - if ret.Rcode == dns.RcodeNameError && g.Fall.Through(state.Name()) { - if g.Next != nil { - return plugin.NextOrFailure(g.Name(), g.Next, ctx, w, r) - } - // No next plugin to fallthrough to, return the NXDOMAIN response - } - - w.WriteMsg(ret) - return 0, nil - } - - // SERVFAIL if all healthy proxys returned errors. - if err != nil { - // If fallthrough is enabled, try the next plugin instead of returning SERVFAIL - if g.Fall.Through(state.Name()) && g.Next != nil { - return plugin.NextOrFailure(g.Name(), g.Next, ctx, w, r) - } - // just return the last error received - return dns.RcodeServerFailure, err - } - - // If fallthrough is enabled, try the next plugin instead of returning SERVFAIL - if g.Fall.Through(state.Name()) && g.Next != nil { - return plugin.NextOrFailure(g.Name(), g.Next, ctx, w, r) - } - - return dns.RcodeServerFailure, ErrNoHealthy -} - -// NewGRPC returns a new GRPC. -func newGRPC() *GRPC { - g := &GRPC{ - p: new(random), - } - return g -} - -// Name implements the Handler interface. -func (g *GRPC) Name() string { return "grpc" } - -// Len returns the number of configured proxies. -func (g *GRPC) len() int { return len(g.proxies) } - -func (g *GRPC) match(state request.Request) bool { - if !plugin.Name(g.from).Matches(state.Name()) || !g.isAllowedDomain(state.Name()) { - return false - } - - return true -} - -func (g *GRPC) isAllowedDomain(name string) bool { - if dns.Name(name) == dns.Name(g.from) { - return true - } - - for _, ignore := range g.ignored { - if plugin.Name(ignore).Matches(name) { - return false - } - } - return true -} - -// List returns a set of proxies to be used for this client depending on the policy in p. -func (g *GRPC) list() []*Proxy { return g.p.List(g.proxies) } - -const defaultTimeout = 5 * time.Second - -var ( - // ErrNoHealthy means no healthy proxies left. - ErrNoHealthy = errors.New("no healthy gRPC proxies") -) diff --git a/plugin/grpc/grpc_test.go b/plugin/grpc/grpc_test.go deleted file mode 100644 index f0ea12efbb..0000000000 --- a/plugin/grpc/grpc_test.go +++ /dev/null @@ -1,181 +0,0 @@ -package grpc - -import ( - "context" - "errors" - "strings" - "testing" - "time" - - "github.com/coredns/coredns/pb" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" - ot "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/mocktracer" - grpcgo "google.golang.org/grpc" -) - -func TestGRPC(t *testing.T) { - m := &dns.Msg{} - msg, err := m.Pack() - if err != nil { - t.Fatalf("Error packing response: %s", err.Error()) - } - dnsPacket := &pb.DnsPacket{Msg: msg} - tests := map[string]struct { - proxies []*Proxy - wantErr bool - }{ - "single_proxy_ok": { - proxies: []*Proxy{ - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - }, - wantErr: false, - }, - "multiple_proxies_ok": { - proxies: []*Proxy{ - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - }, - wantErr: false, - }, - "single_proxy_ko": { - proxies: []*Proxy{ - {client: &testServiceClient{dnsPacket: nil, err: errors.New("")}}, - }, - wantErr: true, - }, - "multiple_proxies_one_ko": { - proxies: []*Proxy{ - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - {client: &testServiceClient{dnsPacket: nil, err: errors.New("")}}, - {client: &testServiceClient{dnsPacket: dnsPacket, err: nil}}, - }, - wantErr: false, - }, - "multiple_proxies_ko": { - proxies: []*Proxy{ - {client: &testServiceClient{dnsPacket: nil, err: errors.New("")}}, - {client: &testServiceClient{dnsPacket: nil, err: errors.New("")}}, - {client: &testServiceClient{dnsPacket: nil, err: errors.New("")}}, - }, - wantErr: true, - }, - } - - for name, tt := range tests { - t.Run(name, func(t *testing.T) { - g := newGRPC() - g.from = "." - g.proxies = tt.proxies - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - if _, err := g.ServeDNS(context.TODO(), rec, m); err != nil && !tt.wantErr { - t.Fatal("Expected to receive reply, but didn't") - } - }) - } -} - -// Test that fallthrough works correctly when there's no next plugin -func TestGRPCFallthroughNoNext(t *testing.T) { - g := newGRPC() // Use the constructor to properly initialize - g.Fall = fall.Root // Enable fallthrough for all zones - g.Next = nil // No next plugin - g.from = "." - - // Create a test request - r := new(dns.Msg) - r.SetQuestion("test.example.org.", dns.TypeA) - - w := &test.ResponseWriter{} - - // Should return SERVFAIL since no backends are configured and no next plugin - rcode, err := g.ServeDNS(context.Background(), w, r) - - // Should not return the "no next plugin found" error - if err != nil && strings.Contains(err.Error(), "no next plugin found") { - t.Errorf("Expected no 'no next plugin found' error, got: %v", err) - } - - // Should return SERVFAIL - if rcode != dns.RcodeServerFailure { - t.Errorf("Expected SERVFAIL when no backends and no next plugin, got: %d", rcode) - } -} - -// deadlineCheckingClient records whether a deadline was attached to ctx. -type deadlineCheckingClient struct { - sawDeadline bool - lastDeadline time.Time - dnsPacket *pb.DnsPacket - err error -} - -func (c *deadlineCheckingClient) Query(ctx context.Context, in *pb.DnsPacket, opts ...grpcgo.CallOption) (*pb.DnsPacket, error) { - if dl, ok := ctx.Deadline(); ok { - c.sawDeadline = true - c.lastDeadline = dl - } - return c.dnsPacket, c.err -} - -// Test that on error paths we still finish child spans, and that we set a per-call deadline. -func TestGRPC_SpansOnErrorPath(t *testing.T) { - m := &dns.Msg{} - msgBytes, err := m.Pack() - if err != nil { - t.Fatalf("Error packing response: %s", err) - } - dnsPacket := &pb.DnsPacket{Msg: msgBytes} - - // Proxy 1: returns error, we should still finish its child span and have a deadline - p1 := &deadlineCheckingClient{dnsPacket: nil, err: errors.New("kaboom")} - // Proxy 2: returns success - p2 := &deadlineCheckingClient{dnsPacket: dnsPacket, err: nil} - - g := newGRPC() - g.from = "." - g.proxies = []*Proxy{{client: p1}, {client: p2}} - - // Ensure deterministic order of the retries: try p1 then p2 - g.p = new(sequential) - - // Set a parent span in context so ServeDNS creates child spans per attempt - tracer := mocktracer.New() - prev := ot.GlobalTracer() - ot.SetGlobalTracer(tracer) - defer ot.SetGlobalTracer(prev) - - parent := tracer.StartSpan("parent") - ctx := ot.ContextWithSpan(t.Context(), parent) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - if _, err := g.ServeDNS(ctx, rec, m); err != nil { - t.Fatalf("ServeDNS returned error: %v", err) - } - - // Assert both attempts finished child spans with retries - // (2 query spans: error + success) - finished := tracer.FinishedSpans() - var finishedQueries int - for _, s := range finished { - if s.OperationName == "query" { - finishedQueries++ - } - } - if finishedQueries != 2 { - t.Fatalf("expected 2 finished 'query' spans, got %d (finished: %v)", finishedQueries, finished) - } - - // Assert we set a deadline on the call contexts - if !p1.sawDeadline { - t.Fatalf("expected deadline to be set on first proxy call context") - } - if !p2.sawDeadline { - t.Fatalf("expected deadline to be set on second proxy call context") - } -} diff --git a/plugin/grpc/metrics.go b/plugin/grpc/metrics.go deleted file mode 100644 index 0e8760acf8..0000000000 --- a/plugin/grpc/metrics.go +++ /dev/null @@ -1,32 +0,0 @@ -package grpc - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -// Variables declared for monitoring. -var ( - RequestCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "grpc", - Name: "requests_total", - Help: "Counter of requests made per upstream.", - }, []string{"to"}) - RcodeCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "grpc", - Name: "responses_total", - Help: "Counter of requests made per upstream.", - }, []string{"rcode", "to"}) - RequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ - Namespace: plugin.Namespace, - Subsystem: "grpc", - Name: "request_duration_seconds", - Buckets: plugin.TimeBuckets, - NativeHistogramBucketFactor: plugin.NativeHistogramBucketFactor, - Help: "Histogram of the time each request took.", - }, []string{"to"}) -) diff --git a/plugin/grpc/policy.go b/plugin/grpc/policy.go deleted file mode 100644 index 0caf629456..0000000000 --- a/plugin/grpc/policy.go +++ /dev/null @@ -1,73 +0,0 @@ -package grpc - -import ( - "sync/atomic" - "time" - - "github.com/coredns/coredns/plugin/pkg/rand" -) - -// Policy defines a policy we use for selecting upstreams. -type Policy interface { - List([]*Proxy) []*Proxy - String() string -} - -// random is a policy that implements random upstream selection. -type random struct{} - -func (r *random) String() string { return "random" } - -func (r *random) List(p []*Proxy) []*Proxy { - switch len(p) { - case 0: - return nil - case 1: - return p - case 2: - if rn.Int()%2 == 0 { - return []*Proxy{p[1], p[0]} // swap - } - return p - } - - perms := rn.Perm(len(p)) - rnd := make([]*Proxy, len(p)) - - for i, p1 := range perms { - rnd[i] = p[p1] - } - return rnd -} - -// roundRobin is a policy that selects hosts based on round robin ordering. -type roundRobin struct { - robin uint32 -} - -func (r *roundRobin) String() string { return "round_robin" } - -func (r *roundRobin) List(p []*Proxy) []*Proxy { - if len(p) == 0 { - return nil - } - poolLen := uint32(len(p)) - i := atomic.AddUint32(&r.robin, 1) % poolLen - - robin := []*Proxy{p[i]} - robin = append(robin, p[:i]...) - robin = append(robin, p[i+1:]...) - - return robin -} - -// sequential is a policy that selects hosts based on sequential ordering. -type sequential struct{} - -func (r *sequential) String() string { return "sequential" } - -func (r *sequential) List(p []*Proxy) []*Proxy { - return p -} - -var rn = rand.New(time.Now().UnixNano()) diff --git a/plugin/grpc/policy_test.go b/plugin/grpc/policy_test.go deleted file mode 100644 index 5cd2d6ff31..0000000000 --- a/plugin/grpc/policy_test.go +++ /dev/null @@ -1,128 +0,0 @@ -package grpc - -import ( - "testing" -) - -func TestRoundRobinEmpty(t *testing.T) { - t.Parallel() - - r := &roundRobin{} - got := r.List(nil) - if len(got) != 0 { - t.Fatalf("expected length 0, got %d", len(got)) - } -} - -func TestRandomEmpty(t *testing.T) { - t.Parallel() - - r := &random{} - got := r.List(nil) - if len(got) != 0 { - t.Fatalf("expected length 0, got %d", len(got)) - } -} - -func TestSequentialEmpty(t *testing.T) { - t.Parallel() - - r := &sequential{} - got := r.List(nil) - if len(got) != 0 { - t.Fatalf("expected length 0, got %d", len(got)) - } -} - -func TestPoliciesOrdering(t *testing.T) { - t.Parallel() - - p0 := &Proxy{addr: "p0"} - p1 := &Proxy{addr: "p1"} - p2 := &Proxy{addr: "p2"} - in := []*Proxy{p0, p1, p2} - - t.Run("sequential keeps order", func(t *testing.T) { - t.Parallel() - - r := &sequential{} - got := r.List(in) - if len(got) != len(in) { - t.Fatalf("expected length %d, got %d", len(in), len(got)) - } - for i := range in { - if got[i] != in[i] { - t.Fatalf("sequential order changed at %d: want %p, got %p", i, in[i], got[i]) - } - } - }) - - t.Run("round robin advances and permutation", func(t *testing.T) { - t.Parallel() - - r := &roundRobin{} - - got1 := r.List(in) - if !isPermutation(in, got1) { - t.Fatalf("first call: expected permutation of input") - } - if got1[0] != p1 { - t.Fatalf("first element should advance to p1, got %p", got1[0]) - } - - got2 := r.List(in) - if !isPermutation(in, got2) { - t.Fatalf("second call: expected permutation of input") - } - if got2[0] != p2 { - t.Fatalf("first element should advance to p2 on second call, got %p", got2[0]) - } - - got3 := r.List(in) - if !isPermutation(in, got3) { - t.Fatalf("third call: expected permutation of input") - } - if got3[0] != p0 { - t.Fatalf("first element should wrap to p0 on third call, got %p", got3[0]) - } - }) - - t.Run("random is a permutation", func(t *testing.T) { - t.Parallel() - - r := &random{} - got := r.List(in) - if !isPermutation(in, got) { - t.Fatalf("random did not return a permutation of input") - } - }) - - t.Run("random with two proxies", func(t *testing.T) { - t.Parallel() - - r := &random{} - in2 := []*Proxy{p0, p1} - got := r.List(in2) - if !isPermutation(in2, got) { - t.Fatalf("random did not return a permutation of input") - } - }) -} - -// Helper: returns true if b is a permutation of a (same multiset of pointers). -func isPermutation(a, b []*Proxy) bool { - if len(a) != len(b) { - return false - } - count := make(map[*Proxy]int, len(a)) - for _, p := range a { - count[p]++ - } - for _, p := range b { - count[p]-- - if count[p] < 0 { - return false - } - } - return true -} diff --git a/plugin/grpc/proxy.go b/plugin/grpc/proxy.go deleted file mode 100644 index fc06a5a463..0000000000 --- a/plugin/grpc/proxy.go +++ /dev/null @@ -1,125 +0,0 @@ -package grpc - -import ( - "context" - "crypto/tls" - "errors" - "fmt" - "strconv" - "time" - - "github.com/coredns/coredns/pb" - - "github.com/miekg/dns" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/status" -) - -const ( - // maxDNSMessageBytes is the maximum size of a DNS message on the wire. - maxDNSMessageBytes = dns.MaxMsgSize - - // maxProtobufPayloadBytes accounts for protobuf overhead. - // Field tag=1 (1 byte) + length varint for 65535 (3 bytes) = 4 bytes total - maxProtobufPayloadBytes = maxDNSMessageBytes + 4 -) - -var ( - // ErrDNSMessageTooLarge is returned when a DNS message exceeds the maximum allowed size. - ErrDNSMessageTooLarge = errors.New("dns message exceeds size limit") -) - -// Proxy defines an upstream host. -type Proxy struct { - addr string - - // connection - client pb.DnsServiceClient - dialOpts []grpc.DialOption -} - -// newProxy returns a new proxy. -func newProxy(addr string, tlsConfig *tls.Config) (*Proxy, error) { - p := &Proxy{ - addr: addr, - } - - if tlsConfig != nil { - p.dialOpts = append(p.dialOpts, grpc.WithTransportCredentials(credentials.NewTLS(tlsConfig))) - } else { - p.dialOpts = append(p.dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials())) - } - - // Cap send/recv sizes to avoid oversized messages. - // Note: gRPC size limits apply to the serialized protobuf message size. - p.dialOpts = append(p.dialOpts, - grpc.WithDefaultCallOptions( - grpc.MaxCallRecvMsgSize(maxProtobufPayloadBytes), - grpc.MaxCallSendMsgSize(maxProtobufPayloadBytes), - ), - ) - - conn, err := grpc.NewClient(p.addr, p.dialOpts...) - if err != nil { - return nil, err - } - p.client = pb.NewDnsServiceClient(conn) - - return p, nil -} - -// query sends the request and waits for a response. -func (p *Proxy) query(ctx context.Context, req *dns.Msg) (*dns.Msg, error) { - start := time.Now() - - msg, err := req.Pack() - if err != nil { - return nil, err - } - - if err := validateDNSSize(msg); err != nil { - return nil, err - } - - reply, err := p.client.Query(ctx, &pb.DnsPacket{Msg: msg}) - if err != nil { - // if not found message, return empty message with NXDomain code - if status.Code(err) == codes.NotFound { - m := new(dns.Msg).SetRcode(req, dns.RcodeNameError) - return m, nil - } - return nil, err - } - wire := reply.GetMsg() - - if err := validateDNSSize(wire); err != nil { - return nil, err - } - - ret := new(dns.Msg) - if err := ret.Unpack(wire); err != nil { - return nil, err - } - - rc, ok := dns.RcodeToString[ret.Rcode] - if !ok { - rc = strconv.Itoa(ret.Rcode) - } - - RequestCount.WithLabelValues(p.addr).Add(1) - RcodeCount.WithLabelValues(rc, p.addr).Add(1) - RequestDuration.WithLabelValues(p.addr).Observe(time.Since(start).Seconds()) - - return ret, nil -} - -func validateDNSSize(data []byte) error { - l := len(data) - if l > maxDNSMessageBytes { - return fmt.Errorf("%w: %d bytes (limit %d)", ErrDNSMessageTooLarge, l, maxDNSMessageBytes) - } - return nil -} diff --git a/plugin/grpc/proxy_test.go b/plugin/grpc/proxy_test.go deleted file mode 100644 index b5c92f8e8b..0000000000 --- a/plugin/grpc/proxy_test.go +++ /dev/null @@ -1,148 +0,0 @@ -package grpc - -import ( - "context" - "errors" - "net" - "path" - "slices" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/pb" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" -) - -func TestProxy(t *testing.T) { - tests := map[string]struct { - p *Proxy - res *dns.Msg - wantErr bool - }{ - "response_ok": { - p: &Proxy{}, - res: &dns.Msg{}, - wantErr: false, - }, - "nil_response": { - p: &Proxy{}, - res: nil, - wantErr: true, - }, - "tls": { - p: &Proxy{dialOpts: []grpc.DialOption{grpc.WithTransportCredentials(credentials.NewTLS(nil))}}, - res: &dns.Msg{}, - wantErr: false, - }, - } - for name, tt := range tests { - t.Run(name, func(t *testing.T) { - var mock *testServiceClient - if tt.res != nil { - msg, err := tt.res.Pack() - if err != nil { - t.Fatalf("Error packing response: %s", err.Error()) - } - mock = &testServiceClient{&pb.DnsPacket{Msg: msg}, nil} - } else { - mock = &testServiceClient{nil, errors.New("server error")} - } - tt.p.client = mock - - _, err := tt.p.query(context.TODO(), new(dns.Msg)) - if err != nil && !tt.wantErr { - t.Fatalf("Error query(): %s", err.Error()) - } - }) - } -} - -func TestProxy_RejectsOversizedReply(t *testing.T) { - p := &Proxy{} - oversized := make([]byte, maxDNSMessageBytes+1) - p.client = testServiceClient{dnsPacket: &pb.DnsPacket{Msg: oversized}, err: nil} - _, err := p.query(context.TODO(), new(dns.Msg)) - if !errors.Is(err, ErrDNSMessageTooLarge) { - t.Fatalf("expected %v, got %v", ErrDNSMessageTooLarge, err) - } -} - -func TestProxy_RejectsOversizedRequest(t *testing.T) { - p := &Proxy{} - p.client = testServiceClient{dnsPacket: &pb.DnsPacket{Msg: []byte("ok")}, err: nil} - - oversizedMsg := &dns.Msg{} - oversizedMsg.SetQuestion("example.org.", dns.TypeA) - oversizedMsg.Extra = slices.Repeat([]dns.RR{&dns.TXT{ - Hdr: dns.RR_Header{Name: "example.org.", Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 300}, - Txt: []string{"very long text record to make the message oversized when packed"}, - }}, 2000) - - _, err := p.query(context.TODO(), oversizedMsg) - if !errors.Is(err, ErrDNSMessageTooLarge) { - t.Fatalf("expected %v, got %v", ErrDNSMessageTooLarge, err) - } -} - -type testServiceClient struct { - dnsPacket *pb.DnsPacket - err error -} - -func (m testServiceClient) Query(ctx context.Context, in *pb.DnsPacket, opts ...grpc.CallOption) (*pb.DnsPacket, error) { - return m.dnsPacket, m.err -} - -func TestProxyUnix(t *testing.T) { - tdir := t.TempDir() - - fd := path.Join(tdir, "test.grpc") - listener, err := net.Listen("unix", fd) - if err != nil { - t.Fatal("Failed to listen: ", err) - } - defer listener.Close() - - server := grpc.NewServer() - pb.RegisterDnsServiceServer(server, &grpcDnsServiceServer{}) - - go server.Serve(listener) - defer server.Stop() - - c := caddy.NewTestController("dns", "grpc . unix://"+fd) - g, err := parseGRPC(c) - - if err != nil { - t.Errorf("Failed to create forwarder: %s", err) - } - - m := new(dns.Msg) - m.SetQuestion("example.org.", dns.TypeA) - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - if _, err := g.ServeDNS(context.TODO(), rec, m); err != nil { - t.Fatal("Expected to receive reply, but didn't") - } - if x := rec.Msg.Answer[0].Header().Name; x != "example.org." { - t.Errorf("Expected %s, got %s", "example.org.", x) - } -} - -type grpcDnsServiceServer struct { - pb.UnimplementedDnsServiceServer -} - -func (*grpcDnsServiceServer) Query(ctx context.Context, in *pb.DnsPacket) (*pb.DnsPacket, error) { - msg := &dns.Msg{} - msg.Unpack(in.GetMsg()) - answer := new(dns.Msg) - answer.Answer = append(answer.Answer, test.A("example.org. IN A 127.0.0.1")) - answer.SetRcode(msg, dns.RcodeSuccess) - buf, _ := answer.Pack() - return &pb.DnsPacket{Msg: buf}, nil -} diff --git a/plugin/grpc/setup.go b/plugin/grpc/setup.go deleted file mode 100644 index ab72eb8ba8..0000000000 --- a/plugin/grpc/setup.go +++ /dev/null @@ -1,155 +0,0 @@ -package grpc - -import ( - "crypto/tls" - "fmt" - "path/filepath" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/parse" - pkgtls "github.com/coredns/coredns/plugin/pkg/tls" -) - -func init() { plugin.Register("grpc", setup) } - -func setup(c *caddy.Controller) error { - g, err := parseGRPC(c) - if err != nil { - return plugin.Error("grpc", err) - } - - if g.len() > max { - return plugin.Error("grpc", fmt.Errorf("more than %d TOs configured: %d", max, g.len())) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - g.Next = next // Set the Next field, so the plugin chaining works. - return g - }) - - return nil -} - -func parseGRPC(c *caddy.Controller) (*GRPC, error) { - var ( - g *GRPC - err error - i int - ) - for c.Next() { - if i > 0 { - return nil, plugin.ErrOnce - } - i++ - g, err = parseStanza(c) - if err != nil { - return nil, err - } - } - return g, nil -} - -func parseStanza(c *caddy.Controller) (*GRPC, error) { - g := newGRPC() - - if !c.Args(&g.from) { - return g, c.ArgErr() - } - normalized := plugin.Host(g.from).NormalizeExact() - if len(normalized) == 0 { - return g, fmt.Errorf("unable to normalize '%s'", g.from) - } - g.from = normalized[0] // only the first is used. - - to := c.RemainingArgs() - if len(to) == 0 { - return g, c.ArgErr() - } - - toHosts, err := parse.HostPortOrFile(to...) - if err != nil { - return g, err - } - - for c.NextBlock() { - if err := parseBlock(c, g); err != nil { - return g, err - } - } - - if g.tlsServerName != "" { - if g.tlsConfig == nil { - g.tlsConfig = new(tls.Config) - } - g.tlsConfig.ServerName = g.tlsServerName - } - for _, host := range toHosts { - pr, err := newProxy(host, g.tlsConfig) - if err != nil { - return nil, err - } - g.proxies = append(g.proxies, pr) - } - - return g, nil -} - -func parseBlock(c *caddy.Controller, g *GRPC) error { - switch c.Val() { - case "except": - ignore := c.RemainingArgs() - if len(ignore) == 0 { - return c.ArgErr() - } - for i := range ignore { - g.ignored = append(g.ignored, plugin.Host(ignore[i]).NormalizeExact()...) - } - case "tls": - args := c.RemainingArgs() - if len(args) > 3 { - return c.ArgErr() - } - - for i := range args { - if !filepath.IsAbs(args[i]) && dnsserver.GetConfig(c).Root != "" { - args[i] = filepath.Join(dnsserver.GetConfig(c).Root, args[i]) - } - } - tlsConfig, err := pkgtls.NewTLSConfigFromArgs(args...) - if err != nil { - return err - } - g.tlsConfig = tlsConfig - case "tls_servername": - if !c.NextArg() { - return c.ArgErr() - } - g.tlsServerName = c.Val() - case "policy": - if !c.NextArg() { - return c.ArgErr() - } - switch x := c.Val(); x { - case "random": - g.p = &random{} - case "round_robin": - g.p = &roundRobin{} - case "sequential": - g.p = &sequential{} - default: - return c.Errf("unknown policy '%s'", x) - } - case "fallthrough": - g.Fall.SetZonesFromArgs(c.RemainingArgs()) - default: - if c.Val() != "}" { - return c.Errf("unknown property '%s'", c.Val()) - } - } - - return nil -} - -const max = 15 // Maximum number of upstreams. diff --git a/plugin/grpc/setup_policy_test.go b/plugin/grpc/setup_policy_test.go deleted file mode 100644 index c13339d966..0000000000 --- a/plugin/grpc/setup_policy_test.go +++ /dev/null @@ -1,47 +0,0 @@ -package grpc - -import ( - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestSetupPolicy(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedPolicy string - expectedErr string - }{ - // positive - {"grpc . 127.0.0.1 {\npolicy random\n}\n", false, "random", ""}, - {"grpc . 127.0.0.1 {\npolicy round_robin\n}\n", false, "round_robin", ""}, - {"grpc . 127.0.0.1 {\npolicy sequential\n}\n", false, "sequential", ""}, - // negative - {"grpc . 127.0.0.1 {\npolicy random2\n}\n", true, "random", "unknown policy"}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - g, err := parseGRPC(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.input) - } - } - - if !test.shouldErr && g.p.String() != test.expectedPolicy { - t.Errorf("Test %d: expected: %s, got: %s", i, test.expectedPolicy, g.p.String()) - } - } -} diff --git a/plugin/grpc/setup_test.go b/plugin/grpc/setup_test.go deleted file mode 100644 index bafd638cfc..0000000000 --- a/plugin/grpc/setup_test.go +++ /dev/null @@ -1,199 +0,0 @@ -package grpc - -import ( - "os" - "reflect" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/pkg/fall" -) - -func TestSetup(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedFrom string - expectedIgnored []string - expectedErr string - }{ - // positive - {"grpc . 127.0.0.1", false, ".", nil, ""}, - {"grpc . 127.0.0.1 {\nexcept miek.nl\n}\n", false, ".", nil, ""}, - {"grpc . 127.0.0.1", false, ".", nil, ""}, - {"grpc . 127.0.0.1:53", false, ".", nil, ""}, - {"grpc . 127.0.0.1:8080", false, ".", nil, ""}, - {"grpc . [::1]:53", false, ".", nil, ""}, - {"grpc . [2003::1]:53", false, ".", nil, ""}, - {"grpc . unix:///var/run/g.sock", false, ".", nil, ""}, - // negative - {"grpc . a27.0.0.1", true, "", nil, "not an IP"}, - {"grpc . 127.0.0.1 {\nblaatl\n}\n", true, "", nil, "unknown property"}, - {`grpc . ::1 - grpc com ::2`, true, "", nil, "plugin"}, - {"grpc xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 127.0.0.1", true, "", nil, "unable to normalize 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'"}, - } - - for i, test := range tests { - c := caddy.NewTestController("grpc", test.input) - g, err := parseGRPC(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.input) - } - } - - if !test.shouldErr && g.from != test.expectedFrom { - t.Errorf("Test %d: expected: %s, got: %s", i, test.expectedFrom, g.from) - } - if !test.shouldErr && test.expectedIgnored != nil { - if !reflect.DeepEqual(g.ignored, test.expectedIgnored) { - t.Errorf("Test %d: expected: %q, actual: %q", i, test.expectedIgnored, g.ignored) - } - } - } -} - -func TestSetupTLS(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedServerName string - expectedErr string - }{ - // positive - {`grpc . 127.0.0.1 { -tls_servername dns -}`, false, "dns", ""}, - {`grpc . 127.0.0.1 { -tls -}`, false, "", ""}, - {`grpc . 127.0.0.1`, false, "", ""}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - g, err := parseGRPC(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.input) - } - } - - if !test.shouldErr && test.expectedServerName != "" && g.tlsConfig != nil && test.expectedServerName != g.tlsConfig.ServerName { - t.Errorf("Test %d: expected: %q, actual: %q", i, test.expectedServerName, g.tlsConfig.ServerName) - } - } -} - -func TestSetupResolvconf(t *testing.T) { - const resolv = "resolv.conf" - if err := os.WriteFile(resolv, - []byte(`nameserver 10.10.255.252 -nameserver 10.10.255.253`), 0666); err != nil { - t.Fatalf("Failed to write resolv.conf file: %s", err) - } - defer os.Remove(resolv) - - tests := []struct { - input string - shouldErr bool - expectedErr string - expectedNames []string - }{ - // pass - {`grpc . ` + resolv, false, "", []string{"10.10.255.252:53", "10.10.255.253:53"}}, - } - - for i, test := range tests { - c := caddy.NewTestController("grpc", test.input) - f, err := parseGRPC(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found %s for input %s", i, err, test.input) - continue - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.input) - } - } - - if !test.shouldErr { - for j, n := range test.expectedNames { - addr := f.proxies[j].addr - if n != addr { - t.Errorf("Test %d, expected %q, got %q", j, n, addr) - } - } - } - } -} - -func TestSetupFallthrough(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedFallthrough fall.F - expectedErr string - }{ - // positive cases - {`grpc . 127.0.0.1 { - fallthrough -}`, false, fall.Root, ""}, - {`grpc . 127.0.0.1 { - fallthrough example.org -}`, false, fall.F{Zones: []string{"example.org."}}, ""}, - {`grpc . 127.0.0.1 { - fallthrough example.org example.com -}`, false, fall.F{Zones: []string{"example.org.", "example.com."}}, ""}, - {`grpc . 127.0.0.1`, false, fall.Zero, ""}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - g, err := parseGRPC(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: expected error but found none for input %s", i, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: expected no error but found one for input %s, got: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErr) { - t.Errorf("Test %d: expected error to contain: %v, found error: %v, input: %s", i, test.expectedErr, err, test.input) - } - } - - if !test.shouldErr && !g.Fall.Equal(test.expectedFallthrough) { - t.Errorf("Test %d: expected fallthrough %+v, got %+v", i, test.expectedFallthrough, g.Fall) - } - } -} diff --git a/plugin/header/README.md b/plugin/header/README.md deleted file mode 100644 index a27a1b9cb4..0000000000 --- a/plugin/header/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# header - -## Name - -*header* - modifies the header for queries and responses. - -## Description - -*header* ensures that the flags are in the desired state for queries and responses. -The modifications are made transparently for the client and subsequent plugins. - -## Syntax - -~~~ -header { - SELECTOR ACTION FLAGS... - SELECTOR ACTION FLAGS... -} -~~~ - -* **SELECTOR** defines if the action should be applied on `query` or `response`. - -* **ACTION** defines the state for DNS message header flags. Actions are evaluated in the order they are defined so last one has the - most precedence. Allowed values are: - * `set` - * `clear` -* **FLAGS** are the DNS header flags that will be modified. Current supported flags include: - * `aa` - Authoritative(Answer) - * `ra` - RecursionAvailable - * `rd` - RecursionDesired - -## Examples - -Make sure recursive available `ra` flag is set in all the responses: - -~~~ corefile -. { - header { - response set ra - } -} -~~~ - -Make sure "recursion available" `ra` and "authoritative answer" `aa` flags are set and "recursion desired" is cleared in all responses: - -~~~ corefile -. { - header { - response set ra aa - response clear rd - } -} -~~~ - -Make sure "recursion desired" `rd` is set for all subsequent plugins:: - -~~~ corefile -. { - header { - query set rd - } -} -~~~ diff --git a/plugin/header/handler.go b/plugin/header/handler.go deleted file mode 100644 index e11eb03c46..0000000000 --- a/plugin/header/handler.go +++ /dev/null @@ -1,27 +0,0 @@ -package header - -import ( - "context" - - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -// Header modifies flags of dns.MsgHdr in queries and / or responses -type Header struct { - QueryRules []Rule - ResponseRules []Rule - Next plugin.Handler -} - -// ServeDNS implements the plugin.Handler interface. -func (h Header) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - applyRules(r, h.QueryRules) - - wr := ResponseHeaderWriter{ResponseWriter: w, Rules: h.ResponseRules} - return plugin.NextOrFailure(h.Name(), h.Next, ctx, &wr, r) -} - -// Name implements the plugin.Handler interface. -func (h Header) Name() string { return "header" } diff --git a/plugin/header/header.go b/plugin/header/header.go deleted file mode 100644 index 785d7ff087..0000000000 --- a/plugin/header/header.go +++ /dev/null @@ -1,95 +0,0 @@ -package header - -import ( - "fmt" - "strings" - - clog "github.com/coredns/coredns/plugin/pkg/log" - - "github.com/miekg/dns" -) - -// Supported flags -const ( - authoritative = "aa" - recursionAvailable = "ra" - recursionDesired = "rd" -) - -var log = clog.NewWithPlugin("header") - -// ResponseHeaderWriter is a response writer that allows modifying dns.MsgHdr -type ResponseHeaderWriter struct { - dns.ResponseWriter - Rules []Rule -} - -// WriteMsg implements the dns.ResponseWriter interface. -func (r *ResponseHeaderWriter) WriteMsg(res *dns.Msg) error { - applyRules(res, r.Rules) - return r.ResponseWriter.WriteMsg(res) -} - -// Write implements the dns.ResponseWriter interface. -func (r *ResponseHeaderWriter) Write(buf []byte) (int, error) { - log.Warning("ResponseHeaderWriter called with Write: not ensuring headers") - n, err := r.ResponseWriter.Write(buf) - return n, err -} - -// Rule is used to set/clear Flag in dns.MsgHdr -type Rule struct { - Flag string - State bool -} - -func newRules(key string, args []string) ([]Rule, error) { - if key == "" { - return nil, fmt.Errorf("no flag action provided") - } - - if len(args) < 1 { - return nil, fmt.Errorf("invalid length for flags, at least one should be provided") - } - - var state bool - action := strings.ToLower(key) - switch action { - case "set": - state = true - case "clear": - state = false - default: - return nil, fmt.Errorf("unknown flag action=%s, should be set or clear", action) - } - - rules := make([]Rule, 0, len(args)) - for _, arg := range args { - flag := strings.ToLower(arg) - switch flag { - case authoritative: - case recursionAvailable: - case recursionDesired: - default: - return nil, fmt.Errorf("unknown/unsupported flag=%s", flag) - } - rule := Rule{Flag: flag, State: state} - rules = append(rules, rule) - } - - return rules, nil -} - -func applyRules(res *dns.Msg, rules []Rule) { - // handle all supported flags - for _, rule := range rules { - switch rule.Flag { - case authoritative: - res.Authoritative = rule.State - case recursionAvailable: - res.RecursionAvailable = rule.State - case recursionDesired: - res.RecursionDesired = rule.State - } - } -} diff --git a/plugin/header/header_test.go b/plugin/header/header_test.go deleted file mode 100644 index 118265419c..0000000000 --- a/plugin/header/header_test.go +++ /dev/null @@ -1,152 +0,0 @@ -package header - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestHeaderResponseRules(t *testing.T) { - wr := dnstest.NewRecorder(&test.ResponseWriter{}) - next := plugin.HandlerFunc(func(ctx context.Context, writer dns.ResponseWriter, msg *dns.Msg) (int, error) { - writer.WriteMsg(msg) - return dns.RcodeSuccess, nil - }) - - tests := []struct { - handler plugin.Handler - got func(msg *dns.Msg) bool - expected bool - }{ - { - handler: Header{ - ResponseRules: []Rule{{Flag: recursionAvailable, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionAvailable - }, - expected: true, - }, - { - handler: Header{ - ResponseRules: []Rule{{Flag: recursionAvailable, State: false}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionAvailable - }, - expected: false, - }, - { - handler: Header{ - ResponseRules: []Rule{{Flag: recursionDesired, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionDesired - }, - expected: true, - }, - { - handler: Header{ - ResponseRules: []Rule{{Flag: authoritative, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.Authoritative - }, - expected: true, - }, - } - - for i, test := range tests { - m := new(dns.Msg) - - _, err := test.handler.ServeDNS(context.TODO(), wr, m) - if err != nil { - t.Errorf("Test %d: Expected no error, but got %s", i, err) - continue - } - - if test.got(m) != test.expected { - t.Errorf("Test %d: Expected flag state=%t, but got %t", i, test.expected, test.got(m)) - continue - } - } -} - -func TestHeaderQueryRules(t *testing.T) { - wr := dnstest.NewRecorder(&test.ResponseWriter{}) - next := plugin.HandlerFunc(func(ctx context.Context, writer dns.ResponseWriter, msg *dns.Msg) (int, error) { - writer.WriteMsg(msg) - return dns.RcodeSuccess, nil - }) - - tests := []struct { - handler plugin.Handler - got func(msg *dns.Msg) bool - expected bool - }{ - { - handler: Header{ - QueryRules: []Rule{{Flag: recursionAvailable, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionAvailable - }, - expected: true, - }, - { - handler: Header{ - QueryRules: []Rule{{Flag: recursionDesired, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionDesired - }, - expected: true, - }, - { - handler: Header{ - QueryRules: []Rule{{Flag: recursionDesired, State: false}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.RecursionDesired - }, - expected: false, - }, - { - handler: Header{ - QueryRules: []Rule{{Flag: authoritative, State: true}}, - Next: next, - }, - got: func(msg *dns.Msg) bool { - return msg.Authoritative - }, - expected: true, - }, - } - - for i, tc := range tests { - m := new(dns.Msg) - - _, err := tc.handler.ServeDNS(context.TODO(), wr, m) - if err != nil { - t.Errorf("Test %d: Expected no error, but got %s", i, err) - continue - } - - if tc.got(m) != tc.expected { - t.Errorf("Test %d: Expected flag state=%t, but got %t", i, tc.expected, tc.got(m)) - continue - } - } -} diff --git a/plugin/header/setup.go b/plugin/header/setup.go deleted file mode 100644 index 2a7761bb32..0000000000 --- a/plugin/header/setup.go +++ /dev/null @@ -1,67 +0,0 @@ -package header - -import ( - "fmt" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("header", setup) } - -func setup(c *caddy.Controller) error { - queryRules, responseRules, err := parse(c) - if err != nil { - return plugin.Error("header", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return Header{ - QueryRules: queryRules, - ResponseRules: responseRules, - Next: next, - } - }) - - return nil -} - -func parse(c *caddy.Controller) ([]Rule, []Rule, error) { - for c.Next() { - var queryRules []Rule - var responseRules []Rule - - for c.NextBlock() { - selector := strings.ToLower(c.Val()) - - var action string - switch selector { - case "query", "response": - if c.NextArg() { - action = c.Val() - } - default: - return nil, nil, fmt.Errorf("setting up rule: invalid selector=%s should be query or response", selector) - } - - args := c.RemainingArgs() - rules, err := newRules(action, args) - if err != nil { - return nil, nil, fmt.Errorf("setting up rule: %w", err) - } - - if selector == "response" { - responseRules = append(responseRules, rules...) - } else { - queryRules = append(queryRules, rules...) - } - } - - if len(queryRules) > 0 || len(responseRules) > 0 { - return queryRules, responseRules, nil - } - } - return nil, nil, c.ArgErr() -} diff --git a/plugin/header/setup_test.go b/plugin/header/setup_test.go deleted file mode 100644 index 48d23335d7..0000000000 --- a/plugin/header/setup_test.go +++ /dev/null @@ -1,59 +0,0 @@ -package header - -import ( - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestSetupHeader(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedErrContent string - }{ - {`header {}`, true, "Wrong argument count or unexpected line ending after"}, - {`header { - foo -}`, true, "invalid selector=foo should be query or response"}, - {`header { - response set -}`, true, "invalid length for flags, at least one should be provided"}, - {`header { - query foo -}`, true, "invalid length for flags, at least one should be provided"}, - {`header { - query foo rd -}`, true, "unknown flag action=foo, should be set or clear"}, - {`header { - query set rd - }`, false, ""}, - {`header { - response set aa - }`, false, ""}, - {`header { - response set ra aa - query clear rd -}`, false, ""}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found none for input %s", i, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - } -} diff --git a/plugin/hosts/README.md b/plugin/hosts/README.md deleted file mode 100644 index dde6259a66..0000000000 --- a/plugin/hosts/README.md +++ /dev/null @@ -1,125 +0,0 @@ -# hosts - -## Name - -*hosts* - enables serving zone data from a `/etc/hosts` style file. - -## Description - -The *hosts* plugin is useful for serving zones from a `/etc/hosts` file. It serves from a preloaded -file that exists on disk. It checks the file for changes and updates the zones accordingly. This -plugin only supports A, AAAA, and PTR records. The hosts plugin can be used with readily -available hosts files that block access to advertising servers. - -The plugin reloads the content of the hosts file every 5 seconds. Upon reload, CoreDNS will use the -new definitions. Should the file be deleted, any inlined content will continue to be served. When -the file is restored, it will then again be used. - -If you want to pass the request to the rest of the plugin chain if there is no match in the *hosts* -plugin, you must specify the `fallthrough` option. - -This plugin can only be used once per Server Block. - -## The hosts file - -Commonly the entries are of the form `IP_address canonical_hostname [aliases...]` as explained by -the hosts(5) man page. - -Examples: - -~~~ -# The following lines are desirable for IPv4 capable hosts -127.0.0.1 localhost -192.168.1.10 example.com example - -# The following lines are desirable for IPv6 capable hosts -::1 localhost ip6-localhost ip6-loopback -fdfc:a744:27b5:3b0e::1 example.com example -~~~ - -### PTR records - -PTR records for reverse lookups are generated automatically by CoreDNS (based on the hosts file -entries) and cannot be created manually. - -## Syntax - -~~~ -hosts [FILE [ZONES...]] { - [INLINE] - ttl SECONDS - no_reverse - reload DURATION - fallthrough [ZONES...] -} -~~~ - -* **FILE** the hosts file to read and parse. If the path is relative the path from the *root* - plugin will be prepended to it. Defaults to /etc/hosts if omitted. We scan the file for changes - every 5 seconds. -* **ZONES** zones it should be authoritative for. If empty, the zones from the configuration block - are used. -* **INLINE** the hosts file contents inlined in Corefile. If there are any lines before fallthrough - then all of them will be treated as the additional content for hosts file. The specified hosts - file path will still be read but entries will be overridden. -* `ttl` change the DNS TTL of the records generated (forward and reverse). The default is 3600 seconds (1 hour). -* `reload` change the period between each hostsfile reload. A time of zero seconds disables the - feature. Examples of valid durations: "300ms", "1.5h" or "2h45m". See Go's - [time](https://godoc.org/time). package. -* `no_reverse` disable the automatic generation of the `in-addr.arpa` or `ip6.arpa` entries for the hosts -* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin. - If **[ZONES...]** is omitted, then fallthrough happens for all zones for which the plugin - is authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then only - queries for those zones will be subject to fallthrough. - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metrics are exported: - -- `coredns_hosts_entries{}` - The combined number of entries in hosts and Corefile. -- `coredns_hosts_reload_timestamp_seconds{}` - The timestamp of the last reload of hosts file. - -## Examples - -Load `/etc/hosts` file. - -~~~ corefile -. { - hosts -} -~~~ - -Load `example.hosts` file in the current directory. - -~~~ -. { - hosts example.hosts -} -~~~ - -Load example.hosts file and only serve example.org and example.net from it and fall through to the -next plugin if query doesn't match. - -~~~ -. { - hosts example.hosts example.org example.net { - fallthrough - } -} -~~~ - -Load hosts file inlined in Corefile. - -~~~ -example.hosts example.org { - hosts { - 10.0.0.1 example.org - fallthrough - } - whoami -} -~~~ - -## See also - -The form of the entries in the `/etc/hosts` file are based on IETF [RFC 952](https://tools.ietf.org/html/rfc952) which was updated by IETF [RFC 1123](https://tools.ietf.org/html/rfc1123). diff --git a/plugin/hosts/hosts.go b/plugin/hosts/hosts.go deleted file mode 100644 index 5c644e7522..0000000000 --- a/plugin/hosts/hosts.go +++ /dev/null @@ -1,122 +0,0 @@ -package hosts - -import ( - "context" - "net" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnsutil" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Hosts is the plugin handler -type Hosts struct { - Next plugin.Handler - *Hostsfile - - Fall fall.F -} - -// ServeDNS implements the plugin.Handle interface. -func (h Hosts) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - - answers := []dns.RR{} - - zone := plugin.Zones(h.Origins).Matches(qname) - if zone == "" { - // PTR zones don't need to be specified in Origins. - if state.QType() != dns.TypePTR { - // if this doesn't match we need to fall through regardless of h.Fallthrough - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - } - - switch state.QType() { - case dns.TypePTR: - names := h.LookupStaticAddr(dnsutil.ExtractAddressFromReverse(qname)) - if len(names) == 0 { - // If this doesn't match we need to fall through regardless of h.Fallthrough - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - answers = h.ptr(qname, h.options.ttl, names) - case dns.TypeA: - ips := h.LookupStaticHostV4(qname) - answers = a(qname, h.options.ttl, ips) - case dns.TypeAAAA: - ips := h.LookupStaticHostV6(qname) - answers = aaaa(qname, h.options.ttl, ips) - } - - // Only on NXDOMAIN we will fallthrough. - if len(answers) == 0 && !h.otherRecordsExist(qname) { - if h.Fall.Through(qname) { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - // We want to send an NXDOMAIN, but because of /etc/hosts' setup we don't have a SOA, so we make it SERVFAIL - // to at least give an answer back to signals we're having problems resolving this. - return dns.RcodeServerFailure, nil - } - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - m.Answer = answers - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -func (h Hosts) otherRecordsExist(qname string) bool { - if len(h.LookupStaticHostV4(qname)) > 0 { - return true - } - if len(h.LookupStaticHostV6(qname)) > 0 { - return true - } - return false -} - -// Name implements the plugin.Handle interface. -func (h Hosts) Name() string { return "hosts" } - -// a takes a slice of net.IPs and returns a slice of A RRs. -func a(zone string, ttl uint32, ips []net.IP) []dns.RR { - answers := make([]dns.RR, len(ips)) - for i, ip := range ips { - r := new(dns.A) - r.Hdr = dns.RR_Header{Name: zone, Rrtype: dns.TypeA, Class: dns.ClassINET, Ttl: ttl} - r.A = ip - answers[i] = r - } - return answers -} - -// aaaa takes a slice of net.IPs and returns a slice of AAAA RRs. -func aaaa(zone string, ttl uint32, ips []net.IP) []dns.RR { - answers := make([]dns.RR, len(ips)) - for i, ip := range ips { - r := new(dns.AAAA) - r.Hdr = dns.RR_Header{Name: zone, Rrtype: dns.TypeAAAA, Class: dns.ClassINET, Ttl: ttl} - r.AAAA = ip - answers[i] = r - } - return answers -} - -// ptr takes a slice of host names and filters out the ones that aren't in Origins, if specified, and returns a slice of PTR RRs. -func (h *Hosts) ptr(zone string, ttl uint32, names []string) []dns.RR { - answers := make([]dns.RR, len(names)) - for i, n := range names { - r := new(dns.PTR) - r.Hdr = dns.RR_Header{Name: zone, Rrtype: dns.TypePTR, Class: dns.ClassINET, Ttl: ttl} - r.Ptr = dns.Fqdn(n) - answers[i] = r - } - return answers -} diff --git a/plugin/hosts/hosts_test.go b/plugin/hosts/hosts_test.go deleted file mode 100644 index 320655adbb..0000000000 --- a/plugin/hosts/hosts_test.go +++ /dev/null @@ -1,120 +0,0 @@ -package hosts - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestLookupA(t *testing.T) { - for _, tc := range hostsTestCases { - m := tc.Msg() - - var tcFall fall.F - isFall := tc.Qname == "fallthrough-example.org." - if isFall { - tcFall = fall.Root - } else { - tcFall = fall.Zero - } - - h := Hosts{ - Next: test.NextHandler(dns.RcodeNameError, nil), - Hostsfile: &Hostsfile{ - Origins: []string{"."}, - hmap: newMap(), - inline: newMap(), - options: newOptions(), - }, - Fall: tcFall, - } - h.hmap = h.parse(strings.NewReader(hostsExample)) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - rcode, err := h.ServeDNS(context.Background(), rec, m) - if err != nil { - t.Errorf("Expected no error, got %v", err) - return - } - - if isFall && tc.Rcode != rcode { - t.Errorf("Expected rcode is %d, but got %d", tc.Rcode, rcode) - return - } - - if resp := rec.Msg; rec.Msg != nil { - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - } - } -} - -var hostsTestCases = []test.Case{ - { - Qname: "example.org.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("example.org. 3600 IN A 10.0.0.1"), - }, - }, - { - Qname: "example.com.", Qtype: dns.TypeA, - Answer: []dns.RR{ - test.A("example.com. 3600 IN A 10.0.0.2"), - }, - }, - { - Qname: "localhost.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{ - test.AAAA("localhost. 3600 IN AAAA ::1"), - }, - }, - { - Qname: "1.0.0.10.in-addr.arpa.", Qtype: dns.TypePTR, - Answer: []dns.RR{ - test.PTR("1.0.0.10.in-addr.arpa. 3600 PTR example.org."), - }, - }, - { - Qname: "2.0.0.10.in-addr.arpa.", Qtype: dns.TypePTR, - Answer: []dns.RR{ - test.PTR("2.0.0.10.in-addr.arpa. 3600 PTR example.com."), - }, - }, - { - Qname: "1.0.0.127.in-addr.arpa.", Qtype: dns.TypePTR, - Answer: []dns.RR{ - test.PTR("1.0.0.127.in-addr.arpa. 3600 PTR localhost."), - test.PTR("1.0.0.127.in-addr.arpa. 3600 PTR localhost.domain."), - }, - }, - { - Qname: "example.org.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{}, - }, - { - Qname: "example.org.", Qtype: dns.TypeMX, - Answer: []dns.RR{}, - }, - { - Qname: "fallthrough-example.org.", Qtype: dns.TypeAAAA, - Answer: []dns.RR{}, Rcode: dns.RcodeSuccess, - }, -} - -const hostsExample = ` -127.0.0.1 localhost localhost.domain -::1 localhost localhost.domain -10.0.0.1 example.org -::FFFF:10.0.0.2 example.com -10.0.0.3 fallthrough-example.org -reload 5s -timeout 3600 -` diff --git a/plugin/hosts/hostsfile.go b/plugin/hosts/hostsfile.go deleted file mode 100644 index 84e451029e..0000000000 --- a/plugin/hosts/hostsfile.go +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright 2009 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. - -// This file is a modified version of net/hosts.go from the golang repo - -package hosts - -import ( - "bufio" - "bytes" - "io" - "net" - "os" - "strings" - "sync" - "time" - - "github.com/coredns/coredns/plugin" -) - -// parseIP calls discards any v6 zone info, before calling net.ParseIP. -func parseIP(addr string) net.IP { - if i := strings.Index(addr, "%"); i >= 0 { - // discard ipv6 zone - addr = addr[0:i] - } - - return net.ParseIP(addr) -} - -type options struct { - // automatically generate IP to Hostname PTR entries - // for host entries we parse - autoReverse bool - - // The TTL of the record we generate - ttl uint32 - - // The time between two reload of the configuration - reload time.Duration -} - -func newOptions() *options { - return &options{ - autoReverse: true, - ttl: 3600, - reload: 5 * time.Second, - } -} - -// Map contains the IPv4/IPv6 and reverse mapping. -type Map struct { - // Key for the list of literal IP addresses must be a FQDN lowercased host name. - name4 map[string][]net.IP - name6 map[string][]net.IP - - // Key for the list of host names must be a literal IP address - // including IPv6 address without zone identifier. - // We don't support old-classful IP address notation. - addr map[string][]string -} - -func newMap() *Map { - return &Map{ - name4: make(map[string][]net.IP), - name6: make(map[string][]net.IP), - addr: make(map[string][]string), - } -} - -// Len returns the total number of addresses in the hostmap, this includes V4/V6 and any reverse addresses. -func (h *Map) Len() int { - l := 0 - for _, v4 := range h.name4 { - l += len(v4) - } - for _, v6 := range h.name6 { - l += len(v6) - } - for _, a := range h.addr { - l += len(a) - } - return l -} - -// Hostsfile contains known host entries. -type Hostsfile struct { - sync.RWMutex - - // list of zones we are authoritative for - Origins []string - - // hosts maps for lookups - hmap *Map - - // inline saves the hosts file that is inlined in a Corefile. - inline *Map - - // path to the hosts file - path string - - // mtime and size are only read and modified by a single goroutine - mtime time.Time - size int64 - - options *options -} - -// readHosts determines if the cached data needs to be updated based on the size and modification time of the hostsfile. -func (h *Hostsfile) readHosts() { - file, err := os.Open(h.path) - if err != nil { - // We already log a warning if the file doesn't exist or can't be opened on setup. No need to return the error here. - return - } - defer file.Close() - - stat, err := file.Stat() - if err != nil { - return - } - h.RLock() - size := h.size - h.RUnlock() - - if h.mtime.Equal(stat.ModTime()) && size == stat.Size() { - return - } - - newMap := h.parse(file) - log.Debugf("Parsed hosts file into %d entries", newMap.Len()) - - h.Lock() - - h.hmap = newMap - // Update the data cache. - h.mtime = stat.ModTime() - h.size = stat.Size() - - hostsEntries.WithLabelValues(h.path).Set(float64(h.inline.Len() + h.hmap.Len())) - hostsReloadTime.Set(float64(stat.ModTime().UnixNano()) / 1e9) - h.Unlock() -} - -func (h *Hostsfile) initInline(inline []string) { - if len(inline) == 0 { - return - } - - h.inline = h.parse(strings.NewReader(strings.Join(inline, "\n"))) -} - -// Parse reads the hostsfile and populates the byName and addr maps. -func (h *Hostsfile) parse(r io.Reader) *Map { - hmap := newMap() - - scanner := bufio.NewScanner(r) - for scanner.Scan() { - line := scanner.Bytes() - if i := bytes.Index(line, []byte{'#'}); i >= 0 { - // Discard comments. - line = line[0:i] - } - f := bytes.Fields(line) - if len(f) < 2 { - continue - } - addr := parseIP(string(f[0])) - if addr == nil { - continue - } - - var family int - if addr.To4() != nil { - family = 1 - } else { - family = 2 - } - - for i := 1; i < len(f); i++ { - name := plugin.Name(string(f[i])).Normalize() - if plugin.Zones(h.Origins).Matches(name) == "" { - // name is not in Origins - continue - } - switch family { - case 1: - hmap.name4[name] = append(hmap.name4[name], addr) - case 2: - hmap.name6[name] = append(hmap.name6[name], addr) - default: - continue - } - if !h.options.autoReverse { - continue - } - hmap.addr[addr.String()] = append(hmap.addr[addr.String()], name) - } - } - - return hmap -} - -// lookupStaticHost looks up the IP addresses for the given host from the hosts file. -func (h *Hostsfile) lookupStaticHost(m map[string][]net.IP, host string) []net.IP { - h.RLock() - defer h.RUnlock() - - if len(m) == 0 { - return nil - } - - ips, ok := m[host] - if !ok { - return nil - } - ipsCp := make([]net.IP, len(ips)) - copy(ipsCp, ips) - return ipsCp -} - -// LookupStaticHostV4 looks up the IPv4 addresses for the given host from the hosts file. -func (h *Hostsfile) LookupStaticHostV4(host string) []net.IP { - host = strings.ToLower(host) - ip1 := h.lookupStaticHost(h.hmap.name4, host) - ip2 := h.lookupStaticHost(h.inline.name4, host) - return append(ip1, ip2...) -} - -// LookupStaticHostV6 looks up the IPv6 addresses for the given host from the hosts file. -func (h *Hostsfile) LookupStaticHostV6(host string) []net.IP { - host = strings.ToLower(host) - ip1 := h.lookupStaticHost(h.hmap.name6, host) - ip2 := h.lookupStaticHost(h.inline.name6, host) - return append(ip1, ip2...) -} - -// LookupStaticAddr looks up the hosts for the given address from the hosts file. -func (h *Hostsfile) LookupStaticAddr(addr string) []string { - addr = parseIP(addr).String() - if addr == "" { - return nil - } - - h.RLock() - defer h.RUnlock() - hosts1 := h.hmap.addr[addr] - hosts2 := h.inline.addr[addr] - - if len(hosts1) == 0 && len(hosts2) == 0 { - return nil - } - - hostsCp := make([]string, len(hosts1)+len(hosts2)) - copy(hostsCp, hosts1) - copy(hostsCp[len(hosts1):], hosts2) - return hostsCp -} diff --git a/plugin/hosts/hostsfile_test.go b/plugin/hosts/hostsfile_test.go deleted file mode 100644 index fb558ebd29..0000000000 --- a/plugin/hosts/hostsfile_test.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2009 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 hosts - -import ( - "net" - "reflect" - "strings" - "testing" - - "github.com/coredns/coredns/plugin" -) - -func testHostsfile(file string) *Hostsfile { - h := &Hostsfile{ - Origins: []string{"."}, - hmap: newMap(), - inline: newMap(), - options: newOptions(), - } - h.hmap = h.parse(strings.NewReader(file)) - return h -} - -type staticHostEntry struct { - in string - v4 []string - v6 []string -} - -var ( - hosts = `255.255.255.255 broadcasthost - 127.0.0.2 odin - 127.0.0.3 odin # inline comment - ::2 odin - 127.1.1.1 thor - # aliases - 127.1.1.2 ullr ullrhost - fe80::1%lo0 localhost - # Bogus entries that must be ignored. - 123.123.123 loki - 321.321.321.321` - singlelinehosts = `127.0.0.2 odin` - ipv4hosts = `# See https://tools.ietf.org/html/rfc1123. - # - - # internet address and host name - 127.0.0.1 localhost # inline comment separated by tab - 127.0.0.2 localhost # inline comment separated by space - - # internet address, host name and aliases - 127.0.0.3 localhost localhost.localdomain` - ipv6hosts = `# See https://tools.ietf.org/html/rfc5952, https://tools.ietf.org/html/rfc4007. - - # internet address and host name - ::1 localhost # inline comment separated by tab - fe80:0000:0000:0000:0000:0000:0000:0001 localhost # inline comment separated by space - - # internet address with zone identifier and host name - fe80:0000:0000:0000:0000:0000:0000:0002%lo0 localhost - - # internet address, host name and aliases - fe80::3%lo0 localhost localhost.localdomain` - casehosts = `127.0.0.1 PreserveMe PreserveMe.local - ::1 PreserveMe PreserveMe.local` -) - -var lookupStaticHostTests = []struct { - file string - ents []staticHostEntry -}{ - { - hosts, - []staticHostEntry{ - {"odin.", []string{"127.0.0.2", "127.0.0.3"}, []string{"::2"}}, - {"thor.", []string{"127.1.1.1"}, []string{}}, - {"ullr.", []string{"127.1.1.2"}, []string{}}, - {"ullrhost.", []string{"127.1.1.2"}, []string{}}, - {"localhost.", []string{}, []string{"fe80::1"}}, - }, - }, - { - singlelinehosts, // see golang.org/issue/6646 - []staticHostEntry{ - {"odin.", []string{"127.0.0.2"}, []string{}}, - }, - }, - { - ipv4hosts, - []staticHostEntry{ - {"localhost.", []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}, []string{}}, - {"localhost.localdomain.", []string{"127.0.0.3"}, []string{}}, - }, - }, - { - ipv6hosts, - []staticHostEntry{ - {"localhost.", []string{}, []string{"::1", "fe80::1", "fe80::2", "fe80::3"}}, - {"localhost.localdomain.", []string{}, []string{"fe80::3"}}, - }, - }, - { - casehosts, - []staticHostEntry{ - {"PreserveMe.", []string{"127.0.0.1"}, []string{"::1"}}, - {"PreserveMe.local.", []string{"127.0.0.1"}, []string{"::1"}}, - }, - }, -} - -func TestLookupStaticHost(t *testing.T) { - for _, tt := range lookupStaticHostTests { - h := testHostsfile(tt.file) - for _, ent := range tt.ents { - testStaticHost(t, ent, h) - } - } -} - -func testStaticHost(t *testing.T, ent staticHostEntry, h *Hostsfile) { - t.Helper() - ins := []string{ent.in, plugin.Name(ent.in).Normalize(), strings.ToLower(ent.in), strings.ToUpper(ent.in)} - for k, in := range ins { - addrsV4 := h.LookupStaticHostV4(in) - if len(addrsV4) != len(ent.v4) { - t.Fatalf("%d, lookupStaticHostV4(%s) = %v; want %v", k, in, addrsV4, ent.v4) - } - for i, v4 := range addrsV4 { - if v4.String() != ent.v4[i] { - t.Fatalf("%d, lookupStaticHostV4(%s) = %v; want %v", k, in, addrsV4, ent.v4) - } - } - addrsV6 := h.LookupStaticHostV6(in) - if len(addrsV6) != len(ent.v6) { - t.Fatalf("%d, lookupStaticHostV6(%s) = %v; want %v", k, in, addrsV6, ent.v6) - } - for i, v6 := range addrsV6 { - if v6.String() != ent.v6[i] { - t.Fatalf("%d, lookupStaticHostV6(%s) = %v; want %v", k, in, addrsV6, ent.v6) - } - } - } -} - -type staticIPEntry struct { - in string - out []string -} - -var lookupStaticAddrTests = []struct { - file string - ents []staticIPEntry -}{ - { - hosts, - []staticIPEntry{ - {"255.255.255.255", []string{"broadcasthost."}}, - {"127.0.0.2", []string{"odin."}}, - {"127.0.0.3", []string{"odin."}}, - {"::2", []string{"odin."}}, - {"127.1.1.1", []string{"thor."}}, - {"127.1.1.2", []string{"ullr.", "ullrhost."}}, - {"fe80::1", []string{"localhost."}}, - }, - }, - { - singlelinehosts, // see golang.org/issue/6646 - []staticIPEntry{ - {"127.0.0.2", []string{"odin."}}, - }, - }, - { - ipv4hosts, // see golang.org/issue/8996 - []staticIPEntry{ - {"127.0.0.1", []string{"localhost."}}, - {"127.0.0.2", []string{"localhost."}}, - {"127.0.0.3", []string{"localhost.", "localhost.localdomain."}}, - }, - }, - { - ipv6hosts, // see golang.org/issue/8996 - []staticIPEntry{ - {"::1", []string{"localhost."}}, - {"fe80::1", []string{"localhost."}}, - {"fe80::2", []string{"localhost."}}, - {"fe80::3", []string{"localhost.", "localhost.localdomain."}}, - }, - }, - { - casehosts, // see golang.org/issue/12806 - []staticIPEntry{ - {"127.0.0.1", []string{"PreserveMe.", "PreserveMe.local."}}, - {"::1", []string{"PreserveMe.", "PreserveMe.local."}}, - }, - }, -} - -func TestLookupStaticAddr(t *testing.T) { - for _, tt := range lookupStaticAddrTests { - h := testHostsfile(tt.file) - for _, ent := range tt.ents { - testStaticAddr(t, ent, h) - } - } -} - -func testStaticAddr(t *testing.T, ent staticIPEntry, h *Hostsfile) { - t.Helper() - hosts := h.LookupStaticAddr(ent.in) - for i := range ent.out { - ent.out[i] = plugin.Name(ent.out[i]).Normalize() - } - if !reflect.DeepEqual(hosts, ent.out) { - t.Errorf("%s, lookupStaticAddr(%s) = %v; want %v", h.path, ent.in, hosts, h) - } -} - -func TestHostCacheModification(t *testing.T) { - // Ensure that programs can't modify the internals of the host cache. - // See https://github.com/golang/go/issues/14212. - - h := testHostsfile(ipv4hosts) - ent := staticHostEntry{"localhost.", []string{"127.0.0.1", "127.0.0.2", "127.0.0.3"}, []string{}} - testStaticHost(t, ent, h) - // Modify the addresses return by lookupStaticHost. - addrs := h.LookupStaticHostV6(ent.in) - for i := range addrs { - addrs[i] = net.IPv4zero - } - testStaticHost(t, ent, h) - - h = testHostsfile(ipv6hosts) - entip := staticIPEntry{"::1", []string{"localhost."}} - testStaticAddr(t, entip, h) - // Modify the hosts return by lookupStaticAddr. - hosts := h.LookupStaticAddr(entip.in) - for i := range hosts { - hosts[i] += "junk" - } - testStaticAddr(t, entip, h) -} diff --git a/plugin/hosts/log_test.go b/plugin/hosts/log_test.go deleted file mode 100644 index e784bd6ee6..0000000000 --- a/plugin/hosts/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package hosts - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/hosts/metrics.go b/plugin/hosts/metrics.go deleted file mode 100644 index d3999e1e9f..0000000000 --- a/plugin/hosts/metrics.go +++ /dev/null @@ -1,25 +0,0 @@ -package hosts - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // hostsEntries is the combined number of entries in hosts and Corefile. - hostsEntries = promauto.NewGaugeVec(prometheus.GaugeOpts{ - Namespace: plugin.Namespace, - Subsystem: "hosts", - Name: "entries", - Help: "The combined number of entries in hosts and Corefile.", - }, []string{"hostsfile"}) - // hostsReloadTime is the timestamp of the last reload of hosts file. - hostsReloadTime = promauto.NewGauge(prometheus.GaugeOpts{ - Namespace: plugin.Namespace, - Subsystem: "hosts", - Name: "reload_timestamp_seconds", - Help: "The timestamp of the last reload of hosts file.", - }) -) diff --git a/plugin/hosts/setup.go b/plugin/hosts/setup.go deleted file mode 100644 index 0201e58247..0000000000 --- a/plugin/hosts/setup.go +++ /dev/null @@ -1,157 +0,0 @@ -package hosts - -import ( - "os" - "path/filepath" - "strconv" - "strings" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" -) - -var log = clog.NewWithPlugin("hosts") - -func init() { plugin.Register("hosts", setup) } - -func periodicHostsUpdate(h *Hosts) chan bool { - parseChan := make(chan bool) - - if h.options.reload == 0 { - return parseChan - } - - go func() { - ticker := time.NewTicker(h.options.reload) - defer ticker.Stop() - for { - select { - case <-parseChan: - return - case <-ticker.C: - h.readHosts() - } - } - }() - return parseChan -} - -func setup(c *caddy.Controller) error { - h, err := hostsParse(c) - if err != nil { - return plugin.Error("hosts", err) - } - - parseChan := periodicHostsUpdate(&h) - - c.OnStartup(func() error { - h.readHosts() - return nil - }) - - c.OnShutdown(func() error { - close(parseChan) - return nil - }) - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - h.Next = next - return h - }) - - return nil -} - -func hostsParse(c *caddy.Controller) (Hosts, error) { - config := dnsserver.GetConfig(c) - - h := Hosts{ - Hostsfile: &Hostsfile{ - path: "/etc/hosts", - hmap: newMap(), - inline: newMap(), - options: newOptions(), - }, - } - - inline := []string{} - i := 0 - for c.Next() { - if i > 0 { - return h, plugin.ErrOnce - } - i++ - - args := c.RemainingArgs() - - if len(args) >= 1 { - h.path = args[0] - args = args[1:] - - if !filepath.IsAbs(h.path) && config.Root != "" { - h.path = filepath.Join(config.Root, h.path) - } - s, err := os.Stat(h.path) - if err != nil { - if !os.IsNotExist(err) { - return h, c.Errf("unable to access hosts file '%s': %v", h.path, err) - } - log.Warningf("File does not exist: %s", h.path) - } - if s != nil && s.IsDir() { - log.Warningf("Hosts file %q is a directory", h.path) - } - } - - h.Origins = plugin.OriginsFromArgsOrServerBlock(args, c.ServerBlockKeys) - - for c.NextBlock() { - switch c.Val() { - case "fallthrough": - h.Fall.SetZonesFromArgs(c.RemainingArgs()) - case "no_reverse": - h.options.autoReverse = false - case "ttl": - remaining := c.RemainingArgs() - if len(remaining) < 1 { - return h, c.Errf("ttl needs a time in second") - } - ttl, err := strconv.Atoi(remaining[0]) - if err != nil { - return h, c.Errf("ttl needs a number of second") - } - if ttl <= 0 || ttl > 65535 { - return h, c.Errf("ttl provided is invalid") - } - h.options.ttl = uint32(ttl) - case "reload": - remaining := c.RemainingArgs() - if len(remaining) != 1 { - return h, c.Errf("reload needs a duration (zero seconds to disable)") - } - reload, err := time.ParseDuration(remaining[0]) - if err != nil { - return h, c.Errf("invalid duration for reload '%s'", remaining[0]) - } - if reload < 0 { - return h, c.Errf("invalid negative duration for reload '%s'", remaining[0]) - } - h.options.reload = reload - default: - if len(h.Fall.Zones) == 0 { - line := strings.Join(append([]string{c.Val()}, c.RemainingArgs()...), " ") - inline = append(inline, line) - continue - } - return h, c.Errf("unknown property '%s'", c.Val()) - } - } - } - - h.initInline(inline) - - return h, nil -} diff --git a/plugin/hosts/setup_test.go b/plugin/hosts/setup_test.go deleted file mode 100644 index 38c7c31a2f..0000000000 --- a/plugin/hosts/setup_test.go +++ /dev/null @@ -1,169 +0,0 @@ -package hosts - -import ( - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/pkg/fall" -) - -func TestHostsParse(t *testing.T) { - tests := []struct { - inputFileRules string - shouldErr bool - expectedPath string - expectedOrigins []string - expectedFallthrough fall.F - }{ - { - `hosts -`, - false, "/etc/hosts", nil, fall.Zero, - }, - { - `hosts /tmp`, - false, "/tmp", nil, fall.Zero, - }, - { - `hosts /etc/hosts miek.nl.`, - false, "/etc/hosts", []string{"miek.nl."}, fall.Zero, - }, - { - `hosts /etc/hosts miek.nl. pun.gent.`, - false, "/etc/hosts", []string{"miek.nl.", "pun.gent."}, fall.Zero, - }, - { - `hosts { - fallthrough - }`, - false, "/etc/hosts", nil, fall.Root, - }, - { - `hosts /tmp { - fallthrough - }`, - false, "/tmp", nil, fall.Root, - }, - { - `hosts /etc/hosts miek.nl. { - fallthrough - }`, - false, "/etc/hosts", []string{"miek.nl."}, fall.Root, - }, - { - `hosts /etc/hosts miek.nl 10.0.0.9/8 { - fallthrough - }`, - false, "/etc/hosts", []string{"miek.nl.", "10.in-addr.arpa."}, fall.Root, - }, - { - `hosts /etc/hosts { - fallthrough - } - hosts /etc/hosts { - fallthrough - }`, - true, "/etc/hosts", nil, fall.Root, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - h, err := hostsParse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } else if !test.shouldErr { - if h.path != test.expectedPath { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedPath, h.path) - } - } else { - if !h.Fall.Equal(test.expectedFallthrough) { - t.Fatalf("Test %d expected fallthrough of %v, got %v", i, test.expectedFallthrough, h.Fall) - } - if len(h.Origins) != len(test.expectedOrigins) { - t.Fatalf("Test %d expected %v, got %v", i, test.expectedOrigins, h.Origins) - } - for j, name := range test.expectedOrigins { - if h.Origins[j] != name { - t.Fatalf("Test %d expected %v for %d th zone, got %v", i, name, j, h.Origins[j]) - } - } - } - } -} - -func TestHostsInlineParse(t *testing.T) { - tests := []struct { - inputFileRules string - shouldErr bool - expectedaddr map[string][]string - expectedFallthrough fall.F - }{ - { - `hosts highly_unlikely_to_exist_hosts_file example.org { - 10.0.0.1 example.org - fallthrough - }`, - false, - map[string][]string{ - `10.0.0.1`: { - `example.org.`, - }, - }, - fall.Root, - }, - { - `hosts highly_unlikely_to_exist_hosts_file example.org { - 10.0.0.1 example.org - }`, - false, - map[string][]string{ - `10.0.0.1`: { - `example.org.`, - }, - }, - fall.Zero, - }, - { - `hosts highly_unlikely_to_exist_hosts_file example.org { - fallthrough - 10.0.0.1 example.org - }`, - true, - map[string][]string{}, - fall.Root, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - h, err := hostsParse(c) - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } else if !test.shouldErr { - if !h.Fall.Equal(test.expectedFallthrough) { - t.Errorf("Test %d expected fallthrough of %v, got %v", i, test.expectedFallthrough, h.Fall) - } - for k, expectedVal := range test.expectedaddr { - val, ok := h.inline.addr[k] - if !ok { - t.Errorf("Test %d expected %v, got no entry", i, k) - continue - } - if len(expectedVal) != len(val) { - t.Errorf("Test %d expected %v records for %v, got %v", i, len(expectedVal), k, len(val)) - } - for j := range expectedVal { - if expectedVal[j] != val[j] { - t.Errorf("Test %d expected %v for %v, got %v", i, expectedVal[j], j, val[j]) - } - } - } - } - } -} diff --git a/plugin/k8s_external/README.md b/plugin/k8s_external/README.md deleted file mode 100644 index 893a131584..0000000000 --- a/plugin/k8s_external/README.md +++ /dev/null @@ -1,132 +0,0 @@ -# k8s_external - -## Name - -*k8s_external* - resolves load balancer, external IPs from outside Kubernetes clusters and if enabled headless services. - -## Description - -This plugin allows an additional zone to resolve the external IP address(es) of a Kubernetes -service and headless services. This plugin is only useful if the *kubernetes* plugin is also loaded. - -The plugin uses an external zone to resolve in-cluster IP addresses. It only handles queries for A, -AAAA, SRV, and PTR records; To make it a proper DNS zone, it handles SOA and NS queries for the apex of the zone. - -By default the apex of the zone will look like the following (assuming the zone used is `example.org`): - -~~~ dns -example.org. 5 IN SOA ns1.dns.example.org. hostmaster.example.org. ( - 12345 ; serial - 14400 ; refresh (4 hours) - 3600 ; retry (1 hour) - 604800 ; expire (1 week) - 5 ; minimum (4 hours) - ) -example.org 5 IN NS ns1.dns.example.org. - -ns1.dns.example.org. 5 IN A .... -ns1.dns.example.org. 5 IN AAAA .... -~~~ - -Note that we use the `dns` subdomain for the records DNS needs (see the `apex` directive). Also -note the SOA's serial number is static. The IP addresses of the nameserver records are those of the -CoreDNS service. - -The *k8s_external* plugin handles the subdomain `dns` and the apex of the zone itself; all other -queries are resolved to addresses in the cluster. - -## Syntax - -~~~ -k8s_external [ZONE...] -~~~ - -* **ZONES** zones *k8s_external* should be authoritative for. - -If you want to change the apex domain or use a different TTL for the returned records you can use -this extended syntax. - -~~~ -k8s_external [ZONE...] { - apex APEX - ttl TTL -} -~~~ - -* **APEX** is the name (DNS label) to use for the apex records; it defaults to `dns`. -* `ttl` allows you to set a custom **TTL** for responses. The default is 5 (seconds). - -If you want to enable headless service resolution, you can do so by adding `headless` option. - -~~~ -k8s_external [ZONE...] { - headless -} -~~~ - -* if there is a headless service with external IPs set, external IPs will be resolved - -If the queried domain does not exist, you can fall through to next plugin by adding the `fallthrough` option. - -~~~ -k8s_external [ZONE...] { - fallthrough [ZONE...] -} -~~~ - -## Examples - -Enable names under `example.org` to be resolved to in-cluster DNS addresses. - -~~~ -. { - kubernetes cluster.local - k8s_external example.org -} -~~~ - -With the Corefile above, the following Service will get an `A` record for `test.default.example.org` with the IP address `192.168.200.123`. - -~~~ -apiVersion: v1 -kind: Service -metadata: - name: test - namespace: default -spec: - clusterIP: None - externalIPs: - - 192.168.200.123 - type: ClusterIP -~~~ - -The *k8s_external* plugin can be used in conjunction with the *transfer* plugin to enable -zone transfers. Notifies are not supported. - - ~~~ - . { - transfer example.org { - to * - } - kubernetes cluster.local - k8s_external example.org - } - ~~~ - -With the `fallthrough` option, if the queried domain does not exist, it will be passed to the next plugin that matches the zone. - -~~~ -. { - kubernetes cluster.local - k8s_external example.org { - fallthrough - } - forward . 8.8.8.8 -} -~~~ - -# See Also - -For some background see [resolve external IP address](https://github.com/kubernetes/dns/issues/242). -And [A records for services with Load Balancer IP](https://github.com/coredns/coredns/issues/1851). - diff --git a/plugin/k8s_external/apex.go b/plugin/k8s_external/apex.go deleted file mode 100644 index e575e5ea32..0000000000 --- a/plugin/k8s_external/apex.go +++ /dev/null @@ -1,112 +0,0 @@ -package external - -import ( - "github.com/coredns/coredns/plugin/pkg/dnsutil" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// serveApex serves request that hit the zone' apex. A reply is written back to the client. -func (e *External) serveApex(state request.Request) (int, error) { - m := new(dns.Msg) - m.SetReply(state.Req) - m.Authoritative = true - switch state.QType() { - case dns.TypeSOA: - m.Answer = []dns.RR{e.soa(state)} - case dns.TypeNS: - m.Answer = []dns.RR{e.ns(state)} - - addr := e.externalAddrFunc(state, e.headless) - for _, rr := range addr { - rr.Header().Ttl = e.ttl - rr.Header().Name = dnsutil.Join("ns1", e.apex, state.QName()) - m.Extra = append(m.Extra, rr) - } - default: - m.Ns = []dns.RR{e.soa(state)} - } - - state.W.WriteMsg(m) - return 0, nil -} - -// serveSubApex serves requests that hit the zones fake 'dns' subdomain where our nameservers live. -func (e *External) serveSubApex(state request.Request) (int, error) { - base, _ := dnsutil.TrimZone(state.Name(), state.Zone) - - m := new(dns.Msg) - m.SetReply(state.Req) - m.Authoritative = true - - // base is either dns. of ns1.dns (or another name), if it's longer return nxdomain - switch labels := dns.CountLabel(base); labels { - default: - m.SetRcode(m, dns.RcodeNameError) - m.Ns = []dns.RR{e.soa(state)} - state.W.WriteMsg(m) - return 0, nil - case 2: - nl, _ := dns.NextLabel(base, 0) - ns := base[:nl] - if ns != "ns1." { - // nxdomain - m.SetRcode(m, dns.RcodeNameError) - m.Ns = []dns.RR{e.soa(state)} - state.W.WriteMsg(m) - return 0, nil - } - - addr := e.externalAddrFunc(state, e.headless) - for _, rr := range addr { - rr.Header().Ttl = e.ttl - rr.Header().Name = state.QName() - switch state.QType() { - case dns.TypeA: - if rr.Header().Rrtype == dns.TypeA { - m.Answer = append(m.Answer, rr) - } - case dns.TypeAAAA: - if rr.Header().Rrtype == dns.TypeAAAA { - m.Answer = append(m.Answer, rr) - } - } - } - - if len(m.Answer) == 0 { - m.Ns = []dns.RR{e.soa(state)} - } - - state.W.WriteMsg(m) - return 0, nil - - case 1: - // nodata for the dns empty non-terminal - m.Ns = []dns.RR{e.soa(state)} - state.W.WriteMsg(m) - return 0, nil - } -} - -func (e *External) soa(state request.Request) *dns.SOA { - header := dns.RR_Header{Name: state.Zone, Rrtype: dns.TypeSOA, Ttl: e.ttl, Class: dns.ClassINET} - - soa := &dns.SOA{Hdr: header, - Mbox: dnsutil.Join(e.hostmaster, e.apex, state.Zone), - Ns: dnsutil.Join("ns1", e.apex, state.Zone), - Serial: e.externalSerialFunc(state.Zone), - Refresh: 7200, - Retry: 1800, - Expire: 86400, - Minttl: e.ttl, - } - return soa -} - -func (e *External) ns(state request.Request) *dns.NS { - header := dns.RR_Header{Name: state.Zone, Rrtype: dns.TypeNS, Ttl: e.ttl, Class: dns.ClassINET} - ns := &dns.NS{Hdr: header, Ns: dnsutil.Join("ns1", e.apex, state.Zone)} - - return ns -} diff --git a/plugin/k8s_external/apex_test.go b/plugin/k8s_external/apex_test.go deleted file mode 100644 index ab0818708c..0000000000 --- a/plugin/k8s_external/apex_test.go +++ /dev/null @@ -1,122 +0,0 @@ -package external - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/kubernetes" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestApex(t *testing.T) { - k := kubernetes.New([]string{"cluster.local."}) - k.Namespaces = map[string]struct{}{"testns": {}} - k.APIConn = &external{} - - e := New() - e.headless = true - e.Zones = []string{"example.com."} - e.Next = test.NextHandler(dns.RcodeSuccess, nil) - e.externalFunc = k.External - e.externalAddrFunc = externalAddress // internal test function - e.externalSerialFunc = externalSerial // internal test function - - ctx := context.TODO() - for i, tc := range testsApex { - r := tc.Msg() - w := dnstest.NewRecorder(&test.ResponseWriter{}) - - _, err := e.ServeDNS(ctx, w, r) - if err != tc.Error { - t.Errorf("Test %d expected no error, got %v", i, err) - return - } - if tc.Error != nil { - continue - } - - resp := w.Msg - if resp == nil { - t.Fatalf("Test %d, got nil message and no error for %q", i, r.Question[0].Name) - } - if !resp.Authoritative { - t.Error("Expected authoritative answer") - } - if err := test.SortAndCheck(resp, tc); err != nil { - t.Error(err) - } - for i, rr := range tc.Ns { - expectsoa := rr.(*dns.SOA) - gotsoa, ok := resp.Ns[i].(*dns.SOA) - if !ok { - t.Fatalf("Unexpected record type in Authority section") - } - if expectsoa.Serial != gotsoa.Serial { - t.Fatalf("Expected soa serial %d, got %d", expectsoa.Serial, gotsoa.Serial) - } - } - } -} - -var testsApex = []test.Case{ - { - Qname: "example.com.", Qtype: dns.TypeSOA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "example.com.", Qtype: dns.TypeNS, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.NS("example.com. 5 IN NS ns1.dns.example.com."), - }, - Extra: []dns.RR{ - test.A("ns1.dns.example.com. 5 IN A 127.0.0.1"), - }, - }, - { - Qname: "example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "dns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "dns.example.com.", Qtype: dns.TypeNS, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "ns1.dns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "ns1.dns.example.com.", Qtype: dns.TypeNS, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "ns1.dns.example.com.", Qtype: dns.TypeAAAA, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "ns1.dns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("ns1.dns.example.com. 5 IN A 127.0.0.1"), - }, - }, -} diff --git a/plugin/k8s_external/external.go b/plugin/k8s_external/external.go deleted file mode 100644 index 442119bd09..0000000000 --- a/plugin/k8s_external/external.go +++ /dev/null @@ -1,126 +0,0 @@ -/* -Package external implements external names for kubernetes clusters. - -This plugin only handles three qtypes (except the apex queries, because those are handled -differently). We support A, AAAA and SRV request, for all other types we return NODATA or -NXDOMAIN depending on the state of the cluster. - -A plugin willing to provide these services must implement the Externaler interface, although it -likely only makes sense for the *kubernetes* plugin. -*/ -package external - -import ( - "context" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/etcd/msg" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Externaler defines the interface that a plugin should implement in order to be used by External. -type Externaler interface { - // External returns a slice of msg.Services that are looked up in the backend and match - // the request. - External(request.Request, bool) ([]msg.Service, int) - // ExternalAddress should return a string slice of addresses for the nameserving endpoint. - ExternalAddress(state request.Request, headless bool) []dns.RR - // ExternalServices returns all services in the given zone as a slice of msg.Service and if enabled, headless services as a map of services. - ExternalServices(zone string, headless bool) ([]msg.Service, map[string][]msg.Service) - // ExternalSerial gets the current serial. - ExternalSerial(string) uint32 -} - -// External serves records for External IPs and Loadbalance IPs of Services in Kubernetes clusters. -type External struct { - Next plugin.Handler - Zones []string - Fall fall.F - - hostmaster string - apex string - ttl uint32 - headless bool - - upstream *upstream.Upstream - - externalFunc func(request.Request, bool) ([]msg.Service, int) - externalAddrFunc func(request.Request, bool) []dns.RR - externalSerialFunc func(string) uint32 - externalServicesFunc func(string, bool) ([]msg.Service, map[string][]msg.Service) -} - -// New returns a new and initialized *External. -func New() *External { - e := &External{hostmaster: "hostmaster", ttl: 5, apex: "dns"} - return e -} - -// ServeDNS implements the plugin.Handle interface. -func (e *External) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - - zone := plugin.Zones(e.Zones).Matches(state.Name()) - if zone == "" { - return plugin.NextOrFailure(e.Name(), e.Next, ctx, w, r) - } - - state.Zone = zone - for _, z := range e.Zones { - // TODO(miek): save this in the External struct. - if state.Name() == z { // apex query - ret, err := e.serveApex(state) - return ret, err - } - if dns.IsSubDomain(e.apex+"."+z, state.Name()) { - // dns subdomain test for ns. and dns. queries - ret, err := e.serveSubApex(state) - return ret, err - } - } - - svc, rcode := e.externalFunc(state, e.headless) - - m := new(dns.Msg) - m.SetReply(state.Req) - m.Authoritative = true - - if len(svc) == 0 { - if e.Fall.Through(state.Name()) && rcode == dns.RcodeNameError { - return plugin.NextOrFailure(e.Name(), e.Next, ctx, w, r) - } - - m.Rcode = rcode - m.Ns = []dns.RR{e.soa(state)} - w.WriteMsg(m) - return 0, nil - } - - switch state.QType() { - case dns.TypeA: - m.Answer, m.Truncated = e.a(ctx, svc, state) - case dns.TypeAAAA: - m.Answer, m.Truncated = e.aaaa(ctx, svc, state) - case dns.TypeSRV: - m.Answer, m.Extra = e.srv(ctx, svc, state) - case dns.TypePTR: - m.Answer = e.ptr(svc, state) - default: - m.Ns = []dns.RR{e.soa(state)} - } - - // If we did have records, but queried for the wrong qtype return a nodata response. - if len(m.Answer) == 0 { - m.Ns = []dns.RR{e.soa(state)} - } - - w.WriteMsg(m) - return 0, nil -} - -// Name implements the Handler interface. -func (e *External) Name() string { return "k8s_external" } diff --git a/plugin/k8s_external/external_test.go b/plugin/k8s_external/external_test.go deleted file mode 100644 index ae265e9556..0000000000 --- a/plugin/k8s_external/external_test.go +++ /dev/null @@ -1,433 +0,0 @@ -package external - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/kubernetes" - "github.com/coredns/coredns/plugin/kubernetes/object" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" - api "k8s.io/api/core/v1" -) - -func TestExternal(t *testing.T) { - k := kubernetes.New([]string{"cluster.local."}) - k.Namespaces = map[string]struct{}{"testns": {}} - k.APIConn = &external{} - - e := New() - e.Zones = []string{"example.com.", "in-addr.arpa."} - e.headless = true - e.Next = test.NextHandler(dns.RcodeSuccess, nil) - e.externalFunc = k.External - e.externalAddrFunc = externalAddress // internal test function - e.externalSerialFunc = externalSerial // internal test function - - ctx := context.TODO() - for i, tc := range tests { - r := tc.Msg() - w := dnstest.NewRecorder(&test.ResponseWriter{}) - - _, err := e.ServeDNS(ctx, w, r) - if err != tc.Error { - t.Errorf("Test %d expected no error, got %v", i, err) - return - } - if tc.Error != nil { - continue - } - - resp := w.Msg - - if resp == nil { - t.Fatalf("Test %d, got nil message and no error for %q", i, r.Question[0].Name) - } - if !resp.Authoritative { - t.Error("Expected authoritative answer") - } - if err = test.SortAndCheck(resp, tc); err != nil { - t.Errorf("Test %d: %v", i, err) - } - } -} - -var tests = []test.Case{ - // PTR reverse lookup - { - Qname: "4.3.2.1.in-addr.arpa.", Qtype: dns.TypePTR, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.PTR("4.3.2.1.in-addr.arpa. 5 IN PTR svc1.testns.example.com."), - }, - }, - // Bad PTR reverse lookup using existing service name - { - Qname: "svc1.testns.example.com.", Qtype: dns.TypePTR, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // Bad PTR reverse lookup using non-existing service name - { - Qname: "not-existing.testns.example.com.", Qtype: dns.TypePTR, Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // A Service - { - Qname: "svc1.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("svc1.testns.example.com. 5 IN A 1.2.3.4"), - }, - }, - { - Qname: "svc1.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{test.SRV("svc1.testns.example.com. 5 IN SRV 0 100 80 svc1.testns.example.com.")}, - Extra: []dns.RR{test.A("svc1.testns.example.com. 5 IN A 1.2.3.4")}, - }, - // SRV Service Not udp/tcp - { - Qname: "*._not-udp-or-tcp.svc1.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // SRV Service - { - Qname: "_http._tcp.svc1.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("_http._tcp.svc1.testns.example.com. 5 IN SRV 0 100 80 svc1.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("svc1.testns.example.com. 5 IN A 1.2.3.4"), - }, - }, - // AAAA Service (with an existing A record, but no AAAA record) - { - Qname: "svc1.testns.example.com.", Qtype: dns.TypeAAAA, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // AAAA Service (non-existing service) - { - Qname: "svc0.testns.example.com.", Qtype: dns.TypeAAAA, Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // A Service (non-existing service) - { - Qname: "svc0.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // A Service (non-existing namespace) - { - Qname: "svc0.svc-nons.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeNameError, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // AAAA Service - { - Qname: "svc6.testns.example.com.", Qtype: dns.TypeAAAA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.AAAA("svc6.testns.example.com. 5 IN AAAA 1:2::5"), - }, - }, - // SRV - { - Qname: "_http._tcp.svc6.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("_http._tcp.svc6.testns.example.com. 5 IN SRV 0 100 80 svc6.testns.example.com."), - }, - Extra: []dns.RR{ - test.AAAA("svc6.testns.example.com. 5 IN AAAA 1:2::5"), - }, - }, - // SRV - { - Qname: "svc6.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("svc6.testns.example.com. 5 IN SRV 0 100 80 svc6.testns.example.com."), - }, - Extra: []dns.RR{ - test.AAAA("svc6.testns.example.com. 5 IN AAAA 1:2::5"), - }, - }, - { - Qname: "testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - { - Qname: "testns.example.com.", Qtype: dns.TypeSOA, Rcode: dns.RcodeSuccess, - Ns: []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.example.com. 1499347823 7200 1800 86400 5"), - }, - }, - // svc11 - { - Qname: "svc11.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("svc11.testns.example.com. 5 IN A 2.3.4.5"), - }, - }, - { - Qname: "_http._tcp.svc11.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("_http._tcp.svc11.testns.example.com. 5 IN SRV 0 100 80 svc11.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("svc11.testns.example.com. 5 IN A 2.3.4.5"), - }, - }, - { - Qname: "svc11.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("svc11.testns.example.com. 5 IN SRV 0 100 80 svc11.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("svc11.testns.example.com. 5 IN A 2.3.4.5"), - }, - }, - // svc12 - { - Qname: "svc12.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.CNAME("svc12.testns.example.com. 5 IN CNAME dummy.hostname"), - }, - }, - { - Qname: "_http._tcp.svc12.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("_http._tcp.svc12.testns.example.com. 5 IN SRV 0 100 80 dummy.hostname."), - }, - }, - { - Qname: "svc12.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("svc12.testns.example.com. 5 IN SRV 0 100 80 dummy.hostname."), - }, - }, - // headless service - { - Qname: "svc-headless.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("svc-headless.testns.example.com. 5 IN A 1.2.3.4"), - test.A("svc-headless.testns.example.com. 5 IN A 1.2.3.5"), - }, - }, - { - Qname: "svc-headless.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("svc-headless.testns.example.com. 5 IN SRV 0 50 80 endpoint-svc-0.svc-headless.testns.example.com."), - test.SRV("svc-headless.testns.example.com. 5 IN SRV 0 50 80 endpoint-svc-1.svc-headless.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("endpoint-svc-0.svc-headless.testns.example.com. 5 IN A 1.2.3.4"), - test.A("endpoint-svc-1.svc-headless.testns.example.com. 5 IN A 1.2.3.5"), - }, - }, - { - Qname: "_http._tcp.svc-headless.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("_http._tcp.svc-headless.testns.example.com. 5 IN SRV 0 50 80 endpoint-svc-0.svc-headless.testns.example.com."), - test.SRV("_http._tcp.svc-headless.testns.example.com. 5 IN SRV 0 50 80 endpoint-svc-1.svc-headless.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("endpoint-svc-0.svc-headless.testns.example.com. 5 IN A 1.2.3.4"), - test.A("endpoint-svc-1.svc-headless.testns.example.com. 5 IN A 1.2.3.5"), - }, - }, - { - Qname: "endpoint-svc-0.svc-headless.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("endpoint-svc-0.svc-headless.testns.example.com. 5 IN SRV 0 100 80 endpoint-svc-0.svc-headless.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("endpoint-svc-0.svc-headless.testns.example.com. 5 IN A 1.2.3.4"), - }, - }, - { - Qname: "endpoint-svc-1.svc-headless.testns.example.com.", Qtype: dns.TypeSRV, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.SRV("endpoint-svc-1.svc-headless.testns.example.com. 5 IN SRV 0 100 80 endpoint-svc-1.svc-headless.testns.example.com."), - }, - Extra: []dns.RR{ - test.A("endpoint-svc-1.svc-headless.testns.example.com. 5 IN A 1.2.3.5"), - }, - }, - { - Qname: "endpoint-svc-0.svc-headless.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("endpoint-svc-0.svc-headless.testns.example.com. 5 IN A 1.2.3.4"), - }, - }, - { - Qname: "endpoint-svc-1.svc-headless.testns.example.com.", Qtype: dns.TypeA, Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("endpoint-svc-1.svc-headless.testns.example.com. 5 IN A 1.2.3.5"), - }, - }, -} - -type external struct{} - -func (external) HasSynced() bool { return true } -func (external) Run() {} -func (external) Stop() error { return nil } -func (external) EpIndexReverse(string) []*object.Endpoints { return nil } -func (external) SvcIndexReverse(string) []*object.Service { return nil } -func (external) Modified(kubernetes.ModifiedMode) int64 { return 0 } - -func (external) SvcImportIndex(s string) []*object.ServiceImport { return nil } -func (external) ServiceImportList() []*object.ServiceImport { return nil } -func (external) McEpIndex(s string) []*object.MultiClusterEndpoints { return nil } -func (external) MultiClusterEndpointsList(s string) []*object.MultiClusterEndpoints { return nil } - -func (external) EpIndex(s string) []*object.Endpoints { - return epIndexExternal[s] -} - -func (external) EndpointsList() []*object.Endpoints { - var eps []*object.Endpoints - for _, ep := range epIndexExternal { - eps = append(eps, ep...) - } - return eps -} -func (external) GetNodeByName(ctx context.Context, name string) (*api.Node, error) { return nil, nil } -func (external) SvcIndex(s string) []*object.Service { return svcIndexExternal[s] } -func (external) PodIndex(string) []*object.Pod { return nil } - -func (external) SvcExtIndexReverse(ip string) (result []*object.Service) { - for _, svcs := range svcIndexExternal { - for _, svc := range svcs { - for _, exIp := range svc.ExternalIPs { - if exIp != ip { - continue - } - result = append(result, svc) - } - } - } - return result -} - -func (external) GetNamespaceByName(name string) (*object.Namespace, error) { - return &object.Namespace{ - Name: name, - }, nil -} - -var epIndexExternal = map[string][]*object.Endpoints{ - "svc-headless.testns": { - { - Name: "svc-headless", - Namespace: "testns", - Index: "svc-headless.testns", - Subsets: []object.EndpointSubset{ - { - Ports: []object.EndpointPort{ - { - Port: 80, - Name: "http", - Protocol: "TCP", - }, - }, - Addresses: []object.EndpointAddress{ - { - IP: "1.2.3.4", - Hostname: "endpoint-svc-0", - NodeName: "test-node", - TargetRefName: "endpoint-svc-0", - }, - { - IP: "1.2.3.5", - Hostname: "endpoint-svc-1", - NodeName: "test-node", - TargetRefName: "endpoint-svc-1", - }, - }, - }, - }, - }, - }, -} - -var svcIndexExternal = map[string][]*object.Service{ - "svc1.testns": { - { - Name: "svc1", - Namespace: "testns", - Type: api.ServiceTypeClusterIP, - ClusterIPs: []string{"10.0.0.1"}, - ExternalIPs: []string{"1.2.3.4"}, - Ports: []api.ServicePort{{Name: "http", Protocol: "tcp", Port: 80}}, - }, - }, - "svc6.testns": { - { - Name: "svc6", - Namespace: "testns", - Type: api.ServiceTypeClusterIP, - ClusterIPs: []string{"10.0.0.3"}, - ExternalIPs: []string{"1:2::5"}, - Ports: []api.ServicePort{{Name: "http", Protocol: "tcp", Port: 80}}, - }, - }, - "svc11.testns": { - { - Name: "svc11", - Namespace: "testns", - Type: api.ServiceTypeLoadBalancer, - ExternalIPs: []string{"2.3.4.5"}, - ClusterIPs: []string{"10.0.0.3"}, - Ports: []api.ServicePort{{Name: "http", Protocol: "tcp", Port: 80}}, - }, - }, - "svc12.testns": { - { - Name: "svc12", - Namespace: "testns", - Type: api.ServiceTypeLoadBalancer, - ClusterIPs: []string{"10.0.0.3"}, - ExternalIPs: []string{"dummy.hostname"}, - Ports: []api.ServicePort{{Name: "http", Protocol: "tcp", Port: 80}}, - }, - }, - "svc-headless.testns": { - { - Name: "svc-headless", - Namespace: "testns", - Type: api.ServiceTypeClusterIP, - ClusterIPs: []string{"None"}, - Ports: []api.ServicePort{{Name: "http", Protocol: "tcp", Port: 80}}, - }, - }, -} - -func (external) ServiceList() []*object.Service { - var svcs []*object.Service - for _, svc := range svcIndexExternal { - svcs = append(svcs, svc...) - } - return svcs -} - -func externalAddress(state request.Request, headless bool) []dns.RR { - a := test.A("example.org. IN A 127.0.0.1") - return []dns.RR{a} -} - -func externalSerial(string) uint32 { - return 1499347823 -} diff --git a/plugin/k8s_external/msg_to_dns.go b/plugin/k8s_external/msg_to_dns.go deleted file mode 100644 index 6975718b9e..0000000000 --- a/plugin/k8s_external/msg_to_dns.go +++ /dev/null @@ -1,190 +0,0 @@ -package external - -import ( - "context" - "math" - - "github.com/coredns/coredns/plugin/etcd/msg" - "github.com/coredns/coredns/plugin/pkg/dnsutil" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func (e *External) a(ctx context.Context, services []msg.Service, state request.Request) (records []dns.RR, truncated bool) { - dup := make(map[string]struct{}) - - for _, s := range services { - what, ip := s.HostType() - - switch what { - case dns.TypeCNAME: - rr := s.NewCNAME(state.QName(), s.Host) - records = append(records, rr) - if resp, err := e.upstream.Lookup(ctx, state, dns.Fqdn(s.Host), dns.TypeA); err == nil { - records = append(records, resp.Answer...) - if resp.Truncated { - truncated = true - } - } - - case dns.TypeA: - if _, ok := dup[s.Host]; !ok { - dup[s.Host] = struct{}{} - rr := s.NewA(state.QName(), ip) - rr.Hdr.Ttl = e.ttl - records = append(records, rr) - } - - case dns.TypeAAAA: - // nada - } - } - return records, truncated -} - -func (e *External) aaaa(ctx context.Context, services []msg.Service, state request.Request) (records []dns.RR, truncated bool) { - dup := make(map[string]struct{}) - - for _, s := range services { - what, ip := s.HostType() - - switch what { - case dns.TypeCNAME: - rr := s.NewCNAME(state.QName(), s.Host) - records = append(records, rr) - if resp, err := e.upstream.Lookup(ctx, state, dns.Fqdn(s.Host), dns.TypeAAAA); err == nil { - records = append(records, resp.Answer...) - if resp.Truncated { - truncated = true - } - } - - case dns.TypeA: - // nada - - case dns.TypeAAAA: - if _, ok := dup[s.Host]; !ok { - dup[s.Host] = struct{}{} - rr := s.NewAAAA(state.QName(), ip) - rr.Hdr.Ttl = e.ttl - records = append(records, rr) - } - } - } - return records, truncated -} - -func (e *External) ptr(services []msg.Service, state request.Request) (records []dns.RR) { - dup := make(map[string]struct{}) - for _, s := range services { - if _, ok := dup[s.Host]; !ok { - dup[s.Host] = struct{}{} - rr := s.NewPTR(state.QName(), dnsutil.Join(s.Host, e.Zones[0])) - rr.Hdr.Ttl = e.ttl - records = append(records, rr) - } - } - return records -} - -func (e *External) srv(ctx context.Context, services []msg.Service, state request.Request) (records, extra []dns.RR) { - dup := make(map[item]struct{}) - - // Looping twice to get the right weight vs priority. This might break because we may drop duplicate SRV records latter on. - w := make(map[int]int) - for _, s := range services { - weight := 100 - if s.Weight != 0 { - weight = s.Weight - } - if _, ok := w[s.Priority]; !ok { - w[s.Priority] = weight - continue - } - w[s.Priority] += weight - } - for _, s := range services { - // Don't add the entry if the port is -1 (invalid). The kubernetes plugin uses port -1 when a service/endpoint - // does not have any declared ports. - if s.Port == -1 { - continue - } - w1 := 100.0 / float64(w[s.Priority]) - if s.Weight == 0 { - w1 *= 100 - } else { - w1 *= float64(s.Weight) - } - weight := uint16(math.Floor(w1)) - // weight should be at least 1 - if weight == 0 { - weight = 1 - } - - what, ip := s.HostType() - - switch what { - case dns.TypeCNAME: - addr := dns.Fqdn(s.Host) - srv := s.NewSRV(state.QName(), weight) - if ok := isDuplicate(dup, srv.Target, "", srv.Port); !ok { - records = append(records, srv) - } - if ok := isDuplicate(dup, srv.Target, addr, 0); !ok { - if resp, err := e.upstream.Lookup(ctx, state, addr, dns.TypeA); err == nil { - extra = append(extra, resp.Answer...) - } - if resp, err := e.upstream.Lookup(ctx, state, addr, dns.TypeAAAA); err == nil { - extra = append(extra, resp.Answer...) - } - } - case dns.TypeA, dns.TypeAAAA: - addr := s.Host - s.Host = msg.Domain(s.Key) - srv := s.NewSRV(state.QName(), weight) - - if ok := isDuplicate(dup, srv.Target, "", srv.Port); !ok { - records = append(records, srv) - } - - if ok := isDuplicate(dup, srv.Target, addr, 0); !ok { - hdr := dns.RR_Header{Name: srv.Target, Rrtype: what, Class: dns.ClassINET, Ttl: e.ttl} - - switch what { - case dns.TypeA: - extra = append(extra, &dns.A{Hdr: hdr, A: ip}) - case dns.TypeAAAA: - extra = append(extra, &dns.AAAA{Hdr: hdr, AAAA: ip}) - } - } - } - } - return records, extra -} - -// not sure if this is even needed. - -// item holds records. -type item struct { - name string // name of the record (either owner or something else unique). - port uint16 // port of the record (used for address records, A and AAAA). - addr string // address of the record (A and AAAA). -} - -// isDuplicate uses m to see if the combo (name, addr, port) already exists. If it does -// not exist already IsDuplicate will also add the record to the map. -func isDuplicate(m map[item]struct{}, name, addr string, port uint16) bool { - if addr != "" { - _, ok := m[item{name, 0, addr}] - if !ok { - m[item{name, 0, addr}] = struct{}{} - } - return ok - } - _, ok := m[item{name, port, ""}] - if !ok { - m[item{name, port, ""}] = struct{}{} - } - return ok -} diff --git a/plugin/k8s_external/setup.go b/plugin/k8s_external/setup.go deleted file mode 100644 index f42f7de23d..0000000000 --- a/plugin/k8s_external/setup.go +++ /dev/null @@ -1,88 +0,0 @@ -package external - -import ( - "errors" - "strconv" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/upstream" -) - -const pluginName = "k8s_external" - -func init() { plugin.Register(pluginName, setup) } - -func setup(c *caddy.Controller) error { - e, err := parse(c) - if err != nil { - return plugin.Error("k8s_external", err) - } - - // Do this in OnStartup, so all plugins have been initialized. - c.OnStartup(func() error { - m := dnsserver.GetConfig(c).Handler("kubernetes") - if m == nil { - return plugin.Error(pluginName, errors.New("kubernetes plugin not loaded")) - } - - x, ok := m.(Externaler) - if !ok { - return plugin.Error(pluginName, errors.New("kubernetes plugin does not implement the Externaler interface")) - } - - e.externalFunc = x.External - e.externalAddrFunc = x.ExternalAddress - e.externalServicesFunc = x.ExternalServices - e.externalSerialFunc = x.ExternalSerial - return nil - }) - - e.upstream = upstream.New() - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - e.Next = next - return e - }) - - return nil -} - -func parse(c *caddy.Controller) (*External, error) { - e := New() - - for c.Next() { // external - e.Zones = plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - for c.NextBlock() { - switch c.Val() { - case "ttl": - args := c.RemainingArgs() - if len(args) == 0 { - return nil, c.ArgErr() - } - t, err := strconv.Atoi(args[0]) - if err != nil { - return nil, err - } - if t < 0 || t > 3600 { - return nil, c.Errf("ttl must be in range [0, 3600]: %d", t) - } - e.ttl = uint32(t) - case "apex": - args := c.RemainingArgs() - if len(args) == 0 { - return nil, c.ArgErr() - } - e.apex = args[0] - case "headless": - e.headless = true - case "fallthrough": - e.Fall.SetZonesFromArgs(c.RemainingArgs()) - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - } - return e, nil -} diff --git a/plugin/k8s_external/setup_test.go b/plugin/k8s_external/setup_test.go deleted file mode 100644 index 8814554ef3..0000000000 --- a/plugin/k8s_external/setup_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package external - -import ( - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/pkg/fall" -) - -func TestSetup(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedZone string - expectedApex string - expectedHeadless bool - expectedFallthrough fall.F - }{ - {`k8s_external`, false, "", "dns", false, fall.Zero}, - {`k8s_external example.org`, false, "example.org.", "dns", false, fall.Zero}, - {`k8s_external example.org { - apex testdns -}`, false, "example.org.", "testdns", false, fall.Zero}, - {`k8s_external example.org { - headless -}`, false, "example.org.", "dns", true, fall.Zero}, - {`k8s_external example.org { - fallthrough -}`, false, "example.org.", "dns", false, fall.Root}, - {`k8s_external example.org { - fallthrough ip6.arpa inaddr.arpa foo.com -}`, false, "example.org.", "dns", false, - fall.F{Zones: []string{"ip6.arpa.", "inaddr.arpa.", "foo.com."}}}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - e, err := parse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - } - - if !test.shouldErr && test.expectedZone != "" { - if test.expectedZone != e.Zones[0] { - t.Errorf("Test %d, expected zone %q for input %s, got: %q", i, test.expectedZone, test.input, e.Zones[0]) - } - } - if !test.shouldErr { - if test.expectedApex != e.apex { - t.Errorf("Test %d, expected apex %q for input %s, got: %q", i, test.expectedApex, test.input, e.apex) - } - } - if !test.shouldErr { - if test.expectedHeadless != e.headless { - t.Errorf("Test %d, expected headless %q for input %s, got: %v", i, test.expectedApex, test.input, e.headless) - } - } - if !test.shouldErr { - if !e.Fall.Equal(test.expectedFallthrough) { - t.Errorf("Test %d, expected to be initialized with fallthrough %q for input %s, got: %v", i, test.expectedFallthrough, test.input, e.Fall) - } - } - } -} diff --git a/plugin/k8s_external/transfer.go b/plugin/k8s_external/transfer.go deleted file mode 100644 index 781f19f21f..0000000000 --- a/plugin/k8s_external/transfer.go +++ /dev/null @@ -1,150 +0,0 @@ -package external - -import ( - "context" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/etcd/msg" - "github.com/coredns/coredns/plugin/kubernetes" - "github.com/coredns/coredns/plugin/transfer" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Transfer implements transfer.Transferer -func (e *External) Transfer(zone string, serial uint32) (<-chan []dns.RR, error) { - z := plugin.Zones(e.Zones).Matches(zone) - if z != zone { - return nil, transfer.ErrNotAuthoritative - } - - ctx := context.Background() - ch := make(chan []dns.RR, 2) - if zone == "." { - zone = "" - } - state := request.Request{Zone: zone} - - // SOA - soa := e.soa(state) - ch <- []dns.RR{soa} - if serial != 0 && serial >= soa.Serial { - close(ch) - return ch, nil - } - - go func() { - // Add NS - nsName := "ns1." + e.apex + "." + zone - nsHdr := dns.RR_Header{Name: zone, Rrtype: dns.TypeNS, Ttl: e.ttl, Class: dns.ClassINET} - ch <- []dns.RR{&dns.NS{Hdr: nsHdr, Ns: nsName}} - - // Add Nameserver A/AAAA records - nsRecords := e.externalAddrFunc(state, e.headless) - for i := range nsRecords { - // externalAddrFunc returns incomplete header names, correct here - nsRecords[i].Header().Name = nsName - nsRecords[i].Header().Ttl = e.ttl - ch <- []dns.RR{nsRecords[i]} - } - - svcs, headlessSvcs := e.externalServicesFunc(zone, e.headless) - srvSeen := make(map[string]struct{}) - - for i := range svcs { - name := msg.Domain(svcs[i].Key) - - if svcs[i].TargetStrip == 0 { - // Add Service A/AAAA records - s := request.Request{Req: &dns.Msg{Question: []dns.Question{{Name: name}}}} - as, _ := e.a(ctx, []msg.Service{svcs[i]}, s) - if len(as) > 0 { - ch <- as - } - aaaas, _ := e.aaaa(ctx, []msg.Service{svcs[i]}, s) - if len(aaaas) > 0 { - ch <- aaaas - } - // Add bare SRV record, ensuring uniqueness - recs, _ := e.srv(ctx, []msg.Service{svcs[i]}, s) - for _, srv := range recs { - if !nameSeen(srvSeen, srv) { - ch <- []dns.RR{srv} - } - } - continue - } - // Add full SRV record, ensuring uniqueness - s := request.Request{Req: &dns.Msg{Question: []dns.Question{{Name: name}}}} - recs, _ := e.srv(ctx, []msg.Service{svcs[i]}, s) - for _, srv := range recs { - if !nameSeen(srvSeen, srv) { - ch <- []dns.RR{srv} - } - } - } - for key, svcs := range headlessSvcs { - // we have to strip the leading key because it's either port.protocol or endpoint - name := msg.Domain(key[:strings.LastIndex(key, "/")]) - switchKey := key[strings.LastIndex(key, "/")+1:] - switch switchKey { - case kubernetes.Endpoint: - // headless.namespace.example.com records - s := request.Request{Req: &dns.Msg{Question: []dns.Question{{Name: name}}}} - as, _ := e.a(ctx, svcs, s) - if len(as) > 0 { - ch <- as - } - aaaas, _ := e.aaaa(ctx, svcs, s) - if len(aaaas) > 0 { - ch <- aaaas - } - // Add bare SRV record, ensuring uniqueness - recs, _ := e.srv(ctx, svcs, s) - ch <- recs - for _, srv := range recs { - ch <- []dns.RR{srv} - } - - for i := range svcs { - // endpoint.headless.namespace.example.com record - s := request.Request{Req: &dns.Msg{Question: []dns.Question{{Name: msg.Domain(svcs[i].Key)}}}} - - as, _ := e.a(ctx, []msg.Service{svcs[i]}, s) - if len(as) > 0 { - ch <- as - } - aaaas, _ := e.aaaa(ctx, []msg.Service{svcs[i]}, s) - if len(aaaas) > 0 { - ch <- aaaas - } - // Add bare SRV record, ensuring uniqueness - recs, _ := e.srv(ctx, []msg.Service{svcs[i]}, s) - ch <- recs - for _, srv := range recs { - ch <- []dns.RR{srv} - } - } - - case kubernetes.PortProtocol: - s := request.Request{Req: &dns.Msg{Question: []dns.Question{{Name: name}}}} - recs, _ := e.srv(ctx, svcs, s) - ch <- recs - } - } - ch <- []dns.RR{soa} - close(ch) - }() - - return ch, nil -} - -func nameSeen(namesSeen map[string]struct{}, rr dns.RR) bool { - if _, duplicate := namesSeen[rr.Header().Name]; duplicate { - return true - } - namesSeen[rr.Header().Name] = struct{}{} - return false -} diff --git a/plugin/k8s_external/transfer_test.go b/plugin/k8s_external/transfer_test.go deleted file mode 100644 index 26642bb541..0000000000 --- a/plugin/k8s_external/transfer_test.go +++ /dev/null @@ -1,147 +0,0 @@ -package external - -import ( - "strings" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/kubernetes" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/plugin/transfer" - - "github.com/miekg/dns" -) - -func TestImplementsTransferer(t *testing.T) { - var e plugin.Handler = &External{} - _, ok := e.(transfer.Transferer) - if !ok { - t.Error("Transferer not implemented") - } -} - -func TestTransferAXFR(t *testing.T) { - k := kubernetes.New([]string{"cluster.local."}) - k.Namespaces = map[string]struct{}{"testns": {}} - k.APIConn = &external{} - - e := New() - e.headless = true - e.Zones = []string{"example.com."} - e.externalFunc = k.External - e.externalAddrFunc = externalAddress // internal test function - e.externalSerialFunc = externalSerial // internal test function - e.externalServicesFunc = k.ExternalServices - - ch, err := e.Transfer("example.com.", 0) - - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - var records []dns.RR - for rrs := range ch { - records = append(records, rrs...) - } - - expect := []dns.RR{} - for _, tc := range append(tests, testsApex...) { - if tc.Rcode != dns.RcodeSuccess { - continue - } - - for _, ans := range tc.Answer { - // Exclude wildcard test cases - if strings.Contains(ans.Header().Name, "*") { - continue - } - - // Exclude TXT records - if ans.Header().Rrtype == dns.TypeTXT { - continue - } - - // Exclude PTR records - if ans.Header().Rrtype == dns.TypePTR { - continue - } - - expect = append(expect, ans) - } - } - - diff := difference(expect, records) - if len(diff) != 0 { - t.Errorf("Got back %d records that do not exist in test cases, should be 0:", len(diff)) - for _, rec := range diff { - t.Errorf("%+v", rec) - } - } - - diff = difference(records, expect) - if len(diff) != 0 { - t.Errorf("Result is missing %d records, should be 0:", len(diff)) - for _, rec := range diff { - t.Errorf("%+v", rec) - } - } -} - -func TestTransferIXFR(t *testing.T) { - k := kubernetes.New([]string{"cluster.local."}) - k.Namespaces = map[string]struct{}{"testns": {}} - k.APIConn = &external{} - - e := New() - e.Zones = []string{"example.com."} - e.headless = true - e.externalFunc = k.External - e.externalAddrFunc = externalAddress // internal test function - e.externalSerialFunc = externalSerial // internal test function - e.externalServicesFunc = k.ExternalServices - - ch, err := e.Transfer("example.com.", externalSerial("example.com.")) - - if err != nil { - t.Fatalf("Unexpected error: %v", err) - } - var records []dns.RR - for rrs := range ch { - records = append(records, rrs...) - } - - expect := []dns.RR{ - test.SOA("example.com. 5 IN SOA ns1.dns.example.com. hostmaster.dns.example.com. 1499347823 7200 1800 86400 5"), - } - - diff := difference(expect, records) - if len(diff) != 0 { - t.Errorf("Got back %d records that do not exist in test cases, should be 0:", len(diff)) - for _, rec := range diff { - t.Errorf("%+v", rec) - } - } - - diff = difference(records, expect) - if len(diff) != 0 { - t.Errorf("Result is missing %d records, should be 0:", len(diff)) - for _, rec := range diff { - t.Errorf("%+v", rec) - } - } -} - -// difference shows what we're missing when comparing two RR slices -func difference(testRRs []dns.RR, gotRRs []dns.RR) []dns.RR { - expectedRRs := map[string]struct{}{} - for _, rr := range testRRs { - expectedRRs[rr.String()] = struct{}{} - } - - foundRRs := []dns.RR{} - for _, rr := range gotRRs { - if _, ok := expectedRRs[rr.String()]; !ok { - foundRRs = append(foundRRs, rr) - } - } - return foundRRs -} diff --git a/plugin/loadbalance/README.md b/plugin/loadbalance/README.md deleted file mode 100644 index e8777785b2..0000000000 --- a/plugin/loadbalance/README.md +++ /dev/null @@ -1,107 +0,0 @@ -# loadbalance - -## Name - -*loadbalance* - randomizes the order of A, AAAA and MX records and optionally prefers specific subnets. - -## Description - -The *loadbalance* will act as a round-robin DNS load balancer by randomizing the order of A, AAAA, -and MX records in the answer. - -See [Wikipedia](https://en.wikipedia.org/wiki/Round-robin_DNS) about the pros and cons of this -setup. It will take care to sort any CNAMEs before any address records, because some stub resolver -implementations (like glibc) are particular about that. - -## Syntax - -~~~ -loadbalance [round_robin | weighted WEIGHTFILE] { - reload DURATION - prefer CIDR [CIDR...] -} -~~~ -* `round_robin` policy randomizes the order of A, AAAA, and MX records applying a uniform probability distribution. This is the default load balancing policy. - -* `weighted` policy assigns weight values to IPs to control the relative likelihood of particular IPs to be returned as the first -(top) A/AAAA record in the answer. Note that it does not shuffle all the records in the answer, it is only concerned about the first A/AAAA record -returned in the answer. - -Additionally, the plugin supports subnet-based ordering using the `prefer` directive, which reorders A/AAAA records so that IPs from preferred subnets appear first. - - * **WEIGHTFILE** is the file containing the weight values assigned to IPs for various domain names. If the path is relative, the path from the **root** plugin will be prepended to it. The format is explained below in the *Weightfile* section. - - * **DURATION** interval to reload `WEIGHTFILE` and update weight assignments if there are changes in the file. The default value is `30s`. A value of `0s` means to not scan for changes and reload. - - -## Weightfile - -The generic weight file syntax: - -~~~ -# Comment lines are ignored - -domain-name1 -ip11 weight11 -ip12 weight12 -ip13 weight13 - -domain-name2 -ip21 weight21 -ip22 weight22 -# ... etc. -~~~ - -where `ipXY` is an IP address for `domain-nameX` and `weightXY` is the weight value associated with that IP. The weight values are in the range of [1,255]. - -The `weighted` policy selects one of the address record in the result list and moves it to the top (first) position in the list. The random selection takes into account the weight values assigned to the addresses in the weight file. If an address in the result list is associated with no weight value in the weight file then the default weight value "1" is assumed for it when the selection is performed. - - -## Examples - -Load balance replies coming back from Google Public DNS: - -~~~ corefile -. { - loadbalance round_robin - forward . 8.8.8.8 8.8.4.4 -} -~~~ - -Use the `weighted` strategy to load balance replies supplied by the **file** plugin. We assign weight vales `3`, `1` and `2` to the IPs `100.64.1.1`, `100.64.1.2` and `100.64.1.3`, respectively. These IPs are addresses in A records for the domain name `www.example.com` defined in the `./db.example.com` zone file. The ratio between the number of answers in which `100.64.1.1`, `100.64.1.2` or `100.64.1.3` is in the top (first) A record should converge to `3 : 1 : 2`. (E.g. there should be twice as many answers with `100.64.1.3` in the top A record than with `100.64.1.2`). -Corefile: - -~~~ corefile -example.com { - file ./db.example.com { - reload 10s - } - loadbalance weighted ./db.example.com.weights { - reload 10s - } -} -~~~ - -weight file `./db.example.com.weights`: - -~~~ -www.example.com -100.64.1.1 3 -100.64.1.2 1 -100.64.1.3 2 -~~~ - -### Subnet Prioritization - -Prioritize IPs from 10.9.20.0/24 and 192.168.1.0/24: - -```corefile -. { - loadbalance round_robin { - prefer 10.9.20.0/24 192.168.1.0/24 - } - forward . 1.1.1.1 -} -``` - -If the DNS response includes multiple A/AAAA records, the plugin will reorder them to place the ones matching preferred subnets first. diff --git a/plugin/loadbalance/handler.go b/plugin/loadbalance/handler.go deleted file mode 100644 index 8b84e1c5c0..0000000000 --- a/plugin/loadbalance/handler.go +++ /dev/null @@ -1,25 +0,0 @@ -// Package loadbalance is a plugin for rewriting responses to do "load balancing" -package loadbalance - -import ( - "context" - - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -// RoundRobin is a plugin to rewrite responses for "load balancing". -type LoadBalance struct { - Next plugin.Handler - shuffle func(*dns.Msg) *dns.Msg -} - -// ServeDNS implements the plugin.Handler interface. -func (lb LoadBalance) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - rw := &LoadBalanceResponseWriter{ResponseWriter: w, shuffle: lb.shuffle} - return plugin.NextOrFailure(lb.Name(), lb.Next, ctx, rw, r) -} - -// Name implements the Handler interface. -func (lb LoadBalance) Name() string { return "loadbalance" } diff --git a/plugin/loadbalance/loadbalance.go b/plugin/loadbalance/loadbalance.go deleted file mode 100644 index 88f2da0315..0000000000 --- a/plugin/loadbalance/loadbalance.go +++ /dev/null @@ -1,91 +0,0 @@ -// Package loadbalance shuffles A, AAAA and MX records. -package loadbalance - -import ( - "github.com/miekg/dns" -) - -const ( - ramdomShufflePolicy = "round_robin" - weightedRoundRobinPolicy = "weighted" -) - -// LoadBalanceResponseWriter is a response writer that shuffles A, AAAA and MX records. -type LoadBalanceResponseWriter struct { - dns.ResponseWriter - shuffle func(*dns.Msg) *dns.Msg -} - -// WriteMsg implements the dns.ResponseWriter interface. -func (r *LoadBalanceResponseWriter) WriteMsg(res *dns.Msg) error { - if res.Rcode != dns.RcodeSuccess { - return r.ResponseWriter.WriteMsg(res) - } - - if res.Question[0].Qtype == dns.TypeAXFR || res.Question[0].Qtype == dns.TypeIXFR { - return r.ResponseWriter.WriteMsg(res) - } - - return r.ResponseWriter.WriteMsg(r.shuffle(res)) -} - -func randomShuffle(res *dns.Msg) *dns.Msg { - res.Answer = roundRobin(res.Answer) - res.Ns = roundRobin(res.Ns) - res.Extra = roundRobin(res.Extra) - return res -} - -func roundRobin(in []dns.RR) []dns.RR { - cname := []dns.RR{} - address := []dns.RR{} - mx := []dns.RR{} - rest := []dns.RR{} - for _, r := range in { - switch r.Header().Rrtype { - case dns.TypeCNAME: - cname = append(cname, r) - case dns.TypeA, dns.TypeAAAA: - address = append(address, r) - case dns.TypeMX: - mx = append(mx, r) - default: - rest = append(rest, r) - } - } - - roundRobinShuffle(address) - roundRobinShuffle(mx) - - out := append(cname, rest...) - out = append(out, address...) - out = append(out, mx...) - return out -} - -func roundRobinShuffle(records []dns.RR) { - switch l := len(records); l { - case 0, 1: - break - case 2: - if dns.Id()%2 == 0 { - records[0], records[1] = records[1], records[0] - } - default: - for j := range l { - p := j + (int(dns.Id()) % (l - j)) - if j == p { - continue - } - records[j], records[p] = records[p], records[j] - } - } -} - -// Write implements the dns.ResponseWriter interface. -func (r *LoadBalanceResponseWriter) Write(buf []byte) (int, error) { - // Should we pack and unpack here to fiddle with the packet... Not likely. - log.Warning("LoadBalance called with Write: not shuffling records") - n, err := r.ResponseWriter.Write(buf) - return n, err -} diff --git a/plugin/loadbalance/loadbalance_test.go b/plugin/loadbalance/loadbalance_test.go deleted file mode 100644 index 02a9842715..0000000000 --- a/plugin/loadbalance/loadbalance_test.go +++ /dev/null @@ -1,203 +0,0 @@ -package loadbalance - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestLoadBalanceRandom(t *testing.T) { - rm := LoadBalance{Next: handler(), shuffle: randomShuffle} - - // the first X records must be cnames after this test - tests := []struct { - answer []dns.RR - extra []dns.RR - cnameAnswer int - cnameExtra int - addressAnswer int - addressExtra int - mxAnswer int - mxExtra int - }{ - { - answer: []dns.RR{ - test.CNAME("cname1.region2.skydns.test. 300 IN CNAME cname2.region2.skydns.test."), - test.CNAME("cname2.region2.skydns.test. 300 IN CNAME cname3.region2.skydns.test."), - test.CNAME("cname5.region2.skydns.test. 300 IN CNAME cname6.region2.skydns.test."), - test.CNAME("cname6.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - test.MX("mx.region2.skydns.test. 300 IN MX 2 mx2.region2.skydns.test."), - test.MX("mx.region2.skydns.test. 300 IN MX 3 mx3.region2.skydns.test."), - }, - cnameAnswer: 4, - addressAnswer: 1, - mxAnswer: 3, - }, - { - answer: []dns.RR{ - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - test.CNAME("cname.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - }, - cnameAnswer: 1, - addressAnswer: 1, - mxAnswer: 1, - }, - { - answer: []dns.RR{ - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.2"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx2.region2.skydns.test."), - test.CNAME("cname2.region2.skydns.test. 300 IN CNAME cname3.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.3"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx3.region2.skydns.test."), - }, - extra: []dns.RR{ - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - test.AAAA("endpoint.region2.skydns.test. 300 IN AAAA ::1"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - test.CNAME("cname2.region2.skydns.test. 300 IN CNAME cname3.region2.skydns.test."), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx2.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.3"), - test.AAAA("endpoint.region2.skydns.test. 300 IN AAAA ::2"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx3.region2.skydns.test."), - }, - cnameAnswer: 1, - cnameExtra: 1, - addressAnswer: 3, - addressExtra: 4, - mxAnswer: 3, - mxExtra: 3, - }, - } - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - for i, test := range tests { - req := new(dns.Msg) - req.SetQuestion("region2.skydns.test.", dns.TypeSRV) - req.Answer = test.answer - req.Extra = test.extra - - _, err := rm.ServeDNS(context.TODO(), rec, req) - if err != nil { - t.Errorf("Test %d: Expected no error, but got %s", i, err) - continue - } - - cname, address, mx, sorted := countRecords(rec.Msg.Answer) - if !sorted { - t.Errorf("Test %d: Expected CNAMEs, then AAAAs, then MX in Answer, but got mixed", i) - } - if cname != test.cnameAnswer { - t.Errorf("Test %d: Expected %d CNAMEs in Answer, but got %d", i, test.cnameAnswer, cname) - } - if address != test.addressAnswer { - t.Errorf("Test %d: Expected %d A/AAAAs in Answer, but got %d", i, test.addressAnswer, address) - } - if mx != test.mxAnswer { - t.Errorf("Test %d: Expected %d MXs in Answer, but got %d", i, test.mxAnswer, mx) - } - - cname, address, mx, sorted = countRecords(rec.Msg.Extra) - if !sorted { - t.Errorf("Test %d: Expected CNAMEs, then AAAAs, then MX in Extra, but got mixed", i) - } - if cname != test.cnameExtra { - t.Errorf("Test %d: Expected %d CNAMEs in Extra, but got %d", i, test.cnameAnswer, cname) - } - if address != test.addressExtra { - t.Errorf("Test %d: Expected %d A/AAAAs in Extra, but got %d", i, test.addressAnswer, address) - } - if mx != test.mxExtra { - t.Errorf("Test %d: Expected %d MXs in Extra, but got %d", i, test.mxAnswer, mx) - } - } -} - -func TestLoadBalanceXFR(t *testing.T) { - rm := LoadBalance{Next: handler()} - - answer := []dns.RR{ - test.SOA("skydns.test. 30 IN SOA ns.dns.skydns.test. hostmaster.skydns.test. 1542756695 7200 1800 86400 30"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.2"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx2.region2.skydns.test."), - test.CNAME("cname2.region2.skydns.test. 300 IN CNAME cname3.region2.skydns.test."), - test.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.3"), - test.MX("mx.region2.skydns.test. 300 IN MX 1 mx3.region2.skydns.test."), - test.SOA("skydns.test. 30 IN SOA ns.dns.skydns.test. hostmaster.skydns.test. 1542756695 7200 1800 86400 30"), - } - - for _, xfrtype := range []uint16{dns.TypeIXFR, dns.TypeAXFR} { - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - req := new(dns.Msg) - req.SetQuestion("skydns.test.", xfrtype) - req.Answer = answer - _, err := rm.ServeDNS(context.TODO(), rec, req) - if err != nil { - t.Errorf("Expected no error, but got %s for %s", err, dns.TypeToString[xfrtype]) - continue - } - - if rec.Msg.Answer[0].Header().Rrtype != dns.TypeSOA { - t.Errorf("Expected SOA record for first answer for %s", dns.TypeToString[xfrtype]) - } - - if rec.Msg.Answer[len(rec.Msg.Answer)-1].Header().Rrtype != dns.TypeSOA { - t.Errorf("Expected SOA record for last answer for %s", dns.TypeToString[xfrtype]) - } - } -} - -func countRecords(result []dns.RR) (cname int, address int, mx int, sorted bool) { - const ( - Start = iota - CNAMERecords - ARecords - MXRecords - Any - ) - - // The order of the records is used to determine if the round-robin actually did anything. - sorted = true - cname = 0 - address = 0 - mx = 0 - state := Start - for _, r := range result { - switch r.Header().Rrtype { - case dns.TypeCNAME: - sorted = sorted && state <= CNAMERecords - state = CNAMERecords - cname++ - case dns.TypeA, dns.TypeAAAA: - sorted = sorted && state <= ARecords - state = ARecords - address++ - case dns.TypeMX: - sorted = sorted && state <= MXRecords - state = MXRecords - mx++ - default: - state = Any - } - } - return cname, address, mx, sorted -} - -func handler() plugin.Handler { - return plugin.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - w.WriteMsg(r) - return dns.RcodeSuccess, nil - }) -} diff --git a/plugin/loadbalance/log_test.go b/plugin/loadbalance/log_test.go deleted file mode 100644 index e4dbd6de14..0000000000 --- a/plugin/loadbalance/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package loadbalance - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/loadbalance/prefer.go b/plugin/loadbalance/prefer.go deleted file mode 100644 index 44b3d9c73a..0000000000 --- a/plugin/loadbalance/prefer.go +++ /dev/null @@ -1,76 +0,0 @@ -package loadbalance - -import ( - "net" - - "github.com/miekg/dns" -) - -func reorderPreferredSubnets(msg *dns.Msg, subnets []*net.IPNet) *dns.Msg { - msg.Answer = reorderRecords(msg.Answer, subnets) - msg.Extra = reorderRecords(msg.Extra, subnets) - return msg -} - -func reorderRecords(records []dns.RR, subnets []*net.IPNet) []dns.RR { - var cname, address, mx, rest []dns.RR - - for _, r := range records { - switch r.Header().Rrtype { - case dns.TypeCNAME: - cname = append(cname, r) - case dns.TypeA, dns.TypeAAAA: - address = append(address, r) - case dns.TypeMX: - mx = append(mx, r) - default: - rest = append(rest, r) - } - } - - sorted := sortBySubnetPriority(address, subnets) - - out := append([]dns.RR{}, cname...) - out = append(out, sorted...) - out = append(out, mx...) - out = append(out, rest...) - return out -} - -func sortBySubnetPriority(records []dns.RR, subnets []*net.IPNet) []dns.RR { - matched := make([]dns.RR, 0, len(records)) - seen := make(map[int]bool) - - for _, subnet := range subnets { - for i, r := range records { - if seen[i] { - continue - } - ip := extractIP(r) - if ip != nil && subnet.Contains(ip) { - matched = append(matched, r) - seen[i] = true - } - } - } - - unmatched := make([]dns.RR, 0, len(records)-len(matched)) - for i, r := range records { - if !seen[i] { - unmatched = append(unmatched, r) - } - } - - return append(matched, unmatched...) -} - -func extractIP(rr dns.RR) net.IP { - switch r := rr.(type) { - case *dns.A: - return r.A - case *dns.AAAA: - return r.AAAA - default: - return nil - } -} diff --git a/plugin/loadbalance/prefer_test.go b/plugin/loadbalance/prefer_test.go deleted file mode 100644 index 12537c2f8a..0000000000 --- a/plugin/loadbalance/prefer_test.go +++ /dev/null @@ -1,96 +0,0 @@ -package loadbalance - -import ( - "net" - "testing" - - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestSortPreferred(t *testing.T) { - records := []dns.RR{ - test.A("example.org. 300 IN A 10.9.30.1"), - test.A("example.org. 300 IN A 10.9.20.5"), - test.A("example.org. 300 IN A 192.168.1.2"), - test.A("example.org. 300 IN A 10.10.0.1"), - test.A("example.org. 300 IN A 10.9.20.3"), - test.A("example.org. 300 IN A 172.16.0.1"), - test.AAAA("example.org. 300 IN AAAA 2001:db8::1"), - test.AAAA("example.org. 300 IN AAAA 2001:db8:abcd::1"), - test.AAAA("example.org. 300 IN AAAA fd00::1"), - test.CNAME("example.org. 300 IN CNAME alias.example.org."), - } - - subnets := []*net.IPNet{} - cidrs := []string{"2001:db8::/32", "10.9.20.0/24", "10.9.30.0/24"} - for _, cidr := range cidrs { - _, subnet, err := net.ParseCIDR(cidr) - if err != nil { - t.Fatalf("Failed to parse CIDR: %v", err) - } - subnets = append(subnets, subnet) - } - - msg := &dns.Msg{Answer: records} - reorderPreferredSubnets(msg, subnets) - sorted := msg.Answer - - expectedOrder := []string{ - "alias.example.org.", - "2001:db8::1", - "2001:db8:abcd::1", - "10.9.20.5", - "10.9.20.3", - "10.9.30.1", - "192.168.1.2", - "10.10.0.1", - "172.16.0.1", - "fd00::1", - } - - if len(sorted) != len(expectedOrder) { - t.Fatalf("Expected %d records, got %d", len(expectedOrder), len(sorted)) - } - - for i, rr := range sorted { - expected := expectedOrder[i] - switch r := rr.(type) { - case *dns.CNAME: - if r.Target != expected { - t.Errorf("Record %d: expected CNAME %s, got %s", i, expected, r.Target) - } - case *dns.A: - if r.A.String() != expected { - t.Errorf("Record %d: expected A IP %s, got %s", i, expected, r.A.String()) - } - case *dns.AAAA: - if r.AAAA.String() != expected { - t.Errorf("Record %d: expected AAAA IP %s, got %s", i, expected, r.AAAA.String()) - } - default: - t.Errorf("Record %d: unexpected RR type %T", i, r) - } - } -} - -func TestExtractIP(t *testing.T) { - a := test.A("example.org. 300 IN A 10.0.0.1") - ip := extractIP(a) - if ip.String() != "10.0.0.1" { - t.Errorf("Expected 10.0.0.1, got %s", ip.String()) - } - - aaaa := test.AAAA("example.org. 300 IN AAAA ::1") - ip = extractIP(aaaa) - if ip.String() != "::1" { - t.Errorf("Expected ::1, got %s", ip.String()) - } - - cname := test.CNAME("example.org. 300 IN CNAME other.org.") - ip = extractIP(cname) - if ip != nil { - t.Errorf("Expected nil for CNAME, got %v", ip) - } -} diff --git a/plugin/loadbalance/setup.go b/plugin/loadbalance/setup.go deleted file mode 100644 index b1ded1aa65..0000000000 --- a/plugin/loadbalance/setup.go +++ /dev/null @@ -1,130 +0,0 @@ -package loadbalance - -import ( - "errors" - "fmt" - "net" - "path/filepath" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" - - "github.com/miekg/dns" -) - -var log = clog.NewWithPlugin("loadbalance") -var errOpen = errors.New("weight file open error") - -func init() { plugin.Register("loadbalance", setup) } - -type lbFuncs struct { - shuffleFunc func(*dns.Msg) *dns.Msg - onStartUpFunc func() error - onShutdownFunc func() error - weighted *weightedRR // used in unit tests only - preferSubnets []*net.IPNet -} - -func setup(c *caddy.Controller) error { - //shuffleFunc, startUpFunc, shutdownFunc, err := parse(c) - lb, err := parse(c) - if err != nil { - return plugin.Error("loadbalance", err) - } - if lb.onStartUpFunc != nil { - c.OnStartup(lb.onStartUpFunc) - } - if lb.onShutdownFunc != nil { - c.OnShutdown(lb.onShutdownFunc) - } - - shuffle := lb.shuffleFunc - if len(lb.preferSubnets) > 0 { - original := shuffle - shuffle = func(res *dns.Msg) *dns.Msg { - return reorderPreferredSubnets(original(res), lb.preferSubnets) - } - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return LoadBalance{Next: next, shuffle: shuffle} - }) - - return nil -} - -func parse(c *caddy.Controller) (*lbFuncs, error) { - config := dnsserver.GetConfig(c) - lb := &lbFuncs{} - - for c.Next() { - args := c.RemainingArgs() - if len(args) == 0 { - lb.shuffleFunc = randomShuffle - } else { - switch args[0] { - case ramdomShufflePolicy: - if len(args) > 1 { - return nil, c.Errf("unknown property for %s", args[0]) - } - lb.shuffleFunc = randomShuffle - - case weightedRoundRobinPolicy: - if len(args) < 2 { - return nil, c.Err("missing weight file argument") - } - if len(args) > 2 { - return nil, c.Err("unexpected argument(s)") - } - weightFileName := args[1] - if !filepath.IsAbs(weightFileName) && config.Root != "" { - weightFileName = filepath.Join(config.Root, weightFileName) - } - reload := 30 * time.Second - for c.NextBlock() { - switch c.Val() { - case "reload": - t := c.RemainingArgs() - if len(t) < 1 { - return nil, c.Err("reload duration value is missing") - } - if len(t) > 1 { - return nil, c.Err("unexpected argument") - } - var err error - reload, err = time.ParseDuration(t[0]) - if err != nil { - return nil, c.Errf("invalid reload duration '%s'", t[0]) - } - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - *lb = *createWeightedFuncs(weightFileName, reload) - default: - return nil, fmt.Errorf("unknown policy: %s", args[0]) - } - } - - for c.NextBlock() { - switch c.Val() { - case "prefer": - cidrs := c.RemainingArgs() - for _, cidr := range cidrs { - _, subnet, err := net.ParseCIDR(cidr) - if err != nil { - return nil, c.Errf("invalid CIDR %q: %v", cidr, err) - } - lb.preferSubnets = append(lb.preferSubnets, subnet) - } - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - } - - return lb, nil -} diff --git a/plugin/loadbalance/setup_test.go b/plugin/loadbalance/setup_test.go deleted file mode 100644 index 4e3c99cecd..0000000000 --- a/plugin/loadbalance/setup_test.go +++ /dev/null @@ -1,100 +0,0 @@ -package loadbalance - -import ( - "strings" - "testing" - - "github.com/coredns/caddy" -) - -// weighted round robin specific test data -var testWeighted = []struct { - expectedWeightFile string - expectedWeightReload string -}{ - {"wfile", "30s"}, - {"wf", "10s"}, - {"wf", "0s"}, -} - -func TestSetup(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedPolicy string - expectedErrContent string // substring from the expected error. Empty for positive cases. - weightedDataIndex int // weighted round robin specific data index - }{ - // positive - {`loadbalance`, false, "round_robin", "", -1}, - {`loadbalance round_robin`, false, "round_robin", "", -1}, - {`loadbalance weighted wfile`, false, "weighted", "", 0}, - {`loadbalance weighted wf { - reload 10s - } `, false, "weighted", "", 1}, - {`loadbalance weighted wf { - reload 0s - } `, false, "weighted", "", 2}, - // negative - {`loadbalance fleeb`, true, "", "unknown policy", -1}, - {`loadbalance round_robin a`, true, "", "unknown property", -1}, - {`loadbalance weighted`, true, "", "missing weight file argument", -1}, - {`loadbalance weighted a b`, true, "", "unexpected argument", -1}, - {`loadbalance weighted wfile { - susu - } `, true, "", "unknown property", -1}, - {`loadbalance weighted wfile { - reload a - } `, true, "", "invalid reload duration", -1}, - {`loadbalance weighted wfile { - reload 30s a - } `, true, "", "unexpected argument", -1}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - lb, err := parse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", - i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", - i, test.expectedErrContent, err, test.input) - } - continue - } - - if lb == nil { - t.Errorf("Test %d: Expected valid loadbalance funcs but got nil for input %s", - i, test.input) - continue - } - policy := ramdomShufflePolicy - if lb.weighted != nil { - policy = weightedRoundRobinPolicy - } - if policy != test.expectedPolicy { - t.Errorf("Test %d: Expected policy %s but got %s for input %s", i, - test.expectedPolicy, policy, test.input) - } - if policy == weightedRoundRobinPolicy && test.weightedDataIndex >= 0 { - i := test.weightedDataIndex - if testWeighted[i].expectedWeightFile != lb.weighted.fileName { - t.Errorf("Test %d: Expected weight file name %s but got %s for input %s", - i, testWeighted[i].expectedWeightFile, lb.weighted.fileName, test.input) - } - if testWeighted[i].expectedWeightReload != lb.weighted.reload.String() { - t.Errorf("Test %d: Expected weight reload duration %s but got %s for input %s", - i, testWeighted[i].expectedWeightReload, lb.weighted.reload, test.input) - } - } - } -} diff --git a/plugin/loadbalance/weighted.go b/plugin/loadbalance/weighted.go deleted file mode 100644 index 275af6f880..0000000000 --- a/plugin/loadbalance/weighted.go +++ /dev/null @@ -1,329 +0,0 @@ -package loadbalance - -import ( - "bufio" - "bytes" - "crypto/md5" - "errors" - "fmt" - "io" - "math/rand" - "net" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "sync" - "time" - - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -type ( - // "weighted-round-robin" policy specific data - weightedRR struct { - fileName string - reload time.Duration - md5sum [md5.Size]byte - domains map[string]weights - randomGen - mutex sync.Mutex - } - // Per domain weights - weights []*weightItem - // Weight assigned to an address - weightItem struct { - address net.IP - value uint8 - } - // Random uint generator - randomGen interface { - randInit() - randUint(limit uint) uint - } -) - -// Random uint generator -type randomUint struct { - rn *rand.Rand -} - -func (r *randomUint) randInit() { - r.rn = rand.New(rand.NewSource(time.Now().UnixNano())) -} - -func (r *randomUint) randUint(limit uint) uint { - return uint(r.rn.Intn(int(limit))) -} - -func weightedShuffle(res *dns.Msg, w *weightedRR) *dns.Msg { - switch res.Question[0].Qtype { - case dns.TypeA, dns.TypeAAAA, dns.TypeSRV: - res.Answer = w.weightedRoundRobin(res.Answer) - res.Extra = w.weightedRoundRobin(res.Extra) - } - return res -} - -func weightedOnStartUp(w *weightedRR, stopReloadChan chan bool) error { - err := w.updateWeights() - if errors.Is(err, errOpen) && w.reload != 0 { - log.Warningf("Failed to open weight file:%v. Will try again in %v", - err, w.reload) - } else if err != nil { - return plugin.Error("loadbalance", err) - } - // start periodic weight file reload go routine - w.periodicWeightUpdate(stopReloadChan) - return nil -} - -func createWeightedFuncs(weightFileName string, - reload time.Duration) *lbFuncs { - lb := &lbFuncs{ - weighted: &weightedRR{ - fileName: weightFileName, - reload: reload, - randomGen: &randomUint{}, - }, - } - lb.weighted.randInit() - - lb.shuffleFunc = func(res *dns.Msg) *dns.Msg { - return weightedShuffle(res, lb.weighted) - } - - stopReloadChan := make(chan bool) - - lb.onStartUpFunc = func() error { - return weightedOnStartUp(lb.weighted, stopReloadChan) - } - - lb.onShutdownFunc = func() error { - // stop periodic weigh reload go routine - close(stopReloadChan) - return nil - } - return lb -} - -// Apply weighted round robin policy to the answer -func (w *weightedRR) weightedRoundRobin(in []dns.RR) []dns.RR { - cname := []dns.RR{} - address := []dns.RR{} - mx := []dns.RR{} - rest := []dns.RR{} - for _, r := range in { - switch r.Header().Rrtype { - case dns.TypeCNAME: - cname = append(cname, r) - case dns.TypeA, dns.TypeAAAA: - address = append(address, r) - case dns.TypeMX: - mx = append(mx, r) - default: - rest = append(rest, r) - } - } - - if len(address) == 0 { - // no change - return in - } - - w.setTopRecord(address) - - out := append(cname, rest...) - out = append(out, address...) - out = append(out, mx...) - return out -} - -// Move the next expected address to the first position in the result list -func (w *weightedRR) setTopRecord(address []dns.RR) { - itop := w.topAddressIndex(address) - - if itop < 0 { - // internal error - return - } - - if itop != 0 { - // swap the selected top entry with the actual one - address[0], address[itop] = address[itop], address[0] - } -} - -// Compute the top (first) address index -func (w *weightedRR) topAddressIndex(address []dns.RR) int { - w.mutex.Lock() - defer w.mutex.Unlock() - - // Determine the weight value for each address in the answer - var wsum uint - type waddress struct { - index int - weight uint8 - } - weightedAddr := make([]waddress, len(address)) - for i, ar := range address { - wa := &weightedAddr[i] - wa.index = i - wa.weight = 1 // default weight - var ip net.IP - switch ar.Header().Rrtype { - case dns.TypeA: - ip = ar.(*dns.A).A - case dns.TypeAAAA: - ip = ar.(*dns.AAAA).AAAA - } - ws := w.domains[ar.Header().Name] - for _, w := range ws { - if w.address.Equal(ip) { - wa.weight = w.value - break - } - } - wsum += uint(wa.weight) - } - - // Select the first (top) IP - sort.Slice(weightedAddr, func(i, j int) bool { - return weightedAddr[i].weight > weightedAddr[j].weight - }) - v := w.randUint(wsum) - var psum uint - for _, wa := range weightedAddr { - psum += uint(wa.weight) - if v < psum { - return wa.index - } - } - - // we should never reach this - log.Errorf("Internal error: cannot find top address (randv:%v wsum:%v)", v, wsum) - return -1 -} - -// Start go routine to update weights from the weight file periodically -func (w *weightedRR) periodicWeightUpdate(stopReload <-chan bool) { - if w.reload == 0 { - return - } - - go func() { - ticker := time.NewTicker(w.reload) - for { - select { - case <-stopReload: - return - case <-ticker.C: - err := w.updateWeights() - if err != nil { - log.Error(err) - } - } - } - }() -} - -// Update weights from weight file -func (w *weightedRR) updateWeights() error { - reader, err := os.Open(filepath.Clean(w.fileName)) - if err != nil { - return errOpen - } - defer reader.Close() - - // check if the contents has changed - var buf bytes.Buffer - tee := io.TeeReader(reader, &buf) - bytes, err := io.ReadAll(tee) - if err != nil { - return err - } - md5sum := md5.Sum(bytes) - if md5sum == w.md5sum { - // file contents has not changed - return nil - } - w.md5sum = md5sum - scanner := bufio.NewScanner(&buf) - - // Parse the weight file contents - domains, err := w.parseWeights(scanner) - if err != nil { - return err - } - - // access to weights must be protected - w.mutex.Lock() - w.domains = domains - w.mutex.Unlock() - - log.Infof("Successfully reloaded weight file %s", w.fileName) - return nil -} - -// Parse the weight file contents -func (w *weightedRR) parseWeights(scanner *bufio.Scanner) (map[string]weights, error) { - var dname string - var ws weights - domains := make(map[string]weights) - - for scanner.Scan() { - nextLine := strings.TrimSpace(scanner.Text()) - if len(nextLine) == 0 || nextLine[0:1] == "#" { - // Empty and comment lines are ignored - continue - } - fields := strings.Fields(nextLine) - switch len(fields) { - case 1: - // (domain) name sanity check - if net.ParseIP(fields[0]) != nil { - return nil, fmt.Errorf("wrong domain name:\"%s\" in weight file %s. (Maybe a missing weight value?)", - fields[0], w.fileName) - } - dname = fields[0] - - // add the root domain if it is missing - if dname[len(dname)-1] != '.' { - dname += "." - } - var ok bool - ws, ok = domains[dname] - if !ok { - ws = make(weights, 0) - domains[dname] = ws - } - case 2: - // IP address and weight value - ip := net.ParseIP(fields[0]) - if ip == nil { - return nil, fmt.Errorf("wrong IP address:\"%s\" in weight file %s", fields[0], w.fileName) - } - weight, err := strconv.ParseUint(fields[1], 10, 8) - if err != nil || weight == 0 { - return nil, fmt.Errorf("wrong weight value:\"%s\" in weight file %s", fields[1], w.fileName) - } - witem := &weightItem{address: ip, value: uint8(weight)} - if dname == "" { - return nil, fmt.Errorf("missing domain name in weight file %s", w.fileName) - } - ws = append(ws, witem) - domains[dname] = ws - default: - return nil, fmt.Errorf("could not parse weight line:\"%s\" in weight file %s", nextLine, w.fileName) - } - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("weight file %s parsing error:%s", w.fileName, err) - } - - return domains, nil -} diff --git a/plugin/loadbalance/weighted_test.go b/plugin/loadbalance/weighted_test.go deleted file mode 100644 index 60027c863b..0000000000 --- a/plugin/loadbalance/weighted_test.go +++ /dev/null @@ -1,432 +0,0 @@ -package loadbalance - -import ( - "context" - "errors" - "net" - "strings" - "testing" - "time" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - testutil "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -const oneDomainWRR = ` -w1,example.org -192.168.1.15 10 -192.168.1.14 20 -` - -var testOneDomainWRR = map[string]weights{ - "w1,example.org.": { - &weightItem{net.ParseIP("192.168.1.15"), uint8(10)}, - &weightItem{net.ParseIP("192.168.1.14"), uint8(20)}, - }, -} - -const twoDomainsWRR = ` -# domain 1 -w1.example.org -192.168.1.15 10 -192.168.1.14 20 - -# domain 2 -w2.example.org - # domain 3 - w3.example.org - 192.168.2.16 11 - 192.168.2.15 12 - 192.168.2.14 13 -` - -var testTwoDomainsWRR = map[string]weights{ - "w1.example.org.": { - &weightItem{net.ParseIP("192.168.1.15"), uint8(10)}, - &weightItem{net.ParseIP("192.168.1.14"), uint8(20)}, - }, - "w2.example.org.": {}, - "w3.example.org.": { - &weightItem{net.ParseIP("192.168.2.16"), uint8(11)}, - &weightItem{net.ParseIP("192.168.2.15"), uint8(12)}, - &weightItem{net.ParseIP("192.168.2.14"), uint8(13)}, - }, -} - -const missingWeightWRR = ` -w1,example.org -192.168.1.14 -192.168.1.15 20 -` - -const missingDomainWRR = ` -# missing domain -192.168.1.14 10 -w2,example.org -192.168.2.14 11 -192.168.2.15 12 -` - -const wrongIpWRR = ` -w1,example.org -192.168.1.300 10 -` - -const wrongWeightWRR = ` -w1,example.org -192.168.1.14 300 -` - -const zeroWeightWRR = ` -w1,example.org -192.168.1.14 0 -` - -func TestWeightFileUpdate(t *testing.T) { - tests := []struct { - weightFilContent string - shouldErr bool - expectedDomains map[string]weights - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - {"", false, nil, ""}, - {oneDomainWRR, false, testOneDomainWRR, ""}, - {twoDomainsWRR, false, testTwoDomainsWRR, ""}, - // negative - {missingWeightWRR, true, nil, "wrong domain name"}, - {missingDomainWRR, true, nil, "missing domain name"}, - {wrongIpWRR, true, nil, "wrong IP address"}, - {wrongWeightWRR, true, nil, "wrong weight value"}, - {zeroWeightWRR, true, nil, "wrong weight value"}, - } - - for i, test := range tests { - testFile, rm, err := testutil.TempFile(".", test.weightFilContent) - if err != nil { - t.Fatal(err) - } - defer rm() - weighted := &weightedRR{fileName: testFile} - err = weighted.updateWeights() - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s", i, err) - } - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found error: %v", i, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v", - i, test.expectedErrContent, err) - } - } - if test.expectedDomains != nil { - if len(test.expectedDomains) != len(weighted.domains) { - t.Errorf("Test %d: Expected len(domains): %d but got %d", - i, len(test.expectedDomains), len(weighted.domains)) - } else { - _ = checkDomainsWRR(t, i, test.expectedDomains, weighted.domains) - } - } - } -} - -func checkDomainsWRR(t *testing.T, testIndex int, expectedDomains, domains map[string]weights) error { - t.Helper() - var ret error - retError := errors.New("Check domains failed") - for dname, expectedWeights := range expectedDomains { - ws, ok := domains[dname] - if !ok { - t.Errorf("Test %d: Expected domain %s but not found it", testIndex, dname) - ret = retError - } else { - if len(expectedWeights) != len(ws) { - t.Errorf("Test %d: Expected len(weights): %d for domain %s but got %d", - testIndex, len(expectedWeights), dname, len(ws)) - ret = retError - } else { - for i, w := range expectedWeights { - if !w.address.Equal(ws[i].address) || w.value != ws[i].value { - t.Errorf("Test %d: Weight list differs at index %d for domain %s. "+ - "Expected: %v got: %v", testIndex, i, dname, expectedWeights[i], ws[i]) - ret = retError - } - } - } - } - } - - return ret -} - -func TestPeriodicWeightUpdate(t *testing.T) { - testFile1, rm, err := testutil.TempFile(".", oneDomainWRR) - if err != nil { - t.Fatal(err) - } - defer rm() - testFile2, rm, err := testutil.TempFile(".", twoDomainsWRR) - if err != nil { - t.Fatal(err) - } - defer rm() - - // configure weightedRR with "oneDomainWRR" weight file content - weighted := &weightedRR{fileName: testFile1} - - err = weighted.updateWeights() - if err != nil { - t.Fatal(err) - } else { - err = checkDomainsWRR(t, 0, testOneDomainWRR, weighted.domains) - if err != nil { - t.Fatalf("Initial check domains failed") - } - } - - // change weight file - weighted.fileName = testFile2 - // start periodic update - weighted.reload = 10 * time.Millisecond - stopChan := make(chan bool) - weighted.periodicWeightUpdate(stopChan) - time.Sleep(20 * time.Millisecond) - // stop periodic update - close(stopChan) - // check updated config - weighted.mutex.Lock() - err = checkDomainsWRR(t, 0, testTwoDomainsWRR, weighted.domains) - weighted.mutex.Unlock() - if err != nil { - t.Fatalf("Final check domains failed") - } -} - -// Fake random number generator for testing -type fakeRandomGen struct { - expectedLimit uint - testIndex int - queryIndex int - randv uint - t *testing.T -} - -func (r *fakeRandomGen) randInit() { -} - -func (r *fakeRandomGen) randUint(limit uint) uint { - if limit != r.expectedLimit { - r.t.Errorf("Test %d query %d: Expected weights sum %d but got %d", - r.testIndex, r.queryIndex, r.expectedLimit, limit) - } - return r.randv -} - -func TestLoadBalanceWRR(t *testing.T) { - type testQuery struct { - randv uint // fake random value for selecting the top IP - topIP string // top (first) address record in the answer - } - - // domain maps to test - oneDomain := map[string]weights{ - "endpoint.region2.skydns.test.": { - &weightItem{net.ParseIP("10.240.0.2"), uint8(3)}, - &weightItem{net.ParseIP("10.240.0.1"), uint8(2)}, - }, - } - twoDomains := map[string]weights{ - "endpoint.region2.skydns.test.": { - &weightItem{net.ParseIP("10.240.0.2"), uint8(5)}, - &weightItem{net.ParseIP("10.240.0.1"), uint8(2)}, - }, - "endpoint.region1.skydns.test.": { - &weightItem{net.ParseIP("::2"), uint8(4)}, - &weightItem{net.ParseIP("::1"), uint8(3)}, - }, - } - - // the first X records must be cnames after this test - tests := []struct { - answer []dns.RR - extra []dns.RR - cnameAnswer int - cnameExtra int - addressAnswer int - addressExtra int - mxAnswer int - mxExtra int - domains map[string]weights - sumWeights uint // sum of weights in the answer - queries []testQuery - }{ - { - answer: []dns.RR{ - testutil.CNAME("cname1.region2.skydns.test. 300 IN CNAME cname2.region2.skydns.test."), - testutil.CNAME("cname2.region2.skydns.test. 300 IN CNAME cname3.region2.skydns.test."), - testutil.CNAME("cname5.region2.skydns.test. 300 IN CNAME cname6.region2.skydns.test."), - testutil.CNAME("cname6.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.2"), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.3"), - testutil.AAAA("endpoint.region1.skydns.test. 300 IN AAAA ::1"), - testutil.AAAA("endpoint.region1.skydns.test. 300 IN AAAA ::2"), - testutil.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - testutil.MX("mx.region2.skydns.test. 300 IN MX 2 mx2.region2.skydns.test."), - testutil.MX("mx.region2.skydns.test. 300 IN MX 3 mx3.region2.skydns.test."), - }, - extra: []dns.RR{ - testutil.CNAME("cname6.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.2"), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.3"), - testutil.AAAA("endpoint.region1.skydns.test. 300 IN AAAA ::1"), - testutil.AAAA("endpoint.region1.skydns.test. 300 IN AAAA ::2"), - testutil.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - }, - cnameAnswer: 4, - cnameExtra: 1, - addressAnswer: 5, - addressExtra: 5, - mxAnswer: 3, - mxExtra: 1, - domains: twoDomains, - sumWeights: 15, - queries: []testQuery{ - {0, "10.240.0.2"}, // domain 1 weight 5 - {4, "10.240.0.2"}, // domain 1 weight 5 - {5, "::2"}, // domain 2 weight 4 - {8, "::2"}, // domain 2 weight 4 - {9, "::1"}, // domain 2 weight 3 - {11, "::1"}, // domain 2 weight 3 - {12, "10.240.0.1"}, // domain 1 weight 2 - {13, "10.240.0.1"}, // domain 1 weight 2 - {14, "10.240.0.3"}, // domain 1 no weight -> default weight - }, - }, - { - answer: []dns.RR{ - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.1"), - testutil.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - testutil.CNAME("cname.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - testutil.A("endpoint.region2.skydns.test. 300 IN A 10.240.0.2"), - testutil.A("endpoint.region1.skydns.test. 300 IN A 10.240.0.3"), - }, - cnameAnswer: 1, - addressAnswer: 3, - mxAnswer: 1, - domains: oneDomain, - sumWeights: 6, - queries: []testQuery{ - {0, "10.240.0.2"}, // weight 3 - {2, "10.240.0.2"}, // weight 3 - {3, "10.240.0.1"}, // weight 2 - {4, "10.240.0.1"}, // weight 2 - {5, "10.240.0.3"}, // no domain -> default weight - }, - }, - { - answer: []dns.RR{ - testutil.MX("mx.region2.skydns.test. 300 IN MX 1 mx1.region2.skydns.test."), - testutil.CNAME("cname.region2.skydns.test. 300 IN CNAME endpoint.region2.skydns.test."), - }, - cnameAnswer: 1, - mxAnswer: 1, - domains: oneDomain, - queries: []testQuery{ - {0, ""}, // no address records -> answer unaltered - }, - }, - } - - testRand := &fakeRandomGen{t: t} - weighted := &weightedRR{randomGen: testRand} - shuffle := func(res *dns.Msg) *dns.Msg { - return weightedShuffle(res, weighted) - } - rm := LoadBalance{Next: handler(), shuffle: shuffle} - - rec := dnstest.NewRecorder(&testutil.ResponseWriter{}) - - for i, test := range tests { - // set domain map for weighted round robin - weighted.domains = test.domains - testRand.testIndex = i - testRand.expectedLimit = test.sumWeights - - for j, query := range test.queries { - req := new(dns.Msg) - req.SetQuestion("endpoint.region2.skydns.test", dns.TypeSRV) - req.Answer = test.answer - req.Extra = test.extra - - // Set fake random number - testRand.randv = query.randv - testRand.queryIndex = j - - _, err := rm.ServeDNS(context.TODO(), rec, req) - if err != nil { - t.Errorf("Test %d: Expected no error, but got %s", i, err) - continue - } - - checkTopIP(t, i, j, rec.Msg.Answer, query.topIP) - checkTopIP(t, i, j, rec.Msg.Extra, query.topIP) - - cname, address, mx, sorted := countRecords(rec.Msg.Answer) - if query.topIP != "" && !sorted { - t.Errorf("Test %d query %d: Expected CNAMEs, then AAAAs, then MX in Answer, but got mixed", i, j) - } - if cname != test.cnameAnswer { - t.Errorf("Test %d query %d: Expected %d CNAMEs in Answer, but got %d", i, j, test.cnameAnswer, cname) - } - if address != test.addressAnswer { - t.Errorf("Test %d query %d: Expected %d A/AAAAs in Answer, but got %d", i, j, test.addressAnswer, address) - } - if mx != test.mxAnswer { - t.Errorf("Test %d query %d: Expected %d MXs in Answer, but got %d", i, j, test.mxAnswer, mx) - } - - cname, address, mx, sorted = countRecords(rec.Msg.Extra) - if query.topIP != "" && !sorted { - t.Errorf("Test %d query %d: Expected CNAMEs, then AAAAs, then MX in Answer, but got mixed", i, j) - } - - if cname != test.cnameExtra { - t.Errorf("Test %d query %d: Expected %d CNAMEs in Extra, but got %d", i, j, test.cnameAnswer, cname) - } - if address != test.addressExtra { - t.Errorf("Test %d query %d: Expected %d A/AAAAs in Extra, but got %d", i, j, test.addressAnswer, address) - } - if mx != test.mxExtra { - t.Errorf("Test %d query %d: Expected %d MXs in Extra, but got %d", i, j, test.mxAnswer, mx) - } - } - } -} - -func checkTopIP(t *testing.T, i, j int, result []dns.RR, expectedTopIP string) { - t.Helper() - expected := net.ParseIP(expectedTopIP) - for _, r := range result { - switch r.Header().Rrtype { - case dns.TypeA: - ar := r.(*dns.A) - if !ar.A.Equal(expected) { - t.Errorf("Test %d query %d: expected top IP %s but got %s", i, j, expectedTopIP, ar.A) - } - return - case dns.TypeAAAA: - ar := r.(*dns.AAAA) - if !ar.AAAA.Equal(expected) { - t.Errorf("Test %d query %d: expected top IP %s but got %s", i, j, expectedTopIP, ar.AAAA) - } - return - } - } -} diff --git a/plugin/local/README.md b/plugin/local/README.md deleted file mode 100644 index 08fff0103a..0000000000 --- a/plugin/local/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# local - -## Name - -*local* - respond to local names. - -## Description - -*local* will respond with a basic reply to a "local request". Local request are defined to be -names in the following zones: localhost, 0.in-addr.arpa, 127.in-addr.arpa and 255.in-addr.arpa *and* -any query asking for `localhost.`. When seeing the latter a metric counter is increased and -if *debug* is enabled a debug log is emitted. - -With *local* enabled any query falling under these zones will get a reply. The prevents the query -from "escaping" to the internet and putting strain on external infrastructure. - -The zones are mostly empty, only `localhost.` address records (A and AAAA) are defined and a -`1.0.0.127.in-addr.arpa.` reverse (PTR) record. - -## Syntax - -~~~ txt -local -~~~ - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metric is exported: - -* `coredns_local_localhost_requests_total{}` - a counter of the number of `localhost.` - requests CoreDNS has seen. Note this does *not* count `localhost.` queries. - -Note that this metric *does not* have a `server` label, because it's more interesting to find the -client(s) performing these queries than to see which server handled it. You'll need to inspect the -debug log to get the client IP address. - -## Examples - -~~~ corefile -. { - local -} -~~~ - -## Bugs - -Only the `in-addr.arpa.` reverse zone is implemented, `ip6.arpa.` queries are not intercepted. - -## See Also - -BIND9's configuration in Debian comes with these zones preconfigured. See the *debug* plugin for -enabling debug logging. diff --git a/plugin/local/local.go b/plugin/local/local.go deleted file mode 100644 index 570f113dad..0000000000 --- a/plugin/local/local.go +++ /dev/null @@ -1,127 +0,0 @@ -package local - -import ( - "context" - "net" - "strings" - - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -var log = clog.NewWithPlugin("local") - -// Local is a plugin that returns standard replies for local queries. -type Local struct { - Next plugin.Handler -} - -var zones = []string{"localhost.", "0.in-addr.arpa.", "127.in-addr.arpa.", "255.in-addr.arpa."} - -func soaFromOrigin(origin string) []dns.RR { - hdr := dns.RR_Header{Name: origin, Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeSOA} - return []dns.RR{&dns.SOA{Hdr: hdr, Ns: "localhost.", Mbox: "root.localhost.", Serial: 1, Refresh: 0, Retry: 0, Expire: 0, Minttl: ttl}} -} - -func nsFromOrigin(origin string) []dns.RR { - hdr := dns.RR_Header{Name: origin, Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeNS} - return []dns.RR{&dns.NS{Hdr: hdr, Ns: "localhost."}} -} - -// ServeDNS implements the plugin.Handler interface. -func (l Local) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.QName() - - lc := len("localhost.") - if len(state.Name()) > lc && strings.HasPrefix(state.Name(), "localhost.") { - // we have multiple labels, but the first one is localhost, intercept this and return 127.0.0.1 or ::1 - log.Debugf("Intercepting localhost query for %q %s, from %s", state.Name(), state.Type(), state.IP()) - LocalhostCount.Inc() - reply := doLocalhost(state) - w.WriteMsg(reply) - return 0, nil - } - - zone := plugin.Zones(zones).Matches(qname) - if zone == "" { - return plugin.NextOrFailure(l.Name(), l.Next, ctx, w, r) - } - - m := new(dns.Msg) - m.SetReply(r) - zone = qname[len(qname)-len(zone):] - - switch q := state.Name(); q { - case "localhost.", "0.in-addr.arpa.", "127.in-addr.arpa.", "255.in-addr.arpa.": - switch state.QType() { - case dns.TypeA: - if q != "localhost." { - // nodata - m.Ns = soaFromOrigin(qname) - break - } - - hdr := dns.RR_Header{Name: qname, Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeA} - m.Answer = []dns.RR{&dns.A{Hdr: hdr, A: net.ParseIP("127.0.0.1").To4()}} - case dns.TypeAAAA: - if q != "localhost." { - // nodata - m.Ns = soaFromOrigin(qname) - break - } - - hdr := dns.RR_Header{Name: qname, Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeAAAA} - m.Answer = []dns.RR{&dns.AAAA{Hdr: hdr, AAAA: net.ParseIP("::1")}} - case dns.TypeSOA: - m.Answer = soaFromOrigin(qname) - case dns.TypeNS: - m.Answer = nsFromOrigin(qname) - default: - // nodata - m.Ns = soaFromOrigin(qname) - } - case "1.0.0.127.in-addr.arpa.": - switch state.QType() { - case dns.TypePTR: - hdr := dns.RR_Header{Name: qname, Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypePTR} - m.Answer = []dns.RR{&dns.PTR{Hdr: hdr, Ptr: "localhost."}} - default: - // nodata - m.Ns = soaFromOrigin(zone) - } - } - - if len(m.Answer) == 0 && len(m.Ns) == 0 { - m.Ns = soaFromOrigin(zone) - m.Rcode = dns.RcodeNameError - } - - w.WriteMsg(m) - return 0, nil -} - -// Name implements the plugin.Handler interface. -func (l Local) Name() string { return "local" } - -func doLocalhost(state request.Request) *dns.Msg { - m := new(dns.Msg) - m.SetReply(state.Req) - switch state.QType() { - case dns.TypeA: - hdr := dns.RR_Header{Name: state.QName(), Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeA} - m.Answer = []dns.RR{&dns.A{Hdr: hdr, A: net.ParseIP("127.0.0.1").To4()}} - case dns.TypeAAAA: - hdr := dns.RR_Header{Name: state.QName(), Ttl: ttl, Class: dns.ClassINET, Rrtype: dns.TypeAAAA} - m.Answer = []dns.RR{&dns.AAAA{Hdr: hdr, AAAA: net.ParseIP("::1")}} - default: - // nodata - m.Ns = soaFromOrigin(state.QName()) - } - return m -} - -const ttl = 604800 diff --git a/plugin/local/local_test.go b/plugin/local/local_test.go deleted file mode 100644 index 8e1561ad4e..0000000000 --- a/plugin/local/local_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package local - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var testcases = []struct { - question string - qtype uint16 - rcode int - answer dns.RR - ns dns.RR -}{ - {"localhost.", dns.TypeA, dns.RcodeSuccess, test.A("localhost. IN A 127.0.0.1"), nil}, - {"localHOst.", dns.TypeA, dns.RcodeSuccess, test.A("localHOst. IN A 127.0.0.1"), nil}, - {"localhost.", dns.TypeAAAA, dns.RcodeSuccess, test.AAAA("localhost. IN AAAA ::1"), nil}, - {"localhost.", dns.TypeNS, dns.RcodeSuccess, test.NS("localhost. IN NS localhost."), nil}, - {"localhost.", dns.TypeSOA, dns.RcodeSuccess, test.SOA("localhost. IN SOA root.localhost. localhost. 1 0 0 0 0"), nil}, - {"127.in-addr.arpa.", dns.TypeA, dns.RcodeSuccess, nil, test.SOA("127.in-addr.arpa. IN SOA root.localhost. localhost. 1 0 0 0 0")}, - {"localhost.", dns.TypeMX, dns.RcodeSuccess, nil, test.SOA("localhost. IN SOA root.localhost. localhost. 1 0 0 0 0")}, - {"a.localhost.", dns.TypeA, dns.RcodeNameError, nil, test.SOA("localhost. IN SOA root.localhost. localhost. 1 0 0 0 0")}, - {"1.0.0.127.in-addr.arpa.", dns.TypePTR, dns.RcodeSuccess, test.PTR("1.0.0.127.in-addr.arpa. IN PTR localhost."), nil}, - {"1.0.0.127.in-addr.arpa.", dns.TypeMX, dns.RcodeSuccess, nil, test.SOA("127.in-addr.arpa. IN SOA root.localhost. localhost. 1 0 0 0 0")}, - {"2.0.0.127.in-addr.arpa.", dns.TypePTR, dns.RcodeNameError, nil, test.SOA("127.in-addr.arpa. IN SOA root.localhost. localhost. 1 0 0 0 0")}, - {"localhost.example.net.", dns.TypeA, dns.RcodeSuccess, test.A("localhost.example.net. IN A 127.0.0.1"), nil}, - {"localhost.example.net.", dns.TypeAAAA, dns.RcodeSuccess, test.AAAA("localhost.example.net IN AAAA ::1"), nil}, - {"localhost.example.net.", dns.TypeSOA, dns.RcodeSuccess, nil, test.SOA("localhost.example.net. IN SOA root.localhost.example.net. localhost.example.net. 1 0 0 0 0")}, -} - -func TestLocal(t *testing.T) { - req := new(dns.Msg) - l := &Local{} - - for i, tc := range testcases { - req.SetQuestion(tc.question, tc.qtype) - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := l.ServeDNS(context.TODO(), rec, req) - - if err != nil { - t.Errorf("Test %d, expected no error, but got %q", i, err) - continue - } - if rec.Msg.Rcode != tc.rcode { - t.Errorf("Test %d, expected rcode %d, got %d", i, tc.rcode, rec.Msg.Rcode) - } - if tc.answer == nil && len(rec.Msg.Answer) > 0 { - t.Errorf("Test %d, expected no answer RR, got %s", i, rec.Msg.Answer[0]) - continue - } - if tc.ns == nil && len(rec.Msg.Ns) > 0 { - t.Errorf("Test %d, expected no authority RR, got %s", i, rec.Msg.Ns[0]) - continue - } - if tc.answer != nil { - if x := tc.answer.Header().Rrtype; x != rec.Msg.Answer[0].Header().Rrtype { - t.Errorf("Test %d, expected RR type %d in answer, got %d", i, x, rec.Msg.Answer[0].Header().Rrtype) - } - if x := tc.answer.Header().Name; x != rec.Msg.Answer[0].Header().Name { - t.Errorf("Test %d, expected RR name %q in answer, got %q", i, x, rec.Msg.Answer[0].Header().Name) - } - } - if tc.ns != nil { - if x := tc.ns.Header().Rrtype; x != rec.Msg.Ns[0].Header().Rrtype { - t.Errorf("Test %d, expected RR type %d in authority, got %d", i, x, rec.Msg.Ns[0].Header().Rrtype) - } - if x := tc.ns.Header().Name; x != rec.Msg.Ns[0].Header().Name { - t.Errorf("Test %d, expected RR name %q in authority, got %q", i, x, rec.Msg.Ns[0].Header().Name) - } - } - } -} diff --git a/plugin/local/metrics.go b/plugin/local/metrics.go deleted file mode 100644 index 361f9ab337..0000000000 --- a/plugin/local/metrics.go +++ /dev/null @@ -1,18 +0,0 @@ -package local - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // LocalhostCount report the number of times we've seen a localhost. query. - LocalhostCount = promauto.NewCounter(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "local", - Name: "localhost_requests_total", - Help: "Counter of localhost. requests.", - }) -) diff --git a/plugin/local/setup.go b/plugin/local/setup.go deleted file mode 100644 index 9bd0dd6053..0000000000 --- a/plugin/local/setup.go +++ /dev/null @@ -1,20 +0,0 @@ -package local - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("local", setup) } - -func setup(c *caddy.Controller) error { - l := Local{} - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - l.Next = next - return l - }) - - return nil -} diff --git a/plugin/minimal/README.md b/plugin/minimal/README.md deleted file mode 100644 index a2257437c9..0000000000 --- a/plugin/minimal/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# minimal - -## Name - -*minimal* - minimizes size of the DNS response message whenever possible. - -## Description - -The *minimal* plugin tries to minimize the size of the response. Depending on the response type it -removes resource records from the AUTHORITY and ADDITIONAL sections. - -Specifically this plugin looks at successful responses (this excludes negative responses, i.e. -nodata or name error). If the successful response isn't a delegation only the RRs in the answer -section are written to the client. - -## Syntax - -~~~ txt -minimal -~~~ - -## Examples - -Enable minimal responses: - -~~~ corefile -example.org { - whoami - forward . 8.8.8.8 - minimal -} -~~~ - -## See Also - -[BIND 9 Configuration Reference](https://bind9.readthedocs.io/en/latest/reference.html#boolean-options) diff --git a/plugin/minimal/minimal.go b/plugin/minimal/minimal.go deleted file mode 100644 index 0bac6a3732..0000000000 --- a/plugin/minimal/minimal.go +++ /dev/null @@ -1,55 +0,0 @@ -package minimal - -import ( - "context" - "fmt" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/nonwriter" - "github.com/coredns/coredns/plugin/pkg/response" - - "github.com/miekg/dns" -) - -// minimalHandler implements the plugin.Handler interface. -type minimalHandler struct { - Next plugin.Handler -} - -func (m *minimalHandler) Name() string { return "minimal" } - -func (m *minimalHandler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - nw := nonwriter.New(w) - - rcode, err := plugin.NextOrFailure(m.Name(), m.Next, ctx, nw, r) - if err != nil { - return rcode, err - } - - ty, _ := response.Typify(nw.Msg, time.Now().UTC()) - cl := response.Classify(ty) - - // if response is Denial or Error pass through also if the type is Delegation pass through - if cl == response.Denial || cl == response.Error || ty == response.Delegation { - w.WriteMsg(nw.Msg) - return 0, nil - } - if ty != response.NoError { - w.WriteMsg(nw.Msg) - return 0, plugin.Error("minimal", fmt.Errorf("unhandled response type %q for %q", ty, nw.Msg.Question[0].Name)) - } - - // copy over the original Msg params, deep copy not required as RRs are not modified - d := &dns.Msg{ - MsgHdr: nw.Msg.MsgHdr, - Compress: nw.Msg.Compress, - Question: nw.Msg.Question, - Answer: nw.Msg.Answer, - Ns: nil, - Extra: nil, - } - - w.WriteMsg(d) - return 0, nil -} diff --git a/plugin/minimal/minimal_test.go b/plugin/minimal/minimal_test.go deleted file mode 100644 index 406d787fe9..0000000000 --- a/plugin/minimal/minimal_test.go +++ /dev/null @@ -1,153 +0,0 @@ -package minimal - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -// testHandler implements plugin.Handler and will be used to create a stub handler for the test -type testHandler struct { - Response *test.Case - Next plugin.Handler -} - -func (t *testHandler) Name() string { return "test-handler" } - -func (t *testHandler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - d := new(dns.Msg) - d.SetReply(r) - if t.Response != nil { - d.Answer = t.Response.Answer - d.Ns = t.Response.Ns - d.Extra = t.Response.Extra - d.Rcode = t.Response.Rcode - } - w.WriteMsg(d) - return 0, nil -} - -func TestMinimizeResponse(t *testing.T) { - baseAnswer := []dns.RR{ - test.A("example.com. 293 IN A 142.250.76.46"), - } - baseNs := []dns.RR{ - test.NS("example.com. 157127 IN NS ns2.example.com."), - test.NS("example.com. 157127 IN NS ns1.example.com."), - test.NS("example.com. 157127 IN NS ns3.example.com."), - test.NS("example.com. 157127 IN NS ns4.example.com."), - } - - baseExtra := []dns.RR{ - test.A("ns2.example.com. 316273 IN A 216.239.34.10"), - test.AAAA("ns2.example.com. 157127 IN AAAA 2001:4860:4802:34::a"), - test.A("ns3.example.com. 316274 IN A 216.239.36.10"), - test.AAAA("ns3.example.com. 157127 IN AAAA 2001:4860:4802:36::a"), - test.A("ns1.example.com. 165555 IN A 216.239.32.10"), - test.AAAA("ns1.example.com. 165555 IN AAAA 2001:4860:4802:32::a"), - test.A("ns4.example.com. 190188 IN A 216.239.38.10"), - test.AAAA("ns4.example.com. 157127 IN AAAA 2001:4860:4802:38::a"), - } - - tests := []struct { - active bool - original test.Case - minimal test.Case - }{ - { // minimization possible NoError case - original: test.Case{ - Answer: baseAnswer, - Ns: nil, - Extra: baseExtra, - Rcode: 0, - }, - minimal: test.Case{ - Answer: baseAnswer, - Ns: nil, - Extra: nil, - Rcode: 0, - }, - }, - { // delegate response case - original: test.Case{ - Answer: nil, - Ns: baseNs, - Extra: baseExtra, - Rcode: 0, - }, - minimal: test.Case{ - Answer: nil, - Ns: baseNs, - Extra: baseExtra, - Rcode: 0, - }, - }, { // negative response case - original: test.Case{ - Answer: baseAnswer, - Ns: baseNs, - Extra: baseExtra, - Rcode: 2, - }, - minimal: test.Case{ - Answer: baseAnswer, - Ns: baseNs, - Extra: baseExtra, - Rcode: 2, - }, - }, - } - - for i, tc := range tests { - req := new(dns.Msg) - req.SetQuestion("example.com", dns.TypeA) - - tHandler := &testHandler{ - Response: &tc.original, - Next: nil, - } - o := &minimalHandler{Next: tHandler} - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := o.ServeDNS(context.TODO(), rec, req) - - if err != nil { - t.Errorf("Expected no error, but got %q", err) - } - - if len(tc.minimal.Answer) != len(rec.Msg.Answer) { - t.Errorf("Test %d: Expected %d Answer, but got %d", i, len(tc.minimal.Answer), len(req.Answer)) - continue - } - if len(tc.minimal.Ns) != len(rec.Msg.Ns) { - t.Errorf("Test %d: Expected %d Ns, but got %d", i, len(tc.minimal.Ns), len(req.Ns)) - continue - } - - if len(tc.minimal.Extra) != len(rec.Msg.Extra) { - t.Errorf("Test %d: Expected %d Extras, but got %d", i, len(tc.minimal.Extra), len(req.Extra)) - continue - } - - for j, a := range rec.Msg.Answer { - if tc.minimal.Answer[j].String() != a.String() { - t.Errorf("Test %d: Expected Answer %d to be %v, but got %v", i, j, tc.minimal.Answer[j], a) - } - } - - for j, a := range rec.Msg.Ns { - if tc.minimal.Ns[j].String() != a.String() { - t.Errorf("Test %d: Expected NS %d to be %v, but got %v", i, j, tc.minimal.Ns[j], a) - } - } - - for j, a := range rec.Msg.Extra { - if tc.minimal.Extra[j].String() != a.String() { - t.Errorf("Test %d: Expected Extra %d to be %v, but got %v", i, j, tc.minimal.Extra[j], a) - } - } - } -} diff --git a/plugin/minimal/setup.go b/plugin/minimal/setup.go deleted file mode 100644 index 1bf37a6527..0000000000 --- a/plugin/minimal/setup.go +++ /dev/null @@ -1,24 +0,0 @@ -package minimal - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { - plugin.Register("minimal", setup) -} - -func setup(c *caddy.Controller) error { - c.Next() - if c.NextArg() { - return plugin.Error("minimal", c.ArgErr()) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return &minimalHandler{Next: next} - }) - - return nil -} diff --git a/plugin/minimal/setup_test.go b/plugin/minimal/setup_test.go deleted file mode 100644 index 49341c441d..0000000000 --- a/plugin/minimal/setup_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package minimal - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSetup(t *testing.T) { - c := caddy.NewTestController("dns", `minimal-response`) - if err := setup(c); err != nil { - t.Fatalf("Expected no errors, but got: %v", err) - } - - c = caddy.NewTestController("dns", `minimal-response example.org`) - if err := setup(c); err == nil { - t.Fatalf("Expected errors, but got: %v", err) - } -} diff --git a/plugin/multisocket/README.md b/plugin/multisocket/README.md deleted file mode 100644 index 65f7986d49..0000000000 --- a/plugin/multisocket/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# multisocket - -## Name - -*multisocket* - allows to start multiple servers that will listen on one port. - -## Description - -With *multisocket*, you can define the number of servers that will listen on the same port. The SO_REUSEPORT socket -option allows to open multiple listening sockets at the same address and port. In this case, kernel distributes incoming -connections between sockets. - -Enabling this option allows to start multiple servers, which increases the throughput of CoreDNS in environments with a -large number of CPU cores. - -## Syntax - -~~~ -multisocket [NUM_SOCKETS] -~~~ - -* **NUM_SOCKETS** - the number of servers that will listen on one port. Default value is equal to GOMAXPROCS. - -## Examples - -Start 5 TCP/UDP servers on the same port. - -~~~ corefile -. { - multisocket 5 - forward . /etc/resolv.conf -} -~~~ - -Do not define `NUM_SOCKETS`, in this case it will take a value equal to GOMAXPROCS. - -~~~ corefile -. { - multisocket - forward . /etc/resolv.conf -} -~~~ - -## Recommendations - -The tests of the `multisocket` plugin, which were conducted for `NUM_SOCKETS` from 1 to 10, did not reveal any side -effects or performance degradation. - -This means that the `multisocket` plugin can be used with a default value that is equal to GOMAXPROCS. - -However, to achieve the best results, it is recommended to consider the specific environment and plugins used in -CoreDNS. To determine the optimal configuration, it is advisable to conduct performance tests with different -`NUM_SOCKETS`, measuring Queries Per Second (QPS) and system load. - -If conducting such tests is difficult, follow these recommendations: -1. Determine the maximum CPU consumption of CoreDNS server without `multisocket` plugin. Estimate how much CPU CoreDNS - actually consumes in specific environment under maximum load. -2. Align `NUM_SOCKETS` with the estimated CPU usage and CPU limits or system's available resources. - Examples: - - If CoreDNS consumes 4 CPUs and 8 CPUs are available, set `NUM_SOCKETS` to 2. - - If CoreDNS consumes 8 CPUs and 64 CPUs are available, set `NUM_SOCKETS` to 8. - -## Limitations - -The SO_REUSEPORT socket option is not available for some operating systems. It is available since Linux Kernel 3.9 and -not available for Windows at all. - -Using this plugin with a system that does not support SO_REUSEPORT will cause an `address already in use` error. diff --git a/plugin/multisocket/multisocket.go b/plugin/multisocket/multisocket.go deleted file mode 100644 index 682771682e..0000000000 --- a/plugin/multisocket/multisocket.go +++ /dev/null @@ -1,51 +0,0 @@ -package multisocket - -import ( - "fmt" - "runtime" - "strconv" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -const pluginName = "multisocket" - -func init() { plugin.Register(pluginName, setup) } - -func setup(c *caddy.Controller) error { - err := parseNumSockets(c) - if err != nil { - return plugin.Error(pluginName, err) - } - return nil -} - -func parseNumSockets(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - c.Next() // "multisocket" - - args := c.RemainingArgs() - - if len(args) > 1 || c.Next() { - return c.ArgErr() - } - - if len(args) == 0 { - // Nothing specified; use default that is equal to GOMAXPROCS. - config.NumSockets = runtime.GOMAXPROCS(0) - return nil - } - - numSockets, err := strconv.Atoi(args[0]) - if err != nil { - return fmt.Errorf("invalid num sockets: %w", err) - } - if numSockets < 1 { - return fmt.Errorf("num sockets can not be zero or negative: %d", numSockets) - } - config.NumSockets = numSockets - - return nil -} diff --git a/plugin/multisocket/multisocket_test.go b/plugin/multisocket/multisocket_test.go deleted file mode 100644 index ace5ba8a2e..0000000000 --- a/plugin/multisocket/multisocket_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package multisocket - -import ( - "runtime" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestMultisocket(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedNumSockets int - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - {`multisocket`, false, runtime.GOMAXPROCS(0), ""}, - {`multisocket 2`, false, 2, ""}, - {` multisocket 1`, false, 1, ""}, - {`multisocket text`, true, 0, "invalid num sockets"}, - {`multisocket 0`, true, 0, "num sockets can not be zero or negative"}, - {`multisocket -1`, true, 0, "num sockets can not be zero or negative"}, - {`multisocket 2 2`, true, 0, "Wrong argument count or unexpected line ending after '2'"}, - {`multisocket 2 { - block - }`, true, 0, "Unexpected token '{', expecting argument"}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - cfg := dnsserver.GetConfig(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - - if cfg.NumSockets != test.expectedNumSockets { - t.Errorf("Test %d: Expected num sockets to be %d, found %d", i, test.expectedNumSockets, cfg.NumSockets) - } - } -} diff --git a/plugin/nomad/README.md b/plugin/nomad/README.md deleted file mode 100644 index 9c3dd20f69..0000000000 --- a/plugin/nomad/README.md +++ /dev/null @@ -1,235 +0,0 @@ -# nomad - -## Name - -*nomad* - enables reading zone data from a Nomad cluster. - -## Description - -This plugin serves DNS records for services registered with Nomad. Nomad 1.3+ comes with [support for discovering services](https://www.hashicorp.com/en/blog/nomad-service-discovery) with an in-built service catalogue that is available via the HTTP API. This plugin extends the HTTP API and provides a DNS interface for querying the service catalogue. - -The query can be looked up with the format `[service].[namespace].service.nomad`. The plugin currently handles A, AAAA and SRV records. Refer to [#Usage Example](#usage-example) for more details. - -## Example job template - -``` -job "dns" { - type = "service" - - group "dns" { - network { - port "dns" { - static = 1053 - } - } - task "dns" { - driver = "docker" - - config { - image = "coredns/coredns:latest" - ports = ["dns"] - args = ["-conf", "/secrets/coredns/Corefile", "-dns.port", "1053"] - } - - service { - name = "hostmaster" - provider = "nomad" - port = "dns" - address_mode = "driver" - } - - identity { - env = true - } - - template { - data = <> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> redis.default.service.nomad @127.0.0.1 -p 1053 -;; global options: +cmd -;; Got answer: -;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54986 -;; flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1 -;; WARNING: recursion requested but not available - -;; OPT PSEUDOSECTION: -; EDNS: version: 0, flags:; udp: 1232 -; COOKIE: bdc9237f49a1f744 (echoed) -;; QUESTION SECTION: -;redis.default.service.nomad. IN A - -;; ANSWER SECTION: -redis.default.service.nomad. 10 IN A 192.168.29.76 -redis.default.service.nomad. 10 IN A 192.168.29.76 -redis.default.service.nomad. 10 IN A 192.168.29.76 - -;; Query time: 4 msec -;; SERVER: 127.0.0.1#1053(127.0.0.1) (UDP) -;; WHEN: Thu Jan 05 12:12:25 IST 2023 -;; MSG SIZE rcvd: 165 -``` - -### SRV Record - -Since an A record doesn't contain the port number, SRV record can be used to query the port number of a service. - -``` -dig redis.default.service.nomad @127.0.0.1 -p 1053 SRV - -; <<>> DiG 9.18.1-1ubuntu1.2-Ubuntu <<>> redis.default.service.nomad @127.0.0.1 -p 1053 SRV -;; global options: +cmd -;; Got answer: -;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49945 -;; flags: qr aa rd; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 4 -;; WARNING: recursion requested but not available - -;; OPT PSEUDOSECTION: -; EDNS: version: 0, flags:; udp: 1232 -; COOKIE: 14572535f3ba6648 (echoed) -;; QUESTION SECTION: -;redis.default.service.nomad. IN SRV - -;; ANSWER SECTION: -redis.default.service.nomad. 8 IN SRV 10 10 25395 redis.default.service.nomad. -redis.default.service.nomad. 8 IN SRV 10 10 20888 redis.default.service.nomad. -redis.default.service.nomad. 8 IN SRV 10 10 26292 redis.default.service.nomad. - -;; ADDITIONAL SECTION: -redis.default.service.nomad. 8 IN A 192.168.29.76 -redis.default.service.nomad. 8 IN A 192.168.29.76 -redis.default.service.nomad. 8 IN A 192.168.29.76 - -;; Query time: 0 msec -;; SERVER: 127.0.0.1#1053(127.0.0.1) (UDP) -;; WHEN: Thu Jan 05 12:12:20 IST 2023 -;; MSG SIZE rcvd: 339 -``` - -### SOA Record - -``` -$ dig @localhost -p 1053 1dns.default.service.nomad. - -; <<>> DiG 9.18.12-0ubuntu0.22.04.2-Ubuntu <<>> @localhost -p 1053 1dns.default.service.nomad. -; (1 server found) -;; global options: +cmd -;; Got answer: -;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21012 -;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 -;; WARNING: recursion requested but not available - -;; OPT PSEUDOSECTION: -; EDNS: version: 0, flags:; udp: 1232 -; COOKIE: 6d146bb140b4d8ca (echoed) -;; QUESTION SECTION: -;1dns.default.service.nomad. IN A - -;; ANSWER SECTION: -1dns.default.service.nomad. 5 IN SOA ns1.1dns.default.service.nomad. ns1.1dns.default.service.nomad. 1 3600 600 604800 3600 - -;; Query time: 0 msec -;; SERVER: 127.0.0.1#1053(localhost) (UDP) -;; WHEN: Wed Aug 23 21:14:41 EEST 2023 -;; MSG SIZE rcvd: 189 -``` diff --git a/plugin/nomad/helpers.go b/plugin/nomad/helpers.go deleted file mode 100644 index 4f29d15334..0000000000 --- a/plugin/nomad/helpers.go +++ /dev/null @@ -1,68 +0,0 @@ -package nomad - -import ( - "net" - - "github.com/hashicorp/nomad/api" - "github.com/miekg/dns" -) - -func addSRVRecord(m *dns.Msg, s *api.ServiceRegistration, header dns.RR_Header, originalQName string, addr net.IP, ttl uint32) error { - srvRecord := &dns.SRV{ - Hdr: header, - Target: originalQName, - Port: uint16(s.Port), - Priority: 10, - Weight: 10, - } - m.Answer = append(m.Answer, srvRecord) - - if addr.To4() == nil { - addExtrasToAAAARecord(m, originalQName, ttl, addr) - } else { - addExtrasToARecord(m, originalQName, ttl, addr) - } - - return nil -} - -func addExtrasToARecord(m *dns.Msg, originalQName string, ttl uint32, addr net.IP) { - header := dns.RR_Header{ - Name: originalQName, - Rrtype: dns.TypeA, - Class: dns.ClassINET, - Ttl: ttl, - } - m.Extra = append(m.Extra, &dns.A{Hdr: header, A: addr}) -} - -func addExtrasToAAAARecord(m *dns.Msg, originalQName string, ttl uint32, addr net.IP) { - header := dns.RR_Header{ - Name: originalQName, - Rrtype: dns.TypeAAAA, - Class: dns.ClassINET, - Ttl: ttl, - } - m.Extra = append(m.Extra, &dns.AAAA{Hdr: header, AAAA: addr}) -} - -func addARecord(m *dns.Msg, header dns.RR_Header, addr net.IP) { - m.Answer = append(m.Answer, &dns.A{Hdr: header, A: addr}) -} - -func addAAAARecord(m *dns.Msg, header dns.RR_Header, addr net.IP) { - m.Answer = append(m.Answer, &dns.AAAA{Hdr: header, AAAA: addr}) -} - -func createSOARecord(originalQName string, ttl uint32, zone string) *dns.SOA { - return &dns.SOA{ - Hdr: dns.RR_Header{Name: dns.Fqdn(originalQName), Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: ttl}, - Ns: dns.Fqdn("ns1." + originalQName), - Mbox: dns.Fqdn("hostmaster." + zone), - Serial: 0, - Refresh: 3600, - Retry: 600, - Expire: 86400, - Minttl: 30, - } -} diff --git a/plugin/nomad/metrics.go b/plugin/nomad/metrics.go deleted file mode 100644 index aa45f47e90..0000000000 --- a/plugin/nomad/metrics.go +++ /dev/null @@ -1,25 +0,0 @@ -package nomad - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // requestSuccessCount is the number of DNS requests handled successfully. - requestSuccessCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "success_requests_total", - Help: "Counter of DNS requests handled successfully.", - }, []string{"server", "namespace"}) - // requestFailedCount is the number of DNS requests that failed. - requestFailedCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: pluginName, - Name: "failed_requests_total", - Help: "Counter of DNS requests failed.", - }, []string{"server", "namespace"}) -) diff --git a/plugin/nomad/nomad.go b/plugin/nomad/nomad.go deleted file mode 100644 index c39c445eee..0000000000 --- a/plugin/nomad/nomad.go +++ /dev/null @@ -1,158 +0,0 @@ -package nomad - -import ( - "context" - "fmt" - "net" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/plugin/pkg/dnsutil" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/request" - - "github.com/hashicorp/nomad/api" - "github.com/miekg/dns" -) - -const pluginName = "nomad" - -var ( - log = clog.NewWithPlugin(pluginName) - defaultTTL = 30 -) - -type Nomad struct { - Next plugin.Handler - - ttl uint32 - Zone string - clients []*api.Client - current int -} - -func (n *Nomad) Name() string { - return pluginName -} - -func (n Nomad) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname, originalQName, err := processQName(state.Name(), n.Zone) - if err != nil { - return plugin.NextOrFailure(n.Name(), n.Next, ctx, w, r) - } - - namespace, serviceName, err := extractNamespaceAndService(qname) - if err != nil { - return plugin.NextOrFailure(n.Name(), n.Next, ctx, w, r) - } - - m, header := initializeMessage(state, n.ttl) - - svcRegistrations, _, err := fetchServiceRegistrations(n, serviceName, namespace) - if err != nil { - log.Warning(err) - return handleServiceLookupError(w, m, ctx, namespace) - } - - if len(svcRegistrations) == 0 { - return handleResponseError(n, w, m, originalQName, n.ttl, ctx, namespace, err) - } - - if err := addServiceResponses(m, svcRegistrations, header, state.QType(), originalQName, n.ttl); err != nil { - return handleResponseError(n, w, m, originalQName, n.ttl, ctx, namespace, err) - } - - err = w.WriteMsg(m) - requestSuccessCount.WithLabelValues(metrics.WithServer(ctx), namespace).Inc() - return dns.RcodeSuccess, err -} - -func processQName(qname, zone string) (string, string, error) { - original := dns.Fqdn(qname) - base, err := dnsutil.TrimZone(original, dns.Fqdn(zone)) - return base, original, err -} - -func extractNamespaceAndService(qname string) (string, string, error) { - qnameSplit := dns.SplitDomainName(qname) - if len(qnameSplit) < 2 { - return "", "", fmt.Errorf("invalid query name") - } - return qnameSplit[1], qnameSplit[0], nil -} - -func initializeMessage(state request.Request, ttl uint32) (*dns.Msg, dns.RR_Header) { - m := new(dns.Msg) - m.SetReply(state.Req) - m.Authoritative, m.Compress, m.Rcode = true, true, dns.RcodeSuccess - - header := dns.RR_Header{ - Name: state.QName(), - Rrtype: state.QType(), - Class: dns.ClassINET, - Ttl: ttl, - } - - return m, header -} - -func fetchServiceRegistrations(n Nomad, serviceName, namespace string) ([]*api.ServiceRegistration, *api.QueryMeta, error) { - log.Debugf("Looking up record for svc: %s namespace: %s", serviceName, namespace) - nc, err := n.getClient() - if err != nil { - return nil, nil, err - } - return nc.Services().Get(serviceName, (&api.QueryOptions{Namespace: namespace})) -} - -func handleServiceLookupError(w dns.ResponseWriter, m *dns.Msg, ctx context.Context, namespace string) (int, error) { - m.Rcode = dns.RcodeSuccess - err := w.WriteMsg(m) - requestFailedCount.WithLabelValues(metrics.WithServer(ctx), namespace).Inc() - return dns.RcodeServerFailure, err -} - -func addServiceResponses(m *dns.Msg, svcRegistrations []*api.ServiceRegistration, header dns.RR_Header, qtype uint16, originalQName string, ttl uint32) error { - for _, s := range svcRegistrations { - addr := net.ParseIP(s.Address) - if addr == nil { - return fmt.Errorf("error parsing IP address") - } - - switch qtype { - case dns.TypeA: - if addr.To4() == nil { - continue - } - addARecord(m, header, addr) - case dns.TypeAAAA: - if addr.To4() != nil { - continue - } - addAAAARecord(m, header, addr) - case dns.TypeSRV: - err := addSRVRecord(m, s, header, originalQName, addr, ttl) - if err != nil { - return err - } - default: - m.Rcode = dns.RcodeNotImplemented - return fmt.Errorf("query type not implemented") - } - } - return nil -} - -func handleResponseError(n Nomad, w dns.ResponseWriter, m *dns.Msg, originalQName string, ttl uint32, ctx context.Context, namespace string, err error) (int, error) { - m.Rcode = dns.RcodeNameError - m.Answer = append(m.Answer, createSOARecord(originalQName, ttl, n.Zone)) - - if writeErr := w.WriteMsg(m); writeErr != nil { - return dns.RcodeServerFailure, fmt.Errorf("write message error: %w", writeErr) - } - - requestFailedCount.WithLabelValues(metrics.WithServer(ctx), namespace).Inc() - - return dns.RcodeSuccess, err -} diff --git a/plugin/nomad/nomad_test.go b/plugin/nomad/nomad_test.go deleted file mode 100644 index da673506cd..0000000000 --- a/plugin/nomad/nomad_test.go +++ /dev/null @@ -1,204 +0,0 @@ -package nomad - -import ( - "context" - "net/http" - "net/http/httptest" - "testing" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - nomad "github.com/hashicorp/nomad/api" - "github.com/miekg/dns" -) - -func TestNomad(t *testing.T) { - var demoNomad = Nomad{ - Next: test.ErrorHandler(), - ttl: uint32(defaultTTL), - Zone: "service.nomad", - clients: make([]*nomad.Client, 0), - } - - var cases = []test.Case{ - { - Qname: "example.default.service.nomad.", - Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("example.default.service.nomad. 30 IN A 1.2.3.4"), - }, - }, - { - Qname: "example.default.service.nomad.", - Qtype: dns.TypeAAAA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{}, - }, - { - Qname: "fakeipv6.default.service.nomad.", - Qtype: dns.TypeAAAA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.AAAA("fakeipv6.default.service.nomad. 30 IN AAAA 1:2:3::4"), - }, - }, - { - Qname: "fakeipv6.default.service.nomad.", - Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{}, - }, - { - Qname: "multi.default.service.nomad.", - Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.A("multi.default.service.nomad. 30 IN A 1.2.3.4"), - test.A("multi.default.service.nomad. 30 IN A 1.2.3.5"), - test.A("multi.default.service.nomad. 30 IN A 1.2.3.6"), - }, - }, - { - Qname: "nonexistent.default.service.nomad.", - Qtype: dns.TypeA, - Rcode: dns.RcodeNameError, - Answer: []dns.RR{ - test.SOA("nonexistent.default.service.nomad. 30 IN SOA ns1.nonexistent.default.service.nomad. hostmaster.service.nomad. 0 3600 600 86400 30"), - }, - }, - { - Qname: "example.default.service.nomad.", - Qtype: dns.TypeSRV, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{test.SRV("example.default.service.nomad. 30 IN SRV 10 10 23202 example.default.service.nomad.")}, - Extra: []dns.RR{test.A("example.default.service.nomad. 30 IN A 1.2.3.4")}, - }, - } - - ctx := context.Background() - - // Setup a fake Nomad servers. - nomadServer1 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/v1/service/example": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":23202,"ServiceName":"example"}]`)) - case "/v1/service/fakeipv6": - w.Write([]byte(`[{"Address":"1:2:3::4","Namespace":"default","Port":8000,"ServiceName":"fakeipv6"}]`)) - case "/v1/service/multi": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":25395,"ServiceName":"multi"},{"Address":"1.2.3.5","Namespace":"default","Port":20888,"ServiceName":"multi"},{"Address":"1.2.3.6","Namespace":"default","Port":26292,"ServiceName":"multi"}]`)) - case "/v1/service/nonexistent": - w.Write([]byte(`[]`)) - case "/v1/agent/self": - w.Write([]byte(`{"Member":{"Name":"foobar1"}}`)) - } - })) - defer nomadServer1.Close() - nomadServer2 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/v1/service/example": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":23202,"ServiceName":"example"}]`)) - case "/v1/service/fakeipv6": - w.Write([]byte(`[{"Address":"1:2:3::4","Namespace":"default","Port":8000,"ServiceName":"fakeipv6"}]`)) - case "/v1/service/multi": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":25395,"ServiceName":"multi"},{"Address":"1.2.3.5","Namespace":"default","Port":20888,"ServiceName":"multi"},{"Address":"1.2.3.6","Namespace":"default","Port":26292,"ServiceName":"multi"}]`)) - case "/v1/service/nonexistent": - w.Write([]byte(`[]`)) - case "/v1/agent/self": - w.Write([]byte(`{"Member":{"Name":"foobar2"}}`)) - } - })) - defer nomadServer2.Close() - nomadServer3 := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - switch r.URL.Path { - case "/v1/service/example": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":23202,"ServiceName":"example"}]`)) - case "/v1/service/fakeipv6": - w.Write([]byte(`[{"Address":"1:2:3::4","Namespace":"default","Port":8000,"ServiceName":"fakeipv6"}]`)) - case "/v1/service/multi": - w.Write([]byte(`[{"Address":"1.2.3.4","Namespace":"default","Port":25395,"ServiceName":"multi"},{"Address":"1.2.3.5","Namespace":"default","Port":20888,"ServiceName":"multi"},{"Address":"1.2.3.6","Namespace":"default","Port":26292,"ServiceName":"multi"}]`)) - case "/v1/service/nonexistent": - w.Write([]byte(`[]`)) - case "/v1/agent/self": - w.Write([]byte(`{"Member":{"Name":"foobar3"}}`)) - } - })) - defer nomadServer3.Close() - - // Configure the plugin to use the fake Nomad server. - cfg := nomad.DefaultConfig() - cfg.Address = nomadServer1.URL - client1, err := nomad.NewClient(cfg) - if err != nil { - t.Errorf("Failed to create Nomad client: %v", err) - return - } - - demoNomad.clients = append(demoNomad.clients, client1) - - cfg = nomad.DefaultConfig() - cfg.Address = nomadServer2.URL - client2, err := nomad.NewClient(cfg) - if err != nil { - t.Errorf("Failed to create Nomad client: %v", err) - return - } - - demoNomad.clients = append(demoNomad.clients, client2) - - cfg = nomad.DefaultConfig() - cfg.Address = nomadServer3.URL - client3, err := nomad.NewClient(cfg) - if err != nil { - t.Errorf("Failed to create Nomad client: %v", err) - return - } - demoNomad.clients = append(demoNomad.clients, client3) - - client, _ := demoNomad.getClient() - if client != client1 { - t.Errorf("Expected client1") - } - - nomadServer1.Close() - - client, _ = demoNomad.getClient() - if client == client1 { - t.Errorf("Expected client2") - } - - client, err = demoNomad.getClient() - if err != nil { - t.Errorf("Expected no error, but got %v", err) - } - if client == nil { - t.Errorf("Expected client2 but got nil") - } - if client != client2 { - t.Errorf("Expected client2") - } - - runTests(ctx, t, &demoNomad, cases) -} - -func runTests(ctx context.Context, t *testing.T, n *Nomad, cases []test.Case) { - t.Helper() - for i, tc := range cases { - r := tc.Msg() - w := dnstest.NewRecorder(&test.ResponseWriter{}) - - _, err := n.ServeDNS(ctx, w, r) - if err != tc.Error { - t.Errorf("Test %d: %v (%v) (%v)", i, err, w, r) - return - } - - if w.Msg == nil { - t.Errorf("Test %d: nil message", i) - } - if err := test.SortAndCheck(w.Msg, tc); err != nil { - t.Errorf("Test %d: %v", i, err) - } - } -} diff --git a/plugin/nomad/ready.go b/plugin/nomad/ready.go deleted file mode 100644 index 7a682cf9ce..0000000000 --- a/plugin/nomad/ready.go +++ /dev/null @@ -1,9 +0,0 @@ -package nomad - -// Ready signals when the plugin is ready for use. -// In case of Nomad, when the ping to the Nomad API is successful -// the plugin is ready. -func (n Nomad) Ready() bool { - client, _ := n.getClient() - return client != nil -} diff --git a/plugin/nomad/setup.go b/plugin/nomad/setup.go deleted file mode 100644 index 94e2178ab8..0000000000 --- a/plugin/nomad/setup.go +++ /dev/null @@ -1,141 +0,0 @@ -package nomad - -import ( - "fmt" - "strconv" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - - nomad "github.com/hashicorp/nomad/api" -) - -// init registers this plugin. -func init() { plugin.Register(pluginName, setup) } - -// setup is the function that gets called when the config parser sees the token "nomad". Setup is responsible -// for parsing any extra options the nomad plugin may have. The first token this function sees is "nomad". -func setup(c *caddy.Controller) error { - n := &Nomad{ - ttl: uint32(defaultTTL), - clients: make([]*nomad.Client, 0), - current: -1, - } - - // Parse the configuration, including the zone argument - if err := parse(c, n); err != nil { - return plugin.Error("nomad", err) - } - - c.OnStartup(func() error { - var err error - for idx, client := range n.clients { - _, err := client.Agent().Self() - if err == nil { - n.current = idx - return nil - } - } - return err - }) - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - n.Next = next - return n - }) - - return nil -} - -func parse(c *caddy.Controller, n *Nomad) error { - var token string - addresses := []string{} // Multiple addresses are stored here - - // Expect the first token to be "nomad" - if !c.Next() { - return c.Err("expected 'nomad' token") - } - - // Check for the zone argument - args := c.RemainingArgs() - if len(args) == 0 { - n.Zone = "service.nomad" - } else { - n.Zone = args[0] - } - - // Parse the configuration block - for c.NextBlock() { - selector := strings.ToLower(c.Val()) - - switch selector { - case "address": - args := c.RemainingArgs() - if len(args) == 0 { - return c.Err("at least one address is required") - } - addresses = append(addresses, args...) - case "token": - args := c.RemainingArgs() - if len(args) != 1 { - return c.Err("exactly one token is required") - } - token = args[0] - case "ttl": - args := c.RemainingArgs() - if len(args) != 1 { - return c.Err("exactly one ttl value is required") - } - t, err := strconv.Atoi(args[0]) - if err != nil { - return c.Err("error parsing ttl: " + err.Error()) - } - if t < 0 || t > 3600 { - return c.Errf("ttl must be in range [0, 3600]: %d", t) - } - n.ttl = uint32(t) - default: - return c.Errf("unknown property '%s'", selector) - } - } - - // Push an empty address to create a client solely based on the defaults. - if len(addresses) == 0 { - addresses = append(addresses, "") - } - - for _, addr := range addresses { - cfg := nomad.DefaultConfig() - if len(addr) > 0 { - cfg.Address = addr - } - if len(token) > 0 { - cfg.SecretID = token - } - client, err := nomad.NewClient(cfg) - if err != nil { - return plugin.Error("nomad", err) - } - n.clients = append(n.clients, client) // Store all clients - } - - return nil -} - -func (n *Nomad) getClient() (*nomad.Client, error) { - // Don't bother querying Agent().Self() if there is only one client. - if len(n.clients) == 1 { - return n.clients[0], nil - } - for i := range len(n.clients) { - idx := (n.current + i) % len(n.clients) - _, err := n.clients[idx].Agent().Self() - if err == nil { - n.current = idx - return n.clients[idx], nil - } - } - return nil, fmt.Errorf("no Nomad client available") -} diff --git a/plugin/nomad/setup_test.go b/plugin/nomad/setup_test.go deleted file mode 100644 index 880997b3bf..0000000000 --- a/plugin/nomad/setup_test.go +++ /dev/null @@ -1,110 +0,0 @@ -package nomad - -import ( - "testing" - - "github.com/coredns/caddy" - - nomad "github.com/hashicorp/nomad/api" -) - -func TestSetupNomad(t *testing.T) { - tests := []struct { - name string - config string - shouldErr bool - expectedTTL uint32 - }{ - { - name: "valid_config_default_ttl", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 - token test-token -}`, - shouldErr: false, - expectedTTL: uint32(defaultTTL), - }, - { - name: "valid_config_custom_ttl", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 - token test-token - ttl 60 -}`, - shouldErr: false, - expectedTTL: 60, - }, - { - name: "invalid_ttl_negative", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 - token test-token - ttl -1 -}`, - shouldErr: true, - }, - { - name: "invalid_ttl_too_large", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 - token test-token - ttl 3601 -}`, - shouldErr: true, - }, - { - name: "invalid_property", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 - token test-token - invalid_property -}`, - shouldErr: true, - }, - { - name: "multiple_addresses", - config: ` -nomad service.nomad { - address http://127.0.0.1:4646 http://127.0.0.2:4646 - token test-token -}`, - shouldErr: false, - expectedTTL: uint32(defaultTTL), - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - c := caddy.NewTestController("dns", tt.config) - n := &Nomad{ - ttl: uint32(defaultTTL), - clients: make([]*nomad.Client, 0), - current: -1, - } - - err := parse(c, n) - if tt.shouldErr && err == nil { - t.Fatalf("Test %s: expected error but got none", tt.name) - } - if !tt.shouldErr && err != nil { - t.Fatalf("Test %s: expected no error but got: %v", tt.name, err) - } - if tt.shouldErr { - return - } - - if n.ttl != tt.expectedTTL { - t.Errorf("Test %s: expected TTL %d, got %d", tt.name, tt.expectedTTL, n.ttl) - } - - if len(n.clients) == 0 { - t.Errorf("Test %s: expected at least one client to be created", tt.name) - } - }) - } -} diff --git a/plugin/nsid/README.md b/plugin/nsid/README.md deleted file mode 100644 index 7bb15ca92d..0000000000 --- a/plugin/nsid/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# nsid - -## Name - -*nsid* - adds an identifier of this server to each reply. - -## Description - -This plugin implements [RFC 5001](https://tools.ietf.org/html/rfc5001) and adds an EDNS0 OPT -resource record to replies that uniquely identify the server. This is useful in anycast setups to -see which server was responsible for generating the reply and for debugging. - -This plugin can only be used once per Server Block. - - -## Syntax - -~~~ txt -nsid [DATA] -~~~ - -**DATA** is the string to use in the nsid record. - -If **DATA** is not given, the host's name is used. - -## Examples - -Enable nsid: - -~~~ corefile -example.org { - whoami - nsid Use The Force -} -~~~ - -And now a client with NSID support will see an OPT record with the NSID option: - -~~~ sh -% dig +nsid @localhost a whoami.example.org - -;; Got answer: -;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46880 -;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 3 - -.... - -; OPT PSEUDOSECTION: -; EDNS: version: 0, flags:; udp: 4096 -; NSID: 55 73 65 20 54 68 65 20 46 6f 72 63 65 ("Use The Force") -;; QUESTION SECTION: -;whoami.example.org. IN A -~~~ - -## See Also - -[RFC 5001](https://tools.ietf.org/html/rfc5001) diff --git a/plugin/nsid/log_test.go b/plugin/nsid/log_test.go deleted file mode 100644 index 1aea379061..0000000000 --- a/plugin/nsid/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package nsid - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/nsid/nsid.go b/plugin/nsid/nsid.go deleted file mode 100644 index e2506b45fb..0000000000 --- a/plugin/nsid/nsid.go +++ /dev/null @@ -1,69 +0,0 @@ -// Package nsid implements NSID protocol -package nsid - -import ( - "context" - "encoding/hex" - - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -// Nsid plugin -type Nsid struct { - Next plugin.Handler - Data string -} - -// ResponseWriter is a response writer that adds NSID response -type ResponseWriter struct { - dns.ResponseWriter - Data string - request *dns.Msg -} - -// ServeDNS implements the plugin.Handler interface. -func (n Nsid) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if option := r.IsEdns0(); option != nil { - for _, o := range option.Option { - if _, ok := o.(*dns.EDNS0_NSID); ok { - nw := &ResponseWriter{ResponseWriter: w, Data: n.Data, request: r} - return plugin.NextOrFailure(n.Name(), n.Next, ctx, nw, r) - } - } - } - return plugin.NextOrFailure(n.Name(), n.Next, ctx, w, r) -} - -// WriteMsg implements the dns.ResponseWriter interface. -func (w *ResponseWriter) WriteMsg(res *dns.Msg) error { - if w.request.IsEdns0() != nil && res.IsEdns0() == nil { - res.SetEdns0(w.request.IsEdns0().UDPSize(), true) - } - - if option := res.IsEdns0(); option != nil { - var exists bool - - for _, o := range option.Option { - if e, ok := o.(*dns.EDNS0_NSID); ok { - e.Code = dns.EDNS0NSID - e.Nsid = hex.EncodeToString([]byte(w.Data)) - exists = true - } - } - - // Append the NSID if it doesn't exist in EDNS0 options - if !exists { - option.Option = append(option.Option, &dns.EDNS0_NSID{ - Code: dns.EDNS0NSID, - Nsid: hex.EncodeToString([]byte(w.Data)), - }) - } - } - - return w.ResponseWriter.WriteMsg(res) -} - -// Name implements the Handler interface. -func (n Nsid) Name() string { return "nsid" } diff --git a/plugin/nsid/nsid_test.go b/plugin/nsid/nsid_test.go deleted file mode 100644 index c6268b4092..0000000000 --- a/plugin/nsid/nsid_test.go +++ /dev/null @@ -1,136 +0,0 @@ -package nsid - -import ( - "context" - "encoding/hex" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/cache" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/plugin/whoami" - - "github.com/miekg/dns" -) - -func TestNsid(t *testing.T) { - em := Nsid{ - Data: "NSID", - } - - tests := []struct { - next plugin.Handler - qname string - qtype uint16 - expectedCode int - expectedReply string - expectedErr error - }{ - { - next: whoami.Whoami{}, - qname: ".", - expectedCode: dns.RcodeSuccess, - expectedReply: hex.EncodeToString([]byte("NSID")), - expectedErr: nil, - }, - } - - ctx := context.TODO() - - for i, tc := range tests { - req := new(dns.Msg) - if tc.qtype == 0 { - tc.qtype = dns.TypeA - } - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - req.Question[0].Qclass = dns.ClassINET - - req.SetEdns0(4096, false) - option := req.Extra[0].(*dns.OPT) - option.Option = append(option.Option, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}) - em.Next = tc.next - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := em.ServeDNS(ctx, rec, req) - - if err != tc.expectedErr { - t.Errorf("Test %d: Expected error %v, but got %v", i, tc.expectedErr, err) - } - if code != tc.expectedCode { - t.Errorf("Test %d: Expected status code %d, but got %d", i, tc.expectedCode, code) - } - if tc.expectedReply != "" { - for _, extra := range rec.Msg.Extra { - if option, ok := extra.(*dns.OPT); ok { - e := option.Option[0].(*dns.EDNS0_NSID) - if e.Nsid != tc.expectedReply { - t.Errorf("Test %d: Expected answer %s, but got %s", i, tc.expectedReply, e.Nsid) - } - } - } - } - } -} - -func TestNsidCache(t *testing.T) { - em := Nsid{ - Data: "NSID", - } - c := cache.New() - - tests := []struct { - next plugin.Handler - qname string - qtype uint16 - expectedCode int - expectedReply string - expectedErr error - }{ - { - next: whoami.Whoami{}, - qname: ".", - expectedCode: dns.RcodeSuccess, - expectedReply: hex.EncodeToString([]byte("NSID")), - expectedErr: nil, - }, - } - - ctx := context.TODO() - - for i, tc := range tests { - req := new(dns.Msg) - if tc.qtype == 0 { - tc.qtype = dns.TypeA - } - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - req.Question[0].Qclass = dns.ClassINET - - req.SetEdns0(4096, false) - option := req.Extra[0].(*dns.OPT) - option.Option = append(option.Option, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}) - em.Next = tc.next - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - c.Next = em - code, err := c.ServeDNS(ctx, rec, req) - - if err != tc.expectedErr { - t.Errorf("Test %d: Expected error %v, but got %v", i, tc.expectedErr, err) - } - if code != tc.expectedCode { - t.Errorf("Test %d: Expected status code %d, but got %d", i, tc.expectedCode, code) - } - if tc.expectedReply != "" { - for _, extra := range rec.Msg.Extra { - if option, ok := extra.(*dns.OPT); ok { - e := option.Option[0].(*dns.EDNS0_NSID) - if e.Nsid != tc.expectedReply { - t.Errorf("Test %d: Expected answer %s, but got %s", i, tc.expectedReply, e.Nsid) - } - } - } - } - } -} diff --git a/plugin/nsid/setup.go b/plugin/nsid/setup.go deleted file mode 100644 index 07c6493160..0000000000 --- a/plugin/nsid/setup.go +++ /dev/null @@ -1,45 +0,0 @@ -package nsid - -import ( - "os" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("nsid", setup) } - -func setup(c *caddy.Controller) error { - nsid, err := nsidParse(c) - if err != nil { - return plugin.Error("nsid", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return Nsid{Next: next, Data: nsid} - }) - - return nil -} - -func nsidParse(c *caddy.Controller) (string, error) { - // Use hostname as the default - nsid, err := os.Hostname() - if err != nil { - nsid = "localhost" - } - i := 0 - for c.Next() { - if i > 0 { - return nsid, plugin.ErrOnce - } - i++ - args := c.RemainingArgs() - if len(args) > 0 { - nsid = strings.Join(args, " ") - } - } - return nsid, nil -} diff --git a/plugin/nsid/setup_test.go b/plugin/nsid/setup_test.go deleted file mode 100644 index 15d40425f7..0000000000 --- a/plugin/nsid/setup_test.go +++ /dev/null @@ -1,68 +0,0 @@ -package nsid - -import ( - "os" - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestSetupNsid(t *testing.T) { - defaultNsid, err := os.Hostname() - if err != nil { - defaultNsid = "localhost" - } - tests := []struct { - input string - shouldErr bool - expectedData string - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - {`nsid`, false, defaultNsid, ""}, - {`nsid "ps0"`, false, "ps0", ""}, - {`nsid "worker1"`, false, "worker1", ""}, - {`nsid "tf 2"`, false, "tf 2", ""}, - {`nsid - nsid`, true, "", "plugin"}, - } - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - nsid, err := nsidParse(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - - if !test.shouldErr && nsid != test.expectedData { - t.Errorf("Nsid not correctly set for input %s. Expected: %s, actual: %s", test.input, test.expectedData, nsid) - } - } -} diff --git a/plugin/pprof/README.md b/plugin/pprof/README.md deleted file mode 100644 index c63d152bc4..0000000000 --- a/plugin/pprof/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# pprof - -## Name - -*pprof* - publishes runtime profiling data at endpoints under `/debug/pprof`. - -## Description - -You can visit `/debug/pprof` on your site for an index of the available endpoints. By default it -will listen on localhost:6053. - -This is a debugging tool. Certain requests (such as collecting execution traces) can be slow. If -you use pprof on a live server, consider restricting access or enabling it only temporarily. - -This plugin can only be used once per Server Block. - -## Syntax - -~~~ txt -pprof [ADDRESS] -~~~ - -Optionally pprof takes an address; the default is `localhost:6053`. - -An extra option can be set with this extended syntax: - -~~~ txt -pprof [ADDRESS] { - block [RATE] -} -~~~ - -* `block` option enables block profiling, **RATE** defaults to 1. **RATE** must be a positive value. - See [Diagnostics, chapter profiling](https://golang.org/doc/diagnostics.html) and - [runtime.SetBlockProfileRate](https://golang.org/pkg/runtime/#SetBlockProfileRate) for what block - profiling entails. - -## Examples - -Enable a pprof endpoint: - -~~~ -. { - pprof -} -~~~ - -And use the pprof tool to get statistics: `go tool pprof http://localhost:6053`. - -Listen on an alternate address: - -~~~ txt -. { - pprof 10.9.8.7:6060 -} -~~~ - -Listen on an all addresses on port 6060, and enable block profiling - -~~~ txt -. { - pprof :6060 { - block - } -} -~~~ - -## See Also - -See [Go's pprof documentation](https://golang.org/pkg/net/http/pprof/) and [Profiling Go -Programs](https://blog.golang.org/profiling-go-programs). - -See [runtime.SetBlockProfileRate](https://golang.org/pkg/runtime/#SetBlockProfileRate) for -background on block profiling. diff --git a/plugin/pprof/log_test.go b/plugin/pprof/log_test.go deleted file mode 100644 index 7e2c25234c..0000000000 --- a/plugin/pprof/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package pprof - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/pprof/pprof.go b/plugin/pprof/pprof.go deleted file mode 100644 index 822e6e222f..0000000000 --- a/plugin/pprof/pprof.go +++ /dev/null @@ -1,60 +0,0 @@ -// Package pprof implements a debug endpoint for getting profiles using the -// go pprof tooling. -package pprof - -import ( - "net" - "net/http" - pp "net/http/pprof" - "runtime" - - "github.com/coredns/coredns/plugin/pkg/reuseport" -) - -type handler struct { - addr string - rateBloc int - ln net.Listener - mux *http.ServeMux -} - -func (h *handler) Startup() error { - // Reloading the plugin without changing the listening address results - // in an error unless we reuse the port because Startup is called for - // new handlers before Shutdown is called for the old ones. - ln, err := reuseport.Listen("tcp", h.addr) - if err != nil { - log.Errorf("Failed to start pprof handler: %s", err) - return err - } - - h.ln = ln - - h.mux = http.NewServeMux() - h.mux.HandleFunc(path, func(rw http.ResponseWriter, req *http.Request) { - http.Redirect(rw, req, path+"/", http.StatusFound) - }) - h.mux.HandleFunc(path+"/", pp.Index) - h.mux.HandleFunc(path+"/cmdline", pp.Cmdline) - h.mux.HandleFunc(path+"/profile", pp.Profile) - h.mux.HandleFunc(path+"/symbol", pp.Symbol) - h.mux.HandleFunc(path+"/trace", pp.Trace) - - runtime.SetBlockProfileRate(h.rateBloc) - - go func() { - http.Serve(h.ln, h.mux) - }() - return nil -} - -func (h *handler) Shutdown() error { - if h.ln != nil { - return h.ln.Close() - } - return nil -} - -const ( - path = "/debug/pprof" -) diff --git a/plugin/pprof/pprof_test.go b/plugin/pprof/pprof_test.go deleted file mode 100644 index 6bea4e94dc..0000000000 --- a/plugin/pprof/pprof_test.go +++ /dev/null @@ -1,163 +0,0 @@ -package pprof - -import ( - "fmt" - "net/http" - "strings" - "testing" - "time" -) - -func TestHandlerStartup(t *testing.T) { - h := &handler{ - addr: ":0", // Use available port - rateBloc: 5, - } - - err := h.Startup() - if err != nil { - t.Fatalf("Expected no error, got: %v", err) - } - defer h.Shutdown() - - if h.ln == nil { - t.Fatal("Expected listener to be set") - } - - if h.mux == nil { - t.Fatal("Expected mux to be set") - } - - // Verify the server is actually listening - addr := h.ln.Addr().String() - if addr == "" { - t.Fatal("Expected non-empty address") - } -} - -func TestHandlerShutdown(t *testing.T) { - h := &handler{ - addr: ":0", - rateBloc: 1, - } - - // Start the handler - err := h.Startup() - if err != nil { - t.Fatalf("Expected no error during startup, got: %v", err) - } - - // Verify listener exists - if h.ln == nil { - t.Fatal("Expected listener to be set after startup") - } - - // Shutdown and verify no error - err = h.Shutdown() - if err != nil { - t.Errorf("Expected no error during shutdown, got: %v", err) - } -} - -func TestHandlerShutdownWithoutStartup(t *testing.T) { - h := &handler{} - - // Shutdown without startup should not error - err := h.Shutdown() - if err != nil { - t.Errorf("Expected no error when shutting down without startup, got: %v", err) - } -} - -func TestHandlerPprofEndpoints(t *testing.T) { - h := &handler{ - addr: ":0", - rateBloc: 1, - } - - err := h.Startup() - if err != nil { - t.Fatalf("Expected no error during startup, got: %v", err) - } - defer h.Shutdown() - - // Wait a bit for the server to fully start - time.Sleep(100 * time.Millisecond) - - baseURL := fmt.Sprintf("http://%s", h.ln.Addr().String()) - - testCases := []struct { - path string - expectedStatus int - }{ - {"/debug/pprof/", http.StatusOK}, // Index page - {"/debug/pprof/cmdline", http.StatusOK}, // Cmdline - {"/debug/pprof/symbol", http.StatusOK}, // Symbol - } - - for _, tc := range testCases { - url := baseURL + tc.path - resp, err := http.Get(url) - if err != nil { - t.Errorf("Error making request to %s: %v", url, err) - continue - } - defer resp.Body.Close() - - if resp.StatusCode != tc.expectedStatus { - t.Errorf("Expected status %d for %s, got %d", tc.expectedStatus, tc.path, resp.StatusCode) - } - } -} - -func TestHandlerPprofRedirect(t *testing.T) { - h := &handler{ - addr: ":0", - rateBloc: 1, - } - - err := h.Startup() - if err != nil { - t.Fatalf("Expected no error during startup, got: %v", err) - } - defer h.Shutdown() - - // Wait a bit for the server to fully start - time.Sleep(100 * time.Millisecond) - - // Create a client that doesn't follow redirects - client := &http.Client{ - CheckRedirect: func(req *http.Request, via []*http.Request) error { - return http.ErrUseLastResponse - }, - } - - url := fmt.Sprintf("http://%s/debug/pprof", h.ln.Addr().String()) - resp, err := client.Get(url) - if err != nil { - t.Fatalf("Error making request: %v", err) - } - defer resp.Body.Close() - - if resp.StatusCode != http.StatusFound { - t.Errorf("Expected status %d, got %d", http.StatusFound, resp.StatusCode) - } - - location := resp.Header.Get("Location") - if !strings.HasSuffix(location, "/debug/pprof/") { - t.Errorf("Expected redirect to end with '/debug/pprof/', got: %s", location) - } -} - -func TestHandlerStartupInvalidAddress(t *testing.T) { - h := &handler{ - addr: "invalid-address-format", - rateBloc: 1, - } - - err := h.Startup() - if err == nil { - t.Fatal("Expected error for invalid address format") - defer h.Shutdown() - } -} diff --git a/plugin/pprof/setup.go b/plugin/pprof/setup.go deleted file mode 100644 index 3505b5d723..0000000000 --- a/plugin/pprof/setup.go +++ /dev/null @@ -1,65 +0,0 @@ -package pprof - -import ( - "net" - "strconv" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" -) - -var log = clog.NewWithPlugin("pprof") - -const defaultAddr = "localhost:6053" - -func init() { plugin.Register("pprof", setup) } - -func setup(c *caddy.Controller) error { - h := &handler{addr: defaultAddr} - - i := 0 - for c.Next() { - if i > 0 { - return plugin.Error("pprof", plugin.ErrOnce) - } - i++ - - args := c.RemainingArgs() - if len(args) == 1 { - h.addr = args[0] - _, _, e := net.SplitHostPort(h.addr) - if e != nil { - return plugin.Error("pprof", c.Errf("%v", e)) - } - } - - if len(args) > 1 { - return plugin.Error("pprof", c.ArgErr()) - } - - for c.NextBlock() { - switch c.Val() { - case "block": - args := c.RemainingArgs() - if len(args) > 1 { - return plugin.Error("pprof", c.ArgErr()) - } - h.rateBloc = 1 - if len(args) > 0 { - t, err := strconv.Atoi(args[0]) - if err != nil { - return plugin.Error("pprof", c.Errf("property '%s' invalid integer value '%v'", "block", args[0])) - } - h.rateBloc = t - } - default: - return plugin.Error("pprof", c.Errf("unknown property '%s'", c.Val())) - } - } - } - - c.OnStartup(h.Startup) - c.OnShutdown(h.Shutdown) - return nil -} diff --git a/plugin/pprof/setup_test.go b/plugin/pprof/setup_test.go deleted file mode 100644 index 0c48a59f83..0000000000 --- a/plugin/pprof/setup_test.go +++ /dev/null @@ -1,50 +0,0 @@ -package pprof - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestPProf(t *testing.T) { - tests := []struct { - input string - shouldErr bool - }{ - {`pprof`, false}, - {`pprof 1.2.3.4:1234`, false}, - {`pprof :1234`, false}, - {`pprof :1234 -1`, true}, - {`pprof { - }`, false}, - {`pprof /foo`, true}, - {`pprof { - a b - }`, true}, - {`pprof { block - }`, false}, - {`pprof :1234 { - block 20 - }`, false}, - {`pprof { - block 20 30 - }`, true}, - {`pprof { - block invalid - }`, true}, - {`pprof { - unknown_property - }`, true}, - {`pprof - pprof`, true}, - } - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - if test.shouldErr && err == nil { - t.Errorf("Test %v: Expected error but found nil", i) - } else if !test.shouldErr && err != nil { - t.Errorf("Test %v: Expected no error but found error: %v", i, err) - } - } -} diff --git a/plugin/quic/README.md b/plugin/quic/README.md deleted file mode 100644 index 63fe56d120..0000000000 --- a/plugin/quic/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# quic - -## Name - -*quic* - configures DNS-over-QUIC (DoQ) server options. - -## Description - -The *quic* plugin allows you to configure parameters for the DNS-over-QUIC (DoQ) server to fine-tune the security posture and performance of the server. - -This plugin can only be used once per quic Server Block. - -## Syntax - -```txt -quic { - max_streams POSITIVE_INTEGER - worker_pool_size POSITIVE_INTEGER -} -``` - -* `max_streams` limits the number of concurrent QUIC streams per connection. This helps prevent DoS attacks where an attacker could open many streams on a single connection, exhausting server resources. The default value is 256 if not specified. -* `worker_pool_size` defines the size of the worker pool for processing QUIC streams across all connections. The default value is 512 if not specified. This limits the total number of concurrent streams that can be processed across all connections. - -## Examples - -Enable DNS-over-QUIC with default settings (256 concurrent streams per connection, 512 worker pool size): - -``` -quic://.:8853 { - tls cert.pem key.pem - quic - whoami -} -``` - -Set custom limits for maximum QUIC streams per connection and worker pool size: - -``` -quic://.:8853 { - tls cert.pem key.pem - quic { - max_streams 16 - worker_pool_size 65536 - } - whoami -} -``` diff --git a/plugin/quic/setup.go b/plugin/quic/setup.go deleted file mode 100644 index 4c49101fd4..0000000000 --- a/plugin/quic/setup.go +++ /dev/null @@ -1,79 +0,0 @@ -package quic - -import ( - "strconv" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { - caddy.RegisterPlugin("quic", caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} - -func setup(c *caddy.Controller) error { - err := parseQuic(c) - if err != nil { - return plugin.Error("quic", err) - } - return nil -} - -func parseQuic(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - - // Skip the "quic" directive itself - c.Next() - - // Get any arguments on the "quic" line - args := c.RemainingArgs() - if len(args) > 0 { - return c.ArgErr() - } - - // Process all nested directives in the block - for c.NextBlock() { - switch c.Val() { - case "max_streams": - args := c.RemainingArgs() - if len(args) != 1 { - return c.ArgErr() - } - val, err := strconv.Atoi(args[0]) - if err != nil { - return c.Errf("invalid max_streams value '%s': %v", args[0], err) - } - if val <= 0 { - return c.Errf("max_streams must be a positive integer: %d", val) - } - if config.MaxQUICStreams != nil { - return c.Err("max_streams already defined for this server block") - } - config.MaxQUICStreams = &val - case "worker_pool_size": - args := c.RemainingArgs() - if len(args) != 1 { - return c.ArgErr() - } - val, err := strconv.Atoi(args[0]) - if err != nil { - return c.Errf("invalid worker_pool_size value '%s': %v", args[0], err) - } - if val <= 0 { - return c.Errf("worker_pool_size must be a positive integer: %d", val) - } - if config.MaxQUICWorkerPoolSize != nil { - return c.Err("worker_pool_size already defined for this server block") - } - config.MaxQUICWorkerPoolSize = &val - default: - return c.Errf("unknown property '%s'", c.Val()) - } - } - - return nil -} diff --git a/plugin/quic/setup_test.go b/plugin/quic/setup_test.go deleted file mode 100644 index 11d6dd4bab..0000000000 --- a/plugin/quic/setup_test.go +++ /dev/null @@ -1,244 +0,0 @@ -package quic - -import ( - "fmt" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestQuicSetup(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedMaxStreams *int - expectedWorkerPoolSize *int - expectedErrContent string - }{ - // Valid configurations - { - input: `quic`, - shouldErr: false, - expectedMaxStreams: nil, - expectedWorkerPoolSize: nil, - }, - { - input: `quic { - }`, - shouldErr: false, - expectedMaxStreams: nil, - expectedWorkerPoolSize: nil, - }, - { - input: `quic { - max_streams 100 - }`, - shouldErr: false, - expectedMaxStreams: pint(100), - expectedWorkerPoolSize: nil, - }, - { - input: `quic { - worker_pool_size 1000 - }`, - shouldErr: false, - expectedMaxStreams: nil, - expectedWorkerPoolSize: pint(1000), - }, - { - input: `quic { - max_streams 100 - worker_pool_size 1000 - }`, - shouldErr: false, - expectedMaxStreams: pint(100), - expectedWorkerPoolSize: pint(1000), - }, - { - input: `quic { - # Comment - }`, - shouldErr: false, - expectedMaxStreams: nil, - expectedWorkerPoolSize: nil, - }, - // Invalid configurations - { - input: `quic arg`, - shouldErr: true, - expectedErrContent: "Wrong argument count", - }, - { - input: `quic { - max_streams - }`, - shouldErr: true, - expectedErrContent: "Wrong argument count", - }, - { - input: `quic { - max_streams abc - }`, - shouldErr: true, - expectedErrContent: "invalid max_streams value", - }, - { - input: `quic { - max_streams 0 - }`, - shouldErr: true, - expectedErrContent: "positive integer", - }, - { - input: `quic { - max_streams -10 - }`, - shouldErr: true, - expectedErrContent: "positive integer", - }, - { - input: `quic { - worker_pool_size - }`, - shouldErr: true, - expectedErrContent: "Wrong argument count", - }, - { - input: `quic { - worker_pool_size abc - }`, - shouldErr: true, - expectedErrContent: "invalid worker_pool_size value", - }, - { - input: `quic { - worker_pool_size 0 - }`, - shouldErr: true, - expectedErrContent: "positive integer", - }, - { - input: `quic { - worker_pool_size -10 - }`, - shouldErr: true, - expectedErrContent: "positive integer", - }, - { - input: `quic { - max_streams 100 - max_streams 200 - }`, - shouldErr: true, - expectedErrContent: "already defined", - expectedMaxStreams: pint(100), - }, - { - input: `quic { - worker_pool_size 1000 - worker_pool_size 2000 - }`, - shouldErr: true, - expectedErrContent: "already defined", - expectedWorkerPoolSize: pint(1000), - }, - { - input: `quic { - unknown_directive - }`, - shouldErr: true, - expectedErrContent: "unknown property", - }, - { - input: `quic { - max_streams 100 200 - }`, - shouldErr: true, - expectedErrContent: "Wrong argument count", - }, - { - input: `quic { - worker_pool_size 1000 2000 - }`, - shouldErr: true, - expectedErrContent: "Wrong argument count", - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d (%s): Expected error but found none", i, test.input) - continue - } - if !test.shouldErr && err != nil { - t.Errorf("Test %d (%s): Expected no error but found: %v", i, test.input, err) - continue - } - - if test.shouldErr && !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d (%s): Expected error containing '%s', but got: %v", - i, test.input, test.expectedErrContent, err) - continue - } - - if !test.shouldErr || (test.shouldErr && strings.Contains(test.expectedErrContent, "already defined")) { - config := dnsserver.GetConfig(c) - assertMaxStreamsValue(t, i, test.input, config.MaxQUICStreams, test.expectedMaxStreams) - assertWorkerPoolSizeValue(t, i, test.input, config.MaxQUICWorkerPoolSize, test.expectedWorkerPoolSize) - } - } -} - -// assertMaxStreamsValue compares the actual MaxQUICStreams value with the expected one -func assertMaxStreamsValue(t *testing.T, testIndex int, testInput string, actual, expected *int) { - t.Helper() - if actual == nil && expected == nil { - return - } - - if (actual == nil) != (expected == nil) { - t.Errorf("Test %d (%s): Expected MaxQUICStreams to be %v, but got %v", - testIndex, testInput, formatNilableInt(expected), formatNilableInt(actual)) - return - } - - if *actual != *expected { - t.Errorf("Test %d (%s): Expected MaxQUICStreams to be %d, but got %d", - testIndex, testInput, *expected, *actual) - } -} - -// assertWorkerPoolSizeValue compares the actual MaxQUICWorkerPoolSize value with the expected one -func assertWorkerPoolSizeValue(t *testing.T, testIndex int, testInput string, actual, expected *int) { - t.Helper() - if actual == nil && expected == nil { - return - } - - if (actual == nil) != (expected == nil) { - t.Errorf("Test %d (%s): Expected MaxQUICWorkerPoolSize to be %v, but got %v", - testIndex, testInput, formatNilableInt(expected), formatNilableInt(actual)) - return - } - - if *actual != *expected { - t.Errorf("Test %d (%s): Expected MaxQUICWorkerPoolSize to be %d, but got %d", - testIndex, testInput, *expected, *actual) - } -} - -func formatNilableInt(v *int) string { - if v == nil { - return "nil" - } - return fmt.Sprintf("%d", *v) -} - -func pint(i int) *int { - return &i -} diff --git a/plugin/rewrite/README.md b/plugin/rewrite/README.md deleted file mode 100644 index f5e4c0332f..0000000000 --- a/plugin/rewrite/README.md +++ /dev/null @@ -1,546 +0,0 @@ -# rewrite - -## Name - -*rewrite* - performs internal message rewriting. - -## Description - -Rewrites are invisible to the client. There are simple rewrites (fast) and complex rewrites -(slower), but they're powerful enough to accommodate most dynamic back-end applications. - -## Syntax - -A simplified/easy-to-digest syntax for *rewrite* is... -~~~ -rewrite [continue|stop] FIELD [TYPE] [(FROM TO)|TTL] [OPTIONS] -~~~ - -* **FIELD** indicates what part of the request/response is being re-written. - - * `type` - the type field of the request will be rewritten. FROM/TO must be a DNS record type (`A`, `MX`, etc.); -e.g., to rewrite ANY queries to HINFO, use `rewrite type ANY HINFO`. - * `name` - the query name in the _request_ is rewritten; by default this is a full match of the - name, e.g., `rewrite name example.net example.org`. Other match types are supported, see the **Name Field Rewrites** section below. - * `class` - the class of the message will be rewritten. FROM/TO must be a DNS class type (`IN`, `CH`, or `HS`); e.g., to rewrite CH queries to IN use `rewrite class CH IN`. - * `edns0` - an EDNS0 option can be appended to the request as described below in the **EDNS0 Options** section. - * `ttl` - the TTL value in the _response_ is rewritten. - * `cname` - the CNAME target if the response has a CNAME record - * `rcode` - the response code (RCODE) value in the _response_ is rewritten. - -* **TYPE** this optional element can be specified for a `name` or `ttl` field. - If not given type `exact` will be assumed. If options should be specified the - type must be given. -* **FROM** is the name (exact, suffix, prefix, substring, or regex) or type to match -* **TO** is the destination name or type to rewrite to -* **TTL** is the number of seconds to set the TTL value to (only for field `ttl`) - -* **OPTIONS** - - for field `name` further options are possible controlling the response rewrites. - All name matching types support the following options - - * `answer auto` - the names in the _response_ is rewritten in a best effort manner. - * `answer name FROM TO` - the query name in the _response_ is rewritten matching the from regex pattern. - * `answer value FROM TO` - the names in the _response_ is rewritten matching the from regex pattern. - - See below in the **Response Rewrites** section for further details. - -If you specify multiple rules and an incoming query matches multiple rules, the rewrite -will behave as follows: - - * `continue` will continue applying the next rule in the rule list. - * `stop` will consider the current rule the last rule and will not continue. The default behaviour is `stop` - * When multiple rules are matched, the request rewrite follows the line order in the configuration, while the response rewrite(`answer` option) is executed in reverse order. - -## Examples - -### Name Field Rewrites - -The `rewrite` plugin offers the ability to match the name in the question section of -a DNS request. The match could be exact, a substring match, or based on a prefix, suffix, or regular -expression. If the newly used name is not a legal domain name, the plugin returns an error to the -client. - -The syntax for name rewriting is as follows: - -``` -rewrite [continue|stop] name [exact|prefix|suffix|substring|regex] STRING STRING [OPTIONS] -``` - -The match type, e.g., `exact`, `substring`, etc., triggers rewrite: - -* **exact** (default): on an exact match of the name in the question section of a request -* **substring**: on a partial match of the name in the question section of a request -* **prefix**: when the name begins with the matching string -* **suffix**: when the name ends with the matching string -* **regex**: when the name in the question section of a request matches a regular expression - -If the match type is omitted, the `exact` match type is assumed. If OPTIONS are -given, the type must be specified. - -The following instruction allows rewriting names in the query that -contain the substring `service.us-west-1.example.org`: - -``` -rewrite name substring service.us-west-1.example.org service.us-west-1.consul -``` - -Thus: - -* Incoming Request Name: `ftp.service.us-west-1.example.org` -* Rewritten Request Name: `ftp.service.us-west-1.consul` - -The following instruction uses regular expressions. Names in requests -matching the regular expression `(.*)-(us-west-1)\.example\.org` are replaced with -`{1}.service.{2}.consul`, where `{1}` and `{2}` are regular expression match groups. - -``` -rewrite name regex (.*)-(us-west-1)\.example\.org {1}.service.{2}.consul -``` - -Thus: - -* Incoming Request Name: `ftp-us-west-1.example.org` -* Rewritten Request Name: `ftp.service.us-west-1.consul` - -The following example rewrites the `schmoogle.com` suffix to `google.com`. - -~~~ -rewrite name suffix .schmoogle.com. .google.com. -~~~ - -### Response Rewrites - -When rewriting incoming DNS requests' names (field `name`), CoreDNS re-writes -the `QUESTION SECTION` -section of the requests. It may be necessary to rewrite the `ANSWER SECTION` of the -requests, because some DNS resolvers treat mismatches between the `QUESTION SECTION` -and `ANSWER SECTION` as a man-in-the-middle attack (MITM). - -For example, a user tries to resolve `ftp-us-west-1.coredns.rocks`. The -CoreDNS configuration file has the following rule: - -``` -rewrite name regex (.*)-(us-west-1)\.coredns\.rocks {1}.service.{2}.consul -``` - -CoreDNS rewrote the request from `ftp-us-west-1.coredns.rocks` to -`ftp.service.us-west-1.consul` and ultimately resolved it to 3 records. -The resolved records, in the `ANSWER SECTION` below, were not from `coredns.rocks`, but -rather from `service.us-west-1.consul`. - - -``` -$ dig @10.1.1.1 ftp-us-west-1.coredns.rocks - -;; QUESTION SECTION: -;ftp-us-west-1.coredns.rocks. IN A - -;; ANSWER SECTION: -ftp.service.us-west-1.consul. 0 IN A 10.10.10.10 -ftp.service.us-west-1.consul. 0 IN A 10.20.20.20 -ftp.service.us-west-1.consul. 0 IN A 10.30.30.30 -``` - -The above is a mismatch between the question asked and the answer provided. - -There are three possibilities to specify an answer rewrite: -- A rewrite can request a best effort answer rewrite by adding the option `answer auto`. -- A rewrite may specify a dedicated regex based response name rewrite with the - `answer name FROM TO` option. -- A regex based rewrite of record values like `CNAME`, `SRV`, etc, can be requested by - an `answer value FROM TO` option. - -Hereby FROM/TO follow the rules for the `regex` name rewrite syntax. - -#### Auto Response Name Rewrite - -The following configuration snippet allows for rewriting of the -`ANSWER SECTION` according to the rewrite of the `QUESTION SECTION`: - -``` - rewrite stop { - name suffix .coredns.rocks .service.consul answer auto - } -``` - -Any occurrence of the rewritten question in the answer is mapped -back to the original value before the rewrite. - -Please note that answers for rewrites of type `exact` are always rewritten. -For a `suffix` name rule `auto` leads to a reverse suffix response rewrite, -exchanging FROM and TO from the rewrite request. - -#### Explicit Response Name Rewrite - -The following configuration snippet allows for rewriting of the -`ANSWER SECTION`, provided that the `QUESTION SECTION` was rewritten: - -``` - rewrite stop { - name regex (.*)-(us-west-1)\.coredns\.rocks {1}.service.{2}.consul - answer name (.*)\.service\.(us-west-1)\.consul {1}-{2}.coredns.rocks - } -``` - -Now, the `ANSWER SECTION` matches the `QUESTION SECTION`: - -``` -$ dig @10.1.1.1 ftp-us-west-1.coredns.rocks - -;; QUESTION SECTION: -;ftp-us-west-1.coredns.rocks. IN A - -;; ANSWER SECTION: -ftp-us-west-1.coredns.rocks. 0 IN A 10.10.10.10 -ftp-us-west-1.coredns.rocks. 0 IN A 10.20.20.20 -ftp-us-west-1.coredns.rocks. 0 IN A 10.30.30.30 -``` - -#### Rewriting other Response Values - -It is also possible to rewrite other values returned in the DNS response records -(e.g. the server names returned in `SRV` and `MX` records). This can be enabled by adding -the `answer value FROM TO` option to a name rule as specified below. `answer value` takes a -regular expression and a rewrite name as parameters and works in the same way as the -`answer name` rule. - -Note that names in the `AUTHORITY SECTION` and `ADDITIONAL SECTION` will also be -rewritten following the specified rules. The names returned by the following -record types: `CNAME`, `DNAME`, `SOA`, `SRV`, `MX`, `NAPTR`, `NS`, `PTR` will be rewritten -if the `answer value` rule is specified. - -The syntax for the rewrite of DNS request and response is as follows: - -``` -rewrite [continue|stop] { - name regex STRING STRING - answer name STRING STRING - [answer value STRING STRING] -} -``` - -Note that the above syntax is strict. For response rewrites, only `name` -rules are allowed to match the question section. The answer rewrite must be -after the name, as in the syntax example. - -##### Example: PTR Response Value Rewrite - -The original response contains the domain `service.consul.` in the `VALUE` part -of the `ANSWER SECTION` - -``` -$ dig @10.1.1.1 30.30.30.10.in-addr.arpa PTR - -;; QUESTION SECTION: -;30.30.30.10.in-addr.arpa. IN PTR - -;; ANSWER SECTION: -30.30.30.10.in-addr.arpa. 60 IN PTR ftp-us-west-1.service.consul. -``` - -The following configuration snippet allows for rewriting of the value -in the `ANSWER SECTION`: - -``` - rewrite stop { - name suffix .arpa .arpa - answer name auto - answer value (.*)\.service\.consul\. {1}.coredns.rocks. - } -``` - -Now, the `VALUE` in the `ANSWER SECTION` has been overwritten in the domain part: - -``` -$ dig @10.1.1.1 30.30.30.10.in-addr.arpa PTR - -;; QUESTION SECTION: -;30.30.30.10.in-addr.arpa. IN PTR - -;; ANSWER SECTION: -30.30.30.10.in-addr.arpa. 60 IN PTR ftp-us-west-1.coredns.rocks. -``` - -#### Multiple Response Rewrites - -`name` and `value` rewrites can be chained by appending multiple answer rewrite -options. For all occurrences but the first one the keyword `answer` might be -omitted. - -```options -answer (auto | (name|value FROM TO)) { [answer] (auto | (name|value FROM TO)) } -``` - -For example: -``` -rewrite [continue|stop] name regex FROM TO answer name FROM TO [answer] value FROM TO -``` - -When using `exact` name rewrite rules, the answer gets rewritten automatically, -and there is no need to define `answer name auto`. But it is still possible to define -additional `answer value` and `answer value` options. - -The rule below rewrites the name in a request from `RED` to `BLUE`, and subsequently -rewrites the name in a corresponding response from `BLUE` to `RED`. The -client in the request would see only `RED` and no `BLUE`. - -``` -rewrite [continue|stop] name exact RED BLUE -``` - -### TTL Field Rewrites - -At times, the need to rewrite a TTL value could arise. For example, a DNS server -may not cache records with a TTL of zero (`0`). An administrator -may want to increase the TTL to ensure it is cached, e.g., by increasing it to 15 seconds. - -In the below example, the TTL in the answers for `coredns.rocks` domain are -being set to `15`: - -``` - rewrite continue { - ttl regex (.*)\.coredns\.rocks 15 - } -``` - -By the same token, an administrator may use this feature to prevent or limit caching by -setting the TTL value really low. - - -The syntax for the TTL rewrite rule is as follows. The meaning of -`exact|prefix|suffix|substring|regex` is the same as with the name rewrite rules. -An omitted type is defaulted to `exact`. - -``` -rewrite [continue|stop] ttl [exact|prefix|suffix|substring|regex] STRING [SECONDS|MIN-MAX] -``` - -It is possible to supply a range of TTL values in the `SECONDS` parameters instead of a single value. -If a range is supplied, the TTL value is set to `MIN` if it is below, or set to `MAX` if it is above. -The TTL value is left unchanged if it is already inside the provided range. -The ranges can be unbounded on either side. - -TTL examples with ranges: -``` -# rewrite TTL to be between 30s and 300s -rewrite ttl example.com. 30-300 - -# cap TTL at 30s -rewrite ttl example.com. -30 # equivalent to rewrite ttl example.com. 0-30 - -# increase TTL to a minimum of 30s -rewrite ttl example.com. 30- - -# set TTL to 30s -rewrite ttl example.com. 30 # equivalent to rewrite ttl example.com. 30-30 -``` - -### RCODE Field Rewrites - -At times, the need to rewrite a RCODE value could arise. For example, a DNS server -may respond with a SERVFAIL instead of NOERROR records when AAAA records are requested. - -In the below example, the rcode value the answer for `coredns.rocks` the replies with SERVFAIL -is being switched to NOERROR. - -This example rewrites all the *.coredns.rocks domain SERVFAIL errors to NOERROR -``` - rewrite continue { - rcode regex (.*)\.coredns\.rocks SERVFAIL NOERROR - } -``` - -The same result numeric values: -``` - rewrite continue { - rcode regex (.*)\.coredns\.rocks 2 0 - } -``` - -The syntax for the RCODE rewrite rule is as follows. The meaning of -`exact|prefix|suffix|substring|regex` is the same as with the name rewrite rules. -An omitted type is defaulted to `exact`. - -``` -rewrite [continue|stop] rcode [exact|prefix|suffix|substring|regex] STRING FROM TO -``` - -The values of FROM and TO can be any of the following, text value or numeric: - -``` - 0 NOERROR - 1 FORMERR - 2 SERVFAIL - 3 NXDOMAIN - 4 NOTIMP - 5 REFUSED - 6 YXDOMAIN - 7 YXRRSET - 8 NXRRSET - 9 NOTAUTH - 10 NOTZONE - 16 BADSIG - 17 BADKEY - 18 BADTIME - 19 BADMODE - 20 BADNAME - 21 BADALG - 22 BADTRUNC - 23 BADCOOKIE -``` - - -## EDNS0 Options - -Using the FIELD edns0, you can set, append, replace, or unset specific EDNS0 options in the request. - -* `replace` will modify any "matching" option with the specified option. The criteria for "matching" varies based on EDNS0 type. -* `append` will add the option only if no matching option exists -* `set` will modify a matching option or add one if none is found -* `unset` will remove the matching option if one exists - -Currently supported are `EDNS0_LOCAL`, `EDNS0_NSID` and `EDNS0_SUBNET`. - -### EDNS0_LOCAL - -This has two fields, code and data. A match is defined as having the same code. Data may be a string or a variable. - -* A string data is treated as hex if it starts with `0x`. Example: - -~~~ corefile -. { - rewrite edns0 local set 0xffee 0x61626364 - whoami -} -~~~ - -rewrites the first local option with code 0xffee, setting the data to "abcd". This is equivalent to: - -~~~ corefile -. { - rewrite edns0 local set 0xffee abcd -} -~~~ - -* A variable data is specified with a pair of curly brackets `{}`. Following are the supported variables: - {qname}, {qtype}, {client_ip}, {client_port}, {protocol}, {server_ip}, {server_port}. - -* If the metadata plugin is enabled, then labels are supported as variables if they are presented within curly brackets. -The variable data will be replaced with the value associated with that label. If that label is not provided, -the variable will be silently substituted with an empty string. - -Examples: - -~~~ -rewrite edns0 local set 0xffee {client_ip} -~~~ - -The following example uses metadata and an imaginary "some-plugin" that would provide "some-label" as metadata information. - -~~~ -metadata -some-plugin -rewrite edns0 local set 0xffee {some-plugin/some-label} -~~~ - -A local option may be removed by unsetting its code. Example: - -~~~ -rewrite edns0 local unset 0xffee -~~~ - -### EDNS0_NSID - -This has no fields; it will add an NSID option with an empty string for the NSID. If the option already exists -and the action is `replace` or `set`, then the NSID in the option will be set to the empty string. -The option can be removed with the `unset` action. - -### EDNS0_SUBNET - -This has two fields, IPv4 bitmask length and IPv6 bitmask length. The bitmask -length is used to extract the client subnet from the source IP address in the query. - -Example: - -~~~ -rewrite edns0 subnet set 24 56 -~~~ - -* If the query's source IP address is an IPv4 address, the first 24 bits in the IP will be the network subnet. -* If the query's source IP address is an IPv6 address, the first 56 bits in the IP will be the network subnet. - -This option can be removed by using `unset`: - -~~~ -rewrite edns0 subnet unset -~~~ - -### EDNS0 Revert - -Using the `revert` flag, you can revert the changes made by this rewrite call, so the response will not contain this option. - -This example sets option, but response will not contain it -~~~ corefile -. { - rewrite edns0 local set 0xffee abcd revert -} -~~~ - -If only some calls contain the `revert` flag, then the value in the response will be changed to the previous one. So, in this example, the response will contain `abcd` data at `0xffee` -~~~ corefile -. { - rewrite continue { - edns0 local set 0xffee abcd - } - - rewrite edns0 local replace 0xffee bcde revert -} -~~~ - - -## CNAME Field Rewrites - -There might be a scenario where you want the `CNAME` target of the response to be rewritten. You can do this by using the `CNAME` field rewrite. This will generate new answer records according to the new `CNAME` target. - -The syntax for the CNAME rewrite rule is as follows. The meaning of -`exact|prefix|suffix|substring|regex` is the same as with the name rewrite rules. -An omitted type is defaulted to `exact`. - -``` -rewrite [continue|stop] cname [exact|prefix|suffix|substring|regex] FROM TO -``` - -Consider the following `CNAME` rewrite rule with regex type. -``` -rewrite cname regex (.*).cdn.example.net. {1}.other.cdn.com. -``` - -If you were to send the following DNS request without the above rule, an example response would be: - -``` -$ dig @10.1.1.1 my-app.com - -;; QUESTION SECTION: -;my-app.com. IN A - -;; ANSWER SECTION: -my-app.com. 200 IN CNAME my-app.com.cdn.example.net. -my-app.com.cdn.example.net. 300 IN A 20.2.0.1 -my-app.com.cdn.example.net. 300 IN A 20.2.0.2 -``` - -If you were to send the same DNS request with the above rule set up, an example response would be: - -``` -$ dig @10.1.1.1 my-app.com - -;; QUESTION SECTION: -;my-app.com. IN A - -;; ANSWER SECTION: -my-app.com. 200 IN CNAME my-app.com.other.cdn.com. -my-app.com.other.cdn.com. 100 IN A 30.3.1.2 -``` -Note that the answer will contain a completely different set of answer records after rewriting the `CNAME` target. diff --git a/plugin/rewrite/class.go b/plugin/rewrite/class.go deleted file mode 100644 index 243a864499..0000000000 --- a/plugin/rewrite/class.go +++ /dev/null @@ -1,44 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "strings" - - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -type classRule struct { - fromClass uint16 - toClass uint16 - NextAction string -} - -// newClassRule creates a class matching rule -func newClassRule(nextAction string, args ...string) (Rule, error) { - var from, to uint16 - var ok bool - if from, ok = dns.StringToClass[strings.ToUpper(args[0])]; !ok { - return nil, fmt.Errorf("invalid class %q", strings.ToUpper(args[0])) - } - if to, ok = dns.StringToClass[strings.ToUpper(args[1])]; !ok { - return nil, fmt.Errorf("invalid class %q", strings.ToUpper(args[1])) - } - return &classRule{from, to, nextAction}, nil -} - -// Rewrite rewrites the current request. -func (rule *classRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if rule.fromClass > 0 && rule.toClass > 0 { - if state.Req.Question[0].Qclass == rule.fromClass { - state.Req.Question[0].Qclass = rule.toClass - return nil, RewriteDone - } - } - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (rule *classRule) Mode() string { return rule.NextAction } diff --git a/plugin/rewrite/cname_target.go b/plugin/rewrite/cname_target.go deleted file mode 100644 index 561c534913..0000000000 --- a/plugin/rewrite/cname_target.go +++ /dev/null @@ -1,162 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// UpstreamInt wraps the Upstream API for dependency injection during testing -type UpstreamInt interface { - Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) -} - -// cnameTargetRule is cname target rewrite rule. -type cnameTargetRule struct { - rewriteType string - paramFromTarget string - paramToTarget string - nextAction string - Upstream UpstreamInt // Upstream for looking up external names during the resolution process. -} - -// cnameTargetRuleWithReqState is cname target rewrite rule state -type cnameTargetRuleWithReqState struct { - rule cnameTargetRule - state request.Request - ctx context.Context -} - -func (r *cnameTargetRule) getFromAndToTarget(inputCName string) (from string, to string) { - switch r.rewriteType { - case ExactMatch: - return r.paramFromTarget, r.paramToTarget - case PrefixMatch: - if after, ok := strings.CutPrefix(inputCName, r.paramFromTarget); ok { - return inputCName, r.paramToTarget + after - } - case SuffixMatch: - if strings.HasSuffix(inputCName, r.paramFromTarget) { - return inputCName, strings.TrimSuffix(inputCName, r.paramFromTarget) + r.paramToTarget - } - case SubstringMatch: - if strings.Contains(inputCName, r.paramFromTarget) { - return inputCName, strings.ReplaceAll(inputCName, r.paramFromTarget, r.paramToTarget) - } - case RegexMatch: - pattern := regexp.MustCompile(r.paramFromTarget) - regexGroups := pattern.FindStringSubmatch(inputCName) - if len(regexGroups) == 0 { - return "", "" - } - substitution := r.paramToTarget - for groupIndex, groupValue := range regexGroups { - groupIndexStr := "{" + strconv.Itoa(groupIndex) + "}" - substitution = strings.ReplaceAll(substitution, groupIndexStr, groupValue) - } - return inputCName, substitution - } - return "", "" -} - -func (r *cnameTargetRuleWithReqState) RewriteResponse(res *dns.Msg, rr dns.RR) { - // logic to rewrite the cname target of dns response - switch rr.Header().Rrtype { - case dns.TypeCNAME: - // rename the target of the cname response - if cname, ok := rr.(*dns.CNAME); ok { - fromTarget, toTarget := r.rule.getFromAndToTarget(cname.Target) - if cname.Target == fromTarget { - // create upstream request with the new target with the same qtype - r.state.Req.Question[0].Name = toTarget - // upRes can be nil if the internal query path didn't write a response - // (e.g. a plugin returned a success rcode without writing, dropped the query, - // or the context was canceled). Guard upRes before dereferencing. - upRes, err := r.rule.Upstream.Lookup(r.ctx, r.state, toTarget, r.state.Req.Question[0].Qtype) - if err != nil { - log.Errorf("upstream lookup failed: %v", err) - return - } - if upRes == nil { - log.Errorf("upstream lookup returned nil") - return - } - - var newAnswer []dns.RR - // iterate over first upstram response - // add the cname record to the new answer - for _, rr := range res.Answer { - if cname, ok := rr.(*dns.CNAME); ok { - // change the target name in the response - cname.Target = toTarget - newAnswer = append(newAnswer, rr) - } - } - // iterate over upstream response received - for _, rr := range upRes.Answer { - if rr.Header().Name == toTarget { - newAnswer = append(newAnswer, rr) - } - } - res.Answer = newAnswer - // if not propagated, the truncated response might get cached, - // and it will be impossible to resolve the full response - res.Truncated = upRes.Truncated - } - } - } -} - -func newCNAMERule(nextAction string, args ...string) (Rule, error) { - var rewriteType string - var paramFromTarget, paramToTarget string - if len(args) == 3 { - rewriteType = (strings.ToLower(args[0])) - switch rewriteType { - case ExactMatch: - case PrefixMatch: - case SuffixMatch: - case SubstringMatch: - case RegexMatch: - default: - return nil, fmt.Errorf("unknown cname rewrite type: %s", rewriteType) - } - paramFromTarget, paramToTarget = strings.ToLower(args[1]), strings.ToLower(args[2]) - } else if len(args) == 2 { - rewriteType = ExactMatch - paramFromTarget, paramToTarget = strings.ToLower(args[0]), strings.ToLower(args[1]) - } else { - return nil, fmt.Errorf("too few (%d) arguments for a cname rule", len(args)) - } - rule := cnameTargetRule{ - rewriteType: rewriteType, - paramFromTarget: paramFromTarget, - paramToTarget: paramToTarget, - nextAction: nextAction, - Upstream: upstream.New(), - } - return &rule, nil -} - -// Rewrite rewrites the current request. -func (r *cnameTargetRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if r != nil && len(r.rewriteType) > 0 && len(r.paramFromTarget) > 0 && len(r.paramToTarget) > 0 { - return ResponseRules{&cnameTargetRuleWithReqState{ - rule: *r, - state: state, - ctx: ctx, - }}, RewriteDone - } - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (r *cnameTargetRule) Mode() string { return r.nextAction } diff --git a/plugin/rewrite/cname_target_test.go b/plugin/rewrite/cname_target_test.go deleted file mode 100644 index 0bbc8a49f4..0000000000 --- a/plugin/rewrite/cname_target_test.go +++ /dev/null @@ -1,265 +0,0 @@ -package rewrite - -import ( - "context" - "errors" - "reflect" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -type MockedUpstream struct{} - -func (u *MockedUpstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) { - m := new(dns.Msg) - m.SetReply(state.Req) - m.Authoritative = true - switch state.Req.Question[0].Name { - case "xyz.example.com.": - switch state.Req.Question[0].Qtype { - case dns.TypeA: - m.Answer = []dns.RR{ - test.A("xyz.example.com. 3600 IN A 3.4.5.6"), - } - case dns.TypeAAAA: - m.Answer = []dns.RR{ - test.AAAA("xyz.example.com. 3600 IN AAAA 3a01:7e00::f03c:91ff:fe79:234c"), - } - } - return m, nil - case "bard.google.com.cdn.cloudflare.net.": - m.Answer = []dns.RR{ - test.A("bard.google.com.cdn.cloudflare.net. 1800 IN A 9.7.2.1"), - } - return m, nil - case "www.hosting.xyz.": - m.Answer = []dns.RR{ - test.A("www.hosting.xyz. 500 IN A 20.30.40.50"), - } - return m, nil - case "abcd.zzzz.www.pqrst.": - m.Answer = []dns.RR{ - test.A("abcd.zzzz.www.pqrst. 120 IN A 101.20.5.1"), - test.A("abcd.zzzz.www.pqrst. 120 IN A 101.20.5.2"), - } - return m, nil - case "orders.webapp.eu.org.": - m.Answer = []dns.RR{ - test.A("orders.webapp.eu.org. 120 IN A 20.0.0.9"), - } - return m, nil - case "music.truncated.spotify.com.": - m.Answer = []dns.RR{ - test.A("music.truncated.spotify.com. 120 IN A 10.1.0.9"), - } - m.Truncated = true - return m, nil - } - return &dns.Msg{}, nil -} - -func TestCNameTargetRewrite(t *testing.T) { - rules := []Rule{} - ruleset := []struct { - args []string - expectedType reflect.Type - }{ - {[]string{"continue", "cname", "exact", "def.example.com.", "xyz.example.com."}, reflect.TypeOf(&cnameTargetRule{})}, - {[]string{"continue", "cname", "prefix", "chat.openai.com", "bard.google.com"}, reflect.TypeOf(&cnameTargetRule{})}, - {[]string{"continue", "cname", "suffix", "uvw.", "xyz."}, reflect.TypeOf(&cnameTargetRule{})}, - {[]string{"continue", "cname", "substring", "efgh", "zzzz.www"}, reflect.TypeOf(&cnameTargetRule{})}, - {[]string{"continue", "cname", "regex", `(.*)\.web\.(.*)\.site\.`, `{1}.webapp.{2}.org.`}, reflect.TypeOf(&cnameTargetRule{})}, - {[]string{"continue", "cname", "exact", "music.truncated.spotify.com.", "music.truncated.spotify.com."}, reflect.TypeOf(&cnameTargetRule{})}, - } - for i, r := range ruleset { - rule, err := newRule(r.args...) - if err != nil { - t.Fatalf("Rule %d: FAIL, %s: %s", i, r.args, err) - } - if reflect.TypeOf(rule) != r.expectedType { - t.Fatalf("Rule %d: FAIL, %s: rule type mismatch, expected %q, but got %q", i, r.args, r.expectedType, rule) - } - cnameTargetRule := rule.(*cnameTargetRule) - cnameTargetRule.Upstream = &MockedUpstream{} - rules = append(rules, rule) - } - doTestCNameTargetTests(t, rules) -} - -func doTestCNameTargetTests(t *testing.T, rules []Rule) { - t.Helper() - tests := []struct { - from string - fromType uint16 - answer []dns.RR - expectedAnswer []dns.RR - expectedTruncated bool - }{ - {"abc.example.com", dns.TypeA, - []dns.RR{ - test.CNAME("abc.example.com. 5 IN CNAME def.example.com."), - test.A("def.example.com. 5 IN A 1.2.3.4"), - }, - []dns.RR{ - test.CNAME("abc.example.com. 5 IN CNAME xyz.example.com."), - test.A("xyz.example.com. 3600 IN A 3.4.5.6"), - }, - false, - }, - {"abc.example.com", dns.TypeAAAA, - []dns.RR{ - test.CNAME("abc.example.com. 5 IN CNAME def.example.com."), - test.AAAA("def.example.com. 5 IN AAAA 2a01:7e00::f03c:91ff:fe79:234c"), - }, - []dns.RR{ - test.CNAME("abc.example.com. 5 IN CNAME xyz.example.com."), - test.AAAA("xyz.example.com. 3600 IN AAAA 3a01:7e00::f03c:91ff:fe79:234c"), - }, - false, - }, - {"chat.openai.com", dns.TypeA, - []dns.RR{ - test.CNAME("chat.openai.com. 20 IN CNAME chat.openai.com.cdn.cloudflare.net."), - test.A("chat.openai.com.cdn.cloudflare.net. 30 IN A 23.2.1.2"), - test.A("chat.openai.com.cdn.cloudflare.net. 30 IN A 24.6.0.8"), - }, - []dns.RR{ - test.CNAME("chat.openai.com. 20 IN CNAME bard.google.com.cdn.cloudflare.net."), - test.A("bard.google.com.cdn.cloudflare.net. 1800 IN A 9.7.2.1"), - }, - false, - }, - {"coredns.io", dns.TypeA, - []dns.RR{ - test.CNAME("coredns.io. 100 IN CNAME www.hosting.uvw."), - test.A("www.hosting.uvw. 200 IN A 7.2.3.4"), - }, - []dns.RR{ - test.CNAME("coredns.io. 100 IN CNAME www.hosting.xyz."), - test.A("www.hosting.xyz. 500 IN A 20.30.40.50"), - }, - false, - }, - {"core.dns.rocks", dns.TypeA, - []dns.RR{ - test.CNAME("core.dns.rocks. 200 IN CNAME abcd.efgh.pqrst."), - test.A("abcd.efgh.pqrst. 100 IN A 200.30.45.67"), - }, - []dns.RR{ - test.CNAME("core.dns.rocks. 200 IN CNAME abcd.zzzz.www.pqrst."), - test.A("abcd.zzzz.www.pqrst. 120 IN A 101.20.5.1"), - test.A("abcd.zzzz.www.pqrst. 120 IN A 101.20.5.2"), - }, - false, - }, - {"order.service.eu", dns.TypeA, - []dns.RR{ - test.CNAME("order.service.eu. 200 IN CNAME orders.web.eu.site."), - test.A("orders.web.eu.site. 50 IN A 10.10.15.1"), - }, - []dns.RR{ - test.CNAME("order.service.eu. 200 IN CNAME orders.webapp.eu.org."), - test.A("orders.webapp.eu.org. 120 IN A 20.0.0.9"), - }, - false, - }, - {"music.spotify.com", dns.TypeA, - []dns.RR{ - test.CNAME("music.spotify.com. 200 IN CNAME music.truncated.spotify.com."), - }, - []dns.RR{ - test.CNAME("music.spotify.com. 200 IN CNAME music.truncated.spotify.com."), - test.A("music.truncated.spotify.com. 120 IN A 10.1.0.9"), - }, - true, - }, - } - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromType) - m.Question[0].Qclass = dns.ClassINET - m.Answer = tc.answer - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - resp := rec.Msg - if len(resp.Answer) == 0 { - t.Errorf("Test %d: FAIL %s (%d) Expected valid response but received %q", i, tc.from, tc.fromType, resp) - continue - } - if !reflect.DeepEqual(resp.Answer, tc.expectedAnswer) { - t.Errorf("Test %d: FAIL %s (%d) Actual are expected answer does not match, actual: %v, expected: %v", - i, tc.from, tc.fromType, resp.Answer, tc.expectedAnswer) - continue - } - if resp.Truncated != tc.expectedTruncated { - t.Errorf("Test %d: FAIL %s (%d) Actual and expected truncated flag do not match, actual: %v, expected: %v", - i, tc.from, tc.fromType, resp.Truncated, tc.expectedTruncated) - } - } -} - -// nilUpstream returns a nil message to simulate an upstream failure path. -type nilUpstream struct{} - -func (f *nilUpstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) { - return nil, nil -} - -// errUpstream returns a nil message with an error to simulate an upstream failure path. -type errUpstream struct{} - -func (f *errUpstream) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) { - return nil, errors.New("upstream failure") -} - -func TestCNAMETargetRewrite_upstreamFailurePaths(t *testing.T) { - cases := []struct { - name string - upstream UpstreamInt - }{ - {name: "nil message, no error", upstream: &nilUpstream{}}, - {name: "nil message, with error", upstream: &errUpstream{}}, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - rule := cnameTargetRule{ - rewriteType: ExactMatch, - paramFromTarget: "bad.target.", - paramToTarget: "good.target.", - nextAction: Stop, - Upstream: tc.upstream, - } - - req := new(dns.Msg) - req.SetQuestion("bad.test.", dns.TypeA) - state := request.Request{Req: req} - - rrState := &cnameTargetRuleWithReqState{rule: rule, state: state, ctx: context.Background()} - - res := new(dns.Msg) - res.SetReply(req) - res.Answer = []dns.RR{&dns.CNAME{Hdr: dns.RR_Header{Name: "bad.test.", Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: 60}, Target: "bad.target."}} - - rr := &dns.CNAME{Hdr: dns.RR_Header{Name: "bad.test.", Rrtype: dns.TypeCNAME, Class: dns.ClassINET, Ttl: 60}, Target: "bad.target."} - - rrState.RewriteResponse(res, rr) - - finalTarget := res.Answer[0].(*dns.CNAME).Target - if finalTarget != "bad.target." { - t.Errorf("Expected answer to be %q, but got %q", "bad.target.", finalTarget) - } - }) - } -} diff --git a/plugin/rewrite/edns0.go b/plugin/rewrite/edns0.go deleted file mode 100644 index f4155fd4bb..0000000000 --- a/plugin/rewrite/edns0.go +++ /dev/null @@ -1,497 +0,0 @@ -// Package rewrite is a plugin for rewriting requests internally to something different. -package rewrite - -import ( - "context" - "encoding/hex" - "fmt" - "net" - "strconv" - "strings" - - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/pkg/edns" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// edns0LocalRule is a rewrite rule for EDNS0_LOCAL options. -type edns0LocalRule struct { - mode string - action string - code uint16 - data []byte - revert bool -} - -// edns0VariableRule is a rewrite rule for EDNS0_LOCAL options with variable. -type edns0VariableRule struct { - mode string - action string - code uint16 - variable string - revert bool -} - -// ends0NsidRule is a rewrite rule for EDNS0_NSID options. -type edns0NsidRule struct { - mode string - action string - revert bool -} - -type edns0SetResponseRule struct { - code uint16 -} - -func (r *edns0SetResponseRule) RewriteResponse(res *dns.Msg, _ dns.RR) { - ednsOpt := res.IsEdns0() - for idx, opt := range ednsOpt.Option { - if opt.Option() == r.code { - ednsOpt.Option = append(ednsOpt.Option[:idx], ednsOpt.Option[idx+1:]...) - return - } - } -} - -type edns0ReplaceResponseRule[T dns.EDNS0] struct { - code uint16 - source T -} - -func (r *edns0ReplaceResponseRule[T]) RewriteResponse(res *dns.Msg, _ dns.RR) { - ednsOpt := res.IsEdns0() - for idx, opt := range ednsOpt.Option { - if opt.Option() == r.code { - ednsOpt.Option[idx] = r.source - return - } - } -} - -// setupEdns0Opt will retrieve the EDNS0 OPT or create it if it does not exist. -func setupEdns0Opt(r *dns.Msg) *dns.OPT { - o := r.IsEdns0() - if o == nil { - r.SetEdns0(4096, false) - o = r.IsEdns0() - } - return o -} - -func unsetEdns0Option(opt *dns.OPT, code uint16) { - var newOpts []dns.EDNS0 - for _, o := range opt.Option { - if o.Option() != code { - newOpts = append(newOpts, o) - } - } - opt.Option = newOpts -} - -// Rewrite will alter the request EDNS0 NSID option -func (rule *edns0NsidRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - o := setupEdns0Opt(state.Req) - - if rule.action == Unset { - unsetEdns0Option(o, dns.EDNS0NSID) - return nil, RewriteDone - } - - var resp ResponseRules - - for _, s := range o.Option { - if e, ok := s.(*dns.EDNS0_NSID); ok { - if rule.action == Replace || rule.action == Set { - if rule.revert { - old := *e - resp = append(resp, &edns0ReplaceResponseRule[*dns.EDNS0_NSID]{code: e.Code, source: &old}) - } - e.Nsid = "" // make sure it is empty for request - return resp, RewriteDone - } - } - } - - // add option if not found - if rule.action == Append || rule.action == Set { - o.Option = append(o.Option, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}) - if rule.revert { - resp = append(resp, &edns0SetResponseRule{code: dns.EDNS0NSID}) - } - return resp, RewriteDone - } - - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (rule *edns0NsidRule) Mode() string { return rule.mode } - -// Rewrite will alter the request EDNS0 local options. -func (rule *edns0LocalRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - o := setupEdns0Opt(state.Req) - - if rule.action == Unset { - unsetEdns0Option(o, rule.code) - return nil, RewriteDone - } - - var resp ResponseRules - - for _, s := range o.Option { - if e, ok := s.(*dns.EDNS0_LOCAL); ok { - if rule.code == e.Code { - if rule.action == Replace || rule.action == Set { - if rule.revert { - old := *e - resp = append(resp, &edns0ReplaceResponseRule[*dns.EDNS0_LOCAL]{code: rule.code, source: &old}) - } - e.Data = rule.data - return resp, RewriteDone - } - } - } - } - - // add option if not found - if rule.action == Append || rule.action == Set { - o.Option = append(o.Option, &dns.EDNS0_LOCAL{Code: rule.code, Data: rule.data}) - if rule.revert { - resp = append(resp, &edns0SetResponseRule{code: rule.code}) - } - return resp, RewriteDone - } - - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (rule *edns0LocalRule) Mode() string { return rule.mode } - -// newEdns0Rule creates an EDNS0 rule of the appropriate type based on the args -func newEdns0Rule(mode string, args ...string) (Rule, error) { - if len(args) < 2 { - return nil, fmt.Errorf("too few arguments for an EDNS0 rule") - } - - ruleType := strings.ToLower(args[0]) - action := strings.ToLower(args[1]) - switch action { - case Append: - case Replace: - case Set: - case Unset: - return newEdns0UnsetRule(mode, action, ruleType, args...) - default: - return nil, fmt.Errorf("invalid action: %q", action) - } - - // Extract "revert" parameter. - var revert bool - if args[len(args)-1] == "revert" { - revert = true - args = args[:len(args)-1] - } - - switch ruleType { - case "local": - if len(args) != 4 { - return nil, fmt.Errorf("EDNS0 local rules require three or four args") - } - // Check for variable option. - if strings.HasPrefix(args[3], "{") && strings.HasSuffix(args[3], "}") { - return newEdns0VariableRule(mode, action, args[2], args[3], revert) - } - return newEdns0LocalRule(mode, action, args[2], args[3], revert) - case "nsid": - if len(args) != 2 { - return nil, fmt.Errorf("EDNS0 NSID rules can accept no more than one arg") - } - return &edns0NsidRule{mode: mode, action: action, revert: revert}, nil - case "subnet": - if len(args) != 4 { - return nil, fmt.Errorf("EDNS0 subnet rules require three or four args") - } - return newEdns0SubnetRule(mode, action, args[2], args[3], revert) - default: - return nil, fmt.Errorf("invalid rule type %q", ruleType) - } -} - -func newEdns0UnsetRule(mode string, action string, ruleType string, args ...string) (Rule, error) { - switch ruleType { - case "local": - if len(args) != 3 { - return nil, fmt.Errorf("local unset action requires exactly two arguments") - } - return newEdns0LocalRule(mode, action, args[2], "", false) - case "nsid": - if len(args) != 2 { - return nil, fmt.Errorf("nsid unset action requires exactly one argument") - } - return &edns0NsidRule{mode, action, false}, nil - case "subnet": - if len(args) != 2 { - return nil, fmt.Errorf("subnet unset action requires exactly one argument") - } - return &edns0SubnetRule{mode, 0, 0, action, false}, nil - default: - return nil, fmt.Errorf("invalid rule type %q", ruleType) - } -} - -func newEdns0LocalRule(mode, action, code, data string, revert bool) (*edns0LocalRule, error) { - c, err := strconv.ParseUint(code, 0, 16) - if err != nil { - return nil, err - } - - decoded := []byte(data) - if strings.HasPrefix(data, "0x") { - decoded, err = hex.DecodeString(data[2:]) - if err != nil { - return nil, err - } - } - - // Add this code to the ones the server supports. - edns.SetSupportedOption(uint16(c)) - - return &edns0LocalRule{mode: mode, action: action, code: uint16(c), data: decoded, revert: revert}, nil -} - -// newEdns0VariableRule creates an EDNS0 rule that handles variable substitution -func newEdns0VariableRule(mode, action, code, variable string, revert bool) (*edns0VariableRule, error) { - c, err := strconv.ParseUint(code, 0, 16) - if err != nil { - return nil, err - } - //Validate - if !isValidVariable(variable) { - return nil, fmt.Errorf("unsupported variable name %q", variable) - } - - // Add this code to the ones the server supports. - edns.SetSupportedOption(uint16(c)) - - return &edns0VariableRule{mode: mode, action: action, code: uint16(c), variable: variable, revert: revert}, nil -} - -// ruleData returns the data specified by the variable. -func (rule *edns0VariableRule) ruleData(ctx context.Context, state request.Request) ([]byte, error) { - switch rule.variable { - case queryName: - return []byte(state.QName()), nil - - case queryType: - return uint16ToWire(state.QType()), nil - - case clientIP: - return ipToWire(state.Family(), state.IP()) - - case serverIP: - return ipToWire(state.Family(), state.LocalIP()) - - case clientPort: - return portToWire(state.Port()) - - case serverPort: - return portToWire(state.LocalPort()) - - case protocol: - return []byte(state.Proto()), nil - } - - fetcher := metadata.ValueFunc(ctx, rule.variable[1:len(rule.variable)-1]) - if fetcher != nil { - value := fetcher() - if len(value) > 0 { - return []byte(value), nil - } - } - - return nil, fmt.Errorf("unable to extract data for variable %s", rule.variable) -} - -// Rewrite will alter the request EDNS0 local options with specified variables. -func (rule *edns0VariableRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - data, err := rule.ruleData(ctx, state) - if err != nil || data == nil { - return nil, RewriteIgnored - } - - var resp ResponseRules - - o := setupEdns0Opt(state.Req) - for _, s := range o.Option { - if e, ok := s.(*dns.EDNS0_LOCAL); ok { - if rule.code == e.Code { - if rule.action == Replace || rule.action == Set { - if rule.revert { - old := *e - resp = append(resp, &edns0ReplaceResponseRule[*dns.EDNS0_LOCAL]{code: rule.code, source: &old}) - } - e.Data = data - return resp, RewriteDone - } - return nil, RewriteIgnored - } - } - } - - // add option if not found - if rule.action == Append || rule.action == Set { - o.Option = append(o.Option, &dns.EDNS0_LOCAL{Code: rule.code, Data: data}) - if rule.revert { - resp = append(resp, &edns0SetResponseRule{code: rule.code}) - } - return resp, RewriteDone - } - - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (rule *edns0VariableRule) Mode() string { return rule.mode } - -func isValidVariable(variable string) bool { - switch variable { - case - queryName, - queryType, - clientIP, - clientPort, - protocol, - serverIP, - serverPort: - return true - } - // we cannot validate the labels of metadata - but we can verify it has the syntax of a label - if strings.HasPrefix(variable, "{") && strings.HasSuffix(variable, "}") && metadata.IsLabel(variable[1:len(variable)-1]) { - return true - } - return false -} - -// ends0SubnetRule is a rewrite rule for EDNS0 subnet options -type edns0SubnetRule struct { - mode string - v4BitMaskLen uint8 - v6BitMaskLen uint8 - action string - revert bool -} - -func newEdns0SubnetRule(mode, action, v4BitMaskLen, v6BitMaskLen string, revert bool) (*edns0SubnetRule, error) { - v4Len, err := strconv.ParseUint(v4BitMaskLen, 0, 16) - if err != nil { - return nil, err - } - // validate V4 length - if v4Len > net.IPv4len*8 { - return nil, fmt.Errorf("invalid IPv4 bit mask length %d", v4Len) - } - - v6Len, err := strconv.ParseUint(v6BitMaskLen, 0, 16) - if err != nil { - return nil, err - } - // validate V6 length - if v6Len > net.IPv6len*8 { - return nil, fmt.Errorf("invalid IPv6 bit mask length %d", v6Len) - } - - return &edns0SubnetRule{mode: mode, action: action, - v4BitMaskLen: uint8(v4Len), v6BitMaskLen: uint8(v6Len), revert: revert}, nil -} - -// fillEcsData sets the subnet data into the ecs option -func (rule *edns0SubnetRule) fillEcsData(state request.Request, ecs *dns.EDNS0_SUBNET) error { - family := state.Family() - if (family != 1) && (family != 2) { - return fmt.Errorf("unable to fill data for EDNS0 subnet due to invalid IP family") - } - - ecs.Family = uint16(family) - ecs.SourceScope = 0 - - ipAddr := state.IP() - switch family { - case 1: - ipv4Mask := net.CIDRMask(int(rule.v4BitMaskLen), 32) - ipv4Addr := net.ParseIP(ipAddr) - ecs.SourceNetmask = rule.v4BitMaskLen - ecs.Address = ipv4Addr.Mask(ipv4Mask).To4() - case 2: - ipv6Mask := net.CIDRMask(int(rule.v6BitMaskLen), 128) - ipv6Addr := net.ParseIP(ipAddr) - ecs.SourceNetmask = rule.v6BitMaskLen - ecs.Address = ipv6Addr.Mask(ipv6Mask).To16() - } - return nil -} - -// Rewrite will alter the request EDNS0 subnet option. -func (rule *edns0SubnetRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - o := setupEdns0Opt(state.Req) - - if rule.action == Unset { - unsetEdns0Option(o, dns.EDNS0SUBNET) - return nil, RewriteDone - } - - var resp ResponseRules - - for _, s := range o.Option { - if e, ok := s.(*dns.EDNS0_SUBNET); ok { - if rule.action == Replace || rule.action == Set { - if rule.revert { - old := *e - resp = append(resp, &edns0ReplaceResponseRule[*dns.EDNS0_SUBNET]{code: e.Code, source: &old}) - } - if rule.fillEcsData(state, e) == nil { - return resp, RewriteDone - } - } - return nil, RewriteIgnored - } - } - - // add option if not found - if rule.action == Append || rule.action == Set { - opt := &dns.EDNS0_SUBNET{Code: dns.EDNS0SUBNET} - if rule.fillEcsData(state, opt) == nil { - o.Option = append(o.Option, opt) - if rule.revert { - resp = append(resp, &edns0SetResponseRule{code: dns.EDNS0SUBNET}) - } - return resp, RewriteDone - } - } - - return nil, RewriteIgnored -} - -// Mode returns the processing mode -func (rule *edns0SubnetRule) Mode() string { return rule.mode } - -// These are all defined actions. -const ( - Replace = "replace" - Set = "set" - Append = "append" - Unset = "unset" -) - -// Supported local EDNS0 variables -const ( - queryName = "{qname}" - queryType = "{qtype}" - clientIP = "{client_ip}" - clientPort = "{client_port}" - protocol = "{protocol}" - serverIP = "{server_ip}" - serverPort = "{server_port}" -) diff --git a/plugin/rewrite/fuzz.go b/plugin/rewrite/fuzz.go deleted file mode 100644 index 8e44ebb59a..0000000000 --- a/plugin/rewrite/fuzz.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build gofuzz - -package rewrite - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/pkg/fuzz" -) - -// Fuzz fuzzes rewrite. -func Fuzz(data []byte) int { - c := caddy.NewTestController("dns", "rewrite edns0 subnet set 24 56") - rules, err := rewriteParse(c) - if err != nil { - return 0 - } - r := Rewrite{Rules: rules} - - return fuzz.Do(r, data) -} diff --git a/plugin/rewrite/log_test.go b/plugin/rewrite/log_test.go deleted file mode 100644 index 6ce362746b..0000000000 --- a/plugin/rewrite/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package rewrite - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/rewrite/name.go b/plugin/rewrite/name.go deleted file mode 100644 index 42c0054a57..0000000000 --- a/plugin/rewrite/name.go +++ /dev/null @@ -1,449 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// stringRewriter rewrites a string -type stringRewriter interface { - rewriteString(src string) string -} - -// regexStringRewriter can be used to rewrite strings by regex pattern. -// it contains all the information required to detect and execute a rewrite -// on a string. -type regexStringRewriter struct { - pattern *regexp.Regexp - replacement string -} - -var _ stringRewriter = ®exStringRewriter{} - -func newStringRewriter(pattern *regexp.Regexp, replacement string) stringRewriter { - return ®exStringRewriter{pattern, replacement} -} - -func (r *regexStringRewriter) rewriteString(src string) string { - regexGroups := r.pattern.FindStringSubmatch(src) - if len(regexGroups) == 0 { - return src - } - s := r.replacement - for groupIndex, groupValue := range regexGroups { - groupIndexStr := "{" + strconv.Itoa(groupIndex) + "}" - s = strings.ReplaceAll(s, groupIndexStr, groupValue) - } - return s -} - -// remapStringRewriter maps a dedicated string to another string -// it also maps a the domain of a sub domain. -type remapStringRewriter struct { - orig string - replacement string -} - -var _ stringRewriter = &remapStringRewriter{} - -func newRemapStringRewriter(orig, replacement string) stringRewriter { - return &remapStringRewriter{orig, replacement} -} - -func (r *remapStringRewriter) rewriteString(src string) string { - if src == r.orig { - return r.replacement - } - if strings.HasSuffix(src, "."+r.orig) { - return src[0:len(src)-len(r.orig)] + r.replacement - } - return src -} - -// suffixStringRewriter maps a dedicated suffix string to another string -type suffixStringRewriter struct { - suffix string - replacement string -} - -var _ stringRewriter = &suffixStringRewriter{} - -func newSuffixStringRewriter(orig, replacement string) stringRewriter { - return &suffixStringRewriter{orig, replacement} -} - -func (r *suffixStringRewriter) rewriteString(src string) string { - if strings.HasSuffix(src, r.suffix) { - return strings.TrimSuffix(src, r.suffix) + r.replacement - } - return src -} - -// nameRewriterResponseRule maps a record name according to a stringRewriter. -type nameRewriterResponseRule struct { - stringRewriter -} - -func (r *nameRewriterResponseRule) RewriteResponse(res *dns.Msg, rr dns.RR) { - rr.Header().Name = r.rewriteString(rr.Header().Name) -} - -// valueRewriterResponseRule maps a record value according to a stringRewriter. -type valueRewriterResponseRule struct { - stringRewriter -} - -func (r *valueRewriterResponseRule) RewriteResponse(res *dns.Msg, rr dns.RR) { - value := getRecordValueForRewrite(rr) - if value != "" { - new := r.rewriteString(value) - if new != value { - setRewrittenRecordValue(rr, new) - } - } -} - -const ( - // ExactMatch matches only on exact match of the name in the question section of a request - ExactMatch = "exact" - // PrefixMatch matches when the name begins with the matching string - PrefixMatch = "prefix" - // SuffixMatch matches when the name ends with the matching string - SuffixMatch = "suffix" - // SubstringMatch matches on partial match of the name in the question section of a request - SubstringMatch = "substring" - // RegexMatch matches when the name in the question section of a request matches a regular expression - RegexMatch = "regex" - - // AnswerMatch matches an answer rewrite - AnswerMatch = "answer" - // AutoMatch matches the auto name answer rewrite - AutoMatch = "auto" - // NameMatch matches the name answer rewrite - NameMatch = "name" - // ValueMatch matches the value answer rewrite - ValueMatch = "value" -) - -type nameRuleBase struct { - nextAction string - auto bool - replacement string - static ResponseRules -} - -func newNameRuleBase(nextAction string, auto bool, replacement string, staticResponses ResponseRules) nameRuleBase { - return nameRuleBase{ - nextAction: nextAction, - auto: auto, - replacement: replacement, - static: staticResponses, - } -} - -// responseRuleFor create for auto mode dynamically response rewriters for name and value -// reverting the mapping done by the name rewrite rule, which can be found in the state. -func (rule *nameRuleBase) responseRuleFor(state request.Request) (ResponseRules, Result) { - if !rule.auto { - return rule.static, RewriteDone - } - - rewriter := newRemapStringRewriter(state.Req.Question[0].Name, state.Name()) - rules := ResponseRules{ - &nameRewriterResponseRule{rewriter}, - &valueRewriterResponseRule{rewriter}, - } - return append(rules, rule.static...), RewriteDone -} - -// Mode returns the processing nextAction -func (rule *nameRuleBase) Mode() string { return rule.nextAction } - -// exactNameRule rewrites the current request based upon exact match of the name -// in the question section of the request. -type exactNameRule struct { - nameRuleBase - from string -} - -func newExactNameRule(nextAction string, orig, replacement string, answers ResponseRules) Rule { - return &exactNameRule{ - newNameRuleBase(nextAction, true, replacement, answers), - orig, - } -} - -func (rule *exactNameRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if rule.from == state.Name() { - state.Req.Question[0].Name = rule.replacement - return rule.responseRuleFor(state) - } - return nil, RewriteIgnored -} - -// prefixNameRule rewrites the current request when the name begins with the matching string. -type prefixNameRule struct { - nameRuleBase - prefix string -} - -func newPrefixNameRule(nextAction string, auto bool, prefix, replacement string, answers ResponseRules) Rule { - return &prefixNameRule{ - newNameRuleBase(nextAction, auto, replacement, answers), - prefix, - } -} - -func (rule *prefixNameRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if after, ok := strings.CutPrefix(state.Name(), rule.prefix); ok { - state.Req.Question[0].Name = rule.replacement + after - return rule.responseRuleFor(state) - } - return nil, RewriteIgnored -} - -// suffixNameRule rewrites the current request when the name ends with the matching string. -type suffixNameRule struct { - nameRuleBase - suffix string -} - -func newSuffixNameRule(nextAction string, auto bool, suffix, replacement string, answers ResponseRules) Rule { - var rules ResponseRules - if auto { - // for a suffix rewriter better standard response rewrites can be done - // just by using the original suffix/replacement in the opposite order - rewriter := newSuffixStringRewriter(replacement, suffix) - rules = ResponseRules{ - &nameRewriterResponseRule{rewriter}, - &valueRewriterResponseRule{rewriter}, - } - } - return &suffixNameRule{ - newNameRuleBase(nextAction, false, replacement, append(rules, answers...)), - suffix, - } -} - -func (rule *suffixNameRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if strings.HasSuffix(state.Name(), rule.suffix) { - state.Req.Question[0].Name = strings.TrimSuffix(state.Name(), rule.suffix) + rule.replacement - return rule.responseRuleFor(state) - } - return nil, RewriteIgnored -} - -// substringNameRule rewrites the current request based upon partial match of the -// name in the question section of the request. -type substringNameRule struct { - nameRuleBase - substring string -} - -func newSubstringNameRule(nextAction string, auto bool, substring, replacement string, answers ResponseRules) Rule { - return &substringNameRule{ - newNameRuleBase(nextAction, auto, replacement, answers), - substring, - } -} - -func (rule *substringNameRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if strings.Contains(state.Name(), rule.substring) { - state.Req.Question[0].Name = strings.ReplaceAll(state.Name(), rule.substring, rule.replacement) - return rule.responseRuleFor(state) - } - return nil, RewriteIgnored -} - -// regexNameRule rewrites the current request when the name in the question -// section of the request matches a regular expression. -type regexNameRule struct { - nameRuleBase - pattern *regexp.Regexp -} - -func newRegexNameRule(nextAction string, auto bool, pattern *regexp.Regexp, replacement string, answers ResponseRules) Rule { - return ®exNameRule{ - newNameRuleBase(nextAction, auto, replacement, answers), - pattern, - } -} - -func (rule *regexNameRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - regexGroups := rule.pattern.FindStringSubmatch(state.Name()) - if len(regexGroups) == 0 { - return nil, RewriteIgnored - } - s := rule.replacement - for groupIndex, groupValue := range regexGroups { - groupIndexStr := "{" + strconv.Itoa(groupIndex) + "}" - s = strings.ReplaceAll(s, groupIndexStr, groupValue) - } - state.Req.Question[0].Name = s - return rule.responseRuleFor(state) -} - -// newNameRule creates a name matching rule based on exact, partial, or regex match -func newNameRule(nextAction string, args ...string) (Rule, error) { - var matchType, rewriteQuestionFrom, rewriteQuestionTo string - if len(args) < 2 { - return nil, fmt.Errorf("too few arguments for a name rule") - } - if len(args) == 2 { - matchType = ExactMatch - rewriteQuestionFrom = plugin.Name(args[0]).Normalize() - rewriteQuestionTo = plugin.Name(args[1]).Normalize() - } - if len(args) >= 3 { - matchType = strings.ToLower(args[0]) - if matchType == RegexMatch { - rewriteQuestionFrom = args[1] - rewriteQuestionTo = args[2] - } else { - rewriteQuestionFrom = plugin.Name(args[1]).Normalize() - rewriteQuestionTo = plugin.Name(args[2]).Normalize() - } - } - if matchType == ExactMatch || matchType == SuffixMatch { - if !hasClosingDot(rewriteQuestionFrom) { - rewriteQuestionFrom = rewriteQuestionFrom + "." - } - if !hasClosingDot(rewriteQuestionTo) { - rewriteQuestionTo = rewriteQuestionTo + "." - } - } - - var err error - var answers ResponseRules - auto := false - if len(args) > 3 { - auto, answers, err = parseAnswerRules(matchType, args[3:]) - if err != nil { - return nil, err - } - } - - switch matchType { - case ExactMatch: - if _, err := isValidRegexPattern(rewriteQuestionTo, rewriteQuestionFrom); err != nil { - return nil, err - } - return newExactNameRule(nextAction, rewriteQuestionFrom, rewriteQuestionTo, answers), nil - case PrefixMatch: - return newPrefixNameRule(nextAction, auto, rewriteQuestionFrom, rewriteQuestionTo, answers), nil - case SuffixMatch: - return newSuffixNameRule(nextAction, auto, rewriteQuestionFrom, rewriteQuestionTo, answers), nil - case SubstringMatch: - return newSubstringNameRule(nextAction, auto, rewriteQuestionFrom, rewriteQuestionTo, answers), nil - case RegexMatch: - rewriteQuestionFromPattern, err := isValidRegexPattern(rewriteQuestionFrom, rewriteQuestionTo) - if err != nil { - return nil, err - } - rewriteQuestionTo := plugin.Name(args[2]).Normalize() - return newRegexNameRule(nextAction, auto, rewriteQuestionFromPattern, rewriteQuestionTo, answers), nil - default: - return nil, fmt.Errorf("name rule supports only exact, prefix, suffix, substring, and regex name matching, received: %s", matchType) - } -} - -func parseAnswerRules(name string, args []string) (auto bool, rules ResponseRules, err error) { - auto = false - arg := 0 - nameRules := 0 - last := "" - if len(args) < 2 { - return false, nil, fmt.Errorf("invalid arguments for %s rule", name) - } - for arg < len(args) { - if last == "" && args[arg] != AnswerMatch { - if last == "" { - return false, nil, fmt.Errorf("exceeded the number of arguments for a non-answer rule argument for %s rule", name) - } - return false, nil, fmt.Errorf("exceeded the number of arguments for %s answer rule for %s rule", last, name) - } - if args[arg] == AnswerMatch { - arg++ - } - if len(args)-arg == 0 { - return false, nil, fmt.Errorf("type missing for answer rule for %s rule", name) - } - last = args[arg] - arg++ - switch last { - case AutoMatch: - auto = true - continue - case NameMatch: - if len(args)-arg < 2 { - return false, nil, fmt.Errorf("%s answer rule for %s rule: 2 arguments required", last, name) - } - rewriteAnswerFrom := args[arg] - rewriteAnswerTo := args[arg+1] - rewriteAnswerFromPattern, err := isValidRegexPattern(rewriteAnswerFrom, rewriteAnswerTo) - rewriteAnswerTo = plugin.Name(rewriteAnswerTo).Normalize() - if err != nil { - return false, nil, fmt.Errorf("%s answer rule for %s rule: %s", last, name, err) - } - rules = append(rules, &nameRewriterResponseRule{newStringRewriter(rewriteAnswerFromPattern, rewriteAnswerTo)}) - arg += 2 - nameRules++ - case ValueMatch: - if len(args)-arg < 2 { - return false, nil, fmt.Errorf("%s answer rule for %s rule: 2 arguments required", last, name) - } - rewriteAnswerFrom := args[arg] - rewriteAnswerTo := args[arg+1] - rewriteAnswerFromPattern, err := isValidRegexPattern(rewriteAnswerFrom, rewriteAnswerTo) - rewriteAnswerTo = plugin.Name(rewriteAnswerTo).Normalize() - if err != nil { - return false, nil, fmt.Errorf("%s answer rule for %s rule: %s", last, name, err) - } - rules = append(rules, &valueRewriterResponseRule{newStringRewriter(rewriteAnswerFromPattern, rewriteAnswerTo)}) - arg += 2 - default: - return false, nil, fmt.Errorf("invalid type %q for answer rule for %s rule", last, name) - } - } - - if auto && nameRules > 0 { - return false, nil, fmt.Errorf("auto name answer rule cannot be combined with explicit name anwer rules") - } - return auto, rules, nil -} - -// hasClosingDot returns true if s has a closing dot at the end. -func hasClosingDot(s string) bool { - return strings.HasSuffix(s, ".") -} - -// getSubExprUsage returns the number of subexpressions used in s. -func getSubExprUsage(s string) int { - subExprUsage := 0 - for i := range 101 { - if strings.Contains(s, "{"+strconv.Itoa(i)+"}") { - subExprUsage++ - } - } - return subExprUsage -} - -// isValidRegexPattern returns a regular expression for pattern matching or errors, if any. -func isValidRegexPattern(rewriteFrom, rewriteTo string) (*regexp.Regexp, error) { - rewriteFromPattern, err := regexp.Compile(rewriteFrom) - if err != nil { - return nil, fmt.Errorf("invalid regex matching pattern: %s", rewriteFrom) - } - if getSubExprUsage(rewriteTo) > rewriteFromPattern.NumSubexp() { - return nil, fmt.Errorf("the rewrite regex pattern (%s) uses more subexpressions than its corresponding matching regex pattern (%s)", rewriteTo, rewriteFrom) - } - return rewriteFromPattern, nil -} diff --git a/plugin/rewrite/name_test.go b/plugin/rewrite/name_test.go deleted file mode 100644 index e85c773a64..0000000000 --- a/plugin/rewrite/name_test.go +++ /dev/null @@ -1,370 +0,0 @@ -package rewrite - -import ( - "context" - "strings" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestRewriteIllegalName(t *testing.T) { - r, _ := newNameRule("stop", "example.org.", "example..org.") - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - RevertPolicy: NoRevertPolicy(), - } - - ctx := context.TODO() - m := new(dns.Msg) - m.SetQuestion("example.org.", dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err := rw.ServeDNS(ctx, rec, m) - if !strings.Contains(err.Error(), "invalid name") { - t.Errorf("Expected invalid name, got %s", err.Error()) - } -} - -func TestRewriteNamePrefixSuffix(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - expected string - }{ - {"stop", []string{"prefix", "foo", "bar"}, "foo.example.com.", "bar.example.com."}, - {"stop", []string{"prefix", "foo.", "bar."}, "foo.example.com.", "bar.example.com."}, - {"stop", []string{"suffix", "com", "org"}, "foo.example.com.", "foo.example.org."}, - {"stop", []string{"suffix", ".com", ".org"}, "foo.example.com.", "foo.example.org."}, - } - for _, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Expected no error, got %s", err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - RevertPolicy: NoRevertPolicy(), - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Expected no error, got %s", err) - } - actual := rec.Msg.Question[0].Name - if actual != tc.expected { - t.Fatalf("Expected rewrite to %v, got %v", tc.expected, actual) - } - } -} - -func TestRewriteNameNoRewrite(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - expected string - }{ - {"stop", []string{"prefix", "foo", "bar"}, "coredns.foo.", "coredns.foo."}, - {"stop", []string{"prefix", "foo", "bar."}, "coredns.foo.", "coredns.foo."}, - {"stop", []string{"suffix", "com", "org"}, "com.coredns.", "com.coredns."}, - {"stop", []string{"suffix", "com", "org."}, "com.coredns.", "com.coredns."}, - {"stop", []string{"substring", "service", "svc"}, "com.coredns.", "com.coredns."}, - } - for i, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - actual := rec.Msg.Answer[0].Header().Name - if actual != tc.expected { - t.Fatalf("Test %d: Expected answer rewrite to %v, got %v", i, tc.expected, actual) - } - } -} - -func TestRewriteNamePrefixSuffixNoAutoAnswer(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - expected string - }{ - {"stop", []string{"prefix", "foo", "bar"}, "foo.example.com.", "bar.example.com."}, - {"stop", []string{"prefix", "foo.", "bar."}, "foo.example.com.", "bar.example.com."}, - {"stop", []string{"suffix", "com", "org"}, "foo.example.com.", "foo.example.org."}, - {"stop", []string{"suffix", ".com", ".org"}, "foo.example.com.", "foo.example.org."}, - {"stop", []string{"suffix", ".ingress.coredns.rocks", "nginx.coredns.rocks"}, "coredns.ingress.coredns.rocks.", "corednsnginx.coredns.rocks."}, - } - for i, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - actual := rec.Msg.Answer[0].Header().Name - if actual != tc.expected { - t.Fatalf("Test %d: Expected answer rewrite to %v, got %v", i, tc.expected, actual) - } - } -} - -func TestRewriteNamePrefixSuffixAutoAnswer(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - rewrite string - expected string - }{ - {"stop", []string{"prefix", "foo", "bar", "answer", "auto"}, "foo.example.com.", "bar.example.com.", "foo.example.com."}, - {"stop", []string{"prefix", "foo.", "bar.", "answer", "auto"}, "foo.example.com.", "bar.example.com.", "foo.example.com."}, - {"stop", []string{"suffix", "com", "org", "answer", "auto"}, "foo.example.com.", "foo.example.org.", "foo.example.com."}, - {"stop", []string{"suffix", ".com", ".org", "answer", "auto"}, "foo.example.com.", "foo.example.org.", "foo.example.com."}, - {"stop", []string{"suffix", ".ingress.coredns.rocks", "nginx.coredns.rocks", "answer", "auto"}, "coredns.ingress.coredns.rocks.", "corednsnginx.coredns.rocks.", "coredns.ingress.coredns.rocks."}, - } - for i, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - RevertPolicy: NoRestorePolicy(), - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - rewrite := rec.Msg.Question[0].Name - if rewrite != tc.rewrite { - t.Fatalf("Test %d: Expected question rewrite to %v, got %v", i, tc.rewrite, rewrite) - } - actual := rec.Msg.Answer[0].Header().Name - if actual != tc.expected { - t.Fatalf("Test %d: Expected answer rewrite to %v, got %v", i, tc.expected, actual) - } - } -} - -func TestRewriteNameExactAnswer(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - rewrite string - expected string - }{ - {"stop", []string{"exact", "coredns.rocks", "service.consul", "answer", "auto"}, "coredns.rocks.", "service.consul.", "coredns.rocks."}, - {"stop", []string{"exact", "coredns.rocks.", "service.consul.", "answer", "auto"}, "coredns.rocks.", "service.consul.", "coredns.rocks."}, - {"stop", []string{"exact", "coredns.rocks", "service.consul"}, "coredns.rocks.", "service.consul.", "coredns.rocks."}, - {"stop", []string{"exact", "coredns.rocks.", "service.consul."}, "coredns.rocks.", "service.consul.", "coredns.rocks."}, - {"stop", []string{"exact", "coredns.org.", "service.consul."}, "coredns.rocks.", "coredns.rocks.", "coredns.rocks."}, - } - for i, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - RevertPolicy: NoRestorePolicy(), - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - rewrite := rec.Msg.Question[0].Name - if rewrite != tc.rewrite { - t.Fatalf("Test %d: Expected question rewrite to %v, got %v", i, tc.rewrite, rewrite) - } - actual := rec.Msg.Answer[0].Header().Name - if actual != tc.expected { - t.Fatalf("Test %d: Expected answer rewrite to %v, got %v", i, tc.expected, actual) - } - } -} - -func TestRewriteNameRegexAnswer(t *testing.T) { - ctx := t.Context() - - tests := []struct { - next string - args []string - question string - rewrite string - expected string - }{ - {"stop", []string{"regex", "(.*).coredns.rocks", "{1}.coredns.maps", "answer", "auto"}, "foo.coredns.rocks.", "foo.coredns.maps.", "foo.coredns.rocks."}, - {"stop", []string{"regex", "(.*).coredns.rocks", "{1}.coredns.maps", "answer", "name", "(.*).coredns.maps", "{1}.coredns.works"}, "foo.coredns.rocks.", "foo.coredns.maps.", "foo.coredns.works."}, - {"stop", []string{"regex", "(.*).coredns.rocks", "{1}.coredns.maps"}, "foo.coredns.rocks.", "foo.coredns.maps.", "foo.coredns.maps."}, - } - for i, tc := range tests { - r, err := newNameRule(tc.next, tc.args...) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: []Rule{r}, - RevertPolicy: NoRestorePolicy(), - } - - m := new(dns.Msg) - m.SetQuestion(tc.question, dns.TypeA) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - _, err = rw.ServeDNS(ctx, rec, m) - if err != nil { - t.Fatalf("Test %d: Expected no error, got %s", i, err) - } - rewrite := rec.Msg.Question[0].Name - if rewrite != tc.rewrite { - t.Fatalf("Test %d: Expected question rewrite to %v, got %v", i, tc.rewrite, rewrite) - } - actual := rec.Msg.Answer[0].Header().Name - if actual != tc.expected { - t.Fatalf("Test %d: Expected answer rewrite to %v, got %v", i, tc.expected, actual) - } - } -} - -func TestNewNameRule(t *testing.T) { - tests := []struct { - next string - args []string - expectedFail bool - }{ - {"stop", []string{"exact", "srv3.coredns.rocks", "srv4.coredns.rocks"}, false}, - {"stop", []string{"srv1.coredns.rocks", "srv2.coredns.rocks"}, false}, - {"stop", []string{"suffix", "coredns.rocks", "coredns.rocks."}, false}, - {"stop", []string{"suffix", "coredns.rocks.", "coredns.rocks"}, false}, - {"stop", []string{"suffix", "coredns.rocks.", "coredns.rocks."}, false}, - {"stop", []string{"regex", "srv1.coredns.rocks", "10"}, false}, - {"stop", []string{"regex", "(.*).coredns.rocks", "10"}, false}, - {"stop", []string{"regex", "(.*).coredns.rocks", "{1}.coredns.rocks"}, false}, - {"stop", []string{"regex", "(.*).coredns.rocks", "{1}.{2}.coredns.rocks"}, true}, - {"stop", []string{"regex", "staging.mydomain.com", "aws-loadbalancer-id.us-east-1.elb.amazonaws.com"}, false}, - {"stop", []string{"suffix", "staging.mydomain.com", "coredns.rock", "answer"}, true}, - {"stop", []string{"suffix", "staging.mydomain.com", "coredns.rock", "answer", "name"}, true}, - {"stop", []string{"suffix", "staging.mydomain.com", "coredns.rock", "answer", "other"}, true}, - {"stop", []string{"suffix", "staging.mydomain.com", "coredns.rock", "answer", "auto"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "auto"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name"}, true}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "coredns.rock", "staging.mydomain.com"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.{2}.staging.mydomain.com"}, true}, - - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "name", "(.*).coredns.rock"}, true}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"regex", "staging.mydomain.com", "coredns.rock", "answer", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com", "value", "(.*).coredns.rock"}, true}, - - {"stop", []string{"suffix", "staging.mydomain.com.", "coredns.rock.", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"suffix", "staging.mydomain.com.", "coredns.rock.", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"suffix", "staging.mydomain.com.", "coredns.rock.", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com", "name", "(.*).coredns.rock", "{1}.staging.mydomain.com"}, false}, - {"stop", []string{"suffix", "staging.mydomain.com.", "coredns.rock.", "answer", "value", "(.*).coredns.rock", "{1}.staging.mydomain.com", "value", "(.*).coredns.rock"}, true}, - } - for i, tc := range tests { - failed := false - rule, err := newNameRule(tc.next, tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - t.Logf("Test %d: PASS, passed as expected: (%s) %s", i, tc.next, tc.args) - continue - } - if failed && tc.expectedFail { - t.Logf("Test %d: PASS, failed as expected: (%s) %s: %s", i, tc.next, tc.args, err) - continue - } - if failed && !tc.expectedFail { - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v, error=%s", i, tc.expectedFail, failed, tc.next, tc.args, rule, err) - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule) - } - for i, tc := range tests { - failed := false - tc.args = append([]string{tc.next, "name"}, tc.args...) - rule, err := newRule(tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - t.Logf("Test %d: PASS, passed as expected: (%s) %s", i, tc.next, tc.args) - continue - } - if failed && tc.expectedFail { - t.Logf("Test %d: PASS, failed as expected: (%s) %s: %s", i, tc.next, tc.args, err) - continue - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule) - } -} diff --git a/plugin/rewrite/rcode.go b/plugin/rewrite/rcode.go deleted file mode 100644 index cf12a8c26b..0000000000 --- a/plugin/rewrite/rcode.go +++ /dev/null @@ -1,178 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -type rcodeResponseRule struct { - old int - new int -} - -func (r *rcodeResponseRule) RewriteResponse(res *dns.Msg, rr dns.RR) { - if r.old == res.Rcode { - res.Rcode = r.new - } -} - -type rcodeRuleBase struct { - nextAction string - response rcodeResponseRule -} - -func newRCodeRuleBase(nextAction string, old, new int) rcodeRuleBase { - return rcodeRuleBase{ - nextAction: nextAction, - response: rcodeResponseRule{old: old, new: new}, - } -} - -func (rule *rcodeRuleBase) responseRule(match bool) (ResponseRules, Result) { - if match { - return ResponseRules{&rule.response}, RewriteDone - } - return nil, RewriteIgnored -} - -// Mode returns the processing nextAction -func (rule *rcodeRuleBase) Mode() string { return rule.nextAction } - -type exactRCodeRule struct { - rcodeRuleBase - From string -} - -type prefixRCodeRule struct { - rcodeRuleBase - Prefix string -} - -type suffixRCodeRule struct { - rcodeRuleBase - Suffix string -} - -type substringRCodeRule struct { - rcodeRuleBase - Substring string -} - -type regexRCodeRule struct { - rcodeRuleBase - Pattern *regexp.Regexp -} - -// Rewrite rewrites the current request based upon exact match of the name -// in the question section of the request. -func (rule *exactRCodeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(rule.From == state.Name()) -} - -// Rewrite rewrites the current request when the name begins with the matching string. -func (rule *prefixRCodeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.HasPrefix(state.Name(), rule.Prefix)) -} - -// Rewrite rewrites the current request when the name ends with the matching string. -func (rule *suffixRCodeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.HasSuffix(state.Name(), rule.Suffix)) -} - -// Rewrite rewrites the current request based upon partial match of the -// name in the question section of the request. -func (rule *substringRCodeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.Contains(state.Name(), rule.Substring)) -} - -// Rewrite rewrites the current request when the name in the question -// section of the request matches a regular expression. -func (rule *regexRCodeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(len(rule.Pattern.FindStringSubmatch(state.Name())) != 0) -} - -// newRCodeRule creates a name matching rule based on exact, partial, or regex match -func newRCodeRule(nextAction string, args ...string) (Rule, error) { - if len(args) < 3 { - return nil, fmt.Errorf("too few (%d) arguments for a rcode rule", len(args)) - } - var oldStr, newStr string - if len(args) == 3 { - oldStr, newStr = args[1], args[2] - } - if len(args) == 4 { - oldStr, newStr = args[2], args[3] - } - old, valid := isValidRCode(oldStr) - if !valid { - return nil, fmt.Errorf("invalid matching RCODE '%s' for a rcode rule", oldStr) - } - new, valid := isValidRCode(newStr) - if !valid { - return nil, fmt.Errorf("invalid replacement RCODE '%s' for a rcode rule", newStr) - } - if len(args) == 4 { - switch strings.ToLower(args[0]) { - case ExactMatch: - return &exactRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - plugin.Name(args[1]).Normalize(), - }, nil - case PrefixMatch: - return &prefixRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - plugin.Name(args[1]).Normalize(), - }, nil - case SuffixMatch: - return &suffixRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - plugin.Name(args[1]).Normalize(), - }, nil - case SubstringMatch: - return &substringRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - plugin.Name(args[1]).Normalize(), - }, nil - case RegexMatch: - regexPattern, err := regexp.Compile(args[1]) - if err != nil { - return nil, fmt.Errorf("invalid regex pattern in a rcode rule: %s", args[1]) - } - return ®exRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - regexPattern, - }, nil - default: - return nil, fmt.Errorf("rcode rule supports only exact, prefix, suffix, substring, and regex name matching") - } - } - if len(args) > 4 { - return nil, fmt.Errorf("many few arguments for a rcode rule") - } - return &exactRCodeRule{ - newRCodeRuleBase(nextAction, old, new), - plugin.Name(args[0]).Normalize(), - }, nil -} - -// validRCode returns true if v is valid RCode value. -func isValidRCode(v string) (int, bool) { - i, err := strconv.ParseUint(v, 10, 32) - // try parsing integer based rcode - if err == nil && i <= 23 { - return int(i), true - } - - if RCodeInt, ok := dns.StringToRcode[strings.ToUpper(v)]; ok { - return RCodeInt, true - } - return 0, false -} diff --git a/plugin/rewrite/rcode_test.go b/plugin/rewrite/rcode_test.go deleted file mode 100644 index 8f0c2e672b..0000000000 --- a/plugin/rewrite/rcode_test.go +++ /dev/null @@ -1,72 +0,0 @@ -package rewrite - -import ( - "testing" - - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestNewRCodeRule(t *testing.T) { - tests := []struct { - next string - args []string - expectedFail bool - }{ - {"stop", []string{"numeric.rcode.coredns.rocks", "2", "0"}, false}, - {"stop", []string{"too.few.rcode.coredns.rocks", "2"}, true}, - {"stop", []string{"exact", "too.many.rcode.coredns.rocks", "2", "1", "0"}, true}, - {"stop", []string{"exact", "match.string.rcode.coredns.rocks", "SERVFAIL", "NOERROR"}, false}, - {"continue", []string{"regex", `(regex)\.rcode\.(coredns)\.(rocks)`, "FORMERR", "NOERROR"}, false}, - {"stop", []string{"invalid.rcode.coredns.rocks", "random", "nothing"}, true}, - } - for i, tc := range tests { - failed := false - rule, err := newRCodeRule(tc.next, tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - continue - } - if failed && tc.expectedFail { - continue - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v, err=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule, err) - } - for i, tc := range tests { - failed := false - tc.args = append([]string{tc.next, "rcode"}, tc.args...) - rule, err := newRule(tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - continue - } - if failed && tc.expectedFail { - continue - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v, err=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule, err) - } -} - -func TestRCodeRewrite(t *testing.T) { - rule, err := newRCodeRule("stop", []string{"exact", "srv1.coredns.rocks", "SERVFAIL", "FORMERR"}...) - - m := new(dns.Msg) - m.SetQuestion("srv1.coredns.rocks.", dns.TypeA) - m.Question[0].Qclass = dns.ClassINET - m.Answer = []dns.RR{test.A("srv1.coredns.rocks. 5 IN A 10.0.0.1")} - m.Rcode = dns.RcodeServerFailure - request := request.Request{Req: m} - - rcRule, _ := rule.(*exactRCodeRule) - var rr dns.RR - rcRule.response.RewriteResponse(request.Req, rr) - if request.Req.Rcode != dns.RcodeFormatError { - t.Fatalf("RCode rewrite did not apply changes, request=%#v, err=%v", request.Req, err) - } -} diff --git a/plugin/rewrite/reverter.go b/plugin/rewrite/reverter.go deleted file mode 100644 index 4aa6f8a5ea..0000000000 --- a/plugin/rewrite/reverter.go +++ /dev/null @@ -1,147 +0,0 @@ -package rewrite - -import ( - "github.com/miekg/dns" -) - -// RevertPolicy controls the overall reverting process -type RevertPolicy interface { - DoRevert() bool - DoQuestionRestore() bool -} - -type revertPolicy struct { - noRevert bool - noRestore bool -} - -func (p revertPolicy) DoRevert() bool { - return !p.noRevert -} - -func (p revertPolicy) DoQuestionRestore() bool { - return !p.noRestore -} - -// NoRevertPolicy disables all response rewrite rules -func NoRevertPolicy() RevertPolicy { - return revertPolicy{true, false} -} - -// NoRestorePolicy disables the question restoration during the response rewrite -func NoRestorePolicy() RevertPolicy { - return revertPolicy{false, true} -} - -// NewRevertPolicy creates a new reverter policy by dynamically specifying all -// options. -func NewRevertPolicy(noRevert, noRestore bool) RevertPolicy { - return revertPolicy{noRestore: noRestore, noRevert: noRevert} -} - -// ResponseRule contains a rule to rewrite a response with. -type ResponseRule interface { - RewriteResponse(res *dns.Msg, rr dns.RR) -} - -// ResponseRules describes an ordered list of response rules to apply -// after a name rewrite -type ResponseRules = []ResponseRule - -// ResponseReverter reverses the operations done on the question section of a packet. -// This is need because the client will otherwise disregards the response, i.e. -// dig will complain with ';; Question section mismatch: got example.org/HINFO/IN' -type ResponseReverter struct { - dns.ResponseWriter - originalQuestion dns.Question - ResponseRules ResponseRules - revertPolicy RevertPolicy -} - -// NewResponseReverter returns a pointer to a new ResponseReverter. -func NewResponseReverter(w dns.ResponseWriter, r *dns.Msg, policy RevertPolicy) *ResponseReverter { - return &ResponseReverter{ - ResponseWriter: w, - originalQuestion: r.Question[0], - revertPolicy: policy, - } -} - -// WriteMsg records the status code and calls the underlying ResponseWriter's WriteMsg method. -func (r *ResponseReverter) WriteMsg(res1 *dns.Msg) error { - // Deep copy 'res' as to not (e.g). rewrite a message that's also stored in the cache. - res := res1.Copy() - - if r.revertPolicy.DoQuestionRestore() { - res.Question[0] = r.originalQuestion - } - if len(r.ResponseRules) > 0 { - for _, rr := range res.Ns { - r.rewriteResourceRecord(res, rr) - } - for _, rr := range res.Answer { - r.rewriteResourceRecord(res, rr) - } - for _, rr := range res.Extra { - r.rewriteResourceRecord(res, rr) - } - } - return r.ResponseWriter.WriteMsg(res) -} - -func (r *ResponseReverter) rewriteResourceRecord(res *dns.Msg, rr dns.RR) { - // The reverting rules need to be done in reversed order. - for i := len(r.ResponseRules) - 1; i >= 0; i-- { - r.ResponseRules[i].RewriteResponse(res, rr) - } -} - -// Write is a wrapper that records the size of the message that gets written. -func (r *ResponseReverter) Write(buf []byte) (int, error) { - n, err := r.ResponseWriter.Write(buf) - return n, err -} - -func getRecordValueForRewrite(rr dns.RR) (name string) { - switch rr.Header().Rrtype { - case dns.TypeSRV: - return rr.(*dns.SRV).Target - case dns.TypeMX: - return rr.(*dns.MX).Mx - case dns.TypeCNAME: - return rr.(*dns.CNAME).Target - case dns.TypeNS: - return rr.(*dns.NS).Ns - case dns.TypeDNAME: - return rr.(*dns.DNAME).Target - case dns.TypeNAPTR: - return rr.(*dns.NAPTR).Replacement - case dns.TypeSOA: - return rr.(*dns.SOA).Ns - case dns.TypePTR: - return rr.(*dns.PTR).Ptr - default: - return "" - } -} - -func setRewrittenRecordValue(rr dns.RR, value string) { - switch rr.Header().Rrtype { - case dns.TypeSRV: - rr.(*dns.SRV).Target = value - case dns.TypeMX: - rr.(*dns.MX).Mx = value - case dns.TypeCNAME: - rr.(*dns.CNAME).Target = value - case dns.TypeNS: - rr.(*dns.NS).Ns = value - case dns.TypeDNAME: - rr.(*dns.DNAME).Target = value - case dns.TypeNAPTR: - rr.(*dns.NAPTR).Replacement = value - case dns.TypeSOA: - rr.(*dns.SOA).Ns = value - case dns.TypePTR: - rr.(*dns.PTR).Ptr = value - } -} diff --git a/plugin/rewrite/reverter_test.go b/plugin/rewrite/reverter_test.go deleted file mode 100644 index f249eba100..0000000000 --- a/plugin/rewrite/reverter_test.go +++ /dev/null @@ -1,197 +0,0 @@ -package rewrite - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -var tests = []struct { - from string - fromType uint16 - answer []dns.RR - to string - toType uint16 - noRevert bool -}{ - {"core.dns.rocks", dns.TypeA, []dns.RR{test.A("dns.core.rocks. 5 IN A 10.0.0.1")}, "core.dns.rocks", dns.TypeA, false}, - {"core.dns.rocks", dns.TypeSRV, []dns.RR{test.SRV("dns.core.rocks. 5 IN SRV 0 100 100 srv1.dns.core.rocks.")}, "core.dns.rocks", dns.TypeSRV, false}, - {"core.dns.rocks", dns.TypeA, []dns.RR{test.A("core.dns.rocks. 5 IN A 10.0.0.1")}, "dns.core.rocks.", dns.TypeA, true}, - {"core.dns.rocks", dns.TypeSRV, []dns.RR{test.SRV("core.dns.rocks. 5 IN SRV 0 100 100 srv1.dns.core.rocks.")}, "dns.core.rocks.", dns.TypeSRV, true}, - {"core.dns.rocks", dns.TypeHINFO, []dns.RR{test.HINFO("core.dns.rocks. 5 HINFO INTEL-64 \"RHEL 7.4\"")}, "core.dns.rocks", dns.TypeHINFO, false}, - {"core.dns.rocks", dns.TypeA, []dns.RR{ - test.A("dns.core.rocks. 5 IN A 10.0.0.1"), - test.A("dns.core.rocks. 5 IN A 10.0.0.2"), - }, "core.dns.rocks", dns.TypeA, false}, -} - -func TestResponseReverter(t *testing.T) { - rules := []Rule{} - r, _ := newNameRule("stop", "regex", `(core)\.(dns)\.(rocks)`, "{2}.{1}.{3}", "answer", "name", `(dns)\.(core)\.(rocks)`, "{2}.{1}.{3}") - rules = append(rules, r) - - doReverterTests(t, rules) - - rules = []Rule{} - r, _ = newNameRule("continue", "regex", `(core)\.(dns)\.(rocks)`, "{2}.{1}.{3}", "answer", "name", `(dns)\.(core)\.(rocks)`, "{2}.{1}.{3}") - rules = append(rules, r) - - doReverterTests(t, rules) -} - -func doReverterTests(t *testing.T, rules []Rule) { - t.Helper() - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromType) - m.Question[0].Qclass = dns.ClassINET - m.Answer = tc.answer - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - RevertPolicy: NewRevertPolicy(tc.noRevert, false), - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - resp := rec.Msg - if resp.Question[0].Name != tc.to { - t.Errorf("Test %d: Expected Name to be %q but was %q", i, tc.to, resp.Question[0].Name) - } - if resp.Question[0].Qtype != tc.toType { - t.Errorf("Test %d: Expected Type to be '%d' but was '%d'", i, tc.toType, resp.Question[0].Qtype) - } - } -} - -var valueTests = []struct { - from string - fromType uint16 - answer []dns.RR - extra []dns.RR - to string - toType uint16 - noRevert bool - expectValue string - expectAnswerType uint16 - expectAddlName string -}{ - {"my.domain.uk.", dns.TypeSRV, []dns.RR{test.SRV("my.cluster.local. 5 IN SRV 0 100 100 srv1.my.cluster.local.")}, []dns.RR{test.A("srv1.my.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeSRV, false, "srv1.my.domain.uk.", dns.TypeSRV, "srv1.my.domain.uk."}, - {"my.domain.uk.", dns.TypeSRV, []dns.RR{test.SRV("my.cluster.local. 5 IN SRV 0 100 100 srv1.my.cluster.local.")}, []dns.RR{test.A("srv1.my.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeSRV, true, "srv1.my.cluster.local.", dns.TypeSRV, "srv1.my.cluster.local."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.CNAME("my.cluster.local. 3600 IN CNAME cname.cluster.local.")}, []dns.RR{test.A("cname.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeANY, false, "cname.domain.uk.", dns.TypeCNAME, "cname.domain.uk."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.CNAME("my.cluster.local. 3600 IN CNAME cname.cluster.local.")}, []dns.RR{test.A("cname.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeANY, true, "cname.cluster.local.", dns.TypeCNAME, "cname.cluster.local."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.DNAME("my.cluster.local. 3600 IN DNAME dname.cluster.local.")}, []dns.RR{test.A("dname.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeANY, false, "dname.domain.uk.", dns.TypeDNAME, "dname.domain.uk."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.DNAME("my.cluster.local. 3600 IN DNAME dname.cluster.local.")}, []dns.RR{test.A("dname.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeANY, true, "dname.cluster.local.", dns.TypeDNAME, "dname.cluster.local."}, - {"my.domain.uk.", dns.TypeMX, []dns.RR{test.MX("my.cluster.local. 3600 IN MX 1 mx1.cluster.local.")}, []dns.RR{test.A("mx1.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeMX, false, "mx1.domain.uk.", dns.TypeMX, "mx1.domain.uk."}, - {"my.domain.uk.", dns.TypeMX, []dns.RR{test.MX("my.cluster.local. 3600 IN MX 1 mx1.cluster.local.")}, []dns.RR{test.A("mx1.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeMX, true, "mx1.cluster.local.", dns.TypeMX, "mx1.cluster.local."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.NS("my.cluster.local. 3600 IN NS ns1.cluster.local.")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeANY, false, "ns1.domain.uk.", dns.TypeNS, "ns1.domain.uk."}, - {"my.domain.uk.", dns.TypeANY, []dns.RR{test.NS("my.cluster.local. 3600 IN NS ns1.cluster.local.")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeANY, true, "ns1.cluster.local.", dns.TypeNS, "ns1.cluster.local."}, - {"my.domain.uk.", dns.TypeSOA, []dns.RR{test.SOA("my.cluster.local. 1800 IN SOA ns1.cluster.local. admin.cluster.local. 1502165581 14400 3600 604800 14400")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeSOA, false, "ns1.domain.uk.", dns.TypeSOA, "ns1.domain.uk."}, - {"my.domain.uk.", dns.TypeSOA, []dns.RR{test.SOA("my.cluster.local. 1800 IN SOA ns1.cluster.local. admin.cluster.local. 1502165581 14400 3600 604800 14400")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeSOA, true, "ns1.cluster.local.", dns.TypeSOA, "ns1.cluster.local."}, - {"my.domain.uk.", dns.TypeNAPTR, []dns.RR{test.NAPTR("my.cluster.local. 100 IN NAPTR 100 10 \"S\" \"SIP+D2U\" \"!^.*$!sip:customer-service@example.com!\" _sip._udp.cluster.local.")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.domain.uk.", dns.TypeNAPTR, false, "_sip._udp.domain.uk.", dns.TypeNAPTR, "ns1.domain.uk."}, - {"my.domain.uk.", dns.TypeNAPTR, []dns.RR{test.NAPTR("my.cluster.local. 100 IN NAPTR 100 10 \"S\" \"SIP+D2U\" \"!^.*$!sip:customer-service@example.com!\" _sip._udp.cluster.local.")}, []dns.RR{test.A("ns1.cluster.local. 5 IN A 10.0.0.1")}, "my.cluster.local.", dns.TypeNAPTR, true, "_sip._udp.cluster.local.", dns.TypeNAPTR, "ns1.cluster.local."}, -} - -func TestValueResponseReverter(t *testing.T) { - rules := []Rule{} - r, err := newNameRule("stop", "regex", `(.*)\.domain\.uk`, "{1}.cluster.local", "answer", "name", `(.*)\.cluster\.local`, "{1}.domain.uk", "answer", "value", `(.*)\.cluster\.local`, "{1}.domain.uk") - if err != nil { - t.Errorf("cannot parse rule: %s", err) - return - } - rules = append(rules, r) - - doValueReverterTests(t, "stop", rules) - - rules = []Rule{} - r, err = newNameRule("continue", "regex", `(.*)\.domain\.uk`, "{1}.cluster.local", "answer", "name", `(.*)\.cluster\.local`, "{1}.domain.uk", "answer", "value", `(.*)\.cluster\.local`, "{1}.domain.uk") - if err != nil { - t.Errorf("cannot parse rule: %s", err) - return - } - rules = append(rules, r) - - doValueReverterTests(t, "continue", rules) - - rules = []Rule{} - r, err = newNameRule("stop", "suffix", `.domain.uk`, ".cluster.local", "answer", "auto", "answer", "value", `(.*)\.cluster\.local`, "{1}.domain.uk") - if err != nil { - t.Errorf("cannot parse rule: %s", err) - return - } - rules = append(rules, r) - - doValueReverterTests(t, "suffix", rules) - - // multiple rules - rules = []Rule{} - r, err = newNameRule("continue", "suffix", `.domain.uk`, ".domain.us", "answer", "auto") - if err != nil { - t.Errorf("cannot parse rule: %s", err) - return - } - rules = append(rules, r) - - r, err = newNameRule("stop", "suffix", `.domain.us`, ".cluster.local", "answer", "auto") - if err != nil { - t.Errorf("cannot parse rule: %s", err) - return - } - rules = append(rules, r) - - doValueReverterTests(t, "suffix_multiple", rules) -} - -func doValueReverterTests(t *testing.T, name string, rules []Rule) { - t.Helper() - ctx := context.TODO() - for i, tc := range valueTests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromType) - m.Question[0].Qclass = dns.ClassINET - m.Answer = tc.answer - m.Extra = tc.extra - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - RevertPolicy: NewRevertPolicy(tc.noRevert, false), - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - resp := rec.Msg - if resp.Question[0].Name != tc.to { - t.Errorf("Test %s.%d: Expected Name to be %q but was %q", name, i, tc.to, resp.Question[0].Name) - } - if resp.Question[0].Qtype != tc.toType { - t.Errorf("Test %s.%d: Expected Type to be '%d' but was '%d'", name, i, tc.toType, resp.Question[0].Qtype) - } - - if len(resp.Answer) <= 0 { - t.Errorf("Test %s.%d: No Answers", name, i) - return - } - if len(resp.Answer) > 0 && resp.Answer[0].Header().Rrtype != tc.expectAnswerType { - t.Errorf("Test %s.%d: Unexpected Answer Record Type %d", name, i, resp.Answer[0].Header().Rrtype) - return - } - - value := getRecordValueForRewrite(resp.Answer[0]) - if value != tc.expectValue { - t.Errorf("Test %s.%d: Expected Target to be '%s' but was '%s'", name, i, tc.expectValue, value) - } - - if len(resp.Extra) <= 0 || resp.Extra[0].Header().Rrtype != dns.TypeA { - t.Errorf("Test %s.%d: Unexpected Additional Record Type / No Additional Records", name, i) - return - } - - if resp.Extra[0].Header().Name != tc.expectAddlName { - t.Errorf("Test %s.%d: Expected Extra Name to be %q but was %q", name, i, tc.expectAddlName, resp.Extra[0].Header().Name) - } - } -} diff --git a/plugin/rewrite/rewrite.go b/plugin/rewrite/rewrite.go deleted file mode 100644 index 76b60c8648..0000000000 --- a/plugin/rewrite/rewrite.go +++ /dev/null @@ -1,149 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Result is the result of a rewrite -type Result int - -const ( - // RewriteIgnored is returned when rewrite is not done on request. - RewriteIgnored Result = iota - // RewriteDone is returned when rewrite is done on request. - RewriteDone -) - -// These are defined processing mode. -const ( - // Processing should stop after completing this rule - Stop = "stop" - // Processing should continue to next rule - Continue = "continue" -) - -// Rewrite is a plugin to rewrite requests internally before being handled. -type Rewrite struct { - Next plugin.Handler - Rules []Rule - RevertPolicy -} - -// ServeDNS implements the plugin.Handler interface. -func (rw Rewrite) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if rw.RevertPolicy == nil { - rw.RevertPolicy = NewRevertPolicy(false, false) - } - wr := NewResponseReverter(w, r, rw.RevertPolicy) - state := request.Request{W: w, Req: r} - - for _, rule := range rw.Rules { - respRules, result := rule.Rewrite(ctx, state) - if result == RewriteDone { - if _, ok := dns.IsDomainName(state.Req.Question[0].Name); !ok { - err := fmt.Errorf("invalid name after rewrite: %s", state.Req.Question[0].Name) - state.Req.Question[0] = wr.originalQuestion - return dns.RcodeServerFailure, err - } - wr.ResponseRules = append(wr.ResponseRules, respRules...) - if rule.Mode() == Stop { - if !rw.DoRevert() { - return plugin.NextOrFailure(rw.Name(), rw.Next, ctx, w, r) - } - rcode, err := plugin.NextOrFailure(rw.Name(), rw.Next, ctx, wr, r) - if plugin.ClientWrite(rcode) { - return rcode, err - } - // The next plugins didn't write a response, so write one now with the ResponseReverter. - // If server.ServeDNS does this then it will create an answer mismatch. - res := new(dns.Msg).SetRcode(r, rcode) - state.SizeAndDo(res) - wr.WriteMsg(res) - // return success, so server does not write a second error response to client - return dns.RcodeSuccess, err - } - } - } - if !rw.DoRevert() || len(wr.ResponseRules) == 0 { - return plugin.NextOrFailure(rw.Name(), rw.Next, ctx, w, r) - } - return plugin.NextOrFailure(rw.Name(), rw.Next, ctx, wr, r) -} - -// Name implements the Handler interface. -func (rw Rewrite) Name() string { return "rewrite" } - -// Rule describes a rewrite rule. -type Rule interface { - // Rewrite rewrites the current request. - Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) - // Mode returns the processing mode stop or continue. - Mode() string -} - -func newRule(args ...string) (Rule, error) { - if len(args) == 0 { - return nil, fmt.Errorf("no rule type specified for rewrite") - } - - arg0 := strings.ToLower(args[0]) - var ruleType string - var expectNumArgs, startArg int - mode := Stop - switch arg0 { - case Continue: - mode = Continue - if len(args) < 2 { - return nil, fmt.Errorf("continue rule must begin with a rule type") - } - ruleType = strings.ToLower(args[1]) - expectNumArgs = len(args) - 1 - startArg = 2 - case Stop: - if len(args) < 2 { - return nil, fmt.Errorf("stop rule must begin with a rule type") - } - ruleType = strings.ToLower(args[1]) - expectNumArgs = len(args) - 1 - startArg = 2 - default: - // for backward compatibility - ruleType = arg0 - expectNumArgs = len(args) - startArg = 1 - } - - switch ruleType { - case "answer": - return nil, fmt.Errorf("response rewrites must begin with a name rule") - case "name": - return newNameRule(mode, args[startArg:]...) - case "class": - if expectNumArgs != 3 { - return nil, fmt.Errorf("%s rules must have exactly two arguments", ruleType) - } - return newClassRule(mode, args[startArg:]...) - case "type": - if expectNumArgs != 3 { - return nil, fmt.Errorf("%s rules must have exactly two arguments", ruleType) - } - return newTypeRule(mode, args[startArg:]...) - case "edns0": - return newEdns0Rule(mode, args[startArg:]...) - case "ttl": - return newTTLRule(mode, args[startArg:]...) - case "cname": - return newCNAMERule(mode, args[startArg:]...) - case "rcode": - return newRCodeRule(mode, args[startArg:]...) - default: - return nil, fmt.Errorf("invalid rule type %q", args[0]) - } -} diff --git a/plugin/rewrite/rewrite_test.go b/plugin/rewrite/rewrite_test.go deleted file mode 100644 index 94f2e15d47..0000000000 --- a/plugin/rewrite/rewrite_test.go +++ /dev/null @@ -1,1160 +0,0 @@ -package rewrite - -import ( - "bytes" - "context" - "fmt" - "reflect" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func msgPrinter(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if len(r.Answer) == 0 { - r.Answer = []dns.RR{ - test.A(fmt.Sprintf("%s 5 IN A 10.0.0.1", r.Question[0].Name)), - } - } - w.WriteMsg(r) - return 0, nil -} - -func TestNewRule(t *testing.T) { - tests := []struct { - args []string - shouldError bool - expType reflect.Type - }{ - {[]string{}, true, nil}, - {[]string{"foo"}, true, nil}, - {[]string{"name"}, true, nil}, - {[]string{"name", "a.com"}, true, nil}, - {[]string{"name", "a.com", "b.com", "c.com"}, true, nil}, - {[]string{"name", "a.com", "b.com"}, false, reflect.TypeOf(&exactNameRule{})}, - {[]string{"name", "exact", "a.com", "b.com"}, false, reflect.TypeOf(&exactNameRule{})}, - {[]string{"name", "prefix", "a.com", "b.com"}, false, reflect.TypeOf(&prefixNameRule{})}, - {[]string{"name", "suffix", "a.com", "b.com"}, false, reflect.TypeOf(&suffixNameRule{})}, - {[]string{"name", "substring", "a.com", "b.com"}, false, reflect.TypeOf(&substringNameRule{})}, - {[]string{"name", "regex", "([a])\\.com", "new-{1}.com"}, false, reflect.TypeOf(®exNameRule{})}, - {[]string{"name", "regex", "([a]\\.com", "new-{1}.com"}, true, nil}, - {[]string{"name", "regex", "(dns)\\.(core)\\.(rocks)", "{2}.{1}.{3}", "answer", "name", "(core)\\.(dns)\\.(rocks)", "{2}.{1}.{3}"}, false, reflect.TypeOf(®exNameRule{})}, - {[]string{"name", "regex", "(adns)\\.(core)\\.(rocks)", "{2}.{1}.{3}", "answer", "name", "(core)\\.(adns)\\.(rocks)", "{2}.{1}.{3}", "too.long", "way.too.long"}, true, nil}, - {[]string{"name", "regex", "(bdns)\\.(core)\\.(rocks)", "{2}.{1}.{3}", "NoAnswer", "name", "(core)\\.(bdns)\\.(rocks)", "{2}.{1}.{3}"}, true, nil}, - {[]string{"name", "regex", "(cdns)\\.(core)\\.(rocks)", "{2}.{1}.{3}", "answer", "ttl", "(core)\\.(cdns)\\.(rocks)", "{2}.{1}.{3}"}, true, nil}, - {[]string{"name", "regex", "(ddns)\\.(core)\\.(rocks)", "{2}.{1}.{3}", "answer", "name", "\xecore\\.(ddns)\\.(rocks)", "{2}.{1}.{3}"}, true, nil}, - {[]string{"name", "regex", "\xedns\\.(core)\\.(rocks)", "{2}.{1}.{3}", "answer", "name", "(core)\\.(edns)\\.(rocks)", "{2}.{1}.{3}"}, true, nil}, - {[]string{"name", "substring", "fcore.dns.rocks", "dns.fcore.rocks", "answer", "name", "(fcore)\\.(dns)\\.(rocks)", "{2}.{1}.{3}"}, false, reflect.TypeOf(&substringNameRule{})}, - {[]string{"name", "substring", "a.com", "b.com", "c.com"}, true, nil}, - {[]string{"type"}, true, nil}, - {[]string{"type", "a"}, true, nil}, - {[]string{"type", "any", "a", "a"}, true, nil}, - {[]string{"type", "any", "a"}, false, reflect.TypeOf(&typeRule{})}, - {[]string{"type", "XY", "WV"}, true, nil}, - {[]string{"type", "ANY", "WV"}, true, nil}, - {[]string{"class"}, true, nil}, - {[]string{"class", "IN"}, true, nil}, - {[]string{"class", "ch", "in", "in"}, true, nil}, - {[]string{"class", "ch", "in"}, false, reflect.TypeOf(&classRule{})}, - {[]string{"class", "XY", "WV"}, true, nil}, - {[]string{"class", "IN", "WV"}, true, nil}, - {[]string{"edns0"}, true, nil}, - {[]string{"edns0", "unknown-rule-type", "set"}, true, nil}, - {[]string{"edns0", "unknown-rule-type", "unset"}, true, nil}, - {[]string{"edns0", "local"}, true, nil}, - {[]string{"edns0", "local", "set"}, true, nil}, - {[]string{"edns0", "local", "set", "0xffee"}, true, nil}, - {[]string{"edns0", "local", "set", "invalid-uint", "abcdefg"}, true, nil}, - {[]string{"edns0", "local", "set", "65518", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "abcdefg", "revert"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "abcdefg", "revert"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "abcdefg", "revert"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "unset", "0xffee"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "unset", "0xffee", "abcdefg"}, true, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "unset", "0xffee", "revert"}, true, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"edns0", "local", "foo", "0xffee", "abcdefg"}, true, nil}, - {[]string{"edns0", "local", "set", "0xffee", "0xabcdefg"}, true, nil}, - {[]string{"edns0", "nsid", "set", "junk"}, true, nil}, - {[]string{"edns0", "nsid", "set"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "set", "revert"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "append"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "append", "revert"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "replace"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "replace", "revert"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "unset"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "unset", "revert"}, true, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"edns0", "nsid", "foo"}, true, nil}, - {[]string{"edns0", "local", "set", "invalid-uint", "{qname}"}, true, nil}, - {[]string{"edns0", "local", "set", "0xffee", "{dummy}"}, true, nil}, - {[]string{"edns0", "local", "set", "0xffee", "{qname}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{qtype}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{client_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{client_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{protocol}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{server_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{server_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "set", "0xffee", "{server_port}", "revert"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{dummy}"}, true, nil}, - {[]string{"edns0", "local", "append", "0xffee", "{qname}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{qtype}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{client_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{client_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{protocol}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{server_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{server_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "append", "0xffee", "{server_port}", "revert"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{dummy}"}, true, nil}, - {[]string{"edns0", "local", "replace", "0xffee", "{qname}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{qtype}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{client_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{client_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{protocol}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{server_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{server_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "local", "replace", "0xffee", "{server_port}", "revert"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"edns0", "subnet", "set", "-1", "56"}, true, nil}, - {[]string{"edns0", "subnet", "set", "24", "-56"}, true, nil}, - {[]string{"edns0", "subnet", "set", "33", "56"}, true, nil}, - {[]string{"edns0", "subnet", "set", "24", "129"}, true, nil}, - {[]string{"edns0", "subnet", "set", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "set", "24", "56", "revert"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "append", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "append", "24", "56", "72"}, true, nil}, - {[]string{"edns0", "subnet", "append", "24", "56", "revert"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "replace", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "replace", "24", "56", "revert"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "unset"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "unset", "24", "56"}, true, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"edns0", "subnet", "unset", "revert"}, true, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"unknown-action", "name", "a.com", "b.com"}, true, nil}, - {[]string{"stop", "name", "a.com", "b.com"}, false, reflect.TypeOf(&exactNameRule{})}, - {[]string{"continue", "name", "a.com", "b.com"}, false, reflect.TypeOf(&exactNameRule{})}, - {[]string{"unknown-action", "type", "any", "a"}, true, nil}, - {[]string{"stop", "type", "any", "a"}, false, reflect.TypeOf(&typeRule{})}, - {[]string{"continue", "type", "any", "a"}, false, reflect.TypeOf(&typeRule{})}, - {[]string{"unknown-action", "class", "ch", "in"}, true, nil}, - {[]string{"stop", "class", "ch", "in"}, false, reflect.TypeOf(&classRule{})}, - {[]string{"continue", "class", "ch", "in"}, false, reflect.TypeOf(&classRule{})}, - {[]string{"unknown-action", "edns0", "local", "set", "0xffee", "abcedef"}, true, nil}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "abcdefg"}, false, reflect.TypeOf(&edns0LocalRule{})}, - {[]string{"unknown-action", "edns0", "nsid", "set"}, true, nil}, - {[]string{"stop", "edns0", "nsid", "set"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"continue", "edns0", "nsid", "set"}, false, reflect.TypeOf(&edns0NsidRule{})}, - {[]string{"unknown-action", "edns0", "local", "set", "0xffee", "{qname}"}, true, nil}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{qname}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{qtype}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{client_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{client_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{protocol}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{server_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"stop", "edns0", "local", "set", "0xffee", "{server_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{qname}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{qtype}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{client_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{client_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{protocol}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{server_ip}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"continue", "edns0", "local", "set", "0xffee", "{server_port}"}, false, reflect.TypeOf(&edns0VariableRule{})}, - {[]string{"unknown-action", "edns0", "subnet", "set", "24", "64"}, true, nil}, - {[]string{"stop", "edns0", "subnet", "set", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"stop", "edns0", "subnet", "append", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"stop", "edns0", "subnet", "replace", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"stop", "edns0", "subnet", "unset"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"continue", "edns0", "subnet", "set", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"continue", "edns0", "subnet", "append", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"continue", "edns0", "subnet", "replace", "24", "56"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - {[]string{"continue", "edns0", "subnet", "unset"}, false, reflect.TypeOf(&edns0SubnetRule{})}, - } - - for i, tc := range tests { - r, err := newRule(tc.args...) - if err == nil && tc.shouldError { - t.Errorf("Test %d: expected error but got success", i) - } else if err != nil && !tc.shouldError { - t.Errorf("Test %d: expected success but got error: %s", i, err) - } - - if !tc.shouldError && reflect.TypeOf(r) != tc.expType { - t.Errorf("Test %d: expected %q but got %q", i, tc.expType, r) - } - } -} - -func TestRewriteDefaultRevertPolicy(t *testing.T) { - rules := []Rule{} - - r, _ := newNameRule("stop", "prefix", "prefix", "to") - rules = append(rules, r) - r, _ = newNameRule("stop", "suffix", ".suffix.", ".nl.") - rules = append(rules, r) - r, _ = newNameRule("stop", "substring", "from.substring", "to") - rules = append(rules, r) - r, _ = newNameRule("stop", "regex", "(f.*m)\\.regex\\.(nl)", "to.{2}") - rules = append(rules, r) - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - // use production (default) RevertPolicy - } - - tests := []struct { - from string - fromT uint16 - fromC uint16 - to string - toT uint16 - toC uint16 - }{ - {"prefix.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"to.suffix.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"from.substring.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"from.regex.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromT) - m.Question[0].Qclass = tc.fromC - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - - if resp.Question[0].Name != tc.from { - t.Errorf("Test %d: Expected Name in Question to be %q but was %q", i, tc.from, resp.Question[0].Name) - } - - if resp.Answer[0].Header().Name != tc.to { - t.Errorf("Test %d: Expected Name in Answer to be %q but was %q", i, tc.to, resp.Answer[0].Header().Name) - } - } -} - -func TestRewrite(t *testing.T) { - rules := []Rule{} - r, _ := newNameRule("stop", "from.nl.", "to.nl.") - rules = append(rules, r) - r, _ = newNameRule("stop", "regex", "(core)\\.(dns)\\.(rocks)\\.(nl)", "{2}.{1}.{3}.{4}", "answer", "name", "(dns)\\.(core)\\.(rocks)\\.(nl)", "{2}.{1}.{3}.{4}") - rules = append(rules, r) - r, _ = newNameRule("stop", "exact", "from.exact.nl.", "to.nl.") - rules = append(rules, r) - r, _ = newNameRule("stop", "prefix", "prefix", "to") - rules = append(rules, r) - r, _ = newNameRule("stop", "suffix", ".suffix.", ".nl.") - rules = append(rules, r) - r, _ = newNameRule("stop", "substring", "from.substring", "to") - rules = append(rules, r) - r, _ = newNameRule("stop", "regex", "(f.*m)\\.regex\\.(nl)", "to.{2}") - rules = append(rules, r) - r, _ = newNameRule("continue", "regex", "consul\\.(rocks)", "core.dns.{1}") - rules = append(rules, r) - r, _ = newNameRule("stop", "core.dns.rocks", "to.nl.") - rules = append(rules, r) - r, _ = newClassRule("continue", "HS", "CH") - rules = append(rules, r) - r, _ = newClassRule("stop", "CH", "IN") - rules = append(rules, r) - r, _ = newTypeRule("stop", "ANY", "HINFO") - rules = append(rules, r) - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - RevertPolicy: NoRevertPolicy(), - } - - tests := []struct { - from string - fromT uint16 - fromC uint16 - to string - toT uint16 - toC uint16 - }{ - {"from.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"a.nl.", dns.TypeA, dns.ClassINET, "a.nl.", dns.TypeA, dns.ClassINET}, - {"a.nl.", dns.TypeA, dns.ClassCHAOS, "a.nl.", dns.TypeA, dns.ClassINET}, - {"a.nl.", dns.TypeANY, dns.ClassINET, "a.nl.", dns.TypeHINFO, dns.ClassINET}, - // name is rewritten, type is not. - {"from.nl.", dns.TypeANY, dns.ClassINET, "to.nl.", dns.TypeANY, dns.ClassINET}, - {"from.exact.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"prefix.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"to.suffix.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"from.substring.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"from.regex.nl.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - {"consul.rocks.", dns.TypeA, dns.ClassINET, "to.nl.", dns.TypeA, dns.ClassINET}, - // name is not, type is, but class is, because class is the 2nd rule. - {"a.nl.", dns.TypeANY, dns.ClassCHAOS, "a.nl.", dns.TypeANY, dns.ClassINET}, - // class gets rewritten twice because of continue/stop logic: HS to CH, CH to IN - {"a.nl.", dns.TypeANY, 4, "a.nl.", dns.TypeANY, dns.ClassINET}, - {"core.dns.rocks.nl.", dns.TypeA, dns.ClassINET, "dns.core.rocks.nl.", dns.TypeA, dns.ClassINET}, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromT) - m.Question[0].Qclass = tc.fromC - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - if resp.Question[0].Name != tc.to { - t.Errorf("Test %d: Expected Name to be %q but was %q", i, tc.to, resp.Question[0].Name) - } - if resp.Question[0].Qtype != tc.toT { - t.Errorf("Test %d: Expected Type to be '%d' but was '%d'", i, tc.toT, resp.Question[0].Qtype) - } - if resp.Question[0].Qclass != tc.toC { - t.Errorf("Test %d: Expected Class to be '%d' but was '%d'", i, tc.toC, resp.Question[0].Qclass) - } - if tc.fromT == dns.TypeA && tc.toT == dns.TypeA { - if len(resp.Answer) > 0 { - if resp.Answer[0].(*dns.A).Hdr.Name != tc.to { - t.Errorf("Test %d: Expected Answer Name to be %q but was %q", i, tc.to, resp.Answer[0].(*dns.A).Hdr.Name) - } - } - } - } -} - -func TestRewriteEDNS0Local(t *testing.T) { - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - RevertPolicy: NoRevertPolicy(), - } - - tests := []struct { - fromOpts []dns.EDNS0 - args []string - toOpts []dns.EDNS0 - doBool bool - }{ - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "0xabcdef"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0xab, 0xcd, 0xef}}}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "append", "0xffee", "abcdefghijklmnop"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("abcdefghijklmnop")}}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "replace", "0xffee", "abcdefghijklmnop"}, - []dns.EDNS0{}, - true, - }, - { - []dns.EDNS0{}, - []string{"nsid", "set"}, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - false, - }, - { - []dns.EDNS0{}, - []string{"nsid", "append"}, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - true, - }, - { - []dns.EDNS0{}, - []string{"nsid", "replace"}, - []dns.EDNS0{}, - true, - }, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - m.Question[0].Qclass = dns.ClassINET - - r, err := newEdns0Rule("stop", tc.args...) - if err != nil { - t.Errorf("Error creating test rule: %s", err) - continue - } - rw.Rules = []Rule{r} - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - o := resp.IsEdns0() - o.SetDo(tc.doBool) - if o == nil { - t.Errorf("Test %d: EDNS0 options not set", i) - continue - } - if o.Do() != tc.doBool { - t.Errorf("Test %d: Expected %v but got %v", i, tc.doBool, o.Do()) - } - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} - -func TestEdns0MultiRule(t *testing.T) { - tests := []struct { - rules [][]string - fromOpts []dns.EDNS0 - toOpts []dns.EDNS0 - revertPolicy RevertPolicy - }{ - // Local. - { - [][]string{ - {"stop", "local", "replace", "0xffee", "abcdef"}, - {"stop", "local", "set", "0xffee", "fedcba"}, - }, - nil, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("fedcba")}}, - NoRevertPolicy(), - }, - { - [][]string{ - {"stop", "local", "replace", "0xffee", "abcdef"}, - {"stop", "local", "set", "0xffee", "fedcba"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("abcdef")}}, - NoRevertPolicy(), - }, - // Local with "revert". - { - [][]string{ - {"stop", "local", "replace", "0xffee", "abcdef", "revert"}, - {"stop", "local", "set", "0xffee", "fedcba", "revert"}, - }, - nil, - []dns.EDNS0{}, - NewRevertPolicy(false, false), - }, - { - [][]string{ - {"stop", "local", "replace", "0xffee", "abcdef", "revert"}, - {"stop", "local", "set", "0xffee", "fedcba", "revert"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - NewRevertPolicy(false, false), - }, - // Local variable. - { - [][]string{ - {"stop", "local", "replace", "0xffee", "{qname}"}, - {"stop", "local", "set", "0xffee", "{qtype}"}, - }, - nil, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x00, 0x01}}}, - NoRevertPolicy(), - }, - { - [][]string{ - {"stop", "local", "replace", "0xffee", "{qname}"}, - {"stop", "local", "set", "0xffee", "{qtype}"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("example.com.")}}, - NoRevertPolicy(), - }, - // Local variable with "revert". - { - [][]string{ - {"stop", "local", "replace", "0xffee", "{qname}", "revert"}, - {"stop", "local", "set", "0xffee", "{qtype}", "revert"}, - }, - nil, - []dns.EDNS0{}, - NewRevertPolicy(false, false), - }, - { - [][]string{ - {"stop", "local", "replace", "0xffee", "{qname}", "revert"}, - {"stop", "local", "set", "0xffee", "{qtype}", "revert"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - NewRevertPolicy(false, false), - }, - // Nsid. - { - [][]string{ - {"stop", "nsid", "replace"}, - {"stop", "nsid", "set"}, - }, - nil, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - NoRevertPolicy(), - }, - { - [][]string{ - {"stop", "nsid", "replace"}, - {"stop", "nsid", "set"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - NoRevertPolicy(), - }, - { - [][]string{ - {"stop", "nsid", "replace"}, - {"stop", "nsid", "set"}, - }, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - NoRevertPolicy(), - }, - // Nsid with "revert". - { - [][]string{ - {"stop", "nsid", "replace", "revert"}, - {"stop", "nsid", "set", "revert"}, - }, - nil, - []dns.EDNS0{}, - NewRevertPolicy(false, false), - }, - { - [][]string{ - {"stop", "nsid", "replace", "revert"}, - {"stop", "nsid", "set", "revert"}, - }, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - NewRevertPolicy(false, false), - }, - { - [][]string{ - {"stop", "nsid", "replace", "revert"}, - {"stop", "nsid", "set", "revert"}, - }, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - NewRevertPolicy(false, false), - }, - // Subnet. - { - [][]string{ - {"stop", "subnet", "replace", "32", "56"}, - {"stop", "subnet", "set", "0", "56"}, - }, - nil, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - NoRevertPolicy(), - }, - { - [][]string{ - {"stop", "subnet", "replace", "32", "56"}, - {"stop", "subnet", "set", "0", "56"}, - }, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x20, - SourceScope: 0x0, - Address: []byte{0x0A, 0xF0, 0x00, 0x01}, - }}, - NoRevertPolicy(), - }, - // Subnet with "revert". - { - [][]string{ - {"stop", "subnet", "replace", "32", "56", "revert"}, - {"stop", "subnet", "set", "0", "56", "revert"}, - }, - nil, - []dns.EDNS0{}, - NewRevertPolicy(false, false), - }, - { - [][]string{ - {"stop", "subnet", "replace", "32", "56", "revert"}, - {"stop", "subnet", "set", "0", "56", "revert"}, - }, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - NewRevertPolicy(false, false), - }, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - m.Question[0].Qclass = dns.ClassINET - if tc.fromOpts != nil { - o := m.IsEdns0() - if o == nil { - m.SetEdns0(4096, true) - o = m.IsEdns0() - } - o.Option = append(o.Option, tc.fromOpts...) - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - rules := make([]Rule, 0, len(tc.rules)) - for _, rule := range tc.rules { - r, _ := newEdns0Rule(rule[0], rule[1:]...) - rules = append(rules, r) - } - - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - RevertPolicy: tc.revertPolicy, - } - - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - o := resp.IsEdns0() - if o == nil { - t.Errorf("Test %d: EDNS0 options not set", i) - continue - } - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} - -func optsEqual(a, b []dns.EDNS0) bool { - if len(a) != len(b) { - return false - } - for i := range a { - switch aa := a[i].(type) { - case *dns.EDNS0_LOCAL: - if bb, ok := b[i].(*dns.EDNS0_LOCAL); ok { - if aa.Code != bb.Code { - return false - } - if !bytes.Equal(aa.Data, bb.Data) { - return false - } - } else { - return false - } - case *dns.EDNS0_NSID: - if bb, ok := b[i].(*dns.EDNS0_NSID); ok { - if aa.Nsid != bb.Nsid { - return false - } - } else { - return false - } - case *dns.EDNS0_SUBNET: - if bb, ok := b[i].(*dns.EDNS0_SUBNET); ok { - if aa.Code != bb.Code { - return false - } - if aa.Family != bb.Family { - return false - } - if aa.SourceNetmask != bb.SourceNetmask { - return false - } - if aa.SourceScope != bb.SourceScope { - return false - } - if !aa.Address.Equal(bb.Address) { - return false - } - } else { - return false - } - - default: - return false - } - } - return true -} - -type testProvider map[string]metadata.Func - -func (tp testProvider) Metadata(ctx context.Context, state request.Request) context.Context { - for k, v := range tp { - metadata.SetValueFunc(ctx, k, v) - } - return ctx -} - -func TestRewriteEDNS0LocalVariable(t *testing.T) { - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - RevertPolicy: NoRevertPolicy(), - } - - expectedMetadata := []metadata.Provider{ - testProvider{"test/label": func() string { return "my-value" }}, - testProvider{"test/empty": func() string { return "" }}, - } - - meta := metadata.Metadata{ - Zones: []string{"."}, - Providers: expectedMetadata, - Next: &rw, - } - - // test.ResponseWriter has the following values: - // The remote will always be 10.240.0.1 and port 40212. - // The local address is always 127.0.0.1 and port 53. - - tests := []struct { - fromOpts []dns.EDNS0 - args []string - toOpts []dns.EDNS0 - doBool bool - }{ - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{qname}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("example.com.")}}, - true, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{qtype}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x00, 0x01}}}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{client_ip}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x0A, 0xF0, 0x00, 0x01}}}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{client_port}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x9D, 0x14}}}, - true, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{protocol}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("udp")}}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{server_port}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x00, 0x35}}}, - true, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{server_ip}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0x7F, 0x00, 0x00, 0x01}}}, - true, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{test/label}"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("my-value")}}, - true, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{test/empty}"}, - nil, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "{test/does-not-exist}"}, - nil, - false, - }, - } - - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - - r, err := newEdns0Rule("stop", tc.args...) - if err != nil { - t.Errorf("Error creating test rule: %s", err) - continue - } - rw.Rules = []Rule{r} - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - ctx := meta.Collect(context.TODO(), request.Request{W: rec, Req: m}) - meta.ServeDNS(ctx, rec, m) - - resp := rec.Msg - o := resp.IsEdns0() - if o == nil { - if tc.toOpts != nil { - t.Errorf("Test %d: EDNS0 options not set", i) - } - continue - } - o.SetDo(tc.doBool) - if o.Do() != tc.doBool { - t.Errorf("Test %d: Expected %v but got %v", i, tc.doBool, o.Do()) - } - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} - -func TestRewriteEDNS0Subnet(t *testing.T) { - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - RevertPolicy: NoRevertPolicy(), - } - - tests := []struct { - writer dns.ResponseWriter - fromOpts []dns.EDNS0 - args []string - toOpts []dns.EDNS0 - doBool bool - }{ - { - &test.ResponseWriter{}, - []dns.EDNS0{}, - []string{"subnet", "set", "24", "56"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x18, - SourceScope: 0x0, - Address: []byte{0x0A, 0xF0, 0x00, 0x00}, - }}, - true, - }, - { - &test.ResponseWriter{}, - []dns.EDNS0{}, - []string{"subnet", "set", "32", "56"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x20, - SourceScope: 0x0, - Address: []byte{0x0A, 0xF0, 0x00, 0x01}, - }}, - false, - }, - { - &test.ResponseWriter{}, - []dns.EDNS0{}, - []string{"subnet", "set", "0", "56"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - false, - }, - { - &test.ResponseWriter6{}, - []dns.EDNS0{}, - []string{"subnet", "set", "24", "56"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x2, - SourceNetmask: 0x38, - SourceScope: 0x0, - Address: []byte{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - }}, - true, - }, - { - &test.ResponseWriter6{}, - []dns.EDNS0{}, - []string{"subnet", "set", "24", "128"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x2, - SourceNetmask: 0x80, - SourceScope: 0x0, - Address: []byte{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x00, 0xff, 0xfe, 0xca, 0x4c, 0x65}, - }}, - false, - }, - { - &test.ResponseWriter6{}, - []dns.EDNS0{}, - []string{"subnet", "set", "24", "0"}, - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x2, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - }}, - true, - }, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - - r, err := newEdns0Rule("stop", tc.args...) - if err != nil { - t.Errorf("Error creating test rule: %s", err) - continue - } - rw.Rules = []Rule{r} - rec := dnstest.NewRecorder(tc.writer) - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - o := resp.IsEdns0() - o.SetDo(tc.doBool) - if o == nil { - t.Errorf("Test %d: EDNS0 options not set", i) - continue - } - if o.Do() != tc.doBool { - t.Errorf("Test %d: Expected %v but got %v", i, tc.doBool, o.Do()) - } - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} - -func TestRewriteEDNS0Revert(t *testing.T) { - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - RevertPolicy: NewRevertPolicy(false, false), - } - - tests := []struct { - fromOpts []dns.EDNS0 - args []string - toOpts []dns.EDNS0 - doBool bool - }{ - { - []dns.EDNS0{}, - []string{"local", "set", "0xffee", "0xabcdef", "revert"}, - []dns.EDNS0{}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "append", "0xffee", "abcdefghijklmnop", "revert"}, - []dns.EDNS0{}, - false, - }, - { - []dns.EDNS0{}, - []string{"local", "replace", "0xffee", "abcdefghijklmnop", "revert"}, - []dns.EDNS0{}, - true, - }, - { - []dns.EDNS0{}, - []string{"nsid", "set", "revert"}, - []dns.EDNS0{}, - false, - }, - { - []dns.EDNS0{}, - []string{"nsid", "append", "revert"}, - []dns.EDNS0{}, - true, - }, - { - []dns.EDNS0{}, - []string{"nsid", "replace"}, - []dns.EDNS0{}, - true, - }, - - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffed, Data: []byte{0xab, 0xcd, 0xef}}}, - []string{"local", "set", "0xffee", "0xabcd", "revert"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffed, Data: []byte{0xab, 0xcd, 0xef}}}, - false, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffef, Data: []byte{0xab, 0xcd, 0xef}}}, - []string{"local", "replace", "0xffee", "abcdefghijklmnop"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffef, Data: []byte{0xab, 0xcd, 0xef}}}, - true, - }, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - m.Question[0].Qclass = dns.ClassINET - - r, err := newEdns0Rule("stop", tc.args...) - if err != nil { - t.Errorf("Error creating test rule: %s", err) - continue - } - rw.Rules = []Rule{r} - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - - resp := rec.Msg - o := resp.IsEdns0() - o.SetDo(tc.doBool) - if tc.fromOpts != nil { - o.Option = append(o.Option, tc.fromOpts...) - } - if o == nil { - t.Errorf("Test %d: EDNS0 options not set", i) - continue - } - if o.Do() != tc.doBool { - t.Errorf("Test %d: Expected %v but got %v", i, tc.doBool, o.Do()) - } - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} - -func TestRewriteEDNS0Unset(t *testing.T) { - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - RevertPolicy: NewRevertPolicy(false, false), - } - - tests := []struct { - fromOpts []dns.EDNS0 - args []string - toOpts []dns.EDNS0 - }{ - { - []dns.EDNS0{}, - []string{"local", "unset", "0xffee"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0xab, 0xcd, 0xef}}}, - []string{"local", "unset", "0xffee"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0xab, 0xcd, 0xef}}}, - []string{"local", "unset", "0xffed"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte{0xab, 0xcd, 0xef}}}, - }, - { - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []string{"nsid", "unset"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{}, - []string{"nsid", "unset"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{&dns.EDNS0_SUBNET{Code: 0x8, - Family: 0x1, - SourceNetmask: 0x0, - SourceScope: 0x0, - Address: []byte{0x00, 0x00, 0x00, 0x00}, - }}, - []string{"subnet", "unset"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{}, - []string{"subnet", "unset"}, - []dns.EDNS0{}, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []string{"nsid", "unset"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}}, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []string{"local", "unset", "0xffee"}, - []dns.EDNS0{&dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - }, - { - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - []string{"subnet", "unset"}, - []dns.EDNS0{&dns.EDNS0_LOCAL{Code: 0xffee, Data: []byte("foobar")}, &dns.EDNS0_NSID{Code: dns.EDNS0NSID, Nsid: ""}}, - }, - } - - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion("example.com.", dns.TypeA) - m.Question[0].Qclass = dns.ClassINET - o := m.IsEdns0() - if tc.fromOpts != nil { - if o == nil { - m.SetEdns0(4096, true) - o = m.IsEdns0() - } - o.Option = append(o.Option, tc.fromOpts...) - } - - r, err := newEdns0Rule("stop", tc.args...) - if err != nil { - t.Errorf("Error creating test rule: %s", err) - continue - } - rw.Rules = []Rule{r} - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - - if !optsEqual(o.Option, tc.toOpts) { - t.Errorf("Test %d: Expected %v but got %v", i, tc.toOpts, o) - } - } -} diff --git a/plugin/rewrite/setup.go b/plugin/rewrite/setup.go deleted file mode 100644 index 36f31dcf24..0000000000 --- a/plugin/rewrite/setup.go +++ /dev/null @@ -1,42 +0,0 @@ -package rewrite - -import ( - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("rewrite", setup) } - -func setup(c *caddy.Controller) error { - rewrites, err := rewriteParse(c) - if err != nil { - return plugin.Error("rewrite", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return Rewrite{Next: next, Rules: rewrites} - }) - - return nil -} - -func rewriteParse(c *caddy.Controller) ([]Rule, error) { - var rules []Rule - - for c.Next() { - args := c.RemainingArgs() - if len(args) < 2 { - // Handles rules out of nested instructions, i.e. the ones enclosed in curly brackets - for c.NextBlock() { - args = append(args, c.Val()) - } - } - rule, err := newRule(args...) - if err != nil { - return nil, err - } - rules = append(rules, rule) - } - return rules, nil -} diff --git a/plugin/rewrite/setup_test.go b/plugin/rewrite/setup_test.go deleted file mode 100644 index 88d332fb4b..0000000000 --- a/plugin/rewrite/setup_test.go +++ /dev/null @@ -1,51 +0,0 @@ -package rewrite - -import ( - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestParse(t *testing.T) { - tests := []struct { - inputFileRules string - shouldErr bool - errContains string - }{ - // parse errors - {`rewrite`, true, ""}, - {`rewrite name`, true, ""}, - {`rewrite name a.com b.com`, false, ""}, - {`rewrite stop { - name regex foo bar - answer name bar foo -}`, false, ""}, - {`rewrite stop name regex foo bar answer name bar foo`, false, ""}, - {`rewrite stop { - name regex foo bar - answer name bar foo - name baz -}`, true, "2 arguments required"}, - {`rewrite stop { - answer name bar foo - name regex foo bar -}`, true, "must begin with a name rule"}, - {`rewrite stop`, true, ""}, - {`rewrite continue`, true, ""}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - _, err := rewriteParse(c) - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error\n---\n%s", i, test.inputFileRules) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'\n---\n%s", i, err, test.inputFileRules) - } - - if err != nil && test.errContains != "" && !strings.Contains(err.Error(), test.errContains) { - t.Errorf("Test %d got wrong error for invalid response rewrite: '%v'\n---\n%s", i, err.Error(), test.inputFileRules) - } - } -} diff --git a/plugin/rewrite/ttl.go b/plugin/rewrite/ttl.go deleted file mode 100644 index 5430fc9239..0000000000 --- a/plugin/rewrite/ttl.go +++ /dev/null @@ -1,205 +0,0 @@ -package rewrite - -import ( - "context" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -type ttlResponseRule struct { - minTTL uint32 - maxTTL uint32 -} - -func (r *ttlResponseRule) RewriteResponse(res *dns.Msg, rr dns.RR) { - if rr.Header().Ttl < r.minTTL { - rr.Header().Ttl = r.minTTL - } else if rr.Header().Ttl > r.maxTTL { - rr.Header().Ttl = r.maxTTL - } -} - -type ttlRuleBase struct { - nextAction string - response ttlResponseRule -} - -func newTTLRuleBase(nextAction string, minTtl, maxTtl uint32) ttlRuleBase { - return ttlRuleBase{ - nextAction: nextAction, - response: ttlResponseRule{minTTL: minTtl, maxTTL: maxTtl}, - } -} - -func (rule *ttlRuleBase) responseRule(match bool) (ResponseRules, Result) { - if match { - return ResponseRules{&rule.response}, RewriteDone - } - return nil, RewriteIgnored -} - -// Mode returns the processing nextAction -func (rule *ttlRuleBase) Mode() string { return rule.nextAction } - -type exactTTLRule struct { - ttlRuleBase - From string -} - -type prefixTTLRule struct { - ttlRuleBase - Prefix string -} - -type suffixTTLRule struct { - ttlRuleBase - Suffix string -} - -type substringTTLRule struct { - ttlRuleBase - Substring string -} - -type regexTTLRule struct { - ttlRuleBase - Pattern *regexp.Regexp -} - -// Rewrite rewrites the current request based upon exact match of the name -// in the question section of the request. -func (rule *exactTTLRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(rule.From == state.Name()) -} - -// Rewrite rewrites the current request when the name begins with the matching string. -func (rule *prefixTTLRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.HasPrefix(state.Name(), rule.Prefix)) -} - -// Rewrite rewrites the current request when the name ends with the matching string. -func (rule *suffixTTLRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.HasSuffix(state.Name(), rule.Suffix)) -} - -// Rewrite rewrites the current request based upon partial match of the -// name in the question section of the request. -func (rule *substringTTLRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(strings.Contains(state.Name(), rule.Substring)) -} - -// Rewrite rewrites the current request when the name in the question -// section of the request matches a regular expression. -func (rule *regexTTLRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - return rule.responseRule(len(rule.Pattern.FindStringSubmatch(state.Name())) != 0) -} - -// newTTLRule creates a name matching rule based on exact, partial, or regex match -func newTTLRule(nextAction string, args ...string) (Rule, error) { - if len(args) < 2 { - return nil, fmt.Errorf("too few (%d) arguments for a ttl rule", len(args)) - } - var s string - if len(args) == 2 { - s = args[1] - } - if len(args) == 3 { - s = args[2] - } - minTtl, maxTtl, valid := isValidTTL(s) - if !valid { - return nil, fmt.Errorf("invalid TTL '%s' for a ttl rule", s) - } - if len(args) == 3 { - switch strings.ToLower(args[0]) { - case ExactMatch: - return &exactTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - plugin.Name(args[1]).Normalize(), - }, nil - case PrefixMatch: - return &prefixTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - plugin.Name(args[1]).Normalize(), - }, nil - case SuffixMatch: - return &suffixTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - plugin.Name(args[1]).Normalize(), - }, nil - case SubstringMatch: - return &substringTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - plugin.Name(args[1]).Normalize(), - }, nil - case RegexMatch: - regexPattern, err := regexp.Compile(args[1]) - if err != nil { - return nil, fmt.Errorf("invalid regex pattern in a ttl rule: %s", args[1]) - } - return ®exTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - regexPattern, - }, nil - default: - return nil, fmt.Errorf("ttl rule supports only exact, prefix, suffix, substring, and regex name matching") - } - } - if len(args) > 3 { - return nil, fmt.Errorf("many few arguments for a ttl rule") - } - return &exactTTLRule{ - newTTLRuleBase(nextAction, minTtl, maxTtl), - plugin.Name(args[0]).Normalize(), - }, nil -} - -// validTTL returns true if v is valid TTL value. -func isValidTTL(v string) (uint32, uint32, bool) { - s := strings.Split(v, "-") - if len(s) == 1 { - i, err := strconv.ParseUint(s[0], 10, 32) - if err != nil { - return 0, 0, false - } - return uint32(i), uint32(i), true - } - if len(s) == 2 { - var min, max uint64 - var err error - if s[0] == "" { - min = 0 - } else { - min, err = strconv.ParseUint(s[0], 10, 32) - if err != nil { - return 0, 0, false - } - } - if s[1] == "" { - if s[0] == "" { - // explicitly reject ttl directive "-" that would otherwise be interpreted - // as 0-2147483647 which is pretty useless - return 0, 0, false - } - max = 2147483647 - } else { - max, err = strconv.ParseUint(s[1], 10, 32) - if err != nil { - return 0, 0, false - } - } - if min > max { - // reject invalid range - return 0, 0, false - } - return uint32(min), uint32(max), true - } - return 0, 0, false -} diff --git a/plugin/rewrite/ttl_test.go b/plugin/rewrite/ttl_test.go deleted file mode 100644 index 6fab89279b..0000000000 --- a/plugin/rewrite/ttl_test.go +++ /dev/null @@ -1,158 +0,0 @@ -package rewrite - -import ( - "context" - "reflect" - "testing" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestNewTTLRule(t *testing.T) { - tests := []struct { - next string - args []string - expectedFail bool - }{ - {"stop", []string{"srv1.coredns.rocks", "10"}, false}, - {"stop", []string{"exact", "srv1.coredns.rocks", "15"}, false}, - {"stop", []string{"prefix", "coredns.rocks", "20"}, false}, - {"stop", []string{"suffix", "srv1", "25"}, false}, - {"stop", []string{"substring", "coredns", "30"}, false}, - {"stop", []string{"regex", `(srv1)\.(coredns)\.(rocks)`, "35"}, false}, - {"continue", []string{"srv1.coredns.rocks", "10"}, false}, - {"continue", []string{"exact", "srv1.coredns.rocks", "15"}, false}, - {"continue", []string{"prefix", "coredns.rocks", "20"}, false}, - {"continue", []string{"suffix", "srv1", "25"}, false}, - {"continue", []string{"substring", "coredns", "30"}, false}, - {"continue", []string{"regex", `(srv1)\.(coredns)\.(rocks)`, "35"}, false}, - {"stop", []string{"srv1.coredns.rocks", "12345678901234567890"}, true}, - {"stop", []string{"srv1.coredns.rocks", "coredns.rocks"}, true}, - {"stop", []string{"srv1.coredns.rocks", "#1"}, true}, - {"stop", []string{"range.coredns.rocks", "1-2"}, false}, - {"stop", []string{"ceil.coredns.rocks", "-2"}, false}, - {"stop", []string{"floor.coredns.rocks", "1-"}, false}, - {"stop", []string{"range.coredns.rocks", "2-2"}, false}, - {"stop", []string{"invalid.coredns.rocks", "-"}, true}, - {"stop", []string{"invalid.coredns.rocks", "2-1"}, true}, - {"stop", []string{"invalid.coredns.rocks", "5-10-20"}, true}, - } - for i, tc := range tests { - failed := false - rule, err := newTTLRule(tc.next, tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - continue - } - if failed && tc.expectedFail { - continue - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule) - } - for i, tc := range tests { - failed := false - tc.args = append([]string{tc.next, "ttl"}, tc.args...) - rule, err := newRule(tc.args...) - if err != nil { - failed = true - } - if !failed && !tc.expectedFail { - continue - } - if failed && tc.expectedFail { - continue - } - t.Fatalf("Test %d: FAIL, expected fail=%t, but received fail=%t: (%s) %s, rule=%v", i, tc.expectedFail, failed, tc.next, tc.args, rule) - } -} - -func TestTtlRewrite(t *testing.T) { - rules := []Rule{} - ruleset := []struct { - args []string - expectedType reflect.Type - }{ - {[]string{"stop", "ttl", "srv1.coredns.rocks", "1"}, reflect.TypeOf(&exactTTLRule{})}, - {[]string{"stop", "ttl", "exact", "srv15.coredns.rocks", "15"}, reflect.TypeOf(&exactTTLRule{})}, - {[]string{"stop", "ttl", "prefix", "srv30", "30"}, reflect.TypeOf(&prefixTTLRule{})}, - {[]string{"stop", "ttl", "suffix", "45.coredns.rocks", "45"}, reflect.TypeOf(&suffixTTLRule{})}, - {[]string{"stop", "ttl", "substring", "rv50", "50"}, reflect.TypeOf(&substringTTLRule{})}, - {[]string{"stop", "ttl", "regex", `(srv10)\.(coredns)\.(rocks)`, "10"}, reflect.TypeOf(®exTTLRule{})}, - {[]string{"stop", "ttl", "regex", `(srv20)\.(coredns)\.(rocks)`, "20"}, reflect.TypeOf(®exTTLRule{})}, - {[]string{"stop", "ttl", "range.example.com.", "30-300"}, reflect.TypeOf(&exactTTLRule{})}, - {[]string{"stop", "ttl", "ceil.example.com.", "-11"}, reflect.TypeOf(&exactTTLRule{})}, - {[]string{"stop", "ttl", "floor.example.com.", "5-"}, reflect.TypeOf(&exactTTLRule{})}, - } - for i, r := range ruleset { - rule, err := newRule(r.args...) - if err != nil { - t.Fatalf("Rule %d: FAIL, %s: %s", i, r.args, err) - } - if reflect.TypeOf(rule) != r.expectedType { - t.Fatalf("Rule %d: FAIL, %s: rule type mismatch, expected %q, but got %q", i, r.args, r.expectedType, rule) - } - rules = append(rules, rule) - } - doTTLTests(t, rules) -} - -func doTTLTests(t *testing.T, rules []Rule) { - t.Helper() - tests := []struct { - from string - fromType uint16 - answer []dns.RR - ttl uint32 - noRewrite bool - }{ - {"srv1.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv1.coredns.rocks. 5 IN A 10.0.0.1")}, 1, false}, - {"srv15.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv15.coredns.rocks. 5 IN A 10.0.0.15")}, 15, false}, - {"srv30.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv30.coredns.rocks. 5 IN A 10.0.0.30")}, 30, false}, - {"srv45.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv45.coredns.rocks. 5 IN A 10.0.0.45")}, 45, false}, - {"srv50.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv50.coredns.rocks. 5 IN A 10.0.0.50")}, 50, false}, - {"srv10.coredns.rocks.", dns.TypeA, []dns.RR{test.A("srv10.coredns.rocks. 5 IN A 10.0.0.10")}, 10, false}, - {"xmpp.coredns.rocks.", dns.TypeSRV, []dns.RR{test.SRV("xmpp.coredns.rocks. 5 IN SRV 0 100 100 srvxmpp.coredns.rocks.")}, 5, true}, - {"srv15.coredns.rocks.", dns.TypeHINFO, []dns.RR{test.HINFO("srv15.coredns.rocks. 5 HINFO INTEL-64 \"RHEL 7.5\"")}, 15, false}, - {"srv20.coredns.rocks.", dns.TypeA, []dns.RR{ - test.A("srv20.coredns.rocks. 5 IN A 10.0.0.22"), - test.A("srv20.coredns.rocks. 5 IN A 10.0.0.23"), - }, 20, false}, - {"range.example.com.", dns.TypeA, []dns.RR{test.A("range.example.com. 5 IN A 10.0.0.1")}, 30, false}, - {"range.example.com.", dns.TypeA, []dns.RR{test.A("range.example.com. 55 IN A 10.0.0.1")}, 55, false}, - {"range.example.com.", dns.TypeA, []dns.RR{test.A("range.example.com. 500 IN A 10.0.0.1")}, 300, false}, - {"ceil.example.com.", dns.TypeA, []dns.RR{test.A("ceil.example.com. 5 IN A 10.0.0.1")}, 5, false}, - {"ceil.example.com.", dns.TypeA, []dns.RR{test.A("ceil.example.com. 15 IN A 10.0.0.1")}, 11, false}, - {"floor.example.com.", dns.TypeA, []dns.RR{test.A("floor.example.com. 0 IN A 10.0.0.1")}, 5, false}, - {"floor.example.com.", dns.TypeA, []dns.RR{test.A("floor.example.com. 30 IN A 10.0.0.1")}, 30, false}, - } - ctx := context.TODO() - for i, tc := range tests { - m := new(dns.Msg) - m.SetQuestion(tc.from, tc.fromType) - m.Question[0].Qclass = dns.ClassINET - m.Answer = tc.answer - rw := Rewrite{ - Next: plugin.HandlerFunc(msgPrinter), - Rules: rules, - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - rw.ServeDNS(ctx, rec, m) - resp := rec.Msg - if len(resp.Answer) == 0 { - t.Errorf("Test %d: FAIL %s (%d) Expected valid response but received %q", i, tc.from, tc.fromType, resp) - continue - } - for _, a := range resp.Answer { - if a.Header().Ttl != tc.ttl { - t.Errorf("Test %d: FAIL %s (%d) Expected TTL to be %d but was %d", i, tc.from, tc.fromType, tc.ttl, a.Header().Ttl) - break - } - } - } -} diff --git a/plugin/rewrite/type.go b/plugin/rewrite/type.go deleted file mode 100644 index 63796e9dc5..0000000000 --- a/plugin/rewrite/type.go +++ /dev/null @@ -1,45 +0,0 @@ -// Package rewrite is a plugin for rewriting requests internally to something different. -package rewrite - -import ( - "context" - "fmt" - "strings" - - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// typeRule is a type rewrite rule. -type typeRule struct { - fromType uint16 - toType uint16 - nextAction string -} - -func newTypeRule(nextAction string, args ...string) (Rule, error) { - var from, to uint16 - var ok bool - if from, ok = dns.StringToType[strings.ToUpper(args[0])]; !ok { - return nil, fmt.Errorf("invalid type %q", strings.ToUpper(args[0])) - } - if to, ok = dns.StringToType[strings.ToUpper(args[1])]; !ok { - return nil, fmt.Errorf("invalid type %q", strings.ToUpper(args[1])) - } - return &typeRule{from, to, nextAction}, nil -} - -// Rewrite rewrites the current request. -func (rule *typeRule) Rewrite(ctx context.Context, state request.Request) (ResponseRules, Result) { - if rule.fromType > 0 && rule.toType > 0 { - if state.QType() == rule.fromType { - state.Req.Question[0].Qtype = rule.toType - return nil, RewriteDone - } - } - return nil, RewriteIgnored -} - -// Mode returns the processing mode. -func (rule *typeRule) Mode() string { return rule.nextAction } diff --git a/plugin/rewrite/wire.go b/plugin/rewrite/wire.go deleted file mode 100644 index df25f7faa0..0000000000 --- a/plugin/rewrite/wire.go +++ /dev/null @@ -1,35 +0,0 @@ -package rewrite - -import ( - "encoding/binary" - "fmt" - "net" - "strconv" -) - -// ipToWire writes IP address to wire/binary format, 4 or 16 bytes depends on IPV4 or IPV6. -func ipToWire(family int, ipAddr string) ([]byte, error) { - switch family { - case 1: - return net.ParseIP(ipAddr).To4(), nil - case 2: - return net.ParseIP(ipAddr).To16(), nil - } - return nil, fmt.Errorf("invalid IP address family (i.e. version) %d", family) -} - -// uint16ToWire writes unit16 to wire/binary format -func uint16ToWire(data uint16) []byte { - buf := make([]byte, 2) - binary.BigEndian.PutUint16(buf, data) - return buf -} - -// portToWire writes port to wire/binary format, 2 bytes -func portToWire(portStr string) ([]byte, error) { - port, err := strconv.ParseUint(portStr, 10, 16) - if err != nil { - return nil, err - } - return uint16ToWire(uint16(port)), nil -} diff --git a/plugin/root/README.md b/plugin/root/README.md deleted file mode 100644 index 4873fbab93..0000000000 --- a/plugin/root/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# root - -## Name - -*root* - simply specifies the root of where to find files. - -## Description - -The default root is the current working directory of CoreDNS. The *root* plugin allows you to change -this. A relative root path is relative to the current working directory. -**NOTE: The *root* directory is NOT currently supported by all plugins.** -Currently the following plugins respect the *root* plugin configuration: - -* *file* -* *tls* -* *dnssec* - -This plugin can only be used once per Server Block. - -## Syntax - -~~~ txt -root PATH -~~~ - -**PATH** is the directory to set as CoreDNS' root. - -## Examples - -Serve zone data (when the *file* plugin is used) from `/etc/coredns/zones`: - -~~~ corefile -. { - root /etc/coredns/zones -} -~~~ - -When you use the *root* and *tls* plugin together, your cert and key should also be placed in the *root* directory. -The example below will look for `/config/cert.pem` and `/config/key.pem` - -~~~ txt -tls://example.com:853 { - root /config - tls cert.pem key.pem - whoami -} -~~~ - -## Bugs - -**NOTE: The *root* directory is NOT currently supported by all plugins.** -Currently the following plugins respect the *root* plugin configuration: - -* *file* -* *tls* -* *dnssec* diff --git a/plugin/root/log_test.go b/plugin/root/log_test.go deleted file mode 100644 index f63caac29a..0000000000 --- a/plugin/root/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package root - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/root/root.go b/plugin/root/root.go deleted file mode 100644 index b81fe84abe..0000000000 --- a/plugin/root/root.go +++ /dev/null @@ -1,38 +0,0 @@ -package root - -import ( - "os" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - clog "github.com/coredns/coredns/plugin/pkg/log" -) - -var log = clog.NewWithPlugin("root") - -func init() { plugin.Register("root", setup) } - -func setup(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - - for c.Next() { - if !c.NextArg() { - return plugin.Error("root", c.ArgErr()) - } - config.Root = c.Val() - } - - // Check if root path exists - _, err := os.Stat(config.Root) - if err != nil { - if !os.IsNotExist(err) { - return plugin.Error("root", c.Errf("unable to access root path '%s': %v", config.Root, err)) - } - // Allow this, because the folder might appear later. - // But make sure the user knows! - log.Warningf("Root path does not exist: %s", config.Root) - } - - return nil -} diff --git a/plugin/root/root_test.go b/plugin/root/root_test.go deleted file mode 100644 index f929124517..0000000000 --- a/plugin/root/root_test.go +++ /dev/null @@ -1,102 +0,0 @@ -package root - -import ( - "fmt" - "os" - "path/filepath" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestRoot(t *testing.T) { - // Predefined error substrings - parseErrContent := "Error during parsing:" - unableToAccessErrContent := "unable to access root path" - - existingDirPath, err := getTempDirPath() - if err != nil { - t.Fatalf("BeforeTest: Failed to find an existing directory for testing! Error was: %v", err) - } - - nonExistingDir := filepath.Join(existingDirPath, "highly_unlikely_to_exist_dir") - - existingFile, err := os.CreateTemp(t.TempDir(), "root_test") - if err != nil { - t.Fatalf("BeforeTest: Failed to create temp file for testing! Error was: %v", err) - } - defer func() { - existingFile.Close() - os.Remove(existingFile.Name()) - }() - - inaccessiblePath := getInaccessiblePath(existingFile.Name()) - - tests := []struct { - input string - shouldErr bool - expectedRoot string // expected root, set to the controller. Empty for negative cases. - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - { - fmt.Sprintf(`root %s`, nonExistingDir), false, nonExistingDir, "", - }, - { - fmt.Sprintf(`root %s`, existingDirPath), false, existingDirPath, "", - }, - // negative - { - `root `, true, "", parseErrContent, - }, - { - fmt.Sprintf(`root %s`, inaccessiblePath), true, "", unableToAccessErrContent, - }, - { - fmt.Sprintf(`root { - %s - }`, existingDirPath), true, "", parseErrContent, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - cfg := dnsserver.GetConfig(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - - // check root only if we are in a positive test. - if !test.shouldErr && test.expectedRoot != cfg.Root { - t.Errorf("Root not correctly set for input %s. Expected: %s, actual: %s", test.input, test.expectedRoot, cfg.Root) - } - } -} - -// getTempDirPath returns the path to the system temp directory. If it does not exist - an error is returned. -func getTempDirPath() (string, error) { - tempDir := os.TempDir() - _, err := os.Stat(tempDir) - if err != nil { - return "", err - } - return tempDir, nil -} - -func getInaccessiblePath(file string) string { - return filepath.Join("C:", "file\x00name") // null byte in filename is not allowed on Windows AND unix -} diff --git a/plugin/route53/README.md b/plugin/route53/README.md deleted file mode 100644 index d3f982d17a..0000000000 --- a/plugin/route53/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# route53 - -## Name - -*route53* - enables serving zone data from AWS route53. - -## Description - -The route53 plugin is useful for serving zones from resource record -sets in AWS route53. This plugin supports all Amazon Route 53 records -([https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html)). -The route53 plugin can be used when CoreDNS is deployed on AWS or elsewhere. - -## Syntax - -~~~ txt -route53 [ZONE:HOSTED_ZONE_ID...] { - aws_access_key [AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY] # Deprecated, uses other authentication methods instead. - aws_endpoint ENDPOINT - credentials PROFILE [FILENAME] - fallthrough [ZONES...] - refresh DURATION -} -~~~ - -* **ZONE** the name of the domain to be accessed. When there are multiple zones with overlapping - domains (private vs. public hosted zone), CoreDNS does the lookup in the given order here. - Therefore, for a non-existing resource record, SOA response will be from the rightmost zone. - -* **HOSTED\_ZONE\_ID** the ID of the hosted zone that contains the resource record sets to be - accessed. - -* **AWS\_ACCESS\_KEY\_ID** and **AWS\_SECRET\_ACCESS\_KEY** the AWS access key ID and secret access key - to be used when querying AWS (optional). If they are not provided, CoreDNS tries to access - AWS credentials the same way as AWS CLI - environment variables, shared credential file (and optionally - shared config file if `AWS_SDK_LOAD_CONFIG` env is set), and lastly EC2 Instance Roles. - Note the usage of `aws_access_key` has been deprecated and may be removed in future versions. Instead, - user can use other methods to pass crentials, e.g., with environmental variable `AWS_ACCESS_KEY_ID` and - `AWS_SECRET_ACCESS_KEY`, respectively. - -* `aws_endpoint` can be used to control the endpoint to use when querying AWS (optional). **ENDPOINT** is the - URL of the endpoint to use. If this is not provided the default AWS endpoint resolution will occur. - -* `credentials` is used for overriding the shared credentials **FILENAME** and the **PROFILE** name for a - given zone. **PROFILE** is the AWS account profile name. Defaults to `default`. **FILENAME** is the - AWS shared credentials filename, defaults to `~/.aws/credentials`. CoreDNS will only load shared credentials - file and not shared config file (`~/.aws/config`) by default. Set `AWS_SDK_LOAD_CONFIG` env variable to - a truthy value to enable also loading of `~/.aws/config` (e.g. if you want to provide assumed IAM role - configuration). Will be ignored if static keys are set via `aws_access_key`. - -* `fallthrough` If zone matches and no record can be generated, pass request to the next plugin. - If **ZONES** is omitted, then fallthrough happens for all zones for which the plugin is - authoritative. If specific zones are listed (for example `in-addr.arpa` and `ip6.arpa`), then - only queries for those zones will be subject to fallthrough. - -* `refresh` can be used to control how long between record retrievals from Route 53. It requires - a duration string as a parameter to specify the duration between update cycles. Each update - cycle may result in many AWS API calls depending on how many domains use this plugin and how - many records are in each. Adjusting the update frequency may help reduce the potential of API - rate-limiting imposed by AWS. - -* **DURATION** A duration string. Defaults to `1m`. If units are unspecified, seconds are assumed. - -## Examples - -Enable route53 with implicit AWS credentials and resolve CNAMEs via 10.0.0.1: - -~~~ txt -example.org { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 -} - -. { - forward . 10.0.0.1 -} -~~~ - -Enable route53 with explicit AWS credentials: - -~~~ txt -example.org { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 { - aws_access_key AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY # Deprecated, uses other authentication methods instead. - } -} -~~~ - -Enable route53 with an explicit AWS endpoint: - -~~~ txt -example.org { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 { - aws_endpoint https://test.us-west-2.amazonaws.com - } -} -~~~ - -Enable route53 with fallthrough: - -~~~ txt -. { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.gov.:Z654321543245 { - fallthrough example.gov. - } -} -~~~ - -Enable route53 with multiple hosted zones with the same domain: - -~~~ txt -example.org { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 example.org.:Z93A52145678156 -} -~~~ - -Enable route53 and refresh records every 3 minutes -~~~ txt -example.org { - route53 example.org.:Z1Z2Z3Z4DZ5Z6Z7 { - refresh 3m - } -} -~~~ - -## Authentication - -Route53 plugin uses [AWS Go SDK](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) -for authentication, where there is a list of accepted configuration methods. -Note the usage of `aws_access_key` in Corefile has been deprecated and may be removed in future versions. Instead, -user can use other methods to pass crentials, e.g., with environmental variable `AWS_ACCESS_KEY_ID` and -`AWS_SECRET_ACCESS_KEY`, respectively. diff --git a/plugin/route53/log_test.go b/plugin/route53/log_test.go deleted file mode 100644 index 20d1f87bd7..0000000000 --- a/plugin/route53/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package route53 - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/route53/route53.go b/plugin/route53/route53.go deleted file mode 100644 index 4d31f7dec9..0000000000 --- a/plugin/route53/route53.go +++ /dev/null @@ -1,301 +0,0 @@ -// Package route53 implements a plugin that returns resource records -// from AWS route53. -package route53 - -import ( - "context" - "errors" - "fmt" - "strconv" - "strings" - "sync" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/pkg/upstream" - "github.com/coredns/coredns/request" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/route53" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/miekg/dns" -) - -// Route53 is a plugin that returns RR from AWS route53. -type Route53 struct { - Next plugin.Handler - Fall fall.F - - zoneNames []string - client route53Client - upstream *upstream.Upstream - refresh time.Duration - - zMu sync.RWMutex - zones zones -} - -type zone struct { - id string - z *file.Zone - dns string -} - -type zones map[string][]*zone - -// New reads from the keys map which uses domain names as its key and hosted -// zone id lists as its values, validates that each domain name/zone id pair -// does exist, and returns a new *Route53. In addition to this, upstream is use -// for doing recursive queries against CNAMEs. Returns error if it cannot -// verify any given domain name/zone id pair. -func New(ctx context.Context, c route53Client, keys map[string][]string, refresh time.Duration) (*Route53, error) { - zones := make(map[string][]*zone, len(keys)) - zoneNames := make([]string, 0, len(keys)) - for dns, hostedZoneIDs := range keys { - for _, hostedZoneID := range hostedZoneIDs { - _, err := c.ListHostedZonesByName(ctx, &route53.ListHostedZonesByNameInput{ - DNSName: aws.String(dns), - HostedZoneId: aws.String(hostedZoneID), - }) - if err != nil { - return nil, err - } - if _, ok := zones[dns]; !ok { - zoneNames = append(zoneNames, dns) - } - zones[dns] = append(zones[dns], &zone{id: hostedZoneID, dns: dns, z: file.NewZone(dns, "")}) - } - } - return &Route53{ - client: c, - zoneNames: zoneNames, - zones: zones, - upstream: upstream.New(), - refresh: refresh, - }, nil -} - -// Run executes first update, spins up an update forever-loop. -// Returns error if first update fails. -func (h *Route53) Run(ctx context.Context) error { - if err := h.updateZones(ctx); err != nil { - return err - } - go func() { - timer := time.NewTimer(h.refresh) - defer timer.Stop() - for { - timer.Reset(h.refresh) - select { - case <-ctx.Done(): - log.Debugf("Breaking out of Route53 update loop for %v: %v", h.zoneNames, ctx.Err()) - return - case <-timer.C: - if err := h.updateZones(ctx); err != nil && ctx.Err() == nil /* Don't log error if ctx expired. */ { - log.Errorf("Failed to update zones %v: %v", h.zoneNames, err) - } - } - } - }() - return nil -} - -// ServeDNS implements the plugin.Handler.ServeDNS. -func (h *Route53) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - - zName := plugin.Zones(h.zoneNames).Matches(qname) - if zName == "" { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - z, ok := h.zones[zName] - if !ok || z == nil { - return dns.RcodeServerFailure, nil - } - - m := new(dns.Msg) - m.SetReply(r) - m.Authoritative = true - var result file.Result - for _, hostedZone := range z { - h.zMu.RLock() - m.Answer, m.Ns, m.Extra, result = hostedZone.z.Lookup(ctx, state, qname) - h.zMu.RUnlock() - - // Take the answer if it's non-empty OR if there is another - // record type exists for this name (NODATA). - if len(m.Answer) != 0 || result == file.NoData { - break - } - } - - if len(m.Answer) == 0 && result != file.NoData && h.Fall.Through(qname) { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - switch result { - case file.Success: - case file.NoData: - case file.NameError: - m.Rcode = dns.RcodeNameError - case file.Delegation: - m.Authoritative = false - case file.ServerFailure: - return dns.RcodeServerFailure, nil - } - - w.WriteMsg(m) - return dns.RcodeSuccess, nil -} - -const escapeSeq = "\\" - -// maybeUnescape parses s and converts escaped ASCII codepoints (in octal) back -// to its ASCII representation. -// -// From AWS docs: -// -// "If the domain name includes any characters other than a to z, 0 to 9, - -// (hyphen), or _ (underscore), Route 53 API actions return the characters as -// escape codes." -// -// For our purposes (and with respect to RFC 1035), we'll fish for a-z, 0-9, -// '-', '.' and '*' as the leftmost character (for wildcards) and throw error -// for everything else. -// -// Example: -// -// `\\052.example.com.` -> `*.example.com` -// `\\137.example.com.` -> error ('_' is not valid) -func maybeUnescape(s string) (string, error) { - var outSb strings.Builder - for { - i := strings.Index(s, escapeSeq) - if i < 0 { - return outSb.String() + s, nil - } - - outSb.WriteString(s[:i]) - - li, ri := i+len(escapeSeq), i+len(escapeSeq)+3 - if ri > len(s) { - return "", fmt.Errorf("invalid escape sequence: '%s%s'", escapeSeq, s[li:]) - } - // Parse `\\xxx` in base 8 (2nd arg) and attempt to fit into - // 8-bit result (3rd arg). - n, err := strconv.ParseInt(s[li:ri], 8, 8) - if err != nil { - return "", fmt.Errorf("invalid escape sequence: '%s%s'", escapeSeq, s[li:ri]) - } - - r := rune(n) - switch { - case r >= rune('a') && r <= rune('z'): // Route53 converts everything to lowercase. - case r >= rune('0') && r <= rune('9'): - case r == rune('*'): - if outSb.Len() != 0 { - return "", errors.New("`*' only supported as wildcard (leftmost label)") - } - case r == rune('-'): - case r == rune('.'): - default: - return "", fmt.Errorf("invalid character: %s%#03o", escapeSeq, r) - } - - outSb.WriteString(string(r)) - - s = s[i+len(escapeSeq)+3:] - } -} - -func updateZoneFromRRS(rrs *types.ResourceRecordSet, z *file.Zone) error { - for _, rr := range rrs.ResourceRecords { - n, err := maybeUnescape(aws.ToString(rrs.Name)) - if err != nil { - return fmt.Errorf("failed to unescape `%s' name: %v", aws.ToString(rrs.Name), err) - } - v, err := maybeUnescape(aws.ToString(rr.Value)) - if err != nil { - return fmt.Errorf("failed to unescape `%s' value: %v", aws.ToString(rr.Value), err) - } - - // Assemble RFC 1035 conforming record to pass into dns scanner. - rfc1035 := fmt.Sprintf("%s %d IN %s %s", n, aws.ToInt64(rrs.TTL), rrs.Type, v) - r, err := dns.NewRR(rfc1035) - if err != nil { - return fmt.Errorf("failed to parse resource record: %v", err) - } - - z.Insert(r) - } - return nil -} - -// updateZones re-queries resource record sets for each zone and updates the -// zone object. -// Returns error if any zones error'ed out, but waits for other zones to -// complete first. -func (h *Route53) updateZones(ctx context.Context) error { - errc := make(chan error) - defer close(errc) - for zName, z := range h.zones { - go func(zName string, z []*zone) { - var err error - defer func() { - errc <- err - }() - - for i, hostedZone := range z { - newZ := file.NewZone(zName, "") - newZ.Upstream = h.upstream - in := &route53.ListResourceRecordSetsInput{ - HostedZoneId: aws.String(hostedZone.id), - MaxItems: aws.Int32(1000), - } - complete := false - var out *route53.ListResourceRecordSetsOutput - for out, err = h.client.ListResourceRecordSets(ctx, in); !complete; out, err = h.client.ListResourceRecordSets(ctx, in) { - if err != nil { - err = fmt.Errorf("failed to list resource records for %v:%v from route53: %v", zName, hostedZone.id, err) - return - } - for _, rrs := range out.ResourceRecordSets { - if err := updateZoneFromRRS(&rrs, newZ); err != nil { - // Maybe unsupported record type. Log and carry on. - log.Warningf("Failed to process resource record set: %v", err) - } - } - if out.IsTruncated { - in.StartRecordName = out.NextRecordName - in.StartRecordType = out.NextRecordType - in.StartRecordIdentifier = out.NextRecordIdentifier - } else { - complete = true - } - } - h.zMu.Lock() - (*z[i]).z = newZ - h.zMu.Unlock() - } - }(zName, z) - } - // Collect errors (if any). This will also sync on all zones updates - // completion. - var errs []string - for range len(h.zones) { - err := <-errc - if err != nil { - errs = append(errs, err.Error()) - } - } - if len(errs) != 0 { - return fmt.Errorf("errors updating zones: %v", errs) - } - return nil -} - -// Name implements plugin.Handler.Name. -func (h *Route53) Name() string { return "route53" } diff --git a/plugin/route53/route53_test.go b/plugin/route53/route53_test.go deleted file mode 100644 index 4427f89fa8..0000000000 --- a/plugin/route53/route53_test.go +++ /dev/null @@ -1,295 +0,0 @@ -package route53 - -import ( - "context" - "errors" - "reflect" - "testing" - "time" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - crequest "github.com/coredns/coredns/request" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/route53" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/miekg/dns" -) - -type fakeRoute53 struct { - route53Client -} - -func (fakeRoute53) ListHostedZonesByName(_ context.Context, input *route53.ListHostedZonesByNameInput, optFns ...func(*route53.Options)) (*route53.ListHostedZonesByNameOutput, error) { - return nil, nil -} - -func (fakeRoute53) ListResourceRecordSets(_ context.Context, in *route53.ListResourceRecordSetsInput, optFns ...func(*route53.Options)) (*route53.ListResourceRecordSetsOutput, error) { - if aws.ToString(in.HostedZoneId) == "0987654321" { - return nil, errors.New("bad. zone is bad") - } - rrsResponse := map[string][]types.ResourceRecordSet{} - for _, r := range []struct { - rType types.RRType - name, value, hostedZoneID string - }{ - {"A", "example.org.", "1.2.3.4", "1234567890"}, - {"A", "www.example.org", "1.2.3.4", "1234567890"}, - {"CNAME", `\052.www.example.org`, "www.example.org", "1234567890"}, - {"AAAA", "example.org.", "2001:db8:85a3::8a2e:370:7334", "1234567890"}, - {"CNAME", "sample.example.org.", "example.org", "1234567890"}, - {"PTR", "example.org.", "ptr.example.org.", "1234567890"}, - {"SOA", "org.", "ns-1536.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400", "1234567890"}, - {"NS", "com.", "ns-1536.awsdns-00.co.uk.", "1234567890"}, - {"A", "split-example.gov.", "1.2.3.4", "1234567890"}, - // Unsupported type should be ignored. - {"YOLO", "swag.", "foobar", "1234567890"}, - // Hosted zone with the same name, but a different id. - {"A", "other-example.org.", "3.5.7.9", "1357986420"}, - {"A", "split-example.org.", "1.2.3.4", "1357986420"}, - {"SOA", "org.", "ns-15.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400", "1357986420"}, - // Hosted zone without SOA. - } { - rrs, ok := rrsResponse[r.hostedZoneID] - if !ok { - rrs = make([]types.ResourceRecordSet, 0) - } - rrs = append(rrs, types.ResourceRecordSet{Type: r.rType, - Name: aws.String(r.name), - ResourceRecords: []types.ResourceRecord{ - { - Value: aws.String(r.value), - }, - }, - TTL: aws.Int64(300), - }) - rrsResponse[r.hostedZoneID] = rrs - } - - return &route53.ListResourceRecordSetsOutput{ - ResourceRecordSets: rrsResponse[aws.ToString(in.HostedZoneId)], - IsTruncated: false, - }, nil -} - -func TestRoute53(t *testing.T) { - ctx := t.Context() - - r, err := New(ctx, fakeRoute53{}, map[string][]string{"bad.": {"0987654321"}}, time.Minute) - if err != nil { - t.Fatalf("Failed to create route53: %v", err) - } - if err = r.Run(ctx); err == nil { - t.Fatalf("Expected errors for zone bad.") - } - - r, err = New(ctx, fakeRoute53{}, map[string][]string{"org.": {"1357986420", "1234567890"}, "gov.": {"Z098765432", "1234567890"}}, 90*time.Second) - if err != nil { - t.Fatalf("Failed to create route53: %v", err) - } - r.Fall = fall.Zero - r.Fall.SetZonesFromArgs([]string{"gov."}) - r.Next = test.HandlerFunc(func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := crequest.Request{W: w, Req: r} - qname := state.Name() - m := new(dns.Msg) - rcode := dns.RcodeServerFailure - if qname == "example.gov." { - m.SetReply(r) - rr, err := dns.NewRR("example.gov. 300 IN A 2.4.6.8") - if err != nil { - t.Fatalf("Failed to create Resource Record: %v", err) - } - m.Answer = []dns.RR{rr} - - m.Authoritative = true - rcode = dns.RcodeSuccess - } - - m.SetRcode(r, rcode) - w.WriteMsg(m) - return rcode, nil - }) - err = r.Run(ctx) - if err != nil { - t.Fatalf("Failed to initialize route53: %v", err) - } - - tests := []struct { - qname string - qtype uint16 - wantRetCode int - wantAnswer []string // ownernames for the records in the additional section. - wantMsgRCode int - wantNS []string - expectedErr error - }{ - // 0. example.org A found - success. - { - qname: "example.org", - qtype: dns.TypeA, - wantAnswer: []string{"example.org. 300 IN A 1.2.3.4"}, - }, - // 1. example.org AAAA found - success. - { - qname: "example.org", - qtype: dns.TypeAAAA, - wantAnswer: []string{"example.org. 300 IN AAAA 2001:db8:85a3::8a2e:370:7334"}, - }, - // 2. exampled.org PTR found - success. - { - qname: "example.org", - qtype: dns.TypePTR, - wantAnswer: []string{"example.org. 300 IN PTR ptr.example.org."}, - }, - // 3. sample.example.org points to example.org CNAME. - // Query must return both CNAME and A recs. - { - qname: "sample.example.org", - qtype: dns.TypeA, - wantAnswer: []string{ - "sample.example.org. 300 IN CNAME example.org.", - "example.org. 300 IN A 1.2.3.4", - }, - }, - // 4. Explicit CNAME query for sample.example.org. - // Query must return just CNAME. - { - qname: "sample.example.org", - qtype: dns.TypeCNAME, - wantAnswer: []string{"sample.example.org. 300 IN CNAME example.org."}, - }, - // 5. Explicit SOA query for example.org. - { - qname: "example.org", - qtype: dns.TypeNS, - wantNS: []string{"org. 300 IN SOA ns-1536.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"}, - }, - // 6. AAAA query for split-example.org must return NODATA. - { - qname: "split-example.gov", - qtype: dns.TypeAAAA, - wantRetCode: dns.RcodeSuccess, - wantNS: []string{"org. 300 IN SOA ns-1536.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"}, - }, - // 7. Zone not configured. - { - qname: "badexample.com", - qtype: dns.TypeA, - wantRetCode: dns.RcodeServerFailure, - wantMsgRCode: dns.RcodeServerFailure, - }, - // 8. No record found. Return SOA record. - { - qname: "bad.org", - qtype: dns.TypeA, - wantRetCode: dns.RcodeSuccess, - wantMsgRCode: dns.RcodeNameError, - wantNS: []string{"org. 300 IN SOA ns-1536.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"}, - }, - // 9. No record found. Fallthrough. - { - qname: "example.gov", - qtype: dns.TypeA, - wantAnswer: []string{"example.gov. 300 IN A 2.4.6.8"}, - }, - // 10. other-zone.example.org is stored in a different hosted zone. success - { - qname: "other-example.org", - qtype: dns.TypeA, - wantAnswer: []string{"other-example.org. 300 IN A 3.5.7.9"}, - }, - // 11. split-example.org only has A record. Expect NODATA. - { - qname: "split-example.org", - qtype: dns.TypeAAAA, - wantNS: []string{"org. 300 IN SOA ns-15.awsdns-00.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400"}, - }, - // 12. *.www.example.org is a wildcard CNAME to www.example.org. - { - qname: "a.www.example.org", - qtype: dns.TypeA, - wantAnswer: []string{ - "a.www.example.org. 300 IN CNAME www.example.org.", - "www.example.org. 300 IN A 1.2.3.4", - }, - }, - } - - for ti, tc := range tests { - req := new(dns.Msg) - req.SetQuestion(dns.Fqdn(tc.qname), tc.qtype) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - code, err := r.ServeDNS(ctx, rec, req) - - if err != tc.expectedErr { - t.Fatalf("Test %d: Expected error %v, but got %v", ti, tc.expectedErr, err) - } - if code != tc.wantRetCode { - t.Fatalf("Test %d: Expected returned status code %s, but got %s", ti, dns.RcodeToString[tc.wantRetCode], dns.RcodeToString[code]) - } - - if tc.wantMsgRCode != rec.Msg.Rcode { - t.Errorf("Test %d: Unexpected msg status code. Want: %s, got: %s", ti, dns.RcodeToString[tc.wantMsgRCode], dns.RcodeToString[rec.Msg.Rcode]) - } - - if len(tc.wantAnswer) != len(rec.Msg.Answer) { - t.Errorf("Test %d: Unexpected number of Answers. Want: %d, got: %d", ti, len(tc.wantAnswer), len(rec.Msg.Answer)) - } else { - for i, gotAnswer := range rec.Msg.Answer { - if gotAnswer.String() != tc.wantAnswer[i] { - t.Errorf("Test %d: Unexpected answer.\nWant:\n\t%s\nGot:\n\t%s", ti, tc.wantAnswer[i], gotAnswer) - } - } - } - - if len(tc.wantNS) != len(rec.Msg.Ns) { - t.Errorf("Test %d: Unexpected NS number. Want: %d, got: %d", ti, len(tc.wantNS), len(rec.Msg.Ns)) - } else { - for i, ns := range rec.Msg.Ns { - got, ok := ns.(*dns.SOA) - if !ok { - t.Errorf("Test %d: Unexpected NS type. Want: SOA, got: %v", ti, reflect.TypeOf(got)) - } - if got.String() != tc.wantNS[i] { - t.Errorf("Test %d: Unexpected NS.\nWant: %v\nGot: %v", ti, tc.wantNS[i], got) - } - } - } - } -} - -func TestMaybeUnescape(t *testing.T) { - for ti, tc := range []struct { - escaped, want string - wantErr error - }{ - // 0. empty string is fine. - {escaped: "", want: ""}, - // 1. non-escaped sequence. - {escaped: "example.com.", want: "example.com."}, - // 2. escaped `*` as first label - OK. - {escaped: `\052.example.com`, want: "*.example.com"}, - // 3. Escaped dot, 'a' and a hyphen. No idea why but we'll allow it. - {escaped: `weird\055ex\141mple\056com\056\056`, want: "weird-example.com.."}, - // 4. escaped `*` in the middle - NOT OK. - {escaped: `e\052ample.com`, wantErr: errors.New("`*' only supported as wildcard (leftmost label)")}, - // 5. Invalid character. - {escaped: `\000.example.com`, wantErr: errors.New(`invalid character: \000`)}, - // 6. Invalid escape sequence in the middle. - {escaped: `example\0com`, wantErr: errors.New(`invalid escape sequence: '\0co'`)}, - // 7. Invalid escape sequence at the end. - {escaped: `example.com\0`, wantErr: errors.New(`invalid escape sequence: '\0'`)}, - } { - got, gotErr := maybeUnescape(tc.escaped) - if tc.wantErr != gotErr && !reflect.DeepEqual(tc.wantErr, gotErr) { - t.Fatalf("Test %d: Expected error: `%v', but got: `%v'", ti, tc.wantErr, gotErr) - } - if tc.want != got { - t.Errorf("Test %d: Expected unescaped: `%s', but got: `%s'", ti, tc.want, got) - } - } -} diff --git a/plugin/route53/setup.go b/plugin/route53/setup.go deleted file mode 100644 index cff72c2ccd..0000000000 --- a/plugin/route53/setup.go +++ /dev/null @@ -1,170 +0,0 @@ -package route53 - -import ( - "context" - "fmt" - "os" - "strconv" - "strings" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/fall" - clog "github.com/coredns/coredns/plugin/pkg/log" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/credentials" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/aws-sdk-go-v2/service/route53" -) - -var log = clog.NewWithPlugin("route53") - -func init() { plugin.Register("route53", setup) } - -// exposed for testing -type route53Client interface { - ActivateKeySigningKey(ctx context.Context, params *route53.ActivateKeySigningKeyInput, optFns ...func(*route53.Options)) (*route53.ActivateKeySigningKeyOutput, error) - ListHostedZonesByName(ctx context.Context, params *route53.ListHostedZonesByNameInput, optFns ...func(*route53.Options)) (*route53.ListHostedZonesByNameOutput, error) - ListResourceRecordSets(ctx context.Context, params *route53.ListResourceRecordSetsInput, optFns ...func(*route53.Options)) (*route53.ListResourceRecordSetsOutput, error) -} - -var f = func(ctx context.Context, cfgOpts []func(*config.LoadOptions) error, clientOpts []func(*route53.Options)) (route53Client, error) { - cfg, err := config.LoadDefaultConfig(ctx, cfgOpts...) - if err != nil { - return nil, err - } - // If no region is specified, retrieve one from IMDS (SDK v1 used the AWS global partition as a fallback, v2 doesn't) - if cfg.Region == "" { - imdsClient := imds.NewFromConfig(cfg) - region, err := imdsClient.GetRegion(ctx, &imds.GetRegionInput{}) - if err != nil { - return nil, fmt.Errorf("failed to get region from IMDS: %w", err) - } - cfg.Region = region.Region - } - return route53.NewFromConfig(cfg, clientOpts...), nil -} - -func setup(c *caddy.Controller) error { - for c.Next() { - keyPairs := map[string]struct{}{} - keys := map[string][]string{} - - // Route53 plugin attempts to load AWS credentials following default SDK chaining. - // The order configuration is loaded in is: - // * Static AWS keys set in Corefile (deprecated) - // * Environment Variables - // * Shared Credentials file - // * Shared Configuration file (if AWS_SDK_LOAD_CONFIG is set to truthy value) - // * EC2 Instance Metadata (credentials only) - cfgOpts := []func(*config.LoadOptions) error{} - clientOpts := []func(*route53.Options){} - var fall fall.F - - refresh := time.Duration(1) * time.Minute // default update frequency to 1 minute - - args := c.RemainingArgs() - - for i := range args { - parts := strings.SplitN(args[i], ":", 2) - if len(parts) != 2 { - return plugin.Error("route53", c.Errf("invalid zone %q", args[i])) - } - dns, hostedZoneID := parts[0], parts[1] - if dns == "" || hostedZoneID == "" { - return plugin.Error("route53", c.Errf("invalid zone %q", args[i])) - } - if _, ok := keyPairs[args[i]]; ok { - return plugin.Error("route53", c.Errf("conflict zone %q", args[i])) - } - - keyPairs[args[i]] = struct{}{} - keys[dns] = append(keys[dns], hostedZoneID) - } - - for c.NextBlock() { - switch c.Val() { - case "aws_access_key": - v := c.RemainingArgs() - if len(v) < 2 { - return plugin.Error("route53", c.Errf("invalid access key: '%v'", v)) - } - cfgOpts = append(cfgOpts, config.WithCredentialsProvider(credentials.NewStaticCredentialsProvider(v[0], v[1], ""))) - log.Warningf("Save aws_access_key in Corefile has been deprecated, please use other authentication methods instead") - case "aws_endpoint": - if c.NextArg() { - clientOpts = append(clientOpts, func(o *route53.Options) { - o.BaseEndpoint = aws.String(c.Val()) - }) - } else { - return plugin.Error("route53", c.ArgErr()) - } - case "upstream": - c.RemainingArgs() // eats args - case "credentials": - if c.NextArg() { - cfgOpts = append(cfgOpts, config.WithSharedConfigProfile(c.Val())) - } else { - return c.ArgErr() - } - if c.NextArg() { - sharedConfigFiles := []string{c.Val()} - // If AWS_SDK_LOAD_CONFIG is set also load ~/.aws/config to stay consistent - // with default SDK behavior. - if ok, _ := strconv.ParseBool(os.Getenv("AWS_SDK_LOAD_CONFIG")); ok { - sharedConfigFiles = append(sharedConfigFiles, config.DefaultSharedConfigFilename()) - } - cfgOpts = append(cfgOpts, config.WithSharedConfigFiles(sharedConfigFiles)) - } - case "fallthrough": - fall.SetZonesFromArgs(c.RemainingArgs()) - case "refresh": - if c.NextArg() { - refreshStr := c.Val() - _, err := strconv.Atoi(refreshStr) - if err == nil { - refreshStr = c.Val() + "s" - } - refresh, err = time.ParseDuration(refreshStr) - if err != nil { - return plugin.Error("route53", c.Errf("Unable to parse duration: %v", err)) - } - if refresh <= 0 { - return plugin.Error("route53", c.Errf("refresh interval must be greater than 0: %q", refreshStr)) - } - } else { - return plugin.Error("route53", c.ArgErr()) - } - default: - return plugin.Error("route53", c.Errf("unknown property %q", c.Val())) - } - } - - ctx, cancel := context.WithCancel(context.Background()) - client, err := f(ctx, cfgOpts, clientOpts) - if err != nil { - cancel() - return plugin.Error("route53", c.Errf("failed to create route53 client: %v", err)) - } - h, err := New(ctx, client, keys, refresh) - if err != nil { - cancel() - return plugin.Error("route53", c.Errf("failed to create route53 plugin: %v", err)) - } - h.Fall = fall - if err := h.Run(ctx); err != nil { - cancel() - return plugin.Error("route53", c.Errf("failed to initialize route53 plugin: %v", err)) - } - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - h.Next = next - return h - }) - c.OnShutdown(func() error { cancel(); return nil }) - } - return nil -} diff --git a/plugin/route53/setup_test.go b/plugin/route53/setup_test.go deleted file mode 100644 index c8bb3cc2f8..0000000000 --- a/plugin/route53/setup_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package route53 - -import ( - "context" - "testing" - - "github.com/coredns/caddy" - - "github.com/aws/aws-sdk-go-v2/config" - "github.com/aws/aws-sdk-go-v2/service/route53" -) - -func TestSetupRoute53(t *testing.T) { - f = func(_ context.Context, _ []func(*config.LoadOptions) error, _ []func(*route53.Options)) (route53Client, error) { - return fakeRoute53{}, nil - } - - tests := []struct { - body string - expectedError bool - }{ - {`route53`, false}, - {`route53 :`, true}, - {`route53 example.org:12345678`, false}, - {`route53 example.org:12345678 { - aws_access_key -}`, true}, - {`route53 example.org:12345678 { }`, false}, - - {`route53 example.org:12345678 { }`, false}, - {`route53 example.org:12345678 { wat -}`, true}, - {`route53 example.org:12345678 { - aws_access_key ACCESS_KEY_ID SEKRIT_ACCESS_KEY -}`, false}, - - {`route53 example.org:12345678 { - fallthrough -}`, false}, - {`route53 example.org:12345678 { - credentials - }`, true}, - - {`route53 example.org:12345678 { - credentials default - }`, false}, - {`route53 example.org:12345678 { - credentials default credentials - }`, false}, - {`route53 example.org:12345678 { - credentials default credentials extra-arg - }`, true}, - {`route53 example.org:12345678 example.org:12345678 { - }`, true}, - - {`route53 example.org:12345678 { - refresh 90 -}`, false}, - {`route53 example.org:12345678 { - refresh 5m -}`, false}, - {`route53 example.org:12345678 { - refresh -}`, true}, - {`route53 example.org:12345678 { - refresh foo -}`, true}, - {`route53 example.org:12345678 { - refresh -1m -}`, true}, - - {`route53 example.org { - }`, true}, - {`route53 example.org:12345678 { - aws_endpoint -}`, true}, - {`route53 example.org:12345678 { - aws_endpoint https://localhost -}`, false}, - } - - for _, test := range tests { - c := caddy.NewTestController("dns", test.body) - if err := setup(c); (err == nil) == test.expectedError { - t.Errorf("Unexpected errors: %v", err) - } - } -} diff --git a/plugin/secondary/README.md b/plugin/secondary/README.md deleted file mode 100644 index b22965ef87..0000000000 --- a/plugin/secondary/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# secondary - -## Name - -*secondary* - enables serving a zone retrieved from a primary server. - -## Description - -With *secondary* you can transfer (via AXFR) a zone from another server. The retrieved zone is -*not committed* to disk (a violation of the RFC). This means restarting CoreDNS will cause it to -retrieve all secondary zones. - -If the primary server(s) don't respond when CoreDNS is starting up, the AXFR will be retried -indefinitely every 10s. - -## Syntax - -~~~ -secondary [ZONES...] -~~~ - -* **ZONES** zones it should be authoritative for. If empty, the zones from the configuration block - are used. Note that without a remote address to *get* the zone from, the above is not that useful. - -A working syntax would be: - -~~~ -secondary [zones...] { - transfer from ADDRESS [ADDRESS...] -} -~~~ - -* `transfer from` specifies from which **ADDRESS** to fetch the zone. It can be specified multiple - times; if one does not work, another will be tried. Transferring this zone outwards again can be - done by enabling the *transfer* plugin. - -When a zone is due to be refreshed (refresh timer fires) a random jitter of 5 seconds is applied, -before fetching. In the case of retry this will be 2 seconds. If there are any errors during the -transfer in, the transfer fails; this will be logged. - -## Examples - -Transfer `example.org` from 10.0.1.1, and if that fails try 10.1.2.1. - -~~~ corefile -example.org { - secondary { - transfer from 10.0.1.1 10.1.2.1 - } -} -~~~ - -Or re-export the retrieved zone to other secondaries. - -~~~ corefile -example.net { - secondary { - transfer from 10.1.2.1 - } - transfer { - to * - } -} -~~~ - -## Bugs - -Only AXFR is supported and the retrieved zone is not committed to disk. - -## See Also - -See the *transfer* plugin to enable zone transfers _to_ other servers. -And RFC 5936 detailing the AXFR protocol. diff --git a/plugin/secondary/log_test.go b/plugin/secondary/log_test.go deleted file mode 100644 index 15cab004f0..0000000000 --- a/plugin/secondary/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package secondary - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/secondary/secondary.go b/plugin/secondary/secondary.go deleted file mode 100644 index 809edadbd0..0000000000 --- a/plugin/secondary/secondary.go +++ /dev/null @@ -1,13 +0,0 @@ -// Package secondary implements a secondary plugin. -package secondary - -import "github.com/coredns/coredns/plugin/file" - -// Secondary implements a secondary plugin that allows CoreDNS to retrieve (via AXFR) -// zone information from a primary server. -type Secondary struct { - file.File -} - -// Name implements the Handler interface. -func (s Secondary) Name() string { return "secondary" } diff --git a/plugin/secondary/setup.go b/plugin/secondary/setup.go deleted file mode 100644 index 05cb16abde..0000000000 --- a/plugin/secondary/setup.go +++ /dev/null @@ -1,103 +0,0 @@ -package secondary - -import ( - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/file" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/pkg/parse" - "github.com/coredns/coredns/plugin/pkg/upstream" -) - -var log = clog.NewWithPlugin("secondary") - -func init() { plugin.Register("secondary", setup) } - -func setup(c *caddy.Controller) error { - zones, err := secondaryParse(c) - if err != nil { - return plugin.Error("secondary", err) - } - - // Add startup functions to retrieve the zone and keep it up to date. - for i := range zones.Names { - n := zones.Names[i] - z := zones.Z[n] - if len(z.TransferFrom) > 0 { - c.OnStartup(func() error { - z.StartupOnce.Do(func() { - go func() { - dur := time.Millisecond * 250 - max := time.Second * 10 - for { - err := z.TransferIn() - if err == nil { - break - } - log.Warningf("All '%s' masters failed to transfer, retrying in %s: %s", n, dur.String(), err) - time.Sleep(dur) - dur <<= 1 // double the duration - if dur > max { - dur = max - } - } - z.Update() - }() - }) - return nil - }) - } - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - return Secondary{file.File{Next: next, Zones: zones}} - }) - - return nil -} - -func secondaryParse(c *caddy.Controller) (file.Zones, error) { - z := make(map[string]*file.Zone) - names := []string{} - for c.Next() { - if c.Val() == "secondary" { - // secondary [origin] - origins := plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - for i := range origins { - z[origins[i]] = file.NewZone(origins[i], "stdin") - names = append(names, origins[i]) - } - - hasTransfer := false - for c.NextBlock() { - var f []string - - switch c.Val() { - case "transfer": - var err error - f, err = parse.TransferIn(c) - if err != nil { - return file.Zones{}, err - } - hasTransfer = true - default: - return file.Zones{}, c.Errf("unknown property '%s'", c.Val()) - } - - for _, origin := range origins { - if f != nil { - z[origin].TransferFrom = append(z[origin].TransferFrom, f...) - } - z[origin].Upstream = upstream.New() - } - } - if !hasTransfer { - return file.Zones{}, c.Err("secondary zones require a transfer from property") - } - } - } - return file.Zones{Z: z, Names: names}, nil -} diff --git a/plugin/secondary/setup_test.go b/plugin/secondary/setup_test.go deleted file mode 100644 index dbf1cb6637..0000000000 --- a/plugin/secondary/setup_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package secondary - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSecondaryParse(t *testing.T) { - tests := []struct { - inputFileRules string - shouldErr bool - transferFrom string - zones []string - }{ - { - `secondary { - transfer from 127.0.0.1 - }`, - false, - "127.0.0.1:53", - nil, - }, - { - `secondary example.org { - transfer from 127.0.0.1 - }`, - false, - "127.0.0.1:53", - []string{"example.org."}, - }, - { - `secondary`, - true, - "", - nil, - }, - { - `secondary example.org { - transferr from 127.0.0.1 - }`, - true, - "", - nil, - }, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - s, err := secondaryParse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } - - for i, name := range test.zones { - if x := s.Names[i]; x != name { - t.Fatalf("Test %d zone names don't match expected %q, but got %q", i, name, x) - } - } - - // This is only set *if* we have a zone (i.e. not in all tests above) - for _, v := range s.Z { - if x := v.TransferFrom[0]; x != test.transferFrom { - t.Fatalf("Test %d transform from names don't match expected %q, but got %q", i, test.transferFrom, x) - } - } - } -} diff --git a/plugin/sign/README.md b/plugin/sign/README.md deleted file mode 100644 index 6eb4ba8af0..0000000000 --- a/plugin/sign/README.md +++ /dev/null @@ -1,168 +0,0 @@ -# sign - -## Name - -*sign* - adds DNSSEC records to zone files. - -## Description - -The *sign* plugin is used to sign (see RFC 6781) zones. In this process DNSSEC resource records are -added. The signatures that sign the resource records sets have an expiration date, this means the -signing process must be repeated before this expiration data is reached. Otherwise the zone's data -will go BAD (RFC 4035, Section 5.5). The *sign* plugin takes care of this. - -Only NSEC is supported, *sign* does *not* support NSEC3. - -*Sign* works in conjunction with the *file* and *auto* plugins; this plugin **signs** the zones -files, *auto* and *file* **serve** the zones *data*. - -For this plugin to work at least one Common Signing Key, (see coredns-keygen(1)) is needed. This key -(or keys) will be used to sign the entire zone. *Sign* does *not* support the ZSK/KSK split, nor will -it do key or algorithm rollovers - it just signs. - -*Sign* will: - - * (Re)-sign the zone with the CSK(s) when: - - - the last time it was signed is more than a 6 days ago. Each zone will have some jitter - applied to the inception date. - - - the signature only has 14 days left before expiring. - - Both these dates are only checked on the SOA's signature(s). - - * Create RRSIGs that have an inception of -3 hours (minus a jitter between 0 and 18 hours) - and a expiration of +32 (plus a jitter between 0 and 5 days) days for every given DNSKEY. - - * Add NSEC records for all names in the zone. The TTL for these is the negative cache TTL from the - SOA record. - - * Add or replace *all* apex CDS/CDNSKEY records with the ones derived from the given keys. For - each key two CDS are created one with SHA1 and another with SHA256. - - * Update the SOA's serial number to the *Unix epoch* of when the signing happens. This will - overwrite *any* previous serial number. - - -There are two ways that dictate when a zone is signed. Normally every 6 days (plus jitter) it will -be resigned. If for some reason we fail this check, the 14 days before expiring kicks in. - -Keys are named (following BIND9): `K++.key` and `K++.private`. -The keys **must not** be included in your zone; they will be added by *sign*. These keys can be -generated with `coredns-keygen` or BIND9's `dnssec-keygen`. You don't have to adhere to this naming -scheme, but then you need to name your keys explicitly, see the `keys file` directive. - -A generated zone is written out in a file named `db..signed` in the directory named by the -`directory` directive (which defaults to `/var/lib/coredns`). - -## Syntax - -~~~ -sign DBFILE [ZONES...] { - key file|directory KEY...|DIR... - directory DIR -} -~~~ - -* **DBFILE** the zone database file to read and parse. If the path is relative, the path from the - *root* plugin will be prepended to it. -* **ZONES** zones it should be sign for. If empty, the zones from the configuration block are - used. -* `key` specifies the key(s) (there can be multiple) to sign the zone. If `file` is - used the **KEY**'s filenames are used as is. If `directory` is used, *sign* will look in **DIR** - for `K++` files. Any metadata in these files (Activate, Publish, etc.) is - *ignored*. These keys must also be Key Signing Keys (KSK). -* `directory` specifies the **DIR** where CoreDNS should save zones that have been signed. - If not given this defaults to `/var/lib/coredns`. The zones are saved under the name - `db..signed`. If the path is relative the path from the *root* plugin will be prepended - to it. - -Keys can be generated with `coredns-keygen`, to create one for use in the *sign* plugin, use: -`coredns-keygen example.org` or `dnssec-keygen -a ECDSAP256SHA256 -f KSK example.org`. - -## Examples - -Sign the `example.org` zone contained in the file `db.example.org` and write the result to -`./db.example.org.signed` to let the *file* plugin pick it up and serve it. The keys used -are read from `/etc/coredns/keys/Kexample.org.key` and `/etc/coredns/keys/Kexample.org.private`. - -~~~ txt -example.org { - file db.example.org.signed - - sign db.example.org { - key file /etc/coredns/keys/Kexample.org - directory . - } -} -~~~ - -Running this leads to the following log output (note the timers in this example have been set to -shorter intervals). - -~~~ txt -[WARNING] plugin/file: Failed to open "open /tmp/db.example.org.signed: no such file or directory": trying again in 1m0s -[INFO] plugin/sign: Signing "example.org." because open /tmp/db.example.org.signed: no such file or directory -[INFO] plugin/sign: Successfully signed zone "example.org." in "/tmp/db.example.org.signed" with key tags "59725" and 1564766865 SOA serial, elapsed 9.357933ms, next: 2019-08-02T22:27:45.270Z -[INFO] plugin/file: Successfully reloaded zone "example.org." in "/tmp/db.example.org.signed" with serial 1564766865 -~~~ - -Or use a single zone file for *multiple* zones, note that the **ZONES** are repeated for both plugins. -Also note this outputs *multiple* signed output files. Here we use the default output directory -`/var/lib/coredns`. - -~~~ txt -. { - file /var/lib/coredns/db.example.org.signed example.org - file /var/lib/coredns/db.example.net.signed example.net - sign db.example.org example.org example.net { - key directory /etc/coredns/keys - } -} -~~~ - -This is the same configuration, but the zones are put in the server block, but note that you still -need to specify what file is served for what zone in the *file* plugin: - -~~~ txt -example.org example.net { - file var/lib/coredns/db.example.org.signed example.org - file var/lib/coredns/db.example.net.signed example.net - sign db.example.org { - key directory /etc/coredns/keys - } -} -~~~ - -Be careful to fully list the origins you want to sign, if you don't: - -~~~ txt -example.org example.net { - sign plugin/sign/testdata/db.example.org miek.org { - key file /etc/coredns/keys/Kexample.org - } -} -~~~ - -This will lead to `db.example.org` be signed *twice*, as this entire section is parsed twice because -you have specified the origins `example.org` and `example.net` in the server block. - -Forcibly resigning a zone can be accomplished by removing the signed zone file (CoreDNS will keep -on serving it from memory), and sending SIGUSR1 to the process to make it reload and resign the zone -file. - -## See Also - -The DNSSEC RFCs: RFC 4033, RFC 4034 and RFC 4035. And the BCP on DNSSEC, RFC 6781. Further more the -manual pages coredns-keygen(1) and dnssec-keygen(8). And the *file* plugin's documentation. - -Coredns-keygen can be found at -[https://github.com/coredns/coredns-utils](https://github.com/coredns/coredns-utils) in the -coredns-keygen directory. - -Other useful DNSSEC tools can be found in [ldns](https://nlnetlabs.nl/projects/ldns/about/), e.g. -`ldns-key2ds` to create DS records from DNSKEYs. - -## Bugs - -`keys directory` is not implemented. diff --git a/plugin/sign/dnssec.go b/plugin/sign/dnssec.go deleted file mode 100644 index a95e08644b..0000000000 --- a/plugin/sign/dnssec.go +++ /dev/null @@ -1,20 +0,0 @@ -package sign - -import ( - "github.com/miekg/dns" -) - -func (p Pair) signRRs(rrs []dns.RR, signerName string, ttl, incep, expir uint32) (*dns.RRSIG, error) { - rrsig := &dns.RRSIG{ - Hdr: dns.RR_Header{Rrtype: dns.TypeRRSIG, Ttl: ttl}, - Algorithm: p.Public.Algorithm, - SignerName: signerName, - KeyTag: p.KeyTag, - OrigTtl: ttl, - Inception: incep, - Expiration: expir, - } - - e := rrsig.Sign(p.Private, rrs) - return rrsig, e -} diff --git a/plugin/sign/file.go b/plugin/sign/file.go deleted file mode 100644 index dc4e73ebdf..0000000000 --- a/plugin/sign/file.go +++ /dev/null @@ -1,92 +0,0 @@ -package sign - -import ( - "fmt" - "io" - "os" - "path/filepath" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/file/tree" - - "github.com/miekg/dns" -) - -// write writes out the zone file to a temporary file which is then moved into the correct place. -func (s *Signer) write(z *file.Zone) error { - f, err := os.CreateTemp(s.directory, "signed-") - if err != nil { - return err - } - - if err := write(f, z); err != nil { - f.Close() - return err - } - - f.Close() - return os.Rename(f.Name(), filepath.Join(s.directory, s.signedfile)) -} - -func write(w io.Writer, z *file.Zone) error { - if _, err := io.WriteString(w, z.SOA.String()); err != nil { - return err - } - w.Write([]byte("\n")) // RR Stringer() method doesn't include newline, which ends the RR in a zone file, write that here. - for _, rr := range z.SIGSOA { - io.WriteString(w, rr.String()) - w.Write([]byte("\n")) - } - for _, rr := range z.NS { - io.WriteString(w, rr.String()) - w.Write([]byte("\n")) - } - for _, rr := range z.SIGNS { - io.WriteString(w, rr.String()) - w.Write([]byte("\n")) - } - err := z.Walk(func(e *tree.Elem, _ map[uint16][]dns.RR) error { - for _, r := range e.All() { - io.WriteString(w, r.String()) - w.Write([]byte("\n")) - } - return nil - }) - return err -} - -// Parse parses the zone in filename and returns a new Zone or an error. This -// is similar to the Parse function in the *file* plugin. However when parsing -// the record types DNSKEY, RRSIG, CDNSKEY and CDS are *not* included in the returned -// zone (if encountered). -func Parse(f io.Reader, origin, fileName string) (*file.Zone, error) { - zp := dns.NewZoneParser(f, dns.Fqdn(origin), fileName) - zp.SetIncludeAllowed(true) - z := file.NewZone(origin, fileName) - seenSOA := false - - for rr, ok := zp.Next(); ok; rr, ok = zp.Next() { - switch rr.(type) { - case *dns.DNSKEY, *dns.RRSIG, *dns.CDNSKEY, *dns.CDS: - continue - case *dns.SOA: - seenSOA = true - if err := z.Insert(rr); err != nil { - return nil, err - } - default: - if err := z.Insert(rr); err != nil { - return nil, err - } - } - } - if !seenSOA { - return nil, fmt.Errorf("file %q has no SOA record", fileName) - } - - if err := zp.Err(); err != nil { - return nil, err - } - - return z, nil -} diff --git a/plugin/sign/file_test.go b/plugin/sign/file_test.go deleted file mode 100644 index 72d2b02ac0..0000000000 --- a/plugin/sign/file_test.go +++ /dev/null @@ -1,43 +0,0 @@ -package sign - -import ( - "os" - "testing" - - "github.com/miekg/dns" -) - -func TestFileParse(t *testing.T) { - f, err := os.Open("testdata/db.miek.nl") - if err != nil { - t.Fatal(err) - } - z, err := Parse(f, "miek.nl.", "testdata/db.miek.nl") - if err != nil { - t.Fatal(err) - } - s := &Signer{ - directory: ".", - signedfile: "db.miek.nl.test", - } - - s.write(z) - defer os.Remove("db.miek.nl.test") - - f, err = os.Open("db.miek.nl.test") - if err != nil { - t.Fatal(err) - } - z, err = Parse(f, "miek.nl.", "db.miek.nl.test") - if err != nil { - t.Fatal(err) - } - if x := z.Apex.SOA.Header().Name; x != "miek.nl." { - t.Errorf("Expected SOA name to be %s, got %s", x, "miek.nl.") - } - apex, _ := z.Search("miek.nl.") - key := apex.Type(dns.TypeDNSKEY) - if key != nil { - t.Errorf("Expected no DNSKEYs, but got %d", len(key)) - } -} diff --git a/plugin/sign/keys.go b/plugin/sign/keys.go deleted file mode 100644 index 2d24764956..0000000000 --- a/plugin/sign/keys.go +++ /dev/null @@ -1,120 +0,0 @@ -package sign - -import ( - "crypto" - "crypto/ecdsa" - "crypto/rsa" - "fmt" - "io" - "os" - "path/filepath" - "strconv" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - - "github.com/miekg/dns" - "golang.org/x/crypto/ed25519" -) - -// Pair holds DNSSEC key information, both the public and private components are stored here. -type Pair struct { - Public *dns.DNSKEY - KeyTag uint16 - Private crypto.Signer -} - -// keyParse reads the public and private key from disk. -func keyParse(c *caddy.Controller) ([]Pair, error) { - if !c.NextArg() { - return nil, c.ArgErr() - } - pairs := []Pair{} - config := dnsserver.GetConfig(c) - - switch c.Val() { - case "file": - ks := c.RemainingArgs() - if len(ks) == 0 { - return nil, c.ArgErr() - } - for _, k := range ks { - base := k - // Kmiek.nl.+013+26205.key, handle .private or without extension: Kmiek.nl.+013+26205 - if strings.HasSuffix(k, ".key") { - base = k[:len(k)-4] - } - if strings.HasSuffix(k, ".private") { - base = k[:len(k)-8] - } - if !filepath.IsAbs(base) && config.Root != "" { - base = filepath.Join(config.Root, base) - } - - pair, err := readKeyPair(base+".key", base+".private") - if err != nil { - return nil, err - } - pairs = append(pairs, pair) - } - case "directory": - return nil, fmt.Errorf("directory: not implemented") - } - - return pairs, nil -} - -func readKeyPair(public, private string) (Pair, error) { - rk, err := os.Open(filepath.Clean(public)) - if err != nil { - return Pair{}, err - } - b, err := io.ReadAll(rk) - if err != nil { - return Pair{}, err - } - dnskey, err := dns.NewRR(string(b)) - if err != nil { - return Pair{}, err - } - if _, ok := dnskey.(*dns.DNSKEY); !ok { - return Pair{}, fmt.Errorf("RR in %q is not a DNSKEY: %d", public, dnskey.Header().Rrtype) - } - ksk := dnskey.(*dns.DNSKEY).Flags&(1<<8) == (1<<8) && dnskey.(*dns.DNSKEY).Flags&1 == 1 - if !ksk { - return Pair{}, fmt.Errorf("DNSKEY in %q is not a CSK/KSK", public) - } - - rp, err := os.Open(filepath.Clean(private)) - if err != nil { - return Pair{}, err - } - privkey, err := dnskey.(*dns.DNSKEY).ReadPrivateKey(rp, private) - if err != nil { - return Pair{}, err - } - switch signer := privkey.(type) { - case *ecdsa.PrivateKey: - return Pair{Public: dnskey.(*dns.DNSKEY), KeyTag: dnskey.(*dns.DNSKEY).KeyTag(), Private: signer}, nil - case ed25519.PrivateKey: - return Pair{Public: dnskey.(*dns.DNSKEY), KeyTag: dnskey.(*dns.DNSKEY).KeyTag(), Private: signer}, nil - case *rsa.PrivateKey: - return Pair{Public: dnskey.(*dns.DNSKEY), KeyTag: dnskey.(*dns.DNSKEY).KeyTag(), Private: signer}, nil - default: - return Pair{}, fmt.Errorf("unsupported algorithm %s", signer) - } -} - -// keyTag returns the key tags of the keys in ps as a formatted string. -func keyTag(ps []Pair) string { - if len(ps) == 0 { - return "" - } - var sb strings.Builder - for _, p := range ps { - sb.WriteString(strconv.Itoa(int(p.KeyTag)) + ",") - } - s := sb.String() - return s[:len(s)-1] -} diff --git a/plugin/sign/log_test.go b/plugin/sign/log_test.go deleted file mode 100644 index 2726cd179f..0000000000 --- a/plugin/sign/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package sign - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/sign/nsec.go b/plugin/sign/nsec.go deleted file mode 100644 index d8db3de335..0000000000 --- a/plugin/sign/nsec.go +++ /dev/null @@ -1,36 +0,0 @@ -package sign - -import ( - "slices" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/file/tree" - - "github.com/miekg/dns" -) - -// names returns the elements of the zone in nsec order. -func names(origin string, z *file.Zone) []string { - // There will also be apex records other than NS and SOA (who are kept separate), as we - // are adding DNSKEY and CDS/CDNSKEY records in the apex *before* we sign. - n := []string{} - z.AuthWalk(func(e *tree.Elem, _ map[uint16][]dns.RR, auth bool) error { - if !auth { - return nil - } - n = append(n, e.Name()) - return nil - }) - return n -} - -// NSEC returns an NSEC record according to name, next, ttl and bitmap. Note that the bitmap is sorted before use. -func NSEC(name, next string, ttl uint32, bitmap []uint16) *dns.NSEC { - slices.Sort(bitmap) - - return &dns.NSEC{ - Hdr: dns.RR_Header{Name: name, Ttl: ttl, Rrtype: dns.TypeNSEC, Class: dns.ClassINET}, - NextDomain: next, - TypeBitMap: bitmap, - } -} diff --git a/plugin/sign/nsec_test.go b/plugin/sign/nsec_test.go deleted file mode 100644 index f272651fc6..0000000000 --- a/plugin/sign/nsec_test.go +++ /dev/null @@ -1,27 +0,0 @@ -package sign - -import ( - "os" - "testing" - - "github.com/coredns/coredns/plugin/file" -) - -func TestNames(t *testing.T) { - f, err := os.Open("testdata/db.miek.nl_ns") - if err != nil { - t.Error(err) - } - z, err := file.Parse(f, "db.miek.nl_ns", "miek.nl", 0) - if err != nil { - t.Error(err) - } - - names := names("miek.nl.", z) - expected := []string{"miek.nl.", "child.miek.nl.", "www.miek.nl."} - for i := range names { - if names[i] != expected[i] { - t.Errorf("Expected %s, got %s", expected[i], names[i]) - } - } -} diff --git a/plugin/sign/resign_test.go b/plugin/sign/resign_test.go deleted file mode 100644 index 2f67f52aa7..0000000000 --- a/plugin/sign/resign_test.go +++ /dev/null @@ -1,40 +0,0 @@ -package sign - -import ( - "strings" - "testing" - "time" -) - -func TestResignInception(t *testing.T) { - then := time.Date(2019, 7, 18, 22, 50, 0, 0, time.UTC) - // signed yesterday - zr := strings.NewReader(`miek.nl. 1800 IN RRSIG SOA 13 2 1800 20190808191936 20190717161936 59725 miek.nl. eU6gI1OkSEbyt`) - if x := resign(zr, then); x != nil { - t.Errorf("Expected RRSIG to be valid for %s, got invalid: %s", then.Format(timeFmt), x) - } - // inception starts after this date. - zr = strings.NewReader(`miek.nl. 1800 IN RRSIG SOA 13 2 1800 20190808191936 20190731161936 59725 miek.nl. eU6gI1OkSEbyt`) - if x := resign(zr, then); x == nil { - t.Errorf("Expected RRSIG to be invalid for %s, got valid", then.Format(timeFmt)) - } -} - -func TestResignExpire(t *testing.T) { - then := time.Date(2019, 7, 18, 22, 50, 0, 0, time.UTC) - // expires tomorrow - zr := strings.NewReader(`miek.nl. 1800 IN RRSIG SOA 13 2 1800 20190717191936 20190717161936 59725 miek.nl. eU6gI1OkSEbyt`) - if x := resign(zr, then); x == nil { - t.Errorf("Expected RRSIG to be invalid for %s, got valid", then.Format(timeFmt)) - } - // expire too far away - zr = strings.NewReader(`miek.nl. 1800 IN RRSIG SOA 13 2 1800 20190731191936 20190717161936 59725 miek.nl. eU6gI1OkSEbyt`) - if x := resign(zr, then); x != nil { - t.Errorf("Expected RRSIG to be valid for %s, got invalid: %s", then.Format(timeFmt), x) - } - // expired yesterday - zr = strings.NewReader(`miek.nl. 1800 IN RRSIG SOA 13 2 1800 20190721191936 20190717161936 59725 miek.nl. eU6gI1OkSEbyt`) - if x := resign(zr, then); x == nil { - t.Errorf("Expected RRSIG to be invalid for %s, got valid", then.Format(timeFmt)) - } -} diff --git a/plugin/sign/setup.go b/plugin/sign/setup.go deleted file mode 100644 index ed3e6bda05..0000000000 --- a/plugin/sign/setup.go +++ /dev/null @@ -1,106 +0,0 @@ -package sign - -import ( - "fmt" - "math/rand" - "path/filepath" - "strings" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("sign", setup) } - -func setup(c *caddy.Controller) error { - sign, err := parse(c) - if err != nil { - return plugin.Error("sign", err) - } - - c.OnStartup(sign.OnStartup) - c.OnStartup(func() error { - for _, signer := range sign.signers { - go signer.refresh(durationRefreshHours) - } - return nil - }) - c.OnShutdown(func() error { - for _, signer := range sign.signers { - close(signer.stop) - } - return nil - }) - - // Don't call AddPlugin, *sign* is not a plugin. - return nil -} - -func parse(c *caddy.Controller) (*Sign, error) { - sign := &Sign{} - config := dnsserver.GetConfig(c) - - for c.Next() { - if !c.NextArg() { - return nil, c.ArgErr() - } - dbfile := c.Val() - if !filepath.IsAbs(dbfile) && config.Root != "" { - dbfile = filepath.Join(config.Root, dbfile) - } - - // Validate dbfile token to avoid infinite signing loops caused by invalid paths - if strings.ContainsRune(dbfile, '\uFFFD') { - return nil, fmt.Errorf("dbfile %q contains invalid characters", dbfile) - } - - origins := plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - signers := make([]*Signer, len(origins)) - for i := range origins { - signers[i] = &Signer{ - dbfile: dbfile, - origin: origins[i], - jitterIncep: time.Duration(float32(durationInceptionJitter) * rand.Float32()), - jitterExpir: time.Duration(float32(durationExpirationDayJitter) * rand.Float32()), - directory: "/var/lib/coredns", - stop: make(chan struct{}), - signedfile: fmt.Sprintf("db.%ssigned", origins[i]), // origins[i] is a fqdn, so it ends with a dot, hence %ssigned. - } - } - - for c.NextBlock() { - switch c.Val() { - case "key": - pairs, err := keyParse(c) - if err != nil { - return sign, err - } - for i := range signers { - for _, p := range pairs { - p.Public.Header().Name = signers[i].origin - } - signers[i].keys = append(signers[i].keys, pairs...) - } - case "directory": - dir := c.RemainingArgs() - if len(dir) == 0 || len(dir) > 1 { - return sign, fmt.Errorf("can only be one argument after %q", "directory") - } - if !filepath.IsAbs(dir[0]) && config.Root != "" { - dir[0] = filepath.Join(config.Root, dir[0]) - } - for i := range signers { - signers[i].directory = dir[0] - signers[i].signedfile = fmt.Sprintf("db.%ssigned", signers[i].origin) - } - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - sign.signers = append(sign.signers, signers...) - } - - return sign, nil -} diff --git a/plugin/sign/setup_test.go b/plugin/sign/setup_test.go deleted file mode 100644 index cb4a6f522a..0000000000 --- a/plugin/sign/setup_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package sign - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestParse(t *testing.T) { - tests := []struct { - input string - shouldErr bool - exp *Signer - }{ - {`sign testdata/db.miek.nl miek.nl { - key file testdata/Kmiek.nl.+013+59725 - }`, - false, - &Signer{ - keys: []Pair{}, - origin: "miek.nl.", - dbfile: "testdata/db.miek.nl", - directory: "/var/lib/coredns", - signedfile: "db.miek.nl.signed", - }, - }, - {`sign testdata/db.miek.nl example.org { - key file testdata/Kmiek.nl.+013+59725 - directory testdata - }`, - false, - &Signer{ - keys: []Pair{}, - origin: "example.org.", - dbfile: "testdata/db.miek.nl", - directory: "testdata", - signedfile: "db.example.org.signed", - }, - }, - // errors - {`sign db.example.org { - key file /etc/coredns/keys/Kexample.org - }`, - true, - nil, - }, - } - for i, tc := range tests { - c := caddy.NewTestController("dns", tc.input) - sign, err := parse(c) - - if err == nil && tc.shouldErr { - t.Fatalf("Test %d expected errors, but got no error", i) - } - if err != nil && !tc.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } - if tc.shouldErr { - continue - } - signer := sign.signers[0] - if x := signer.origin; x != tc.exp.origin { - t.Errorf("Test %d expected %s as origin, got %s", i, tc.exp.origin, x) - } - if x := signer.dbfile; x != tc.exp.dbfile { - t.Errorf("Test %d expected %s as dbfile, got %s", i, tc.exp.dbfile, x) - } - if x := signer.directory; x != tc.exp.directory { - t.Errorf("Test %d expected %s as directory, got %s", i, tc.exp.directory, x) - } - if x := signer.signedfile; x != tc.exp.signedfile { - t.Errorf("Test %d expected %s as signedfile, got %s", i, tc.exp.signedfile, x) - } - } -} - -// With setup validation in place, an invalid utf-8 dbfile token must cause parse() to error. -func TestParseRejectsInvalidDbfileToken(t *testing.T) { - input := "sign \"\xff\" 8.44.in-addr.arpa. 9.44.in-addr.arpa. {}" - c := caddy.NewTestController("dns", input) - - _, err := parse(c) - if err == nil { - t.Fatalf("expected parse to fail for invalid dbfile token") - } -} diff --git a/plugin/sign/sign.go b/plugin/sign/sign.go deleted file mode 100644 index 982d700816..0000000000 --- a/plugin/sign/sign.go +++ /dev/null @@ -1,38 +0,0 @@ -// Package sign implements a zone signer as a plugin. -package sign - -import ( - "path/filepath" - "time" -) - -// Sign contains signers that sign the zones files. -type Sign struct { - signers []*Signer -} - -// OnStartup scans all signers and signs or resigns zones if needed. -func (s *Sign) OnStartup() error { - for _, signer := range s.signers { - why := signer.resign() - if why == nil { - log.Infof("Skipping signing zone %q in %q: signatures are valid", signer.origin, filepath.Join(signer.directory, signer.signedfile)) - continue - } - go signAndLog(signer, why) - } - return nil -} - -// Various duration constants for signing of the zones. -const ( - durationExpireDays = 7 * 24 * time.Hour // max time allowed before expiration - durationResignDays = 6 * 24 * time.Hour // if the last sign happened this long ago, sign again - durationSignatureExpireDays = 32 * 24 * time.Hour // sign for 32 days - durationRefreshHours = 5 * time.Hour // check zones every 5 hours - durationInceptionJitter = -18 * time.Hour // default max jitter for the inception - durationExpirationDayJitter = 5 * 24 * time.Hour // default max jitter for the expiration - durationSignatureInceptionHours = -3 * time.Hour // -(2+1) hours, be sure to catch daylight saving time and such, jitter is subtracted -) - -const timeFmt = "2006-01-02T15:04:05.000Z07:00" diff --git a/plugin/sign/signer.go b/plugin/sign/signer.go deleted file mode 100644 index 742e1555a4..0000000000 --- a/plugin/sign/signer.go +++ /dev/null @@ -1,206 +0,0 @@ -package sign - -import ( - "fmt" - "io" - "os" - "path/filepath" - "time" - - "github.com/coredns/coredns/plugin/file" - "github.com/coredns/coredns/plugin/file/tree" - clog "github.com/coredns/coredns/plugin/pkg/log" - - "github.com/miekg/dns" -) - -var log = clog.NewWithPlugin("sign") - -// Signer holds the data needed to sign a zone file. -type Signer struct { - keys []Pair - origin string - dbfile string - directory string - jitterIncep time.Duration - jitterExpir time.Duration - - signedfile string - stop chan struct{} -} - -// Sign signs a zone file according to the parameters in s. -func (s *Signer) Sign(now time.Time) (*file.Zone, error) { - rd, err := os.Open(s.dbfile) - if err != nil { - return nil, err - } - - z, err := Parse(rd, s.origin, s.dbfile) - if err != nil { - return nil, err - } - - mttl := z.SOA.Minttl - ttl := z.SOA.Header().Ttl - inception, expiration := lifetime(now, s.jitterIncep, s.jitterExpir) - z.SOA.Serial = uint32(now.Unix()) - - for _, pair := range s.keys { - pair.Public.Header().Ttl = ttl // set TTL on key so it matches the RRSIG. - z.Insert(pair.Public) - z.Insert(pair.Public.ToDS(dns.SHA1).ToCDS()) - z.Insert(pair.Public.ToDS(dns.SHA256).ToCDS()) - z.Insert(pair.Public.ToCDNSKEY()) - } - - names := names(s.origin, z) - ln := len(names) - - for _, pair := range s.keys { - rrsig, err := pair.signRRs([]dns.RR{z.SOA}, s.origin, ttl, inception, expiration) - if err != nil { - return nil, err - } - z.Insert(rrsig) - // NS apex may not be set if RR's have been discarded because the origin doesn't match. - if len(z.NS) > 0 { - rrsig, err = pair.signRRs(z.NS, s.origin, ttl, inception, expiration) - if err != nil { - return nil, err - } - z.Insert(rrsig) - } - } - - // We are walking the tree in the same direction, so names[] can be used here to indicated the next element. - i := 1 - err = z.AuthWalk(func(e *tree.Elem, zrrs map[uint16][]dns.RR, auth bool) error { - if !auth { - return nil - } - - if e.Name() == s.origin { - nsec := NSEC(e.Name(), names[(ln+i)%ln], mttl, append(e.Types(), dns.TypeNS, dns.TypeSOA, dns.TypeRRSIG, dns.TypeNSEC)) - z.Insert(nsec) - } else { - nsec := NSEC(e.Name(), names[(ln+i)%ln], mttl, append(e.Types(), dns.TypeRRSIG, dns.TypeNSEC)) - z.Insert(nsec) - } - - for t, rrs := range zrrs { - // RRSIGs are not signed and NS records are not signed because we are never authoratiative for them. - // The zone's apex nameservers records are not kept in this tree and are signed separately. - if t == dns.TypeRRSIG || t == dns.TypeNS { - continue - } - for _, pair := range s.keys { - rrsig, err := pair.signRRs(rrs, s.origin, rrs[0].Header().Ttl, inception, expiration) - if err != nil { - return err - } - e.Insert(rrsig) - } - } - i++ - return nil - }) - return z, err -} - -// resign checks if the signed zone exists, or needs resigning. -func (s *Signer) resign() error { - signedfile := filepath.Join(s.directory, s.signedfile) - rd, err := os.Open(filepath.Clean(signedfile)) - if err != nil && os.IsNotExist(err) { - return err - } - - now := time.Now().UTC() - return resign(rd, now) -} - -// resign will scan rd and check the signature on the SOA record. We will resign on the basis -// of 2 conditions: -// * either the inception is more than 6 days ago, or -// * we only have 1 week left on the signature -// -// All SOA signatures will be checked. If the SOA isn't found in the first 100 -// records, we will resign the zone. -func resign(rd io.Reader, now time.Time) (why error) { - zp := dns.NewZoneParser(rd, ".", "resign") - zp.SetIncludeAllowed(true) - i := 0 - - for rr, ok := zp.Next(); ok; rr, ok = zp.Next() { - switch x := rr.(type) { - case *dns.RRSIG: - if x.TypeCovered != dns.TypeSOA { - continue - } - incep, _ := time.Parse("20060102150405", dns.TimeToString(x.Inception)) - // If too long ago, resign. - if now.Sub(incep) >= 0 && now.Sub(incep) > durationResignDays { - return fmt.Errorf("inception %q was more than: %s ago from %s: %s", incep.Format(timeFmt), durationResignDays, now.Format(timeFmt), now.Sub(incep)) - } - // Inception hasn't even start yet. - if now.Sub(incep) < 0 { - return fmt.Errorf("inception %q date is in the future: %s", incep.Format(timeFmt), now.Sub(incep)) - } - - expire, _ := time.Parse("20060102150405", dns.TimeToString(x.Expiration)) - if expire.Sub(now) < durationExpireDays { - return fmt.Errorf("expiration %q is less than: %s away from %s: %s", expire.Format(timeFmt), durationExpireDays, now.Format(timeFmt), expire.Sub(now)) - } - } - i++ - if i > 100 { - // 100 is a random number. A SOA record should be the first in the zonefile, but RFC 1035 doesn't actually mandate this. So it could - // be 3rd or even later. The number 100 looks crazy high enough that it will catch all weird zones, but not high enough to keep the CPU - // busy with parsing all the time. - return fmt.Errorf("no SOA RRSIG found in first 100 records") - } - } - - return zp.Err() -} - -func signAndLog(s *Signer, why error) { - now := time.Now().UTC() - z, err := s.Sign(now) - log.Infof("Signing %q because %s", s.origin, why) - if err != nil { - log.Warningf("Error signing %q with key tags %q in %s: %s, next: %s", s.origin, keyTag(s.keys), time.Since(now), err, now.Add(durationRefreshHours).Format(timeFmt)) - return - } - - if err := s.write(z); err != nil { - log.Warningf("Error signing %q: failed to move zone file into place: %s", s.origin, err) - return - } - log.Infof("Successfully signed zone %q in %q with key tags %q and %d SOA serial, elapsed %f, next: %s", s.origin, filepath.Join(s.directory, s.signedfile), keyTag(s.keys), z.SOA.Serial, time.Since(now).Seconds(), now.Add(durationRefreshHours).Format(timeFmt)) -} - -// refresh checks every val if some zones need to be resigned. -func (s *Signer) refresh(val time.Duration) { - tick := time.NewTicker(val) - defer tick.Stop() - for { - select { - case <-s.stop: - return - case <-tick.C: - why := s.resign() - if why == nil { - continue - } - signAndLog(s, why) - } - } -} - -func lifetime(now time.Time, jitterInception, jitterExpiration time.Duration) (uint32, uint32) { - incep := uint32(now.Add(durationSignatureInceptionHours).Add(jitterInception).Unix()) - expir := uint32(now.Add(durationSignatureExpireDays).Add(jitterExpiration).Unix()) - return incep, expir -} diff --git a/plugin/sign/signer_test.go b/plugin/sign/signer_test.go deleted file mode 100644 index a69ae059fd..0000000000 --- a/plugin/sign/signer_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package sign - -import ( - "os" - "testing" - "time" - - "github.com/coredns/caddy" - - "github.com/miekg/dns" -) - -func TestSign(t *testing.T) { - input := `sign testdata/db.miek.nl miek.nl { - key file testdata/Kmiek.nl.+013+59725 - directory testdata - }` - c := caddy.NewTestController("dns", input) - sign, err := parse(c) - if err != nil { - t.Fatal(err) - } - if len(sign.signers) != 1 { - t.Fatalf("Expected 1 signer, got %d", len(sign.signers)) - } - z, err := sign.signers[0].Sign(time.Now().UTC()) - if err != nil { - t.Error(err) - } - - apex, _ := z.Search("miek.nl.") - if x := apex.Type(dns.TypeDS); len(x) != 0 { - t.Errorf("Expected %d DS records, got %d", 0, len(x)) - } - if x := apex.Type(dns.TypeCDS); len(x) != 2 { - t.Errorf("Expected %d CDS records, got %d", 2, len(x)) - } - if x := apex.Type(dns.TypeCDNSKEY); len(x) != 1 { - t.Errorf("Expected %d CDNSKEY record, got %d", 1, len(x)) - } - if x := apex.Type(dns.TypeDNSKEY); len(x) != 1 { - t.Errorf("Expected %d DNSKEY record, got %d", 1, len(x)) - } -} - -func TestSignApexZone(t *testing.T) { - apex := `$TTL 30M -$ORIGIN example.org. -@ IN SOA linode miek.miek.nl. ( 1282630060 4H 1H 7D 4H ) - IN NS linode -` - if err := os.WriteFile("db.apex-test.example.org", []byte(apex), 0644); err != nil { - t.Fatal(err) - } - defer os.Remove("db.apex-test.example.org") - input := `sign db.apex-test.example.org example.org { - key file testdata/Kmiek.nl.+013+59725 - directory testdata - }` - c := caddy.NewTestController("dns", input) - sign, err := parse(c) - if err != nil { - t.Fatal(err) - } - z, err := sign.signers[0].Sign(time.Now().UTC()) - if err != nil { - t.Error(err) - } - - el, _ := z.Search("example.org.") - nsec := el.Type(dns.TypeNSEC) - if len(nsec) != 1 { - t.Errorf("Expected 1 NSEC for %s, got %d", "example.org.", len(nsec)) - } - if x := nsec[0].(*dns.NSEC).NextDomain; x != "example.org." { - t.Errorf("Expected NSEC NextDomain %s, got %s", "example.org.", x) - } - if x := nsec[0].(*dns.NSEC).TypeBitMap; len(x) != 7 { - t.Errorf("Expected NSEC bitmap to be %d elements, got %d", 7, x) - } - if x := nsec[0].(*dns.NSEC).TypeBitMap; x[6] != dns.TypeCDNSKEY { - t.Errorf("Expected NSEC bitmap element 5 to be %d, got %d", dns.TypeCDNSKEY, x[6]) - } - if x := nsec[0].(*dns.NSEC).TypeBitMap; x[4] != dns.TypeDNSKEY { - t.Errorf("Expected NSEC bitmap element 4 to be %d, got %d", dns.TypeDNSKEY, x[4]) - } - dnskey := el.Type(dns.TypeDNSKEY) - if x := dnskey[0].Header().Ttl; x != 1800 { - t.Errorf("Expected DNSKEY TTL to be %d, got %d", 1800, x) - } - sigs := el.Type(dns.TypeRRSIG) - for _, s := range sigs { - if s.(*dns.RRSIG).TypeCovered == dns.TypeDNSKEY { - if s.(*dns.RRSIG).OrigTtl != dnskey[0].Header().Ttl { - t.Errorf("Expected RRSIG original TTL to match DNSKEY TTL, but %d != %d", s.(*dns.RRSIG).OrigTtl, dnskey[0].Header().Ttl) - } - if s.(*dns.RRSIG).SignerName != dnskey[0].Header().Name { - t.Errorf("Expected RRSIG signer name to match DNSKEY ownername, but %s != %s", s.(*dns.RRSIG).SignerName, dnskey[0].Header().Name) - } - } - } -} - -func TestSignGlue(t *testing.T) { - input := `sign testdata/db.miek.nl miek.nl { - key file testdata/Kmiek.nl.+013+59725 - directory testdata - }` - c := caddy.NewTestController("dns", input) - sign, err := parse(c) - if err != nil { - t.Fatal(err) - } - if len(sign.signers) != 1 { - t.Fatalf("Expected 1 signer, got %d", len(sign.signers)) - } - z, err := sign.signers[0].Sign(time.Now().UTC()) - if err != nil { - t.Error(err) - } - - e, _ := z.Search("ns2.bla.miek.nl.") - sigs := e.Type(dns.TypeRRSIG) - if len(sigs) != 0 { - t.Errorf("Expected no RRSIG for %s, got %d", "ns2.bla.miek.nl.", len(sigs)) - } -} - -func TestSignDS(t *testing.T) { - input := `sign testdata/db.miek.nl_ns miek.nl { - key file testdata/Kmiek.nl.+013+59725 - directory testdata - }` - c := caddy.NewTestController("dns", input) - sign, err := parse(c) - if err != nil { - t.Fatal(err) - } - if len(sign.signers) != 1 { - t.Fatalf("Expected 1 signer, got %d", len(sign.signers)) - } - z, err := sign.signers[0].Sign(time.Now().UTC()) - if err != nil { - t.Error(err) - } - - // dnssec-signzone outputs this for db.miek.nl_ns: - // - // child.miek.nl. 1800 IN NS ns.child.miek.nl. - // child.miek.nl. 1800 IN DS 34385 13 2 fc7397c77afbccb6742fc.... - // child.miek.nl. 1800 IN RRSIG DS 13 3 1800 20191223121229 20191123121229 59725 miek.nl. ZwptLzVVs.... - // child.miek.nl. 14400 IN NSEC www.miek.nl. NS DS RRSIG NSEC - // child.miek.nl. 14400 IN RRSIG NSEC 13 3 14400 20191223121229 20191123121229 59725 miek.nl. w+CcA8... - - name := "child.miek.nl." - e, _ := z.Search(name) - if x := len(e.Types()); x != 4 { // NS DS NSEC and 2x RRSIG - t.Errorf("Expected 4 records for %s, got %d", name, x) - } - - ds := e.Type(dns.TypeDS) - if len(ds) != 1 { - t.Errorf("Expected DS for %s, got %d", name, len(ds)) - } - sigs := e.Type(dns.TypeRRSIG) - if len(sigs) != 2 { - t.Errorf("Expected no RRSIG for %s, got %d", name, len(sigs)) - } - nsec := e.Type(dns.TypeNSEC) - if x := nsec[0].(*dns.NSEC).NextDomain; x != "www.miek.nl." { - t.Errorf("Expected no NSEC NextDomain to be %s for %s, got %s", "www.miek.nl.", name, x) - } - minttl := z.SOA.Minttl - if x := nsec[0].Header().Ttl; x != minttl { - t.Errorf("Expected no NSEC TTL to be %d for %s, got %d", minttl, "www.miek.nl.", x) - } -} diff --git a/plugin/sign/testdata/Kmiek.nl.+013+59725.key b/plugin/sign/testdata/Kmiek.nl.+013+59725.key deleted file mode 100644 index b3e3654e38..0000000000 --- a/plugin/sign/testdata/Kmiek.nl.+013+59725.key +++ /dev/null @@ -1,5 +0,0 @@ -; This is a key-signing key, keyid 59725, for miek.nl. -; Created: 20190709192036 (Tue Jul 9 20:20:36 2019) -; Publish: 20190709192036 (Tue Jul 9 20:20:36 2019) -; Activate: 20190709192036 (Tue Jul 9 20:20:36 2019) -miek.nl. IN DNSKEY 257 3 13 sfzRg5nDVxbeUc51su4MzjgwpOpUwnuu81SlRHqJuXe3SOYOeypR69tZ 52XLmE56TAmPHsiB8Rgk+NTpf0o1Cw== diff --git a/plugin/sign/testdata/Kmiek.nl.+013+59725.private b/plugin/sign/testdata/Kmiek.nl.+013+59725.private deleted file mode 100644 index 2545ed9a9e..0000000000 --- a/plugin/sign/testdata/Kmiek.nl.+013+59725.private +++ /dev/null @@ -1,6 +0,0 @@ -Private-key-format: v1.3 -Algorithm: 13 (ECDSAP256SHA256) -PrivateKey: rm7EdHRca//6xKpJzeoLt/mrfgQnltJ0WpQGtOG59yo= -Created: 20190709192036 -Publish: 20190709192036 -Activate: 20190709192036 diff --git a/plugin/sign/testdata/db.miek.nl b/plugin/sign/testdata/db.miek.nl deleted file mode 100644 index 4041b1b5ef..0000000000 --- a/plugin/sign/testdata/db.miek.nl +++ /dev/null @@ -1,17 +0,0 @@ -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( 1282630060 4H 1H 7D 4H ) - IN NS linode.atoom.net. - IN MX 1 aspmx.l.google.com. - IN AAAA 2a01:7e00::f03c:91ff:fe79:234c - IN DNSKEY 257 3 13 sfzRg5nDVxbeUc51su4MzjgwpOpUwnuu81SlRHqJuXe3SOYOeypR69tZ52XLmE56TAmPHsiB8Rgk+NTpf0o1Cw== - -a IN AAAA 2a01:7e00::f03c:91ff:fe79:234c -www IN CNAME a - - -bla IN NS ns1.bla.com. -ns3.blaaat.miek.nl. IN AAAA ::1 ; non-glue, should be signed. -; in baliwick nameserver that requires glue, should not be signed -bla IN NS ns2.bla.miek.nl. -ns2.bla.miek.nl. IN A 127.0.0.1 diff --git a/plugin/sign/testdata/db.miek.nl_ns b/plugin/sign/testdata/db.miek.nl_ns deleted file mode 100644 index bd2371f160..0000000000 --- a/plugin/sign/testdata/db.miek.nl_ns +++ /dev/null @@ -1,10 +0,0 @@ -$TTL 30M -$ORIGIN miek.nl. -@ IN SOA linode.atoom.net. miek.miek.nl. ( 1282630060 4H 1H 7D 4H ) - NS linode.atoom.net. - DNSKEY 257 3 13 sfzRg5nDVxbeUc51su4MzjgwpOpUwnuu81SlRHqJuXe3SOYOeypR69tZ52XLmE56TAmPHsiB8Rgk+NTpf0o1Cw== - -www AAAA ::1 -child NS ns.child -ns.child AAAA ::1 -child DS 34385 13 2 fc7397c77afbccb6742fcff19c7b1410d0044661e7085fc200ae1ab3d15a5842 diff --git a/plugin/template/README.md b/plugin/template/README.md deleted file mode 100644 index 1bca906624..0000000000 --- a/plugin/template/README.md +++ /dev/null @@ -1,298 +0,0 @@ -# template - -## Name - -*template* - allows for dynamic responses based on the incoming query. - -## Description - -The *template* plugin allows you to dynamically respond to queries by just writing a (Go) template. - -## Syntax - -~~~ -template CLASS TYPE [ZONE...] { - match REGEX... - answer RR - additional RR - authority RR - rcode CODE - ederror EXTENDED_ERROR_CODE [EXTRA_REASON] - fallthrough [FALLTHROUGH-ZONE...] -} -~~~ - -* **CLASS** the query class (usually IN or ANY). -* **TYPE** the query type (A, PTR, ... can be ANY to match all types). -* **ZONE** the zone scope(s) for this template. Defaults to the server zones. -* `match` **REGEX** [Go regexp](https://golang.org/pkg/regexp/) that are matched against the incoming question name. - Specifying no regex matches everything (default: `.*`). First matching regex wins. -* `answer|additional|authority` **RR** A [RFC 1035](https://tools.ietf.org/html/rfc1035#section-5) style resource record fragment - built by a [Go template](https://golang.org/pkg/text/template/) that contains the reply. Specifying no answer will result - in a response with an empty answer section. -* `rcode` **CODE** A response code (`NXDOMAIN, SERVFAIL, ...`). The default is `NOERROR`. Valid response code values are - per the `RcodeToString` map defined by the `miekg/dns` package in `msg.go`. -* `ederror` **EXTENDED_ERROR_CODE** is an extended DNS error code as a number defined in `RFC8914` (0, 1, 2,..., 24). - **EXTRA_REASON** is an additional string explaining the reason for returning the error. -* `fallthrough` Continue with the next _template_ instance if the _template_'s **ZONE** matches a query name but no regex match. - If there is no next _template_, continue resolution with the next plugin. If **[FALLTHROUGH-ZONE...]** are listed (for example - `in-addr.arpa` and `ip6.arpa`), then only queries for those zones will be subject to fallthrough. Without - `fallthrough`, when the _template_'s **ZONE** matches a query but no regex match then a `SERVFAIL` response is returned. - -[Also see](#also-see) contains an additional reading list. - -## Templates - -Each resource record is a full-featured [Go template](https://golang.org/pkg/text/template/) with the following predefined data - -* `.Zone` the matched zone string (e.g. `example.`). -* `.Name` the query name, as a string (lowercased). -* `.Class` the query class (usually `IN`). -* `.Type` the RR type requested (e.g. `PTR`). -* `.Match` an array of all matches. `index .Match 0` refers to the whole match. -* `.Group` a map of the named capture groups. -* `.Message` the complete incoming DNS message. -* `.Question` the matched question section. -* `.Remote` client’s IP address -* `.Meta` a function that takes a metadata name and returns the value, if the - metadata plugin is enabled. For example, `.Meta "kubernetes/client-namespace"` - -and the following predefined [template functions](https://golang.org/pkg/text/template#hdr-Functions) - -* `parseInt` interprets a string in the given base and bit size. Equivalent to [strconv.ParseUint](https://golang.org/pkg/strconv#ParseUint). - -The output of the template must be a [RFC 1035](https://tools.ietf.org/html/rfc1035) style resource record (commonly referred to as a "zone file"). - -**WARNING** there is a syntactical problem with Go templates and CoreDNS config files. Expressions - like `{{$var}}` will be interpreted as a reference to an environment variable by CoreDNS (and - Caddy) while `{{ $var }}` will work. See [Bugs](#bugs) and corefile(5). - -## Metrics - -If monitoring is enabled (via the *prometheus* plugin) then the following metrics are exported: - -* `coredns_template_matches_total{server, zone, view, class, type}` the total number of matched requests by regex. -* `coredns_template_template_failures_total{server, zone, view, class, type, section, template}` the number of times the Go templating failed. Regex, section and template label values can be used to map the error back to the config file. -* `coredns_template_rr_failures_total{server, zone, view, class, type, section, template}` the number of times the templated resource record was invalid and could not be parsed. Regex, section and template label values can be used to map the error back to the config file. - -Both failure cases indicate a problem with the template configuration. The `server` label indicates -the server incrementing the metric, see the *metrics* plugin for details. - -## Examples - -### Resolve everything to NXDOMAIN - -The most simplistic template is - -~~~ corefile -. { - template ANY ANY { - rcode NXDOMAIN - } -} -~~~ - -1. This template uses the default zone (`.` or all queries) -2. All queries will be answered (no `fallthrough`) -3. The answer is always NXDOMAIN - -### Resolve .invalid as NXDOMAIN - -The `.invalid` domain is a reserved TLD (see [RFC 2606 Reserved Top Level DNS Names](https://tools.ietf.org/html/rfc2606#section-2)) to indicate invalid domains. - -~~~ corefile -. { - forward . 8.8.8.8 - - template ANY ANY invalid { - rcode NXDOMAIN - authority "invalid. 60 {{ .Class }} SOA ns.invalid. hostmaster.invalid. (1 60 60 60 60)" - ederror 21 "Blocked according to RFC2606" - } -} -~~~ - -1. A query to .invalid will result in NXDOMAIN (rcode) -2. A dummy SOA record is sent to hand out a TTL of 60s for caching purposes -3. Querying `.invalid` in the `CH` class will also cause a NXDOMAIN/SOA response -4. The default regex is `.*` - -### Block invalid search domain completions - -Imagine you run `example.com` with a datacenter `dc1.example.com`. The datacenter domain -is part of the DNS search domain. -However `something.example.com.dc1.example.com` would indicate a fully qualified -domain name (`something.example.com`) that inadvertently has the default domain or search -path (`dc1.example.com`) added. - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN ANY example.com.dc1.example.com { - rcode NXDOMAIN - authority "{{ .Zone }} 60 IN SOA ns.example.com hostmaster.example.com (1 60 60 60 60)" - } -} -~~~ - -A more verbose regex based equivalent would be - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN ANY example.com { - match "example\.com\.(dc1\.example\.com\.)$" - rcode NXDOMAIN - authority "{{ index .Match 1 }} 60 IN SOA ns.{{ index .Match 1 }} hostmaster.{{ index .Match 1 }} (1 60 60 60 60)" - fallthrough - } -} -~~~ - -The regex-based version can do more complex matching/templating while zone-based templating is easier to read and use. - -### Resolve A/PTR for .example - -~~~ corefile -. { - forward . 8.8.8.8 - - # ip-a-b-c-d.example A a.b.c.d - - template IN A example { - match (^|[.])ip-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A {{ .Group.a }}.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - fallthrough - } - - # d.c.b.a.in-addr.arpa PTR ip-a-b-c-d.example - - template IN PTR in-addr.arpa { - match ^(?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.]in-addr[.]arpa[.]$ - answer "{{ .Name }} 60 IN PTR ip-{{ .Group.a }}-{{ .Group.b }}-{{ .Group.c }}-{{ .Group.d }}.example." - } -} -~~~ - -An IPv4 address consists of 4 bytes, `a.b.c.d`. Named groups make it less error-prone to reverse the -IP address in the PTR case. Try to use named groups to explain what your regex and template are doing. - -Note that the A record is actually a wildcard: any subdomain of the IP address will resolve to the IP address. - -Having templates to map certain PTR/A pairs is a common pattern. - -Fallthrough is needed for mixed domains where only some responses are templated. - -### Resolve hexadecimal ip pattern using parseInt - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN A example { - match "^ip0a(?P[a-f0-9]{2})(?P[a-f0-9]{2})(?P[a-f0-9]{2})[.]example[.]$" - answer "{{ .Name }} 60 IN A 10.{{ parseInt .Group.b 16 8 }}.{{ parseInt .Group.c 16 8 }}.{{ parseInt .Group.d 16 8 }}" - fallthrough - } -} -~~~ - -An IPv4 address can be expressed in a more compact form using its hexadecimal encoding. -For example `ip-10-123-123.example.` can instead be expressed as `ip0a7b7b7b.example.` - -### Resolve multiple ip patterns - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN A example { - match "^ip-(?P10)-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]dc[.]example[.]$" - match "^(?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.](?P[0-9]*)[.]ext[.]example[.]$" - answer "{{ .Name }} 60 IN A {{ .Group.a}}.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - fallthrough - } -} -~~~ - -Named capture groups can be used to template one response for multiple patterns. - -### Resolve A and MX records for IP templates in .example - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN A example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - fallthrough - } - template IN MX example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN MX 10 {{ .Name }}" - additional "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - fallthrough - } -} -~~~ - -### Adding authoritative nameservers to the response - -~~~ corefile -. { - forward . 8.8.8.8 - - template IN A example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - authority "example. 60 IN NS ns0.example." - authority "example. 60 IN NS ns1.example." - additional "ns0.example. 60 IN A 203.0.113.8" - additional "ns1.example. 60 IN A 198.51.100.8" - fallthrough - } - template IN MX example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN MX 10 {{ .Name }}" - additional "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - authority "example. 60 IN NS ns0.example." - authority "example. 60 IN NS ns1.example." - additional "ns0.example. 60 IN A 203.0.113.8" - additional "ns1.example. 60 IN A 198.51.100.8" - fallthrough - } -} -~~~ - -### Fabricate a CNAME - -This example responds with a CNAME to `google.com` for any DNS query made exactly for `foogle.com`. -The answer will also contain a record for `google.com` if the upstream nameserver can return a record for it of the -requested type. - -~~~ corefile -. { - template IN ANY foogle.com { - match "^foogle\.com\.$" - answer "foogle.com 60 IN CNAME google.com" - } - forward . 8.8.8.8 -} -~~~ - -## Also see - -* [Go regexp](https://golang.org/pkg/regexp/) for details about the regex implementation -* [RE2 syntax reference](https://github.com/google/re2/wiki/Syntax) for details about the regex syntax -* [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.6.1) and [RFC 1035](https://tools.ietf.org/html/rfc1035#section-5) for the resource record format -* [Go template](https://golang.org/pkg/text/template/) for the template language reference - -## Bugs - -CoreDNS supports [caddyfile environment variables](https://caddyserver.com/docs/caddyfile#env) -with notion of `{$ENV_VAR}`. This parser feature will break [Go template variables](https://golang.org/pkg/text/template/#hdr-Variables) notations like`{{$variable}}`. -The equivalent notation `{{ $variable }}` will work. -Try to avoid Go template variables in the context of this plugin. diff --git a/plugin/template/cname_test.go b/plugin/template/cname_test.go deleted file mode 100644 index eef949e2db..0000000000 --- a/plugin/template/cname_test.go +++ /dev/null @@ -1,96 +0,0 @@ -package template - -import ( - "context" - "regexp" - "testing" - gotmpl "text/template" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestTruncatedCNAME(t *testing.T) { - up := &Upstub{ - Qclass: dns.ClassINET, - Truncated: true, - Case: test.Case{ - Qname: "cname.test.", - Qtype: dns.TypeA, - Rcode: dns.RcodeSuccess, - Answer: []dns.RR{ - test.CNAME("cname.test. 600 IN CNAME test.up"), - test.A("test.up. 600 IN A 1.2.3.4"), - }, - }, - } - - handler := Handler{ - Zones: []string{"."}, - Templates: []template{{ - regex: []*regexp.Regexp{regexp.MustCompile(`^cname\.test\.$`)}, - answer: []*gotmpl.Template{gotmpl.Must(gotmpl.New("answer").Parse(up.Answer[0].String()))}, - qclass: dns.ClassINET, - qtype: dns.TypeA, - zones: []string{"test."}, - upstream: up, - }}, - } - - r := &dns.Msg{Question: []dns.Question{{Name: up.Qname, Qclass: up.Qclass, Qtype: up.Qtype}}} - w := dnstest.NewRecorder(&test.ResponseWriter{}) - - _, err := handler.ServeDNS(context.TODO(), w, r) - - if err != nil { - t.Fatalf("Unexpected error %q", err) - } - if w.Msg == nil { - t.Fatalf("Unexpected empty response.") - } - if !w.Msg.Truncated { - t.Error("Expected reply to be marked truncated.") - } - err = test.SortAndCheck(w.Msg, up.Case) - if err != nil { - t.Error(err) - } -} - -// Upstub implements an Upstreamer that returns a set response for test purposes -type Upstub struct { - test.Case - Truncated bool - Qclass uint16 -} - -// Lookup returns a set response -func (t *Upstub) Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) { - var answer []dns.RR - // if query type is not CNAME, remove any CNAME with same name as qname from the answer - if t.Qtype != dns.TypeCNAME { - for _, a := range t.Answer { - if c, ok := a.(*dns.CNAME); ok && c.Header().Name == t.Qname { - continue - } - answer = append(answer, a) - } - } else { - answer = t.Answer - } - - return &dns.Msg{ - MsgHdr: dns.MsgHdr{ - Response: true, - Truncated: t.Truncated, - Rcode: t.Rcode, - }, - Question: []dns.Question{{Name: t.Qname, Qtype: t.Qtype, Qclass: t.Qclass}}, - Answer: answer, - Extra: t.Extra, - Ns: t.Ns, - }, nil -} diff --git a/plugin/template/log_test.go b/plugin/template/log_test.go deleted file mode 100644 index 13d6e6b28d..0000000000 --- a/plugin/template/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package template - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/template/metrics.go b/plugin/template/metrics.go deleted file mode 100644 index 6a6912a4fa..0000000000 --- a/plugin/template/metrics.go +++ /dev/null @@ -1,32 +0,0 @@ -package template - -import ( - "github.com/coredns/coredns/plugin" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promauto" -) - -var ( - // templateMatchesCount is the counter of template regex matches. - templateMatchesCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "template", - Name: "matches_total", - Help: "Counter of template regex matches.", - }, []string{"server", "zone", "view", "class", "type"}) - // templateFailureCount is the counter of go template failures. - templateFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "template", - Name: "template_failures_total", - Help: "Counter of go template failures.", - }, []string{"server", "zone", "view", "class", "type", "section", "template"}) - // templateRRFailureCount is the counter of mis-templated RRs. - templateRRFailureCount = promauto.NewCounterVec(prometheus.CounterOpts{ - Namespace: plugin.Namespace, - Subsystem: "template", - Name: "rr_failures_total", - Help: "Counter of mis-templated RRs.", - }, []string{"server", "zone", "view", "class", "type", "section", "template"}) -) diff --git a/plugin/template/setup.go b/plugin/template/setup.go deleted file mode 100644 index cb2c706f11..0000000000 --- a/plugin/template/setup.go +++ /dev/null @@ -1,162 +0,0 @@ -package template - -import ( - "regexp" - "strconv" - gotmpl "text/template" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/upstream" - - "github.com/miekg/dns" -) - -func init() { plugin.Register("template", setupTemplate) } - -func setupTemplate(c *caddy.Controller) error { - handler, err := templateParse(c) - if err != nil { - return plugin.Error("template", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - handler.Next = next - return handler - }) - - return nil -} - -func templateParse(c *caddy.Controller) (handler Handler, err error) { - handler.Templates = make([]template, 0) - - for c.Next() { - if !c.NextArg() { - return handler, c.ArgErr() - } - class, ok := dns.StringToClass[c.Val()] - if !ok { - return handler, c.Errf("invalid query class %s", c.Val()) - } - - if !c.NextArg() { - return handler, c.ArgErr() - } - qtype, ok := dns.StringToType[c.Val()] - if !ok { - return handler, c.Errf("invalid RR class %s", c.Val()) - } - - zones := plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - handler.Zones = append(handler.Zones, zones...) - t := template{qclass: class, qtype: qtype, zones: zones} - - t.regex = make([]*regexp.Regexp, 0) - templatePrefix := "" - - t.answer = make([]*gotmpl.Template, 0) - t.upstream = upstream.New() - - for c.NextBlock() { - switch c.Val() { - case "match": - args := c.RemainingArgs() - if len(args) == 0 { - return handler, c.ArgErr() - } - for _, regex := range args { - r, err := regexp.Compile(regex) - if err != nil { - return handler, c.Errf("could not parse regex: %s, %v", regex, err) - } - templatePrefix = templatePrefix + regex + " " - t.regex = append(t.regex, r) - } - - case "answer": - args := c.RemainingArgs() - if len(args) == 0 { - return handler, c.ArgErr() - } - for _, answer := range args { - tmpl, err := newTemplate("answer", answer) - if err != nil { - return handler, c.Errf("could not compile template: %s, %v", c.Val(), err) - } - t.answer = append(t.answer, tmpl) - } - - case "additional": - args := c.RemainingArgs() - if len(args) == 0 { - return handler, c.ArgErr() - } - for _, additional := range args { - tmpl, err := newTemplate("additional", additional) - if err != nil { - return handler, c.Errf("could not compile template: %s, %v\n", c.Val(), err) - } - t.additional = append(t.additional, tmpl) - } - - case "authority": - args := c.RemainingArgs() - if len(args) == 0 { - return handler, c.ArgErr() - } - for _, authority := range args { - tmpl, err := newTemplate("authority", authority) - if err != nil { - return handler, c.Errf("could not compile template: %s, %v\n", c.Val(), err) - } - t.authority = append(t.authority, tmpl) - } - - case "rcode": - if !c.NextArg() { - return handler, c.ArgErr() - } - rcode, ok := dns.StringToRcode[c.Val()] - if !ok { - return handler, c.Errf("unknown rcode %s", c.Val()) - } - t.rcode = rcode - - case "ederror": - args := c.RemainingArgs() - if len(args) != 1 && len(args) != 2 { - return handler, c.ArgErr() - } - - code, err := strconv.ParseUint(args[0], 10, 16) - if err != nil { - return handler, c.Errf("error parsing extended DNS error code %s, %v\n", c.Val(), err) - } - if len(args) == 2 { - t.ederror = &ederror{code: uint16(code), reason: args[1]} - } else { - t.ederror = &ederror{code: uint16(code)} - } - - case "fallthrough": - t.fall.SetZonesFromArgs(c.RemainingArgs()) - - case "upstream": - // remove soon - c.RemainingArgs() - default: - return handler, c.ArgErr() - } - } - - if len(t.regex) == 0 { - t.regex = append(t.regex, regexp.MustCompile(".*")) - } - - handler.Templates = append(handler.Templates, t) - } - - return handler, nil -} diff --git a/plugin/template/setup_test.go b/plugin/template/setup_test.go deleted file mode 100644 index 345525da6d..0000000000 --- a/plugin/template/setup_test.go +++ /dev/null @@ -1,200 +0,0 @@ -package template - -import ( - "testing" - - "github.com/coredns/caddy" -) - -func TestSetup(t *testing.T) { - c := caddy.NewTestController("dns", `template ANY ANY { - rcode - }`) - err := setupTemplate(c) - if err == nil { - t.Errorf("Expected setupTemplate to fail on broken template, got no error") - } - c = caddy.NewTestController("dns", `template ANY ANY { - rcode NXDOMAIN - }`) - err = setupTemplate(c) - if err != nil { - t.Errorf("Expected no errors, got: %v", err) - } -} - -func TestSetupParse(t *testing.T) { - serverBlockKeys := []string{"domain.com.:8053", "dynamic.domain.com.:8053"} - - tests := []struct { - inputFileRules string - shouldErr bool - }{ - // parse errors - {`template`, true}, - {`template X`, true}, - {`template ANY`, true}, - {`template ANY X`, true}, - { - `template ANY ANY .* { - notavailable - }`, - true, - }, - { - `template ANY ANY { - answer - }`, - true, - }, - { - `template ANY ANY { - additional - }`, - true, - }, - { - `template ANY ANY { - rcode - }`, - true, - }, - { - `template ANY ANY { - rcode UNDEFINED - }`, - true, - }, - { - `template ANY ANY { - answer "{{" - }`, - true, - }, - { - `template ANY ANY { - additional "{{" - }`, - true, - }, - { - `template ANY ANY { - authority "{{" - }`, - true, - }, - { - `template ANY ANY { - answer "{{ notAFunction }}" - }`, - true, - }, - { - `template ANY ANY { - answer "{{ parseInt }}" - additional "{{ parseInt }}" - authority "{{ parseInt }}" - }`, - false, - }, - // examples - {`template ANY ANY (?P`, false}, - { - `template ANY ANY { - - }`, - false, - }, - { - `template ANY A example.com { - match ip-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]com - answer "{{ .Name }} A {{ .Group.a }}.{{ .Group.b }}.{{ .Group.c }}.{{ .Grup.d }}." - fallthrough - }`, - false, - }, - { - `template ANY AAAA example.com { - match ip-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]com - authority "example.com 60 IN SOA ns.example.com hostmaster.example.com (1 60 60 60 60)" - fallthrough - }`, - false, - }, - { - `template IN ANY example.com { - match "[.](example[.]com[.]dc1[.]example[.]com[.])$" - rcode NXDOMAIN - authority "{{ index .Match 1 }} 60 IN SOA ns.{{ index .Match 1 }} hostmaster.example.com (1 60 60 60 60)" - fallthrough example.com - }`, - false, - }, - { - `template IN A example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - } - template IN MX example. { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN MX 10 {{ .Name }}" - additional "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - }`, - false, - }, - { - `template IN A example { - match ^ip0a(?P[a-f0-9]{2})(?P[a-f0-9]{2})(?P[a-f0-9]{2})[.]example[.]$ - answer "{{ .Name }} 3600 IN A 10.{{ parseInt .Group.b 16 8 }}.{{ parseInt .Group.c 16 8 }}.{{ parseInt .Group.d 16 8 }}" - }`, - false, - }, - { - `template IN MX example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN MX 10 {{ .Name }}" - additional "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - authority "example. 60 IN NS ns0.example." - authority "example. 60 IN NS ns1.example." - additional "ns0.example. 60 IN A 203.0.113.8" - additional "ns1.example. 60 IN A 198.51.100.8" - }`, - false, - }, - { - `template ANY ANY invalid { - rcode NXDOMAIN - authority "invalid. 60 {{ .Class }} SOA ns.invalid. hostmaster.invalid. (1 60 60 60 60)" - ederror 21 "Blocked according to RFC2606" - }`, - false, - }, - { - `template ANY ANY invalid { - rcode NXDOMAIN - authority "invalid. 60 {{ .Class }} SOA ns.invalid. hostmaster.invalid. (1 60 60 60 60)" - ederror invalid "Blocked according to RFC2606" - }`, - true, - }, - { - `template ANY ANY invalid { - rcode NXDOMAIN - authority "invalid. 60 {{ .Class }} SOA ns.invalid. hostmaster.invalid. (1 60 60 60 60)" - ederror too many arguments - }`, - true, - }, - } - for i, test := range tests { - c := caddy.NewTestController("dns", test.inputFileRules) - c.ServerBlockKeys = serverBlockKeys - templates, err := templateParse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error\n---\n%s\n---\n%v", i, test.inputFileRules, templates) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } - } -} diff --git a/plugin/template/template.go b/plugin/template/template.go deleted file mode 100644 index 5eac81e8e4..0000000000 --- a/plugin/template/template.go +++ /dev/null @@ -1,227 +0,0 @@ -package template - -import ( - "bytes" - "context" - "regexp" - "strconv" - gotmpl "text/template" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/metrics" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// Handler is a plugin handler that takes a query and templates a response. -type Handler struct { - Zones []string - - Next plugin.Handler - Templates []template -} - -type template struct { - zones []string - rcode int - regex []*regexp.Regexp - answer []*gotmpl.Template - additional []*gotmpl.Template - authority []*gotmpl.Template - qclass uint16 - qtype uint16 - ederror *ederror - fall fall.F - upstream Upstreamer -} - -type ederror struct { - code uint16 - reason string -} - -// Upstreamer looks up targets of CNAME templates -type Upstreamer interface { - Lookup(ctx context.Context, state request.Request, name string, typ uint16) (*dns.Msg, error) -} - -type templateData struct { - Zone string - Name string - Regex string - Match []string - Group map[string]string - Class string - Type string - Message *dns.Msg - Question *dns.Question - Remote string - md map[string]metadata.Func -} - -func (data *templateData) Meta(metaName string) string { - if data.md == nil { - return "" - } - - if f, ok := data.md[metaName]; ok { - return f() - } - - return "" -} - -// ServeDNS implements the plugin.Handler interface. -func (h Handler) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - - zone := plugin.Zones(h.Zones).Matches(state.Name()) - if zone == "" { - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) - } - - for _, template := range h.Templates { - data, match, fthrough := template.match(ctx, state) - if !match { - if !fthrough { - return dns.RcodeServerFailure, nil - } - continue - } - - templateMatchesCount.WithLabelValues(metrics.WithServer(ctx), data.Zone, metrics.WithView(ctx), data.Class, data.Type).Inc() - - if template.rcode == dns.RcodeServerFailure { - return template.rcode, nil - } - - msg := new(dns.Msg) - msg.SetReply(r) - msg.Authoritative = true - msg.Rcode = template.rcode - - for _, answer := range template.answer { - rr, err := executeRRTemplate(metrics.WithServer(ctx), metrics.WithView(ctx), "answer", answer, data) - if err != nil { - return dns.RcodeServerFailure, err - } - msg.Answer = append(msg.Answer, rr) - if template.upstream != nil && (state.QType() == dns.TypeA || state.QType() == dns.TypeAAAA) && rr.Header().Rrtype == dns.TypeCNAME { - if up, err := template.upstream.Lookup(ctx, state, rr.(*dns.CNAME).Target, state.QType()); err == nil && up != nil { - msg.Truncated = up.Truncated - msg.Answer = append(msg.Answer, up.Answer...) - } - } - } - for _, additional := range template.additional { - rr, err := executeRRTemplate(metrics.WithServer(ctx), metrics.WithView(ctx), "additional", additional, data) - if err != nil { - return dns.RcodeServerFailure, err - } - msg.Extra = append(msg.Extra, rr) - } - for _, authority := range template.authority { - rr, err := executeRRTemplate(metrics.WithServer(ctx), metrics.WithView(ctx), "authority", authority, data) - if err != nil { - return dns.RcodeServerFailure, err - } - msg.Ns = append(msg.Ns, rr) - } - - if template.ederror != nil { - msg = msg.SetEdns0(4096, true) - ede := dns.EDNS0_EDE{InfoCode: template.ederror.code, ExtraText: template.ederror.reason} - msg.IsEdns0().Option = append(msg.IsEdns0().Option, &ede) - } - - w.WriteMsg(msg) - return template.rcode, nil - } - - return plugin.NextOrFailure(h.Name(), h.Next, ctx, w, r) -} - -// Name implements the plugin.Handler interface. -func (h Handler) Name() string { return "template" } - -func executeRRTemplate(server, view, section string, template *gotmpl.Template, data *templateData) (dns.RR, error) { - buffer := &bytes.Buffer{} - err := template.Execute(buffer, data) - if err != nil { - templateFailureCount.WithLabelValues(server, data.Zone, view, data.Class, data.Type, section, template.Tree.Root.String()).Inc() - return nil, err - } - rr, err := dns.NewRR(buffer.String()) - if err != nil { - templateRRFailureCount.WithLabelValues(server, data.Zone, view, data.Class, data.Type, section, template.Tree.Root.String()).Inc() - return rr, err - } - return rr, nil -} - -func newTemplate(name, text string) (*gotmpl.Template, error) { - funcMap := gotmpl.FuncMap{ - "parseInt": strconv.ParseUint, - } - return gotmpl.New(name).Funcs(funcMap).Parse(text) -} - -func (t template) match(ctx context.Context, state request.Request) (*templateData, bool, bool) { - q := state.Req.Question[0] - data := &templateData{md: metadata.ValueFuncs(ctx), Remote: state.IP()} - - zone := plugin.Zones(t.zones).Matches(state.Name()) - if zone == "" { - return data, false, true - } - - if t.qclass != dns.ClassANY && q.Qclass != dns.ClassANY && q.Qclass != t.qclass { - return data, false, true - } - if t.qtype != dns.TypeANY && q.Qtype != dns.TypeANY && q.Qtype != t.qtype { - return data, false, true - } - - for _, regex := range t.regex { - if !regex.MatchString(state.Name()) { - continue - } - - data.Zone = zone - data.Regex = regex.String() - data.Name = state.Name() - data.Question = &q - data.Message = state.Req - if q.Qclass != dns.ClassANY { - data.Class = dns.ClassToString[q.Qclass] - } else { - data.Class = dns.ClassToString[t.qclass] - } - if q.Qtype != dns.TypeANY { - data.Type = dns.TypeToString[q.Qtype] - } else { - data.Type = dns.TypeToString[t.qtype] - } - - matches := regex.FindStringSubmatch(state.Name()) - data.Match = make([]string, len(matches)) - data.Group = make(map[string]string) - groupNames := regex.SubexpNames() - for i, m := range matches { - data.Match[i] = m - data.Group[strconv.Itoa(i)] = m - } - for i, m := range matches { - if len(groupNames[i]) > 0 { - data.Group[groupNames[i]] = m - } - } - - return data, true, false - } - - return data, false, t.fall.Through(state.Name()) -} diff --git a/plugin/template/template_test.go b/plugin/template/template_test.go deleted file mode 100644 index 4c160988d6..0000000000 --- a/plugin/template/template_test.go +++ /dev/null @@ -1,679 +0,0 @@ -package template - -import ( - "context" - "fmt" - "regexp" - "testing" - gotmpl "text/template" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/fall" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestHandler(t *testing.T) { - exampleDomainATemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("(^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - exampleDomainAParseIntTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("^ip0a(?P[a-f0-9]{2})(?P[a-f0-9]{2})(?P[a-f0-9]{2})[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN A 10.{{ parseInt .Group.b 16 8 }}.{{ parseInt .Group.c 16 8 }}.{{ parseInt .Group.d 16 8 }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - exampleDomainIPATemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile(".*")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN A {{ .Remote }}"))}, - qclass: dns.ClassINET, - qtype: dns.TypeA, - fall: fall.Root, - zones: []string{"."}, - } - exampleDomainANSTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("(^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}"))}, - additional: []*gotmpl.Template{gotmpl.Must(newTemplate("additional", "ns0.example. IN A 203.0.113.8"))}, - authority: []*gotmpl.Template{gotmpl.Must(newTemplate("authority", "example. IN NS ns0.example.com."))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - exampleDomainMXTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("(^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 MX 10 {{ .Name }}"))}, - additional: []*gotmpl.Template{gotmpl.Must(newTemplate("additional", "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - invalidDomainTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]invalid[.]$")}, - rcode: dns.RcodeNameError, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "invalid. 60 {{ .Class }} SOA a.invalid. b.invalid. (1 60 60 60 60)"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - rcodeServfailTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile(".*")}, - rcode: dns.RcodeServerFailure, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - brokenTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN TXT \"{{ index .Match 2 }}\""))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - brokenParseIntTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }} 60 IN TXT \"{{ parseInt \"gg\" 16 8 }}\""))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - nonRRTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - nonRRAdditionalTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]example[.]$")}, - additional: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - nonRRAuthoritativeTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("[.]example[.]$")}, - authority: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "{{ .Name }}"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - cnameTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("example[.]net[.]")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", "example.net 60 IN CNAME target.example.com"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - mdTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("(^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", `{{ .Meta "foo" }}-{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}`))}, - additional: []*gotmpl.Template{gotmpl.Must(newTemplate("additional", `{{ .Meta "bar" }}.example. IN A 203.0.113.8`))}, - authority: []*gotmpl.Template{gotmpl.Must(newTemplate("authority", `example. IN NS {{ .Meta "bar" }}.example.com.`))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - mdMissingTemplate := template{ - regex: []*regexp.Regexp{regexp.MustCompile("(^|[.])ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$")}, - answer: []*gotmpl.Template{gotmpl.Must(newTemplate("answer", `{{ .Meta "foofoo" }}{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}`))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - } - templateWithEDE := template{ - rcode: dns.RcodeNameError, - regex: []*regexp.Regexp{regexp.MustCompile(".*")}, - authority: []*gotmpl.Template{gotmpl.Must(newTemplate("authority", "invalid. 60 {{ .Class }} SOA ns.invalid. hostmaster.invalid. (1 60 60 60 60)"))}, - qclass: dns.ClassANY, - qtype: dns.TypeANY, - fall: fall.Root, - zones: []string{"."}, - ederror: &ederror{code: 21, reason: "Blocked due to RFC2606"}, - } - - tests := []struct { - tmpl template - qname string - name string - qclass uint16 - qtype uint16 - expectedCode int - expectedErr string - verifyResponse func(*dns.Msg) error - md map[string]string - }{ - { - name: "RcodeServFail", - tmpl: rcodeServfailTemplate, - qname: "test.invalid.", - expectedCode: dns.RcodeServerFailure, - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "ExampleDomainNameMismatch", - tmpl: exampleDomainATemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "test.invalid.", - expectedCode: rcodeFallthrough, - }, - { - name: "BrokenTemplate", - tmpl: brokenTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeANY, - qname: "test.example.", - expectedCode: dns.RcodeServerFailure, - expectedErr: `template: answer:1:26: executing "answer" at : error calling index: index out of range: 2`, - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "NonRRTemplate", - tmpl: nonRRTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeANY, - qname: "test.example.", - expectedCode: dns.RcodeServerFailure, - expectedErr: `dns: not a TTL: "test.example." at line: 1:13`, - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "NonRRAdditionalTemplate", - tmpl: nonRRAdditionalTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeANY, - qname: "test.example.", - expectedCode: dns.RcodeServerFailure, - expectedErr: `dns: not a TTL: "test.example." at line: 1:13`, - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "NonRRAuthorityTemplate", - tmpl: nonRRAuthoritativeTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeANY, - qname: "test.example.", - expectedCode: dns.RcodeServerFailure, - expectedErr: `dns: not a TTL: "test.example." at line: 1:13`, - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "ExampleIPMatch", - tmpl: exampleDomainIPATemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "test.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - if r.Answer[0].(*dns.A).A.String() != "10.240.0.1" { - return fmt.Errorf("expected an A record for 10.95.12.8, got %v", r.Answer[0].String()) - } - return nil - }, - }, - { - name: "ExampleDomainMatch", - tmpl: exampleDomainATemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "ip-10-95-12-8.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - if r.Answer[0].(*dns.A).A.String() != "10.95.12.8" { - return fmt.Errorf("expected an A record for 10.95.12.8, got %v", r.Answer[0].String()) - } - return nil - }, - }, - { - name: "ExampleDomainMatchHexIp", - tmpl: exampleDomainAParseIntTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "ip0a5f0c09.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - if r.Answer[0].(*dns.A).A.String() != "10.95.12.9" { - return fmt.Errorf("expected an A record for 10.95.12.9, got %v", r.Answer[0].String()) - } - return nil - }, - }, - { - name: "BrokenParseIntTemplate", - tmpl: brokenParseIntTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeANY, - qname: "test.example.", - expectedCode: dns.RcodeServerFailure, - expectedErr: "template: answer:1:26: executing \"answer\" at : error calling parseInt: strconv.ParseUint: parsing \"gg\": invalid syntax", - verifyResponse: func(r *dns.Msg) error { - return nil - }, - }, - { - name: "ExampleDomainMXMatch", - tmpl: exampleDomainMXTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeMX, - qname: "ip-10-95-12-8.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeMX { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - if len(r.Extra) != 1 { - return fmt.Errorf("expected 1 extra record, got %v", len(r.Extra)) - } - if r.Extra[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an additional A record, got %v", dns.TypeToString[r.Extra[0].Header().Rrtype]) - } - return nil - }, - }, - { - name: "ExampleDomainANSMatch", - tmpl: exampleDomainANSTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "ip-10-95-12-8.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - if len(r.Extra) != 1 { - return fmt.Errorf("expected 1 extra record, got %v", len(r.Extra)) - } - if r.Extra[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an additional A record, got %v", dns.TypeToString[r.Extra[0].Header().Rrtype]) - } - if len(r.Ns) != 1 { - return fmt.Errorf("expected 1 authoritative record, got %v", len(r.Extra)) - } - if r.Ns[0].Header().Rrtype != dns.TypeNS { - return fmt.Errorf("expected an authoritative NS record, got %v", dns.TypeToString[r.Extra[0].Header().Rrtype]) - } - return nil - }, - }, - { - name: "ExampleInvalidNXDOMAIN", - tmpl: invalidDomainTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeMX, - qname: "test.invalid.", - expectedCode: dns.RcodeNameError, - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeSOA { - return fmt.Errorf("expected an SOA record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - return nil - }, - }, - { - name: "CNAMEWithoutUpstream", - tmpl: cnameTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "example.net.", - expectedCode: dns.RcodeSuccess, - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - return nil - }, - }, - { - name: "mdMatch", - tmpl: mdTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "ip-10-95-12-8.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - name := "myfoo-ip-10-95-12-8.example." - if r.Answer[0].Header().Name != name { - return fmt.Errorf("expected answer name %q, got %q", name, r.Answer[0].Header().Name) - } - if len(r.Extra) != 1 { - return fmt.Errorf("expected 1 extra record, got %v", len(r.Extra)) - } - if r.Extra[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an additional A record, got %v", dns.TypeToString[r.Extra[0].Header().Rrtype]) - } - name = "mybar.example." - if r.Extra[0].Header().Name != name { - return fmt.Errorf("expected additional name %q, got %q", name, r.Extra[0].Header().Name) - } - if len(r.Ns) != 1 { - return fmt.Errorf("expected 1 authoritative record, got %v", len(r.Extra)) - } - if r.Ns[0].Header().Rrtype != dns.TypeNS { - return fmt.Errorf("expected an authoritative NS record, got %v", dns.TypeToString[r.Extra[0].Header().Rrtype]) - } - ns, ok := r.Ns[0].(*dns.NS) - if !ok { - return fmt.Errorf("expected NS record to be type NS, got %v", r.Ns[0]) - } - rdata := "mybar.example.com." - if ns.Ns != rdata { - return fmt.Errorf("expected ns rdata %q, got %q", rdata, ns.Ns) - } - return nil - }, - md: map[string]string{ - "foo": "myfoo", - "bar": "mybar", - "foobar": "myfoobar", - }, - }, - { - name: "mdMissing", - tmpl: mdMissingTemplate, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "ip-10-95-12-8.example.", - verifyResponse: func(r *dns.Msg) error { - if len(r.Answer) != 1 { - return fmt.Errorf("expected 1 answer, got %v", len(r.Answer)) - } - if r.Answer[0].Header().Rrtype != dns.TypeA { - return fmt.Errorf("expected an A record answer, got %v", dns.TypeToString[r.Answer[0].Header().Rrtype]) - } - name := "ip-10-95-12-8.example." - if r.Answer[0].Header().Name != name { - return fmt.Errorf("expected answer name %q, got %q", name, r.Answer[0].Header().Name) - } - return nil - }, - md: map[string]string{ - "foo": "myfoo", - }, - }, - { - name: "EDNS error", - tmpl: templateWithEDE, - qclass: dns.ClassINET, - qtype: dns.TypeA, - qname: "test.invalid.", - expectedCode: dns.RcodeNameError, - verifyResponse: func(r *dns.Msg) error { - if opt := r.IsEdns0(); opt != nil { - matched := false - for _, ednsopt := range opt.Option { - if ede, ok := ednsopt.(*dns.EDNS0_EDE); ok { - if ede.InfoCode != dns.ExtendedErrorCodeNotSupported { - return fmt.Errorf("unexpected EDE code = %v, want %v", ede.InfoCode, dns.ExtendedErrorCodeNotSupported) - } - matched = true - } - } - if !matched { - t.Error("Error: acl.ServeDNS() missing Extended DNS Error option") - } - } else { - return fmt.Errorf("expected EDNS enabled") - } - return nil - }, - }, - } - - ctx := context.TODO() - - for _, tr := range tests { - handler := Handler{ - Next: test.NextHandler(rcodeFallthrough, nil), - Zones: []string{"."}, - Templates: []template{tr.tmpl}, - } - req := &dns.Msg{ - Question: []dns.Question{{ - Name: tr.qname, - Qclass: tr.qclass, - Qtype: tr.qtype, - }}, - } - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - if tr.md != nil { - ctx = metadata.ContextWithMetadata(context.Background()) - - for k, v := range tr.md { - // Go requires copying to a local variable for the closure to work - kk := k - vv := v - metadata.SetValueFunc(ctx, kk, func() string { - return vv - }) - } - } - - code, err := handler.ServeDNS(ctx, rec, req) - if err == nil && tr.expectedErr != "" { - t.Errorf("Test %v expected error: %v, got nothing", tr.name, tr.expectedErr) - } - if err != nil && tr.expectedErr == "" { - t.Errorf("Test %v expected no error got: %v", tr.name, err) - } - if err != nil && tr.expectedErr != "" && err.Error() != tr.expectedErr { - t.Errorf("Test %v expected error: %v, got: %v", tr.name, tr.expectedErr, err) - } - if code != tr.expectedCode { - t.Errorf("Test %v expected response code %v, got %v", tr.name, tr.expectedCode, code) - } - if err == nil && code != rcodeFallthrough { - // only verify if we got no error and expected no error - if err := tr.verifyResponse(rec.Msg); err != nil { - t.Errorf("Test %v could not verify the response: %v", tr.name, err) - } - } - } -} - -// TestMultiSection verifies that a corefile with multiple but different template sections works -func TestMultiSection(t *testing.T) { - ctx := context.TODO() - - multisectionConfig := ` - # Implicit section (see c.ServerBlockKeys) - # test.:8053 { - - # REFUSE IN A for the server zone (test.) - template IN A { - rcode REFUSED - } - # Fallthrough everything IN TXT for test. - template IN TXT { - match "$^" - rcode SERVFAIL - fallthrough - } - # Answer CH TXT *.coredns.invalid. / coredns.invalid. - template CH TXT coredns.invalid { - answer "{{ .Name }} 60 CH TXT \"test\"" - } - # Answer example. ip templates and fallthrough otherwise - template IN A example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - fallthrough - } - # Answer MX record requests for ip templates in example. and never fall through - template IN MX example { - match ^ip-10-(?P[0-9]*)-(?P[0-9]*)-(?P[0-9]*)[.]example[.]$ - answer "{{ .Name }} 60 IN MX 10 {{ .Name }}" - additional "{{ .Name }} 60 IN A 10.{{ .Group.b }}.{{ .Group.c }}.{{ .Group.d }}" - } - ` - c := caddy.NewTestController("dns", multisectionConfig) - c.ServerBlockKeys = []string{"test.:8053"} - - handler, err := templateParse(c) - if err != nil { - t.Fatalf("TestMultiSection could not parse config: %v", err) - } - - handler.Next = test.NextHandler(rcodeFallthrough, nil) - - rec := dnstest.NewRecorder(&test.ResponseWriter{}) - - // Asking for test. IN A -> REFUSED - - req := &dns.Msg{Question: []dns.Question{{Name: "some.test.", Qclass: dns.ClassINET, Qtype: dns.TypeA}}} - code, err := handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving some.test. A, got: %v", err) - } - if code != dns.RcodeRefused { - t.Fatalf("TestMultiSection expected response code REFUSED got: %v", code) - } - - // Asking for test. IN TXT -> fallthrough - - req = &dns.Msg{Question: []dns.Question{{Name: "some.test.", Qclass: dns.ClassINET, Qtype: dns.TypeTXT}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving some.test. TXT, got: %v", err) - } - if code != rcodeFallthrough { - t.Fatalf("TestMultiSection expected response code fallthrough got: %v", code) - } - - // Asking for coredns.invalid. CH TXT -> TXT "test" - - req = &dns.Msg{Question: []dns.Question{{Name: "coredns.invalid.", Qclass: dns.ClassCHAOS, Qtype: dns.TypeTXT}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving coredns.invalid. TXT, got: %v", err) - } - if code != dns.RcodeSuccess { - t.Fatalf("TestMultiSection expected success response for coredns.invalid. TXT got: %v", code) - } - if len(rec.Msg.Answer) != 1 { - t.Fatalf("TestMultiSection expected one answer for coredns.invalid. TXT got: %v", rec.Msg.Answer) - } - if rec.Msg.Answer[0].Header().Rrtype != dns.TypeTXT || rec.Msg.Answer[0].(*dns.TXT).Txt[0] != "test" { - t.Fatalf("TestMultiSection a \"test\" answer for coredns.invalid. TXT got: %v", rec.Msg.Answer[0]) - } - - // Asking for an ip template in example - - req = &dns.Msg{Question: []dns.Question{{Name: "ip-10-11-12-13.example.", Qclass: dns.ClassINET, Qtype: dns.TypeA}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving ip-10-11-12-13.example. IN A, got: %v", err) - } - if code != dns.RcodeSuccess { - t.Fatalf("TestMultiSection expected success response ip-10-11-12-13.example. IN A got: %v, %v", code, dns.RcodeToString[code]) - } - if len(rec.Msg.Answer) != 1 { - t.Fatalf("TestMultiSection expected one answer for ip-10-11-12-13.example. IN A got: %v", rec.Msg.Answer) - } - if rec.Msg.Answer[0].Header().Rrtype != dns.TypeA { - t.Fatalf("TestMultiSection an A RR answer for ip-10-11-12-13.example. IN A got: %v", rec.Msg.Answer[0]) - } - - // Asking for an MX ip template in example - - req = &dns.Msg{Question: []dns.Question{{Name: "ip-10-11-12-13.example.", Qclass: dns.ClassINET, Qtype: dns.TypeMX}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving ip-10-11-12-13.example. IN MX, got: %v", err) - } - if code != dns.RcodeSuccess { - t.Fatalf("TestMultiSection expected success response ip-10-11-12-13.example. IN MX got: %v, %v", code, dns.RcodeToString[code]) - } - if len(rec.Msg.Answer) != 1 { - t.Fatalf("TestMultiSection expected one answer for ip-10-11-12-13.example. IN MX got: %v", rec.Msg.Answer) - } - if rec.Msg.Answer[0].Header().Rrtype != dns.TypeMX { - t.Fatalf("TestMultiSection an A RR answer for ip-10-11-12-13.example. IN MX got: %v", rec.Msg.Answer[0]) - } - - // Test that something.example. A does fall through but something.example. MX does not - - req = &dns.Msg{Question: []dns.Question{{Name: "something.example.", Qclass: dns.ClassINET, Qtype: dns.TypeA}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving something.example. IN A, got: %v", err) - } - if code != rcodeFallthrough { - t.Fatalf("TestMultiSection expected a fall through resolving something.example. IN A, got: %v, %v", code, dns.RcodeToString[code]) - } - - req = &dns.Msg{Question: []dns.Question{{Name: "something.example.", Qclass: dns.ClassINET, Qtype: dns.TypeMX}}} - code, err = handler.ServeDNS(ctx, rec, req) - if err != nil { - t.Fatalf("TestMultiSection expected no error resolving something.example. IN MX, got: %v", err) - } - if code == rcodeFallthrough { - t.Fatalf("TestMultiSection expected no fall through resolving something.example. IN MX") - } - if code != dns.RcodeServerFailure { - t.Fatalf("TestMultiSection expected SERVFAIL resolving something.example. IN MX, got %v, %v", code, dns.RcodeToString[code]) - } -} - -const rcodeFallthrough = 3841 // reserved for private use, used to indicate a fallthrough diff --git a/plugin/timeouts/README.md b/plugin/timeouts/README.md deleted file mode 100644 index afc3e81da6..0000000000 --- a/plugin/timeouts/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# timeouts - -## Name - -*timeouts* - allows you to configure the server read, write and idle timeouts for the TCP, TLS, DoH and DoQ (idle only) servers. - -## Description - -CoreDNS is configured with sensible timeouts for server connections by default. -However in some cases for example where CoreDNS is serving over a slow mobile -data connection the default timeouts are not optimal. - -Additionally some routers hold open connections when using DNS over TLS or DNS -over HTTPS. Allowing a longer idle timeout helps performance and reduces issues -with such routers. - -The *timeouts* "plugin" allows you to configure CoreDNS server read, write and -idle timeouts. - -## Syntax - -~~~ txt -timeouts { - read DURATION - write DURATION - idle DURATION -} -~~~ - -For any timeouts that are not provided, default values are used which may vary -depending on the server type. At least one timeout must be specified otherwise -the entire timeouts block should be omitted. - -## Examples - -Start a DNS-over-TLS server that picks up incoming DNS-over-TLS queries on port -5553 and uses the nameservers defined in `/etc/resolv.conf` to resolve the -query. This proxy path uses plain old DNS. A 10 second read timeout, 20 -second write timeout and a 60 second idle timeout have been configured. - -~~~ -tls://.:5553 { - tls cert.pem key.pem ca.pem - timeouts { - read 10s - write 20s - idle 60s - } - forward . /etc/resolv.conf -} -~~~ - -Start a DNS-over-HTTPS server that is similar to the previous example. Only the -read timeout has been configured for 1 minute. - -~~~ -https://. { - tls cert.pem key.pem ca.pem - timeouts { - read 1m - } - forward . /etc/resolv.conf -} -~~~ - -Start a DNS-over-QUIC server that has the idle timeout set to two minutes. - -~~~ -quic://.:853 { - tls cert.pem key.pem ca.pem - timeouts { - idle 2m - } - forward . /etc/resolv.conf -} -~~~ - -Start a standard TCP/UDP server on port 1053. A read and write timeout has been -configured. The timeouts are only applied to the TCP side of the server. - -~~~ -.:1053 { - timeouts { - read 15s - write 30s - } - forward . /etc/resolv.conf -} -~~~ diff --git a/plugin/timeouts/timeouts.go b/plugin/timeouts/timeouts.go deleted file mode 100644 index eea6a64885..0000000000 --- a/plugin/timeouts/timeouts.go +++ /dev/null @@ -1,69 +0,0 @@ -package timeouts - -import ( - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/durations" -) - -func init() { plugin.Register("timeouts", setup) } - -func setup(c *caddy.Controller) error { - err := parseTimeouts(c) - if err != nil { - return plugin.Error("timeouts", err) - } - return nil -} - -func parseTimeouts(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - - for c.Next() { - args := c.RemainingArgs() - if len(args) > 0 { - return plugin.Error("timeouts", c.ArgErr()) - } - - b := 0 - for c.NextBlock() { - block := c.Val() - timeoutArgs := c.RemainingArgs() - if len(timeoutArgs) != 1 { - return c.ArgErr() - } - - timeout, err := durations.NewDurationFromArg(timeoutArgs[0]) - if err != nil { - return c.Err(err.Error()) - } - - if timeout < (1*time.Second) || timeout > (24*time.Hour) { - return c.Errf("timeout provided '%s' needs to be between 1 second and 24 hours", timeout) - } - - switch block { - case "read": - config.ReadTimeout = timeout - - case "write": - config.WriteTimeout = timeout - - case "idle": - config.IdleTimeout = timeout - - default: - return c.Errf("unknown option: '%s'", block) - } - b++ - } - - if b == 0 { - return plugin.Error("timeouts", c.Err("timeouts block with no timeouts specified")) - } - } - return nil -} diff --git a/plugin/timeouts/timeouts_test.go b/plugin/timeouts/timeouts_test.go deleted file mode 100644 index c01d3a0725..0000000000 --- a/plugin/timeouts/timeouts_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package timeouts - -import ( - "strings" - "testing" - - "github.com/coredns/caddy" -) - -func TestTimeouts(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedRoot string // expected root, set to the controller. Empty for negative cases. - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - {`timeouts { - read 30s - }`, false, "", ""}, - {`timeouts { - read 1m - write 2m - }`, false, "", ""}, - {` timeouts { - idle 1h - }`, false, "", ""}, - {`timeouts { - read 10 - write 20 - idle 60 - }`, false, "", ""}, - // negative - {`timeouts`, true, "", "block with no timeouts specified"}, - {`timeouts { - }`, true, "", "block with no timeouts specified"}, - {`timeouts { - read 10s - giraffe 30s - }`, true, "", "unknown option"}, - {`timeouts { - read 10s 20s - write 30s - }`, true, "", "Wrong argument"}, - {`timeouts { - write snake - }`, true, "", "failed to parse duration"}, - {`timeouts { - idle 0s - }`, true, "", "needs to be between"}, - {`timeouts { - read 48h - }`, true, "", "needs to be between"}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - //cfg := dnsserver.GetConfig(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - } -} diff --git a/plugin/tls/README.md b/plugin/tls/README.md deleted file mode 100644 index 1f42a7e0f3..0000000000 --- a/plugin/tls/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# tls - -## Name - -*tls* - allows you to configure the server certificates for the TLS, gRPC, DoH servers. - -## Description - -CoreDNS supports queries that are encrypted using TLS (DNS over Transport Layer Security, RFC 7858) -or are using gRPC (https://grpc.io/ , not an IETF standard). Normally DNS traffic isn't encrypted at -all (DNSSEC only signs resource records). - -The *tls* "plugin" allows you to configure the cryptographic keys that are needed for both -DNS-over-TLS and DNS-over-gRPC. If the *tls* plugin is omitted, then no encryption takes place. - -The gRPC protobuffer is defined in `pb/dns.proto`. It defines the proto as a simple wrapper for the -wire data of a DNS message. - -## Syntax - -~~~ txt -tls CERT KEY [CA] -~~~ - -Parameter CA is optional. If not set, system CAs can be used to verify the client certificate - -~~~ txt -tls CERT KEY [CA] { - client_auth nocert|request|require|verify_if_given|require_and_verify -} -~~~ - -If client\_auth option is specified, it controls the client authentication policy. -The option value corresponds to the [ClientAuthType values of the Go tls package](https://golang.org/pkg/crypto/tls/#ClientAuthType): NoClientCert, RequestClientCert, RequireAnyClientCert, VerifyClientCertIfGiven, and RequireAndVerifyClientCert, respectively. -The default is "nocert". Note that it makes no sense to specify parameter CA unless this option is -set to verify\_if\_given or require\_and\_verify. - -## Examples - -Start a DNS-over-TLS server that picks up incoming DNS-over-TLS queries on port 5553 and uses the -nameservers defined in `/etc/resolv.conf` to resolve the query. This proxy path uses plain old DNS. - -~~~ -tls://.:5553 { - tls cert.pem key.pem ca.pem - forward . /etc/resolv.conf -} -~~~ - -Start a DNS-over-gRPC server that is similar to the previous example, but using DNS-over-gRPC for -incoming queries. - -~~~ -grpc://. { - tls cert.pem key.pem ca.pem - forward . /etc/resolv.conf -} -~~~ - -Start a DoH server on port 443 that is similar to the previous example, but using DoH for incoming queries. -~~~ -https://. { - tls cert.pem key.pem ca.pem - forward . /etc/resolv.conf -} -~~~ - -Only Knot DNS' `kdig` supports DNS-over-TLS queries, no command line client supports gRPC making -debugging these transports harder than it should be. - -## See Also - -RFC 7858 and https://grpc.io. diff --git a/plugin/tls/log_test.go b/plugin/tls/log_test.go deleted file mode 100644 index 017affd09f..0000000000 --- a/plugin/tls/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package tls - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/tls/test_ca.pem b/plugin/tls/test_ca.pem deleted file mode 100644 index cfcd5cc0ea..0000000000 --- a/plugin/tls/test_ca.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDPzCCAiegAwIBAgIJAPjCWTu1wGapMA0GCSqGSIb3DQEBCwUAMDUxCzAJBgNV -BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQKDAhJbmZvYmxveDAg -Fw0xOTA1MTEwMDI3NDRaGA8yMTE5MDQxNzAwMjc0NFowNTELMAkGA1UEBhMCVVMx -EzARBgNVBAgMCkNhbGlmb3JuaWExETAPBgNVBAoMCEluZm9ibG94MIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArAYiw1UjlYj+nITRUlj5hA7j8U2qWcyN -YcDfqQnt173Z8yR7NJokqt3Bd3PlrBZS2XtYSNohxRr4qeJu/g7UBre/fSEU/ZOM -Gl7NjBGKQEymJ0d8rBg52iiGNwU+ERI9pcQRA6DCEjVbOmjDiUd5yzuVotG/Sxep -GUJ2puJ0p0gWCMEL9sdqY6HHd/hdj6B6+u2xD9NUCkX9pLC7CPFJHnP0vLO4WIWL -z5C7yzpeLO9r7Nfnu+2HcRLmuFZVPNxkMq7UymqR1w5ZYJQ5p9E7pyxDVXxHnTqQ -yLaAS2/9umrOwVnD1NaN3OdAhDedXbH0cF08GcIQD9rnlkLMW4CKtwIDAQABo1Aw -TjAdBgNVHQ4EFgQUHcxJPBmHF0nSv+FJJI/kwrSThf8wHwYDVR0jBBgwFoAUHcxJ -PBmHF0nSv+FJJI/kwrSThf8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC -AQEAByItgyhlXDv2wnnMVXHHlUCbsKCOtBJZ8EumvKjeOx5G4gqJpQIQPNeBv1Od -QT7d15HfT7RQqHSL0uAoGuNuyGjZGWWbLMkVt8T0tXY2v9Dd8eWC/lFaaA0vkqTG -GpADSmH+SoFAdPPcYN/sXmEHvZcIQ0wUxuF48ZMwOh7ZOcrZggxlA9+BKHU4fO03 -o7krzpQZQmEDXNN8bt1R0DIhVADw/G2oJAzK0LGhh4eu6hj6k/cAWS6ujRBGqN0Z -fURCrMEyjzbNybhkU1KqSr7eSJOWkl4UJ5Ns/dt9/yw2BBrKH3Mijch7UA8mlbEE -29M28u2W7GMXLSSwmtCqDBRNhg== ------END CERTIFICATE----- diff --git a/plugin/tls/test_cert.pem b/plugin/tls/test_cert.pem deleted file mode 100644 index 8cc47eb089..0000000000 --- a/plugin/tls/test_cert.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDPzCCAiegAwIBAgIJAPezzzshGRiTMA0GCSqGSIb3DQEBCwUAMDUxCzAJBgNV -BAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMREwDwYDVQQKDAhJbmZvYmxveDAg -Fw0xOTA1MTEwMDI2MjNaGA8yMTE5MDQxNzAwMjYyM1owNTELMAkGA1UEBhMCVVMx -EzARBgNVBAgMCkNhbGlmb3JuaWExETAPBgNVBAoMCEluZm9ibG94MIIBIjANBgkq -hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArAYiw1UjlYj+nITRUlj5hA7j8U2qWcyN -YcDfqQnt173Z8yR7NJokqt3Bd3PlrBZS2XtYSNohxRr4qeJu/g7UBre/fSEU/ZOM -Gl7NjBGKQEymJ0d8rBg52iiGNwU+ERI9pcQRA6DCEjVbOmjDiUd5yzuVotG/Sxep -GUJ2puJ0p0gWCMEL9sdqY6HHd/hdj6B6+u2xD9NUCkX9pLC7CPFJHnP0vLO4WIWL -z5C7yzpeLO9r7Nfnu+2HcRLmuFZVPNxkMq7UymqR1w5ZYJQ5p9E7pyxDVXxHnTqQ -yLaAS2/9umrOwVnD1NaN3OdAhDedXbH0cF08GcIQD9rnlkLMW4CKtwIDAQABo1Aw -TjAdBgNVHQ4EFgQUHcxJPBmHF0nSv+FJJI/kwrSThf8wHwYDVR0jBBgwFoAUHcxJ -PBmHF0nSv+FJJI/kwrSThf8wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOC -AQEAQyN9nLImdtufuSjXcrCJ3alt/vffHJIzlPgDsNw8+tjI7aRX7CzuurOOEQUC -fJ9A6O+dat5k5yqVb9hDcD42HXtOjRQDYpQ6dOGirLFThIFSMC/7RiqHk0YtxojM -ZNBbgXo4o1d+P9b25oc/+pRDzlOvqNL7IzW/LDHnJ4j6tBNguujCB5QFUF5dOa1z -UR5rupMvv2KpEgRcfW/d3kwcAxH9nI0SHKJenhtweyajUgInK88TC+aT4909c2XA -EADYyWxj1DMz3/sMpvGegHsfTPegNoDgz2yEKdu53dr4BUpF6E+eoCX9Hv78SWH3 -/rAlkbffzCL5d+I8y0jzEpLEqA== ------END CERTIFICATE----- diff --git a/plugin/tls/test_key.pem b/plugin/tls/test_key.pem deleted file mode 100644 index 2ca2b21344..0000000000 --- a/plugin/tls/test_key.pem +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCsBiLDVSOViP6c -hNFSWPmEDuPxTapZzI1hwN+pCe3XvdnzJHs0miSq3cF3c+WsFlLZe1hI2iHFGvip -4m7+DtQGt799IRT9k4waXs2MEYpATKYnR3ysGDnaKIY3BT4REj2lxBEDoMISNVs6 -a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II/iviCxAC8q5LhoSCjlkENVB22/T83eQKBgQC4 -c3wRALG+fWZns5QsC5ONnc6rXXfqhxGi3vuGMMbfYF05WP6xLQp/7eBhWg1R+o7R -oc24cvxrB+TRTFhOdvsZtvL7es2bMfMz/EUapSp9edpCW3p1Temi30LPplByhf6b -nQ4FFuRsZa+FX8QYSDpWypCwLY4k0R8YYqklhrrcgwKBgFiM/GnRc230nj0GGWf1 -+Ve2M/TQCgS6ufr2F0vU7QkEWfeiN9iunhmhsggqWxOEOU77FhCkQRtztm93hG0K -eKoHNh/1HvHGBWsR0TaMDw3n8t7Yg5NmQb617nBELZbxxpd358muLiHDoix86W9Q -xM6hB159G1gOEJsi8exm5AlZ ------END PRIVATE KEY----- diff --git a/plugin/tls/tls.go b/plugin/tls/tls.go deleted file mode 100644 index ff60b678c5..0000000000 --- a/plugin/tls/tls.go +++ /dev/null @@ -1,77 +0,0 @@ -package tls - -import ( - ctls "crypto/tls" - "path/filepath" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/tls" -) - -func init() { plugin.Register("tls", setup) } - -func setup(c *caddy.Controller) error { - err := parseTLS(c) - if err != nil { - return plugin.Error("tls", err) - } - return nil -} - -func parseTLS(c *caddy.Controller) error { - config := dnsserver.GetConfig(c) - - if config.TLSConfig != nil { - return plugin.Error("tls", c.Errf("TLS already configured for this server instance")) - } - - for c.Next() { - args := c.RemainingArgs() - if len(args) < 2 || len(args) > 3 { - return plugin.Error("tls", c.ArgErr()) - } - clientAuth := ctls.NoClientCert - for c.NextBlock() { - switch c.Val() { - case "client_auth": - authTypeArgs := c.RemainingArgs() - if len(authTypeArgs) != 1 { - return c.ArgErr() - } - switch authTypeArgs[0] { - case "nocert": - clientAuth = ctls.NoClientCert - case "request": - clientAuth = ctls.RequestClientCert - case "require": - clientAuth = ctls.RequireAnyClientCert - case "verify_if_given": - clientAuth = ctls.VerifyClientCertIfGiven - case "require_and_verify": - clientAuth = ctls.RequireAndVerifyClientCert - default: - return c.Errf("unknown authentication type '%s'", authTypeArgs[0]) - } - default: - return c.Errf("unknown option '%s'", c.Val()) - } - } - for i := range args { - if !filepath.IsAbs(args[i]) && config.Root != "" { - args[i] = filepath.Join(config.Root, args[i]) - } - } - tls, err := tls.NewTLSConfigFromArgs(args...) - if err != nil { - return err - } - tls.ClientAuth = clientAuth - // NewTLSConfigFromArgs only sets RootCAs, so we need to let ClientCAs refer to it. - tls.ClientCAs = tls.RootCAs - - config.TLSConfig = tls - } - return nil -} diff --git a/plugin/tls/tls_test.go b/plugin/tls/tls_test.go deleted file mode 100644 index 7deb837f37..0000000000 --- a/plugin/tls/tls_test.go +++ /dev/null @@ -1,87 +0,0 @@ -package tls - -import ( - "crypto/tls" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" -) - -func TestTLS(t *testing.T) { - tests := []struct { - input string - shouldErr bool - expectedRoot string // expected root, set to the controller. Empty for negative cases. - expectedErrContent string // substring from the expected error. Empty for positive cases. - }{ - // positive - {"tls test_cert.pem test_key.pem test_ca.pem", false, "", ""}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth nocert\n}", false, "", ""}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth request\n}", false, "", ""}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth require\n}", false, "", ""}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth verify_if_given\n}", false, "", ""}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth require_and_verify\n}", false, "", ""}, - // negative - {"tls test_cert.pem test_key.pem test_ca.pem {\nunknown\n}", true, "", "unknown option"}, - // client_auth takes exactly one parameter, which must be one of known keywords. - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth\n}", true, "", "Wrong argument"}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth none bogus\n}", true, "", "Wrong argument"}, - {"tls test_cert.pem test_key.pem test_ca.pem {\nclient_auth bogus\n}", true, "", "unknown authentication type"}, - } - - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - err := setup(c) - //cfg := dnsserver.GetConfig(c) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found %s for input %s", i, err, test.input) - } - - if err != nil { - if !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - - if !strings.Contains(err.Error(), test.expectedErrContent) { - t.Errorf("Test %d: Expected error to contain: %v, found error: %v, input: %s", i, test.expectedErrContent, err, test.input) - } - } - } -} - -func TestTLSClientAuthentication(t *testing.T) { - // Invalid configurations are tested in the general test case. In this test we only look into specific details of valid client_auth options. - tests := []struct { - option string // tls plugin option(s) - expectedType tls.ClientAuthType // expected authentication type. - }{ - // By default, or if 'nocert' is specified, no cert should be requested. - // Other cases should be a straightforward mapping from the keyword to the type value. - {"", tls.NoClientCert}, - {"{\nclient_auth nocert\n}", tls.NoClientCert}, - {"{\nclient_auth request\n}", tls.RequestClientCert}, - {"{\nclient_auth require\n}", tls.RequireAnyClientCert}, - {"{\nclient_auth verify_if_given\n}", tls.VerifyClientCertIfGiven}, - {"{\nclient_auth require_and_verify\n}", tls.RequireAndVerifyClientCert}, - } - - for i, test := range tests { - input := "tls test_cert.pem test_key.pem test_ca.pem " + test.option - c := caddy.NewTestController("dns", input) - err := setup(c) - if err != nil { - t.Errorf("Test %d: TLS config is unexpectedly rejected: %v", i, err) - continue // there's no point in the rest of the tests. - } - cfg := dnsserver.GetConfig(c) - if cfg.TLSConfig.ClientCAs == nil { - t.Errorf("Test %d: Client CA is not configured", i) - } - if cfg.TLSConfig.ClientAuth != test.expectedType { - t.Errorf("Test %d: Unexpected client auth type: %d", i, cfg.TLSConfig.ClientAuth) - } - } -} diff --git a/plugin/trace/README.md b/plugin/trace/README.md deleted file mode 100644 index eac8a7ba76..0000000000 --- a/plugin/trace/README.md +++ /dev/null @@ -1,113 +0,0 @@ -# trace - -## Name - -*trace* - enables OpenTracing-based tracing of DNS requests as they go through the plugin chain. - -## Description - -With *trace* you enable OpenTracing of how a request flows through CoreDNS. Enable the *debug* -plugin to get logs from the trace plugin. - -## Syntax - -The simplest form is just: - -~~~ -trace [ENDPOINT-TYPE] [ENDPOINT] -~~~ - -* **ENDPOINT-TYPE** is the type of tracing destination. Currently only `zipkin` and `datadog` are supported. - Defaults to `zipkin`. -* **ENDPOINT** is the tracing destination, and defaults to `localhost:9411`. For Zipkin, if - **ENDPOINT** does not begin with `http`, then it will be transformed to `http://ENDPOINT/api/v1/spans`. - -With this form, all queries will be traced. - -Additional features can be enabled with this syntax: - -~~~ -trace [ENDPOINT-TYPE] [ENDPOINT] { - every AMOUNT - service NAME - client_server - datadog_analytics_rate RATE - zipkin_max_backlog_size SIZE - zipkin_max_batch_size SIZE - zipkin_max_batch_interval DURATION -} -~~~ - -* `every` **AMOUNT** will only trace one query of each AMOUNT queries. For example, to trace 1 in every - 100 queries, use AMOUNT of 100. The default is 1. -* `service` **NAME** allows you to specify the service name reported to the tracing server. - Default is `coredns`. -* `client_server` will enable the `ClientServerSameSpan` OpenTracing feature. -* `datadog_analytics_rate` **RATE** will enable [trace analytics](https://docs.datadoghq.com/tracing/app_analytics) on the traces sent - from *0* to *1*, *1* being every trace sent will be analyzed. This is a datadog only feature - (**ENDPOINT-TYPE** needs to be `datadog`) -* `zipkin_max_backlog_size` configures the maximum backlog size for Zipkin HTTP reporter. When batch size reaches this threshold, - spans from the beginning of the batch will be disposed. Default is 1000 backlog size. -* `zipkin_max_batch_size` configures the maximum batch size for Zipkin HTTP reporter, after which a collect will be triggered. The default batch size is 100 traces. -* `zipkin_max_batch_interval` configures the maximum duration we will buffer traces before emitting them to the collector using Zipkin HTTP reporter. - The default batch interval is 1 second. - -## Zipkin - -You can run Zipkin on a Docker host like this: - -``` -docker run -d -p 9411:9411 openzipkin/zipkin -``` - -Note the zipkin provider does not support the v1 API since coredns 1.7.1. - -## Examples - -Use an alternative Zipkin address: - -~~~ -trace tracinghost:9253 -~~~ - -or - -~~~ corefile -. { - trace zipkin tracinghost:9253 -} -~~~ - -If for some reason you are using an API reverse proxy or something and need to remap -the standard Zipkin URL you can do something like: - -~~~ -trace http://tracinghost:9411/zipkin/api/v1/spans -~~~ - -Using DataDog: - -~~~ -trace datadog localhost:8126 -~~~ - -Trace one query every 10000 queries, rename the service, and enable same span: - -~~~ -trace tracinghost:9411 { - every 10000 - service dnsproxy - client_server -} -~~~ - -## Metadata - -The trace plugin will publish the following metadata, if the *metadata* -plugin is also enabled: - -* `trace/traceid`: identifier of (zipkin/datadog) trace of processed request - -## See Also - -See the *debug* plugin for more information about debug logging. diff --git a/plugin/trace/log_test.go b/plugin/trace/log_test.go deleted file mode 100644 index a0fe761421..0000000000 --- a/plugin/trace/log_test.go +++ /dev/null @@ -1,5 +0,0 @@ -package trace - -import clog "github.com/coredns/coredns/plugin/pkg/log" - -func init() { clog.Discard() } diff --git a/plugin/trace/logger.go b/plugin/trace/logger.go deleted file mode 100644 index 81c8d53f17..0000000000 --- a/plugin/trace/logger.go +++ /dev/null @@ -1,20 +0,0 @@ -package trace - -import ( - clog "github.com/coredns/coredns/plugin/pkg/log" -) - -// loggerAdapter is a simple adapter around plugin logger made to implement io.Writer and ddtrace.Logger interface -// in order to log errors from span reporters as warnings -type loggerAdapter struct { - clog.P -} - -func (l *loggerAdapter) Write(p []byte) (n int, err error) { - l.Warning(string(p)) - return len(p), nil -} - -func (l *loggerAdapter) Log(msg string) { - l.Warning(msg) -} diff --git a/plugin/trace/setup.go b/plugin/trace/setup.go deleted file mode 100644 index a6ecdfe85d..0000000000 --- a/plugin/trace/setup.go +++ /dev/null @@ -1,164 +0,0 @@ -package trace - -import ( - "fmt" - "strconv" - "strings" - "time" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" -) - -func init() { plugin.Register("trace", setup) } - -func setup(c *caddy.Controller) error { - t, err := traceParse(c) - if err != nil { - return plugin.Error("trace", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - t.Next = next - return t - }) - - c.OnStartup(t.OnStartup) - c.OnShutdown(t.OnShutdown) - - return nil -} - -func traceParse(c *caddy.Controller) (*trace, error) { - var ( - tr = &trace{every: 1, serviceName: defServiceName} - err error - ) - - cfg := dnsserver.GetConfig(c) - if len(cfg.ListenHosts) > 0 && cfg.ListenHosts[0] != "" { - tr.serviceEndpoint = cfg.ListenHosts[0] + ":" + cfg.Port - } - - for c.Next() { // trace - var err error - args := c.RemainingArgs() - switch len(args) { - case 0: - tr.EndpointType, tr.Endpoint, err = normalizeEndpoint(defEpType, "") - case 1: - tr.EndpointType, tr.Endpoint, err = normalizeEndpoint(defEpType, args[0]) - case 2: - epType := strings.ToLower(args[0]) - tr.EndpointType, tr.Endpoint, err = normalizeEndpoint(epType, args[1]) - default: - err = c.ArgErr() - } - if err != nil { - return tr, err - } - for c.NextBlock() { - switch c.Val() { - case "every": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - tr.every, err = strconv.ParseUint(args[0], 10, 64) - if err != nil { - return nil, err - } - case "service": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - tr.serviceName = args[0] - case "client_server": - args := c.RemainingArgs() - if len(args) > 1 { - return nil, c.ArgErr() - } - tr.clientServer = true - if len(args) == 1 { - tr.clientServer, err = strconv.ParseBool(args[0]) - } - if err != nil { - return nil, err - } - case "datadog_analytics_rate": - args := c.RemainingArgs() - if len(args) > 1 { - return nil, c.ArgErr() - } - tr.datadogAnalyticsRate = 0 - if len(args) == 1 { - tr.datadogAnalyticsRate, err = strconv.ParseFloat(args[0], 64) - } - if err != nil { - return nil, err - } - if tr.datadogAnalyticsRate > 1 || tr.datadogAnalyticsRate < 0 { - return nil, fmt.Errorf("datadog analytics rate must be between 0 and 1, '%f' is not supported", tr.datadogAnalyticsRate) - } - case "zipkin_max_backlog_size": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - tr.zipkinMaxBacklogSize, err = strconv.Atoi(args[0]) - if err != nil { - return nil, err - } - case "zipkin_max_batch_size": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - tr.zipkinMaxBatchSize, err = strconv.Atoi(args[0]) - if err != nil { - return nil, err - } - case "zipkin_max_batch_interval": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - tr.zipkinMaxBatchInterval, err = time.ParseDuration(args[0]) - if err != nil { - return nil, err - } - } - } - } - return tr, err -} - -func normalizeEndpoint(epType, ep string) (string, string, error) { - if _, ok := supportedProviders[epType]; !ok { - return "", "", fmt.Errorf("tracing endpoint type '%s' is not supported", epType) - } - - if ep == "" { - ep = supportedProviders[epType] - } - - if epType == "zipkin" { - if !strings.Contains(ep, "http") { - ep = "http://" + ep + "/api/v2/spans" - } - } - - return epType, ep, nil -} - -var supportedProviders = map[string]string{ - "zipkin": "localhost:9411", - "datadog": "localhost:8126", -} - -const ( - defEpType = "zipkin" - defServiceName = "coredns" -) diff --git a/plugin/trace/setup_test.go b/plugin/trace/setup_test.go deleted file mode 100644 index 080a3d4e39..0000000000 --- a/plugin/trace/setup_test.go +++ /dev/null @@ -1,88 +0,0 @@ -package trace - -import ( - "testing" - "time" - - "github.com/coredns/caddy" -) - -func TestTraceParse(t *testing.T) { - tests := []struct { - input string - shouldErr bool - endpoint string - every uint64 - serviceName string - clientServer bool - zipkinMaxBacklogSize int - zipkinMaxBatchSize int - zipkinMaxBatchInterval time.Duration - }{ - // oks - {`trace`, false, "http://localhost:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0}, - {`trace localhost:1234`, false, "http://localhost:1234/api/v2/spans", 1, `coredns`, false, 0, 0, 0}, - {`trace http://localhost:1234/somewhere/else`, false, "http://localhost:1234/somewhere/else", 1, `coredns`, false, 0, 0, 0}, - {`trace zipkin localhost:1234`, false, "http://localhost:1234/api/v2/spans", 1, `coredns`, false, 0, 0, 0}, - {`trace datadog localhost`, false, "localhost", 1, `coredns`, false, 0, 0, 0}, - {`trace datadog http://localhost:8127`, false, "http://localhost:8127", 1, `coredns`, false, 0, 0, 0}, - {"trace datadog localhost {\n datadog_analytics_rate 0.1\n}", false, "localhost", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n every 100\n}", false, "http://localhost:9411/api/v2/spans", 100, `coredns`, false, 0, 0, 0}, - {"trace {\n every 100\n service foobar\nclient_server\n}", false, "http://localhost:9411/api/v2/spans", 100, `foobar`, true, 0, 0, 0}, - {"trace {\n every 2\n client_server true\n}", false, "http://localhost:9411/api/v2/spans", 2, `coredns`, true, 0, 0, 0}, - {"trace {\n client_server false\n}", false, "http://localhost:9411/api/v2/spans", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_backlog_size 100\n zipkin_max_batch_size 200\n zipkin_max_batch_interval 10s\n}", false, - "http://localhost:9411/api/v2/spans", 1, `coredns`, false, 100, 200, 10 * time.Second}, - - // fails - {`trace footype localhost:4321`, true, "", 1, "", false, 0, 0, 0}, - {"trace {\n every 2\n client_server junk\n}", true, "", 1, "", false, 0, 0, 0}, - {"trace datadog localhost {\n datadog_analytics_rate 2\n}", true, "", 1, "", false, 0, 0, 0}, - {"trace {\n zipkin_max_backlog_size wrong\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_batch_size wrong\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_batch_interval wrong\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_backlog_size\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_batch_size\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - {"trace {\n zipkin_max_batch_interval\n}", true, "", 1, `coredns`, false, 0, 0, 0}, - } - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - m, err := traceParse(c) - if test.shouldErr && err == nil { - t.Errorf("Test %v: Expected error but found nil", i) - continue - } else if !test.shouldErr && err != nil { - t.Errorf("Test %v: Expected no error but found error: %v", i, err) - continue - } - - if test.shouldErr { - continue - } - - if m.serviceEndpoint != "" { - t.Errorf("Test %v: Expected serviceEndpoint to be '' but found: %s", i, m.serviceEndpoint) - } - if test.endpoint != m.Endpoint { - t.Errorf("Test %v: Expected endpoint %s but found: %s", i, test.endpoint, m.Endpoint) - } - if test.every != m.every { - t.Errorf("Test %v: Expected every %d but found: %d", i, test.every, m.every) - } - if test.serviceName != m.serviceName { - t.Errorf("Test %v: Expected service name %s but found: %s", i, test.serviceName, m.serviceName) - } - if test.clientServer != m.clientServer { - t.Errorf("Test %v: Expected client_server %t but found: %t", i, test.clientServer, m.clientServer) - } - if test.zipkinMaxBacklogSize != m.zipkinMaxBacklogSize { - t.Errorf("Test %v: Expected zipkin_max_backlog_size %d but found: %d", i, test.zipkinMaxBacklogSize, m.zipkinMaxBacklogSize) - } - if test.zipkinMaxBatchSize != m.zipkinMaxBatchSize { - t.Errorf("Test %v: Expected zipkin_max_batch_size %d but found: %d", i, test.zipkinMaxBatchSize, m.zipkinMaxBatchSize) - } - if test.zipkinMaxBatchInterval != m.zipkinMaxBatchInterval { - t.Errorf("Test %v: Expected zipkin_max_batch_interval %v but found: %v", i, test.zipkinMaxBatchInterval, m.zipkinMaxBatchInterval) - } - } -} diff --git a/plugin/trace/trace.go b/plugin/trace/trace.go deleted file mode 100644 index f3d0155b69..0000000000 --- a/plugin/trace/trace.go +++ /dev/null @@ -1,256 +0,0 @@ -// Package trace implements OpenTracing-based tracing -package trace - -import ( - "context" - "fmt" - stdlog "log" - "net/http" - "sync" - "sync/atomic" - "time" - - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/plugin/pkg/dnstest" - clog "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/plugin/pkg/rcode" - _ "github.com/coredns/coredns/plugin/pkg/trace" // Plugin the trace package. - "github.com/coredns/coredns/request" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" - "github.com/miekg/dns" - ot "github.com/opentracing/opentracing-go" - otext "github.com/opentracing/opentracing-go/ext" - otlog "github.com/opentracing/opentracing-go/log" - zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing" - "github.com/openzipkin/zipkin-go" - zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" -) - -const ( - defaultTopLevelSpanName = "servedns" - metaTraceIdKey = "trace/traceid" -) - -var log = clog.NewWithPlugin("trace") - -type traceTags struct { - Name string - Type string - Rcode string - Proto string - Remote string -} - -var tagByProvider = map[string]traceTags{ - "default": { - Name: "coredns.io/name", - Type: "coredns.io/type", - Rcode: "coredns.io/rcode", - Proto: "coredns.io/proto", - Remote: "coredns.io/remote", - }, - "datadog": { - Name: "coredns.io@name", - Type: "coredns.io@type", - Rcode: "coredns.io@rcode", - Proto: "coredns.io@proto", - Remote: "coredns.io@remote", - }, -} - -type trace struct { - count uint64 // as per Go spec, needs to be first element in a struct - - Next plugin.Handler - Endpoint string - EndpointType string - zipkinTracer ot.Tracer - serviceEndpoint string - serviceName string - clientServer bool - every uint64 - datadogAnalyticsRate float64 - zipkinMaxBacklogSize int - zipkinMaxBatchSize int - zipkinMaxBatchInterval time.Duration - Once sync.Once - tagSet traceTags -} - -func (t *trace) Tracer() ot.Tracer { - return t.zipkinTracer -} - -// OnStartup sets up the tracer -func (t *trace) OnStartup() error { - var err error - t.Once.Do(func() { - switch t.EndpointType { - case "zipkin": - err = t.setupZipkin() - case "datadog": - tracer.Start( - tracer.WithAgentAddr(t.Endpoint), - tracer.WithDebugMode(clog.D.Value()), - tracer.WithGlobalTag(ext.SpanTypeDNS, true), - tracer.WithService(t.serviceName), - tracer.WithAnalyticsRate(t.datadogAnalyticsRate), - tracer.WithLogger(&loggerAdapter{log}), - ) - t.tagSet = tagByProvider["datadog"] - default: - err = fmt.Errorf("unknown endpoint type: %s", t.EndpointType) - } - }) - return err -} - -// OnShutdown cleans up the tracer -func (t *trace) OnShutdown() error { - if t.EndpointType == "datadog" { - tracer.Stop() - } - return nil -} - -func (t *trace) setupZipkin() error { - var opts []zipkinhttp.ReporterOption - opts = append(opts, zipkinhttp.Logger(stdlog.New(&loggerAdapter{log}, "", 0))) - if t.zipkinMaxBacklogSize != 0 { - opts = append(opts, zipkinhttp.MaxBacklog(t.zipkinMaxBacklogSize)) - } - if t.zipkinMaxBatchSize != 0 { - opts = append(opts, zipkinhttp.BatchSize(t.zipkinMaxBatchSize)) - } - if t.zipkinMaxBatchInterval != 0 { - opts = append(opts, zipkinhttp.BatchInterval(t.zipkinMaxBatchInterval)) - } - reporter := zipkinhttp.NewReporter(t.Endpoint, opts...) - recorder, err := zipkin.NewEndpoint(t.serviceName, t.serviceEndpoint) - if err != nil { - log.Warningf("build Zipkin endpoint found err: %v", err) - } - tracer, err := zipkin.NewTracer( - reporter, - zipkin.WithLocalEndpoint(recorder), - zipkin.WithSharedSpans(t.clientServer), - ) - if err != nil { - return err - } - t.zipkinTracer = zipkinot.Wrap(tracer) - - t.tagSet = tagByProvider["default"] - return err -} - -// Name implements the Handler interface. -func (t *trace) Name() string { return "trace" } - -// ServeDNS implements the plugin.Handle interface. -func (t *trace) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - shouldTrace := false - if t.every > 0 { - queryNr := atomic.AddUint64(&t.count, 1) - if queryNr%t.every == 0 { - shouldTrace = true - } - } - - if t.EndpointType == "datadog" { - return t.serveDNSDatadog(ctx, w, r, shouldTrace) - } - return t.serveDNSZipkin(ctx, w, r, shouldTrace) -} - -func (t *trace) serveDNSDatadog(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, shouldTrace bool) (int, error) { - if !shouldTrace { - return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r) - } - - span, spanCtx := tracer.StartSpanFromContext(ctx, defaultTopLevelSpanName) - defer span.Finish() - - metadata.SetValueFunc(ctx, metaTraceIdKey, func() string { return span.Context().TraceID() }) - - req := request.Request{W: w, Req: r} - rw := dnstest.NewRecorder(w) - status, err := plugin.NextOrFailure(t.Name(), t.Next, spanCtx, rw, r) - - t.setDatadogSpanTags(span, req, rw, status, err) - - return status, err -} - -func (t *trace) serveDNSZipkin(ctx context.Context, w dns.ResponseWriter, r *dns.Msg, shouldTrace bool) (int, error) { - span := ot.SpanFromContext(ctx) - if !shouldTrace || span != nil { - return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r) - } - - var spanCtx ot.SpanContext - if val := ctx.Value(dnsserver.HTTPRequestKey{}); val != nil { - if httpReq, ok := val.(*http.Request); ok { - spanCtx, _ = t.Tracer().Extract(ot.HTTPHeaders, ot.HTTPHeadersCarrier(httpReq.Header)) - } - } - - req := request.Request{W: w, Req: r} - span = t.Tracer().StartSpan(defaultTopLevelSpanName, otext.RPCServerOption(spanCtx)) - defer span.Finish() - - if spanCtx, ok := span.Context().(zipkinot.SpanContext); ok { - metadata.SetValueFunc(ctx, metaTraceIdKey, func() string { return spanCtx.TraceID.String() }) - } - - rw := dnstest.NewRecorder(w) - ctx = ot.ContextWithSpan(ctx, span) - status, err := plugin.NextOrFailure(t.Name(), t.Next, ctx, rw, r) - - t.setZipkinSpanTags(span, req, rw, status, err) - - return status, err -} - -// setDatadogSpanTags sets span tags using DataDog v2 API -func (t *trace) setDatadogSpanTags(span *tracer.Span, req request.Request, rw *dnstest.Recorder, status int, err error) { - span.SetTag(t.tagSet.Name, req.Name()) - span.SetTag(t.tagSet.Type, req.Type()) - span.SetTag(t.tagSet.Proto, req.Proto()) - span.SetTag(t.tagSet.Remote, req.IP()) - rc := rw.Rcode - if !plugin.ClientWrite(status) { - rc = status - } - span.SetTag(t.tagSet.Rcode, rcode.ToString(rc)) - if err != nil { - span.SetTag("error.message", err.Error()) - span.SetTag("error", true) - span.SetTag("error.type", "dns_error") - } -} - -// setZipkinSpanTags sets span tags for Zipkin/OpenTracing spans -func (t *trace) setZipkinSpanTags(span ot.Span, req request.Request, rw *dnstest.Recorder, status int, err error) { - span.SetTag(t.tagSet.Name, req.Name()) - span.SetTag(t.tagSet.Type, req.Type()) - span.SetTag(t.tagSet.Proto, req.Proto()) - span.SetTag(t.tagSet.Remote, req.IP()) - rc := rw.Rcode - if !plugin.ClientWrite(status) { - // when no response was written, fallback to status returned from next plugin as this status - // is actually used as rcode of DNS response - // see https://github.com/coredns/coredns/blob/master/core/dnsserver/server.go#L318 - rc = status - } - span.SetTag(t.tagSet.Rcode, rcode.ToString(rc)) - if err != nil { - // Use OpenTracing error handling - otext.Error.Set(span, true) - span.LogFields(otlog.Event("error"), otlog.Error(err)) - } -} diff --git a/plugin/trace/trace_test.go b/plugin/trace/trace_test.go deleted file mode 100644 index ce78bfdc1f..0000000000 --- a/plugin/trace/trace_test.go +++ /dev/null @@ -1,330 +0,0 @@ -package trace - -import ( - "context" - "errors" - "net/http" - "net/http/httptest" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/pkg/rcode" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer" - "github.com/miekg/dns" - "github.com/opentracing/opentracing-go" - openTracingMock "github.com/opentracing/opentracing-go/mocktracer" -) - -func TestStartup(t *testing.T) { - m, err := traceParse(caddy.NewTestController("dns", `trace`)) - if err != nil { - t.Errorf("Error parsing test input: %s", err) - return - } - if m.Name() != "trace" { - t.Errorf("Wrong name from GetName: %s", m.Name()) - } - err = m.OnStartup() - if err != nil { - t.Errorf("Error starting tracing plugin: %s", err) - return - } - - if m.tagSet != tagByProvider["default"] { - t.Errorf("TagSet by proviser hasn't been correctly initialized") - } - - if m.Tracer() == nil { - t.Errorf("Error, no tracer created") - } -} - -func TestTrace(t *testing.T) { - cases := []struct { - name string - rcode int - status int - question *dns.Msg - err error - }{ - { - name: "NXDOMAIN", - rcode: dns.RcodeNameError, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.org.", dns.TypeA), - }, - { - name: "NOERROR", - rcode: dns.RcodeSuccess, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.net.", dns.TypeCNAME), - }, - { - name: "SERVFAIL", - rcode: dns.RcodeServerFailure, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.net.", dns.TypeA), - err: errors.New("test error"), - }, - { - name: "No response written", - rcode: dns.RcodeServerFailure, - status: dns.RcodeServerFailure, - question: new(dns.Msg).SetQuestion("example.net.", dns.TypeA), - err: errors.New("test error"), - }, - } - defaultTagSet := tagByProvider["default"] - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - w := dnstest.NewRecorder(&test.ResponseWriter{}) - m := openTracingMock.New() - tr := &trace{ - Next: test.HandlerFunc(func(_ context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if plugin.ClientWrite(tc.status) { - m := new(dns.Msg) - m.SetRcode(r, tc.rcode) - w.WriteMsg(m) - } - return tc.status, tc.err - }), - every: 1, - zipkinTracer: m, - tagSet: defaultTagSet, - } - ctx := context.TODO() - if _, err := tr.ServeDNS(ctx, w, tc.question); err != nil && tc.err == nil { - t.Fatalf("Error during tr.ServeDNS(ctx, w, %v): %v", tc.question, err) - } - - fs := m.FinishedSpans() - // Each trace consists of two spans; the root and the Next function. - if len(fs) != 2 { - t.Fatalf("Unexpected span count: len(fs): want 2, got %v", len(fs)) - } - - rootSpan := fs[1] - req := request.Request{W: w, Req: tc.question} - if rootSpan.OperationName != defaultTopLevelSpanName { - t.Errorf("Unexpected span name: rootSpan.Name: want %v, got %v", defaultTopLevelSpanName, rootSpan.OperationName) - } - - if rootSpan.Tag(defaultTagSet.Name) != req.Name() { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", defaultTagSet.Name, req.Name(), rootSpan.Tag(defaultTagSet.Name)) - } - if rootSpan.Tag(defaultTagSet.Type) != req.Type() { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", defaultTagSet.Type, req.Type(), rootSpan.Tag(defaultTagSet.Type)) - } - if rootSpan.Tag(defaultTagSet.Proto) != req.Proto() { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", defaultTagSet.Proto, req.Proto(), rootSpan.Tag(defaultTagSet.Proto)) - } - if rootSpan.Tag(defaultTagSet.Remote) != req.IP() { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", defaultTagSet.Remote, req.IP(), rootSpan.Tag(defaultTagSet.Remote)) - } - if rootSpan.Tag(defaultTagSet.Rcode) != rcode.ToString(tc.rcode) { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", defaultTagSet.Rcode, rcode.ToString(tc.rcode), rootSpan.Tag(defaultTagSet.Rcode)) - } - if tc.err != nil && rootSpan.Tag("error") != true { - t.Errorf("Unexpected span tag: rootSpan.Tag(%v): want %v, got %v", "error", true, rootSpan.Tag("error")) - } - }) - } -} - -func TestTrace_DOH_TraceHeaderExtraction(t *testing.T) { - w := dnstest.NewRecorder(&test.ResponseWriter{}) - m := openTracingMock.New() - tr := &trace{ - Next: test.HandlerFunc(func(_ context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if plugin.ClientWrite(dns.RcodeSuccess) { - m := new(dns.Msg) - m.SetRcode(r, dns.RcodeSuccess) - w.WriteMsg(m) - } - return dns.RcodeSuccess, nil - }), - every: 1, - zipkinTracer: m, - } - q := new(dns.Msg).SetQuestion("example.net.", dns.TypeA) - - req := httptest.NewRequest(http.MethodPost, "/dns-query", nil) - - outsideSpan := m.StartSpan("test-header-span") - outsideSpan.Tracer().Inject(outsideSpan.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(req.Header)) - defer outsideSpan.Finish() - - ctx := context.TODO() - ctx = context.WithValue(ctx, dnsserver.HTTPRequestKey{}, req) - - tr.ServeDNS(ctx, w, q) - - fs := m.FinishedSpans() - rootCoreDNSspan := fs[1] - rootCoreDNSTraceID := rootCoreDNSspan.Context().(openTracingMock.MockSpanContext).TraceID - outsideSpanTraceID := outsideSpan.Context().(openTracingMock.MockSpanContext).TraceID - if rootCoreDNSTraceID != outsideSpanTraceID { - t.Errorf("Unexpected traceID: rootSpan.TraceID: want %v, got %v", rootCoreDNSTraceID, outsideSpanTraceID) - } -} - -func TestStartup_Datadog(t *testing.T) { - m, err := traceParse(caddy.NewTestController("dns", `trace datadog localhost:8126`)) - if err != nil { - t.Errorf("Error parsing test input: %s", err) - return - } - if m.Name() != "trace" { - t.Errorf("Wrong name from GetName: %s", m.Name()) - } - - // Test that we can start and stop the DataDog tracer without errors - err = m.OnStartup() - if err != nil { - t.Errorf("Error starting DataDog tracing plugin: %s", err) - return - } - - if m.tagSet != tagByProvider["datadog"] { - t.Errorf("TagSet for DataDog hasn't been correctly initialized") - } - - // Test shutdown - err = m.OnShutdown() - if err != nil { - t.Errorf("Error shutting down DataDog tracing plugin: %s", err) - } -} - -func TestTrace_DataDog(t *testing.T) { - // Test the complete DataDog tracing flow using mocktracer - mt := mocktracer.Start() - defer mt.Stop() - - cases := []struct { - name string - rcode int - status int - question *dns.Msg - err error - }{ - { - name: "NXDOMAIN", - rcode: dns.RcodeNameError, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.org.", dns.TypeA), - }, - { - name: "NOERROR", - rcode: dns.RcodeSuccess, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.net.", dns.TypeCNAME), - }, - { - name: "SERVFAIL with error", - rcode: dns.RcodeServerFailure, - status: dns.RcodeSuccess, - question: new(dns.Msg).SetQuestion("example.net.", dns.TypeA), - err: errors.New("test error"), - }, - } - - datadogTagSet := tagByProvider["datadog"] - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - // Reset spans for each test - mt.Reset() - - w := dnstest.NewRecorder(&test.ResponseWriter{}) - tr := &trace{ - Next: test.HandlerFunc(func(_ context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - if plugin.ClientWrite(tc.status) { - m := new(dns.Msg) - m.SetRcode(r, tc.rcode) - w.WriteMsg(m) - } - return tc.status, tc.err - }), - every: 1, - EndpointType: "datadog", - tagSet: datadogTagSet, - } - - ctx := context.TODO() - if _, err := tr.ServeDNS(ctx, w, tc.question); err != nil && tc.err == nil { - t.Fatalf("Error during tr.ServeDNS(ctx, w, %v): %v", tc.question, err) - } - - spans := mt.FinishedSpans() - if len(spans) == 0 { - t.Fatal("Expected at least one span, got none") - } - - // Find the DNS span - var dnsSpan *mocktracer.Span - for _, span := range spans { - if span.OperationName() == defaultTopLevelSpanName { - dnsSpan = span - break - } - } - - if dnsSpan == nil { - t.Fatal("Could not find DNS span with operation name 'servedns'") - } - - req := request.Request{W: w, Req: tc.question} - - // Test DataDog-specific tags - if dnsSpan.Tag(datadogTagSet.Name) != req.Name() { - t.Errorf("Unexpected span tag: span.Tag(%v): want %v, got %v", - datadogTagSet.Name, req.Name(), dnsSpan.Tag(datadogTagSet.Name)) - } - if dnsSpan.Tag(datadogTagSet.Type) != req.Type() { - t.Errorf("Unexpected span tag: span.Tag(%v): want %v, got %v", - datadogTagSet.Type, req.Type(), dnsSpan.Tag(datadogTagSet.Type)) - } - if dnsSpan.Tag(datadogTagSet.Proto) != req.Proto() { - t.Errorf("Unexpected span tag: span.Tag(%v): want %v, got %v", - datadogTagSet.Proto, req.Proto(), dnsSpan.Tag(datadogTagSet.Proto)) - } - if dnsSpan.Tag(datadogTagSet.Remote) != req.IP() { - t.Errorf("Unexpected span tag: span.Tag(%v): want %v, got %v", - datadogTagSet.Remote, req.IP(), dnsSpan.Tag(datadogTagSet.Remote)) - } - if dnsSpan.Tag(datadogTagSet.Rcode) != rcode.ToString(tc.rcode) { - t.Errorf("Unexpected span tag: span.Tag(%v): want %v, got %v", - datadogTagSet.Rcode, rcode.ToString(tc.rcode), dnsSpan.Tag(datadogTagSet.Rcode)) - } - - // Test DataDog v2 error handling - if tc.err != nil { - errorMsg := dnsSpan.Tag("error.message") - if errorMsg == nil { - t.Error("Expected error.message tag to be set") - } else if !strings.Contains(errorMsg.(string), "test error") { - t.Errorf("Expected error.message to contain 'test error', got %v", errorMsg) - } - - // Check error type tag - errorType := dnsSpan.Tag("error.type") - if errorType == nil { - t.Error("Expected error.type tag to be set") - } - } - - // Verify trace ID exists (mocktracer uses uint64) - traceID := dnsSpan.TraceID() - if traceID == 0 { - t.Error("Expected non-zero trace ID") - } - }) - } -} diff --git a/plugin/tsig/README.md b/plugin/tsig/README.md deleted file mode 100644 index d73b9ca9c6..0000000000 --- a/plugin/tsig/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# tsig - -## Name - -*tsig* - define TSIG keys, validate incoming TSIG signed requests and sign responses. - -## Description - -With *tsig*, you can define CoreDNS's TSIG secret keys. Using those keys, *tsig* validates incoming TSIG requests and signs -responses to those requests. It does not itself sign requests outgoing from CoreDNS; it is up to the -respective plugins sending those requests to sign them using the keys defined by *tsig*. - -The *tsig* plugin can also require that incoming requests be signed for certain query types, refusing requests that do not comply. - -## Syntax - -~~~ -tsig [ZONE...] { - secret NAME KEY - secrets FILE - require [QTYPE...] -} -~~~ - - * **ZONE** - the zones *tsig* will TSIG. By default, the zones from the server block are used. - - * `secret` **NAME** **KEY** - specifies a TSIG secret for **NAME** with **KEY**. Use this option more than once - to define multiple secrets. Secrets are global to the server instance, not just for the enclosing **ZONE**. - - * `secrets` **FILE** - same as `secret`, but load the secrets from a file. The file may define any number - of unique keys, each in the following `named.conf` format: - ```cgo - key "example." { - secret "X28hl0BOfAL5G0jsmJWSacrwn7YRm2f6U5brnzwWEus="; - }; - ``` - Each key may also specify an `algorithm` e.g. `algorithm hmac-sha256;`, but this is currently ignored by the plugin. - - * `require` **QTYPE...** - the query types that must be TSIG'd. Requests of the specified types - will be `REFUSED` if they are not signed.`require all` will require requests of all types to be - signed. `require none` will not require requests any types to be signed. Default behavior is to not require. - -## Examples - -Require TSIG signed transactions for transfer requests to `example.zone`. - -``` -example.zone { - tsig { - secret example.zone.key. NoTCJU+DMqFWywaPyxSijrDEA/eC3nK0xi3AMEZuPVk= - require AXFR IXFR - } - transfer { - to * - } -} -``` - -Require TSIG signed transactions for all requests to `auth.zone`. - -``` -auth.zone { - tsig { - secret auth.zone.key. NoTCJU+DMqFWywaPyxSijrDEA/eC3nK0xi3AMEZuPVk= - require all - } - forward . 10.1.0.2 -} -``` - -## Bugs - -### Secondary - -TSIG transfers are not yet implemented for the *secondary* plugin. The *secondary* plugin will not sign its zone transfer requests. - -### Zone Transfer Notifies - -With the *transfer* plugin, zone transfer notifications from CoreDNS are not TSIG signed. - -### Special Considerations for Forwarding Servers (RFC 8945 5.5) - -https://datatracker.ietf.org/doc/html/rfc8945#section-5.5 - -CoreDNS does not implement this section as follows ... - -* RFC requirement: - > If the name on the TSIG is not -of a secret that the server shares with the originator, the server -MUST forward the message unchanged including the TSIG. - - CoreDNS behavior: -If ths zone of the request matches the _tsig_ plugin zones, then the TSIG record -is always stripped. But even when the _tsig_ plugin is not involved, the _forward_ plugin -may alter the message with compression, which would cause validation failure -at the destination. - - -* RFC requirement: - > If the TSIG passes all checks, the forwarding -server MUST, if possible, include a TSIG of its own to the -destination or the next forwarder. - - CoreDNS behavior: -If ths zone of the request matches the _tsig_ plugin zones, _forward_ plugin will -proxy the request upstream without TSIG. - - -* RFC requirement: - > If no transaction security is -available to the destination and the message is a query, and if the -corresponding response has the AD flag (see RFC4035) set, the -forwarder MUST clear the AD flag before adding the TSIG to the -response and returning the result to the system from which it -received the query. - - CoreDNS behavior: -The AD flag is not cleared. diff --git a/plugin/tsig/setup.go b/plugin/tsig/setup.go deleted file mode 100644 index a187a4b4ab..0000000000 --- a/plugin/tsig/setup.go +++ /dev/null @@ -1,168 +0,0 @@ -package tsig - -import ( - "bufio" - "fmt" - "io" - "os" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - - "github.com/miekg/dns" -) - -func init() { - caddy.RegisterPlugin(pluginName, caddy.Plugin{ - ServerType: "dns", - Action: setup, - }) -} - -func setup(c *caddy.Controller) error { - t, err := parse(c) - if err != nil { - return plugin.Error(pluginName, c.ArgErr()) - } - - config := dnsserver.GetConfig(c) - - config.TsigSecret = t.secrets - - config.AddPlugin(func(next plugin.Handler) plugin.Handler { - t.Next = next - return t - }) - - return nil -} - -func parse(c *caddy.Controller) (*TSIGServer, error) { - t := &TSIGServer{ - secrets: make(map[string]string), - types: defaultQTypes, - } - - for i := 0; c.Next(); i++ { - if i > 0 { - return nil, plugin.ErrOnce - } - - t.Zones = plugin.OriginsFromArgsOrServerBlock(c.RemainingArgs(), c.ServerBlockKeys) - for c.NextBlock() { - switch c.Val() { - case "secret": - args := c.RemainingArgs() - if len(args) != 2 { - return nil, c.ArgErr() - } - k := plugin.Name(args[0]).Normalize() - if _, exists := t.secrets[k]; exists { - return nil, fmt.Errorf("key %q redefined", k) - } - t.secrets[k] = args[1] - case "secrets": - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - f, err := os.Open(args[0]) - if err != nil { - return nil, err - } - secrets, err := parseKeyFile(f) - if err != nil { - return nil, err - } - for k, s := range secrets { - if _, exists := t.secrets[k]; exists { - return nil, fmt.Errorf("key %q redefined", k) - } - t.secrets[k] = s - } - case "require": - t.types = qTypes{} - args := c.RemainingArgs() - if len(args) == 0 { - return nil, c.ArgErr() - } - if args[0] == "all" { - t.all = true - continue - } - if args[0] == "none" { - continue - } - for _, str := range args { - qt, ok := dns.StringToType[str] - if !ok { - return nil, c.Errf("unknown query type '%s'", str) - } - t.types[qt] = struct{}{} - } - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - } - return t, nil -} - -func parseKeyFile(f io.Reader) (map[string]string, error) { - secrets := make(map[string]string) - s := bufio.NewScanner(f) - for s.Scan() { - fields := strings.Fields(s.Text()) - if len(fields) == 0 { - continue - } - if fields[0] != "key" { - return nil, fmt.Errorf("unexpected token %q", fields[0]) - } - if len(fields) < 2 { - return nil, fmt.Errorf("expected key name %q", s.Text()) - } - key := strings.Trim(fields[1], "\"{") - if len(key) == 0 { - return nil, fmt.Errorf("expected key name %q", s.Text()) - } - key = plugin.Name(key).Normalize() - if _, ok := secrets[key]; ok { - return nil, fmt.Errorf("key %q redefined", key) - } - key: - for s.Scan() { - fields := strings.Fields(s.Text()) - if len(fields) == 0 { - continue - } - switch fields[0] { - case "algorithm": - continue - case "secret": - if len(fields) < 2 { - return nil, fmt.Errorf("expected secret key %q", s.Text()) - } - secret := strings.Trim(fields[1], "\";") - if len(secret) == 0 { - return nil, fmt.Errorf("expected secret key %q", s.Text()) - } - secrets[key] = secret - case "}": - fallthrough - case "};": - break key - default: - return nil, fmt.Errorf("unexpected token %q", fields[0]) - } - } - if _, ok := secrets[key]; !ok { - return nil, fmt.Errorf("expected secret for key %q", key) - } - } - return secrets, nil -} - -var defaultQTypes = qTypes{} diff --git a/plugin/tsig/setup_test.go b/plugin/tsig/setup_test.go deleted file mode 100644 index 0d74339964..0000000000 --- a/plugin/tsig/setup_test.go +++ /dev/null @@ -1,245 +0,0 @@ -package tsig - -import ( - "fmt" - "strings" - "testing" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestParse(t *testing.T) { - secrets := map[string]string{ - "name.key.": "test-key", - "name2.key.": "test-key-2", - } - secretConfig := "" - for k, s := range secrets { - secretConfig += fmt.Sprintf("secret %s %s\n", k, s) - } - secretsFile, cleanup, err := test.TempFile(".", `key "name.key." { - secret "test-key"; -}; -key "name2.key." { - secret "test-key2"; -};`) - if err != nil { - t.Fatalf("failed to create temp file: %v", err) - } - defer cleanup() - - tests := []struct { - input string - shouldErr bool - expectedZones []string - expectedQTypes qTypes - expectedSecrets map[string]string - expectedAll bool - }{ - { - input: "tsig {\n " + secretConfig + "}", - expectedZones: []string{"."}, - expectedQTypes: defaultQTypes, - expectedSecrets: secrets, - }, - { - input: "tsig {\n secrets " + secretsFile + "\n}", - expectedZones: []string{"."}, - expectedQTypes: defaultQTypes, - expectedSecrets: secrets, - }, - { - input: "tsig example.com {\n " + secretConfig + "}", - expectedZones: []string{"example.com."}, - expectedQTypes: defaultQTypes, - expectedSecrets: secrets, - }, - { - input: "tsig {\n " + secretConfig + " require all \n}", - expectedZones: []string{"."}, - expectedQTypes: qTypes{}, - expectedAll: true, - expectedSecrets: secrets, - }, - { - input: "tsig {\n " + secretConfig + " require none \n}", - expectedZones: []string{"."}, - expectedQTypes: qTypes{}, - expectedAll: false, - expectedSecrets: secrets, - }, - { - input: "tsig {\n " + secretConfig + " \n require A AAAA \n}", - expectedZones: []string{"."}, - expectedQTypes: qTypes{dns.TypeA: {}, dns.TypeAAAA: {}}, - expectedSecrets: secrets, - }, - { - input: "tsig {\n blah \n}", - shouldErr: true, - }, - { - input: "tsig {\n secret name. too many parameters \n}", - shouldErr: true, - }, - { - input: "tsig {\n require \n}", - shouldErr: true, - }, - { - input: "tsig {\n require invalid-qtype \n}", - shouldErr: true, - }, - } - - serverBlockKeys := []string{"."} - for i, test := range tests { - c := caddy.NewTestController("dns", test.input) - c.ServerBlockKeys = serverBlockKeys - ts, err := parse(c) - - if err == nil && test.shouldErr { - t.Fatalf("Test %d expected errors, but got no error.", i) - } else if err != nil && !test.shouldErr { - t.Fatalf("Test %d expected no errors, but got '%v'", i, err) - } - - if test.shouldErr { - continue - } - - if len(test.expectedZones) != len(ts.Zones) { - t.Fatalf("Test %d expected zones '%v', but got '%v'.", i, test.expectedZones, ts.Zones) - } - for j := range test.expectedZones { - if test.expectedZones[j] != ts.Zones[j] { - t.Errorf("Test %d expected zones '%v', but got '%v'.", i, test.expectedZones, ts.Zones) - break - } - } - - if test.expectedAll != ts.all { - t.Errorf("Test %d expected require all to be '%v', but got '%v'.", i, test.expectedAll, ts.all) - } - - if len(test.expectedQTypes) != len(ts.types) { - t.Fatalf("Test %d expected required types '%v', but got '%v'.", i, test.expectedQTypes, ts.types) - } - for qt := range test.expectedQTypes { - if _, ok := ts.types[qt]; !ok { - t.Errorf("Test %d required types '%v', but got '%v'.", i, test.expectedQTypes, ts.types) - break - } - } - - if len(test.expectedSecrets) != len(ts.secrets) { - t.Fatalf("Test %d expected secrets '%v', but got '%v'.", i, test.expectedSecrets, ts.secrets) - } - for qt := range test.expectedSecrets { - secret, ok := ts.secrets[qt] - if !ok { - t.Errorf("Test %d required secrets '%v', but got '%v'.", i, test.expectedSecrets, ts.secrets) - break - } - if secret != ts.secrets[qt] { - t.Errorf("Test %d required secrets '%v', but got '%v'.", i, test.expectedSecrets, ts.secrets) - break - } - } - } -} - -func TestParseKeyFile(t *testing.T) { - var reader = strings.NewReader(`key "foo" { - algorithm hmac-sha256; - secret "36eowrtmxceNA3T5AdE+JNUOWFCw3amtcyHACnrDVgQ="; -}; -key "bar" { - algorithm hmac-sha256; - secret "X28hl0BOfAL5G0jsmJWSacrwn7YRm2f6U5brnzwWEus="; -}; -key "baz" { - secret "BycDPXSx/5YCD44Q4g5Nd2QNxNRDKwWTXddrU/zpIQM="; -};`) - - secrets, err := parseKeyFile(reader) - if err != nil { - t.Fatalf("Unexpected error: %q", err) - } - expectedSecrets := map[string]string{ - "foo.": "36eowrtmxceNA3T5AdE+JNUOWFCw3amtcyHACnrDVgQ=", - "bar.": "X28hl0BOfAL5G0jsmJWSacrwn7YRm2f6U5brnzwWEus=", - "baz.": "BycDPXSx/5YCD44Q4g5Nd2QNxNRDKwWTXddrU/zpIQM=", - } - - if len(secrets) != len(expectedSecrets) { - t.Fatalf("result has %d keys. expected %d", len(secrets), len(expectedSecrets)) - } - - for k, sec := range secrets { - expectedSec, ok := expectedSecrets[k] - if !ok { - t.Errorf("unexpected key in result. %q", k) - continue - } - if sec != expectedSec { - t.Errorf("incorrect secret in result for key %q. expected %q got %q ", k, expectedSec, sec) - } - } -} - -func TestParseKeyFileErrors(t *testing.T) { - tests := []struct { - in string - err string - }{ - {in: `key {`, err: "expected key name \"key {\""}, - {in: `foo "key" {`, err: "unexpected token \"foo\""}, - { - in: `key "foo" { - secret "36eowrtmxceNA3T5AdE+JNUOWFCw3amtcyHACnrDVgQ="; - }; - key "foo" { - secret "X28hl0BOfAL5G0jsmJWSacrwn7YRm2f6U5brnzwWEus="; - }; `, - err: "key \"foo.\" redefined", - }, - {in: `key "foo" { - schmalgorithm hmac-sha256;`, - err: "unexpected token \"schmalgorithm\"", - }, - { - in: `key "foo" { - schmecret "36eowrtmxceNA3T5AdE+JNUOWFCw3amtcyHACnrDVgQ=";`, - err: "unexpected token \"schmecret\"", - }, - { - in: `key "foo" { - secret`, - err: "expected secret key \"\\tsecret\"", - }, - { - in: `key "foo" { - secret ;`, - err: "expected secret key \"\\tsecret ;\"", - }, - { - in: `key "foo" { - };`, - err: "expected secret for key \"foo.\"", - }, - } - for i, testcase := range tests { - _, err := parseKeyFile(strings.NewReader(testcase.in)) - if err == nil { - t.Errorf("Test %d: expected error, got no error", i) - continue - } - if err.Error() != testcase.err { - t.Errorf("Test %d: Expected error: %q, got %q", i, testcase.err, err.Error()) - } - } -} diff --git a/plugin/tsig/tsig.go b/plugin/tsig/tsig.go deleted file mode 100644 index 68f859f815..0000000000 --- a/plugin/tsig/tsig.go +++ /dev/null @@ -1,140 +0,0 @@ -package tsig - -import ( - "context" - "encoding/binary" - "encoding/hex" - "time" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/log" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -// TSIGServer verifies tsig status and adds tsig to responses -type TSIGServer struct { - Zones []string - secrets map[string]string // [key-name]secret - types qTypes - all bool - Next plugin.Handler -} - -type qTypes map[uint16]struct{} - -// Name implements plugin.Handler -func (t TSIGServer) Name() string { return pluginName } - -// ServeDNS implements plugin.Handler -func (t *TSIGServer) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - var err error - state := request.Request{Req: r, W: w} - if z := plugin.Zones(t.Zones).Matches(state.Name()); z == "" { - return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r) - } - - var tsigRR = r.IsTsig() - rcode := dns.RcodeSuccess - if !t.tsigRequired(state.QType()) && tsigRR == nil { - return plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r) - } - - if tsigRR == nil { - log.Debugf("rejecting '%s' request without TSIG\n", dns.TypeToString[state.QType()]) - rcode = dns.RcodeRefused - } - - // wrap the response writer so the response will be TSIG signed. - w = &restoreTsigWriter{w, r, tsigRR} - - tsigStatus := w.TsigStatus() - if tsigStatus != nil { - log.Debugf("TSIG validation failed: %v %v", dns.TypeToString[state.QType()], tsigStatus) - rcode = dns.RcodeNotAuth - switch tsigStatus { - case dns.ErrSecret: - tsigRR.Error = dns.RcodeBadKey - case dns.ErrTime: - tsigRR.Error = dns.RcodeBadTime - default: - tsigRR.Error = dns.RcodeBadSig - } - resp := new(dns.Msg).SetRcode(r, rcode) - w.WriteMsg(resp) - return dns.RcodeSuccess, nil - } - - // strip the TSIG RR. Next, and subsequent plugins will not see the TSIG RRs. - // This violates forwarding cases (RFC 8945 5.5). See README.md Bugs - if len(r.Extra) > 1 { - r.Extra = r.Extra[0 : len(r.Extra)-1] - } else { - r.Extra = []dns.RR{} - } - - if rcode == dns.RcodeSuccess { - rcode, err = plugin.NextOrFailure(t.Name(), t.Next, ctx, w, r) - if err != nil { - log.Errorf("request handler returned an error: %v\n", err) - } - } - // If the plugin chain result was not an error, restore the TSIG and write the response. - if !plugin.ClientWrite(rcode) { - resp := new(dns.Msg).SetRcode(r, rcode) - w.WriteMsg(resp) - } - return dns.RcodeSuccess, nil -} - -func (t *TSIGServer) tsigRequired(qtype uint16) bool { - if t.all { - return true - } - if _, ok := t.types[qtype]; ok { - return true - } - return false -} - -// restoreTsigWriter Implement Response Writer, and adds a TSIG RR to a response -type restoreTsigWriter struct { - dns.ResponseWriter - req *dns.Msg // original request excluding TSIG if it has one - reqTSIG *dns.TSIG // original TSIG -} - -// WriteMsg adds a TSIG RR to the response -func (r *restoreTsigWriter) WriteMsg(m *dns.Msg) error { - // Make sure the response has an EDNS OPT RR if the request had it. - // Otherwise ScrubWriter would append it *after* TSIG, making it a non-compliant DNS message. - state := request.Request{Req: r.req, W: r.ResponseWriter} - state.SizeAndDo(m) - - repTSIG := m.IsTsig() - if r.reqTSIG != nil && repTSIG == nil { - repTSIG = new(dns.TSIG) - repTSIG.Hdr = dns.RR_Header{Name: r.reqTSIG.Hdr.Name, Rrtype: dns.TypeTSIG, Class: dns.ClassANY} - repTSIG.Algorithm = r.reqTSIG.Algorithm - repTSIG.OrigId = m.Id - repTSIG.Error = r.reqTSIG.Error - repTSIG.MAC = r.reqTSIG.MAC - repTSIG.MACSize = r.reqTSIG.MACSize - if repTSIG.Error == dns.RcodeBadTime { - // per RFC 8945 5.2.3. client time goes into TimeSigned, server time in OtherData, OtherLen = 6 ... - repTSIG.TimeSigned = r.reqTSIG.TimeSigned - b := make([]byte, 8) - // TimeSigned is network byte order. - binary.BigEndian.PutUint64(b, uint64(time.Now().Unix())) - // truncate to 48 least significant bits (network order 6 rightmost bytes) - repTSIG.OtherData = hex.EncodeToString(b[2:]) - repTSIG.OtherLen = 6 - } - m.Extra = append(m.Extra, repTSIG) - } - - return r.ResponseWriter.WriteMsg(m) -} - -const pluginName = "tsig" diff --git a/plugin/tsig/tsig_test.go b/plugin/tsig/tsig_test.go deleted file mode 100644 index b84b239b41..0000000000 --- a/plugin/tsig/tsig_test.go +++ /dev/null @@ -1,253 +0,0 @@ -package tsig - -import ( - "context" - "fmt" - "testing" - "time" - - "github.com/coredns/coredns/plugin/pkg/dnstest" - "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/miekg/dns" -) - -func TestServeDNS(t *testing.T) { - cases := []struct { - zones []string - reqTypes qTypes - qType uint16 - qTsig, all bool - expectRcode int - expectTsig bool - statusError bool - }{ - { - zones: []string{"."}, - all: true, - qType: dns.TypeA, - qTsig: true, - expectRcode: dns.RcodeSuccess, - expectTsig: true, - }, - { - zones: []string{"."}, - all: true, - qType: dns.TypeA, - qTsig: false, - expectRcode: dns.RcodeRefused, - expectTsig: false, - }, - { - zones: []string{"another.domain."}, - all: true, - qType: dns.TypeA, - qTsig: false, - expectRcode: dns.RcodeSuccess, - expectTsig: false, - }, - { - zones: []string{"another.domain."}, - all: true, - qType: dns.TypeA, - qTsig: true, - expectRcode: dns.RcodeSuccess, - expectTsig: false, - }, - { - zones: []string{"."}, - reqTypes: qTypes{dns.TypeAXFR: {}}, - qType: dns.TypeAXFR, - qTsig: true, - expectRcode: dns.RcodeSuccess, - expectTsig: true, - }, - { - zones: []string{"."}, - reqTypes: qTypes{}, - qType: dns.TypeA, - qTsig: false, - expectRcode: dns.RcodeSuccess, - expectTsig: false, - }, - { - zones: []string{"."}, - reqTypes: qTypes{}, - qType: dns.TypeA, - qTsig: true, - expectRcode: dns.RcodeSuccess, - expectTsig: true, - }, - { - zones: []string{"."}, - all: true, - qType: dns.TypeA, - qTsig: true, - expectRcode: dns.RcodeNotAuth, - expectTsig: true, - statusError: true, - }, - } - - for i, tc := range cases { - t.Run(fmt.Sprintf("%d", i), func(t *testing.T) { - tsig := TSIGServer{ - Zones: tc.zones, - all: tc.all, - types: tc.reqTypes, - Next: testHandler(), - } - - ctx := context.TODO() - - var w *dnstest.Recorder - if tc.statusError { - w = dnstest.NewRecorder(&ErrWriter{err: dns.ErrSig}) - } else { - w = dnstest.NewRecorder(&test.ResponseWriter{}) - } - r := new(dns.Msg) - r.SetQuestion("test.example.", tc.qType) - if tc.qTsig { - r.SetTsig("test.key.", dns.HmacSHA256, 300, time.Now().Unix()) - } - - _, err := tsig.ServeDNS(ctx, w, r) - if err != nil { - t.Fatal(err) - } - - if w.Msg.Rcode != tc.expectRcode { - t.Fatalf("expected rcode %v, got %v", tc.expectRcode, w.Msg.Rcode) - } - - if ts := w.Msg.IsTsig(); ts == nil && tc.expectTsig { - t.Fatal("expected TSIG in response") - } - if ts := w.Msg.IsTsig(); ts != nil && !tc.expectTsig { - t.Fatal("expected no TSIG in response") - } - }) - } -} - -func TestServeDNSTsigErrors(t *testing.T) { - clientNow := time.Now().Unix() - - cases := []struct { - desc string - tsigErr error - expectRcode int - expectError int - expectOtherLength int - expectTimeSigned int64 - }{ - { - desc: "Unknown Key", - tsigErr: dns.ErrSecret, - expectRcode: dns.RcodeNotAuth, - expectError: dns.RcodeBadKey, - expectOtherLength: 0, - expectTimeSigned: 0, - }, - { - desc: "Bad Signature", - tsigErr: dns.ErrSig, - expectRcode: dns.RcodeNotAuth, - expectError: dns.RcodeBadSig, - expectOtherLength: 0, - expectTimeSigned: 0, - }, - { - desc: "Bad Time", - tsigErr: dns.ErrTime, - expectRcode: dns.RcodeNotAuth, - expectError: dns.RcodeBadTime, - expectOtherLength: 6, - expectTimeSigned: clientNow, - }, - } - - tsig := TSIGServer{ - Zones: []string{"."}, - all: true, - Next: testHandler(), - } - - for _, tc := range cases { - t.Run(tc.desc, func(t *testing.T) { - ctx := context.TODO() - - var w = dnstest.NewRecorder(&ErrWriter{err: tc.tsigErr}) - - r := new(dns.Msg) - r.SetQuestion("test.example.", dns.TypeA) - r.SetTsig("test.key.", dns.HmacSHA256, 300, clientNow) - - // set a fake MAC and Size in request - rtsig := r.IsTsig() - rtsig.MAC = "0123456789012345678901234567890101234567890123456789012345678901" - rtsig.MACSize = 32 - - _, err := tsig.ServeDNS(ctx, w, r) - if err != nil { - t.Fatal(err) - } - - if w.Msg.Rcode != tc.expectRcode { - t.Fatalf("expected rcode %v, got %v", tc.expectRcode, w.Msg.Rcode) - } - - ts := w.Msg.IsTsig() - - if ts == nil { - t.Fatal("expected TSIG in response") - } - - if int(ts.Error) != tc.expectError { - t.Errorf("expected TSIG error code %v, got %v", tc.expectError, ts.Error) - } - - if len(ts.OtherData)/2 != tc.expectOtherLength { - t.Errorf("expected Other of length %v, got %v", tc.expectOtherLength, len(ts.OtherData)) - } - - if int(ts.OtherLen) != tc.expectOtherLength { - t.Errorf("expected OtherLen %v, got %v", tc.expectOtherLength, ts.OtherLen) - } - - if ts.TimeSigned != uint64(tc.expectTimeSigned) { - t.Errorf("expected TimeSigned to be %v, got %v", tc.expectTimeSigned, ts.TimeSigned) - } - }) - } -} - -func testHandler() test.HandlerFunc { - return func(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - state := request.Request{W: w, Req: r} - qname := state.Name() - m := new(dns.Msg) - rcode := dns.RcodeServerFailure - if qname == "test.example." { - m.SetReply(r) - rr := test.A("test.example. 300 IN A 1.2.3.48") - m.Answer = []dns.RR{rr} - m.Authoritative = true - rcode = dns.RcodeSuccess - } - m.SetRcode(r, rcode) - w.WriteMsg(m) - return rcode, nil - } -} - -// a test.ResponseWriter that always returns err as the TSIG status error -type ErrWriter struct { - err error - test.ResponseWriter -} - -// TsigStatus always returns an error. -func (t *ErrWriter) TsigStatus() error { return t.err } diff --git a/plugin/view/README.md b/plugin/view/README.md deleted file mode 100644 index 0326216688..0000000000 --- a/plugin/view/README.md +++ /dev/null @@ -1,147 +0,0 @@ -# view - -## Name - -*view* - defines conditions that must be met for a DNS request to be routed to the server block. - -## Description - -*view* defines an expression that must evaluate to true for a DNS request to be routed to the server block. -This enables advanced server block routing functions such as split dns. - -## Syntax -``` -view NAME { - expr EXPRESSION -} -``` - -* `view` **NAME** - The name of the view used by metrics and exported as metadata for requests that match the - view's expression -* `expr` **EXPRESSION** - CoreDNS will only route incoming queries to the enclosing server block - if the **EXPRESSION** evaluates to true. See the **Expressions** section for available variables and functions. - If multiple instances of view are defined, all **EXPRESSION** must evaluate to true for CoreDNS will only route - incoming queries to the enclosing server block. - -For expression syntax and examples, see the Expressions and Examples sections. - -## Examples - -Implement CIDR based split DNS routing. This will return a different -answer for `test.` depending on client's IP address. It returns ... -* `test. 3600 IN A 1.1.1.1`, for queries with a source address in 127.0.0.0/24 -* `test. 3600 IN A 2.2.2.2`, for queries with a source address in 192.168.0.0/16 -* `test. 3600 IN AAAA 2001:0DB8::1`, for queries with a source address in 2001:0DB8::/32 -* `test. 3600 IN A 3.3.3.3`, for all others - -``` -. { - view example1 { - expr incidr(client_ip(), '127.0.0.0/24') - } - hosts { - 1.1.1.1 test - } -} - -. { - view example2 { - expr incidr(client_ip(), '192.168.0.0/16') - } - hosts { - 2.2.2.2 test - } -} - -. { - view v6_example1 { - expr incidr(client_ip(), '2001:0DB8::/32') - } - hosts { - 2001:0DB8::1 test - } -} - -} - -. { - hosts { - 3.3.3.3 test - } -} -``` - -Send all `A` and `AAAA` requests to `10.0.0.6`, and all other requests to `10.0.0.1`. - -``` -. { - view example { - expr type() in ['A', 'AAAA'] - } - forward . 10.0.0.6 -} - -. { - forward . 10.0.0.1 -} -``` - -Send all requests for `abc.*.example.com` (where * can be any number of labels), to `10.0.0.2`, and all other -requests to `10.0.0.1`. -Note that the regex pattern is enclosed in single quotes, and backslashes are escaped with backslashes. - -``` -. { - view example { - expr name() matches '^abc\\..*\\.example\\.com\\.$' - } - forward . 10.0.0.2 -} - -. { - forward . 10.0.0.1 -} -``` - -## Expressions - -To evaluate expressions, *view* uses the expr-lang/expr package ( https://github.com/expr-lang/expr ). -For example, an expression could look like: -`(type() == 'A' && name() == 'example.com.') || client_ip() == '1.2.3.4'`. - -All expressions should be written to evaluate to a boolean value. - -See https://github.com/expr-lang/expr/blob/master/docs/Language-Definition.md as a detailed reference for valid syntax. - -### Available Expression Functions - -In the context of the *view* plugin, expressions can reference DNS query information by using utility -functions defined below. - -#### DNS Query Functions - -* `bufsize() int`: the EDNS0 buffer size advertised in the query -* `class() string`: class of the request (IN, CH, ...) -* `client_ip() string`: client's IP address, for IPv6 addresses these are enclosed in brackets: `[::1]` -* `do() bool`: the EDNS0 DO (DNSSEC OK) bit set in the query -* `id() int`: query ID -* `name() string`: name of the request (the domain name requested ending with a dot): `example.com.` -* `opcode() int`: query OPCODE -* `port() string`: client's port -* `proto() string`: protocol used (tcp or udp) -* `server_ip() string`: server's IP address; for IPv6 addresses these are enclosed in brackets: `[::1]` -* `server_port() string` : server's port -* `size() int`: request size in bytes -* `type() string`: type of the request (A, AAAA, TXT, ...) - -#### Utility Functions - -* `incidr(ip string, cidr string) bool`: returns true if _ip_ is within _cidr_ -* `metadata(label string)` - returns the value for the metadata matching _label_ - -## Metadata - -The view plugin will publish the following metadata, if the *metadata* -plugin is also enabled: - -* `view/name`: the name of the view handling the current request diff --git a/plugin/view/metadata.go b/plugin/view/metadata.go deleted file mode 100644 index 6ee9bc069c..0000000000 --- a/plugin/view/metadata.go +++ /dev/null @@ -1,16 +0,0 @@ -package view - -import ( - "context" - - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/request" -) - -// Metadata implements the metadata.Provider interface. -func (v *View) Metadata(ctx context.Context, state request.Request) context.Context { - metadata.SetValueFunc(ctx, "view/name", func() string { - return v.viewName - }) - return ctx -} diff --git a/plugin/view/metadata_test.go b/plugin/view/metadata_test.go deleted file mode 100644 index bd3cc13e6b..0000000000 --- a/plugin/view/metadata_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package view - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/metadata" - "github.com/coredns/coredns/request" -) - -func TestMetadata_PublishesViewName(t *testing.T) { - v := &View{viewName: "myview"} - ctx := metadata.ContextWithMetadata(context.Background()) - st := request.Request{} - ctx = v.Metadata(ctx, st) - - if f := metadata.ValueFunc(ctx, "view/name"); f == nil { - t.Fatalf("metadata value func is nil") - } else if got := f(); got != "myview" { - t.Fatalf("metadata value: got %q, want %q", got, "myview") - } -} diff --git a/plugin/view/setup.go b/plugin/view/setup.go deleted file mode 100644 index 874cb6ef28..0000000000 --- a/plugin/view/setup.go +++ /dev/null @@ -1,62 +0,0 @@ -package view - -import ( - "context" - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/coredns/core/dnsserver" - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/expression" - - "github.com/expr-lang/expr" -) - -func init() { plugin.Register("view", setup) } - -func setup(c *caddy.Controller) error { - cond, err := parse(c) - if err != nil { - return plugin.Error("view", err) - } - - dnsserver.GetConfig(c).AddPlugin(func(next plugin.Handler) plugin.Handler { - cond.Next = next - return cond - }) - - return nil -} - -func parse(c *caddy.Controller) (*View, error) { - v := new(View) - - i := 0 - for c.Next() { - i++ - if i > 1 { - return nil, plugin.ErrOnce - } - args := c.RemainingArgs() - if len(args) != 1 { - return nil, c.ArgErr() - } - v.viewName = args[0] - - for c.NextBlock() { - switch c.Val() { - case "expr": - args := c.RemainingArgs() - prog, err := expr.Compile(strings.Join(args, " "), expr.Env(expression.DefaultEnv(context.Background(), nil)), expr.DisableBuiltin("type")) - if err != nil { - return v, err - } - v.progs = append(v.progs, prog) - continue - default: - return nil, c.Errf("unknown property '%s'", c.Val()) - } - } - } - return v, nil -} diff --git a/plugin/view/setup_test.go b/plugin/view/setup_test.go deleted file mode 100644 index 309d85cb8e..0000000000 --- a/plugin/view/setup_test.go +++ /dev/null @@ -1,63 +0,0 @@ -package view - -import ( - "context" - "errors" - "testing" - - "github.com/coredns/caddy" - ptest "github.com/coredns/coredns/plugin/test" - - "github.com/miekg/dns" -) - -func TestSetup(t *testing.T) { - tests := []struct { - input string - shouldErr bool - progCount int - }{ - {"view example {\n expr name() == 'example.com.'\n}", false, 1}, - {"view example {\n expr incidr(client_ip(), '10.0.0.0/24')\n}", false, 1}, - {"view example {\n expr name() == 'example.com.'\n expr name() == 'example2.com.'\n}", false, 2}, - {"view", true, 0}, - {"view example {\n expr invalid expression\n}", true, 0}, - {"view x {\n foo bar\n}\n", true, 0}, - {"view a { }\nview b { }\n", true, 0}, - } - - for i, test := range tests { - v, err := parse(caddy.NewTestController("dns", test.input)) - - if test.shouldErr && err == nil { - t.Errorf("Test %d: Expected error but found none for input %s", i, test.input) - } - if err != nil && !test.shouldErr { - t.Errorf("Test %d: Expected no error but found one for input %s. Error was: %v", i, test.input, err) - } - if test.shouldErr { - continue - } - if test.progCount != len(v.progs) { - t.Errorf("Test %d: Expected prog length %d, but got %d for %s.", i, test.progCount, len(v.progs), test.input) - } - } -} - -func TestServeDNS_DelegatesToNext(t *testing.T) { - v := &View{} - wantCode := 123 - wantErr := errors.New("boom") - v.Next = ptest.NextHandler(wantCode, wantErr) - - rr := new(dns.Msg) - rr.SetQuestion("example.com.", dns.TypeA) - w := &ptest.ResponseWriter{} - gotCode, gotErr := v.ServeDNS(context.Background(), w, rr) - if gotCode != wantCode { - t.Fatalf("rcode: got %d, want %d", gotCode, wantCode) - } - if gotErr != wantErr { - t.Fatalf("error: got %v, want %v", gotErr, wantErr) - } -} diff --git a/plugin/view/view.go b/plugin/view/view.go deleted file mode 100644 index 992ea9b092..0000000000 --- a/plugin/view/view.go +++ /dev/null @@ -1,48 +0,0 @@ -package view - -import ( - "context" - - "github.com/coredns/coredns/plugin" - "github.com/coredns/coredns/plugin/pkg/expression" - "github.com/coredns/coredns/request" - - "github.com/expr-lang/expr" - "github.com/expr-lang/expr/vm" - "github.com/miekg/dns" -) - -// View is a plugin that enables configuring expression based advanced routing -type View struct { - progs []*vm.Program - viewName string - Next plugin.Handler -} - -// Filter implements dnsserver.Viewer. It returns true if all View rules evaluate to true for the given state. -func (v *View) Filter(ctx context.Context, state *request.Request) bool { - env := expression.DefaultEnv(ctx, state) - for _, prog := range v.progs { - result, err := expr.Run(prog, env) - if err != nil { - return false - } - if b, ok := result.(bool); ok && b { - continue - } - // anything other than a boolean true result is considered false - return false - } - return true -} - -// ViewName implements dnsserver.Viewer. It returns the view name -func (v *View) ViewName() string { return v.viewName } - -// Name implements the Handler interface -func (*View) Name() string { return "view" } - -// ServeDNS implements the Handler interface. -func (v *View) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { - return plugin.NextOrFailure(v.Name(), v.Next, ctx, w, r) -} diff --git a/plugin/view/view_test.go b/plugin/view/view_test.go deleted file mode 100644 index 1f080cd11d..0000000000 --- a/plugin/view/view_test.go +++ /dev/null @@ -1,71 +0,0 @@ -package view - -import ( - "context" - "testing" - - "github.com/coredns/coredns/plugin/pkg/expression" - ptest "github.com/coredns/coredns/plugin/test" - "github.com/coredns/coredns/request" - - "github.com/expr-lang/expr" - "github.com/expr-lang/expr/vm" - "github.com/miekg/dns" -) - -func TestFilter_NoPrograms(t *testing.T) { - v := &View{viewName: "test"} - st := makeState(t, "example.com.") - if !v.Filter(context.Background(), st) { - t.Fatalf("expected true when no programs are configured") - } -} - -func TestFilter_ErrorPaths(t *testing.T) { - st := makeState(t, "example.com.") - - tests := []struct { - expr string - expected bool - }{ - {"name() == 'example.com.'", true}, - {"name() == 'notexample.com.'", false}, - {"1", false}, - {"incidr('invalid', '1.2.3.0/24')", false}, - } - - for i, tc := range tests { - v := &View{progs: []*vm.Program{compileExpr(t, tc.expr)}} - got := v.Filter(context.Background(), st) - if got != tc.expected { - t.Fatalf("case %d expr %q: expected %v, got %v", i, tc.expr, tc.expected, got) - } - } -} - -func TestView_Names(t *testing.T) { - v := &View{viewName: "v1"} - if v.ViewName() != "v1" { - t.Fatalf("ViewName() expected %q, got %q", "v1", v.ViewName()) - } - if v.Name() != "view" { - t.Fatalf("Name() expected %q, got %q", "view", v.Name()) - } -} - -func compileExpr(t *testing.T, e string) *vm.Program { - t.Helper() - prog, err := expr.Compile(e, expr.Env(expression.DefaultEnv(context.Background(), nil)), expr.DisableBuiltin("type")) - if err != nil { - t.Fatalf("compile failed for %q: %v", e, err) - } - return prog -} - -func makeState(t *testing.T, qname string) *request.Request { - t.Helper() - m := new(dns.Msg) - m.SetQuestion(dns.Fqdn(qname), dns.TypeA) - w := &ptest.ResponseWriter{} - return &request.Request{W: w, Req: m} -} diff --git a/vendor/cloud.google.com/go/auth/CHANGES.md b/vendor/cloud.google.com/go/auth/CHANGES.md deleted file mode 100644 index c2f636c288..0000000000 --- a/vendor/cloud.google.com/go/auth/CHANGES.md +++ /dev/null @@ -1,447 +0,0 @@ -# Changelog - -## [0.16.5](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.4...auth/v0.16.5) (2025-08-14) - - -### Bug Fixes - -* **auth:** Improve error message for unknown credentials type ([#12673](https://github.com/googleapis/google-cloud-go/issues/12673)) ([558b164](https://github.com/googleapis/google-cloud-go/commit/558b16429f621276694405fa5f2091199f2d4c4d)) -* **auth:** Set Content-Type in userTokenProvider.exchangeToken ([#12634](https://github.com/googleapis/google-cloud-go/issues/12634)) ([1197ebc](https://github.com/googleapis/google-cloud-go/commit/1197ebcbca491f8c610da732c7361c90bc6f46d0)) - -## [0.16.4](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.3...auth/v0.16.4) (2025-08-06) - - -### Bug Fixes - -* **auth:** Add UseDefaultClient: true to metadata.Options ([#12666](https://github.com/googleapis/google-cloud-go/issues/12666)) ([1482191](https://github.com/googleapis/google-cloud-go/commit/1482191e88236693efef68769752638281566766)), refs [#11078](https://github.com/googleapis/google-cloud-go/issues/11078) [#12657](https://github.com/googleapis/google-cloud-go/issues/12657) - -## [0.16.3](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.2...auth/v0.16.3) (2025-07-17) - - -### Bug Fixes - -* **auth:** Fix race condition in cachedTokenProvider.tokenAsync ([#12586](https://github.com/googleapis/google-cloud-go/issues/12586)) ([73867cc](https://github.com/googleapis/google-cloud-go/commit/73867ccc1e9808d65361bcfc0776bd95fe34dbb3)) - -## [0.16.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.1...auth/v0.16.2) (2025-06-04) - - -### Bug Fixes - -* **auth:** Add back DirectPath misconfiguration logging ([#11162](https://github.com/googleapis/google-cloud-go/issues/11162)) ([8d52da5](https://github.com/googleapis/google-cloud-go/commit/8d52da58da5a0ed77a0f6307d1b561bc045406a1)) -* **auth:** Remove s2a fallback option ([#12354](https://github.com/googleapis/google-cloud-go/issues/12354)) ([d5acc59](https://github.com/googleapis/google-cloud-go/commit/d5acc599cd775ddc404349e75906fa02e8ff133e)) - -## [0.16.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.16.0...auth/v0.16.1) (2025-04-23) - - -### Bug Fixes - -* **auth:** Clone detectopts before assigning TokenBindingType ([#11881](https://github.com/googleapis/google-cloud-go/issues/11881)) ([2167b02](https://github.com/googleapis/google-cloud-go/commit/2167b020fdc43b517c2b6ecca264a10e357ea035)) - -## [0.16.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.15.0...auth/v0.16.0) (2025-04-14) - - -### Features - -* **auth/credentials:** Return X.509 certificate chain as subject token ([#11948](https://github.com/googleapis/google-cloud-go/issues/11948)) ([d445a3f](https://github.com/googleapis/google-cloud-go/commit/d445a3f66272ffd5c39c4939af9bebad4582631c)), refs [#11757](https://github.com/googleapis/google-cloud-go/issues/11757) -* **auth:** Configure DirectPath bound credentials from AllowedHardBoundTokens ([#11665](https://github.com/googleapis/google-cloud-go/issues/11665)) ([0fc40bc](https://github.com/googleapis/google-cloud-go/commit/0fc40bcf4e4673704df0973e9fa65957395d7bb4)) - - -### Bug Fixes - -* **auth:** Allow non-default SA credentials for DP ([#11828](https://github.com/googleapis/google-cloud-go/issues/11828)) ([3a996b4](https://github.com/googleapis/google-cloud-go/commit/3a996b4129e6d0a34dfda6671f535d5aefb26a82)) -* **auth:** Restore calling DialContext ([#11930](https://github.com/googleapis/google-cloud-go/issues/11930)) ([9ec9a29](https://github.com/googleapis/google-cloud-go/commit/9ec9a29494e93197edbaf45aba28984801e9770a)), refs [#11118](https://github.com/googleapis/google-cloud-go/issues/11118) - -## [0.15.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.14.1...auth/v0.15.0) (2025-02-19) - - -### Features - -* **auth:** Add hard-bound token request to compute token provider. ([#11588](https://github.com/googleapis/google-cloud-go/issues/11588)) ([0e608bb](https://github.com/googleapis/google-cloud-go/commit/0e608bb5ac3d694c8ad36ca4340071d3a2c78699)) - -## [0.14.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.14.0...auth/v0.14.1) (2025-01-24) - - -### Documentation - -* **auth:** Add warning about externally-provided credentials ([#11462](https://github.com/googleapis/google-cloud-go/issues/11462)) ([49fb6ff](https://github.com/googleapis/google-cloud-go/commit/49fb6ff4d754895f82c9c4d502fc7547d3b5a941)) - -## [0.14.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.13.0...auth/v0.14.0) (2025-01-08) - - -### Features - -* **auth:** Add universe domain support to idtoken ([#11059](https://github.com/googleapis/google-cloud-go/issues/11059)) ([72add7e](https://github.com/googleapis/google-cloud-go/commit/72add7e9f8f455af695e8ef79212a4bd3122fb3a)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) -* **auth:** Fix copy of delegates in impersonate.NewIDTokenCredentials ([#11386](https://github.com/googleapis/google-cloud-go/issues/11386)) ([ff7ef8e](https://github.com/googleapis/google-cloud-go/commit/ff7ef8e7ade7171bce3e4f30ff10a2e9f6c27ca0)), refs [#11379](https://github.com/googleapis/google-cloud-go/issues/11379) -* **auth:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) - -## [0.13.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.12.1...auth/v0.13.0) (2024-12-13) - - -### Features - -* **auth:** Add logging support ([#11079](https://github.com/googleapis/google-cloud-go/issues/11079)) ([c80e31d](https://github.com/googleapis/google-cloud-go/commit/c80e31df5ecb33a810be3dfb9d9e27ac531aa91d)) -* **auth:** Pass logger from auth layer to metadata package ([#11288](https://github.com/googleapis/google-cloud-go/issues/11288)) ([b552efd](https://github.com/googleapis/google-cloud-go/commit/b552efd6ab34e5dfded18438e0fbfd925805614f)) - - -### Bug Fixes - -* **auth:** Check compute cred type before non-default flag for DP ([#11255](https://github.com/googleapis/google-cloud-go/issues/11255)) ([4347ca1](https://github.com/googleapis/google-cloud-go/commit/4347ca141892be8ae813399b4b437662a103bc90)) - -## [0.12.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.12.0...auth/v0.12.1) (2024-12-10) - - -### Bug Fixes - -* **auth:** Correct typo in link ([#11160](https://github.com/googleapis/google-cloud-go/issues/11160)) ([af6fb46](https://github.com/googleapis/google-cloud-go/commit/af6fb46d7cd694ddbe8c9d63bc4cdcd62b9fb2c1)) - -## [0.12.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.11.0...auth/v0.12.0) (2024-12-04) - - -### Features - -* **auth:** Add support for providing custom certificate URL ([#11006](https://github.com/googleapis/google-cloud-go/issues/11006)) ([ebf3657](https://github.com/googleapis/google-cloud-go/commit/ebf36579724afb375d3974cf1da38f703e3b7dbc)), refs [#11005](https://github.com/googleapis/google-cloud-go/issues/11005) - - -### Bug Fixes - -* **auth:** Ensure endpoints are present in Validator ([#11209](https://github.com/googleapis/google-cloud-go/issues/11209)) ([106cd53](https://github.com/googleapis/google-cloud-go/commit/106cd53309facaef1b8ea78376179f523f6912b9)), refs [#11006](https://github.com/googleapis/google-cloud-go/issues/11006) [#11190](https://github.com/googleapis/google-cloud-go/issues/11190) [#11189](https://github.com/googleapis/google-cloud-go/issues/11189) [#11188](https://github.com/googleapis/google-cloud-go/issues/11188) - -## [0.11.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.10.2...auth/v0.11.0) (2024-11-21) - - -### Features - -* **auth:** Add universe domain support to mTLS ([#11159](https://github.com/googleapis/google-cloud-go/issues/11159)) ([117748b](https://github.com/googleapis/google-cloud-go/commit/117748ba1cfd4ae62a6a4feb7e30951cb2bc9344)) - -## [0.10.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.10.1...auth/v0.10.2) (2024-11-12) - - -### Bug Fixes - -* **auth:** Restore use of grpc.Dial ([#11118](https://github.com/googleapis/google-cloud-go/issues/11118)) ([2456b94](https://github.com/googleapis/google-cloud-go/commit/2456b943b7b8aaabd4d8bfb7572c0f477ae0db45)), refs [#7556](https://github.com/googleapis/google-cloud-go/issues/7556) - -## [0.10.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.10.0...auth/v0.10.1) (2024-11-06) - - -### Bug Fixes - -* **auth:** Restore Application Default Credentials support to idtoken ([#11083](https://github.com/googleapis/google-cloud-go/issues/11083)) ([8771f2e](https://github.com/googleapis/google-cloud-go/commit/8771f2ea9807ab822083808e0678392edff3b4f2)) -* **auth:** Skip impersonate universe domain check if empty ([#11086](https://github.com/googleapis/google-cloud-go/issues/11086)) ([87159c1](https://github.com/googleapis/google-cloud-go/commit/87159c1059d4a18d1367ce62746a838a94964ab6)) - -## [0.10.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.9...auth/v0.10.0) (2024-10-30) - - -### Features - -* **auth:** Add universe domain support to credentials/impersonate ([#10953](https://github.com/googleapis/google-cloud-go/issues/10953)) ([e06cb64](https://github.com/googleapis/google-cloud-go/commit/e06cb6499f7eda3aef08ab18ff197016f667684b)) - -## [0.9.9](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.8...auth/v0.9.9) (2024-10-22) - - -### Bug Fixes - -* **auth:** Fallback cert lookups for missing files ([#11013](https://github.com/googleapis/google-cloud-go/issues/11013)) ([bd76695](https://github.com/googleapis/google-cloud-go/commit/bd766957ec238b7c40ddbabb369e612dc9b07313)), refs [#10844](https://github.com/googleapis/google-cloud-go/issues/10844) -* **auth:** Replace MDS endpoint universe_domain with universe-domain ([#11000](https://github.com/googleapis/google-cloud-go/issues/11000)) ([6a1586f](https://github.com/googleapis/google-cloud-go/commit/6a1586f2ce9974684affaea84e7b629313b4d114)) - -## [0.9.8](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.7...auth/v0.9.8) (2024-10-09) - - -### Bug Fixes - -* **auth:** Restore OpenTelemetry handling in transports ([#10968](https://github.com/googleapis/google-cloud-go/issues/10968)) ([08c6d04](https://github.com/googleapis/google-cloud-go/commit/08c6d04901c1a20e219b2d86df41dbaa6d7d7b55)), refs [#10962](https://github.com/googleapis/google-cloud-go/issues/10962) -* **auth:** Try talk to plaintext S2A if credentials can not be found for mTLS-S2A ([#10941](https://github.com/googleapis/google-cloud-go/issues/10941)) ([0f0bf2d](https://github.com/googleapis/google-cloud-go/commit/0f0bf2d18c97dd8b65bcf0099f0802b5631c6287)) - -## [0.9.7](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.6...auth/v0.9.7) (2024-10-01) - - -### Bug Fixes - -* **auth:** Restore support for non-default service accounts for DirectPath ([#10937](https://github.com/googleapis/google-cloud-go/issues/10937)) ([a38650e](https://github.com/googleapis/google-cloud-go/commit/a38650edbf420223077498cafa537aec74b37aad)), refs [#10907](https://github.com/googleapis/google-cloud-go/issues/10907) - -## [0.9.6](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.5...auth/v0.9.6) (2024-09-30) - - -### Bug Fixes - -* **auth:** Make aws credentials provider retrieve fresh credentials ([#10920](https://github.com/googleapis/google-cloud-go/issues/10920)) ([250fbf8](https://github.com/googleapis/google-cloud-go/commit/250fbf87d858d865e399a241b7e537c4ff0c3dd8)) - -## [0.9.5](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.4...auth/v0.9.5) (2024-09-25) - - -### Bug Fixes - -* **auth:** Restore support for GOOGLE_CLOUD_UNIVERSE_DOMAIN env ([#10915](https://github.com/googleapis/google-cloud-go/issues/10915)) ([94caaaa](https://github.com/googleapis/google-cloud-go/commit/94caaaa061362d0e00ef6214afcc8a0a3e7ebfb2)) -* **auth:** Skip directpath credentials overwrite when it's not on GCE ([#10833](https://github.com/googleapis/google-cloud-go/issues/10833)) ([7e5e8d1](https://github.com/googleapis/google-cloud-go/commit/7e5e8d10b761b0a6e43e19a028528db361bc07b1)) -* **auth:** Use new context for non-blocking token refresh ([#10919](https://github.com/googleapis/google-cloud-go/issues/10919)) ([cf7102d](https://github.com/googleapis/google-cloud-go/commit/cf7102d33a21be1e5a9d47a49456b3a57c43b350)) - -## [0.9.4](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.3...auth/v0.9.4) (2024-09-11) - - -### Bug Fixes - -* **auth:** Enable self-signed JWT for non-GDU universe domain ([#10831](https://github.com/googleapis/google-cloud-go/issues/10831)) ([f9869f7](https://github.com/googleapis/google-cloud-go/commit/f9869f7903cfd34d1b97c25d0dc5669d2c5138e6)) - -## [0.9.3](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.2...auth/v0.9.3) (2024-09-03) - - -### Bug Fixes - -* **auth:** Choose quota project envvar over file when both present ([#10807](https://github.com/googleapis/google-cloud-go/issues/10807)) ([2d8dd77](https://github.com/googleapis/google-cloud-go/commit/2d8dd7700eff92d4b95027be55e26e1e7aa79181)), refs [#10804](https://github.com/googleapis/google-cloud-go/issues/10804) - -## [0.9.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.1...auth/v0.9.2) (2024-08-30) - - -### Bug Fixes - -* **auth:** Handle non-Transport DefaultTransport ([#10733](https://github.com/googleapis/google-cloud-go/issues/10733)) ([98d91dc](https://github.com/googleapis/google-cloud-go/commit/98d91dc8316b247498fab41ab35e57a0446fe556)), refs [#10742](https://github.com/googleapis/google-cloud-go/issues/10742) -* **auth:** Make sure quota option takes precedence over env/file ([#10797](https://github.com/googleapis/google-cloud-go/issues/10797)) ([f1b050d](https://github.com/googleapis/google-cloud-go/commit/f1b050d56d804b245cab048c2980d32b0eaceb4e)), refs [#10795](https://github.com/googleapis/google-cloud-go/issues/10795) - - -### Documentation - -* **auth:** Fix Go doc comment link ([#10751](https://github.com/googleapis/google-cloud-go/issues/10751)) ([015acfa](https://github.com/googleapis/google-cloud-go/commit/015acfab4d172650928bb1119bc2cd6307b9a437)) - -## [0.9.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.9.0...auth/v0.9.1) (2024-08-22) - - -### Bug Fixes - -* **auth:** Setting expireEarly to default when the value is 0 ([#10732](https://github.com/googleapis/google-cloud-go/issues/10732)) ([5e67869](https://github.com/googleapis/google-cloud-go/commit/5e67869a31e9e8ecb4eeebd2cfa11a761c3b1948)) - -## [0.9.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.8.1...auth/v0.9.0) (2024-08-16) - - -### Features - -* **auth:** Auth library can talk to S2A over mTLS ([#10634](https://github.com/googleapis/google-cloud-go/issues/10634)) ([5250a13](https://github.com/googleapis/google-cloud-go/commit/5250a13ec95b8d4eefbe0158f82857ff2189cb45)) - -## [0.8.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.8.0...auth/v0.8.1) (2024-08-13) - - -### Bug Fixes - -* **auth:** Make default client creation more lenient ([#10669](https://github.com/googleapis/google-cloud-go/issues/10669)) ([1afb9ee](https://github.com/googleapis/google-cloud-go/commit/1afb9ee1ee9de9810722800018133304a0ca34d1)), refs [#10638](https://github.com/googleapis/google-cloud-go/issues/10638) - -## [0.8.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.7.3...auth/v0.8.0) (2024-08-07) - - -### Features - -* **auth:** Adds support for X509 workload identity federation ([#10373](https://github.com/googleapis/google-cloud-go/issues/10373)) ([5d07505](https://github.com/googleapis/google-cloud-go/commit/5d075056cbe27bb1da4072a26070c41f8999eb9b)) - -## [0.7.3](https://github.com/googleapis/google-cloud-go/compare/auth/v0.7.2...auth/v0.7.3) (2024-08-01) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update dependencies ([257c40b](https://github.com/googleapis/google-cloud-go/commit/257c40bd6d7e59730017cf32bda8823d7a232758)) -* **auth:** Disable automatic universe domain check for MDS ([#10620](https://github.com/googleapis/google-cloud-go/issues/10620)) ([7cea5ed](https://github.com/googleapis/google-cloud-go/commit/7cea5edd5a0c1e6bca558696f5607879141910e8)) -* **auth:** Update dependencies ([257c40b](https://github.com/googleapis/google-cloud-go/commit/257c40bd6d7e59730017cf32bda8823d7a232758)) - -## [0.7.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.7.1...auth/v0.7.2) (2024-07-22) - - -### Bug Fixes - -* **auth:** Use default client for universe metadata lookup ([#10551](https://github.com/googleapis/google-cloud-go/issues/10551)) ([d9046fd](https://github.com/googleapis/google-cloud-go/commit/d9046fdd1435d1ce48f374806c1def4cb5ac6cd3)), refs [#10544](https://github.com/googleapis/google-cloud-go/issues/10544) - -## [0.7.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.7.0...auth/v0.7.1) (2024-07-10) - - -### Bug Fixes - -* **auth:** Bump google.golang.org/grpc@v1.64.1 ([8ecc4e9](https://github.com/googleapis/google-cloud-go/commit/8ecc4e9622e5bbe9b90384d5848ab816027226c5)) - -## [0.7.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.6.1...auth/v0.7.0) (2024-07-09) - - -### Features - -* **auth:** Add workload X509 cert provider as a default cert provider ([#10479](https://github.com/googleapis/google-cloud-go/issues/10479)) ([c51ee6c](https://github.com/googleapis/google-cloud-go/commit/c51ee6cf65ce05b4d501083e49d468c75ac1ea63)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Bump google.golang.org/api@v0.187.0 ([8fa9e39](https://github.com/googleapis/google-cloud-go/commit/8fa9e398e512fd8533fd49060371e61b5725a85b)) -* **auth:** Bump google.golang.org/api@v0.187.0 ([8fa9e39](https://github.com/googleapis/google-cloud-go/commit/8fa9e398e512fd8533fd49060371e61b5725a85b)) -* **auth:** Check len of slices, not non-nil ([#10483](https://github.com/googleapis/google-cloud-go/issues/10483)) ([0a966a1](https://github.com/googleapis/google-cloud-go/commit/0a966a183e5f0e811977216d736d875b7233e942)) - -## [0.6.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.6.0...auth/v0.6.1) (2024-07-01) - - -### Bug Fixes - -* **auth:** Support gRPC API keys ([#10460](https://github.com/googleapis/google-cloud-go/issues/10460)) ([daa6646](https://github.com/googleapis/google-cloud-go/commit/daa6646d2af5d7fb5b30489f4934c7db89868c7c)) -* **auth:** Update http and grpc transports to support token exchange over mTLS ([#10397](https://github.com/googleapis/google-cloud-go/issues/10397)) ([c6dfdcf](https://github.com/googleapis/google-cloud-go/commit/c6dfdcf893c3f971eba15026c12db0a960ae81f2)) - -## [0.6.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.5.2...auth/v0.6.0) (2024-06-25) - - -### Features - -* **auth:** Add non-blocking token refresh for compute MDS ([#10263](https://github.com/googleapis/google-cloud-go/issues/10263)) ([9ac350d](https://github.com/googleapis/google-cloud-go/commit/9ac350da11a49b8e2174d3fc5b1a5070fec78b4e)) - - -### Bug Fixes - -* **auth:** Return error if envvar detected file returns an error ([#10431](https://github.com/googleapis/google-cloud-go/issues/10431)) ([e52b9a7](https://github.com/googleapis/google-cloud-go/commit/e52b9a7c45468827f5d220ab00965191faeb9d05)) - -## [0.5.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.5.1...auth/v0.5.2) (2024-06-24) - - -### Bug Fixes - -* **auth:** Fetch initial token when CachedTokenProviderOptions.DisableAutoRefresh is true ([#10415](https://github.com/googleapis/google-cloud-go/issues/10415)) ([3266763](https://github.com/googleapis/google-cloud-go/commit/32667635ca2efad05cd8c087c004ca07d7406913)), refs [#10414](https://github.com/googleapis/google-cloud-go/issues/10414) - -## [0.5.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.5.0...auth/v0.5.1) (2024-05-31) - - -### Bug Fixes - -* **auth:** Pass through client to 2LO and 3LO flows ([#10290](https://github.com/googleapis/google-cloud-go/issues/10290)) ([685784e](https://github.com/googleapis/google-cloud-go/commit/685784ea84358c15e9214bdecb307d37aa3b6d2f)) - -## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.4.2...auth/v0.5.0) (2024-05-28) - - -### Features - -* **auth:** Adds X509 workload certificate provider ([#10233](https://github.com/googleapis/google-cloud-go/issues/10233)) ([17a9db7](https://github.com/googleapis/google-cloud-go/commit/17a9db73af35e3d1a7a25ac4fd1377a103de6150)) - -## [0.4.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.4.1...auth/v0.4.2) (2024-05-16) - - -### Bug Fixes - -* **auth:** Enable client certificates by default only for GDU ([#10151](https://github.com/googleapis/google-cloud-go/issues/10151)) ([7c52978](https://github.com/googleapis/google-cloud-go/commit/7c529786275a39b7e00525f7d5e7be0d963e9e15)) -* **auth:** Handle non-Transport DefaultTransport ([#10162](https://github.com/googleapis/google-cloud-go/issues/10162)) ([fa3bfdb](https://github.com/googleapis/google-cloud-go/commit/fa3bfdb23aaa45b34394a8b61e753b3587506782)), refs [#10159](https://github.com/googleapis/google-cloud-go/issues/10159) -* **auth:** Have refresh time match docs ([#10147](https://github.com/googleapis/google-cloud-go/issues/10147)) ([bcb5568](https://github.com/googleapis/google-cloud-go/commit/bcb5568c07a54dd3d2e869d15f502b0741a609e8)) -* **auth:** Update compute token fetching error with named prefix ([#10180](https://github.com/googleapis/google-cloud-go/issues/10180)) ([4573504](https://github.com/googleapis/google-cloud-go/commit/4573504828d2928bebedc875d87650ba227829ea)) - -## [0.4.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.4.0...auth/v0.4.1) (2024-05-09) - - -### Bug Fixes - -* **auth:** Don't try to detect default creds it opt configured ([#10143](https://github.com/googleapis/google-cloud-go/issues/10143)) ([804632e](https://github.com/googleapis/google-cloud-go/commit/804632e7c5b0b85ff522f7951114485e256eb5bc)) - -## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.3.0...auth/v0.4.0) (2024-05-07) - - -### Features - -* **auth:** Enable client certificates by default ([#10102](https://github.com/googleapis/google-cloud-go/issues/10102)) ([9013e52](https://github.com/googleapis/google-cloud-go/commit/9013e5200a6ec0f178ed91acb255481ffb073a2c)) - - -### Bug Fixes - -* **auth:** Get s2a logic up to date ([#10093](https://github.com/googleapis/google-cloud-go/issues/10093)) ([4fe9ae4](https://github.com/googleapis/google-cloud-go/commit/4fe9ae4b7101af2a5221d6d6b2e77b479305bb06)) - -## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.2...auth/v0.3.0) (2024-04-23) - - -### Features - -* **auth/httptransport:** Add ability to customize transport ([#10023](https://github.com/googleapis/google-cloud-go/issues/10023)) ([72c7f6b](https://github.com/googleapis/google-cloud-go/commit/72c7f6bbec3136cc7a62788fc7186bc33ef6c3b3)), refs [#9812](https://github.com/googleapis/google-cloud-go/issues/9812) [#9814](https://github.com/googleapis/google-cloud-go/issues/9814) - - -### Bug Fixes - -* **auth/credentials:** Error on bad file name if explicitly set ([#10018](https://github.com/googleapis/google-cloud-go/issues/10018)) ([55beaa9](https://github.com/googleapis/google-cloud-go/commit/55beaa993aaf052d8be39766afc6777c3c2a0bdd)), refs [#9809](https://github.com/googleapis/google-cloud-go/issues/9809) - -## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.1...auth/v0.2.2) (2024-04-19) - - -### Bug Fixes - -* **auth:** Add internal opt to skip validation on transports ([#9999](https://github.com/googleapis/google-cloud-go/issues/9999)) ([9e20ef8](https://github.com/googleapis/google-cloud-go/commit/9e20ef89f6287d6bd03b8697d5898dc43b4a77cf)), refs [#9823](https://github.com/googleapis/google-cloud-go/issues/9823) -* **auth:** Set secure flag for gRPC conn pools ([#10002](https://github.com/googleapis/google-cloud-go/issues/10002)) ([14e3956](https://github.com/googleapis/google-cloud-go/commit/14e3956dfd736399731b5ee8d9b178ae085cf7ba)), refs [#9833](https://github.com/googleapis/google-cloud-go/issues/9833) - -## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.2.0...auth/v0.2.1) (2024-04-18) - - -### Bug Fixes - -* **auth:** Default gRPC token type to Bearer if not set ([#9800](https://github.com/googleapis/google-cloud-go/issues/9800)) ([5284066](https://github.com/googleapis/google-cloud-go/commit/5284066670b6fe65d79089cfe0199c9660f87fc7)) - -## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/auth/v0.1.1...auth/v0.2.0) (2024-04-15) - -### Breaking Changes - -In the below mentioned commits there were a few large breaking changes since the -last release of the module. - -1. The `Credentials` type has been moved to the root of the module as it is - becoming the core abstraction for the whole module. -2. Because of the above mentioned change many functions that previously - returned a `TokenProvider` now return `Credentials`. Similarly, these - functions have been renamed to be more specific. -3. Most places that used to take an optional `TokenProvider` now accept - `Credentials`. You can make a `Credentials` from a `TokenProvider` using the - constructor found in the `auth` package. -4. The `detect` package has been renamed to `credentials`. With this change some - function signatures were also updated for better readability. -5. Derivative auth flows like `impersonate` and `downscope` have been moved to - be under the new `credentials` package. - -Although these changes are disruptive we think that they are for the best of the -long-term health of the module. We do not expect any more large breaking changes -like these in future revisions, even before 1.0.0. This version will be the -first version of the auth library that our client libraries start to use and -depend on. - -### Features - -* **auth/credentials/externalaccount:** Add default TokenURL ([#9700](https://github.com/googleapis/google-cloud-go/issues/9700)) ([81830e6](https://github.com/googleapis/google-cloud-go/commit/81830e6848ceefd055aa4d08f933d1154455a0f6)) -* **auth:** Add downscope.Options.UniverseDomain ([#9634](https://github.com/googleapis/google-cloud-go/issues/9634)) ([52cf7d7](https://github.com/googleapis/google-cloud-go/commit/52cf7d780853594291c4e34302d618299d1f5a1d)) -* **auth:** Add universe domain to grpctransport and httptransport ([#9663](https://github.com/googleapis/google-cloud-go/issues/9663)) ([67d353b](https://github.com/googleapis/google-cloud-go/commit/67d353beefe3b607c08c891876fbd95ab89e5fe3)), refs [#9670](https://github.com/googleapis/google-cloud-go/issues/9670) -* **auth:** Add UniverseDomain to DetectOptions ([#9536](https://github.com/googleapis/google-cloud-go/issues/9536)) ([3618d3f](https://github.com/googleapis/google-cloud-go/commit/3618d3f7061615c0e189f376c75abc201203b501)) -* **auth:** Make package externalaccount public ([#9633](https://github.com/googleapis/google-cloud-go/issues/9633)) ([a0978d8](https://github.com/googleapis/google-cloud-go/commit/a0978d8e96968399940ebd7d092539772bf9caac)) -* **auth:** Move credentials to base auth package ([#9590](https://github.com/googleapis/google-cloud-go/issues/9590)) ([1a04baf](https://github.com/googleapis/google-cloud-go/commit/1a04bafa83c27342b9308d785645e1e5423ea10d)) -* **auth:** Refactor public sigs to use Credentials ([#9603](https://github.com/googleapis/google-cloud-go/issues/9603)) ([69cb240](https://github.com/googleapis/google-cloud-go/commit/69cb240c530b1f7173a9af2555c19e9a1beb56c5)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update protobuf dep to v1.33.0 ([30b038d](https://github.com/googleapis/google-cloud-go/commit/30b038d8cac0b8cd5dd4761c87f3f298760dd33a)) -* **auth:** Fix uint32 conversion ([9221c7f](https://github.com/googleapis/google-cloud-go/commit/9221c7fa12cef9d5fb7ddc92f41f1d6204971c7b)) -* **auth:** Port sts expires fix ([#9618](https://github.com/googleapis/google-cloud-go/issues/9618)) ([7bec97b](https://github.com/googleapis/google-cloud-go/commit/7bec97b2f51ed3ac4f9b88bf100d301da3f5d1bd)) -* **auth:** Read universe_domain from all credentials files ([#9632](https://github.com/googleapis/google-cloud-go/issues/9632)) ([16efbb5](https://github.com/googleapis/google-cloud-go/commit/16efbb52e39ea4a319e5ee1e95c0e0305b6d9824)) -* **auth:** Remove content-type header from idms get requests ([#9508](https://github.com/googleapis/google-cloud-go/issues/9508)) ([8589f41](https://github.com/googleapis/google-cloud-go/commit/8589f41599d265d7c3d46a3d86c9fab2329cbdd9)) -* **auth:** Update protobuf dep to v1.33.0 ([30b038d](https://github.com/googleapis/google-cloud-go/commit/30b038d8cac0b8cd5dd4761c87f3f298760dd33a)) - -## [0.1.1](https://github.com/googleapis/google-cloud-go/compare/auth/v0.1.0...auth/v0.1.1) (2024-03-10) - - -### Bug Fixes - -* **auth/impersonate:** Properly send default detect params ([#9529](https://github.com/googleapis/google-cloud-go/issues/9529)) ([5b6b8be](https://github.com/googleapis/google-cloud-go/commit/5b6b8bef577f82707e51f5cc5d258d5bdf90218f)), refs [#9136](https://github.com/googleapis/google-cloud-go/issues/9136) -* **auth:** Update grpc-go to v1.56.3 ([343cea8](https://github.com/googleapis/google-cloud-go/commit/343cea8c43b1e31ae21ad50ad31d3b0b60143f8c)) -* **auth:** Update grpc-go to v1.59.0 ([81a97b0](https://github.com/googleapis/google-cloud-go/commit/81a97b06cb28b25432e4ece595c55a9857e960b7)) - -## 0.1.0 (2023-10-18) - - -### Features - -* **auth:** Add base auth package ([#8465](https://github.com/googleapis/google-cloud-go/issues/8465)) ([6a45f26](https://github.com/googleapis/google-cloud-go/commit/6a45f26b809b64edae21f312c18d4205f96b180e)) -* **auth:** Add cert support to httptransport ([#8569](https://github.com/googleapis/google-cloud-go/issues/8569)) ([37e3435](https://github.com/googleapis/google-cloud-go/commit/37e3435f8e98595eafab481bdfcb31a4c56fa993)) -* **auth:** Add Credentials.UniverseDomain() ([#8654](https://github.com/googleapis/google-cloud-go/issues/8654)) ([af0aa1e](https://github.com/googleapis/google-cloud-go/commit/af0aa1ed8015bc8fe0dd87a7549ae029107cbdb8)) -* **auth:** Add detect package ([#8491](https://github.com/googleapis/google-cloud-go/issues/8491)) ([d977419](https://github.com/googleapis/google-cloud-go/commit/d977419a3269f6acc193df77a2136a6eb4b4add7)) -* **auth:** Add downscope package ([#8532](https://github.com/googleapis/google-cloud-go/issues/8532)) ([dda9bff](https://github.com/googleapis/google-cloud-go/commit/dda9bff8ec70e6d104901b4105d13dcaa4e2404c)) -* **auth:** Add grpctransport package ([#8625](https://github.com/googleapis/google-cloud-go/issues/8625)) ([69a8347](https://github.com/googleapis/google-cloud-go/commit/69a83470bdcc7ed10c6c36d1abc3b7cfdb8a0ee5)) -* **auth:** Add httptransport package ([#8567](https://github.com/googleapis/google-cloud-go/issues/8567)) ([6898597](https://github.com/googleapis/google-cloud-go/commit/6898597d2ea95d630fcd00fd15c58c75ea843bff)) -* **auth:** Add idtoken package ([#8580](https://github.com/googleapis/google-cloud-go/issues/8580)) ([a79e693](https://github.com/googleapis/google-cloud-go/commit/a79e693e97e4e3e1c6742099af3dbc58866d88fe)) -* **auth:** Add impersonate package ([#8578](https://github.com/googleapis/google-cloud-go/issues/8578)) ([e29ba0c](https://github.com/googleapis/google-cloud-go/commit/e29ba0cb7bd3888ab9e808087027dc5a32474c04)) -* **auth:** Add support for external accounts in detect ([#8508](https://github.com/googleapis/google-cloud-go/issues/8508)) ([62210d5](https://github.com/googleapis/google-cloud-go/commit/62210d5d3e56e8e9f35db8e6ac0defec19582507)) -* **auth:** Port external account changes ([#8697](https://github.com/googleapis/google-cloud-go/issues/8697)) ([5823db5](https://github.com/googleapis/google-cloud-go/commit/5823db5d633069999b58b9131a7f9cd77e82c899)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) -* **auth:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) diff --git a/vendor/cloud.google.com/go/auth/LICENSE b/vendor/cloud.google.com/go/auth/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/auth/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/cloud.google.com/go/auth/README.md b/vendor/cloud.google.com/go/auth/README.md deleted file mode 100644 index 6fe4f0763e..0000000000 --- a/vendor/cloud.google.com/go/auth/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# Google Auth Library for Go - -[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/auth.svg)](https://pkg.go.dev/cloud.google.com/go/auth) - -## Install - -``` bash -go get cloud.google.com/go/auth@latest -``` - -## Usage - -The most common way this library is used is transitively, by default, from any -of our Go client libraries. - -### Notable use-cases - -- To create a credential directly please see examples in the - [credentials](https://pkg.go.dev/cloud.google.com/go/auth/credentials) - package. -- To create a authenticated HTTP client please see examples in the - [httptransport](https://pkg.go.dev/cloud.google.com/go/auth/httptransport) - package. -- To create a authenticated gRPC connection please see examples in the - [grpctransport](https://pkg.go.dev/cloud.google.com/go/auth/grpctransport) - package. -- To create an ID token please see examples in the - [idtoken](https://pkg.go.dev/cloud.google.com/go/auth/credentials/idtoken) - package. - -## Contributing - -Contributions are welcome. Please, see the -[CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) -document for details. - -Please note that this project is released with a Contributor Code of Conduct. -By participating in this project you agree to abide by its terms. -See [Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) -for more information. diff --git a/vendor/cloud.google.com/go/auth/auth.go b/vendor/cloud.google.com/go/auth/auth.go deleted file mode 100644 index fb24c43eb5..0000000000 --- a/vendor/cloud.google.com/go/auth/auth.go +++ /dev/null @@ -1,616 +0,0 @@ -// Copyright 2023 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 auth provides utilities for managing Google Cloud credentials, -// including functionality for creating, caching, and refreshing OAuth2 tokens. -// It offers customizable options for different OAuth2 flows, such as 2-legged -// (2LO) and 3-legged (3LO) OAuth, along with support for PKCE and automatic -// token management. -package auth - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - "net/url" - "strings" - "sync" - "time" - - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/jwt" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - // Parameter keys for AuthCodeURL method to support PKCE. - codeChallengeKey = "code_challenge" - codeChallengeMethodKey = "code_challenge_method" - - // Parameter key for Exchange method to support PKCE. - codeVerifierKey = "code_verifier" - - // 3 minutes and 45 seconds before expiration. The shortest MDS cache is 4 minutes, - // so we give it 15 seconds to refresh it's cache before attempting to refresh a token. - defaultExpiryDelta = 225 * time.Second - - universeDomainDefault = "googleapis.com" -) - -// tokenState represents different states for a [Token]. -type tokenState int - -const ( - // fresh indicates that the [Token] is valid. It is not expired or close to - // expired, or the token has no expiry. - fresh tokenState = iota - // stale indicates that the [Token] is close to expired, and should be - // refreshed. The token can be used normally. - stale - // invalid indicates that the [Token] is expired or invalid. The token - // cannot be used for a normal operation. - invalid -) - -var ( - defaultGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer" - defaultHeader = &jwt.Header{Algorithm: jwt.HeaderAlgRSA256, Type: jwt.HeaderType} - - // for testing - timeNow = time.Now -) - -// TokenProvider specifies an interface for anything that can return a token. -type TokenProvider interface { - // Token returns a Token or an error. - // The Token returned must be safe to use - // concurrently. - // The returned Token must not be modified. - // The context provided must be sent along to any requests that are made in - // the implementing code. - Token(context.Context) (*Token, error) -} - -// Token holds the credential token used to authorized requests. All fields are -// considered read-only. -type Token struct { - // Value is the token used to authorize requests. It is usually an access - // token but may be other types of tokens such as ID tokens in some flows. - Value string - // Type is the type of token Value is. If uninitialized, it should be - // assumed to be a "Bearer" token. - Type string - // Expiry is the time the token is set to expire. - Expiry time.Time - // Metadata may include, but is not limited to, the body of the token - // response returned by the server. - Metadata map[string]interface{} // TODO(codyoss): maybe make a method to flatten metadata to avoid []string for url.Values -} - -// IsValid reports that a [Token] is non-nil, has a [Token.Value], and has not -// expired. A token is considered expired if [Token.Expiry] has passed or will -// pass in the next 225 seconds. -func (t *Token) IsValid() bool { - return t.isValidWithEarlyExpiry(defaultExpiryDelta) -} - -// MetadataString is a convenience method for accessing string values in the -// token's metadata. Returns an empty string if the metadata is nil or the value -// for the given key cannot be cast to a string. -func (t *Token) MetadataString(k string) string { - if t.Metadata == nil { - return "" - } - s, ok := t.Metadata[k].(string) - if !ok { - return "" - } - return s -} - -func (t *Token) isValidWithEarlyExpiry(earlyExpiry time.Duration) bool { - if t.isEmpty() { - return false - } - if t.Expiry.IsZero() { - return true - } - return !t.Expiry.Round(0).Add(-earlyExpiry).Before(timeNow()) -} - -func (t *Token) isEmpty() bool { - return t == nil || t.Value == "" -} - -// Credentials holds Google credentials, including -// [Application Default Credentials]. -// -// [Application Default Credentials]: https://developers.google.com/accounts/docs/application-default-credentials -type Credentials struct { - json []byte - projectID CredentialsPropertyProvider - quotaProjectID CredentialsPropertyProvider - // universeDomain is the default service domain for a given Cloud universe. - universeDomain CredentialsPropertyProvider - - TokenProvider -} - -// JSON returns the bytes associated with the the file used to source -// credentials if one was used. -func (c *Credentials) JSON() []byte { - return c.json -} - -// ProjectID returns the associated project ID from the underlying file or -// environment. -func (c *Credentials) ProjectID(ctx context.Context) (string, error) { - if c.projectID == nil { - return internal.GetProjectID(c.json, ""), nil - } - v, err := c.projectID.GetProperty(ctx) - if err != nil { - return "", err - } - return internal.GetProjectID(c.json, v), nil -} - -// QuotaProjectID returns the associated quota project ID from the underlying -// file or environment. -func (c *Credentials) QuotaProjectID(ctx context.Context) (string, error) { - if c.quotaProjectID == nil { - return internal.GetQuotaProject(c.json, ""), nil - } - v, err := c.quotaProjectID.GetProperty(ctx) - if err != nil { - return "", err - } - return internal.GetQuotaProject(c.json, v), nil -} - -// UniverseDomain returns the default service domain for a given Cloud universe. -// The default value is "googleapis.com". -func (c *Credentials) UniverseDomain(ctx context.Context) (string, error) { - if c.universeDomain == nil { - return universeDomainDefault, nil - } - v, err := c.universeDomain.GetProperty(ctx) - if err != nil { - return "", err - } - if v == "" { - return universeDomainDefault, nil - } - return v, err -} - -// CredentialsPropertyProvider provides an implementation to fetch a property -// value for [Credentials]. -type CredentialsPropertyProvider interface { - GetProperty(context.Context) (string, error) -} - -// CredentialsPropertyFunc is a type adapter to allow the use of ordinary -// functions as a [CredentialsPropertyProvider]. -type CredentialsPropertyFunc func(context.Context) (string, error) - -// GetProperty loads the properly value provided the given context. -func (p CredentialsPropertyFunc) GetProperty(ctx context.Context) (string, error) { - return p(ctx) -} - -// CredentialsOptions are used to configure [Credentials]. -type CredentialsOptions struct { - // TokenProvider is a means of sourcing a token for the credentials. Required. - TokenProvider TokenProvider - // JSON is the raw contents of the credentials file if sourced from a file. - JSON []byte - // ProjectIDProvider resolves the project ID associated with the - // credentials. - ProjectIDProvider CredentialsPropertyProvider - // QuotaProjectIDProvider resolves the quota project ID associated with the - // credentials. - QuotaProjectIDProvider CredentialsPropertyProvider - // UniverseDomainProvider resolves the universe domain with the credentials. - UniverseDomainProvider CredentialsPropertyProvider -} - -// NewCredentials returns new [Credentials] from the provided options. -func NewCredentials(opts *CredentialsOptions) *Credentials { - creds := &Credentials{ - TokenProvider: opts.TokenProvider, - json: opts.JSON, - projectID: opts.ProjectIDProvider, - quotaProjectID: opts.QuotaProjectIDProvider, - universeDomain: opts.UniverseDomainProvider, - } - - return creds -} - -// CachedTokenProviderOptions provides options for configuring a cached -// [TokenProvider]. -type CachedTokenProviderOptions struct { - // DisableAutoRefresh makes the TokenProvider always return the same token, - // even if it is expired. The default is false. Optional. - DisableAutoRefresh bool - // ExpireEarly configures the amount of time before a token expires, that it - // should be refreshed. If unset, the default value is 3 minutes and 45 - // seconds. Optional. - ExpireEarly time.Duration - // DisableAsyncRefresh configures a synchronous workflow that refreshes - // tokens in a blocking manner. The default is false. Optional. - DisableAsyncRefresh bool -} - -func (ctpo *CachedTokenProviderOptions) autoRefresh() bool { - if ctpo == nil { - return true - } - return !ctpo.DisableAutoRefresh -} - -func (ctpo *CachedTokenProviderOptions) expireEarly() time.Duration { - if ctpo == nil || ctpo.ExpireEarly == 0 { - return defaultExpiryDelta - } - return ctpo.ExpireEarly -} - -func (ctpo *CachedTokenProviderOptions) blockingRefresh() bool { - if ctpo == nil { - return false - } - return ctpo.DisableAsyncRefresh -} - -// NewCachedTokenProvider wraps a [TokenProvider] to cache the tokens returned -// by the underlying provider. By default it will refresh tokens asynchronously -// a few minutes before they expire. -func NewCachedTokenProvider(tp TokenProvider, opts *CachedTokenProviderOptions) TokenProvider { - if ctp, ok := tp.(*cachedTokenProvider); ok { - return ctp - } - return &cachedTokenProvider{ - tp: tp, - autoRefresh: opts.autoRefresh(), - expireEarly: opts.expireEarly(), - blockingRefresh: opts.blockingRefresh(), - } -} - -type cachedTokenProvider struct { - tp TokenProvider - autoRefresh bool - expireEarly time.Duration - blockingRefresh bool - - mu sync.Mutex - cachedToken *Token - // isRefreshRunning ensures that the non-blocking refresh will only be - // attempted once, even if multiple callers enter the Token method. - isRefreshRunning bool - // isRefreshErr ensures that the non-blocking refresh will only be attempted - // once per refresh window if an error is encountered. - isRefreshErr bool -} - -func (c *cachedTokenProvider) Token(ctx context.Context) (*Token, error) { - if c.blockingRefresh { - return c.tokenBlocking(ctx) - } - return c.tokenNonBlocking(ctx) -} - -func (c *cachedTokenProvider) tokenNonBlocking(ctx context.Context) (*Token, error) { - switch c.tokenState() { - case fresh: - c.mu.Lock() - defer c.mu.Unlock() - return c.cachedToken, nil - case stale: - // Call tokenAsync with a new Context because the user-provided context - // may have a short timeout incompatible with async token refresh. - c.tokenAsync(context.Background()) - // Return the stale token immediately to not block customer requests to Cloud services. - c.mu.Lock() - defer c.mu.Unlock() - return c.cachedToken, nil - default: // invalid - return c.tokenBlocking(ctx) - } -} - -// tokenState reports the token's validity. -func (c *cachedTokenProvider) tokenState() tokenState { - c.mu.Lock() - defer c.mu.Unlock() - t := c.cachedToken - now := timeNow() - if t == nil || t.Value == "" { - return invalid - } else if t.Expiry.IsZero() { - return fresh - } else if now.After(t.Expiry.Round(0)) { - return invalid - } else if now.After(t.Expiry.Round(0).Add(-c.expireEarly)) { - return stale - } - return fresh -} - -// tokenAsync uses a bool to ensure that only one non-blocking token refresh -// happens at a time, even if multiple callers have entered this function -// concurrently. This avoids creating an arbitrary number of concurrent -// goroutines. Retries should be attempted and managed within the Token method. -// If the refresh attempt fails, no further attempts are made until the refresh -// window expires and the token enters the invalid state, at which point the -// blocking call to Token should likely return the same error on the main goroutine. -func (c *cachedTokenProvider) tokenAsync(ctx context.Context) { - fn := func() { - t, err := c.tp.Token(ctx) - c.mu.Lock() - defer c.mu.Unlock() - c.isRefreshRunning = false - if err != nil { - // Discard errors from the non-blocking refresh, but prevent further - // attempts. - c.isRefreshErr = true - return - } - c.cachedToken = t - } - c.mu.Lock() - defer c.mu.Unlock() - if !c.isRefreshRunning && !c.isRefreshErr { - c.isRefreshRunning = true - go fn() - } -} - -func (c *cachedTokenProvider) tokenBlocking(ctx context.Context) (*Token, error) { - c.mu.Lock() - defer c.mu.Unlock() - c.isRefreshErr = false - if c.cachedToken.IsValid() || (!c.autoRefresh && !c.cachedToken.isEmpty()) { - return c.cachedToken, nil - } - t, err := c.tp.Token(ctx) - if err != nil { - return nil, err - } - c.cachedToken = t - return t, nil -} - -// Error is a error associated with retrieving a [Token]. It can hold useful -// additional details for debugging. -type Error struct { - // Response is the HTTP response associated with error. The body will always - // be already closed and consumed. - Response *http.Response - // Body is the HTTP response body. - Body []byte - // Err is the underlying wrapped error. - Err error - - // code returned in the token response - code string - // description returned in the token response - description string - // uri returned in the token response - uri string -} - -func (e *Error) Error() string { - if e.code != "" { - s := fmt.Sprintf("auth: %q", e.code) - if e.description != "" { - s += fmt.Sprintf(" %q", e.description) - } - if e.uri != "" { - s += fmt.Sprintf(" %q", e.uri) - } - return s - } - return fmt.Sprintf("auth: cannot fetch token: %v\nResponse: %s", e.Response.StatusCode, e.Body) -} - -// Temporary returns true if the error is considered temporary and may be able -// to be retried. -func (e *Error) Temporary() bool { - if e.Response == nil { - return false - } - sc := e.Response.StatusCode - return sc == http.StatusInternalServerError || sc == http.StatusServiceUnavailable || sc == http.StatusRequestTimeout || sc == http.StatusTooManyRequests -} - -func (e *Error) Unwrap() error { - return e.Err -} - -// Style describes how the token endpoint wants to receive the ClientID and -// ClientSecret. -type Style int - -const ( - // StyleUnknown means the value has not been initiated. Sending this in - // a request will cause the token exchange to fail. - StyleUnknown Style = iota - // StyleInParams sends client info in the body of a POST request. - StyleInParams - // StyleInHeader sends client info using Basic Authorization header. - StyleInHeader -) - -// Options2LO is the configuration settings for doing a 2-legged JWT OAuth2 flow. -type Options2LO struct { - // Email is the OAuth2 client ID. This value is set as the "iss" in the - // JWT. - Email string - // PrivateKey contains the contents of an RSA private key or the - // contents of a PEM file that contains a private key. It is used to sign - // the JWT created. - PrivateKey []byte - // TokenURL is th URL the JWT is sent to. Required. - TokenURL string - // PrivateKeyID is the ID of the key used to sign the JWT. It is used as the - // "kid" in the JWT header. Optional. - PrivateKeyID string - // Subject is the used for to impersonate a user. It is used as the "sub" in - // the JWT.m Optional. - Subject string - // Scopes specifies requested permissions for the token. Optional. - Scopes []string - // Expires specifies the lifetime of the token. Optional. - Expires time.Duration - // Audience specifies the "aud" in the JWT. Optional. - Audience string - // PrivateClaims allows specifying any custom claims for the JWT. Optional. - PrivateClaims map[string]interface{} - - // Client is the client to be used to make the underlying token requests. - // Optional. - Client *http.Client - // UseIDToken requests that the token returned be an ID token if one is - // returned from the server. Optional. - UseIDToken bool - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger -} - -func (o *Options2LO) client() *http.Client { - if o.Client != nil { - return o.Client - } - return internal.DefaultClient() -} - -func (o *Options2LO) validate() error { - if o == nil { - return errors.New("auth: options must be provided") - } - if o.Email == "" { - return errors.New("auth: email must be provided") - } - if len(o.PrivateKey) == 0 { - return errors.New("auth: private key must be provided") - } - if o.TokenURL == "" { - return errors.New("auth: token URL must be provided") - } - return nil -} - -// New2LOTokenProvider returns a [TokenProvider] from the provided options. -func New2LOTokenProvider(opts *Options2LO) (TokenProvider, error) { - if err := opts.validate(); err != nil { - return nil, err - } - return tokenProvider2LO{opts: opts, Client: opts.client(), logger: internallog.New(opts.Logger)}, nil -} - -type tokenProvider2LO struct { - opts *Options2LO - Client *http.Client - logger *slog.Logger -} - -func (tp tokenProvider2LO) Token(ctx context.Context) (*Token, error) { - pk, err := internal.ParseKey(tp.opts.PrivateKey) - if err != nil { - return nil, err - } - claimSet := &jwt.Claims{ - Iss: tp.opts.Email, - Scope: strings.Join(tp.opts.Scopes, " "), - Aud: tp.opts.TokenURL, - AdditionalClaims: tp.opts.PrivateClaims, - Sub: tp.opts.Subject, - } - if t := tp.opts.Expires; t > 0 { - claimSet.Exp = time.Now().Add(t).Unix() - } - if aud := tp.opts.Audience; aud != "" { - claimSet.Aud = aud - } - h := *defaultHeader - h.KeyID = tp.opts.PrivateKeyID - payload, err := jwt.EncodeJWS(&h, claimSet, pk) - if err != nil { - return nil, err - } - v := url.Values{} - v.Set("grant_type", defaultGrantType) - v.Set("assertion", payload) - req, err := http.NewRequestWithContext(ctx, "POST", tp.opts.TokenURL, strings.NewReader(v.Encode())) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - tp.logger.DebugContext(ctx, "2LO token request", "request", internallog.HTTPRequest(req, []byte(v.Encode()))) - resp, body, err := internal.DoRequest(tp.Client, req) - if err != nil { - return nil, fmt.Errorf("auth: cannot fetch token: %w", err) - } - tp.logger.DebugContext(ctx, "2LO token response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < http.StatusOK || c >= http.StatusMultipleChoices { - return nil, &Error{ - Response: resp, - Body: body, - } - } - // tokenRes is the JSON response body. - var tokenRes struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - IDToken string `json:"id_token"` - ExpiresIn int64 `json:"expires_in"` - } - if err := json.Unmarshal(body, &tokenRes); err != nil { - return nil, fmt.Errorf("auth: cannot fetch token: %w", err) - } - token := &Token{ - Value: tokenRes.AccessToken, - Type: tokenRes.TokenType, - } - token.Metadata = make(map[string]interface{}) - json.Unmarshal(body, &token.Metadata) // no error checks for optional fields - - if secs := tokenRes.ExpiresIn; secs > 0 { - token.Expiry = time.Now().Add(time.Duration(secs) * time.Second) - } - if v := tokenRes.IDToken; v != "" { - // decode returned id token to get expiry - claimSet, err := jwt.DecodeJWS(v) - if err != nil { - return nil, fmt.Errorf("auth: error decoding JWT token: %w", err) - } - token.Expiry = time.Unix(claimSet.Exp, 0) - } - if tp.opts.UseIDToken { - if tokenRes.IDToken == "" { - return nil, fmt.Errorf("auth: response doesn't have JWT token") - } - token.Value = tokenRes.IDToken - } - return token, nil -} diff --git a/vendor/cloud.google.com/go/auth/credentials/compute.go b/vendor/cloud.google.com/go/auth/credentials/compute.go deleted file mode 100644 index e4a8078f8b..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/compute.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2023 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 credentials - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "net/url" - "strings" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/compute/metadata" -) - -var ( - computeTokenMetadata = map[string]interface{}{ - "auth.google.tokenSource": "compute-metadata", - "auth.google.serviceAccount": "default", - } - computeTokenURI = "instance/service-accounts/default/token" -) - -// computeTokenProvider creates a [cloud.google.com/go/auth.TokenProvider] that -// uses the metadata service to retrieve tokens. -func computeTokenProvider(opts *DetectOptions, client *metadata.Client) auth.TokenProvider { - return auth.NewCachedTokenProvider(&computeProvider{ - scopes: opts.Scopes, - client: client, - tokenBindingType: opts.TokenBindingType, - }, &auth.CachedTokenProviderOptions{ - ExpireEarly: opts.EarlyTokenRefresh, - DisableAsyncRefresh: opts.DisableAsyncRefresh, - }) -} - -// computeProvider fetches tokens from the google cloud metadata service. -type computeProvider struct { - scopes []string - client *metadata.Client - tokenBindingType TokenBindingType -} - -type metadataTokenResp struct { - AccessToken string `json:"access_token"` - ExpiresInSec int `json:"expires_in"` - TokenType string `json:"token_type"` -} - -func (cs *computeProvider) Token(ctx context.Context) (*auth.Token, error) { - tokenURI, err := url.Parse(computeTokenURI) - if err != nil { - return nil, err - } - hasScopes := len(cs.scopes) > 0 - if hasScopes || cs.tokenBindingType != NoBinding { - v := url.Values{} - if hasScopes { - v.Set("scopes", strings.Join(cs.scopes, ",")) - } - switch cs.tokenBindingType { - case MTLSHardBinding: - v.Set("transport", "mtls") - v.Set("binding-enforcement", "on") - case ALTSHardBinding: - v.Set("transport", "alts") - } - tokenURI.RawQuery = v.Encode() - } - tokenJSON, err := cs.client.GetWithContext(ctx, tokenURI.String()) - if err != nil { - return nil, fmt.Errorf("credentials: cannot fetch token: %w", err) - } - var res metadataTokenResp - if err := json.NewDecoder(strings.NewReader(tokenJSON)).Decode(&res); err != nil { - return nil, fmt.Errorf("credentials: invalid token JSON from metadata: %w", err) - } - if res.ExpiresInSec == 0 || res.AccessToken == "" { - return nil, errors.New("credentials: incomplete token received from metadata") - } - return &auth.Token{ - Value: res.AccessToken, - Type: res.TokenType, - Expiry: time.Now().Add(time.Duration(res.ExpiresInSec) * time.Second), - Metadata: computeTokenMetadata, - }, nil - -} diff --git a/vendor/cloud.google.com/go/auth/credentials/detect.go b/vendor/cloud.google.com/go/auth/credentials/detect.go deleted file mode 100644 index ad3267eb28..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/detect.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2023 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 credentials - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - "os" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" - "cloud.google.com/go/compute/metadata" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - // jwtTokenURL is Google's OAuth 2.0 token URL to use with the JWT(2LO) flow. - jwtTokenURL = "https://oauth2.googleapis.com/token" - - // Google's OAuth 2.0 default endpoints. - googleAuthURL = "https://accounts.google.com/o/oauth2/auth" - googleTokenURL = "https://oauth2.googleapis.com/token" - - // GoogleMTLSTokenURL is Google's default OAuth2.0 mTLS endpoint. - GoogleMTLSTokenURL = "https://oauth2.mtls.googleapis.com/token" - - // Help on default credentials - adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc" -) - -var ( - // for testing - allowOnGCECheck = true -) - -// TokenBindingType specifies the type of binding used when requesting a token -// whether to request a hard-bound token using mTLS or an instance identity -// bound token using ALTS. -type TokenBindingType int - -const ( - // NoBinding specifies that requested tokens are not required to have a - // binding. This is the default option. - NoBinding TokenBindingType = iota - // MTLSHardBinding specifies that a hard-bound token should be requested - // using an mTLS with S2A channel. - MTLSHardBinding - // ALTSHardBinding specifies that an instance identity bound token should - // be requested using an ALTS channel. - ALTSHardBinding -) - -// OnGCE reports whether this process is running in Google Cloud. -func OnGCE() bool { - // TODO(codyoss): once all libs use this auth lib move metadata check here - return allowOnGCECheck && metadata.OnGCE() -} - -// DetectDefault searches for "Application Default Credentials" and returns -// a credential based on the [DetectOptions] provided. -// -// It looks for credentials in the following places, preferring the first -// location found: -// -// - A JSON file whose path is specified by the GOOGLE_APPLICATION_CREDENTIALS -// environment variable. For workload identity federation, refer to -// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation -// on how to generate the JSON configuration file for on-prem/non-Google -// cloud platforms. -// - A JSON file in a location known to the gcloud command-line tool. On -// Windows, this is %APPDATA%/gcloud/application_default_credentials.json. On -// other systems, $HOME/.config/gcloud/application_default_credentials.json. -// - On Google Compute Engine, Google App Engine standard second generation -// runtimes, and Google App Engine flexible environment, it fetches -// credentials from the metadata server. -func DetectDefault(opts *DetectOptions) (*auth.Credentials, error) { - if err := opts.validate(); err != nil { - return nil, err - } - if len(opts.CredentialsJSON) > 0 { - return readCredentialsFileJSON(opts.CredentialsJSON, opts) - } - if opts.CredentialsFile != "" { - return readCredentialsFile(opts.CredentialsFile, opts) - } - if filename := os.Getenv(credsfile.GoogleAppCredsEnvVar); filename != "" { - creds, err := readCredentialsFile(filename, opts) - if err != nil { - return nil, err - } - return creds, nil - } - - fileName := credsfile.GetWellKnownFileName() - if b, err := os.ReadFile(fileName); err == nil { - return readCredentialsFileJSON(b, opts) - } - - if OnGCE() { - metadataClient := metadata.NewWithOptions(&metadata.Options{ - Logger: opts.logger(), - UseDefaultClient: true, - }) - return auth.NewCredentials(&auth.CredentialsOptions{ - TokenProvider: computeTokenProvider(opts, metadataClient), - ProjectIDProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) { - return metadataClient.ProjectIDWithContext(ctx) - }), - UniverseDomainProvider: &internal.ComputeUniverseDomainProvider{ - MetadataClient: metadataClient, - }, - }), nil - } - - return nil, fmt.Errorf("credentials: could not find default credentials. See %v for more information", adcSetupURL) -} - -// DetectOptions provides configuration for [DetectDefault]. -type DetectOptions struct { - // Scopes that credentials tokens should have. Example: - // https://www.googleapis.com/auth/cloud-platform. Required if Audience is - // not provided. - Scopes []string - // TokenBindingType specifies the type of binding used when requesting a - // token whether to request a hard-bound token using mTLS or an instance - // identity bound token using ALTS. Optional. - TokenBindingType TokenBindingType - // Audience that credentials tokens should have. Only applicable for 2LO - // flows with service accounts. If specified, scopes should not be provided. - Audience string - // Subject is the user email used for [domain wide delegation](https://developers.google.com/identity/protocols/oauth2/service-account#delegatingauthority). - // Optional. - Subject string - // EarlyTokenRefresh configures how early before a token expires that it - // should be refreshed. Once the token’s time until expiration has entered - // this refresh window the token is considered valid but stale. If unset, - // the default value is 3 minutes and 45 seconds. Optional. - EarlyTokenRefresh time.Duration - // DisableAsyncRefresh configures a synchronous workflow that refreshes - // stale tokens while blocking. The default is false. Optional. - DisableAsyncRefresh bool - // AuthHandlerOptions configures an authorization handler and other options - // for 3LO flows. It is required, and only used, for client credential - // flows. - AuthHandlerOptions *auth.AuthorizationHandlerOptions - // TokenURL allows to set the token endpoint for user credential flows. If - // unset the default value is: https://oauth2.googleapis.com/token. - // Optional. - TokenURL string - // STSAudience is the audience sent to when retrieving an STS token. - // Currently this only used for GDCH auth flow, for which it is required. - STSAudience string - // CredentialsFile overrides detection logic and sources a credential file - // from the provided filepath. If provided, CredentialsJSON must not be. - // Optional. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - CredentialsFile string - // CredentialsJSON overrides detection logic and uses the JSON bytes as the - // source for the credential. If provided, CredentialsFile must not be. - // Optional. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - CredentialsJSON []byte - // UseSelfSignedJWT directs service account based credentials to create a - // self-signed JWT with the private key found in the file, skipping any - // network requests that would normally be made. Optional. - UseSelfSignedJWT bool - // Client configures the underlying client used to make network requests - // when fetching tokens. Optional. - Client *http.Client - // UniverseDomain is the default service domain for a given Cloud universe. - // The default value is "googleapis.com". This option is ignored for - // authentication flows that do not support universe domain. Optional. - UniverseDomain string - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger -} - -func (o *DetectOptions) validate() error { - if o == nil { - return errors.New("credentials: options must be provided") - } - if len(o.Scopes) > 0 && o.Audience != "" { - return errors.New("credentials: both scopes and audience were provided") - } - if len(o.CredentialsJSON) > 0 && o.CredentialsFile != "" { - return errors.New("credentials: both credentials file and JSON were provided") - } - return nil -} - -func (o *DetectOptions) tokenURL() string { - if o.TokenURL != "" { - return o.TokenURL - } - return googleTokenURL -} - -func (o *DetectOptions) scopes() []string { - scopes := make([]string, len(o.Scopes)) - copy(scopes, o.Scopes) - return scopes -} - -func (o *DetectOptions) client() *http.Client { - if o.Client != nil { - return o.Client - } - return internal.DefaultClient() -} - -func (o *DetectOptions) logger() *slog.Logger { - return internallog.New(o.Logger) -} - -func readCredentialsFile(filename string, opts *DetectOptions) (*auth.Credentials, error) { - b, err := os.ReadFile(filename) - if err != nil { - return nil, err - } - return readCredentialsFileJSON(b, opts) -} - -func readCredentialsFileJSON(b []byte, opts *DetectOptions) (*auth.Credentials, error) { - // attempt to parse jsonData as a Google Developers Console client_credentials.json. - config := clientCredConfigFromJSON(b, opts) - if config != nil { - if config.AuthHandlerOpts == nil { - return nil, errors.New("credentials: auth handler must be specified for this credential filetype") - } - tp, err := auth.New3LOTokenProvider(config) - if err != nil { - return nil, err - } - return auth.NewCredentials(&auth.CredentialsOptions{ - TokenProvider: tp, - JSON: b, - }), nil - } - return fileCredentials(b, opts) -} - -func clientCredConfigFromJSON(b []byte, opts *DetectOptions) *auth.Options3LO { - var creds credsfile.ClientCredentialsFile - var c *credsfile.Config3LO - if err := json.Unmarshal(b, &creds); err != nil { - return nil - } - switch { - case creds.Web != nil: - c = creds.Web - case creds.Installed != nil: - c = creds.Installed - default: - return nil - } - if len(c.RedirectURIs) < 1 { - return nil - } - var handleOpts *auth.AuthorizationHandlerOptions - if opts.AuthHandlerOptions != nil { - handleOpts = &auth.AuthorizationHandlerOptions{ - Handler: opts.AuthHandlerOptions.Handler, - State: opts.AuthHandlerOptions.State, - PKCEOpts: opts.AuthHandlerOptions.PKCEOpts, - } - } - return &auth.Options3LO{ - ClientID: c.ClientID, - ClientSecret: c.ClientSecret, - RedirectURL: c.RedirectURIs[0], - Scopes: opts.scopes(), - AuthURL: c.AuthURI, - TokenURL: c.TokenURI, - Client: opts.client(), - Logger: opts.logger(), - EarlyTokenExpiry: opts.EarlyTokenRefresh, - AuthHandlerOpts: handleOpts, - // TODO(codyoss): refactor this out. We need to add in auto-detection - // for this use case. - AuthStyle: auth.StyleInParams, - } -} diff --git a/vendor/cloud.google.com/go/auth/credentials/doc.go b/vendor/cloud.google.com/go/auth/credentials/doc.go deleted file mode 100644 index 1dbb2866b9..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2023 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 credentials provides support for making OAuth2 authorized and -// authenticated HTTP requests to Google APIs. It supports the Web server flow, -// client-side credentials, service accounts, Google Compute Engine service -// accounts, Google App Engine service accounts and workload identity federation -// from non-Google cloud platforms. -// -// A brief overview of the package follows. For more information, please read -// https://developers.google.com/accounts/docs/OAuth2 -// and -// https://developers.google.com/accounts/docs/application-default-credentials. -// For more information on using workload identity federation, refer to -// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation. -// -// # Credentials -// -// The [cloud.google.com/go/auth.Credentials] type represents Google -// credentials, including Application Default Credentials. -// -// Use [DetectDefault] to obtain Application Default Credentials. -// -// Application Default Credentials support workload identity federation to -// access Google Cloud resources from non-Google Cloud platforms including Amazon -// Web Services (AWS), Microsoft Azure or any identity provider that supports -// OpenID Connect (OIDC). Workload identity federation is recommended for -// non-Google Cloud environments as it avoids the need to download, manage, and -// store service account private keys locally. -// -// # Workforce Identity Federation -// -// For more information on this feature see [cloud.google.com/go/auth/credentials/externalaccount]. -package credentials diff --git a/vendor/cloud.google.com/go/auth/credentials/filetypes.go b/vendor/cloud.google.com/go/auth/credentials/filetypes.go deleted file mode 100644 index 8605e52eec..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/filetypes.go +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2023 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 credentials - -import ( - "errors" - "fmt" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials/internal/externalaccount" - "cloud.google.com/go/auth/credentials/internal/externalaccountuser" - "cloud.google.com/go/auth/credentials/internal/gdch" - "cloud.google.com/go/auth/credentials/internal/impersonate" - internalauth "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" -) - -func fileCredentials(b []byte, opts *DetectOptions) (*auth.Credentials, error) { - fileType, err := credsfile.ParseFileType(b) - if err != nil { - return nil, err - } - - var projectID, universeDomain string - var tp auth.TokenProvider - switch fileType { - case credsfile.UnknownCredType: - return nil, errors.New("credentials: unsupported unidentified file type") - case credsfile.ServiceAccountKey: - f, err := credsfile.ParseServiceAccount(b) - if err != nil { - return nil, err - } - tp, err = handleServiceAccount(f, opts) - if err != nil { - return nil, err - } - projectID = f.ProjectID - universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.UserCredentialsKey: - f, err := credsfile.ParseUserCredentials(b) - if err != nil { - return nil, err - } - tp, err = handleUserCredential(f, opts) - if err != nil { - return nil, err - } - universeDomain = f.UniverseDomain - case credsfile.ExternalAccountKey: - f, err := credsfile.ParseExternalAccount(b) - if err != nil { - return nil, err - } - tp, err = handleExternalAccount(f, opts) - if err != nil { - return nil, err - } - universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.ExternalAccountAuthorizedUserKey: - f, err := credsfile.ParseExternalAccountAuthorizedUser(b) - if err != nil { - return nil, err - } - tp, err = handleExternalAccountAuthorizedUser(f, opts) - if err != nil { - return nil, err - } - universeDomain = f.UniverseDomain - case credsfile.ImpersonatedServiceAccountKey: - f, err := credsfile.ParseImpersonatedServiceAccount(b) - if err != nil { - return nil, err - } - tp, err = handleImpersonatedServiceAccount(f, opts) - if err != nil { - return nil, err - } - universeDomain = resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - case credsfile.GDCHServiceAccountKey: - f, err := credsfile.ParseGDCHServiceAccount(b) - if err != nil { - return nil, err - } - tp, err = handleGDCHServiceAccount(f, opts) - if err != nil { - return nil, err - } - projectID = f.Project - universeDomain = f.UniverseDomain - default: - return nil, fmt.Errorf("credentials: unsupported filetype %q", fileType) - } - return auth.NewCredentials(&auth.CredentialsOptions{ - TokenProvider: auth.NewCachedTokenProvider(tp, &auth.CachedTokenProviderOptions{ - ExpireEarly: opts.EarlyTokenRefresh, - }), - JSON: b, - ProjectIDProvider: internalauth.StaticCredentialsProperty(projectID), - // TODO(codyoss): only set quota project here if there was a user override - UniverseDomainProvider: internalauth.StaticCredentialsProperty(universeDomain), - }), nil -} - -// resolveUniverseDomain returns optsUniverseDomain if non-empty, in order to -// support configuring universe-specific credentials in code. Auth flows -// unsupported for universe domain should not use this func, but should instead -// simply set the file universe domain on the credentials. -func resolveUniverseDomain(optsUniverseDomain, fileUniverseDomain string) string { - if optsUniverseDomain != "" { - return optsUniverseDomain - } - return fileUniverseDomain -} - -func handleServiceAccount(f *credsfile.ServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) { - ud := resolveUniverseDomain(opts.UniverseDomain, f.UniverseDomain) - if opts.UseSelfSignedJWT { - return configureSelfSignedJWT(f, opts) - } else if ud != "" && ud != internalauth.DefaultUniverseDomain { - // For non-GDU universe domains, token exchange is impossible and services - // must support self-signed JWTs. - opts.UseSelfSignedJWT = true - return configureSelfSignedJWT(f, opts) - } - opts2LO := &auth.Options2LO{ - Email: f.ClientEmail, - PrivateKey: []byte(f.PrivateKey), - PrivateKeyID: f.PrivateKeyID, - Scopes: opts.scopes(), - TokenURL: f.TokenURL, - Subject: opts.Subject, - Client: opts.client(), - Logger: opts.logger(), - } - if opts2LO.TokenURL == "" { - opts2LO.TokenURL = jwtTokenURL - } - return auth.New2LOTokenProvider(opts2LO) -} - -func handleUserCredential(f *credsfile.UserCredentialsFile, opts *DetectOptions) (auth.TokenProvider, error) { - opts3LO := &auth.Options3LO{ - ClientID: f.ClientID, - ClientSecret: f.ClientSecret, - Scopes: opts.scopes(), - AuthURL: googleAuthURL, - TokenURL: opts.tokenURL(), - AuthStyle: auth.StyleInParams, - EarlyTokenExpiry: opts.EarlyTokenRefresh, - RefreshToken: f.RefreshToken, - Client: opts.client(), - Logger: opts.logger(), - } - return auth.New3LOTokenProvider(opts3LO) -} - -func handleExternalAccount(f *credsfile.ExternalAccountFile, opts *DetectOptions) (auth.TokenProvider, error) { - externalOpts := &externalaccount.Options{ - Audience: f.Audience, - SubjectTokenType: f.SubjectTokenType, - TokenURL: f.TokenURL, - TokenInfoURL: f.TokenInfoURL, - ServiceAccountImpersonationURL: f.ServiceAccountImpersonationURL, - ClientSecret: f.ClientSecret, - ClientID: f.ClientID, - CredentialSource: f.CredentialSource, - QuotaProjectID: f.QuotaProjectID, - Scopes: opts.scopes(), - WorkforcePoolUserProject: f.WorkforcePoolUserProject, - Client: opts.client(), - Logger: opts.logger(), - IsDefaultClient: opts.Client == nil, - } - if f.ServiceAccountImpersonation != nil { - externalOpts.ServiceAccountImpersonationLifetimeSeconds = f.ServiceAccountImpersonation.TokenLifetimeSeconds - } - return externalaccount.NewTokenProvider(externalOpts) -} - -func handleExternalAccountAuthorizedUser(f *credsfile.ExternalAccountAuthorizedUserFile, opts *DetectOptions) (auth.TokenProvider, error) { - externalOpts := &externalaccountuser.Options{ - Audience: f.Audience, - RefreshToken: f.RefreshToken, - TokenURL: f.TokenURL, - TokenInfoURL: f.TokenInfoURL, - ClientID: f.ClientID, - ClientSecret: f.ClientSecret, - Scopes: opts.scopes(), - Client: opts.client(), - Logger: opts.logger(), - } - return externalaccountuser.NewTokenProvider(externalOpts) -} - -func handleImpersonatedServiceAccount(f *credsfile.ImpersonatedServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) { - if f.ServiceAccountImpersonationURL == "" || f.CredSource == nil { - return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials") - } - - tp, err := fileCredentials(f.CredSource, opts) - if err != nil { - return nil, err - } - return impersonate.NewTokenProvider(&impersonate.Options{ - URL: f.ServiceAccountImpersonationURL, - Scopes: opts.scopes(), - Tp: tp, - Delegates: f.Delegates, - Client: opts.client(), - Logger: opts.logger(), - }) -} - -func handleGDCHServiceAccount(f *credsfile.GDCHServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) { - return gdch.NewTokenProvider(f, &gdch.Options{ - STSAudience: opts.STSAudience, - Client: opts.client(), - Logger: opts.logger(), - }) -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/aws_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/aws_provider.go deleted file mode 100644 index 9ecd1f64bd..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/aws_provider.go +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "bytes" - "context" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - "net/url" - "os" - "path" - "sort" - "strings" - "time" - - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -var ( - // getenv aliases os.Getenv for testing - getenv = os.Getenv -) - -const ( - // AWS Signature Version 4 signing algorithm identifier. - awsAlgorithm = "AWS4-HMAC-SHA256" - - // The termination string for the AWS credential scope value as defined in - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html - awsRequestType = "aws4_request" - - // The AWS authorization header name for the security session token if available. - awsSecurityTokenHeader = "x-amz-security-token" - - // The name of the header containing the session token for metadata endpoint calls - awsIMDSv2SessionTokenHeader = "X-aws-ec2-metadata-token" - - awsIMDSv2SessionTTLHeader = "X-aws-ec2-metadata-token-ttl-seconds" - - awsIMDSv2SessionTTL = "300" - - // The AWS authorization header name for the auto-generated date. - awsDateHeader = "x-amz-date" - - defaultRegionalCredentialVerificationURL = "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" - - // Supported AWS configuration environment variables. - awsAccessKeyIDEnvVar = "AWS_ACCESS_KEY_ID" - awsDefaultRegionEnvVar = "AWS_DEFAULT_REGION" - awsRegionEnvVar = "AWS_REGION" - awsSecretAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY" - awsSessionTokenEnvVar = "AWS_SESSION_TOKEN" - - awsTimeFormatLong = "20060102T150405Z" - awsTimeFormatShort = "20060102" - awsProviderType = "aws" -) - -type awsSubjectProvider struct { - EnvironmentID string - RegionURL string - RegionalCredVerificationURL string - CredVerificationURL string - IMDSv2SessionTokenURL string - TargetResource string - requestSigner *awsRequestSigner - region string - securityCredentialsProvider AwsSecurityCredentialsProvider - reqOpts *RequestOptions - - Client *http.Client - logger *slog.Logger -} - -func (sp *awsSubjectProvider) subjectToken(ctx context.Context) (string, error) { - // Set Defaults - if sp.RegionalCredVerificationURL == "" { - sp.RegionalCredVerificationURL = defaultRegionalCredentialVerificationURL - } - headers := make(map[string]string) - if sp.shouldUseMetadataServer() { - awsSessionToken, err := sp.getAWSSessionToken(ctx) - if err != nil { - return "", err - } - - if awsSessionToken != "" { - headers[awsIMDSv2SessionTokenHeader] = awsSessionToken - } - } - - awsSecurityCredentials, err := sp.getSecurityCredentials(ctx, headers) - if err != nil { - return "", err - } - if sp.region, err = sp.getRegion(ctx, headers); err != nil { - return "", err - } - sp.requestSigner = &awsRequestSigner{ - RegionName: sp.region, - AwsSecurityCredentials: awsSecurityCredentials, - } - - // Generate the signed request to AWS STS GetCallerIdentity API. - // Use the required regional endpoint. Otherwise, the request will fail. - req, err := http.NewRequestWithContext(ctx, "POST", strings.Replace(sp.RegionalCredVerificationURL, "{region}", sp.region, 1), nil) - if err != nil { - return "", err - } - // The full, canonical resource name of the workload identity pool - // provider, with or without the HTTPS prefix. - // Including this header as part of the signature is recommended to - // ensure data integrity. - if sp.TargetResource != "" { - req.Header.Set("x-goog-cloud-target-resource", sp.TargetResource) - } - sp.requestSigner.signRequest(req) - - /* - The GCP STS endpoint expects the headers to be formatted as: - # [ - # {key: 'x-amz-date', value: '...'}, - # {key: 'Authorization', value: '...'}, - # ... - # ] - # And then serialized as: - # quote(json.dumps({ - # url: '...', - # method: 'POST', - # headers: [{key: 'x-amz-date', value: '...'}, ...] - # })) - */ - - awsSignedReq := awsRequest{ - URL: req.URL.String(), - Method: "POST", - } - for headerKey, headerList := range req.Header { - for _, headerValue := range headerList { - awsSignedReq.Headers = append(awsSignedReq.Headers, awsRequestHeader{ - Key: headerKey, - Value: headerValue, - }) - } - } - sort.Slice(awsSignedReq.Headers, func(i, j int) bool { - headerCompare := strings.Compare(awsSignedReq.Headers[i].Key, awsSignedReq.Headers[j].Key) - if headerCompare == 0 { - return strings.Compare(awsSignedReq.Headers[i].Value, awsSignedReq.Headers[j].Value) < 0 - } - return headerCompare < 0 - }) - - result, err := json.Marshal(awsSignedReq) - if err != nil { - return "", err - } - return url.QueryEscape(string(result)), nil -} - -func (sp *awsSubjectProvider) providerType() string { - if sp.securityCredentialsProvider != nil { - return programmaticProviderType - } - return awsProviderType -} - -func (sp *awsSubjectProvider) getAWSSessionToken(ctx context.Context) (string, error) { - if sp.IMDSv2SessionTokenURL == "" { - return "", nil - } - req, err := http.NewRequestWithContext(ctx, "PUT", sp.IMDSv2SessionTokenURL, nil) - if err != nil { - return "", err - } - req.Header.Set(awsIMDSv2SessionTTLHeader, awsIMDSv2SessionTTL) - - sp.logger.DebugContext(ctx, "aws session token request", "request", internallog.HTTPRequest(req, nil)) - resp, body, err := internal.DoRequest(sp.Client, req) - if err != nil { - return "", err - } - sp.logger.DebugContext(ctx, "aws session token response", "response", internallog.HTTPResponse(resp, body)) - if resp.StatusCode != http.StatusOK { - return "", fmt.Errorf("credentials: unable to retrieve AWS session token: %s", body) - } - return string(body), nil -} - -func (sp *awsSubjectProvider) getRegion(ctx context.Context, headers map[string]string) (string, error) { - if sp.securityCredentialsProvider != nil { - return sp.securityCredentialsProvider.AwsRegion(ctx, sp.reqOpts) - } - if canRetrieveRegionFromEnvironment() { - if envAwsRegion := getenv(awsRegionEnvVar); envAwsRegion != "" { - return envAwsRegion, nil - } - return getenv(awsDefaultRegionEnvVar), nil - } - - if sp.RegionURL == "" { - return "", errors.New("credentials: unable to determine AWS region") - } - - req, err := http.NewRequestWithContext(ctx, "GET", sp.RegionURL, nil) - if err != nil { - return "", err - } - - for name, value := range headers { - req.Header.Add(name, value) - } - sp.logger.DebugContext(ctx, "aws region request", "request", internallog.HTTPRequest(req, nil)) - resp, body, err := internal.DoRequest(sp.Client, req) - if err != nil { - return "", err - } - sp.logger.DebugContext(ctx, "aws region response", "response", internallog.HTTPResponse(resp, body)) - if resp.StatusCode != http.StatusOK { - return "", fmt.Errorf("credentials: unable to retrieve AWS region - %s", body) - } - - // This endpoint will return the region in format: us-east-2b. - // Only the us-east-2 part should be used. - bodyLen := len(body) - if bodyLen == 0 { - return "", nil - } - return string(body[:bodyLen-1]), nil -} - -func (sp *awsSubjectProvider) getSecurityCredentials(ctx context.Context, headers map[string]string) (result *AwsSecurityCredentials, err error) { - if sp.securityCredentialsProvider != nil { - return sp.securityCredentialsProvider.AwsSecurityCredentials(ctx, sp.reqOpts) - } - if canRetrieveSecurityCredentialFromEnvironment() { - return &AwsSecurityCredentials{ - AccessKeyID: getenv(awsAccessKeyIDEnvVar), - SecretAccessKey: getenv(awsSecretAccessKeyEnvVar), - SessionToken: getenv(awsSessionTokenEnvVar), - }, nil - } - - roleName, err := sp.getMetadataRoleName(ctx, headers) - if err != nil { - return - } - credentials, err := sp.getMetadataSecurityCredentials(ctx, roleName, headers) - if err != nil { - return - } - - if credentials.AccessKeyID == "" { - return result, errors.New("credentials: missing AccessKeyId credential") - } - if credentials.SecretAccessKey == "" { - return result, errors.New("credentials: missing SecretAccessKey credential") - } - - return credentials, nil -} - -func (sp *awsSubjectProvider) getMetadataSecurityCredentials(ctx context.Context, roleName string, headers map[string]string) (*AwsSecurityCredentials, error) { - var result *AwsSecurityCredentials - - req, err := http.NewRequestWithContext(ctx, "GET", fmt.Sprintf("%s/%s", sp.CredVerificationURL, roleName), nil) - if err != nil { - return result, err - } - for name, value := range headers { - req.Header.Add(name, value) - } - sp.logger.DebugContext(ctx, "aws security credential request", "request", internallog.HTTPRequest(req, nil)) - resp, body, err := internal.DoRequest(sp.Client, req) - if err != nil { - return result, err - } - sp.logger.DebugContext(ctx, "aws security credential response", "response", internallog.HTTPResponse(resp, body)) - if resp.StatusCode != http.StatusOK { - return result, fmt.Errorf("credentials: unable to retrieve AWS security credentials - %s", body) - } - if err := json.Unmarshal(body, &result); err != nil { - return nil, err - } - return result, nil -} - -func (sp *awsSubjectProvider) getMetadataRoleName(ctx context.Context, headers map[string]string) (string, error) { - if sp.CredVerificationURL == "" { - return "", errors.New("credentials: unable to determine the AWS metadata server security credentials endpoint") - } - req, err := http.NewRequestWithContext(ctx, "GET", sp.CredVerificationURL, nil) - if err != nil { - return "", err - } - for name, value := range headers { - req.Header.Add(name, value) - } - - sp.logger.DebugContext(ctx, "aws metadata role request", "request", internallog.HTTPRequest(req, nil)) - resp, body, err := internal.DoRequest(sp.Client, req) - if err != nil { - return "", err - } - sp.logger.DebugContext(ctx, "aws metadata role response", "response", internallog.HTTPResponse(resp, body)) - if resp.StatusCode != http.StatusOK { - return "", fmt.Errorf("credentials: unable to retrieve AWS role name - %s", body) - } - return string(body), nil -} - -// awsRequestSigner is a utility class to sign http requests using a AWS V4 signature. -type awsRequestSigner struct { - RegionName string - AwsSecurityCredentials *AwsSecurityCredentials -} - -// signRequest adds the appropriate headers to an http.Request -// or returns an error if something prevented this. -func (rs *awsRequestSigner) signRequest(req *http.Request) error { - // req is assumed non-nil - signedRequest := cloneRequest(req) - timestamp := Now() - signedRequest.Header.Set("host", requestHost(req)) - if rs.AwsSecurityCredentials.SessionToken != "" { - signedRequest.Header.Set(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SessionToken) - } - if signedRequest.Header.Get("date") == "" { - signedRequest.Header.Set(awsDateHeader, timestamp.Format(awsTimeFormatLong)) - } - authorizationCode, err := rs.generateAuthentication(signedRequest, timestamp) - if err != nil { - return err - } - signedRequest.Header.Set("Authorization", authorizationCode) - req.Header = signedRequest.Header - return nil -} - -func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp time.Time) (string, error) { - canonicalHeaderColumns, canonicalHeaderData := canonicalHeaders(req) - dateStamp := timestamp.Format(awsTimeFormatShort) - serviceName := "" - - if splitHost := strings.Split(requestHost(req), "."); len(splitHost) > 0 { - serviceName = splitHost[0] - } - credentialScope := strings.Join([]string{dateStamp, rs.RegionName, serviceName, awsRequestType}, "/") - requestString, err := canonicalRequest(req, canonicalHeaderColumns, canonicalHeaderData) - if err != nil { - return "", err - } - requestHash, err := getSha256([]byte(requestString)) - if err != nil { - return "", err - } - - stringToSign := strings.Join([]string{awsAlgorithm, timestamp.Format(awsTimeFormatLong), credentialScope, requestHash}, "\n") - signingKey := []byte("AWS4" + rs.AwsSecurityCredentials.SecretAccessKey) - for _, signingInput := range []string{ - dateStamp, rs.RegionName, serviceName, awsRequestType, stringToSign, - } { - signingKey, err = getHmacSha256(signingKey, []byte(signingInput)) - if err != nil { - return "", err - } - } - - return fmt.Sprintf("%s Credential=%s/%s, SignedHeaders=%s, Signature=%s", awsAlgorithm, rs.AwsSecurityCredentials.AccessKeyID, credentialScope, canonicalHeaderColumns, hex.EncodeToString(signingKey)), nil -} - -func getSha256(input []byte) (string, error) { - hash := sha256.New() - if _, err := hash.Write(input); err != nil { - return "", err - } - return hex.EncodeToString(hash.Sum(nil)), nil -} - -func getHmacSha256(key, input []byte) ([]byte, error) { - hash := hmac.New(sha256.New, key) - if _, err := hash.Write(input); err != nil { - return nil, err - } - return hash.Sum(nil), nil -} - -func cloneRequest(r *http.Request) *http.Request { - r2 := new(http.Request) - *r2 = *r - if r.Header != nil { - r2.Header = make(http.Header, len(r.Header)) - - // Find total number of values. - headerCount := 0 - for _, headerValues := range r.Header { - headerCount += len(headerValues) - } - copiedHeaders := make([]string, headerCount) // shared backing array for headers' values - - for headerKey, headerValues := range r.Header { - headerCount = copy(copiedHeaders, headerValues) - r2.Header[headerKey] = copiedHeaders[:headerCount:headerCount] - copiedHeaders = copiedHeaders[headerCount:] - } - } - return r2 -} - -func canonicalPath(req *http.Request) string { - result := req.URL.EscapedPath() - if result == "" { - return "/" - } - return path.Clean(result) -} - -func canonicalQuery(req *http.Request) string { - queryValues := req.URL.Query() - for queryKey := range queryValues { - sort.Strings(queryValues[queryKey]) - } - return queryValues.Encode() -} - -func canonicalHeaders(req *http.Request) (string, string) { - // Header keys need to be sorted alphabetically. - var headers []string - lowerCaseHeaders := make(http.Header) - for k, v := range req.Header { - k := strings.ToLower(k) - if _, ok := lowerCaseHeaders[k]; ok { - // include additional values - lowerCaseHeaders[k] = append(lowerCaseHeaders[k], v...) - } else { - headers = append(headers, k) - lowerCaseHeaders[k] = v - } - } - sort.Strings(headers) - - var fullHeaders bytes.Buffer - for _, header := range headers { - headerValue := strings.Join(lowerCaseHeaders[header], ",") - fullHeaders.WriteString(header) - fullHeaders.WriteRune(':') - fullHeaders.WriteString(headerValue) - fullHeaders.WriteRune('\n') - } - - return strings.Join(headers, ";"), fullHeaders.String() -} - -func requestDataHash(req *http.Request) (string, error) { - var requestData []byte - if req.Body != nil { - requestBody, err := req.GetBody() - if err != nil { - return "", err - } - defer requestBody.Close() - - requestData, err = internal.ReadAll(requestBody) - if err != nil { - return "", err - } - } - - return getSha256(requestData) -} - -func requestHost(req *http.Request) string { - if req.Host != "" { - return req.Host - } - return req.URL.Host -} - -func canonicalRequest(req *http.Request, canonicalHeaderColumns, canonicalHeaderData string) (string, error) { - dataHash, err := requestDataHash(req) - if err != nil { - return "", err - } - return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", req.Method, canonicalPath(req), canonicalQuery(req), canonicalHeaderData, canonicalHeaderColumns, dataHash), nil -} - -type awsRequestHeader struct { - Key string `json:"key"` - Value string `json:"value"` -} - -type awsRequest struct { - URL string `json:"url"` - Method string `json:"method"` - Headers []awsRequestHeader `json:"headers"` -} - -// The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. Only one is -// required. -func canRetrieveRegionFromEnvironment() bool { - return getenv(awsRegionEnvVar) != "" || getenv(awsDefaultRegionEnvVar) != "" -} - -// Check if both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are available. -func canRetrieveSecurityCredentialFromEnvironment() bool { - return getenv(awsAccessKeyIDEnvVar) != "" && getenv(awsSecretAccessKeyEnvVar) != "" -} - -func (sp *awsSubjectProvider) shouldUseMetadataServer() bool { - return sp.securityCredentialsProvider == nil && (!canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment()) -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/executable_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/executable_provider.go deleted file mode 100644 index d5765c4749..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/executable_provider.go +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "net/http" - "os" - "os/exec" - "regexp" - "strings" - "time" - - "cloud.google.com/go/auth/internal" -) - -const ( - executableSupportedMaxVersion = 1 - executableDefaultTimeout = 30 * time.Second - executableSource = "response" - executableProviderType = "executable" - outputFileSource = "output file" - - allowExecutablesEnvVar = "GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES" - - jwtTokenType = "urn:ietf:params:oauth:token-type:jwt" - idTokenType = "urn:ietf:params:oauth:token-type:id_token" - saml2TokenType = "urn:ietf:params:oauth:token-type:saml2" -) - -var ( - serviceAccountImpersonationRE = regexp.MustCompile(`https://iamcredentials..+/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken`) -) - -type nonCacheableError struct { - message string -} - -func (nce nonCacheableError) Error() string { - return nce.message -} - -// environment is a contract for testing -type environment interface { - existingEnv() []string - getenv(string) string - run(ctx context.Context, command string, env []string) ([]byte, error) - now() time.Time -} - -type runtimeEnvironment struct{} - -func (r runtimeEnvironment) existingEnv() []string { - return os.Environ() -} -func (r runtimeEnvironment) getenv(key string) string { - return os.Getenv(key) -} -func (r runtimeEnvironment) now() time.Time { - return time.Now().UTC() -} - -func (r runtimeEnvironment) run(ctx context.Context, command string, env []string) ([]byte, error) { - splitCommand := strings.Fields(command) - cmd := exec.CommandContext(ctx, splitCommand[0], splitCommand[1:]...) - cmd.Env = env - - var stdout, stderr bytes.Buffer - cmd.Stdout = &stdout - cmd.Stderr = &stderr - - if err := cmd.Run(); err != nil { - if ctx.Err() == context.DeadlineExceeded { - return nil, context.DeadlineExceeded - } - if exitError, ok := err.(*exec.ExitError); ok { - return nil, exitCodeError(exitError) - } - return nil, executableError(err) - } - - bytesStdout := bytes.TrimSpace(stdout.Bytes()) - if len(bytesStdout) > 0 { - return bytesStdout, nil - } - return bytes.TrimSpace(stderr.Bytes()), nil -} - -type executableSubjectProvider struct { - Command string - Timeout time.Duration - OutputFile string - client *http.Client - opts *Options - env environment -} - -type executableResponse struct { - Version int `json:"version,omitempty"` - Success *bool `json:"success,omitempty"` - TokenType string `json:"token_type,omitempty"` - ExpirationTime int64 `json:"expiration_time,omitempty"` - IDToken string `json:"id_token,omitempty"` - SamlResponse string `json:"saml_response,omitempty"` - Code string `json:"code,omitempty"` - Message string `json:"message,omitempty"` -} - -func (sp *executableSubjectProvider) parseSubjectTokenFromSource(response []byte, source string, now int64) (string, error) { - var result executableResponse - if err := json.Unmarshal(response, &result); err != nil { - return "", jsonParsingError(source, string(response)) - } - // Validate - if result.Version == 0 { - return "", missingFieldError(source, "version") - } - if result.Success == nil { - return "", missingFieldError(source, "success") - } - if !*result.Success { - if result.Code == "" || result.Message == "" { - return "", malformedFailureError() - } - return "", userDefinedError(result.Code, result.Message) - } - if result.Version > executableSupportedMaxVersion || result.Version < 0 { - return "", unsupportedVersionError(source, result.Version) - } - if result.ExpirationTime == 0 && sp.OutputFile != "" { - return "", missingFieldError(source, "expiration_time") - } - if result.TokenType == "" { - return "", missingFieldError(source, "token_type") - } - if result.ExpirationTime != 0 && result.ExpirationTime < now { - return "", tokenExpiredError() - } - - switch result.TokenType { - case jwtTokenType, idTokenType: - if result.IDToken == "" { - return "", missingFieldError(source, "id_token") - } - return result.IDToken, nil - case saml2TokenType: - if result.SamlResponse == "" { - return "", missingFieldError(source, "saml_response") - } - return result.SamlResponse, nil - default: - return "", tokenTypeError(source) - } -} - -func (sp *executableSubjectProvider) subjectToken(ctx context.Context) (string, error) { - if token, err := sp.getTokenFromOutputFile(); token != "" || err != nil { - return token, err - } - return sp.getTokenFromExecutableCommand(ctx) -} - -func (sp *executableSubjectProvider) providerType() string { - return executableProviderType -} - -func (sp *executableSubjectProvider) getTokenFromOutputFile() (token string, err error) { - if sp.OutputFile == "" { - // This ExecutableCredentialSource doesn't use an OutputFile. - return "", nil - } - - file, err := os.Open(sp.OutputFile) - if err != nil { - // No OutputFile found. Hasn't been created yet, so skip it. - return "", nil - } - defer file.Close() - - data, err := internal.ReadAll(file) - if err != nil || len(data) == 0 { - // Cachefile exists, but no data found. Get new credential. - return "", nil - } - - token, err = sp.parseSubjectTokenFromSource(data, outputFileSource, sp.env.now().Unix()) - if err != nil { - if _, ok := err.(nonCacheableError); ok { - // If the cached token is expired we need a new token, - // and if the cache contains a failure, we need to try again. - return "", nil - } - - // There was an error in the cached token, and the developer should be aware of it. - return "", err - } - // Token parsing succeeded. Use found token. - return token, nil -} - -func (sp *executableSubjectProvider) executableEnvironment() []string { - result := sp.env.existingEnv() - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE=%v", sp.opts.Audience)) - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE=%v", sp.opts.SubjectTokenType)) - result = append(result, "GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE=0") - if sp.opts.ServiceAccountImpersonationURL != "" { - matches := serviceAccountImpersonationRE.FindStringSubmatch(sp.opts.ServiceAccountImpersonationURL) - if matches != nil { - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL=%v", matches[1])) - } - } - if sp.OutputFile != "" { - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE=%v", sp.OutputFile)) - } - return result -} - -func (sp *executableSubjectProvider) getTokenFromExecutableCommand(ctx context.Context) (string, error) { - // For security reasons, we need our consumers to set this environment variable to allow executables to be run. - if sp.env.getenv(allowExecutablesEnvVar) != "1" { - return "", errors.New("credentials: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run") - } - - ctx, cancel := context.WithDeadline(ctx, sp.env.now().Add(sp.Timeout)) - defer cancel() - - output, err := sp.env.run(ctx, sp.Command, sp.executableEnvironment()) - if err != nil { - return "", err - } - return sp.parseSubjectTokenFromSource(output, executableSource, sp.env.now().Unix()) -} - -func missingFieldError(source, field string) error { - return fmt.Errorf("credentials: %q missing %q field", source, field) -} - -func jsonParsingError(source, data string) error { - return fmt.Errorf("credentials: unable to parse %q: %v", source, data) -} - -func malformedFailureError() error { - return nonCacheableError{"credentials: response must include `error` and `message` fields when unsuccessful"} -} - -func userDefinedError(code, message string) error { - return nonCacheableError{fmt.Sprintf("credentials: response contains unsuccessful response: (%v) %v", code, message)} -} - -func unsupportedVersionError(source string, version int) error { - return fmt.Errorf("credentials: %v contains unsupported version: %v", source, version) -} - -func tokenExpiredError() error { - return nonCacheableError{"credentials: the token returned by the executable is expired"} -} - -func tokenTypeError(source string) error { - return fmt.Errorf("credentials: %v contains unsupported token type", source) -} - -func exitCodeError(err *exec.ExitError) error { - return fmt.Errorf("credentials: executable command failed with exit code %v: %w", err.ExitCode(), err) -} - -func executableError(err error) error { - return fmt.Errorf("credentials: executable command failed: %w", err) -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/externalaccount.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/externalaccount.go deleted file mode 100644 index f4f49f175d..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/externalaccount.go +++ /dev/null @@ -1,431 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "context" - "errors" - "fmt" - "log/slog" - "net/http" - "regexp" - "strconv" - "strings" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials/internal/impersonate" - "cloud.google.com/go/auth/credentials/internal/stsexchange" - "cloud.google.com/go/auth/internal/credsfile" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - timeoutMinimum = 5 * time.Second - timeoutMaximum = 120 * time.Second - - universeDomainPlaceholder = "UNIVERSE_DOMAIN" - defaultTokenURL = "https://sts.UNIVERSE_DOMAIN/v1/token" - defaultUniverseDomain = "googleapis.com" -) - -var ( - // Now aliases time.Now for testing - Now = func() time.Time { - return time.Now().UTC() - } - validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`) -) - -// Options stores the configuration for fetching tokens with external credentials. -type Options struct { - // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload - // identity pool or the workforce pool and the provider identifier in that pool. - Audience string - // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec - // e.g. `urn:ietf:params:oauth:token-type:jwt`. - SubjectTokenType string - // TokenURL is the STS token exchange endpoint. - TokenURL string - // TokenInfoURL is the token_info endpoint used to retrieve the account related information ( - // user attributes like account identifier, eg. email, username, uid, etc). This is - // needed for gCloud session account identification. - TokenInfoURL string - // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only - // required for workload identity pools when APIs to be accessed have not integrated with UberMint. - ServiceAccountImpersonationURL string - // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation - // token will be valid for. - ServiceAccountImpersonationLifetimeSeconds int - // ClientSecret is currently only required if token_info endpoint also - // needs to be called with the generated GCP access token. When provided, STS will be - // called with additional basic authentication using client_id as username and client_secret as password. - ClientSecret string - // ClientID is only required in conjunction with ClientSecret, as described above. - ClientID string - // CredentialSource contains the necessary information to retrieve the token itself, as well - // as some environmental information. - CredentialSource *credsfile.CredentialSource - // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries - // will set the x-goog-user-project which overrides the project associated with the credentials. - QuotaProjectID string - // Scopes contains the desired scopes for the returned access token. - Scopes []string - // WorkforcePoolUserProject should be set when it is a workforce pool and - // not a workload identity pool. The underlying principal must still have - // serviceusage.services.use IAM permission to use the project for - // billing/quota. Optional. - WorkforcePoolUserProject string - // UniverseDomain is the default service domain for a given Cloud universe. - // This value will be used in the default STS token URL. The default value - // is "googleapis.com". It will not be used if TokenURL is set. Optional. - UniverseDomain string - // SubjectTokenProvider is an optional token provider for OIDC/SAML - // credentials. One of SubjectTokenProvider, AWSSecurityCredentialProvider - // or CredentialSource must be provided. Optional. - SubjectTokenProvider SubjectTokenProvider - // AwsSecurityCredentialsProvider is an AWS Security Credential provider - // for AWS credentials. One of SubjectTokenProvider, - // AWSSecurityCredentialProvider or CredentialSource must be provided. Optional. - AwsSecurityCredentialsProvider AwsSecurityCredentialsProvider - // Client for token request. - Client *http.Client - // IsDefaultClient marks whether the client passed in is a default client that can be overriden. - // This is important for X509 credentials which should create a new client if the default was used - // but should respect a client explicitly passed in by the user. - IsDefaultClient bool - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger -} - -// SubjectTokenProvider can be used to supply a subject token to exchange for a -// GCP access token. -type SubjectTokenProvider interface { - // SubjectToken should return a valid subject token or an error. - // The external account token provider does not cache the returned subject - // token, so caching logic should be implemented in the provider to prevent - // multiple requests for the same subject token. - SubjectToken(ctx context.Context, opts *RequestOptions) (string, error) -} - -// RequestOptions contains information about the requested subject token or AWS -// security credentials from the Google external account credential. -type RequestOptions struct { - // Audience is the requested audience for the external account credential. - Audience string - // Subject token type is the requested subject token type for the external - // account credential. Expected values include: - // “urn:ietf:params:oauth:token-type:jwt” - // “urn:ietf:params:oauth:token-type:id-token” - // “urn:ietf:params:oauth:token-type:saml2” - // “urn:ietf:params:aws:token-type:aws4_request” - SubjectTokenType string -} - -// AwsSecurityCredentialsProvider can be used to supply AwsSecurityCredentials -// and an AWS Region to exchange for a GCP access token. -type AwsSecurityCredentialsProvider interface { - // AwsRegion should return the AWS region or an error. - AwsRegion(ctx context.Context, opts *RequestOptions) (string, error) - // GetAwsSecurityCredentials should return a valid set of - // AwsSecurityCredentials or an error. The external account token provider - // does not cache the returned security credentials, so caching logic should - // be implemented in the provider to prevent multiple requests for the - // same security credentials. - AwsSecurityCredentials(ctx context.Context, opts *RequestOptions) (*AwsSecurityCredentials, error) -} - -// AwsSecurityCredentials models AWS security credentials. -type AwsSecurityCredentials struct { - // AccessKeyId is the AWS Access Key ID - Required. - AccessKeyID string `json:"AccessKeyID"` - // SecretAccessKey is the AWS Secret Access Key - Required. - SecretAccessKey string `json:"SecretAccessKey"` - // SessionToken is the AWS Session token. This should be provided for - // temporary AWS security credentials - Optional. - SessionToken string `json:"Token"` -} - -func (o *Options) validate() error { - if o.Audience == "" { - return fmt.Errorf("externalaccount: Audience must be set") - } - if o.SubjectTokenType == "" { - return fmt.Errorf("externalaccount: Subject token type must be set") - } - if o.WorkforcePoolUserProject != "" { - if valid := validWorkforceAudiencePattern.MatchString(o.Audience); !valid { - return fmt.Errorf("externalaccount: workforce_pool_user_project should not be set for non-workforce pool credentials") - } - } - count := 0 - if o.CredentialSource != nil { - count++ - } - if o.SubjectTokenProvider != nil { - count++ - } - if o.AwsSecurityCredentialsProvider != nil { - count++ - } - if count == 0 { - return fmt.Errorf("externalaccount: one of CredentialSource, SubjectTokenProvider, or AwsSecurityCredentialsProvider must be set") - } - if count > 1 { - return fmt.Errorf("externalaccount: only one of CredentialSource, SubjectTokenProvider, or AwsSecurityCredentialsProvider must be set") - } - return nil -} - -// client returns the http client that should be used for the token exchange. If a non-default client -// is provided, then the client configured in the options will always be returned. If a default client -// is provided and the options are configured for X509 credentials, a new client will be created. -func (o *Options) client() (*http.Client, error) { - // If a client was provided and no override certificate config location was provided, use the provided client. - if o.CredentialSource == nil || o.CredentialSource.Certificate == nil || (!o.IsDefaultClient && o.CredentialSource.Certificate.CertificateConfigLocation == "") { - return o.Client, nil - } - - // If a new client should be created, validate and use the certificate source to create a new mTLS client. - cert := o.CredentialSource.Certificate - if !cert.UseDefaultCertificateConfig && cert.CertificateConfigLocation == "" { - return nil, errors.New("credentials: \"certificate\" object must either specify a certificate_config_location or use_default_certificate_config should be true") - } - if cert.UseDefaultCertificateConfig && cert.CertificateConfigLocation != "" { - return nil, errors.New("credentials: \"certificate\" object cannot specify both a certificate_config_location and use_default_certificate_config=true") - } - return createX509Client(cert.CertificateConfigLocation) -} - -// resolveTokenURL sets the default STS token endpoint with the configured -// universe domain. -func (o *Options) resolveTokenURL() { - if o.TokenURL != "" { - return - } else if o.UniverseDomain != "" { - o.TokenURL = strings.Replace(defaultTokenURL, universeDomainPlaceholder, o.UniverseDomain, 1) - } else { - o.TokenURL = strings.Replace(defaultTokenURL, universeDomainPlaceholder, defaultUniverseDomain, 1) - } -} - -// NewTokenProvider returns a [cloud.google.com/go/auth.TokenProvider] -// configured with the provided options. -func NewTokenProvider(opts *Options) (auth.TokenProvider, error) { - if err := opts.validate(); err != nil { - return nil, err - } - opts.resolveTokenURL() - logger := internallog.New(opts.Logger) - stp, err := newSubjectTokenProvider(opts) - if err != nil { - return nil, err - } - - client, err := opts.client() - if err != nil { - return nil, err - } - - tp := &tokenProvider{ - client: client, - opts: opts, - stp: stp, - logger: logger, - } - - if opts.ServiceAccountImpersonationURL == "" { - return auth.NewCachedTokenProvider(tp, nil), nil - } - - scopes := make([]string, len(opts.Scopes)) - copy(scopes, opts.Scopes) - // needed for impersonation - tp.opts.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"} - imp, err := impersonate.NewTokenProvider(&impersonate.Options{ - Client: client, - URL: opts.ServiceAccountImpersonationURL, - Scopes: scopes, - Tp: auth.NewCachedTokenProvider(tp, nil), - TokenLifetimeSeconds: opts.ServiceAccountImpersonationLifetimeSeconds, - Logger: logger, - }) - if err != nil { - return nil, err - } - return auth.NewCachedTokenProvider(imp, nil), nil -} - -type subjectTokenProvider interface { - subjectToken(ctx context.Context) (string, error) - providerType() string -} - -// tokenProvider is the provider that handles external credentials. It is used to retrieve Tokens. -type tokenProvider struct { - client *http.Client - logger *slog.Logger - opts *Options - stp subjectTokenProvider -} - -func (tp *tokenProvider) Token(ctx context.Context) (*auth.Token, error) { - subjectToken, err := tp.stp.subjectToken(ctx) - if err != nil { - return nil, err - } - - stsRequest := &stsexchange.TokenRequest{ - GrantType: stsexchange.GrantType, - Audience: tp.opts.Audience, - Scope: tp.opts.Scopes, - RequestedTokenType: stsexchange.TokenType, - SubjectToken: subjectToken, - SubjectTokenType: tp.opts.SubjectTokenType, - } - header := make(http.Header) - header.Set("Content-Type", "application/x-www-form-urlencoded") - header.Add("x-goog-api-client", getGoogHeaderValue(tp.opts, tp.stp)) - clientAuth := stsexchange.ClientAuthentication{ - AuthStyle: auth.StyleInHeader, - ClientID: tp.opts.ClientID, - ClientSecret: tp.opts.ClientSecret, - } - var options map[string]interface{} - // Do not pass workforce_pool_user_project when client authentication is used. - // The client ID is sufficient for determining the user project. - if tp.opts.WorkforcePoolUserProject != "" && tp.opts.ClientID == "" { - options = map[string]interface{}{ - "userProject": tp.opts.WorkforcePoolUserProject, - } - } - stsResp, err := stsexchange.ExchangeToken(ctx, &stsexchange.Options{ - Client: tp.client, - Endpoint: tp.opts.TokenURL, - Request: stsRequest, - Authentication: clientAuth, - Headers: header, - ExtraOpts: options, - Logger: tp.logger, - }) - if err != nil { - return nil, err - } - - tok := &auth.Token{ - Value: stsResp.AccessToken, - Type: stsResp.TokenType, - } - // The RFC8693 doesn't define the explicit 0 of "expires_in" field behavior. - if stsResp.ExpiresIn <= 0 { - return nil, fmt.Errorf("credentials: got invalid expiry from security token service") - } - tok.Expiry = Now().Add(time.Duration(stsResp.ExpiresIn) * time.Second) - return tok, nil -} - -// newSubjectTokenProvider determines the type of credsfile.CredentialSource needed to create a -// subjectTokenProvider -func newSubjectTokenProvider(o *Options) (subjectTokenProvider, error) { - logger := internallog.New(o.Logger) - reqOpts := &RequestOptions{Audience: o.Audience, SubjectTokenType: o.SubjectTokenType} - if o.AwsSecurityCredentialsProvider != nil { - return &awsSubjectProvider{ - securityCredentialsProvider: o.AwsSecurityCredentialsProvider, - TargetResource: o.Audience, - reqOpts: reqOpts, - logger: logger, - }, nil - } else if o.SubjectTokenProvider != nil { - return &programmaticProvider{stp: o.SubjectTokenProvider, opts: reqOpts}, nil - } else if len(o.CredentialSource.EnvironmentID) > 3 && o.CredentialSource.EnvironmentID[:3] == "aws" { - if awsVersion, err := strconv.Atoi(o.CredentialSource.EnvironmentID[3:]); err == nil { - if awsVersion != 1 { - return nil, fmt.Errorf("credentials: aws version '%d' is not supported in the current build", awsVersion) - } - - awsProvider := &awsSubjectProvider{ - EnvironmentID: o.CredentialSource.EnvironmentID, - RegionURL: o.CredentialSource.RegionURL, - RegionalCredVerificationURL: o.CredentialSource.RegionalCredVerificationURL, - CredVerificationURL: o.CredentialSource.URL, - TargetResource: o.Audience, - Client: o.Client, - logger: logger, - } - if o.CredentialSource.IMDSv2SessionTokenURL != "" { - awsProvider.IMDSv2SessionTokenURL = o.CredentialSource.IMDSv2SessionTokenURL - } - - return awsProvider, nil - } - } else if o.CredentialSource.File != "" { - return &fileSubjectProvider{File: o.CredentialSource.File, Format: o.CredentialSource.Format}, nil - } else if o.CredentialSource.URL != "" { - return &urlSubjectProvider{ - URL: o.CredentialSource.URL, - Headers: o.CredentialSource.Headers, - Format: o.CredentialSource.Format, - Client: o.Client, - Logger: logger, - }, nil - } else if o.CredentialSource.Executable != nil { - ec := o.CredentialSource.Executable - if ec.Command == "" { - return nil, errors.New("credentials: missing `command` field — executable command must be provided") - } - - execProvider := &executableSubjectProvider{} - execProvider.Command = ec.Command - if ec.TimeoutMillis == 0 { - execProvider.Timeout = executableDefaultTimeout - } else { - execProvider.Timeout = time.Duration(ec.TimeoutMillis) * time.Millisecond - if execProvider.Timeout < timeoutMinimum || execProvider.Timeout > timeoutMaximum { - return nil, fmt.Errorf("credentials: invalid `timeout_millis` field — executable timeout must be between %v and %v seconds", timeoutMinimum.Seconds(), timeoutMaximum.Seconds()) - } - } - execProvider.OutputFile = ec.OutputFile - execProvider.client = o.Client - execProvider.opts = o - execProvider.env = runtimeEnvironment{} - return execProvider, nil - } else if o.CredentialSource.Certificate != nil { - cert := o.CredentialSource.Certificate - if !cert.UseDefaultCertificateConfig && cert.CertificateConfigLocation == "" { - return nil, errors.New("credentials: \"certificate\" object must either specify a certificate_config_location or use_default_certificate_config should be true") - } - if cert.UseDefaultCertificateConfig && cert.CertificateConfigLocation != "" { - return nil, errors.New("credentials: \"certificate\" object cannot specify both a certificate_config_location and use_default_certificate_config=true") - } - return &x509Provider{ - TrustChainPath: o.CredentialSource.Certificate.TrustChainPath, - ConfigFilePath: o.CredentialSource.Certificate.CertificateConfigLocation, - }, nil - } - return nil, errors.New("credentials: unable to parse credential source") -} - -func getGoogHeaderValue(conf *Options, p subjectTokenProvider) string { - return fmt.Sprintf("gl-go/%s auth/%s google-byoid-sdk source/%s sa-impersonation/%t config-lifetime/%t", - goVersion(), - "unknown", - p.providerType(), - conf.ServiceAccountImpersonationURL != "", - conf.ServiceAccountImpersonationLifetimeSeconds != 0) -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/file_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/file_provider.go deleted file mode 100644 index 8186939fe1..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/file_provider.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "os" - - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" -) - -const ( - fileProviderType = "file" -) - -type fileSubjectProvider struct { - File string - Format *credsfile.Format -} - -func (sp *fileSubjectProvider) subjectToken(context.Context) (string, error) { - tokenFile, err := os.Open(sp.File) - if err != nil { - return "", fmt.Errorf("credentials: failed to open credential file %q: %w", sp.File, err) - } - defer tokenFile.Close() - tokenBytes, err := internal.ReadAll(tokenFile) - if err != nil { - return "", fmt.Errorf("credentials: failed to read credential file: %w", err) - } - tokenBytes = bytes.TrimSpace(tokenBytes) - - if sp.Format == nil { - return string(tokenBytes), nil - } - switch sp.Format.Type { - case fileTypeJSON: - jsonData := make(map[string]interface{}) - err = json.Unmarshal(tokenBytes, &jsonData) - if err != nil { - return "", fmt.Errorf("credentials: failed to unmarshal subject token file: %w", err) - } - val, ok := jsonData[sp.Format.SubjectTokenFieldName] - if !ok { - return "", errors.New("credentials: provided subject_token_field_name not found in credentials") - } - token, ok := val.(string) - if !ok { - return "", errors.New("credentials: improperly formatted subject token") - } - return token, nil - case fileTypeText: - return string(tokenBytes), nil - default: - return "", errors.New("credentials: invalid credential_source file format type: " + sp.Format.Type) - } -} - -func (sp *fileSubjectProvider) providerType() string { - return fileProviderType -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/info.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/info.go deleted file mode 100644 index 8e4b4379b4..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/info.go +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "runtime" - "strings" - "unicode" -) - -var ( - // version is a package internal global variable for testing purposes. - version = runtime.Version -) - -// versionUnknown is only used when the runtime version cannot be determined. -const versionUnknown = "UNKNOWN" - -// goVersion returns a Go runtime version derived from the runtime environment -// that is modified to be suitable for reporting in a header, meaning it has no -// whitespace. If it is unable to determine the Go runtime version, it returns -// versionUnknown. -func goVersion() string { - const develPrefix = "devel +" - - s := version() - if strings.HasPrefix(s, develPrefix) { - s = s[len(develPrefix):] - if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - return s - } else if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - - notSemverRune := func(r rune) bool { - return !strings.ContainsRune("0123456789.", r) - } - - if strings.HasPrefix(s, "go1") { - s = s[2:] - var prerelease string - if p := strings.IndexFunc(s, notSemverRune); p >= 0 { - s, prerelease = s[:p], s[p:] - } - if strings.HasSuffix(s, ".") { - s += "0" - } else if strings.Count(s, ".") < 2 { - s += ".0" - } - if prerelease != "" { - // Some release candidates already have a dash in them. - if !strings.HasPrefix(prerelease, "-") { - prerelease = "-" + prerelease - } - s += prerelease - } - return s - } - return versionUnknown -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/programmatic_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/programmatic_provider.go deleted file mode 100644 index be3c87351f..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/programmatic_provider.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2024 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 externalaccount - -import "context" - -type programmaticProvider struct { - opts *RequestOptions - stp SubjectTokenProvider -} - -func (pp *programmaticProvider) providerType() string { - return programmaticProviderType -} - -func (pp *programmaticProvider) subjectToken(ctx context.Context) (string, error) { - return pp.stp.SubjectToken(ctx, pp.opts) -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/url_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/url_provider.go deleted file mode 100644 index 754ecf4fef..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/url_provider.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - fileTypeText = "text" - fileTypeJSON = "json" - urlProviderType = "url" - programmaticProviderType = "programmatic" - x509ProviderType = "x509" -) - -type urlSubjectProvider struct { - URL string - Headers map[string]string - Format *credsfile.Format - Client *http.Client - Logger *slog.Logger -} - -func (sp *urlSubjectProvider) subjectToken(ctx context.Context) (string, error) { - req, err := http.NewRequestWithContext(ctx, "GET", sp.URL, nil) - if err != nil { - return "", fmt.Errorf("credentials: HTTP request for URL-sourced credential failed: %w", err) - } - - for key, val := range sp.Headers { - req.Header.Add(key, val) - } - sp.Logger.DebugContext(ctx, "url subject token request", "request", internallog.HTTPRequest(req, nil)) - resp, body, err := internal.DoRequest(sp.Client, req) - if err != nil { - return "", fmt.Errorf("credentials: invalid response when retrieving subject token: %w", err) - } - sp.Logger.DebugContext(ctx, "url subject token response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < http.StatusOK || c >= http.StatusMultipleChoices { - return "", fmt.Errorf("credentials: status code %d: %s", c, body) - } - - if sp.Format == nil { - return string(body), nil - } - switch sp.Format.Type { - case "json": - jsonData := make(map[string]interface{}) - err = json.Unmarshal(body, &jsonData) - if err != nil { - return "", fmt.Errorf("credentials: failed to unmarshal subject token file: %w", err) - } - val, ok := jsonData[sp.Format.SubjectTokenFieldName] - if !ok { - return "", errors.New("credentials: provided subject_token_field_name not found in credentials") - } - token, ok := val.(string) - if !ok { - return "", errors.New("credentials: improperly formatted subject token") - } - return token, nil - case fileTypeText: - return string(body), nil - default: - return "", errors.New("credentials: invalid credential_source file format type: " + sp.Format.Type) - } -} - -func (sp *urlSubjectProvider) providerType() string { - return urlProviderType -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/x509_provider.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/x509_provider.go deleted file mode 100644 index d86ca593c8..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccount/x509_provider.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2024 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 externalaccount - -import ( - "context" - "crypto/tls" - "crypto/x509" - "encoding/base64" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io/fs" - "net/http" - "os" - "strings" - "time" - - "cloud.google.com/go/auth/internal/transport/cert" -) - -// x509Provider implements the subjectTokenProvider type for x509 workload -// identity credentials. This provider retrieves and formats a JSON array -// containing the leaf certificate and trust chain (if provided) as -// base64-encoded strings. This JSON array serves as the subject token for -// mTLS authentication. -type x509Provider struct { - // TrustChainPath is the path to the file containing the trust chain certificates. - // The file should contain one or more PEM-encoded certificates. - TrustChainPath string - // ConfigFilePath is the path to the configuration file containing the path - // to the leaf certificate file. - ConfigFilePath string -} - -const pemCertificateHeader = "-----BEGIN CERTIFICATE-----" - -func (xp *x509Provider) providerType() string { - return x509ProviderType -} - -// loadLeafCertificate loads and parses the leaf certificate from the specified -// configuration file. It retrieves the certificate path from the config file, -// reads the certificate file, and parses the certificate data. -func loadLeafCertificate(configFilePath string) (*x509.Certificate, error) { - // Get the path to the certificate file from the configuration file. - path, err := cert.GetCertificatePath(configFilePath) - if err != nil { - return nil, fmt.Errorf("failed to get certificate path from config file: %w", err) - } - leafCertBytes, err := os.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("failed to read leaf certificate file: %w", err) - } - // Parse the certificate bytes. - return parseCertificate(leafCertBytes) -} - -// encodeCert encodes a x509.Certificate to a base64 string. -func encodeCert(cert *x509.Certificate) string { - // cert.Raw contains the raw DER-encoded certificate. Encode the raw certificate bytes to base64. - return base64.StdEncoding.EncodeToString(cert.Raw) -} - -// parseCertificate parses a PEM-encoded certificate from the given byte slice. -func parseCertificate(certData []byte) (*x509.Certificate, error) { - if len(certData) == 0 { - return nil, errors.New("invalid certificate data: empty input") - } - // Decode the PEM-encoded data. - block, _ := pem.Decode(certData) - if block == nil { - return nil, errors.New("invalid PEM-encoded certificate data: no PEM block found") - } - if block.Type != "CERTIFICATE" { - return nil, fmt.Errorf("invalid PEM-encoded certificate data: expected CERTIFICATE block type, got %s", block.Type) - } - // Parse the DER-encoded certificate. - certificate, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, fmt.Errorf("failed to parse certificate: %w", err) - } - return certificate, nil -} - -// readTrustChain reads a file of PEM-encoded X.509 certificates and returns a slice of parsed certificates. -// It splits the file content into PEM certificate blocks and parses each one. -func readTrustChain(trustChainPath string) ([]*x509.Certificate, error) { - certificateTrustChain := []*x509.Certificate{} - - // If no trust chain path is provided, return an empty slice. - if trustChainPath == "" { - return certificateTrustChain, nil - } - - // Read the trust chain file. - trustChainData, err := os.ReadFile(trustChainPath) - if err != nil { - if errors.Is(err, fs.ErrNotExist) { - return nil, fmt.Errorf("trust chain file not found: %w", err) - } - return nil, fmt.Errorf("failed to read trust chain file: %w", err) - } - - // Split the file content into PEM certificate blocks. - certBlocks := strings.Split(string(trustChainData), pemCertificateHeader) - - // Iterate over each certificate block. - for _, certBlock := range certBlocks { - // Trim whitespace from the block. - certBlock = strings.TrimSpace(certBlock) - - if certBlock != "" { - // Add the PEM header to the block. - certData := pemCertificateHeader + "\n" + certBlock - - // Parse the certificate data. - cert, err := parseCertificate([]byte(certData)) - if err != nil { - return nil, fmt.Errorf("error parsing certificate from trust chain file: %w", err) - } - - // Append the certificate to the trust chain. - certificateTrustChain = append(certificateTrustChain, cert) - } - } - - return certificateTrustChain, nil -} - -// subjectToken retrieves the X.509 subject token. It loads the leaf -// certificate and, if a trust chain path is configured, the trust chain -// certificates. It then constructs a JSON array containing the base64-encoded -// leaf certificate and each base64-encoded certificate in the trust chain. -// The leaf certificate must be at the top of the trust chain file. This JSON -// array is used as the subject token for mTLS authentication. -func (xp *x509Provider) subjectToken(context.Context) (string, error) { - // Load the leaf certificate. - leafCert, err := loadLeafCertificate(xp.ConfigFilePath) - if err != nil { - return "", fmt.Errorf("failed to load leaf certificate: %w", err) - } - - // Read the trust chain. - trustChain, err := readTrustChain(xp.TrustChainPath) - if err != nil { - return "", fmt.Errorf("failed to read trust chain: %w", err) - } - - // Initialize the certificate chain with the leaf certificate. - certChain := []string{encodeCert(leafCert)} - - // If there is a trust chain, add certificates to the certificate chain. - if len(trustChain) > 0 { - firstCert := encodeCert(trustChain[0]) - - // If the first certificate in the trust chain is not the same as the leaf certificate, add it to the chain. - if firstCert != certChain[0] { - certChain = append(certChain, firstCert) - } - - // Iterate over the remaining certificates in the trust chain. - for i := 1; i < len(trustChain); i++ { - encoded := encodeCert(trustChain[i]) - - // Return an error if the current certificate is the same as the leaf certificate. - if encoded == certChain[0] { - return "", errors.New("the leaf certificate must be at the top of the trust chain file") - } - - // Add the current certificate to the chain. - certChain = append(certChain, encoded) - } - } - - // Convert the certificate chain to a JSON array of base64-encoded strings. - jsonChain, err := json.Marshal(certChain) - if err != nil { - return "", fmt.Errorf("failed to format certificate data: %w", err) - } - - // Return the JSON-formatted certificate chain. - return string(jsonChain), nil - -} - -// createX509Client creates a new client that is configured with mTLS, using the -// certificate configuration specified in the credential source. -func createX509Client(certificateConfigLocation string) (*http.Client, error) { - certProvider, err := cert.NewWorkloadX509CertProvider(certificateConfigLocation) - if err != nil { - return nil, err - } - trans := http.DefaultTransport.(*http.Transport).Clone() - - trans.TLSClientConfig = &tls.Config{ - GetClientCertificate: certProvider, - } - - // Create a client with default settings plus the X509 workload cert and key. - client := &http.Client{ - Transport: trans, - Timeout: 30 * time.Second, - } - - return client, nil -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccountuser/externalaccountuser.go b/vendor/cloud.google.com/go/auth/credentials/internal/externalaccountuser/externalaccountuser.go deleted file mode 100644 index ae39206e5f..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/externalaccountuser/externalaccountuser.go +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2023 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 externalaccountuser - -import ( - "context" - "errors" - "log/slog" - "net/http" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials/internal/stsexchange" - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -// Options stores the configuration for fetching tokens with external authorized -// user credentials. -type Options struct { - // Audience is the Secure Token Service (STS) audience which contains the - // resource name for the workforce pool and the provider identifier in that - // pool. - Audience string - // RefreshToken is the OAuth 2.0 refresh token. - RefreshToken string - // TokenURL is the STS token exchange endpoint for refresh. - TokenURL string - // TokenInfoURL is the STS endpoint URL for token introspection. Optional. - TokenInfoURL string - // ClientID is only required in conjunction with ClientSecret, as described - // below. - ClientID string - // ClientSecret is currently only required if token_info endpoint also needs - // to be called with the generated a cloud access token. When provided, STS - // will be called with additional basic authentication using client_id as - // username and client_secret as password. - ClientSecret string - // Scopes contains the desired scopes for the returned access token. - Scopes []string - - // Client for token request. - Client *http.Client - // Logger for logging. - Logger *slog.Logger -} - -func (c *Options) validate() bool { - return c.ClientID != "" && c.ClientSecret != "" && c.RefreshToken != "" && c.TokenURL != "" -} - -// NewTokenProvider returns a [cloud.google.com/go/auth.TokenProvider] -// configured with the provided options. -func NewTokenProvider(opts *Options) (auth.TokenProvider, error) { - if !opts.validate() { - return nil, errors.New("credentials: invalid external_account_authorized_user configuration") - } - - tp := &tokenProvider{ - o: opts, - } - return auth.NewCachedTokenProvider(tp, nil), nil -} - -type tokenProvider struct { - o *Options -} - -func (tp *tokenProvider) Token(ctx context.Context) (*auth.Token, error) { - opts := tp.o - - clientAuth := stsexchange.ClientAuthentication{ - AuthStyle: auth.StyleInHeader, - ClientID: opts.ClientID, - ClientSecret: opts.ClientSecret, - } - headers := make(http.Header) - headers.Set("Content-Type", "application/x-www-form-urlencoded") - stsResponse, err := stsexchange.RefreshAccessToken(ctx, &stsexchange.Options{ - Client: opts.Client, - Endpoint: opts.TokenURL, - RefreshToken: opts.RefreshToken, - Authentication: clientAuth, - Headers: headers, - Logger: internallog.New(tp.o.Logger), - }) - if err != nil { - return nil, err - } - if stsResponse.ExpiresIn < 0 { - return nil, errors.New("credentials: invalid expiry from security token service") - } - - // guarded by the wrapping with CachedTokenProvider - if stsResponse.RefreshToken != "" { - opts.RefreshToken = stsResponse.RefreshToken - } - return &auth.Token{ - Value: stsResponse.AccessToken, - Expiry: time.Now().UTC().Add(time.Duration(stsResponse.ExpiresIn) * time.Second), - Type: internal.TokenTypeBearer, - }, nil -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/gdch/gdch.go b/vendor/cloud.google.com/go/auth/credentials/internal/gdch/gdch.go deleted file mode 100644 index c2d320fdf4..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/gdch/gdch.go +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright 2023 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 gdch - -import ( - "context" - "crypto" - "crypto/tls" - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - "net/url" - "os" - "strings" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" - "cloud.google.com/go/auth/internal/jwt" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - // GrantType is the grant type for the token request. - GrantType = "urn:ietf:params:oauth:token-type:token-exchange" - requestTokenType = "urn:ietf:params:oauth:token-type:access_token" - subjectTokenType = "urn:k8s:params:oauth:token-type:serviceaccount" -) - -var ( - gdchSupportFormatVersions map[string]bool = map[string]bool{ - "1": true, - } -) - -// Options for [NewTokenProvider]. -type Options struct { - STSAudience string - Client *http.Client - Logger *slog.Logger -} - -// NewTokenProvider returns a [cloud.google.com/go/auth.TokenProvider] from a -// GDCH cred file. -func NewTokenProvider(f *credsfile.GDCHServiceAccountFile, o *Options) (auth.TokenProvider, error) { - if !gdchSupportFormatVersions[f.FormatVersion] { - return nil, fmt.Errorf("credentials: unsupported gdch_service_account format %q", f.FormatVersion) - } - if o.STSAudience == "" { - return nil, errors.New("credentials: STSAudience must be set for the GDCH auth flows") - } - signer, err := internal.ParseKey([]byte(f.PrivateKey)) - if err != nil { - return nil, err - } - certPool, err := loadCertPool(f.CertPath) - if err != nil { - return nil, err - } - - tp := gdchProvider{ - serviceIdentity: fmt.Sprintf("system:serviceaccount:%s:%s", f.Project, f.Name), - tokenURL: f.TokenURL, - aud: o.STSAudience, - signer: signer, - pkID: f.PrivateKeyID, - certPool: certPool, - client: o.Client, - logger: internallog.New(o.Logger), - } - return tp, nil -} - -func loadCertPool(path string) (*x509.CertPool, error) { - pool := x509.NewCertPool() - pem, err := os.ReadFile(path) - if err != nil { - return nil, fmt.Errorf("credentials: failed to read certificate: %w", err) - } - pool.AppendCertsFromPEM(pem) - return pool, nil -} - -type gdchProvider struct { - serviceIdentity string - tokenURL string - aud string - signer crypto.Signer - pkID string - certPool *x509.CertPool - - client *http.Client - logger *slog.Logger -} - -func (g gdchProvider) Token(ctx context.Context) (*auth.Token, error) { - addCertToTransport(g.client, g.certPool) - iat := time.Now() - exp := iat.Add(time.Hour) - claims := jwt.Claims{ - Iss: g.serviceIdentity, - Sub: g.serviceIdentity, - Aud: g.tokenURL, - Iat: iat.Unix(), - Exp: exp.Unix(), - } - h := jwt.Header{ - Algorithm: jwt.HeaderAlgRSA256, - Type: jwt.HeaderType, - KeyID: string(g.pkID), - } - payload, err := jwt.EncodeJWS(&h, &claims, g.signer) - if err != nil { - return nil, err - } - v := url.Values{} - v.Set("grant_type", GrantType) - v.Set("audience", g.aud) - v.Set("requested_token_type", requestTokenType) - v.Set("subject_token", payload) - v.Set("subject_token_type", subjectTokenType) - - req, err := http.NewRequestWithContext(ctx, "POST", g.tokenURL, strings.NewReader(v.Encode())) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - g.logger.DebugContext(ctx, "gdch token request", "request", internallog.HTTPRequest(req, []byte(v.Encode()))) - resp, body, err := internal.DoRequest(g.client, req) - if err != nil { - return nil, fmt.Errorf("credentials: cannot fetch token: %w", err) - } - g.logger.DebugContext(ctx, "gdch token response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < http.StatusOK || c > http.StatusMultipleChoices { - return nil, &auth.Error{ - Response: resp, - Body: body, - } - } - - var tokenRes struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - ExpiresIn int64 `json:"expires_in"` // relative seconds from now - } - if err := json.Unmarshal(body, &tokenRes); err != nil { - return nil, fmt.Errorf("credentials: cannot fetch token: %w", err) - } - token := &auth.Token{ - Value: tokenRes.AccessToken, - Type: tokenRes.TokenType, - } - raw := make(map[string]interface{}) - json.Unmarshal(body, &raw) // no error checks for optional fields - token.Metadata = raw - - if secs := tokenRes.ExpiresIn; secs > 0 { - token.Expiry = time.Now().Add(time.Duration(secs) * time.Second) - } - return token, nil -} - -// addCertToTransport makes a best effort attempt at adding in the cert info to -// the client. It tries to keep all configured transport settings if the -// underlying transport is an http.Transport. Or else it overwrites the -// transport with defaults adding in the certs. -func addCertToTransport(hc *http.Client, certPool *x509.CertPool) { - trans, ok := hc.Transport.(*http.Transport) - if !ok { - trans = http.DefaultTransport.(*http.Transport).Clone() - } - trans.TLSClientConfig = &tls.Config{ - RootCAs: certPool, - } -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/idtoken.go b/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/idtoken.go deleted file mode 100644 index 705462c161..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/idtoken.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2025 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 impersonate - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "log/slog" - "net/http" - "strings" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -var ( - universeDomainPlaceholder = "UNIVERSE_DOMAIN" - iamCredentialsUniverseDomainEndpoint = "https://iamcredentials.UNIVERSE_DOMAIN" -) - -// IDTokenIAMOptions provides configuration for [IDTokenIAMOptions.Token]. -type IDTokenIAMOptions struct { - // Client is required. - Client *http.Client - // Logger is required. - Logger *slog.Logger - UniverseDomain auth.CredentialsPropertyProvider - ServiceAccountEmail string - GenerateIDTokenRequest -} - -// GenerateIDTokenRequest holds the request to the IAM generateIdToken RPC. -type GenerateIDTokenRequest struct { - Audience string `json:"audience"` - IncludeEmail bool `json:"includeEmail"` - // Delegates are the ordered, fully-qualified resource name for service - // accounts in a delegation chain. Each service account must be granted - // roles/iam.serviceAccountTokenCreator on the next service account in the - // chain. The delegates must have the following format: - // projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}. The - wildcard - // character is required; replacing it with a project ID is invalid. - // Optional. - Delegates []string `json:"delegates,omitempty"` -} - -// GenerateIDTokenResponse holds the response from the IAM generateIdToken RPC. -type GenerateIDTokenResponse struct { - Token string `json:"token"` -} - -// Token call IAM generateIdToken with the configuration provided in [IDTokenIAMOptions]. -func (o IDTokenIAMOptions) Token(ctx context.Context) (*auth.Token, error) { - universeDomain, err := o.UniverseDomain.GetProperty(ctx) - if err != nil { - return nil, err - } - endpoint := strings.Replace(iamCredentialsUniverseDomainEndpoint, universeDomainPlaceholder, universeDomain, 1) - url := fmt.Sprintf("%s/v1/%s:generateIdToken", endpoint, internal.FormatIAMServiceAccountResource(o.ServiceAccountEmail)) - - bodyBytes, err := json.Marshal(o.GenerateIDTokenRequest) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to marshal request: %w", err) - } - - req, err := http.NewRequestWithContext(ctx, "POST", url, bytes.NewReader(bodyBytes)) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to create request: %w", err) - } - req.Header.Set("Content-Type", "application/json") - o.Logger.DebugContext(ctx, "impersonated idtoken request", "request", internallog.HTTPRequest(req, bodyBytes)) - resp, body, err := internal.DoRequest(o.Client, req) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to generate ID token: %w", err) - } - o.Logger.DebugContext(ctx, "impersonated idtoken response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, fmt.Errorf("impersonate: status code %d: %s", c, body) - } - - var tokenResp GenerateIDTokenResponse - if err := json.Unmarshal(body, &tokenResp); err != nil { - return nil, fmt.Errorf("impersonate: unable to parse response: %w", err) - } - return &auth.Token{ - Value: tokenResp.Token, - // Generated ID tokens are good for one hour. - Expiry: time.Now().Add(1 * time.Hour), - }, nil -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go b/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go deleted file mode 100644 index b3a99261fa..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/impersonate/impersonate.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright 2023 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 impersonate - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "log/slog" - "net/http" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - defaultTokenLifetime = "3600s" - authHeaderKey = "Authorization" -) - -// generateAccesstokenReq is used for service account impersonation -type generateAccessTokenReq struct { - Delegates []string `json:"delegates,omitempty"` - Lifetime string `json:"lifetime,omitempty"` - Scope []string `json:"scope,omitempty"` -} - -type impersonateTokenResponse struct { - AccessToken string `json:"accessToken"` - ExpireTime string `json:"expireTime"` -} - -// NewTokenProvider uses a source credential, stored in Ts, to request an access token to the provided URL. -// Scopes can be defined when the access token is requested. -func NewTokenProvider(opts *Options) (auth.TokenProvider, error) { - if err := opts.validate(); err != nil { - return nil, err - } - return opts, nil -} - -// Options for [NewTokenProvider]. -type Options struct { - // Tp is the source credential used to generate a token on the - // impersonated service account. Required. - Tp auth.TokenProvider - - // URL is the endpoint to call to generate a token - // on behalf of the service account. Required. - URL string - // Scopes that the impersonated credential should have. Required. - Scopes []string - // Delegates are the service account email addresses in a delegation chain. - // Each service account must be granted roles/iam.serviceAccountTokenCreator - // on the next service account in the chain. Optional. - Delegates []string - // TokenLifetimeSeconds is the number of seconds the impersonation token will - // be valid for. Defaults to 1 hour if unset. Optional. - TokenLifetimeSeconds int - // Client configures the underlying client used to make network requests - // when fetching tokens. Required. - Client *http.Client - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger -} - -func (o *Options) validate() error { - if o.Tp == nil { - return errors.New("credentials: missing required 'source_credentials' field in impersonated credentials") - } - if o.URL == "" { - return errors.New("credentials: missing required 'service_account_impersonation_url' field in impersonated credentials") - } - return nil -} - -// Token performs the exchange to get a temporary service account token to allow access to GCP. -func (o *Options) Token(ctx context.Context) (*auth.Token, error) { - logger := internallog.New(o.Logger) - lifetime := defaultTokenLifetime - if o.TokenLifetimeSeconds != 0 { - lifetime = fmt.Sprintf("%ds", o.TokenLifetimeSeconds) - } - reqBody := generateAccessTokenReq{ - Lifetime: lifetime, - Scope: o.Scopes, - Delegates: o.Delegates, - } - b, err := json.Marshal(reqBody) - if err != nil { - return nil, fmt.Errorf("credentials: unable to marshal request: %w", err) - } - req, err := http.NewRequestWithContext(ctx, "POST", o.URL, bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("credentials: unable to create impersonation request: %w", err) - } - req.Header.Set("Content-Type", "application/json") - if err := setAuthHeader(ctx, o.Tp, req); err != nil { - return nil, err - } - logger.DebugContext(ctx, "impersonated token request", "request", internallog.HTTPRequest(req, b)) - resp, body, err := internal.DoRequest(o.Client, req) - if err != nil { - return nil, fmt.Errorf("credentials: unable to generate access token: %w", err) - } - logger.DebugContext(ctx, "impersonated token response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < http.StatusOK || c >= http.StatusMultipleChoices { - return nil, fmt.Errorf("credentials: status code %d: %s", c, body) - } - - var accessTokenResp impersonateTokenResponse - if err := json.Unmarshal(body, &accessTokenResp); err != nil { - return nil, fmt.Errorf("credentials: unable to parse response: %w", err) - } - expiry, err := time.Parse(time.RFC3339, accessTokenResp.ExpireTime) - if err != nil { - return nil, fmt.Errorf("credentials: unable to parse expiry: %w", err) - } - return &auth.Token{ - Value: accessTokenResp.AccessToken, - Expiry: expiry, - Type: internal.TokenTypeBearer, - }, nil -} - -func setAuthHeader(ctx context.Context, tp auth.TokenProvider, r *http.Request) error { - t, err := tp.Token(ctx) - if err != nil { - return err - } - typ := t.Type - if typ == "" { - typ = internal.TokenTypeBearer - } - r.Header.Set(authHeaderKey, typ+" "+t.Value) - return nil -} diff --git a/vendor/cloud.google.com/go/auth/credentials/internal/stsexchange/sts_exchange.go b/vendor/cloud.google.com/go/auth/credentials/internal/stsexchange/sts_exchange.go deleted file mode 100644 index e1d2b15034..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/internal/stsexchange/sts_exchange.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2023 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 stsexchange - -import ( - "context" - "encoding/base64" - "encoding/json" - "fmt" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -const ( - // GrantType for a sts exchange. - GrantType = "urn:ietf:params:oauth:grant-type:token-exchange" - // TokenType for a sts exchange. - TokenType = "urn:ietf:params:oauth:token-type:access_token" - - jwtTokenType = "urn:ietf:params:oauth:token-type:jwt" -) - -// Options stores the configuration for making an sts exchange request. -type Options struct { - Client *http.Client - Logger *slog.Logger - Endpoint string - Request *TokenRequest - Authentication ClientAuthentication - Headers http.Header - // ExtraOpts are optional fields marshalled into the `options` field of the - // request body. - ExtraOpts map[string]interface{} - RefreshToken string -} - -// RefreshAccessToken performs the token exchange using a refresh token flow. -func RefreshAccessToken(ctx context.Context, opts *Options) (*TokenResponse, error) { - data := url.Values{} - data.Set("grant_type", "refresh_token") - data.Set("refresh_token", opts.RefreshToken) - return doRequest(ctx, opts, data) -} - -// ExchangeToken performs an oauth2 token exchange with the provided endpoint. -func ExchangeToken(ctx context.Context, opts *Options) (*TokenResponse, error) { - data := url.Values{} - data.Set("audience", opts.Request.Audience) - data.Set("grant_type", GrantType) - data.Set("requested_token_type", TokenType) - data.Set("subject_token_type", opts.Request.SubjectTokenType) - data.Set("subject_token", opts.Request.SubjectToken) - data.Set("scope", strings.Join(opts.Request.Scope, " ")) - if opts.ExtraOpts != nil { - opts, err := json.Marshal(opts.ExtraOpts) - if err != nil { - return nil, fmt.Errorf("credentials: failed to marshal additional options: %w", err) - } - data.Set("options", string(opts)) - } - return doRequest(ctx, opts, data) -} - -func doRequest(ctx context.Context, opts *Options, data url.Values) (*TokenResponse, error) { - opts.Authentication.InjectAuthentication(data, opts.Headers) - encodedData := data.Encode() - logger := internallog.New(opts.Logger) - - req, err := http.NewRequestWithContext(ctx, "POST", opts.Endpoint, strings.NewReader(encodedData)) - if err != nil { - return nil, fmt.Errorf("credentials: failed to properly build http request: %w", err) - - } - for key, list := range opts.Headers { - for _, val := range list { - req.Header.Add(key, val) - } - } - req.Header.Set("Content-Length", strconv.Itoa(len(encodedData))) - - logger.DebugContext(ctx, "sts token request", "request", internallog.HTTPRequest(req, []byte(encodedData))) - resp, body, err := internal.DoRequest(opts.Client, req) - if err != nil { - return nil, fmt.Errorf("credentials: invalid response from Secure Token Server: %w", err) - } - logger.DebugContext(ctx, "sts token response", "response", internallog.HTTPResponse(resp, body)) - if c := resp.StatusCode; c < http.StatusOK || c > http.StatusMultipleChoices { - return nil, fmt.Errorf("credentials: status code %d: %s", c, body) - } - var stsResp TokenResponse - if err := json.Unmarshal(body, &stsResp); err != nil { - return nil, fmt.Errorf("credentials: failed to unmarshal response body from Secure Token Server: %w", err) - } - - return &stsResp, nil -} - -// TokenRequest contains fields necessary to make an oauth2 token -// exchange. -type TokenRequest struct { - ActingParty struct { - ActorToken string - ActorTokenType string - } - GrantType string - Resource string - Audience string - Scope []string - RequestedTokenType string - SubjectToken string - SubjectTokenType string -} - -// TokenResponse is used to decode the remote server response during -// an oauth2 token exchange. -type TokenResponse struct { - AccessToken string `json:"access_token"` - IssuedTokenType string `json:"issued_token_type"` - TokenType string `json:"token_type"` - ExpiresIn int `json:"expires_in"` - Scope string `json:"scope"` - RefreshToken string `json:"refresh_token"` -} - -// ClientAuthentication represents an OAuth client ID and secret and the -// mechanism for passing these credentials as stated in rfc6749#2.3.1. -type ClientAuthentication struct { - AuthStyle auth.Style - ClientID string - ClientSecret string -} - -// InjectAuthentication is used to add authentication to a Secure Token Service -// exchange request. It modifies either the passed url.Values or http.Header -// depending on the desired authentication format. -func (c *ClientAuthentication) InjectAuthentication(values url.Values, headers http.Header) { - if c.ClientID == "" || c.ClientSecret == "" || values == nil || headers == nil { - return - } - switch c.AuthStyle { - case auth.StyleInHeader: - plainHeader := c.ClientID + ":" + c.ClientSecret - headers.Set("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(plainHeader))) - default: - values.Set("client_id", c.ClientID) - values.Set("client_secret", c.ClientSecret) - } -} diff --git a/vendor/cloud.google.com/go/auth/credentials/selfsignedjwt.go b/vendor/cloud.google.com/go/auth/credentials/selfsignedjwt.go deleted file mode 100644 index 8d335ccecc..0000000000 --- a/vendor/cloud.google.com/go/auth/credentials/selfsignedjwt.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright 2023 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 credentials - -import ( - "context" - "crypto" - "errors" - "fmt" - "log/slog" - "strings" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/credsfile" - "cloud.google.com/go/auth/internal/jwt" -) - -var ( - // for testing - now func() time.Time = time.Now -) - -// configureSelfSignedJWT uses the private key in the service account to create -// a JWT without making a network call. -func configureSelfSignedJWT(f *credsfile.ServiceAccountFile, opts *DetectOptions) (auth.TokenProvider, error) { - if len(opts.scopes()) == 0 && opts.Audience == "" { - return nil, errors.New("credentials: both scopes and audience are empty") - } - signer, err := internal.ParseKey([]byte(f.PrivateKey)) - if err != nil { - return nil, fmt.Errorf("credentials: could not parse key: %w", err) - } - return &selfSignedTokenProvider{ - email: f.ClientEmail, - audience: opts.Audience, - scopes: opts.scopes(), - signer: signer, - pkID: f.PrivateKeyID, - logger: opts.logger(), - }, nil -} - -type selfSignedTokenProvider struct { - email string - audience string - scopes []string - signer crypto.Signer - pkID string - logger *slog.Logger -} - -func (tp *selfSignedTokenProvider) Token(context.Context) (*auth.Token, error) { - iat := now() - exp := iat.Add(time.Hour) - scope := strings.Join(tp.scopes, " ") - c := &jwt.Claims{ - Iss: tp.email, - Sub: tp.email, - Aud: tp.audience, - Scope: scope, - Iat: iat.Unix(), - Exp: exp.Unix(), - } - h := &jwt.Header{ - Algorithm: jwt.HeaderAlgRSA256, - Type: jwt.HeaderType, - KeyID: string(tp.pkID), - } - tok, err := jwt.EncodeJWS(h, c, tp.signer) - if err != nil { - return nil, fmt.Errorf("credentials: could not encode JWT: %w", err) - } - tp.logger.Debug("created self-signed JWT", "token", tok) - return &auth.Token{Value: tok, Type: internal.TokenTypeBearer, Expiry: exp}, nil -} diff --git a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go b/vendor/cloud.google.com/go/auth/httptransport/httptransport.go deleted file mode 100644 index 5758e85b5d..0000000000 --- a/vendor/cloud.google.com/go/auth/httptransport/httptransport.go +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2023 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 httptransport provides functionality for managing HTTP client -// connections to Google Cloud services. -package httptransport - -import ( - "crypto/tls" - "errors" - "fmt" - "log/slog" - "net/http" - - "cloud.google.com/go/auth" - detect "cloud.google.com/go/auth/credentials" - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/transport" - "github.com/googleapis/gax-go/v2/internallog" -) - -// ClientCertProvider is a function that returns a TLS client certificate to be -// used when opening TLS connections. It follows the same semantics as -// [crypto/tls.Config.GetClientCertificate]. -type ClientCertProvider = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - -// Options used to configure a [net/http.Client] from [NewClient]. -type Options struct { - // DisableTelemetry disables default telemetry (OpenTelemetry). An example - // reason to do so would be to bind custom telemetry that overrides the - // defaults. - DisableTelemetry bool - // DisableAuthentication specifies that no authentication should be used. It - // is suitable only for testing and for accessing public resources, like - // public Google Cloud Storage buckets. - DisableAuthentication bool - // Headers are extra HTTP headers that will be appended to every outgoing - // request. - Headers http.Header - // BaseRoundTripper overrides the base transport used for serving requests. - // If specified ClientCertProvider is ignored. - BaseRoundTripper http.RoundTripper - // Endpoint overrides the default endpoint to be used for a service. - Endpoint string - // APIKey specifies an API key to be used as the basis for authentication. - // If set DetectOpts are ignored. - APIKey string - // Credentials used to add Authorization header to all requests. If set - // DetectOpts are ignored. - Credentials *auth.Credentials - // ClientCertProvider is a function that returns a TLS client certificate to - // be used when opening TLS connections. It follows the same semantics as - // crypto/tls.Config.GetClientCertificate. - ClientCertProvider ClientCertProvider - // DetectOpts configures settings for detect Application Default - // Credentials. - DetectOpts *detect.DetectOptions - // UniverseDomain is the default service domain for a given Cloud universe. - // The default value is "googleapis.com". This is the universe domain - // configured for the client, which will be compared to the universe domain - // that is separately configured for the credentials. - UniverseDomain string - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger - - // InternalOptions are NOT meant to be set directly by consumers of this - // package, they should only be set by generated client code. - InternalOptions *InternalOptions -} - -func (o *Options) validate() error { - if o == nil { - return errors.New("httptransport: opts required to be non-nil") - } - if o.InternalOptions != nil && o.InternalOptions.SkipValidation { - return nil - } - hasCreds := o.APIKey != "" || - o.Credentials != nil || - (o.DetectOpts != nil && len(o.DetectOpts.CredentialsJSON) > 0) || - (o.DetectOpts != nil && o.DetectOpts.CredentialsFile != "") - if o.DisableAuthentication && hasCreds { - return errors.New("httptransport: DisableAuthentication is incompatible with options that set or detect credentials") - } - return nil -} - -// client returns the client a user set for the detect options or nil if one was -// not set. -func (o *Options) client() *http.Client { - if o.DetectOpts != nil && o.DetectOpts.Client != nil { - return o.DetectOpts.Client - } - return nil -} - -func (o *Options) logger() *slog.Logger { - return internallog.New(o.Logger) -} - -func (o *Options) resolveDetectOptions() *detect.DetectOptions { - io := o.InternalOptions - // soft-clone these so we are not updating a ref the user holds and may reuse - do := transport.CloneDetectOptions(o.DetectOpts) - - // If scoped JWTs are enabled user provided an aud, allow self-signed JWT. - if (io != nil && io.EnableJWTWithScope) || do.Audience != "" { - do.UseSelfSignedJWT = true - } - // Only default scopes if user did not also set an audience. - if len(do.Scopes) == 0 && do.Audience == "" && io != nil && len(io.DefaultScopes) > 0 { - do.Scopes = make([]string, len(io.DefaultScopes)) - copy(do.Scopes, io.DefaultScopes) - } - if len(do.Scopes) == 0 && do.Audience == "" && io != nil { - do.Audience = o.InternalOptions.DefaultAudience - } - if o.ClientCertProvider != nil { - tlsConfig := &tls.Config{ - GetClientCertificate: o.ClientCertProvider, - } - do.Client = transport.DefaultHTTPClientWithTLS(tlsConfig) - do.TokenURL = detect.GoogleMTLSTokenURL - } - if do.Logger == nil { - do.Logger = o.logger() - } - return do -} - -// InternalOptions are only meant to be set by generated client code. These are -// not meant to be set directly by consumers of this package. Configuration in -// this type is considered EXPERIMENTAL and may be removed at any time in the -// future without warning. -type InternalOptions struct { - // EnableJWTWithScope specifies if scope can be used with self-signed JWT. - EnableJWTWithScope bool - // DefaultAudience specifies a default audience to be used as the audience - // field ("aud") for the JWT token authentication. - DefaultAudience string - // DefaultEndpointTemplate combined with UniverseDomain specifies the - // default endpoint. - DefaultEndpointTemplate string - // DefaultMTLSEndpoint specifies the default mTLS endpoint. - DefaultMTLSEndpoint string - // DefaultScopes specifies the default OAuth2 scopes to be used for a - // service. - DefaultScopes []string - // SkipValidation bypasses validation on Options. It should only be used - // internally for clients that need more control over their transport. - SkipValidation bool - // SkipUniverseDomainValidation skips the verification that the universe - // domain configured for the client matches the universe domain configured - // for the credentials. It should only be used internally for clients that - // need more control over their transport. The default is false. - SkipUniverseDomainValidation bool -} - -// AddAuthorizationMiddleware adds a middleware to the provided client's -// transport that sets the Authorization header with the value produced by the -// provided [cloud.google.com/go/auth.Credentials]. An error is returned only -// if client or creds is nil. -// -// This function does not support setting a universe domain value on the client. -func AddAuthorizationMiddleware(client *http.Client, creds *auth.Credentials) error { - if client == nil || creds == nil { - return fmt.Errorf("httptransport: client and tp must not be nil") - } - base := client.Transport - if base == nil { - if dt, ok := http.DefaultTransport.(*http.Transport); ok { - base = dt.Clone() - } else { - // Directly reuse the DefaultTransport if the application has - // replaced it with an implementation of RoundTripper other than - // http.Transport. - base = http.DefaultTransport - } - } - client.Transport = &authTransport{ - creds: creds, - base: base, - } - return nil -} - -// NewClient returns a [net/http.Client] that can be used to communicate with a -// Google cloud service, configured with the provided [Options]. It -// automatically appends Authorization headers to all outgoing requests. -func NewClient(opts *Options) (*http.Client, error) { - if err := opts.validate(); err != nil { - return nil, err - } - - tOpts := &transport.Options{ - Endpoint: opts.Endpoint, - ClientCertProvider: opts.ClientCertProvider, - Client: opts.client(), - UniverseDomain: opts.UniverseDomain, - Logger: opts.logger(), - } - if io := opts.InternalOptions; io != nil { - tOpts.DefaultEndpointTemplate = io.DefaultEndpointTemplate - tOpts.DefaultMTLSEndpoint = io.DefaultMTLSEndpoint - } - clientCertProvider, dialTLSContext, err := transport.GetHTTPTransportConfig(tOpts) - if err != nil { - return nil, err - } - baseRoundTripper := opts.BaseRoundTripper - if baseRoundTripper == nil { - baseRoundTripper = defaultBaseTransport(clientCertProvider, dialTLSContext) - } - // Ensure the token exchange transport uses the same ClientCertProvider as the API transport. - opts.ClientCertProvider = clientCertProvider - trans, err := newTransport(baseRoundTripper, opts) - if err != nil { - return nil, err - } - return &http.Client{ - Transport: trans, - }, nil -} - -// SetAuthHeader uses the provided token to set the Authorization header on a -// request. If the token.Type is empty, the type is assumed to be Bearer. -func SetAuthHeader(token *auth.Token, req *http.Request) { - typ := token.Type - if typ == "" { - typ = internal.TokenTypeBearer - } - req.Header.Set("Authorization", typ+" "+token.Value) -} diff --git a/vendor/cloud.google.com/go/auth/httptransport/transport.go b/vendor/cloud.google.com/go/auth/httptransport/transport.go deleted file mode 100644 index ee215b6dc6..0000000000 --- a/vendor/cloud.google.com/go/auth/httptransport/transport.go +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright 2023 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 httptransport - -import ( - "context" - "crypto/tls" - "net" - "net/http" - "os" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials" - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/transport" - "cloud.google.com/go/auth/internal/transport/cert" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - "golang.org/x/net/http2" -) - -const ( - quotaProjectHeaderKey = "X-goog-user-project" -) - -func newTransport(base http.RoundTripper, opts *Options) (http.RoundTripper, error) { - var headers = opts.Headers - ht := &headerTransport{ - base: base, - headers: headers, - } - var trans http.RoundTripper = ht - trans = addOpenTelemetryTransport(trans, opts) - switch { - case opts.DisableAuthentication: - // Do nothing. - case opts.APIKey != "": - qp := internal.GetQuotaProject(nil, opts.Headers.Get(quotaProjectHeaderKey)) - if qp != "" { - if headers == nil { - headers = make(map[string][]string, 1) - } - headers.Set(quotaProjectHeaderKey, qp) - } - trans = &apiKeyTransport{ - Transport: trans, - Key: opts.APIKey, - } - default: - var creds *auth.Credentials - if opts.Credentials != nil { - creds = opts.Credentials - } else { - var err error - creds, err = credentials.DetectDefault(opts.resolveDetectOptions()) - if err != nil { - return nil, err - } - } - qp, err := creds.QuotaProjectID(context.Background()) - if err != nil { - return nil, err - } - if qp != "" { - if headers == nil { - headers = make(map[string][]string, 1) - } - // Don't overwrite user specified quota - if v := headers.Get(quotaProjectHeaderKey); v == "" { - headers.Set(quotaProjectHeaderKey, qp) - } - } - var skipUD bool - if iOpts := opts.InternalOptions; iOpts != nil { - skipUD = iOpts.SkipUniverseDomainValidation - } - creds.TokenProvider = auth.NewCachedTokenProvider(creds.TokenProvider, nil) - trans = &authTransport{ - base: trans, - creds: creds, - clientUniverseDomain: opts.UniverseDomain, - skipUniverseDomainValidation: skipUD, - } - } - return trans, nil -} - -// defaultBaseTransport returns the base HTTP transport. -// On App Engine, this is urlfetch.Transport. -// Otherwise, use a default transport, taking most defaults from -// http.DefaultTransport. -// If TLSCertificate is available, set TLSClientConfig as well. -func defaultBaseTransport(clientCertSource cert.Provider, dialTLSContext func(context.Context, string, string) (net.Conn, error)) http.RoundTripper { - defaultTransport, ok := http.DefaultTransport.(*http.Transport) - if !ok { - defaultTransport = transport.BaseTransport() - } - trans := defaultTransport.Clone() - trans.MaxIdleConnsPerHost = 100 - - if clientCertSource != nil { - trans.TLSClientConfig = &tls.Config{ - GetClientCertificate: clientCertSource, - } - } - if dialTLSContext != nil { - // If DialTLSContext is set, TLSClientConfig wil be ignored - trans.DialTLSContext = dialTLSContext - } - - // Configures the ReadIdleTimeout HTTP/2 option for the - // transport. This allows broken idle connections to be pruned more quickly, - // preventing the client from attempting to re-use connections that will no - // longer work. - http2Trans, err := http2.ConfigureTransports(trans) - if err == nil { - http2Trans.ReadIdleTimeout = time.Second * 31 - } - - return trans -} - -type apiKeyTransport struct { - // Key is the API Key to set on requests. - Key string - // Transport is the underlying HTTP transport. - // If nil, http.DefaultTransport is used. - Transport http.RoundTripper -} - -func (t *apiKeyTransport) RoundTrip(req *http.Request) (*http.Response, error) { - newReq := *req - args := newReq.URL.Query() - args.Set("key", t.Key) - newReq.URL.RawQuery = args.Encode() - return t.Transport.RoundTrip(&newReq) -} - -type headerTransport struct { - headers http.Header - base http.RoundTripper -} - -func (t *headerTransport) RoundTrip(req *http.Request) (*http.Response, error) { - rt := t.base - newReq := *req - newReq.Header = make(http.Header) - for k, vv := range req.Header { - newReq.Header[k] = vv - } - - for k, v := range t.headers { - newReq.Header[k] = v - } - - return rt.RoundTrip(&newReq) -} - -func addOpenTelemetryTransport(trans http.RoundTripper, opts *Options) http.RoundTripper { - if opts.DisableTelemetry { - return trans - } - return otelhttp.NewTransport(trans) -} - -type authTransport struct { - creds *auth.Credentials - base http.RoundTripper - clientUniverseDomain string - skipUniverseDomainValidation bool -} - -// getClientUniverseDomain returns the default service domain for a given Cloud -// universe, with the following precedence: -// -// 1. A non-empty option.WithUniverseDomain or similar client option. -// 2. A non-empty environment variable GOOGLE_CLOUD_UNIVERSE_DOMAIN. -// 3. The default value "googleapis.com". -// -// This is the universe domain configured for the client, which will be compared -// to the universe domain that is separately configured for the credentials. -func (t *authTransport) getClientUniverseDomain() string { - if t.clientUniverseDomain != "" { - return t.clientUniverseDomain - } - if envUD := os.Getenv(internal.UniverseDomainEnvVar); envUD != "" { - return envUD - } - return internal.DefaultUniverseDomain -} - -// RoundTrip authorizes and authenticates the request with an -// access token from Transport's Source. Per the RoundTripper contract we must -// not modify the initial request, so we clone it, and we must close the body -// on any errors that happens during our token logic. -func (t *authTransport) RoundTrip(req *http.Request) (*http.Response, error) { - reqBodyClosed := false - if req.Body != nil { - defer func() { - if !reqBodyClosed { - req.Body.Close() - } - }() - } - token, err := t.creds.Token(req.Context()) - if err != nil { - return nil, err - } - if !t.skipUniverseDomainValidation && token.MetadataString("auth.google.tokenSource") != "compute-metadata" { - credentialsUniverseDomain, err := t.creds.UniverseDomain(req.Context()) - if err != nil { - return nil, err - } - if err := transport.ValidateUniverseDomain(t.getClientUniverseDomain(), credentialsUniverseDomain); err != nil { - return nil, err - } - } - req2 := req.Clone(req.Context()) - SetAuthHeader(token, req2) - reqBodyClosed = true - return t.base.RoundTrip(req2) -} diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go b/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go deleted file mode 100644 index 9cd4bed61b..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/credsfile.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2023 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 credsfile is meant to hide implementation details from the pubic -// surface of the detect package. It should not import any other packages in -// this module. It is located under the main internal package so other -// sub-packages can use these parsed types as well. -package credsfile - -import ( - "os" - "os/user" - "path/filepath" - "runtime" -) - -const ( - // GoogleAppCredsEnvVar is the environment variable for setting the - // application default credentials. - GoogleAppCredsEnvVar = "GOOGLE_APPLICATION_CREDENTIALS" - userCredsFilename = "application_default_credentials.json" -) - -// CredentialType represents different credential filetypes Google credentials -// can be. -type CredentialType int - -const ( - // UnknownCredType is an unidentified file type. - UnknownCredType CredentialType = iota - // UserCredentialsKey represents a user creds file type. - UserCredentialsKey - // ServiceAccountKey represents a service account file type. - ServiceAccountKey - // ImpersonatedServiceAccountKey represents a impersonated service account - // file type. - ImpersonatedServiceAccountKey - // ExternalAccountKey represents a external account file type. - ExternalAccountKey - // GDCHServiceAccountKey represents a GDCH file type. - GDCHServiceAccountKey - // ExternalAccountAuthorizedUserKey represents a external account authorized - // user file type. - ExternalAccountAuthorizedUserKey -) - -// parseCredentialType returns the associated filetype based on the parsed -// typeString provided. -func parseCredentialType(typeString string) CredentialType { - switch typeString { - case "service_account": - return ServiceAccountKey - case "authorized_user": - return UserCredentialsKey - case "impersonated_service_account": - return ImpersonatedServiceAccountKey - case "external_account": - return ExternalAccountKey - case "external_account_authorized_user": - return ExternalAccountAuthorizedUserKey - case "gdch_service_account": - return GDCHServiceAccountKey - default: - return UnknownCredType - } -} - -// GetFileNameFromEnv returns the override if provided or detects a filename -// from the environment. -func GetFileNameFromEnv(override string) string { - if override != "" { - return override - } - return os.Getenv(GoogleAppCredsEnvVar) -} - -// GetWellKnownFileName tries to locate the filepath for the user credential -// file based on the environment. -func GetWellKnownFileName() string { - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud", userCredsFilename) - } - return filepath.Join(guessUnixHomeDir(), ".config", "gcloud", userCredsFilename) -} - -// guessUnixHomeDir default to checking for HOME, but not all unix systems have -// this set, do have a fallback. -func guessUnixHomeDir() string { - if v := os.Getenv("HOME"); v != "" { - return v - } - if u, err := user.Current(); err == nil { - return u.HomeDir - } - return "" -} diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go b/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go deleted file mode 100644 index 606347304c..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/filetype.go +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright 2023 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 credsfile - -import ( - "encoding/json" -) - -// Config3LO is the internals of a client creds file. -type Config3LO struct { - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - RedirectURIs []string `json:"redirect_uris"` - AuthURI string `json:"auth_uri"` - TokenURI string `json:"token_uri"` -} - -// ClientCredentialsFile representation. -type ClientCredentialsFile struct { - Web *Config3LO `json:"web"` - Installed *Config3LO `json:"installed"` - UniverseDomain string `json:"universe_domain"` -} - -// ServiceAccountFile representation. -type ServiceAccountFile struct { - Type string `json:"type"` - ProjectID string `json:"project_id"` - PrivateKeyID string `json:"private_key_id"` - PrivateKey string `json:"private_key"` - ClientEmail string `json:"client_email"` - ClientID string `json:"client_id"` - AuthURL string `json:"auth_uri"` - TokenURL string `json:"token_uri"` - UniverseDomain string `json:"universe_domain"` -} - -// UserCredentialsFile representation. -type UserCredentialsFile struct { - Type string `json:"type"` - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - QuotaProjectID string `json:"quota_project_id"` - RefreshToken string `json:"refresh_token"` - UniverseDomain string `json:"universe_domain"` -} - -// ExternalAccountFile representation. -type ExternalAccountFile struct { - Type string `json:"type"` - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - Audience string `json:"audience"` - SubjectTokenType string `json:"subject_token_type"` - ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` - TokenURL string `json:"token_url"` - CredentialSource *CredentialSource `json:"credential_source,omitempty"` - TokenInfoURL string `json:"token_info_url"` - ServiceAccountImpersonation *ServiceAccountImpersonationInfo `json:"service_account_impersonation,omitempty"` - QuotaProjectID string `json:"quota_project_id"` - WorkforcePoolUserProject string `json:"workforce_pool_user_project"` - UniverseDomain string `json:"universe_domain"` -} - -// ExternalAccountAuthorizedUserFile representation. -type ExternalAccountAuthorizedUserFile struct { - Type string `json:"type"` - Audience string `json:"audience"` - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - RefreshToken string `json:"refresh_token"` - TokenURL string `json:"token_url"` - TokenInfoURL string `json:"token_info_url"` - RevokeURL string `json:"revoke_url"` - QuotaProjectID string `json:"quota_project_id"` - UniverseDomain string `json:"universe_domain"` -} - -// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange. -// -// One field amongst File, URL, Certificate, and Executable should be filled, depending on the kind of credential in question. -// The EnvironmentID should start with AWS if being used for an AWS credential. -type CredentialSource struct { - File string `json:"file"` - URL string `json:"url"` - Headers map[string]string `json:"headers"` - Executable *ExecutableConfig `json:"executable,omitempty"` - Certificate *CertificateConfig `json:"certificate"` - EnvironmentID string `json:"environment_id"` // TODO: Make type for this - RegionURL string `json:"region_url"` - RegionalCredVerificationURL string `json:"regional_cred_verification_url"` - CredVerificationURL string `json:"cred_verification_url"` - IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"` - Format *Format `json:"format,omitempty"` -} - -// Format describes the format of a [CredentialSource]. -type Format struct { - // Type is either "text" or "json". When not provided "text" type is assumed. - Type string `json:"type"` - // SubjectTokenFieldName is only required for JSON format. This would be "access_token" for azure. - SubjectTokenFieldName string `json:"subject_token_field_name"` -} - -// ExecutableConfig represents the command to run for an executable -// [CredentialSource]. -type ExecutableConfig struct { - Command string `json:"command"` - TimeoutMillis int `json:"timeout_millis"` - OutputFile string `json:"output_file"` -} - -// CertificateConfig represents the options used to set up X509 based workload -// [CredentialSource] -type CertificateConfig struct { - UseDefaultCertificateConfig bool `json:"use_default_certificate_config"` - CertificateConfigLocation string `json:"certificate_config_location"` - TrustChainPath string `json:"trust_chain_path"` -} - -// ServiceAccountImpersonationInfo has impersonation configuration. -type ServiceAccountImpersonationInfo struct { - TokenLifetimeSeconds int `json:"token_lifetime_seconds"` -} - -// ImpersonatedServiceAccountFile representation. -type ImpersonatedServiceAccountFile struct { - Type string `json:"type"` - ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` - Delegates []string `json:"delegates"` - CredSource json.RawMessage `json:"source_credentials"` - UniverseDomain string `json:"universe_domain"` -} - -// GDCHServiceAccountFile represents the Google Distributed Cloud Hosted (GDCH) service identity file. -type GDCHServiceAccountFile struct { - Type string `json:"type"` - FormatVersion string `json:"format_version"` - Project string `json:"project"` - Name string `json:"name"` - CertPath string `json:"ca_cert_path"` - PrivateKeyID string `json:"private_key_id"` - PrivateKey string `json:"private_key"` - TokenURL string `json:"token_uri"` - UniverseDomain string `json:"universe_domain"` -} diff --git a/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go b/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go deleted file mode 100644 index a02b9f5df7..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/credsfile/parse.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2023 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 credsfile - -import ( - "encoding/json" -) - -// ParseServiceAccount parses bytes into a [ServiceAccountFile]. -func ParseServiceAccount(b []byte) (*ServiceAccountFile, error) { - var f *ServiceAccountFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseClientCredentials parses bytes into a -// [credsfile.ClientCredentialsFile]. -func ParseClientCredentials(b []byte) (*ClientCredentialsFile, error) { - var f *ClientCredentialsFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseUserCredentials parses bytes into a [UserCredentialsFile]. -func ParseUserCredentials(b []byte) (*UserCredentialsFile, error) { - var f *UserCredentialsFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseExternalAccount parses bytes into a [ExternalAccountFile]. -func ParseExternalAccount(b []byte) (*ExternalAccountFile, error) { - var f *ExternalAccountFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseExternalAccountAuthorizedUser parses bytes into a -// [ExternalAccountAuthorizedUserFile]. -func ParseExternalAccountAuthorizedUser(b []byte) (*ExternalAccountAuthorizedUserFile, error) { - var f *ExternalAccountAuthorizedUserFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseImpersonatedServiceAccount parses bytes into a -// [ImpersonatedServiceAccountFile]. -func ParseImpersonatedServiceAccount(b []byte) (*ImpersonatedServiceAccountFile, error) { - var f *ImpersonatedServiceAccountFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -// ParseGDCHServiceAccount parses bytes into a [GDCHServiceAccountFile]. -func ParseGDCHServiceAccount(b []byte) (*GDCHServiceAccountFile, error) { - var f *GDCHServiceAccountFile - if err := json.Unmarshal(b, &f); err != nil { - return nil, err - } - return f, nil -} - -type fileTypeChecker struct { - Type string `json:"type"` -} - -// ParseFileType determines the [CredentialType] based on bytes provided. -func ParseFileType(b []byte) (CredentialType, error) { - var f fileTypeChecker - if err := json.Unmarshal(b, &f); err != nil { - return 0, err - } - return parseCredentialType(f.Type), nil -} diff --git a/vendor/cloud.google.com/go/auth/internal/internal.go b/vendor/cloud.google.com/go/auth/internal/internal.go deleted file mode 100644 index 6a8eab6eb9..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/internal.go +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright 2023 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 internal - -import ( - "context" - "crypto" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - "net/http" - "os" - "sync" - "time" - - "cloud.google.com/go/compute/metadata" -) - -const ( - // TokenTypeBearer is the auth header prefix for bearer tokens. - TokenTypeBearer = "Bearer" - - // QuotaProjectEnvVar is the environment variable for setting the quota - // project. - QuotaProjectEnvVar = "GOOGLE_CLOUD_QUOTA_PROJECT" - // UniverseDomainEnvVar is the environment variable for setting the default - // service domain for a given Cloud universe. - UniverseDomainEnvVar = "GOOGLE_CLOUD_UNIVERSE_DOMAIN" - projectEnvVar = "GOOGLE_CLOUD_PROJECT" - maxBodySize = 1 << 20 - - // DefaultUniverseDomain is the default value for universe domain. - // Universe domain is the default service domain for a given Cloud universe. - DefaultUniverseDomain = "googleapis.com" -) - -type clonableTransport interface { - Clone() *http.Transport -} - -// DefaultClient returns an [http.Client] with some defaults set. If -// the current [http.DefaultTransport] is a [clonableTransport], as -// is the case for an [*http.Transport], the clone will be used. -// Otherwise the [http.DefaultTransport] is used directly. -func DefaultClient() *http.Client { - if transport, ok := http.DefaultTransport.(clonableTransport); ok { - return &http.Client{ - Transport: transport.Clone(), - Timeout: 30 * time.Second, - } - } - - return &http.Client{ - Transport: http.DefaultTransport, - Timeout: 30 * time.Second, - } -} - -// ParseKey converts the binary contents of a private key file -// to an crypto.Signer. It detects whether the private key is in a -// PEM container or not. If so, it extracts the the private key -// from PEM container before conversion. It only supports PEM -// containers with no passphrase. -func ParseKey(key []byte) (crypto.Signer, error) { - block, _ := pem.Decode(key) - if block != nil { - key = block.Bytes - } - var parsedKey crypto.PrivateKey - var err error - parsedKey, err = x509.ParsePKCS8PrivateKey(key) - if err != nil { - parsedKey, err = x509.ParsePKCS1PrivateKey(key) - if err != nil { - return nil, fmt.Errorf("private key should be a PEM or plain PKCS1 or PKCS8: %w", err) - } - } - parsed, ok := parsedKey.(crypto.Signer) - if !ok { - return nil, errors.New("private key is not a signer") - } - return parsed, nil -} - -// GetQuotaProject retrieves quota project with precedence being: override, -// environment variable, creds json file. -func GetQuotaProject(b []byte, override string) string { - if override != "" { - return override - } - if env := os.Getenv(QuotaProjectEnvVar); env != "" { - return env - } - if b == nil { - return "" - } - var v struct { - QuotaProject string `json:"quota_project_id"` - } - if err := json.Unmarshal(b, &v); err != nil { - return "" - } - return v.QuotaProject -} - -// GetProjectID retrieves project with precedence being: override, -// environment variable, creds json file. -func GetProjectID(b []byte, override string) string { - if override != "" { - return override - } - if env := os.Getenv(projectEnvVar); env != "" { - return env - } - if b == nil { - return "" - } - var v struct { - ProjectID string `json:"project_id"` // standard service account key - Project string `json:"project"` // gdch key - } - if err := json.Unmarshal(b, &v); err != nil { - return "" - } - if v.ProjectID != "" { - return v.ProjectID - } - return v.Project -} - -// DoRequest executes the provided req with the client. It reads the response -// body, closes it, and returns it. -func DoRequest(client *http.Client, req *http.Request) (*http.Response, []byte, error) { - resp, err := client.Do(req) - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - body, err := ReadAll(io.LimitReader(resp.Body, maxBodySize)) - if err != nil { - return nil, nil, err - } - return resp, body, nil -} - -// ReadAll consumes the whole reader and safely reads the content of its body -// with some overflow protection. -func ReadAll(r io.Reader) ([]byte, error) { - return io.ReadAll(io.LimitReader(r, maxBodySize)) -} - -// StaticCredentialsProperty is a helper for creating static credentials -// properties. -func StaticCredentialsProperty(s string) StaticProperty { - return StaticProperty(s) -} - -// StaticProperty always returns that value of the underlying string. -type StaticProperty string - -// GetProperty loads the properly value provided the given context. -func (p StaticProperty) GetProperty(context.Context) (string, error) { - return string(p), nil -} - -// ComputeUniverseDomainProvider fetches the credentials universe domain from -// the google cloud metadata service. -type ComputeUniverseDomainProvider struct { - MetadataClient *metadata.Client - universeDomainOnce sync.Once - universeDomain string - universeDomainErr error -} - -// GetProperty fetches the credentials universe domain from the google cloud -// metadata service. -func (c *ComputeUniverseDomainProvider) GetProperty(ctx context.Context) (string, error) { - c.universeDomainOnce.Do(func() { - c.universeDomain, c.universeDomainErr = getMetadataUniverseDomain(ctx, c.MetadataClient) - }) - if c.universeDomainErr != nil { - return "", c.universeDomainErr - } - return c.universeDomain, nil -} - -// httpGetMetadataUniverseDomain is a package var for unit test substitution. -var httpGetMetadataUniverseDomain = func(ctx context.Context, client *metadata.Client) (string, error) { - ctx, cancel := context.WithTimeout(ctx, 1*time.Second) - defer cancel() - return client.GetWithContext(ctx, "universe/universe-domain") -} - -func getMetadataUniverseDomain(ctx context.Context, client *metadata.Client) (string, error) { - universeDomain, err := httpGetMetadataUniverseDomain(ctx, client) - if err == nil { - return universeDomain, nil - } - if _, ok := err.(metadata.NotDefinedError); ok { - // http.StatusNotFound (404) - return DefaultUniverseDomain, nil - } - return "", err -} - -// FormatIAMServiceAccountResource sets a service account name in an IAM resource -// name. -func FormatIAMServiceAccountResource(name string) string { - return fmt.Sprintf("projects/-/serviceAccounts/%s", name) -} diff --git a/vendor/cloud.google.com/go/auth/internal/jwt/jwt.go b/vendor/cloud.google.com/go/auth/internal/jwt/jwt.go deleted file mode 100644 index 9bd55f510c..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/jwt/jwt.go +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright 2023 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 jwt - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "strings" - "time" -) - -const ( - // HeaderAlgRSA256 is the RS256 [Header.Algorithm]. - HeaderAlgRSA256 = "RS256" - // HeaderAlgES256 is the ES256 [Header.Algorithm]. - HeaderAlgES256 = "ES256" - // HeaderType is the standard [Header.Type]. - HeaderType = "JWT" -) - -// Header represents a JWT header. -type Header struct { - Algorithm string `json:"alg"` - Type string `json:"typ"` - KeyID string `json:"kid"` -} - -func (h *Header) encode() (string, error) { - b, err := json.Marshal(h) - if err != nil { - return "", err - } - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// Claims represents the claims set of a JWT. -type Claims struct { - // Iss is the issuer JWT claim. - Iss string `json:"iss"` - // Scope is the scope JWT claim. - Scope string `json:"scope,omitempty"` - // Exp is the expiry JWT claim. If unset, default is in one hour from now. - Exp int64 `json:"exp"` - // Iat is the subject issued at claim. If unset, default is now. - Iat int64 `json:"iat"` - // Aud is the audience JWT claim. Optional. - Aud string `json:"aud"` - // Sub is the subject JWT claim. Optional. - Sub string `json:"sub,omitempty"` - // AdditionalClaims contains any additional non-standard JWT claims. Optional. - AdditionalClaims map[string]interface{} `json:"-"` -} - -func (c *Claims) encode() (string, error) { - // Compensate for skew - now := time.Now().Add(-10 * time.Second) - if c.Iat == 0 { - c.Iat = now.Unix() - } - if c.Exp == 0 { - c.Exp = now.Add(time.Hour).Unix() - } - if c.Exp < c.Iat { - return "", fmt.Errorf("jwt: invalid Exp = %d; must be later than Iat = %d", c.Exp, c.Iat) - } - - b, err := json.Marshal(c) - if err != nil { - return "", err - } - - if len(c.AdditionalClaims) == 0 { - return base64.RawURLEncoding.EncodeToString(b), nil - } - - // Marshal private claim set and then append it to b. - prv, err := json.Marshal(c.AdditionalClaims) - if err != nil { - return "", fmt.Errorf("invalid map of additional claims %v: %w", c.AdditionalClaims, err) - } - - // Concatenate public and private claim JSON objects. - if !bytes.HasSuffix(b, []byte{'}'}) { - return "", fmt.Errorf("invalid JSON %s", b) - } - if !bytes.HasPrefix(prv, []byte{'{'}) { - return "", fmt.Errorf("invalid JSON %s", prv) - } - b[len(b)-1] = ',' // Replace closing curly brace with a comma. - b = append(b, prv[1:]...) // Append private claims. - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// EncodeJWS encodes the data using the provided key as a JSON web signature. -func EncodeJWS(header *Header, c *Claims, signer crypto.Signer) (string, error) { - head, err := header.encode() - if err != nil { - return "", err - } - claims, err := c.encode() - if err != nil { - return "", err - } - ss := fmt.Sprintf("%s.%s", head, claims) - h := sha256.New() - h.Write([]byte(ss)) - sig, err := signer.Sign(rand.Reader, h.Sum(nil), crypto.SHA256) - if err != nil { - return "", err - } - return fmt.Sprintf("%s.%s", ss, base64.RawURLEncoding.EncodeToString(sig)), nil -} - -// DecodeJWS decodes a claim set from a JWS payload. -func DecodeJWS(payload string) (*Claims, error) { - // decode returned id token to get expiry - s := strings.Split(payload, ".") - if len(s) < 2 { - return nil, errors.New("invalid token received") - } - decoded, err := base64.RawURLEncoding.DecodeString(s[1]) - if err != nil { - return nil, err - } - c := &Claims{} - if err := json.NewDecoder(bytes.NewBuffer(decoded)).Decode(c); err != nil { - return nil, err - } - if err := json.NewDecoder(bytes.NewBuffer(decoded)).Decode(&c.AdditionalClaims); err != nil { - return nil, err - } - return c, err -} - -// VerifyJWS tests whether the provided JWT token's signature was produced by -// the private key associated with the provided public key. -func VerifyJWS(token string, key *rsa.PublicKey) error { - parts := strings.Split(token, ".") - if len(parts) != 3 { - return errors.New("jwt: invalid token received, token must have 3 parts") - } - - signedContent := parts[0] + "." + parts[1] - signatureString, err := base64.RawURLEncoding.DecodeString(parts[2]) - if err != nil { - return err - } - - h := sha256.New() - h.Write([]byte(signedContent)) - return rsa.VerifyPKCS1v15(key, crypto.SHA256, h.Sum(nil), signatureString) -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cba.go b/vendor/cloud.google.com/go/auth/internal/transport/cba.go deleted file mode 100644 index 14bca966ec..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/cba.go +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright 2023 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 transport - -import ( - "context" - "crypto/tls" - "crypto/x509" - "errors" - "log" - "log/slog" - "net" - "net/http" - "net/url" - "os" - "strconv" - "strings" - - "cloud.google.com/go/auth/internal" - "cloud.google.com/go/auth/internal/transport/cert" - "github.com/google/s2a-go" - "google.golang.org/grpc/credentials" -) - -const ( - mTLSModeAlways = "always" - mTLSModeNever = "never" - mTLSModeAuto = "auto" - - // Experimental: if true, the code will try MTLS with S2A as the default for transport security. Default value is false. - googleAPIUseS2AEnv = "EXPERIMENTAL_GOOGLE_API_USE_S2A" - googleAPIUseCertSource = "GOOGLE_API_USE_CLIENT_CERTIFICATE" - googleAPIUseMTLS = "GOOGLE_API_USE_MTLS_ENDPOINT" - googleAPIUseMTLSOld = "GOOGLE_API_USE_MTLS" - - universeDomainPlaceholder = "UNIVERSE_DOMAIN" - - mtlsMDSRoot = "/run/google-mds-mtls/root.crt" - mtlsMDSKey = "/run/google-mds-mtls/client.key" -) - -// Type represents the type of transport used. -type Type int - -const ( - // TransportTypeUnknown represents an unknown transport type and is the default option. - TransportTypeUnknown Type = iota - // TransportTypeMTLSS2A represents the mTLS transport type using S2A. - TransportTypeMTLSS2A -) - -// Options is a struct that is duplicated information from the individual -// transport packages in order to avoid cyclic deps. It correlates 1:1 with -// fields on httptransport.Options and grpctransport.Options. -type Options struct { - Endpoint string - DefaultEndpointTemplate string - DefaultMTLSEndpoint string - ClientCertProvider cert.Provider - Client *http.Client - UniverseDomain string - EnableDirectPath bool - EnableDirectPathXds bool - Logger *slog.Logger -} - -// getUniverseDomain returns the default service domain for a given Cloud -// universe. -func (o *Options) getUniverseDomain() string { - if o.UniverseDomain == "" { - return internal.DefaultUniverseDomain - } - return o.UniverseDomain -} - -// isUniverseDomainGDU returns true if the universe domain is the default Google -// universe. -func (o *Options) isUniverseDomainGDU() bool { - return o.getUniverseDomain() == internal.DefaultUniverseDomain -} - -// defaultEndpoint returns the DefaultEndpointTemplate merged with the -// universe domain if the DefaultEndpointTemplate is set, otherwise returns an -// empty string. -func (o *Options) defaultEndpoint() string { - if o.DefaultEndpointTemplate == "" { - return "" - } - return strings.Replace(o.DefaultEndpointTemplate, universeDomainPlaceholder, o.getUniverseDomain(), 1) -} - -// defaultMTLSEndpoint returns the DefaultMTLSEndpointTemplate merged with the -// universe domain if the DefaultMTLSEndpointTemplate is set, otherwise returns an -// empty string. -func (o *Options) defaultMTLSEndpoint() string { - if o.DefaultMTLSEndpoint == "" { - return "" - } - return strings.Replace(o.DefaultMTLSEndpoint, universeDomainPlaceholder, o.getUniverseDomain(), 1) -} - -// mergedEndpoint merges a user-provided Endpoint of format host[:port] with the -// default endpoint. -func (o *Options) mergedEndpoint() (string, error) { - defaultEndpoint := o.defaultEndpoint() - u, err := url.Parse(fixScheme(defaultEndpoint)) - if err != nil { - return "", err - } - return strings.Replace(defaultEndpoint, u.Host, o.Endpoint, 1), nil -} - -func fixScheme(baseURL string) string { - if !strings.Contains(baseURL, "://") { - baseURL = "https://" + baseURL - } - return baseURL -} - -// GRPCTransportCredentials embeds interface TransportCredentials with additional data. -type GRPCTransportCredentials struct { - credentials.TransportCredentials - Endpoint string - TransportType Type -} - -// GetGRPCTransportCredsAndEndpoint returns an instance of -// [google.golang.org/grpc/credentials.TransportCredentials], and the -// corresponding endpoint and transport type to use for GRPC client. -func GetGRPCTransportCredsAndEndpoint(opts *Options) (*GRPCTransportCredentials, error) { - config, err := getTransportConfig(opts) - if err != nil { - return nil, err - } - - defaultTransportCreds := credentials.NewTLS(&tls.Config{ - GetClientCertificate: config.clientCertSource, - }) - - var s2aAddr string - var transportCredsForS2A credentials.TransportCredentials - - if config.mtlsS2AAddress != "" { - s2aAddr = config.mtlsS2AAddress - transportCredsForS2A, err = loadMTLSMDSTransportCreds(mtlsMDSRoot, mtlsMDSKey) - if err != nil { - log.Printf("Loading MTLS MDS credentials failed: %v", err) - if config.s2aAddress != "" { - s2aAddr = config.s2aAddress - } else { - return &GRPCTransportCredentials{defaultTransportCreds, config.endpoint, TransportTypeUnknown}, nil - } - } - } else if config.s2aAddress != "" { - s2aAddr = config.s2aAddress - } else { - return &GRPCTransportCredentials{defaultTransportCreds, config.endpoint, TransportTypeUnknown}, nil - } - - s2aTransportCreds, err := s2a.NewClientCreds(&s2a.ClientOptions{ - S2AAddress: s2aAddr, - TransportCreds: transportCredsForS2A, - }) - if err != nil { - // Use default if we cannot initialize S2A client transport credentials. - return &GRPCTransportCredentials{defaultTransportCreds, config.endpoint, TransportTypeUnknown}, nil - } - return &GRPCTransportCredentials{s2aTransportCreds, config.s2aMTLSEndpoint, TransportTypeMTLSS2A}, nil -} - -// GetHTTPTransportConfig returns a client certificate source and a function for -// dialing MTLS with S2A. -func GetHTTPTransportConfig(opts *Options) (cert.Provider, func(context.Context, string, string) (net.Conn, error), error) { - config, err := getTransportConfig(opts) - if err != nil { - return nil, nil, err - } - - var s2aAddr string - var transportCredsForS2A credentials.TransportCredentials - - if config.mtlsS2AAddress != "" { - s2aAddr = config.mtlsS2AAddress - transportCredsForS2A, err = loadMTLSMDSTransportCreds(mtlsMDSRoot, mtlsMDSKey) - if err != nil { - log.Printf("Loading MTLS MDS credentials failed: %v", err) - if config.s2aAddress != "" { - s2aAddr = config.s2aAddress - } else { - return config.clientCertSource, nil, nil - } - } - } else if config.s2aAddress != "" { - s2aAddr = config.s2aAddress - } else { - return config.clientCertSource, nil, nil - } - - dialTLSContextFunc := s2a.NewS2ADialTLSContextFunc(&s2a.ClientOptions{ - S2AAddress: s2aAddr, - TransportCreds: transportCredsForS2A, - }) - return nil, dialTLSContextFunc, nil -} - -func loadMTLSMDSTransportCreds(mtlsMDSRootFile, mtlsMDSKeyFile string) (credentials.TransportCredentials, error) { - rootPEM, err := os.ReadFile(mtlsMDSRootFile) - if err != nil { - return nil, err - } - caCertPool := x509.NewCertPool() - ok := caCertPool.AppendCertsFromPEM(rootPEM) - if !ok { - return nil, errors.New("failed to load MTLS MDS root certificate") - } - // The mTLS MDS credentials are formatted as the concatenation of a PEM-encoded certificate chain - // followed by a PEM-encoded private key. For this reason, the concatenation is passed in to the - // tls.X509KeyPair function as both the certificate chain and private key arguments. - cert, err := tls.LoadX509KeyPair(mtlsMDSKeyFile, mtlsMDSKeyFile) - if err != nil { - return nil, err - } - tlsConfig := tls.Config{ - RootCAs: caCertPool, - Certificates: []tls.Certificate{cert}, - MinVersion: tls.VersionTLS13, - } - return credentials.NewTLS(&tlsConfig), nil -} - -func getTransportConfig(opts *Options) (*transportConfig, error) { - clientCertSource, err := GetClientCertificateProvider(opts) - if err != nil { - return nil, err - } - endpoint, err := getEndpoint(opts, clientCertSource) - if err != nil { - return nil, err - } - defaultTransportConfig := transportConfig{ - clientCertSource: clientCertSource, - endpoint: endpoint, - } - - if !shouldUseS2A(clientCertSource, opts) { - return &defaultTransportConfig, nil - } - - s2aAddress := GetS2AAddress(opts.Logger) - mtlsS2AAddress := GetMTLSS2AAddress(opts.Logger) - if s2aAddress == "" && mtlsS2AAddress == "" { - return &defaultTransportConfig, nil - } - return &transportConfig{ - clientCertSource: clientCertSource, - endpoint: endpoint, - s2aAddress: s2aAddress, - mtlsS2AAddress: mtlsS2AAddress, - s2aMTLSEndpoint: opts.defaultMTLSEndpoint(), - }, nil -} - -// GetClientCertificateProvider returns a default client certificate source, if -// not provided by the user. -// -// A nil default source can be returned if the source does not exist. Any exceptions -// encountered while initializing the default source will be reported as client -// error (ex. corrupt metadata file). -func GetClientCertificateProvider(opts *Options) (cert.Provider, error) { - if !isClientCertificateEnabled(opts) { - return nil, nil - } else if opts.ClientCertProvider != nil { - return opts.ClientCertProvider, nil - } - return cert.DefaultProvider() - -} - -// isClientCertificateEnabled returns true by default for all GDU universe domain, unless explicitly overridden by env var -func isClientCertificateEnabled(opts *Options) bool { - if value, ok := os.LookupEnv(googleAPIUseCertSource); ok { - // error as false is OK - b, _ := strconv.ParseBool(value) - return b - } - return opts.isUniverseDomainGDU() -} - -type transportConfig struct { - // The client certificate source. - clientCertSource cert.Provider - // The corresponding endpoint to use based on client certificate source. - endpoint string - // The plaintext S2A address if it can be used, otherwise an empty string. - s2aAddress string - // The MTLS S2A address if it can be used, otherwise an empty string. - mtlsS2AAddress string - // The MTLS endpoint to use with S2A. - s2aMTLSEndpoint string -} - -// getEndpoint returns the endpoint for the service, taking into account the -// user-provided endpoint override "settings.Endpoint". -// -// If no endpoint override is specified, we will either return the default -// endpoint or the default mTLS endpoint if a client certificate is available. -// -// You can override the default endpoint choice (mTLS vs. regular) by setting -// the GOOGLE_API_USE_MTLS_ENDPOINT environment variable. -// -// If the endpoint override is an address (host:port) rather than full base -// URL (ex. https://...), then the user-provided address will be merged into -// the default endpoint. For example, WithEndpoint("myhost:8000") and -// DefaultEndpointTemplate("https://UNIVERSE_DOMAIN/bar/baz") will return -// "https://myhost:8080/bar/baz". Note that this does not apply to the mTLS -// endpoint. -func getEndpoint(opts *Options, clientCertSource cert.Provider) (string, error) { - if opts.Endpoint == "" { - mtlsMode := getMTLSMode() - if mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) { - return opts.defaultMTLSEndpoint(), nil - } - return opts.defaultEndpoint(), nil - } - if strings.Contains(opts.Endpoint, "://") { - // User passed in a full URL path, use it verbatim. - return opts.Endpoint, nil - } - if opts.defaultEndpoint() == "" { - // If DefaultEndpointTemplate is not configured, - // use the user provided endpoint verbatim. This allows a naked - // "host[:port]" URL to be used with GRPC Direct Path. - return opts.Endpoint, nil - } - - // Assume user-provided endpoint is host[:port], merge it with the default endpoint. - return opts.mergedEndpoint() -} - -func getMTLSMode() string { - mode := os.Getenv(googleAPIUseMTLS) - if mode == "" { - mode = os.Getenv(googleAPIUseMTLSOld) // Deprecated. - } - if mode == "" { - return mTLSModeAuto - } - return strings.ToLower(mode) -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cert/default_cert.go b/vendor/cloud.google.com/go/auth/internal/transport/cert/default_cert.go deleted file mode 100644 index 5cedc50f1e..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/cert/default_cert.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2023 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 cert - -import ( - "crypto/tls" - "errors" - "sync" -) - -// defaultCertData holds all the variables pertaining to -// the default certificate provider created by [DefaultProvider]. -// -// A singleton model is used to allow the provider to be reused -// by the transport layer. As mentioned in [DefaultProvider] (provider nil, nil) -// may be returned to indicate a default provider could not be found, which -// will skip extra tls config in the transport layer . -type defaultCertData struct { - once sync.Once - provider Provider - err error -} - -var ( - defaultCert defaultCertData -) - -// Provider is a function that can be passed into crypto/tls.Config.GetClientCertificate. -type Provider func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - -// errSourceUnavailable is a sentinel error to indicate certificate source is unavailable. -var errSourceUnavailable = errors.New("certificate source is unavailable") - -// DefaultProvider returns a certificate source using the preferred EnterpriseCertificateProxySource. -// If EnterpriseCertificateProxySource is not available, fall back to the legacy SecureConnectSource. -// -// If neither source is available (due to missing configurations), a nil Source and a nil Error are -// returned to indicate that a default certificate source is unavailable. -func DefaultProvider() (Provider, error) { - defaultCert.once.Do(func() { - defaultCert.provider, defaultCert.err = NewWorkloadX509CertProvider("") - if errors.Is(defaultCert.err, errSourceUnavailable) { - defaultCert.provider, defaultCert.err = NewEnterpriseCertificateProxyProvider("") - if errors.Is(defaultCert.err, errSourceUnavailable) { - defaultCert.provider, defaultCert.err = NewSecureConnectProvider("") - if errors.Is(defaultCert.err, errSourceUnavailable) { - defaultCert.provider, defaultCert.err = nil, nil - } - } - } - }) - return defaultCert.provider, defaultCert.err -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cert/enterprise_cert.go b/vendor/cloud.google.com/go/auth/internal/transport/cert/enterprise_cert.go deleted file mode 100644 index 6c954ae193..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/cert/enterprise_cert.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2023 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 cert - -import ( - "crypto/tls" - - "github.com/googleapis/enterprise-certificate-proxy/client" -) - -type ecpSource struct { - key *client.Key -} - -// NewEnterpriseCertificateProxyProvider creates a certificate source -// using the Enterprise Certificate Proxy client, which delegates -// certifcate related operations to an OS-specific "signer binary" -// that communicates with the native keystore (ex. keychain on MacOS). -// -// The configFilePath points to a config file containing relevant parameters -// such as the certificate issuer and the location of the signer binary. -// If configFilePath is empty, the client will attempt to load the config from -// a well-known gcloud location. -func NewEnterpriseCertificateProxyProvider(configFilePath string) (Provider, error) { - key, err := client.Cred(configFilePath) - if err != nil { - // TODO(codyoss): once this is fixed upstream can handle this error a - // little better here. But be safe for now and assume unavailable. - return nil, errSourceUnavailable - } - - return (&ecpSource{ - key: key, - }).getClientCertificate, nil -} - -func (s *ecpSource) getClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error) { - var cert tls.Certificate - cert.PrivateKey = s.key - cert.Certificate = s.key.CertificateChain() - return &cert, nil -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cert/secureconnect_cert.go b/vendor/cloud.google.com/go/auth/internal/transport/cert/secureconnect_cert.go deleted file mode 100644 index 738cb21618..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/cert/secureconnect_cert.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2023 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 cert - -import ( - "crypto/tls" - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "os" - "os/exec" - "os/user" - "path/filepath" - "sync" - "time" -) - -const ( - metadataPath = ".secureConnect" - metadataFile = "context_aware_metadata.json" -) - -type secureConnectSource struct { - metadata secureConnectMetadata - - // Cache the cert to avoid executing helper command repeatedly. - cachedCertMutex sync.Mutex - cachedCert *tls.Certificate -} - -type secureConnectMetadata struct { - Cmd []string `json:"cert_provider_command"` -} - -// NewSecureConnectProvider creates a certificate source using -// the Secure Connect Helper and its associated metadata file. -// -// The configFilePath points to the location of the context aware metadata file. -// If configFilePath is empty, use the default context aware metadata location. -func NewSecureConnectProvider(configFilePath string) (Provider, error) { - if configFilePath == "" { - user, err := user.Current() - if err != nil { - // Error locating the default config means Secure Connect is not supported. - return nil, errSourceUnavailable - } - configFilePath = filepath.Join(user.HomeDir, metadataPath, metadataFile) - } - - file, err := os.ReadFile(configFilePath) - if err != nil { - // Config file missing means Secure Connect is not supported. - // There are non-os.ErrNotExist errors that may be returned. - // (e.g. if the home directory is /dev/null, *nix systems will - // return ENOTDIR instead of ENOENT) - return nil, errSourceUnavailable - } - - var metadata secureConnectMetadata - if err := json.Unmarshal(file, &metadata); err != nil { - return nil, fmt.Errorf("cert: could not parse JSON in %q: %w", configFilePath, err) - } - if err := validateMetadata(metadata); err != nil { - return nil, fmt.Errorf("cert: invalid config in %q: %w", configFilePath, err) - } - return (&secureConnectSource{ - metadata: metadata, - }).getClientCertificate, nil -} - -func validateMetadata(metadata secureConnectMetadata) error { - if len(metadata.Cmd) == 0 { - return errors.New("empty cert_provider_command") - } - return nil -} - -func (s *secureConnectSource) getClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error) { - s.cachedCertMutex.Lock() - defer s.cachedCertMutex.Unlock() - if s.cachedCert != nil && !isCertificateExpired(s.cachedCert) { - return s.cachedCert, nil - } - // Expand OS environment variables in the cert provider command such as "$HOME". - for i := 0; i < len(s.metadata.Cmd); i++ { - s.metadata.Cmd[i] = os.ExpandEnv(s.metadata.Cmd[i]) - } - command := s.metadata.Cmd - data, err := exec.Command(command[0], command[1:]...).Output() - if err != nil { - return nil, err - } - cert, err := tls.X509KeyPair(data, data) - if err != nil { - return nil, err - } - s.cachedCert = &cert - return &cert, nil -} - -// isCertificateExpired returns true if the given cert is expired or invalid. -func isCertificateExpired(cert *tls.Certificate) bool { - if len(cert.Certificate) == 0 { - return true - } - parsed, err := x509.ParseCertificate(cert.Certificate[0]) - if err != nil { - return true - } - return time.Now().After(parsed.NotAfter) -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/cert/workload_cert.go b/vendor/cloud.google.com/go/auth/internal/transport/cert/workload_cert.go deleted file mode 100644 index b2a3be23c7..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/cert/workload_cert.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2024 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 cert - -import ( - "crypto/tls" - "encoding/json" - "errors" - "io" - "os" - - "github.com/googleapis/enterprise-certificate-proxy/client/util" -) - -type certConfigs struct { - Workload *workloadSource `json:"workload"` -} - -type workloadSource struct { - CertPath string `json:"cert_path"` - KeyPath string `json:"key_path"` -} - -type certificateConfig struct { - CertConfigs certConfigs `json:"cert_configs"` -} - -// getconfigFilePath determines the path to the certificate configuration file. -// It first checks for the presence of an environment variable that specifies -// the file path. If the environment variable is not set, it falls back to -// a default configuration file path. -func getconfigFilePath() string { - envFilePath := util.GetConfigFilePathFromEnv() - if envFilePath != "" { - return envFilePath - } - return util.GetDefaultConfigFilePath() - -} - -// GetCertificatePath retrieves the certificate file path from the provided -// configuration file. If the configFilePath is empty, it attempts to load -// the configuration from a well-known gcloud location. -// This function is exposed to allow other packages, such as the -// externalaccount package, to retrieve the certificate path without needing -// to load the entire certificate configuration. -func GetCertificatePath(configFilePath string) (string, error) { - if configFilePath == "" { - configFilePath = getconfigFilePath() - } - certFile, _, err := getCertAndKeyFiles(configFilePath) - if err != nil { - return "", err - } - return certFile, nil -} - -// NewWorkloadX509CertProvider creates a certificate source -// that reads a certificate and private key file from the local file system. -// This is intended to be used for workload identity federation. -// -// The configFilePath points to a config file containing relevant parameters -// such as the certificate and key file paths. -// If configFilePath is empty, the client will attempt to load the config from -// a well-known gcloud location. -func NewWorkloadX509CertProvider(configFilePath string) (Provider, error) { - if configFilePath == "" { - configFilePath = getconfigFilePath() - } - certFile, keyFile, err := getCertAndKeyFiles(configFilePath) - if err != nil { - return nil, err - } - - source := &workloadSource{ - CertPath: certFile, - KeyPath: keyFile, - } - return source.getClientCertificate, nil -} - -// getClientCertificate attempts to load the certificate and key from the files specified in the -// certificate config. -func (s *workloadSource) getClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error) { - cert, err := tls.LoadX509KeyPair(s.CertPath, s.KeyPath) - if err != nil { - return nil, err - } - return &cert, nil -} - -// getCertAndKeyFiles attempts to read the provided config file and return the certificate and private -// key file paths. -func getCertAndKeyFiles(configFilePath string) (string, string, error) { - jsonFile, err := os.Open(configFilePath) - if err != nil { - return "", "", errSourceUnavailable - } - - byteValue, err := io.ReadAll(jsonFile) - if err != nil { - return "", "", err - } - - var config certificateConfig - if err := json.Unmarshal(byteValue, &config); err != nil { - return "", "", err - } - - if config.CertConfigs.Workload == nil { - return "", "", errSourceUnavailable - } - - certFile := config.CertConfigs.Workload.CertPath - keyFile := config.CertConfigs.Workload.KeyPath - - if certFile == "" { - return "", "", errors.New("certificate configuration is missing the certificate file location") - } - - if keyFile == "" { - return "", "", errors.New("certificate configuration is missing the key file location") - } - - return certFile, keyFile, nil -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/s2a.go b/vendor/cloud.google.com/go/auth/internal/transport/s2a.go deleted file mode 100644 index a633099563..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/s2a.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2023 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 transport - -import ( - "context" - "encoding/json" - "fmt" - "log" - "log/slog" - "os" - "strconv" - "sync" - - "cloud.google.com/go/auth/internal/transport/cert" - "cloud.google.com/go/compute/metadata" -) - -const ( - configEndpointSuffix = "instance/platform-security/auto-mtls-configuration" -) - -var ( - mtlsConfiguration *mtlsConfig - - mtlsOnce sync.Once -) - -// GetS2AAddress returns the S2A address to be reached via plaintext connection. -// Returns empty string if not set or invalid. -func GetS2AAddress(logger *slog.Logger) string { - getMetadataMTLSAutoConfig(logger) - if !mtlsConfiguration.valid() { - return "" - } - return mtlsConfiguration.S2A.PlaintextAddress -} - -// GetMTLSS2AAddress returns the S2A address to be reached via MTLS connection. -// Returns empty string if not set or invalid. -func GetMTLSS2AAddress(logger *slog.Logger) string { - getMetadataMTLSAutoConfig(logger) - if !mtlsConfiguration.valid() { - return "" - } - return mtlsConfiguration.S2A.MTLSAddress -} - -// mtlsConfig contains the configuration for establishing MTLS connections with Google APIs. -type mtlsConfig struct { - S2A *s2aAddresses `json:"s2a"` -} - -func (c *mtlsConfig) valid() bool { - return c != nil && c.S2A != nil -} - -// s2aAddresses contains the plaintext and/or MTLS S2A addresses. -type s2aAddresses struct { - // PlaintextAddress is the plaintext address to reach S2A - PlaintextAddress string `json:"plaintext_address"` - // MTLSAddress is the MTLS address to reach S2A - MTLSAddress string `json:"mtls_address"` -} - -func getMetadataMTLSAutoConfig(logger *slog.Logger) { - var err error - mtlsOnce.Do(func() { - mtlsConfiguration, err = queryConfig(logger) - if err != nil { - log.Printf("Getting MTLS config failed: %v", err) - } - }) -} - -var httpGetMetadataMTLSConfig = func(logger *slog.Logger) (string, error) { - metadataClient := metadata.NewWithOptions(&metadata.Options{ - Logger: logger, - }) - return metadataClient.GetWithContext(context.Background(), configEndpointSuffix) -} - -func queryConfig(logger *slog.Logger) (*mtlsConfig, error) { - resp, err := httpGetMetadataMTLSConfig(logger) - if err != nil { - return nil, fmt.Errorf("querying MTLS config from MDS endpoint failed: %w", err) - } - var config mtlsConfig - err = json.Unmarshal([]byte(resp), &config) - if err != nil { - return nil, fmt.Errorf("unmarshalling MTLS config from MDS endpoint failed: %w", err) - } - if config.S2A == nil { - return nil, fmt.Errorf("returned MTLS config from MDS endpoint is invalid: %v", config) - } - return &config, nil -} - -func shouldUseS2A(clientCertSource cert.Provider, opts *Options) bool { - // If client cert is found, use that over S2A. - if clientCertSource != nil { - return false - } - // If EXPERIMENTAL_GOOGLE_API_USE_S2A is not set to true, skip S2A. - if !isGoogleS2AEnabled() { - return false - } - // If DefaultMTLSEndpoint is not set or has endpoint override, skip S2A. - if opts.DefaultMTLSEndpoint == "" || opts.Endpoint != "" { - return false - } - // If custom HTTP client is provided, skip S2A. - if opts.Client != nil { - return false - } - // If directPath is enabled, skip S2A. - return !opts.EnableDirectPath && !opts.EnableDirectPathXds -} - -func isGoogleS2AEnabled() bool { - b, err := strconv.ParseBool(os.Getenv(googleAPIUseS2AEnv)) - if err != nil { - return false - } - return b -} diff --git a/vendor/cloud.google.com/go/auth/internal/transport/transport.go b/vendor/cloud.google.com/go/auth/internal/transport/transport.go deleted file mode 100644 index 5c8721efa9..0000000000 --- a/vendor/cloud.google.com/go/auth/internal/transport/transport.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2023 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 transport provided internal helpers for the two transport packages -// (grpctransport and httptransport). -package transport - -import ( - "crypto/tls" - "fmt" - "net" - "net/http" - "time" - - "cloud.google.com/go/auth/credentials" -) - -// CloneDetectOptions clones a user set detect option into some new memory that -// we can internally manipulate before sending onto the detect package. -func CloneDetectOptions(oldDo *credentials.DetectOptions) *credentials.DetectOptions { - if oldDo == nil { - // it is valid for users not to set this, but we will need to to default - // some options for them in this case so return some initialized memory - // to work with. - return &credentials.DetectOptions{} - } - newDo := &credentials.DetectOptions{ - // Simple types - TokenBindingType: oldDo.TokenBindingType, - Audience: oldDo.Audience, - Subject: oldDo.Subject, - EarlyTokenRefresh: oldDo.EarlyTokenRefresh, - TokenURL: oldDo.TokenURL, - STSAudience: oldDo.STSAudience, - CredentialsFile: oldDo.CredentialsFile, - UseSelfSignedJWT: oldDo.UseSelfSignedJWT, - UniverseDomain: oldDo.UniverseDomain, - - // These fields are pointer types that we just want to use exactly as - // the user set, copy the ref - Client: oldDo.Client, - Logger: oldDo.Logger, - AuthHandlerOptions: oldDo.AuthHandlerOptions, - } - - // Smartly size this memory and copy below. - if len(oldDo.CredentialsJSON) > 0 { - newDo.CredentialsJSON = make([]byte, len(oldDo.CredentialsJSON)) - copy(newDo.CredentialsJSON, oldDo.CredentialsJSON) - } - if len(oldDo.Scopes) > 0 { - newDo.Scopes = make([]string, len(oldDo.Scopes)) - copy(newDo.Scopes, oldDo.Scopes) - } - - return newDo -} - -// ValidateUniverseDomain verifies that the universe domain configured for the -// client matches the universe domain configured for the credentials. -func ValidateUniverseDomain(clientUniverseDomain, credentialsUniverseDomain string) error { - if clientUniverseDomain != credentialsUniverseDomain { - return fmt.Errorf( - "the configured universe domain (%q) does not match the universe "+ - "domain found in the credentials (%q). If you haven't configured "+ - "the universe domain explicitly, \"googleapis.com\" is the default", - clientUniverseDomain, - credentialsUniverseDomain) - } - return nil -} - -// DefaultHTTPClientWithTLS constructs an HTTPClient using the provided tlsConfig, to support mTLS. -func DefaultHTTPClientWithTLS(tlsConfig *tls.Config) *http.Client { - trans := BaseTransport() - trans.TLSClientConfig = tlsConfig - return &http.Client{Transport: trans} -} - -// BaseTransport returns a default [http.Transport] which can be used if -// [http.DefaultTransport] has been overwritten. -func BaseTransport() *http.Transport { - return &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 100, - MaxIdleConnsPerHost: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - } -} diff --git a/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md b/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md deleted file mode 100644 index 42716752e3..0000000000 --- a/vendor/cloud.google.com/go/auth/oauth2adapt/CHANGES.md +++ /dev/null @@ -1,82 +0,0 @@ -# Changelog - -## [0.2.8](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.7...auth/oauth2adapt/v0.2.8) (2025-03-17) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update golang.org/x/net to 0.37.0 ([1144978](https://github.com/googleapis/google-cloud-go/commit/11449782c7fb4896bf8b8b9cde8e7441c84fb2fd)) - -## [0.2.7](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.6...auth/oauth2adapt/v0.2.7) (2025-01-09) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update golang.org/x/net to v0.33.0 ([e9b0b69](https://github.com/googleapis/google-cloud-go/commit/e9b0b69644ea5b276cacff0a707e8a5e87efafc9)) - -## [0.2.6](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.5...auth/oauth2adapt/v0.2.6) (2024-11-21) - - -### Bug Fixes - -* **auth/oauth2adapt:** Copy map in tokenSourceAdapter.Token ([#11164](https://github.com/googleapis/google-cloud-go/issues/11164)) ([8cb0cbc](https://github.com/googleapis/google-cloud-go/commit/8cb0cbccdc32886dfb3af49fee04012937d114d2)), refs [#11161](https://github.com/googleapis/google-cloud-go/issues/11161) - -## [0.2.5](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.4...auth/oauth2adapt/v0.2.5) (2024-10-30) - - -### Bug Fixes - -* **auth/oauth2adapt:** Convert token metadata where possible ([#11062](https://github.com/googleapis/google-cloud-go/issues/11062)) ([34bf1c1](https://github.com/googleapis/google-cloud-go/commit/34bf1c164465d66745c0cfdf7cd10a8e2da92e52)) - -## [0.2.4](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.3...auth/oauth2adapt/v0.2.4) (2024-08-08) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update dependencies ([257c40b](https://github.com/googleapis/google-cloud-go/commit/257c40bd6d7e59730017cf32bda8823d7a232758)) - -## [0.2.3](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.2...auth/oauth2adapt/v0.2.3) (2024-07-10) - - -### Bug Fixes - -* **auth/oauth2adapt:** Bump google.golang.org/api@v0.187.0 ([8fa9e39](https://github.com/googleapis/google-cloud-go/commit/8fa9e398e512fd8533fd49060371e61b5725a85b)) - -## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.1...auth/oauth2adapt/v0.2.2) (2024-04-23) - - -### Bug Fixes - -* **auth/oauth2adapt:** Bump x/net to v0.24.0 ([ba31ed5](https://github.com/googleapis/google-cloud-go/commit/ba31ed5fda2c9664f2e1cf972469295e63deb5b4)) - -## [0.2.1](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.2.0...auth/oauth2adapt/v0.2.1) (2024-04-18) - - -### Bug Fixes - -* **auth/oauth2adapt:** Adapt Token Types to be translated ([#9801](https://github.com/googleapis/google-cloud-go/issues/9801)) ([70f4115](https://github.com/googleapis/google-cloud-go/commit/70f411555ebbf2b71e6d425cc8d2030644c6b438)), refs [#9800](https://github.com/googleapis/google-cloud-go/issues/9800) - -## [0.2.0](https://github.com/googleapis/google-cloud-go/compare/auth/oauth2adapt/v0.1.0...auth/oauth2adapt/v0.2.0) (2024-04-16) - - -### Features - -* **auth/oauth2adapt:** Add helpers for working with credentials types ([#9694](https://github.com/googleapis/google-cloud-go/issues/9694)) ([cf33b55](https://github.com/googleapis/google-cloud-go/commit/cf33b5514423a2ac5c2a323a1cd99aac34fd4233)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update protobuf dep to v1.33.0 ([30b038d](https://github.com/googleapis/google-cloud-go/commit/30b038d8cac0b8cd5dd4761c87f3f298760dd33a)) - -## 0.1.0 (2023-10-19) - - -### Features - -* **auth/oauth2adapt:** Adds a new module to translate types ([#8595](https://github.com/googleapis/google-cloud-go/issues/8595)) ([6933c5a](https://github.com/googleapis/google-cloud-go/commit/6933c5a0c1fc8e58cbfff8bbca439d671b94672f)) -* **auth/oauth2adapt:** Fixup deps for release ([#8747](https://github.com/googleapis/google-cloud-go/issues/8747)) ([749d243](https://github.com/googleapis/google-cloud-go/commit/749d243862b025a6487a4d2d339219889b4cfe70)) - - -### Bug Fixes - -* **auth/oauth2adapt:** Update golang.org/x/net to v0.17.0 ([174da47](https://github.com/googleapis/google-cloud-go/commit/174da47254fefb12921bbfc65b7829a453af6f5d)) diff --git a/vendor/cloud.google.com/go/auth/oauth2adapt/LICENSE b/vendor/cloud.google.com/go/auth/oauth2adapt/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/auth/oauth2adapt/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/cloud.google.com/go/auth/oauth2adapt/oauth2adapt.go b/vendor/cloud.google.com/go/auth/oauth2adapt/oauth2adapt.go deleted file mode 100644 index 9cc33e5ee6..0000000000 --- a/vendor/cloud.google.com/go/auth/oauth2adapt/oauth2adapt.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2023 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 oauth2adapt helps converts types used in [cloud.google.com/go/auth] -// and [golang.org/x/oauth2]. -package oauth2adapt - -import ( - "context" - "encoding/json" - "errors" - - "cloud.google.com/go/auth" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" -) - -const ( - oauth2TokenSourceKey = "oauth2.google.tokenSource" - oauth2ServiceAccountKey = "oauth2.google.serviceAccount" - authTokenSourceKey = "auth.google.tokenSource" - authServiceAccountKey = "auth.google.serviceAccount" -) - -// TokenProviderFromTokenSource converts any [golang.org/x/oauth2.TokenSource] -// into a [cloud.google.com/go/auth.TokenProvider]. -func TokenProviderFromTokenSource(ts oauth2.TokenSource) auth.TokenProvider { - return &tokenProviderAdapter{ts: ts} -} - -type tokenProviderAdapter struct { - ts oauth2.TokenSource -} - -// Token fulfills the [cloud.google.com/go/auth.TokenProvider] interface. It -// is a light wrapper around the underlying TokenSource. -func (tp *tokenProviderAdapter) Token(context.Context) (*auth.Token, error) { - tok, err := tp.ts.Token() - if err != nil { - var err2 *oauth2.RetrieveError - if ok := errors.As(err, &err2); ok { - return nil, AuthErrorFromRetrieveError(err2) - } - return nil, err - } - // Preserve compute token metadata, for both types of tokens. - metadata := map[string]interface{}{} - if val, ok := tok.Extra(oauth2TokenSourceKey).(string); ok { - metadata[authTokenSourceKey] = val - metadata[oauth2TokenSourceKey] = val - } - if val, ok := tok.Extra(oauth2ServiceAccountKey).(string); ok { - metadata[authServiceAccountKey] = val - metadata[oauth2ServiceAccountKey] = val - } - return &auth.Token{ - Value: tok.AccessToken, - Type: tok.Type(), - Expiry: tok.Expiry, - Metadata: metadata, - }, nil -} - -// TokenSourceFromTokenProvider converts any -// [cloud.google.com/go/auth.TokenProvider] into a -// [golang.org/x/oauth2.TokenSource]. -func TokenSourceFromTokenProvider(tp auth.TokenProvider) oauth2.TokenSource { - return &tokenSourceAdapter{tp: tp} -} - -type tokenSourceAdapter struct { - tp auth.TokenProvider -} - -// Token fulfills the [golang.org/x/oauth2.TokenSource] interface. It -// is a light wrapper around the underlying TokenProvider. -func (ts *tokenSourceAdapter) Token() (*oauth2.Token, error) { - tok, err := ts.tp.Token(context.Background()) - if err != nil { - var err2 *auth.Error - if ok := errors.As(err, &err2); ok { - return nil, AddRetrieveErrorToAuthError(err2) - } - return nil, err - } - tok2 := &oauth2.Token{ - AccessToken: tok.Value, - TokenType: tok.Type, - Expiry: tok.Expiry, - } - // Preserve token metadata. - m := tok.Metadata - if m != nil { - // Copy map to avoid concurrent map writes error (#11161). - metadata := make(map[string]interface{}, len(m)+2) - for k, v := range m { - metadata[k] = v - } - // Append compute token metadata in converted form. - if val, ok := metadata[authTokenSourceKey].(string); ok && val != "" { - metadata[oauth2TokenSourceKey] = val - } - if val, ok := metadata[authServiceAccountKey].(string); ok && val != "" { - metadata[oauth2ServiceAccountKey] = val - } - tok2 = tok2.WithExtra(metadata) - } - return tok2, nil -} - -// AuthCredentialsFromOauth2Credentials converts a [golang.org/x/oauth2/google.Credentials] -// to a [cloud.google.com/go/auth.Credentials]. -func AuthCredentialsFromOauth2Credentials(creds *google.Credentials) *auth.Credentials { - if creds == nil { - return nil - } - return auth.NewCredentials(&auth.CredentialsOptions{ - TokenProvider: TokenProviderFromTokenSource(creds.TokenSource), - JSON: creds.JSON, - ProjectIDProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) { - return creds.ProjectID, nil - }), - UniverseDomainProvider: auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) { - return creds.GetUniverseDomain() - }), - }) -} - -// Oauth2CredentialsFromAuthCredentials converts a [cloud.google.com/go/auth.Credentials] -// to a [golang.org/x/oauth2/google.Credentials]. -func Oauth2CredentialsFromAuthCredentials(creds *auth.Credentials) *google.Credentials { - if creds == nil { - return nil - } - // Throw away errors as old credentials are not request aware. Also, no - // network requests are currently happening for this use case. - projectID, _ := creds.ProjectID(context.Background()) - - return &google.Credentials{ - TokenSource: TokenSourceFromTokenProvider(creds.TokenProvider), - ProjectID: projectID, - JSON: creds.JSON(), - UniverseDomainProvider: func() (string, error) { - return creds.UniverseDomain(context.Background()) - }, - } -} - -type oauth2Error struct { - ErrorCode string `json:"error"` - ErrorDescription string `json:"error_description"` - ErrorURI string `json:"error_uri"` -} - -// AddRetrieveErrorToAuthError returns the same error provided and adds a -// [golang.org/x/oauth2.RetrieveError] to the error chain by setting the `Err` field on the -// [cloud.google.com/go/auth.Error]. -func AddRetrieveErrorToAuthError(err *auth.Error) *auth.Error { - if err == nil { - return nil - } - e := &oauth2.RetrieveError{ - Response: err.Response, - Body: err.Body, - } - err.Err = e - if len(err.Body) > 0 { - var oErr oauth2Error - // ignore the error as it only fills in extra details - json.Unmarshal(err.Body, &oErr) - e.ErrorCode = oErr.ErrorCode - e.ErrorDescription = oErr.ErrorDescription - e.ErrorURI = oErr.ErrorURI - } - return err -} - -// AuthErrorFromRetrieveError returns an [cloud.google.com/go/auth.Error] that -// wraps the provided [golang.org/x/oauth2.RetrieveError]. -func AuthErrorFromRetrieveError(err *oauth2.RetrieveError) *auth.Error { - if err == nil { - return nil - } - return &auth.Error{ - Response: err.Response, - Body: err.Body, - Err: err, - } -} diff --git a/vendor/cloud.google.com/go/auth/threelegged.go b/vendor/cloud.google.com/go/auth/threelegged.go deleted file mode 100644 index 07804dc162..0000000000 --- a/vendor/cloud.google.com/go/auth/threelegged.go +++ /dev/null @@ -1,382 +0,0 @@ -// Copyright 2023 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 auth - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "log/slog" - "mime" - "net/http" - "net/url" - "strconv" - "strings" - "time" - - "cloud.google.com/go/auth/internal" - "github.com/googleapis/gax-go/v2/internallog" -) - -// AuthorizationHandler is a 3-legged-OAuth helper that prompts the user for -// OAuth consent at the specified auth code URL and returns an auth code and -// state upon approval. -type AuthorizationHandler func(authCodeURL string) (code string, state string, err error) - -// Options3LO are the options for doing a 3-legged OAuth2 flow. -type Options3LO struct { - // ClientID is the application's ID. - ClientID string - // ClientSecret is the application's secret. Not required if AuthHandlerOpts - // is set. - ClientSecret string - // AuthURL is the URL for authenticating. - AuthURL string - // TokenURL is the URL for retrieving a token. - TokenURL string - // AuthStyle is used to describe how to client info in the token request. - AuthStyle Style - // RefreshToken is the token used to refresh the credential. Not required - // if AuthHandlerOpts is set. - RefreshToken string - // RedirectURL is the URL to redirect users to. Optional. - RedirectURL string - // Scopes specifies requested permissions for the Token. Optional. - Scopes []string - - // URLParams are the set of values to apply to the token exchange. Optional. - URLParams url.Values - // Client is the client to be used to make the underlying token requests. - // Optional. - Client *http.Client - // EarlyTokenExpiry is the time before the token expires that it should be - // refreshed. If not set the default value is 3 minutes and 45 seconds. - // Optional. - EarlyTokenExpiry time.Duration - - // AuthHandlerOpts provides a set of options for doing a - // 3-legged OAuth2 flow with a custom [AuthorizationHandler]. Optional. - AuthHandlerOpts *AuthorizationHandlerOptions - // Logger is used for debug logging. If provided, logging will be enabled - // at the loggers configured level. By default logging is disabled unless - // enabled by setting GOOGLE_SDK_GO_LOGGING_LEVEL in which case a default - // logger will be used. Optional. - Logger *slog.Logger -} - -func (o *Options3LO) validate() error { - if o == nil { - return errors.New("auth: options must be provided") - } - if o.ClientID == "" { - return errors.New("auth: client ID must be provided") - } - if o.AuthHandlerOpts == nil && o.ClientSecret == "" { - return errors.New("auth: client secret must be provided") - } - if o.AuthURL == "" { - return errors.New("auth: auth URL must be provided") - } - if o.TokenURL == "" { - return errors.New("auth: token URL must be provided") - } - if o.AuthStyle == StyleUnknown { - return errors.New("auth: auth style must be provided") - } - if o.AuthHandlerOpts == nil && o.RefreshToken == "" { - return errors.New("auth: refresh token must be provided") - } - return nil -} - -func (o *Options3LO) logger() *slog.Logger { - return internallog.New(o.Logger) -} - -// PKCEOptions holds parameters to support PKCE. -type PKCEOptions struct { - // Challenge is the un-padded, base64-url-encoded string of the encrypted code verifier. - Challenge string // The un-padded, base64-url-encoded string of the encrypted code verifier. - // ChallengeMethod is the encryption method (ex. S256). - ChallengeMethod string - // Verifier is the original, non-encrypted secret. - Verifier string // The original, non-encrypted secret. -} - -type tokenJSON struct { - AccessToken string `json:"access_token"` - TokenType string `json:"token_type"` - RefreshToken string `json:"refresh_token"` - ExpiresIn int `json:"expires_in"` - // error fields - ErrorCode string `json:"error"` - ErrorDescription string `json:"error_description"` - ErrorURI string `json:"error_uri"` -} - -func (e *tokenJSON) expiry() (t time.Time) { - if v := e.ExpiresIn; v != 0 { - return time.Now().Add(time.Duration(v) * time.Second) - } - return -} - -func (o *Options3LO) client() *http.Client { - if o.Client != nil { - return o.Client - } - return internal.DefaultClient() -} - -// authCodeURL returns a URL that points to a OAuth2 consent page. -func (o *Options3LO) authCodeURL(state string, values url.Values) string { - var buf bytes.Buffer - buf.WriteString(o.AuthURL) - v := url.Values{ - "response_type": {"code"}, - "client_id": {o.ClientID}, - } - if o.RedirectURL != "" { - v.Set("redirect_uri", o.RedirectURL) - } - if len(o.Scopes) > 0 { - v.Set("scope", strings.Join(o.Scopes, " ")) - } - if state != "" { - v.Set("state", state) - } - if o.AuthHandlerOpts != nil { - if o.AuthHandlerOpts.PKCEOpts != nil && - o.AuthHandlerOpts.PKCEOpts.Challenge != "" { - v.Set(codeChallengeKey, o.AuthHandlerOpts.PKCEOpts.Challenge) - } - if o.AuthHandlerOpts.PKCEOpts != nil && - o.AuthHandlerOpts.PKCEOpts.ChallengeMethod != "" { - v.Set(codeChallengeMethodKey, o.AuthHandlerOpts.PKCEOpts.ChallengeMethod) - } - } - for k := range values { - v.Set(k, v.Get(k)) - } - if strings.Contains(o.AuthURL, "?") { - buf.WriteByte('&') - } else { - buf.WriteByte('?') - } - buf.WriteString(v.Encode()) - return buf.String() -} - -// New3LOTokenProvider returns a [TokenProvider] based on the 3-legged OAuth2 -// configuration. The TokenProvider is caches and auto-refreshes tokens by -// default. -func New3LOTokenProvider(opts *Options3LO) (TokenProvider, error) { - if err := opts.validate(); err != nil { - return nil, err - } - if opts.AuthHandlerOpts != nil { - return new3LOTokenProviderWithAuthHandler(opts), nil - } - return NewCachedTokenProvider(&tokenProvider3LO{opts: opts, refreshToken: opts.RefreshToken, client: opts.client()}, &CachedTokenProviderOptions{ - ExpireEarly: opts.EarlyTokenExpiry, - }), nil -} - -// AuthorizationHandlerOptions provides a set of options to specify for doing a -// 3-legged OAuth2 flow with a custom [AuthorizationHandler]. -type AuthorizationHandlerOptions struct { - // AuthorizationHandler specifies the handler used to for the authorization - // part of the flow. - Handler AuthorizationHandler - // State is used verify that the "state" is identical in the request and - // response before exchanging the auth code for OAuth2 token. - State string - // PKCEOpts allows setting configurations for PKCE. Optional. - PKCEOpts *PKCEOptions -} - -func new3LOTokenProviderWithAuthHandler(opts *Options3LO) TokenProvider { - return NewCachedTokenProvider(&tokenProviderWithHandler{opts: opts, state: opts.AuthHandlerOpts.State}, &CachedTokenProviderOptions{ - ExpireEarly: opts.EarlyTokenExpiry, - }) -} - -// exchange handles the final exchange portion of the 3lo flow. Returns a Token, -// refreshToken, and error. -func (o *Options3LO) exchange(ctx context.Context, code string) (*Token, string, error) { - // Build request - v := url.Values{ - "grant_type": {"authorization_code"}, - "code": {code}, - } - if o.RedirectURL != "" { - v.Set("redirect_uri", o.RedirectURL) - } - if o.AuthHandlerOpts != nil && - o.AuthHandlerOpts.PKCEOpts != nil && - o.AuthHandlerOpts.PKCEOpts.Verifier != "" { - v.Set(codeVerifierKey, o.AuthHandlerOpts.PKCEOpts.Verifier) - } - for k := range o.URLParams { - v.Set(k, o.URLParams.Get(k)) - } - return fetchToken(ctx, o, v) -} - -// This struct is not safe for concurrent access alone, but the way it is used -// in this package by wrapping it with a cachedTokenProvider makes it so. -type tokenProvider3LO struct { - opts *Options3LO - client *http.Client - refreshToken string -} - -func (tp *tokenProvider3LO) Token(ctx context.Context) (*Token, error) { - if tp.refreshToken == "" { - return nil, errors.New("auth: token expired and refresh token is not set") - } - v := url.Values{ - "grant_type": {"refresh_token"}, - "refresh_token": {tp.refreshToken}, - } - for k := range tp.opts.URLParams { - v.Set(k, tp.opts.URLParams.Get(k)) - } - - tk, rt, err := fetchToken(ctx, tp.opts, v) - if err != nil { - return nil, err - } - if tp.refreshToken != rt && rt != "" { - tp.refreshToken = rt - } - return tk, err -} - -type tokenProviderWithHandler struct { - opts *Options3LO - state string -} - -func (tp tokenProviderWithHandler) Token(ctx context.Context) (*Token, error) { - url := tp.opts.authCodeURL(tp.state, nil) - code, state, err := tp.opts.AuthHandlerOpts.Handler(url) - if err != nil { - return nil, err - } - if state != tp.state { - return nil, errors.New("auth: state mismatch in 3-legged-OAuth flow") - } - tok, _, err := tp.opts.exchange(ctx, code) - return tok, err -} - -// fetchToken returns a Token, refresh token, and/or an error. -func fetchToken(ctx context.Context, o *Options3LO, v url.Values) (*Token, string, error) { - var refreshToken string - if o.AuthStyle == StyleInParams { - if o.ClientID != "" { - v.Set("client_id", o.ClientID) - } - if o.ClientSecret != "" { - v.Set("client_secret", o.ClientSecret) - } - } - req, err := http.NewRequestWithContext(ctx, "POST", o.TokenURL, strings.NewReader(v.Encode())) - if err != nil { - return nil, refreshToken, err - } - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - if o.AuthStyle == StyleInHeader { - req.SetBasicAuth(url.QueryEscape(o.ClientID), url.QueryEscape(o.ClientSecret)) - } - logger := o.logger() - - logger.DebugContext(ctx, "3LO token request", "request", internallog.HTTPRequest(req, []byte(v.Encode()))) - // Make request - resp, body, err := internal.DoRequest(o.client(), req) - if err != nil { - return nil, refreshToken, err - } - logger.DebugContext(ctx, "3LO token response", "response", internallog.HTTPResponse(resp, body)) - failureStatus := resp.StatusCode < 200 || resp.StatusCode > 299 - tokError := &Error{ - Response: resp, - Body: body, - } - - var token *Token - // errors ignored because of default switch on content - content, _, _ := mime.ParseMediaType(resp.Header.Get("Content-Type")) - switch content { - case "application/x-www-form-urlencoded", "text/plain": - // some endpoints return a query string - vals, err := url.ParseQuery(string(body)) - if err != nil { - if failureStatus { - return nil, refreshToken, tokError - } - return nil, refreshToken, fmt.Errorf("auth: cannot parse response: %w", err) - } - tokError.code = vals.Get("error") - tokError.description = vals.Get("error_description") - tokError.uri = vals.Get("error_uri") - token = &Token{ - Value: vals.Get("access_token"), - Type: vals.Get("token_type"), - Metadata: make(map[string]interface{}, len(vals)), - } - for k, v := range vals { - token.Metadata[k] = v - } - refreshToken = vals.Get("refresh_token") - e := vals.Get("expires_in") - expires, _ := strconv.Atoi(e) - if expires != 0 { - token.Expiry = time.Now().Add(time.Duration(expires) * time.Second) - } - default: - var tj tokenJSON - if err = json.Unmarshal(body, &tj); err != nil { - if failureStatus { - return nil, refreshToken, tokError - } - return nil, refreshToken, fmt.Errorf("auth: cannot parse json: %w", err) - } - tokError.code = tj.ErrorCode - tokError.description = tj.ErrorDescription - tokError.uri = tj.ErrorURI - token = &Token{ - Value: tj.AccessToken, - Type: tj.TokenType, - Expiry: tj.expiry(), - Metadata: make(map[string]interface{}), - } - json.Unmarshal(body, &token.Metadata) // optional field, skip err check - refreshToken = tj.RefreshToken - } - // according to spec, servers should respond status 400 in error case - // https://www.rfc-editor.org/rfc/rfc6749#section-5.2 - // but some unorthodox servers respond 200 in error case - if failureStatus || tokError.code != "" { - return nil, refreshToken, tokError - } - if token.Value == "" { - return nil, refreshToken, errors.New("auth: server response missing access_token") - } - return token, refreshToken, nil -} diff --git a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md deleted file mode 100644 index e384683c50..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md +++ /dev/null @@ -1,115 +0,0 @@ -# Changes - -## [0.9.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.4...compute/metadata/v0.9.0) (2025-09-24) - - -### Features - -* **compute/metadata:** Retry on HTTP 429 ([#12932](https://github.com/googleapis/google-cloud-go/issues/12932)) ([1e91f5c](https://github.com/googleapis/google-cloud-go/commit/1e91f5c07acacd38ecdd4ff3e83e092b745e0bc2)) - -## [0.8.4](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.3...compute/metadata/v0.8.4) (2025-09-18) - - -### Bug Fixes - -* **compute/metadata:** Set subClient for UseDefaultClient case ([#12911](https://github.com/googleapis/google-cloud-go/issues/12911)) ([9e2646b](https://github.com/googleapis/google-cloud-go/commit/9e2646b1821231183fd775bb107c062865eeaccd)) - -## [0.8.3](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.2...compute/metadata/v0.8.3) (2025-09-17) - - -### Bug Fixes - -* **compute/metadata:** Disable Client timeouts for subscription client ([#12910](https://github.com/googleapis/google-cloud-go/issues/12910)) ([187a58a](https://github.com/googleapis/google-cloud-go/commit/187a58a540494e1e8562b046325b8cad8cf7af4a)) - -## [0.8.2](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.1...compute/metadata/v0.8.2) (2025-09-17) - - -### Bug Fixes - -* **compute/metadata:** Racy test and uninitialized subClient ([#12892](https://github.com/googleapis/google-cloud-go/issues/12892)) ([4943ca2](https://github.com/googleapis/google-cloud-go/commit/4943ca2bf83908a23806247bc4252dfb440d09cc)), refs [#12888](https://github.com/googleapis/google-cloud-go/issues/12888) - -## [0.8.1](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.8.0...compute/metadata/v0.8.1) (2025-09-16) - - -### Bug Fixes - -* **compute/metadata:** Use separate client for subscribe methods ([#12885](https://github.com/googleapis/google-cloud-go/issues/12885)) ([76b80f8](https://github.com/googleapis/google-cloud-go/commit/76b80f8df9bf9339d175407e8c15936fe1ac1c9c)) - -## [0.8.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.7.0...compute/metadata/v0.8.0) (2025-08-06) - - -### Features - -* **compute/metadata:** Add Options.UseDefaultClient ([#12657](https://github.com/googleapis/google-cloud-go/issues/12657)) ([1a88209](https://github.com/googleapis/google-cloud-go/commit/1a8820900f20e038291c4bb2c5284a449196e81f)), refs [#11078](https://github.com/googleapis/google-cloud-go/issues/11078) - -## [0.7.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.6.0...compute/metadata/v0.7.0) (2025-05-13) - - -### Features - -* **compute/metadata:** Allow canceling GCE detection ([#11786](https://github.com/googleapis/google-cloud-go/issues/11786)) ([78100fe](https://github.com/googleapis/google-cloud-go/commit/78100fe7e28cd30f1e10b47191ac3c9839663b64)) - -## [0.6.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.5.2...compute/metadata/v0.6.0) (2024-12-13) - - -### Features - -* **compute/metadata:** Add debug logging ([#11078](https://github.com/googleapis/google-cloud-go/issues/11078)) ([a816814](https://github.com/googleapis/google-cloud-go/commit/a81681463906e4473570a2f426eb0dc2de64e53f)) - -## [0.5.2](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.5.1...compute/metadata/v0.5.2) (2024-09-20) - - -### Bug Fixes - -* **compute/metadata:** Close Response Body for failed request ([#10891](https://github.com/googleapis/google-cloud-go/issues/10891)) ([e91d45e](https://github.com/googleapis/google-cloud-go/commit/e91d45e4757a9e354114509ba9800085d9e0ff1f)) - -## [0.5.1](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.5.0...compute/metadata/v0.5.1) (2024-09-12) - - -### Bug Fixes - -* **compute/metadata:** Check error chain for retryable error ([#10840](https://github.com/googleapis/google-cloud-go/issues/10840)) ([2bdedef](https://github.com/googleapis/google-cloud-go/commit/2bdedeff621b223d63cebc4355fcf83bc68412cd)) - -## [0.5.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.4.0...compute/metadata/v0.5.0) (2024-07-10) - - -### Features - -* **compute/metadata:** Add sys check for windows OnGCE ([#10521](https://github.com/googleapis/google-cloud-go/issues/10521)) ([3b9a830](https://github.com/googleapis/google-cloud-go/commit/3b9a83063960d2a2ac20beb47cc15818a68bd302)) - -## [0.4.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.3.0...compute/metadata/v0.4.0) (2024-07-01) - - -### Features - -* **compute/metadata:** Add context for all functions/methods ([#10370](https://github.com/googleapis/google-cloud-go/issues/10370)) ([66b8efe](https://github.com/googleapis/google-cloud-go/commit/66b8efe7ad877e052b2987bb4475477e38c67bb3)) - - -### Documentation - -* **compute/metadata:** Update OnGCE description ([#10408](https://github.com/googleapis/google-cloud-go/issues/10408)) ([6a46dca](https://github.com/googleapis/google-cloud-go/commit/6a46dca4eae4f88ec6f88822e01e5bf8aeca787f)) - -## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.3...compute/metadata/v0.3.0) (2024-04-15) - - -### Features - -* **compute/metadata:** Add context aware functions ([#9733](https://github.com/googleapis/google-cloud-go/issues/9733)) ([e4eb5b4](https://github.com/googleapis/google-cloud-go/commit/e4eb5b46ee2aec9d2fc18300bfd66015e25a0510)) - -## [0.2.3](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.2...compute/metadata/v0.2.3) (2022-12-15) - - -### Bug Fixes - -* **compute/metadata:** Switch DNS lookup to an absolute lookup ([119b410](https://github.com/googleapis/google-cloud-go/commit/119b41060c7895e45e48aee5621ad35607c4d021)), refs [#7165](https://github.com/googleapis/google-cloud-go/issues/7165) - -## [0.2.2](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.1...compute/metadata/v0.2.2) (2022-12-01) - - -### Bug Fixes - -* **compute/metadata:** Set IdleConnTimeout for http.Client ([#7084](https://github.com/googleapis/google-cloud-go/issues/7084)) ([766516a](https://github.com/googleapis/google-cloud-go/commit/766516aaf3816bfb3159efeea65aa3d1d205a3e2)), refs [#5430](https://github.com/googleapis/google-cloud-go/issues/5430) - -## [0.1.0] (2022-10-26) - -Initial release of metadata being it's own module. diff --git a/vendor/cloud.google.com/go/compute/metadata/LICENSE b/vendor/cloud.google.com/go/compute/metadata/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/cloud.google.com/go/compute/metadata/README.md b/vendor/cloud.google.com/go/compute/metadata/README.md deleted file mode 100644 index f940fb2c85..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Compute API - -[![Go Reference](https://pkg.go.dev/badge/cloud.google.com/go/compute.svg)](https://pkg.go.dev/cloud.google.com/go/compute/metadata) - -This is a utility library for communicating with Google Cloud metadata service -on Google Cloud. - -## Install - -```bash -go get cloud.google.com/go/compute/metadata -``` - -## Go Version Support - -See the [Go Versions Supported](https://github.com/googleapis/google-cloud-go#go-versions-supported) -section in the root directory's README. - -## Contributing - -Contributions are welcome. Please, see the [CONTRIBUTING](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md) -document for details. - -Please note that this project is released with a Contributor Code of Conduct. -By participating in this project you agree to abide by its terms. See -[Contributor Code of Conduct](https://github.com/GoogleCloudPlatform/google-cloud-go/blob/main/CONTRIBUTING.md#contributor-code-of-conduct) -for more information. diff --git a/vendor/cloud.google.com/go/compute/metadata/log.go b/vendor/cloud.google.com/go/compute/metadata/log.go deleted file mode 100644 index 8ec673b882..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/log.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2024 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 metadata - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "log/slog" - "net/http" - "strings" -) - -// Code below this point is copied from github.com/googleapis/gax-go/v2/internallog -// to avoid the dependency. The compute/metadata module is used by too many -// non-client library modules that can't justify the dependency. - -// The handler returned if logging is not enabled. -type noOpHandler struct{} - -func (h noOpHandler) Enabled(_ context.Context, _ slog.Level) bool { - return false -} - -func (h noOpHandler) Handle(_ context.Context, _ slog.Record) error { - return nil -} - -func (h noOpHandler) WithAttrs(_ []slog.Attr) slog.Handler { - return h -} - -func (h noOpHandler) WithGroup(_ string) slog.Handler { - return h -} - -// httpRequest returns a lazily evaluated [slog.LogValuer] for a -// [http.Request] and the associated body. -func httpRequest(req *http.Request, body []byte) slog.LogValuer { - return &request{ - req: req, - payload: body, - } -} - -type request struct { - req *http.Request - payload []byte -} - -func (r *request) LogValue() slog.Value { - if r == nil || r.req == nil { - return slog.Value{} - } - var groupValueAttrs []slog.Attr - groupValueAttrs = append(groupValueAttrs, slog.String("method", r.req.Method)) - groupValueAttrs = append(groupValueAttrs, slog.String("url", r.req.URL.String())) - - var headerAttr []slog.Attr - for k, val := range r.req.Header { - headerAttr = append(headerAttr, slog.String(k, strings.Join(val, ","))) - } - if len(headerAttr) > 0 { - groupValueAttrs = append(groupValueAttrs, slog.Any("headers", headerAttr)) - } - - if len(r.payload) > 0 { - if attr, ok := processPayload(r.payload); ok { - groupValueAttrs = append(groupValueAttrs, attr) - } - } - return slog.GroupValue(groupValueAttrs...) -} - -// httpResponse returns a lazily evaluated [slog.LogValuer] for a -// [http.Response] and the associated body. -func httpResponse(resp *http.Response, body []byte) slog.LogValuer { - return &response{ - resp: resp, - payload: body, - } -} - -type response struct { - resp *http.Response - payload []byte -} - -func (r *response) LogValue() slog.Value { - if r == nil { - return slog.Value{} - } - var groupValueAttrs []slog.Attr - groupValueAttrs = append(groupValueAttrs, slog.String("status", fmt.Sprint(r.resp.StatusCode))) - - var headerAttr []slog.Attr - for k, val := range r.resp.Header { - headerAttr = append(headerAttr, slog.String(k, strings.Join(val, ","))) - } - if len(headerAttr) > 0 { - groupValueAttrs = append(groupValueAttrs, slog.Any("headers", headerAttr)) - } - - if len(r.payload) > 0 { - if attr, ok := processPayload(r.payload); ok { - groupValueAttrs = append(groupValueAttrs, attr) - } - } - return slog.GroupValue(groupValueAttrs...) -} - -func processPayload(payload []byte) (slog.Attr, bool) { - peekChar := payload[0] - if peekChar == '{' { - // JSON object - var m map[string]any - if err := json.Unmarshal(payload, &m); err == nil { - return slog.Any("payload", m), true - } - } else if peekChar == '[' { - // JSON array - var m []any - if err := json.Unmarshal(payload, &m); err == nil { - return slog.Any("payload", m), true - } - } else { - // Everything else - buf := &bytes.Buffer{} - if err := json.Compact(buf, payload); err != nil { - // Write raw payload incase of error - buf.Write(payload) - } - return slog.String("payload", buf.String()), true - } - return slog.Attr{}, false -} diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go deleted file mode 100644 index 6bd1891660..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ /dev/null @@ -1,937 +0,0 @@ -// Copyright 2014 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 metadata provides access to Google Compute Engine (GCE) -// metadata and API service accounts. -// -// This package is a wrapper around the GCE metadata service, -// as documented at https://cloud.google.com/compute/docs/metadata/overview. -package metadata // import "cloud.google.com/go/compute/metadata" - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net" - "net/http" - "net/url" - "os" - "strings" - "sync" - "time" -) - -const ( - // metadataIP is the documented metadata server IP address. - metadataIP = "169.254.169.254" - - // metadataHostEnv is the environment variable specifying the - // GCE metadata hostname. If empty, the default value of - // metadataIP ("169.254.169.254") is used instead. - // This is variable name is not defined by any spec, as far as - // I know; it was made up for the Go package. - metadataHostEnv = "GCE_METADATA_HOST" - - userAgent = "gcloud-golang/0.1" -) - -type cachedValue struct { - k string - trim bool - mu sync.Mutex - v string -} - -var ( - projID = &cachedValue{k: "project/project-id", trim: true} - projNum = &cachedValue{k: "project/numeric-project-id", trim: true} - instID = &cachedValue{k: "instance/id", trim: true} -) - -var defaultClient = &Client{ - hc: newDefaultHTTPClient(true), - subClient: newDefaultHTTPClient(false), - logger: slog.New(noOpHandler{}), -} - -func newDefaultHTTPClient(enableTimeouts bool) *http.Client { - transport := &http.Transport{ - Dial: (&net.Dialer{ - Timeout: 2 * time.Second, - KeepAlive: 30 * time.Second, - }).Dial, - } - c := &http.Client{ - Transport: transport, - } - if enableTimeouts { - transport.IdleConnTimeout = 60 * time.Second - c.Timeout = 5 * time.Second - } - return c -} - -// NotDefinedError is returned when requested metadata is not defined. -// -// The underlying string is the suffix after "/computeMetadata/v1/". -// -// This error is not returned if the value is defined to be the empty -// string. -type NotDefinedError string - -func (suffix NotDefinedError) Error() string { - return fmt.Sprintf("metadata: GCE metadata %q not defined", string(suffix)) -} - -func (c *cachedValue) get(ctx context.Context, cl *Client) (v string, err error) { - defer c.mu.Unlock() - c.mu.Lock() - if c.v != "" { - return c.v, nil - } - if c.trim { - v, err = cl.getTrimmed(ctx, c.k) - } else { - v, err = cl.GetWithContext(ctx, c.k) - } - if err == nil { - c.v = v - } - return -} - -var ( - onGCEOnce sync.Once - onGCE bool -) - -// OnGCE reports whether this process is running on Google Compute Platforms. -// NOTE: True returned from `OnGCE` does not guarantee that the metadata server -// is accessible from this process and have all the metadata defined. -func OnGCE() bool { - return OnGCEWithContext(context.Background()) -} - -// OnGCEWithContext reports whether this process is running on Google Compute Platforms. -// This function's return value is memoized for better performance. -// NOTE: True returned from `OnGCEWithContext` does not guarantee that the metadata server -// is accessible from this process and have all the metadata defined. -func OnGCEWithContext(ctx context.Context) bool { - onGCEOnce.Do(func() { - onGCE = defaultClient.OnGCEWithContext(ctx) - }) - return onGCE -} - -// Subscribe calls Client.SubscribeWithContext on the default client. -// -// Deprecated: Please use the context aware variant [SubscribeWithContext]. -func Subscribe(suffix string, fn func(v string, ok bool) error) error { - return defaultClient.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) }) -} - -// SubscribeWithContext calls Client.SubscribeWithContext on the default client. -func SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error { - return defaultClient.SubscribeWithContext(ctx, suffix, fn) -} - -// Get calls Client.GetWithContext on the default client. -// -// Deprecated: Please use the context aware variant [GetWithContext]. -func Get(suffix string) (string, error) { - return defaultClient.GetWithContext(context.Background(), suffix) -} - -// GetWithContext calls Client.GetWithContext on the default client. -func GetWithContext(ctx context.Context, suffix string) (string, error) { - return defaultClient.GetWithContext(ctx, suffix) -} - -// ProjectID returns the current instance's project ID string. -// -// Deprecated: Please use the context aware variant [ProjectIDWithContext]. -func ProjectID() (string, error) { - return defaultClient.ProjectIDWithContext(context.Background()) -} - -// ProjectIDWithContext returns the current instance's project ID string. -func ProjectIDWithContext(ctx context.Context) (string, error) { - return defaultClient.ProjectIDWithContext(ctx) -} - -// NumericProjectID returns the current instance's numeric project ID. -// -// Deprecated: Please use the context aware variant [NumericProjectIDWithContext]. -func NumericProjectID() (string, error) { - return defaultClient.NumericProjectIDWithContext(context.Background()) -} - -// NumericProjectIDWithContext returns the current instance's numeric project ID. -func NumericProjectIDWithContext(ctx context.Context) (string, error) { - return defaultClient.NumericProjectIDWithContext(ctx) -} - -// InternalIP returns the instance's primary internal IP address. -// -// Deprecated: Please use the context aware variant [InternalIPWithContext]. -func InternalIP() (string, error) { - return defaultClient.InternalIPWithContext(context.Background()) -} - -// InternalIPWithContext returns the instance's primary internal IP address. -func InternalIPWithContext(ctx context.Context) (string, error) { - return defaultClient.InternalIPWithContext(ctx) -} - -// ExternalIP returns the instance's primary external (public) IP address. -// -// Deprecated: Please use the context aware variant [ExternalIPWithContext]. -func ExternalIP() (string, error) { - return defaultClient.ExternalIPWithContext(context.Background()) -} - -// ExternalIPWithContext returns the instance's primary external (public) IP address. -func ExternalIPWithContext(ctx context.Context) (string, error) { - return defaultClient.ExternalIPWithContext(ctx) -} - -// Email calls Client.EmailWithContext on the default client. -// -// Deprecated: Please use the context aware variant [EmailWithContext]. -func Email(serviceAccount string) (string, error) { - return defaultClient.EmailWithContext(context.Background(), serviceAccount) -} - -// EmailWithContext calls Client.EmailWithContext on the default client. -func EmailWithContext(ctx context.Context, serviceAccount string) (string, error) { - return defaultClient.EmailWithContext(ctx, serviceAccount) -} - -// Hostname returns the instance's hostname. This will be of the form -// ".c..internal". -// -// Deprecated: Please use the context aware variant [HostnameWithContext]. -func Hostname() (string, error) { - return defaultClient.HostnameWithContext(context.Background()) -} - -// HostnameWithContext returns the instance's hostname. This will be of the form -// ".c..internal". -func HostnameWithContext(ctx context.Context) (string, error) { - return defaultClient.HostnameWithContext(ctx) -} - -// InstanceTags returns the list of user-defined instance tags, -// assigned when initially creating a GCE instance. -// -// Deprecated: Please use the context aware variant [InstanceTagsWithContext]. -func InstanceTags() ([]string, error) { - return defaultClient.InstanceTagsWithContext(context.Background()) -} - -// InstanceTagsWithContext returns the list of user-defined instance tags, -// assigned when initially creating a GCE instance. -func InstanceTagsWithContext(ctx context.Context) ([]string, error) { - return defaultClient.InstanceTagsWithContext(ctx) -} - -// InstanceID returns the current VM's numeric instance ID. -// -// Deprecated: Please use the context aware variant [InstanceIDWithContext]. -func InstanceID() (string, error) { - return defaultClient.InstanceIDWithContext(context.Background()) -} - -// InstanceIDWithContext returns the current VM's numeric instance ID. -func InstanceIDWithContext(ctx context.Context) (string, error) { - return defaultClient.InstanceIDWithContext(ctx) -} - -// InstanceName returns the current VM's instance ID string. -// -// Deprecated: Please use the context aware variant [InstanceNameWithContext]. -func InstanceName() (string, error) { - return defaultClient.InstanceNameWithContext(context.Background()) -} - -// InstanceNameWithContext returns the current VM's instance ID string. -func InstanceNameWithContext(ctx context.Context) (string, error) { - return defaultClient.InstanceNameWithContext(ctx) -} - -// Zone returns the current VM's zone, such as "us-central1-b". -// -// Deprecated: Please use the context aware variant [ZoneWithContext]. -func Zone() (string, error) { - return defaultClient.ZoneWithContext(context.Background()) -} - -// ZoneWithContext returns the current VM's zone, such as "us-central1-b". -func ZoneWithContext(ctx context.Context) (string, error) { - return defaultClient.ZoneWithContext(ctx) -} - -// InstanceAttributes calls Client.InstanceAttributesWithContext on the default client. -// -// Deprecated: Please use the context aware variant [InstanceAttributesWithContext. -func InstanceAttributes() ([]string, error) { - return defaultClient.InstanceAttributesWithContext(context.Background()) -} - -// InstanceAttributesWithContext calls Client.ProjectAttributesWithContext on the default client. -func InstanceAttributesWithContext(ctx context.Context) ([]string, error) { - return defaultClient.InstanceAttributesWithContext(ctx) -} - -// ProjectAttributes calls Client.ProjectAttributesWithContext on the default client. -// -// Deprecated: Please use the context aware variant [ProjectAttributesWithContext]. -func ProjectAttributes() ([]string, error) { - return defaultClient.ProjectAttributesWithContext(context.Background()) -} - -// ProjectAttributesWithContext calls Client.ProjectAttributesWithContext on the default client. -func ProjectAttributesWithContext(ctx context.Context) ([]string, error) { - return defaultClient.ProjectAttributesWithContext(ctx) -} - -// InstanceAttributeValue calls Client.InstanceAttributeValueWithContext on the default client. -// -// Deprecated: Please use the context aware variant [InstanceAttributeValueWithContext]. -func InstanceAttributeValue(attr string) (string, error) { - return defaultClient.InstanceAttributeValueWithContext(context.Background(), attr) -} - -// InstanceAttributeValueWithContext calls Client.InstanceAttributeValueWithContext on the default client. -func InstanceAttributeValueWithContext(ctx context.Context, attr string) (string, error) { - return defaultClient.InstanceAttributeValueWithContext(ctx, attr) -} - -// ProjectAttributeValue calls Client.ProjectAttributeValueWithContext on the default client. -// -// Deprecated: Please use the context aware variant [ProjectAttributeValueWithContext]. -func ProjectAttributeValue(attr string) (string, error) { - return defaultClient.ProjectAttributeValueWithContext(context.Background(), attr) -} - -// ProjectAttributeValueWithContext calls Client.ProjectAttributeValueWithContext on the default client. -func ProjectAttributeValueWithContext(ctx context.Context, attr string) (string, error) { - return defaultClient.ProjectAttributeValueWithContext(ctx, attr) -} - -// Scopes calls Client.ScopesWithContext on the default client. -// -// Deprecated: Please use the context aware variant [ScopesWithContext]. -func Scopes(serviceAccount string) ([]string, error) { - return defaultClient.ScopesWithContext(context.Background(), serviceAccount) -} - -// ScopesWithContext calls Client.ScopesWithContext on the default client. -func ScopesWithContext(ctx context.Context, serviceAccount string) ([]string, error) { - return defaultClient.ScopesWithContext(ctx, serviceAccount) -} - -func strsContains(ss []string, s string) bool { - for _, v := range ss { - if v == s { - return true - } - } - return false -} - -// A Client provides metadata. -type Client struct { - hc *http.Client - // subClient by default is a HTTP Client that is only used for subscribe - // methods that should not specify a timeout. If the user specifies a client - // this with be the same as 'hc'. - subClient *http.Client - logger *slog.Logger -} - -// Options for configuring a [Client]. -type Options struct { - // Client is the HTTP client used to make requests. Optional. - // If UseDefaultClient is true, this field is ignored. - // If this field is nil, a new default http.Client will be created. - Client *http.Client - // Logger is used to log information about HTTP request and responses. - // If not provided, nothing will be logged. Optional. - Logger *slog.Logger - // UseDefaultClient specifies that the client should use the same default - // internal http.Client that is used in functions such as GetWithContext. - // This is useful for sharing a single TCP connection pool across requests. - // The difference vs GetWithContext is the ability to use this struct - // to provide a custom logger. If this field is true, the Client - // field is ignored. - UseDefaultClient bool -} - -// NewClient returns a Client that can be used to fetch metadata. -// Returns the client that uses the specified http.Client for HTTP requests. -// If nil is specified, returns the default internal Client that is -// also used in functions such as GetWithContext. This is useful for sharing -// a single TCP connection pool across requests. -func NewClient(c *http.Client) *Client { - if c == nil { - // Preserve original behavior for nil argument. - return defaultClient - } - // Return a new client with a no-op logger for backward compatibility. - return &Client{hc: c, subClient: c, logger: slog.New(noOpHandler{})} -} - -// NewWithOptions returns a Client that is configured with the provided Options. -func NewWithOptions(opts *Options) *Client { - // Preserve original behavior for nil opts. - if opts == nil { - return defaultClient - } - - // Handle explicit request for the internal default http.Client. - if opts.UseDefaultClient { - logger := opts.Logger - if logger == nil { - logger = slog.New(noOpHandler{}) - } - return &Client{hc: defaultClient.hc, subClient: defaultClient.subClient, logger: logger} - } - - // Handle isolated client creation. - client := opts.Client - subClient := opts.Client - if client == nil { - client = newDefaultHTTPClient(true) - subClient = newDefaultHTTPClient(false) - } - logger := opts.Logger - if logger == nil { - logger = slog.New(noOpHandler{}) - } - return &Client{hc: client, subClient: subClient, logger: logger} -} - -// NOTE: metadataRequestStrategy is assigned to a variable for test stubbing purposes. -var metadataRequestStrategy = func(ctx context.Context, httpClient *http.Client, resc chan bool) { - req, _ := http.NewRequest("GET", "http://"+metadataIP, nil) - req.Header.Set("User-Agent", userAgent) - res, err := httpClient.Do(req.WithContext(ctx)) - if err != nil { - resc <- false - return - } - defer res.Body.Close() - resc <- res.Header.Get("Metadata-Flavor") == "Google" -} - -// NOTE: dnsRequestStrategy is assigned to a variable for test stubbing purposes. -var dnsRequestStrategy = func(ctx context.Context, resc chan bool) { - resolver := &net.Resolver{} - addrs, err := resolver.LookupHost(ctx, "metadata.google.internal.") - if err != nil || len(addrs) == 0 { - resc <- false - return - } - resc <- strsContains(addrs, metadataIP) -} - -// OnGCEWithContext reports whether this process is running on Google Compute Platforms. -// NOTE: True returned from `OnGCEWithContext` does not guarantee that the metadata server -// is accessible from this process and have all the metadata defined. -func (c *Client) OnGCEWithContext(ctx context.Context) bool { - // The user explicitly said they're on GCE, so trust them. - if os.Getenv(metadataHostEnv) != "" { - return true - } - - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - resc := make(chan bool, 2) - - // Try two strategies in parallel. - // See https://github.com/googleapis/google-cloud-go/issues/194 - go metadataRequestStrategy(ctx, c.hc, resc) - go dnsRequestStrategy(ctx, resc) - - tryHarder := systemInfoSuggestsGCE() - if tryHarder { - res := <-resc - if res { - // The first strategy succeeded, so let's use it. - return true - } - - // Wait for either the DNS or metadata server probe to - // contradict the other one and say we are running on - // GCE. Give it a lot of time to do so, since the system - // info already suggests we're running on a GCE BIOS. - // Ensure cancellations from the calling context are respected. - waitContext, cancelWait := context.WithTimeout(ctx, 5*time.Second) - defer cancelWait() - select { - case res = <-resc: - return res - case <-waitContext.Done(): - // Too slow. Who knows what this system is. - return false - } - } - - // There's no hint from the system info that we're running on - // GCE, so use the first probe's result as truth, whether it's - // true or false. The goal here is to optimize for speed for - // users who are NOT running on GCE. We can't assume that - // either a DNS lookup or an HTTP request to a blackholed IP - // address is fast. Worst case this should return when the - // metaClient's Transport.ResponseHeaderTimeout or - // Transport.Dial.Timeout fires (in two seconds). - return <-resc -} - -// getETag returns a value from the metadata service as well as the associated ETag. -// This func is otherwise equivalent to Get. -func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string, err error) { - return c.getETagWithSubClient(ctx, suffix, false) -} - -func (c *Client) getETagWithSubClient(ctx context.Context, suffix string, enableSubClient bool) (value, etag string, err error) { - // Using a fixed IP makes it very difficult to spoof the metadata service in - // a container, which is an important use-case for local testing of cloud - // deployments. To enable spoofing of the metadata service, the environment - // variable GCE_METADATA_HOST is first inspected to decide where metadata - // requests shall go. - host := os.Getenv(metadataHostEnv) - if host == "" { - // Using 169.254.169.254 instead of "metadata" here because Go - // binaries built with the "netgo" tag and without cgo won't - // know the search suffix for "metadata" is - // ".google.internal", and this IP address is documented as - // being stable anyway. - host = metadataIP - } - suffix = strings.TrimLeft(suffix, "/") - u := "http://" + host + "/computeMetadata/v1/" + suffix - req, err := http.NewRequestWithContext(ctx, "GET", u, nil) - if err != nil { - return "", "", err - } - req.Header.Set("Metadata-Flavor", "Google") - req.Header.Set("User-Agent", userAgent) - var res *http.Response - var reqErr error - var body []byte - retryer := newRetryer() - hc := c.hc - if enableSubClient { - hc = c.subClient - } - for { - c.logger.DebugContext(ctx, "metadata request", "request", httpRequest(req, nil)) - res, reqErr = hc.Do(req) - var code int - if res != nil { - code = res.StatusCode - body, err = io.ReadAll(res.Body) - if err != nil { - res.Body.Close() - return "", "", err - } - c.logger.DebugContext(ctx, "metadata response", "response", httpResponse(res, body)) - res.Body.Close() - } - if delay, shouldRetry := retryer.Retry(code, reqErr); shouldRetry { - if res != nil && res.Body != nil { - res.Body.Close() - } - if err := sleep(ctx, delay); err != nil { - return "", "", err - } - continue - } - break - } - if reqErr != nil { - return "", "", reqErr - } - if res.StatusCode == http.StatusNotFound { - return "", "", NotDefinedError(suffix) - } - if res.StatusCode != 200 { - return "", "", &Error{Code: res.StatusCode, Message: string(body)} - } - return string(body), res.Header.Get("Etag"), nil -} - -// Get returns a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// -// If the GCE_METADATA_HOST environment variable is not defined, a default of -// 169.254.169.254 will be used instead. -// -// If the requested metadata is not defined, the returned error will -// be of type NotDefinedError. -// -// Deprecated: Please use the context aware variant [Client.GetWithContext]. -func (c *Client) Get(suffix string) (string, error) { - return c.GetWithContext(context.Background(), suffix) -} - -// GetWithContext returns a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// -// If the GCE_METADATA_HOST environment variable is not defined, a default of -// 169.254.169.254 will be used instead. -// -// If the requested metadata is not defined, the returned error will -// be of type NotDefinedError. -// -// NOTE: Without an extra deadline in the context this call can take in the -// worst case, with internal backoff retries, up to 15 seconds (e.g. when server -// is responding slowly). Pass context with additional timeouts when needed. -func (c *Client) GetWithContext(ctx context.Context, suffix string) (string, error) { - val, _, err := c.getETag(ctx, suffix) - return val, err -} - -func (c *Client) getTrimmed(ctx context.Context, suffix string) (s string, err error) { - s, err = c.GetWithContext(ctx, suffix) - s = strings.TrimSpace(s) - return -} - -func (c *Client) lines(ctx context.Context, suffix string) ([]string, error) { - j, err := c.GetWithContext(ctx, suffix) - if err != nil { - return nil, err - } - s := strings.Split(strings.TrimSpace(j), "\n") - for i := range s { - s[i] = strings.TrimSpace(s[i]) - } - return s, nil -} - -// ProjectID returns the current instance's project ID string. -// -// Deprecated: Please use the context aware variant [Client.ProjectIDWithContext]. -func (c *Client) ProjectID() (string, error) { return c.ProjectIDWithContext(context.Background()) } - -// ProjectIDWithContext returns the current instance's project ID string. -func (c *Client) ProjectIDWithContext(ctx context.Context) (string, error) { return projID.get(ctx, c) } - -// NumericProjectID returns the current instance's numeric project ID. -// -// Deprecated: Please use the context aware variant [Client.NumericProjectIDWithContext]. -func (c *Client) NumericProjectID() (string, error) { - return c.NumericProjectIDWithContext(context.Background()) -} - -// NumericProjectIDWithContext returns the current instance's numeric project ID. -func (c *Client) NumericProjectIDWithContext(ctx context.Context) (string, error) { - return projNum.get(ctx, c) -} - -// InstanceID returns the current VM's numeric instance ID. -// -// Deprecated: Please use the context aware variant [Client.InstanceIDWithContext]. -func (c *Client) InstanceID() (string, error) { - return c.InstanceIDWithContext(context.Background()) -} - -// InstanceIDWithContext returns the current VM's numeric instance ID. -func (c *Client) InstanceIDWithContext(ctx context.Context) (string, error) { - return instID.get(ctx, c) -} - -// InternalIP returns the instance's primary internal IP address. -// -// Deprecated: Please use the context aware variant [Client.InternalIPWithContext]. -func (c *Client) InternalIP() (string, error) { - return c.InternalIPWithContext(context.Background()) -} - -// InternalIPWithContext returns the instance's primary internal IP address. -func (c *Client) InternalIPWithContext(ctx context.Context) (string, error) { - return c.getTrimmed(ctx, "instance/network-interfaces/0/ip") -} - -// Email returns the email address associated with the service account. -// -// Deprecated: Please use the context aware variant [Client.EmailWithContext]. -func (c *Client) Email(serviceAccount string) (string, error) { - return c.EmailWithContext(context.Background(), serviceAccount) -} - -// EmailWithContext returns the email address associated with the service account. -// The serviceAccount parameter default value (empty string or "default" value) -// will use the instance's main account. -func (c *Client) EmailWithContext(ctx context.Context, serviceAccount string) (string, error) { - if serviceAccount == "" { - serviceAccount = "default" - } - return c.getTrimmed(ctx, "instance/service-accounts/"+serviceAccount+"/email") -} - -// ExternalIP returns the instance's primary external (public) IP address. -// -// Deprecated: Please use the context aware variant [Client.ExternalIPWithContext]. -func (c *Client) ExternalIP() (string, error) { - return c.ExternalIPWithContext(context.Background()) -} - -// ExternalIPWithContext returns the instance's primary external (public) IP address. -func (c *Client) ExternalIPWithContext(ctx context.Context) (string, error) { - return c.getTrimmed(ctx, "instance/network-interfaces/0/access-configs/0/external-ip") -} - -// Hostname returns the instance's hostname. This will be of the form -// ".c..internal". -// -// Deprecated: Please use the context aware variant [Client.HostnameWithContext]. -func (c *Client) Hostname() (string, error) { - return c.HostnameWithContext(context.Background()) -} - -// HostnameWithContext returns the instance's hostname. This will be of the form -// ".c..internal". -func (c *Client) HostnameWithContext(ctx context.Context) (string, error) { - return c.getTrimmed(ctx, "instance/hostname") -} - -// InstanceTags returns the list of user-defined instance tags. -// -// Deprecated: Please use the context aware variant [Client.InstanceTagsWithContext]. -func (c *Client) InstanceTags() ([]string, error) { - return c.InstanceTagsWithContext(context.Background()) -} - -// InstanceTagsWithContext returns the list of user-defined instance tags, -// assigned when initially creating a GCE instance. -func (c *Client) InstanceTagsWithContext(ctx context.Context) ([]string, error) { - var s []string - j, err := c.GetWithContext(ctx, "instance/tags") - if err != nil { - return nil, err - } - if err := json.NewDecoder(strings.NewReader(j)).Decode(&s); err != nil { - return nil, err - } - return s, nil -} - -// InstanceName returns the current VM's instance ID string. -// -// Deprecated: Please use the context aware variant [Client.InstanceNameWithContext]. -func (c *Client) InstanceName() (string, error) { - return c.InstanceNameWithContext(context.Background()) -} - -// InstanceNameWithContext returns the current VM's instance ID string. -func (c *Client) InstanceNameWithContext(ctx context.Context) (string, error) { - return c.getTrimmed(ctx, "instance/name") -} - -// Zone returns the current VM's zone, such as "us-central1-b". -// -// Deprecated: Please use the context aware variant [Client.ZoneWithContext]. -func (c *Client) Zone() (string, error) { - return c.ZoneWithContext(context.Background()) -} - -// ZoneWithContext returns the current VM's zone, such as "us-central1-b". -func (c *Client) ZoneWithContext(ctx context.Context) (string, error) { - zone, err := c.getTrimmed(ctx, "instance/zone") - // zone is of the form "projects//zones/". - if err != nil { - return "", err - } - return zone[strings.LastIndex(zone, "/")+1:], nil -} - -// InstanceAttributes returns the list of user-defined attributes, -// assigned when initially creating a GCE VM instance. The value of an -// attribute can be obtained with InstanceAttributeValue. -// -// Deprecated: Please use the context aware variant [Client.InstanceAttributesWithContext]. -func (c *Client) InstanceAttributes() ([]string, error) { - return c.InstanceAttributesWithContext(context.Background()) -} - -// InstanceAttributesWithContext returns the list of user-defined attributes, -// assigned when initially creating a GCE VM instance. The value of an -// attribute can be obtained with InstanceAttributeValue. -func (c *Client) InstanceAttributesWithContext(ctx context.Context) ([]string, error) { - return c.lines(ctx, "instance/attributes/") -} - -// ProjectAttributes returns the list of user-defined attributes -// applying to the project as a whole, not just this VM. The value of -// an attribute can be obtained with ProjectAttributeValue. -// -// Deprecated: Please use the context aware variant [Client.ProjectAttributesWithContext]. -func (c *Client) ProjectAttributes() ([]string, error) { - return c.ProjectAttributesWithContext(context.Background()) -} - -// ProjectAttributesWithContext returns the list of user-defined attributes -// applying to the project as a whole, not just this VM. The value of -// an attribute can be obtained with ProjectAttributeValue. -func (c *Client) ProjectAttributesWithContext(ctx context.Context) ([]string, error) { - return c.lines(ctx, "project/attributes/") -} - -// InstanceAttributeValue returns the value of the provided VM -// instance attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// InstanceAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -// -// Deprecated: Please use the context aware variant [Client.InstanceAttributeValueWithContext]. -func (c *Client) InstanceAttributeValue(attr string) (string, error) { - return c.InstanceAttributeValueWithContext(context.Background(), attr) -} - -// InstanceAttributeValueWithContext returns the value of the provided VM -// instance attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// InstanceAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -func (c *Client) InstanceAttributeValueWithContext(ctx context.Context, attr string) (string, error) { - return c.GetWithContext(ctx, "instance/attributes/"+attr) -} - -// ProjectAttributeValue returns the value of the provided -// project attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// ProjectAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -// -// Deprecated: Please use the context aware variant [Client.ProjectAttributeValueWithContext]. -func (c *Client) ProjectAttributeValue(attr string) (string, error) { - return c.ProjectAttributeValueWithContext(context.Background(), attr) -} - -// ProjectAttributeValueWithContext returns the value of the provided -// project attribute. -// -// If the requested attribute is not defined, the returned error will -// be of type NotDefinedError. -// -// ProjectAttributeValue may return ("", nil) if the attribute was -// defined to be the empty string. -func (c *Client) ProjectAttributeValueWithContext(ctx context.Context, attr string) (string, error) { - return c.GetWithContext(ctx, "project/attributes/"+attr) -} - -// Scopes returns the service account scopes for the given account. -// The account may be empty or the string "default" to use the instance's -// main account. -// -// Deprecated: Please use the context aware variant [Client.ScopesWithContext]. -func (c *Client) Scopes(serviceAccount string) ([]string, error) { - return c.ScopesWithContext(context.Background(), serviceAccount) -} - -// ScopesWithContext returns the service account scopes for the given account. -// The account may be empty or the string "default" to use the instance's -// main account. -func (c *Client) ScopesWithContext(ctx context.Context, serviceAccount string) ([]string, error) { - if serviceAccount == "" { - serviceAccount = "default" - } - return c.lines(ctx, "instance/service-accounts/"+serviceAccount+"/scopes") -} - -// Subscribe subscribes to a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// The suffix may contain query parameters. -// -// Deprecated: Please use the context aware variant [Client.SubscribeWithContext]. -func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) error { - return c.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) }) -} - -// SubscribeWithContext subscribes to a value from the metadata service. -// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". -// The suffix may contain query parameters. -// -// SubscribeWithContext calls fn with the latest metadata value indicated by the -// provided suffix. If the metadata value is deleted, fn is called with the -// empty string and ok false. Subscribe blocks until fn returns a non-nil error -// or the value is deleted. Subscribe returns the error value returned from the -// last call to fn, which may be nil when ok == false. -func (c *Client) SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error { - const failedSubscribeSleep = time.Second * 5 - - // First check to see if the metadata value exists at all. - val, lastETag, err := c.getETagWithSubClient(ctx, suffix, true) - if err != nil { - return err - } - - if err := fn(ctx, val, true); err != nil { - return err - } - - ok := true - if strings.ContainsRune(suffix, '?') { - suffix += "&wait_for_change=true&last_etag=" - } else { - suffix += "?wait_for_change=true&last_etag=" - } - for { - val, etag, err := c.getETagWithSubClient(ctx, suffix+url.QueryEscape(lastETag), true) - if err != nil { - if errors.Is(err, context.Canceled) || errors.Is(err, context.DeadlineExceeded) { - return err - } - if _, deleted := err.(NotDefinedError); !deleted { - time.Sleep(failedSubscribeSleep) - continue // Retry on other errors. - } - ok = false - } - lastETag = etag - - if err := fn(ctx, val, ok); err != nil || !ok { - return err - } - } -} - -// Error contains an error response from the server. -type Error struct { - // Code is the HTTP response status code. - Code int - // Message is the server response message. - Message string -} - -func (e *Error) Error() string { - return fmt.Sprintf("compute: Received %d `%s`", e.Code, e.Message) -} diff --git a/vendor/cloud.google.com/go/compute/metadata/retry.go b/vendor/cloud.google.com/go/compute/metadata/retry.go deleted file mode 100644 index d516f30f80..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/retry.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright 2021 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 metadata - -import ( - "context" - "io" - "math/rand" - "net/http" - "time" -) - -const ( - maxRetryAttempts = 5 -) - -var ( - syscallRetryable = func(error) bool { return false } -) - -// defaultBackoff is basically equivalent to gax.Backoff without the need for -// the dependency. -type defaultBackoff struct { - max time.Duration - mul float64 - cur time.Duration -} - -func (b *defaultBackoff) Pause() time.Duration { - d := time.Duration(1 + rand.Int63n(int64(b.cur))) - b.cur = time.Duration(float64(b.cur) * b.mul) - if b.cur > b.max { - b.cur = b.max - } - return d -} - -// sleep is the equivalent of gax.Sleep without the need for the dependency. -func sleep(ctx context.Context, d time.Duration) error { - t := time.NewTimer(d) - select { - case <-ctx.Done(): - t.Stop() - return ctx.Err() - case <-t.C: - return nil - } -} - -func newRetryer() *metadataRetryer { - return &metadataRetryer{bo: &defaultBackoff{ - cur: 100 * time.Millisecond, - max: 30 * time.Second, - mul: 2, - }} -} - -type backoff interface { - Pause() time.Duration -} - -type metadataRetryer struct { - bo backoff - attempts int -} - -func (r *metadataRetryer) Retry(status int, err error) (time.Duration, bool) { - if status == http.StatusOK { - return 0, false - } - retryOk := shouldRetry(status, err) - if !retryOk { - return 0, false - } - if r.attempts == maxRetryAttempts { - return 0, false - } - r.attempts++ - return r.bo.Pause(), true -} - -func shouldRetry(status int, err error) bool { - if 500 <= status && status <= 599 { - return true - } - if status == http.StatusTooManyRequests { - return true - } - if err == io.ErrUnexpectedEOF { - return true - } - // Transient network errors should be retried. - if syscallRetryable(err) { - return true - } - if err, ok := err.(interface{ Temporary() bool }); ok { - if err.Temporary() { - return true - } - } - if err, ok := err.(interface{ Unwrap() error }); ok { - return shouldRetry(status, err.Unwrap()) - } - return false -} diff --git a/vendor/cloud.google.com/go/compute/metadata/retry_linux.go b/vendor/cloud.google.com/go/compute/metadata/retry_linux.go deleted file mode 100644 index 2e53f01230..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/retry_linux.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2021 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. - -//go:build linux -// +build linux - -package metadata - -import ( - "errors" - "syscall" -) - -func init() { - // Initialize syscallRetryable to return true on transient socket-level - // errors. These errors are specific to Linux. - syscallRetryable = func(err error) bool { - return errors.Is(err, syscall.ECONNRESET) || errors.Is(err, syscall.ECONNREFUSED) - } -} diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck.go b/vendor/cloud.google.com/go/compute/metadata/syscheck.go deleted file mode 100644 index d57ae1b27c..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/syscheck.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2024 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. - -//go:build !windows && !linux - -package metadata - -// systemInfoSuggestsGCE reports whether the local system (without -// doing network requests) suggests that we're running on GCE. If this -// returns true, testOnGCE tries a bit harder to reach its metadata -// server. -// -// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes. -var systemInfoSuggestsGCE = func() bool { - // We don't currently have checks for other GOOS - return false -} diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go b/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go deleted file mode 100644 index 17ba5a3a23..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/syscheck_linux.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2024 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. - -//go:build linux - -package metadata - -import ( - "os" - "strings" -) - -// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes. -var systemInfoSuggestsGCE = func() bool { - b, _ := os.ReadFile("/sys/class/dmi/id/product_name") - - name := strings.TrimSpace(string(b)) - return name == "Google" || name == "Google Compute Engine" -} diff --git a/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go b/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go deleted file mode 100644 index f57a5b14e9..0000000000 --- a/vendor/cloud.google.com/go/compute/metadata/syscheck_windows.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2024 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. - -//go:build windows - -package metadata - -import ( - "strings" - - "golang.org/x/sys/windows/registry" -) - -// NOTE: systemInfoSuggestsGCE is assigned to a varible for test stubbing purposes. -var systemInfoSuggestsGCE = func() bool { - k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SYSTEM\HardwareConfig\Current`, registry.QUERY_VALUE) - if err != nil { - return false - } - defer k.Close() - - s, _, err := k.GetStringValue("SystemProductName") - if err != nil { - return false - } - s = strings.TrimSpace(s) - return strings.HasPrefix(s, "Google") -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt b/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt deleted file mode 100644 index 05b0ebf5bc..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Microsoft Corporation. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt b/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt deleted file mode 100644 index a338672ec5..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/NOTICE.txt +++ /dev/null @@ -1,29 +0,0 @@ -NOTICES AND INFORMATION -Do Not Translate or Localize - -This software incorporates material from third parties. Microsoft makes certain -open source code available at https://3rdpartysource.microsoft.com, or you may -send a check or money order for US $5.00, including the product name, the open -source component name, and version number, to: - -Source Code Compliance Team -Microsoft Corporation -One Microsoft Way -Redmond, WA 98052 -USA - -Notwithstanding any other terms, you may reverse engineer this software to the -extent required to debug changes to any libraries licensed under the GNU Lesser -General Public License. - ------------------------------------------------------------------------------- - -Azure SDK for Go uses third-party libraries or other resources that may be -distributed under licenses different than the Azure SDK for Go software. - -In the event that we accidentally failed to list a required notice, please -bring it to our attention. Post an issue or email us: - - azgosdkhelp@microsoft.com - -The attached notices are provided for information only. diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go deleted file mode 100644 index 34f8b02380..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns/models.go +++ /dev/null @@ -1,128 +0,0 @@ -//go:build go1.9 -// +build go1.9 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This code was auto-generated by: -// github.com/Azure/azure-sdk-for-go/eng/tools/profileBuilder - -package dns - -import ( - "context" - - original "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" -) - -const ( - DefaultBaseURI = original.DefaultBaseURI -) - -type RecordType = original.RecordType - -const ( - A RecordType = original.A - AAAA RecordType = original.AAAA - CAA RecordType = original.CAA - CNAME RecordType = original.CNAME - MX RecordType = original.MX - NS RecordType = original.NS - PTR RecordType = original.PTR - SOA RecordType = original.SOA - SRV RecordType = original.SRV - TXT RecordType = original.TXT -) - -type ZoneType = original.ZoneType - -const ( - Private ZoneType = original.Private - Public ZoneType = original.Public -) - -type ARecord = original.ARecord -type AaaaRecord = original.AaaaRecord -type BaseClient = original.BaseClient -type CaaRecord = original.CaaRecord -type CloudError = original.CloudError -type CloudErrorBody = original.CloudErrorBody -type CnameRecord = original.CnameRecord -type MxRecord = original.MxRecord -type NsRecord = original.NsRecord -type PtrRecord = original.PtrRecord -type RecordSet = original.RecordSet -type RecordSetListResult = original.RecordSetListResult -type RecordSetListResultIterator = original.RecordSetListResultIterator -type RecordSetListResultPage = original.RecordSetListResultPage -type RecordSetProperties = original.RecordSetProperties -type RecordSetUpdateParameters = original.RecordSetUpdateParameters -type RecordSetsClient = original.RecordSetsClient -type Resource = original.Resource -type ResourceReference = original.ResourceReference -type ResourceReferenceClient = original.ResourceReferenceClient -type ResourceReferenceRequest = original.ResourceReferenceRequest -type ResourceReferenceRequestProperties = original.ResourceReferenceRequestProperties -type ResourceReferenceResult = original.ResourceReferenceResult -type ResourceReferenceResultProperties = original.ResourceReferenceResultProperties -type SoaRecord = original.SoaRecord -type SrvRecord = original.SrvRecord -type SubResource = original.SubResource -type TxtRecord = original.TxtRecord -type Zone = original.Zone -type ZoneListResult = original.ZoneListResult -type ZoneListResultIterator = original.ZoneListResultIterator -type ZoneListResultPage = original.ZoneListResultPage -type ZoneProperties = original.ZoneProperties -type ZoneUpdate = original.ZoneUpdate -type ZonesClient = original.ZonesClient -type ZonesDeleteFuture = original.ZonesDeleteFuture - -func New(subscriptionID string) BaseClient { - return original.New(subscriptionID) -} -func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator { - return original.NewRecordSetListResultIterator(page) -} -func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage { - return original.NewRecordSetListResultPage(cur, getNextPage) -} -func NewRecordSetsClient(subscriptionID string) RecordSetsClient { - return original.NewRecordSetsClient(subscriptionID) -} -func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { - return original.NewRecordSetsClientWithBaseURI(baseURI, subscriptionID) -} -func NewResourceReferenceClient(subscriptionID string) ResourceReferenceClient { - return original.NewResourceReferenceClient(subscriptionID) -} -func NewResourceReferenceClientWithBaseURI(baseURI string, subscriptionID string) ResourceReferenceClient { - return original.NewResourceReferenceClientWithBaseURI(baseURI, subscriptionID) -} -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return original.NewWithBaseURI(baseURI, subscriptionID) -} -func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator { - return original.NewZoneListResultIterator(page) -} -func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage { - return original.NewZoneListResultPage(cur, getNextPage) -} -func NewZonesClient(subscriptionID string) ZonesClient { - return original.NewZonesClient(subscriptionID) -} -func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { - return original.NewZonesClientWithBaseURI(baseURI, subscriptionID) -} -func PossibleRecordTypeValues() []RecordType { - return original.PossibleRecordTypeValues() -} -func PossibleZoneTypeValues() []ZoneType { - return original.PossibleZoneTypeValues() -} -func UserAgent() string { - return original.UserAgent() + " profiles/latest" -} -func Version() string { - return original.Version() -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns/models.go deleted file mode 100644 index e11287f125..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns/models.go +++ /dev/null @@ -1,149 +0,0 @@ -//go:build go1.9 -// +build go1.9 - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// This code was auto-generated by: -// github.com/Azure/azure-sdk-for-go/eng/tools/profileBuilder - -package privatedns - -import ( - "context" - - original "github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns" -) - -const ( - DefaultBaseURI = original.DefaultBaseURI -) - -type ProvisioningState = original.ProvisioningState - -const ( - Canceled ProvisioningState = original.Canceled - Creating ProvisioningState = original.Creating - Deleting ProvisioningState = original.Deleting - Failed ProvisioningState = original.Failed - Succeeded ProvisioningState = original.Succeeded - Updating ProvisioningState = original.Updating -) - -type RecordType = original.RecordType - -const ( - A RecordType = original.A - AAAA RecordType = original.AAAA - CNAME RecordType = original.CNAME - MX RecordType = original.MX - PTR RecordType = original.PTR - SOA RecordType = original.SOA - SRV RecordType = original.SRV - TXT RecordType = original.TXT -) - -type VirtualNetworkLinkState = original.VirtualNetworkLinkState - -const ( - Completed VirtualNetworkLinkState = original.Completed - InProgress VirtualNetworkLinkState = original.InProgress -) - -type ARecord = original.ARecord -type AaaaRecord = original.AaaaRecord -type BaseClient = original.BaseClient -type CloudError = original.CloudError -type CloudErrorBody = original.CloudErrorBody -type CnameRecord = original.CnameRecord -type MxRecord = original.MxRecord -type PrivateZone = original.PrivateZone -type PrivateZoneListResult = original.PrivateZoneListResult -type PrivateZoneListResultIterator = original.PrivateZoneListResultIterator -type PrivateZoneListResultPage = original.PrivateZoneListResultPage -type PrivateZoneProperties = original.PrivateZoneProperties -type PrivateZonesClient = original.PrivateZonesClient -type PrivateZonesCreateOrUpdateFuture = original.PrivateZonesCreateOrUpdateFuture -type PrivateZonesDeleteFuture = original.PrivateZonesDeleteFuture -type PrivateZonesUpdateFuture = original.PrivateZonesUpdateFuture -type ProxyResource = original.ProxyResource -type PtrRecord = original.PtrRecord -type RecordSet = original.RecordSet -type RecordSetListResult = original.RecordSetListResult -type RecordSetListResultIterator = original.RecordSetListResultIterator -type RecordSetListResultPage = original.RecordSetListResultPage -type RecordSetProperties = original.RecordSetProperties -type RecordSetsClient = original.RecordSetsClient -type Resource = original.Resource -type SoaRecord = original.SoaRecord -type SrvRecord = original.SrvRecord -type SubResource = original.SubResource -type TrackedResource = original.TrackedResource -type TxtRecord = original.TxtRecord -type VirtualNetworkLink = original.VirtualNetworkLink -type VirtualNetworkLinkListResult = original.VirtualNetworkLinkListResult -type VirtualNetworkLinkListResultIterator = original.VirtualNetworkLinkListResultIterator -type VirtualNetworkLinkListResultPage = original.VirtualNetworkLinkListResultPage -type VirtualNetworkLinkProperties = original.VirtualNetworkLinkProperties -type VirtualNetworkLinksClient = original.VirtualNetworkLinksClient -type VirtualNetworkLinksCreateOrUpdateFuture = original.VirtualNetworkLinksCreateOrUpdateFuture -type VirtualNetworkLinksDeleteFuture = original.VirtualNetworkLinksDeleteFuture -type VirtualNetworkLinksUpdateFuture = original.VirtualNetworkLinksUpdateFuture - -func New(subscriptionID string) BaseClient { - return original.New(subscriptionID) -} -func NewPrivateZoneListResultIterator(page PrivateZoneListResultPage) PrivateZoneListResultIterator { - return original.NewPrivateZoneListResultIterator(page) -} -func NewPrivateZoneListResultPage(cur PrivateZoneListResult, getNextPage func(context.Context, PrivateZoneListResult) (PrivateZoneListResult, error)) PrivateZoneListResultPage { - return original.NewPrivateZoneListResultPage(cur, getNextPage) -} -func NewPrivateZonesClient(subscriptionID string) PrivateZonesClient { - return original.NewPrivateZonesClient(subscriptionID) -} -func NewPrivateZonesClientWithBaseURI(baseURI string, subscriptionID string) PrivateZonesClient { - return original.NewPrivateZonesClientWithBaseURI(baseURI, subscriptionID) -} -func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator { - return original.NewRecordSetListResultIterator(page) -} -func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage { - return original.NewRecordSetListResultPage(cur, getNextPage) -} -func NewRecordSetsClient(subscriptionID string) RecordSetsClient { - return original.NewRecordSetsClient(subscriptionID) -} -func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { - return original.NewRecordSetsClientWithBaseURI(baseURI, subscriptionID) -} -func NewVirtualNetworkLinkListResultIterator(page VirtualNetworkLinkListResultPage) VirtualNetworkLinkListResultIterator { - return original.NewVirtualNetworkLinkListResultIterator(page) -} -func NewVirtualNetworkLinkListResultPage(cur VirtualNetworkLinkListResult, getNextPage func(context.Context, VirtualNetworkLinkListResult) (VirtualNetworkLinkListResult, error)) VirtualNetworkLinkListResultPage { - return original.NewVirtualNetworkLinkListResultPage(cur, getNextPage) -} -func NewVirtualNetworkLinksClient(subscriptionID string) VirtualNetworkLinksClient { - return original.NewVirtualNetworkLinksClient(subscriptionID) -} -func NewVirtualNetworkLinksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkLinksClient { - return original.NewVirtualNetworkLinksClientWithBaseURI(baseURI, subscriptionID) -} -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return original.NewWithBaseURI(baseURI, subscriptionID) -} -func PossibleProvisioningStateValues() []ProvisioningState { - return original.PossibleProvisioningStateValues() -} -func PossibleRecordTypeValues() []RecordType { - return original.PossibleRecordTypeValues() -} -func PossibleVirtualNetworkLinkStateValues() []VirtualNetworkLinkState { - return original.PossibleVirtualNetworkLinkStateValues() -} -func UserAgent() string { - return original.UserAgent() + " profiles/latest" -} -func Version() string { - return original.Version() -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md deleted file mode 100644 index 52911e4cc5..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/_meta.json deleted file mode 100644 index f3f5690813..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", - "readme": "/_/azure-rest-api-specs/specification/dns/resource-manager/readme.md", - "tag": "package-2018-05", - "use": "@microsoft.azure/autorest.go@2.1.187", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.187 --tag=package-2018-05 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/dns/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/client.go deleted file mode 100644 index 8e442bba3a..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package dns implements the Azure ARM Dns service API version 2018-05-01. -// -// The DNS Management Client. -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Dns - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Dns. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/enums.go deleted file mode 100644 index 90319affc9..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/enums.go +++ /dev/null @@ -1,53 +0,0 @@ -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// RecordType enumerates the values for record type. -type RecordType string - -const ( - // A ... - A RecordType = "A" - // AAAA ... - AAAA RecordType = "AAAA" - // CAA ... - CAA RecordType = "CAA" - // CNAME ... - CNAME RecordType = "CNAME" - // MX ... - MX RecordType = "MX" - // NS ... - NS RecordType = "NS" - // PTR ... - PTR RecordType = "PTR" - // SOA ... - SOA RecordType = "SOA" - // SRV ... - SRV RecordType = "SRV" - // TXT ... - TXT RecordType = "TXT" -) - -// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. -func PossibleRecordTypeValues() []RecordType { - return []RecordType{A, AAAA, CAA, CNAME, MX, NS, PTR, SOA, SRV, TXT} -} - -// ZoneType enumerates the values for zone type. -type ZoneType string - -const ( - // Private ... - Private ZoneType = "Private" - // Public ... - Public ZoneType = "Public" -) - -// PossibleZoneTypeValues returns an array of possible values for the ZoneType const type. -func PossibleZoneTypeValues() []ZoneType { - return []ZoneType{Private, Public} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go deleted file mode 100644 index 50355232b1..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/models.go +++ /dev/null @@ -1,961 +0,0 @@ -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns" - -// AaaaRecord an AAAA record. -type AaaaRecord struct { - // Ipv6Address - The IPv6 address of this AAAA record. - Ipv6Address *string `json:"ipv6Address,omitempty"` -} - -// ARecord an A record. -type ARecord struct { - // Ipv4Address - The IPv4 address of this A record. - Ipv4Address *string `json:"ipv4Address,omitempty"` -} - -// CaaRecord a CAA record. -type CaaRecord struct { - // Flags - The flags for this CAA record as an integer between 0 and 255. - Flags *int32 `json:"flags,omitempty"` - // Tag - The tag for this CAA record. - Tag *string `json:"tag,omitempty"` - // Value - The value for this CAA record. - Value *string `json:"value,omitempty"` -} - -// CloudError an error response from the service. -type CloudError struct { - // Error - Cloud error body. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody an error response from the service. -type CloudErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. - Details *[]CloudErrorBody `json:"details,omitempty"` -} - -// CnameRecord a CNAME record. -type CnameRecord struct { - // Cname - The canonical name for this CNAME record. - Cname *string `json:"cname,omitempty"` -} - -// MxRecord an MX record. -type MxRecord struct { - // Preference - The preference value for this MX record. - Preference *int32 `json:"preference,omitempty"` - // Exchange - The domain name of the mail host for this MX record. - Exchange *string `json:"exchange,omitempty"` -} - -// NsRecord an NS record. -type NsRecord struct { - // Nsdname - The name server name for this NS record. - Nsdname *string `json:"nsdname,omitempty"` -} - -// PtrRecord a PTR record. -type PtrRecord struct { - // Ptrdname - The PTR target domain name for this PTR record. - Ptrdname *string `json:"ptrdname,omitempty"` -} - -// RecordSet describes a DNS record set (a collection of DNS records with the same name and type). -type RecordSet struct { - autorest.Response `json:"-"` - // ID - READ-ONLY; The ID of the record set. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the record set. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the record set. - Type *string `json:"type,omitempty"` - // Etag - The etag of the record set. - Etag *string `json:"etag,omitempty"` - // RecordSetProperties - The properties of the record set. - *RecordSetProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSet. -func (rs RecordSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rs.Etag != nil { - objectMap["etag"] = rs.Etag - } - if rs.RecordSetProperties != nil { - objectMap["properties"] = rs.RecordSetProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RecordSet struct. -func (rs *RecordSet) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rs.Type = &typeVar - } - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rs.Etag = &etag - } - case "properties": - if v != nil { - var recordSetProperties RecordSetProperties - err = json.Unmarshal(*v, &recordSetProperties) - if err != nil { - return err - } - rs.RecordSetProperties = &recordSetProperties - } - } - } - - return nil -} - -// RecordSetListResult the response to a record set List operation. -type RecordSetListResult struct { - autorest.Response `json:"-"` - // Value - Information about the record sets in the response. - Value *[]RecordSet `json:"value,omitempty"` - // NextLink - READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSetListResult. -func (rslr RecordSetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rslr.Value != nil { - objectMap["value"] = rslr.Value - } - return json.Marshal(objectMap) -} - -// RecordSetListResultIterator provides access to a complete listing of RecordSet values. -type RecordSetListResultIterator struct { - i int - page RecordSetListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *RecordSetListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *RecordSetListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RecordSetListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter RecordSetListResultIterator) Response() RecordSetListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RecordSetListResultIterator) Value() RecordSet { - if !iter.page.NotDone() { - return RecordSet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RecordSetListResultIterator type. -func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator { - return RecordSetListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rslr RecordSetListResult) IsEmpty() bool { - return rslr.Value == nil || len(*rslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rslr RecordSetListResult) hasNextLink() bool { - return rslr.NextLink != nil && len(*rslr.NextLink) != 0 -} - -// recordSetListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rslr RecordSetListResult) recordSetListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rslr.NextLink))) -} - -// RecordSetListResultPage contains a page of RecordSet values. -type RecordSetListResultPage struct { - fn func(context.Context, RecordSetListResult) (RecordSetListResult, error) - rslr RecordSetListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *RecordSetListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.rslr) - if err != nil { - return err - } - page.rslr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *RecordSetListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RecordSetListResultPage) NotDone() bool { - return !page.rslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RecordSetListResultPage) Response() RecordSetListResult { - return page.rslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RecordSetListResultPage) Values() []RecordSet { - if page.rslr.IsEmpty() { - return nil - } - return *page.rslr.Value -} - -// Creates a new instance of the RecordSetListResultPage type. -func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage { - return RecordSetListResultPage{ - fn: getNextPage, - rslr: cur, - } -} - -// RecordSetProperties represents the properties of the records in the record set. -type RecordSetProperties struct { - // Metadata - The metadata attached to the record set. - Metadata map[string]*string `json:"metadata"` - // TTL - The TTL (time-to-live) of the records in the record set. - TTL *int64 `json:"TTL,omitempty"` - // Fqdn - READ-ONLY; Fully qualified domain name of the record set. - Fqdn *string `json:"fqdn,omitempty"` - // ProvisioningState - READ-ONLY; provisioning State of the record set. - ProvisioningState *string `json:"provisioningState,omitempty"` - // TargetResource - A reference to an azure resource from where the dns resource value is taken. - TargetResource *SubResource `json:"targetResource,omitempty"` - // ARecords - The list of A records in the record set. - ARecords *[]ARecord `json:"ARecords,omitempty"` - // AaaaRecords - The list of AAAA records in the record set. - AaaaRecords *[]AaaaRecord `json:"AAAARecords,omitempty"` - // MxRecords - The list of MX records in the record set. - MxRecords *[]MxRecord `json:"MXRecords,omitempty"` - // NsRecords - The list of NS records in the record set. - NsRecords *[]NsRecord `json:"NSRecords,omitempty"` - // PtrRecords - The list of PTR records in the record set. - PtrRecords *[]PtrRecord `json:"PTRRecords,omitempty"` - // SrvRecords - The list of SRV records in the record set. - SrvRecords *[]SrvRecord `json:"SRVRecords,omitempty"` - // TxtRecords - The list of TXT records in the record set. - TxtRecords *[]TxtRecord `json:"TXTRecords,omitempty"` - // CnameRecord - The CNAME record in the record set. - CnameRecord *CnameRecord `json:"CNAMERecord,omitempty"` - // SoaRecord - The SOA record in the record set. - SoaRecord *SoaRecord `json:"SOARecord,omitempty"` - // CaaRecords - The list of CAA records in the record set. - CaaRecords *[]CaaRecord `json:"caaRecords,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSetProperties. -func (rsp RecordSetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rsp.Metadata != nil { - objectMap["metadata"] = rsp.Metadata - } - if rsp.TTL != nil { - objectMap["TTL"] = rsp.TTL - } - if rsp.TargetResource != nil { - objectMap["targetResource"] = rsp.TargetResource - } - if rsp.ARecords != nil { - objectMap["ARecords"] = rsp.ARecords - } - if rsp.AaaaRecords != nil { - objectMap["AAAARecords"] = rsp.AaaaRecords - } - if rsp.MxRecords != nil { - objectMap["MXRecords"] = rsp.MxRecords - } - if rsp.NsRecords != nil { - objectMap["NSRecords"] = rsp.NsRecords - } - if rsp.PtrRecords != nil { - objectMap["PTRRecords"] = rsp.PtrRecords - } - if rsp.SrvRecords != nil { - objectMap["SRVRecords"] = rsp.SrvRecords - } - if rsp.TxtRecords != nil { - objectMap["TXTRecords"] = rsp.TxtRecords - } - if rsp.CnameRecord != nil { - objectMap["CNAMERecord"] = rsp.CnameRecord - } - if rsp.SoaRecord != nil { - objectMap["SOARecord"] = rsp.SoaRecord - } - if rsp.CaaRecords != nil { - objectMap["caaRecords"] = rsp.CaaRecords - } - return json.Marshal(objectMap) -} - -// RecordSetUpdateParameters parameters supplied to update a record set. -type RecordSetUpdateParameters struct { - // RecordSet - Specifies information about the record set being updated. - RecordSet *RecordSet `json:"RecordSet,omitempty"` -} - -// Resource common properties of an Azure Resource Manager resource -type Resource struct { - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if r.Location != nil { - objectMap["location"] = r.Location - } - if r.Tags != nil { - objectMap["tags"] = r.Tags - } - return json.Marshal(objectMap) -} - -// ResourceReference represents a single Azure resource and its referencing DNS records. -type ResourceReference struct { - // DNSResources - A list of dns Records - DNSResources *[]SubResource `json:"dnsResources,omitempty"` - // TargetResource - A reference to an azure resource from where the dns resource value is taken. - TargetResource *SubResource `json:"targetResource,omitempty"` -} - -// ResourceReferenceRequest represents the properties of the Dns Resource Reference Request. -type ResourceReferenceRequest struct { - // ResourceReferenceRequestProperties - The properties of the Resource Reference Request. - *ResourceReferenceRequestProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceReferenceRequest. -func (rrr ResourceReferenceRequest) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rrr.ResourceReferenceRequestProperties != nil { - objectMap["properties"] = rrr.ResourceReferenceRequestProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ResourceReferenceRequest struct. -func (rrr *ResourceReferenceRequest) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var resourceReferenceRequestProperties ResourceReferenceRequestProperties - err = json.Unmarshal(*v, &resourceReferenceRequestProperties) - if err != nil { - return err - } - rrr.ResourceReferenceRequestProperties = &resourceReferenceRequestProperties - } - } - } - - return nil -} - -// ResourceReferenceRequestProperties represents the properties of the Dns Resource Reference Request. -type ResourceReferenceRequestProperties struct { - // TargetResources - A list of references to azure resources for which referencing dns records need to be queried. - TargetResources *[]SubResource `json:"targetResources,omitempty"` -} - -// ResourceReferenceResult represents the properties of the Dns Resource Reference Result. -type ResourceReferenceResult struct { - autorest.Response `json:"-"` - // ResourceReferenceResultProperties - The result of dns resource reference request. Returns a list of dns resource references for each of the azure resource in the request. - *ResourceReferenceResultProperties `json:"properties,omitempty"` -} - -// MarshalJSON is the custom marshaler for ResourceReferenceResult. -func (rrr ResourceReferenceResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rrr.ResourceReferenceResultProperties != nil { - objectMap["properties"] = rrr.ResourceReferenceResultProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for ResourceReferenceResult struct. -func (rrr *ResourceReferenceResult) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "properties": - if v != nil { - var resourceReferenceResultProperties ResourceReferenceResultProperties - err = json.Unmarshal(*v, &resourceReferenceResultProperties) - if err != nil { - return err - } - rrr.ResourceReferenceResultProperties = &resourceReferenceResultProperties - } - } - } - - return nil -} - -// ResourceReferenceResultProperties the result of dns resource reference request. Returns a list of dns -// resource references for each of the azure resource in the request. -type ResourceReferenceResultProperties struct { - // DNSResourceReferences - The result of dns resource reference request. A list of dns resource references for each of the azure resource in the request - DNSResourceReferences *[]ResourceReference `json:"dnsResourceReferences,omitempty"` -} - -// SoaRecord an SOA record. -type SoaRecord struct { - // Host - The domain name of the authoritative name server for this SOA record. - Host *string `json:"host,omitempty"` - // Email - The email contact for this SOA record. - Email *string `json:"email,omitempty"` - // SerialNumber - The serial number for this SOA record. - SerialNumber *int64 `json:"serialNumber,omitempty"` - // RefreshTime - The refresh value for this SOA record. - RefreshTime *int64 `json:"refreshTime,omitempty"` - // RetryTime - The retry time for this SOA record. - RetryTime *int64 `json:"retryTime,omitempty"` - // ExpireTime - The expire time for this SOA record. - ExpireTime *int64 `json:"expireTime,omitempty"` - // MinimumTTL - The minimum value for this SOA record. By convention this is used to determine the negative caching duration. - MinimumTTL *int64 `json:"minimumTTL,omitempty"` -} - -// SrvRecord an SRV record. -type SrvRecord struct { - // Priority - The priority value for this SRV record. - Priority *int32 `json:"priority,omitempty"` - // Weight - The weight value for this SRV record. - Weight *int32 `json:"weight,omitempty"` - // Port - The port value for this SRV record. - Port *int32 `json:"port,omitempty"` - // Target - The target domain name for this SRV record. - Target *string `json:"target,omitempty"` -} - -// SubResource a reference to a another resource -type SubResource struct { - // ID - Resource Id. - ID *string `json:"id,omitempty"` -} - -// TxtRecord a TXT record. -type TxtRecord struct { - // Value - The text value of this TXT record. - Value *[]string `json:"value,omitempty"` -} - -// Zone describes a DNS zone. -type Zone struct { - autorest.Response `json:"-"` - // Etag - The etag of the zone. - Etag *string `json:"etag,omitempty"` - // ZoneProperties - The properties of the zone. - *ZoneProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Resource ID. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; Resource name. - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; Resource type. - Type *string `json:"type,omitempty"` - // Location - Resource location. - Location *string `json:"location,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for Zone. -func (z Zone) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if z.Etag != nil { - objectMap["etag"] = z.Etag - } - if z.ZoneProperties != nil { - objectMap["properties"] = z.ZoneProperties - } - if z.Location != nil { - objectMap["location"] = z.Location - } - if z.Tags != nil { - objectMap["tags"] = z.Tags - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for Zone struct. -func (z *Zone) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - z.Etag = &etag - } - case "properties": - if v != nil { - var zoneProperties ZoneProperties - err = json.Unmarshal(*v, &zoneProperties) - if err != nil { - return err - } - z.ZoneProperties = &zoneProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - z.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - z.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - z.Type = &typeVar - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - z.Location = &location - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - z.Tags = tags - } - } - } - - return nil -} - -// ZoneListResult the response to a Zone List or ListAll operation. -type ZoneListResult struct { - autorest.Response `json:"-"` - // Value - Information about the DNS zones. - Value *[]Zone `json:"value,omitempty"` - // NextLink - READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for ZoneListResult. -func (zlr ZoneListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if zlr.Value != nil { - objectMap["value"] = zlr.Value - } - return json.Marshal(objectMap) -} - -// ZoneListResultIterator provides access to a complete listing of Zone values. -type ZoneListResultIterator struct { - i int - page ZoneListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *ZoneListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *ZoneListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter ZoneListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter ZoneListResultIterator) Response() ZoneListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter ZoneListResultIterator) Value() Zone { - if !iter.page.NotDone() { - return Zone{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the ZoneListResultIterator type. -func NewZoneListResultIterator(page ZoneListResultPage) ZoneListResultIterator { - return ZoneListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (zlr ZoneListResult) IsEmpty() bool { - return zlr.Value == nil || len(*zlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (zlr ZoneListResult) hasNextLink() bool { - return zlr.NextLink != nil && len(*zlr.NextLink) != 0 -} - -// zoneListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (zlr ZoneListResult) zoneListResultPreparer(ctx context.Context) (*http.Request, error) { - if !zlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(zlr.NextLink))) -} - -// ZoneListResultPage contains a page of Zone values. -type ZoneListResultPage struct { - fn func(context.Context, ZoneListResult) (ZoneListResult, error) - zlr ZoneListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *ZoneListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZoneListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.zlr) - if err != nil { - return err - } - page.zlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *ZoneListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page ZoneListResultPage) NotDone() bool { - return !page.zlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page ZoneListResultPage) Response() ZoneListResult { - return page.zlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page ZoneListResultPage) Values() []Zone { - if page.zlr.IsEmpty() { - return nil - } - return *page.zlr.Value -} - -// Creates a new instance of the ZoneListResultPage type. -func NewZoneListResultPage(cur ZoneListResult, getNextPage func(context.Context, ZoneListResult) (ZoneListResult, error)) ZoneListResultPage { - return ZoneListResultPage{ - fn: getNextPage, - zlr: cur, - } -} - -// ZoneProperties represents the properties of the zone. -type ZoneProperties struct { - // MaxNumberOfRecordSets - READ-ONLY; The maximum number of record sets that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. - MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"` - // MaxNumberOfRecordsPerRecordSet - READ-ONLY; The maximum number of records per record set that can be created in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. - MaxNumberOfRecordsPerRecordSet *int64 `json:"maxNumberOfRecordsPerRecordSet,omitempty"` - // NumberOfRecordSets - READ-ONLY; The current number of record sets in this DNS zone. This is a read-only property and any attempt to set this value will be ignored. - NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"` - // NameServers - READ-ONLY; The name servers for this DNS zone. This is a read-only property and any attempt to set this value will be ignored. - NameServers *[]string `json:"nameServers,omitempty"` - // ZoneType - The type of this DNS zone (Public or Private). Possible values include: 'Public', 'Private' - ZoneType ZoneType `json:"zoneType,omitempty"` - // RegistrationVirtualNetworks - A list of references to virtual networks that register hostnames in this DNS zone. This is a only when ZoneType is Private. - RegistrationVirtualNetworks *[]SubResource `json:"registrationVirtualNetworks,omitempty"` - // ResolutionVirtualNetworks - A list of references to virtual networks that resolve records in this DNS zone. This is a only when ZoneType is Private. - ResolutionVirtualNetworks *[]SubResource `json:"resolutionVirtualNetworks,omitempty"` -} - -// MarshalJSON is the custom marshaler for ZoneProperties. -func (zp ZoneProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if zp.ZoneType != "" { - objectMap["zoneType"] = zp.ZoneType - } - if zp.RegistrationVirtualNetworks != nil { - objectMap["registrationVirtualNetworks"] = zp.RegistrationVirtualNetworks - } - if zp.ResolutionVirtualNetworks != nil { - objectMap["resolutionVirtualNetworks"] = zp.ResolutionVirtualNetworks - } - return json.Marshal(objectMap) -} - -// ZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running operation. -type ZonesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(ZonesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *ZonesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for ZonesDeleteFuture.Result. -func (future *ZonesDeleteFuture) result(client ZonesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("dns.ZonesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// ZoneUpdate describes a request to update a DNS zone. -type ZoneUpdate struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` -} - -// MarshalJSON is the custom marshaler for ZoneUpdate. -func (zu ZoneUpdate) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if zu.Tags != nil { - objectMap["tags"] = zu.Tags - } - return json.Marshal(objectMap) -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go deleted file mode 100644 index d3aa10e26d..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/recordsets.go +++ /dev/null @@ -1,774 +0,0 @@ -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RecordSetsClient is the the DNS Management Client. -type RecordSetsClient struct { - BaseClient -} - -// NewRecordSetsClient creates an instance of the RecordSetsClient client. -func NewRecordSetsClient(subscriptionID string) RecordSetsClient { - return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { - return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a record set within a DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// recordType - the type of DNS record in this record set. Record sets of type SOA can be updated but not -// created (they are created when the DNS zone is created). -// parameters - parameters supplied to the CreateOrUpdate operation. -// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify -// the last-seen etag value to prevent accidentally overwriting any concurrent changes. -// ifNoneMatch - set to '*' to allow a new record set to be created, but to prevent updating an existing record -// set. Other values will be ignored. -func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch, ifNoneMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RecordSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string, ifNoneMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - if len(ifNoneMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a record set from a DNS zone. This operation cannot be undone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// recordType - the type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are -// deleted when the DNS zone is deleted). -// ifMatch - the etag of the record set. Omit this value to always delete the current record set. Specify the -// last-seen etag value to prevent accidentally deleting any concurrent changes. -func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RecordSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a record set. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// recordType - the type of DNS record in this record set. -func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RecordSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) GetResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// ListAllByDNSZone lists all record sets in a DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -// recordSetNameSuffix - the suffix label of the record set name that has to be used to filter the record set -// enumerations. If this parameter is specified, Enumeration will return only records that end with -// . -func (client RecordSetsClient) ListAllByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result RecordSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListAllByDNSZone") - defer func() { - sc := -1 - if result.rslr.Response.Response != nil { - sc = result.rslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listAllByDNSZoneNextResults - req, err := client.ListAllByDNSZonePreparer(ctx, resourceGroupName, zoneName, top, recordSetNameSuffix) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListAllByDNSZone", nil, "Failure preparing request") - return - } - - resp, err := client.ListAllByDNSZoneSender(req) - if err != nil { - result.rslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListAllByDNSZone", resp, "Failure sending request") - return - } - - result.rslr, err = client.ListAllByDNSZoneResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListAllByDNSZone", resp, "Failure responding to request") - return - } - if result.rslr.hasNextLink() && result.rslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListAllByDNSZonePreparer prepares the ListAllByDNSZone request. -func (client RecordSetsClient) ListAllByDNSZonePreparer(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(recordSetNameSuffix) > 0 { - queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordSetNameSuffix) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/all", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListAllByDNSZoneSender sends the ListAllByDNSZone request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) ListAllByDNSZoneSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListAllByDNSZoneResponder handles the response to the ListAllByDNSZone request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) ListAllByDNSZoneResponder(resp *http.Response) (result RecordSetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listAllByDNSZoneNextResults retrieves the next set of results, if any. -func (client RecordSetsClient) listAllByDNSZoneNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) { - req, err := lastResults.recordSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listAllByDNSZoneNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListAllByDNSZoneSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listAllByDNSZoneNextResults", resp, "Failure sending next results request") - } - result, err = client.ListAllByDNSZoneResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listAllByDNSZoneNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListAllByDNSZoneComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecordSetsClient) ListAllByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordSetNameSuffix string) (result RecordSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListAllByDNSZone") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListAllByDNSZone(ctx, resourceGroupName, zoneName, top, recordSetNameSuffix) - return -} - -// ListByDNSZone lists all record sets in a DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -// recordsetnamesuffix - the suffix label of the record set name that has to be used to filter the record set -// enumerations. If this parameter is specified, Enumeration will return only records that end with -// . -func (client RecordSetsClient) ListByDNSZone(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone") - defer func() { - sc := -1 - if result.rslr.Response.Response != nil { - sc = result.rslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByDNSZoneNextResults - req, err := client.ListByDNSZonePreparer(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", nil, "Failure preparing request") - return - } - - resp, err := client.ListByDNSZoneSender(req) - if err != nil { - result.rslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure sending request") - return - } - - result.rslr, err = client.ListByDNSZoneResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByDNSZone", resp, "Failure responding to request") - return - } - if result.rslr.hasNextLink() && result.rslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByDNSZonePreparer prepares the ListByDNSZone request. -func (client RecordSetsClient) ListByDNSZonePreparer(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(recordsetnamesuffix) > 0 { - queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/recordsets", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByDNSZoneSender sends the ListByDNSZone request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) ListByDNSZoneSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByDNSZoneResponder handles the response to the ListByDNSZone request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) ListByDNSZoneResponder(resp *http.Response) (result RecordSetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByDNSZoneNextResults retrieves the next set of results, if any. -func (client RecordSetsClient) listByDNSZoneNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) { - req, err := lastResults.recordSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByDNSZoneSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByDNSZoneResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByDNSZoneNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByDNSZoneComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecordSetsClient) ListByDNSZoneComplete(ctx context.Context, resourceGroupName string, zoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByDNSZone") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByDNSZone(ctx, resourceGroupName, zoneName, top, recordsetnamesuffix) - return -} - -// ListByType lists the record sets of a specified type in a DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// recordType - the type of record sets to enumerate. -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -// recordsetnamesuffix - the suffix label of the record set name that has to be used to filter the record set -// enumerations. If this parameter is specified, Enumeration will return only records that end with -// . -func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType") - defer func() { - sc := -1 - if result.rslr.Response.Response != nil { - sc = result.rslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByTypeNextResults - req, err := client.ListByTypePreparer(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", nil, "Failure preparing request") - return - } - - resp, err := client.ListByTypeSender(req) - if err != nil { - result.rslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure sending request") - return - } - - result.rslr, err = client.ListByTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "ListByType", resp, "Failure responding to request") - return - } - if result.rslr.hasNextLink() && result.rslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByTypePreparer prepares the ListByType request. -func (client RecordSetsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recordType": autorest.Encode("path", recordType), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(recordsetnamesuffix) > 0 { - queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByTypeSender sends the ListByType request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) ListByTypeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByTypeResponder handles the response to the ListByType request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) ListByTypeResponder(resp *http.Response) (result RecordSetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByTypeNextResults retrieves the next set of results, if any. -func (client RecordSetsClient) listByTypeNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) { - req, err := lastResults.recordSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByTypeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "listByTypeNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByTypeComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceGroupName string, zoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByType(ctx, resourceGroupName, zoneName, recordType, top, recordsetnamesuffix) - return -} - -// Update updates a record set within a DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// recordType - the type of DNS record in this record set. -// parameters - parameters supplied to the Update operation. -// ifMatch - the etag of the record set. Omit this value to always overwrite the current record set. Specify -// the last-seen etag value to prevent accidentally overwriting concurrent changes. -func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, relativeRecordSetName, recordType, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.RecordSetsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RecordSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, relativeRecordSetName string, recordType RecordType, parameters RecordSet, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - parameters.ID = nil - parameters.Name = nil - parameters.Type = nil - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) UpdateResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go deleted file mode 100644 index 875735853f..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/resourcereference.go +++ /dev/null @@ -1,107 +0,0 @@ -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ResourceReferenceClient is the the DNS Management Client. -type ResourceReferenceClient struct { - BaseClient -} - -// NewResourceReferenceClient creates an instance of the ResourceReferenceClient client. -func NewResourceReferenceClient(subscriptionID string) ResourceReferenceClient { - return NewResourceReferenceClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewResourceReferenceClientWithBaseURI creates an instance of the ResourceReferenceClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewResourceReferenceClientWithBaseURI(baseURI string, subscriptionID string) ResourceReferenceClient { - return ResourceReferenceClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// GetByTargetResources returns the DNS records specified by the referencing targetResourceIds. -// Parameters: -// parameters - properties for dns resource reference request. -func (client ResourceReferenceClient) GetByTargetResources(ctx context.Context, parameters ResourceReferenceRequest) (result ResourceReferenceResult, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ResourceReferenceClient.GetByTargetResources") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetByTargetResourcesPreparer(ctx, parameters) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ResourceReferenceClient", "GetByTargetResources", nil, "Failure preparing request") - return - } - - resp, err := client.GetByTargetResourcesSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ResourceReferenceClient", "GetByTargetResources", resp, "Failure sending request") - return - } - - result, err = client.GetByTargetResourcesResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ResourceReferenceClient", "GetByTargetResources", resp, "Failure responding to request") - return - } - - return -} - -// GetByTargetResourcesPreparer prepares the GetByTargetResources request. -func (client ResourceReferenceClient) GetByTargetResourcesPreparer(ctx context.Context, parameters ResourceReferenceRequest) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPost(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/getDnsResourceReference", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetByTargetResourcesSender sends the GetByTargetResources request. The method will close the -// http.Response Body if it receives an error. -func (client ResourceReferenceClient) GetByTargetResourcesSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetByTargetResourcesResponder handles the response to the GetByTargetResources request. The method always -// closes the http.Response Body. -func (client ResourceReferenceClient) GetByTargetResourcesResponder(resp *http.Response) (result ResourceReferenceResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/version.go deleted file mode 100644 index 940b45d22f..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package dns - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " dns/2018-05-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go deleted file mode 100644 index e004a72535..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns/zones.go +++ /dev/null @@ -1,606 +0,0 @@ -package dns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// ZonesClient is the the DNS Management Client. -type ZonesClient struct { - BaseClient -} - -// NewZonesClient creates an instance of the ZonesClient client. -func NewZonesClient(subscriptionID string) ZonesClient { - return NewZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewZonesClientWithBaseURI creates an instance of the ZonesClient client using a custom endpoint. Use this when -// interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewZonesClientWithBaseURI(baseURI string, subscriptionID string) ZonesClient { - return ZonesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a DNS zone. Does not modify DNS records within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// parameters - parameters supplied to the CreateOrUpdate operation. -// ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the -// last-seen etag value to prevent accidentally overwriting any concurrent changes. -// ifNoneMatch - set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. -// Other values will be ignored. -func (client ZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (result Zone, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch, ifNoneMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client ZonesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, parameters Zone, ifMatch string, ifNoneMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - if len(ifNoneMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client ZonesClient) CreateOrUpdateResponder(resp *http.Response) (result Zone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be -// undone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// ifMatch - the etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen -// etag value to prevent accidentally deleting any concurrent changes. -func (client ZonesClient) Delete(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (result ZonesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, zoneName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client ZonesClient) DeletePreparer(ctx context.Context, resourceGroupName string, zoneName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) DeleteSender(req *http.Request) (future ZonesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client ZonesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -func (client ZonesClient) Get(ctx context.Context, resourceGroupName string, zoneName string) (result Zone, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, zoneName) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client ZonesClient) GetPreparer(ctx context.Context, resourceGroupName string, zoneName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client ZonesClient) GetResponder(resp *http.Response) (result Zone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists the DNS zones in all resource groups in a subscription. -// Parameters: -// top - the maximum number of DNS zones to return. If not specified, returns up to 100 zones. -func (client ZonesClient) List(ctx context.Context, top *int32) (result ZoneListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.List") - defer func() { - sc := -1 - if result.zlr.Response.Response != nil { - sc = result.zlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, top) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.zlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure sending request") - return - } - - result.zlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "List", resp, "Failure responding to request") - return - } - if result.zlr.hasNextLink() && result.zlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client ZonesClient) ListPreparer(ctx context.Context, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/dnszones", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client ZonesClient) ListResponder(resp *http.Response) (result ZoneListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client ZonesClient) listNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) { - req, err := lastResults.zoneListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client ZonesClient) ListComplete(ctx context.Context, top *int32) (result ZoneListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, top) - return -} - -// ListByResourceGroup lists the DNS zones within a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -func (client ZonesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.zlr.Response.Response != nil { - sc = result.zlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.zlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.zlr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.zlr.hasNextLink() && result.zlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client ZonesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client ZonesClient) ListByResourceGroupResponder(resp *http.Response) (result ZoneListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client ZonesClient) listByResourceGroupNextResults(ctx context.Context, lastResults ZoneListResult) (result ZoneListResult, err error) { - req, err := lastResults.zoneListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "dns.ZonesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client ZonesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result ZoneListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, top) - return -} - -// Update updates a DNS zone. Does not modify DNS records within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// zoneName - the name of the DNS zone (without a terminating dot). -// parameters - parameters supplied to the Update operation. -// ifMatch - the etag of the DNS zone. Omit this value to always overwrite the current zone. Specify the -// last-seen etag value to prevent accidentally overwriting any concurrent changes. -func (client ZonesClient) Update(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (result Zone, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/ZonesClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, zoneName, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "dns.ZonesClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client ZonesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, zoneName string, parameters ZoneUpdate, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "zoneName": autorest.Encode("path", zoneName), - } - - const APIVersion = "2018-05-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client ZonesClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client ZonesClient) UpdateResponder(resp *http.Response) (result Zone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/CHANGELOG.md b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/CHANGELOG.md deleted file mode 100644 index 52911e4cc5..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Change History - diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/_meta.json b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/_meta.json deleted file mode 100644 index b7152c030e..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/_meta.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "commit": "1c8d7850afbec9ede6de6f2d14bcc30896a74ed6", - "readme": "/_/azure-rest-api-specs/specification/privatedns/resource-manager/readme.md", - "tag": "package-2020-06", - "use": "@microsoft.azure/autorest.go@2.1.188", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "autorest_command": "autorest --use=@microsoft.azure/autorest.go@2.1.188 --tag=package-2020-06 --go-sdk-folder=/_/azure-sdk-for-go --go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION /_/azure-rest-api-specs/specification/privatedns/resource-manager/readme.md", - "additional_properties": { - "additional_options": "--go --verbose --use-onever --version=2.0.4421 --go.license-header=MICROSOFT_MIT_NO_VERSION" - } -} \ No newline at end of file diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/client.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/client.go deleted file mode 100644 index f433024ce9..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/client.go +++ /dev/null @@ -1,43 +0,0 @@ -// Deprecated: Please note, this package has been deprecated. A replacement package is available [github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns). We strongly encourage you to upgrade to continue receiving updates. See [Migration Guide](https://aka.ms/azsdk/golang/t2/migration) for guidance on upgrading. Refer to our [deprecation policy](https://azure.github.io/azure-sdk/policies_support.html) for more details. -// -// Package privatedns implements the Azure ARM Privatedns service API version 2020-06-01. -// -// The Private DNS Management Client. -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "github.com/Azure/go-autorest/autorest" -) - -const ( - // DefaultBaseURI is the default URI used for the service Privatedns - DefaultBaseURI = "https://management.azure.com" -) - -// BaseClient is the base client for Privatedns. -type BaseClient struct { - autorest.Client - BaseURI string - SubscriptionID string -} - -// New creates an instance of the BaseClient client. -func New(subscriptionID string) BaseClient { - return NewWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewWithBaseURI creates an instance of the BaseClient client using a custom endpoint. Use this when interacting with -// an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewWithBaseURI(baseURI string, subscriptionID string) BaseClient { - return BaseClient{ - Client: autorest.NewClientWithUserAgent(UserAgent()), - BaseURI: baseURI, - SubscriptionID: subscriptionID, - } -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/enums.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/enums.go deleted file mode 100644 index a4cbf2a65e..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/enums.go +++ /dev/null @@ -1,72 +0,0 @@ -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// ProvisioningState enumerates the values for provisioning state. -type ProvisioningState string - -const ( - // Canceled ... - Canceled ProvisioningState = "Canceled" - // Creating ... - Creating ProvisioningState = "Creating" - // Deleting ... - Deleting ProvisioningState = "Deleting" - // Failed ... - Failed ProvisioningState = "Failed" - // Succeeded ... - Succeeded ProvisioningState = "Succeeded" - // Updating ... - Updating ProvisioningState = "Updating" -) - -// PossibleProvisioningStateValues returns an array of possible values for the ProvisioningState const type. -func PossibleProvisioningStateValues() []ProvisioningState { - return []ProvisioningState{Canceled, Creating, Deleting, Failed, Succeeded, Updating} -} - -// RecordType enumerates the values for record type. -type RecordType string - -const ( - // A ... - A RecordType = "A" - // AAAA ... - AAAA RecordType = "AAAA" - // CNAME ... - CNAME RecordType = "CNAME" - // MX ... - MX RecordType = "MX" - // PTR ... - PTR RecordType = "PTR" - // SOA ... - SOA RecordType = "SOA" - // SRV ... - SRV RecordType = "SRV" - // TXT ... - TXT RecordType = "TXT" -) - -// PossibleRecordTypeValues returns an array of possible values for the RecordType const type. -func PossibleRecordTypeValues() []RecordType { - return []RecordType{A, AAAA, CNAME, MX, PTR, SOA, SRV, TXT} -} - -// VirtualNetworkLinkState enumerates the values for virtual network link state. -type VirtualNetworkLinkState string - -const ( - // Completed ... - Completed VirtualNetworkLinkState = "Completed" - // InProgress ... - InProgress VirtualNetworkLinkState = "InProgress" -) - -// PossibleVirtualNetworkLinkStateValues returns an array of possible values for the VirtualNetworkLinkState const type. -func PossibleVirtualNetworkLinkStateValues() []VirtualNetworkLinkState { - return []VirtualNetworkLinkState{Completed, InProgress} -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/models.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/models.go deleted file mode 100644 index 23bc84919e..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/models.go +++ /dev/null @@ -1,1352 +0,0 @@ -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "encoding/json" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/autorest/to" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// The package's fully qualified name. -const fqdn = "github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns" - -// AaaaRecord an AAAA record. -type AaaaRecord struct { - // Ipv6Address - The IPv6 address of this AAAA record. - Ipv6Address *string `json:"ipv6Address,omitempty"` -} - -// ARecord an A record. -type ARecord struct { - // Ipv4Address - The IPv4 address of this A record. - Ipv4Address *string `json:"ipv4Address,omitempty"` -} - -// CloudError an error response from the service. -type CloudError struct { - // Error - Cloud error body. - Error *CloudErrorBody `json:"error,omitempty"` -} - -// CloudErrorBody an error response from the service. -type CloudErrorBody struct { - // Code - An identifier for the error. Codes are invariant and are intended to be consumed programmatically. - Code *string `json:"code,omitempty"` - // Message - A message describing the error, intended to be suitable for display in a user interface. - Message *string `json:"message,omitempty"` - // Target - The target of the particular error. For example, the name of the property in error. - Target *string `json:"target,omitempty"` - // Details - A list of additional details about the error. - Details *[]CloudErrorBody `json:"details,omitempty"` -} - -// CnameRecord a CNAME record. -type CnameRecord struct { - // Cname - The canonical name for this CNAME record. - Cname *string `json:"cname,omitempty"` -} - -// MxRecord an MX record. -type MxRecord struct { - // Preference - The preference value for this MX record. - Preference *int32 `json:"preference,omitempty"` - // Exchange - The domain name of the mail host for this MX record. - Exchange *string `json:"exchange,omitempty"` -} - -// PrivateZone describes a Private DNS zone. -type PrivateZone struct { - autorest.Response `json:"-"` - // Etag - The ETag of the zone. - Etag *string `json:"etag,omitempty"` - // PrivateZoneProperties - Properties of the Private DNS zone. - *PrivateZoneProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - The Azure Region where the resource lives - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateZone. -func (pz PrivateZone) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pz.Etag != nil { - objectMap["etag"] = pz.Etag - } - if pz.PrivateZoneProperties != nil { - objectMap["properties"] = pz.PrivateZoneProperties - } - if pz.Tags != nil { - objectMap["tags"] = pz.Tags - } - if pz.Location != nil { - objectMap["location"] = pz.Location - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for PrivateZone struct. -func (pz *PrivateZone) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - pz.Etag = &etag - } - case "properties": - if v != nil { - var privateZoneProperties PrivateZoneProperties - err = json.Unmarshal(*v, &privateZoneProperties) - if err != nil { - return err - } - pz.PrivateZoneProperties = &privateZoneProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - pz.Tags = tags - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - pz.Location = &location - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - pz.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - pz.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - pz.Type = &typeVar - } - } - } - - return nil -} - -// PrivateZoneListResult the response to a Private DNS zone list operation. -type PrivateZoneListResult struct { - autorest.Response `json:"-"` - // Value - Information about the Private DNS zones. - Value *[]PrivateZone `json:"value,omitempty"` - // NextLink - READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateZoneListResult. -func (pzlr PrivateZoneListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if pzlr.Value != nil { - objectMap["value"] = pzlr.Value - } - return json.Marshal(objectMap) -} - -// PrivateZoneListResultIterator provides access to a complete listing of PrivateZone values. -type PrivateZoneListResultIterator struct { - i int - page PrivateZoneListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *PrivateZoneListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZoneListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *PrivateZoneListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter PrivateZoneListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter PrivateZoneListResultIterator) Response() PrivateZoneListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter PrivateZoneListResultIterator) Value() PrivateZone { - if !iter.page.NotDone() { - return PrivateZone{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the PrivateZoneListResultIterator type. -func NewPrivateZoneListResultIterator(page PrivateZoneListResultPage) PrivateZoneListResultIterator { - return PrivateZoneListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (pzlr PrivateZoneListResult) IsEmpty() bool { - return pzlr.Value == nil || len(*pzlr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (pzlr PrivateZoneListResult) hasNextLink() bool { - return pzlr.NextLink != nil && len(*pzlr.NextLink) != 0 -} - -// privateZoneListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (pzlr PrivateZoneListResult) privateZoneListResultPreparer(ctx context.Context) (*http.Request, error) { - if !pzlr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(pzlr.NextLink))) -} - -// PrivateZoneListResultPage contains a page of PrivateZone values. -type PrivateZoneListResultPage struct { - fn func(context.Context, PrivateZoneListResult) (PrivateZoneListResult, error) - pzlr PrivateZoneListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *PrivateZoneListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZoneListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.pzlr) - if err != nil { - return err - } - page.pzlr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *PrivateZoneListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page PrivateZoneListResultPage) NotDone() bool { - return !page.pzlr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page PrivateZoneListResultPage) Response() PrivateZoneListResult { - return page.pzlr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page PrivateZoneListResultPage) Values() []PrivateZone { - if page.pzlr.IsEmpty() { - return nil - } - return *page.pzlr.Value -} - -// Creates a new instance of the PrivateZoneListResultPage type. -func NewPrivateZoneListResultPage(cur PrivateZoneListResult, getNextPage func(context.Context, PrivateZoneListResult) (PrivateZoneListResult, error)) PrivateZoneListResultPage { - return PrivateZoneListResultPage{ - fn: getNextPage, - pzlr: cur, - } -} - -// PrivateZoneProperties represents the properties of the Private DNS zone. -type PrivateZoneProperties struct { - // MaxNumberOfRecordSets - READ-ONLY; The maximum number of record sets that can be created in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. - MaxNumberOfRecordSets *int64 `json:"maxNumberOfRecordSets,omitempty"` - // NumberOfRecordSets - READ-ONLY; The current number of record sets in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. - NumberOfRecordSets *int64 `json:"numberOfRecordSets,omitempty"` - // MaxNumberOfVirtualNetworkLinks - READ-ONLY; The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. - MaxNumberOfVirtualNetworkLinks *int64 `json:"maxNumberOfVirtualNetworkLinks,omitempty"` - // NumberOfVirtualNetworkLinks - READ-ONLY; The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. - NumberOfVirtualNetworkLinks *int64 `json:"numberOfVirtualNetworkLinks,omitempty"` - // MaxNumberOfVirtualNetworkLinksWithRegistration - READ-ONLY; The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. - MaxNumberOfVirtualNetworkLinksWithRegistration *int64 `json:"maxNumberOfVirtualNetworkLinksWithRegistration,omitempty"` - // NumberOfVirtualNetworkLinksWithRegistration - READ-ONLY; The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. - NumberOfVirtualNetworkLinksWithRegistration *int64 `json:"numberOfVirtualNetworkLinksWithRegistration,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` - // InternalID - READ-ONLY; Private zone internal Id - InternalID *string `json:"internalId,omitempty"` -} - -// MarshalJSON is the custom marshaler for PrivateZoneProperties. -func (pzp PrivateZoneProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PrivateZonesCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type PrivateZonesCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateZonesClient) (PrivateZone, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateZonesCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateZonesCreateOrUpdateFuture.Result. -func (future *PrivateZonesCreateOrUpdateFuture) result(client PrivateZonesClient) (pz PrivateZone, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pz.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pz.Response.Response, err = future.GetResult(sender); err == nil && pz.Response.Response.StatusCode != http.StatusNoContent { - pz, err = client.CreateOrUpdateResponder(pz.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesCreateOrUpdateFuture", "Result", pz.Response.Response, "Failure responding to request") - } - } - return -} - -// PrivateZonesDeleteFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PrivateZonesDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateZonesClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateZonesDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateZonesDeleteFuture.Result. -func (future *PrivateZonesDeleteFuture) result(client PrivateZonesClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// PrivateZonesUpdateFuture an abstraction for monitoring and retrieving the results of a long-running -// operation. -type PrivateZonesUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(PrivateZonesClient) (PrivateZone, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *PrivateZonesUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for PrivateZonesUpdateFuture.Result. -func (future *PrivateZonesUpdateFuture) result(client PrivateZonesClient) (pz PrivateZone, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - pz.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.PrivateZonesUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if pz.Response.Response, err = future.GetResult(sender); err == nil && pz.Response.Response.StatusCode != http.StatusNoContent { - pz, err = client.UpdateResponder(pz.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesUpdateFuture", "Result", pz.Response.Response, "Failure responding to request") - } - } - return -} - -// ProxyResource the resource model definition for an ARM proxy resource. -type ProxyResource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for ProxyResource. -func (pr ProxyResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// PtrRecord a PTR record. -type PtrRecord struct { - // Ptrdname - The PTR target domain name for this PTR record. - Ptrdname *string `json:"ptrdname,omitempty"` -} - -// RecordSet describes a DNS record set (a collection of DNS records with the same name and type) in a -// Private DNS zone. -type RecordSet struct { - autorest.Response `json:"-"` - // Etag - The ETag of the record set. - Etag *string `json:"etag,omitempty"` - // RecordSetProperties - The properties of the record set. - *RecordSetProperties `json:"properties,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSet. -func (rs RecordSet) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rs.Etag != nil { - objectMap["etag"] = rs.Etag - } - if rs.RecordSetProperties != nil { - objectMap["properties"] = rs.RecordSetProperties - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for RecordSet struct. -func (rs *RecordSet) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - rs.Etag = &etag - } - case "properties": - if v != nil { - var recordSetProperties RecordSetProperties - err = json.Unmarshal(*v, &recordSetProperties) - if err != nil { - return err - } - rs.RecordSetProperties = &recordSetProperties - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - rs.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - rs.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - rs.Type = &typeVar - } - } - } - - return nil -} - -// RecordSetListResult the response to a record set list operation. -type RecordSetListResult struct { - autorest.Response `json:"-"` - // Value - Information about the record sets in the response. - Value *[]RecordSet `json:"value,omitempty"` - // NextLink - READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSetListResult. -func (rslr RecordSetListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rslr.Value != nil { - objectMap["value"] = rslr.Value - } - return json.Marshal(objectMap) -} - -// RecordSetListResultIterator provides access to a complete listing of RecordSet values. -type RecordSetListResultIterator struct { - i int - page RecordSetListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *RecordSetListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *RecordSetListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter RecordSetListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter RecordSetListResultIterator) Response() RecordSetListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter RecordSetListResultIterator) Value() RecordSet { - if !iter.page.NotDone() { - return RecordSet{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the RecordSetListResultIterator type. -func NewRecordSetListResultIterator(page RecordSetListResultPage) RecordSetListResultIterator { - return RecordSetListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (rslr RecordSetListResult) IsEmpty() bool { - return rslr.Value == nil || len(*rslr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (rslr RecordSetListResult) hasNextLink() bool { - return rslr.NextLink != nil && len(*rslr.NextLink) != 0 -} - -// recordSetListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (rslr RecordSetListResult) recordSetListResultPreparer(ctx context.Context) (*http.Request, error) { - if !rslr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(rslr.NextLink))) -} - -// RecordSetListResultPage contains a page of RecordSet values. -type RecordSetListResultPage struct { - fn func(context.Context, RecordSetListResult) (RecordSetListResult, error) - rslr RecordSetListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *RecordSetListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.rslr) - if err != nil { - return err - } - page.rslr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *RecordSetListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page RecordSetListResultPage) NotDone() bool { - return !page.rslr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page RecordSetListResultPage) Response() RecordSetListResult { - return page.rslr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page RecordSetListResultPage) Values() []RecordSet { - if page.rslr.IsEmpty() { - return nil - } - return *page.rslr.Value -} - -// Creates a new instance of the RecordSetListResultPage type. -func NewRecordSetListResultPage(cur RecordSetListResult, getNextPage func(context.Context, RecordSetListResult) (RecordSetListResult, error)) RecordSetListResultPage { - return RecordSetListResultPage{ - fn: getNextPage, - rslr: cur, - } -} - -// RecordSetProperties represents the properties of the records in the record set. -type RecordSetProperties struct { - // Metadata - The metadata attached to the record set. - Metadata map[string]*string `json:"metadata"` - // TTL - The TTL (time-to-live) of the records in the record set. - TTL *int64 `json:"ttl,omitempty"` - // Fqdn - READ-ONLY; Fully qualified domain name of the record set. - Fqdn *string `json:"fqdn,omitempty"` - // IsAutoRegistered - READ-ONLY; Is the record set auto-registered in the Private DNS zone through a virtual network link? - IsAutoRegistered *bool `json:"isAutoRegistered,omitempty"` - // ARecords - The list of A records in the record set. - ARecords *[]ARecord `json:"aRecords,omitempty"` - // AaaaRecords - The list of AAAA records in the record set. - AaaaRecords *[]AaaaRecord `json:"aaaaRecords,omitempty"` - // CnameRecord - The CNAME record in the record set. - CnameRecord *CnameRecord `json:"cnameRecord,omitempty"` - // MxRecords - The list of MX records in the record set. - MxRecords *[]MxRecord `json:"mxRecords,omitempty"` - // PtrRecords - The list of PTR records in the record set. - PtrRecords *[]PtrRecord `json:"ptrRecords,omitempty"` - // SoaRecord - The SOA record in the record set. - SoaRecord *SoaRecord `json:"soaRecord,omitempty"` - // SrvRecords - The list of SRV records in the record set. - SrvRecords *[]SrvRecord `json:"srvRecords,omitempty"` - // TxtRecords - The list of TXT records in the record set. - TxtRecords *[]TxtRecord `json:"txtRecords,omitempty"` -} - -// MarshalJSON is the custom marshaler for RecordSetProperties. -func (rsp RecordSetProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if rsp.Metadata != nil { - objectMap["metadata"] = rsp.Metadata - } - if rsp.TTL != nil { - objectMap["ttl"] = rsp.TTL - } - if rsp.ARecords != nil { - objectMap["aRecords"] = rsp.ARecords - } - if rsp.AaaaRecords != nil { - objectMap["aaaaRecords"] = rsp.AaaaRecords - } - if rsp.CnameRecord != nil { - objectMap["cnameRecord"] = rsp.CnameRecord - } - if rsp.MxRecords != nil { - objectMap["mxRecords"] = rsp.MxRecords - } - if rsp.PtrRecords != nil { - objectMap["ptrRecords"] = rsp.PtrRecords - } - if rsp.SoaRecord != nil { - objectMap["soaRecord"] = rsp.SoaRecord - } - if rsp.SrvRecords != nil { - objectMap["srvRecords"] = rsp.SrvRecords - } - if rsp.TxtRecords != nil { - objectMap["txtRecords"] = rsp.TxtRecords - } - return json.Marshal(objectMap) -} - -// Resource the core properties of ARM resources -type Resource struct { - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for Resource. -func (r Resource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - return json.Marshal(objectMap) -} - -// SoaRecord an SOA record. -type SoaRecord struct { - // Host - The domain name of the authoritative name server for this SOA record. - Host *string `json:"host,omitempty"` - // Email - The email contact for this SOA record. - Email *string `json:"email,omitempty"` - // SerialNumber - The serial number for this SOA record. - SerialNumber *int64 `json:"serialNumber,omitempty"` - // RefreshTime - The refresh value for this SOA record. - RefreshTime *int64 `json:"refreshTime,omitempty"` - // RetryTime - The retry time for this SOA record. - RetryTime *int64 `json:"retryTime,omitempty"` - // ExpireTime - The expire time for this SOA record. - ExpireTime *int64 `json:"expireTime,omitempty"` - // MinimumTTL - The minimum value for this SOA record. By convention this is used to determine the negative caching duration. - MinimumTTL *int64 `json:"minimumTtl,omitempty"` -} - -// SrvRecord an SRV record. -type SrvRecord struct { - // Priority - The priority value for this SRV record. - Priority *int32 `json:"priority,omitempty"` - // Weight - The weight value for this SRV record. - Weight *int32 `json:"weight,omitempty"` - // Port - The port value for this SRV record. - Port *int32 `json:"port,omitempty"` - // Target - The target domain name for this SRV record. - Target *string `json:"target,omitempty"` -} - -// SubResource reference to another subresource. -type SubResource struct { - // ID - Resource ID. - ID *string `json:"id,omitempty"` -} - -// TrackedResource the resource model definition for a ARM tracked top level resource -type TrackedResource struct { - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - The Azure Region where the resource lives - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for TrackedResource. -func (tr TrackedResource) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if tr.Tags != nil { - objectMap["tags"] = tr.Tags - } - if tr.Location != nil { - objectMap["location"] = tr.Location - } - return json.Marshal(objectMap) -} - -// TxtRecord a TXT record. -type TxtRecord struct { - // Value - The text value of this TXT record. - Value *[]string `json:"value,omitempty"` -} - -// VirtualNetworkLink describes a link to virtual network for a Private DNS zone. -type VirtualNetworkLink struct { - autorest.Response `json:"-"` - // Etag - The ETag of the virtual network link. - Etag *string `json:"etag,omitempty"` - // VirtualNetworkLinkProperties - Properties of the virtual network link to the Private DNS zone. - *VirtualNetworkLinkProperties `json:"properties,omitempty"` - // Tags - Resource tags. - Tags map[string]*string `json:"tags"` - // Location - The Azure Region where the resource lives - Location *string `json:"location,omitempty"` - // ID - READ-ONLY; Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. - ID *string `json:"id,omitempty"` - // Name - READ-ONLY; The name of the resource - Name *string `json:"name,omitempty"` - // Type - READ-ONLY; The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. - Type *string `json:"type,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkLink. -func (vnl VirtualNetworkLink) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnl.Etag != nil { - objectMap["etag"] = vnl.Etag - } - if vnl.VirtualNetworkLinkProperties != nil { - objectMap["properties"] = vnl.VirtualNetworkLinkProperties - } - if vnl.Tags != nil { - objectMap["tags"] = vnl.Tags - } - if vnl.Location != nil { - objectMap["location"] = vnl.Location - } - return json.Marshal(objectMap) -} - -// UnmarshalJSON is the custom unmarshaler for VirtualNetworkLink struct. -func (vnl *VirtualNetworkLink) UnmarshalJSON(body []byte) error { - var m map[string]*json.RawMessage - err := json.Unmarshal(body, &m) - if err != nil { - return err - } - for k, v := range m { - switch k { - case "etag": - if v != nil { - var etag string - err = json.Unmarshal(*v, &etag) - if err != nil { - return err - } - vnl.Etag = &etag - } - case "properties": - if v != nil { - var virtualNetworkLinkProperties VirtualNetworkLinkProperties - err = json.Unmarshal(*v, &virtualNetworkLinkProperties) - if err != nil { - return err - } - vnl.VirtualNetworkLinkProperties = &virtualNetworkLinkProperties - } - case "tags": - if v != nil { - var tags map[string]*string - err = json.Unmarshal(*v, &tags) - if err != nil { - return err - } - vnl.Tags = tags - } - case "location": - if v != nil { - var location string - err = json.Unmarshal(*v, &location) - if err != nil { - return err - } - vnl.Location = &location - } - case "id": - if v != nil { - var ID string - err = json.Unmarshal(*v, &ID) - if err != nil { - return err - } - vnl.ID = &ID - } - case "name": - if v != nil { - var name string - err = json.Unmarshal(*v, &name) - if err != nil { - return err - } - vnl.Name = &name - } - case "type": - if v != nil { - var typeVar string - err = json.Unmarshal(*v, &typeVar) - if err != nil { - return err - } - vnl.Type = &typeVar - } - } - } - - return nil -} - -// VirtualNetworkLinkListResult the response to a list virtual network link to Private DNS zone operation. -type VirtualNetworkLinkListResult struct { - autorest.Response `json:"-"` - // Value - Information about the virtual network links to the Private DNS zones. - Value *[]VirtualNetworkLink `json:"value,omitempty"` - // NextLink - READ-ONLY; The continuation token for the next page of results. - NextLink *string `json:"nextLink,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkLinkListResult. -func (vnllr VirtualNetworkLinkListResult) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnllr.Value != nil { - objectMap["value"] = vnllr.Value - } - return json.Marshal(objectMap) -} - -// VirtualNetworkLinkListResultIterator provides access to a complete listing of VirtualNetworkLink values. -type VirtualNetworkLinkListResultIterator struct { - i int - page VirtualNetworkLinkListResultPage -} - -// NextWithContext advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -func (iter *VirtualNetworkLinkListResultIterator) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinkListResultIterator.NextWithContext") - defer func() { - sc := -1 - if iter.Response().Response.Response != nil { - sc = iter.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - iter.i++ - if iter.i < len(iter.page.Values()) { - return nil - } - err = iter.page.NextWithContext(ctx) - if err != nil { - iter.i-- - return err - } - iter.i = 0 - return nil -} - -// Next advances to the next value. If there was an error making -// the request the iterator does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (iter *VirtualNetworkLinkListResultIterator) Next() error { - return iter.NextWithContext(context.Background()) -} - -// NotDone returns true if the enumeration should be started or is not yet complete. -func (iter VirtualNetworkLinkListResultIterator) NotDone() bool { - return iter.page.NotDone() && iter.i < len(iter.page.Values()) -} - -// Response returns the raw server response from the last page request. -func (iter VirtualNetworkLinkListResultIterator) Response() VirtualNetworkLinkListResult { - return iter.page.Response() -} - -// Value returns the current value or a zero-initialized value if the -// iterator has advanced beyond the end of the collection. -func (iter VirtualNetworkLinkListResultIterator) Value() VirtualNetworkLink { - if !iter.page.NotDone() { - return VirtualNetworkLink{} - } - return iter.page.Values()[iter.i] -} - -// Creates a new instance of the VirtualNetworkLinkListResultIterator type. -func NewVirtualNetworkLinkListResultIterator(page VirtualNetworkLinkListResultPage) VirtualNetworkLinkListResultIterator { - return VirtualNetworkLinkListResultIterator{page: page} -} - -// IsEmpty returns true if the ListResult contains no values. -func (vnllr VirtualNetworkLinkListResult) IsEmpty() bool { - return vnllr.Value == nil || len(*vnllr.Value) == 0 -} - -// hasNextLink returns true if the NextLink is not empty. -func (vnllr VirtualNetworkLinkListResult) hasNextLink() bool { - return vnllr.NextLink != nil && len(*vnllr.NextLink) != 0 -} - -// virtualNetworkLinkListResultPreparer prepares a request to retrieve the next set of results. -// It returns nil if no more results exist. -func (vnllr VirtualNetworkLinkListResult) virtualNetworkLinkListResultPreparer(ctx context.Context) (*http.Request, error) { - if !vnllr.hasNextLink() { - return nil, nil - } - return autorest.Prepare((&http.Request{}).WithContext(ctx), - autorest.AsJSON(), - autorest.AsGet(), - autorest.WithBaseURL(to.String(vnllr.NextLink))) -} - -// VirtualNetworkLinkListResultPage contains a page of VirtualNetworkLink values. -type VirtualNetworkLinkListResultPage struct { - fn func(context.Context, VirtualNetworkLinkListResult) (VirtualNetworkLinkListResult, error) - vnllr VirtualNetworkLinkListResult -} - -// NextWithContext advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -func (page *VirtualNetworkLinkListResultPage) NextWithContext(ctx context.Context) (err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinkListResultPage.NextWithContext") - defer func() { - sc := -1 - if page.Response().Response.Response != nil { - sc = page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - for { - next, err := page.fn(ctx, page.vnllr) - if err != nil { - return err - } - page.vnllr = next - if !next.hasNextLink() || !next.IsEmpty() { - break - } - } - return nil -} - -// Next advances to the next page of values. If there was an error making -// the request the page does not advance and the error is returned. -// Deprecated: Use NextWithContext() instead. -func (page *VirtualNetworkLinkListResultPage) Next() error { - return page.NextWithContext(context.Background()) -} - -// NotDone returns true if the page enumeration should be started or is not yet complete. -func (page VirtualNetworkLinkListResultPage) NotDone() bool { - return !page.vnllr.IsEmpty() -} - -// Response returns the raw server response from the last page request. -func (page VirtualNetworkLinkListResultPage) Response() VirtualNetworkLinkListResult { - return page.vnllr -} - -// Values returns the slice of values for the current page or nil if there are no values. -func (page VirtualNetworkLinkListResultPage) Values() []VirtualNetworkLink { - if page.vnllr.IsEmpty() { - return nil - } - return *page.vnllr.Value -} - -// Creates a new instance of the VirtualNetworkLinkListResultPage type. -func NewVirtualNetworkLinkListResultPage(cur VirtualNetworkLinkListResult, getNextPage func(context.Context, VirtualNetworkLinkListResult) (VirtualNetworkLinkListResult, error)) VirtualNetworkLinkListResultPage { - return VirtualNetworkLinkListResultPage{ - fn: getNextPage, - vnllr: cur, - } -} - -// VirtualNetworkLinkProperties represents the properties of the Private DNS zone. -type VirtualNetworkLinkProperties struct { - // VirtualNetwork - The reference of the virtual network. - VirtualNetwork *SubResource `json:"virtualNetwork,omitempty"` - // RegistrationEnabled - Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? - RegistrationEnabled *bool `json:"registrationEnabled,omitempty"` - // VirtualNetworkLinkState - READ-ONLY; The status of the virtual network link to the Private DNS zone. Possible values are 'InProgress' and 'Done'. This is a read-only property and any attempt to set this value will be ignored. Possible values include: 'InProgress', 'Completed' - VirtualNetworkLinkState VirtualNetworkLinkState `json:"virtualNetworkLinkState,omitempty"` - // ProvisioningState - READ-ONLY; The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled' - ProvisioningState ProvisioningState `json:"provisioningState,omitempty"` -} - -// MarshalJSON is the custom marshaler for VirtualNetworkLinkProperties. -func (vnlp VirtualNetworkLinkProperties) MarshalJSON() ([]byte, error) { - objectMap := make(map[string]interface{}) - if vnlp.VirtualNetwork != nil { - objectMap["virtualNetwork"] = vnlp.VirtualNetwork - } - if vnlp.RegistrationEnabled != nil { - objectMap["registrationEnabled"] = vnlp.RegistrationEnabled - } - return json.Marshal(objectMap) -} - -// VirtualNetworkLinksCreateOrUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkLinksCreateOrUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkLinksClient) (VirtualNetworkLink, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkLinksCreateOrUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkLinksCreateOrUpdateFuture.Result. -func (future *VirtualNetworkLinksCreateOrUpdateFuture) result(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnl.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksCreateOrUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnl.Response.Response, err = future.GetResult(sender); err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent { - vnl, err = client.CreateOrUpdateResponder(vnl.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksCreateOrUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request") - } - } - return -} - -// VirtualNetworkLinksDeleteFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkLinksDeleteFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkLinksClient) (autorest.Response, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkLinksDeleteFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkLinksDeleteFuture.Result. -func (future *VirtualNetworkLinksDeleteFuture) result(client VirtualNetworkLinksClient) (ar autorest.Response, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksDeleteFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - ar.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksDeleteFuture") - return - } - ar.Response = future.Response() - return -} - -// VirtualNetworkLinksUpdateFuture an abstraction for monitoring and retrieving the results of a -// long-running operation. -type VirtualNetworkLinksUpdateFuture struct { - azure.FutureAPI - // Result returns the result of the asynchronous operation. - // If the operation has not completed it will return an error. - Result func(VirtualNetworkLinksClient) (VirtualNetworkLink, error) -} - -// UnmarshalJSON is the custom unmarshaller for CreateFuture. -func (future *VirtualNetworkLinksUpdateFuture) UnmarshalJSON(body []byte) error { - var azFuture azure.Future - if err := json.Unmarshal(body, &azFuture); err != nil { - return err - } - future.FutureAPI = &azFuture - future.Result = future.result - return nil -} - -// result is the default implementation for VirtualNetworkLinksUpdateFuture.Result. -func (future *VirtualNetworkLinksUpdateFuture) result(client VirtualNetworkLinksClient) (vnl VirtualNetworkLink, err error) { - var done bool - done, err = future.DoneWithContext(context.Background(), client) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", future.Response(), "Polling failure") - return - } - if !done { - vnl.Response.Response = future.Response() - err = azure.NewAsyncOpIncompleteError("privatedns.VirtualNetworkLinksUpdateFuture") - return - } - sender := autorest.DecorateSender(client, autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...)) - if vnl.Response.Response, err = future.GetResult(sender); err == nil && vnl.Response.Response.StatusCode != http.StatusNoContent { - vnl, err = client.UpdateResponder(vnl.Response.Response) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksUpdateFuture", "Result", vnl.Response.Response, "Failure responding to request") - } - } - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/privatezones.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/privatezones.go deleted file mode 100644 index 86960335f8..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/privatezones.go +++ /dev/null @@ -1,614 +0,0 @@ -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// PrivateZonesClient is the the Private DNS Management Client. -type PrivateZonesClient struct { - BaseClient -} - -// NewPrivateZonesClient creates an instance of the PrivateZonesClient client. -func NewPrivateZonesClient(subscriptionID string) PrivateZonesClient { - return NewPrivateZonesClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewPrivateZonesClientWithBaseURI creates an instance of the PrivateZonesClient client using a custom endpoint. Use -// this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewPrivateZonesClientWithBaseURI(baseURI string, subscriptionID string) PrivateZonesClient { - return PrivateZonesClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records -// within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// parameters - parameters supplied to the CreateOrUpdate operation. -// ifMatch - the ETag of the Private DNS zone. Omit this value to always overwrite the current zone. Specify -// the last-seen ETag value to prevent accidentally overwriting any concurrent changes. -// ifNoneMatch - set to '*' to allow a new Private DNS zone to be created, but to prevent updating an existing -// zone. Other values will be ignored. -func (client PrivateZonesClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateZoneName string, parameters PrivateZone, ifMatch string, ifNoneMatch string) (result PrivateZonesCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateZoneName, parameters, ifMatch, ifNoneMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client PrivateZonesClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, parameters PrivateZone, ifMatch string, ifNoneMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - if len(ifNoneMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) CreateOrUpdateSender(req *http.Request) (future PrivateZonesCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) CreateOrUpdateResponder(resp *http.Response) (result PrivateZone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot -// be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// ifMatch - the ETag of the Private DNS zone. Omit this value to always delete the current zone. Specify the -// last-seen ETag value to prevent accidentally deleting any concurrent changes. -func (client PrivateZonesClient) Delete(ctx context.Context, resourceGroupName string, privateZoneName string, ifMatch string) (result PrivateZonesDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, privateZoneName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client PrivateZonesClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) DeleteSender(req *http.Request) (future PrivateZonesDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets -// within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -func (client PrivateZonesClient) Get(ctx context.Context, resourceGroupName string, privateZoneName string) (result PrivateZone, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, privateZoneName) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client PrivateZonesClient) GetPreparer(ctx context.Context, resourceGroupName string, privateZoneName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) GetResponder(resp *http.Response) (result PrivateZone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists the Private DNS zones in all resource groups in a subscription. -// Parameters: -// top - the maximum number of Private DNS zones to return. If not specified, returns up to 100 zones. -func (client PrivateZonesClient) List(ctx context.Context, top *int32) (result PrivateZoneListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.List") - defer func() { - sc := -1 - if result.pzlr.Response.Response != nil { - sc = result.pzlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, top) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.pzlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "List", resp, "Failure sending request") - return - } - - result.pzlr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "List", resp, "Failure responding to request") - return - } - if result.pzlr.hasNextLink() && result.pzlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client PrivateZonesClient) ListPreparer(ctx context.Context, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateDnsZones", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) ListResponder(resp *http.Response) (result PrivateZoneListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client PrivateZonesClient) listNextResults(ctx context.Context, lastResults PrivateZoneListResult) (result PrivateZoneListResult, err error) { - req, err := lastResults.privateZoneListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateZonesClient) ListComplete(ctx context.Context, top *int32) (result PrivateZoneListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, top) - return -} - -// ListByResourceGroup lists the Private DNS zones within a resource group. -// Parameters: -// resourceGroupName - the name of the resource group. -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -func (client PrivateZonesClient) ListByResourceGroup(ctx context.Context, resourceGroupName string, top *int32) (result PrivateZoneListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.pzlr.Response.Response != nil { - sc = result.pzlr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByResourceGroupNextResults - req, err := client.ListByResourceGroupPreparer(ctx, resourceGroupName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "ListByResourceGroup", nil, "Failure preparing request") - return - } - - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.pzlr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "ListByResourceGroup", resp, "Failure sending request") - return - } - - result.pzlr, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "ListByResourceGroup", resp, "Failure responding to request") - return - } - if result.pzlr.hasNextLink() && result.pzlr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByResourceGroupPreparer prepares the ListByResourceGroup request. -func (client PrivateZonesClient) ListByResourceGroupPreparer(ctx context.Context, resourceGroupName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByResourceGroupSender sends the ListByResourceGroup request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) ListByResourceGroupSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByResourceGroupResponder handles the response to the ListByResourceGroup request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) ListByResourceGroupResponder(resp *http.Response) (result PrivateZoneListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByResourceGroupNextResults retrieves the next set of results, if any. -func (client PrivateZonesClient) listByResourceGroupNextResults(ctx context.Context, lastResults PrivateZoneListResult) (result PrivateZoneListResult, err error) { - req, err := lastResults.privateZoneListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listByResourceGroupNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByResourceGroupSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listByResourceGroupNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByResourceGroupResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "listByResourceGroupNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByResourceGroupComplete enumerates all values, automatically crossing page boundaries as required. -func (client PrivateZonesClient) ListByResourceGroupComplete(ctx context.Context, resourceGroupName string, top *int32) (result PrivateZoneListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.ListByResourceGroup") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByResourceGroup(ctx, resourceGroupName, top) - return -} - -// Update updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// parameters - parameters supplied to the Update operation. -// ifMatch - the ETag of the Private DNS zone. Omit this value to always overwrite the current zone. Specify -// the last-seen ETag value to prevent accidentally overwriting any concurrent changes. -func (client PrivateZonesClient) Update(ctx context.Context, resourceGroupName string, privateZoneName string, parameters PrivateZone, ifMatch string) (result PrivateZonesUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/PrivateZonesClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, privateZoneName, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.PrivateZonesClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client PrivateZonesClient) UpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, parameters PrivateZone, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client PrivateZonesClient) UpdateSender(req *http.Request) (future PrivateZonesUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client PrivateZonesClient) UpdateResponder(resp *http.Response) (result PrivateZone, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/recordsets.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/recordsets.go deleted file mode 100644 index e1f39bb048..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/recordsets.go +++ /dev/null @@ -1,640 +0,0 @@ -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// RecordSetsClient is the the Private DNS Management Client. -type RecordSetsClient struct { - BaseClient -} - -// NewRecordSetsClient creates an instance of the RecordSetsClient client. -func NewRecordSetsClient(subscriptionID string) RecordSetsClient { - return NewRecordSetsClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewRecordSetsClientWithBaseURI creates an instance of the RecordSetsClient client using a custom endpoint. Use this -// when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure stack). -func NewRecordSetsClientWithBaseURI(baseURI string, subscriptionID string) RecordSetsClient { - return RecordSetsClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a record set within a Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// recordType - the type of DNS record in this record set. Record sets of type SOA can be updated but not -// created (they are created when the Private DNS zone is created). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// parameters - parameters supplied to the CreateOrUpdate operation. -// ifMatch - the ETag of the record set. Omit this value to always overwrite the current record set. Specify -// the last-seen ETag value to prevent accidentally overwriting any concurrent changes. -// ifNoneMatch - set to '*' to allow a new record set to be created, but to prevent updating an existing record -// set. Other values will be ignored. -func (client RecordSetsClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, parameters RecordSet, ifMatch string, ifNoneMatch string) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateZoneName, recordType, relativeRecordSetName, parameters, ifMatch, ifNoneMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - resp, err := client.CreateOrUpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "CreateOrUpdate", resp, "Failure sending request") - return - } - - result, err = client.CreateOrUpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "CreateOrUpdate", resp, "Failure responding to request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client RecordSetsClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, parameters RecordSet, ifMatch string, ifNoneMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - if len(ifNoneMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) CreateOrUpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) CreateOrUpdateResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a record set from a Private DNS zone. This operation cannot be undone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// recordType - the type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are -// deleted when the Private DNS zone is deleted). -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// ifMatch - the ETag of the record set. Omit this value to always delete the current record set. Specify the -// last-seen ETag value to prevent accidentally deleting any concurrent changes. -func (client RecordSetsClient) Delete(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, ifMatch string) (result autorest.Response, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Delete") - defer func() { - sc := -1 - if result.Response != nil { - sc = result.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, privateZoneName, recordType, relativeRecordSetName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Delete", nil, "Failure preparing request") - return - } - - resp, err := client.DeleteSender(req) - if err != nil { - result.Response = resp - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Delete", resp, "Failure sending request") - return - } - - result, err = client.DeleteResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Delete", resp, "Failure responding to request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client RecordSetsClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) DeleteSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a record set. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// recordType - the type of DNS record in this record set. -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -func (client RecordSetsClient) Get(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, privateZoneName, recordType, relativeRecordSetName) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client RecordSetsClient) GetPreparer(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) GetResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists all record sets in a Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -// recordsetnamesuffix - the suffix label of the record set name to be used to filter the record set -// enumeration. If this parameter is specified, the returned enumeration will only contain records that end -// with ".". -func (client RecordSetsClient) List(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.List") - defer func() { - sc := -1 - if result.rslr.Response.Response != nil { - sc = result.rslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, privateZoneName, top, recordsetnamesuffix) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.rslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "List", resp, "Failure sending request") - return - } - - result.rslr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "List", resp, "Failure responding to request") - return - } - if result.rslr.hasNextLink() && result.rslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client RecordSetsClient) ListPreparer(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32, recordsetnamesuffix string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(recordsetnamesuffix) > 0 { - queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/ALL", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) ListResponder(resp *http.Response) (result RecordSetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client RecordSetsClient) listNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) { - req, err := lastResults.recordSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecordSetsClient) ListComplete(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, privateZoneName, top, recordsetnamesuffix) - return -} - -// ListByType lists the record sets of a specified type in a Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// recordType - the type of record sets to enumerate. -// top - the maximum number of record sets to return. If not specified, returns up to 100 record sets. -// recordsetnamesuffix - the suffix label of the record set name to be used to filter the record set -// enumeration. If this parameter is specified, the returned enumeration will only contain records that end -// with ".". -func (client RecordSetsClient) ListByType(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType") - defer func() { - sc := -1 - if result.rslr.Response.Response != nil { - sc = result.rslr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listByTypeNextResults - req, err := client.ListByTypePreparer(ctx, resourceGroupName, privateZoneName, recordType, top, recordsetnamesuffix) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "ListByType", nil, "Failure preparing request") - return - } - - resp, err := client.ListByTypeSender(req) - if err != nil { - result.rslr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "ListByType", resp, "Failure sending request") - return - } - - result.rslr, err = client.ListByTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "ListByType", resp, "Failure responding to request") - return - } - if result.rslr.hasNextLink() && result.rslr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListByTypePreparer prepares the ListByType request. -func (client RecordSetsClient) ListByTypePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "recordType": autorest.Encode("path", recordType), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - if len(recordsetnamesuffix) > 0 { - queryParameters["$recordsetnamesuffix"] = autorest.Encode("query", recordsetnamesuffix) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListByTypeSender sends the ListByType request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) ListByTypeSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListByTypeResponder handles the response to the ListByType request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) ListByTypeResponder(resp *http.Response) (result RecordSetListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listByTypeNextResults retrieves the next set of results, if any. -func (client RecordSetsClient) listByTypeNextResults(ctx context.Context, lastResults RecordSetListResult) (result RecordSetListResult, err error) { - req, err := lastResults.recordSetListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listByTypeNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListByTypeSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listByTypeNextResults", resp, "Failure sending next results request") - } - result, err = client.ListByTypeResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "listByTypeNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListByTypeComplete enumerates all values, automatically crossing page boundaries as required. -func (client RecordSetsClient) ListByTypeComplete(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, top *int32, recordsetnamesuffix string) (result RecordSetListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.ListByType") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.ListByType(ctx, resourceGroupName, privateZoneName, recordType, top, recordsetnamesuffix) - return -} - -// Update updates a record set within a Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// recordType - the type of DNS record in this record set. -// relativeRecordSetName - the name of the record set, relative to the name of the zone. -// parameters - parameters supplied to the Update operation. -// ifMatch - the ETag of the record set. Omit this value to always overwrite the current record set. Specify -// the last-seen ETag value to prevent accidentally overwriting concurrent changes. -func (client RecordSetsClient) Update(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, parameters RecordSet, ifMatch string) (result RecordSet, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/RecordSetsClient.Update") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, privateZoneName, recordType, relativeRecordSetName, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Update", nil, "Failure preparing request") - return - } - - resp, err := client.UpdateSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Update", resp, "Failure sending request") - return - } - - result, err = client.UpdateResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.RecordSetsClient", "Update", resp, "Failure responding to request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client RecordSetsClient) UpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, recordType RecordType, relativeRecordSetName string, parameters RecordSet, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "recordType": autorest.Encode("path", recordType), - "relativeRecordSetName": relativeRecordSetName, - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client RecordSetsClient) UpdateSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client RecordSetsClient) UpdateResponder(resp *http.Response) (result RecordSet, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/version.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/version.go deleted file mode 100644 index 1e43b22dd0..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/version.go +++ /dev/null @@ -1,19 +0,0 @@ -package privatedns - -import "github.com/Azure/azure-sdk-for-go/version" - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -// UserAgent returns the UserAgent string to use when sending http.Requests. -func UserAgent() string { - return "Azure-SDK-For-Go/" + Version() + " privatedns/2020-06-01" -} - -// Version returns the semantic version (see http://semver.org) of the client. -func Version() string { - return version.Number -} diff --git a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/virtualnetworklinks.go b/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/virtualnetworklinks.go deleted file mode 100644 index 03e606921a..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns/virtualnetworklinks.go +++ /dev/null @@ -1,509 +0,0 @@ -package privatedns - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is regenerated. - -import ( - "context" - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/autorest/azure" - "github.com/Azure/go-autorest/tracing" - "net/http" -) - -// VirtualNetworkLinksClient is the the Private DNS Management Client. -type VirtualNetworkLinksClient struct { - BaseClient -} - -// NewVirtualNetworkLinksClient creates an instance of the VirtualNetworkLinksClient client. -func NewVirtualNetworkLinksClient(subscriptionID string) VirtualNetworkLinksClient { - return NewVirtualNetworkLinksClientWithBaseURI(DefaultBaseURI, subscriptionID) -} - -// NewVirtualNetworkLinksClientWithBaseURI creates an instance of the VirtualNetworkLinksClient client using a custom -// endpoint. Use this when interacting with an Azure cloud that uses a non-standard base URI (sovereign clouds, Azure -// stack). -func NewVirtualNetworkLinksClientWithBaseURI(baseURI string, subscriptionID string) VirtualNetworkLinksClient { - return VirtualNetworkLinksClient{NewWithBaseURI(baseURI, subscriptionID)} -} - -// CreateOrUpdate creates or updates a virtual network link to the specified Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// virtualNetworkLinkName - the name of the virtual network link. -// parameters - parameters supplied to the CreateOrUpdate operation. -// ifMatch - the ETag of the virtual network link to the Private DNS zone. Omit this value to always overwrite -// the current virtual network link. Specify the last-seen ETag value to prevent accidentally overwriting any -// concurrent changes. -// ifNoneMatch - set to '*' to allow a new virtual network link to the Private DNS zone to be created, but to -// prevent updating an existing link. Other values will be ignored. -func (client VirtualNetworkLinksClient) CreateOrUpdate(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, ifMatch string, ifNoneMatch string) (result VirtualNetworkLinksCreateOrUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.CreateOrUpdate") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.CreateOrUpdatePreparer(ctx, resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, ifMatch, ifNoneMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", nil, "Failure preparing request") - return - } - - result, err = client.CreateOrUpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "CreateOrUpdate", result.Response(), "Failure sending request") - return - } - - return -} - -// CreateOrUpdatePreparer prepares the CreateOrUpdate request. -func (client VirtualNetworkLinksClient) CreateOrUpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, ifMatch string, ifNoneMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkLinkName": autorest.Encode("path", virtualNetworkLinkName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPut(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - if len(ifNoneMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-None-Match", autorest.String(ifNoneMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// CreateOrUpdateSender sends the CreateOrUpdate request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkLinksClient) CreateOrUpdateSender(req *http.Request) (future VirtualNetworkLinksCreateOrUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// CreateOrUpdateResponder handles the response to the CreateOrUpdate request. The method always -// closes the http.Response Body. -func (client VirtualNetworkLinksClient) CreateOrUpdateResponder(resp *http.Response) (result VirtualNetworkLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusCreated, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// Delete deletes a virtual network link to the specified Private DNS zone. WARNING: In case of a registration virtual -// network, all auto-registered DNS records in the zone for the virtual network will also be deleted. This operation -// cannot be undone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// virtualNetworkLinkName - the name of the virtual network link. -// ifMatch - the ETag of the virtual network link to the Private DNS zone. Omit this value to always delete the -// current zone. Specify the last-seen ETag value to prevent accidentally deleting any concurrent changes. -func (client VirtualNetworkLinksClient) Delete(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, ifMatch string) (result VirtualNetworkLinksDeleteFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.Delete") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.DeletePreparer(ctx, resourceGroupName, privateZoneName, virtualNetworkLinkName, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", nil, "Failure preparing request") - return - } - - result, err = client.DeleteSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Delete", result.Response(), "Failure sending request") - return - } - - return -} - -// DeletePreparer prepares the Delete request. -func (client VirtualNetworkLinksClient) DeletePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkLinkName": autorest.Encode("path", virtualNetworkLinkName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsDelete(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// DeleteSender sends the Delete request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkLinksClient) DeleteSender(req *http.Request) (future VirtualNetworkLinksDeleteFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// DeleteResponder handles the response to the Delete request. The method always -// closes the http.Response Body. -func (client VirtualNetworkLinksClient) DeleteResponder(resp *http.Response) (result autorest.Response, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted, http.StatusNoContent), - autorest.ByClosing()) - result.Response = resp - return -} - -// Get gets a virtual network link to the specified Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// virtualNetworkLinkName - the name of the virtual network link. -func (client VirtualNetworkLinksClient) Get(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string) (result VirtualNetworkLink, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.Get") - defer func() { - sc := -1 - if result.Response.Response != nil { - sc = result.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.GetPreparer(ctx, resourceGroupName, privateZoneName, virtualNetworkLinkName) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Get", nil, "Failure preparing request") - return - } - - resp, err := client.GetSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Get", resp, "Failure sending request") - return - } - - result, err = client.GetResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Get", resp, "Failure responding to request") - return - } - - return -} - -// GetPreparer prepares the Get request. -func (client VirtualNetworkLinksClient) GetPreparer(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkLinkName": autorest.Encode("path", virtualNetworkLinkName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// GetSender sends the Get request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkLinksClient) GetSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// GetResponder handles the response to the Get request. The method always -// closes the http.Response Body. -func (client VirtualNetworkLinksClient) GetResponder(resp *http.Response) (result VirtualNetworkLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// List lists the virtual network links to the specified Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// top - the maximum number of virtual network links to return. If not specified, returns up to 100 virtual -// network links. -func (client VirtualNetworkLinksClient) List(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32) (result VirtualNetworkLinkListResultPage, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.List") - defer func() { - sc := -1 - if result.vnllr.Response.Response != nil { - sc = result.vnllr.Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.fn = client.listNextResults - req, err := client.ListPreparer(ctx, resourceGroupName, privateZoneName, top) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "List", nil, "Failure preparing request") - return - } - - resp, err := client.ListSender(req) - if err != nil { - result.vnllr.Response = autorest.Response{Response: resp} - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "List", resp, "Failure sending request") - return - } - - result.vnllr, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "List", resp, "Failure responding to request") - return - } - if result.vnllr.hasNextLink() && result.vnllr.IsEmpty() { - err = result.NextWithContext(ctx) - return - } - - return -} - -// ListPreparer prepares the List request. -func (client VirtualNetworkLinksClient) ListPreparer(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - if top != nil { - queryParameters["$top"] = autorest.Encode("query", *top) - } - - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks", pathParameters), - autorest.WithQueryParameters(queryParameters)) - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// ListSender sends the List request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkLinksClient) ListSender(req *http.Request) (*http.Response, error) { - return client.Send(req, azure.DoRetryWithRegistration(client.Client)) -} - -// ListResponder handles the response to the List request. The method always -// closes the http.Response Body. -func (client VirtualNetworkLinksClient) ListResponder(resp *http.Response) (result VirtualNetworkLinkListResult, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} - -// listNextResults retrieves the next set of results, if any. -func (client VirtualNetworkLinksClient) listNextResults(ctx context.Context, lastResults VirtualNetworkLinkListResult) (result VirtualNetworkLinkListResult, err error) { - req, err := lastResults.virtualNetworkLinkListResultPreparer(ctx) - if err != nil { - return result, autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "listNextResults", nil, "Failure preparing next results request") - } - if req == nil { - return - } - resp, err := client.ListSender(req) - if err != nil { - result.Response = autorest.Response{Response: resp} - return result, autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "listNextResults", resp, "Failure sending next results request") - } - result, err = client.ListResponder(resp) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "listNextResults", resp, "Failure responding to next results request") - } - return -} - -// ListComplete enumerates all values, automatically crossing page boundaries as required. -func (client VirtualNetworkLinksClient) ListComplete(ctx context.Context, resourceGroupName string, privateZoneName string, top *int32) (result VirtualNetworkLinkListResultIterator, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.List") - defer func() { - sc := -1 - if result.Response().Response.Response != nil { - sc = result.page.Response().Response.Response.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - result.page, err = client.List(ctx, resourceGroupName, privateZoneName, top) - return -} - -// Update updates a virtual network link to the specified Private DNS zone. -// Parameters: -// resourceGroupName - the name of the resource group. -// privateZoneName - the name of the Private DNS zone (without a terminating dot). -// virtualNetworkLinkName - the name of the virtual network link. -// parameters - parameters supplied to the Update operation. -// ifMatch - the ETag of the virtual network link to the Private DNS zone. Omit this value to always overwrite -// the current virtual network link. Specify the last-seen ETag value to prevent accidentally overwriting any -// concurrent changes. -func (client VirtualNetworkLinksClient) Update(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, ifMatch string) (result VirtualNetworkLinksUpdateFuture, err error) { - if tracing.IsEnabled() { - ctx = tracing.StartSpan(ctx, fqdn+"/VirtualNetworkLinksClient.Update") - defer func() { - sc := -1 - if result.FutureAPI != nil && result.FutureAPI.Response() != nil { - sc = result.FutureAPI.Response().StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - } - req, err := client.UpdatePreparer(ctx, resourceGroupName, privateZoneName, virtualNetworkLinkName, parameters, ifMatch) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", nil, "Failure preparing request") - return - } - - result, err = client.UpdateSender(req) - if err != nil { - err = autorest.NewErrorWithError(err, "privatedns.VirtualNetworkLinksClient", "Update", result.Response(), "Failure sending request") - return - } - - return -} - -// UpdatePreparer prepares the Update request. -func (client VirtualNetworkLinksClient) UpdatePreparer(ctx context.Context, resourceGroupName string, privateZoneName string, virtualNetworkLinkName string, parameters VirtualNetworkLink, ifMatch string) (*http.Request, error) { - pathParameters := map[string]interface{}{ - "privateZoneName": autorest.Encode("path", privateZoneName), - "resourceGroupName": autorest.Encode("path", resourceGroupName), - "subscriptionId": autorest.Encode("path", client.SubscriptionID), - "virtualNetworkLinkName": autorest.Encode("path", virtualNetworkLinkName), - } - - const APIVersion = "2020-06-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsContentType("application/json; charset=utf-8"), - autorest.AsPatch(), - autorest.WithBaseURL(client.BaseURI), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/virtualNetworkLinks/{virtualNetworkLinkName}", pathParameters), - autorest.WithJSON(parameters), - autorest.WithQueryParameters(queryParameters)) - if len(ifMatch) > 0 { - preparer = autorest.DecoratePreparer(preparer, - autorest.WithHeader("If-Match", autorest.String(ifMatch))) - } - return preparer.Prepare((&http.Request{}).WithContext(ctx)) -} - -// UpdateSender sends the Update request. The method will close the -// http.Response Body if it receives an error. -func (client VirtualNetworkLinksClient) UpdateSender(req *http.Request) (future VirtualNetworkLinksUpdateFuture, err error) { - var resp *http.Response - future.FutureAPI = &azure.Future{} - resp, err = client.Send(req, azure.DoRetryWithRegistration(client.Client)) - if err != nil { - return - } - var azf azure.Future - azf, err = azure.NewFutureFromResponse(resp) - future.FutureAPI = &azf - future.Result = future.result - return -} - -// UpdateResponder handles the response to the Update request. The method always -// closes the http.Response Body. -func (client VirtualNetworkLinksClient) UpdateResponder(resp *http.Response) (result VirtualNetworkLink, err error) { - err = autorest.Respond( - resp, - azure.WithErrorUnlessStatusCode(http.StatusOK, http.StatusAccepted), - autorest.ByUnmarshallingJSON(&result), - autorest.ByClosing()) - result.Response = autorest.Response{Response: resp} - return -} 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 deleted file mode 100644 index bcfbb15cce..0000000000 --- a/vendor/github.com/Azure/azure-sdk-for-go/version/version.go +++ /dev/null @@ -1,7 +0,0 @@ -package version - -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -// Number contains the semantic version of this SDK. -const Number = "v68.0.0" diff --git a/vendor/github.com/Azure/go-autorest/.gitignore b/vendor/github.com/Azure/go-autorest/.gitignore deleted file mode 100644 index 3350aaf706..0000000000 --- a/vendor/github.com/Azure/go-autorest/.gitignore +++ /dev/null @@ -1,32 +0,0 @@ -# The standard Go .gitignore file follows. (Sourced from: github.com/github/gitignore/master/Go.gitignore) -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test -.DS_Store -.idea/ -.vscode/ - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -# go-autorest specific -vendor/ -autorest/azure/example/example diff --git a/vendor/github.com/Azure/go-autorest/CHANGELOG.md b/vendor/github.com/Azure/go-autorest/CHANGELOG.md deleted file mode 100644 index d1f596bfc9..0000000000 --- a/vendor/github.com/Azure/go-autorest/CHANGELOG.md +++ /dev/null @@ -1,1004 +0,0 @@ -# CHANGELOG - -## v14.2.0 - -- Added package comment to make `github.com/Azure/go-autorest` importable. - -## v14.1.1 - -### Bug Fixes - -- Change `x-ms-authorization-auxiliary` header value separator to comma. - -## v14.1.0 - -### New Features - -- Added `azure.SetEnvironment()` that will update the global environments map with the specified values. - -## v14.0.1 - -### Bug Fixes - -- Fix race condition when refreshing token. -- Fixed some tests to work with Go 1.14. - -## v14.0.0 - -## Breaking Changes - -- By default, the `DoRetryForStatusCodes` functions will no longer infinitely retry a request when the response returns an HTTP status code of 429 (StatusTooManyRequests). To opt in to the old behavior set `autorest.Count429AsRetry` to `false`. - -## New Features - -- Variable `autorest.Max429Delay` can be used to control the maximum delay between retries when a 429 is received with no `Retry-After` header. The default is zero which means there is no cap. - -## v13.4.0 - -## New Features - -- Added field `SendDecorators` to the `Client` type. This can be used to specify a custom chain of SendDecorators per client. -- Added method `Client.Send()` which includes logic for selecting the preferred chain of SendDecorators. - -## v13.3.3 - -### Bug Fixes - -- Fixed connection leak when retrying requests. -- Enabled exponential back-off with a 2-minute cap when retrying on 429. -- Fixed some cases where errors were inadvertently dropped. - -## v13.3.2 - -### Bug Fixes - -- Updated `autorest.AsStringSlice()` to convert slice elements to their string representation. - -## v13.3.1 - -- Updated external dependencies. - -### Bug Fixes - -## v13.3.0 - -### New Features - -- Added support for shared key and shared access signature token authorization. - - `autorest.NewSharedKeyAuthorizer()` and dependent types. - - `autorest.NewSASTokenAuthorizer()` and dependent types. -- Added `ServicePrincipalToken.SetCustomRefresh()` so a custom refresh function can be invoked when a token has expired. - -### Bug Fixes - -- Fixed `cli.AccessTokensPath()` to respect `AZURE_CONFIG_DIR` when set. -- Support parsing error messages in XML responses. - -## v13.2.0 - -### New Features - -- Added the following functions to replace their versions that don't take a context. - - `adal.InitiateDeviceAuthWithContext()` - - `adal.CheckForUserCompletionWithContext()` - - `adal.WaitForUserCompletionWithContext()` - -## v13.1.0 - -### New Features - -- Added support for MSI authentication on Azure App Service and Azure Functions. - -## v13.0.2 - -### Bug Fixes - -- Always retry a request even if the sender returns a non-nil error. - -## v13.0.1 - -## Bug Fixes - -- Fixed `autorest.WithQueryParameters()` so that it properly encodes multi-value query parameters. - -## v13.0.0 - -## Breaking Changes - -The `tracing` package has been rewritten to provide a common interface for consumers to wire in the tracing package of their choice. -What this means is that by default no tracing provider will be compiled into your program and setting the `AZURE_SDK_TRACING_ENABLED` -environment variable will have no effect. To enable this previous behavior you must now add the following import to your source file. -```go - import _ "github.com/Azure/go-autorest/tracing/opencensus" -``` -The APIs required by autorest-generated code have remained but some APIs have been removed and new ones added. -The following APIs and variables have been removed (the majority of them were moved to the `opencensus` package). -- tracing.Transport -- tracing.Enable() -- tracing.EnableWithAIForwarding() -- tracing.Disable() - -The following APIs and types have been added -- tracing.Tracer -- tracing.Register() - -To hook up a tracer simply call `tracing.Register()` passing in a type that satisfies the `tracing.Tracer` interface. - -## v12.4.3 - -### Bug Fixes - -- `autorest.MultiTenantServicePrincipalTokenAuthorizer` will now properly add its auxiliary bearer tokens. - -## v12.4.2 - -### Bug Fixes - -- Improvements to the fixes made in v12.4.1. - - Remove `override` stanza from Gopkg.toml and `replace` directive from go.mod as they don't apply when being consumed as a dependency. - - Switched to latest version of `ocagent` that still depends on protobuf v1.2. - - Add indirect dependencies to the `required` clause with matching `constraint` stanzas so that `dep` dependencies match go.sum. - -## v12.4.1 - -### Bug Fixes - -- Updated OpenCensus and OCAgent versions to versions that don't depend on v1.3+ of protobuf as it was breaking kubernetes. -- Pinned opencensus-proto to a version that's compatible with our versions of OpenCensus and OCAgent. - -## v12.4.0 - -### New Features - -- Added `autorest.WithPrepareDecorators` and `autorest.GetPrepareDecorators` for adding and retrieving a custom chain of PrepareDecorators to the provided context. - -## v12.3.0 - -### New Features - -- Support for multi-tenant via x-ms-authorization-auxiliary header has been added for client credentials with - secret scenario; this basically bundles multiple OAuthConfig and ServicePrincipalToken types into corresponding - MultiTenant* types along with a new authorizer that adds the primary and auxiliary token headers to the reqest. - The authenticaion helpers have been updated to support this scenario; if environment var AZURE_AUXILIARY_TENANT_IDS - is set with a semicolon delimited list of tenants the multi-tenant codepath will kick in to create the appropriate authorizer. - See `adal.NewMultiTenantOAuthConfig`, `adal.NewMultiTenantServicePrincipalToken` and `autorest.NewMultiTenantServicePrincipalTokenAuthorizer` - along with their supporting types and methods. -- Added `autorest.WithSendDecorators` and `autorest.GetSendDecorators` for adding and retrieving a custom chain of SendDecorators to the provided context. -- Added `autorest.DoRetryForStatusCodesWithCap` and `autorest.DelayForBackoffWithCap` to enforce an upper bound on the duration between retries. - -## v12.2.0 - -### New Features - -- Added `autorest.WithXML`, `autorest.AsMerge`, `autorest.WithBytes` preparer decorators. -- Added `autorest.ByUnmarshallingBytes` response decorator. -- Added `Response.IsHTTPStatus` and `Response.HasHTTPStatus` helper methods for inspecting HTTP status code in `autorest.Response` types. - -### Bug Fixes - -- `autorest.DelayWithRetryAfter` now supports HTTP-Dates in the `Retry-After` header and is not limited to just 429 status codes. - -## v12.1.0 - -### New Features - -- Added `to.ByteSlicePtr()`. -- Added blob/queue storage resource ID to `azure.ResourceIdentifier`. - -## v12.0.0 - -### Breaking Changes - -In preparation for modules the following deprecated content has been removed. - - - async.NewFuture() - - async.Future.Done() - - async.Future.WaitForCompletion() - - async.DoPollForAsynchronous() - - The `utils` package - - validation.NewErrorWithValidationError() - - The `version` package - -## v11.9.0 - -### New Features - -- Add `ResourceIdentifiers` field to `azure.Environment` containing resource IDs for public and sovereign clouds. - -## v11.8.0 - -### New Features - -- Added `autorest.NewClientWithOptions()` to support endpoints that require free renegotiation. - -## v11.7.1 - -### Bug Fixes - -- Fix missing support for http(s) proxy when using the default sender. - -## v11.7.0 - -### New Features - -- Added methods to obtain a ServicePrincipalToken on the various credential configuration types in the `auth` package. - -## v11.6.1 - -### Bug Fixes - -- Fix ACR DNS endpoint for government clouds. -- Add Cosmos DB DNS endpoints. -- Update dependencies to resolve build breaks in OpenCensus. - -## v11.6.0 - -### New Features - -- Added type `autorest.BasicAuthorizer` to support Basic authentication. - -## v11.5.2 - -### Bug Fixes - -- Fixed `GetTokenFromCLI` did not work with zsh. - -## v11.5.1 - -### Bug Fixes - -- In `Client.sender()` set the minimum TLS version on HTTP clients to 1.2. - -## v11.5.0 - -### New Features - -- The `auth` package has been refactored so that the environment and file settings are now available. -- The methods used in `auth.NewAuthorizerFromEnvironment()` are now exported so that custom authorization chains can be created. -- Added support for certificate authorization for file-based config. - -## v11.4.0 - -### New Features - -- Added `adal.AddToUserAgent()` so callers can append custom data to the user-agent header used for ADAL requests. -- Exported `adal.UserAgent()` for parity with `autorest.Client`. - -## v11.3.2 - -### Bug Fixes - -- In `Future.WaitForCompletionRef()` if the provided context has a deadline don't add the default deadline. - -## v11.3.1 - -### Bug Fixes - -- For an LRO PUT operation the final GET URL was incorrectly set to the Location polling header in some cases. - -## v11.3.0 - -### New Features - -- Added method `ServicePrincipalToken()` to `DeviceFlowConfig` type. - -## v11.2.8 - -### Bug Fixes - -- Deprecate content in the `version` package. The functionality has been superseded by content in the `autorest` package. - -## v11.2.7 - -### Bug Fixes - -- Fix environment variable name for enabling tracing from `AZURE_SDK_TRACING_ENABELD` to `AZURE_SDK_TRACING_ENABLED`. - Note that for backward compatibility reasons, both will work until the next major version release of the package. - -## v11.2.6 - -### Bug Fixes - -- If zero bytes are read from a polling response body don't attempt to unmarshal them. - -## v11.2.5 - -### Bug Fixes - -- Removed race condition in `autorest.DoRetryForStatusCodes`. - -## v11.2.4 - -### Bug Fixes - -- Function `cli.ProfilePath` now respects environment `AZURE_CONFIG_DIR` if available. - -## v11.2.1 - -NOTE: Versions of Go prior to 1.10 have been removed from CI as they no -longer work with golint. - -### Bug Fixes - -- Method `MSIConfig.Authorizer` now supports user-assigned identities. -- The adal package now reports its own user-agent string. - -## v11.2.0 - -### New Features - -- Added `tracing` package that enables instrumentation of HTTP and API calls. - Setting the env variable `AZURE_SDK_TRACING_ENABLED` or calling `tracing.Enable` - will start instrumenting the code for metrics and traces. - Additionally, setting the env variable `OCAGENT_TRACE_EXPORTER_ENDPOINT` or - calling `tracing.EnableWithAIForwarding` will start the instrumentation and connect to an - App Insights Local Forwarder that is needs to be running. Note that if the - AI Local Forwarder is not running tracking will still be enabled. - By default, instrumentation is disabled. Once enabled, instrumentation can also - be programatically disabled by calling `Disable`. -- Added `DoneWithContext` call for checking LRO status. `Done` has been deprecated. - -### Bug Fixes - -- Don't use the initial request's context for LRO polling. -- Don't override the `refreshLock` and the `http.Client` when unmarshalling `ServicePrincipalToken` if - it is already set. - -## v11.1.1 - -### Bug Fixes - -- When creating a future always include the polling tracker even if there's a failure; this allows the underlying response to be obtained by the caller. - -## v11.1.0 - -### New Features - -- Added `auth.NewAuthorizerFromCLI` to create an authorizer configured from the Azure 2.0 CLI. -- Added `adal.NewOAuthConfigWithAPIVersion` to create an OAuthConfig with the specified API version. - -## v11.0.1 - -### New Features - -- Added `x5c` header to client assertion for certificate Issuer+Subject Name authentication. - -## v11.0.0 - -### Breaking Changes - -- To handle differences between ADFS and AAD the following fields have had their types changed from `string` to `json.Number` - - ExpiresIn - - ExpiresOn - - NotBefore - -### New Features - -- Added `auth.NewAuthorizerFromFileWithResource` to create an authorizer from the config file with the specified resource. -- Setting a client's `PollingDuration` to zero will use the provided context to control a LRO's polling duration. - -## v10.15.5 - -### Bug Fixes - -- In `DoRetryForStatusCodes`, if a request's context is cancelled return the last response. - -## v10.15.4 - -### Bug Fixes - -- If a polling operation returns a failure status code return the associated error. - -## v10.15.3 - -### Bug Fixes - -- Initialize the polling URL and method for an LRO tracker on each iteration, favoring the Azure-AsyncOperation header. - -## v10.15.2 - -### Bug Fixes - -- Use fmt.Fprint when printing request/response so that any escape sequences aren't treated as format specifiers. - -## v10.15.1 - -### Bug Fixes - -- If an LRO API returns a `Failed` provisioning state in the initial response return an error at that point so the caller doesn't have to poll. -- For failed LROs without an OData v4 error include the response body in the error's `AdditionalInfo` field to aid in diagnosing the failure. - -## v10.15.0 - -### New Features - -- Add initial support for request/response logging via setting environment variables. - Setting `AZURE_GO_SDK_LOG_LEVEL` to `LogInfo` will log request/response - without their bodies. To include the bodies set the log level to `LogDebug`. - By default the logger writes to strerr, however it can also write to stdout or a file - if specified in `AZURE_GO_SDK_LOG_FILE`. Note that if the specified file - already exists it will be truncated. - IMPORTANT: by default the logger will redact the Authorization and Ocp-Apim-Subscription-Key - headers. Any other secrets will _not_ be redacted. - -## v10.14.0 - -### New Features - -- Added package version that contains version constants and user-agent data. - -### Bug Fixes - -- Add the user-agent to token requests. - -## v10.13.0 - -- Added support for additionalInfo in ServiceError type. - -## v10.12.0 - -### New Features - -- Added field ServicePrincipalToken.MaxMSIRefreshAttempts to configure the maximun number of attempts to refresh an MSI token. - -## v10.11.4 - -### Bug Fixes - -- If an LRO returns http.StatusOK on the initial response with no async headers return the response body from Future.GetResult(). -- If there is no "final GET URL" return an error from Future.GetResult(). - -## v10.11.3 - -### Bug Fixes - -- In IMDS retry logic, if we don't receive a response don't retry. - - Renamed the retry function so it's clear it's meant for IMDS only. -- For error response bodies that aren't OData-v4 compliant stick the raw JSON in the ServiceError.Details field so the information isn't lost. - - Also add the raw HTTP response to the DetailedResponse. -- Removed superfluous wrapping of response error in azure.DoRetryWithRegistration(). - -## v10.11.2 - -### Bug Fixes - -- Validation for integers handles int and int64 types. - -## v10.11.1 - -### Bug Fixes - -- Adding User information to authorization config as parsed from CLI cache. - -## v10.11.0 - -### New Features - -- Added NewServicePrincipalTokenFromManualTokenSecret for creating a new SPT using a manual token and secret -- Added method ServicePrincipalToken.MarshalTokenJSON() to marshall the inner Token - -## v10.10.0 - -### New Features - -- Most ServicePrincipalTokens can now be marshalled/unmarshall to/from JSON (ServicePrincipalCertificateSecret and ServicePrincipalMSISecret are not supported). -- Added method ServicePrincipalToken.SetRefreshCallbacks(). - -## v10.9.2 - -### Bug Fixes - -- Refreshing a refresh token obtained from a web app authorization code now works. - -## v10.9.1 - -### Bug Fixes - -- The retry logic for MSI token requests now uses exponential backoff per the guidelines. -- IsTemporaryNetworkError() will return true for errors that don't implement the net.Error interface. - -## v10.9.0 - -### Deprecated Methods - -| Old Method | New Method | -| -------------------------: | :---------------------------: | -| azure.NewFuture() | azure.NewFutureFromResponse() | -| Future.WaitForCompletion() | Future.WaitForCompletionRef() | - -### New Features - -- Added azure.NewFutureFromResponse() for creating a Future from the initial response from an async operation. -- Added Future.GetResult() for making the final GET call to retrieve the result from an async operation. - -### Bug Fixes - -- Some futures failed to return their results, this should now be fixed. - -## v10.8.2 - -### Bug Fixes - -- Add nil-gaurd to token retry logic. - -## v10.8.1 - -### Bug Fixes - -- Return a TokenRefreshError if the sender fails on the initial request. -- Don't retry on non-temporary network errors. - -## v10.8.0 - -- Added NewAuthorizerFromEnvironmentWithResource() helper function. - -## v10.7.0 - -### New Features - -- Added \*WithContext() methods to ADAL token refresh operations. - -## v10.6.2 - -- Fixed a bug on device authentication. - -## v10.6.1 - -- Added retries to MSI token get request. - -## v10.6.0 - -- Changed MSI token implementation. Now, the token endpoint is the IMDS endpoint. - -## v10.5.1 - -### Bug Fixes - -- `DeviceFlowConfig.Authorizer()` now prints the device code message when running `go test`. `-v` flag is required. - -## v10.5.0 - -### New Features - -- Added NewPollingRequestWithContext() for use with polling asynchronous operations. - -### Bug Fixes - -- Make retry logic use the request's context instead of the deprecated Cancel object. - -## v10.4.0 - -### New Features - -- Added helper for parsing Azure Resource ID's. -- Added deprecation message to utils.GetEnvVarOrExit() - -## v10.3.0 - -### New Features - -- Added EnvironmentFromURL method to load an Environment from a given URL. This function is particularly useful in the private and hybrid Cloud model, where one may define their own endpoints -- Added TokenAudience endpoint to Environment structure. This is useful in private and hybrid cloud models where TokenAudience endpoint can be different from ResourceManagerEndpoint - -## v10.2.0 - -### New Features - -- Added endpoints for batch management. - -## v10.1.3 - -### Bug Fixes - -- In Client.Do() invoke WithInspection() last so that it will inspect WithAuthorization(). -- Fixed authorization methods to invoke p.Prepare() first, aligning them with the other preparers. - -## v10.1.2 - -- Corrected comment for auth.NewAuthorizerFromFile() function. - -## v10.1.1 - -- Updated version number to match current release. - -## v10.1.0 - -### New Features - -- Expose the polling URL for futures. - -### Bug Fixes - -- Add validation.NewErrorWithValidationError back to prevent breaking changes (it is deprecated). - -## v10.0.0 - -### New Features - -- Added target and innererror fields to ServiceError to comply with OData v4 spec. -- The Done() method on futures will now return a ServiceError object when available (it used to return a partial value of such errors). -- Added helper methods for obtaining authorizers. -- Expose the polling URL for futures. - -### Bug Fixes - -- Switched from glide to dep for dependency management. -- Fixed unmarshaling of ServiceError for JSON bodies that don't conform to the OData spec. -- Fixed a race condition in token refresh. - -### Breaking Changes - -- The ServiceError.Details field type has been changed to match the OData v4 spec. -- Go v1.7 has been dropped from CI. -- API parameter validation failures will now return a unique error type validation.Error. -- The adal.Token type has been decomposed from adal.ServicePrincipalToken (this was necessary in order to fix the token refresh race). - -## v9.10.0 - -- Fix the Service Bus suffix in Azure public env -- Add Service Bus Endpoint (AAD ResourceURI) for use in [Azure Service Bus RBAC Preview](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-role-based-access-control) - -## v9.9.0 - -### New Features - -- Added EventGridKeyAuthorizer for key authorization with event grid topics. - -### Bug Fixes - -- Fixed race condition when auto-refreshing service principal tokens. - -## v9.8.1 - -### Bug Fixes - -- Added http.StatusNoContent (204) to the list of expected status codes for long-running operations. -- Updated runtime version info so it's current. - -## v9.8.0 - -### New Features - -- Added type azure.AsyncOpIncompleteError to be returned from a future's Result() method when the operation has not completed. - -## v9.7.1 - -### Bug Fixes - -- Use correct AAD and Graph endpoints for US Gov environment. - -## v9.7.0 - -### New Features - -- Added support for application/octet-stream MIME types. - -## v9.6.1 - -### Bug Fixes - -- Ensure Authorization header is added to request when polling for registration status. - -## v9.6.0 - -### New Features - -- Added support for acquiring tokens via MSI with a user assigned identity. - -## v9.5.3 - -### Bug Fixes - -- Don't remove encoding of existing URL Query parameters when calling autorest.WithQueryParameters. -- Set correct Content Type when using autorest.WithFormData. - -## v9.5.2 - -### Bug Fixes - -- Check for nil \*http.Response before dereferencing it. - -## v9.5.1 - -### Bug Fixes - -- Don't count http.StatusTooManyRequests (429) against the retry cap. -- Use retry logic when SkipResourceProviderRegistration is set to true. - -## v9.5.0 - -### New Features - -- Added support for username + password, API key, authoriazation code and cognitive services authentication. -- Added field SkipResourceProviderRegistration to clients to provide a way to skip auto-registration of RPs. -- Added utility function AsStringSlice() to convert its parameters to a string slice. - -### Bug Fixes - -- When checking for authentication failures look at the error type not the status code as it could vary. - -## v9.4.2 - -### Bug Fixes - -- Validate parameters when creating credentials. -- Don't retry requests if the returned status is a 401 (http.StatusUnauthorized) as it will never succeed. - -## v9.4.1 - -### Bug Fixes - -- Update the AccessTokensPath() to read access tokens path through AZURE_ACCESS_TOKEN_FILE. If this - environment variable is not set, it will fall back to use default path set by Azure CLI. -- Use case-insensitive string comparison for polling states. - -## v9.4.0 - -### New Features - -- Added WaitForCompletion() to Future as a default polling implementation. - -### Bug Fixes - -- Method Future.Done() shouldn't update polling status for unexpected HTTP status codes. - -## v9.3.1 - -### Bug Fixes - -- DoRetryForStatusCodes will retry if sender.Do returns a non-nil error. - -## v9.3.0 - -### New Features - -- Added PollingMethod() to Future so callers know what kind of polling mechanism is used. -- Added azure.ChangeToGet() which transforms an http.Request into a GET (to be used with LROs). - -## v9.2.0 - -### New Features - -- Added support for custom Azure Stack endpoints. -- Added type azure.Future used to track the status of long-running operations. - -### Bug Fixes - -- Preserve the original error in DoRetryWithRegistration when registration fails. - -## v9.1.1 - -- Fixes a bug regarding the cookie jar on `autorest.Client.Sender`. - -## v9.1.0 - -### New Features - -- In cases where there is a non-empty error from the service, attempt to unmarshal it instead of uniformly calling it an "Unknown" error. -- Support for loading Azure CLI Authentication files. -- Automatically register your subscription with the Azure Resource Provider if it hadn't been previously. - -### Bug Fixes - -- RetriableRequest can now tolerate a ReadSeekable body being read but not reset. -- Adding missing Apache Headers - -## v9.0.0 - -> **IMPORTANT:** This release was intially labeled incorrectly as `v8.4.0`. From the time it was released, it should have been marked `v9.0.0` because it contains breaking changes to the MSI packages. We appologize for any inconvenience this causes. - -Adding MSI Endpoint Support and CLI token rehydration. - -## v8.3.1 - -Pick up bug fix in adal for MSI support. - -## v8.3.0 - -Updates to Error string formats for clarity. Also, adding a copy of the http.Response to errors for an improved debugging experience. - -## v8.2.0 - -### New Features - -- Add support for bearer authentication callbacks -- Support 429 response codes that include "Retry-After" header -- Support validation constraint "Pattern" for map keys - -### Bug Fixes - -- Make RetriableRequest work with multiple versions of Go - -## v8.1.1 - -Updates the RetriableRequest to take advantage of GetBody() added in Go 1.8. - -## v8.1.0 - -Adds RetriableRequest type for more efficient handling of retrying HTTP requests. - -## v8.0.0 - -ADAL refactored into its own package. -Support for UNIX time. - -## v7.3.1 - -- Version Testing now removed from production bits that are shipped with the library. - -## v7.3.0 - -- Exposing new `RespondDecorator`, `ByDiscardingBody`. This allows operations - to acknowledge that they do not need either the entire or a trailing portion - of accepts response body. In doing so, Go's http library can reuse HTTP - connections more readily. -- Adding `PrepareDecorator` to target custom BaseURLs. -- Adding ACR suffix to public cloud environment. -- Updating Glide dependencies. - -## v7.2.5 - -- Fixed the Active Directory endpoint for the China cloud. -- Removes UTF-8 BOM if present in response payload. -- Added telemetry. - -## v7.2.3 - -- Fixing bug in calls to `DelayForBackoff` that caused doubling of delay - duration. - -## v7.2.2 - -- autorest/azure: added ASM and ARM VM DNS suffixes. - -## v7.2.1 - -- fixed parsing of UTC times that are not RFC3339 conformant. - -## v7.2.0 - -- autorest/validation: Reformat validation error for better error message. - -## v7.1.0 - -- preparer: Added support for multipart formdata - WithMultiPartFormdata() -- preparer: Added support for sending file in request body - WithFile -- client: Added RetryDuration parameter. -- autorest/validation: new package for validation code for Azure Go SDK. - -## v7.0.7 - -- Add trailing / to endpoint -- azure: add EnvironmentFromName - -## v7.0.6 - -- Add retry logic for 408, 500, 502, 503 and 504 status codes. -- Change url path and query encoding logic. -- Fix DelayForBackoff for proper exponential delay. -- Add CookieJar in Client. - -## v7.0.5 - -- Add check to start polling only when status is in [200,201,202]. -- Refactoring for unchecked errors. -- azure/persist changes. -- Fix 'file in use' issue in renewing token in deviceflow. -- Store header RetryAfter for subsequent requests in polling. -- Add attribute details in service error. - -## v7.0.4 - -- Better error messages for long running operation failures - -## v7.0.3 - -- Corrected DoPollForAsynchronous to properly handle the initial response - -## v7.0.2 - -- Corrected DoPollForAsynchronous to continue using the polling method first discovered - -## v7.0.1 - -- Fixed empty JSON input error in ByUnmarshallingJSON -- Fixed polling support for GET calls -- Changed format name from TimeRfc1123 to TimeRFC1123 - -## v7.0.0 - -- Added ByCopying responder with supporting TeeReadCloser -- Rewrote Azure asynchronous handling -- Reverted to only unmarshalling JSON -- Corrected handling of RFC3339 time strings and added support for Rfc1123 time format - -The `json.Decoder` does not catch bad data as thoroughly as `json.Unmarshal`. Since -`encoding/json` successfully deserializes all core types, and extended types normally provide -their custom JSON serialization handlers, the code has been reverted back to using -`json.Unmarshal`. The original change to use `json.Decode` was made to reduce duplicate -code; there is no loss of function, and there is a gain in accuracy, by reverting. - -Additionally, Azure services indicate requests to be polled by multiple means. The existing code -only checked for one of those (that is, the presence of the `Azure-AsyncOperation` header). -The new code correctly covers all cases and aligns with the other Azure SDKs. - -## v6.1.0 - -- Introduced `date.ByUnmarshallingJSONDate` and `date.ByUnmarshallingJSONTime` to enable JSON encoded values. - -## v6.0.0 - -- Completely reworked the handling of polled and asynchronous requests -- Removed unnecessary routines -- Reworked `mocks.Sender` to replay a series of `http.Response` objects -- Added `PrepareDecorators` for primitive types (e.g., bool, int32) - -Handling polled and asynchronous requests is no longer part of `Client#Send`. Instead new -`SendDecorators` implement different styles of polled behavior. See`autorest.DoPollForStatusCodes` -and `azure.DoPollForAsynchronous` for examples. - -## v5.0.0 - -- Added new RespondDecorators unmarshalling primitive types -- Corrected application of inspection and authorization PrependDecorators - -## v4.0.0 - -- Added support for Azure long-running operations. -- Added cancelation support to all decorators and functions that may delay. -- Breaking: `DelayForBackoff` now accepts a channel, which may be nil. - -## v3.1.0 - -- Add support for OAuth Device Flow authorization. -- Add support for ServicePrincipalTokens that are backed by an existing token, rather than other secret material. -- Add helpers for persisting and restoring Tokens. -- Increased code coverage in the github.com/Azure/autorest/azure package - -## v3.0.0 - -- Breaking: `NewErrorWithError` no longer takes `statusCode int`. -- Breaking: `NewErrorWithStatusCode` is replaced with `NewErrorWithResponse`. -- Breaking: `Client#Send()` no longer takes `codes ...int` argument. -- Add: XML unmarshaling support with `ByUnmarshallingXML()` -- Stopped vending dependencies locally and switched to [Glide](https://github.com/Masterminds/glide). - Applications using this library should either use Glide or vendor dependencies locally some other way. -- Add: `azure.WithErrorUnlessStatusCode()` decorator to handle Azure errors. -- Fix: use `net/http.DefaultClient` as base client. -- Fix: Missing inspection for polling responses added. -- Add: CopyAndDecode helpers. -- Improved `./autorest/to` with `[]string` helpers. -- Removed golint suppressions in .travis.yml. - -## v2.1.0 - -- Added `StatusCode` to `Error` for more easily obtaining the HTTP Reponse StatusCode (if any) - -## v2.0.0 - -- Changed `to.StringMapPtr` method signature to return a pointer -- Changed `ServicePrincipalCertificateSecret` and `NewServicePrincipalTokenFromCertificate` to support generic certificate and private keys - -## v1.0.0 - -- Added Logging inspectors to trace http.Request / Response -- Added support for User-Agent header -- Changed WithHeader PrepareDecorator to use set vs. add -- Added JSON to error when unmarshalling fails -- Added Client#Send method -- Corrected case of "Azure" in package paths -- Added "to" helpers, Azure helpers, and improved ease-of-use -- Corrected golint issues - -## v1.0.1 - -- Added CHANGELOG.md - -## v1.1.0 - -- Added mechanism to retrieve a ServicePrincipalToken using a certificate-signed JWT -- Added an example of creating a certificate-based ServicePrincipal and retrieving an OAuth token using the certificate - -## v1.1.1 - -- Introduce godeps and vendor dependencies introduced in v1.1.1 diff --git a/vendor/github.com/Azure/go-autorest/GNUmakefile b/vendor/github.com/Azure/go-autorest/GNUmakefile deleted file mode 100644 index a434e73ac4..0000000000 --- a/vendor/github.com/Azure/go-autorest/GNUmakefile +++ /dev/null @@ -1,23 +0,0 @@ -DIR?=./autorest/ - -default: build - -build: fmt - go install $(DIR) - -test: - go test $(DIR) || exit 1 - -vet: - @echo "go vet ." - @go vet $(DIR)... ; if [ $$? -eq 1 ]; then \ - echo ""; \ - echo "Vet found suspicious constructs. Please check the reported constructs"; \ - echo "and fix them if necessary before submitting the code for review."; \ - exit 1; \ - fi - -fmt: - gofmt -w $(DIR) - -.PHONY: build test vet fmt diff --git a/vendor/github.com/Azure/go-autorest/Gopkg.lock b/vendor/github.com/Azure/go-autorest/Gopkg.lock deleted file mode 100644 index dc6e3e633e..0000000000 --- a/vendor/github.com/Azure/go-autorest/Gopkg.lock +++ /dev/null @@ -1,324 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:892e39e5c083d0943f1e80ab8351690f183c6a5ab24e1d280adcad424c26255e" - name = "contrib.go.opencensus.io/exporter/ocagent" - packages = ["."] - pruneopts = "UT" - revision = "a8a6f458bbc1d5042322ad1f9b65eeb0b69be9ea" - version = "v0.6.0" - -[[projects]] - digest = "1:8f5acd4d4462b5136af644d25101f0968a7a94ee90fcb2059cec5b7cc42e0b20" - name = "github.com/census-instrumentation/opencensus-proto" - packages = [ - "gen-go/agent/common/v1", - "gen-go/agent/metrics/v1", - "gen-go/agent/trace/v1", - "gen-go/metrics/v1", - "gen-go/resource/v1", - "gen-go/trace/v1", - ] - pruneopts = "UT" - revision = "d89fa54de508111353cb0b06403c00569be780d8" - version = "v0.2.1" - -[[projects]] - digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec" - name = "github.com/davecgh/go-spew" - packages = ["spew"] - pruneopts = "UT" - revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73" - version = "v1.1.1" - -[[projects]] - digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[[projects]] - digest = "1:cf0d2e435fd4ce45b789e93ef24b5f08e86be0e9807a16beb3694e2d8c9af965" - name = "github.com/dimchansky/utfbom" - packages = ["."] - pruneopts = "UT" - revision = "d2133a1ce379ef6fa992b0514a77146c60db9d1c" - version = "v1.1.0" - -[[projects]] - branch = "master" - digest = "1:b7cb6054d3dff43b38ad2e92492f220f57ae6087ee797dca298139776749ace8" - name = "github.com/golang/groupcache" - packages = ["lru"] - pruneopts = "UT" - revision = "611e8accdfc92c4187d399e95ce826046d4c8d73" - -[[projects]] - digest = "1:e3839df32927e8d3403cd5aa7253d966e8ff80fc8f10e2e35d146461cd83fcfa" - name = "github.com/golang/protobuf" - packages = [ - "descriptor", - "jsonpb", - "proto", - "protoc-gen-go/descriptor", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/struct", - "ptypes/timestamp", - "ptypes/wrappers", - ] - pruneopts = "UT" - revision = "6c65a5562fc06764971b7c5d05c76c75e84bdbf7" - version = "v1.3.2" - -[[projects]] - digest = "1:c560cd79300fac84f124b96225181a637a70b60155919a3c36db50b7cca6b806" - name = "github.com/grpc-ecosystem/grpc-gateway" - packages = [ - "internal", - "runtime", - "utilities", - ] - pruneopts = "UT" - revision = "f7120437bb4f6c71f7f5076ad65a45310de2c009" - version = "v1.12.1" - -[[projects]] - digest = "1:5d231480e1c64a726869bc4142d270184c419749d34f167646baa21008eb0a79" - name = "github.com/mitchellh/go-homedir" - packages = ["."] - pruneopts = "UT" - revision = "af06845cf3004701891bf4fdb884bfe4920b3727" - version = "v1.1.0" - -[[projects]] - digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe" - name = "github.com/pmezard/go-difflib" - packages = ["difflib"] - pruneopts = "UT" - revision = "792786c7400a136282c1664665ae0a8db921c6c2" - version = "v1.0.0" - -[[projects]] - digest = "1:99d32780e5238c2621fff621123997c3e3cca96db8be13179013aea77dfab551" - name = "github.com/stretchr/testify" - packages = [ - "assert", - "require", - ] - pruneopts = "UT" - revision = "221dbe5ed46703ee255b1da0dec05086f5035f62" - version = "v1.4.0" - -[[projects]] - digest = "1:7c5e00383399fe13de0b4b65c9fdde16275407ce8ac02d867eafeaa916edcc71" - name = "go.opencensus.io" - packages = [ - ".", - "internal", - "internal/tagencoding", - "metric/metricdata", - "metric/metricproducer", - "plugin/ocgrpc", - "plugin/ochttp", - "plugin/ochttp/propagation/b3", - "plugin/ochttp/propagation/tracecontext", - "resource", - "stats", - "stats/internal", - "stats/view", - "tag", - "trace", - "trace/internal", - "trace/propagation", - "trace/tracestate", - ] - pruneopts = "UT" - revision = "aad2c527c5defcf89b5afab7f37274304195a6b2" - version = "v0.22.2" - -[[projects]] - branch = "master" - digest = "1:f604f5e2ee721b6757d962dfe7bab4f28aae50c456e39cfb2f3819762a44a6ae" - name = "golang.org/x/crypto" - packages = [ - "pkcs12", - "pkcs12/internal/rc2", - ] - pruneopts = "UT" - revision = "e9b2fee46413994441b28dfca259d911d963dfed" - -[[projects]] - branch = "master" - digest = "1:334b27eac455cb6567ea28cd424230b07b1a64334a2f861a8075ac26ce10af43" - name = "golang.org/x/lint" - packages = [ - ".", - "golint", - ] - pruneopts = "UT" - revision = "fdd1cda4f05fd1fd86124f0ef9ce31a0b72c8448" - -[[projects]] - branch = "master" - digest = "1:257a75d024975428ab9192bfc334c3490882f8cb21322ea5784ca8eca000a910" - name = "golang.org/x/net" - packages = [ - "http/httpguts", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace", - ] - pruneopts = "UT" - revision = "1ddd1de85cb0337b623b740a609d35817d516a8d" - -[[projects]] - branch = "master" - digest = "1:382bb5a7fb4034db3b6a2d19e5a4a6bcf52f4750530603c01ca18a172fa3089b" - name = "golang.org/x/sync" - packages = ["semaphore"] - pruneopts = "UT" - revision = "cd5d95a43a6e21273425c7ae415d3df9ea832eeb" - -[[projects]] - branch = "master" - digest = "1:4da420ceda5f68e8d748aa2169d0ed44ffadb1bbd6537cf778a49563104189b8" - name = "golang.org/x/sys" - packages = ["unix"] - pruneopts = "UT" - revision = "ce4227a45e2eb77e5c847278dcc6a626742e2945" - -[[projects]] - digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/language", - "internal/language/compact", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" - version = "v0.3.2" - -[[projects]] - branch = "master" - digest = "1:4eb5ea8395fb60212dd58b92c9db80bab59d5e99c7435f9a6a0a528c373b60e7" - name = "golang.org/x/tools" - packages = [ - "go/ast/astutil", - "go/gcexportdata", - "go/internal/gcimporter", - "go/types/typeutil", - ] - pruneopts = "UT" - revision = "259af5ff87bdcd4abf2ecda8edc3f13f04f26a42" - -[[projects]] - digest = "1:964bb30febc27fabfbec4759fa530c6ec35e77a7c85fed90b9317ea39a054877" - name = "google.golang.org/api" - packages = ["support/bundler"] - pruneopts = "UT" - revision = "8a410c21381766a810817fd6200fce8838ecb277" - version = "v0.14.0" - -[[projects]] - branch = "master" - digest = "1:a8d5c2c6e746b3485e36908ab2a9e3d77b86b81f8156d88403c7d2b462431dfd" - name = "google.golang.org/genproto" - packages = [ - "googleapis/api/httpbody", - "googleapis/rpc/status", - "protobuf/field_mask", - ] - pruneopts = "UT" - revision = "51378566eb590fa106d1025ea12835a4416dda84" - -[[projects]] - digest = "1:b59ce3ddb11daeeccccc9cb3183b58ebf8e9a779f1c853308cd91612e817a301" - name = "google.golang.org/grpc" - packages = [ - ".", - "backoff", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/balancerload", - "internal/binarylog", - "internal/buffer", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/resolver/dns", - "internal/resolver/passthrough", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "serviceconfig", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "1a3960e4bd028ac0cec0a2afd27d7d8e67c11514" - version = "v1.25.1" - -[[projects]] - digest = "1:b75b3deb2bce8bc079e16bb2aecfe01eb80098f5650f9e93e5643ca8b7b73737" - name = "gopkg.in/yaml.v2" - packages = ["."] - pruneopts = "UT" - revision = "1f64d6156d11335c3f22d9330b0ad14fc1e789ce" - version = "v2.2.7" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "contrib.go.opencensus.io/exporter/ocagent", - "github.com/dgrijalva/jwt-go", - "github.com/dimchansky/utfbom", - "github.com/mitchellh/go-homedir", - "github.com/stretchr/testify/require", - "go.opencensus.io/plugin/ochttp", - "go.opencensus.io/plugin/ochttp/propagation/tracecontext", - "go.opencensus.io/stats/view", - "go.opencensus.io/trace", - "golang.org/x/crypto/pkcs12", - "golang.org/x/lint/golint", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/vendor/github.com/Azure/go-autorest/Gopkg.toml b/vendor/github.com/Azure/go-autorest/Gopkg.toml deleted file mode 100644 index 1fc2865969..0000000000 --- a/vendor/github.com/Azure/go-autorest/Gopkg.toml +++ /dev/null @@ -1,59 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - -required = ["golang.org/x/lint/golint"] - -[prune] - go-tests = true - unused-packages = true - -[[constraint]] - name = "contrib.go.opencensus.io/exporter/ocagent" - version = "0.6.0" - -[[constraint]] - name = "github.com/dgrijalva/jwt-go" - version = "3.2.0" - -[[constraint]] - name = "github.com/dimchansky/utfbom" - version = "1.1.0" - -[[constraint]] - name = "github.com/mitchellh/go-homedir" - version = "1.1.0" - -[[constraint]] - name = "github.com/stretchr/testify" - version = "1.3.0" - -[[constraint]] - name = "go.opencensus.io" - version = "0.22.0" - -[[constraint]] - branch = "master" - name = "golang.org/x/crypto" diff --git a/vendor/github.com/Azure/go-autorest/LICENSE b/vendor/github.com/Azure/go-autorest/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/README.md b/vendor/github.com/Azure/go-autorest/README.md deleted file mode 100644 index de1e19a44d..0000000000 --- a/vendor/github.com/Azure/go-autorest/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# go-autorest - -[![GoDoc](https://godoc.org/github.com/Azure/go-autorest/autorest?status.png)](https://godoc.org/github.com/Azure/go-autorest/autorest) -[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/go/Azure.go-autorest?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=625&branchName=master) -[![Go Report Card](https://goreportcard.com/badge/Azure/go-autorest)](https://goreportcard.com/report/Azure/go-autorest) - -Package go-autorest provides an HTTP request client for use with [Autorest](https://github.com/Azure/autorest.go)-generated API client packages. - -An authentication client tested with Azure Active Directory (AAD) is also -provided in this repo in the package -`github.com/Azure/go-autorest/autorest/adal`. Despite its name, this package -is maintained only as part of the Azure Go SDK and is not related to other -"ADAL" libraries in [github.com/AzureAD](https://github.com/AzureAD). - -## Overview - -Package go-autorest implements an HTTP request pipeline suitable for use across -multiple goroutines and provides the shared routines used by packages generated -by [Autorest](https://github.com/Azure/autorest.go). - -The package breaks sending and responding to HTTP requests into three phases: Preparing, Sending, -and Responding. A typical pattern is: - -```go - req, err := Prepare(&http.Request{}, - token.WithAuthorization()) - - resp, err := Send(req, - WithLogging(logger), - DoErrorIfStatusCode(http.StatusInternalServerError), - DoCloseIfError(), - DoRetryForAttempts(5, time.Second)) - - err = Respond(resp, - ByDiscardingBody(), - ByClosing()) -``` - -Each phase relies on decorators to modify and / or manage processing. Decorators may first modify -and then pass the data along, pass the data first and then modify the result, or wrap themselves -around passing the data (such as a logger might do). Decorators run in the order provided. For -example, the following: - -```go - req, err := Prepare(&http.Request{}, - WithBaseURL("https://microsoft.com/"), - WithPath("a"), - WithPath("b"), - WithPath("c")) -``` - -will set the URL to: - -``` - https://microsoft.com/a/b/c -``` - -Preparers and Responders may be shared and re-used (assuming the underlying decorators support -sharing and re-use). Performant use is obtained by creating one or more Preparers and Responders -shared among multiple go-routines, and a single Sender shared among multiple sending go-routines, -all bound together by means of input / output channels. - -Decorators hold their passed state within a closure (such as the path components in the example -above). Be careful to share Preparers and Responders only in a context where such held state -applies. For example, it may not make sense to share a Preparer that applies a query string from a -fixed set of values. Similarly, sharing a Responder that reads the response body into a passed -struct (e.g., `ByUnmarshallingJson`) is likely incorrect. - -Errors raised by autorest objects and methods will conform to the `autorest.Error` interface. - -See the included examples for more detail. For details on the suggested use of this package by -generated clients, see the Client described below. - -## Helpers - -### Handling Swagger Dates - -The Swagger specification (https://swagger.io) that drives AutoRest -(https://github.com/Azure/autorest/) precisely defines two date forms: date and date-time. The -github.com/Azure/go-autorest/autorest/date package provides time.Time derivations to ensure correct -parsing and formatting. - -### Handling Empty Values - -In JSON, missing values have different semantics than empty values. This is especially true for -services using the HTTP PATCH verb. The JSON submitted with a PATCH request generally contains -only those values to modify. Missing values are to be left unchanged. Developers, then, require a -means to both specify an empty value and to leave the value out of the submitted JSON. - -The Go JSON package (`encoding/json`) supports the `omitempty` tag. When specified, it omits -empty values from the rendered JSON. Since Go defines default values for all base types (such as "" -for string and 0 for int) and provides no means to mark a value as actually empty, the JSON package -treats default values as meaning empty, omitting them from the rendered JSON. This means that, using -the Go base types encoded through the default JSON package, it is not possible to create JSON to -clear a value at the server. - -The workaround within the Go community is to use pointers to base types in lieu of base types within -structures that map to JSON. For example, instead of a value of type `string`, the workaround uses -`*string`. While this enables distinguishing empty values from those to be unchanged, creating -pointers to a base type (notably constant, in-line values) requires additional variables. This, for -example, - -```go - s := struct { - S *string - }{ S: &"foo" } -``` -fails, while, this - -```go - v := "foo" - s := struct { - S *string - }{ S: &v } -``` -succeeds. - -To ease using pointers, the subpackage `to` contains helpers that convert to and from pointers for -Go base types which have Swagger analogs. It also provides a helper that converts between -`map[string]string` and `map[string]*string`, enabling the JSON to specify that the value -associated with a key should be cleared. With the helpers, the previous example becomes - -```go - s := struct { - S *string - }{ S: to.StringPtr("foo") } -``` - -## Install - -```bash -go get github.com/Azure/go-autorest/autorest -go get github.com/Azure/go-autorest/autorest/azure -go get github.com/Azure/go-autorest/autorest/date -go get github.com/Azure/go-autorest/autorest/to -``` - -### Using with Go Modules -In [v12.0.1](https://github.com/Azure/go-autorest/pull/386), this repository introduced the following modules. - -- autorest/adal -- autorest/azure/auth -- autorest/azure/cli -- autorest/date -- autorest/mocks -- autorest/to -- autorest/validation -- autorest -- logger -- tracing - -Tagging cumulative SDK releases as a whole (e.g. `v12.3.0`) is still enabled to support consumers of this repo that have not yet migrated to modules. - -## License - -See LICENSE file. - ------ - -This project has adopted the [Microsoft Open Source Code of -Conduct](https://opensource.microsoft.com/codeofconduct/). For more information -see the [Code of Conduct -FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact -[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional -questions or comments. diff --git a/vendor/github.com/Azure/go-autorest/autorest/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/adal/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/adal/README.md b/vendor/github.com/Azure/go-autorest/autorest/adal/README.md deleted file mode 100644 index b11eb07884..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/README.md +++ /dev/null @@ -1,294 +0,0 @@ -# NOTE: This module will go out of support by March 31, 2023. For authenticating with Azure AD, use module [azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity) instead. For help migrating from `adal` to `azidentiy` please consult the [migration guide](https://aka.ms/azsdk/go/identity/migration). General information about the retirement of this and other legacy modules can be found [here](https://azure.microsoft.com/updates/support-for-azure-sdk-libraries-that-do-not-conform-to-our-current-azure-sdk-guidelines-will-be-retired-as-of-31-march-2023/). - -# Azure Active Directory authentication for Go - -This is a standalone package for authenticating with Azure Active -Directory from other Go libraries and applications, in particular the [Azure SDK -for Go](https://github.com/Azure/azure-sdk-for-go). - -Note: Despite the package's name it is not related to other "ADAL" libraries -maintained in the [github.com/AzureAD](https://github.com/AzureAD) org. Issues -should be opened in [this repo's](https://github.com/Azure/go-autorest/issues) -or [the SDK's](https://github.com/Azure/azure-sdk-for-go/issues) issue -trackers. - -## Install - -```bash -go get -u github.com/Azure/go-autorest/autorest/adal -``` - -## Usage - -An Active Directory application is required in order to use this library. An application can be registered in the [Azure Portal](https://portal.azure.com/) by following these [guidelines](https://docs.microsoft.com/azure/active-directory/develop/active-directory-integrating-applications) or using the [Azure CLI](https://github.com/Azure/azure-cli). - -### Register an Azure AD Application with secret - - -1. Register a new application with a `secret` credential - - ``` - az ad app create \ - --display-name example-app \ - --homepage https://example-app/home \ - --identifier-uris https://example-app/app \ - --password secret - ``` - -2. Create a service principal using the `Application ID` from previous step - - ``` - az ad sp create --id "Application ID" - ``` - - * Replace `Application ID` with `appId` from step 1. - -### Register an Azure AD Application with certificate - -1. Create a private key - - ``` - openssl genrsa -out "example-app.key" 2048 - ``` - -2. Create the certificate - - ``` - openssl req -new -key "example-app.key" -subj "/CN=example-app" -out "example-app.csr" - openssl x509 -req -in "example-app.csr" -signkey "example-app.key" -out "example-app.crt" -days 10000 - ``` - -3. Create the PKCS12 version of the certificate containing also the private key - - ``` - openssl pkcs12 -export -out "example-app.pfx" -inkey "example-app.key" -in "example-app.crt" -passout pass: - - ``` - -4. Register a new application with the certificate content form `example-app.crt` - - ``` - certificateContents="$(tail -n+2 "example-app.crt" | head -n-1)" - - az ad app create \ - --display-name example-app \ - --homepage https://example-app/home \ - --identifier-uris https://example-app/app \ - --key-usage Verify --end-date 2018-01-01 \ - --key-value "${certificateContents}" - ``` - -5. Create a service principal using the `Application ID` from previous step - - ``` - az ad sp create --id "APPLICATION_ID" - ``` - - * Replace `APPLICATION_ID` with `appId` from step 4. - - -### Grant the necessary permissions - -Azure relies on a Role-Based Access Control (RBAC) model to manage the access to resources at a fine-grained -level. There is a set of [pre-defined roles](https://docs.microsoft.com/azure/active-directory/role-based-access-built-in-roles) -which can be assigned to a service principal of an Azure AD application depending of your needs. - -``` -az role assignment create --assigner "SERVICE_PRINCIPAL_ID" --role "ROLE_NAME" -``` - -* Replace the `SERVICE_PRINCIPAL_ID` with the `appId` from previous step. -* Replace the `ROLE_NAME` with a role name of your choice. - -It is also possible to define custom role definitions. - -``` -az role definition create --role-definition role-definition.json -``` - -* Check [custom roles](https://docs.microsoft.com/azure/active-directory/role-based-access-control-custom-roles) for more details regarding the content of `role-definition.json` file. - - -### Acquire Access Token - -The common configuration used by all flows: - -```Go -const activeDirectoryEndpoint = "https://login.microsoftonline.com/" -tenantID := "TENANT_ID" -oauthConfig, err := adal.NewOAuthConfig(activeDirectoryEndpoint, tenantID) - -applicationID := "APPLICATION_ID" - -callback := func(token adal.Token) error { - // This is called after the token is acquired -} - -// The resource for which the token is acquired -resource := "https://management.core.windows.net/" -``` - -* Replace the `TENANT_ID` with your tenant ID. -* Replace the `APPLICATION_ID` with the value from previous section. - -#### Client Credentials - -```Go -applicationSecret := "APPLICATION_SECRET" - -spt, err := adal.NewServicePrincipalToken( - *oauthConfig, - appliationID, - applicationSecret, - resource, - callbacks...) -if err != nil { - return nil, err -} - -// Acquire a new access token -err = spt.Refresh() -if (err == nil) { - token := spt.Token -} -``` - -* Replace the `APPLICATION_SECRET` with the `password` value from previous section. - -#### Client Certificate - -```Go -certificatePath := "./example-app.pfx" - -certData, err := ioutil.ReadFile(certificatePath) -if err != nil { - return nil, fmt.Errorf("failed to read the certificate file (%s): %v", certificatePath, err) -} - -// Get the certificate and private key from pfx file -certificate, rsaPrivateKey, err := decodePkcs12(certData, "") -if err != nil { - return nil, fmt.Errorf("failed to decode pkcs12 certificate while creating spt: %v", err) -} - -spt, err := adal.NewServicePrincipalTokenFromCertificate( - *oauthConfig, - applicationID, - certificate, - rsaPrivateKey, - resource, - callbacks...) - -// Acquire a new access token -err = spt.Refresh() -if (err == nil) { - token := spt.Token -} -``` - -* Update the certificate path to point to the example-app.pfx file which was created in previous section. - - -#### Device Code - -```Go -oauthClient := &http.Client{} - -// Acquire the device code -deviceCode, err := adal.InitiateDeviceAuth( - oauthClient, - *oauthConfig, - applicationID, - resource) -if err != nil { - return nil, fmt.Errorf("Failed to start device auth flow: %s", err) -} - -// Display the authentication message -fmt.Println(*deviceCode.Message) - -// Wait here until the user is authenticated -token, err := adal.WaitForUserCompletion(oauthClient, deviceCode) -if err != nil { - return nil, fmt.Errorf("Failed to finish device auth flow: %s", err) -} - -spt, err := adal.NewServicePrincipalTokenFromManualToken( - *oauthConfig, - applicationID, - resource, - *token, - callbacks...) - -if (err == nil) { - token := spt.Token -} -``` - -#### Username password authenticate - -```Go -spt, err := adal.NewServicePrincipalTokenFromUsernamePassword( - *oauthConfig, - applicationID, - username, - password, - resource, - callbacks...) - -if (err == nil) { - token := spt.Token -} -``` - -#### Authorization code authenticate - -``` Go -spt, err := adal.NewServicePrincipalTokenFromAuthorizationCode( - *oauthConfig, - applicationID, - clientSecret, - authorizationCode, - redirectURI, - resource, - callbacks...) - -err = spt.Refresh() -if (err == nil) { - token := spt.Token -} -``` - -### Command Line Tool - -A command line tool is available in `cmd/adal.go` that can acquire a token for a given resource. It supports all flows mentioned above. - -``` -adal -h - -Usage of ./adal: - -applicationId string - application id - -certificatePath string - path to pk12/PFC application certificate - -mode string - authentication mode (device, secret, cert, refresh) (default "device") - -resource string - resource for which the token is requested - -secret string - application secret - -tenantId string - tenant id - -tokenCachePath string - location of oath token cache (default "/home/cgc/.adal/accessToken.json") -``` - -Example acquire a token for `https://management.core.windows.net/` using device code flow: - -``` -adal -mode device \ - -applicationId "APPLICATION_ID" \ - -tenantId "TENANT_ID" \ - -resource https://management.core.windows.net/ - -``` diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go b/vendor/github.com/Azure/go-autorest/autorest/adal/config.go deleted file mode 100644 index fa5964742f..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/config.go +++ /dev/null @@ -1,151 +0,0 @@ -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. - -import ( - "errors" - "fmt" - "net/url" -) - -const ( - activeDirectoryEndpointTemplate = "%s/oauth2/%s%s" -) - -// OAuthConfig represents the endpoints needed -// in OAuth operations -type OAuthConfig struct { - AuthorityEndpoint url.URL `json:"authorityEndpoint"` - AuthorizeEndpoint url.URL `json:"authorizeEndpoint"` - TokenEndpoint url.URL `json:"tokenEndpoint"` - DeviceCodeEndpoint url.URL `json:"deviceCodeEndpoint"` -} - -// IsZero returns true if the OAuthConfig object is zero-initialized. -func (oac OAuthConfig) IsZero() bool { - return oac == OAuthConfig{} -} - -func validateStringParam(param, name string) error { - if len(param) == 0 { - return fmt.Errorf("parameter '" + name + "' cannot be empty") - } - return nil -} - -// NewOAuthConfig returns an OAuthConfig with tenant specific urls -func NewOAuthConfig(activeDirectoryEndpoint, tenantID string) (*OAuthConfig, error) { - apiVer := "1.0" - return NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID, &apiVer) -} - -// NewOAuthConfigWithAPIVersion returns an OAuthConfig with tenant specific urls. -// If apiVersion is not nil the "api-version" query parameter will be appended to the endpoint URLs with the specified value. -func NewOAuthConfigWithAPIVersion(activeDirectoryEndpoint, tenantID string, apiVersion *string) (*OAuthConfig, error) { - if err := validateStringParam(activeDirectoryEndpoint, "activeDirectoryEndpoint"); err != nil { - return nil, err - } - api := "" - // it's legal for tenantID to be empty so don't validate it - if apiVersion != nil { - if err := validateStringParam(*apiVersion, "apiVersion"); err != nil { - return nil, err - } - api = fmt.Sprintf("?api-version=%s", *apiVersion) - } - u, err := url.Parse(activeDirectoryEndpoint) - if err != nil { - return nil, err - } - authorityURL, err := u.Parse(tenantID) - if err != nil { - return nil, err - } - authorizeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "authorize", api)) - if err != nil { - return nil, err - } - tokenURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "token", api)) - if err != nil { - return nil, err - } - deviceCodeURL, err := u.Parse(fmt.Sprintf(activeDirectoryEndpointTemplate, tenantID, "devicecode", api)) - if err != nil { - return nil, err - } - - return &OAuthConfig{ - AuthorityEndpoint: *authorityURL, - AuthorizeEndpoint: *authorizeURL, - TokenEndpoint: *tokenURL, - 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/devicetoken.go b/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go deleted file mode 100644 index 9daa4b58b8..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/devicetoken.go +++ /dev/null @@ -1,273 +0,0 @@ -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 is largely based on rjw57/oauth2device's code, with the follow differences: - * scope -> resource, and only allow a single one - * receive "Message" in the DeviceCode struct and show it to users as the prompt - * azure-xplat-cli has the following behavior that this emulates: - - does not send client_secret during the token exchange - - sends resource again in the token exchange request -*/ - -import ( - "context" - "encoding/json" - "fmt" - "io/ioutil" - "net/http" - "net/url" - "strings" - "time" -) - -const ( - logPrefix = "autorest/adal/devicetoken:" -) - -var ( - // ErrDeviceGeneric represents an unknown error from the token endpoint when using device flow - ErrDeviceGeneric = fmt.Errorf("%s Error while retrieving OAuth token: Unknown Error", logPrefix) - - // ErrDeviceAccessDenied represents an access denied error from the token endpoint when using device flow - ErrDeviceAccessDenied = fmt.Errorf("%s Error while retrieving OAuth token: Access Denied", logPrefix) - - // ErrDeviceAuthorizationPending represents the server waiting on the user to complete the device flow - ErrDeviceAuthorizationPending = fmt.Errorf("%s Error while retrieving OAuth token: Authorization Pending", logPrefix) - - // ErrDeviceCodeExpired represents the server timing out and expiring the code during device flow - ErrDeviceCodeExpired = fmt.Errorf("%s Error while retrieving OAuth token: Code Expired", logPrefix) - - // ErrDeviceSlowDown represents the service telling us we're polling too often during device flow - ErrDeviceSlowDown = fmt.Errorf("%s Error while retrieving OAuth token: Slow Down", logPrefix) - - // ErrDeviceCodeEmpty represents an empty device code from the device endpoint while using device flow - ErrDeviceCodeEmpty = fmt.Errorf("%s Error while retrieving device code: Device Code Empty", logPrefix) - - // ErrOAuthTokenEmpty represents an empty OAuth token from the token endpoint when using device flow - ErrOAuthTokenEmpty = fmt.Errorf("%s Error while retrieving OAuth token: Token Empty", logPrefix) - - errCodeSendingFails = "Error occurred while sending request for Device Authorization Code" - errCodeHandlingFails = "Error occurred while handling response from the Device Endpoint" - errTokenSendingFails = "Error occurred while sending request with device code for a token" - errTokenHandlingFails = "Error occurred while handling response from the Token Endpoint (during device flow)" - errStatusNotOK = "Error HTTP status != 200" -) - -// DeviceCode is the object returned by the device auth endpoint -// It contains information to instruct the user to complete the auth flow -type DeviceCode struct { - DeviceCode *string `json:"device_code,omitempty"` - UserCode *string `json:"user_code,omitempty"` - VerificationURL *string `json:"verification_url,omitempty"` - ExpiresIn *int64 `json:"expires_in,string,omitempty"` - Interval *int64 `json:"interval,string,omitempty"` - - Message *string `json:"message"` // Azure specific - Resource string // store the following, stored when initiating, used when exchanging - OAuthConfig OAuthConfig - ClientID string -} - -// TokenError is the object returned by the token exchange endpoint -// when something is amiss -type TokenError struct { - Error *string `json:"error,omitempty"` - ErrorCodes []int `json:"error_codes,omitempty"` - ErrorDescription *string `json:"error_description,omitempty"` - Timestamp *string `json:"timestamp,omitempty"` - TraceID *string `json:"trace_id,omitempty"` -} - -// DeviceToken is the object return by the token exchange endpoint -// It can either look like a Token or an ErrorToken, so put both here -// and check for presence of "Error" to know if we are in error state -type deviceToken struct { - Token - TokenError -} - -// InitiateDeviceAuth initiates a device auth flow. It returns a DeviceCode -// that can be used with CheckForUserCompletion or WaitForUserCompletion. -// Deprecated: use InitiateDeviceAuthWithContext() instead. -func InitiateDeviceAuth(sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { - return InitiateDeviceAuthWithContext(context.Background(), sender, oauthConfig, clientID, resource) -} - -// InitiateDeviceAuthWithContext initiates a device auth flow. It returns a DeviceCode -// that can be used with CheckForUserCompletion or WaitForUserCompletion. -func InitiateDeviceAuthWithContext(ctx context.Context, sender Sender, oauthConfig OAuthConfig, clientID, resource string) (*DeviceCode, error) { - v := url.Values{ - "client_id": []string{clientID}, - "resource": []string{resource}, - } - - s := v.Encode() - body := ioutil.NopCloser(strings.NewReader(s)) - - req, err := http.NewRequest(http.MethodPost, oauthConfig.DeviceCodeEndpoint.String(), body) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error()) - } - - req.ContentLength = int64(len(s)) - req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req.WithContext(ctx)) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeSendingFails, err.Error()) - } - defer resp.Body.Close() - - rb, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeHandlingFails, err.Error()) - } - - if resp.StatusCode != http.StatusOK { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeHandlingFails, errStatusNotOK) - } - - if len(strings.Trim(string(rb), " ")) == 0 { - return nil, ErrDeviceCodeEmpty - } - - var code DeviceCode - err = json.Unmarshal(rb, &code) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errCodeHandlingFails, err.Error()) - } - - code.ClientID = clientID - code.Resource = resource - code.OAuthConfig = oauthConfig - - return &code, nil -} - -// CheckForUserCompletion takes a DeviceCode and checks with the Azure AD OAuth endpoint -// to see if the device flow has: been completed, timed out, or otherwise failed -// Deprecated: use CheckForUserCompletionWithContext() instead. -func CheckForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { - return CheckForUserCompletionWithContext(context.Background(), sender, code) -} - -// CheckForUserCompletionWithContext takes a DeviceCode and checks with the Azure AD OAuth endpoint -// to see if the device flow has: been completed, timed out, or otherwise failed -func CheckForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { - v := url.Values{ - "client_id": []string{code.ClientID}, - "code": []string{*code.DeviceCode}, - "grant_type": []string{OAuthGrantTypeDeviceCode}, - "resource": []string{code.Resource}, - } - - s := v.Encode() - body := ioutil.NopCloser(strings.NewReader(s)) - - req, err := http.NewRequest(http.MethodPost, code.OAuthConfig.TokenEndpoint.String(), body) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error()) - } - - req.ContentLength = int64(len(s)) - req.Header.Set(contentType, mimeTypeFormPost) - resp, err := sender.Do(req.WithContext(ctx)) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenSendingFails, err.Error()) - } - defer resp.Body.Close() - - rb, err := ioutil.ReadAll(resp.Body) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenHandlingFails, err.Error()) - } - - if resp.StatusCode != http.StatusOK && len(strings.Trim(string(rb), " ")) == 0 { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenHandlingFails, errStatusNotOK) - } - if len(strings.Trim(string(rb), " ")) == 0 { - return nil, ErrOAuthTokenEmpty - } - - var token deviceToken - err = json.Unmarshal(rb, &token) - if err != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, errTokenHandlingFails, err.Error()) - } - - if token.Error == nil { - return &token.Token, nil - } - - switch *token.Error { - case "authorization_pending": - return nil, ErrDeviceAuthorizationPending - case "slow_down": - return nil, ErrDeviceSlowDown - case "access_denied": - return nil, ErrDeviceAccessDenied - case "code_expired": - return nil, ErrDeviceCodeExpired - default: - // return a more meaningful error message if available - if token.ErrorDescription != nil { - return nil, fmt.Errorf("%s %s: %s", logPrefix, *token.Error, *token.ErrorDescription) - } - return nil, ErrDeviceGeneric - } -} - -// WaitForUserCompletion calls CheckForUserCompletion repeatedly until a token is granted or an error state occurs. -// This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. -// Deprecated: use WaitForUserCompletionWithContext() instead. -func WaitForUserCompletion(sender Sender, code *DeviceCode) (*Token, error) { - return WaitForUserCompletionWithContext(context.Background(), sender, code) -} - -// WaitForUserCompletionWithContext calls CheckForUserCompletion repeatedly until a token is granted or an error -// state occurs. This prevents the user from looping and checking against 'ErrDeviceAuthorizationPending'. -func WaitForUserCompletionWithContext(ctx context.Context, sender Sender, code *DeviceCode) (*Token, error) { - intervalDuration := time.Duration(*code.Interval) * time.Second - waitDuration := intervalDuration - - for { - token, err := CheckForUserCompletionWithContext(ctx, sender, code) - - if err == nil { - return token, nil - } - - switch err { - case ErrDeviceSlowDown: - waitDuration += waitDuration - case ErrDeviceAuthorizationPending: - // noop - default: // everything else is "fatal" to us - return nil, err - } - - if waitDuration > (intervalDuration * 3) { - return nil, fmt.Errorf("%s Error waiting for user to complete device flow. Server told us to slow_down too much", logPrefix) - } - - select { - case <-time.After(waitDuration): - // noop - case <-ctx.Done(): - return nil, ctx.Err() - } - } -} 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 deleted file mode 100644 index 647a61bb8c..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/go_mod_tidy_hack.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build modhack -// +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 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" diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go b/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go deleted file mode 100644 index 2a974a39b3..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/persist.go +++ /dev/null @@ -1,135 +0,0 @@ -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. - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - - "golang.org/x/crypto/pkcs12" -) - -var ( - // ErrMissingCertificate is returned when no local certificate is found in the provided PFX data. - ErrMissingCertificate = errors.New("adal: certificate missing") - - // ErrMissingPrivateKey is returned when no private key is found in the provided PFX data. - ErrMissingPrivateKey = errors.New("adal: private key missing") -) - -// LoadToken restores a Token object from a file located at 'path'. -func LoadToken(path string) (*Token, error) { - file, err := os.Open(path) - if err != nil { - return nil, fmt.Errorf("failed to open file (%s) while loading token: %v", path, err) - } - defer file.Close() - - var token Token - - dec := json.NewDecoder(file) - if err = dec.Decode(&token); err != nil { - return nil, fmt.Errorf("failed to decode contents of file (%s) into Token representation: %v", path, err) - } - return &token, nil -} - -// SaveToken persists an oauth token at the given location on disk. -// It moves the new file into place so it can safely be used to replace an existing file -// that maybe accessed by multiple processes. -func SaveToken(path string, mode os.FileMode, token Token) error { - dir := filepath.Dir(path) - err := os.MkdirAll(dir, os.ModePerm) - if err != nil { - return fmt.Errorf("failed to create directory (%s) to store token in: %v", dir, err) - } - - newFile, err := ioutil.TempFile(dir, "token") - if err != nil { - return fmt.Errorf("failed to create the temp file to write the token: %v", err) - } - tempPath := newFile.Name() - - if err := json.NewEncoder(newFile).Encode(token); err != nil { - return fmt.Errorf("failed to encode token to file (%s) while saving token: %v", tempPath, err) - } - if err := newFile.Close(); err != nil { - return fmt.Errorf("failed to close temp file %s: %v", tempPath, err) - } - - // Atomic replace to avoid multi-writer file corruptions - if err := os.Rename(tempPath, path); err != nil { - return fmt.Errorf("failed to move temporary token to desired output location. src=%s dst=%s: %v", tempPath, path, err) - } - if err := os.Chmod(path, mode); err != nil { - return fmt.Errorf("failed to chmod the token file %s: %v", path, err) - } - return nil -} - -// DecodePfxCertificateData extracts the x509 certificate and RSA private key from the provided PFX data. -// The PFX data must contain a private key along with a certificate whose public key matches that of the -// private key or an error is returned. -// If the private key is not password protected pass the empty string for password. -func DecodePfxCertificateData(pfxData []byte, password string) (*x509.Certificate, *rsa.PrivateKey, error) { - blocks, err := pkcs12.ToPEM(pfxData, password) - if err != nil { - return nil, nil, err - } - // first extract the private key - var priv *rsa.PrivateKey - for _, block := range blocks { - if block.Type == "PRIVATE KEY" { - priv, err = x509.ParsePKCS1PrivateKey(block.Bytes) - if err != nil { - return nil, nil, err - } - break - } - } - if priv == nil { - return nil, nil, ErrMissingPrivateKey - } - // now find the certificate with the matching public key of our private key - var cert *x509.Certificate - for _, block := range blocks { - if block.Type == "CERTIFICATE" { - pcert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, nil, err - } - certKey, ok := pcert.PublicKey.(*rsa.PublicKey) - if !ok { - // keep looking - continue - } - if priv.E == certKey.E && priv.N.Cmp(certKey.N) == 0 { - // found a match - cert = pcert - break - } - } - } - if cert == nil { - return nil, nil, ErrMissingCertificate - } - return cert, priv, nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go b/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go deleted file mode 100644 index eb649bce9f..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/sender.go +++ /dev/null @@ -1,101 +0,0 @@ -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. - -import ( - "crypto/tls" - "net" - "net/http" - "net/http/cookiejar" - "sync" - "time" - - "github.com/Azure/go-autorest/tracing" -) - -const ( - contentType = "Content-Type" - mimeTypeFormPost = "application/x-www-form-urlencoded" -) - -// DO NOT ACCESS THIS DIRECTLY. go through sender() -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. -type Sender interface { - Do(*http.Request) (*http.Response, error) -} - -// SenderFunc is a method that implements the Sender interface. -type SenderFunc func(*http.Request) (*http.Response, error) - -// Do implements the Sender interface on SenderFunc. -func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) { - return sf(r) -} - -// SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the -// http.Request and pass it along or, first, pass the http.Request along then react to the -// http.Response result. -type SendDecorator func(Sender) Sender - -// CreateSender creates, decorates, and returns, as a Sender, the default http.Client. -func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(sender(), decorators...) -} - -// DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to -// the Sender. Decorators are applied in the order received, but their affect upon the request -// depends on whether they are a pre-decorator (change the http.Request and then pass it along) or a -// post-decorator (pass the http.Request along and react to the results in http.Response). -func DecorateSender(s Sender, decorators ...SendDecorator) Sender { - for _, decorate := range decorators { - s = decorate(s) - } - 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() { - // copied from http.DefaultTransport with a TLS minimum version. - transport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - }).DialContext, - ForceAttemptHTTP2: true, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - 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 deleted file mode 100644 index c90209a948..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token.go +++ /dev/null @@ -1,1396 +0,0 @@ -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. - -import ( - "context" - "crypto/rand" - "crypto/rsa" - "crypto/sha1" - "crypto/x509" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "io" - "io/ioutil" - "math" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "sync" - "time" - - "github.com/Azure/go-autorest/autorest/date" - "github.com/Azure/go-autorest/logger" - "github.com/golang-jwt/jwt/v4" -) - -const ( - defaultRefresh = 5 * time.Minute - - // OAuthGrantTypeDeviceCode is the "grant_type" identifier used in device flow - OAuthGrantTypeDeviceCode = "device_code" - - // OAuthGrantTypeClientCredentials is the "grant_type" identifier used in credential flows - OAuthGrantTypeClientCredentials = "client_credentials" - - // OAuthGrantTypeUserPass is the "grant_type" identifier used in username and password auth flows - OAuthGrantTypeUserPass = "password" - - // OAuthGrantTypeRefreshToken is the "grant_type" identifier used in refresh token flows - OAuthGrantTypeRefreshToken = "refresh_token" - - // OAuthGrantTypeAuthorizationCode is the "grant_type" identifier used in authorization code flows - OAuthGrantTypeAuthorizationCode = "authorization_code" - - // metadataHeader is the header required by MSI extension - metadataHeader = "Metadata" - - // msiEndpoint is the well known endpoint for getting MSI authentications tokens - msiEndpoint = "http://169.254.169.254/metadata/identity/oauth2/token" - - // the API version to use for the MSI endpoint - msiAPIVersion = "2018-02-01" - - // the default number of attempts to refresh an MSI authentication token - defaultMaxMSIRefreshAttempts = 5 - - // asMSIEndpointEnv is the environment variable used to store the endpoint on App Service and Functions - msiEndpointEnv = "MSI_ENDPOINT" - - // asMSISecretEnv is the environment variable used to store the request secret on App Service and Functions - msiSecretEnv = "MSI_SECRET" - - // the API version to use for the legacy App Service MSI endpoint - appServiceAPIVersion2017 = "2017-09-01" - - // secret header used when authenticating against app service MSI endpoint - secretHeader = "Secret" - - // the format for expires_on in UTC with AM/PM - expiresOnDateFormatPM = "1/2/2006 15:04:05 PM +00:00" - - // the format for expires_on in UTC without AM/PM - expiresOnDateFormat = "1/2/2006 15:04:05 +00:00" -) - -// OAuthTokenProvider is an interface which should be implemented by an access token retriever -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 - Response() *http.Response -} - -// Refresher is an interface for token refresh functionality -type Refresher interface { - Refresh() error - RefreshExchange(resource string) error - EnsureFresh() error -} - -// RefresherWithContext is an interface for token refresh functionality -type RefresherWithContext interface { - RefreshWithContext(ctx context.Context) error - RefreshExchangeWithContext(ctx context.Context, resource string) error - EnsureFreshWithContext(ctx context.Context) error -} - -// TokenRefreshCallback is the type representing callbacks that will be called after -// a successful token refresh -type TokenRefreshCallback func(Token) error - -// TokenRefresh is a type representing a custom callback to refresh a token -type TokenRefresh func(ctx context.Context, resource string) (*Token, error) - -// Token encapsulates the access token used to authorize Azure requests. -// https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-oauth2-client-creds-grant-flow#service-to-service-access-token-response -type Token struct { - AccessToken string `json:"access_token"` - RefreshToken string `json:"refresh_token"` - - ExpiresIn json.Number `json:"expires_in"` - ExpiresOn json.Number `json:"expires_on"` - NotBefore json.Number `json:"not_before"` - - Resource string `json:"resource"` - Type string `json:"token_type"` -} - -func newToken() Token { - return Token{ - ExpiresIn: "0", - ExpiresOn: "0", - NotBefore: "0", - } -} - -// IsZero returns true if the token object is zero-initialized. -func (t Token) IsZero() bool { - return t == Token{} -} - -// Expires returns the time.Time when the Token expires. -func (t Token) Expires() time.Time { - s, err := t.ExpiresOn.Float64() - if err != nil { - s = -3600 - } - - expiration := date.NewUnixTimeFromSeconds(s) - - return time.Time(expiration).UTC() -} - -// IsExpired returns true if the Token is expired, false otherwise. -func (t Token) IsExpired() bool { - return t.WillExpireIn(0) -} - -// WillExpireIn returns true if the Token will expire after the passed time.Duration interval -// from now, false otherwise. -func (t Token) WillExpireIn(d time.Duration) bool { - return !t.Expires().After(time.Now().Add(d)) -} - -// OAuthToken return the current access token -func (t *Token) OAuthToken() string { - return t.AccessToken -} - -// ServicePrincipalSecret is an interface that allows various secret mechanism to fill the form -// that is submitted when acquiring an oAuth token. -type ServicePrincipalSecret interface { - SetAuthenticationValues(spt *ServicePrincipalToken, values *url.Values) error -} - -// ServicePrincipalNoSecret represents a secret type that contains no secret -// meaning it is not valid for fetching a fresh token. This is used by Manual -type ServicePrincipalNoSecret struct { -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret -// It only returns an error for the ServicePrincipalNoSecret type -func (noSecret *ServicePrincipalNoSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - return fmt.Errorf("Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token") -} - -// MarshalJSON implements the json.Marshaler interface. -func (noSecret ServicePrincipalNoSecret) MarshalJSON() ([]byte, error) { - type tokenType struct { - Type string `json:"type"` - } - return json.Marshal(tokenType{ - Type: "ServicePrincipalNoSecret", - }) -} - -// ServicePrincipalTokenSecret implements ServicePrincipalSecret for client_secret type authorization. -type ServicePrincipalTokenSecret struct { - ClientSecret string `json:"value"` -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -// It will populate the form submitted during oAuth Token Acquisition using the client_secret. -func (tokenSecret *ServicePrincipalTokenSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("client_secret", tokenSecret.ClientSecret) - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (tokenSecret ServicePrincipalTokenSecret) MarshalJSON() ([]byte, error) { - type tokenType struct { - Type string `json:"type"` - Value string `json:"value"` - } - return json.Marshal(tokenType{ - Type: "ServicePrincipalTokenSecret", - Value: tokenSecret.ClientSecret, - }) -} - -// ServicePrincipalCertificateSecret implements ServicePrincipalSecret for generic RSA cert auth with signed JWTs. -type ServicePrincipalCertificateSecret struct { - Certificate *x509.Certificate - PrivateKey *rsa.PrivateKey -} - -// SignJwt returns the JWT signed with the certificate's private key. -func (secret *ServicePrincipalCertificateSecret) SignJwt(spt *ServicePrincipalToken) (string, error) { - hasher := sha1.New() - _, err := hasher.Write(secret.Certificate.Raw) - if err != nil { - return "", err - } - - thumbprint := base64.URLEncoding.EncodeToString(hasher.Sum(nil)) - - // The jti (JWT ID) claim provides a unique identifier for the JWT. - jti := make([]byte, 20) - _, err = rand.Read(jti) - if err != nil { - return "", err - } - - token := jwt.New(jwt.SigningMethodRS256) - token.Header["x5t"] = thumbprint - x5c := []string{base64.StdEncoding.EncodeToString(secret.Certificate.Raw)} - token.Header["x5c"] = x5c - token.Claims = jwt.MapClaims{ - "aud": spt.inner.OauthConfig.TokenEndpoint.String(), - "iss": spt.inner.ClientID, - "sub": spt.inner.ClientID, - "jti": base64.URLEncoding.EncodeToString(jti), - "nbf": time.Now().Unix(), - "exp": time.Now().Add(24 * time.Hour).Unix(), - } - - signedString, err := token.SignedString(secret.PrivateKey) - return signedString, err -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -// It will populate the form submitted during oAuth Token Acquisition using a JWT signed with a certificate. -func (secret *ServicePrincipalCertificateSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - jwt, err := secret.SignJwt(spt) - if err != nil { - return err - } - - v.Set("client_assertion", jwt) - v.Set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer") - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (secret ServicePrincipalCertificateSecret) MarshalJSON() ([]byte, error) { - return nil, errors.New("marshalling ServicePrincipalCertificateSecret is not supported") -} - -// ServicePrincipalMSISecret implements ServicePrincipalSecret for machines running the MSI Extension. -type ServicePrincipalMSISecret struct { - msiType msiType - clientResourceID string -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (msiSecret ServicePrincipalMSISecret) MarshalJSON() ([]byte, error) { - return nil, errors.New("marshalling ServicePrincipalMSISecret is not supported") -} - -// ServicePrincipalUsernamePasswordSecret implements ServicePrincipalSecret for username and password auth. -type ServicePrincipalUsernamePasswordSecret struct { - Username string `json:"username"` - Password string `json:"password"` -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalUsernamePasswordSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("username", secret.Username) - v.Set("password", secret.Password) - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (secret ServicePrincipalUsernamePasswordSecret) MarshalJSON() ([]byte, error) { - type tokenType struct { - Type string `json:"type"` - Username string `json:"username"` - Password string `json:"password"` - } - return json.Marshal(tokenType{ - Type: "ServicePrincipalUsernamePasswordSecret", - Username: secret.Username, - Password: secret.Password, - }) -} - -// ServicePrincipalAuthorizationCodeSecret implements ServicePrincipalSecret for authorization code auth. -type ServicePrincipalAuthorizationCodeSecret struct { - ClientSecret string `json:"value"` - AuthorizationCode string `json:"authCode"` - RedirectURI string `json:"redirect"` -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -func (secret *ServicePrincipalAuthorizationCodeSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - v.Set("code", secret.AuthorizationCode) - v.Set("client_secret", secret.ClientSecret) - v.Set("redirect_uri", secret.RedirectURI) - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (secret ServicePrincipalAuthorizationCodeSecret) MarshalJSON() ([]byte, error) { - type tokenType struct { - Type string `json:"type"` - Value string `json:"value"` - AuthCode string `json:"authCode"` - Redirect string `json:"redirect"` - } - return json.Marshal(tokenType{ - Type: "ServicePrincipalAuthorizationCodeSecret", - Value: secret.ClientSecret, - AuthCode: secret.AuthorizationCode, - Redirect: secret.RedirectURI, - }) -} - -// ServicePrincipalFederatedSecret implements ServicePrincipalSecret for Federated JWTs. -type ServicePrincipalFederatedSecret struct { - jwt string -} - -// SetAuthenticationValues is a method of the interface ServicePrincipalSecret. -// It will populate the form submitted during OAuth Token Acquisition using a JWT signed by an OIDC issuer. -func (secret *ServicePrincipalFederatedSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error { - - v.Set("client_assertion", secret.jwt) - v.Set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer") - return nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (secret ServicePrincipalFederatedSecret) MarshalJSON() ([]byte, error) { - return nil, errors.New("marshalling ServicePrincipalFederatedSecret is not supported") -} - -// ServicePrincipalToken encapsulates a Token created for a Service Principal. -type ServicePrincipalToken struct { - inner servicePrincipalToken - refreshLock *sync.RWMutex - sender Sender - customRefreshFunc TokenRefresh - refreshCallbacks []TokenRefreshCallback - // MaxMSIRefreshAttempts is the maximum number of attempts to refresh an MSI token. - // Settings this to a value less than 1 will use the default value. - MaxMSIRefreshAttempts int -} - -// MarshalTokenJSON returns the marshalled inner token. -func (spt ServicePrincipalToken) MarshalTokenJSON() ([]byte, error) { - return json.Marshal(spt.inner.Token) -} - -// SetRefreshCallbacks replaces any existing refresh callbacks with the specified callbacks. -func (spt *ServicePrincipalToken) SetRefreshCallbacks(callbacks []TokenRefreshCallback) { - spt.refreshCallbacks = callbacks -} - -// SetCustomRefreshFunc sets a custom refresh function used to refresh the token. -func (spt *ServicePrincipalToken) SetCustomRefreshFunc(customRefreshFunc TokenRefresh) { - spt.customRefreshFunc = customRefreshFunc -} - -// MarshalJSON implements the json.Marshaler interface. -func (spt ServicePrincipalToken) MarshalJSON() ([]byte, error) { - return json.Marshal(spt.inner) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (spt *ServicePrincipalToken) UnmarshalJSON(data []byte) error { - // need to determine the token type - raw := map[string]interface{}{} - err := json.Unmarshal(data, &raw) - if err != nil { - return err - } - secret := raw["secret"].(map[string]interface{}) - switch secret["type"] { - case "ServicePrincipalNoSecret": - spt.inner.Secret = &ServicePrincipalNoSecret{} - case "ServicePrincipalTokenSecret": - spt.inner.Secret = &ServicePrincipalTokenSecret{} - case "ServicePrincipalCertificateSecret": - return errors.New("unmarshalling ServicePrincipalCertificateSecret is not supported") - case "ServicePrincipalMSISecret": - return errors.New("unmarshalling ServicePrincipalMSISecret is not supported") - case "ServicePrincipalUsernamePasswordSecret": - spt.inner.Secret = &ServicePrincipalUsernamePasswordSecret{} - case "ServicePrincipalAuthorizationCodeSecret": - spt.inner.Secret = &ServicePrincipalAuthorizationCodeSecret{} - case "ServicePrincipalFederatedSecret": - return errors.New("unmarshalling ServicePrincipalFederatedSecret is not supported") - default: - return fmt.Errorf("unrecognized token type '%s'", secret["type"]) - } - err = json.Unmarshal(data, &spt.inner) - if err != nil { - return err - } - // Don't override the refreshLock or the sender if those have been already set. - if spt.refreshLock == nil { - spt.refreshLock = &sync.RWMutex{} - } - if spt.sender == nil { - spt.sender = sender() - } - return nil -} - -// internal type used for marshalling/unmarshalling -type servicePrincipalToken struct { - Token Token `json:"token"` - Secret ServicePrincipalSecret `json:"secret"` - OauthConfig OAuthConfig `json:"oauth"` - ClientID string `json:"clientID"` - Resource string `json:"resource"` - AutoRefresh bool `json:"autoRefresh"` - RefreshWithin time.Duration `json:"refreshWithin"` -} - -func validateOAuthConfig(oac OAuthConfig) error { - if oac.IsZero() { - return fmt.Errorf("parameter 'oauthConfig' cannot be zero-initialized") - } - return nil -} - -// NewServicePrincipalTokenWithSecret create a ServicePrincipalToken using the supplied ServicePrincipalSecret implementation. -func NewServicePrincipalTokenWithSecret(oauthConfig OAuthConfig, id string, resource string, secret ServicePrincipalSecret, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(id, "id"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if secret == nil { - return nil, fmt.Errorf("parameter 'secret' cannot be nil") - } - spt := &ServicePrincipalToken{ - inner: servicePrincipalToken{ - Token: newToken(), - OauthConfig: oauthConfig, - Secret: secret, - ClientID: id, - Resource: resource, - AutoRefresh: true, - RefreshWithin: defaultRefresh, - }, - refreshLock: &sync.RWMutex{}, - sender: sender(), - refreshCallbacks: callbacks, - } - return spt, nil -} - -// NewServicePrincipalTokenFromManualToken creates a ServicePrincipalToken using the supplied token -func NewServicePrincipalTokenFromManualToken(oauthConfig OAuthConfig, clientID string, resource string, token Token, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if token.IsZero() { - return nil, fmt.Errorf("parameter 'token' cannot be zero-initialized") - } - spt, err := NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalNoSecret{}, - callbacks...) - if err != nil { - return nil, err - } - - spt.inner.Token = token - - return spt, nil -} - -// NewServicePrincipalTokenFromManualTokenSecret creates a ServicePrincipalToken using the supplied token and secret -func NewServicePrincipalTokenFromManualTokenSecret(oauthConfig OAuthConfig, clientID string, resource string, token Token, secret ServicePrincipalSecret, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if secret == nil { - return nil, fmt.Errorf("parameter 'secret' cannot be nil") - } - if token.IsZero() { - return nil, fmt.Errorf("parameter 'token' cannot be zero-initialized") - } - spt, err := NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - secret, - callbacks...) - if err != nil { - return nil, err - } - - spt.inner.Token = token - - return spt, nil -} - -// NewServicePrincipalToken creates a ServicePrincipalToken from the supplied Service Principal -// credentials scoped to the named resource. -func NewServicePrincipalToken(oauthConfig OAuthConfig, clientID string, secret string, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - 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 - } - return NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalTokenSecret{ - ClientSecret: secret, - }, - callbacks..., - ) -} - -// NewServicePrincipalTokenFromCertificate creates a ServicePrincipalToken from the supplied pkcs12 bytes. -func NewServicePrincipalTokenFromCertificate(oauthConfig OAuthConfig, clientID string, certificate *x509.Certificate, privateKey *rsa.PrivateKey, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if certificate == nil { - return nil, fmt.Errorf("parameter 'certificate' cannot be nil") - } - if privateKey == nil { - return nil, fmt.Errorf("parameter 'privateKey' cannot be nil") - } - return NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalCertificateSecret{ - PrivateKey: privateKey, - Certificate: certificate, - }, - callbacks..., - ) -} - -// NewServicePrincipalTokenFromUsernamePassword creates a ServicePrincipalToken from the username and password. -func NewServicePrincipalTokenFromUsernamePassword(oauthConfig OAuthConfig, clientID string, username string, password string, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(username, "username"); err != nil { - return nil, err - } - if err := validateStringParam(password, "password"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - return NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalUsernamePasswordSecret{ - Username: username, - Password: password, - }, - callbacks..., - ) -} - -// NewServicePrincipalTokenFromAuthorizationCode creates a ServicePrincipalToken from the -func NewServicePrincipalTokenFromAuthorizationCode(oauthConfig OAuthConfig, clientID string, clientSecret string, authorizationCode string, redirectURI string, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(clientSecret, "clientSecret"); err != nil { - return nil, err - } - if err := validateStringParam(authorizationCode, "authorizationCode"); err != nil { - return nil, err - } - if err := validateStringParam(redirectURI, "redirectURI"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - - return NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalAuthorizationCodeSecret{ - ClientSecret: clientSecret, - AuthorizationCode: authorizationCode, - RedirectURI: redirectURI, - }, - callbacks..., - ) -} - -// NewServicePrincipalTokenFromFederatedToken creates a ServicePrincipalToken from the supplied federated OIDC JWT. -func NewServicePrincipalTokenFromFederatedToken(oauthConfig OAuthConfig, clientID string, jwt string, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateOAuthConfig(oauthConfig); err != nil { - return nil, err - } - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if jwt == "" { - return nil, fmt.Errorf("parameter 'jwt' cannot be empty") - } - return NewServicePrincipalTokenWithSecret( - oauthConfig, - clientID, - resource, - &ServicePrincipalFederatedSecret{ - jwt: jwt, - }, - callbacks..., - ) -} - -type msiType int - -const ( - msiTypeUnavailable msiType = iota - msiTypeAppServiceV20170901 - msiTypeCloudShell - msiTypeIMDS -) - -func (m msiType) String() string { - switch m { - case msiTypeAppServiceV20170901: - return "AppServiceV20170901" - case msiTypeCloudShell: - return "CloudShell" - case msiTypeIMDS: - return "IMDS" - default: - return fmt.Sprintf("unhandled MSI type %d", m) - } -} - -// returns the MSI type and endpoint, or an error -func getMSIType() (msiType, string, error) { - if endpointEnvVar := os.Getenv(msiEndpointEnv); endpointEnvVar != "" { - // if the env var MSI_ENDPOINT is set - if secretEnvVar := os.Getenv(msiSecretEnv); secretEnvVar != "" { - // if BOTH the env vars MSI_ENDPOINT and MSI_SECRET are set the msiType is AppService - return msiTypeAppServiceV20170901, endpointEnvVar, nil - } - // if ONLY the env var MSI_ENDPOINT is set the msiType is CloudShell - return msiTypeCloudShell, endpointEnvVar, nil - } - // if MSI_ENDPOINT is NOT set assume the msiType is IMDS - return msiTypeIMDS, msiEndpoint, nil -} - -// GetMSIVMEndpoint gets the MSI endpoint on Virtual Machines. -// NOTE: this always returns the IMDS endpoint, it does not work for app services or cloud shell. -// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint. -func GetMSIVMEndpoint() (string, error) { - return msiEndpoint, nil -} - -// GetMSIAppServiceEndpoint get the MSI endpoint for App Service and Functions. -// It will return an error when not running in an app service/functions environment. -// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint. -func GetMSIAppServiceEndpoint() (string, error) { - msiType, endpoint, err := getMSIType() - if err != nil { - return "", err - } - switch msiType { - case msiTypeAppServiceV20170901: - return endpoint, nil - default: - return "", fmt.Errorf("%s is not app service environment", msiType) - } -} - -// GetMSIEndpoint get the appropriate MSI endpoint depending on the runtime environment -// Deprecated: NewServicePrincipalTokenFromMSI() and variants will automatically detect the endpoint. -func GetMSIEndpoint() (string, error) { - _, endpoint, err := getMSIType() - return endpoint, err -} - -// NewServicePrincipalTokenFromMSI creates a ServicePrincipalToken via the MSI VM Extension. -// It will use the system assigned identity when creating the token. -// msiEndpoint - empty string, or pass a non-empty string to override the default value. -// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead. -func NewServicePrincipalTokenFromMSI(msiEndpoint, resource string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", "", callbacks...) -} - -// NewServicePrincipalTokenFromMSIWithUserAssignedID creates a ServicePrincipalToken via the MSI VM Extension. -// It will use the clientID of specified user assigned identity when creating the token. -// msiEndpoint - empty string, or pass a non-empty string to override the default value. -// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead. -func NewServicePrincipalTokenFromMSIWithUserAssignedID(msiEndpoint, resource string, userAssignedID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateStringParam(userAssignedID, "userAssignedID"); err != nil { - return nil, err - } - return newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, "", callbacks...) -} - -// NewServicePrincipalTokenFromMSIWithIdentityResourceID creates a ServicePrincipalToken via the MSI VM Extension. -// It will use the azure resource id of user assigned identity when creating the token. -// msiEndpoint - empty string, or pass a non-empty string to override the default value. -// Deprecated: use NewServicePrincipalTokenFromManagedIdentity() instead. -func NewServicePrincipalTokenFromMSIWithIdentityResourceID(msiEndpoint, resource string, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateStringParam(identityResourceID, "identityResourceID"); err != nil { - return nil, err - } - return newServicePrincipalTokenFromMSI(msiEndpoint, resource, "", identityResourceID, callbacks...) -} - -// ManagedIdentityOptions contains optional values for configuring managed identity authentication. -type ManagedIdentityOptions struct { - // ClientID is the user-assigned identity to use during authentication. - // It is mutually exclusive with IdentityResourceID. - ClientID string - - // IdentityResourceID is the resource ID of the user-assigned identity to use during authentication. - // It is mutually exclusive with ClientID. - IdentityResourceID string -} - -// NewServicePrincipalTokenFromManagedIdentity creates a ServicePrincipalToken using a managed identity. -// It supports the following managed identity environments. -// - App Service Environment (API version 2017-09-01 only) -// - Cloud shell -// - IMDS with a system or user assigned identity -func NewServicePrincipalTokenFromManagedIdentity(resource string, options *ManagedIdentityOptions, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if options == nil { - options = &ManagedIdentityOptions{} - } - return newServicePrincipalTokenFromMSI("", resource, options.ClientID, options.IdentityResourceID, callbacks...) -} - -func newServicePrincipalTokenFromMSI(msiEndpoint, resource, userAssignedID, identityResourceID string, callbacks ...TokenRefreshCallback) (*ServicePrincipalToken, error) { - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if userAssignedID != "" && identityResourceID != "" { - return nil, errors.New("cannot specify userAssignedID and identityResourceID") - } - msiType, endpoint, err := getMSIType() - if err != nil { - logger.Instance.Writef(logger.LogError, "Error determining managed identity environment: %v\n", err) - return nil, err - } - logger.Instance.Writef(logger.LogInfo, "Managed identity environment is %s, endpoint is %s\n", msiType, endpoint) - if msiEndpoint != "" { - endpoint = msiEndpoint - logger.Instance.Writef(logger.LogInfo, "Managed identity custom endpoint is %s\n", endpoint) - } - msiEndpointURL, err := url.Parse(endpoint) - if err != nil { - return nil, err - } - // cloud shell sends its data in the request body - if msiType != msiTypeCloudShell { - v := url.Values{} - v.Set("resource", resource) - clientIDParam := "client_id" - switch msiType { - case msiTypeAppServiceV20170901: - clientIDParam = "clientid" - v.Set("api-version", appServiceAPIVersion2017) - break - case msiTypeIMDS: - v.Set("api-version", msiAPIVersion) - } - if userAssignedID != "" { - v.Set(clientIDParam, userAssignedID) - } else if identityResourceID != "" { - v.Set("mi_res_id", identityResourceID) - } - msiEndpointURL.RawQuery = v.Encode() - } - - spt := &ServicePrincipalToken{ - inner: servicePrincipalToken{ - Token: newToken(), - OauthConfig: OAuthConfig{ - TokenEndpoint: *msiEndpointURL, - }, - Secret: &ServicePrincipalMSISecret{ - msiType: msiType, - clientResourceID: identityResourceID, - }, - Resource: resource, - AutoRefresh: true, - RefreshWithin: defaultRefresh, - ClientID: userAssignedID, - }, - refreshLock: &sync.RWMutex{}, - sender: sender(), - refreshCallbacks: callbacks, - MaxMSIRefreshAttempts: defaultMaxMSIRefreshAttempts, - } - - return spt, nil -} - -// internal type that implements TokenRefreshError -type tokenRefreshError struct { - message string - resp *http.Response -} - -// Error implements the error interface which is part of the TokenRefreshError interface. -func (tre tokenRefreshError) Error() string { - return tre.message -} - -// Response implements the TokenRefreshError interface, it returns the raw HTTP response from the refresh operation. -func (tre tokenRefreshError) Response() *http.Response { - return tre.resp -} - -func newTokenRefreshError(message string, resp *http.Response) TokenRefreshError { - return tokenRefreshError{message: message, resp: resp} -} - -// EnsureFresh 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 (spt *ServicePrincipalToken) EnsureFresh() error { - return spt.EnsureFreshWithContext(context.Background()) -} - -// 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 (spt *ServicePrincipalToken) EnsureFreshWithContext(ctx context.Context) error { - // must take the read lock when initially checking the token's expiration - if spt.inner.AutoRefresh && spt.Token().WillExpireIn(spt.inner.RefreshWithin) { - // take the write lock then check again to see if the token was already refreshed - spt.refreshLock.Lock() - defer spt.refreshLock.Unlock() - if spt.inner.Token.WillExpireIn(spt.inner.RefreshWithin) { - return spt.refreshInternal(ctx, spt.inner.Resource) - } - } - return nil -} - -// InvokeRefreshCallbacks calls any TokenRefreshCallbacks that were added to the SPT during initialization -func (spt *ServicePrincipalToken) InvokeRefreshCallbacks(token Token) error { - if spt.refreshCallbacks != nil { - for _, callback := range spt.refreshCallbacks { - err := callback(spt.inner.Token) - if err != nil { - return fmt.Errorf("adal: TokenRefreshCallback handler failed. Error = '%v'", err) - } - } - } - return nil -} - -// Refresh obtains a fresh token for the Service Principal. -// This method is safe for concurrent use. -func (spt *ServicePrincipalToken) Refresh() error { - return spt.RefreshWithContext(context.Background()) -} - -// RefreshWithContext obtains a fresh token for the Service Principal. -// This method is safe for concurrent use. -func (spt *ServicePrincipalToken) RefreshWithContext(ctx context.Context) error { - spt.refreshLock.Lock() - defer spt.refreshLock.Unlock() - return spt.refreshInternal(ctx, spt.inner.Resource) -} - -// RefreshExchange refreshes the token, but for a different resource. -// This method is safe for concurrent use. -func (spt *ServicePrincipalToken) RefreshExchange(resource string) error { - return spt.RefreshExchangeWithContext(context.Background(), resource) -} - -// RefreshExchangeWithContext refreshes the token, but for a different resource. -// This method is safe for concurrent use. -func (spt *ServicePrincipalToken) RefreshExchangeWithContext(ctx context.Context, resource string) error { - spt.refreshLock.Lock() - defer spt.refreshLock.Unlock() - return spt.refreshInternal(ctx, resource) -} - -func (spt *ServicePrincipalToken) getGrantType() string { - switch spt.inner.Secret.(type) { - case *ServicePrincipalUsernamePasswordSecret: - return OAuthGrantTypeUserPass - case *ServicePrincipalAuthorizationCodeSecret: - return OAuthGrantTypeAuthorizationCode - default: - return OAuthGrantTypeClientCredentials - } -} - -func (spt *ServicePrincipalToken) refreshInternal(ctx context.Context, resource string) error { - if spt.customRefreshFunc != nil { - token, err := spt.customRefreshFunc(ctx, resource) - if err != nil { - return err - } - spt.inner.Token = *token - return spt.InvokeRefreshCallbacks(spt.inner.Token) - } - req, err := http.NewRequest(http.MethodPost, spt.inner.OauthConfig.TokenEndpoint.String(), nil) - if err != nil { - return fmt.Errorf("adal: Failed to build the refresh request. Error = '%v'", err) - } - req.Header.Add("User-Agent", UserAgent()) - req = req.WithContext(ctx) - var resp *http.Response - authBodyFilter := func(b []byte) []byte { - if logger.Level() != logger.LogAuth { - return []byte("**REDACTED** authentication body") - } - return b - } - if msiSecret, ok := spt.inner.Secret.(*ServicePrincipalMSISecret); ok { - switch msiSecret.msiType { - case msiTypeAppServiceV20170901: - req.Method = http.MethodGet - req.Header.Set("secret", os.Getenv(msiSecretEnv)) - break - case msiTypeCloudShell: - req.Header.Set("Metadata", "true") - data := url.Values{} - data.Set("resource", spt.inner.Resource) - if spt.inner.ClientID != "" { - data.Set("client_id", spt.inner.ClientID) - } else if msiSecret.clientResourceID != "" { - data.Set("msi_res_id", msiSecret.clientResourceID) - } - req.Body = ioutil.NopCloser(strings.NewReader(data.Encode())) - req.Header.Set("Content-Type", "application/x-www-form-urlencoded") - break - case msiTypeIMDS: - req.Method = http.MethodGet - req.Header.Set("Metadata", "true") - break - } - logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter}) - resp, err = retryForIMDS(spt.sender, req, spt.MaxMSIRefreshAttempts) - } else { - v := url.Values{} - v.Set("client_id", spt.inner.ClientID) - v.Set("resource", resource) - - if spt.inner.Token.RefreshToken != "" { - v.Set("grant_type", OAuthGrantTypeRefreshToken) - v.Set("refresh_token", spt.inner.Token.RefreshToken) - // web apps must specify client_secret when refreshing tokens - // see https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-protocols-oauth-code#refreshing-the-access-tokens - if spt.getGrantType() == OAuthGrantTypeAuthorizationCode { - err := spt.inner.Secret.SetAuthenticationValues(spt, &v) - if err != nil { - return err - } - } - } else { - v.Set("grant_type", spt.getGrantType()) - err := spt.inner.Secret.SetAuthenticationValues(spt, &v) - if err != nil { - return err - } - } - - s := v.Encode() - body := ioutil.NopCloser(strings.NewReader(s)) - req.ContentLength = int64(len(s)) - req.Header.Set(contentType, mimeTypeFormPost) - req.Body = body - logger.Instance.WriteRequest(req, logger.Filter{Body: authBodyFilter}) - resp, err = spt.sender.Do(req) - } - - // don't return a TokenRefreshError here; this will allow retry logic to apply - if err != nil { - return fmt.Errorf("adal: Failed to execute the refresh request. Error = '%v'", err) - } else if resp == nil { - return fmt.Errorf("adal: received nil response and error") - } - - logger.Instance.WriteResponse(resp, logger.Filter{Body: authBodyFilter}) - defer resp.Body.Close() - rb, err := ioutil.ReadAll(resp.Body) - - if resp.StatusCode != http.StatusOK { - if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Failed reading response body: %v Endpoint %s", resp.StatusCode, err, req.URL.String()), resp) - } - return newTokenRefreshError(fmt.Sprintf("adal: Refresh request failed. Status Code = '%d'. Response body: %s Endpoint %s", resp.StatusCode, string(rb), req.URL.String()), resp) - } - - // for the following error cases don't return a TokenRefreshError. the operation succeeded - // but some transient failure happened during deserialization. by returning a generic error - // the retry logic will kick in (we don't retry on TokenRefreshError). - - if err != nil { - return fmt.Errorf("adal: Failed to read a new service principal token during refresh. Error = '%v'", err) - } - if len(strings.Trim(string(rb), " ")) == 0 { - return fmt.Errorf("adal: Empty service principal token received during refresh") - } - token := struct { - AccessToken string `json:"access_token"` - RefreshToken string `json:"refresh_token"` - - // AAD returns expires_in as a string, ADFS returns it as an int - ExpiresIn json.Number `json:"expires_in"` - // expires_on can be in three formats, a UTC time stamp, or the number of seconds as a string *or* int. - ExpiresOn interface{} `json:"expires_on"` - NotBefore json.Number `json:"not_before"` - - Resource string `json:"resource"` - Type string `json:"token_type"` - }{} - // return a TokenRefreshError in the follow error cases as the token is in an unexpected format - err = json.Unmarshal(rb, &token) - if err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: Failed to unmarshal the service principal token during refresh. Error = '%v' JSON = '%s'", err, string(rb)), resp) - } - expiresOn := json.Number("") - // ADFS doesn't include the expires_on field - if token.ExpiresOn != nil { - if expiresOn, err = parseExpiresOn(token.ExpiresOn); err != nil { - return newTokenRefreshError(fmt.Sprintf("adal: failed to parse expires_on: %v value '%s'", err, token.ExpiresOn), resp) - } - } - spt.inner.Token.AccessToken = token.AccessToken - spt.inner.Token.RefreshToken = token.RefreshToken - spt.inner.Token.ExpiresIn = token.ExpiresIn - spt.inner.Token.ExpiresOn = expiresOn - spt.inner.Token.NotBefore = token.NotBefore - spt.inner.Token.Resource = token.Resource - spt.inner.Token.Type = token.Type - - return spt.InvokeRefreshCallbacks(spt.inner.Token) -} - -// converts expires_on to the number of seconds -func parseExpiresOn(s interface{}) (json.Number, error) { - // the JSON unmarshaler treats JSON numbers unmarshaled into an interface{} as float64 - asFloat64, ok := s.(float64) - if ok { - // this is the number of seconds as int case - return json.Number(strconv.FormatInt(int64(asFloat64), 10)), nil - } - asStr, ok := s.(string) - if !ok { - return "", fmt.Errorf("unexpected expires_on type %T", s) - } - // convert the expiration date to the number of seconds from the unix epoch - timeToDuration := func(t time.Time) json.Number { - return json.Number(strconv.FormatInt(t.UTC().Unix(), 10)) - } - if _, err := json.Number(asStr).Int64(); err == nil { - // this is the number of seconds case, no conversion required - return json.Number(asStr), nil - } else if eo, err := time.Parse(expiresOnDateFormatPM, asStr); err == nil { - return timeToDuration(eo), nil - } else if eo, err := time.Parse(expiresOnDateFormat, asStr); err == nil { - return timeToDuration(eo), nil - } else { - // unknown format - return json.Number(""), err - } -} - -// retry logic specific to retrieving a token from the IMDS endpoint -func retryForIMDS(sender Sender, req *http.Request, maxAttempts int) (resp *http.Response, err error) { - // copied from client.go due to circular dependency - retries := []int{ - http.StatusRequestTimeout, // 408 - http.StatusTooManyRequests, // 429 - http.StatusInternalServerError, // 500 - http.StatusBadGateway, // 502 - http.StatusServiceUnavailable, // 503 - http.StatusGatewayTimeout, // 504 - } - // extra retry status codes specific to IMDS - retries = append(retries, - http.StatusNotFound, - http.StatusGone, - // all remaining 5xx - http.StatusNotImplemented, - http.StatusHTTPVersionNotSupported, - http.StatusVariantAlsoNegotiates, - http.StatusInsufficientStorage, - http.StatusLoopDetected, - http.StatusNotExtended, - http.StatusNetworkAuthenticationRequired) - - // see https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/how-to-use-vm-token#retry-guidance - - const maxDelay time.Duration = 60 * time.Second - - attempt := 0 - delay := time.Duration(0) - - // maxAttempts is user-specified, ensure that its value is greater than zero else no request will be made - if maxAttempts < 1 { - maxAttempts = defaultMaxMSIRefreshAttempts - } - - for attempt < maxAttempts { - if resp != nil && resp.Body != nil { - io.Copy(ioutil.Discard, resp.Body) - resp.Body.Close() - } - resp, err = sender.Do(req) - // we want to retry if err is not nil or the status code is in the list of retry codes - if err == nil && !responseHasStatusCode(resp, retries...) { - return - } - - // perform exponential backoff with a cap. - // must increment attempt before calculating delay. - attempt++ - // the base value of 2 is the "delta backoff" as specified in the guidance doc - delay += (time.Duration(math.Pow(2, float64(attempt))) * time.Second) - if delay > maxDelay { - delay = maxDelay - } - - select { - case <-time.After(delay): - // intentionally left blank - case <-req.Context().Done(): - err = req.Context().Err() - return - } - } - return -} - -func responseHasStatusCode(resp *http.Response, codes ...int) bool { - if resp != nil { - for _, i := range codes { - if i == resp.StatusCode { - return true - } - } - } - return false -} - -// SetAutoRefresh enables or disables automatic refreshing of stale tokens. -func (spt *ServicePrincipalToken) SetAutoRefresh(autoRefresh bool) { - spt.inner.AutoRefresh = autoRefresh -} - -// SetRefreshWithin sets the interval within which if the token will expire, EnsureFresh will -// refresh the token. -func (spt *ServicePrincipalToken) SetRefreshWithin(d time.Duration) { - spt.inner.RefreshWithin = d - return -} - -// SetSender sets the http.Client used when obtaining the Service Principal token. An -// undecorated http.Client is used by default. -func (spt *ServicePrincipalToken) SetSender(s Sender) { spt.sender = s } - -// OAuthToken implements the OAuthTokenProvider interface. It returns the current access token. -func (spt *ServicePrincipalToken) OAuthToken() string { - spt.refreshLock.RLock() - defer spt.refreshLock.RUnlock() - return spt.inner.Token.OAuthToken() -} - -// Token returns a copy of the current token. -func (spt *ServicePrincipalToken) Token() Token { - spt.refreshLock.RLock() - 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 -} - -// 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 -} - -// NewMultiTenantServicePrincipalTokenFromCertificate creates a new MultiTenantServicePrincipalToken with the specified certificate credentials and resource. -func NewMultiTenantServicePrincipalTokenFromCertificate(multiTenantCfg MultiTenantOAuthConfig, clientID string, certificate *x509.Certificate, privateKey *rsa.PrivateKey, resource string) (*MultiTenantServicePrincipalToken, error) { - if err := validateStringParam(clientID, "clientID"); err != nil { - return nil, err - } - if err := validateStringParam(resource, "resource"); err != nil { - return nil, err - } - if certificate == nil { - return nil, fmt.Errorf("parameter 'certificate' cannot be nil") - } - if privateKey == nil { - return nil, fmt.Errorf("parameter 'privateKey' cannot be nil") - } - auxTenants := multiTenantCfg.AuxiliaryTenants() - m := MultiTenantServicePrincipalToken{ - AuxiliaryTokens: make([]*ServicePrincipalToken, len(auxTenants)), - } - primary, err := NewServicePrincipalTokenWithSecret( - *multiTenantCfg.PrimaryTenant(), - clientID, - resource, - &ServicePrincipalCertificateSecret{ - PrivateKey: privateKey, - Certificate: certificate, - }, - ) - 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 := NewServicePrincipalTokenWithSecret( - *auxTenants[i], - clientID, - resource, - &ServicePrincipalCertificateSecret{ - PrivateKey: privateKey, - Certificate: certificate, - }, - ) - if err != nil { - return nil, fmt.Errorf("failed to create SPT for auxiliary tenant: %v", err) - } - m.AuxiliaryTokens[i] = aux - } - return &m, nil -} - -// MSIAvailable returns true if the MSI endpoint is available for authentication. -func MSIAvailable(ctx context.Context, s Sender) bool { - msiType, _, err := getMSIType() - - if err != nil { - return false - } - - if msiType != msiTypeIMDS { - return true - } - - if s == nil { - s = sender() - } - - resp, err := getMSIEndpoint(ctx, s) - - if err == nil { - resp.Body.Close() - } - - return err == nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go deleted file mode 100644 index 89190a4213..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token_1.13.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build go1.13 -// +build go1.13 - -// 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. - -package adal - -import ( - "context" - "fmt" - "net/http" - "time" -) - -func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) { - tempCtx, cancel := context.WithTimeout(ctx, 2*time.Second) - defer cancel() - // http.NewRequestWithContext() was added in Go 1.13 - req, _ := http.NewRequestWithContext(tempCtx, http.MethodGet, msiEndpoint, nil) - q := req.URL.Query() - q.Add("api-version", msiAPIVersion) - req.URL.RawQuery = q.Encode() - return sender.Do(req) -} - -// 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: %w", err) - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.EnsureFreshWithContext(ctx); err != nil { - return fmt.Errorf("failed to refresh auxiliary token: %w", 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: %w", err) - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.RefreshWithContext(ctx); err != nil { - return fmt.Errorf("failed to refresh auxiliary token: %w", 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: %w", err) - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil { - return fmt.Errorf("failed to refresh auxiliary token: %w", err) - } - } - return nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go b/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go deleted file mode 100644 index 27ec4efad7..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/token_legacy.go +++ /dev/null @@ -1,75 +0,0 @@ -//go:build !go1.13 -// +build !go1.13 - -// 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. - -package adal - -import ( - "context" - "net/http" - "time" -) - -func getMSIEndpoint(ctx context.Context, sender Sender) (*http.Response, error) { - tempCtx, cancel := context.WithTimeout(ctx, 2*time.Second) - defer cancel() - req, _ := http.NewRequest(http.MethodGet, msiEndpoint, nil) - req = req.WithContext(tempCtx) - q := req.URL.Query() - q.Add("api-version", msiAPIVersion) - req.URL.RawQuery = q.Encode() - return sender.Do(req) -} - -// 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 err - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.EnsureFreshWithContext(ctx); err != nil { - return 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 err - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.RefreshWithContext(ctx); err != nil { - return 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 err - } - for _, aux := range mt.AuxiliaryTokens { - if err := aux.RefreshExchangeWithContext(ctx, resource); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/adal/version.go b/vendor/github.com/Azure/go-autorest/autorest/adal/version.go deleted file mode 100644 index c867b34843..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/adal/version.go +++ /dev/null @@ -1,45 +0,0 @@ -package adal - -import ( - "fmt" - "runtime" -) - -// 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. - -const number = "v1.0.0" - -var ( - ua = fmt.Sprintf("Go/%s (%s-%s) go-autorest/adal/%s", - runtime.Version(), - runtime.GOARCH, - runtime.GOOS, - number, - ) -) - -// UserAgent returns a string containing the Go version, system architecture and OS, and the adal version. -func UserAgent() string { - return ua -} - -// AddToUserAgent adds an extension to the current user agent -func AddToUserAgent(extension string) error { - if extension != "" { - ua = fmt.Sprintf("%s %s", ua, extension) - return nil - } - return fmt.Errorf("Extension was empty, User Agent remained as '%s'", ua) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization.go b/vendor/github.com/Azure/go-autorest/autorest/authorization.go deleted file mode 100644 index 1226c41115..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization.go +++ /dev/null @@ -1,353 +0,0 @@ -package autorest - -// 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. - -import ( - "crypto/tls" - "encoding/base64" - "fmt" - "net/http" - "net/url" - "strings" - - "github.com/Azure/go-autorest/autorest/adal" -) - -const ( - bearerChallengeHeader = "Www-Authenticate" - bearer = "Bearer" - tenantID = "tenantID" - apiKeyAuthorizerHeader = "Ocp-Apim-Subscription-Key" - bingAPISdkHeader = "X-BingApis-SDK-Client" - golangBingAPISdkHeaderValue = "Go-SDK" - authorization = "Authorization" - basic = "Basic" -) - -// Authorizer is the interface that provides a PrepareDecorator used to supply request -// authorization. Most often, the Authorizer decorator runs last so it has access to the full -// state of the formed HTTP request. -type Authorizer interface { - WithAuthorization() PrepareDecorator -} - -// NullAuthorizer implements a default, "do nothing" Authorizer. -type NullAuthorizer struct{} - -// WithAuthorization returns a PrepareDecorator that does nothing. -func (na NullAuthorizer) WithAuthorization() PrepareDecorator { - return WithNothing() -} - -// APIKeyAuthorizer implements API Key authorization. -type APIKeyAuthorizer struct { - headers map[string]interface{} - queryParameters map[string]interface{} -} - -// NewAPIKeyAuthorizerWithHeaders creates an ApiKeyAuthorizer with headers. -func NewAPIKeyAuthorizerWithHeaders(headers map[string]interface{}) *APIKeyAuthorizer { - return NewAPIKeyAuthorizer(headers, nil) -} - -// NewAPIKeyAuthorizerWithQueryParameters creates an ApiKeyAuthorizer with query parameters. -func NewAPIKeyAuthorizerWithQueryParameters(queryParameters map[string]interface{}) *APIKeyAuthorizer { - return NewAPIKeyAuthorizer(nil, queryParameters) -} - -// NewAPIKeyAuthorizer creates an ApiKeyAuthorizer with headers. -func NewAPIKeyAuthorizer(headers map[string]interface{}, queryParameters map[string]interface{}) *APIKeyAuthorizer { - return &APIKeyAuthorizer{headers: headers, queryParameters: queryParameters} -} - -// WithAuthorization returns a PrepareDecorator that adds an HTTP headers and Query Parameters. -func (aka *APIKeyAuthorizer) WithAuthorization() PrepareDecorator { - return func(p Preparer) Preparer { - return DecoratePreparer(p, WithHeaders(aka.headers), WithQueryParameters(aka.queryParameters)) - } -} - -// CognitiveServicesAuthorizer implements authorization for Cognitive Services. -type CognitiveServicesAuthorizer struct { - subscriptionKey string -} - -// NewCognitiveServicesAuthorizer is -func NewCognitiveServicesAuthorizer(subscriptionKey string) *CognitiveServicesAuthorizer { - return &CognitiveServicesAuthorizer{subscriptionKey: subscriptionKey} -} - -// WithAuthorization is -func (csa *CognitiveServicesAuthorizer) WithAuthorization() PrepareDecorator { - headers := make(map[string]interface{}) - headers[apiKeyAuthorizerHeader] = csa.subscriptionKey - headers[bingAPISdkHeader] = golangBingAPISdkHeaderValue - - return NewAPIKeyAuthorizerWithHeaders(headers).WithAuthorization() -} - -// BearerAuthorizer implements the bearer authorization -type BearerAuthorizer struct { - tokenProvider adal.OAuthTokenProvider -} - -// NewBearerAuthorizer crates a BearerAuthorizer using the given token provider -func NewBearerAuthorizer(tp adal.OAuthTokenProvider) *BearerAuthorizer { - return &BearerAuthorizer{tokenProvider: tp} -} - -// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose -// value is "Bearer " followed by the token. -// -// By default, the token will be automatically refreshed through the Refresher interface. -func (ba *BearerAuthorizer) WithAuthorization() PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - // the ordering is important here, prefer RefresherWithContext if available - if refresher, ok := ba.tokenProvider.(adal.RefresherWithContext); ok { - err = refresher.EnsureFreshWithContext(r.Context()) - } else if refresher, ok := ba.tokenProvider.(adal.Refresher); ok { - err = refresher.EnsureFresh() - } - if err != nil { - var resp *http.Response - if tokError, ok := err.(adal.TokenRefreshError); ok { - resp = tokError.Response() - } - return r, NewErrorWithError(err, "azure.BearerAuthorizer", "WithAuthorization", resp, - "Failed to refresh the Token for request to %s", r.URL) - } - return Prepare(r, WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", ba.tokenProvider.OAuthToken()))) - } - return r, err - }) - } -} - -// TokenProvider returns OAuthTokenProvider so that it can be used for authorization outside the REST. -func (ba *BearerAuthorizer) TokenProvider() adal.OAuthTokenProvider { - return ba.tokenProvider -} - -// BearerAuthorizerCallbackFunc is the authentication callback signature. -type BearerAuthorizerCallbackFunc func(tenantID, resource string) (*BearerAuthorizer, error) - -// BearerAuthorizerCallback implements bearer authorization via a callback. -type BearerAuthorizerCallback struct { - sender Sender - callback BearerAuthorizerCallbackFunc -} - -// NewBearerAuthorizerCallback creates a bearer authorization callback. The callback -// is invoked when the HTTP request is submitted. -func NewBearerAuthorizerCallback(s Sender, callback BearerAuthorizerCallbackFunc) *BearerAuthorizerCallback { - if s == nil { - s = sender(tls.RenegotiateNever) - } - return &BearerAuthorizerCallback{sender: s, callback: callback} -} - -// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose value -// is "Bearer " followed by the token. The BearerAuthorizer is obtained via a user-supplied callback. -// -// By default, the token will be automatically refreshed through the Refresher interface. -func (bacb *BearerAuthorizerCallback) WithAuthorization() PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - // make a copy of the request and remove the body as it's not - // required and avoids us having to create a copy of it. - rCopy := *r - removeRequestBody(&rCopy) - - resp, err := bacb.sender.Do(&rCopy) - if err != nil { - return r, err - } - DrainResponseBody(resp) - if resp.StatusCode == 401 && hasBearerChallenge(resp.Header) { - bc, err := newBearerChallenge(resp.Header) - if err != nil { - return r, err - } - if bacb.callback != nil { - ba, err := bacb.callback(bc.values[tenantID], bc.values["resource"]) - if err != nil { - return r, err - } - return Prepare(r, ba.WithAuthorization()) - } - } - } - return r, err - }) - } -} - -// returns true if the HTTP response contains a bearer challenge -func hasBearerChallenge(header http.Header) bool { - authHeader := header.Get(bearerChallengeHeader) - if len(authHeader) == 0 || strings.Index(authHeader, bearer) < 0 { - return false - } - return true -} - -type bearerChallenge struct { - values map[string]string -} - -func newBearerChallenge(header http.Header) (bc bearerChallenge, err error) { - challenge := strings.TrimSpace(header.Get(bearerChallengeHeader)) - trimmedChallenge := challenge[len(bearer)+1:] - - // challenge is a set of key=value pairs that are comma delimited - pairs := strings.Split(trimmedChallenge, ",") - if len(pairs) < 1 { - err = fmt.Errorf("challenge '%s' contains no pairs", challenge) - return bc, err - } - - bc.values = make(map[string]string) - for i := range pairs { - trimmedPair := strings.TrimSpace(pairs[i]) - pair := strings.Split(trimmedPair, "=") - if len(pair) == 2 { - // remove the enclosing quotes - key := strings.Trim(pair[0], "\"") - value := strings.Trim(pair[1], "\"") - - switch key { - case "authorization", "authorization_uri": - // strip the tenant ID from the authorization URL - asURL, err := url.Parse(value) - if err != nil { - return bc, err - } - bc.values[tenantID] = asURL.Path[1:] - default: - bc.values[key] = value - } - } - } - - return bc, err -} - -// EventGridKeyAuthorizer implements authorization for event grid using key authentication. -type EventGridKeyAuthorizer struct { - topicKey string -} - -// NewEventGridKeyAuthorizer creates a new EventGridKeyAuthorizer -// with the specified topic key. -func NewEventGridKeyAuthorizer(topicKey string) EventGridKeyAuthorizer { - return EventGridKeyAuthorizer{topicKey: topicKey} -} - -// WithAuthorization returns a PrepareDecorator that adds the aeg-sas-key authentication header. -func (egta EventGridKeyAuthorizer) WithAuthorization() PrepareDecorator { - headers := map[string]interface{}{ - "aeg-sas-key": egta.topicKey, - } - return NewAPIKeyAuthorizerWithHeaders(headers).WithAuthorization() -} - -// BasicAuthorizer implements basic HTTP authorization by adding the Authorization HTTP header -// with the value "Basic " where is a base64-encoded username:password tuple. -type BasicAuthorizer struct { - userName string - password string -} - -// NewBasicAuthorizer creates a new BasicAuthorizer with the specified username and password. -func NewBasicAuthorizer(userName, password string) *BasicAuthorizer { - return &BasicAuthorizer{ - userName: userName, - password: password, - } -} - -// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose -// value is "Basic " followed by the base64-encoded username:password tuple. -func (ba *BasicAuthorizer) WithAuthorization() PrepareDecorator { - headers := make(map[string]interface{}) - headers[authorization] = basic + " " + base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", ba.userName, ba.password))) - - 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 NewMultiTenantBearerAuthorizer(tp) -} - -// MultiTenantBearerAuthorizer implements bearer authorization across multiple tenants. -type MultiTenantBearerAuthorizer struct { - tp adal.MultitenantOAuthTokenProvider -} - -// NewMultiTenantBearerAuthorizer creates a MultiTenantBearerAuthorizer using the given token provider. -func NewMultiTenantBearerAuthorizer(tp adal.MultitenantOAuthTokenProvider) *MultiTenantBearerAuthorizer { - return &MultiTenantBearerAuthorizer{tp: tp} -} - -// 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 *MultiTenantBearerAuthorizer) 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, ", "))) - }) - } -} - -// TokenProvider returns the underlying MultitenantOAuthTokenProvider for this authorizer. -func (mt *MultiTenantBearerAuthorizer) TokenProvider() adal.MultitenantOAuthTokenProvider { - return mt.tp -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go deleted file mode 100644 index 66501493bd..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_sas.go +++ /dev/null @@ -1,66 +0,0 @@ -package autorest - -// 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. - -import ( - "fmt" - "net/http" - "strings" -) - -// SASTokenAuthorizer implements an authorization for SAS Token Authentication -// this can be used for interaction with Blob Storage Endpoints -type SASTokenAuthorizer struct { - sasToken string -} - -// NewSASTokenAuthorizer creates a SASTokenAuthorizer using the given credentials -func NewSASTokenAuthorizer(sasToken string) (*SASTokenAuthorizer, error) { - if strings.TrimSpace(sasToken) == "" { - return nil, fmt.Errorf("sasToken cannot be empty") - } - - token := sasToken - if strings.HasPrefix(sasToken, "?") { - token = strings.TrimPrefix(sasToken, "?") - } - - return &SASTokenAuthorizer{ - sasToken: token, - }, nil -} - -// WithAuthorization returns a PrepareDecorator that adds a shared access signature token to the -// URI's query parameters. This can be used for the Blob, Queue, and File Services. -// -// See https://docs.microsoft.com/en-us/rest/api/storageservices/delegate-access-with-shared-access-signature -func (sas *SASTokenAuthorizer) 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 r.URL.RawQuery == "" { - r.URL.RawQuery = sas.sasToken - } else if !strings.Contains(r.URL.RawQuery, sas.sasToken) { - r.URL.RawQuery = fmt.Sprintf("%s&%s", r.URL.RawQuery, sas.sasToken) - } - - return Prepare(r) - }) - } -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go b/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go deleted file mode 100644 index c58d7b7b8d..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/authorization_storage.go +++ /dev/null @@ -1,307 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "encoding/base64" - "fmt" - "net/http" - "net/url" - "sort" - "strings" - "time" -) - -// SharedKeyType defines the enumeration for the various shared key types. -// See https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key for details on the shared key types. -type SharedKeyType string - -const ( - // SharedKey is used to authorize against blobs, files and queues services. - SharedKey SharedKeyType = "sharedKey" - - // SharedKeyForTable is used to authorize against the table service. - SharedKeyForTable SharedKeyType = "sharedKeyTable" - - // SharedKeyLite is used to authorize against blobs, files and queues services. It's provided for - // backwards compatibility with API versions before 2009-09-19. Prefer SharedKey instead. - SharedKeyLite SharedKeyType = "sharedKeyLite" - - // SharedKeyLiteForTable is used to authorize against the table service. It's provided for - // backwards compatibility with older table API versions. Prefer SharedKeyForTable instead. - SharedKeyLiteForTable SharedKeyType = "sharedKeyLiteTable" -) - -const ( - headerAccept = "Accept" - headerAcceptCharset = "Accept-Charset" - headerContentEncoding = "Content-Encoding" - headerContentLength = "Content-Length" - headerContentMD5 = "Content-MD5" - headerContentLanguage = "Content-Language" - headerIfModifiedSince = "If-Modified-Since" - headerIfMatch = "If-Match" - headerIfNoneMatch = "If-None-Match" - headerIfUnmodifiedSince = "If-Unmodified-Since" - headerDate = "Date" - headerXMSDate = "X-Ms-Date" - headerXMSVersion = "x-ms-version" - headerRange = "Range" -) - -const storageEmulatorAccountName = "devstoreaccount1" - -// SharedKeyAuthorizer implements an authorization for Shared Key -// this can be used for interaction with Blob, File and Queue Storage Endpoints -type SharedKeyAuthorizer struct { - accountName string - accountKey []byte - keyType SharedKeyType -} - -// NewSharedKeyAuthorizer creates a SharedKeyAuthorizer using the provided credentials and shared key type. -func NewSharedKeyAuthorizer(accountName, accountKey string, keyType SharedKeyType) (*SharedKeyAuthorizer, error) { - key, err := base64.StdEncoding.DecodeString(accountKey) - if err != nil { - return nil, fmt.Errorf("malformed storage account key: %v", err) - } - return &SharedKeyAuthorizer{ - accountName: accountName, - accountKey: key, - keyType: keyType, - }, nil -} - -// WithAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose -// value is " " followed by the computed key. -// This can be used for the Blob, Queue, and File Services -// -// from: https://docs.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key -// You may use Shared Key authorization to authorize a request made against the -// 2009-09-19 version and later of the Blob and Queue services, -// and version 2014-02-14 and later of the File services. -func (sk *SharedKeyAuthorizer) 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 - } - - sk, err := buildSharedKey(sk.accountName, sk.accountKey, r, sk.keyType) - if err != nil { - return r, err - } - return Prepare(r, WithHeader(headerAuthorization, sk)) - }) - } -} - -func buildSharedKey(accName string, accKey []byte, req *http.Request, keyType SharedKeyType) (string, error) { - canRes, err := buildCanonicalizedResource(accName, req.URL.String(), keyType) - if err != nil { - return "", err - } - - if req.Header == nil { - req.Header = http.Header{} - } - - // ensure date is set - if req.Header.Get(headerDate) == "" && req.Header.Get(headerXMSDate) == "" { - date := time.Now().UTC().Format(http.TimeFormat) - req.Header.Set(headerXMSDate, date) - } - canString, err := buildCanonicalizedString(req.Method, req.Header, canRes, keyType) - if err != nil { - return "", err - } - return createAuthorizationHeader(accName, accKey, canString, keyType), nil -} - -func buildCanonicalizedResource(accountName, uri string, keyType SharedKeyType) (string, error) { - errMsg := "buildCanonicalizedResource error: %s" - u, err := url.Parse(uri) - if err != nil { - return "", fmt.Errorf(errMsg, err.Error()) - } - - cr := bytes.NewBufferString("") - if accountName != storageEmulatorAccountName { - cr.WriteString("/") - cr.WriteString(getCanonicalizedAccountName(accountName)) - } - - if len(u.Path) > 0 { - // Any portion of the CanonicalizedResource string that is derived from - // the resource's URI should be encoded exactly as it is in the URI. - // -- https://msdn.microsoft.com/en-gb/library/azure/dd179428.aspx - cr.WriteString(u.EscapedPath()) - } else { - // a slash is required to indicate the root path - cr.WriteString("/") - } - - params, err := url.ParseQuery(u.RawQuery) - if err != nil { - return "", fmt.Errorf(errMsg, err.Error()) - } - - // See https://github.com/Azure/azure-storage-net/blob/master/Lib/Common/Core/Util/AuthenticationUtility.cs#L277 - if keyType == SharedKey { - if len(params) > 0 { - cr.WriteString("\n") - - keys := []string{} - for key := range params { - keys = append(keys, key) - } - sort.Strings(keys) - - completeParams := []string{} - for _, key := range keys { - if len(params[key]) > 1 { - sort.Strings(params[key]) - } - - completeParams = append(completeParams, fmt.Sprintf("%s:%s", key, strings.Join(params[key], ","))) - } - cr.WriteString(strings.Join(completeParams, "\n")) - } - } else { - // search for "comp" parameter, if exists then add it to canonicalizedresource - if v, ok := params["comp"]; ok { - cr.WriteString("?comp=" + v[0]) - } - } - - return cr.String(), nil -} - -func getCanonicalizedAccountName(accountName string) string { - // since we may be trying to access a secondary storage account, we need to - // remove the -secondary part of the storage name - return strings.TrimSuffix(accountName, "-secondary") -} - -func buildCanonicalizedString(verb string, headers http.Header, canonicalizedResource string, keyType SharedKeyType) (string, error) { - contentLength := headers.Get(headerContentLength) - if contentLength == "0" { - contentLength = "" - } - date := headers.Get(headerDate) - if v := headers.Get(headerXMSDate); v != "" { - if keyType == SharedKey || keyType == SharedKeyLite { - date = "" - } else { - date = v - } - } - var canString string - switch keyType { - case SharedKey: - canString = strings.Join([]string{ - verb, - headers.Get(headerContentEncoding), - headers.Get(headerContentLanguage), - contentLength, - headers.Get(headerContentMD5), - headers.Get(headerContentType), - date, - headers.Get(headerIfModifiedSince), - headers.Get(headerIfMatch), - headers.Get(headerIfNoneMatch), - headers.Get(headerIfUnmodifiedSince), - headers.Get(headerRange), - buildCanonicalizedHeader(headers), - canonicalizedResource, - }, "\n") - case SharedKeyForTable: - canString = strings.Join([]string{ - verb, - headers.Get(headerContentMD5), - headers.Get(headerContentType), - date, - canonicalizedResource, - }, "\n") - case SharedKeyLite: - canString = strings.Join([]string{ - verb, - headers.Get(headerContentMD5), - headers.Get(headerContentType), - date, - buildCanonicalizedHeader(headers), - canonicalizedResource, - }, "\n") - case SharedKeyLiteForTable: - canString = strings.Join([]string{ - date, - canonicalizedResource, - }, "\n") - default: - return "", fmt.Errorf("key type '%s' is not supported", keyType) - } - return canString, nil -} - -func buildCanonicalizedHeader(headers http.Header) string { - cm := make(map[string]string) - - for k := range headers { - headerName := strings.TrimSpace(strings.ToLower(k)) - if strings.HasPrefix(headerName, "x-ms-") { - cm[headerName] = headers.Get(k) - } - } - - if len(cm) == 0 { - return "" - } - - keys := []string{} - for key := range cm { - keys = append(keys, key) - } - - sort.Strings(keys) - - ch := bytes.NewBufferString("") - - for _, key := range keys { - ch.WriteString(key) - ch.WriteRune(':') - ch.WriteString(cm[key]) - ch.WriteRune('\n') - } - - return strings.TrimSuffix(ch.String(), "\n") -} - -func createAuthorizationHeader(accountName string, accountKey []byte, canonicalizedString string, keyType SharedKeyType) string { - h := hmac.New(sha256.New, accountKey) - h.Write([]byte(canonicalizedString)) - signature := base64.StdEncoding.EncodeToString(h.Sum(nil)) - var key string - switch keyType { - case SharedKey, SharedKeyForTable: - key = "SharedKey" - case SharedKeyLite, SharedKeyLiteForTable: - key = "SharedKeyLite" - } - return fmt.Sprintf("%s %s:%s", key, getCanonicalizedAccountName(accountName), signature) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/autorest.go b/vendor/github.com/Azure/go-autorest/autorest/autorest.go deleted file mode 100644 index 211c98d1ed..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/autorest.go +++ /dev/null @@ -1,150 +0,0 @@ -/* -Package autorest implements an HTTP request pipeline suitable for use across multiple go-routines -and provides the shared routines relied on by AutoRest (see https://github.com/Azure/autorest/) -generated Go code. - -The package breaks sending and responding to HTTP requests into three phases: Preparing, Sending, -and Responding. A typical pattern is: - - req, err := Prepare(&http.Request{}, - token.WithAuthorization()) - - resp, err := Send(req, - WithLogging(logger), - DoErrorIfStatusCode(http.StatusInternalServerError), - DoCloseIfError(), - DoRetryForAttempts(5, time.Second)) - - err = Respond(resp, - ByDiscardingBody(), - ByClosing()) - -Each phase relies on decorators to modify and / or manage processing. Decorators may first modify -and then pass the data along, pass the data first and then modify the result, or wrap themselves -around passing the data (such as a logger might do). Decorators run in the order provided. For -example, the following: - - req, err := Prepare(&http.Request{}, - WithBaseURL("https://microsoft.com/"), - WithPath("a"), - WithPath("b"), - WithPath("c")) - -will set the URL to: - - https://microsoft.com/a/b/c - -Preparers and Responders may be shared and re-used (assuming the underlying decorators support -sharing and re-use). Performant use is obtained by creating one or more Preparers and Responders -shared among multiple go-routines, and a single Sender shared among multiple sending go-routines, -all bound together by means of input / output channels. - -Decorators hold their passed state within a closure (such as the path components in the example -above). Be careful to share Preparers and Responders only in a context where such held state -applies. For example, it may not make sense to share a Preparer that applies a query string from a -fixed set of values. Similarly, sharing a Responder that reads the response body into a passed -struct (e.g., ByUnmarshallingJson) is likely incorrect. - -Lastly, the Swagger specification (https://swagger.io) that drives AutoRest -(https://github.com/Azure/autorest/) precisely defines two date forms: date and date-time. The -github.com/Azure/go-autorest/autorest/date package provides time.Time derivations to ensure -correct parsing and formatting. - -Errors raised by autorest objects and methods will conform to the autorest.Error interface. - -See the included examples for more detail. For details on the suggested use of this package by -generated clients, see the Client described below. -*/ -package autorest - -// 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. - -import ( - "context" - "net/http" - "time" -) - -const ( - // HeaderLocation specifies the HTTP Location header. - HeaderLocation = "Location" - - // HeaderRetryAfter specifies the HTTP Retry-After header. - HeaderRetryAfter = "Retry-After" -) - -// ResponseHasStatusCode returns true if the status code in the HTTP Response is in the passed set -// and false otherwise. -func ResponseHasStatusCode(resp *http.Response, codes ...int) bool { - if resp == nil { - return false - } - return containsInt(codes, resp.StatusCode) -} - -// GetLocation retrieves the URL from the Location header of the passed response. -func GetLocation(resp *http.Response) string { - return resp.Header.Get(HeaderLocation) -} - -// GetRetryAfter extracts the retry delay from the Retry-After header of the passed response. If -// the header is absent or is malformed, it will return the supplied default delay time.Duration. -func GetRetryAfter(resp *http.Response, defaultDelay time.Duration) time.Duration { - retry := resp.Header.Get(HeaderRetryAfter) - if retry == "" { - return defaultDelay - } - - d, err := time.ParseDuration(retry + "s") - if err != nil { - return defaultDelay - } - - return d -} - -// NewPollingRequest allocates and returns a new http.Request to poll for the passed response. -func NewPollingRequest(resp *http.Response, cancel <-chan struct{}) (*http.Request, error) { - location := GetLocation(resp) - if location == "" { - return nil, NewErrorWithResponse("autorest", "NewPollingRequest", resp, "Location header missing from response that requires polling") - } - - req, err := Prepare(&http.Request{Cancel: cancel}, - AsGet(), - WithBaseURL(location)) - if err != nil { - return nil, NewErrorWithError(err, "autorest", "NewPollingRequest", nil, "Failure creating poll request to %s", location) - } - - return req, nil -} - -// NewPollingRequestWithContext allocates and returns a new http.Request with the specified context to poll for the passed response. -func NewPollingRequestWithContext(ctx context.Context, resp *http.Response) (*http.Request, error) { - location := GetLocation(resp) - if location == "" { - return nil, NewErrorWithResponse("autorest", "NewPollingRequestWithContext", resp, "Location header missing from response that requires polling") - } - - req, err := Prepare((&http.Request{}).WithContext(ctx), - AsGet(), - WithBaseURL(location)) - if err != nil { - return nil, NewErrorWithError(err, "autorest", "NewPollingRequestWithContext", nil, "Failure creating poll request to %s", location) - } - - return req, nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go b/vendor/github.com/Azure/go-autorest/autorest/azure/async.go deleted file mode 100644 index f119b11d48..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/async.go +++ /dev/null @@ -1,995 +0,0 @@ -package azure - -// 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. - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "github.com/Azure/go-autorest/autorest" - "github.com/Azure/go-autorest/logger" - "github.com/Azure/go-autorest/tracing" -) - -const ( - headerAsyncOperation = "Azure-AsyncOperation" -) - -const ( - operationInProgress string = "InProgress" - operationCanceled string = "Canceled" - operationFailed string = "Failed" - operationSucceeded string = "Succeeded" -) - -var pollingCodes = [...]int{http.StatusNoContent, http.StatusAccepted, http.StatusCreated, http.StatusOK} - -// FutureAPI contains the set of methods on the Future type. -type FutureAPI interface { - // Response returns the last HTTP response. - Response() *http.Response - - // Status returns the last status message of the operation. - Status() string - - // PollingMethod returns the method used to monitor the status of the asynchronous operation. - PollingMethod() PollingMethodType - - // DoneWithContext queries the service to see if the operation has completed. - DoneWithContext(context.Context, autorest.Sender) (bool, error) - - // GetPollingDelay returns a duration the application should wait before checking - // the status of the asynchronous request and true; this value is returned from - // the service via the Retry-After response header. If the header wasn't returned - // then the function returns the zero-value time.Duration and false. - GetPollingDelay() (time.Duration, bool) - - // 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 - // the retry value defined in the client up to the maximum retry attempts. - // If no deadline is specified in the context then the client.PollingDuration will be - // used to determine if a default deadline should be used. - // If PollingDuration is greater than zero the value will be used as the context's timeout. - // If PollingDuration is zero then no default deadline will be used. - WaitForCompletionRef(context.Context, autorest.Client) error - - // MarshalJSON implements the json.Marshaler interface. - MarshalJSON() ([]byte, error) - - // MarshalJSON implements the json.Unmarshaler interface. - UnmarshalJSON([]byte) error - - // PollingURL returns the URL used for retrieving the status of the long-running operation. - PollingURL() string - - // GetResult should be called once polling has completed successfully. - // It makes the final GET call to retrieve the resultant payload. - GetResult(autorest.Sender) (*http.Response, error) -} - -var _ FutureAPI = (*Future)(nil) - -// 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 { - pt pollingTracker -} - -// NewFutureFromResponse returns a new Future object initialized -// with the initial response from an asynchronous operation. -func NewFutureFromResponse(resp *http.Response) (Future, error) { - pt, err := createPollingTracker(resp) - return Future{pt: pt}, err -} - -// Response returns the last HTTP response. -func (f Future) Response() *http.Response { - if f.pt == nil { - return nil - } - return f.pt.latestResponse() -} - -// Status returns the last status message of the operation. -func (f Future) Status() string { - if f.pt == nil { - return "" - } - return f.pt.pollingStatus() -} - -// PollingMethod returns the method used to monitor the status of the asynchronous operation. -func (f Future) PollingMethod() PollingMethodType { - if f.pt == nil { - return PollingUnknown - } - return f.pt.pollingMethod() -} - -// 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") - defer func() { - sc := -1 - resp := f.Response() - if resp != nil { - sc = resp.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - - if f.pt == nil { - return false, autorest.NewError("Future", "Done", "future is not initialized") - } - if f.pt.hasTerminated() { - return true, f.pt.pollingError() - } - if err := f.pt.pollForStatus(ctx, sender); err != nil { - return false, err - } - if err := f.pt.checkForErrors(); err != nil { - return f.pt.hasTerminated(), err - } - if err := f.pt.updatePollingState(f.pt.provisioningStateApplicable()); err != nil { - return false, err - } - if err := f.pt.initPollingMethod(); err != nil { - return false, err - } - if err := f.pt.updatePollingMethod(); err != nil { - return false, err - } - return f.pt.hasTerminated(), f.pt.pollingError() -} - -// GetPollingDelay returns a duration the application should wait before checking -// the status of the asynchronous request and true; this value is returned from -// the service via the Retry-After response header. If the header wasn't returned -// then the function returns the zero-value time.Duration and false. -func (f Future) GetPollingDelay() (time.Duration, bool) { - if f.pt == nil { - return 0, false - } - resp := f.pt.latestResponse() - if resp == nil { - return 0, false - } - - retry := resp.Header.Get(autorest.HeaderRetryAfter) - if retry == "" { - return 0, false - } - - d, err := time.ParseDuration(retry + "s") - if err != nil { - panic(err) - } - - return d, true -} - -// 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 -// the retry value defined in the client up to the maximum retry attempts. -// If no deadline is specified in the context then the client.PollingDuration will be -// used to determine if a default deadline should be used. -// If PollingDuration is greater than zero the value will be used as the context's timeout. -// If PollingDuration is zero then no default deadline will be used. -func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) (err error) { - ctx = tracing.StartSpan(ctx, "github.com/Azure/go-autorest/autorest/azure/async.WaitForCompletionRef") - defer func() { - sc := -1 - resp := f.Response() - if resp != nil { - sc = resp.StatusCode - } - tracing.EndSpan(ctx, sc, err) - }() - cancelCtx := ctx - // if the provided context already has a deadline don't override it - _, hasDeadline := ctx.Deadline() - if d := client.PollingDuration; !hasDeadline && d != 0 { - var cancel context.CancelFunc - cancelCtx, cancel = context.WithTimeout(ctx, d) - defer cancel() - } - // if the initial response has a Retry-After, sleep for the specified amount of time before starting to poll - if delay, ok := f.GetPollingDelay(); ok { - logger.Instance.Writeln(logger.LogInfo, "WaitForCompletionRef: initial polling delay") - if delayElapsed := autorest.DelayForBackoff(delay, 0, cancelCtx.Done()); !delayElapsed { - err = cancelCtx.Err() - return - } - } - done, err := f.DoneWithContext(ctx, client) - for attempts := 0; !done; done, err = f.DoneWithContext(ctx, client) { - if attempts >= client.RetryAttempts { - return autorest.NewErrorWithError(err, "Future", "WaitForCompletion", f.pt.latestResponse(), "the number of retries has been exceeded") - } - // we want delayAttempt to be zero in the non-error case so - // that DelayForBackoff doesn't perform exponential back-off - var delayAttempt int - var delay time.Duration - if err == nil { - // check for Retry-After delay, if not present use the client's polling delay - var ok bool - delay, ok = f.GetPollingDelay() - if !ok { - logger.Instance.Writeln(logger.LogInfo, "WaitForCompletionRef: Using client polling delay") - delay = client.PollingDelay - } - } else { - // there was an error polling for status so perform exponential - // back-off based on the number of attempts using the client's retry - // duration. update attempts after delayAttempt to avoid off-by-one. - logger.Instance.Writef(logger.LogError, "WaitForCompletionRef: %s\n", err) - delayAttempt = attempts - delay = client.RetryDuration - attempts++ - } - // wait until the delay elapses or the context is cancelled - delayElapsed := autorest.DelayForBackoff(delay, delayAttempt, cancelCtx.Done()) - if !delayElapsed { - return autorest.NewErrorWithError(cancelCtx.Err(), "Future", "WaitForCompletion", f.pt.latestResponse(), "context has been cancelled") - } - } - return -} - -// MarshalJSON implements the json.Marshaler interface. -func (f Future) MarshalJSON() ([]byte, error) { - return json.Marshal(f.pt) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (f *Future) UnmarshalJSON(data []byte) error { - // unmarshal into JSON object to determine the tracker type - obj := map[string]interface{}{} - err := json.Unmarshal(data, &obj) - if err != nil { - return err - } - if obj["method"] == nil { - return autorest.NewError("Future", "UnmarshalJSON", "missing 'method' property") - } - method := obj["method"].(string) - switch strings.ToUpper(method) { - case http.MethodDelete: - f.pt = &pollingTrackerDelete{} - case http.MethodPatch: - f.pt = &pollingTrackerPatch{} - case http.MethodPost: - f.pt = &pollingTrackerPost{} - case http.MethodPut: - f.pt = &pollingTrackerPut{} - default: - return autorest.NewError("Future", "UnmarshalJSON", "unsupoorted method '%s'", method) - } - // now unmarshal into the tracker - return json.Unmarshal(data, &f.pt) -} - -// PollingURL returns the URL used for retrieving the status of the long-running operation. -func (f Future) PollingURL() string { - if f.pt == nil { - return "" - } - return f.pt.pollingURL() -} - -// GetResult should be called once polling has completed successfully. -// It makes the final GET call to retrieve the resultant payload. -func (f Future) GetResult(sender autorest.Sender) (*http.Response, error) { - if f.pt.finalGetURL() == "" { - // we can end up in this situation if the async operation returns a 200 - // with no polling URLs. in that case return the response which should - // contain the JSON payload (only do this for successful terminal cases). - if lr := f.pt.latestResponse(); lr != nil && f.pt.hasSucceeded() { - return lr, nil - } - return nil, autorest.NewError("Future", "GetResult", "missing URL for retrieving result") - } - req, err := http.NewRequest(http.MethodGet, f.pt.finalGetURL(), nil) - if err != nil { - return nil, err - } - resp, err := sender.Do(req) - if err == nil && resp.Body != nil { - // copy the body and close it so callers don't have to - defer resp.Body.Close() - b, err := io.ReadAll(resp.Body) - if err != nil { - return resp, err - } - resp.Body = io.NopCloser(bytes.NewReader(b)) - } - return resp, err -} - -type pollingTracker interface { - // these methods can differ per tracker - - // checks the response headers and status code to determine the polling mechanism - updatePollingMethod() error - - // checks the response for tracker-specific error conditions - checkForErrors() error - - // returns true if provisioning state should be checked - provisioningStateApplicable() bool - - // methods common to all trackers - - // initializes a tracker's polling URL and method, called for each iteration. - // these values can be overridden by each polling tracker as required. - initPollingMethod() error - - // initializes the tracker's internal state, call this when the tracker is created - initializeState() error - - // makes an HTTP request to check the status of the LRO - pollForStatus(ctx context.Context, sender autorest.Sender) error - - // updates internal tracker state, call this after each call to pollForStatus - updatePollingState(provStateApl bool) error - - // returns the error response from the service, can be nil - pollingError() error - - // returns the polling method being used - pollingMethod() PollingMethodType - - // returns the state of the LRO as returned from the service - pollingStatus() string - - // returns the URL used for polling status - pollingURL() string - - // returns the URL used for the final GET to retrieve the resource - finalGetURL() string - - // returns true if the LRO is in a terminal state - hasTerminated() bool - - // returns true if the LRO is in a failed terminal state - hasFailed() bool - - // returns true if the LRO is in a successful terminal state - hasSucceeded() bool - - // returns the cached HTTP response after a call to pollForStatus(), can be nil - latestResponse() *http.Response -} - -type pollingTrackerBase struct { - // resp is the last response, either from the submission of the LRO or from polling - resp *http.Response - - // method is the HTTP verb, this is needed for deserialization - Method string `json:"method"` - - // rawBody is the raw JSON response body - rawBody map[string]interface{} - - // denotes if polling is using async-operation or location header - Pm PollingMethodType `json:"pollingMethod"` - - // the URL to poll for status - URI string `json:"pollingURI"` - - // the state of the LRO as returned from the service - State string `json:"lroState"` - - // the URL to GET for the final result - FinalGetURI string `json:"resultURI"` - - // used to hold an error object returned from the service - Err *ServiceError `json:"error,omitempty"` -} - -func (pt *pollingTrackerBase) initializeState() error { - // determine the initial polling state based on response body and/or HTTP status - // code. this is applicable to the initial LRO response, not polling responses! - pt.Method = pt.resp.Request.Method - if err := pt.updateRawBody(); err != nil { - return err - } - switch pt.resp.StatusCode { - case http.StatusOK: - if ps := pt.getProvisioningState(); ps != nil { - pt.State = *ps - if pt.hasFailed() { - pt.updateErrorFromResponse() - return pt.pollingError() - } - } else { - pt.State = operationSucceeded - } - case http.StatusCreated: - if ps := pt.getProvisioningState(); ps != nil { - pt.State = *ps - } else { - pt.State = operationInProgress - } - case http.StatusAccepted: - pt.State = operationInProgress - case http.StatusNoContent: - pt.State = operationSucceeded - default: - pt.State = operationFailed - pt.updateErrorFromResponse() - return pt.pollingError() - } - return pt.initPollingMethod() -} - -func (pt pollingTrackerBase) getProvisioningState() *string { - if pt.rawBody != nil && pt.rawBody["properties"] != nil { - p := pt.rawBody["properties"].(map[string]interface{}) - if ps := p["provisioningState"]; ps != nil { - s := ps.(string) - return &s - } - } - return nil -} - -func (pt *pollingTrackerBase) updateRawBody() error { - pt.rawBody = map[string]interface{}{} - if pt.resp.ContentLength != 0 { - defer pt.resp.Body.Close() - b, err := io.ReadAll(pt.resp.Body) - if err != nil { - return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to read response body") - } - // put the body back so it's available to other callers - pt.resp.Body = io.NopCloser(bytes.NewReader(b)) - // observed in 204 responses over HTTP/2.0; the content length is -1 but body is empty - if len(b) == 0 { - return nil - } - if err = json.Unmarshal(b, &pt.rawBody); err != nil { - return autorest.NewErrorWithError(err, "pollingTrackerBase", "updateRawBody", nil, "failed to unmarshal response body") - } - } - return nil -} - -func (pt *pollingTrackerBase) pollForStatus(ctx context.Context, sender autorest.Sender) error { - req, err := http.NewRequest(http.MethodGet, pt.URI, nil) - if err != nil { - return autorest.NewErrorWithError(err, "pollingTrackerBase", "pollForStatus", nil, "failed to create HTTP request") - } - - 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") - } - if autorest.ResponseHasStatusCode(pt.resp, pollingCodes[:]...) { - // reset the service error on success case - pt.Err = nil - err = pt.updateRawBody() - } else { - // check response body for error content - pt.updateErrorFromResponse() - err = pt.pollingError() - } - return err -} - -// attempts to unmarshal a ServiceError type from the response body. -// if that fails then make a best attempt at creating something meaningful. -// NOTE: this assumes that the async operation has failed. -func (pt *pollingTrackerBase) updateErrorFromResponse() { - var err error - if pt.resp.ContentLength != 0 { - type respErr struct { - ServiceError *ServiceError `json:"error"` - } - re := respErr{} - defer pt.resp.Body.Close() - var b []byte - if b, err = io.ReadAll(pt.resp.Body); err != nil { - goto Default - } - // put the body back so it's available to other callers - pt.resp.Body = io.NopCloser(bytes.NewReader(b)) - if len(b) == 0 { - goto Default - } - if err = json.Unmarshal(b, &re); err != nil { - goto Default - } - // unmarshalling the error didn't yield anything, try unwrapped error - if re.ServiceError == nil { - err = json.Unmarshal(b, &re.ServiceError) - if err != nil { - goto Default - } - } - // the unmarshaller will ensure re.ServiceError is non-nil - // even if there was no content unmarshalled so check the code. - if re.ServiceError.Code != "" { - pt.Err = re.ServiceError - return - } - } -Default: - se := &ServiceError{ - Code: pt.pollingStatus(), - Message: "The async operation failed.", - } - if err != nil { - se.InnerError = make(map[string]interface{}) - se.InnerError["unmarshalError"] = err.Error() - } - // stick the response body into the error object in hopes - // it contains something useful to help diagnose the failure. - if len(pt.rawBody) > 0 { - se.AdditionalInfo = []map[string]interface{}{ - pt.rawBody, - } - } - pt.Err = se -} - -func (pt *pollingTrackerBase) updatePollingState(provStateApl bool) error { - if pt.Pm == PollingAsyncOperation && pt.rawBody["status"] != nil { - pt.State = pt.rawBody["status"].(string) - } else { - if pt.resp.StatusCode == http.StatusAccepted { - pt.State = operationInProgress - } else if provStateApl { - if ps := pt.getProvisioningState(); ps != nil { - pt.State = *ps - } else { - pt.State = operationSucceeded - } - } else { - return autorest.NewError("pollingTrackerBase", "updatePollingState", "the response from the async operation has an invalid status code") - } - } - // if the operation has failed update the error state - if pt.hasFailed() { - pt.updateErrorFromResponse() - } - return nil -} - -func (pt pollingTrackerBase) pollingError() error { - if pt.Err == nil { - return nil - } - return pt.Err -} - -func (pt pollingTrackerBase) pollingMethod() PollingMethodType { - return pt.Pm -} - -func (pt pollingTrackerBase) pollingStatus() string { - return pt.State -} - -func (pt pollingTrackerBase) pollingURL() string { - return pt.URI -} - -func (pt pollingTrackerBase) finalGetURL() string { - return pt.FinalGetURI -} - -func (pt pollingTrackerBase) hasTerminated() bool { - return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) || strings.EqualFold(pt.State, operationSucceeded) -} - -func (pt pollingTrackerBase) hasFailed() bool { - return strings.EqualFold(pt.State, operationCanceled) || strings.EqualFold(pt.State, operationFailed) -} - -func (pt pollingTrackerBase) hasSucceeded() bool { - return strings.EqualFold(pt.State, operationSucceeded) -} - -func (pt pollingTrackerBase) latestResponse() *http.Response { - return pt.resp -} - -// error checking common to all trackers -func (pt pollingTrackerBase) baseCheckForErrors() error { - // for Azure-AsyncOperations the response body cannot be nil or empty - if pt.Pm == PollingAsyncOperation { - if pt.resp.Body == nil || pt.resp.ContentLength == 0 { - return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "for Azure-AsyncOperation response body cannot be nil") - } - if pt.rawBody["status"] == nil { - return autorest.NewError("pollingTrackerBase", "baseCheckForErrors", "missing status property in Azure-AsyncOperation response body") - } - } - return nil -} - -// default initialization of polling URL/method. each verb tracker will update this as required. -func (pt *pollingTrackerBase) initPollingMethod() error { - if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - return nil - } - if lh, err := getURLFromLocationHeader(pt.resp); err != nil { - return err - } else if lh != "" { - pt.URI = lh - pt.Pm = PollingLocation - return nil - } - // it's ok if we didn't find a polling header, this will be handled elsewhere - return nil -} - -// DELETE - -type pollingTrackerDelete struct { - pollingTrackerBase -} - -func (pt *pollingTrackerDelete) updatePollingMethod() error { - // for 201 the Location header is required - if pt.resp.StatusCode == http.StatusCreated { - if lh, err := getURLFromLocationHeader(pt.resp); err != nil { - return err - } else if lh == "" { - return autorest.NewError("pollingTrackerDelete", "updateHeaders", "missing Location header in 201 response") - } else { - pt.URI = lh - } - pt.Pm = PollingLocation - pt.FinalGetURI = pt.URI - } - // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary - if pt.resp.StatusCode == http.StatusAccepted { - ao, err := getURLFromAsyncOpHeader(pt.resp) - if err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - // if the Location header is invalid and we already have a polling URL - // then we don't care if the Location header URL is malformed. - if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { - return err - } else if lh != "" { - if ao == "" { - pt.URI = lh - pt.Pm = PollingLocation - } - // when both headers are returned we use the value in the Location header for the final GET - pt.FinalGetURI = lh - } - // make sure a polling URL was found - if pt.URI == "" { - return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") - } - } - return nil -} - -func (pt pollingTrackerDelete) checkForErrors() error { - return pt.baseCheckForErrors() -} - -func (pt pollingTrackerDelete) provisioningStateApplicable() bool { - return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent -} - -// PATCH - -type pollingTrackerPatch struct { - pollingTrackerBase -} - -func (pt *pollingTrackerPatch) updatePollingMethod() error { - // by default we can use the original URL for polling and final GET - if pt.URI == "" { - pt.URI = pt.resp.Request.URL.String() - } - if pt.FinalGetURI == "" { - pt.FinalGetURI = pt.resp.Request.URL.String() - } - if pt.Pm == PollingUnknown { - pt.Pm = PollingRequestURI - } - // for 201 it's permissible for no headers to be returned - if pt.resp.StatusCode == http.StatusCreated { - if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - } - // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary - // note the absence of the "final GET" mechanism for PATCH - if pt.resp.StatusCode == http.StatusAccepted { - ao, err := getURLFromAsyncOpHeader(pt.resp) - if err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - if ao == "" { - if lh, err := getURLFromLocationHeader(pt.resp); err != nil { - return err - } else if lh == "" { - return autorest.NewError("pollingTrackerPatch", "updateHeaders", "didn't get any suitable polling URLs in 202 response") - } else { - pt.URI = lh - pt.Pm = PollingLocation - } - } - } - return nil -} - -func (pt pollingTrackerPatch) checkForErrors() error { - return pt.baseCheckForErrors() -} - -func (pt pollingTrackerPatch) provisioningStateApplicable() bool { - return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated -} - -// POST - -type pollingTrackerPost struct { - pollingTrackerBase -} - -func (pt *pollingTrackerPost) updatePollingMethod() error { - // 201 requires Location header - if pt.resp.StatusCode == http.StatusCreated { - if lh, err := getURLFromLocationHeader(pt.resp); err != nil { - return err - } else if lh == "" { - return autorest.NewError("pollingTrackerPost", "updateHeaders", "missing Location header in 201 response") - } else { - pt.URI = lh - pt.FinalGetURI = lh - pt.Pm = PollingLocation - } - } - // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary - if pt.resp.StatusCode == http.StatusAccepted { - ao, err := getURLFromAsyncOpHeader(pt.resp) - if err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - // if the Location header is invalid and we already have a polling URL - // then we don't care if the Location header URL is malformed. - if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { - return err - } else if lh != "" { - if ao == "" { - pt.URI = lh - pt.Pm = PollingLocation - } - // when both headers are returned we use the value in the Location header for the final GET - pt.FinalGetURI = lh - } - // make sure a polling URL was found - if pt.URI == "" { - return autorest.NewError("pollingTrackerPost", "updateHeaders", "didn't get any suitable polling URLs in 202 response") - } - } - return nil -} - -func (pt pollingTrackerPost) checkForErrors() error { - return pt.baseCheckForErrors() -} - -func (pt pollingTrackerPost) provisioningStateApplicable() bool { - return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusNoContent -} - -// PUT - -type pollingTrackerPut struct { - pollingTrackerBase -} - -func (pt *pollingTrackerPut) updatePollingMethod() error { - // by default we can use the original URL for polling and final GET - if pt.URI == "" { - pt.URI = pt.resp.Request.URL.String() - } - if pt.FinalGetURI == "" { - pt.FinalGetURI = pt.resp.Request.URL.String() - } - if pt.Pm == PollingUnknown { - pt.Pm = PollingRequestURI - } - // for 201 it's permissible for no headers to be returned - if pt.resp.StatusCode == http.StatusCreated { - if ao, err := getURLFromAsyncOpHeader(pt.resp); err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - } - // for 202 prefer the Azure-AsyncOperation header but fall back to Location if necessary - if pt.resp.StatusCode == http.StatusAccepted { - ao, err := getURLFromAsyncOpHeader(pt.resp) - if err != nil { - return err - } else if ao != "" { - pt.URI = ao - pt.Pm = PollingAsyncOperation - } - // if the Location header is invalid and we already have a polling URL - // then we don't care if the Location header URL is malformed. - if lh, err := getURLFromLocationHeader(pt.resp); err != nil && pt.URI == "" { - return err - } else if lh != "" { - if ao == "" { - pt.URI = lh - pt.Pm = PollingLocation - } - } - // make sure a polling URL was found - if pt.URI == "" { - return autorest.NewError("pollingTrackerPut", "updateHeaders", "didn't get any suitable polling URLs in 202 response") - } - } - return nil -} - -func (pt pollingTrackerPut) checkForErrors() error { - err := pt.baseCheckForErrors() - if err != nil { - return err - } - // if there are no LRO headers then the body cannot be empty - ao, err := getURLFromAsyncOpHeader(pt.resp) - if err != nil { - return err - } - lh, err := getURLFromLocationHeader(pt.resp) - if err != nil { - return err - } - if ao == "" && lh == "" && len(pt.rawBody) == 0 { - return autorest.NewError("pollingTrackerPut", "checkForErrors", "the response did not contain a body") - } - return nil -} - -func (pt pollingTrackerPut) provisioningStateApplicable() bool { - return pt.resp.StatusCode == http.StatusOK || pt.resp.StatusCode == http.StatusCreated -} - -// creates a polling tracker based on the verb of the original request -func createPollingTracker(resp *http.Response) (pollingTracker, error) { - var pt pollingTracker - switch strings.ToUpper(resp.Request.Method) { - case http.MethodDelete: - pt = &pollingTrackerDelete{pollingTrackerBase: pollingTrackerBase{resp: resp}} - case http.MethodPatch: - pt = &pollingTrackerPatch{pollingTrackerBase: pollingTrackerBase{resp: resp}} - case http.MethodPost: - pt = &pollingTrackerPost{pollingTrackerBase: pollingTrackerBase{resp: resp}} - case http.MethodPut: - pt = &pollingTrackerPut{pollingTrackerBase: pollingTrackerBase{resp: resp}} - default: - return nil, autorest.NewError("azure", "createPollingTracker", "unsupported HTTP method %s", resp.Request.Method) - } - if err := pt.initializeState(); err != nil { - return pt, err - } - // this initializes the polling header values, we do this during creation in case the - // initial response send us invalid values; this way the API call will return a non-nil - // error (not doing this means the error shows up in Future.Done) - return pt, pt.updatePollingMethod() -} - -// gets the polling URL from the Azure-AsyncOperation header. -// ensures the URL is well-formed and absolute. -func getURLFromAsyncOpHeader(resp *http.Response) (string, error) { - s := resp.Header.Get(http.CanonicalHeaderKey(headerAsyncOperation)) - if s == "" { - return "", nil - } - if !isValidURL(s) { - return "", autorest.NewError("azure", "getURLFromAsyncOpHeader", "invalid polling URL '%s'", s) - } - return s, nil -} - -// gets the polling URL from the Location header. -// ensures the URL is well-formed and absolute. -func getURLFromLocationHeader(resp *http.Response) (string, error) { - s := resp.Header.Get(http.CanonicalHeaderKey(autorest.HeaderLocation)) - if s == "" { - return "", nil - } - if !isValidURL(s) { - return "", autorest.NewError("azure", "getURLFromLocationHeader", "invalid polling URL '%s'", s) - } - return s, nil -} - -// verify that the URL is valid and absolute -func isValidURL(s string) bool { - u, err := url.Parse(s) - return err == nil && u.IsAbs() -} - -// PollingMethodType defines a type used for enumerating polling mechanisms. -type PollingMethodType string - -const ( - // PollingAsyncOperation indicates the polling method uses the Azure-AsyncOperation header. - PollingAsyncOperation PollingMethodType = "AsyncOperation" - - // PollingLocation indicates the polling method uses the Location header. - PollingLocation PollingMethodType = "Location" - - // PollingRequestURI indicates the polling method uses the original request URI. - PollingRequestURI PollingMethodType = "RequestURI" - - // PollingUnknown indicates an unknown polling method and is the default value. - PollingUnknown PollingMethodType = "" -) - -// AsyncOpIncompleteError is the type that's returned from a future that has not completed. -type AsyncOpIncompleteError struct { - // FutureType is the name of the type composed of a azure.Future. - FutureType string -} - -// Error returns an error message including the originating type name of the error. -func (e AsyncOpIncompleteError) Error() string { - return fmt.Sprintf("%s: asynchronous operation has not completed", e.FutureType) -} - -// NewAsyncOpIncompleteError creates a new AsyncOpIncompleteError with the specified parameters. -func NewAsyncOpIncompleteError(futureType string) AsyncOpIncompleteError { - return AsyncOpIncompleteError{ - FutureType: futureType, - } -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/azure/auth/README.md b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/README.md deleted file mode 100644 index 05bef8a800..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/README.md +++ /dev/null @@ -1,152 +0,0 @@ -# NOTE: This module will go out of support by March 31, 2023. For authenticating with Azure AD, use module [azidentity](https://pkg.go.dev/github.com/Azure/azure-sdk-for-go/sdk/azidentity) instead. For help migrating from `auth` to `azidentiy` please consult the [migration guide](https://aka.ms/azsdk/go/identity/migration). General information about the retirement of this and other legacy modules can be found [here](https://azure.microsoft.com/updates/support-for-azure-sdk-libraries-that-do-not-conform-to-our-current-azure-sdk-guidelines-will-be-retired-as-of-31-march-2023/). - -## Authentication - -Typical SDK operations must be authenticated and authorized. The `autorest.Authorizer` -interface allows use of any auth style in requests, such as inserting an OAuth2 -Authorization header and bearer token received from Azure AD. - -The SDK itself provides a simple way to get an authorizer which first checks -for OAuth client credentials in environment variables and then falls back to -Azure's [Managed Service Identity]() when available, e.g. when on an Azure -VM. The following snippet from [the previous section](#use) demonstrates -this helper. - -```go -import "github.com/Azure/go-autorest/autorest/azure/auth" - -// create a VirtualNetworks client -vnetClient := network.NewVirtualNetworksClient("") - -// create an authorizer from env vars or Azure Managed Service Idenity -authorizer, err := auth.NewAuthorizerFromEnvironment() -if err != nil { - handle(err) -} - -vnetClient.Authorizer = authorizer - -// call the VirtualNetworks CreateOrUpdate API -vnetClient.CreateOrUpdate(context.Background(), -// ... -``` - -The following environment variables help determine authentication configuration: - -- `AZURE_ENVIRONMENT`: Specifies the Azure Environment to use. If not set, it - defaults to `AzurePublicCloud`. Not applicable to authentication with Managed - Service Identity (MSI). -- `AZURE_AD_RESOURCE`: Specifies the AAD resource ID to use. If not set, it - defaults to `ResourceManagerEndpoint` for operations with Azure Resource - Manager. You can also choose an alternate resource programmatically with - `auth.NewAuthorizerFromEnvironmentWithResource(resource string)`. - -### More Authentication Details - -The previous is the first and most recommended of several authentication -options offered by the SDK because it allows seamless use of both service -principals and [Azure Managed Service Identity][]. Other options are listed -below. - -> Note: If you need to create a new service principal, run `az ad sp create-for-rbac -n ""` in the -> [azure-cli](https://github.com/Azure/azure-cli). See [these -> docs](https://docs.microsoft.com/cli/azure/create-an-azure-service-principal-azure-cli?view=azure-cli-latest) -> for more info. Copy the new principal's ID, secret, and tenant ID for use in -> your app, or consider the `--sdk-auth` parameter for serialized output. - -[azure managed service identity]: https://docs.microsoft.com/azure/active-directory/msi-overview - -- The `auth.NewAuthorizerFromEnvironment()` described above creates an authorizer - from the first available of the following configuration: - - 1. **Client Credentials**: Azure AD Application ID and Secret. - - - `AZURE_TENANT_ID`: Specifies the Tenant to which to authenticate. - - `AZURE_CLIENT_ID`: Specifies the app client ID to use. - - `AZURE_CLIENT_SECRET`: Specifies the app secret to use. - - 2. **Client Certificate**: Azure AD Application ID and X.509 Certificate. - - - `AZURE_TENANT_ID`: Specifies the Tenant to which to authenticate. - - `AZURE_CLIENT_ID`: Specifies the app client ID to use. - - `AZURE_CERTIFICATE_PATH`: Specifies the certificate Path to use. - - `AZURE_CERTIFICATE_PASSWORD`: Specifies the certificate password to use. - - 3. **Resource Owner Password**: Azure AD User and Password. This grant type is *not - recommended*, use device login instead if you need interactive login. - - - `AZURE_TENANT_ID`: Specifies the Tenant to which to authenticate. - - `AZURE_CLIENT_ID`: Specifies the app client ID to use. - - `AZURE_USERNAME`: Specifies the username to use. - - `AZURE_PASSWORD`: Specifies the password to use. - - 4. **Azure Managed Service Identity**: Delegate credential management to the - platform. Requires that code is running in Azure, e.g. on a VM. All - configuration is handled by Azure. See [Azure Managed Service - Identity](https://docs.microsoft.com/azure/active-directory/msi-overview) - for more details. - -- The `auth.NewAuthorizerFromFile()` method creates an authorizer using - credentials from an auth file created by the [Azure CLI][]. Follow these - steps to utilize: - - 1. Create a service principal and output an auth file using `az ad sp create-for-rbac --sdk-auth > client_credentials.json`. - 2. Set environment variable `AZURE_AUTH_LOCATION` to the path of the saved - output file. - 3. Use the authorizer returned by `auth.NewAuthorizerFromFile()` in your - client as described above. - -- The `auth.NewAuthorizerFromCLI()` method creates an authorizer which - uses [Azure CLI][] to obtain its credentials. - - The default audience being requested is `https://management.azure.com` (Azure ARM API). - To specify your own audience, export `AZURE_AD_RESOURCE` as an evironment variable. - This is read by `auth.NewAuthorizerFromCLI()` and passed to Azure CLI to acquire the access token. - - For example, to request an access token for Azure Key Vault, export - ``` - AZURE_AD_RESOURCE="https://vault.azure.net" - ``` - -- `auth.NewAuthorizerFromCLIWithResource(AUDIENCE_URL_OR_APPLICATION_ID)` - this method is self contained and does - not require exporting environment variables. For example, to request an access token for Azure Key Vault: - ``` - auth.NewAuthorizerFromCLIWithResource("https://vault.azure.net") - ``` - - To use `NewAuthorizerFromCLI()` or `NewAuthorizerFromCLIWithResource()`, follow these steps: - - 1. Install [Azure CLI v2.0.12](https://docs.microsoft.com/cli/azure/install-azure-cli) or later. Upgrade earlier versions. - 2. Use `az login` to sign in to Azure. - - If you receive an error, use `az account get-access-token` to verify access. - - If Azure CLI is not installed to the default directory, you may receive an error - reporting that `az` cannot be found. - Use the `AzureCLIPath` environment variable to define the Azure CLI installation folder. - - If you are signed in to Azure CLI using multiple accounts or your account has - access to multiple subscriptions, you need to specify the specific subscription - to be used. To do so, use: - - ``` - az account set --subscription - ``` - - To verify the current account settings, use: - - ``` - az account list - ``` - -[azure cli]: https://github.com/Azure/azure-cli - -- Finally, you can use OAuth's [Device Flow][] by calling - `auth.NewDeviceFlowConfig()` and extracting the Authorizer as follows: - - ```go - config := auth.NewDeviceFlowConfig(clientID, tenantID) - a, err := config.Authorizer() - ``` - -[device flow]: https://oauth.net/2/device-flow/ diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go deleted file mode 100644 index 25697b3c85..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/auth.go +++ /dev/null @@ -1,772 +0,0 @@ -package auth - -// 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. - -import ( - "bytes" - "context" - "encoding/binary" - "encoding/json" - "errors" - "fmt" - "io" - "log" - "os" - "strings" - "unicode/utf16" - - "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/azure/cli" - "github.com/Azure/go-autorest/logger" - "github.com/dimchansky/utfbom" -) - -// The possible keys in the Values map. -const ( - SubscriptionID = "AZURE_SUBSCRIPTION_ID" - TenantID = "AZURE_TENANT_ID" - AuxiliaryTenantIDs = "AZURE_AUXILIARY_TENANT_IDS" - ClientID = "AZURE_CLIENT_ID" - ClientSecret = "AZURE_CLIENT_SECRET" - CertificatePath = "AZURE_CERTIFICATE_PATH" - CertificatePassword = "AZURE_CERTIFICATE_PASSWORD" - Username = "AZURE_USERNAME" - Password = "AZURE_PASSWORD" - EnvironmentName = "AZURE_ENVIRONMENT" - Resource = "AZURE_AD_RESOURCE" - ActiveDirectoryEndpoint = "ActiveDirectoryEndpoint" - ResourceManagerEndpoint = "ResourceManagerEndpoint" - GraphResourceID = "GraphResourceID" - SQLManagementEndpoint = "SQLManagementEndpoint" - GalleryEndpoint = "GalleryEndpoint" - ManagementEndpoint = "ManagementEndpoint" -) - -// NewAuthorizerFromEnvironment creates an Authorizer configured from environment variables in the order: -// 1. Client credentials -// 2. Client certificate -// 3. Username password -// 4. MSI -func NewAuthorizerFromEnvironment() (autorest.Authorizer, error) { - logger.Instance.Writeln(logger.LogInfo, "NewAuthorizerFromEnvironment() determining authentication mechanism") - settings, err := GetSettingsFromEnvironment() - if err != nil { - return nil, err - } - return settings.GetAuthorizer() -} - -// NewAuthorizerFromEnvironmentWithResource creates an Authorizer configured from environment variables in the order: -// 1. Client credentials -// 2. Client certificate -// 3. Username password -// 4. MSI -func NewAuthorizerFromEnvironmentWithResource(resource string) (autorest.Authorizer, error) { - logger.Instance.Writeln(logger.LogInfo, "NewAuthorizerFromEnvironmentWithResource() determining authentication mechanism") - settings, err := GetSettingsFromEnvironment() - if err != nil { - return nil, err - } - settings.Values[Resource] = resource - return settings.GetAuthorizer() -} - -// EnvironmentSettings contains the available authentication settings. -type EnvironmentSettings struct { - Values map[string]string - Environment azure.Environment -} - -// GetSettingsFromEnvironment returns the available authentication settings from the environment. -func GetSettingsFromEnvironment() (s EnvironmentSettings, err error) { - s = EnvironmentSettings{ - Values: map[string]string{}, - } - s.setValue(SubscriptionID) - s.setValue(TenantID) - s.setValue(AuxiliaryTenantIDs) - s.setValue(ClientID) - s.setValue(ClientSecret) - s.setValue(CertificatePath) - s.setValue(CertificatePassword) - s.setValue(Username) - s.setValue(Password) - s.setValue(EnvironmentName) - s.setValue(Resource) - if v := s.Values[EnvironmentName]; v == "" { - s.Environment = azure.PublicCloud - } else { - s.Environment, err = azure.EnvironmentFromName(v) - } - if s.Values[Resource] == "" { - s.Values[Resource] = s.Environment.ResourceManagerEndpoint - } - return -} - -// GetSubscriptionID returns the available subscription ID or an empty string. -func (settings EnvironmentSettings) GetSubscriptionID() string { - return settings.Values[SubscriptionID] -} - -// adds the specified environment variable value to the Values map if it exists -func (settings EnvironmentSettings) setValue(key string) { - if v := os.Getenv(key); v != "" { - logger.Instance.Writef(logger.LogInfo, "GetSettingsFromEnvironment() found environment var %s\n", key) - settings.Values[key] = v - } -} - -// helper to return client and tenant IDs -func (settings EnvironmentSettings) getClientAndTenant() (string, string) { - clientID := settings.Values[ClientID] - tenantID := settings.Values[TenantID] - return clientID, tenantID -} - -// GetClientCredentials creates a config object from the available client credentials. -// An error is returned if no client credentials are available. -func (settings EnvironmentSettings) GetClientCredentials() (ClientCredentialsConfig, error) { - secret := settings.Values[ClientSecret] - if secret == "" { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetClientCredentials() missing client secret") - return ClientCredentialsConfig{}, errors.New("missing client secret") - } - clientID, tenantID := settings.getClientAndTenant() - config := NewClientCredentialsConfig(clientID, secret, tenantID) - config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint - config.Resource = settings.Values[Resource] - if auxTenants, ok := settings.Values[AuxiliaryTenantIDs]; ok { - config.AuxTenants = strings.Split(auxTenants, ";") - for i := range config.AuxTenants { - config.AuxTenants[i] = strings.TrimSpace(config.AuxTenants[i]) - } - } - return config, nil -} - -// GetClientCertificate creates a config object from the available certificate credentials. -// An error is returned if no certificate credentials are available. -func (settings EnvironmentSettings) GetClientCertificate() (ClientCertificateConfig, error) { - certPath := settings.Values[CertificatePath] - if certPath == "" { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetClientCertificate() missing certificate path") - return ClientCertificateConfig{}, errors.New("missing certificate path") - } - certPwd := settings.Values[CertificatePassword] - clientID, tenantID := settings.getClientAndTenant() - config := NewClientCertificateConfig(certPath, certPwd, clientID, tenantID) - config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint - config.Resource = settings.Values[Resource] - return config, nil -} - -// GetUsernamePassword creates a config object from the available username/password credentials. -// An error is returned if no username/password credentials are available. -func (settings EnvironmentSettings) GetUsernamePassword() (UsernamePasswordConfig, error) { - username := settings.Values[Username] - password := settings.Values[Password] - if username == "" || password == "" { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetUsernamePassword() missing username and/or password") - return UsernamePasswordConfig{}, errors.New("missing username/password") - } - clientID, tenantID := settings.getClientAndTenant() - config := NewUsernamePasswordConfig(username, password, clientID, tenantID) - config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint - config.Resource = settings.Values[Resource] - return config, nil -} - -// GetMSI creates a MSI config object from the available client ID. -func (settings EnvironmentSettings) GetMSI() MSIConfig { - config := NewMSIConfig() - config.Resource = settings.Values[Resource] - config.ClientID = settings.Values[ClientID] - return config -} - -// GetDeviceFlow creates a device-flow config object from the available client and tenant IDs. -func (settings EnvironmentSettings) GetDeviceFlow() DeviceFlowConfig { - clientID, tenantID := settings.getClientAndTenant() - config := NewDeviceFlowConfig(clientID, tenantID) - config.AADEndpoint = settings.Environment.ActiveDirectoryEndpoint - config.Resource = settings.Values[Resource] - return config -} - -// GetAuthorizer creates an Authorizer configured from environment variables in the order: -// 1. Client credentials -// 2. Client certificate -// 3. Username password -// 4. MSI -func (settings EnvironmentSettings) GetAuthorizer() (autorest.Authorizer, error) { - //1.Client Credentials - if c, e := settings.GetClientCredentials(); e == nil { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetAuthorizer() using client secret credentials") - return c.Authorizer() - } - - //2. Client Certificate - if c, e := settings.GetClientCertificate(); e == nil { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetAuthorizer() using client certificate credentials") - return c.Authorizer() - } - - //3. Username Password - if c, e := settings.GetUsernamePassword(); e == nil { - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetAuthorizer() using user name/password credentials") - return c.Authorizer() - } - - // 4. MSI - if !adal.MSIAvailable(context.Background(), nil) { - return nil, errors.New("MSI not available") - } - logger.Instance.Writeln(logger.LogInfo, "EnvironmentSettings.GetAuthorizer() using MSI authentication") - return settings.GetMSI().Authorizer() -} - -// NewAuthorizerFromFile creates an Authorizer configured from a configuration file in the following order. -// 1. Client credentials -// 2. Client certificate -// The path to the configuration file must be specified in the AZURE_AUTH_LOCATION environment variable. -// resourceBaseURI - used to determine the resource type -func NewAuthorizerFromFile(resourceBaseURI string) (autorest.Authorizer, error) { - settings, err := GetSettingsFromFile() - if err != nil { - return nil, err - } - return settings.GetAuthorizer(resourceBaseURI) -} - -// GetAuthorizer create an Authorizer in the following order. -// 1. Client credentials -// 2. Client certificate -// resourceBaseURI - used to determine the resource type -func (settings FileSettings) GetAuthorizer(resourceBaseURI string) (autorest.Authorizer, error) { - if resourceBaseURI == "" { - resourceBaseURI = azure.PublicCloud.ServiceManagementEndpoint - } - if a, err := settings.ClientCredentialsAuthorizer(resourceBaseURI); err == nil { - return a, err - } - if a, err := settings.ClientCertificateAuthorizer(resourceBaseURI); err == nil { - return a, err - } - return nil, errors.New("auth file missing client and certificate credentials") -} - -// NewAuthorizerFromFileWithResource creates an Authorizer configured from a configuration file in the following order. -// 1. Client credentials -// 2. Client certificate -// The path to the configuration file must be specified in the AZURE_AUTH_LOCATION environment variable. -func NewAuthorizerFromFileWithResource(resource string) (autorest.Authorizer, error) { - s, err := GetSettingsFromFile() - if err != nil { - return nil, err - } - if a, err := s.ClientCredentialsAuthorizerWithResource(resource); err == nil { - return a, err - } - if a, err := s.ClientCertificateAuthorizerWithResource(resource); err == nil { - return a, err - } - return nil, errors.New("auth file missing client and certificate credentials") -} - -// NewAuthorizerFromCLI creates an Authorizer configured from Azure CLI 2.0 for local development scenarios. -func NewAuthorizerFromCLI() (autorest.Authorizer, error) { - settings, err := GetSettingsFromEnvironment() - if err != nil { - return nil, err - } - - if settings.Values[Resource] == "" { - settings.Values[Resource] = settings.Environment.ResourceManagerEndpoint - } - - return NewAuthorizerFromCLIWithResource(settings.Values[Resource]) -} - -// NewAuthorizerFromCLIWithResource creates an Authorizer configured from Azure CLI 2.0 for local development scenarios. -func NewAuthorizerFromCLIWithResource(resource string) (autorest.Authorizer, error) { - token, err := cli.GetTokenFromCLI(resource) - if err != nil { - return nil, err - } - - adalToken, err := token.ToADALToken() - if err != nil { - return nil, err - } - - return autorest.NewBearerAuthorizer(&adalToken), nil -} - -// GetSettingsFromFile returns the available authentication settings from an Azure CLI authentication file. -func GetSettingsFromFile() (FileSettings, error) { - s := FileSettings{} - fileLocation := os.Getenv("AZURE_AUTH_LOCATION") - if fileLocation == "" { - return s, errors.New("environment variable AZURE_AUTH_LOCATION is not set") - } - - contents, err := os.ReadFile(fileLocation) - if err != nil { - return s, err - } - - // Auth file might be encoded - decoded, err := decode(contents) - if err != nil { - return s, err - } - - authFile := map[string]interface{}{} - err = json.Unmarshal(decoded, &authFile) - if err != nil { - return s, err - } - - s.Values = map[string]string{} - s.setKeyValue(ClientID, authFile["clientId"]) - s.setKeyValue(ClientSecret, authFile["clientSecret"]) - s.setKeyValue(CertificatePath, authFile["clientCertificate"]) - s.setKeyValue(CertificatePassword, authFile["clientCertificatePassword"]) - s.setKeyValue(SubscriptionID, authFile["subscriptionId"]) - s.setKeyValue(TenantID, authFile["tenantId"]) - s.setKeyValue(ActiveDirectoryEndpoint, authFile["activeDirectoryEndpointUrl"]) - s.setKeyValue(ResourceManagerEndpoint, authFile["resourceManagerEndpointUrl"]) - s.setKeyValue(GraphResourceID, authFile["activeDirectoryGraphResourceId"]) - s.setKeyValue(SQLManagementEndpoint, authFile["sqlManagementEndpointUrl"]) - s.setKeyValue(GalleryEndpoint, authFile["galleryEndpointUrl"]) - s.setKeyValue(ManagementEndpoint, authFile["managementEndpointUrl"]) - return s, nil -} - -// FileSettings contains the available authentication settings. -type FileSettings struct { - Values map[string]string -} - -// GetSubscriptionID returns the available subscription ID or an empty string. -func (settings FileSettings) GetSubscriptionID() string { - return settings.Values[SubscriptionID] -} - -// adds the specified value to the Values map if it isn't nil -func (settings FileSettings) setKeyValue(key string, val interface{}) { - if val != nil { - settings.Values[key] = val.(string) - } -} - -// returns the specified AAD endpoint or the public cloud endpoint if unspecified -func (settings FileSettings) getAADEndpoint() string { - if v, ok := settings.Values[ActiveDirectoryEndpoint]; ok { - return v - } - return azure.PublicCloud.ActiveDirectoryEndpoint -} - -// ServicePrincipalTokenFromClientCredentials creates a ServicePrincipalToken from the available client credentials. -func (settings FileSettings) ServicePrincipalTokenFromClientCredentials(baseURI string) (*adal.ServicePrincipalToken, error) { - resource, err := settings.getResourceForToken(baseURI) - if err != nil { - return nil, err - } - return settings.ServicePrincipalTokenFromClientCredentialsWithResource(resource) -} - -// ClientCredentialsAuthorizer creates an authorizer from the available client credentials. -func (settings FileSettings) ClientCredentialsAuthorizer(baseURI string) (autorest.Authorizer, error) { - resource, err := settings.getResourceForToken(baseURI) - if err != nil { - return nil, err - } - return settings.ClientCredentialsAuthorizerWithResource(resource) -} - -// ServicePrincipalTokenFromClientCredentialsWithResource creates a ServicePrincipalToken -// from the available client credentials and the specified resource. -func (settings FileSettings) ServicePrincipalTokenFromClientCredentialsWithResource(resource string) (*adal.ServicePrincipalToken, error) { - if _, ok := settings.Values[ClientSecret]; !ok { - return nil, errors.New("missing client secret") - } - config, err := adal.NewOAuthConfig(settings.getAADEndpoint(), settings.Values[TenantID]) - if err != nil { - return nil, err - } - return adal.NewServicePrincipalToken(*config, settings.Values[ClientID], settings.Values[ClientSecret], resource) -} - -func (settings FileSettings) clientCertificateConfigWithResource(resource string) (ClientCertificateConfig, error) { - if _, ok := settings.Values[CertificatePath]; !ok { - return ClientCertificateConfig{}, errors.New("missing certificate path") - } - cfg := NewClientCertificateConfig(settings.Values[CertificatePath], settings.Values[CertificatePassword], settings.Values[ClientID], settings.Values[TenantID]) - cfg.AADEndpoint = settings.getAADEndpoint() - cfg.Resource = resource - return cfg, nil -} - -// ClientCredentialsAuthorizerWithResource creates an authorizer from the available client credentials and the specified resource. -func (settings FileSettings) ClientCredentialsAuthorizerWithResource(resource string) (autorest.Authorizer, error) { - spToken, err := settings.ServicePrincipalTokenFromClientCredentialsWithResource(resource) - if err != nil { - return nil, err - } - return autorest.NewBearerAuthorizer(spToken), nil -} - -// ServicePrincipalTokenFromClientCertificate creates a ServicePrincipalToken from the available certificate credentials. -func (settings FileSettings) ServicePrincipalTokenFromClientCertificate(baseURI string) (*adal.ServicePrincipalToken, error) { - resource, err := settings.getResourceForToken(baseURI) - if err != nil { - return nil, err - } - return settings.ServicePrincipalTokenFromClientCertificateWithResource(resource) -} - -// ClientCertificateAuthorizer creates an authorizer from the available certificate credentials. -func (settings FileSettings) ClientCertificateAuthorizer(baseURI string) (autorest.Authorizer, error) { - resource, err := settings.getResourceForToken(baseURI) - if err != nil { - return nil, err - } - return settings.ClientCertificateAuthorizerWithResource(resource) -} - -// ServicePrincipalTokenFromClientCertificateWithResource creates a ServicePrincipalToken from the available certificate credentials. -func (settings FileSettings) ServicePrincipalTokenFromClientCertificateWithResource(resource string) (*adal.ServicePrincipalToken, error) { - cfg, err := settings.clientCertificateConfigWithResource(resource) - if err != nil { - return nil, err - } - return cfg.ServicePrincipalToken() -} - -// ClientCertificateAuthorizerWithResource creates an authorizer from the available certificate credentials and the specified resource. -func (settings FileSettings) ClientCertificateAuthorizerWithResource(resource string) (autorest.Authorizer, error) { - cfg, err := settings.clientCertificateConfigWithResource(resource) - if err != nil { - return nil, err - } - return cfg.Authorizer() -} - -func decode(b []byte) ([]byte, error) { - reader, enc := utfbom.Skip(bytes.NewReader(b)) - - switch enc { - case utfbom.UTF16LittleEndian: - u16 := make([]uint16, (len(b)/2)-1) - err := binary.Read(reader, binary.LittleEndian, &u16) - if err != nil { - return nil, err - } - return []byte(string(utf16.Decode(u16))), nil - case utfbom.UTF16BigEndian: - u16 := make([]uint16, (len(b)/2)-1) - err := binary.Read(reader, binary.BigEndian, &u16) - if err != nil { - return nil, err - } - return []byte(string(utf16.Decode(u16))), nil - } - return io.ReadAll(reader) -} - -func (settings FileSettings) getResourceForToken(baseURI string) (string, error) { - // Compare default base URI from the SDK to the endpoints from the public cloud - // Base URI and token resource are the same string. This func finds the authentication - // file field that matches the SDK base URI. The SDK defines the public cloud - // endpoint as its default base URI - if !strings.HasSuffix(baseURI, "/") { - baseURI += "/" - } - switch baseURI { - case azure.PublicCloud.ServiceManagementEndpoint: - return settings.Values[ManagementEndpoint], nil - case azure.PublicCloud.ResourceManagerEndpoint: - return settings.Values[ResourceManagerEndpoint], nil - case azure.PublicCloud.ActiveDirectoryEndpoint: - return settings.Values[ActiveDirectoryEndpoint], nil - case azure.PublicCloud.GalleryEndpoint: - return settings.Values[GalleryEndpoint], nil - case azure.PublicCloud.GraphEndpoint: - return settings.Values[GraphResourceID], nil - } - return "", fmt.Errorf("auth: base URI not found in endpoints") -} - -// NewClientCredentialsConfig creates an AuthorizerConfig object configured to obtain an Authorizer through Client Credentials. -// Defaults to Public Cloud and Resource Manager Endpoint. -func NewClientCredentialsConfig(clientID string, clientSecret string, tenantID string) ClientCredentialsConfig { - return ClientCredentialsConfig{ - ClientID: clientID, - ClientSecret: clientSecret, - TenantID: tenantID, - Resource: azure.PublicCloud.ResourceManagerEndpoint, - AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, - } -} - -// NewClientCertificateConfig creates a ClientCertificateConfig object configured to obtain an Authorizer through client certificate. -// Defaults to Public Cloud and Resource Manager Endpoint. -func NewClientCertificateConfig(certificatePath string, certificatePassword string, clientID string, tenantID string) ClientCertificateConfig { - return ClientCertificateConfig{ - CertificatePath: certificatePath, - CertificatePassword: certificatePassword, - ClientID: clientID, - TenantID: tenantID, - Resource: azure.PublicCloud.ResourceManagerEndpoint, - AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, - } -} - -// NewUsernamePasswordConfig creates an UsernamePasswordConfig object configured to obtain an Authorizer through username and password. -// Defaults to Public Cloud and Resource Manager Endpoint. -func NewUsernamePasswordConfig(username string, password string, clientID string, tenantID string) UsernamePasswordConfig { - return UsernamePasswordConfig{ - Username: username, - Password: password, - ClientID: clientID, - TenantID: tenantID, - Resource: azure.PublicCloud.ResourceManagerEndpoint, - AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, - } -} - -// NewMSIConfig creates an MSIConfig object configured to obtain an Authorizer through MSI. -func NewMSIConfig() MSIConfig { - return MSIConfig{ - Resource: azure.PublicCloud.ResourceManagerEndpoint, - } -} - -// NewDeviceFlowConfig creates a DeviceFlowConfig object configured to obtain an Authorizer through device flow. -// Defaults to Public Cloud and Resource Manager Endpoint. -func NewDeviceFlowConfig(clientID string, tenantID string) DeviceFlowConfig { - return DeviceFlowConfig{ - ClientID: clientID, - TenantID: tenantID, - Resource: azure.PublicCloud.ResourceManagerEndpoint, - AADEndpoint: azure.PublicCloud.ActiveDirectoryEndpoint, - } -} - -// AuthorizerConfig provides an authorizer from the configuration provided. -type AuthorizerConfig interface { - Authorizer() (autorest.Authorizer, error) -} - -// ClientCredentialsConfig provides the options to get a bearer authorizer from client credentials. -type ClientCredentialsConfig struct { - ClientID string - ClientSecret string - TenantID string - AuxTenants []string - AADEndpoint string - Resource string -} - -// ServicePrincipalToken creates a ServicePrincipalToken from client credentials. -func (ccc ClientCredentialsConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { - oauthConfig, err := adal.NewOAuthConfig(ccc.AADEndpoint, ccc.TenantID) - if err != nil { - return nil, err - } - return adal.NewServicePrincipalToken(*oauthConfig, ccc.ClientID, ccc.ClientSecret, ccc.Resource) -} - -// MultiTenantServicePrincipalToken creates a MultiTenantServicePrincipalToken from client credentials. -func (ccc ClientCredentialsConfig) MultiTenantServicePrincipalToken() (*adal.MultiTenantServicePrincipalToken, error) { - oauthConfig, err := adal.NewMultiTenantOAuthConfig(ccc.AADEndpoint, ccc.TenantID, ccc.AuxTenants, adal.OAuthOptions{}) - if err != nil { - return nil, err - } - return adal.NewMultiTenantServicePrincipalToken(oauthConfig, ccc.ClientID, ccc.ClientSecret, ccc.Resource) -} - -// Authorizer gets the authorizer from client credentials. -func (ccc ClientCredentialsConfig) Authorizer() (autorest.Authorizer, error) { - if len(ccc.AuxTenants) == 0 { - spToken, err := ccc.ServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get SPT from client credentials: %v", err) - } - return autorest.NewBearerAuthorizer(spToken), nil - } - mtSPT, err := ccc.MultiTenantServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get multitenant SPT from client credentials: %v", err) - } - return autorest.NewMultiTenantServicePrincipalTokenAuthorizer(mtSPT), nil -} - -// ClientCertificateConfig provides the options to get a bearer authorizer from a client certificate. -type ClientCertificateConfig struct { - ClientID string - CertificatePath string - CertificatePassword string - TenantID string - AuxTenants []string - AADEndpoint string - Resource string -} - -// ServicePrincipalToken creates a ServicePrincipalToken from client certificate. -func (ccc ClientCertificateConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { - oauthConfig, err := adal.NewOAuthConfig(ccc.AADEndpoint, ccc.TenantID) - if err != nil { - return nil, err - } - certData, err := os.ReadFile(ccc.CertificatePath) - if err != nil { - return nil, fmt.Errorf("failed to read the certificate file (%s): %v", ccc.CertificatePath, err) - } - certificate, rsaPrivateKey, err := adal.DecodePfxCertificateData(certData, ccc.CertificatePassword) - if err != nil { - return nil, fmt.Errorf("failed to decode pkcs12 certificate while creating spt: %v", err) - } - return adal.NewServicePrincipalTokenFromCertificate(*oauthConfig, ccc.ClientID, certificate, rsaPrivateKey, ccc.Resource) -} - -// MultiTenantServicePrincipalToken creates a MultiTenantServicePrincipalToken from client certificate. -func (ccc ClientCertificateConfig) MultiTenantServicePrincipalToken() (*adal.MultiTenantServicePrincipalToken, error) { - oauthConfig, err := adal.NewMultiTenantOAuthConfig(ccc.AADEndpoint, ccc.TenantID, ccc.AuxTenants, adal.OAuthOptions{}) - if err != nil { - return nil, err - } - certData, err := os.ReadFile(ccc.CertificatePath) - if err != nil { - return nil, fmt.Errorf("failed to read the certificate file (%s): %v", ccc.CertificatePath, err) - } - certificate, rsaPrivateKey, err := adal.DecodePfxCertificateData(certData, ccc.CertificatePassword) - if err != nil { - return nil, fmt.Errorf("failed to decode pkcs12 certificate while creating spt: %v", err) - } - return adal.NewMultiTenantServicePrincipalTokenFromCertificate(oauthConfig, ccc.ClientID, certificate, rsaPrivateKey, ccc.Resource) -} - -// Authorizer gets an authorizer object from client certificate. -func (ccc ClientCertificateConfig) Authorizer() (autorest.Authorizer, error) { - if len(ccc.AuxTenants) == 0 { - spToken, err := ccc.ServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get oauth token from certificate auth: %v", err) - } - return autorest.NewBearerAuthorizer(spToken), nil - } - mtSPT, err := ccc.MultiTenantServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get multitenant SPT from certificate auth: %v", err) - } - return autorest.NewMultiTenantServicePrincipalTokenAuthorizer(mtSPT), nil -} - -// DeviceFlowConfig provides the options to get a bearer authorizer using device flow authentication. -type DeviceFlowConfig struct { - ClientID string - TenantID string - AADEndpoint string - Resource string -} - -// Authorizer gets the authorizer from device flow. -func (dfc DeviceFlowConfig) Authorizer() (autorest.Authorizer, error) { - spToken, err := dfc.ServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get oauth token from device flow: %v", err) - } - return autorest.NewBearerAuthorizer(spToken), nil -} - -// ServicePrincipalToken gets the service principal token from device flow. -func (dfc DeviceFlowConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { - oauthConfig, err := adal.NewOAuthConfig(dfc.AADEndpoint, dfc.TenantID) - if err != nil { - return nil, err - } - oauthClient := &autorest.Client{} - deviceCode, err := adal.InitiateDeviceAuth(oauthClient, *oauthConfig, dfc.ClientID, dfc.Resource) - if err != nil { - return nil, fmt.Errorf("failed to start device auth flow: %s", err) - } - log.Println(*deviceCode.Message) - token, err := adal.WaitForUserCompletion(oauthClient, deviceCode) - if err != nil { - return nil, fmt.Errorf("failed to finish device auth flow: %s", err) - } - return adal.NewServicePrincipalTokenFromManualToken(*oauthConfig, dfc.ClientID, dfc.Resource, *token) -} - -// UsernamePasswordConfig provides the options to get a bearer authorizer from a username and a password. -type UsernamePasswordConfig struct { - ClientID string - Username string - Password string - TenantID string - AADEndpoint string - Resource string -} - -// ServicePrincipalToken creates a ServicePrincipalToken from username and password. -func (ups UsernamePasswordConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { - oauthConfig, err := adal.NewOAuthConfig(ups.AADEndpoint, ups.TenantID) - if err != nil { - return nil, err - } - return adal.NewServicePrincipalTokenFromUsernamePassword(*oauthConfig, ups.ClientID, ups.Username, ups.Password, ups.Resource) -} - -// Authorizer gets the authorizer from a username and a password. -func (ups UsernamePasswordConfig) Authorizer() (autorest.Authorizer, error) { - spToken, err := ups.ServicePrincipalToken() - if err != nil { - return nil, fmt.Errorf("failed to get oauth token from username and password auth: %v", err) - } - return autorest.NewBearerAuthorizer(spToken), nil -} - -// MSIConfig provides the options to get a bearer authorizer through MSI. -type MSIConfig struct { - Resource string - ClientID string -} - -// ServicePrincipalToken creates a ServicePrincipalToken from MSI. -func (mc MSIConfig) ServicePrincipalToken() (*adal.ServicePrincipalToken, error) { - spToken, err := adal.NewServicePrincipalTokenFromManagedIdentity(mc.Resource, &adal.ManagedIdentityOptions{ - ClientID: mc.ClientID, - }) - if err != nil { - return nil, fmt.Errorf("failed to get oauth token from MSI: %v", err) - } - return spToken, nil -} - -// Authorizer gets the authorizer from MSI. -func (mc MSIConfig) Authorizer() (autorest.Authorizer, error) { - spToken, err := mc.ServicePrincipalToken() - if err != nil { - return nil, err - } - - return autorest.NewBearerAuthorizer(spToken), nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go deleted file mode 100644 index f7eb26fd36..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/auth/go_mod_tidy_hack.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build modhack -// +build modhack - -package auth - -// 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 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" diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go b/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go deleted file mode 100644 index 09c870809b..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/azure.go +++ /dev/null @@ -1,388 +0,0 @@ -// Package azure provides Azure-specific implementations used with AutoRest. -// See the included examples for more detail. -package azure - -// 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. - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "net/http" - "regexp" - "strconv" - "strings" - - "github.com/Azure/go-autorest/autorest" -) - -const ( - // HeaderClientID is the Azure extension header to set a user-specified request ID. - HeaderClientID = "x-ms-client-request-id" - - // HeaderReturnClientID is the Azure extension header to set if the user-specified request ID - // should be included in the response. - HeaderReturnClientID = "x-ms-return-client-request-id" - - // HeaderContentType is the type of the content in the HTTP response. - HeaderContentType = "Content-Type" - - // HeaderRequestID is the Azure extension header of the service generated request ID returned - // in the response. - HeaderRequestID = "x-ms-request-id" -) - -// ServiceError encapsulates the error response from an Azure service. -// It adhears to the OData v4 specification for error responses. -type ServiceError struct { - Code string `json:"code"` - Message string `json:"message"` - Target *string `json:"target"` - Details []map[string]interface{} `json:"details"` - InnerError map[string]interface{} `json:"innererror"` - AdditionalInfo []map[string]interface{} `json:"additionalInfo"` -} - -func (se ServiceError) Error() string { - result := fmt.Sprintf("Code=%q Message=%q", se.Code, se.Message) - - if se.Target != nil { - result += fmt.Sprintf(" Target=%q", *se.Target) - } - - if se.Details != nil { - d, err := json.Marshal(se.Details) - if err != nil { - result += fmt.Sprintf(" Details=%v", se.Details) - } - result += fmt.Sprintf(" Details=%s", d) - } - - if se.InnerError != nil { - d, err := json.Marshal(se.InnerError) - if err != nil { - result += fmt.Sprintf(" InnerError=%v", se.InnerError) - } - result += fmt.Sprintf(" InnerError=%s", d) - } - - if se.AdditionalInfo != nil { - d, err := json.Marshal(se.AdditionalInfo) - if err != nil { - result += fmt.Sprintf(" AdditionalInfo=%v", se.AdditionalInfo) - } - result += fmt.Sprintf(" AdditionalInfo=%s", d) - } - - return result -} - -// UnmarshalJSON implements the json.Unmarshaler interface for the ServiceError type. -func (se *ServiceError) UnmarshalJSON(b []byte) error { - // http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793091 - - type serviceErrorInternal struct { - Code string `json:"code"` - Message string `json:"message"` - Target *string `json:"target,omitempty"` - AdditionalInfo []map[string]interface{} `json:"additionalInfo,omitempty"` - // not all services conform to the OData v4 spec. - // the following fields are where we've seen discrepancies - - // spec calls for []map[string]interface{} but have seen map[string]interface{} - Details interface{} `json:"details,omitempty"` - - // spec calls for map[string]interface{} but have seen []map[string]interface{} and string - InnerError interface{} `json:"innererror,omitempty"` - } - - sei := serviceErrorInternal{} - if err := json.Unmarshal(b, &sei); err != nil { - return err - } - - // copy the fields we know to be correct - se.AdditionalInfo = sei.AdditionalInfo - se.Code = sei.Code - se.Message = sei.Message - se.Target = sei.Target - - // converts an []interface{} to []map[string]interface{} - arrayOfObjs := func(v interface{}) ([]map[string]interface{}, bool) { - arrayOf, ok := v.([]interface{}) - if !ok { - return nil, false - } - final := []map[string]interface{}{} - for _, item := range arrayOf { - as, ok := item.(map[string]interface{}) - if !ok { - return nil, false - } - final = append(final, as) - } - return final, true - } - - // convert the remaining fields, falling back to raw JSON if necessary - - if c, ok := arrayOfObjs(sei.Details); ok { - se.Details = c - } else if c, ok := sei.Details.(map[string]interface{}); ok { - se.Details = []map[string]interface{}{c} - } else if sei.Details != nil { - // stuff into Details - se.Details = []map[string]interface{}{ - {"raw": sei.Details}, - } - } - - if c, ok := sei.InnerError.(map[string]interface{}); ok { - se.InnerError = c - } else if c, ok := arrayOfObjs(sei.InnerError); ok { - // if there's only one error extract it - if len(c) == 1 { - se.InnerError = c[0] - } else { - // multiple errors, stuff them into the value - se.InnerError = map[string]interface{}{ - "multi": c, - } - } - } else if c, ok := sei.InnerError.(string); ok { - se.InnerError = map[string]interface{}{"error": c} - } else if sei.InnerError != nil { - // stuff into InnerError - se.InnerError = map[string]interface{}{ - "raw": sei.InnerError, - } - } - return nil -} - -// RequestError describes an error response returned by Azure service. -type RequestError struct { - autorest.DetailedError - - // The error returned by the Azure service. - ServiceError *ServiceError `json:"error" xml:"Error"` - - // The request id (from the x-ms-request-id-header) of the request. - RequestID string -} - -// Error returns a human-friendly error message from service error. -func (e RequestError) Error() string { - return fmt.Sprintf("autorest/azure: Service returned an error. Status=%v %v", - e.StatusCode, e.ServiceError) -} - -// IsAzureError returns true if the passed error is an Azure Service error; false otherwise. -func IsAzureError(e error) bool { - _, ok := e.(*RequestError) - return ok -} - -// Resource contains details about an Azure resource. -type Resource struct { - SubscriptionID string - ResourceGroup string - Provider string - ResourceType string - ResourceName string -} - -// String function returns a string in form of azureResourceID -func (r Resource) String() string { - return fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/%s/%s/%s", r.SubscriptionID, r.ResourceGroup, r.Provider, r.ResourceType, r.ResourceName) -} - -// ParseResourceID parses a resource ID into a ResourceDetails struct. -// See https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/template-functions-resource?tabs=json#resourceid. -func ParseResourceID(resourceID string) (Resource, error) { - - const resourceIDPatternText = `(?i)^/subscriptions/(.+)/resourceGroups/(.+)/providers/(.+?)/(.+?)/(.+)$` - resourceIDPattern := regexp.MustCompile(resourceIDPatternText) - match := resourceIDPattern.FindStringSubmatch(resourceID) - - if len(match) == 0 { - return Resource{}, fmt.Errorf("parsing failed for %s. Invalid resource Id format", resourceID) - } - - v := strings.Split(match[5], "/") - resourceName := v[len(v)-1] - - result := Resource{ - SubscriptionID: match[1], - ResourceGroup: match[2], - Provider: match[3], - ResourceType: match[4], - ResourceName: resourceName, - } - - return result, nil -} - -// NewErrorWithError creates a new Error conforming object from the -// passed packageType, method, statusCode of the given resp (UndefinedStatusCode -// if resp is nil), message, and original error. message is treated as a format -// string to which the optional args apply. -func NewErrorWithError(original error, packageType string, method string, resp *http.Response, message string, args ...interface{}) RequestError { - if v, ok := original.(*RequestError); ok { - return *v - } - - statusCode := autorest.UndefinedStatusCode - if resp != nil { - statusCode = resp.StatusCode - } - return RequestError{ - DetailedError: autorest.DetailedError{ - Original: original, - PackageType: packageType, - Method: method, - StatusCode: statusCode, - Message: fmt.Sprintf(message, args...), - }, - } -} - -// WithReturningClientID returns a PrepareDecorator that adds an HTTP extension header of -// x-ms-client-request-id whose value is the passed, undecorated UUID (e.g., -// "0F39878C-5F76-4DB8-A25D-61D2C193C3CA"). It also sets the x-ms-return-client-request-id -// header to true such that UUID accompanies the http.Response. -func WithReturningClientID(uuid string) autorest.PrepareDecorator { - preparer := autorest.CreatePreparer( - WithClientID(uuid), - WithReturnClientID(true)) - - return func(p autorest.Preparer) autorest.Preparer { - return autorest.PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err != nil { - return r, err - } - return preparer.Prepare(r) - }) - } -} - -// WithClientID returns a PrepareDecorator that adds an HTTP extension header of -// x-ms-client-request-id whose value is passed, undecorated UUID (e.g., -// "0F39878C-5F76-4DB8-A25D-61D2C193C3CA"). -func WithClientID(uuid string) autorest.PrepareDecorator { - return autorest.WithHeader(HeaderClientID, uuid) -} - -// WithReturnClientID returns a PrepareDecorator that adds an HTTP extension header of -// x-ms-return-client-request-id whose boolean value indicates if the value of the -// x-ms-client-request-id header should be included in the http.Response. -func WithReturnClientID(b bool) autorest.PrepareDecorator { - return autorest.WithHeader(HeaderReturnClientID, strconv.FormatBool(b)) -} - -// ExtractClientID extracts the client identifier from the x-ms-client-request-id header set on the -// http.Request sent to the service (and returned in the http.Response) -func ExtractClientID(resp *http.Response) string { - return autorest.ExtractHeaderValue(HeaderClientID, resp) -} - -// ExtractRequestID extracts the Azure server generated request identifier from the -// x-ms-request-id header. -func ExtractRequestID(resp *http.Response) string { - return autorest.ExtractHeaderValue(HeaderRequestID, resp) -} - -// WithErrorUnlessStatusCode returns a RespondDecorator that emits an -// azure.RequestError by reading the response body unless the response HTTP status code -// is among the set passed. -// -// If there is a chance service may return responses other than the Azure error -// format and the response cannot be parsed into an error, a decoding error will -// be returned containing the response body. In any case, the Responder will -// return an error if the status code is not satisfied. -// -// If this Responder returns an error, the response body will be replaced with -// an in-memory reader, which needs no further closing. -func WithErrorUnlessStatusCode(codes ...int) autorest.RespondDecorator { - return func(r autorest.Responder) autorest.Responder { - return autorest.ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil && !autorest.ResponseHasStatusCode(resp, codes...) { - var e RequestError - defer resp.Body.Close() - - encodedAs := autorest.EncodedAsJSON - if strings.Contains(resp.Header.Get("Content-Type"), "xml") { - encodedAs = autorest.EncodedAsXML - } - - // Copy and replace the Body in case it does not contain an error object. - // This will leave the Body available to the caller. - b, decodeErr := autorest.CopyAndDecode(encodedAs, resp.Body, &e) - resp.Body = io.NopCloser(&b) - if decodeErr != nil { - return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, decodeErr) - } - if e.ServiceError == nil { - // Check if error is unwrapped ServiceError - decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) - if err := decoder.Decode(&e.ServiceError); err != nil { - return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, err) - } - - // for example, should the API return the literal value `null` as the response - if e.ServiceError == nil { - e.ServiceError = &ServiceError{ - Code: "Unknown", - Message: "Unknown service error", - Details: []map[string]interface{}{ - { - "HttpResponse.Body": b.String(), - }, - }, - } - } - } - - if e.ServiceError != nil && e.ServiceError.Message == "" { - // if we're here it means the returned error wasn't OData v4 compliant. - // try to unmarshal the body in hopes of getting something. - rawBody := map[string]interface{}{} - decoder := autorest.NewDecoder(encodedAs, bytes.NewReader(b.Bytes())) - if err := decoder.Decode(&rawBody); err != nil { - return fmt.Errorf("autorest/azure: error response cannot be parsed: %q error: %v", b, err) - } - - e.ServiceError = &ServiceError{ - Code: "Unknown", - Message: "Unknown service error", - } - if len(rawBody) > 0 { - e.ServiceError.Details = []map[string]interface{}{rawBody} - } - } - e.Response = resp - e.RequestID = ExtractRequestID(resp) - if e.StatusCode == nil { - e.StatusCode = resp.StatusCode - } - err = &e - } - return err - }) - } -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/azure/cli/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go deleted file mode 100644 index 50d6f0391a..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/go_mod_tidy_hack.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build modhack -// +build modhack - -package cli - -// 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 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" diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go deleted file mode 100644 index f45c3a516d..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/profile.go +++ /dev/null @@ -1,83 +0,0 @@ -package cli - -// 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. - -import ( - "bytes" - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path/filepath" - - "github.com/dimchansky/utfbom" - "github.com/mitchellh/go-homedir" -) - -// Profile represents a Profile from the Azure CLI -type Profile struct { - InstallationID string `json:"installationId"` - Subscriptions []Subscription `json:"subscriptions"` -} - -// Subscription represents a Subscription from the Azure CLI -type Subscription struct { - EnvironmentName string `json:"environmentName"` - ID string `json:"id"` - IsDefault bool `json:"isDefault"` - Name string `json:"name"` - State string `json:"state"` - TenantID string `json:"tenantId"` - User *User `json:"user"` -} - -// User represents a User from the Azure CLI -type User struct { - Name string `json:"name"` - Type string `json:"type"` -} - -const azureProfileJSON = "azureProfile.json" - -func configDir() string { - return os.Getenv("AZURE_CONFIG_DIR") -} - -// ProfilePath returns the path where the Azure Profile is stored from the Azure CLI -func ProfilePath() (string, error) { - if cfgDir := configDir(); cfgDir != "" { - return filepath.Join(cfgDir, azureProfileJSON), nil - } - return homedir.Expand("~/.azure/" + azureProfileJSON) -} - -// LoadProfile restores a Profile object from a file located at 'path'. -func LoadProfile(path string) (result Profile, err error) { - var contents []byte - contents, err = ioutil.ReadFile(path) - if err != nil { - err = fmt.Errorf("failed to open file (%s) while loading token: %v", path, err) - return - } - reader := utfbom.SkipOnly(bytes.NewReader(contents)) - - dec := json.NewDecoder(reader) - if err = dec.Decode(&result); err != nil { - err = fmt.Errorf("failed to decode contents of file (%s) into a Profile representation: %v", path, err) - return - } - - return -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go b/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go deleted file mode 100644 index 486619111c..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/cli/token.go +++ /dev/null @@ -1,227 +0,0 @@ -package cli - -// 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. - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "os/exec" - "path/filepath" - "regexp" - "runtime" - "strconv" - "time" - - "github.com/Azure/go-autorest/autorest/adal" - "github.com/Azure/go-autorest/autorest/date" - "github.com/mitchellh/go-homedir" -) - -// Token represents an AccessToken from the Azure CLI -type Token struct { - AccessToken string `json:"accessToken"` - Authority string `json:"_authority"` - ClientID string `json:"_clientId"` - ExpiresOn string `json:"expiresOn"` - IdentityProvider string `json:"identityProvider"` - IsMRRT bool `json:"isMRRT"` - RefreshToken string `json:"refreshToken"` - Resource string `json:"resource"` - TokenType string `json:"tokenType"` - UserID string `json:"userId"` -} - -const accessTokensJSON = "accessTokens.json" - -// ToADALToken converts an Azure CLI `Token`` to an `adal.Token`` -func (t Token) ToADALToken() (converted adal.Token, err error) { - tokenExpirationDate, err := ParseExpirationDate(t.ExpiresOn) - if err != nil { - err = fmt.Errorf("Error parsing Token Expiration Date %q: %+v", t.ExpiresOn, err) - return - } - - difference := tokenExpirationDate.Sub(date.UnixEpoch()) - - converted = adal.Token{ - AccessToken: t.AccessToken, - Type: t.TokenType, - ExpiresIn: "3600", - ExpiresOn: json.Number(strconv.Itoa(int(difference.Seconds()))), - RefreshToken: t.RefreshToken, - Resource: t.Resource, - } - return -} - -// AccessTokensPath returns the path where access tokens are stored from the Azure CLI -// TODO(#199): add unit test. -func AccessTokensPath() (string, error) { - // Azure-CLI allows user to customize the path of access tokens through environment variable. - if accessTokenPath := os.Getenv("AZURE_ACCESS_TOKEN_FILE"); accessTokenPath != "" { - return accessTokenPath, nil - } - - // Azure-CLI allows user to customize the path to Azure config directory through environment variable. - if cfgDir := configDir(); cfgDir != "" { - return filepath.Join(cfgDir, accessTokensJSON), nil - } - - // Fallback logic to default path on non-cloud-shell environment. - // TODO(#200): remove the dependency on hard-coding path. - return homedir.Expand("~/.azure/" + accessTokensJSON) -} - -// ParseExpirationDate parses either a Azure CLI or CloudShell date into a time object -func ParseExpirationDate(input string) (*time.Time, error) { - // CloudShell (and potentially the Azure CLI in future) - expirationDate, cloudShellErr := time.Parse(time.RFC3339, input) - if cloudShellErr != nil { - // Azure CLI (Python) e.g. 2017-08-31 19:48:57.998857 (plus the local timezone) - const cliFormat = "2006-01-02 15:04:05.999999" - expirationDate, cliErr := time.ParseInLocation(cliFormat, input, time.Local) - if cliErr == nil { - return &expirationDate, nil - } - - return nil, fmt.Errorf("Error parsing expiration date %q.\n\nCloudShell Error: \n%+v\n\nCLI Error:\n%+v", input, cloudShellErr, cliErr) - } - - return &expirationDate, nil -} - -// LoadTokens restores a set of Token objects from a file located at 'path'. -func LoadTokens(path string) ([]Token, error) { - file, err := os.Open(path) - if err != nil { - return nil, fmt.Errorf("failed to open file (%s) while loading token: %v", path, err) - } - defer file.Close() - - var tokens []Token - - dec := json.NewDecoder(file) - if err = dec.Decode(&tokens); err != nil { - return nil, fmt.Errorf("failed to decode contents of file (%s) into a `cli.Token` representation: %v", path, err) - } - - return tokens, nil -} - -// GetTokenFromCLI gets a token using Azure CLI 2.0 for local development scenarios. -func GetTokenFromCLI(resource string) (*Token, error) { - return GetTokenFromCLIWithParams(GetAccessTokenParams{Resource: resource}) -} - -// GetAccessTokenParams is the parameter struct of GetTokenFromCLIWithParams -type GetAccessTokenParams struct { - Resource string - ResourceType string - Subscription string - Tenant string -} - -// GetTokenFromCLIWithParams gets a token using Azure CLI 2.0 for local development scenarios. -func GetTokenFromCLIWithParams(params GetAccessTokenParams) (*Token, error) { - cliCmd := GetAzureCLICommand() - - cliCmd.Args = append(cliCmd.Args, "account", "get-access-token", "-o", "json") - if params.Resource != "" { - if err := validateParameter(params.Resource); err != nil { - return nil, err - } - cliCmd.Args = append(cliCmd.Args, "--resource", params.Resource) - } - if params.ResourceType != "" { - if err := validateParameter(params.ResourceType); err != nil { - return nil, err - } - cliCmd.Args = append(cliCmd.Args, "--resource-type", params.ResourceType) - } - if params.Subscription != "" { - if err := validateParameter(params.Subscription); err != nil { - return nil, err - } - cliCmd.Args = append(cliCmd.Args, "--subscription", params.Subscription) - } - if params.Tenant != "" { - if err := validateParameter(params.Tenant); err != nil { - return nil, err - } - cliCmd.Args = append(cliCmd.Args, "--tenant", params.Tenant) - } - - var stderr bytes.Buffer - cliCmd.Stderr = &stderr - - output, err := cliCmd.Output() - if err != nil { - if stderr.Len() > 0 { - return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", stderr.String()) - } - - return nil, fmt.Errorf("Invoking Azure CLI failed with the following error: %s", err.Error()) - } - - tokenResponse := Token{} - err = json.Unmarshal(output, &tokenResponse) - if err != nil { - return nil, err - } - - return &tokenResponse, err -} - -func validateParameter(param string) error { - // Validate parameters, since it gets sent as a command line argument to Azure CLI - const invalidResourceErrorTemplate = "Parameter %s is not in expected format. Only alphanumeric characters, [dot], [colon], [hyphen], and [forward slash] are allowed." - match, err := regexp.MatchString("^[0-9a-zA-Z-.:/]+$", param) - if err != nil { - return err - } - if !match { - return fmt.Errorf(invalidResourceErrorTemplate, param) - } - return nil -} - -// GetAzureCLICommand can be used to run arbitrary Azure CLI command -func GetAzureCLICommand() *exec.Cmd { - // This is the path that a developer can set to tell this class what the install path for Azure CLI is. - const azureCLIPath = "AzureCLIPath" - - // The default install paths are used to find Azure CLI. This is for security, so that any path in the calling program's Path environment is not used to execute Azure CLI. - azureCLIDefaultPathWindows := fmt.Sprintf("%s\\Microsoft SDKs\\Azure\\CLI2\\wbin; %s\\Microsoft SDKs\\Azure\\CLI2\\wbin", os.Getenv("ProgramFiles(x86)"), os.Getenv("ProgramFiles")) - - // Default path for non-Windows. - const azureCLIDefaultPath = "/bin:/sbin:/usr/bin:/usr/local/bin" - - // Execute Azure CLI to get token - var cliCmd *exec.Cmd - if runtime.GOOS == "windows" { - cliCmd = exec.Command(fmt.Sprintf("%s\\system32\\cmd.exe", os.Getenv("windir"))) - cliCmd.Env = os.Environ() - cliCmd.Env = append(cliCmd.Env, fmt.Sprintf("PATH=%s;%s", os.Getenv(azureCLIPath), azureCLIDefaultPathWindows)) - cliCmd.Args = append(cliCmd.Args, "/c", "az") - } else { - cliCmd = exec.Command("az") - cliCmd.Env = os.Environ() - cliCmd.Env = append(cliCmd.Env, fmt.Sprintf("PATH=%s:%s", os.Getenv(azureCLIPath), azureCLIDefaultPath)) - } - - return cliCmd -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go b/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go deleted file mode 100644 index 4684291a88..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/environments.go +++ /dev/null @@ -1,330 +0,0 @@ -package azure - -// 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. - -import ( - "encoding/json" - "fmt" - "os" - "strings" -) - -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, - "AZUREGERMANCLOUD": GermanCloud, - "AZURECLOUD": PublicCloud, - "AZUREPUBLICCLOUD": PublicCloud, - "AZUREUSGOVERNMENT": USGovernmentCloud, - "AZUREUSGOVERNMENTCLOUD": USGovernmentCloud, //TODO: deprecate -} - -// 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"` - OSSRDBMS string `json:"ossRDBMS"` - Storage string `json:"storage"` - Synapse string `json:"synapse"` - ServiceBus string `json:"serviceBus"` - SQLDatabase string `json:"sqlDatabase"` - CosmosDB string `json:"cosmosDB"` - ManagedHSM string `json:"managedHSM"` - MicrosoftGraph string `json:"microsoftGraph"` -} - -// 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"` - ManagedHSMEndpoint string `json:"managedHSMEndpoint"` - GraphEndpoint string `json:"graphEndpoint"` - ServiceBusEndpoint string `json:"serviceBusEndpoint"` - BatchManagementEndpoint string `json:"batchManagementEndpoint"` - MicrosoftGraphEndpoint string `json:"microsoftGraphEndpoint"` - StorageEndpointSuffix string `json:"storageEndpointSuffix"` - CosmosDBDNSSuffix string `json:"cosmosDBDNSSuffix"` - MariaDBDNSSuffix string `json:"mariaDBDNSSuffix"` - MySQLDatabaseDNSSuffix string `json:"mySqlDatabaseDNSSuffix"` - PostgresqlDatabaseDNSSuffix string `json:"postgresqlDatabaseDNSSuffix"` - SQLDatabaseDNSSuffix string `json:"sqlDatabaseDNSSuffix"` - TrafficManagerDNSSuffix string `json:"trafficManagerDNSSuffix"` - KeyVaultDNSSuffix string `json:"keyVaultDNSSuffix"` - ManagedHSMDNSSuffix string `json:"managedHSMDNSSuffix"` - ServiceBusEndpointSuffix string `json:"serviceBusEndpointSuffix"` - ServiceManagementVMDNSSuffix string `json:"serviceManagementVMDNSSuffix"` - ResourceManagerVMDNSSuffix string `json:"resourceManagerVMDNSSuffix"` - ContainerRegistryDNSSuffix string `json:"containerRegistryDNSSuffix"` - TokenAudience string `json:"tokenAudience"` - APIManagementHostNameSuffix string `json:"apiManagementHostNameSuffix"` - SynapseEndpointSuffix string `json:"synapseEndpointSuffix"` - DatalakeSuffix string `json:"datalakeSuffix"` - ResourceIdentifiers ResourceIdentifier `json:"resourceIdentifiers"` -} - -var ( - // PublicCloud is the default public Azure cloud environment - PublicCloud = Environment{ - Name: "AzurePublicCloud", - ManagementPortalURL: "https://manage.windowsazure.com/", - PublishSettingsURL: "https://manage.windowsazure.com/publishsettings/index", - ServiceManagementEndpoint: "https://management.core.windows.net/", - ResourceManagerEndpoint: "https://management.azure.com/", - ActiveDirectoryEndpoint: "https://login.microsoftonline.com/", - GalleryEndpoint: "https://gallery.azure.com/", - KeyVaultEndpoint: "https://vault.azure.net/", - ManagedHSMEndpoint: "https://managedhsm.azure.net/", - GraphEndpoint: "https://graph.windows.net/", - ServiceBusEndpoint: "https://servicebus.windows.net/", - BatchManagementEndpoint: "https://batch.core.windows.net/", - MicrosoftGraphEndpoint: "https://graph.microsoft.com/", - StorageEndpointSuffix: "core.windows.net", - CosmosDBDNSSuffix: "documents.azure.com", - MariaDBDNSSuffix: "mariadb.database.azure.com", - MySQLDatabaseDNSSuffix: "mysql.database.azure.com", - PostgresqlDatabaseDNSSuffix: "postgres.database.azure.com", - SQLDatabaseDNSSuffix: "database.windows.net", - TrafficManagerDNSSuffix: "trafficmanager.net", - KeyVaultDNSSuffix: "vault.azure.net", - ManagedHSMDNSSuffix: "managedhsm.azure.net", - ServiceBusEndpointSuffix: "servicebus.windows.net", - ServiceManagementVMDNSSuffix: "cloudapp.net", - ResourceManagerVMDNSSuffix: "cloudapp.azure.com", - ContainerRegistryDNSSuffix: "azurecr.io", - TokenAudience: "https://management.azure.com/", - APIManagementHostNameSuffix: "azure-api.net", - SynapseEndpointSuffix: "dev.azuresynapse.net", - DatalakeSuffix: "azuredatalakestore.net", - 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", - OSSRDBMS: "https://ossrdbms-aad.database.windows.net", - Storage: "https://storage.azure.com/", - Synapse: "https://dev.azuresynapse.net", - ServiceBus: "https://servicebus.azure.net/", - SQLDatabase: "https://database.windows.net/", - CosmosDB: "https://cosmos.azure.com", - ManagedHSM: "https://managedhsm.azure.net", - MicrosoftGraph: "https://graph.microsoft.com/", - }, - } - - // USGovernmentCloud is the cloud environment for the US Government - USGovernmentCloud = Environment{ - Name: "AzureUSGovernmentCloud", - ManagementPortalURL: "https://manage.windowsazure.us/", - PublishSettingsURL: "https://manage.windowsazure.us/publishsettings/index", - ServiceManagementEndpoint: "https://management.core.usgovcloudapi.net/", - ResourceManagerEndpoint: "https://management.usgovcloudapi.net/", - ActiveDirectoryEndpoint: "https://login.microsoftonline.us/", - GalleryEndpoint: "https://gallery.usgovcloudapi.net/", - KeyVaultEndpoint: "https://vault.usgovcloudapi.net/", - ManagedHSMEndpoint: NotAvailable, - GraphEndpoint: "https://graph.windows.net/", - ServiceBusEndpoint: "https://servicebus.usgovcloudapi.net/", - BatchManagementEndpoint: "https://batch.core.usgovcloudapi.net/", - MicrosoftGraphEndpoint: "https://graph.microsoft.us/", - StorageEndpointSuffix: "core.usgovcloudapi.net", - CosmosDBDNSSuffix: "documents.azure.us", - MariaDBDNSSuffix: "mariadb.database.usgovcloudapi.net", - MySQLDatabaseDNSSuffix: "mysql.database.usgovcloudapi.net", - PostgresqlDatabaseDNSSuffix: "postgres.database.usgovcloudapi.net", - SQLDatabaseDNSSuffix: "database.usgovcloudapi.net", - TrafficManagerDNSSuffix: "usgovtrafficmanager.net", - KeyVaultDNSSuffix: "vault.usgovcloudapi.net", - ManagedHSMDNSSuffix: NotAvailable, - ServiceBusEndpointSuffix: "servicebus.usgovcloudapi.net", - ServiceManagementVMDNSSuffix: "usgovcloudapp.net", - ResourceManagerVMDNSSuffix: "cloudapp.usgovcloudapi.net", - ContainerRegistryDNSSuffix: "azurecr.us", - TokenAudience: "https://management.usgovcloudapi.net/", - APIManagementHostNameSuffix: "azure-api.us", - SynapseEndpointSuffix: "dev.azuresynapse.usgovcloudapi.net", - DatalakeSuffix: NotAvailable, - 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", - OSSRDBMS: "https://ossrdbms-aad.database.usgovcloudapi.net", - Storage: "https://storage.azure.com/", - Synapse: "https://dev.azuresynapse.usgovcloudapi.net", - ServiceBus: "https://servicebus.azure.net/", - SQLDatabase: "https://database.usgovcloudapi.net/", - CosmosDB: "https://cosmos.azure.com", - ManagedHSM: NotAvailable, - MicrosoftGraph: "https://graph.microsoft.us/", - }, - } - - // ChinaCloud is the cloud environment operated in China - ChinaCloud = Environment{ - Name: "AzureChinaCloud", - ManagementPortalURL: "https://manage.chinacloudapi.com/", - PublishSettingsURL: "https://manage.chinacloudapi.com/publishsettings/index", - ServiceManagementEndpoint: "https://management.core.chinacloudapi.cn/", - ResourceManagerEndpoint: "https://management.chinacloudapi.cn/", - ActiveDirectoryEndpoint: "https://login.chinacloudapi.cn/", - GalleryEndpoint: "https://gallery.chinacloudapi.cn/", - KeyVaultEndpoint: "https://vault.azure.cn/", - ManagedHSMEndpoint: NotAvailable, - GraphEndpoint: "https://graph.chinacloudapi.cn/", - ServiceBusEndpoint: "https://servicebus.chinacloudapi.cn/", - BatchManagementEndpoint: "https://batch.chinacloudapi.cn/", - MicrosoftGraphEndpoint: "https://microsoftgraph.chinacloudapi.cn/", - StorageEndpointSuffix: "core.chinacloudapi.cn", - CosmosDBDNSSuffix: "documents.azure.cn", - MariaDBDNSSuffix: "mariadb.database.chinacloudapi.cn", - MySQLDatabaseDNSSuffix: "mysql.database.chinacloudapi.cn", - PostgresqlDatabaseDNSSuffix: "postgres.database.chinacloudapi.cn", - SQLDatabaseDNSSuffix: "database.chinacloudapi.cn", - TrafficManagerDNSSuffix: "trafficmanager.cn", - KeyVaultDNSSuffix: "vault.azure.cn", - ManagedHSMDNSSuffix: NotAvailable, - ServiceBusEndpointSuffix: "servicebus.chinacloudapi.cn", - ServiceManagementVMDNSSuffix: "chinacloudapp.cn", - ResourceManagerVMDNSSuffix: "cloudapp.chinacloudapi.cn", - ContainerRegistryDNSSuffix: "azurecr.cn", - TokenAudience: "https://management.chinacloudapi.cn/", - APIManagementHostNameSuffix: "azure-api.cn", - SynapseEndpointSuffix: "dev.azuresynapse.azure.cn", - DatalakeSuffix: NotAvailable, - ResourceIdentifiers: ResourceIdentifier{ - Graph: "https://graph.chinacloudapi.cn/", - KeyVault: "https://vault.azure.cn", - Datalake: NotAvailable, - Batch: "https://batch.chinacloudapi.cn/", - OperationalInsights: NotAvailable, - OSSRDBMS: "https://ossrdbms-aad.database.chinacloudapi.cn", - Storage: "https://storage.azure.com/", - Synapse: "https://dev.azuresynapse.net", - ServiceBus: "https://servicebus.azure.net/", - SQLDatabase: "https://database.chinacloudapi.cn/", - CosmosDB: "https://cosmos.azure.com", - ManagedHSM: NotAvailable, - MicrosoftGraph: "https://microsoftgraph.chinacloudapi.cn", - }, - } - - // GermanCloud is the cloud environment operated in Germany - GermanCloud = Environment{ - Name: "AzureGermanCloud", - ManagementPortalURL: "http://portal.microsoftazure.de/", - PublishSettingsURL: "https://manage.microsoftazure.de/publishsettings/index", - ServiceManagementEndpoint: "https://management.core.cloudapi.de/", - ResourceManagerEndpoint: "https://management.microsoftazure.de/", - ActiveDirectoryEndpoint: "https://login.microsoftonline.de/", - GalleryEndpoint: "https://gallery.cloudapi.de/", - KeyVaultEndpoint: "https://vault.microsoftazure.de/", - ManagedHSMEndpoint: NotAvailable, - GraphEndpoint: "https://graph.cloudapi.de/", - ServiceBusEndpoint: "https://servicebus.cloudapi.de/", - BatchManagementEndpoint: "https://batch.cloudapi.de/", - MicrosoftGraphEndpoint: NotAvailable, - StorageEndpointSuffix: "core.cloudapi.de", - CosmosDBDNSSuffix: "documents.microsoftazure.de", - MariaDBDNSSuffix: "mariadb.database.cloudapi.de", - MySQLDatabaseDNSSuffix: "mysql.database.cloudapi.de", - PostgresqlDatabaseDNSSuffix: "postgres.database.cloudapi.de", - SQLDatabaseDNSSuffix: "database.cloudapi.de", - TrafficManagerDNSSuffix: "azuretrafficmanager.de", - KeyVaultDNSSuffix: "vault.microsoftazure.de", - ManagedHSMDNSSuffix: NotAvailable, - ServiceBusEndpointSuffix: "servicebus.cloudapi.de", - ServiceManagementVMDNSSuffix: "azurecloudapp.de", - ResourceManagerVMDNSSuffix: "cloudapp.microsoftazure.de", - ContainerRegistryDNSSuffix: NotAvailable, - TokenAudience: "https://management.microsoftazure.de/", - APIManagementHostNameSuffix: NotAvailable, - SynapseEndpointSuffix: NotAvailable, - DatalakeSuffix: NotAvailable, - ResourceIdentifiers: ResourceIdentifier{ - Graph: "https://graph.cloudapi.de/", - KeyVault: "https://vault.microsoftazure.de", - Datalake: NotAvailable, - Batch: "https://batch.cloudapi.de/", - OperationalInsights: NotAvailable, - OSSRDBMS: "https://ossrdbms-aad.database.cloudapi.de", - Storage: "https://storage.azure.com/", - Synapse: NotAvailable, - ServiceBus: "https://servicebus.azure.net/", - SQLDatabase: "https://database.cloudapi.de/", - CosmosDB: "https://cosmos.azure.com", - ManagedHSM: NotAvailable, - MicrosoftGraph: NotAvailable, - }, - } -) - -// EnvironmentFromName returns an Environment based on the common name specified. -func EnvironmentFromName(name string) (Environment, error) { - // IMPORTANT - // As per @radhikagupta5: - // This is technical debt, fundamentally here because Kubernetes is not currently accepting - // contributions to the providers. Once that is an option, the provider should be updated to - // directly call `EnvironmentFromFile`. Until then, we rely on dispatching Azure Stack environment creation - // from this method based on the name that is provided to us. - if strings.EqualFold(name, "AZURESTACKCLOUD") { - return EnvironmentFromFile(os.Getenv(EnvironmentFilepathName)) - } - - name = strings.ToUpper(name) - env, ok := environments[name] - if !ok { - return env, fmt.Errorf("autorest/azure: There is no cloud environment matching the name %q", name) - } - - return env, nil -} - -// EnvironmentFromFile loads an Environment from a configuration file available on disk. -// This function is particularly useful in the Hybrid Cloud model, where one must define their own -// endpoints. -func EnvironmentFromFile(location string) (unmarshaled Environment, err error) { - fileContents, err := os.ReadFile(location) - if err != nil { - return - } - - err = json.Unmarshal(fileContents, &unmarshaled) - - return -} - -// SetEnvironment updates the environment map with the specified values. -func SetEnvironment(name string, env Environment) { - environments[strings.ToUpper(name)] = env -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go b/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go deleted file mode 100644 index f436a4512a..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/metadata_environment.go +++ /dev/null @@ -1,245 +0,0 @@ -package azure - -import ( - "encoding/json" - "fmt" - "io" - "net/http" - "strings" - - "github.com/Azure/go-autorest/autorest" -) - -// 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. - -type audience []string - -type authentication struct { - LoginEndpoint string `json:"loginEndpoint"` - Audiences audience `json:"audiences"` -} - -type environmentMetadataInfo struct { - GalleryEndpoint string `json:"galleryEndpoint"` - GraphEndpoint string `json:"graphEndpoint"` - PortalEndpoint string `json:"portalEndpoint"` - Authentication authentication `json:"authentication"` -} - -// EnvironmentProperty represent property names that clients can override -type EnvironmentProperty string - -const ( - // EnvironmentName ... - EnvironmentName EnvironmentProperty = "name" - // EnvironmentManagementPortalURL .. - EnvironmentManagementPortalURL EnvironmentProperty = "managementPortalURL" - // EnvironmentPublishSettingsURL ... - EnvironmentPublishSettingsURL EnvironmentProperty = "publishSettingsURL" - // EnvironmentServiceManagementEndpoint ... - EnvironmentServiceManagementEndpoint EnvironmentProperty = "serviceManagementEndpoint" - // EnvironmentResourceManagerEndpoint ... - EnvironmentResourceManagerEndpoint EnvironmentProperty = "resourceManagerEndpoint" - // EnvironmentActiveDirectoryEndpoint ... - EnvironmentActiveDirectoryEndpoint EnvironmentProperty = "activeDirectoryEndpoint" - // EnvironmentGalleryEndpoint ... - EnvironmentGalleryEndpoint EnvironmentProperty = "galleryEndpoint" - // EnvironmentKeyVaultEndpoint ... - EnvironmentKeyVaultEndpoint EnvironmentProperty = "keyVaultEndpoint" - // EnvironmentGraphEndpoint ... - EnvironmentGraphEndpoint EnvironmentProperty = "graphEndpoint" - // EnvironmentServiceBusEndpoint ... - EnvironmentServiceBusEndpoint EnvironmentProperty = "serviceBusEndpoint" - // EnvironmentBatchManagementEndpoint ... - EnvironmentBatchManagementEndpoint EnvironmentProperty = "batchManagementEndpoint" - // EnvironmentStorageEndpointSuffix ... - EnvironmentStorageEndpointSuffix EnvironmentProperty = "storageEndpointSuffix" - // EnvironmentSQLDatabaseDNSSuffix ... - EnvironmentSQLDatabaseDNSSuffix EnvironmentProperty = "sqlDatabaseDNSSuffix" - // EnvironmentTrafficManagerDNSSuffix ... - EnvironmentTrafficManagerDNSSuffix EnvironmentProperty = "trafficManagerDNSSuffix" - // EnvironmentKeyVaultDNSSuffix ... - EnvironmentKeyVaultDNSSuffix EnvironmentProperty = "keyVaultDNSSuffix" - // EnvironmentServiceBusEndpointSuffix ... - EnvironmentServiceBusEndpointSuffix EnvironmentProperty = "serviceBusEndpointSuffix" - // EnvironmentServiceManagementVMDNSSuffix ... - EnvironmentServiceManagementVMDNSSuffix EnvironmentProperty = "serviceManagementVMDNSSuffix" - // EnvironmentResourceManagerVMDNSSuffix ... - EnvironmentResourceManagerVMDNSSuffix EnvironmentProperty = "resourceManagerVMDNSSuffix" - // EnvironmentContainerRegistryDNSSuffix ... - EnvironmentContainerRegistryDNSSuffix EnvironmentProperty = "containerRegistryDNSSuffix" - // EnvironmentTokenAudience ... - EnvironmentTokenAudience EnvironmentProperty = "tokenAudience" -) - -// OverrideProperty represents property name and value that clients can override -type OverrideProperty struct { - Key EnvironmentProperty - Value string -} - -// EnvironmentFromURL loads an Environment from a URL -// This function is particularly useful in the Hybrid Cloud model, where one may define their own -// endpoints. -func EnvironmentFromURL(resourceManagerEndpoint string, properties ...OverrideProperty) (environment Environment, err error) { - var metadataEnvProperties environmentMetadataInfo - - if resourceManagerEndpoint == "" { - return environment, fmt.Errorf("Metadata resource manager endpoint is empty") - } - - if metadataEnvProperties, err = retrieveMetadataEnvironment(resourceManagerEndpoint); err != nil { - return environment, err - } - - // Give priority to user's override values - overrideProperties(&environment, properties) - - if environment.Name == "" { - environment.Name = "HybridEnvironment" - } - stampDNSSuffix := environment.StorageEndpointSuffix - if stampDNSSuffix == "" { - stampDNSSuffix = strings.TrimSuffix(strings.TrimPrefix(strings.Replace(resourceManagerEndpoint, strings.Split(resourceManagerEndpoint, ".")[0], "", 1), "."), "/") - environment.StorageEndpointSuffix = stampDNSSuffix - } - if environment.KeyVaultDNSSuffix == "" { - environment.KeyVaultDNSSuffix = fmt.Sprintf("%s.%s", "vault", stampDNSSuffix) - } - if environment.KeyVaultEndpoint == "" { - environment.KeyVaultEndpoint = fmt.Sprintf("%s%s", "https://", environment.KeyVaultDNSSuffix) - } - if environment.TokenAudience == "" { - environment.TokenAudience = metadataEnvProperties.Authentication.Audiences[0] - } - if environment.ActiveDirectoryEndpoint == "" { - environment.ActiveDirectoryEndpoint = metadataEnvProperties.Authentication.LoginEndpoint - } - if environment.ResourceManagerEndpoint == "" { - environment.ResourceManagerEndpoint = resourceManagerEndpoint - } - if environment.GalleryEndpoint == "" { - environment.GalleryEndpoint = metadataEnvProperties.GalleryEndpoint - } - if environment.GraphEndpoint == "" { - environment.GraphEndpoint = metadataEnvProperties.GraphEndpoint - } - - return environment, nil -} - -func overrideProperties(environment *Environment, properties []OverrideProperty) { - for _, property := range properties { - switch property.Key { - case EnvironmentName: - { - environment.Name = property.Value - } - case EnvironmentManagementPortalURL: - { - environment.ManagementPortalURL = property.Value - } - case EnvironmentPublishSettingsURL: - { - environment.PublishSettingsURL = property.Value - } - case EnvironmentServiceManagementEndpoint: - { - environment.ServiceManagementEndpoint = property.Value - } - case EnvironmentResourceManagerEndpoint: - { - environment.ResourceManagerEndpoint = property.Value - } - case EnvironmentActiveDirectoryEndpoint: - { - environment.ActiveDirectoryEndpoint = property.Value - } - case EnvironmentGalleryEndpoint: - { - environment.GalleryEndpoint = property.Value - } - case EnvironmentKeyVaultEndpoint: - { - environment.KeyVaultEndpoint = property.Value - } - case EnvironmentGraphEndpoint: - { - environment.GraphEndpoint = property.Value - } - case EnvironmentServiceBusEndpoint: - { - environment.ServiceBusEndpoint = property.Value - } - case EnvironmentBatchManagementEndpoint: - { - environment.BatchManagementEndpoint = property.Value - } - case EnvironmentStorageEndpointSuffix: - { - environment.StorageEndpointSuffix = property.Value - } - case EnvironmentSQLDatabaseDNSSuffix: - { - environment.SQLDatabaseDNSSuffix = property.Value - } - case EnvironmentTrafficManagerDNSSuffix: - { - environment.TrafficManagerDNSSuffix = property.Value - } - case EnvironmentKeyVaultDNSSuffix: - { - environment.KeyVaultDNSSuffix = property.Value - } - case EnvironmentServiceBusEndpointSuffix: - { - environment.ServiceBusEndpointSuffix = property.Value - } - case EnvironmentServiceManagementVMDNSSuffix: - { - environment.ServiceManagementVMDNSSuffix = property.Value - } - case EnvironmentResourceManagerVMDNSSuffix: - { - environment.ResourceManagerVMDNSSuffix = property.Value - } - case EnvironmentContainerRegistryDNSSuffix: - { - environment.ContainerRegistryDNSSuffix = property.Value - } - case EnvironmentTokenAudience: - { - environment.TokenAudience = property.Value - } - } - } -} - -func retrieveMetadataEnvironment(endpoint string) (environment environmentMetadataInfo, err error) { - client := autorest.NewClientWithUserAgent("") - managementEndpoint := fmt.Sprintf("%s%s", strings.TrimSuffix(endpoint, "/"), "/metadata/endpoints?api-version=1.0") - req, _ := http.NewRequest("GET", managementEndpoint, nil) - response, err := client.Do(req) - if err != nil { - return environment, err - } - defer response.Body.Close() - jsonResponse, err := io.ReadAll(response.Body) - if err != nil { - return environment, err - } - err = json.Unmarshal(jsonResponse, &environment) - return environment, err -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go b/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go deleted file mode 100644 index 5b52357f95..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/azure/rp.go +++ /dev/null @@ -1,204 +0,0 @@ -// 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. - -package azure - -import ( - "errors" - "fmt" - "net/http" - "net/url" - "strings" - "time" - - "github.com/Azure/go-autorest/autorest" -) - -// DoRetryWithRegistration tries to register the resource provider in case it is unregistered. -// It also handles request retries -func DoRetryWithRegistration(client autorest.Client) autorest.SendDecorator { - return func(s autorest.Sender) autorest.Sender { - return autorest.SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - rr := autorest.NewRetriableRequest(r) - for currentAttempt := 0; currentAttempt < client.RetryAttempts; currentAttempt++ { - err = rr.Prepare() - if err != nil { - return resp, err - } - - resp, err = autorest.SendWithSender(s, rr.Request(), - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...), - ) - if err != nil { - return resp, err - } - - if resp.StatusCode != http.StatusConflict || client.SkipResourceProviderRegistration { - return resp, err - } - - var re RequestError - if strings.Contains(r.Header.Get("Content-Type"), "xml") { - // XML errors (e.g. Storage Data Plane) only return the inner object - err = autorest.Respond(resp, autorest.ByUnmarshallingXML(&re.ServiceError)) - } else { - err = autorest.Respond(resp, autorest.ByUnmarshallingJSON(&re)) - } - - if err != nil { - return resp, err - } - err = re - - if re.ServiceError != nil && re.ServiceError.Code == "MissingSubscriptionRegistration" { - regErr := register(client, r, re) - if regErr != nil { - return resp, fmt.Errorf("failed auto registering Resource Provider: %s. Original error: %w", regErr, err) - } - } - } - return resp, err - }) - } -} - -func getProvider(re RequestError) (string, error) { - if re.ServiceError != nil && len(re.ServiceError.Details) > 0 { - return re.ServiceError.Details[0]["target"].(string), nil - } - return "", errors.New("provider was not found in the response") -} - -func register(client autorest.Client, originalReq *http.Request, re RequestError) error { - subID := getSubscription(originalReq.URL.Path) - if subID == "" { - return errors.New("missing parameter subscriptionID to register resource provider") - } - providerName, err := getProvider(re) - if err != nil { - return fmt.Errorf("missing parameter provider to register resource provider: %s", err) - } - newURL := url.URL{ - Scheme: originalReq.URL.Scheme, - Host: originalReq.URL.Host, - } - - // taken from the resources SDK - // with almost identical code, this sections are easier to mantain - // It is also not a good idea to import the SDK here - // https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L252 - pathParameters := map[string]interface{}{ - "resourceProviderNamespace": autorest.Encode("path", providerName), - "subscriptionId": autorest.Encode("path", subID), - } - - const APIVersion = "2016-09-01" - queryParameters := map[string]interface{}{ - "api-version": APIVersion, - } - - preparer := autorest.CreatePreparer( - autorest.AsPost(), - autorest.WithBaseURL(newURL.String()), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register", pathParameters), - autorest.WithQueryParameters(queryParameters), - ) - - req, err := preparer.Prepare(&http.Request{}) - if err != nil { - return err - } - req = req.WithContext(originalReq.Context()) - - resp, err := autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...), - ) - if err != nil { - return err - } - - type Provider struct { - RegistrationState *string `json:"registrationState,omitempty"` - } - var provider Provider - - err = autorest.Respond( - resp, - WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&provider), - autorest.ByClosing(), - ) - if err != nil { - return err - } - - // poll for registered provisioning state - registrationStartTime := time.Now() - for err == nil && (client.PollingDuration == 0 || (client.PollingDuration != 0 && time.Since(registrationStartTime) < client.PollingDuration)) { - // taken from the resources SDK - // https://github.com/Azure/azure-sdk-for-go/blob/9f366792afa3e0ddaecdc860e793ba9d75e76c27/arm/resources/resources/providers.go#L45 - preparer := autorest.CreatePreparer( - autorest.AsGet(), - autorest.WithBaseURL(newURL.String()), - autorest.WithPathParameters("/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}", pathParameters), - autorest.WithQueryParameters(queryParameters), - ) - req, err = preparer.Prepare(&http.Request{}) - if err != nil { - return err - } - req = req.WithContext(originalReq.Context()) - - resp, err := autorest.SendWithSender(client, req, - autorest.DoRetryForStatusCodes(client.RetryAttempts, client.RetryDuration, autorest.StatusCodesForRetry...), - ) - if err != nil { - return err - } - - err = autorest.Respond( - resp, - WithErrorUnlessStatusCode(http.StatusOK), - autorest.ByUnmarshallingJSON(&provider), - autorest.ByClosing(), - ) - if err != nil { - return err - } - - if provider.RegistrationState != nil && - *provider.RegistrationState == "Registered" { - break - } - - delayed := autorest.DelayWithRetryAfter(resp, originalReq.Context().Done()) - if !delayed && !autorest.DelayForBackoff(client.PollingDelay, 0, originalReq.Context().Done()) { - return originalReq.Context().Err() - } - } - if client.PollingDuration != 0 && !(time.Since(registrationStartTime) < client.PollingDuration) { - return errors.New("polling for resource provider registration has exceeded the polling duration") - } - return err -} - -func getSubscription(path string) string { - parts := strings.Split(path, "/") - for i, v := range parts { - if v == "subscriptions" && (i+1) < len(parts) { - return parts[i+1] - } - } - return "" -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/client.go b/vendor/github.com/Azure/go-autorest/autorest/client.go deleted file mode 100644 index b2f2357e76..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/client.go +++ /dev/null @@ -1,327 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "crypto/tls" - "errors" - "fmt" - "io" - "log" - "net/http" - "strings" - "time" - - "github.com/Azure/go-autorest/logger" -) - -const ( - // DefaultPollingDelay is a reasonable delay between polling requests. - DefaultPollingDelay = 30 * time.Second - - // DefaultPollingDuration is a reasonable total polling duration. - DefaultPollingDuration = 15 * time.Minute - - // DefaultRetryAttempts is number of attempts for retry status codes (5xx). - DefaultRetryAttempts = 3 - - // DefaultRetryDuration is the duration to wait between retries. - DefaultRetryDuration = 30 * time.Second -) - -var ( - // StatusCodesForRetry are a defined group of status code for which the client will retry - StatusCodesForRetry = []int{ - http.StatusRequestTimeout, // 408 - http.StatusTooManyRequests, // 429 - http.StatusInternalServerError, // 500 - http.StatusBadGateway, // 502 - http.StatusServiceUnavailable, // 503 - http.StatusGatewayTimeout, // 504 - } -) - -const ( - requestFormat = `HTTP Request Begin =================================================== -%s -===================================================== HTTP Request End -` - responseFormat = `HTTP Response Begin =================================================== -%s -===================================================== HTTP Response End -` -) - -// Response serves as the base for all responses from generated clients. It provides access to the -// last http.Response. -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 { - Logger *log.Logger -} - -// WithInspection returns a PrepareDecorator that emits the http.Request to the supplied logger. The -// body is restored after being emitted. -// -// Note: Since it reads the entire Body, this decorator should not be used where body streaming is -// important. It is best used to trace JSON or similar body values. -func (li LoggingInspector) WithInspection() PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - var body, b bytes.Buffer - - defer r.Body.Close() - - r.Body = io.NopCloser(io.TeeReader(r.Body, &body)) - if err := r.Write(&b); err != nil { - return nil, fmt.Errorf("Failed to write response: %v", err) - } - - li.Logger.Printf(requestFormat, b.String()) - - r.Body = io.NopCloser(&body) - return p.Prepare(r) - }) - } -} - -// ByInspecting returns a RespondDecorator that emits the http.Response to the supplied logger. The -// body is restored after being emitted. -// -// Note: Since it reads the entire Body, this decorator should not be used where body streaming is -// important. It is best used to trace JSON or similar body values. -func (li LoggingInspector) ByInspecting() RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - var body, b bytes.Buffer - defer resp.Body.Close() - resp.Body = io.NopCloser(io.TeeReader(resp.Body, &body)) - if err := resp.Write(&b); err != nil { - return fmt.Errorf("Failed to write response: %v", err) - } - - li.Logger.Printf(responseFormat, b.String()) - - resp.Body = io.NopCloser(&body) - return r.Respond(resp) - }) - } -} - -// Client is the base for autorest generated clients. It provides default, "do nothing" -// implementations of an Authorizer, RequestInspector, and ResponseInspector. It also returns the -// standard, undecorated http.Client as a default Sender. -// -// Generated clients should also use Error (see NewError and NewErrorWithError) for errors and -// return responses that compose with Response. -// -// Most customization of generated clients is best achieved by supplying a custom Authorizer, custom -// RequestInspector, and / or custom ResponseInspector. Users may log requests, implement circuit -// breakers (see https://msdn.microsoft.com/en-us/library/dn589784.aspx) or otherwise influence -// sending the request by providing a decorated Sender. -type Client struct { - Authorizer Authorizer - Sender Sender - RequestInspector PrepareDecorator - ResponseInspector RespondDecorator - - // PollingDelay sets the polling frequency used in absence of a Retry-After HTTP header - PollingDelay time.Duration - - // PollingDuration sets the maximum polling time after which an error is returned. - // Setting this to zero will use the provided context to control the duration. - PollingDuration time.Duration - - // RetryAttempts sets the total number of times the client will attempt to make an HTTP request. - // Set the value to 1 to disable retries. DO NOT set the value to less than 1. - RetryAttempts int - - // RetryDuration sets the delay duration for retries. - RetryDuration time.Duration - - // UserAgent, if not empty, will be set as the HTTP User-Agent header on all requests sent - // through the Do method. - UserAgent string - - Jar http.CookieJar - - // Set to true to skip attempted registration of resource providers (false by default). - SkipResourceProviderRegistration bool - - // SendDecorators can be used to override the default chain of SendDecorators. - // This can be used to specify things like a custom retry SendDecorator. - // Set this to an empty slice to use no SendDecorators. - SendDecorators []SendDecorator -} - -// 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, - RetryAttempts: DefaultRetryAttempts, - RetryDuration: DefaultRetryDuration, - UserAgent: UserAgent(), - } - c.Sender = c.sender(renegotiation) - c.AddToUserAgent(ua) - return c -} - -// AddToUserAgent adds an extension to the current user agent -func (c *Client) AddToUserAgent(extension string) error { - if extension != "" { - c.UserAgent = fmt.Sprintf("%s %s", c.UserAgent, extension) - return nil - } - return fmt.Errorf("Extension was empty, User Agent stayed as %s", c.UserAgent) -} - -// Do implements the Sender interface by invoking the active Sender after applying authorization. -// If Sender is not set, it uses a new instance of http.Client. In both cases it will, if UserAgent -// is set, apply set the User-Agent header. -func (c Client) Do(r *http.Request) (*http.Response, error) { - if r.UserAgent() == "" { - r, _ = Prepare(r, - WithUserAgent(c.UserAgent)) - } - // NOTE: c.WithInspection() must be last in the list so that it can inspect all preceding operations - r, err := Prepare(r, - c.WithAuthorization(), - c.WithInspection()) - if err != nil { - var resp *http.Response - if detErr, ok := err.(DetailedError); ok { - // if the authorization failed (e.g. invalid credentials) there will - // be a response associated with the error, be sure to return it. - resp = detErr.Response - } - return resp, NewErrorWithError(err, "autorest/Client", "Do", nil, "Preparing request failed") - } - logger.Instance.WriteRequest(r, logger.Filter{ - Header: func(k string, v []string) (bool, []string) { - // remove the auth token from the log - if strings.EqualFold(k, "Authorization") || strings.EqualFold(k, "Ocp-Apim-Subscription-Key") { - v = []string{"**REDACTED**"} - } - return true, v - }, - }) - resp, err := SendWithSender(c.sender(tls.RenegotiateNever), r) - if resp == nil && err == nil { - err = errors.New("autorest: received nil response and error") - } - 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(renengotiation tls.RenegotiationSupport) Sender { - if c.Sender == nil { - return sender(renengotiation) - } - return c.Sender -} - -// WithAuthorization is a convenience method that returns the WithAuthorization PrepareDecorator -// from the current Authorizer. If not Authorizer is set, it uses the NullAuthorizer. -func (c Client) WithAuthorization() PrepareDecorator { - return c.authorizer().WithAuthorization() -} - -// authorizer returns the Authorizer to use. -func (c Client) authorizer() Authorizer { - if c.Authorizer == nil { - return NullAuthorizer{} - } - return c.Authorizer -} - -// WithInspection is a convenience method that passes the request to the supplied RequestInspector, -// if present, or returns the WithNothing PrepareDecorator otherwise. -func (c Client) WithInspection() PrepareDecorator { - if c.RequestInspector == nil { - return WithNothing() - } - return c.RequestInspector -} - -// ByInspecting is a convenience method that passes the response to the supplied ResponseInspector, -// if present, or returns the ByIgnoring RespondDecorator otherwise. -func (c Client) ByInspecting() RespondDecorator { - if c.ResponseInspector == nil { - return ByIgnoring() - } - return c.ResponseInspector -} - -// Send sends the provided http.Request using the client's Sender or the default sender. -// It returns the http.Response and possible error. It also accepts a, possibly empty, -// default set of SendDecorators used when sending the request. -// SendDecorators have the following precedence: -// 1. In a request's context via WithSendDecorators() -// 2. Specified on the client in SendDecorators -// 3. The default values specified in this method -func (c Client) Send(req *http.Request, decorators ...SendDecorator) (*http.Response, error) { - if c.SendDecorators != nil { - decorators = c.SendDecorators - } - inCtx := req.Context().Value(ctxSendDecorators{}) - if sd, ok := inCtx.([]SendDecorator); ok { - decorators = sd - } - return SendWithSender(c, req, decorators...) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE b/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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/date.go b/vendor/github.com/Azure/go-autorest/autorest/date/date.go deleted file mode 100644 index c457106568..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/date.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -Package date provides time.Time derivatives that conform to the Swagger.io (https://swagger.io/) -defined date formats: Date and DateTime. Both types may, in most cases, be used in lieu of -time.Time types. And both convert to time.Time through a ToTime method. -*/ -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. - -import ( - "fmt" - "time" -) - -const ( - fullDate = "2006-01-02" - fullDateJSON = `"2006-01-02"` - dateFormat = "%04d-%02d-%02d" - jsonFormat = `"%04d-%02d-%02d"` -) - -// Date defines a type similar to time.Time but assumes a layout of RFC3339 full-date (i.e., -// 2006-01-02). -type Date struct { - time.Time -} - -// ParseDate create a new Date from the passed string. -func ParseDate(date string) (d Date, err error) { - return parseDate(date, fullDate) -} - -func parseDate(date string, format string) (Date, error) { - d, err := time.Parse(format, date) - return Date{Time: d}, err -} - -// MarshalBinary preserves the Date as a byte array conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d Date) MarshalBinary() ([]byte, error) { - return d.MarshalText() -} - -// UnmarshalBinary reconstitutes a Date saved as a byte array conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d *Date) UnmarshalBinary(data []byte) error { - return d.UnmarshalText(data) -} - -// MarshalJSON preserves the Date as a JSON string conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d Date) MarshalJSON() (json []byte, err error) { - return []byte(fmt.Sprintf(jsonFormat, d.Year(), d.Month(), d.Day())), nil -} - -// UnmarshalJSON reconstitutes the Date from a JSON string conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d *Date) UnmarshalJSON(data []byte) (err error) { - d.Time, err = time.Parse(fullDateJSON, string(data)) - return err -} - -// MarshalText preserves the Date as a byte array conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d Date) MarshalText() (text []byte, err error) { - return []byte(fmt.Sprintf(dateFormat, d.Year(), d.Month(), d.Day())), nil -} - -// UnmarshalText reconstitutes a Date saved as a byte array conforming to RFC3339 full-date (i.e., -// 2006-01-02). -func (d *Date) UnmarshalText(data []byte) (err error) { - d.Time, err = time.Parse(fullDate, string(data)) - return err -} - -// String returns the Date formatted as an RFC3339 full-date string (i.e., 2006-01-02). -func (d Date) String() string { - return fmt.Sprintf(dateFormat, d.Year(), d.Month(), d.Day()) -} - -// ToTime returns a Date as a time.Time -func (d Date) ToTime() time.Time { - return d.Time -} 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 deleted file mode 100644 index 4e05432071..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/go_mod_tidy_hack.go +++ /dev/null @@ -1,24 +0,0 @@ -// +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 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" diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/time.go b/vendor/github.com/Azure/go-autorest/autorest/date/time.go deleted file mode 100644 index b453fad049..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/time.go +++ /dev/null @@ -1,103 +0,0 @@ -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. - -import ( - "regexp" - "time" -) - -// Azure reports time in UTC but it doesn't include the 'Z' time zone suffix in some cases. -const ( - azureUtcFormatJSON = `"2006-01-02T15:04:05.999999999"` - azureUtcFormat = "2006-01-02T15:04:05.999999999" - rfc3339JSON = `"` + time.RFC3339Nano + `"` - rfc3339 = time.RFC3339Nano - tzOffsetRegex = `(Z|z|\+|-)(\d+:\d+)*"*$` -) - -// Time defines a type similar to time.Time but assumes a layout of RFC3339 date-time (i.e., -// 2006-01-02T15:04:05Z). -type Time struct { - time.Time -} - -// MarshalBinary preserves the Time as a byte array conforming to RFC3339 date-time (i.e., -// 2006-01-02T15:04:05Z). -func (t Time) MarshalBinary() ([]byte, error) { - return t.Time.MarshalText() -} - -// UnmarshalBinary reconstitutes a Time saved as a byte array conforming to RFC3339 date-time -// (i.e., 2006-01-02T15:04:05Z). -func (t *Time) UnmarshalBinary(data []byte) error { - return t.UnmarshalText(data) -} - -// MarshalJSON preserves the Time as a JSON string conforming to RFC3339 date-time (i.e., -// 2006-01-02T15:04:05Z). -func (t Time) MarshalJSON() (json []byte, err error) { - return t.Time.MarshalJSON() -} - -// UnmarshalJSON reconstitutes the Time from a JSON string conforming to RFC3339 date-time -// (i.e., 2006-01-02T15:04:05Z). -func (t *Time) UnmarshalJSON(data []byte) (err error) { - timeFormat := azureUtcFormatJSON - match, err := regexp.Match(tzOffsetRegex, data) - if err != nil { - return err - } else if match { - timeFormat = rfc3339JSON - } - t.Time, err = ParseTime(timeFormat, string(data)) - return err -} - -// MarshalText preserves the Time as a byte array conforming to RFC3339 date-time (i.e., -// 2006-01-02T15:04:05Z). -func (t Time) MarshalText() (text []byte, err error) { - return t.Time.MarshalText() -} - -// UnmarshalText reconstitutes a Time saved as a byte array conforming to RFC3339 date-time -// (i.e., 2006-01-02T15:04:05Z). -func (t *Time) UnmarshalText(data []byte) (err error) { - timeFormat := azureUtcFormat - match, err := regexp.Match(tzOffsetRegex, data) - if err != nil { - return err - } else if match { - timeFormat = rfc3339 - } - t.Time, err = ParseTime(timeFormat, string(data)) - return err -} - -// String returns the Time formatted as an RFC3339 date-time string (i.e., -// 2006-01-02T15:04:05Z). -func (t Time) String() string { - // Note: time.Time.String does not return an RFC3339 compliant string, time.Time.MarshalText does. - b, err := t.MarshalText() - if err != nil { - return "" - } - return string(b) -} - -// ToTime returns a Time as a time.Time -func (t Time) ToTime() time.Time { - return t.Time -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/timerfc1123.go b/vendor/github.com/Azure/go-autorest/autorest/date/timerfc1123.go deleted file mode 100644 index 48fb39ba9b..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/timerfc1123.go +++ /dev/null @@ -1,100 +0,0 @@ -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. - -import ( - "errors" - "time" -) - -const ( - rfc1123JSON = `"` + time.RFC1123 + `"` - rfc1123 = time.RFC1123 -) - -// TimeRFC1123 defines a type similar to time.Time but assumes a layout of RFC1123 date-time (i.e., -// Mon, 02 Jan 2006 15:04:05 MST). -type TimeRFC1123 struct { - time.Time -} - -// UnmarshalJSON reconstitutes the Time from a JSON string conforming to RFC1123 date-time -// (i.e., Mon, 02 Jan 2006 15:04:05 MST). -func (t *TimeRFC1123) UnmarshalJSON(data []byte) (err error) { - t.Time, err = ParseTime(rfc1123JSON, string(data)) - if err != nil { - return err - } - return nil -} - -// MarshalJSON preserves the Time as a JSON string conforming to RFC1123 date-time (i.e., -// Mon, 02 Jan 2006 15:04:05 MST). -func (t TimeRFC1123) MarshalJSON() ([]byte, error) { - if y := t.Year(); y < 0 || y >= 10000 { - return nil, errors.New("Time.MarshalJSON: year outside of range [0,9999]") - } - b := []byte(t.Format(rfc1123JSON)) - return b, nil -} - -// MarshalText preserves the Time as a byte array conforming to RFC1123 date-time (i.e., -// Mon, 02 Jan 2006 15:04:05 MST). -func (t TimeRFC1123) MarshalText() ([]byte, error) { - if y := t.Year(); y < 0 || y >= 10000 { - return nil, errors.New("Time.MarshalText: year outside of range [0,9999]") - } - - b := []byte(t.Format(rfc1123)) - return b, nil -} - -// UnmarshalText reconstitutes a Time saved as a byte array conforming to RFC1123 date-time -// (i.e., Mon, 02 Jan 2006 15:04:05 MST). -func (t *TimeRFC1123) UnmarshalText(data []byte) (err error) { - t.Time, err = ParseTime(rfc1123, string(data)) - if err != nil { - return err - } - return nil -} - -// MarshalBinary preserves the Time as a byte array conforming to RFC1123 date-time (i.e., -// Mon, 02 Jan 2006 15:04:05 MST). -func (t TimeRFC1123) MarshalBinary() ([]byte, error) { - return t.MarshalText() -} - -// UnmarshalBinary reconstitutes a Time saved as a byte array conforming to RFC1123 date-time -// (i.e., Mon, 02 Jan 2006 15:04:05 MST). -func (t *TimeRFC1123) UnmarshalBinary(data []byte) error { - return t.UnmarshalText(data) -} - -// ToTime returns a Time as a time.Time -func (t TimeRFC1123) ToTime() time.Time { - return t.Time -} - -// String returns the Time formatted as an RFC1123 date-time string (i.e., -// Mon, 02 Jan 2006 15:04:05 MST). -func (t TimeRFC1123) String() string { - // Note: time.Time.String does not return an RFC1123 compliant string, time.Time.MarshalText does. - b, err := t.MarshalText() - if err != nil { - return "" - } - return string(b) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/unixtime.go b/vendor/github.com/Azure/go-autorest/autorest/date/unixtime.go deleted file mode 100644 index 7073959b2a..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/unixtime.go +++ /dev/null @@ -1,123 +0,0 @@ -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. - -import ( - "bytes" - "encoding/binary" - "encoding/json" - "time" -) - -// unixEpoch is the moment in time that should be treated as timestamp 0. -var unixEpoch = time.Date(1970, time.January, 1, 0, 0, 0, 0, time.UTC) - -// UnixTime marshals and unmarshals a time that is represented as the number -// of seconds (ignoring skip-seconds) since the Unix Epoch. -type UnixTime time.Time - -// Duration returns the time as a Duration since the UnixEpoch. -func (t UnixTime) Duration() time.Duration { - return time.Time(t).Sub(unixEpoch) -} - -// NewUnixTimeFromSeconds creates a UnixTime as a number of seconds from the UnixEpoch. -func NewUnixTimeFromSeconds(seconds float64) UnixTime { - return NewUnixTimeFromDuration(time.Duration(seconds * float64(time.Second))) -} - -// NewUnixTimeFromNanoseconds creates a UnixTime as a number of nanoseconds from the UnixEpoch. -func NewUnixTimeFromNanoseconds(nanoseconds int64) UnixTime { - return NewUnixTimeFromDuration(time.Duration(nanoseconds)) -} - -// NewUnixTimeFromDuration creates a UnixTime as a duration of time since the UnixEpoch. -func NewUnixTimeFromDuration(dur time.Duration) UnixTime { - return UnixTime(unixEpoch.Add(dur)) -} - -// UnixEpoch retreives the moment considered the Unix Epoch. I.e. The time represented by '0' -func UnixEpoch() time.Time { - return unixEpoch -} - -// MarshalJSON preserves the UnixTime as a JSON number conforming to Unix Timestamp requirements. -// (i.e. the number of seconds since midnight January 1st, 1970 not considering leap seconds.) -func (t UnixTime) MarshalJSON() ([]byte, error) { - buffer := &bytes.Buffer{} - enc := json.NewEncoder(buffer) - err := enc.Encode(float64(time.Time(t).UnixNano()) / 1e9) - if err != nil { - return nil, err - } - return buffer.Bytes(), nil -} - -// UnmarshalJSON reconstitures a UnixTime saved as a JSON number of the number of seconds since -// midnight January 1st, 1970. -func (t *UnixTime) UnmarshalJSON(text []byte) error { - dec := json.NewDecoder(bytes.NewReader(text)) - - var secondsSinceEpoch float64 - if err := dec.Decode(&secondsSinceEpoch); err != nil { - return err - } - - *t = NewUnixTimeFromSeconds(secondsSinceEpoch) - - return nil -} - -// MarshalText stores the number of seconds since the Unix Epoch as a textual floating point number. -func (t UnixTime) MarshalText() ([]byte, error) { - cast := time.Time(t) - return cast.MarshalText() -} - -// UnmarshalText populates a UnixTime with a value stored textually as a floating point number of seconds since the Unix Epoch. -func (t *UnixTime) UnmarshalText(raw []byte) error { - var unmarshaled time.Time - - if err := unmarshaled.UnmarshalText(raw); err != nil { - return err - } - - *t = UnixTime(unmarshaled) - return nil -} - -// MarshalBinary converts a UnixTime into a binary.LittleEndian float64 of nanoseconds since the epoch. -func (t UnixTime) MarshalBinary() ([]byte, error) { - buf := &bytes.Buffer{} - - payload := int64(t.Duration()) - - if err := binary.Write(buf, binary.LittleEndian, &payload); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -// UnmarshalBinary converts a from a binary.LittleEndian float64 of nanoseconds since the epoch into a UnixTime. -func (t *UnixTime) UnmarshalBinary(raw []byte) error { - var nanosecondsSinceEpoch int64 - - if err := binary.Read(bytes.NewReader(raw), binary.LittleEndian, &nanosecondsSinceEpoch); err != nil { - return err - } - *t = NewUnixTimeFromNanoseconds(nanosecondsSinceEpoch) - return nil -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/date/utility.go b/vendor/github.com/Azure/go-autorest/autorest/date/utility.go deleted file mode 100644 index 12addf0ebb..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/date/utility.go +++ /dev/null @@ -1,25 +0,0 @@ -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. - -import ( - "strings" - "time" -) - -// ParseTime to parse Time string to specified format. -func ParseTime(format string, t string) (d time.Time, err error) { - return time.Parse(format, strings.ToUpper(t)) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/error.go b/vendor/github.com/Azure/go-autorest/autorest/error.go deleted file mode 100644 index 35098eda8e..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/error.go +++ /dev/null @@ -1,103 +0,0 @@ -package autorest - -// 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. - -import ( - "fmt" - "net/http" -) - -const ( - // UndefinedStatusCode is used when HTTP status code is not available for an error. - UndefinedStatusCode = 0 -) - -// DetailedError encloses a error with details of the package, method, and associated HTTP -// status code (if any). -type DetailedError struct { - Original error - - // PackageType is the package type of the object emitting the error. For types, the value - // matches that produced the the '%T' format specifier of the fmt package. For other elements, - // such as functions, it is just the package name (e.g., "autorest"). - PackageType string - - // Method is the name of the method raising the error. - Method string - - // StatusCode is the HTTP Response StatusCode (if non-zero) that led to the error. - StatusCode interface{} - - // Message is the error message. - Message string - - // Service Error is the response body of failed API in bytes - ServiceError []byte - - // Response is the response object that was returned during failure if applicable. - Response *http.Response -} - -// NewError creates a new Error conforming object from the passed packageType, method, and -// message. message is treated as a format string to which the optional args apply. -func NewError(packageType string, method string, message string, args ...interface{}) DetailedError { - return NewErrorWithError(nil, packageType, method, nil, message, args...) -} - -// NewErrorWithResponse creates a new Error conforming object from the passed -// packageType, method, statusCode of the given resp (UndefinedStatusCode if -// resp is nil), and message. message is treated as a format string to which the -// optional args apply. -func NewErrorWithResponse(packageType string, method string, resp *http.Response, message string, args ...interface{}) DetailedError { - return NewErrorWithError(nil, packageType, method, resp, message, args...) -} - -// NewErrorWithError creates a new Error conforming object from the -// passed packageType, method, statusCode of the given resp (UndefinedStatusCode -// if resp is nil), message, and original error. message is treated as a format -// string to which the optional args apply. -func NewErrorWithError(original error, packageType string, method string, resp *http.Response, message string, args ...interface{}) DetailedError { - if v, ok := original.(DetailedError); ok { - return v - } - - statusCode := UndefinedStatusCode - if resp != nil { - statusCode = resp.StatusCode - } - - return DetailedError{ - Original: original, - PackageType: packageType, - Method: method, - StatusCode: statusCode, - Message: fmt.Sprintf(message, args...), - Response: resp, - } -} - -// Error returns a formatted containing all available details (i.e., PackageType, Method, -// StatusCode, Message, and original error (if any)). -func (e DetailedError) Error() string { - if e.Original == nil { - return fmt.Sprintf("%s#%s: %s: StatusCode=%d", e.PackageType, e.Method, e.Message, e.StatusCode) - } - return fmt.Sprintf("%s#%s: %s: StatusCode=%d -- Original Error: %v", e.PackageType, e.Method, e.Message, e.StatusCode, e.Original) -} - -// Unwrap returns the original error. -func (e DetailedError) Unwrap() error { - return e.Original -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go b/vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go deleted file mode 100644 index 792f82d4b6..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/go_mod_tidy_hack.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build modhack -// +build modhack - -package autorest - -// 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 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" diff --git a/vendor/github.com/Azure/go-autorest/autorest/preparer.go b/vendor/github.com/Azure/go-autorest/autorest/preparer.go deleted file mode 100644 index f6de8c5e93..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/preparer.go +++ /dev/null @@ -1,548 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "context" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "mime/multipart" - "net/http" - "net/url" - "strings" -) - -const ( - mimeTypeJSON = "application/json" - mimeTypeOctetStream = "application/octet-stream" - mimeTypeFormPost = "application/x-www-form-urlencoded" - - 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 -// must ensure to not share or hold per-invocation state since Preparers may be shared and re-used. -type Preparer interface { - Prepare(*http.Request) (*http.Request, error) -} - -// PreparerFunc is a method that implements the Preparer interface. -type PreparerFunc func(*http.Request) (*http.Request, error) - -// Prepare implements the Preparer interface on PreparerFunc. -func (pf PreparerFunc) Prepare(r *http.Request) (*http.Request, error) { - return pf(r) -} - -// PrepareDecorator takes and possibly decorates, by wrapping, a Preparer. Decorators may affect the -// http.Request and pass it along or, first, pass the http.Request along then affect the result. -type PrepareDecorator func(Preparer) Preparer - -// CreatePreparer creates, decorates, and returns a Preparer. -// Without decorators, the returned Preparer returns the passed http.Request unmodified. -// Preparers are safe to share and re-use. -func CreatePreparer(decorators ...PrepareDecorator) Preparer { - return DecoratePreparer( - Preparer(PreparerFunc(func(r *http.Request) (*http.Request, error) { return r, nil })), - decorators...) -} - -// DecoratePreparer accepts a Preparer and a, possibly empty, set of PrepareDecorators, which it -// applies to the Preparer. Decorators are applied in the order received, but their affect upon the -// request depends on whether they are a pre-decorator (change the http.Request and then pass it -// along) or a post-decorator (pass the http.Request along and alter it on return). -func DecoratePreparer(p Preparer, decorators ...PrepareDecorator) Preparer { - for _, decorate := range decorators { - p = decorate(p) - } - return p -} - -// Prepare accepts an http.Request and a, possibly empty, set of PrepareDecorators. -// It creates a Preparer from the decorators which it then applies to the passed http.Request. -func Prepare(r *http.Request, decorators ...PrepareDecorator) (*http.Request, error) { - if r == nil { - return nil, NewError("autorest", "Prepare", "Invoked without an http.Request") - } - return CreatePreparer(decorators...).Prepare(r) -} - -// WithNothing returns a "do nothing" PrepareDecorator that makes no changes to the passed -// http.Request. -func WithNothing() PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - return p.Prepare(r) - }) - } -} - -// WithHeader returns a PrepareDecorator that sets the specified HTTP header of the http.Request to -// the passed value. It canonicalizes the passed header name (via http.CanonicalHeaderKey) before -// adding the header. -func WithHeader(header string, value string) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - setHeader(r, http.CanonicalHeaderKey(header), value) - } - return r, err - }) - } -} - -// WithHeaders returns a PrepareDecorator that sets the specified HTTP headers of the http.Request to -// the passed value. It canonicalizes the passed headers name (via http.CanonicalHeaderKey) before -// adding them. -func WithHeaders(headers map[string]interface{}) PrepareDecorator { - h := ensureValueStrings(headers) - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - if r.Header == nil { - r.Header = make(http.Header) - } - - for name, value := range h { - r.Header.Set(http.CanonicalHeaderKey(name), value) - } - } - return r, err - }) - } -} - -// WithBearerAuthorization returns a PrepareDecorator that adds an HTTP Authorization header whose -// value is "Bearer " followed by the supplied token. -func WithBearerAuthorization(token string) PrepareDecorator { - return WithHeader(headerAuthorization, fmt.Sprintf("Bearer %s", token)) -} - -// AsContentType returns a PrepareDecorator that adds an HTTP Content-Type header whose value -// is the passed contentType. -func AsContentType(contentType string) PrepareDecorator { - return WithHeader(headerContentType, contentType) -} - -// WithUserAgent returns a PrepareDecorator that adds an HTTP User-Agent header whose value is the -// passed string. -func WithUserAgent(ua string) PrepareDecorator { - return WithHeader(headerUserAgent, ua) -} - -// AsFormURLEncoded returns a PrepareDecorator that adds an HTTP Content-Type header whose value is -// "application/x-www-form-urlencoded". -func AsFormURLEncoded() PrepareDecorator { - return AsContentType(mimeTypeFormPost) -} - -// AsJSON returns a PrepareDecorator that adds an HTTP Content-Type header whose value is -// "application/json". -func AsJSON() PrepareDecorator { - return AsContentType(mimeTypeJSON) -} - -// AsOctetStream returns a PrepareDecorator that adds the "application/octet-stream" Content-Type header. -func AsOctetStream() PrepareDecorator { - return AsContentType(mimeTypeOctetStream) -} - -// WithMethod returns a PrepareDecorator that sets the HTTP method of the passed request. The -// decorator does not validate that the passed method string is a known HTTP method. -func WithMethod(method string) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r.Method = method - return p.Prepare(r) - }) - } -} - -// AsDelete returns a PrepareDecorator that sets the HTTP method to DELETE. -func AsDelete() PrepareDecorator { return WithMethod("DELETE") } - -// AsGet returns a PrepareDecorator that sets the HTTP method to GET. -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") } - -// AsPatch returns a PrepareDecorator that sets the HTTP method to PATCH. -func AsPatch() PrepareDecorator { return WithMethod("PATCH") } - -// AsPost returns a PrepareDecorator that sets the HTTP method to POST. -func AsPost() PrepareDecorator { return WithMethod("POST") } - -// AsPut returns a PrepareDecorator that sets the HTTP method to PUT. -func AsPut() PrepareDecorator { return WithMethod("PUT") } - -// WithBaseURL returns a PrepareDecorator that populates the http.Request with a url.URL constructed -// from the supplied baseUrl. Query parameters will be encoded as required. -func WithBaseURL(baseURL string) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - var u *url.URL - if u, err = url.Parse(baseURL); err != nil { - return r, err - } - if u.Scheme == "" { - return r, fmt.Errorf("autorest: No scheme detected in URL %s", baseURL) - } - if u.RawQuery != "" { - // handle unencoded semicolons (ideally the server would send them already encoded) - u.RawQuery = strings.Replace(u.RawQuery, ";", "%3B", -1) - q, err := url.ParseQuery(u.RawQuery) - if err != nil { - return r, err - } - u.RawQuery = q.Encode() - } - r.URL = u - } - return r, err - }) - } -} - -// 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 = io.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 { - parameters := ensureValueStrings(urlParameters) - for key, value := range parameters { - baseURL = strings.Replace(baseURL, "{"+key+"}", value, -1) - } - return WithBaseURL(baseURL) -} - -// WithFormData returns a PrepareDecoratore that "URL encodes" (e.g., bar=baz&foo=quux) into the -// http.Request body. -func WithFormData(v url.Values) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - s := v.Encode() - - setHeader(r, http.CanonicalHeaderKey(headerContentType), mimeTypeFormPost) - r.ContentLength = int64(len(s)) - r.Body = io.NopCloser(strings.NewReader(s)) - } - return r, err - }) - } -} - -// WithMultiPartFormData returns a PrepareDecoratore that "URL encodes" (e.g., bar=baz&foo=quux) form parameters -// into the http.Request body. -func WithMultiPartFormData(formDataParameters map[string]interface{}) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - var body bytes.Buffer - writer := multipart.NewWriter(&body) - for key, value := range formDataParameters { - if rc, ok := value.(io.ReadCloser); ok { - var fd io.Writer - if fd, err = writer.CreateFormFile(key, key); err != nil { - return r, err - } - if _, err = io.Copy(fd, rc); err != nil { - return r, err - } - } else { - if err = writer.WriteField(key, ensureValueString(value)); err != nil { - return r, err - } - } - } - if err = writer.Close(); err != nil { - return r, err - } - setHeader(r, http.CanonicalHeaderKey(headerContentType), writer.FormDataContentType()) - r.Body = io.NopCloser(bytes.NewReader(body.Bytes())) - r.ContentLength = int64(body.Len()) - return r, err - } - return r, err - }) - } -} - -// WithFile returns a PrepareDecorator that sends file in request body. -func WithFile(f io.ReadCloser) 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 := io.ReadAll(f) - if err != nil { - return r, err - } - r.Body = io.NopCloser(bytes.NewReader(b)) - r.ContentLength = int64(len(b)) - } - return r, err - }) - } -} - -// WithBool returns a PrepareDecorator that encodes the passed bool into the body of the request -// and sets the Content-Length header. -func WithBool(v bool) PrepareDecorator { - return WithString(fmt.Sprintf("%v", v)) -} - -// WithFloat32 returns a PrepareDecorator that encodes the passed float32 into the body of the -// request and sets the Content-Length header. -func WithFloat32(v float32) PrepareDecorator { - return WithString(fmt.Sprintf("%v", v)) -} - -// WithFloat64 returns a PrepareDecorator that encodes the passed float64 into the body of the -// request and sets the Content-Length header. -func WithFloat64(v float64) PrepareDecorator { - return WithString(fmt.Sprintf("%v", v)) -} - -// WithInt32 returns a PrepareDecorator that encodes the passed int32 into the body of the request -// and sets the Content-Length header. -func WithInt32(v int32) PrepareDecorator { - return WithString(fmt.Sprintf("%v", v)) -} - -// WithInt64 returns a PrepareDecorator that encodes the passed int64 into the body of the request -// and sets the Content-Length header. -func WithInt64(v int64) PrepareDecorator { - return WithString(fmt.Sprintf("%v", v)) -} - -// WithString returns a PrepareDecorator that encodes the passed string into the body of the request -// and sets the Content-Length header. -func WithString(v string) PrepareDecorator { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - r.ContentLength = int64(len(v)) - r.Body = io.NopCloser(strings.NewReader(v)) - } - return r, err - }) - } -} - -// WithJSON returns a PrepareDecorator that encodes the data passed as JSON into the body of the -// request and sets the Content-Length header. -func WithJSON(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 := json.Marshal(v) - if err == nil { - r.ContentLength = int64(len(b)) - r.Body = io.NopCloser(bytes.NewReader(b)) - } - } - return r, err - }) - } -} - -// 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)) - setHeader(r, headerContentLength, fmt.Sprintf("%d", len(bytesWithHeader))) - r.Body = io.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 { - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - if r.URL == nil { - return r, NewError("autorest", "WithPath", "Invoked with a nil URL") - } - if r.URL, err = parseURL(r.URL, path); err != nil { - return r, err - } - } - return r, err - }) - } -} - -// WithEscapedPathParameters returns a PrepareDecorator that replaces brace-enclosed keys within the -// request path (i.e., http.Request.URL.Path) with the corresponding values from the passed map. The -// values will be escaped (aka URL encoded) before insertion into the path. -func WithEscapedPathParameters(path string, pathParameters map[string]interface{}) PrepareDecorator { - parameters := escapeValueStrings(ensureValueStrings(pathParameters)) - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - if r.URL == nil { - return r, NewError("autorest", "WithEscapedPathParameters", "Invoked with a nil URL") - } - for key, value := range parameters { - path = strings.Replace(path, "{"+key+"}", value, -1) - } - if r.URL, err = parseURL(r.URL, path); err != nil { - return r, err - } - } - return r, err - }) - } -} - -// WithPathParameters returns a PrepareDecorator that replaces brace-enclosed keys within the -// request path (i.e., http.Request.URL.Path) with the corresponding values from the passed map. -func WithPathParameters(path string, pathParameters map[string]interface{}) PrepareDecorator { - parameters := ensureValueStrings(pathParameters) - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - if r.URL == nil { - return r, NewError("autorest", "WithPathParameters", "Invoked with a nil URL") - } - for key, value := range parameters { - path = strings.Replace(path, "{"+key+"}", value, -1) - } - - if r.URL, err = parseURL(r.URL, path); err != nil { - return r, err - } - } - return r, err - }) - } -} - -func parseURL(u *url.URL, path string) (*url.URL, error) { - p := strings.TrimRight(u.String(), "/") - if !strings.HasPrefix(path, "/") { - path = "/" + path - } - return url.Parse(p + path) -} - -// WithQueryParameters returns a PrepareDecorators that encodes and applies the query parameters -// given in the supplied map (i.e., key=value). -func WithQueryParameters(queryParameters map[string]interface{}) PrepareDecorator { - parameters := MapToValues(queryParameters) - return func(p Preparer) Preparer { - return PreparerFunc(func(r *http.Request) (*http.Request, error) { - r, err := p.Prepare(r) - if err == nil { - if r.URL == nil { - return r, NewError("autorest", "WithQueryParameters", "Invoked with a nil URL") - } - v := r.URL.Query() - for key, value := range parameters { - for i := range value { - d, err := url.QueryUnescape(value[i]) - if err != nil { - return r, err - } - value[i] = d - } - v[key] = value - } - r.URL.RawQuery = v.Encode() - } - return r, err - }) - } -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/responder.go b/vendor/github.com/Azure/go-autorest/autorest/responder.go deleted file mode 100644 index 69d4b2b67b..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/responder.go +++ /dev/null @@ -1,268 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "net/http" - "strings" -) - -// Responder is the interface that wraps the Respond method. -// -// Respond accepts and reacts to an http.Response. Implementations must ensure to not share or hold -// state since Responders may be shared and re-used. -type Responder interface { - Respond(*http.Response) error -} - -// ResponderFunc is a method that implements the Responder interface. -type ResponderFunc func(*http.Response) error - -// Respond implements the Responder interface on ResponderFunc. -func (rf ResponderFunc) Respond(r *http.Response) error { - return rf(r) -} - -// RespondDecorator takes and possibly decorates, by wrapping, a Responder. Decorators may react to -// the http.Response and pass it along or, first, pass the http.Response along then react. -type RespondDecorator func(Responder) Responder - -// CreateResponder creates, decorates, and returns a Responder. Without decorators, the returned -// Responder returns the passed http.Response unmodified. Responders may or may not be safe to share -// and re-used: It depends on the applied decorators. For example, a standard decorator that closes -// the response body is fine to share whereas a decorator that reads the body into a passed struct -// is not. -// -// To prevent memory leaks, ensure that at least one Responder closes the response body. -func CreateResponder(decorators ...RespondDecorator) Responder { - return DecorateResponder( - Responder(ResponderFunc(func(r *http.Response) error { return nil })), - decorators...) -} - -// DecorateResponder accepts a Responder and a, possibly empty, set of RespondDecorators, which it -// applies to the Responder. Decorators are applied in the order received, but their affect upon the -// request depends on whether they are a pre-decorator (react to the http.Response and then pass it -// along) or a post-decorator (pass the http.Response along and then react). -func DecorateResponder(r Responder, decorators ...RespondDecorator) Responder { - for _, decorate := range decorators { - r = decorate(r) - } - return r -} - -// Respond accepts an http.Response and a, possibly empty, set of RespondDecorators. -// It creates a Responder from the decorators it then applies to the passed http.Response. -func Respond(r *http.Response, decorators ...RespondDecorator) error { - if r == nil { - return nil - } - return CreateResponder(decorators...).Respond(r) -} - -// ByIgnoring returns a RespondDecorator that ignores the passed http.Response passing it unexamined -// to the next RespondDecorator. -func ByIgnoring() RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - return r.Respond(resp) - }) - } -} - -// ByCopying copies the contents of the http.Response Body into the passed bytes.Buffer as -// the Body is read. -func ByCopying(b *bytes.Buffer) RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil && resp != nil && resp.Body != nil { - resp.Body = TeeReadCloser(resp.Body, b) - } - return err - }) - } -} - -// ByDiscardingBody returns a RespondDecorator that first invokes the passed Responder after which -// it copies the remaining bytes (if any) in the response body to ioutil.Discard. Since the passed -// Responder is invoked prior to discarding the response body, the decorator may occur anywhere -// within the set. -func ByDiscardingBody() RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil && resp != nil && resp.Body != nil { - if _, err := io.Copy(io.Discard, resp.Body); err != nil { - return fmt.Errorf("Error discarding the response body: %v", err) - } - } - return err - }) - } -} - -// ByClosing returns a RespondDecorator that first invokes the passed Responder after which it -// closes the response body. Since the passed Responder is invoked prior to closing the response -// body, the decorator may occur anywhere within the set. -func ByClosing() RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if resp != nil && resp.Body != nil { - if err := resp.Body.Close(); err != nil { - return fmt.Errorf("Error closing the response body: %v", err) - } - } - return err - }) - } -} - -// ByClosingIfError returns a RespondDecorator that first invokes the passed Responder after which -// it closes the response if the passed Responder returns an error and the response body exists. -func ByClosingIfError() RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err != nil && resp != nil && resp.Body != nil { - if err := resp.Body.Close(); err != nil { - return fmt.Errorf("Error closing the response body: %v", err) - } - } - return err - }) - } -} - -// 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 := io.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 { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil { - b, errInner := io.ReadAll(resp.Body) - // Some responses might include a BOM, remove for successful unmarshalling - b = bytes.TrimPrefix(b, []byte("\xef\xbb\xbf")) - if errInner != nil { - err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner) - } else if len(strings.Trim(string(b), " ")) > 0 { - errInner = json.Unmarshal(b, v) - if errInner != nil { - err = fmt.Errorf("Error occurred unmarshalling JSON - Error = '%v' JSON = '%s'", errInner, string(b)) - } - } - } - return err - }) - } -} - -// ByUnmarshallingXML returns a RespondDecorator that decodes a XML document returned in the -// response Body into the value pointed to by v. -func ByUnmarshallingXML(v interface{}) RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil { - b, errInner := io.ReadAll(resp.Body) - if errInner != nil { - err = fmt.Errorf("Error occurred reading http.Response#Body - Error = '%v'", errInner) - } else { - errInner = xml.Unmarshal(b, v) - if errInner != nil { - err = fmt.Errorf("Error occurred unmarshalling Xml - Error = '%v' Xml = '%s'", errInner, string(b)) - } - } - } - return err - }) - } -} - -// WithErrorUnlessStatusCode returns a RespondDecorator that emits an error unless the response -// StatusCode is among the set passed. On error, response body is fully read into a buffer and -// presented in the returned error, as well as in the response body. -func WithErrorUnlessStatusCode(codes ...int) RespondDecorator { - return func(r Responder) Responder { - return ResponderFunc(func(resp *http.Response) error { - err := r.Respond(resp) - if err == nil && !ResponseHasStatusCode(resp, codes...) { - derr := NewErrorWithResponse("autorest", "WithErrorUnlessStatusCode", resp, "%v %v failed with %s", - resp.Request.Method, - resp.Request.URL, - resp.Status) - if resp.Body != nil { - defer resp.Body.Close() - b, _ := io.ReadAll(resp.Body) - derr.ServiceError = b - resp.Body = io.NopCloser(bytes.NewReader(b)) - } - err = derr - } - return err - }) - } -} - -// WithErrorUnlessOK returns a RespondDecorator that emits an error if the response StatusCode is -// anything other than HTTP 200. -func WithErrorUnlessOK() RespondDecorator { - return WithErrorUnlessStatusCode(http.StatusOK) -} - -// ExtractHeader extracts all values of the specified header from the http.Response. It returns an -// empty string slice if the passed http.Response is nil or the header does not exist. -func ExtractHeader(header string, resp *http.Response) []string { - if resp != nil && resp.Header != nil { - return resp.Header[http.CanonicalHeaderKey(header)] - } - return nil -} - -// ExtractHeaderValue extracts the first value of the specified header from the http.Response. It -// returns an empty string if the passed http.Response is nil or the header does not exist. -func ExtractHeaderValue(header string, resp *http.Response) string { - h := ExtractHeader(header, resp) - if len(h) > 0 { - return h[0] - } - return "" -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go deleted file mode 100644 index 7634b0f570..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest.go +++ /dev/null @@ -1,51 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "io" - "net/http" -) - -// NewRetriableRequest returns a wrapper around an HTTP request that support retry logic. -func NewRetriableRequest(req *http.Request) *RetriableRequest { - return &RetriableRequest{req: req} -} - -// Request returns the wrapped HTTP request. -func (rr *RetriableRequest) Request() *http.Request { - return rr.req -} - -func (rr *RetriableRequest) prepareFromByteReader() (err error) { - // fall back to making a copy (only do this once) - b := []byte{} - if rr.req.ContentLength > 0 { - b = make([]byte, rr.req.ContentLength) - _, err = io.ReadFull(rr.req.Body, b) - if err != nil { - return err - } - } else { - b, err = io.ReadAll(rr.req.Body) - if err != nil { - return err - } - } - rr.br = bytes.NewReader(b) - rr.req.Body = io.NopCloser(rr.br) - return err -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go deleted file mode 100644 index 8340bda408..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.7.go +++ /dev/null @@ -1,55 +0,0 @@ -//go:build !go1.8 -// +build !go1.8 - -// 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. - -package autorest - -import ( - "bytes" - "io" - "net/http" -) - -// RetriableRequest provides facilities for retrying an HTTP request. -type RetriableRequest struct { - req *http.Request - br *bytes.Reader -} - -// Prepare signals that the request is about to be sent. -func (rr *RetriableRequest) Prepare() (err error) { - // preserve the request body; this is to support retry logic as - // the underlying transport will always close the reqeust body - if rr.req.Body != nil && rr.req.Body != http.NoBody { - if rr.br != nil { - _, err = rr.br.Seek(0, 0 /*io.SeekStart*/) - rr.req.Body = io.NopCloser(rr.br) - } - if err != nil { - return err - } - if rr.br == nil { - // fall back to making a copy (only do this once) - err = rr.prepareFromByteReader() - } - } - return err -} - -func removeRequestBody(req *http.Request) { - req.Body = nil - req.ContentLength = 0 -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go b/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go deleted file mode 100644 index e36d4b0465..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/retriablerequest_1.8.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build go1.8 -// +build go1.8 - -// 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. - -package autorest - -import ( - "bytes" - "io" - "net/http" -) - -// RetriableRequest provides facilities for retrying an HTTP request. -type RetriableRequest struct { - req *http.Request - rc io.ReadCloser - br *bytes.Reader -} - -// Prepare signals that the request is about to be sent. -func (rr *RetriableRequest) Prepare() (err error) { - // preserve the request body; this is to support retry logic as - // the underlying transport will always close the reqeust body - if rr.req.Body != nil && rr.req.Body != http.NoBody { - if rr.rc != nil { - rr.req.Body = rr.rc - } else if rr.br != nil { - _, err = rr.br.Seek(0, io.SeekStart) - rr.req.Body = io.NopCloser(rr.br) - } - if err != nil { - return err - } - if rr.req.GetBody != nil { - // this will allow us to preserve the body without having to - // make a copy. note we need to do this on each iteration - rr.rc, err = rr.req.GetBody() - if err != nil { - return err - } - } else if rr.br == nil { - // fall back to making a copy (only do this once) - err = rr.prepareFromByteReader() - } - } - return err -} - -func removeRequestBody(req *http.Request) { - req.Body = nil - req.GetBody = nil - req.ContentLength = 0 -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/sender.go b/vendor/github.com/Azure/go-autorest/autorest/sender.go deleted file mode 100644 index 118de81411..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/sender.go +++ /dev/null @@ -1,458 +0,0 @@ -package autorest - -// 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. - -import ( - "context" - "crypto/tls" - "fmt" - "log" - "math" - "net" - "net/http" - "net/http/cookiejar" - "strconv" - "sync" - "time" - - "github.com/Azure/go-autorest/logger" - "github.com/Azure/go-autorest/tracing" -) - -// there is one sender per TLS renegotiation type, i.e. count of tls.RenegotiationSupport enums -const defaultSendersCount = 3 - -type defaultSender struct { - sender Sender - init *sync.Once -} - -// each type of sender will be created on demand in sender() -var defaultSenders [defaultSendersCount]defaultSender - -func init() { - for i := 0; i < defaultSendersCount; i++ { - defaultSenders[i].init = &sync.Once{} - } -} - -// 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. -type Sender interface { - Do(*http.Request) (*http.Response, error) -} - -// SenderFunc is a method that implements the Sender interface. -type SenderFunc func(*http.Request) (*http.Response, error) - -// Do implements the Sender interface on SenderFunc. -func (sf SenderFunc) Do(r *http.Request) (*http.Response, error) { - return sf(r) -} - -// SendDecorator takes and possibly decorates, by wrapping, a Sender. Decorators may affect the -// http.Request and pass it along or, first, pass the http.Request along then react to the -// http.Response result. -type SendDecorator func(Sender) Sender - -// CreateSender creates, decorates, and returns, as a Sender, the default http.Client. -func CreateSender(decorators ...SendDecorator) Sender { - return DecorateSender(sender(tls.RenegotiateNever), decorators...) -} - -// DecorateSender accepts a Sender and a, possibly empty, set of SendDecorators, which is applies to -// the Sender. Decorators are applied in the order received, but their affect upon the request -// depends on whether they are a pre-decorator (change the http.Request and then pass it along) or a -// post-decorator (pass the http.Request along and react to the results in http.Response). -func DecorateSender(s Sender, decorators ...SendDecorator) Sender { - for _, decorate := range decorators { - s = decorate(s) - } - return s -} - -// Send sends, by means of the default http.Client, the passed http.Request, returning the -// http.Response and possible error. It also accepts a, possibly empty, set of SendDecorators which -// it will apply the http.Client before invoking the Do method. -// -// Send is a convenience method and not recommended for production. Advanced users should use -// SendWithSender, passing and sharing their own Sender (e.g., instance of http.Client). -// -// Send will not poll or retry requests. -func Send(r *http.Request, decorators ...SendDecorator) (*http.Response, error) { - return SendWithSender(sender(tls.RenegotiateNever), r, decorators...) -} - -// SendWithSender sends the passed http.Request, through the provided Sender, returning the -// http.Response and possible error. It also accepts a, possibly empty, set of SendDecorators which -// it will apply the http.Client before invoking the Do method. -// -// SendWithSender will not poll or retry requests. -func SendWithSender(s Sender, r *http.Request, decorators ...SendDecorator) (*http.Response, error) { - return DecorateSender(s, decorators...).Do(r) -} - -func sender(renengotiation tls.RenegotiationSupport) Sender { - // note that we can't init defaultSenders in init() since it will - // execute before calling code has had a chance to enable tracing - defaultSenders[renengotiation].init.Do(func() { - // copied from http.DefaultTransport with a TLS minimum version. - transport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - }).DialContext, - ForceAttemptHTTP2: true, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - TLSClientConfig: &tls.Config{ - MinVersion: tls.VersionTLS12, - Renegotiation: renengotiation, - }, - } - var roundTripper http.RoundTripper = transport - if tracing.IsEnabled() { - roundTripper = tracing.NewTransport(transport) - } - j, _ := cookiejar.New(nil) - defaultSenders[renengotiation].sender = &http.Client{Jar: j, Transport: roundTripper} - }) - return defaultSenders[renengotiation].sender -} - -// 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. -func AfterDelay(d time.Duration) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - if !DelayForBackoff(d, 0, r.Context().Done()) { - return nil, fmt.Errorf("autorest: AfterDelay canceled before full delay") - } - return s.Do(r) - }) - } -} - -// AsIs returns a SendDecorator that invokes the passed Sender without modifying the http.Request. -func AsIs() SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - return s.Do(r) - }) - } -} - -// DoCloseIfError returns a SendDecorator that first invokes the passed Sender after which -// it closes the response if the passed Sender returns an error and the response body exists. -func DoCloseIfError() SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - resp, err := s.Do(r) - if err != nil { - Respond(resp, ByDiscardingBody(), ByClosing()) - } - return resp, err - }) - } -} - -// DoErrorIfStatusCode returns a SendDecorator that emits an error if the response StatusCode is -// among the set passed. Since these are artificial errors, the response body may still require -// closing. -func DoErrorIfStatusCode(codes ...int) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - resp, err := s.Do(r) - if err == nil && ResponseHasStatusCode(resp, codes...) { - err = NewErrorWithResponse("autorest", "DoErrorIfStatusCode", resp, "%v %v failed with %s", - resp.Request.Method, - resp.Request.URL, - resp.Status) - } - return resp, err - }) - } -} - -// DoErrorUnlessStatusCode returns a SendDecorator that emits an error unless the response -// StatusCode is among the set passed. Since these are artificial errors, the response body -// may still require closing. -func DoErrorUnlessStatusCode(codes ...int) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - resp, err := s.Do(r) - if err == nil && !ResponseHasStatusCode(resp, codes...) { - err = NewErrorWithResponse("autorest", "DoErrorUnlessStatusCode", resp, "%v %v failed with %s", - resp.Request.Method, - resp.Request.URL, - resp.Status) - } - return resp, err - }) - } -} - -// DoPollForStatusCodes returns a SendDecorator that polls if the http.Response contains one of the -// passed status codes. It expects the http.Response to contain a Location header providing the -// URL at which to poll (using GET) and will poll until the time passed is equal to or greater than -// the supplied duration. 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 by -// closing the optional channel on the http.Request. -func DoPollForStatusCodes(duration time.Duration, delay time.Duration, codes ...int) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - resp, err = s.Do(r) - - if err == nil && ResponseHasStatusCode(resp, codes...) { - r, err = NewPollingRequestWithContext(r.Context(), resp) - - for err == nil && ResponseHasStatusCode(resp, codes...) { - Respond(resp, - ByDiscardingBody(), - ByClosing()) - resp, err = SendWithSender(s, r, - AfterDelay(GetRetryAfter(resp, delay))) - } - } - - return resp, err - }) - } -} - -// DoRetryForAttempts returns a SendDecorator that retries a failed request 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. -func DoRetryForAttempts(attempts int, backoff time.Duration) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - rr := NewRetriableRequest(r) - for attempt := 0; attempt < attempts; attempt++ { - err = rr.Prepare() - if err != nil { - return resp, err - } - DrainResponseBody(resp) - resp, err = s.Do(rr.Request()) - if err == nil { - return resp, err - } - logger.Instance.Writef(logger.LogError, "DoRetryForAttempts: received error for attempt %d: %v\n", attempt+1, err) - if !DelayForBackoff(backoff, attempt, r.Context().Done()) { - return nil, r.Context().Err() - } - } - return resp, err - }) - } -} - -// Count429AsRetry indicates that a 429 response should be included as a retry attempt. -var Count429AsRetry = true - -// Max429Delay is the maximum duration to wait between retries on a 429 if no Retry-After header was received. -var Max429Delay time.Duration - -// 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 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) (*http.Response, error) { - return doRetryForStatusCodesImpl(s, r, Count429AsRetry, attempts, backoff, 0, codes...) - }) - } -} - -// 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, Count429AsRetry, 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, delayCount := 0, 0; attempt < attempts+1; { - err = rr.Prepare() - if err != nil { - return - } - DrainResponseBody(resp) - resp, err = s.Do(rr.Request()) - // 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 - } - if err != nil { - logger.Instance.Writef(logger.LogError, "DoRetryForStatusCodes: received error for attempt %d: %v\n", attempt+1, err) - } - delayed := DelayWithRetryAfter(resp, r.Context().Done()) - // if this was a 429 set the delay cap as specified. - // applicable only in the absence of a retry-after header. - if resp != nil && resp.StatusCode == http.StatusTooManyRequests { - cap = Max429Delay - } - if !delayed && !DelayForBackoffWithCap(backoff, cap, delayCount, 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++ - } - // delay count is tracked separately from attempts to - // ensure that 429 participates in exponential back-off - delayCount++ - } - 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 - } - 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(dur): - return true - case <-cancel: - return false - } - } - return false -} - -// DoRetryForDuration returns a SendDecorator that retries the request until the total time is equal -// to or greater than the specified duration, 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. -func DoRetryForDuration(d time.Duration, backoff time.Duration) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (resp *http.Response, err error) { - rr := NewRetriableRequest(r) - end := time.Now().Add(d) - for attempt := 0; time.Now().Before(end); attempt++ { - err = rr.Prepare() - if err != nil { - return resp, err - } - DrainResponseBody(resp) - resp, err = s.Do(rr.Request()) - if err == nil { - return resp, err - } - logger.Instance.Writef(logger.LogError, "DoRetryForDuration: received error for attempt %d: %v\n", attempt+1, err) - if !DelayForBackoff(backoff, attempt, r.Context().Done()) { - return nil, r.Context().Err() - } - } - return resp, err - }) - } -} - -// WithLogging returns a SendDecorator that implements simple before and after logging of the -// request. -func WithLogging(logger *log.Logger) SendDecorator { - return func(s Sender) Sender { - return SenderFunc(func(r *http.Request) (*http.Response, error) { - logger.Printf("Sending %s %s", r.Method, r.URL) - resp, err := s.Do(r) - if err != nil { - logger.Printf("%s %s received error '%v'", r.Method, r.URL, err) - } else { - logger.Printf("%s %s received %s", r.Method, r.URL, resp.Status) - } - return resp, err - }) - } -} - -// DelayForBackoff 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. 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 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 - } - logger.Instance.Writef(logger.LogInfo, "DelayForBackoffWithCap: sleeping for %s\n", d) - select { - 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 deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/to/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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 deleted file mode 100644 index 86694bd255..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/to/convert.go +++ /dev/null @@ -1,152 +0,0 @@ -/* -Package to provides helpers to ease working with pointer values of marshalled structures. -*/ -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. - -// String returns a string value for the passed string pointer. It returns the empty string if the -// pointer is nil. -func String(s *string) string { - if s != nil { - return *s - } - return "" -} - -// StringPtr returns a pointer to the passed string. -func StringPtr(s string) *string { - return &s -} - -// StringSlice returns a string slice value for the passed string slice pointer. It returns a nil -// slice if the pointer is nil. -func StringSlice(s *[]string) []string { - if s != nil { - return *s - } - return nil -} - -// StringSlicePtr returns a pointer to the passed string slice. -func StringSlicePtr(s []string) *[]string { - return &s -} - -// StringMap returns a map of strings built from the map of string pointers. The empty string is -// used for nil pointers. -func StringMap(msp map[string]*string) map[string]string { - ms := make(map[string]string, len(msp)) - for k, sp := range msp { - if sp != nil { - ms[k] = *sp - } else { - ms[k] = "" - } - } - return ms -} - -// StringMapPtr returns a pointer to a map of string pointers built from the passed map of strings. -func StringMapPtr(ms map[string]string) *map[string]*string { - msp := make(map[string]*string, len(ms)) - for k, s := range ms { - msp[k] = StringPtr(s) - } - return &msp -} - -// Bool returns a bool value for the passed bool pointer. It returns false if the pointer is nil. -func Bool(b *bool) bool { - if b != nil { - return *b - } - return false -} - -// BoolPtr returns a pointer to the passed bool. -func BoolPtr(b bool) *bool { - return &b -} - -// Int returns an int value for the passed int pointer. It returns 0 if the pointer is nil. -func Int(i *int) int { - if i != nil { - return *i - } - return 0 -} - -// IntPtr returns a pointer to the passed int. -func IntPtr(i int) *int { - return &i -} - -// Int32 returns an int value for the passed int pointer. It returns 0 if the pointer is nil. -func Int32(i *int32) int32 { - if i != nil { - return *i - } - return 0 -} - -// Int32Ptr returns a pointer to the passed int32. -func Int32Ptr(i int32) *int32 { - return &i -} - -// Int64 returns an int value for the passed int pointer. It returns 0 if the pointer is nil. -func Int64(i *int64) int64 { - if i != nil { - return *i - } - return 0 -} - -// Int64Ptr returns a pointer to the passed int64. -func Int64Ptr(i int64) *int64 { - return &i -} - -// Float32 returns an int value for the passed int pointer. It returns 0.0 if the pointer is nil. -func Float32(i *float32) float32 { - if i != nil { - return *i - } - return 0.0 -} - -// Float32Ptr returns a pointer to the passed float32. -func Float32Ptr(i float32) *float32 { - return &i -} - -// Float64 returns an int value for the passed int pointer. It returns 0.0 if the pointer is nil. -func Float64(i *float64) float64 { - if i != nil { - return *i - } - return 0.0 -} - -// Float64Ptr returns a pointer to the passed 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/utility.go b/vendor/github.com/Azure/go-autorest/autorest/utility.go deleted file mode 100644 index 8c5eb5dbe5..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/utility.go +++ /dev/null @@ -1,231 +0,0 @@ -package autorest - -// 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. - -import ( - "bytes" - "encoding/json" - "encoding/xml" - "fmt" - "io" - "net" - "net/http" - "net/url" - "reflect" - "strings" -) - -// EncodedAs is a series of constants specifying various data encodings -type EncodedAs string - -const ( - // EncodedAsJSON states that data is encoded as JSON - EncodedAsJSON EncodedAs = "JSON" - - // EncodedAsXML states that data is encoded as Xml - EncodedAsXML EncodedAs = "XML" -) - -// Decoder defines the decoding method json.Decoder and xml.Decoder share -type Decoder interface { - Decode(v interface{}) error -} - -// NewDecoder creates a new decoder appropriate to the passed encoding. -// encodedAs specifies the type of encoding and r supplies the io.Reader containing the -// encoded data. -func NewDecoder(encodedAs EncodedAs, r io.Reader) Decoder { - if encodedAs == EncodedAsJSON { - return json.NewDecoder(r) - } else if encodedAs == EncodedAsXML { - return xml.NewDecoder(r) - } - return nil -} - -// CopyAndDecode decodes the data from the passed io.Reader while making a copy. Having a copy -// is especially useful if there is a chance the data will fail to decode. -// encodedAs specifies the expected encoding, r provides the io.Reader to the data, and v -// is the decoding destination. -func CopyAndDecode(encodedAs EncodedAs, r io.Reader, v interface{}) (b bytes.Buffer, err error) { - err = NewDecoder(encodedAs, io.TeeReader(r, &b)).Decode(v) - return -} - -// TeeReadCloser returns a ReadCloser that writes to w what it reads from rc. -// It utilizes io.TeeReader to copy the data read and has the same behavior when reading. -// Further, when it is closed, it ensures that rc is closed as well. -func TeeReadCloser(rc io.ReadCloser, w io.Writer) io.ReadCloser { - return &teeReadCloser{rc, io.TeeReader(rc, w)} -} - -type teeReadCloser struct { - rc io.ReadCloser - r io.Reader -} - -func (t *teeReadCloser) Read(p []byte) (int, error) { - return t.r.Read(p) -} - -func (t *teeReadCloser) Close() error { - return t.rc.Close() -} - -func containsInt(ints []int, n int) bool { - for _, i := range ints { - if i == n { - return true - } - } - return false -} - -func escapeValueStrings(m map[string]string) map[string]string { - for key, value := range m { - m[key] = url.QueryEscape(value) - } - return m -} - -func ensureValueStrings(mapOfInterface map[string]interface{}) map[string]string { - mapOfStrings := make(map[string]string) - for key, value := range mapOfInterface { - mapOfStrings[key] = ensureValueString(value) - } - return mapOfStrings -} - -func ensureValueString(value interface{}) string { - if value == nil { - return "" - } - switch v := value.(type) { - case string: - return v - case []byte: - return string(v) - default: - return fmt.Sprintf("%v", v) - } -} - -// MapToValues method converts map[string]interface{} to url.Values. -func MapToValues(m map[string]interface{}) url.Values { - v := url.Values{} - for key, value := range m { - x := reflect.ValueOf(value) - if x.Kind() == reflect.Array || x.Kind() == reflect.Slice { - for i := 0; i < x.Len(); i++ { - v.Add(key, ensureValueString(x.Index(i))) - } - } else { - v.Add(key, ensureValueString(value)) - } - } - return v -} - -// AsStringSlice method converts interface{} to []string. -// s must be of type slice or array or an error is returned. -// Each element of s will be converted to its string representation. -func AsStringSlice(s interface{}) ([]string, error) { - v := reflect.ValueOf(s) - if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, NewError("autorest", "AsStringSlice", "the value's type is not a slice or array.") - } - stringSlice := make([]string, 0, v.Len()) - - for i := 0; i < v.Len(); i++ { - stringSlice = append(stringSlice, fmt.Sprintf("%v", v.Index(i))) - } - return stringSlice, nil -} - -// String method converts interface v to string. If interface is a list, it -// joins list elements using the separator. Note that only sep[0] will be used for -// joining if any separator is specified. -func String(v interface{}, sep ...string) string { - if len(sep) == 0 { - return ensureValueString(v) - } - stringSlice, ok := v.([]string) - if ok == false { - var err error - stringSlice, err = AsStringSlice(v) - if err != nil { - panic(fmt.Sprintf("autorest: Couldn't convert value to a string %s.", err)) - } - } - return ensureValueString(strings.Join(stringSlice, sep[0])) -} - -// Encode method encodes url path and query parameters. -func Encode(location string, v interface{}, sep ...string) string { - s := String(v, sep...) - switch strings.ToLower(location) { - case "path": - return pathEscape(s) - case "query": - return queryEscape(s) - default: - return s - } -} - -func pathEscape(s string) string { - return strings.Replace(url.QueryEscape(s), "+", "%20", -1) -} - -func queryEscape(s string) string { - return url.QueryEscape(s) -} - -// ChangeToGet turns the specified http.Request into a GET (it assumes it wasn't). -// This is mainly useful for long-running operations that use the Azure-AsyncOperation -// header, so we change the initial PUT into a GET to retrieve the final result. -func ChangeToGet(req *http.Request) *http.Request { - req.Method = "GET" - req.Body = nil - req.ContentLength = 0 - req.Header.Del("Content-Length") - return req -} - -// IsTemporaryNetworkError returns true if the specified error is a temporary network error or false -// if it's not. If the error doesn't implement the net.Error interface the return value is true. -func IsTemporaryNetworkError(err error) bool { - if netErr, ok := err.(net.Error); !ok || (ok && netErr.Temporary()) { - return true - } - return false -} - -// DrainResponseBody reads the response body then closes it. -func DrainResponseBody(resp *http.Response) error { - if resp != nil && resp.Body != nil { - _, err := io.Copy(io.Discard, resp.Body) - resp.Body.Close() - return err - } - return nil -} - -func setHeader(r *http.Request, key, value string) { - if r.Header == nil { - r.Header = make(http.Header) - } - r.Header.Set(key, value) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go b/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go deleted file mode 100644 index 3133fcc08e..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/utility_1.13.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build go1.13 -// +build go1.13 - -// 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. - -package autorest - -import ( - "errors" - - "github.com/Azure/go-autorest/autorest/adal" -) - -// IsTokenRefreshError returns true if the specified error implements the TokenRefreshError interface. -func IsTokenRefreshError(err error) bool { - var tre adal.TokenRefreshError - return errors.As(err, &tre) -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go b/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go deleted file mode 100644 index 851e152db4..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/utility_legacy.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build !go1.13 -// +build !go1.13 - -// 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. - -package autorest - -import "github.com/Azure/go-autorest/autorest/adal" - -// IsTokenRefreshError returns true if the specified error implements the TokenRefreshError -// interface. If err is a DetailedError it will walk the chain of Original errors. -func IsTokenRefreshError(err error) bool { - if _, ok := err.(adal.TokenRefreshError); ok { - return true - } - if de, ok := err.(DetailedError); ok { - return IsTokenRefreshError(de.Original) - } - return false -} diff --git a/vendor/github.com/Azure/go-autorest/autorest/version.go b/vendor/github.com/Azure/go-autorest/autorest/version.go deleted file mode 100644 index 713e23581d..0000000000 --- a/vendor/github.com/Azure/go-autorest/autorest/version.go +++ /dev/null @@ -1,41 +0,0 @@ -package autorest - -// 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. - -import ( - "fmt" - "runtime" -) - -const number = "v14.2.1" - -var ( - userAgent = fmt.Sprintf("Go/%s (%s-%s) go-autorest/%s", - runtime.Version(), - runtime.GOARCH, - runtime.GOOS, - number, - ) -) - -// UserAgent returns a string containing the Go version, system architecture and OS, and the go-autorest version. -func UserAgent() string { - return userAgent -} - -// Version returns the semantic version (see http://semver.org). -func Version() string { - return number -} diff --git a/vendor/github.com/Azure/go-autorest/azure-pipelines.yml b/vendor/github.com/Azure/go-autorest/azure-pipelines.yml deleted file mode 100644 index 6fb8404fd0..0000000000 --- a/vendor/github.com/Azure/go-autorest/azure-pipelines.yml +++ /dev/null @@ -1,105 +0,0 @@ -variables: - GOPATH: '$(system.defaultWorkingDirectory)/work' - sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)' - -jobs: - - job: 'goautorest' - displayName: 'Run go-autorest CI Checks' - - strategy: - matrix: - Linux_Go113: - vm.image: 'ubuntu-18.04' - go.version: '1.13' - Linux_Go114: - vm.image: 'ubuntu-18.04' - go.version: '1.14' - - pool: - vmImage: '$(vm.image)' - - steps: - - task: GoTool@0 - inputs: - version: '$(go.version)' - displayName: "Select Go Version" - - - script: | - set -e - mkdir -p '$(GOPATH)/bin' - mkdir -p '$(sdkPath)' - shopt -s extglob - mv !(work) '$(sdkPath)' - echo '##vso[task.prependpath]$(GOPATH)/bin' - displayName: 'Create Go Workspace' - - - script: | - set -e - curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh - dep ensure -v - go install ./vendor/golang.org/x/lint/golint - go get github.com/jstemmer/go-junit-report - go get github.com/axw/gocov/gocov - go get github.com/AlekSi/gocov-xml - go get -u github.com/matm/gocov-html - workingDirectory: '$(sdkPath)' - displayName: 'Install Dependencies' - - - script: | - go vet ./autorest/... - go vet ./logger/... - go vet ./tracing/... - workingDirectory: '$(sdkPath)' - displayName: 'Vet' - - - script: | - go build -v ./autorest/... - go build -v ./logger/... - go build -v ./tracing/... - workingDirectory: '$(sdkPath)' - displayName: 'Build' - - - script: | - set -e - go test -race -v -coverprofile=coverage.txt -covermode atomic ./autorest/... ./logger/... ./tracing/... 2>&1 | go-junit-report > report.xml - gocov convert coverage.txt > coverage.json - gocov-xml < coverage.json > coverage.xml - gocov-html < coverage.json > coverage.html - workingDirectory: '$(sdkPath)' - displayName: 'Run Tests' - - - script: grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee >&2 - workingDirectory: '$(sdkPath)' - displayName: 'Copyright Header Check' - failOnStderr: true - condition: succeededOrFailed() - - - script: | - gofmt -s -l -w ./autorest/. >&2 - gofmt -s -l -w ./logger/. >&2 - gofmt -s -l -w ./tracing/. >&2 - workingDirectory: '$(sdkPath)' - displayName: 'Format Check' - failOnStderr: true - condition: succeededOrFailed() - - - script: | - golint ./autorest/... >&2 - golint ./logger/... >&2 - golint ./tracing/... >&2 - workingDirectory: '$(sdkPath)' - displayName: 'Linter Check' - failOnStderr: true - condition: succeededOrFailed() - - - task: PublishTestResults@2 - inputs: - testRunner: JUnit - testResultsFiles: $(sdkPath)/report.xml - failTaskOnFailedTests: true - - - task: PublishCodeCoverageResults@1 - inputs: - codeCoverageTool: Cobertura - summaryFileLocation: $(sdkPath)/coverage.xml - additionalCodeCoverageFiles: $(sdkPath)/coverage.html diff --git a/vendor/github.com/Azure/go-autorest/doc.go b/vendor/github.com/Azure/go-autorest/doc.go deleted file mode 100644 index 99ae6ca988..0000000000 --- a/vendor/github.com/Azure/go-autorest/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Package go-autorest provides an HTTP request client for use with Autorest-generated API client packages. -*/ -package go_autorest - -// 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. diff --git a/vendor/github.com/Azure/go-autorest/logger/LICENSE b/vendor/github.com/Azure/go-autorest/logger/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/logger/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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_tidy_hack.go b/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go deleted file mode 100644 index 0aa27680db..0000000000 --- a/vendor/github.com/Azure/go-autorest/logger/go_mod_tidy_hack.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build modhack - -package logger - -// 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 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" diff --git a/vendor/github.com/Azure/go-autorest/logger/logger.go b/vendor/github.com/Azure/go-autorest/logger/logger.go deleted file mode 100644 index 2f5d8cc1a1..0000000000 --- a/vendor/github.com/Azure/go-autorest/logger/logger.go +++ /dev/null @@ -1,337 +0,0 @@ -package logger - -// 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. - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "net/http" - "net/url" - "os" - "strings" - "sync" - "time" -) - -// LevelType tells a logger the minimum level to log. When code reports a log entry, -// the LogLevel indicates the level of the log entry. The logger only records entries -// whose level is at least the level it was told to log. See the Log* constants. -// For example, if a logger is configured with LogError, then LogError, LogPanic, -// and LogFatal entries will be logged; lower level entries are ignored. -type LevelType uint32 - -const ( - // LogNone tells a logger not to log any entries passed to it. - LogNone LevelType = iota - - // LogFatal tells a logger to log all LogFatal entries passed to it. - LogFatal - - // LogPanic tells a logger to log all LogPanic and LogFatal entries passed to it. - LogPanic - - // LogError tells a logger to log all LogError, LogPanic and LogFatal entries passed to it. - LogError - - // LogWarning tells a logger to log all LogWarning, LogError, LogPanic and LogFatal entries passed to it. - LogWarning - - // LogInfo tells a logger to log all LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it. - LogInfo - - // LogDebug tells a logger to log all LogDebug, LogInfo, LogWarning, LogError, LogPanic and LogFatal entries passed to it. - LogDebug - - // LogAuth is a special case of LogDebug, it tells a logger to also log the body of an authentication request and response. - // NOTE: this can disclose sensitive information, use with care. - LogAuth -) - -const ( - logNone = "NONE" - logFatal = "FATAL" - logPanic = "PANIC" - logError = "ERROR" - logWarning = "WARNING" - logInfo = "INFO" - logDebug = "DEBUG" - logAuth = "AUTH" - logUnknown = "UNKNOWN" -) - -// ParseLevel converts the specified string into the corresponding LevelType. -func ParseLevel(s string) (lt LevelType, err error) { - switch strings.ToUpper(s) { - case logFatal: - lt = LogFatal - case logPanic: - lt = LogPanic - case logError: - lt = LogError - case logWarning: - lt = LogWarning - case logInfo: - lt = LogInfo - case logDebug: - lt = LogDebug - case logAuth: - lt = LogAuth - default: - err = fmt.Errorf("bad log level '%s'", s) - } - return -} - -// String implements the stringer interface for LevelType. -func (lt LevelType) String() string { - switch lt { - case LogNone: - return logNone - case LogFatal: - return logFatal - case LogPanic: - return logPanic - case LogError: - return logError - case LogWarning: - return logWarning - case LogInfo: - return logInfo - case LogDebug: - return logDebug - case LogAuth: - return logAuth - default: - return logUnknown - } -} - -// Filter defines functions for filtering HTTP request/response content. -type Filter struct { - // URL returns a potentially modified string representation of a request URL. - URL func(u *url.URL) string - - // Header returns a potentially modified set of values for the specified key. - // To completely exclude the header key/values return false. - Header func(key string, val []string) (bool, []string) - - // Body returns a potentially modified request/response body. - Body func(b []byte) []byte -} - -func (f Filter) processURL(u *url.URL) string { - if f.URL == nil { - return u.String() - } - return f.URL(u) -} - -func (f Filter) processHeader(k string, val []string) (bool, []string) { - if f.Header == nil { - return true, val - } - return f.Header(k, val) -} - -func (f Filter) processBody(b []byte) []byte { - if f.Body == nil { - return b - } - return f.Body(b) -} - -// Writer defines methods for writing to a logging facility. -type Writer interface { - // Writeln writes the specified message with the standard log entry header and new-line character. - Writeln(level LevelType, message string) - - // Writef writes the specified format specifier with the standard log entry header and no new-line character. - Writef(level LevelType, format string, a ...interface{}) - - // WriteRequest writes the specified HTTP request to the logger if the log level is greater than - // or equal to LogInfo. The request body, if set, is logged at level LogDebug or higher. - // Custom filters can be specified to exclude URL, header, and/or body content from the log. - // By default no request content is excluded. - WriteRequest(req *http.Request, filter Filter) - - // WriteResponse writes the specified HTTP response to the logger if the log level is greater than - // or equal to LogInfo. The response body, if set, is logged at level LogDebug or higher. - // Custom filters can be specified to exclude URL, header, and/or body content from the log. - // By default no response content is excluded. - WriteResponse(resp *http.Response, filter Filter) -} - -// Instance is the default log writer initialized during package init. -// This can be replaced with a custom implementation as required. -var Instance Writer - -// default log level -var logLevel = LogNone - -// Level returns the value specified in AZURE_GO_AUTOREST_LOG_LEVEL. -// If no value was specified the default value is LogNone. -// Custom loggers can call this to retrieve the configured log level. -func Level() LevelType { - return logLevel -} - -func init() { - // separated for testing purposes - initDefaultLogger() -} - -func initDefaultLogger() { - // init with nilLogger so callers don't have to do a nil check on Default - Instance = nilLogger{} - llStr := strings.ToLower(os.Getenv("AZURE_GO_SDK_LOG_LEVEL")) - if llStr == "" { - return - } - var err error - logLevel, err = ParseLevel(llStr) - if err != nil { - fmt.Fprintf(os.Stderr, "go-autorest: failed to parse log level: %s\n", err.Error()) - return - } - if logLevel == LogNone { - return - } - // default to stderr - dest := os.Stderr - lfStr := os.Getenv("AZURE_GO_SDK_LOG_FILE") - if strings.EqualFold(lfStr, "stdout") { - dest = os.Stdout - } else if lfStr != "" { - lf, err := os.Create(lfStr) - if err == nil { - dest = lf - } else { - fmt.Fprintf(os.Stderr, "go-autorest: failed to create log file, using stderr: %s\n", err.Error()) - } - } - Instance = fileLogger{ - logLevel: logLevel, - mu: &sync.Mutex{}, - logFile: dest, - } -} - -// the nil logger does nothing -type nilLogger struct{} - -func (nilLogger) Writeln(LevelType, string) {} - -func (nilLogger) Writef(LevelType, string, ...interface{}) {} - -func (nilLogger) WriteRequest(*http.Request, Filter) {} - -func (nilLogger) WriteResponse(*http.Response, Filter) {} - -// A File is used instead of a Logger so the stream can be flushed after every write. -type fileLogger struct { - logLevel LevelType - mu *sync.Mutex // for synchronizing writes to logFile - logFile *os.File -} - -func (fl fileLogger) Writeln(level LevelType, message string) { - fl.Writef(level, "%s\n", message) -} - -func (fl fileLogger) Writef(level LevelType, format string, a ...interface{}) { - if fl.logLevel >= level { - fl.mu.Lock() - defer fl.mu.Unlock() - fmt.Fprintf(fl.logFile, "%s %s", entryHeader(level), fmt.Sprintf(format, a...)) - fl.logFile.Sync() - } -} - -func (fl fileLogger) WriteRequest(req *http.Request, filter Filter) { - if req == nil || fl.logLevel < LogInfo { - return - } - b := &bytes.Buffer{} - fmt.Fprintf(b, "%s REQUEST: %s %s\n", entryHeader(LogInfo), req.Method, filter.processURL(req.URL)) - // dump headers - for k, v := range req.Header { - if ok, mv := filter.processHeader(k, v); ok { - fmt.Fprintf(b, "%s: %s\n", k, strings.Join(mv, ",")) - } - } - if fl.shouldLogBody(req.Header, req.Body) { - // dump body - body, err := ioutil.ReadAll(req.Body) - if err == nil { - fmt.Fprintln(b, string(filter.processBody(body))) - if nc, ok := req.Body.(io.Seeker); ok { - // rewind to the beginning - nc.Seek(0, io.SeekStart) - } else { - // recreate the body - req.Body = ioutil.NopCloser(bytes.NewReader(body)) - } - } else { - fmt.Fprintf(b, "failed to read body: %v\n", err) - } - } - fl.mu.Lock() - defer fl.mu.Unlock() - fmt.Fprint(fl.logFile, b.String()) - fl.logFile.Sync() -} - -func (fl fileLogger) WriteResponse(resp *http.Response, filter Filter) { - if resp == nil || fl.logLevel < LogInfo { - return - } - b := &bytes.Buffer{} - fmt.Fprintf(b, "%s RESPONSE: %d %s\n", entryHeader(LogInfo), resp.StatusCode, filter.processURL(resp.Request.URL)) - // dump headers - for k, v := range resp.Header { - if ok, mv := filter.processHeader(k, v); ok { - fmt.Fprintf(b, "%s: %s\n", k, strings.Join(mv, ",")) - } - } - if fl.shouldLogBody(resp.Header, resp.Body) { - // dump body - defer resp.Body.Close() - body, err := ioutil.ReadAll(resp.Body) - if err == nil { - fmt.Fprintln(b, string(filter.processBody(body))) - resp.Body = ioutil.NopCloser(bytes.NewReader(body)) - } else { - fmt.Fprintf(b, "failed to read body: %v\n", err) - } - } - fl.mu.Lock() - defer fl.mu.Unlock() - fmt.Fprint(fl.logFile, b.String()) - fl.logFile.Sync() -} - -// returns true if the provided body should be included in the log -func (fl fileLogger) shouldLogBody(header http.Header, body io.ReadCloser) bool { - ct := header.Get("Content-Type") - return fl.logLevel >= LogDebug && body != nil && !strings.Contains(ct, "application/octet-stream") -} - -// creates standard header for log entries, it contains a timestamp and the log level -func entryHeader(level LevelType) string { - // this format provides a fixed number of digits so the size of the timestamp is constant - return fmt.Sprintf("(%s) %s:", time.Now().Format("2006-01-02T15:04:05.0000000Z07:00"), level.String()) -} diff --git a/vendor/github.com/Azure/go-autorest/tracing/LICENSE b/vendor/github.com/Azure/go-autorest/tracing/LICENSE deleted file mode 100644 index b9d6a27ea9..0000000000 --- a/vendor/github.com/Azure/go-autorest/tracing/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - 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_tidy_hack.go b/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go deleted file mode 100644 index e163975cd4..0000000000 --- a/vendor/github.com/Azure/go-autorest/tracing/go_mod_tidy_hack.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build modhack - -package tracing - -// 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 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" diff --git a/vendor/github.com/Azure/go-autorest/tracing/tracing.go b/vendor/github.com/Azure/go-autorest/tracing/tracing.go deleted file mode 100644 index 0e7a6e9625..0000000000 --- a/vendor/github.com/Azure/go-autorest/tracing/tracing.go +++ /dev/null @@ -1,67 +0,0 @@ -package tracing - -// Copyright 2018 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. - -import ( - "context" - "net/http" -) - -// 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) -} - -var ( - tracer Tracer -) - -// Register will register the provided Tracer. Pass nil to unregister a Tracer. -func Register(t Tracer) { - tracer = t -} - -// IsEnabled returns true if a Tracer has been registered. -func IsEnabled() bool { - return tracer != nil -} - -// 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) - } - return nil -} - -// 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 { - if tracer != nil { - return tracer.StartSpan(ctx, name) - } - return ctx -} - -// 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) { - if tracer != nil { - tracer.EndSpan(ctx, httpStatusCode, err) - } -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/LICENSE b/vendor/github.com/DataDog/appsec-internal-go/LICENSE deleted file mode 100644 index 9301dd7ab9..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/appsec-internal-go/apisec/internal/config/const.go b/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/config/const.go deleted file mode 100644 index 6483f28808..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/config/const.go +++ /dev/null @@ -1,11 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package config - -const ( - // MaxItemCount is the maximum amount of items to keep in a timed set. - MaxItemCount = 4_096 -) diff --git a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/clock.go b/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/clock.go deleted file mode 100644 index da0fa7f1de..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/clock.go +++ /dev/null @@ -1,42 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package timed - -import "time" - -type ( - ClockFunc = func() int64 - - // biasedClock is a specialized clock implementation used to ensure we can get - // 32-bit wide timestamps without having to worry about wraparound. - biasedClock struct { - // clock is the underlying clock, returning a timestamp in seconds. - clock ClockFunc - // bias is effectively the time at which the biasedClock was initialized. - bias int64 - } -) - -// newBiasedClock creates a new [biasedClock] with the given clock function and -// horizon. -func newBiasedClock(clock ClockFunc, horizon uint32) biasedClock { - return biasedClock{ - clock: clock, - bias: clock() - int64(horizon), - } -} - -// Now returns the current timestamp, relative to this [biasedClock]. -func (c *biasedClock) Now() uint32 { - // We clamp it to [0,) to be absolutely safe... - return uint32(max(0, c.clock()-c.bias)) -} - -// UnixTime is a [ClockFunc] that returns the current Unix time (seconds since -// the Unix epoch). -func UnixTime() int64 { - return time.Now().Unix() -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/lru.go b/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/lru.go deleted file mode 100644 index 4a86f5d16c..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/lru.go +++ /dev/null @@ -1,211 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package timed - -import ( - "fmt" - "math" - "math/rand" - "sync/atomic" - "time" - - "github.com/DataDog/appsec-internal-go/apisec/internal/config" - "github.com/DataDog/appsec-internal-go/log" -) - -// capacity is the maximum number of items that may be temporarily present in a -// [LRU]. An eviction triggers once [config.MaxItemCount] is reached, however the -// implementation is based on Copy-Update-Replace semantics, so during a table -// rebuild, the old table may contrinue to receive items for a short while. -const capacity = 2 * config.MaxItemCount - -// LRU is a specialized open-addressing-hash-table-based implementation of a -// specialized LRU cache, using Copy-Update-Replace semantics to operate in a -// completely lock-less manner. -type LRU struct { - // table is the pointer to the current backing hash table - table atomic.Pointer[table] - // clock is used to determine the current timestamp when making - // changes - clock biasedClock - // intervalSeconds is the amount of time in seconds that an entry is - // considered live for. - intervalSeconds uint32 - // zeroKey is a key that is used to replace 0 in the set. This key and 0 are - // effectively the same item. This allows us to gracefully handle 0 in our - // use-case without having to half the hash-space (to 63 bits) so we can use - // one bit as an empty discriminator. The value is chosen at random when the - // set is created, so that different instances will merge 0 with a different - // key. - zeroKey uint64 - // rebuilding is a flag to indicate whether the table is being rebuilt as - // part of an eviction request. - rebuilding atomic.Bool -} - -// NewLRU initializes a new, empty [LRU] with the given interval and clock -// function. A warning will be logged if it is set below 1 second. Panics if -// the interval is more than [math.MaxUint32] seconds, as this value cannot be -// used internally. -// -// Note: timestamps are stored at second resolution, so the interval will be -// rounded down to the nearest second. -func NewLRU(interval time.Duration, clock ClockFunc) *LRU { - if interval < time.Second { - log.Warn("NewLRU: interval is less than one second; this should not be attempted in production (value: %s)", interval) - } - if interval > time.Second*math.MaxUint32 { - panic(fmt.Errorf("NewLRU: interval must be <= %s, but was %s", time.Second*math.MaxUint32, interval)) - } - - intervalSeconds := uint32(interval.Seconds()) - set := &LRU{ - clock: newBiasedClock(clock, intervalSeconds), - intervalSeconds: intervalSeconds, - zeroKey: rand.Uint64(), - } - - // That value cannot be zero... - for set.zeroKey == 0 { - set.zeroKey = rand.Uint64() - } - - set.table.Store(&table{}) - - return set -} - -// Hit determines whether the given key should be kept or dropped based on the -// last time it was sampled. If the table grows larger than [config.MaxItemCount], the -// [LRU.rebuild] method is called in a separate goroutine to begin the -// eviction process. Until this has completed, all updates to the [LRU] are -// effectively dropped, as they happen on the soon-to-be-replaced table. -// -// Note: in order to run completely lock-less, [LRU] cannot store the 0 key in -// the table, as a 0 key is used as a sentinel value to identify free entries. -// To avoid this pitfall, [LRU.zeroKey] is used as a substitute for 0, meaning -// 0 and [LRU.zeroKey] are treated as the same key. This is not an issue in -// common use, as given a uniform distribution of keys this only happens 1 in -// 2^64-1 times. -func (m *LRU) Hit(key uint64) bool { - if key == 0 { - // The 0 key is used as a way to imply a slot is empty; so we cannot store - // it in the table. To address this, when passed a 0 key, we will use the - // [Set.zeroKey] as a substitute. - key = m.zeroKey - } - - now := m.clock.Now() - threshold := now - m.intervalSeconds - - var ( - table = m.table.Load() - entry *entry - ) - for { - var exists bool - entry, exists = table.FindEntry(key) - if exists { - // The entry already exists, so we can proceed... - break - } - - // We're adding a new entry to the table, so we need to: - // 1. Ensure we have capacity (possibly trigger an eviction rebuild) - // 2. Claim the slot (or look for another slot if it's already claimed) - newCount := table.count.Add(1) - if newCount > config.MaxItemCount && m.rebuilding.CompareAndSwap(false, true) { - // We're already holding the maximium number of items, so we will rebuild - // in order to perform an eviction pass. Updates made in the meantime will - // be lost. - go m.rebuild(table, threshold) - } - if newCount > capacity { - // We don't have space to add any new item, so we'll ignore this and - // decide to DROP it (we may otherwise cause a surge of inconditional - // keep decisions, that is not desirable). This only happens in the most - // dire of circumstances (a table rebuild did not complete fast enough - // to make up free space). - table.count.Add(-1) - return false - } - - if entry.Key.CompareAndSwap(0, key) { - // We have successfully claimed the slot, so now we can proceed to set it - // up. If we fail to swap, another goroutine has sampled this slot just - // before this one, so we can DROP the sample. - return entry.Data.CompareAndSwap(0, newEntryData(now, now)) - } - - if entry.Key.Load() == key { - // Another goroutine has concurrently claimed this slot for this key, and - // since very little time has passed since then, so we can DROP this - // sample... This is extremely unlikely to happen (and nearly impossible - // to reliably cover in unit tests). - return false - } - - // Another goroutine has concurrently claimed this slot for another key... - // We will try to find another slot then... - table.count.Add(-1) - } - - // We have found an existing entry, so we can proceed to update it... - curData := entry.Data.Load() - if curData.SampleTime() <= threshold { - // We sampled this a while back (or this is the first time), so we may keep - // this sample! - - // Store the value ahead of the for loop so we don't have to do the bit - // shifts over and over again (even though they're cheap to do). - nowEntryData := newEntryData(now, now) - for !entry.Data.CompareAndSwap(curData, nowEntryData) { - // Another goroutine has already changed it... - curData = entry.Data.Load() - if curData.LastAccessKept() { - // The concurrent update was a KEEP (as is indicated by the fact its - // atime and stime are equal), so this one is necessarily a DROP. - return false - } - - if curData.SampleTime() >= now { - // The concurrent update was made in our future, and it somehow was not - // a KEEP, so we'll make a KEEP decision here, but avoid rolling back - // the [entryData.AccessTime] back. - return true - } - - // The concurrent update was a DROP, and our clock is ahead of theirs, so - // we'll try again... - } - - // We successfully swapped at this point, so we have our KEEP decision! - return true - } - - newData := curData.WithAccessTime(now) - for curData.AccessTime() < now { - if entry.Data.CompareAndSwap(curData, newData) { - // We are done here! - break - } - // Another goroutine has updated the access time... We'll try again... - curData = entry.Data.Load() - } - return false -} - -// rebuild runs in a separate goroutine, and creates a pruned copy of the -// provided [table] with old and expired entries removed. It will keep at most -// [config.MaxItemCount]*2/3 items in the new table. Once the rebuild is complete, it -// replaces the [LRU.table] with the copy. -func (m *LRU) rebuild(oldTable *table, threshold uint32) { - // Since Go has a GC, we can "just" replace the current [Set.table] with a - // trimmed down copy, and let the GC take care of reclaiming the old one, once - // it is no longer in use by any reader. - m.table.Store(oldTable.PrunedCopy(threshold)) - m.rebuilding.Store(false) -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/table.go b/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/table.go deleted file mode 100644 index cfc1c4d5a3..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/apisec/internal/timed/table.go +++ /dev/null @@ -1,181 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package timed - -import ( - "slices" - "sync/atomic" - - "github.com/DataDog/appsec-internal-go/apisec/internal/config" -) - -type ( - // table is a simple open-addressing hash table implementation that uses a - // fixed array of items. - table struct { - // entries is the set of items contained in the table. The last entry is - // reserved for cases where all slots are taken before a rebuild is - // complete (it saves us from having to write code to deal with the - // impossibility to find an empty slot, as we always have a slot to return. - // We could return a throw-away slot but this would incur a heap allocation, - // which we can spare by doing this). - entries [capacity + 1]entry - // count is the number of items currently stored in the table. - count atomic.Int32 - } - - // entry is a single item in the open-addressing hash table. - entry struct { - // Key is the Key of the entry. A zero Key indicates that the entry is - // currently free. - Key atomic.Uint64 - // Data is the Data associated with the entry. - Data atomicEntryData - } - - // atomicEntryData is an atomic version of [entryData]. - atomicEntryData atomic.Uint64 - // entryData is a 64-bit value that represents the last time an entry was - // accessed paired together with the last time this value was sampled. - entryData uint64 - - // copiableEntry is a copy-able version of entryData, which is used for - // sorting entries by recency using a heap when re-building the table. - copiableEntry struct { - // Key is the Key of the entry. - Key uint64 - // Data is the Data associated with the entry. - Data entryData - } -) - -// FindEntry locates the correct entry for use in the table. If an entry already -// exists for the given key, it is returned with true. If not, the first blank -// entry is returned with false. -func (t *table) FindEntry(key uint64) (*entry, bool) { - origIdx := key % capacity - idx := origIdx - - for { - entry := &t.entries[idx] - if curKey := entry.Key.Load(); curKey == 0 || curKey == key { - // This is either the entry we're looking for, or an empty slot we can - // claim for this key. - return entry, curKey == key - } - idx = (idx + 1) % capacity - if idx == origIdx { - // We are back at the original index, meaning the map is full. - break - } - } - // We have gone full circle without finding a blank slot, so we give up and - // return our last resort slot that is reserved for this situation. - return &t.entries[capacity], true -} - -// PrunedCopy creates a copy of this table with expired items removed, retaining -// up to the [config.MaxItemCount]*2/3 most recent items from the original. -func (t *table) PrunedCopy(threshold uint32) *table { - // Sort the existing entries (most recent at the top) - newEntries := make([]copiableEntry, 0, capacity) - for i := range capacity { - if t.entries[i].BlankOrExpired(threshold) { - continue - } - newEntries = append(newEntries, t.entries[i].Copyable()) - } - slices.SortFunc(newEntries, copiableEntry.Compare) - - // Insert up to [config.MaxItemCount]*2/3 items into the new table - t = new(table) - count := min(int32(config.MaxItemCount*2/3), int32(len(newEntries))) - for _, entry := range newEntries[:count] { - slot, _ := t.FindEntry(entry.Key) - slot.Key.Store(entry.Key) - slot.Data.Store(entry.Data) - } - t.count.Store(count) - - return t -} - -// BlankOrExpired returns true if the receiver is blank or has expired already. -func (e *entry) BlankOrExpired(threshold uint32) bool { - return e.Key.Load() == 0 || e.Data.Load().SampleTime() < threshold -} - -// Copyable returns a [copyableEntry] version of this entry. -func (e *entry) Copyable() copiableEntry { - return copiableEntry{ - Key: e.Key.Load(), - Data: e.Data.Load(), - } -} - -// Load returns the current value held by this atomic. -func (d *atomicEntryData) Load() entryData { - return entryData((*atomic.Uint64)(d).Load()) -} - -// CompareAndSwap atomically compares the current value held by this atomic with -// the old value, and if they match replaes it with the new value. Returns true -// if the swap happened. -func (d *atomicEntryData) CompareAndSwap(old entryData, new entryData) (swapped bool) { - return (*atomic.Uint64)(d).CompareAndSwap(uint64(old), uint64(new)) -} - -// Store atomically stores the given value in this atomic. -func (d *atomicEntryData) Store(new entryData) { - (*atomic.Uint64)(d).Store(uint64(new)) -} - -// newEntryData creates a new [entryData] value from the given access and sample -// times. -func newEntryData(atime uint32, stime uint32) entryData { - return entryData(uint64(atime)<<32 | uint64(stime)) -} - -// AccessTime is the access time part of the [entryData]. -func (d entryData) AccessTime() uint32 { - return uint32(d >> 32) -} - -// SampleTime is the sample time part of the [entryData]. -func (d entryData) SampleTime() uint32 { - return uint32(d) -} - -// LastAccessKept returns true if the last access to this entry resulted in a -// decision to keep the sample. This is true of the access time is not 0 and is -// equal to the sample time. -func (d entryData) LastAccessKept() bool { - return d.AccessTime() != 0 && d.AccessTime() == d.SampleTime() -} - -// WithAccessTime returns a new [entryData] by copying the receiver and -// replacing the access time portion with the specified value. -func (d entryData) WithAccessTime(atime uint32) entryData { - return (d & 0x00000000_FFFFFFFF) | (entryData(atime) << 32) -} - -// Compare performs a comparison between the receiver and another entry; such -// that most recently sampled entries come first. Two entries with the same -// sample time are considered equal. -func (e copiableEntry) Compare(other copiableEntry) int { - tst := e.Data.SampleTime() - ost := other.Data.SampleTime() - if tst < ost { - // Receiver was sampled more recently (sorts higher) - return 1 - } - if tst > ost { - // Receiver was sampled less recently (sorts lower) - return -1 - } - // Both have the same sample time, so we consider them equal. - return 0 -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/apisec/sampler.go b/vendor/github.com/DataDog/appsec-internal-go/apisec/sampler.go deleted file mode 100644 index 76131f2639..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/apisec/sampler.go +++ /dev/null @@ -1,98 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package apisec - -import ( - "encoding/binary" - "hash/fnv" - "time" - - "github.com/DataDog/appsec-internal-go/apisec/internal/timed" - "github.com/DataDog/appsec-internal-go/limiter" -) - -type ( - Sampler interface { - DecisionFor(SamplingKey) bool - } - - timedSetSampler timed.LRU - - proxySampler struct { - limiter limiter.Limiter - } - - nullSampler struct{} - - SamplingKey struct { - // Method is the value of the http.method span tag - Method string - // Route is the value of the http.route span tag - Route string - // StatusCode is the value of the http.status_code span tag - StatusCode int - } - - clockFunc = func() int64 -) - -// NewProxySampler creates a new sampler suitable for proxy environments where the sampling decision -// is not based on the request's properties, but on a rate. -func NewProxySampler(rate int, interval time.Duration) Sampler { - if rate <= 0 { - return &nullSampler{} - } - r := int64(rate) - l := limiter.NewTokenTickerWithInterval(r, r, interval) - l.Start() - return &proxySampler{ - limiter: l, - } -} - -// NewSamplerWithInterval returns a new [*Sampler] with the specified interval. -func NewSamplerWithInterval(interval time.Duration) Sampler { - return newSampler(interval, timed.UnixTime) -} - -// newSampler allows creating a new [*Sampler] with custom clock function, -// which is useful for testing. -func newSampler(interval time.Duration, clock clockFunc) Sampler { - return (*timedSetSampler)(timed.NewLRU(interval, clock)) -} - -// DecisionFor makes a sampling decision for the provided [SamplingKey]. If it -// returns true, the request has been "sampled in" and the caller should proceed -// with the necessary actions. If it returns false, the request has been -// dropped, and the caller should short-circuit without extending further -// effort. -func (s *timedSetSampler) DecisionFor(key SamplingKey) bool { - keyHash := key.hash() - return (*timed.LRU)(s).Hit(keyHash) -} - -func (s *proxySampler) DecisionFor(_ SamplingKey) bool { - return s.limiter.Allow() -} - -func (s *nullSampler) DecisionFor(_ SamplingKey) bool { - return false -} - -// hash returns a hash of the key. Given the same seed, it always produces the -// same output. If the seed changes, the output is likely to change as well. -func (k SamplingKey) hash() uint64 { - fnv := fnv.New64() - - _, _ = fnv.Write([]byte(k.Method)) - _, _ = fnv.Write([]byte(k.Route)) - - var bytes [2]byte - binary.NativeEndian.PutUint16(bytes[:], uint16(k.StatusCode)) - _, _ = fnv.Write(bytes[:]) - - return fnv.Sum64() -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/appsec/config.go b/vendor/github.com/DataDog/appsec-internal-go/appsec/config.go deleted file mode 100644 index 09cbbd4e94..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/appsec/config.go +++ /dev/null @@ -1,283 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package appsec - -import ( - "os" - "regexp" - "strconv" - "time" - "unicode" - "unicode/utf8" - - "github.com/DataDog/appsec-internal-go/apisec" - "github.com/DataDog/appsec-internal-go/log" -) - -// Configuration environment variables -const ( - // EnvAPISecEnabled is the env var used to enable API Security - EnvAPISecEnabled = "DD_API_SECURITY_ENABLED" - // EnvAPISecSampleRate is the env var used to set the sampling rate of API Security schema extraction. - // Deprecated: a new [APISecConfig.Sampler] is now used instead of this. - EnvAPISecSampleRate = "DD_API_SECURITY_REQUEST_SAMPLE_RATE" - // EnvAPISecProxySampleRate is the env var used to set the sampling rate of API Security schema extraction for proxies. - EnvAPISecProxySampleRate = "DD_API_SECURITY_PROXY_SAMPLE_RATE" - // EnvObfuscatorKey is the env var used to provide the WAF key obfuscation regexp - EnvObfuscatorKey = "DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP" - // EnvObfuscatorValue is the env var used to provide the WAF value obfuscation regexp - EnvObfuscatorValue = "DD_APPSEC_OBFUSCATION_PARAMETER_VALUE_REGEXP" - // EnvWAFTimeout is the env var used to specify the timeout value for a WAF run - EnvWAFTimeout = "DD_APPSEC_WAF_TIMEOUT" - // EnvTraceRateLimit is the env var used to set the ASM trace limiting rate - EnvTraceRateLimit = "DD_APPSEC_TRACE_RATE_LIMIT" - // EnvRules is the env var used to provide a path to a local security rule file - EnvRules = "DD_APPSEC_RULES" - // EnvRASPEnabled is the env var used to enable/disable RASP functionalities for ASM - EnvRASPEnabled = "DD_APPSEC_RASP_ENABLED" - - // envAPISecSampleDelay is the env var used to set the delay for the API Security sampler in system tests. - // It is not indended to be set by users. - envAPISecSampleDelay = "DD_API_SECURITY_SAMPLE_DELAY" -) - -// Configuration constants and default values -const ( - // DefaultAPISecSampleRate is the default rate at which API Security schemas are extracted from requests - DefaultAPISecSampleRate = .1 - // DefaultAPISecSampleInterval is the default interval between two samples being taken. - DefaultAPISecSampleInterval = 30 * time.Second - // DefaultAPISecProxySampleRate is the default rate (schemas per minute) at which API Security schemas are extracted from requests - DefaultAPISecProxySampleRate = 300 - // DefaultAPISecProxySampleInterval is the default time window for the API Security proxy sampler rate limiter. - DefaultAPISecProxySampleInterval = time.Minute - // DefaultObfuscatorKeyRegex is the default regexp used to obfuscate keys - DefaultObfuscatorKeyRegex = `(?i)pass|pw(?:or)?d|secret|(?:api|private|public|access)[_-]?key|token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization|jsessionid|phpsessid|asp\.net[_-]sessionid|sid|jwt` - // DefaultObfuscatorValueRegex is the default regexp used to obfuscate values - DefaultObfuscatorValueRegex = `(?i)(?:p(?:ass)?w(?:or)?d|pass(?:[_-]?phrase)?|secret(?:[_-]?key)?|(?:(?:api|private|public|access)[_-]?)key(?:[_-]?id)?|(?:(?:auth|access|id|refresh)[_-]?)?token|consumer[_-]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|jsessionid|phpsessid|asp\.net(?:[_-]|-)sessionid|sid|jwt)(?:\s*=([^;&]+)|"\s*:\s*("[^"]+"|\d+))|bearer\s+([a-z0-9\._\-]+)|token\s*:\s*([a-z0-9]{13})|gh[opsu]_([0-9a-zA-Z]{36})|ey[I-L][\w=-]+\.(ey[I-L][\w=-]+(?:\.[\w.+\/=-]+)?)|[\-]{5}BEGIN[a-z\s]+PRIVATE\sKEY[\-]{5}([^\-]+)[\-]{5}END[a-z\s]+PRIVATE\sKEY|ssh-rsa\s*([a-z0-9\/\.+]{100,})` - // DefaultWAFTimeout is the default time limit past which a WAF run will timeout - DefaultWAFTimeout = time.Millisecond - // DefaultTraceRate is the default limit (trace/sec) past which ASM traces are sampled out - DefaultTraceRate uint = 100 // up to 100 appsec traces/s -) - -// APISecConfig holds the configuration for API Security schemas reporting. -// It is used to enabled/disable the feature. -type APISecConfig struct { - Sampler apisec.Sampler - Enabled bool - IsProxy bool - // Deprecated: use the new [APISecConfig.Sampler] instead. - SampleRate float64 -} - -// ObfuscatorConfig wraps the key and value regexp to be passed to the WAF to perform obfuscation. -type ObfuscatorConfig struct { - KeyRegex string - ValueRegex string -} - -type APISecOption func(*APISecConfig) - -// NewAPISecConfig creates and returns a new API Security configuration by reading the env -func NewAPISecConfig(opts ...APISecOption) APISecConfig { - cfg := APISecConfig{ - Enabled: boolEnv(EnvAPISecEnabled, true), - SampleRate: readAPISecuritySampleRate(), - } - for _, opt := range opts { - opt(&cfg) - } - - if cfg.Sampler != nil { - return cfg - } - - if cfg.IsProxy { - rate := intEnv(EnvAPISecProxySampleRate, DefaultAPISecProxySampleRate) - cfg.Sampler = apisec.NewProxySampler(rate, DefaultAPISecProxySampleInterval) - } else { - cfg.Sampler = apisec.NewSamplerWithInterval(durationEnv(envAPISecSampleDelay, "s", DefaultAPISecSampleInterval)) - } - - return cfg -} - -func readAPISecuritySampleRate() float64 { - value := os.Getenv(EnvAPISecSampleRate) - if value == "" { - return DefaultAPISecSampleRate - } - - rate, err := strconv.ParseFloat(value, 64) - if err != nil { - logEnvVarParsingError(EnvAPISecSampleRate, value, err, DefaultAPISecSampleRate) - return DefaultAPISecSampleRate - } - // Clamp the value so that 0.0 <= rate <= 1.0 - if rate < 0. { - rate = 0. - } else if rate > 1. { - rate = 1. - } - return rate -} - -// WithAPISecSampler sets the sampler for the API Security configuration. This is useful for testing -// purposes. -func WithAPISecSampler(sampler apisec.Sampler) APISecOption { - return func(c *APISecConfig) { - c.Sampler = sampler - } -} - -// WithProxy configures API Security for a proxy environment. -func WithProxy() APISecOption { - return func(c *APISecConfig) { - c.IsProxy = true - } -} - -// RASPEnabled returns true if RASP functionalities are enabled through the env, or if DD_APPSEC_RASP_ENABLED -// is not set -func RASPEnabled() bool { - return boolEnv(EnvRASPEnabled, true) -} - -// NewObfuscatorConfig creates and returns a new WAF obfuscator configuration by reading the env -func NewObfuscatorConfig() ObfuscatorConfig { - keyRE := readObfuscatorConfigRegexp(EnvObfuscatorKey, DefaultObfuscatorKeyRegex) - valueRE := readObfuscatorConfigRegexp(EnvObfuscatorValue, DefaultObfuscatorValueRegex) - return ObfuscatorConfig{KeyRegex: keyRE, ValueRegex: valueRE} -} - -func readObfuscatorConfigRegexp(name, defaultValue string) string { - val, present := os.LookupEnv(name) - if !present { - log.Debug("appsec: %s not defined, starting with the default obfuscator regular expression", name) - return defaultValue - } - if _, err := regexp.Compile(val); err != nil { - logUnexpectedEnvVarValue(name, val, "could not compile the configured obfuscator regular expression", defaultValue) - return defaultValue - } - log.Debug("appsec: starting with the configured obfuscator regular expression %s", name) - return val -} - -// WAFTimeoutFromEnv reads and parses the WAF timeout value set through the env -// If not set, it defaults to `DefaultWAFTimeout` -func WAFTimeoutFromEnv() (timeout time.Duration) { - timeout = DefaultWAFTimeout - value := os.Getenv(EnvWAFTimeout) - if value == "" { - return - } - - // Check if the value ends with a letter, which means the user has - // specified their own time duration unit(s) such as 1s200ms. - // Otherwise, default to microseconds. - if lastRune, _ := utf8.DecodeLastRuneInString(value); !unicode.IsLetter(lastRune) { - value += "us" // Add the default microsecond time-duration suffix - } - - parsed, err := time.ParseDuration(value) - if err != nil { - logEnvVarParsingError(EnvWAFTimeout, value, err, timeout) - return - } - if parsed <= 0 { - logUnexpectedEnvVarValue(EnvWAFTimeout, parsed, "expecting a strictly positive duration", timeout) - return - } - return parsed -} - -// RateLimitFromEnv reads and parses the trace rate limit set through the env -// If not set, it defaults to `DefaultTraceRate` -func RateLimitFromEnv() (rate uint) { - rate = DefaultTraceRate - value := os.Getenv(EnvTraceRateLimit) - if value == "" { - return rate - } - parsed, err := strconv.ParseUint(value, 10, 0) - if err != nil { - logEnvVarParsingError(EnvTraceRateLimit, value, err, rate) - return - } - if parsed == 0 { - logUnexpectedEnvVarValue(EnvTraceRateLimit, parsed, "expecting a value strictly greater than 0", rate) - return - } - return uint(parsed) -} - -// RulesFromEnv returns the security rules provided through the environment -// If the env var is not set, the default recommended rules are returned instead -func RulesFromEnv() ([]byte, error) { - filepath := os.Getenv(EnvRules) - if filepath == "" { - log.Debug("appsec: using the default built-in recommended security rules") - return DefaultRuleset() - } - buf, err := os.ReadFile(filepath) - if err != nil { - if os.IsNotExist(err) { - err = log.Errorf("appsec: could not find the rules file in path %s: %w.", filepath, err) - } - return nil, err - } - log.Debug("appsec: using the security rules from file %s", filepath) - return buf, nil -} - -func logEnvVarParsingError(name, value string, err error, defaultValue any) { - log.Debug("appsec: could not parse the env var %s=%s as a duration: %v. Using default value %v.", name, value, err, defaultValue) -} - -func logUnexpectedEnvVarValue(name string, value any, reason string, defaultValue any) { - log.Debug("appsec: unexpected configuration value of %s=%v: %s. Using default value %v.", name, value, reason, defaultValue) -} - -func boolEnv(key string, def bool) bool { - strVal, ok := os.LookupEnv(key) - if !ok { - return def - } - v, err := strconv.ParseBool(strVal) - if err != nil { - logEnvVarParsingError(key, strVal, err, def) - return def - } - return v -} - -func durationEnv(key string, unit string, def time.Duration) time.Duration { - strVal, ok := os.LookupEnv(key) - if !ok { - return def - } - val, err := time.ParseDuration(strVal + unit) - if err != nil { - logEnvVarParsingError(key, strVal, err, def) - return def - } - return val -} - -func intEnv(key string, def int) int { - strVal, ok := os.LookupEnv(key) - if !ok { - return def - } - val, err := strconv.Atoi(strVal) - if err != nil { - logEnvVarParsingError(key, strVal, err, def) - return def - } - return val -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/appsec/embed.go b/vendor/github.com/DataDog/appsec-internal-go/appsec/embed.go deleted file mode 100644 index 52cf17722f..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/appsec/embed.go +++ /dev/null @@ -1,20 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package appsec - -import ( - _ "embed" // Blank import comment for golint compliance - "unsafe" -) - -var ( - //go:embed rules.json - staticRecommendedRules []byte - - // StaticRecommendedRules holds the recommended AppSec security rules (v1.14.2) - // Source: https://github.com/DataDog/appsec-event-rules/blob/1.14.2/build/recommended.json - StaticRecommendedRules = unsafe.String(&staticRecommendedRules[0], len(staticRecommendedRules)) -) diff --git a/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.go b/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.go deleted file mode 100644 index 50bc023485..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.go +++ /dev/null @@ -1,23 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package appsec - -import "encoding/json" - -// DefaultRuleset returns the marshaled default recommended security rules for AppSec -func DefaultRuleset() ([]byte, error) { - return staticRecommendedRules, nil -} - -// DefaultRulesetMap returns the unmarshaled default recommended security rules for AppSec -func DefaultRulesetMap() (map[string]any, error) { - var rules map[string]any - if err := json.Unmarshal(staticRecommendedRules, &rules); err != nil { - return nil, err - } - - return rules, nil -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.json b/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.json deleted file mode 100644 index e2216bb082..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/appsec/rules.json +++ /dev/null @@ -1,10149 +0,0 @@ -{ - "version": "2.2", - "metadata": { - "rules_version": "1.14.2" - }, - "rules": [ - { - "id": "blk-001-001", - "name": "Block IP Addresses", - "tags": { - "type": "block_ip", - "category": "security_response", - "module": "network-acl" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "http.client_ip" - } - ], - "data": "blocked_ips" - }, - "operator": "ip_match" - } - ], - "transformers": [], - "on_match": [ - "block" - ] - }, - { - "id": "blk-001-002", - "name": "Block User Addresses", - "tags": { - "type": "block_user", - "category": "security_response", - "module": "authentication-acl" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "usr.id" - } - ], - "data": "blocked_users" - }, - "operator": "exact_match" - } - ], - "transformers": [], - "on_match": [ - "block" - ] - }, - { - "id": "crs-913-110", - "name": "Acunetix", - "tags": { - "type": "commercial_scanner", - "crs_id": "913110", - "category": "attack_attempt", - "tool_name": "Acunetix", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies" - } - ], - "list": [ - "acunetix-product", - "(acunetix web vulnerability scanner", - "acunetix-scanning-agreement", - "acunetix-user-agreement", - "md5(acunetix_wvs_security_test)" - ] - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-913-120", - "name": "Known security scanner filename/argument", - "tags": { - "type": "security_scanner", - "crs_id": "913120", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "list": [ - "/.adsensepostnottherenonobook", - "/hello.html", - "/actsensepostnottherenonotive", - "/acunetix-wvs-test-for-some-inexistent-file", - "/antidisestablishmentarianism", - "/appscan_fingerprint/mac_address", - "/arachni-", - "/cybercop", - "/nessus_is_probing_you_", - "/nessustest", - "/netsparker-", - "/rfiinc.txt", - "/thereisnowaythat-you-canbethere", - "/w3af/remotefileinclude.html", - "appscan_fingerprint", - "w00tw00t.at.isc.sans.dfind", - "w00tw00t.at.blackhats.romanian.anti-sec" - ], - "options": { - "enforce_word_boundary": true - } - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-920-260", - "name": "Unicode Full/Half Width Abuse Attack Attempt", - "tags": { - "type": "http_protocol_violation", - "crs_id": "920260", - "category": "attack_attempt", - "cwe": "176", - "capec": "1000/255/153/267/71", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "\\%u[fF]{2}[0-9a-fA-F]{2}", - "options": { - "case_sensitive": true, - "min_length": 6 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-921-110", - "name": "HTTP Request Smuggling Attack", - "tags": { - "type": "http_protocol_violation", - "crs_id": "921110", - "category": "attack_attempt", - "cwe": "444", - "capec": "1000/210/272/220/33", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - } - ], - "regex": "(?:get|post|head|options|connect|put|delete|trace|track|patch|propfind|propatch|mkcol|copy|move|lock|unlock)\\s+[^\\s]+\\s+http/\\d", - "options": { - "case_sensitive": true, - "min_length": 12 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-921-160", - "name": "HTTP Header Injection Attack via payload (CR/LF and header-name detected)", - "tags": { - "type": "http_protocol_violation", - "crs_id": "921160", - "category": "attack_attempt", - "cwe": "113", - "capec": "1000/210/272/220/105", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.path_params" - } - ], - "regex": "[\\n\\r]+(?:refresh|(?:set-)?cookie|(?:x-)?(?:forwarded-(?:for|host|server)|via|remote-ip|remote-addr|originating-IP))\\s*:", - "options": { - "case_sensitive": true, - "min_length": 3 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-930-100", - "name": "Obfuscated Path Traversal Attack (/../)", - "tags": { - "type": "lfi", - "crs_id": "930100", - "category": "attack_attempt", - "cwe": "22", - "capec": "1000/255/153/126", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - }, - { - "address": "server.request.headers.no_cookies" - } - ], - "regex": "(?:%(?:c(?:0%(?:[2aq]f|5c|9v)|1%(?:[19p]c|8s|af))|2(?:5(?:c(?:0%25af|1%259c)|2f|5c)|%46|f)|(?:(?:f(?:8%8)?0%8|e)0%80%a|bg%q)f|%3(?:2(?:%(?:%6|4)6|F)|5%%63)|u(?:221[56]|002f|EFC8|F025)|1u|5c)|0x(?:2f|5c)|\\/|\\x5c)(?:%(?:(?:f(?:(?:c%80|8)%8)?0%8|e)0%80%ae|2(?:(?:5(?:c0%25a|2))?e|%45)|u(?:(?:002|ff0)e|2024)|%32(?:%(?:%6|4)5|E)|c0(?:%[256aef]e|\\.))|\\.(?:%0[01])?|0x2e){2,3}(?:%(?:c(?:0%(?:[2aq]f|5c|9v)|1%(?:[19p]c|8s|af))|2(?:5(?:c(?:0%25af|1%259c)|2f|5c)|%46|f)|(?:(?:f(?:8%8)?0%8|e)0%80%a|bg%q)f|%3(?:2(?:%(?:%6|4)6|F)|5%%63)|u(?:221[56]|002f|EFC8|F025)|1u|5c)|0x(?:2f|5c)|\\/|\\x5c)", - "options": { - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "normalizePath" - ] - }, - { - "id": "crs-930-110", - "name": "Simple Path Traversal Attack (/../)", - "tags": { - "type": "lfi", - "crs_id": "930110", - "category": "attack_attempt", - "cwe": "22", - "capec": "1000/255/153/126", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - }, - { - "address": "server.request.headers.no_cookies" - } - ], - "regex": "(?:(?:^|[\\x5c/])\\.{2,3}[\\x5c/]|[\\x5c/]\\.{2,3}(?:[\\x5c/]|$))", - "options": { - "case_sensitive": true, - "min_length": 3 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-930-120", - "name": "OS File Access Attempt", - "tags": { - "type": "lfi", - "crs_id": "930120", - "category": "attack_attempt", - "cwe": "22", - "capec": "1000/255/153/126", - "confidence": "1" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "list": [ - "/.htaccess", - "/.htdigest", - "/.htpasswd", - "/.addressbook", - "/.aptitude/config", - ".aws/config", - ".aws/credentials", - "/.bash_config", - "/.bash_history", - "/.bash_logout", - "/.bash_profile", - "/.bashrc", - ".cache/notify-osd.log", - ".config/odesk/odesk team.conf", - "/.cshrc", - "/.dockerignore", - ".drush/", - "/.eslintignore", - "/.fbcindex", - "/.forward", - "/.git", - ".git/", - "/.gitattributes", - "/.gitconfig", - ".gnupg/", - ".hplip/hplip.conf", - "/.ksh_history", - "/.lesshst", - ".lftp/", - "/.lhistory", - "/.lldb-history", - ".local/share/mc/", - "/.lynx_cookies", - "/.my.cnf", - "/.mysql_history", - "/.nano_history", - "/.node_repl_history", - "/.pearrc", - "/.pgpass", - "/.php_history", - "/.pinerc", - ".pki/", - "/.proclog", - "/.procmailrc", - "/.psql_history", - "/.python_history", - "/.rediscli_history", - "/.rhistory", - "/.rhosts", - "/.sh_history", - "/.sqlite_history", - ".ssh/authorized_keys", - ".ssh/config", - ".ssh/id_dsa", - ".ssh/id_dsa.pub", - ".ssh/id_rsa", - ".ssh/id_rsa.pub", - ".ssh/identity", - ".ssh/identity.pub", - ".ssh/id_ecdsa", - ".ssh/id_ecdsa.pub", - ".ssh/known_hosts", - ".subversion/auth", - ".subversion/config", - ".subversion/servers", - ".tconn/tconn.conf", - "/.tcshrc", - ".vidalia/vidalia.conf", - "/.viminfo", - "/.vimrc", - "/.www_acl", - "/.wwwacl", - "/.xauthority", - "/.zhistory", - "/.zshrc", - "/.zsh_history", - "/.nsconfig", - "data/elasticsearch", - "data/kafka", - "etc/ansible", - "etc/bind", - "etc/centos-release", - "etc/centos-release-upstream", - "etc/clam.d", - "etc/elasticsearch", - "etc/freshclam.conf", - "etc/gshadow", - "etc/gshadow-", - "etc/httpd", - "etc/kafka", - "etc/kibana", - "etc/logstash", - "etc/lvm", - "etc/mongod.conf", - "etc/my.cnf", - "etc/nuxeo.conf", - "etc/pki", - "etc/postfix", - "etc/scw-release", - "etc/subgid", - "etc/subgid-", - "etc/sudoers.d", - "etc/sysconfig", - "etc/system-release-cpe", - "opt/nuxeo", - "opt/tomcat", - "tmp/kafka-logs", - "usr/lib/rpm/rpm.log", - "var/data/elasticsearch", - "var/lib/elasticsearch", - "etc/.java", - "etc/acpi", - "etc/alsa", - "etc/alternatives", - "etc/apache2", - "etc/apm", - "etc/apparmor", - "etc/apparmor.d", - "etc/apport", - "etc/apt", - "etc/asciidoc", - "etc/avahi", - "etc/bash_completion.d", - "etc/binfmt.d", - "etc/bluetooth", - "etc/bonobo-activation", - "etc/brltty", - "etc/ca-certificates", - "etc/calendar", - "etc/chatscripts", - "etc/chromium-browser", - "etc/clamav", - "etc/cni", - "etc/console-setup", - "etc/coraza-waf", - "etc/cracklib", - "etc/cron.d", - "etc/cron.daily", - "etc/cron.hourly", - "etc/cron.monthly", - "etc/cron.weekly", - "etc/cups", - "etc/cups.save", - "etc/cupshelpers", - "etc/dbus-1", - "etc/dconf", - "etc/default", - "etc/depmod.d", - "etc/dhcp", - "etc/dictionaries-common", - "etc/dkms", - "etc/dnsmasq.d", - "etc/dockeretc/dpkg", - "etc/emacs", - "etc/environment.d", - "etc/fail2ban", - "etc/firebird", - "etc/firefox", - "etc/fonts", - "etc/fwupd", - "etc/gconf", - "etc/gdb", - "etc/gdm3", - "etc/geoclue", - "etc/ghostscript", - "etc/gimp", - "etc/glvnd", - "etc/gnome", - "etc/gnome-vfs-2.0", - "etc/gnucash", - "etc/gnustep", - "etc/groff", - "etc/grub.d", - "etc/gss", - "etc/gtk-2.0", - "etc/gtk-3.0", - "etc/hp", - "etc/ifplugd", - "etc/imagemagick-6", - "etc/init", - "etc/init.d", - "etc/initramfs-tools", - "etc/insserv.conf.d", - "etc/iproute2", - "etc/iptables", - "etc/java", - "etc/java-11-openjdk", - "etc/java-17-oracle", - "etc/java-8-openjdk", - "etc/kernel", - "etc/ld.so.conf.d", - "etc/ldap", - "etc/libblockdev", - "etc/libibverbs.d", - "etc/libnl-3", - "etc/libpaper.d", - "etc/libreoffice", - "etc/lighttpd", - "etc/logcheck", - "etc/logrotate.d", - "etc/lynx", - "etc/mail", - "etc/mc", - "etc/menu", - "etc/menu-methods", - "etc/modprobe.d", - "etc/modsecurity", - "etc/modules-load.d", - "etc/monit", - "etc/mono", - "etc/mplayer", - "etc/mpv", - "etc/muttrc.d", - "etc/mysql", - "etc/netplan", - "etc/network", - "etc/networkd-dispatcher", - "etc/networkmanager", - "etc/newt", - "etc/nghttpx", - "etc/nikto", - "etc/odbcdatasources", - "etc/openal", - "etc/openmpi", - "etc/opt", - "etc/osync", - "etc/packagekit", - "etc/pam.d", - "etc/pcmcia", - "etc/perl", - "etc/php", - "etc/pki", - "etc/pm", - "etc/polkit-1", - "etc/postfix", - "etc/ppp", - "etc/profile.d", - "etc/proftpd", - "etc/pulse", - "etc/python", - "etc/rc0.d", - "etc/rc1.d", - "etc/rc2.d", - "etc/rc3.d", - "etc/rc4.d", - "etc/rc5.d", - "etc/rc6.d", - "etc/rcs.d", - "etc/resolvconf", - "etc/rsyslog.d", - "etc/samba", - "etc/sane.d", - "etc/security", - "etc/selinux", - "etc/sensors.d", - "etc/sgml", - "etc/signon-ui", - "etc/skel", - "etc/snmp", - "etc/sound", - "etc/spamassassin", - "etc/speech-dispatcher", - "etc/ssh", - "etc/ssl", - "etc/sudoers.d", - "etc/sysctl.d", - "etc/sysstat", - "etc/systemd", - "etc/terminfo", - "etc/texmf", - "etc/thermald", - "etc/thnuclnt", - "etc/thunderbird", - "etc/timidity", - "etc/tmpfiles.d", - "etc/ubuntu-advantage", - "etc/udev", - "etc/udisks2", - "etc/ufw", - "etc/update-manager", - "etc/update-motd.d", - "etc/update-notifier", - "etc/upower", - "etc/urlview", - "etc/usb_modeswitch.d", - "etc/vim", - "etc/vmware", - "etc/vmware-installer", - "etc/vmware-vix", - "etc/vulkan", - "etc/w3m", - "etc/wireshark", - "etc/wpa_supplicant", - "etc/x11", - "etc/xdg", - "etc/xml", - "etc/redis.conf", - "etc/redis-sentinel.conf", - "etc/php.ini", - "bin/php.ini", - "etc/httpd/php.ini", - "usr/lib/php.ini", - "usr/lib/php/php.ini", - "usr/local/etc/php.ini", - "usr/local/lib/php.ini", - "usr/local/php/lib/php.ini", - "usr/local/php4/lib/php.ini", - "usr/local/php5/lib/php.ini", - "usr/local/apache/conf/php.ini", - "etc/php4.4/fcgi/php.ini", - "etc/php4/apache/php.ini", - "etc/php4/apache2/php.ini", - "etc/php5/apache/php.ini", - "etc/php5/apache2/php.ini", - "etc/php/php.ini", - "etc/php/php4/php.ini", - "etc/php/apache/php.ini", - "etc/php/apache2/php.ini", - "web/conf/php.ini", - "usr/local/zend/etc/php.ini", - "opt/xampp/etc/php.ini", - "var/local/www/conf/php.ini", - "etc/php/cgi/php.ini", - "etc/php4/cgi/php.ini", - "etc/php5/cgi/php.ini", - "home2/bin/stable/apache/php.ini", - "home/bin/stable/apache/php.ini", - "etc/httpd/conf.d/php.conf", - "php5/php.ini", - "php4/php.ini", - "php/php.ini", - "windows/php.ini", - "winnt/php.ini", - "apache/php/php.ini", - "xampp/apache/bin/php.ini", - "netserver/bin/stable/apache/php.ini", - "volumes/macintosh_hd1/usr/local/php/lib/php.ini", - "etc/mono/1.0/machine.config", - "etc/mono/2.0/machine.config", - "etc/mono/2.0/web.config", - "etc/mono/config", - "usr/local/cpanel/logs/stats_log", - "usr/local/cpanel/logs/access_log", - "usr/local/cpanel/logs/error_log", - "usr/local/cpanel/logs/license_log", - "usr/local/cpanel/logs/login_log", - "var/cpanel/cpanel.config", - "usr/local/psa/admin/logs/httpsd_access_log", - "usr/local/psa/admin/logs/panel.log", - "usr/local/psa/admin/conf/php.ini", - "etc/sw-cp-server/applications.d/plesk.conf", - "usr/local/psa/admin/conf/site_isolation_settings.ini", - "usr/local/sb/config", - "etc/sw-cp-server/applications.d/00-sso-cpserver.conf", - "etc/sso/sso_config.ini", - "etc/mysql/conf.d/old_passwords.cnf", - "var/mysql.log", - "var/mysql-bin.index", - "var/data/mysql-bin.index", - "program files/mysql/mysql server 5.0/data/{host}.err", - "program files/mysql/mysql server 5.0/data/mysql.log", - "program files/mysql/mysql server 5.0/data/mysql.err", - "program files/mysql/mysql server 5.0/data/mysql-bin.log", - "program files/mysql/mysql server 5.0/data/mysql-bin.index", - "program files/mysql/data/{host}.err", - "program files/mysql/data/mysql.log", - "program files/mysql/data/mysql.err", - "program files/mysql/data/mysql-bin.log", - "program files/mysql/data/mysql-bin.index", - "mysql/data/{host}.err", - "mysql/data/mysql.log", - "mysql/data/mysql.err", - "mysql/data/mysql-bin.log", - "mysql/data/mysql-bin.index", - "usr/local/mysql/data/mysql.log", - "usr/local/mysql/data/mysql.err", - "usr/local/mysql/data/mysql-bin.log", - "usr/local/mysql/data/mysql-slow.log", - "usr/local/mysql/data/mysqlderror.log", - "usr/local/mysql/data/{host}.err", - "usr/local/mysql/data/mysql-bin.index", - "var/lib/mysql/my.cnf", - "etc/mysql/my.cnf", - "etc/my.cnf", - "program files/mysql/mysql server 5.0/my.ini", - "program files/mysql/mysql server 5.0/my.cnf", - "program files/mysql/my.ini", - "program files/mysql/my.cnf", - "mysql/my.ini", - "mysql/my.cnf", - "mysql/bin/my.ini", - "var/postgresql/log/postgresql.log", - "usr/internet/pgsql/data/postmaster.log", - "usr/local/pgsql/data/postgresql.log", - "usr/local/pgsql/data/pg_log", - "postgresql/log/pgadmin.log", - "var/lib/pgsql/data/postgresql.conf", - "var/postgresql/db/postgresql.conf", - "var/nm2/postgresql.conf", - "usr/local/pgsql/data/postgresql.conf", - "usr/local/pgsql/data/pg_hba.conf", - "usr/internet/pgsql/data/pg_hba.conf", - "usr/local/pgsql/data/passwd", - "usr/local/pgsql/bin/pg_passwd", - "etc/postgresql/postgresql.conf", - "etc/postgresql/pg_hba.conf", - "home/postgres/data/postgresql.conf", - "home/postgres/data/pg_version", - "home/postgres/data/pg_ident.conf", - "home/postgres/data/pg_hba.conf", - "program files/postgresql/8.3/data/pg_hba.conf", - "program files/postgresql/8.3/data/pg_ident.conf", - "program files/postgresql/8.3/data/postgresql.conf", - "program files/postgresql/8.4/data/pg_hba.conf", - "program files/postgresql/8.4/data/pg_ident.conf", - "program files/postgresql/8.4/data/postgresql.conf", - "program files/postgresql/9.0/data/pg_hba.conf", - "program files/postgresql/9.0/data/pg_ident.conf", - "program files/postgresql/9.0/data/postgresql.conf", - "program files/postgresql/9.1/data/pg_hba.conf", - "program files/postgresql/9.1/data/pg_ident.conf", - "program files/postgresql/9.1/data/postgresql.conf", - "wamp/logs/access.log", - "wamp/logs/apache_error.log", - "wamp/logs/genquery.log", - "wamp/logs/mysql.log", - "wamp/logs/slowquery.log", - "wamp/bin/apache/apache2.2.22/logs/access.log", - "wamp/bin/apache/apache2.2.22/logs/error.log", - "wamp/bin/apache/apache2.2.21/logs/access.log", - "wamp/bin/apache/apache2.2.21/logs/error.log", - "wamp/bin/mysql/mysql5.5.24/data/mysql-bin.index", - "wamp/bin/mysql/mysql5.5.16/data/mysql-bin.index", - "wamp/bin/apache/apache2.2.21/conf/httpd.conf", - "wamp/bin/apache/apache2.2.22/conf/httpd.conf", - "wamp/bin/apache/apache2.2.21/wampserver.conf", - "wamp/bin/apache/apache2.2.22/wampserver.conf", - "wamp/bin/apache/apache2.2.22/conf/wampserver.conf", - "wamp/bin/mysql/mysql5.5.24/my.ini", - "wamp/bin/mysql/mysql5.5.24/wampserver.conf", - "wamp/bin/mysql/mysql5.5.16/my.ini", - "wamp/bin/mysql/mysql5.5.16/wampserver.conf", - "wamp/bin/php/php5.3.8/php.ini", - "wamp/bin/php/php5.4.3/php.ini", - "xampp/apache/logs/access.log", - "xampp/apache/logs/error.log", - "xampp/mysql/data/mysql-bin.index", - "xampp/mysql/data/mysql.err", - "xampp/mysql/data/{host}.err", - "xampp/sendmail/sendmail.log", - "xampp/apache/conf/httpd.conf", - "xampp/filezillaftp/filezilla server.xml", - "xampp/mercurymail/mercury.ini", - "xampp/php/php.ini", - "xampp/phpmyadmin/config.inc.php", - "xampp/sendmail/sendmail.ini", - "xampp/webalizer/webalizer.conf", - "opt/lampp/etc/httpd.conf", - "xampp/htdocs/aca.txt", - "xampp/htdocs/admin.php", - "xampp/htdocs/leer.txt", - "usr/local/apache/logs/audit_log", - "usr/local/apache2/logs/audit_log", - "logs/security_debug_log", - "logs/security_log", - "usr/local/apache/conf/modsec.conf", - "usr/local/apache2/conf/modsec.conf", - "winnt/system32/logfiles/msftpsvc", - "winnt/system32/logfiles/msftpsvc1", - "winnt/system32/logfiles/msftpsvc2", - "windows/system32/logfiles/msftpsvc", - "windows/system32/logfiles/msftpsvc1", - "windows/system32/logfiles/msftpsvc2", - "etc/logrotate.d/proftpd", - "www/logs/proftpd.system.log", - "etc/pam.d/proftpd", - "etc/proftp.conf", - "etc/protpd/proftpd.conf", - "etc/vhcs2/proftpd/proftpd.conf", - "etc/proftpd/modules.conf", - "etc/vsftpd.chroot_list", - "etc/logrotate.d/vsftpd.log", - "etc/vsftpd/vsftpd.conf", - "etc/vsftpd.conf", - "etc/chrootusers", - "var/adm/log/xferlog", - "etc/wu-ftpd/ftpaccess", - "etc/wu-ftpd/ftphosts", - "etc/wu-ftpd/ftpusers", - "logs/pure-ftpd.log", - "usr/sbin/pure-config.pl", - "usr/etc/pure-ftpd.conf", - "etc/pure-ftpd/pure-ftpd.conf", - "usr/local/etc/pure-ftpd.conf", - "usr/local/etc/pureftpd.pdb", - "usr/local/pureftpd/etc/pureftpd.pdb", - "usr/local/pureftpd/sbin/pure-config.pl", - "usr/local/pureftpd/etc/pure-ftpd.conf", - "etc/pure-ftpd.conf", - "etc/pure-ftpd/pure-ftpd.pdb", - "etc/pureftpd.pdb", - "etc/pureftpd.passwd", - "etc/pure-ftpd/pureftpd.pdb", - "usr/ports/ftp/pure-ftpd/pure-ftpd.conf", - "usr/ports/ftp/pure-ftpd/pureftpd.pdb", - "usr/ports/ftp/pure-ftpd/pureftpd.passwd", - "usr/ports/net/pure-ftpd/pure-ftpd.conf", - "usr/ports/net/pure-ftpd/pureftpd.pdb", - "usr/ports/net/pure-ftpd/pureftpd.passwd", - "usr/pkgsrc/net/pureftpd/pure-ftpd.conf", - "usr/pkgsrc/net/pureftpd/pureftpd.pdb", - "usr/pkgsrc/net/pureftpd/pureftpd.passwd", - "usr/ports/contrib/pure-ftpd/pure-ftpd.conf", - "usr/ports/contrib/pure-ftpd/pureftpd.pdb", - "usr/ports/contrib/pure-ftpd/pureftpd.passwd", - "usr/sbin/mudlogd", - "etc/muddleftpd/mudlog", - "etc/muddleftpd.com", - "etc/muddleftpd/mudlogd.conf", - "etc/muddleftpd/muddleftpd.conf", - "usr/sbin/mudpasswd", - "etc/muddleftpd/muddleftpd.passwd", - "etc/muddleftpd/passwd", - "etc/logrotate.d/ftp", - "etc/ftpchroot", - "etc/ftphosts", - "etc/ftpusers", - "winnt/system32/logfiles/smtpsvc", - "winnt/system32/logfiles/smtpsvc1", - "winnt/system32/logfiles/smtpsvc2", - "winnt/system32/logfiles/smtpsvc3", - "winnt/system32/logfiles/smtpsvc4", - "winnt/system32/logfiles/smtpsvc5", - "windows/system32/logfiles/smtpsvc", - "windows/system32/logfiles/smtpsvc1", - "windows/system32/logfiles/smtpsvc2", - "windows/system32/logfiles/smtpsvc3", - "windows/system32/logfiles/smtpsvc4", - "windows/system32/logfiles/smtpsvc5", - "etc/osxhttpd/osxhttpd.conf", - "system/library/webobjects/adaptors/apache2.2/apache.conf", - "etc/apache2/sites-available/default", - "etc/apache2/sites-available/default-ssl", - "etc/apache2/sites-enabled/000-default", - "etc/apache2/sites-enabled/default", - "etc/apache2/apache2.conf", - "etc/apache2/ports.conf", - "usr/local/etc/apache/httpd.conf", - "usr/pkg/etc/httpd/httpd.conf", - "usr/pkg/etc/httpd/httpd-default.conf", - "usr/pkg/etc/httpd/httpd-vhosts.conf", - "etc/httpd/mod_php.conf", - "etc/httpd/extra/httpd-ssl.conf", - "etc/rc.d/rc.httpd", - "usr/local/apache/conf/httpd.conf.default", - "usr/local/apache/conf/access.conf", - "usr/local/apache22/conf/httpd.conf", - "usr/local/apache22/httpd.conf", - "usr/local/etc/apache22/conf/httpd.conf", - "usr/local/apps/apache22/conf/httpd.conf", - "etc/apache22/conf/httpd.conf", - "etc/apache22/httpd.conf", - "opt/apache22/conf/httpd.conf", - "usr/local/etc/apache2/vhosts.conf", - "usr/local/apache/conf/vhosts.conf", - "usr/local/apache2/conf/vhosts.conf", - "usr/local/apache/conf/vhosts-custom.conf", - "usr/local/apache2/conf/vhosts-custom.conf", - "etc/apache/default-server.conf", - "etc/apache2/default-server.conf", - "usr/local/apache2/conf/extra/httpd-ssl.conf", - "usr/local/apache2/conf/ssl.conf", - "etc/httpd/conf.d", - "usr/local/etc/apache22/httpd.conf", - "usr/local/etc/apache2/httpd.conf", - "etc/apache2/httpd2.conf", - "etc/apache2/ssl-global.conf", - "etc/apache2/vhosts.d/00_default_vhost.conf", - "apache/conf/httpd.conf", - "etc/apache/httpd.conf", - "etc/httpd/conf", - "http/httpd.conf", - "usr/local/apache1.3/conf/httpd.conf", - "usr/local/etc/httpd/conf", - "var/apache/conf/httpd.conf", - "var/www/conf", - "www/apache/conf/httpd.conf", - "www/conf/httpd.conf", - "etc/init.d", - "etc/apache/access.conf", - "etc/rc.conf", - "www/logs/freebsddiary-error.log", - "www/logs/freebsddiary-access_log", - "library/webserver/documents/index.html", - "library/webserver/documents/index.htm", - "library/webserver/documents/default.html", - "library/webserver/documents/default.htm", - "library/webserver/documents/index.php", - "library/webserver/documents/default.php", - "usr/local/etc/webmin/miniserv.conf", - "etc/webmin/miniserv.conf", - "usr/local/etc/webmin/miniserv.users", - "etc/webmin/miniserv.users", - "winnt/system32/logfiles/w3svc/inetsvn1.log", - "winnt/system32/logfiles/w3svc1/inetsvn1.log", - "winnt/system32/logfiles/w3svc2/inetsvn1.log", - "winnt/system32/logfiles/w3svc3/inetsvn1.log", - "windows/system32/logfiles/w3svc/inetsvn1.log", - "windows/system32/logfiles/w3svc1/inetsvn1.log", - "windows/system32/logfiles/w3svc2/inetsvn1.log", - "windows/system32/logfiles/w3svc3/inetsvn1.log", - "apache/logs/error.log", - "apache/logs/access.log", - "apache2/logs/error.log", - "apache2/logs/access.log", - "logs/error.log", - "logs/access.log", - "etc/httpd/logs/access_log", - "etc/httpd/logs/access.log", - "etc/httpd/logs/error_log", - "etc/httpd/logs/error.log", - "usr/local/apache/logs/access_log", - "usr/local/apache/logs/access.log", - "usr/local/apache/logs/error_log", - "usr/local/apache/logs/error.log", - "usr/local/apache2/logs/access_log", - "usr/local/apache2/logs/access.log", - "usr/local/apache2/logs/error_log", - "usr/local/apache2/logs/error.log", - "var/www/logs/access_log", - "var/www/logs/access.log", - "var/www/logs/error_log", - "var/www/logs/error.log", - "opt/lampp/logs/access_log", - "opt/lampp/logs/error_log", - "opt/xampp/logs/access_log", - "opt/xampp/logs/error_log", - "opt/lampp/logs/access.log", - "opt/lampp/logs/error.log", - "opt/xampp/logs/access.log", - "opt/xampp/logs/error.log", - "program files/apache group/apache/logs/access.log", - "program files/apache group/apache/logs/error.log", - "program files/apache software foundation/apache2.2/logs/error.log", - "program files/apache software foundation/apache2.2/logs/access.log", - "opt/apache/apache.conf", - "opt/apache/conf/apache.conf", - "opt/apache2/apache.conf", - "opt/apache2/conf/apache.conf", - "opt/httpd/apache.conf", - "opt/httpd/conf/apache.conf", - "etc/httpd/apache.conf", - "etc/apache2/apache.conf", - "etc/httpd/conf/apache.conf", - "usr/local/apache/apache.conf", - "usr/local/apache/conf/apache.conf", - "usr/local/apache2/apache.conf", - "usr/local/apache2/conf/apache.conf", - "usr/local/php/apache.conf.php", - "usr/local/php4/apache.conf.php", - "usr/local/php5/apache.conf.php", - "usr/local/php/apache.conf", - "usr/local/php4/apache.conf", - "usr/local/php5/apache.conf", - "private/etc/httpd/apache.conf", - "opt/apache/apache2.conf", - "opt/apache/conf/apache2.conf", - "opt/apache2/apache2.conf", - "opt/apache2/conf/apache2.conf", - "opt/httpd/apache2.conf", - "opt/httpd/conf/apache2.conf", - "etc/httpd/apache2.conf", - "etc/httpd/conf/apache2.conf", - "usr/local/apache/apache2.conf", - "usr/local/apache/conf/apache2.conf", - "usr/local/apache2/apache2.conf", - "usr/local/apache2/conf/apache2.conf", - "usr/local/php/apache2.conf.php", - "usr/local/php4/apache2.conf.php", - "usr/local/php5/apache2.conf.php", - "usr/local/php/apache2.conf", - "usr/local/php4/apache2.conf", - "usr/local/php5/apache2.conf", - "private/etc/httpd/apache2.conf", - "usr/local/apache/conf/httpd.conf", - "usr/local/apache2/conf/httpd.conf", - "etc/httpd/conf/httpd.conf", - "etc/apache/apache.conf", - "etc/apache/conf/httpd.conf", - "etc/apache2/httpd.conf", - "usr/apache2/conf/httpd.conf", - "usr/apache/conf/httpd.conf", - "usr/local/etc/apache/conf/httpd.conf", - "usr/local/apache/httpd.conf", - "usr/local/apache2/httpd.conf", - "usr/local/httpd/conf/httpd.conf", - "usr/local/etc/apache2/conf/httpd.conf", - "usr/local/etc/httpd/conf/httpd.conf", - "usr/local/apps/apache2/conf/httpd.conf", - "usr/local/apps/apache/conf/httpd.conf", - "usr/local/php/httpd.conf.php", - "usr/local/php4/httpd.conf.php", - "usr/local/php5/httpd.conf.php", - "usr/local/php/httpd.conf", - "usr/local/php4/httpd.conf", - "usr/local/php5/httpd.conf", - "etc/apache2/conf/httpd.conf", - "etc/http/conf/httpd.conf", - "etc/httpd/httpd.conf", - "etc/http/httpd.conf", - "etc/httpd.conf", - "opt/apache/conf/httpd.conf", - "opt/apache2/conf/httpd.conf", - "var/www/conf/httpd.conf", - "private/etc/httpd/httpd.conf", - "private/etc/httpd/httpd.conf.default", - "etc/apache2/vhosts.d/default_vhost.include", - "etc/apache2/conf.d/charset", - "etc/apache2/conf.d/security", - "etc/apache2/envvars", - "etc/apache2/mods-available/autoindex.conf", - "etc/apache2/mods-available/deflate.conf", - "etc/apache2/mods-available/dir.conf", - "etc/apache2/mods-available/mem_cache.conf", - "etc/apache2/mods-available/mime.conf", - "etc/apache2/mods-available/proxy.conf", - "etc/apache2/mods-available/setenvif.conf", - "etc/apache2/mods-available/ssl.conf", - "etc/apache2/mods-enabled/alias.conf", - "etc/apache2/mods-enabled/deflate.conf", - "etc/apache2/mods-enabled/dir.conf", - "etc/apache2/mods-enabled/mime.conf", - "etc/apache2/mods-enabled/negotiation.conf", - "etc/apache2/mods-enabled/php5.conf", - "etc/apache2/mods-enabled/status.conf", - "program files/apache group/apache/conf/httpd.conf", - "program files/apache group/apache2/conf/httpd.conf", - "program files/xampp/apache/conf/apache.conf", - "program files/xampp/apache/conf/apache2.conf", - "program files/xampp/apache/conf/httpd.conf", - "program files/apache group/apache/apache.conf", - "program files/apache group/apache/conf/apache.conf", - "program files/apache group/apache2/conf/apache.conf", - "program files/apache group/apache/apache2.conf", - "program files/apache group/apache/conf/apache2.conf", - "program files/apache group/apache2/conf/apache2.conf", - "program files/apache software foundation/apache2.2/conf/httpd.conf", - "volumes/macintosh_hd1/opt/httpd/conf/httpd.conf", - "volumes/macintosh_hd1/opt/apache/conf/httpd.conf", - "volumes/macintosh_hd1/opt/apache2/conf/httpd.conf", - "volumes/macintosh_hd1/usr/local/php/httpd.conf.php", - "volumes/macintosh_hd1/usr/local/php4/httpd.conf.php", - "volumes/macintosh_hd1/usr/local/php5/httpd.conf.php", - "volumes/webbackup/opt/apache2/conf/httpd.conf", - "volumes/webbackup/private/etc/httpd/httpd.conf", - "volumes/webbackup/private/etc/httpd/httpd.conf.default", - "usr/local/etc/apache/vhosts.conf", - "usr/local/jakarta/tomcat/conf/jakarta.conf", - "usr/local/jakarta/tomcat/conf/server.xml", - "usr/local/jakarta/tomcat/conf/context.xml", - "usr/local/jakarta/tomcat/conf/workers.properties", - "usr/local/jakarta/tomcat/conf/logging.properties", - "usr/local/jakarta/dist/tomcat/conf/jakarta.conf", - "usr/local/jakarta/dist/tomcat/conf/server.xml", - "usr/local/jakarta/dist/tomcat/conf/context.xml", - "usr/local/jakarta/dist/tomcat/conf/workers.properties", - "usr/local/jakarta/dist/tomcat/conf/logging.properties", - "usr/share/tomcat6/conf/server.xml", - "usr/share/tomcat6/conf/context.xml", - "usr/share/tomcat6/conf/workers.properties", - "usr/share/tomcat6/conf/logging.properties", - "var/cpanel/tomcat.options", - "usr/local/jakarta/tomcat/logs/catalina.out", - "usr/local/jakarta/tomcat/logs/catalina.err", - "opt/tomcat/logs/catalina.out", - "opt/tomcat/logs/catalina.err", - "usr/share/logs/catalina.out", - "usr/share/logs/catalina.err", - "usr/share/tomcat/logs/catalina.out", - "usr/share/tomcat/logs/catalina.err", - "usr/share/tomcat6/logs/catalina.out", - "usr/share/tomcat6/logs/catalina.err", - "usr/local/apache/logs/mod_jk.log", - "usr/local/jakarta/tomcat/logs/mod_jk.log", - "usr/local/jakarta/dist/tomcat/logs/mod_jk.log", - "opt/[jboss]/server/default/conf/jboss-minimal.xml", - "opt/[jboss]/server/default/conf/jboss-service.xml", - "opt/[jboss]/server/default/conf/jndi.properties", - "opt/[jboss]/server/default/conf/log4j.xml", - "opt/[jboss]/server/default/conf/login-config.xml", - "opt/[jboss]/server/default/conf/standardjaws.xml", - "opt/[jboss]/server/default/conf/standardjboss.xml", - "opt/[jboss]/server/default/conf/server.log.properties", - "opt/[jboss]/server/default/deploy/jboss-logging.xml", - "usr/local/[jboss]/server/default/conf/jboss-minimal.xml", - "usr/local/[jboss]/server/default/conf/jboss-service.xml", - "usr/local/[jboss]/server/default/conf/jndi.properties", - "usr/local/[jboss]/server/default/conf/log4j.xml", - "usr/local/[jboss]/server/default/conf/login-config.xml", - "usr/local/[jboss]/server/default/conf/standardjaws.xml", - "usr/local/[jboss]/server/default/conf/standardjboss.xml", - "usr/local/[jboss]/server/default/conf/server.log.properties", - "usr/local/[jboss]/server/default/deploy/jboss-logging.xml", - "private/tmp/[jboss]/server/default/conf/jboss-minimal.xml", - "private/tmp/[jboss]/server/default/conf/jboss-service.xml", - "private/tmp/[jboss]/server/default/conf/jndi.properties", - "private/tmp/[jboss]/server/default/conf/log4j.xml", - "private/tmp/[jboss]/server/default/conf/login-config.xml", - "private/tmp/[jboss]/server/default/conf/standardjaws.xml", - "private/tmp/[jboss]/server/default/conf/standardjboss.xml", - "private/tmp/[jboss]/server/default/conf/server.log.properties", - "private/tmp/[jboss]/server/default/deploy/jboss-logging.xml", - "tmp/[jboss]/server/default/conf/jboss-minimal.xml", - "tmp/[jboss]/server/default/conf/jboss-service.xml", - "tmp/[jboss]/server/default/conf/jndi.properties", - "tmp/[jboss]/server/default/conf/log4j.xml", - "tmp/[jboss]/server/default/conf/login-config.xml", - "tmp/[jboss]/server/default/conf/standardjaws.xml", - "tmp/[jboss]/server/default/conf/standardjboss.xml", - "tmp/[jboss]/server/default/conf/server.log.properties", - "tmp/[jboss]/server/default/deploy/jboss-logging.xml", - "program files/[jboss]/server/default/conf/jboss-minimal.xml", - "program files/[jboss]/server/default/conf/jboss-service.xml", - "program files/[jboss]/server/default/conf/jndi.properties", - "program files/[jboss]/server/default/conf/log4j.xml", - "program files/[jboss]/server/default/conf/login-config.xml", - "program files/[jboss]/server/default/conf/standardjaws.xml", - "program files/[jboss]/server/default/conf/standardjboss.xml", - "program files/[jboss]/server/default/conf/server.log.properties", - "program files/[jboss]/server/default/deploy/jboss-logging.xml", - "[jboss]/server/default/conf/jboss-minimal.xml", - "[jboss]/server/default/conf/jboss-service.xml", - "[jboss]/server/default/conf/jndi.properties", - "[jboss]/server/default/conf/log4j.xml", - "[jboss]/server/default/conf/login-config.xml", - "[jboss]/server/default/conf/standardjaws.xml", - "[jboss]/server/default/conf/standardjboss.xml", - "[jboss]/server/default/conf/server.log.properties", - "[jboss]/server/default/deploy/jboss-logging.xml", - "opt/[jboss]/server/default/log/server.log", - "opt/[jboss]/server/default/log/boot.log", - "usr/local/[jboss]/server/default/log/server.log", - "usr/local/[jboss]/server/default/log/boot.log", - "private/tmp/[jboss]/server/default/log/server.log", - "private/tmp/[jboss]/server/default/log/boot.log", - "tmp/[jboss]/server/default/log/server.log", - "tmp/[jboss]/server/default/log/boot.log", - "program files/[jboss]/server/default/log/server.log", - "program files/[jboss]/server/default/log/boot.log", - "[jboss]/server/default/log/server.log", - "[jboss]/server/default/log/boot.log", - "var/lighttpd.log", - "var/logs/access.log", - "usr/local/apache2/logs/lighttpd.error.log", - "usr/local/apache2/logs/lighttpd.log", - "usr/local/apache/logs/lighttpd.error.log", - "usr/local/apache/logs/lighttpd.log", - "usr/local/lighttpd/log/lighttpd.error.log", - "usr/local/lighttpd/log/access.log", - "usr/home/user/var/log/lighttpd.error.log", - "usr/home/user/var/log/apache.log", - "home/user/lighttpd/lighttpd.conf", - "usr/home/user/lighttpd/lighttpd.conf", - "etc/lighttpd/lighthttpd.conf", - "usr/local/etc/lighttpd.conf", - "usr/local/lighttpd/conf/lighttpd.conf", - "usr/local/etc/lighttpd.conf.new", - "var/www/.lighttpdpassword", - "logs/access_log", - "logs/error_log", - "etc/nginx/nginx.conf", - "usr/local/etc/nginx/nginx.conf", - "usr/local/nginx/conf/nginx.conf", - "usr/local/zeus/web/global.cfg", - "usr/local/zeus/web/log/errors", - "opt/lsws/conf/httpd_conf.xml", - "usr/local/lsws/conf/httpd_conf.xml", - "opt/lsws/logs/error.log", - "opt/lsws/logs/access.log", - "usr/local/lsws/logs/error.log", - "usr/local/logs/access.log", - "usr/local/samba/lib/log.user", - "usr/local/logs/samba.log", - "etc/samba/netlogon", - "etc/smbpasswd", - "etc/smb.conf", - "etc/samba/dhcp.conf", - "etc/samba/smb.conf", - "etc/samba/samba.conf", - "etc/samba/smb.conf.user", - "etc/samba/smbpasswd", - "etc/samba/smbusers", - "etc/samba/private/smbpasswd", - "usr/local/etc/smb.conf", - "usr/local/samba/lib/smb.conf.user", - "etc/dhcp3/dhclient.conf", - "etc/dhcp3/dhcpd.conf", - "etc/dhcp/dhclient.conf", - "program files/vidalia bundle/polipo/polipo.conf", - "etc/tor/tor-tsocks.conf", - "etc/stunnel/stunnel.conf", - "etc/tsocks.conf", - "etc/tinyproxy/tinyproxy.conf", - "etc/miredo-server.conf", - "etc/miredo.conf", - "etc/miredo/miredo-server.conf", - "etc/miredo/miredo.conf", - "etc/wicd/dhclient.conf.template.default", - "etc/wicd/manager-settings.conf", - "etc/wicd/wired-settings.conf", - "etc/wicd/wireless-settings.conf", - "etc/ipfw.rules", - "etc/ipfw.conf", - "etc/firewall.rules", - "winnt/system32/logfiles/firewall/pfirewall.log", - "winnt/system32/logfiles/firewall/pfirewall.log.old", - "windows/system32/logfiles/firewall/pfirewall.log", - "windows/system32/logfiles/firewall/pfirewall.log.old", - "etc/clamav/clamd.conf", - "etc/clamav/freshclam.conf", - "etc/x11/xorg.conf", - "etc/x11/xorg.conf-vesa", - "etc/x11/xorg.conf-vmware", - "etc/x11/xorg.conf.beforevmwaretoolsinstall", - "etc/x11/xorg.conf.orig", - "etc/bluetooth/input.conf", - "etc/bluetooth/main.conf", - "etc/bluetooth/network.conf", - "etc/bluetooth/rfcomm.conf", - "etc/bash_completion.d/debconf", - "root/.bash_logout", - "root/.bash_history", - "root/.bash_config", - "root/.bashrc", - "etc/bash.bashrc", - "var/adm/syslog", - "var/adm/sulog", - "var/adm/utmp", - "var/adm/utmpx", - "var/adm/wtmp", - "var/adm/wtmpx", - "var/adm/lastlog/username", - "usr/spool/lp/log", - "var/adm/lp/lpd-errs", - "usr/lib/cron/log", - "var/adm/loginlog", - "var/adm/pacct", - "var/adm/dtmp", - "var/adm/acct/sum/loginlog", - "var/adm/x0msgs", - "var/adm/crash/vmcore", - "var/adm/crash/unix", - "etc/newsyslog.conf", - "var/adm/qacct", - "var/adm/ras/errlog", - "var/adm/ras/bootlog", - "var/adm/cron/log", - "etc/utmp", - "etc/security/lastlog", - "etc/security/failedlogin", - "usr/spool/mqueue/syslog", - "var/adm/messages", - "var/adm/aculogs", - "var/adm/aculog", - "var/adm/vold.log", - "var/adm/log/asppp.log", - "var/lp/logs/lpsched", - "var/lp/logs/lpnet", - "var/lp/logs/requests", - "var/cron/log", - "var/saf/_log", - "var/saf/port/log", - "tmp/access.log", - "etc/sensors.conf", - "etc/sensors3.conf", - "etc/host.conf", - "etc/pam.conf", - "etc/resolv.conf", - "etc/apt/apt.conf", - "etc/inetd.conf", - "etc/syslog.conf", - "etc/sysctl.conf", - "etc/sysctl.d/10-console-messages.conf", - "etc/sysctl.d/10-network-security.conf", - "etc/sysctl.d/10-process-security.conf", - "etc/sysctl.d/wine.sysctl.conf", - "etc/security/access.conf", - "etc/security/group.conf", - "etc/security/limits.conf", - "etc/security/namespace.conf", - "etc/security/pam_env.conf", - "etc/security/sepermit.conf", - "etc/security/time.conf", - "etc/ssh/sshd_config", - "etc/adduser.conf", - "etc/deluser.conf", - "etc/avahi/avahi-daemon.conf", - "etc/ca-certificates.conf", - "etc/ca-certificates.conf.dpkg-old", - "etc/casper.conf", - "etc/chkrootkit.conf", - "etc/debconf.conf", - "etc/dns2tcpd.conf", - "etc/e2fsck.conf", - "etc/esound/esd.conf", - "etc/etter.conf", - "etc/fuse.conf", - "etc/foremost.conf", - "etc/hdparm.conf", - "etc/kernel-img.conf", - "etc/kernel-pkg.conf", - "etc/ld.so.conf", - "etc/ltrace.conf", - "etc/mail/sendmail.conf", - "etc/manpath.config", - "etc/kbd/config", - "etc/ldap/ldap.conf", - "etc/logrotate.conf", - "etc/mtools.conf", - "etc/smi.conf", - "etc/updatedb.conf", - "etc/pulse/client.conf", - "usr/share/adduser/adduser.conf", - "etc/hostname", - "etc/networks", - "etc/timezone", - "etc/modules", - "etc/passwd", - "etc/shadow", - "etc/fstab", - "etc/motd", - "etc/hosts", - "etc/group", - "etc/alias", - "etc/crontab", - "etc/crypttab", - "etc/exports", - "etc/mtab", - "etc/hosts.allow", - "etc/hosts.deny", - "etc/os-release", - "etc/password.master", - "etc/profile", - "etc/default/grub", - "etc/resolvconf/update-libc.d/sendmail", - "etc/inittab", - "etc/issue", - "etc/issue.net", - "etc/login.defs", - "etc/sudoers", - "etc/sysconfig/network-scripts/ifcfg-eth0", - "etc/redhat-release", - "etc/scw-release", - "etc/system-release-cpe", - "etc/debian_version", - "etc/fedora-release", - "etc/mandrake-release", - "etc/slackware-release", - "etc/suse-release", - "etc/security/group", - "etc/security/passwd", - "etc/security/user", - "etc/security/environ", - "etc/security/limits", - "etc/security/opasswd", - "boot/grub/grub.cfg", - "boot/grub/menu.lst", - "root/.ksh_history", - "root/.xauthority", - "usr/lib/security/mkuser.default", - "var/lib/squirrelmail/prefs/squirrelmail.log", - "etc/squirrelmail/apache.conf", - "etc/squirrelmail/config_local.php", - "etc/squirrelmail/default_pref", - "etc/squirrelmail/index.php", - "etc/squirrelmail/config_default.php", - "etc/squirrelmail/config.php", - "etc/squirrelmail/filters_setup.php", - "etc/squirrelmail/sqspell_config.php", - "etc/squirrelmail/config/config.php", - "etc/httpd/conf.d/squirrelmail.conf", - "usr/share/squirrelmail/config/config.php", - "private/etc/squirrelmail/config/config.php", - "srv/www/htdos/squirrelmail/config/config.php", - "var/www/squirrelmail/config/config.php", - "var/www/html/squirrelmail/config/config.php", - "var/www/html/squirrelmail-1.2.9/config/config.php", - "usr/share/squirrelmail/plugins/squirrel_logger/setup.php", - "usr/local/squirrelmail/www/readme", - "windows/system32/drivers/etc/hosts", - "windows/system32/drivers/etc/lmhosts.sam", - "windows/system32/drivers/etc/networks", - "windows/system32/drivers/etc/protocol", - "windows/system32/drivers/etc/services", - "/boot.ini", - "windows/debug/netsetup.log", - "windows/comsetup.log", - "windows/repair/setup.log", - "windows/setupact.log", - "windows/setupapi.log", - "windows/setuperr.log", - "windows/updspapi.log", - "windows/wmsetup.log", - "windows/windowsupdate.log", - "windows/odbc.ini", - "usr/local/psa/admin/htdocs/domains/databases/phpmyadmin/libraries/config.default.php", - "etc/apache2/conf.d/phpmyadmin.conf", - "etc/phpmyadmin/config.inc.php", - "etc/openldap/ldap.conf", - "etc/cups/acroread.conf", - "etc/cups/cupsd.conf", - "etc/cups/cupsd.conf.default", - "etc/cups/pdftops.conf", - "etc/cups/printers.conf", - "windows/system32/macromed/flash/flashinstall.log", - "windows/system32/macromed/flash/install.log", - "etc/cvs-cron.conf", - "etc/cvs-pserver.conf", - "etc/subversion/config", - "etc/modprobe.d/vmware-tools.conf", - "etc/updatedb.conf.beforevmwaretoolsinstall", - "etc/vmware-tools/config", - "etc/vmware-tools/tpvmlp.conf", - "etc/vmware-tools/vmware-tools-libraries.conf", - "var/log", - "var/log/sw-cp-server/error_log", - "var/log/sso/sso.log", - "var/log/dpkg.log", - "var/log/btmp", - "var/log/utmp", - "var/log/wtmp", - "var/log/mysql/mysql-bin.log", - "var/log/mysql/mysql-bin.index", - "var/log/mysql/data/mysql-bin.index", - "var/log/mysql.log", - "var/log/mysql.err", - "var/log/mysqlderror.log", - "var/log/mysql/mysql.log", - "var/log/mysql/mysql-slow.log", - "var/log/mysql-bin.index", - "var/log/data/mysql-bin.index", - "var/log/postgresql/postgresql.log", - "var/log/postgres/pg_backup.log", - "var/log/postgres/postgres.log", - "var/log/postgresql.log", - "var/log/pgsql/pgsql.log", - "var/log/postgresql/postgresql-8.1-main.log", - "var/log/postgresql/postgresql-8.3-main.log", - "var/log/postgresql/postgresql-8.4-main.log", - "var/log/postgresql/postgresql-9.0-main.log", - "var/log/postgresql/postgresql-9.1-main.log", - "var/log/pgsql8.log", - "var/log/postgresql/postgres.log", - "var/log/pgsql_log", - "var/log/postgresql/main.log", - "var/log/cron", - "var/log/postgres.log", - "var/log/proftpd", - "var/log/proftpd/xferlog.legacy", - "var/log/proftpd.access_log", - "var/log/proftpd.xferlog", - "var/log/vsftpd.log", - "var/log/xferlog", - "var/log/pure-ftpd/pure-ftpd.log", - "var/log/pureftpd.log", - "var/log/muddleftpd", - "var/log/muddleftpd.conf", - "var/log/ftp-proxy/ftp-proxy.log", - "var/log/ftp-proxy", - "var/log/ftplog", - "var/log/exim_mainlog", - "var/log/exim/mainlog", - "var/log/maillog", - "var/log/exim_paniclog", - "var/log/exim/paniclog", - "var/log/exim/rejectlog", - "var/log/exim_rejectlog", - "var/log/webmin/miniserv.log", - "var/log/httpd/access_log", - "var/log/httpd/error_log", - "var/log/httpd/access.log", - "var/log/httpd/error.log", - "var/log/apache/access_log", - "var/log/apache/access.log", - "var/log/apache/error_log", - "var/log/apache/error.log", - "var/log/apache2/access_log", - "var/log/apache2/access.log", - "var/log/apache2/error_log", - "var/log/apache2/error.log", - "var/log/access_log", - "var/log/access.log", - "var/log/error_log", - "var/log/error.log", - "var/log/tomcat6/catalina.out", - "var/log/lighttpd.error.log", - "var/log/lighttpd.access.log", - "var/logs/access.log", - "var/log/lighttpd/", - "var/log/lighttpd/error.log", - "var/log/lighttpd/access.www.log", - "var/log/lighttpd/error.www.log", - "var/log/lighttpd/access.log", - "var/log/lighttpd/{domain}/access.log", - "var/log/lighttpd/{domain}/error.log", - "var/log/nginx/access_log", - "var/log/nginx/error_log", - "var/log/nginx/access.log", - "var/log/nginx/error.log", - "var/log/nginx.access_log", - "var/log/nginx.error_log", - "var/log/samba/log.smbd", - "var/log/samba/log.nmbd", - "var/log/samba.log", - "var/log/samba.log1", - "var/log/samba.log2", - "var/log/log.smb", - "var/log/ipfw.log", - "var/log/ipfw", - "var/log/ipfw/ipfw.log", - "var/log/ipfw.today", - "var/log/poplog", - "var/log/authlog", - "var/log/news.all", - "var/log/news/news.all", - "var/log/news/news.crit", - "var/log/news/news.err", - "var/log/news/news.notice", - "var/log/news/suck.err", - "var/log/news/suck.notice", - "var/log/messages", - "var/log/messages.1", - "var/log/user.log", - "var/log/user.log.1", - "var/log/auth.log", - "var/log/pm-powersave.log", - "var/log/xorg.0.log", - "var/log/daemon.log", - "var/log/daemon.log.1", - "var/log/kern.log", - "var/log/kern.log.1", - "var/log/mail.err", - "var/log/mail.info", - "var/log/mail.warn", - "var/log/ufw.log", - "var/log/boot.log", - "var/log/syslog", - "var/log/syslog.1", - "var/log/squirrelmail.log", - "var/log/apache2/squirrelmail.log", - "var/log/apache2/squirrelmail.err.log", - "var/log/mail.log", - "var/log/vmware/hostd.log", - "var/log/vmware/hostd-1.log", - "/wp-config.php", - "/wp-config.bak", - "/wp-config.old", - "/wp-config.temp", - "/wp-config.tmp", - "/wp-config.txt", - "/config.yml", - "/config_dev.yml", - "/config_prod.yml", - "/config_test.yml", - "/parameters.yml", - "/routing.yml", - "/security.yml", - "/services.yml", - "sites/default/default.settings.php", - "sites/default/settings.php", - "sites/default/settings.local.php", - "app/etc/local.xml", - "/sftp-config.json", - "/web.config", - "includes/config.php", - "includes/configure.php", - "/config.inc.php", - "/localsettings.php", - "inc/config.php", - "typo3conf/localconf.php", - "config/app.php", - "config/custom.php", - "config/database.php", - "/configuration.php", - "/config.php", - "var/mail/www-data", - "etc/network/", - "etc/init/", - "inetpub/wwwroot/global.asa", - "system32/inetsrv/config/applicationhost.config", - "system32/inetsrv/config/administration.config", - "system32/inetsrv/config/redirection.config", - "system32/config/default", - "system32/config/sam", - "system32/config/system", - "system32/config/software", - "winnt/repair/sam._", - "/package.json", - "/package-lock.json", - "/gruntfile.js", - "/npm-debug.log", - "/ormconfig.json", - "/tsconfig.json", - "/webpack.config.js", - "/yarn.lock", - "proc/0", - "proc/1", - "proc/2", - "proc/3", - "proc/4", - "proc/5", - "proc/6", - "proc/7", - "proc/8", - "proc/9", - "proc/acpi", - "proc/asound", - "proc/bootconfig", - "proc/buddyinfo", - "proc/bus", - "proc/cgroups", - "proc/cmdline", - "proc/config.gz", - "proc/consoles", - "proc/cpuinfo", - "proc/crypto", - "proc/devices", - "proc/diskstats", - "proc/dma", - "proc/docker", - "proc/driver", - "proc/dynamic_debug", - "proc/execdomains", - "proc/fb", - "proc/filesystems", - "proc/fs", - "proc/interrupts", - "proc/iomem", - "proc/ioports", - "proc/ipmi", - "proc/irq", - "proc/kallsyms", - "proc/kcore", - "proc/keys", - "proc/keys", - "proc/key-users", - "proc/kmsg", - "proc/kpagecgroup", - "proc/kpagecount", - "proc/kpageflags", - "proc/latency_stats", - "proc/loadavg", - "proc/locks", - "proc/mdstat", - "proc/meminfo", - "proc/misc", - "proc/modules", - "proc/mounts", - "proc/mpt", - "proc/mtd", - "proc/mtrr", - "proc/net", - "proc/net/tcp", - "proc/net/udp", - "proc/pagetypeinfo", - "proc/partitions", - "proc/pressure", - "proc/sched_debug", - "proc/schedstat", - "proc/scsi", - "proc/self", - "proc/self/cmdline", - "proc/self/environ", - "proc/self/fd/0", - "proc/self/fd/1", - "proc/self/fd/10", - "proc/self/fd/11", - "proc/self/fd/12", - "proc/self/fd/13", - "proc/self/fd/14", - "proc/self/fd/15", - "proc/self/fd/2", - "proc/self/fd/3", - "proc/self/fd/4", - "proc/self/fd/5", - "proc/self/fd/6", - "proc/self/fd/7", - "proc/self/fd/8", - "proc/self/fd/9", - "proc/self/mounts", - "proc/self/stat", - "proc/self/status", - "proc/slabinfo", - "proc/softirqs", - "proc/stat", - "proc/swaps", - "proc/sys", - "proc/sysrq-trigger", - "proc/sysvipc", - "proc/thread-self", - "proc/timer_list", - "proc/timer_stats", - "proc/tty", - "proc/uptime", - "proc/version", - "proc/version_signature", - "proc/vmallocinfo", - "proc/vmstat", - "proc/zoneinfo", - "sys/block", - "sys/bus", - "sys/class", - "sys/dev", - "sys/devices", - "sys/firmware", - "sys/fs", - "sys/hypervisor", - "sys/kernel", - "sys/module", - "sys/power", - "windows\\win.ini", - "default\\ntuser.dat", - "/var/run/secrets/kubernetes.io/serviceaccount" - ], - "options": { - "enforce_word_boundary": true - } - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase", - "normalizePath" - ] - }, - { - "id": "crs-931-110", - "name": "RFI: Common RFI Vulnerable Parameter Name used w/ URL Payload", - "tags": { - "type": "rfi", - "crs_id": "931110", - "category": "attack_attempt", - "cwe": "98", - "capec": "1000/152/175/253/193", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - } - ], - "regex": "(?:\\binclude\\s*\\([^)]*|mosConfig_absolute_path|_CONF\\[path\\]|_SERVER\\[DOCUMENT_ROOT\\]|GALLERY_BASEDIR|path\\[docroot\\]|appserv_root|config\\[root_dir\\])=(?:file|ftps?|https?)://", - "options": { - "min_length": 15 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-931-120", - "name": "RFI: URL Payload Used w/Trailing Question Mark Character (?)", - "tags": { - "type": "rfi", - "crs_id": "931120", - "category": "attack_attempt", - "cwe": "98", - "capec": "1000/152/175/253/193", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^(?i:file|ftps?)://.*?\\?+$", - "options": { - "case_sensitive": true, - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-932-160", - "name": "Remote Command Execution: Unix Shell Code Found", - "tags": { - "type": "command_injection", - "crs_id": "932160", - "category": "attack_attempt", - "cwe": "77", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "options": { - "enforce_word_boundary": true - }, - "list": [ - "${cdpath}", - "${dirstack}", - "${home}", - "${hostname}", - "${ifs}", - "${oldpwd}", - "${ostype}", - "${path}", - "${pwd}", - "$cdpath", - "$dirstack", - "$home", - "$hostname", - "$ifs", - "$oldpwd", - "$ostype", - "$pwd", - "dev/fd/", - "dev/null", - "dev/stderr", - "dev/stdin", - "dev/stdout", - "dev/tcp/", - "dev/udp/", - "dev/zero", - "etc/master.passwd", - "etc/pwd.db", - "etc/shells", - "etc/spwd.db", - "proc/self/", - "bin/7z", - "bin/7za", - "bin/7zr", - "bin/ab", - "bin/agetty", - "bin/ansible-playbook", - "bin/apt", - "bin/apt-get", - "bin/ar", - "bin/aria2c", - "bin/arj", - "bin/arp", - "bin/as", - "bin/ascii-xfr", - "bin/ascii85", - "bin/ash", - "bin/aspell", - "bin/at", - "bin/atobm", - "bin/awk", - "bin/base32", - "bin/base64", - "bin/basenc", - "bin/bash", - "bin/bpftrace", - "bin/bridge", - "bin/bundler", - "bin/bunzip2", - "bin/busctl", - "bin/busybox", - "bin/byebug", - "bin/bzcat", - "bin/bzcmp", - "bin/bzdiff", - "bin/bzegrep", - "bin/bzexe", - "bin/bzfgrep", - "bin/bzgrep", - "bin/bzip2", - "bin/bzip2recover", - "bin/bzless", - "bin/bzmore", - "bin/bzz", - "bin/c89", - "bin/c99", - "bin/cancel", - "bin/capsh", - "bin/cat", - "bin/cc", - "bin/certbot", - "bin/check_by_ssh", - "bin/check_cups", - "bin/check_log", - "bin/check_memory", - "bin/check_raid", - "bin/check_ssl_cert", - "bin/check_statusfile", - "bin/chmod", - "bin/choom", - "bin/chown", - "bin/chroot", - "bin/clang", - "bin/clang++", - "bin/cmp", - "bin/cobc", - "bin/column", - "bin/comm", - "bin/composer", - "bin/core_perl/zipdetails", - "bin/cowsay", - "bin/cowthink", - "bin/cp", - "bin/cpan", - "bin/cpio", - "bin/cpulimit", - "bin/crash", - "bin/crontab", - "bin/csh", - "bin/csplit", - "bin/csvtool", - "bin/cupsfilter", - "bin/curl", - "bin/cut", - "bin/dash", - "bin/date", - "bin/dd", - "bin/dev/fd/", - "bin/dev/null", - "bin/dev/stderr", - "bin/dev/stdin", - "bin/dev/stdout", - "bin/dev/tcp/", - "bin/dev/udp/", - "bin/dev/zero", - "bin/dialog", - "bin/diff", - "bin/dig", - "bin/dmesg", - "bin/dmidecode", - "bin/dmsetup", - "bin/dnf", - "bin/docker", - "bin/dosbox", - "bin/dpkg", - "bin/du", - "bin/dvips", - "bin/easy_install", - "bin/eb", - "bin/echo", - "bin/ed", - "bin/efax", - "bin/emacs", - "bin/env", - "bin/eqn", - "bin/es", - "bin/esh", - "bin/etc/group", - "bin/etc/master.passwd", - "bin/etc/passwd", - "bin/etc/pwd.db", - "bin/etc/shadow", - "bin/etc/shells", - "bin/etc/spwd.db", - "bin/ex", - "bin/exiftool", - "bin/expand", - "bin/expect", - "bin/expr", - "bin/facter", - "bin/fetch", - "bin/file", - "bin/find", - "bin/finger", - "bin/fish", - "bin/flock", - "bin/fmt", - "bin/fold", - "bin/fping", - "bin/ftp", - "bin/gawk", - "bin/gcc", - "bin/gcore", - "bin/gdb", - "bin/gem", - "bin/genie", - "bin/genisoimage", - "bin/ghc", - "bin/ghci", - "bin/gimp", - "bin/ginsh", - "bin/git", - "bin/grc", - "bin/grep", - "bin/gtester", - "bin/gunzip", - "bin/gzexe", - "bin/gzip", - "bin/hd", - "bin/head", - "bin/hexdump", - "bin/highlight", - "bin/hping3", - "bin/iconv", - "bin/id", - "bin/iftop", - "bin/install", - "bin/ionice", - "bin/ip", - "bin/irb", - "bin/ispell", - "bin/jjs", - "bin/join", - "bin/journalctl", - "bin/jq", - "bin/jrunscript", - "bin/knife", - "bin/ksh", - "bin/ksshell", - "bin/latex", - "bin/ld", - "bin/ldconfig", - "bin/less", - "bin/lftp", - "bin/ln", - "bin/loginctl", - "bin/logsave", - "bin/look", - "bin/lp", - "bin/ls", - "bin/ltrace", - "bin/lua", - "bin/lualatex", - "bin/luatex", - "bin/lwp-download", - "bin/lwp-request", - "bin/lz", - "bin/lz4", - "bin/lz4c", - "bin/lz4cat", - "bin/lzcat", - "bin/lzcmp", - "bin/lzdiff", - "bin/lzegrep", - "bin/lzfgrep", - "bin/lzgrep", - "bin/lzless", - "bin/lzma", - "bin/lzmadec", - "bin/lzmainfo", - "bin/lzmore", - "bin/mail", - "bin/make", - "bin/man", - "bin/mawk", - "bin/mkfifo", - "bin/mknod", - "bin/more", - "bin/mosquitto", - "bin/mount", - "bin/msgattrib", - "bin/msgcat", - "bin/msgconv", - "bin/msgfilter", - "bin/msgmerge", - "bin/msguniq", - "bin/mtr", - "bin/mv", - "bin/mysql", - "bin/nano", - "bin/nasm", - "bin/nawk", - "bin/nc", - "bin/ncat", - "bin/neofetch", - "bin/nice", - "bin/nl", - "bin/nm", - "bin/nmap", - "bin/node", - "bin/nohup", - "bin/npm", - "bin/nroff", - "bin/nsenter", - "bin/octave", - "bin/od", - "bin/openssl", - "bin/openvpn", - "bin/openvt", - "bin/opkg", - "bin/paste", - "bin/pax", - "bin/pdb", - "bin/pdflatex", - "bin/pdftex", - "bin/pdksh", - "bin/perf", - "bin/perl", - "bin/pg", - "bin/php", - "bin/php-cgi", - "bin/php5", - "bin/php7", - "bin/pic", - "bin/pico", - "bin/pidstat", - "bin/pigz", - "bin/pip", - "bin/pkexec", - "bin/pkg", - "bin/pr", - "bin/printf", - "bin/proc/self/", - "bin/pry", - "bin/ps", - "bin/psed", - "bin/psftp", - "bin/psql", - "bin/ptx", - "bin/puppet", - "bin/pxz", - "bin/python", - "bin/python2", - "bin/python3", - "bin/rake", - "bin/rbash", - "bin/rc", - "bin/readelf", - "bin/red", - "bin/redcarpet", - "bin/restic", - "bin/rev", - "bin/rlogin", - "bin/rlwrap", - "bin/rpm", - "bin/rpmquery", - "bin/rsync", - "bin/ruby", - "bin/run-mailcap", - "bin/run-parts", - "bin/rview", - "bin/rvim", - "bin/sash", - "bin/sbin/capsh", - "bin/sbin/logsave", - "bin/sbin/service", - "bin/sbin/start-stop-daemon", - "bin/scp", - "bin/screen", - "bin/script", - "bin/sed", - "bin/service", - "bin/setarch", - "bin/sftp", - "bin/sg", - "bin/sh", - "bin/shuf", - "bin/sleep", - "bin/slsh", - "bin/smbclient", - "bin/snap", - "bin/socat", - "bin/soelim", - "bin/sort", - "bin/split", - "bin/sqlite3", - "bin/ss", - "bin/ssh", - "bin/ssh-keygen", - "bin/ssh-keyscan", - "bin/sshpass", - "bin/start-stop-daemon", - "bin/stdbuf", - "bin/strace", - "bin/strings", - "bin/su", - "bin/sysctl", - "bin/systemctl", - "bin/systemd-resolve", - "bin/tac", - "bin/tail", - "bin/tar", - "bin/task", - "bin/taskset", - "bin/tbl", - "bin/tclsh", - "bin/tcpdump", - "bin/tcsh", - "bin/tee", - "bin/telnet", - "bin/tex", - "bin/tftp", - "bin/tic", - "bin/time", - "bin/timedatectl", - "bin/timeout", - "bin/tmux", - "bin/top", - "bin/troff", - "bin/tshark", - "bin/ul", - "bin/uname", - "bin/uncompress", - "bin/unexpand", - "bin/uniq", - "bin/unlz4", - "bin/unlzma", - "bin/unpigz", - "bin/unrar", - "bin/unshare", - "bin/unxz", - "bin/unzip", - "bin/unzstd", - "bin/update-alternatives", - "bin/uudecode", - "bin/uuencode", - "bin/valgrind", - "bin/vi", - "bin/view", - "bin/vigr", - "bin/vim", - "bin/vimdiff", - "bin/vipw", - "bin/virsh", - "bin/volatility", - "bin/wall", - "bin/watch", - "bin/wc", - "bin/wget", - "bin/whiptail", - "bin/who", - "bin/whoami", - "bin/whois", - "bin/wireshark", - "bin/wish", - "bin/xargs", - "bin/xelatex", - "bin/xetex", - "bin/xmodmap", - "bin/xmore", - "bin/xpad", - "bin/xxd", - "bin/xz", - "bin/xzcat", - "bin/xzcmp", - "bin/xzdec", - "bin/xzdiff", - "bin/xzegrep", - "bin/xzfgrep", - "bin/xzgrep", - "bin/xzless", - "bin/xzmore", - "bin/yarn", - "bin/yelp", - "bin/yes", - "bin/yum", - "bin/zathura", - "bin/zip", - "bin/zipcloak", - "bin/zipcmp", - "bin/zipdetails", - "bin/zipgrep", - "bin/zipinfo", - "bin/zipmerge", - "bin/zipnote", - "bin/zipsplit", - "bin/ziptool", - "bin/zsh", - "bin/zsoelim", - "bin/zstd", - "bin/zstdcat", - "bin/zstdgrep", - "bin/zstdless", - "bin/zstdmt", - "bin/zypper" - ] - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase", - "cmdLine" - ] - }, - { - "id": "crs-932-171", - "name": "Remote Command Execution: Shellshock (CVE-2014-6271)", - "tags": { - "type": "command_injection", - "crs_id": "932171", - "category": "attack_attempt", - "cwe": "77", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^\\(\\s*\\)\\s+{", - "options": { - "case_sensitive": true, - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-932-180", - "name": "Restricted File Upload Attempt", - "tags": { - "type": "command_injection", - "crs_id": "932180", - "category": "attack_attempt", - "cwe": "706", - "capec": "1000/225/122/17/177", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-filename" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x_filename" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-file-name" - ] - } - ], - "list": [ - ".htaccess", - ".htdigest", - ".htpasswd", - "wp-config.php", - "config.yml", - "config_dev.yml", - "config_prod.yml", - "config_test.yml", - "parameters.yml", - "routing.yml", - "security.yml", - "services.yml", - "default.settings.php", - "settings.php", - "settings.local.php", - "local.xml", - ".env" - ], - "options": { - "enforce_word_boundary": true - } - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-933-111", - "name": "PHP Injection Attack: PHP Script File Upload Found", - "tags": { - "type": "unrestricted_file_upload", - "crs_id": "933111", - "category": "attack_attempt", - "cwe": "434", - "capec": "1000/225/122/17/650", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-filename" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x_filename" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x.filename" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-file-name" - ] - } - ], - "regex": ".*\\.(?:php\\d*|phtml)\\..*$", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-933-130", - "name": "PHP Injection Attack: Global Variables Found", - "tags": { - "type": "php_code_injection", - "crs_id": "933130", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/225/122/17/650", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "options": { - "enforce_word_boundary": true - }, - "list": [ - "$globals", - "$_cookie", - "$_env", - "$_files", - "$_get", - "$_post", - "$_request", - "$_server", - "$_session", - "$argc", - "$argv", - "$http_\\u200bresponse_\\u200bheader", - "$php_\\u200berrormsg", - "$http_cookie_vars", - "$http_env_vars", - "$http_get_vars", - "$http_post_files", - "$http_post_vars", - "$http_raw_post_data", - "$http_request_vars", - "$http_server_vars" - ] - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-933-131", - "name": "PHP Injection Attack: HTTP Headers Values Found", - "tags": { - "type": "php_code_injection", - "crs_id": "933131", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/225/122/17/650", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:HTTP_(?:ACCEPT(?:_(?:ENCODING|LANGUAGE|CHARSET))?|(?:X_FORWARDED_FO|REFERE)R|(?:USER_AGEN|HOS)T|CONNECTION|KEEP_ALIVE)|PATH_(?:TRANSLATED|INFO)|ORIG_PATH_INFO|QUERY_STRING|REQUEST_URI|AUTH_TYPE)", - "options": { - "case_sensitive": true, - "min_length": 9 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-933-140", - "name": "PHP Injection Attack: I/O Stream Found", - "tags": { - "type": "php_code_injection", - "crs_id": "933140", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/225/122/17/650", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "php://(?:std(?:in|out|err)|(?:in|out)put|fd|memory|temp|filter)", - "options": { - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-933-150", - "name": "PHP Injection Attack: High-Risk PHP Function Name Found", - "tags": { - "type": "php_code_injection", - "crs_id": "933150", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/225/122/17/650", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "list": [ - "__halt_compiler", - "apache_child_terminate", - "base64_decode", - "bzdecompress", - "call_user_func", - "call_user_func_array", - "call_user_method", - "call_user_method_array", - "convert_uudecode", - "file_get_contents", - "file_put_contents", - "fsockopen", - "get_class_methods", - "get_class_vars", - "get_defined_constants", - "get_defined_functions", - "get_defined_vars", - "gzdecode", - "gzinflate", - "gzuncompress", - "include_once", - "invokeargs", - "pcntl_exec", - "pcntl_fork", - "pfsockopen", - "posix_getcwd", - "posix_getpwuid", - "posix_getuid", - "posix_uname", - "reflectionfunction", - "require_once", - "shell_exec", - "str_rot13", - "sys_get_temp_dir", - "wp_remote_fopen", - "wp_remote_get", - "wp_remote_head", - "wp_remote_post", - "wp_remote_request", - "wp_safe_remote_get", - "wp_safe_remote_head", - "wp_safe_remote_post", - "wp_safe_remote_request", - "zlib_decode" - ], - "options": { - "enforce_word_boundary": true - } - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-933-160", - "name": "PHP Injection Attack: High-Risk PHP Function Call Found", - "tags": { - "type": "php_code_injection", - "crs_id": "933160", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/225/122/17/650", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:s(?:e(?:t(?:_(?:e(?:xception|rror)_handler|magic_quotes_runtime|include_path)|defaultstub)|ssion_s(?:et_save_handler|tart))|qlite_(?:(?:(?:unbuffered|single|array)_)?query|create_(?:aggregate|function)|p?open|exec)|tr(?:eam_(?:context_create|socket_client)|ipc?slashes|rev)|implexml_load_(?:string|file)|ocket_c(?:onnect|reate)|h(?:ow_sourc|a1_fil)e|pl_autoload_register|ystem)|p(?:r(?:eg_(?:replace(?:_callback(?:_array)?)?|match(?:_all)?|split)|oc_(?:(?:terminat|clos|nic)e|get_status|open)|int_r)|o(?:six_(?:get(?:(?:e[gu]|g)id|login|pwnam)|mk(?:fifo|nod)|ttyname|kill)|pen)|hp(?:_(?:strip_whitespac|unam)e|version|info)|g_(?:(?:execut|prepar)e|connect|query)|a(?:rse_(?:ini_file|str)|ssthru)|utenv)|r(?:unkit_(?:function_(?:re(?:defin|nam)e|copy|add)|method_(?:re(?:defin|nam)e|copy|add)|constant_(?:redefine|add))|e(?:(?:gister_(?:shutdown|tick)|name)_function|ad(?:(?:gz)?file|_exif_data|dir))|awurl(?:de|en)code)|i(?:mage(?:createfrom(?:(?:jpe|pn)g|x[bp]m|wbmp|gif)|(?:jpe|pn)g|g(?:d2?|if)|2?wbmp|xbm)|s_(?:(?:(?:execut|write?|read)ab|fi)le|dir)|ni_(?:get(?:_all)?|set)|terator_apply|ptcembed)|g(?:et(?:_(?:c(?:urrent_use|fg_va)r|meta_tags)|my(?:[gpu]id|inode)|(?:lastmo|cw)d|imagesize|env)|z(?:(?:(?:defla|wri)t|encod|fil)e|compress|open|read)|lob)|a(?:rray_(?:u(?:intersect(?:_u?assoc)?|diff(?:_u?assoc)?)|intersect_u(?:assoc|key)|diff_u(?:assoc|key)|filter|reduce|map)|ssert(?:_options)?|tob)|h(?:tml(?:specialchars(?:_decode)?|_entity_decode|entities)|(?:ash(?:_(?:update|hmac))?|ighlight)_file|e(?:ader_register_callback|x2bin))|f(?:i(?:le(?:(?:[acm]tim|inod)e|(?:_exist|perm)s|group)?|nfo_open)|tp_(?:nb_(?:ge|pu)|connec|ge|pu)t|(?:unction_exis|pu)ts|write|open)|o(?:b_(?:get_(?:c(?:ontents|lean)|flush)|end_(?:clean|flush)|clean|flush|start)|dbc_(?:result(?:_all)?|exec(?:ute)?|connect)|pendir)|m(?:b_(?:ereg(?:_(?:replace(?:_callback)?|match)|i(?:_replace)?)?|parse_str)|(?:ove_uploaded|d5)_file|ethod_exists|ysql_query|kdir)|e(?:x(?:if_(?:t(?:humbnail|agname)|imagetype|read_data)|ec)|scapeshell(?:arg|cmd)|rror_reporting|val)|c(?:url_(?:file_create|exec|init)|onvert_uuencode|reate_function|hr)|u(?:n(?:serialize|pack)|rl(?:de|en)code|[ak]?sort)|b(?:(?:son_(?:de|en)|ase64_en)code|zopen|toa)|(?:json_(?:de|en)cod|debug_backtrac|tmpfil)e|var_dump)(?:\\s|/\\*.*\\*/|//.*|#.*|\\\"|')*\\((?:(?:\\s|/\\*.*\\*/|//.*|#.*)*(?:\\$\\w+|[A-Z\\d]\\w*|\\w+\\(.*\\)|\\\\?\"(?:[^\"]|\\\\\"|\"\"|\"\\+\")*\\\\?\"|\\\\?'(?:[^']|''|'\\+')*\\\\?')(?:\\s|/\\*.*\\*/|//.*|#.*)*(?:(?:::|\\.|->)(?:\\s|/\\*.*\\*/|//.*|#.*)*\\w+(?:\\(.*\\))?)?,)*(?:(?:\\s|/\\*.*\\*/|//.*|#.*)*(?:\\$\\w+|[A-Z\\d]\\w*|\\w+\\(.*\\)|\\\\?\"(?:[^\"]|\\\\\"|\"\"|\"\\+\")*\\\\?\"|\\\\?'(?:[^']|''|'\\+')*\\\\?')(?:\\s|/\\*.*\\*/|//.*|#.*)*(?:(?:::|\\.|->)(?:\\s|/\\*.*\\*/|//.*|#.*)*\\w+(?:\\(.*\\))?)?)?\\)\\s*(?:[;\\.)}\\]|\\\\]|\\?>|%>|$)", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-933-170", - "name": "PHP Injection Attack: Serialized Object Injection", - "tags": { - "type": "php_code_injection", - "crs_id": "933170", - "category": "attack_attempt", - "cwe": "502", - "capec": "1000/152/586", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "[oOcC]:\\d+:\\\".+?\\\":\\d+:{[\\W\\w]*}", - "options": { - "case_sensitive": true, - "min_length": 12 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-933-200", - "name": "PHP Injection Attack: Wrapper scheme detected", - "tags": { - "type": "php_code_injection", - "crs_id": "933200", - "category": "attack_attempt", - "cwe": "502", - "capec": "1000/152/586", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:(?:bzip|ssh)2|z(?:lib|ip)|(?:ph|r)ar|expect|glob|ogg)://", - "options": { - "case_sensitive": true, - "min_length": 6 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-934-100", - "name": "Node.js Injection Attack 1/2", - "tags": { - "type": "js_code_injection", - "crs_id": "934100", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:(?:l(?:(?:utimes|chmod)(?:Sync)?|(?:stat|ink)Sync)|w(?:rite(?:(?:File|v)(?:Sync)?|Sync)|atchFile)|u(?:n(?:watchFile|linkSync)|times(?:Sync)?)|s(?:(?:ymlink|tat)Sync|pawn(?:File|Sync))|ex(?:ec(?:File(?:Sync)?|Sync)|istsSync)|a(?:ppendFile|ccess)(?:Sync)?|(?:Caveat|Inode)s|open(?:dir)?Sync|new\\s+Function|Availability|\\beval)\\s*\\(|m(?:ain(?:Module\\s*(?:\\W*\\s*(?:constructor|require)|\\[)|\\s*(?:\\W*\\s*(?:constructor|require)|\\[))|kd(?:temp(?:Sync)?|irSync)\\s*\\(|odule\\.exports\\s*=)|c(?:(?:(?:h(?:mod|own)|lose)Sync|reate(?:Write|Read)Stream|p(?:Sync)?)\\s*\\(|o(?:nstructor\\s*(?:\\W*\\s*_load|\\[)|pyFile(?:Sync)?\\s*\\())|f(?:(?:(?:s(?:(?:yncS)?|tatS)|datas(?:yncS)?)ync|ch(?:mod|own)(?:Sync)?)\\s*\\(|u(?:nction\\s*\\(\\s*\\)\\s*{|times(?:Sync)?\\s*\\())|r(?:e(?:(?:ad(?:(?:File|link|dir)?Sync|v(?:Sync)?)|nameSync)\\s*\\(|quire\\s*(?:\\W*\\s*main|\\[))|m(?:Sync)?\\s*\\()|process\\s*(?:\\W*\\s*(?:mainModule|binding)|\\[)|t(?:his\\.constructor|runcateSync\\s*\\()|_(?:\\$\\$ND_FUNC\\$\\$_|_js_function)|global\\s*(?:\\W*\\s*process|\\[)|String\\s*\\.\\s*fromCharCode|binding\\s*\\[)", - "options": { - "case_sensitive": true, - "min_length": 3 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-934-101", - "name": "Node.js Injection Attack 2/2", - "tags": { - "type": "js_code_injection", - "crs_id": "934101", - "category": "attack_attempt", - "confidence": "1", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:w(?:atch|rite)|(?:spaw|ope)n|exists|close|fork|read)\\s*\\(", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-941-110", - "name": "XSS Filter - Category 1: Script Tag Vector", - "tags": { - "type": "xss", - "crs_id": "941110", - "category": "attack_attempt", - "cwe": "80", - "capec": "1000/152/242/63/591", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "referer" - ] - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "]*>[\\s\\S]*?", - "options": { - "case_sensitive": false, - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls", - "urlDecodeUni" - ] - }, - { - "id": "crs-941-120", - "name": "XSS Filter - Category 2: Event Handler Vector", - "tags": { - "type": "xss", - "crs_id": "941120", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "referer" - ] - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bon(?:d(?:r(?:ag(?:en(?:ter|d)|leave|start|over)?|op)|urationchange|blclick)|s(?:e(?:ek(?:ing|ed)|arch|lect)|u(?:spend|bmit)|talled|croll|how)|m(?:ouse(?:(?:lea|mo)ve|o(?:ver|ut)|enter|down|up)|essage)|p(?:a(?:ge(?:hide|show)|(?:st|us)e)|lay(?:ing)?|rogress|aste|ointer(?:cancel|down|enter|leave|move|out|over|rawupdate|up))|c(?:anplay(?:through)?|o(?:ntextmenu|py)|hange|lick|ut)|a(?:nimation(?:iteration|start|end)|(?:fterprin|bor)t|uxclick|fterscriptexecute)|t(?:o(?:uch(?:cancel|start|move|end)|ggle)|imeupdate)|f(?:ullscreen(?:change|error)|ocus(?:out|in)?|inish)|(?:(?:volume|hash)chang|o(?:ff|n)lin)e|b(?:efore(?:unload|print)|lur)|load(?:ed(?:meta)?data|start|end)?|r(?:es(?:ize|et)|atechange)|key(?:press|down|up)|w(?:aiting|heel)|in(?:valid|put)|e(?:nded|rror)|unload)[\\s\\x0B\\x09\\x0C\\x3B\\x2C\\x28\\x3B]*?=[^=]", - "options": { - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls", - "urlDecodeUni" - ] - }, - { - "id": "crs-941-140", - "name": "XSS Filter - Category 4: Javascript URI Vector", - "tags": { - "type": "xss", - "crs_id": "941140", - "category": "attack_attempt", - "cwe": "84", - "capec": "1000/152/242/63/591/244", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "referer" - ] - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "[a-z]+=(?:[^:=]+:.+;)*?[^:=]+:url\\(javascript", - "options": { - "min_length": 18 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls", - "urlDecodeUni" - ] - }, - { - "id": "crs-941-170", - "name": "NoScript XSS InjectionChecker: Attribute Injection", - "tags": { - "type": "xss", - "crs_id": "941170", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "referer" - ] - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:\\W|^)(?:javascript:(?:[\\s\\S]+[=\\x5c\\(\\[\\.<]|[\\s\\S]*?(?:\\bname\\b|\\x5c[ux]\\d)))|@\\W*?i\\W*?m\\W*?p\\W*?o\\W*?r\\W*?t\\W*?(?:/\\*[\\s\\S]*?)?(?:[\\\"']|\\W*?u\\W*?r\\W*?l[\\s\\S]*?\\()|[^-]*?-\\W*?m\\W*?o\\W*?z\\W*?-\\W*?b\\W*?i\\W*?n\\W*?d\\W*?i\\W*?n\\W*?g[^:]*?:\\W*?u\\W*?r\\W*?l[\\s\\S]*?\\(", - "options": { - "min_length": 6 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls", - "urlDecodeUni" - ] - }, - { - "id": "crs-941-180", - "name": "Node-Validator Deny List Keywords", - "tags": { - "type": "xss", - "crs_id": "941180", - "category": "attack_attempt", - "cwe": "79", - "capec": "1000/152/242/63/591", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "options": { - "enforce_word_boundary": true - }, - "list": [ - "document.cookie", - "document.write", - ".parentnode", - ".innerhtml", - "window.location", - "-moz-binding" - ] - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "removeNulls", - "lowercase" - ] - }, - { - "id": "crs-941-200", - "name": "IE XSS Filters - Attack Detected via vmlframe tag", - "tags": { - "type": "xss", - "crs_id": "941200", - "category": "attack_attempt", - "cwe": "80", - "capec": "1000/152/242/63/591", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:<.*[:]?vmlframe.*?[\\s/+]*?src[\\s/+]*=)", - "options": { - "case_sensitive": true, - "min_length": 13 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-941-210", - "name": "IE XSS Filters - Obfuscated Attack Detected via javascript injection", - "tags": { - "type": "xss", - "crs_id": "941210", - "category": "attack_attempt", - "cwe": "80", - "capec": "1000/152/242/63/591", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:(?:j|&#x?0*(?:74|4A|106|6A);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:a|&#x?0*(?:65|41|97|61);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:v|&#x?0*(?:86|56|118|76);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:a|&#x?0*(?:65|41|97|61);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:s|&#x?0*(?:83|53|115|73);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:c|&#x?0*(?:67|43|99|63);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:r|&#x?0*(?:82|52|114|72);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:i|&#x?0*(?:73|49|105|69);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:p|&#x?0*(?:80|50|112|70);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:t|&#x?0*(?:84|54|116|74);?)(?:\\t|\\n|\\r|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?::|&(?:#x?0*(?:58|3A);?|colon;)).)", - "options": { - "case_sensitive": true, - "min_length": 12 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-941-220", - "name": "IE XSS Filters - Obfuscated Attack Detected via vbscript injection", - "tags": { - "type": "xss", - "crs_id": "941220", - "category": "attack_attempt", - "cwe": "80", - "capec": "1000/152/242/63/591", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:(?:v|&#x?0*(?:86|56|118|76);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:b|&#x?0*(?:66|42|98|62);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:s|&#x?0*(?:83|53|115|73);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:c|&#x?0*(?:67|43|99|63);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:r|&#x?0*(?:82|52|114|72);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:i|&#x?0*(?:73|49|105|69);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:p|&#x?0*(?:80|50|112|70);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?:t|&#x?0*(?:84|54|116|74);?)(?:\\t|&(?:#x?0*(?:9|13|10|A|D);?|tab;|newline;))*(?::|&(?:#x?0*(?:58|3A);?|colon;)).)", - "options": { - "case_sensitive": true, - "min_length": 10 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-941-230", - "name": "IE XSS Filters - Attack Detected via embed tag", - "tags": { - "type": "xss", - "crs_id": "941230", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "]", - "options": { - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-941-300", - "name": "IE XSS Filters - Attack Detected via object tag", - "tags": { - "type": "xss", - "crs_id": "941300", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": ")|<.*\\+AD4-", - "options": { - "case_sensitive": true, - "min_length": 6 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-941-360", - "name": "JSFuck / Hieroglyphy obfuscation detected", - "tags": { - "type": "xss", - "crs_id": "941360", - "category": "attack_attempt", - "cwe": "87", - "capec": "1000/152/242/63/591/199", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "![!+ ]\\[\\]", - "options": { - "case_sensitive": true, - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-941-390", - "name": "Javascript method detected", - "tags": { - "type": "xss", - "crs_id": "941390", - "category": "attack_attempt", - "confidence": "1", - "cwe": "79", - "capec": "1000/152/242/63/591", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?i:eval|settimeout|setinterval|new\\s+Function|alert|prompt)[\\s+]*\\([^\\)]", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-100", - "name": "SQL Injection Attack Detected via libinjection", - "tags": { - "type": "sql_injection", - "crs_id": "942100", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ] - }, - "operator": "is_sqli" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "crs-942-160", - "name": "Detects blind sqli tests using sleep() or benchmark()", - "tags": { - "type": "sql_injection", - "crs_id": "942160", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66/7", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:sleep\\(\\s*?\\d*?\\s*?\\)|benchmark\\(.*?\\,.*?\\))", - "options": { - "case_sensitive": true, - "min_length": 7 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-240", - "name": "Detects MySQL charset switch and MSSQL DoS attempts", - "tags": { - "type": "sql_injection", - "crs_id": "942240", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66/7", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:[\\\"'`](?:;*?\\s*?waitfor\\s+(?:delay|time)\\s+[\\\"'`]|;.*?:\\s*?goto)|alter\\s*?\\w+.*?cha(?:racte)?r\\s+set\\s+\\w+)", - "options": { - "min_length": 7 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-250", - "name": "Detects MATCH AGAINST, MERGE and EXECUTE IMMEDIATE injections", - "tags": { - "type": "sql_injection", - "crs_id": "942250", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:merge.*?using\\s*?\\(|execute\\s*?immediate\\s*?[\\\"'`]|match\\s*?[\\w(?:),+-]+\\s*?against\\s*?\\()", - "options": { - "case_sensitive": true, - "min_length": 11 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-270", - "name": "Basic SQL injection", - "tags": { - "type": "sql_injection", - "crs_id": "942270", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "union.*?select.*?from", - "options": { - "min_length": 15 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-280", - "name": "SQL Injection with delay functions", - "tags": { - "type": "sql_injection", - "crs_id": "942280", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66/7", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:;\\s*?shutdown\\s*?(?:[#;{]|\\/\\*|--)|waitfor\\s*?delay\\s?[\\\"'`]+\\s?\\d|select\\s*?pg_sleep)", - "options": { - "min_length": 10 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-290", - "name": "Finds basic MongoDB SQL injection attempts", - "tags": { - "type": "nosql_injection", - "crs_id": "942290", - "category": "attack_attempt", - "cwe": "943", - "capec": "1000/152/248/676", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:(?:\\[?\\$(?:(?:s(?:lic|iz)|wher)e|e(?:lemMatch|xists|q)|n(?:o[rt]|in?|e)|l(?:ike|te?)|t(?:ext|ype)|a(?:ll|nd)|jsonSchema|between|regex|x?or|div|mod)\\]?)\\b)", - "options": { - "case_sensitive": true, - "min_length": 3 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "keys_only" - ] - }, - { - "id": "crs-942-360", - "name": "Detects concatenated basic SQL injection and SQLLFI attempts", - "tags": { - "type": "sql_injection", - "crs_id": "942360", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66/470", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:^[\\W\\d]+\\s*?(?:alter\\s*(?:a(?:(?:pplication\\s*rol|ggregat)e|s(?:ymmetric\\s*ke|sembl)y|u(?:thorization|dit)|vailability\\s*group)|c(?:r(?:yptographic\\s*provider|edential)|o(?:l(?:latio|um)|nversio)n|ertificate|luster)|s(?:e(?:rv(?:ice|er)|curity|quence|ssion|arch)|y(?:mmetric\\s*key|nonym)|togroup|chema)|m(?:a(?:s(?:ter\\s*key|k)|terialized)|e(?:ssage\\s*type|thod)|odule)|l(?:o(?:g(?:file\\s*group|in)|ckdown)|a(?:ngua|r)ge|ibrary)|t(?:(?:abl(?:espac)?|yp)e|r(?:igger|usted)|hreshold|ext)|p(?:a(?:rtition|ckage)|ro(?:cedur|fil)e|ermission)|d(?:i(?:mension|skgroup)|atabase|efault|omain)|r(?:o(?:l(?:lback|e)|ute)|e(?:sourc|mot)e)|f(?:u(?:lltext|nction)|lashback|oreign)|e(?:xte(?:nsion|rnal)|(?:ndpoi|ve)nt)|in(?:dex(?:type)?|memory|stance)|b(?:roker\\s*priority|ufferpool)|x(?:ml\\s*schema|srobject)|w(?:ork(?:load)?|rapper)|hi(?:erarchy|stogram)|o(?:perator|utline)|(?:nicknam|queu)e|us(?:age|er)|group|java|view)|union\\s*(?:(?:distin|sele)ct|all))\\b|\\b(?:(?:(?:trunc|cre|upd)at|renam)e|(?:inser|selec)t|de(?:lete|sc)|alter|load)\\s+(?:group_concat|load_file|char)\\b\\s*\\(?|[\\s(]load_file\\s*?\\(|[\\\"'`]\\s+regexp\\W)", - "options": { - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-942-500", - "name": "MySQL in-line comment detected", - "tags": { - "type": "sql_injection", - "crs_id": "942500", - "category": "attack_attempt", - "cwe": "89", - "capec": "1000/152/248/66", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:/\\*[!+](?:[\\w\\s=_\\-(?:)]+)?\\*/)", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-943-100", - "name": "Possible Session Fixation Attack: Setting Cookie Values in HTML", - "tags": { - "type": "http_protocol_violation", - "crs_id": "943100", - "category": "attack_attempt", - "cwe": "384", - "capec": "1000/225/21/593/61", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i:\\.cookie\\b.*?;\\W*?(?:expires|domain)\\W*?=|\\bhttp-equiv\\W+set-cookie\\b)", - "options": { - "case_sensitive": true, - "min_length": 15 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-944-100", - "name": "Remote Command Execution: Suspicious Java class detected", - "tags": { - "type": "java_code_injection", - "crs_id": "944100", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "java\\.lang\\.(?:runtime|processbuilder)", - "options": { - "case_sensitive": true, - "min_length": 17 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-944-110", - "name": "Remote Command Execution: Java process spawn (CVE-2017-9805)", - "tags": { - "type": "java_code_injection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:unmarshaller|base64data|java\\.).*(?:runtime|processbuilder)", - "options": { - "case_sensitive": false, - "min_length": 13 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "crs-944-130", - "name": "Suspicious Java class detected", - "tags": { - "type": "java_code_injection", - "crs_id": "944130", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "list": [ - "com.opensymphony.xwork2", - "com.sun.org.apache", - "java.io.bufferedinputstream", - "java.io.bufferedreader", - "java.io.bytearrayinputstream", - "java.io.bytearrayoutputstream", - "java.io.chararrayreader", - "java.io.datainputstream", - "java.io.file", - "java.io.fileoutputstream", - "java.io.filepermission", - "java.io.filewriter", - "java.io.filterinputstream", - "java.io.filteroutputstream", - "java.io.filterreader", - "java.io.inputstream", - "java.io.inputstreamreader", - "java.io.linenumberreader", - "java.io.objectoutputstream", - "java.io.outputstream", - "java.io.pipedoutputstream", - "java.io.pipedreader", - "java.io.printstream", - "java.io.pushbackinputstream", - "java.io.reader", - "java.io.stringreader", - "java.lang.class", - "java.lang.integer", - "java.lang.number", - "java.lang.object", - "java.lang.process", - "java.lang.reflect", - "java.lang.runtime", - "java.lang.string", - "java.lang.stringbuilder", - "java.lang.system", - "javax.script.scriptenginemanager", - "org.apache.commons", - "org.apache.struts", - "org.apache.struts2", - "org.omg.corba", - "java.beans.xmldecode" - ], - "options": { - "enforce_word_boundary": true - } - }, - "operator": "phrase_match" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "crs-944-260", - "name": "Remote Command Execution: Malicious class-loading payload", - "tags": { - "type": "java_code_injection", - "crs_id": "944260", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "confidence": "1" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:class\\.module\\.classLoader\\.resources\\.context\\.parent\\.pipeline|springframework\\.context\\.support\\.FileSystemXmlApplicationContext)", - "options": { - "case_sensitive": true, - "min_length": 58 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-000-001", - "name": "Look for Cassandra injections", - "tags": { - "type": "nosql_injection", - "category": "attack_attempt", - "cwe": "943", - "capec": "1000/152/248/676", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - }, - { - "address": "server.request.headers.no_cookies" - } - ], - "regex": "\\ballow\\s+filtering\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeComments" - ] - }, - { - "id": "dog-000-002", - "name": "OGNL - Look for formatting injection patterns", - "tags": { - "type": "java_code_injection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - }, - { - "address": "server.request.headers.no_cookies" - } - ], - "regex": "[#%$]{(?:[^}]+[^\\w\\s}\\-_][^}]+|\\d+-\\d+)}", - "options": { - "case_sensitive": true - } - } - } - ], - "transformers": [] - }, - { - "id": "dog-000-003", - "name": "OGNL - Detect OGNL exploitation primitives", - "tags": { - "type": "java_code_injection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "[@#]ognl", - "options": { - "case_sensitive": true - } - } - } - ], - "transformers": [] - }, - { - "id": "dog-000-004", - "name": "Spring4Shell - Attempts to exploit the Spring4shell vulnerability", - "tags": { - "type": "exploit_detection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "confidence": "1" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.body" - } - ], - "regex": "^class\\.module\\.classLoader\\.", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [ - "keys_only" - ] - }, - { - "id": "dog-000-005", - "name": "Node.js: Prototype pollution through __proto__", - "tags": { - "type": "js_code_injection", - "category": "attack_attempt", - "cwe": "1321", - "capec": "1000/152/242", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - } - ], - "regex": "^__proto__$" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "keys_only" - ] - }, - { - "id": "dog-000-006", - "name": "Node.js: Prototype pollution through constructor.prototype", - "tags": { - "type": "js_code_injection", - "category": "attack_attempt", - "cwe": "1321", - "capec": "1000/152/242", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - } - ], - "regex": "^constructor$" - }, - "operator": "match_regex" - }, - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - } - ], - "regex": "^prototype$" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "keys_only" - ] - }, - { - "id": "dog-000-007", - "name": "Server side template injection: Velocity & Freemarker", - "tags": { - "type": "java_code_injection", - "category": "attack_attempt", - "cwe": "1336", - "capec": "1000/152/242/19", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "#(?:set|foreach|macro|parse|if)\\(.*\\)|<#assign.*>" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-68x", - "name": "xorbot", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "xorbot", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bmasjesu\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-001", - "name": "BurpCollaborator OOB domain", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "tool_name": "BurpCollaborator", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:burpcollaborator\\.net|oastify\\.com)\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-002", - "name": "Qualys OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Qualys", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bqualysperiscope\\.com\\b|\\.oscomm\\." - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-003", - "name": "Probely OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Probely", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bprbly\\.win\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-004", - "name": "Known malicious out-of-band interaction domain", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:webhook\\.site|\\.canarytokens\\.com|vii\\.one|act1on3\\.ru|gdsburp\\.com|arcticwolf\\.net|oob\\.li|htbiw\\.com|h4\\.vc|mochan\\.cloud|imshopping\\.com|bootstrapnodejs\\.com|mooo-ng\\.com|securitytrails\\.com|canyouhackit\\.io|7bae\\.xyz)\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-005", - "name": "Known suspicious out-of-band interaction domain", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:\\.ngrok\\.io|requestbin\\.com|requestbin\\.net)\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-006", - "name": "Rapid7 OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Rapid7", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bappspidered\\.rapid7\\." - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-007", - "name": "Interact.sh OOB domain", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "tool_name": "interact.sh", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:interact\\.sh|oast\\.(?:pro|live|site|online|fun|me)|indusfacefinder\\.in|where\\.land|syhunt\\.net|tssrt\\.de|boardofcyber\\.io|assetnote-callback\\.com|praetorianlabs\\.dev|netspi\\.sh)\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-008", - "name": "Netsparker OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Netsparker", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b(?:\\.|(?:\\\\|&#)(?:0*46|x0*2e);)?r87(?:\\.|(?:\\\\|&#)(?:0*46|x0*2e);)(?:me|com)\\b", - "options": { - "case_sensitive": false, - "min_length": 7 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-009", - "name": "WhiteHat Security OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "WhiteHatSecurity", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bwhsec(?:\\.|(?:\\\\|&#)(?:0*46|x0*2e);)us\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-010", - "name": "Nessus OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Nessus", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\b\\.nessus\\.org\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-011", - "name": "Watchtowr OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "Watchtowr", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bwatchtowr\\.com\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-012", - "name": "AppCheck NG OOB domain", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "tool_name": "AppCheckNG", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\bptst\\.io\\b", - "options": { - "case_sensitive": false, - "min_length": 7 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-013", - "name": "Public PoC for CVE-2025-24813", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "/iSee857/session", - "options": { - "case_sensitive": false, - "min_length": 16 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-913-014", - "name": "Exploit attempt for Next.js Middleware Exploit (CVE-2025-29927)", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-middleware-subrequest" - ] - } - ], - "regex": ".*", - "options": { - "min_length": 1 - } - }, - "operator": "match_regex" - }, - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "x-middleware-subrequest" - ] - } - ], - "regex": "[0-9a-fA-F]{40}|\\[\\w+\\]" - }, - "operator": "!match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-920-001", - "name": "JWT authentication bypass", - "tags": { - "type": "http_protocol_violation", - "category": "attack_attempt", - "cwe": "287", - "capec": "1000/225/115", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.cookies" - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "authorization" - ] - } - ], - "regex": "^(?:Bearer )?ey[A-Za-z0-9+_\\-/]*([QY][UW]x[Hn]Ij([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[\\x2b\\x2f-9A-Za-z]ICJ[Ou][Tb][02]5[Fl]|[QY][UW]x[Hn]I([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[048AEIMQUYcgkosw]gOiAi[Tb][km]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b][km]9[Ou][RZ][Q-Za-f]|[\\x2b\\x2f-9A-Za-z]{2}[159BFJNRVZdhlptx][Bh][Tb][EG]ci([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[CSiy]A6I[km]5[Pv][Tb][km][U-X]|[\\x2b\\x2f-9A-Za-z][02EGUWkm]F[Ms][RZ]y([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[048AEIMQUYcgkosw]gOiJ[Ou][Tb][02]5[Fl]|[QY][UW]x[Hn]Ijoi[Tb][km]9[Ou][RZ][Q-Za-f]|[\\x2b\\x2f-9A-Za-z]{2}[159BFJNRVZdhlptx][Bh][Tb][EG]ci([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[048AEIMQUYcgkosw]gOiAi[Tb][km]9[Ou][RZ][Q-Za-f]|[\\x2b\\x2f-9A-Za-z][02EGUWkm]F[Ms][RZ]yI6([048ACEIMQSUYcgikoswy]|[\\x2b\\x2f-9A-Za-z]I)*[CSiy]Ai[Tb][km]9[Ou][RZ][Q-Za-f])[A-Za-z0-9+-/]*\\.[A-Za-z0-9+_\\-/]+\\.(?:[A-Za-z0-9+_\\-/]+)?$", - "options": { - "case_sensitive": true - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-931-001", - "name": "RFI: URL Payload to well known RFI target", - "tags": { - "type": "rfi", - "category": "attack_attempt", - "cwe": "98", - "capec": "1000/152/175/253/193", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^(?i:file|ftps?|https?).*/rfiinc\\.txt\\?+$", - "options": { - "case_sensitive": true, - "min_length": 17 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-932-100", - "name": "Shell spawn executing network command", - "tags": { - "type": "command_injection", - "category": "attack_attempt", - "cwe": "77", - "capec": "1000/152/248/88", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:(?:['\"\\x60({|;&]|(?:^|['\"\\x60({|;&])(?:cmd(?:\\.exe)?\\s+(?:/\\w(?::\\w+)?\\s+)*))(?:ping|curl|wget|telnet)|\\bnslookup)[\\s,]", - "options": { - "case_sensitive": true, - "min_length": 5 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-934-001", - "name": "XXE - XML file loads external entity", - "tags": { - "type": "xxe", - "category": "attack_attempt", - "cwe": "91", - "capec": "1000/152/248/250", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.body" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?:<\\?xml[^>]*>.*)]+SYSTEM\\s+[^>]+>", - "options": { - "case_sensitive": false, - "min_length": 24 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "dog-941-001", - "name": "XSS in source property", - "tags": { - "type": "xss", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "referer" - ] - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "<(?:iframe|esi:include)(?:(?:\\s|/)*\\w+=[\"'\\w]+)*(?:\\s|/)*src(?:doc)?=[\"']?(?:data:|javascript:|http:|dns:|//)[^\\s'\"]+['\"]?", - "options": { - "min_length": 14 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls", - "urlDecodeUni" - ] - }, - { - "id": "dog-942-001", - "name": "Blind XSS callback domains", - "tags": { - "type": "xss", - "category": "attack_attempt", - "cwe": "83", - "capec": "1000/152/242/63/591/243", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "https?:\\/\\/(?:.*\\.)?(?:bxss\\.(?:in|me)|xss\\.ht|js\\.rip)", - "options": { - "case_sensitive": false - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "nfd-000-001", - "name": "Detect common directory discovery scans", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "phrase_match", - "parameters": { - "options": { - "enforce_word_boundary": true - }, - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "list": [ - "/wordpress/", - "/etc/", - "/login.php", - "/install.php", - "/administrator", - "/admin.php", - "/wp-config", - "/phpmyadmin", - "/fckeditor", - "/mysql", - "/manager/html", - ".htaccess", - "/config.php", - "/configuration", - "/cgi-bin/php", - "/search.php", - "/tinymce", - "/tiny_mce", - "/settings.php", - "../../..", - "/install/", - "/download.php", - "/webdav", - "/forum.php", - "/user.php", - "/style.php", - "/jmx-console", - "/modules.php", - "/include.php", - "/default.asp", - "/help.php", - "/database.yml", - "/database.yml.pgsql", - "/database.yml.sqlite3", - "/database.yml.sqlite", - "/database.yml.mysql", - ".%2e/", - "/view.php", - "/header.php", - "/search.asp", - "%5c%5c", - "/server/php/", - "/invoker/jmxinvokerservlet", - "/phpmyadmin/index.php", - "/data/admin/allowurl.txt", - "/verify.php", - "/misc/ajax.js", - "/.idea", - "/module.php", - "/backup.rar", - "/backup.tar", - "/backup.zip", - "/backup.7z", - "/backup.gz", - "/backup.tgz", - "/backup.tar.gz", - "waitfor%20delay", - "/calendar.php", - "/news.php", - "/dompdf.php", - "))))))))))))))))", - "/web.config", - "tree.php", - "/cgi-bin-sdb/printenv", - "/comments.php", - "/detail.asp", - "/license.txt", - "/admin.asp", - "/auth.php", - "/list.php", - "/content.php", - "/mod.php", - "/mini.php", - "/install.pgsql", - "/install.mysql", - "/install.sqlite", - "/install.sqlite3", - "/install.txt", - "/install.md", - "/doku.php", - "/main.asp", - "/myadmin", - "/force-download.php", - "/iisprotect/admin", - "/.gitignore", - "/print.php", - "/common.php", - "/mainfile.php", - "/functions.php", - "/scripts/setup.php", - "/faq.php", - "/op/op.login.php", - "/home.php", - "/includes/hnmain.inc.php3", - "/preview.php", - "/dump.rar", - "/dump.tar", - "/dump.zip", - "/dump.7z", - "/dump.gz", - "/dump.tgz", - "/dump.tar.gz", - "/thumbnail.php", - "/sendcard.php", - "/global.asax", - "/directory.php", - "/footer.php", - "/error.asp", - "/forum.asp", - "/save.php", - "/htmlsax3.php", - "/adm/krgourl.php", - "/includes/converter.inc.php", - "/nucleus/libs/pluginadmin.php", - "/base_qry_common.php", - "/fileadmin", - "/bitrix/admin/", - "/adm.php", - "/util/barcode.php", - "/action.php", - "/rss.asp", - "/downloads.php", - "/page.php", - "/snarf_ajax.php", - "/fck/editor", - "/sendmail.php", - "/detail.php", - "/iframe.php", - "/swfupload.swf", - "/jenkins/login", - "/phpmyadmin/main.php", - "/phpmyadmin/scripts/setup.php", - "/user/index.php", - "/checkout.php", - "/process.php", - "/ks_inc/ajax.js", - "/export.php", - "/register.php", - "/cart.php", - "/console.php", - "/friend.php", - "/readmsg.php", - "/install.asp", - "/dagent/downloadreport.asp", - "/system/index.php", - "/core/changelog.txt", - "/js/util.js", - "/interna.php", - "/gallery.php", - "/links.php", - "/data/admin/ver.txt", - "/language/zh-cn.xml", - "/productdetails.asp", - "/admin/template/article_more/config.htm", - "/components/com_moofaq/includes/file_includer.php", - "/licence.txt", - "/rss.xsl", - "/vtigerservice.php", - "/mysql/main.php", - "/passwiki.php", - "/scr/soustab.php", - "/global.php", - "/email.php", - "/user.asp", - "/msd", - "/products.php", - "/cultbooking.php", - "/cron.php", - "/static/js/admincp.js", - "/comment.php", - "/maintainers", - "/modules/plain/adminpart/addplain.php", - "/wp-content/plugins/ungallery/source_vuln.php", - "/upgrade.txt", - "/category.php", - "/index_logged.php", - "/members.asp", - "/script/html.js", - "/images/ad.js", - "/awstats/awstats.pl", - "/includes/esqueletos/skel_null.php", - "/modules/profile/user.php", - "/window_top.php", - "/openbrowser.php", - "/thread.php", - "tinfoil_xss", - "/includes/include.php", - "/urheber.php", - "/header.inc.php", - "/mysqldumper", - "/display.php", - "/website.php", - "/stats.php", - "/assets/plugins/mp3_id/mp3_id.php", - "/siteminderagent/forms/smpwservices.fcc", - "/eval-stdin.php" - ] - } - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "nfd-000-002", - "name": "Detect failed attempt to fetch readme files", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "readme\\.[\\.a-z0-9]+$", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-003", - "name": "Detect failed attempt to fetch Java EE resource files", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "^(?:.*web\\-inf)(?:.*web\\.xml).*$", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-004", - "name": "Detect failed attempt to fetch code files", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "\\.(java|pyc?|rb|class)\\b", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-005", - "name": "Detect failed attempt to fetch source code archives", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "\\.(sql|log|ndb|gz|zip|tar\\.gz|tar|regVV|reg|conf|bz2|ini|db|war|bat|inc|btr|server|ds|conf|config|admin|master|sln|bak)\\b(?:[^.]|$)", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-006", - "name": "Detect failed attempt to fetch sensitive files", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "\\.(cgi|bat|dll|exe|key|cert|crt|pem|der|pkcs|pkcs|pkcs[0-9]*|nsf|jsa|war|java|class|vb|vba|so|git|svn|hg|cvs)([?#&/]|$)", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-007", - "name": "Detect failed attempt to fetch archives", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "/[\\d\\-_]*\\.(rar|tar|zip|7z|gz|tgz|tar.gz)", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-008", - "name": "Detect failed attempt to trigger incorrect application behavior", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "(/(administrator/components/com.*\\.php|response\\.write\\(.+\\))|select\\(.+\\)from|\\(.*sleep\\(.+\\)|(%[a-zA-Z0-9]{2}[a-zA-Z]{0,1})+\\))", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-009", - "name": "Detect failed attempt to leak the structure of the application", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "/(login\\.rol|LICENSE|[\\w-]+\\.(plx|pwd))$", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "nfd-000-010", - "name": "Detect failed attempts to find API documentation", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.response.status" - } - ], - "regex": "^404$", - "options": { - "case_sensitive": true - } - } - }, - { - "operator": "match_regex", - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - } - ], - "regex": "(?:^|/)(?:swagger|api[-/]?docs?|openapi)\\b", - "options": { - "case_sensitive": false - } - } - } - ], - "transformers": [] - }, - { - "id": "rasp-930-100", - "name": "Local file inclusion exploit", - "tags": { - "type": "lfi", - "category": "vulnerability_trigger", - "cwe": "22", - "capec": "1000/255/153/126", - "confidence": "1", - "module": "rasp" - }, - "conditions": [ - { - "parameters": { - "resource": [ - { - "address": "server.io.fs.file" - } - ], - "params": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ] - }, - "operator": "lfi_detector@v2" - } - ], - "transformers": [], - "on_match": [ - "stack_trace" - ] - }, - { - "id": "rasp-932-100", - "name": "Shell command injection exploit", - "tags": { - "type": "command_injection", - "category": "vulnerability_trigger", - "cwe": "77", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "rasp" - }, - "conditions": [ - { - "parameters": { - "resource": [ - { - "address": "server.sys.shell.cmd" - } - ], - "params": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ] - }, - "operator": "shi_detector" - } - ], - "transformers": [], - "on_match": [ - "stack_trace" - ] - }, - { - "id": "rasp-932-110", - "name": "OS command injection exploit", - "tags": { - "type": "command_injection", - "category": "vulnerability_trigger", - "cwe": "77", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "rasp" - }, - "conditions": [ - { - "parameters": { - "resource": [ - { - "address": "server.sys.exec.cmd" - } - ], - "params": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ] - }, - "operator": "cmdi_detector" - } - ], - "transformers": [], - "on_match": [ - "stack_trace" - ] - }, - { - "id": "rasp-934-100", - "name": "Server-side request forgery exploit", - "tags": { - "type": "ssrf", - "category": "vulnerability_trigger", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "0", - "module": "rasp" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.io.net.url" - } - ], - "regex": "^(jar:)?https?:\\/\\/\\W*([0-9oq]{1,5}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|[0-9]{1,10}|(\\[)?[:0-9a-f\\.x]{2,}(\\])?|metadata\\.google\\.internal|(?:[a-z0-9:@\\.\\-]*\\.)?(?:burpcollaborator\\.net|localtest\\.me|mail\\.ebc\\.apple\\.com|bugbounty\\.dod\\.network|.*\\.[nx]ip\\.io|oastify\\.com|oast\\.(?:pro|live|site|online|fun|me)|sslip\\.io|requestbin\\.com|requestbin\\.net|hookbin\\.com|webhook\\.site|canarytokens\\.com|interact\\.sh|ngrok\\.io|bugbounty\\.click|prbly\\.win|qualysperiscope\\.com|vii\\.one|act1on3\\.ru|ifconfig\\.pro|dnslog\\.\\w+))(:[0-9]{1,5})?(\\/[^:@]*)?$", - "options": { - "case_sensitive": false - } - }, - "operator": "match_regex" - }, - { - "parameters": { - "resource": [ - { - "address": "server.io.net.url" - } - ], - "params": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ] - }, - "operator": "ssrf_detector" - } - ], - "transformers": [], - "on_match": [ - "stack_trace" - ] - }, - { - "id": "rasp-942-100", - "name": "SQL injection exploit", - "tags": { - "type": "sql_injection", - "category": "vulnerability_trigger", - "cwe": "89", - "capec": "1000/152/248/66", - "confidence": "1", - "module": "rasp" - }, - "conditions": [ - { - "parameters": { - "resource": [ - { - "address": "server.db.statement" - } - ], - "params": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "db_type": [ - { - "address": "server.db.system" - } - ] - }, - "operator": "sqli_detector@v2" - } - ], - "transformers": [], - "on_match": [ - "stack_trace" - ] - }, - { - "id": "sqr-000-001", - "name": "SSRF: Try to access the credential manager of the main cloud services", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i)^\\W*((http|ftp)s?://)?\\W*((::f{4}:)?(169|(0x)?0*a9|0+251)\\.?(254|(0x)?0*fe|0+376)[0-9a-fx\\.:]+|metadata\\.google\\.internal|metadata\\.goog)\\W*/", - "options": { - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "sqr-000-002", - "name": "Server-side Javascript injection: Try to detect obvious JS injection", - "tags": { - "type": "js_code_injection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "require\\(['\"][\\w\\.]+['\"]\\)|process\\.\\w+\\([\\w\\.]*\\)|\\.toString\\(\\)", - "options": { - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [ - "removeNulls" - ] - }, - { - "id": "sqr-000-008", - "name": "Windows: Detect attempts to exfiltrate .ini files", - "tags": { - "type": "command_injection", - "category": "attack_attempt", - "cwe": "78", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i)[&|]\\s*type\\s+%\\w+%\\\\+\\w+\\.ini\\s*[&|]" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "sqr-000-009", - "name": "Linux: Detect attempts to exfiltrate passwd files", - "tags": { - "type": "command_injection", - "category": "attack_attempt", - "cwe": "78", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i)[&|]\\s*cat\\s*\\/etc\\/[\\w\\.\\/]*passwd\\s*[&|]" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "cmdLine" - ] - }, - { - "id": "sqr-000-010", - "name": "Windows: Detect attempts to timeout a shell", - "tags": { - "type": "command_injection", - "category": "attack_attempt", - "cwe": "78", - "capec": "1000/152/248/88", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(?i)[&|]\\s*timeout\\s+/t\\s+\\d+\\s*[&|]" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "sqr-000-011", - "name": "SSRF: Try to access internal OMI service (CVE-2021-38647)", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "http(s?):\\/\\/([A-Za-z0-9\\.\\-\\_]+|\\[[A-Fa-f0-9\\:]+\\]|):5986\\/wsman", - "options": { - "min_length": 4 - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "sqr-000-012", - "name": "SSRF: Detect SSRF attempt on internal service", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^(jar:)?(http|https):\\/\\/([0-9oq]{1,5}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}|[0-9]{1,10})(:[0-9]{1,5})?(\\/[^:@]*)?$" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "sqr-000-013", - "name": "SSRF: Detect SSRF attempts using IPv6 or octal/hexdecimal obfuscation", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^(jar:)?(http|https):\\/\\/((\\[)?[:0-9a-f\\.x]{2,}(\\])?)(:[0-9]{1,5})?(\\/[^:@]*)?$" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "sqr-000-014", - "name": "SSRF: Detect SSRF domain redirection bypass", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "grpc.server.request.message" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "(http|https):\\/\\/(?:.*\\.)?(?:burpcollaborator\\.net|localtest\\.me|mail\\.ebc\\.apple\\.com|bugbounty\\.dod\\.network|.*\\.[nx]ip\\.io|oastify\\.com|oast\\.(?:pro|live|site|online|fun|me)|sslip\\.io|requestbin\\.com|requestbin\\.net|hookbin\\.com|webhook\\.site|canarytokens\\.com|interact\\.sh|ngrok\\.io|bugbounty\\.click|prbly\\.win|qualysperiscope\\.com|vii\\.one|act1on3\\.ru|dnslog\\.\\w+)" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "sqr-000-015", - "name": "SSRF: Detect SSRF attempt using non HTTP protocol", - "tags": { - "type": "ssrf", - "category": "attack_attempt", - "cwe": "918", - "capec": "1000/225/115/664", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "^(jar:)?((file|netdoc):\\/\\/[\\\\\\/]+|(dict|gopher|ldap|sftp|tftp):\\/\\/.*:[0-9]{1,5})" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "lowercase" - ] - }, - { - "id": "sqr-000-017", - "name": "Log4shell: Attempt to exploit log4j CVE-2021-44228", - "tags": { - "type": "exploit_detection", - "category": "attack_attempt", - "cwe": "94", - "capec": "1000/152/242", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.uri.raw" - }, - { - "address": "server.request.query" - }, - { - "address": "server.request.body" - }, - { - "address": "server.request.path_params" - }, - { - "address": "server.request.headers.no_cookies" - }, - { - "address": "graphql.server.all_resolvers" - }, - { - "address": "graphql.server.resolver" - } - ], - "regex": "\\${[^j]*j[^n]*n[^d]*d[^i]*i[^:]*:[^}]*}" - }, - "operator": "match_regex" - } - ], - "transformers": [ - "unicode_normalize" - ] - }, - { - "id": "ua0-600-0xx", - "name": "Joomla exploitation tool", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Joomla exploitation tool", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "JDatabaseDriverMysqli" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-10x", - "name": "Nessus", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nessus", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)^Nessus(/|([ :]+SOAP))" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-12x", - "name": "Arachni", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Arachni", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^Arachni\\/v" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-13x", - "name": "Jorgee", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Jorgee", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bJorgee\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-14x", - "name": "Probely", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Probely", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bProbely\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-15x", - "name": "Metis", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Metis", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bmetis\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-16x", - "name": "SQL power injector", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "SQLPowerInjector", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "sql power injector" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-18x", - "name": "N-Stealth", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "N-Stealth", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bn-stealth\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-19x", - "name": "Brutus", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Brutus", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bbrutus\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-1xx", - "name": "Shellshock exploitation tool", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\(\\) \\{ :; *\\}" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-20x", - "name": "Netsparker", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Netsparker", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bnetsparker\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-22x", - "name": "JAASCois", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "JAASCois", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bjaascois\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-26x", - "name": "Nsauditor", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nsauditor", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bnsauditor\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-27x", - "name": "Paros", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Paros", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)Mozilla/.* Paros/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-28x", - "name": "DirBuster", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "DirBuster", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bdirbuster\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-29x", - "name": "Pangolin", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Pangolin", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bpangolin\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-2xx", - "name": "Qualys", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Qualys", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bqualys\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-30x", - "name": "SQLNinja", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "SQLNinja", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bsqlninja\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-31x", - "name": "Nikto", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nikto", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\(Nikto/[\\d\\.]+\\)" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-33x", - "name": "BlackWidow", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "BlackWidow", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bblack\\s?widow\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-34x", - "name": "Grendel-Scan", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Grendel-Scan", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bgrendel-scan\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-35x", - "name": "Havij", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Havij", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bhavij\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-36x", - "name": "w3af", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "w3af", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bw3af\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-37x", - "name": "Nmap", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nmap", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "nmap (nse|scripting engine|icap-client/)" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-39x", - "name": "Nessus Scripted", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nessus", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)^'?[a-z0-9_]+\\.nasl'?$" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-3xx", - "name": "Evil Scanner", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "EvilScanner", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bevilScanner\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-40x", - "name": "WebFuck", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "WebFuck", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bWebFuck\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-42x", - "name": "OpenVAS", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "OpenVAS", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)OpenVAS\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-43x", - "name": "Spider-Pig", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Spider-Pig", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "Powered by Spider-Pig by tinfoilsecurity\\.com" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-44x", - "name": "Zgrab", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Zgrab", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "Mozilla/\\d+.\\d+ zgrab" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-45x", - "name": "Zmeu", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Zmeu", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bZmEu\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-47x", - "name": "GoogleSecurityScanner", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "GoogleSecurityScanner", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bGoogleSecurityScanner\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-48x", - "name": "Commix", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Commix", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^commix\\/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-49x", - "name": "Gobuster", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Gobuster", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^gobuster\\/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-4xx", - "name": "CGIchk", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "CGIchk", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bcgichk\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-51x", - "name": "FFUF", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "FFUF", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)^Fuzz Faster U Fool\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-52x", - "name": "Nuclei", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nuclei", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)^Nuclei\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-53x", - "name": "Tsunami", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Tsunami", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bTsunamiSecurityScanner\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-54x", - "name": "Nimbostratus", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Nimbostratus", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bnimbostratus-bot\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-55x", - "name": "Datadog test scanner: user-agent", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Datadog Canary Test", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "grpc.server.request.metadata", - "key_path": [ - "dd-canary" - ] - } - ], - "regex": "^dd-test-scanner-log(?:$|/|\\s)" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-56x", - "name": "Datadog test scanner - blocking version: user-agent", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Datadog Canary Test", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - }, - { - "address": "grpc.server.request.metadata", - "key_path": [ - "dd-canary" - ] - } - ], - "regex": "^dd-test-scanner-log-block(?:$|/|\\s)" - }, - "operator": "match_regex" - } - ], - "transformers": [], - "on_match": [ - "block" - ] - }, - { - "id": "ua0-600-57x", - "name": "AlertLogic", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "AlertLogic", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bAlertLogic-MDR-" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-58x", - "name": "wfuzz", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "wfuzz", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bwfuzz\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-59x", - "name": "Detectify", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Detectify", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bdetectify\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-5xx", - "name": "Blind SQL Injection Brute Forcer", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "BSQLBF", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)\\bbsqlbf\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-60x", - "name": "masscan", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "masscan", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^masscan/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-61x", - "name": "WPScan", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "WPScan", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^wpscan\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-62x", - "name": "Aon pentesting services", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Aon", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^Aon/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-63x", - "name": "FeroxBuster", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "feroxbuster", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^feroxbuster/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-64x", - "name": "ddg_win", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "ddg_win", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bddg_win\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-65x", - "name": "ISS", - "tags": { - "type": "commercial_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "iss", - "confidence": "0", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bisscyberriskcrawler/\\d\\.\\d" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-66x", - "name": "BountyBot", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "bountybot", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bbountybot\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-67x", - "name": "ZumBot", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "zumbot", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "\\bzumbot\\b" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-6xx", - "name": "Stealthy scanner", - "tags": { - "type": "security_scanner", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "mozilla/4\\.0 \\(compatible(; msie (?:6\\.0; (?:win32|Windows NT 5\\.0)|4\\.0; Windows NT))?\\)", - "options": { - "case_sensitive": false - } - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-7xx", - "name": "SQLmap", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "SQLmap", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "^sqlmap/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - }, - { - "id": "ua0-600-9xx", - "name": "Skipfish", - "tags": { - "type": "attack_tool", - "category": "attack_attempt", - "cwe": "200", - "capec": "1000/118/169", - "tool_name": "Skipfish", - "confidence": "1", - "module": "waf" - }, - "conditions": [ - { - "parameters": { - "inputs": [ - { - "address": "server.request.headers.no_cookies", - "key_path": [ - "user-agent" - ] - } - ], - "regex": "(?i)mozilla/5\\.0 sf/" - }, - "operator": "match_regex" - } - ], - "transformers": [] - } - ], - "processors": [ - { - "id": "http-endpoint-fingerprint", - "generator": "http_endpoint_fingerprint", - "conditions": [], - "parameters": { - "mappings": [ - { - "method": [ - { - "address": "server.request.method" - } - ], - "uri_raw": [ - { - "address": "server.request.uri.raw" - } - ], - "body": [ - { - "address": "server.request.body" - } - ], - "query": [ - { - "address": "server.request.query" - } - ], - "output": "_dd.appsec.fp.http.endpoint" - } - ] - }, - "evaluate": true, - "output": true - }, - { - "id": "extract-content", - "generator": "extract_schema", - "conditions": [ - { - "operator": "equals", - "parameters": { - "inputs": [ - { - "address": "waf.context.processor", - "key_path": [ - "extract-schema" - ] - } - ], - "type": "boolean", - "value": true - } - } - ], - "parameters": { - "mappings": [ - { - "inputs": [ - { - "address": "server.request.body" - } - ], - "output": "_dd.appsec.s.req.body" - }, - { - "inputs": [ - { - "address": "server.request.cookies" - } - ], - "output": "_dd.appsec.s.req.cookies" - }, - { - "inputs": [ - { - "address": "server.request.query" - } - ], - "output": "_dd.appsec.s.req.query" - }, - { - "inputs": [ - { - "address": "server.request.path_params" - } - ], - "output": "_dd.appsec.s.req.params" - }, - { - "inputs": [ - { - "address": "server.response.body" - } - ], - "output": "_dd.appsec.s.res.body" - }, - { - "inputs": [ - { - "address": "graphql.server.all_resolvers" - } - ], - "output": "_dd.appsec.s.graphql.all_resolvers" - }, - { - "inputs": [ - { - "address": "graphql.server.resolver" - } - ], - "output": "_dd.appsec.s.graphql.resolver" - } - ], - "scanners": [ - { - "tags": { - "category": "payment" - } - }, - { - "tags": { - "category": "pii" - } - } - ] - }, - "evaluate": false, - "output": true - }, - { - "id": "extract-headers", - "generator": "extract_schema", - "conditions": [ - { - "operator": "equals", - "parameters": { - "inputs": [ - { - "address": "waf.context.processor", - "key_path": [ - "extract-schema" - ] - } - ], - "type": "boolean", - "value": true - } - } - ], - "parameters": { - "mappings": [ - { - "inputs": [ - { - "address": "server.request.headers.no_cookies" - } - ], - "output": "_dd.appsec.s.req.headers" - }, - { - "inputs": [ - { - "address": "server.response.headers.no_cookies" - } - ], - "output": "_dd.appsec.s.res.headers" - } - ], - "scanners": [ - { - "tags": { - "category": "credentials" - } - }, - { - "tags": { - "category": "pii" - } - } - ] - }, - "evaluate": false, - "output": true - }, - { - "id": "http-header-fingerprint", - "generator": "http_header_fingerprint", - "conditions": [], - "parameters": { - "mappings": [ - { - "headers": [ - { - "address": "server.request.headers.no_cookies" - } - ], - "output": "_dd.appsec.fp.http.header" - } - ] - }, - "evaluate": true, - "output": true - }, - { - "id": "http-network-fingerprint", - "generator": "http_network_fingerprint", - "conditions": [], - "parameters": { - "mappings": [ - { - "headers": [ - { - "address": "server.request.headers.no_cookies" - } - ], - "output": "_dd.appsec.fp.http.network" - } - ] - }, - "evaluate": true, - "output": true - }, - { - "id": "session-fingerprint", - "generator": "session_fingerprint", - "conditions": [], - "parameters": { - "mappings": [ - { - "cookies": [ - { - "address": "server.request.cookies" - } - ], - "session_id": [ - { - "address": "usr.session_id" - } - ], - "user_id": [ - { - "address": "usr.id" - } - ], - "output": "_dd.appsec.fp.session" - } - ] - }, - "evaluate": true, - "output": true - } - ], - "scanners": [ - { - "id": "406f8606-52c4-4663-8db9-df70f9e8766c", - "name": "ZIP Code", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:zip|postal)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "^[0-9]{5}(?:-[0-9]{4})?$", - "options": { - "case_sensitive": true, - "min_length": 5 - } - } - }, - "tags": { - "type": "zipcode", - "category": "address" - } - }, - { - "id": "JU1sRk3mSzqSUJn6GrVn7g", - "name": "American Express Card Scanner (4+4+4+3 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b3[47]\\d{2}(?:(?:\\s\\d{4}\\s\\d{4}\\s\\d{3})|(?:\\,\\d{4}\\,\\d{4}\\,\\d{3})|(?:-\\d{4}-\\d{4}-\\d{3})|(?:\\.\\d{4}\\.\\d{4}\\.\\d{3}))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "amex", - "category": "payment" - } - }, - { - "id": "edmH513UTQWcRiQ9UnzHlw-mod", - "name": "American Express Card Scanner (4+6|5+5|6 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b3[47]\\d{2}(?:(?:\\s\\d{5,6}\\s\\d{5,6})|(?:\\.\\d{5,6}\\.\\d{5,6})|(?:-\\d{5,6}-\\d{5,6})|(?:,\\d{5,6},\\d{5,6}))\\b", - "options": { - "case_sensitive": false, - "min_length": 17 - } - } - }, - "tags": { - "type": "card", - "card_type": "amex", - "category": "payment" - } - }, - { - "id": "e6K4h_7qTLaMiAbaNXoSZA", - "name": "American Express Card Scanner (8+7 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b3[47]\\d{6}(?:(?:\\s\\d{7})|(?:\\,\\d{7})|(?:-\\d{7})|(?:\\.\\d{7}))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "amex", - "category": "payment" - } - }, - { - "id": "K2rZflWzRhGM9HiTc6whyQ", - "name": "American Express Card Scanner (1x15 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b3[47]\\d{13}\\b", - "options": { - "case_sensitive": false, - "min_length": 15 - } - } - }, - "tags": { - "type": "card", - "card_type": "amex", - "category": "payment" - } - }, - { - "id": "9d7756e343cefa22a5c098e1092590f806eb5446", - "name": "Basic Authentication Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\bauthorization\\b", - "options": { - "case_sensitive": false, - "min_length": 13 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "^basic\\s+[A-Za-z0-9+/=]+", - "options": { - "case_sensitive": false, - "min_length": 7 - } - } - }, - "tags": { - "type": "basic_auth", - "category": "credentials" - } - }, - { - "id": "mZy8XjZLReC9smpERXWnnw", - "name": "Bearer Authentication Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\bauthorization\\b", - "options": { - "case_sensitive": false, - "min_length": 13 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "^bearer\\s+[-a-z0-9._~+/]{4,}", - "options": { - "case_sensitive": false, - "min_length": 11 - } - } - }, - "tags": { - "type": "bearer_token", - "category": "credentials" - } - }, - { - "id": "450239afc250a19799b6c03dc0e16fd6a4b2a1af", - "name": "Canadian Social Insurance Number Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:social[\\s_]?(?:insurance(?:\\s+number)?)?|SIN|Canadian[\\s_]?(?:social[\\s_]?(?:insurance)?|insurance[\\s_]?number)?)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b\\d{3}-\\d{3}-\\d{3}\\b", - "options": { - "case_sensitive": false, - "min_length": 11 - } - } - }, - "tags": { - "type": "canadian_sin", - "category": "pii" - } - }, - { - "id": "87a879ff33693b46c8a614d8211f5a2c289beca0", - "name": "Digest Authentication Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\bauthorization\\b", - "options": { - "case_sensitive": false, - "min_length": 13 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "^digest\\s+", - "options": { - "case_sensitive": false, - "min_length": 7 - } - } - }, - "tags": { - "type": "digest_auth", - "category": "credentials" - } - }, - { - "id": "qWumeP1GQUa_E4ffAnT-Yg", - "name": "American Express Card Scanner (1x14 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "(?:30[0-59]\\d|3[689]\\d{2})(?:\\d{10})", - "options": { - "case_sensitive": false, - "min_length": 14 - } - } - }, - "tags": { - "type": "card", - "card_type": "diners", - "category": "payment" - } - }, - { - "id": "NlTWWM5LS6W0GSqBLuvtRw", - "name": "Diners Card Scanner (4+4+4+2 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:30[0-59]\\d|3[689]\\d{2})(?:(?:\\s\\d{4}\\s\\d{4}\\s\\d{2})|(?:\\,\\d{4}\\,\\d{4}\\,\\d{2})|(?:-\\d{4}-\\d{4}-\\d{2})|(?:\\.\\d{4}\\.\\d{4}\\.\\d{2}))\\b", - "options": { - "case_sensitive": false, - "min_length": 17 - } - } - }, - "tags": { - "type": "card", - "card_type": "diners", - "category": "payment" - } - }, - { - "id": "Xr5VdbQSTXitYGGiTfxBpw", - "name": "Diners Card Scanner (4+6+4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:30[0-59]\\d|3[689]\\d{2})(?:(?:\\s\\d{6}\\s\\d{4})|(?:\\.\\d{6}\\.\\d{4})|(?:-\\d{6}-\\d{4})|(?:,\\d{6},\\d{4}))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "diners", - "category": "payment" - } - }, - { - "id": "gAbunN_WQNytxu54DjcbAA-mod", - "name": "Diners Card Scanner (8+6 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:30[0-59]\\d{5}|3[689]\\d{6})\\s?(?:(?:\\s\\d{6})|(?:\\,\\d{6})|(?:-\\d{6})|(?:\\.\\d{6}))\\b", - "options": { - "case_sensitive": false, - "min_length": 14 - } - } - }, - "tags": { - "type": "card", - "card_type": "diners", - "category": "payment" - } - }, - { - "id": "9cs4qCfEQBeX17U7AepOvQ", - "name": "MasterCard Scanner (2x8 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:6221(?:2[6-9]|[3-9][0-9])\\d{2}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8})|6229(?:[01][0-9]|2[0-5])\\d{2}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8})|(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])\\d{4}(?:,\\d{8}|\\s\\d{8}|-\\d{8}|\\.\\d{8}))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "discover", - "category": "payment" - } - }, - { - "id": "YBIDWJIvQWW_TFOyU0CGJg", - "name": "Discover Card Scanner (4x4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:(?:(?:6221(?:2[6-9]|[3-9][0-9])\\d{2}(?:,\\d{4}){2})|(?:6221\\s(?:2[6-9]|[3-9][0-9])\\d{2}(?:\\s\\d{4}){2})|(?:6221\\.(?:2[6-9]|[3-9][0-9])\\d{2}(?:\\.\\d{4}){2})|(?:6221-(?:2[6-9]|[3-9][0-9])\\d{2}(?:-\\d{4}){2}))|(?:(?:6229(?:[01][0-9]|2[0-5])\\d{2}(?:,\\d{4}){2})|(?:6229\\s(?:[01][0-9]|2[0-5])\\d{2}(?:\\s\\d{4}){2})|(?:6229\\.(?:[01][0-9]|2[0-5])\\d{2}(?:\\.\\d{4}){2})|(?:6229-(?:[01][0-9]|2[0-5])\\d{2}(?:-\\d{4}){2}))|(?:(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "discover", - "category": "payment" - } - }, - { - "id": "12cpbjtVTMaMutFhh9sojQ", - "name": "Discover Card Scanner (1x16 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:6221(?:2[6-9]|[3-9][0-9])\\d{10}|6229(?:[01][0-9]|2[0-5])\\d{10}|(?:6011|65\\d{2}|64[4-9]\\d|622[2-8])\\d{12})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "discover", - "category": "payment" - } - }, - { - "id": "PuXiVTCkTHOtj0Yad1ppsw", - "name": "Standard E-mail Address", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:(?:e[-\\s]?)?mail|address|sender|\\bto\\b|from|recipient)\\b", - "options": { - "case_sensitive": false, - "min_length": 2 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b[\\w!#$%&'*+/=?`{|}~^-]+(?:\\.[\\w!#$%&'*+/=?`{|}~^-]+)*(%40|@)(?:[a-zA-Z0-9-]+\\.)+[a-zA-Z]{2,6}\\b", - "options": { - "case_sensitive": false, - "min_length": 5 - } - } - }, - "tags": { - "type": "email", - "category": "pii" - } - }, - { - "id": "8VS2RKxzR8a_95L5fuwaXQ", - "name": "IBAN", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:iban|account|sender|receiver)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:NO\\d{2}(?:[ \\-]?\\d{4}){2}[ \\-]?\\d{3}|BE\\d{2}(?:[ \\-]?\\d{4}){3}|(?:DK|FO|FI|GL|SD)\\d{2}(?:[ \\-]?\\d{4}){3}[ \\-]?\\d{2}|NL\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?\\d{4}){2}[ \\-]?\\d{2}|MK\\d{2}[ \\-]?\\d{3}[A-Z0-9](?:[ \\-]?[A-Z0-9]{4}){2}[ \\-]?[A-Z0-9]\\d{2}|SI\\d{17}|(?:AT|BA|EE|LT|XK)\\d{18}|(?:LU|KZ|EE|LT)\\d{5}[A-Z0-9]{13}|LV\\d{2}[A-Z]{4}[A-Z0-9]{13}|(?:LI|CH)\\d{2}[ \\-]?\\d{4}[ \\-]?\\d[A-Z0-9]{3}(?:[ \\-]?[A-Z0-9]{4}){2}[ \\-]?[A-Z0-9]|HR\\d{2}(?:[ \\-]?\\d{4}){4}[ \\-]?\\d|GE\\d{2}[ \\-]?[A-Z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2}[ \\-]?[A-Z]{4}[ \\-]?\\d{4}[ \\-]?\\d[A-Z0-9]{3}(?:[ \\-]?[A-Z0-9]{3}){4}[ \\-]?[A-Z0-9]{3}|SC\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?\\d{4}){5}[ \\-]?[A-Z]{3}|LC\\d{2}[ \\-]?[A-Z]{4}(?:[ \\-]?[A-Z0-9]{4}){6})\\b", - "options": { - "case_sensitive": false, - "min_length": 15 - } - } - }, - "tags": { - "type": "iban", - "category": "payment" - } - }, - { - "id": "h6WJcecQTwqvN9KeEtwDvg", - "name": "JCB Card Scanner (1x16 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b35(?:2[89]|[3-9][0-9])(?:\\d{12})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "jcb", - "category": "payment" - } - }, - { - "id": "gcEaMu_VSJ2-bGCEkgyC0w", - "name": "JCB Card Scanner (2x8 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b35(?:2[89]|[3-9][0-9])\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))\\b", - "options": { - "case_sensitive": false, - "min_length": 17 - } - } - }, - "tags": { - "type": "card", - "card_type": "jcb", - "category": "payment" - } - }, - { - "id": "imTliuhXT5GAeRNhqChXQQ", - "name": "JCB Card Scanner (4x4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b35(?:2[89]|[3-9][0-9])(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "jcb", - "category": "payment" - } - }, - { - "id": "9osY3xc9Q7ONAV0zw9Uz4A", - "name": "JSON Web Token", - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\bey[I-L][\\w=-]+\\.ey[I-L][\\w=-]+(\\.[\\w.+\\/=-]+)?\\b", - "options": { - "case_sensitive": false, - "min_length": 20 - } - } - }, - "tags": { - "type": "json_web_token", - "category": "credentials" - } - }, - { - "id": "d1Q9D3YMRxuVKf6CZInJPw", - "name": "Maestro Card Scanner (1x16 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:5[06-9]\\d{2}|6\\d{3})(?:\\d{12})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "maestro", - "category": "payment" - } - }, - { - "id": "M3YIQKKjRVmoeQuM3pjzrw", - "name": "Maestro Card Scanner (2x8 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:5[06-9]\\d{6}|6\\d{7})(?:\\s\\d{8}|\\.\\d{8}|-\\d{8}|,\\d{8})\\b", - "options": { - "case_sensitive": false, - "min_length": 17 - } - } - }, - "tags": { - "type": "card", - "card_type": "maestro", - "category": "payment" - } - }, - { - "id": "hRxiQBlSSVKcjh5U7LZYLA", - "name": "Maestro Card Scanner (4x4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:5[06-9]\\d{2}|6\\d{3})(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "maestro", - "category": "payment" - } - }, - { - "id": "NwhIYNS4STqZys37WlaIKA", - "name": "MasterCard Scanner (2x8 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:(?:\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "mastercard", - "category": "payment" - } - }, - { - "id": "axxJkyjhRTOuhjwlsA35Vw", - "name": "MasterCard Scanner (4x4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3}|(?:,\\d{4}){3})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "mastercard", - "category": "payment" - } - }, - { - "id": "76EhmoK3TPqJcpM-fK0pLw", - "name": "MasterCard Scanner (1x16 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:(?:5[1-5]\\d{2})|(?:222[1-9])|(?:22[3-9]\\d)|(?:2[3-6]\\d{2})|(?:27[0-1]\\d)|(?:2720))(?:\\d{12})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "mastercard", - "category": "payment" - } - }, - { - "id": "18b608bd7a764bff5b2344c0", - "name": "Phone number", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\bphone|number|mobile\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "^(?:\\(\\+\\d{1,3}\\)|\\+\\d{1,3}|00\\d{1,3})?[-\\s\\.]?(?:\\(\\d{3}\\)[-\\s\\.]?)?(?:\\d[-\\s\\.]?){6,10}$", - "options": { - "case_sensitive": false, - "min_length": 6 - } - } - }, - "tags": { - "type": "phone", - "category": "pii" - } - }, - { - "id": "de0899e0cbaaa812bb624cf04c912071012f616d-mod", - "name": "UK National Insurance Number Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "^nin$|\\binsurance\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b[A-Z]{2}[\\s-]?\\d{6}[\\s-]?[A-Z]?\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - } - }, - "tags": { - "type": "uk_nin", - "category": "pii" - } - }, - { - "id": "d962f7ddb3f55041e39195a60ff79d4814a7c331", - "name": "US Passport Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\bpassport\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b[0-9A-Z]{9}\\b|\\b[0-9]{6}[A-Z][0-9]{2}\\b", - "options": { - "case_sensitive": false, - "min_length": 8 - } - } - }, - "tags": { - "type": "passport_number", - "category": "pii" - } - }, - { - "id": "7771fc3b-b205-4b93-bcef-28608c5c1b54", - "name": "United States Social Security Number Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:SSN|(?:(?:social)?[\\s_]?(?:security)?[\\s_]?(?:number)?)?)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b\\d{3}[-\\s\\.]{1}\\d{2}[-\\s\\.]{1}\\d{4}\\b", - "options": { - "case_sensitive": false, - "min_length": 11 - } - } - }, - "tags": { - "type": "us_ssn", - "category": "pii" - } - }, - { - "id": "ac6d683cbac77f6e399a14990793dd8fd0fca333", - "name": "US Vehicle Identification Number Scanner", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:vehicle[_\\s-]*identification[_\\s-]*number|vin)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b[A-HJ-NPR-Z0-9]{17}\\b", - "options": { - "case_sensitive": false, - "min_length": 17 - } - } - }, - "tags": { - "type": "vin", - "category": "pii" - } - }, - { - "id": "wJIgOygRQhKkR69b_9XbRQ", - "name": "Visa Card Scanner (2x8 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b4\\d{3}(?:(?:\\d{4}(?:(?:,\\d{8})|(?:-\\d{8})|(?:\\s\\d{8})|(?:\\.\\d{8}))))\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "visa", - "category": "payment" - } - }, - { - "id": "0o71SJxXQNK7Q6gMbBesFQ", - "name": "Visa Card Scanner (4x4 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "\\b4\\d{3}(?:(?:,\\d{4}){3}|(?:\\s\\d{4}){3}|(?:\\.\\d{4}){3}|(?:-\\d{4}){3})\\b", - "options": { - "case_sensitive": false, - "min_length": 16 - } - } - }, - "tags": { - "type": "card", - "card_type": "visa", - "category": "payment" - } - }, - { - "id": "QrHD6AfgQm6z-j0wStxTvA", - "name": "Visa Card Scanner (1x15 & 1x16 & 1x19 digits)", - "key": { - "operator": "match_regex", - "parameters": { - "regex": "\\b(?:card|cc|credit|debit|payment|amex|visa|mastercard|maestro|discover|jcb|diner)\\b", - "options": { - "case_sensitive": false, - "min_length": 3 - } - } - }, - "value": { - "operator": "match_regex", - "parameters": { - "regex": "4[0-9]{12}(?:[0-9]{3})?", - "options": { - "case_sensitive": false, - "min_length": 13 - } - } - }, - "tags": { - "type": "card", - "card_type": "visa", - "category": "payment" - } - } - ] -} \ No newline at end of file diff --git a/vendor/github.com/DataDog/appsec-internal-go/limiter/limiter.go b/vendor/github.com/DataDog/appsec-internal-go/limiter/limiter.go deleted file mode 100644 index fbe4f3e1dc..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/limiter/limiter.go +++ /dev/null @@ -1,154 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -// Package limiter provides simple rate limiting primitives, and an implementation of a token bucket rate limiter. -package limiter - -import ( - "time" - - "sync/atomic" -) - -// Limiter is used to abstract the rate limiter implementation to only expose the needed function for rate limiting. -// This is for example useful for testing, allowing us to use a modified rate limiter tuned for testing through the same -// interface. -type Limiter interface { - Allow() bool -} - -// TokenTicker is a thread-safe and lock-free rate limiter based on a token bucket. -// The idea is to have a goroutine that will update the bucket with fresh tokens at regular intervals using a time.Ticker. -// The advantage of using a goroutine here is that the implementation becomes easily thread-safe using a few -// atomic operations with little overhead overall. TokenTicker.Start() *should* be called before the first call to -// TokenTicker.Allow() and TokenTicker.Stop() *must* be called once done using. Note that calling TokenTicker.Allow() -// before TokenTicker.Start() is valid, but it means the bucket won't be refilling until the call to TokenTicker.Start() is made -type TokenTicker struct { - tokens atomic.Int64 // The amount of tokens currently available - maxTokens int64 // The maximum amount of tokens the bucket can hold - interval time.Duration // The interval at which the tokens are refilled - ticker *time.Ticker // The ticker used to update the bucket (nil if not started yet) - stopChan chan struct{} // The channel to stop the ticker updater (nil if not started yet) -} - -// NewTokenTicker is a utility function that allocates a token ticker, initializes necessary fields and returns it -func NewTokenTicker(tokens, maxTokens int64) *TokenTicker { - return NewTokenTickerWithInterval(tokens, maxTokens, time.Second) -} - -// NewTokenTickerWithInterval is a utility function that allocates a token ticker with a custom interval -func NewTokenTickerWithInterval(tokens, maxTokens int64, interval time.Duration) *TokenTicker { - t := &TokenTicker{ - maxTokens: maxTokens, - interval: interval, - } - t.tokens.Store(tokens) - return t -} - -// updateBucket performs a select loop to update the token amount in the bucket. -// Used in a goroutine by the rate limiter. -func (t *TokenTicker) updateBucket(startTime time.Time, ticksChan <-chan time.Time, stopChan <-chan struct{}, syncChan chan<- struct{}) { - nsPerToken := t.interval.Nanoseconds() / t.maxTokens - elapsedNs := int64(0) - prevStamp := startTime - - for { - select { - case <-stopChan: - if syncChan != nil { - close(syncChan) - } - return - case stamp, ok := <-ticksChan: - if !ok { - // The ticker has been closed, stamp is a zero-value, we ignore that. We nil-out the - // ticksChan so we don't get stuck endlessly reading from this closed channel again. - ticksChan = nil - continue - } - - // Compute the time in nanoseconds that passed between the previous timestamp and this one - // This will be used to know how many tokens can be added into the bucket depending on the limiter rate - elapsedNs += stamp.Sub(prevStamp).Nanoseconds() - if elapsedNs > t.maxTokens*nsPerToken { - elapsedNs = t.maxTokens * nsPerToken - } - prevStamp = stamp - // Update the number of tokens in the bucket if enough nanoseconds have passed - if elapsedNs >= nsPerToken { - // Atomic spin lock to make sure we don't race for `t.tokens` - for { - tokens := t.tokens.Load() - if tokens == t.maxTokens { - break // Bucket is already full, nothing to do - } - inc := elapsedNs / nsPerToken - // Make sure not to add more tokens than we are allowed to into the bucket - if tokens+inc > t.maxTokens { - inc -= (tokens + inc) % t.maxTokens - } - if t.tokens.CompareAndSwap(tokens, tokens+inc) { - // Keep track of remaining elapsed ns that were not taken into account for this computation, - // so that increment computation remains precise over time - elapsedNs = elapsedNs % nsPerToken - break - } - } - } - // Sync channel used to signify that the goroutine is done updating the bucket. Used for tests to guarantee - // that the goroutine ticked at least once. - if syncChan != nil { - syncChan <- struct{}{} - } - } - } -} - -// Start starts the ticker and launches the goroutine responsible for updating the token bucket. -// The ticker is set to tick at a fixed rate of 500us. -func (t *TokenTicker) Start() { - timeNow := time.Now() - t.ticker = time.NewTicker(500 * time.Microsecond) - t.start(timeNow, t.ticker.C, nil) -} - -// start is used for internal testing. Controlling the ticker means being able to test per-tick -// rather than per-duration, which is more reliable if the app is under a lot of stress. The -// syncChan, if non-nil, will receive one message after each tick from the ticksChan has been -// processed, providing a strong synchronization primitive. The limiter will close the syncChan when -// it is stopped, signaling that no further ticks will be processed. -func (t *TokenTicker) start(startTime time.Time, ticksChan <-chan time.Time, syncChan chan<- struct{}) { - t.stopChan = make(chan struct{}) - go t.updateBucket(startTime, ticksChan, t.stopChan, syncChan) -} - -// Stop shuts down the rate limiter, taking care stopping the ticker and closing all channels -func (t *TokenTicker) Stop() { - // Stop the ticker only if it has been instantiated (not the case when testing by calling start() directly) - if t.ticker != nil { - t.ticker.Stop() - t.ticker = nil // Ensure stop can be called multiple times idempotently. - } - // Close the stop channel only if it has been created. This covers the case where Stop() is called without any prior - // call to Start() - if t.stopChan != nil { - close(t.stopChan) - t.stopChan = nil // Ensure stop can be called multiple times idempotently. - } -} - -// Allow checks and returns whether a token can be retrieved from the bucket and consumed. -// Thread-safe. -func (t *TokenTicker) Allow() bool { - for { - tokens := t.tokens.Load() - if tokens == 0 { - return false - } else if t.tokens.CompareAndSwap(tokens, tokens-1) { - return true - } - } -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/log/backend.go b/vendor/github.com/DataDog/appsec-internal-go/log/backend.go deleted file mode 100644 index b9d94f5cd9..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/log/backend.go +++ /dev/null @@ -1,138 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package log - -import ( - "fmt" - "log" - "os" - "strings" -) - -var ( - backend = Backend{ - Trace: defaultWithLevel(logLevelTrace), - Debug: defaultWithLevel(logLevelDebug), - Info: defaultWithLevel(logLevelInfo), - Warn: defaultWithLevel(logLevelWarn), - Errorf: defaultErrorfWithLevel(logLevelError), - Criticalf: defaultErrorfWithLevel(logLevelCritical), - } - defaultBackendLogLevel = logLevelError -) - -type Backend struct { - Trace func(string, ...any) - Debug func(string, ...any) - Info func(string, ...any) - Warn func(string, ...any) - Errorf func(string, ...any) error - Criticalf func(string, ...any) error -} - -// SetBackend replaces the active log backend with the provided one. Any nil -// function in the new backend will silently ignore any message logged at that -// level. -func SetBackend(newBackend Backend) { - if newBackend.Trace == nil { - newBackend.Trace = noopLogger - } - if newBackend.Debug == nil { - newBackend.Debug = noopLogger - } - if newBackend.Info == nil { - newBackend.Info = noopLogger - } - if newBackend.Warn == nil { - newBackend.Warn = noopLogger - } - if newBackend.Errorf == nil { - newBackend.Errorf = fmt.Errorf - } - if newBackend.Criticalf == nil { - newBackend.Criticalf = fmt.Errorf - } - - backend = newBackend -} - -// defaultWithLevel returns the default log backend function for the provided -// logLevel. This returns a no-op function if the default backend logLevel does -// not enable logging at that level. -func defaultWithLevel(level logLevel) func(string, ...any) { - if defaultBackendLogLevel < level { - return noopLogger - } - return func(format string, args ...any) { - log.Printf(fmt.Sprintf("[%s] %s\n", level, format), args...) - } -} - -// defaultErrorfWithLevel returns the default log backend function for the -// provided error logLevel. -func defaultErrorfWithLevel(level logLevel) func(string, ...any) error { - if defaultBackendLogLevel < level { - return fmt.Errorf - } - return func(format string, args ...any) error { - err := fmt.Errorf(format, args...) - log.Printf("[%s] %v", level, err) - return err - } -} - -// noopLogger does nothing. -func noopLogger(string, ...any) { /* noop */ } - -type logLevel uint8 - -const ( - logLevelTrace logLevel = 1 << iota - logLevelDebug - logLevelInfo - logLevelWarn - logLevelError - logLevelCritical -) - -func (l logLevel) String() string { - switch l { - case logLevelTrace: - return "TRACE" - case logLevelDebug: - return "DEBUG" - case logLevelInfo: - return "INFO" - case logLevelWarn: - return "WARN" - case logLevelError: - return "ERROR" - case logLevelCritical: - return "CRITICAL" - default: - return "UNKNOWN" - } -} - -func init() { - ddLogLevel := os.Getenv("DD_LOG_LEVEL") - switch strings.ToUpper(ddLogLevel) { - case "TRACE": - defaultBackendLogLevel = logLevelTrace - case "DEBUG": - defaultBackendLogLevel = logLevelDebug - case "INFO": - defaultBackendLogLevel = logLevelInfo - case "WARN": - defaultBackendLogLevel = logLevelWarn - case "ERROR": - defaultBackendLogLevel = logLevelError - case "CRITICAL": - defaultBackendLogLevel = logLevelCritical - default: - // Ignore invalid/unexpected values - } -} diff --git a/vendor/github.com/DataDog/appsec-internal-go/log/log.go b/vendor/github.com/DataDog/appsec-internal-go/log/log.go deleted file mode 100644 index a34f578d7a..0000000000 --- a/vendor/github.com/DataDog/appsec-internal-go/log/log.go +++ /dev/null @@ -1,45 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -// Package log provides a logging facility that is used by this library, and -// which can be configured to piggyback on another logging facility where -// available. If not explicitly configured, this will log messages using the Go -// standar library log package, filtered according to the log level set in the -// `DD_LOG_LEVEL` environment variable (or `ERROR` if none is set). -// -// Custom logger intergrations are configured by calling the SetBackend function. -package log - -// Trace logs a message with format using the TRACE log level. -func Trace(format string, args ...any) { - backend.Trace(format, args...) -} - -// Debug logs a message with format using the DEBUG log level. -func Debug(format string, args ...any) { - backend.Debug(format, args...) -} - -// Info logs a message with format using the INFO log level. -func Info(format string, args ...any) { - backend.Info(format, args...) -} - -// Warn logs a message with format using the WARN log level. -func Warn(format string, args ...any) { - backend.Warn(format, args...) -} - -// Errorf logs a message with format using the ERROR log level and returns an -// error containing the formatted log message. -func Errorf(format string, args ...any) error { - return backend.Errorf(format, args...) -} - -// Errorf logs a message with format using the CRITICAL log level and returns an -// error containing the formatted log message. -func Criticalf(format string, args ...any) error { - return backend.Criticalf(format, args...) -} diff --git a/vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/LICENSE b/vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/comp/core/tagger/origindetection/origindetection.go b/vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/origindetection.go deleted file mode 100644 index 3c61af2242..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/comp/core/tagger/origindetection/origindetection.go +++ /dev/null @@ -1,150 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// TODO: A lot of the code in this file is currently duplicated in taggertypes. -// We will need to move all the code in taggertype to this file and remove the taggertypes package. - -// Package origindetection contains the types and functions used for Origin Detection. -package origindetection - -import ( - "fmt" - "strconv" - "strings" -) - -// ProductOrigin is the origin of the product that sent the entity. -type ProductOrigin int - -const ( - // ProductOriginDogStatsDLegacy is the ProductOrigin for DogStatsD in Legacy mode. - // TODO: remove this when dogstatsd_origin_detection_unified is enabled by default - ProductOriginDogStatsDLegacy ProductOrigin = iota - // ProductOriginDogStatsD is the ProductOrigin for DogStatsD. - ProductOriginDogStatsD ProductOrigin = iota - // ProductOriginAPM is the ProductOrigin for APM. - ProductOriginAPM ProductOrigin = iota - - // Local Data Prefixes - // These prefixes are used to build the Local Data list. - - // LocalDataContainerIDPrefix is the prefix used for the Container ID sent in the Local Data list. - LocalDataContainerIDPrefix = "ci-" - // LocalDataLegacyContainerIDPrefix is the Legacy prefix used by APM for the Container ID sent in the Local Data list. - LocalDataLegacyContainerIDPrefix = "cid-" - // LocalDataInodePrefix is the prefix used for the Inode sent in the Local Data list. - LocalDataInodePrefix = "in-" - - // External Data Prefixes - // These prefixes are used to build the External Data Environment Variable. - - // ExternalDataInitPrefix is the prefix for the Init flag in the External Data. - ExternalDataInitPrefix = "it-" - // ExternalDataContainerNamePrefix is the prefix for the Container Name in the External Data. - ExternalDataContainerNamePrefix = "cn-" - // ExternalDataPodUIDPrefix is the prefix for the Pod UID in the External Data. - ExternalDataPodUIDPrefix = "pu-" -) - -// OriginInfo contains the Origin Detection information. -type OriginInfo struct { - LocalData LocalData // LocalData is the local data list. - ExternalData ExternalData // ExternalData is the external data list. - Cardinality string // Cardinality is the cardinality of the resolved origin. - ProductOrigin ProductOrigin // ProductOrigin is the product that sent the origin information. -} - -// OriginInfoString returns a string representation of the OriginInfo. -func OriginInfoString(originInfo OriginInfo) string { - return LocalDataString(originInfo.LocalData) + ExternalDataString(originInfo.ExternalData) -} - -// LocalData that is generated by the client and sent to the Agent. -type LocalData struct { - ProcessID uint32 // ProcessID of the container process on the host. - ContainerID string // ContainerID sent from the client. - Inode uint64 // Inode is the Cgroup inode of the container. - PodUID string // PodUID of the pod sent from the client. -} - -// LocalDataString returns a string representation of the LocalData. -func LocalDataString(localData LocalData) string { - return fmt.Sprintf("%v%v%v%v", localData.ProcessID, localData.ContainerID, localData.Inode, localData.PodUID) -} - -// ExternalData generated by the Admission Controller and sent to the Agent. -type ExternalData struct { - Init bool // Init is true if the container is an init container. - ContainerName string // ContainerName is the name of the container as seen by the Admission Controller. - PodUID string // PodUID is the UID of the pod as seen by the Admission Controller. -} - -// ExternalDataString returns a string representation of the ExternalData. -func ExternalDataString(externalData ExternalData) string { - return fmt.Sprintf("%v%v%v", externalData.Init, externalData.ContainerName, externalData.PodUID) -} - -// GenerateContainerIDFromExternalData generates a container ID from the external data. -type GenerateContainerIDFromExternalData func(externalData ExternalData) (string, error) - -// ParseLocalData parses the local data string into a LocalData struct. -func ParseLocalData(rawLocalData string) (LocalData, error) { - if rawLocalData == "" { - return LocalData{}, nil - } - - var localData LocalData - var parsingError error - - if strings.Contains(rawLocalData, ",") { - // The Local Data can contain a list. - items := strings.Split(rawLocalData, ",") - for _, item := range items { - if strings.HasPrefix(item, LocalDataContainerIDPrefix) { - localData.ContainerID = item[len(LocalDataContainerIDPrefix):] - } else if strings.HasPrefix(item, LocalDataInodePrefix) { - localData.Inode, parsingError = strconv.ParseUint(item[len(LocalDataInodePrefix):], 10, 64) - } - } - } else { - switch { - case strings.HasPrefix(rawLocalData, LocalDataContainerIDPrefix): - localData.ContainerID = rawLocalData[len(LocalDataContainerIDPrefix):] - case strings.HasPrefix(rawLocalData, LocalDataInodePrefix): - localData.Inode, parsingError = strconv.ParseUint(rawLocalData[len(LocalDataInodePrefix):], 10, 64) - case strings.HasPrefix(rawLocalData, LocalDataLegacyContainerIDPrefix): - // Container ID with old APM format: cid:. Kept for backward compatibility. - localData.ContainerID = rawLocalData[len(LocalDataLegacyContainerIDPrefix):] - default: - // Container ID with old DogStatsD format: . Kept for backward compatibility. - localData.ContainerID = rawLocalData - } - } - - return localData, parsingError -} - -// ParseExternalData parses the external data string into an ExternalData struct. -func ParseExternalData(externalEnv string) (ExternalData, error) { - if externalEnv == "" { - return ExternalData{}, nil - } - - var externalData ExternalData - var parsingError error - - for _, item := range strings.Split(externalEnv, ",") { - switch { - case strings.HasPrefix(item, ExternalDataInitPrefix): - externalData.Init, parsingError = strconv.ParseBool(item[len(ExternalDataInitPrefix):]) - case strings.HasPrefix(item, ExternalDataContainerNamePrefix): - externalData.ContainerName = item[len(ExternalDataContainerNamePrefix):] - case strings.HasPrefix(item, ExternalDataPodUIDPrefix): - externalData.PodUID = item[len(ExternalDataPodUIDPrefix):] - } - } - - return externalData, parsingError -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/obfuscate/cache.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/cache.go deleted file mode 100644 index 3faf030ba0..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/cache.go +++ /dev/null @@ -1,86 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "fmt" - "time" - - "github.com/outcaste-io/ristretto" -) - -// measuredCache is a wrapper on top of *ristretto.Cache which additionally -// sends metrics (hits and misses) every 10 seconds. -type measuredCache struct { - *ristretto.Cache - - // close allows sending shutdown notification. - close chan struct{} - statsd StatsClient -} - -// Close gracefully closes the cache when active. -func (c *measuredCache) Close() { - if c.Cache == nil { - return - } - c.close <- struct{}{} - <-c.close -} - -func (c *measuredCache) statsLoop() { - defer func() { - c.close <- struct{}{} - }() - tick := time.NewTicker(10 * time.Second) - defer tick.Stop() - mx := c.Cache.Metrics - for { - select { - case <-tick.C: - _ = c.statsd.Gauge("datadog.trace_agent.obfuscation.sql_cache.hits", float64(mx.Hits()), nil, 1) //nolint:errcheck - _ = c.statsd.Gauge("datadog.trace_agent.obfuscation.sql_cache.misses", float64(mx.Misses()), nil, 1) //nolint:errcheck - case <-c.close: - c.Cache.Close() - return - } - } -} - -type cacheOptions struct { - On bool - Statsd StatsClient - MaxSize int64 -} - -// newMeasuredCache returns a new measuredCache. -func newMeasuredCache(opts cacheOptions) *measuredCache { - if !opts.On { - // a nil *ristretto.Cache is a no-op cache - return &measuredCache{} - } - cfg := &ristretto.Config{ - MaxCost: opts.MaxSize, - // Assuming the minimum query size is 10 bytes , the maximum number of queries - // that can be stored is calculated as opts.MaxSize / (10 + 320). - // The 320 bytes is the fixed size of the ObfuscatedQuery struct which is stored in the cache. - // Multiplying this maximum number by 10 (opts.MaxSize / 330 * 10) as per the ristretto documentation. - NumCounters: int64(opts.MaxSize / 330 * 10), - BufferItems: 64, // default recommended value - Metrics: true, // enable hit/miss counters - } - cache, err := ristretto.NewCache(cfg) - if err != nil { - panic(fmt.Errorf("Error starting obfuscator query cache: %v", err)) - } - c := measuredCache{ - close: make(chan struct{}), - statsd: opts.Statsd, - Cache: cache, - } - go c.statsLoop() - return &c -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/credit_cards.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/credit_cards.go deleted file mode 100644 index 3246d6b0a4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/credit_cards.go +++ /dev/null @@ -1,278 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "strings" -) - -// creditCard maintains credit card obfuscation state and processing. -type creditCard struct { - luhn bool - keepValues map[string]struct{} -} - -func newCCObfuscator(config *CreditCardsConfig) *creditCard { - keepValues := make(map[string]struct{}, len(config.KeepValues)) - for _, sk := range config.KeepValues { - keepValues[sk] = struct{}{} - } - return &creditCard{ - luhn: config.Luhn, - keepValues: keepValues, - } -} - -// ObfuscateCreditCardNumber obfuscates any "credit card like" numbers in value for keys not in the allow-list -func (o *Obfuscator) ObfuscateCreditCardNumber(key, val string) string { - switch key { - case "_sample_rate", - "_sampling_priority_v1", - "account_id", - "aws_account", - "error", - "error.msg", - "error.type", - "error.stack", - "env", - "graphql.field", - "graphql.query", - "graphql.type", - "graphql.operation.name", - "grpc.code", - "grpc.method", - "grpc.request", - "http.status_code", - "http.method", - "runtime-id", - "out.host", - "out.port", - "sampling.priority", - "span.type", - "span.name", - "service.name", - "service", - "sql.query", - "version": - // these tags are known to not be credit card numbers - return val - } - if strings.HasPrefix(key, "_") { - return val - } - if _, ok := o.ccObfuscator.keepValues[key]; ok { - return val - } - if o.ccObfuscator.IsCardNumber(val) { - return "?" - } - return val -} - -// IsCardNumber checks if b could be a credit card number by checking the digit count and IIN prefix. -// If validateLuhn is true, the Luhn checksum is also applied to potential candidates. -func (cc *creditCard) IsCardNumber(b string) (ok bool) { - // - // Just credit card numbers for now, based on: - // • https://baymard.com/checkout-usability/credit-card-patterns - // • https://www.regular-expressions.info/creditcard.html - // - if len(b) == 0 { - return false - } - if len(b) < 12 { - // fast path: can not be a credit card - return false - } - if b[0] != ' ' && b[0] != '-' && (b[0] < '0' || b[0] > '9') { - // fast path: only valid characters are 0-9, space (" ") and dash("-") - return false - } - prefix := 0 // holds up to b[:6] digits as a numeric value (for example []byte{"523"} becomes int(523)) for checking prefixes - count := 0 // counts digits encountered - foundPrefix := false // reports whether we've detected a valid prefix - recdigit := func(_ byte) {} // callback on each found digit; no-op by default (we only need this for Luhn) - if cc.luhn { - // we need Luhn checksum validation, so we have to take additional action - // and record all digits found - buf := make([]byte, 0, len(b)) - recdigit = func(b byte) { buf = append(buf, b) } - defer func() { - if !ok { - // if isCardNumber returned false, it means that b can not be - // a credit card number - return - } - // potentially a credit card number, run the Luhn checksum - ok = luhnValid(buf) - }() - } -loop: - for i := range b { - // We traverse and search b for a valid IIN credit card prefix based - // on the digits found, ignoring spaces and dashes. - // Source: https://www.regular-expressions.info/creditcard.html - switch b[i] { - case ' ', '-': - // ignore space (' ') and dash ('-') - continue loop - } - if b[i] < '0' || b[i] > '9' { - // not a 0 to 9 digit; can not be a credit card number; abort - return false - } - count++ - recdigit(b[i]) - if !foundPrefix { - // we have not yet found a valid prefix so we convert the digits - // that we have so far into a numeric value: - prefix = prefix*10 + (int(b[i]) - '0') - maybe, yes := validCardPrefix(prefix) - if yes { - // we've found a valid prefix; continue counting - foundPrefix = true - } else if !maybe { - // this is not a valid prefix and we should not continue looking - return false - } - } - if count > 16 { - // too many digits - return false - } - } - if count < 12 { - // too few digits - return false - } - return foundPrefix -} - -// luhnValid checks that the number represented in the given string validates the Luhn Checksum algorithm. -// str is expected to contain exclusively digits at all positions. -// -// See: -// • https://en.wikipedia.org/wiki/Luhn_algorithm -// • https://dev.to/shiraazm/goluhn-a-simple-library-for-generating-calculating-and-verifying-luhn-numbers-588j -func luhnValid(str []byte) bool { - var ( - sum int - alt bool - ) - n := len(str) - for i := n - 1; i > -1; i-- { - if str[i] < '0' || str[i] > '9' { - return false // not a number! - } - mod := int(str[i] - 0x30) // convert byte to int - if alt { - mod *= 2 - if mod > 9 { - mod = (mod % 10) + 1 - } - } - alt = !alt - sum += mod - } - return sum%10 == 0 -} - -// validCardPrefix validates whether b is a valid card prefix. Maybe returns true if -// the prefix could be an IIN once more digits are revealed and yes reports whether -// b is a fully valid IIN. -// -// If yes is false and maybe is false, there is no reason to continue searching. The -// prefix is invalid. -// -// IMPORTANT: If adding new prefixes to this algorithm, make sure that you update -// the "maybe" clauses above, in the shorter prefixes than the one you are adding. -// This refers to the cases which return true, false. -// -// TODO(x): this whole code could be code generated from a prettier data structure. -// Ultimately, it could even be user-configurable. -func validCardPrefix(n int) (maybe, yes bool) { - // Validates IIN prefix possibilities - // Source: https://www.regular-expressions.info/creditcard.html - if n > 699999 { - // too long for any known prefix; stop looking - return false, false - } - if n < 10 { - switch n { - case 1, 4: - // 1 & 4 are valid IIN - return false, true - case 2, 3, 5, 6: - // 2, 3, 5, 6 could be the start of valid IIN - return true, false - default: - // invalid IIN - return false, false - } - } - if n < 100 { - if (n >= 34 && n <= 39) || - (n >= 51 && n <= 55) || - n == 62 || - n == 65 { - // 34-39, 51-55, 62, 65 are valid IIN - return false, true - } - if n == 30 || n == 63 || n == 64 || n == 50 || n == 60 || - (n >= 22 && n <= 27) || (n >= 56 && n <= 58) || (n >= 60 && n <= 69) { - // 30, 63, 64, 50, 60, 22-27, 56-58, 60-69 may end up as valid IIN - return true, false - } - } - if n < 1000 { - if (n >= 300 && n <= 305) || - (n >= 644 && n <= 649) || - n == 309 || - n == 636 { - // 300‑305, 309, 636, 644‑649 are valid IIN - return false, true - } - if (n >= 352 && n <= 358) || n == 501 || n == 601 || - (n >= 222 && n <= 272) || (n >= 500 && n <= 509) || - (n >= 560 && n <= 589) || (n >= 600 && n <= 699) { - // 352-358, 501, 601, 222-272, 500-509, 560-589, 600-699 may be a 4 or 6 digit IIN prefix - return true, false - } - } - if n < 10000 { - if (n >= 3528 && n <= 3589) || - n == 5019 || - n == 6011 { - // 3528‑3589, 5019, 6011 are valid IINs - return false, true - } - if (n >= 2221 && n <= 2720) || (n >= 5000 && n <= 5099) || - (n >= 5600 && n <= 5899) || (n >= 6000 && n <= 6999) { - // maybe a 6-digit IIN - return true, false - } - } - if n < 100000 { - if (n >= 22210 && n <= 27209) || - (n >= 50000 && n <= 50999) || - (n >= 56000 && n <= 58999) || - (n >= 60000 && n <= 69999) { - // maybe a 6-digit IIN - return true, false - } - } - if n < 1000000 { - if (n >= 222100 && n <= 272099) || - (n >= 500000 && n <= 509999) || - (n >= 560000 && n <= 589999) || - (n >= 600000 && n <= 699999) { - // 222100‑272099, 500000‑509999, 560000‑589999, 600000‑699999 are valid IIN - return false, true - } - } - // unknown IIN - return false, false -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/http.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/http.go deleted file mode 100644 index 0fdec821a3..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/http.go +++ /dev/null @@ -1,60 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "net/url" - "strings" -) - -// obfuscateUserInfo returns a URL string that obfuscates any userinfo by setting url.User to nil. -func obfuscateUserInfo(val string) string { - u, err := url.Parse(val) - if err != nil { - return val - } - u.User = nil - return u.String() -} - -// ObfuscateURLString obfuscates the given URL. It must be a valid URL. -func (o *Obfuscator) ObfuscateURLString(val string) string { - if !o.opts.HTTP.RemoveQueryString && !o.opts.HTTP.RemovePathDigits { - // nothing to do - return obfuscateUserInfo(val) - } - u, err := url.Parse(val) - if err != nil { - // should not happen for valid URLs, but better obfuscate everything - // rather than expose sensitive information when this option is on. - return "?" - } - u.User = nil - if o.opts.HTTP.RemoveQueryString && u.RawQuery != "" { - u.ForceQuery = true // add the '?' - u.RawQuery = "" - } - if o.opts.HTTP.RemovePathDigits { - segs := strings.Split(u.Path, "/") - var changed bool - for i, seg := range segs { - for _, ch := range []byte(seg) { - if ch >= '0' && ch <= '9' { - // we can not set the question mark directly here because the url - // package will escape it into %3F, so we use this placeholder and - // replace it further down. - segs[i] = "/REDACTED/" - changed = true - break - } - } - } - if changed { - u.Path = strings.Join(segs, "/") - } - } - return strings.ReplaceAll(u.String(), "/REDACTED/", "?") -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/ip_address.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/ip_address.go deleted file mode 100644 index 7289849bcf..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/ip_address.go +++ /dev/null @@ -1,237 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "net/netip" - "strings" -) - -// QuantizePeerIPAddresses quantizes a comma separated list of hosts. Each entry which is an IP address is replaced using quantizeIP. -// Duplicate entries post-quantization or collapsed into a single unique value. -// Entries which are not IP addresses are left unchanged. -// Comma-separated host lists are common for peer tags like peer.cassandra.contact.points, peer.couchbase.seed.nodes, peer.kafka.bootstrap.servers -func QuantizePeerIPAddresses(raw string) string { - values := strings.Split(raw, ",") - uniq := values[:0] - uniqSet := make(map[string]bool) - for _, v := range values { - q := quantizeIP(v) - if !uniqSet[q] { - uniqSet[q] = true - uniq = append(uniq, q) - } - } - return strings.Join(uniq, ",") -} - -var schemes = []string{"dnspoll", "ftp", "file", "http", "https"} - -var allowedIPAddresses = map[string]bool{ - // localhost - "127.0.0.1": true, - "::1": true, - // link-local cloud provider metadata server addresses - "169.254.169.254": true, - "fd00:ec2::254": true, - // ECS task metadata - "169.254.170.2": true, -} - -func splitPrefix(raw string) (prefix, after string) { - if after, ok := strings.CutPrefix(raw, "ip-"); ok { // AWS EC2 hostnames e.g. ip-10-123-4-567.ec2.internal - return "ip-", after - } - - for _, scheme := range schemes { - schemeIndex := strings.Index(raw, scheme) - if schemeIndex < 0 { - continue - } - schemeEnd := schemeIndex + len(scheme) + 4 - if schemeEnd < len(raw) && raw[schemeIndex+len(scheme):schemeEnd] == ":///" { - return raw[schemeIndex:schemeEnd], raw[schemeEnd:] - } - schemeEnd-- - if schemeEnd < len(raw) && raw[schemeIndex+len(scheme):schemeEnd] == "://" { - return raw[schemeIndex:schemeEnd], raw[schemeEnd:] - } - } - - return "", raw -} - -// quantizeIP quantizes the ip address in the provided string, only if it exactly matches an ip with an optional port -// if the string is not an ip then empty string is returned -func quantizeIP(raw string) string { - prefix, rawNoPrefix := splitPrefix(raw) - host, port, suffix := parseIPAndPort(rawNoPrefix) - if host == "" { - // not an ip address - return raw - } - if allowedIPAddresses[host] { - return raw - } - replacement := prefix + "blocked-ip-address" - if port != "" { - // we're keeping the original port as part of the key because ports are much lower cardinality - // than ip addresses, and they also tend to correspond more closely to a protocol (i.e. 443 is HTTPS) - // so it's likely safe and probably also useful to leave them in - replacement = replacement + ":" + port - } - return replacement + suffix -} - -// parseIPAndPort returns (host, port) if the host is a valid ip address with an optional port, else returns empty strings. -func parseIPAndPort(input string) (host, port, suffix string) { - host, port, valid := splitHostPort(input) - if !valid { - host = input - } - if ok, i := isParseableIP(host); ok { - return host[:i], port, host[i:] - } - return "", "", "" -} - -func isParseableIP(s string) (parsed bool, lastIndex int) { - if len(s) == 0 { - return false, -1 - } - // Must start with a hex digit, or IPv6 can have a preceding ':' - switch s[0] { - case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'a', 'b', 'c', 'd', 'e', 'f', - 'A', 'B', 'C', 'D', 'E', 'F', - ':': - default: - return false, -1 - } - for i := 0; i < len(s); i++ { - switch s[i] { - case '.', '_', '-': - return parseIPv4(s, s[i]) - case ':': - // IPv6 - if _, err := netip.ParseAddr(s); err == nil { - return true, len(s) - } - return false, -1 - case '%': - // Assume that this was trying to be an IPv6 address with - // a zone specifier, but the address is missing. - return false, -1 - } - } - return false, -1 -} - -// parseIsIPv4 parses s as an IPv4 address and returns whether it is an IP address -// modified from netip to accept alternate separators besides '.' -// also modified to return true if s is an IPv4 address with trailing characters -func parseIPv4(s string, sep byte) (parsed bool, lastIndex int) { - var fields [4]uint8 - var val, pos int - var digLen int // number of digits in current octet - for i := 0; i < len(s); i++ { - if s[i] >= '0' && s[i] <= '9' { - if digLen == 1 && val == 0 { - return false, -1 - } - val = val*10 + int(s[i]) - '0' - digLen++ - if val > 255 { - return false, -1 - } - } else if s[i] == sep { - // .1.2.3 - // 1.2.3. - // 1..2.3 - if i == 0 || i == len(s)-1 || s[i-1] == sep { - return false, -1 - } - // 1.2.3.4.5 - if pos == 3 { - return true, i - } - fields[pos] = uint8(val) - pos++ - val = 0 - digLen = 0 - } else { - if pos == 3 && digLen > 0 { - fields[3] = uint8(val) - return true, i - } - return false, -1 - } - } - if pos < 3 { - return false, -1 - } - fields[3] = uint8(val) - return true, len(s) -} - -// SplitHostPort splits a network address of the form "host:port", -// "host%zone:port", "[host]:port" or "[host%zone]:port" into host or -// host%zone and port. -// -// A literal IPv6 address in hostport must be enclosed in square -// brackets, as in "[::1]:80", "[::1%lo0]:80". -// -// See func Dial for a description of the hostport parameter, and host -// and port results. -// This function is a lightly modified net.SplitHostPort where we avoid -// allocating an error on failure to parse to improve performance. -func splitHostPort(hostport string) (host, port string, valid bool) { - j, k := 0, 0 - - // The port starts after the last colon. - i := strings.LastIndexByte(hostport, ':') - if i < 0 { - return "", "", false - } - - if hostport[0] == '[' { - // Expect the first ']' just before the last ':'. - end := strings.IndexByte(hostport, ']') - if end < 0 { - return "", "", false - } - switch end + 1 { - case len(hostport): - // There can't be a ':' behind the ']' now. - return "", "", false - case i: - // The expected result. - default: - // Either ']' isn't followed by a colon, or it is - // followed by a colon that is not the last one. - if hostport[end+1] == ':' { - return "", "", false - } - return "", "", false - } - host = hostport[1:end] - j, k = 1, end+1 // there can't be a '[' resp. ']' before these positions - } else { - host = hostport[:i] - if strings.IndexByte(host, ':') >= 0 { - return "", "", false - } - } - if strings.IndexByte(hostport[j:], '[') >= 0 { - return "", "", false - } - if strings.IndexByte(hostport[k:], ']') >= 0 { - return "", "", false - } - - port = hostport[i+1:] - return host, port, true -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json.go deleted file mode 100644 index d2a60ec68b..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json.go +++ /dev/null @@ -1,234 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "bytes" - "strconv" - "strings" - "sync" -) - -// ObfuscateMongoDBString obfuscates the given MongoDB JSON query. -func (o *Obfuscator) ObfuscateMongoDBString(cmd string) string { - return obfuscateJSONString(cmd, o.mongo) -} - -// ObfuscateElasticSearchString obfuscates the given ElasticSearch JSON query. -func (o *Obfuscator) ObfuscateElasticSearchString(cmd string) string { - return obfuscateJSONString(cmd, o.es) -} - -// ObfuscateOpenSearchString obfuscates the given OpenSearch JSON query. -func (o *Obfuscator) ObfuscateOpenSearchString(cmd string) string { - return obfuscateJSONString(cmd, o.openSearch) -} - -// obfuscateJSONString obfuscates the given span's tag using the given obfuscator. If the obfuscator is -// nil it is considered disabled. -func obfuscateJSONString(cmd string, obfuscator *jsonObfuscator) string { - if obfuscator == nil || cmd == "" { - // obfuscator is disabled or string is empty - return cmd - } - out, _ := obfuscator.obfuscate([]byte(cmd)) - // we should accept whatever the obfuscator returns, even if it's an error: a parsing - // error simply means that the JSON was invalid, meaning that we've only obfuscated - // as much of it as we could. It is safe to accept the output, even if partial. - return out -} - -type jsonObfuscator struct { - buffPool sync.Pool // pool for fixed-length buffers (50 showed to be the optimal running benchmarks with different length) - statePool sync.Pool // pool for jsonObfuscatorState values - keepKeys map[string]bool // the values for these keys will not be obfuscated - transformKeys map[string]bool // the values for these keys pass through the transformer - transformer func(string) string -} - -func newJSONObfuscator(cfg *JSONConfig, o *Obfuscator) *jsonObfuscator { - keepValue := make(map[string]bool, len(cfg.KeepValues)) - for _, v := range cfg.KeepValues { - keepValue[v] = true - } - var ( - transformKeys map[string]bool - transformer func(string) string - ) - if len(cfg.ObfuscateSQLValues) > 0 { - transformer = sqlObfuscationTransformer(o) - transformKeys = make(map[string]bool, len(cfg.ObfuscateSQLValues)) - for _, v := range cfg.ObfuscateSQLValues { - transformKeys[v] = true - } - } - return &jsonObfuscator{ - keepKeys: keepValue, - transformKeys: transformKeys, - transformer: transformer, - buffPool: sync.Pool{ - New: func() any { - return new(bytes.Buffer) - }, - }, - statePool: sync.Pool{ - New: func() any { - return &jsonObfuscatorState{ - closures: []bool{}, - } - }, - }, - } -} - -func sqlObfuscationTransformer(o *Obfuscator) func(string) string { - return func(s string) string { - result, err := o.ObfuscateSQLString(s) - if err != nil { - o.log.Debugf("Failed to obfuscate SQL string '%s': %s", s, err.Error()) - // instead of returning an empty string we explicitly return an error string here within the result in order - // to surface the problem clearly to the user - return "Datadog-agent failed to obfuscate SQL string. Enable agent debug logs for more info." - } - return result.Query - } -} - -type jsonObfuscatorState struct { - scan scanner // scanner - closures []bool // closure stack, true if object (e.g. {[{ => []bool{true, false, true}) - keepDepth int // the depth at which we've stopped obfuscating - key bool // true if scanning a key - wiped bool // true if obfuscation string (`"?"`) was already written for current value - keeping bool // true if not obfuscating - transformingValue bool // true if collecting the next literal for transformation -} - -func (st *jsonObfuscatorState) reset() { - st.scan.reset() - st.closures = st.closures[0:0] - st.keepDepth = 0 - st.key = false - st.wiped = false - st.keeping = false - st.transformingValue = false -} - -// setKey verifies if we are currently scanning a key based on the current state -// and updates the state accordingly. It must be called only after a closure or a -// value scan has ended. -func (st *jsonObfuscatorState) setKey() { - n := len(st.closures) - st.key = n == 0 || st.closures[n-1] // true if we are at top level or in an object - st.wiped = false -} - -func (p *jsonObfuscator) obfuscate(data []byte) (string, error) { - if len(data) == 0 { - return "", nil - } - - var out strings.Builder - st := p.statePool.Get().(*jsonObfuscatorState) - st.reset() - - buf := p.buffPool.Get().(*bytes.Buffer) // recording current token - buf.Reset() - defer func() { - p.statePool.Put(st) - p.buffPool.Put(buf) - }() - - out.Grow(len(data)) - buf.Grow(len(data) / 10) // Benchmarks show that the optimal point is a tenth of the data length. - for _, c := range data { - st.scan.bytes++ - op := st.scan.step(&st.scan, c) - depth := len(st.closures) - switch op { - case scanBeginObject: - // object begins: { - st.closures = append(st.closures, true) - st.setKey() - st.transformingValue = false - case scanBeginArray: - // array begins: [ - st.closures = append(st.closures, false) - st.setKey() - st.transformingValue = false - case scanEndArray, scanEndObject: - // array or object closing - if n := len(st.closures) - 1; n > 0 { - st.closures = st.closures[:n] - } - fallthrough - case scanObjectValue, scanArrayValue: - // done scanning value - st.setKey() - if st.transformingValue && p.transformer != nil { - v, err := strconv.Unquote(buf.String()) - if err != nil { - v = buf.String() - } - result := p.transformer(v) - out.WriteByte('"') - out.WriteString(result) - out.WriteByte('"') - st.transformingValue = false - buf.Reset() - } else if st.keeping && depth < st.keepDepth { - st.keeping = false - } - case scanBeginLiteral, scanContinue: - // starting or continuing a literal - if st.transformingValue { - buf.WriteByte(c) - continue - } else if st.key { - // it's a key - buf.WriteByte(c) - } else if !st.keeping { - // it's a value we're not keeping - if !st.wiped { - out.WriteString(`"?"`) - st.wiped = true - } - continue - } - case scanObjectKey: - // done scanning key - k := string(bytes.Trim(buf.Bytes(), `"`)) - if !st.keeping && p.keepKeys[k] { - // we should not obfuscate values of this key - st.keeping = true - st.keepDepth = depth + 1 - } else if !st.transformingValue && p.transformer != nil && p.transformKeys[k] { - // the string value immediately following this key will be passed through the value transformer - // if anything other than a literal is found then sql obfuscation is stopped and json obfuscation - // proceeds as usual - st.transformingValue = true - } - buf.Reset() - st.key = false - case scanSkipSpace: - continue - case scanError: - // we've encountered an error, mark that there might be more JSON - // using the ellipsis and return whatever we've managed to obfuscate - // thus far. - out.WriteString("...") - return out.String(), st.scan.err - } - out.WriteByte(c) - } - if st.scan.eof() == scanError { - // if an error occurred it's fine, simply add the ellipsis to indicate - // that the input has been truncated. - out.Write([]byte("...")) - return out.String(), st.scan.err - } - return out.String(), nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json_scanner.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json_scanner.go deleted file mode 100644 index 6c490bbcf0..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/json_scanner.go +++ /dev/null @@ -1,560 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Copyright 2010 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. - -// -// The code that follows is copied from go/src/encoding/json/scanner.go -// It may contain minor edits, such as allowing multiple JSON objects within -// the same input string (see stateEndTop) -// - -package obfuscate - -import "strconv" - -// A SyntaxError is a description of a JSON syntax error. -type SyntaxError struct { - msg string // description of error - Offset int64 // error occurred after reading Offset bytes -} - -func (e *SyntaxError) Error() string { return e.msg } - -// A scanner is a JSON scanning state machine. -// Callers call scan.reset() and then pass bytes in one at a time -// by calling scan.step(&scan, c) for each byte. -// The return value, referred to as an opcode, tells the -// caller about significant parsing events like beginning -// and ending literals, objects, and arrays, so that the -// caller can follow along if it wishes. -// The return value scanEnd indicates that a single top-level -// JSON value has been completed, *before* the byte that -// just got passed in. (The indication must be delayed in order -// to recognize the end of numbers: is 123 a whole value or -// the beginning of 12345e+6?). -type scanner struct { - // The step is a func to be called to execute the next transition. - // Also tried using an integer constant and a single func - // with a switch, but using the func directly was 10% faster - // on a 64-bit Mac Mini, and it's nicer to read. - step func(*scanner, byte) int - - // Reached end of top-level value. - endTop bool - - // Stack of what we're in the middle of - array values, object keys, object values. - parseState []int - - // Error that happened, if any. - err error - - // total bytes consumed, updated by decoder.Decode - bytes int64 -} - -// These values are returned by the state transition functions -// assigned to scanner.state and the method scanner.eof. -// They give details about the current state of the scan that -// callers might be interested to know about. -// It is okay to ignore the return value of any particular -// call to scanner.state: if one call returns scanError, -// every subsequent call will return scanError too. -const ( - // Continue. - scanContinue = iota // uninteresting byte - scanBeginLiteral // end implied by next result != scanContinue - scanBeginObject // begin object - scanObjectKey // just finished object key (string) - scanObjectValue // just finished non-last object value - scanEndObject // end object (implies scanObjectValue if possible) - scanBeginArray // begin array - scanArrayValue // just finished array value - scanEndArray // end array (implies scanArrayValue if possible) - scanSkipSpace // space byte; can skip; known to be last "continue" result - - // Stop. - scanEnd // top-level value ended *before* this byte; known to be first "stop" result - scanError // hit an error, scanner.err. -) - -// These values are stored in the parseState stack. -// They give the current state of a composite value -// being scanned. If the parser is inside a nested value -// the parseState describes the nested state, outermost at entry 0. -const ( - parseObjectKey = iota // parsing object key (before colon) - parseObjectValue // parsing object value (after colon) - parseArrayValue // parsing array value -) - -// reset prepares the scanner for use. -// It must be called before calling s.step. -func (s *scanner) reset() { - s.step = stateBeginValue - s.parseState = s.parseState[0:0] - s.err = nil - s.endTop = false -} - -// eof tells the scanner that the end of input has been reached. -// It returns a scan status just as s.step does. -func (s *scanner) eof() int { - if s.err != nil { - return scanError - } - if s.endTop { - return scanEnd - } - s.step(s, ' ') - if s.endTop { - return scanEnd - } - if s.err == nil { - s.err = &SyntaxError{"unexpected end of JSON input", s.bytes} - } - return scanError -} - -// pushParseState pushes a new parse state p onto the parse stack. -func (s *scanner) pushParseState(p int) { - s.parseState = append(s.parseState, p) -} - -// popParseState pops a parse state (already obtained) off the stack -// and updates s.step accordingly. -func (s *scanner) popParseState() { - n := len(s.parseState) - 1 - if n == 0 { - s.step = stateEndTop - s.endTop = true - return - } - s.parseState = s.parseState[0:n] - s.step = stateEndValue -} - -func isSpace(c byte) bool { - return c == ' ' || c == '\t' || c == '\r' || c == '\n' -} - -// stateBeginValueOrEmpty is the state after reading `[`. -func stateBeginValueOrEmpty(s *scanner, c byte) int { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - if c == ']' { - return stateEndValue(s, c) - } - return stateBeginValue(s, c) -} - -// stateBeginValue is the state at the beginning of the input. -func stateBeginValue(s *scanner, c byte) int { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - switch c { - case '{': - s.step = stateBeginStringOrEmpty - s.pushParseState(parseObjectKey) - return scanBeginObject - case '[': - s.step = stateBeginValueOrEmpty - s.pushParseState(parseArrayValue) - return scanBeginArray - case '"': - s.step = stateInString - return scanBeginLiteral - case '-': - s.step = stateNeg - return scanBeginLiteral - case '0': // beginning of 0.123 - s.step = state0 - return scanBeginLiteral - case 't': // beginning of true - s.step = stateT - return scanBeginLiteral - case 'f': // beginning of false - s.step = stateF - return scanBeginLiteral - case 'n': // beginning of null - s.step = stateN - return scanBeginLiteral - } - if '1' <= c && c <= '9' { // beginning of 1234.5 - s.step = state1 - return scanBeginLiteral - } - return s.error(c, "looking for beginning of value") -} - -// stateBeginStringOrEmpty is the state after reading `{`. -func stateBeginStringOrEmpty(s *scanner, c byte) int { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - n := len(s.parseState) - if c == '}' && n > 0 { - s.parseState[n-1] = parseObjectValue - return stateEndValue(s, c) - } - return stateBeginString(s, c) -} - -// stateBeginString is the state after reading `{"key": value,`. -func stateBeginString(s *scanner, c byte) int { - if c <= ' ' && isSpace(c) { - return scanSkipSpace - } - if c == '"' { - s.step = stateInString - return scanBeginLiteral - } - return s.error(c, "looking for beginning of object key string") -} - -// stateEndValue is the state after completing a value, -// such as after reading `{}` or `true` or `["x"`. -func stateEndValue(s *scanner, c byte) int { - n := len(s.parseState) - if n == 0 { - // Completed top-level before the current byte. - s.step = stateEndTop - s.endTop = true - return stateEndTop(s, c) - } - if c <= ' ' && isSpace(c) { - s.step = stateEndValue - return scanSkipSpace - } - ps := s.parseState[n-1] - switch ps { - case parseObjectKey: - if c == ':' { - s.parseState[n-1] = parseObjectValue - s.step = stateBeginValue - return scanObjectKey - } - return s.error(c, "after object key") - case parseObjectValue: - if c == ',' { - s.parseState[n-1] = parseObjectKey - s.step = stateBeginString - return scanObjectValue - } - if c == '}' { - s.popParseState() - return scanEndObject - } - return s.error(c, "after object key:value pair") - case parseArrayValue: - if c == ',' { - s.step = stateBeginValue - return scanArrayValue - } - if c == ']' { - s.popParseState() - return scanEndArray - } - return s.error(c, "after array element") - } - return s.error(c, "") -} - -// stateEndTop is the state after finishing the top-level value, -// such as after reading `{}` or `[1,2,3]`. -// Only space characters should be seen now. -func stateEndTop(s *scanner, c byte) int { - if c != ' ' && c != '\t' && c != '\r' && c != '\n' { - // The former behaviour has been removed. Now, if anything - // other than whitespace follows, we assume a new JSON string - // might be starting. This allows us to continue obfuscating - // further strings in cases where there are multiple JSON - // objects enumerated sequentially within the same input. - // This is a common case for ElasticSearch response bodies. - s.reset() - return s.step(s, c) - } - return scanEnd -} - -// stateInString is the state after reading `"`. -func stateInString(s *scanner, c byte) int { - if c == '"' { - s.step = stateEndValue - return scanContinue - } - if c == '\\' { - s.step = stateInStringEsc - return scanContinue - } - if c < 0x20 { - return s.error(c, "in string literal") - } - return scanContinue -} - -// stateInStringEsc is the state after reading `"\` during a quoted string. -func stateInStringEsc(s *scanner, c byte) int { - switch c { - case 'b', 'f', 'n', 'r', 't', '\\', '/', '"': - s.step = stateInString - return scanContinue - case 'u': - s.step = stateInStringEscU - return scanContinue - } - return s.error(c, "in string escape code") -} - -// stateInStringEscU is the state after reading `"\u` during a quoted string. -func stateInStringEscU(s *scanner, c byte) int { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU1 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU1 is the state after reading `"\u1` during a quoted string. -func stateInStringEscU1(s *scanner, c byte) int { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU12 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU12 is the state after reading `"\u12` during a quoted string. -func stateInStringEscU12(s *scanner, c byte) int { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInStringEscU123 - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateInStringEscU123 is the state after reading `"\u123` during a quoted string. -func stateInStringEscU123(s *scanner, c byte) int { - if '0' <= c && c <= '9' || 'a' <= c && c <= 'f' || 'A' <= c && c <= 'F' { - s.step = stateInString - return scanContinue - } - // numbers - return s.error(c, "in \\u hexadecimal character escape") -} - -// stateNeg is the state after reading `-` during a number. -func stateNeg(s *scanner, c byte) int { - if c == '0' { - s.step = state0 - return scanContinue - } - if '1' <= c && c <= '9' { - s.step = state1 - return scanContinue - } - return s.error(c, "in numeric literal") -} - -// state1 is the state after reading a non-zero integer during a number, -// such as after reading `1` or `100` but not `0`. -func state1(s *scanner, c byte) int { - if '0' <= c && c <= '9' { - s.step = state1 - return scanContinue - } - return state0(s, c) -} - -// state0 is the state after reading `0` during a number. -func state0(s *scanner, c byte) int { - if c == '.' { - s.step = stateDot - return scanContinue - } - if c == 'e' || c == 'E' { - s.step = stateE - return scanContinue - } - return stateEndValue(s, c) -} - -// stateDot is the state after reading the integer and decimal point in a number, -// such as after reading `1.`. -func stateDot(s *scanner, c byte) int { - if '0' <= c && c <= '9' { - s.step = stateDot0 - return scanContinue - } - return s.error(c, "after decimal point in numeric literal") -} - -// stateDot0 is the state after reading the integer, decimal point, and subsequent -// digits of a number, such as after reading `3.14`. -func stateDot0(s *scanner, c byte) int { - if '0' <= c && c <= '9' { - return scanContinue - } - if c == 'e' || c == 'E' { - s.step = stateE - return scanContinue - } - return stateEndValue(s, c) -} - -// stateE is the state after reading the mantissa and e in a number, -// such as after reading `314e` or `0.314e`. -func stateE(s *scanner, c byte) int { - if c == '+' || c == '-' { - s.step = stateESign - return scanContinue - } - return stateESign(s, c) -} - -// stateESign is the state after reading the mantissa, e, and sign in a number, -// such as after reading `314e-` or `0.314e+`. -func stateESign(s *scanner, c byte) int { - if '0' <= c && c <= '9' { - s.step = stateE0 - return scanContinue - } - return s.error(c, "in exponent of numeric literal") -} - -// stateE0 is the state after reading the mantissa, e, optional sign, -// and at least one digit of the exponent in a number, -// such as after reading `314e-2` or `0.314e+1` or `3.14e0`. -func stateE0(s *scanner, c byte) int { - if '0' <= c && c <= '9' { - return scanContinue - } - return stateEndValue(s, c) -} - -// stateT is the state after reading `t`. -func stateT(s *scanner, c byte) int { - if c == 'r' { - s.step = stateTr - return scanContinue - } - return s.error(c, "in literal true (expecting 'r')") -} - -// stateTr is the state after reading `tr`. -func stateTr(s *scanner, c byte) int { - if c == 'u' { - s.step = stateTru - return scanContinue - } - return s.error(c, "in literal true (expecting 'u')") -} - -// stateTru is the state after reading `tru`. -func stateTru(s *scanner, c byte) int { - if c == 'e' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal true (expecting 'e')") -} - -// stateF is the state after reading `f`. -func stateF(s *scanner, c byte) int { - if c == 'a' { - s.step = stateFa - return scanContinue - } - return s.error(c, "in literal false (expecting 'a')") -} - -// stateFa is the state after reading `fa`. -func stateFa(s *scanner, c byte) int { - if c == 'l' { - s.step = stateFal - return scanContinue - } - return s.error(c, "in literal false (expecting 'l')") -} - -// stateFal is the state after reading `fal`. -func stateFal(s *scanner, c byte) int { - if c == 's' { - s.step = stateFals - return scanContinue - } - return s.error(c, "in literal false (expecting 's')") -} - -// stateFals is the state after reading `fals`. -func stateFals(s *scanner, c byte) int { - if c == 'e' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal false (expecting 'e')") -} - -// stateN is the state after reading `n`. -func stateN(s *scanner, c byte) int { - if c == 'u' { - s.step = stateNu - return scanContinue - } - return s.error(c, "in literal null (expecting 'u')") -} - -// stateNu is the state after reading `nu`. -func stateNu(s *scanner, c byte) int { - if c == 'l' { - s.step = stateNul - return scanContinue - } - return s.error(c, "in literal null (expecting 'l')") -} - -// stateNul is the state after reading `nul`. -func stateNul(s *scanner, c byte) int { - if c == 'l' { - s.step = stateEndValue - return scanContinue - } - return s.error(c, "in literal null (expecting 'l')") -} - -// stateError is the state after reaching a syntax error, -// such as after reading `[1}` or `5.1.2`. -func stateError(_ *scanner, _ byte) int { - return scanError -} - -// error records an error and switches to the error state. -func (s *scanner) error(c byte, context string) int { - s.step = stateError - s.err = &SyntaxError{"invalid character " + quoteChar(c) + " " + context, s.bytes} - return scanError -} - -// quoteChar formats c as a quoted character literal -func quoteChar(c byte) string { - // special cases - different from quoted strings - if c == '\'' { - return `'\''` - } - if c == '"' { - return `'"'` - } - - // use quoted string with different quotation marks - s := strconv.Quote(string(c)) - return "'" + s[1:len(s)-1] + "'" -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/memcached.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/memcached.go deleted file mode 100644 index 5fd821fdb8..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/memcached.go +++ /dev/null @@ -1,26 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "strings" -) - -// ObfuscateMemcachedString obfuscates the Memcached command cmd. -func (o *Obfuscator) ObfuscateMemcachedString(cmd string) string { - if !o.opts.Memcached.KeepCommand { - // If the command shouldn't be kept, then the entire tag will - // be dropped. - return "" - } - // All memcached commands end with new lines [1]. In the case of storage - // commands, key values follow after. Knowing this, all we have to do - // to obfuscate the values is to remove everything that follows - // a new line. For non-storage commands, this will have no effect. - // [1]: https://github.com/memcached/memcached/blob/master/doc/protocol.txt - truncated := strings.SplitN(cmd, "\r\n", 2)[0] - return strings.TrimSpace(truncated) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go deleted file mode 100644 index c6b70a696b..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/obfuscate.go +++ /dev/null @@ -1,394 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package obfuscate implements quantizing and obfuscating of tags and resources for -// a set of spans matching a certain criteria. -// -// This module is used in the Datadog Agent, the Go tracing client (dd-trace-go) and in the -// OpenTelemetry Collector Datadog exporter./ End-user behavior is stable, but there are no -// stability guarantees on its public Go API. Nonetheless, if editing try to avoid breaking -// API changes if possible and double check the API usage on all module dependents. -package obfuscate - -import ( - "bytes" - - "go.uber.org/atomic" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -// Version is an incrementing integer to identify this "version" of obfuscation logic. This is used to avoid obfuscation -// conflicts and ensure that clients of the obfuscator can decide where obfuscation should occur. -const Version = 1 - -// Obfuscator quantizes and obfuscates spans. The obfuscator is not safe for -// concurrent use. -type Obfuscator struct { - opts *Config - es *jsonObfuscator // nil if disabled - openSearch *jsonObfuscator // nil if disabled - mongo *jsonObfuscator // nil if disabled - sqlExecPlan *jsonObfuscator // nil if disabled - sqlExecPlanNormalize *jsonObfuscator // nil if disabled - ccObfuscator *creditCard // nil if disabled - // sqlLiteralEscapes reports whether we should treat escape characters literally or as escape characters. - // Different SQL engines behave in different ways and the tokenizer needs to be generic. - sqlLiteralEscapes *atomic.Bool - // queryCache keeps a cache of already obfuscated queries. - queryCache *measuredCache - log Logger -} - -// Logger is able to log certain log messages. -type Logger interface { - // Debugf logs the given message using the given format. - Debugf(format string, params ...interface{}) -} - -type noopLogger struct{} - -func (noopLogger) Debugf(_ string, _ ...interface{}) {} - -// setSQLLiteralEscapes sets whether or not escape characters should be treated literally by the SQL obfuscator. -func (o *Obfuscator) setSQLLiteralEscapes(ok bool) { - if ok { - o.sqlLiteralEscapes.Store(true) - } else { - o.sqlLiteralEscapes.Store(false) - } -} - -// useSQLLiteralEscapes reports whether escape characters will be treated literally by the SQL obfuscator. -// Some SQL engines require it and others don't. It will be detected as SQL queries are being obfuscated -// through calls to ObfuscateSQLString and automatically set for future. -func (o *Obfuscator) useSQLLiteralEscapes() bool { - return o.sqlLiteralEscapes.Load() -} - -// Config holds the configuration for obfuscating sensitive data for various span types. -type Config struct { - // SQL holds the obfuscation configuration for SQL queries. - SQL SQLConfig - - // ES holds the obfuscation configuration for ElasticSearch bodies. - ES JSONConfig `mapstructure:"elasticsearch"` - - // OpenSearch holds the obfuscation configuration for OpenSearch bodies. - OpenSearch JSONConfig `mapstructure:"opensearch"` - - // Mongo holds the obfuscation configuration for MongoDB queries. - Mongo JSONConfig `mapstructure:"mongodb"` - - // SQLExecPlan holds the obfuscation configuration for SQL Exec Plans. This is strictly for safety related obfuscation, - // not normalization. Normalization of exec plans is configured in SQLExecPlanNormalize. - SQLExecPlan JSONConfig `mapstructure:"sql_exec_plan"` - - // SQLExecPlanNormalize holds the normalization configuration for SQL Exec Plans. - SQLExecPlanNormalize JSONConfig `mapstructure:"sql_exec_plan_normalize"` - - // HTTP holds the obfuscation settings for HTTP URLs. - HTTP HTTPConfig `mapstructure:"http"` - - // Redis holds the obfuscation settings for Redis commands. - Redis RedisConfig `mapstructure:"redis"` - - // Valkey holds the obfuscation settings for Valkey commands. - Valkey ValkeyConfig `mapstructure:"valkey"` - - // Memcached holds the obfuscation settings for Memcached commands. - Memcached MemcachedConfig `mapstructure:"memcached"` - - // Memcached holds the obfuscation settings for obfuscation of CC numbers in meta. - CreditCard CreditCardsConfig `mapstructure:"credit_cards"` - - // Statsd specifies the statsd client to use for reporting metrics. - Statsd StatsClient - - // Logger specifies the logger to use when outputting messages. - // If unset, no logs will be outputted. - Logger Logger - - // Cache enables the query cache for obfuscation for SQL and MongoDB queries. - Cache CacheConfig `mapstructure:"cache"` -} - -// StatsClient implementations are able to emit stats. -type StatsClient interface { - // Gauge reports a gauge stat with the given name, value, tags and rate. - Gauge(name string, value float64, tags []string, rate float64) error -} - -// ObfuscationMode specifies the obfuscation mode to use for go-sqllexer pkg. -type ObfuscationMode string - -// ObfuscationMode valid values -const ( - NormalizeOnly = ObfuscationMode("normalize_only") - ObfuscateOnly = ObfuscationMode("obfuscate_only") - ObfuscateAndNormalize = ObfuscationMode("obfuscate_and_normalize") -) - -// SQLConfig holds the config for obfuscating SQL. -type SQLConfig struct { - // DBMS identifies the type of database management system (e.g. MySQL, Postgres, and SQL Server). - // Valid values for this can be found at https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#connection-level-attributes - DBMS string `json:"dbms"` - - // TableNames specifies whether the obfuscator should also extract the table names that a query addresses, - // in addition to obfuscating. - TableNames bool `json:"table_names" yaml:"table_names"` - - // CollectCommands specifies whether the obfuscator should extract and return commands as SQL metadata when obfuscating. - CollectCommands bool `json:"collect_commands" yaml:"collect_commands"` - - // CollectComments specifies whether the obfuscator should extract and return comments as SQL metadata when obfuscating. - CollectComments bool `json:"collect_comments" yaml:"collect_comments"` - - // CollectProcedures specifies whether the obfuscator should extract and return procedure names as SQL metadata when obfuscating. - CollectProcedures bool `json:"collect_procedures" yaml:"collect_procedures"` - - // ReplaceDigits specifies whether digits in table names and identifiers should be obfuscated. - ReplaceDigits bool `json:"replace_digits" yaml:"replace_digits"` - - // KeepSQLAlias reports whether SQL aliases ("AS") should be truncated. - KeepSQLAlias bool `json:"keep_sql_alias"` - - // DollarQuotedFunc reports whether to treat "$func$" delimited dollar-quoted strings - // differently and not obfuscate them as a string. To read more about dollar quoted - // strings see: - // - // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING - DollarQuotedFunc bool `json:"dollar_quoted_func"` - - // ObfuscationMode specifies the obfuscation mode to use for go-sqllexer pkg. - // When specified, obfuscator will attempt to use go-sqllexer pkg to obfuscate (and normalize) SQL queries. - // Valid values are "normalize_only", "obfuscate_only", "obfuscate_and_normalize" - ObfuscationMode ObfuscationMode `json:"obfuscation_mode" yaml:"obfuscation_mode"` - - // RemoveSpaceBetweenParentheses specifies whether to remove spaces between parentheses. - // By default, spaces are inserted between parentheses during normalization. - // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". - RemoveSpaceBetweenParentheses bool `json:"remove_space_between_parentheses" yaml:"remove_space_between_parentheses"` - - // KeepNull specifies whether to disable obfuscate NULL value with ?. - // This option is only valid when ObfuscationMode is "obfuscate_only" or "obfuscate_and_normalize". - KeepNull bool `json:"keep_null" yaml:"keep_null"` - - // KeepBoolean specifies whether to disable obfuscate boolean value with ?. - // This option is only valid when ObfuscationMode is "obfuscate_only" or "obfuscate_and_normalize". - KeepBoolean bool `json:"keep_boolean" yaml:"keep_boolean"` - - // KeepPositionalParameter specifies whether to disable obfuscate positional parameter with ?. - // This option is only valid when ObfuscationMode is "obfuscate_only" or "obfuscate_and_normalize". - KeepPositionalParameter bool `json:"keep_positional_parameter" yaml:"keep_positional_parameter"` - - // KeepTrailingSemicolon specifies whether to keep trailing semicolon. - // By default, trailing semicolon is removed during normalization. - // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". - KeepTrailingSemicolon bool `json:"keep_trailing_semicolon" yaml:"keep_trailing_semicolon"` - - // KeepIdentifierQuotation specifies whether to keep identifier quotation, e.g. "my_table" or [my_table]. - // By default, identifier quotation is removed during normalization. - // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". - KeepIdentifierQuotation bool `json:"keep_identifier_quotation" yaml:"keep_identifier_quotation"` - - // KeepJSONPath specifies whether to keep JSON paths following JSON operators in SQL statements in obfuscation. - // By default, JSON paths are treated as literals and are obfuscated to ?, e.g. "data::jsonb -> 'name'" -> "data::jsonb -> ?". - // This option is only valid when ObfuscationMode is "normalize_only" or "obfuscate_and_normalize". - KeepJSONPath bool `json:"keep_json_path" yaml:"keep_json_path"` - - // Cache is deprecated. Please use `apm_config.obfuscation.cache` instead. - Cache bool `json:"cache" yaml:"cache"` -} - -// SQLMetadata holds metadata collected throughout the obfuscation of an SQL statement. It is only -// collected when enabled via SQLConfig. -type SQLMetadata struct { - // Size holds the byte size of the metadata collected. - Size int64 - // TablesCSV is a comma-separated list of tables that the query addresses. - TablesCSV string `json:"tables_csv"` - // Commands holds commands executed in an SQL statement. - // e.g. SELECT, UPDATE, INSERT, DELETE, etc. - Commands []string `json:"commands"` - // Comments holds comments in an SQL statement. - Comments []string `json:"comments"` - // Procedures holds procedure names in an SQL statement. - Procedures []string `json:"procedures"` -} - -// HTTPConfig holds the configuration settings for HTTP obfuscation. -type HTTPConfig struct { - // RemoveQueryStrings determines query strings to be removed from HTTP URLs. - RemoveQueryString bool `mapstructure:"remove_query_string" json:"remove_query_string"` - - // RemovePathDigits determines digits in path segments to be obfuscated. - RemovePathDigits bool `mapstructure:"remove_paths_with_digits" json:"remove_path_digits"` -} - -// RedisConfig holds the configuration settings for Redis obfuscation -type RedisConfig struct { - // Enabled specifies whether this feature should be enabled. - Enabled bool `mapstructure:"enabled"` - - // RemoveAllArgs specifies whether all arguments to a given Redis - // command should be obfuscated. - RemoveAllArgs bool `mapstructure:"remove_all_args"` -} - -// ValkeyConfig holds the configuration settings for Valkey obfuscation -type ValkeyConfig struct { - // Enabled specifies whether this feature should be enabled. - Enabled bool `mapstructure:"enabled"` - - // RemoveAllArgs specifies whether all arguments to a given Valkey - // command should be obfuscated. - RemoveAllArgs bool `mapstructure:"remove_all_args"` -} - -// MemcachedConfig holds the configuration settings for Memcached obfuscation -type MemcachedConfig struct { - // Enabled specifies whether this feature should be enabled. - Enabled bool `mapstructure:"enabled"` - - // KeepCommand specifies whether the command of a given Memcached - // query should be kept. If false, the entire tag is removed. - KeepCommand bool `mapstructure:"keep_command"` -} - -// JSONConfig holds the obfuscation configuration for sensitive -// data found in JSON objects. -type JSONConfig struct { - // Enabled will specify whether obfuscation should be enabled. - Enabled bool `mapstructure:"enabled"` - - // KeepValues will specify a set of keys for which their values will - // not be obfuscated. - KeepValues []string `mapstructure:"keep_values"` - - // ObfuscateSQLValues will specify a set of keys for which their values - // will be passed through SQL obfuscation - ObfuscateSQLValues []string `mapstructure:"obfuscate_sql_values"` -} - -// CreditCardsConfig holds the configuration for credit card obfuscation in -// (Meta) tags. -type CreditCardsConfig struct { - // Enabled specifies whether this feature should be enabled. - Enabled bool `mapstructure:"enabled"` - - // Luhn specifies whether Luhn checksum validation should be enabled. - // https://dev.to/shiraazm/goluhn-a-simple-library-for-generating-calculating-and-verifying-luhn-numbers-588j - // It reduces false positives, but increases the CPU time X3. - Luhn bool `mapstructure:"luhn"` - - // KeepValues specifies tag keys that are known to not ever contain credit cards - // and therefore their values can be kept. - KeepValues []string `mapstructure:"keep_values"` -} - -// CacheConfig holds the configuration for caching obfuscated queries. -type CacheConfig struct { - // Enabled specifies whether caching should be enabled. - Enabled bool `mapstructure:"enabled"` - - // MaxSize is the maximum size of the cache in bytes. - MaxSize int64 `mapstructure:"max_size"` -} - -// NewObfuscator creates a new obfuscator -func NewObfuscator(cfg Config) *Obfuscator { - if cfg.Logger == nil { - cfg.Logger = noopLogger{} - } - o := Obfuscator{ - opts: &cfg, - queryCache: newMeasuredCache(cacheOptions{On: cfg.Cache.Enabled, Statsd: cfg.Statsd, MaxSize: cfg.Cache.MaxSize}), - sqlLiteralEscapes: atomic.NewBool(false), - log: cfg.Logger, - } - if cfg.ES.Enabled { - o.es = newJSONObfuscator(&cfg.ES, &o) - } - if cfg.OpenSearch.Enabled { - o.openSearch = newJSONObfuscator(&cfg.OpenSearch, &o) - } - if cfg.Mongo.Enabled { - o.mongo = newJSONObfuscator(&cfg.Mongo, &o) - } - if cfg.SQLExecPlan.Enabled { - o.sqlExecPlan = newJSONObfuscator(&cfg.SQLExecPlan, &o) - } - if cfg.SQLExecPlanNormalize.Enabled { - o.sqlExecPlanNormalize = newJSONObfuscator(&cfg.SQLExecPlanNormalize, &o) - } - if cfg.CreditCard.Enabled { - o.ccObfuscator = newCCObfuscator(&cfg.CreditCard) - } - if cfg.Statsd == nil { - cfg.Statsd = &statsd.NoOpClient{} - } - return &o -} - -// Stop cleans up after a finished Obfuscator. -func (o *Obfuscator) Stop() { - if o.queryCache != nil { - o.queryCache.Close() - } -} - -// compactWhitespaces compacts all whitespaces in t. -func compactWhitespaces(t string) string { - n := len(t) - r := make([]byte, n) - spaceCode := uint8(32) - isWhitespace := func(char uint8) bool { return char == spaceCode } - nr := 0 - offset := 0 - for i := 0; i < n; i++ { - if isWhitespace(t[i]) { - copy(r[nr:], t[nr+offset:i]) - r[i-offset] = spaceCode - nr = i + 1 - offset - for j := i + 1; j < n; j++ { - if !isWhitespace(t[j]) { - offset += j - i - 1 - i = j - break - } else if j == n-1 { - offset += j - i - i = j - break - } - } - } - } - copy(r[nr:], t[nr+offset:n]) - r = r[:n-offset] - return string(bytes.Trim(r, " ")) -} - -// replaceDigits replaces consecutive sequences of digits with '?', -// example: "jobs_2020_1597876964" --> "jobs_?_?" -func replaceDigits(buffer []byte) []byte { - scanningDigit := false - filtered := buffer[:0] - for _, b := range buffer { - // digits are encoded as 1 byte in utf8 - if isDigit(rune(b)) { - if scanningDigit { - continue - } - scanningDigit = true - filtered = append(filtered, byte('?')) - continue - } - scanningDigit = false - filtered = append(filtered, b) - } - return filtered -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis.go deleted file mode 100644 index 70a1323eef..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis.go +++ /dev/null @@ -1,301 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "strings" -) - -// redisTruncationMark is used as suffix by tracing libraries to indicate that a -// command was truncated. -const redisTruncationMark = "..." - -const maxRedisNbCommands = 3 - -// Redis commands consisting in 2 words -var redisCompoundCommandSet = map[string]bool{ - "CLIENT": true, "CLUSTER": true, "COMMAND": true, "CONFIG": true, "DEBUG": true, "SCRIPT": true} - -// QuantizeRedisString returns a quantized version of a Redis query. -// -// TODO(gbbr): Refactor this method to use the tokenizer and -// remove "compactWhitespaces". This method is buggy when commands -// contain quoted strings with newlines. -func (*Obfuscator) QuantizeRedisString(query string) string { - query = compactWhitespaces(query) - - var resource strings.Builder - truncated := false - nbCmds := 0 - - for len(query) > 0 && nbCmds < maxRedisNbCommands { - var rawLine string - - // Read the next command - idx := strings.IndexByte(query, '\n') - if idx == -1 { - rawLine = query - query = "" - } else { - rawLine = query[:idx] - query = query[idx+1:] - } - - line := strings.Trim(rawLine, " ") - if len(line) == 0 { - continue - } - - // Parse arguments - args := strings.SplitN(line, " ", 3) - - if strings.HasSuffix(args[0], redisTruncationMark) { - truncated = true - continue - } - - command := strings.ToUpper(args[0]) - - if redisCompoundCommandSet[command] && len(args) > 1 { - if strings.HasSuffix(args[1], redisTruncationMark) { - truncated = true - continue - } - - command += " " + strings.ToUpper(args[1]) - } - - // Write the command representation - resource.WriteByte(' ') - resource.WriteString(command) - - nbCmds++ - truncated = false - } - - if nbCmds == maxRedisNbCommands || truncated { - resource.WriteString(" ...") - } - - return strings.Trim(resource.String(), " ") -} - -// ObfuscateRedisString obfuscates the given Redis command. -func (*Obfuscator) ObfuscateRedisString(rediscmd string) string { - t := newRedisTokenizer([]byte(rediscmd)) - var ( - str strings.Builder - cmd string - args []string - ) - for { - tok, typ, done := t.scan() - switch typ { - case redisTokenCommand: - // new command starting - if cmd != "" { - // a previous command was buffered, obfuscate it - obfuscateRedisCmd(&str, cmd, args...) - str.WriteByte('\n') - } - cmd = tok - args = args[:0] - case redisTokenArgument: - args = append(args, tok) - } - if done { - // last command - obfuscateRedisCmd(&str, cmd, args...) - break - } - } - return str.String() -} - -func obfuscateRedisCmd(out *strings.Builder, cmd string, args ...string) { - out.WriteString(cmd) - if len(args) == 0 { - return - } - out.WriteByte(' ') - - switch strings.ToUpper(cmd) { - case "AUTH": - // Obfuscate everything after command - // • AUTH password - if len(args) > 0 { - args[0] = "?" - args = args[:1] - } - - case "APPEND", "GETSET", "LPUSHX", "GEORADIUSBYMEMBER", "RPUSHX", - "SET", "SETNX", "SISMEMBER", "ZRANK", "ZREVRANK", "ZSCORE": - // Obfuscate 2nd argument: - // • APPEND key value - // • GETSET key value - // • LPUSHX key value - // • GEORADIUSBYMEMBER key member radius m|km|ft|mi [WITHCOORD] [WITHDIST] [WITHHASH] [COUNT count] [ASC|DESC] [STORE key] [STOREDIST key] - // • RPUSHX key value - // • SET key value [expiration EX seconds|PX milliseconds] [NX|XX] - // • SETNX key value - // • SISMEMBER key member - // • ZRANK key member - // • ZREVRANK key member - // • ZSCORE key member - obfuscateRedisArgN(args, 1) - - case "HSET", "HSETNX", "LREM", "LSET", "SETBIT", "SETEX", "PSETEX", - "SETRANGE", "ZINCRBY", "SMOVE", "RESTORE": - // Obfuscate 3rd argument: - // • HSET key field value - // • HSETNX key field value - // • LREM key count value - // • LSET key index value - // • SETBIT key offset value - // • SETEX key seconds value - // • PSETEX key milliseconds value - // • SETRANGE key offset value - // • ZINCRBY key increment member - // • SMOVE source destination member - // • RESTORE key ttl serialized-value [REPLACE] - obfuscateRedisArgN(args, 2) - - case "LINSERT": - // Obfuscate 4th argument: - // • LINSERT key BEFORE|AFTER pivot value - obfuscateRedisArgN(args, 3) - - case "GEOHASH", "GEOPOS", "GEODIST", "LPUSH", "RPUSH", "SREM", - "ZREM", "SADD": - // Obfuscate all arguments after the first one. - // • GEOHASH key member [member ...] - // • GEOPOS key member [member ...] - // • GEODIST key member1 member2 [unit] - // • LPUSH key value [value ...] - // • RPUSH key value [value ...] - // • SREM key member [member ...] - // • ZREM key member [member ...] - // • SADD key member [member ...] - if len(args) > 1 { - args[1] = "?" - args = args[:2] - } - - case "GEOADD": - // Obfuscating every 3rd argument starting from first - // • GEOADD key longitude latitude member [longitude latitude member ...] - obfuscateRedisArgsStep(args, 1, 3) - - case "HMSET": - // Every 2nd argument starting from first. - // • HMSET key field value [field value ...] - obfuscateRedisArgsStep(args, 1, 2) - - case "MSET", "MSETNX": - // Every 2nd argument starting from command. - // • MSET key value [key value ...] - // • MSETNX key value [key value ...] - obfuscateRedisArgsStep(args, 0, 2) - - case "CONFIG": - // Obfuscate 2nd argument to SET sub-command. - // • CONFIG SET parameter value - if strings.ToUpper(args[0]) == "SET" { - obfuscateRedisArgN(args, 2) - } - - case "BITFIELD": - // Obfuscate 3rd argument to SET sub-command: - // • BITFIELD key [GET type offset] [SET type offset value] [INCRBY type offset increment] [OVERFLOW WRAP|SAT|FAIL] - var n int - for i, arg := range args { - if strings.ToUpper(arg) == "SET" { - n = i - } - if n > 0 && i-n == 3 { - args[i] = "?" - break - } - } - - case "ZADD": - // Obfuscate every 2nd argument after potential optional ones. - // • ZADD key [NX|XX] [CH] [INCR] score member [score member ...] - var i int - loop: - for i = range args { - if i == 0 { - continue // key - } - switch args[i] { - case "NX", "XX", "CH", "INCR": - // continue - default: - break loop - } - } - obfuscateRedisArgsStep(args, i, 2) - - default: - // Obfuscate nothing. - } - out.WriteString(strings.Join(args, " ")) -} - -// RemoveAllRedisArgs will take in a command and obfuscate all arguments following -// the command, regardless of if the command is valid Redis or not -func (*Obfuscator) RemoveAllRedisArgs(rediscmd string) string { - fullCmd := strings.Fields(rediscmd) - if len(fullCmd) == 0 { - return "" - } - cmd, args := fullCmd[0], fullCmd[1:] - - var out strings.Builder - out.WriteString(cmd) - if len(args) == 0 { - return out.String() - } - - out.WriteByte(' ') - switch strings.ToUpper(cmd) { - case "BITFIELD": - out.WriteString("?") - for _, a := range args { - arg := strings.ToUpper(a) - if arg == "SET" || arg == "GET" || arg == "INCRBY" { - out.WriteString(strings.Join([]string{"", a, "?"}, " ")) - } - } - case "CONFIG": - arg := strings.ToUpper(args[0]) - if arg == "GET" || arg == "SET" || arg == "RESETSTAT" || arg == "REWRITE" { - out.WriteString(strings.Join([]string{args[0], "?"}, " ")) - } else { - out.WriteString("?") - } - default: - out.WriteString("?") - } - - return out.String() -} - -func obfuscateRedisArgN(args []string, n int) { - if len(args) > n { - args[n] = "?" - } -} - -func obfuscateRedisArgsStep(args []string, start, step int) { - if start+step-1 >= len(args) { - // can't reach target - return - } - for i := start + step - 1; i < len(args); i += step { - args[i] = "?" - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis_tokenizer.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis_tokenizer.go deleted file mode 100644 index d4ef2dc332..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/redis_tokenizer.go +++ /dev/null @@ -1,187 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "bytes" - "strings" -) - -// redisTokenType specifies the token type returned by the tokenizer. -type redisTokenType int - -const ( - // redisTokenCommand is a command token. For compound tokens, it is - // only the first part up to a space. - redisTokenCommand redisTokenType = iota - - // redisTokenArgument is an argument token. - redisTokenArgument -) - -// String implements fmt.Stringer. -func (t redisTokenType) String() string { - return map[redisTokenType]string{ - redisTokenCommand: "command", - redisTokenArgument: "argument", - }[t] -} - -// redisTokenizer tokenizes a Redis command string. The string can be on -// multiple lines. The tokenizer is capable of parsing quoted strings and escape -// sequences inside them. -type redisTokenizer struct { - data []byte - ch byte - off int - done bool - state redisParseState -} - -// redisParseState specifies the current state of the tokenizer. -type redisParseState int - -const ( - // redisStateCommand specifies that we are about to parse a command. - // It is usually the state at the beginning of the scan or after a - // new line. - redisStateCommand redisParseState = iota - - // redisStateArgument specifies that we are about to parse an argument - // to a command or the rest of the tokens in a compound command. - redisStateArgument -) - -// newRedisTokenizer returns a new tokenizer for the given data. -func newRedisTokenizer(data []byte) *redisTokenizer { - return &redisTokenizer{ - data: bytes.TrimSpace(data), - off: -1, - state: redisStateCommand, - } -} - -// scan returns the next token, it's type and a bool. The boolean specifies if -// the returned token was the last one. -func (t *redisTokenizer) scan() (tok string, typ redisTokenType, done bool) { - switch t.state { - case redisStateCommand: - return t.scanCommand() - default: - return t.scanArg() - } -} - -// next advances the scanner to the next character. -func (t *redisTokenizer) next() { - t.off++ - if t.off <= len(t.data)-1 { - t.ch = t.data[t.off] - return - } - t.done = true -} - -// scanCommand scans a command from the buffer. -func (t *redisTokenizer) scanCommand() (tok string, typ redisTokenType, done bool) { - var ( - str strings.Builder - started bool - ) - for { - t.next() - if t.done { - return str.String(), typ, t.done - } - switch t.ch { - case ' ': - if !started { - // skip spaces preceding token - t.skipSpace() - break - } - // done scanning command - t.state = redisStateArgument - t.skipSpace() - return str.String(), redisTokenCommand, t.done - case '\n': - return str.String(), redisTokenCommand, t.done - default: - str.WriteByte(t.ch) - } - started = true - } -} - -// scanArg scans an argument from the buffer. -func (t *redisTokenizer) scanArg() (tok string, typ redisTokenType, done bool) { - var ( - str strings.Builder - quoted bool // in quoted string - escape bool // escape sequence - ) - for { - t.next() - if t.done { - return str.String(), redisTokenArgument, t.done - } - switch t.ch { - case '\\': - str.WriteByte('\\') - if !escape { - // next character could be escaped - escape = true - continue - } - case '\n': - if !quoted { - // last argument, new command follows - t.state = redisStateCommand - return str.String(), redisTokenArgument, t.done - } - str.WriteByte('\n') - case '"': - str.WriteByte('"') - if !escape { - // this quote wasn't escaped, toggle quoted mode - quoted = !quoted - } - case ' ': - if !quoted { - t.skipSpace() - return str.String(), redisTokenArgument, t.done - } - str.WriteByte(' ') - default: - str.WriteByte(t.ch) - } - escape = false - } -} - -// unread is the reverse of next, unreading a character. -func (t *redisTokenizer) unread() { - if t.off < 1 { - return - } - t.off-- - t.ch = t.data[t.off] -} - -// skipSpace moves the cursor forward until it meets the last space -// in a sequence of contiguous spaces. -func (t *redisTokenizer) skipSpace() { - for t.ch == ' ' || t.ch == '\t' || t.ch == '\r' && !t.done { - t.next() - } - if t.ch == '\n' { - // next token is a command - t.state = redisStateCommand - } else { - // don't steal the first non-space character - t.unread() - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go deleted file mode 100644 index 30575dc24e..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql.go +++ /dev/null @@ -1,528 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "bytes" - "errors" - "fmt" - "strings" - "unicode" - "unicode/utf8" - - sqllexer "github.com/DataDog/go-sqllexer" -) - -var questionMark = []byte("?") - -// metadataFinderFilter is a filter which attempts to collect metadata from a query, such as comments and tables. -// It is meant to run before all the other filters. -type metadataFinderFilter struct { - collectTableNames bool - collectCommands bool - collectComments bool - replaceDigits bool - - // size holds the byte size of the metadata collected by the filter. - size int64 - // tablesSeen keeps track of unique table names encountered by the filter. - tablesSeen map[string]struct{} - // tablesCSV specifies a comma-separated list of tables. - tablesCSV strings.Builder - // commands keeps track of commands encountered by the filter. - commands []string - // comments keeps track of comments encountered by the filter. - comments []string -} - -func (f *metadataFinderFilter) Filter(token, lastToken TokenKind, buffer []byte) (TokenKind, []byte, error) { - if f.collectComments && token == Comment { - // A comment with line-breaks will be brought to a single line. - comment := strings.TrimSpace(strings.ReplaceAll(string(buffer), "\n", " ")) - f.size += int64(len(comment)) - f.comments = append(f.comments, comment) - } - if f.collectCommands { - switch token { - case Select, Update, Insert, Delete, Join, Alter, Drop, Create, Grant, Revoke, Commit, Begin, Truncate: - command := strings.ToUpper(token.String()) - f.size += int64(len(command)) - f.commands = append(f.commands, command) - } - } - if f.collectTableNames { - switch lastToken { - case From, Join: - // SELECT ... FROM [tableName] - // DELETE FROM [tableName] - // ... JOIN [tableName] - if r, _ := utf8.DecodeRune(buffer); !unicode.IsLetter(r) { - // first character in buffer is not a letter; we might have a nested - // query like SELECT * FROM (SELECT ...) - break - } - fallthrough - case Update, Into: - // UPDATE [tableName] - // INSERT INTO [tableName] - tableName := string(buffer) - if f.replaceDigits { - tableNameCopy := make([]byte, len(buffer)) - copy(tableNameCopy, buffer) - tableName = string(replaceDigits(tableNameCopy)) - } - f.storeTableName(tableName) - return TableName, buffer, nil - } - } - return token, buffer, nil -} - -func (f *metadataFinderFilter) storeTableName(name string) { - if _, ok := f.tablesSeen[name]; ok { - return - } - if f.tablesSeen == nil { - f.tablesSeen = make(map[string]struct{}, 1) - } - f.tablesSeen[name] = struct{}{} - if f.tablesCSV.Len() > 0 { - f.size++ - f.tablesCSV.WriteByte(',') - } - f.size += int64(len(name)) - f.tablesCSV.WriteString(name) -} - -// Results returns metadata collected by the filter for an SQL statement. -func (f *metadataFinderFilter) Results() SQLMetadata { - return SQLMetadata{ - Size: f.size, - TablesCSV: f.tablesCSV.String(), - Commands: f.commands, - Comments: f.comments, - } -} - -// Reset implements tokenFilter. -func (f *metadataFinderFilter) Reset() { - for k := range f.tablesSeen { - delete(f.tablesSeen, k) - } - f.size = 0 - f.tablesCSV.Reset() - f.commands = f.commands[:0] - f.comments = f.comments[:0] -} - -// discardFilter is a token filter which discards certain elements from a query, such as -// comments and AS aliases by returning a nil buffer. -type discardFilter struct { - keepSQLAlias bool -} - -// Filter the given token so that a `nil` slice is returned if the token is in the token filtered list. -func (f *discardFilter) Filter(token, lastToken TokenKind, buffer []byte) (TokenKind, []byte, error) { - // filters based on previous token - switch lastToken { - case FilteredBracketedIdentifier: - if token != ']' { - // we haven't found the closing bracket yet, keep going - if token != ID { - // the token between the brackets *must* be an identifier, - // otherwise the query is invalid. - return LexError, nil, fmt.Errorf("expected identifier in bracketed filter, got %d", token) - } - return FilteredBracketedIdentifier, nil, nil - } - fallthrough - case As: - if token == '[' { - // the identifier followed by AS is an MSSQL bracketed identifier - // and will continue to be discarded until we find the corresponding - // closing bracket counter-part. See GitHub issue DataDog/datadog-trace-agent#475. - return FilteredBracketedIdentifier, nil, nil - } - if f.keepSQLAlias { - return token, buffer, nil - } - return Filtered, nil, nil - } - - // filters based on the current token; if the next token should be ignored, - // return the same token value (not FilteredGroupable) and nil - switch token { - case Comment: - return Filtered, nil, nil - case ';': - return markFilteredGroupable(token), nil, nil - case As: - if !f.keepSQLAlias { - return As, nil, nil - } - fallthrough - default: - return token, buffer, nil - } -} - -// Reset implements tokenFilter. -func (f *discardFilter) Reset() {} - -// replaceFilter is a token filter which obfuscates strings and numbers in queries by replacing them -// with the "?" character. -type replaceFilter struct { - replaceDigits bool -} - -// Filter the given token so that it will be replaced if in the token replacement list -func (f *replaceFilter) Filter(token, lastToken TokenKind, buffer []byte) (tokenType TokenKind, tokenBytes []byte, err error) { - switch lastToken { - case Savepoint: - return markFilteredGroupable(token), questionMark, nil - case '=': - switch token { - case DoubleQuotedString: - // double-quoted strings after assignments are eligible for obfuscation - return markFilteredGroupable(token), questionMark, nil - } - } - switch token { - case DollarQuotedString, String, Number, Null, Variable, PreparedStatement, BooleanLiteral, EscapeSequence: - return markFilteredGroupable(token), questionMark, nil - case '?': - // Cases like 'ARRAY [ ?, ? ]' should be collapsed into 'ARRAY [ ? ]' - return markFilteredGroupable(token), questionMark, nil - case TableName, ID: - if f.replaceDigits { - return token, replaceDigits(buffer), nil - } - fallthrough - default: - return token, buffer, nil - } -} - -// Reset implements tokenFilter. -func (f *replaceFilter) Reset() {} - -// groupingFilter is a token filter which groups together items replaced by the replaceFilter. It is meant -// to run immediately after it. -type groupingFilter struct { - groupFilter int // counts the number of values, e.g. 3 = ?, ?, ? - groupMulti int // counts the number of groups, e.g. 2 = (?, ?), (?, ?, ?) -} - -// Filter the given token so that it will be discarded if a grouping pattern -// has been recognized. A grouping is composed by items like: -// - '( ?, ?, ? )' -// - '( ?, ? ), ( ?, ? )' -func (f *groupingFilter) Filter(token, lastToken TokenKind, buffer []byte) (tokenType TokenKind, tokenBytes []byte, err error) { - // increasing the number of groups means that we're filtering an entire group - // because it can be represented with a single '( ? )' - if (lastToken == '(' && isFilteredGroupable(token)) || (token == '(' && f.groupMulti > 0) { - f.groupMulti++ - } - - // Potential commands that could indicate the start of a subquery. - isStartOfSubquery := token == Select || token == Delete || token == Update || token == ID - - switch { - case f.groupMulti > 0 && lastToken == FilteredGroupableParenthesis && isStartOfSubquery: - // this is the start of a new group that seems to be a nested query; - // cancel grouping. - f.Reset() - return token, append([]byte("( "), buffer...), nil - case isFilteredGroupable(token): - // the previous filter has dropped this token so we should start - // counting the group filter so that we accept only one '?' for - // the same group - f.groupFilter++ - - if f.groupFilter > 1 { - return markFilteredGroupable(token), nil, nil - } - case f.groupFilter > 0 && (token == ',' || token == '?'): - // if we are in a group drop all commas - return markFilteredGroupable(token), nil, nil - case f.groupMulti > 1: - // drop all tokens since we're in a counting group - // and they're duplicated - return markFilteredGroupable(token), nil, nil - case token != ',' && token != '(' && token != ')' && !isFilteredGroupable(token): - // when we're out of a group reset the filter state - f.Reset() - } - - return token, buffer, nil -} - -// isFilteredGroupable reports whether token is to be considered filtered groupable. -func isFilteredGroupable(token TokenKind) bool { - switch token { - case FilteredGroupable, FilteredGroupableParenthesis: - return true - default: - return false - } -} - -// markFilteredGroupable returns the appropriate TokenKind to mark this token as -// filtered groupable. -func markFilteredGroupable(token TokenKind) TokenKind { - switch token { - case '(': - return FilteredGroupableParenthesis - default: - return FilteredGroupable - } -} - -// Reset resets the groupingFilter so that it may be used again. -func (f *groupingFilter) Reset() { - f.groupFilter = 0 - f.groupMulti = 0 -} - -func isSQLLexer(obfuscationMode ObfuscationMode) bool { - return obfuscationMode != "" -} - -// ObfuscateSQLString quantizes and obfuscates the given input SQL query string. Quantization removes -// some elements such as comments and aliases and obfuscation attempts to hide sensitive information -// in strings and numbers by redacting them. -func (o *Obfuscator) ObfuscateSQLString(in string) (*ObfuscatedQuery, error) { - return o.ObfuscateSQLStringWithOptions(in, &o.opts.SQL) -} - -// ObfuscateSQLStringForDBMS quantizes and obfuscates the given input SQL query string for a specific DBMS. -func (o *Obfuscator) ObfuscateSQLStringForDBMS(in string, dbms string) (*ObfuscatedQuery, error) { - if isSQLLexer(o.opts.SQL.ObfuscationMode) { - o.opts.SQL.DBMS = dbms - } - return o.ObfuscateSQLStringWithOptions(in, &o.opts.SQL) -} - -// ObfuscateSQLStringWithOptions accepts an optional SQLOptions to change the behavior of the obfuscator -// to quantize and obfuscate the given input SQL query string. Quantization removes some elements such as comments -// and aliases and obfuscation attempts to hide sensitive information in strings and numbers by redacting them. -func (o *Obfuscator) ObfuscateSQLStringWithOptions(in string, opts *SQLConfig) (oq *ObfuscatedQuery, err error) { - if o.queryCache.Cache != nil { - cacheKey := fmt.Sprintf("%v:%s", opts, in) - if v, ok := o.queryCache.Get(cacheKey); ok { - return v.(*ObfuscatedQuery), nil - } - - defer func() { - if oq != nil && err == nil { - o.queryCache.Set(cacheKey, oq, oq.Cost()) - } - }() - } - - if opts.ObfuscationMode != "" { - // If obfuscation mode is specified, we will use go-sqllexer pkg - // to obfuscate (and normalize) the query. - oq, err = o.ObfuscateWithSQLLexer(in, opts) - } else { - oq, err = o.obfuscateSQLString(in, opts) - } - - if err != nil { - return oq, err - } - - return oq, nil -} - -func (o *Obfuscator) obfuscateSQLString(in string, opts *SQLConfig) (*ObfuscatedQuery, error) { - lesc := o.useSQLLiteralEscapes() - tok := NewSQLTokenizer(in, lesc, opts) - out, err := attemptObfuscation(tok) - if err != nil && tok.SeenEscape() { - // If the tokenizer failed, but saw an escape character in the process, - // try again treating escapes differently - tok = NewSQLTokenizer(in, !lesc, opts) - if out, err2 := attemptObfuscation(tok); err2 == nil { - // If the second attempt succeeded, change the default behavior so that - // on the next run we get it right in the first run. - o.setSQLLiteralEscapes(!lesc) - return out, nil - } - } - return out, err -} - -// ObfuscatedQuery specifies information about an obfuscated SQL query. -type ObfuscatedQuery struct { - Query string `json:"query"` // the obfuscated SQL query - Metadata SQLMetadata `json:"metadata"` // metadata extracted from the SQL query -} - -// Cost returns the number of bytes needed to store all the fields -// of this ObfuscatedQuery. -func (oq *ObfuscatedQuery) Cost() int64 { - // The cost of the ObfuscatedQuery struct is the sum of the length of the query string, - // the size of the metadata content, and the size of the struct itself and its fields headers. - // 320 bytes come from - // - 112 bytes for the ObfuscatedQuery struct itself, measured by unsafe.Sizeof(ObfuscatedQuery{}) - // - 96 bytes for the Metadata struct itself, measured by unsafe.Sizeof(SQLMetadata{}) - // - 16 bytes for the Query string header - // - 16 bytes for the TablesCSV string header - // - 24 * 3 bytes for the Comments, Commands, and Procedures slices headers - // - 8 bytes for the Size int64 field - return int64(len(oq.Query)) + oq.Metadata.Size + 320 -} - -// attemptObfuscation attempts to obfuscate the SQL query loaded into the tokenizer, using the given set of filters. -func attemptObfuscation(tokenizer *SQLTokenizer) (*ObfuscatedQuery, error) { - var ( - out = bytes.NewBuffer(make([]byte, 0, len(tokenizer.buf))) - err error - lastToken TokenKind - metadata = metadataFinderFilter{ - collectTableNames: tokenizer.cfg.TableNames, - collectCommands: tokenizer.cfg.CollectCommands, - collectComments: tokenizer.cfg.CollectComments, - replaceDigits: tokenizer.cfg.ReplaceDigits, - } - discard = discardFilter{keepSQLAlias: tokenizer.cfg.KeepSQLAlias} - replace = replaceFilter{replaceDigits: tokenizer.cfg.ReplaceDigits} - grouping groupingFilter - ) - defer metadata.Reset() - // call Scan() function until tokens are available or if a LEX_ERROR is raised. After - // retrieving a token, send it to the tokenFilter chains so that the token is discarded - // or replaced. - for { - token, buff := tokenizer.Scan() - if token == EndChar { - break - } - if token == LexError { - return nil, fmt.Errorf("%v", tokenizer.Err()) - } - - if token, buff, err = metadata.Filter(token, lastToken, buff); err != nil { - return nil, err - } - if token, buff, err = discard.Filter(token, lastToken, buff); err != nil { - return nil, err - } - if token, buff, err = replace.Filter(token, lastToken, buff); err != nil { - return nil, err - } - if token, buff, err = grouping.Filter(token, lastToken, buff); err != nil { - return nil, err - } - if buff != nil { - if out.Len() != 0 { - switch token { - case ',': - case '=': - if lastToken == ':' { - // do not add a space before an equals if a colon was - // present before it. - break - } - fallthrough - default: - out.WriteRune(' ') - } - } - out.Write(buff) - } - lastToken = token - } - if out.Len() == 0 { - return nil, errors.New("result is empty") - } - return &ObfuscatedQuery{ - Query: out.String(), - Metadata: metadata.Results(), - }, nil -} - -// ObfuscateSQLExecPlan obfuscates query conditions in the provided JSON encoded execution plan. If normalize=True, -// then cost and row estimates are also obfuscated away. -func (o *Obfuscator) ObfuscateSQLExecPlan(jsonPlan string, normalize bool) (string, error) { - if normalize { - return o.sqlExecPlanNormalize.obfuscate([]byte(jsonPlan)) - } - return o.sqlExecPlan.obfuscate([]byte(jsonPlan)) -} - -// ObfuscateWithSQLLexer obfuscates the given SQL query using the go-sqllexer package. -// If ObfuscationMode is set to ObfuscateOnly, the query will be obfuscated without normalizing it. -func (o *Obfuscator) ObfuscateWithSQLLexer(in string, opts *SQLConfig) (*ObfuscatedQuery, error) { - if opts.ObfuscationMode != NormalizeOnly && opts.ObfuscationMode != ObfuscateOnly && opts.ObfuscationMode != ObfuscateAndNormalize { - return nil, fmt.Errorf("invalid obfuscation mode: %s", opts.ObfuscationMode) - } - - var obfuscator *sqllexer.Obfuscator - - if opts.ObfuscationMode == ObfuscateOnly || opts.ObfuscationMode == ObfuscateAndNormalize { - obfuscator = sqllexer.NewObfuscator( - sqllexer.WithReplaceDigits(opts.ReplaceDigits), - sqllexer.WithDollarQuotedFunc(opts.DollarQuotedFunc), - sqllexer.WithReplacePositionalParameter(!opts.KeepPositionalParameter), - sqllexer.WithReplaceBoolean(!opts.KeepBoolean), - sqllexer.WithReplaceNull(!opts.KeepNull), - sqllexer.WithKeepJsonPath(opts.KeepJSONPath), - ) - } - - if opts.ObfuscationMode == ObfuscateOnly { - // Obfuscate the query without normalizing it. - out := obfuscator.Obfuscate(in, sqllexer.WithDBMS(sqllexer.DBMSType(opts.DBMS))) - return &ObfuscatedQuery{ - Query: out, - }, nil - } - - // Obfuscate the query and normalize it. - normalizer := sqllexer.NewNormalizer( - sqllexer.WithCollectComments(opts.CollectComments), - sqllexer.WithCollectCommands(opts.CollectCommands), - sqllexer.WithCollectTables(opts.TableNames), - sqllexer.WithCollectProcedures(opts.CollectProcedures), - sqllexer.WithKeepSQLAlias(opts.KeepSQLAlias), - sqllexer.WithRemoveSpaceBetweenParentheses(opts.RemoveSpaceBetweenParentheses), - sqllexer.WithKeepTrailingSemicolon(opts.KeepTrailingSemicolon), - sqllexer.WithKeepIdentifierQuotation(opts.KeepIdentifierQuotation), - ) - - var out string - var statementMetadata *sqllexer.StatementMetadata - var err error - - if opts.ObfuscationMode == NormalizeOnly { - // Normalize the query without obfuscating it. - out, statementMetadata, err = normalizer.Normalize(in, sqllexer.WithDBMS(sqllexer.DBMSType(opts.DBMS))) - } else { - out, statementMetadata, err = sqllexer.ObfuscateAndNormalize( - in, - obfuscator, - normalizer, - sqllexer.WithDBMS(sqllexer.DBMSType(opts.DBMS)), - ) - } - if err != nil { - return nil, err - } - oq := &ObfuscatedQuery{ - Query: out, - Metadata: SQLMetadata{ - Size: int64(statementMetadata.Size), - TablesCSV: strings.Join(statementMetadata.Tables, ","), - Commands: statementMetadata.Commands, - Comments: statementMetadata.Comments, - Procedures: statementMetadata.Procedures, - }, - } - - return oq, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go b/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go deleted file mode 100644 index 190801d1dc..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/obfuscate/sql_tokenizer.go +++ /dev/null @@ -1,939 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package obfuscate - -import ( - "bytes" - "fmt" - "strings" - "unicode" - "unicode/utf8" -) - -// tokenizer.go implemenents a lexer-like iterator that tokenizes SQL and CQL -// strings, so that an external component can filter or alter each token of the -// string. This implementation can't be used as a real SQL lexer (so a parser -// cannot build the AST) because many rules are ignored to make the tokenizer -// simpler. -// This implementation was inspired by https://github.com/youtube/vitess sql parser -// TODO: add the license to the NOTICE file - -// TokenKind specifies the type of the token being scanned. It may be one of the defined -// constants below or in some cases the actual rune itself. -type TokenKind uint32 - -// EndChar is used to signal that the scanner has finished reading the query. This happens when -// there are no more characters left in the query or when invalid encoding is discovered. EndChar -// is an invalid rune value that can not be found in any valid string. -const EndChar = unicode.MaxRune + 1 - -// list of available tokens; this list has been reduced because we don't -// need a full-fledged tokenizer to implement a Lexer -const ( - LexError = TokenKind(57346) + iota - - ID - Limit - Null - String - DoubleQuotedString - DollarQuotedString // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING - DollarQuotedFunc // a dollar-quoted string delimited by the tag "$func$"; gets special treatment when feature "dollar_quoted_func" is set - Number - BooleanLiteral - ValueArg - ListArg - Comment - Variable - Savepoint - PreparedStatement - EscapeSequence - NullSafeEqual - LE - GE - NE - Not - As - Alter - Drop - Create - Grant - Revoke - Commit - Begin - Truncate - Select - From - Update - Delete - Insert - Into - Join - TableName - ColonCast - - // PostgreSQL specific JSON operators - JSONSelect // -> - JSONSelectText // ->> - JSONSelectPath // #> - JSONSelectPathText // #>> - JSONContains // @> - JSONContainsLeft // <@ - JSONKeyExists // ? - JSONAnyKeysExist // ?| - JSONAllKeysExist // ?& - JSONDelete // #- - - // FilteredGroupable specifies that the given token has been discarded by one of the - // token filters and that it is groupable together with consecutive FilteredGroupable - // tokens. - FilteredGroupable - - // FilteredGroupableParenthesis is a parenthesis marked as filtered groupable. It is the - // beginning of either a group of values ('(') or a nested query. We track is as - // a special case for when it may start a nested query as opposed to just another - // value group to be obfuscated. - FilteredGroupableParenthesis - - // Filtered specifies that the token is a comma and was discarded by one - // of the filters. - Filtered - - // FilteredBracketedIdentifier specifies that we are currently discarding - // a bracketed identifier (MSSQL). - // See issue https://github.com/DataDog/datadog-trace-agent/issues/475. - FilteredBracketedIdentifier -) - -var tokenKindStrings = map[TokenKind]string{ - LexError: "LexError", - ID: "ID", - Limit: "Limit", - Null: "Null", - String: "String", - DoubleQuotedString: "DoubleQuotedString", - DollarQuotedString: "DollarQuotedString", - DollarQuotedFunc: "DollarQuotedFunc", - Number: "Number", - BooleanLiteral: "BooleanLiteral", - ValueArg: "ValueArg", - ListArg: "ListArg", - Comment: "Comment", - Variable: "Variable", - Savepoint: "Savepoint", - PreparedStatement: "PreparedStatement", - EscapeSequence: "EscapeSequence", - NullSafeEqual: "NullSafeEqual", - LE: "LE", - GE: "GE", - NE: "NE", - Not: "NOT", - As: "As", - Alter: "Alter", - Drop: "Drop", - Create: "Create", - Grant: "Grant", - Revoke: "Revoke", - Commit: "Commit", - Begin: "Begin", - Truncate: "Truncate", - Select: "Select", - From: "From", - Update: "Update", - Delete: "Delete", - Insert: "Insert", - Into: "Into", - Join: "Join", - TableName: "TableName", - ColonCast: "ColonCast", - FilteredGroupable: "FilteredGroupable", - FilteredGroupableParenthesis: "FilteredGroupableParenthesis", - Filtered: "Filtered", - FilteredBracketedIdentifier: "FilteredBracketedIdentifier", - JSONSelect: "JSONSelect", - JSONSelectText: "JSONSelectText", - JSONSelectPath: "JSONSelectPath", - JSONSelectPathText: "JSONSelectPathText", - JSONContains: "JSONContains", - JSONContainsLeft: "JSONContainsLeft", - JSONKeyExists: "JSONKeyExists", - JSONAnyKeysExist: "JSONAnyKeysExist", - JSONAllKeysExist: "JSONAllKeysExist", - JSONDelete: "JSONDelete", -} - -func (k TokenKind) String() string { - str, ok := tokenKindStrings[k] - if !ok { - return "" - } - return str -} - -const ( - // DBMSSQLServer is a MS SQL Server - DBMSSQLServer = "mssql" - // DBMSPostgres is a PostgreSQL Server - DBMSPostgres = "postgresql" - // DBMSMySQL is a MySQL Server - DBMSMySQL = "mysql" - // DBMSOracle is an Oracle Server - DBMSOracle = "oracle" -) - -const escapeCharacter = '\\' - -// SQLTokenizer is the struct used to generate SQL -// tokens for the parser. -type SQLTokenizer struct { - pos int // byte offset of lastChar - lastChar rune // last read rune - buf []byte // buf holds the query that we are parsing - off int // off is the index into buf where the unread portion of the query begins. - err error // any error occurred while reading - - curlys uint32 // number of active open curly braces in top-level SQL escape sequences. - - literalEscapes bool // indicates we should not treat backslashes as escape characters - seenEscape bool // indicates whether this tokenizer has seen an escape character within a string - - cfg *SQLConfig -} - -// NewSQLTokenizer creates a new SQLTokenizer for the given SQL string. The literalEscapes argument specifies -// whether escape characters should be treated literally or as such. -func NewSQLTokenizer(sql string, literalEscapes bool, cfg *SQLConfig) *SQLTokenizer { - if cfg == nil { - cfg = new(SQLConfig) - } - return &SQLTokenizer{ - buf: []byte(sql), - cfg: cfg, - literalEscapes: literalEscapes, - } -} - -// Reset the underlying buffer and positions -func (tkn *SQLTokenizer) Reset(in string) { - tkn.pos = 0 - tkn.lastChar = 0 - tkn.buf = []byte(in) - tkn.off = 0 - tkn.err = nil -} - -// keywords used to recognize string tokens -var keywords = map[string]TokenKind{ - "NULL": Null, - "TRUE": BooleanLiteral, - "FALSE": BooleanLiteral, - "SAVEPOINT": Savepoint, - "LIMIT": Limit, - "AS": As, - "ALTER": Alter, - "CREATE": Create, - "GRANT": Grant, - "REVOKE": Revoke, - "COMMIT": Commit, - "BEGIN": Begin, - "TRUNCATE": Truncate, - "DROP": Drop, - "SELECT": Select, - "FROM": From, - "UPDATE": Update, - "DELETE": Delete, - "INSERT": Insert, - "INTO": Into, - "JOIN": Join, -} - -// Err returns the last error that the tokenizer encountered, or nil. -func (tkn *SQLTokenizer) Err() error { return tkn.err } - -func (tkn *SQLTokenizer) setErr(format string, args ...interface{}) { - if tkn.err != nil { - return - } - tkn.err = fmt.Errorf("at position %d: %v", tkn.pos, fmt.Errorf(format, args...)) -} - -// SeenEscape returns whether or not this tokenizer has seen an escape character within a scanned string -func (tkn *SQLTokenizer) SeenEscape() bool { return tkn.seenEscape } - -// Scan scans the tokenizer for the next token and returns -// the token type and the token buffer. -func (tkn *SQLTokenizer) Scan() (TokenKind, []byte) { - if tkn.lastChar == 0 { - tkn.advance() - } - tkn.SkipBlank() - - switch ch := tkn.lastChar; { - case isLeadingLetter(ch) && - !(tkn.cfg.DBMS == DBMSPostgres && ch == '@'): - // The '@' symbol should not be considered part of an identifier in - // postgres, so we skip this in the case where the DBMS is postgres - // and ch is '@'. - return tkn.scanIdentifier() - case isDigit(ch): - return tkn.scanNumber(false) - default: - tkn.advance() - if tkn.lastChar == EndChar && tkn.err != nil { - // advance discovered an invalid encoding. We should return early. - return LexError, nil - } - switch ch { - case EndChar: - if tkn.err != nil { - return LexError, nil - } - return EndChar, nil - case ':': - if tkn.lastChar == ':' { - tkn.advance() - return ColonCast, []byte("::") - } - if unicode.IsSpace(tkn.lastChar) { - // example scenario: "autovacuum: VACUUM ANALYZE fake.table" - return TokenKind(ch), tkn.bytes() - } - if tkn.lastChar != '=' { - return tkn.scanBindVar() - } - fallthrough - case '~': - switch tkn.lastChar { - case '*': - tkn.advance() - return TokenKind('~'), []byte("~*") - default: - return TokenKind(ch), tkn.bytes() - } - case '?': - if tkn.cfg.DBMS == DBMSPostgres { - switch tkn.lastChar { - case '|': - tkn.advance() - return JSONAnyKeysExist, []byte("?|") - case '&': - tkn.advance() - return JSONAllKeysExist, []byte("?&") - default: - return JSONKeyExists, tkn.bytes() - } - } - fallthrough - case '=', ',', ';', '(', ')', '+', '*', '&', '|', '^', ']': - return TokenKind(ch), tkn.bytes() - case '[': - if tkn.cfg.DBMS == DBMSSQLServer { - return tkn.scanString(']', DoubleQuotedString) - } - return TokenKind(ch), tkn.bytes() - case '.': - if isDigit(tkn.lastChar) { - return tkn.scanNumber(true) - } - return TokenKind(ch), tkn.bytes() - case '/': - switch tkn.lastChar { - case '/': - tkn.advance() - return tkn.scanCommentType1("//") - case '*': - tkn.advance() - return tkn.scanCommentType2() - default: - return TokenKind(ch), tkn.bytes() - } - case '-': - switch { - case tkn.lastChar == '-': - tkn.advance() - return tkn.scanCommentType1("--") - case tkn.lastChar == '>': - if tkn.cfg.DBMS == DBMSPostgres { - tkn.advance() - switch tkn.lastChar { - case '>': - tkn.advance() - return JSONSelectText, []byte("->>") - default: - return JSONSelect, []byte("->") - } - } - fallthrough - case isDigit(tkn.lastChar): - return tkn.scanNumber(false) - case tkn.lastChar == '.': - tkn.advance() - if isDigit(tkn.lastChar) { - return tkn.scanNumber(true) - } - tkn.lastChar = '.' - tkn.pos-- - fallthrough - default: - return TokenKind(ch), tkn.bytes() - } - case '#': - switch tkn.cfg.DBMS { - case DBMSSQLServer: - return tkn.scanIdentifier() - case DBMSPostgres: - switch tkn.lastChar { - case '>': - tkn.advance() - switch tkn.lastChar { - case '>': - tkn.advance() - return JSONSelectPathText, []byte("#>>") - default: - return JSONSelectPath, []byte("#>") - } - case '-': - tkn.advance() - return JSONDelete, []byte("#-") - default: - return TokenKind(ch), tkn.bytes() - } - default: - tkn.advance() - return tkn.scanCommentType1("#") - } - case '<': - switch tkn.lastChar { - case '>': - tkn.advance() - return NE, []byte("<>") - case '=': - tkn.advance() - switch tkn.lastChar { - case '>': - tkn.advance() - return NullSafeEqual, []byte("<=>") - default: - return LE, []byte("<=") - } - case '@': - if tkn.cfg.DBMS == DBMSPostgres { - // check for JSONContainsLeft (<@) - tkn.advance() - return JSONContainsLeft, []byte("<@") - } - fallthrough - default: - return TokenKind(ch), tkn.bytes() - } - case '>': - if tkn.lastChar == '=' { - tkn.advance() - return GE, []byte(">=") - } - return TokenKind(ch), tkn.bytes() - case '!': - switch tkn.lastChar { - case '=': - tkn.advance() - return NE, []byte("!=") - case '~': - tkn.advance() - switch tkn.lastChar { - case '*': - tkn.advance() - return NE, []byte("!~*") - default: - return NE, []byte("!~") - } - default: - if isValidCharAfterOperator(tkn.lastChar) { - return Not, tkn.bytes() - } - tkn.setErr(`unexpected char "%c" (%d) after "!"`, tkn.lastChar, tkn.lastChar) - return LexError, tkn.bytes() - } - case '\'': - return tkn.scanString(ch, String) - case '"': - return tkn.scanString(ch, DoubleQuotedString) - case '`': - return tkn.scanString(ch, ID) - case '%': - if tkn.lastChar == '(' { - return tkn.scanVariableIdentifier('%') - } - if isLetter(tkn.lastChar) { - // format parameter (e.g. '%s') - return tkn.scanFormatParameter('%') - } - // modulo operator (e.g. 'id % 8') - return TokenKind(ch), tkn.bytes() - case '$': - if isDigit(tkn.lastChar) || tkn.lastChar == '?' { - // TODO(knusbaum): Valid dollar quote tags start with alpha characters and contain no symbols. - // See: https://www.postgresql.org/docs/15/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS - // See also: https://pgpedia.info/d/dollar-quoting.html instead. - // - // Instances of $[integer] or $? are prepared statement variables. - // We may eventually want to expand this to check for symbols other than numbers and '?', - // since other symbols are not valid dollar quote tags, but for now this covers prepared statement - // variables without exposing us to more risk of not obfuscating something than necessary. - return tkn.scanPreparedStatement('$') - } - - // A special case for a string starts with single $ but does not end with $. - // For example in SQLServer, you can have "MG..... OUTPUT $action, inserted.*" - // $action in the OUTPUT clause of a MERGE statement is a special identifier - // that returns one of three values for each row: 'INSERT', 'UPDATE', or 'DELETE'. - // See: https://docs.microsoft.com/en-us/sql/t-sql/statements/merge-transact-sql?view=sql-server-ver15 - if tkn.cfg.DBMS == DBMSSQLServer && isLetter(tkn.lastChar) { - // When the DBMS is SQLServer and the last character is a letter, - // we should scan an identifier instead of a string. - return tkn.scanIdentifier() - } - - kind, tok := tkn.scanDollarQuotedString() - if kind == DollarQuotedFunc { - // this is considered an embedded query, we should try and - // obfuscate it - out, err := attemptObfuscation(NewSQLTokenizer(string(tok), tkn.literalEscapes, tkn.cfg)) - if err != nil { - // if we can't obfuscate it, treat it as a regular string - return DollarQuotedString, tok - } - tok = append(append([]byte("$func$"), []byte(out.Query)...), []byte("$func$")...) - } - return kind, tok - case '@': - if tkn.cfg.DBMS == DBMSPostgres { - // For postgres the @ symbol is reserved as an operator - // https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-OPERATORS - // And is used as a json operator - // https://www.postgresql.org/docs/9.5/functions-json.html - switch tkn.lastChar { - case '>': - tkn.advance() - return JSONContains, []byte("@>") - default: - return TokenKind(ch), tkn.bytes() - } - } - fallthrough - case '{': - if tkn.pos == 1 || tkn.curlys > 0 { - // Do not fully obfuscate top-level SQL escape sequences like {{[?=]call procedure-name[([parameter][,parameter]...)]}. - // We want these to display a bit more context than just a plain '?' - // See: https://docs.oracle.com/cd/E13157_01/wlevs/docs30/jdbc_drivers/sqlescape.html - tkn.curlys++ - return TokenKind(ch), tkn.bytes() - } - return tkn.scanEscapeSequence('{') - case '}': - if tkn.curlys == 0 { - // A closing curly brace has no place outside an in-progress top-level SQL escape sequence - // started by the '{' switch-case. - tkn.setErr(`unexpected byte %d`, ch) - return LexError, tkn.bytes() - } - tkn.curlys-- - return TokenKind(ch), tkn.bytes() - default: - tkn.setErr(`unexpected byte %d`, ch) - return LexError, tkn.bytes() - } - } -} - -// SkipBlank moves the tokenizer forward until hitting a non-whitespace character -// The whitespace definition used here is the same as unicode.IsSpace -func (tkn *SQLTokenizer) SkipBlank() { - for unicode.IsSpace(tkn.lastChar) { - tkn.advance() - } - tkn.bytes() -} - -// toUpper is a modified version of bytes.ToUpper. It returns an upper-cased version of the byte -// slice src with all Unicode letters mapped to their upper case. It is modified to also accept a -// byte slice dst as an argument, the underlying storage of which (up to the capacity of dst) -// will be used as the destination of the upper-case copy of src, if it fits. As a special case, -// toUpper will return src if the byte slice is already upper-case. This function is used rather -// than bytes.ToUpper to improve the memory performance of the obfuscator by saving unnecessary -// allocations happening in bytes.ToUpper -func toUpper(src, dst []byte) []byte { - dst = dst[:0] - isASCII, hasLower := true, false - for i := 0; i < len(src); i++ { - c := src[i] - if c >= utf8.RuneSelf { - isASCII = false - break - } - hasLower = hasLower || ('a' <= c && c <= 'z') - } - if cap(dst) < len(src) { - dst = make([]byte, 0, len(src)) - } - if isASCII { // optimize for ASCII-only byte slices. - if !hasLower { - // Just return src. - return src - } - dst = dst[:len(src)] - for i := 0; i < len(src); i++ { - c := src[i] - if 'a' <= c && c <= 'z' { - c -= 'a' - 'A' - } - dst[i] = c - } - return dst - } - // This *could* be optimized, but it's an uncommon case. - return bytes.Map(unicode.ToUpper, src) -} - -func (tkn *SQLTokenizer) scanIdentifier() (TokenKind, []byte) { - tkn.advance() - for isLetter(tkn.lastChar) || isDigit(tkn.lastChar) || strings.ContainsRune(".*$", tkn.lastChar) { - tkn.advance() - } - - t := tkn.bytes() - // Space allows us to upper-case identifiers 256 bytes long or less without allocating heap - // storage for them, since space is allocated on the stack. A size of 256 bytes was chosen - // based on the allowed length of sql identifiers in various sql implementations. - var space [256]byte - upper := toUpper(t, space[:0]) - if keywordID, found := keywords[string(upper)]; found { - return keywordID, t - } - return ID, t -} - -func (tkn *SQLTokenizer) scanVariableIdentifier(_ rune) (TokenKind, []byte) { - for tkn.advance(); tkn.lastChar != ')' && tkn.lastChar != EndChar; tkn.advance() { - continue - } - tkn.advance() - if !isLetter(tkn.lastChar) { - tkn.setErr(`invalid character after variable identifier: "%c" (%d)`, tkn.lastChar, tkn.lastChar) - return LexError, tkn.bytes() - } - tkn.advance() - return Variable, tkn.bytes() -} - -func (tkn *SQLTokenizer) scanFormatParameter(_ rune) (TokenKind, []byte) { - tkn.advance() - return Variable, tkn.bytes() -} - -// scanDollarQuotedString scans a Postgres dollar-quoted string constant. -// See: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-DOLLAR-QUOTING -func (tkn *SQLTokenizer) scanDollarQuotedString() (TokenKind, []byte) { - kind, tag := tkn.scanString('$', String) - if kind == LexError { - return kind, tkn.bytes() - } - var ( - got int - buf bytes.Buffer - ) - delim := tag - // on empty strings, tkn.scanString returns the delimiters - if string(delim) != "$$" { - // on non-empty strings, the delimiter is $tag$ - delim = append([]byte{'$'}, delim...) - delim = append(delim, '$') - } - for { - ch := tkn.lastChar - tkn.advance() - if ch == EndChar { - tkn.setErr("unexpected EOF in dollar-quoted string") - return LexError, buf.Bytes() - } - if byte(ch) == delim[got] { - got++ - if got == len(delim) { - break - } - continue - } - if got > 0 { - _, err := buf.Write(delim[:got]) - if err != nil { - tkn.setErr("error reading dollar-quoted string: %v", err) - return LexError, buf.Bytes() - } - got = 0 - } - buf.WriteRune(ch) - } - if tkn.cfg.DollarQuotedFunc && string(delim) == "$func$" { - return DollarQuotedFunc, buf.Bytes() - } - return DollarQuotedString, buf.Bytes() -} - -func (tkn *SQLTokenizer) scanPreparedStatement(_ rune) (TokenKind, []byte) { - // a prepared statement expect a digit identifier like $1 - if !isDigit(tkn.lastChar) && tkn.lastChar != '?' { - tkn.setErr(`prepared statements must start with digits, got "%c" (%d)`, tkn.lastChar, tkn.lastChar) - return LexError, tkn.bytes() - } - - if tkn.lastChar == '?' { - tkn.advance() - return PreparedStatement, tkn.bytes() - } - - // scanNumber keeps the prefix rune intact. - // read numbers and return an error if any - token, buff := tkn.scanNumber(false) - if token == LexError { - tkn.setErr("invalid number") - return LexError, tkn.bytes() - } - return PreparedStatement, buff -} - -func (tkn *SQLTokenizer) scanEscapeSequence(_ rune) (TokenKind, []byte) { - for tkn.lastChar != '}' && tkn.lastChar != EndChar { - tkn.advance() - } - - // we've reached the end of the string without finding - // the closing curly braces - if tkn.lastChar == EndChar { - tkn.setErr("unexpected EOF in escape sequence") - return LexError, tkn.bytes() - } - - tkn.advance() - return EscapeSequence, tkn.bytes() -} - -func (tkn *SQLTokenizer) scanBindVar() (TokenKind, []byte) { - token := ValueArg - if tkn.lastChar == ':' { - token = ListArg - tkn.advance() - } - if !isLetter(tkn.lastChar) && !isDigit(tkn.lastChar) { - tkn.setErr(`bind variables should start with letters or digits, got "%c" (%d)`, tkn.lastChar, tkn.lastChar) - return LexError, tkn.bytes() - } - for isLetter(tkn.lastChar) || isDigit(tkn.lastChar) || tkn.lastChar == '.' { - tkn.advance() - } - return token, tkn.bytes() -} - -func (tkn *SQLTokenizer) scanMantissa(base int) { - for digitVal(tkn.lastChar) < base { - tkn.advance() - } -} - -func (tkn *SQLTokenizer) scanNumber(seenDecimalPoint bool) (TokenKind, []byte) { - if seenDecimalPoint { - tkn.scanMantissa(10) - goto exponent - } - - if tkn.lastChar == '0' { - // int or float - tkn.advance() - if tkn.lastChar == 'x' || tkn.lastChar == 'X' { - // hexadecimal int - tkn.advance() - tkn.scanMantissa(16) - } else { - // octal int or float - tkn.scanMantissa(8) - if tkn.lastChar == '8' || tkn.lastChar == '9' { - tkn.scanMantissa(10) - } - if tkn.lastChar == '.' || tkn.lastChar == 'e' || tkn.lastChar == 'E' { - goto fraction - } - } - goto exit - } - - // decimal int or float - tkn.scanMantissa(10) - -fraction: - if tkn.lastChar == '.' { - tkn.advance() - tkn.scanMantissa(10) - } - -exponent: - if tkn.lastChar == 'e' || tkn.lastChar == 'E' { - tkn.advance() - if tkn.lastChar == '+' || tkn.lastChar == '-' { - tkn.advance() - } - tkn.scanMantissa(10) - } - -exit: - t := tkn.bytes() - if len(t) == 0 { - tkn.setErr("Parse error: ended up with zero-length number.") - return LexError, nil - } - return Number, t -} - -func (tkn *SQLTokenizer) scanString(delim rune, kind TokenKind) (TokenKind, []byte) { - buf := bytes.NewBuffer(tkn.buf[:0]) - for { - ch := tkn.lastChar - tkn.advance() - if ch == delim { - if tkn.lastChar == delim { - // doubling a delimiter is the default way to embed the delimiter within a string - tkn.advance() - } else { - // a single delimiter denotes the end of the string - break - } - } else if ch == escapeCharacter { - tkn.seenEscape = true - - if !tkn.literalEscapes { - // treat as an escape character - ch = tkn.lastChar - tkn.advance() - } - } - if ch == EndChar { - tkn.setErr("unexpected EOF in string") - return LexError, buf.Bytes() - } - buf.WriteRune(ch) - } - if kind == ID && buf.Len() == 0 || bytes.IndexFunc(buf.Bytes(), func(r rune) bool { return !unicode.IsSpace(r) }) == -1 { - // This string is an empty or white-space only identifier. - // We should keep the start and end delimiters in order to - // avoid creating invalid queries. - // See: https://github.com/DataDog/datadog-trace-agent/issues/316 - return kind, append(runeBytes(delim), runeBytes(delim)...) - } - return kind, buf.Bytes() -} - -func (tkn *SQLTokenizer) scanCommentType1(_ string) (TokenKind, []byte) { - for tkn.lastChar != EndChar { - if tkn.lastChar == '\n' { - tkn.advance() - break - } - tkn.advance() - } - return Comment, tkn.bytes() -} - -func (tkn *SQLTokenizer) scanCommentType2() (TokenKind, []byte) { - for { - if tkn.lastChar == '*' { - tkn.advance() - if tkn.lastChar == '/' { - tkn.advance() - break - } - continue - } - if tkn.lastChar == EndChar { - tkn.setErr("unexpected EOF in comment") - return LexError, tkn.bytes() - } - tkn.advance() - } - return Comment, tkn.bytes() -} - -// advance advances the tokenizer to the next rune. If the decoder encounters an error decoding, or -// the end of the buffer is reached, tkn.lastChar will be set to EndChar. In case of a decoding -// error, tkn.err will also be set. -func (tkn *SQLTokenizer) advance() { - ch, n := utf8.DecodeRune(tkn.buf[tkn.off:]) - if ch == utf8.RuneError && n < 2 { - tkn.pos++ - tkn.lastChar = EndChar - if n == 1 { - tkn.setErr("invalid UTF-8 encoding beginning with 0x%x", tkn.buf[tkn.off]) - } - return - } - if tkn.lastChar != 0 || tkn.pos > 0 { - // we are past the first character - tkn.pos += n - } - tkn.off += n - tkn.lastChar = ch -} - -// bytes returns all the bytes that were advanced over since its last call. -// This excludes tkn.lastChar, which will remain in the buffer -func (tkn *SQLTokenizer) bytes() []byte { - if tkn.lastChar == EndChar { - ret := tkn.buf[:tkn.off] - tkn.buf = tkn.buf[tkn.off:] - tkn.off = 0 - return ret - } - lastLen := utf8.RuneLen(tkn.lastChar) - ret := tkn.buf[:tkn.off-lastLen] - tkn.buf = tkn.buf[tkn.off-lastLen:] - tkn.off = lastLen - return ret -} - -// Position exports the tokenizer's current position in the query -func (tkn *SQLTokenizer) Position() int { - return tkn.pos -} - -func isLeadingLetter(ch rune) bool { - return unicode.IsLetter(ch) || ch == '_' || ch == '@' -} - -func isLetter(ch rune) bool { - return isLeadingLetter(ch) || ch == '#' -} - -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch) - '0' - case 'a' <= ch && ch <= 'f': - return int(ch) - 'a' + 10 - case 'A' <= ch && ch <= 'F': - return int(ch) - 'A' + 10 - } - return 16 // larger than any legal digit val -} - -func isDigit(ch rune) bool { return '0' <= ch && ch <= '9' } - -// runeBytes converts the given rune to a slice of bytes. -func runeBytes(r rune) []byte { - buf := make([]byte, utf8.UTFMax) - n := utf8.EncodeRune(buf, r) - return buf[:n] -} - -// isValidCharAfterOperator returns true if c is a valid character after an operator -func isValidCharAfterOperator(c rune) bool { - return c == '(' || c == '`' || c == '\'' || c == '"' || c == '+' || c == '-' || unicode.IsSpace(c) || isLetter(c) || isDigit(c) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/proto/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload.pb.go deleted file mode 100644 index e67728a556..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload.pb.go +++ /dev/null @@ -1,205 +0,0 @@ -// protoc -I. -I$GOPATH/src --gogofaster_out=. span.proto tracer_payload.proto agent_payload.proto - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 -// source: datadog/trace/agent_payload.proto - -package trace - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// AgentPayload represents payload the agent sends to the intake. -type AgentPayload struct { - state protoimpl.MessageState `protogen:"open.v1"` - // hostName specifies hostname of where the agent is running. - HostName string `protobuf:"bytes,1,opt,name=hostName,proto3" json:"hostName,omitempty"` - // env specifies `env` set in agent configuration. - Env string `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` - // tracerPayloads specifies list of the payloads received from tracers. - TracerPayloads []*TracerPayload `protobuf:"bytes,5,rep,name=tracerPayloads,proto3" json:"tracerPayloads,omitempty"` - // tags specifies tags common in all `tracerPayloads`. - Tags map[string]string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` - // agentVersion specifies version of the agent. - AgentVersion string `protobuf:"bytes,7,opt,name=agentVersion,proto3" json:"agentVersion,omitempty"` - // targetTPS holds `TargetTPS` value in AgentConfig. - TargetTPS float64 `protobuf:"fixed64,8,opt,name=targetTPS,proto3" json:"targetTPS,omitempty"` - // errorTPS holds `ErrorTPS` value in AgentConfig. - ErrorTPS float64 `protobuf:"fixed64,9,opt,name=errorTPS,proto3" json:"errorTPS,omitempty"` - // rareSamplerEnabled holds `RareSamplerEnabled` value in AgentConfig - RareSamplerEnabled bool `protobuf:"varint,10,opt,name=rareSamplerEnabled,proto3" json:"rareSamplerEnabled,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AgentPayload) Reset() { - *x = AgentPayload{} - mi := &file_datadog_trace_agent_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AgentPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AgentPayload) ProtoMessage() {} - -func (x *AgentPayload) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_agent_payload_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AgentPayload.ProtoReflect.Descriptor instead. -func (*AgentPayload) Descriptor() ([]byte, []int) { - return file_datadog_trace_agent_payload_proto_rawDescGZIP(), []int{0} -} - -func (x *AgentPayload) GetHostName() string { - if x != nil { - return x.HostName - } - return "" -} - -func (x *AgentPayload) GetEnv() string { - if x != nil { - return x.Env - } - return "" -} - -func (x *AgentPayload) GetTracerPayloads() []*TracerPayload { - if x != nil { - return x.TracerPayloads - } - return nil -} - -func (x *AgentPayload) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *AgentPayload) GetAgentVersion() string { - if x != nil { - return x.AgentVersion - } - return "" -} - -func (x *AgentPayload) GetTargetTPS() float64 { - if x != nil { - return x.TargetTPS - } - return 0 -} - -func (x *AgentPayload) GetErrorTPS() float64 { - if x != nil { - return x.ErrorTPS - } - return 0 -} - -func (x *AgentPayload) GetRareSamplerEnabled() bool { - if x != nil { - return x.RareSamplerEnabled - } - return false -} - -var File_datadog_trace_agent_payload_proto protoreflect.FileDescriptor - -const file_datadog_trace_agent_payload_proto_rawDesc = "" + - "\n" + - "!datadog/trace/agent_payload.proto\x12\rdatadog.trace\x1a\"datadog/trace/tracer_payload.proto\"\x84\x03\n" + - "\fAgentPayload\x12\x1a\n" + - "\bhostName\x18\x01 \x01(\tR\bhostName\x12\x10\n" + - "\x03env\x18\x02 \x01(\tR\x03env\x12D\n" + - "\x0etracerPayloads\x18\x05 \x03(\v2\x1c.datadog.trace.TracerPayloadR\x0etracerPayloads\x129\n" + - "\x04tags\x18\x06 \x03(\v2%.datadog.trace.AgentPayload.TagsEntryR\x04tags\x12\"\n" + - "\fagentVersion\x18\a \x01(\tR\fagentVersion\x12\x1c\n" + - "\ttargetTPS\x18\b \x01(\x01R\ttargetTPS\x12\x1a\n" + - "\berrorTPS\x18\t \x01(\x01R\berrorTPS\x12.\n" + - "\x12rareSamplerEnabled\x18\n" + - " \x01(\bR\x12rareSamplerEnabled\x1a7\n" + - "\tTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x16Z\x14pkg/proto/pbgo/traceb\x06proto3" - -var ( - file_datadog_trace_agent_payload_proto_rawDescOnce sync.Once - file_datadog_trace_agent_payload_proto_rawDescData []byte -) - -func file_datadog_trace_agent_payload_proto_rawDescGZIP() []byte { - file_datadog_trace_agent_payload_proto_rawDescOnce.Do(func() { - file_datadog_trace_agent_payload_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_datadog_trace_agent_payload_proto_rawDesc), len(file_datadog_trace_agent_payload_proto_rawDesc))) - }) - return file_datadog_trace_agent_payload_proto_rawDescData -} - -var file_datadog_trace_agent_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_datadog_trace_agent_payload_proto_goTypes = []any{ - (*AgentPayload)(nil), // 0: datadog.trace.AgentPayload - nil, // 1: datadog.trace.AgentPayload.TagsEntry - (*TracerPayload)(nil), // 2: datadog.trace.TracerPayload -} -var file_datadog_trace_agent_payload_proto_depIdxs = []int32{ - 2, // 0: datadog.trace.AgentPayload.tracerPayloads:type_name -> datadog.trace.TracerPayload - 1, // 1: datadog.trace.AgentPayload.tags:type_name -> datadog.trace.AgentPayload.TagsEntry - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_datadog_trace_agent_payload_proto_init() } -func file_datadog_trace_agent_payload_proto_init() { - if File_datadog_trace_agent_payload_proto != nil { - return - } - file_datadog_trace_tracer_payload_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_datadog_trace_agent_payload_proto_rawDesc), len(file_datadog_trace_agent_payload_proto_rawDesc)), - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_datadog_trace_agent_payload_proto_goTypes, - DependencyIndexes: file_datadog_trace_agent_payload_proto_depIdxs, - MessageInfos: file_datadog_trace_agent_payload_proto_msgTypes, - }.Build() - File_datadog_trace_agent_payload_proto = out.File - file_datadog_trace_agent_payload_proto_goTypes = nil - file_datadog_trace_agent_payload_proto_depIdxs = nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_gen.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_gen.go deleted file mode 100644 index 26cefad588..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_gen.go +++ /dev/null @@ -1,200 +0,0 @@ -package trace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// MarshalMsg implements msgp.Marshaler -func (z *AgentPayload) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 8 - // string "HostName" - o = append(o, 0x88, 0xa8, 0x48, 0x6f, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.HostName) - // string "Env" - o = append(o, 0xa3, 0x45, 0x6e, 0x76) - o = msgp.AppendString(o, z.Env) - // string "TracerPayloads" - o = append(o, 0xae, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.TracerPayloads))) - for za0001 := range z.TracerPayloads { - if z.TracerPayloads[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.TracerPayloads[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "TracerPayloads", za0001) - return - } - } - } - // string "Tags" - o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Tags))) - for za0002, za0003 := range z.Tags { - o = msgp.AppendString(o, za0002) - o = msgp.AppendString(o, za0003) - } - // string "AgentVersion" - o = append(o, 0xac, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.AgentVersion) - // string "TargetTPS" - o = append(o, 0xa9, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x50, 0x53) - o = msgp.AppendFloat64(o, z.TargetTPS) - // string "ErrorTPS" - o = append(o, 0xa8, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x50, 0x53) - o = msgp.AppendFloat64(o, z.ErrorTPS) - // string "RareSamplerEnabled" - o = append(o, 0xb2, 0x52, 0x61, 0x72, 0x65, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64) - o = msgp.AppendBool(o, z.RareSamplerEnabled) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AgentPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "HostName": - z.HostName, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "HostName") - return - } - case "Env": - z.Env, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - case "TracerPayloads": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "TracerPayloads") - return - } - if cap(z.TracerPayloads) >= int(zb0002) { - z.TracerPayloads = (z.TracerPayloads)[:zb0002] - } else { - z.TracerPayloads = make([]*TracerPayload, zb0002) - } - for za0001 := range z.TracerPayloads { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.TracerPayloads[za0001] = nil - } else { - if z.TracerPayloads[za0001] == nil { - z.TracerPayloads[za0001] = new(TracerPayload) - } - bts, err = z.TracerPayloads[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "TracerPayloads", za0001) - return - } - } - } - case "Tags": - var zb0003 uint32 - zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if z.Tags == nil { - z.Tags = make(map[string]string, zb0003) - } else if len(z.Tags) > 0 { - for key := range z.Tags { - delete(z.Tags, key) - } - } - for zb0003 > 0 { - var za0002 string - var za0003 string - zb0003-- - za0002, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - za0003, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - z.Tags[za0002] = za0003 - } - case "AgentVersion": - z.AgentVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentVersion") - return - } - case "TargetTPS": - z.TargetTPS, bts, err = msgp.ReadFloat64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TargetTPS") - return - } - case "ErrorTPS": - z.ErrorTPS, bts, err = msgp.ReadFloat64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "ErrorTPS") - return - } - case "RareSamplerEnabled": - z.RareSamplerEnabled, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "RareSamplerEnabled") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *AgentPayload) Msgsize() (s int) { - s = 1 + 9 + msgp.StringPrefixSize + len(z.HostName) + 4 + msgp.StringPrefixSize + len(z.Env) + 15 + msgp.ArrayHeaderSize - for za0001 := range z.TracerPayloads { - if z.TracerPayloads[za0001] == nil { - s += msgp.NilSize - } else { - s += z.TracerPayloads[za0001].Msgsize() - } - } - s += 5 + msgp.MapHeaderSize - if z.Tags != nil { - for za0002, za0003 := range z.Tags { - _ = za0003 - s += msgp.StringPrefixSize + len(za0002) + msgp.StringPrefixSize + len(za0003) - } - } - s += 13 + msgp.StringPrefixSize + len(z.AgentVersion) + 10 + msgp.Float64Size + 9 + msgp.Float64Size + 19 + msgp.BoolSize - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_vtproto.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_vtproto.pb.go deleted file mode 100644 index 9433b709b7..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/agent_payload_vtproto.pb.go +++ /dev/null @@ -1,524 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 -// source: datadog/trace/agent_payload.proto - -package trace - -import ( - binary "encoding/binary" - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - math "math" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *AgentPayload) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AgentPayload) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *AgentPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.RareSamplerEnabled { - i-- - if m.RareSamplerEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.ErrorTPS != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ErrorTPS)))) - i-- - dAtA[i] = 0x49 - } - if m.TargetTPS != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.TargetTPS)))) - i-- - dAtA[i] = 0x41 - } - if len(m.AgentVersion) > 0 { - i -= len(m.AgentVersion) - copy(dAtA[i:], m.AgentVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AgentVersion))) - i-- - dAtA[i] = 0x3a - } - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.TracerPayloads) > 0 { - for iNdEx := len(m.TracerPayloads) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.TracerPayloads[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Env) > 0 { - i -= len(m.Env) - copy(dAtA[i:], m.Env) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Env))) - i-- - dAtA[i] = 0x12 - } - if len(m.HostName) > 0 { - i -= len(m.HostName) - copy(dAtA[i:], m.HostName) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HostName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *AgentPayload) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HostName) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Env) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.TracerPayloads) > 0 { - for _, e := range m.TracerPayloads { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.AgentVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.TargetTPS != 0 { - n += 9 - } - if m.ErrorTPS != 0 { - n += 9 - } - if m.RareSamplerEnabled { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *AgentPayload) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AgentPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AgentPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TracerPayloads", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TracerPayloads = append(m.TracerPayloads, &TracerPayload{}) - if err := m.TracerPayloads[len(m.TracerPayloads)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tags == nil { - m.Tags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Tags[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetTPS", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.TargetTPS = float64(math.Float64frombits(v)) - case 9: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorTPS", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ErrorTPS = float64(math.Float64frombits(v)) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RareSamplerEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RareSamplerEnabled = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_bytes.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_bytes.go deleted file mode 100644 index d50cf8d739..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_bytes.go +++ /dev/null @@ -1,275 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package trace defines the types and functions to encode/decode traces. -package trace - -import ( - "bytes" - "errors" - "math" - "strings" - "unicode/utf8" - - "github.com/tinylib/msgp/msgp" -) - -// repairUTF8 ensures all characters in s are UTF-8 by replacing non-UTF-8 characters -// with the replacement char � -func repairUTF8(s string) string { - in := strings.NewReader(s) - var out bytes.Buffer - out.Grow(len(s)) - - for { - r, _, err := in.ReadRune() - if err != nil { - // note: by contract, if `in` contains non-valid utf-8, no error is returned. Rather the utf-8 replacement - // character is returned. Therefore, the only error should usually be io.EOF indicating end of string. - // If any other error is returned by chance, we quit as well, outputting whatever part of the string we - // had already constructed. - return out.String() - } - out.WriteRune(r) - } -} - -// parseStringBytes reads the next type in the msgpack payload and -// converts the BinType or the StrType in a valid string. -func parseStringBytes(bts []byte) (string, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return "", bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - var ( - err error - i []byte - ) - switch t { - case msgp.BinType: - i, bts, err = msgp.ReadBytesZC(bts) - case msgp.StrType: - i, bts, err = msgp.ReadStringZC(bts) - default: - return "", bts, msgp.TypeError{Encoded: t, Method: msgp.StrType} - } - if err != nil { - return "", bts, err - } - if utf8.Valid(i) { - return string(i), bts, nil - } - return repairUTF8(msgp.UnsafeString(i)), bts, nil -} - -// parseFloat64Bytes parses a float64 even if the sent value is an int64 or an uint64; -// this is required because the encoding library could remove bytes from the encoded -// payload to reduce the size, if they're not needed. -func parseFloat64Bytes(bts []byte) (float64, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return 0, bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - var err error - switch t { - case msgp.IntType: - var i int64 - i, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - return 0, bts, err - } - - return float64(i), bts, nil - case msgp.UintType: - var i uint64 - i, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - return 0, bts, err - } - - return float64(i), bts, nil - case msgp.Float64Type: - var f float64 - f, bts, err = msgp.ReadFloat64Bytes(bts) - if err != nil { - return 0, bts, err - } - - return f, bts, nil - default: - return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.Float64Type} - } -} - -// cast to int64 values that are int64 but that are sent in uint64 -// over the wire. Set to 0 if they overflow the MaxInt64 size. This -// cast should be used ONLY while decoding int64 values that are -// sent as uint64 to reduce the payload size, otherwise the approach -// is not correct in the general sense. -func castInt64(v uint64) (int64, bool) { - if v > math.MaxInt64 { - return 0, false - } - return int64(v), true -} - -// parseInt64Bytes parses an int64 even if the sent value is an uint64; -// this is required because the encoding library could remove bytes from the encoded -// payload to reduce the size, if they're not needed. -func parseInt64Bytes(bts []byte) (int64, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return 0, bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - var ( - i int64 - u uint64 - err error - ) - switch t { - case msgp.IntType: - i, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - return 0, bts, err - } - return i, bts, nil - case msgp.UintType: - u, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - return 0, bts, err - } - - // force-cast - i, ok := castInt64(u) - if !ok { - return 0, bts, errors.New("found uint64, overflows int64") - } - return i, bts, nil - default: - return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.IntType} - } -} - -// parseUint64Bytes parses an uint64 even if the sent value is an int64; -// this is required because the language used for the encoding library -// may not have unsigned types. An example is early version of Java -// (and so JRuby interpreter) that encodes uint64 as int64: -// http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html -func parseUint64Bytes(bts []byte) (uint64, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return 0, bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - var ( - i int64 - u uint64 - err error - ) - switch t { - case msgp.UintType: - u, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - return 0, bts, err - } - return u, bts, err - case msgp.IntType: - i, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - return 0, bts, err - } - return uint64(i), bts, nil - default: - return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.IntType} - } -} - -// cast to int32 values that are int32 but that are sent in uint32 -// over the wire. Set to 0 if they overflow the MaxInt32 size. This -// cast should be used ONLY while decoding int32 values that are -// sent as uint32 to reduce the payload size, otherwise the approach -// is not correct in the general sense. -func castInt32(v uint32) (int32, bool) { - if v > math.MaxInt32 { - return 0, false - } - return int32(v), true -} - -// parseInt32Bytes parses an int32 even if the sent value is an uint32; -// this is required because the encoding library could remove bytes from the encoded -// payload to reduce the size, if they're not needed. -func parseInt32Bytes(bts []byte) (int32, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return 0, bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - var ( - i int32 - u uint32 - err error - ) - switch t { - case msgp.IntType: - i, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - return 0, bts, err - } - return i, bts, nil - case msgp.UintType: - u, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - return 0, bts, err - } - - // force-cast - i, ok := castInt32(u) - if !ok { - return 0, bts, errors.New("found uint32, overflows int32") - } - return i, bts, nil - default: - return 0, bts, msgp.TypeError{Encoded: t, Method: msgp.IntType} - } -} - -// parseBytes reads the next BinType in the msgpack payload. -// -//nolint:unused // potentially useful; was used with prior proto definitions -func parseBytes(bts []byte) ([]byte, []byte, error) { - if msgp.IsNil(bts) { - bts, err := msgp.ReadNilBytes(bts) - return nil, bts, err - } - // read the generic representation type without decoding - t := msgp.NextType(bts) - - switch t { - case msgp.BinType: - unsafeBytes, bts, err := msgp.ReadBytesZC(bts) - if err != nil { - return nil, bts, err - } - safeBytes := make([]byte, len(unsafeBytes)) - copy(safeBytes, unsafeBytes) - return safeBytes, bts, nil - default: - return nil, bts, msgp.TypeError{Encoded: t, Method: msgp.BinType} - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_v05.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_v05.go deleted file mode 100644 index f88e6cc877..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/decoder_v05.go +++ /dev/null @@ -1,223 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package trace - -import ( - "errors" - "fmt" - - "github.com/tinylib/msgp/msgp" -) - -// dictionaryString reads an int from decoder dc and returns the string -// at that index from dict. -func dictionaryString(bts []byte, dict []string) (string, []byte, error) { - var ( - ui uint32 - err error - ) - ui, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - return "", bts, err - } - idx := int(ui) - if idx >= len(dict) { - return "", bts, fmt.Errorf("dictionary index %d out of range", idx) - } - return dict[idx], bts, nil -} - -// UnmarshalMsgDictionary decodes a trace using the specification from the v0.5 endpoint. -// For details, see the documentation for endpoint v0.5 in pkg/trace/api/version.go -func (t *Traces) UnmarshalMsgDictionary(bts []byte) error { - var err error - if _, bts, err = safeReadHeaderBytes(bts, msgp.ReadArrayHeaderBytes); err != nil { - return err - } - // read dictionary - var sz uint32 - if sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadArrayHeaderBytes); err != nil { - return err - } - dict := make([]string, sz) - for i := range dict { - var str string - str, bts, err = parseStringBytes(bts) - if err != nil { - return err - } - dict[i] = str - } - // read traces - sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadArrayHeaderBytes) - if err != nil { - return err - } - if cap(*t) >= int(sz) { - *t = (*t)[:sz] - } else { - *t = make(Traces, sz) - } - for i := range *t { - sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadArrayHeaderBytes) - if err != nil { - return err - } - if cap((*t)[i]) >= int(sz) { - (*t)[i] = (*t)[i][:sz] - } else { - (*t)[i] = make(Trace, sz) - } - for j := range (*t)[i] { - if (*t)[i][j] == nil { - (*t)[i][j] = new(Span) - } - if bts, err = (*t)[i][j].UnmarshalMsgDictionary(bts, dict); err != nil { - return err - } - } - } - return nil -} - -// spanPropertyCount specifies the number of top-level properties that a span -// has. -const spanPropertyCount = 12 - -// UnmarshalMsgDictionary decodes a span from the given decoder dc, looking up strings -// in the given dictionary dict. For details, see the documentation for endpoint v0.5 -// in pkg/trace/api/version.go -func (z *Span) UnmarshalMsgDictionary(bts []byte, dict []string) ([]byte, error) { - var ( - sz uint32 - err error - ) - sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadArrayHeaderBytes) - if err != nil { - return bts, err - } - if sz != spanPropertyCount { - return bts, errors.New("encoded span needs exactly 12 elements in array") - } - // Service (0) - z.Service, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - // Name (1) - z.Name, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - // Resource (2) - z.Resource, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - // TraceID (3) - z.TraceID, bts, err = parseUint64Bytes(bts) - if err != nil { - return bts, err - } - // SpanID (4) - z.SpanID, bts, err = parseUint64Bytes(bts) - if err != nil { - return bts, err - } - // ParentID (5) - z.ParentID, bts, err = parseUint64Bytes(bts) - if err != nil { - return bts, err - } - // Start (6) - z.Start, bts, err = parseInt64Bytes(bts) - if err != nil { - return bts, err - } - // Duration (7) - z.Duration, bts, err = parseInt64Bytes(bts) - if err != nil { - return bts, err - } - // Error (8) - z.Error, bts, err = parseInt32Bytes(bts) - if err != nil { - return bts, err - } - // Meta (9) - sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadMapHeaderBytes) - if err != nil { - return bts, err - } - if z.Meta == nil && sz > 0 { - z.Meta = make(map[string]string, sz) - } else if len(z.Meta) > 0 { - for key := range z.Meta { - delete(z.Meta, key) - } - } - for sz > 0 { - sz-- - var key, val string - key, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - val, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - z.Meta[key] = val - } - // Metrics (10) - sz, bts, err = safeReadHeaderBytes(bts, msgp.ReadMapHeaderBytes) - if err != nil { - return bts, err - } - if z.Metrics == nil && sz > 0 { - z.Metrics = make(map[string]float64, sz) - } else if len(z.Metrics) > 0 { - for key := range z.Metrics { - delete(z.Metrics, key) - } - } - for sz > 0 { - sz-- - var ( - key string - val float64 - ) - key, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - val, bts, err = parseFloat64Bytes(bts) - if err != nil { - return bts, err - } - z.Metrics[key] = val - } - // Type (11) - z.Type, bts, err = dictionaryString(bts, dict) - if err != nil { - return bts, err - } - return bts, nil -} - -// safeReadHeaderBytes wraps msgp header readers (typically ReadArrayHeaderBytes and ReadMapHeaderBytes). -// It enforces the dictionary max size of 25MB and protects the caller from making unbounded allocations through `make(any, sz)`. -func safeReadHeaderBytes(b []byte, read func([]byte) (uint32, []byte, error)) (uint32, []byte, error) { - sz, bts, err := read(b) - if err != nil { - return 0, nil, err - } - if sz > 25*1e6 { - // Dictionary can't be larger than 25 MB - return 0, nil, errors.New("too long payload") - } - return sz, bts, err -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span.pb.go deleted file mode 100644 index f2c16f1a74..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span.pb.go +++ /dev/null @@ -1,866 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 -// source: datadog/trace/span.proto - -package trace - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AttributeAnyValue_AttributeAnyValueType int32 - -const ( - AttributeAnyValue_STRING_VALUE AttributeAnyValue_AttributeAnyValueType = 0 - AttributeAnyValue_BOOL_VALUE AttributeAnyValue_AttributeAnyValueType = 1 - AttributeAnyValue_INT_VALUE AttributeAnyValue_AttributeAnyValueType = 2 - AttributeAnyValue_DOUBLE_VALUE AttributeAnyValue_AttributeAnyValueType = 3 - AttributeAnyValue_ARRAY_VALUE AttributeAnyValue_AttributeAnyValueType = 4 -) - -// Enum value maps for AttributeAnyValue_AttributeAnyValueType. -var ( - AttributeAnyValue_AttributeAnyValueType_name = map[int32]string{ - 0: "STRING_VALUE", - 1: "BOOL_VALUE", - 2: "INT_VALUE", - 3: "DOUBLE_VALUE", - 4: "ARRAY_VALUE", - } - AttributeAnyValue_AttributeAnyValueType_value = map[string]int32{ - "STRING_VALUE": 0, - "BOOL_VALUE": 1, - "INT_VALUE": 2, - "DOUBLE_VALUE": 3, - "ARRAY_VALUE": 4, - } -) - -func (x AttributeAnyValue_AttributeAnyValueType) Enum() *AttributeAnyValue_AttributeAnyValueType { - p := new(AttributeAnyValue_AttributeAnyValueType) - *p = x - return p -} - -func (x AttributeAnyValue_AttributeAnyValueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AttributeAnyValue_AttributeAnyValueType) Descriptor() protoreflect.EnumDescriptor { - return file_datadog_trace_span_proto_enumTypes[0].Descriptor() -} - -func (AttributeAnyValue_AttributeAnyValueType) Type() protoreflect.EnumType { - return &file_datadog_trace_span_proto_enumTypes[0] -} - -func (x AttributeAnyValue_AttributeAnyValueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AttributeAnyValue_AttributeAnyValueType.Descriptor instead. -func (AttributeAnyValue_AttributeAnyValueType) EnumDescriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{2, 0} -} - -type AttributeArrayValue_AttributeArrayValueType int32 - -const ( - AttributeArrayValue_STRING_VALUE AttributeArrayValue_AttributeArrayValueType = 0 - AttributeArrayValue_BOOL_VALUE AttributeArrayValue_AttributeArrayValueType = 1 - AttributeArrayValue_INT_VALUE AttributeArrayValue_AttributeArrayValueType = 2 - AttributeArrayValue_DOUBLE_VALUE AttributeArrayValue_AttributeArrayValueType = 3 -) - -// Enum value maps for AttributeArrayValue_AttributeArrayValueType. -var ( - AttributeArrayValue_AttributeArrayValueType_name = map[int32]string{ - 0: "STRING_VALUE", - 1: "BOOL_VALUE", - 2: "INT_VALUE", - 3: "DOUBLE_VALUE", - } - AttributeArrayValue_AttributeArrayValueType_value = map[string]int32{ - "STRING_VALUE": 0, - "BOOL_VALUE": 1, - "INT_VALUE": 2, - "DOUBLE_VALUE": 3, - } -) - -func (x AttributeArrayValue_AttributeArrayValueType) Enum() *AttributeArrayValue_AttributeArrayValueType { - p := new(AttributeArrayValue_AttributeArrayValueType) - *p = x - return p -} - -func (x AttributeArrayValue_AttributeArrayValueType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AttributeArrayValue_AttributeArrayValueType) Descriptor() protoreflect.EnumDescriptor { - return file_datadog_trace_span_proto_enumTypes[1].Descriptor() -} - -func (AttributeArrayValue_AttributeArrayValueType) Type() protoreflect.EnumType { - return &file_datadog_trace_span_proto_enumTypes[1] -} - -func (x AttributeArrayValue_AttributeArrayValueType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AttributeArrayValue_AttributeArrayValueType.Descriptor instead. -func (AttributeArrayValue_AttributeArrayValueType) EnumDescriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{4, 0} -} - -type SpanLink struct { - state protoimpl.MessageState `protogen:"open.v1"` - // @gotags: json:"trace_id" msg:"trace_id" - TraceID uint64 `protobuf:"varint,1,opt,name=traceID,proto3" json:"trace_id" msg:"trace_id"` // Required. - // @gotags: json:"trace_id_high" msg:"trace_id_high,omitempty" - TraceIDHigh uint64 `protobuf:"varint,2,opt,name=traceID_high,json=traceIDHigh,proto3" json:"trace_id_high" msg:"trace_id_high,omitempty"` // Optional. The high 64 bits of a referenced trace id. - // @gotags: json:"span_id" msg:"span_id" - SpanID uint64 `protobuf:"varint,3,opt,name=spanID,proto3" json:"span_id" msg:"span_id"` // Required. - // @gotags: msg:"attributes,omitempty" - Attributes map[string]string `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"attributes,omitempty"` // Optional. Simple mapping of keys to string values. - // @gotags: msg:"tracestate,omitempty" - Tracestate string `protobuf:"bytes,5,opt,name=tracestate,proto3" json:"tracestate,omitempty" msg:"tracestate,omitempty"` // Optional. W3C tracestate. - // @gotags: msg:"flags,omitempty" - Flags uint32 `protobuf:"varint,6,opt,name=flags,proto3" json:"flags,omitempty" msg:"flags,omitempty"` // Optional. W3C trace flags. If set, the high bit (bit 31) must be set. - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SpanLink) Reset() { - *x = SpanLink{} - mi := &file_datadog_trace_span_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SpanLink) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SpanLink) ProtoMessage() {} - -func (x *SpanLink) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SpanLink.ProtoReflect.Descriptor instead. -func (*SpanLink) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{0} -} - -func (x *SpanLink) GetTraceID() uint64 { - if x != nil { - return x.TraceID - } - return 0 -} - -func (x *SpanLink) GetTraceIDHigh() uint64 { - if x != nil { - return x.TraceIDHigh - } - return 0 -} - -func (x *SpanLink) GetSpanID() uint64 { - if x != nil { - return x.SpanID - } - return 0 -} - -func (x *SpanLink) GetAttributes() map[string]string { - if x != nil { - return x.Attributes - } - return nil -} - -func (x *SpanLink) GetTracestate() string { - if x != nil { - return x.Tracestate - } - return "" -} - -func (x *SpanLink) GetFlags() uint32 { - if x != nil { - return x.Flags - } - return 0 -} - -type SpanEvent struct { - state protoimpl.MessageState `protogen:"open.v1"` - // @gotags: json:"time_unix_nano" msg:"time_unix_nano" - TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano" msg:"time_unix_nano"` // time is the number of nanoseconds between the Unix epoch and this event. - // @gotags: json:"name" msg:"name" - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" msg:"name"` // name is this event's name. - // attributes is a mapping from attribute key string to any value. - // The order of attributes should be preserved in the key/value map. - // The supported values match the OpenTelemetry attributes specification: - // https://github.com/open-telemetry/opentelemetry-proto/blob/a8f08fc49d60538f97ffabcc7feac92f832976dd/opentelemetry/proto/common/v1/common.proto - // @gotags: json:"attributes" msg:"attributes" - Attributes map[string]*AttributeAnyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"attributes"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SpanEvent) Reset() { - *x = SpanEvent{} - mi := &file_datadog_trace_span_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SpanEvent) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SpanEvent) ProtoMessage() {} - -func (x *SpanEvent) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SpanEvent.ProtoReflect.Descriptor instead. -func (*SpanEvent) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{1} -} - -func (x *SpanEvent) GetTimeUnixNano() uint64 { - if x != nil { - return x.TimeUnixNano - } - return 0 -} - -func (x *SpanEvent) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *SpanEvent) GetAttributes() map[string]*AttributeAnyValue { - if x != nil { - return x.Attributes - } - return nil -} - -// AttributeAnyValue is used to represent any type of attribute value. AttributeAnyValue may contain a -// primitive value such as a string or integer or it may contain an arbitrary nested -// object containing arrays, key-value lists and primitives. -type AttributeAnyValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // We implement a union manually here because Go's MessagePack generator does not support - // Protobuf `oneof` unions: https://github.com/tinylib/msgp/issues/184 - // Despite this, the format represented here is binary compatible with `oneof`, if we choose - // to migrate to that in the future. - // @gotags: json:"type" msg:"type" - Type AttributeAnyValue_AttributeAnyValueType `protobuf:"varint,1,opt,name=type,proto3,enum=datadog.trace.AttributeAnyValue_AttributeAnyValueType" json:"type" msg:"type"` - // @gotags: json:"string_value" msg:"string_value" - StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3" json:"string_value" msg:"string_value"` - // @gotags: json:"bool_value" msg:"bool_value" - BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3" json:"bool_value" msg:"bool_value"` - // @gotags: json:"int_value" msg:"int_value" - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3" json:"int_value" msg:"int_value"` - // @gotags: json:"double_value" msg:"double_value" - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value" msg:"double_value"` - // @gotags: json:"array_value" msg:"array_value" - ArrayValue *AttributeArray `protobuf:"bytes,6,opt,name=array_value,json=arrayValue,proto3" json:"array_value" msg:"array_value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AttributeAnyValue) Reset() { - *x = AttributeAnyValue{} - mi := &file_datadog_trace_span_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AttributeAnyValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeAnyValue) ProtoMessage() {} - -func (x *AttributeAnyValue) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeAnyValue.ProtoReflect.Descriptor instead. -func (*AttributeAnyValue) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{2} -} - -func (x *AttributeAnyValue) GetType() AttributeAnyValue_AttributeAnyValueType { - if x != nil { - return x.Type - } - return AttributeAnyValue_STRING_VALUE -} - -func (x *AttributeAnyValue) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -func (x *AttributeAnyValue) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *AttributeAnyValue) GetIntValue() int64 { - if x != nil { - return x.IntValue - } - return 0 -} - -func (x *AttributeAnyValue) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -func (x *AttributeAnyValue) GetArrayValue() *AttributeArray { - if x != nil { - return x.ArrayValue - } - return nil -} - -// AttributeArray is a list of AttributeArrayValue messages. We need this as a message since `oneof` in AttributeAnyValue does not allow repeated fields. -type AttributeArray struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Array of values. The array may be empty (contain 0 elements). - // @gotags: json:"values" msg:"values" - Values []*AttributeArrayValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values" msg:"values"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AttributeArray) Reset() { - *x = AttributeArray{} - mi := &file_datadog_trace_span_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AttributeArray) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeArray) ProtoMessage() {} - -func (x *AttributeArray) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeArray.ProtoReflect.Descriptor instead. -func (*AttributeArray) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{3} -} - -func (x *AttributeArray) GetValues() []*AttributeArrayValue { - if x != nil { - return x.Values - } - return nil -} - -// An element in the homogeneous AttributeArray. -// Compared to AttributeAnyValue, it only supports scalar values. -type AttributeArrayValue struct { - state protoimpl.MessageState `protogen:"open.v1"` - // We implement a union manually here because Go's MessagePack generator does not support - // Protobuf `oneof` unions: https://github.com/tinylib/msgp/issues/184 - // Despite this, the format represented here is binary compatible with `oneof`, if we choose - // to migrate to that in the future. - // @gotags: json:"type" msg:"type" - Type AttributeArrayValue_AttributeArrayValueType `protobuf:"varint,1,opt,name=type,proto3,enum=datadog.trace.AttributeArrayValue_AttributeArrayValueType" json:"type" msg:"type"` - // @gotags: json:"string_value" msg:"string_value" - StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3" json:"string_value" msg:"string_value"` - // @gotags: json:"bool_value" msg:"bool_value" - BoolValue bool `protobuf:"varint,3,opt,name=bool_value,json=boolValue,proto3" json:"bool_value" msg:"bool_value"` - // @gotags: json:"int_value" msg:"int_value" - IntValue int64 `protobuf:"varint,4,opt,name=int_value,json=intValue,proto3" json:"int_value" msg:"int_value"` - // @gotags: json:"double_value" msg:"double_value" - DoubleValue float64 `protobuf:"fixed64,5,opt,name=double_value,json=doubleValue,proto3" json:"double_value" msg:"double_value"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AttributeArrayValue) Reset() { - *x = AttributeArrayValue{} - mi := &file_datadog_trace_span_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AttributeArrayValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AttributeArrayValue) ProtoMessage() {} - -func (x *AttributeArrayValue) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AttributeArrayValue.ProtoReflect.Descriptor instead. -func (*AttributeArrayValue) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{4} -} - -func (x *AttributeArrayValue) GetType() AttributeArrayValue_AttributeArrayValueType { - if x != nil { - return x.Type - } - return AttributeArrayValue_STRING_VALUE -} - -func (x *AttributeArrayValue) GetStringValue() string { - if x != nil { - return x.StringValue - } - return "" -} - -func (x *AttributeArrayValue) GetBoolValue() bool { - if x != nil { - return x.BoolValue - } - return false -} - -func (x *AttributeArrayValue) GetIntValue() int64 { - if x != nil { - return x.IntValue - } - return 0 -} - -func (x *AttributeArrayValue) GetDoubleValue() float64 { - if x != nil { - return x.DoubleValue - } - return 0 -} - -type Span struct { - state protoimpl.MessageState `protogen:"open.v1"` - // service is the name of the service with which this span is associated. - // @gotags: json:"service" msg:"service" - Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service" msg:"service"` - // name is the operation name of this span. - // @gotags: json:"name" msg:"name" - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name" msg:"name"` - // resource is the resource name of this span, also sometimes called the endpoint (for web spans). - // @gotags: json:"resource" msg:"resource" - Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource" msg:"resource"` - // traceID is the ID of the trace to which this span belongs. - // @gotags: json:"trace_id" msg:"trace_id" - TraceID uint64 `protobuf:"varint,4,opt,name=traceID,proto3" json:"trace_id" msg:"trace_id"` - // spanID is the ID of this span. - // @gotags: json:"span_id" msg:"span_id" - SpanID uint64 `protobuf:"varint,5,opt,name=spanID,proto3" json:"span_id" msg:"span_id"` - // parentID is the ID of this span's parent, or zero if this span has no parent. - // @gotags: json:"parent_id" msg:"parent_id" - ParentID uint64 `protobuf:"varint,6,opt,name=parentID,proto3" json:"parent_id" msg:"parent_id"` - // start is the number of nanoseconds between the Unix epoch and the beginning of this span. - // @gotags: json:"start" msg:"start" - Start int64 `protobuf:"varint,7,opt,name=start,proto3" json:"start" msg:"start"` - // duration is the time length of this span in nanoseconds. - // @gotags: json:"duration" msg:"duration" - Duration int64 `protobuf:"varint,8,opt,name=duration,proto3" json:"duration" msg:"duration"` - // error is 1 if there is an error associated with this span, or 0 if there is not. - // @gotags: json:"error" msg:"error" - Error int32 `protobuf:"varint,9,opt,name=error,proto3" json:"error" msg:"error"` - // meta is a mapping from tag name to tag value for string-valued tags. - // @gotags: json:"meta,omitempty" msg:"meta,omitempty" - Meta map[string]string `protobuf:"bytes,10,rep,name=meta,proto3" json:"meta,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"meta,omitempty"` - // metrics is a mapping from tag name to tag value for numeric-valued tags. - // @gotags: json:"metrics,omitempty" msg:"metrics,omitempty" - Metrics map[string]float64 `protobuf:"bytes,11,rep,name=metrics,proto3" json:"metrics,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value" msg:"metrics,omitempty"` - // type is the type of the service with which this span is associated. Example values: web, db, lambda. - // @gotags: json:"type" msg:"type" - Type string `protobuf:"bytes,12,opt,name=type,proto3" json:"type" msg:"type"` - // meta_struct is a registry of structured "other" data used by, e.g., AppSec. - // @gotags: json:"meta_struct,omitempty" msg:"meta_struct,omitempty" - MetaStruct map[string][]byte `protobuf:"bytes,13,rep,name=meta_struct,json=metaStruct,proto3" json:"meta_struct,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"meta_struct,omitempty"` - // span_links represents a collection of links, where each link defines a causal relationship between two spans. - // @gotags: json:"span_links,omitempty" msg:"span_links,omitempty" - SpanLinks []*SpanLink `protobuf:"bytes,14,rep,name=spanLinks,proto3" json:"span_links,omitempty" msg:"span_links,omitempty"` - // spanEvents represent an event at an instant in time related to this span, but not necessarily during the span. - // @gotags: json:"span_events,omitempty" msg:"span_events,omitempty" - SpanEvents []*SpanEvent `protobuf:"bytes,15,rep,name=spanEvents,proto3" json:"span_events,omitempty" msg:"span_events,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Span) Reset() { - *x = Span{} - mi := &file_datadog_trace_span_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Span) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Span) ProtoMessage() {} - -func (x *Span) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_span_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Span.ProtoReflect.Descriptor instead. -func (*Span) Descriptor() ([]byte, []int) { - return file_datadog_trace_span_proto_rawDescGZIP(), []int{5} -} - -func (x *Span) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *Span) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Span) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *Span) GetTraceID() uint64 { - if x != nil { - return x.TraceID - } - return 0 -} - -func (x *Span) GetSpanID() uint64 { - if x != nil { - return x.SpanID - } - return 0 -} - -func (x *Span) GetParentID() uint64 { - if x != nil { - return x.ParentID - } - return 0 -} - -func (x *Span) GetStart() int64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *Span) GetDuration() int64 { - if x != nil { - return x.Duration - } - return 0 -} - -func (x *Span) GetError() int32 { - if x != nil { - return x.Error - } - return 0 -} - -func (x *Span) GetMeta() map[string]string { - if x != nil { - return x.Meta - } - return nil -} - -func (x *Span) GetMetrics() map[string]float64 { - if x != nil { - return x.Metrics - } - return nil -} - -func (x *Span) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *Span) GetMetaStruct() map[string][]byte { - if x != nil { - return x.MetaStruct - } - return nil -} - -func (x *Span) GetSpanLinks() []*SpanLink { - if x != nil { - return x.SpanLinks - } - return nil -} - -func (x *Span) GetSpanEvents() []*SpanEvent { - if x != nil { - return x.SpanEvents - } - return nil -} - -var File_datadog_trace_span_proto protoreflect.FileDescriptor - -const file_datadog_trace_span_proto_rawDesc = "" + - "\n" + - "\x18datadog/trace/span.proto\x12\rdatadog.trace\"\x9d\x02\n" + - "\bSpanLink\x12\x18\n" + - "\atraceID\x18\x01 \x01(\x04R\atraceID\x12!\n" + - "\ftraceID_high\x18\x02 \x01(\x04R\vtraceIDHigh\x12\x16\n" + - "\x06spanID\x18\x03 \x01(\x04R\x06spanID\x12G\n" + - "\n" + - "attributes\x18\x04 \x03(\v2'.datadog.trace.SpanLink.AttributesEntryR\n" + - "attributes\x12\x1e\n" + - "\n" + - "tracestate\x18\x05 \x01(\tR\n" + - "tracestate\x12\x14\n" + - "\x05flags\x18\x06 \x01(\rR\x05flags\x1a=\n" + - "\x0fAttributesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xf0\x01\n" + - "\tSpanEvent\x12$\n" + - "\x0etime_unix_nano\x18\x01 \x01(\x06R\ftimeUnixNano\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12H\n" + - "\n" + - "attributes\x18\x03 \x03(\v2(.datadog.trace.SpanEvent.AttributesEntryR\n" + - "attributes\x1a_\n" + - "\x0fAttributesEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x126\n" + - "\x05value\x18\x02 \x01(\v2 .datadog.trace.AttributeAnyValueR\x05value:\x028\x01\"\x8e\x03\n" + - "\x11AttributeAnyValue\x12J\n" + - "\x04type\x18\x01 \x01(\x0e26.datadog.trace.AttributeAnyValue.AttributeAnyValueTypeR\x04type\x12!\n" + - "\fstring_value\x18\x02 \x01(\tR\vstringValue\x12\x1d\n" + - "\n" + - "bool_value\x18\x03 \x01(\bR\tboolValue\x12\x1b\n" + - "\tint_value\x18\x04 \x01(\x03R\bintValue\x12!\n" + - "\fdouble_value\x18\x05 \x01(\x01R\vdoubleValue\x12>\n" + - "\varray_value\x18\x06 \x01(\v2\x1d.datadog.trace.AttributeArrayR\n" + - "arrayValue\"k\n" + - "\x15AttributeAnyValueType\x12\x10\n" + - "\fSTRING_VALUE\x10\x00\x12\x0e\n" + - "\n" + - "BOOL_VALUE\x10\x01\x12\r\n" + - "\tINT_VALUE\x10\x02\x12\x10\n" + - "\fDOUBLE_VALUE\x10\x03\x12\x0f\n" + - "\vARRAY_VALUE\x10\x04\"L\n" + - "\x0eAttributeArray\x12:\n" + - "\x06values\x18\x01 \x03(\v2\".datadog.trace.AttributeArrayValueR\x06values\"\xc5\x02\n" + - "\x13AttributeArrayValue\x12N\n" + - "\x04type\x18\x01 \x01(\x0e2:.datadog.trace.AttributeArrayValue.AttributeArrayValueTypeR\x04type\x12!\n" + - "\fstring_value\x18\x02 \x01(\tR\vstringValue\x12\x1d\n" + - "\n" + - "bool_value\x18\x03 \x01(\bR\tboolValue\x12\x1b\n" + - "\tint_value\x18\x04 \x01(\x03R\bintValue\x12!\n" + - "\fdouble_value\x18\x05 \x01(\x01R\vdoubleValue\"\\\n" + - "\x17AttributeArrayValueType\x12\x10\n" + - "\fSTRING_VALUE\x10\x00\x12\x0e\n" + - "\n" + - "BOOL_VALUE\x10\x01\x12\r\n" + - "\tINT_VALUE\x10\x02\x12\x10\n" + - "\fDOUBLE_VALUE\x10\x03\"\xd4\x05\n" + - "\x04Span\x12\x18\n" + - "\aservice\x18\x01 \x01(\tR\aservice\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" + - "\bresource\x18\x03 \x01(\tR\bresource\x12\x18\n" + - "\atraceID\x18\x04 \x01(\x04R\atraceID\x12\x16\n" + - "\x06spanID\x18\x05 \x01(\x04R\x06spanID\x12\x1a\n" + - "\bparentID\x18\x06 \x01(\x04R\bparentID\x12\x14\n" + - "\x05start\x18\a \x01(\x03R\x05start\x12\x1a\n" + - "\bduration\x18\b \x01(\x03R\bduration\x12\x14\n" + - "\x05error\x18\t \x01(\x05R\x05error\x121\n" + - "\x04meta\x18\n" + - " \x03(\v2\x1d.datadog.trace.Span.MetaEntryR\x04meta\x12:\n" + - "\ametrics\x18\v \x03(\v2 .datadog.trace.Span.MetricsEntryR\ametrics\x12\x12\n" + - "\x04type\x18\f \x01(\tR\x04type\x12D\n" + - "\vmeta_struct\x18\r \x03(\v2#.datadog.trace.Span.MetaStructEntryR\n" + - "metaStruct\x125\n" + - "\tspanLinks\x18\x0e \x03(\v2\x17.datadog.trace.SpanLinkR\tspanLinks\x128\n" + - "\n" + - "spanEvents\x18\x0f \x03(\v2\x18.datadog.trace.SpanEventR\n" + - "spanEvents\x1a7\n" + - "\tMetaEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a:\n" + - "\fMetricsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1a=\n" + - "\x0fMetaStructEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01B\x16Z\x14pkg/proto/pbgo/traceb\x06proto3" - -var ( - file_datadog_trace_span_proto_rawDescOnce sync.Once - file_datadog_trace_span_proto_rawDescData []byte -) - -func file_datadog_trace_span_proto_rawDescGZIP() []byte { - file_datadog_trace_span_proto_rawDescOnce.Do(func() { - file_datadog_trace_span_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_datadog_trace_span_proto_rawDesc), len(file_datadog_trace_span_proto_rawDesc))) - }) - return file_datadog_trace_span_proto_rawDescData -} - -var file_datadog_trace_span_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_datadog_trace_span_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_datadog_trace_span_proto_goTypes = []any{ - (AttributeAnyValue_AttributeAnyValueType)(0), // 0: datadog.trace.AttributeAnyValue.AttributeAnyValueType - (AttributeArrayValue_AttributeArrayValueType)(0), // 1: datadog.trace.AttributeArrayValue.AttributeArrayValueType - (*SpanLink)(nil), // 2: datadog.trace.SpanLink - (*SpanEvent)(nil), // 3: datadog.trace.SpanEvent - (*AttributeAnyValue)(nil), // 4: datadog.trace.AttributeAnyValue - (*AttributeArray)(nil), // 5: datadog.trace.AttributeArray - (*AttributeArrayValue)(nil), // 6: datadog.trace.AttributeArrayValue - (*Span)(nil), // 7: datadog.trace.Span - nil, // 8: datadog.trace.SpanLink.AttributesEntry - nil, // 9: datadog.trace.SpanEvent.AttributesEntry - nil, // 10: datadog.trace.Span.MetaEntry - nil, // 11: datadog.trace.Span.MetricsEntry - nil, // 12: datadog.trace.Span.MetaStructEntry -} -var file_datadog_trace_span_proto_depIdxs = []int32{ - 8, // 0: datadog.trace.SpanLink.attributes:type_name -> datadog.trace.SpanLink.AttributesEntry - 9, // 1: datadog.trace.SpanEvent.attributes:type_name -> datadog.trace.SpanEvent.AttributesEntry - 0, // 2: datadog.trace.AttributeAnyValue.type:type_name -> datadog.trace.AttributeAnyValue.AttributeAnyValueType - 5, // 3: datadog.trace.AttributeAnyValue.array_value:type_name -> datadog.trace.AttributeArray - 6, // 4: datadog.trace.AttributeArray.values:type_name -> datadog.trace.AttributeArrayValue - 1, // 5: datadog.trace.AttributeArrayValue.type:type_name -> datadog.trace.AttributeArrayValue.AttributeArrayValueType - 10, // 6: datadog.trace.Span.meta:type_name -> datadog.trace.Span.MetaEntry - 11, // 7: datadog.trace.Span.metrics:type_name -> datadog.trace.Span.MetricsEntry - 12, // 8: datadog.trace.Span.meta_struct:type_name -> datadog.trace.Span.MetaStructEntry - 2, // 9: datadog.trace.Span.spanLinks:type_name -> datadog.trace.SpanLink - 3, // 10: datadog.trace.Span.spanEvents:type_name -> datadog.trace.SpanEvent - 4, // 11: datadog.trace.SpanEvent.AttributesEntry.value:type_name -> datadog.trace.AttributeAnyValue - 12, // [12:12] is the sub-list for method output_type - 12, // [12:12] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_datadog_trace_span_proto_init() } -func file_datadog_trace_span_proto_init() { - if File_datadog_trace_span_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_datadog_trace_span_proto_rawDesc), len(file_datadog_trace_span_proto_rawDesc)), - NumEnums: 2, - NumMessages: 11, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_datadog_trace_span_proto_goTypes, - DependencyIndexes: file_datadog_trace_span_proto_depIdxs, - EnumInfos: file_datadog_trace_span_proto_enumTypes, - MessageInfos: file_datadog_trace_span_proto_msgTypes, - }.Build() - File_datadog_trace_span_proto = out.File - file_datadog_trace_span_proto_goTypes = nil - file_datadog_trace_span_proto_depIdxs = nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_gen.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_gen.go deleted file mode 100644 index dbda815808..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_gen.go +++ /dev/null @@ -1,1198 +0,0 @@ -package trace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// MarshalMsg implements msgp.Marshaler -func (z *AttributeAnyValue) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 6 - // string "type" - o = append(o, 0x86, 0xa4, 0x74, 0x79, 0x70, 0x65) - o = msgp.AppendInt32(o, int32(z.Type)) - // string "string_value" - o = append(o, 0xac, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendString(o, z.StringValue) - // string "bool_value" - o = append(o, 0xaa, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendBool(o, z.BoolValue) - // string "int_value" - o = append(o, 0xa9, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendInt64(o, z.IntValue) - // string "double_value" - o = append(o, 0xac, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendFloat64(o, z.DoubleValue) - // string "array_value" - o = append(o, 0xab, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if z.ArrayValue == nil { - o = msgp.AppendNil(o) - } else { - // map header, size 1 - // string "values" - o = append(o, 0x81, 0xa6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.ArrayValue.Values))) - for za0001 := range z.ArrayValue.Values { - if z.ArrayValue.Values[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.ArrayValue.Values[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values", za0001) - return - } - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AttributeAnyValue) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - { - var zb0002 int32 - zb0002, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - z.Type = AttributeAnyValue_AttributeAnyValueType(zb0002) - } - case "string_value": - z.StringValue, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - case "bool_value": - z.BoolValue, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - case "int_value": - z.IntValue, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - case "double_value": - z.DoubleValue, bts, err = msgp.ReadFloat64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - case "array_value": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.ArrayValue = nil - } else { - if z.ArrayValue == nil { - z.ArrayValue = new(AttributeArray) - } - var zb0003 uint32 - zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - for zb0003 > 0 { - zb0003-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - switch msgp.UnsafeString(field) { - case "values": - var zb0004 uint32 - zb0004, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values") - return - } - if cap(z.ArrayValue.Values) >= int(zb0004) { - z.ArrayValue.Values = (z.ArrayValue.Values)[:zb0004] - } else { - z.ArrayValue.Values = make([]*AttributeArrayValue, zb0004) - } - for za0001 := range z.ArrayValue.Values { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.ArrayValue.Values[za0001] = nil - } else { - if z.ArrayValue.Values[za0001] == nil { - z.ArrayValue.Values[za0001] = new(AttributeArrayValue) - } - bts, err = z.ArrayValue.Values[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values", za0001) - return - } - } - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - } - } - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *AttributeAnyValue) Msgsize() (s int) { - s = 1 + 5 + msgp.Int32Size + 13 + msgp.StringPrefixSize + len(z.StringValue) + 11 + msgp.BoolSize + 10 + msgp.Int64Size + 13 + msgp.Float64Size + 12 - if z.ArrayValue == nil { - s += msgp.NilSize - } else { - s += 1 + 7 + msgp.ArrayHeaderSize - for za0001 := range z.ArrayValue.Values { - if z.ArrayValue.Values[za0001] == nil { - s += msgp.NilSize - } else { - s += z.ArrayValue.Values[za0001].Msgsize() - } - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z AttributeAnyValue_AttributeAnyValueType) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendInt32(o, int32(z)) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AttributeAnyValue_AttributeAnyValueType) UnmarshalMsg(bts []byte) (o []byte, err error) { - { - var zb0001 int32 - zb0001, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = AttributeAnyValue_AttributeAnyValueType(zb0001) - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z AttributeAnyValue_AttributeAnyValueType) Msgsize() (s int) { - s = msgp.Int32Size - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *AttributeArray) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 1 - // string "values" - o = append(o, 0x81, 0xa6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Values))) - for za0001 := range z.Values { - if z.Values[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Values[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Values", za0001) - return - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AttributeArray) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "values": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Values") - return - } - if cap(z.Values) >= int(zb0002) { - z.Values = (z.Values)[:zb0002] - } else { - z.Values = make([]*AttributeArrayValue, zb0002) - } - for za0001 := range z.Values { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Values[za0001] = nil - } else { - if z.Values[za0001] == nil { - z.Values[za0001] = new(AttributeArrayValue) - } - bts, err = z.Values[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Values", za0001) - return - } - } - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *AttributeArray) Msgsize() (s int) { - s = 1 + 7 + msgp.ArrayHeaderSize - for za0001 := range z.Values { - if z.Values[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Values[za0001].Msgsize() - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *AttributeArrayValue) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 5 - // string "type" - o = append(o, 0x85, 0xa4, 0x74, 0x79, 0x70, 0x65) - o = msgp.AppendInt32(o, int32(z.Type)) - // string "string_value" - o = append(o, 0xac, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendString(o, z.StringValue) - // string "bool_value" - o = append(o, 0xaa, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendBool(o, z.BoolValue) - // string "int_value" - o = append(o, 0xa9, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendInt64(o, z.IntValue) - // string "double_value" - o = append(o, 0xac, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - o = msgp.AppendFloat64(o, z.DoubleValue) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AttributeArrayValue) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - { - var zb0002 int32 - zb0002, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - z.Type = AttributeArrayValue_AttributeArrayValueType(zb0002) - } - case "string_value": - z.StringValue, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - case "bool_value": - z.BoolValue, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - case "int_value": - z.IntValue, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - case "double_value": - z.DoubleValue, bts, err = msgp.ReadFloat64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *AttributeArrayValue) Msgsize() (s int) { - s = 1 + 5 + msgp.Int32Size + 13 + msgp.StringPrefixSize + len(z.StringValue) + 11 + msgp.BoolSize + 10 + msgp.Int64Size + 13 + msgp.Float64Size - return -} - -// MarshalMsg implements msgp.Marshaler -func (z AttributeArrayValue_AttributeArrayValueType) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendInt32(o, int32(z)) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *AttributeArrayValue_AttributeArrayValueType) UnmarshalMsg(bts []byte) (o []byte, err error) { - { - var zb0001 int32 - zb0001, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = AttributeArrayValue_AttributeArrayValueType(zb0001) - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z AttributeArrayValue_AttributeArrayValueType) Msgsize() (s int) { - s = msgp.Int32Size - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *Span) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(15) - var zb0001Mask uint16 /* 15 bits */ - _ = zb0001Mask - if z.Meta == nil { - zb0001Len-- - zb0001Mask |= 0x200 - } - if z.Metrics == nil { - zb0001Len-- - zb0001Mask |= 0x400 - } - if z.MetaStruct == nil { - zb0001Len-- - zb0001Mask |= 0x1000 - } - if z.SpanLinks == nil { - zb0001Len-- - zb0001Mask |= 0x2000 - } - if z.SpanEvents == nil { - zb0001Len-- - zb0001Mask |= 0x4000 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "service" - o = append(o, 0xa7, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - o = msgp.AppendString(o, z.Service) - // string "name" - o = append(o, 0xa4, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Name) - // string "resource" - o = append(o, 0xa8, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65) - o = msgp.AppendString(o, z.Resource) - // string "trace_id" - o = append(o, 0xa8, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64) - o = msgp.AppendUint64(o, z.TraceID) - // string "span_id" - o = append(o, 0xa7, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64) - o = msgp.AppendUint64(o, z.SpanID) - // string "parent_id" - o = append(o, 0xa9, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64) - o = msgp.AppendUint64(o, z.ParentID) - // string "start" - o = append(o, 0xa5, 0x73, 0x74, 0x61, 0x72, 0x74) - o = msgp.AppendInt64(o, z.Start) - // string "duration" - o = append(o, 0xa8, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendInt64(o, z.Duration) - // string "error" - o = append(o, 0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - o = msgp.AppendInt32(o, z.Error) - if (zb0001Mask & 0x200) == 0 { // if not omitted - // string "meta" - o = append(o, 0xa4, 0x6d, 0x65, 0x74, 0x61) - o = msgp.AppendMapHeader(o, uint32(len(z.Meta))) - for za0001, za0002 := range z.Meta { - o = msgp.AppendString(o, za0001) - o = msgp.AppendString(o, za0002) - } - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // string "metrics" - o = append(o, 0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Metrics))) - for za0003, za0004 := range z.Metrics { - o = msgp.AppendString(o, za0003) - o = msgp.AppendFloat64(o, za0004) - } - } - // string "type" - o = append(o, 0xa4, 0x74, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, z.Type) - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // string "meta_struct" - o = append(o, 0xab, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74) - o = msgp.AppendMapHeader(o, uint32(len(z.MetaStruct))) - for za0005, za0006 := range z.MetaStruct { - o = msgp.AppendString(o, za0005) - o = msgp.AppendBytes(o, za0006) - } - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // string "span_links" - o = append(o, 0xaa, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.SpanLinks))) - for za0007 := range z.SpanLinks { - if z.SpanLinks[za0007] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.SpanLinks[za0007].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "SpanLinks", za0007) - return - } - } - } - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // string "span_events" - o = append(o, 0xab, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.SpanEvents))) - for za0008 := range z.SpanEvents { - if z.SpanEvents[za0008] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.SpanEvents[za0008].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "SpanEvents", za0008) - return - } - } - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Span) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "service": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Service = "" - break - } - z.Service, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "name": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Name = "" - break - } - z.Name, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "resource": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Resource = "" - break - } - z.Resource, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "trace_id": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.TraceID = 0 - break - } - z.TraceID, bts, err = parseUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - case "span_id": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.SpanID = 0 - break - } - z.SpanID, bts, err = parseUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - case "parent_id": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.ParentID = 0 - break - } - z.ParentID, bts, err = parseUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "ParentID") - return - } - case "start": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Start = 0 - break - } - z.Start, bts, err = parseInt64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - case "duration": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Duration = 0 - break - } - z.Duration, bts, err = parseInt64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "error": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Error = 0 - break - } - z.Error, bts, err = parseInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Error") - return - } - case "meta": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Meta = nil - break - } - var zb0002 uint32 - zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - if z.Meta == nil && zb0002 > 0 { - z.Meta = make(map[string]string, zb0002) - } else if len(z.Meta) > 0 { - for key := range z.Meta { - delete(z.Meta, key) - } - } - for zb0002 > 0 { - var za0001 string - var za0002 string - zb0002-- - za0001, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - za0002, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Meta", za0001) - return - } - z.Meta[za0001] = za0002 - } - case "metrics": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Metrics = nil - break - } - var zb0003 uint32 - zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - if z.Metrics == nil && zb0003 > 0{ - z.Metrics = make(map[string]float64, zb0003) - } else if len(z.Metrics) > 0 { - for key := range z.Metrics { - delete(z.Metrics, key) - } - } - for zb0003 > 0 { - var za0003 string - var za0004 float64 - zb0003-- - za0003, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - za0004, bts, err = parseFloat64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Metrics", za0003) - return - } - z.Metrics[za0003] = za0004 - } - case "type": - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - z.Type = "" - break - } - z.Type, bts, err = parseStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "meta_struct": - var zb0004 uint32 - zb0004, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "MetaStruct") - return - } - if z.MetaStruct == nil { - z.MetaStruct = make(map[string][]byte, zb0004) - } else if len(z.MetaStruct) > 0 { - for key := range z.MetaStruct { - delete(z.MetaStruct, key) - } - } - for zb0004 > 0 { - var za0005 string - var za0006 []byte - zb0004-- - za0005, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "MetaStruct") - return - } - za0006, bts, err = msgp.ReadBytesBytes(bts, za0006) - if err != nil { - err = msgp.WrapError(err, "MetaStruct", za0005) - return - } - z.MetaStruct[za0005] = za0006 - } - case "span_links": - var zb0005 uint32 - zb0005, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "SpanLinks") - return - } - if cap(z.SpanLinks) >= int(zb0005) { - z.SpanLinks = (z.SpanLinks)[:zb0005] - } else { - z.SpanLinks = make([]*SpanLink, zb0005) - } - for za0007 := range z.SpanLinks { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.SpanLinks[za0007] = nil - } else { - if z.SpanLinks[za0007] == nil { - z.SpanLinks[za0007] = new(SpanLink) - } - bts, err = z.SpanLinks[za0007].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "SpanLinks", za0007) - return - } - } - } - case "span_events": - var zb0006 uint32 - zb0006, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "SpanEvents") - return - } - if cap(z.SpanEvents) >= int(zb0006) { - z.SpanEvents = (z.SpanEvents)[:zb0006] - } else { - z.SpanEvents = make([]*SpanEvent, zb0006) - } - for za0008 := range z.SpanEvents { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.SpanEvents[za0008] = nil - } else { - if z.SpanEvents[za0008] == nil { - z.SpanEvents[za0008] = new(SpanEvent) - } - bts, err = z.SpanEvents[za0008].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "SpanEvents", za0008) - return - } - } - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *Span) Msgsize() (s int) { - s = 1 + 8 + msgp.StringPrefixSize + len(z.Service) + 5 + msgp.StringPrefixSize + len(z.Name) + 9 + msgp.StringPrefixSize + len(z.Resource) + 9 + msgp.Uint64Size + 8 + msgp.Uint64Size + 10 + msgp.Uint64Size + 6 + msgp.Int64Size + 9 + msgp.Int64Size + 6 + msgp.Int32Size + 5 + msgp.MapHeaderSize - if z.Meta != nil { - for za0001, za0002 := range z.Meta { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.StringPrefixSize + len(za0002) - } - } - s += 8 + msgp.MapHeaderSize - if z.Metrics != nil { - for za0003, za0004 := range z.Metrics { - _ = za0004 - s += msgp.StringPrefixSize + len(za0003) + msgp.Float64Size - } - } - s += 5 + msgp.StringPrefixSize + len(z.Type) + 12 + msgp.MapHeaderSize - if z.MetaStruct != nil { - for za0005, za0006 := range z.MetaStruct { - _ = za0006 - s += msgp.StringPrefixSize + len(za0005) + msgp.BytesPrefixSize + len(za0006) - } - } - s += 11 + msgp.ArrayHeaderSize - for za0007 := range z.SpanLinks { - if z.SpanLinks[za0007] == nil { - s += msgp.NilSize - } else { - s += z.SpanLinks[za0007].Msgsize() - } - } - s += 12 + msgp.ArrayHeaderSize - for za0008 := range z.SpanEvents { - if z.SpanEvents[za0008] == nil { - s += msgp.NilSize - } else { - s += z.SpanEvents[za0008].Msgsize() - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *SpanEvent) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 3 - // string "time_unix_nano" - o = append(o, 0x83, 0xae, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f) - o = msgp.AppendUint64(o, z.TimeUnixNano) - // string "name" - o = append(o, 0xa4, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Name) - // string "attributes" - o = append(o, 0xaa, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Attributes))) - for za0001, za0002 := range z.Attributes { - o = msgp.AppendString(o, za0001) - if za0002 == nil { - o = msgp.AppendNil(o) - } else { - o, err = za0002.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *SpanEvent) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "time_unix_nano": - z.TimeUnixNano, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TimeUnixNano") - return - } - case "name": - z.Name, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - case "attributes": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if z.Attributes == nil { - z.Attributes = make(map[string]*AttributeAnyValue, zb0002) - } else if len(z.Attributes) > 0 { - for key := range z.Attributes { - delete(z.Attributes, key) - } - } - for zb0002 > 0 { - var za0001 string - var za0002 *AttributeAnyValue - zb0002-- - za0001, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - za0002 = nil - } else { - if za0002 == nil { - za0002 = new(AttributeAnyValue) - } - bts, err = za0002.UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - } - z.Attributes[za0001] = za0002 - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *SpanEvent) Msgsize() (s int) { - s = 1 + 15 + msgp.Uint64Size + 5 + msgp.StringPrefixSize + len(z.Name) + 11 + msgp.MapHeaderSize - if z.Attributes != nil { - for za0001, za0002 := range z.Attributes { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) - if za0002 == nil { - s += msgp.NilSize - } else { - s += za0002.Msgsize() - } - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *SpanLink) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 6 bits */ - _ = zb0001Mask - if z.TraceIDHigh == 0 { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.Attributes == nil { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.Tracestate == "" { - zb0001Len-- - zb0001Mask |= 0x10 - } - if z.Flags == 0 { - zb0001Len-- - zb0001Mask |= 0x20 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "trace_id" - o = append(o, 0xa8, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64) - o = msgp.AppendUint64(o, z.TraceID) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "trace_id_high" - o = append(o, 0xad, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x68, 0x69, 0x67, 0x68) - o = msgp.AppendUint64(o, z.TraceIDHigh) - } - // string "span_id" - o = append(o, 0xa7, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64) - o = msgp.AppendUint64(o, z.SpanID) - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "attributes" - o = append(o, 0xaa, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Attributes))) - for za0001, za0002 := range z.Attributes { - o = msgp.AppendString(o, za0001) - o = msgp.AppendString(o, za0002) - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "tracestate" - o = append(o, 0xaa, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65) - o = msgp.AppendString(o, z.Tracestate) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "flags" - o = append(o, 0xa5, 0x66, 0x6c, 0x61, 0x67, 0x73) - o = msgp.AppendUint32(o, z.Flags) - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *SpanLink) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "trace_id": - z.TraceID, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - case "trace_id_high": - z.TraceIDHigh, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TraceIDHigh") - return - } - case "span_id": - z.SpanID, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - case "attributes": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if z.Attributes == nil { - z.Attributes = make(map[string]string, zb0002) - } else if len(z.Attributes) > 0 { - for key := range z.Attributes { - delete(z.Attributes, key) - } - } - for zb0002 > 0 { - var za0001 string - var za0002 string - zb0002-- - za0001, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - za0002, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - z.Attributes[za0001] = za0002 - } - case "tracestate": - z.Tracestate, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tracestate") - return - } - case "flags": - z.Flags, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Flags") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *SpanLink) Msgsize() (s int) { - s = 1 + 9 + msgp.Uint64Size + 14 + msgp.Uint64Size + 8 + msgp.Uint64Size + 11 + msgp.MapHeaderSize - if z.Attributes != nil { - for za0001, za0002 := range z.Attributes { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.StringPrefixSize + len(za0002) - } - } - s += 11 + msgp.StringPrefixSize + len(z.Tracestate) + 6 + msgp.Uint32Size - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_utils.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_utils.go deleted file mode 100644 index 3594e87051..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_utils.go +++ /dev/null @@ -1,55 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package trace - -// spanCopiedFields records the fields that are copied in ShallowCopy. -// This should match exactly the fields set in (*Span).ShallowCopy. -// This is used by tests to enforce the correctness of ShallowCopy. -var spanCopiedFields = map[string]struct{}{ - "Service": {}, - "Name": {}, - "Resource": {}, - "TraceID": {}, - "SpanID": {}, - "ParentID": {}, - "Start": {}, - "Duration": {}, - "Error": {}, - "Meta": {}, - "Metrics": {}, - "Type": {}, - "MetaStruct": {}, - "SpanLinks": {}, - "SpanEvents": {}, -} - -// ShallowCopy returns a shallow copy of the copy-able portion of a Span. These are the -// public fields which will have a Get* method for them. The completeness of this -// method is enforced by the init function above. Instead of using pkg/proto/utils.ProtoCopier, -// which incurs heavy reflection cost for every copy at runtime, we use reflection once at -// startup to ensure our method is complete. -func (s *Span) ShallowCopy() *Span { - if s == nil { - return &Span{} - } - return &Span{ - Service: s.Service, - Name: s.Name, - Resource: s.Resource, - TraceID: s.TraceID, - SpanID: s.SpanID, - ParentID: s.ParentID, - Start: s.Start, - Duration: s.Duration, - Error: s.Error, - Meta: s.Meta, - Metrics: s.Metrics, - Type: s.Type, - MetaStruct: s.MetaStruct, - SpanLinks: s.SpanLinks, - SpanEvents: s.SpanEvents, - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_vtproto.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_vtproto.pb.go deleted file mode 100644 index 027bcdfe39..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/span_vtproto.pb.go +++ /dev/null @@ -1,2399 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 -// source: datadog/trace/span.proto - -package trace - -import ( - binary "encoding/binary" - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - math "math" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *SpanLink) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpanLink) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *SpanLink) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Flags != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x30 - } - if len(m.Tracestate) > 0 { - i -= len(m.Tracestate) - copy(dAtA[i:], m.Tracestate) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tracestate))) - i-- - dAtA[i] = 0x2a - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if m.SpanID != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpanID)) - i-- - dAtA[i] = 0x18 - } - if m.TraceIDHigh != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TraceIDHigh)) - i-- - dAtA[i] = 0x10 - } - if m.TraceID != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TraceID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SpanEvent) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SpanEvent) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *SpanEvent) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Attributes) > 0 { - for k := range m.Attributes { - v := m.Attributes[k] - baseI := i - size, err := v.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.TimeUnixNano != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *AttributeAnyValue) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeAnyValue) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *AttributeAnyValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.ArrayValue != nil { - size, err := m.ArrayValue.MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - if m.DoubleValue != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x29 - } - if m.IntValue != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x20 - } - if m.BoolValue { - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.StringValue) > 0 { - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *AttributeArray) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeArray) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *AttributeArray) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Values[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AttributeArrayValue) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeArrayValue) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *AttributeArrayValue) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.DoubleValue != 0 { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x29 - } - if m.IntValue != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x20 - } - if m.BoolValue { - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.StringValue) > 0 { - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x12 - } - if m.Type != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Type)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Span) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *Span) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.SpanEvents) > 0 { - for iNdEx := len(m.SpanEvents) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.SpanEvents[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x7a - } - } - if len(m.SpanLinks) > 0 { - for iNdEx := len(m.SpanLinks) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.SpanLinks[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x72 - } - } - if len(m.MetaStruct) > 0 { - for k := range m.MetaStruct { - v := m.MetaStruct[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x6a - } - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x62 - } - if len(m.Metrics) > 0 { - for k := range m.Metrics { - v := m.Metrics[k] - baseI := i - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(v)))) - i-- - dAtA[i] = 0x11 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x5a - } - } - if len(m.Meta) > 0 { - for k := range m.Meta { - v := m.Meta[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x52 - } - } - if m.Error != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Error)) - i-- - dAtA[i] = 0x48 - } - if m.Duration != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Duration)) - i-- - dAtA[i] = 0x40 - } - if m.Start != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x38 - } - if m.ParentID != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ParentID)) - i-- - dAtA[i] = 0x30 - } - if m.SpanID != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.SpanID)) - i-- - dAtA[i] = 0x28 - } - if m.TraceID != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TraceID)) - i-- - dAtA[i] = 0x20 - } - if len(m.Resource) > 0 { - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SpanLink) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TraceID != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.TraceID)) - } - if m.TraceIDHigh != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.TraceIDHigh)) - } - if m.SpanID != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.SpanID)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.Tracestate) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Flags != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Flags)) - } - n += len(m.unknownFields) - return n -} - -func (m *SpanEvent) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Attributes) > 0 { - for k, v := range m.Attributes { - _ = k - _ = v - l = 0 - if v != nil { - l = v.SizeVT() - } - l += 1 + protohelpers.SizeOfVarint(uint64(l)) - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *AttributeAnyValue) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.BoolValue { - n += 2 - } - if m.IntValue != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.IntValue)) - } - if m.DoubleValue != 0 { - n += 9 - } - if m.ArrayValue != nil { - l = m.ArrayValue.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *AttributeArray) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *AttributeArrayValue) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Type != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Type)) - } - l = len(m.StringValue) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.BoolValue { - n += 2 - } - if m.IntValue != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.IntValue)) - } - if m.DoubleValue != 0 { - n += 9 - } - n += len(m.unknownFields) - return n -} - -func (m *Span) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Service) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Resource) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.TraceID != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.TraceID)) - } - if m.SpanID != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.SpanID)) - } - if m.ParentID != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.ParentID)) - } - if m.Start != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Start)) - } - if m.Duration != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Duration)) - } - if m.Error != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Error)) - } - if len(m.Meta) > 0 { - for k, v := range m.Meta { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - if len(m.Metrics) > 0 { - for k, v := range m.Metrics { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + 8 - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.Type) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.MetaStruct) > 0 { - for k, v := range m.MetaStruct { - _ = k - _ = v - l = 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + l - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - if len(m.SpanLinks) > 0 { - for _, e := range m.SpanLinks { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.SpanEvents) > 0 { - for _, e := range m.SpanEvents { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *SpanLink) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpanLink: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpanLink: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) - } - m.TraceID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TraceID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceIDHigh", wireType) - } - m.TraceIDHigh = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TraceIDHigh |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) - } - m.SpanID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpanID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tracestate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tracestate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SpanEvent) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SpanEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SpanEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Attributes == nil { - m.Attributes = make(map[string]*AttributeAnyValue) - } - var mapkey string - var mapvalue *AttributeAnyValue - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protohelpers.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &AttributeAnyValue{} - if err := mapvalue.UnmarshalVT(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Attributes[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttributeAnyValue) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeAnyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeAnyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= AttributeAnyValue_AttributeAnyValueType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - m.IntValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IntValue |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DoubleValue = float64(math.Float64frombits(v)) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ArrayValue == nil { - m.ArrayValue = &AttributeArray{} - } - if err := m.ArrayValue.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttributeArray) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, &AttributeArrayValue{}) - if err := m.Values[len(m.Values)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttributeArrayValue) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeArrayValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeArrayValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - m.Type = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Type |= AttributeArrayValue_AttributeArrayValueType(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BoolValue = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - m.IntValue = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IntValue |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.DoubleValue = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceID", wireType) - } - m.TraceID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TraceID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanID", wireType) - } - m.SpanID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SpanID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentID", wireType) - } - m.ParentID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ParentID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - m.Start = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Start |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Duration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) - } - m.Error = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Error |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Meta == nil { - m.Meta = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Meta[mapkey] = mapvalue - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Metrics == nil { - m.Metrics = make(map[string]float64) - } - var mapkey string - var mapvalue float64 - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapvaluetemp uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - mapvaluetemp = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - mapvalue = math.Float64frombits(mapvaluetemp) - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Metrics[mapkey] = mapvalue - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MetaStruct", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MetaStruct == nil { - m.MetaStruct = make(map[string][]byte) - } - var mapkey string - var mapvalue []byte - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return protohelpers.ErrInvalidLength - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.MetaStruct[mapkey] = mapvalue - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanLinks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanLinks = append(m.SpanLinks, &SpanLink{}) - if err := m.SpanLinks[len(m.SpanLinks)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanEvents", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanEvents = append(m.SpanEvents, &SpanEvent{}) - if err := m.SpanEvents[len(m.SpanEvents)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats.pb.go deleted file mode 100644 index 77441daf87..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats.pb.go +++ /dev/null @@ -1,761 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 -// source: datadog/trace/stats.proto - -package trace - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Trilean is an expanded boolean type that is meant to differentiate between being unset and false. -type Trilean int32 - -const ( - Trilean_NOT_SET Trilean = 0 - Trilean_TRUE Trilean = 1 - Trilean_FALSE Trilean = 2 -) - -// Enum value maps for Trilean. -var ( - Trilean_name = map[int32]string{ - 0: "NOT_SET", - 1: "TRUE", - 2: "FALSE", - } - Trilean_value = map[string]int32{ - "NOT_SET": 0, - "TRUE": 1, - "FALSE": 2, - } -) - -func (x Trilean) Enum() *Trilean { - p := new(Trilean) - *p = x - return p -} - -func (x Trilean) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Trilean) Descriptor() protoreflect.EnumDescriptor { - return file_datadog_trace_stats_proto_enumTypes[0].Descriptor() -} - -func (Trilean) Type() protoreflect.EnumType { - return &file_datadog_trace_stats_proto_enumTypes[0] -} - -func (x Trilean) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Trilean.Descriptor instead. -func (Trilean) EnumDescriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{0} -} - -type TraceRootFlag int32 - -const ( - TraceRootFlag_DEPRECATED_NOT_SET TraceRootFlag = 0 - TraceRootFlag_DEPRECATED_TRUE TraceRootFlag = 1 - TraceRootFlag_DEPRECATED_FALSE TraceRootFlag = 2 -) - -// Enum value maps for TraceRootFlag. -var ( - TraceRootFlag_name = map[int32]string{ - 0: "DEPRECATED_NOT_SET", - 1: "DEPRECATED_TRUE", - 2: "DEPRECATED_FALSE", - } - TraceRootFlag_value = map[string]int32{ - "DEPRECATED_NOT_SET": 0, - "DEPRECATED_TRUE": 1, - "DEPRECATED_FALSE": 2, - } -) - -func (x TraceRootFlag) Enum() *TraceRootFlag { - p := new(TraceRootFlag) - *p = x - return p -} - -func (x TraceRootFlag) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TraceRootFlag) Descriptor() protoreflect.EnumDescriptor { - return file_datadog_trace_stats_proto_enumTypes[1].Descriptor() -} - -func (TraceRootFlag) Type() protoreflect.EnumType { - return &file_datadog_trace_stats_proto_enumTypes[1] -} - -func (x TraceRootFlag) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TraceRootFlag.Descriptor instead. -func (TraceRootFlag) EnumDescriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{1} -} - -// StatsPayload is the payload used to send stats from the agent to the backend. -type StatsPayload struct { - state protoimpl.MessageState `protogen:"open.v1"` - AgentHostname string `protobuf:"bytes,1,opt,name=agentHostname,proto3" json:"agentHostname,omitempty"` - AgentEnv string `protobuf:"bytes,2,opt,name=agentEnv,proto3" json:"agentEnv,omitempty"` - // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" - Stats []*ClientStatsPayload `protobuf:"bytes,3,rep,name=stats,proto3" json:"stats,omitempty" msg:"Stats,omitempty"` - AgentVersion string `protobuf:"bytes,4,opt,name=agentVersion,proto3" json:"agentVersion,omitempty"` - ClientComputed bool `protobuf:"varint,5,opt,name=clientComputed,proto3" json:"clientComputed,omitempty"` - // splitPayload indicates if the payload is actually one of several payloads split out from a larger payload. - // This field can be used in the backend to signal if re-aggregation is necessary. - SplitPayload bool `protobuf:"varint,6,opt,name=splitPayload,proto3" json:"splitPayload,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StatsPayload) Reset() { - *x = StatsPayload{} - mi := &file_datadog_trace_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StatsPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StatsPayload) ProtoMessage() {} - -func (x *StatsPayload) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_stats_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StatsPayload.ProtoReflect.Descriptor instead. -func (*StatsPayload) Descriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{0} -} - -func (x *StatsPayload) GetAgentHostname() string { - if x != nil { - return x.AgentHostname - } - return "" -} - -func (x *StatsPayload) GetAgentEnv() string { - if x != nil { - return x.AgentEnv - } - return "" -} - -func (x *StatsPayload) GetStats() []*ClientStatsPayload { - if x != nil { - return x.Stats - } - return nil -} - -func (x *StatsPayload) GetAgentVersion() string { - if x != nil { - return x.AgentVersion - } - return "" -} - -func (x *StatsPayload) GetClientComputed() bool { - if x != nil { - return x.ClientComputed - } - return false -} - -func (x *StatsPayload) GetSplitPayload() bool { - if x != nil { - return x.SplitPayload - } - return false -} - -// ClientStatsPayload is the first layer of span stats aggregation. It is also -// the payload sent by tracers to the agent when stats in tracer are enabled. -type ClientStatsPayload struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Hostname is the tracer hostname. It's extracted from spans with "_dd.hostname" meta - // or set by tracer stats payload when hostname reporting is enabled. - Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"` - Env string `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"` // env tag set on spans or in the tracers, used for aggregation - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // version tag set on spans or in the tracers, used for aggregation - // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" - Stats []*ClientStatsBucket `protobuf:"bytes,4,rep,name=stats,proto3" json:"stats,omitempty" msg:"Stats,omitempty"` - Lang string `protobuf:"bytes,5,opt,name=lang,proto3" json:"lang,omitempty"` // informative field not used for aggregation - TracerVersion string `protobuf:"bytes,6,opt,name=tracerVersion,proto3" json:"tracerVersion,omitempty"` // informative field not used for aggregation - RuntimeID string `protobuf:"bytes,7,opt,name=runtimeID,proto3" json:"runtimeID,omitempty"` // used on stats payloads sent by the tracer to identify uniquely a message - Sequence uint64 `protobuf:"varint,8,opt,name=sequence,proto3" json:"sequence,omitempty"` // used on stats payloads sent by the tracer to identify uniquely a message - // AgentAggregation is set by the agent on tracer payloads modified by the agent aggregation layer - // characterizes counts only and distributions only payloads - AgentAggregation string `protobuf:"bytes,9,opt,name=agentAggregation,proto3" json:"agentAggregation,omitempty"` - // Service is the main service of the tracer. - // It is part of unified tagging: https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging - Service string `protobuf:"bytes,10,opt,name=service,proto3" json:"service,omitempty"` - // ContainerID specifies the origin container ID. It is meant to be populated by the client and may - // be enhanced by the agent to ensure it is unique. - ContainerID string `protobuf:"bytes,11,opt,name=containerID,proto3" json:"containerID,omitempty"` - // Tags specifies a set of tags obtained from the orchestrator (where applicable) using the specified containerID. - // This field should be left empty by the client. It only applies to some specific environment. - Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags,omitempty"` - // The git commit SHA is obtained from a trace, where it may be set through a tracer <-> source code integration. - GitCommitSha string `protobuf:"bytes,13,opt,name=git_commit_sha,json=gitCommitSha,proto3" json:"git_commit_sha,omitempty"` - // The image tag is obtained from a container's set of tags. - ImageTag string `protobuf:"bytes,14,opt,name=image_tag,json=imageTag,proto3" json:"image_tag,omitempty"` - // The process tags hash is used as a key for agent stats agregation. - ProcessTagsHash uint64 `protobuf:"varint,15,opt,name=process_tags_hash,json=processTagsHash,proto3" json:"process_tags_hash,omitempty"` - // The process tags contains a list of tags that are specific to the process. - ProcessTags string `protobuf:"bytes,16,opt,name=process_tags,json=processTags,proto3" json:"process_tags,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientStatsPayload) Reset() { - *x = ClientStatsPayload{} - mi := &file_datadog_trace_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientStatsPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientStatsPayload) ProtoMessage() {} - -func (x *ClientStatsPayload) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_stats_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientStatsPayload.ProtoReflect.Descriptor instead. -func (*ClientStatsPayload) Descriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{1} -} - -func (x *ClientStatsPayload) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *ClientStatsPayload) GetEnv() string { - if x != nil { - return x.Env - } - return "" -} - -func (x *ClientStatsPayload) GetVersion() string { - if x != nil { - return x.Version - } - return "" -} - -func (x *ClientStatsPayload) GetStats() []*ClientStatsBucket { - if x != nil { - return x.Stats - } - return nil -} - -func (x *ClientStatsPayload) GetLang() string { - if x != nil { - return x.Lang - } - return "" -} - -func (x *ClientStatsPayload) GetTracerVersion() string { - if x != nil { - return x.TracerVersion - } - return "" -} - -func (x *ClientStatsPayload) GetRuntimeID() string { - if x != nil { - return x.RuntimeID - } - return "" -} - -func (x *ClientStatsPayload) GetSequence() uint64 { - if x != nil { - return x.Sequence - } - return 0 -} - -func (x *ClientStatsPayload) GetAgentAggregation() string { - if x != nil { - return x.AgentAggregation - } - return "" -} - -func (x *ClientStatsPayload) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *ClientStatsPayload) GetContainerID() string { - if x != nil { - return x.ContainerID - } - return "" -} - -func (x *ClientStatsPayload) GetTags() []string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *ClientStatsPayload) GetGitCommitSha() string { - if x != nil { - return x.GitCommitSha - } - return "" -} - -func (x *ClientStatsPayload) GetImageTag() string { - if x != nil { - return x.ImageTag - } - return "" -} - -func (x *ClientStatsPayload) GetProcessTagsHash() uint64 { - if x != nil { - return x.ProcessTagsHash - } - return 0 -} - -func (x *ClientStatsPayload) GetProcessTags() string { - if x != nil { - return x.ProcessTags - } - return "" -} - -// ClientStatsBucket is a time bucket containing aggregated stats. -type ClientStatsBucket struct { - state protoimpl.MessageState `protogen:"open.v1"` - Start uint64 `protobuf:"varint,1,opt,name=start,proto3" json:"start,omitempty"` // bucket start in nanoseconds - Duration uint64 `protobuf:"varint,2,opt,name=duration,proto3" json:"duration,omitempty"` // bucket duration in nanoseconds - // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" - Stats []*ClientGroupedStats `protobuf:"bytes,3,rep,name=stats,proto3" json:"stats,omitempty" msg:"Stats,omitempty"` - // AgentTimeShift is the shift applied by the agent stats aggregator on bucket start - // when the received bucket start is outside of the agent aggregation window - AgentTimeShift int64 `protobuf:"varint,4,opt,name=agentTimeShift,proto3" json:"agentTimeShift,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientStatsBucket) Reset() { - *x = ClientStatsBucket{} - mi := &file_datadog_trace_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientStatsBucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientStatsBucket) ProtoMessage() {} - -func (x *ClientStatsBucket) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_stats_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientStatsBucket.ProtoReflect.Descriptor instead. -func (*ClientStatsBucket) Descriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{2} -} - -func (x *ClientStatsBucket) GetStart() uint64 { - if x != nil { - return x.Start - } - return 0 -} - -func (x *ClientStatsBucket) GetDuration() uint64 { - if x != nil { - return x.Duration - } - return 0 -} - -func (x *ClientStatsBucket) GetStats() []*ClientGroupedStats { - if x != nil { - return x.Stats - } - return nil -} - -func (x *ClientStatsBucket) GetAgentTimeShift() int64 { - if x != nil { - return x.AgentTimeShift - } - return 0 -} - -// ClientGroupedStats aggregate stats on spans grouped by service, name, resource, status_code, type -type ClientGroupedStats struct { - state protoimpl.MessageState `protogen:"open.v1"` - Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Resource string `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"` - HTTPStatusCode uint32 `protobuf:"varint,4,opt,name=HTTP_status_code,json=HTTPStatusCode,proto3" json:"HTTP_status_code,omitempty"` - Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` - DBType string `protobuf:"bytes,6,opt,name=DB_type,json=DBType,proto3" json:"DB_type,omitempty"` // db_type might be used in the future to help in the obfuscation step - Hits uint64 `protobuf:"varint,7,opt,name=hits,proto3" json:"hits,omitempty"` // count of all spans aggregated in the groupedstats - Errors uint64 `protobuf:"varint,8,opt,name=errors,proto3" json:"errors,omitempty"` // count of error spans aggregated in the groupedstats - Duration uint64 `protobuf:"varint,9,opt,name=duration,proto3" json:"duration,omitempty"` // total duration in nanoseconds of spans aggregated in the bucket - OkSummary []byte `protobuf:"bytes,10,opt,name=okSummary,proto3" json:"okSummary,omitempty"` // ddsketch summary of ok spans latencies encoded in protobuf - ErrorSummary []byte `protobuf:"bytes,11,opt,name=errorSummary,proto3" json:"errorSummary,omitempty"` // ddsketch summary of error spans latencies encoded in protobuf - Synthetics bool `protobuf:"varint,12,opt,name=synthetics,proto3" json:"synthetics,omitempty"` // set to true on spans generated by synthetics traffic - TopLevelHits uint64 `protobuf:"varint,13,opt,name=topLevelHits,proto3" json:"topLevelHits,omitempty"` // count of top level spans aggregated in the groupedstats - SpanKind string `protobuf:"bytes,15,opt,name=span_kind,json=spanKind,proto3" json:"span_kind,omitempty"` // value of the span.kind tag on the span - // peer_tags are supplementary tags that further describe a peer entity - // E.g., `grpc.target` to describe the name of a gRPC peer, or `db.hostname` to describe the name of peer DB - PeerTags []string `protobuf:"bytes,16,rep,name=peer_tags,json=peerTags,proto3" json:"peer_tags,omitempty"` - IsTraceRoot Trilean `protobuf:"varint,17,opt,name=is_trace_root,json=isTraceRoot,proto3,enum=datadog.trace.Trilean" json:"is_trace_root,omitempty"` // this field's value is equal to span's ParentID == 0. - GRPCStatusCode string `protobuf:"bytes,18,opt,name=GRPC_status_code,json=GRPCStatusCode,proto3" json:"GRPC_status_code,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *ClientGroupedStats) Reset() { - *x = ClientGroupedStats{} - mi := &file_datadog_trace_stats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *ClientGroupedStats) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientGroupedStats) ProtoMessage() {} - -func (x *ClientGroupedStats) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_stats_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientGroupedStats.ProtoReflect.Descriptor instead. -func (*ClientGroupedStats) Descriptor() ([]byte, []int) { - return file_datadog_trace_stats_proto_rawDescGZIP(), []int{3} -} - -func (x *ClientGroupedStats) GetService() string { - if x != nil { - return x.Service - } - return "" -} - -func (x *ClientGroupedStats) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ClientGroupedStats) GetResource() string { - if x != nil { - return x.Resource - } - return "" -} - -func (x *ClientGroupedStats) GetHTTPStatusCode() uint32 { - if x != nil { - return x.HTTPStatusCode - } - return 0 -} - -func (x *ClientGroupedStats) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *ClientGroupedStats) GetDBType() string { - if x != nil { - return x.DBType - } - return "" -} - -func (x *ClientGroupedStats) GetHits() uint64 { - if x != nil { - return x.Hits - } - return 0 -} - -func (x *ClientGroupedStats) GetErrors() uint64 { - if x != nil { - return x.Errors - } - return 0 -} - -func (x *ClientGroupedStats) GetDuration() uint64 { - if x != nil { - return x.Duration - } - return 0 -} - -func (x *ClientGroupedStats) GetOkSummary() []byte { - if x != nil { - return x.OkSummary - } - return nil -} - -func (x *ClientGroupedStats) GetErrorSummary() []byte { - if x != nil { - return x.ErrorSummary - } - return nil -} - -func (x *ClientGroupedStats) GetSynthetics() bool { - if x != nil { - return x.Synthetics - } - return false -} - -func (x *ClientGroupedStats) GetTopLevelHits() uint64 { - if x != nil { - return x.TopLevelHits - } - return 0 -} - -func (x *ClientGroupedStats) GetSpanKind() string { - if x != nil { - return x.SpanKind - } - return "" -} - -func (x *ClientGroupedStats) GetPeerTags() []string { - if x != nil { - return x.PeerTags - } - return nil -} - -func (x *ClientGroupedStats) GetIsTraceRoot() Trilean { - if x != nil { - return x.IsTraceRoot - } - return Trilean_NOT_SET -} - -func (x *ClientGroupedStats) GetGRPCStatusCode() string { - if x != nil { - return x.GRPCStatusCode - } - return "" -} - -var File_datadog_trace_stats_proto protoreflect.FileDescriptor - -const file_datadog_trace_stats_proto_rawDesc = "" + - "\n" + - "\x19datadog/trace/stats.proto\x12\rdatadog.trace\"\xf9\x01\n" + - "\fStatsPayload\x12$\n" + - "\ragentHostname\x18\x01 \x01(\tR\ragentHostname\x12\x1a\n" + - "\bagentEnv\x18\x02 \x01(\tR\bagentEnv\x127\n" + - "\x05stats\x18\x03 \x03(\v2!.datadog.trace.ClientStatsPayloadR\x05stats\x12\"\n" + - "\fagentVersion\x18\x04 \x01(\tR\fagentVersion\x12&\n" + - "\x0eclientComputed\x18\x05 \x01(\bR\x0eclientComputed\x12\"\n" + - "\fsplitPayload\x18\x06 \x01(\bR\fsplitPayload\"\x96\x04\n" + - "\x12ClientStatsPayload\x12\x1a\n" + - "\bhostname\x18\x01 \x01(\tR\bhostname\x12\x10\n" + - "\x03env\x18\x02 \x01(\tR\x03env\x12\x18\n" + - "\aversion\x18\x03 \x01(\tR\aversion\x126\n" + - "\x05stats\x18\x04 \x03(\v2 .datadog.trace.ClientStatsBucketR\x05stats\x12\x12\n" + - "\x04lang\x18\x05 \x01(\tR\x04lang\x12$\n" + - "\rtracerVersion\x18\x06 \x01(\tR\rtracerVersion\x12\x1c\n" + - "\truntimeID\x18\a \x01(\tR\truntimeID\x12\x1a\n" + - "\bsequence\x18\b \x01(\x04R\bsequence\x12*\n" + - "\x10agentAggregation\x18\t \x01(\tR\x10agentAggregation\x12\x18\n" + - "\aservice\x18\n" + - " \x01(\tR\aservice\x12 \n" + - "\vcontainerID\x18\v \x01(\tR\vcontainerID\x12\x12\n" + - "\x04tags\x18\f \x03(\tR\x04tags\x12$\n" + - "\x0egit_commit_sha\x18\r \x01(\tR\fgitCommitSha\x12\x1b\n" + - "\timage_tag\x18\x0e \x01(\tR\bimageTag\x12*\n" + - "\x11process_tags_hash\x18\x0f \x01(\x04R\x0fprocessTagsHash\x12!\n" + - "\fprocess_tags\x18\x10 \x01(\tR\vprocessTags\"\xa6\x01\n" + - "\x11ClientStatsBucket\x12\x14\n" + - "\x05start\x18\x01 \x01(\x04R\x05start\x12\x1a\n" + - "\bduration\x18\x02 \x01(\x04R\bduration\x127\n" + - "\x05stats\x18\x03 \x03(\v2!.datadog.trace.ClientGroupedStatsR\x05stats\x12&\n" + - "\x0eagentTimeShift\x18\x04 \x01(\x03R\x0eagentTimeShift\"\xa9\x04\n" + - "\x12ClientGroupedStats\x12\x18\n" + - "\aservice\x18\x01 \x01(\tR\aservice\x12\x12\n" + - "\x04name\x18\x02 \x01(\tR\x04name\x12\x1a\n" + - "\bresource\x18\x03 \x01(\tR\bresource\x12(\n" + - "\x10HTTP_status_code\x18\x04 \x01(\rR\x0eHTTPStatusCode\x12\x12\n" + - "\x04type\x18\x05 \x01(\tR\x04type\x12\x17\n" + - "\aDB_type\x18\x06 \x01(\tR\x06DBType\x12\x12\n" + - "\x04hits\x18\a \x01(\x04R\x04hits\x12\x16\n" + - "\x06errors\x18\b \x01(\x04R\x06errors\x12\x1a\n" + - "\bduration\x18\t \x01(\x04R\bduration\x12\x1c\n" + - "\tokSummary\x18\n" + - " \x01(\fR\tokSummary\x12\"\n" + - "\ferrorSummary\x18\v \x01(\fR\ferrorSummary\x12\x1e\n" + - "\n" + - "synthetics\x18\f \x01(\bR\n" + - "synthetics\x12\"\n" + - "\ftopLevelHits\x18\r \x01(\x04R\ftopLevelHits\x12\x1b\n" + - "\tspan_kind\x18\x0f \x01(\tR\bspanKind\x12\x1b\n" + - "\tpeer_tags\x18\x10 \x03(\tR\bpeerTags\x12:\n" + - "\ris_trace_root\x18\x11 \x01(\x0e2\x16.datadog.trace.TrileanR\visTraceRoot\x12(\n" + - "\x10GRPC_status_code\x18\x12 \x01(\tR\x0eGRPCStatusCodeJ\x04\b\x0e\x10\x0f*+\n" + - "\aTrilean\x12\v\n" + - "\aNOT_SET\x10\x00\x12\b\n" + - "\x04TRUE\x10\x01\x12\t\n" + - "\x05FALSE\x10\x02*R\n" + - "\rTraceRootFlag\x12\x16\n" + - "\x12DEPRECATED_NOT_SET\x10\x00\x12\x13\n" + - "\x0fDEPRECATED_TRUE\x10\x01\x12\x14\n" + - "\x10DEPRECATED_FALSE\x10\x02B\x16Z\x14pkg/proto/pbgo/traceb\x06proto3" - -var ( - file_datadog_trace_stats_proto_rawDescOnce sync.Once - file_datadog_trace_stats_proto_rawDescData []byte -) - -func file_datadog_trace_stats_proto_rawDescGZIP() []byte { - file_datadog_trace_stats_proto_rawDescOnce.Do(func() { - file_datadog_trace_stats_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_datadog_trace_stats_proto_rawDesc), len(file_datadog_trace_stats_proto_rawDesc))) - }) - return file_datadog_trace_stats_proto_rawDescData -} - -var file_datadog_trace_stats_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_datadog_trace_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_datadog_trace_stats_proto_goTypes = []any{ - (Trilean)(0), // 0: datadog.trace.Trilean - (TraceRootFlag)(0), // 1: datadog.trace.TraceRootFlag - (*StatsPayload)(nil), // 2: datadog.trace.StatsPayload - (*ClientStatsPayload)(nil), // 3: datadog.trace.ClientStatsPayload - (*ClientStatsBucket)(nil), // 4: datadog.trace.ClientStatsBucket - (*ClientGroupedStats)(nil), // 5: datadog.trace.ClientGroupedStats -} -var file_datadog_trace_stats_proto_depIdxs = []int32{ - 3, // 0: datadog.trace.StatsPayload.stats:type_name -> datadog.trace.ClientStatsPayload - 4, // 1: datadog.trace.ClientStatsPayload.stats:type_name -> datadog.trace.ClientStatsBucket - 5, // 2: datadog.trace.ClientStatsBucket.stats:type_name -> datadog.trace.ClientGroupedStats - 0, // 3: datadog.trace.ClientGroupedStats.is_trace_root:type_name -> datadog.trace.Trilean - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_datadog_trace_stats_proto_init() } -func file_datadog_trace_stats_proto_init() { - if File_datadog_trace_stats_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_datadog_trace_stats_proto_rawDesc), len(file_datadog_trace_stats_proto_rawDesc)), - NumEnums: 2, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_datadog_trace_stats_proto_goTypes, - DependencyIndexes: file_datadog_trace_stats_proto_depIdxs, - EnumInfos: file_datadog_trace_stats_proto_enumTypes, - MessageInfos: file_datadog_trace_stats_proto_msgTypes, - }.Build() - File_datadog_trace_stats_proto = out.File - file_datadog_trace_stats_proto_goTypes = nil - file_datadog_trace_stats_proto_depIdxs = nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_gen.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_gen.go deleted file mode 100644 index 1102c84ce0..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_gen.go +++ /dev/null @@ -1,1931 +0,0 @@ -package trace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *ClientGroupedStats) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Service": - z.Service, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "Name": - z.Name, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - case "Resource": - z.Resource, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Resource") - return - } - case "HTTPStatusCode": - z.HTTPStatusCode, err = dc.ReadUint32() - if err != nil { - err = msgp.WrapError(err, "HTTPStatusCode") - return - } - case "Type": - z.Type, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "DBType": - z.DBType, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "DBType") - return - } - case "Hits": - z.Hits, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Hits") - return - } - case "Errors": - z.Errors, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Errors") - return - } - case "Duration": - z.Duration, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "OkSummary": - z.OkSummary, err = dc.ReadBytes(z.OkSummary) - if err != nil { - err = msgp.WrapError(err, "OkSummary") - return - } - case "ErrorSummary": - z.ErrorSummary, err = dc.ReadBytes(z.ErrorSummary) - if err != nil { - err = msgp.WrapError(err, "ErrorSummary") - return - } - case "Synthetics": - z.Synthetics, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "Synthetics") - return - } - case "TopLevelHits": - z.TopLevelHits, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "TopLevelHits") - return - } - case "SpanKind": - z.SpanKind, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "SpanKind") - return - } - case "PeerTags": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "PeerTags") - return - } - if cap(z.PeerTags) >= int(zb0002) { - z.PeerTags = (z.PeerTags)[:zb0002] - } else { - z.PeerTags = make([]string, zb0002) - } - for za0001 := range z.PeerTags { - z.PeerTags[za0001], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "PeerTags", za0001) - return - } - } - case "IsTraceRoot": - { - var zb0003 int32 - zb0003, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "IsTraceRoot") - return - } - z.IsTraceRoot = Trilean(zb0003) - } - case "GRPCStatusCode": - z.GRPCStatusCode, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "GRPCStatusCode") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *ClientGroupedStats) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 17 - // write "Service" - err = en.Append(0xde, 0x0, 0x11, 0xa7, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Service) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - // write "Name" - err = en.Append(0xa4, 0x4e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Name) - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - // write "Resource" - err = en.Append(0xa8, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Resource) - if err != nil { - err = msgp.WrapError(err, "Resource") - return - } - // write "HTTPStatusCode" - err = en.Append(0xae, 0x48, 0x54, 0x54, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65) - if err != nil { - return - } - err = en.WriteUint32(z.HTTPStatusCode) - if err != nil { - err = msgp.WrapError(err, "HTTPStatusCode") - return - } - // write "Type" - err = en.Append(0xa4, 0x54, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Type) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - // write "DBType" - err = en.Append(0xa6, 0x44, 0x42, 0x54, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.DBType) - if err != nil { - err = msgp.WrapError(err, "DBType") - return - } - // write "Hits" - err = en.Append(0xa4, 0x48, 0x69, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.Hits) - if err != nil { - err = msgp.WrapError(err, "Hits") - return - } - // write "Errors" - err = en.Append(0xa6, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.Errors) - if err != nil { - err = msgp.WrapError(err, "Errors") - return - } - // write "Duration" - err = en.Append(0xa8, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteUint64(z.Duration) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - // write "OkSummary" - err = en.Append(0xa9, 0x4f, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - if err != nil { - return - } - err = en.WriteBytes(z.OkSummary) - if err != nil { - err = msgp.WrapError(err, "OkSummary") - return - } - // write "ErrorSummary" - err = en.Append(0xac, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - if err != nil { - return - } - err = en.WriteBytes(z.ErrorSummary) - if err != nil { - err = msgp.WrapError(err, "ErrorSummary") - return - } - // write "Synthetics" - err = en.Append(0xaa, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x73) - if err != nil { - return - } - err = en.WriteBool(z.Synthetics) - if err != nil { - err = msgp.WrapError(err, "Synthetics") - return - } - // write "TopLevelHits" - err = en.Append(0xac, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x48, 0x69, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteUint64(z.TopLevelHits) - if err != nil { - err = msgp.WrapError(err, "TopLevelHits") - return - } - // write "SpanKind" - err = en.Append(0xa8, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64) - if err != nil { - return - } - err = en.WriteString(z.SpanKind) - if err != nil { - err = msgp.WrapError(err, "SpanKind") - return - } - // write "PeerTags" - err = en.Append(0xa8, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.PeerTags))) - if err != nil { - err = msgp.WrapError(err, "PeerTags") - return - } - for za0001 := range z.PeerTags { - err = en.WriteString(z.PeerTags[za0001]) - if err != nil { - err = msgp.WrapError(err, "PeerTags", za0001) - return - } - } - // write "IsTraceRoot" - err = en.Append(0xab, 0x49, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x74) - if err != nil { - return - } - err = en.WriteInt32(int32(z.IsTraceRoot)) - if err != nil { - err = msgp.WrapError(err, "IsTraceRoot") - return - } - // write "GRPCStatusCode" - err = en.Append(0xae, 0x47, 0x52, 0x50, 0x43, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65) - if err != nil { - return - } - err = en.WriteString(z.GRPCStatusCode) - if err != nil { - err = msgp.WrapError(err, "GRPCStatusCode") - return - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *ClientGroupedStats) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 17 - // string "Service" - o = append(o, 0xde, 0x0, 0x11, 0xa7, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - o = msgp.AppendString(o, z.Service) - // string "Name" - o = append(o, 0xa4, 0x4e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Name) - // string "Resource" - o = append(o, 0xa8, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65) - o = msgp.AppendString(o, z.Resource) - // string "HTTPStatusCode" - o = append(o, 0xae, 0x48, 0x54, 0x54, 0x50, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65) - o = msgp.AppendUint32(o, z.HTTPStatusCode) - // string "Type" - o = append(o, 0xa4, 0x54, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, z.Type) - // string "DBType" - o = append(o, 0xa6, 0x44, 0x42, 0x54, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, z.DBType) - // string "Hits" - o = append(o, 0xa4, 0x48, 0x69, 0x74, 0x73) - o = msgp.AppendUint64(o, z.Hits) - // string "Errors" - o = append(o, 0xa6, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73) - o = msgp.AppendUint64(o, z.Errors) - // string "Duration" - o = append(o, 0xa8, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendUint64(o, z.Duration) - // string "OkSummary" - o = append(o, 0xa9, 0x4f, 0x6b, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - o = msgp.AppendBytes(o, z.OkSummary) - // string "ErrorSummary" - o = append(o, 0xac, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79) - o = msgp.AppendBytes(o, z.ErrorSummary) - // string "Synthetics" - o = append(o, 0xaa, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x73) - o = msgp.AppendBool(o, z.Synthetics) - // string "TopLevelHits" - o = append(o, 0xac, 0x54, 0x6f, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x48, 0x69, 0x74, 0x73) - o = msgp.AppendUint64(o, z.TopLevelHits) - // string "SpanKind" - o = append(o, 0xa8, 0x53, 0x70, 0x61, 0x6e, 0x4b, 0x69, 0x6e, 0x64) - o = msgp.AppendString(o, z.SpanKind) - // string "PeerTags" - o = append(o, 0xa8, 0x50, 0x65, 0x65, 0x72, 0x54, 0x61, 0x67, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.PeerTags))) - for za0001 := range z.PeerTags { - o = msgp.AppendString(o, z.PeerTags[za0001]) - } - // string "IsTraceRoot" - o = append(o, 0xab, 0x49, 0x73, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6f, 0x74) - o = msgp.AppendInt32(o, int32(z.IsTraceRoot)) - // string "GRPCStatusCode" - o = append(o, 0xae, 0x47, 0x52, 0x50, 0x43, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x43, 0x6f, 0x64, 0x65) - o = msgp.AppendString(o, z.GRPCStatusCode) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *ClientGroupedStats) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Service": - z.Service, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "Name": - z.Name, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - case "Resource": - z.Resource, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Resource") - return - } - case "HTTPStatusCode": - z.HTTPStatusCode, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "HTTPStatusCode") - return - } - case "Type": - z.Type, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "DBType": - z.DBType, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "DBType") - return - } - case "Hits": - z.Hits, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Hits") - return - } - case "Errors": - z.Errors, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Errors") - return - } - case "Duration": - z.Duration, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "OkSummary": - z.OkSummary, bts, err = msgp.ReadBytesBytes(bts, z.OkSummary) - if err != nil { - err = msgp.WrapError(err, "OkSummary") - return - } - case "ErrorSummary": - z.ErrorSummary, bts, err = msgp.ReadBytesBytes(bts, z.ErrorSummary) - if err != nil { - err = msgp.WrapError(err, "ErrorSummary") - return - } - case "Synthetics": - z.Synthetics, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Synthetics") - return - } - case "TopLevelHits": - z.TopLevelHits, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "TopLevelHits") - return - } - case "SpanKind": - z.SpanKind, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "SpanKind") - return - } - case "PeerTags": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "PeerTags") - return - } - if cap(z.PeerTags) >= int(zb0002) { - z.PeerTags = (z.PeerTags)[:zb0002] - } else { - z.PeerTags = make([]string, zb0002) - } - for za0001 := range z.PeerTags { - z.PeerTags[za0001], bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "PeerTags", za0001) - return - } - } - case "IsTraceRoot": - { - var zb0003 int32 - zb0003, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "IsTraceRoot") - return - } - z.IsTraceRoot = Trilean(zb0003) - } - case "GRPCStatusCode": - z.GRPCStatusCode, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "GRPCStatusCode") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *ClientGroupedStats) Msgsize() (s int) { - s = 3 + 8 + msgp.StringPrefixSize + len(z.Service) + 5 + msgp.StringPrefixSize + len(z.Name) + 9 + msgp.StringPrefixSize + len(z.Resource) + 15 + msgp.Uint32Size + 5 + msgp.StringPrefixSize + len(z.Type) + 7 + msgp.StringPrefixSize + len(z.DBType) + 5 + msgp.Uint64Size + 7 + msgp.Uint64Size + 9 + msgp.Uint64Size + 10 + msgp.BytesPrefixSize + len(z.OkSummary) + 13 + msgp.BytesPrefixSize + len(z.ErrorSummary) + 11 + msgp.BoolSize + 13 + msgp.Uint64Size + 9 + msgp.StringPrefixSize + len(z.SpanKind) + 9 + msgp.ArrayHeaderSize - for za0001 := range z.PeerTags { - s += msgp.StringPrefixSize + len(z.PeerTags[za0001]) - } - s += 12 + msgp.Int32Size + 15 + msgp.StringPrefixSize + len(z.GRPCStatusCode) - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ClientStatsBucket) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Start": - z.Start, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - case "Duration": - z.Duration, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "Stats": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientGroupedStats, zb0002) - } - for za0001 := range z.Stats { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientGroupedStats) - } - err = z.Stats[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "AgentTimeShift": - z.AgentTimeShift, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "AgentTimeShift") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *ClientStatsBucket) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(4) - var zb0001Mask uint8 /* 4 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x4 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "Start" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x72, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Start) - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - // write "Duration" - err = en.Append(0xa8, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteUint64(z.Duration) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "Stats" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Stats))) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.Stats[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // write "AgentTimeShift" - err = en.Append(0xae, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x68, 0x69, 0x66, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.AgentTimeShift) - if err != nil { - err = msgp.WrapError(err, "AgentTimeShift") - return - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *ClientStatsBucket) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(4) - var zb0001Mask uint8 /* 4 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x4 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "Start" - o = append(o, 0xa5, 0x53, 0x74, 0x61, 0x72, 0x74) - o = msgp.AppendUint64(o, z.Start) - // string "Duration" - o = append(o, 0xa8, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendUint64(o, z.Duration) - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "Stats" - o = append(o, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Stats))) - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Stats[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // string "AgentTimeShift" - o = append(o, 0xae, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x53, 0x68, 0x69, 0x66, 0x74) - o = msgp.AppendInt64(o, z.AgentTimeShift) - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *ClientStatsBucket) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Start": - z.Start, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - case "Duration": - z.Duration, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "Stats": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientGroupedStats, zb0002) - } - for za0001 := range z.Stats { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientGroupedStats) - } - bts, err = z.Stats[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "AgentTimeShift": - z.AgentTimeShift, bts, err = msgp.ReadInt64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentTimeShift") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *ClientStatsBucket) Msgsize() (s int) { - s = 1 + 6 + msgp.Uint64Size + 9 + msgp.Uint64Size + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Stats[za0001].Msgsize() - } - } - s += 15 + msgp.Int64Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ClientStatsPayload) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Hostname": - z.Hostname, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - case "Env": - z.Env, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - case "Version": - z.Version, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "Stats": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientStatsBucket, zb0002) - } - for za0001 := range z.Stats { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientStatsBucket) - } - err = z.Stats[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "Lang": - z.Lang, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Lang") - return - } - case "TracerVersion": - z.TracerVersion, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - case "RuntimeID": - z.RuntimeID, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - case "Sequence": - z.Sequence, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Sequence") - return - } - case "AgentAggregation": - z.AgentAggregation, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "AgentAggregation") - return - } - case "Service": - z.Service, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "ContainerID": - z.ContainerID, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ContainerID") - return - } - case "Tags": - var zb0003 uint32 - zb0003, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if cap(z.Tags) >= int(zb0003) { - z.Tags = (z.Tags)[:zb0003] - } else { - z.Tags = make([]string, zb0003) - } - for za0002 := range z.Tags { - z.Tags[za0002], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - } - case "GitCommitSha": - z.GitCommitSha, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "GitCommitSha") - return - } - case "ImageTag": - z.ImageTag, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ImageTag") - return - } - case "ProcessTagsHash": - z.ProcessTagsHash, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "ProcessTagsHash") - return - } - case "ProcessTags": - z.ProcessTags, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ProcessTags") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *ClientStatsPayload) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(16) - var zb0001Mask uint16 /* 16 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x8 - } - // variable map header, size zb0001Len - err = en.WriteMapHeader(zb0001Len) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "Hostname" - err = en.Append(0xa8, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Hostname) - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - // write "Env" - err = en.Append(0xa3, 0x45, 0x6e, 0x76) - if err != nil { - return - } - err = en.WriteString(z.Env) - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - // write "Version" - err = en.Append(0xa7, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "Stats" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Stats))) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.Stats[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // write "Lang" - err = en.Append(0xa4, 0x4c, 0x61, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteString(z.Lang) - if err != nil { - err = msgp.WrapError(err, "Lang") - return - } - // write "TracerVersion" - err = en.Append(0xad, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.TracerVersion) - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - // write "RuntimeID" - err = en.Append(0xa9, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.RuntimeID) - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - // write "Sequence" - err = en.Append(0xa8, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteUint64(z.Sequence) - if err != nil { - err = msgp.WrapError(err, "Sequence") - return - } - // write "AgentAggregation" - err = en.Append(0xb0, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.AgentAggregation) - if err != nil { - err = msgp.WrapError(err, "AgentAggregation") - return - } - // write "Service" - err = en.Append(0xa7, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Service) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - // write "ContainerID" - err = en.Append(0xab, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44) - if err != nil { - return - } - err = en.WriteString(z.ContainerID) - if err != nil { - err = msgp.WrapError(err, "ContainerID") - return - } - // write "Tags" - err = en.Append(0xa4, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Tags))) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - for za0002 := range z.Tags { - err = en.WriteString(z.Tags[za0002]) - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - } - // write "GitCommitSha" - err = en.Append(0xac, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61) - if err != nil { - return - } - err = en.WriteString(z.GitCommitSha) - if err != nil { - err = msgp.WrapError(err, "GitCommitSha") - return - } - // write "ImageTag" - err = en.Append(0xa8, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x61, 0x67) - if err != nil { - return - } - err = en.WriteString(z.ImageTag) - if err != nil { - err = msgp.WrapError(err, "ImageTag") - return - } - // write "ProcessTagsHash" - err = en.Append(0xaf, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x73, 0x48, 0x61, 0x73, 0x68) - if err != nil { - return - } - err = en.WriteUint64(z.ProcessTagsHash) - if err != nil { - err = msgp.WrapError(err, "ProcessTagsHash") - return - } - // write "ProcessTags" - err = en.Append(0xab, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteString(z.ProcessTags) - if err != nil { - err = msgp.WrapError(err, "ProcessTags") - return - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *ClientStatsPayload) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(16) - var zb0001Mask uint16 /* 16 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x8 - } - // variable map header, size zb0001Len - o = msgp.AppendMapHeader(o, zb0001Len) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "Hostname" - o = append(o, 0xa8, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Hostname) - // string "Env" - o = append(o, 0xa3, 0x45, 0x6e, 0x76) - o = msgp.AppendString(o, z.Env) - // string "Version" - o = append(o, 0xa7, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Version) - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "Stats" - o = append(o, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Stats))) - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Stats[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // string "Lang" - o = append(o, 0xa4, 0x4c, 0x61, 0x6e, 0x67) - o = msgp.AppendString(o, z.Lang) - // string "TracerVersion" - o = append(o, 0xad, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.TracerVersion) - // string "RuntimeID" - o = append(o, 0xa9, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x49, 0x44) - o = msgp.AppendString(o, z.RuntimeID) - // string "Sequence" - o = append(o, 0xa8, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65) - o = msgp.AppendUint64(o, z.Sequence) - // string "AgentAggregation" - o = append(o, 0xb0, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.AgentAggregation) - // string "Service" - o = append(o, 0xa7, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - o = msgp.AppendString(o, z.Service) - // string "ContainerID" - o = append(o, 0xab, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x44) - o = msgp.AppendString(o, z.ContainerID) - // string "Tags" - o = append(o, 0xa4, 0x54, 0x61, 0x67, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Tags))) - for za0002 := range z.Tags { - o = msgp.AppendString(o, z.Tags[za0002]) - } - // string "GitCommitSha" - o = append(o, 0xac, 0x47, 0x69, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x68, 0x61) - o = msgp.AppendString(o, z.GitCommitSha) - // string "ImageTag" - o = append(o, 0xa8, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x54, 0x61, 0x67) - o = msgp.AppendString(o, z.ImageTag) - // string "ProcessTagsHash" - o = append(o, 0xaf, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x73, 0x48, 0x61, 0x73, 0x68) - o = msgp.AppendUint64(o, z.ProcessTagsHash) - // string "ProcessTags" - o = append(o, 0xab, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x73) - o = msgp.AppendString(o, z.ProcessTags) - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *ClientStatsPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Hostname": - z.Hostname, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - case "Env": - z.Env, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - case "Version": - z.Version, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "Stats": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientStatsBucket, zb0002) - } - for za0001 := range z.Stats { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientStatsBucket) - } - bts, err = z.Stats[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "Lang": - z.Lang, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Lang") - return - } - case "TracerVersion": - z.TracerVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - case "RuntimeID": - z.RuntimeID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - case "Sequence": - z.Sequence, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Sequence") - return - } - case "AgentAggregation": - z.AgentAggregation, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentAggregation") - return - } - case "Service": - z.Service, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "ContainerID": - z.ContainerID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ContainerID") - return - } - case "Tags": - var zb0003 uint32 - zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if cap(z.Tags) >= int(zb0003) { - z.Tags = (z.Tags)[:zb0003] - } else { - z.Tags = make([]string, zb0003) - } - for za0002 := range z.Tags { - z.Tags[za0002], bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - } - case "GitCommitSha": - z.GitCommitSha, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "GitCommitSha") - return - } - case "ImageTag": - z.ImageTag, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ImageTag") - return - } - case "ProcessTagsHash": - z.ProcessTagsHash, bts, err = msgp.ReadUint64Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "ProcessTagsHash") - return - } - case "ProcessTags": - z.ProcessTags, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ProcessTags") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *ClientStatsPayload) Msgsize() (s int) { - s = 3 + 9 + msgp.StringPrefixSize + len(z.Hostname) + 4 + msgp.StringPrefixSize + len(z.Env) + 8 + msgp.StringPrefixSize + len(z.Version) + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Stats[za0001].Msgsize() - } - } - s += 5 + msgp.StringPrefixSize + len(z.Lang) + 14 + msgp.StringPrefixSize + len(z.TracerVersion) + 10 + msgp.StringPrefixSize + len(z.RuntimeID) + 9 + msgp.Uint64Size + 17 + msgp.StringPrefixSize + len(z.AgentAggregation) + 8 + msgp.StringPrefixSize + len(z.Service) + 12 + msgp.StringPrefixSize + len(z.ContainerID) + 5 + msgp.ArrayHeaderSize - for za0002 := range z.Tags { - s += msgp.StringPrefixSize + len(z.Tags[za0002]) - } - s += 13 + msgp.StringPrefixSize + len(z.GitCommitSha) + 9 + msgp.StringPrefixSize + len(z.ImageTag) + 16 + msgp.Uint64Size + 12 + msgp.StringPrefixSize + len(z.ProcessTags) - return -} - -// DecodeMsg implements msgp.Decodable -func (z *StatsPayload) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "AgentHostname": - z.AgentHostname, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "AgentHostname") - return - } - case "AgentEnv": - z.AgentEnv, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "AgentEnv") - return - } - case "Stats": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientStatsPayload, zb0002) - } - for za0001 := range z.Stats { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientStatsPayload) - } - err = z.Stats[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "AgentVersion": - z.AgentVersion, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "AgentVersion") - return - } - case "ClientComputed": - z.ClientComputed, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "ClientComputed") - return - } - case "SplitPayload": - z.SplitPayload, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "SplitPayload") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *StatsPayload) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 6 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x4 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "AgentHostname" - err = en.Append(0xad, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.AgentHostname) - if err != nil { - err = msgp.WrapError(err, "AgentHostname") - return - } - // write "AgentEnv" - err = en.Append(0xa8, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76) - if err != nil { - return - } - err = en.WriteString(z.AgentEnv) - if err != nil { - err = msgp.WrapError(err, "AgentEnv") - return - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "Stats" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Stats))) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.Stats[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // write "AgentVersion" - err = en.Append(0xac, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.AgentVersion) - if err != nil { - err = msgp.WrapError(err, "AgentVersion") - return - } - // write "ClientComputed" - err = en.Append(0xae, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64) - if err != nil { - return - } - err = en.WriteBool(z.ClientComputed) - if err != nil { - err = msgp.WrapError(err, "ClientComputed") - return - } - // write "SplitPayload" - err = en.Append(0xac, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64) - if err != nil { - return - } - err = en.WriteBool(z.SplitPayload) - if err != nil { - err = msgp.WrapError(err, "SplitPayload") - return - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *StatsPayload) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 6 bits */ - _ = zb0001Mask - if z.Stats == nil { - zb0001Len-- - zb0001Mask |= 0x4 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "AgentHostname" - o = append(o, 0xad, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.AgentHostname) - // string "AgentEnv" - o = append(o, 0xa8, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x45, 0x6e, 0x76) - o = msgp.AppendString(o, z.AgentEnv) - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "Stats" - o = append(o, 0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Stats))) - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Stats[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - } - // string "AgentVersion" - o = append(o, 0xac, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.AgentVersion) - // string "ClientComputed" - o = append(o, 0xae, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64) - o = msgp.AppendBool(o, z.ClientComputed) - // string "SplitPayload" - o = append(o, 0xac, 0x53, 0x70, 0x6c, 0x69, 0x74, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64) - o = msgp.AppendBool(o, z.SplitPayload) - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *StatsPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "AgentHostname": - z.AgentHostname, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentHostname") - return - } - case "AgentEnv": - z.AgentEnv, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentEnv") - return - } - case "Stats": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]*ClientStatsPayload, zb0002) - } - for za0001 := range z.Stats { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Stats[za0001] = nil - } else { - if z.Stats[za0001] == nil { - z.Stats[za0001] = new(ClientStatsPayload) - } - bts, err = z.Stats[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - } - case "AgentVersion": - z.AgentVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AgentVersion") - return - } - case "ClientComputed": - z.ClientComputed, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ClientComputed") - return - } - case "SplitPayload": - z.SplitPayload, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "SplitPayload") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *StatsPayload) Msgsize() (s int) { - s = 1 + 14 + msgp.StringPrefixSize + len(z.AgentHostname) + 9 + msgp.StringPrefixSize + len(z.AgentEnv) + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Stats { - if z.Stats[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Stats[za0001].Msgsize() - } - } - s += 13 + msgp.StringPrefixSize + len(z.AgentVersion) + 15 + msgp.BoolSize + 13 + msgp.BoolSize - return -} - -// DecodeMsg implements msgp.Decodable -func (z *TraceRootFlag) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 int32 - zb0001, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = TraceRootFlag(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z TraceRootFlag) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteInt32(int32(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z TraceRootFlag) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendInt32(o, int32(z)) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *TraceRootFlag) UnmarshalMsg(bts []byte) (o []byte, err error) { - { - var zb0001 int32 - zb0001, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = TraceRootFlag(zb0001) - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z TraceRootFlag) Msgsize() (s int) { - s = msgp.Int32Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *Trilean) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 int32 - zb0001, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = Trilean(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z Trilean) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteInt32(int32(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z Trilean) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendInt32(o, int32(z)) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Trilean) UnmarshalMsg(bts []byte) (o []byte, err error) { - { - var zb0001 int32 - zb0001, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = Trilean(zb0001) - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z Trilean) Msgsize() (s int) { - s = msgp.Int32Size - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_vtproto.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_vtproto.pb.go deleted file mode 100644 index 0e6fa0881c..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/stats_vtproto.pb.go +++ /dev/null @@ -1,2086 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 -// source: datadog/trace/stats.proto - -package trace - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *StatsPayload) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StatsPayload) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *StatsPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.SplitPayload { - i-- - if m.SplitPayload { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if m.ClientComputed { - i-- - if m.ClientComputed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.AgentVersion) > 0 { - i -= len(m.AgentVersion) - copy(dAtA[i:], m.AgentVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AgentVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.Stats) > 0 { - for iNdEx := len(m.Stats) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Stats[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.AgentEnv) > 0 { - i -= len(m.AgentEnv) - copy(dAtA[i:], m.AgentEnv) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AgentEnv))) - i-- - dAtA[i] = 0x12 - } - if len(m.AgentHostname) > 0 { - i -= len(m.AgentHostname) - copy(dAtA[i:], m.AgentHostname) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AgentHostname))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClientStatsPayload) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClientStatsPayload) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ClientStatsPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.ProcessTags) > 0 { - i -= len(m.ProcessTags) - copy(dAtA[i:], m.ProcessTags) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ProcessTags))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - if m.ProcessTagsHash != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.ProcessTagsHash)) - i-- - dAtA[i] = 0x78 - } - if len(m.ImageTag) > 0 { - i -= len(m.ImageTag) - copy(dAtA[i:], m.ImageTag) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ImageTag))) - i-- - dAtA[i] = 0x72 - } - if len(m.GitCommitSha) > 0 { - i -= len(m.GitCommitSha) - copy(dAtA[i:], m.GitCommitSha) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GitCommitSha))) - i-- - dAtA[i] = 0x6a - } - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Tags[iNdEx]) - copy(dAtA[i:], m.Tags[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Tags[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(m.ContainerID) > 0 { - i -= len(m.ContainerID) - copy(dAtA[i:], m.ContainerID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContainerID))) - i-- - dAtA[i] = 0x5a - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0x52 - } - if len(m.AgentAggregation) > 0 { - i -= len(m.AgentAggregation) - copy(dAtA[i:], m.AgentAggregation) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AgentAggregation))) - i-- - dAtA[i] = 0x4a - } - if m.Sequence != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Sequence)) - i-- - dAtA[i] = 0x40 - } - if len(m.RuntimeID) > 0 { - i -= len(m.RuntimeID) - copy(dAtA[i:], m.RuntimeID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RuntimeID))) - i-- - dAtA[i] = 0x3a - } - if len(m.TracerVersion) > 0 { - i -= len(m.TracerVersion) - copy(dAtA[i:], m.TracerVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TracerVersion))) - i-- - dAtA[i] = 0x32 - } - if len(m.Lang) > 0 { - i -= len(m.Lang) - copy(dAtA[i:], m.Lang) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Lang))) - i-- - dAtA[i] = 0x2a - } - if len(m.Stats) > 0 { - for iNdEx := len(m.Stats) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Stats[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if len(m.Env) > 0 { - i -= len(m.Env) - copy(dAtA[i:], m.Env) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Env))) - i-- - dAtA[i] = 0x12 - } - if len(m.Hostname) > 0 { - i -= len(m.Hostname) - copy(dAtA[i:], m.Hostname) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClientStatsBucket) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClientStatsBucket) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ClientStatsBucket) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.AgentTimeShift != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.AgentTimeShift)) - i-- - dAtA[i] = 0x20 - } - if len(m.Stats) > 0 { - for iNdEx := len(m.Stats) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Stats[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.Duration != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Duration)) - i-- - dAtA[i] = 0x10 - } - if m.Start != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Start)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ClientGroupedStats) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClientGroupedStats) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *ClientGroupedStats) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.GRPCStatusCode) > 0 { - i -= len(m.GRPCStatusCode) - copy(dAtA[i:], m.GRPCStatusCode) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.GRPCStatusCode))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - if m.IsTraceRoot != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.IsTraceRoot)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if len(m.PeerTags) > 0 { - for iNdEx := len(m.PeerTags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PeerTags[iNdEx]) - copy(dAtA[i:], m.PeerTags[iNdEx]) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.PeerTags[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - } - } - if len(m.SpanKind) > 0 { - i -= len(m.SpanKind) - copy(dAtA[i:], m.SpanKind) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.SpanKind))) - i-- - dAtA[i] = 0x7a - } - if m.TopLevelHits != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.TopLevelHits)) - i-- - dAtA[i] = 0x68 - } - if m.Synthetics { - i-- - if m.Synthetics { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if len(m.ErrorSummary) > 0 { - i -= len(m.ErrorSummary) - copy(dAtA[i:], m.ErrorSummary) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ErrorSummary))) - i-- - dAtA[i] = 0x5a - } - if len(m.OkSummary) > 0 { - i -= len(m.OkSummary) - copy(dAtA[i:], m.OkSummary) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.OkSummary))) - i-- - dAtA[i] = 0x52 - } - if m.Duration != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Duration)) - i-- - dAtA[i] = 0x48 - } - if m.Errors != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Errors)) - i-- - dAtA[i] = 0x40 - } - if m.Hits != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Hits)) - i-- - dAtA[i] = 0x38 - } - if len(m.DBType) > 0 { - i -= len(m.DBType) - copy(dAtA[i:], m.DBType) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DBType))) - i-- - dAtA[i] = 0x32 - } - if len(m.Type) > 0 { - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x2a - } - if m.HTTPStatusCode != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.HTTPStatusCode)) - i-- - dAtA[i] = 0x20 - } - if len(m.Resource) > 0 { - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Service) > 0 { - i -= len(m.Service) - copy(dAtA[i:], m.Service) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Service))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *StatsPayload) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AgentHostname) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.AgentEnv) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Stats) > 0 { - for _, e := range m.Stats { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.AgentVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ClientComputed { - n += 2 - } - if m.SplitPayload { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *ClientStatsPayload) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hostname) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Env) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Stats) > 0 { - for _, e := range m.Stats { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.Lang) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.TracerVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.RuntimeID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Sequence != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Sequence)) - } - l = len(m.AgentAggregation) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Service) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ContainerID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Tags) > 0 { - for _, s := range m.Tags { - l = len(s) - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - l = len(m.GitCommitSha) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ImageTag) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.ProcessTagsHash != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.ProcessTagsHash)) - } - l = len(m.ProcessTags) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *ClientStatsBucket) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Start != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Start)) - } - if m.Duration != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Duration)) - } - if len(m.Stats) > 0 { - for _, e := range m.Stats { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.AgentTimeShift != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.AgentTimeShift)) - } - n += len(m.unknownFields) - return n -} - -func (m *ClientGroupedStats) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Service) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Resource) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.HTTPStatusCode != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.HTTPStatusCode)) - } - l = len(m.Type) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.DBType) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Hits != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Hits)) - } - if m.Errors != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Errors)) - } - if m.Duration != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Duration)) - } - l = len(m.OkSummary) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.ErrorSummary) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Synthetics { - n += 2 - } - if m.TopLevelHits != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.TopLevelHits)) - } - l = len(m.SpanKind) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.PeerTags) > 0 { - for _, s := range m.PeerTags { - l = len(s) - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.IsTraceRoot != 0 { - n += 2 + protohelpers.SizeOfVarint(uint64(m.IsTraceRoot)) - } - l = len(m.GRPCStatusCode) - if l > 0 { - n += 2 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *StatsPayload) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StatsPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StatsPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentHostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentHostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentEnv", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentEnv = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stats = append(m.Stats, &ClientStatsPayload{}) - if err := m.Stats[len(m.Stats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientComputed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ClientComputed = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SplitPayload", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SplitPayload = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientStatsPayload) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClientStatsPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientStatsPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stats = append(m.Stats, &ClientStatsBucket{}) - if err := m.Stats[len(m.Stats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Lang", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Lang = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TracerVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TracerVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) - } - m.Sequence = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Sequence |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentAggregation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AgentAggregation = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitCommitSha", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GitCommitSha = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageTag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageTag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessTagsHash", wireType) - } - m.ProcessTagsHash = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProcessTagsHash |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessTags = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientStatsBucket) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClientStatsBucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientStatsBucket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - m.Start = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Start |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Duration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stats = append(m.Stats, &ClientGroupedStats{}) - if err := m.Stats[len(m.Stats)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AgentTimeShift", wireType) - } - m.AgentTimeShift = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AgentTimeShift |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClientGroupedStats) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClientGroupedStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClientGroupedStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Service = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HTTPStatusCode", wireType) - } - m.HTTPStatusCode = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HTTPStatusCode |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DBType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DBType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Hits", wireType) - } - m.Hits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Hits |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Errors", wireType) - } - m.Errors = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Errors |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Duration |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OkSummary", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OkSummary = append(m.OkSummary[:0], dAtA[iNdEx:postIndex]...) - if m.OkSummary == nil { - m.OkSummary = []byte{} - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorSummary", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorSummary = append(m.ErrorSummary[:0], dAtA[iNdEx:postIndex]...) - if m.ErrorSummary == nil { - m.ErrorSummary = []byte{} - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Synthetics", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Synthetics = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TopLevelHits", wireType) - } - m.TopLevelHits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TopLevelHits |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanKind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpanKind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeerTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PeerTags = append(m.PeerTags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsTraceRoot", wireType) - } - m.IsTraceRoot = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IsTraceRoot |= Trilean(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GRPCStatusCode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GRPCStatusCode = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace.go deleted file mode 100644 index 94fd0eda63..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace.go +++ /dev/null @@ -1,52 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package trace - -//go:generate go run github.com/tinylib/msgp -file=span.pb.go -o span_gen.go -io=false -//go:generate go run github.com/tinylib/msgp -file=tracer_payload.pb.go -o tracer_payload_gen.go -io=false -//go:generate go run github.com/tinylib/msgp -io=false - -// Trace is a collection of spans with the same trace ID -type Trace []*Span - -// Traces is a list of traces. This model matters as this is what we unpack from msgp. -type Traces []Trace - -// RemoveChunk removes a chunk by its index. -func (p *TracerPayload) RemoveChunk(i int) { - if i < 0 || i >= len(p.Chunks) { - return - } - p.Chunks[i] = p.Chunks[len(p.Chunks)-1] - p.Chunks = p.Chunks[:len(p.Chunks)-1] -} - -// Cut cuts off a new tracer payload from the `p` with [0, i-1] chunks -// and keeps [i, n-1] chunks in the original payload `p`. -func (p *TracerPayload) Cut(i int) *TracerPayload { - if i < 0 { - i = 0 - } - if i > len(p.Chunks) { - i = len(p.Chunks) - } - newPayload := TracerPayload{ - ContainerID: p.GetContainerID(), - LanguageName: p.GetLanguageName(), - LanguageVersion: p.GetLanguageVersion(), - TracerVersion: p.GetTracerVersion(), - RuntimeID: p.GetRuntimeID(), - Env: p.GetEnv(), - Hostname: p.GetHostname(), - AppVersion: p.GetAppVersion(), - Tags: p.GetTags(), - } - - newPayload.Chunks = p.Chunks[:i] - p.Chunks = p.Chunks[i:] - - return &newPayload -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace_gen.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace_gen.go deleted file mode 100644 index 2a2865f3dc..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/trace_gen.go +++ /dev/null @@ -1,158 +0,0 @@ -package trace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// MarshalMsg implements msgp.Marshaler -func (z Trace) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendArrayHeader(o, uint32(len(z))) - for za0001 := range z { - if z[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, za0001) - return - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Trace) UnmarshalMsg(bts []byte) (o []byte, err error) { - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(Trace, zb0002) - } - for zb0001 := range *z { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - (*z)[zb0001] = nil - } else { - if (*z)[zb0001] == nil { - (*z)[zb0001] = new(Span) - } - bts, err = (*z)[zb0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z Trace) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0003 := range z { - if z[zb0003] == nil { - s += msgp.NilSize - } else { - s += z[zb0003].Msgsize() - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z Traces) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendArrayHeader(o, uint32(len(z))) - for za0001 := range z { - o = msgp.AppendArrayHeader(o, uint32(len(z[za0001]))) - for za0002 := range z[za0001] { - if z[za0001][za0002] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z[za0001][za0002].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, za0001, za0002) - return - } - } - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Traces) UnmarshalMsg(bts []byte) (o []byte, err error) { - var zb0003 uint32 - zb0003, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0003) { - (*z) = (*z)[:zb0003] - } else { - (*z) = make(Traces, zb0003) - } - for zb0001 := range *z { - var zb0004 uint32 - zb0004, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - if cap((*z)[zb0001]) >= int(zb0004) { - (*z)[zb0001] = ((*z)[zb0001])[:zb0004] - } else { - (*z)[zb0001] = make(Trace, zb0004) - } - for zb0002 := range (*z)[zb0001] { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - (*z)[zb0001][zb0002] = nil - } else { - if (*z)[zb0001][zb0002] == nil { - (*z)[zb0001][zb0002] = new(Span) - } - bts, err = (*z)[zb0001][zb0002].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, zb0001, zb0002) - return - } - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z Traces) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0005 := range z { - s += msgp.ArrayHeaderSize - for zb0006 := range z[zb0005] { - if z[zb0005][zb0006] == nil { - s += msgp.NilSize - } else { - s += z[zb0005][zb0006].Msgsize() - } - } - } - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload.pb.go deleted file mode 100644 index 5ed5860ff9..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload.pb.go +++ /dev/null @@ -1,336 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.6 -// protoc v5.29.3 -// source: datadog/trace/tracer_payload.proto - -package trace - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// TraceChunk represents a list of spans with the same trace ID. In other words, a chunk of a trace. -type TraceChunk struct { - state protoimpl.MessageState `protogen:"open.v1"` - // priority specifies sampling priority of the trace. - // @gotags: json:"priority" msg:"priority" - Priority int32 `protobuf:"varint,1,opt,name=priority,proto3" json:"priority" msg:"priority"` - // origin specifies origin product ("lambda", "rum", etc.) of the trace. - // @gotags: json:"origin" msg:"origin" - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin" msg:"origin"` - // spans specifies list of containing spans. - // @gotags: json:"spans" msg:"spans" - Spans []*Span `protobuf:"bytes,3,rep,name=spans,proto3" json:"spans" msg:"spans"` - // tags specifies tags common in all `spans`. - // @gotags: json:"tags" msg:"tags" - Tags map[string]string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"tags"` - // droppedTrace specifies whether the trace was dropped by samplers or not. - // @gotags: json:"dropped_trace" msg:"dropped_trace" - DroppedTrace bool `protobuf:"varint,5,opt,name=droppedTrace,proto3" json:"dropped_trace" msg:"dropped_trace"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TraceChunk) Reset() { - *x = TraceChunk{} - mi := &file_datadog_trace_tracer_payload_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TraceChunk) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TraceChunk) ProtoMessage() {} - -func (x *TraceChunk) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_tracer_payload_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TraceChunk.ProtoReflect.Descriptor instead. -func (*TraceChunk) Descriptor() ([]byte, []int) { - return file_datadog_trace_tracer_payload_proto_rawDescGZIP(), []int{0} -} - -func (x *TraceChunk) GetPriority() int32 { - if x != nil { - return x.Priority - } - return 0 -} - -func (x *TraceChunk) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -func (x *TraceChunk) GetSpans() []*Span { - if x != nil { - return x.Spans - } - return nil -} - -func (x *TraceChunk) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *TraceChunk) GetDroppedTrace() bool { - if x != nil { - return x.DroppedTrace - } - return false -} - -// TracerPayload represents a payload the trace agent receives from tracers. -type TracerPayload struct { - state protoimpl.MessageState `protogen:"open.v1"` - // containerID specifies the ID of the container where the tracer is running on. - // @gotags: json:"container_id" msg:"container_id" - ContainerID string `protobuf:"bytes,1,opt,name=containerID,proto3" json:"container_id" msg:"container_id"` - // languageName specifies language of the tracer. - // @gotags: json:"language_name" msg:"language_name" - LanguageName string `protobuf:"bytes,2,opt,name=languageName,proto3" json:"language_name" msg:"language_name"` - // languageVersion specifies language version of the tracer. - // @gotags: json:"language_version" msg:"language_version" - LanguageVersion string `protobuf:"bytes,3,opt,name=languageVersion,proto3" json:"language_version" msg:"language_version"` - // tracerVersion specifies version of the tracer. - // @gotags: json:"tracer_version" msg:"tracer_version" - TracerVersion string `protobuf:"bytes,4,opt,name=tracerVersion,proto3" json:"tracer_version" msg:"tracer_version"` - // runtimeID specifies V4 UUID representation of a tracer session. - // @gotags: json:"runtime_id" msg:"runtime_id" - RuntimeID string `protobuf:"bytes,5,opt,name=runtimeID,proto3" json:"runtime_id" msg:"runtime_id"` - // chunks specifies list of containing trace chunks. - // @gotags: json:"chunks" msg:"chunks" - Chunks []*TraceChunk `protobuf:"bytes,6,rep,name=chunks,proto3" json:"chunks" msg:"chunks"` - // tags specifies tags common in all `chunks`. - // @gotags: json:"tags" msg:"tags" - Tags map[string]string `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value" msg:"tags"` - // env specifies `env` tag that set with the tracer. - // @gotags: json:"env" msg:"env" - Env string `protobuf:"bytes,8,opt,name=env,proto3" json:"env" msg:"env"` - // hostname specifies hostname of where the tracer is running. - // @gotags: json:"hostname" msg:"hostname" - Hostname string `protobuf:"bytes,9,opt,name=hostname,proto3" json:"hostname" msg:"hostname"` - // version specifies `version` tag that set with the tracer. - // @gotags: json:"app_version" msg:"app_version" - AppVersion string `protobuf:"bytes,10,opt,name=appVersion,proto3" json:"app_version" msg:"app_version"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TracerPayload) Reset() { - *x = TracerPayload{} - mi := &file_datadog_trace_tracer_payload_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TracerPayload) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TracerPayload) ProtoMessage() {} - -func (x *TracerPayload) ProtoReflect() protoreflect.Message { - mi := &file_datadog_trace_tracer_payload_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TracerPayload.ProtoReflect.Descriptor instead. -func (*TracerPayload) Descriptor() ([]byte, []int) { - return file_datadog_trace_tracer_payload_proto_rawDescGZIP(), []int{1} -} - -func (x *TracerPayload) GetContainerID() string { - if x != nil { - return x.ContainerID - } - return "" -} - -func (x *TracerPayload) GetLanguageName() string { - if x != nil { - return x.LanguageName - } - return "" -} - -func (x *TracerPayload) GetLanguageVersion() string { - if x != nil { - return x.LanguageVersion - } - return "" -} - -func (x *TracerPayload) GetTracerVersion() string { - if x != nil { - return x.TracerVersion - } - return "" -} - -func (x *TracerPayload) GetRuntimeID() string { - if x != nil { - return x.RuntimeID - } - return "" -} - -func (x *TracerPayload) GetChunks() []*TraceChunk { - if x != nil { - return x.Chunks - } - return nil -} - -func (x *TracerPayload) GetTags() map[string]string { - if x != nil { - return x.Tags - } - return nil -} - -func (x *TracerPayload) GetEnv() string { - if x != nil { - return x.Env - } - return "" -} - -func (x *TracerPayload) GetHostname() string { - if x != nil { - return x.Hostname - } - return "" -} - -func (x *TracerPayload) GetAppVersion() string { - if x != nil { - return x.AppVersion - } - return "" -} - -var File_datadog_trace_tracer_payload_proto protoreflect.FileDescriptor - -const file_datadog_trace_tracer_payload_proto_rawDesc = "" + - "\n" + - "\"datadog/trace/tracer_payload.proto\x12\rdatadog.trace\x1a\x18datadog/trace/span.proto\"\x81\x02\n" + - "\n" + - "TraceChunk\x12\x1a\n" + - "\bpriority\x18\x01 \x01(\x05R\bpriority\x12\x16\n" + - "\x06origin\x18\x02 \x01(\tR\x06origin\x12)\n" + - "\x05spans\x18\x03 \x03(\v2\x13.datadog.trace.SpanR\x05spans\x127\n" + - "\x04tags\x18\x04 \x03(\v2#.datadog.trace.TraceChunk.TagsEntryR\x04tags\x12\"\n" + - "\fdroppedTrace\x18\x05 \x01(\bR\fdroppedTrace\x1a7\n" + - "\tTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\xb9\x03\n" + - "\rTracerPayload\x12 \n" + - "\vcontainerID\x18\x01 \x01(\tR\vcontainerID\x12\"\n" + - "\flanguageName\x18\x02 \x01(\tR\flanguageName\x12(\n" + - "\x0flanguageVersion\x18\x03 \x01(\tR\x0flanguageVersion\x12$\n" + - "\rtracerVersion\x18\x04 \x01(\tR\rtracerVersion\x12\x1c\n" + - "\truntimeID\x18\x05 \x01(\tR\truntimeID\x121\n" + - "\x06chunks\x18\x06 \x03(\v2\x19.datadog.trace.TraceChunkR\x06chunks\x12:\n" + - "\x04tags\x18\a \x03(\v2&.datadog.trace.TracerPayload.TagsEntryR\x04tags\x12\x10\n" + - "\x03env\x18\b \x01(\tR\x03env\x12\x1a\n" + - "\bhostname\x18\t \x01(\tR\bhostname\x12\x1e\n" + - "\n" + - "appVersion\x18\n" + - " \x01(\tR\n" + - "appVersion\x1a7\n" + - "\tTagsEntry\x12\x10\n" + - "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + - "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01B\x16Z\x14pkg/proto/pbgo/traceb\x06proto3" - -var ( - file_datadog_trace_tracer_payload_proto_rawDescOnce sync.Once - file_datadog_trace_tracer_payload_proto_rawDescData []byte -) - -func file_datadog_trace_tracer_payload_proto_rawDescGZIP() []byte { - file_datadog_trace_tracer_payload_proto_rawDescOnce.Do(func() { - file_datadog_trace_tracer_payload_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_datadog_trace_tracer_payload_proto_rawDesc), len(file_datadog_trace_tracer_payload_proto_rawDesc))) - }) - return file_datadog_trace_tracer_payload_proto_rawDescData -} - -var file_datadog_trace_tracer_payload_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_datadog_trace_tracer_payload_proto_goTypes = []any{ - (*TraceChunk)(nil), // 0: datadog.trace.TraceChunk - (*TracerPayload)(nil), // 1: datadog.trace.TracerPayload - nil, // 2: datadog.trace.TraceChunk.TagsEntry - nil, // 3: datadog.trace.TracerPayload.TagsEntry - (*Span)(nil), // 4: datadog.trace.Span -} -var file_datadog_trace_tracer_payload_proto_depIdxs = []int32{ - 4, // 0: datadog.trace.TraceChunk.spans:type_name -> datadog.trace.Span - 2, // 1: datadog.trace.TraceChunk.tags:type_name -> datadog.trace.TraceChunk.TagsEntry - 0, // 2: datadog.trace.TracerPayload.chunks:type_name -> datadog.trace.TraceChunk - 3, // 3: datadog.trace.TracerPayload.tags:type_name -> datadog.trace.TracerPayload.TagsEntry - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_datadog_trace_tracer_payload_proto_init() } -func file_datadog_trace_tracer_payload_proto_init() { - if File_datadog_trace_tracer_payload_proto != nil { - return - } - file_datadog_trace_span_proto_init() - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_datadog_trace_tracer_payload_proto_rawDesc), len(file_datadog_trace_tracer_payload_proto_rawDesc)), - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_datadog_trace_tracer_payload_proto_goTypes, - DependencyIndexes: file_datadog_trace_tracer_payload_proto_depIdxs, - MessageInfos: file_datadog_trace_tracer_payload_proto_msgTypes, - }.Build() - File_datadog_trace_tracer_payload_proto = out.File - file_datadog_trace_tracer_payload_proto_goTypes = nil - file_datadog_trace_tracer_payload_proto_depIdxs = nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_gen.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_gen.go deleted file mode 100644 index cd2b392503..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_gen.go +++ /dev/null @@ -1,384 +0,0 @@ -package trace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// MarshalMsg implements msgp.Marshaler -func (z *TraceChunk) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 5 - // string "priority" - o = append(o, 0x85, 0xa8, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79) - o = msgp.AppendInt32(o, z.Priority) - // string "origin" - o = append(o, 0xa6, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e) - o = msgp.AppendString(o, z.Origin) - // string "spans" - o = append(o, 0xa5, 0x73, 0x70, 0x61, 0x6e, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Spans))) - for za0001 := range z.Spans { - if z.Spans[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Spans[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Spans", za0001) - return - } - } - } - // string "tags" - o = append(o, 0xa4, 0x74, 0x61, 0x67, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Tags))) - for za0002, za0003 := range z.Tags { - o = msgp.AppendString(o, za0002) - o = msgp.AppendString(o, za0003) - } - // string "dropped_trace" - o = append(o, 0xad, 0x64, 0x72, 0x6f, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65) - o = msgp.AppendBool(o, z.DroppedTrace) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *TraceChunk) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "priority": - z.Priority, bts, err = msgp.ReadInt32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Priority") - return - } - case "origin": - z.Origin, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Origin") - return - } - case "spans": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Spans") - return - } - if cap(z.Spans) >= int(zb0002) { - z.Spans = (z.Spans)[:zb0002] - } else { - z.Spans = make([]*Span, zb0002) - } - for za0001 := range z.Spans { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Spans[za0001] = nil - } else { - if z.Spans[za0001] == nil { - z.Spans[za0001] = new(Span) - } - bts, err = z.Spans[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Spans", za0001) - return - } - } - } - case "tags": - var zb0003 uint32 - zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if z.Tags == nil { - z.Tags = make(map[string]string, zb0003) - } else if len(z.Tags) > 0 { - for key := range z.Tags { - delete(z.Tags, key) - } - } - for zb0003 > 0 { - var za0002 string - var za0003 string - zb0003-- - za0002, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - za0003, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - z.Tags[za0002] = za0003 - } - case "dropped_trace": - z.DroppedTrace, bts, err = msgp.ReadBoolBytes(bts) - if err != nil { - err = msgp.WrapError(err, "DroppedTrace") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *TraceChunk) Msgsize() (s int) { - s = 1 + 9 + msgp.Int32Size + 7 + msgp.StringPrefixSize + len(z.Origin) + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Spans { - if z.Spans[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Spans[za0001].Msgsize() - } - } - s += 5 + msgp.MapHeaderSize - if z.Tags != nil { - for za0002, za0003 := range z.Tags { - _ = za0003 - s += msgp.StringPrefixSize + len(za0002) + msgp.StringPrefixSize + len(za0003) - } - } - s += 14 + msgp.BoolSize - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *TracerPayload) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 10 - // string "container_id" - o = append(o, 0x8a, 0xac, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x64) - o = msgp.AppendString(o, z.ContainerID) - // string "language_name" - o = append(o, 0xad, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.LanguageName) - // string "language_version" - o = append(o, 0xb0, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.LanguageVersion) - // string "tracer_version" - o = append(o, 0xae, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.TracerVersion) - // string "runtime_id" - o = append(o, 0xaa, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x64) - o = msgp.AppendString(o, z.RuntimeID) - // string "chunks" - o = append(o, 0xa6, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73) - o = msgp.AppendArrayHeader(o, uint32(len(z.Chunks))) - for za0001 := range z.Chunks { - if z.Chunks[za0001] == nil { - o = msgp.AppendNil(o) - } else { - o, err = z.Chunks[za0001].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Chunks", za0001) - return - } - } - } - // string "tags" - o = append(o, 0xa4, 0x74, 0x61, 0x67, 0x73) - o = msgp.AppendMapHeader(o, uint32(len(z.Tags))) - for za0002, za0003 := range z.Tags { - o = msgp.AppendString(o, za0002) - o = msgp.AppendString(o, za0003) - } - // string "env" - o = append(o, 0xa3, 0x65, 0x6e, 0x76) - o = msgp.AppendString(o, z.Env) - // string "hostname" - o = append(o, 0xa8, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Hostname) - // string "app_version" - o = append(o, 0xab, 0x61, 0x70, 0x70, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.AppVersion) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *TracerPayload) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "container_id": - z.ContainerID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ContainerID") - return - } - case "language_name": - z.LanguageName, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "LanguageName") - return - } - case "language_version": - z.LanguageVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "LanguageVersion") - return - } - case "tracer_version": - z.TracerVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - case "runtime_id": - z.RuntimeID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - case "chunks": - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Chunks") - return - } - if cap(z.Chunks) >= int(zb0002) { - z.Chunks = (z.Chunks)[:zb0002] - } else { - z.Chunks = make([]*TraceChunk, zb0002) - } - for za0001 := range z.Chunks { - if msgp.IsNil(bts) { - bts, err = msgp.ReadNilBytes(bts) - if err != nil { - return - } - z.Chunks[za0001] = nil - } else { - if z.Chunks[za0001] == nil { - z.Chunks[za0001] = new(TraceChunk) - } - bts, err = z.Chunks[za0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Chunks", za0001) - return - } - } - } - case "tags": - var zb0003 uint32 - zb0003, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if z.Tags == nil { - z.Tags = make(map[string]string, zb0003) - } else if len(z.Tags) > 0 { - for key := range z.Tags { - delete(z.Tags, key) - } - } - for zb0003 > 0 { - var za0002 string - var za0003 string - zb0003-- - za0002, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - za0003, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Tags", za0002) - return - } - z.Tags[za0002] = za0003 - } - case "env": - z.Env, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - case "hostname": - z.Hostname, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - case "app_version": - z.AppVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "AppVersion") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *TracerPayload) Msgsize() (s int) { - s = 1 + 13 + msgp.StringPrefixSize + len(z.ContainerID) + 14 + msgp.StringPrefixSize + len(z.LanguageName) + 17 + msgp.StringPrefixSize + len(z.LanguageVersion) + 15 + msgp.StringPrefixSize + len(z.TracerVersion) + 11 + msgp.StringPrefixSize + len(z.RuntimeID) + 7 + msgp.ArrayHeaderSize - for za0001 := range z.Chunks { - if z.Chunks[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Chunks[za0001].Msgsize() - } - } - s += 5 + msgp.MapHeaderSize - if z.Tags != nil { - for za0002, za0003 := range z.Tags { - _ = za0003 - s += msgp.StringPrefixSize + len(za0002) + msgp.StringPrefixSize + len(za0003) - } - } - s += 4 + msgp.StringPrefixSize + len(z.Env) + 9 + msgp.StringPrefixSize + len(z.Hostname) + 12 + msgp.StringPrefixSize + len(z.AppVersion) - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_utils.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_utils.go deleted file mode 100644 index 9f7fabba28..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_utils.go +++ /dev/null @@ -1,35 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package trace - -// traceChunkCopiedFields records the fields that are copied in ShallowCopy. -// This should match exactly the fields set in (*TraceChunk).ShallowCopy. -// This is used by tests to enforce the correctness of ShallowCopy. -var traceChunkCopiedFields = map[string]struct{}{ - "Priority": {}, - "Origin": {}, - "Spans": {}, - "Tags": {}, - "DroppedTrace": {}, -} - -// ShallowCopy returns a shallow copy of the copy-able portion of a TraceChunk. These are the -// public fields which will have a Get* method for them. The completeness of this -// method is enforced by the init function above. Instead of using pkg/proto/utils.ProtoCopier, -// which incurs heavy reflection cost for every copy at runtime, we use reflection once at -// startup to ensure our method is complete. -func (t *TraceChunk) ShallowCopy() *TraceChunk { - if t == nil { - return nil - } - return &TraceChunk{ - Priority: t.Priority, - Origin: t.Origin, - Spans: t.Spans, - Tags: t.Tags, - DroppedTrace: t.DroppedTrace, - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_vtproto.pb.go b/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_vtproto.pb.go deleted file mode 100644 index b63a2fd37b..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace/tracer_payload_vtproto.pb.go +++ /dev/null @@ -1,1067 +0,0 @@ -// Code generated by protoc-gen-go-vtproto. DO NOT EDIT. -// protoc-gen-go-vtproto version: v0.6.1-0.20240319094008-0393e58bdf10 -// source: datadog/trace/tracer_payload.proto - -package trace - -import ( - fmt "fmt" - protohelpers "github.com/planetscale/vtprotobuf/protohelpers" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -func (m *TraceChunk) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TraceChunk) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TraceChunk) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.DroppedTrace { - i-- - if m.DroppedTrace { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Spans[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x12 - } - if m.Priority != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Priority)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TracerPayload) MarshalVT() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVT(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TracerPayload) MarshalToVT(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVT(dAtA[:size]) -} - -func (m *TracerPayload) MarshalToSizedBufferVT(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.AppVersion) > 0 { - i -= len(m.AppVersion) - copy(dAtA[i:], m.AppVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.AppVersion))) - i-- - dAtA[i] = 0x52 - } - if len(m.Hostname) > 0 { - i -= len(m.Hostname) - copy(dAtA[i:], m.Hostname) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Hostname))) - i-- - dAtA[i] = 0x4a - } - if len(m.Env) > 0 { - i -= len(m.Env) - copy(dAtA[i:], m.Env) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Env))) - i-- - dAtA[i] = 0x42 - } - if len(m.Tags) > 0 { - for k := range m.Tags { - v := m.Tags[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = protohelpers.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Chunks) > 0 { - for iNdEx := len(m.Chunks) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Chunks[iNdEx].MarshalToSizedBufferVT(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } - } - if len(m.RuntimeID) > 0 { - i -= len(m.RuntimeID) - copy(dAtA[i:], m.RuntimeID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.RuntimeID))) - i-- - dAtA[i] = 0x2a - } - if len(m.TracerVersion) > 0 { - i -= len(m.TracerVersion) - copy(dAtA[i:], m.TracerVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.TracerVersion))) - i-- - dAtA[i] = 0x22 - } - if len(m.LanguageVersion) > 0 { - i -= len(m.LanguageVersion) - copy(dAtA[i:], m.LanguageVersion) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LanguageVersion))) - i-- - dAtA[i] = 0x1a - } - if len(m.LanguageName) > 0 { - i -= len(m.LanguageName) - copy(dAtA[i:], m.LanguageName) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.LanguageName))) - i-- - dAtA[i] = 0x12 - } - if len(m.ContainerID) > 0 { - i -= len(m.ContainerID) - copy(dAtA[i:], m.ContainerID) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.ContainerID))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *TraceChunk) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Priority != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Priority)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - if m.DroppedTrace { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *TracerPayload) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContainerID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.LanguageName) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.LanguageVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.TracerVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.RuntimeID) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.Chunks) > 0 { - for _, e := range m.Chunks { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if len(m.Tags) > 0 { - for k, v := range m.Tags { - _ = k - _ = v - mapEntrySize := 1 + len(k) + protohelpers.SizeOfVarint(uint64(len(k))) + 1 + len(v) + protohelpers.SizeOfVarint(uint64(len(v))) - n += mapEntrySize + 1 + protohelpers.SizeOfVarint(uint64(mapEntrySize)) - } - } - l = len(m.Env) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.Hostname) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.AppVersion) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *TraceChunk) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TraceChunk: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TraceChunk: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tags == nil { - m.Tags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Tags[mapkey] = mapvalue - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedTrace", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DroppedTrace = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TracerPayload) UnmarshalVT(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TracerPayload: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TracerPayload: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LanguageName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LanguageName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LanguageVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LanguageVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TracerVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TracerVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RuntimeID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RuntimeID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Chunks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Chunks = append(m.Chunks, &TraceChunk{}) - if err := m.Chunks[len(m.Chunks)-1].UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tags == nil { - m.Tags = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protohelpers.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Tags[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protohelpers.ErrIntOverflow - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protohelpers.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protohelpers.ErrInvalidLength - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := protohelpers.Skip(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protohelpers.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/remoteconfig/state/README.md b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/README.md deleted file mode 100644 index a42ffb54e4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Remote Config Go client - -This package powers the Remote Config client shipped in the Go tracer and in all the agent processes (core-agent, trace-agent, system-probe, ...). - -To add a new product simply add it to `products.go` as a constant and in the `validProducts` set. diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/agent_config.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/agent_config.go deleted file mode 100644 index f6df6a9375..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/agent_config.go +++ /dev/null @@ -1,159 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package state - -import ( - "encoding/json" - "fmt" - "regexp" - - "github.com/pkg/errors" -) - -const agentConfigOrderID = "configuration_order" - -var datadogConfigIDRegexp = regexp.MustCompile(`^datadog/\d+/AGENT_CONFIG/([^/]+)/[^/]+$`) - -// AgentConfig is a deserialized agent configuration file -// along with the associated metadata -type AgentConfig struct { - Config agentConfigData - Metadata Metadata -} - -// ConfigContent contains the configurations set by remote-config -type ConfigContent struct { - LogLevel string `json:"log_level"` -} - -type agentConfigData struct { - Name string `json:"name"` - Config ConfigContent `json:"config"` -} - -// AgentConfigOrder is a deserialized agent configuration file -// along with the associated metadata -type AgentConfigOrder struct { - Config agentConfigOrderData - Metadata Metadata -} - -type agentConfigOrderData struct { - Order []string `json:"order"` - InternalOrder []string `json:"internal_order"` -} - -// AgentConfigState contains the state of the config in case of fallback or override -type AgentConfigState struct { - FallbackLogLevel string - LatestLogLevel string -} - -// parseConfigAgentConfig parses an agent task config -func parseConfigAgentConfig(data []byte, metadata Metadata) (AgentConfig, error) { - var d agentConfigData - - err := json.Unmarshal(data, &d) - if err != nil { - return AgentConfig{}, fmt.Errorf("Unexpected AGENT_CONFIG received through remote-config: %s", err) - } - - return AgentConfig{ - Config: d, - Metadata: metadata, - }, nil -} - -// parseConfigAgentConfig parses an agent task config -func parseConfigAgentConfigOrder(data []byte, metadata Metadata) (AgentConfigOrder, error) { - var d agentConfigOrderData - - err := json.Unmarshal(data, &d) - if err != nil { - return AgentConfigOrder{}, fmt.Errorf("Unexpected AGENT_CONFIG received through remote-config: %s", err) - } - - return AgentConfigOrder{ - Config: d, - Metadata: metadata, - }, nil -} - -// MergeRCAgentConfig is the callback function called when there is an AGENT_CONFIG config update -// The RCClient can directly call back listeners, because there would be no way to send back -// RCTE2 configuration applied state to RC backend. -func MergeRCAgentConfig(applyStatus func(cfgPath string, status ApplyStatus), updates map[string]RawConfig) (ConfigContent, error) { - var orderFile AgentConfigOrder - var hasError bool - var fullErr error - parsedLayers := map[string]AgentConfig{} - - for configPath, c := range updates { - var err error - matched := datadogConfigIDRegexp.FindStringSubmatch(configPath) - if len(matched) != 2 { - err = fmt.Errorf("config file path '%s' has wrong format", configPath) - hasError = true - fullErr = errors.Wrap(fullErr, err.Error()) - applyStatus(configPath, ApplyStatus{ - State: ApplyStateError, - Error: err.Error(), - }) - // If a layer is wrong, fail later to parse the rest and check them all - continue - } - - parsedConfigID := matched[1] - - // Ignore the configuration order file - if parsedConfigID == agentConfigOrderID { - orderFile, err = parseConfigAgentConfigOrder(c.Config, c.Metadata) - if err != nil { - hasError = true - fullErr = errors.Wrap(fullErr, err.Error()) - applyStatus(configPath, ApplyStatus{ - State: ApplyStateError, - Error: err.Error(), - }) - // If a layer is wrong, fail later to parse the rest and check them all - continue - } - } else { - cfg, err := parseConfigAgentConfig(c.Config, c.Metadata) - if err != nil { - hasError = true - applyStatus(configPath, ApplyStatus{ - State: ApplyStateError, - Error: err.Error(), - }) - // If a layer is wrong, fail later to parse the rest and check them all - continue - } - parsedLayers[parsedConfigID] = cfg - } - } - - // If there was at least one error, don't apply any config - if hasError || (len(orderFile.Config.Order) == 0 && len(orderFile.Config.InternalOrder) == 0) { - return ConfigContent{}, fullErr - } - - // Go through all the layers that were sent, and apply them one by one to the merged structure - mergedConfig := ConfigContent{} - for i := len(orderFile.Config.Order) - 1; i >= 0; i-- { - if layer, found := parsedLayers[orderFile.Config.Order[i]]; found { - mergedConfig.LogLevel = layer.Config.Config.LogLevel - } - } - // Same for internal config - for i := len(orderFile.Config.InternalOrder) - 1; i >= 0; i-- { - if layer, found := parsedLayers[orderFile.Config.InternalOrder[i]]; found { - mergedConfig.LogLevel = layer.Config.Config.LogLevel - } - } - - return mergedConfig, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs.go deleted file mode 100644 index 06fdb27309..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs.go +++ /dev/null @@ -1,123 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package state - -import ( - "encoding/json" - "errors" - "fmt" - - "github.com/DataDog/go-tuf/data" -) - -// ErrNoConfigVersion occurs when a target file's custom meta is missing the config version -var ErrNoConfigVersion = errors.New("version missing in custom file meta") - -func parseConfig(product string, raw []byte, metadata Metadata) (interface{}, error) { - if _, validProduct := validProducts[product]; !validProduct { - return nil, fmt.Errorf("unknown product: %s", product) - } - - switch product { - // ASM products are parsed directly in this client - case ProductASMFeatures: - return parseASMFeaturesConfig(raw, metadata) - case ProductASMDD: - return parseConfigASMDD(raw, metadata) - case ProductASMData: - return parseConfigASMData(raw, metadata) - // case ProductAgentTask: - // return ParseConfigAgentTask(raw, metadata) - // Other products are parsed separately - default: - return RawConfig{ - Config: raw, - Metadata: metadata, - }, nil - } -} - -// RawConfig holds a config that will be parsed separately -type RawConfig struct { - Config []byte - Metadata Metadata -} - -// GetConfigs returns the current configs of a given product -func (r *Repository) GetConfigs(product string) map[string]RawConfig { - typedConfigs := make(map[string]RawConfig) - configs := r.getConfigs(product) - - for path, conf := range configs { - // We control this, so if this has gone wrong something has gone horribly wrong - typed, ok := conf.(RawConfig) - if !ok { - panic("unexpected config stored as RawConfig") - } - - typedConfigs[path] = typed - } - - return typedConfigs -} - -// Metadata stores remote config metadata for a given configuration -type Metadata struct { - Product string - ID string - Name string - Version uint64 - RawLength uint64 - Hashes map[string][]byte - ApplyStatus ApplyStatus -} - -func newConfigMetadata(parsedPath configPath, tfm data.TargetFileMeta) (Metadata, error) { - var m Metadata - m.ID = parsedPath.ConfigID - m.Product = parsedPath.Product - m.Name = parsedPath.Name - m.RawLength = uint64(tfm.Length) - m.Hashes = make(map[string][]byte) - for k, v := range tfm.Hashes { - m.Hashes[k] = []byte(v) - } - v, err := fileMetaVersion(tfm) - if err != nil { - return Metadata{}, err - } - m.Version = v - - return m, nil -} - -type fileMetaCustom struct { - Version *uint64 `json:"v"` -} - -func fileMetaVersion(fm data.TargetFileMeta) (uint64, error) { - if fm.Custom == nil { - return 0, ErrNoConfigVersion - } - fmc, err := parseFileMetaCustom(*fm.Custom) - if err != nil { - return 0, err - } - - return *fmc.Version, nil -} - -func parseFileMetaCustom(rawCustom []byte) (fileMetaCustom, error) { - var custom fileMetaCustom - err := json.Unmarshal(rawCustom, &custom) - if err != nil { - return fileMetaCustom{}, err - } - if custom.Version == nil { - return fileMetaCustom{}, ErrNoConfigVersion - } - return custom, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_agent_task.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_agent_task.go deleted file mode 100644 index 618bf73354..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_agent_task.go +++ /dev/null @@ -1,59 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023-present Datadog, Inc. - -package state - -import ( - "encoding/json" - "fmt" -) - -// AgentTaskConfig is a deserialized agent task configuration file -// along with the associated metadata -type AgentTaskConfig struct { - Config AgentTaskData - Metadata Metadata -} - -// AgentTaskData is the content of a agent task configuration file -type AgentTaskData struct { - TaskType string `json:"task_type"` - UUID string `json:"uuid"` - TaskArgs map[string]string `json:"args"` -} - -// ParseConfigAgentTask parses an agent task config -func ParseConfigAgentTask(data []byte, metadata Metadata) (AgentTaskConfig, error) { - var d AgentTaskData - - err := json.Unmarshal(data, &d) - if err != nil { - return AgentTaskConfig{}, fmt.Errorf("Unexpected AGENT_TASK received through remote-config: %s", err) - } - - return AgentTaskConfig{ - Config: d, - Metadata: metadata, - }, nil -} - -// AgentTaskConfigs returns the currently active AGENT_TASK configs -func (r *Repository) AgentTaskConfigs() map[string]AgentTaskConfig { - typedConfigs := make(map[string]AgentTaskConfig) - - configs := r.getConfigs(ProductAgentTask) - - for path, conf := range configs { - // We control this, so if this has gone wrong something has gone horribly wrong - typed, ok := conf.(AgentTaskConfig) - if !ok { - panic("unexpected config stored as AgentTaskConfigs") - } - - typedConfigs[path] = typed - } - - return typedConfigs -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_asm.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_asm.go deleted file mode 100644 index 00b377dbba..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/configs_asm.go +++ /dev/null @@ -1,166 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package state - -import ( - "encoding/json" -) - -// ConfigASMDD is a deserialized ASM DD configuration file along with its -// associated remote config metadata -type ConfigASMDD struct { - Config []byte - Metadata Metadata -} - -func parseConfigASMDD(data []byte, metadata Metadata) (ConfigASMDD, error) { - return ConfigASMDD{ - Config: data, - Metadata: metadata, - }, nil -} - -// ASMDDConfigs returns the currently active ASMDD configs -func (r *Repository) ASMDDConfigs() map[string]ConfigASMDD { - typedConfigs := make(map[string]ConfigASMDD) - - configs := r.getConfigs(ProductASMDD) - - for path, conf := range configs { - // We control this, so if this has gone wrong something has gone horribly wrong - typed, ok := conf.(ConfigASMDD) - if !ok { - panic("unexpected config stored as ASMDD Config") - } - - typedConfigs[path] = typed - } - - return typedConfigs -} - -// ASMFeaturesConfig is a deserialized configuration file that indicates whether ASM should be enabled -// within a tracer, along with its associated remote config metadata. -type ASMFeaturesConfig struct { - Config ASMFeaturesData - Metadata Metadata -} - -// ASMFeaturesData describes the state of ASM and some of its features -type ASMFeaturesData struct { - ASM struct { - Enabled bool `json:"enabled"` - } `json:"asm"` - APISecurity struct { - RequestSampleRate float64 `json:"request_sample_rate"` - } `json:"api_security"` -} - -func parseASMFeaturesConfig(data []byte, metadata Metadata) (ASMFeaturesConfig, error) { - var f ASMFeaturesData - - err := json.Unmarshal(data, &f) - if err != nil { - return ASMFeaturesConfig{}, nil - } - - return ASMFeaturesConfig{ - Config: f, - Metadata: metadata, - }, nil -} - -// ASMFeaturesConfigs returns the currently active ASMFeatures configs -func (r *Repository) ASMFeaturesConfigs() map[string]ASMFeaturesConfig { - typedConfigs := make(map[string]ASMFeaturesConfig) - - configs := r.getConfigs(ProductASMFeatures) - - for path, conf := range configs { - // We control this, so if this has gone wrong something has gone horribly wrong - typed, ok := conf.(ASMFeaturesConfig) - if !ok { - panic("unexpected config stored as ASMFeaturesConfig") - } - - typedConfigs[path] = typed - } - - return typedConfigs -} - -// ApplyState represents the status of a configuration application by a remote configuration client -// Clients need to either ack the correct application of received configurations, or communicate that -// they haven't applied it yet, or communicate any error that may have happened while doing so -type ApplyState uint64 - -const ( - //ApplyStateUnknown indicates that a client does not support the ApplyState feature - ApplyStateUnknown ApplyState = iota - // ApplyStateUnacknowledged indicates a client has received the config but has not specified success or failure - ApplyStateUnacknowledged - // ApplyStateAcknowledged indicates a client has successfully applied the config - ApplyStateAcknowledged - // ApplyStateError indicates that a client has failed to apply the config - ApplyStateError -) - -// ApplyStatus is the processing status for a given configuration. -// It basically represents whether a config was successfully processed and apply, or if an error occurred -type ApplyStatus struct { - State ApplyState - Error string -} - -// ASMDataConfig is a deserialized configuration file that holds rules data that can be used -// by the ASM WAF for specific features (example: ip blocking). -type ASMDataConfig struct { - Config ASMDataRulesData - Metadata Metadata -} - -// ASMDataRulesData is a serializable array of rules data entries -type ASMDataRulesData struct { - RulesData []ASMDataRuleData `json:"rules_data"` -} - -// ASMDataRuleData is an entry in the rules data list held by an ASMData configuration -type ASMDataRuleData struct { - ID string `json:"id"` - Type string `json:"type"` - Data []ASMDataRuleDataEntry `json:"data"` -} - -// ASMDataRuleDataEntry represents a data entry in a rule data file -type ASMDataRuleDataEntry struct { - Expiration int64 `json:"expiration,omitempty"` - Value string `json:"value"` -} - -func parseConfigASMData(data []byte, metadata Metadata) (ASMDataConfig, error) { - cfg := ASMDataConfig{ - Metadata: metadata, - } - err := json.Unmarshal(data, &cfg.Config) - return cfg, err -} - -// ASMDataConfigs returns the currently active ASMData configs -func (r *Repository) ASMDataConfigs() map[string]ASMDataConfig { - typedConfigs := make(map[string]ASMDataConfig) - configs := r.getConfigs(ProductASMData) - - for path, cfg := range configs { - // We control this, so if this has gone wrong something has gone horribly wrong - typed, ok := cfg.(ASMDataConfig) - if !ok { - panic("unexpected config stored as ASMDataConfig") - } - typedConfigs[path] = typed - } - - return typedConfigs -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/path.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/path.go deleted file mode 100644 index d1a4d69e21..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/path.go +++ /dev/null @@ -1,100 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package state - -import ( - "fmt" - "regexp" - "strconv" - "strings" -) - -var ( - // matches datadog//// for datadog//// - datadogPathRegexp = regexp.MustCompile(`^datadog/(\d+)/([^/]+)/([^/]+)/([^/]+)$`) - datadogPathRegexpGroups = 4 - - // matches employee/// for employee//// - employeePathRegexp = regexp.MustCompile(`^employee/([^/]+)/([^/]+)/([^/]+)$`) - employeePathRegexpGroups = 3 -) - -type source uint - -const ( - sourceUnknown source = iota - sourceDatadog - sourceEmployee -) - -type configPath struct { - Source source - OrgID int64 - Product string - ConfigID string - Name string -} - -func parseConfigPath(path string) (configPath, error) { - configType := parseConfigPathSource(path) - switch configType { - case sourceDatadog: - return parseDatadogConfigPath(path) - case sourceEmployee: - return parseEmployeeConfigPath(path) - } - return configPath{}, fmt.Errorf("config path '%s' has unknown source", path) -} - -func parseDatadogConfigPath(path string) (configPath, error) { - matchedGroups := datadogPathRegexp.FindStringSubmatch(path) - if len(matchedGroups) != datadogPathRegexpGroups+1 { - return configPath{}, fmt.Errorf("config file path '%s' has wrong format", path) - } - rawOrgID := matchedGroups[1] - orgID, err := strconv.ParseInt(rawOrgID, 10, 64) - if err != nil { - return configPath{}, fmt.Errorf("could not parse orgID '%s' in config file path: %v", rawOrgID, err) - } - rawProduct := matchedGroups[2] - if len(rawProduct) == 0 { - return configPath{}, fmt.Errorf("product is empty") - } - return configPath{ - Source: sourceDatadog, - OrgID: orgID, - Product: rawProduct, - ConfigID: matchedGroups[3], - Name: matchedGroups[4], - }, nil -} - -func parseEmployeeConfigPath(path string) (configPath, error) { - matchedGroups := employeePathRegexp.FindStringSubmatch(path) - if len(matchedGroups) != employeePathRegexpGroups+1 { - return configPath{}, fmt.Errorf("config file path '%s' has wrong format", path) - } - rawProduct := matchedGroups[1] - if len(rawProduct) == 0 { - return configPath{}, fmt.Errorf("product is empty") - } - return configPath{ - Source: sourceEmployee, - Product: rawProduct, - ConfigID: matchedGroups[2], - Name: matchedGroups[3], - }, nil -} - -func parseConfigPathSource(path string) source { - switch { - case strings.HasPrefix(path, "datadog/"): - return sourceDatadog - case strings.HasPrefix(path, "employee/"): - return sourceEmployee - } - return sourceUnknown -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go deleted file mode 100644 index 2f2aeb3b19..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/products.go +++ /dev/null @@ -1,109 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package state - -var validProducts = map[string]struct{}{ - ProductInstallerConfig: {}, - ProductUpdaterCatalogDD: {}, - ProductUpdaterAgent: {}, - ProductUpdaterTask: {}, - ProductActionPlatformRunnerKeys: {}, - ProductAgentConfig: {}, - ProductAgentFailover: {}, - ProductAgentTask: {}, - ProductAgentIntegrations: {}, - ProductAPMSampling: {}, - ProductCWSDD: {}, - ProductCWSCustom: {}, - ProductCWSProfiles: {}, - ProductCSMSideScanning: {}, - ProductASM: {}, - ProductASMFeatures: {}, - ProductASMDD: {}, - ProductASMData: {}, - ProductAPMTracing: {}, - ProductSDSRules: {}, - ProductSDSAgentConfig: {}, - ProductLiveDebugging: {}, - ProductContainerAutoscalingSettings: {}, - ProductContainerAutoscalingValues: {}, - ProductTesting1: {}, - ProductTesting2: {}, - ProductOrchestratorK8sCRDs: {}, - ProductHaAgent: {}, - ProductNDMDeviceProfilesCustom: {}, - ProductMetricControl: {}, - ProductDataStreamsLiveMessages: {}, - ProductLiveDebuggingSymbolDB: {}, -} - -const ( - // ProductInstallerConfig is the product used to receive the installer configuration - ProductInstallerConfig = "INSTALLER_CONFIG" - // ProductUpdaterCatalogDD is the product used to receive the package catalog from datadog - ProductUpdaterCatalogDD = "UPDATER_CATALOG_DD" - // ProductUpdaterAgent is the product used to receive defaults versions to install - ProductUpdaterAgent = "UPDATER_AGENT" - // ProductUpdaterTask is the product used to receive tasks to execute - ProductUpdaterTask = "UPDATER_TASK" - // ProductActionPlatformRunnerKeys is to receive signing keys for the action platform "private action runner" - ProductActionPlatformRunnerKeys = "AP_RUNNER_KEYS" - // ProductAgentConfig is to receive agent configurations, like the log level - ProductAgentConfig = "AGENT_CONFIG" - // ProductAgentFailover is to receive the multi-region failover configuration - ProductAgentFailover = "AGENT_FAILOVER" - // ProductAgentIntegrations is to receive integrations to schedule - ProductAgentIntegrations = "AGENT_INTEGRATIONS" - // ProductAgentTask is to receive agent task instruction, like a flare - ProductAgentTask = "AGENT_TASK" - // ProductAPMSampling is the apm sampling product - ProductAPMSampling = "APM_SAMPLING" - // ProductCWSDD is the cloud workload security product managed by datadog employees - ProductCWSDD = "CWS_DD" - // ProductCWSCustom is the cloud workload security product managed by datadog customers - ProductCWSCustom = "CWS_CUSTOM" - // ProductCWSProfiles is the cloud workload security profile product - ProductCWSProfiles = "CWS_SECURITY_PROFILES" - // ProductCSMSideScanning is the side scanning product - ProductCSMSideScanning = "CSM_SIDE_SCANNING" - // ProductASM is the ASM product used by customers to issue rules configurations - ProductASM = "ASM" - // ProductASMFeatures is the ASM product used form ASM activation through remote config - ProductASMFeatures = "ASM_FEATURES" - // ProductASMDD is the application security monitoring product managed by datadog employees - ProductASMDD = "ASM_DD" - // ProductASMData is the ASM product used to configure WAF rules data - ProductASMData = "ASM_DATA" - // ProductAPMTracing is the apm tracing product - ProductAPMTracing = "APM_TRACING" - // ProductSDSRules is the SDS definitions product - ProductSDSRules = "SDS_RULES_DD" - // ProductSDSAgentConfig is the user SDS configurations product. - ProductSDSAgentConfig = "SDS_AGENT_CONFIG" - // ProductLiveDebugging is the dynamic instrumentation product - ProductLiveDebugging = "LIVE_DEBUGGING" - // ProductLiveDebuggingSymbolDB is used by the live debugging product for - // selecting processes to upload symbols to the symbol database. - ProductLiveDebuggingSymbolDB = "LIVE_DEBUGGING_SYMBOL_DB" - // ProductContainerAutoscalingSettings receives definition of container autoscaling - ProductContainerAutoscalingSettings = "CONTAINER_AUTOSCALING_SETTINGS" - // ProductContainerAutoscalingValues receives values for container autoscaling - ProductContainerAutoscalingValues = "CONTAINER_AUTOSCALING_VALUES" - // ProductTesting1 is a product used for testing remote config - ProductTesting1 = "TESTING1" - // ProductTesting2 is a product used for testing remote config - ProductTesting2 = "TESTING2" - // ProductOrchestratorK8sCRDs receives values for k8s crds - ProductOrchestratorK8sCRDs = "ORCHESTRATOR_K8S_CRDS" - // ProductHaAgent is the HA Agent product - ProductHaAgent = "HA_AGENT" - // ProductNDMDeviceProfilesCustom receives user-created SNMP profiles for network device monitoring - ProductNDMDeviceProfilesCustom = "NDM_DEVICE_PROFILES_CUSTOM" - // ProductMetricControl receives configuration for the metrics control. - ProductMetricControl = "METRIC_CONTROL" - // ProductDataStreamsLiveMessages is used for capturing messages from Kafka - ProductDataStreamsLiveMessages = "DSM_LIVE_MESSAGES" -) diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/repository.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/repository.go deleted file mode 100644 index 0b9ed190fc..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/repository.go +++ /dev/null @@ -1,457 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -// Package state provides the types and logic needed to track the current TUF repository -// state for a client. -package state - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "log" - "strings" - "sync" - - "github.com/DataDog/go-tuf/data" -) - -var ( - // ErrMalformedEmbeddedRoot occurs when the TUF root provided is invalid - ErrMalformedEmbeddedRoot = errors.New("malformed embedded TUF root file provided") -) - -// RepositoryState contains all of the information about the current config files -// stored by the client to be able to make an update request to an Agent -type RepositoryState struct { - Configs []ConfigState - CachedFiles []CachedFile - TargetsVersion int64 - RootsVersion int64 - OpaqueBackendState []byte -} - -// ConfigState describes an applied config by the agent client. -type ConfigState struct { - Product string - ID string - Version uint64 - ApplyStatus ApplyStatus -} - -// CachedFile describes a cached file stored by the agent client -// -// Note: You may be wondering why this exists when `ConfigState` exists -// as well. The API for requesting updates does not mandate that a client -// cache config files. This implementation just happens to do so. -type CachedFile struct { - Path string - Length uint64 - Hashes map[string][]byte -} - -// An Update contains all the data needed to update a client's remote config repository state -type Update struct { - // TUFRoots contains, in order, updated roots that this repository needs to keep up with TUF validation - TUFRoots [][]byte - // TUFTargets is the latest TUF Targets file and is used to validate raw config files - TUFTargets []byte - // TargetFiles stores the raw config files by their full TUF path - TargetFiles map[string][]byte - // ClientcConfigs is a list of TUF path's corresponding to config files designated for this repository - ClientConfigs []string -} - -// isEmpty returns whether or not all the fields of `Update` are empty -func (u *Update) isEmpty() bool { - return len(u.TUFRoots) == 0 && len(u.TUFTargets) == 0 && len(u.TargetFiles) == 0 && len(u.ClientConfigs) == 0 -} - -// Repository is a remote config client used in a downstream process to retrieve -// remote config updates from an Agent. -type Repository struct { - // TUF related data - latestTargets *data.Targets - tufRootsClient *tufRootsClient - opaqueBackendState []byte - - // Unverified mode - tufVerificationEnabled bool - latestRootVersion int64 - - // Config file storage - metadata sync.Map // map[string]Metadata - configs map[string]map[string]interface{} -} - -// NewRepository creates a new remote config repository that will track -// both TUF metadata and raw config files for a client. -func NewRepository(embeddedRoot []byte) (*Repository, error) { - if embeddedRoot == nil { - return nil, ErrMalformedEmbeddedRoot - } - - configs := make(map[string]map[string]interface{}) - for product := range validProducts { - configs[product] = make(map[string]interface{}) - } - - tufRootsClient, err := newTufRootsClient(embeddedRoot) - if err != nil { - return nil, err - } - - return &Repository{ - latestTargets: data.NewTargets(), - tufRootsClient: tufRootsClient, - metadata: sync.Map{}, - configs: configs, - tufVerificationEnabled: true, - }, nil -} - -// NewUnverifiedRepository creates a new remote config repository that will -// track config files for a client WITHOUT verifying any TUF related metadata. -// -// When creating this we pretend we have a root version of 1, as the backend expects -// to not have to send the initial "embedded" root. -func NewUnverifiedRepository() (*Repository, error) { - configs := make(map[string]map[string]interface{}) - for product := range validProducts { - configs[product] = make(map[string]interface{}) - } - - return &Repository{ - latestTargets: data.NewTargets(), - metadata: sync.Map{}, - configs: configs, - tufVerificationEnabled: false, - latestRootVersion: 1, // The backend expects us to start with a root version of 1. - }, nil -} - -// Update processes the ClientGetConfigsResponse from the Agent and updates the -// configuration state -func (r *Repository) Update(update Update) ([]string, error) { - var err error - var updatedTargets *data.Targets - var tmpRootClient *tufRootsClient - - // If there's literally nothing in the update, it's not an error. - if update.isEmpty() { - return []string{}, nil - } - - // TUF: Update the roots and verify the TUF Targets file (optional) - // - // We don't want to partially update the state, so we need a temporary client to hold the new root - // data until we know it's valid. Since verification is optional, if the repository was configured - // to not do TUF verification we only deserialize the TUF targets file. - if r.tufVerificationEnabled { - tmpRootClient, err = r.tufRootsClient.clone() - if err != nil { - return nil, err - } - err = tmpRootClient.updateRoots(update.TUFRoots) - if err != nil { - return nil, err - } - - updatedTargets, err = tmpRootClient.validateTargets(update.TUFTargets) - if err != nil { - return nil, err - } - } else { - updatedTargets, err = unsafeUnmarshalTargets(update.TUFTargets) - if err != nil { - return nil, err - } - } - - clientConfigsMap := make(map[string]struct{}) - for _, f := range update.ClientConfigs { - clientConfigsMap[f] = struct{}{} - } - - result := newUpdateResult() - - // 2: Check the config list and mark any missing configs as "to be removed" - for _, configs := range r.configs { - for path := range configs { - if _, ok := clientConfigsMap[path]; !ok { - result.removed = append(result.removed, path) - parsedPath, err := parseConfigPath(path) - if err != nil { - return nil, err - } - result.productsUpdated[parsedPath.Product] = true - } - } - } - - // 3: For all the files referenced in this update - for _, path := range update.ClientConfigs { - targetFileMetadata, ok := updatedTargets.Targets[path] - if !ok { - return nil, fmt.Errorf("missing config file in TUF targets - %s", path) - } - - // 3.a: Extract the product and ID from the path - parsedPath, err := parseConfigPath(path) - if err != nil { - return nil, err - } - - // 3.b and 3.c: Check if this configuration is either new or has been modified - storedMetadata, exists := r.metadata.Load(path) - if exists { - m, ok := storedMetadata.(Metadata) - if ok && hashesEqual(targetFileMetadata.Hashes, m.Hashes) { - continue - } - } - - // 3.d: Ensure that the raw configuration file is present in the - // update payload. - raw, ok := update.TargetFiles[path] - if !ok { - return nil, fmt.Errorf("missing update file - %s", path) - } - - // TUF: Validate the hash of the raw target file and ensure that it matches - // the TUF metadata - err = validateTargetFileHash(targetFileMetadata, raw) - if err != nil { - return nil, fmt.Errorf("error validating %s hash with TUF metadata - %v", path, err) - } - - // 3.e: Deserialize the configuration. - // 3.f: Store the update details for application later - // - // Note: We don't have to worry about extra fields as mentioned - // in the RFC because the encoding/json library handles that for us. - m, err := newConfigMetadata(parsedPath, targetFileMetadata) - if err != nil { - return nil, err - } - config, err := parseConfig(parsedPath.Product, raw, m) - if err != nil { - return nil, err - } - result.metadata[path] = m - result.changed[parsedPath.Product][path] = config - result.productsUpdated[parsedPath.Product] = true - } - - // 4.a: Store the new targets.signed.custom.opaque_client_state - // TUF: Store the updated roots now that everything has validated - if r.tufVerificationEnabled { - r.tufRootsClient = tmpRootClient - } else if len(update.TUFRoots) > 0 { - v, err := extractRootVersion(update.TUFRoots[len(update.TUFRoots)-1]) - if err != nil { - return nil, err - } - r.latestRootVersion = v - } - r.latestTargets = updatedTargets - if r.latestTargets.Custom != nil { - r.opaqueBackendState = extractOpaqueBackendState(*r.latestTargets.Custom) - } - - // Upstream may not want to take any actions if the update result doesn't - // change any configs. - if result.isEmpty() { - return nil, nil - } - - changedProducts := make([]string, 0) - for product, updated := range result.productsUpdated { - if updated { - changedProducts = append(changedProducts, product) - } - } - - // 4.b/4.rave the new state and apply cleanups - r.applyUpdateResult(update, result) - - return changedProducts, nil -} - -// UpdateApplyStatus updates the config's metadata to reflect its processing state -// Can be used after a call to Update() in order to tell the repository which config was acked, which -// wasn't and which errors occurred while processing. -// Note: it is the responsibility of the caller to ensure that no new Update() call was made between -// the first Update() call and the call to UpdateApplyStatus() so as to keep the repository state accurate. -func (r *Repository) UpdateApplyStatus(cfgPath string, status ApplyStatus) { - if val, ok := r.metadata.Load(cfgPath); ok { - if m, ok := val.(Metadata); ok { - m.ApplyStatus = status - r.metadata.Store(cfgPath, m) - } - } -} - -func (r *Repository) getConfigs(product string) map[string]interface{} { - configs, ok := r.configs[product] - if !ok { - return nil - } - - return configs -} - -// applyUpdateResult changes the state of the client based on the given update. -// -// The update is guaranteed to succeed at this point, having been vetted and the details -// needed to apply the update stored in the `updateResult`. -func (r *Repository) applyUpdateResult(_ Update, result updateResult) { - // 4.b Save all the updated and new config files - for product, configs := range result.changed { - for path, config := range configs { - m := r.configs[product] - m[path] = config - } - } - for path, metadata := range result.metadata { - r.metadata.Store(path, metadata) - } - - // 5.b Clean up the cache of any removed configs - for _, path := range result.removed { - r.metadata.Delete(path) - for _, configs := range r.configs { - delete(configs, path) - } - } -} - -// CurrentState returns all of the information needed to -// make an update for new configurations. -func (r *Repository) CurrentState() (RepositoryState, error) { - var configs []ConfigState - var cached []CachedFile - - r.metadata.Range(func(path, value any) bool { - metadata, ok := value.(Metadata) - if ok { - configs = append(configs, configStateFromMetadata(metadata)) - cached = append(cached, cachedFileFromMetadata(path.(string), metadata)) - } else { - // Log the error but continue processing the rest of the configs - log.Printf("Failed to convert metadata for %s", path) - } - return true - }) - - var latestRootVersion int64 - if r.tufVerificationEnabled { - root, err := r.tufRootsClient.latestRoot() - if err != nil { - return RepositoryState{}, err - } - latestRootVersion = root.Version - } else { - latestRootVersion = r.latestRootVersion - } - - return RepositoryState{ - Configs: configs, - CachedFiles: cached, - TargetsVersion: r.latestTargets.Version, - RootsVersion: latestRootVersion, - OpaqueBackendState: r.opaqueBackendState, - }, nil -} - -// An updateResult allows the client to apply the update as a transaction -// after validating all required preconditions -type updateResult struct { - removed []string - metadata map[string]Metadata - changed map[string]map[string]interface{} - productsUpdated map[string]bool -} - -func newUpdateResult() updateResult { - changed := make(map[string]map[string]interface{}) - - for product := range validProducts { - changed[product] = make(map[string]interface{}) - } - - return updateResult{ - removed: make([]string, 0), - metadata: make(map[string]Metadata), - changed: changed, - productsUpdated: map[string]bool{}, - } -} - -func (ur updateResult) Log() { - log.Printf("Removed Configs: %v", ur.removed) - - var b strings.Builder - b.WriteString("Changed configs: [") - for path := range ur.metadata { - b.WriteString(path) - b.WriteString(" ") - } - b.WriteString("]") - - log.Println(b.String()) -} - -func (ur updateResult) isEmpty() bool { - return len(ur.removed) == 0 && len(ur.metadata) == 0 -} - -func configStateFromMetadata(m Metadata) ConfigState { - return ConfigState{ - Product: m.Product, - ID: m.ID, - Version: m.Version, - ApplyStatus: m.ApplyStatus, - } -} - -func cachedFileFromMetadata(path string, m Metadata) CachedFile { - return CachedFile{ - Path: path, - Length: m.RawLength, - Hashes: m.Hashes, - } -} - -// hashesEqual checks if the hash values in the TUF metadata file match the stored -// hash values for a given config -func hashesEqual(tufHashes data.Hashes, storedHashes map[string][]byte) bool { - for algorithm, value := range tufHashes { - v, ok := storedHashes[algorithm] - if !ok { - continue - } - - if !bytes.Equal(value, v) { - return false - } - } - - return true -} - -func extractOpaqueBackendState(targetsCustom []byte) []byte { - state := struct { - State []byte `json:"opaque_backend_state"` - }{nil} - - err := json.Unmarshal(targetsCustom, &state) - if err != nil { - return []byte{} - } - - return state.State -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/tuf.go b/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/tuf.go deleted file mode 100644 index f67ab9c198..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/remoteconfig/state/tuf.go +++ /dev/null @@ -1,233 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package state - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "strconv" - "strings" - - "github.com/DataDog/go-tuf/client" - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/util" - "github.com/DataDog/go-tuf/verify" -) - -type tufRootsClient struct { - rootClient *client.Client - rootLocalStore client.LocalStore - rootRemoteStore *rootClientRemoteStore -} - -func newTufRootsClient(root []byte) (*tufRootsClient, error) { - rootLocalStore := client.MemoryLocalStore() - rootRemoteStore := &rootClientRemoteStore{} - rootClient := client.NewClient(rootLocalStore, rootRemoteStore) - - err := rootClient.Init(root) - if err != nil { - return nil, err - } - - return &tufRootsClient{ - rootClient: rootClient, - rootLocalStore: rootLocalStore, - rootRemoteStore: rootRemoteStore, - }, nil -} - -func (trc *tufRootsClient) clone() (*tufRootsClient, error) { - root, err := trc.latestRootRaw() - if err != nil { - return nil, err - } - - return newTufRootsClient(root) -} - -func (trc *tufRootsClient) updateRoots(newRoots [][]byte) error { - if len(newRoots) == 0 { - return nil - } - - trc.rootRemoteStore.roots = append(trc.rootRemoteStore.roots, newRoots...) - - return trc.rootClient.UpdateRoots() -} - -func (trc *tufRootsClient) latestRoot() (*data.Root, error) { - raw, err := trc.latestRootRaw() - if err != nil { - return nil, err - } - - return unsafeUnmarshalRoot(raw) -} - -func (trc *tufRootsClient) latestRootRaw() ([]byte, error) { - metas, err := trc.rootLocalStore.GetMeta() - if err != nil { - return nil, err - } - rawRoot := metas["root.json"] - - return rawRoot, nil -} - -func (trc *tufRootsClient) validateTargets(rawTargets []byte) (*data.Targets, error) { - root, err := trc.latestRoot() - if err != nil { - return nil, err - } - - db := verify.NewDB() - for _, key := range root.Keys { - for _, id := range key.IDs() { - if err := db.AddKey(id, key); err != nil { - return nil, err - } - } - } - targetsRole, hasRoleTargets := root.Roles["targets"] - if !hasRoleTargets { - return nil, fmt.Errorf("root is missing a targets role") - } - role := &data.Role{Threshold: targetsRole.Threshold, KeyIDs: targetsRole.KeyIDs} - if err := db.AddRole("targets", role); err != nil { - return nil, fmt.Errorf("could not add targets role to db: %v", err) - } - var targets data.Targets - err = db.Unmarshal(rawTargets, &targets, "targets", 0) - if err != nil { - return nil, err - } - - return &targets, nil -} - -type rootClientRemoteStore struct { - roots [][]byte -} - -func (s *rootClientRemoteStore) GetMeta(name string) (stream io.ReadCloser, size int64, err error) { - metaPath, err := parseMetaPath(name) - if err != nil { - return nil, 0, err - } - if metaPath.role != roleRoot || !metaPath.versionSet { - return nil, 0, client.ErrNotFound{File: name} - } - for _, root := range s.roots { - parsedRoot, err := unsafeUnmarshalRoot(root) - if err != nil { - return nil, 0, err - } - if parsedRoot.Version == metaPath.version { - return io.NopCloser(bytes.NewReader(root)), int64(len(root)), nil - } - } - return nil, 0, client.ErrNotFound{File: name} -} - -func (s *rootClientRemoteStore) GetTarget(path string) (stream io.ReadCloser, size int64, err error) { - return nil, 0, client.ErrNotFound{File: path} -} - -type role string - -const ( - roleRoot role = "root" -) - -type metaPath struct { - role role - version int64 - versionSet bool -} - -func parseMetaPath(rawMetaPath string) (metaPath, error) { - splitRawMetaPath := strings.SplitN(rawMetaPath, ".", 3) - if len(splitRawMetaPath) != 2 && len(splitRawMetaPath) != 3 { - return metaPath{}, fmt.Errorf("invalid metadata path '%s'", rawMetaPath) - } - suffix := splitRawMetaPath[len(splitRawMetaPath)-1] - if suffix != "json" { - return metaPath{}, fmt.Errorf("invalid metadata path (suffix) '%s'", rawMetaPath) - } - rawRole := splitRawMetaPath[len(splitRawMetaPath)-2] - if rawRole == "" { - return metaPath{}, fmt.Errorf("invalid metadata path (role) '%s'", rawMetaPath) - } - if len(splitRawMetaPath) == 2 { - return metaPath{ - role: role(rawRole), - }, nil - } - rawVersion, err := strconv.ParseInt(splitRawMetaPath[0], 10, 64) - if err != nil { - return metaPath{}, fmt.Errorf("invalid metadata path (version) '%s': %w", rawMetaPath, err) - } - return metaPath{ - role: role(rawRole), - version: rawVersion, - versionSet: true, - }, nil -} - -func validateTargetFileHash(targetMeta data.TargetFileMeta, targetFile []byte) error { - if len(targetMeta.HashAlgorithms()) == 0 { - return fmt.Errorf("target file has no hash") - } - generatedMeta, err := util.GenerateFileMeta(bytes.NewBuffer(targetFile), targetMeta.HashAlgorithms()...) - if err != nil { - return err - } - err = util.FileMetaEqual(targetMeta.FileMeta, generatedMeta) - if err != nil { - return err - } - return nil -} - -func unsafeUnmarshalRoot(raw []byte) (*data.Root, error) { - var signedRoot data.Signed - err := json.Unmarshal(raw, &signedRoot) - if err != nil { - return nil, err - } - var root data.Root - err = json.Unmarshal(signedRoot.Signed, &root) - if err != nil { - return nil, err - } - return &root, err -} - -func unsafeUnmarshalTargets(raw []byte) (*data.Targets, error) { - var signedTargets data.Signed - err := json.Unmarshal(raw, &signedTargets) - if err != nil { - return nil, err - } - var targets data.Targets - err = json.Unmarshal(signedTargets.Signed, &targets) - if err != nil { - return nil, err - } - return &targets, err -} - -func extractRootVersion(raw []byte) (int64, error) { - root, err := unsafeUnmarshalRoot(raw) - if err != nil { - return 0, err - } - - return root.Version, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/trace/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/trace/config/client.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/client.go deleted file mode 100644 index b46de4fafb..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/client.go +++ /dev/null @@ -1,70 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package config contains the configuration for the trace-agent. -package config - -import ( - "net/http" - "sync" - "time" -) - -// TODO(gbbr): Perhaps this is not the best place for this structure. - -// ResetClient wraps (http.Client).Do and resets the underlying connections at the -// configured interval -type ResetClient struct { - httpClientFactory func() *http.Client - resetInterval time.Duration - - mu sync.RWMutex - httpClient *http.Client - lastReset time.Time -} - -// NewResetClient returns an initialized Client resetting connections at the passed resetInterval ("0" -// means that no reset is performed). -// The underlying http.Client used will be created using the passed http client factory. -func NewResetClient(resetInterval time.Duration, httpClientFactory func() *http.Client) *ResetClient { - return &ResetClient{ - httpClientFactory: httpClientFactory, - resetInterval: resetInterval, - httpClient: httpClientFactory(), - lastReset: time.Now(), - } -} - -// Do wraps (http.Client).Do. Thread safe. -func (c *ResetClient) Do(req *http.Request) (*http.Response, error) { - c.checkReset() - - c.mu.RLock() - httpClient := c.httpClient - c.mu.RUnlock() - - return httpClient.Do(req) -} - -// checkReset checks whether a client reset should be performed, and performs it -// if so -func (c *ResetClient) checkReset() { - if c.resetInterval == 0 { - return - } - - c.mu.Lock() - defer c.mu.Unlock() - if time.Since(c.lastReset) < c.resetInterval { - return - } - - c.lastReset = time.Now() - // Close idle connections on underlying client. Safe to do while other goroutines use the client. - // This is a best effort: if other goroutine(s) are currently using the client, - // the related open connection(s) will remain open until the client is GC'ed - c.httpClient.CloseIdleConnections() - c.httpClient = c.httpClientFactory() -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go deleted file mode 100644 index ec02f066e3..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/config.go +++ /dev/null @@ -1,728 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package config - -import ( - "crypto/tls" - "errors" - "net" - "net/http" - "net/url" - "os" - "regexp" - "time" - - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" - - "github.com/DataDog/datadog-agent/comp/core/tagger/origindetection" - "github.com/DataDog/datadog-agent/pkg/obfuscate" - "github.com/DataDog/datadog-agent/pkg/remoteconfig/state" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -// ServiceName specifies the service name used in the operating system. -const ServiceName = "datadog-trace-agent" - -// ErrMissingAPIKey is returned when the config could not be validated due to missing API key. -var ErrMissingAPIKey = errors.New("you must specify an API Key, either via a configuration file or the DD_API_KEY env var") - -// Endpoint specifies an endpoint that the trace agent will write data (traces, stats & services) to. -type Endpoint struct { - APIKey string `json:"-"` // never marshal this - Host string - - // NoProxy will be set to true when the proxy setting for the trace API endpoint - // needs to be ignored (e.g. it is part of the "no_proxy" list in the yaml settings). - NoProxy bool - - // IsMRF determines whether this is a Multi-Region Failover endpoint. - IsMRF bool `mapstructure:"-" json:"-"` -} - -// TelemetryEndpointPrefix specifies the prefix of the telemetry endpoint URL. -const TelemetryEndpointPrefix = "https://instrumentation-telemetry-intake." - -// OTLP holds the configuration for the OpenTelemetry receiver. -type OTLP struct { - // BindHost specifies the host to bind the receiver to. - BindHost string `mapstructure:"-"` - - // GRPCPort specifies the port to use for the plain HTTP receiver. - // If unset (or 0), the receiver will be off. - GRPCPort int `mapstructure:"grpc_port"` - - // SpanNameRemappings is the map of datadog span names and preferred name to map to. This can be used to - // automatically map Datadog Span Operation Names to an updated value. All entries should be key/value pairs. - SpanNameRemappings map[string]string `mapstructure:"span_name_remappings"` - - // SpanNameAsResourceName specifies whether the OpenTelemetry span's name should be - // used as the Datadog span's operation name. By default (when this is false), the - // operation name is deduced from a combination between the instrumentation scope - // name and the span kind. - // - // For context, the OpenTelemetry 'Span Name' is equivalent to the Datadog 'resource name'. - // The Datadog Span's Operation Name equivalent in OpenTelemetry does not exist, but the span's - // kind comes close. - SpanNameAsResourceName bool `mapstructure:"span_name_as_resource_name"` - - // MaxRequestBytes specifies the maximum number of bytes that will be read - // from an incoming HTTP request. - MaxRequestBytes int64 `mapstructure:"-"` - - // ProbabilisticSampling specifies the percentage of traces to ingest. Exceptions are made for errors - // and rare traces (outliers) if "RareSamplerEnabled" is true. Invalid values are equivalent to 100. - // If spans have the "sampling.priority" attribute set, probabilistic sampling is skipped and the user's - // decision is followed. - ProbabilisticSampling float64 - - // AttributesTranslator specifies an OTLP to Datadog attributes translator. - AttributesTranslator *attributes.Translator `mapstructure:"-"` - - // IgnoreMissingDatadogFields specifies whether we should recompute DD span fields if the corresponding "datadog." - // namespaced span attributes are missing. If it is false (default), we will use the incoming "datadog." namespaced - // OTLP span attributes to construct the DD span, and if they are missing, we will recompute them from the other - // OTLP semantic convention attributes. If it is true, we will only populate a field if its associated "datadog." - // OTLP span attribute exists, otherwise we will leave it empty. - IgnoreMissingDatadogFields bool `mapstructure:"ignore_missing_datadog_fields"` - - // GrpcMaxRecvMsgSizeMib specifies the max receive message size (in Mib) in OTLP receiver gRPC server in the trace agent binary. - // This config only applies to Agent OTLP ingestion. It does not apply to OSS Datadog exporter/connector or DDOT. - GrpcMaxRecvMsgSizeMib int `mapstructure:"-"` -} - -// ObfuscationConfig holds the configuration for obfuscating sensitive data -// for various span types. -type ObfuscationConfig struct { - // ES holds the obfuscation configuration for ElasticSearch bodies. - ES obfuscate.JSONConfig `mapstructure:"elasticsearch"` - - // OpenSearch holds the obfuscation configuration for OpenSearch bodies. - OpenSearch obfuscate.JSONConfig `mapstructure:"opensearch"` - - // Mongo holds the obfuscation configuration for MongoDB queries. - Mongo obfuscate.JSONConfig `mapstructure:"mongodb"` - - // SQLExecPlan holds the obfuscation configuration for SQL Exec Plans. This is strictly for safety related obfuscation, - // not normalization. Normalization of exec plans is configured in SQLExecPlanNormalize. - SQLExecPlan obfuscate.JSONConfig `mapstructure:"sql_exec_plan"` - - // SQLExecPlanNormalize holds the normalization configuration for SQL Exec Plans. - SQLExecPlanNormalize obfuscate.JSONConfig `mapstructure:"sql_exec_plan_normalize"` - - // HTTP holds the obfuscation settings for HTTP URLs. - HTTP obfuscate.HTTPConfig `mapstructure:"http"` - - // RemoveStackTraces specifies whether stack traces should be removed. - // More specifically "error.stack" tag values will be cleared. - RemoveStackTraces bool `mapstructure:"remove_stack_traces"` - - // Redis holds the configuration for obfuscating the "redis.raw_command" tag - // for spans of type "redis". - Redis obfuscate.RedisConfig `mapstructure:"redis"` - - // Valkey holds the configuration for obfuscating the "valkey.raw_command" tag - // for spans of type "valkey". - Valkey obfuscate.ValkeyConfig `mapstructure:"valkey"` - - // Memcached holds the configuration for obfuscating the "memcached.command" tag - // for spans of type "memcached". - Memcached obfuscate.MemcachedConfig `mapstructure:"memcached"` - - // CreditCards holds the configuration for obfuscating credit cards. - CreditCards obfuscate.CreditCardsConfig `mapstructure:"credit_cards"` - - // Cache holds the configuration for caching obfuscation results. - Cache obfuscate.CacheConfig `mapstructure:"cache"` -} - -func obfuscationMode(conf *AgentConfig, sqllexerEnabled bool) obfuscate.ObfuscationMode { - if conf.SQLObfuscationMode != "" { - if conf.SQLObfuscationMode == string(obfuscate.ObfuscateOnly) || conf.SQLObfuscationMode == string(obfuscate.ObfuscateAndNormalize) { - return obfuscate.ObfuscationMode(conf.SQLObfuscationMode) - } - log.Warnf("Invalid SQL obfuscator mode %s, falling back to default", conf.SQLObfuscationMode) - return "" - } - if sqllexerEnabled { - return obfuscate.ObfuscateOnly - } - return "" -} - -// Export returns an obfuscate.Config matching o. -func (o *ObfuscationConfig) Export(conf *AgentConfig) obfuscate.Config { - return obfuscate.Config{ - SQL: obfuscate.SQLConfig{ - TableNames: conf.HasFeature("table_names"), - ReplaceDigits: conf.HasFeature("quantize_sql_tables") || conf.HasFeature("replace_sql_digits"), - KeepSQLAlias: conf.HasFeature("keep_sql_alias"), - DollarQuotedFunc: conf.HasFeature("dollar_quoted_func"), - ObfuscationMode: obfuscationMode(conf, conf.HasFeature("sqllexer")), - }, - ES: o.ES, - OpenSearch: o.OpenSearch, - Mongo: o.Mongo, - SQLExecPlan: o.SQLExecPlan, - SQLExecPlanNormalize: o.SQLExecPlanNormalize, - HTTP: o.HTTP, - Redis: o.Redis, - Valkey: o.Valkey, - Memcached: o.Memcached, - CreditCard: o.CreditCards, - Logger: new(debugLogger), - Cache: o.Cache, - } -} - -type debugLogger struct{} - -func (debugLogger) Debugf(format string, params ...interface{}) { - log.Debugf(format, params...) -} - -// Enablable can represent any option that has an "enabled" boolean sub-field. -type Enablable struct { - Enabled bool `mapstructure:"enabled"` -} - -// TelemetryConfig holds Instrumentation telemetry Endpoints information -type TelemetryConfig struct { - Enabled bool `mapstructure:"enabled"` - Endpoints []*Endpoint -} - -// ReplaceRule specifies a replace rule. -type ReplaceRule struct { - // Name specifies the name of the tag that the replace rule addresses. However, - // some exceptions apply such as: - // • "resource.name" will target the resource - // • "*" will target all tags and the resource - Name string `mapstructure:"name"` - - // Pattern specifies the regexp pattern to be used when replacing. It must compile. - Pattern string `mapstructure:"pattern"` - - // Re holds the compiled Pattern and is only used internally. - Re *regexp.Regexp `mapstructure:"-"` - - // Repl specifies the replacement string to be used when Pattern matches. - Repl string `mapstructure:"repl"` -} - -// WriterConfig specifies configuration for an API writer. -type WriterConfig struct { - // ConnectionLimit specifies the maximum number of concurrent outgoing - // connections allowed for the sender. - ConnectionLimit int `mapstructure:"connection_limit"` - - // QueueSize specifies the maximum number or payloads allowed to be queued - // in the sender. - QueueSize int `mapstructure:"queue_size"` - - // FlushPeriodSeconds specifies the frequency at which the writer's buffer - // will be flushed to the sender, in seconds. Fractions are permitted. - FlushPeriodSeconds float64 `mapstructure:"flush_period_seconds"` -} - -// FargateOrchestratorName is a Fargate orchestrator name. -type FargateOrchestratorName string - -const ( - // OrchestratorECS represents AWS ECS - OrchestratorECS FargateOrchestratorName = "ECS" - // OrchestratorEKS represents AWS EKS - OrchestratorEKS FargateOrchestratorName = "EKS" - // OrchestratorUnknown is used when we cannot retrieve the orchestrator - OrchestratorUnknown FargateOrchestratorName = "Unknown" -) - -// ProfilingProxyConfig ... -type ProfilingProxyConfig struct { - // DDURL ... - DDURL string - // AdditionalEndpoints ... - AdditionalEndpoints map[string][]string -} - -// EVPProxy contains the settings for the EVPProxy proxy. -type EVPProxy struct { - // Enabled reports whether EVPProxy is enabled (true by default). - Enabled bool - // DDURL is the Datadog site to forward payloads to (defaults to the Site setting if not set). - DDURL string - // APIKey is the main API Key (defaults to the main API key). - APIKey string `json:"-"` // Never marshal this field - // ApplicationKey to be used for requests with the X-Datadog-NeedsAppKey set (defaults to the top-level Application Key). - ApplicationKey string `json:"-"` // Never marshal this field - // AdditionalEndpoints is a map of additional Datadog sites to API keys. - AdditionalEndpoints map[string][]string - // MaxPayloadSize indicates the size at which payloads will be rejected, in bytes. - MaxPayloadSize int64 - // ReceiverTimeout indicates the maximum time an EVPProxy request can take. Value in seconds. - ReceiverTimeout int -} - -// OpenLineageProxy contains the settings for the OpenLineageProxy proxy. -type OpenLineageProxy struct { - // Enabled reports whether OpenLineageProxy is enabled (true by default). - Enabled bool - // DDURL is the Datadog site to forward payloads to (defaults to the Site setting if not set). - DDURL string - // APIKey is the main API Key (defaults to the main API key). - APIKey string `json:"-"` // Never marshal this field - // AdditionalEndpoints is a map of additional Datadog sites to API keys. - AdditionalEndpoints map[string][]string - // APIVersion indicates what version the OpenLineageProxy uses for the DO-intake API. - APIVersion int -} - -// InstallSignatureConfig contains the information on how the agent was installed -// and a unique identifier that distinguishes this agent from others. -type InstallSignatureConfig struct { - Found bool `json:"-"` - InstallID string `json:"install_id"` - InstallType string `json:"install_type"` - InstallTime int64 `json:"install_time"` -} - -// DebuggerProxyConfig ... -type DebuggerProxyConfig struct { - // DDURL ... - DDURL string - // APIKey ... - APIKey string `json:"-"` // Never marshal this field - // AdditionalEndpoints is a map of additional Datadog sites to API keys. - AdditionalEndpoints map[string][]string `json:"-"` // Never marshal this field -} - -// SymDBProxyConfig ... -type SymDBProxyConfig struct { - // DDURL ... - DDURL string - // APIKey ... - APIKey string `json:"-"` // Never marshal this field - // AdditionalEndpoints is a map of additional Datadog endpoints to API keys. - AdditionalEndpoints map[string][]string `json:"-"` // Never marshal this field -} - -// AgentConfig handles the interpretation of the configuration (with default -// behaviors) in one place. It is also a simple structure to share across all -// the Agent components, with 100% safe and reliable values. -// It is exposed with expvar, so make sure to exclude any sensible field -// from JSON encoding. Use New() to create an instance. -type AgentConfig struct { - Features map[string]struct{} - - Enabled bool - AgentVersion string - GitCommit string - Site string // the intake site to use (e.g. "datadoghq.com") - - // FargateOrchestrator specifies the name of the Fargate orchestrator. e.g. "ECS", "EKS", "Unknown" - FargateOrchestrator FargateOrchestratorName - - // Global - Hostname string - DefaultEnv string // the traces will default to this environment - ConfigPath string // the source of this config, if any - - // Endpoints specifies the set of hosts and API keys where traces and stats - // will be uploaded to. The first endpoint is the main configuration endpoint; - // any following ones are read from the 'additional_endpoints' parts of the - // configuration file, if present. - Endpoints []*Endpoint - - // Concentrator - BucketInterval time.Duration // the size of our pre-aggregation per bucket - ExtraAggregators []string // DEPRECATED - PeerTagsAggregation bool // enables/disables stats aggregation for peer entity tags, used by Concentrator and ClientStatsAggregator - ComputeStatsBySpanKind bool // enables/disables the computing of stats based on a span's `span.kind` field - PeerTags []string // additional tags to use for peer entity stats aggregation - - // Sampler configuration - ExtraSampleRate float64 - TargetTPS float64 - ErrorTPS float64 - MaxEPS float64 - MaxRemoteTPS float64 - - // Rare Sampler configuration - RareSamplerEnabled bool - RareSamplerTPS int - RareSamplerCooldownPeriod time.Duration - RareSamplerCardinality int - - // Probabilistic Sampler configuration - ProbabilisticSamplerEnabled bool - ProbabilisticSamplerHashSeed uint32 - ProbabilisticSamplerSamplingPercentage float32 - - // Error Tracking Standalone - ErrorTrackingStandalone bool - - // Receiver - ReceiverEnabled bool // specifies whether Receiver listeners are enabled. Unless OTLPReceiver is used, this should always be true. - ReceiverHost string - ReceiverPort int - ReceiverSocket string // if not empty, UDS will be enabled on unix:// - ConnectionLimit int // for rate-limiting, how many unique connections to allow in a lease period (30s) - ReceiverTimeout int - MaxRequestBytes int64 // specifies the maximum allowed request size for incoming trace payloads - TraceBuffer int // specifies the number of traces to buffer before blocking. - Decoders int // specifies the number of traces that can be concurrently decoded. - MaxConnections int // specifies the maximum number of concurrent incoming connections allowed. - DecoderTimeout int // specifies the maximum time in milliseconds that the decoders will wait for a turn to accept a payload before returning 429 - - WindowsPipeName string - PipeBufferSize int - PipeSecurityDescriptor string - - GUIPort string // the port of the Datadog Agent GUI (for control access) - - // Writers - SynchronousFlushing bool // Mode where traces are only submitted when FlushAsync is called, used for Serverless Extension - StatsWriter *WriterConfig - TraceWriter *WriterConfig - ConnectionResetInterval time.Duration // frequency at which outgoing connections are reset. 0 means no reset is performed - // MaxSenderRetries is the maximum number of retries that a sender will perform - // before giving up. Note that the sender may not perform all MaxSenderRetries if - // the agent is under load and the outgoing payload queue is full. In that - // case, the sender will drop failed payloads when it is unable to enqueue - // them for another retry. - MaxSenderRetries int - // HTTP client used in writer connections. If nil, default client values will be used. - HTTPClientFunc func() *http.Client `json:"-"` - // HTTP Transport used in writer connections. If nil, default transport values will be used. - HTTPTransportFunc func() *http.Transport `json:"-"` - - // internal telemetry - StatsdEnabled bool - StatsdHost string - StatsdPort int - StatsdPipeName string // for Windows Pipes - StatsdSocket string // for UDS Sockets - - // logging - LogFilePath string - - // watchdog - MaxMemory float64 // MaxMemory is the threshold (bytes allocated) above which program panics and exits, to be restarted - MaxCPU float64 // MaxCPU is the max UserAvg CPU the program should consume - WatchdogInterval time.Duration // WatchdogInterval is the delay between 2 watchdog checks - - // http/s proxying - ProxyURL *url.URL - SkipSSLValidation bool - - // filtering - Ignore map[string][]string - - // ReplaceTags is used to filter out sensitive information from tag values. - // It maps tag keys to a set of replacements. Only supported in A6. - ReplaceTags []*ReplaceRule - - // GlobalTags list metadata that will be added to all spans - GlobalTags map[string]string - - // transaction analytics - AnalyzedRateByServiceLegacy map[string]float64 - AnalyzedSpansByService map[string]map[string]float64 - - // infrastructure agent binary - DDAgentBin string - - // Obfuscation holds sensitive data obufscator's configuration. - Obfuscation *ObfuscationConfig - - // SQLObfuscationMode holds obfuscator mode. - SQLObfuscationMode string - - // MaxResourceLen the maximum length the resource can have - MaxResourceLen int - - // RequireTags specifies a list of tags which must be present on the root span in order for a trace to be accepted. - RequireTags []*Tag - - // RejectTags specifies a list of tags which must be absent on the root span in order for a trace to be accepted. - RejectTags []*Tag - - // RequireTagsRegex specifies a list of regexp for tags which must be present on the root span in order for a trace to be accepted. - RequireTagsRegex []*TagRegex - - // RejectTagsRegex specifies a list of regexp for tags which must be absent on the root span in order for a trace to be accepted. - RejectTagsRegex []*TagRegex - - // OTLPReceiver holds the configuration for OpenTelemetry receiver. - OTLPReceiver *OTLP - - // ProfilingProxy specifies settings for the profiling proxy. - ProfilingProxy ProfilingProxyConfig - - // Telemetry settings - TelemetryConfig *TelemetryConfig - - // EVPProxy contains the settings for the EVPProxy proxy. - EVPProxy EVPProxy - - // OpenLineageProxy contains the settings for the OpenLineageProxy proxy; - OpenLineageProxy OpenLineageProxy - - // DebuggerProxy contains the settings for the Live Debugger proxy. - DebuggerProxy DebuggerProxyConfig - - // DebuggerDiagnosticsProxy contains the settings for the Live Debugger diagnostics proxy. - DebuggerDiagnosticsProxy DebuggerProxyConfig - - // SymDBProxy contains the settings for the Symbol Database proxy. - SymDBProxy SymDBProxyConfig - - // Proxy specifies a function to return a proxy for a given Request. - // See (net/http.Transport).Proxy for more details. - Proxy func(*http.Request) (*url.URL, error) `json:"-"` - - // MaxCatalogEntries specifies the maximum number of services to be added to the priority sampler's - // catalog. If not set (0) it will default to 5000. - MaxCatalogEntries int - - // RemoteConfigClient retrieves sampling updates from the remote config backend - RemoteConfigClient RemoteClient `json:"-"` - - // ContainerTags ... - ContainerTags func(cid string) ([]string, error) `json:"-"` - - // ContainerIDFromOriginInfo ... - ContainerIDFromOriginInfo func(originInfo origindetection.OriginInfo) (string, error) `json:"-"` - - // ContainerProcRoot is the root dir for `proc` info - ContainerProcRoot string - - // DebugServerPort defines the port used by the debug server - DebugServerPort int - - // Install Signature - InstallSignature InstallSignatureConfig - - // Lambda function name - LambdaFunctionName string - - // Azure container apps tags, in the form of a comma-separated list of - // key-value pairs, starting with a comma - AzureContainerAppTags string - - // GetAgentAuthToken retrieves an auth token to communicate with other agent processes - // Function will be nil if in an environment without an auth token - GetAgentAuthToken func() string `json:"-"` - - // IsMRFEnabled determines whether Multi-Region Failover is enabled. It is based on the core config's - // `multi_region_failover.enabled` and `multi_region_failover.failover_apm` settings. - IsMRFEnabled func() bool `json:"-"` -} - -// RemoteClient client is used to APM Sampling Updates from a remote source. -// This is an interface around the client provided by pkg/config/remote to allow for easier testing. -type RemoteClient interface { - Close() - Start() - Subscribe(string, func(update map[string]state.RawConfig, applyStateCallback func(string, state.ApplyStatus))) - UpdateApplyStatus(cfgPath string, status state.ApplyStatus) -} - -// Tag represents a key/value pair. -type Tag struct { - K, V string -} - -// TagRegex represents a key/value regex pattern pair. -type TagRegex struct { - K string - V *regexp.Regexp -} - -// New returns a configuration with the default values. -func New() *AgentConfig { - return &AgentConfig{ - Enabled: true, - DefaultEnv: "none", - Endpoints: []*Endpoint{{Host: "https://trace.agent.datadoghq.com"}}, - FargateOrchestrator: OrchestratorUnknown, - Site: "datadoghq.com", - MaxCatalogEntries: 5000, - - BucketInterval: time.Duration(10) * time.Second, - - ExtraSampleRate: 1.0, - TargetTPS: 10, - ErrorTPS: 10, - MaxEPS: 200, - MaxRemoteTPS: 100, - - RareSamplerEnabled: false, - RareSamplerTPS: 5, - RareSamplerCooldownPeriod: 5 * time.Minute, - RareSamplerCardinality: 200, - - ErrorTrackingStandalone: false, - - ReceiverEnabled: true, - ReceiverHost: "localhost", - ReceiverPort: 8126, - MaxRequestBytes: 25 * 1024 * 1024, // 25MB - PipeBufferSize: 1_000_000, - PipeSecurityDescriptor: "D:AI(A;;GA;;;WD)", - GUIPort: "5002", - - StatsWriter: new(WriterConfig), - TraceWriter: new(WriterConfig), - ConnectionResetInterval: 0, // disabled - MaxSenderRetries: 4, - - StatsdHost: "localhost", - StatsdPort: 8125, - StatsdEnabled: true, - - LambdaFunctionName: os.Getenv("AWS_LAMBDA_FUNCTION_NAME"), - - MaxMemory: 5e8, // 500 Mb, should rarely go above 50 Mb - MaxCPU: 0.5, // 50%, well behaving agents keep below 5% - WatchdogInterval: 10 * time.Second, - - Ignore: make(map[string][]string), - AnalyzedRateByServiceLegacy: make(map[string]float64), - AnalyzedSpansByService: make(map[string]map[string]float64), - Obfuscation: &ObfuscationConfig{}, - SQLObfuscationMode: "", - MaxResourceLen: 5000, - - GlobalTags: computeGlobalTags(), - - Proxy: http.ProxyFromEnvironment, - OTLPReceiver: &OTLP{}, - ContainerTags: noopContainerTagsFunc, - ContainerIDFromOriginInfo: NoopContainerIDFromOriginInfoFunc, - TelemetryConfig: &TelemetryConfig{ - Endpoints: []*Endpoint{{Host: TelemetryEndpointPrefix + "datadoghq.com"}}, - }, - EVPProxy: EVPProxy{ - Enabled: true, - MaxPayloadSize: 5 * 1024 * 1024, - }, - OpenLineageProxy: OpenLineageProxy{ - Enabled: true, - APIVersion: 2, - }, - - Features: make(map[string]struct{}), - PeerTagsAggregation: true, - ComputeStatsBySpanKind: true, - } -} - -func computeGlobalTags() map[string]string { - if inAzureAppServices() { - return traceutil.GetAppServicesTags() - } - return make(map[string]string) -} - -// ErrContainerTagsFuncNotDefined is returned when the containerTags function is not defined. -var ErrContainerTagsFuncNotDefined = errors.New("containerTags function not defined") - -func noopContainerTagsFunc(_ string) ([]string, error) { - return nil, ErrContainerTagsFuncNotDefined -} - -// ErrContainerIDFromOriginInfoFuncNotDefined is returned when the ContainerIDFromOriginInfo function is not defined. -var ErrContainerIDFromOriginInfoFuncNotDefined = errors.New("ContainerIDFromOriginInfo function not defined") - -// NoopContainerIDFromOriginInfoFunc is used when the ContainerIDFromOriginInfo function is not defined. -func NoopContainerIDFromOriginInfoFunc(_ origindetection.OriginInfo) (string, error) { - return "", ErrContainerIDFromOriginInfoFuncNotDefined -} - -// APIKey returns the first (main) endpoint's API key. -func (c *AgentConfig) APIKey() string { - if len(c.Endpoints) == 0 { - return "" - } - return c.Endpoints[0].APIKey -} - -// UpdateAPIKey updates the API Key associated with the main endpoint. -func (c *AgentConfig) UpdateAPIKey(val string) { - if len(c.Endpoints) == 0 { - return - } - c.Endpoints[0].APIKey = val -} - -// NewHTTPClient returns a new http.Client to be used for outgoing connections to the -// Datadog API. -func (c *AgentConfig) NewHTTPClient() *ResetClient { - // If a custom HTTPClientFunc been set, use it. Otherwise use default client values - if c.HTTPClientFunc != nil { - return NewResetClient(c.ConnectionResetInterval, c.HTTPClientFunc) - } - return NewResetClient(c.ConnectionResetInterval, func() *http.Client { - return &http.Client{ - Timeout: 10 * time.Second, - Transport: c.NewHTTPTransport(), - } - }) -} - -// NewHTTPTransport returns a new http.Transport to be used for outgoing connections to -// the Datadog API. -func (c *AgentConfig) NewHTTPTransport() *http.Transport { - if c.HTTPTransportFunc != nil { - return c.HTTPTransportFunc() - } - transport := &http.Transport{ - TLSClientConfig: &tls.Config{InsecureSkipVerify: c.SkipSSLValidation}, - // below field values are from http.DefaultTransport (go1.12) - Proxy: c.Proxy, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 100, - IdleConnTimeout: 30 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - } - return transport -} - -// HasFeature returns true if the agent has the given feature flag. -func (c *AgentConfig) HasFeature(feat string) bool { - _, ok := c.Features[feat] - return ok -} - -// AllFeatures returns a slice of all the feature flags the agent has. -func (c *AgentConfig) AllFeatures() []string { - feats := []string{} - for feat := range c.Features { - feats = append(feats, feat) - } - return feats -} - -// ConfiguredPeerTags returns the set of peer tags that should be used -// for aggregation based on the various config values and the base set of tags. -func (c *AgentConfig) ConfiguredPeerTags() []string { - if !c.PeerTagsAggregation { - return nil - } - return preparePeerTags(append(basePeerTags, c.PeerTags...)) -} - -func inAzureAppServices() bool { - _, existsLinux := os.LookupEnv("WEBSITE_STACK") - _, existsWin := os.LookupEnv("WEBSITE_APPSERVICEAPPLOGS_TRACE_ENABLED") - return existsLinux || existsWin -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.go deleted file mode 100644 index 6b2a58c9e9..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.go +++ /dev/null @@ -1,55 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package config - -import ( - _ "embed" //nolint:revive - "sort" - "strings" - - "github.com/DataDog/datadog-agent/pkg/util/log" - "gopkg.in/ini.v1" -) - -//go:embed peer_tags.ini -var peerTagFile []byte - -// basePeerTags is the base set of peer tag precursors (tags from which peer tags -// are derived) we aggregate on when peer tag aggregation is enabled. -var basePeerTags = func() []string { - var precursors []string = []string{"_dd.base_service"} - - cfg, err := ini.Load(peerTagFile) - if err != nil { - log.Error("Error loading file for peer tags: ", err) - return precursors - } - peerTags := cfg.Section("dd.apm.peer.tags").Keys() - - for _, t := range peerTags { - ps := strings.Split(t.Value(), ",") - precursors = append(precursors, ps...) - } - sort.Strings(precursors) - - return precursors -}() - -func preparePeerTags(tags []string) []string { - if len(tags) == 0 { - return nil - } - var deduped []string - seen := make(map[string]struct{}) - for _, t := range tags { - if _, ok := seen[t]; !ok { - seen[t] = struct{}{} - deduped = append(deduped, t) - } - } - sort.Strings(deduped) - return deduped -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini b/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini deleted file mode 100644 index 24ffaafe5d..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/config/peer_tags.ini +++ /dev/null @@ -1,18 +0,0 @@ -# Generated - DO NOT EDIT -# Source: https://github.com/DataDog/semantic-core/ -[dd.apm.peer.tags] -peer.aws.dynamodb.table = "tablename" -peer.aws.kinesis.stream = "streamname" -peer.aws.s3.bucket = "bucketname,aws.s3.bucket" -peer.aws.sqs.queue = "queuename" -peer.cassandra.contact.points = "db.cassandra.contact.points" -peer.couchbase.seed.nodes = "db.couchbase.seed.nodes" -peer.db.name = "db.name,mongodb.db,db.instance,cassandra.keyspace,db.namespace" -peer.db.system = "db.system,active_record.db.vendor,db.type,sequel.db.vendor" -peer.hostname = "peer.hostname,hostname,net.peer.name,db.hostname,network.destination.name,grpc.host,http.host,server.address,http.server_name,out.host,dns.hostname,network.destination.ip" -peer.kafka.bootstrap.servers = "messaging.kafka.bootstrap.servers" -peer.messaging.destination = "topicname,messaging.destination,messaging.destination.name,messaging.rabbitmq.exchange,amqp.destination,amqp.queue,amqp.exchange,msmq.queue.path,aws.queue.name" -peer.messaging.system = "messaging.system" -peer.rpc.service = "rpc.service" -peer.rpc.system = "rpc.system" -peer.service = "peer.service" diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/buflogger.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/buflogger.go deleted file mode 100644 index 90672147d5..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/buflogger.go +++ /dev/null @@ -1,97 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build test - -package log - -import ( - "bytes" - "fmt" - "sync" -) - -var _ Logger = (*buflogger)(nil) - -// NewBufferLogger creates a new Logger which outputs everything to the given buffer. -// It is synchronised for concurrent use; as such, it is not optimal for use outside -// testing environments. -func NewBufferLogger(out *bytes.Buffer) Logger { - return &buflogger{buf: out} -} - -type buflogger struct { - mu sync.Mutex - buf *bytes.Buffer -} - -func (b *buflogger) logWithLevel(lvl string, msg string) { - b.mu.Lock() - defer b.mu.Unlock() - b.buf.WriteString(fmt.Sprintf("[%s] %s", lvl, msg)) -} - -// Trace implements Logger. -func (b *buflogger) Trace(v ...interface{}) { b.logWithLevel("TRACE", fmt.Sprint(v...)) } - -// Tracef implements Logger. -func (b *buflogger) Tracef(format string, params ...interface{}) { - b.logWithLevel("TRACE", fmt.Sprintf(format, params...)) -} - -// Debug implements Logger. -func (b *buflogger) Debug(v ...interface{}) { b.logWithLevel("DEBUG", fmt.Sprint(v...)) } - -// Debugf implements Logger. -func (b *buflogger) Debugf(format string, params ...interface{}) { - b.logWithLevel("DEBUG", fmt.Sprintf(format, params...)) -} - -// Info implements Logger. -func (b *buflogger) Info(v ...interface{}) { b.logWithLevel("INFO", fmt.Sprint(v...)) } - -// Infof implements Logger. -func (b *buflogger) Infof(format string, params ...interface{}) { - b.logWithLevel("INFO", fmt.Sprintf(format, params...)) -} - -// Warn implements Logger. -func (b *buflogger) Warn(v ...interface{}) error { - b.logWithLevel("WARN", fmt.Sprint(v...)) - return nil -} - -// Warnf implements Logger. -func (b *buflogger) Warnf(format string, params ...interface{}) error { - b.logWithLevel("WARN", fmt.Sprintf(format, params...)) - return nil -} - -// Error implements Logger. -func (b *buflogger) Error(v ...interface{}) error { - b.logWithLevel("ERROR", fmt.Sprint(v...)) - return nil -} - -// Errorf implements Logger. -func (b *buflogger) Errorf(format string, params ...interface{}) error { - b.logWithLevel("ERROR", fmt.Sprintf(format, params...)) - return nil -} - -// Critical implements Logger. -func (b *buflogger) Critical(v ...interface{}) error { - b.logWithLevel("CRITICAL", fmt.Sprint(v...)) - return nil -} - -// Criticalf implements Logger. -func (b *buflogger) Criticalf(format string, params ...interface{}) error { - b.logWithLevel("CRITICAL", fmt.Sprintf(format, params...)) - return nil -} - -// Flush implements Logger. -func (b *buflogger) Flush() {} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/logger.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/logger.go deleted file mode 100644 index 552eeaa02f..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/logger.go +++ /dev/null @@ -1,196 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package log implements the trace-agent logger. -package log - -import ( - "sync" -) - -var ( - mu sync.RWMutex - logger Logger = NoopLogger -) - -// SetLogger sets l as the default Logger and returns the old logger. -func SetLogger(l Logger) Logger { - mu.Lock() - oldlogger := logger - logger = l - mu.Unlock() - return oldlogger -} - -// IsSet returns whether the logger has been set up. -func IsSet() bool { - mu.Lock() - defer mu.Unlock() - return logger != NoopLogger -} - -// Logger implements the core logger interface. -type Logger interface { - Trace(v ...interface{}) - Tracef(format string, params ...interface{}) - Debug(v ...interface{}) - Debugf(format string, params ...interface{}) - Info(v ...interface{}) - Infof(format string, params ...interface{}) - Warn(v ...interface{}) error - Warnf(format string, params ...interface{}) error - Error(v ...interface{}) error - Errorf(format string, params ...interface{}) error - Critical(v ...interface{}) error - Criticalf(format string, params ...interface{}) error - Flush() -} - -// Trace formats message using the default formats for its operands -// and writes to log with level = Trace -func Trace(v ...interface{}) { - mu.RLock() - logger.Trace(v...) - mu.RUnlock() -} - -// Tracef formats message according to format specifier -// and writes to log with level = Trace. -func Tracef(format string, params ...interface{}) { - mu.RLock() - logger.Tracef(format, params...) - mu.RUnlock() -} - -// Debug formats message using the default formats for its operands -// and writes to log with level = Debug -func Debug(v ...interface{}) { - mu.RLock() - logger.Debug(v...) - mu.RUnlock() -} - -// Debugf formats message according to format specifier -// and writes to log with level = Debug. -func Debugf(format string, params ...interface{}) { - mu.RLock() - logger.Debugf(format, params...) - mu.RUnlock() -} - -// Info formats message using the default formats for its operands -// and writes to log with level = Info -func Info(v ...interface{}) { - mu.RLock() - logger.Info(v...) - mu.RUnlock() -} - -// Infof formats message according to format specifier -// and writes to log with level = Info. -func Infof(format string, params ...interface{}) { - mu.RLock() - logger.Infof(format, params...) - mu.RUnlock() -} - -// Warn formats message using the default formats for its operands -// and writes to log with level = Warn -func Warn(v ...interface{}) { - mu.RLock() - logger.Warn(v...) //nolint:errcheck - mu.RUnlock() -} - -// Warnf formats message according to format specifier -// and writes to log with level = Warn. -func Warnf(format string, params ...interface{}) { - mu.RLock() - logger.Warnf(format, params...) //nolint:errcheck - mu.RUnlock() -} - -// Error formats message using the default formats for its operands -// and writes to log with level = Error -func Error(v ...interface{}) { - mu.RLock() - logger.Error(v...) //nolint:errcheck - mu.RUnlock() -} - -// Errorf formats message according to format specifier -// and writes to log with level = Error. -func Errorf(format string, params ...interface{}) { - mu.RLock() - logger.Errorf(format, params...) //nolint:errcheck - mu.RUnlock() -} - -// Critical formats message using the default formats for its operands -// and writes to log with level = Critical -func Critical(v ...interface{}) { - mu.RLock() - logger.Critical(v...) //nolint:errcheck - mu.RUnlock() -} - -// Criticalf formats message according to format specifier -// and writes to log with level = Critical. -func Criticalf(format string, params ...interface{}) { - mu.RLock() - logger.Criticalf(format, params...) //nolint:errcheck - mu.RUnlock() -} - -// Flush flushes all the messages in the logger. -func Flush() { - mu.RLock() - logger.Flush() - mu.RUnlock() -} - -// NoopLogger is a logger which has no effect upon calling. -var NoopLogger = noopLogger{} - -type noopLogger struct{} - -// Trace implements Logger. -func (noopLogger) Trace(_ ...interface{}) {} - -// Tracef implements Logger. -func (noopLogger) Tracef(_ string, _ ...interface{}) {} - -// Debug implements Logger. -func (noopLogger) Debug(_ ...interface{}) {} - -// Debugf implements Logger. -func (noopLogger) Debugf(_ string, _ ...interface{}) {} - -// Info implements Logger. -func (noopLogger) Info(_ ...interface{}) {} - -// Infof implements Logger. -func (noopLogger) Infof(_ string, _ ...interface{}) {} - -// Warn implements Logger. -func (noopLogger) Warn(_ ...interface{}) error { return nil } - -// Warnf implements Logger. -func (noopLogger) Warnf(_ string, _ ...interface{}) error { return nil } - -// Error implements Logger. -func (noopLogger) Error(_ ...interface{}) error { return nil } - -// Errorf implements Logger. -func (noopLogger) Errorf(_ string, _ ...interface{}) error { return nil } - -// Critical implements Logger. -func (noopLogger) Critical(_ ...interface{}) error { return nil } - -// Criticalf implements Logger. -func (noopLogger) Criticalf(_ string, _ ...interface{}) error { return nil } - -// Flush implements Logger. -func (noopLogger) Flush() {} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/throttled.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/throttled.go deleted file mode 100644 index 3b81cee47d..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/log/throttled.go +++ /dev/null @@ -1,63 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import ( - "time" - - "go.uber.org/atomic" -) - -// NewThrottled returns a new throttled logger. The returned logger will allow up to n calls in -// a time period of length d. -func NewThrottled(n int, d time.Duration) *ThrottledLogger { - return &ThrottledLogger{ - n: uint64(n), - c: atomic.NewUint64(0), - d: d, - } -} - -// ThrottledLogger limits the number of log calls during a time window. To create a new logger -// use NewThrottled. -type ThrottledLogger struct { - n uint64 // number of log calls allowed during interval d - c *atomic.Uint64 // number of log calls performed during an interval d - d time.Duration -} - -type loggerFunc func(format string, params ...interface{}) - -func (tl *ThrottledLogger) log(logFunc loggerFunc, format string, params ...interface{}) { - c := tl.c.Inc() - 1 - if c == 0 { - // first call, trigger the reset - time.AfterFunc(tl.d, func() { tl.c.Store(0) }) - } - if c >= tl.n { - if c == tl.n { - logFunc("Too many similar messages, pausing up to %s...", tl.d) - } - return - } - logFunc(format, params...) -} - -// Error logs the message at the error level. -func (tl *ThrottledLogger) Error(format string, params ...interface{}) { - tl.log(Errorf, format, params...) -} - -// Warn logs the message at the warning level. -func (tl *ThrottledLogger) Warn(format string, params ...interface{}) { - tl.log(Warnf, format, params...) -} - -// Write implements io.Writer. -func (tl *ThrottledLogger) Write(p []byte) (n int, err error) { - tl.Error(string(p)) - return len(p), nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/catalog.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/catalog.go deleted file mode 100644 index 27ff9a4208..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/catalog.go +++ /dev/null @@ -1,93 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "container/list" - "sync" - - "github.com/DataDog/datadog-agent/pkg/trace/log" -) - -// defaultServiceRateKey specifies the key for the default rate to be used by any service that -// doesn't have a rate specified. -const defaultServiceRateKey = "service:,env:" - -// maxCatalogEntries specifies the maximum number of entries allowed in the catalog. -const maxCatalogEntries = 5000 - -// serviceKeyCatalog reverse-maps service signatures to their generated hashes for -// easy look up. -type serviceKeyCatalog struct { - mu sync.Mutex - items map[ServiceSignature]*list.Element - ll *list.List - maxEntries int -} - -type catalogEntry struct { - key ServiceSignature - sig Signature -} - -// newServiceLookup returns a new serviceKeyCatalog with maxEntries maximum number of entries. -// If maxEntries is 0, a default of 5000 (maxCatalogEntries) will be used. -func newServiceLookup(maxEntries int) *serviceKeyCatalog { - entries := maxCatalogEntries - if maxEntries > 0 { - entries = maxEntries - } - return &serviceKeyCatalog{ - items: make(map[ServiceSignature]*list.Element), - ll: list.New(), - maxEntries: entries, - } -} - -func (cat *serviceKeyCatalog) register(svcSig ServiceSignature) Signature { - cat.mu.Lock() - defer cat.mu.Unlock() - if el, ok := cat.items[svcSig]; ok { - // signature already exists, move to front and return already-computed hash - cat.ll.MoveToFront(el) - return el.Value.(catalogEntry).sig - } - // new signature, compute new hash - hash := svcSig.Hash() - el := cat.ll.PushFront(catalogEntry{key: svcSig, sig: hash}) - cat.items[svcSig] = el - if cat.ll.Len() > cat.maxEntries { - // list went beyond maximum allowed entries, removed back of the list - del := cat.ll.Remove(cat.ll.Back()).(catalogEntry) - delete(cat.items, del.key) - log.Warnf("More than %d services in service-rates catalog. Dropping %v.", cat.maxEntries, del.key) - } - return hash -} - -// ratesByService returns a map of service signatures mapping to the rates identified using -// the signatures. -func (cat *serviceKeyCatalog) ratesByService(agentEnv string, rates map[Signature]float64, defaultRate float64) map[ServiceSignature]float64 { - rbs := make(map[ServiceSignature]float64, len(rates)+1) - cat.mu.Lock() - defer cat.mu.Unlock() - for key, el := range cat.items { - sig := el.Value.(catalogEntry).sig - if rate, ok := rates[sig]; ok { - rbs[key] = rate - } else { - cat.ll.Remove(el) - delete(cat.items, key) - continue - } - - if rateWithEmptyEnv(key.Env, agentEnv) { - rbs[ServiceSignature{Name: key.Name}] = rbs[key] - } - } - rbs[ServiceSignature{}] = defaultRate - return rbs -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/coresampler.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/coresampler.go deleted file mode 100644 index 4b625adebb..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/coresampler.go +++ /dev/null @@ -1,270 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "sort" - "sync" - "time" - - "go.uber.org/atomic" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -const ( - bucketDuration = 5 * time.Second - numBuckets = 6 - maxRateIncrease = 1.2 -) - -// Sampler is the main component of the sampling logic -// Seen traces are counted per signature in a circular buffer -// of numBuckets. -// The sampler distributes uniformly on all signature -// a targetTPS. The bucket with the maximum counts over the period -// of the buffer is used to compute the sampling rates. -type Sampler struct { - // seen counts seen signatures by Signature in a circular buffer of numBuckets of bucketDuration. - // In the case of the PrioritySampler, chunks dropped in the Client are also taken in account. - seen map[Signature][numBuckets]float32 - // allSigsSeen counts all signatures in a circular buffer of numBuckets of bucketDuration - allSigsSeen [numBuckets]float32 - // lastBucketID is the index of the last bucket on which traces were counted - lastBucketID int64 - // rates maps sampling rate in % - rates map[Signature]float64 - // lowestRate is the lowest rate of all signatures - lowestRate float64 - - // muSeen is a lock protecting seen map and totalSeen count - muSeen sync.RWMutex - // muRates is a lock protecting rates map - muRates sync.RWMutex - - // Maximum limit to the total number of traces per second to sample - targetTPS *atomic.Float64 - // extraRate is an extra raw sampling rate to apply on top of the sampler rate - extraRate float64 -} - -// newSampler returns an initialized Sampler -func newSampler(extraRate float64, targetTPS float64) *Sampler { - s := &Sampler{ - seen: make(map[Signature][numBuckets]float32), - extraRate: extraRate, - targetTPS: atomic.NewFloat64(targetTPS), - } - return s -} - -// updateTargetTPS updates the targetTPS and all rates -func (s *Sampler) updateTargetTPS(targetTPS float64) { - previousTargetTPS := s.targetTPS.Load() - s.targetTPS.Store(targetTPS) - - if previousTargetTPS == 0 { - return - } - ratio := targetTPS / previousTargetTPS - - s.muRates.Lock() - for sig, rate := range s.rates { - newRate := min(rate*ratio, 1) - s.rates[sig] = newRate - } - s.muRates.Unlock() -} - -// countWeightedSig counts a trace sampled by the sampler and update rates -// if buckets are rotated -func (s *Sampler) countWeightedSig(now time.Time, signature Signature, n float32) bool { - bucketID := now.Unix() / int64(bucketDuration.Seconds()) - s.muSeen.Lock() - prevBucketID := s.lastBucketID - s.lastBucketID = bucketID - - // pass through each bucket, zero expired ones and adjust sampling rates - updateRates := prevBucketID != bucketID - if updateRates { - s.updateRates(prevBucketID, bucketID) - } - - buckets, ok := s.seen[signature] - if !ok { - buckets = [numBuckets]float32{} - } - s.allSigsSeen[bucketID%numBuckets] += n - buckets[bucketID%numBuckets] += n - s.seen[signature] = buckets - - s.muSeen.Unlock() - return updateRates -} - -// updateRates distributes TPS on each signature and apply it to the moving -// max of seen buckets. -// Rates increase are bounded by 20% increases, it requires 13 evaluations (1.2**13 = 10.6) -// to increase a sampling rate by 10 fold in about 1min. -// A caller of updateRates must hold a lock on s.muSeen (e.g. as used by countWeightedSig). -func (s *Sampler) updateRates(previousBucket, newBucket int64) { - if len(s.seen) == 0 { - return - } - rates := make(map[Signature]float64, len(s.seen)) - - seenTPSs := make([]float64, 0, len(s.seen)) - sigs := make([]Signature, 0, len(s.seen)) - for sig, buckets := range s.seen { - maxBucket, buckets := zeroAndGetMax(buckets, previousBucket, newBucket) - s.seen[sig] = buckets - seenTPSs = append(seenTPSs, float64(maxBucket)/bucketDuration.Seconds()) - sigs = append(sigs, sig) - } - _, allSigsSeen := zeroAndGetMax(s.allSigsSeen, previousBucket, newBucket) - s.allSigsSeen = allSigsSeen - - tpsPerSig := computeTPSPerSig(s.targetTPS.Load(), seenTPSs) - - s.muRates.Lock() - defer s.muRates.Unlock() - s.lowestRate = 1 - for i, sig := range sigs { - seenTPS := seenTPSs[i] - rate := 1.0 - if tpsPerSig < seenTPS && seenTPS > 0 { - rate = tpsPerSig / seenTPS - } - // capping increase rate to 20% - if prevRate, ok := s.rates[sig]; ok && prevRate != 0 { - if rate/prevRate > maxRateIncrease { - rate = prevRate * maxRateIncrease - } - } - if rate > 1.0 { - rate = 1.0 - } - // no traffic on this signature, clean it up from the sampler - if rate == 1.0 && seenTPS == 0 { - delete(s.seen, sig) - continue - } - if rate < s.lowestRate { - s.lowestRate = rate - } - rates[sig] = rate - } - s.rates = rates -} - -// computeTPSPerSig distributes TPS looking at the seenTPS of all signatures. -// By default it spreads uniformly the TPS on all signatures. If a signature -// is low volume and does not use all of its TPS, the remaining is spread uniformly -// on all other signatures. -func computeTPSPerSig(targetTPS float64, seen []float64) float64 { - sorted := make([]float64, len(seen)) - copy(sorted, seen) - sort.Float64s(sorted) - - sigTarget := targetTPS / float64(len(sorted)) - - for i, c := range sorted { - if c >= sigTarget || i == len(sorted)-1 { - break - } - targetTPS -= c - sigTarget = targetTPS / float64((len(sorted) - i - 1)) - } - return sigTarget -} - -// zeroAndGetMax zeroes expired buckets and returns the max count -func zeroAndGetMax(buckets [numBuckets]float32, previousBucket, newBucket int64) (float32, [numBuckets]float32) { - maxBucket := float32(0) - for i := previousBucket + 1; i <= previousBucket+numBuckets; i++ { - index := i % numBuckets - - // if a complete rotation happened between previousBucket and newBucket - // all buckets will be zeroed - if i < newBucket { - buckets[index] = 0 - continue - } - - value := buckets[index] - if value > maxBucket { - maxBucket = value - } - - // zeroing after taking in account the previous value of the bucket - // overridden by this rotation. This allows to take in account all buckets - if i == newBucket { - buckets[index] = 0 - } - } - return maxBucket, buckets -} - -// getSignatureSampleRate returns the sampling rate to apply to a signature -func (s *Sampler) getSignatureSampleRate(sig Signature) float64 { - s.muRates.RLock() - rate, ok := s.rates[sig] - s.muRates.RUnlock() - if !ok { - return s.defaultRate() - } - return rate * s.extraRate -} - -// getAllSignatureSampleRates returns the sampling rate to apply to each signature -func (s *Sampler) getAllSignatureSampleRates() (map[Signature]float64, float64) { - s.muRates.RLock() - rates := make(map[Signature]float64, len(s.rates)) - for sig, val := range s.rates { - rates[sig] = val * s.extraRate - } - s.muRates.RUnlock() - return rates, s.defaultRate() -} - -// defaultRate returns the rate to apply to unknown signatures. It's computed by considering -// the moving max of all Sigs seen by the sampler, and the lowest rate stored. -// Callers of defaultRate must hold a RLock on s.muRates -func (s *Sampler) defaultRate() float64 { - targetTPS := s.targetTPS.Load() - if targetTPS == 0 { - return 0 - } - - var maxSeen float32 - s.muSeen.RLock() - defer s.muSeen.RUnlock() - for _, c := range s.allSigsSeen { - if c > maxSeen { - maxSeen = c - } - } - seenTPS := float64(maxSeen) / bucketDuration.Seconds() - - rate := 1.0 - if targetTPS < seenTPS && seenTPS > 0 { - rate = targetTPS / seenTPS - } - if s.lowestRate < rate && s.lowestRate != 0 { - return s.lowestRate - } - return rate -} - -func (s *Sampler) size() int64 { - s.muSeen.RLock() - defer s.muSeen.RUnlock() - return int64(len(s.seen)) -} - -func (s *Sampler) report(statsd statsd.ClientInterface, name Name) { - _ = statsd.Gauge(MetricSamplerSize, float64(s.size()), []string{"sampler:" + name.String()}, 1) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/dynamic_config.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/dynamic_config.go deleted file mode 100644 index 792a2108f4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/dynamic_config.go +++ /dev/null @@ -1,115 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "math" - "strconv" - "sync" - "time" - - "go.uber.org/atomic" -) - -// DynamicConfig contains configuration items which may change -// dynamically over time. -type DynamicConfig struct { - // RateByService contains the rate for each service/env tuple, - // used in priority sampling by client libs. - RateByService RateByService -} - -// NewDynamicConfig creates a new dynamic config object which maps service signatures -// to their corresponding sampling rates. Each service will have a default assigned -// matching the service rate of the specified env. -func NewDynamicConfig() *DynamicConfig { - return &DynamicConfig{RateByService: RateByService{}} -} - -// State specifies the current state of DynamicConfig -type State struct { - Rates map[string]float64 - Version string -} - -// rc specifies a pair of rate and color. -// color is used for detecting changes. -type rc struct { - r float64 - c int8 -} - -// RateByService stores the sampling rate per service. It is thread-safe, so -// one can read/write on it concurrently, using getters and setters. -type RateByService struct { - mu sync.RWMutex // guards rates - // currentColor is either 0 or 1. And, it changes every time `SetAll()` is called. - // When `SetAll()` is called, we paint affected keys with `currentColor`. - // If there is a key has a color doesn't match `currentColor`, it means that key no longer exists. - currentColor int8 - rates map[string]*rc - version string -} - -// SetAll the sampling rate for all services. If a service/env is not -// in the map, then the entry is removed. -func (rbs *RateByService) SetAll(rates map[ServiceSignature]float64) { - rbs.mu.Lock() - defer rbs.mu.Unlock() - - rbs.currentColor = 1 - rbs.currentColor - changed := false - if rbs.rates == nil { - rbs.rates = make(map[string]*rc, len(rates)) - } - for s, r := range rates { - ks := s.String() - r = math.Min(math.Max(r, 0), 1) - if oldV, ok := rbs.rates[ks]; !ok || oldV.r != r { - changed = true - rbs.rates[ks] = &rc{ - r: r, - } - } - rbs.rates[ks].c = rbs.currentColor - } - for k, v := range rbs.rates { - if v.c != rbs.currentColor { - changed = true - delete(rbs.rates, k) - } - } - if changed { - rbs.version = newVersion() - } -} - -// GetNewState returns the current state if the given version is different from the local version. -func (rbs *RateByService) GetNewState(version string) State { - rbs.mu.RLock() - defer rbs.mu.RUnlock() - - if version != "" && version == rbs.version { - return State{ - Version: version, - } - } - ret := State{ - Rates: make(map[string]float64, len(rbs.rates)), - Version: rbs.version, - } - for k, v := range rbs.rates { - ret.Rates[k] = v.r - } - - return ret -} - -var localVersion atomic.Int64 - -func newVersion() string { - return strconv.FormatInt(time.Now().Unix(), 16) + "-" + strconv.FormatInt(localVersion.Inc(), 16) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/env.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/env.go deleted file mode 100644 index 0978a6062d..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/env.go +++ /dev/null @@ -1,23 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package sampler - -// tracers with an env value of "" or agentEnv share -// the same sampler. This is required as remote is unaware -// of agentEnv and tracerEnv different values -func toSamplerEnv(tracerEnv, agentEnv string) string { - env := tracerEnv - if env == "" { - env = agentEnv - } - return env -} - -// tracers with empty env will have the same rate given -// as tracers with agentEnv -func rateWithEmptyEnv(samplerEnv, agentEnv string) bool { - return samplerEnv == agentEnv -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/metrics.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/metrics.go deleted file mode 100644 index a9523347f0..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/metrics.go +++ /dev/null @@ -1,204 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "sync" - "time" - - "github.com/DataDog/datadog-agent/pkg/trace/watchdog" - "github.com/DataDog/datadog-go/v5/statsd" -) - -const ( - // MetricSamplerSeen is the metric name for the number of traces seen by the sampler. - MetricSamplerSeen = "datadog.trace_agent.sampler.seen" - // MetricSamplerKept is the metric name for the number of traces kept by the sampler. - MetricSamplerKept = "datadog.trace_agent.sampler.kept" - // MetricSamplerSize is the current number of unique trace signatures tracked for stats calculation. - MetricSamplerSize = "datadog.trace_agent.sampler.size" -) - -// Name represents the name of the sampler. -type Name uint8 - -const ( - // NameUnknown is the default value. It should not be used. - NameUnknown Name = iota - // NamePriority is the name of the priority sampler. - NamePriority - // NameNoPriority is the name of the no priority sampler. - NameNoPriority - // NameError is the name of the error sampler. - NameError - // NameRare is the name of the rare sampler. - NameRare - // NameProbabilistic is the name of the probabilistic sampler. - NameProbabilistic -) - -// String returns the string representation of the Name. -func (n Name) String() string { - switch n { - case NamePriority: - return "priority" - case NameNoPriority: - return "no_priority" - case NameError: - return "error" - case NameRare: - return "rare" - case NameProbabilistic: - return "probabilistic" - default: - return "unknown" - } -} - -func (n Name) shouldAddEnvTag() bool { - return n == NamePriority || n == NameNoPriority || n == NameRare || n == NameError -} - -// Metrics is a structure to record metrics for the different samplers. -type Metrics struct { - statsd statsd.ClientInterface - valueMutex sync.Mutex - value map[MetricsKey]metricsValue - additionalReporters []AdditionalMetricsReporter - startMutex sync.Mutex - ticker *time.Ticker - started bool -} - -type metricsValue struct { - seen int64 - kept int64 -} - -// NewMetrics creates a new Metrics. -func NewMetrics(statsd statsd.ClientInterface) *Metrics { - return &Metrics{ - statsd: statsd, - value: make(map[MetricsKey]metricsValue), - } -} - -// AdditionalMetricsReporter reports additional sampler metrics. -// Metrics reported through this interface are reported at each Metrics tick. -type AdditionalMetricsReporter interface { - report(statsd statsd.ClientInterface) -} - -// Add sampler metrics reporter. -func (m *Metrics) Add(mr ...AdditionalMetricsReporter) { - m.additionalReporters = append(m.additionalReporters, mr...) -} - -// MetricsKey represents the key for the metrics. -type MetricsKey struct { - targetService string - targetEnv string - samplingPriority SamplingPriority - sampler Name -} - -// NewMetricsKey creates a new MetricsKey. -func NewMetricsKey(service, env string, sampler Name, samplingPriority SamplingPriority) MetricsKey { - mk := MetricsKey{ - targetService: service, - targetEnv: env, - sampler: sampler, - } - if sampler == NamePriority { - mk.samplingPriority = samplingPriority - } - return mk -} - -func (k MetricsKey) tags() []string { - tags := make([]string, 0, 4) // Pre-allocate number of fields for efficiency - tags = append(tags, "sampler:"+k.sampler.String()) - if k.sampler == NamePriority { - tags = append(tags, "sampling_priority:"+k.samplingPriority.tagValue()) - } - if k.targetService != "" { - tags = append(tags, "target_service:"+k.targetService) - } - if k.targetEnv != "" && k.sampler.shouldAddEnvTag() { - tags = append(tags, "target_env:"+k.targetEnv) - } - return tags -} - -// RecordMetricsKey records if metricsKey has been seen before and whether it was kept or not. -func (m *Metrics) RecordMetricsKey(sampled bool, metricsKey MetricsKey) { - m.valueMutex.Lock() - defer m.valueMutex.Unlock() - v, ok := m.value[metricsKey] - if !ok { - mv := metricsValue{seen: 1} - if sampled { - mv.kept = 1 - } - m.value[metricsKey] = mv - return - } - v.seen++ - if sampled { - v.kept++ - } - m.value[metricsKey] = v -} - -// Start the metrics reporting loop. -func (m *Metrics) Start() { - m.startMutex.Lock() - defer m.startMutex.Unlock() - if m.started { - return - } - m.started = true - m.ticker = time.NewTicker(10 * time.Second) - go func() { - defer watchdog.LogOnPanic(m.statsd) - for range m.ticker.C { - m.Report() - } - }() -} - -// Stop the metrics reporting loop. -func (m *Metrics) Stop() { - m.startMutex.Lock() - if !m.started { - m.startMutex.Unlock() - return - } - m.started = false - m.ticker.Stop() - m.startMutex.Unlock() - m.Report() -} - -// Report reports the metrics and additional sampler metrics. -func (m *Metrics) Report() { - m.valueMutex.Lock() - for key, value := range m.value { - tags := key.tags() - if value.seen > 0 { - _ = m.statsd.Count(MetricSamplerSeen, value.seen, tags, 1) - } - if value.kept > 0 { - _ = m.statsd.Count(MetricSamplerKept, value.kept, tags, 1) - } - } - m.value = make(map[MetricsKey]metricsValue) // reset counters - m.valueMutex.Unlock() - - for _, mr := range m.additionalReporters { - mr.report(m.statsd) - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/prioritysampler.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/prioritysampler.go deleted file mode 100644 index 2bbb0f33a3..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/prioritysampler.go +++ /dev/null @@ -1,158 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package sampler contains all the logic of the agent-side trace sampling -// -// Currently implementation is based on the scoring of the "signature" of each trace -// Based on the score, we get a sample rate to apply to the given trace -// -// Current score implementation is super-simple, it is a counter with polynomial decay per signature. -// We increment it for each incoming trace then we periodically divide the score by two every X seconds. -// Right after the division, the score is an approximation of the number of received signatures over X seconds. -// It is different from the scoring in the Agent. -// -// Since the sampling can happen at different levels (client, agent, server) or depending on different rules, -// we have to track the sample rate applied at previous steps. This way, sampling twice at 50% can result in an -// effective 25% sampling. The rate is stored as a metric in the trace root. -package sampler - -import ( - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-go/v5/statsd" -) - -const ( - deprecatedRateKey = "_sampling_priority_rate_v1" - agentRateKey = "_dd.agent_psr" - ruleRateKey = "_dd.rule_psr" -) - -// PrioritySampler computes priority rates per tracerEnv, service to apply in a feedback loop with trace-agent clients. -// Computed rates are sent in http responses to trace-agent. The rates are continuously adjusted in function -// of the received traffic to match a targetTPS (target traces per second). -type PrioritySampler struct { - agentEnv string - // sampler targetTPS is defined locally on the agent - // This sampler tries to get the received number of sampled trace chunks/s to match its targetTPS. - sampler *Sampler - - // rateByService contains the sampling rates in % to communicate with trace-agent clients. - // This struct is shared with the agent API which sends the rates in http responses to spans post requests - rateByService *RateByService - catalog *serviceKeyCatalog -} - -// NewPrioritySampler returns an initialized Sampler -func NewPrioritySampler(conf *config.AgentConfig, dynConf *DynamicConfig) *PrioritySampler { - s := &PrioritySampler{ - agentEnv: conf.DefaultEnv, - sampler: newSampler(conf.ExtraSampleRate, conf.TargetTPS), - rateByService: &dynConf.RateByService, - catalog: newServiceLookup(conf.MaxCatalogEntries), - } - return s -} - -var _ AdditionalMetricsReporter = (*PrioritySampler)(nil) - -func (s *PrioritySampler) report(statsd statsd.ClientInterface) { - s.sampler.report(statsd, NamePriority) -} - -// UpdateTargetTPS updates the target tps -func (s *PrioritySampler) UpdateTargetTPS(targetTPS float64) { - s.sampler.updateTargetTPS(targetTPS) -} - -// GetTargetTPS returns the target tps -func (s *PrioritySampler) GetTargetTPS() float64 { - return s.sampler.targetTPS.Load() -} - -// update sampling rates -func (s *PrioritySampler) updateRates() { - s.rateByService.SetAll(s.ratesByService()) -} - -// Sample counts an incoming trace and returns the trace sampling decision and the applied sampling rate -func (s *PrioritySampler) Sample(now time.Time, trace *pb.TraceChunk, root *pb.Span, tracerEnv string, clientDroppedP0sWeight float64) bool { - // Extra safety, just in case one trace is empty - if len(trace.Spans) == 0 { - return false - } - - samplingPriority, _ := GetSamplingPriority(trace) - // Regardless of rates, sampling here is based on the metadata set - // by the client library. Which, is turn, is based on agent hints, - // but the rule of thumb is: respect client choice. - sampled := samplingPriority.IsKeep() - - serviceSignature := ServiceSignature{Name: root.Service, Env: toSamplerEnv(tracerEnv, s.agentEnv)} - - // Short-circuit and return without counting the trace in the sampling rate logic - // if its value has not been set automatically by the client lib. - // The feedback loop should be scoped to the values it can act upon. - if samplingPriority < 0 { - return sampled - } - if samplingPriority > 1 { - return sampled - } - - signature := s.catalog.register(serviceSignature) - - // Update sampler state by counting this trace - s.countSignature(now, root, signature, clientDroppedP0sWeight) - - if sampled { - s.applyRate(root, signature) - } - return sampled -} - -func (s *PrioritySampler) applyRate(root *pb.Span, signature Signature) float64 { - if root.ParentID != 0 { - return 1.0 - } - // recent tracers annotate roots with applied priority rate - // agentRateKey is set when the agent computed rate is applied - if rate, ok := getMetric(root, agentRateKey); ok { - return rate - } - // ruleRateKey is set when a tracer rule rate is applied - if rate, ok := getMetric(root, ruleRateKey); ok { - return rate - } - // slow path used by older tracer versions - // dd-trace-go used to set the rate in deprecatedRateKey - if rate, ok := getMetric(root, deprecatedRateKey); ok { - return rate - } - rate := s.sampler.getSignatureSampleRate(signature) - - setMetric(root, deprecatedRateKey, rate) - - return rate -} - -// countSignature counts all chunks received with local chunk root signature. -func (s *PrioritySampler) countSignature(now time.Time, root *pb.Span, signature Signature, clientDroppedP0Weight float64) { - rootWeight := weightRoot(root) - newRates := s.sampler.countWeightedSig(now, signature, rootWeight+float32(clientDroppedP0Weight)) - - if newRates { - s.updateRates() - } -} - -// ratesByService returns all rates by service, this information is useful for -// agents to pick the right service rate. -func (s *PrioritySampler) ratesByService() map[ServiceSignature]float64 { - rates, defaultRate := s.sampler.getAllSignatureSampleRates() - return s.catalog.ratesByService(s.agentEnv, rates, defaultRate) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/probabilistic.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/probabilistic.go deleted file mode 100644 index 28102c3efe..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/probabilistic.go +++ /dev/null @@ -1,110 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022-present Datadog, Inc. - -package sampler - -import ( - "encoding/binary" - "encoding/hex" - "hash/fnv" - "strconv" - - "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/log" -) - -const ( - // These constants exist to match the behavior of the OTEL probabilistic sampler. - // See: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/6229c6ad1c49e9cc4b41a8aab8cb5a94a7b82ea5/processor/probabilisticsamplerprocessor/tracesprocessor.go#L38-L42 - numProbabilisticBuckets = 0x4000 - bitMaskHashBuckets = numProbabilisticBuckets - 1 - percentageScaleFactor = numProbabilisticBuckets / 100.0 - - // probRateKey indicates the percentage sampling rate configured for the probabilistic sampler - probRateKey = "_dd.prob_sr" -) - -// ProbabilisticSampler is a sampler that overrides all other samplers, -// it deterministically samples incoming traces by a hash of their trace ID -type ProbabilisticSampler struct { - enabled bool - hashSeed []byte - scaledSamplingPercentage uint32 - samplingPercentage float64 - // fullTraceIDMode looks at the full 128-bit trace ID to make the sampling decision - // This can be useful when trying to run this probabilistic sampler alongside the - // OTEL probabilistic sampler processor which always looks at the full 128-bit trace id. - // This is disabled by default to ensure compatibility in distributed systems where legacy applications may - // drop the top 64 bits of the trace ID. - fullTraceIDMode bool -} - -// NewProbabilisticSampler returns a new ProbabilisticSampler that deterministically samples -// a given percentage of incoming spans based on their trace ID -func NewProbabilisticSampler(conf *config.AgentConfig) *ProbabilisticSampler { - hashSeedBytes := make([]byte, 4) - binary.LittleEndian.PutUint32(hashSeedBytes, conf.ProbabilisticSamplerHashSeed) - _, fullTraceIDMode := conf.Features["probabilistic_sampler_full_trace_id"] - return &ProbabilisticSampler{ - enabled: conf.ProbabilisticSamplerEnabled, - hashSeed: hashSeedBytes, - scaledSamplingPercentage: uint32(conf.ProbabilisticSamplerSamplingPercentage * percentageScaleFactor), - samplingPercentage: float64(conf.ProbabilisticSamplerSamplingPercentage) / 100., - fullTraceIDMode: fullTraceIDMode, - } -} - -// Sample a trace given the chunk's root span, returns true if the trace should be kept -func (ps *ProbabilisticSampler) Sample(root *trace.Span) bool { - if !ps.enabled { - return false - } - - tid := make([]byte, 16) - var err error - if !ps.fullTraceIDMode { - binary.BigEndian.PutUint64(tid, root.TraceID) - } else { - tid, err = get128BitTraceID(root) - } - if err != nil { - log.Errorf("Unable to probabilistically sample, failed to determine 128-bit trace ID from incoming span: %v", err) - return false - } - - hasher := fnv.New32a() - _, _ = hasher.Write(ps.hashSeed) - _, _ = hasher.Write(tid) - hash := hasher.Sum32() - keep := hash&bitMaskHashBuckets < ps.scaledSamplingPercentage - if keep { - setMetric(root, probRateKey, ps.samplingPercentage) - } - return keep -} - -func get128BitTraceID(span *trace.Span) ([]byte, error) { - // If it's an otel span the whole trace ID is in otel.trace - if tid, ok := span.Meta["otel.trace_id"]; ok { - bs, err := hex.DecodeString(tid) - if err != nil { - return nil, err - } - return bs, nil - } - tid := make([]byte, 16) - binary.BigEndian.PutUint64(tid[8:], span.TraceID) - // Get hex encoded upper bits for datadog spans - // If no value is found we can use the default `0` value as that's what will have been propagated - if upper, ok := span.Meta["_dd.p.tid"]; ok { - u, err := strconv.ParseUint(upper, 16, 64) - if err != nil { - return nil, err - } - binary.BigEndian.PutUint64(tid[:8], u) - } - return tid, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/rare_sampler.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/rare_sampler.go deleted file mode 100644 index aad09f5866..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/rare_sampler.go +++ /dev/null @@ -1,227 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "sync" - "time" - - "go.uber.org/atomic" - "golang.org/x/time/rate" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" - "github.com/DataDog/datadog-go/v5/statsd" -) - -const ( - // ttlRenewalPeriod specifies the frequency at which we will upload cached entries. - ttlRenewalPeriod = 1 * time.Minute - // rareSamplerBurst sizes the token store used by the rate limiter. - rareSamplerBurst = 50 - rareKey = "_dd.rare" - - // MetricsRareHits is the metric name for the number of traces kept by the rare sampler. - MetricsRareHits = "datadog.trace_agent.sampler.rare.hits" - // MetricsRareMisses is the metric name for the number of traces missed by the rare sampler. - MetricsRareMisses = "datadog.trace_agent.sampler.rare.misses" - // MetricsRareShrinks is the metric name for the number of times the rare sampler has shrunk. - MetricsRareShrinks = "datadog.trace_agent.sampler.rare.shrinks" -) - -// RareSampler samples traces that are not caught by the Priority sampler. -// It ensures that we sample traces for each combination of -// (env, service, name, resource, error type, http status) seen on a top level or measured span -// for which we did not see any span with a priority > 0 (sampled by Priority). -// The resulting sampled traces will likely be incomplete and will be flagged with -// a exceptioKey metric set at 1. -type RareSampler struct { - enabled *atomic.Bool - hits *atomic.Int64 - misses *atomic.Int64 - shrinks *atomic.Int64 - mu sync.RWMutex - - limiter *rate.Limiter - ttl time.Duration - cardinality int - seen map[Signature]*seenSpans -} - -// NewRareSampler returns a NewRareSampler that ensures that we sample combinations -// of env, service, name, resource, http-status, error type for each top level or measured spans -func NewRareSampler(conf *config.AgentConfig) *RareSampler { - e := &RareSampler{ - enabled: atomic.NewBool(conf.RareSamplerEnabled), - hits: atomic.NewInt64(0), - misses: atomic.NewInt64(0), - shrinks: atomic.NewInt64(0), - limiter: rate.NewLimiter(rate.Limit(conf.RareSamplerTPS), rareSamplerBurst), - ttl: conf.RareSamplerCooldownPeriod, - cardinality: conf.RareSamplerCardinality, - seen: make(map[Signature]*seenSpans), - } - return e -} - -// Sample a trace and returns true if trace was sampled (should be kept) -func (e *RareSampler) Sample(now time.Time, t *pb.TraceChunk, env string) bool { - - if !e.enabled.Load() { - return false - } - return e.handleTrace(now, env, t) -} - -// SetEnabled marks the sampler as enabled or disabled -func (e *RareSampler) SetEnabled(enabled bool) { - e.enabled.Store(enabled) -} - -// IsEnabled returns whether the sampler is enabled -func (e *RareSampler) IsEnabled() bool { - return e.enabled.Load() -} - -func (e *RareSampler) handlePriorityTrace(now time.Time, env string, t *pb.TraceChunk, ttl time.Duration) { - expire := now.Add(ttl) - for _, s := range t.Spans { - if !traceutil.HasTopLevel(s) && !traceutil.IsMeasured(s) { - continue - } - e.addSpan(expire, env, s) - } -} - -func (e *RareSampler) handleTrace(now time.Time, env string, t *pb.TraceChunk) bool { - var sampled bool - for _, s := range t.Spans { - if !traceutil.HasTopLevel(s) && !traceutil.IsMeasured(s) { - continue - } - if sampled = e.sampleSpan(now, env, s); sampled { - break - } - } - - if sampled { - e.handlePriorityTrace(now, env, t, e.ttl) - } - return sampled -} - -// addSpan adds a span to the seenSpans with an expire time. -func (e *RareSampler) addSpan(expire time.Time, env string, s *pb.Span) { - shardSig := ServiceSignature{env, s.Service}.Hash() - ss := e.loadSeenSpans(shardSig) - ss.add(expire, s) -} - -// sampleSpan samples a span if it's not in the seenSpan set. If the span is sampled -// it's added to the seenSpans set. -func (e *RareSampler) sampleSpan(now time.Time, env string, s *pb.Span) bool { - var sampled bool - shardSig := ServiceSignature{env, s.Service}.Hash() - ss := e.loadSeenSpans(shardSig) - sig := ss.sign(s) - expire, ok := ss.getExpire(sig) - if now.After(expire) || !ok { - sampled = e.limiter.Allow() - if sampled { - ss.add(now.Add(e.ttl), s) - e.hits.Inc() - traceutil.SetMetric(s, rareKey, 1) - } else { - e.misses.Inc() - } - } - return sampled -} - -func (e *RareSampler) loadSeenSpans(shardSig Signature) *seenSpans { - e.mu.RLock() - s, ok := e.seen[shardSig] - e.mu.RUnlock() - if ok { - return s - } - s = &seenSpans{ - expires: make(map[spanHash]time.Time), - totalSamplerShrinks: e.shrinks, - cardinality: e.cardinality, - } - e.mu.Lock() - e.seen[shardSig] = s - e.mu.Unlock() - return s -} - -func (e *RareSampler) report(statsd statsd.ClientInterface) { - _ = statsd.Count(MetricsRareHits, e.hits.Swap(0), nil, 1) - _ = statsd.Count(MetricsRareMisses, e.misses.Swap(0), nil, 1) - _ = statsd.Gauge(MetricsRareShrinks, float64(e.shrinks.Load()), nil, 1) -} - -// seenSpans keeps record of a set of spans. -type seenSpans struct { - mu sync.RWMutex - // expires contains expire time of each span seen. - expires map[spanHash]time.Time - // shrunk caracterize seenSpans when it's limited in size by capacityLimit. - shrunk bool - // totalSamplerShrinks is the reference to the total number of shrinks reported by RareSampler. - totalSamplerShrinks *atomic.Int64 - // cardinality limits the number of spans considered per combination of (env, service). - cardinality int -} - -func (ss *seenSpans) add(expire time.Time, s *pb.Span) { - sig := ss.sign(s) - storedExpire, ok := ss.getExpire(sig) - if ok && expire.Sub(storedExpire) < ttlRenewalPeriod { - return - } - // slow path - ss.mu.Lock() - ss.expires[sig] = expire - - // if cardinality limit reached, shrink - size := len(ss.expires) - if size > ss.cardinality { - ss.shrink() - } - ss.mu.Unlock() -} - -// shrink limits the cardinality of signatures considered and the memory usage. -// This ensure that a service with high cardinality of resources does not consume -// all sampling tokens. The cardinality limit matches a backend limit. -// This function is not thread safe and should be called between locks -func (ss *seenSpans) shrink() { - newExpires := make(map[spanHash]time.Time, ss.cardinality) - for h, expire := range ss.expires { - newExpires[h%spanHash(ss.cardinality)] = expire - } - ss.expires = newExpires - ss.shrunk = true - ss.totalSamplerShrinks.Inc() -} - -func (ss *seenSpans) getExpire(h spanHash) (time.Time, bool) { - ss.mu.RLock() - expire, ok := ss.expires[h] - ss.mu.RUnlock() - return expire, ok -} - -func (ss *seenSpans) sign(s *pb.Span) spanHash { - h := computeSpanHash(s, "", true) - if ss.shrunk { - h = h % spanHash(ss.cardinality) - } - return h -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/sampler.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/sampler.go deleted file mode 100644 index aec01021ff..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/sampler.go +++ /dev/null @@ -1,254 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package sampler contains all the logic of the agent-side trace sampling -package sampler - -import ( - "math" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -const ( - // KeySamplingRateGlobal is a metric key holding the global sampling rate. - KeySamplingRateGlobal = "_sample_rate" - - // KeySamplingRateClient is a metric key holding the client-set sampling rate for APM events. - KeySamplingRateClient = "_dd1.sr.rcusr" - - // KeySamplingRatePreSampler is a metric key holding the API rate limiter's rate for APM events. - KeySamplingRatePreSampler = "_dd1.sr.rapre" - - // KeySamplingRateEventExtraction is the key of the metric storing the event extraction rate on an APM event. - KeySamplingRateEventExtraction = "_dd1.sr.eausr" - - // KeySamplingRateMaxEPSSampler is the key of the metric storing the max eps sampler rate on an APM event. - KeySamplingRateMaxEPSSampler = "_dd1.sr.eamax" - - // KeyErrorType is the key of the error type in the meta map - KeyErrorType = "error.type" - - // KeyAnalyzedSpans is the metric key which specifies if a span is analyzed. - KeyAnalyzedSpans = "_dd.analyzed" - - // KeyHTTPStatusCode is the key of the http status code in the meta map - KeyHTTPStatusCode = "http.status_code" - - // KeySpanSamplingMechanism is the metric key holding a span sampling rule that a span was kept on. - KeySpanSamplingMechanism = "_dd.span_sampling.mechanism" -) - -// SamplingPriority is the type encoding a priority sampling decision. -type SamplingPriority int8 - -const ( - // PriorityNone is the value for SamplingPriority when no priority sampling decision could be found. - PriorityNone SamplingPriority = math.MinInt8 - - // PriorityUserDrop is the value set by a user to explicitly drop a trace. - PriorityUserDrop SamplingPriority = -1 - - // PriorityAutoDrop is the value set by a tracer to suggest dropping a trace. - PriorityAutoDrop SamplingPriority = 0 - - // PriorityAutoKeep is the value set by a tracer to suggest keeping a trace. - PriorityAutoKeep SamplingPriority = 1 - - // PriorityUserKeep is the value set by a user to explicitly keep a trace. - PriorityUserKeep SamplingPriority = 2 - - // 2^64 - 1 - maxTraceID = ^uint64(0) - maxTraceIDFloat = float64(maxTraceID) - // Good number for Knuth hashing (large, prime, fit in int64 for languages without uint64) - samplerHasher = uint64(1111111111111111111) -) - -// IsKeep returns whether the priority is "keep". -func (s SamplingPriority) IsKeep() bool { - return s == PriorityAutoKeep || s == PriorityUserKeep -} - -func (s SamplingPriority) tagValue() string { - switch s { - case PriorityUserDrop: - return "manual_drop" - case PriorityAutoDrop: - return "auto_drop" - case PriorityAutoKeep: - return "auto_keep" - case PriorityUserKeep: - return "manual_keep" - default: - return "none" - } -} - -// SampleByRate returns whether to keep a trace, based on its ID and a sampling rate. -// This assumes that trace IDs are nearly uniformly distributed. -func SampleByRate(traceID uint64, rate float64) bool { - if rate < 1 { - return traceID*samplerHasher < uint64(rate*maxTraceIDFloat) - } - return true -} - -// GetSamplingPriority returns the value of the sampling priority metric set on this span and a boolean indicating if -// such a metric was actually found or not. -func GetSamplingPriority(t *pb.TraceChunk) (SamplingPriority, bool) { - if t.Priority == int32(PriorityNone) { - return 0, false - } - return SamplingPriority(t.Priority), true -} - -// GetGlobalRate gets the cumulative sample rate of the trace to which this span belongs to. -func GetGlobalRate(s *pb.Span) float64 { - return getMetricDefault(s, KeySamplingRateGlobal, 1.0) -} - -// GetClientRate gets the rate at which the trace this span belongs to was sampled by the tracer. -// NOTE: This defaults to 1 if no rate is stored. -func GetClientRate(s *pb.Span) float64 { - return getMetricDefault(s, KeySamplingRateClient, 1.0) -} - -// SetClientRate sets the rate at which the trace this span belongs to was sampled by the tracer. -func SetClientRate(s *pb.Span, rate float64) { - if rate < 1 { - setMetric(s, KeySamplingRateClient, rate) - } else { - // We assume missing value is 1 to save bandwidth (check getter). - delete(s.Metrics, KeySamplingRateClient) - } -} - -// GetPreSampleRate returns the rate at which the trace this span belongs to was sampled by the agent's presampler. -// NOTE: This defaults to 1 if no rate is stored. -func GetPreSampleRate(s *pb.Span) float64 { - return getMetricDefault(s, KeySamplingRatePreSampler, 1.0) -} - -// SetPreSampleRate sets the rate at which the trace this span belongs to was sampled by the agent's presampler. -func SetPreSampleRate(s *pb.Span, rate float64) { - if rate < 1 { - setMetric(s, KeySamplingRatePreSampler, rate) - } else { - // We assume missing value is 1 to save bandwidth (check getter). - delete(s.Metrics, KeySamplingRatePreSampler) - } -} - -// GetEventExtractionRate gets the rate at which the trace from which we extracted this event was sampled at the tracer. -// This defaults to 1 if no rate is stored. -func GetEventExtractionRate(s *pb.Span) float64 { - return getMetricDefault(s, KeySamplingRateEventExtraction, 1.0) -} - -// SetEventExtractionRate sets the rate at which the trace from which we extracted this event was sampled at the tracer. -func SetEventExtractionRate(s *pb.Span, rate float64) { - if rate < 1 { - setMetric(s, KeySamplingRateEventExtraction, rate) - } else { - // reduce bandwidth, default is assumed 1.0 in backend - delete(s.Metrics, KeySamplingRateEventExtraction) - } -} - -// GetMaxEPSRate gets the rate at which this event was sampled by the max eps event sampler. -func GetMaxEPSRate(s *pb.Span) float64 { - return getMetricDefault(s, KeySamplingRateMaxEPSSampler, 1.0) -} - -// SetMaxEPSRate sets the rate at which this event was sampled by the max eps event sampler. -func SetMaxEPSRate(s *pb.Span, rate float64) { - if rate < 1 { - setMetric(s, KeySamplingRateMaxEPSSampler, rate) - } else { - // reduce bandwidth, default is assumed 1.0 in backend - delete(s.Metrics, KeySamplingRateMaxEPSSampler) - } -} - -// SetAnalyzedSpan marks a span analyzed -func SetAnalyzedSpan(s *pb.Span) { - setMetric(s, KeyAnalyzedSpans, 1) -} - -// IsAnalyzedSpan checks if a span is analyzed -func IsAnalyzedSpan(s *pb.Span) bool { - v, _ := getMetric(s, KeyAnalyzedSpans) - return v == 1 -} - -func weightRoot(s *pb.Span) float32 { - if s == nil { - return 1 - } - clientRate, ok := s.Metrics[KeySamplingRateGlobal] - if !ok || clientRate <= 0.0 || clientRate > 1.0 { - clientRate = 1 - } - preSamplerRate, ok := s.Metrics[KeySamplingRatePreSampler] - if !ok || preSamplerRate <= 0.0 || preSamplerRate > 1.0 { - preSamplerRate = 1 - } - return float32(1.0 / (preSamplerRate * clientRate)) -} - -func getMetric(s *pb.Span, k string) (float64, bool) { - if s.Metrics == nil { - return 0, false - } - val, ok := s.Metrics[k] - return val, ok -} - -// getMetricDefault gets a value in the span Metrics map or default if no value is stored there. -func getMetricDefault(s *pb.Span, k string, def float64) float64 { - if val, ok := getMetric(s, k); ok { - return val - } - return def -} - -// setMetric sets a value in the span Metrics map. -func setMetric(s *pb.Span, key string, val float64) { - if s.Metrics == nil { - s.Metrics = make(map[string]float64) - } - s.Metrics[key] = val -} - -// SingleSpanSampling does single span sampling on the trace, returning true if the trace was modified -func SingleSpanSampling(pt *traceutil.ProcessedTrace) bool { - ssSpans := getSingleSpanSampledSpans(pt) - if len(ssSpans) > 0 { - // Span sampling has kept some spans -> update the chunk - pt.TraceChunk.Spans = ssSpans - pt.TraceChunk.Priority = int32(PriorityUserKeep) - pt.TraceChunk.DroppedTrace = false - return true - } - return false -} - -// GetSingleSpanSampledSpans searches chunk for spans that have a span sampling tag set and returns them. -func getSingleSpanSampledSpans(pt *traceutil.ProcessedTrace) []*pb.Span { - var sampledSpans []*pb.Span - for _, span := range pt.TraceChunk.Spans { - if _, ok := traceutil.GetMetric(span, KeySpanSamplingMechanism); ok { - // Keep only those spans that have a span sampling tag. - sampledSpans = append(sampledSpans, span) - } - } - if sampledSpans == nil { - // No span sampling tags → no span sampling. - return nil - } - return sampledSpans -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/scoresampler.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/scoresampler.go deleted file mode 100644 index 73d7887110..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/scoresampler.go +++ /dev/null @@ -1,133 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "sync" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-go/v5/statsd" -) - -const ( - errorsRateKey = "_dd.errors_sr" - noPriorityRateKey = "_dd.no_p_sr" - // shrinkCardinality is the max Signature cardinality before shrinking - shrinkCardinality = 200 -) - -// ErrorsSampler is dedicated to catching traces containing spans with errors. -type ErrorsSampler struct{ ScoreSampler } - -// NoPrioritySampler is dedicated to catching traces with no priority set. -type NoPrioritySampler struct{ ScoreSampler } - -// ScoreSampler samples pieces of traces by computing a signature based on spans (service, name, rsc, http.status, error.type) -// scoring it and applying a rate. -// The rates are applied on the TraceID to maximize the number of chunks with errors caught for the same traceID. -// For a set traceID: P(chunk1 kept and chunk2 kept) = min(P(chunk1 kept), P(chunk2 kept)) -type ScoreSampler struct { - *Sampler - samplingRateKey string - disabled bool - mu sync.Mutex - shrinkAllowList map[Signature]float64 -} - -// NewNoPrioritySampler returns an initialized Sampler dedicated to traces with -// no priority set. -func NewNoPrioritySampler(conf *config.AgentConfig) *NoPrioritySampler { - s := newSampler(conf.ExtraSampleRate, conf.TargetTPS) - return &NoPrioritySampler{ScoreSampler{Sampler: s, samplingRateKey: noPriorityRateKey}} -} - -var _ AdditionalMetricsReporter = (*NoPrioritySampler)(nil) - -func (s *NoPrioritySampler) report(statsd statsd.ClientInterface) { - s.Sampler.report(statsd, NameNoPriority) -} - -// NewErrorsSampler returns an initialized Sampler dedicate to errors. It behaves -// just like the normal ScoreEngine except for its GetType method (useful -// for reporting). -func NewErrorsSampler(conf *config.AgentConfig) *ErrorsSampler { - s := newSampler(conf.ExtraSampleRate, conf.ErrorTPS) - return &ErrorsSampler{ScoreSampler{Sampler: s, samplingRateKey: errorsRateKey, disabled: conf.ErrorTPS == 0}} -} - -var _ AdditionalMetricsReporter = (*ErrorsSampler)(nil) - -func (s *ErrorsSampler) report(statsd statsd.ClientInterface) { - s.Sampler.report(statsd, NameError) -} - -// Sample counts an incoming trace and tells if it is a sample which has to be kept -func (s *ScoreSampler) Sample(now time.Time, trace pb.Trace, root *pb.Span, env string) bool { - if s.disabled { - return false - } - - // Extra safety, just in case one trace is empty - if len(trace) == 0 { - return false - } - signature := computeSignatureWithRootAndEnv(trace, root, env) - signature = s.shrink(signature) - // Update sampler state by counting this trace - s.countWeightedSig(now, signature, weightRoot(root)) - - rate := s.getSignatureSampleRate(signature) - - sampled := s.applySampleRate(root, rate) - return sampled -} - -// UpdateTargetTPS updates the target tps -func (s *ScoreSampler) UpdateTargetTPS(targetTPS float64) { - s.Sampler.updateTargetTPS(targetTPS) -} - -// GetTargetTPS returns the target tps -func (s *ScoreSampler) GetTargetTPS() float64 { - return s.Sampler.targetTPS.Load() -} - -func (s *ScoreSampler) applySampleRate(root *pb.Span, rate float64) bool { - initialRate := GetGlobalRate(root) - newRate := initialRate * rate - traceID := root.TraceID - sampled := SampleByRate(traceID, newRate) - if sampled { - setMetric(root, s.samplingRateKey, rate) - } - return sampled -} - -// shrink limits the number of signatures stored in the sampler. -// After a cardinality above shrinkCardinality/2 is reached -// signatures are spread uniformly on a fixed set of values. -// This ensures that ScoreSamplers are memory capped. -// When the shrink is triggered, previously active signatures -// stay unaffected. -// New signatures may share the same TPS computation. -func (s *ScoreSampler) shrink(sig Signature) Signature { - s.mu.Lock() - defer s.mu.Unlock() - if s.size() < shrinkCardinality/2 { - s.shrinkAllowList = nil - return sig - } - if s.shrinkAllowList == nil { - rates, _ := s.getAllSignatureSampleRates() - s.shrinkAllowList = rates - } - if _, ok := s.shrinkAllowList[sig]; ok { - return sig - } - return sig % (shrinkCardinality / 2) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/signature.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/signature.go deleted file mode 100644 index bca9a5f56a..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/sampler/signature.go +++ /dev/null @@ -1,122 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package sampler - -import ( - "sort" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -// Signature is a hash representation of trace or a service, used to identify -// similar signatures. -type Signature uint64 - -// spanHash is the type of the hashes used during the computation of a signature -// Use FNV for hashing since it is super-cheap and we have no cryptographic needs -type spanHash uint32 -type spanHashSlice []spanHash - -func (p spanHashSlice) Len() int { return len(p) } -func (p spanHashSlice) Less(i, j int) bool { return p[i] < p[j] } -func (p spanHashSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func sortHashes(hashes []spanHash) { sort.Sort(spanHashSlice(hashes)) } - -// computeSignatureWithRootAndEnv generates the signature of a trace knowing its root -// Signature based on the hash of (env, service, name, resource, is_error) for the root, plus the set of -// (env, service, name, is_error) of each span. -func computeSignatureWithRootAndEnv(trace pb.Trace, root *pb.Span, env string) Signature { - rootHash := computeSpanHash(root, env, true) - spanHashes := make([]spanHash, 0, len(trace)) - - for i := range trace { - spanHashes = append(spanHashes, computeSpanHash(trace[i], env, false)) - } - // Now sort, dedupe then merge all the hashes to build the signature - sortHashes(spanHashes) - - last := spanHashes[0] - traceHash := last ^ rootHash - for i := 1; i < len(spanHashes); i++ { - if spanHashes[i] != last { - last = spanHashes[i] - traceHash = spanHashes[i] ^ traceHash - } - } - - return Signature(traceHash) -} - -// ServiceSignature represents a unique way to identify a service. -type ServiceSignature struct{ Name, Env string } - -// Hash generates the signature of a trace with minimal information such as -// service and env, this is typically used by distributed sampling based on -// priority, and used as a key to store the desired rate for a given -// service,env tuple. -func (s ServiceSignature) Hash() Signature { - h := new32a() - h.Write([]byte(s.Name)) - h.WriteChar(',') - h.Write([]byte(s.Env)) - return Signature(h.Sum32()) -} - -func (s ServiceSignature) String() string { - return "service:" + s.Name + ",env:" + s.Env -} - -func computeSpanHash(span *pb.Span, env string, withResource bool) spanHash { - h := new32a() - h.Write([]byte(env)) - h.Write([]byte(span.Service)) - h.Write([]byte(span.Name)) - h.WriteChar(byte(span.Error)) - if withResource { - h.Write([]byte(span.Resource)) - } - code, ok := traceutil.GetMeta(span, KeyHTTPStatusCode) - if ok { - h.Write([]byte(code)) - } - typ, ok := traceutil.GetMeta(span, KeyErrorType) - if ok { - h.Write([]byte(typ)) - } - return spanHash(h.Sum32()) -} - -// sum32a is an adaptation of https://golang.org/pkg/hash/fnv/#New32a, but simplified -// for our use case to remove interfaces which caused unnecessary allocations. -type sum32a uint32 - -const ( - offset32 = 2166136261 - prime32 = 16777619 -) - -func new32a() sum32a { - return offset32 -} - -func (s *sum32a) Write(data []byte) { - hash := *s - for _, c := range data { - hash ^= sum32a(c) - hash *= prime32 - } - *s = hash -} - -func (s *sum32a) WriteChar(c byte) { - hash := *s - hash ^= sum32a(c) - hash *= prime32 - *s = hash -} - -func (s *sum32a) Sum32() uint32 { return uint32(*s) } diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/aggregation.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/aggregation.go deleted file mode 100644 index ba67bacd1f..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/aggregation.go +++ /dev/null @@ -1,197 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package stats contains the logic to process APM stats. -package stats - -import ( - "hash/fnv" - "sort" - "strconv" - "strings" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" - "google.golang.org/genproto/googleapis/rpc/code" -) - -const ( - tagSynthetics = "synthetics" - tagSpanKind = "span.kind" - tagBaseService = "_dd.base_service" -) - -// Aggregation contains all the dimension on which we aggregate statistics. -type Aggregation struct { - BucketsAggregationKey - PayloadAggregationKey -} - -// BucketsAggregationKey specifies the key by which a bucket is aggregated. -type BucketsAggregationKey struct { - Service string - Name string - Resource string - Type string - SpanKind string - StatusCode uint32 - Synthetics bool - PeerTagsHash uint64 - IsTraceRoot pb.Trilean - GRPCStatusCode string -} - -// PayloadAggregationKey specifies the key by which a payload is aggregated. -type PayloadAggregationKey struct { - Env string - Hostname string - Version string - ContainerID string - GitCommitSha string - ImageTag string - ProcessTagsHash uint64 -} - -func getStatusCode(meta map[string]string, metrics map[string]float64) uint32 { - code, ok := metrics[traceutil.TagStatusCode] - if ok { - // only 7.39.0+, for lesser versions, always use Meta - return uint32(code) - } - strC := meta[traceutil.TagStatusCode] - if strC == "" { - return 0 - } - c, err := strconv.ParseUint(strC, 10, 32) - if err != nil { - log.Debugf("Invalid status code %s. Using 0.", strC) - return 0 - } - return uint32(c) -} - -// NewAggregationFromSpan creates a new aggregation from the provided span and env -func NewAggregationFromSpan(s *StatSpan, origin string, aggKey PayloadAggregationKey) Aggregation { - synthetics := strings.HasPrefix(origin, tagSynthetics) - var isTraceRoot pb.Trilean - if s.parentID == 0 { - isTraceRoot = pb.Trilean_TRUE - } else { - isTraceRoot = pb.Trilean_FALSE - } - agg := Aggregation{ - PayloadAggregationKey: aggKey, - BucketsAggregationKey: BucketsAggregationKey{ - Resource: s.resource, - Service: s.service, - Name: s.name, - SpanKind: s.spanKind, - Type: s.typ, - StatusCode: s.statusCode, - Synthetics: synthetics, - IsTraceRoot: isTraceRoot, - GRPCStatusCode: s.grpcStatusCode, - PeerTagsHash: tagsFnvHash(s.matchingPeerTags), - }, - } - return agg -} - -func processTagsHash(processTags string) uint64 { - if processTags == "" { - return 0 - } - return tagsFnvHash(strings.Split(processTags, ",")) -} - -func tagsFnvHash(tags []string) uint64 { - if len(tags) == 0 { - return 0 - } - if !sort.StringsAreSorted(tags) { - sort.Strings(tags) - } - h := fnv.New64a() - for i, t := range tags { - if i > 0 { - h.Write([]byte{0}) - } - h.Write([]byte(t)) - } - return h.Sum64() -} - -// NewAggregationFromGroup gets the Aggregation key of grouped stats. -func NewAggregationFromGroup(g *pb.ClientGroupedStats) Aggregation { - return Aggregation{ - BucketsAggregationKey: BucketsAggregationKey{ - Resource: g.Resource, - Service: g.Service, - Name: g.Name, - SpanKind: g.SpanKind, - StatusCode: g.HTTPStatusCode, - Synthetics: g.Synthetics, - PeerTagsHash: tagsFnvHash(g.PeerTags), - IsTraceRoot: g.IsTraceRoot, - GRPCStatusCode: g.GRPCStatusCode, - }, - } -} - -/* -The gRPC codes Google API checks for "CANCELLED". Sometimes we receive "Canceled" from upstream, -sometimes "CANCELLED", which is why both spellings appear in the map. -For multi-word codes, sometimes from upstream we receive them as one word, such as DeadlineExceeded. -Google's API checks for strings with an underscore and in all caps, and would only recognize codes -formatted like "ALREADY_EXISTS" or "DEADLINE_EXCEEDED" -*/ -var grpcStatusMap = map[string]string{ - "CANCELLED": "1", - "CANCELED": "1", - "INVALIDARGUMENT": "3", - "DEADLINEEXCEEDED": "4", - "NOTFOUND": "5", - "ALREADYEXISTS": "6", - "PERMISSIONDENIED": "7", - "RESOURCEEXHAUSTED": "8", - "FAILEDPRECONDITION": "9", - "OUTOFRANGE": "11", - "DATALOSS": "15", -} - -func getGRPCStatusCode(meta map[string]string, metrics map[string]float64) string { - // List of possible keys to check in order - statusCodeFields := []string{"rpc.grpc.status_code", "grpc.code", "rpc.grpc.status.code", "grpc.status.code"} - - for _, key := range statusCodeFields { - if strC, exists := meta[key]; exists && strC != "" { - c, err := strconv.ParseUint(strC, 10, 32) - if err == nil { - return strconv.FormatUint(c, 10) - } - strC = strings.TrimPrefix(strC, "StatusCode.") // Some tracers send status code values prefixed by "StatusCode." - strCUpper := strings.ToUpper(strC) - if statusCode, exists := grpcStatusMap[strCUpper]; exists { - return statusCode - } - - // If not integer or canceled or multi-word, check for valid gRPC status string - if codeNum, found := code.Code_value[strCUpper]; found { - return strconv.Itoa(int(codeNum)) - } - - return "" - } - } - - for _, key := range statusCodeFields { // Check if gRPC status code is stored in metrics - if code, ok := metrics[key]; ok { - return strconv.FormatUint(uint64(code), 10) - } - } - - return "" -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/client_stats_aggregator.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/client_stats_aggregator.go deleted file mode 100644 index a94037a447..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/client_stats_aggregator.go +++ /dev/null @@ -1,449 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import ( - "time" - - "github.com/DataDog/datadog-agent/pkg/trace/version" - "github.com/DataDog/sketches-go/ddsketch" - "github.com/DataDog/sketches-go/ddsketch/mapping" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" - "github.com/DataDog/sketches-go/ddsketch/store" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/watchdog" - - "github.com/DataDog/datadog-go/v5/statsd" - - "google.golang.org/protobuf/proto" -) - -const ( - bucketDuration = 2 * time.Second - clientBucketDuration = 10 * time.Second - oldestBucketStart = 20 * time.Second -) - -var ( - ddsketchMapping, _ = mapping.NewLogarithmicMapping(relativeAccuracy) -) - -// ClientStatsAggregator aggregates client stats payloads on buckets of bucketDuration -// If a single payload is received on a bucket, this Aggregator is a passthrough. -// If two or more payloads collide, their counts will be aggregated into one bucket. -// Multiple payloads will be sent: -// - Original payloads with their distributions will be sent with counts zeroed. -// - A single payload with the bucket aggregated counts will be sent. -// This and the aggregator timestamp alignment ensure that all counts will have at most one point per second per agent for a specific granularity. -// While distributions are not tied to the agent. -type ClientStatsAggregator struct { - In chan *pb.ClientStatsPayload - writer Writer - buckets map[int64]*bucket // buckets used to aggregate client stats - conf *config.AgentConfig - - flushTicker *time.Ticker - oldestTs time.Time - agentEnv string - agentHostname string - agentVersion string - - exit chan struct{} - done chan struct{} - - statsd statsd.ClientInterface -} - -// NewClientStatsAggregator initializes a new aggregator ready to be started -func NewClientStatsAggregator(conf *config.AgentConfig, writer Writer, statsd statsd.ClientInterface) *ClientStatsAggregator { - c := &ClientStatsAggregator{ - flushTicker: time.NewTicker(time.Second), - In: make(chan *pb.ClientStatsPayload, 10), - buckets: make(map[int64]*bucket, 20), - conf: conf, - writer: writer, - agentEnv: conf.DefaultEnv, - agentHostname: conf.Hostname, - agentVersion: conf.AgentVersion, - oldestTs: alignAggTs(time.Now().Add(bucketDuration - oldestBucketStart)), - exit: make(chan struct{}), - done: make(chan struct{}), - statsd: statsd, - } - return c -} - -// Start starts the aggregator. -func (a *ClientStatsAggregator) Start() { - go func() { - defer watchdog.LogOnPanic(a.statsd) - for { - select { - case t := <-a.flushTicker.C: - a.flushOnTime(t) - case input := <-a.In: - a.add(time.Now(), input) - case <-a.exit: - a.flushAll() - close(a.done) - return - } - } - }() -} - -// Stop stops the aggregator. Calling Stop twice will panic. -func (a *ClientStatsAggregator) Stop() { - close(a.exit) - a.flushTicker.Stop() - <-a.done -} - -// flushOnTime flushes all buckets up to flushTs, except the last one. -func (a *ClientStatsAggregator) flushOnTime(now time.Time) { - flushTs := alignAggTs(now.Add(bucketDuration - oldestBucketStart)) - for t := a.oldestTs; t.Before(flushTs); t = t.Add(bucketDuration) { - if b, ok := a.buckets[t.Unix()]; ok { - a.flush(b.aggregationToPayloads()) - delete(a.buckets, t.Unix()) - } - } - a.oldestTs = flushTs -} - -func (a *ClientStatsAggregator) flushAll() { - for _, b := range a.buckets { - a.flush(b.aggregationToPayloads()) - } -} - -// getAggregationBucketTime returns unix time at which we aggregate the bucket. -// We timeshift payloads older than a.oldestTs to a.oldestTs. -// Payloads in the future are timeshifted to the latest bucket. -func (a *ClientStatsAggregator) getAggregationBucketTime(now, bs time.Time) time.Time { - if bs.Before(a.oldestTs) { - return a.oldestTs - } - if bs.After(now) { - return alignAggTs(now) - } - return alignAggTs(bs) -} - -// add takes a new ClientStatsPayload and aggregates its stats in the internal buckets. -func (a *ClientStatsAggregator) add(now time.Time, p *pb.ClientStatsPayload) { - // populate container tags data on the payload - a.setVersionDataFromContainerTags(p) - p.ProcessTagsHash = processTagsHash(p.ProcessTags) - // compute the PayloadAggregationKey, common for all buckets within the payload - payloadAggKey := newPayloadAggregationKey(p.Env, p.Hostname, p.Version, p.ContainerID, p.GitCommitSha, p.ImageTag, p.ProcessTagsHash) - - for _, clientBucket := range p.Stats { - clientBucketStart := time.Unix(0, int64(clientBucket.Start)) - ts := a.getAggregationBucketTime(now, clientBucketStart) - b, ok := a.buckets[ts.Unix()] - if !ok { - b = &bucket{ - ts: ts, - agg: make(map[PayloadAggregationKey]map[BucketsAggregationKey]*aggregatedStats), - processTags: make(map[uint64]string), - } - a.buckets[ts.Unix()] = b - } - b.processTags[p.ProcessTagsHash] = p.ProcessTags - b.aggregateStatsBucket(clientBucket, payloadAggKey) - } -} - -func (a *ClientStatsAggregator) flush(p []*pb.ClientStatsPayload) { - if len(p) == 0 { - return - } - - a.writer.Write(&pb.StatsPayload{ - Stats: p, - AgentEnv: a.agentEnv, - AgentHostname: a.agentHostname, - AgentVersion: a.agentVersion, - ClientComputed: true, - }) -} - -func (a *ClientStatsAggregator) setVersionDataFromContainerTags(p *pb.ClientStatsPayload) { - // No need to go any further if we already have the information in the payload. - if p.ImageTag != "" && p.GitCommitSha != "" { - return - } - if p.ContainerID != "" { - cTags, err := a.conf.ContainerTags(p.ContainerID) - if err != nil { - log.Error("Client stats aggregator is unable to resolve container ID (%s) to container tags: %v", p.ContainerID, err) - } else { - gitCommitSha, imageTag := version.GetVersionDataFromContainerTags(cTags) - // Only override if the payload's original values were empty strings. - if p.ImageTag == "" { - p.ImageTag = imageTag - } - if p.GitCommitSha == "" { - p.GitCommitSha = gitCommitSha - } - } - } -} - -// alignAggTs aligns time to the aggregator timestamps. -// Timestamps from the aggregator are never aligned with concentrator timestamps. -// This ensures that all counts sent by a same agent host are never on the same second. -// aggregator timestamps: 2ks+1s (1s, 3s, 5s, 7s, 9s, 11s) -// concentrator timestamps: 10ks (0s, 10s, 20s ..) -func alignAggTs(t time.Time) time.Time { - return t.Truncate(bucketDuration).Add(time.Second) -} - -type bucket struct { - // ts is the timestamp attached to the payload - ts time.Time - // agg contains the aggregated Hits/Errors/Duration counts - agg map[PayloadAggregationKey]map[BucketsAggregationKey]*aggregatedStats - processTags map[uint64]string -} - -// aggregateStatsBucket takes a ClientStatsBucket and a PayloadAggregationKey, and aggregates all counts -// and distributions from the ClientGroupedStats inside the bucket. -func (b *bucket) aggregateStatsBucket(sb *pb.ClientStatsBucket, payloadAggKey PayloadAggregationKey) { - payloadAgg, ok := b.agg[payloadAggKey] - if !ok { - payloadAgg = make(map[BucketsAggregationKey]*aggregatedStats, len(sb.Stats)) - b.agg[payloadAggKey] = payloadAgg - } - for _, gs := range sb.Stats { - if gs == nil { - continue - } - aggKey := newBucketAggregationKey(gs) - agg, ok := payloadAgg[aggKey] - if !ok { - agg = &aggregatedStats{ - hits: gs.Hits, - topLevelHits: gs.TopLevelHits, - errors: gs.Errors, - duration: gs.Duration, - peerTags: gs.PeerTags, - okDistributionRaw: gs.OkSummary, // store encoded version only - errDistributionRaw: gs.ErrorSummary, // store encoded version only - } - payloadAgg[aggKey] = agg - continue - } - - // aggregate counts - agg.hits += gs.Hits - agg.topLevelHits += gs.TopLevelHits - agg.errors += gs.Errors - agg.duration += gs.Duration - - // Decode, if needed, the raw ddsketches from the first payload that reached the bucket - if agg.okDistributionRaw != nil { - sketch, err := decodeSketch(agg.okDistributionRaw) - if err != nil { - log.Error("Unable to decode OK distribution ddsketch: %v", err) - } else { - agg.okDistribution = normalizeSketch(sketch) - } - agg.okDistributionRaw = nil - } - if agg.errDistributionRaw != nil { - sketch, err := decodeSketch(agg.errDistributionRaw) - if err != nil { - log.Error("Unable to decode Error distribution ddsketch: %v", err) - } else { - agg.errDistribution = normalizeSketch(sketch) - } - agg.errDistributionRaw = nil - } - - // aggregate distributions - if sketch, err := mergeSketch(agg.okDistribution, gs.OkSummary); err == nil { - agg.okDistribution = sketch - } else { - log.Error("Unable to merge OK distribution ddsketch: %v", err) - } - - if sketch, err := mergeSketch(agg.errDistribution, gs.ErrorSummary); err == nil { - agg.errDistribution = sketch - } else { - log.Error("Unable to merge Error distribution ddsketch: %v", err) - } - } -} - -// aggregationToPayloads converts the contents of the bucket into ClientStatsPayloads -func (b *bucket) aggregationToPayloads() []*pb.ClientStatsPayload { - res := make([]*pb.ClientStatsPayload, 0, len(b.agg)) - for payloadKey, aggrStats := range b.agg { - groupedStats := make([]*pb.ClientGroupedStats, 0, len(aggrStats)) - for aggrKey, stats := range aggrStats { - gs, err := exporGroupedStats(aggrKey, stats) - if err != nil { - log.Errorf("Dropping stats bucket due to encoding error: %v.", err) - continue - } - groupedStats = append(groupedStats, gs) - } - clientBuckets := []*pb.ClientStatsBucket{ - { - Start: uint64(b.ts.UnixNano()), - Duration: uint64(clientBucketDuration.Nanoseconds()), - Stats: groupedStats, - }} - res = append(res, &pb.ClientStatsPayload{ - Hostname: payloadKey.Hostname, - Env: payloadKey.Env, - Version: payloadKey.Version, - ImageTag: payloadKey.ImageTag, - GitCommitSha: payloadKey.GitCommitSha, - ContainerID: payloadKey.ContainerID, - Stats: clientBuckets, - ProcessTagsHash: payloadKey.ProcessTagsHash, - ProcessTags: b.processTags[payloadKey.ProcessTagsHash], - }) - } - return res -} - -func exporGroupedStats(aggrKey BucketsAggregationKey, stats *aggregatedStats) (*pb.ClientGroupedStats, error) { - // if the raw sketches are still present (only one payload received), we use them directly. - // Otherwise the aggregated DDSketches are serialized. - okSummary := stats.okDistributionRaw - errSummary := stats.errDistributionRaw - - var err error - if stats.okDistribution != nil { - msg := stats.okDistribution.ToProto() - okSummary, err = proto.Marshal(msg) - if err != nil { - return &pb.ClientGroupedStats{}, err - } - } - if stats.errDistribution != nil { - msg := stats.errDistribution.ToProto() - errSummary, err = proto.Marshal(msg) - if err != nil { - return &pb.ClientGroupedStats{}, err - } - } - return &pb.ClientGroupedStats{ - Service: aggrKey.Service, - Name: aggrKey.Name, - SpanKind: aggrKey.SpanKind, - Resource: aggrKey.Resource, - HTTPStatusCode: aggrKey.StatusCode, - Type: aggrKey.Type, - Synthetics: aggrKey.Synthetics, - IsTraceRoot: aggrKey.IsTraceRoot, - GRPCStatusCode: aggrKey.GRPCStatusCode, - PeerTags: stats.peerTags, - TopLevelHits: stats.topLevelHits, - Hits: stats.hits, - Errors: stats.errors, - Duration: stats.duration, - OkSummary: okSummary, - ErrorSummary: errSummary, - }, nil -} - -func newPayloadAggregationKey(env, hostname, version, cid, gitCommitSha, imageTag string, processTagsHash uint64) PayloadAggregationKey { - return PayloadAggregationKey{ - Env: env, - Hostname: hostname, - Version: version, - ContainerID: cid, - GitCommitSha: gitCommitSha, - ImageTag: imageTag, - ProcessTagsHash: processTagsHash, - } -} - -func newBucketAggregationKey(b *pb.ClientGroupedStats) BucketsAggregationKey { - k := BucketsAggregationKey{ - Service: b.Service, - Name: b.Name, - SpanKind: b.SpanKind, - Resource: b.Resource, - Type: b.Type, - Synthetics: b.Synthetics, - StatusCode: b.HTTPStatusCode, - GRPCStatusCode: b.GRPCStatusCode, - IsTraceRoot: b.IsTraceRoot, - } - if tags := b.GetPeerTags(); len(tags) > 0 { - k.PeerTagsHash = tagsFnvHash(tags) - } - return k -} - -// aggregatedStats holds aggregated counts and distributions -type aggregatedStats struct { - // aggregated counts - hits, topLevelHits, errors, duration uint64 - peerTags []string - - // aggregated DDSketches - okDistribution, errDistribution *ddsketch.DDSketch - - // raw (encoded) DDSketches. Only present if a single payload is received on the active bucket, - // allowing the bucket to not decode the sketch. If a second payload matches the bucket, - // sketches will be decoded and stored in the okDistribution and errDistribution fields. - okDistributionRaw, errDistributionRaw []byte -} - -// mergeSketch take an existing DDSketch, and merges a second one, decoding its contents -func mergeSketch(s1 *ddsketch.DDSketch, raw []byte) (*ddsketch.DDSketch, error) { - if raw == nil { - return s1, nil - } - - s2, err := decodeSketch(raw) - if err != nil { - return s1, err - } - s2 = normalizeSketch(s2) - - if s1 == nil { - return s2, nil - } - - if err = s1.MergeWith(s2); err != nil { - return nil, err - } - return s1, nil -} - -func normalizeSketch(s *ddsketch.DDSketch) *ddsketch.DDSketch { - if s.IndexMapping.Equals(ddsketchMapping) { - // already normalized - return s - } - - return s.ChangeMapping(ddsketchMapping, store.NewCollapsingLowestDenseStore(maxNumBins), store.NewCollapsingLowestDenseStore(maxNumBins), 1) -} - -func decodeSketch(data []byte) (*ddsketch.DDSketch, error) { - if len(data) == 0 { - return nil, nil - } - - var sketch sketchpb.DDSketch - err := proto.Unmarshal(data, &sketch) - if err != nil { - return nil, err - } - - return ddsketch.FromProto(&sketch) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/concentrator.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/concentrator.go deleted file mode 100644 index a9e11e2d97..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/concentrator.go +++ /dev/null @@ -1,201 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import ( - "sync" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" - "github.com/DataDog/datadog-agent/pkg/trace/watchdog" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -// defaultBufferLen represents the default buffer length; the number of bucket size -// units used by the concentrator. -const defaultBufferLen = 2 - -// Writer is an interface for something that can Write Stats Payloads -type Writer interface { - // Write this payload - Write(*pb.StatsPayload) -} - -// Concentrator produces time bucketed statistics from a stream of raw traces. -// https://en.wikipedia.org/wiki/Knelson_concentrator -// Gets an imperial shitton of traces, and outputs pre-computed data structures -// allowing to find the gold (stats) amongst the traces. -type Concentrator struct { - Writer Writer - - spanConcentrator *SpanConcentrator - // bucket duration in nanoseconds - bsize int64 - exit chan struct{} - exitWG sync.WaitGroup - cidStats bool - processStats bool - agentEnv string - agentHostname string - agentVersion string - statsd statsd.ClientInterface - peerTagKeys []string -} - -// NewConcentrator initializes a new concentrator ready to be started -func NewConcentrator(conf *config.AgentConfig, writer Writer, now time.Time, statsd statsd.ClientInterface) *Concentrator { - bsize := conf.BucketInterval.Nanoseconds() - sc := NewSpanConcentrator(&SpanConcentratorConfig{ - ComputeStatsBySpanKind: conf.ComputeStatsBySpanKind, - BucketInterval: bsize, - }, now) - _, disabledCIDStats := conf.Features["disable_cid_stats"] - _, disabledProcessStats := conf.Features["disable_process_stats"] - c := Concentrator{ - spanConcentrator: sc, - Writer: writer, - exit: make(chan struct{}), - cidStats: !disabledCIDStats, - processStats: !disabledProcessStats, - agentEnv: conf.DefaultEnv, - agentHostname: conf.Hostname, - agentVersion: conf.AgentVersion, - statsd: statsd, - bsize: bsize, - peerTagKeys: conf.ConfiguredPeerTags(), - } - return &c -} - -// Start starts the concentrator. -func (c *Concentrator) Start() { - c.exitWG.Add(1) - go func() { - defer watchdog.LogOnPanic(c.statsd) - defer c.exitWG.Done() - c.Run() - }() -} - -// Run runs the main loop of the concentrator goroutine. Traces are received -// through `Add`, this loop only deals with flushing. -func (c *Concentrator) Run() { - // flush with the same period as stats buckets - flushTicker := time.NewTicker(time.Duration(c.bsize) * time.Nanosecond) - defer flushTicker.Stop() - - log.Debug("Starting concentrator") - - for { - select { - case <-flushTicker.C: - c.Writer.Write(c.Flush(false)) - case <-c.exit: - log.Info("Exiting concentrator, computing remaining stats") - c.Writer.Write(c.Flush(true)) - return - } - } -} - -// Stop stops the main Run loop. -func (c *Concentrator) Stop() { - close(c.exit) - c.exitWG.Wait() -} - -// Input specifies a set of traces originating from a certain payload. -type Input struct { - Traces []traceutil.ProcessedTrace - ContainerID string - ContainerTags []string - ProcessTags string -} - -// NewStatsInput allocates a stats input for an incoming trace payload -func NewStatsInput(numChunks int, containerID string, clientComputedStats bool, processTags string) Input { - if clientComputedStats { - return Input{} - } - return Input{Traces: make([]traceutil.ProcessedTrace, 0, numChunks), ContainerID: containerID, ProcessTags: processTags} -} - -// Add applies the given input to the concentrator. -func (c *Concentrator) Add(t Input) { - tags := infraTags{ - containerID: t.ContainerID, - containerTags: t.ContainerTags, - processTagsHash: processTagsHash(t.ProcessTags), - processTags: t.ProcessTags, - } - for _, trace := range t.Traces { - c.addNow(&trace, tags) - } -} - -type infraTags struct { - containerID string - containerTags []string - processTagsHash uint64 - processTags string -} - -// addNow adds the given input into the concentrator. -// Callers must guard! -func (c *Concentrator) addNow(pt *traceutil.ProcessedTrace, tags infraTags) { - if !c.cidStats { - tags.containerID = "" - } - if !c.processStats { - tags.processTagsHash = 0 - tags.processTags = "" - } - hostname := pt.TracerHostname - if hostname == "" { - hostname = c.agentHostname - } - env := pt.TracerEnv - if env == "" { - env = c.agentEnv - } - weight := weight(pt.Root) - aggKey := PayloadAggregationKey{ - Env: env, - Hostname: hostname, - Version: pt.AppVersion, - ContainerID: tags.containerID, - GitCommitSha: pt.GitCommitSha, - ImageTag: pt.ImageTag, - ProcessTagsHash: tags.processTagsHash, - } - for _, s := range pt.TraceChunk.Spans { - statSpan, ok := c.spanConcentrator.NewStatSpanFromPB(s, c.peerTagKeys) - if ok { - c.spanConcentrator.addSpan(statSpan, aggKey, tags, pt.TraceChunk.Origin, weight) - } - } -} - -// Flush deletes and returns complete statistic buckets. -// The force boolean guarantees flushing all buckets if set to true. -func (c *Concentrator) Flush(force bool) *pb.StatsPayload { - return c.flushNow(time.Now().UnixNano(), force) -} - -func (c *Concentrator) flushNow(now int64, force bool) *pb.StatsPayload { - sb := c.spanConcentrator.Flush(now, force) - return &pb.StatsPayload{Stats: sb, AgentHostname: c.agentHostname, AgentEnv: c.agentEnv, AgentVersion: c.agentVersion} -} - -// alignTs returns the provided timestamp truncated to the bucket size. -// It gives us the start time of the time bucket in which such timestamp falls. -func alignTs(ts int64, bsize int64) int64 { - return ts - ts%bsize -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/otel_util.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/otel_util.go deleted file mode 100644 index 214e32e77c..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/otel_util.go +++ /dev/null @@ -1,162 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import ( - "slices" - - "github.com/DataDog/datadog-agent/pkg/obfuscate" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/transform" - - "go.opentelemetry.io/collector/pdata/ptrace" - semconv "go.opentelemetry.io/collector/semconv/v1.17.0" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -// chunkKey is used to group TraceChunks -type chunkKey struct { - traceIDUInt64 uint64 - env string - version string - hostname string - cid string -} - -// OTLPTracesToConcentratorInputs converts eligible OTLP spans to Concentrator.Input. -// The converted Inputs only have the minimal number of fields for APM stats calculation and are only meant -// to be used in Concentrator.Add(). Do not use them for other purposes. -func OTLPTracesToConcentratorInputs( - traces ptrace.Traces, - conf *config.AgentConfig, - containerTagKeys []string, - peerTagKeys []string, -) []Input { - return OTLPTracesToConcentratorInputsWithObfuscation(traces, conf, containerTagKeys, peerTagKeys, nil) -} - -// OTLPTracesToConcentratorInputsWithObfuscation converts eligible OTLP spans to Concentrator Input. -// The converted Inputs only have the minimal number of fields for APM stats calculation and are only meant -// to be used in Concentrator.Add(). Do not use them for other purposes. -// This function enables obfuscation of spans prior to stats calculation and datadogconnector will migrate -// to this function once this function is published as part of latest pkg/trace module. -func OTLPTracesToConcentratorInputsWithObfuscation( - traces ptrace.Traces, - conf *config.AgentConfig, - containerTagKeys []string, - peerTagKeys []string, - obfuscator *obfuscate.Obfuscator, -) []Input { - spanByID, resByID, scopeByID := traceutil.IndexOTelSpans(traces) - topLevelByKind := conf.HasFeature("enable_otlp_compute_top_level_by_span_kind") - topLevelSpans := traceutil.GetTopLevelOTelSpans(spanByID, resByID, topLevelByKind) - ignoreResNames := make(map[string]struct{}) - for _, resName := range conf.Ignore["resource"] { - ignoreResNames[resName] = struct{}{} - } - chunks := make(map[chunkKey]*pb.TraceChunk) - containerTagsByID := make(map[string][]string) - for spanID, otelspan := range spanByID { - otelres := resByID[spanID] - var resourceName string - if transform.OperationAndResourceNameV2Enabled(conf) { - resourceName = traceutil.GetOTelResourceV2(otelspan, otelres) - } else { - resourceName = traceutil.GetOTelResourceV1(otelspan, otelres) - } - if _, exists := ignoreResNames[resourceName]; exists { - continue - } - env := traceutil.GetOTelEnv(otelres) - hostname := traceutil.GetOTelHostname(otelspan, otelres, conf.OTLPReceiver.AttributesTranslator, conf.Hostname) - version := traceutil.GetOTelAttrValInResAndSpanAttrs(otelspan, otelres, true, semconv.AttributeServiceVersion) - cid := traceutil.GetOTelAttrValInResAndSpanAttrs(otelspan, otelres, true, semconv.AttributeContainerID, semconv.AttributeK8SPodUID) - var ctags []string - if cid != "" { - ctags = traceutil.GetOTelContainerTags(otelres.Attributes(), containerTagKeys) - if conf.ContainerTags != nil { - tags, err := conf.ContainerTags(cid) - if err != nil { - log.Debugf("Failed to get container tags for container %q: %v", cid, err) - } else { - log.Tracef("Getting container tags for ID %q: %v", cid, tags) - ctags = append(ctags, tags...) - } - } - if ctags != nil { - // Make sure container tags are sorted per APM stats intake requirement - if !slices.IsSorted(ctags) { - slices.Sort(ctags) - } - containerTagsByID[cid] = ctags - } - } - ckey := chunkKey{ - traceIDUInt64: traceutil.OTelTraceIDToUint64(otelspan.TraceID()), - env: env, - version: version, - hostname: hostname, - cid: cid, - } - chunk, ok := chunks[ckey] - if !ok { - chunk = &pb.TraceChunk{} - chunks[ckey] = chunk - } - _, isTop := topLevelSpans[spanID] - ddSpan := transform.OtelSpanToDDSpanMinimal(otelspan, otelres, scopeByID[spanID], isTop, topLevelByKind, conf, peerTagKeys) - if obfuscator != nil { - obfuscateSpanForConcentrator(obfuscator, ddSpan, conf) - } - chunk.Spans = append(chunk.Spans, ddSpan) - } - - inputs := make([]Input, 0, len(chunks)) - for ckey, chunk := range chunks { - pt := traceutil.ProcessedTrace{ - TraceChunk: chunk, - Root: traceutil.GetRoot(chunk.Spans), - TracerEnv: ckey.env, - AppVersion: ckey.version, - TracerHostname: ckey.hostname, - } - inputs = append(inputs, Input{ - Traces: []traceutil.ProcessedTrace{pt}, - ContainerID: ckey.cid, - ContainerTags: containerTagsByID[ckey.cid], - }) - } - return inputs -} - -func obfuscateSpanForConcentrator(o *obfuscate.Obfuscator, span *pb.Span, conf *config.AgentConfig) { - if span.Meta == nil { - return - } - switch span.Type { - case "sql", "cassandra": - _, err := transform.ObfuscateSQLSpan(o, span) - if err != nil { - log.Debugf("Error parsing SQL query: %v. Resource: %q", err, span.Resource) - } - case "redis": - span.Resource = o.QuantizeRedisString(span.Resource) - if conf.Obfuscation.Redis.Enabled { - transform.ObfuscateRedisSpan(o, span, conf.Obfuscation.Redis.RemoveAllArgs) - } - } -} - -// newTestObfuscator creates a new obfuscator for testing -func newTestObfuscator(conf *config.AgentConfig) *obfuscate.Obfuscator { - oconf := conf.Obfuscation.Export(conf) - oconf.Redis.Enabled = true - o := obfuscate.NewObfuscator(oconf) - return o -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/span_concentrator.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/span_concentrator.go deleted file mode 100644 index dec861023f..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/span_concentrator.go +++ /dev/null @@ -1,261 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import ( - "strings" - "sync" - "time" - - "github.com/DataDog/datadog-agent/pkg/obfuscate" - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -// SpanConcentratorConfig exposes configuration options for a SpanConcentrator -type SpanConcentratorConfig struct { - // ComputeStatsBySpanKind enables/disables the computing of stats based on a span's `span.kind` field - ComputeStatsBySpanKind bool - // BucketInterval the size of our pre-aggregation per bucket - BucketInterval int64 -} - -// StatSpan holds all the required fields from a span needed to calculate stats -type StatSpan struct { - service string - resource string - name string - typ string - error int32 - parentID uint64 - start int64 - duration int64 - - //Fields below this are derived on creation - - spanKind string - statusCode uint32 - isTopLevel bool - matchingPeerTags []string - grpcStatusCode string -} - -func matchingPeerTags(meta map[string]string, peerTagKeys []string) []string { - if len(peerTagKeys) == 0 { - return nil - } - var pt []string - for _, t := range peerTagKeysToAggregateForSpan(meta[tagSpanKind], meta[tagBaseService], peerTagKeys) { - if v, ok := meta[t]; ok && v != "" { - v = obfuscate.QuantizePeerIPAddresses(v) - pt = append(pt, t+":"+v) - } - } - return pt -} - -// peerTagKeysToAggregateForSpan returns the set of peerTagKeys to use for stats aggregation for the given -// span.kind and _dd.base_service -func peerTagKeysToAggregateForSpan(spanKind string, baseService string, peerTagKeys []string) []string { - if len(peerTagKeys) == 0 { - return nil - } - spanKind = strings.ToLower(spanKind) - if (spanKind == "" || spanKind == "internal") && baseService != "" { - // it's a service override on an internal span so it comes from custom instrumentation and does not represent - // a client|producer|consumer span which is talking to a peer entity - // in this case only the base service tag is relevant for stats aggregation - return []string{tagBaseService} - } - if spanKind == "client" || spanKind == "producer" || spanKind == "consumer" { - return peerTagKeys - } - return nil -} - -// SpanConcentrator produces time bucketed statistics from a stream of raw spans. -type SpanConcentrator struct { - computeStatsBySpanKind bool - // bucket duration in nanoseconds - bsize int64 - // Timestamp of the oldest time bucket for which we allow data. - // Any ingested stats older than it get added to this bucket. - oldestTs int64 - // bufferLen is the number of 10s stats bucket we keep in memory before flushing them. - // It means that we can compute stats only for the last `bufferLen * bsize` and that we - // wait such time before flushing the stats. - // This only applies to past buckets. Stats buckets in the future are allowed with no restriction. - bufferLen int - - // mu protects the buckets field - mu sync.Mutex - buckets map[int64]*RawBucket -} - -// NewSpanConcentrator builds a new SpanConcentrator object -func NewSpanConcentrator(cfg *SpanConcentratorConfig, now time.Time) *SpanConcentrator { - sc := &SpanConcentrator{ - computeStatsBySpanKind: cfg.ComputeStatsBySpanKind, - bsize: cfg.BucketInterval, - oldestTs: alignTs(now.UnixNano(), cfg.BucketInterval), - bufferLen: defaultBufferLen, - mu: sync.Mutex{}, - buckets: make(map[int64]*RawBucket), - } - return sc -} - -// NewStatSpanFromPB is a helper version of NewStatSpan that builds a StatSpan from a pb.Span. -func (sc *SpanConcentrator) NewStatSpanFromPB(s *pb.Span, peerTags []string) (statSpan *StatSpan, ok bool) { - return sc.NewStatSpan(s.Service, s.Resource, s.Name, s.Type, s.ParentID, s.Start, s.Duration, s.Error, s.Meta, s.Metrics, peerTags) -} - -// NewStatSpan builds a StatSpan from the required fields for stats calculation -// peerTags is the configured list of peer tags to look for -// returns (nil,false) if the provided fields indicate a span should not have stats calculated -func (sc *SpanConcentrator) NewStatSpan( - service, resource, name string, - typ string, - parentID uint64, - start, duration int64, - error int32, - meta map[string]string, - metrics map[string]float64, - peerTags []string, -) (statSpan *StatSpan, ok bool) { - if meta == nil { - meta = make(map[string]string) - } - if metrics == nil { - metrics = make(map[string]float64) - } - eligibleSpanKind := sc.computeStatsBySpanKind && computeStatsForSpanKind(meta["span.kind"]) - isTopLevel := traceutil.HasTopLevelMetrics(metrics) - if !(isTopLevel || traceutil.IsMeasuredMetrics(metrics) || eligibleSpanKind) { - return nil, false - } - if traceutil.IsPartialSnapshotMetrics(metrics) { - return nil, false - } - return &StatSpan{ - service: service, - resource: resource, - name: name, - typ: typ, - error: error, - parentID: parentID, - start: start, - duration: duration, - spanKind: meta[tagSpanKind], - statusCode: getStatusCode(meta, metrics), - isTopLevel: isTopLevel, - matchingPeerTags: matchingPeerTags(meta, peerTags), - - grpcStatusCode: getGRPCStatusCode(meta, metrics), - }, true -} - -// computeStatsForSpanKind returns true if the span.kind value makes the span eligible for stats computation. -func computeStatsForSpanKind(kind string) bool { - k := strings.ToLower(kind) - _, ok := KindsComputed[k] - return ok -} - -// KindsComputed is the list of span kinds that will have stats computed on them -// when computeStatsByKind is enabled in the concentrator. -var KindsComputed = map[string]struct{}{ - "server": {}, - "consumer": {}, - "client": {}, - "producer": {}, -} - -func (sc *SpanConcentrator) addSpan(s *StatSpan, aggKey PayloadAggregationKey, tags infraTags, origin string, weight float64) { - sc.mu.Lock() - defer sc.mu.Unlock() - end := s.start + s.duration - btime := max(end-end%sc.bsize, sc.oldestTs) - - b, ok := sc.buckets[btime] - if !ok { - b = NewRawBucket(uint64(btime), uint64(sc.bsize)) - sc.buckets[btime] = b - } - if tags.processTagsHash != 0 && len(tags.processTags) > 0 { - b.processTagsByHash[tags.processTagsHash] = tags.processTags - } - if tags.containerID != "" && len(tags.containerTags) > 0 { - b.containerTagsByID[tags.containerID] = tags.containerTags - } - b.HandleSpan(s, weight, origin, aggKey) -} - -// AddSpan to the SpanConcentrator, appending the new data to the appropriate internal bucket. -// todo:raphael migrate dd-trace-go API to not depend on containerID/containerTags and add processTags at encoding layer -func (sc *SpanConcentrator) AddSpan(s *StatSpan, aggKey PayloadAggregationKey, containerID string, containerTags []string, origin string) { - sc.addSpan(s, aggKey, infraTags{containerID: containerID, containerTags: containerTags}, origin, 1) -} - -// Flush deletes and returns complete ClientStatsPayloads. -// The force boolean guarantees flushing all buckets if set to true. -func (sc *SpanConcentrator) Flush(now int64, force bool) []*pb.ClientStatsPayload { - m := make(map[PayloadAggregationKey][]*pb.ClientStatsBucket) - containerTagsByID := make(map[string][]string) - processTagsByHash := make(map[uint64]string) - - sc.mu.Lock() - for ts, srb := range sc.buckets { - // Always keep `bufferLen` buckets (default is 2: current + previous one). - // This is a trade-off: we accept slightly late traces (clock skew and stuff) - // but we delay flushing by at most `bufferLen` buckets. - // - // This delay might result in not flushing stats payload (data loss) - // if the agent stops while the latest buckets aren't old enough to be flushed. - // The "force" boolean skips the delay and flushes all buckets, typically on agent shutdown. - if !force && ts > now-int64(sc.bufferLen)*sc.bsize { - log.Tracef("Bucket %d is not old enough to be flushed, keeping it", ts) - continue - } - log.Debugf("Flushing bucket %d", ts) - for k, b := range srb.Export() { - m[k] = append(m[k], b) - if ctags, ok := srb.containerTagsByID[k.ContainerID]; ok { - containerTagsByID[k.ContainerID] = ctags - } - if ptags, ok := srb.processTagsByHash[k.ProcessTagsHash]; ok { - processTagsByHash[k.ProcessTagsHash] = ptags - } - } - delete(sc.buckets, ts) - } - // After flushing, update the oldest timestamp allowed to prevent having stats for - // an already-flushed bucket. - newOldestTs := alignTs(now, sc.bsize) - int64(sc.bufferLen-1)*sc.bsize - if newOldestTs > sc.oldestTs { - log.Debugf("Update oldestTs to %d", newOldestTs) - sc.oldestTs = newOldestTs - } - sc.mu.Unlock() - sb := make([]*pb.ClientStatsPayload, 0, len(m)) - for k, s := range m { - p := &pb.ClientStatsPayload{ - Env: k.Env, - Hostname: k.Hostname, - ContainerID: k.ContainerID, - Version: k.Version, - GitCommitSha: k.GitCommitSha, - ImageTag: k.ImageTag, - Stats: s, - Tags: containerTagsByID[k.ContainerID], - ProcessTags: processTagsByHash[k.ProcessTagsHash], - ProcessTagsHash: k.ProcessTagsHash, - } - sb = append(sb, p) - } - return sb -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/statsraw.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/statsraw.go deleted file mode 100644 index 85401860de..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/statsraw.go +++ /dev/null @@ -1,210 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import ( - "math" - "math/rand" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/log" - - "github.com/golang/protobuf/proto" - - "github.com/DataDog/sketches-go/ddsketch" -) - -const ( - // relativeAccuracy is the value accuracy we have on the percentiles. For example, we can - // say that p99 is 100ms +- 1ms - relativeAccuracy = 0.01 - // maxNumBins is the maximum number of bins of the ddSketch we use to store percentiles. - // It can affect relative accuracy, but in practice, 2048 bins is enough to have 1% relative accuracy from - // 80 micro second to 1 year: http://www.vldb.org/pvldb/vol12/p2195-masson.pdf - maxNumBins = 2048 -) - -// Most "algorithm" stuff here is tested with stats_test.go as what is important -// is that the final data, the one with send after a call to Export(), is correct. - -type groupedStats struct { - // using float64 here to avoid the accumulation of rounding issues. - hits float64 - topLevelHits float64 - errors float64 - duration float64 - okDistribution *ddsketch.DDSketch - errDistribution *ddsketch.DDSketch - peerTags []string -} - -// round a float to an int, uniformly choosing -// between the lower and upper approximations. -func round(f float64) uint64 { - i := uint64(f) - if rand.Float64() < f-float64(i) { - i++ - } - return i -} - -func (s *groupedStats) export(a Aggregation) (*pb.ClientGroupedStats, error) { - msg := s.okDistribution.ToProto() - okSummary, err := proto.Marshal(msg) - if err != nil { - return &pb.ClientGroupedStats{}, err - } - msg = s.errDistribution.ToProto() - errSummary, err := proto.Marshal(msg) - if err != nil { - return &pb.ClientGroupedStats{}, err - } - return &pb.ClientGroupedStats{ - Service: a.Service, - Name: a.Name, - Resource: a.Resource, - HTTPStatusCode: a.StatusCode, - Type: a.Type, - Hits: round(s.hits), - Errors: round(s.errors), - Duration: round(s.duration), - TopLevelHits: round(s.topLevelHits), - OkSummary: okSummary, - ErrorSummary: errSummary, - Synthetics: a.Synthetics, - SpanKind: a.SpanKind, - PeerTags: s.peerTags, - IsTraceRoot: a.IsTraceRoot, - GRPCStatusCode: a.GRPCStatusCode, - }, nil -} - -func newGroupedStats() *groupedStats { - okSketch, err := ddsketch.LogCollapsingLowestDenseDDSketch(relativeAccuracy, maxNumBins) - if err != nil { - log.Errorf("Error when creating ddsketch: %v", err) - } - errSketch, err := ddsketch.LogCollapsingLowestDenseDDSketch(relativeAccuracy, maxNumBins) - if err != nil { - log.Errorf("Error when creating ddsketch: %v", err) - } - return &groupedStats{ - okDistribution: okSketch, - errDistribution: errSketch, - } -} - -// RawBucket is used to compute span data and aggregate it -// within a time-framed bucket. This should not be used outside -// the agent, use ClientStatsBucket for this. -type RawBucket struct { - // This should really have no public fields. At all. - - start uint64 // timestamp of start in our format - duration uint64 // duration of a bucket in nanoseconds - - // this should really remain private as it's subject to refactoring - data map[Aggregation]*groupedStats - - containerTagsByID map[string][]string // a map from container ID to container tags - processTagsByHash map[uint64]string // a map from process hash to process tags -} - -// NewRawBucket opens a new calculation bucket for time ts and initializes it properly -func NewRawBucket(ts, d uint64) *RawBucket { - // The only non-initialized value is the Duration which should be set by whoever closes that bucket - return &RawBucket{ - start: ts, - duration: d, - data: make(map[Aggregation]*groupedStats), - containerTagsByID: make(map[string][]string), - processTagsByHash: make(map[uint64]string), - } -} - -// Export transforms a RawBucket into a ClientStatsBucket, typically used -// before communicating data to the API, as RawBucket is the internal -// type while ClientStatsBucket is the public, shared one. -func (sb *RawBucket) Export() map[PayloadAggregationKey]*pb.ClientStatsBucket { - m := make(map[PayloadAggregationKey]*pb.ClientStatsBucket) - for k, v := range sb.data { - b, err := v.export(k) - if err != nil { - log.Errorf("Dropping stats bucket due to encoding error: %v.", err) - continue - } - key := PayloadAggregationKey{ - Hostname: k.Hostname, - Version: k.Version, - Env: k.Env, - ContainerID: k.ContainerID, - GitCommitSha: k.GitCommitSha, - ImageTag: k.ImageTag, - ProcessTagsHash: k.ProcessTagsHash, - } - s, ok := m[key] - if !ok { - s = &pb.ClientStatsBucket{ - Start: sb.start, - Duration: sb.duration, - } - } - s.Stats = append(s.Stats, b) - m[key] = s - } - return m -} - -// HandleSpan adds the span to this bucket stats, aggregated with the finest grain matching given aggregators -func (sb *RawBucket) HandleSpan(s *StatSpan, weight float64, origin string, aggKey PayloadAggregationKey) { - if aggKey.Env == "" { - panic("env should never be empty") - } - aggr := NewAggregationFromSpan(s, origin, aggKey) - sb.add(s, weight, aggr) -} - -func (sb *RawBucket) add(s *StatSpan, weight float64, aggr Aggregation) { - var gs *groupedStats - var ok bool - - if gs, ok = sb.data[aggr]; !ok { - gs = newGroupedStats() - gs.peerTags = s.matchingPeerTags - sb.data[aggr] = gs - } - if s.isTopLevel { - gs.topLevelHits += weight - } - gs.hits += weight - if s.error != 0 { - gs.errors += weight - } - gs.duration += float64(s.duration) * weight - // alter resolution of duration distro - trundur := nsTimestampToFloat(s.duration) - if s.error != 0 { - if err := gs.errDistribution.Add(trundur); err != nil { - log.Debugf("Error adding error distribution stats: %v", err) - } - } else { - if err := gs.okDistribution.Add(trundur); err != nil { - log.Debugf("Error adding distribution stats: %v", err) - } - } -} - -// nsTimestampToFloat converts a nanosec timestamp into a float nanosecond timestamp truncated to a fixed precision -func nsTimestampToFloat(ns int64) float64 { - b := math.Float64bits(float64(ns)) - // IEEE-754 - // the mask include 1 bit sign 11 bits exponent (0xfff) - // then we filter the mantissa to 10bits (0xff8) (9 bits as it has implicit value of 1) - // 10 bits precision (any value will be +/- 1/1024) - // https://en.wikipedia.org/wiki/Double-precision_floating-point_format - b &= 0xfffff80000000000 - return math.Float64frombits(b) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/weight.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/weight.go deleted file mode 100644 index d28ca5e46e..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/stats/weight.go +++ /dev/null @@ -1,24 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package stats - -import pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - -// keySamplingRateGlobal is a metric key holding the global sampling rate. -const keySamplingRateGlobal = "_sample_rate" - -// weight returns the weight of the span as defined for sampling, i.e. the -// inverse of the sampling rate. -func weight(s *pb.Span) float64 { - if s == nil { - return 1 - } - sampleRate, ok := s.Metrics[keySamplingRateGlobal] - if !ok || sampleRate <= 0.0 || sampleRate > 1.0 { - return 1 - } - return 1.0 / sampleRate -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/azure.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/azure.go deleted file mode 100644 index 111ecc6689..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/azure.go +++ /dev/null @@ -1,166 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package traceutil - -import ( - "fmt" - "os" - "runtime" - "strings" -) - -const ( - aasInstanceID = "aas.environment.instance_id" - aasInstanceName = "aas.environment.instance_name" - aasOperatingSystem = "aas.environment.os" - aasRuntime = "aas.environment.runtime" - aasExtensionVersion = "aas.environment.extension_version" - aasFunctionRuntime = "aas.environment.function_runtime" - aasResourceGroup = "aas.resource.group" - aasResourceID = "aas.resource.id" - aasSiteKind = "aas.site.kind" - aasSiteName = "aas.site.name" - aasSiteType = "aas.site.type" - aasSubscriptionID = "aas.subscription.id" - - dotnetFramework = ".NET" - nodeFramework = "Node.js" - javaFramework = "Java" - pythonFramework = "Python" - phpFramework = "PHP" - goFramework = "Go" - containerFramework = "Container" - unknown = "unknown" - - appService = "app" -) - -// GetAppServicesTags returns the env vars pulled from the Azure App Service instance. -// In some cases we will need to add extra tags for function apps. -func GetAppServicesTags() map[string]string { - siteName := os.Getenv("WEBSITE_SITE_NAME") - ownerName := os.Getenv("WEBSITE_OWNER_NAME") - resourceGroup := os.Getenv("WEBSITE_RESOURCE_GROUP") - instanceID := getEnvOrUnknown("WEBSITE_INSTANCE_ID") - computerName := getEnvOrUnknown("COMPUTERNAME") - extensionVersion := os.Getenv("DD_AAS_EXTENSION_VERSION") - - // Windows and linux environments provide the OS differently - // We should grab it from GO's builtin runtime pkg - websiteOS := runtime.GOOS - - currentRuntime := getRuntime(websiteOS) - subscriptionID := parseAzureSubscriptionID(ownerName) - resourceID := compileAzureResourceID(subscriptionID, resourceGroup, siteName) - - tags := map[string]string{ - aasInstanceID: instanceID, - aasInstanceName: computerName, - aasOperatingSystem: websiteOS, - aasRuntime: currentRuntime, - aasResourceGroup: resourceGroup, - aasResourceID: resourceID, - aasSiteKind: appService, - aasSiteName: siteName, - aasSiteType: appService, - aasSubscriptionID: subscriptionID, - } - - // Remove the Java and .NET logic once non-universal extensions are deprecated - if websiteOS == "windows" { - if extensionVersion != "" { - tags[aasExtensionVersion] = extensionVersion - } else if val := os.Getenv("DD_AAS_JAVA_EXTENSION_VERSION"); val != "" { - tags[aasExtensionVersion] = val - } else if val := os.Getenv("DD_AAS_DOTNET_EXTENSION_VERSION"); val != "" { - tags[aasExtensionVersion] = val - } - } - - // Function Apps require a different runtime and kind - if rt, ok := os.LookupEnv("FUNCTIONS_WORKER_RUNTIME"); ok { - tags[aasRuntime] = rt - tags[aasFunctionRuntime] = os.Getenv("FUNCTIONS_EXTENSION_VERSION") - tags[aasSiteKind] = "functionapp" - } - - return tags -} - -func getEnvOrUnknown(env string) string { - if val, ok := os.LookupEnv(env); ok { - return val - } - return unknown -} - -func getRuntime(websiteOS string) (rt string) { - switch websiteOS { - case "windows": - rt = getWindowsRuntime() - case "linux", "darwin": - rt = getLinuxRuntime() - default: - rt = unknown - } - - return rt -} - -func getWindowsRuntime() (rt string) { - if os.Getenv("WEBSITE_STACK") == "JAVA" { - rt = javaFramework - } else if val := os.Getenv("WEBSITE_NODE_DEFAULT_VERSION"); val != "" { - rt = nodeFramework - } else { - // FIXME: Windows AAS only supports Java, Node, and .NET so we can infer this - // Needs to be inferred because no other env vars give us context on the runtime - rt = dotnetFramework - } - - return rt -} - -func getLinuxRuntime() (rt string) { - rt = unknown - - switch os.Getenv("WEBSITE_STACK") { - case "DOCKER": - rt = containerFramework - case "": - if val := os.Getenv("DOCKER_SERVER_VERSION"); val != "" { - rt = containerFramework - } - case "NODE": - rt = nodeFramework - case "PYTHON": - rt = pythonFramework - case "JAVA", "TOMCAT": - rt = javaFramework - case "DOTNETCORE": - rt = dotnetFramework - case "PHP": - rt = phpFramework - } - - return rt -} - -func parseAzureSubscriptionID(subID string) (id string) { - parsedSubID := strings.SplitN(subID, "+", 2) - if len(parsedSubID) > 1 { - id = parsedSubID[0] - } - return -} - -func compileAzureResourceID(subID, resourceGroup, siteName string) (id string) { - if len(subID) > 0 && len(resourceGroup) > 0 && len(siteName) > 0 { - id = fmt.Sprintf("/subscriptions/%s/resourcegroups/%s/providers/microsoft.web/sites/%s", - subID, resourceGroup, siteName) - } - return -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/doc.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/doc.go deleted file mode 100644 index ac2de89fdc..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package traceutil contains functions for extracting and processing traces. It should -// only import payload and nothing else. -package traceutil diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/normalize.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/normalize.go deleted file mode 100644 index 65d945d177..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/normalize.go +++ /dev/null @@ -1,405 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package normalize contains functions for normalizing trace data. -package normalize - -import ( - "errors" - "strings" - "sync" - "unicode" - "unicode/utf8" -) - -const ( - // DefaultSpanName is the default name we assign a span if it's missing and we have no reasonable fallback - DefaultSpanName = "unnamed_operation" - // DefaultServiceName is the default name we assign a service if it's missing and we have no reasonable fallback - DefaultServiceName = "unnamed-service" -) - -const ( - // MaxNameLen the maximum length a name can have - MaxNameLen = 100 - // MaxServiceLen the maximum length a service can have - MaxServiceLen = 100 - // MaxResourceLen the maximum length a resource can have - MaxResourceLen = 5000 -) - -var ( - // ErrEmpty specifies that the passed input was empty. - ErrEmpty = errors.New("empty") - // ErrTooLong signifies that the input was too long. - ErrTooLong = errors.New("too long") - // ErrInvalid signifies that the input was invalid. - ErrInvalid = errors.New("invalid") -) - -var isAlphaLookup = [256]bool{} -var isAlphaNumLookup = [256]bool{} -var isValidASCIIStartCharLookup = [256]bool{} -var isValidASCIITagCharLookup = [256]bool{} - -func init() { - for i := 0; i < 256; i++ { - isAlphaLookup[i] = isAlpha(byte(i)) - isAlphaNumLookup[i] = isAlphaNum(byte(i)) - isValidASCIIStartCharLookup[i] = isValidASCIIStartChar(byte(i)) - isValidASCIITagCharLookup[i] = isValidASCIITagChar(byte(i)) - } -} - -// NormalizeName normalizes a span name and returns an error describing the reason -// (if any) why the name was modified. -// -//nolint:revive -func NormalizeName(name string) (string, error) { - if name == "" { - return DefaultSpanName, ErrEmpty - } - var err error - if len(name) > MaxNameLen { - name = TruncateUTF8(name, MaxNameLen) - err = ErrTooLong - } - name, ok := normMetricNameParse(name) - if !ok { - return DefaultSpanName, ErrInvalid - } - return name, err -} - -// NormalizeService normalizes a span service and returns an error describing the reason -// (if any) why the name was modified. -// -//nolint:revive -func NormalizeService(svc string, lang string) (string, error) { - if svc == "" { - return fallbackService(lang), ErrEmpty - } - var err error - if len(svc) > MaxServiceLen { - svc = TruncateUTF8(svc, MaxServiceLen) - err = ErrTooLong - } - // We are normalizing just the tag value. - s := NormalizeTagValue(svc) - if s == "" { - return fallbackService(lang), ErrInvalid - } - return s, err -} - -// NormalizePeerService normalizes a span's peer.service and returns an error describing the reason -// (if any) why the name was modified. -// -//nolint:revive -func NormalizePeerService(svc string) (string, error) { - if svc == "" { - return "", nil - } - var err error - if len(svc) > MaxServiceLen { - svc = TruncateUTF8(svc, MaxServiceLen) - err = ErrTooLong - } - // We are normalizing just the tag value. - s := NormalizeTagValue(svc) - if s == "" { - return "", ErrInvalid - } - return s, err -} - -// fallbackServiceNames is a cache of default service names to use -// when the span's service is unset or invalid. -var fallbackServiceNames sync.Map - -// fallbackService returns the fallback service name for a service -// belonging to language lang. -func fallbackService(lang string) string { - if lang == "" { - return DefaultServiceName - } - if v, ok := fallbackServiceNames.Load(lang); ok { - return v.(string) - } - var str strings.Builder - str.WriteString("unnamed-") - str.WriteString(lang) - str.WriteString("-service") - fallbackServiceNames.Store(lang, str.String()) - return str.String() -} - -const maxTagLength = 200 - -// NormalizeTag applies some normalization to ensure the full tag_key:tag_value string matches the backend requirements. -// -//nolint:revive -func NormalizeTag(v string) string { - return normalize(v, true) -} - -// NormalizeTagValue applies some normalization to ensure the tag value matches the backend requirements. -// It should be used for cases where we have just the tag_value as the input (instead of tag_key:tag_value). -// -//nolint:revive -func NormalizeTagValue(v string) string { - return normalize(v, false) -} - -func normalize(v string, removeDigitStartChar bool) string { - // Fast path: Check if the tag is valid and only contains ASCII characters, - // if yes return it as-is right away. For most use-cases this reduces CPU usage. - if isNormalizedASCIITag(v, removeDigitStartChar) { - return v - } - // the algorithm works by creating a set of cuts marking start and end offsets in v - // that have to be replaced with underscore (_) - if len(v) == 0 { - return "" - } - var ( - trim int // start character (if trimming) - cuts [][2]int // sections to discard: (start, end) pairs - chars int // number of characters processed - ) - var ( - i int // current byte - r rune // current rune - jump int // tracks how many bytes the for range advances on its next iteration - ) - tag := []byte(v) - for i, r = range v { - jump = utf8.RuneLen(r) // next i will be i+jump - if r == utf8.RuneError { - // On invalid UTF-8, the for range advances only 1 byte (see: https://golang.org/ref/spec#For_range (point 2)). - // However, utf8.RuneError is equivalent to unicode.ReplacementChar so we should rely on utf8.DecodeRune to tell - // us whether this is an actual error or just a unicode.ReplacementChar that was present in the string. - _, width := utf8.DecodeRune(tag[i:]) - jump = width - } - // fast path; all letters (and colons) are ok - switch { - case r >= 'a' && r <= 'z' || r == ':': - chars++ - goto end - case r >= 'A' && r <= 'Z': - // lower-case - tag[i] += 'a' - 'A' - chars++ - goto end - } - if unicode.IsUpper(r) { - // lowercase this character - if low := unicode.ToLower(r); utf8.RuneLen(r) == utf8.RuneLen(low) { - // but only if the width of the lowercased character is the same; - // there are some rare edge-cases where this is not the case, such - // as \u017F (ſ) - utf8.EncodeRune(tag[i:], low) - r = low - } - } - switch { - case unicode.IsLetter(r): - chars++ - // If it's not a unicode letter, and it's the first char, and digits are allowed for the start char, - // we should goto end because the remaining cases are not valid for a start char. - case removeDigitStartChar && chars == 0: - trim = i + jump - goto end - case unicode.IsDigit(r) || r == '.' || r == '/' || r == '-': - chars++ - default: - // illegal character - chars++ - if n := len(cuts); n > 0 && cuts[n-1][1] >= i { - // merge intersecting cuts - cuts[n-1][1] += jump - } else { - // start a new cut - cuts = append(cuts, [2]int{i, i + jump}) - } - } - end: - if i+jump >= 2*maxTagLength { - // bail early if the tag contains a lot of non-letter/digit characters. - // If a tag is test🍣🍣[...]🍣, then it's unlikely to be a properly formatted tag - break - } - if chars >= maxTagLength { - // we've reached the maximum - break - } - } - - tag = tag[trim : i+jump] // trim start and end - if len(cuts) == 0 { - // tag was ok, return it as it is - return string(tag) - } - delta := trim // cut offsets delta - for _, cut := range cuts { - // start and end of cut, including delta from previous cuts: - start, end := cut[0]-delta, cut[1]-delta - - if end >= len(tag) { - // this cut includes the end of the string; discard it - // completely and finish the loop. - tag = tag[:start] - break - } - // replace the beginning of the cut with '_' - tag[start] = '_' - if end-start == 1 { - // nothing to discard - continue - } - // discard remaining characters in the cut - copy(tag[start+1:], tag[end:]) - - // shorten the slice - tag = tag[:len(tag)-(end-start)+1] - - // count the new delta for future cuts - delta += cut[1] - cut[0] - 1 - } - return string(tag) -} - -// This code is borrowed from dd-go metric normalization - -// fast isAlpha for ascii -func isAlpha(b byte) bool { - return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') -} - -// fast isAlphaNumeric for ascii -func isAlphaNum(b byte) bool { - return isAlpha(b) || (b >= '0' && b <= '9') -} - -func isValidNormalizedMetricName(name string) bool { - if name == "" { - return false - } - if !isAlphaLookup[name[0]] { - return false - } - for j := 1; j < len(name); j++ { - b := name[j] - if !(isAlphaNumLookup[b] || (b == '.' && !(name[j-1] == '_')) || (b == '_' && !(name[j-1] == '_'))) { - return false - } - } - return true -} - -// normMetricNameParse normalizes metric names with a parser instead of using -// garbage-creating string replacement routines. -func normMetricNameParse(name string) (string, bool) { - if name == "" || len(name) > MaxNameLen { - return name, false - } - - var i, ptr int - var resa [MaxNameLen]byte - res := resa[:0] - - // skip non-alphabetic characters - for ; i < len(name) && !isAlphaLookup[name[i]]; i++ { - continue - } - - // if there were no alphabetic characters it wasn't valid - if i == len(name) { - return "", false - } - - if isValidNormalizedMetricName(name[i:]) { - normalized := name[i:] - if normalized[len(normalized)-1] == '_' { - normalized = normalized[:len(normalized)-1] - } - return normalized, true - } - - for ; i < len(name); i++ { - switch { - case isAlphaNumLookup[name[i]]: - res = append(res, name[i]) - ptr++ - case name[i] == '.': - // we skipped all non-alpha chars up front so we have seen at least one - switch res[ptr-1] { - // overwrite underscores that happen before periods - case '_': - res[ptr-1] = '.' - default: - res = append(res, '.') - ptr++ - } - default: - // we skipped all non-alpha chars up front so we have seen at least one - switch res[ptr-1] { - // no double underscores, no underscores after periods - case '.', '_': - default: - res = append(res, '_') - ptr++ - } - } - } - - if res[ptr-1] == '_' { - res = res[:ptr-1] - } - - return string(res), true -} - -func isNormalizedASCIITag(tag string, checkValidStartChar bool) bool { - if len(tag) == 0 { - return true - } - if len(tag) > maxTagLength { - return false - } - i := 0 - if checkValidStartChar { - if !isValidASCIIStartCharLookup[tag[0]] { - return false - } - i++ - } - for ; i < len(tag); i++ { - b := tag[i] - // TODO: Attempt to optimize this check using SIMD/vectorization. - if isValidASCIITagCharLookup[b] { - continue - } - if b == '_' { - // an underscore is only okay if followed by a valid non-underscore character - i++ - if i == len(tag) || !isValidASCIITagCharLookup[tag[i]] { - return false - } - } else { - return false - } - } - return true -} - -func isValidASCIIStartChar(c byte) bool { - return ('a' <= c && c <= 'z') || c == ':' -} - -func isValidASCIITagChar(c byte) bool { - return isValidASCIIStartChar(c) || ('0' <= c && c <= '9') || c == '.' || c == '/' || c == '-' -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/truncate.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/truncate.go deleted file mode 100644 index f34d94e415..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize/truncate.go +++ /dev/null @@ -1,37 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package normalize - -import "unicode/utf8" - -// TruncateUTF8 truncates the given string to make sure it uses less than limit bytes. -// If the last character is an utf8 character that would be splitten, it removes it -// entirely to make sure the resulting string is not broken. -func TruncateUTF8(s string, limit int) string { - if len(s) <= limit { - return s - } - s = s[:limit] - // The max length of a valid code point is 4 bytes, therefore if we see all valid - // code points in the last 4 bytes we know we have a fully valid utf-8 string - // If not we can truncate one byte at a time until the end of the string is valid utf-8 - for len(s) >= 1 { - if len(s) >= 4 && utf8.Valid([]byte(s[len(s)-4:])) { - break - } - if len(s) >= 3 && utf8.Valid([]byte(s[len(s)-3:])) { - break - } - if len(s) >= 2 && utf8.Valid([]byte(s[len(s)-2:])) { - break - } - if len(s) >= 1 && utf8.Valid([]byte(s[len(s)-1:])) { - break - } - s = s[:len(s)-1] - } - return s -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/otel_util.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/otel_util.go deleted file mode 100644 index 1699d28656..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/otel_util.go +++ /dev/null @@ -1,637 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package traceutil - -import ( - "context" - "encoding/binary" - "strings" - - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - semconv117 "go.opentelemetry.io/collector/semconv/v1.17.0" - semconv126 "go.opentelemetry.io/collector/semconv/v1.26.0" - semconv "go.opentelemetry.io/collector/semconv/v1.6.1" - "go.opentelemetry.io/otel/attribute" - - "github.com/DataDog/datadog-agent/pkg/trace/log" - normalizeutil "github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize" -) - -// Util functions for converting OTel semantics to DD semantics. - -var ( - // SignalTypeSet is the OTel attribute set for traces. - SignalTypeSet = attribute.NewSet(attribute.String("signal", "traces")) -) - -const ( - // TagStatusCode is the tag key for http status code. - TagStatusCode = "http.status_code" -) - -// span.Type constants for db systems -const ( - spanTypeSQL = "sql" - spanTypeCassandra = "cassandra" - spanTypeRedis = "redis" - spanTypeMemcached = "memcached" - spanTypeMongoDB = "mongodb" - spanTypeElasticsearch = "elasticsearch" - spanTypeOpenSearch = "opensearch" - spanTypeDB = "db" -) - -// DBTypes are semconv types that should map to span.Type values given in the mapping -var dbTypes = map[string]string{ - // SQL db types - semconv.AttributeDBSystemOtherSQL: spanTypeSQL, - semconv.AttributeDBSystemMSSQL: spanTypeSQL, - semconv.AttributeDBSystemMySQL: spanTypeSQL, - semconv.AttributeDBSystemOracle: spanTypeSQL, - semconv.AttributeDBSystemDB2: spanTypeSQL, - semconv.AttributeDBSystemPostgreSQL: spanTypeSQL, - semconv.AttributeDBSystemRedshift: spanTypeSQL, - semconv.AttributeDBSystemCloudscape: spanTypeSQL, - semconv.AttributeDBSystemHSQLDB: spanTypeSQL, - semconv.AttributeDBSystemMaxDB: spanTypeSQL, - semconv.AttributeDBSystemIngres: spanTypeSQL, - semconv.AttributeDBSystemFirstSQL: spanTypeSQL, - semconv.AttributeDBSystemEDB: spanTypeSQL, - semconv.AttributeDBSystemCache: spanTypeSQL, - semconv.AttributeDBSystemFirebird: spanTypeSQL, - semconv.AttributeDBSystemDerby: spanTypeSQL, - semconv.AttributeDBSystemInformix: spanTypeSQL, - semconv.AttributeDBSystemMariaDB: spanTypeSQL, - semconv.AttributeDBSystemSqlite: spanTypeSQL, - semconv.AttributeDBSystemSybase: spanTypeSQL, - semconv.AttributeDBSystemTeradata: spanTypeSQL, - semconv.AttributeDBSystemVertica: spanTypeSQL, - semconv.AttributeDBSystemH2: spanTypeSQL, - semconv.AttributeDBSystemColdfusion: spanTypeSQL, - semconv.AttributeDBSystemCockroachdb: spanTypeSQL, - semconv.AttributeDBSystemProgress: spanTypeSQL, - semconv.AttributeDBSystemHanaDB: spanTypeSQL, - semconv.AttributeDBSystemAdabas: spanTypeSQL, - semconv.AttributeDBSystemFilemaker: spanTypeSQL, - semconv.AttributeDBSystemInstantDB: spanTypeSQL, - semconv.AttributeDBSystemInterbase: spanTypeSQL, - semconv.AttributeDBSystemNetezza: spanTypeSQL, - semconv.AttributeDBSystemPervasive: spanTypeSQL, - semconv.AttributeDBSystemPointbase: spanTypeSQL, - semconv117.AttributeDBSystemClickhouse: spanTypeSQL, // not in semconv 1.6.1 - - // Cassandra db types - semconv.AttributeDBSystemCassandra: spanTypeCassandra, - - // Redis db types - semconv.AttributeDBSystemRedis: spanTypeRedis, - - // Memcached db types - semconv.AttributeDBSystemMemcached: spanTypeMemcached, - - // Mongodb db types - semconv.AttributeDBSystemMongoDB: spanTypeMongoDB, - - // Elasticsearch db types - semconv.AttributeDBSystemElasticsearch: spanTypeElasticsearch, - - // Opensearch db types, not in semconv 1.6.1 - semconv117.AttributeDBSystemOpensearch: spanTypeOpenSearch, - - // Generic db types - semconv.AttributeDBSystemHive: spanTypeDB, - semconv.AttributeDBSystemHBase: spanTypeDB, - semconv.AttributeDBSystemNeo4j: spanTypeDB, - semconv.AttributeDBSystemCouchbase: spanTypeDB, - semconv.AttributeDBSystemCouchDB: spanTypeDB, - semconv.AttributeDBSystemCosmosDB: spanTypeDB, - semconv.AttributeDBSystemDynamoDB: spanTypeDB, - semconv.AttributeDBSystemGeode: spanTypeDB, -} - -// checkDBType checks if the dbType is a known db type and returns the corresponding span.Type -func checkDBType(dbType string) string { - spanType, ok := dbTypes[dbType] - if ok { - return spanType - } - // span type not found, return generic db type - return spanTypeDB -} - -// IndexOTelSpans iterates over the input OTel spans and returns 3 maps: -// OTel spans indexed by span ID, OTel resources indexed by span ID, OTel instrumentation scopes indexed by span ID. -// Skips spans with invalid trace ID or span ID. If there are multiple spans with the same (non-zero) span ID, the last one wins. -func IndexOTelSpans(traces ptrace.Traces) (map[pcommon.SpanID]ptrace.Span, map[pcommon.SpanID]pcommon.Resource, map[pcommon.SpanID]pcommon.InstrumentationScope) { - spanByID := make(map[pcommon.SpanID]ptrace.Span) - resByID := make(map[pcommon.SpanID]pcommon.Resource) - scopeByID := make(map[pcommon.SpanID]pcommon.InstrumentationScope) - rspanss := traces.ResourceSpans() - for i := 0; i < rspanss.Len(); i++ { - rspans := rspanss.At(i) - res := rspans.Resource() - for j := 0; j < rspans.ScopeSpans().Len(); j++ { - libspans := rspans.ScopeSpans().At(j) - for k := 0; k < libspans.Spans().Len(); k++ { - span := libspans.Spans().At(k) - if span.TraceID().IsEmpty() || span.SpanID().IsEmpty() { - continue - } - spanByID[span.SpanID()] = span - resByID[span.SpanID()] = res - scopeByID[span.SpanID()] = libspans.Scope() - } - } - } - return spanByID, resByID, scopeByID -} - -// GetTopLevelOTelSpans returns the span IDs of the top level OTel spans. -func GetTopLevelOTelSpans(spanByID map[pcommon.SpanID]ptrace.Span, resByID map[pcommon.SpanID]pcommon.Resource, topLevelByKind bool) map[pcommon.SpanID]struct{} { - topLevelSpans := make(map[pcommon.SpanID]struct{}) - for spanID, span := range spanByID { - if span.ParentSpanID().IsEmpty() { - // case 1: root span - topLevelSpans[spanID] = struct{}{} - continue - } - - if topLevelByKind { - // New behavior for computing top level OTel spans, see computeTopLevelAndMeasured in pkg/trace/api/otlp.go - spanKind := span.Kind() - if spanKind == ptrace.SpanKindServer || spanKind == ptrace.SpanKindConsumer { - // span is a server-side span, mark as top level - topLevelSpans[spanID] = struct{}{} - } - continue - } - - // Otherwise, fall back to old behavior in ComputeTopLevel - parentSpan, ok := spanByID[span.ParentSpanID()] - if !ok { - // case 2: parent span not in the same chunk, presumably it belongs to another service - topLevelSpans[spanID] = struct{}{} - continue - } - - svc := GetOTelService(resByID[spanID], true) - parentSvc := GetOTelService(resByID[parentSpan.SpanID()], true) - if svc != parentSvc { - // case 3: parent is not in the same service - topLevelSpans[spanID] = struct{}{} - } - } - return topLevelSpans -} - -// GetOTelAttrVal returns the matched value as a string in the input map with the given keys. -// If there are multiple keys present, the first matched one is returned. -// If normalize is true, normalize the return value with NormalizeTagValue. -func GetOTelAttrVal(attrs pcommon.Map, normalize bool, keys ...string) string { - val := "" - for _, key := range keys { - attrval, exists := attrs.Get(key) - if exists { - val = attrval.AsString() - break - } - } - - if normalize { - val = normalizeutil.NormalizeTagValue(val) - } - - return val -} - -// GetOTelAttrValInResAndSpanAttrs returns the matched value as a string in the OTel resource attributes and span attributes with the given keys. -// If there are multiple keys present, the first matched one is returned. -// If the key is present in both resource attributes and span attributes, resource attributes take precedence. -// If normalize is true, normalize the return value with NormalizeTagValue. -func GetOTelAttrValInResAndSpanAttrs(span ptrace.Span, res pcommon.Resource, normalize bool, keys ...string) string { - if val := GetOTelAttrVal(res.Attributes(), normalize, keys...); val != "" { - return val - } - return GetOTelAttrVal(span.Attributes(), normalize, keys...) -} - -// SpanKind2Type returns a span's type based on the given kind and other present properties. -// This function is used in Resource V1 logic only. See GetOtelSpanType for Resource V2 logic. -func SpanKind2Type(span ptrace.Span, res pcommon.Resource) string { - var typ string - switch span.Kind() { - case ptrace.SpanKindServer: - typ = "web" - case ptrace.SpanKindClient: - typ = "http" - db := GetOTelAttrValInResAndSpanAttrs(span, res, true, semconv.AttributeDBSystem) - if db == "" { - break - } - switch db { - case "redis", "memcached": - typ = "cache" - default: - typ = "db" - } - default: - typ = "custom" - } - return typ -} - -// GetOTelSpanType returns the DD span type based on OTel span kind and attributes. -// This logic is used in ReceiveResourceSpansV2 logic -func GetOTelSpanType(span ptrace.Span, res pcommon.Resource) string { - typ := GetOTelAttrValInResAndSpanAttrs(span, res, false, "span.type") - if typ != "" { - return typ - } - switch span.Kind() { - case ptrace.SpanKindServer: - typ = "web" - case ptrace.SpanKindClient: - db := GetOTelAttrValInResAndSpanAttrs(span, res, true, semconv.AttributeDBSystem) - if db == "" { - typ = "http" - } else { - typ = checkDBType(db) - } - default: - typ = "custom" - } - return typ -} - -// GetOTelService returns the DD service name based on OTel span and resource attributes. -func GetOTelService(res pcommon.Resource, normalize bool) string { - // No need to normalize with NormalizeTagValue since we will do NormalizeService later - svc := GetOTelAttrVal(res.Attributes(), false, semconv.AttributeServiceName) - if svc == "" { - svc = "otlpresourcenoservicename" - } - if normalize { - newsvc, err := normalizeutil.NormalizeService(svc, "") - switch err { - case normalizeutil.ErrTooLong: - log.Debugf("Fixing malformed trace. Service is too long (reason:service_truncate), truncating span.service to length=%d: %s", normalizeutil.MaxServiceLen, svc) - case normalizeutil.ErrInvalid: - log.Debugf("Fixing malformed trace. Service is invalid (reason:service_invalid), replacing invalid span.service=%s with fallback span.service=%s", svc, newsvc) - } - svc = newsvc - } - return svc -} - -// GetOTelResourceV1 returns the DD resource name based on OTel span and resource attributes. -func GetOTelResourceV1(span ptrace.Span, res pcommon.Resource) (resName string) { - resName = GetOTelAttrValInResAndSpanAttrs(span, res, false, "resource.name") - if resName == "" { - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, "http.request.method", semconv.AttributeHTTPMethod); m != "" { - // use the HTTP method + route (if available) - resName = m - if route := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeHTTPRoute); route != "" { - resName = resName + " " + route - } - } else if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeMessagingOperation); m != "" { - resName = m - // use the messaging operation - if dest := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeMessagingDestination, semconv117.AttributeMessagingDestinationName); dest != "" { - resName = resName + " " + dest - } - } else if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeRPCMethod); m != "" { - resName = m - // use the RPC method - if svc := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeRPCService); m != "" { - // ...and service if available - resName = resName + " " + svc - } - } else if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv117.AttributeGraphqlOperationType); m != "" { - // Enrich GraphQL query resource names. - // See https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/graphql/graphql-spans.md - resName = m - if name := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv117.AttributeGraphqlOperationName); name != "" { - resName = resName + " " + name - } - } else { - resName = span.Name() - } - } - if len(resName) > normalizeutil.MaxResourceLen { - resName = resName[:normalizeutil.MaxResourceLen] - } - return -} - -// GetOTelResourceV2 returns the DD resource name based on OTel span and resource attributes. -func GetOTelResourceV2(span ptrace.Span, res pcommon.Resource) (resName string) { - defer func() { - if len(resName) > normalizeutil.MaxResourceLen { - resName = resName[:normalizeutil.MaxResourceLen] - } - }() - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, "resource.name"); m != "" { - resName = m - return - } - - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, "http.request.method", semconv.AttributeHTTPMethod); m != "" { - if m == "_OTHER" { - m = "HTTP" - } - // use the HTTP method + route (if available) - resName = m - if span.Kind() == ptrace.SpanKindServer { - if route := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeHTTPRoute); route != "" { - resName = resName + " " + route - } - } - return - } - - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeMessagingOperation); m != "" { - resName = m - // use the messaging operation - if dest := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeMessagingDestination, semconv117.AttributeMessagingDestinationName); dest != "" { - resName = resName + " " + dest - } - return - } - - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeRPCMethod); m != "" { - resName = m - // use the RPC method - if svc := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeRPCService); m != "" { - // ...and service if available - resName = resName + " " + svc - } - return - } - - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv117.AttributeGraphqlOperationType); m != "" { - // Enrich GraphQL query resource names. - // See https://github.com/open-telemetry/semantic-conventions/blob/v1.29.0/docs/graphql/graphql-spans.md - resName = m - if name := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv117.AttributeGraphqlOperationName); name != "" { - resName = resName + " " + name - } - return - } - - if m := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeDBSystem); m != "" { - // Since traces are obfuscated by span.Resource in pkg/trace/agent/obfuscate.go, we should use span.Resource as the resource name. - // https://github.com/DataDog/datadog-agent/blob/62619a69cff9863f5b17215847b853681e36ff15/pkg/trace/agent/obfuscate.go#L32 - if dbStatement := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv.AttributeDBStatement); dbStatement != "" { - resName = dbStatement - return - } - if dbQuery := GetOTelAttrValInResAndSpanAttrs(span, res, false, semconv126.AttributeDBQueryText); dbQuery != "" { - resName = dbQuery - return - } - } - - resName = span.Name() - - return -} - -// GetOTelOperationNameV2 returns the DD operation name based on OTel span and resource attributes and given configs. -func GetOTelOperationNameV2( - span ptrace.Span, -) string { - if operationName := GetOTelAttrVal(span.Attributes(), true, "operation.name"); operationName != "" { - return operationName - } - - isClient := span.Kind() == ptrace.SpanKindClient - isServer := span.Kind() == ptrace.SpanKindServer - - // http - if method := GetOTelAttrVal(span.Attributes(), false, "http.request.method", semconv.AttributeHTTPMethod); method != "" { - if isServer { - return "http.server.request" - } - if isClient { - return "http.client.request" - } - } - - // database - if v := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeDBSystem); v != "" && isClient { - return v + ".query" - } - - // messaging - system := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeMessagingSystem) - op := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeMessagingOperation) - if system != "" && op != "" { - switch span.Kind() { - case ptrace.SpanKindClient, ptrace.SpanKindServer, ptrace.SpanKindConsumer, ptrace.SpanKindProducer: - return system + "." + op - } - } - - // RPC & AWS - rpcValue := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeRPCSystem) - isRPC := rpcValue != "" - isAws := isRPC && (rpcValue == "aws-api") - // AWS client - if isAws && isClient { - if service := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeRPCService); service != "" { - return "aws." + service + ".request" - } - return "aws.client.request" - } - // RPC client - if isRPC && isClient { - return rpcValue + ".client.request" - } - // RPC server - if isRPC && isServer { - return rpcValue + ".server.request" - } - - // FAAS client - provider := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeFaaSInvokedProvider) - invokedName := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeFaaSInvokedName) - if provider != "" && invokedName != "" && isClient { - return provider + "." + invokedName + ".invoke" - } - - // FAAS server - trigger := GetOTelAttrVal(span.Attributes(), true, semconv.AttributeFaaSTrigger) - if trigger != "" && isServer { - return trigger + ".invoke" - } - - // GraphQL - if GetOTelAttrVal(span.Attributes(), true, "graphql.operation.type") != "" { - return "graphql.server.request" - } - - // if nothing matches, checking for generic http server/client - protocol := GetOTelAttrVal(span.Attributes(), true, "network.protocol.name") - if isServer { - if protocol != "" { - return protocol + ".server.request" - } - return "server.request" - } else if isClient { - if protocol != "" { - return protocol + ".client.request" - } - return "client.request" - } - - if span.Kind() != ptrace.SpanKindUnspecified { - return span.Kind().String() - } - return ptrace.SpanKindInternal.String() -} - -// GetOTelOperationNameV1 returns the DD operation name based on OTel span and resource attributes and given configs. -func GetOTelOperationNameV1( - span ptrace.Span, - res pcommon.Resource, - lib pcommon.InstrumentationScope, - spanNameAsResourceName bool, - spanNameRemappings map[string]string, - normalize bool) string { - // No need to normalize with NormalizeTagValue since we will do NormalizeName later - name := GetOTelAttrValInResAndSpanAttrs(span, res, false, "operation.name") - if name == "" { - if spanNameAsResourceName { - name = span.Name() - } else { - name = strings.ToLower(span.Kind().String()) - if lib.Name() != "" { - name = lib.Name() + "." + name - } else { - name = "opentelemetry." + name - } - } - } - if v, ok := spanNameRemappings[name]; ok { - name = v - } - - if normalize { - normalizeName, err := normalizeutil.NormalizeName(name) - switch err { - case normalizeutil.ErrEmpty: - log.Debugf("Fixing malformed trace. Name is empty (reason:span_name_empty), setting span.name=%s", normalizeName) - case normalizeutil.ErrTooLong: - log.Debugf("Fixing malformed trace. Name is too long (reason:span_name_truncate), truncating span.name to length=%d", normalizeutil.MaxServiceLen) - case normalizeutil.ErrInvalid: - log.Debugf("Fixing malformed trace. Name is invalid (reason:span_name_invalid), setting span.name=%s", normalizeName) - } - name = normalizeName - } - - return name -} - -// GetOtelSource returns the source based on OTel span and resource attributes. -func GetOtelSource(span ptrace.Span, res pcommon.Resource, tr *attributes.Translator) (source.Source, bool) { - ctx := context.Background() - src, srcok := tr.ResourceToSource(ctx, res, SignalTypeSet, nil) - if !srcok { - if v := GetOTelAttrValInResAndSpanAttrs(span, res, false, "_dd.hostname"); v != "" { - src = source.Source{Kind: source.HostnameKind, Identifier: v} - srcok = true - } - } - return src, srcok -} - -// GetOTelHostname returns the DD hostname based on OTel span and resource attributes. -func GetOTelHostname(span ptrace.Span, res pcommon.Resource, tr *attributes.Translator, fallbackHost string) string { - src, srcok := GetOtelSource(span, res, tr) - if srcok { - switch src.Kind { - case source.HostnameKind: - return src.Identifier - default: - // We are not on a hostname (serverless), hence the hostname is empty - return "" - } - } else { - // fallback hostname from Agent conf.Hostname - return fallbackHost - } -} - -// GetOTelStatusCode returns the DD status code of the OTel span. -func GetOTelStatusCode(span ptrace.Span) uint32 { - if code, ok := span.Attributes().Get("http.response.status_code"); ok { - return uint32(code.Int()) - } - if code, ok := span.Attributes().Get(semconv.AttributeHTTPStatusCode); ok { - return uint32(code.Int()) - } - return 0 -} - -// GetOTelContainerTags returns a list of DD container tags in the OTel resource attributes. -// Tags are always normalized. -func GetOTelContainerTags(rattrs pcommon.Map, tagKeys []string) []string { - var containerTags []string - containerTagsMap := attributes.ContainerTagsFromResourceAttributes(rattrs) - for _, key := range tagKeys { - if mappedKey, ok := attributes.ContainerMappings[key]; ok { - // If the key has a mapping in ContainerMappings, use the mapped key - if val, ok := containerTagsMap[mappedKey]; ok { - t := normalizeutil.NormalizeTag(mappedKey + ":" + val) - containerTags = append(containerTags, t) - } - } else { - // Otherwise populate as additional container tags - if val := GetOTelAttrVal(rattrs, false, key); val != "" { - t := normalizeutil.NormalizeTag(key + ":" + val) - containerTags = append(containerTags, t) - } - } - } - return containerTags -} - -// GetOTelEnv returns the environment based on OTel resource attributes. -func GetOTelEnv(res pcommon.Resource) string { - // TODO(songy23): use AttributeDeploymentEnvironmentName once collector version upgrade is unblocked - return GetOTelAttrVal(res.Attributes(), true, "deployment.environment.name", semconv.AttributeDeploymentEnvironment) -} - -// OTelTraceIDToUint64 converts an OTel trace ID to an uint64 -func OTelTraceIDToUint64(b [16]byte) uint64 { - return binary.BigEndian.Uint64(b[len(b)-8:]) -} - -// OTelSpanIDToUint64 converts an OTel span ID to an uint64 -func OTelSpanIDToUint64(b [8]byte) uint64 { - return binary.BigEndian.Uint64(b[:]) -} - -var spanKindNames = map[ptrace.SpanKind]string{ - ptrace.SpanKindUnspecified: "unspecified", - ptrace.SpanKindInternal: "internal", - ptrace.SpanKindServer: "server", - ptrace.SpanKindClient: "client", - ptrace.SpanKindProducer: "producer", - ptrace.SpanKindConsumer: "consumer", -} - -// OTelSpanKindName converts the given SpanKind to a valid Datadog span kind name. -func OTelSpanKindName(k ptrace.SpanKind) string { - name, ok := spanKindNames[k] - if !ok { - return "unspecified" - } - return name -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/processed_trace.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/processed_trace.go deleted file mode 100644 index 913e412764..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/processed_trace.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package traceutil - -import ( - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" -) - -// ProcessedTrace represents a trace being processed in the agent. -type ProcessedTrace struct { - TraceChunk *pb.TraceChunk - Root *pb.Span - TracerEnv string - AppVersion string - TracerHostname string - ClientDroppedP0sWeight float64 - GitCommitSha string - ImageTag string -} - -// Clone creates a copy of ProcessedTrace, cloning p, p.TraceChunk, and p.Root. This means it is -// safe to modify the returned ProcessedTrace's (pt's) fields along with fields in -// pt.TraceChunk and fields in pt.Root. -// -// The most important consequence of this is that the TraceChunk's Spans field can be assigned, -// *BUT* the Spans value itself should not be modified. i.e. This is ok: -// -// pt2 := pt.Clone() -// pt2.TraceChunk.Spans = make([]*pb.Span) -// -// but this is NOT ok: -// -// pt2 := pt.Clone() -// pt2.TraceChunk.Spans[0] = &pb.Span{} // This will be visible in pt. -func (pt *ProcessedTrace) Clone() *ProcessedTrace { - if pt == nil { - return nil - } - ptClone := new(ProcessedTrace) - *ptClone = *pt - if pt.TraceChunk != nil { - c := pt.TraceChunk.ShallowCopy() - ptClone.TraceChunk = c - } - if pt.Root != nil { - r := pt.Root.ShallowCopy() - ptClone.Root = r - } - return ptClone -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/span.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/span.go deleted file mode 100644 index 2b416531d4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/span.go +++ /dev/null @@ -1,175 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package traceutil - -import ( - "bytes" - - "github.com/tinylib/msgp/msgp" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" -) - -const ( - // topLevelKey is a special metric, it's 1 if the span is top-level, 0 if not, this is kept for backwards - // compatibility but will eventually be replaced with just using the preferred tracerTopLevelKey - topLevelKey = "_top_level" - // measuredKey is a special metric flag that marks a span for trace metrics calculation. - measuredKey = "_dd.measured" - // tracerTopLevelKey is a metric flag set by tracers on top_level spans - tracerTopLevelKey = "_dd.top_level" - // partialVersionKey is a metric carrying the snapshot seq number in the case the span is a partial snapshot - partialVersionKey = "_dd.partial_version" -) - -// HasTopLevel returns true if span is top-level. -func HasTopLevel(s *pb.Span) bool { - return HasTopLevelMetrics(s.Metrics) -} - -// HasTopLevelMetrics returns true if the provided metrics map indicates the span is top-level. -func HasTopLevelMetrics(metrics map[string]float64) bool { - return metrics[topLevelKey] == 1 || metrics[tracerTopLevelKey] == 1 -} - -// UpdateTracerTopLevel sets _top_level tag on spans flagged by the tracer -func UpdateTracerTopLevel(s *pb.Span) { - if s.Metrics[tracerTopLevelKey] == 1 { - SetMetric(s, topLevelKey, 1) - } -} - -// IsMeasured returns true if a span should be measured (i.e., it should get trace metrics calculated). -func IsMeasured(s *pb.Span) bool { - return IsMeasuredMetrics(s.Metrics) -} - -// IsMeasuredMetrics returns true if a span should be measured (i.e., it should get trace metrics calculated). -func IsMeasuredMetrics(metrics map[string]float64) bool { - return metrics[measuredKey] == 1 -} - -// IsPartialSnapshot returns true if the span is a partial snapshot. -// This kind of spans are partial images of long-running spans. -// When incomplete, a partial snapshot has a metric _dd.partial_version which is a positive integer. -// The metric usually increases each time a new version of the same span is sent by the tracer -func IsPartialSnapshot(s *pb.Span) bool { - return IsPartialSnapshotMetrics(s.Metrics) -} - -// IsPartialSnapshotMetrics returns true if the span is a partial snapshot. -// These kinds of spans are partial images of long-running spans. -// When incomplete, a partial snapshot has a metric _dd.partial_version which is a positive integer. -// The metric usually increases each time a new version of the same span is sent by the tracer -func IsPartialSnapshotMetrics(metrics map[string]float64) bool { - v, ok := metrics[partialVersionKey] - return ok && v >= 0 -} - -// SetTopLevel sets the top-level attribute of the span. -func SetTopLevel(s *pb.Span, topLevel bool) { - if !topLevel { - if s.Metrics == nil { - return - } - delete(s.Metrics, topLevelKey) - return - } - // Setting the metrics value, so that code downstream in the pipeline - // can identify this as top-level without recomputing everything. - SetMetric(s, topLevelKey, 1) -} - -// SetMeasured sets the measured attribute of the span. -func SetMeasured(s *pb.Span, measured bool) { - if !measured { - if s.Metrics == nil { - return - } - delete(s.Metrics, measuredKey) - return - } - // Setting the metrics value, so that code downstream in the pipeline - // can identify this as top-level without recomputing everything. - SetMetric(s, measuredKey, 1) -} - -// SetMetric sets the metric at key to the val on the span s. -func SetMetric(s *pb.Span, key string, val float64) { - if s.Metrics == nil { - s.Metrics = make(map[string]float64) - } - s.Metrics[key] = val -} - -// SetMeta sets the metadata at key to the val on the span s. -func SetMeta(s *pb.Span, key, val string) { - if s.Meta == nil { - s.Meta = make(map[string]string) - } - s.Meta[key] = val -} - -// GetMeta gets the metadata value in the span Meta map. -func GetMeta(s *pb.Span, key string) (string, bool) { - if s.Meta == nil { - return "", false - } - val, ok := s.Meta[key] - return val, ok -} - -// GetMetaDefault gets the metadata value in the span Meta map and fallbacks to fallback. -func GetMetaDefault(s *pb.Span, key, fallback string) string { - if s.Meta == nil { - return fallback - } - if val, ok := s.Meta[key]; ok { - return val - } - return fallback -} - -// SetMetaStruct sets the structured metadata at key to the val on the span s. -func SetMetaStruct(s *pb.Span, key string, val interface{}) error { - var b bytes.Buffer - - if s.MetaStruct == nil { - s.MetaStruct = make(map[string][]byte) - } - writer := msgp.NewWriter(&b) - err := writer.WriteIntf(val) - if err != nil { - return err - } - writer.Flush() - s.MetaStruct[key] = b.Bytes() - return nil -} - -// GetMetaStruct gets the structured metadata value in the span MetaStruct map. -func GetMetaStruct(s *pb.Span, key string) (interface{}, bool) { - if s.MetaStruct == nil { - return nil, false - } - if rawVal, ok := s.MetaStruct[key]; ok { - val, _, err := msgp.ReadIntfBytes(rawVal) - if err != nil { - ok = false - } - return val, ok - } - return nil, false -} - -// GetMetric gets the metadata value in the span Metrics map. -func GetMetric(s *pb.Span, key string) (float64, bool) { - if s.Metrics == nil { - return 0, false - } - val, ok := s.Metrics[key] - return val, ok -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/trace.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/trace.go deleted file mode 100644 index ef8a0f2934..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/traceutil/trace.go +++ /dev/null @@ -1,119 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package traceutil - -import ( - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/log" -) - -const ( - envKey = "env" -) - -// GetEnv returns the first "env" tag found in trace t. -// Search starts by root -func GetEnv(root *pb.Span, t *pb.TraceChunk) string { - if v, ok := root.Meta[envKey]; ok { - return v - } - for _, s := range t.Spans { - if s.SpanID == root.SpanID { - continue - } - if v, ok := s.Meta[envKey]; ok { - return v - } - } - return "" -} - -// GetRoot extracts the root span from a trace -func GetRoot(t pb.Trace) *pb.Span { - // That should be caught beforehand - if len(t) == 0 { - return nil - } - // General case: go over all spans and check for one which matching parent - parentIDToChild := map[uint64]*pb.Span{} - - for i := range t { - // Common case optimization: check for span with ParentID == 0, starting from the end, - // since some clients report the root last - j := len(t) - 1 - i - if t[j].ParentID == 0 { - return t[j] - } - parentIDToChild[t[j].ParentID] = t[j] - } - - for i := range t { - delete(parentIDToChild, t[i].SpanID) - } - - // Here, if the trace is valid, we should have len(parentIDToChild) == 1 - if len(parentIDToChild) != 1 { - log.Debugf("Didn't reliably find the root span for traceID:%v", t[0].TraceID) - } - - // Have a safe behavior if that's not the case - // Pick the first span without its parent - for parentID := range parentIDToChild { - return parentIDToChild[parentID] - } - - // Gracefully fail with the last span of the trace - return t[len(t)-1] -} - -// ChildrenMap returns a map containing for each span id the list of its -// direct children. -func ChildrenMap(t pb.Trace) map[uint64][]*pb.Span { - childrenMap := make(map[uint64][]*pb.Span) - - for i := range t { - span := t[i] - if span.ParentID == 0 { - continue - } - childrenMap[span.ParentID] = append(childrenMap[span.ParentID], span) - } - - return childrenMap -} - -// ComputeTopLevel updates all the spans top-level attribute. -// -// A span is considered top-level if: -// - it's a root span -// - OR its parent is unknown (other part of the code, distributed trace) -// - OR its parent belongs to another service (in that case it's a "local root" -// being the highest ancestor of other spans belonging to this service and -// attached to it). -func ComputeTopLevel(trace pb.Trace) { - spanIDToIndex := make(map[uint64]int, len(trace)) - for i, span := range trace { - spanIDToIndex[span.SpanID] = i - } - for _, span := range trace { - if span.ParentID == 0 { - // span is a root span - SetTopLevel(span, true) - continue - } - parentIndex, ok := spanIDToIndex[span.ParentID] - if !ok { - // span has no parent in chunk - SetTopLevel(span, true) - continue - } - if trace[parentIndex].Service != span.Service { - // parent is not in the same service - SetTopLevel(span, true) - continue - } - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/obfuscate.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/obfuscate.go deleted file mode 100644 index 3d49a46137..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/obfuscate.go +++ /dev/null @@ -1,82 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package transform - -import ( - "github.com/DataDog/datadog-agent/pkg/obfuscate" - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" -) - -const ( - // TagRedisRawCommand represents a redis raw command tag - TagRedisRawCommand = "redis.raw_command" - // TagValkeyRawCommand represents a redis raw command tag - TagValkeyRawCommand = "valkey.raw_command" - // TagMemcachedCommand represents a memcached command tag - TagMemcachedCommand = "memcached.command" - // TagMongoDBQuery represents a MongoDB query tag - TagMongoDBQuery = "mongodb.query" - // TagElasticBody represents an Elasticsearch body tag - TagElasticBody = "elasticsearch.body" - // TagOpenSearchBody represents an OpenSearch body tag - TagOpenSearchBody = "opensearch.body" - // TagSQLQuery represents a SQL query tag - TagSQLQuery = "sql.query" - // TagHTTPURL represents an HTTP URL tag - TagHTTPURL = "http.url" - // TagDBMS represents a DBMS tag - TagDBMS = "db.type" -) - -const ( - // TextNonParsable is the error text used when a query is non-parsable - TextNonParsable = "Non-parsable SQL query" -) - -// ObfuscateSQLSpan obfuscates a SQL span using pkg/obfuscate logic -func ObfuscateSQLSpan(o *obfuscate.Obfuscator, span *pb.Span) (*obfuscate.ObfuscatedQuery, error) { - if span.Resource == "" { - return nil, nil - } - oq, err := o.ObfuscateSQLStringForDBMS(span.Resource, span.Meta[TagDBMS]) - if err != nil { - // we have an error, discard the SQL to avoid polluting user resources. - span.Resource = TextNonParsable - traceutil.SetMeta(span, TagSQLQuery, TextNonParsable) - return nil, err - } - span.Resource = oq.Query - if len(oq.Metadata.TablesCSV) > 0 { - traceutil.SetMeta(span, "sql.tables", oq.Metadata.TablesCSV) - } - traceutil.SetMeta(span, TagSQLQuery, oq.Query) - return oq, nil -} - -// ObfuscateRedisSpan obfuscates a Redis span using pkg/obfuscate logic -func ObfuscateRedisSpan(o *obfuscate.Obfuscator, span *pb.Span, removeAllArgs bool) { - if span.Meta == nil || span.Meta[TagRedisRawCommand] == "" { - return - } - if removeAllArgs { - span.Meta[TagRedisRawCommand] = o.RemoveAllRedisArgs(span.Meta[TagRedisRawCommand]) - return - } - span.Meta[TagRedisRawCommand] = o.ObfuscateRedisString(span.Meta[TagRedisRawCommand]) -} - -// ObfuscateValkeySpan obfuscates a Valkey span using pkg/obfuscate logic -func ObfuscateValkeySpan(o *obfuscate.Obfuscator, span *pb.Span, removeAllArgs bool) { - if span.Meta == nil || span.Meta[TagValkeyRawCommand] == "" { - return - } - if removeAllArgs { - span.Meta[TagValkeyRawCommand] = o.RemoveAllRedisArgs(span.Meta[TagValkeyRawCommand]) - return - } - span.Meta[TagValkeyRawCommand] = o.ObfuscateRedisString(span.Meta[TagValkeyRawCommand]) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/transform.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/transform.go deleted file mode 100644 index 7fbc57fbf8..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/transform/transform.go +++ /dev/null @@ -1,550 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package transform implements mappings from OTLP to DD semantics, and helpers -package transform - -import ( - "encoding/hex" - "encoding/json" - "fmt" - "strconv" - "strings" - - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" - semconv "go.opentelemetry.io/collector/semconv/v1.6.1" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/datadog-agent/pkg/trace/config" - "github.com/DataDog/datadog-agent/pkg/trace/sampler" - "github.com/DataDog/datadog-agent/pkg/trace/traceutil" - "github.com/DataDog/datadog-agent/pkg/util/log" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes" -) - -const ( - // KeyDatadogService is the key for the service name in the Datadog namespace - KeyDatadogService = "datadog.service" - // KeyDatadogName is the key for the operation name in the Datadog namespace - KeyDatadogName = "datadog.name" - // KeyDatadogResource is the key for the resource name in the Datadog namespace - KeyDatadogResource = "datadog.resource" - // KeyDatadogSpanKind is the key for the span kind in the Datadog namespace - KeyDatadogSpanKind = "datadog.span.kind" - // KeyDatadogType is the key for the span type in the Datadog namespace - KeyDatadogType = "datadog.type" - // KeyDatadogError is the key for the error flag in the Datadog namespace - KeyDatadogError = "datadog.error" - // KeyDatadogErrorMsg is the key for the error message in the Datadog namespace - KeyDatadogErrorMsg = "datadog.error.msg" - // KeyDatadogErrorType is the key for the error type in the Datadog namespace - KeyDatadogErrorType = "datadog.error.type" - // KeyDatadogErrorStack is the key for the error stack in the Datadog namespace - KeyDatadogErrorStack = "datadog.error.stack" - // KeyDatadogVersion is the key for the version in the Datadog namespace - KeyDatadogVersion = "datadog.version" - // KeyDatadogHTTPStatusCode is the key for the HTTP status code in the Datadog namespace - KeyDatadogHTTPStatusCode = "datadog.http_status_code" - // KeyDatadogHost is the key for the host in the Datadog namespace - KeyDatadogHost = "datadog.host" - // KeyDatadogEnvironment is the key for the environment in the Datadog namespace - KeyDatadogEnvironment = "datadog.env" - // KeyDatadogContainerID is the key for the container ID in the Datadog namespace - KeyDatadogContainerID = "datadog.container_id" - // KeyDatadogContainerTags is the key for the container tags in the Datadog namespace - KeyDatadogContainerTags = "datadog.container_tags" -) - -// OperationAndResourceNameV2Enabled checks if the new operation and resource name logic should be used -func OperationAndResourceNameV2Enabled(conf *config.AgentConfig) bool { - return !conf.OTLPReceiver.SpanNameAsResourceName && len(conf.OTLPReceiver.SpanNameRemappings) == 0 && !conf.HasFeature("disable_operation_and_resource_name_logic_v2") -} - -// OtelSpanToDDSpanMinimal otelSpanToDDSpan converts an OTel span to a DD span. -// The converted DD span only has the minimal number of fields for APM stats calculation and is only meant -// to be used in OTLPTracesToConcentratorInputs. Do not use them for other purposes. -func OtelSpanToDDSpanMinimal( - otelspan ptrace.Span, - otelres pcommon.Resource, - lib pcommon.InstrumentationScope, - isTopLevel, topLevelByKind bool, - conf *config.AgentConfig, - peerTagKeys []string, -) *pb.Span { - spanKind := otelspan.Kind() - - ddspan := &pb.Span{ - Service: traceutil.GetOTelAttrVal(otelspan.Attributes(), true, KeyDatadogService), - Name: traceutil.GetOTelAttrVal(otelspan.Attributes(), true, KeyDatadogName), - Resource: traceutil.GetOTelAttrVal(otelspan.Attributes(), true, KeyDatadogResource), - Type: traceutil.GetOTelAttrVal(otelspan.Attributes(), true, KeyDatadogType), - TraceID: traceutil.OTelTraceIDToUint64(otelspan.TraceID()), - SpanID: traceutil.OTelSpanIDToUint64(otelspan.SpanID()), - ParentID: traceutil.OTelSpanIDToUint64(otelspan.ParentSpanID()), - Start: int64(otelspan.StartTimestamp()), - Duration: int64(otelspan.EndTimestamp()) - int64(otelspan.StartTimestamp()), - Meta: make(map[string]string, otelspan.Attributes().Len()+otelres.Attributes().Len()), - Metrics: make(map[string]float64), - } - if isErrorVal, ok := otelspan.Attributes().Get(KeyDatadogError); ok { - ddspan.Error = int32(isErrorVal.Int()) - } else { - if otelspan.Status().Code() == ptrace.StatusCodeError { - ddspan.Error = 1 - } - } - - if incomingSpanKindName := traceutil.GetOTelAttrVal(otelspan.Attributes(), true, KeyDatadogSpanKind); incomingSpanKindName != "" { - ddspan.Meta["span.kind"] = incomingSpanKindName - } - - if !conf.OTLPReceiver.IgnoreMissingDatadogFields { - if ddspan.Service == "" { - ddspan.Service = traceutil.GetOTelService(otelres, true) - } - - if OperationAndResourceNameV2Enabled(conf) { - if ddspan.Name == "" { - ddspan.Name = traceutil.GetOTelOperationNameV2(otelspan) - } - if ddspan.Resource == "" { - ddspan.Resource = traceutil.GetOTelResourceV2(otelspan, otelres) - } - } else { - if ddspan.Name == "" { - ddspan.Name = traceutil.GetOTelOperationNameV1(otelspan, otelres, lib, conf.OTLPReceiver.SpanNameAsResourceName, conf.OTLPReceiver.SpanNameRemappings, true) - } - if ddspan.Resource == "" { - ddspan.Resource = traceutil.GetOTelResourceV1(otelspan, otelres) - } - } - - if ddspan.Type == "" { - // correct span type logic if using new resource receiver, keep same if on v1. separate from OperationAndResourceNameV2Enabled. - if !conf.HasFeature("disable_receive_resource_spans_v2") { - ddspan.Type = traceutil.GetOTelSpanType(otelspan, otelres) - } else { - ddspan.Type = traceutil.GetOTelAttrValInResAndSpanAttrs(otelspan, otelres, true, "span.type") - if ddspan.Type == "" { - ddspan.Type = traceutil.SpanKind2Type(otelspan, otelres) - } - } - } - - if !spanMetaHasKey(ddspan, "span.kind") { - ddspan.Meta["span.kind"] = traceutil.OTelSpanKindName(spanKind) - } - var code uint32 - if incomingCode, ok := otelspan.Attributes().Get(KeyDatadogHTTPStatusCode); ok { - code = uint32(incomingCode.Int()) - } else { - code = traceutil.GetOTelStatusCode(otelspan) - } - if code != 0 { - ddspan.Metrics[traceutil.TagStatusCode] = float64(code) - } - } - if isTopLevel { - traceutil.SetTopLevel(ddspan, true) - } - if isMeasured := traceutil.GetOTelAttrVal(otelspan.Attributes(), false, "_dd.measured"); isMeasured == "1" { - traceutil.SetMeasured(ddspan, true) - } else if topLevelByKind && (spanKind == ptrace.SpanKindClient || spanKind == ptrace.SpanKindProducer) { - // When enable_otlp_compute_top_level_by_span_kind is true, compute stats for client-side spans - traceutil.SetMeasured(ddspan, true) - } - for _, peerTagKey := range peerTagKeys { - if peerTagVal := traceutil.GetOTelAttrValInResAndSpanAttrs(otelspan, otelres, false, peerTagKey); peerTagVal != "" { - ddspan.Meta[peerTagKey] = peerTagVal - } - } - return ddspan -} - -func isDatadogAPMConventionKey(k string) bool { - return k == "service.name" || k == "operation.name" || k == "resource.name" || k == "span.type" || strings.HasPrefix(k, "datadog.") -} - -// GetDDKeyForOTLPAttribute looks for a key in the Datadog HTTP convention that matches the given key from the -// OTLP HTTP convention. Otherwise, check if it is a Datadog APM convention key - if it is, it will be handled with -// specialized logic elsewhere, so return an empty string. If it isn't, return the original key. -func GetDDKeyForOTLPAttribute(k string) string { - mappedKey, found := attributes.HTTPMappings[k] - switch { - case found: - break - case strings.HasPrefix(k, "http.request.header."): - mappedKey = fmt.Sprintf("http.request.headers.%s", strings.TrimPrefix(k, "http.request.header.")) - case !isDatadogAPMConventionKey(k): - mappedKey = k - default: - return "" - } - return mappedKey -} - -func setMetaOTLPWithSemConvMappings(k string, value string, ddspan *pb.Span, ignoreMissingDatadogFields bool) { - mappedKey := GetDDKeyForOTLPAttribute(k) - // Exclude Datadog APM conventions. - // These are handled above explicitly. - if mappedKey != "" { - if _, ok := metaKeysToDDSemanticsKeys[mappedKey]; ok { - if ddspan.Meta[mappedKey] != "" || ignoreMissingDatadogFields { - return - } - } - SetMetaOTLP(ddspan, mappedKey, value) - } -} - -func setMetricOTLPWithSemConvMappings(k string, value float64, ddspan *pb.Span, ignoreMissingDatadogFields bool) { - mappedKey := GetDDKeyForOTLPAttribute(k) - // Exclude Datadog APM conventions. - // These are handled above explicitly. - if mappedKey != "" { - if _, ok := metaKeysToDDSemanticsKeys[mappedKey]; ok { - if _, ok := ddspan.Metrics[mappedKey]; ok || ignoreMissingDatadogFields { - return - } - } - SetMetricOTLP(ddspan, mappedKey, value) - } -} - -var ddSemanticsKeysToMetaKeys = map[string]string{ - KeyDatadogEnvironment: "env", - KeyDatadogVersion: "version", - KeyDatadogHTTPStatusCode: "http.status_code", - KeyDatadogErrorMsg: "error.msg", - KeyDatadogErrorType: "error.type", - KeyDatadogErrorStack: "error.stack", -} - -var metaKeysToDDSemanticsKeys = map[string]string{ - "env": KeyDatadogEnvironment, - "version": KeyDatadogVersion, - "http.status_code": KeyDatadogHTTPStatusCode, - "error.msg": KeyDatadogErrorMsg, - "error.type": KeyDatadogErrorType, - "error.stack": KeyDatadogErrorStack, -} - -// OtelSpanToDDSpan converts an OTel span to a DD span. -func OtelSpanToDDSpan( - otelspan ptrace.Span, - otelres pcommon.Resource, - lib pcommon.InstrumentationScope, - conf *config.AgentConfig, -) *pb.Span { - spanKind := otelspan.Kind() - topLevelByKind := conf.HasFeature("enable_otlp_compute_top_level_by_span_kind") - isTopLevel := false - if topLevelByKind { - isTopLevel = otelspan.ParentSpanID() == pcommon.NewSpanIDEmpty() || spanKind == ptrace.SpanKindServer || spanKind == ptrace.SpanKindConsumer - } - ddspan := OtelSpanToDDSpanMinimal(otelspan, otelres, lib, isTopLevel, topLevelByKind, conf, nil) - - for ddSemanticKey, ddSpanMetaKey := range ddSemanticsKeysToMetaKeys { - if incomingValue := traceutil.GetOTelAttrVal(otelspan.Attributes(), false, ddSemanticKey); incomingValue != "" { - ddspan.Meta[ddSpanMetaKey] = incomingValue - } - } - - otelres.Attributes().Range(func(k string, v pcommon.Value) bool { - value := v.AsString() - setMetaOTLPWithSemConvMappings(k, value, ddspan, conf.OTLPReceiver.IgnoreMissingDatadogFields) - return true - }) - - for k, v := range lib.Attributes().Range { - ddspan.Meta[k] = v.AsString() - } - - traceID := otelspan.TraceID() - ddspan.Meta["otel.trace_id"] = hex.EncodeToString(traceID[:]) - if !spanMetaHasKey(ddspan, "version") { - if serviceVersion, ok := otelres.Attributes().Get(semconv.AttributeServiceVersion); ok { - ddspan.Meta["version"] = serviceVersion.AsString() - } - } - - if otelspan.Events().Len() > 0 { - ddspan.Meta["events"] = MarshalEvents(otelspan.Events()) - } - TagSpanIfContainsExceptionEvent(otelspan, ddspan) - if otelspan.Links().Len() > 0 { - ddspan.Meta["_dd.span_links"] = MarshalLinks(otelspan.Links()) - } - - otelspan.Attributes().Range(func(k string, v pcommon.Value) bool { - if strings.HasPrefix(k, "datadog.") { - return true - } - switch v.Type() { - case pcommon.ValueTypeDouble: - setMetricOTLPWithSemConvMappings(k, v.Double(), ddspan, conf.OTLPReceiver.IgnoreMissingDatadogFields) - case pcommon.ValueTypeInt: - setMetricOTLPWithSemConvMappings(k, float64(v.Int()), ddspan, conf.OTLPReceiver.IgnoreMissingDatadogFields) - default: - setMetaOTLPWithSemConvMappings(k, v.AsString(), ddspan, conf.OTLPReceiver.IgnoreMissingDatadogFields) - } - - return true - }) - - if otelspan.TraceState().AsRaw() != "" { - ddspan.Meta["w3c.tracestate"] = otelspan.TraceState().AsRaw() - } - if lib.Name() != "" { - ddspan.Meta[semconv.OtelLibraryName] = lib.Name() - } - if lib.Version() != "" { - ddspan.Meta[semconv.OtelLibraryVersion] = lib.Version() - } - ddspan.Meta[semconv.OtelStatusCode] = otelspan.Status().Code().String() - if msg := otelspan.Status().Message(); msg != "" { - ddspan.Meta[semconv.OtelStatusDescription] = msg - } - - if !conf.OTLPReceiver.IgnoreMissingDatadogFields { - if !spanMetaHasKey(ddspan, "error.msg") || !spanMetaHasKey(ddspan, "error.type") || !spanMetaHasKey(ddspan, "error.stack") { - ddspan.Error = Status2Error(otelspan.Status(), otelspan.Events(), ddspan.Meta) - } - - if !spanMetaHasKey(ddspan, "env") { - if env := traceutil.GetOTelEnv(otelres); env != "" { - ddspan.Meta["env"] = env - } - } - } - - return ddspan -} - -// TagSpanIfContainsExceptionEvent tags spans that contain at least on exception span event. -func TagSpanIfContainsExceptionEvent(otelspan ptrace.Span, ddspan *pb.Span) { - for i := range otelspan.Events().Len() { - if otelspan.Events().At(i).Name() == "exception" { - ddspan.Meta["_dd.span_events.has_exception"] = "true" - return - } - } -} - -// MarshalEvents marshals events into JSON. -func MarshalEvents(events ptrace.SpanEventSlice) string { - var str strings.Builder - str.WriteString("[") - for i := 0; i < events.Len(); i++ { - e := events.At(i) - if i > 0 { - str.WriteString(",") - } - var wrote bool - str.WriteString("{") - if v := e.Timestamp(); v != 0 { - str.WriteString(`"time_unix_nano":`) - str.WriteString(strconv.FormatUint(uint64(v), 10)) - wrote = true - } - if v := e.Name(); v != "" { - if wrote { - str.WriteString(",") - } - str.WriteString(`"name":`) - if name, err := json.Marshal(v); err == nil { - str.WriteString(string(name)) - } else { - // still collect the event information, if possible - log.Errorf("Error parsing span event name %v, using name 'redacted' instead", name) - str.WriteString(`"redacted"`) - } - wrote = true - } - if e.Attributes().Len() > 0 { - if wrote { - str.WriteString(",") - } - str.WriteString(`"attributes":{`) - j := 0 - e.Attributes().Range(func(k string, v pcommon.Value) bool { - // collect the attribute only if the key is json-parseable, else drop the attribute - if key, err := json.Marshal(k); err == nil { - if j > 0 { - str.WriteString(",") - } - str.WriteString(string(key)) - str.WriteString(":") - if val, err := json.Marshal(v.AsRaw()); err == nil { - str.WriteString(string(val)) - } else { - log.Warnf("Trouble parsing the following attribute value, dropping: %v", v.AsString()) - str.WriteString(`"redacted"`) - } - j++ - } else { - log.Errorf("Error parsing the following attribute key on span event %v, dropping attribute: %v", e.Name(), k) - e.SetDroppedAttributesCount(e.DroppedAttributesCount() + 1) - } - j++ - return true - }) - str.WriteString("}") - wrote = true - } - if v := e.DroppedAttributesCount(); v != 0 { - if wrote { - str.WriteString(",") - } - str.WriteString(`"dropped_attributes_count":`) - str.WriteString(strconv.FormatUint(uint64(v), 10)) - } - str.WriteString("}") - } - str.WriteString("]") - return str.String() -} - -// MarshalLinks marshals span links into JSON. -func MarshalLinks(links ptrace.SpanLinkSlice) string { - var str strings.Builder - str.WriteString("[") - for i := 0; i < links.Len(); i++ { - l := links.At(i) - if i > 0 { - str.WriteString(",") - } - t := l.TraceID() - str.WriteString(`{"trace_id":"`) - str.WriteString(hex.EncodeToString(t[:])) - s := l.SpanID() - str.WriteString(`","span_id":"`) - str.WriteString(hex.EncodeToString(s[:])) - str.WriteString(`"`) - if ts := l.TraceState().AsRaw(); len(ts) > 0 { - str.WriteString(`,"tracestate":"`) - str.WriteString(ts) - str.WriteString(`"`) - } - if l.Attributes().Len() > 0 { - str.WriteString(`,"attributes":{`) - var b bool - l.Attributes().Range(func(k string, v pcommon.Value) bool { - if b { - str.WriteString(",") - } - b = true - str.WriteString(`"`) - str.WriteString(k) - str.WriteString(`":"`) - str.WriteString(v.AsString()) - str.WriteString(`"`) - return true - }) - str.WriteString("}") - } - if l.DroppedAttributesCount() > 0 { - str.WriteString(`,"dropped_attributes_count":`) - str.WriteString(strconv.FormatUint(uint64(l.DroppedAttributesCount()), 10)) - } - str.WriteString("}") - } - str.WriteString("]") - return str.String() -} - -// SetMetaOTLP sets the k/v OTLP attribute pair as a tag on span s. -func SetMetaOTLP(s *pb.Span, k, v string) { - switch k { - case "operation.name": - s.Name = v - case "service.name": - s.Service = v - case "resource.name": - s.Resource = v - case "span.type": - s.Type = v - case "analytics.event": - if v, err := strconv.ParseBool(v); err == nil { - if v { - s.Metrics[sampler.KeySamplingRateEventExtraction] = 1 - } else { - s.Metrics[sampler.KeySamplingRateEventExtraction] = 0 - } - } - default: - s.Meta[k] = v - } -} - -// SetMetricOTLP sets the k/v OTLP attribute pair as a metric on span s. -func SetMetricOTLP(s *pb.Span, k string, v float64) { - switch k { - case "sampling.priority": - s.Metrics["_sampling_priority_v1"] = v - default: - s.Metrics[k] = v - } -} - -// Status2Error checks the given status and events and applies any potential error and messages -// to the given span attributes. -func Status2Error(status ptrace.Status, events ptrace.SpanEventSlice, metaMap map[string]string) int32 { - if status.Code() != ptrace.StatusCodeError { - return 0 - } - for i := 0; i < events.Len(); i++ { - e := events.At(i) - if strings.ToLower(e.Name()) != "exception" { - continue - } - attrs := e.Attributes() - if v, ok := attrs.Get(semconv.AttributeExceptionMessage); ok { - metaMap["error.msg"] = v.AsString() - } - if v, ok := attrs.Get(semconv.AttributeExceptionType); ok { - metaMap["error.type"] = v.AsString() - } - if v, ok := attrs.Get(semconv.AttributeExceptionStacktrace); ok { - metaMap["error.stack"] = v.AsString() - } - } - if _, ok := metaMap["error.msg"]; !ok { - // no error message was extracted, find alternatives - if status.Message() != "" { - // use the status message - metaMap["error.msg"] = status.Message() - } else if _, httpcode := GetFirstFromMap(metaMap, "http.response.status_code", "http.status_code"); httpcode != "" { - // `http.status_code` was renamed to `http.response.status_code` in the HTTP stabilization from v1.23. - // See https://opentelemetry.io/docs/specs/semconv/http/migration-guide/#summary-of-changes - - // http.status_text was removed in spec v0.7.0 (https://github.com/open-telemetry/opentelemetry-specification/pull/972) - // TODO (OTEL-1791) Remove this and use a map from status code to status text. - if httptext, ok := metaMap["http.status_text"]; ok { - metaMap["error.msg"] = fmt.Sprintf("%s %s", httpcode, httptext) - } else { - metaMap["error.msg"] = httpcode - } - } - } - return 1 -} - -// GetFirstFromMap checks each key in the given keys in the map and returns the first key-value pair whose -// key matches, or empty strings if none matches. -func GetFirstFromMap(m map[string]string, keys ...string) (string, string) { - for _, key := range keys { - if val := m[key]; val != "" { - return key, val - } - } - return "", "" -} - -func spanMetaHasKey(s *pb.Span, k string) bool { - _, ok := s.Meta[k] - return ok -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/version/version.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/version/version.go deleted file mode 100644 index 3b246c5473..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/version/version.go +++ /dev/null @@ -1,66 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package version comprises functions that are used to retrieve *app* version data from incoming traces. -package version - -import ( - "strings" - - "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" -) - -const ( - versionField = "version" - gitCommitShaField = "_dd.git.commit.sha" - gitCommitShaTagPrefix = "git.commit.sha:" - imageTagPrefix = "image_tag:" -) - -// GetVersionDataFromContainerTags will return the git commit sha and image tag from container tags, if present. -func GetVersionDataFromContainerTags(cTags []string) (gitCommitSha, imageTag string) { - for _, t := range cTags { - if gitCommitSha == "" { - if sha, ok := strings.CutPrefix(t, gitCommitShaTagPrefix); ok { - gitCommitSha = sha - } - } - if imageTag == "" { - if image, ok := strings.CutPrefix(t, imageTagPrefix); ok { - imageTag = image - } - } - if gitCommitSha != "" && imageTag != "" { - break - } - } - return gitCommitSha, imageTag -} - -// GetGitCommitShaFromTrace returns the first "git_commit_sha" tag found in trace t. -func GetGitCommitShaFromTrace(root *trace.Span, t *trace.TraceChunk) string { - return searchTraceForField(root, t, gitCommitShaField) -} - -// GetAppVersionFromTrace returns the first "version" tag found in trace t. -// Search starts by root -func GetAppVersionFromTrace(root *trace.Span, t *trace.TraceChunk) string { - return searchTraceForField(root, t, versionField) -} - -func searchTraceForField(root *trace.Span, t *trace.TraceChunk, field string) string { - if v, ok := root.Meta[field]; ok { - return v - } - for _, s := range t.Spans { - if s.SpanID == root.SpanID { - continue - } - if v, ok := s.Meta[field]; ok { - return v - } - } - return "" -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu.go deleted file mode 100644 index a2feda3f58..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu.go +++ /dev/null @@ -1,51 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build !windows && !aix - -// Package watchdog monitors the trace-agent resource usage. -package watchdog - -import ( - "os" - "path/filepath" - "strconv" - - "github.com/DataDog/datadog-agent/pkg/trace/log" - "github.com/shirou/gopsutil/v4/process" -) - -func getpid() int { - // Based on gopsutil's HostProc https://github.com/shirou/gopsutil/blob/672e2518f2ce365ab8504c9f1a8038dc3ad09cf6/internal/common/common.go#L343-L345 - // This PID needs to match the one in the procfs that gopsutil is going to look in. - p := os.Getenv("HOST_PROC") - if p == "" { - p = "/proc" - } - self := filepath.Join(p, "self") - pidf, err := os.Readlink(self) - if err != nil { - log.Warnf("Failed to read pid from %s: %s. Falling back to os.Getpid", self, err) - return os.Getpid() - } - pid, err := strconv.Atoi(filepath.Base(pidf)) - if err != nil { - log.Warnf("Failed to parse pid from %s: %s. Falling back to os.Getpid", pidf, err) - return os.Getpid() - } - return pid -} - -func cpuTimeUser(pid int32) (float64, error) { - p, err := process.NewProcess(pid) - if err != nil { - return 0, err - } - times, err := p.Times() - if err != nil { - return 0, err - } - return times.User, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_aix.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_aix.go deleted file mode 100644 index 318f098d98..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_aix.go +++ /dev/null @@ -1,111 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-2020 Datadog, Inc. - -package watchdog - -import ( - "encoding/binary" - "fmt" - "os" - "time" -) - -// From proc(5) on AIX 7.2 -// status -// Contains state information about the process and one of its -// representative thread. The file is formatted as a struct pstatus -// type containing the following members: -// -// uint32_t pr_flag; /* process flags from proc struct p_flag */ -// uint32_t pr_flag2; /* process flags from proc struct p_flag2 */ -// uint32_t pr_flags; /* /proc flags */ -// uint32_t pr_nlwp; /* number of threads in the process */ -// char pr_stat; /* process state from proc p_stat */ -// char pr_dmodel; /* data model for the process */ -// char pr__pad1[6]; /* reserved for future use */ -// pr_sigset_t pr_sigpend; /* set of process pending signals */ -// prptr64_t pr_brkbase; /* address of the process heap */ -// uint64_t pr_brksize; /* size of the process heap, in bytes */ -// prptr64_t pr_stkbase; /* address of the process stack */ -// uint64_t pr_stksize; /* size of the process stack, in bytes */ -// pid64_t pr_pid; /* process id */ -// pid64_t pr_ppid; /* parent process id */ -// pid64_t pr_pgid; /* process group id */ -// pid64_t pr_sid; /* session id */ -// struct pr_timestruc64_t pr_utime; /* process user cpu time */ -// struct pr_timestruc64_t pr_stime; /* process system cpu time */ -// struct pr_timestruc64_t pr_cutime; /* sum of children's user times */ -// struct pr_timestruc64_t pr_cstime; /* sum of children's system times */ -// pr_sigset_t pr_sigtrace; /* mask of traced signals */ -// fltset_t pr_flttrace; /* mask of traced hardware faults */ -// uint32_t pr_sysentry_offset; /* offset into pstatus file of sysset_t -// * identifying system calls traced on -// -// * entry. If 0, then no entry syscalls -// * are being traced. */ -// uint32_t pr_sysexit_offset; /* offset into pstatus file of sysset_t -// * identifying system calls traced on -// * exit. If 0, then no exit syscalls -// * are being traced. */ -// uint64_t pr__pad[8]; /* reserved for future use */ -// lwpstatus_t pr_lwp; /* "representative" thread status */ -// -// From /usr/include/sys/procfs.h -// typedef struct pr_sigset -// { -// uint64_t ss_set[4]; /* signal set */ -// } pr_sigset_t; -// -// typedef struct pr_timestruc64 -// { -// int64_t tv_sec; /* 64 bit time_t value */ -// int32_t tv_nsec; /* 32 bit suseconds_t value */ -// uint32_t __pad; /* reserved for future use */ -// } pr_timestruc64_t; -// -// typedef void * prptr64_t; -// -// The fields before the user cpu time (pr_utime) are: -// uint32_t pr_flag; 4 4 -// uint32_t pr_flag2; 4 8 -// uint32_t pr_flags; 4 12 -// uint32_t pr_nlwp; 4 16 -// char pr_stat; 1 17 -// char pr_dmodel; 1 18 -// char pr__pad1[6]; 6 24 -// pr_sigset_t pr_sigpend; (4 * 8) = 32 56 -// prptr64_t pr_brkbase; 8 64 -// uint64_t pr_brksize; 8 72 -// prptr64_t pr_stkbase; 8 80 -// uint64_t pr_stksize; 8 88 -// pid64_t pr_pid; 8 96 -// pid64_t pr_ppid; 8 104 -// pid64_t pr_pgid; 8 112 -// pid64_t pr_sid; 8 120 -// total: 120 -// followed by: -// struct pr_timestruc64_t pr_utime; /* process user cpu time */ - -func cpuTimeUser(pid int32) (float64, error) { - f, err := os.Open(fmt.Sprintf("/proc/%d/status", pid)) - if err != nil { - return 0, err - } - defer f.Close() - // As explained above, we will skip 120 bytes into the status file to locate the user CPU time. - f.Seek(120, os.SEEK_SET) - var ( - userSecs int64 - userNsecs int32 - ) - binary.Read(f, binary.BigEndian, &userSecs) - binary.Read(f, binary.BigEndian, &userNsecs) - time := float64(userSecs) + (float64(userNsecs) / float64(time.Second)) - return time, nil -} - -func getpid() int { - return os.Getpid() -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_windows.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_windows.go deleted file mode 100644 index 6613e30c51..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/cpu_windows.go +++ /dev/null @@ -1,56 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package watchdog monitors the trace-agent resource usage. -package watchdog - -import ( - "os" - - "golang.org/x/sys/windows" -) - -func getpid() int { - return os.Getpid() -} - -// this code was copied over from shirou/gopsutil/process because we can't import this package on Windows, -// due to its "wmi" dependency. - -func cpuTimeUser(pid int32) (float64, error) { - t, err := getProcessCPUTimes(pid) - if err != nil { - return 0, err - } - return float64(t.UserTime.HighDateTime)*429.4967296 + float64(t.UserTime.LowDateTime)*1e-7, nil -} - -type systemTimes struct { - CreateTime windows.Filetime - ExitTime windows.Filetime - KernelTime windows.Filetime - UserTime windows.Filetime -} - -func getProcessCPUTimes(pid int32) (systemTimes, error) { - var times systemTimes - - // PROCESS_QUERY_LIMITED_INFORMATION is 0x1000 - h, err := windows.OpenProcess(0x1000, false, uint32(pid)) - if err != nil { - return times, err - } - defer windows.CloseHandle(h) - - err = windows.GetProcessTimes( - windows.Handle(h), - ×.CreateTime, - ×.ExitTime, - ×.KernelTime, - ×.UserTime, - ) - - return times, err -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/info.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/info.go deleted file mode 100644 index 5522df7fc4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/info.go +++ /dev/null @@ -1,99 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package watchdog - -import ( - "runtime" - "sync" - "time" -) - -const ( - // cacheDelay should be long enough so that we don't poll the info - // too often and waste resources doing it, and also long enough - // so that it's not jittering (CPU can be volatile). - // OTOH it should be short enough to get up-to-date recent info. - cacheDelay = 20 * time.Second -) - -// CPUInfo contains basic CPU info -type CPUInfo struct { - // UserAvg is the average of the user CPU usage since last time - // it was polled. 0 means "not used at all" and 1 means "1 CPU was - // totally full for that period". So it might be greater than 1 if - // the process is monopolizing several cores. - UserAvg float64 -} - -// MemInfo contains basic memory info -type MemInfo struct { - // Alloc is the number of bytes allocated and not yet freed - // as described in runtime.MemStats.Alloc - Alloc uint64 -} - -// Info contains all the watchdog infos, to be published by expvar -type Info struct { - // CPU contains basic CPU info - CPU CPUInfo - // Mem contains basic Mem info - Mem MemInfo -} - -// CurrentInfo is used to query CPU and Mem info, it keeps data from -// the previous calls to calculate averages. It is not thread safe. -type CurrentInfo struct { - pid int32 - mu sync.Mutex - cacheDelay time.Duration - - lastCPUTime time.Time - lastCPUUser float64 - lastCPU CPUInfo -} - -// NewCurrentInfo creates a new CurrentInfo referring to the current running program. -func NewCurrentInfo() *CurrentInfo { - return &CurrentInfo{ - pid: int32(getpid()), - cacheDelay: cacheDelay, - } -} - -// CPU returns basic CPU info, or the previous valid CPU info and an error. -func (pi *CurrentInfo) CPU(now time.Time) (CPUInfo, error) { - pi.mu.Lock() - defer pi.mu.Unlock() - - dt := now.Sub(pi.lastCPUTime) - if dt <= pi.cacheDelay { - return pi.lastCPU, nil // don't query too often, cache a little bit - } - pi.lastCPUTime = now - - userTime, err := cpuTimeUser(pi.pid) - if err != nil { - return pi.lastCPU, err - } - - dua := userTime - pi.lastCPUUser - pi.lastCPUUser = userTime - if dua <= 0 { - pi.lastCPU.UserAvg = 0 // shouldn't happen, but make sure result is always > 0 - } else { - pi.lastCPU.UserAvg = float64(time.Second) * dua / float64(dt) - pi.lastCPUUser = userTime - } - - return pi.lastCPU, nil -} - -// Mem returns basic memory info. -func (pi *CurrentInfo) Mem() MemInfo { - var ms runtime.MemStats - runtime.ReadMemStats(&ms) - return MemInfo{Alloc: ms.Alloc} -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/logonpanic.go b/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/logonpanic.go deleted file mode 100644 index a69934a589..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/trace/watchdog/logonpanic.go +++ /dev/null @@ -1,49 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package watchdog - -import ( - "fmt" - "runtime" - - "github.com/DataDog/datadog-agent/pkg/trace/log" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -const shortErrMsgLen = 17 // 20 char max with tailing "..." - -// shortMsg shortens the length of error message to avoid having high -// cardinality on "err:" tags -func shortErrMsg(msg string) string { - if len(msg) <= shortErrMsgLen { - return msg - } - return msg[:shortErrMsgLen] + "..." -} - -// LogOnPanic catches panics and logs them on the fly. It also flushes -// the log file, ensuring the message appears. Then it propagates the panic -// so that the program flow remains unchanged. -func LogOnPanic(statsd statsd.ClientInterface) { - if err := recover(); err != nil { - // Full print of the trace in the logs - buf := make([]byte, 4096) - length := runtime.Stack(buf, false) - stacktrace := string(buf[:length]) - errMsg := fmt.Sprintf("%v", err) - logMsg := "Unexpected panic: " + errMsg + "\n" + stacktrace - - _ = statsd.Gauge("datadog.trace_agent.panic", 1, []string{ - "err:" + shortErrMsg(errMsg), - }, 1) - - log.Error(logMsg) - log.Flush() - - panic(err) - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/util/log/klog_redirect.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/klog_redirect.go deleted file mode 100644 index fad01af487..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/klog_redirect.go +++ /dev/null @@ -1,59 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import "strings" - -// KlogRedirectLogger is used to redirect klog logs to datadog logs. klog is -// client-go's logger, logging to STDERR by default, which makes all severities -// into ERROR, along with the formatting just being off. To make the -// conversion, we set a KlogRedirectLogger as klog's output, and parse the severity -// and log message out of every log line. -// NOTE: on klog v2 this parsing is no longer necessary, as it allows us to use -// kSetLogger() instead of kSetOutputBySeverity(). unfortunately we -// still have some dependencies stuck on v1, so we keep the parsing. -type KlogRedirectLogger struct { - stackDepth int -} - -// NewKlogRedirectLogger creates a new KlogRedirectLogger with provided stack depth -func NewKlogRedirectLogger(stackDepth int) KlogRedirectLogger { - return KlogRedirectLogger{ - stackDepth: stackDepth, - } -} - -func (l KlogRedirectLogger) Write(b []byte) (int, error) { - // klog log lines have the following format: - // Lmmdd hh:mm:ss.uuuuuu threadid file:line] msg... - // so we parse L to decide in which level to log, and we try to find - // the ']' character, to ignore anything up to that point, as we don't - // care about the header outside of the log level. - - msg := string(b) - - i := strings.IndexByte(msg, ']') - if i >= 0 { - // if we find a ']', we ignore anything 2 positions from it - // (itself, plus a blank space) - msg = msg[i+2:] - } - - switch b[0] { - case 'I': - InfoStackDepth(l.stackDepth, msg) - case 'W': - _ = WarnStackDepth(l.stackDepth, msg) - case 'E': - _ = ErrorStackDepth(l.stackDepth, msg) - case 'F': - _ = CriticalStackDepth(l.stackDepth, msg) - default: - InfoStackDepth(l.stackDepth, msg) - } - - return 0, nil -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/levels.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/levels.go deleted file mode 100644 index 52e8dd99c4..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/levels.go +++ /dev/null @@ -1,47 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import "github.com/cihub/seelog" - -// LogLevel is the type of log levels -// -//nolint:revive // keeping the original type name from seelog -type LogLevel seelog.LogLevel - -// Log levels -const ( - TraceLvl LogLevel = seelog.TraceLvl - DebugLvl LogLevel = seelog.DebugLvl - InfoLvl LogLevel = seelog.InfoLvl - WarnLvl LogLevel = seelog.WarnLvl - ErrorLvl LogLevel = seelog.ErrorLvl - CriticalLvl LogLevel = seelog.CriticalLvl - Off LogLevel = seelog.Off -) - -// Log level string representations -const ( - TraceStr = seelog.TraceStr - DebugStr = seelog.DebugStr - InfoStr = seelog.InfoStr - WarnStr = seelog.WarnStr - ErrorStr = seelog.ErrorStr - CriticalStr = seelog.CriticalStr - OffStr = seelog.OffStr -) - -func (level LogLevel) String() string { - return seelog.LogLevel(level).String() -} - -// LogLevelFromString returns a LogLevel from a string -// -//nolint:revive // keeping the original function name from seelog -func LogLevelFromString(levelStr string) (LogLevel, bool) { - level, ok := seelog.LogLevelFromString(levelStr) - return LogLevel(level), ok -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log.go deleted file mode 100644 index da2043a482..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log.go +++ /dev/null @@ -1,1045 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package log implements logging for the datadog agent. It wraps seelog, and -// supports logging to multiple destinations, buffering messages logged before -// setup, and scrubbing secrets from log messages. -// -// # Compatibility -// -// This module is exported and can be used outside of the datadog-agent -// repository, but is not designed as a general-purpose logging system. Its -// API may change incompatibly. -package log - -import ( - "bytes" - "errors" - "fmt" - "os" - "strings" - "sync" - - "go.uber.org/atomic" - - "github.com/DataDog/datadog-agent/pkg/util/scrubber" -) - -type loggerPointer struct { - atomic.Pointer[DatadogLogger] -} - -var ( - // Logger is the main DatadogLogger - logger loggerPointer - jmxLogger loggerPointer - - // This buffer holds log lines sent to the logger before its - // initialization. Even if initializing the logger is one of the first - // things the agent does, we still: load the conf, resolve secrets inside, - // compute the final proxy settings, ... - // - // This buffer should be very short lived. - logsBuffer = []func(){} - bufferMutex sync.Mutex - defaultStackDepth = 3 - - // for testing purposes - scrubBytesFunc = scrubber.ScrubBytes -) - -// DatadogLogger wrapper structure for seelog -type DatadogLogger struct { - inner LoggerInterface - level LogLevel - extra map[string]LoggerInterface - l sync.RWMutex -} - -/* -* Setup and initialization of the logger - */ - -// SetupLogger setup agent wide logger -func SetupLogger(i LoggerInterface, level string) { - logger.Store(setupCommonLogger(i, level)) - - // Flush the log entries logged before initialization now that the logger is initialized - bufferMutex.Lock() - defer bufferMutex.Unlock() - for _, logLine := range logsBuffer { - logLine() - } - logsBuffer = []func(){} -} - -func setupCommonLogger(i LoggerInterface, level string) *DatadogLogger { - l := &DatadogLogger{ - inner: i, - extra: make(map[string]LoggerInterface), - } - - lvl, ok := LogLevelFromString(level) - if !ok { - lvl = InfoLvl - } - l.level = LogLevel(lvl) - - // We're not going to call DatadogLogger directly, but using the - // exported functions, that will give us two frames in the stack - // trace that should be skipped to get to the original caller. - // - // The fact we need a constant "additional depth" means some - // theoretical refactor to avoid duplication in the functions - // below cannot be performed. - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - return l -} - -func addLogToBuffer(logHandle func()) { - bufferMutex.Lock() - defer bufferMutex.Unlock() - - logsBuffer = append(logsBuffer, logHandle) -} - -func (sw *DatadogLogger) scrub(s string) string { - if scrubbed, err := scrubBytesFunc([]byte(s)); err == nil { - return string(scrubbed) - } - return s -} - -/* -* Operation on the **logger level** - */ - -// ChangeLogLevel changes the current log level, valid levels are trace, debug, -// info, warn, error, critical and off, it requires a new seelog logger because -// an existing one cannot be updated -func ChangeLogLevel(li LoggerInterface, level string) error { - if err := logger.changeLogLevel(level); err != nil { - return err - } - - // See detailed explanation in SetupLogger(...) - if err := li.SetAdditionalStackDepth(defaultStackDepth); err != nil { - return err - } - - logger.replaceInnerLogger(li) - return nil - - // need to return something, just set to Info (expected default) -} -func (sw *loggerPointer) changeLogLevel(level string) error { - l := sw.Load() - if l == nil { - return errors.New("cannot change loglevel: logger not initialized") - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - return errors.New("cannot change loglevel: logger is initialized however logger.inner is nil") - } - - lvl, ok := LogLevelFromString(strings.ToLower(level)) - if !ok { - return errors.New("bad log level") - } - l.level = LogLevel(lvl) - return nil -} - -// GetLogLevel returns a seelog native representation of the current log level -func GetLogLevel() (LogLevel, error) { - return logger.getLogLevel() -} -func (sw *loggerPointer) getLogLevel() (LogLevel, error) { - l := sw.Load() - if l == nil { - return InfoLvl, errors.New("cannot get loglevel: logger not initialized") - } - - l.l.RLock() - defer l.l.RUnlock() - - if l.inner == nil { - return InfoLvl, errors.New("cannot get loglevel: logger not initialized") - } - - return l.level, nil -} - -// ShouldLog returns whether a given log level should be logged by the default logger -func ShouldLog(lvl LogLevel) bool { - // The lock stay in the exported function due to the use of `shouldLog` in function that already hold the lock - l := logger.Load() - if l != nil { - l.l.RLock() - defer l.l.RUnlock() - return l.shouldLog(lvl) - } - return false -} - -// This function should be called with `sw.l` held -func (sw *DatadogLogger) shouldLog(level LogLevel) bool { - return level >= sw.level -} - -// ValidateLogLevel validates the given log level and returns the corresponding Seelog log level. -// If the log level is "warning", it is converted to "warn" to handle a common gotcha when used with agent5. -// If the log level is not recognized, an error is returned. -func ValidateLogLevel(logLevel string) (string, error) { - seelogLogLevel := strings.ToLower(logLevel) - if seelogLogLevel == "warning" { // Common gotcha when used to agent5 - seelogLogLevel = "warn" - } - - if _, found := LogLevelFromString(seelogLogLevel); !found { - return "", fmt.Errorf("unknown log level: %s", seelogLogLevel) - } - return seelogLogLevel, nil -} - -/* -* Operation on the **logger** - */ - -// RegisterAdditionalLogger registers an additional logger for logging -func RegisterAdditionalLogger(n string, li LoggerInterface) error { - return logger.registerAdditionalLogger(n, li) -} -func (sw *loggerPointer) registerAdditionalLogger(n string, li LoggerInterface) error { - l := sw.Load() - if l == nil { - return errors.New("cannot register: logger not initialized") - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - return errors.New("cannot register: logger not initialized") - } - - if l.extra == nil { - - return errors.New("logger not fully initialized, additional logging unavailable") - } - - if _, ok := l.extra[n]; ok { - return errors.New("logger already registered with that name") - } - l.extra[n] = li - - return nil -} - -// ReplaceLogger allows replacing the internal logger, returns old logger -func ReplaceLogger(li LoggerInterface) LoggerInterface { - return logger.replaceInnerLogger(li) -} -func (sw *loggerPointer) replaceInnerLogger(li LoggerInterface) LoggerInterface { - l := sw.Load() - if l == nil { - return nil // Return nil if logger is not initialized - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - return nil // Return nil if logger.inner is not initialized - } - - old := l.inner - l.inner = li - - return old -} - -// Flush flushes the underlying inner log -func Flush() { - logger.flush() - jmxLogger.flush() -} -func (sw *loggerPointer) flush() { - l := sw.Load() - if l == nil { - return - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner != nil { - l.inner.Flush() - } -} - -/* -* log functions - */ - -// log logs a message at the given level, using either bufferFunc (if logging is not yet set up) or -// scrubAndLogFunc, and treating the variadic args as the message. -func log(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string), v ...interface{}) { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - return - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - addLogToBuffer(bufferFunc) - } else if l.shouldLog(logLevel) { - s := BuildLogEntry(v...) - scrubAndLogFunc(s) - } - -} -func logWithError(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string) error, fallbackStderr bool, v ...interface{}) error { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - err := formatError(v...) - if fallbackStderr { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err - } - - l.l.Lock() - - isInnerNil := l.inner == nil - - if isInnerNil { - if !fallbackStderr { - addLogToBuffer(bufferFunc) - } - } else if l.shouldLog(logLevel) { - defer l.l.Unlock() - s := BuildLogEntry(v...) - return scrubAndLogFunc(s) - } - - l.l.Unlock() - - err := formatError(v...) - // Originally (PR 6436) fallbackStderr check had been added to handle a small window - // where error messages had been lost before Logger had been initialized. Adjusting - // just for that case because if the error log should not be logged - because it has - // been suppressed then it should be taken into account. - if fallbackStderr && isInnerNil { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err -} - -/* -* logFormat functions - */ - -func logFormat(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string, ...interface{}), format string, params ...interface{}) { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - return - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - addLogToBuffer(bufferFunc) - } else if l.shouldLog(logLevel) { - scrubAndLogFunc(format, params...) - } -} -func logFormatWithError(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string, ...interface{}) error, format string, fallbackStderr bool, params ...interface{}) error { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - err := formatErrorf(format, params...) - if fallbackStderr { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err - } - - l.l.Lock() - - isInnerNil := l.inner == nil - - if isInnerNil { - if !fallbackStderr { - addLogToBuffer(bufferFunc) - } - } else if l.shouldLog(logLevel) { - defer l.l.Unlock() - return scrubAndLogFunc(format, params...) - } - - l.l.Unlock() - - err := formatErrorf(format, params...) - // Originally (PR 6436) fallbackStderr check had been added to handle a small window - // where error messages had been lost before Logger had been initialized. Adjusting - // just for that case because if the error log should not be logged - because it has - // been suppressed then it should be taken into account. - if fallbackStderr && isInnerNil { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err -} - -/* -* logContext functions - */ - -func logContext(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string), message string, depth int, context ...interface{}) { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - return - } - - l.l.Lock() - defer l.l.Unlock() - - if l.inner == nil { - addLogToBuffer(bufferFunc) - } else if l.shouldLog(logLevel) { - l.inner.SetContext(context) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - scrubAndLogFunc(message) - l.inner.SetContext(nil) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - } -} -func logContextWithError(logLevel LogLevel, bufferFunc func(), scrubAndLogFunc func(string) error, message string, fallbackStderr bool, depth int, context ...interface{}) error { - l := logger.Load() - - if l == nil { - addLogToBuffer(bufferFunc) - err := formatErrorc(message, context...) - if fallbackStderr { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err - } - - l.l.Lock() - - isInnerNil := l.inner == nil - - if isInnerNil { - if !fallbackStderr { - addLogToBuffer(bufferFunc) - } - } else if l.shouldLog(logLevel) { - l.inner.SetContext(context) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - err := scrubAndLogFunc(message) - l.inner.SetContext(nil) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - defer l.l.Unlock() - return err - } - - l.l.Unlock() - - err := formatErrorc(message, context...) - if fallbackStderr && isInnerNil { - fmt.Fprintf(os.Stderr, "%s: %s\n", logLevel.String(), err.Error()) - } - return err -} - -// trace logs at the trace level, called with sw.l held -func (sw *loggerPointer) trace(s string) { - l := sw.Load() - - if l == nil { - return - } - - scrubbed := l.scrub(s) - l.inner.Trace(scrubbed) - - for _, l := range l.extra { - l.Trace(scrubbed) - } -} - -// trace logs at the trace level and the current stack depth plus the -// additional given one, called with sw.l held -func (sw *loggerPointer) traceStackDepth(s string, depth int) { - l := sw.Load() - scrubbed := l.scrub(s) - - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - l.inner.Trace(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - l.Trace(scrubbed) - } -} - -// debug logs at the debug level, called with sw.l held -func (sw *loggerPointer) debug(s string) { - l := sw.Load() - scrubbed := l.scrub(s) - l.inner.Debug(scrubbed) - - for _, l := range l.extra { - l.Debug(scrubbed) - } -} - -// debug logs at the debug level and the current stack depth plus the additional given one, called with sw.l held -func (sw *loggerPointer) debugStackDepth(s string, depth int) { - l := sw.Load() - scrubbed := l.scrub(s) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - l.inner.Debug(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - l.Debug(scrubbed) - } -} - -// info logs at the info level, called with sw.l held -func (sw *loggerPointer) info(s string) { - l := sw.Load() - scrubbed := l.scrub(s) - l.inner.Info(scrubbed) - for _, l := range l.extra { - l.Info(scrubbed) - } -} - -// info logs at the info level and the current stack depth plus the additional given one, called with sw.l held -func (sw *loggerPointer) infoStackDepth(s string, depth int) { - l := sw.Load() - scrubbed := l.scrub(s) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - l.inner.Info(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - l.Info(scrubbed) - } -} - -// warn logs at the warn level, called with sw.l held -func (sw *loggerPointer) warn(s string) error { - l := sw.Load() - scrubbed := l.scrub(s) - err := l.inner.Warn(scrubbed) - - for _, l := range l.extra { - _ = l.Warn(scrubbed) - } - - return err -} - -// error logs at the error level and the current stack depth plus the additional given one, called with sw.l held -func (sw *loggerPointer) warnStackDepth(s string, depth int) error { - l := sw.Load() - scrubbed := l.scrub(s) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - err := l.inner.Warn(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - _ = l.Warn(scrubbed) - } - - return err -} - -// error logs at the error level, called with sw.l held -func (sw *loggerPointer) error(s string) error { - l := sw.Load() - scrubbed := l.scrub(s) - err := l.inner.Error(scrubbed) - - for _, l := range l.extra { - _ = l.Error(scrubbed) - } - - return err -} - -// error logs at the error level and the current stack depth plus the additional given one, called with sw.l held -func (sw *loggerPointer) errorStackDepth(s string, depth int) error { - l := sw.Load() - scrubbed := l.scrub(s) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - err := l.inner.Error(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - _ = l.Error(scrubbed) - } - - return err -} - -// critical logs at the critical level, called with sw.l held -func (sw *loggerPointer) critical(s string) error { - l := sw.Load() - scrubbed := l.scrub(s) - err := l.inner.Critical(scrubbed) - - for _, l := range l.extra { - _ = l.Critical(scrubbed) - } - - return err -} - -// critical logs at the critical level and the current stack depth plus the additional given one, called with sw.l held -func (sw *loggerPointer) criticalStackDepth(s string, depth int) error { - l := sw.Load() - scrubbed := l.scrub(s) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth + depth) - err := l.inner.Critical(scrubbed) - _ = l.inner.SetAdditionalStackDepth(defaultStackDepth) - - for _, l := range l.extra { - _ = l.Critical(scrubbed) - } - - return err -} - -// tracef logs with format at the trace level, called with sw.l held -func (sw *loggerPointer) tracef(format string, params ...interface{}) { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - l.inner.Trace(scrubbed) - - for _, l := range l.extra { - l.Trace(scrubbed) - } -} - -// debugf logs with format at the debug level, called with sw.l held -func (sw *loggerPointer) debugf(format string, params ...interface{}) { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - l.inner.Debug(scrubbed) - - for _, l := range l.extra { - l.Debug(scrubbed) - } -} - -// infof logs with format at the info level, called with sw.l held -func (sw *loggerPointer) infof(format string, params ...interface{}) { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - l.inner.Info(scrubbed) - - for _, l := range l.extra { - l.Info(scrubbed) - } -} - -// warnf logs with format at the warn level, called with sw.l held -func (sw *loggerPointer) warnf(format string, params ...interface{}) error { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - err := l.inner.Warn(scrubbed) - - for _, l := range l.extra { - _ = l.Warn(scrubbed) - } - - return err -} - -// errorf logs with format at the error level, called with sw.l held -func (sw *loggerPointer) errorf(format string, params ...interface{}) error { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - err := l.inner.Error(scrubbed) - - for _, l := range l.extra { - _ = l.Error(scrubbed) - } - - return err -} - -// criticalf logs with format at the critical level, called with sw.l held -func (sw *loggerPointer) criticalf(format string, params ...interface{}) error { - l := sw.Load() - scrubbed := l.scrub(fmt.Sprintf(format, params...)) - err := l.inner.Critical(scrubbed) - - for _, l := range l.extra { - _ = l.Critical(scrubbed) - } - - return err -} - -// BuildLogEntry concatenates all inputs with spaces -func BuildLogEntry(v ...interface{}) string { - var fmtBuffer bytes.Buffer - - for i := 0; i < len(v)-1; i++ { - fmtBuffer.WriteString("%v ") - } - fmtBuffer.WriteString("%v") - - return fmt.Sprintf(fmtBuffer.String(), v...) -} - -func scrubMessage(message string) string { - msgScrubbed, err := scrubBytesFunc([]byte(message)) - if err == nil { - return string(msgScrubbed) - } - return "[REDACTED] - failure to clean the message" -} - -func formatErrorf(format string, params ...interface{}) error { - msg := scrubMessage(fmt.Sprintf(format, params...)) - return errors.New(msg) -} - -func formatError(v ...interface{}) error { - msg := scrubMessage(fmt.Sprint(v...)) - return errors.New(msg) -} - -func formatErrorc(message string, context ...interface{}) error { - // Build a format string like this: - // message (%s:%v, %s:%v, ... %s:%v) - var fmtBuffer bytes.Buffer - fmtBuffer.WriteString(message) - if len(context) > 0 && len(context)%2 == 0 { - fmtBuffer.WriteString(" (") - for i := 0; i < len(context); i += 2 { - fmtBuffer.WriteString("%s:%v") - if i != len(context)-2 { - fmtBuffer.WriteString(", ") - } - } - fmtBuffer.WriteString(")") - } - - msg := fmt.Sprintf(fmtBuffer.String(), context...) - return errors.New(scrubMessage(msg)) -} - -// Trace logs at the trace level -func Trace(v ...interface{}) { - log(TraceLvl, func() { Trace(v...) }, logger.trace, v...) -} - -// Tracef logs with format at the trace level -func Tracef(format string, params ...interface{}) { - logFormat(TraceLvl, func() { Tracef(format, params...) }, logger.tracef, format, params...) -} - -// TracefStackDepth logs with format at the trace level and the current stack depth plus the given depth -func TracefStackDepth(depth int, format string, params ...interface{}) { - currentLevel, _ := GetLogLevel() - if currentLevel > TraceLvl { - return - } - msg := fmt.Sprintf(format, params...) - log(TraceLvl, func() { TraceStackDepth(depth, msg) }, func(s string) { - logger.traceStackDepth(s, depth) - }, msg) -} - -// TracecStackDepth logs at the trace level with context and the current stack depth plus the additional given one -func TracecStackDepth(message string, depth int, context ...interface{}) { - logContext(TraceLvl, func() { Tracec(message, context...) }, logger.trace, message, depth, context...) -} - -// Tracec logs at the trace level with context -func Tracec(message string, context ...interface{}) { - TracecStackDepth(message, 1, context...) -} - -// TraceFunc calls and logs the result of 'logFunc' if and only if Trace (or more verbose) logs are enabled -func TraceFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= TraceLvl { - TraceStackDepth(2, logFunc()) - } -} - -// Debug logs at the debug level -func Debug(v ...interface{}) { - log(DebugLvl, func() { Debug(v...) }, logger.debug, v...) -} - -// Debugf logs with format at the debug level -func Debugf(format string, params ...interface{}) { - logFormat(DebugLvl, func() { Debugf(format, params...) }, logger.debugf, format, params...) -} - -// DebugfStackDepth logs with format at the debug level and the current stack depth plus the given depth -func DebugfStackDepth(depth int, format string, params ...interface{}) { - currentLevel, _ := GetLogLevel() - if currentLevel > DebugLvl { - return - } - msg := fmt.Sprintf(format, params...) - log(DebugLvl, func() { DebugStackDepth(depth, msg) }, func(s string) { - logger.debugStackDepth(s, depth) - }, msg) -} - -// DebugcStackDepth logs at the debug level with context and the current stack depth plus the additional given one -func DebugcStackDepth(message string, depth int, context ...interface{}) { - logContext(DebugLvl, func() { Debugc(message, context...) }, logger.debug, message, depth, context...) -} - -// Debugc logs at the debug level with context -func Debugc(message string, context ...interface{}) { - DebugcStackDepth(message, 1, context...) -} - -// DebugFunc calls and logs the result of 'logFunc' if and only if Debug (or more verbose) logs are enabled -func DebugFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= DebugLvl { - DebugStackDepth(2, logFunc()) - } -} - -// Info logs at the info level -func Info(v ...interface{}) { - log(InfoLvl, func() { Info(v...) }, logger.info, v...) -} - -// Infof logs with format at the info level -func Infof(format string, params ...interface{}) { - logFormat(InfoLvl, func() { Infof(format, params...) }, logger.infof, format, params...) -} - -// InfofStackDepth logs with format at the info level and the current stack depth plus the given depth -func InfofStackDepth(depth int, format string, params ...interface{}) { - currentLevel, _ := GetLogLevel() - if currentLevel > InfoLvl { - return - } - msg := fmt.Sprintf(format, params...) - log(InfoLvl, func() { InfoStackDepth(depth, msg) }, func(s string) { - logger.infoStackDepth(s, depth) - }, msg) -} - -// InfocStackDepth logs at the info level with context and the current stack depth plus the additional given one -func InfocStackDepth(message string, depth int, context ...interface{}) { - logContext(InfoLvl, func() { Infoc(message, context...) }, logger.info, message, depth, context...) -} - -// Infoc logs at the info level with context -func Infoc(message string, context ...interface{}) { - InfocStackDepth(message, 1, context...) -} - -// InfoFunc calls and logs the result of 'logFunc' if and only if Info (or more verbose) logs are enabled -func InfoFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= InfoLvl { - InfoStackDepth(2, logFunc()) - } -} - -// Warn logs at the warn level and returns an error containing the formated log message -func Warn(v ...interface{}) error { - return logWithError(WarnLvl, func() { _ = Warn(v...) }, logger.warn, false, v...) -} - -// Warnf logs with format at the warn level and returns an error containing the formated log message -func Warnf(format string, params ...interface{}) error { - return logFormatWithError(WarnLvl, func() { _ = Warnf(format, params...) }, logger.warnf, format, false, params...) -} - -// WarnfStackDepth logs with format at the warn level and the current stack depth plus the given depth -func WarnfStackDepth(depth int, format string, params ...interface{}) error { - msg := fmt.Sprintf(format, params...) - return logWithError(WarnLvl, func() { _ = WarnStackDepth(depth, msg) }, func(s string) error { - return logger.warnStackDepth(s, depth) - }, false, msg) -} - -// WarncStackDepth logs at the warn level with context and the current stack depth plus the additional given one and returns an error containing the formated log message -func WarncStackDepth(message string, depth int, context ...interface{}) error { - return logContextWithError(WarnLvl, func() { _ = Warnc(message, context...) }, logger.warn, message, false, depth, context...) -} - -// Warnc logs at the warn level with context and returns an error containing the formated log message -func Warnc(message string, context ...interface{}) error { - return WarncStackDepth(message, 1, context...) -} - -// WarnFunc calls and logs the result of 'logFunc' if and only if Warn (or more verbose) logs are enabled -func WarnFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= WarnLvl { - _ = WarnStackDepth(2, logFunc()) - } -} - -// Error logs at the error level and returns an error containing the formated log message -func Error(v ...interface{}) error { - return logWithError(ErrorLvl, func() { _ = Error(v...) }, logger.error, true, v...) -} - -// Errorf logs with format at the error level and returns an error containing the formated log message -func Errorf(format string, params ...interface{}) error { - return logFormatWithError(ErrorLvl, func() { _ = Errorf(format, params...) }, logger.errorf, format, true, params...) -} - -// ErrorfStackDepth logs with format at the error level and the current stack depth plus the given depth -func ErrorfStackDepth(depth int, format string, params ...interface{}) error { - msg := fmt.Sprintf(format, params...) - return logWithError(ErrorLvl, func() { _ = ErrorStackDepth(depth, msg) }, func(s string) error { - return logger.errorStackDepth(s, depth) - }, true, msg) -} - -// ErrorcStackDepth logs at the error level with context and the current stack depth plus the additional given one and returns an error containing the formated log message -func ErrorcStackDepth(message string, depth int, context ...interface{}) error { - return logContextWithError(ErrorLvl, func() { _ = Errorc(message, context...) }, logger.error, message, true, depth, context...) -} - -// Errorc logs at the error level with context and returns an error containing the formated log message -func Errorc(message string, context ...interface{}) error { - return ErrorcStackDepth(message, 1, context...) -} - -// ErrorFunc calls and logs the result of 'logFunc' if and only if Error (or more verbose) logs are enabled -func ErrorFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= ErrorLvl { - _ = ErrorStackDepth(2, logFunc()) - } -} - -// Critical logs at the critical level and returns an error containing the formated log message -func Critical(v ...interface{}) error { - return logWithError(CriticalLvl, func() { _ = Critical(v...) }, logger.critical, true, v...) -} - -// Criticalf logs with format at the critical level and returns an error containing the formated log message -func Criticalf(format string, params ...interface{}) error { - return logFormatWithError(CriticalLvl, func() { _ = Criticalf(format, params...) }, logger.criticalf, format, true, params...) -} - -// CriticalfStackDepth logs with format at the critical level and the current stack depth plus the given depth -func CriticalfStackDepth(depth int, format string, params ...interface{}) error { - msg := fmt.Sprintf(format, params...) - return logWithError(CriticalLvl, func() { _ = CriticalStackDepth(depth, msg) }, func(s string) error { - return logger.criticalStackDepth(s, depth) - }, false, msg) -} - -// CriticalcStackDepth logs at the critical level with context and the current stack depth plus the additional given one and returns an error containing the formated log message -func CriticalcStackDepth(message string, depth int, context ...interface{}) error { - return logContextWithError(CriticalLvl, func() { _ = Criticalc(message, context...) }, logger.critical, message, true, depth, context...) -} - -// Criticalc logs at the critical level with context and returns an error containing the formated log message -func Criticalc(message string, context ...interface{}) error { - return CriticalcStackDepth(message, 1, context...) -} - -// CriticalFunc calls and logs the result of 'logFunc' if and only if Critical (or more verbose) logs are enabled -func CriticalFunc(logFunc func() string) { - currentLevel, _ := GetLogLevel() - if currentLevel <= CriticalLvl { - _ = CriticalStackDepth(2, logFunc()) - } -} - -// InfoStackDepth logs at the info level and the current stack depth plus the additional given one -func InfoStackDepth(depth int, v ...interface{}) { - log(InfoLvl, func() { InfoStackDepth(depth, v...) }, func(s string) { - logger.infoStackDepth(s, depth) - }, v...) -} - -// WarnStackDepth logs at the warn level and the current stack depth plus the additional given one and returns an error containing the formated log message -func WarnStackDepth(depth int, v ...interface{}) error { - return logWithError(WarnLvl, func() { _ = WarnStackDepth(depth, v...) }, func(s string) error { - return logger.warnStackDepth(s, depth) - }, false, v...) -} - -// DebugStackDepth logs at the debug level and the current stack depth plus the additional given one and returns an error containing the formated log message -func DebugStackDepth(depth int, v ...interface{}) { - log(DebugLvl, func() { DebugStackDepth(depth, v...) }, func(s string) { - logger.debugStackDepth(s, depth) - }, v...) -} - -// TraceStackDepth logs at the trace level and the current stack depth plus the additional given one and returns an error containing the formated log message -func TraceStackDepth(depth int, v ...interface{}) { - log(TraceLvl, func() { TraceStackDepth(depth, v...) }, func(s string) { - logger.traceStackDepth(s, depth) - }, v...) -} - -// ErrorStackDepth logs at the error level and the current stack depth plus the additional given one and returns an error containing the formated log message -func ErrorStackDepth(depth int, v ...interface{}) error { - return logWithError(ErrorLvl, func() { _ = ErrorStackDepth(depth, v...) }, func(s string) error { - return logger.errorStackDepth(s, depth) - }, true, v...) -} - -// CriticalStackDepth logs at the critical level and the current stack depth plus the additional given one and returns an error containing the formated log message -func CriticalStackDepth(depth int, v ...interface{}) error { - return logWithError(CriticalLvl, func() { _ = CriticalStackDepth(depth, v...) }, func(s string) error { - return logger.criticalStackDepth(s, depth) - }, true, v...) -} - -/* -* JMX Logger Section - */ - -// JMXError Logs for JMX check -func JMXError(v ...interface{}) error { - return logWithError(ErrorLvl, func() { _ = JMXError(v...) }, jmxLogger.error, true, v...) -} - -// JMXInfo Logs -func JMXInfo(v ...interface{}) { - log(InfoLvl, func() { JMXInfo(v...) }, jmxLogger.info, v...) -} - -// SetupJMXLogger setup JMXfetch specific logger -func SetupJMXLogger(i LoggerInterface, level string) { - jmxLogger.Store(setupCommonLogger(i, level)) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_limit.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_limit.go deleted file mode 100644 index 0ce8e64dfe..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_limit.go +++ /dev/null @@ -1,38 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import ( - "time" - - "golang.org/x/time/rate" -) - -// Limit is a utility that can be used to avoid logging noisily -type Limit struct { - s rate.Sometimes -} - -// NewLogLimit creates a Limit where shouldLog will return -// true the first N times it is called, and will return true once every -// interval thereafter. -func NewLogLimit(n int, interval time.Duration) *Limit { - return &Limit{ - s: rate.Sometimes{ - First: n, - Interval: interval, - }, - } -} - -// ShouldLog returns true if the caller should log -func (l *Limit) ShouldLog() bool { - shouldLog := false - l.s.Do(func() { - shouldLog = true - }) - return shouldLog -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_not_serverless.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_not_serverless.go deleted file mode 100644 index 8b7d7688a3..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_not_serverless.go +++ /dev/null @@ -1,18 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build !serverless - -package log - -// DebugServerless logs at the debug level only in a serverless context -// no-op in a non serverless context -func DebugServerless(_ ...interface{}) { -} - -// DebugfServerless logs with format at the debug level only in a serverless context -// no-op in a non serverless context -func DebugfServerless(_ string, _ ...interface{}) { -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go deleted file mode 100644 index 4327572820..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_podman_util.go +++ /dev/null @@ -1,27 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import ( - "strings" -) - -// The paths below are set in podman code and cannot be modified by the user. -// Ref: https://github.com/containers/podman/blob/7c38ee756592d95e718967fcd3983b81abd95e76/test/e2e/run_transient_test.go#L19-L45 -const ( - sqlDBSuffix string = "/storage/db.sql" - boltDBSuffix string = "/storage/libpod/bolt_state.db" -) - -// ExtractPodmanRootDirFromDBPath extracts the podman base path for the containers directory based on the user-provided `podman_db_path`. -func ExtractPodmanRootDirFromDBPath(podmanDBPath string) string { - if strings.HasSuffix(podmanDBPath, sqlDBSuffix) { - return strings.TrimSuffix(podmanDBPath, sqlDBSuffix) - } else if strings.HasSuffix(podmanDBPath, boltDBSuffix) { - return strings.TrimSuffix(podmanDBPath, boltDBSuffix) - } - return "" -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_serverless.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_serverless.go deleted file mode 100644 index 9ad3aa42e0..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_serverless.go +++ /dev/null @@ -1,18 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build serverless - -package log - -// DebugServerless logs at the debug level only in a serverless context -func DebugServerless(v ...interface{}) { - Debug(v...) -} - -// DebugfServerless logs with format at the debug level only in a serverless context -func DebugfServerless(format string, params ...interface{}) { - Debugf(format, params...) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_test_init.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_test_init.go deleted file mode 100644 index b1b5e3bbed..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/log_test_init.go +++ /dev/null @@ -1,20 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build test - -package log - -import ( - "os" -) - -func init() { - level := os.Getenv("DD_LOG_LEVEL") - if level == "" { - level = "debug" - } - SetupLogger(Default(), level) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/logger.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/logger.go deleted file mode 100644 index 5de956c854..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/logger.go +++ /dev/null @@ -1,35 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import ( - "io" - - "github.com/cihub/seelog" -) - -// LoggerInterface provides basic logging methods. -type LoggerInterface seelog.LoggerInterface - -// Default returns a default logger -func Default() LoggerInterface { - return seelog.Default -} - -// Disabled returns a disabled logger -func Disabled() LoggerInterface { - return seelog.Disabled -} - -// LoggerFromWriterWithMinLevelAndFormat creates a new logger from a writer, a minimum log level and a format. -func LoggerFromWriterWithMinLevelAndFormat(output io.Writer, minLevel LogLevel, format string) (LoggerInterface, error) { - return seelog.LoggerFromWriterWithMinLevelAndFormat(output, seelog.LogLevel(minLevel), format) -} - -// LoggerFromWriterWithMinLevel creates a new logger from a writer and a minimum log level. -func LoggerFromWriterWithMinLevel(output io.Writer, minLevel LogLevel) (LoggerInterface, error) { - return seelog.LoggerFromWriterWithMinLevel(output, seelog.LogLevel(minLevel)) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/wrapper.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/log/wrapper.go deleted file mode 100644 index 52ff4c0814..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/log/wrapper.go +++ /dev/null @@ -1,77 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -// Wrapper wraps all the logger function on a struct. This is meant to be used by the comp/core/log component to expose -// the logger functionnality to components. This should only be use by the log component. -type Wrapper struct { - stackDepth int -} - -// NewWrapper returns a new Wrapper. This should only be use by the log component. -func NewWrapper(stackDepth int) *Wrapper { - return &Wrapper{stackDepth: stackDepth} -} - -// Until the log migration to component is done, we use *StackDepth to pkglog. The log component add 1 layer to the call -// stack and *StackDepth add another. -// -// We check the current log level to avoid calling Sprintf when it's not needed (Sprintf from Tracef uses a lot a CPU) - -// Trace implements Component#Trace. -func (l *Wrapper) Trace(v ...interface{}) { TraceStackDepth(l.stackDepth, v...) } - -// Tracef implements Component#Tracef. -func (l *Wrapper) Tracef(format string, params ...interface{}) { - TracefStackDepth(l.stackDepth, format, params...) -} - -// Debug implements Component#Debug. -func (l *Wrapper) Debug(v ...interface{}) { DebugStackDepth(l.stackDepth, v...) } - -// Debugf implements Component#Debugf. -func (l *Wrapper) Debugf(format string, params ...interface{}) { - DebugfStackDepth(l.stackDepth, format, params...) -} - -// Info implements Component#Info. -func (l *Wrapper) Info(v ...interface{}) { InfoStackDepth(l.stackDepth, v...) } - -// Infof implements Component#Infof. -func (l *Wrapper) Infof(format string, params ...interface{}) { - InfofStackDepth(l.stackDepth, format, params...) -} - -// Warn implements Component#Warn. -func (l *Wrapper) Warn(v ...interface{}) error { return WarnStackDepth(l.stackDepth, v...) } - -// Warnf implements Component#Warnf. -func (l *Wrapper) Warnf(format string, params ...interface{}) error { - return WarnfStackDepth(l.stackDepth, format, params...) -} - -// Error implements Component#Error. -func (l *Wrapper) Error(v ...interface{}) error { return ErrorStackDepth(l.stackDepth, v...) } - -// Errorf implements Component#Errorf. -func (l *Wrapper) Errorf(format string, params ...interface{}) error { - return ErrorfStackDepth(l.stackDepth, format, params...) -} - -// Critical implements Component#Critical. -func (l *Wrapper) Critical(v ...interface{}) error { - return CriticalStackDepth(l.stackDepth, v...) -} - -// Criticalf implements Component#Criticalf. -func (l *Wrapper) Criticalf(format string, params ...interface{}) error { - return CriticalfStackDepth(l.stackDepth, format, params...) -} - -// Flush implements Component#Flush. -func (l *Wrapper) Flush() { - Flush() -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/util/scrubber/default.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/default.go deleted file mode 100644 index daed8bd1e2..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/default.go +++ /dev/null @@ -1,421 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package scrubber - -import ( - "fmt" - "regexp" - "slices" - "strings" - "sync" -) - -var ( - // DefaultScrubber is the scrubber used by the package-level cleaning functions. - // - // It includes a set of agent-specific replacers. It can scrub DataDog App - // and API keys, passwords from URLs, and multi-line PEM-formatted TLS keys and - // certificates. It contains special handling for YAML-like content (with - // lines of the form "key: value") and can scrub passwords, tokens, and SNMP - // community strings in such content. - // - // See default.go for details of these replacers. - DefaultScrubber = &Scrubber{} - - defaultReplacement = "********" - - // dynamicReplacers are replacers added at runtime. New Replacer can be added through configuration or by the - // secrets package for example. - dynamicReplacers = []Replacer{} - dynamicReplacersMutex = sync.Mutex{} - - // defaultVersion is the first version of the agent scrubber. - // https://github.com/DataDog/datadog-agent/pull/9618 - defaultVersion = parseVersion("7.33.0") -) - -func init() { - AddDefaultReplacers(DefaultScrubber) -} - -// AddDefaultReplacers to a scrubber. This is called automatically for -// DefaultScrubber, but can be used to initialize other, custom scrubbers with -// the default replacers. -func AddDefaultReplacers(scrubber *Scrubber) { - hintedAPIKeyReplacer := Replacer{ - // If hinted, mask the value regardless if it doesn't match 32-char hexadecimal string - Regex: regexp.MustCompile(`(api_?key=)\b[a-zA-Z0-9]+([a-zA-Z0-9]{5})\b`), - Hints: []string{"api_key", "apikey"}, - Repl: []byte(`$1***************************$2`), - - LastUpdated: defaultVersion, - } - hintedAPPKeyReplacer := Replacer{ - // If hinted, mask the value regardless if it doesn't match 40-char hexadecimal string - Regex: regexp.MustCompile(`(ap(?:p|plication)_?key=)\b[a-zA-Z0-9]+([a-zA-Z0-9]{5})\b`), - Hints: []string{"app_key", "appkey", "application_key"}, - Repl: []byte(`$1***********************************$2`), - - LastUpdated: defaultVersion, - } - - // replacers are check one by one in order. We first try to scrub 64 bytes token, keeping the last 5 digit. If - // the token has a different size we scrub it entirely. - hintedBearerReplacer := Replacer{ - Regex: regexp.MustCompile(`\bBearer [a-fA-F0-9]{59}([a-fA-F0-9]{5})\b`), - Hints: []string{"Bearer"}, - Repl: []byte(`Bearer ***********************************************************$1`), - - // https://github.com/DataDog/datadog-agent/pull/12338 - LastUpdated: parseVersion("7.38.0"), - } - // For this one we match any characters - hintedBearerInvalidReplacer := Replacer{ - Regex: regexp.MustCompile(`\bBearer\s+[^*]+\b`), - Hints: []string{"Bearer"}, - Repl: []byte("Bearer " + defaultReplacement), - - // https://github.com/DataDog/datadog-agent/pull/23448 - LastUpdated: parseVersion("7.53.0"), - } - - apiKeyReplacerYAML := Replacer{ - Regex: regexp.MustCompile(`(\-|\:|,|\[|\{)(\s+)?\b[a-fA-F0-9]{27}([a-fA-F0-9]{5})\b`), - Repl: []byte(`$1$2"***************************$3"`), - - // https://github.com/DataDog/datadog-agent/pull/12605 - LastUpdated: parseVersion("7.39.0"), - } - apiKeyReplacer := Replacer{ - Regex: regexp.MustCompile(`\b[a-fA-F0-9]{27}([a-fA-F0-9]{5})\b`), - Repl: []byte(`***************************$1`), - - LastUpdated: defaultVersion, - } - appKeyReplacerYAML := Replacer{ - Regex: regexp.MustCompile(`(\-|\:|,|\[|\{)(\s+)?\b[a-fA-F0-9]{35}([a-fA-F0-9]{5})\b`), - Repl: []byte(`$1$2"***********************************$3"`), - - // https://github.com/DataDog/datadog-agent/pull/12605 - LastUpdated: parseVersion("7.39.0"), - } - appKeyReplacer := Replacer{ - Regex: regexp.MustCompile(`\b[a-fA-F0-9]{35}([a-fA-F0-9]{5})\b`), - Repl: []byte(`***********************************$1`), - - LastUpdated: defaultVersion, - } - rcAppKeyReplacer := Replacer{ - Regex: regexp.MustCompile(`\bDDRCM_[A-Z0-9]+([A-Z0-9]{5})\b`), - Repl: []byte(`***********************************$1`), - - // https://github.com/DataDog/datadog-agent/pull/14681 - LastUpdated: parseVersion("7.42.0"), - } - - // URI Generic Syntax - // https://tools.ietf.org/html/rfc3986 - uriPasswordReplacer := Replacer{ - Regex: regexp.MustCompile(`(?i)([a-z][a-z0-9+-.]+://|\b)([^:\s]+):([^\s|"]+)@`), - Repl: []byte(`$1$2:********@`), - - // https://github.com/DataDog/datadog-agent/pull/32503 - LastUpdated: parseVersion("7.62.0"), - } - - yamlPasswordReplacer := matchYAMLKeyPart( - `(pass(word)?|pwd)`, - []string{"pass", "pwd"}, - []byte(`$1 "********"`), - ) - yamlPasswordReplacer.LastUpdated = defaultVersion - passwordReplacer := Replacer{ - // this regex has three parts: - // * key: case-insensitive, optionally quoted (pass | password | pswd | pwd), not anchored to match on args like --mysql_password= etc. - // * separator: (= or :) with optional opening quote we don't want to match as part of the password - // * password string: alphanum + special chars except quotes and semicolon - Regex: regexp.MustCompile(`(?i)(\"?(?:pass(?:word)?|pswd|pwd)\"?)((?:=| = |: )\"?)([0-9A-Za-z#!$%&()*+,\-./:<=>?@[\\\]^_{|}~]+)`), - // replace the 3rd capture group (password string) with ******** - Repl: []byte(`$1$2********`), - - // https://github.com/DataDog/datadog-agent/pull/28144 - LastUpdated: parseVersion("7.57.0"), - } - tokenReplacer := matchYAMLKeyEnding( - `token`, - []string{"token"}, - []byte(`$1 "********"`), - ) - tokenReplacer.LastUpdated = defaultVersion - snmpReplacer := matchYAMLKey( - `(community_string|auth[Kk]ey|priv[Kk]ey|community|authentication_key|privacy_key|Authorization|authorization)`, - []string{"community_string", "authKey", "authkey", "privKey", "privkey", "community", "authentication_key", "privacy_key", "Authorization", "authorization"}, - []byte(`$1 "********"`), - ) - snmpReplacer.LastUpdated = parseVersion("7.64.0") // https://github.com/DataDog/datadog-agent/pull/33742 - snmpMultilineReplacer := matchYAMLKeyWithListValue( - "(community_strings)", - "community_strings", - []byte(`$1 "********"`), - ) - snmpMultilineReplacer.LastUpdated = parseVersion("7.34.0") // https://github.com/DataDog/datadog-agent/pull/10305 - certReplacer := Replacer{ - /* - Try to match as accurately as possible. RFC 7468's ABNF - Backreferences are not available in go, so we cannot verify - here that the BEGIN label is the same as the END label. - */ - Regex: regexp.MustCompile(`-----BEGIN (?:.*)-----[A-Za-z0-9=\+\/\s]*-----END (?:.*)-----`), - Hints: []string{"BEGIN"}, - Repl: []byte(`********`), - - LastUpdated: defaultVersion, - } - - // The following replacers works on YAML object only - - apiKeyYaml := matchYAMLOnly( - `api_key`, - func(data interface{}) interface{} { - if apiKey, ok := data.(string); ok { - apiKey := strings.TrimSpace(apiKey) - if apiKey == "" { - return "" - } - if len(apiKey) == 32 { - return HideKeyExceptLastFiveChars(apiKey) - } - } - return defaultReplacement - }, - ) - apiKeyYaml.LastUpdated = parseVersion("7.44.0") // https://github.com/DataDog/datadog-agent/pull/15707 - - appKeyYaml := matchYAMLOnly( - `ap(?:p|plication)_?key`, - func(data interface{}) interface{} { - if appKey, ok := data.(string); ok { - appKey := strings.TrimSpace(appKey) - if appKey == "" { - return "" - } - if len(appKey) == 40 { - return HideKeyExceptLastFiveChars(appKey) - } - } - return defaultReplacement - }, - ) - appKeyYaml.LastUpdated = parseVersion("7.44.0") // https://github.com/DataDog/datadog-agent/pull/15707 - - scrubber.AddReplacer(SingleLine, hintedAPIKeyReplacer) - scrubber.AddReplacer(SingleLine, hintedAPPKeyReplacer) - scrubber.AddReplacer(SingleLine, hintedBearerReplacer) - scrubber.AddReplacer(SingleLine, hintedBearerInvalidReplacer) - scrubber.AddReplacer(SingleLine, apiKeyReplacerYAML) - scrubber.AddReplacer(SingleLine, apiKeyReplacer) - scrubber.AddReplacer(SingleLine, appKeyReplacerYAML) - scrubber.AddReplacer(SingleLine, appKeyReplacer) - scrubber.AddReplacer(SingleLine, rcAppKeyReplacer) - scrubber.AddReplacer(SingleLine, uriPasswordReplacer) - scrubber.AddReplacer(SingleLine, yamlPasswordReplacer) - scrubber.AddReplacer(SingleLine, passwordReplacer) - scrubber.AddReplacer(SingleLine, tokenReplacer) - scrubber.AddReplacer(SingleLine, snmpReplacer) - - scrubber.AddReplacer(SingleLine, apiKeyYaml) - scrubber.AddReplacer(SingleLine, appKeyYaml) - - scrubber.AddReplacer(MultiLine, snmpMultilineReplacer) - scrubber.AddReplacer(MultiLine, certReplacer) - - dynamicReplacersMutex.Lock() - for _, r := range dynamicReplacers { - scrubber.AddReplacer(SingleLine, r) - } - dynamicReplacersMutex.Unlock() -} - -// Yaml helpers produce replacers that work on both a yaml object (aka map[interface{}]interface{}) and on a serialized -// YAML string. - -func matchYAMLKeyPart(part string, hints []string, repl []byte) Replacer { - return Replacer{ - Regex: regexp.MustCompile(fmt.Sprintf(`(\s*(\w|_)*%s(\w|_)*\s*:).+`, part)), - YAMLKeyRegex: regexp.MustCompile(part), - Hints: hints, - Repl: repl, - } -} - -func matchYAMLKey(key string, hints []string, repl []byte) Replacer { - return Replacer{ - Regex: regexp.MustCompile(fmt.Sprintf(`(\s*%s\s*:).+`, key)), - YAMLKeyRegex: regexp.MustCompile(fmt.Sprintf(`^%s$`, key)), - Hints: hints, - Repl: repl, - } -} - -func matchYAMLKeyEnding(ending string, hints []string, repl []byte) Replacer { - return Replacer{ - Regex: regexp.MustCompile(fmt.Sprintf(`(^\s*(\w|_)*%s\s*:).+`, ending)), - YAMLKeyRegex: regexp.MustCompile(fmt.Sprintf(`^.*%s$`, ending)), - Hints: hints, - Repl: repl, - } -} - -// This only works on a YAML object not on serialized YAML data -func matchYAMLOnly(key string, cb func(interface{}) interface{}) Replacer { - return Replacer{ - YAMLKeyRegex: regexp.MustCompile(key), - ProcessValue: cb, - } -} - -// matchYAMLKeyWithListValue matches YAML keys with array values. -// caveat: doesn't work if the array contain nested arrays. -// -// Example: -// -// key: [ -// [a, b, c], -// def] -func matchYAMLKeyWithListValue(key string, hints string, repl []byte) Replacer { - /* - Example 1: - network_devices: - snmp_traps: - community_strings: - - 'pass1' - - 'pass2' - - Example 2: - network_devices: - snmp_traps: - community_strings: ['pass1', 'pass2'] - - Example 3: - network_devices: - snmp_traps: - community_strings: [ - 'pass1', - 'pass2'] - */ - return Replacer{ - Regex: regexp.MustCompile(fmt.Sprintf(`(\s*%s\s*:)\s*(?:\n(?:\s+-\s+.*)*|\[(?:\n?.*?)*?\])`, key)), - /* ----------- --------------- ------------- - match key(s) | | - match multiple match anything - lines starting enclosed between `[` and `]` - with `-` - */ - YAMLKeyRegex: regexp.MustCompile(key), - Hints: []string{hints}, - Repl: repl, - } -} - -// ScrubFile scrubs credentials from the given file, using the -// default scrubber. -func ScrubFile(filePath string) ([]byte, error) { - return DefaultScrubber.ScrubFile(filePath) -} - -// ScrubBytes scrubs credentials from the given slice of bytes, -// using the default scrubber. -func ScrubBytes(file []byte) ([]byte, error) { - return DefaultScrubber.ScrubBytes(file) -} - -// ScrubYaml scrubs credentials from the given YAML by loading the data and scrubbing the object instead of the -// serialized string, using the default scrubber. -func ScrubYaml(data []byte) ([]byte, error) { - return DefaultScrubber.ScrubYaml(data) -} - -// ScrubYamlString scrubs credentials from the given YAML string by loading the data and scrubbing the object instead of -// the serialized string, using the default scrubber. -func ScrubYamlString(data string) (string, error) { - res, err := DefaultScrubber.ScrubYaml([]byte(data)) - if err != nil { - return "", err - } - return string(res), nil -} - -// ScrubJSON scrubs credentials from the given JSON by loading the data and scrubbing the object instead of the -// serialized string, using the default scrubber. -func ScrubJSON(data []byte) ([]byte, error) { - return DefaultScrubber.ScrubJSON(data) -} - -// ScrubJSONString scrubs credentials from the given JSON string by loading the data and scrubbing the object instead of -// the serialized string, using the default scrubber. -func ScrubJSONString(data string) (string, error) { - res, err := ScrubJSON([]byte(data)) - if err != nil { - return "", err - } - return string(res), nil -} - -// ScrubString scrubs credentials from the given string, using the default scrubber. -func ScrubString(data string) (string, error) { - res, err := DefaultScrubber.ScrubBytes([]byte(data)) - if err != nil { - return "", err - } - return string(res), nil -} - -// ScrubLine scrubs credentials from a single line of text, using the default -// scrubber. It can be safely applied to URLs or to strings containing URLs. -// It does not run multi-line replacers, and should not be used on multi-line -// inputs. -func ScrubLine(url string) string { - return DefaultScrubber.ScrubLine(url) -} - -// ScrubDataObj scrubs credentials from the data interface by recursively walking over all the nodes -func ScrubDataObj(data *interface{}) { - DefaultScrubber.ScrubDataObj(data) -} - -// HideKeyExceptLastFiveChars replaces all characters in the key with "*", except -// for the last 5 characters. If the key is an unrecognized length, replace -// all of it with the default string of "*"s instead. -func HideKeyExceptLastFiveChars(key string) string { - if len(key) != 32 && len(key) != 40 { - return defaultReplacement - } - return strings.Repeat("*", len(key)-5) + key[len(key)-5:] -} - -// AddStrippedKeys adds to the set of YAML keys that will be recognized and have their values stripped. This modifies -// the DefaultScrubber directly and be added to any created scrubbers. -func AddStrippedKeys(strippedKeys []string) { - // API and APP keys are already handled by default rules - strippedKeys = slices.Clone(strippedKeys) - strippedKeys = slices.DeleteFunc(strippedKeys, func(s string) bool { - return s == "api_key" || s == "app_key" - }) - - if len(strippedKeys) > 0 { - replacer := matchYAMLKey( - fmt.Sprintf("(%s)", strings.Join(strippedKeys, "|")), - strippedKeys, - []byte(`$1 "********"`), - ) - // We add the new replacer to the default scrubber and to the list of dynamicReplacers so any new - // scubber will inherit it. - DefaultScrubber.AddReplacer(SingleLine, replacer) - dynamicReplacersMutex.Lock() - dynamicReplacers = append(dynamicReplacers, replacer) - dynamicReplacersMutex.Unlock() - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/json_scrubber.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/json_scrubber.go deleted file mode 100644 index dbf624b119..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/json_scrubber.go +++ /dev/null @@ -1,33 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package scrubber - -import ( - "fmt" - "os" - - "encoding/json" -) - -// ScrubJSON scrubs credentials from the given json by loading the data and scrubbing the -// object instead of the serialized string. -func (c *Scrubber) ScrubJSON(input []byte) ([]byte, error) { - var data *interface{} - err := json.Unmarshal(input, &data) - - // if we can't load the json run the default scrubber on the input - if len(input) != 0 && err == nil { - c.ScrubDataObj(data) - - newInput, err := json.MarshalIndent(data, "", " ") - if err == nil { - return newInput, nil - } - // Since the scrubber is a dependency of the logger we can't use it here. - fmt.Fprintf(os.Stderr, "error scrubbing json, falling back on text scrubber: %s\n", err) - } - return c.ScrubBytes(input) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/scrubber.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/scrubber.go deleted file mode 100644 index c37ede0303..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/scrubber.go +++ /dev/null @@ -1,223 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package scrubber implements support for cleaning sensitive information out of strings -// and files. -// -// # Compatibility -// -// This module's API is not yet stable, and may change incompatibly from version to version. -package scrubber - -import ( - "bufio" - "bytes" - "io" - "os" - "regexp" - - "github.com/DataDog/datadog-agent/pkg/version" -) - -// Replacer represents a replacement of sensitive information with a "clean" version. -type Replacer struct { - // Regex must match the sensitive information - Regex *regexp.Regexp - // YAMLKeyRegex matches the key of sensitive information in a dict/map. This is used when iterating over a - // map[string]interface{} to scrub data for all matching key before being serialized. - YAMLKeyRegex *regexp.Regexp - // ProcessValue is a callback to be executed when YAMLKeyRegex matches the key of a map/dict in a YAML object. The - // value is passed to the function and replaced by the returned interface. This is useful to produce custom - // scrubbing. Example: keeping the last 5 digit of an api key. - ProcessValue func(data interface{}) interface{} - // Hints, if given, are strings which must also be present in the text for the regexp to match. - // Especially in single-line replacers, this can be used to limit the contexts where an otherwise - // very broad Regex is actually replaced. - Hints []string - // Repl is the text to replace the substring matching Regex. It can use the regexp package's - // replacement characters ($1, etc.) (see regexp#Regexp.ReplaceAll). - Repl []byte - // ReplFunc, if set, is called with the matched bytes (see regexp#Regexp.ReplaceAllFunc). Only - // one of Repl and ReplFunc should be set. - ReplFunc func(b []byte) []byte - - // LastUpdated is the last version when the replacer was updated. - // This is used to track when a replacer was last updated to compare with the flare version on the rapid side to decide to apply the replacer or not. - LastUpdated *version.Version -} - -func parseVersion(versionString string) *version.Version { - v, err := version.New(versionString, "") - if err != nil { - panic(err) - } - return &v -} - -// ReplacerKind modifies how a Replacer is applied -type ReplacerKind int - -const ( - // SingleLine indicates to Cleaner#AddReplacer that the replacer applies to - // single lines. - SingleLine ReplacerKind = iota - // MultiLine indicates to Cleaner#AddReplacer that the replacer applies to - // entire multiline text values. - MultiLine -) - -var commentRegex = regexp.MustCompile(`^\s*#.*$`) -var blankRegex = regexp.MustCompile(`^\s*$`) - -// Scrubber implements support for cleaning sensitive information out of strings -// and files. Its intended use is to "clean" data before it is logged or -// transmitted to a remote system, so that the meaning of the data remains -// clear without disclosing any sensitive information. -// -// Scrubber works by applying a set of replacers, in order. It first applies -// all SingleLine replacers to each non-comment, non-blank line of the input. -// -// Comments and blank lines are omitted. Comments are considered to begin with `#`. -// -// It then applies all MultiLine replacers to the entire text of the input. -type Scrubber struct { - singleLineReplacers []Replacer - multiLineReplacers []Replacer - - // shouldApply is a function that can be used to conditionally apply a replacer. - // If the function returns false, the replacer will not be applied. - shouldApply func(repl Replacer) bool -} - -// New creates a new scrubber with no replacers installed. -func New() *Scrubber { - return &Scrubber{ - singleLineReplacers: make([]Replacer, 0), - multiLineReplacers: make([]Replacer, 0), - } -} - -// NewWithDefaults creates a new scrubber with the default replacers installed. -func NewWithDefaults() *Scrubber { - s := New() - AddDefaultReplacers(s) - return s -} - -// AddReplacer adds a replacer of the given kind to the scrubber. -func (c *Scrubber) AddReplacer(kind ReplacerKind, replacer Replacer) { - switch kind { - case SingleLine: - c.singleLineReplacers = append(c.singleLineReplacers, replacer) - case MultiLine: - c.multiLineReplacers = append(c.multiLineReplacers, replacer) - } -} - -// SetShouldApply sets a condition function to the scrubber. If the function returns false, the replacer will not be applied. -func (c *Scrubber) SetShouldApply(shouldApply func(repl Replacer) bool) { - c.shouldApply = shouldApply -} - -// ScrubFile scrubs credentials from file given by pathname -func (c *Scrubber) ScrubFile(filePath string) ([]byte, error) { - file, err := os.Open(filePath) - if err != nil { - return nil, err - } - defer file.Close() - - var sizeHint int - stats, err := file.Stat() - if err == nil { - sizeHint = int(stats.Size()) - } - - return c.scrubReader(file, sizeHint) -} - -// ScrubBytes scrubs credentials from slice of bytes -func (c *Scrubber) ScrubBytes(data []byte) ([]byte, error) { - r := bytes.NewReader(data) - return c.scrubReader(r, r.Len()) -} - -// ScrubLine scrubs credentials from a single line of text. It can be safely -// applied to URLs or to strings containing URLs. It does not run multi-line -// replacers, and should not be used on multi-line inputs. -func (c *Scrubber) ScrubLine(message string) string { - return string(c.scrub([]byte(message), c.singleLineReplacers)) -} - -// scrubReader applies the cleaning algorithm to a Reader -func (c *Scrubber) scrubReader(file io.Reader, sizeHint int) ([]byte, error) { - var cleanedBuffer bytes.Buffer - if sizeHint > 0 { - cleanedBuffer.Grow(sizeHint) - } - - scanner := bufio.NewScanner(file) - if sizeHint+1 > bufio.MaxScanTokenSize { - buffer := make([]byte, 0, sizeHint+1) - scanner.Buffer(buffer, sizeHint+1) - } - - // First, we go through the file line by line, applying any - // single-line replacer that matches the line. - first := true - for scanner.Scan() { - b := scanner.Bytes() - if blankRegex.Match(b) { - cleanedBuffer.WriteRune('\n') - } else if !commentRegex.Match(b) { - b = c.scrub(b, c.singleLineReplacers) - if !first { - cleanedBuffer.WriteRune('\n') - } - - cleanedBuffer.Write(b) - first = false - } - } - - if err := scanner.Err(); err != nil { - return nil, err - } - - // Then we apply multiline replacers on the cleaned file - cleanedFile := c.scrub(cleanedBuffer.Bytes(), c.multiLineReplacers) - - return cleanedFile, nil -} - -// scrub applies the given replacers to the given data. -func (c *Scrubber) scrub(data []byte, replacers []Replacer) []byte { - for _, repl := range replacers { - if repl.Regex == nil { - // ignoring YAML only replacers - continue - } - - if c.shouldApply != nil && !c.shouldApply(repl) { - continue - } - - containsHint := false - for _, hint := range repl.Hints { - if bytes.Contains(data, []byte(hint)) { - containsHint = true - break - } - } - if len(repl.Hints) == 0 || containsHint { - if repl.ReplFunc != nil { - data = repl.Regex.ReplaceAllFunc(data, repl.ReplFunc) - } else { - data = repl.Regex.ReplaceAll(data, repl.Repl) - } - } - } - return data -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/yaml_scrubber.go b/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/yaml_scrubber.go deleted file mode 100644 index 90f144c661..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/util/scrubber/yaml_scrubber.go +++ /dev/null @@ -1,126 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package scrubber - -import ( - "bytes" - "fmt" - "os" - - "gopkg.in/yaml.v3" -) - -type scrubCallback = func(string, interface{}) (bool, interface{}) - -func walkSlice(data []interface{}, callback scrubCallback) { - for _, k := range data { - switch v := k.(type) { - case map[interface{}]interface{}: - walkHash(v, callback) - case []interface{}: - walkSlice(v, callback) - case map[string]interface{}: - walkStringMap(v, callback) - } - } -} - -func walkHash(data map[interface{}]interface{}, callback scrubCallback) { - for k, v := range data { - if keyString, ok := k.(string); ok { - if match, newValue := callback(keyString, v); match { - data[keyString] = newValue - continue - } - } - - switch v := data[k].(type) { - case map[interface{}]interface{}: - walkHash(v, callback) - case []interface{}: - walkSlice(v, callback) - } - } -} - -func walkStringMap(data map[string]interface{}, callback scrubCallback) { - for k, v := range data { - if match, newValue := callback(k, v); match { - data[k] = newValue - continue - } - switch v := data[k].(type) { - case map[string]interface{}: - walkStringMap(v, callback) - case []interface{}: - walkSlice(v, callback) - } - - } -} - -// walk will go through loaded data and call callback on every strings allowing -// the callback to overwrite the string value -func walk(data *interface{}, callback scrubCallback) { - if data == nil { - return - } - - switch v := (*data).(type) { - case map[interface{}]interface{}: - walkHash(v, callback) - case []interface{}: - walkSlice(v, callback) - case map[string]interface{}: - walkStringMap(v, callback) - } -} - -// ScrubDataObj scrubs credentials from the data interface by recursively walking over all the nodes -func (c *Scrubber) ScrubDataObj(data *interface{}) { - walk(data, func(key string, value interface{}) (bool, interface{}) { - for _, replacer := range c.singleLineReplacers { - if replacer.YAMLKeyRegex == nil { - continue - } - - if c.shouldApply != nil && !c.shouldApply(replacer) { - continue - } - - if replacer.YAMLKeyRegex.Match([]byte(key)) { - if replacer.ProcessValue != nil { - return true, replacer.ProcessValue(value) - } - return true, defaultReplacement - } - } - return false, "" - }) -} - -// ScrubYaml scrubs credentials from the given YAML by loading the data and scrubbing the object instead of the -// serialized string. -func (c *Scrubber) ScrubYaml(input []byte) ([]byte, error) { - var data *interface{} - err := yaml.Unmarshal(input, &data) - - // if we can't load the yaml run the default scrubber on the input - if len(input) != 0 && err == nil { - c.ScrubDataObj(data) - - var buffer bytes.Buffer - encoder := yaml.NewEncoder(&buffer) - encoder.SetIndent(2) - if err := encoder.Encode(&data); err != nil { - fmt.Fprintf(os.Stderr, "error scrubbing YAML, falling back on text scrubber: %s\n", err) - } else { - input = buffer.Bytes() - } - encoder.Close() - } - return c.ScrubBytes(input) -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/version/LICENSE b/vendor/github.com/DataDog/datadog-agent/pkg/version/LICENSE deleted file mode 100644 index b370545be1..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/version/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/datadog-agent/pkg/version/base.go b/vendor/github.com/DataDog/datadog-agent/pkg/version/base.go deleted file mode 100644 index cca2666759..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/version/base.go +++ /dev/null @@ -1,31 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package version defines the version of the agent -package version - -// AgentVersion contains the version of the Agent. -// It is populated at build time using build flags, see get_version_ldflags in tasks/utils.py -var AgentVersion string - -// AgentPackageVersion contains the version of the datadog-agent package when installed by the updater. -// It has more info than AgentVersion and -// it is populated at build time using build flags, see get_version_ldflags in tasks/utils.py -var AgentPackageVersion string - -// Commit is populated with the short commit hash from which the Agent was built -var Commit string - -// AgentPayloadVersion is the versions of the agent-payload repository -// used to serialize to protobuf -var AgentPayloadVersion string - -var agentVersionDefault = "6.0.0" - -func init() { - if AgentVersion == "" { - AgentVersion = agentVersionDefault - } -} diff --git a/vendor/github.com/DataDog/datadog-agent/pkg/version/version.go b/vendor/github.com/DataDog/datadog-agent/pkg/version/version.go deleted file mode 100644 index 58a233fd62..0000000000 --- a/vendor/github.com/DataDog/datadog-agent/pkg/version/version.go +++ /dev/null @@ -1,95 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package version - -import ( - "fmt" - "regexp" - "strconv" - "strings" -) - -// Version holds SemVer infos for the agent and friends -type Version struct { - Major int64 - Minor int64 - Patch int64 - Pre string - Meta string - Commit string -} - -var versionRx = regexp.MustCompile(`(\d+\.\d+\.\d+)(\-[^\+]+)*(\+.+)*`) - -// Agent returns the Datadog Agent version. -func Agent() (Version, error) { - return New(AgentVersion, Commit) -} - -// New parses a version string like `0.0.0` and a commit identifier and returns a Version instance -func New(version, commit string) (Version, error) { - toks := versionRx.FindStringSubmatch(version) - if len(toks) == 0 || toks[0] != version { - // if regex didn't match or partially matched, raise an error - return Version{}, fmt.Errorf("Version string has wrong format") - } - - // split version info (group 1 in regexp) - parts := strings.Split(toks[1], ".") - major, _ := strconv.ParseInt(parts[0], 10, 64) - minor, _ := strconv.ParseInt(parts[1], 10, 64) - patch, _ := strconv.ParseInt(parts[2], 10, 64) - - // save Pre infos after removing leading `-` - pre := strings.Replace(toks[2], "-", "", 1) - - // save Meta infos after removing leading `+` - meta := strings.Replace(toks[3], "+", "", 1) - - av := Version{ - Major: major, - Minor: minor, - Patch: patch, - Pre: pre, - Meta: meta, - Commit: commit, - } - - return av, nil -} - -func (v *Version) String() string { - ver := v.GetNumber() - if v.Pre != "" { - ver = fmt.Sprintf("%s-%s", ver, v.Pre) - } - if v.Meta != "" { - ver = fmt.Sprintf("%s+%s", ver, v.Meta) - } - if v.Commit != "" { - if v.Meta != "" { - ver = fmt.Sprintf("%s.commit.%s", ver, v.Commit) - } else { - ver = fmt.Sprintf("%s+commit.%s", ver, v.Commit) - } - } - - return ver -} - -// GetNumber returns a string containing version numbers only, e.g. `0.0.0` -func (v *Version) GetNumber() string { - return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) -} - -// GetNumberAndPre returns a string containing version number and the pre only, e.g. `0.0.0-beta.1` -func (v *Version) GetNumberAndPre() string { - version := fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) - if v.Pre != "" { - version = fmt.Sprintf("%s-%s", version, v.Pre) - } - return version -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/LICENSE.txt b/vendor/github.com/DataDog/datadog-go/v5/LICENSE.txt deleted file mode 100644 index 97cd06d7fb..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2015 Datadog, Inc - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/README.md b/vendor/github.com/DataDog/datadog-go/v5/statsd/README.md deleted file mode 100644 index 2fc899687e..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Overview - -Package `statsd` provides a Go [dogstatsd](http://docs.datadoghq.com/guides/dogstatsd/) client. Dogstatsd extends Statsd, adding tags -and histograms. diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/aggregator.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/aggregator.go deleted file mode 100644 index 33eb930ae0..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/aggregator.go +++ /dev/null @@ -1,298 +0,0 @@ -package statsd - -import ( - "strings" - "sync" - "sync/atomic" - "time" -) - -type ( - countsMap map[string]*countMetric - gaugesMap map[string]*gaugeMetric - setsMap map[string]*setMetric - bufferedMetricMap map[string]*bufferedMetric -) - -type aggregator struct { - nbContextGauge uint64 - nbContextCount uint64 - nbContextSet uint64 - - countsM sync.RWMutex - gaugesM sync.RWMutex - setsM sync.RWMutex - - gauges gaugesMap - counts countsMap - sets setsMap - histograms bufferedMetricContexts - distributions bufferedMetricContexts - timings bufferedMetricContexts - - closed chan struct{} - - client *Client - - // aggregator implements channelMode mechanism to receive histograms, - // distributions and timings. Since they need sampling they need to - // lock for random. When using both channelMode and ExtendedAggregation - // we don't want goroutine to fight over the lock. - inputMetrics chan metric - stopChannelMode chan struct{} - wg sync.WaitGroup -} - -func newAggregator(c *Client, maxSamplesPerContext int64) *aggregator { - return &aggregator{ - client: c, - counts: countsMap{}, - gauges: gaugesMap{}, - sets: setsMap{}, - histograms: newBufferedContexts(newHistogramMetric, maxSamplesPerContext), - distributions: newBufferedContexts(newDistributionMetric, maxSamplesPerContext), - timings: newBufferedContexts(newTimingMetric, maxSamplesPerContext), - closed: make(chan struct{}), - stopChannelMode: make(chan struct{}), - } -} - -func (a *aggregator) start(flushInterval time.Duration) { - ticker := time.NewTicker(flushInterval) - - go func() { - for { - select { - case <-ticker.C: - a.flush() - case <-a.closed: - ticker.Stop() - return - } - } - }() -} - -func (a *aggregator) startReceivingMetric(bufferSize int, nbWorkers int) { - a.inputMetrics = make(chan metric, bufferSize) - for i := 0; i < nbWorkers; i++ { - a.wg.Add(1) - go a.pullMetric() - } -} - -func (a *aggregator) stopReceivingMetric() { - close(a.stopChannelMode) - a.wg.Wait() -} - -func (a *aggregator) stop() { - a.closed <- struct{}{} -} - -func (a *aggregator) pullMetric() { - for { - select { - case m := <-a.inputMetrics: - switch m.metricType { - case histogram: - a.histogram(m.name, m.fvalue, m.tags, m.rate) - case distribution: - a.distribution(m.name, m.fvalue, m.tags, m.rate) - case timing: - a.timing(m.name, m.fvalue, m.tags, m.rate) - } - case <-a.stopChannelMode: - a.wg.Done() - return - } - } -} - -func (a *aggregator) flush() { - for _, m := range a.flushMetrics() { - a.client.sendBlocking(m) - } -} - -func (a *aggregator) flushTelemetryMetrics(t *Telemetry) { - if a == nil { - // aggregation is disabled - return - } - - t.AggregationNbContextGauge = atomic.LoadUint64(&a.nbContextGauge) - t.AggregationNbContextCount = atomic.LoadUint64(&a.nbContextCount) - t.AggregationNbContextSet = atomic.LoadUint64(&a.nbContextSet) - t.AggregationNbContextHistogram = a.histograms.getNbContext() - t.AggregationNbContextDistribution = a.distributions.getNbContext() - t.AggregationNbContextTiming = a.timings.getNbContext() -} - -func (a *aggregator) flushMetrics() []metric { - metrics := []metric{} - - // We reset the values to avoid sending 'zero' values for metrics not - // sampled during this flush interval - - a.setsM.Lock() - sets := a.sets - a.sets = setsMap{} - a.setsM.Unlock() - - for _, s := range sets { - metrics = append(metrics, s.flushUnsafe()...) - } - - a.gaugesM.Lock() - gauges := a.gauges - a.gauges = gaugesMap{} - a.gaugesM.Unlock() - - for _, g := range gauges { - metrics = append(metrics, g.flushUnsafe()) - } - - a.countsM.Lock() - counts := a.counts - a.counts = countsMap{} - a.countsM.Unlock() - - for _, c := range counts { - metrics = append(metrics, c.flushUnsafe()) - } - - metrics = a.histograms.flush(metrics) - metrics = a.distributions.flush(metrics) - metrics = a.timings.flush(metrics) - - atomic.AddUint64(&a.nbContextCount, uint64(len(counts))) - atomic.AddUint64(&a.nbContextGauge, uint64(len(gauges))) - atomic.AddUint64(&a.nbContextSet, uint64(len(sets))) - return metrics -} - -// getContext returns the context for a metric name and tags. -// -// The context is the metric name and tags separated by a separator symbol. -// It is not intended to be used as a metric name but as a unique key to aggregate -func getContext(name string, tags []string) string { - c, _ := getContextAndTags(name, tags) - return c -} - -// getContextAndTags returns the context and tags for a metric name and tags. -// -// See getContext for usage for context -// The tags are the tags separated by a separator symbol and can be re-used to pass down to the writer -func getContextAndTags(name string, tags []string) (string, string) { - if len(tags) == 0 { - return name, "" - } - n := len(name) + len(nameSeparatorSymbol) + len(tagSeparatorSymbol)*(len(tags)-1) - for _, s := range tags { - n += len(s) - } - - var sb strings.Builder - sb.Grow(n) - sb.WriteString(name) - sb.WriteString(nameSeparatorSymbol) - sb.WriteString(tags[0]) - for _, s := range tags[1:] { - sb.WriteString(tagSeparatorSymbol) - sb.WriteString(s) - } - - s := sb.String() - - return s, s[len(name)+len(nameSeparatorSymbol):] -} - -func (a *aggregator) count(name string, value int64, tags []string) error { - context := getContext(name, tags) - a.countsM.RLock() - if count, found := a.counts[context]; found { - count.sample(value) - a.countsM.RUnlock() - return nil - } - a.countsM.RUnlock() - - a.countsM.Lock() - // Check if another goroutines hasn't created the value betwen the RUnlock and 'Lock' - if count, found := a.counts[context]; found { - count.sample(value) - a.countsM.Unlock() - return nil - } - - a.counts[context] = newCountMetric(name, value, tags) - a.countsM.Unlock() - return nil -} - -func (a *aggregator) gauge(name string, value float64, tags []string) error { - context := getContext(name, tags) - a.gaugesM.RLock() - if gauge, found := a.gauges[context]; found { - gauge.sample(value) - a.gaugesM.RUnlock() - return nil - } - a.gaugesM.RUnlock() - - gauge := newGaugeMetric(name, value, tags) - - a.gaugesM.Lock() - // Check if another goroutines hasn't created the value betwen the 'RUnlock' and 'Lock' - if gauge, found := a.gauges[context]; found { - gauge.sample(value) - a.gaugesM.Unlock() - return nil - } - a.gauges[context] = gauge - a.gaugesM.Unlock() - return nil -} - -func (a *aggregator) set(name string, value string, tags []string) error { - context := getContext(name, tags) - a.setsM.RLock() - if set, found := a.sets[context]; found { - set.sample(value) - a.setsM.RUnlock() - return nil - } - a.setsM.RUnlock() - - a.setsM.Lock() - // Check if another goroutines hasn't created the value betwen the 'RUnlock' and 'Lock' - if set, found := a.sets[context]; found { - set.sample(value) - a.setsM.Unlock() - return nil - } - a.sets[context] = newSetMetric(name, value, tags) - a.setsM.Unlock() - return nil -} - -// Only histograms, distributions and timings are sampled with a rate since we -// only pack them in on message instead of aggregating them. Discarding the -// sample rate will have impacts on the CPU and memory usage of the Agent. - -// type alias for Client.sendToAggregator -type bufferedMetricSampleFunc func(name string, value float64, tags []string, rate float64) error - -func (a *aggregator) histogram(name string, value float64, tags []string, rate float64) error { - return a.histograms.sample(name, value, tags, rate) -} - -func (a *aggregator) distribution(name string, value float64, tags []string, rate float64) error { - return a.distributions.sample(name, value, tags, rate) -} - -func (a *aggregator) timing(name string, value float64, tags []string, rate float64) error { - return a.timings.sample(name, value, tags, rate) -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer.go deleted file mode 100644 index 91f2e32b94..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer.go +++ /dev/null @@ -1,198 +0,0 @@ -package statsd - -import ( - "strconv" -) - -// MessageTooLongError is an error returned when a sample, event or service check is too large once serialized. See -// WithMaxBytesPerPayload option for more details. -type MessageTooLongError struct{} - -func (e MessageTooLongError) Error() string { - return "message too long. See 'WithMaxBytesPerPayload' documentation." -} - -var errBufferFull = MessageTooLongError{} - -type partialWriteError string - -func (e partialWriteError) Error() string { return string(e) } - -const errPartialWrite = partialWriteError("value partially written") - -const metricOverhead = 512 - -// statsdBuffer is a buffer containing statsd messages -// this struct methods are NOT safe for concurrent use -type statsdBuffer struct { - buffer []byte - maxSize int - maxElements int - elementCount int -} - -func newStatsdBuffer(maxSize, maxElements int) *statsdBuffer { - return &statsdBuffer{ - buffer: make([]byte, 0, maxSize+metricOverhead), // pre-allocate the needed size + metricOverhead to avoid having Go re-allocate on it's own if an element does not fit - maxSize: maxSize, - maxElements: maxElements, - } -} - -func (b *statsdBuffer) writeGauge(namespace string, globalTags []string, name string, value float64, tags []string, rate float64, timestamp int64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendGauge(b.buffer, namespace, globalTags, name, value, tags, rate) - b.buffer = appendTimestamp(b.buffer, timestamp) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeCount(namespace string, globalTags []string, name string, value int64, tags []string, rate float64, timestamp int64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendCount(b.buffer, namespace, globalTags, name, value, tags, rate) - b.buffer = appendTimestamp(b.buffer, timestamp) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeHistogram(namespace string, globalTags []string, name string, value float64, tags []string, rate float64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendHistogram(b.buffer, namespace, globalTags, name, value, tags, rate) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -// writeAggregated serialized as many values as possible in the current buffer and return the position in values where it stopped. -func (b *statsdBuffer) writeAggregated(metricSymbol []byte, namespace string, globalTags []string, name string, values []float64, tags string, tagSize int, precision int, rate float64) (int, error) { - if b.elementCount >= b.maxElements { - return 0, errBufferFull - } - - originalBuffer := b.buffer - b.buffer = appendHeader(b.buffer, namespace, name) - - // buffer already full - if len(b.buffer)+tagSize > b.maxSize { - b.buffer = originalBuffer - return 0, errBufferFull - } - - // We add as many value as possible - var position int - for idx, v := range values { - previousBuffer := b.buffer - if idx != 0 { - b.buffer = append(b.buffer, ':') - } - - b.buffer = strconv.AppendFloat(b.buffer, v, 'f', precision, 64) - - // Should we stop serializing and switch to another buffer - if len(b.buffer)+tagSize > b.maxSize { - b.buffer = previousBuffer - break - } - position = idx + 1 - } - - // we could not add a single value - if position == 0 { - b.buffer = originalBuffer - return 0, errBufferFull - } - - b.buffer = append(b.buffer, '|') - b.buffer = append(b.buffer, metricSymbol...) - b.buffer = appendRate(b.buffer, rate) - b.buffer = appendTagsAggregated(b.buffer, globalTags, tags) - b.buffer = appendContainerID(b.buffer) - b.writeSeparator() - b.elementCount++ - - if position != len(values) { - return position, errPartialWrite - } - return position, nil - -} - -func (b *statsdBuffer) writeDistribution(namespace string, globalTags []string, name string, value float64, tags []string, rate float64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendDistribution(b.buffer, namespace, globalTags, name, value, tags, rate) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeSet(namespace string, globalTags []string, name string, value string, tags []string, rate float64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendSet(b.buffer, namespace, globalTags, name, value, tags, rate) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeTiming(namespace string, globalTags []string, name string, value float64, tags []string, rate float64) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendTiming(b.buffer, namespace, globalTags, name, value, tags, rate) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeEvent(event *Event, globalTags []string) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendEvent(b.buffer, event, globalTags) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) writeServiceCheck(serviceCheck *ServiceCheck, globalTags []string) error { - if b.elementCount >= b.maxElements { - return errBufferFull - } - originalBuffer := b.buffer - b.buffer = appendServiceCheck(b.buffer, serviceCheck, globalTags) - b.writeSeparator() - return b.validateNewElement(originalBuffer) -} - -func (b *statsdBuffer) validateNewElement(originalBuffer []byte) error { - if len(b.buffer) > b.maxSize { - b.buffer = originalBuffer - return errBufferFull - } - b.elementCount++ - return nil -} - -func (b *statsdBuffer) writeSeparator() { - b.buffer = append(b.buffer, '\n') -} - -func (b *statsdBuffer) reset() { - b.buffer = b.buffer[:0] - b.elementCount = 0 -} - -func (b *statsdBuffer) bytes() []byte { - return b.buffer -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer_pool.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer_pool.go deleted file mode 100644 index 7a3e3c9d22..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffer_pool.go +++ /dev/null @@ -1,40 +0,0 @@ -package statsd - -type bufferPool struct { - pool chan *statsdBuffer - bufferMaxSize int - bufferMaxElements int -} - -func newBufferPool(poolSize, bufferMaxSize, bufferMaxElements int) *bufferPool { - p := &bufferPool{ - pool: make(chan *statsdBuffer, poolSize), - bufferMaxSize: bufferMaxSize, - bufferMaxElements: bufferMaxElements, - } - for i := 0; i < poolSize; i++ { - p.addNewBuffer() - } - return p -} - -func (p *bufferPool) addNewBuffer() { - p.pool <- newStatsdBuffer(p.bufferMaxSize, p.bufferMaxElements) -} - -func (p *bufferPool) borrowBuffer() *statsdBuffer { - select { - case b := <-p.pool: - return b - default: - return newStatsdBuffer(p.bufferMaxSize, p.bufferMaxElements) - } -} - -func (p *bufferPool) returnBuffer(buffer *statsdBuffer) { - buffer.reset() - select { - case p.pool <- buffer: - default: - } -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffered_metric_context.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/buffered_metric_context.go deleted file mode 100644 index 94b31fe5b7..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/buffered_metric_context.go +++ /dev/null @@ -1,104 +0,0 @@ -package statsd - -import ( - "math/rand" - "sync" - "sync/atomic" - "time" -) - -// bufferedMetricContexts represent the contexts for Histograms, Distributions -// and Timing. Since those 3 metric types behave the same way and are sampled -// with the same type they're represented by the same class. -type bufferedMetricContexts struct { - nbContext uint64 - mutex sync.RWMutex - values bufferedMetricMap - newMetric func(string, float64, string, float64) *bufferedMetric - - // Each bufferedMetricContexts uses its own random source and random - // lock to prevent goroutines from contending for the lock on the - // "math/rand" package-global random source (e.g. calls like - // "rand.Float64()" must acquire a shared lock to get the next - // pseudorandom number). - random *rand.Rand - randomLock sync.Mutex -} - -func newBufferedContexts(newMetric func(string, float64, string, int64, float64) *bufferedMetric, maxSamples int64) bufferedMetricContexts { - return bufferedMetricContexts{ - values: bufferedMetricMap{}, - newMetric: func(name string, value float64, stringTags string, rate float64) *bufferedMetric { - return newMetric(name, value, stringTags, maxSamples, rate) - }, - // Note that calling "time.Now().UnixNano()" repeatedly quickly may return - // very similar values. That's fine for seeding the worker-specific random - // source because we just need an evenly distributed stream of float values. - // Do not use this random source for cryptographic randomness. - random: rand.New(rand.NewSource(time.Now().UnixNano())), - } -} - -func (bc *bufferedMetricContexts) flush(metrics []metric) []metric { - bc.mutex.Lock() - values := bc.values - bc.values = bufferedMetricMap{} - bc.mutex.Unlock() - - for _, d := range values { - d.Lock() - metrics = append(metrics, d.flushUnsafe()) - d.Unlock() - } - atomic.AddUint64(&bc.nbContext, uint64(len(values))) - return metrics -} - -func (bc *bufferedMetricContexts) sample(name string, value float64, tags []string, rate float64) error { - keepingSample := shouldSample(rate, bc.random, &bc.randomLock) - - // If we don't keep the sample, return early. If we do keep the sample - // we end up storing the *first* observed sampling rate in the metric. - // This is the *wrong* behavior but it's the one we had before and the alternative would increase lock contention too - // much with the current code. - // TODO: change this behavior in the future, probably by introducing thread-local storage and lockless stuctures. - // If this code is removed, also remove the observed sampling rate in the metric and fix `bufferedMetric.flushUnsafe()` - if !keepingSample { - return nil - } - - context, stringTags := getContextAndTags(name, tags) - var v *bufferedMetric - - bc.mutex.RLock() - v, _ = bc.values[context] - bc.mutex.RUnlock() - - // Create it if it wasn't found - if v == nil { - bc.mutex.Lock() - // It might have been created by another goroutine since last call - v, _ = bc.values[context] - if v == nil { - // If we might keep a sample that we should have skipped, but that should not drastically affect performances. - bc.values[context] = bc.newMetric(name, value, stringTags, rate) - // We added a new value, we need to unlock the mutex and quit - bc.mutex.Unlock() - return nil - } - bc.mutex.Unlock() - } - - // Now we can keep the sample or skip it - if keepingSample { - v.maybeKeepSample(value, bc.random, &bc.randomLock) - } else { - v.skipSample() - } - - return nil -} - -func (bc *bufferedMetricContexts) getNbContext() uint64 { - return atomic.LoadUint64(&bc.nbContext) -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/container.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/container.go deleted file mode 100644 index 20d69ef63e..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/container.go +++ /dev/null @@ -1,19 +0,0 @@ -package statsd - -import ( - "sync" -) - -var ( - // containerID holds the container ID. - containerID = "" - - initOnce sync.Once -) - -// getContainerID returns the container ID configured at the client creation -// It can either be auto-discovered with origin detection or provided by the user. -// User-defined container ID is prioritized. -func getContainerID() string { - return containerID -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/container_linux.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/container_linux.go deleted file mode 100644 index 125132349f..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/container_linux.go +++ /dev/null @@ -1,219 +0,0 @@ -//go:build linux -// +build linux - -package statsd - -import ( - "bufio" - "fmt" - "io" - "os" - "path" - "regexp" - "strings" - "syscall" -) - -const ( - // cgroupPath is the path to the cgroup file where we can find the container id if one exists. - cgroupPath = "/proc/self/cgroup" - - // selfMountinfo is the path to the mountinfo path where we can find the container id in case cgroup namespace is preventing the use of /proc/self/cgroup - selfMountInfoPath = "/proc/self/mountinfo" - - // defaultCgroupMountPath is the default path to the cgroup mount point. - defaultCgroupMountPath = "/sys/fs/cgroup" - - // cgroupV1BaseController is the controller used to identify the container-id for cgroup v1 - cgroupV1BaseController = "memory" - - uuidSource = "[0-9a-f]{8}[-_][0-9a-f]{4}[-_][0-9a-f]{4}[-_][0-9a-f]{4}[-_][0-9a-f]{12}" - containerSource = "[0-9a-f]{64}" - taskSource = "[0-9a-f]{32}-\\d+" - - containerdSandboxPrefix = "sandboxes" - - // ContainerRegexpStr defines the regexp used to match container IDs - // ([0-9a-f]{64}) is standard container id used pretty much everywhere - // ([0-9a-f]{32}-\d+) is container id used by AWS ECS - // ([0-9a-f]{8}(-[0-9a-f]{4}){4}$) is container id used by Garden - containerRegexpStr = "([0-9a-f]{64})|([0-9a-f]{32}-\\d+)|([0-9a-f]{8}(-[0-9a-f]{4}){4}$)" - // cIDRegexpStr defines the regexp used to match container IDs in /proc/self/mountinfo - cIDRegexpStr = `.*/([^\s/]+)/(` + containerRegexpStr + `)/[\S]*hostname` - - // From https://github.com/torvalds/linux/blob/5859a2b1991101d6b978f3feb5325dad39421f29/include/linux/proc_ns.h#L41-L49 - // Currently, host namespace inode number are hardcoded, which can be used to detect - // if we're running in host namespace or not (does not work when running in DinD) - hostCgroupNamespaceInode = 0xEFFFFFFB -) - -var ( - // expLine matches a line in the /proc/self/cgroup file. It has a submatch for the last element (path), which contains the container ID. - expLine = regexp.MustCompile(`^\d+:[^:]*:(.+)$`) - - // expContainerID matches contained IDs and sources. Source: https://github.com/Qard/container-info/blob/master/index.js - expContainerID = regexp.MustCompile(fmt.Sprintf(`(%s|%s|%s)(?:.scope)?$`, uuidSource, containerSource, taskSource)) - - cIDMountInfoRegexp = regexp.MustCompile(cIDRegexpStr) - - // initContainerID initializes the container ID. - initContainerID = internalInitContainerID -) - -// parseContainerID finds the first container ID reading from r and returns it. -func parseContainerID(r io.Reader) string { - scn := bufio.NewScanner(r) - for scn.Scan() { - path := expLine.FindStringSubmatch(scn.Text()) - if len(path) != 2 { - // invalid entry, continue - continue - } - if parts := expContainerID.FindStringSubmatch(path[1]); len(parts) == 2 { - return parts[1] - } - } - return "" -} - -// readContainerID attempts to return the container ID from the provided file path or empty on failure. -func readContainerID(fpath string) string { - f, err := os.Open(fpath) - if err != nil { - return "" - } - defer f.Close() - return parseContainerID(f) -} - -// Parsing /proc/self/mountinfo is not always reliable in Kubernetes+containerd (at least) -// We're still trying to use it as it may help in some cgroupv2 configurations (Docker, ECS, raw containerd) -func parseMountinfo(r io.Reader) string { - scn := bufio.NewScanner(r) - for scn.Scan() { - line := scn.Text() - allMatches := cIDMountInfoRegexp.FindAllStringSubmatch(line, -1) - if len(allMatches) == 0 { - continue - } - - // We're interest in rightmost match - matches := allMatches[len(allMatches)-1] - if len(matches) > 0 && matches[1] != containerdSandboxPrefix { - return matches[2] - } - } - - return "" -} - -func readMountinfo(path string) string { - f, err := os.Open(path) - if err != nil { - return "" - } - defer f.Close() - return parseMountinfo(f) -} - -func isHostCgroupNamespace() bool { - fi, err := os.Stat("/proc/self/ns/cgroup") - if err != nil { - return false - } - - inode := fi.Sys().(*syscall.Stat_t).Ino - - return inode == hostCgroupNamespaceInode -} - -// parseCgroupNodePath parses /proc/self/cgroup and returns a map of controller to its associated cgroup node path. -func parseCgroupNodePath(r io.Reader) map[string]string { - res := make(map[string]string) - scn := bufio.NewScanner(r) - for scn.Scan() { - line := scn.Text() - tokens := strings.Split(line, ":") - if len(tokens) != 3 { - continue - } - if tokens[1] == cgroupV1BaseController || tokens[1] == "" { - res[tokens[1]] = tokens[2] - } - } - return res -} - -// getCgroupInode returns the cgroup controller inode if it exists otherwise an empty string. -// The inode is prefixed by "in-" and is used by the agent to retrieve the container ID. -// For cgroup v1, we use the memory controller. -func getCgroupInode(cgroupMountPath, procSelfCgroupPath string) string { - // Parse /proc/self/cgroup to retrieve the paths to the memory controller (cgroupv1) and the cgroup node (cgroupv2) - f, err := os.Open(procSelfCgroupPath) - if err != nil { - return "" - } - defer f.Close() - cgroupControllersPaths := parseCgroupNodePath(f) - // Retrieve the cgroup inode from /sys/fs/cgroup+controller+cgroupNodePath - for _, controller := range []string{cgroupV1BaseController, ""} { - cgroupNodePath, ok := cgroupControllersPaths[controller] - if !ok { - continue - } - inode := inodeForPath(path.Join(cgroupMountPath, controller, cgroupNodePath)) - if inode != "" { - return inode - } - } - return "" -} - -// inodeForPath returns the inode for the provided path or empty on failure. -func inodeForPath(path string) string { - fi, err := os.Stat(path) - if err != nil { - return "" - } - stats, ok := fi.Sys().(*syscall.Stat_t) - if !ok { - return "" - } - return fmt.Sprintf("in-%d", stats.Ino) -} - -// internalInitContainerID initializes the container ID. -// It can either be provided by the user or read from cgroups. -func internalInitContainerID(userProvidedID string, cgroupFallback, isHostCgroupNs bool) { - initOnce.Do(func() { - readCIDOrInode(userProvidedID, cgroupPath, selfMountInfoPath, defaultCgroupMountPath, cgroupFallback, isHostCgroupNs) - }) -} - -// readCIDOrInode reads the container ID from the user provided ID, cgroups or mountinfo. -func readCIDOrInode(userProvidedID, cgroupPath, selfMountInfoPath, defaultCgroupMountPath string, cgroupFallback, isHostCgroupNs bool) { - if userProvidedID != "" { - containerID = userProvidedID - return - } - - if cgroupFallback { - containerID = readContainerID(cgroupPath) - if containerID != "" { - return - } - - containerID = readMountinfo(selfMountInfoPath) - if containerID != "" { - return - } - - // If we're in the host cgroup namespace, the cid should be retrievable in /proc/self/cgroup - // In private cgroup namespace, we can retrieve the cgroup controller inode. - if containerID == "" && isHostCgroupNs { - return - } - - containerID = getCgroupInode(defaultCgroupMountPath, cgroupPath) - } -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/container_stub.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/container_stub.go deleted file mode 100644 index 29ab7f2c9b..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/container_stub.go +++ /dev/null @@ -1,17 +0,0 @@ -//go:build !linux -// +build !linux - -package statsd - -func isHostCgroupNamespace() bool { - return false -} - -var initContainerID = func(userProvidedID string, _, _ bool) { - initOnce.Do(func() { - if userProvidedID != "" { - containerID = userProvidedID - return - } - }) -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/error_handler.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/error_handler.go deleted file mode 100644 index 0076262730..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/error_handler.go +++ /dev/null @@ -1,22 +0,0 @@ -package statsd - -import ( - "log" -) - -func LoggingErrorHandler(err error) { - if e, ok := err.(*ErrorInputChannelFull); ok { - log.Printf( - "Input Queue is full (%d elements): %s %s dropped - %s - increase channel buffer size with `WithChannelModeBufferSize()`", - e.ChannelSize, e.Metric.name, e.Metric.tags, e.Msg, - ) - return - } else if e, ok := err.(*ErrorSenderChannelFull); ok { - log.Printf( - "Sender Queue is full (%d elements): %d metrics dropped - %s - increase sender queue size with `WithSenderQueueSize()`", - e.ChannelSize, e.LostElements, e.Msg, - ) - } else { - log.Printf("Error: %v", err) - } -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/event.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/event.go deleted file mode 100644 index a2ca4faf7f..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/event.go +++ /dev/null @@ -1,75 +0,0 @@ -package statsd - -import ( - "fmt" - "time" -) - -// Events support -// EventAlertType and EventAlertPriority became exported types after this issue was submitted: https://github.com/DataDog/datadog-go/issues/41 -// The reason why they got exported is so that client code can directly use the types. - -// EventAlertType is the alert type for events -type EventAlertType string - -const ( - // Info is the "info" AlertType for events - Info EventAlertType = "info" - // Error is the "error" AlertType for events - Error EventAlertType = "error" - // Warning is the "warning" AlertType for events - Warning EventAlertType = "warning" - // Success is the "success" AlertType for events - Success EventAlertType = "success" -) - -// EventPriority is the event priority for events -type EventPriority string - -const ( - // Normal is the "normal" Priority for events - Normal EventPriority = "normal" - // Low is the "low" Priority for events - Low EventPriority = "low" -) - -// An Event is an object that can be posted to your DataDog event stream. -type Event struct { - // Title of the event. Required. - Title string - // Text is the description of the event. - Text string - // Timestamp is a timestamp for the event. If not provided, the dogstatsd - // server will set this to the current time. - Timestamp time.Time - // Hostname for the event. - Hostname string - // AggregationKey groups this event with others of the same key. - AggregationKey string - // Priority of the event. Can be statsd.Low or statsd.Normal. - Priority EventPriority - // SourceTypeName is a source type for the event. - SourceTypeName string - // AlertType can be statsd.Info, statsd.Error, statsd.Warning, or statsd.Success. - // If absent, the default value applied by the dogstatsd server is Info. - AlertType EventAlertType - // Tags for the event. - Tags []string -} - -// NewEvent creates a new event with the given title and text. Error checking -// against these values is done at send-time, or upon running e.Check. -func NewEvent(title, text string) *Event { - return &Event{ - Title: title, - Text: text, - } -} - -// Check verifies that an event is valid. -func (e *Event) Check() error { - if len(e.Title) == 0 { - return fmt.Errorf("statsd.Event title is required") - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/fnv1a.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/fnv1a.go deleted file mode 100644 index 03dc8a07c7..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/fnv1a.go +++ /dev/null @@ -1,39 +0,0 @@ -package statsd - -const ( - // FNV-1a - offset32 = uint32(2166136261) - prime32 = uint32(16777619) - - // init32 is what 32 bits hash values should be initialized with. - init32 = offset32 -) - -// HashString32 returns the hash of s. -func hashString32(s string) uint32 { - return addString32(init32, s) -} - -// AddString32 adds the hash of s to the precomputed hash value h. -func addString32(h uint32, s string) uint32 { - i := 0 - n := (len(s) / 8) * 8 - - for i != n { - h = (h ^ uint32(s[i])) * prime32 - h = (h ^ uint32(s[i+1])) * prime32 - h = (h ^ uint32(s[i+2])) * prime32 - h = (h ^ uint32(s[i+3])) * prime32 - h = (h ^ uint32(s[i+4])) * prime32 - h = (h ^ uint32(s[i+5])) * prime32 - h = (h ^ uint32(s[i+6])) * prime32 - h = (h ^ uint32(s[i+7])) * prime32 - i += 8 - } - - for _, c := range s[i:] { - h = (h ^ uint32(c)) * prime32 - } - - return h -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/format.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/format.go deleted file mode 100644 index f3ab9231ff..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/format.go +++ /dev/null @@ -1,280 +0,0 @@ -package statsd - -import ( - "strconv" - "strings" -) - -var ( - gaugeSymbol = []byte("g") - countSymbol = []byte("c") - histogramSymbol = []byte("h") - distributionSymbol = []byte("d") - setSymbol = []byte("s") - timingSymbol = []byte("ms") - tagSeparatorSymbol = "," - nameSeparatorSymbol = ":" -) - -func appendHeader(buffer []byte, namespace string, name string) []byte { - if namespace != "" { - buffer = append(buffer, namespace...) - } - buffer = append(buffer, name...) - buffer = append(buffer, ':') - return buffer -} - -func appendRate(buffer []byte, rate float64) []byte { - if rate < 1 { - buffer = append(buffer, "|@"...) - buffer = strconv.AppendFloat(buffer, rate, 'f', -1, 64) - } - return buffer -} - -func appendWithoutNewlines(buffer []byte, s string) []byte { - // fastpath for strings without newlines - if strings.IndexByte(s, '\n') == -1 { - return append(buffer, s...) - } - - for _, b := range []byte(s) { - if b != '\n' { - buffer = append(buffer, b) - } - } - return buffer -} - -func appendTags(buffer []byte, globalTags []string, tags []string) []byte { - if len(globalTags) == 0 && len(tags) == 0 { - return buffer - } - buffer = append(buffer, "|#"...) - firstTag := true - - for _, tag := range globalTags { - if !firstTag { - buffer = append(buffer, tagSeparatorSymbol...) - } - buffer = appendWithoutNewlines(buffer, tag) - firstTag = false - } - for _, tag := range tags { - if !firstTag { - buffer = append(buffer, tagSeparatorSymbol...) - } - buffer = appendWithoutNewlines(buffer, tag) - firstTag = false - } - return buffer -} - -func appendTagsAggregated(buffer []byte, globalTags []string, tags string) []byte { - if len(globalTags) == 0 && tags == "" { - return buffer - } - - buffer = append(buffer, "|#"...) - firstTag := true - - for _, tag := range globalTags { - if !firstTag { - buffer = append(buffer, tagSeparatorSymbol...) - } - buffer = appendWithoutNewlines(buffer, tag) - firstTag = false - } - if tags != "" { - if !firstTag { - buffer = append(buffer, tagSeparatorSymbol...) - } - buffer = appendWithoutNewlines(buffer, tags) - } - return buffer -} - -func appendFloatMetric(buffer []byte, typeSymbol []byte, namespace string, globalTags []string, name string, value float64, tags []string, rate float64, precision int) []byte { - buffer = appendHeader(buffer, namespace, name) - buffer = strconv.AppendFloat(buffer, value, 'f', precision, 64) - buffer = append(buffer, '|') - buffer = append(buffer, typeSymbol...) - buffer = appendRate(buffer, rate) - buffer = appendTags(buffer, globalTags, tags) - buffer = appendContainerID(buffer) - return buffer -} - -func appendIntegerMetric(buffer []byte, typeSymbol []byte, namespace string, globalTags []string, name string, value int64, tags []string, rate float64) []byte { - buffer = appendHeader(buffer, namespace, name) - buffer = strconv.AppendInt(buffer, value, 10) - buffer = append(buffer, '|') - buffer = append(buffer, typeSymbol...) - buffer = appendRate(buffer, rate) - buffer = appendTags(buffer, globalTags, tags) - buffer = appendContainerID(buffer) - return buffer -} - -func appendStringMetric(buffer []byte, typeSymbol []byte, namespace string, globalTags []string, name string, value string, tags []string, rate float64) []byte { - buffer = appendHeader(buffer, namespace, name) - buffer = append(buffer, value...) - buffer = append(buffer, '|') - buffer = append(buffer, typeSymbol...) - buffer = appendRate(buffer, rate) - buffer = appendTags(buffer, globalTags, tags) - buffer = appendContainerID(buffer) - return buffer -} - -func appendGauge(buffer []byte, namespace string, globalTags []string, name string, value float64, tags []string, rate float64) []byte { - return appendFloatMetric(buffer, gaugeSymbol, namespace, globalTags, name, value, tags, rate, -1) -} - -func appendCount(buffer []byte, namespace string, globalTags []string, name string, value int64, tags []string, rate float64) []byte { - return appendIntegerMetric(buffer, countSymbol, namespace, globalTags, name, value, tags, rate) -} - -func appendHistogram(buffer []byte, namespace string, globalTags []string, name string, value float64, tags []string, rate float64) []byte { - return appendFloatMetric(buffer, histogramSymbol, namespace, globalTags, name, value, tags, rate, -1) -} - -func appendDistribution(buffer []byte, namespace string, globalTags []string, name string, value float64, tags []string, rate float64) []byte { - return appendFloatMetric(buffer, distributionSymbol, namespace, globalTags, name, value, tags, rate, -1) -} - -func appendSet(buffer []byte, namespace string, globalTags []string, name string, value string, tags []string, rate float64) []byte { - return appendStringMetric(buffer, setSymbol, namespace, globalTags, name, value, tags, rate) -} - -func appendTiming(buffer []byte, namespace string, globalTags []string, name string, value float64, tags []string, rate float64) []byte { - return appendFloatMetric(buffer, timingSymbol, namespace, globalTags, name, value, tags, rate, 6) -} - -func escapedEventTextLen(text string) int { - return len(text) + strings.Count(text, "\n") -} - -func appendEscapedEventText(buffer []byte, text string) []byte { - for _, b := range []byte(text) { - if b != '\n' { - buffer = append(buffer, b) - } else { - buffer = append(buffer, "\\n"...) - } - } - return buffer -} - -func appendEvent(buffer []byte, event *Event, globalTags []string) []byte { - escapedTextLen := escapedEventTextLen(event.Text) - - buffer = append(buffer, "_e{"...) - buffer = strconv.AppendInt(buffer, int64(len(event.Title)), 10) - buffer = append(buffer, tagSeparatorSymbol...) - buffer = strconv.AppendInt(buffer, int64(escapedTextLen), 10) - buffer = append(buffer, "}:"...) - buffer = append(buffer, event.Title...) - buffer = append(buffer, '|') - if escapedTextLen != len(event.Text) { - buffer = appendEscapedEventText(buffer, event.Text) - } else { - buffer = append(buffer, event.Text...) - } - - if !event.Timestamp.IsZero() { - buffer = append(buffer, "|d:"...) - buffer = strconv.AppendInt(buffer, int64(event.Timestamp.Unix()), 10) - } - - if len(event.Hostname) != 0 { - buffer = append(buffer, "|h:"...) - buffer = append(buffer, event.Hostname...) - } - - if len(event.AggregationKey) != 0 { - buffer = append(buffer, "|k:"...) - buffer = append(buffer, event.AggregationKey...) - } - - if len(event.Priority) != 0 { - buffer = append(buffer, "|p:"...) - buffer = append(buffer, event.Priority...) - } - - if len(event.SourceTypeName) != 0 { - buffer = append(buffer, "|s:"...) - buffer = append(buffer, event.SourceTypeName...) - } - - if len(event.AlertType) != 0 { - buffer = append(buffer, "|t:"...) - buffer = append(buffer, string(event.AlertType)...) - } - - buffer = appendTags(buffer, globalTags, event.Tags) - buffer = appendContainerID(buffer) - return buffer -} - -func appendEscapedServiceCheckText(buffer []byte, text string) []byte { - for i := 0; i < len(text); i++ { - if text[i] == '\n' { - buffer = append(buffer, "\\n"...) - } else if text[i] == 'm' && i+1 < len(text) && text[i+1] == ':' { - buffer = append(buffer, "m\\:"...) - i++ - } else { - buffer = append(buffer, text[i]) - } - } - return buffer -} - -func appendServiceCheck(buffer []byte, serviceCheck *ServiceCheck, globalTags []string) []byte { - buffer = append(buffer, "_sc|"...) - buffer = append(buffer, serviceCheck.Name...) - buffer = append(buffer, '|') - buffer = strconv.AppendInt(buffer, int64(serviceCheck.Status), 10) - - if !serviceCheck.Timestamp.IsZero() { - buffer = append(buffer, "|d:"...) - buffer = strconv.AppendInt(buffer, int64(serviceCheck.Timestamp.Unix()), 10) - } - - if len(serviceCheck.Hostname) != 0 { - buffer = append(buffer, "|h:"...) - buffer = append(buffer, serviceCheck.Hostname...) - } - - buffer = appendTags(buffer, globalTags, serviceCheck.Tags) - - if len(serviceCheck.Message) != 0 { - buffer = append(buffer, "|m:"...) - buffer = appendEscapedServiceCheckText(buffer, serviceCheck.Message) - } - - buffer = appendContainerID(buffer) - return buffer -} - -func appendSeparator(buffer []byte) []byte { - return append(buffer, '\n') -} - -func appendContainerID(buffer []byte) []byte { - if containerID := getContainerID(); len(containerID) > 0 { - buffer = append(buffer, "|c:"...) - buffer = append(buffer, containerID...) - } - return buffer -} - -func appendTimestamp(buffer []byte, timestamp int64) []byte { - if timestamp > noTimestamp { - buffer = append(buffer, "|T"...) - buffer = strconv.AppendInt(buffer, timestamp, 10) - } - return buffer -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/metrics.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/metrics.go deleted file mode 100644 index 3d243b7a63..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/metrics.go +++ /dev/null @@ -1,268 +0,0 @@ -package statsd - -import ( - "math" - "math/rand" - "sync" - "sync/atomic" -) - -/* -Those are metrics type that can be aggregated on the client side: - - Gauge - - Count - - Set -*/ - -type countMetric struct { - value int64 - name string - tags []string -} - -func newCountMetric(name string, value int64, tags []string) *countMetric { - return &countMetric{ - value: value, - name: name, - tags: copySlice(tags), - } -} - -func (c *countMetric) sample(v int64) { - atomic.AddInt64(&c.value, v) -} - -func (c *countMetric) flushUnsafe() metric { - return metric{ - metricType: count, - name: c.name, - tags: c.tags, - rate: 1, - ivalue: c.value, - } -} - -// Gauge - -type gaugeMetric struct { - value uint64 - name string - tags []string -} - -func newGaugeMetric(name string, value float64, tags []string) *gaugeMetric { - return &gaugeMetric{ - value: math.Float64bits(value), - name: name, - tags: copySlice(tags), - } -} - -func (g *gaugeMetric) sample(v float64) { - atomic.StoreUint64(&g.value, math.Float64bits(v)) -} - -func (g *gaugeMetric) flushUnsafe() metric { - return metric{ - metricType: gauge, - name: g.name, - tags: g.tags, - rate: 1, - fvalue: math.Float64frombits(g.value), - } -} - -// Set - -type setMetric struct { - data map[string]struct{} - name string - tags []string - sync.Mutex -} - -func newSetMetric(name string, value string, tags []string) *setMetric { - set := &setMetric{ - data: map[string]struct{}{}, - name: name, - tags: copySlice(tags), - } - set.data[value] = struct{}{} - return set -} - -func (s *setMetric) sample(v string) { - s.Lock() - defer s.Unlock() - s.data[v] = struct{}{} -} - -// Sets are aggregated on the agent side too. We flush the keys so a set from -// multiple application can be correctly aggregated on the agent side. -func (s *setMetric) flushUnsafe() []metric { - if len(s.data) == 0 { - return nil - } - - metrics := make([]metric, len(s.data)) - i := 0 - for value := range s.data { - metrics[i] = metric{ - metricType: set, - name: s.name, - tags: s.tags, - rate: 1, - svalue: value, - } - i++ - } - return metrics -} - -// Histograms, Distributions and Timings - -type bufferedMetric struct { - sync.Mutex - - // Kept samples (after sampling) - data []float64 - // Total stored samples (after sampling) - storedSamples int64 - // Total number of observed samples (before sampling). This is used to keep - // the sampling rate correct. - totalSamples int64 - - name string - // Histograms and Distributions store tags as one string since we need - // to compute its size multiple time when serializing. - tags string - mtype metricType - - // maxSamples is the maximum number of samples we keep in memory - maxSamples int64 - - // The first observed user-specified sample rate. When specified - // it is used because we don't know better. - specifiedRate float64 -} - -func (s *bufferedMetric) sample(v float64) { - s.Lock() - defer s.Unlock() - s.sampleUnsafe(v) -} - -func (s *bufferedMetric) sampleUnsafe(v float64) { - s.data = append(s.data, v) - s.storedSamples++ - // Total samples needs to be incremented though an atomic because it can be accessed without the lock. - atomic.AddInt64(&s.totalSamples, 1) -} - -func (s *bufferedMetric) maybeKeepSample(v float64, rand *rand.Rand, randLock *sync.Mutex) { - s.Lock() - defer s.Unlock() - if s.maxSamples > 0 { - if s.storedSamples >= s.maxSamples { - // We reached the maximum number of samples we can keep in memory, so we randomly - // replace a sample. - randLock.Lock() - i := rand.Int63n(atomic.LoadInt64(&s.totalSamples)) - randLock.Unlock() - if i < s.maxSamples { - s.data[i] = v - } - } else { - s.data[s.storedSamples] = v - s.storedSamples++ - } - s.totalSamples++ - } else { - // This code path appends to the slice since we did not pre-allocate memory in this case. - s.sampleUnsafe(v) - } -} - -func (s *bufferedMetric) skipSample() { - atomic.AddInt64(&s.totalSamples, 1) -} - -func (s *bufferedMetric) flushUnsafe() metric { - totalSamples := atomic.LoadInt64(&s.totalSamples) - var rate float64 - - // If the user had a specified rate send it because we don't know better. - // This code should be removed once we can also remove the early return at the top of - // `bufferedMetricContexts.sample` - if s.specifiedRate != 1.0 { - rate = s.specifiedRate - } else { - rate = float64(s.storedSamples) / float64(totalSamples) - } - - return metric{ - metricType: s.mtype, - name: s.name, - stags: s.tags, - rate: rate, - fvalues: s.data[:s.storedSamples], - } -} - -type histogramMetric = bufferedMetric - -func newHistogramMetric(name string, value float64, stringTags string, maxSamples int64, rate float64) *histogramMetric { - return &histogramMetric{ - data: newData(value, maxSamples), - totalSamples: 1, - storedSamples: 1, - name: name, - tags: stringTags, - mtype: histogramAggregated, - maxSamples: maxSamples, - specifiedRate: rate, - } -} - -type distributionMetric = bufferedMetric - -func newDistributionMetric(name string, value float64, stringTags string, maxSamples int64, rate float64) *distributionMetric { - return &distributionMetric{ - data: newData(value, maxSamples), - totalSamples: 1, - storedSamples: 1, - name: name, - tags: stringTags, - mtype: distributionAggregated, - maxSamples: maxSamples, - specifiedRate: rate, - } -} - -type timingMetric = bufferedMetric - -func newTimingMetric(name string, value float64, stringTags string, maxSamples int64, rate float64) *timingMetric { - return &timingMetric{ - data: newData(value, maxSamples), - totalSamples: 1, - storedSamples: 1, - name: name, - tags: stringTags, - mtype: timingAggregated, - maxSamples: maxSamples, - specifiedRate: rate, - } -} - -// newData creates a new slice of float64 with the given capacity. If maxSample -// is less than or equal to 0, it returns a slice with the given value as the -// only element. -func newData(value float64, maxSample int64) []float64 { - if maxSample <= 0 { - return []float64{value} - } else { - data := make([]float64, maxSample) - data[0] = value - return data - } -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/noop.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/noop.go deleted file mode 100644 index 6500cde9ab..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/noop.go +++ /dev/null @@ -1,118 +0,0 @@ -package statsd - -import "time" - -// NoOpClient is a statsd client that does nothing. Can be useful in testing -// situations for library users. -type NoOpClient struct{} - -// Gauge does nothing and returns nil -func (n *NoOpClient) Gauge(name string, value float64, tags []string, rate float64) error { - return nil -} - -// GaugeWithTimestamp does nothing and returns nil -func (n *NoOpClient) GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error { - return nil -} - -// Count does nothing and returns nil -func (n *NoOpClient) Count(name string, value int64, tags []string, rate float64) error { - return nil -} - -// CountWithTimestamp does nothing and returns nil -func (n *NoOpClient) CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error { - return nil -} - -// Histogram does nothing and returns nil -func (n *NoOpClient) Histogram(name string, value float64, tags []string, rate float64) error { - return nil -} - -// Distribution does nothing and returns nil -func (n *NoOpClient) Distribution(name string, value float64, tags []string, rate float64) error { - return nil -} - -// Decr does nothing and returns nil -func (n *NoOpClient) Decr(name string, tags []string, rate float64) error { - return nil -} - -// Incr does nothing and returns nil -func (n *NoOpClient) Incr(name string, tags []string, rate float64) error { - return nil -} - -// Set does nothing and returns nil -func (n *NoOpClient) Set(name string, value string, tags []string, rate float64) error { - return nil -} - -// Timing does nothing and returns nil -func (n *NoOpClient) Timing(name string, value time.Duration, tags []string, rate float64) error { - return nil -} - -// TimeInMilliseconds does nothing and returns nil -func (n *NoOpClient) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error { - return nil -} - -// Event does nothing and returns nil -func (n *NoOpClient) Event(e *Event) error { - return nil -} - -// SimpleEvent does nothing and returns nil -func (n *NoOpClient) SimpleEvent(title, text string) error { - return nil -} - -// ServiceCheck does nothing and returns nil -func (n *NoOpClient) ServiceCheck(sc *ServiceCheck) error { - return nil -} - -// SimpleServiceCheck does nothing and returns nil -func (n *NoOpClient) SimpleServiceCheck(name string, status ServiceCheckStatus) error { - return nil -} - -// Close does nothing and returns nil -func (n *NoOpClient) Close() error { - return nil -} - -// Flush does nothing and returns nil -func (n *NoOpClient) Flush() error { - return nil -} - -// IsClosed does nothing and return false -func (n *NoOpClient) IsClosed() bool { - return false -} - -// GetTelemetry does nothing and returns an empty Telemetry -func (n *NoOpClient) GetTelemetry() Telemetry { - return Telemetry{} -} - -// Verify that NoOpClient implements the ClientInterface. -// https://golang.org/doc/faq#guarantee_satisfies_interface -var _ ClientInterface = &NoOpClient{} - -// NoOpClientDirect implements ClientDirectInterface and does nothing. -type NoOpClientDirect struct { - NoOpClient -} - -// DistributionSamples does nothing and returns nil -func (n *NoOpClientDirect) DistributionSamples(name string, values []float64, tags []string, rate float64) error { - return nil -} - -var _ ClientDirectInterface = &NoOpClientDirect{} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/options.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/options.go deleted file mode 100644 index e007505a64..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/options.go +++ /dev/null @@ -1,414 +0,0 @@ -package statsd - -import ( - "fmt" - "math" - "strings" - "time" -) - -var ( - defaultNamespace = "" - defaultTags = []string{} - defaultMaxBytesPerPayload = 0 - defaultMaxMessagesPerPayload = math.MaxInt32 - defaultBufferPoolSize = 0 - defaultBufferFlushInterval = 100 * time.Millisecond - defaultWorkerCount = 32 - defaultSenderQueueSize = 0 - defaultWriteTimeout = 100 * time.Millisecond - defaultConnectTimeout = 1000 * time.Millisecond - defaultTelemetry = true - defaultReceivingMode = mutexMode - defaultChannelModeBufferSize = 4096 - defaultAggregationFlushInterval = 2 * time.Second - defaultAggregation = true - defaultExtendedAggregation = false - defaultMaxBufferedSamplesPerContext = -1 - defaultOriginDetection = true - defaultChannelModeErrorsWhenFull = false - defaultErrorHandler = func(error) {} -) - -// Options contains the configuration options for a client. -type Options struct { - namespace string - tags []string - maxBytesPerPayload int - maxMessagesPerPayload int - bufferPoolSize int - bufferFlushInterval time.Duration - workersCount int - senderQueueSize int - writeTimeout time.Duration - connectTimeout time.Duration - telemetry bool - receiveMode receivingMode - channelModeBufferSize int - aggregationFlushInterval time.Duration - aggregation bool - extendedAggregation bool - maxBufferedSamplesPerContext int - telemetryAddr string - originDetection bool - containerID string - channelModeErrorsWhenFull bool - errorHandler ErrorHandler -} - -func resolveOptions(options []Option) (*Options, error) { - o := &Options{ - namespace: defaultNamespace, - tags: defaultTags, - maxBytesPerPayload: defaultMaxBytesPerPayload, - maxMessagesPerPayload: defaultMaxMessagesPerPayload, - bufferPoolSize: defaultBufferPoolSize, - bufferFlushInterval: defaultBufferFlushInterval, - workersCount: defaultWorkerCount, - senderQueueSize: defaultSenderQueueSize, - writeTimeout: defaultWriteTimeout, - connectTimeout: defaultConnectTimeout, - telemetry: defaultTelemetry, - receiveMode: defaultReceivingMode, - channelModeBufferSize: defaultChannelModeBufferSize, - aggregationFlushInterval: defaultAggregationFlushInterval, - aggregation: defaultAggregation, - extendedAggregation: defaultExtendedAggregation, - maxBufferedSamplesPerContext: defaultMaxBufferedSamplesPerContext, - originDetection: defaultOriginDetection, - channelModeErrorsWhenFull: defaultChannelModeErrorsWhenFull, - errorHandler: defaultErrorHandler, - } - - for _, option := range options { - err := option(o) - if err != nil { - return nil, err - } - } - - return o, nil -} - -// Option is a client option. Can return an error if validation fails. -type Option func(*Options) error - -// WithNamespace sets a string to be prepend to all metrics, events and service checks name. -// -// A '.' will automatically be added after the namespace if needed. For example a metrics 'test' with a namespace 'prod' -// will produce a final metric named 'prod.test'. -func WithNamespace(namespace string) Option { - return func(o *Options) error { - if strings.HasSuffix(namespace, ".") { - o.namespace = namespace - } else { - o.namespace = namespace + "." - } - return nil - } -} - -// WithTags sets global tags to be applied to every metrics, events and service checks. -func WithTags(tags []string) Option { - return func(o *Options) error { - o.tags = tags - return nil - } -} - -// WithMaxMessagesPerPayload sets the maximum number of metrics, events and/or service checks that a single payload can -// contain. -// -// The default is 'math.MaxInt32' which will most likely let the WithMaxBytesPerPayload option take precedence. This -// option can be set to `1` to create an unbuffered client (each metrics/event/service check will be send in its own -// payload to the agent). -func WithMaxMessagesPerPayload(maxMessagesPerPayload int) Option { - return func(o *Options) error { - o.maxMessagesPerPayload = maxMessagesPerPayload - return nil - } -} - -// WithMaxBytesPerPayload sets the maximum number of bytes a single payload can contain. Each sample, even and service -// check must be lower than this value once serialized or an `MessageTooLongError` is returned. -// -// The default value 0 which will set the option to the optimal size for the transport protocol used: 1432 for UDP and -// named pipe and 8192 for UDS. Those values offer the best performances. -// Be careful when changing this option, see -// https://docs.datadoghq.com/developers/dogstatsd/high_throughput/#ensure-proper-packet-sizes. -func WithMaxBytesPerPayload(MaxBytesPerPayload int) Option { - return func(o *Options) error { - o.maxBytesPerPayload = MaxBytesPerPayload - return nil - } -} - -// WithBufferPoolSize sets the size of the pool of buffers used to serialized metrics, events and service_checks. -// -// The default, 0, will set the option to the optimal size for the transport protocol used: 2048 for UDP and named pipe -// and 512 for UDS. -func WithBufferPoolSize(bufferPoolSize int) Option { - return func(o *Options) error { - o.bufferPoolSize = bufferPoolSize - return nil - } -} - -// WithBufferFlushInterval sets the interval after which the current buffer is flushed. -// -// A buffers are used to serialized data, they're flushed either when full (see WithMaxBytesPerPayload) or when it's -// been open for longer than this interval. -// -// With apps sending a high number of metrics/events/service_checks the interval rarely timeout. But with slow sending -// apps increasing this value will reduce the number of payload sent on the wire as more data is serialized in the same -// payload. -// -// Default is 100ms -func WithBufferFlushInterval(bufferFlushInterval time.Duration) Option { - return func(o *Options) error { - o.bufferFlushInterval = bufferFlushInterval - return nil - } -} - -// WithWorkersCount sets the number of workers that will be used to serialized data. -// -// Those workers allow the use of multiple buffers at the same time (see WithBufferPoolSize) to reduce lock contention. -// -// Default is 32. -func WithWorkersCount(workersCount int) Option { - return func(o *Options) error { - if workersCount < 1 { - return fmt.Errorf("workersCount must be a positive integer") - } - o.workersCount = workersCount - return nil - } -} - -// WithSenderQueueSize sets the size of the sender queue in number of buffers. -// -// After data has been serialized in a buffer they're pushed to a queue that the sender will consume and then each one -// ot the agent. -// -// The default value 0 will set the option to the optimal size for the transport protocol used: 2048 for UDP and named -// pipe and 512 for UDS. -func WithSenderQueueSize(senderQueueSize int) Option { - return func(o *Options) error { - o.senderQueueSize = senderQueueSize - return nil - } -} - -// WithWriteTimeout sets the timeout for network communication with the Agent, after this interval a payload is -// dropped. This is only used for UDS and named pipes connection. -func WithWriteTimeout(writeTimeout time.Duration) Option { - return func(o *Options) error { - o.writeTimeout = writeTimeout - return nil - } -} - -// WithConnectTimeout sets the timeout for network connection with the Agent, after this interval the connection -// attempt is aborted. This is only used for UDS connection. This will also reset the connection if nothing can be -// written to it for this duration. -func WithConnectTimeout(connectTimeout time.Duration) Option { - return func(o *Options) error { - o.connectTimeout = connectTimeout - return nil - } -} - -// WithChannelMode make the client use channels to receive metrics -// -// This determines how the client receive metrics from the app (for example when calling the `Gauge()` method). -// The client will either drop the metrics if its buffers are full (WithChannelMode option) or block the caller until the -// metric can be handled (WithMutexMode option). By default, the client use mutexes. -// -// WithChannelMode uses a channel (see WithChannelModeBufferSize to configure its size) to receive metrics and drops metrics if -// the channel is full. Sending metrics in this mode is much slower that WithMutexMode (because of the channel), but will not -// block the application. This mode is made for application using statsd directly into the application code instead of -// a separated periodic reporter. The goal is to not slow down the application at the cost of dropping metrics and having a lower max -// throughput. -func WithChannelMode() Option { - return func(o *Options) error { - o.receiveMode = channelMode - return nil - } -} - -// WithMutexMode will use mutex to receive metrics from the app through the API. -// -// This determines how the client receive metrics from the app (for example when calling the `Gauge()` method). -// The client will either drop the metrics if its buffers are full (WithChannelMode option) or block the caller until the -// metric can be handled (WithMutexMode option). By default the client use mutexes. -// -// WithMutexMode uses mutexes to receive metrics which is much faster than channels but can cause some lock contention -// when used with a high number of goroutines sending the same metrics. Mutexes are sharded based on the metrics name -// which limit mutex contention when multiple goroutines send different metrics (see WithWorkersCount). This is the -// default behavior which will produce the best throughput. -func WithMutexMode() Option { - return func(o *Options) error { - o.receiveMode = mutexMode - return nil - } -} - -// WithChannelModeBufferSize sets the size of the channel holding incoming metrics when WithChannelMode is used. -func WithChannelModeBufferSize(bufferSize int) Option { - return func(o *Options) error { - o.channelModeBufferSize = bufferSize - return nil - } -} - -// WithChannelModeErrorsWhenFull makes the client return an error when the channel is full. -// This should be enabled if you want to be notified when the client is dropping metrics. You -// will also need to set `WithErrorHandler` to be notified of sender error. This might have -// a small performance impact. -func WithChannelModeErrorsWhenFull() Option { - return func(o *Options) error { - o.channelModeErrorsWhenFull = true - return nil - } -} - -// WithoutChannelModeErrorsWhenFull makes the client not return an error when the channel is full. -func WithoutChannelModeErrorsWhenFull() Option { - return func(o *Options) error { - o.channelModeErrorsWhenFull = false - return nil - } -} - -// WithErrorHandler sets a function that will be called when an error occurs. -func WithErrorHandler(errorHandler ErrorHandler) Option { - return func(o *Options) error { - o.errorHandler = errorHandler - return nil - } -} - -// WithAggregationInterval sets the interval at which aggregated metrics are flushed. See WithClientSideAggregation and -// WithExtendedClientSideAggregation for more. -// -// The default interval is 2s. The interval must divide the Agent reporting period (default=10s) evenly to reduce "aliasing" -// that can cause values to appear irregular/spiky. -// -// For example a 3s aggregation interval will create spikes in the final graph: a application sending a count metric -// that increments at a constant 1000 time per second will appear noisy with an interval of 3s. This is because -// client-side aggregation would report every 3 seconds, while the agent is reporting every 10 seconds. This means in -// each agent bucket, the values are: 9000, 9000, 12000. -func WithAggregationInterval(interval time.Duration) Option { - return func(o *Options) error { - o.aggregationFlushInterval = interval - return nil - } -} - -// WithClientSideAggregation enables client side aggregation for Gauges, Counts and Sets. -func WithClientSideAggregation() Option { - return func(o *Options) error { - o.aggregation = true - return nil - } -} - -// WithoutClientSideAggregation disables client side aggregation. -func WithoutClientSideAggregation() Option { - return func(o *Options) error { - o.aggregation = false - o.extendedAggregation = false - return nil - } -} - -// WithExtendedClientSideAggregation enables client side aggregation for all types. This feature is only compatible with -// Agent's version >=6.25.0 && <7.0.0 or Agent's versions >=7.25.0. -// When enabled, the use of `rate` with distribution is discouraged and `WithMaxSamplesPerContext()` should be used. -// If `rate` is used with different values of `rate` the resulting rate is not guaranteed to be correct. -func WithExtendedClientSideAggregation() Option { - return func(o *Options) error { - o.aggregation = true - o.extendedAggregation = true - return nil - } -} - -// WithMaxSamplesPerContext limits the number of sample for metric types that require multiple samples to be send -// over statsd to the agent, such as distributions or timings. This limits the number of sample per -// context for a distribution to a given number. Gauges and counts will not be affected as a single sample per context -// is sent with client side aggregation. -// - This will enable client side aggregation for all metrics. -// - This feature should be used with `WithExtendedClientSideAggregation` for optimal results. -func WithMaxSamplesPerContext(maxSamplesPerDistribution int) Option { - return func(o *Options) error { - o.aggregation = true - o.maxBufferedSamplesPerContext = maxSamplesPerDistribution - return nil - } -} - -// WithoutTelemetry disables the client telemetry. -// -// More on this here: https://docs.datadoghq.com/developers/dogstatsd/high_throughput/#client-side-telemetry -func WithoutTelemetry() Option { - return func(o *Options) error { - o.telemetry = false - return nil - } -} - -// WithTelemetryAddr sets a different address for telemetry metrics. By default the same address as the client is used -// for telemetry. -// -// More on this here: https://docs.datadoghq.com/developers/dogstatsd/high_throughput/#client-side-telemetry -func WithTelemetryAddr(addr string) Option { - return func(o *Options) error { - o.telemetryAddr = addr - return nil - } -} - -// WithoutOriginDetection disables the client origin detection. -// When enabled, the client tries to discover its container ID and sends it to the Agent -// to enrich the metrics with container tags. -// If the container id is not found and the client is running in a private cgroup namespace, the client -// sends the base cgroup controller inode. -// Origin detection can also be disabled by configuring the environment variabe DD_ORIGIN_DETECTION_ENABLED=false -// The client tries to read the container ID by parsing the file /proc/self/cgroup, this is not supported on Windows. -// -// More on this here: https://docs.datadoghq.com/developers/dogstatsd/?tab=kubernetes#origin-detection-over-udp -func WithoutOriginDetection() Option { - return func(o *Options) error { - o.originDetection = false - return nil - } -} - -// WithOriginDetection enables the client origin detection. -// This feature requires Datadog Agent version >=6.35.0 && <7.0.0 or Agent versions >=7.35.0. -// When enabled, the client tries to discover its container ID and sends it to the Agent -// to enrich the metrics with container tags. -// If the container id is not found and the client is running in a private cgroup namespace, the client -// sends the base cgroup controller inode. -// Origin detection can be disabled by configuring the environment variable DD_ORIGIN_DETECTION_ENABLED=false -// -// More on this here: https://docs.datadoghq.com/developers/dogstatsd/?tab=kubernetes#origin-detection-over-udp -func WithOriginDetection() Option { - return func(o *Options) error { - o.originDetection = true - return nil - } -} - -// WithContainerID allows passing the container ID, this will be used by the Agent to enrich metrics with container tags. -// This feature requires Datadog Agent version >=6.35.0 && <7.0.0 or Agent versions >=7.35.0. -// When configured, the provided container ID is prioritized over the container ID discovered via Origin Detection. -// The client prioritizes the value passed via DD_ENTITY_ID (if set) over the container ID. -func WithContainerID(id string) Option { - return func(o *Options) error { - o.containerID = id - return nil - } -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe.go deleted file mode 100644 index 1188b00f3d..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build !windows -// +build !windows - -package statsd - -import ( - "errors" - "time" -) - -func newWindowsPipeWriter(pipepath string, writeTimeout time.Duration) (Transport, error) { - return nil, errors.New("Windows Named Pipes are only supported on Windows") -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe_windows.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe_windows.go deleted file mode 100644 index c27434ccf4..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/pipe_windows.go +++ /dev/null @@ -1,81 +0,0 @@ -//go:build windows -// +build windows - -package statsd - -import ( - "net" - "sync" - "time" - - "github.com/Microsoft/go-winio" -) - -type pipeWriter struct { - mu sync.RWMutex - conn net.Conn - timeout time.Duration - pipepath string -} - -func (p *pipeWriter) Write(data []byte) (n int, err error) { - conn, err := p.ensureConnection() - if err != nil { - return 0, err - } - - p.mu.RLock() - conn.SetWriteDeadline(time.Now().Add(p.timeout)) - p.mu.RUnlock() - - n, err = conn.Write(data) - if err != nil { - if e, ok := err.(net.Error); !ok || !e.Temporary() { - // disconnected; retry again on next attempt - p.mu.Lock() - p.conn = nil - p.mu.Unlock() - } - } - return n, err -} - -func (p *pipeWriter) ensureConnection() (net.Conn, error) { - p.mu.RLock() - conn := p.conn - p.mu.RUnlock() - if conn != nil { - return conn, nil - } - - // looks like we might need to connect - try again with write locking. - p.mu.Lock() - defer p.mu.Unlock() - if p.conn != nil { - return p.conn, nil - } - newconn, err := winio.DialPipe(p.pipepath, nil) - if err != nil { - return nil, err - } - p.conn = newconn - return newconn, nil -} - -func (p *pipeWriter) Close() error { - return p.conn.Close() -} - -// GetTransportName returns the name of the transport -func (p *pipeWriter) GetTransportName() string { - return writerWindowsPipe -} - -func newWindowsPipeWriter(pipepath string, writeTimeout time.Duration) (*pipeWriter, error) { - // Defer connection establishment to first write - return &pipeWriter{ - conn: nil, - timeout: writeTimeout, - pipepath: pipepath, - }, nil -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/sender.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/sender.go deleted file mode 100644 index fc80395c31..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/sender.go +++ /dev/null @@ -1,145 +0,0 @@ -package statsd - -import ( - "io" - "sync/atomic" -) - -// senderTelemetry contains telemetry about the health of the sender -type senderTelemetry struct { - totalPayloadsSent uint64 - totalPayloadsDroppedQueueFull uint64 - totalPayloadsDroppedWriter uint64 - totalBytesSent uint64 - totalBytesDroppedQueueFull uint64 - totalBytesDroppedWriter uint64 -} - -type Transport interface { - io.WriteCloser - - // GetTransportName returns the name of the transport - GetTransportName() string -} - -type sender struct { - transport Transport - pool *bufferPool - queue chan *statsdBuffer - telemetry *senderTelemetry - stop chan struct{} - flushSignal chan struct{} - errorHandler ErrorHandler -} - -type ErrorSenderChannelFull struct { - LostElements int - ChannelSize int - Msg string -} - -func (e *ErrorSenderChannelFull) Error() string { - return e.Msg -} - -func newSender(transport Transport, queueSize int, pool *bufferPool, errorHandler ErrorHandler) *sender { - sender := &sender{ - transport: transport, - pool: pool, - queue: make(chan *statsdBuffer, queueSize), - telemetry: &senderTelemetry{}, - stop: make(chan struct{}), - flushSignal: make(chan struct{}), - errorHandler: errorHandler, - } - - go sender.sendLoop() - return sender -} - -func (s *sender) send(buffer *statsdBuffer) { - select { - case s.queue <- buffer: - default: - if s.errorHandler != nil { - err := &ErrorSenderChannelFull{ - LostElements: buffer.elementCount, - ChannelSize: len(s.queue), - Msg: "Sender queue is full", - } - s.errorHandler(err) - } - atomic.AddUint64(&s.telemetry.totalPayloadsDroppedQueueFull, 1) - atomic.AddUint64(&s.telemetry.totalBytesDroppedQueueFull, uint64(len(buffer.bytes()))) - s.pool.returnBuffer(buffer) - } -} - -func (s *sender) write(buffer *statsdBuffer) { - _, err := s.transport.Write(buffer.bytes()) - if err != nil { - atomic.AddUint64(&s.telemetry.totalPayloadsDroppedWriter, 1) - atomic.AddUint64(&s.telemetry.totalBytesDroppedWriter, uint64(len(buffer.bytes()))) - if s.errorHandler != nil { - s.errorHandler(err) - } - } else { - atomic.AddUint64(&s.telemetry.totalPayloadsSent, 1) - atomic.AddUint64(&s.telemetry.totalBytesSent, uint64(len(buffer.bytes()))) - } - s.pool.returnBuffer(buffer) -} - -func (s *sender) flushTelemetryMetrics(t *Telemetry) { - t.TotalPayloadsSent = atomic.LoadUint64(&s.telemetry.totalPayloadsSent) - t.TotalPayloadsDroppedQueueFull = atomic.LoadUint64(&s.telemetry.totalPayloadsDroppedQueueFull) - t.TotalPayloadsDroppedWriter = atomic.LoadUint64(&s.telemetry.totalPayloadsDroppedWriter) - - t.TotalBytesSent = atomic.LoadUint64(&s.telemetry.totalBytesSent) - t.TotalBytesDroppedQueueFull = atomic.LoadUint64(&s.telemetry.totalBytesDroppedQueueFull) - t.TotalBytesDroppedWriter = atomic.LoadUint64(&s.telemetry.totalBytesDroppedWriter) -} - -func (s *sender) sendLoop() { - defer close(s.stop) - for { - select { - case buffer := <-s.queue: - s.write(buffer) - case <-s.stop: - return - case <-s.flushSignal: - // At that point we know that the workers are paused (the statsd client - // will pause them before calling sender.flush()). - // So we can fully flush the input queue - s.flushInputQueue() - s.flushSignal <- struct{}{} - } - } -} - -func (s *sender) flushInputQueue() { - for { - select { - case buffer := <-s.queue: - s.write(buffer) - default: - return - } - } -} -func (s *sender) flush() { - s.flushSignal <- struct{}{} - <-s.flushSignal -} - -func (s *sender) close() error { - s.stop <- struct{}{} - <-s.stop - s.flushInputQueue() - return s.transport.Close() -} - -func (s *sender) getTransportName() string { - return s.transport.GetTransportName() -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/service_check.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/service_check.go deleted file mode 100644 index e2850465c2..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/service_check.go +++ /dev/null @@ -1,57 +0,0 @@ -package statsd - -import ( - "fmt" - "time" -) - -// ServiceCheckStatus support -type ServiceCheckStatus byte - -const ( - // Ok is the "ok" ServiceCheck status - Ok ServiceCheckStatus = 0 - // Warn is the "warning" ServiceCheck status - Warn ServiceCheckStatus = 1 - // Critical is the "critical" ServiceCheck status - Critical ServiceCheckStatus = 2 - // Unknown is the "unknown" ServiceCheck status - Unknown ServiceCheckStatus = 3 -) - -// A ServiceCheck is an object that contains status of DataDog service check. -type ServiceCheck struct { - // Name of the service check. Required. - Name string - // Status of service check. Required. - Status ServiceCheckStatus - // Timestamp is a timestamp for the serviceCheck. If not provided, the dogstatsd - // server will set this to the current time. - Timestamp time.Time - // Hostname for the serviceCheck. - Hostname string - // A message describing the current state of the serviceCheck. - Message string - // Tags for the serviceCheck. - Tags []string -} - -// NewServiceCheck creates a new serviceCheck with the given name and status. Error checking -// against these values is done at send-time, or upon running sc.Check. -func NewServiceCheck(name string, status ServiceCheckStatus) *ServiceCheck { - return &ServiceCheck{ - Name: name, - Status: status, - } -} - -// Check verifies that a service check is valid. -func (sc *ServiceCheck) Check() error { - if len(sc.Name) == 0 { - return fmt.Errorf("statsd.ServiceCheck name is required") - } - if byte(sc.Status) < 0 || byte(sc.Status) > 3 { - return fmt.Errorf("statsd.ServiceCheck status has invalid value") - } - return nil -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd.go deleted file mode 100644 index c0137b5233..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd.go +++ /dev/null @@ -1,907 +0,0 @@ -// Copyright 2013 Ooyala, Inc. - -/* -Package statsd provides a Go dogstatsd client. Dogstatsd extends the popular statsd, -adding tags and histograms and pushing upstream to Datadog. - -Refer to http://docs.datadoghq.com/guides/dogstatsd/ for information about DogStatsD. - -statsd is based on go-statsd-client. -*/ -package statsd - -//go:generate mockgen -source=statsd.go -destination=mocks/statsd.go - -import ( - "errors" - "fmt" - "io" - "net/url" - "os" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" -) - -/* -OptimalUDPPayloadSize defines the optimal payload size for a UDP datagram, 1432 bytes -is optimal for regular networks with an MTU of 1500 so datagrams don't get -fragmented. It's generally recommended not to fragment UDP datagrams as losing -a single fragment will cause the entire datagram to be lost. -*/ -const OptimalUDPPayloadSize = 1432 - -/* -MaxUDPPayloadSize defines the maximum payload size for a UDP datagram. -Its value comes from the calculation: 65535 bytes Max UDP datagram size - -8byte UDP header - 60byte max IP headers -any number greater than that will see frames being cut out. -*/ -const MaxUDPPayloadSize = 65467 - -// DefaultUDPBufferPoolSize is the default size of the buffer pool for UDP clients. -const DefaultUDPBufferPoolSize = 2048 - -// DefaultUDSBufferPoolSize is the default size of the buffer pool for UDS clients. -const DefaultUDSBufferPoolSize = 512 - -/* -DefaultMaxAgentPayloadSize is the default maximum payload size the agent -can receive. This can be adjusted by changing dogstatsd_buffer_size in the -agent configuration file datadog.yaml. This is also used as the optimal payload size -for UDS datagrams. -*/ -const DefaultMaxAgentPayloadSize = 8192 - -/* -UnixAddressPrefix holds the prefix to use to enable Unix Domain Socket -traffic instead of UDP. The type of the socket will be guessed. -*/ -const UnixAddressPrefix = "unix://" - -/* -UnixDatagramAddressPrefix holds the prefix to use to enable Unix Domain Socket -datagram traffic instead of UDP. -*/ -const UnixAddressDatagramPrefix = "unixgram://" - -/* -UnixAddressStreamPrefix holds the prefix to use to enable Unix Domain Socket -stream traffic instead of UDP. -*/ -const UnixAddressStreamPrefix = "unixstream://" - -/* -WindowsPipeAddressPrefix holds the prefix to use to enable Windows Named Pipes -traffic instead of UDP. -*/ -const WindowsPipeAddressPrefix = `\\.\pipe\` - -var ( - AddressPrefixes = []string{UnixAddressPrefix, UnixAddressDatagramPrefix, UnixAddressStreamPrefix, WindowsPipeAddressPrefix} -) - -const ( - agentHostEnvVarName = "DD_AGENT_HOST" - agentPortEnvVarName = "DD_DOGSTATSD_PORT" - agentURLEnvVarName = "DD_DOGSTATSD_URL" - defaultUDPPort = "8125" -) - -const ( - // ddEntityID specifies client-side user-specified entity ID injection. - // This env var can be set to the Pod UID on Kubernetes via the downward API. - // Docs: https://docs.datadoghq.com/developers/dogstatsd/?tab=kubernetes#origin-detection-over-udp - ddEntityID = "DD_ENTITY_ID" - - // ddEntityIDTag specifies the tag name for the client-side entity ID injection - // The Agent expects this tag to contain a non-prefixed Kubernetes Pod UID. - ddEntityIDTag = "dd.internal.entity_id" - - // originDetectionEnabled specifies the env var to enable/disable sending the container ID field. - originDetectionEnabled = "DD_ORIGIN_DETECTION_ENABLED" -) - -/* -ddEnvTagsMapping is a mapping of each "DD_" prefixed environment variable -to a specific tag name. We use a slice to keep the order and simplify tests. -*/ -var ddEnvTagsMapping = []struct{ envName, tagName string }{ - {ddEntityID, ddEntityIDTag}, // Client-side entity ID injection for container tagging. - {"DD_ENV", "env"}, // The name of the env in which the service runs. - {"DD_SERVICE", "service"}, // The name of the running service. - {"DD_VERSION", "version"}, // The current version of the running service. -} - -type metricType int - -const ( - gauge metricType = iota - count - histogram - histogramAggregated - distribution - distributionAggregated - set - timing - timingAggregated - event - serviceCheck -) - -type receivingMode int - -const ( - mutexMode receivingMode = iota - channelMode -) - -const ( - writerNameUDP string = "udp" - writerNameUDS string = "uds" - writerNameUDSStream string = "uds-stream" - writerWindowsPipe string = "pipe" - writerNameCustom string = "custom" -) - -// noTimestamp is used as a value for metric without a given timestamp. -const noTimestamp = int64(0) - -type metric struct { - metricType metricType - namespace string - globalTags []string - name string - fvalue float64 - fvalues []float64 - ivalue int64 - svalue string - evalue *Event - scvalue *ServiceCheck - tags []string - stags string - rate float64 - timestamp int64 -} - -type noClientErr string - -// ErrNoClient is returned if statsd reporting methods are invoked on -// a nil client. -const ErrNoClient = noClientErr("statsd client is nil") - -func (e noClientErr) Error() string { - return string(e) -} - -type invalidTimestampErr string - -// InvalidTimestamp is returned if a provided timestamp is invalid. -const InvalidTimestamp = invalidTimestampErr("invalid timestamp") - -func (e invalidTimestampErr) Error() string { - return string(e) -} - -// ClientInterface is an interface that exposes the common client functions for the -// purpose of being able to provide a no-op client or even mocking. This can aid -// downstream users' with their testing. -type ClientInterface interface { - // Gauge measures the value of a metric at a particular time. - Gauge(name string, value float64, tags []string, rate float64) error - - // GaugeWithTimestamp measures the value of a metric at a given time. - // BETA - Please contact our support team for more information to use this feature: https://www.datadoghq.com/support/ - // The value will bypass any aggregation on the client side and agent side, this is - // useful when sending points in the past. - // - // Minimum Datadog Agent version: 7.40.0 - GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error - - // Count tracks how many times something happened per second. - Count(name string, value int64, tags []string, rate float64) error - - // CountWithTimestamp tracks how many times something happened at the given second. - // BETA - Please contact our support team for more information to use this feature: https://www.datadoghq.com/support/ - // The value will bypass any aggregation on the client side and agent side, this is - // useful when sending points in the past. - // - // Minimum Datadog Agent version: 7.40.0 - CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error - - // Histogram tracks the statistical distribution of a set of values on each host. - Histogram(name string, value float64, tags []string, rate float64) error - - // Distribution tracks the statistical distribution of a set of values across your infrastructure. - // - // It is recommended to use `WithMaxBufferedMetricsPerContext` to avoid dropping metrics at high throughput, `rate` can - // also be used to limit the load. Both options can *not* be used together. - Distribution(name string, value float64, tags []string, rate float64) error - - // Decr is just Count of -1 - Decr(name string, tags []string, rate float64) error - - // Incr is just Count of 1 - Incr(name string, tags []string, rate float64) error - - // Set counts the number of unique elements in a group. - Set(name string, value string, tags []string, rate float64) error - - // Timing sends timing information, it is an alias for TimeInMilliseconds - Timing(name string, value time.Duration, tags []string, rate float64) error - - // TimeInMilliseconds sends timing information in milliseconds. - // It is flushed by statsd with percentiles, mean and other info (https://github.com/etsy/statsd/blob/master/docs/metric_types.md#timing) - TimeInMilliseconds(name string, value float64, tags []string, rate float64) error - - // Event sends the provided Event. - Event(e *Event) error - - // SimpleEvent sends an event with the provided title and text. - SimpleEvent(title, text string) error - - // ServiceCheck sends the provided ServiceCheck. - ServiceCheck(sc *ServiceCheck) error - - // SimpleServiceCheck sends an serviceCheck with the provided name and status. - SimpleServiceCheck(name string, status ServiceCheckStatus) error - - // Close the client connection. - Close() error - - // Flush forces a flush of all the queued dogstatsd payloads. - Flush() error - - // IsClosed returns if the client has been closed. - IsClosed() bool - - // GetTelemetry return the telemetry metrics for the client since it started. - GetTelemetry() Telemetry -} - -type ErrorHandler func(error) - -// A Client is a handle for sending messages to dogstatsd. It is safe to -// use one Client from multiple goroutines simultaneously. -type Client struct { - // Sender handles the underlying networking protocol - sender *sender - // namespace to prepend to all statsd calls - namespace string - // tags are global tags to be added to every statsd call - tags []string - flushTime time.Duration - telemetry *statsdTelemetry - telemetryClient *telemetryClient - stop chan struct{} - wg sync.WaitGroup - workers []*worker - closerLock sync.Mutex - workersMode receivingMode - aggregatorMode receivingMode - agg *aggregator - aggExtended *aggregator - options []Option - addrOption string - isClosed bool - errorOnBlockedChannel bool - errorHandler ErrorHandler -} - -// statsdTelemetry contains telemetry metrics about the client -type statsdTelemetry struct { - totalMetricsGauge uint64 - totalMetricsCount uint64 - totalMetricsHistogram uint64 - totalMetricsDistribution uint64 - totalMetricsSet uint64 - totalMetricsTiming uint64 - totalEvents uint64 - totalServiceChecks uint64 - totalDroppedOnReceive uint64 -} - -// Verify that Client implements the ClientInterface. -// https://golang.org/doc/faq#guarantee_satisfies_interface -var _ ClientInterface = &Client{} - -func resolveAddr(addr string) string { - envPort := "" - - if addr == "" { - addr = os.Getenv(agentHostEnvVarName) - envPort = os.Getenv(agentPortEnvVarName) - agentURL, _ := os.LookupEnv(agentURLEnvVarName) - agentURL = parseAgentURL(agentURL) - - // agentURLEnvVarName has priority over agentHostEnvVarName - if agentURL != "" { - return agentURL - } - } - - if addr == "" { - return "" - } - - for _, prefix := range AddressPrefixes { - if strings.HasPrefix(addr, prefix) { - return addr - } - } - // TODO: How does this work for IPv6? - if strings.Contains(addr, ":") { - return addr - } - if envPort != "" { - addr = fmt.Sprintf("%s:%s", addr, envPort) - } else { - addr = fmt.Sprintf("%s:%s", addr, defaultUDPPort) - } - return addr -} - -func parseAgentURL(agentURL string) string { - if agentURL != "" { - if strings.HasPrefix(agentURL, WindowsPipeAddressPrefix) { - return agentURL - } - - parsedURL, err := url.Parse(agentURL) - if err != nil { - return "" - } - - if parsedURL.Scheme == "udp" { - if strings.Contains(parsedURL.Host, ":") { - return parsedURL.Host - } - return fmt.Sprintf("%s:%s", parsedURL.Host, defaultUDPPort) - } - - if parsedURL.Scheme == "unix" { - return agentURL - } - } - return "" -} - -func createWriter(addr string, writeTimeout time.Duration, connectTimeout time.Duration) (Transport, string, error) { - if addr == "" { - return nil, "", errors.New("No address passed and autodetection from environment failed") - } - - switch { - case strings.HasPrefix(addr, WindowsPipeAddressPrefix): - w, err := newWindowsPipeWriter(addr, writeTimeout) - return w, writerWindowsPipe, err - case strings.HasPrefix(addr, UnixAddressPrefix): - w, err := newUDSWriter(addr[len(UnixAddressPrefix):], writeTimeout, connectTimeout, "") - return w, writerNameUDS, err - case strings.HasPrefix(addr, UnixAddressDatagramPrefix): - w, err := newUDSWriter(addr[len(UnixAddressDatagramPrefix):], writeTimeout, connectTimeout, "unixgram") - return w, writerNameUDS, err - case strings.HasPrefix(addr, UnixAddressStreamPrefix): - w, err := newUDSWriter(addr[len(UnixAddressStreamPrefix):], writeTimeout, connectTimeout, "unix") - return w, writerNameUDS, err - default: - w, err := newUDPWriter(addr, writeTimeout) - return w, writerNameUDP, err - } -} - -// New returns a pointer to a new Client given an addr in the format "hostname:port" for UDP, -// "unix:///path/to/socket" for UDS or "\\.\pipe\path\to\pipe" for Windows Named Pipes. -func New(addr string, options ...Option) (*Client, error) { - o, err := resolveOptions(options) - if err != nil { - return nil, err - } - - addr = resolveAddr(addr) - w, writerType, err := createWriter(addr, o.writeTimeout, o.connectTimeout) - if err != nil { - return nil, err - } - - client, err := newWithWriter(w, o, writerType) - if err == nil { - client.options = append(client.options, options...) - client.addrOption = addr - } - return client, err -} - -type customWriter struct { - io.WriteCloser -} - -func (w *customWriter) GetTransportName() string { - return writerNameCustom -} - -// NewWithWriter creates a new Client with given writer. Writer is a -// io.WriteCloser -func NewWithWriter(w io.WriteCloser, options ...Option) (*Client, error) { - o, err := resolveOptions(options) - if err != nil { - return nil, err - } - return newWithWriter(&customWriter{w}, o, writerNameCustom) -} - -// CloneWithExtraOptions create a new Client with extra options -func CloneWithExtraOptions(c *Client, options ...Option) (*Client, error) { - if c == nil { - return nil, ErrNoClient - } - - if c.addrOption == "" { - return nil, fmt.Errorf("can't clone client with no addrOption") - } - opt := append(c.options, options...) - return New(c.addrOption, opt...) -} - -func newWithWriter(w Transport, o *Options, writerName string) (*Client, error) { - c := Client{ - namespace: o.namespace, - tags: o.tags, - telemetry: &statsdTelemetry{}, - errorOnBlockedChannel: o.channelModeErrorsWhenFull, - errorHandler: o.errorHandler, - } - - // Inject values of DD_* environment variables as global tags. - for _, mapping := range ddEnvTagsMapping { - if value := os.Getenv(mapping.envName); value != "" { - c.tags = append(c.tags, fmt.Sprintf("%s:%s", mapping.tagName, value)) - } - } - - initContainerID(o.containerID, isOriginDetectionEnabled(o), isHostCgroupNamespace()) - isUDS := writerName == writerNameUDS - - if o.maxBytesPerPayload == 0 { - if isUDS { - o.maxBytesPerPayload = DefaultMaxAgentPayloadSize - } else { - o.maxBytesPerPayload = OptimalUDPPayloadSize - } - } - if o.bufferPoolSize == 0 { - if isUDS { - o.bufferPoolSize = DefaultUDSBufferPoolSize - } else { - o.bufferPoolSize = DefaultUDPBufferPoolSize - } - } - if o.senderQueueSize == 0 { - if isUDS { - o.senderQueueSize = DefaultUDSBufferPoolSize - } else { - o.senderQueueSize = DefaultUDPBufferPoolSize - } - } - - bufferPool := newBufferPool(o.bufferPoolSize, o.maxBytesPerPayload, o.maxMessagesPerPayload) - c.sender = newSender(w, o.senderQueueSize, bufferPool, o.errorHandler) - c.aggregatorMode = o.receiveMode - - c.workersMode = o.receiveMode - // channelMode mode at the worker level is not enabled when - // ExtendedAggregation is since the user app will not directly - // use the worker (the aggregator sit between the app and the - // workers). - if o.extendedAggregation { - c.workersMode = mutexMode - } - - if o.aggregation || o.extendedAggregation || o.maxBufferedSamplesPerContext > 0 { - c.agg = newAggregator(&c, int64(o.maxBufferedSamplesPerContext)) - c.agg.start(o.aggregationFlushInterval) - - if o.extendedAggregation { - c.aggExtended = c.agg - - if c.aggregatorMode == channelMode { - c.agg.startReceivingMetric(o.channelModeBufferSize, o.workersCount) - } - } - } - - for i := 0; i < o.workersCount; i++ { - w := newWorker(bufferPool, c.sender) - c.workers = append(c.workers, w) - - if c.workersMode == channelMode { - w.startReceivingMetric(o.channelModeBufferSize) - } - } - - c.flushTime = o.bufferFlushInterval - c.stop = make(chan struct{}, 1) - - c.wg.Add(1) - go func() { - defer c.wg.Done() - c.watch() - }() - - if o.telemetry { - if o.telemetryAddr == "" { - c.telemetryClient = newTelemetryClient(&c, c.agg != nil) - } else { - var err error - c.telemetryClient, err = newTelemetryClientWithCustomAddr(&c, o.telemetryAddr, c.agg != nil, bufferPool, o.writeTimeout, o.connectTimeout) - if err != nil { - return nil, err - } - } - c.telemetryClient.run(&c.wg, c.stop) - } - - return &c, nil -} - -func (c *Client) watch() { - ticker := time.NewTicker(c.flushTime) - - for { - select { - case <-ticker.C: - for _, w := range c.workers { - w.flush() - } - case <-c.stop: - ticker.Stop() - return - } - } -} - -// Flush forces a flush of all the queued dogstatsd payloads This method is -// blocking and will not return until everything is sent through the network. -// In mutexMode, this will also block sampling new data to the client while the -// workers and sender are flushed. -func (c *Client) Flush() error { - if c == nil { - return ErrNoClient - } - if c.agg != nil { - c.agg.flush() - } - for _, w := range c.workers { - w.pause() - defer w.unpause() - w.flushUnsafe() - } - // Now that the worker are pause the sender can flush the queue between - // worker and senders - c.sender.flush() - return nil -} - -// IsClosed returns if the client has been closed. -func (c *Client) IsClosed() bool { - c.closerLock.Lock() - defer c.closerLock.Unlock() - return c.isClosed -} - -func (c *Client) flushTelemetryMetrics(t *Telemetry) { - t.TotalMetricsGauge = atomic.LoadUint64(&c.telemetry.totalMetricsGauge) - t.TotalMetricsCount = atomic.LoadUint64(&c.telemetry.totalMetricsCount) - t.TotalMetricsSet = atomic.LoadUint64(&c.telemetry.totalMetricsSet) - t.TotalMetricsHistogram = atomic.LoadUint64(&c.telemetry.totalMetricsHistogram) - t.TotalMetricsDistribution = atomic.LoadUint64(&c.telemetry.totalMetricsDistribution) - t.TotalMetricsTiming = atomic.LoadUint64(&c.telemetry.totalMetricsTiming) - t.TotalEvents = atomic.LoadUint64(&c.telemetry.totalEvents) - t.TotalServiceChecks = atomic.LoadUint64(&c.telemetry.totalServiceChecks) - t.TotalDroppedOnReceive = atomic.LoadUint64(&c.telemetry.totalDroppedOnReceive) -} - -// GetTelemetry return the telemetry metrics for the client since it started. -func (c *Client) GetTelemetry() Telemetry { - return c.telemetryClient.getTelemetry() -} - -// GetTransport return the name of the transport used. -func (c *Client) GetTransport() string { - if c.sender == nil { - return "" - } - return c.sender.getTransportName() -} - -type ErrorInputChannelFull struct { - Metric metric - ChannelSize int - Msg string -} - -func (e ErrorInputChannelFull) Error() string { - return e.Msg -} - -func (c *Client) send(m metric) error { - h := hashString32(m.name) - worker := c.workers[h%uint32(len(c.workers))] - - if c.workersMode == channelMode { - select { - case worker.inputMetrics <- m: - default: - atomic.AddUint64(&c.telemetry.totalDroppedOnReceive, 1) - err := &ErrorInputChannelFull{m, len(worker.inputMetrics), "Worker input channel full"} - if c.errorHandler != nil { - c.errorHandler(err) - } - if c.errorOnBlockedChannel { - return err - } - } - return nil - } - return worker.processMetric(m) -} - -// sendBlocking is used by the aggregator to inject aggregated metrics. -func (c *Client) sendBlocking(m metric) error { - m.globalTags = c.tags - m.namespace = c.namespace - - h := hashString32(m.name) - worker := c.workers[h%uint32(len(c.workers))] - return worker.processMetric(m) -} - -func (c *Client) sendToAggregator(mType metricType, name string, value float64, tags []string, rate float64, f bufferedMetricSampleFunc) error { - if c.aggregatorMode == channelMode { - m := metric{metricType: mType, name: name, fvalue: value, tags: tags, rate: rate} - select { - case c.aggExtended.inputMetrics <- m: - default: - atomic.AddUint64(&c.telemetry.totalDroppedOnReceive, 1) - err := &ErrorInputChannelFull{m, len(c.aggExtended.inputMetrics), "Aggregator input channel full"} - if c.errorHandler != nil { - c.errorHandler(err) - } - if c.errorOnBlockedChannel { - return err - } - } - return nil - } - return f(name, value, tags, rate) -} - -// Gauge measures the value of a metric at a particular time. -func (c *Client) Gauge(name string, value float64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsGauge, 1) - if c.agg != nil { - return c.agg.gauge(name, value, tags) - } - return c.send(metric{metricType: gauge, name: name, fvalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// GaugeWithTimestamp measures the value of a metric at a given time. -// BETA - Please contact our support team for more information to use this feature: https://www.datadoghq.com/support/ -// The value will bypass any aggregation on the client side and agent side, this is -// useful when sending points in the past. -// -// Minimum Datadog Agent version: 7.40.0 -func (c *Client) GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error { - if c == nil { - return ErrNoClient - } - - if timestamp.IsZero() || timestamp.Unix() <= noTimestamp { - return InvalidTimestamp - } - - atomic.AddUint64(&c.telemetry.totalMetricsGauge, 1) - return c.send(metric{metricType: gauge, name: name, fvalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace, timestamp: timestamp.Unix()}) -} - -// Count tracks how many times something happened per second. -func (c *Client) Count(name string, value int64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsCount, 1) - if c.agg != nil { - return c.agg.count(name, value, tags) - } - return c.send(metric{metricType: count, name: name, ivalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// CountWithTimestamp tracks how many times something happened at the given second. -// BETA - Please contact our support team for more information to use this feature: https://www.datadoghq.com/support/ -// The value will bypass any aggregation on the client side and agent side, this is -// useful when sending points in the past. -// -// Minimum Datadog Agent version: 7.40.0 -func (c *Client) CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error { - if c == nil { - return ErrNoClient - } - - if timestamp.IsZero() || timestamp.Unix() <= noTimestamp { - return InvalidTimestamp - } - - atomic.AddUint64(&c.telemetry.totalMetricsCount, 1) - return c.send(metric{metricType: count, name: name, ivalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace, timestamp: timestamp.Unix()}) -} - -// Histogram tracks the statistical distribution of a set of values on each host. -func (c *Client) Histogram(name string, value float64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsHistogram, 1) - if c.aggExtended != nil { - return c.sendToAggregator(histogram, name, value, tags, rate, c.aggExtended.histogram) - } - return c.send(metric{metricType: histogram, name: name, fvalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// Distribution tracks the statistical distribution of a set of values across your infrastructure. -func (c *Client) Distribution(name string, value float64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsDistribution, 1) - if c.aggExtended != nil { - return c.sendToAggregator(distribution, name, value, tags, rate, c.aggExtended.distribution) - } - return c.send(metric{metricType: distribution, name: name, fvalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// Decr is just Count of -1 -func (c *Client) Decr(name string, tags []string, rate float64) error { - return c.Count(name, -1, tags, rate) -} - -// Incr is just Count of 1 -func (c *Client) Incr(name string, tags []string, rate float64) error { - return c.Count(name, 1, tags, rate) -} - -// Set counts the number of unique elements in a group. -func (c *Client) Set(name string, value string, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsSet, 1) - if c.agg != nil { - return c.agg.set(name, value, tags) - } - return c.send(metric{metricType: set, name: name, svalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// Timing sends timing information, it is an alias for TimeInMilliseconds -func (c *Client) Timing(name string, value time.Duration, tags []string, rate float64) error { - return c.TimeInMilliseconds(name, value.Seconds()*1000, tags, rate) -} - -// TimeInMilliseconds sends timing information in milliseconds. -// It is flushed by statsd with percentiles, mean and other info (https://github.com/etsy/statsd/blob/master/docs/metric_types.md#timing) -func (c *Client) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsTiming, 1) - if c.aggExtended != nil { - return c.sendToAggregator(timing, name, value, tags, rate, c.aggExtended.timing) - } - return c.send(metric{metricType: timing, name: name, fvalue: value, tags: tags, rate: rate, globalTags: c.tags, namespace: c.namespace}) -} - -// Event sends the provided Event. -func (c *Client) Event(e *Event) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalEvents, 1) - return c.send(metric{metricType: event, evalue: e, rate: 1, globalTags: c.tags, namespace: c.namespace}) -} - -// SimpleEvent sends an event with the provided title and text. -func (c *Client) SimpleEvent(title, text string) error { - e := NewEvent(title, text) - return c.Event(e) -} - -// ServiceCheck sends the provided ServiceCheck. -func (c *Client) ServiceCheck(sc *ServiceCheck) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalServiceChecks, 1) - return c.send(metric{metricType: serviceCheck, scvalue: sc, rate: 1, globalTags: c.tags, namespace: c.namespace}) -} - -// SimpleServiceCheck sends an serviceCheck with the provided name and status. -func (c *Client) SimpleServiceCheck(name string, status ServiceCheckStatus) error { - sc := NewServiceCheck(name, status) - return c.ServiceCheck(sc) -} - -// Close the client connection. -func (c *Client) Close() error { - if c == nil { - return ErrNoClient - } - - // Acquire closer lock to ensure only one thread can close the stop channel - c.closerLock.Lock() - defer c.closerLock.Unlock() - - if c.isClosed { - return nil - } - - // Notify all other threads that they should stop - select { - case <-c.stop: - return nil - default: - } - close(c.stop) - - if c.workersMode == channelMode { - for _, w := range c.workers { - w.stopReceivingMetric() - } - } - - // flush the aggregator first - if c.agg != nil { - if c.aggExtended != nil && c.aggregatorMode == channelMode { - c.agg.stopReceivingMetric() - } - c.agg.stop() - } - - // Wait for the threads to stop - c.wg.Wait() - - c.Flush() - - c.isClosed = true - return c.sender.close() -} - -// isOriginDetectionEnabled returns whether the clients should fill the container field. -// -// Disable origin detection only in one of the following cases: -// - DD_ORIGIN_DETECTION_ENABLED is explicitly set to false -// - o.originDetection is explicitly set to false, which is true by default -func isOriginDetectionEnabled(o *Options) bool { - if !o.originDetection || o.containerID != "" { - return false - } - - envVarValue := os.Getenv(originDetectionEnabled) - if envVarValue == "" { - // DD_ORIGIN_DETECTION_ENABLED is not set - // default to true - return true - } - - enabled, err := strconv.ParseBool(envVarValue) - if err != nil { - // Error due to an unsupported DD_ORIGIN_DETECTION_ENABLED value - // default to true - return true - } - - return enabled -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd_direct.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd_direct.go deleted file mode 100644 index af66517cbf..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/statsd_direct.go +++ /dev/null @@ -1,69 +0,0 @@ -package statsd - -import ( - "io" - "strings" - "sync/atomic" -) - -type ClientDirectInterface interface { - DistributionSamples(name string, values []float64, tags []string, rate float64) error -} - -// ClientDirect is an *experimental* statsd client that gives direct access to some dogstatsd features. -// -// It is not recommended to use this client in production. This client might allow you to take advantage of -// new features in the agent before they are released, but it might also break your application. -type ClientDirect struct { - *Client -} - -// NewDirect returns a pointer to a new ClientDirect given an addr in the format "hostname:port" for UDP, -// "unix:///path/to/socket" for UDS or "\\.\pipe\path\to\pipe" for Windows Named Pipes. -func NewDirect(addr string, options ...Option) (*ClientDirect, error) { - client, err := New(addr, options...) - if err != nil { - return nil, err - } - return &ClientDirect{ - client, - }, nil -} - -func NewDirectWithWriter(writer io.WriteCloser, options ...Option) (*ClientDirect, error) { - client, err := NewWithWriter(writer, options...) - if err != nil { - return nil, err - } - return &ClientDirect{ - client, - }, nil -} - -// DistributionSamples is similar to Distribution, but it lets the client deals with the sampling. -// -// The provided `rate` is the sampling rate applied by the client and will *not* be used to apply further -// sampling. This is recommended in high performance cases were the overhead of the statsd library might be -// significant and the sampling is already done by the client. -// -// `WithMaxBufferedMetricsPerContext` is ignored when using this method. -func (c *ClientDirect) DistributionSamples(name string, values []float64, tags []string, rate float64) error { - if c == nil { - return ErrNoClient - } - atomic.AddUint64(&c.telemetry.totalMetricsDistribution, uint64(len(values))) - return c.send(metric{ - metricType: distributionAggregated, - name: name, - fvalues: values, - tags: tags, - stags: strings.Join(tags, tagSeparatorSymbol), - rate: rate, - globalTags: c.tags, - namespace: c.namespace, - }) -} - -// Validate that ClientDirect implements ClientDirectInterface and ClientInterface. -var _ ClientDirectInterface = (*ClientDirect)(nil) -var _ ClientInterface = (*ClientDirect)(nil) diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/telemetry.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/telemetry.go deleted file mode 100644 index feda764b58..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/telemetry.go +++ /dev/null @@ -1,307 +0,0 @@ -package statsd - -import ( - "fmt" - "sync" - "time" -) - -/* -telemetryInterval is the interval at which telemetry will be sent by the client. -*/ -const telemetryInterval = 10 * time.Second - -/* -clientTelemetryTag is a tag identifying this specific client. -*/ -var clientTelemetryTag = "client:go" - -/* -clientVersionTelemetryTag is a tag identifying this specific client version. -*/ -var clientVersionTelemetryTag = "client_version:5.4.0" - -// Telemetry represents internal metrics about the client behavior since it started. -type Telemetry struct { - // - // Those are produced by the 'Client' - // - - // TotalMetrics is the total number of metrics sent by the client before aggregation and sampling. - TotalMetrics uint64 - // TotalMetricsGauge is the total number of gauges sent by the client before aggregation and sampling. - TotalMetricsGauge uint64 - // TotalMetricsCount is the total number of counts sent by the client before aggregation and sampling. - TotalMetricsCount uint64 - // TotalMetricsHistogram is the total number of histograms sent by the client before aggregation and sampling. - TotalMetricsHistogram uint64 - // TotalMetricsDistribution is the total number of distributions sent by the client before aggregation and - // sampling. - TotalMetricsDistribution uint64 - // TotalMetricsSet is the total number of sets sent by the client before aggregation and sampling. - TotalMetricsSet uint64 - // TotalMetricsTiming is the total number of timings sent by the client before aggregation and sampling. - TotalMetricsTiming uint64 - // TotalEvents is the total number of events sent by the client before aggregation and sampling. - TotalEvents uint64 - // TotalServiceChecks is the total number of service_checks sent by the client before aggregation and sampling. - TotalServiceChecks uint64 - - // TotalDroppedOnReceive is the total number metrics/event/service_checks dropped when using ChannelMode (see - // WithChannelMode option). - TotalDroppedOnReceive uint64 - - // - // Those are produced by the 'sender' - // - - // TotalPayloadsSent is the total number of payload (packet on the network) succesfully sent by the client. When - // using UDP we don't know if packet dropped or not, so all packet are considered as succesfully sent. - TotalPayloadsSent uint64 - // TotalPayloadsDropped is the total number of payload dropped by the client. This includes all cause of dropped - // (TotalPayloadsDroppedQueueFull and TotalPayloadsDroppedWriter). When using UDP This won't includes the - // network dropped. - TotalPayloadsDropped uint64 - // TotalPayloadsDroppedWriter is the total number of payload dropped by the writer (when using UDS or named - // pipe) due to network timeout or error. - TotalPayloadsDroppedWriter uint64 - // TotalPayloadsDroppedQueueFull is the total number of payload dropped internally because the queue of payloads - // waiting to be sent on the wire is full. This means the client is generating more metrics than can be sent on - // the wire. If your app sends metrics in batch look at WithSenderQueueSize option to increase the queue size. - TotalPayloadsDroppedQueueFull uint64 - - // TotalBytesSent is the total number of bytes succesfully sent by the client. When using UDP we don't know if - // packet dropped or not, so all packet are considered as succesfully sent. - TotalBytesSent uint64 - // TotalBytesDropped is the total number of bytes dropped by the client. This includes all cause of dropped - // (TotalBytesDroppedQueueFull and TotalBytesDroppedWriter). When using UDP This - // won't includes the network dropped. - TotalBytesDropped uint64 - // TotalBytesDroppedWriter is the total number of bytes dropped by the writer (when using UDS or named pipe) due - // to network timeout or error. - TotalBytesDroppedWriter uint64 - // TotalBytesDroppedQueueFull is the total number of bytes dropped internally because the queue of payloads - // waiting to be sent on the wire is full. This means the client is generating more metrics than can be sent on - // the wire. If your app sends metrics in batch look at WithSenderQueueSize option to increase the queue size. - TotalBytesDroppedQueueFull uint64 - - // - // Those are produced by the 'aggregator' - // - - // AggregationNbContext is the total number of contexts flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContext uint64 - // AggregationNbContextGauge is the total number of contexts for gauges flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextGauge uint64 - // AggregationNbContextCount is the total number of contexts for counts flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextCount uint64 - // AggregationNbContextSet is the total number of contexts for sets flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextSet uint64 - // AggregationNbContextHistogram is the total number of contexts for histograms flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextHistogram uint64 - // AggregationNbContextDistribution is the total number of contexts for distributions flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextDistribution uint64 - // AggregationNbContextTiming is the total number of contexts for timings flushed by the aggregator when either - // WithClientSideAggregation or WithExtendedClientSideAggregation options are enabled. - AggregationNbContextTiming uint64 -} - -type telemetryClient struct { - sync.RWMutex // used mostly to change the transport tag. - - c *Client - aggEnabled bool // is aggregation enabled and should we sent aggregation telemetry. - transport string - tags []string - tagsByType map[metricType][]string - transportTagKnown bool - sender *sender - worker *worker - lastSample Telemetry // The previous sample of telemetry sent -} - -func newTelemetryClient(c *Client, aggregationEnabled bool) *telemetryClient { - t := &telemetryClient{ - c: c, - aggEnabled: aggregationEnabled, - tags: []string{}, - tagsByType: map[metricType][]string{}, - } - - t.setTags() - return t -} - -func newTelemetryClientWithCustomAddr(c *Client, telemetryAddr string, aggregationEnabled bool, pool *bufferPool, - writeTimeout time.Duration, connectTimeout time.Duration, -) (*telemetryClient, error) { - telemetryAddr = resolveAddr(telemetryAddr) - telemetryWriter, _, err := createWriter(telemetryAddr, writeTimeout, connectTimeout) - if err != nil { - return nil, fmt.Errorf("Could not resolve telemetry address: %v", err) - } - - t := newTelemetryClient(c, aggregationEnabled) - - // Creating a custom sender/worker with 1 worker in mutex mode for the - // telemetry that share the same bufferPool. - // FIXME due to performance pitfall, we're always using UDP defaults - // even for UDS. - t.sender = newSender(telemetryWriter, DefaultUDPBufferPoolSize, pool, c.errorHandler) - t.worker = newWorker(pool, t.sender) - return t, nil -} - -func (t *telemetryClient) run(wg *sync.WaitGroup, stop chan struct{}) { - wg.Add(1) - go func() { - defer wg.Done() - ticker := time.NewTicker(telemetryInterval) - for { - select { - case <-ticker.C: - t.sendTelemetry() - case <-stop: - ticker.Stop() - if t.sender != nil { - t.sender.close() - } - return - } - } - }() -} - -func (t *telemetryClient) sendTelemetry() { - for _, m := range t.flush() { - if t.worker != nil { - t.worker.processMetric(m) - } else { - t.c.send(m) - } - } - - if t.worker != nil { - t.worker.flush() - } -} - -func (t *telemetryClient) getTelemetry() Telemetry { - if t == nil { - // telemetry was disabled through the WithoutTelemetry option - return Telemetry{} - } - - tlm := Telemetry{} - t.c.flushTelemetryMetrics(&tlm) - t.c.sender.flushTelemetryMetrics(&tlm) - t.c.agg.flushTelemetryMetrics(&tlm) - - tlm.TotalMetrics = tlm.TotalMetricsGauge + - tlm.TotalMetricsCount + - tlm.TotalMetricsSet + - tlm.TotalMetricsHistogram + - tlm.TotalMetricsDistribution + - tlm.TotalMetricsTiming - - tlm.TotalPayloadsDropped = tlm.TotalPayloadsDroppedQueueFull + tlm.TotalPayloadsDroppedWriter - tlm.TotalBytesDropped = tlm.TotalBytesDroppedQueueFull + tlm.TotalBytesDroppedWriter - - if t.aggEnabled { - tlm.AggregationNbContext = tlm.AggregationNbContextGauge + - tlm.AggregationNbContextCount + - tlm.AggregationNbContextSet + - tlm.AggregationNbContextHistogram + - tlm.AggregationNbContextDistribution + - tlm.AggregationNbContextTiming - } - return tlm -} - -// setTransportTag if it was never set and is now known. -func (t *telemetryClient) setTags() { - transport := t.c.GetTransport() - t.RLock() - // We need to refresh if we never set the tags or if the transport changed. - // For example when `unix://` is used we might return `uds` until we actually connect and detect that - // this is a UDS Stream socket and then return `uds-stream`. - needsRefresh := len(t.tags) == len(t.c.tags) || t.transport != transport - t.RUnlock() - - if !needsRefresh { - return - } - - t.Lock() - defer t.Unlock() - - t.transport = transport - t.tags = append(t.c.tags, clientTelemetryTag, clientVersionTelemetryTag) - if transport != "" { - t.tags = append(t.tags, "client_transport:"+transport) - } - t.tagsByType[gauge] = append(append([]string{}, t.tags...), "metrics_type:gauge") - t.tagsByType[count] = append(append([]string{}, t.tags...), "metrics_type:count") - t.tagsByType[set] = append(append([]string{}, t.tags...), "metrics_type:set") - t.tagsByType[timing] = append(append([]string{}, t.tags...), "metrics_type:timing") - t.tagsByType[histogram] = append(append([]string{}, t.tags...), "metrics_type:histogram") - t.tagsByType[distribution] = append(append([]string{}, t.tags...), "metrics_type:distribution") -} - -// flushTelemetry returns Telemetry metrics to be flushed. It's its own function to ease testing. -func (t *telemetryClient) flush() []metric { - m := []metric{} - - // same as Count but without global namespace - telemetryCount := func(name string, value int64, tags []string) { - m = append(m, metric{metricType: count, name: name, ivalue: value, tags: tags, rate: 1}) - } - - tlm := t.getTelemetry() - t.setTags() - - // We send the diff between now and the previous telemetry flush. This keep the same telemetry behavior from V4 - // so users dashboard's aren't broken when upgrading to V5. It also allow to graph on the same dashboard a mix - // of V4 and V5 apps. - telemetryCount("datadog.dogstatsd.client.metrics", int64(tlm.TotalMetrics-t.lastSample.TotalMetrics), t.tags) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsGauge-t.lastSample.TotalMetricsGauge), t.tagsByType[gauge]) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsCount-t.lastSample.TotalMetricsCount), t.tagsByType[count]) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsHistogram-t.lastSample.TotalMetricsHistogram), t.tagsByType[histogram]) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsDistribution-t.lastSample.TotalMetricsDistribution), t.tagsByType[distribution]) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsSet-t.lastSample.TotalMetricsSet), t.tagsByType[set]) - telemetryCount("datadog.dogstatsd.client.metrics_by_type", int64(tlm.TotalMetricsTiming-t.lastSample.TotalMetricsTiming), t.tagsByType[timing]) - telemetryCount("datadog.dogstatsd.client.events", int64(tlm.TotalEvents-t.lastSample.TotalEvents), t.tags) - telemetryCount("datadog.dogstatsd.client.service_checks", int64(tlm.TotalServiceChecks-t.lastSample.TotalServiceChecks), t.tags) - - telemetryCount("datadog.dogstatsd.client.metric_dropped_on_receive", int64(tlm.TotalDroppedOnReceive-t.lastSample.TotalDroppedOnReceive), t.tags) - - telemetryCount("datadog.dogstatsd.client.packets_sent", int64(tlm.TotalPayloadsSent-t.lastSample.TotalPayloadsSent), t.tags) - telemetryCount("datadog.dogstatsd.client.packets_dropped", int64(tlm.TotalPayloadsDropped-t.lastSample.TotalPayloadsDropped), t.tags) - telemetryCount("datadog.dogstatsd.client.packets_dropped_queue", int64(tlm.TotalPayloadsDroppedQueueFull-t.lastSample.TotalPayloadsDroppedQueueFull), t.tags) - telemetryCount("datadog.dogstatsd.client.packets_dropped_writer", int64(tlm.TotalPayloadsDroppedWriter-t.lastSample.TotalPayloadsDroppedWriter), t.tags) - - telemetryCount("datadog.dogstatsd.client.bytes_dropped", int64(tlm.TotalBytesDropped-t.lastSample.TotalBytesDropped), t.tags) - telemetryCount("datadog.dogstatsd.client.bytes_sent", int64(tlm.TotalBytesSent-t.lastSample.TotalBytesSent), t.tags) - telemetryCount("datadog.dogstatsd.client.bytes_dropped_queue", int64(tlm.TotalBytesDroppedQueueFull-t.lastSample.TotalBytesDroppedQueueFull), t.tags) - telemetryCount("datadog.dogstatsd.client.bytes_dropped_writer", int64(tlm.TotalBytesDroppedWriter-t.lastSample.TotalBytesDroppedWriter), t.tags) - - if t.aggEnabled { - telemetryCount("datadog.dogstatsd.client.aggregated_context", int64(tlm.AggregationNbContext-t.lastSample.AggregationNbContext), t.tags) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextGauge-t.lastSample.AggregationNbContextGauge), t.tagsByType[gauge]) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextSet-t.lastSample.AggregationNbContextSet), t.tagsByType[set]) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextCount-t.lastSample.AggregationNbContextCount), t.tagsByType[count]) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextHistogram-t.lastSample.AggregationNbContextHistogram), t.tagsByType[histogram]) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextDistribution-t.lastSample.AggregationNbContextDistribution), t.tagsByType[distribution]) - telemetryCount("datadog.dogstatsd.client.aggregated_context_by_type", int64(tlm.AggregationNbContextTiming-t.lastSample.AggregationNbContextTiming), t.tagsByType[timing]) - } - - t.lastSample = tlm - - return m -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/udp.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/udp.go deleted file mode 100644 index b90f752792..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/udp.go +++ /dev/null @@ -1,39 +0,0 @@ -package statsd - -import ( - "net" - "time" -) - -// udpWriter is an internal class wrapping around management of UDP connection -type udpWriter struct { - conn net.Conn -} - -// New returns a pointer to a new udpWriter given an addr in the format "hostname:port". -func newUDPWriter(addr string, _ time.Duration) (*udpWriter, error) { - udpAddr, err := net.ResolveUDPAddr("udp", addr) - if err != nil { - return nil, err - } - conn, err := net.DialUDP("udp", nil, udpAddr) - if err != nil { - return nil, err - } - writer := &udpWriter{conn: conn} - return writer, nil -} - -// Write data to the UDP connection with no error handling -func (w *udpWriter) Write(data []byte) (int, error) { - return w.conn.Write(data) -} - -func (w *udpWriter) Close() error { - return w.conn.Close() -} - -// GetTransportName returns the transport used by the sender -func (w *udpWriter) GetTransportName() string { - return writerNameUDP -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/uds.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/uds.go deleted file mode 100644 index 09518992ab..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/uds.go +++ /dev/null @@ -1,167 +0,0 @@ -//go:build !windows -// +build !windows - -package statsd - -import ( - "encoding/binary" - "net" - "strings" - "sync" - "time" -) - -// udsWriter is an internal class wrapping around management of UDS connection -type udsWriter struct { - // Address to send metrics to, needed to allow reconnection on error - addr string - // Transport used - transport string - // Established connection object, or nil if not connected yet - conn net.Conn - // write timeout - writeTimeout time.Duration - // connect timeout - connectTimeout time.Duration - sync.RWMutex // used to lock conn / writer can replace it -} - -// newUDSWriter returns a pointer to a new udsWriter given a socket file path as addr. -func newUDSWriter(addr string, writeTimeout time.Duration, connectTimeout time.Duration, transport string) (*udsWriter, error) { - // Defer connection to first Write - writer := &udsWriter{addr: addr, transport: transport, conn: nil, writeTimeout: writeTimeout, connectTimeout: connectTimeout} - return writer, nil -} - -// GetTransportName returns the transport used by the writer -func (w *udsWriter) GetTransportName() string { - w.RLock() - defer w.RUnlock() - - if w.transport == "unix" { - return writerNameUDSStream - } else { - return writerNameUDS - } -} - -func (w *udsWriter) shouldCloseConnection(err error, partialWrite bool) bool { - if err != nil && partialWrite { - // We can't recover from a partial write - return true - } - if err, isNetworkErr := err.(net.Error); err != nil && (!isNetworkErr || !err.Timeout()) { - // Statsd server disconnected, retry connecting at next packet - return true - } - return false -} - -// Write data to the UDS connection with write timeout and minimal error handling: -// create the connection if nil, and destroy it if the statsd server has disconnected -func (w *udsWriter) Write(data []byte) (int, error) { - var n int - partialWrite := false - conn, err := w.ensureConnection() - if err != nil { - return 0, err - } - stream := conn.LocalAddr().Network() == "unix" - - // When using streams the deadline will only make us drop the packet if we can't write it at all, - // once we've started writing we need to finish. - conn.SetWriteDeadline(time.Now().Add(w.writeTimeout)) - - // When using streams, we append the length of the packet to the data - if stream { - bs := []byte{0, 0, 0, 0} - binary.LittleEndian.PutUint32(bs, uint32(len(data))) - _, err = w.conn.Write(bs) - - partialWrite = true - - // W need to be able to finish to write partially written packets once we have started. - // But we will reset the connection if we can't write anything at all for a long time. - w.conn.SetWriteDeadline(time.Now().Add(w.connectTimeout)) - - // Continue writing only if we've written the length of the packet - if err == nil { - n, err = w.conn.Write(data) - if err == nil { - partialWrite = false - } - } - } else { - n, err = w.conn.Write(data) - } - - if w.shouldCloseConnection(err, partialWrite) { - w.unsetConnection() - } - return n, err -} - -func (w *udsWriter) Close() error { - if w.conn != nil { - return w.conn.Close() - } - return nil -} - -func (w *udsWriter) tryToDial(network string) (net.Conn, error) { - udsAddr, err := net.ResolveUnixAddr(network, w.addr) - if err != nil { - return nil, err - } - newConn, err := net.DialTimeout(udsAddr.Network(), udsAddr.String(), w.connectTimeout) - if err != nil { - return nil, err - } - return newConn, nil -} - -func (w *udsWriter) ensureConnection() (net.Conn, error) { - // Check if we've already got a socket we can use - w.RLock() - currentConn := w.conn - w.RUnlock() - - if currentConn != nil { - return currentConn, nil - } - - // Looks like we might need to connect - try again with write locking. - w.Lock() - defer w.Unlock() - if w.conn != nil { - return w.conn, nil - } - - var newConn net.Conn - var err error - - // Try to guess the transport if not specified. - if w.transport == "" { - newConn, err = w.tryToDial("unixgram") - // try to connect with unixgram failed, try again with unix streams. - if err != nil && strings.Contains(err.Error(), "protocol wrong type for socket") { - newConn, err = w.tryToDial("unix") - } - } else { - newConn, err = w.tryToDial(w.transport) - } - - if err != nil { - return nil, err - } - w.conn = newConn - w.transport = newConn.RemoteAddr().Network() - return newConn, nil -} - -func (w *udsWriter) unsetConnection() { - w.Lock() - defer w.Unlock() - _ = w.conn.Close() - w.conn = nil -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/uds_windows.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/uds_windows.go deleted file mode 100644 index 909f5a0a02..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/uds_windows.go +++ /dev/null @@ -1,15 +0,0 @@ -//go:build windows -// +build windows - -package statsd - -import ( - "fmt" - "time" -) - -// newUDSWriter is disabled on Windows, SOCK_DGRAM are still unavailable but -// SOCK_STREAM should work once implemented in the agent (https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/) -func newUDSWriter(_ string, _ time.Duration, _ time.Duration, _ string) (Transport, error) { - return nil, fmt.Errorf("Unix socket is not available on Windows") -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/utils.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/utils.go deleted file mode 100644 index 8c3ac84268..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/utils.go +++ /dev/null @@ -1,32 +0,0 @@ -package statsd - -import ( - "math/rand" - "sync" -) - -func shouldSample(rate float64, r *rand.Rand, lock *sync.Mutex) bool { - if rate >= 1 { - return true - } - // sources created by rand.NewSource() (ie. w.random) are not thread safe. - // TODO: use defer once the lowest Go version we support is 1.14 (defer - // has an overhead before that). - lock.Lock() - if r.Float64() > rate { - lock.Unlock() - return false - } - lock.Unlock() - return true -} - -func copySlice(src []string) []string { - if src == nil { - return nil - } - - c := make([]string, len(src)) - copy(c, src) - return c -} diff --git a/vendor/github.com/DataDog/datadog-go/v5/statsd/worker.go b/vendor/github.com/DataDog/datadog-go/v5/statsd/worker.go deleted file mode 100644 index 19dccd3398..0000000000 --- a/vendor/github.com/DataDog/datadog-go/v5/statsd/worker.go +++ /dev/null @@ -1,158 +0,0 @@ -package statsd - -import ( - "math/rand" - "sync" - "time" -) - -type worker struct { - pool *bufferPool - buffer *statsdBuffer - sender *sender - random *rand.Rand - randomLock sync.Mutex - sync.Mutex - - inputMetrics chan metric - stop chan struct{} -} - -func newWorker(pool *bufferPool, sender *sender) *worker { - // Each worker uses its own random source and random lock to prevent - // workers in separate goroutines from contending for the lock on the - // "math/rand" package-global random source (e.g. calls like - // "rand.Float64()" must acquire a shared lock to get the next - // pseudorandom number). - // Note that calling "time.Now().UnixNano()" repeatedly quickly may return - // very similar values. That's fine for seeding the worker-specific random - // source because we just need an evenly distributed stream of float values. - // Do not use this random source for cryptographic randomness. - random := rand.New(rand.NewSource(time.Now().UnixNano())) - return &worker{ - pool: pool, - sender: sender, - buffer: pool.borrowBuffer(), - random: random, - stop: make(chan struct{}), - } -} - -func (w *worker) startReceivingMetric(bufferSize int) { - w.inputMetrics = make(chan metric, bufferSize) - go w.pullMetric() -} - -func (w *worker) stopReceivingMetric() { - w.stop <- struct{}{} -} - -func (w *worker) pullMetric() { - for { - select { - case m := <-w.inputMetrics: - w.processMetric(m) - case <-w.stop: - return - } - } -} - -func (w *worker) processMetric(m metric) error { - // Aggregated metrics are already sampled. - if m.metricType != distributionAggregated && m.metricType != histogramAggregated && m.metricType != timingAggregated { - if !shouldSample(m.rate, w.random, &w.randomLock) { - return nil - } - } - w.Lock() - var err error - if err = w.writeMetricUnsafe(m); err == errBufferFull { - w.flushUnsafe() - err = w.writeMetricUnsafe(m) - } - w.Unlock() - return err -} - -func (w *worker) writeAggregatedMetricUnsafe(m metric, metricSymbol []byte, precision int, rate float64) error { - globalPos := 0 - - // first check how much data we can write to the buffer: - // +3 + len(metricSymbol) because the message will include '||#' before the tags - // +1 for the potential line break at the start of the metric - extraSize := len(m.stags) + 4 + len(metricSymbol) - if m.rate < 1 { - // +2 for "|@" - // + the maximum size of a rate (https://en.wikipedia.org/wiki/IEEE_754-1985) - extraSize += 2 + 18 - } - for _, t := range m.globalTags { - extraSize += len(t) + 1 - } - - for { - pos, err := w.buffer.writeAggregated(metricSymbol, m.namespace, m.globalTags, m.name, m.fvalues[globalPos:], m.stags, extraSize, precision, rate) - if err == errPartialWrite { - // We successfully wrote part of the histogram metrics. - // We flush the current buffer and finish the histogram - // in a new one. - w.flushUnsafe() - globalPos += pos - } else { - return err - } - } -} - -func (w *worker) writeMetricUnsafe(m metric) error { - switch m.metricType { - case gauge: - return w.buffer.writeGauge(m.namespace, m.globalTags, m.name, m.fvalue, m.tags, m.rate, m.timestamp) - case count: - return w.buffer.writeCount(m.namespace, m.globalTags, m.name, m.ivalue, m.tags, m.rate, m.timestamp) - case histogram: - return w.buffer.writeHistogram(m.namespace, m.globalTags, m.name, m.fvalue, m.tags, m.rate) - case distribution: - return w.buffer.writeDistribution(m.namespace, m.globalTags, m.name, m.fvalue, m.tags, m.rate) - case set: - return w.buffer.writeSet(m.namespace, m.globalTags, m.name, m.svalue, m.tags, m.rate) - case timing: - return w.buffer.writeTiming(m.namespace, m.globalTags, m.name, m.fvalue, m.tags, m.rate) - case event: - return w.buffer.writeEvent(m.evalue, m.globalTags) - case serviceCheck: - return w.buffer.writeServiceCheck(m.scvalue, m.globalTags) - case histogramAggregated: - return w.writeAggregatedMetricUnsafe(m, histogramSymbol, -1, m.rate) - case distributionAggregated: - return w.writeAggregatedMetricUnsafe(m, distributionSymbol, -1, m.rate) - case timingAggregated: - return w.writeAggregatedMetricUnsafe(m, timingSymbol, 6, m.rate) - default: - return nil - } -} - -func (w *worker) flush() { - w.Lock() - w.flushUnsafe() - w.Unlock() -} - -func (w *worker) pause() { - w.Lock() -} - -func (w *worker) unpause() { - w.Unlock() -} - -// flush the current buffer. Lock must be held by caller. -// flushed buffer written to the network asynchronously. -func (w *worker) flushUnsafe() { - if len(w.buffer.bytes()) > 0 { - w.sender.send(w.buffer) - w.buffer = w.pool.borrowBuffer() - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE b/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE deleted file mode 100644 index f760d366c6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE +++ /dev/null @@ -1,234 +0,0 @@ -## License - -This work is dual-licensed under Apache 2.0 or BSD3. -You may select, at your option, one of the above-listed licenses. - -`SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause` - - 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 - - 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 2016 Datadog, Inc. - 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. - ---- - -Copyright (c) 2016-Present, Datadog -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 Datadog 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 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/DataDog/dd-trace-go/v2/LICENSE-3rdparty.csv b/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-3rdparty.csv deleted file mode 100644 index 1b6a22fa8b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-3rdparty.csv +++ /dev/null @@ -1,4 +0,0 @@ -Component,Origin,License,Copyright -import,io.opentracing,Apache-2.0,Copyright 2016-2017 The OpenTracing Authors -appsec,https://github.com/DataDog/libddwaf,Apache-2.0 OR BSD-3-Clause,Copyright (c) 2021 Datadog -golang,https://go.googlesource.com/go,BSD-3-Clause,Copyright (c) 2009 The Go Authors diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-APACHE b/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-APACHE deleted file mode 100644 index bff56b5431..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-APACHE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016 Datadog, Inc. - 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/DataDog/dd-trace-go/v2/LICENSE-BSD3 b/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-BSD3 deleted file mode 100644 index 9237320990..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/LICENSE-BSD3 +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2016-Present, Datadog -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 Datadog 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 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/DataDog/dd-trace-go/v2/NOTICE b/vendor/github.com/DataDog/dd-trace-go/v2/NOTICE deleted file mode 100644 index a53b8aded6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/NOTICE +++ /dev/null @@ -1,4 +0,0 @@ -Datadog dd-trace-go -Copyright 2016-Present Datadog, Inc. - -This product includes software developed at Datadog, Inc. (https://www.datadoghq.com/). diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/appsec/events/block.go b/vendor/github.com/DataDog/dd-trace-go/v2/appsec/events/block.go deleted file mode 100644 index b405bdd97d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/appsec/events/block.go +++ /dev/null @@ -1,32 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -// Package events provides security event types that appsec can return in function calls it monitors when blocking them. -// It allows finer-grained integrations of appsec into your Go errors' management logic. -package events - -import "errors" - -var _ error = (*BlockingSecurityEvent)(nil) - -// BlockingSecurityEvent is the error type returned by function calls blocked by appsec. -// Even though appsec takes care of responding automatically to the blocked requests, it -// is your duty to abort the request handlers that are calling functions blocked by appsec. -// For instance, if a gRPC handler performs a SQL query blocked by appsec, the SQL query -// function call gets blocked and aborted by returning an error of type SecurityBlockingEvent. -// This allows you to safely abort your request handlers, and to be able to leverage errors.As if -// necessary in your Go error management logic to be able to tell if the error is a blocking security -// event or not (eg. to avoid retrying an HTTP client request). -type BlockingSecurityEvent struct{} - -func (*BlockingSecurityEvent) Error() string { - return "request blocked by WAF" -} - -// IsSecurityError returns true if the error is a security event. -func IsSecurityError(err error) bool { - var secErr *BlockingSecurityEvent - return errors.As(err, &secErr) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/datastreams/options/options.go b/vendor/github.com/DataDog/dd-trace-go/v2/datastreams/options/options.go deleted file mode 100644 index 066477f726..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/datastreams/options/options.go +++ /dev/null @@ -1,11 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package options - -type CheckpointParams struct { - PayloadSize int64 - ServiceOverride string -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ddtrace.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ddtrace.go deleted file mode 100644 index 50995204f2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ddtrace.go +++ /dev/null @@ -1,36 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package ddtrace contains the interfaces that specify the implementations of Datadog's -// tracing library, as well as a set of sub-packages containing various implementations: -// our native implementation ("tracer") and a mock tracer to be used for testing ("mocktracer"). -// Additionally, package "ext" provides a set of tag names and values specific to Datadog's APM product. -// -// To get started, visit the documentation for any of the packages you'd like to begin -// with by accessing the subdirectories of this package: https://pkg.go.dev/github.com/DataDog/dd-trace-go/v2/ddtrace#pkg-subdirectories. -package ddtrace // import "github.com/DataDog/dd-trace-go/v2/ddtrace" - -// SpanContext represents a span state that can propagate to descendant spans -// and across process boundaries. It contains all the information needed to -// spawn a direct descendant of the span that it belongs to. It can be used -// to create distributed tracing by propagating it using the provided interfaces. -type SpanContext interface { - // SpanID returns the span ID that this context is carrying. - SpanID() uint64 - - // TraceID returns the trace ID that this context is carrying. - TraceID() string - - // TraceID128 returns the raw bytes of the 128-bit trace ID that this context is carrying. - TraceIDBytes() [16]byte - - // TraceIDLower returns the lower part of the trace ID that this context is carrying. - TraceIDLower() uint64 - - // ForeachBaggageItem provides an iterator over the key/value pairs set as - // baggage within this context. Iteration stops when the handler returns - // false. - ForeachBaggageItem(handler func(k, v string) bool) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/app_types.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/app_types.go deleted file mode 100644 index 10f854c5ae..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/app_types.go +++ /dev/null @@ -1,79 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext // import "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - -// App types determine how to categorize a trace in the Datadog application. -// For more fine-grained behaviour, use the SpanType* constants. -const ( - // AppTypeDB specifies the DB span type and can be used as a tag value - // for a span's SpanType tag. If possible, use one of the SpanType* - // constants for a more accurate indication. - AppTypeDB = "db" - - // AppTypeCache specifies the Cache span type and can be used as a tag value - // for a span's SpanType tag. If possible, consider using SpanTypeRedis or - // SpanTypeMemcached. - AppTypeCache = "cache" - - // AppTypeRPC specifies the RPC span type and can be used as a tag value - // for a span's SpanType tag. - AppTypeRPC = "rpc" -) - -// Span types have similar behaviour to "app types" and help categorize -// traces in the Datadog application. They can also help fine grain agent -// level behaviours such as obfuscation and quantization, when these are -// enabled in the agent's configuration. -const ( - // SpanTypeWeb marks a span as an HTTP server request. - SpanTypeWeb = "web" - - // SpanTypeHTTP marks a span as an HTTP client request. - SpanTypeHTTP = "http" - - // SpanTypeSQL marks a span as an SQL operation. These spans may - // have an "sql.command" tag. - SpanTypeSQL = "sql" - - // SpanTypeCassandra marks a span as a Cassandra operation. These - // spans may have an "sql.command" tag. - SpanTypeCassandra = "cassandra" - - // SpanTypeRedis marks a span as a Redis operation. These spans may - // also have a "redis.raw_command" tag. - SpanTypeRedis = "redis" - - // SpanTypeRedis marks a span as a Valkey operation. - SpanTypeValkey = "valkey" - - // SpanTypeMemcached marks a span as a memcached operation. - SpanTypeMemcached = "memcached" - - // SpanTypeMongoDB marks a span as a MongoDB operation. - SpanTypeMongoDB = "mongodb" - - // SpanTypeElasticSearch marks a span as an ElasticSearch operation. - // These spans may also have an "elasticsearch.body" tag. - SpanTypeElasticSearch = "elasticsearch" - - // SpanTypeLevelDB marks a span as a leveldb operation - SpanTypeLevelDB = "leveldb" - - // SpanTypeDNS marks a span as a DNS operation. - SpanTypeDNS = "dns" - - // SpanTypeMessageConsumer marks a span as a queue operation - SpanTypeMessageConsumer = "queue" - - // SpanTypeMessageProducer marks a span as a queue operation. - SpanTypeMessageProducer = "queue" - - // SpanTypeConsul marks a span as a Consul operation. - SpanTypeConsul = "consul" - - // SpanTypeGraphql marks a span as a graphql operation. - SpanTypeGraphQL = "graphql" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/aws.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/aws.go deleted file mode 100644 index 5665b07912..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/aws.go +++ /dev/null @@ -1,34 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -// Tags specific to AWS. -const ( - AWSServiceLegacy = "aws.service" - AWSRegionLegacy = "aws.region" - - AWSAgent = "aws.agent" - AWSService = "aws_service" - AWSOperation = "aws.operation" - AWSRegion = "region" - AWSRequestID = "aws.request_id" - AWSRetryCount = "aws.retry_count" - - SQSQueueName = "queuename" - - SNSTargetName = "targetname" - SNSTopicName = "topicname" - - DynamoDBTableName = "tablename" - - KinesisStreamName = "streamname" - - EventBridgeRuleName = "rulename" - - SFNStateMachineName = "statemachinename" - - S3BucketName = "bucketname" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/db.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/db.go deleted file mode 100644 index e4c442a482..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/db.go +++ /dev/null @@ -1,119 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -const ( - // DBApplication indicates the application using the database. - DBApplication = "db.application" - // DBName indicates the database name. - DBName = "db.name" - // DBType indicates the type of Database. - DBType = "db.type" - // DBInstance indicates the instance name of Database. - DBInstance = "db.instance" - // DBUser indicates the user name of Database, e.g. "readonly_user" or "reporting_user". - DBUser = "db.user" - // DBStatement records a database statement for the given database type. - DBStatement = "db.statement" - // DBSystem indicates the database management system (DBMS) product being used. - DBSystem = "db.system" -) - -// Available values for db.system. -const ( - DBSystemMemcached = "memcached" - DBSystemMySQL = "mysql" - DBSystemPostgreSQL = "postgresql" - DBSystemMicrosoftSQLServer = "mssql" - // DBSystemOtherSQL is used for other SQL databases not listed above. - DBSystemOtherSQL = "other_sql" - DBSystemElasticsearch = "elasticsearch" - DBSystemRedis = "redis" - DBSystemValkey = "valkey" - DBSystemMongoDB = "mongodb" - DBSystemCassandra = "cassandra" - DBSystemConsulKV = "consul" - DBSystemLevelDB = "leveldb" - DBSystemBuntDB = "buntdb" -) - -// MicrosoftSQLServer tags. -const ( - // MicrosoftSQLServerInstanceName indicates the Microsoft SQL Server instance name connecting to. - MicrosoftSQLServerInstanceName = "db.mssql.instance_name" -) - -// MongoDB tags. -const ( - // MongoDBCollection indicates the collection being accessed. - MongoDBCollection = "db.mongodb.collection" -) - -// Redis tags. -const ( - // RedisDatabaseIndex indicates the Redis database index connected to. - RedisDatabaseIndex = "db.redis.database_index" - - // RedisRawCommand allows to set the raw command for tags. - RedisRawCommand = "redis.raw_command" - - // RedisClientCacheHit is the remaining TTL in seconds of client side cache. - RedisClientCacheHit = "db.redis.client.cache.hit" - - // RedisClientCacheTTL captures the Time-To-Live (TTL) of a cached entry in the client. - RedisClientCacheTTL = "db.redis.client.cache.ttl" - - // RedisClientCachePTTL is the remaining PTTL in seconds of client side cache. - RedisClientCachePTTL = "db.redis.client.cache.pttl" - - // RedisClientCachePXAT is the remaining PXAT in seconds of client side cache. - RedisClientCachePXAT = "db.redis.client.cache.pxat" -) - -// Valkey tags. -const ( - // ValkeyRawCommand allows to set the raw command for tags. - ValkeyRawCommand = "valkey.raw_command" - - // ValkeyClientCacheHit is the remaining TTL in seconds of client side cache. - ValkeyClientCacheHit = "db.valkey.client.cache.hit" - - // ValkeyClientCacheTTL captures the Time-To-Live (TTL) of a cached entry in the client. - ValkeyClientCacheTTL = "db.valkey.client.cache.ttl" - - // ValkeyClientCachePTTL is the remaining PTTL in seconds of client side cache. - ValkeyClientCachePTTL = "db.valkey.client.cache.pttl" - - // ValkeyClientCachePXAT is the remaining PXAT in seconds of client side cache. - ValkeyClientCachePXAT = "db.valkey.client.cache.pxat" -) - -// Cassandra tags. -const ( - // CassandraConsistencyLevel is the tag name to set for consistency level. - CassandraConsistencyLevel = "cassandra.consistency_level" - - // CassandraCluster specifies the tag name that is used to set the cluster. - CassandraCluster = "cassandra.cluster" - - // CassandraDatacenter specifies the tag name that is used to set the datacenter. - CassandraDatacenter = "cassandra.datacenter" - - // CassandraRowCount specifies the tag name to use when settings the row count. - CassandraRowCount = "cassandra.row_count" - - // CassandraKeyspace is used as tag name for setting the key space. - CassandraKeyspace = "cassandra.keyspace" - - // CassandraPaginated specifies the tag name for paginated queries. - CassandraPaginated = "cassandra.paginated" - - // CassandraContactPoints holds the list of cassandra initial seed nodes used to discover the cluster. - CassandraContactPoints = "db.cassandra.contact.points" - - // CassandraHostID represents the host ID for this operation. - CassandraHostID = "db.cassandra.host.id" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/graphql.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/graphql.go deleted file mode 100644 index df03bd89cf..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/graphql.go +++ /dev/null @@ -1,10 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package ext - -const ( - GraphqlQueryErrorEvent = "dd.graphql.query.error" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/log_key.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/log_key.go deleted file mode 100644 index b17e098ffa..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/log_key.go +++ /dev/null @@ -1,13 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -const ( - // LogKeyTraceID is used by log integrations to correlate logs with a given trace. - LogKeyTraceID = "dd.trace_id" - // LogKeySpanID is used by log integrations to correlate logs with a given span. - LogKeySpanID = "dd.span_id" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/messaging.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/messaging.go deleted file mode 100644 index 649143ebdd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/messaging.go +++ /dev/null @@ -1,27 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package ext - -const ( - // MessagingSystem identifies which messaging system created this span (kafka, rabbitmq, amazonsqs, googlepubsub...) - MessagingSystem = "messaging.system" - // MessagingDestinationName identifies message destination name - MessagingDestinationName = "messaging.destination.name" -) - -// Available values for messaging.system. -const ( - MessagingSystemGCPPubsub = "googlepubsub" - MessagingSystemKafka = "kafka" -) - -// Kafka tags. -const ( - // MessagingKafkaPartition defines the Kafka partition the trace is associated with. - MessagingKafkaPartition = "messaging.kafka.partition" - // KafkaBootstrapServers holds a comma separated list of bootstrap servers as defined in producer or consumer config. - KafkaBootstrapServers = "messaging.kafka.bootstrap.servers" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/peer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/peer.go deleted file mode 100644 index 3bca040baa..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/peer.go +++ /dev/null @@ -1,21 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -const ( - // PeerHostIPV4 records IPv4 host address of the peer. - PeerHostIPV4 = "peer.ipv4" - // PeerHostIPV6 records the IPv6 host address of the peer. - PeerHostIPV6 = "peer.ipv6" - // PeerService records the service name of the peer service. - PeerService = "peer.service" - // PeerHostname records the host name of the peer. - // Legacy: Kept for backwards compatability. Use NetworkDestinationName for hostname - // and NetworkDestinationIP for IP addresses - PeerHostname = "peer.hostname" - // PeerPort records the port number of the peer. - PeerPort = "peer.port" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/priority.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/priority.go deleted file mode 100644 index 8a5c0fc405..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/priority.go +++ /dev/null @@ -1,27 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -// Priority is a hint given to the backend so that it knows which traces to reject or kept. -// In a distributed context, it should be set before any context propagation (fork, RPC calls) to be effective. - -const ( - // PriorityUserReject informs the backend that a trace should be rejected and not stored. - // This should be used by user code or configuration overriding default priority - PriorityUserReject = -1 - - // PriorityAutoReject informs the backend that a trace should be rejected and not stored. - // This is used by the builtin sampler. - PriorityAutoReject = 0 - - // PriorityAutoKeep informs the backend that a trace should be kept and not stored. - // This is used by the builtin sampler. - PriorityAutoKeep = 1 - - // PriorityUserKeep informs the backend that a trace should be kept and not stored. - // This should be used by user code or configuration overriding default priority - PriorityUserKeep = 2 -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/rpc.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/rpc.go deleted file mode 100644 index e7c4308229..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/rpc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package ext - -const ( - // RPCSystem identifies the RPC remoting system. - RPCSystem = "rpc.system" - // RPCService represents the full (logical) name of the service being called, including its package name, - // if applicable. Note this is the logical name of the service from the RPC interface perspective, - // which can be different from the name of any implementing class. - RPCService = "rpc.service" - // RPCMethod represents the name of the (logical) method being called. Note this is the logical name of the - // method from the RPC interface perspective, which can be different from the name of - // any implementing method/function. - RPCMethod = "rpc.method" -) - -// Well-known identifiers for rpc.system. -const ( - // RPCSystemGRPC identifies gRPC. - RPCSystemGRPC = "grpc" - // RPCSystemTwirp identifies Twirp. - RPCSystemTwirp = "twirp" -) - -// gRPC specific tags. -const ( - // GRPCFullMethod represents the full name of the logical method being called following the - // format: /$package.$service/$method - GRPCFullMethod = "rpc.grpc.full_method" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/span_kind.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/span_kind.go deleted file mode 100644 index 71a3ce50b8..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/span_kind.go +++ /dev/null @@ -1,32 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -// span_kind values are set per span following the opentelemetry standard -// falls under the values of client, server, producer, consumer, and internal -const ( - - // SpanKindServer indicates that the span covers server-side handling of a synchronous RPC or other remote request - // This span should not have any local parents but can have other distributed parents - SpanKindServer = "server" - - // SpanKindClient indicates that the span describes a request to some remote service. - // This span should not have any local children but can have other distributed children - SpanKindClient = "client" - - // SpanKindConsumer indicates that the span describes the initiators of an asynchronous request. - // This span should not have any local parents but can have other distributed parents - SpanKindConsumer = "consumer" - - // SpanKindProducer indicates that the span describes a child of an asynchronous producer request. - // This span should not have any local children but can have other distributed children - SpanKindProducer = "producer" - - // SpanKindInternal indicates that the span represents an internal operation within an application, - // as opposed to an operations with remote parents or children. - // This is the default value and not explicitly set to save memory - SpanKindInternal = "internal" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/system.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/system.go deleted file mode 100644 index 163720a4f5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/system.go +++ /dev/null @@ -1,12 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package ext - -// Standard system metadata names -const ( - // The pid of the traced process - Pid = "process_id" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/tags.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/tags.go deleted file mode 100644 index b4eb5292e4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/ext/tags.go +++ /dev/null @@ -1,144 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package ext contains a set of Datadog-specific constants. Most of them are used -// for setting span metadata. -package ext - -const ( - // TargetHost sets the target host address. - // Legacy: Kept for backwards compatibility. Use NetworkDestinationName for hostname - // and NetworkDestinationIP for IP addresses - TargetHost = "out.host" - - // NetworkDestinationName is the remote hostname or similar where the outbound connection is being made to. - NetworkDestinationName = "network.destination.name" - - // NetworkDestinationIP is the remote address where the outbound connection is being made to. - NetworkDestinationIP = "network.destination.ip" - - // NetworkClientIP is the client IP address. - NetworkClientIP = "network.client.ip" - - // TargetPort sets the target host port. - // Legacy: Kept for backwards compatability. Use NetworkDestinationPort instead. - TargetPort = "out.port" - - // TargetDB sets the target db. - TargetDB = "out.db" - - // NetworkDestinationPort is the remote port number of the outbound connection. - NetworkDestinationPort = "network.destination.port" - - // SQLType sets the sql type tag. - SQLType = "sql" - - // SQLQuery sets the sql query tag on a span. - SQLQuery = "sql.query" - - // HTTPMethod specifies the HTTP method used in a span. - HTTPMethod = "http.method" - - // HTTPCode sets the HTTP status code as a tag. - HTTPCode = "http.status_code" - - // HTTPRoute is the route value of the HTTP request. - HTTPRoute = "http.route" - - // HTTPURL sets the HTTP URL for a span. - HTTPURL = "http.url" - - // HTTPUserAgent is the user agent header value of the HTTP request. - HTTPUserAgent = "http.useragent" - - // HTTPClientIP sets the HTTP client IP tag. - HTTPClientIP = "http.client_ip" - - // HTTPRequestHeaders sets the HTTP request headers partial tag - // This tag is meant to be composed, i.e http.request.headers.headerX, http.request.headers.headerY, etc... - // See https://docs.datadoghq.com/tracing/trace_collection/tracing_naming_convention/#http-requests - HTTPRequestHeaders = "http.request.headers" - - // SpanName is a pseudo-key for setting a span's operation name by means of - // a tag. It is mostly here to facilitate vendor-agnostic frameworks like Opentracing - // and OpenCensus. - SpanName = "span.name" - - // SpanType defines the Span type (web, db, cache). - SpanType = "span.type" - - // ServiceName defines the Service name for this Span. - ServiceName = "service.name" - - // Version is a tag that specifies the current application version. - Version = "version" - - // ResourceName defines the Resource name for the Span. - ResourceName = "resource.name" - - // Error specifies the error tag. It's value is usually of type "error". - Error = "error" - - // ErrorMsg specifies the error message. - ErrorMsg = "error.message" - - // ErrorType specifies the error type. - ErrorType = "error.type" - - // ErrorStack specifies the stack dump. - ErrorStack = "error.stack" - - // ErrorDetails holds details about an error which implements a formatter. - ErrorDetails = "error.details" - - // Environment specifies the environment to use with a trace. - Environment = "env" - - // EventSampleRate specifies the rate at which this span will be sampled - // as an APM event. - EventSampleRate = "_dd1.sr.eausr" - - // AnalyticsEvent specifies whether the span should be recorded as a Trace - // Search & Analytics event. - AnalyticsEvent = "analytics.event" - - // ManualKeep is a tag which specifies that the trace to which this span - // belongs to should be kept when set to true. - ManualKeep = "manual.keep" - - // ManualDrop is a tag which specifies that the trace to which this span - // belongs to should be dropped when set to true. - ManualDrop = "manual.drop" - - // RuntimeID is a tag that contains a unique id for this process. - RuntimeID = "runtime-id" - - // Component defines library integration the span originated from. - Component = "component" - - // SpanKind defines the kind of span based on Otel requirements (client, server, producer, consumer). - SpanKind = "span.kind" - - // MapSpanStart is used by Span.AsMap to store the span start. - MapSpanStart = "_ddtrace.span_start" - - // MapSpanDuration is used by Span.AsMap to store the span duration. - MapSpanDuration = "_ddtrace.span_duration" - - // MapSpanSpanID is used by Span.AsMap to store the span id. - MapSpanID = "_ddtrace.span_id" - - // MapSpanTraceID is used by Span.AsMap to store the span trace id. - MapSpanTraceID = "_ddtrace.span_traceid" - - // MapSpanParentID is used by Span.AsMap to store the span parent id. - MapSpanParentID = "_ddtrace.span_parentid" - - // MapSpanError is used by Span.AsMap to store the span error value. - MapSpanError = "_ddtrace.span_error" - - // MapSpanEvents is used by Span.AsMap to store the spanEvents value. - MapSpanEvents = "_ddtrace.span_events" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/globaltracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/globaltracer.go deleted file mode 100644 index cb8c1cc19d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/globaltracer.go +++ /dev/null @@ -1,64 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import "sync/atomic" - -var ( - // globalTracer stores the current tracer as *ddtrace/tracer.Tracer (pointer to interface). The - // atomic.Value type requires types to be consistent, which requires using the same type for the - // stored value. - globalTracer atomic.Value -) - -// tracerLike is an interface to restrict the types that can be stored in `globalTracer`. -// This interface doesn't leak to the users. We are leveraging the type system to generate -// the functions below for `tracer.Tracer` without creating an import cycle. -type tracerLike interface { - Flush() - Stop() -} - -// SetGlobalTracer sets the global tracer to t. -// It is the responsibility of the caller to ensure that the value is `tracer.Tracer`. -func SetGlobalTracer[T tracerLike](t T) { - if (tracerLike)(t) == nil { - panic("ddtrace/internal: SetGlobalTracer called with nil") - } - old := globalTracer.Swap(&t) - if old == nil { - return - } - oldTracer := *old.(*T) - oldTracer.Stop() -} - -// GetGlobalTracer returns the current global tracer. -// It is the responsability of the caller to ensure that calling code uses `tracer.Tracer` -// as generic type. -func GetGlobalTracer[T tracerLike]() T { - return *globalTracer.Load().(*T) -} - -// mockTracerLike is an interface to restrict the types that can be stored in `globalTracer`. -// This represents the mock tracer type used in tests. And prevent calling the StoreGlobalTracer -// function with a normal tracer.Tracer. -type mockTracerLike interface { - tracerLike - Reset() -} - -// StoreGlobalTracer is a helper function to set the global tracer internally without stopping the old one. -// WARNING: this is used by the civisibilitymocktracer working as a wrapper around the global tracer, hence we don't stop the tracer. -// DO NOT USE THIS FUNCTION ON NORMAL tracer.Tracer. -func StoreGlobalTracer[M mockTracerLike, T tracerLike](m M) { - if (mockTracerLike)(m) == nil { - panic("ddtrace/internal: StoreGlobalTracer called with nil") - } - // convert the mock tracer like to the actual tracer like type (avoid panic on storing different types in the atomic.Value) - t := (tracerLike)(m).(T) - globalTracer.Store(&t) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats/stats.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats/stats.go deleted file mode 100644 index 8b5d8402ea..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats/stats.go +++ /dev/null @@ -1,91 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracerstats - -import "sync/atomic" - -// Events are things that happen in the tracer such as a trace being dropped or -// a span being started. These are counted and submitted as metrics. -type Event int - -const ( - SpanStarted Event = iota - SpansFinished - TracesDropped - DroppedP0Traces - DroppedP0Spans - PartialTraces - - // Read-only. We duplicate some of the stats so that we can send them to the - // agent in headers as well as counting them with statsd. - AgentDroppedP0Traces - AgentDroppedP0Spans -) - -// These integers track metrics about spans and traces as they are started, -// finished, and dropped -var spansStarted, spansFinished, tracesDropped uint32 - -// Records the number of dropped P0 traces and spans. -var droppedP0Traces, droppedP0Spans uint32 - -// partialTrace the number of partially dropped traces. -var partialTraces uint32 - -// Copies of the stats to be sent to the agent. -var agentDroppedP0Traces, agentDroppedP0Spans uint32 - -func Signal(e Event, count uint32) { - switch e { - case SpanStarted: - atomic.AddUint32(&spansStarted, count) - case SpansFinished: - atomic.AddUint32(&spansFinished, count) - case TracesDropped: - atomic.AddUint32(&tracesDropped, count) - case DroppedP0Traces: - atomic.AddUint32(&droppedP0Traces, count) - atomic.AddUint32(&agentDroppedP0Traces, count) - case DroppedP0Spans: - atomic.AddUint32(&droppedP0Spans, count) - atomic.AddUint32(&agentDroppedP0Spans, count) - case PartialTraces: - atomic.AddUint32(&partialTraces, count) - } -} - -func Count(e Event) uint32 { - switch e { - case SpanStarted: - return atomic.SwapUint32(&spansStarted, 0) - case SpansFinished: - return atomic.SwapUint32(&spansFinished, 0) - case TracesDropped: - return atomic.SwapUint32(&tracesDropped, 0) - case DroppedP0Traces: - return atomic.SwapUint32(&droppedP0Traces, 0) - case DroppedP0Spans: - return atomic.SwapUint32(&droppedP0Spans, 0) - case PartialTraces: - return atomic.SwapUint32(&partialTraces, 0) - case AgentDroppedP0Traces: - return atomic.SwapUint32(&agentDroppedP0Traces, 0) - case AgentDroppedP0Spans: - return atomic.SwapUint32(&agentDroppedP0Spans, 0) - } - return 0 -} - -func Reset() { - atomic.StoreUint32(&spansStarted, 0) - atomic.StoreUint32(&spansFinished, 0) - atomic.StoreUint32(&tracesDropped, 0) - atomic.StoreUint32(&droppedP0Traces, 0) - atomic.StoreUint32(&droppedP0Spans, 0) - atomic.StoreUint32(&partialTraces, 0) - atomic.StoreUint32(&agentDroppedP0Traces, 0) - atomic.StoreUint32(&agentDroppedP0Spans, 0) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/civisibilitymocktracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/civisibilitymocktracer.go deleted file mode 100644 index ded077abc9..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/civisibilitymocktracer.go +++ /dev/null @@ -1,174 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package mocktracer - -import ( - "sync" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/datastreams" -) - -type civisibilitymocktracer struct { - mock *mocktracer // mock tracer - real tracer.Tracer // real tracer (for the testotimization/civisibility spans) - isnoop atomic.Bool -} - -var ( - _ tracer.Tracer = (*civisibilitymocktracer)(nil) - _ Tracer = (*civisibilitymocktracer)(nil) - - realSpans = make(map[*tracer.Span]bool) - realSpansMutex sync.Mutex -) - -// Creates a new CIVisibilityMockTracer that uses the mock tracer for all spans except the CIVisibility spans. -func newCIVisibilityMockTracer() *civisibilitymocktracer { - currentTracer := getGlobalTracer() - // let's check if the current tracer is already a civisibilitymocktracer - // if so, we need to get the real tracer from it - if currentCIVisibilityMockTracer, ok := currentTracer.(*civisibilitymocktracer); ok && currentCIVisibilityMockTracer != nil { - currentTracer = currentCIVisibilityMockTracer.real - } - return &civisibilitymocktracer{ - mock: newMockTracer(), - real: currentTracer, - } -} - -// SentDSMBacklogs returns the Data Streams Monitoring backlogs that have been sent by the mock tracer. -// If the tracer is in noop mode, it returns nil. Otherwise, it flushes the processor and returns -// all captured backlogs from the mock transport. -func (t *civisibilitymocktracer) SentDSMBacklogs() []datastreams.Backlog { - if t.isnoop.Load() { - return nil - } - t.mock.dsmProcessor.Flush() - return t.mock.dsmTransport.backlogs -} - -// Stop deactivates the CIVisibility mock tracer by setting it to noop mode and stopping -// the Data Streams Monitoring processor. This should be called when testing has finished. -func (t *civisibilitymocktracer) Stop() { - t.isnoop.Store(true) - t.mock.dsmProcessor.Stop() - if civisibility.GetState() == civisibility.StateExiting { - t.real.Stop() - t.real = &tracer.NoopTracer{} - } -} - -// StartSpan creates a new span with the given operation name and options. If the span type -// indicates it's a CI Visibility span (like a test session, module, suite, or individual test), -// it uses the real tracer to create the span. For all other spans, it uses the mock tracer. -// If the tracer is in noop mode, it returns nil. -func (t *civisibilitymocktracer) StartSpan(operationName string, opts ...tracer.StartSpanOption) *tracer.Span { - if t.real != nil { - var cfg tracer.StartSpanConfig - for _, fn := range opts { - fn(&cfg) - } - - if spanType, ok := cfg.Tags[ext.SpanType]; ok && - (spanType == constants.SpanTypeTestSession || spanType == constants.SpanTypeTestModule || - spanType == constants.SpanTypeTestSuite || spanType == constants.SpanTypeTest) { - // If the span is a civisibility span, use the real tracer to create it. - realSpan := t.real.StartSpan(operationName, opts...) - realSpansMutex.Lock() - defer realSpansMutex.Unlock() - realSpans[realSpan] = true - return realSpan - } - } - - if t.isnoop.Load() { - return nil - } - - // Otherwise, use the mock tracer to create it. - return t.mock.StartSpan(operationName, opts...) -} - -// FinishSpan marks the given span as finished in the mock tracer. This is called by spans -// when they finish, adding them to the list of finished spans for later inspection. -func (t *civisibilitymocktracer) FinishSpan(s *tracer.Span) { - realSpansMutex.Lock() - defer realSpansMutex.Unlock() - // Check if the span is a real span (i.e., created by the real tracer). - if _, isRealSpan := realSpans[s]; isRealSpan { - delete(realSpans, s) - return - } - if t.isnoop.Load() { - return - } - t.mock.FinishSpan(s) -} - -// GetDataStreamsProcessor returns the Data Streams Monitoring processor used by the mock tracer. -// If the tracer is in noop mode, it returns nil. This processor is used to monitor -// and record data stream metrics. -func (t *civisibilitymocktracer) GetDataStreamsProcessor() *datastreams.Processor { - if t.isnoop.Load() { - return nil - } - return t.mock.dsmProcessor -} - -// OpenSpans returns the set of started spans that have not been finished yet. -// This is useful for verifying spans are properly finished in tests. -func (t *civisibilitymocktracer) OpenSpans() []*Span { - return t.mock.OpenSpans() -} - -// FinishedSpans returns the set of spans that have been finished. -// This allows inspection of spans after they've completed for testing and verification. -func (t *civisibilitymocktracer) FinishedSpans() []*Span { - return t.mock.FinishedSpans() -} - -// Reset clears all spans (both open and finished) from the mock tracer. -// This is especially useful when running tests in a loop, where a clean state -// is desired between test iterations. -func (t *civisibilitymocktracer) Reset() { - t.mock.Reset() -} - -// Extract retrieves a SpanContext from the carrier using the mock tracer's propagator. -// If the tracer is in noop mode, it returns nil. This is used for distributed tracing -// to continue traces across process boundaries. -func (t *civisibilitymocktracer) Extract(carrier interface{}) (*tracer.SpanContext, error) { - if t.isnoop.Load() { - return nil, nil - } - return t.mock.Extract(carrier) -} - -// Inject injects the SpanContext into the carrier using the mock tracer's propagator. -// If the tracer is in noop mode, it returns nil. This is used for distributed tracing -// to propagate trace information across process boundaries. -func (t *civisibilitymocktracer) Inject(context *tracer.SpanContext, carrier interface{}) error { - if t.isnoop.Load() { - return nil - } - return t.mock.Inject(context, carrier) -} - -func (t *civisibilitymocktracer) TracerConf() tracer.TracerConf { - return t.real.TracerConf() -} - -// Flush forces a flush of both the mock tracer and the real tracer. -// This ensures that all buffered spans are processed and ready for inspection. -func (t *civisibilitymocktracer) Flush() { - t.mock.Flush() - t.real.Flush() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/data_streams.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/data_streams.go deleted file mode 100644 index 100cc2b2a7..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/data_streams.go +++ /dev/null @@ -1,45 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package mocktracer - -import ( - "compress/gzip" - "net/http" - - "github.com/tinylib/msgp/msgp" - - "github.com/DataDog/dd-trace-go/v2/internal/datastreams" -) - -type mockDSMTransport struct { - backlogs []datastreams.Backlog -} - -// RoundTrip does nothing and returns a dummy response. -func (t *mockDSMTransport) RoundTrip(req *http.Request) (*http.Response, error) { - // You can customize the dummy response if needed. - gzipReader, err := gzip.NewReader(req.Body) - if err != nil { - return nil, err - } - var p datastreams.StatsPayload - err = msgp.Decode(gzipReader, &p) - if err != nil { - return nil, err - } - for _, bucket := range p.Stats { - t.backlogs = append(t.backlogs, bucket.Backlogs...) - } - return &http.Response{ - StatusCode: 200, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Request: req, - ContentLength: -1, - Body: http.NoBody, - }, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspan.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspan.go deleted file mode 100644 index 07b532a03c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspan.go +++ /dev/null @@ -1,269 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package mocktracer // import "github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer" - -import ( - "encoding/json" - "fmt" - "testing" - "time" - _ "unsafe" // Needed for go:linkname directive. - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -//go:linkname spanStart github.com/DataDog/dd-trace-go/v2/ddtrace/tracer.spanStart -func spanStart(operationName string, options ...tracer.StartSpanOption) *tracer.Span - -func newSpan(operationName string, cfg *tracer.StartSpanConfig) *tracer.Span { - return spanStart(operationName, func(c *tracer.StartSpanConfig) { - *c = *cfg - }) -} - -type Span struct { - sp *tracer.Span - m map[string]interface{} - links []tracer.SpanLink -} - -func MockSpan(s *tracer.Span) *Span { - if s == nil { - return nil - } - return &Span{sp: s, m: s.AsMap()} -} - -func (s *Span) OperationName() string { - if s == nil { - return "" - } - return s.m[ext.SpanName].(string) -} - -func (s *Span) SetTag(k string, v interface{}) { - if s == nil { - return - } - s.m[k] = v - s.sp.SetTag(k, v) -} - -func (s *Span) Tag(k string) interface{} { - if s == nil { - return nil - } - // It's possible that a tag wasn't set through mocktracer.Span.SetTag, - // in which case we need to retrieve it from the underlying tracer.Span. - v := s.sp.AsMap()[k] - if v != nil { - return v - } - v, ok := s.m[k] - if ok { - return v - } - return nil -} - -func (s *Span) Tags() map[string]interface{} { - if s == nil { - return make(map[string]interface{}) - } - tm := s.sp.AsMap() - m := make(map[string]interface{}, len(s.m)+len(tm)) - extractTags(s.m, m) - extractTags(tm, m) - return m -} - -func extractTags(src, m map[string]interface{}) { - for k, v := range src { - switch k { - case ext.MapSpanStart: - continue - case ext.MapSpanDuration: - continue - case ext.MapSpanID: - continue - case ext.MapSpanTraceID: - continue - case ext.MapSpanParentID: - continue - case ext.MapSpanError: - continue - case ext.MapSpanEvents: - continue - } - m[k] = v - } -} - -func (s *Span) String() string { - if s == nil { - return "" - } - sc := s.sp.Context() - baggage := make(map[string]string) - sc.ForeachBaggageItem(func(k, v string) bool { - baggage[k] = v - return true - }) - - return fmt.Sprintf(` -name: %s -tags: %#v -start: %s -duration: %s -id: %d -parent: %d -trace: %v -baggage: %#v -`, s.OperationName(), s.Tags(), s.StartTime(), s.Duration(), sc.SpanID(), s.ParentID(), sc.TraceID(), baggage) -} - -func (s *Span) ParentID() uint64 { - if s == nil { - return 0 - } - return s.m[ext.MapSpanParentID].(uint64) -} - -// Context returns the SpanContext of this Span. -func (s *Span) Context() *tracer.SpanContext { return s.sp.Context() } - -// SetUser associates user information to the current trace which the -// provided span belongs to. The options can be used to tune which user -// bit of information gets monitored. This mockup only sets the user -// information as span tags of the root span of the current trace. -func (s *Span) SetUser(id string, opts ...tracer.UserMonitoringOption) { - root := s.sp.Root() - if root == nil { - return - } - - cfg := tracer.UserMonitoringConfig{ - Metadata: make(map[string]string), - } - for _, fn := range opts { - fn(&cfg) - } - - root.SetTag("usr.id", id) - root.SetTag("usr.login", cfg.Login) - root.SetTag("usr.org", cfg.Org) - root.SetTag("usr.email", cfg.Email) - root.SetTag("usr.name", cfg.Name) - root.SetTag("usr.role", cfg.Role) - root.SetTag("usr.scope", cfg.Scope) - root.SetTag("usr.session_id", cfg.SessionID) - - for k, v := range cfg.Metadata { - root.SetTag(fmt.Sprintf("usr.%s", k), v) - } -} - -func (s *Span) SpanID() uint64 { - if s == nil { - return 0 - } - return s.m[ext.MapSpanID].(uint64) -} - -func (s *Span) TraceID() uint64 { - if s == nil { - return 0 - } - return s.m[ext.MapSpanTraceID].(uint64) -} - -func (s *Span) StartTime() time.Time { - if s == nil { - return time.Unix(0, 0) - } - return time.Unix(0, s.m[ext.MapSpanStart].(int64)) -} - -func (s *Span) Duration() time.Duration { - if s == nil { - return time.Duration(0) - } - return time.Duration(s.m[ext.MapSpanDuration].(int64)) -} - -func (s *Span) FinishTime() time.Time { - if s == nil { - return time.Unix(0, 0) - } - return s.StartTime().Add(s.Duration()) -} - -func (s *Span) Unwrap() *tracer.Span { - if s == nil { - return nil - } - return s.sp -} - -// Links returns the span's span links. -func (s *Span) Links() []tracer.SpanLink { - payload := s.Tag("_dd.span_links") - if payload == nil { - return nil - } - // Unmarshal the JSON payload into the SpanLink slice. - var links []tracer.SpanLink - json.Unmarshal([]byte(payload.(string)), &links) - return links -} - -// SpanEvent represents a span event from a mockspan. -type SpanEvent struct { - Name string `json:"name"` - TimeUnixNano uint64 `json:"time_unix_nano"` - Attributes map[string]any `json:"attributes"` -} - -// AssertAttributes compares the given attributes with the current event ones. -// The comparison is made against the JSON representation of both, since the data comes from -// the span.AsMap() function which provides the JSON representation of the events, and some types -// could have changed (e.g. 1 could be transformed to 1.0 after marshal/unmarshal). -func (s SpanEvent) AssertAttributes(t *testing.T, wantAttrs map[string]any) { - t.Helper() - want, err := json.Marshal(wantAttrs) - require.NoError(t, err) - got, err := json.Marshal(s.Attributes) - require.NoError(t, err) - assert.Equal(t, string(want), string(got)) -} - -// Events returns the current span events. -func (s *Span) Events() []SpanEvent { - if s == nil { - return nil - } - eventsJSON, ok := s.m[ext.MapSpanEvents].(string) - if !ok { - return nil - } - - var events []SpanEvent - if err := json.Unmarshal([]byte(eventsJSON), &events); err != nil { - log.Error("mocktracer: failed to unmarshal span events: %s", err.Error()) - return nil - } - return events -} - -// Integration returns the component from which the mockspan was created. -func (s *Span) Integration() string { - return s.Tag(ext.Component).(string) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspancontext.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspancontext.go deleted file mode 100644 index 981693e4da..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mockspancontext.go +++ /dev/null @@ -1,84 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package mocktracer - -import ( - "strconv" - "sync" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/ddtrace" - "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" -) - -var _ ddtrace.SpanContext = (*spanContext)(nil) - -type spanContext struct { - sync.RWMutex // guards below fields - baggage map[string]string - priority int - hasPriority bool - - spanID uint64 - traceID uint64 - span *tracer.Span -} - -func (sc *spanContext) TraceID() string { return strconv.FormatUint(sc.traceID, 10) } - -func (sc *spanContext) TraceIDBytes() [16]byte { return [16]byte{} } - -func (sc *spanContext) TraceIDLower() uint64 { return sc.traceID } - -func (sc *spanContext) SpanID() uint64 { return sc.spanID } - -func (sc *spanContext) ForeachBaggageItem(handler func(k, v string) bool) { - sc.RLock() - defer sc.RUnlock() - for k, v := range sc.baggage { - if !handler(k, v) { - break - } - } -} - -func (sc *spanContext) setBaggageItem(k, v string) { - sc.Lock() - defer sc.Unlock() - if sc.baggage == nil { - sc.baggage = make(map[string]string, 1) - } - sc.baggage[k] = v -} - -func (sc *spanContext) baggageItem(k string) string { - sc.RLock() - defer sc.RUnlock() - return sc.baggage[k] -} - -func (sc *spanContext) setSamplingPriority(p int) { - sc.Lock() - defer sc.Unlock() - sc.priority = p - sc.hasPriority = true -} - -func (sc *spanContext) hasSamplingPriority() bool { - sc.RLock() - defer sc.RUnlock() - return sc.hasPriority -} - -func (sc *spanContext) samplingPriority() int { - sc.RLock() - defer sc.RUnlock() - return sc.priority -} - -var mockIDSource uint64 = 123 - -func nextID() uint64 { return atomic.AddUint64(&mockIDSource, 1) } diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mocktracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mocktracer.go deleted file mode 100644 index 1cb2254255..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer/mocktracer.go +++ /dev/null @@ -1,215 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package mocktracer provides a mock implementation of the tracer used in testing. It -// allows querying spans generated at runtime, without having them actually be sent to -// an agent. It provides a simple way to test that instrumentation is running correctly -// in your application. -// -// Simply call "Start" at the beginning of your tests to start and obtain an instance -// of the mock tracer. -package mocktracer - -import ( - "net/http" - "net/url" - "sync" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/internal" - "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" - utils "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/datastreams" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -var _ tracer.Tracer = (*mocktracer)(nil) -var _ Tracer = (*mocktracer)(nil) - -// DSMBacklog is an alias to datastreams.Backlog -type DSMBacklog = datastreams.Backlog - -// Tracer exposes an interface for querying the currently running mock tracer. -type Tracer interface { - tracer.Tracer - - // OpenSpans returns the set of started spans that have not been finished yet. - OpenSpans() []*Span - - FinishSpan(*tracer.Span) - // FinishedSpans returns the set of finished spans. - FinishedSpans() []*Span - - SentDSMBacklogs() []DSMBacklog - - // Reset resets the spans and services recorded in the tracer. This is - // especially useful when running tests in a loop, where a clean start - // is desired for FinishedSpans calls. - Reset() - - // Stop deactivates the mock tracer and allows a normal tracer to take over. - // It should always be called when testing has finished. - Stop() -} - -// Start sets the internal tracer to a mock and returns an interface -// which allows querying it. Call Start at the beginning of your tests -// to activate the mock tracer. When your test runs, use the returned -// interface to query the tracer's state. -func Start() Tracer { - if utils.BoolEnv(constants.CIVisibilityEnabledEnvironmentVariable, false) && !civisibility.IsTestMode() { - // If CI Visibility is enabled (and we are not in a CI Visibility testing mode), we need to use the CIVisibilityMockTracer - // to bypass the CI Visibility spans from the mocktracer. - // This supports the scenario where the mocktracer is used in a test (we need to keep reporting test spans) - t := newCIVisibilityMockTracer() - // Set the global tracer to the mock tracer without stopping the old one (inside the mock tracer) - internal.StoreGlobalTracer[Tracer, tracer.Tracer](t) - return t - } - - var t tracer.Tracer = newMockTracer() - internal.SetGlobalTracer(t) - return t.(Tracer) -} - -func getGlobalTracer() tracer.Tracer { - return internal.GetGlobalTracer[tracer.Tracer]() -} - -type mocktracer struct { - sync.RWMutex // guards below spans - finishedSpans []*Span - openSpans map[uint64]*Span - dsmTransport *mockDSMTransport - dsmProcessor *datastreams.Processor -} - -func (t *mocktracer) SentDSMBacklogs() []DSMBacklog { - t.dsmProcessor.Flush() - return t.dsmTransport.backlogs -} - -func newMockTracer() *mocktracer { - var t mocktracer - t.openSpans = make(map[uint64]*Span) - t.dsmTransport = &mockDSMTransport{} - client := &http.Client{ - Transport: t.dsmTransport, - } - t.dsmProcessor = datastreams.NewProcessor(&statsd.NoOpClientDirect{}, "env", "service", "v1", &url.URL{Scheme: "http", Host: "agent-address"}, client) - t.dsmProcessor.Start() - t.dsmProcessor.Flush() - return &t -} - -// This is called by the spans when they finish -func (t *mocktracer) FinishSpan(s *tracer.Span) { - t.addFinishedSpan(s) -} - -// Stop deactivates the mock tracer and sets the active tracer to a no-op. -func (t *mocktracer) Stop() { - tracer.Stop() - t.dsmProcessor.Stop() -} - -func (t *mocktracer) StartSpan(operationName string, opts ...tracer.StartSpanOption) *tracer.Span { - var cfg tracer.StartSpanConfig - for _, fn := range opts { - fn(&cfg) - } - span := newSpan(operationName, &cfg) - - t.Lock() - t.openSpans[span.Context().SpanID()] = MockSpan(span) - t.Unlock() - - return span -} - -func (t *mocktracer) GetDataStreamsProcessor() *datastreams.Processor { - return t.dsmProcessor -} - -func UnwrapSlice(ss []*Span) []*tracer.Span { - ret := make([]*tracer.Span, len(ss)) - for i, sp := range ss { - ret[i] = sp.Unwrap() - } - return ret -} - -func (t *mocktracer) OpenSpans() []*Span { - t.RLock() - defer t.RUnlock() - spans := make([]*Span, 0, len(t.openSpans)) - for _, s := range t.openSpans { - spans = append(spans, s) - } - return spans -} - -func (t *mocktracer) FinishedSpans() []*Span { - t.RLock() - defer t.RUnlock() - return t.finishedSpans -} - -func (t *mocktracer) Reset() { - t.Lock() - defer t.Unlock() - for k := range t.openSpans { - delete(t.openSpans, k) - } - t.finishedSpans = nil -} - -func (t *mocktracer) addFinishedSpan(s *tracer.Span) { - t.Lock() - defer t.Unlock() - // If the span is not in the open spans, we may be finishing a span that was started - // before the mock tracer was started. In this case, we don't want to add it to the - // finished spans. - if _, ok := t.openSpans[s.Context().SpanID()]; !ok { - return - } - delete(t.openSpans, s.Context().SpanID()) - if t.finishedSpans == nil { - t.finishedSpans = make([]*Span, 0, 1) - } - t.finishedSpans = append(t.finishedSpans, MockSpan(s)) -} - -const ( - traceHeader = tracer.DefaultTraceIDHeader - spanHeader = tracer.DefaultParentIDHeader - priorityHeader = tracer.DefaultPriorityHeader - baggagePrefix = tracer.DefaultBaggageHeaderPrefix -) - -func (t *mocktracer) Extract(carrier interface{}) (*tracer.SpanContext, error) { - return tracer.NewPropagator(&tracer.PropagatorConfig{ - MaxTagsHeaderLen: 512, - }).Extract(carrier) -} - -func (t *mocktracer) Inject(context *tracer.SpanContext, carrier interface{}) error { - return tracer.NewPropagator(&tracer.PropagatorConfig{ - MaxTagsHeaderLen: 512, - }).Inject(context, carrier) -} - -func (t *mocktracer) TracerConf() tracer.TracerConf { - return tracer.TracerConf{} -} - -func (t *mocktracer) Flush() { - t.dsmProcessor.Flush() - for _, s := range t.OpenSpans() { - t.addFinishedSpan(s.sp) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/README.md b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/README.md deleted file mode 100644 index 1530306018..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# Datadog Tracer for Go - -This package provides the Datadog APM tracer for Go. - -## API Stability - -The public API of this package is tracked in `api.txt`. This file is automatically generated and checked in CI to ensure API stability. If you make changes to the public API, you must update this file by running: - -```bash -go run ./scripts/apiextractor/api_extractor.go ./ddtrace/tracer > ./ddtrace/tracer/api.txt -``` - -The CI will fail if you make changes to the public API without updating `api.txt`. This helps us: - -1. Track API changes explicitly -2. Maintain backward compatibility -3. Make intentional API changes with clear visibility - -### What constitutes an API change? - -- Adding or removing exported functions, types, methods, or fields -- Changing function signatures -- Changing type definitions -- Changing interface definitions - -### Checking API changes locally - -You can check if your changes affect the public API by running: - -```bash -go run ./scripts/apiextractor/api_extractor.go ./ddtrace/tracer > current_api.txt -diff -u ./ddtrace/tracer/api.txt current_api.txt -``` diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/abandonedspans.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/abandonedspans.go deleted file mode 100644 index 7acb5c9941..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/abandonedspans.go +++ /dev/null @@ -1,314 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "container/list" - "fmt" - "sort" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -var ( - tickerInterval = 1 * time.Minute - logSize = 9000 -) - -// bucket is a not thread-safe generic implementation of a dynamic collection of elements -// stored under a value-bound key (like time). Inspired by concentrator.rawBucket. -type bucket[K comparable, T any] struct { - start, duration uint64 - // index is a map of data's entries by aggregating value to avoid iterating data. - index map[K]*list.Element - // data is a list because insertion order may be important to users. - data *list.List -} - -func newBucket[K comparable, T any](btime uint64, bsize int64) *bucket[K, T] { - return &bucket[K, T]{ - start: btime, - duration: uint64(bsize), - index: make(map[K]*list.Element), - data: list.New(), - } -} - -func (b *bucket[K, T]) add(k K, v T) { - e := b.data.PushBack(v) - b.index[k] = e -} - -// This function is currently not used. We can add it back if it is needed -// func (b *bucket[K, T]) get(k K) (T, bool) { -// e, ok := b.index[k] -// if !ok { -// // Compiler trick to return any zero value in generic code. -// // https://stackoverflow.com/a/70589302 -// var zero T -// return zero, ok -// } -// return e.Value.(T), ok -// } - -func (b *bucket[K, T]) remove(k K) { - e, ok := b.index[k] - if !ok { - return - } - delete(b.index, k) - _ = b.data.Remove(e) -} - -func (b *bucket[K, T]) Len() int { - return b.data.Len() -} - -// abandonedSpanCandidate is a struct to store the minimum required information about -// spans that can be abandoned. -type abandonedSpanCandidate struct { - Name string - TraceID, SpanID uint64 - Start int64 - Finished bool - Integration string -} - -func newAbandonedSpanCandidate(s *Span, finished bool) *abandonedSpanCandidate { - var component string - if v, ok := s.meta[ext.Component]; ok { - component = v - } else { - component = "manual" - } - // finished is explicit instead of implicit as s.finished may be not set - // at the moment of calling this method. - // Also, locking is not required as it's called while the span is already locked or it's - // being initialized. - c := &abandonedSpanCandidate{ - Name: s.name, - TraceID: s.traceID, - SpanID: s.spanID, - Start: s.start, - Finished: finished, - Integration: component, - } - return c -} - -// String takes a span and returns a human-readable string representing that span. -func (s *abandonedSpanCandidate) String() string { - age := now() - s.Start - a := fmt.Sprintf("%d sec", age/1e9) - return fmt.Sprintf("[name: %s, integration: %s, span_id: %d, trace_id: %d, age: %s],", s.Name, s.Integration, s.SpanID, s.TraceID, a) -} - -type abandonedSpansDebugger struct { - // buckets holds all the potentially abandoned tracked spans sharded by the configured interval. - buckets map[int64]*bucket[uint64, *abandonedSpanCandidate] - - // In takes candidate spans and adds them to the debugger. - In chan *abandonedSpanCandidate - - // waits for any active goroutines - wg sync.WaitGroup - - // stop causes the debugger to shut down when closed. - stop chan struct{} - - // stopped reports whether the debugger is stopped (when non-zero). - stopped uint32 - - // addedSpans and removedSpans are internal counters, mainly for testing - // purposes - addedSpans, removedSpans uint32 -} - -// newAbandonedSpansDebugger creates a new abandonedSpansDebugger debugger -func newAbandonedSpansDebugger() *abandonedSpansDebugger { - d := &abandonedSpansDebugger{ - buckets: make(map[int64]*bucket[uint64, *abandonedSpanCandidate]), - In: make(chan *abandonedSpanCandidate, 10000), - } - atomic.SwapUint32(&d.stopped, 1) - return d -} - -// Start periodically finds and reports potentially abandoned spans that are older -// than the given interval. These spans are stored in a bucketed linked list, -// sorted by their `Start` time, where the front of the list contains the oldest spans, -// and the end of the list contains the newest spans. -func (d *abandonedSpansDebugger) Start(interval time.Duration) { - if atomic.SwapUint32(&d.stopped, 0) == 0 { - // already running - log.Warn("(*abandonedSpansDebugger).Start called more than once. This is likely a programming error.") - return - } - d.stop = make(chan struct{}) - d.wg.Add(1) - go func() { - defer d.wg.Done() - tick := time.NewTicker(tickerInterval) - defer tick.Stop() - d.runConsumer(tick, &interval) - }() -} - -func (d *abandonedSpansDebugger) runConsumer(tick *time.Ticker, interval *time.Duration) { - for { - select { - case <-tick.C: - d.log(interval) - case s := <-d.In: - if s.Finished { - d.remove(s, *interval) - } else { - d.add(s, *interval) - } - case <-d.stop: - return - } - } -} - -func (d *abandonedSpansDebugger) Stop() { - if d == nil { - return - } - if atomic.SwapUint32(&d.stopped, 1) > 0 { - return - } - close(d.stop) - d.wg.Wait() - d.log(nil) -} - -func (d *abandonedSpansDebugger) add(s *abandonedSpanCandidate, interval time.Duration) { - // Locking was considered in this method and remove method, but it's not required as long - // as these methods are called from the single goroutine responsible for debugging - // the abandoned spans. - bucketSize := interval.Nanoseconds() - btime := alignTs(s.Start, bucketSize) - b, ok := d.buckets[btime] - if !ok { - b = newBucket[uint64, *abandonedSpanCandidate](uint64(btime), bucketSize) - d.buckets[btime] = b - } - - b.add(s.SpanID, s) - atomic.AddUint32(&d.addedSpans, 1) -} - -func (d *abandonedSpansDebugger) remove(s *abandonedSpanCandidate, interval time.Duration) { - bucketSize := interval.Nanoseconds() - btime := alignTs(s.Start, bucketSize) - b, ok := d.buckets[btime] - if !ok { - return - } - // If a matching bucket exists, attempt to find the element containing - // the finished span, then remove that element from the bucket. - // If a bucket becomes empty, also remove that bucket from the - // abandoned spans list. - b.remove(s.SpanID) - atomic.AddUint32(&d.removedSpans, 1) - if b.Len() > 0 { - return - } - delete(d.buckets, btime) -} - -// log returns a string containing potentially abandoned spans. If `interval` is -// `nil`, it will print all unfinished spans. If `interval` holds a time.Duration, it will -// only print spans that are older than `interval`. It will also truncate the log message to -// `logSize` bytes to prevent overloading the logger. -func (d *abandonedSpansDebugger) log(interval *time.Duration) { - var ( - sb strings.Builder - spanCount = 0 - truncated = false - curTime = now() - ) - - if len(d.buckets) == 0 { - return - } - - // maps are iterated in random order, and to guarantee that is iterated in - // creation order, it's required to sort first the buckets' keys. - keys := make([]int64, 0, len(d.buckets)) - for k := range d.buckets { - keys = append(keys, k) - } - sort.Slice(keys, func(i, j int) bool { - return keys[i] < keys[j] - }) - for _, k := range keys { - if truncated { - break - } - - // Since spans are bucketed by time, finding a bucket that is newer - // than the allowed time interval means that all spans in this bucket - // and future buckets will be younger than `interval`, and thus aren't - // worth checking. - b := d.buckets[k] - if interval != nil && curTime-int64(b.start) < interval.Nanoseconds() { - break - } - - msg, nSpans := formatAbandonedSpans(b, interval, curTime) - spanCount += nSpans - space := logSize - len(sb.String()) - if len(msg) > space { - msg = msg[0:space] - truncated = true - } - sb.WriteString(msg) - } - - if spanCount == 0 { - return - } - - log.Warn("%d abandoned spans:", spanCount) - if truncated { - log.Warn("Too many abandoned spans. Truncating message.") - sb.WriteString("...") - } - log.Warn("%s", sb.String()) -} - -// formatAbandonedSpans takes a bucket and returns a human-readable string representing -// the contents of it. If `interval` is not nil, it will check if the bucket might -// contain spans older than the user configured timeout. If it does, it will filter for -// older spans. If not, it will print all spans without checking their duration. -func formatAbandonedSpans(b *bucket[uint64, *abandonedSpanCandidate], interval *time.Duration, curTime int64) (string, int) { - var ( - sb strings.Builder - spanCount int - ) - for e := b.data.Front(); e != nil; e = e.Next() { - s := e.Value.(*abandonedSpanCandidate) - // If `interval` is not nil, it will check if the span is older than the - // user configured timeout, and discard it if it is not. - if interval != nil && curTime-s.Start < interval.Nanoseconds() { - continue - } - if t, ok := getGlobalTracer().(*tracer); ok { - t.statsd.Incr("datadog.tracer.abandoned_spans", []string{"name:" + s.Name, "integration:" + s.Integration}, 1) - } - spanCount++ - msg := s.String() - sb.WriteString(msg) - } - return sb.String(), spanCount -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/api.txt b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/api.txt deleted file mode 100644 index caa9faa6ba..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/api.txt +++ /dev/null @@ -1,378 +0,0 @@ -// API Stability Report -// Package: github.com/DataDog/dd-trace-go/v2/ddtrace/tracer -// Module: github.com/DataDog/dd-trace-go/v2 - -// File: context.go - -// Package Functions -func ContextWithSpan(context.Context, *Span) (context.Context) -func SpanFromContext(context.Context) (*Span, bool) -func StartSpanFromContext(context.Context, string, ...StartSpanOption) (*Span, context.Context) - -// File: data_streams.go - -// Package Functions -func SetDataStreamsCheckpoint(context.Context, ...string) (context.Context, bool) -func SetDataStreamsCheckpointWithParams(context.Context, options.CheckpointParams, ...string) (context.Context, bool) -func TrackKafkaCommitOffset(string, int32, int64) -func TrackKafkaHighWatermarkOffset(string, string, int32, int64) -func TrackKafkaProduceOffset(string, int32, int64) - -// File: logger.go - -// Package Functions -func AdaptLogger(func(LogLevel, string, ...any)()) (Logger) -func UseLogger(Logger) - -// Types -type LogLevel log.Level - -type Logger interface { - func Log(string) -} - -// File: noop.go - -// Types -type NoopTracer struct {} - -func (NoopTracer) Extract(interface{}) (*SpanContext, error) -func (NoopTracer) Flush() -func (NoopTracer) Inject(*SpanContext, interface{}) (error) -func (NoopTracer) SetServiceInfo(string) -func (NoopTracer) StartSpan(string, ...StartSpanOption) (*Span) -func (NoopTracer) Stop() -func (NoopTracer) TracerConf() (TracerConf) - -// File: option.go - -// Package Functions -func AnalyticsRate(float64) (StartSpanOption) -func ChildOf(*SpanContext) (StartSpanOption) -func MarkIntegrationImported(string) (bool) -func Measured() (StartSpanOption) -func ResourceName(string) (StartSpanOption) -func ServiceName(string) (StartSpanOption) -func SpanType(string) (StartSpanOption) -func StartTime(time.Time) (StartSpanOption) -func Tag(string, interface{}) (StartSpanOption) -func WithAgentAddr(string) (StartOption) -func WithAgentTimeout(int) (StartOption) -func WithAgentURL(string) (StartOption) -func WithAnalytics(bool) (StartOption) -func WithAnalyticsRate(float64) (StartOption) -func WithAppSecEnabled(bool) (StartOption) -func WithDebugMode(bool) (StartOption) -func WithDebugSpansMode(time.Duration) (StartOption) -func WithDebugStack(bool) (StartOption) -func WithDogstatsdAddr(string) (StartOption) -func WithEnv(string) (StartOption) -func WithFeatureFlags(...string) (StartOption) -func WithGlobalServiceName(bool) (StartOption) -func WithGlobalTag(string, interface{}) (StartOption) -func WithHTTPClient(*http.Client) (StartOption) -func WithHeaderTags([]string) (StartOption) -func WithHostname(string) (StartOption) -func WithLambdaMode(bool) (StartOption) -func WithLogStartup(bool) (StartOption) -func WithLogger(Logger) (StartOption) -func WithPartialFlushing(int) (StartOption) -func WithPeerServiceDefaults(bool) (StartOption) -func WithPeerServiceMapping(string) (StartOption) -func WithProfilerCodeHotspots(bool) (StartOption) -func WithProfilerEndpoints(bool) (StartOption) -func WithPropagation() (UserMonitoringOption) -func WithPropagator(Propagator) (StartOption) -func WithRetryInterval(int) (StartOption) -func WithRuntimeMetrics() (StartOption) -func WithSampler(Sampler) (StartOption) -func WithSamplerRate(float64) (StartOption) -func WithSamplingRules([]SamplingRule) (StartOption) -func WithSendRetries(int) (StartOption) -func WithService(string) (StartOption) -func WithServiceMapping(string) (StartOption) -func WithServiceVersion(string) (StartOption) -func WithSpanID(uint64) (StartSpanOption) -func WithSpanLinks([]SpanLink) (StartSpanOption) -func WithStartSpanConfig(*StartSpanConfig) (StartSpanOption) -func WithStatsComputation(bool) (StartOption) -func WithTestDefaults(any) (StartOption) -func WithTraceEnabled(bool) (StartOption) -func WithUDS(string) (StartOption) -func WithUniversalVersion(string) (StartOption) -func WithUserEmail(string) (UserMonitoringOption) -func WithUserLogin(string) (UserMonitoringOption) -func WithUserMetadata(string) (UserMonitoringOption) -func WithUserName(string) (UserMonitoringOption) -func WithUserOrg(string) (UserMonitoringOption) -func WithUserRole(string) (UserMonitoringOption) -func WithUserScope(string) (UserMonitoringOption) -func WithUserSessionID(string) (UserMonitoringOption) - -// Types -type StartOption func(*config)() - -type UserMonitoringConfig struct { - Email string - Login string - Metadata map[string]string - Name string - Org string - PropagateID bool - Role string - Scope string - SessionID string -} - -type UserMonitoringOption func(*UserMonitoringConfig)() - -// File: propagator.go - -// Types -type Propagator interface { - func Extract(interface{}) (*SpanContext, error) - func Inject(*SpanContext, interface{}) (error) -} - -type TextMapReader interface { - func ForeachKey(func(string)(error)) (error) -} - -type TextMapWriter interface { - func Set(string) -} - -// File: rules_sampler.go - -// Package Functions -func EqualsFalseNegative([]SamplingRule) (bool) -func SpanSamplingRules(...Rule) ([]SamplingRule) -func TraceSamplingRules(...Rule) ([]SamplingRule) - -// Types -type Rule struct { - MaxPerSecond float64 - NameGlob string - Rate float64 - ResourceGlob string - ServiceGlob string - Tags map[string]string -} - -type SamplingRule struct { - MaxPerSecond float64 - Name *regexp.Regexp - Provenance provenance - Rate float64 - Resource *regexp.Regexp - Service *regexp.Regexp - Tags map[string]*regexp.Regexp -} - -func (*SamplingRule) EqualsFalseNegative(*SamplingRule) (bool) -func (SamplingRule) MarshalJSON() ([]byte, error) -func (SamplingRule) String() (string) -func (*SamplingRule) UnmarshalJSON([]byte) (error) - -type SamplingRuleType int - -// File: sampler.go - -// Package Functions -func NewAllSampler() (RateSampler) -func NewRateSampler(float64) (RateSampler) - -// Types -type RateSampler interface { - func Rate() (float64) - func SetRate(float64) -} - -type Sampler interface { - func Sample(*Span) (bool) -} - -// File: span.go - -// Types -type Span struct {} - -func (*Span) AddEvent(string, ...SpanEventOption) -func (*Span) AddLink(SpanLink) -func (*Span) AsMap() (map[string]interface{}) -func (*Span) BaggageItem(string) (string) -func (*Span) Context() (*SpanContext) -func (*Span) Finish(...FinishOption) -func (*Span) Format(fmt.State, rune) -func (*Span) Root() (*Span) -func (*Span) SetBaggageItem(string) -func (*Span) SetOperationName(string) -func (*Span) SetTag(string, interface{}) -func (*Span) SetUser(string, ...UserMonitoringOption) -func (*Span) StartChild(string, ...StartSpanOption) (*Span) -func (*Span) String() (string) - -// File: span_config.go - -// Package Functions -func FinishTime(time.Time) (FinishOption) -func NewFinishConfig(...FinishOption) (*FinishConfig) -func NewStartSpanConfig(...StartSpanOption) (*StartSpanConfig) -func NoDebugStack() (FinishOption) -func StackFrames(uint) (FinishOption) -func WithError(error) (FinishOption) -func WithFinishConfig(*FinishConfig) (FinishOption) - -// Types -type FinishConfig struct { - Error error - FinishTime time.Time - NoDebugStack bool - SkipStackFrames uint - StackFrames uint -} - -type FinishOption func(*FinishConfig)() - -type StartSpanConfig struct { - Context context.Context - Parent *SpanContext - SpanID uint64 - SpanLinks []SpanLink - StartTime time.Time - Tags map[string]interface{} -} - -type StartSpanOption func(*StartSpanConfig)() - -// File: span_event_config.go - -// Package Functions -func WithSpanEventAttributes(map[string]any) (SpanEventOption) -func WithSpanEventTimestamp(time.Time) (SpanEventOption) - -// Types -type SpanEventConfig struct { - Attributes map[string]any - Time time.Time -} - -type SpanEventOption func(*SpanEventConfig)() - -// File: spancontext.go - -// Package Functions -func FromGenericCtx(ddtrace.SpanContext) (*SpanContext) - -// Types -type SpanContext struct {} - -func (*SpanContext) ForeachBaggageItem(func(string)(bool)) -func (*SpanContext) SamplingPriority() (int, bool) -func (*SpanContext) SpanID() (uint64) -func (*SpanContext) SpanLinks() ([]SpanLink) -func (*SpanContext) TraceID() (string) -func (*SpanContext) TraceIDBytes() ([16]byte) -func (*SpanContext) TraceIDLower() (uint64) -func (*SpanContext) TraceIDUpper() (uint64) - -// File: spanlink.go - -// Types -type SpanLink struct { - Attributes map[string]string - Flags uint32 - SpanID uint64 - TraceID uint64 - TraceIDHigh uint64 - Tracestate string -} - -// File: sqlcomment.go - -// Types -type DBMPropagationMode string - -type SQLCommentCarrier struct { - DBServiceName string - Mode DBMPropagationMode - PeerDBHostname string - PeerDBName string - PeerService string - Query string - SpanID uint64 -} - -func (*SQLCommentCarrier) Extract() (*SpanContext, error) -func (*SQLCommentCarrier) Inject(*SpanContext) (error) - -// File: textmap.go - -// Package Functions -func NewPropagator(*PropagatorConfig, ...Propagator) (Propagator) - -// Types -type HTTPHeadersCarrier http.Header - -type PropagatorConfig struct { - B3 bool - BaggageHeader string - BaggagePrefix string - MaxTagsHeaderLen int - ParentHeader string - PriorityHeader string - TraceHeader string -} - -type TextMapCarrier map[string]string - -// File: tracer.go - -// Package Functions -func Extract(interface{}) (*SpanContext, error) -func Flush() -func Inject(*SpanContext, interface{}) (error) -func SetUser(*Span, string, ...UserMonitoringOption) -func Start(...StartOption) (error) -func StartSpan(string, ...StartSpanOption) (*Span) -func Stop() - -// Types -type Tracer interface { - func Extract(interface{}) (*SpanContext, error) - func Flush() - func Inject(*SpanContext, interface{}) (error) - func StartSpan(string, ...StartSpanOption) (*Span) - func Stop() - func TracerConf() (TracerConf) -} - -type TracerConf struct { - CanComputeStats bool - CanDropP0s bool - DebugAbandonedSpans bool - Disabled bool - EnvTag string - PartialFlush bool - PartialFlushMinSpans int - PeerServiceDefaults bool - PeerServiceMappings map[string]string - ServiceTag string - TracingAsTransport bool - VersionTag string -} - -// File: tracer_metadata.go - -// Types -type Metadata struct { - Hostname string - Language string - RuntimeID string - SchemaVersion uint8 - ServiceEnvironment string - ServiceName string - ServiceVersion string - Version string -} - diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_payload.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_payload.go deleted file mode 100644 index 285e1afe3d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_payload.go +++ /dev/null @@ -1,152 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package tracer - -import ( - "bytes" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/version" - "github.com/tinylib/msgp/msgp" -) - -// ciVisibilityPayload represents a payload specifically designed for CI Visibility events. -// It embeds the generic payload structure and adds methods to handle CI Visibility specific data. -type ciVisibilityPayload struct { - *payload - serializationTime time.Duration -} - -// push adds a new CI Visibility event to the payload buffer. -// It grows the buffer to accommodate the new event, encodes the event in MessagePack format, and updates the event count. -// -// Parameters: -// -// event - The CI Visibility event to be added to the payload. -// -// Returns: -// -// An error if encoding the event fails. -func (p *ciVisibilityPayload) push(event *ciVisibilityEvent) error { - p.buf.Grow(event.Msgsize()) - startTime := time.Now() - defer func() { - p.serializationTime += time.Since(startTime) - }() - if err := msgp.Encode(&p.buf, event); err != nil { - return err - } - atomic.AddUint32(&p.count, 1) - p.updateHeader() - return nil -} - -// newCiVisibilityPayload creates a new instance of civisibilitypayload. -// -// Returns: -// -// A pointer to a newly initialized civisibilitypayload instance. -func newCiVisibilityPayload() *ciVisibilityPayload { - log.Debug("ciVisibilityPayload: creating payload instance") - return &ciVisibilityPayload{newPayload(), 0} -} - -// getBuffer retrieves the complete body of the CI Visibility payload, including metadata. -// It reads the current payload buffer, adds metadata, and encodes the entire payload in MessagePack format. -// -// Parameters: -// -// config - A pointer to the config structure containing environment settings. -// -// Returns: -// -// A pointer to a bytes.Buffer containing the encoded CI Visibility payload. -// An error if reading from the buffer or encoding the payload fails. -func (p *ciVisibilityPayload) getBuffer(config *config) (*bytes.Buffer, error) { - startTime := time.Now() - log.Debug("ciVisibilityPayload: .getBuffer (count: %d)", p.itemCount()) - - // Create a buffer to read the current payload - payloadBuf := new(bytes.Buffer) - if _, err := payloadBuf.ReadFrom(p.payload); err != nil { - return nil, err - } - - // Create the visibility payload - visibilityPayload := p.writeEnvelope(config.env, payloadBuf.Bytes()) - - // Create a new buffer to encode the visibility payload in MessagePack format - encodedBuf := new(bytes.Buffer) - if err := msgp.Encode(encodedBuf, visibilityPayload); err != nil { - return nil, err - } - - telemetry.EndpointPayloadEventsCount(telemetry.TestCycleEndpointType, float64(p.itemCount())) - telemetry.EndpointPayloadBytes(telemetry.TestCycleEndpointType, float64(encodedBuf.Len())) - telemetry.EndpointEventsSerializationMs(telemetry.TestCycleEndpointType, float64((p.serializationTime + time.Since(startTime)).Milliseconds())) - return encodedBuf, nil -} - -func (p *ciVisibilityPayload) writeEnvelope(env string, events []byte) *ciTestCyclePayload { - - /* - The Payload format in the CI Visibility protocol is like this: - { - "version": 1, - "metadata": { - "*": { - "runtime-id": "...", - "language": "...", - "library_version": "...", - "env": "..." - } - }, - "events": [ - // ... - ] - } - - The event format can be found in the `civisibility_tslv.go` file in the ciVisibilityEvent documentation - */ - - // Create the metadata map - allMetadata := map[string]string{ - "language": "go", - "runtime-id": globalconfig.RuntimeID(), - "library_version": version.Tag, - } - if env != "" { - allMetadata["env"] = env - } - - // Create the visibility payload - visibilityPayload := &ciTestCyclePayload{ - Version: 1, - Metadata: map[string]map[string]string{ - "*": allMetadata, - }, - Events: events, - } - - // Check for the test session name and append the tag at the metadata level - if testSessionName, ok := utils.GetCITags()[constants.TestSessionName]; ok { - testSessionMap := map[string]string{ - constants.TestSessionName: testSessionName, - } - visibilityPayload.Metadata["test_session_end"] = testSessionMap - visibilityPayload.Metadata["test_module_end"] = testSessionMap - visibilityPayload.Metadata["test_suite_end"] = testSessionMap - visibilityPayload.Metadata["test"] = testSessionMap - } - - return visibilityPayload -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_transport.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_transport.go deleted file mode 100644 index 184b6609cd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_transport.go +++ /dev/null @@ -1,209 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package tracer - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "net/http" - "os" - "runtime" - "strings" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -// Constants for CI Visibility API paths and subdomains. -const ( - TestCycleSubdomain = "citestcycle-intake" // Subdomain for test cycle intake. - TestCyclePath = "api/v2/citestcycle" // API path for test cycle. - EvpProxyPath = "evp_proxy/v2" // Path for EVP proxy. -) - -// Ensure that civisibilityTransport implements the transport interface. -var _ transport = (*ciVisibilityTransport)(nil) - -// ciVisibilityTransport is a structure that handles sending CI Visibility payloads -// to the Datadog endpoint, either in agentless mode or through the EVP proxy. -type ciVisibilityTransport struct { - config *config // Configuration for the tracer. - testCycleURLPath string // URL path for the test cycle endpoint. - headers map[string]string // HTTP headers to be included in the requests. - agentless bool // Gets if the transport is configured in agentless mode (eg: Gzip support) -} - -// newCiVisibilityTransport creates and initializes a new civisibilityTransport -// based on the provided tracer configuration. It sets up the appropriate headers -// and determines the URL path based on whether agentless mode is enabled. -// -// Parameters: -// -// config - The tracer configuration. -// -// Returns: -// -// A pointer to an initialized civisibilityTransport instance. -func newCiVisibilityTransport(config *config) *ciVisibilityTransport { - // Initialize the default headers with encoder metadata. - defaultHeaders := map[string]string{ - "Datadog-Meta-Lang": "go", - "Datadog-Meta-Lang-Version": strings.TrimPrefix(runtime.Version(), "go"), - "Datadog-Meta-Lang-Interpreter": runtime.Compiler + "-" + runtime.GOARCH + "-" + runtime.GOOS, - "Datadog-Meta-Tracer-Version": version.Tag, - "Content-Type": "application/msgpack", - } - if cid := internal.ContainerID(); cid != "" { - defaultHeaders["Datadog-Container-ID"] = cid - } - if eid := internal.EntityID(); eid != "" { - defaultHeaders["Datadog-Entity-ID"] = eid - } - - // Determine if agentless mode is enabled through an environment variable. - agentlessEnabled := internal.BoolEnv(constants.CIVisibilityAgentlessEnabledEnvironmentVariable, false) - - testCycleURL := "" - if agentlessEnabled { - // Agentless mode is enabled. - APIKeyValue := os.Getenv(constants.APIKeyEnvironmentVariable) - if APIKeyValue == "" { - log.Error("An API key is required for agentless mode. Use the DD_API_KEY env variable to set it") - } - - defaultHeaders["dd-api-key"] = APIKeyValue - - // Check for a custom agentless URL. - agentlessURL := "" - if v := os.Getenv(constants.CIVisibilityAgentlessURLEnvironmentVariable); v != "" { - agentlessURL = v - } - - if agentlessURL == "" { - // Use the standard agentless URL format. - site := "datadoghq.com" - if v := os.Getenv("DD_SITE"); v != "" { - site = v - } - - testCycleURL = fmt.Sprintf("https://%s.%s/%s", TestCycleSubdomain, site, TestCyclePath) - } else { - // Use the custom agentless URL. - testCycleURL = fmt.Sprintf("%s/%s", agentlessURL, TestCyclePath) - } - } else { - // Use agent mode with the EVP proxy. - defaultHeaders["X-Datadog-EVP-Subdomain"] = TestCycleSubdomain - testCycleURL = fmt.Sprintf("%s/%s/%s", config.agentURL.String(), EvpProxyPath, TestCyclePath) - } - log.Debug("ciVisibilityTransport: creating transport instance [agentless: %t, testcycleurl: %s]", agentlessEnabled, urlsanitizer.SanitizeURL(testCycleURL)) - - return &ciVisibilityTransport{ - config: config, - testCycleURLPath: testCycleURL, - headers: defaultHeaders, - agentless: agentlessEnabled, - } -} - -// send sends the CI Visibility payload to the Datadog endpoint. -// It prepares the payload, creates the HTTP request, and handles the response. -// -// Parameters: -// -// p - The payload to be sent. -// -// Returns: -// -// An io.ReadCloser for reading the response body, and an error if the operation fails. -func (t *ciVisibilityTransport) send(p *payload) (body io.ReadCloser, err error) { - ciVisibilityPayload := &ciVisibilityPayload{p, 0} - buffer, bufferErr := ciVisibilityPayload.getBuffer(t.config) - if bufferErr != nil { - return nil, fmt.Errorf("cannot create buffer payload: %v", bufferErr) - } - - if t.agentless { - // Compress payload - var gzipBuffer bytes.Buffer - gzipWriter := gzip.NewWriter(&gzipBuffer) - _, err = io.Copy(gzipWriter, buffer) - if err != nil { - return nil, fmt.Errorf("cannot compress request body: %s", err.Error()) - } - err = gzipWriter.Close() - if err != nil { - return nil, fmt.Errorf("cannot compress request body: %s", err.Error()) - } - buffer = &gzipBuffer - } - - req, err := http.NewRequest("POST", t.testCycleURLPath, buffer) - if err != nil { - return nil, fmt.Errorf("cannot create http request: %s", err.Error()) - } - req.ContentLength = int64(buffer.Len()) - for header, value := range t.headers { - req.Header.Set(header, value) - } - if t.agentless { - req.Header.Set("Content-Encoding", "gzip") - } - log.Debug("ciVisibilityTransport: sending transport request: %d bytes", buffer.Len()) - - startTime := time.Now() - response, err := t.config.httpClient.Do(req) - telemetry.EndpointPayloadRequestsMs(telemetry.TestCycleEndpointType, float64(time.Since(startTime).Milliseconds())) - if err != nil { - return nil, err - } - if code := response.StatusCode; code >= 400 { - // error, check the body for context information and - // return a nice error. - msg := make([]byte, 1000) - n, _ := response.Body.Read(msg) - _ = response.Body.Close() - txt := http.StatusText(code) - telemetry.EndpointPayloadRequestsErrors(telemetry.TestCycleEndpointType, telemetry.GetErrorTypeFromStatusCode(code)) - if n > 0 { - return nil, fmt.Errorf("%s (Status: %s)", msg[:n], txt) - } - return nil, fmt.Errorf("%s", txt) - } - return response.Body, nil -} - -// sendStats is a no-op for CI Visibility transport as it does not support sending stats payloads. -// -// Parameters: -// -// payload - The stats payload to be sent. -// -// Returns: -// -// An error indicating that stats are not supported. -func (t *ciVisibilityTransport) sendStats(*pb.ClientStatsPayload, int) error { - // Stats are not supported by CI Visibility agentless / EVP proxy. - return nil -} - -// endpoint returns the URL path of the test cycle endpoint. -// -// Returns: -// -// The URL path as a string. -func (t *ciVisibilityTransport) endpoint() string { - return t.testCycleURLPath -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv.go deleted file mode 100644 index 22b10877ff..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv.go +++ /dev/null @@ -1,443 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -//go:generate go run github.com/tinylib/msgp -unexported -marshal=false -o=civisibility_tslv_msgp.go -tests=false - -package tracer - -import ( - "strconv" - - "github.com/DataDog/dd-trace-go/v2/ddtrace" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/tinylib/msgp/msgp" -) - -type ( - // ciTestCyclePayloadList implements msgp.Decodable on top of a slice of ciVisibilityPayloads. - // This type is only used in tests. - ciTestCyclePayloadList []*ciTestCyclePayload - - // ciVisibilityEvents is a slice of ciVisibilityEvent pointers. - ciVisibilityEvents []*ciVisibilityEvent -) - -// Ensure that ciVisibilityEvent and related types implement necessary interfaces. -var ( - _ msgp.Encodable = (*ciVisibilityEvent)(nil) - _ msgp.Decodable = (*ciVisibilityEvent)(nil) - - _ msgp.Encodable = (*ciVisibilityEvents)(nil) - _ msgp.Decodable = (*ciVisibilityEvents)(nil) - - _ msgp.Encodable = (*ciTestCyclePayload)(nil) - _ msgp.Decodable = (*ciTestCyclePayloadList)(nil) -) - -// ciTestCyclePayload represents the payload for CI test cycles, including version, metadata, and events. -type ciTestCyclePayload struct { - Version int32 `msg:"version"` // Version of the payload format - Metadata map[string]map[string]string `msg:"metadata"` // Metadata associated with the payload - Events msgp.Raw `msg:"events"` // Encoded events data -} - -// ciVisibilityEvent represents a CI visibility event, including type, version, and content. -// According to the CI Visibility event specification it has the following format for tests: -// -// { -// "type": "test", -// "version": 2, -// "content": { -// "type": "test", -// "trace_id": 123456, -// "span_id": 654321, -// "parent_id": 0, -// "test_session_id": 123456789, -// "test_module_id": 234567890, -// "test_suite_id": 123123123, -// "name": "...", -// "resource": "...", -// "error": 0, -// "meta": { -// ... -// }, -// "metrics": { -// ... -// }, -// "start": 1654698415668011500, -// "duration": 796143, -// "service": "..." -// } -// } -// -// For test suites: -// -// { -// "type": "test_suite_end", -// "version": 1, -// "content": { -// "type": "test_suite_end", -// "test_module_id": 234567890, -// "test_session_id": 123456789, -// "test_suite_id": 123123123, -// "name": "...", -// "resource": "...", -// "error": 0, -// "meta": { -// ... -// }, -// "metrics": { -// ... -// }, -// "start": 1654698415668011500, -// "duration": 796143, -// "service": "..." -// } -// } -// -// For test modules: -// -// { -// "type": "test_module_end", -// "version": 1, -// "content": { -// "type": "test_module_end", -// "test_session_id": 123456789, -// "test_module_id": 234567890, -// "error": 0, -// "name": "...", -// "resource": "...", -// "meta": { -// ... -// }, -// "metrics": { -// ... -// }, -// "start": 1654698415668011500, -// "duration": 796143, -// "service": "..." -// } -// } -// -// For test sessions: -// -// { -// "type": "test_session_end", -// "version": 1, -// "content": { -// "type": "test_session_end", -// "test_session_id": 123456789, -// "name": "...", -// "resource": "...", -// "error": 0, -// "meta": { -// ... -// }, -// "metrics": { -// ... -// }, -// "start": 1654698415668011500, -// "duration": 796143, -// "service": "..." -// } -// } -// -// A complete specification for the meta and metrics maps for each type can be found at: https://github.com/DataDog/datadog-ci-spec/tree/main/spec/citest -type ciVisibilityEvent struct { - Type string `msg:"type"` // Type of the CI visibility event - Version int32 `msg:"version"` // Version of the event type - Content tslvSpan `msg:"content"` // Content of the event - - span *Span `msg:"-"` // Associated span (not marshaled) -} - -// SetTag sets a tag on the event's span and updates the content metadata and metrics. -// -// Parameters: -// -// key - The tag key. -// value - The tag value. -func (e *ciVisibilityEvent) SetTag(key string, value interface{}) { - e.span.SetTag(key, value) - e.Content.Meta = e.span.meta - e.Content.Metrics = e.span.metrics -} - -// SetOperationName sets the operation name of the event's span and updates the content name. -// -// Parameters: -// -// operationName - The new operation name. -func (e *ciVisibilityEvent) SetOperationName(operationName string) { - e.span.SetOperationName(operationName) - e.Content.Name = e.span.name -} - -// BaggageItem retrieves the baggage item associated with the given key from the event's span. -// -// Parameters: -// -// key - The baggage item key. -// -// Returns: -// -// The baggage item value. -func (e *ciVisibilityEvent) BaggageItem(key string) string { - return e.span.BaggageItem(key) -} - -// SetBaggageItem sets a baggage item on the event's span. -// -// Parameters: -// -// key - The baggage item key. -// val - The baggage item value. -func (e *ciVisibilityEvent) SetBaggageItem(key, val string) { - e.span.SetBaggageItem(key, val) -} - -// Finish completes the event's span with optional finish options. -// -// Parameters: -// -// opts - Optional finish options. -func (e *ciVisibilityEvent) Finish(opts ...FinishOption) { - e.span.Finish(opts...) -} - -// Context returns the span context of the event's span. -// -// Returns: -// -// The span context. -func (e *ciVisibilityEvent) Context() ddtrace.SpanContext { - return e.span.Context() -} - -// tslvSpan represents the detailed information of a span for CI visibility. -type tslvSpan struct { - SessionID uint64 `msg:"test_session_id,omitempty"` // identifier of this session - ModuleID uint64 `msg:"test_module_id,omitempty"` // identifier of this module - SuiteID uint64 `msg:"test_suite_id,omitempty"` // identifier of this suite - CorrelationID string `msg:"itr_correlation_id,omitempty"` // Correlation Id for Intelligent Test Runner transactions - Name string `msg:"name"` // operation name - Service string `msg:"service"` // service name (i.e. "grpc.server", "http.request") - Resource string `msg:"resource"` // resource name (i.e. "/user?id=123", "SELECT * FROM users") - Type string `msg:"type"` // protocol associated with the span (i.e. "web", "db", "cache") - Start int64 `msg:"start"` // span start time expressed in nanoseconds since epoch - Duration int64 `msg:"duration"` // duration of the span expressed in nanoseconds - SpanID uint64 `msg:"span_id,omitempty"` // identifier of this span - TraceID uint64 `msg:"trace_id,omitempty"` // lower 64-bits of the root span identifier - ParentID uint64 `msg:"parent_id,omitempty"` // identifier of the span's direct parent - Error int32 `msg:"error"` // error status of the span; 0 means no errors - Meta map[string]string `msg:"meta,omitempty"` // arbitrary map of metadata - Metrics map[string]float64 `msg:"metrics,omitempty"` // arbitrary map of numeric metrics -} - -// getCiVisibilityEvent creates a ciVisibilityEvent from a span based on the span type. -// -// Parameters: -// -// span - The span to convert into a ciVisibilityEvent. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func getCiVisibilityEvent(span *Span) *ciVisibilityEvent { - switch span.spanType { - case constants.SpanTypeTest: - return createTestEventFromSpan(span) - case constants.SpanTypeTestSuite: - return createTestSuiteEventFromSpan(span) - case constants.SpanTypeTestModule: - return createTestModuleEventFromSpan(span) - case constants.SpanTypeTestSession: - return createTestSessionEventFromSpan(span) - default: - return createSpanEventFromSpan(span) - } -} - -// createTestEventFromSpan creates a ciVisibilityEvent of type Test from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func createTestEventFromSpan(span *Span) *ciVisibilityEvent { - tSpan := createTslvSpan(span) - tSpan.ParentID = 0 - tSpan.SessionID = getAndRemoveMetaToUInt64(span, constants.TestSessionIDTag) - tSpan.ModuleID = getAndRemoveMetaToUInt64(span, constants.TestModuleIDTag) - tSpan.SuiteID = getAndRemoveMetaToUInt64(span, constants.TestSuiteIDTag) - tSpan.CorrelationID = getAndRemoveMeta(span, constants.ItrCorrelationIDTag) - tSpan.SpanID = span.spanID - tSpan.TraceID = span.traceID - return &ciVisibilityEvent{ - span: span, - Type: constants.SpanTypeTest, - Version: 2, - Content: tSpan, - } -} - -// createTestSuiteEventFromSpan creates a ciVisibilityEvent of type TestSuite from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func createTestSuiteEventFromSpan(span *Span) *ciVisibilityEvent { - tSpan := createTslvSpan(span) - tSpan.ParentID = 0 - tSpan.SessionID = getAndRemoveMetaToUInt64(span, constants.TestSessionIDTag) - tSpan.ModuleID = getAndRemoveMetaToUInt64(span, constants.TestModuleIDTag) - tSpan.SuiteID = getAndRemoveMetaToUInt64(span, constants.TestSuiteIDTag) - return &ciVisibilityEvent{ - span: span, - Type: constants.SpanTypeTestSuite, - Version: 1, - Content: tSpan, - } -} - -// createTestModuleEventFromSpan creates a ciVisibilityEvent of type TestModule from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func createTestModuleEventFromSpan(span *Span) *ciVisibilityEvent { - tSpan := createTslvSpan(span) - tSpan.ParentID = 0 - tSpan.SessionID = getAndRemoveMetaToUInt64(span, constants.TestSessionIDTag) - tSpan.ModuleID = getAndRemoveMetaToUInt64(span, constants.TestModuleIDTag) - return &ciVisibilityEvent{ - span: span, - Type: constants.SpanTypeTestModule, - Version: 1, - Content: tSpan, - } -} - -// createTestSessionEventFromSpan creates a ciVisibilityEvent of type TestSession from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func createTestSessionEventFromSpan(span *Span) *ciVisibilityEvent { - tSpan := createTslvSpan(span) - tSpan.ParentID = 0 - tSpan.SessionID = getAndRemoveMetaToUInt64(span, constants.TestSessionIDTag) - return &ciVisibilityEvent{ - span: span, - Type: constants.SpanTypeTestSession, - Version: 1, - Content: tSpan, - } -} - -// createSpanEventFromSpan creates a ciVisibilityEvent of type Span from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// A pointer to the created ciVisibilityEvent. -func createSpanEventFromSpan(span *Span) *ciVisibilityEvent { - tSpan := createTslvSpan(span) - tSpan.SpanID = span.spanID - tSpan.TraceID = span.traceID - return &ciVisibilityEvent{ - span: span, - Type: constants.SpanTypeSpan, - Version: 1, - Content: tSpan, - } -} - -// createTslvSpan creates a tslvSpan from a span. -// -// Parameters: -// -// span - The span to convert. -// -// Returns: -// -// The created tslvSpan. -func createTslvSpan(span *Span) tslvSpan { - return tslvSpan{ - Name: span.name, - Service: span.service, - Resource: span.resource, - Type: span.spanType, - Start: span.start, - Duration: span.duration, - ParentID: span.parentID, - Error: span.error, - Meta: span.meta, - Metrics: span.metrics, - } -} - -// getAndRemoveMeta retrieves a metadata value from a span and removes it from the span's metadata and metrics. -// -// Parameters: -// -// span - The span to modify. -// key - The metadata key to retrieve and remove. -// -// Returns: -// -// The retrieved metadata value. -func getAndRemoveMeta(span *Span, key string) string { - span.mu.Lock() - defer span.mu.Unlock() - if span.meta == nil { - span.meta = make(map[string]string, 1) - } - - if v, ok := span.meta[key]; ok { - delete(span.meta, key) - delete(span.metrics, key) - return v - } - - return "" -} - -// getAndRemoveMetaToUInt64 retrieves a metadata value from a span, removes it, and converts it to a uint64. -// -// Parameters: -// -// span - The span to modify. -// key - The metadata key to retrieve and convert. -// -// Returns: -// -// The retrieved and converted metadata value as a uint64. -func getAndRemoveMetaToUInt64(span *Span, key string) uint64 { - strValue := getAndRemoveMeta(span, key) - i, err := strconv.ParseUint(strValue, 10, 64) - if err != nil { - return 0 - } - return i -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv_msgp.go deleted file mode 100644 index 179ced685d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_tslv_msgp.go +++ /dev/null @@ -1,925 +0,0 @@ -package tracer - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *ciTestCyclePayload) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "version": - z.Version, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "metadata": - var zb0002 uint32 - zb0002, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Metadata") - return - } - if z.Metadata == nil { - z.Metadata = make(map[string]map[string]string, zb0002) - } else if len(z.Metadata) > 0 { - for key := range z.Metadata { - delete(z.Metadata, key) - } - } - for zb0002 > 0 { - zb0002-- - var za0001 string - var za0002 map[string]string - za0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Metadata") - return - } - var zb0003 uint32 - zb0003, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001) - return - } - if za0002 == nil { - za0002 = make(map[string]string, zb0003) - } else if len(za0002) > 0 { - for key := range za0002 { - delete(za0002, key) - } - } - for zb0003 > 0 { - zb0003-- - var za0003 string - var za0004 string - za0003, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001) - return - } - za0004, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001, za0003) - return - } - za0002[za0003] = za0004 - } - z.Metadata[za0001] = za0002 - } - case "events": - err = z.Events.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Events") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *ciTestCyclePayload) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 3 - // write "version" - err = en.Append(0x83, 0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt32(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - // write "metadata" - err = en.Append(0xa8, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Metadata))) - if err != nil { - err = msgp.WrapError(err, "Metadata") - return - } - for za0001, za0002 := range z.Metadata { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "Metadata") - return - } - err = en.WriteMapHeader(uint32(len(za0002))) - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001) - return - } - for za0003, za0004 := range za0002 { - err = en.WriteString(za0003) - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001) - return - } - err = en.WriteString(za0004) - if err != nil { - err = msgp.WrapError(err, "Metadata", za0001, za0003) - return - } - } - } - // write "events" - err = en.Append(0xa6, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73) - if err != nil { - return - } - err = z.Events.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Events") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *ciTestCyclePayload) Msgsize() (s int) { - s = 1 + 8 + msgp.Int32Size + 9 + msgp.MapHeaderSize - if z.Metadata != nil { - for za0001, za0002 := range z.Metadata { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.MapHeaderSize - if za0002 != nil { - for za0003, za0004 := range za0002 { - _ = za0004 - s += msgp.StringPrefixSize + len(za0003) + msgp.StringPrefixSize + len(za0004) - } - } - } - } - s += 7 + z.Events.Msgsize() - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ciTestCyclePayloadList) DecodeMsg(dc *msgp.Reader) (err error) { - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(ciTestCyclePayloadList, zb0002) - } - for zb0001 := range *z { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - (*z)[zb0001] = nil - } else { - if (*z)[zb0001] == nil { - (*z)[zb0001] = new(ciTestCyclePayload) - } - err = (*z)[zb0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z ciTestCyclePayloadList) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteArrayHeader(uint32(len(z))) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0003 := range z { - if z[zb0003] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z[zb0003].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, zb0003) - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z ciTestCyclePayloadList) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0003 := range z { - if z[zb0003] == nil { - s += msgp.NilSize - } else { - s += z[zb0003].Msgsize() - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ciVisibilityEvent) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - z.Type, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "version": - z.Version, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "content": - err = z.Content.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Content") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *ciVisibilityEvent) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 3 - // write "type" - err = en.Append(0x83, 0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Type) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - // write "version" - err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt32(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - // write "content" - err = en.Append(0xa7, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74) - if err != nil { - return - } - err = z.Content.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Content") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *ciVisibilityEvent) Msgsize() (s int) { - s = 1 + 5 + msgp.StringPrefixSize + len(z.Type) + 8 + msgp.Int32Size + 8 + z.Content.Msgsize() - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ciVisibilityEvents) DecodeMsg(dc *msgp.Reader) (err error) { - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(ciVisibilityEvents, zb0002) - } - for zb0001 := range *z { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - (*z)[zb0001] = nil - } else { - if (*z)[zb0001] == nil { - (*z)[zb0001] = new(ciVisibilityEvent) - } - var field []byte - _ = field - var zb0003 uint32 - zb0003, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - for zb0003 > 0 { - zb0003-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - switch msgp.UnsafeString(field) { - case "type": - (*z)[zb0001].Type, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, zb0001, "Type") - return - } - case "version": - (*z)[zb0001].Version, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, zb0001, "Version") - return - } - case "content": - err = (*z)[zb0001].Content.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, zb0001, "Content") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z ciVisibilityEvents) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteArrayHeader(uint32(len(z))) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0004 := range z { - if z[zb0004] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - // map header, size 3 - // write "type" - err = en.Append(0x83, 0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z[zb0004].Type) - if err != nil { - err = msgp.WrapError(err, zb0004, "Type") - return - } - // write "version" - err = en.Append(0xa7, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt32(z[zb0004].Version) - if err != nil { - err = msgp.WrapError(err, zb0004, "Version") - return - } - // write "content" - err = en.Append(0xa7, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74) - if err != nil { - return - } - err = z[zb0004].Content.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, zb0004, "Content") - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z ciVisibilityEvents) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0004 := range z { - if z[zb0004] == nil { - s += msgp.NilSize - } else { - s += 1 + 5 + msgp.StringPrefixSize + len(z[zb0004].Type) + 8 + msgp.Int32Size + 8 + z[zb0004].Content.Msgsize() - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *tslvSpan) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "test_session_id": - z.SessionID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "SessionID") - return - } - case "test_module_id": - z.ModuleID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "ModuleID") - return - } - case "test_suite_id": - z.SuiteID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "SuiteID") - return - } - case "itr_correlation_id": - z.CorrelationID, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "CorrelationID") - return - } - case "name": - z.Name, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - case "service": - z.Service, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "resource": - z.Resource, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Resource") - return - } - case "type": - z.Type, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "start": - z.Start, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - case "duration": - z.Duration, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "span_id": - z.SpanID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - case "trace_id": - z.TraceID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - case "parent_id": - z.ParentID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "ParentID") - return - } - case "error": - z.Error, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Error") - return - } - case "meta": - var zb0002 uint32 - zb0002, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - if z.Meta == nil { - z.Meta = make(map[string]string, zb0002) - } else if len(z.Meta) > 0 { - for key := range z.Meta { - delete(z.Meta, key) - } - } - for zb0002 > 0 { - zb0002-- - var za0001 string - var za0002 string - za0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - za0002, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Meta", za0001) - return - } - z.Meta[za0001] = za0002 - } - case "metrics": - var zb0003 uint32 - zb0003, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - if z.Metrics == nil { - z.Metrics = make(map[string]float64, zb0003) - } else if len(z.Metrics) > 0 { - for key := range z.Metrics { - delete(z.Metrics, key) - } - } - for zb0003 > 0 { - zb0003-- - var za0003 string - var za0004 float64 - za0003, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - za0004, err = dc.ReadFloat64() - if err != nil { - err = msgp.WrapError(err, "Metrics", za0003) - return - } - z.Metrics[za0003] = za0004 - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *tslvSpan) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(16) - var zb0001Mask uint16 /* 16 bits */ - _ = zb0001Mask - if z.SessionID == 0 { - zb0001Len-- - zb0001Mask |= 0x1 - } - if z.ModuleID == 0 { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.SuiteID == 0 { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.CorrelationID == "" { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.SpanID == 0 { - zb0001Len-- - zb0001Mask |= 0x400 - } - if z.TraceID == 0 { - zb0001Len-- - zb0001Mask |= 0x800 - } - if z.ParentID == 0 { - zb0001Len-- - zb0001Mask |= 0x1000 - } - if z.Meta == nil { - zb0001Len-- - zb0001Mask |= 0x4000 - } - if z.Metrics == nil { - zb0001Len-- - zb0001Mask |= 0x8000 - } - // variable map header, size zb0001Len - err = en.WriteMapHeader(zb0001Len) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "test_session_id" - err = en.Append(0xaf, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.SessionID) - if err != nil { - err = msgp.WrapError(err, "SessionID") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "test_module_id" - err = en.Append(0xae, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.ModuleID) - if err != nil { - err = msgp.WrapError(err, "ModuleID") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "test_suite_id" - err = en.Append(0xad, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x75, 0x69, 0x74, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.SuiteID) - if err != nil { - err = msgp.WrapError(err, "SuiteID") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "itr_correlation_id" - err = en.Append(0xb2, 0x69, 0x74, 0x72, 0x5f, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteString(z.CorrelationID) - if err != nil { - err = msgp.WrapError(err, "CorrelationID") - return - } - } - // write "name" - err = en.Append(0xa4, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Name) - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - // write "service" - err = en.Append(0xa7, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Service) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - // write "resource" - err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Resource) - if err != nil { - err = msgp.WrapError(err, "Resource") - return - } - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Type) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - // write "start" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x72, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.Start) - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - // write "duration" - err = en.Append(0xa8, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt64(z.Duration) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - if (zb0001Mask & 0x400) == 0 { // if not omitted - // write "span_id" - err = en.Append(0xa7, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.SpanID) - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - } - if (zb0001Mask & 0x800) == 0 { // if not omitted - // write "trace_id" - err = en.Append(0xa8, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.TraceID) - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - } - if (zb0001Mask & 0x1000) == 0 { // if not omitted - // write "parent_id" - err = en.Append(0xa9, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.ParentID) - if err != nil { - err = msgp.WrapError(err, "ParentID") - return - } - } - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - if err != nil { - return - } - err = en.WriteInt32(z.Error) - if err != nil { - err = msgp.WrapError(err, "Error") - return - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // write "meta" - err = en.Append(0xa4, 0x6d, 0x65, 0x74, 0x61) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Meta))) - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - for za0001, za0002 := range z.Meta { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "Meta") - return - } - err = en.WriteString(za0002) - if err != nil { - err = msgp.WrapError(err, "Meta", za0001) - return - } - } - } - if (zb0001Mask & 0x8000) == 0 { // if not omitted - // write "metrics" - err = en.Append(0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Metrics))) - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - for za0003, za0004 := range z.Metrics { - err = en.WriteString(za0003) - if err != nil { - err = msgp.WrapError(err, "Metrics") - return - } - err = en.WriteFloat64(za0004) - if err != nil { - err = msgp.WrapError(err, "Metrics", za0003) - return - } - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *tslvSpan) Msgsize() (s int) { - s = 3 + 16 + msgp.Uint64Size + 15 + msgp.Uint64Size + 14 + msgp.Uint64Size + 19 + msgp.StringPrefixSize + len(z.CorrelationID) + 5 + msgp.StringPrefixSize + len(z.Name) + 8 + msgp.StringPrefixSize + len(z.Service) + 9 + msgp.StringPrefixSize + len(z.Resource) + 5 + msgp.StringPrefixSize + len(z.Type) + 6 + msgp.Int64Size + 9 + msgp.Int64Size + 8 + msgp.Uint64Size + 9 + msgp.Uint64Size + 10 + msgp.Uint64Size + 6 + msgp.Int32Size + 5 + msgp.MapHeaderSize - if z.Meta != nil { - for za0001, za0002 := range z.Meta { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.StringPrefixSize + len(za0002) - } - } - s += 8 + msgp.MapHeaderSize - if z.Metrics != nil { - for za0003, za0004 := range z.Metrics { - _ = za0004 - s += msgp.StringPrefixSize + len(za0003) + msgp.Float64Size - } - } - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_writer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_writer.go deleted file mode 100644 index d50f6c25a6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/civisibility_writer.go +++ /dev/null @@ -1,130 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package tracer - -import ( - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// Constants defining the payload size limits for agentless mode. -const ( - // agentlessPayloadMaxLimit is the maximum payload size allowed, indicating the - // maximum size of the package that the intake can receive. - agentlessPayloadMaxLimit = 5 * 1024 * 1024 // 5 MB - - // agentlessPayloadSizeLimit specifies the maximum allowed size of the payload before - // it triggers a flush to the transport. - agentlessPayloadSizeLimit = agentlessPayloadMaxLimit / 2 -) - -// Ensure that ciVisibilityTraceWriter implements the traceWriter interface. -var _ traceWriter = (*ciVisibilityTraceWriter)(nil) - -// ciVisibilityTraceWriter is responsible for buffering and sending CI visibility trace data -// to the Datadog backend. It manages the payload size and flushes the data when necessary. -type ciVisibilityTraceWriter struct { - config *config // Configuration for the tracer. - payload *ciVisibilityPayload // Encodes and buffers events in msgpack format. - climit chan struct{} // Limits the number of concurrent outgoing connections. - wg sync.WaitGroup // Waits for all uploads to finish. -} - -// newCiVisibilityTraceWriter creates a new instance of ciVisibilityTraceWriter. -// -// Parameters: -// -// c - The tracer configuration. -// -// Returns: -// -// A pointer to an initialized ciVisibilityTraceWriter. -func newCiVisibilityTraceWriter(c *config) *ciVisibilityTraceWriter { - log.Debug("ciVisibilityTraceWriter: creating trace writer instance") - return &ciVisibilityTraceWriter{ - config: c, - payload: newCiVisibilityPayload(), - climit: make(chan struct{}, concurrentConnectionLimit), - } -} - -// add adds a new trace to the payload. If the payload size exceeds the limit, -// it triggers a flush to send the data. -// -// Parameters: -// -// trace - A slice of spans representing the trace to be added. -func (w *ciVisibilityTraceWriter) add(trace []*Span) { - telemetry.EventsEnqueueForSerialization() - for _, s := range trace { - cvEvent := getCiVisibilityEvent(s) - if err := w.payload.push(cvEvent); err != nil { - log.Error("ciVisibilityTraceWriter: Error encoding msgpack: %s", err.Error()) - } - if w.payload.size() > agentlessPayloadSizeLimit { - w.flush() - } - } -} - -// stop stops the trace writer, ensuring all data is flushed and all uploads are completed. -func (w *ciVisibilityTraceWriter) stop() { - w.flush() - w.wg.Wait() -} - -// flush sends the current payload to the transport. It ensures that the payload is reset -// and the resources are freed after the flush operation is completed. -func (w *ciVisibilityTraceWriter) flush() { - if w.payload.itemCount() == 0 { - return - } - - w.wg.Add(1) - w.climit <- struct{}{} - oldp := w.payload - w.payload = newCiVisibilityPayload() - - go func(p *ciVisibilityPayload) { - defer func(_ time.Time) { - // Once the payload has been used, clear the buffer for garbage - // collection to avoid a memory leak when references to this object - // may still be kept by faulty transport implementations or the - // standard library. See dd-trace-go#976 - p.clear() - - <-w.climit - w.wg.Done() - }(time.Now()) - - var count, size int - var err error - - requestCompressedType := telemetry.UncompressedRequestCompressedType - if ciTransport, ok := w.config.transport.(*ciVisibilityTransport); ok && ciTransport.agentless { - requestCompressedType = telemetry.CompressedRequestCompressedType - } - telemetry.EndpointPayloadRequests(telemetry.TestCycleEndpointType, requestCompressedType) - - for attempt := 0; attempt <= w.config.sendRetries; attempt++ { - size, count = p.size(), p.itemCount() - log.Debug("ciVisibilityTraceWriter: sending payload: size: %d events: %d\n", size, count) - _, err = w.config.transport.send(p.payload) - if err == nil { - log.Debug("ciVisibilityTraceWriter: sent events after %d attempts", attempt+1) - return - } - log.Error("ciVisibilityTraceWriter: failure sending events (attempt %d of %d): %v", attempt+1, w.config.sendRetries+1, err.Error()) - p.reset() - time.Sleep(w.config.retryInterval) - } - log.Error("ciVisibilityTraceWriter: lost %d events: %v", count, err.Error()) - telemetry.EndpointPayloadDropped(telemetry.TestCycleEndpointType) - }(oldp) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/context.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/context.go deleted file mode 100644 index 75fff356a5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/context.go +++ /dev/null @@ -1,57 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/options" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" -) - -// ContextWithSpan returns a copy of the given context which includes the span s. -func ContextWithSpan(ctx context.Context, s *Span) context.Context { - return orchestrion.CtxWithValue(ctx, internal.ActiveSpanKey, s) -} - -// SpanFromContext returns the span contained in the given context. A second return -// value indicates if a span was found in the context. If no span is found, a no-op -// span is returned. -func SpanFromContext(ctx context.Context) (*Span, bool) { - if ctx == nil { - return nil, false - } - v := orchestrion.WrapContext(ctx).Value(internal.ActiveSpanKey) - if s, ok := v.(*Span); ok { - // We may have a nil *Span wrapped in an interface in the GLS context stack, - // in which case we need to act a if there was nothing (for else we'll - // forcefully un-do a [ChildOf] option if one was passed). - return s, s != nil - } - return nil, false -} - -// StartSpanFromContext returns a new span with the given operation name and options. If a span -// is found in the context, it will be used as the parent of the resulting span. If the ChildOf -// option is passed, it will only be used as the parent if there is no span found in `ctx`. -func StartSpanFromContext(ctx context.Context, operationName string, opts ...StartSpanOption) (*Span, context.Context) { - // copy opts in case the caller reuses the slice in parallel - // we will add at least 1, at most 2 items - optsLocal := options.Expand(opts, 0, 2) - if ctx == nil { - // default to context.Background() to avoid panics on Go >= 1.15 - ctx = context.Background() - } else if s, ok := SpanFromContext(ctx); ok { - optsLocal = append(optsLocal, ChildOf(s.Context())) - } - optsLocal = append(optsLocal, withContext(ctx)) - s := StartSpan(operationName, optsLocal...) - if s != nil && s.pprofCtxActive != nil { - ctx = s.pprofCtxActive - } - return s, ContextWithSpan(ctx, s) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/data_streams.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/data_streams.go deleted file mode 100644 index c79f309168..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/data_streams.go +++ /dev/null @@ -1,73 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/datastreams/options" - idatastreams "github.com/DataDog/dd-trace-go/v2/internal/datastreams" -) - -// dataStreamsContainer is an object that contains a data streams processor. -type dataStreamsContainer interface { - GetDataStreamsProcessor() *idatastreams.Processor -} - -// GetDataStreamsProcessor returns the processor tracking data streams stats -func (t *tracer) GetDataStreamsProcessor() *idatastreams.Processor { - return t.dataStreams -} - -// SetDataStreamsCheckpoint sets a consume or produce checkpoint in a Data Streams pathway. -// This enables tracking data flow & end to end latency. -// To learn more about the data streams product, see: https://docs.datadoghq.com/data_streams/go/ -func SetDataStreamsCheckpoint(ctx context.Context, edgeTags ...string) (outCtx context.Context, ok bool) { - return SetDataStreamsCheckpointWithParams(ctx, options.CheckpointParams{}, edgeTags...) -} - -// SetDataStreamsCheckpointWithParams sets a consume or produce checkpoint in a Data Streams pathway. -// This enables tracking data flow & end to end latency. -// To learn more about the data streams product, see: https://docs.datadoghq.com/data_streams/go/ -func SetDataStreamsCheckpointWithParams(ctx context.Context, params options.CheckpointParams, edgeTags ...string) (outCtx context.Context, ok bool) { - if t, ok := getGlobalTracer().(dataStreamsContainer); ok { - if processor := t.GetDataStreamsProcessor(); processor != nil { - outCtx = processor.SetCheckpointWithParams(ctx, params, edgeTags...) - return outCtx, true - } - } - return ctx, false -} - -// TrackKafkaCommitOffset should be used in the consumer, to track when it acks offset. -// if used together with TrackKafkaProduceOffset it can generate a Kafka lag in seconds metric. -func TrackKafkaCommitOffset(group, topic string, partition int32, offset int64) { - if t, ok := getGlobalTracer().(dataStreamsContainer); ok { - if p := t.GetDataStreamsProcessor(); p != nil { - p.TrackKafkaCommitOffset(group, topic, partition, offset) - } - } -} - -// TrackKafkaProduceOffset should be used in the producer, to track when it produces a message. -// if used together with TrackKafkaCommitOffset it can generate a Kafka lag in seconds metric. -func TrackKafkaProduceOffset(topic string, partition int32, offset int64) { - if t, ok := getGlobalTracer().(dataStreamsContainer); ok { - if p := t.GetDataStreamsProcessor(); p != nil { - p.TrackKafkaProduceOffset(topic, partition, offset) - } - } -} - -// TrackKafkaHighWatermarkOffset should be used in the producer, to track when it produces a message. -// if used together with TrackKafkaCommitOffset it can generate a Kafka lag in seconds metric. -func TrackKafkaHighWatermarkOffset(cluster string, topic string, partition int32, offset int64) { - if t, ok := getGlobalTracer().(dataStreamsContainer); ok { - if p := t.GetDataStreamsProcessor(); p != nil { - p.TrackKafkaHighWatermarkOffset(cluster, topic, partition, offset) - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/doc.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/doc.go deleted file mode 100644 index 6b68d7f498..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/doc.go +++ /dev/null @@ -1,110 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package tracer contains Datadog's core tracing client. It is used to trace -// requests as they flow across web servers, databases and microservices, giving -// developers visibility into bottlenecks and troublesome requests. To start the -// tracer, simply call the start method along with an optional set of options. -// By default, the trace agent is considered to be found at "localhost:8126". In a -// setup where this would be different (let's say 127.0.0.1:1234), we could do: -// -// tracer.Start(tracer.WithAgentAddr("127.0.0.1:1234")) -// defer tracer.Stop() -// -// The tracing client can perform trace sampling. While the trace agent -// already samples traces to reduce bandwidth usage, client sampling reduces -// performance overhead. To make use of it, the package comes with a ready-to-use -// rate sampler that can be passed to the tracer. To use it and keep only 30% of the -// requests, one would do: -// -// s := tracer.NewRateSampler(0.3) -// tracer.Start(tracer.WithSampler(s)) -// -// More precise control of sampling rates can be configured using sampling rules. -// This can be applied based on span name, service or both, and is used to determine -// the sampling rate to apply. MaxPerSecond specifies max number of spans per second -// that can be sampled per the rule and applies only to sampling rules of type -// tracer.SamplingRuleSpan. If MaxPerSecond is not specified, the default is no limit. -// -// rules := []tracer.SamplingRule{ -// // sample 10% of traces with the span name "web.request" -// tracer.NameRule("web.request", 0.1), -// // sample 20% of traces for the service "test-service" -// tracer.ServiceRule("test-service", 0.2), -// // sample 30% of traces when the span name is "db.query" and the service -// // is "postgres.db" -// tracer.NameServiceRule("db.query", "postgres.db", 0.3), -// // sample 100% of traces when name and service match these regular expressions -// {Name: regexp.MustCompile("web\\..*"), Service: regexp.MustCompile("^test-"), Rate: 1.0}, -// // sample 50% of spans when service and name match these glob patterns with no limit on the number of spans -// tracer.SpanNameServiceRule("web.*", "test-*", 0.5), -// // sample 50% of spans when service and name match these glob patterns up to 100 spans per second -// tracer.SpanNameServiceMPSRule("web.*", "test-*", 0.5, 100), -// } -// tracer.Start(tracer.WithSamplingRules(rules)) -// defer tracer.Stop() -// -// Sampling rules can also be configured at runtime using the DD_TRACE_SAMPLING_RULES and -// DD_SPAN_SAMPLING_RULES environment variables. When set, it overrides rules set by tracer.WithSamplingRules. -// The value is a JSON array of objects. -// For trace sampling rules, the "sample_rate" field is required, the "name" and "service" fields are optional. -// For span sampling rules, the "name" and "service", if specified, must be a valid glob pattern, -// i.e. a string where "*" matches any contiguous substring, even an empty string, -// and "?" character matches exactly one of any character. -// The "sample_rate" field is optional, and if not specified, defaults to "1.0", sampling 100% of the spans. -// The "max_per_second" field is optional, and if not specified, defaults to 0, keeping all the previously sampled spans. -// -// export DD_TRACE_SAMPLING_RULES='[{"name": "web.request", "sample_rate": 1.0}]' -// export DD_SPAN_SAMPLING_RULES='[{"service":"test.?","name": "web.*", "sample_rate": 1.0, "max_per_second":100}]' -// -// To create spans, use the functions StartSpan and StartSpanFromContext. Both accept -// StartSpanOptions that can be used to configure the span. A span that is started -// with no parent will begin a new trace. See the function documentation for details -// on specific usage. Each trace has a hard limit of 100,000 spans, after which the -// trace will be dropped and give a diagnostic log message. In practice users should -// not approach this limit as traces of this size are not useful and impossible to -// visualize. -// -// See the contrib package ( https://pkg.go.dev/github.com/DataDog/dd-trace-go/v2/contrib ) -// for integrating datadog with various libraries, frameworks and clients. -// -// All spans created by the tracer contain a context hereby referred to as the span -// context. Note that this is different from Go's context. The span context is used -// to package essential information from a span, which is needed when creating child -// spans that inherit from it. Thus, a child span is created from a span's span context. -// The span context can originate from within the same process, but also a -// different process or even a different machine in the case of distributed tracing. -// -// To make use of distributed tracing, a span's context may be injected via a carrier -// into a transport (HTTP, RPC, etc.) to be extracted on the other end and used to -// create spans that are direct descendants of it. A couple of carrier interfaces -// which should cover most of the use-case scenarios are readily provided, such as -// HTTPCarrier and TextMapCarrier. Users are free to create their own, which will work -// with our propagation algorithm as long as they implement the TextMapReader and TextMapWriter -// interfaces. An example alternate implementation is the MDCarrier in our gRPC integration. -// -// As an example, injecting a span's context into an HTTP request would look like this. -// (See the net/http contrib package for more examples https://pkg.go.dev/github.com/DataDog/dd-trace-go/contrib/net/http/v2): -// -// req, err := http.NewRequest("GET", "http://example.com", nil) -// // ... -// err := tracer.Inject(span.Context(), tracer.HTTPHeadersCarrier(req.Header)) -// // ... -// http.DefaultClient.Do(req) -// -// Then, on the server side, to continue the trace one would do: -// -// sctx, err := tracer.Extract(tracer.HTTPHeadersCarrier(req.Header)) -// // ... -// span := tracer.StartSpan("child.span", tracer.ChildOf(sctx)) -// -// In the same manner, any means can be used as a carrier to inject a context into a transport. Go's -// context can also be used as a means to transport spans within the same process. The methods -// StartSpanFromContext, ContextWithSpan and SpanFromContext exist for this reason. -// -// Some libraries and frameworks are supported out-of-the-box by using one -// of our integrations. You can see a list of supported integrations here: -// https://pkg.go.dev/github.com/DataDog/dd-trace-go/v2/contrib -package tracer // import "github.com/DataDog/dd-trace-go/v2/ddtrace/tracer" diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/dynamic_config.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/dynamic_config.go deleted file mode 100644 index c2b679258e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/dynamic_config.go +++ /dev/null @@ -1,119 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -// dynamicConfig is a thread-safe generic data structure to represent configuration fields. -// It's designed to satisfy the dynamic configuration semantics (i.e reset, update, apply configuration changes). -// This structure will be extended to track the origin of configuration values as well (e.g remote_config, env_var). -type dynamicConfig[T any] struct { - sync.RWMutex - current T // holds the current configuration value - startup T // holds the startup configuration value - cfgName string // holds the name of the configuration, has to be compatible with telemetry.Configuration.Name - cfgOrigin telemetry.Origin // holds the origin of the current configuration value (currently only supports remote_config, empty otherwise) - apply func(T) bool // executes any config-specific operations to propagate the update properly, returns whether the update was applied - equal func(x, y T) bool // compares two configuration values, this is used to avoid unnecessary config and telemetry updates -} - -func newDynamicConfig[T any](name string, val T, apply func(T) bool, equal func(x, y T) bool) dynamicConfig[T] { - return dynamicConfig[T]{ - cfgName: name, - current: val, - startup: val, - cfgOrigin: telemetry.OriginDefault, - apply: apply, - equal: equal, - } -} - -// get returns the current configuration value -func (dc *dynamicConfig[T]) get() T { - dc.RLock() - defer dc.RUnlock() - return dc.current -} - -// update applies a new configuration value -func (dc *dynamicConfig[T]) update(val T, origin telemetry.Origin) bool { - dc.Lock() - defer dc.Unlock() - if dc.equal(dc.current, val) { - return false - } - dc.current = val - dc.cfgOrigin = origin - return dc.apply(val) -} - -// reset re-applies the startup configuration value -func (dc *dynamicConfig[T]) reset() bool { - dc.Lock() - defer dc.Unlock() - if dc.equal(dc.current, dc.startup) { - return false - } - dc.current = dc.startup - // TODO: set the origin to the startup value's origin - dc.cfgOrigin = telemetry.OriginDefault - return dc.apply(dc.startup) -} - -// handleRC processes a new configuration value from remote config -// Returns whether the configuration value has been updated or not -func (dc *dynamicConfig[T]) handleRC(val *T) bool { - if val != nil { - return dc.update(*val, telemetry.OriginRemoteConfig) - } - return dc.reset() -} - -// toTelemetry returns the current configuration value as telemetry.Configuration -func (dc *dynamicConfig[T]) toTelemetry() telemetry.Configuration { - dc.RLock() - defer dc.RUnlock() - return telemetry.Configuration{ - Name: dc.cfgName, - Value: dc.current, - Origin: dc.cfgOrigin, - } -} - -func equal[T comparable](x, y T) bool { - return x == y -} - -// equalSlice compares two slices of comparable values -// The comparison takes into account the order of the elements -func equalSlice[T comparable](x, y []T) bool { - if len(x) != len(y) { - return false - } - for i, v := range x { - if v != y[i] { - return false - } - } - return true -} - -// equalMap compares two maps of comparable keys and values -func equalMap[T comparable](x, y map[T]interface{}) bool { - if len(x) != len(y) { - return false - } - for k, v := range x { - if yv, ok := y[k]; !ok || yv != v { - return false - } - } - return true -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/globaltracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/globaltracer.go deleted file mode 100644 index 8e2d954b25..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/globaltracer.go +++ /dev/null @@ -1,23 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import "github.com/DataDog/dd-trace-go/v2/ddtrace/internal" - -func init() { - var tracer Tracer = &NoopTracer{} - internal.SetGlobalTracer(tracer) -} - -// setGlobalTracer sets the global tracer to t. -func setGlobalTracer(t Tracer) { - internal.SetGlobalTracer(t) -} - -// getGlobalTracer returns the currently active tracer. -func getGlobalTracer() Tracer { - return internal.GetGlobalTracer[Tracer]() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/log.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/log.go deleted file mode 100644 index 98d5d2f025..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/log.go +++ /dev/null @@ -1,177 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "bytes" - "encoding/json" - "fmt" - "math" - "net/http" - "runtime" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/appsec" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/osinfo" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -// startupInfo contains various information about the status of the tracer on startup. -type startupInfo struct { - Date string `json:"date"` // ISO 8601 date and time of start - OSName string `json:"os_name"` // Windows, Darwin, Debian, etc. - OSVersion string `json:"os_version"` // Version of the OS - Version string `json:"version"` // Tracer version - Lang string `json:"lang"` // "Go" - LangVersion string `json:"lang_version"` // Go version, e.g. go1.13 - Env string `json:"env"` // Tracer env - Service string `json:"service"` // Tracer Service - AgentURL string `json:"agent_url"` // The address of the agent - AgentError string `json:"agent_error"` // Any error that occurred trying to connect to agent - Debug bool `json:"debug"` // Whether debug mode is enabled - AnalyticsEnabled bool `json:"analytics_enabled"` // True if there is a global analytics rate set - SampleRate string `json:"sample_rate"` // The default sampling rate for the rules sampler - SampleRateLimit string `json:"sample_rate_limit"` // The rate limit configured with the rules sampler - TraceSamplingRules []SamplingRule `json:"trace_sampling_rules"` // Trace rules used by the rules sampler - SpanSamplingRules []SamplingRule `json:"span_sampling_rules"` // Span rules used by the rules sampler - SamplingRulesError string `json:"sampling_rules_error"` // Any errors that occurred while parsing sampling rules - ServiceMappings map[string]string `json:"service_mappings"` // Service Mappings - Tags map[string]string `json:"tags"` // Global tags - RuntimeMetricsEnabled bool `json:"runtime_metrics_enabled"` // Whether runtime metrics are enabled - RuntimeMetricsV2Enabled bool `json:"runtime_metrics_v2_enabled"` // Whether runtime metrics v2 are enabled - ProfilerCodeHotspotsEnabled bool `json:"profiler_code_hotspots_enabled"` // Whether profiler code hotspots are enabled - ProfilerEndpointsEnabled bool `json:"profiler_endpoints_enabled"` // Whether profiler endpoints are enabled - ApplicationVersion string `json:"dd_version"` // Version of the user's application - Architecture string `json:"architecture"` // Architecture of host machine - GlobalService string `json:"global_service"` // Global service string. If not-nil should be same as Service. (#614) - LambdaMode string `json:"lambda_mode"` // Whether the client has enabled lambda mode - AppSec bool `json:"appsec"` // AppSec status: true when started, false otherwise. - AgentFeatures agentFeatures `json:"agent_features"` // Lists the capabilities of the agent. - Integrations map[string]integrationConfig `json:"integrations"` // Available tracer integrations - PartialFlushEnabled bool `json:"partial_flush_enabled"` // Whether Partial Flushing is enabled - PartialFlushMinSpans int `json:"partial_flush_min_spans"` // The min number of spans to trigger a partial flush - Orchestrion orchestrionConfig `json:"orchestrion"` // Orchestrion (auto-instrumentation) configuration. - FeatureFlags []string `json:"feature_flags"` - PropagationStyleInject string `json:"propagation_style_inject"` // Propagation style for inject - PropagationStyleExtract string `json:"propagation_style_extract"` // Propagation style for extract - TracingAsTransport bool `json:"tracing_as_transport"` // Whether the tracer is disabled and other products are using it as a transport - DogstatsdAddr string `json:"dogstatsd_address"` // Destination of statsd payloads - DataStreamsEnabled bool `json:"data_streams_enabled"` // Whether Data Streams is enabled -} - -// checkEndpoint tries to connect to the URL specified by endpoint. -// If the endpoint is not reachable, checkEndpoint returns an error -// explaining why. -func checkEndpoint(c *http.Client, endpoint string) error { - req, err := http.NewRequest("POST", endpoint, bytes.NewReader([]byte{0x90})) - if err != nil { - return fmt.Errorf("cannot create http request: %s", err.Error()) - } - req.Header.Set(traceCountHeader, "0") - req.Header.Set("Content-Type", "application/msgpack") - res, err := c.Do(req) - if err != nil { - return err - } - defer res.Body.Close() - return nil -} - -// logStartup generates a startupInfo for a tracer and writes it to the log in -// JSON format. -func logStartup(t *tracer) { - tags := make(map[string]string) - for k, v := range t.config.globalTags.get() { - tags[k] = fmt.Sprintf("%v", v) - } - - featureFlags := make([]string, 0, len(t.config.featureFlags)) - for f := range t.config.featureFlags { - featureFlags = append(featureFlags, f) - } - - var injectorNames, extractorNames string - switch v := t.config.propagator.(type) { - case *chainedPropagator: - injectorNames = v.injectorNames - extractorNames = v.extractorsNames - case nil: - injectorNames = "" - extractorNames = "" - default: - injectorNames = "custom" - extractorNames = "custom" - } - // Determine the agent URL to use in the logs - var agentURL string - if t.config.originalAgentURL != nil && t.config.originalAgentURL.Scheme == "unix" { - agentURL = t.config.originalAgentURL.String() - } else { - agentURL = t.config.transport.endpoint() - } - info := startupInfo{ - Date: time.Now().Format(time.RFC3339), - OSName: osinfo.OSName(), - OSVersion: osinfo.OSVersion(), - Version: version.Tag, - Lang: "Go", - LangVersion: runtime.Version(), - Env: t.config.env, - Service: t.config.serviceName, - AgentURL: agentURL, - Debug: t.config.debug, - AnalyticsEnabled: !math.IsNaN(globalconfig.AnalyticsRate()), - SampleRate: fmt.Sprintf("%f", t.rulesSampling.traces.globalRate), - SampleRateLimit: "disabled", - TraceSamplingRules: t.config.traceRules, - SpanSamplingRules: t.config.spanRules, - ServiceMappings: t.config.serviceMappings, - Tags: tags, - RuntimeMetricsEnabled: t.config.runtimeMetrics, - RuntimeMetricsV2Enabled: t.config.runtimeMetricsV2, - ApplicationVersion: t.config.version, - ProfilerCodeHotspotsEnabled: t.config.profilerHotspots, - ProfilerEndpointsEnabled: t.config.profilerEndpoints, - Architecture: runtime.GOARCH, - GlobalService: globalconfig.ServiceName(), - LambdaMode: fmt.Sprintf("%t", t.config.logToStdout), - AgentFeatures: t.config.agent, - Integrations: t.config.integrations, - AppSec: appsec.Enabled(), - PartialFlushEnabled: t.config.partialFlushEnabled, - PartialFlushMinSpans: t.config.partialFlushMinSpans, - Orchestrion: t.config.orchestrionCfg, - FeatureFlags: featureFlags, - PropagationStyleInject: injectorNames, - PropagationStyleExtract: extractorNames, - TracingAsTransport: t.config.tracingAsTransport, - DogstatsdAddr: t.config.dogstatsdAddr, - DataStreamsEnabled: t.config.dataStreamsMonitoringEnabled, - } - if _, _, err := samplingRulesFromEnv(); err != nil { - info.SamplingRulesError = fmt.Sprintf("%s", err.Error()) - } - if limit, ok := t.rulesSampling.TraceRateLimit(); ok { - info.SampleRateLimit = fmt.Sprintf("%v", limit) - } - if !t.config.logToStdout { - if err := checkEndpoint(t.config.httpClient, t.config.transport.endpoint()); err != nil { - info.AgentError = fmt.Sprintf("%s", err.Error()) - log.Warn("DIAGNOSTICS Unable to reach agent intake: %s", err.Error()) - } - } - bs, err := json.Marshal(info) - if err != nil { - //nolint:gocritic // Diagnostic logging needs full struct representation - log.Warn("DIAGNOSTICS Failed to serialize json for startup log (%v) %#v\n", err, info) - return - } - log.Info("DATADOG TRACER CONFIGURATION %s\n", string(bs)) - telemetrylog.Debug("DATADOG TRACER CONFIGURATION %s\n", string(bs)) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/logger.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/logger.go deleted file mode 100644 index 6663fe62b2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/logger.go +++ /dev/null @@ -1,42 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import "github.com/DataDog/dd-trace-go/v2/internal/log" - -// Logger implementations are able to log given messages that the tracer or profiler might output. -type Logger interface { - // Log prints the given message. - Log(msg string) -} - -// UseLogger sets l as the logger for all tracer and profiler logs. -func UseLogger(l Logger) { - log.UseLogger(l) -} - -// LogLevel represents the logging level that the log package prints at. -type LogLevel = log.Level - -type loggerAdapter struct { - fn func(lvl LogLevel, msg string, a ...any) -} - -func (l loggerAdapter) Log(msg string) { - l.LogL(log.DefaultLevel(), msg) -} - -func (l loggerAdapter) LogL(lvl LogLevel, msg string) { - l.fn(lvl, msg) -} - -// AdaptLogger adapts a function to the Logger interface to adapt any logger -// to the Logger interface. -func AdaptLogger(fn func(lvl LogLevel, msg string, a ...any)) Logger { - return loggerAdapter{ - fn: fn, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/meta_struct.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/meta_struct.go deleted file mode 100644 index 2f564da07c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/meta_struct.go +++ /dev/null @@ -1,88 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "github.com/tinylib/msgp/msgp" -) - -var ( - _ msgp.Encodable = (*metaStructMap)(nil) - _ msgp.Decodable = (*metaStructMap)(nil) - _ msgp.Sizer = (*metaStructMap)(nil) -) - -// metaStructMap is a map of string to any of metadata embedded in each span -// We export special messagepack methods to handle the encoding and decoding of the map -// Because the agent expects the metadata to be a map of string to byte array, we have to create sub-messages of messagepack for each value -type metaStructMap map[string]any - -// EncodeMsg transforms the map[string]any into a map[string][]byte agent-side (which is parsed back into a map[string]any in the backend) -func (m *metaStructMap) EncodeMsg(en *msgp.Writer) error { - err := en.WriteMapHeader(uint32(len(*m))) - if err != nil { - return msgp.WrapError(err, "MetaStruct") - } - - for key, value := range *m { - err = en.WriteString(key) - if err != nil { - return msgp.WrapError(err, "MetaStruct") - } - - // Wrap the encoded value in a byte array that will not be parsed by the agent - msg, err := msgp.AppendIntf(nil, value) - if err != nil { - return msgp.WrapError(err, "MetaStruct", key) - } - - err = en.WriteBytes(msg) - if err != nil { - return msgp.WrapError(err, "MetaStruct", key) - } - } - - return nil -} - -// DecodeMsg transforms the map[string][]byte agent-side into a map[string]any where values are sub-messages in messagepack -func (m *metaStructMap) DecodeMsg(de *msgp.Reader) error { - header, err := de.ReadMapHeader() - if err != nil { - return msgp.WrapError(err, "MetaStruct") - } - - *m = make(metaStructMap, header) - for i := uint32(0); i < header; i++ { - var key string - key, err = de.ReadString() - if err != nil { - return msgp.WrapError(err, "MetaStruct") - } - - subMsg, err := de.ReadBytes(nil) - if err != nil { - return msgp.WrapError(err, "MetaStruct", key) - } - - (*m)[key], _, err = msgp.ReadIntfBytes(subMsg) - if err != nil { - return msgp.WrapError(err, "MetaStruct", key) - } - } - - return nil -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (m *metaStructMap) Msgsize() int { - size := msgp.MapHeaderSize - for key, value := range *m { - size += msgp.StringPrefixSize + len(key) - size += msgp.BytesPrefixSize + msgp.GuessSize(value) - } - return size -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/metrics.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/metrics.go deleted file mode 100644 index f6cf9f3b55..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/metrics.go +++ /dev/null @@ -1,118 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "runtime" - "runtime/debug" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// defaultMetricsReportInterval specifies the interval at which runtime metrics will -// be reported. -const defaultMetricsReportInterval = 10 * time.Second - -// reportRuntimeMetrics periodically reports go runtime metrics at -// the given interval. -func (t *tracer) reportRuntimeMetrics(interval time.Duration) { - var ms runtime.MemStats - gc := debug.GCStats{ - // When len(stats.PauseQuantiles) is 5, it will be filled with the - // minimum, 25%, 50%, 75%, and maximum pause times. See the documentation - // for (runtime/debug).ReadGCStats. - PauseQuantiles: make([]time.Duration, 5), - } - - tick := time.NewTicker(interval) - defer tick.Stop() - for { - select { - case <-tick.C: - log.Debug("Reporting runtime metrics...") - runtime.ReadMemStats(&ms) - debug.ReadGCStats(&gc) - - statsd := t.statsd - // CPU statistics - statsd.Gauge("runtime.go.num_cpu", float64(runtime.NumCPU()), nil, 1) - statsd.Gauge("runtime.go.num_goroutine", float64(runtime.NumGoroutine()), nil, 1) - statsd.Gauge("runtime.go.num_cgo_call", float64(runtime.NumCgoCall()), nil, 1) - // General statistics - statsd.Gauge("runtime.go.mem_stats.alloc", float64(ms.Alloc), nil, 1) - statsd.Gauge("runtime.go.mem_stats.total_alloc", float64(ms.TotalAlloc), nil, 1) - statsd.Gauge("runtime.go.mem_stats.sys", float64(ms.Sys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.lookups", float64(ms.Lookups), nil, 1) - statsd.Gauge("runtime.go.mem_stats.mallocs", float64(ms.Mallocs), nil, 1) - statsd.Gauge("runtime.go.mem_stats.frees", float64(ms.Frees), nil, 1) - // Heap memory statistics - statsd.Gauge("runtime.go.mem_stats.heap_alloc", float64(ms.HeapAlloc), nil, 1) - statsd.Gauge("runtime.go.mem_stats.heap_sys", float64(ms.HeapSys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.heap_idle", float64(ms.HeapIdle), nil, 1) - statsd.Gauge("runtime.go.mem_stats.heap_inuse", float64(ms.HeapInuse), nil, 1) - statsd.Gauge("runtime.go.mem_stats.heap_released", float64(ms.HeapReleased), nil, 1) - statsd.Gauge("runtime.go.mem_stats.heap_objects", float64(ms.HeapObjects), nil, 1) - // Stack memory statistics - statsd.Gauge("runtime.go.mem_stats.stack_inuse", float64(ms.StackInuse), nil, 1) - statsd.Gauge("runtime.go.mem_stats.stack_sys", float64(ms.StackSys), nil, 1) - // Off-heap memory statistics - statsd.Gauge("runtime.go.mem_stats.m_span_inuse", float64(ms.MSpanInuse), nil, 1) - statsd.Gauge("runtime.go.mem_stats.m_span_sys", float64(ms.MSpanSys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.m_cache_inuse", float64(ms.MCacheInuse), nil, 1) - statsd.Gauge("runtime.go.mem_stats.m_cache_sys", float64(ms.MCacheSys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.buck_hash_sys", float64(ms.BuckHashSys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.gc_sys", float64(ms.GCSys), nil, 1) - statsd.Gauge("runtime.go.mem_stats.other_sys", float64(ms.OtherSys), nil, 1) - // Garbage collector statistics - statsd.Gauge("runtime.go.mem_stats.next_gc", float64(ms.NextGC), nil, 1) - statsd.Gauge("runtime.go.mem_stats.last_gc", float64(ms.LastGC), nil, 1) - statsd.Gauge("runtime.go.mem_stats.pause_total_ns", float64(ms.PauseTotalNs), nil, 1) - statsd.Gauge("runtime.go.mem_stats.num_gc", float64(ms.NumGC), nil, 1) - statsd.Gauge("runtime.go.mem_stats.num_forced_gc", float64(ms.NumForcedGC), nil, 1) - statsd.Gauge("runtime.go.mem_stats.gc_cpu_fraction", ms.GCCPUFraction, nil, 1) - for i, p := range []string{"min", "25p", "50p", "75p", "max"} { - statsd.Gauge("runtime.go.gc_stats.pause_quantiles."+p, float64(gc.PauseQuantiles[i]), nil, 1) - } - - case <-t.stop: - return - } - } -} - -// reportHealthMetricsAtInterval reports noisy health metrics at the specified interval. -// The periodic reporting ensures metrics are delivered without overwhelming the system or logs. -func (t *tracer) reportHealthMetricsAtInterval(interval time.Duration) { - ticker := time.NewTicker(interval) - defer ticker.Stop() - for { - select { - case <-ticker.C: - // if there are started spans, report the number of spans with their integration, then - // reset the count - // the Count() function reports the total number of event occurrences in one time interval. We reset - // our count to 0 regardless of if Count succeeded to cleanup before the next interval. - - for k, v := range t.spansStarted.GetAndReset() { - t.statsd.Count("datadog.tracer.spans_started", v, []string{"integration:" + k}, 1) - } - - // if there are finished spans, report the number of spans with their integration, then - // reset the count - // the Count() function reports the total number of event occurrences in one time interval. We reset - // our count to 0 regardless of if Count succeeded to cleanup before the next interval. - for k, v := range t.spansFinished.GetAndReset() { - t.statsd.Count("datadog.tracer.spans_finished", v, []string{"integration:" + k}, 1) - } - - t.statsd.Count("datadog.tracer.traces_dropped", int64(tracerstats.Count(tracerstats.TracesDropped)), []string{"reason:trace_too_large"}, 1) - case <-t.stop: - return - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/noop.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/noop.go deleted file mode 100644 index 6401bc51a6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/noop.go +++ /dev/null @@ -1,39 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import "github.com/DataDog/dd-trace-go/v2/internal/log" - -var _ Tracer = (*NoopTracer)(nil) - -// NoopTracer is an implementation of Tracer that is a no-op. -type NoopTracer struct{} - -// StartSpan implements Tracer. -func (NoopTracer) StartSpan(_ string, _ ...StartSpanOption) *Span { - log.Debug("Tracer must be started before starting a span; Review the docs for more information: https://docs.datadoghq.com/tracing/trace_collection/library_config/go/") - return nil -} - -// SetServiceInfo implements Tracer. -func (NoopTracer) SetServiceInfo(_, _, _ string) {} - -// Extract implements Tracer. -func (NoopTracer) Extract(_ interface{}) (*SpanContext, error) { - return nil, nil -} - -// Inject implements Tracer. -func (NoopTracer) Inject(_ *SpanContext, _ interface{}) error { return nil } - -// Stop implements Tracer. -func (NoopTracer) Stop() {} - -func (NoopTracer) TracerConf() TracerConf { - return TracerConf{} -} - -func (NoopTracer) Flush() {} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/option.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/option.go deleted file mode 100644 index 919ac71be4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/option.go +++ /dev/null @@ -1,1637 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "net" - "net/http" - "net/url" - "os" - "path/filepath" - "runtime" - "runtime/debug" - "strconv" - "strings" - "sync" - "time" - - "golang.org/x/mod/semver" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal" - appsecconfig "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/namingschema" - "github.com/DataDog/dd-trace-go/v2/internal/normalizer" - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" - "github.com/DataDog/dd-trace-go/v2/internal/stableconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/traceprof" - "github.com/DataDog/dd-trace-go/v2/internal/version" - "github.com/tinylib/msgp/msgp" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -var contribIntegrations = map[string]struct { - name string // user readable name for startup logs - imported bool // true if the user has imported the integration -}{ - "github.com/99designs/gqlgen": {"gqlgen", false}, - "github.com/aws/aws-sdk-go": {"AWS SDK", false}, - "github.com/aws/aws-sdk-go-v2": {"AWS SDK v2", false}, - "github.com/bradfitz/gomemcache": {"Memcache", false}, - "cloud.google.com/go/pubsub.v1": {"Pub/Sub", false}, - "github.com/confluentinc/confluent-kafka-go": {"Kafka (confluent)", false}, - "github.com/confluentinc/confluent-kafka-go/v2": {"Kafka (confluent) v2", false}, - "database/sql": {"SQL", false}, - "github.com/dimfeld/httptreemux/v5": {"HTTP Treemux", false}, - "github.com/elastic/go-elasticsearch/v6": {"Elasticsearch v6", false}, - "github.com/emicklei/go-restful/v3": {"go-restful v3", false}, - "github.com/gin-gonic/gin": {"Gin", false}, - "github.com/globalsign/mgo": {"MongoDB (mgo)", false}, - "github.com/go-chi/chi": {"chi", false}, - "github.com/go-chi/chi/v5": {"chi v5", false}, - "github.com/go-pg/pg/v10": {"go-pg v10", false}, - "github.com/go-redis/redis": {"Redis", false}, - "github.com/go-redis/redis/v7": {"Redis v7", false}, - "github.com/go-redis/redis/v8": {"Redis v8", false}, - "go.mongodb.org/mongo-driver": {"MongoDB", false}, - "github.com/gocql/gocql": {"Cassandra", false}, - "github.com/gofiber/fiber/v2": {"Fiber", false}, - "github.com/gomodule/redigo": {"Redigo", false}, - "google.golang.org/api": {"Google API", false}, - "google.golang.org/grpc": {"gRPC", false}, - "github.com/gorilla/mux": {"Gorilla Mux", false}, - "gorm.io/gorm.v1": {"Gorm v1", false}, - "github.com/graph-gophers/graphql-go": {"Graph Gophers GraphQL", false}, - "github.com/graphql-go/graphql": {"GraphQL-Go GraphQL", false}, - "github.com/hashicorp/consul/api": {"Consul", false}, - "github.com/hashicorp/vault/api": {"Vault", false}, - "github.com/jackc/pgx/v5": {"PGX", false}, - "github.com/jmoiron/sqlx": {"SQLx", false}, - "github.com/julienschmidt/httprouter": {"HTTP Router", false}, - "k8s.io/client-go/kubernetes": {"Kubernetes", false}, - "github.com/labstack/echo/v4": {"echo v4", false}, - "log/slog": {"log/slog", false}, - "github.com/miekg/dns": {"miekg/dns", false}, - "net/http": {"HTTP", false}, - "gopkg.in/olivere/elastic.v5": {"Elasticsearch v5", false}, - "github.com/redis/go-redis/v9": {"Redis v9", false}, - "github.com/redis/rueidis": {"Rueidis", false}, - "github.com/segmentio/kafka-go": {"Kafka v0", false}, - "github.com/IBM/sarama": {"IBM sarama", false}, - "github.com/Shopify/sarama": {"Shopify sarama", false}, - "github.com/sirupsen/logrus": {"Logrus", false}, - "github.com/syndtr/goleveldb": {"LevelDB", false}, - "github.com/tidwall/buntdb": {"BuntDB", false}, - "github.com/twitchtv/twirp": {"Twirp", false}, - "github.com/uptrace/bun": {"Bun", false}, - "github.com/urfave/negroni": {"Negroni", false}, - "github.com/valyala/fasthttp": {"FastHTTP", false}, - "github.com/valkey-io/valkey-go": {"Valkey", false}, -} - -var ( - // defaultSocketDSD specifies the socket path to use for connecting to the statsd server. - // Replaced in tests - defaultSocketDSD = "/var/run/datadog/dsd.socket" - - // defaultStatsdPort specifies the default port to use for connecting to the statsd server. - defaultStatsdPort = "8125" - - // defaultMaxTagsHeaderLen specifies the default maximum length of the X-Datadog-Tags header value. - defaultMaxTagsHeaderLen = 128 - - // defaultRateLimit specifies the default trace rate limit used when DD_TRACE_RATE_LIMIT is not set. - defaultRateLimit = 100.0 -) - -// config holds the tracer configuration. -type config struct { - // debug, when true, writes details to logs. - debug bool - - // appsecStartOptions controls the options used when starting appsec features. - appsecStartOptions []appsecconfig.StartOption - - // agent holds the capabilities of the agent and determines some - // of the behaviour of the tracer. - agent agentFeatures - - // integrations reports if the user has instrumented a Datadog integration and - // if they have a version of the library available to integrate. - integrations map[string]integrationConfig - - // featureFlags specifies any enabled feature flags. - featureFlags map[string]struct{} - - // logToStdout reports whether we should log all traces to the standard - // output instead of using the agent. This is used in Lambda environments. - logToStdout bool - - // sendRetries is the number of times a trace or CI Visibility payload send is retried upon - // failure. - sendRetries int - - // retryInterval is the interval between agent connection retries. It has no effect if sendRetries is not set - retryInterval time.Duration - - // logStartup, when true, causes various startup info to be written - // when the tracer starts. - logStartup bool - - // serviceName specifies the name of this application. - serviceName string - - // universalVersion, reports whether span service name and config service name - // should match to set application version tag. False by default - universalVersion bool - - // version specifies the version of this application - version string - - // env contains the environment that this application will run under. - env string - - // sampler specifies the sampler that will be used for sampling traces. - sampler RateSampler - - // agentURL is the agent URL that receives traces from the tracer. - agentURL *url.URL - - // originalAgentURL is the agent URL that receives traces from the tracer and does not get changed. - originalAgentURL *url.URL - - // serviceMappings holds a set of service mappings to dynamically rename services - serviceMappings map[string]string - - // globalTags holds a set of tags that will be automatically applied to - // all spans. - globalTags dynamicConfig[map[string]interface{}] - - // transport specifies the Transport interface which will be used to send data to the agent. - transport transport - - // httpClientTimeout specifies the timeout for the HTTP client. - httpClientTimeout time.Duration - - // propagator propagates span context cross-process - propagator Propagator - - // httpClient specifies the HTTP client to be used by the agent's transport. - httpClient *http.Client - - // hostname is automatically assigned when the DD_TRACE_REPORT_HOSTNAME is set to true, - // and is added as a special tag to the root span of traces. - hostname string - - // logger specifies the logger to use when printing errors. If not specified, the "log" package - // will be used. - logger Logger - - // runtimeMetrics specifies whether collection of runtime metrics is enabled. - runtimeMetrics bool - - // runtimeMetricsV2 specifies whether collection of runtime metrics v2 is enabled. - runtimeMetricsV2 bool - - // dogstatsdAddr specifies the address to connect for sending metrics to the - // Datadog Agent. If not set, it defaults to "localhost:8125" or to the - // combination of the environment variables DD_AGENT_HOST and DD_DOGSTATSD_PORT. - dogstatsdAddr string - - // statsdClient is set when a user provides a custom statsd client for tracking metrics - // associated with the runtime and the tracer. - statsdClient internal.StatsdClient - - // spanRules contains user-defined rules to determine the sampling rate to apply - // to a single span without affecting the entire trace - spanRules []SamplingRule - - // traceRules contains user-defined rules to determine the sampling rate to apply - // to the entire trace if any spans satisfy the criteria - traceRules []SamplingRule - - // tickChan specifies a channel which will receive the time every time the tracer must flush. - // It defaults to time.Ticker; replaced in tests. - tickChan <-chan time.Time - - // noDebugStack disables the collection of debug stack traces globally. No traces reporting - // errors will record a stack trace when this option is set. - noDebugStack bool - - // profilerHotspots specifies whether profiler Code Hotspots is enabled. - profilerHotspots bool - - // profilerEndpoints specifies whether profiler endpoint filtering is enabled. - profilerEndpoints bool - - // enabled reports whether tracing is enabled. - enabled dynamicConfig[bool] - - // enableHostnameDetection specifies whether the tracer should enable hostname detection. - enableHostnameDetection bool - - // spanAttributeSchemaVersion holds the selected DD_TRACE_SPAN_ATTRIBUTE_SCHEMA version. - spanAttributeSchemaVersion int - - // peerServiceDefaultsEnabled indicates whether the peer.service tag calculation is enabled or not. - peerServiceDefaultsEnabled bool - - // peerServiceMappings holds a set of service mappings to dynamically rename peer.service values. - peerServiceMappings map[string]string - - // debugAbandonedSpans controls if the tracer should log when old, open spans are found - debugAbandonedSpans bool - - // spanTimeout represents how old a span can be before it should be logged as a possible - // misconfiguration - spanTimeout time.Duration - - // partialFlushMinSpans is the number of finished spans in a single trace to trigger a - // partial flush, or 0 if partial flushing is disabled. - // Value from DD_TRACE_PARTIAL_FLUSH_MIN_SPANS, default 1000. - partialFlushMinSpans int - - // partialFlushEnabled specifices whether the tracer should enable partial flushing. Value - // from DD_TRACE_PARTIAL_FLUSH_ENABLED, default false. - partialFlushEnabled bool - - // statsComputationEnabled enables client-side stats computation (aka trace metrics). - statsComputationEnabled bool - - // dataStreamsMonitoringEnabled specifies whether the tracer should enable monitoring of data streams - dataStreamsMonitoringEnabled bool - - // orchestrionCfg holds Orchestrion (aka auto-instrumentation) configuration. - // Only used for telemetry currently. - orchestrionCfg orchestrionConfig - - // traceSampleRate holds the trace sample rate. - traceSampleRate dynamicConfig[float64] - - // traceSampleRules holds the trace sampling rules - traceSampleRules dynamicConfig[[]SamplingRule] - - // headerAsTags holds the header as tags configuration. - headerAsTags dynamicConfig[[]string] - - // dynamicInstrumentationEnabled controls if the target application can be modified by Dynamic Instrumentation or not. - // Value from DD_DYNAMIC_INSTRUMENTATION_ENABLED, default false. - dynamicInstrumentationEnabled bool - - // globalSampleRate holds sample rate read from environment variables. - globalSampleRate float64 - - // ciVisibilityEnabled controls if the tracer is loaded with CI Visibility mode. default false - ciVisibilityEnabled bool - - // ciVisibilityAgentless controls if the tracer is loaded with CI Visibility agentless mode. default false - ciVisibilityAgentless bool - - // logDirectory is directory for tracer logs specified by user-setting DD_TRACE_LOG_DIRECTORY. default empty/unused - logDirectory string - - // tracingAsTransport specifies whether the tracer is running in transport-only mode, where traces are only sent when other products request it. - tracingAsTransport bool - - // traceRateLimitPerSecond specifies the rate limit for traces. - traceRateLimitPerSecond float64 -} - -// orchestrionConfig contains Orchestrion configuration. -type ( - orchestrionConfig struct { - // Enabled indicates whether this tracer was instanciated via Orchestrion. - Enabled bool `json:"enabled"` - - // Metadata holds Orchestrion specific metadata (e.g orchestrion version, mode (toolexec or manual) etc..) - Metadata *orchestrionMetadata `json:"metadata,omitempty"` - } - orchestrionMetadata struct { - // Version is the version of the orchestrion tool that was used to instrument the application. - Version string `json:"version,omitempty"` - } -) - -// HasFeature reports whether feature f is enabled. -func (c *config) HasFeature(f string) bool { - _, ok := c.featureFlags[strings.TrimSpace(f)] - return ok -} - -// StartOption represents a function that can be provided as a parameter to Start. -type StartOption func(*config) - -// maxPropagatedTagsLength limits the size of DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH to prevent HTTP 413 responses. -const maxPropagatedTagsLength = 512 - -// partialFlushMinSpansDefault is the default number of spans for partial flushing, if enabled. -const partialFlushMinSpansDefault = 1000 - -// newConfig renders the tracer configuration based on defaults, environment variables -// and passed user opts. -func newConfig(opts ...StartOption) (*config, error) { - c := new(config) - - // If this was built with a recent-enough version of Orchestrion, force the orchestrion config to - // the baked-in values. We do this early so that opts can be used to override the baked-in values, - // which is necessary for some tests to work properly. - c.orchestrionCfg.Enabled = orchestrion.Enabled() - if orchestrion.Version != "" { - c.orchestrionCfg.Metadata = &orchestrionMetadata{Version: orchestrion.Version} - } - - c.sampler = NewAllSampler() - sampleRate := math.NaN() - if r := getDDorOtelConfig("sampleRate"); r != "" { - var err error - sampleRate, err = strconv.ParseFloat(r, 64) - if err != nil { - log.Warn("ignoring DD_TRACE_SAMPLE_RATE, error: %s", err.Error()) - sampleRate = math.NaN() - } else if sampleRate < 0.0 || sampleRate > 1.0 { - log.Warn("ignoring DD_TRACE_SAMPLE_RATE: out of range %f", sampleRate) - sampleRate = math.NaN() - } - } - c.globalSampleRate = sampleRate - c.httpClientTimeout = time.Second * 10 // 10 seconds - - c.traceRateLimitPerSecond = defaultRateLimit - origin := telemetry.OriginDefault - if v, ok := os.LookupEnv("DD_TRACE_RATE_LIMIT"); ok { - l, err := strconv.ParseFloat(v, 64) - if err != nil { - log.Warn("DD_TRACE_RATE_LIMIT invalid, using default value %f: %v", defaultRateLimit, err.Error()) - } else if l < 0.0 { - log.Warn("DD_TRACE_RATE_LIMIT negative, using default value %f", defaultRateLimit) - } else { - c.traceRateLimitPerSecond = l - origin = telemetry.OriginEnvVar - } - } - - reportTelemetryOnAppStarted(telemetry.Configuration{Name: "trace_rate_limit", Value: c.traceRateLimitPerSecond, Origin: origin}) - - if v := os.Getenv("OTEL_LOGS_EXPORTER"); v != "" { - log.Warn("OTEL_LOGS_EXPORTER is not supported") - } - if internal.BoolEnv("DD_TRACE_ANALYTICS_ENABLED", false) { - globalconfig.SetAnalyticsRate(1.0) - } - if os.Getenv("DD_TRACE_REPORT_HOSTNAME") == "true" { - var err error - c.hostname, err = os.Hostname() - if err != nil { - log.Warn("unable to look up hostname: %s", err.Error()) - return c, fmt.Errorf("unable to look up hostnamet: %s", err.Error()) - } - } - if v := os.Getenv("DD_TRACE_SOURCE_HOSTNAME"); v != "" { - c.hostname = v - } - if v := os.Getenv("DD_ENV"); v != "" { - c.env = v - } - if v := os.Getenv("DD_TRACE_FEATURES"); v != "" { - WithFeatureFlags(strings.FieldsFunc(v, func(r rune) bool { - return r == ',' || r == ' ' - })...)(c) - } - if v := getDDorOtelConfig("service"); v != "" { - c.serviceName = v - globalconfig.SetServiceName(v) - } - if ver := os.Getenv("DD_VERSION"); ver != "" { - c.version = ver - } - if v := os.Getenv("DD_SERVICE_MAPPING"); v != "" { - internal.ForEachStringTag(v, internal.DDTagsDelimiter, func(key, val string) { WithServiceMapping(key, val)(c) }) - } - c.headerAsTags = newDynamicConfig("trace_header_tags", nil, setHeaderTags, equalSlice[string]) - if v := os.Getenv("DD_TRACE_HEADER_TAGS"); v != "" { - c.headerAsTags.update(strings.Split(v, ","), telemetry.OriginEnvVar) - // Required to ensure that the startup header tags are set on reset. - c.headerAsTags.startup = c.headerAsTags.current - } - if v := getDDorOtelConfig("resourceAttributes"); v != "" { - tags := internal.ParseTagString(v) - internal.CleanGitMetadataTags(tags) - for key, val := range tags { - WithGlobalTag(key, val)(c) - } - // TODO: should we track the origin of these tags individually? - c.globalTags.cfgOrigin = telemetry.OriginEnvVar - } - if _, ok := os.LookupEnv("AWS_LAMBDA_FUNCTION_NAME"); ok { - // AWS_LAMBDA_FUNCTION_NAME being set indicates that we're running in an AWS Lambda environment. - // See: https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html - c.logToStdout = true - } - c.logStartup = internal.BoolEnv("DD_TRACE_STARTUP_LOGS", true) - c.runtimeMetrics = internal.BoolVal(getDDorOtelConfig("metrics"), false) - c.runtimeMetricsV2 = internal.BoolEnv("DD_RUNTIME_METRICS_V2_ENABLED", true) - c.debug = internal.BoolVal(getDDorOtelConfig("debugMode"), false) - c.logDirectory = os.Getenv("DD_TRACE_LOG_DIRECTORY") - c.enabled = newDynamicConfig("tracing_enabled", internal.BoolVal(getDDorOtelConfig("enabled"), true), func(_ bool) bool { return true }, equal[bool]) - if _, ok := os.LookupEnv("DD_TRACE_ENABLED"); ok { - c.enabled.cfgOrigin = telemetry.OriginEnvVar - } - c.profilerEndpoints = internal.BoolEnv(traceprof.EndpointEnvVar, true) - c.profilerHotspots = internal.BoolEnv(traceprof.CodeHotspotsEnvVar, true) - if compatMode := os.Getenv("DD_TRACE_CLIENT_HOSTNAME_COMPAT"); compatMode != "" { - if semver.IsValid(compatMode) { - c.enableHostnameDetection = semver.Compare(semver.MajorMinor(compatMode), "v1.66") <= 0 - } else { - log.Warn("ignoring DD_TRACE_CLIENT_HOSTNAME_COMPAT, invalid version %q", compatMode) - } - } - c.debugAbandonedSpans = internal.BoolEnv("DD_TRACE_DEBUG_ABANDONED_SPANS", false) - if c.debugAbandonedSpans { - c.spanTimeout = internal.DurationEnv("DD_TRACE_ABANDONED_SPAN_TIMEOUT", 10*time.Minute) - } - c.statsComputationEnabled = internal.BoolEnv("DD_TRACE_STATS_COMPUTATION_ENABLED", true) - c.dataStreamsMonitoringEnabled, _, _ = stableconfig.Bool("DD_DATA_STREAMS_ENABLED", false) - c.partialFlushEnabled = internal.BoolEnv("DD_TRACE_PARTIAL_FLUSH_ENABLED", false) - c.partialFlushMinSpans = internal.IntEnv("DD_TRACE_PARTIAL_FLUSH_MIN_SPANS", partialFlushMinSpansDefault) - if c.partialFlushMinSpans <= 0 { - log.Warn("DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=%d is not a valid value, setting to default %d", c.partialFlushMinSpans, partialFlushMinSpansDefault) - c.partialFlushMinSpans = partialFlushMinSpansDefault - } else if c.partialFlushMinSpans >= traceMaxSize { - log.Warn("DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=%d is above the max number of spans that can be kept in memory for a single trace (%d spans), so partial flushing will never trigger, setting to default %d", c.partialFlushMinSpans, traceMaxSize, partialFlushMinSpansDefault) - c.partialFlushMinSpans = partialFlushMinSpansDefault - } - // TODO(partialFlush): consider logging a warning if DD_TRACE_PARTIAL_FLUSH_MIN_SPANS - // is set, but DD_TRACE_PARTIAL_FLUSH_ENABLED is not true. Or just assume it should be enabled - // if it's explicitly set, and don't require both variables to be configured. - - c.dynamicInstrumentationEnabled, _, _ = stableconfig.Bool("DD_DYNAMIC_INSTRUMENTATION_ENABLED", false) - - namingschema.LoadFromEnv() - c.spanAttributeSchemaVersion = int(namingschema.GetVersion()) - - // peer.service tag default calculation is enabled by default if using attribute schema >= 1 - c.peerServiceDefaultsEnabled = true - if c.spanAttributeSchemaVersion == int(namingschema.SchemaV0) { - c.peerServiceDefaultsEnabled = internal.BoolEnv("DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED", false) - } - c.peerServiceMappings = make(map[string]string) - if v := os.Getenv("DD_TRACE_PEER_SERVICE_MAPPING"); v != "" { - internal.ForEachStringTag(v, internal.DDTagsDelimiter, func(key, val string) { c.peerServiceMappings[key] = val }) - } - c.retryInterval = time.Millisecond - for _, fn := range opts { - if fn == nil { - continue - } - fn(c) - } - if c.agentURL == nil { - c.agentURL = internal.AgentURLFromEnv() - } - c.originalAgentURL = c.agentURL // Preserve the original agent URL for logging - if c.httpClient == nil || orchestrion.Enabled() { - if orchestrion.Enabled() && c.httpClient != nil { - // Make sure we don't create http client traces from inside the tracer by using our http client - // TODO(eliott.bouhana): remove once dd:no-span is implemented - log.Debug("Orchestrion is enabled, but a custom HTTP client was provided to tracer.Start. This is not supported and will be ignored.") - } - if c.agentURL.Scheme == "unix" { - // If we're connecting over UDS we can just rely on the agent to provide the hostname - log.Debug("connecting to agent over unix, do not set hostname on any traces") - c.httpClient = udsClient(c.agentURL.Path, c.httpClientTimeout) - // TODO(darccio): use internal.UnixDataSocketURL instead - c.agentURL = &url.URL{ - Scheme: "http", - Host: fmt.Sprintf("UDS_%s", strings.NewReplacer(":", "_", "/", "_", `\`, "_").Replace(c.agentURL.Path)), - } - } else { - c.httpClient = defaultHTTPClient(c.httpClientTimeout) - } - } - WithGlobalTag(ext.RuntimeID, globalconfig.RuntimeID())(c) - globalTags := c.globalTags.get() - if c.env == "" { - if v, ok := globalTags["env"]; ok { - if e, ok := v.(string); ok { - c.env = e - } - } - } - if c.version == "" { - if v, ok := globalTags["version"]; ok { - if ver, ok := v.(string); ok { - c.version = ver - } - } - } - if c.serviceName == "" { - if v, ok := globalTags["service"]; ok { - if s, ok := v.(string); ok { - c.serviceName = s - globalconfig.SetServiceName(s) - } - } else { - // There is not an explicit service set, default to binary name. - // In this case, don't set a global service name so the contribs continue using their defaults. - c.serviceName = filepath.Base(os.Args[0]) - } - } - if c.transport == nil { - c.transport = newHTTPTransport(c.agentURL.String(), c.httpClient) - } - if c.propagator == nil { - envKey := "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH" - maxLen := internal.IntEnv(envKey, defaultMaxTagsHeaderLen) - if maxLen < 0 { - log.Warn("Invalid value %d for %s. Setting to 0.", maxLen, envKey) - maxLen = 0 - } - if maxLen > maxPropagatedTagsLength { - log.Warn("Invalid value %d for %s. Maximum allowed is %d. Setting to %d.", maxLen, envKey, maxPropagatedTagsLength, maxPropagatedTagsLength) - maxLen = maxPropagatedTagsLength - } - c.propagator = NewPropagator(&PropagatorConfig{ - MaxTagsHeaderLen: maxLen, - }) - } - if c.logger != nil { - log.UseLogger(c.logger) - } - if c.debug { - log.SetLevel(log.LevelDebug) - } - - // Check if CI Visibility mode is enabled - if internal.BoolEnv(constants.CIVisibilityEnabledEnvironmentVariable, false) { - c.ciVisibilityEnabled = true // Enable CI Visibility mode - c.httpClientTimeout = time.Second * 45 // Increase timeout up to 45 seconds (same as other tracers in CIVis mode) - c.logStartup = false // If we are in CI Visibility mode we don't want to log the startup to stdout to avoid polluting the output - ciTransport := newCiVisibilityTransport(c) // Create a default CI Visibility Transport - c.transport = ciTransport // Replace the default transport with the CI Visibility transport - c.ciVisibilityAgentless = ciTransport.agentless - } - - // if using stdout or traces are disabled or we are in ci visibility agentless mode, agent is disabled - agentDisabled := c.logToStdout || !c.enabled.current || c.ciVisibilityAgentless - c.agent = loadAgentFeatures(agentDisabled, c.agentURL, c.httpClient) - info, ok := debug.ReadBuildInfo() - if !ok { - c.loadContribIntegrations([]*debug.Module{}) - } else { - c.loadContribIntegrations(info.Deps) - } - if c.statsdClient == nil { - // configure statsd client - addr := resolveDogstatsdAddr(c) - globalconfig.SetDogstatsdAddr(addr) - c.dogstatsdAddr = addr - } - // Re-initialize the globalTags config with the value constructed from the environment and start options - // This allows persisting the initial value of globalTags for future resets and updates. - globalTagsOrigin := c.globalTags.cfgOrigin - c.initGlobalTags(c.globalTags.get(), globalTagsOrigin) - if tracingEnabled, _, _ := stableconfig.Bool("DD_APM_TRACING_ENABLED", true); !tracingEnabled { - apmTracingDisabled(c) - } - - return c, nil -} - -func apmTracingDisabled(c *config) { - // Enable tracing as transport layer mode - // This means to stop sending trace metrics, send one trace per minute and those force-kept by other products - // using the tracer as transport layer for their data. And finally adding the _dd.apm.enabled=0 tag to all traces - // to let the backend know that it needs to keep APM UI disabled. - c.globalSampleRate = 1.0 - c.traceRateLimitPerSecond = 1.0 / 60 - c.tracingAsTransport = true - WithGlobalTag("_dd.apm.enabled", 0)(c) - // Disable runtime metrics. In `tracingAsTransport` mode, we'll still - // tell the agent we computed them, so it doesn't do it either. - c.runtimeMetrics = false - c.runtimeMetricsV2 = false -} - -// resolveDogstatsdAddr resolves the Dogstatsd address to use, based on the user-defined -// address and the agent-reported port. If the agent reports a port, it will be used -// instead of the user-defined address' port. UDS paths are honored regardless of the -// agent-reported port. -func resolveDogstatsdAddr(c *config) string { - addr := c.dogstatsdAddr - if addr == "" { - // no config defined address; use host and port from env vars - // or default to localhost:8125 if not set - addr = defaultDogstatsdAddr() - } - agentport := c.agent.StatsdPort - if agentport == 0 { - // the agent didn't report a port; use the already resolved address as - // features are loaded from the trace-agent, which might be not running - return addr - } - // the agent reported a port - host, _, err := net.SplitHostPort(addr) - if err != nil { - // parsing the address failed; use the already resolved address as is - return addr - } - if host == "unix" { - // no need to change the address because it's a UDS connection - // and these don't have ports - return addr - } - if host == "" { - // no host was provided; use the default hostname - host = defaultHostname - } - // use agent-reported address if it differs from the user-defined TCP-based protocol URI - // we have a valid host:port address; replace the port because the agent knows better - addr = net.JoinHostPort(host, strconv.Itoa(agentport)) - return addr -} - -func newStatsdClient(c *config) (internal.StatsdClient, error) { - if c.statsdClient != nil { - return c.statsdClient, nil - } - return internal.NewStatsdClient(c.dogstatsdAddr, statsTags(c)) -} - -// udsClient returns a new http.Client which connects using the given UDS socket path. -func udsClient(socketPath string, timeout time.Duration) *http.Client { - if timeout == 0 { - timeout = defaultHTTPTimeout - } - return &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: func(ctx context.Context, _, _ string) (net.Conn, error) { - return defaultDialer.DialContext(ctx, "unix", (&net.UnixAddr{ - Name: socketPath, - Net: "unix", - }).String()) - }, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - }, - Timeout: timeout, - } -} - -// defaultDogstatsdAddr returns the default connection address for Dogstatsd. -func defaultDogstatsdAddr() string { - envHost, envPort := os.Getenv("DD_DOGSTATSD_HOST"), os.Getenv("DD_DOGSTATSD_PORT") - if envHost == "" { - envHost = os.Getenv("DD_AGENT_HOST") - } - if _, err := os.Stat(defaultSocketDSD); err == nil && envHost == "" && envPort == "" { - // socket exists and user didn't specify otherwise via env vars - return "unix://" + defaultSocketDSD - } - host, port := defaultHostname, defaultStatsdPort - if envHost != "" { - host = envHost - } - if envPort != "" { - port = envPort - } - return net.JoinHostPort(host, port) -} - -type integrationConfig struct { - Instrumented bool `json:"instrumented"` // indicates if the user has imported and used the integration - Available bool `json:"available"` // indicates if the user is using a library that can be used with DataDog integrations - Version string `json:"available_version"` // if available, indicates the version of the library the user has -} - -// agentFeatures holds information about the trace-agent's capabilities. -// When running WithLambdaMode, a zero-value of this struct will be used -// as features. -type agentFeatures struct { - // DropP0s reports whether it's ok for the tracer to not send any - // P0 traces to the agent. - DropP0s bool - - // Stats reports whether the agent can receive client-computed stats on - // the /v0.6/stats endpoint. - Stats bool - - // StatsdPort specifies the Dogstatsd port as provided by the agent. - // If it's the default, it will be 0, which means 8125. - StatsdPort int - - // featureFlags specifies all the feature flags reported by the trace-agent. - featureFlags map[string]struct{} - - // peerTags specifies precursor tags to aggregate stats on when client stats is enabled - peerTags []string - - // defaultEnv is the trace-agent's default env, used for stats calculation if no env override is present - defaultEnv string - - // metaStructAvailable reports whether the trace-agent can receive spans with the `meta_struct` field. - metaStructAvailable bool - - // obfuscationVersion reports the trace-agent's version of obfuscation logic. A value of 0 means this field wasn't present. - obfuscationVersion int - - // spanEvents reports whether the trace-agent can receive spans with the `span_events` field. - spanEventsAvailable bool -} - -// HasFlag reports whether the agent has set the feat feature flag. -func (a *agentFeatures) HasFlag(feat string) bool { - _, ok := a.featureFlags[feat] - return ok -} - -// loadAgentFeatures queries the trace-agent for its capabilities and updates -// the tracer's behaviour. -func loadAgentFeatures(agentDisabled bool, agentURL *url.URL, httpClient *http.Client) (features agentFeatures) { - if agentDisabled { - // there is no agent; all features off - return - } - resp, err := httpClient.Get(fmt.Sprintf("%s/info", agentURL)) - if err != nil { - log.Error("Loading features: %s", err.Error()) - return - } - if resp.StatusCode == http.StatusNotFound { - // agent is older than 7.28.0, features not discoverable - return - } - defer resp.Body.Close() - type infoResponse struct { - Endpoints []string `json:"endpoints"` - ClientDropP0s bool `json:"client_drop_p0s"` - FeatureFlags []string `json:"feature_flags"` - PeerTags []string `json:"peer_tags"` - SpanMetaStruct bool `json:"span_meta_structs"` - ObfuscationVersion int `json:"obfuscation_version"` - SpanEvents bool `json:"span_events"` - Config struct { - StatsdPort int `json:"statsd_port"` - } `json:"config"` - } - - var info infoResponse - if err := json.NewDecoder(resp.Body).Decode(&info); err != nil { - log.Error("Decoding features: %s", err.Error()) - return - } - - features.DropP0s = info.ClientDropP0s - features.StatsdPort = info.Config.StatsdPort - features.metaStructAvailable = info.SpanMetaStruct - features.peerTags = info.PeerTags - features.obfuscationVersion = info.ObfuscationVersion - features.spanEventsAvailable = info.SpanEvents - for _, endpoint := range info.Endpoints { - switch endpoint { - case "/v0.6/stats": - features.Stats = true - } - } - features.featureFlags = make(map[string]struct{}, len(info.FeatureFlags)) - for _, flag := range info.FeatureFlags { - features.featureFlags[flag] = struct{}{} - } - return features -} - -// MarkIntegrationImported labels the given integration as imported -func MarkIntegrationImported(integration string) bool { - s, ok := contribIntegrations[integration] - if !ok { - return false - } - s.imported = true - contribIntegrations[integration] = s - return true -} - -func (c *config) loadContribIntegrations(deps []*debug.Module) { - integrations := map[string]integrationConfig{} - for _, s := range contribIntegrations { - integrations[s.name] = integrationConfig{ - Instrumented: s.imported, - } - } - for _, d := range deps { - p := d.Path - s, ok := contribIntegrations[p] - if !ok { - continue - } - conf := integrations[s.name] - conf.Available = true - conf.Version = d.Version - integrations[s.name] = conf - } - c.integrations = integrations -} - -func (c *config) canComputeStats() bool { - return c.agent.Stats && (c.HasFeature("discovery") || c.statsComputationEnabled) -} - -func (c *config) canDropP0s() bool { - return c.canComputeStats() && c.agent.DropP0s -} - -func statsTags(c *config) []string { - tags := []string{ - "lang:go", - "lang_version:" + runtime.Version(), - } - if c.env != "" { - tags = append(tags, "env:"+c.env) - } - if c.hostname != "" { - tags = append(tags, "host:"+c.hostname) - } - for k, v := range c.globalTags.get() { - if vstr, ok := v.(string); ok { - tags = append(tags, k+":"+vstr) - } - } - globalconfig.SetStatsTags(tags) - tags = append(tags, "tracer_version:"+version.Tag) - if c.serviceName != "" { - tags = append(tags, "service:"+c.serviceName) - } - return tags -} - -// withNoopStats is used for testing to disable statsd client -func withNoopStats() StartOption { - return func(c *config) { - c.statsdClient = &statsd.NoOpClientDirect{} - } -} - -// WithAppSecEnabled specifies whether AppSec features should be activated -// or not. -// -// By default, AppSec features are enabled if `DD_APPSEC_ENABLED` is set to a -// truthy value; and may be enabled by remote configuration if -// `DD_APPSEC_ENABLED` is not set at all. -// -// Using this option to explicitly disable appsec also prevents it from being -// remote activated. -func WithAppSecEnabled(enabled bool) StartOption { - mode := appsecconfig.ForcedOff - if enabled { - mode = appsecconfig.ForcedOn - } - return func(c *config) { - c.appsecStartOptions = append(c.appsecStartOptions, appsecconfig.WithEnablementMode(mode)) - } -} - -// WithFeatureFlags specifies a set of feature flags to enable. Please take into account -// that most, if not all features flags are considered to be experimental and result in -// unexpected bugs. -func WithFeatureFlags(feats ...string) StartOption { - return func(c *config) { - if c.featureFlags == nil { - c.featureFlags = make(map[string]struct{}, len(feats)) - } - for _, f := range feats { - c.featureFlags[strings.TrimSpace(f)] = struct{}{} - } - log.Info("FEATURES enabled: %s", feats) - } -} - -// WithLogger sets logger as the tracer's error printer. -// Diagnostic and startup tracer logs are prefixed to simplify the search within logs. -// If JSON logging format is required, it's possible to wrap tracer logs using an existing JSON logger with this -// function. To learn more about this possibility, please visit: https://github.com/DataDog/dd-trace-go/issues/2152#issuecomment-1790586933 -func WithLogger(logger Logger) StartOption { - return func(c *config) { - c.logger = logger - } -} - -// WithDebugStack can be used to globally enable or disable the collection of stack traces when -// spans finish with errors. It is enabled by default. This is a global version of the NoDebugStack -// FinishOption. -func WithDebugStack(enabled bool) StartOption { - return func(c *config) { - c.noDebugStack = !enabled - } -} - -// WithDebugMode enables debug mode on the tracer, resulting in more verbose logging. -func WithDebugMode(enabled bool) StartOption { - return func(c *config) { - telemetry.RegisterAppConfig("trace_debug_enabled", enabled, telemetry.OriginCode) - c.debug = enabled - } -} - -// WithLambdaMode enables lambda mode on the tracer, for use with AWS Lambda. -// This option is only required if the the Datadog Lambda Extension is not -// running. -func WithLambdaMode(enabled bool) StartOption { - return func(c *config) { - c.logToStdout = enabled - } -} - -// WithSendRetries enables re-sending payloads that are not successfully -// submitted to the agent. This will cause the tracer to retry the send at -// most `retries` times. -func WithSendRetries(retries int) StartOption { - return func(c *config) { - c.sendRetries = retries - } -} - -// WithRetryInterval sets the interval, in seconds, for retrying submitting payloads to the agent. -func WithRetryInterval(interval int) StartOption { - return func(c *config) { - c.retryInterval = time.Duration(interval) * time.Second - } -} - -// WithPropagator sets an alternative propagator to be used by the tracer. -func WithPropagator(p Propagator) StartOption { - return func(c *config) { - c.propagator = p - } -} - -// WithService sets the default service name for the program. -func WithService(name string) StartOption { - return func(c *config) { - c.serviceName = name - globalconfig.SetServiceName(c.serviceName) - } -} - -// WithGlobalServiceName causes contrib libraries to use the global service name and not any locally defined service name. -// This is synonymous with `DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED`. -func WithGlobalServiceName(enabled bool) StartOption { - return func(_ *config) { - namingschema.SetRemoveIntegrationServiceNames(enabled) - } -} - -// WithAgentAddr sets the address where the agent is located. The default is -// localhost:8126. It should contain both host and port. -func WithAgentAddr(addr string) StartOption { - return func(c *config) { - c.agentURL = &url.URL{ - Scheme: "http", - Host: addr, - } - } -} - -// WithAgentURL sets the full trace agent URL -func WithAgentURL(agentURL string) StartOption { - return func(c *config) { - u, err := url.Parse(agentURL) - if err != nil { - var urlErr *url.Error - if errors.As(err, &urlErr) { - u, err = url.Parse(urlErr.URL) - if u != nil { - urlErr.URL = u.Redacted() - log.Warn("Fail to parse Agent URL: %s", urlErr.Err) - return - } - log.Warn("Fail to parse Agent URL") - return - } - log.Warn("Fail to parse Agent URL: %s", err.Error()) - return - } - switch u.Scheme { - case "http", "https": - c.agentURL = &url.URL{ - Scheme: u.Scheme, - Host: u.Host, - } - case "unix": - c.agentURL = internal.UnixDataSocketURL(u.Path) - default: - log.Warn("Unsupported protocol %q in Agent URL %q. Must be one of: http, https, unix.", u.Scheme, agentURL) - } - } -} - -// WithAgentTimeout sets the timeout for the agent connection. Timeout is in seconds. -func WithAgentTimeout(timeout int) StartOption { - return func(c *config) { - c.httpClientTimeout = time.Duration(timeout) * time.Second - } -} - -// WithEnv sets the environment to which all traces started by the tracer will be submitted. -// The default value is the environment variable DD_ENV, if it is set. -func WithEnv(env string) StartOption { - return func(c *config) { - c.env = env - } -} - -// WithServiceMapping determines service "from" to be renamed to service "to". -// This option is is case sensitive and can be used multiple times. -func WithServiceMapping(from, to string) StartOption { - return func(c *config) { - if c.serviceMappings == nil { - c.serviceMappings = make(map[string]string) - } - c.serviceMappings[from] = to - } -} - -// WithPeerServiceDefaults sets default calculation for peer.service. -// Related documentation: https://docs.datadoghq.com/tracing/guide/inferred-service-opt-in/?tab=go#apm-tracer-configuration -func WithPeerServiceDefaults(enabled bool) StartOption { - return func(c *config) { - c.peerServiceDefaultsEnabled = enabled - } -} - -// WithPeerServiceMapping determines the value of the peer.service tag "from" to be renamed to service "to". -func WithPeerServiceMapping(from, to string) StartOption { - return func(c *config) { - if c.peerServiceMappings == nil { - c.peerServiceMappings = make(map[string]string) - } - c.peerServiceMappings[from] = to - } -} - -// WithGlobalTag sets a key/value pair which will be set as a tag on all spans -// created by tracer. This option may be used multiple times. -func WithGlobalTag(k string, v interface{}) StartOption { - return func(c *config) { - if c.globalTags.get() == nil { - c.initGlobalTags(map[string]interface{}{}, telemetry.OriginDefault) - } - c.globalTags.Lock() - defer c.globalTags.Unlock() - c.globalTags.current[k] = v - } -} - -// initGlobalTags initializes the globalTags config with the provided init value -func (c *config) initGlobalTags(init map[string]interface{}, origin telemetry.Origin) { - apply := func(map[string]interface{}) bool { - // always set the runtime ID on updates - c.globalTags.current[ext.RuntimeID] = globalconfig.RuntimeID() - return true - } - c.globalTags = newDynamicConfig("trace_tags", init, apply, equalMap[string]) - c.globalTags.cfgOrigin = origin -} - -// WithSampler sets the given sampler to be used with the tracer. By default -// an all-permissive sampler is used. -// Deprecated: Use WithSamplerRate instead. Custom sampling will be phased out in a future release. -func WithSampler(s Sampler) StartOption { - return func(c *config) { - c.sampler = &customSampler{s: s} - } -} - -// WithRateSampler sets the given sampler rate to be used with the tracer. -// The rate must be between 0 and 1. By default an all-permissive sampler rate (1) is used. -func WithSamplerRate(rate float64) StartOption { - return func(c *config) { - c.sampler = NewRateSampler(rate) - } -} - -// WithHTTPClient specifies the HTTP client to use when emitting spans to the agent. -func WithHTTPClient(client *http.Client) StartOption { - return func(c *config) { - c.httpClient = client - } -} - -// WithUDS configures the HTTP client to dial the Datadog Agent via the specified Unix Domain Socket path. -func WithUDS(socketPath string) StartOption { - return func(c *config) { - c.agentURL = &url.URL{ - Scheme: "unix", - Path: socketPath, - } - } -} - -// WithAnalytics allows specifying whether Trace Search & Analytics should be enabled -// for integrations. -func WithAnalytics(on bool) StartOption { - return func(_ *config) { - if on { - globalconfig.SetAnalyticsRate(1.0) - } else { - globalconfig.SetAnalyticsRate(math.NaN()) - } - } -} - -// WithAnalyticsRate sets the global sampling rate for sampling APM events. -func WithAnalyticsRate(rate float64) StartOption { - return func(_ *config) { - if rate >= 0.0 && rate <= 1.0 { - globalconfig.SetAnalyticsRate(rate) - } else { - globalconfig.SetAnalyticsRate(math.NaN()) - } - } -} - -// WithRuntimeMetrics enables automatic collection of runtime metrics every 10 seconds. -func WithRuntimeMetrics() StartOption { - return func(cfg *config) { - telemetry.RegisterAppConfig("runtime_metrics_enabled", true, telemetry.OriginCode) - cfg.runtimeMetrics = true - } -} - -// WithDogstatsdAddr specifies the address to connect to for sending metrics to the Datadog -// Agent. It should be a "host:port" string, or the path to a unix domain socket.If not set, it -// attempts to determine the address of the statsd service according to the following rules: -// 1. Look for /var/run/datadog/dsd.socket and use it if present. IF NOT, continue to #2. -// 2. The host is determined by DD_AGENT_HOST, and defaults to "localhost" -// 3. The port is retrieved from the agent. If not present, it is determined by DD_DOGSTATSD_PORT, and defaults to 8125 -// -// This option is in effect when WithRuntimeMetrics is enabled. -func WithDogstatsdAddr(addr string) StartOption { - return func(cfg *config) { - cfg.dogstatsdAddr = addr - globalconfig.SetDogstatsdAddr(addr) - } -} - -// WithSamplingRules specifies the sampling rates to apply to spans based on the -// provided rules. -func WithSamplingRules(rules []SamplingRule) StartOption { - return func(cfg *config) { - for _, rule := range rules { - if rule.ruleType == SamplingRuleSpan { - cfg.spanRules = append(cfg.spanRules, rule) - } else { - cfg.traceRules = append(cfg.traceRules, rule) - } - } - } -} - -// WithServiceVersion specifies the version of the service that is running. This will -// be included in spans from this service in the "version" tag, provided that -// span service name and config service name match. Do NOT use with WithUniversalVersion. -func WithServiceVersion(version string) StartOption { - return func(cfg *config) { - cfg.version = version - cfg.universalVersion = false - } -} - -// WithUniversalVersion specifies the version of the service that is running, and will be applied to all spans, -// regardless of whether span service name and config service name match. -// See: WithService, WithServiceVersion. Do NOT use with WithServiceVersion. -func WithUniversalVersion(version string) StartOption { - return func(c *config) { - c.version = version - c.universalVersion = true - } -} - -// WithHostname allows specifying the hostname with which to mark outgoing traces. -func WithHostname(name string) StartOption { - return func(c *config) { - c.hostname = name - } -} - -// WithTraceEnabled allows specifying whether tracing will be enabled -func WithTraceEnabled(enabled bool) StartOption { - return func(c *config) { - telemetry.RegisterAppConfig("trace_enabled", enabled, telemetry.OriginCode) - c.enabled = newDynamicConfig("tracing_enabled", enabled, func(_ bool) bool { return true }, equal[bool]) - } -} - -// WithLogStartup allows enabling or disabling the startup log. -func WithLogStartup(enabled bool) StartOption { - return func(c *config) { - c.logStartup = enabled - } -} - -// WithProfilerCodeHotspots enables the code hotspots integration between the -// tracer and profiler. This is done by automatically attaching pprof labels -// called "span id" and "local root span id" when new spans are created. You -// should not use these label names in your own code when this is enabled. The -// enabled value defaults to the value of the -// DD_PROFILING_CODE_HOTSPOTS_COLLECTION_ENABLED env variable or true. -func WithProfilerCodeHotspots(enabled bool) StartOption { - return func(c *config) { - c.profilerHotspots = enabled - } -} - -// WithProfilerEndpoints enables the endpoints integration between the tracer -// and profiler. This is done by automatically attaching a pprof label called -// "trace endpoint" holding the resource name of the top-level service span if -// its type is "http", "rpc" or "" (default). You should not use this label -// name in your own code when this is enabled. The enabled value defaults to -// the value of the DD_PROFILING_ENDPOINT_COLLECTION_ENABLED env variable or -// true. -func WithProfilerEndpoints(enabled bool) StartOption { - return func(c *config) { - c.profilerEndpoints = enabled - } -} - -// WithDebugSpansMode enables debugging old spans that may have been -// abandoned, which may prevent traces from being set to the Datadog -// Agent, especially if partial flushing is off. -// This setting can also be configured by setting DD_TRACE_DEBUG_ABANDONED_SPANS -// to true. The timeout will default to 10 minutes, unless overwritten -// by DD_TRACE_ABANDONED_SPAN_TIMEOUT. -// This feature is disabled by default. Turning on this debug mode may -// be expensive, so it should only be enabled for debugging purposes. -func WithDebugSpansMode(timeout time.Duration) StartOption { - return func(c *config) { - c.debugAbandonedSpans = true - c.spanTimeout = timeout - } -} - -// WithPartialFlushing enables flushing of partially finished traces. -// This is done after "numSpans" have finished in a single local trace at -// which point all finished spans in that trace will be flushed, freeing up -// any memory they were consuming. This can also be configured by setting -// DD_TRACE_PARTIAL_FLUSH_ENABLED to true, which will default to 1000 spans -// unless overriden with DD_TRACE_PARTIAL_FLUSH_MIN_SPANS. Partial flushing -// is disabled by default. -func WithPartialFlushing(numSpans int) StartOption { - return func(c *config) { - c.partialFlushEnabled = true - c.partialFlushMinSpans = numSpans - } -} - -// WithStatsComputation enables client-side stats computation, allowing -// the tracer to compute stats from traces. This can reduce network traffic -// to the Datadog Agent, and produce more accurate stats data. -// This can also be configured by setting DD_TRACE_STATS_COMPUTATION_ENABLED to true. -// Client-side stats is off by default. -func WithStatsComputation(enabled bool) StartOption { - return func(c *config) { - c.statsComputationEnabled = enabled - } -} - -// Tag sets the given key/value pair as a tag on the started Span. -func Tag(k string, v interface{}) StartSpanOption { - return func(cfg *StartSpanConfig) { - if cfg.Tags == nil { - cfg.Tags = map[string]interface{}{} - } - cfg.Tags[k] = v - } -} - -// ServiceName sets the given service name on the started span. For example "http.server". -func ServiceName(name string) StartSpanOption { - return Tag(ext.ServiceName, name) -} - -// ResourceName sets the given resource name on the started span. A resource could -// be an SQL query, a URL, an RPC method or something else. -func ResourceName(name string) StartSpanOption { - return Tag(ext.ResourceName, name) -} - -// SpanType sets the given span type on the started span. Some examples in the case of -// the Datadog APM product could be "web", "db" or "cache". -func SpanType(name string) StartSpanOption { - return Tag(ext.SpanType, name) -} - -// WithSpanLinks sets span links on the started span. -func WithSpanLinks(links []SpanLink) StartSpanOption { - return func(cfg *StartSpanConfig) { - cfg.SpanLinks = append(cfg.SpanLinks, links...) - } -} - -var measuredTag = Tag(keyMeasured, 1) - -// Measured marks this span to be measured for metrics and stats calculations. -func Measured() StartSpanOption { - // cache a global instance of this tag: saves one alloc/call - return measuredTag -} - -// WithSpanID sets the SpanID on the started span, instead of using a random number. -// If there is no parent Span (eg from ChildOf), then the TraceID will also be set to the -// value given here. -func WithSpanID(id uint64) StartSpanOption { - return func(cfg *StartSpanConfig) { - cfg.SpanID = id - } -} - -// ChildOf tells StartSpan to use the given span context as a parent for the created span. -// -// Deprecated: Use [Span.StartChild] instead. -func ChildOf(ctx *SpanContext) StartSpanOption { - return func(cfg *StartSpanConfig) { - cfg.Parent = ctx - } -} - -// withContext associates the ctx with the span. -func withContext(ctx context.Context) StartSpanOption { - return func(cfg *StartSpanConfig) { - cfg.Context = ctx - } -} - -// StartTime sets a custom time as the start time for the created span. By -// default a span is started using the creation time. -func StartTime(t time.Time) StartSpanOption { - return func(cfg *StartSpanConfig) { - cfg.StartTime = t - } -} - -// AnalyticsRate sets a custom analytics rate for a span. It decides the percentage -// of events that will be picked up by the App Analytics product. It's represents a -// float64 between 0 and 1 where 0.5 would represent 50% of events. -func AnalyticsRate(rate float64) StartSpanOption { - if math.IsNaN(rate) { - return func(_ *StartSpanConfig) {} - } - return Tag(ext.EventSampleRate, rate) -} - -// WithStartSpanConfig merges the given StartSpanConfig into the one used to start the span. -// It is useful when you want to set a common base config, reducing the number of function calls in hot loops. -func WithStartSpanConfig(cfg *StartSpanConfig) StartSpanOption { - return func(c *StartSpanConfig) { - // copy cfg into c only if cfg fields are not zero values - // c fields have precedence, as they may have been set up before running this option - if c.SpanID == 0 { - c.SpanID = cfg.SpanID - } - if c.Parent == nil { - c.Parent = cfg.Parent - } - if c.Context == nil { - c.Context = cfg.Context - } - if c.SpanLinks == nil { - c.SpanLinks = cfg.SpanLinks - } - if c.StartTime.IsZero() { - c.StartTime = cfg.StartTime - } - // tags are a special case, as we need to merge them - if c.Tags == nil { - // if cfg.Tags is nil, this is a no-op - c.Tags = cfg.Tags - } else if cfg.Tags != nil { - for k, v := range cfg.Tags { - c.Tags[k] = v - } - } - } -} - -// WithHeaderTags enables the integration to attach HTTP request headers as span tags. -// Warning: -// Using this feature can risk exposing sensitive data such as authorization tokens to Datadog. -// Special headers can not be sub-selected. E.g., an entire Cookie header would be transmitted, without the ability to choose specific Cookies. -func WithHeaderTags(headerAsTags []string) StartOption { - return func(c *config) { - c.headerAsTags = newDynamicConfig("trace_header_tags", headerAsTags, setHeaderTags, equalSlice[string]) - setHeaderTags(headerAsTags) - } -} - -// WithTestDefaults configures the tracer to not send spans to the agent, and to not collect metrics. -// Warning: -// This option should only be used in tests, as it will prevent the tracer from sending spans to the agent. -func WithTestDefaults(statsdClient any) StartOption { - return func(c *config) { - if statsdClient == nil { - statsdClient = &statsd.NoOpClientDirect{} - } - c.statsdClient = statsdClient.(internal.StatsdClient) - c.transport = newDummyTransport() - } -} - -// Mock Transport with a real Encoder -type dummyTransport struct { - sync.RWMutex - traces spanLists - stats []*pb.ClientStatsPayload - obfVersion int -} - -func newDummyTransport() *dummyTransport { - return &dummyTransport{traces: spanLists{}, obfVersion: -1} -} - -func (t *dummyTransport) Len() int { - t.RLock() - defer t.RUnlock() - return len(t.traces) -} - -func (t *dummyTransport) sendStats(p *pb.ClientStatsPayload, obfVersion int) error { - t.Lock() - t.stats = append(t.stats, p) - t.obfVersion = obfVersion - t.Unlock() - return nil -} - -func (t *dummyTransport) Stats() []*pb.ClientStatsPayload { - t.RLock() - defer t.RUnlock() - return t.stats -} - -func (t *dummyTransport) ObfuscationVersion() int { - t.RLock() - defer t.RUnlock() - return t.obfVersion -} - -func (t *dummyTransport) send(p *payload) (io.ReadCloser, error) { - traces, err := decode(p) - if err != nil { - return nil, err - } - t.Lock() - t.traces = append(t.traces, traces...) - t.Unlock() - ok := io.NopCloser(strings.NewReader("OK")) - return ok, nil -} - -func (t *dummyTransport) endpoint() string { - return "http://localhost:9/v0.4/traces" -} - -func decode(p *payload) (spanLists, error) { - var traces spanLists - err := msgp.Decode(p, &traces) - return traces, err -} - -func encode(traces [][]*Span) (*payload, error) { - p := newPayload() - for _, t := range traces { - if err := p.push(t); err != nil { - return p, err - } - } - return p, nil -} - -func (t *dummyTransport) Reset() { - t.Lock() - t.traces = t.traces[:0] - t.Unlock() -} - -func (t *dummyTransport) Traces() spanLists { - t.Lock() - defer t.Unlock() - - traces := t.traces - t.traces = spanLists{} - return traces -} - -// setHeaderTags sets the global header tags. -// Always resets the global value and returns true. -func setHeaderTags(headerAsTags []string) bool { - globalconfig.ClearHeaderTags() - for _, h := range headerAsTags { - header, tag := normalizer.HeaderTag(h) - if len(header) == 0 || len(tag) == 0 { - log.Debug("Header-tag input is in unsupported format; dropping input value %q", h) - continue - } - globalconfig.SetHeaderTag(header, tag) - } - return true -} - -// UserMonitoringConfig is used to configure what is used to identify a user. -// This configuration can be set by combining one or several UserMonitoringOption with a call to SetUser(). -type UserMonitoringConfig struct { - PropagateID bool - Login string - Org string - Email string - Name string - Role string - SessionID string - Scope string - Metadata map[string]string -} - -// UserMonitoringOption represents a function that can be provided as a parameter to SetUser. -type UserMonitoringOption func(*UserMonitoringConfig) - -// WithUserMetadata returns the option setting additional metadata of the authenticated user. -// This can be used multiple times and the given data will be tracked as `usr.{key}=value`. -func WithUserMetadata(key, value string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Metadata[key] = value - } -} - -// WithUserLogin returns the option setting the login of the authenticated user. -func WithUserLogin(login string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Login = login - } -} - -// WithUserOrg returns the option setting the organization of the authenticated user. -func WithUserOrg(org string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Org = org - } -} - -// WithUserEmail returns the option setting the email of the authenticated user. -func WithUserEmail(email string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Email = email - } -} - -// WithUserName returns the option setting the name of the authenticated user. -func WithUserName(name string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Name = name - } -} - -// WithUserSessionID returns the option setting the session ID of the authenticated user. -func WithUserSessionID(sessionID string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.SessionID = sessionID - } -} - -// WithUserRole returns the option setting the role of the authenticated user. -func WithUserRole(role string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Role = role - } -} - -// WithUserScope returns the option setting the scope (authorizations) of the authenticated user. -func WithUserScope(scope string) UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.Scope = scope - } -} - -// WithPropagation returns the option allowing the user id to be propagated through distributed traces. -// The user id is base64 encoded and added to the datadog propagated tags header. -// This option should only be used if you are certain that the user id passed to `SetUser()` does not contain any -// personal identifiable information or any kind of sensitive data, as it will be leaked to other services. -func WithPropagation() UserMonitoringOption { - return func(cfg *UserMonitoringConfig) { - cfg.PropagateID = true - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/orchestrion.yml b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/orchestrion.yml deleted file mode 100644 index 42e9f6ee47..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/orchestrion.yml +++ /dev/null @@ -1,120 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed -# under the Apache License Version 2.0. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2023-present Datadog, Inc. ---- -# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json -meta: - name: github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - description: |- - Automatically starts the github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - at the start of the application, and closes it at exit of the main function. - - Adding the `//dd:span` directive on functions creates custom spans - representing every call to that function. The default operation (span) name - is the name of the function, and this can be overridden using a "span.name" - argument to the directive: - - ```go - //dd:span span.name:custom-operation-name other:tag - func myFunction() { - // The default operation name would have been "myFunction" - } - ``` - - Function literal expressions don't have a function name, and their default operation name is the value of the very - first directive argument (if there is one). If there are no directive arguments, the operation name will remain - blank. - - ```go - //dd:span other:tag span.name:custom-operation-name - myOp := func() { - // The default operation name would have been "tag" - } - ``` - -extends: - - ../../internal/orchestrion/gls.orchestrion.yml - -aspects: - # Automatically manage the tracer lifecycle - - id: func main() - join-point: - all-of: - - package-name: main - - test-main: false - - function-body: - function: - - name: main - - signature: {} - advice: - - inject-declarations: - imports: - tracer: github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - # Note: it is valid to have multiple func init() in a single compile unit (e.g, `.go` file), in which case - # they get executed in declaration order. This means it's okay for us to add a new init function if there is - # already one in the file, but as it currently is appended AFTER all other declarations in the file, it means - # that it will be executed last (tracing contents of previous init functions will not be possible). - template: func init() { tracer.Start() } - # We need to stop the tracer at the end of `main` to ensure all spans are properly flushed. - - prepend-statements: - imports: - tracer: github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - template: |- - defer tracer.Stop() - - # Create spans for each function annotated with the //dd:span directive. - - id: '//dd:span' - join-point: - function-body: - directive: 'dd:span' - advice: - - prepend-statements: - imports: - context: context - tracer: github.com/DataDog/dd-trace-go/v2/ddtrace/tracer - template: |- - {{- $ctx := .Function.ArgumentOfType "context.Context" -}} - {{- $req := .Function.ArgumentOfType "*net/http.Request" -}} - {{- if (eq $ctx "") -}} - {{- $ctx = "ctx" -}} - ctx := {{- with $req -}} - {{ $req }}.Context() - {{- else -}} - context.TODO() - {{- end }} - {{ end -}} - - {{ $functionName := .Function.Name -}} - {{- $opName := $functionName -}} - {{- range .DirectiveArgs "dd:span" -}} - {{- if eq $opName "" -}} - {{ $opName = .Value }} - {{- end -}} - {{- if eq .Key "span.name" -}} - {{- $opName = .Value -}} - {{- break -}} - {{- end -}} - {{- end -}} - - var span *tracer.Span - span, {{ $ctx }} = tracer.StartSpanFromContext({{ $ctx }}, {{ printf "%q" $opName }}, - {{- with $functionName }} - tracer.Tag("function-name", {{ printf "%q" $functionName }}), - {{ end -}} - {{- range .DirectiveArgs "dd:span" }} - {{ if eq .Key "span.name" -}}{{- continue -}}{{- end -}} - tracer.Tag({{ printf "%q" .Key }}, {{ printf "%q" .Value }}), - {{- end }} - ) - {{- with $req }} - {{ $req }} = {{ $req }}.WithContext({{ $ctx }}) - {{- end }} - - {{ with .Function.ResultOfType "error" -}} - defer func(){ - span.Finish(tracer.WithError({{ . }})) - }() - {{ else -}} - defer span.Finish() - {{- end -}} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/otel_dd_mappings.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/otel_dd_mappings.go deleted file mode 100644 index 7ed6c17616..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/otel_dd_mappings.go +++ /dev/null @@ -1,236 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. -package tracer - -import ( - "fmt" - "os" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/stableconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -// otelDDEnv contains env vars from both dd (DD) and ot (OTEL) that map to the same tracer configuration -// remapper contains functionality to remap OTEL values to DD values -type otelDDEnv struct { - dd string - ot string - remapper func(string) (string, error) - handsOff bool // if true, check for configuration set in application_monitoring.yaml file -} - -var otelDDConfigs = map[string]*otelDDEnv{ - "service": { - dd: "DD_SERVICE", - ot: "OTEL_SERVICE_NAME", - remapper: mapService, - handsOff: false, - }, - "metrics": { - dd: "DD_RUNTIME_METRICS_ENABLED", - ot: "OTEL_METRICS_EXPORTER", - remapper: mapMetrics, - handsOff: true, - }, - "debugMode": { - dd: "DD_TRACE_DEBUG", - ot: "OTEL_LOG_LEVEL", - remapper: mapLogLevel, - handsOff: true, - }, - "enabled": { - dd: "DD_TRACE_ENABLED", - ot: "OTEL_TRACES_EXPORTER", - remapper: mapEnabled, - handsOff: false, - }, - "sampleRate": { - dd: "DD_TRACE_SAMPLE_RATE", - ot: "OTEL_TRACES_SAMPLER", - remapper: mapSampleRate, - handsOff: false, - }, - "propagationStyle": { - dd: "DD_TRACE_PROPAGATION_STYLE", - ot: "OTEL_PROPAGATORS", - remapper: mapPropagationStyle, - handsOff: false, - }, - "resourceAttributes": { - dd: "DD_TAGS", - ot: "OTEL_RESOURCE_ATTRIBUTES", - remapper: mapDDTags, - handsOff: false, - }, -} - -var ddTagsMapping = map[string]string{ - "service.name": "service", - "deployment.environment": "env", - "service.version": "version", -} - -var unsupportedSamplerMapping = map[string]string{ - "always_on": "parentbased_always_on", - "always_off": "parentbased_always_off", - "traceidratio": "parentbased_traceidratio", -} - -var propagationMapping = map[string]string{ - "tracecontext": "tracecontext", - "b3": "b3 single header", - "b3multi": "b3multi", - "datadog": "datadog", - "none": "none", -} - -// getDDorOtelConfig determines whether the provided otelDDOpt will be set via DD or OTEL env vars, and returns the value -func getDDorOtelConfig(configName string) string { - config, ok := otelDDConfigs[configName] - if !ok { - panic(fmt.Sprintf("Programming Error: %v not found in supported configurations", configName)) - } - - // 1. Check managed stable config if handsOff - if config.handsOff { - if v := stableconfig.ManagedConfig.Get(config.dd); v != "" { - telemetry.RegisterAppConfigs(telemetry.Configuration{Name: telemetry.EnvToTelemetryName(config.dd), Value: v, Origin: telemetry.OriginManagedStableConfig, ID: stableconfig.ManagedConfig.GetID()}) - return v - } - } - - // 2. Check environment variables (DD or OT) - val := os.Getenv(config.dd) - key := config.dd // Store the environment variable that will be used to set the config - if otVal := os.Getenv(config.ot); otVal != "" { - ddPrefix := "config_datadog:" - otelPrefix := "config_opentelemetry:" - if val != "" { - log.Warn("Both %q and %q are set, using %s=%s", config.ot, config.dd, config.dd, val) - telemetryTags := []string{ddPrefix + strings.ToLower(config.dd), otelPrefix + strings.ToLower(config.ot)} - telemetry.Count(telemetry.NamespaceTracers, "otel.env.hiding", telemetryTags).Submit(1) - } else { - v, err := config.remapper(otVal) - if err != nil { - log.Warn("%s", err.Error()) - telemetryTags := []string{ddPrefix + strings.ToLower(config.dd), otelPrefix + strings.ToLower(config.ot)} - telemetry.Count(telemetry.NamespaceTracers, "otel.env.invalid", telemetryTags).Submit(1) - } - key = config.ot - val = v - } - } - if val != "" { - telemetry.RegisterAppConfig(telemetry.EnvToTelemetryName(key), val, telemetry.OriginEnvVar) - return val - } - - // 3. If handsOff, check local stable config - if config.handsOff { - if v := stableconfig.LocalConfig.Get(config.dd); v != "" { - telemetry.RegisterAppConfigs(telemetry.Configuration{Name: telemetry.EnvToTelemetryName(config.dd), Value: v, Origin: telemetry.OriginLocalStableConfig, ID: stableconfig.LocalConfig.GetID()}) - return v - } - } - - // 4. Not found, return empty string - return "" -} - -// mapDDTags maps OTEL_RESOURCE_ATTRIBUTES to DD_TAGS -func mapDDTags(ot string) (string, error) { - ddTags := make([]string, 0) - internal.ForEachStringTag(ot, internal.OtelTagsDelimeter, func(key, val string) { - // replace otel delimiter with dd delimiter and normalize tag names - if ddkey, ok := ddTagsMapping[key]; ok { - // map reserved otel tag names to dd tag names - ddTags = append([]string{ddkey + internal.DDTagsDelimiter + val}, ddTags...) - } else { - ddTags = append(ddTags, key+internal.DDTagsDelimiter+val) - } - }) - - if len(ddTags) > 10 { - log.Warn("The following resource attributes have been dropped: %v. Only the first 10 resource attributes will be applied: %s", ddTags[10:], ddTags[:10]) //nolint:gocritic // Slice logging for debugging - ddTags = ddTags[:10] - } - - return strings.Join(ddTags, ","), nil -} - -// mapService maps OTEL_SERVICE_NAME to DD_SERVICE -func mapService(ot string) (string, error) { - return ot, nil -} - -// mapMetrics maps OTEL_METRICS_EXPORTER to DD_RUNTIME_METRICS_ENABLED -func mapMetrics(ot string) (string, error) { - ot = strings.TrimSpace(strings.ToLower(ot)) - if ot == "none" { - return "false", nil - } - return "", fmt.Errorf("the following configuration is not supported: OTEL_METRICS_EXPORTER=%v", ot) -} - -// mapLogLevel maps OTEL_LOG_LEVEL to DD_TRACE_DEBUG -func mapLogLevel(ot string) (string, error) { - if strings.TrimSpace(strings.ToLower(ot)) == "debug" { - return "true", nil - } - return "", fmt.Errorf("the following configuration is not supported: OTEL_LOG_LEVEL=%v", ot) -} - -// mapEnabled maps OTEL_TRACES_EXPORTER to DD_TRACE_ENABLED -func mapEnabled(ot string) (string, error) { - if strings.TrimSpace(strings.ToLower(ot)) == "none" { - return "false", nil - } - return "", fmt.Errorf("the following configuration is not supported: OTEL_METRICS_EXPORTER=%v", ot) -} - -// mapSampleRate maps OTEL_TRACES_SAMPLER to DD_TRACE_SAMPLE_RATE -func otelTraceIDRatio() string { - if v := os.Getenv("OTEL_TRACES_SAMPLER_ARG"); v != "" { - return v - } - return "1.0" -} - -// mapSampleRate maps OTEL_TRACES_SAMPLER to DD_TRACE_SAMPLE_RATE -func mapSampleRate(ot string) (string, error) { - ot = strings.TrimSpace(strings.ToLower(ot)) - if v, ok := unsupportedSamplerMapping[ot]; ok { - log.Warn("The following configuration is not supported: OTEL_TRACES_SAMPLER=%s. %s will be used", ot, v) - ot = v - } - - var samplerMapping = map[string]string{ - "parentbased_always_on": "1.0", - "parentbased_always_off": "0.0", - "parentbased_traceidratio": otelTraceIDRatio(), - } - if v, ok := samplerMapping[ot]; ok { - return v, nil - } - return "", fmt.Errorf("unknown sampling configuration %v", ot) -} - -// mapPropagationStyle maps OTEL_PROPAGATORS to DD_TRACE_PROPAGATION_STYLE -func mapPropagationStyle(ot string) (string, error) { - ot = strings.TrimSpace(strings.ToLower(ot)) - supportedStyles := make([]string, 0) - for _, otStyle := range strings.Split(ot, ",") { - otStyle = strings.TrimSpace(otStyle) - if _, ok := propagationMapping[otStyle]; ok { - supportedStyles = append(supportedStyles, propagationMapping[otStyle]) - } else { - log.Warn("Invalid configuration: %q is not supported. This propagation style will be ignored.", otStyle) - } - } - return strings.Join(supportedStyles, ","), nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/payload.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/payload.go deleted file mode 100644 index af70db5263..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/payload.go +++ /dev/null @@ -1,154 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "bytes" - "encoding/binary" - "io" - "sync/atomic" - - "github.com/tinylib/msgp/msgp" -) - -// payload is a wrapper on top of the msgpack encoder which allows constructing an -// encoded array by pushing its entries sequentially, one at a time. It basically -// allows us to encode as we would with a stream, except that the contents of the stream -// can be read as a slice by the msgpack decoder at any time. It follows the guidelines -// from the msgpack array spec: -// https://github.com/msgpack/msgpack/blob/master/spec.md#array-format-family -// -// payload implements io.Reader and can be used with the decoder directly. To create -// a new payload use the newPayload method. -// -// payload is not safe for concurrent use. -// -// payload is meant to be used only once and eventually dismissed with the -// single exception of retrying failed flush attempts. -// -// ⚠️ Warning! -// -// The payload should not be reused for multiple sets of traces. Resetting the -// payload for re-use requires the transport to wait for the HTTP package to -// Close the request body before attempting to re-use it again! This requires -// additional logic to be in place. See: -// -// • https://github.com/golang/go/blob/go1.16/src/net/http/client.go#L136-L138 -// • https://github.com/DataDog/dd-trace-go/pull/475 -// • https://github.com/DataDog/dd-trace-go/pull/549 -// • https://github.com/DataDog/dd-trace-go/pull/976 -type payload struct { - // header specifies the first few bytes in the msgpack stream - // indicating the type of array (fixarray, array16 or array32) - // and the number of items contained in the stream. - header []byte - - // off specifies the current read position on the header. - off int - - // count specifies the number of items in the stream. - count uint32 - - // buf holds the sequence of msgpack-encoded items. - buf bytes.Buffer - - // reader is used for reading the contents of buf. - reader *bytes.Reader -} - -var _ io.Reader = (*payload)(nil) - -// newPayload returns a ready to use payload. -func newPayload() *payload { - p := &payload{ - header: make([]byte, 8), - off: 8, - } - return p -} - -// push pushes a new item into the stream. -func (p *payload) push(t spanList) error { - p.buf.Grow(t.Msgsize()) - if err := msgp.Encode(&p.buf, t); err != nil { - return err - } - atomic.AddUint32(&p.count, 1) - p.updateHeader() - return nil -} - -// itemCount returns the number of items available in the stream. -func (p *payload) itemCount() int { - return int(atomic.LoadUint32(&p.count)) -} - -// size returns the payload size in bytes. After the first read the value becomes -// inaccurate by up to 8 bytes. -func (p *payload) size() int { - return p.buf.Len() + len(p.header) - p.off -} - -// reset sets up the payload to be read a second time. It maintains the -// underlying byte contents of the buffer. reset should not be used in order to -// reuse the payload for another set of traces. -func (p *payload) reset() { - p.updateHeader() - if p.reader != nil { - p.reader.Seek(0, 0) - } -} - -// clear empties the payload buffers. -func (p *payload) clear() { - p.buf = bytes.Buffer{} - p.reader = nil -} - -// https://github.com/msgpack/msgpack/blob/master/spec.md#array-format-family -const ( - msgpackArrayFix byte = 144 // up to 15 items - msgpackArray16 byte = 0xdc // up to 2^16-1 items, followed by size in 2 bytes - msgpackArray32 byte = 0xdd // up to 2^32-1 items, followed by size in 4 bytes -) - -// updateHeader updates the payload header based on the number of items currently -// present in the stream. -func (p *payload) updateHeader() { - n := uint64(atomic.LoadUint32(&p.count)) - switch { - case n <= 15: - p.header[7] = msgpackArrayFix + byte(n) - p.off = 7 - case n <= 1<<16-1: - binary.BigEndian.PutUint64(p.header, n) // writes 2 bytes - p.header[5] = msgpackArray16 - p.off = 5 - default: // n <= 1<<32-1 - binary.BigEndian.PutUint64(p.header, n) // writes 4 bytes - p.header[3] = msgpackArray32 - p.off = 3 - } -} - -// Close implements io.Closer -func (p *payload) Close() error { - return nil -} - -// Read implements io.Reader. It reads from the msgpack-encoded stream. -func (p *payload) Read(b []byte) (n int, err error) { - if p.off < len(p.header) { - // reading header - n = copy(b, p.header[p.off:]) - p.off += n - return n, nil - } - if p.reader == nil { - p.reader = bytes.NewReader(p.buf.Bytes()) - } - return p.reader.Read(b) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagating_tags.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagating_tags.go deleted file mode 100644 index e38b191bb3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagating_tags.go +++ /dev/null @@ -1,94 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -func (t *trace) hasPropagatingTag(k string) bool { - t.mu.RLock() - defer t.mu.RUnlock() - _, ok := t.propagatingTags[k] - return ok -} - -func (t *trace) propagatingTag(k string) string { - t.mu.RLock() - defer t.mu.RUnlock() - return t.propagatingTags[k] -} - -// setPropagatingTag sets the key/value pair as a trace propagating tag. -func (t *trace) setPropagatingTag(key, value string) { - t.mu.Lock() - defer t.mu.Unlock() - t.setPropagatingTagLocked(key, value) -} - -func (t *trace) setTraceSourcePropagatingTag(key string, value internal.TraceSource) { - t.mu.Lock() - defer t.mu.Unlock() - - // If there is already a TraceSource value set in the trace - // we need to add the new value to the bitmask. - if source := t.propagatingTags[key]; source != "" { - tSource, err := internal.ParseTraceSource(source) - if err != nil { - log.Error("failed to parse trace source tag: %s", err.Error()) - } - - tSource |= value - - t.setPropagatingTagLocked(key, tSource.String()) - return - } - - t.setPropagatingTagLocked(key, value.String()) -} - -// setPropagatingTagLocked sets the key/value pair as a trace propagating tag. -// Not safe for concurrent use, setPropagatingTag should be used instead in that case. -func (t *trace) setPropagatingTagLocked(key, value string) { - if t.propagatingTags == nil { - t.propagatingTags = make(map[string]string, 1) - } - t.propagatingTags[key] = value -} - -// unsetPropagatingTag deletes the key/value pair from the trace's propagated tags. -func (t *trace) unsetPropagatingTag(key string) { - t.mu.Lock() - defer t.mu.Unlock() - delete(t.propagatingTags, key) -} - -// iteratePropagatingTags allows safe iteration through the propagating tags of a trace. -// the trace must not be modified during this call, as it is locked for reading. -// -// f should return whether the iteration should continue. -func (t *trace) iteratePropagatingTags(f func(k, v string) bool) { - t.mu.RLock() - defer t.mu.RUnlock() - for k, v := range t.propagatingTags { - if !f(k, v) { - break - } - } -} - -func (t *trace) replacePropagatingTags(tags map[string]string) { - t.mu.Lock() - defer t.mu.Unlock() - t.propagatingTags = tags -} - -func (t *trace) propagatingTagsLen() int { - t.mu.RLock() - defer t.mu.RUnlock() - return len(t.propagatingTags) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagator.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagator.go deleted file mode 100644 index 4a0bfe7084..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/propagator.go +++ /dev/null @@ -1,55 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "errors" -) - -// Propagator implementations should be able to inject and extract -// SpanContexts into an implementation specific carrier. -type Propagator interface { - // Inject takes the SpanContext and injects it into the carrier. - Inject(context *SpanContext, carrier interface{}) error - - // Extract returns the SpanContext from the given carrier. - Extract(carrier interface{}) (*SpanContext, error) -} - -// TextMapWriter allows setting key/value pairs of strings on the underlying -// data structure. Carriers implementing TextMapWriter are compatible to be -// used with Datadog's TextMapPropagator. -type TextMapWriter interface { - // Set sets the given key/value pair. - Set(key, val string) -} - -// TextMapReader allows iterating over sets of key/value pairs. Carriers implementing -// TextMapReader are compatible to be used with Datadog's TextMapPropagator. -type TextMapReader interface { - // ForeachKey iterates over all keys that exist in the underlying - // carrier. It takes a callback function which will be called - // using all key/value pairs as arguments. ForeachKey will return - // the first error returned by the handler. - ForeachKey(handler func(key, val string) error) error -} - -var ( - // ErrInvalidCarrier is returned when the carrier provided to the propagator - // does not implement the correct interfaces. - ErrInvalidCarrier = errors.New("invalid carrier") - - // ErrInvalidSpanContext is returned when the span context found in the - // carrier is not of the expected type. - ErrInvalidSpanContext = errors.New("invalid span context") - - // ErrSpanContextCorrupted is returned when there was a problem parsing - // the information found in the carrier. - ErrSpanContextCorrupted = errors.New("span context corrupted") - - // ErrSpanContextNotFound represents missing information in the given carrier. - ErrSpanContextNotFound = errors.New("span context not found") -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rand.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rand.go deleted file mode 100644 index 75225b1a31..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rand.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "math" - "math/rand/v2" -) - -func randUint64() uint64 { - return rand.Uint64() -} - -func generateSpanID(_ int64) uint64 { - return rand.Uint64() & math.MaxInt64 -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/remote_config.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/remote_config.go deleted file mode 100644 index 2a14dadb09..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/remote_config.go +++ /dev/null @@ -1,427 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "regexp" - "strings" - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/remoteconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - - "github.com/DataDog/datadog-agent/pkg/remoteconfig/state" -) - -type configData struct { - Action string `json:"action"` - ServiceTarget target `json:"service_target"` - LibConfig libConfig `json:"lib_config"` -} - -type target struct { - Service string `json:"service"` - Env string `json:"env"` -} - -type libConfig struct { - Enabled *bool `json:"tracing_enabled,omitempty"` - SamplingRate *float64 `json:"tracing_sampling_rate,omitempty"` - TraceSamplingRules *[]rcSamplingRule `json:"tracing_sampling_rules,omitempty"` - HeaderTags *headerTags `json:"tracing_header_tags,omitempty"` - Tags *tags `json:"tracing_tags,omitempty"` -} - -type rcTag struct { - Key string `json:"key"` - ValueGlob string `json:"value_glob"` -} - -// Sampling rules provided by the remote config define tags differently other than using a map. -type rcSamplingRule struct { - Service string `json:"service"` - Provenance provenance `json:"provenance"` - Name string `json:"name,omitempty"` - Resource string `json:"resource"` - Tags []rcTag `json:"tags,omitempty"` - SampleRate float64 `json:"sample_rate"` -} - -func convertRemoteSamplingRules(rules *[]rcSamplingRule) *[]SamplingRule { - if rules == nil { - return nil - } - var convertedRules []SamplingRule - for _, rule := range *rules { - if rule.Tags != nil { - tags := make(map[string]*regexp.Regexp, len(rule.Tags)) - tagsStrs := make(map[string]string, len(rule.Tags)) - for _, tag := range rule.Tags { - tags[tag.Key] = globMatch(tag.ValueGlob) - tagsStrs[tag.Key] = tag.ValueGlob - } - x := SamplingRule{ - Service: globMatch(rule.Service), - Name: globMatch(rule.Name), - Resource: globMatch(rule.Resource), - Rate: rule.SampleRate, - Tags: tags, - Provenance: rule.Provenance, - globRule: &jsonRule{ - Name: rule.Name, - Service: rule.Service, - Resource: rule.Resource, - Tags: tagsStrs, - }, - } - - convertedRules = append(convertedRules, x) - } else { - x := SamplingRule{ - Service: globMatch(rule.Service), - Name: globMatch(rule.Name), - Resource: globMatch(rule.Resource), - Rate: rule.SampleRate, - Provenance: rule.Provenance, - globRule: &jsonRule{Name: rule.Name, Service: rule.Service, Resource: rule.Resource}, - } - convertedRules = append(convertedRules, x) - } - } - return &convertedRules -} - -type headerTags []headerTag - -type headerTag struct { - Header string `json:"header"` - TagName string `json:"tag_name"` -} - -func (hts *headerTags) toSlice() *[]string { - if hts == nil { - return nil - } - s := make([]string, len(*hts)) - for i, ht := range *hts { - s[i] = ht.toString() - } - return &s -} - -func (ht headerTag) toString() string { - var sb strings.Builder - sb.WriteString(ht.Header) - sb.WriteString(":") - sb.WriteString(ht.TagName) - return sb.String() -} - -type tags []string - -func (t *tags) toMap() *map[string]interface{} { - if t == nil { - return nil - } - m := make(map[string]interface{}, len(*t)) - for _, tag := range *t { - if kv := strings.SplitN(tag, ":", 2); len(kv) == 2 { - m[kv[0]] = kv[1] - } - } - return &m -} - -// onRemoteConfigUpdate is a remote config callaback responsible for processing APM_TRACING RC-product updates. -func (t *tracer) onRemoteConfigUpdate(u remoteconfig.ProductUpdate) map[string]state.ApplyStatus { - statuses := map[string]state.ApplyStatus{} - if len(u) == 0 { - return statuses - } - removed := func() bool { - // Returns true if all the values in the update are nil. - for _, raw := range u { - if raw != nil { - return false - } - } - return true - } - var telemConfigs []telemetry.Configuration - if removed() { - // The remote-config client is signaling that the configuration has been deleted for this product. - // We re-apply the startup configuration values. - for path := range u { - log.Debug("Nil payload from RC. Path: %s.", path) - statuses[path] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - } - log.Debug("Resetting configurations") - updated := t.config.traceSampleRate.reset() - if updated { - telemConfigs = append(telemConfigs, t.config.traceSampleRate.toTelemetry()) - } - updated = t.config.traceSampleRules.reset() - if updated { - telemConfigs = append(telemConfigs, t.config.traceSampleRules.toTelemetry()) - } - updated = t.config.headerAsTags.reset() - if updated { - telemConfigs = append(telemConfigs, t.config.headerAsTags.toTelemetry()) - } - updated = t.config.globalTags.reset() - if updated { - telemConfigs = append(telemConfigs, t.config.globalTags.toTelemetry()) - } - if !t.config.enabled.current { - log.Debug("APM Tracing is disabled. Restart the service to enable it.") - } - if len(telemConfigs) > 0 { - log.Debug("Reporting %d configuration changes to telemetry", len(telemConfigs)) - telemetry.RegisterAppConfigs(telemConfigs...) - } - return statuses - } - for path, raw := range u { - if raw == nil { - continue - } - log.Debug("Processing config from RC. Path: %s. Raw: %s", path, raw) - var c configData - if err := json.Unmarshal(raw, &c); err != nil { - log.Debug("Error while unmarshalling payload for %q: %v. Configuration won't be applied.", path, err.Error()) - statuses[path] = state.ApplyStatus{State: state.ApplyStateError, Error: err.Error()} - continue - } - statuses[path] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - updated := t.config.traceSampleRate.handleRC(c.LibConfig.SamplingRate) - if updated { - telemConfigs = append(telemConfigs, t.config.traceSampleRate.toTelemetry()) - } - updated = t.config.traceSampleRules.handleRC(convertRemoteSamplingRules(c.LibConfig.TraceSamplingRules)) - if updated { - telemConfigs = append(telemConfigs, t.config.traceSampleRules.toTelemetry()) - } - updated = t.config.headerAsTags.handleRC(c.LibConfig.HeaderTags.toSlice()) - if updated { - telemConfigs = append(telemConfigs, t.config.headerAsTags.toTelemetry()) - } - updated = t.config.globalTags.handleRC(c.LibConfig.Tags.toMap()) - if updated { - telemConfigs = append(telemConfigs, t.config.globalTags.toTelemetry()) - } - if c.LibConfig.Enabled != nil { - if t.config.enabled.current && !*c.LibConfig.Enabled { - log.Debug("Disabled APM Tracing through RC. Restart the service to enable it.") - t.config.enabled.handleRC(c.LibConfig.Enabled) - telemConfigs = append(telemConfigs, t.config.enabled.toTelemetry()) - } else if !t.config.enabled.current && *c.LibConfig.Enabled { - log.Debug("APM Tracing is disabled. Restart the service to enable it.") - } - } - } - if len(telemConfigs) > 0 { - log.Debug("Reporting %d configuration changes to telemetry", len(telemConfigs)) - telemetry.RegisterAppConfigs(telemConfigs...) - } - return statuses -} - -type dynamicInstrumentationRCProbeConfig struct { - configPath string - configContent string -} - -type dynamicInstrumentationRCState struct { - sync.Mutex - state map[string]dynamicInstrumentationRCProbeConfig - - // symdbExport is a flag that indicates that this tracer is resposible - // for uploading symbols to the symbol database. The tracer will learn - // about this fact through the callbacks like the other dynamic - // instrumentation RC callbacks. - // - // The system is designed such that only a single tracer at a time is - // responsible for uploading symbols to the symbol database. This is - // communicated through a single RC key with a constant value. In order to - // simplify the internal state of the tracer an avoid risks of excess memory - // usage, we use a single boolean flag to track this state as opposed to - // tracking the actual RC key and value. - symdbExport bool -} - -var ( - diRCState dynamicInstrumentationRCState - initalizeRC sync.Once -) - -func (t *tracer) dynamicInstrumentationRCUpdate(u remoteconfig.ProductUpdate) map[string]state.ApplyStatus { - applyStatus := make(map[string]state.ApplyStatus, len(u)) - - diRCState.Lock() - defer diRCState.Unlock() - for k, v := range u { - log.Debug("Received dynamic instrumentation RC configuration for %s\n", k) - if len(v) == 0 { - delete(diRCState.state, k) - applyStatus[k] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - } else { - diRCState.state[k] = dynamicInstrumentationRCProbeConfig{ - configPath: k, - configContent: string(v), - } - applyStatus[k] = state.ApplyStatus{State: state.ApplyStateUnknown} - } - } - return applyStatus -} - -func (t *tracer) dynamicInstrumentationSymDBRCUpdate( - u remoteconfig.ProductUpdate, -) map[string]state.ApplyStatus { - applyStatus := make(map[string]state.ApplyStatus, len(u)) - diRCState.Lock() - defer diRCState.Unlock() - symDBEnabled := false - for k, v := range u { - if len(v) == 0 { - applyStatus[k] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - } else { - applyStatus[k] = state.ApplyStatus{State: state.ApplyStateUnknown} - symDBEnabled = true - } - } - diRCState.symdbExport = symDBEnabled - return applyStatus -} - -// passProbeConfiguration is used as a stable interface to find the -// configuration in via bpf. Go-DI attaches a bpf program to this function and -// extracts the raw bytes accordingly. -// -//nolint:all -//go:noinline -func passProbeConfiguration(runtimeID, configPath, configContent string) {} - -// passAllProbeConfigurationsComplete is used to signal to the bpf program that -// all probe configurations have been passed. -// -//nolint:all -//go:noinline -func passAllProbeConfigurationsComplete(runtimeID string) {} - -// passSymDBState is used as a stable interface to find the symbol database -// state via bpf. Go-DI attaches a bpf program to this function and extracts -// the arguments accordingly. -// -//nolint:all -//go:noinline -func passSymDBState(runtimeID string, enabled bool) {} - -// passAllProbeConfigurations is used to pass all probe configurations to the -// bpf program. -// -//go:noinline -func passAllProbeConfigurations(runtimeID string) { - defer passAllProbeConfigurationsComplete(runtimeID) - diRCState.Lock() - defer diRCState.Unlock() - for _, v := range diRCState.state { - accessStringsToMitigatePageFault(runtimeID, v.configPath, v.configContent) - passProbeConfiguration(runtimeID, v.configPath, v.configContent) - } - passSymDBState(runtimeID, diRCState.symdbExport) -} - -func initalizeDynamicInstrumentationRemoteConfigState() { - diRCState = dynamicInstrumentationRCState{ - state: map[string]dynamicInstrumentationRCProbeConfig{}, - } - - go func() { - for { - time.Sleep(time.Second * 5) - passAllProbeConfigurations(globalconfig.RuntimeID()) - } - }() -} - -// accessStringsToMitigatePageFault iterates over each string to trigger a page fault, -// ensuring it is loaded into RAM or listed in the translation lookaside buffer. -// This is done by writing the string to io.Discard. -// -// This function addresses an issue with the bpf program that hooks the -// `passProbeConfiguration()` function from system-probe. The bpf program fails -// to read strings if a page fault occurs because the `bpf_probe_read()` helper -// disables paging (uprobe bpf programs can't sleep). Consequently, page faults -// cause `bpf_probe_read()` to return an error and not read any data. -// By preloading the strings, we mitigate this issue, enhancing the reliability -// of the Go Dynamic Instrumentation product. -func accessStringsToMitigatePageFault(strs ...string) { - for i := range strs { - io.WriteString(io.Discard, strs[i]) - } -} - -// startRemoteConfig starts the remote config client. It registers the -// APM_TRACING product unconditionally and it registers the LIVE_DEBUGGING and -// LIVE_DEBUGGING_SYMBOL_DB with their respective callbacks if the tracer is -// configured to use the dynamic instrumentation product. -func (t *tracer) startRemoteConfig(rcConfig remoteconfig.ClientConfig) error { - err := remoteconfig.Start(rcConfig) - if err != nil { - return err - } - - var dynamicInstrumentationError, apmTracingError error - - if t.config.dynamicInstrumentationEnabled { - liveDebuggingError := remoteconfig.Subscribe( - "LIVE_DEBUGGING", t.dynamicInstrumentationRCUpdate, - ) - liveDebuggingSymDBError := remoteconfig.Subscribe( - "LIVE_DEBUGGING_SYMBOL_DB", t.dynamicInstrumentationSymDBRCUpdate, - ) - if liveDebuggingError != nil && liveDebuggingSymDBError != nil { - dynamicInstrumentationError = errors.Join( - liveDebuggingError, - liveDebuggingSymDBError, - ) - } else if liveDebuggingError != nil { - dynamicInstrumentationError = liveDebuggingError - } else if liveDebuggingSymDBError != nil { - dynamicInstrumentationError = liveDebuggingSymDBError - } - } - - initalizeRC.Do(initalizeDynamicInstrumentationRemoteConfigState) - - apmTracingError = remoteconfig.Subscribe( - state.ProductAPMTracing, - t.onRemoteConfigUpdate, - remoteconfig.APMTracingSampleRate, - remoteconfig.APMTracingHTTPHeaderTags, - remoteconfig.APMTracingCustomTags, - remoteconfig.APMTracingEnabled, - remoteconfig.APMTracingSampleRules, - ) - - if apmTracingError != nil || dynamicInstrumentationError != nil { - return fmt.Errorf( - "could not subscribe to at least one remote config product: %w; %w", - apmTracingError, - dynamicInstrumentationError, - ) - } - - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rules_sampler.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rules_sampler.go deleted file mode 100644 index 427065627f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/rules_sampler.go +++ /dev/null @@ -1,874 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "encoding/json" - "fmt" - "math" - "os" - "regexp" - "strconv" - "strings" - "sync" - "time" - - "golang.org/x/time/rate" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" -) - -// rulesSampler holds instances of trace sampler and single span sampler, that are configured with the given set of rules. -type rulesSampler struct { - // traceRulesSampler samples trace spans based on a user-defined set of rules and might impact sampling decision of the trace. - traces *traceRulesSampler - - // singleSpanRulesSampler samples individual spans based on a separate user-defined set of rules and - // cannot impact the trace sampling decision. - spans *singleSpanRulesSampler -} - -// newRulesSampler configures a *rulesSampler instance using the given set of rules. -// Rules are split between trace and single span sampling rules according to their type. -// Such rules are user-defined through environment variable or WithSamplingRules option. -// Invalid rules or environment variable values are tolerated, by logging warnings and then ignoring them. -func newRulesSampler(traceRules, spanRules []SamplingRule, traceSampleRate, rateLimitPerSecond float64) *rulesSampler { - return &rulesSampler{ - traces: newTraceRulesSampler(traceRules, traceSampleRate, rateLimitPerSecond), - spans: newSingleSpanRulesSampler(spanRules), - } -} - -func (r *rulesSampler) SampleTrace(s *Span) bool { - if s == nil { - return false - } - return r.traces.sampleRules(s) -} - -func (r *rulesSampler) SampleTraceGlobalRate(s *Span) bool { - if s == nil { - return false - } - return r.traces.sampleGlobalRate(s) -} - -func (r *rulesSampler) SampleSpan(s *Span) bool { - if s == nil { - return false - } - return r.spans.apply(s) -} - -func (r *rulesSampler) HasSpanRules() bool { return r.spans.enabled() } - -func (r *rulesSampler) TraceRateLimit() (float64, bool) { return r.traces.limit() } - -type provenance int32 - -const ( - Local provenance = iota - Customer provenance = 1 - Dynamic provenance = 2 -) - -var provenances = []provenance{Local, Customer, Dynamic} - -func (p provenance) String() string { - switch p { - case Local: - return "local" - case Customer: - return "customer" - case Dynamic: - return "dynamic" - default: - return "" - } -} - -func (p provenance) MarshalJSON() ([]byte, error) { - return json.Marshal(p.String()) -} - -func (p *provenance) UnmarshalJSON(data []byte) error { - var prov string - var err error - if err = json.Unmarshal(data, &prov); err != nil { - return err - } - if *p, err = parseProvenance(prov); err != nil { - return err - } - return nil -} - -func parseProvenance(p string) (provenance, error) { - for _, v := range provenances { - if strings.EqualFold(strings.TrimSpace(strings.ToLower(p)), v.String()) { - return v, nil - } - } - return Customer, fmt.Errorf("invalid provenance: \"%v\"", p) -} - -// SamplingRule is used for applying sampling rates to spans that match -// the service name, operation name or both. -// For basic usage, consider using the helper functions ServiceRule, NameRule, etc. -type SamplingRule struct { - // Service specifies the regex pattern that a span service name must match. - Service *regexp.Regexp - - // Name specifies the regex pattern that a span operation name must match. - Name *regexp.Regexp - - // Rate specifies the sampling rate that should be applied to spans that match - // service and/or name of the rule. - Rate float64 - - // MaxPerSecond specifies max number of spans per second that can be sampled per the rule. - // If not specified, the default is no limit. - MaxPerSecond float64 - - // Resource specifies the regex pattern that a span resource must match. - Resource *regexp.Regexp - - // Tags specifies the map of key-value patterns that span tags must match. - Tags map[string]*regexp.Regexp - - Provenance provenance - - ruleType SamplingRuleType - limiter *rateLimiter - - globRule *jsonRule -} - -// Poor-man's comparison of two regex for equality without resorting to fancy symbolic computation. -// The result is false negative: whenever the function returns true, we know the two regex must be -// equal. The reverse is not true. Two regex can be equivalent while reported as not. -// This is good for use as an indication of optimization that applies when two regex are equals. -func regexEqualsFalseNegative(a, b *regexp.Regexp) bool { - if (a == nil) != (b == nil) { - return false - } - if a == nil { - return true - } - return a.String() == b.String() -} - -func (sr *SamplingRule) EqualsFalseNegative(other *SamplingRule) bool { - if (sr == nil) != (other == nil) { - return false - } - if sr == nil { - return true - } - if sr.Rate != other.Rate || sr.ruleType != other.ruleType || - !regexEqualsFalseNegative(sr.Service, other.Service) || - !regexEqualsFalseNegative(sr.Name, other.Name) || - !regexEqualsFalseNegative(sr.Resource, other.Resource) || - len(sr.Tags) != len(other.Tags) { - return false - } - for k, v := range sr.Tags { - if vo, ok := other.Tags[k]; !ok || !regexEqualsFalseNegative(v, vo) { - return false - } - } - return true -} - -// match returns true when the span's details match all the expected values in the rule. -func (sr *SamplingRule) match(s *Span) bool { - if sr.Service != nil && !sr.Service.MatchString(s.service) { - return false - } - if sr.Name != nil && !sr.Name.MatchString(s.name) { - return false - } - if sr.Resource != nil && !sr.Resource.MatchString(s.resource) { - return false - } - s.mu.Lock() - defer s.mu.Unlock() - if sr.Tags != nil { - for k, regex := range sr.Tags { - if regex == nil { - continue - } - if s.meta != nil { - v, ok := s.meta[k] - if ok && regex.MatchString(v) { - continue - } - } - if s.metrics != nil { - v, ok := s.metrics[k] - // sampling on numbers with floating point is not supported, - // thus 'math.Floor(v) != v' - if !ok || math.Floor(v) != v || !regex.MatchString(strconv.FormatFloat(v, 'g', -1, 64)) { - return false - } - } - } - } - return true -} - -// SamplingRuleType represents a type of sampling rule spans are matched against. -type SamplingRuleType int - -const ( - SamplingRuleUndefined SamplingRuleType = 0 - - // SamplingRuleTrace specifies a sampling rule that applies to the entire trace if any spans satisfy the criteria. - // If a sampling rule is of type SamplingRuleTrace, such rule determines the sampling rate to apply - // to trace spans. If a span matches that rule, it will impact the trace sampling decision. - SamplingRuleTrace = iota - - // SamplingRuleSpan specifies a sampling rule that applies to a single span without affecting the entire trace. - // If a sampling rule is of type SamplingRuleSingleSpan, such rule determines the sampling rate to apply - // to individual spans. If a span matches a rule, it will NOT impact the trace sampling decision. - // In the case that a trace is dropped and thus not sent to the Agent, spans kept on account - // of matching SamplingRuleSingleSpan rules must be conveyed separately. - SamplingRuleSpan -) - -func (sr SamplingRuleType) String() string { - switch sr { - case SamplingRuleTrace: - return "trace" - case SamplingRuleSpan: - return "span" - default: - return "" - } -} - -// Rule is used to create a sampling rule. -type Rule struct { - ServiceGlob string - NameGlob string - ResourceGlob string - Tags map[string]string // map of string to glob pattern - Rate float64 - MaxPerSecond float64 -} - -// TraceSamplingRules creates a sampling rule that applies to the entire trace if any spans satisfy the criteria. -func TraceSamplingRules(rules ...Rule) []SamplingRule { - var samplingRules []SamplingRule - var typ SamplingRuleType = SamplingRuleTrace - for _, r := range rules { - sr := SamplingRule{ - Service: globMatch(r.ServiceGlob), - Name: globMatch(r.NameGlob), - Resource: globMatch(r.ResourceGlob), - Rate: r.Rate, - ruleType: SamplingRuleTrace, - globRule: &jsonRule{ - Service: r.ServiceGlob, - Name: r.NameGlob, - Rate: json.Number(strconv.FormatFloat(r.Rate, 'f', -1, 64)), - MaxPerSecond: r.MaxPerSecond, - Resource: r.ResourceGlob, - Tags: r.Tags, - Type: &typ, - }, - } - if len(r.Tags) != 0 { - sr.Tags = make(map[string]*regexp.Regexp, len(r.Tags)) - for k, v := range r.Tags { - if g := globMatch(v); g != nil { - sr.Tags[k] = g - } - } - } - samplingRules = append(samplingRules, sr) - } - return samplingRules -} - -// SpanSamplingRules creates a sampling rule that applies to a single span without affecting the entire trace. -func SpanSamplingRules(rules ...Rule) []SamplingRule { - var samplingRules []SamplingRule - var typ SamplingRuleType = SamplingRuleSpan - for _, r := range rules { - sr := SamplingRule{ - Service: globMatch(r.ServiceGlob), - Name: globMatch(r.NameGlob), - Resource: globMatch(r.ResourceGlob), - Rate: r.Rate, - ruleType: SamplingRuleSpan, - MaxPerSecond: r.MaxPerSecond, - limiter: newSingleSpanRateLimiter(r.MaxPerSecond), - globRule: &jsonRule{ - Service: r.ServiceGlob, - Name: r.NameGlob, - Rate: json.Number(strconv.FormatFloat(r.Rate, 'f', -1, 64)), - MaxPerSecond: r.MaxPerSecond, - Resource: r.ResourceGlob, - Tags: r.Tags, - Type: &typ, - }, - } - if len(r.Tags) != 0 { - sr.Tags = make(map[string]*regexp.Regexp, len(r.Tags)) - for k, v := range r.Tags { - if g := globMatch(v); g != nil { - sr.Tags[k] = g - } - } - } - samplingRules = append(samplingRules, sr) - } - return samplingRules -} - -// traceRulesSampler allows a user-defined list of rules to apply to traces. -// These rules can match based on the span's Service, Name or both. -// When making a sampling decision, the rules are checked in order until -// a match is found. -// If a match is found, the rate from that rule is used. -// If no match is found, and the DD_TRACE_SAMPLE_RATE environment variable -// was set to a valid rate, that value is used. -// Otherwise, the rules sampler didn't apply to the span, and the decision -// is passed to the priority sampler. -// -// The rate is used to determine if the span should be sampled, but an upper -// limit can be defined using the DD_TRACE_RATE_LIMIT environment variable. -// Its value is the number of spans to sample per second. -// Spans that matched the rules but exceeded the rate limit are not sampled. -type traceRulesSampler struct { - m sync.RWMutex - rules []SamplingRule // the rules to match spans with - globalRate float64 // a rate to apply when no rules match a span - limiter *rateLimiter // used to limit the volume of spans sampled -} - -// newTraceRulesSampler configures a *traceRulesSampler instance using the given set of rules. -// Invalid rules or environment variable values are tolerated, by logging warnings and then ignoring them. -func newTraceRulesSampler(rules []SamplingRule, traceSampleRate, rateLimitPerSecond float64) *traceRulesSampler { - return &traceRulesSampler{ - rules: rules, - globalRate: traceSampleRate, - limiter: newRateLimiter(rateLimitPerSecond), - } -} - -func (rs *traceRulesSampler) enabled() bool { - rs.m.RLock() - defer rs.m.RUnlock() - return len(rs.rules) > 0 || !math.IsNaN(rs.globalRate) -} - -// EqualsFalseNegative tests whether two sets of the rules are the same. -// This returns result that can be false negative. If the result is true, then the two sets of rules -// are guaranteed to be the same. -// On the other hand, false can be returned while the two rulesets are logically the same. -// This function can be used to detect optimization opportunities when two rulesets are the same. -// For example, an update of one ruleset is not needed if it's the same as the previous one. -func EqualsFalseNegative(a, b []SamplingRule) bool { - if len(a) != len(b) { - return false - } - for i, r := range a { - if !r.EqualsFalseNegative(&b[i]) { - return false - } - } - return true -} - -// setGlobalSampleRate sets the global sample rate to the given value. -// Returns whether the value was changed or not. -func (rs *traceRulesSampler) setGlobalSampleRate(rate float64) bool { - if rate < 0.0 || rate > 1.0 { - log.Warn("Ignoring trace sample rate %f: value out of range [0,1]", rate) - return false - } - rs.m.Lock() - defer rs.m.Unlock() - if math.IsNaN(rs.globalRate) && math.IsNaN(rate) { - // NaN is not considered equal to any number, including itself. - // It should be compared with math.IsNaN - return false - } - if rs.globalRate == rate { - return false - } - rs.globalRate = rate - return true -} - -// Assumes the new rules are different from the old rules. -func (rs *traceRulesSampler) setTraceSampleRules(rules []SamplingRule) bool { - if EqualsFalseNegative(rs.rules, rules) { - return false - } - rs.rules = rules - return true -} - -// sampleGlobalRate applies the global trace sampling rate to the span. If the rate is Nan, -// the function return false, then it returns false and the span is not -// modified. -func (rs *traceRulesSampler) sampleGlobalRate(span *Span) bool { - if !rs.enabled() { - // short path when disabled - return false - } - - rs.m.RLock() - rate := rs.globalRate - rs.m.RUnlock() - - if math.IsNaN(rate) { - return false - } - - // global rate is a degenerated case of rule rate. - // Technically speaking, global rate also has two possible provenance: local or remote. - // We just apply the the sampler name corresponding to local rule rate because global rate is - // being deprecated in favor of sampling rules. - // Note that this just preserves an existing behavior even though it is not correct. - sampler := samplernames.RuleRate - rs.applyRate(span, rate, time.Now(), sampler) - return true -} - -// sampleRules uses the sampling rules to determine the sampling rate for the -// provided span. If the rules don't match, then it returns false and the span is not -// modified. -func (rs *traceRulesSampler) sampleRules(span *Span) bool { - if !rs.enabled() { - // short path when disabled - return false - } - - var matched bool - rs.m.RLock() - rate := rs.globalRate - rs.m.RUnlock() - sampler := samplernames.RuleRate - for _, rule := range rs.rules { - if rule.match(span) { - matched = true - rate = rule.Rate - if rule.Provenance == Customer { - sampler = samplernames.RemoteUserRule - } else if rule.Provenance == Dynamic { - sampler = samplernames.RemoteDynamicRule - } - break - } - } - if !matched { - // no matching rule or global rate, so we want to fall back - // to priority sampling - return false - } - - rs.applyRate(span, rate, time.Now(), sampler) - return true -} - -func (rs *traceRulesSampler) applyRate(span *Span, rate float64, now time.Time, sampler samplernames.SamplerName) { - span.mu.Lock() - defer span.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if span.finished { - return - } - - span.setMetric(keyRulesSamplerAppliedRate, rate) - delete(span.metrics, keySamplingPriorityRate) - if !sampledByRate(span.traceID, rate) { - span.setSamplingPriorityLocked(ext.PriorityUserReject, sampler) - return - } - - sampled, rate := rs.limiter.allowOne(now) - if sampled { - span.setSamplingPriorityLocked(ext.PriorityUserKeep, sampler) - } else { - span.setSamplingPriorityLocked(ext.PriorityUserReject, sampler) - } - span.setMetric(keyRulesSamplerLimiterRate, rate) -} - -// limit returns the rate limit set in the rules sampler, controlled by DD_TRACE_RATE_LIMIT, and -// true if rules sampling is enabled. If not present it returns math.NaN() and false. -func (rs *traceRulesSampler) limit() (float64, bool) { - if rs.enabled() { - return float64(rs.limiter.limiter.Limit()), true - } - return math.NaN(), false -} - -// newRateLimiter returns a rate limiter which restricts the number of traces sampled per second. -// The limit is DD_TRACE_RATE_LIMIT if set, `defaultRateLimit` otherwise. -func newRateLimiter(ratePerSecond float64) *rateLimiter { - return &rateLimiter{ - limiter: rate.NewLimiter(rate.Limit(ratePerSecond), int(math.Ceil(ratePerSecond))), - prevTime: time.Now(), - } -} - -// singleSpanRulesSampler allows a user-defined list of rules to apply to spans -// to sample single spans. -// These rules match based on the span's Service and Name. If empty value is supplied -// to either Service or Name field, it will default to "*", allow all. -// When making a sampling decision, the rules are checked in order until -// a match is found. -// If a match is found, the rate from that rule is used. -// If no match is found, no changes or further sampling is applied to the spans. -// The rate is used to determine if the span should be sampled, but an upper -// limit can be defined using the max_per_second field when supplying the rule. -// If max_per_second is absent in the rule, the default is allow all. -// Its value is the max number of spans to sample per second. -// Spans that matched the rules but exceeded the rate limit are not sampled. -type singleSpanRulesSampler struct { - rules []SamplingRule // the rules to match spans with -} - -// newSingleSpanRulesSampler configures a *singleSpanRulesSampler instance using the given set of rules. -// Invalid rules or environment variable values are tolerated, by logging warnings and then ignoring them. -func newSingleSpanRulesSampler(rules []SamplingRule) *singleSpanRulesSampler { - return &singleSpanRulesSampler{ - rules: rules, - } -} - -func (rs *singleSpanRulesSampler) enabled() bool { - return len(rs.rules) > 0 -} - -// apply uses the sampling rules to determine the sampling rate for the -// provided span. If the rules don't match, then it returns false and the span is not -// modified. -func (rs *singleSpanRulesSampler) apply(span *Span) bool { - for _, rule := range rs.rules { - if rule.match(span) { - rate := rule.Rate - if !sampledByRate(span.spanID, rate) { - return false - } - var sampled bool - if rule.limiter != nil { - sampled, rate = rule.limiter.allowOne(nowTime()) - if !sampled { - return false - } - } - delete(span.metrics, keySamplingPriorityRate) - span.setMetric(keySpanSamplingMechanism, float64(samplernames.SingleSpan)) - span.setMetric(keySingleSpanSamplingRuleRate, rate) - if rule.MaxPerSecond != 0 { - span.setMetric(keySingleSpanSamplingMPS, rule.MaxPerSecond) - } - return true - } - } - return false -} - -// rateLimiter is a wrapper on top of golang.org/x/time/rate which implements a rate limiter but also -// returns the effective rate of allowance. -type rateLimiter struct { - limiter *rate.Limiter - - mu sync.Mutex // guards below fields - prevTime time.Time // time at which prevAllowed and prevSeen were set - allowed float64 // number of spans allowed in the current period - seen float64 // number of spans seen in the current period - prevAllowed float64 // number of spans allowed in the previous period - prevSeen float64 // number of spans seen in the previous period -} - -// allowOne returns the rate limiter's decision to allow the span to be sampled, and the -// effective rate at the time it is called. The effective rate is computed by averaging the rate -// for the previous second with the current rate -func (r *rateLimiter) allowOne(now time.Time) (bool, float64) { - r.mu.Lock() - defer r.mu.Unlock() - if d := now.Sub(r.prevTime); d >= time.Second { - // enough time has passed to reset the counters - if d.Truncate(time.Second) == time.Second && r.seen > 0 { - // exactly one second, so update prev - r.prevAllowed = r.allowed - r.prevSeen = r.seen - } else { - // more than one second, so reset previous rate - r.prevAllowed = 0 - r.prevSeen = 0 - } - r.prevTime = now - r.allowed = 0 - r.seen = 0 - } - - r.seen++ - var sampled bool - if r.limiter.AllowN(now, 1) { - r.allowed++ - sampled = true - } - er := (r.prevAllowed + r.allowed) / (r.prevSeen + r.seen) - return sampled, er -} - -// newSingleSpanRateLimiter returns a rate limiter which restricts the number of single spans sampled per second. -// This defaults to infinite, allow all behaviour. The MaxPerSecond value of the rule may override the default. -func newSingleSpanRateLimiter(mps float64) *rateLimiter { - limit := math.MaxFloat64 - if mps > 0 { - limit = mps - } - return &rateLimiter{ - limiter: rate.NewLimiter(rate.Limit(limit), int(math.Ceil(limit))), - prevTime: time.Now(), - } -} - -// globMatch compiles pattern string into glob format, i.e. regular expressions with only '?' -// and '*' treated as regex metacharacters. -func globMatch(pattern string) *regexp.Regexp { - if pattern == "" || pattern == "*" { - return nil - } - // escaping regex characters - pattern = regexp.QuoteMeta(pattern) - // replacing '?' and '*' with regex characters - pattern = strings.Replace(pattern, "\\?", ".", -1) - pattern = strings.Replace(pattern, "\\*", ".*", -1) - // pattern must match an entire string - return regexp.MustCompile(fmt.Sprintf("(?i)^%s$", pattern)) -} - -// samplingRulesFromEnv parses sampling rules from -// the DD_TRACE_SAMPLING_RULES, DD_TRACE_SAMPLING_RULES_FILE -// DD_SPAN_SAMPLING_RULES and DD_SPAN_SAMPLING_RULES_FILE environment variables. -func samplingRulesFromEnv() (trace, span []SamplingRule, err error) { - var errs []string - defer func() { - if len(errs) != 0 { - err = fmt.Errorf("\n\t%s", strings.Join(errs, "\n\t")) - } - }() - - rulesByType := func(spanType SamplingRuleType) (rules []SamplingRule, errs []string) { - env := fmt.Sprintf("DD_%s_SAMPLING_RULES", strings.ToUpper(spanType.String())) - rulesEnv := os.Getenv(fmt.Sprintf("DD_%s_SAMPLING_RULES", strings.ToUpper(spanType.String()))) - rules, err := unmarshalSamplingRules([]byte(rulesEnv), spanType) - if err != nil { - errs = append(errs, err.Error()) - } - rulesFile := os.Getenv(env + "_FILE") - if len(rules) != 0 { - if rulesFile != "" { - log.Warn("DIAGNOSTICS Error(s): %s is available and will take precedence over %s_FILE", env, env) - } - return rules, errs - } - if rulesFile == "" { - return rules, errs - } - rulesFromEnvFile, err := os.ReadFile(rulesFile) - if err != nil { - errs = append(errs, fmt.Sprintf("Couldn't read file from %s_FILE: %v", env, err)) - } - rules, err = unmarshalSamplingRules(rulesFromEnvFile, spanType) - if err != nil { - errs = append(errs, err.Error()) - } - return rules, errs - } - - trace, tErrs := rulesByType(SamplingRuleTrace) - if len(tErrs) != 0 { - errs = append(errs, tErrs...) - } - span, sErrs := rulesByType(SamplingRuleSpan) - if len(sErrs) != 0 { - errs = append(errs, sErrs...) - } - return trace, span, err -} - -func (sr *SamplingRule) UnmarshalJSON(b []byte) error { - if len(b) == 0 { - return nil - } - var v jsonRule - if err := json.Unmarshal(b, &v); err != nil { - return err - } - rules, err := validateRules([]jsonRule{v}, SamplingRuleUndefined) - if err != nil { - return err - } - *sr = rules[0] - return nil -} - -type jsonRule struct { - Service string `json:"service"` - Name string `json:"name"` - Rate json.Number `json:"sample_rate"` - MaxPerSecond float64 `json:"max_per_second"` - Resource string `json:"resource"` - Tags map[string]string `json:"tags"` - Type *SamplingRuleType `json:"type,omitempty"` - Provenance provenance `json:"provenance,omitempty"` -} - -func (j jsonRule) String() string { - var s []string - if j.Service != "" { - s = append(s, fmt.Sprintf("Service:%s", j.Service)) - } - if j.Name != "" { - s = append(s, fmt.Sprintf("Name:%s", j.Name)) - } - if j.Rate != "" { - s = append(s, fmt.Sprintf("Rate:%s", j.Rate)) - } - if j.MaxPerSecond != 0 { - s = append(s, fmt.Sprintf("MaxPerSecond:%f", j.MaxPerSecond)) - } - if j.Resource != "" { - s = append(s, fmt.Sprintf("Resource:%s", j.Resource)) - } - if len(j.Tags) != 0 { - s = append(s, fmt.Sprintf("Tags:%v", j.Tags)) - } - if j.Type != nil { - s = append(s, fmt.Sprintf("Type: %v", *j.Type)) - } - if j.Provenance != Local { - s = append(s, fmt.Sprintf("Provenance: %v", j.Provenance.String())) - } - return fmt.Sprintf("{%s}", strings.Join(s, " ")) -} - -// unmarshalSamplingRules unmarshals JSON from b and returns the sampling rules found, attributing -// the type t to them. If any errors are occurred, they are returned. -func unmarshalSamplingRules(b []byte, spanType SamplingRuleType) ([]SamplingRule, error) { - if len(b) == 0 { - return nil, nil - } - var jsonRules []jsonRule - // if the JSON is an array, unmarshal it as an array of rules - err := json.Unmarshal(b, &jsonRules) - if err != nil { - return nil, fmt.Errorf("error unmarshalling JSON: %s", err.Error()) - } - return validateRules(jsonRules, spanType) -} - -func validateRules(jsonRules []jsonRule, spanType SamplingRuleType) ([]SamplingRule, error) { - var errs []string - rules := make([]SamplingRule, 0, len(jsonRules)) - for i, v := range jsonRules { - if v.Rate == "" { - v.Rate = "1" - } - if v.Type != nil && *v.Type != spanType { - spanType = *v.Type - } - rate, err := v.Rate.Float64() - if err != nil { - errs = append(errs, fmt.Sprintf("at index %d: %v", i, err)) - continue - } - if rate < 0.0 || rate > 1.0 { - errs = append( - errs, - fmt.Sprintf("at index %d: ignoring rule %s: rate is out of [0.0, 1.0] range", i, v.String()), - ) - continue - } - tagGlobs := make(map[string]*regexp.Regexp, len(v.Tags)) - for k, g := range v.Tags { - tagGlobs[k] = globMatch(g) - } - rules = append(rules, SamplingRule{ - Service: globMatch(v.Service), - Name: globMatch(v.Name), - Rate: rate, - MaxPerSecond: v.MaxPerSecond, - Resource: globMatch(v.Resource), - Tags: tagGlobs, - Provenance: v.Provenance, - ruleType: spanType, - limiter: newSingleSpanRateLimiter(v.MaxPerSecond), - globRule: &jsonRules[i], - }) - } - if len(errs) != 0 { - return rules, fmt.Errorf("%s", strings.Join(errs, "\n\t")) - } - return rules, nil -} - -// MarshalJSON implements the json.Marshaler interface. -func (sr SamplingRule) MarshalJSON() ([]byte, error) { - s := struct { - Service string `json:"service,omitempty"` - Name string `json:"name,omitempty"` - Resource string `json:"resource,omitempty"` - Rate float64 `json:"sample_rate"` - Tags map[string]string `json:"tags,omitempty"` - MaxPerSecond *float64 `json:"max_per_second,omitempty"` - Provenance string `json:"provenance,omitempty"` - }{} - if sr.globRule != nil { - s.Service = sr.globRule.Service - s.Name = sr.globRule.Name - s.Resource = sr.globRule.Resource - s.Tags = sr.globRule.Tags - } else { - if sr.Service != nil { - s.Service = sr.Service.String() - } - if sr.Name != nil { - s.Name = sr.Name.String() - } - if sr.Resource != nil { - s.Resource = sr.Resource.String() - } - s.Tags = make(map[string]string, len(sr.Tags)) - for k, v := range sr.Tags { - if v != nil { - s.Tags[k] = v.String() - } - } - } - if sr.MaxPerSecond != 0 { - s.MaxPerSecond = &sr.MaxPerSecond - } - s.Rate = sr.Rate - if sr.Provenance != Local { - s.Provenance = sr.Provenance.String() - } - return json.Marshal(&s) -} - -func (sr SamplingRule) String() string { - s, err := sr.MarshalJSON() - if err != nil { - log.Error("Error marshalling SamplingRule to json: %s", err.Error()) - } - return string(s) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sampler.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sampler.go deleted file mode 100644 index 6d773576df..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sampler.go +++ /dev/null @@ -1,176 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "encoding/json" - "io" - "math" - "sync" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" -) - -// Sampler is an interface for sampling traces. -type Sampler interface { - // Sample returns true if the given span should be sampled. - Sample(span *Span) bool -} - -// RateSampler is a sampler implementation which randomly selects spans using a -// provided rate. For example, a rate of 0.75 will permit 75% of the spans. -// RateSampler implementations should be safe for concurrent use. -type RateSampler interface { - Sampler - - // Rate returns the current sample rate. - Rate() float64 - - // SetRate sets a new sample rate. - SetRate(rate float64) -} - -type customSampler struct { - s Sampler -} - -// Rate implements RateSampler. -func (*customSampler) Rate() float64 { - return 1.0 -} - -// SetRate implements RateSampler. -func (*customSampler) SetRate(_ float64) { - // noop -} - -func (s *customSampler) Sample(span *Span) bool { - return s.s.Sample(span) -} - -// rateSampler samples from a sample rate. -type rateSampler struct { - sync.RWMutex - rate float64 -} - -// NewAllSampler is a short-hand for NewRateSampler(1). It is all-permissive. -func NewAllSampler() RateSampler { return NewRateSampler(1) } - -// NewRateSampler returns an initialized RateSampler with a given sample rate. -func NewRateSampler(rate float64) RateSampler { - if rate > 1.0 { - rate = 1.0 - } - if rate < 0.0 { - rate = 0.0 - } - return &rateSampler{rate: rate} -} - -// Rate returns the current rate of the sampler. -func (r *rateSampler) Rate() float64 { - r.RLock() - defer r.RUnlock() - return r.rate -} - -// SetRate sets a new sampling rate. -func (r *rateSampler) SetRate(rate float64) { - r.Lock() - r.rate = rate - r.Unlock() -} - -// constants used for the Knuth hashing, same as agent. -const knuthFactor = uint64(1111111111111111111) - -// Sample returns true if the given span should be sampled. -func (r *rateSampler) Sample(s *Span) bool { - if r.rate == 1 { - // fast path - return true - } - if r.rate == 0 || s == nil { - return false - } - r.RLock() - defer r.RUnlock() - return sampledByRate(s.traceID, r.rate) -} - -// sampledByRate verifies if the number n should be sampled at the specified -// rate. -func sampledByRate(n uint64, rate float64) bool { - if rate == 1 { - return true - } - if rate == 0 { - return false - } - - return n*knuthFactor <= uint64(rate*math.MaxUint64) -} - -// prioritySampler holds a set of per-service sampling rates and applies -// them to spans. -type prioritySampler struct { - mu sync.RWMutex - rates map[string]float64 - defaultRate float64 -} - -func newPrioritySampler() *prioritySampler { - return &prioritySampler{ - rates: make(map[string]float64), - defaultRate: 1., - } -} - -// readRatesJSON will try to read the rates as JSON from the given io.ReadCloser. -func (ps *prioritySampler) readRatesJSON(rc io.ReadCloser) error { - var payload struct { - Rates map[string]float64 `json:"rate_by_service"` - } - if err := json.NewDecoder(rc).Decode(&payload); err != nil { - return err - } - rc.Close() - const defaultRateKey = "service:,env:" - ps.mu.Lock() - defer ps.mu.Unlock() - ps.rates = payload.Rates - if v, ok := ps.rates[defaultRateKey]; ok { - ps.defaultRate = v - delete(ps.rates, defaultRateKey) - } - return nil -} - -// getRate returns the sampling rate to be used for the given span. Callers must -// guard the span. -func (ps *prioritySampler) getRate(spn *Span) float64 { - key := "service:" + spn.service + ",env:" + spn.meta[ext.Environment] - ps.mu.RLock() - defer ps.mu.RUnlock() - if rate, ok := ps.rates[key]; ok { - return rate - } - return ps.defaultRate -} - -// apply applies sampling priority to the given span. Caller must ensure it is safe -// to modify the span. -func (ps *prioritySampler) apply(spn *Span) { - rate := ps.getRate(spn) - if sampledByRate(spn.traceID, rate) { - spn.setSamplingPriority(ext.PriorityAutoKeep, samplernames.AgentRate) - } else { - spn.setSamplingPriority(ext.PriorityAutoReject, samplernames.AgentRate) - } - spn.SetTag(keySamplingPriorityRate, rate) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/seelog_leak_workaround.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/seelog_leak_workaround.go deleted file mode 100644 index 45cbd766b5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/seelog_leak_workaround.go +++ /dev/null @@ -1,55 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package tracer - -import ( - "os" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/cihub/seelog" -) - -// This workaround fixes goroutine leaks caused by seelog. -// See https://github.com/DataDog/dd-trace-go/issues/2987. -// -// TODO(felixge): Remove this once a proper fix lands in the agent or after we -// drop the agent dependency that causes this [1]. -// -// [1] github.com/DataDog/datadog-agent/pkg/util/log -func init() { - if os.Getenv("DD_TRACE_DEBUG_SEELOG_WORKAROUND") == "false" { - return - } - - // Close the seelog loggers to fix the goroutine leaks. - seelog.Default.Close() - seelog.Disabled.Close() - - // Setup a new seelog logger that doesn't leak goroutines. - constraints, err := seelog.NewMinMaxConstraints(seelog.TraceLvl, seelog.CriticalLvl) - if err != nil { - log.Error("failed to create seelog constraints: %v", err.Error()) - return - } - console, err := seelog.NewConsoleWriter() - if err != nil { - log.Error("failed to create seelog console writer: %v", err.Error()) - return - } - dispatcher, err := seelog.NewSplitDispatcher(seelog.DefaultFormatter, []any{console}) - if err != nil { - log.Error("failed to create seelog dispatcher: %v", err.Error()) - return - } - seelog.Default = seelog.NewSyncLogger( - seelog.NewLoggerConfig( - constraints, - []*seelog.LogLevelException{}, - dispatcher, - ), - ) - seelog.Current = seelog.Default -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/slog.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/slog.go deleted file mode 100644 index 9737c54ef4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/slog.go +++ /dev/null @@ -1,100 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package tracer - -import ( - "context" - "log/slog" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// groupOrAttrs holds either a group name or a list of slog.Attrs. -type groupOrAttrs struct { - group string // group name if non-empty - attrs []slog.Attr // attrs if non-empty -} - -// slogHandler implements the slog.Handler interface to dispatch messages to our -// internal logger. -type slogHandler struct { - goas []groupOrAttrs -} - -func (h slogHandler) Enabled(_ context.Context, lvl slog.Level) bool { - if lvl <= slog.LevelDebug { - return log.DebugEnabled() - } - // TODO(fg): Implement generic log level checking in the internal logger. - // But we're we're not concerned with slog perf, so this is okay for now. - return true -} - -func (h slogHandler) Handle(_ context.Context, r slog.Record) error { - goas := h.goas - - if r.NumAttrs() == 0 { - // If the record has no Attrs, remove groups at the end of the list; they are empty. - for len(goas) > 0 && goas[len(goas)-1].group != "" { - goas = goas[:len(goas)-1] - } - } - - parts := make([]string, 0, len(goas)+r.NumAttrs()) - formatGroup := "" - - for _, goa := range goas { - if goa.group != "" { - formatGroup += goa.group + "." - } else { - for _, a := range goa.attrs { - parts = append(parts, formatGroup+a.String()) - } - } - } - - r.Attrs(func(a slog.Attr) bool { - parts = append(parts, formatGroup+a.String()) - return true - }) - - extra := strings.Join(parts, " ") - switch r.Level { - case slog.LevelDebug: - log.Debug("%s %s", r.Message, extra) - case slog.LevelInfo: - log.Info("%s %s", r.Message, extra) - case slog.LevelWarn: - log.Warn("%s %s", r.Message, extra) - case slog.LevelError: - log.Error("%s %s", r.Message, extra) - } - return nil -} - -func (h slogHandler) withGroupOrAttrs(goa groupOrAttrs) slogHandler { - h.goas = append(h.goas, goa) - return h -} - -// WithGroup returns a new Handler whose group consist of -// both the receiver's groups and the arguments. -func (h slogHandler) WithGroup(name string) slog.Handler { - if name == "" { - return h - } - return h.withGroupOrAttrs(groupOrAttrs{group: name}) -} - -// WithAttrs returns a new Handler whose attributes consist of -// both the receiver's attributes and the arguments. -func (h slogHandler) WithAttrs(attrs []slog.Attr) slog.Handler { - if len(attrs) == 0 { - return h - } - return h.withGroupOrAttrs(groupOrAttrs{attrs: attrs}) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span.go deleted file mode 100644 index ce0fe0cd1a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span.go +++ /dev/null @@ -1,1001 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:generate go run github.com/tinylib/msgp -unexported -marshal=false -o=span_msgp.go -tests=false - -package tracer - -import ( - "context" - "encoding/base64" - "encoding/json" - "fmt" - "os" - "reflect" - "runtime" - "runtime/pprof" - rt "runtime/trace" - "strconv" - "strings" - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace" - sharedinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/traceprof" - - "github.com/tinylib/msgp/msgp" - - "golang.org/x/xerrors" - - "github.com/DataDog/datadog-agent/pkg/obfuscate" -) - -type ( - // spanList implements msgp.Encodable on top of a slice of spans. - spanList []*Span - - // spanLists implements msgp.Decodable on top of a slice of spanList. - // This type is only used in tests. - spanLists []spanList -) - -var ( - _ msgp.Encodable = (*spanList)(nil) - _ msgp.Decodable = (*spanLists)(nil) -) - -// errorConfig holds customization options for setting error tags. -type errorConfig struct { - noDebugStack bool - stackFrames uint - stackSkip uint -} - -// AsMap places tags and span properties into a map and returns it. -// -// Note that this is not performant, nor are spans guaranteed to have all of their -// properties set at any time during normal operation! This is used for testing only, -// and should not be used in non-test code, or you may run into performance or other -// issues. -func (s *Span) AsMap() map[string]interface{} { - m := make(map[string]interface{}) - if s == nil { - return m - } - m[ext.SpanName] = s.name - m[ext.ServiceName] = s.service - m[ext.ResourceName] = s.resource - m[ext.SpanType] = s.spanType - m[ext.MapSpanStart] = s.start - m[ext.MapSpanDuration] = s.duration - for k, v := range s.meta { - m[k] = v - } - for k, v := range s.metrics { - m[k] = v - } - for k, v := range s.metaStruct { - m[k] = v - } - m[ext.MapSpanID] = s.spanID - m[ext.MapSpanTraceID] = s.traceID - m[ext.MapSpanParentID] = s.parentID - m[ext.MapSpanError] = s.error - if events := s.spanEventsAsJSONString(); events != "" { - m[ext.MapSpanEvents] = events - } - return m -} - -func (s *Span) spanEventsAsJSONString() string { - if !s.supportsEvents { - return s.meta["events"] - } - if s.spanEvents == nil { - return "" - } - events, err := json.Marshal(s.spanEvents) - if err != nil { - log.Error("failed to marshal span events: %s", err.Error()) - return "" - } - return string(events) -} - -// Span represents a computation. Callers must call Finish when a Span is -// complete to ensure it's submitted. -type Span struct { - mu sync.RWMutex `msg:"-"` // all fields are protected by this RWMutex - - name string `msg:"name"` // operation name - service string `msg:"service"` // service name (i.e. "grpc.server", "http.request") - resource string `msg:"resource"` // resource name (i.e. "/user?id=123", "SELECT * FROM users") - spanType string `msg:"type"` // protocol associated with the span (i.e. "web", "db", "cache") - start int64 `msg:"start"` // span start time expressed in nanoseconds since epoch - duration int64 `msg:"duration"` // duration of the span expressed in nanoseconds - meta map[string]string `msg:"meta,omitempty"` // arbitrary map of metadata - metaStruct metaStructMap `msg:"meta_struct,omitempty"` // arbitrary map of metadata with structured values - metrics map[string]float64 `msg:"metrics,omitempty"` // arbitrary map of numeric metrics - spanID uint64 `msg:"span_id"` // identifier of this span - traceID uint64 `msg:"trace_id"` // lower 64-bits of the root span identifier - parentID uint64 `msg:"parent_id"` // identifier of the span's direct parent - error int32 `msg:"error"` // error status of the span; 0 means no errors - spanLinks []SpanLink `msg:"span_links,omitempty"` // links to other spans - spanEvents []spanEvent `msg:"span_events,omitempty"` // events produced related to this span - - goExecTraced bool `msg:"-"` - noDebugStack bool `msg:"-"` // disables debug stack traces - finished bool `msg:"-"` // true if the span has been submitted to a tracer. Can only be read/modified if the trace is locked. - context *SpanContext `msg:"-"` // span propagation context - integration string `msg:"-"` // where the span was started from, such as a specific contrib or "manual" - supportsEvents bool `msg:"-"` // whether the span supports native span events or not - - pprofCtxActive context.Context `msg:"-"` // contains pprof.WithLabel labels to tell the profiler more about this span - pprofCtxRestore context.Context `msg:"-"` // contains pprof.WithLabel labels of the parent span (if any) that need to be restored when this span finishes - - taskEnd func() // ends execution tracer (runtime/trace) task, if started -} - -// Context yields the SpanContext for this Span. Note that the return -// value of Context() is still valid after a call to Finish(). This is -// called the span context and it is different from Go's context. -func (s *Span) Context() *SpanContext { - if s == nil { - return nil - } - return s.context -} - -// SetBaggageItem sets a key/value pair as baggage on the span. Baggage items -// are propagated down to descendant spans and injected cross-process. Use with -// care as it adds extra load onto your tracing layer. -func (s *Span) SetBaggageItem(key, val string) { - if s == nil { - return - } - s.context.setBaggageItem(key, val) -} - -// BaggageItem gets the value for a baggage item given its key. Returns the -// empty string if the value isn't found in this Span. -func (s *Span) BaggageItem(key string) string { - if s == nil { - return "" - } - return s.context.baggageItem(key) -} - -// SetTag adds a set of key/value metadata to the span. -func (s *Span) SetTag(key string, value interface{}) { - if s == nil { - return - } - // To avoid dumping the memory address in case value is a pointer, we dereference it. - // Any pointer value that is a pointer to a pointer will be dumped as a string. - value = dereference(value) - s.mu.Lock() - defer s.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - return - } - switch key { - case ext.Error: - s.setTagError(value, errorConfig{ - noDebugStack: s.noDebugStack, - }) - return - case ext.Component: - integration, ok := value.(string) - if ok { - s.integration = integration - } - } - if v, ok := value.(bool); ok { - s.setTagBool(key, v) - return - } - if v, ok := value.(string); ok { - if key == ext.ResourceName && s.pprofCtxActive != nil && spanResourcePIISafe(s) { - // If the user overrides the resource name for the span, - // update the endpoint label for the runtime profilers. - // - // We don't change s.pprofCtxRestore since that should - // stay as the original parent span context regardless - // of what we change at a lower level. - s.pprofCtxActive = pprof.WithLabels(s.pprofCtxActive, pprof.Labels(traceprof.TraceEndpoint, v)) - pprof.SetGoroutineLabels(s.pprofCtxActive) - } - s.setMeta(key, v) - return - } - if v, ok := sharedinternal.ToFloat64(value); ok { - s.setMetric(key, v) - return - } - if v, ok := value.(fmt.Stringer); ok { - defer func() { - if e := recover(); e != nil { - if v := reflect.ValueOf(value); v.Kind() == reflect.Ptr && v.IsNil() { - // If .String() panics due to a nil receiver, we want to catch this - // and replace the string value with "", just as Sprintf does. - // Other panics should not be handled. - s.setMeta(key, "") - return - } - panic(e) - } - }() - s.setMeta(key, v.String()) - return - } - - if v, ok := value.([]byte); ok { - s.setMeta(key, string(v)) - return - } - - if value != nil { - // Arrays will be translated to dot notation. e.g. - // {"myarr.0": "foo", "myarr.1": "bar"} - // which will be displayed as an array in the UI. - switch reflect.TypeOf(value).Kind() { - case reflect.Slice: - slice := reflect.ValueOf(value) - for i := 0; i < slice.Len(); i++ { - key := fmt.Sprintf("%s.%d", key, i) - v := slice.Index(i) - if num, ok := sharedinternal.ToFloat64(v.Interface()); ok { - s.setMetric(key, num) - } else { - s.setMeta(key, fmt.Sprintf("%v", v)) - } - } - return - } - - // Can be sent as messagepack in `meta_struct` instead of `meta` - // reserved for internal use only - if v, ok := value.(sharedinternal.MetaStructValue); ok { - s.setMetaStruct(key, v.Value) - return - } - - // Support for v1 shim meta struct values (only _dd.stack uses this) - if key == "_dd.stack" { - s.setMetaStruct(key, value) - return - } - - // Add this trace source tag to propagating tags and to span tags - // reserved for internal use only - if v, ok := value.(sharedinternal.TraceSourceTagValue); ok { - s.context.trace.setTraceSourcePropagatingTag(key, v.Value) - } - } - - // not numeric, not a string, not a fmt.Stringer, not a bool, and not an error - s.setMeta(key, fmt.Sprint(value)) -} - -// setSamplingPriority locks the span, then updates the sampling priority. -// It also updates the trace's sampling priority. -func (s *Span) setSamplingPriority(priority int, sampler samplernames.SamplerName) { - if s == nil { - return - } - s.mu.Lock() - defer s.mu.Unlock() - s.setSamplingPriorityLocked(priority, sampler) -} - -// root returns the root span of the span's trace. The return value shouldn't be -// nil as long as the root span is valid and not finished. -func (s *Span) Root() *Span { - if s == nil || s.context == nil { - return nil - } - if s.context.trace == nil { - return nil - } - return s.context.trace.root -} - -// SetUser associates user information to the current trace which the -// provided span belongs to. The options can be used to tune which user -// bit of information gets monitored. In case of distributed traces, -// the user id can be propagated across traces using the WithPropagation() option. -// See https://docs.datadoghq.com/security_platform/application_security/setup_and_configure/?tab=set_user#add-user-information-to-traces -func (s *Span) SetUser(id string, opts ...UserMonitoringOption) { - if s == nil { - return - } - cfg := UserMonitoringConfig{ - Metadata: make(map[string]string), - } - for _, fn := range opts { - fn(&cfg) - } - root := s.Root() - trace := root.context.trace - root.mu.Lock() - defer root.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if root.finished { - return - } - if cfg.PropagateID { - // Delete usr.id from the tags since _dd.p.usr.id takes precedence - delete(root.meta, keyUserID) - idenc := base64.StdEncoding.EncodeToString([]byte(id)) - trace.setPropagatingTag(keyPropagatedUserID, idenc) - s.context.updated = true - } else { - if trace.hasPropagatingTag(keyPropagatedUserID) { - // Unset the propagated user ID so that a propagated user ID coming from upstream won't be propagated anymore. - trace.unsetPropagatingTag(keyPropagatedUserID) - s.context.updated = true - } - delete(root.meta, keyPropagatedUserID) - } - - usrData := map[string]string{ - keyUserID: id, - keyUserLogin: cfg.Login, - keyUserEmail: cfg.Email, - keyUserName: cfg.Name, - keyUserScope: cfg.Scope, - keyUserRole: cfg.Role, - keyUserSessionID: cfg.SessionID, - } - for k, v := range cfg.Metadata { - usrData[fmt.Sprintf("usr.%s", k)] = v - } - for k, v := range usrData { - if v != "" { - // setMeta is used since the span is already locked - root.setMeta(k, v) - } - } -} - -// StartChild starts a new child span with the given operation name and options. -func (s *Span) StartChild(operationName string, opts ...StartSpanOption) *Span { - if s == nil { - return nil - } - opts = append(opts, ChildOf(s.Context())) - return getGlobalTracer().StartSpan(operationName, opts...) -} - -// setSamplingPriorityLocked updates the sampling priority. -// It also updates the trace's sampling priority. -func (s *Span) setSamplingPriorityLocked(priority int, sampler samplernames.SamplerName) { - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - return - } - s.setMetric(keySamplingPriority, float64(priority)) - s.context.setSamplingPriority(priority, sampler) -} - -// setTagError sets the error tag. It accounts for various valid scenarios. -// This method is not safe for concurrent use. -func (s *Span) setTagError(value interface{}, cfg errorConfig) { - setError := func(yes bool) { - if yes { - if s.error == 0 { - // new error - s.context.errors.Add(1) - } - s.error = 1 - } else { - if s.error > 0 { - // flip from active to inactive - s.context.errors.Add(-1) - } - s.error = 0 - } - } - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - return - } - switch v := value.(type) { - case bool: - // bool value as per Opentracing spec. - setError(v) - case error: - // if anyone sets an error value as the tag, be nice here - // and provide all the benefits. - setError(true) - s.setMeta(ext.ErrorMsg, v.Error()) - s.setMeta(ext.ErrorType, reflect.TypeOf(v).String()) - switch err := v.(type) { - case xerrors.Formatter: - s.setMeta(ext.ErrorDetails, fmt.Sprintf("%+v", v)) - case fmt.Formatter: - // pkg/errors approach - s.setMeta(ext.ErrorDetails, fmt.Sprintf("%+v", v)) - case *errortrace.TracerError: - // instrumentation/errortrace approach - s.setMeta(ext.ErrorDetails, fmt.Sprintf("%+v", v)) - if !cfg.noDebugStack { - s.setMeta(ext.ErrorStack, err.Format()) - } - return - } - if !cfg.noDebugStack { - s.setMeta(ext.ErrorStack, takeStacktrace(cfg.stackFrames, cfg.stackSkip)) - } - case nil: - // no error - setError(false) - default: - // in all other cases, let's assume that setting this tag - // is the result of an error. - setError(true) - } -} - -// defaultStackLength specifies the default maximum size of a stack trace. -const defaultStackLength = 32 - -// takeStacktrace takes a stack trace of maximum n entries, skipping the first skip entries. -// If n is 0, up to 20 entries are retrieved. -func takeStacktrace(n, skip uint) string { - telemetry.Count(telemetry.NamespaceTracers, "errorstack.source", []string{"source:takeStacktrace"}).Submit(1) - now := time.Now() - defer func() { - dur := float64(time.Since(now)) - telemetry.Distribution(telemetry.NamespaceTracers, "errorstack.duration", []string{"source:takeStacktrace"}).Submit(dur) - }() - if n == 0 { - n = defaultStackLength - } - var builder strings.Builder - pcs := make([]uintptr, n) - - // +2 to exclude runtime.Callers and takeStacktrace - numFrames := runtime.Callers(2+int(skip), pcs) - if numFrames == 0 { - return "" - } - frames := runtime.CallersFrames(pcs[:numFrames]) - for i := 0; ; i++ { - frame, more := frames.Next() - if i != 0 { - builder.WriteByte('\n') - } - builder.WriteString(frame.Function) - builder.WriteByte('\n') - builder.WriteByte('\t') - builder.WriteString(frame.File) - builder.WriteByte(':') - builder.WriteString(strconv.Itoa(frame.Line)) - if !more { - break - } - } - return builder.String() -} - -// setMeta sets a string tag. This method is not safe for concurrent use. -func (s *Span) setMeta(key, v string) { - if s.meta == nil { - s.meta = make(map[string]string, 1) - } - delete(s.metrics, key) - switch key { - case ext.SpanName: - s.name = v - case ext.ServiceName: - s.service = v - case ext.ResourceName: - s.resource = v - case ext.SpanType: - s.spanType = v - default: - s.meta[key] = v - } -} - -func (s *Span) setMetaStruct(key string, v any) { - if s.metaStruct == nil { - s.metaStruct = make(metaStructMap, 1) - } - s.metaStruct[key] = v -} - -// setTagBool sets a boolean tag on the span. -func (s *Span) setTagBool(key string, v bool) { - switch key { - case ext.AnalyticsEvent: - if v { - s.setMetric(ext.EventSampleRate, 1.0) - } else { - s.setMetric(ext.EventSampleRate, 0.0) - } - case ext.ManualDrop: - if v { - s.setSamplingPriorityLocked(ext.PriorityUserReject, samplernames.Manual) - } - case ext.ManualKeep: - if v { - s.setSamplingPriorityLocked(ext.PriorityUserKeep, samplernames.Manual) - } - default: - if v { - s.setMeta(key, "true") - } else { - s.setMeta(key, "false") - } - } -} - -// setMetric sets a numeric tag, in our case called a metric. This method -// is not safe for concurrent use. -func (s *Span) setMetric(key string, v float64) { - if s.metrics == nil { - s.metrics = make(map[string]float64, 1) - } - delete(s.meta, key) - switch key { - case ext.ManualKeep: - if v == float64(samplernames.AppSec) { - s.setSamplingPriorityLocked(ext.PriorityUserKeep, samplernames.AppSec) - } - case "_sampling_priority_v1shim": - // We have this for backward compatibility with the v1 shim. - s.setSamplingPriorityLocked(int(v), samplernames.Manual) - default: - s.metrics[key] = v - } -} - -// AddLink appends the given link to the span's span links. -func (s *Span) AddLink(link SpanLink) { - if s == nil { - return - } - s.mu.Lock() - defer s.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - // already finished - return - } - s.spanLinks = append(s.spanLinks, link) -} - -// serializeSpanLinksInMeta saves span links as a JSON string under `Span[meta][_dd.span_links]`. -func (s *Span) serializeSpanLinksInMeta() { - if len(s.spanLinks) == 0 { - return - } - spanLinkBytes, err := json.Marshal(s.spanLinks) - if err != nil { - log.Debug("Unable to marshal span links. Not adding span links to span meta.") - return - } - if s.meta == nil { - s.meta = make(map[string]string) - } - s.meta["_dd.span_links"] = string(spanLinkBytes) -} - -// serializeSpanEvents sets the span events from the current span in the correct transport, depending on whether the -// agent supports the native method or not. -func (s *Span) serializeSpanEvents() { - if len(s.spanEvents) == 0 { - return - } - // if span events are natively supported by the agent, there's nothing to do - // as the events will be already included when the span is serialized. - if s.supportsEvents { - return - } - // otherwise, we need to serialize them as a string tag and remove them from the struct - // so they are not sent twice. - b, err := json.Marshal(s.spanEvents) - s.spanEvents = nil - if err != nil { - log.Debug("Unable to marshal span events; events dropped from span meta\n%s", err.Error()) - return - } - s.meta["events"] = string(b) -} - -// Finish closes this Span (but not its children) providing the duration -// of its part of the tracing session. -func (s *Span) Finish(opts ...FinishOption) { - if s == nil { - return - } - - t := now() - if len(opts) > 0 { - cfg := FinishConfig{ - NoDebugStack: s.noDebugStack, - } - for _, fn := range opts { - if fn == nil { - continue - } - fn(&cfg) - } - if !cfg.FinishTime.IsZero() { - t = cfg.FinishTime.UnixNano() - } - if cfg.Error != nil { - s.mu.Lock() - s.setTagError(cfg.Error, errorConfig{ - noDebugStack: cfg.NoDebugStack, - stackFrames: cfg.StackFrames, - stackSkip: cfg.SkipStackFrames, - }) - s.mu.Unlock() - } - } - - if s.goExecTraced && rt.IsEnabled() { - // Only tag spans as traced if they both started & ended with - // execution tracing enabled. This is technically not sufficient - // for spans which could straddle the boundary between two - // execution traces, but there's really nothing we can do in - // those cases since execution tracing tasks aren't recorded in - // traces if they started before the trace. - s.SetTag("go_execution_traced", "yes") - } else if s.goExecTraced { - // If the span started with tracing enabled, but tracing wasn't - // enabled when the span finished, we still have some data to - // show. If tracing wasn't enabled when the span started, we - // won't have data in the execution trace to identify it so - // there's nothign we can show. - s.SetTag("go_execution_traced", "partial") - } - - if s.Root() == s { - if tr, ok := getGlobalTracer().(*tracer); ok && tr.rulesSampling.traces.enabled() { - if !s.context.trace.isLocked() && s.context.trace.propagatingTag(keyDecisionMaker) != "-4" { - tr.rulesSampling.SampleTrace(s) - } - } - } - - s.finish(t) - orchestrion.GLSPopValue(sharedinternal.ActiveSpanKey) -} - -// SetOperationName sets or changes the operation name. -func (s *Span) SetOperationName(operationName string) { - if s == nil { - return - } - s.mu.Lock() - defer s.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - // already finished - return - } - s.name = operationName -} - -func (s *Span) finish(finishTime int64) { - s.mu.Lock() - defer s.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - // already finished - return - } - - s.serializeSpanLinksInMeta() - s.serializeSpanEvents() - - if s.duration == 0 { - s.duration = finishTime - s.start - } - if s.duration < 0 { - s.duration = 0 - } - if s.taskEnd != nil { - s.taskEnd() - } - - keep := true - tracer, hasTracer := getGlobalTracer().(*tracer) - if hasTracer { - if !tracer.config.enabled.current { - return - } - if tracer.config.canDropP0s() { - // the agent supports dropping p0's in the client - keep = shouldKeep(s) - } - if tracer.config.debugAbandonedSpans { - // the tracer supports debugging abandoned spans - tracer.submitAbandonedSpan(s, true) - } - tracer.spansFinished.Inc(s.integration) - } - if keep { - // a single kept span keeps the whole trace. - s.context.trace.keep() - } - if log.DebugEnabled() { - // avoid allocating the ...interface{} argument if debug logging is disabled - log.Debug("Finished Span: %v, Operation: %s, Resource: %s, Tags: %v, %v", //nolint:gocritic // Debug logging needs full span representation - s, s.name, s.resource, s.meta, s.metrics) - } - s.context.finish() - - // compute stats after finishing the span. This ensures any normalization or tag propagation has been applied - if hasTracer { - tracer.submit(s) - } - - if s.pprofCtxRestore != nil { - // Restore the labels of the parent span so any CPU samples after this - // point are attributed correctly. - pprof.SetGoroutineLabels(s.pprofCtxRestore) - } -} - -// textNonParsable specifies the text that will be assigned to resources for which the resource -// can not be parsed due to an obfuscation error. -const textNonParsable = "Non-parsable SQL query" - -// obfuscatedResource returns the obfuscated version of the given resource. It is -// obfuscated using the given obfuscator for the given span type typ. -func obfuscatedResource(o *obfuscate.Obfuscator, typ, resource string) string { - if o == nil { - return resource - } - switch typ { - case "sql", "cassandra": - oq, err := o.ObfuscateSQLString(resource) - if err != nil { - log.Error("Error obfuscating stats group resource %q: %v", resource, err.Error()) - return textNonParsable - } - return oq.Query - case "redis": - return o.QuantizeRedisString(resource) - default: - return resource - } -} - -// shouldKeep reports whether the trace should be kept. -// a single span being kept implies the whole trace being kept. -func shouldKeep(s *Span) bool { - if p, ok := s.context.SamplingPriority(); ok && p > 0 { - // positive sampling priorities stay - return true - } - if s.context.errors.Load() > 0 { - // traces with any span containing an error get kept - return true - } - if v, ok := s.metrics[ext.EventSampleRate]; ok { - return sampledByRate(s.traceID, v) - } - return false -} - -// shouldComputeStats mentions whether this span needs to have stats computed for. -// Warning: callers must guard! -func shouldComputeStats(s *Span) bool { - if v, ok := s.metrics[keyMeasured]; ok && v == 1 { - return true - } - if v, ok := s.metrics[keyTopLevel]; ok && v == 1 { - return true - } - return false -} - -// String returns a human readable representation of the span. Not for -// production, just debugging. -func (s *Span) String() string { - if s == nil { - return "" - } - s.mu.RLock() - defer s.mu.RUnlock() - lines := []string{ - fmt.Sprintf("Name: %s", s.name), - fmt.Sprintf("Service: %s", s.service), - fmt.Sprintf("Resource: %s", s.resource), - fmt.Sprintf("TraceID: %d", s.traceID), - fmt.Sprintf("TraceID128: %s", s.context.TraceID()), - fmt.Sprintf("SpanID: %d", s.spanID), - fmt.Sprintf("ParentID: %d", s.parentID), - fmt.Sprintf("Start: %s", time.Unix(0, s.start)), - fmt.Sprintf("Duration: %s", time.Duration(s.duration)), - fmt.Sprintf("Error: %d", s.error), - fmt.Sprintf("Type: %s", s.spanType), - "Tags:", - } - for key, val := range s.meta { - lines = append(lines, fmt.Sprintf("\t%s:%s", key, val)) - } - for key, val := range s.metrics { - lines = append(lines, fmt.Sprintf("\t%s:%f", key, val)) - } - return strings.Join(lines, "\n") -} - -// Format implements fmt.Formatter. -func (s *Span) Format(f fmt.State, c rune) { - if s == nil { - fmt.Fprintf(f, "") - } - switch c { - case 's': - fmt.Fprint(f, s.String()) - case 'v': - if svc := globalconfig.ServiceName(); svc != "" { - fmt.Fprintf(f, "dd.service=%s ", svc) - } - if tr := getGlobalTracer(); tr != nil { - tc := tr.TracerConf() - if tc.EnvTag != "" { - fmt.Fprintf(f, "dd.env=%s ", tc.EnvTag) - } else if env := os.Getenv("DD_ENV"); env != "" { - fmt.Fprintf(f, "dd.env=%s ", env) - } - if tc.VersionTag != "" { - fmt.Fprintf(f, "dd.version=%s ", tc.VersionTag) - } else if v := os.Getenv("DD_VERSION"); v != "" { - fmt.Fprintf(f, "dd.version=%s ", v) - } - } - var traceID string - if sharedinternal.BoolEnv("DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED", true) && s.context.traceID.HasUpper() { - traceID = s.context.TraceID() - } else { - traceID = fmt.Sprintf("%d", s.traceID) - } - fmt.Fprintf(f, `dd.trace_id=%q `, traceID) - fmt.Fprintf(f, `dd.span_id="%d" `, s.spanID) - fmt.Fprintf(f, `dd.parent_id="%d"`, s.parentID) - default: - fmt.Fprintf(f, "%%!%c(tracer.Span=%v)", c, s) - } -} - -// AddEvent attaches a new event to the current span. -func (s *Span) AddEvent(name string, opts ...SpanEventOption) { - if s == nil { - return - } - s.mu.Lock() - defer s.mu.Unlock() - - // We don't lock spans when flushing, so we could have a data race when - // modifying a span as it's being flushed. This protects us against that - // race, since spans are marked `finished` before we flush them. - if s.finished { - return - } - cfg := SpanEventConfig{} - for _, opt := range opts { - opt(&cfg) - } - if cfg.Time.IsZero() { - cfg.Time = time.Now() - } - event := spanEvent{ - Name: name, - TimeUnixNano: uint64(cfg.Time.UnixNano()), - } - if s.supportsEvents { - event.Attributes = toSpanEventAttributeMsg(cfg.Attributes) - } else { - event.RawAttributes = cfg.Attributes - } - s.spanEvents = append(s.spanEvents, event) -} - -// used in internal/civisibility/integrations/manual_api_common.go using linkname -func getMeta(s *Span, key string) (string, bool) { - s.mu.RLock() - defer s.mu.RUnlock() - val, ok := s.meta[key] - return val, ok -} - -// used in internal/civisibility/integrations/manual_api_common.go using linkname -func getMetric(s *Span, key string) (float64, bool) { - s.mu.RLock() - defer s.mu.RUnlock() - val, ok := s.metrics[key] - return val, ok -} - -const ( - keySamplingPriority = "_sampling_priority_v1" - keySamplingPriorityRate = "_dd.agent_psr" - keyDecisionMaker = "_dd.p.dm" - keyServiceHash = "_dd.dm.service_hash" - keyOrigin = "_dd.origin" - keyReparentID = "_dd.parent_id" - // keyHostname can be used to override the agent's hostname detection when using `WithHostname`. - // which is set via auto-detection. - keyHostname = "_dd.hostname" - keyRulesSamplerAppliedRate = "_dd.rule_psr" - keyRulesSamplerLimiterRate = "_dd.limit_psr" - keyMeasured = "_dd.measured" - // keyTopLevel is the key of top level metric indicating if a span is top level. - // A top level span is a local root (parent span of the local trace) or the first span of each service. - keyTopLevel = "_dd.top_level" - // keyPropagationError holds any error from propagated trace tags (if any) - keyPropagationError = "_dd.propagation_error" - // keySpanSamplingMechanism specifies the sampling mechanism by which an individual span was sampled - keySpanSamplingMechanism = "_dd.span_sampling.mechanism" - // keySingleSpanSamplingRuleRate specifies the configured sampling probability for the single span sampling rule. - keySingleSpanSamplingRuleRate = "_dd.span_sampling.rule_rate" - // keySingleSpanSamplingMPS specifies the configured limit for the single span sampling rule - // that the span matched. If there is no configured limit, then this tag is omitted. - keySingleSpanSamplingMPS = "_dd.span_sampling.max_per_second" - // keyPropagatedUserID holds the propagated user identifier, if user id propagation is enabled. - keyPropagatedUserID = "_dd.p.usr.id" - // keyPropagatedTraceSource holds a 2 character hexadecimal string representation of the product responsible - // for the span creation. - keyPropagatedTraceSource = "_dd.p.ts" - // keyTraceID128 is the lowercase, hex encoded upper 64 bits of a 128-bit trace id, if present. - keyTraceID128 = "_dd.p.tid" - // keySpanAttributeSchemaVersion holds the selected DD_TRACE_SPAN_ATTRIBUTE_SCHEMA version. - keySpanAttributeSchemaVersion = "_dd.trace_span_attribute_schema" - // keyPeerServiceSource indicates the precursor tag that was used as the value of peer.service. - keyPeerServiceSource = "_dd.peer.service.source" - // keyPeerServiceRemappedFrom indicates the previous value for peer.service, in case remapping happened. - keyPeerServiceRemappedFrom = "_dd.peer.service.remapped_from" - // keyBaseService contains the globally configured tracer service name. It is only set for spans that override it. - keyBaseService = "_dd.base_service" - // keyProcessTags contains a list of process tags to indentify the service. - keyProcessTags = "_dd.tags.process" -) - -// The following set of tags is used for user monitoring and set through calls to span.SetUser(). -const ( - keyUserID = "usr.id" - keyUserLogin = "usr.login" - keyUserEmail = "usr.email" - keyUserName = "usr.name" - keyUserOrg = "usr.org" - keyUserRole = "usr.role" - keyUserScope = "usr.scope" - keyUserSessionID = "usr.session_id" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_config.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_config.go deleted file mode 100644 index 59ec1b7be8..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_config.go +++ /dev/null @@ -1,143 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "context" - "time" -) - -// StartSpanOption is a configuration option that can be used with a Tracer's StartSpan method. -type StartSpanOption func(cfg *StartSpanConfig) - -// StartSpanConfig holds the configuration for starting a new span. It is usually passed -// around by reference to one or more StartSpanOption functions which shape it into its -// final form. -type StartSpanConfig struct { - // Parent holds the SpanContext that should be used as a parent for the - // new span. If nil, implementations should return a root span. - Parent *SpanContext - - // StartTime holds the time that should be used as the start time of the span. - // Implementations should use the current time when StartTime.IsZero(). - StartTime time.Time - - // Tags holds a set of key/value pairs that should be set as metadata on the - // new span. - Tags map[string]interface{} - - // SpanID will be the SpanID of the Span, overriding the random number that would - // be generated. If no Parent SpanContext is present, then this will also set the - // TraceID to the same value. - SpanID uint64 - - // Context is the parent context where the span should be stored. - Context context.Context - - // SpanLink represents a causal relationship between two spans. A span can have multiple links. - SpanLinks []SpanLink -} - -// NewStartSpanConfig allows to build a base config struct. It accepts the same options as StartSpan. -// It's useful to reduce the number of operations in any hot path and update it for request/operation specifics. -func NewStartSpanConfig(opts ...StartSpanOption) *StartSpanConfig { - cfg := new(StartSpanConfig) - for _, fn := range opts { - fn(cfg) - } - return cfg -} - -// FinishOption is a configuration option that can be used with a Span's Finish method. -type FinishOption func(cfg *FinishConfig) - -// FinishConfig holds the configuration for finishing a span. It is usually passed around by -// reference to one or more FinishOption functions which shape it into its final form. -type FinishConfig struct { - // FinishTime represents the time that should be set as finishing time for the - // span. Implementations should use the current time when FinishTime.IsZero(). - FinishTime time.Time - - // Error holds an optional error that should be set on the span before - // finishing. - Error error - - // NoDebugStack will prevent any set errors from generating an attached stack trace tag. - NoDebugStack bool - - // StackFrames specifies the number of stack frames to be attached in spans that finish with errors. - StackFrames uint - - // SkipStackFrames specifies the offset at which to start reporting stack frames from the stack. - SkipStackFrames uint -} - -// NewFinishConfig allows to build a base finish config struct. It accepts the same options as Finish. -// It's useful to reduce the number of operations in any hot path and update it for request/operation specifics. -func NewFinishConfig(opts ...FinishOption) *FinishConfig { - cfg := new(FinishConfig) - for _, fn := range opts { - fn(cfg) - } - return cfg -} - -// FinishTime sets the given time as the finishing time for the span. By default, -// the current time is used. -func FinishTime(t time.Time) FinishOption { - return func(cfg *FinishConfig) { - cfg.FinishTime = t - } -} - -// WithError marks the span as having had an error. It uses the information from -// err to set tags such as the error message, error type and stack trace. It has -// no effect if the error is nil. -func WithError(err error) FinishOption { - return func(cfg *FinishConfig) { - cfg.Error = err - } -} - -// NoDebugStack prevents any error presented using the WithError finishing option -// from generating a stack trace. This is useful in situations where errors are frequent -// and performance is critical. -func NoDebugStack() FinishOption { - return func(cfg *FinishConfig) { - cfg.NoDebugStack = true - } -} - -// StackFrames limits the number of stack frames included into erroneous spans to n, starting from skip. -func StackFrames(n, skip uint) FinishOption { - if n == 0 { - return NoDebugStack() - } - return func(cfg *FinishConfig) { - cfg.StackFrames = n - cfg.SkipStackFrames = skip - } -} - -// WithFinishConfig merges the given FinishConfig into the one used to finish the span. -// It is useful when you want to set a common base finish config, reducing the number of function calls in hot loops. -func WithFinishConfig(cfg *FinishConfig) FinishOption { - return func(fc *FinishConfig) { - fc.Error = cfg.Error - if fc.FinishTime.IsZero() { - fc.FinishTime = cfg.FinishTime - } - if !fc.NoDebugStack { - fc.NoDebugStack = cfg.NoDebugStack - } - if fc.SkipStackFrames == 0 { - fc.SkipStackFrames = cfg.SkipStackFrames - } - if fc.StackFrames == 0 { - fc.StackFrames = cfg.StackFrames - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event.go deleted file mode 100644 index 71ce7fd104..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event.go +++ /dev/null @@ -1,243 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package tracer - -import ( - "golang.org/x/exp/constraints" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -//go:generate go run github.com/tinylib/msgp -unexported -marshal=false -o=span_event_msgp.go -tests=false - -// SpanEvent represent an event at an instant in time related to this span, but not necessarily during the span. -type spanEvent struct { - // Name is the name of event. - Name string `msg:"name" json:"name"` - - // TimeUnixNano is the number of nanoseconds between the Unix epoch and this event. - TimeUnixNano uint64 `msg:"time_unix_nano" json:"time_unix_nano"` - - // Attributes is a map of string to attribute. - Attributes map[string]*spanEventAttribute `msg:"attributes" json:"-"` - - // RawAttributes is used when native span event serialization is not supported by the agent. - RawAttributes map[string]any `msg:"-" json:"attributes,omitempty"` -} - -type spanEventAttribute struct { - Type spanEventAttributeType `msg:"type" json:"type"` - StringValue string `msg:"string_value,omitempty"` - BoolValue bool `msg:"bool_value,omitempty" ` - IntValue int64 `msg:"int_value,omitempty" ` - DoubleValue float64 `msg:"double_value,omitempty"` - ArrayValue *spanEventArrayAttribute `msg:"array_value,omitempty"` -} - -type spanEventAttributeType int32 - -const ( - spanEventAttributeTypeString spanEventAttributeType = 0 - spanEventAttributeTypeBool spanEventAttributeType = 1 - spanEventAttributeTypeInt spanEventAttributeType = 2 - spanEventAttributeTypeDouble spanEventAttributeType = 3 - spanEventAttributeTypeArray spanEventAttributeType = 4 -) - -type spanEventArrayAttribute struct { - Values []*spanEventArrayAttributeValue `msg:"values" json:"values"` -} - -type spanEventArrayAttributeValue struct { - Type spanEventArrayAttributeValueType `msg:"type"` - StringValue string `msg:"string_value,omitempty"` - BoolValue bool `msg:"bool_value,omitempty"` - IntValue int64 `msg:"int_value,omitempty"` - DoubleValue float64 `msg:"double_value,omitempty"` -} - -type spanEventArrayAttributeValueType int32 - -const ( - spanEventArrayAttributeValueTypeString spanEventArrayAttributeValueType = 0 - spanEventArrayAttributeValueTypeBool spanEventArrayAttributeValueType = 1 - spanEventArrayAttributeValueTypeInt spanEventArrayAttributeValueType = 2 - spanEventArrayAttributeValueTypeDouble spanEventArrayAttributeValueType = 3 -) - -func toSpanEventAttributeMsg(attrs map[string]any) map[string]*spanEventAttribute { - if attrs == nil { - return nil - } - res := make(map[string]*spanEventAttribute, len(attrs)) - for key, val := range attrs { - if msgVal := toSpanEventAttributeValueMsg(val); msgVal != nil { - res[key] = msgVal - } else { - log.Warn("dropped unsupported span event attribute %s (unsupported type: %T)", key, val) - } - } - return res -} - -func toSpanEventAttributeValueMsg(v any) *spanEventAttribute { - switch v := v.(type) { - // string - case string: - return &spanEventAttribute{ - Type: spanEventAttributeTypeString, - StringValue: v, - } - // bool - case bool: - return &spanEventAttribute{ - Type: spanEventAttributeTypeBool, - BoolValue: v, - } - // int types - case int: - return intValue(v) - case uint: - return intValue(v) - case int64: - return intValue(v) - case uint64: - return intValue(v) - case uint8: - return intValue(v) - case uint16: - return intValue(v) - case uint32: - return intValue(v) - case uintptr: - return intValue(v) - case int8: - return intValue(v) - case int16: - return intValue(v) - case int32: - return intValue(v) - // float types - case float64: - return floatValue(v) - case float32: - return floatValue(v) - // string slice - case []string: - return stringSliceValue(v) - // bool slice - case []bool: - return boolSliceValue(v) - // int slice - case []int: - return intSliceValue(v) - case []uint: - return intSliceValue(v) - case []int64: - return intSliceValue(v) - case []uint64: - return intSliceValue(v) - case []uint8: - return intSliceValue(v) - case []uint16: - return intSliceValue(v) - case []uint32: - return intSliceValue(v) - case []uintptr: - return intSliceValue(v) - case []int8: - return intSliceValue(v) - case []int16: - return intSliceValue(v) - case []int32: - return intSliceValue(v) - // float slice - case []float64: - return floatSliceValue(v) - case []float32: - return floatSliceValue(v) - default: - return nil - } -} - -func intValue[T constraints.Integer](v T) *spanEventAttribute { - return &spanEventAttribute{ - Type: spanEventAttributeTypeInt, - IntValue: int64(v), - } -} - -func floatValue[T constraints.Float](v T) *spanEventAttribute { - return &spanEventAttribute{ - Type: spanEventAttributeTypeDouble, - DoubleValue: float64(v), - } -} - -func stringSliceValue(values []string) *spanEventAttribute { - arrayVal := make([]*spanEventArrayAttributeValue, 0, len(values)) - for _, v := range values { - arrayVal = append(arrayVal, &spanEventArrayAttributeValue{ - Type: spanEventArrayAttributeValueTypeString, - StringValue: v, - }) - } - return &spanEventAttribute{ - Type: spanEventAttributeTypeArray, - ArrayValue: &spanEventArrayAttribute{ - Values: arrayVal, - }, - } -} - -func boolSliceValue(values []bool) *spanEventAttribute { - arrayVal := make([]*spanEventArrayAttributeValue, 0, len(values)) - for _, v := range values { - arrayVal = append(arrayVal, &spanEventArrayAttributeValue{ - Type: spanEventArrayAttributeValueTypeBool, - BoolValue: v, - }) - } - return &spanEventAttribute{ - Type: spanEventAttributeTypeArray, - ArrayValue: &spanEventArrayAttribute{ - Values: arrayVal, - }, - } -} - -func intSliceValue[T constraints.Integer](values []T) *spanEventAttribute { - arrayVal := make([]*spanEventArrayAttributeValue, 0, len(values)) - for _, v := range values { - arrayVal = append(arrayVal, &spanEventArrayAttributeValue{ - Type: spanEventArrayAttributeValueTypeInt, - IntValue: int64(v), - }) - } - return &spanEventAttribute{ - Type: spanEventAttributeTypeArray, - ArrayValue: &spanEventArrayAttribute{ - Values: arrayVal, - }, - } -} - -func floatSliceValue[T constraints.Float](values []T) *spanEventAttribute { - arrayVal := make([]*spanEventArrayAttributeValue, 0, len(values)) - for _, v := range values { - arrayVal = append(arrayVal, &spanEventArrayAttributeValue{ - Type: spanEventArrayAttributeValueTypeDouble, - DoubleValue: float64(v), - }) - } - return &spanEventAttribute{ - Type: spanEventAttributeTypeArray, - ArrayValue: &spanEventArrayAttribute{ - Values: arrayVal, - }, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_config.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_config.go deleted file mode 100644 index e30404d700..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_config.go +++ /dev/null @@ -1,36 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package tracer - -import "time" - -// SpanEventConfig represent the configuration of a span event. -type SpanEventConfig struct { - // Time is the time when the event happened. - Time time.Time - - // Attributes is a map of string to attribute. - // Only the following types are supported: - // string, integer (any), boolean, float (any), []string, []integer (any), []boolean, []float (any) - Attributes map[string]any -} - -// SpanEventOption can be used to customize an event created with NewSpanEvent. -type SpanEventOption func(cfg *SpanEventConfig) - -// WithSpanEventTimestamp sets the time when the span event occurred. -func WithSpanEventTimestamp(tStamp time.Time) SpanEventOption { - return func(cfg *SpanEventConfig) { - cfg.Time = tStamp - } -} - -// WithSpanEventAttributes sets the given attributes for the span event. -func WithSpanEventAttributes(attributes map[string]any) SpanEventOption { - return func(cfg *SpanEventConfig) { - cfg.Attributes = attributes - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_msgp.go deleted file mode 100644 index 4dd83f65ec..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_event_msgp.go +++ /dev/null @@ -1,768 +0,0 @@ -package tracer - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *spanEvent) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "name": - z.Name, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - case "time_unix_nano": - z.TimeUnixNano, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "TimeUnixNano") - return - } - case "attributes": - var zb0002 uint32 - zb0002, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if z.Attributes == nil { - z.Attributes = make(map[string]*spanEventAttribute, zb0002) - } else if len(z.Attributes) > 0 { - for key := range z.Attributes { - delete(z.Attributes, key) - } - } - for zb0002 > 0 { - zb0002-- - var za0001 string - var za0002 *spanEventAttribute - za0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - za0002 = nil - } else { - if za0002 == nil { - za0002 = new(spanEventAttribute) - } - err = za0002.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - } - z.Attributes[za0001] = za0002 - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *spanEvent) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 3 - // write "name" - err = en.Append(0x83, 0xa4, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Name) - if err != nil { - err = msgp.WrapError(err, "Name") - return - } - // write "time_unix_nano" - err = en.Append(0xae, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x75, 0x6e, 0x69, 0x78, 0x5f, 0x6e, 0x61, 0x6e, 0x6f) - if err != nil { - return - } - err = en.WriteUint64(z.TimeUnixNano) - if err != nil { - err = msgp.WrapError(err, "TimeUnixNano") - return - } - // write "attributes" - err = en.Append(0xaa, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Attributes))) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - for za0001, za0002 := range z.Attributes { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if za0002 == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = za0002.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *spanEvent) Msgsize() (s int) { - s = 1 + 5 + msgp.StringPrefixSize + len(z.Name) + 15 + msgp.Uint64Size + 11 + msgp.MapHeaderSize - if z.Attributes != nil { - for za0001, za0002 := range z.Attributes { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) - if za0002 == nil { - s += msgp.NilSize - } else { - s += za0002.Msgsize() - } - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanEventArrayAttribute) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "values": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Values") - return - } - if cap(z.Values) >= int(zb0002) { - z.Values = (z.Values)[:zb0002] - } else { - z.Values = make([]*spanEventArrayAttributeValue, zb0002) - } - for za0001 := range z.Values { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "Values", za0001) - return - } - z.Values[za0001] = nil - } else { - if z.Values[za0001] == nil { - z.Values[za0001] = new(spanEventArrayAttributeValue) - } - err = z.Values[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Values", za0001) - return - } - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *spanEventArrayAttribute) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 1 - // write "values" - err = en.Append(0x81, 0xa6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Values))) - if err != nil { - err = msgp.WrapError(err, "Values") - return - } - for za0001 := range z.Values { - if z.Values[za0001] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.Values[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Values", za0001) - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *spanEventArrayAttribute) Msgsize() (s int) { - s = 1 + 7 + msgp.ArrayHeaderSize - for za0001 := range z.Values { - if z.Values[za0001] == nil { - s += msgp.NilSize - } else { - s += z.Values[za0001].Msgsize() - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanEventArrayAttributeValue) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - { - var zb0002 int32 - zb0002, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - z.Type = spanEventArrayAttributeValueType(zb0002) - } - case "string_value": - z.StringValue, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - case "bool_value": - z.BoolValue, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - case "int_value": - z.IntValue, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - case "double_value": - z.DoubleValue, err = dc.ReadFloat64() - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *spanEventArrayAttributeValue) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(5) - var zb0001Mask uint8 /* 5 bits */ - _ = zb0001Mask - if z.StringValue == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.BoolValue == false { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.IntValue == 0 { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.DoubleValue == 0 { - zb0001Len-- - zb0001Mask |= 0x10 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteInt32(int32(z.Type)) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "string_value" - err = en.Append(0xac, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteString(z.StringValue) - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "bool_value" - err = en.Append(0xaa, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.BoolValue) - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "int_value" - err = en.Append(0xa9, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.IntValue) - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "double_value" - err = en.Append(0xac, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteFloat64(z.DoubleValue) - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *spanEventArrayAttributeValue) Msgsize() (s int) { - s = 1 + 5 + msgp.Int32Size + 13 + msgp.StringPrefixSize + len(z.StringValue) + 11 + msgp.BoolSize + 10 + msgp.Int64Size + 13 + msgp.Float64Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanEventArrayAttributeValueType) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 int32 - zb0001, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = spanEventArrayAttributeValueType(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z spanEventArrayAttributeValueType) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteInt32(int32(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z spanEventArrayAttributeValueType) Msgsize() (s int) { - s = msgp.Int32Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanEventAttribute) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - { - var zb0002 int32 - zb0002, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - z.Type = spanEventAttributeType(zb0002) - } - case "string_value": - z.StringValue, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - case "bool_value": - z.BoolValue, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - case "int_value": - z.IntValue, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - case "double_value": - z.DoubleValue, err = dc.ReadFloat64() - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - case "array_value": - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - z.ArrayValue = nil - } else { - if z.ArrayValue == nil { - z.ArrayValue = new(spanEventArrayAttribute) - } - var zb0003 uint32 - zb0003, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - for zb0003 > 0 { - zb0003-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - switch msgp.UnsafeString(field) { - case "values": - var zb0004 uint32 - zb0004, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values") - return - } - if cap(z.ArrayValue.Values) >= int(zb0004) { - z.ArrayValue.Values = (z.ArrayValue.Values)[:zb0004] - } else { - z.ArrayValue.Values = make([]*spanEventArrayAttributeValue, zb0004) - } - for za0001 := range z.ArrayValue.Values { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values", za0001) - return - } - z.ArrayValue.Values[za0001] = nil - } else { - if z.ArrayValue.Values[za0001] == nil { - z.ArrayValue.Values[za0001] = new(spanEventArrayAttributeValue) - } - err = z.ArrayValue.Values[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values", za0001) - return - } - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err, "ArrayValue") - return - } - } - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *spanEventAttribute) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 6 bits */ - _ = zb0001Mask - if z.StringValue == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.BoolValue == false { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.IntValue == 0 { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.DoubleValue == 0 { - zb0001Len-- - zb0001Mask |= 0x10 - } - if z.ArrayValue == nil { - zb0001Len-- - zb0001Mask |= 0x20 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteInt32(int32(z.Type)) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "string_value" - err = en.Append(0xac, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteString(z.StringValue) - if err != nil { - err = msgp.WrapError(err, "StringValue") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "bool_value" - err = en.Append(0xaa, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteBool(z.BoolValue) - if err != nil { - err = msgp.WrapError(err, "BoolValue") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "int_value" - err = en.Append(0xa9, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.IntValue) - if err != nil { - err = msgp.WrapError(err, "IntValue") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "double_value" - err = en.Append(0xac, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteFloat64(z.DoubleValue) - if err != nil { - err = msgp.WrapError(err, "DoubleValue") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "array_value" - err = en.Append(0xab, 0x61, 0x72, 0x72, 0x61, 0x79, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - if z.ArrayValue == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - // map header, size 1 - // write "values" - err = en.Append(0x81, 0xa6, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.ArrayValue.Values))) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values") - return - } - for za0001 := range z.ArrayValue.Values { - if z.ArrayValue.Values[za0001] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z.ArrayValue.Values[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "ArrayValue", "Values", za0001) - return - } - } - } - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *spanEventAttribute) Msgsize() (s int) { - s = 1 + 5 + msgp.Int32Size + 13 + msgp.StringPrefixSize + len(z.StringValue) + 11 + msgp.BoolSize + 10 + msgp.Int64Size + 13 + msgp.Float64Size + 12 - if z.ArrayValue == nil { - s += msgp.NilSize - } else { - s += 1 + 7 + msgp.ArrayHeaderSize - for za0001 := range z.ArrayValue.Values { - if z.ArrayValue.Values[za0001] == nil { - s += msgp.NilSize - } else { - s += z.ArrayValue.Values[za0001].Msgsize() - } - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanEventAttributeType) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 int32 - zb0001, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = spanEventAttributeType(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z spanEventAttributeType) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteInt32(int32(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z spanEventAttributeType) Msgsize() (s int) { - s = msgp.Int32Size - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_link_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_link_msgp.go deleted file mode 100644 index a56f603f53..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_link_msgp.go +++ /dev/null @@ -1,223 +0,0 @@ -package tracer - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *SpanLink) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "trace_id": - z.TraceID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - case "trace_id_high": - z.TraceIDHigh, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "TraceIDHigh") - return - } - case "span_id": - z.SpanID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - case "attributes": - var zb0002 uint32 - zb0002, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - if z.Attributes == nil { - z.Attributes = make(map[string]string, zb0002) - } else if len(z.Attributes) > 0 { - for key := range z.Attributes { - delete(z.Attributes, key) - } - } - for zb0002 > 0 { - zb0002-- - var za0001 string - var za0002 string - za0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - za0002, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - z.Attributes[za0001] = za0002 - } - case "tracestate": - z.Tracestate, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Tracestate") - return - } - case "flags": - z.Flags, err = dc.ReadUint32() - if err != nil { - err = msgp.WrapError(err, "Flags") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *SpanLink) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(6) - var zb0001Mask uint8 /* 6 bits */ - _ = zb0001Mask - if z.TraceIDHigh == 0 { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.Attributes == nil { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.Tracestate == "" { - zb0001Len-- - zb0001Mask |= 0x10 - } - if z.Flags == 0 { - zb0001Len-- - zb0001Mask |= 0x20 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "trace_id" - err = en.Append(0xa8, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.TraceID) - if err != nil { - err = msgp.WrapError(err, "TraceID") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "trace_id_high" - err = en.Append(0xad, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x68, 0x69, 0x67, 0x68) - if err != nil { - return - } - err = en.WriteUint64(z.TraceIDHigh) - if err != nil { - err = msgp.WrapError(err, "TraceIDHigh") - return - } - } - // write "span_id" - err = en.Append(0xa7, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.SpanID) - if err != nil { - err = msgp.WrapError(err, "SpanID") - return - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "attributes" - err = en.Append(0xaa, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.Attributes))) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - for za0001, za0002 := range z.Attributes { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "Attributes") - return - } - err = en.WriteString(za0002) - if err != nil { - err = msgp.WrapError(err, "Attributes", za0001) - return - } - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "tracestate" - err = en.Append(0xaa, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x74, 0x61, 0x74, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Tracestate) - if err != nil { - err = msgp.WrapError(err, "Tracestate") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "flags" - err = en.Append(0xa5, 0x66, 0x6c, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteUint32(z.Flags) - if err != nil { - err = msgp.WrapError(err, "Flags") - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *SpanLink) Msgsize() (s int) { - s = 1 + 9 + msgp.Uint64Size + 14 + msgp.Uint64Size + 8 + msgp.Uint64Size + 11 + msgp.MapHeaderSize - if z.Attributes != nil { - for za0001, za0002 := range z.Attributes { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.StringPrefixSize + len(za0002) - } - } - s += 11 + msgp.StringPrefixSize + len(z.Tracestate) + 6 + msgp.Uint32Size - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_msgp.go deleted file mode 100644 index 5e575db10c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/span_msgp.go +++ /dev/null @@ -1,713 +0,0 @@ -package tracer - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *Span) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "name": - z.name, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "name") - return - } - case "service": - z.service, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "service") - return - } - case "resource": - z.resource, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "resource") - return - } - case "type": - z.spanType, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "spanType") - return - } - case "start": - z.start, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "start") - return - } - case "duration": - z.duration, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "duration") - return - } - case "meta": - var zb0002 uint32 - zb0002, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "meta") - return - } - if z.meta == nil { - z.meta = make(map[string]string, zb0002) - } else if len(z.meta) > 0 { - for key := range z.meta { - delete(z.meta, key) - } - } - for zb0002 > 0 { - zb0002-- - var za0001 string - var za0002 string - za0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "meta") - return - } - za0002, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "meta", za0001) - return - } - z.meta[za0001] = za0002 - } - case "meta_struct": - err = z.metaStruct.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "metaStruct") - return - } - case "metrics": - var zb0003 uint32 - zb0003, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "metrics") - return - } - if z.metrics == nil { - z.metrics = make(map[string]float64, zb0003) - } else if len(z.metrics) > 0 { - for key := range z.metrics { - delete(z.metrics, key) - } - } - for zb0003 > 0 { - zb0003-- - var za0003 string - var za0004 float64 - za0003, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "metrics") - return - } - za0004, err = dc.ReadFloat64() - if err != nil { - err = msgp.WrapError(err, "metrics", za0003) - return - } - z.metrics[za0003] = za0004 - } - case "span_id": - z.spanID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "spanID") - return - } - case "trace_id": - z.traceID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "traceID") - return - } - case "parent_id": - z.parentID, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "parentID") - return - } - case "error": - z.error, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "error") - return - } - case "span_links": - var zb0004 uint32 - zb0004, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "spanLinks") - return - } - if cap(z.spanLinks) >= int(zb0004) { - z.spanLinks = (z.spanLinks)[:zb0004] - } else { - z.spanLinks = make([]SpanLink, zb0004) - } - for za0005 := range z.spanLinks { - err = z.spanLinks[za0005].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "spanLinks", za0005) - return - } - } - case "span_events": - var zb0005 uint32 - zb0005, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "spanEvents") - return - } - if cap(z.spanEvents) >= int(zb0005) { - z.spanEvents = (z.spanEvents)[:zb0005] - } else { - z.spanEvents = make([]spanEvent, zb0005) - } - for za0006 := range z.spanEvents { - err = z.spanEvents[za0006].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "spanEvents", za0006) - return - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *Span) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(15) - var zb0001Mask uint16 /* 15 bits */ - _ = zb0001Mask - if z.meta == nil { - zb0001Len-- - zb0001Mask |= 0x40 - } - if z.metrics == nil { - zb0001Len-- - zb0001Mask |= 0x100 - } - if z.spanLinks == nil { - zb0001Len-- - zb0001Mask |= 0x2000 - } - if z.spanEvents == nil { - zb0001Len-- - zb0001Mask |= 0x4000 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "name" - err = en.Append(0xa4, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.name) - if err != nil { - err = msgp.WrapError(err, "name") - return - } - // write "service" - err = en.Append(0xa7, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.service) - if err != nil { - err = msgp.WrapError(err, "service") - return - } - // write "resource" - err = en.Append(0xa8, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.resource) - if err != nil { - err = msgp.WrapError(err, "resource") - return - } - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.spanType) - if err != nil { - err = msgp.WrapError(err, "spanType") - return - } - // write "start" - err = en.Append(0xa5, 0x73, 0x74, 0x61, 0x72, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.start) - if err != nil { - err = msgp.WrapError(err, "start") - return - } - // write "duration" - err = en.Append(0xa8, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt64(z.duration) - if err != nil { - err = msgp.WrapError(err, "duration") - return - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "meta" - err = en.Append(0xa4, 0x6d, 0x65, 0x74, 0x61) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.meta))) - if err != nil { - err = msgp.WrapError(err, "meta") - return - } - for za0001, za0002 := range z.meta { - err = en.WriteString(za0001) - if err != nil { - err = msgp.WrapError(err, "meta") - return - } - err = en.WriteString(za0002) - if err != nil { - err = msgp.WrapError(err, "meta", za0001) - return - } - } - } - // write "meta_struct" - err = en.Append(0xab, 0x6d, 0x65, 0x74, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74) - if err != nil { - return - } - err = z.metaStruct.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "metaStruct") - return - } - if (zb0001Mask & 0x100) == 0 { // if not omitted - // write "metrics" - err = en.Append(0xa7, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73) - if err != nil { - return - } - err = en.WriteMapHeader(uint32(len(z.metrics))) - if err != nil { - err = msgp.WrapError(err, "metrics") - return - } - for za0003, za0004 := range z.metrics { - err = en.WriteString(za0003) - if err != nil { - err = msgp.WrapError(err, "metrics") - return - } - err = en.WriteFloat64(za0004) - if err != nil { - err = msgp.WrapError(err, "metrics", za0003) - return - } - } - } - // write "span_id" - err = en.Append(0xa7, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.spanID) - if err != nil { - err = msgp.WrapError(err, "spanID") - return - } - // write "trace_id" - err = en.Append(0xa8, 0x74, 0x72, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.traceID) - if err != nil { - err = msgp.WrapError(err, "traceID") - return - } - // write "parent_id" - err = en.Append(0xa9, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint64(z.parentID) - if err != nil { - err = msgp.WrapError(err, "parentID") - return - } - // write "error" - err = en.Append(0xa5, 0x65, 0x72, 0x72, 0x6f, 0x72) - if err != nil { - return - } - err = en.WriteInt32(z.error) - if err != nil { - err = msgp.WrapError(err, "error") - return - } - if (zb0001Mask & 0x2000) == 0 { // if not omitted - // write "span_links" - err = en.Append(0xaa, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x6c, 0x69, 0x6e, 0x6b, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.spanLinks))) - if err != nil { - err = msgp.WrapError(err, "spanLinks") - return - } - for za0005 := range z.spanLinks { - err = z.spanLinks[za0005].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "spanLinks", za0005) - return - } - } - } - if (zb0001Mask & 0x4000) == 0 { // if not omitted - // write "span_events" - err = en.Append(0xab, 0x73, 0x70, 0x61, 0x6e, 0x5f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.spanEvents))) - if err != nil { - err = msgp.WrapError(err, "spanEvents") - return - } - for za0006 := range z.spanEvents { - err = z.spanEvents[za0006].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "spanEvents", za0006) - return - } - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *Span) Msgsize() (s int) { - s = 1 + 5 + msgp.StringPrefixSize + len(z.name) + 8 + msgp.StringPrefixSize + len(z.service) + 9 + msgp.StringPrefixSize + len(z.resource) + 5 + msgp.StringPrefixSize + len(z.spanType) + 6 + msgp.Int64Size + 9 + msgp.Int64Size + 5 + msgp.MapHeaderSize - if z.meta != nil { - for za0001, za0002 := range z.meta { - _ = za0002 - s += msgp.StringPrefixSize + len(za0001) + msgp.StringPrefixSize + len(za0002) - } - } - s += 12 + z.metaStruct.Msgsize() + 8 + msgp.MapHeaderSize - if z.metrics != nil { - for za0003, za0004 := range z.metrics { - _ = za0004 - s += msgp.StringPrefixSize + len(za0003) + msgp.Float64Size - } - } - s += 8 + msgp.Uint64Size + 9 + msgp.Uint64Size + 10 + msgp.Uint64Size + 6 + msgp.Int32Size + 11 + msgp.ArrayHeaderSize - for za0005 := range z.spanLinks { - s += z.spanLinks[za0005].Msgsize() - } - s += 12 + msgp.ArrayHeaderSize - for za0006 := range z.spanEvents { - s += z.spanEvents[za0006].Msgsize() - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *errorConfig) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "noDebugStack": - z.noDebugStack, err = dc.ReadBool() - if err != nil { - err = msgp.WrapError(err, "noDebugStack") - return - } - case "stackFrames": - z.stackFrames, err = dc.ReadUint() - if err != nil { - err = msgp.WrapError(err, "stackFrames") - return - } - case "stackSkip": - z.stackSkip, err = dc.ReadUint() - if err != nil { - err = msgp.WrapError(err, "stackSkip") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z errorConfig) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 3 - // write "noDebugStack" - err = en.Append(0x83, 0xac, 0x6e, 0x6f, 0x44, 0x65, 0x62, 0x75, 0x67, 0x53, 0x74, 0x61, 0x63, 0x6b) - if err != nil { - return - } - err = en.WriteBool(z.noDebugStack) - if err != nil { - err = msgp.WrapError(err, "noDebugStack") - return - } - // write "stackFrames" - err = en.Append(0xab, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73) - if err != nil { - return - } - err = en.WriteUint(z.stackFrames) - if err != nil { - err = msgp.WrapError(err, "stackFrames") - return - } - // write "stackSkip" - err = en.Append(0xa9, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x53, 0x6b, 0x69, 0x70) - if err != nil { - return - } - err = en.WriteUint(z.stackSkip) - if err != nil { - err = msgp.WrapError(err, "stackSkip") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z errorConfig) Msgsize() (s int) { - s = 1 + 13 + msgp.BoolSize + 12 + msgp.UintSize + 10 + msgp.UintSize - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanList) DecodeMsg(dc *msgp.Reader) (err error) { - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(spanList, zb0002) - } - for zb0001 := range *z { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - (*z)[zb0001] = nil - } else { - if (*z)[zb0001] == nil { - (*z)[zb0001] = new(Span) - } - err = (*z)[zb0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z spanList) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteArrayHeader(uint32(len(z))) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0003 := range z { - if z[zb0003] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z[zb0003].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, zb0003) - return - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z spanList) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0003 := range z { - if z[zb0003] == nil { - s += msgp.NilSize - } else { - s += z[zb0003].Msgsize() - } - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *spanLists) DecodeMsg(dc *msgp.Reader) (err error) { - var zb0003 uint32 - zb0003, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0003) { - (*z) = (*z)[:zb0003] - } else { - (*z) = make(spanLists, zb0003) - } - for zb0001 := range *z { - var zb0004 uint32 - zb0004, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - if cap((*z)[zb0001]) >= int(zb0004) { - (*z)[zb0001] = ((*z)[zb0001])[:zb0004] - } else { - (*z)[zb0001] = make(spanList, zb0004) - } - for zb0002 := range (*z)[zb0001] { - if dc.IsNil() { - err = dc.ReadNil() - if err != nil { - err = msgp.WrapError(err, zb0001, zb0002) - return - } - (*z)[zb0001][zb0002] = nil - } else { - if (*z)[zb0001][zb0002] == nil { - (*z)[zb0001][zb0002] = new(Span) - } - err = (*z)[zb0001][zb0002].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, zb0001, zb0002) - return - } - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z spanLists) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteArrayHeader(uint32(len(z))) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0005 := range z { - err = en.WriteArrayHeader(uint32(len(z[zb0005]))) - if err != nil { - err = msgp.WrapError(err, zb0005) - return - } - for zb0006 := range z[zb0005] { - if z[zb0005][zb0006] == nil { - err = en.WriteNil() - if err != nil { - return - } - } else { - err = z[zb0005][zb0006].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, zb0005, zb0006) - return - } - } - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z spanLists) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0005 := range z { - s += msgp.ArrayHeaderSize - for zb0006 := range z[zb0005] { - if z[zb0005][zb0006] == nil { - s += msgp.NilSize - } else { - s += z[zb0005][zb0006].Msgsize() - } - } - } - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spancontext.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spancontext.go deleted file mode 100644 index b9fe3d5b33..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spancontext.go +++ /dev/null @@ -1,730 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "encoding/binary" - "encoding/hex" - "fmt" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace" - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats" - sharedinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/processtags" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -const TraceIDZero string = "00000000000000000000000000000000" - -var _ ddtrace.SpanContext = (*SpanContext)(nil) - -type traceID [16]byte // traceID in big endian, i.e. - -var emptyTraceID traceID - -func (t *traceID) HexEncoded() string { - return hex.EncodeToString(t[:]) -} - -func (t *traceID) Lower() uint64 { - return binary.BigEndian.Uint64(t[8:]) -} - -func (t *traceID) Upper() uint64 { - return binary.BigEndian.Uint64(t[:8]) -} - -func (t *traceID) SetLower(i uint64) { - binary.BigEndian.PutUint64(t[8:], i) -} - -func (t *traceID) SetUpper(i uint64) { - binary.BigEndian.PutUint64(t[:8], i) -} - -func (t *traceID) SetUpperFromHex(s string) error { - u, err := strconv.ParseUint(s, 16, 64) - if err != nil { - return fmt.Errorf("malformed %q: %s", s, err) - } - t.SetUpper(u) - return nil -} - -func (t *traceID) Empty() bool { - return *t == emptyTraceID -} - -func (t *traceID) HasUpper() bool { - for _, b := range t[:8] { - if b != 0 { - return true - } - } - return false -} - -func (t *traceID) UpperHex() string { - return hex.EncodeToString(t[:8]) -} - -// SpanContext represents a span state that can propagate to descendant spans -// and across process boundaries. It contains all the information needed to -// spawn a direct descendant of the span that it belongs to. It can be used -// to create distributed tracing by propagating it using the provided interfaces. -type SpanContext struct { - updated bool // updated is tracking changes for priority / origin / x-datadog-tags - - // the below group should propagate only locally - - trace *trace // reference to the trace that this span belongs too - span *Span // reference to the span that hosts this context - errors atomic.Int32 // number of spans with errors in this trace - - // The 16-character hex string of the last seen Datadog Span ID - // this value will be added as the _dd.parent_id tag to spans - // created from this spanContext. - // This value is extracted from the `p` sub-key within the tracestate. - // The backend will use the _dd.parent_id tag to reparent spans in - // distributed traces if they were missing their parent span. - // Missing parent span could occur when a W3C-compliant tracer - // propagated this context, but didn't send any spans to Datadog. - reparentID string - isRemote bool - - // the below group should propagate cross-process - - traceID traceID - spanID uint64 - - mu sync.RWMutex // guards below fields - baggage map[string]string - hasBaggage uint32 // atomic int for quick checking presence of baggage. 0 indicates no baggage, otherwise baggage exists. - origin string // e.g. "synthetics" - - spanLinks []SpanLink // links to related spans in separate|external|disconnected traces - baggageOnly bool // when true, indicates this context only propagates baggage items and should not be used for distributed tracing fields -} - -// Private interface for converting v1 span contexts to v2 ones. -type spanContextV1Adapter interface { - SamplingDecision() uint32 - Origin() string - Priority() *float64 - PropagatingTags() map[string]string - Tags() map[string]string -} - -// FromGenericCtx converts a ddtrace.SpanContext to a *SpanContext, which can be used -// to start child spans. -func FromGenericCtx(c ddtrace.SpanContext) *SpanContext { - var sc SpanContext - sc.traceID = c.TraceIDBytes() - sc.spanID = c.SpanID() - sc.baggage = make(map[string]string) - c.ForeachBaggageItem(func(k, v string) bool { - sc.hasBaggage = 1 - sc.baggage[k] = v - return true - }) - ctx, ok := c.(spanContextV1Adapter) - if !ok { - return &sc - } - sc.origin = ctx.Origin() - sc.trace = newTrace() - sc.trace.priority = ctx.Priority() - sc.trace.samplingDecision = samplingDecision(ctx.SamplingDecision()) - sc.trace.tags = ctx.Tags() - sc.trace.propagatingTags = ctx.PropagatingTags() - return &sc -} - -// newSpanContext creates a new SpanContext to serve as context for the given -// span. If the provided parent is not nil, the context will inherit the trace, -// baggage and other values from it. This method also pushes the span into the -// new context's trace and as a result, it should not be called multiple times -// for the same span. -func newSpanContext(span *Span, parent *SpanContext) *SpanContext { - context := &SpanContext{ - spanID: span.spanID, - span: span, - } - - context.traceID.SetLower(span.traceID) - if parent != nil { - if !parent.baggageOnly { - context.traceID.SetUpper(parent.traceID.Upper()) - context.trace = parent.trace - context.origin = parent.origin - context.errors.Store(parent.errors.Load()) - } - parent.ForeachBaggageItem(func(k, v string) bool { - context.setBaggageItem(k, v) - return true - }) - } else if sharedinternal.BoolEnv("DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED", true) { - // add 128 bit trace id, if enabled, formatted as big-endian: - // <32-bit unix seconds> <32 bits of zero> <64 random bits> - id128 := time.Duration(span.start) / time.Second - // casting from int64 -> uint32 should be safe since the start time won't be - // negative, and the seconds should fit within 32-bits for the foreseeable future. - // (We only want 32 bits of time, then the rest is zero) - tUp := uint64(uint32(id128)) << 32 // We need the time at the upper 32 bits of the uint - context.traceID.SetUpper(tUp) - } - if context.trace == nil { - context.trace = newTrace() - } - if context.trace.root == nil { - // first span in the trace can safely be assumed to be the root - context.trace.root = span - } - // put span in context's trace - context.trace.push(span) - // setting context.updated to false here is necessary to distinguish - // between initializing properties of the span (priority) - // and updating them after extracting context through propagators - context.updated = false - return context -} - -// SpanID implements ddtrace.SpanContext. -func (c *SpanContext) SpanID() uint64 { - if c == nil { - return 0 - } - return c.spanID -} - -// TraceID implements ddtrace.SpanContext. -func (c *SpanContext) TraceID() string { - if c == nil { - return TraceIDZero - } - return c.traceID.HexEncoded() -} - -// TraceIDBytes implements ddtrace.SpanContext. -func (c *SpanContext) TraceIDBytes() [16]byte { - if c == nil { - return emptyTraceID - } - return c.traceID -} - -// TraceIDLower implements ddtrace.SpanContext. -func (c *SpanContext) TraceIDLower() uint64 { - if c == nil { - return 0 - } - return c.traceID.Lower() -} - -// TraceIDUpper implements ddtrace.SpanContext. -func (c *SpanContext) TraceIDUpper() uint64 { - if c == nil { - return 0 - } - return c.traceID.Upper() -} - -// SpanLinks implements ddtrace.SpanContext -func (c *SpanContext) SpanLinks() []SpanLink { - cp := make([]SpanLink, len(c.spanLinks)) - copy(cp, c.spanLinks) - return cp -} - -// ForeachBaggageItem implements ddtrace.SpanContext. -func (c *SpanContext) ForeachBaggageItem(handler func(k, v string) bool) { - if c == nil { - return - } - if atomic.LoadUint32(&c.hasBaggage) == 0 { - return - } - c.mu.RLock() - defer c.mu.RUnlock() - for k, v := range c.baggage { - if !handler(k, v) { - break - } - } -} - -// sets the sampling priority and decision maker (based on `sampler`). -func (c *SpanContext) setSamplingPriority(p int, sampler samplernames.SamplerName) { - if c.trace == nil { - c.trace = newTrace() - } - if c.trace.setSamplingPriority(p, sampler) { - // the trace's sampling priority or sampler was updated: mark this as updated - c.updated = true - } -} - -func (c *SpanContext) SamplingPriority() (p int, ok bool) { - if c == nil || c.trace == nil { - return 0, false - } - return c.trace.samplingPriority() -} - -func (c *SpanContext) setBaggageItem(key, val string) { - c.mu.Lock() - defer c.mu.Unlock() - if c.baggage == nil { - atomic.StoreUint32(&c.hasBaggage, 1) - c.baggage = make(map[string]string, 1) - } - c.baggage[key] = val -} - -func (c *SpanContext) baggageItem(key string) string { - if atomic.LoadUint32(&c.hasBaggage) == 0 { - return "" - } - c.mu.RLock() - defer c.mu.RUnlock() - return c.baggage[key] -} - -// finish marks this span as finished in the trace. -func (c *SpanContext) finish() { c.trace.finishedOne(c.span) } - -// safeDebugString returns a safe string representation of the SpanContext for debug logging. -// It excludes potentially sensitive data like baggage contents while preserving useful debugging information. -func (c *SpanContext) safeDebugString() string { - if c == nil { - return "" - } - - hasBaggage := atomic.LoadUint32(&c.hasBaggage) != 0 - var baggageCount int - if hasBaggage { - c.mu.RLock() - baggageCount = len(c.baggage) - c.mu.RUnlock() - } - - return fmt.Sprintf("SpanContext{traceID=%s, spanID=%d, hasBaggage=%t, baggageCount=%d, origin=%q, updated=%t, isRemote=%t, baggageOnly=%t}", - c.TraceID(), c.SpanID(), hasBaggage, baggageCount, c.origin, c.updated, c.isRemote, c.baggageOnly) -} - -// samplingDecision is the decision to send a trace to the agent or not. -type samplingDecision uint32 - -const ( - // decisionNone is the default state of a trace. - // If no decision is made about the trace, the trace won't be sent to the agent. - decisionNone samplingDecision = iota - // decisionDrop prevents the trace from being sent to the agent. - decisionDrop - // decisionKeep ensures the trace will be sent to the agent. - decisionKeep -) - -// trace contains shared context information about a trace, such as sampling -// priority, the root reference and a buffer of the spans which are part of the -// trace, if these exist. -type trace struct { - mu sync.RWMutex // guards below fields - spans []*Span // all the spans that are part of this trace - tags map[string]string // trace level tags - propagatingTags map[string]string // trace level tags that will be propagated across service boundaries - finished int // the number of finished spans - full bool // signifies that the span buffer is full - priority *float64 // sampling priority - locked bool // specifies if the sampling priority can be altered - samplingDecision samplingDecision // samplingDecision indicates whether to send the trace to the agent. - - // root specifies the root of the trace, if known; it is nil when a span - // context is extracted from a carrier, at which point there are no spans in - // the trace yet. - root *Span -} - -var ( - // traceStartSize is the initial size of our trace buffer, - // by default we allocate for a handful of spans within the trace, - // reasonable as span is actually way bigger, and avoids re-allocating - // over and over. Could be fine-tuned at runtime. - traceStartSize = 10 - // traceMaxSize is the maximum number of spans we keep in memory for a - // single trace. This is to avoid memory leaks. If more spans than this - // are added to a trace, then the trace is dropped and the spans are - // discarded. Adding additional spans after a trace is dropped does - // nothing. - traceMaxSize = int(1e5) -) - -// newTrace creates a new trace using the given callback which will be called -// upon completion of the trace. -func newTrace() *trace { - return &trace{spans: make([]*Span, 0, traceStartSize)} -} - -func (t *trace) samplingPriorityLocked() (p int, ok bool) { - if t.priority == nil { - return 0, false - } - return int(*t.priority), true -} - -func (t *trace) samplingPriority() (p int, ok bool) { - t.mu.RLock() - defer t.mu.RUnlock() - return t.samplingPriorityLocked() -} - -// setSamplingPriority sets the sampling priority and the decision maker -// and returns true if it was modified. -func (t *trace) setSamplingPriority(p int, sampler samplernames.SamplerName) bool { - t.mu.Lock() - defer t.mu.Unlock() - return t.setSamplingPriorityLocked(p, sampler) -} - -func (t *trace) keep() { - atomic.CompareAndSwapUint32((*uint32)(&t.samplingDecision), uint32(decisionNone), uint32(decisionKeep)) -} - -func (t *trace) drop() { - atomic.CompareAndSwapUint32((*uint32)(&t.samplingDecision), uint32(decisionNone), uint32(decisionDrop)) -} - -func (t *trace) setTag(key, value string) { - t.mu.Lock() - defer t.mu.Unlock() - t.setTagLocked(key, value) -} - -func (t *trace) setTagLocked(key, value string) { - if t.tags == nil { - t.tags = make(map[string]string, 1) - } - t.tags[key] = value -} - -func samplerToDM(sampler samplernames.SamplerName) string { - return "-" + strconv.Itoa(int(sampler)) -} - -func (t *trace) setSamplingPriorityLocked(p int, sampler samplernames.SamplerName) bool { - if t.locked { - return false - } - - updatedPriority := t.priority == nil || *t.priority != float64(p) - - if t.priority == nil { - t.priority = new(float64) - } - *t.priority = float64(p) - curDM, existed := t.propagatingTags[keyDecisionMaker] - if p > 0 && sampler != samplernames.Unknown { - // We have a positive priority and the sampling mechanism isn't set. - // Send nothing when sampler is `Unknown` for RFC compliance. - // If a global sampling rate is set, it was always applied first. And this call can be - // triggered again by applying a rule sampler. The sampling priority will be the same, but - // the decision maker will be different. So we compare the decision makers as well. - // Note that once global rate sampling is deprecated, we no longer need to compare - // the DMs. Sampling priority is sufficient to distinguish a change in DM. - dm := samplerToDM(sampler) - updatedDM := !existed || dm != curDM - if updatedDM { - t.setPropagatingTagLocked(keyDecisionMaker, dm) - return true - } - } - if p <= 0 && existed { - delete(t.propagatingTags, keyDecisionMaker) - } - - return updatedPriority -} - -func (t *trace) isLocked() bool { - t.mu.RLock() - defer t.mu.RUnlock() - return t.locked -} - -func (t *trace) setLocked(locked bool) { - t.mu.Lock() - defer t.mu.Unlock() - t.locked = locked -} - -// push pushes a new span into the trace. If the buffer is full, it returns -// a errBufferFull error. -func (t *trace) push(sp *Span) { - t.mu.Lock() - defer t.mu.Unlock() - if t.full { - return - } - tr := getGlobalTracer() - if len(t.spans) >= traceMaxSize { - // capacity is reached, we will not be able to complete this trace. - t.full = true - t.spans = nil // allow our spans to be collected by GC. - log.Error("trace buffer full (%d spans), dropping trace", traceMaxSize) - if tr != nil { - tracerstats.Signal(tracerstats.TracesDropped, 1) - } - return - } - if v, ok := sp.metrics[keySamplingPriority]; ok { - t.setSamplingPriorityLocked(int(v), samplernames.Unknown) - } - t.spans = append(t.spans, sp) - if tr != nil { - tracerstats.Signal(tracerstats.SpanStarted, 1) - } -} - -// setTraceTags sets all "trace level" tags on the provided span -// t must already be locked. -func (t *trace) setTraceTags(s *Span) { - for k, v := range t.tags { - s.setMeta(k, v) - } - for k, v := range t.propagatingTags { - s.setMeta(k, v) - } - for k, v := range sharedinternal.GetTracerGitMetadataTags() { - s.setMeta(k, v) - } - if s.context != nil && s.context.traceID.HasUpper() { - s.setMeta(keyTraceID128, s.context.traceID.UpperHex()) - } - if pTags := processtags.GlobalTags().String(); pTags != "" { - s.setMeta(keyProcessTags, pTags) - } -} - -// finishedOne acknowledges that another span in the trace has finished, and checks -// if the trace is complete, in which case it calls the onFinish function. It uses -// the given priority, if non-nil, to mark the root span. This also will trigger a partial flush -// if enabled and the total number of finished spans is greater than or equal to the partial flush limit. -// The provided span must be locked. -func (t *trace) finishedOne(s *Span) { - t.mu.Lock() - defer t.mu.Unlock() - s.finished = true - if t.full { - // capacity has been reached, the buffer is no longer tracking - // all the spans in the trace, so the below conditions will not - // be accurate and would trigger a pre-mature flush, exposing us - // to a race condition where spans can be modified while flushing. - // - // TODO(partialFlush): should we do a partial flush in this scenario? - return - } - t.finished++ - tr := getGlobalTracer() - if tr == nil { - return - } - tc := tr.TracerConf() - setPeerService(s, tc.PeerServiceDefaults, tc.PeerServiceMappings) - - // attach the _dd.base_service tag only when the globally configured service name is different from the - // span service name. - if s.service != "" && !strings.EqualFold(s.service, tc.ServiceTag) { - s.meta[keyBaseService] = tc.ServiceTag - } - if s == t.root && t.priority != nil { - // after the root has finished we lock down the priority; - // we won't be able to make changes to a span after finishing - // without causing a race condition. - t.root.setMetric(keySamplingPriority, *t.priority) - t.locked = true - } - if len(t.spans) > 0 && s == t.spans[0] { - // first span in chunk finished, lock down the tags - // - // TODO(barbayar): make sure this doesn't happen in vain when switching to - // the new wire format. We won't need to set the tags on the first span - // in the chunk there. - t.setTraceTags(s) - } - - // This is here to support the mocktracer. It would be nice to be able to not do this. - // We need to track when any single span is finished. - if mtr, ok := tr.(interface{ FinishSpan(*Span) }); ok { - mtr.FinishSpan(s) - } - - if len(t.spans) == t.finished { // perform a full flush of all spans - if tr, ok := tr.(*tracer); ok { - t.finishChunk(tr, &chunk{ - spans: t.spans, - willSend: decisionKeep == samplingDecision(atomic.LoadUint32((*uint32)(&t.samplingDecision))), - }) - } - t.spans = nil - return - } - - doPartialFlush := tc.PartialFlush && t.finished >= tc.PartialFlushMinSpans - if !doPartialFlush { - return // The trace hasn't completed and partial flushing will not occur - } - log.Debug("Partial flush triggered with %d finished spans", t.finished) - telemetry.Count(telemetry.NamespaceTracers, "trace_partial_flush.count", []string{"reason:large_trace"}).Submit(1) - finishedSpans := make([]*Span, 0, t.finished) - leftoverSpans := make([]*Span, 0, len(t.spans)-t.finished) - for _, s2 := range t.spans { - if s2.finished { - finishedSpans = append(finishedSpans, s2) - } else { - leftoverSpans = append(leftoverSpans, s2) - } - } - telemetry.Distribution(telemetry.NamespaceTracers, "trace_partial_flush.spans_closed", nil).Submit(float64(len(finishedSpans))) - telemetry.Distribution(telemetry.NamespaceTracers, "trace_partial_flush.spans_remaining", nil).Submit(float64(len(leftoverSpans))) - finishedSpans[0].setMetric(keySamplingPriority, *t.priority) - if s != t.spans[0] { - // Make sure the first span in the chunk has the trace-level tags - t.setTraceTags(finishedSpans[0]) - } - if tr, ok := tr.(*tracer); ok { - t.finishChunk(tr, &chunk{ - spans: finishedSpans, - willSend: decisionKeep == samplingDecision(atomic.LoadUint32((*uint32)(&t.samplingDecision))), - }) - } - t.spans = leftoverSpans -} - -func (t *trace) finishChunk(tr *tracer, ch *chunk) { - tr.submitChunk(ch) - t.finished = 0 // important, because a buffer can be used for several flushes -} - -// setPeerService sets the peer.service, _dd.peer.service.source, and _dd.peer.service.remapped_from -// tags as applicable for the given span. -func setPeerService(s *Span, peerServiceDefaults bool, peerServiceMappings map[string]string) { - if _, ok := s.meta[ext.PeerService]; ok { // peer.service already set on the span - s.setMeta(keyPeerServiceSource, ext.PeerService) - } else { // no peer.service currently set - spanKind := s.meta[ext.SpanKind] - isOutboundRequest := spanKind == ext.SpanKindClient || spanKind == ext.SpanKindProducer - shouldSetDefaultPeerService := isOutboundRequest && peerServiceDefaults - if !shouldSetDefaultPeerService { - return - } - source := setPeerServiceFromSource(s) - if source == "" { - log.Debug("No source tag value could be found for span %q, peer.service not set", s.name) - return - } - s.setMeta(keyPeerServiceSource, source) - } - // Overwrite existing peer.service value if remapped by the user - ps := s.meta[ext.PeerService] - if to, ok := peerServiceMappings[ps]; ok { - s.setMeta(keyPeerServiceRemappedFrom, ps) - s.setMeta(ext.PeerService, to) - } -} - -// setPeerServiceFromSource sets peer.service from the sources determined -// by the tags on the span. It returns the source tag name that it used for -// the peer.service value, or the empty string if no valid source tag was available. -func setPeerServiceFromSource(s *Span) string { - has := func(tag string) bool { - _, ok := s.meta[tag] - return ok - } - var sources []string - useTargetHost := true - switch { - // order of the cases and their sources matters here. These are in priority order (highest to lowest) - case has("aws_service"): - sources = []string{ - "queuename", - "topicname", - "streamname", - "tablename", - "bucketname", - } - case s.meta[ext.DBSystem] == ext.DBSystemCassandra: - sources = []string{ - ext.CassandraContactPoints, - } - useTargetHost = false - case has(ext.DBSystem): - sources = []string{ - ext.DBName, - ext.DBInstance, - } - case has(ext.MessagingSystem): - sources = []string{ - ext.KafkaBootstrapServers, - } - case has(ext.RPCSystem): - sources = []string{ - ext.RPCService, - } - } - // network destination tags will be used as fallback unless there are higher priority sources already set. - if useTargetHost { - sources = append(sources, []string{ - ext.NetworkDestinationName, - ext.PeerHostname, - ext.TargetHost, - }...) - } - for _, source := range sources { - if val, ok := s.meta[source]; ok { - s.setMeta(ext.PeerService, val) - return source - } - } - return "" -} - -const hexEncodingDigits = "0123456789abcdef" - -// spanIDHexEncoded returns the hex encoded string of the given span ID `u` -// with the given padding. -// -// Code is borrowed from `fmt.fmtInteger` in the standard library. -func spanIDHexEncoded(u uint64, padding int) string { - // The allocated intbuf with a capacity of 68 bytes - // is large enough for integer formatting. - var intbuf [68]byte - buf := intbuf[0:] - if padding > 68 { - buf = make([]byte, padding) - } - // Because printing is easier right-to-left: format u into buf, ending at buf[i]. - i := len(buf) - for u >= 16 { - i-- - buf[i] = hexEncodingDigits[u&0xF] - u >>= 4 - } - i-- - buf[i] = hexEncodingDigits[u] - for i > 0 && padding > len(buf)-i { - i-- - buf[i] = '0' - } - return string(buf[i:]) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spanlink.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spanlink.go deleted file mode 100644 index 764a8d7df9..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/spanlink.go +++ /dev/null @@ -1,25 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -// SpanLink represents a reference to a span that exists outside of the trace. -// -//go:generate go run github.com/tinylib/msgp -unexported -marshal=false -o=span_link_msgp.go -tests=false - -type SpanLink struct { - // TraceID represents the low 64 bits of the linked span's trace id. This field is required. - TraceID uint64 `msg:"trace_id" json:"trace_id"` - // TraceIDHigh represents the high 64 bits of the linked span's trace id. This field is only set if the linked span's trace id is 128 bits. - TraceIDHigh uint64 `msg:"trace_id_high,omitempty" json:"trace_id_high"` - // SpanID represents the linked span's span id. - SpanID uint64 `msg:"span_id" json:"span_id"` - // Attributes is a mapping of keys to string values. These values are used to add additional context to the span link. - Attributes map[string]string `msg:"attributes,omitempty" json:"attributes"` - // Tracestate is the tracestate of the linked span. This field is optional. - Tracestate string `msg:"tracestate,omitempty" json:"tracestate"` - // Flags represents the W3C trace flags of the linked span. This field is optional. - Flags uint32 `msg:"flags,omitempty" json:"flags"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sqlcomment.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sqlcomment.go deleted file mode 100644 index 3a949035e6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/sqlcomment.go +++ /dev/null @@ -1,299 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "strconv" - "strings" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" -) - -// DBMPropagationMode represents the mode of dbm propagation. -// -// Note that enabling sql comment propagation results in potentially confidential data (service names) -// being stored in the databases which can then be accessed by other 3rd parties that have been granted -// access to the database. -type DBMPropagationMode string - -const ( - // DBMPropagationModeUndefined represents the dbm propagation mode not being set. This is the same as DBMPropagationModeDisabled. - DBMPropagationModeUndefined DBMPropagationMode = "" - // DBMPropagationModeDisabled represents the dbm propagation mode where all propagation is disabled. - DBMPropagationModeDisabled DBMPropagationMode = "disabled" - // DBMPropagationModeService represents the dbm propagation mode where only service tags (name, env, version) are propagated to dbm. - DBMPropagationModeService DBMPropagationMode = "service" - // DBMPropagationModeFull represents the dbm propagation mode where both service tags and tracing tags are propagated. Tracing tags include span id, trace id and the sampled flag. - DBMPropagationModeFull DBMPropagationMode = "full" -) - -// Key names for SQL comment tags. -const ( - sqlCommentTraceParent = "traceparent" - sqlCommentParentService = "ddps" - sqlCommentDBService = "dddbs" - sqlCommentParentVersion = "ddpv" - sqlCommentEnv = "dde" - // These keys are for the database we are connecting to, instead of the service we are running in. - // "Peer" is the OpenTelemetry nomenclature for "thing I am talking to" - sqlCommentPeerHostname = "ddh" - sqlCommentPeerDBName = "dddb" - // This is for when peer.service is explicitly set as a tag - sqlCommentPeerService = "ddprs" -) - -// Current trace context version (see https://www.w3.org/TR/trace-context/#version) -const w3cContextVersion = "00" - -// SQLCommentCarrier is a carrier implementation that injects a span context in a SQL query in the form -// of a sqlcommenter formatted comment prepended to the original query text. -// See https://google.github.io/sqlcommenter/spec/ for more details. -type SQLCommentCarrier struct { - Query string - Mode DBMPropagationMode - DBServiceName string - SpanID uint64 - PeerDBHostname string - PeerDBName string - PeerService string -} - -// Inject injects a span context in the carrier's Query field as a comment. -func (c *SQLCommentCarrier) Inject(ctx *SpanContext) error { - c.SpanID = generateSpanID(now()) - tags := make(map[string]string) - switch c.Mode { - case DBMPropagationModeUndefined: - fallthrough - case DBMPropagationModeDisabled: - return nil - case DBMPropagationModeFull: - var sampled int64 - traceID := c.SpanID - if ctx != nil { - if sp, ok := ctx.SamplingPriority(); ok && sp > 0 { - sampled = 1 - } - traceID = ctx.traceID.Lower() - } - tags[sqlCommentTraceParent] = encodeTraceParent(traceID, c.SpanID, sampled) - fallthrough - case DBMPropagationModeService: - if ctx != nil && ctx.span != nil { - if e, ok := getMeta(ctx.span, ext.Environment); ok && e != "" { - tags[sqlCommentEnv] = e - } - if v, ok := getMeta(ctx.span, ext.Version); ok && v != "" { - tags[sqlCommentParentVersion] = v - } - if v, ok := getMeta(ctx.span, ext.PeerService); ok && v != "" { - tags[sqlCommentPeerService] = v - } - } - if c.PeerDBName != "" { - tags[sqlCommentPeerDBName] = c.PeerDBName - } - if c.PeerDBHostname != "" { - tags[sqlCommentPeerHostname] = c.PeerDBHostname - } - if tags[sqlCommentPeerService] == "" && c.PeerService != "" { - tags[sqlCommentPeerService] = c.PeerService - } - if globalconfig.ServiceName() != "" { - tags[sqlCommentParentService] = globalconfig.ServiceName() - } - tags[sqlCommentDBService] = c.DBServiceName - } - c.Query = commentQuery(c.Query, tags) - return nil -} - -// encodeTraceParent encodes trace parent as per the w3c trace context spec (https://www.w3.org/TR/trace-context/#version). -func encodeTraceParent(traceID uint64, spanID uint64, sampled int64) string { - var b strings.Builder - // traceparent has a fixed length of 55: - // 2 bytes for the version, 32 for the trace id, 16 for the span id, 2 for the sampled flag and 3 for separators - b.Grow(55) - b.WriteString(w3cContextVersion) - b.WriteRune('-') - tid := strconv.FormatUint(traceID, 16) - for i := 0; i < 32-len(tid); i++ { - b.WriteRune('0') - } - b.WriteString(tid) - b.WriteRune('-') - sid := strconv.FormatUint(spanID, 16) - for i := 0; i < 16-len(sid); i++ { - b.WriteRune('0') - } - b.WriteString(sid) - b.WriteRune('-') - b.WriteRune('0') - b.WriteString(strconv.FormatInt(sampled, 16)) - return b.String() -} - -var ( - keyReplacer = strings.NewReplacer(" ", "%20", "!", "%21", "#", "%23", "$", "%24", "%", "%25", "&", "%26", "'", "%27", "(", "%28", ")", "%29", "*", "%2A", "+", "%2B", ",", "%2C", "/", "%2F", ":", "%3A", ";", "%3B", "=", "%3D", "?", "%3F", "@", "%40", "[", "%5B", "]", "%5D") - valueReplacer = strings.NewReplacer(" ", "%20", "!", "%21", "#", "%23", "$", "%24", "%", "%25", "&", "%26", "'", "%27", "(", "%28", ")", "%29", "*", "%2A", "+", "%2B", ",", "%2C", "/", "%2F", ":", "%3A", ";", "%3B", "=", "%3D", "?", "%3F", "@", "%40", "[", "%5B", "]", "%5D", "'", "\\'") -) - -// commentQuery returns the given query with the tags from the SQLCommentCarrier applied to it as a -// prepended SQL comment. The format of the comment follows the sqlcommenter spec. -// See https://google.github.io/sqlcommenter/spec/ for more details. -func commentQuery(query string, tags map[string]string) string { - if len(tags) == 0 { - return "" - } - var b strings.Builder - // the sqlcommenter specification dictates that tags should be sorted. Since we know all injected keys, - // we skip a sorting operation by specifying the order of keys statically - orderedKeys := []string{sqlCommentDBService, sqlCommentEnv, sqlCommentParentService, sqlCommentParentVersion, sqlCommentTraceParent, sqlCommentPeerHostname, sqlCommentPeerDBName, sqlCommentPeerService} - first := true - for _, k := range orderedKeys { - if v, ok := tags[k]; ok { - // we need to URL-encode both keys and values and escape single quotes in values - // https://google.github.io/sqlcommenter/spec/ - key := keyReplacer.Replace(k) - val := valueReplacer.Replace(v) - if first { - b.WriteString("/*") - } else { - b.WriteRune(',') - } - b.WriteString(key) - b.WriteRune('=') - b.WriteRune('\'') - b.WriteString(val) - b.WriteRune('\'') - first = false - } - } - if b.Len() == 0 { - return query - } - b.WriteString("*/") - if query == "" { - return b.String() - } - log.Debug("Injected sql comment: %s", b.String()) - b.WriteRune(' ') - b.WriteString(query) - return b.String() -} - -// Extract parses for key value attributes in a sql query injected with trace information in order to build a span context -func (c *SQLCommentCarrier) Extract() (*SpanContext, error) { - var ctx *SpanContext - // There may be multiple comments within the sql query, so we must identify which one contains trace information. - // We look at each comment until we find one that contains a traceparent - if traceComment, found := findTraceComment(c.Query); found { - var err error - if ctx, err = spanContextFromTraceComment(traceComment); err != nil { - return nil, err - } - } else { - return nil, ErrSpanContextNotFound - } - if ctx.traceID.Empty() || ctx.spanID == 0 { - return nil, ErrSpanContextNotFound - } - return ctx, nil -} - -// spanContextFromTraceComment looks for specific kv pairs in a comment containing trace information. -// It returns a span context with the appropriate attributes -func spanContextFromTraceComment(c string) (*SpanContext, error) { - var ctx SpanContext - kvs := strings.Split(c, ",") - for _, unparsedKV := range kvs { - splitKV := strings.Split(unparsedKV, "=") - if len(splitKV) != 2 { - return nil, ErrSpanContextCorrupted - } - key := splitKV[0] - value := strings.Trim(splitKV[1], "'") - switch key { - case sqlCommentTraceParent: - traceIDLower, traceIDUpper, spanID, sampled, err := decodeTraceParent(value) - if err != nil { - return nil, err - } - ctx.traceID.SetLower(traceIDLower) - ctx.traceID.SetUpper(traceIDUpper) - ctx.spanID = spanID - ctx.setSamplingPriority(sampled, samplernames.Unknown) - default: - } - } - return &ctx, nil -} - -// decodeTraceParent decodes trace parent as per the w3c trace context spec (https://www.w3.org/TR/trace-context/#version). -// this also supports decoding traceparents from open telemetry sql comments which are 128 bit -func decodeTraceParent(traceParent string) (traceIDLower uint64, traceIDUpper uint64, spanID uint64, sampled int, err error) { - if len(traceParent) < 55 { - return 0, 0, 0, 0, ErrSpanContextCorrupted - } - version := traceParent[0:2] - switch version { - case w3cContextVersion: - if traceIDUpper, err = strconv.ParseUint(traceParent[3:19], 16, 64); err != nil { - return 0, 0, 0, 0, ErrSpanContextCorrupted - } - if traceIDLower, err = strconv.ParseUint(traceParent[19:35], 16, 64); err != nil { - return 0, 0, 0, 0, ErrSpanContextCorrupted - } - if spanID, err = strconv.ParseUint(traceParent[36:52], 16, 64); err != nil { - return 0, 0, 0, 0, ErrSpanContextCorrupted - } - if sampled, err = strconv.Atoi(traceParent[53:55]); err != nil { - return 0, 0, 0, 0, ErrSpanContextCorrupted - } - default: - } - return traceIDLower, traceIDUpper, spanID, sampled, err -} - -// findTraceComment looks for a sql comment that contains trace information by looking for the keyword traceparent -func findTraceComment(query string) (traceComment string, found bool) { - startIndex := -1 - containsTrace := false - keyLength := len(sqlCommentTraceParent) - qLength := len(query) - for i := 0; i < qLength-1; { - if query[i] == '/' && query[i+1] == '*' { - // look for leading /* - startIndex = i - i += 2 - containsTrace = false - } else if query[i] == '*' && query[i+1] == '/' { - // look for closing */ - if startIndex == -1 { - // malformed comment, it did not have a leading /* - return "", false - } - if !containsTrace { - // ignore this comment, it was not a trace comment - startIndex = -1 - i += 2 - } else { - // do not return the query with the leading /* or trailing */ - return query[startIndex+2 : i], true - } - } else if !containsTrace && i+keyLength < qLength && query[i:i+keyLength] == sqlCommentTraceParent { - // look for occurrence of keyword in the query if not yet found and make sure we don't go out of range - containsTrace = true - i += keyLength - } else { - i++ - } - } - return "", false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/stats.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/stats.go deleted file mode 100644 index 575bfe7026..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/stats.go +++ /dev/null @@ -1,245 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/datadog-agent/pkg/obfuscate" - "github.com/DataDog/datadog-agent/pkg/trace/stats" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/processtags" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -// tracerObfuscationVersion indicates which version of stats obfuscation logic we implement -// In the future this can be pulled directly from our obfuscation import. -var tracerObfuscationVersion = 1 - -// defaultStatsBucketSize specifies the default span of time that will be -// covered in one stats bucket. -var defaultStatsBucketSize = (10 * time.Second).Nanoseconds() - -// concentrator aggregates and stores statistics on incoming spans in time buckets, -// flushing them occasionally to the underlying transport located in the given -// tracer config. -type concentrator struct { - // In specifies the channel to be used for feeding data to the concentrator. - // In order for In to have a consumer, the concentrator must be started using - // a call to Start. - In chan *tracerStatSpan - - // stopped reports whether the concentrator is stopped (when non-zero) - stopped uint32 - - spanConcentrator *stats.SpanConcentrator - - aggregationKey stats.PayloadAggregationKey - - wg sync.WaitGroup // waits for any active goroutines - bucketSize int64 // the size of a bucket in nanoseconds - stop chan struct{} // closing this channel triggers shutdown - cfg *config // tracer startup configuration - statsdClient internal.StatsdClient // statsd client for sending metrics. -} - -type tracerStatSpan struct { - statSpan *stats.StatSpan - origin string -} - -// newConcentrator creates a new concentrator using the given tracer -// configuration c. It creates buckets of bucketSize nanoseconds duration. -func newConcentrator(c *config, bucketSize int64, statsdClient internal.StatsdClient) *concentrator { - sCfg := &stats.SpanConcentratorConfig{ - ComputeStatsBySpanKind: true, - BucketInterval: defaultStatsBucketSize, - } - env := c.agent.defaultEnv - if c.env != "" { - env = c.env - } - if env == "" { - // We do this to avoid a panic in the stats calculation logic when env is empty - // This should never actually happen as the agent MUST have an env configured to start-up - // That panic will be removed in a future release at which point we can remove this - env = "unknown-env" - log.Debug("No DD Env found, normally the agent should have one") - } - gitCommitSha := "" - if c.ciVisibilityEnabled { - // We only have this data if we're in CI Visibility - gitCommitSha = utils.GetCITags()[constants.GitCommitSHA] - } - aggKey := stats.PayloadAggregationKey{ - Hostname: c.hostname, - Env: env, - Version: c.version, - ContainerID: "", // This intentionally left empty as the Agent will attach the container ID only in certain situations. - GitCommitSha: gitCommitSha, - ImageTag: "", - } - spanConcentrator := stats.NewSpanConcentrator(sCfg, time.Now()) - return &concentrator{ - In: make(chan *tracerStatSpan, 10000), - bucketSize: bucketSize, - stopped: 1, - cfg: c, - aggregationKey: aggKey, - spanConcentrator: spanConcentrator, - statsdClient: statsdClient, - } -} - -// alignTs returns the provided timestamp truncated to the bucket size. -// It gives us the start time of the time bucket in which such timestamp falls. -func alignTs(ts, bucketSize int64) int64 { return ts - ts%bucketSize } - -// Start starts the concentrator. A started concentrator needs to be stopped -// in order to gracefully shut down, using Stop. -func (c *concentrator) Start() { - if atomic.SwapUint32(&c.stopped, 0) == 0 { - // already running - log.Warn("(*concentrator).Start called more than once. This is likely a programming error.") - return - } - c.stop = make(chan struct{}) - c.wg.Add(1) - go func() { - defer c.wg.Done() - tick := time.NewTicker(time.Duration(c.bucketSize) * time.Nanosecond) - defer tick.Stop() - c.runFlusher(tick.C) - }() - c.wg.Add(1) - go func() { - defer c.wg.Done() - c.runIngester() - }() -} - -// runFlusher runs the flushing loop which sends stats to the underlying transport. -func (c *concentrator) runFlusher(tick <-chan time.Time) { - for { - select { - case now := <-tick: - c.flushAndSend(now, withoutCurrentBucket) - case <-c.stop: - return - } - } -} - -// statsd returns any tracer configured statsd client, or a no-op. -func (c *concentrator) statsd() internal.StatsdClient { - if c.statsdClient == nil { - return &statsd.NoOpClientDirect{} - } - return c.statsdClient -} - -// runIngester runs the loop which accepts incoming data on the concentrator's In -// channel. -func (c *concentrator) runIngester() { - for { - select { - case s := <-c.In: - c.statsd().Incr("datadog.tracer.stats.spans_in", nil, 1) - c.add(s) - case <-c.stop: - return - } - } -} - -func (c *concentrator) newTracerStatSpan(s *Span, obfuscator *obfuscate.Obfuscator) (*tracerStatSpan, bool) { - resource := s.resource - if c.shouldObfuscate() { - resource = obfuscatedResource(obfuscator, s.spanType, s.resource) - } - statSpan, ok := c.spanConcentrator.NewStatSpan(s.service, resource, - s.name, s.spanType, s.parentID, s.start, s.duration, s.error, s.meta, s.metrics, c.cfg.agent.peerTags) - if !ok { - return nil, false - } - origin := s.meta[keyOrigin] - return &tracerStatSpan{ - statSpan: statSpan, - origin: origin, - }, true -} - -func (c *concentrator) shouldObfuscate() bool { - // Obfuscate if agent reports an obfuscation version AND our version is at least as new - return c.cfg.agent.obfuscationVersion > 0 && c.cfg.agent.obfuscationVersion <= tracerObfuscationVersion -} - -// add s into the concentrator's internal stats buckets. -func (c *concentrator) add(s *tracerStatSpan) { - c.spanConcentrator.AddSpan(s.statSpan, c.aggregationKey, "", nil, s.origin) -} - -// Stop stops the concentrator and blocks until the operation completes. -func (c *concentrator) Stop() { - if atomic.SwapUint32(&c.stopped, 1) > 0 { - return - } - close(c.stop) - c.wg.Wait() -drain: - for { - select { - case s := <-c.In: - c.statsd().Incr("datadog.tracer.stats.spans_in", nil, 1) - c.add(s) - default: - break drain - } - } - c.flushAndSend(time.Now(), withCurrentBucket) -} - -const ( - withCurrentBucket = true - withoutCurrentBucket = false -) - -// flushAndSend flushes all the stats buckets with the given timestamp and sends them using the transport specified in -// the concentrator config. The current bucket is only included if includeCurrent is true, such as during shutdown. -func (c *concentrator) flushAndSend(timenow time.Time, includeCurrent bool) { - csps := c.spanConcentrator.Flush(timenow.UnixNano(), includeCurrent) - - obfVersion := 0 - if c.shouldObfuscate() { - obfVersion = tracerObfuscationVersion - } else { - log.Debug("Stats Obfuscation was skipped, agent will obfuscate (tracer %d, agent %d)", tracerObfuscationVersion, c.cfg.agent.obfuscationVersion) - } - - if len(csps) == 0 { - // nothing to flush - return - } - c.statsd().Incr("datadog.tracer.stats.flush_payloads", nil, float64(len(csps))) - flushedBuckets := 0 - // Given we use a constant PayloadAggregationKey there should only ever be 1 of these, but to be forward - // compatible in case this ever changes we can just iterate through all of them. - for _, csp := range csps { - csp.ProcessTags = processtags.GlobalTags().String() - flushedBuckets += len(csp.Stats) - if err := c.cfg.transport.sendStats(csp, obfVersion); err != nil { - c.statsd().Incr("datadog.tracer.stats.flush_errors", nil, 1) - log.Error("Error sending stats payload: %s", err.Error()) - } - } - c.statsd().Incr("datadog.tracer.stats.flush_buckets", nil, float64(flushedBuckets)) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/telemetry.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/telemetry.go deleted file mode 100644 index 159f32f58f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/telemetry.go +++ /dev/null @@ -1,129 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "fmt" - "os" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -var additionalConfigs []telemetry.Configuration - -func reportTelemetryOnAppStarted(c telemetry.Configuration) { - additionalConfigs = append(additionalConfigs, c) -} - -// startTelemetry starts the global instrumentation telemetry client with tracer data -// unless instrumentation telemetry is disabled via the DD_INSTRUMENTATION_TELEMETRY_ENABLED -// env var. -// If the telemetry client has already been started by the profiler, then -// an app-product-change event is sent with appsec information and an app-client-configuration-change -// event is sent with tracer config data. -// Note that the tracer is not considered as a standalone product by telemetry so we cannot send -// an app-product-change event for the tracer. -func startTelemetry(c *config) { - if telemetry.Disabled() { - // Do not do extra work populating config data if instrumentation telemetry is disabled. - return - } - - telemetry.ProductStarted(telemetry.NamespaceTracers) - telemetryConfigs := []telemetry.Configuration{ - {Name: "agent_feature_drop_p0s", Value: c.agent.DropP0s}, - {Name: "stats_computation_enabled", Value: c.canComputeStats()}, - {Name: "dogstatsd_port", Value: c.agent.StatsdPort}, - {Name: "lambda_mode", Value: c.logToStdout}, - {Name: "send_retries", Value: c.sendRetries}, - {Name: "retry_interval", Value: c.retryInterval}, - {Name: "trace_startup_logs_enabled", Value: c.logStartup}, - {Name: "service", Value: c.serviceName}, - {Name: "universal_version", Value: c.universalVersion}, - {Name: "env", Value: c.env}, - {Name: "version", Value: c.version}, - {Name: "trace_agent_url", Value: c.agentURL.String()}, - {Name: "agent_hostname", Value: c.hostname}, - {Name: "runtime_metrics_v2_enabled", Value: c.runtimeMetricsV2}, - {Name: "dogstatsd_addr", Value: c.dogstatsdAddr}, - {Name: "debug_stack_enabled", Value: !c.noDebugStack}, - {Name: "profiling_hotspots_enabled", Value: c.profilerHotspots}, - {Name: "profiling_endpoints_enabled", Value: c.profilerEndpoints}, - {Name: "trace_span_attribute_schema", Value: c.spanAttributeSchemaVersion}, - {Name: "trace_peer_service_defaults_enabled", Value: c.peerServiceDefaultsEnabled}, - {Name: "orchestrion_enabled", Value: c.orchestrionCfg.Enabled, Origin: telemetry.OriginCode}, - {Name: "trace_enabled", Value: c.enabled.current, Origin: c.enabled.cfgOrigin}, - {Name: "trace_log_directory", Value: c.logDirectory}, - c.traceSampleRate.toTelemetry(), - c.headerAsTags.toTelemetry(), - c.globalTags.toTelemetry(), - c.traceSampleRules.toTelemetry(), - {Name: "span_sample_rules", Value: c.spanRules}, - } - var peerServiceMapping []string - for key, value := range c.peerServiceMappings { - peerServiceMapping = append(peerServiceMapping, fmt.Sprintf("%s:%s", key, value)) - } - telemetryConfigs = append(telemetryConfigs, - telemetry.Configuration{Name: "trace_peer_service_mapping", Value: strings.Join(peerServiceMapping, ",")}) - - if chained, ok := c.propagator.(*chainedPropagator); ok { - telemetryConfigs = append(telemetryConfigs, - telemetry.Configuration{Name: "trace_propagation_style_inject", Value: chained.injectorNames}) - telemetryConfigs = append(telemetryConfigs, - telemetry.Configuration{Name: "trace_propagation_style_extract", Value: chained.extractorsNames}) - } - for k, v := range c.featureFlags { - telemetryConfigs = append(telemetryConfigs, telemetry.Configuration{Name: k, Value: v}) - } - for k, v := range c.serviceMappings { - telemetryConfigs = append(telemetryConfigs, telemetry.Configuration{Name: "service_mapping_" + k, Value: v}) - } - for k, v := range c.globalTags.get() { - telemetryConfigs = append(telemetryConfigs, telemetry.Configuration{Name: "global_tag_" + k, Value: v}) - } - rules := append(c.spanRules, c.traceRules...) - for _, rule := range rules { - var service string - var name string - if rule.Service != nil { - service = rule.Service.String() - } - if rule.Name != nil { - name = rule.Name.String() - } - telemetryConfigs = append(telemetryConfigs, - telemetry.Configuration{Name: fmt.Sprintf("sr_%s_(%s)_(%s)", rule.ruleType.String(), service, name), - Value: fmt.Sprintf("rate:%f_maxPerSecond:%f", rule.Rate, rule.MaxPerSecond)}) - } - if c.orchestrionCfg.Enabled { - telemetryConfigs = append(telemetryConfigs, telemetry.Configuration{Name: "orchestrion_version", Value: c.orchestrionCfg.Metadata.Version, Origin: telemetry.OriginCode}) - } - telemetryConfigs = append(telemetryConfigs, additionalConfigs...) - telemetry.RegisterAppConfigs(telemetryConfigs...) - cfg := telemetry.ClientConfig{ - HTTPClient: c.httpClient, - AgentURL: c.agentURL.String(), - } - if c.logToStdout || c.ciVisibilityAgentless { - cfg.APIKey = os.Getenv("DD_API_KEY") - } - client, err := telemetry.NewClient(c.serviceName, c.env, c.version, cfg) - if err != nil { - log.Debug("tracer: failed to create telemetry client: %s", err.Error()) - return - } - - if c.orchestrionCfg.Enabled { - // If orchestrion is enabled, report it to the back-end via a telemetry metric on every flush. - handle := client.Gauge(telemetry.NamespaceTracers, "orchestrion.enabled", []string{"version:" + c.orchestrionCfg.Metadata.Version}) - client.AddFlushTicker(func(_ telemetry.Client) { handle.Submit(1) }) - } - - telemetry.StartApp(client) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/textmap.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/textmap.go deleted file mode 100644 index 6190debb1b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/textmap.go +++ /dev/null @@ -1,1472 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "fmt" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "sync/atomic" - - "maps" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" -) - -// HTTPHeadersCarrier wraps an http.Header as a TextMapWriter and TextMapReader, allowing -// it to be used using the provided Propagator implementation. -type HTTPHeadersCarrier http.Header - -var _ TextMapWriter = (*HTTPHeadersCarrier)(nil) -var _ TextMapReader = (*HTTPHeadersCarrier)(nil) - -// Set implements TextMapWriter. -func (c HTTPHeadersCarrier) Set(key, val string) { - http.Header(c).Set(key, val) -} - -// ForeachKey implements TextMapReader. -func (c HTTPHeadersCarrier) ForeachKey(handler func(key, val string) error) error { - for k, vals := range c { - for _, v := range vals { - if err := handler(k, v); err != nil { - return err - } - } - } - return nil -} - -// TextMapCarrier allows the use of a regular map[string]string as both TextMapWriter -// and TextMapReader, making it compatible with the provided Propagator. -type TextMapCarrier map[string]string - -var _ TextMapWriter = (*TextMapCarrier)(nil) -var _ TextMapReader = (*TextMapCarrier)(nil) - -// Set implements TextMapWriter. -func (c TextMapCarrier) Set(key, val string) { - c[key] = val -} - -// ForeachKey conforms to the TextMapReader interface. -func (c TextMapCarrier) ForeachKey(handler func(key, val string) error) error { - for k, v := range c { - if err := handler(k, v); err != nil { - return err - } - } - return nil -} - -const ( - headerPropagationStyleInject = "DD_TRACE_PROPAGATION_STYLE_INJECT" - headerPropagationStyleExtract = "DD_TRACE_PROPAGATION_STYLE_EXTRACT" - headerPropagationStyle = "DD_TRACE_PROPAGATION_STYLE" -) - -const ( - // DefaultBaggageHeaderPrefix specifies the prefix that will be used in - // HTTP headers or text maps to prefix baggage keys. - DefaultBaggageHeaderPrefix = "ot-baggage-" - - // DefaultTraceIDHeader specifies the key that will be used in HTTP headers - // or text maps to store the trace ID. - DefaultTraceIDHeader = "x-datadog-trace-id" - - // DefaultParentIDHeader specifies the key that will be used in HTTP headers - // or text maps to store the parent ID. - DefaultParentIDHeader = "x-datadog-parent-id" - - // DefaultPriorityHeader specifies the key that will be used in HTTP headers - // or text maps to store the sampling priority value. - DefaultPriorityHeader = "x-datadog-sampling-priority" - - // DefaultBaggageHeader specifies the key that will be used in HTTP headers - // or text maps to store the baggage value. - DefaultBaggageHeader = "baggage" -) - -// originHeader specifies the name of the header indicating the origin of the trace. -// It is used with the Synthetics product and usually has the value "synthetics". -const originHeader = "x-datadog-origin" - -// traceTagsHeader holds the propagated trace tags -const traceTagsHeader = "x-datadog-tags" - -// propagationExtractMaxSize limits the total size of incoming propagated tags to parse -const propagationExtractMaxSize = 512 - -// PropagatorConfig defines the configuration for initializing a propagator. -type PropagatorConfig struct { - // BaggagePrefix specifies the prefix that will be used to store baggage - // items in a map. It defaults to DefaultBaggageHeaderPrefix. - BaggagePrefix string - - // TraceHeader specifies the map key that will be used to store the trace ID. - // It defaults to DefaultTraceIDHeader. - TraceHeader string - - // ParentHeader specifies the map key that will be used to store the parent ID. - // It defaults to DefaultParentIDHeader. - ParentHeader string - - // PriorityHeader specifies the map key that will be used to store the sampling priority. - // It defaults to DefaultPriorityHeader. - PriorityHeader string - - // MaxTagsHeaderLen specifies the maximum length of trace tags header value. - // It defaults to defaultMaxTagsHeaderLen, a value of 0 disables propagation of tags. - MaxTagsHeaderLen int - - // B3 specifies if B3 headers should be added for trace propagation. - // See https://github.com/openzipkin/b3-propagation - B3 bool - - // BaggageHeader specifies the map key that will be used to store the baggage key-value pairs. - // It defaults to DefaultBaggageHeader. - BaggageHeader string -} - -// NewPropagator returns a new propagator which uses TextMap to inject -// and extract values. It propagates trace and span IDs and baggage. -// To use the defaults, nil may be provided in place of the config. -// -// The inject and extract propagators are determined using environment variables -// with the following order of precedence: -// 1. DD_TRACE_PROPAGATION_STYLE_INJECT -// 2. DD_TRACE_PROPAGATION_STYLE (applies to both inject and extract) -// 3. If none of the above, use default values -func NewPropagator(cfg *PropagatorConfig, propagators ...Propagator) Propagator { - if cfg == nil { - cfg = new(PropagatorConfig) - } - if cfg.BaggagePrefix == "" { - cfg.BaggagePrefix = DefaultBaggageHeaderPrefix - } - if cfg.TraceHeader == "" { - cfg.TraceHeader = DefaultTraceIDHeader - } - if cfg.ParentHeader == "" { - cfg.ParentHeader = DefaultParentIDHeader - } - if cfg.PriorityHeader == "" { - cfg.PriorityHeader = DefaultPriorityHeader - } - if cfg.BaggageHeader == "" { - cfg.BaggageHeader = DefaultBaggageHeader - } - cp := new(chainedPropagator) - cp.onlyExtractFirst = internal.BoolEnv("DD_TRACE_PROPAGATION_EXTRACT_FIRST", false) - if len(propagators) > 0 { - cp.injectors = propagators - cp.extractors = propagators - return cp - } - injectorsPs := os.Getenv(headerPropagationStyleInject) - extractorsPs := os.Getenv(headerPropagationStyleExtract) - cp.injectors, cp.injectorNames = getPropagators(cfg, injectorsPs) - cp.extractors, cp.extractorsNames = getPropagators(cfg, extractorsPs) - return cp -} - -// chainedPropagator implements Propagator and applies a list of injectors and extractors. -// When injecting, all injectors are called to propagate the span context. -// When extracting, it tries each extractor, selecting the first successful one. -type chainedPropagator struct { - injectors []Propagator - extractors []Propagator - injectorNames string - extractorsNames string - onlyExtractFirst bool // value of DD_TRACE_PROPAGATION_EXTRACT_FIRST -} - -// getPropagators returns a list of propagators based on ps, which is a comma seperated -// list of propagators. If the list doesn't contain any valid values, the -// default propagator will be returned. Any invalid values in the list will log -// a warning and be ignored. -func getPropagators(cfg *PropagatorConfig, ps string) ([]Propagator, string) { - dd := &propagator{cfg} - defaultPs := []Propagator{dd, &propagatorW3c{}, &propagatorBaggage{}} - defaultPsName := "datadog,tracecontext,baggage" - if cfg.B3 { - defaultPs = append(defaultPs, &propagatorB3{}) - defaultPsName += ",b3" - } - if ps == "" { - if prop := getDDorOtelConfig("propagationStyle"); prop != "" { - ps = prop // use the generic DD_TRACE_PROPAGATION_STYLE if set - } else { - return defaultPs, defaultPsName // no env set, so use default from configuration - } - } - ps = strings.ToLower(ps) - if ps == "none" { - return nil, "" - } - var list []Propagator - var listNames []string - if cfg.B3 { - list = append(list, &propagatorB3{}) - listNames = append(listNames, "b3") - } - for _, v := range strings.Split(ps, ",") { - switch v := strings.ToLower(v); v { - case "datadog": - list = append(list, dd) - listNames = append(listNames, v) - case "tracecontext": - list = append(list, &propagatorW3c{}) - listNames = append(listNames, v) - case "baggage": - list = append(list, &propagatorBaggage{}) - listNames = append(listNames, v) - case "b3", "b3multi": - if !cfg.B3 { - // propagatorB3 hasn't already been added, add a new one. - list = append(list, &propagatorB3{}) - listNames = append(listNames, v) - } - case "b3 single header": - list = append(list, &propagatorB3SingleHeader{}) - listNames = append(listNames, v) - case "none": - log.Warn("Propagator \"none\" has no effect when combined with other propagators. " + - "To disable the propagator, set to `none`") - default: - log.Warn("unrecognized propagator: %s\n", v) - } - } - if len(list) == 0 { - return defaultPs, defaultPsName // no valid propagators, so return default - } - return list, strings.Join(listNames, ",") -} - -// Inject defines the Propagator to propagate SpanContext data -// out of the current process. The implementation propagates the -// TraceID and the current active SpanID, as well as the Span baggage. -func (p *chainedPropagator) Inject(spanCtx *SpanContext, carrier interface{}) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - for _, v := range p.injectors { - err := v.Inject(spanCtx, carrier) - if err != nil { - return err - } - } - return nil -} - -// Extract implements Propagator. This method will attempt to extract a span context -// based on the precedence order of the propagators. Generally, the first valid -// trace context that could be extracted will be returned. However, the W3C tracestate -// header value will always be extracted and stored in the local trace context even if -// a previous propagator has succeeded so long as the trace-ids match. -// Furthermore, if we have already successfully extracted a trace context and a -// subsequent trace context has conflicting trace information, such information will -// be relayed in the returned SpanContext with a SpanLink. -func (p *chainedPropagator) Extract(carrier interface{}) (*SpanContext, error) { - var ctx *SpanContext - var links []SpanLink - pendingBaggage := make(map[string]string) // used to store baggage items temporarily - - for _, v := range p.extractors { - firstExtract := (ctx == nil) // ctx stores the most recently extracted ctx across iterations; if it's nil, no extractor has run yet - extractedCtx, err := v.Extract(carrier) - - // If this is the baggage propagator, just stash its items into pendingBaggage - if _, isBaggage := v.(*propagatorBaggage); isBaggage { - if extractedCtx != nil && len(extractedCtx.baggage) > 0 { - for k, v := range extractedCtx.baggage { - pendingBaggage[k] = v - } - } - continue - } - - if firstExtract { - if err != nil { - if p.onlyExtractFirst { // Every error is relevant when we are relying on the first extractor - return nil, err - } - if err != ErrSpanContextNotFound { // We don't care about ErrSpanContextNotFound because we could find a span context in a subsequent extractor - return nil, err - } - } - if p.onlyExtractFirst { - return extractedCtx, nil - } - ctx = extractedCtx - } else { // A local trace context has already been extracted - extractedCtx2 := extractedCtx - ctx2 := ctx - - // If we can't cast to spanContext, we can't propgate tracestate or create span links - if extractedCtx2.TraceID() == ctx2.TraceID() { - if pW3C, ok := v.(*propagatorW3c); ok { - pW3C.propagateTracestate(ctx2, extractedCtx2) - // If trace IDs match but span IDs do not, use spanID from `*propagatorW3c` extractedCtx for parenting - if extractedCtx2.SpanID() != ctx2.SpanID() { - var ddCtx *SpanContext - // Grab the datadog-propagated spancontext again - if ddp := getDatadogPropagator(p); ddp != nil { - if ddSpanCtx, err := ddp.Extract(carrier); err == nil { - ddCtx = ddSpanCtx - } - } - overrideDatadogParentID(ctx2, extractedCtx2, ddCtx) - } - } - } else if extractedCtx2 != nil { // Trace IDs do not match - create span links - link := SpanLink{TraceID: extractedCtx2.TraceIDLower(), SpanID: extractedCtx2.SpanID(), TraceIDHigh: extractedCtx2.TraceIDUpper(), Attributes: map[string]string{"reason": "terminated_context", "context_headers": getPropagatorName(v)}} - if trace := extractedCtx2.trace; trace != nil { - if flags := uint32(*trace.priority); flags > 0 { // Set the flags based on the sampling priority - link.Flags = 1 - } else { - link.Flags = 0 - } - link.Tracestate = extractedCtx2.trace.propagatingTag(tracestateHeader) - } - links = append(links, link) - } - } - } - - if ctx == nil { - if len(pendingBaggage) > 0 { - ctx := &SpanContext{ - baggage: make(map[string]string, len(pendingBaggage)), - baggageOnly: true, - } - maps.Copy(ctx.baggage, pendingBaggage) - atomic.StoreUint32(&ctx.hasBaggage, 1) - return ctx, nil - } - // 0 successful extractions - return nil, ErrSpanContextNotFound - } - if len(pendingBaggage) > 0 { - if ctx.baggage == nil { - ctx.baggage = make(map[string]string, len(pendingBaggage)) - } - for k, v := range pendingBaggage { - ctx.baggage[k] = v - } - atomic.StoreUint32(&ctx.hasBaggage, 1) - } - - if len(links) > 0 { - ctx.spanLinks = links - } - log.Debug("Extracted span context: %s", ctx.safeDebugString()) - return ctx, nil -} - -func getPropagatorName(p Propagator) string { - switch p.(type) { - case *propagator: - return "datadog" - case *propagatorB3: - return "b3multi" - case *propagatorB3SingleHeader: - return "b3" - case *propagatorW3c: - return "tracecontext" - case *propagatorBaggage: - return "baggage" - default: - return "" - } -} - -// propagateTracestate will add the tracestate propagating tag to the given -// *spanContext. The W3C trace context will be extracted from the provided -// carrier. The trace id of this W3C trace context must match the trace id -// provided by the given *spanContext. If it matches, then the tracestate -// will be re-composed based on the composition of the given *spanContext, -// but will include the non-DD vendors in the W3C trace context's tracestate. -func (p *propagatorW3c) propagateTracestate(ctx *SpanContext, w3cCtx *SpanContext) { - if w3cCtx == nil { - return // It's not valid, so ignore it. - } - if ctx.TraceID() != w3cCtx.TraceID() { - return // The trace-ids must match. - } - if w3cCtx.trace == nil { - return // this shouldn't happen, since it should have a propagating tag already - } - if ctx.trace == nil { - ctx.trace = newTrace() - } - // Get the tracestate header from extracted w3C context, and propagate - // it to the span context that will be returned. - // Note: Other trace context fields like sampling priority, propagated tags, - // and origin will remain unchanged. - ts := w3cCtx.trace.propagatingTag(tracestateHeader) - priority, _ := ctx.SamplingPriority() - setPropagatingTag(ctx, tracestateHeader, composeTracestate(ctx, priority, ts)) - ctx.isRemote = (w3cCtx.isRemote) -} - -// propagator implements Propagator and injects/extracts span contexts -// using datadog headers. Only TextMap carriers are supported. -type propagator struct { - cfg *PropagatorConfig -} - -func (p *propagator) Inject(spanCtx *SpanContext, carrier interface{}) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - switch c := carrier.(type) { - case TextMapWriter: - return p.injectTextMap(spanCtx, c) - default: - return ErrInvalidCarrier - } -} - -func (p *propagator) injectTextMap(spanCtx *SpanContext, writer TextMapWriter) error { - ctx := spanCtx - if ctx.traceID.Empty() || ctx.spanID == 0 { - return ErrInvalidSpanContext - } - // propagate the TraceID and the current active SpanID - if ctx.traceID.HasUpper() { - setPropagatingTag(ctx, keyTraceID128, ctx.traceID.UpperHex()) - } else if ctx.trace != nil { - ctx.trace.unsetPropagatingTag(keyTraceID128) - } - writer.Set(p.cfg.TraceHeader, strconv.FormatUint(ctx.traceID.Lower(), 10)) - writer.Set(p.cfg.ParentHeader, strconv.FormatUint(ctx.spanID, 10)) - if sp, ok := ctx.SamplingPriority(); ok { - writer.Set(p.cfg.PriorityHeader, strconv.Itoa(sp)) - } - if ctx.origin != "" { - writer.Set(originHeader, ctx.origin) - } - ctx.ForeachBaggageItem(func(k, v string) bool { - // Propagate OpenTracing baggage. - writer.Set(p.cfg.BaggagePrefix+k, v) - return true - }) - if p.cfg.MaxTagsHeaderLen <= 0 { - return nil - } - if s := p.marshalPropagatingTags(ctx); len(s) > 0 { - writer.Set(traceTagsHeader, s) - } - return nil -} - -// marshalPropagatingTags marshals all propagating tags included in ctx to a comma separated string -func (p *propagator) marshalPropagatingTags(ctx *SpanContext) string { - var sb strings.Builder - if ctx.trace == nil { - return "" - } - - var properr string - ctx.trace.iteratePropagatingTags(func(k, v string) bool { - if k == tracestateHeader || k == traceparentHeader { - return true // don't propagate W3C headers with the DD propagator - } - if err := isValidPropagatableTag(k, v); err != nil { - log.Warn("Won't propagate tag %q: %s", k, err.Error()) - properr = "encoding_error" - return true - } - if tagLen := sb.Len() + len(k) + len(v); tagLen > p.cfg.MaxTagsHeaderLen { - sb.Reset() - log.Warn("Won't propagate tag: length is (%d) which exceeds the maximum len of (%d).", tagLen, p.cfg.MaxTagsHeaderLen) - properr = "inject_max_size" - return false - } - if sb.Len() > 0 { - sb.WriteByte(',') - } - sb.WriteString(k) - sb.WriteByte('=') - sb.WriteString(v) - return true - }) - if properr != "" { - ctx.trace.setTag(keyPropagationError, properr) - } - return sb.String() -} - -func (p *propagator) Extract(carrier interface{}) (*SpanContext, error) { - switch c := carrier.(type) { - case TextMapReader: - return p.extractTextMap(c) - default: - return nil, ErrInvalidCarrier - } -} - -func (p *propagator) extractTextMap(reader TextMapReader) (*SpanContext, error) { - var ctx SpanContext - err := reader.ForeachKey(func(k, v string) error { - var err error - key := strings.ToLower(k) - switch key { - case p.cfg.TraceHeader: - var lowerTid uint64 - lowerTid, err = parseUint64(v) - if err != nil { - return ErrSpanContextCorrupted - } - ctx.traceID.SetLower(lowerTid) - case p.cfg.ParentHeader: - ctx.spanID, err = parseUint64(v) - if err != nil { - return ErrSpanContextCorrupted - } - case p.cfg.PriorityHeader: - priority, err := strconv.Atoi(v) - if err != nil { - return ErrSpanContextCorrupted - } - ctx.setSamplingPriority(priority, samplernames.Unknown) - case originHeader: - ctx.origin = v - case traceTagsHeader: - unmarshalPropagatingTags(&ctx, v) - default: - if strings.HasPrefix(key, p.cfg.BaggagePrefix) { - ctx.setBaggageItem(strings.TrimPrefix(key, p.cfg.BaggagePrefix), v) - } - } - return nil - }) - if err != nil { - return nil, err - } - if ctx.trace != nil { - tid := ctx.trace.propagatingTag(keyTraceID128) - if err := validateTID(tid); err != nil { - log.Debug("Invalid hex traceID: %s", err.Error()) - ctx.trace.unsetPropagatingTag(keyTraceID128) - } else if err := ctx.traceID.SetUpperFromHex(tid); err != nil { - log.Debug("Attempted to set an invalid hex traceID: %s", err.Error()) - ctx.trace.unsetPropagatingTag(keyTraceID128) - } - } - if ctx.traceID.Empty() || (ctx.spanID == 0 && ctx.origin != "synthetics") { - return nil, ErrSpanContextNotFound - } - return &ctx, nil -} - -func validateTID(tid string) error { - if len(tid) != 16 { - return fmt.Errorf("invalid length: %q", tid) - } - if !isValidID(tid) { - return fmt.Errorf("malformed: %q", tid) - } - return nil -} - -// getDatadogPropagator returns the Datadog Propagator -func getDatadogPropagator(cp *chainedPropagator) *propagator { - for _, e := range cp.extractors { - p, isDatadog := (e).(*propagator) - if isDatadog { - return p - } - } - return nil -} - -// overrideDatadogParentID overrides the span ID of a context with the ID extracted from tracecontext headers. -// If the reparenting ID is not set on the context, the span ID from datadog headers is used. -// spanContexts are passed by reference to avoid copying lock value in spanContext type -func overrideDatadogParentID(ctx, w3cCtx, ddCtx *SpanContext) { - if ctx == nil || w3cCtx == nil || ddCtx == nil { - return - } - ctx.spanID = w3cCtx.spanID - if w3cCtx.reparentID != "" { - ctx.reparentID = w3cCtx.reparentID - } else { - // NIT: could be done without using fmt.Sprintf? Is it worth it? - ctx.reparentID = fmt.Sprintf("%016x", ddCtx.SpanID()) - } -} - -// unmarshalPropagatingTags unmarshals tags from v into ctx -func unmarshalPropagatingTags(ctx *SpanContext, v string) { - if ctx.trace == nil { - ctx.trace = newTrace() - } - if len(v) > propagationExtractMaxSize { - log.Warn("Did not extract %s, size limit exceeded: %d. Incoming tags will not be propagated further.", traceTagsHeader, propagationExtractMaxSize) - ctx.trace.setTag(keyPropagationError, "extract_max_size") - return - } - tags, err := parsePropagatableTraceTags(v) - if err != nil { - log.Warn("Did not extract %q: %s. Incoming tags will not be propagated further.", traceTagsHeader, err.Error()) - ctx.trace.setTag(keyPropagationError, "decoding_error") - } - ctx.trace.replacePropagatingTags(tags) -} - -// setPropagatingTag adds the key value pair to the map of propagating tags on the trace, -// creating the map if one is not initialized. -func setPropagatingTag(ctx *SpanContext, k, v string) { - if ctx.trace == nil { - // extractors initialize a new spanContext, so the trace might be nil - ctx.trace = newTrace() - } - ctx.trace.setPropagatingTag(k, v) -} - -const ( - b3TraceIDHeader = "x-b3-traceid" - b3SpanIDHeader = "x-b3-spanid" - b3SampledHeader = "x-b3-sampled" - b3SingleHeader = "b3" -) - -// propagatorB3 implements Propagator and injects/extracts span contexts -// using B3 headers. Only TextMap carriers are supported. -type propagatorB3 struct{} - -func (p *propagatorB3) Inject(spanCtx *SpanContext, carrier interface{}) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - switch c := carrier.(type) { - case TextMapWriter: - return p.injectTextMap(spanCtx, c) - default: - return ErrInvalidCarrier - } -} - -func (*propagatorB3) injectTextMap(spanCtx *SpanContext, writer TextMapWriter) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - ctx := spanCtx - if ctx.traceID.Empty() || ctx.spanID == 0 { - return ErrInvalidSpanContext - } - if !ctx.traceID.HasUpper() { // 64-bit trace id - writer.Set(b3TraceIDHeader, fmt.Sprintf("%016x", ctx.traceID.Lower())) - } else { // 128-bit trace id - writer.Set(b3TraceIDHeader, ctx.TraceID()) - } - writer.Set(b3SpanIDHeader, fmt.Sprintf("%016x", ctx.spanID)) - if p, ok := ctx.SamplingPriority(); ok { - if p >= ext.PriorityAutoKeep { - writer.Set(b3SampledHeader, "1") - } else { - writer.Set(b3SampledHeader, "0") - } - } - return nil -} - -func (p *propagatorB3) Extract(carrier interface{}) (*SpanContext, error) { - switch c := carrier.(type) { - case TextMapReader: - return p.extractTextMap(c) - default: - return nil, ErrInvalidCarrier - } -} - -func (*propagatorB3) extractTextMap(reader TextMapReader) (*SpanContext, error) { - var ctx SpanContext - err := reader.ForeachKey(func(k, v string) error { - var err error - key := strings.ToLower(k) - switch key { - case b3TraceIDHeader: - if err := extractTraceID128(&ctx, v); err != nil { - return nil - } - case b3SpanIDHeader: - ctx.spanID, err = strconv.ParseUint(v, 16, 64) - if err != nil { - return ErrSpanContextCorrupted - } - case b3SampledHeader: - priority, err := strconv.Atoi(v) - if err != nil { - return ErrSpanContextCorrupted - } - ctx.setSamplingPriority(priority, samplernames.Unknown) - default: - } - return nil - }) - if err != nil { - return nil, err - } - if ctx.traceID.Empty() || ctx.spanID == 0 { - return nil, ErrSpanContextNotFound - } - return &ctx, nil -} - -// propagatorB3 implements Propagator and injects/extracts span contexts -// using B3 headers. Only TextMap carriers are supported. -type propagatorB3SingleHeader struct{} - -func (p *propagatorB3SingleHeader) Inject(spanCtx *SpanContext, carrier interface{}) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - switch c := carrier.(type) { - case TextMapWriter: - return p.injectTextMap(spanCtx, c) - default: - return ErrInvalidCarrier - } -} - -func (*propagatorB3SingleHeader) injectTextMap(spanCtx *SpanContext, writer TextMapWriter) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - ctx := spanCtx - if ctx.traceID.Empty() || ctx.spanID == 0 { - return ErrInvalidSpanContext - } - sb := strings.Builder{} - var traceID string - if !ctx.traceID.HasUpper() { // 64-bit trace id - traceID = fmt.Sprintf("%016x", ctx.traceID.Lower()) - } else { // 128-bit trace id - traceID = ctx.TraceID() - } - sb.WriteString(fmt.Sprintf("%s-%016x", traceID, ctx.spanID)) - if p, ok := ctx.SamplingPriority(); ok { - if p >= ext.PriorityAutoKeep { - sb.WriteString("-1") - } else { - sb.WriteString("-0") - } - } - writer.Set(b3SingleHeader, sb.String()) - return nil -} - -func (p *propagatorB3SingleHeader) Extract(carrier interface{}) (*SpanContext, error) { - switch c := carrier.(type) { - case TextMapReader: - return p.extractTextMap(c) - default: - return nil, ErrInvalidCarrier - } -} - -func (*propagatorB3SingleHeader) extractTextMap(reader TextMapReader) (*SpanContext, error) { - var ctx SpanContext - err := reader.ForeachKey(func(k, v string) error { - var err error - key := strings.ToLower(k) - switch key { - case b3SingleHeader: - b3Parts := strings.Split(v, "-") - if len(b3Parts) >= 2 { - if err = extractTraceID128(&ctx, b3Parts[0]); err != nil { - return err - } - ctx.spanID, err = strconv.ParseUint(b3Parts[1], 16, 64) - if err != nil { - return ErrSpanContextCorrupted - } - if len(b3Parts) >= 3 { - switch b3Parts[2] { - case "": - break - case "1", "d": // Treat 'debug' traces as priority 1 - ctx.setSamplingPriority(ext.PriorityAutoKeep, samplernames.Unknown) - case "0": - ctx.setSamplingPriority(ext.PriorityAutoReject, samplernames.Unknown) - default: - return ErrSpanContextCorrupted - } - } - } else { - return ErrSpanContextCorrupted - } - default: - } - return nil - }) - if err != nil { - return nil, err - } - if ctx.traceID.Empty() || ctx.spanID == 0 { - return nil, ErrSpanContextNotFound - } - return &ctx, nil -} - -const ( - traceparentHeader = "traceparent" - tracestateHeader = "tracestate" -) - -// propagatorW3c implements Propagator and injects/extracts span contexts -// using W3C tracecontext/traceparent headers. Only TextMap carriers are supported. -type propagatorW3c struct{} - -func (p *propagatorW3c) Inject(spanCtx *SpanContext, carrier interface{}) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - switch c := carrier.(type) { - case TextMapWriter: - return p.injectTextMap(spanCtx, c) - default: - return ErrInvalidCarrier - } -} - -// injectTextMap propagates span context attributes into the writer, -// in the format of the traceparentHeader and tracestateHeader. -// traceparentHeader encodes W3C Trace Propagation version, 128-bit traceID, -// spanID, and a flags field, which supports 8 unique flags. -// The current specification only supports a single flag called sampled, -// which is equal to 00000001 when no other flag is present. -// tracestateHeader is a comma-separated list of list-members with a = format, -// where each list-member is managed by a vendor or instrumentation library. -func (*propagatorW3c) injectTextMap(spanCtx *SpanContext, writer TextMapWriter) error { - if spanCtx == nil { - return ErrInvalidSpanContext - } - ctx := spanCtx - if ctx.traceID.Empty() || ctx.spanID == 0 { - return ErrInvalidSpanContext - } - flags := "" - p, ok := ctx.SamplingPriority() - if ok && p >= ext.PriorityAutoKeep { - flags = "01" - } else { - flags = "00" - } - - var traceID string - if ctx.traceID.HasUpper() { - setPropagatingTag(ctx, keyTraceID128, ctx.traceID.UpperHex()) - traceID = ctx.TraceID() - } else { - traceID = fmt.Sprintf("%032x", ctx.traceID) - if ctx.trace != nil { - ctx.trace.unsetPropagatingTag(keyTraceID128) - } - } - writer.Set(traceparentHeader, fmt.Sprintf("00-%s-%016x-%v", traceID, ctx.spanID, flags)) - // if context priority / origin / tags were updated after extraction, - // or if there is a span on the trace - // or the tracestateHeader doesn't start with `dd=` - // we need to recreate tracestate - if ctx.updated || - (!ctx.isRemote || ctx.isRemote && ctx.trace != nil && ctx.trace.root != nil) || - (ctx.trace != nil && !strings.HasPrefix(ctx.trace.propagatingTag(tracestateHeader), "dd=")) || - ctx.trace.propagatingTagsLen() == 0 { - // compose a new value for the tracestate - writer.Set(tracestateHeader, composeTracestate(ctx, p, ctx.trace.propagatingTag(tracestateHeader))) - } else { - // use a cached value for the tracestate (e.g., no updating p: key) - writer.Set(tracestateHeader, ctx.trace.propagatingTag(tracestateHeader)) - } - return nil -} - -// stringMutator maps characters in a string to new characters. It is a state machine intended -// to replace regex patterns for simple character replacement, including collapsing runs of a -// specific range. -// -// It's designed after the `hash#Hash` interface, and to work with `strings.Map`. -type stringMutator struct { - // n is the current state of the mutator. It is used to track runs of characters that should - // be collapsed. - n bool - // fn is the function that implements the character replacement logic. - // It returns the rune to use as replacement and a bool to tell if next consecutive - // characters must be dropped if they fall in the currently matched character set. - // It's possible to return `-1` to immediately drop the current rune. - // - // This logic allows for: - // - Replace only the current rune: return , false - // - Drop only the current rune: return -1, false - // - Replace the current rune and drop the next consecutive runes if they match the same case: return , true - // - Drop all the consecutive runes matching the same case as the current one: return -1, true - // - // A known limitation is that we can only support a single case of consecutive runes. - fn func(rune) (rune, bool) -} - -// Mutate the mapped string using `strings.Map` and the provided function implementing the character -// replacement logic. -func (sm *stringMutator) Mutate(fn func(rune) (rune, bool), s string) string { - sm.fn = fn - rs := strings.Map(sm.mapping, s) - sm.reset() - - return rs -} - -func (sm *stringMutator) mapping(r rune) rune { - v, dropConsecutiveMatches := sm.fn(r) - if v < 0 { - // We reset the state machine in any match that is not related to a consecutive run - sm.reset() - return -1 - } - if dropConsecutiveMatches { - if !sm.n { - sm.n = true - return v - } - return -1 - } - // We reset the state machine in any match that is not related to a consecutive run - sm.reset() - return v -} - -// reset resets the state of the mutator. -func (sm *stringMutator) reset() { - sm.n = false -} - -var ( - // keyDisallowedFn is used to sanitize the keys of the datadog propagating tags. - // Disallowed characters are comma (reserved as a list-member separator), - // equals (reserved for list-member key-value separator), - // space and characters outside the ASCII range 0x20 to 0x7E. - // Disallowed characters must be replaced with the underscore. - // Equivalent to regexp.MustCompile(",|=|[^\\x20-\\x7E]+") - keyDisallowedFn = func(r rune) (rune, bool) { - switch { - case r == ',' || r == '=': - return '_', false - case r < 0x20 || r > 0x7E: - return '_', true - } - return r, false - } - - // valueDisallowedFn is used to sanitize the values of the datadog propagating tags. - // Disallowed characters are comma (reserved as a list-member separator), - // semi-colon (reserved for separator between entries in the dd list-member), - // tilde (reserved, will represent 0x3D (equals) in the encoded tag value, - // and characters outside the ASCII range 0x20 to 0x7E. - // Equals character must be encoded with a tilde. - // Other disallowed characters must be replaced with the underscore. - // Equivalent to regexp.MustCompile(",|;|~|[^\\x20-\\x7E]+") - valueDisallowedFn = func(r rune) (rune, bool) { - switch { - case r == '=': - return '~', false - case r == ',' || r == '~' || r == ';': - return '_', false - case r < 0x20 || r > 0x7E: - return '_', true - } - return r, false - } - - // originDisallowedFn is used to sanitize the value of the datadog origin tag. - // Disallowed characters are comma (reserved as a list-member separator), - // semi-colon (reserved for separator between entries in the dd list-member), - // equals (reserved for list-member key-value separator), - // and characters outside the ASCII range 0x21 to 0x7E. - // Equals character must be encoded with a tilde. - // Other disallowed characters must be replaced with the underscore. - // Equivalent to regexp.MustCompile(",|~|;|[^\\x21-\\x7E]+") - originDisallowedFn = func(r rune) (rune, bool) { - switch { - case r == '=': - return '~', false - case r == ',' || r == '~' || r == ';': - return '_', false - case r < 0x21 || r > 0x7E: - return '_', true - } - return r, false - } -) - -const ( - asciiLowerA = 97 - asciiLowerF = 102 - asciiZero = 48 - asciiNine = 57 -) - -// isValidID is used to verify that the input is a valid hex string. -// This is an equivalent check to the regexp ^[a-f0-9]+$ -// In benchmarks, this function is roughly 10x faster than the equivalent -// regexp, which is why we split it out. -// isValidID is applicable for both trace and span IDs. -func isValidID(id string) bool { - if len(id) == 0 { - return false - } - - for _, c := range id { - ascii := int(c) - if ascii < asciiZero || ascii > asciiLowerF || (ascii > asciiNine && ascii < asciiLowerA) { - return false - } - } - - return true -} - -// composeTracestate creates a tracestateHeader from the spancontext. -// The Datadog tracing library is only responsible for managing the list member with key dd, -// which holds the values of the sampling decision(`s:`), origin(`o:`), -// the last parent ID of a Datadog span (`p:`), -// and propagated tags prefixed with `t.`(e.g. _dd.p.usr.id:usr_id tag will become `t.usr.id:usr_id`). -func composeTracestate(ctx *SpanContext, priority int, oldState string) string { - var ( - b strings.Builder - sm = &stringMutator{} - ) - - b.Grow(128) - b.WriteString("dd=s:") - b.WriteString(strconv.Itoa(priority)) - listLength := 1 - - if ctx.origin != "" { - oWithSub := sm.Mutate(originDisallowedFn, ctx.origin) - b.WriteString(";o:") - b.WriteString(oWithSub) - } - - // if the context is remote and there is a reparentID, set p as reparentId - // if the context is remote and there is no reparentID, don't set p - // if the context is not remote, set p as context.spanId - // this ID can be used by downstream tracers to set a _dd.parent_id tag - // to allow the backend to reparent orphaned spans if necessary - if !ctx.isRemote { - b.WriteString(";p:") - b.WriteString(spanIDHexEncoded(ctx.SpanID(), 16)) - } else if ctx.reparentID != "" { - b.WriteString(";p:") - b.WriteString(ctx.reparentID) - } - - ctx.trace.iteratePropagatingTags(func(k, v string) bool { - if !strings.HasPrefix(k, "_dd.p.") { - return true - } - // Datadog propagating tags must be appended to the tracestateHeader - // with the `t.` prefix. Tag value must have all `=` signs replaced with a tilde (`~`). - key := sm.Mutate(keyDisallowedFn, k[len("_dd.p."):]) - value := sm.Mutate(valueDisallowedFn, v) - if b.Len()+len(key)+len(value)+4 > 256 { // the +4 here is to account for the `t.` prefix, the `;` needed between the tags, and the `:` between the key and value - return false - } - b.WriteString(";t.") - b.WriteString(key) - b.WriteString(":") - b.WriteString(value) - return true - }) - // the old state is split by vendors, must be concatenated with a `,` - if len(oldState) == 0 { - return b.String() - } - for _, s := range strings.Split(strings.Trim(oldState, " \t"), ",") { - if strings.HasPrefix(s, "dd=") { - continue - } - listLength++ - // if the resulting tracestateHeader exceeds 32 list-members, - // remove the rightmost list-member(s) - if listLength > 32 { - break - } - b.WriteString(",") - b.WriteString(strings.Trim(s, " \t")) - } - return b.String() -} - -func (p *propagatorW3c) Extract(carrier interface{}) (*SpanContext, error) { - switch c := carrier.(type) { - case TextMapReader: - return p.extractTextMap(c) - default: - return nil, ErrInvalidCarrier - } -} - -func (*propagatorW3c) extractTextMap(reader TextMapReader) (*SpanContext, error) { - var parentHeader string - var stateHeader string - var ctx SpanContext - ctx.isRemote = true - // to avoid parsing tracestate header(s) if traceparent is invalid - if err := reader.ForeachKey(func(k, v string) error { - key := strings.ToLower(k) - switch key { - case traceparentHeader: - if parentHeader != "" { - return ErrSpanContextCorrupted - } - parentHeader = v - case tracestateHeader: - stateHeader = v - default: - if strings.HasPrefix(key, DefaultBaggageHeaderPrefix) { - ctx.setBaggageItem(strings.TrimPrefix(key, DefaultBaggageHeaderPrefix), v) - } - } - return nil - }); err != nil { - return nil, err - } - if err := parseTraceparent(&ctx, parentHeader); err != nil { - return nil, err - } - parseTracestate(&ctx, stateHeader) - return &ctx, nil -} - -// parseTraceparent attempts to parse traceparentHeader which describes the position -// of the incoming request in its trace graph in a portable, fixed-length format. -// The format of the traceparentHeader is `-` separated string with in the -// following format: `version-traceId-spanID-flags`, with an optional `-` if version > 0. -// where: -// - version - represents the version of the W3C Tracecontext Propagation format in hex format. -// - traceId - represents the propagated traceID in the format of 32 hex-encoded digits. -// - spanID - represents the propagated spanID (parentID) in the format of 16 hex-encoded digits. -// - flags - represents the propagated flags in the format of 2 hex-encoded digits, and supports 8 unique flags. -// Example value of HTTP `traceparent` header: `00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01`, -// Currently, Go tracer doesn't support 128-bit traceIDs, so the full traceID (32 hex-encoded digits) must be -// stored into a field that is accessible from the span's context. TraceId will be parsed from the least significant 16 -// hex-encoded digits into a 64-bit number. -func parseTraceparent(ctx *SpanContext, header string) error { - nonWordCutset := "_-\t \n" - header = strings.ToLower(strings.Trim(header, "\t -")) - headerLen := len(header) - if headerLen == 0 { - return ErrSpanContextNotFound - } - if headerLen < 55 { - return ErrSpanContextCorrupted - } - parts := strings.SplitN(header, "-", 5) // 5 because we expect 4 required + 1 optional substrings - if len(parts) < 4 { - return ErrSpanContextCorrupted - } - version := strings.Trim(parts[0], nonWordCutset) - if len(version) != 2 { - return ErrSpanContextCorrupted - } - v, err := strconv.ParseUint(version, 16, 64) - if err != nil || v == 255 { - // version 255 (0xff) is invalid - return ErrSpanContextCorrupted - } - if v == 0 && headerLen != 55 { - // The header length in v0 has to be 55. - // It's allowed to be longer in other versions. - return ErrSpanContextCorrupted - } - // parsing traceID - fullTraceID := strings.Trim(parts[1], nonWordCutset) - if len(fullTraceID) != 32 { - return ErrSpanContextCorrupted - } - // checking that the entire TraceID is a valid hex string - if !isValidID(fullTraceID) { - return ErrSpanContextCorrupted - } - if ctx.trace != nil { - // Ensure that the 128-bit trace id tag doesn't propagate - ctx.trace.unsetPropagatingTag(keyTraceID128) - } - if err := extractTraceID128(ctx, fullTraceID); err != nil { - return err - } - // parsing spanID - spanID := strings.Trim(parts[2], nonWordCutset) - if len(spanID) != 16 { - return ErrSpanContextCorrupted - } - if !isValidID(spanID) { - return ErrSpanContextCorrupted - } - if ctx.spanID, err = strconv.ParseUint(spanID, 16, 64); err != nil { - return ErrSpanContextCorrupted - } - if ctx.spanID == 0 { - return ErrSpanContextNotFound - } - // parsing flags - flags := parts[3] - f, err := strconv.ParseInt(flags, 16, 8) - if err != nil { - return ErrSpanContextCorrupted - } - ctx.setSamplingPriority(int(f)&0x1, samplernames.Unknown) - return nil -} - -// parseTracestate attempts to parse tracestateHeader which is a list -// with up to 32 comma-separated (,) list-members. -// An example value would be: `vendorname1=opaqueValue1,vendorname2=opaqueValue2,dd=s:1;o:synthetics`, -// Where `dd` list contains values that would be in x-datadog-tags as well as those needed for propagation information. -// The keys to the "dd" values have been shortened as follows to save space: -// `sampling_priority` = `s` -// `origin` = `o` -// `last parent` = `p` -// `_dd.p.` prefix = `t.` -func parseTracestate(ctx *SpanContext, header string) { - if header == "" { - // The W3C spec says tracestate can be empty but should avoid sending it. - // https://www.w3.org/TR/trace-context-1/#tracestate-header-field-values - return - } - // if multiple headers are present, they must be combined and stored - setPropagatingTag(ctx, tracestateHeader, header) - combined := strings.Split(strings.Trim(header, "\t "), ",") - for _, group := range combined { - if !strings.HasPrefix(group, "dd=") { - continue - } - ddMembers := strings.Split(group[len("dd="):], ";") - dropDM := false - // indicate that backend could reparent this as a root - for _, member := range ddMembers { - keyVal := strings.SplitN(member, ":", 2) - if len(keyVal) != 2 { - continue - } - key, val := keyVal[0], keyVal[1] - if key == "o" { - ctx.origin = strings.ReplaceAll(val, "~", "=") - } else if key == "s" { - stateP, err := strconv.Atoi(val) - if err != nil { - // If the tracestate priority is absent, - // we rely on the traceparent sampled flag - // set in the parseTraceparent function. - continue - } - // The sampling priority and decision maker values are set based on - // the specification in the internal W3C context propagation RFC. - // See the document for more details. - parentP, _ := ctx.SamplingPriority() - if (parentP == 1 && stateP > 0) || (parentP == 0 && stateP <= 0) { - // As extracted from tracestate - ctx.setSamplingPriority(stateP, samplernames.Unknown) - } - if parentP == 1 && stateP <= 0 { - // Auto keep (1) and set the decision maker to default - ctx.setSamplingPriority(ext.PriorityAutoKeep, samplernames.Default) - } - if parentP == 0 && stateP > 0 { - // Auto drop (0) and drop the decision maker - ctx.setSamplingPriority(ext.PriorityAutoReject, samplernames.Unknown) - dropDM = true - } - } else if key == "p" { - ctx.reparentID = val - } else if strings.HasPrefix(key, "t.dm") { - if ctx.trace.hasPropagatingTag(keyDecisionMaker) || dropDM { - continue - } - setPropagatingTag(ctx, keyDecisionMaker, val) - } else if strings.HasPrefix(key, "t.") { - keySuffix := key[len("t."):] - val = strings.ReplaceAll(val, "~", "=") - setPropagatingTag(ctx, "_dd.p."+keySuffix, val) - } - } - } -} - -// extractTraceID128 extracts the trace id from v and populates the traceID -// field, and the traceID128 field (if applicable) of the provided ctx, -// returning an error if v is invalid. -func extractTraceID128(ctx *SpanContext, v string) error { - if len(v) > 32 { - v = v[len(v)-32:] - } - v = strings.TrimLeft(v, "0") - var err error - if len(v) <= 16 { // 64-bit trace id - var tid uint64 - tid, err = strconv.ParseUint(v, 16, 64) - ctx.traceID.SetLower(tid) - } else { // 128-bit trace id - idUpper := v[:len(v)-16] - ctx.traceID.SetUpperFromHex(idUpper) - var l uint64 - l, err = strconv.ParseUint(v[len(idUpper):], 16, 64) - ctx.traceID.SetLower(l) - } - if err != nil { - return ErrSpanContextCorrupted - } - return nil -} - -const ( - baggageMaxItems = 64 - baggageMaxBytes = 8192 - safeCharactersKey = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'*+-.^_`|~" - safeCharactersValue = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&'()*+-./:<>?@[]^_`{|}~" -) - -// encodeKey encodes a key with the specified safe characters -func encodeKey(key string) string { - return urlEncode(strings.TrimSpace(key), safeCharactersKey) -} - -// encodeValue encodes a value with the specified safe characters -func encodeValue(value string) string { - return urlEncode(strings.TrimSpace(value), safeCharactersValue) -} - -// urlEncode performs percent-encoding while respecting the safe characters -func urlEncode(input string, safeCharacters string) string { - var encoded strings.Builder - for _, c := range input { - if strings.ContainsRune(safeCharacters, c) { - encoded.WriteRune(c) - } else { - encoded.WriteString(url.QueryEscape(string(c))) - } - } - return encoded.String() -} - -// propagatorBaggage implements Propagator and injects/extracts span contexts -// using baggage headers. -type propagatorBaggage struct{} - -func (p *propagatorBaggage) Inject(spanCtx *SpanContext, carrier interface{}) error { - switch c := carrier.(type) { - case TextMapWriter: - return p.injectTextMap(spanCtx, c) - default: - return ErrInvalidCarrier - } -} - -// injectTextMap propagates baggage items from the span context into the writer, -// in the format of a single HTTP "baggage" header. Baggage consists of key=value pairs, -// separated by commas. This function enforces a maximum number of baggage items and a maximum overall size. -// If either limit is exceeded, excess items or bytes are dropped, and a warning is logged. -// -// Example of a single "baggage" header: -// baggage: foo=bar,baz=qux -// -// Each key and value pair is encoded and added to the existing baggage header in = format, -// joined together by commas, -func (*propagatorBaggage) injectTextMap(ctx *SpanContext, writer TextMapWriter) error { - if ctx == nil { - return nil - } - - ctr := 0 - var baggageBuilder strings.Builder - ctx.ForeachBaggageItem(func(k, v string) bool { - if ctr >= baggageMaxItems { - return false - } - - var itemBuilder strings.Builder - if ctr > 0 { - itemBuilder.WriteRune(',') - } - - itemBuilder.WriteString(encodeKey(k)) - itemBuilder.WriteRune('=') - itemBuilder.WriteString(encodeValue(v)) - if itemBuilder.Len()+baggageBuilder.Len() > baggageMaxBytes { - return false - } - baggageBuilder.WriteString(itemBuilder.String()) - ctr++ - return true - }) - if baggageBuilder.Len() > 0 { - writer.Set("baggage", baggageBuilder.String()) - } - return nil -} - -func (p *propagatorBaggage) Extract(carrier interface{}) (*SpanContext, error) { - switch c := carrier.(type) { - case TextMapReader: - return p.extractTextMap(c) - default: - return nil, ErrInvalidCarrier - } -} - -func (*propagatorBaggage) extractTextMap(reader TextMapReader) (*SpanContext, error) { - var baggageHeader string - var ctx SpanContext - err := reader.ForeachKey(func(k, v string) error { - if strings.ToLower(k) == "baggage" { - // Expect only one baggage header, return early - baggageHeader = v - return nil - } - return nil - }) - if err != nil { - return nil, err - } - - if baggageHeader == "" { - return &ctx, nil - } - - parts := strings.Split(baggageHeader, ",") - - // 1) validation & single-trim pass - for i, kv := range parts { - k, v, ok := strings.Cut(kv, "=") - trimmedK := strings.TrimSpace(k) - trimmedV := strings.TrimSpace(v) - if !ok || trimmedK == "" || trimmedV == "" { - log.Warn("invalid baggage item: %q, dropping entire header", kv) - return &ctx, nil - } - // store back the trimmed pair so we don't re-trim below - parts[i] = trimmedK + "=" + trimmedV - } - - // 2) safe to URL-decode & apply - for _, kv := range parts { - rawK, rawV, _ := strings.Cut(kv, "=") - key, _ := url.QueryUnescape(rawK) - val, _ := url.QueryUnescape(rawV) - ctx.setBaggageItem(key, val) - } - - return &ctx, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time.go deleted file mode 100644 index 3afe8fb18c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time.go +++ /dev/null @@ -1,17 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:build !windows -// +build !windows - -package tracer - -import "time" - -// nowTime returns the current time, as computed by Time.Now(). -var nowTime = func() time.Time { return time.Now() } - -// now returns the current UNIX time in nanoseconds, as computed by Time.UnixNano(). -var now = func() int64 { return time.Now().UnixNano() } diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time_windows.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time_windows.go deleted file mode 100644 index a4993c9686..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/time_windows.go +++ /dev/null @@ -1,48 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "time" - - "golang.org/x/sys/windows" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// This method is more precise than the go1.8 time.Now on Windows -// See https://msdn.microsoft.com/en-us/library/windows/desktop/hh706895(v=vs.85).aspx -// It is however ~10x slower and requires Windows 8+. -func highPrecisionNow() int64 { - var ft windows.Filetime - windows.GetSystemTimePreciseAsFileTime(&ft) - return ft.Nanoseconds() -} - -func lowPrecisionNow() int64 { - return time.Now().UnixNano() -} - -// We use this method of initializing now over an init function due to dependency issues. The init -// function may run after other declarations, such as that in payload_test:19, which results in a -// nil dereference panic. -var now func() int64 = func() func() int64 { - if err := windows.LoadGetSystemTimePreciseAsFileTime(); err != nil { - log.Warn("Unable to load high precision timer, defaulting to time.Now()") - return lowPrecisionNow - } else { - return highPrecisionNow - } -}() - -var nowTime func() time.Time = func() func() time.Time { - if err := windows.LoadGetSystemTimePreciseAsFileTime(); err != nil { - log.Warn("Unable to load high precision timer, defaulting to time.Now()") - return func() time.Time { return time.Unix(0, lowPrecisionNow()) } - } else { - return func() time.Time { return time.Unix(0, highPrecisionNow()) } - } -}() diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer.go deleted file mode 100644 index 89bc0c579b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer.go +++ /dev/null @@ -1,1021 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - gocontext "context" - "encoding/binary" - "fmt" - "log/slog" - "math" - "os" - "runtime/pprof" - rt "runtime/trace" - "strconv" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats" - globalinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/appsec" - appsecConfig "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/datastreams" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/remoteconfig" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/traceprof" - "github.com/DataDog/dd-trace-go/v2/internal/version" - "github.com/google/uuid" - - "github.com/DataDog/datadog-agent/pkg/obfuscate" - "github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics" -) - -type TracerConf struct { //nolint:revive - CanComputeStats bool - CanDropP0s bool - DebugAbandonedSpans bool - Disabled bool - PartialFlush bool - PartialFlushMinSpans int - PeerServiceDefaults bool - PeerServiceMappings map[string]string - EnvTag string - VersionTag string - ServiceTag string - TracingAsTransport bool -} - -// Tracer specifies an implementation of the Datadog tracer which allows starting -// and propagating spans. The official implementation if exposed as functions -// within the "tracer" package. -type Tracer interface { - // StartSpan starts a span with the given operation name and options. - StartSpan(operationName string, opts ...StartSpanOption) *Span - - // Extract extracts a span context from a given carrier. Note that baggage item - // keys will always be lower-cased to maintain consistency. It is impossible to - // maintain the original casing due to MIME header canonicalization standards. - Extract(carrier interface{}) (*SpanContext, error) - - // Inject injects a span context into the given carrier. - Inject(context *SpanContext, carrier interface{}) error - - // TracerConf returns a snapshot of the current configuration of the tracer. - TracerConf() TracerConf - - // Flush flushes any buffered traces. Flush is in effect only if a tracer - // is started. Users do not have to call Flush in order to ensure that - // traces reach Datadog. It is a convenience method dedicated to specific - // use cases. - Flush() - - // Stop stops the tracer. Calls to Stop should be idempotent. - Stop() -} - -var _ Tracer = (*tracer)(nil) - -// tracer creates, buffers and submits Spans which are used to time blocks of -// computation. They are accumulated and streamed into an internal payload, -// which is flushed to the agent whenever its size exceeds a specific threshold -// or when a certain interval of time has passed, whichever happens first. -// -// tracer operates based on a worker loop which responds to various request -// channels. It additionally holds two buffers which accumulates error and trace -// queues to be processed by the payload encoder. -type tracer struct { - config *config - - // stats specifies the concentrator used to compute statistics, when client-side - // stats are enabled. - stats *concentrator - - // traceWriter is responsible for sending finished traces to their - // destination, such as the Trace Agent or Datadog Forwarder. - traceWriter traceWriter - - // out receives chunk with spans to be added to the payload. - out chan *chunk - - // flush receives a channel onto which it will confirm after a flush has been - // triggered and completed. - flush chan chan<- struct{} - - // stop causes the tracer to shut down when closed. - stop chan struct{} - - // stopOnce ensures the tracer is stopped exactly once. - stopOnce sync.Once - - // wg waits for all goroutines to exit when stopping. - wg sync.WaitGroup - - // These maps count the spans started and finished from - // each component, including contribs and "manual" spans. - spansStarted, spansFinished globalinternal.XSyncMapCounterMap - - // Keeps track of the total number of traces dropped for accurate logging. - totalTracesDropped uint32 - - logDroppedTraces *time.Ticker - - // prioritySampling holds an instance of the priority sampler. - prioritySampling *prioritySampler - - // pid of the process - pid int - - // rulesSampling holds an instance of the rules sampler used to apply either trace sampling, - // or single span sampling rules on spans. These are user-defined - // rules for applying a sampling rate to spans that match the designated service - // or operation name. - rulesSampling *rulesSampler - - // obfuscator holds the obfuscator used to obfuscate resources in aggregated stats. - // obfuscator may be nil if disabled. - obfuscator *obfuscate.Obfuscator - - // statsd is used for tracking metrics associated with the runtime and the tracer. - statsd globalinternal.StatsdClient - - // dataStreams processes data streams monitoring information - dataStreams *datastreams.Processor - - // abandonedSpansDebugger specifies where and how potentially abandoned spans are stored - // when abandoned spans debugging is enabled. - abandonedSpansDebugger *abandonedSpansDebugger - - // logFile contains a pointer to the file for writing tracer logs along with helper functionality for closing the file - // logFile is closed when tracer stops - // by default, tracer logs to stderr and this setting is unused - logFile *log.ManagedFile - - // runtimeMetrics is submitting runtime metrics to the agent using statsd. - runtimeMetrics *runtimemetrics.Emitter -} - -const ( - // flushInterval is the interval at which the payload contents will be flushed - // to the transport. - flushInterval = 2 * time.Second - - // payloadMaxLimit is the maximum payload size allowed and should indicate the - // maximum size of the package that the agent can receive. - payloadMaxLimit = 9.5 * 1024 * 1024 // 9.5 MB - - // payloadSizeLimit specifies the maximum allowed size of the payload before - // it will trigger a flush to the transport. - payloadSizeLimit = payloadMaxLimit / 2 - - // concurrentConnectionLimit specifies the maximum number of concurrent outgoing - // connections allowed. - concurrentConnectionLimit = 100 -) - -// statsInterval is the interval at which health metrics will be sent with the -// statsd client; replaced in tests. -var statsInterval = 10 * time.Second - -// Start starts the tracer with the given set of options. It will stop and replace -// any running tracer, meaning that calling it several times will result in a restart -// of the tracer by replacing the current instance with a new one. -func Start(opts ...StartOption) error { - defer func(now time.Time) { - telemetry.Distribution(telemetry.NamespaceGeneral, "init_time", nil).Submit(float64(time.Since(now).Milliseconds())) - }(time.Now()) - t, err := newTracer(opts...) - if err != nil { - return err - } - if !t.config.enabled.current { - // TODO: instrumentation telemetry client won't get started - // if tracing is disabled, but we still want to capture this - // telemetry information. Will be fixed when the tracer and profiler - // share control of the global telemetry client. - return nil - } - setGlobalTracer(t) - if t.config.logStartup { - logStartup(t) - } - if t.dataStreams != nil { - t.dataStreams.Start() - } - if t.config.ciVisibilityAgentless { - // CI Visibility agentless mode doesn't require remote configuration. - - // start instrumentation telemetry unless it is disabled through the - // DD_INSTRUMENTATION_TELEMETRY_ENABLED env var - startTelemetry(t.config) - - globalinternal.SetTracerInitialized(true) - return nil - } - - // Start AppSec with remote configuration - cfg := remoteconfig.DefaultClientConfig() - cfg.AgentURL = t.config.agentURL.String() - cfg.AppVersion = t.config.version - cfg.Env = t.config.env - cfg.HTTP = t.config.httpClient - cfg.ServiceName = t.config.serviceName - if err := t.startRemoteConfig(cfg); err != nil { - log.Warn("Remote config startup error: %s", err.Error()) - } - - // appsec.Start() may use the telemetry client to report activation, so it is - // important this happens _AFTER_ startTelemetry() has been called, so the - // client is appropriately configured. - appsecopts := make([]appsecConfig.StartOption, 0, len(t.config.appsecStartOptions)+1) - appsecopts = append(appsecopts, t.config.appsecStartOptions...) - appsecopts = append(appsecopts, appsecConfig.WithRCConfig(cfg), appsecConfig.WithMetaStructAvailable(t.config.agent.metaStructAvailable)) - - appsec.Start(appsecopts...) - - // start instrumentation telemetry unless it is disabled through the - // DD_INSTRUMENTATION_TELEMETRY_ENABLED env var - startTelemetry(t.config) - - // store the configuration in an in-memory file, allowing it to be read to - // determine if the process is instrumented with a tracer and to retrive - // relevant tracing information. - storeConfig(t.config) - - globalinternal.SetTracerInitialized(true) - return nil -} - -func storeConfig(c *config) { - uuid, _ := uuid.NewRandom() - name := fmt.Sprintf("datadog-tracer-info-%s", uuid.String()[0:8]) - - metadata := Metadata{ - SchemaVersion: 1, - RuntimeID: globalconfig.RuntimeID(), - Language: "go", - Version: version.Tag, - Hostname: c.hostname, - ServiceName: c.serviceName, - ServiceEnvironment: c.env, - ServiceVersion: c.version, - } - - data, _ := metadata.MarshalMsg(nil) - _, err := globalinternal.CreateMemfd(name, data) - if err != nil { - log.Error("failed to store the configuration: %s", err.Error()) - } -} - -// Stop stops the started tracer. Subsequent calls are valid but become no-op. -func Stop() { - setGlobalTracer(&NoopTracer{}) - globalinternal.SetTracerInitialized(false) - log.Flush() -} - -// StartSpan starts a new span with the given operation name and set of options. -// If the tracer is not started, calling this function is a no-op. -func StartSpan(operationName string, opts ...StartSpanOption) *Span { - return getGlobalTracer().StartSpan(operationName, opts...) -} - -// Extract extracts a SpanContext from the carrier. The carrier is expected -// to implement TextMapReader, otherwise an error is returned. -// If the tracer is not started, calling this function is a no-op. -func Extract(carrier interface{}) (*SpanContext, error) { - return getGlobalTracer().Extract(carrier) -} - -// Inject injects the given SpanContext into the carrier. The carrier is -// expected to implement TextMapWriter, otherwise an error is returned. -// If the tracer is not started, calling this function is a no-op. -func Inject(ctx *SpanContext, carrier interface{}) error { - return getGlobalTracer().Inject(ctx, carrier) -} - -// SetUser associates user information to the current trace which the -// provided span belongs to. The options can be used to tune which user -// bit of information gets monitored. In case of distributed traces, -// the user id can be propagated across traces using the WithPropagation() option. -// See https://docs.datadoghq.com/security_platform/application_security/setup_and_configure/?tab=set_user#add-user-information-to-traces -func SetUser(s *Span, id string, opts ...UserMonitoringOption) { - if s == nil { - return - } - s.SetUser(id, opts...) -} - -// payloadQueueSize is the buffer size of the trace channel. -const payloadQueueSize = 1000 - -func newUnstartedTracer(opts ...StartOption) (*tracer, error) { - c, err := newConfig(opts...) - if err != nil { - return nil, err - } - sampler := newPrioritySampler() - statsd, err := newStatsdClient(c) - if err != nil { - log.Error("Runtime and health metrics disabled: %s", err.Error()) - return nil, fmt.Errorf("could not initialize statsd client: %s", err.Error()) - } - var writer traceWriter - if c.ciVisibilityEnabled { - writer = newCiVisibilityTraceWriter(c) - } else if c.logToStdout { - writer = newLogTraceWriter(c, statsd) - } else { - writer = newAgentTraceWriter(c, sampler, statsd) - } - traces, spans, err := samplingRulesFromEnv() - if err != nil { - log.Warn("DIAGNOSTICS Error(s) parsing sampling rules: found errors: %s", err.Error()) - return nil, fmt.Errorf("found errors when parsing sampling rules: %w", err) - } - if traces != nil { - c.traceRules = traces - } - if spans != nil { - c.spanRules = spans - } - - rulesSampler := newRulesSampler(c.traceRules, c.spanRules, c.globalSampleRate, c.traceRateLimitPerSecond) - c.traceSampleRate = newDynamicConfig("trace_sample_rate", c.globalSampleRate, rulesSampler.traces.setGlobalSampleRate, equal[float64]) - // If globalSampleRate returns NaN, it means the environment variable was not set or valid. - // We could always set the origin to "env_var" inconditionally, but then it wouldn't be possible - // to distinguish between the case where the environment variable was not set and the case where - // it default to NaN. - if !math.IsNaN(c.globalSampleRate) { - c.traceSampleRate.cfgOrigin = telemetry.OriginEnvVar - } - c.traceSampleRules = newDynamicConfig("trace_sample_rules", c.traceRules, - rulesSampler.traces.setTraceSampleRules, EqualsFalseNegative) - var dataStreamsProcessor *datastreams.Processor - if c.dataStreamsMonitoringEnabled { - dataStreamsProcessor = datastreams.NewProcessor(statsd, c.env, c.serviceName, c.version, c.agentURL, c.httpClient) - } - var logFile *log.ManagedFile - if v := c.logDirectory; v != "" { - logFile, err = log.OpenFileAtPath(v) - if err != nil { - log.Warn("%s", err.Error()) - c.logDirectory = "" - } - } - t := &tracer{ - config: c, - traceWriter: writer, - out: make(chan *chunk, payloadQueueSize), - stop: make(chan struct{}), - flush: make(chan chan<- struct{}), - rulesSampling: rulesSampler, - prioritySampling: sampler, - pid: os.Getpid(), - logDroppedTraces: time.NewTicker(1 * time.Second), - stats: newConcentrator(c, defaultStatsBucketSize, statsd), - spansStarted: *globalinternal.NewXSyncMapCounterMap(), - spansFinished: *globalinternal.NewXSyncMapCounterMap(), - obfuscator: obfuscate.NewObfuscator(obfuscate.Config{ - SQL: obfuscate.SQLConfig{ - TableNames: c.agent.HasFlag("table_names"), - ReplaceDigits: c.agent.HasFlag("quantize_sql_tables") || c.agent.HasFlag("replace_sql_digits"), - KeepSQLAlias: c.agent.HasFlag("keep_sql_alias"), - DollarQuotedFunc: c.agent.HasFlag("dollar_quoted_func"), - }, - }), - statsd: statsd, - dataStreams: dataStreamsProcessor, - logFile: logFile, - } - return t, nil -} - -// newTracer creates a new no-op tracer for testing. -// NOTE: This function does NOT set the global tracer, which is required for -// most finish span/flushing operations to work as expected. If you are calling -// span.Finish and/or expecting flushing to work, you must call -// setGlobalTracer(...) with the tracer provided by this function. -func newTracer(opts ...StartOption) (*tracer, error) { - t, err := newUnstartedTracer(opts...) - if err != nil { - return nil, err - } - c := t.config - t.statsd.Incr("datadog.tracer.started", nil, 1) - if c.runtimeMetrics { - log.Debug("Runtime metrics enabled.") - t.wg.Add(1) - go func() { - defer t.wg.Done() - t.reportRuntimeMetrics(defaultMetricsReportInterval) - }() - } - if c.runtimeMetricsV2 { - l := slog.New(slogHandler{}) - opts := &runtimemetrics.Options{Logger: l} - if t.runtimeMetrics, err = runtimemetrics.NewEmitter(t.statsd, opts); err == nil { - l.Debug("Runtime metrics v2 enabled.") - } else { - l.Error("Failed to enable runtime metrics v2", "err", err.Error()) - } - } - if c.debugAbandonedSpans { - log.Info("Abandoned spans logs enabled.") - t.abandonedSpansDebugger = newAbandonedSpansDebugger() - t.abandonedSpansDebugger.Start(t.config.spanTimeout) - } - t.wg.Add(1) - go func() { - defer t.wg.Done() - tick := t.config.tickChan - if tick == nil { - ticker := time.NewTicker(flushInterval) - defer ticker.Stop() - tick = ticker.C - } - t.worker(tick) - }() - t.wg.Add(1) - go func() { - defer t.wg.Done() - t.reportHealthMetricsAtInterval(statsInterval) - }() - t.stats.Start() - return t, nil -} - -// Flush flushes any buffered traces. Flush is in effect only if a tracer -// is started. Users do not have to call Flush in order to ensure that -// traces reach Datadog. It is a convenience method dedicated to a specific -// use case described below. -// -// Flush is of use in Lambda environments, where starting and stopping -// the tracer on each invocation may create too much latency. In this -// scenario, a tracer may be started and stopped by the parent process -// whereas the invocation can make use of Flush to ensure any created spans -// reach the agent. -func Flush() { - if t := getGlobalTracer(); t != nil { - t.Flush() - } -} - -// Flush triggers a flush and waits for it to complete. -func (t *tracer) Flush() { - done := make(chan struct{}) - t.flush <- done - <-done - if t.dataStreams != nil { - t.dataStreams.Flush() - } -} - -// worker receives finished traces to be added into the payload, as well -// as periodically flushes traces to the transport. -func (t *tracer) worker(tick <-chan time.Time) { - for { - select { - case trace := <-t.out: - t.sampleChunk(trace) - if len(trace.spans) > 0 { - t.traceWriter.add(trace.spans) - } - case <-tick: - t.statsd.Incr("datadog.tracer.flush_triggered", []string{"reason:scheduled"}, 1) - t.traceWriter.flush() - - case done := <-t.flush: - t.statsd.Incr("datadog.tracer.flush_triggered", []string{"reason:invoked"}, 1) - t.traceWriter.flush() - t.statsd.Flush() - if !t.config.tracingAsTransport { - t.stats.flushAndSend(time.Now(), withCurrentBucket) - } - // TODO(x): In reality, the traceWriter.flush() call is not synchronous - // when using the agent traceWriter. However, this functionality is used - // in Lambda so for that purpose this mechanism should suffice. - done <- struct{}{} - - case <-t.stop: - loop: - // the loop ensures that the payload channel is fully drained - // before the final flush to ensure no traces are lost (see #526) - for { - select { - case trace := <-t.out: - t.sampleChunk(trace) - if len(trace.spans) > 0 { - t.traceWriter.add(trace.spans) - } - default: - break loop - } - } - return - } - } -} - -// chunk holds information about a trace chunk to be flushed, including its spans. -// The chunk may be a fully finished local trace chunk, or only a portion of the local trace chunk in the case of -// partial flushing. -// -// It's exported for supporting `mocktracer`. -type chunk struct { - spans []*Span - willSend bool // willSend indicates whether the trace will be sent to the agent. -} - -// sampleChunk applies single-span sampling to the provided trace. -func (t *tracer) sampleChunk(c *chunk) { - if len(c.spans) > 0 { - if p, ok := c.spans[0].context.SamplingPriority(); ok && p > 0 { - // The trace is kept, no need to run single span sampling rules. - return - } - } - var kept []*Span - if t.rulesSampling.HasSpanRules() { - // Apply sampling rules to individual spans in the trace. - for _, span := range c.spans { - if t.rulesSampling.SampleSpan(span) { - kept = append(kept, span) - } - } - if len(kept) > 0 && len(kept) < len(c.spans) { - // Some spans in the trace were kept, so a partial trace will be sent. - tracerstats.Signal(tracerstats.PartialTraces, 1) - } - } - tracerstats.Signal(tracerstats.DroppedP0Spans, uint32(len(c.spans)-len(kept))) - if !c.willSend { - if len(kept) == 0 { - tracerstats.Signal(tracerstats.DroppedP0Traces, 1) - } - c.spans = kept - } -} - -func (t *tracer) pushChunk(trace *chunk) { - tracerstats.Signal(tracerstats.SpansFinished, uint32(len(trace.spans))) - select { - case <-t.stop: - return - default: - } - select { - case t.out <- trace: - default: - log.Debug("payload queue full, trace dropped %d spans", len(trace.spans)) - atomic.AddUint32(&t.totalTracesDropped, 1) - } - select { - case <-t.logDroppedTraces.C: - if t := atomic.SwapUint32(&t.totalTracesDropped, 0); t > 0 { - log.Error("%d traces dropped through payload queue", t) - } - default: - } -} - -func spanStart(operationName string, options ...StartSpanOption) *Span { - var opts StartSpanConfig - for _, fn := range options { - if fn == nil { - continue - } - fn(&opts) - } - var startTime int64 - if opts.StartTime.IsZero() { - startTime = now() - } else { - startTime = opts.StartTime.UnixNano() - } - var context *SpanContext - // The default pprof context is taken from the start options and is - // not nil when using StartSpanFromContext() - pprofContext := opts.Context - if opts.Parent != nil { - context = opts.Parent - if pprofContext == nil && context.span != nil { - // Inherit the context.Context from parent span if it was propagated - // using ChildOf() rather than StartSpanFromContext(), see - // applyPPROFLabels() below. - context.span.mu.RLock() - pprofContext = context.span.pprofCtxActive - context.span.mu.RUnlock() - } - } - if pprofContext == nil { - // For root span's without context, there is no pprofContext, but we need - // one to avoid a panic() in pprof.WithLabels(). Using context.Background() - // is not ideal here, as it will cause us to remove all labels from the - // goroutine when the span finishes. However, the alternatives of not - // applying labels for such spans or to leave the endpoint/hotspot labels - // on the goroutine after it finishes are even less appealing. We'll have - // to properly document this for users. - pprofContext = gocontext.Background() - } - id := opts.SpanID - if id == 0 { - id = generateSpanID(startTime) - } - // span defaults - span := &Span{ - name: operationName, - service: "", - resource: operationName, - spanID: id, - traceID: id, - start: startTime, - integration: "manual", - } - - span.spanLinks = append(span.spanLinks, opts.SpanLinks...) - - if context != nil && !context.baggageOnly { - // this is a child span - span.traceID = context.traceID.Lower() - span.parentID = context.spanID - if p, ok := context.SamplingPriority(); ok { - span.setMetric(keySamplingPriority, float64(p)) - } - if context.span != nil { - // local parent, inherit service - context.span.mu.RLock() - span.service = context.span.service - context.span.mu.RUnlock() - } else { - // remote parent - if context.origin != "" { - // mark origin - span.setMeta(keyOrigin, context.origin) - } - } - - if context.reparentID != "" { - span.setMeta(keyReparentID, context.reparentID) - } - - } - span.context = newSpanContext(span, context) - span.setMeta("language", "go") - // add tags from options - for k, v := range opts.Tags { - span.SetTag(k, v) - } - isRootSpan := context == nil || context.span == nil - if isRootSpan { - traceprof.SetProfilerRootTags(span) - } - if isRootSpan || context.span.service != span.service { - // The span is the local root span. - span.setMetric(keyTopLevel, 1) - // all top level spans are measured. So the measured tag is redundant. - delete(span.metrics, keyMeasured) - } - pprofContext, span.taskEnd = startExecutionTracerTask(pprofContext, span) - span.pprofCtxRestore = pprofContext - return span -} - -// StartSpan creates, starts, and returns a new Span with the given `operationName`. -func (t *tracer) StartSpan(operationName string, options ...StartSpanOption) *Span { - if !t.config.enabled.current { - return nil - } - span := spanStart(operationName, options...) - if span.service == "" { - span.service = t.config.serviceName - } - span.noDebugStack = t.config.noDebugStack - if t.config.hostname != "" { - span.setMeta(keyHostname, t.config.hostname) - } - span.supportsEvents = t.config.agent.spanEventsAvailable - - // add global tags - for k, v := range t.config.globalTags.get() { - span.SetTag(k, v) - } - if t.config.serviceMappings != nil { - if newSvc, ok := t.config.serviceMappings[span.service]; ok { - span.service = newSvc - } - } - if t.config.version != "" { - if t.config.universalVersion || (!t.config.universalVersion && span.service == t.config.serviceName) { - span.setMeta(ext.Version, t.config.version) - } - } - if t.config.env != "" { - span.setMeta(ext.Environment, t.config.env) - } - if _, ok := span.context.SamplingPriority(); !ok { - // if not already sampled or a brand new trace, sample it - t.sample(span) - } - if t.config.serviceMappings != nil { - if newSvc, ok := t.config.serviceMappings[span.service]; ok { - span.service = newSvc - } - } - if log.DebugEnabled() { - // avoid allocating the ...interface{} argument if debug logging is disabled - log.Debug("Started Span: %v, Operation: %s, Resource: %s, Tags: %v, %v", //nolint:gocritic // Debug logging needs full span representation - span, span.name, span.resource, span.meta, span.metrics) - } - if t.config.profilerHotspots || t.config.profilerEndpoints { - t.applyPPROFLabels(span.pprofCtxRestore, span) - } else { - span.pprofCtxRestore = nil - } - if t.config.debugAbandonedSpans { - select { - case t.abandonedSpansDebugger.In <- newAbandonedSpanCandidate(span, false): - // ok - default: - log.Error("Abandoned spans channel full, disregarding span.") - } - } - if span.metrics[keyTopLevel] == 1 { - // The span is the local root span. - span.setMetric(keySpanAttributeSchemaVersion, float64(t.config.spanAttributeSchemaVersion)) - } - span.setMetric(ext.Pid, float64(t.pid)) - t.spansStarted.Inc(span.integration) - - return span -} - -// applyPPROFLabels applies pprof labels for the profiler's code hotspots and -// endpoint filtering feature to span. When span finishes, any pprof labels -// found in ctx are restored. Additionally, this func informs the profiler how -// many times each endpoint is called. -func (t *tracer) applyPPROFLabels(ctx gocontext.Context, span *Span) { - // Important: The label keys are ordered alphabetically to take advantage of - // an upstream optimization that landed in go1.24. This results in ~10% - // better performance on BenchmarkStartSpan. See - // https://go-review.googlesource.com/c/go/+/574516 for more information. - labels := make([]string, 0, 3*2 /* 3 key value pairs */) - localRootSpan := span.Root() - if t.config.profilerHotspots && localRootSpan != nil { - localRootSpan.mu.RLock() - labels = append(labels, traceprof.LocalRootSpanID, strconv.FormatUint(localRootSpan.spanID, 10)) - localRootSpan.mu.RUnlock() - } - if t.config.profilerHotspots { - labels = append(labels, traceprof.SpanID, strconv.FormatUint(span.spanID, 10)) - } - if t.config.profilerEndpoints && localRootSpan != nil { - localRootSpan.mu.RLock() - if spanResourcePIISafe(localRootSpan) { - labels = append(labels, traceprof.TraceEndpoint, localRootSpan.resource) - if span == localRootSpan { - // Inform the profiler of endpoint hits. This is used for the unit of - // work feature. We can't use APM stats for this since the stats don't - // have enough cardinality (e.g. runtime-id tags are missing). - traceprof.GlobalEndpointCounter().Inc(localRootSpan.resource) - } - } - localRootSpan.mu.RUnlock() - } - if len(labels) > 0 { - span.pprofCtxRestore = ctx - span.pprofCtxActive = pprof.WithLabels(ctx, pprof.Labels(labels...)) - pprof.SetGoroutineLabels(span.pprofCtxActive) - } -} - -// spanResourcePIISafe returns true if s.resource can be considered to not -// include PII with reasonable confidence. E.g. SQL queries may contain PII, -// but http, rpc or custom (s.spanType == "") span resource names generally do not. -func spanResourcePIISafe(s *Span) bool { - return s.spanType == ext.SpanTypeWeb || s.spanType == ext.AppTypeRPC || s.spanType == "" -} - -// Stop stops the tracer. -func (t *tracer) Stop() { - t.stopOnce.Do(func() { - close(t.stop) - t.statsd.Incr("datadog.tracer.stopped", nil, 1) - }) - t.abandonedSpansDebugger.Stop() - t.stats.Stop() - t.wg.Wait() - t.traceWriter.stop() - if t.runtimeMetrics != nil { - t.runtimeMetrics.Stop() - } - t.statsd.Close() - if t.dataStreams != nil { - t.dataStreams.Stop() - } - appsec.Stop() - remoteconfig.Stop() - // Close log file last to account for any logs from the above calls - if t.logFile != nil { - t.logFile.Close() - } -} - -// Inject uses the configured or default TextMap Propagator. -func (t *tracer) Inject(ctx *SpanContext, carrier interface{}) error { - if !t.config.enabled.current { - return nil - } - - if t.config.tracingAsTransport { - // in tracing as transport mode, only propagate when there is an upstream appsec event - if ctx.trace != nil && - !globalinternal.VerifyTraceSourceEnabled(ctx.trace.propagatingTag(keyPropagatedTraceSource), globalinternal.ASMTraceSource) { - return nil - } - } - - t.updateSampling(ctx) - return t.config.propagator.Inject(ctx, carrier) -} - -// updateSampling runs trace sampling rules on the context, since properties like resource / tags -// could change and impact the result of sampling. This must be done once before context is propagated. -func (t *tracer) updateSampling(ctx *SpanContext) { - if ctx == nil { - return - } - // without this check some mock spans tests fail - if t.rulesSampling == nil || ctx.trace == nil || ctx.trace.root == nil { - return - } - // want to avoid locking the entire trace from a span for long. - // if SampleTrace successfully samples the trace, - // it will lock the span and the trace mutexes in span.setSamplingPriorityLocked - // and trace.setSamplingPriority respectively, so we can't rely on those mutexes. - if ctx.trace.isLocked() { - // trace sampling decision already taken and locked, no re-sampling shall occur - return - } - - // the span was sampled with ManualKeep rules shouldn't override - if ctx.trace.propagatingTag(keyDecisionMaker) == "-4" { - return - } - // if sampling was successful, need to lock the trace to prevent further re-sampling - if t.rulesSampling.SampleTrace(ctx.trace.root) { - ctx.trace.setLocked(true) - } -} - -// Extract uses the configured or default TextMap Propagator. -func (t *tracer) Extract(carrier interface{}) (*SpanContext, error) { - if !t.config.enabled.current { - return nil, nil - } - ctx, err := t.config.propagator.Extract(carrier) - if t.config.tracingAsTransport && ctx != nil { - // in tracing as transport mode, reset upstream sampling decision to make sure we keep 1 trace/minute - if ctx.trace != nil && - !globalinternal.VerifyTraceSourceEnabled(ctx.trace.propagatingTag(keyPropagatedTraceSource), globalinternal.ASMTraceSource) { - ctx.trace.priority = nil - } - } - if ctx != nil && ctx.trace != nil { - if _, ok := ctx.trace.samplingPriority(); ok { - // ensure that the trace isn't resampled - ctx.trace.setLocked(true) - } - } - return ctx, err -} - -func (t *tracer) TracerConf() TracerConf { - return TracerConf{ - CanComputeStats: t.config.canComputeStats(), - CanDropP0s: t.config.canDropP0s(), - DebugAbandonedSpans: t.config.debugAbandonedSpans, - Disabled: !t.config.enabled.current, - PartialFlush: t.config.partialFlushEnabled, - PartialFlushMinSpans: t.config.partialFlushMinSpans, - PeerServiceDefaults: t.config.peerServiceDefaultsEnabled, - PeerServiceMappings: t.config.peerServiceMappings, - EnvTag: t.config.env, - VersionTag: t.config.version, - ServiceTag: t.config.serviceName, - TracingAsTransport: t.config.tracingAsTransport, - } -} - -func (t *tracer) submit(s *Span) { - if !t.config.enabled.current { - return - } - // we have an active tracer - if !t.config.canDropP0s() { - return - } - statSpan, shouldCalc := t.stats.newTracerStatSpan(s, t.obfuscator) - if !shouldCalc { - return - } - // the agent supports computed stats - select { - case t.stats.In <- statSpan: - // ok - default: - log.Error("Stats channel full, disregarding span.") - } -} - -func (t *tracer) submitAbandonedSpan(s *Span, finished bool) { - select { - case t.abandonedSpansDebugger.In <- newAbandonedSpanCandidate(s, finished): - // ok - default: - log.Error("Abandoned spans channel full, disregarding span.") - } -} - -func (t *tracer) submitChunk(c *chunk) { - t.pushChunk(c) -} - -// sampleRateMetricKey is the metric key holding the applied sample rate. Has to be the same as the Agent. -const sampleRateMetricKey = "_sample_rate" - -// Sample samples a span with the internal sampler. -func (t *tracer) sample(span *Span) { - if _, ok := span.context.SamplingPriority(); ok { - // sampling decision was already made - return - } - sampler := t.config.sampler - if !sampler.Sample(span) { - span.context.trace.drop() - span.context.trace.setSamplingPriority(ext.PriorityAutoReject, samplernames.RuleRate) - return - } - if sampler.Rate() < 1 { - span.setMetric(sampleRateMetricKey, sampler.Rate()) - } - if t.rulesSampling.SampleTrace(span) { - return - } - if t.rulesSampling.SampleTraceGlobalRate(span) { - return - } - t.prioritySampling.apply(span) -} - -func startExecutionTracerTask(ctx gocontext.Context, span *Span) (gocontext.Context, func()) { - if !rt.IsEnabled() { - return ctx, func() {} - } - span.goExecTraced = true - // Task name is the resource (operationName) of the span, e.g. - // "POST /foo/bar" (http) or "/foo/pkg.Method" (grpc). - taskName := span.resource - // If the resource could contain PII (e.g. SQL query that's not using bind - // arguments), play it safe and just use the span type as the taskName, - // e.g. "sql". - if !spanResourcePIISafe(span) { - taskName = span.spanType - } - // The task name is an arbitrary string from the user. If it's too - // large, like a big SQL query, the execution tracer can crash when we - // create the task. Cap it at an arbirary length. For "normal" task - // names this should be plenty that we can still have the task names for - // debugging. - taskName = taskName[:min(128, len(taskName))] - end := noopTaskEnd - if !globalinternal.IsExecutionTraced(ctx) { - var task *rt.Task - ctx, task = rt.NewTask(ctx, taskName) - end = task.End - } else { - // We only want to skip task creation for this particular span, - // not necessarily for child spans which can come from different - // integrations. So update this context to be "not" execution - // traced so that derived contexts used by child spans don't get - // skipped. - ctx = globalinternal.WithExecutionNotTraced(ctx) - } - var b [8]byte - binary.LittleEndian.PutUint64(b[:], span.spanID) - // TODO: can we make string(b[:]) not allocate? e.g. with unsafe - // shenanigans? rt.Log won't retain the message string, though perhaps - // we can't assume that will always be the case. - rt.Log(ctx, "datadog.uint64_span_id", string(b[:])) - return ctx, end -} - -func noopTaskEnd() {} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata.go deleted file mode 100644 index cf0bb8d9d4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata.go +++ /dev/null @@ -1,27 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. -package tracer - -// Metadata represents the configuration of the tracer. -// -//go:generate go run github.com/tinylib/msgp -unexported -marshal=true -o=tracer_metadata_msgp.go -tests=false -type Metadata struct { - // Version of the schema. - SchemaVersion uint8 `msg:"schema_version"` - // Runtime UUID. - RuntimeID string `msg:"runtime_id"` - // Programming language of the tracer. - Language string `msg:"tracer_language"` - // Version of the tracer - Version string `msg:"tracer_version"` - // Identfier of the machine running the process. - Hostname string `msg:"hostname"` - // Name of the service being instrumented. - ServiceName string `msg:"service_name"` - // Environment of the service being instrumented. - ServiceEnvironment string `msg:"service_env"` - // Version of the service being instrumented. - ServiceVersion string `msg:"service_version"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata_msgp.go deleted file mode 100644 index 9fb356e108..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/tracer_metadata_msgp.go +++ /dev/null @@ -1,285 +0,0 @@ -package tracer - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *Metadata) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "schema_version": - z.SchemaVersion, err = dc.ReadUint8() - if err != nil { - err = msgp.WrapError(err, "SchemaVersion") - return - } - case "runtime_id": - z.RuntimeID, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - case "tracer_language": - z.Language, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - case "tracer_version": - z.Version, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "hostname": - z.Hostname, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - case "service_name": - z.ServiceName, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ServiceName") - return - } - case "service_env": - z.ServiceEnvironment, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ServiceEnvironment") - return - } - case "service_version": - z.ServiceVersion, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ServiceVersion") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *Metadata) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 8 - // write "schema_version" - err = en.Append(0x88, 0xae, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteUint8(z.SchemaVersion) - if err != nil { - err = msgp.WrapError(err, "SchemaVersion") - return - } - // write "runtime_id" - err = en.Append(0xaa, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteString(z.RuntimeID) - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - // write "tracer_language" - err = en.Append(0xaf, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Language) - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - // write "tracer_version" - err = en.Append(0xae, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - // write "hostname" - err = en.Append(0xa8, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Hostname) - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - // write "service_name" - err = en.Append(0xac, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.ServiceName) - if err != nil { - err = msgp.WrapError(err, "ServiceName") - return - } - // write "service_env" - err = en.Append(0xab, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x76) - if err != nil { - return - } - err = en.WriteString(z.ServiceEnvironment) - if err != nil { - err = msgp.WrapError(err, "ServiceEnvironment") - return - } - // write "service_version" - err = en.Append(0xaf, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.ServiceVersion) - if err != nil { - err = msgp.WrapError(err, "ServiceVersion") - return - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *Metadata) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // map header, size 8 - // string "schema_version" - o = append(o, 0x88, 0xae, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendUint8(o, z.SchemaVersion) - // string "runtime_id" - o = append(o, 0xaa, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x69, 0x64) - o = msgp.AppendString(o, z.RuntimeID) - // string "tracer_language" - o = append(o, 0xaf, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x5f, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65) - o = msgp.AppendString(o, z.Language) - // string "tracer_version" - o = append(o, 0xae, 0x74, 0x72, 0x61, 0x63, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Version) - // string "hostname" - o = append(o, 0xa8, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.Hostname) - // string "service_name" - o = append(o, 0xac, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.ServiceName) - // string "service_env" - o = append(o, 0xab, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x76) - o = msgp.AppendString(o, z.ServiceEnvironment) - // string "service_version" - o = append(o, 0xaf, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.ServiceVersion) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Metadata) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "schema_version": - z.SchemaVersion, bts, err = msgp.ReadUint8Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "SchemaVersion") - return - } - case "runtime_id": - z.RuntimeID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "RuntimeID") - return - } - case "tracer_language": - z.Language, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - case "tracer_version": - z.Version, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "hostname": - z.Hostname, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Hostname") - return - } - case "service_name": - z.ServiceName, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ServiceName") - return - } - case "service_env": - z.ServiceEnvironment, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ServiceEnvironment") - return - } - case "service_version": - z.ServiceVersion, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ServiceVersion") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *Metadata) Msgsize() (s int) { - s = 1 + 15 + msgp.Uint8Size + 11 + msgp.StringPrefixSize + len(z.RuntimeID) + 16 + msgp.StringPrefixSize + len(z.Language) + 15 + msgp.StringPrefixSize + len(z.Version) + 9 + msgp.StringPrefixSize + len(z.Hostname) + 13 + msgp.StringPrefixSize + len(z.ServiceName) + 12 + msgp.StringPrefixSize + len(z.ServiceEnvironment) + 16 + msgp.StringPrefixSize + len(z.ServiceVersion) - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/transport.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/transport.go deleted file mode 100644 index 434d6579ce..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/transport.go +++ /dev/null @@ -1,221 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "bytes" - "fmt" - "io" - "net" - "net/http" - "runtime" - "strconv" - "strings" - "time" - - pb "github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace" - "github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/version" - - "github.com/tinylib/msgp/msgp" -) - -const ( - // headerComputedTopLevel specifies that the client has marked top-level spans, when set. - // Any non-empty value will mean 'yes'. - headerComputedTopLevel = "Datadog-Client-Computed-Top-Level" -) - -var defaultDialer = &net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, -} - -func defaultHTTPClient(timeout time.Duration) *http.Client { - if timeout == 0 { - timeout = defaultHTTPTimeout - } - return &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: defaultDialer.DialContext, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - }, - Timeout: timeout, - } -} - -const ( - defaultHostname = "localhost" - defaultPort = "8126" - defaultAddress = defaultHostname + ":" + defaultPort - defaultURL = "http://" + defaultAddress - defaultHTTPTimeout = 10 * time.Second // defines the current timeout before giving up with the send process - traceCountHeader = "X-Datadog-Trace-Count" // header containing the number of traces in the payload - obfuscationVersionHeader = "Datadog-Obfuscation-Version" // header containing the version of obfuscation used, if any -) - -// transport is an interface for communicating data to the agent. -type transport interface { - // send sends the payload p to the agent using the transport set up. - // It returns a non-nil response body when no error occurred. - send(p *payload) (body io.ReadCloser, err error) - // sendStats sends the given stats payload to the agent. - // tracerObfuscationVersion is the version of obfuscation applied (0 if none was applied) - sendStats(s *pb.ClientStatsPayload, tracerObfuscationVersion int) error - // endpoint returns the URL to which the transport will send traces. - endpoint() string -} - -type httpTransport struct { - traceURL string // the delivery URL for traces - statsURL string // the delivery URL for stats - client *http.Client // the HTTP client used in the POST - headers map[string]string // the Transport headers -} - -// newTransport returns a new Transport implementation that sends traces to a -// trace agent at the given url, using a given *http.Client. -// -// In general, using this method is only necessary if you have a trace agent -// running on a non-default port, if it's located on another machine, or when -// otherwise needing to customize the transport layer, for instance when using -// a unix domain socket. -func newHTTPTransport(url string, client *http.Client) *httpTransport { - // initialize the default EncoderPool with Encoder headers - defaultHeaders := map[string]string{ - "Datadog-Meta-Lang": "go", - "Datadog-Meta-Lang-Version": strings.TrimPrefix(runtime.Version(), "go"), - "Datadog-Meta-Lang-Interpreter": runtime.Compiler + "-" + runtime.GOARCH + "-" + runtime.GOOS, - "Datadog-Meta-Tracer-Version": version.Tag, - "Content-Type": "application/msgpack", - } - if cid := internal.ContainerID(); cid != "" { - defaultHeaders["Datadog-Container-ID"] = cid - } - if eid := internal.EntityID(); eid != "" { - defaultHeaders["Datadog-Entity-ID"] = eid - } - if extEnv := internal.ExternalEnvironment(); extEnv != "" { - defaultHeaders["Datadog-External-Env"] = extEnv - } - return &httpTransport{ - traceURL: fmt.Sprintf("%s/v0.4/traces", url), - statsURL: fmt.Sprintf("%s/v0.6/stats", url), - client: client, - headers: defaultHeaders, - } -} - -func (t *httpTransport) sendStats(p *pb.ClientStatsPayload, tracerObfuscationVersion int) error { - var buf bytes.Buffer - if err := msgp.Encode(&buf, p); err != nil { - return err - } - req, err := http.NewRequest("POST", t.statsURL, &buf) - if err != nil { - return err - } - for header, value := range t.headers { - req.Header.Set(header, value) - } - if tracerObfuscationVersion > 0 { - req.Header.Set(obfuscationVersionHeader, strconv.Itoa(tracerObfuscationVersion)) - } - resp, err := t.client.Do(req) - if err != nil { - return err - } - if code := resp.StatusCode; code >= 400 { - // error, check the body for context information and - // return a nice error. - msg := make([]byte, 1000) - n, _ := resp.Body.Read(msg) - resp.Body.Close() - txt := http.StatusText(code) - if n > 0 { - return fmt.Errorf("%s (Status: %s)", msg[:n], txt) - } - return fmt.Errorf("%s", txt) - } - return nil -} - -func (t *httpTransport) send(p *payload) (body io.ReadCloser, err error) { - req, err := http.NewRequest("POST", t.traceURL, p) - if err != nil { - return nil, fmt.Errorf("cannot create http request: %s", err.Error()) - } - req.ContentLength = int64(p.size()) - for header, value := range t.headers { - req.Header.Set(header, value) - } - req.Header.Set(traceCountHeader, strconv.Itoa(p.itemCount())) - req.Header.Set(headerComputedTopLevel, "yes") - if t := getGlobalTracer(); t != nil { - tc := t.TracerConf() - if tc.TracingAsTransport || tc.CanComputeStats { - // tracingAsTransport uses this header to disable the trace agent's stats computation - // while making canComputeStats() always false to also disable client stats computation. - req.Header.Set("Datadog-Client-Computed-Stats", "yes") - } - droppedTraces := int(tracerstats.Count(tracerstats.AgentDroppedP0Traces)) - partialTraces := int(tracerstats.Count(tracerstats.PartialTraces)) - droppedSpans := int(tracerstats.Count(tracerstats.AgentDroppedP0Spans)) - if tt, ok := t.(*tracer); ok { - if stats := tt.statsd; stats != nil { - stats.Count("datadog.tracer.dropped_p0_traces", int64(droppedTraces), - []string{fmt.Sprintf("partial:%s", strconv.FormatBool(partialTraces > 0))}, 1) - stats.Count("datadog.tracer.dropped_p0_spans", int64(droppedSpans), nil, 1) - } - } - req.Header.Set("Datadog-Client-Dropped-P0-Traces", strconv.Itoa(droppedTraces)) - req.Header.Set("Datadog-Client-Dropped-P0-Spans", strconv.Itoa(droppedSpans)) - } - response, err := t.client.Do(req) - if err != nil { - reportAPIErrorsMetric(response, err) - return nil, err - } - if code := response.StatusCode; code >= 400 { - reportAPIErrorsMetric(response, err) - // error, check the body for context information and - // return a nice error. - msg := make([]byte, 1000) - n, _ := response.Body.Read(msg) - response.Body.Close() - txt := http.StatusText(code) - if n > 0 { - return nil, fmt.Errorf("%s (Status: %s)", msg[:n], txt) - } - return nil, fmt.Errorf("%s", txt) - } - return response.Body, nil -} - -func reportAPIErrorsMetric(response *http.Response, err error) { - if t, ok := getGlobalTracer().(*tracer); ok { - var reason string - if err != nil { - reason = "network_failure" - } - if response != nil { - reason = fmt.Sprintf("server_response_%d", response.StatusCode) - } - t.statsd.Incr("datadog.tracer.api.errors", []string{"reason:" + reason}, 1) - } else { - return - } -} - -func (t *httpTransport) endpoint() string { - return t.traceURL -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/util.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/util.go deleted file mode 100644 index ac8402b7d3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/util.go +++ /dev/null @@ -1,129 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "fmt" - "strconv" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" -) - -// parseUint64 parses a uint64 from either an unsigned 64 bit base-10 string -// or a signed 64 bit base-10 string representing an unsigned integer -func parseUint64(str string) (uint64, error) { - if strings.HasPrefix(str, "-") { - id, err := strconv.ParseInt(str, 10, 64) - if err != nil { - return 0, err - } - return uint64(id), nil - } - return strconv.ParseUint(str, 10, 64) -} - -func isValidPropagatableTag(k, v string) error { - if len(k) == 0 { - return fmt.Errorf("key length must be greater than zero") - } - for _, ch := range k { - if ch < 32 || ch > 126 || ch == ' ' || ch == '=' || ch == ',' { - return fmt.Errorf("key contains an invalid character %d", ch) - } - } - if len(v) == 0 { - return fmt.Errorf("value length must be greater than zero") - } - for _, ch := range v { - if ch < 32 || ch > 126 || ch == ',' { - return fmt.Errorf("value contains an invalid character %d", ch) - } - } - return nil -} - -func parsePropagatableTraceTags(s string) (map[string]string, error) { - if len(s) == 0 { - return nil, nil - } - tags := make(map[string]string) - searchingKey, start := true, 0 - var key string - for i, ch := range s { - switch ch { - case '=': - if searchingKey { - if i-start == 0 { - return nil, fmt.Errorf("invalid format") - } - key = s[start:i] - searchingKey, start = false, i+1 - } - case ',': - if searchingKey || i-start == 0 { - return nil, fmt.Errorf("invalid format") - } - tags[key] = s[start:i] - searchingKey, start = true, i+1 - } - } - if searchingKey || len(s)-start == 0 { - return nil, fmt.Errorf("invalid format") - } - tags[key] = s[start:] - return tags, nil -} - -func dereference(value any) any { - // Falling into one of the cases will dereference the pointer and return the - // value of the pointer. It adds one allocation due to casting. - switch v := value.(type) { - case *bool: - return dereferenceGeneric(v) - case *string: - return dereferenceGeneric(v) - // Supported type by toFloat64 - case *byte: - return dereferenceGeneric(v) - case *float32: - return dereferenceGeneric(v) - case *float64: - return dereferenceGeneric(v) - case *int: - return dereferenceGeneric(v) - case *int8: - return dereferenceGeneric(v) - case *int16: - return dereferenceGeneric(v) - case *int32: - return dereferenceGeneric(v) - case *int64: - return dereferenceGeneric(v) - case *uint: - return dereferenceGeneric(v) - case *uint16: - return dereferenceGeneric(v) - case *uint32: - return dereferenceGeneric(v) - case *uint64: - return dereferenceGeneric(v) - case *samplernames.SamplerName: - if v == nil { - return samplernames.Unknown - } - return *v - } - return value -} - -func dereferenceGeneric[T any](value *T) T { - if value == nil { - var v T - return v - } - return *value -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/writer.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/writer.go deleted file mode 100644 index 264ba80a84..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/tracer/writer.go +++ /dev/null @@ -1,365 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package tracer - -import ( - "bytes" - "encoding/json" - "errors" - "io" - "math" - "os" - "strconv" - "sync" - "sync/atomic" - "time" - - globalinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type traceWriter interface { - // add adds traces to be sent by the writer. - add([]*Span) - - // flush causes the writer to send any buffered traces. - flush() - - // stop gracefully shuts down the writer. - stop() -} - -type agentTraceWriter struct { - // config holds the tracer configuration - config *config - - // payload encodes and buffers traces in msgpack format - payload *payload - - // climit limits the number of concurrent outgoing connections - climit chan struct{} - - // wg waits for all uploads to finish - wg sync.WaitGroup - - // prioritySampling is the prioritySampler into which agentTraceWriter will - // read sampling rates sent by the agent - prioritySampling *prioritySampler - - // statsd is used to send metrics - statsd globalinternal.StatsdClient - - tracesQueued uint32 -} - -func newAgentTraceWriter(c *config, s *prioritySampler, statsdClient globalinternal.StatsdClient) *agentTraceWriter { - return &agentTraceWriter{ - config: c, - payload: newPayload(), - climit: make(chan struct{}, concurrentConnectionLimit), - prioritySampling: s, - statsd: statsdClient, - } -} - -func (h *agentTraceWriter) add(trace []*Span) { - if err := h.payload.push(trace); err != nil { - h.statsd.Incr("datadog.tracer.traces_dropped", []string{"reason:encoding_error"}, 1) - log.Error("Error encoding msgpack: %s", err.Error()) - } - atomic.AddUint32(&h.tracesQueued, 1) // TODO: This does not differentiate between complete traces and partial chunks - if h.payload.size() > payloadSizeLimit { - h.statsd.Incr("datadog.tracer.flush_triggered", []string{"reason:size"}, 1) - h.flush() - } -} - -func (h *agentTraceWriter) stop() { - h.statsd.Incr("datadog.tracer.flush_triggered", []string{"reason:shutdown"}, 1) - h.flush() - h.wg.Wait() -} - -// flush will push any currently buffered traces to the server. -func (h *agentTraceWriter) flush() { - if h.payload.itemCount() == 0 { - return - } - h.wg.Add(1) - h.climit <- struct{}{} - oldp := h.payload - h.payload = newPayload() - go func(p *payload) { - defer func(start time.Time) { - // Once the payload has been used, clear the buffer for garbage - // collection to avoid a memory leak when references to this object - // may still be kept by faulty transport implementations or the - // standard library. See dd-trace-go#976 - h.statsd.Count("datadog.tracer.queue.enqueued.traces", int64(atomic.SwapUint32(&h.tracesQueued, 0)), nil, 1) - p.clear() - - <-h.climit - h.statsd.Timing("datadog.tracer.flush_duration", time.Since(start), nil, 1) - h.wg.Done() - }(time.Now()) - - var count, size int - var err error - for attempt := 0; attempt <= h.config.sendRetries; attempt++ { - size, count = p.size(), p.itemCount() - log.Debug("Attempt to send payload: size: %d traces: %d\n", size, count) - var rc io.ReadCloser - rc, err = h.config.transport.send(p) - if err == nil { - log.Debug("sent traces after %d attempts", attempt+1) - h.statsd.Count("datadog.tracer.flush_bytes", int64(size), nil, 1) - h.statsd.Count("datadog.tracer.flush_traces", int64(count), nil, 1) - if err := h.prioritySampling.readRatesJSON(rc); err != nil { - h.statsd.Incr("datadog.tracer.decode_error", nil, 1) - } - return - } - - if attempt+1%5 == 0 { - log.Error("failure sending traces (attempt %d of %d): %v", attempt+1, h.config.sendRetries+1, err.Error()) - } - p.reset() - time.Sleep(h.config.retryInterval) - } - h.statsd.Count("datadog.tracer.traces_dropped", int64(count), []string{"reason:send_failed"}, 1) - log.Error("lost %d traces: %v", count, err.Error()) - }(oldp) -} - -// logWriter specifies the output target of the logTraceWriter; replaced in tests. -var logWriter io.Writer = os.Stdout - -// logTraceWriter encodes traces into a format understood by the Datadog Forwarder -// (https://github.com/DataDog/datadog-serverless-functions/tree/master/aws/logs_monitoring) -// and writes them to os.Stdout. This is used to send traces from an AWS Lambda environment. -type logTraceWriter struct { - config *config - buf bytes.Buffer - hasTraces bool - w io.Writer - statsd globalinternal.StatsdClient -} - -func newLogTraceWriter(c *config, statsdClient globalinternal.StatsdClient) *logTraceWriter { - w := &logTraceWriter{ - config: c, - w: logWriter, - statsd: statsdClient, - } - w.resetBuffer() - return w -} - -const ( - // maxFloatLength is the maximum length that a string encoded by encodeFloat will be. - maxFloatLength = 24 - - // logBufferSuffix is the final string that the trace writer has to append to a buffer to close - // the JSON. - logBufferSuffix = "]}\n" - - // logBufferLimit is the maximum size log line allowed by cloudwatch - logBufferLimit = 256 * 1024 -) - -func (h *logTraceWriter) resetBuffer() { - h.buf.Reset() - h.buf.WriteString(`{"traces": [`) - h.hasTraces = false -} - -// encodeFloat correctly encodes float64 into the JSON format followed by ES6. -// This code is reworked from Go's encoding/json package -// (https://github.com/golang/go/blob/go1.15/src/encoding/json/encode.go#L573) -// -// One important departure from encoding/json is that infinities and nans are encoded -// as null rather than signalling an error. -func encodeFloat(p []byte, f float64) []byte { - if math.IsInf(f, 0) || math.IsNaN(f) { - return append(p, "null"...) - } - abs := math.Abs(f) - if abs != 0 && (abs < 1e-6 || abs >= 1e21) { - p = strconv.AppendFloat(p, f, 'e', -1, 64) - // clean up e-09 to e-9 - n := len(p) - if n >= 4 && p[n-4] == 'e' && p[n-3] == '-' && p[n-2] == '0' { - p[n-2] = p[n-1] - p = p[:n-1] - } - } else { - p = strconv.AppendFloat(p, f, 'f', -1, 64) - } - return p -} - -func (h *logTraceWriter) encodeSpan(s *Span) { - var scratch [maxFloatLength]byte - h.buf.WriteString(`{"trace_id":"`) - h.buf.Write(strconv.AppendUint(scratch[:0], uint64(s.traceID), 16)) - h.buf.WriteString(`","span_id":"`) - h.buf.Write(strconv.AppendUint(scratch[:0], uint64(s.spanID), 16)) - h.buf.WriteString(`","parent_id":"`) - h.buf.Write(strconv.AppendUint(scratch[:0], uint64(s.parentID), 16)) - h.buf.WriteString(`","name":`) - h.marshalString(s.name) - h.buf.WriteString(`,"resource":`) - h.marshalString(s.resource) - h.buf.WriteString(`,"error":`) - h.buf.Write(strconv.AppendInt(scratch[:0], int64(s.error), 10)) - h.buf.WriteString(`,"meta":{`) - first := true - for k, v := range s.meta { - if first { - first = false - } else { - h.buf.WriteString(`,`) - } - h.marshalString(k) - h.buf.WriteString(":") - h.marshalString(v) - } - // We cannot pack messagepack into JSON, so we need to marshal the meta struct as JSON, and send them through the `meta` field - for k, v := range s.metaStruct { - if first { - first = false - } else { - h.buf.WriteString(`,`) - } - h.marshalString(k) - h.buf.WriteString(":") - jsonValue, err := json.Marshal(v) - if err != nil { - log.Error("Error marshaling value %q: %v", v, err.Error()) - continue - } - h.marshalString(string(jsonValue)) - } - h.buf.WriteString(`},"metrics":{`) - first = true - for k, v := range s.metrics { - if math.IsNaN(v) || math.IsInf(v, 0) { - // The trace forwarder does not support infinity or nan, so we do not send metrics with those values. - continue - } - if first { - first = false - } else { - h.buf.WriteString(`,`) - } - h.marshalString(k) - h.buf.WriteString(`:`) - h.buf.Write(encodeFloat(scratch[:0], v)) - } - h.buf.WriteString(`},"start":`) - h.buf.Write(strconv.AppendInt(scratch[:0], s.start, 10)) - h.buf.WriteString(`,"duration":`) - h.buf.Write(strconv.AppendInt(scratch[:0], s.duration, 10)) - h.buf.WriteString(`,"service":`) - h.marshalString(s.service) - h.buf.WriteString(`}`) -} - -// marshalString marshals the string str as JSON into the writer's buffer. -// Should be used whenever writing non-constant string data to ensure correct sanitization. -func (h *logTraceWriter) marshalString(str string) { - m, err := json.Marshal(str) - if err != nil { - log.Error("Error marshaling value %q: %v", str, err.Error()) - } else { - h.buf.Write(m) - } -} - -type encodingError struct { - cause error - dropReason string -} - -// writeTrace makes an effort to write the trace into the current buffer. It returns -// the number of spans (n) that it wrote and an error (err), if one occurred. -// n may be less than len(trace), meaning that only the first n spans of the trace -// fit into the current buffer. Once the buffer is flushed, the remaining spans -// from the trace can be retried. -// An error, if one is returned, indicates that a span in the trace is too large -// to fit in one buffer, and the trace cannot be written. -func (h *logTraceWriter) writeTrace(trace []*Span) (n int, err *encodingError) { - startn := h.buf.Len() - if !h.hasTraces { - h.buf.WriteByte('[') - } else { - h.buf.WriteString(", [") - } - written := 0 - for i, s := range trace { - n := h.buf.Len() - if i > 0 { - h.buf.WriteByte(',') - } - h.encodeSpan(s) - if h.buf.Len() > logBufferLimit-len(logBufferSuffix) { - // This span is too big to fit in the current buffer. - if i == 0 { - // This was the first span in this trace. This means we should truncate - // everything we wrote in writeTrace - h.buf.Truncate(startn) - if !h.hasTraces { - // This is the first span of the first trace in the buffer and it's too big. - // We will never be able to send this trace, so we will drop it. - return 0, &encodingError{cause: errors.New("span too large for buffer"), dropReason: "trace_too_large"} - } - return 0, nil - } - // This span was too big, but it might fit in the next buffer. - // We can finish this trace and try again with an empty buffer (see *logTaceWriter.add) - h.buf.Truncate(n) - break - } - written++ - } - h.buf.WriteByte(']') - h.hasTraces = true - return written, nil -} - -// add adds a trace to the writer's buffer. -func (h *logTraceWriter) add(trace []*Span) { - // Try adding traces to the buffer until we flush them all or encounter an error. - for len(trace) > 0 { - n, err := h.writeTrace(trace) - if err != nil { - log.Error("Lost a trace: %s", err.cause) - h.statsd.Count("datadog.tracer.traces_dropped", 1, []string{"reason:" + err.dropReason}, 1) - return - } - trace = trace[n:] - // If there are traces left that didn't fit into the buffer, flush the buffer and loop to - // write the remaining spans. - if len(trace) > 0 { - h.flush() - } - } -} - -func (h *logTraceWriter) stop() { - h.statsd.Incr("datadog.tracer.flush_triggered", []string{"reason:shutdown"}, 1) - h.flush() -} - -// flush will write any buffered traces to standard output. -func (h *logTraceWriter) flush() { - if !h.hasTraces { - return - } - h.buf.WriteString(logBufferSuffix) - h.w.Write(h.buf.Bytes()) - h.resetBuffer() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/v1.go b/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/v1.go deleted file mode 100644 index 225a74c619..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/ddtrace/v1.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package ddtrace - -import ( - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -func init() { - checkV1NonTransitional() -} - -func checkV1NonTransitional() { - version, transitional, found := version.FindV1Version() - if !found { - // No v1 version detected - return - } - if transitional { - // v1 version is transitional - return - } - log.Warn("Detected %q non-transitional version of dd-trace-go. This version is not compatible with v2 - please upgrade to v1.74.0 or later", version) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo/operation.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo/operation.go deleted file mode 100644 index ae2ab084ba..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo/operation.go +++ /dev/null @@ -1,381 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package dyngo is the Go implementation of Datadog's Instrumentation Gateway -// which provides an event-based instrumentation API based on a stack -// representation of instrumented functions along with nested event listeners. -// It allows to both correlate passed and future function calls in order to -// react and monitor specific function call scenarios, while keeping the -// monitoring state local to the monitoring logic thanks to nested Go function -// closures. -// dyngo is not intended to be directly used and should be instead wrapped -// behind statically and strongly typed wrapper types. Indeed, dyngo is a -// generic implementation relying on empty interface values (values of type -// `interface{}`) and using it directly can be error-prone due to the lack of -// compile-time type-checking. For example, AppSec provides the package -// `httpsec`, built on top of dyngo, as its HTTP instrumentation API and which -// defines the abstract HTTP operation representation expected by the AppSec -// monitoring. -package dyngo - -import ( - "context" - "runtime" - "sync" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" -) - -// LogError is the function used to log errors in the dyngo package. -// This is required because we really want to be able to log errors from dyngo -// but the log package depend on too much packages that we want to instrument. -// So we need to do this to avoid dependency cycles. -var LogError = func(string, ...any) {} - -// Operation interface type allowing to register event listeners to the -// operation. The event listeners will be automatically removed from the -// operation once it finishes so that it no longer can be called on finished -// operations. -type Operation interface { - // Parent returns the parent operation, or nil for the root operation. - Parent() Operation - - // unwrap is an internal method guaranteeing only *operation implements Operation. - unwrap() *operation -} - -// ArgOf marks a particular type as being the argument type of a given operation -// type. This allows this type to be listened to by an operation start listener. -// This removes the possibility of incorrectly pairing an operation and payload -// when setting up listeners, as it allows compiler-assisted coherence checks. -type ArgOf[O Operation] interface { - IsArgOf(O) -} - -// ResultOf marks a particular type as being the result type of a given -// operation. This allows this type to be listened to by an operation finish -// listener. -// This removes the possibility of incorrectly pairing an operation and payload -// when setting up listeners, as it allows compiler-assisted coherence checks. -type ResultOf[O Operation] interface { - IsResultOf(O) -} - -// EventListener interface allowing to identify the Go type listened to and -// dispatch calls to the underlying event listener function. -type EventListener[O Operation, T any] func(O, T) - -// contextKey is used to store in a context.Context the ongoing Operation -type contextKey struct{} - -// Atomic *Operation so we can atomically read or swap it. -var rootOperation atomic.Pointer[Operation] - -// SwapRootOperation allows to atomically swap the current root operation with -// the given new one. Concurrent uses of the old root operation on already -// existing and running operation are still valid. -func SwapRootOperation(newOp Operation) { - rootOperation.Swap(&newOp) - // Note: calling Finish(old, ...) could result into mem leaks because - // some finish event listeners, possibly releasing memory and resources, - // wouldn't be called anymore (because Finish() disables the operation and - // removes the event listeners). -} - -// operation structure allowing to subscribe to operation events and to -// navigate in the operation stack. Events -// bubble-up the operation stack, which allows listening to future events that -// might happen in the operation lifetime. -type operation struct { - parent Operation - eventRegister - dataBroadcaster - - disabled bool - mu sync.RWMutex - - // inContext is used to determine if RegisterOperation was called to put the Operation in the context tree. - // If so we need to remove it from the context tree when the Operation is finished. - inContext bool -} - -func (o *operation) Parent() Operation { - return o.parent -} - -// This is the one true Operation implementation! -func (o *operation) unwrap() *operation { return o } - -// NewRootOperation creates and returns a new root operation, with no parent -// operation. Root operations are meant to be the top-level operation of an -// operation stack, therefore receiving all the operation events. It allows to -// prepare a new set of event listeners, to then atomically swap it with the -// current one. -func NewRootOperation() Operation { - return &operation{parent: nil} -} - -// NewOperation creates and returns a new operation. It must be started by calling -// StartOperation, and finished by calling Finish. The returned operation should -// be used in wrapper types to provide statically typed start and finish -// functions. The following example shows how to wrap an operation so that its -// functions are statically typed (instead of dyngo's interface{} values): -// -// package mypackage -// import "dyngo" -// type ( -// MyOperation struct { -// dyngo.Operation -// } -// MyOperationArgs { /* ... */ } -// MyOperationRes { /* ... */ } -// ) -// func StartOperation(args MyOperationArgs, parent dyngo.Operation) MyOperation { -// op := MyOperation{Operation: dyngo.NewOperation(parent)} -// dyngo.StartOperation(op, args) -// return op -// } -// func (op MyOperation) Finish(res MyOperationRes) { -// dyngo.FinishOperation(op, res) -// } -func NewOperation(parent Operation) Operation { - if parent == nil { - if ptr := rootOperation.Load(); ptr != nil { - parent = *ptr - } - } - return &operation{parent: parent} -} - -// FromContext looks into the given context (or the GLS if orchestrion is enabled) for a parent Operation and returns it. -func FromContext(ctx context.Context) (Operation, bool) { - ctx = orchestrion.WrapContext(ctx) - if ctx == nil { - return nil, false - } - - op, ok := ctx.Value(contextKey{}).(Operation) - return op, ok -} - -// FindOperation looks into the current operation tree for the first operation matching the given type. -// It has a hardcoded limit of 32 levels of depth even looking for the operation in the parent tree -func FindOperation[T any, O interface { - Operation - *T -}](ctx context.Context) (*T, bool) { - op, found := FromContext(ctx) - if !found { - return nil, false - } - - for current := op; current != nil; current = current.unwrap().parent { - if o, ok := current.(O); ok { - return o, true - } - } - - return nil, false -} - -// StartOperation starts a new operation along with its arguments and emits a -// start event with the operation arguments. -func StartOperation[O Operation, E ArgOf[O]](op O, args E) { - // Bubble-up the start event starting from the parent operation as you can't - // listen for your own start event - for current := op.unwrap().parent; current != nil; current = current.Parent() { - emitEvent(¤t.unwrap().eventRegister, op, args) - } -} - -// StartAndRegisterOperation calls StartOperation and returns RegisterOperation result -func StartAndRegisterOperation[O Operation, E ArgOf[O]](ctx context.Context, op O, args E) context.Context { - StartOperation(op, args) - return RegisterOperation(ctx, op) -} - -// RegisterOperation registers the operation in the context tree. All operations that plan to have children operations -// should call this function to ensure the operation is properly linked in the context tree. -func RegisterOperation(ctx context.Context, op Operation) context.Context { - op.unwrap().inContext = true - return orchestrion.CtxWithValue(ctx, contextKey{}, op) -} - -// FinishOperation finishes the operation along with its results and emits a -// finish event with the operation results. -// The operation is then disabled and its event listeners removed. -func FinishOperation[O Operation, E ResultOf[O]](op O, results E) { - o := op.unwrap() - defer o.disable() // This will need the RLock below to be released... - - o.mu.RLock() - defer o.mu.RUnlock() // Deferred and stacked on top of the previously deferred call to o.disable() - - if o.inContext { - orchestrion.GLSPopValue(contextKey{}) - } - - if o.disabled { - return - } - - var current Operation = op - for ; current != nil; current = current.Parent() { - emitEvent(¤t.unwrap().eventRegister, op, results) - } -} - -// Disable the operation and remove all its event listeners. -func (o *operation) disable() { - o.mu.Lock() - defer o.mu.Unlock() - - if o.disabled { - return - } - - o.disabled = true - o.eventRegister.clear() -} - -// On registers and event listener that will be called when the operation -// begins. -func On[O Operation, E ArgOf[O]](op Operation, l EventListener[O, E]) { - o := op.unwrap() - - o.mu.RLock() - defer o.mu.RUnlock() - if o.disabled { - return - } - addEventListener(&o.eventRegister, l) -} - -// OnFinish registers an event listener that will be called when the operation -// finishes. -func OnFinish[O Operation, E ResultOf[O]](op Operation, l EventListener[O, E]) { - o := op.unwrap() - - o.mu.RLock() - defer o.mu.RUnlock() - if o.disabled { - return - } - addEventListener(&o.eventRegister, l) -} - -func OnData[T any](op Operation, l DataListener[T]) { - o := op.unwrap() - - o.mu.RLock() - defer o.mu.RUnlock() - if o.disabled { - return - } - addDataListener(&o.dataBroadcaster, l) -} - -// EmitData sends a data event up the operation stack. Listeners will be matched -// based on `T`. Callers may need to manually specify T when the static type of -// the value is more specific that the intended data event type. -func EmitData[T any](op Operation, data T) { - o := op.unwrap() - - o.mu.RLock() - defer o.mu.RUnlock() - if o.disabled { - return - } - // Bubble up the data to the stack of operations. Contrary to events, - // we also send the data to ourselves since SDK operations are leaf operations - // that both emit and listen for data (errors). - for current := op; current != nil; current = current.Parent() { - emitData(¤t.unwrap().dataBroadcaster, data) - } -} - -type ( - // eventRegister implements a thread-safe list of event listeners. - eventRegister struct { - listeners eventListenerMap - mu sync.RWMutex - } - - // eventListenerMap is the map of event listeners. The list of listeners are - // indexed by the operation argument or result type the event listener - // expects. - eventListenerMap map[any][]any - - typeID[T any] struct{} - - dataBroadcaster struct { - listeners dataListenerMap - mu sync.RWMutex - } - - DataListener[T any] func(T) - dataListenerMap map[any][]any -) - -func addDataListener[T any](b *dataBroadcaster, l DataListener[T]) { - b.mu.Lock() - defer b.mu.Unlock() - - if b.listeners == nil { - b.listeners = make(dataListenerMap) - } - key := typeID[DataListener[T]]{} - b.listeners[key] = append(b.listeners[key], l) -} - -func emitData[T any](b *dataBroadcaster, v T) { - defer func() { - if r := recover(); r != nil { - var buf [4_096]byte - n := runtime.Stack(buf[:], false) - LogError("appsec: recovered from an unexpected panic from a data listener (for %T): %+v\n%s", v, r, string(buf[:n])) - } - }() - b.mu.RLock() - defer b.mu.RUnlock() - - for _, listener := range b.listeners[typeID[DataListener[T]]{}] { - listener.(DataListener[T])(v) - } -} - -func addEventListener[O Operation, T any](r *eventRegister, l EventListener[O, T]) { - r.mu.Lock() - defer r.mu.Unlock() - - if r.listeners == nil { - r.listeners = make(eventListenerMap, 2) - } - key := typeID[EventListener[O, T]]{} - r.listeners[key] = append(r.listeners[key], l) -} - -func (r *eventRegister) clear() { - r.mu.Lock() - defer r.mu.Unlock() - r.listeners = nil -} - -func emitEvent[O Operation, T any](r *eventRegister, op O, v T) { - defer func() { - if r := recover(); r != nil { - var buf [4_096]byte - n := runtime.Stack(buf[:], false) - LogError("appsec: recovered from an unexpected panic from an event listener (%T > %T): %+v\n%s", op, v, r, string(buf[:n])) - } - }() - r.mu.RLock() - defer r.mu.RUnlock() - - for _, listener := range r.listeners[typeID[EventListener[O, T]]{}] { - listener.(EventListener[O, T])(op, v) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/README.md b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/README.md deleted file mode 100644 index c350c3c340..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/README.md +++ /dev/null @@ -1,25 +0,0 @@ -## GraphQL Threat Monitoring - -This package provides `dyngo` support for GraphQL operations, which are listened -to according to the following sequence diagram: - -```mermaid -sequenceDiagram - participant Root - participant Request - participant Execution - participant Field - - Root ->>+ Request: graphqlsec.StartRequest(...) - - Request ->>+ Execution: grapgqlsec.StartExecution(...) - - par for each field - Execution ->>+ Field: graphqlsec.StartField(...) - Field -->>- Execution: field.Finish(...) - end - - Execution -->>- Request: execution.Finish(...) - - Request -->>- Root: request.Finish(...) -``` diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/execution.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/execution.go deleted file mode 100644 index 06b6981b97..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/execution.go +++ /dev/null @@ -1,62 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package graphqlsec - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" -) - -type ( - ExecutionOperation struct { - dyngo.Operation - } - - // ExecutionOperationArgs describes arguments passed to a GraphQL query operation. - ExecutionOperationArgs struct { - // Variables is the user-provided variables object for the query. - Variables map[string]any - // Query is the query that is being executed. - Query string - // OperationName is the user-provided operation name for the query. - OperationName string - } - - ExecutionOperationRes struct { - // Data is the data returned from processing the GraphQL operation. - Data any - // Error is the error returned by processing the GraphQL Operation, if any. - Error error - } -) - -// Finish the GraphQL query operation, along with the given results, and emit a finish event up in -// the operation stack. -func (q *ExecutionOperation) Finish(res ExecutionOperationRes) { - dyngo.FinishOperation(q, res) -} - -func (ExecutionOperationArgs) IsArgOf(*ExecutionOperation) {} -func (ExecutionOperationRes) IsResultOf(*ExecutionOperation) {} - -// StartExecutionOperation starts a new GraphQL query operation, along with the given arguments, and -// emits a start event up in the operation stack. The operation is tracked on the returned context, -// and can be extracted later on using FromContext. -func StartExecutionOperation(ctx context.Context, args ExecutionOperationArgs) (context.Context, *ExecutionOperation) { - parent, ok := dyngo.FromContext(ctx) - if !ok { - log.Debug("appsec: StartExecutionOperation: no parent operation found in context") - } - - op := &ExecutionOperation{ - Operation: dyngo.NewOperation(parent), - } - - return dyngo.StartAndRegisterOperation(ctx, op, args), op -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/request.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/request.go deleted file mode 100644 index e1f363b92a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/request.go +++ /dev/null @@ -1,74 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package graphqlsec is the GraphQL instrumentation API and contract for AppSec -// defining an abstract run-time representation of AppSec middleware. GraphQL -// integrations must use this package to enable AppSec features for GraphQL, -// which listens to this package's operation events. -package graphqlsec - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" -) - -type ( - RequestOperation struct { - dyngo.Operation - // used in case we don't have a parent operation - *waf.ContextOperation - - // wafContextOwner indicates if the waf.ContextOperation was started by us or not and if we need to close it. - wafContextOwner bool - } - - // RequestOperationArgs describes arguments passed to a GraphQL request. - RequestOperationArgs struct { - RawQuery string // The raw, not-yet-parsed GraphQL query - OperationName string // The user-provided operation name for the query - Variables map[string]any // The user-provided variables object for this request - } - - RequestOperationRes struct { - // Data is the data returned from processing the GraphQL operation. - Data any - // Error is the error returned by processing the GraphQL Operation, if any. - Error error - } -) - -// Finish the GraphQL query operation, along with the given results, and emit a finish event up in -// the operation stack. -func (op *RequestOperation) Finish(res RequestOperationRes) { - dyngo.FinishOperation(op, res) - if op.wafContextOwner { - op.ContextOperation.Finish() - } -} - -func (RequestOperationArgs) IsArgOf(*RequestOperation) {} -func (RequestOperationRes) IsResultOf(*RequestOperation) {} - -// StartRequestOperation starts a new GraphQL request operation, along with the given arguments, and -// emits a start event up in the operation stack. The operation is usually linked to tge global root -// operation. The operation is tracked on the returned context, and can be extracted later on using -// FromContext. -func StartRequestOperation(ctx context.Context, span trace.TagSetter, args RequestOperationArgs) (context.Context, *RequestOperation) { - wafOp, found := dyngo.FindOperation[waf.ContextOperation](ctx) - if !found { // Usually we can find the HTTP Handler Operation as the parent, but it's technically optional - wafOp, ctx = waf.StartContextOperation(ctx, span) - } - - op := &RequestOperation{ - Operation: dyngo.NewOperation(wafOp), - ContextOperation: wafOp, - wafContextOwner: !found, // If we started the parent operation, we finish it, otherwise we don't - } - - return dyngo.StartAndRegisterOperation(ctx, op, args), op -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/resolve.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/resolve.go deleted file mode 100644 index fd1b1b6376..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec/resolve.go +++ /dev/null @@ -1,63 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package graphqlsec - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" -) - -type ( - ResolveOperation struct { - dyngo.Operation - } - - // ResolveOperationArgs describes arguments passed to a GraphQL field operation. - ResolveOperationArgs struct { - // TypeName is the name of the field's type - TypeName string - // FieldName is the name of the field - FieldName string - // Arguments is the arguments provided to the field resolver - Arguments map[string]any - // Trivial determines whether the resolution is trivial or not. Leave as false if undetermined. - Trivial bool - } - - ResolveOperationRes struct { - // Data is the data returned from processing the GraphQL operation. - Data any - // Error is the error returned by processing the GraphQL Operation, if any. - Error error - } -) - -// Finish the GraphQL Field operation, along with the given results, and emit a finish event up in -// the operation stack. -func (q *ResolveOperation) Finish(res ResolveOperationRes) { - dyngo.FinishOperation(q, res) -} - -func (ResolveOperationArgs) IsArgOf(*ResolveOperation) {} -func (ResolveOperationRes) IsResultOf(*ResolveOperation) {} - -// StartResolveOperation starts a new GraphQL Resolve operation, along with the given arguments, and -// emits a start event up in the operation stack. The operation is tracked on the returned context, -// and can be extracted later on using FromContext. -func StartResolveOperation(ctx context.Context, args ResolveOperationArgs) (context.Context, *ResolveOperation) { - parent, ok := dyngo.FromContext(ctx) - if !ok { - log.Debug("appsec: StartResolveOperation: no parent operation found in context") - } - - op := &ResolveOperation{ - Operation: dyngo.NewOperation(parent), - } - return dyngo.StartAndRegisterOperation(ctx, op, args), op -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec/grpc.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec/grpc.go deleted file mode 100644 index f6b6691f22..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec/grpc.go +++ /dev/null @@ -1,125 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package grpcsec is the gRPC instrumentation API and contract for AppSec -// defining an abstract run-time representation of gRPC handlers. -// gRPC integrations must use this package to enable AppSec features for gRPC, -// which listens to this package's operation events. -// -// Abstract gRPC server handler operation definitions. It is based on two -// operations allowing to describe every type of RPC: the HandlerOperation type -// which represents the RPC handler, and the ReceiveOperation type which -// represents the messages the RPC handler receives during its lifetime. -// This means that the ReceiveOperation(s) will happen within the -// HandlerOperation. -// Every type of RPC, unary, client streaming, server streaming, and -// bidirectional streaming RPCs, can be all represented with a HandlerOperation -// having one or several ReceiveOperation. -// The send operation is not required for now and therefore not defined, which -// means that server and bidirectional streaming RPCs currently have the same -// run-time representation as unary and client streaming RPCs. -package grpcsec - -import ( - "context" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" -) - -type ( - // HandlerOperation represents a gRPC server handler operation. - // It must be created with StartHandlerOperation() and finished with its - // Finish() method. - // Security events observed during the operation lifetime should be added - // to the operation using its AddSecurityEvent() method. - HandlerOperation struct { - dyngo.Operation - *waf.ContextOperation - - // wafContextOwner indicates if the waf.ContextOperation was started by us or not and if we need to close it. - wafContextOwner bool - } - - // HandlerOperationArgs is the grpc handler arguments. - HandlerOperationArgs struct { - // Method is the gRPC method name. - // Corresponds to the address `grpc.server.method`. - Method string - - // RPC metadata received by the gRPC handler. - // Corresponds to the address `grpc.server.request.metadata`. - Metadata map[string][]string - - // RemoteAddr is the IP address of the client that initiated the gRPC request. - // May be used as the address `http.client_ip`. - RemoteAddr string - } - - // HandlerOperationRes is the grpc handler results. Empty as of today. - HandlerOperationRes struct { - // Raw gRPC status code. - // Corresponds to the address `grpc.server.response.status`. - StatusCode int - } -) - -func (HandlerOperationArgs) IsArgOf(*HandlerOperation) {} -func (HandlerOperationRes) IsResultOf(*HandlerOperation) {} - -// StartHandlerOperation starts an gRPC server handler operation, along with the -// given arguments and parent operation, and emits a start event up in the -// operation stack. When parent is nil, the operation is linked to the global -// root operation. -func StartHandlerOperation(ctx context.Context, span trace.TagSetter, args HandlerOperationArgs) (context.Context, *HandlerOperation, *atomic.Pointer[actions.BlockGRPC]) { - wafOp, found := dyngo.FindOperation[waf.ContextOperation](ctx) - if !found { - wafOp, ctx = waf.StartContextOperation(ctx, span) - } - op := &HandlerOperation{ - Operation: dyngo.NewOperation(wafOp), - ContextOperation: wafOp, - wafContextOwner: !found, - } - - var block atomic.Pointer[actions.BlockGRPC] - dyngo.OnData(op, func(err *actions.BlockGRPC) { - block.Store(err) - }) - - return dyngo.StartAndRegisterOperation(ctx, op, args), op, &block -} - -// MonitorRequestMessage monitors the gRPC request message body as the WAF address `grpc.server.request.message`. -func MonitorRequestMessage(ctx context.Context, msg any) error { - return waf.RunSimple(ctx, - addresses.NewAddressesBuilder(). - WithGRPCRequestMessage(msg). - Build(), - "appsec: failed to monitor gRPC request message body") -} - -// MonitorResponseMessage monitors the gRPC response message body as the WAF address `grpc.server.response.message`. -func MonitorResponseMessage(ctx context.Context, msg any) error { - return waf.RunSimple(ctx, - addresses.NewAddressesBuilder(). - WithGRPCResponseMessage(msg). - Build(), - "appsec: failed to monitor gRPC response message body") - -} - -// Finish the gRPC handler operation, along with the given results, and emit a -// finish event up in the operation stack. -func (op *HandlerOperation) Finish(res HandlerOperationRes) { - dyngo.FinishOperation(op, res) - if op.wafContextOwner { - op.ContextOperation.Finish() - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/config.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/config.go deleted file mode 100644 index e61acd0da3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/config.go +++ /dev/null @@ -1,30 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package httpsec - -import ( - "net/http" -) - -type Config struct { - // Framework is the name of the framework or library being used (optional). - Framework string - // OnBlock is a list of callbacks to be invoked when a block decision is made. - OnBlock []func() - // ResponseHeaderCopier provides a way to access response headers for reading - // purposes (the value may be provided by copy). This allows customers to - // apply synchronization if they allow http.ResponseWriter objects to be - // accessed by multiple goroutines. - ResponseHeaderCopier func(http.ResponseWriter) http.Header - // Route is the route name to be used for the request. - Route string - // RouteParams is a map of route parameters to be used for the request. - RouteParams map[string]string -} - -var defaultWrapHandlerConfig = &Config{ - ResponseHeaderCopier: func(w http.ResponseWriter) http.Header { return w.Header() }, -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/http.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/http.go deleted file mode 100644 index 942a1b1fcd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/http.go +++ /dev/null @@ -1,245 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package httpsec defines is the HTTP instrumentation API and contract for -// AppSec. It defines an abstract representation of HTTP handlers, along with -// helper functions to wrap (aka. instrument) standard net/http handlers. -// HTTP integrations must use this package to enable AppSec features for HTTP, -// which listens to this package's operation events. -package httpsec - -import ( - "context" - // Blank import needed to use embed for the default blocked response payloads - _ "embed" - "net/http" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" -) - -// HandlerOperation type representing an HTTP operation. It must be created with -// StartOperation() and finished with its Finish(). -type ( - HandlerOperation struct { - dyngo.Operation - *waf.ContextOperation - - // wafContextOwner indicates if the waf.ContextOperation was started by us or not and if we need to close it. - wafContextOwner bool - - // framework is the name of the framework or library that started the operation. - framework string - // method is the HTTP method for the current handler operation. - method string - // route is the HTTP route for the current handler operation (or the URL if no route is available). - route string - } - - // HandlerOperationArgs is the HTTP handler operation arguments. - HandlerOperationArgs struct { - Framework string // Optional: name of the framework or library being used - Method string - RequestURI string - RequestRoute string - Host string - RemoteAddr string - Headers map[string][]string - Cookies map[string][]string - QueryParams map[string][]string - PathParams map[string]string - } - - // HandlerOperationRes is the HTTP handler operation results. - HandlerOperationRes struct { - Headers map[string][]string - StatusCode int - } -) - -func (HandlerOperationArgs) IsArgOf(*HandlerOperation) {} -func (HandlerOperationRes) IsResultOf(*HandlerOperation) {} - -func StartOperation(ctx context.Context, args HandlerOperationArgs, span trace.TagSetter) (*HandlerOperation, *atomic.Pointer[actions.BlockHTTP], context.Context) { - wafOp, found := dyngo.FindOperation[waf.ContextOperation](ctx) - if !found { - wafOp, ctx = waf.StartContextOperation(ctx, span) - } - - op := &HandlerOperation{ - Operation: dyngo.NewOperation(wafOp), - ContextOperation: wafOp, - wafContextOwner: !found, // If we started the parent operation, we finish it, otherwise we don't - framework: args.Framework, - method: args.Method, - route: args.RequestRoute, - } - - // We need to use an atomic pointer to store the action because the action may be created asynchronously in the future - var action atomic.Pointer[actions.BlockHTTP] - dyngo.OnData(op, func(a *actions.BlockHTTP) { - action.Store(a) - }) - - return op, &action, dyngo.StartAndRegisterOperation(ctx, op, args) -} - -// Framework returns the name of the framework or library that started the operation. -func (op *HandlerOperation) Framework() string { - return op.framework -} - -// Method returns the HTTP method for the current handler operation. -func (op *HandlerOperation) Method() string { - return op.method -} - -// Route returns the HTTP route for the current handler operation. -func (op *HandlerOperation) Route() string { - return op.route -} - -// Finish the HTTP handler operation and its children operations and write everything to the service entry span. -func (op *HandlerOperation) Finish(res HandlerOperationRes) { - dyngo.FinishOperation(op, res) - if op.wafContextOwner { - op.ContextOperation.Finish() - } -} - -const ( - monitorParsedBodyErrorLog = ` -"appsec: parsed http body monitoring ignored: could not find the http handler instrumentation metadata in the request context: - the request handler is not being monitored by a middleware function or the provided context is not the expected request context -` - monitorResponseBodyErrorLog = ` -"appsec: http response body monitoring ignored: could not find the http handler instrumentation metadata in the request context: - the request handler is not being monitored by a middleware function or the provided context is not the expected request context -` -) - -// MonitorParsedBody starts and finishes the SDK body operation. -// This function should not be called when AppSec is disabled in order to -// get more accurate error logs. -func MonitorParsedBody(ctx context.Context, body any) error { - return waf.RunSimple(ctx, - addresses.NewAddressesBuilder(). - WithRequestBody(body). - Build(), - monitorParsedBodyErrorLog, - ) -} - -// MonitorResponseBody gets the response body through the in-app WAF. -// This function should not be called when AppSec is disabled in order to get -// more accurate error logs. -func MonitorResponseBody(ctx context.Context, body any) error { - return waf.RunSimple(ctx, - addresses.NewAddressesBuilder(). - WithResponseBody(body). - Build(), - monitorResponseBodyErrorLog, - ) -} - -// Return the map of parsed cookies if any and following the specification of -// the rule address `server.request.cookies`. -func makeCookies(parsed []*http.Cookie) map[string][]string { - if len(parsed) == 0 { - return nil - } - cookies := make(map[string][]string, len(parsed)) - for _, c := range parsed { - cookies[c.Name] = append(cookies[c.Name], c.Value) - } - return cookies -} - -// BeforeHandle contains the appsec functionality that should be executed before a http.Handler runs. -// It returns the modified http.ResponseWriter and http.Request, an additional afterHandle function -// that should be executed after the Handler runs, and a handled bool that instructs if the request has been handled -// or not - in case it was handled, the original handler should not run. -func BeforeHandle( - w http.ResponseWriter, - r *http.Request, - span trace.TagSetter, - opts *Config, -) (http.ResponseWriter, *http.Request, func(), bool) { - if opts == nil { - opts = defaultWrapHandlerConfig - } - if opts.ResponseHeaderCopier == nil { - opts.ResponseHeaderCopier = defaultWrapHandlerConfig.ResponseHeaderCopier - } - - op, blockAtomic, ctx := StartOperation(r.Context(), HandlerOperationArgs{ - Framework: opts.Framework, - Method: r.Method, - RequestURI: r.RequestURI, - RequestRoute: opts.Route, - Host: r.Host, - RemoteAddr: r.RemoteAddr, - Headers: r.Header, - Cookies: makeCookies(r.Cookies()), - QueryParams: r.URL.Query(), - PathParams: opts.RouteParams, - }, span) - tr := r.WithContext(ctx) - - afterHandle := func() { - var statusCode int - if res, ok := w.(interface{ Status() int }); ok { - statusCode = res.Status() - } - op.Finish(HandlerOperationRes{ - Headers: opts.ResponseHeaderCopier(w), - StatusCode: statusCode, - }) - - // Execute the onBlock functions to make sure blocking works properly - // in case we are instrumenting the Gin framework - if blockPtr := blockAtomic.Load(); blockPtr != nil { - for _, f := range opts.OnBlock { - f() - } - - if blockPtr.Handler != nil { - blockPtr.Handler.ServeHTTP(w, tr) - } - } - } - - handled := false - if blockPtr := blockAtomic.Load(); blockPtr != nil && blockPtr.Handler != nil { - // handler is replaced - blockPtr.Handler.ServeHTTP(w, tr) - blockPtr.Handler = nil - handled = true - } - return w, tr, afterHandle, handled -} - -// WrapHandler wraps the given HTTP handler with the abstract HTTP operation defined by HandlerOperationArgs and -// HandlerOperationRes. -// The onBlock params are used to cleanup the context when needed. -// It is a specific patch meant for Gin, for which we must abort the -// context since it uses a queue of handlers and it's the only way to make -// sure other queued handlers don't get executed. -// TODO: this patch must be removed/improved when we rework our actions/operations system -func WrapHandler(handler http.Handler, span trace.TagSetter, opts *Config) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - tw, tr, afterHandle, handled := BeforeHandle(w, r, span, opts) - defer afterHandle() - if handled { - return - } - - handler.ServeHTTP(tw, tr) - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/roundtripper.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/roundtripper.go deleted file mode 100644 index 6b27d99047..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec/roundtripper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package httpsec - -import ( - "context" - "sync" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -var badInputContextOnce sync.Once - -type ( - RoundTripOperation struct { - dyngo.Operation - } - - // RoundTripOperationArgs is the round trip operation arguments. - RoundTripOperationArgs struct { - // URL corresponds to the address `server.io.net.url`. - URL string - } - - // RoundTripOperationRes is the round trip operation results. - RoundTripOperationRes struct{} -) - -func (RoundTripOperationArgs) IsArgOf(*RoundTripOperation) {} -func (RoundTripOperationRes) IsResultOf(*RoundTripOperation) {} - -func ProtectRoundTrip(ctx context.Context, url string) error { - opArgs := RoundTripOperationArgs{ - URL: url, - } - - parent, _ := dyngo.FromContext(ctx) - if parent == nil { // No parent operation => we can't monitor the request - badInputContextOnce.Do(func() { - log.Debug("appsec: outgoing http request monitoring ignored: could not find the handler " + - "instrumentation metadata in the request context: the request handler is not being monitored by a " + - "middleware function or the incoming request context has not be forwarded correctly to the roundtripper") - }) - return nil - } - - op := &RoundTripOperation{ - Operation: dyngo.NewOperation(parent), - } - - var err *events.BlockingSecurityEvent - // TODO: move the data listener as a setup function of httpsec.StartRoundTripperOperation(ars, ) - dyngo.OnData(op, func(e *events.BlockingSecurityEvent) { - err = e - }) - - dyngo.StartOperation(op, opArgs) - dyngo.FinishOperation(op, RoundTripOperationRes{}) - - if err != nil { - log.Debug("appsec: outgoing http request blocked by the WAF on URL: %s", url) - return err - } - - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec/lfi.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec/lfi.go deleted file mode 100644 index 555fd73a6f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec/lfi.go +++ /dev/null @@ -1,41 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package ossec - -import ( - "io/fs" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" -) - -type ( - // OpenOperation type embodies any kind of function calls that will result in a call to an open(2) syscall - OpenOperation struct { - dyngo.Operation - blockErr error - } - - // OpenOperationArgs is the arguments for an open operation - OpenOperationArgs struct { - // Path is the path to the file to be opened - Path string - // Flags are the flags passed to the open(2) syscall - Flags int - // Perms are the permissions passed to the open(2) syscall if the creation of a file is required - Perms fs.FileMode - } - - // OpenOperationRes is the result of an open operation - OpenOperationRes[File any] struct { - // File is the file descriptor returned by the open(2) syscall - File *File - // Err is the error returned by the function - Err *error - } -) - -func (OpenOperationArgs) IsArgOf(*OpenOperation) {} -func (OpenOperationRes[File]) IsResultOf(*OpenOperation) {} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec/sql.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec/sql.go deleted file mode 100644 index 3b1db53068..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec/sql.go +++ /dev/null @@ -1,71 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package sqlsec - -import ( - "context" - "sync" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -var badInputContextOnce sync.Once - -type ( - SQLOperation struct { - dyngo.Operation - } - - SQLOperationArgs struct { - // Query corresponds to the addres `server.db.statement` - Query string - // Driver corresponds to the addres `server.db.system` - Driver string - } - SQLOperationRes struct{} -) - -func (SQLOperationArgs) IsArgOf(*SQLOperation) {} -func (SQLOperationRes) IsResultOf(*SQLOperation) {} - -func ProtectSQLOperation(ctx context.Context, query, driver string) error { - opArgs := SQLOperationArgs{ - Query: query, - Driver: driver, - } - - parent, _ := dyngo.FromContext(ctx) - if parent == nil { // No parent operation => we can't monitor the request - badInputContextOnce.Do(func() { - log.Debug("appsec: outgoing SQL operation monitoring ignored: could not find the handler " + - "instrumentation metadata in the request context: the request handler is not being monitored by a " + - "middleware function or the incoming request context has not be forwarded correctly to the SQL connection") - }) - return nil - } - - op := &SQLOperation{ - Operation: dyngo.NewOperation(parent), - } - - var err *events.BlockingSecurityEvent - // TODO: move the data listener as a setup function of SQLsec.StartSQLOperation(ars, ) - dyngo.OnData(op, func(e *events.BlockingSecurityEvent) { - err = e - }) - - dyngo.StartOperation(op, opArgs) - dyngo.FinishOperation(op, SQLOperationRes{}) - - if err != nil { - log.Debug("appsec: outgoing SQL operation blocked by the WAF") - return err - } - - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/actions.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/actions.go deleted file mode 100644 index b65d68dbe0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/actions.go +++ /dev/null @@ -1,63 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package actions - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" -) - -type ( - // Action is a generic interface that represents any WAF action - Action interface { - EmitData(op dyngo.Operation) - } -) - -type actionHandler func(map[string]any) []Action - -// actionHandlers is a map of action types to their respective handler functions -// It is populated by the init functions of the actions packages -var actionHandlers = map[string]actionHandler{} - -func registerActionHandler(aType string, handler actionHandler) { - if _, ok := actionHandlers[aType]; ok { - log.Warn("appsec: action type `%s` already registered", aType) - return - } - actionHandlers[aType] = handler -} - -// SendActionEvents sends the relevant actions to the operation's data listener. -// It returns true if at least one of those actions require interrupting the request handler -// When SDKError is not nil, this error is sent to the op with EmitData so that the invoked SDK can return it -// returns whenever the request should be interrupted -func SendActionEvents(op dyngo.Operation, actions map[string]any) bool { - var blocked bool - for aType, params := range actions { - log.Debug("appsec: processing %q action with params %v", aType, params) //nolint:gocritic - params, ok := params.(map[string]any) - if !ok { - telemetrylog.Error("appsec: could not cast action params to map[string]any from %T", params) - continue - } - - blocked = blocked || aType == "block_request" - - actionHandler, ok := actionHandlers[aType] - if !ok { - telemetrylog.Error("appsec: unknown action type `%s`", aType) - continue - } - - for _, a := range actionHandler(params) { - a.EmitData(op) - } - } - - return blocked -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/block.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/block.go deleted file mode 100644 index e043205dee..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/block.go +++ /dev/null @@ -1,161 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package actions - -import ( - _ "embed" // embed is used to embed the blocked-template.json and blocked-template.html files - "net/http" - "os" - "strings" - - "github.com/go-viper/mapstructure/v2" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// blockedTemplateJSON is the default JSON template used to write responses for blocked requests -// -//go:embed blocked-template.json -var blockedTemplateJSON []byte - -// blockedTemplateHTML is the default HTML template used to write responses for blocked requests -// -//go:embed blocked-template.html -var blockedTemplateHTML []byte - -const ( - envBlockedTemplateHTML = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML" - envBlockedTemplateJSON = "DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON" -) - -func init() { - for env, template := range map[string]*[]byte{envBlockedTemplateJSON: &blockedTemplateJSON, envBlockedTemplateHTML: &blockedTemplateHTML} { - if path, ok := os.LookupEnv(env); ok { - if t, err := os.ReadFile(path); err != nil { - log.Error("Could not read template at %q: %v", path, err.Error()) - } else { - *template = t - } - } - } - - registerActionHandler("block_request", NewBlockAction) -} - -type ( - // blockActionParams are the dynamic parameters to be provided to a "block_request" - // action type upon invocation - blockActionParams struct { - // GRPCStatusCode is the gRPC status code to be returned. Since 0 is the OK status, the value is nullable to - // be able to distinguish between unset and defaulting to Abort (10), or set to OK (0). - GRPCStatusCode *int `mapstructure:"grpc_status_code,omitempty"` - StatusCode int `mapstructure:"status_code"` - Type string `mapstructure:"type,omitempty"` - } - // GRPCWrapper is an opaque prototype abstraction for a gRPC handler (to avoid importing grpc) - // that returns a status code and an error - GRPCWrapper func() (uint32, error) - - // BlockGRPC are actions that interact with a GRPC request flow - BlockGRPC struct { - GRPCWrapper - } - - // BlockHTTP are actions that interact with an HTTP request flow - BlockHTTP struct { - http.Handler - } -) - -func (a *BlockGRPC) EmitData(op dyngo.Operation) { - dyngo.EmitData(op, a) - dyngo.EmitData(op, &events.BlockingSecurityEvent{}) -} - -func (a *BlockHTTP) EmitData(op dyngo.Operation) { - dyngo.EmitData(op, a) - dyngo.EmitData(op, &events.BlockingSecurityEvent{}) -} - -func newGRPCBlockRequestAction(status int) *BlockGRPC { - return &BlockGRPC{GRPCWrapper: newGRPCBlockHandler(status)} -} - -func newGRPCBlockHandler(status int) GRPCWrapper { - return func() (uint32, error) { - return uint32(status), &events.BlockingSecurityEvent{} - } -} - -func blockParamsFromMap(params map[string]any) (blockActionParams, error) { - grpcCode := 10 - p := blockActionParams{ - Type: "auto", - StatusCode: 403, - GRPCStatusCode: &grpcCode, - } - - if err := mapstructure.WeakDecode(params, &p); err != nil { - return p, err - } - - if p.GRPCStatusCode == nil { - p.GRPCStatusCode = &grpcCode - } - - return p, nil -} - -// NewBlockAction creates an action for the "block_request" action type -func NewBlockAction(params map[string]any) []Action { - p, err := blockParamsFromMap(params) - if err != nil { - log.Debug("appsec: couldn't decode redirect action parameters") - return nil - } - return []Action{ - newHTTPBlockRequestAction(p.StatusCode, p.Type), - newGRPCBlockRequestAction(*p.GRPCStatusCode), - } -} - -func newHTTPBlockRequestAction(status int, template string) *BlockHTTP { - return &BlockHTTP{Handler: newBlockHandler(status, template)} -} - -// newBlockHandler creates, initializes and returns a new BlockRequestAction -func newBlockHandler(status int, template string) http.Handler { - htmlHandler := newBlockRequestHandler(status, "text/html", blockedTemplateHTML) - jsonHandler := newBlockRequestHandler(status, "application/json", blockedTemplateJSON) - switch template { - case "json": - return jsonHandler - case "html": - return htmlHandler - default: - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - h := jsonHandler - hdr := r.Header.Get("Accept") - htmlIdx := strings.Index(hdr, "text/html") - jsonIdx := strings.Index(hdr, "application/json") - // Switch to html handler if text/html comes before application/json in the Accept header - if htmlIdx != -1 && (jsonIdx == -1 || htmlIdx < jsonIdx) { - h = htmlHandler - } - h.ServeHTTP(w, r) - }) - } -} - -func newBlockRequestHandler(status int, ct string, payload []byte) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { - w.Header().Set("Content-Type", ct) - w.WriteHeader(status) - w.Write(payload) - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.html b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.html deleted file mode 100644 index b43edd96dd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.html +++ /dev/null @@ -1 +0,0 @@ -You've been blocked

Sorry, you cannot access this page. Please contact the customer service team.

\ No newline at end of file diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.json b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.json deleted file mode 100644 index 12ae29696f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/blocked-template.json +++ /dev/null @@ -1 +0,0 @@ -{"errors":[{"title":"You've been blocked","detail":"Sorry, you cannot access this page. Please contact the customer service team. Security provided by Datadog."}]} \ No newline at end of file diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/http_redirect.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/http_redirect.go deleted file mode 100644 index 562bc31ad6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/http_redirect.go +++ /dev/null @@ -1,54 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package actions - -import ( - "net/http" - - "github.com/go-viper/mapstructure/v2" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// redirectActionParams are the dynamic parameters to be provided to a "redirect_request" -// action type upon invocation -type redirectActionParams struct { - Location string `mapstructure:"location,omitempty"` - StatusCode int `mapstructure:"status_code"` -} - -func init() { - registerActionHandler("redirect_request", NewRedirectAction) -} - -func redirectParamsFromMap(params map[string]any) (redirectActionParams, error) { - var p redirectActionParams - err := mapstructure.WeakDecode(params, &p) - return p, err -} - -func newRedirectRequestAction(status int, loc string) *BlockHTTP { - // Default to 303 if status is out of redirection codes bounds - if status < http.StatusMultipleChoices || status >= http.StatusBadRequest { - status = http.StatusSeeOther - } - - // If location is not set we fall back on a default block action - if loc == "" { - return &BlockHTTP{Handler: newBlockHandler(http.StatusForbidden, string(blockedTemplateJSON))} - } - return &BlockHTTP{Handler: http.RedirectHandler(loc, status)} -} - -// NewRedirectAction creates an action for the "redirect_request" action type -func NewRedirectAction(params map[string]any) []Action { - p, err := redirectParamsFromMap(params) - if err != nil { - log.Debug("appsec: couldn't decode redirect action parameters") - return nil - } - return []Action{newRedirectRequestAction(p.StatusCode, p.Location)} -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/stacktrace.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/stacktrace.go deleted file mode 100644 index 9ddd07cf3e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions/stacktrace.go +++ /dev/null @@ -1,44 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package actions - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/stacktrace" -) - -func init() { - registerActionHandler("generate_stack", NewStackTraceAction) -} - -// StackTraceAction are actions that generate a stacktrace -type StackTraceAction struct { - Event *stacktrace.Event -} - -func (a *StackTraceAction) EmitData(op dyngo.Operation) { dyngo.EmitData(op, a) } - -// NewStackTraceAction creates an action for the "stacktrace" action type -func NewStackTraceAction(params map[string]any) []Action { - id, ok := params["stack_id"] - if !ok { - log.Debug("appsec: could not read stack_id parameter for generate_stack action") - return nil - } - - strID, ok := id.(string) - if !ok { - log.Debug("appsec: could not cast stacktrace ID to string") - return nil - } - - return []Action{ - &StackTraceAction{ - stacktrace.NewEvent(stacktrace.ExploitEvent, stacktrace.WithID(strID)), - }, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/addresses.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/addresses.go deleted file mode 100644 index e81f084bab..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/addresses.go +++ /dev/null @@ -1,44 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package addresses - -const ( - ServerRequestMethodAddr = "server.request.method" - ServerRequestRawURIAddr = "server.request.uri.raw" - ServerRequestHeadersNoCookiesAddr = "server.request.headers.no_cookies" - ServerRequestCookiesAddr = "server.request.cookies" - ServerRequestQueryAddr = "server.request.query" - ServerRequestPathParamsAddr = "server.request.path_params" - ServerRequestBodyAddr = "server.request.body" - ServerResponseBodyAddr = "server.response.body" - ServerResponseStatusAddr = "server.response.status" - ServerResponseHeadersNoCookiesAddr = "server.response.headers.no_cookies" - - ClientIPAddr = "http.client_ip" - - UserIDAddr = "usr.id" - UserLoginAddr = "usr.login" - UserOrgAddr = "usr.org" - UserSessionIDAddr = "usr.session_id" - UserLoginSuccessAddr = "server.business_logic.users.login.success" - UserLoginFailureAddr = "server.business_logic.users.login.failure" - - ServerIoNetURLAddr = "server.io.net.url" - ServerIOFSFileAddr = "server.io.fs.file" - ServerDBStatementAddr = "server.db.statement" - ServerDBTypeAddr = "server.db.system" - ServerSysExecCmd = "server.sys.exec.cmd" - - GRPCServerMethodAddr = "grpc.server.method" - GRPCServerRequestMetadataAddr = "grpc.server.request.metadata" - GRPCServerRequestMessageAddr = "grpc.server.request.message" - GRPCServerResponseMessageAddr = "grpc.server.response.message" - GRPCServerResponseMetadataHeadersAddr = "grpc.server.response.metadata.headers" - GRPCServerResponseMetadataTrailersAddr = "grpc.server.response.metadata.trailers" - GRPCServerResponseStatusCodeAddr = "grpc.server.response.status" - - GraphQLServerResolverAddr = "graphql.server.resolver" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/builder.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/builder.go deleted file mode 100644 index 0e4930e2ae..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/builder.go +++ /dev/null @@ -1,286 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package addresses - -import ( - "net/netip" - "strconv" - - "github.com/DataDog/go-libddwaf/v4" -) - -const contextProcessKey = "waf.context.processor" - -type RunAddressDataBuilder struct { - libddwaf.RunAddressData -} - -func NewAddressesBuilder() *RunAddressDataBuilder { - return &RunAddressDataBuilder{ - RunAddressData: libddwaf.RunAddressData{ - Persistent: make(map[string]any, 1), - Ephemeral: make(map[string]any, 1), - TimerKey: WAFScope, // Default value for TimerKey - }, - } -} - -func (b *RunAddressDataBuilder) WithMethod(method string) *RunAddressDataBuilder { - b.Persistent[ServerRequestMethodAddr] = method - return b -} - -func (b *RunAddressDataBuilder) WithRawURI(uri string) *RunAddressDataBuilder { - b.Persistent[ServerRequestRawURIAddr] = uri - return b -} - -func (b *RunAddressDataBuilder) WithHeadersNoCookies(headers map[string][]string) *RunAddressDataBuilder { - if len(headers) == 0 { - headers = nil - } - b.Persistent[ServerRequestHeadersNoCookiesAddr] = headers - return b -} - -func (b *RunAddressDataBuilder) WithCookies(cookies map[string][]string) *RunAddressDataBuilder { - if len(cookies) == 0 { - return b - } - b.Persistent[ServerRequestCookiesAddr] = cookies - return b -} - -func (b *RunAddressDataBuilder) WithQuery(query map[string][]string) *RunAddressDataBuilder { - if len(query) == 0 { - query = nil - } - b.Persistent[ServerRequestQueryAddr] = query - return b -} - -func (b *RunAddressDataBuilder) WithPathParams(params map[string]string) *RunAddressDataBuilder { - if len(params) == 0 { - return b - } - b.Persistent[ServerRequestPathParamsAddr] = params - return b -} - -func (b *RunAddressDataBuilder) WithRequestBody(body any) *RunAddressDataBuilder { - if body == nil { - return b - } - b.Persistent[ServerRequestBodyAddr] = body - return b -} - -func (b *RunAddressDataBuilder) WithResponseBody(body any) *RunAddressDataBuilder { - if body == nil { - return b - } - b.Persistent[ServerResponseBodyAddr] = body - return b -} - -func (b *RunAddressDataBuilder) WithResponseStatus(status int) *RunAddressDataBuilder { - if status == 0 { - return b - } - b.Persistent[ServerResponseStatusAddr] = strconv.Itoa(status) - return b -} - -func (b *RunAddressDataBuilder) WithResponseHeadersNoCookies(headers map[string][]string) *RunAddressDataBuilder { - if len(headers) == 0 { - return b - } - b.Persistent[ServerResponseHeadersNoCookiesAddr] = headers - return b -} - -func (b *RunAddressDataBuilder) WithClientIP(ip netip.Addr) *RunAddressDataBuilder { - if !ip.IsValid() { - return b - } - b.Persistent[ClientIPAddr] = ip.String() - return b -} - -func (b *RunAddressDataBuilder) WithUserID(id string) *RunAddressDataBuilder { - if id == "" { - return b - } - b.Persistent[UserIDAddr] = id - return b -} - -func (b *RunAddressDataBuilder) WithUserLogin(login string) *RunAddressDataBuilder { - if login == "" { - return b - } - b.Persistent[UserLoginAddr] = login - return b -} - -func (b *RunAddressDataBuilder) WithUserOrg(org string) *RunAddressDataBuilder { - if org == "" { - return b - } - b.Persistent[UserOrgAddr] = org - return b -} - -func (b *RunAddressDataBuilder) WithUserSessionID(id string) *RunAddressDataBuilder { - if id == "" { - return b - } - b.Persistent[UserSessionIDAddr] = id - return b - -} - -func (b *RunAddressDataBuilder) WithUserLoginSuccess() *RunAddressDataBuilder { - b.Persistent[UserLoginSuccessAddr] = nil - return b -} - -func (b *RunAddressDataBuilder) WithUserLoginFailure() *RunAddressDataBuilder { - b.Persistent[UserLoginFailureAddr] = nil - return b -} - -func (b *RunAddressDataBuilder) WithFilePath(file string) *RunAddressDataBuilder { - if file == "" { - return b - } - b.Ephemeral[ServerIOFSFileAddr] = file - b.TimerKey = RASPScope - return b -} - -func (b *RunAddressDataBuilder) WithURL(url string) *RunAddressDataBuilder { - if url == "" { - return b - } - b.Ephemeral[ServerIoNetURLAddr] = url - b.TimerKey = RASPScope - return b -} - -func (b *RunAddressDataBuilder) WithDBStatement(statement string) *RunAddressDataBuilder { - if statement == "" { - return b - } - b.Ephemeral[ServerDBStatementAddr] = statement - b.TimerKey = RASPScope - return b -} - -func (b *RunAddressDataBuilder) WithDBType(driver string) *RunAddressDataBuilder { - if driver == "" { - return b - } - b.Ephemeral[ServerDBTypeAddr] = driver - b.TimerKey = RASPScope - return b -} - -func (b *RunAddressDataBuilder) WithSysExecCmd(cmd []string) *RunAddressDataBuilder { - if len(cmd) == 0 { - return b - } - b.Ephemeral[ServerSysExecCmd] = cmd - b.TimerKey = RASPScope - return b -} - -func (b *RunAddressDataBuilder) WithGRPCMethod(method string) *RunAddressDataBuilder { - if method == "" { - return b - } - b.Persistent[GRPCServerMethodAddr] = method - return b -} - -func (b *RunAddressDataBuilder) WithGRPCRequestMessage(message any) *RunAddressDataBuilder { - if message == nil { - return b - } - b.Ephemeral[GRPCServerRequestMessageAddr] = message - return b -} - -func (b *RunAddressDataBuilder) WithGRPCRequestMetadata(metadata map[string][]string) *RunAddressDataBuilder { - if len(metadata) == 0 { - return b - } - b.Persistent[GRPCServerRequestMetadataAddr] = metadata - return b -} - -func (b *RunAddressDataBuilder) WithGRPCResponseMessage(message any) *RunAddressDataBuilder { - if message == nil { - return b - } - b.Ephemeral[GRPCServerResponseMessageAddr] = message - return b -} - -func (b *RunAddressDataBuilder) WithGRPCResponseMetadataHeaders(headers map[string][]string) *RunAddressDataBuilder { - if len(headers) == 0 { - return b - } - b.Persistent[GRPCServerResponseMetadataHeadersAddr] = headers - return b -} - -func (b *RunAddressDataBuilder) WithGRPCResponseMetadataTrailers(trailers map[string][]string) *RunAddressDataBuilder { - if len(trailers) == 0 { - return b - } - b.Persistent[GRPCServerResponseMetadataTrailersAddr] = trailers - return b -} - -func (b *RunAddressDataBuilder) WithGRPCResponseStatusCode(status int) *RunAddressDataBuilder { - if status == 0 { - return b - } - b.Persistent[GRPCServerResponseStatusCodeAddr] = strconv.Itoa(status) - return b -} - -func (b *RunAddressDataBuilder) WithGraphQLResolver(fieldName string, args map[string]any) *RunAddressDataBuilder { - if _, ok := b.Ephemeral[GraphQLServerResolverAddr]; !ok { - b.Ephemeral[GraphQLServerResolverAddr] = make(map[string]any, 1) - } - - b.Ephemeral[GraphQLServerResolverAddr].(map[string]any)[fieldName] = args - return b -} - -func (b *RunAddressDataBuilder) ExtractSchema() *RunAddressDataBuilder { - if _, ok := b.Persistent[contextProcessKey]; !ok { - b.Persistent[contextProcessKey] = make(map[string]bool, 1) - } - - b.Persistent[contextProcessKey].(map[string]bool)["extract-schema"] = true - return b -} - -func (b *RunAddressDataBuilder) NoExtractSchema() *RunAddressDataBuilder { - if _, ok := b.Persistent[contextProcessKey]; !ok { - b.Persistent[contextProcessKey] = make(map[string]bool, 1) - } - - b.Persistent[contextProcessKey].(map[string]bool)["extract-schema"] = false - return b -} - -func (b *RunAddressDataBuilder) Build() libddwaf.RunAddressData { - return b.RunAddressData -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/rasp_rule_type.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/rasp_rule_type.go deleted file mode 100644 index 8e5b04f4d6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/rasp_rule_type.go +++ /dev/null @@ -1,64 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package addresses - -import ( - "math" - - "github.com/DataDog/go-libddwaf/v4" -) - -type RASPRuleType uint8 - -const ( - RASPRuleTypeLFI RASPRuleType = iota - RASPRuleTypeSSRF - RASPRuleTypeSQLI - RASPRuleTypeCMDI -) - -var RASPRuleTypes = [...]RASPRuleType{ - RASPRuleTypeLFI, - RASPRuleTypeSSRF, - RASPRuleTypeSQLI, - RASPRuleTypeCMDI, -} - -func (r RASPRuleType) String() string { - switch r { - case RASPRuleTypeLFI: - return "lfi" - case RASPRuleTypeSSRF: - return "ssrf" - case RASPRuleTypeSQLI: - return "sql_injection" - case RASPRuleTypeCMDI: - return "command_injection" - } - return "unknown()" -} - -// RASPRuleTypeFromAddressSet returns the RASPRuleType for the given address set if it has a RASP address. -func RASPRuleTypeFromAddressSet(addressSet libddwaf.RunAddressData) (RASPRuleType, bool) { - if addressSet.TimerKey != RASPScope { - return math.MaxUint8, false - } - - for address := range addressSet.Ephemeral { - switch address { - case ServerIOFSFileAddr: - return RASPRuleTypeLFI, true - case ServerIoNetURLAddr: - return RASPRuleTypeSSRF, true - case ServerDBStatementAddr, ServerDBTypeAddr: - return RASPRuleTypeSQLI, true - case ServerSysExecCmd: - return RASPRuleTypeCMDI, true - } - } - - return math.MaxUint8, false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/scope.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/scope.go deleted file mode 100644 index 8c3198163a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses/scope.go +++ /dev/null @@ -1,25 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package addresses - -import ( - "github.com/DataDog/go-libddwaf/v4/timer" -) - -// Scope is used to divide the time spend in go-libddwaf between multiple parts. These scopes are then fed into -// [liddwaf.RunAddressData.TimerKey] to decide where to store the time spent in the WAF. -// Time which is then added to [libddwaf.Context.Timer]. -type Scope = timer.Key - -const ( - RASPScope Scope = "rasp" - WAFScope Scope = "waf" -) - -var Scopes = [...]Scope{ - RASPScope, - WAFScope, -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/service_entry_span.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/service_entry_span.go deleted file mode 100644 index 9c85549ff0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/service_entry_span.go +++ /dev/null @@ -1,160 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package trace - -import ( - "context" - "encoding/json" - "sync" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type ( - // ServiceEntrySpanOperation is a dyngo.Operation that holds a the first span of a service. Usually a http or grpc span. - ServiceEntrySpanOperation struct { - dyngo.Operation - jsonTags map[string]any - tagSetter TagSetter - mu sync.Mutex - } - - // ServiceEntrySpanArgs is the arguments for a ServiceEntrySpanOperation - ServiceEntrySpanArgs struct{} - - // ServiceEntrySpanTag is a key value pair event that is used to tag a service entry span - ServiceEntrySpanTag struct { - Key string - Value any - } - - // JSONServiceEntrySpanTag is a key value pair event that is used to tag a service entry span - // It will be serialized as JSON when added to the span - JSONServiceEntrySpanTag struct { - Key string - Value any - } - - // ServiceEntrySpanTagsBulk is a bulk event that is used to send tags to a service entry span - ServiceEntrySpanTagsBulk struct { - Tags []JSONServiceEntrySpanTag - SerializableTags []JSONServiceEntrySpanTag - } -) - -func (ServiceEntrySpanArgs) IsArgOf(*ServiceEntrySpanOperation) {} - -// SetTag adds the key/value pair to the tags to add to the service entry span -func (op *ServiceEntrySpanOperation) SetTag(key string, value any) { - op.mu.Lock() - defer op.mu.Unlock() - op.tagSetter.SetTag(key, value) -} - -// SetSerializableTag adds the key/value pair to the tags to add to the service entry span. -// The value MAY be serialized as JSON if necessary but simple types will not be serialized. -func (op *ServiceEntrySpanOperation) SetSerializableTag(key string, value any) { - op.mu.Lock() - defer op.mu.Unlock() - op.setSerializableTag(key, value) -} - -// SetSerializableTags adds the key/value pairs to the tags to add to the service entry span. -// Values MAY be serialized as JSON if necessary but simple types will not be serialized. -func (op *ServiceEntrySpanOperation) SetSerializableTags(tags map[string]any) { - op.mu.Lock() - defer op.mu.Unlock() - for key, value := range tags { - op.setSerializableTag(key, value) - } -} - -func (op *ServiceEntrySpanOperation) setSerializableTag(key string, value any) { - switch value.(type) { - case string, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64, bool: - op.tagSetter.SetTag(key, value) - default: - op.jsonTags[key] = value - } -} - -// SetTags fills the span tags using the key/value pairs found in `tags` -func (op *ServiceEntrySpanOperation) SetTags(tags map[string]any) { - op.mu.Lock() - defer op.mu.Unlock() - for k, v := range tags { - op.tagSetter.SetTag(k, v) - } -} - -// SetStringTags fills the span tags using the key/value pairs found in `tags` -func (op *ServiceEntrySpanOperation) SetStringTags(tags map[string]string) { - op.mu.Lock() - defer op.mu.Unlock() - for k, v := range tags { - op.tagSetter.SetTag(k, v) - } -} - -// OnServiceEntrySpanTagEvent is a callback that is called when a dyngo.OnData is triggered with a ServiceEntrySpanTag event -func (op *ServiceEntrySpanOperation) OnServiceEntrySpanTagEvent(tag ServiceEntrySpanTag) { - op.SetTag(tag.Key, tag.Value) -} - -// OnJSONServiceEntrySpanTagEvent is a callback that is called when a dyngo.OnData is triggered with a JSONServiceEntrySpanTag event -func (op *ServiceEntrySpanOperation) OnJSONServiceEntrySpanTagEvent(tag JSONServiceEntrySpanTag) { - op.SetSerializableTag(tag.Key, tag.Value) -} - -// OnServiceEntrySpanTagsBulkEvent is a callback that is called when a dyngo.OnData is triggered with a ServiceEntrySpanTagsBulk event -func (op *ServiceEntrySpanOperation) OnServiceEntrySpanTagsBulkEvent(bulk ServiceEntrySpanTagsBulk) { - for _, v := range bulk.Tags { - op.SetTag(v.Key, v.Value) - } - - for _, v := range bulk.SerializableTags { - op.SetSerializableTag(v.Key, v.Value) - } -} - -// OnSpanTagEvent is a listener for SpanTag events. -func (op *ServiceEntrySpanOperation) OnSpanTagEvent(tag SpanTag) { - op.SetTag(tag.Key, tag.Value) -} - -func StartServiceEntrySpanOperation(ctx context.Context, span TagSetter) (*ServiceEntrySpanOperation, context.Context) { - parent, _ := dyngo.FromContext(ctx) - if span == nil { - // Ensure we have a non-nil tagSetter going forward, so we don't have to check all the time. - span = NoopTagSetter{} - } - op := &ServiceEntrySpanOperation{ - Operation: dyngo.NewOperation(parent), - jsonTags: make(map[string]any, 2), - tagSetter: span, - } - return op, dyngo.StartAndRegisterOperation(ctx, op, ServiceEntrySpanArgs{}) -} - -func (op *ServiceEntrySpanOperation) Finish() { - span := op.tagSetter - if _, ok := span.(NoopTagSetter); ok { // If the span is a NoopTagSetter or is nil, we don't need to set any tags - return - } - - op.mu.Lock() - defer op.mu.Unlock() - - for k, v := range op.jsonTags { - strValue, err := json.Marshal(v) - if err != nil { - log.Debug("appsec: failed to marshal tag %q: %v", k, err.Error()) - continue - } - span.SetTag(k, string(strValue)) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/span.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/span.go deleted file mode 100644 index 8e2719ab36..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/span.go +++ /dev/null @@ -1,67 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package trace - -import ( - "context" - "sync" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" -) - -type ( - // SpanOperation is a dyngo.Operation that holds a tracer.Span. - // It used as a middleware for appsec code and the tracer code - // hopefully some day this operation will create spans instead of simply using them - SpanOperation struct { - dyngo.Operation - tags map[string]any - mu sync.Mutex - } - - // SpanArgs is the arguments for a SpanOperation - SpanArgs struct{} - - // SpanTag is a key value pair event that is used to tag the current span - SpanTag struct { - Key string - Value any - } -) - -func (SpanArgs) IsArgOf(*SpanOperation) {} - -// SetTag adds the key/value pair to the tags to add to the span -func (op *SpanOperation) SetTag(key string, value any) { - op.mu.Lock() - defer op.mu.Unlock() - op.tags[key] = value -} - -// OnSpanTagEvent is a listener for SpanTag events. -func (op *SpanOperation) OnSpanTagEvent(tag SpanTag) { - op.SetTag(tag.Key, tag.Value) -} - -func StartSpanOperation(ctx context.Context) (*SpanOperation, context.Context) { - op := &SpanOperation{ - tags: make(map[string]any), - } - return op, dyngo.StartAndRegisterOperation(ctx, op, SpanArgs{}) -} - -func (op *SpanOperation) Finish(span TagSetter) { - if _, ok := span.(NoopTagSetter); ok || span == nil { // If the span is a NoopTagSetter or is nil, we don't need to set any tags - return - } - - op.mu.Lock() - defer op.mu.Unlock() - - for k, v := range op.tags { - span.SetTag(k, v) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/tag_setter.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/tag_setter.go deleted file mode 100644 index a7f5bc1944..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace/tag_setter.go +++ /dev/null @@ -1,29 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package trace - -// TagSetter is the interface needed to set a span tag. -type TagSetter interface { - SetTag(string, any) -} - -// NoopTagSetter is a TagSetter that does nothing. Useful when no tracer -// Span is available, but a TagSetter is assumed. -type NoopTagSetter struct{} - -func (NoopTagSetter) SetTag(string, any) { - // Do nothing -} - -type TestTagSetter map[string]any - -func (t TestTagSetter) SetTag(key string, value any) { - t[key] = value -} - -func (t TestTagSetter) Tags() map[string]any { - return t -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace/errortrace.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace/errortrace.go deleted file mode 100644 index 37bf9cc591..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace/errortrace.go +++ /dev/null @@ -1,162 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package errortrace - -import ( - "bytes" - "errors" - "fmt" - "runtime" - "strconv" - "strings" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -// TracerError is an error type that holds stackframes from when the error was thrown. -// It can be used interchangeably with the built-in Go error type. -type TracerError struct { - stackFrames *runtime.Frames - inner error - stack *bytes.Buffer -} - -// defaultStackLength specifies the default maximum size of a stack trace. -const defaultStackLength = 32 - -func (err *TracerError) Error() string { - return err.inner.Error() -} - -func New(text string) *TracerError { - // Skip one to exclude New(...) - return Wrap(errors.New(text)) -} - -// Wrap takes in an error and records the stack trace at the moment that it was thrown. -func Wrap(err error) *TracerError { - return WrapN(err, 0, 1) -} - -// WrapN takes in an error and records the stack trace at the moment that it was thrown. -// It will capture a maximum of `n` entries, skipping the first `skip` entries. -// If n is 0, it will capture up to 32 entries instead. -func WrapN(err error, n uint, skip uint) *TracerError { - if err == nil { - return nil - } - var e *TracerError - if errors.As(err, &e) { - return e - } - if n <= 0 { - n = defaultStackLength - } - - telemetry.Count(telemetry.NamespaceTracers, "errorstack.source", []string{"source:TracerError"}).Submit(1) - now := time.Now() - defer func() { - dur := float64(time.Since(now)) - telemetry.Distribution(telemetry.NamespaceTracers, "errorstack.duration", []string{"source:TracerError"}).Submit(dur) - }() - - pcs := make([]uintptr, n) - var stackFrames *runtime.Frames - // +2 to exclude runtime.Callers and Wrap - numFrames := runtime.Callers(2+int(skip), pcs) - if numFrames == 0 { - stackFrames = nil - } else { - stackFrames = runtime.CallersFrames(pcs[:numFrames]) - } - - tracerErr := &TracerError{ - stackFrames: stackFrames, - inner: err, - } - return tracerErr -} - -// Format returns a string representation of the stack trace. -func (err *TracerError) Format() string { - if err == nil || err.stackFrames == nil { - return "" - } - if err.stack != nil { - return err.stack.String() - } - - out := bytes.Buffer{} - for i := 0; ; i++ { - frame, more := err.stackFrames.Next() - if i != 0 { - out.WriteByte('\n') - } - out.WriteString(frame.Function) - out.WriteByte('\n') - out.WriteByte('\t') - out.WriteString(frame.File) - out.WriteByte(':') - out.WriteString(strconv.Itoa(frame.Line)) - if !more { - break - } - } - // CallersFrames returns an iterator that is consumed as we read it. In order to - // allow calling Format() multiple times, we save the result into err.stack, which can be - // returned in future calls - err.stack = &out - return out.String() -} - -// Errorf serves the same purpose as fmt.Errorf, but returns a TracerError -// and prevents wrapping errors of type TracerError twice. -// The %w flag will only wrap errors if they are not already of type *TracerError. -func Errorf(format string, a ...any) *TracerError { - switch len(a) { - case 0: - return New(format) - case 1: - if _, ok := a[0].(*TracerError); ok { - format = strings.Replace(format, "%w", "%v", 1) - } - default: - aIndex := 0 - var newFormat strings.Builder - for i := 0; i < len(format); i++ { - c := format[i] - newFormat.WriteByte(c) - if c != '%' { - continue - } - if i+1 >= len(format) { - break - } - if format[i+1] == '%' { - continue - } - if format[i+1] == 'w' { - if _, ok := a[aIndex].(*TracerError); ok { - newFormat.WriteString("v") - i++ - } - } - aIndex++ - } - format = newFormat.String() - } - err := fmt.Errorf(format, a...) - return Wrap(err) -} - -// Unwrap takes a wrapped error and returns the inner error. -func (err *TracerError) Unwrap() error { - if err == nil { - return nil - } - return err.inner -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/options/options.go b/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/options/options.go deleted file mode 100644 index ab2cb8c296..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/instrumentation/options/options.go +++ /dev/null @@ -1,40 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package options - -import "github.com/DataDog/dd-trace-go/v2/internal" - -// Copy should be used any time existing options are copied into -// a new locally scoped set of options. This is to avoid data races and -// accidental side effects. -func Copy[T any](opts []T) []T { - return Expand(opts, 0, 0) -} - -// Expand should be used any time existing options are copied into -// a new locally scoped set of options and extra space is required. -// This is to avoid data accidental side effects and undesired reallocations -// when appending to the new slice. -// The initialPosition parameter specifies the position in the new slice -// where the existing options should be copied to. It's assumed that the new -// slice will at least have a length of initialPosition + len(opts). -// The trailCapacity parameter specifies the number of additional options that may be -// appended to the new slice. -// The new slice will have a capacity of initialPosition + len(opts) + trailCapacity -// and a length of initialPosition + len(opts). -func Expand[T any](opts []T, initialPosition, trailCapacity int) []T { - capacity := initialPosition + len(opts) - dup := make([]T, capacity, capacity+trailCapacity) - copy(dup[initialPosition:], opts) - return dup -} - -// This is a workaround needed because of v2 changes that prevents contribs from accessing -// the internal directory. This function should not be used if the internal directory -// can be -func GetBoolEnv(key string, def bool) bool { - return internal.BoolEnv(key, def) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/active_span_key.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/active_span_key.go deleted file mode 100644 index 090150a587..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/active_span_key.go +++ /dev/null @@ -1,11 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package internal - -type contextKey struct{} - -// ActiveSpanKey is used to set tracer context on a context.Context objects with a unique key -var ActiveSpanKey = contextKey{} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/agent.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/agent.go deleted file mode 100644 index 6308fdd33a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/agent.go +++ /dev/null @@ -1,75 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package internal - -import ( - "net" - "net/url" - "os" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -const ( - DefaultAgentHostname = "localhost" - DefaultTraceAgentPort = "8126" -) - -// This is a variable rather than a constant so it can be replaced in unit tests -var DefaultTraceAgentUDSPath = "/var/run/datadog/apm.socket" - -// AgentURLFromEnv resolves the URL for the trace agent based on -// the default host/port and UDS path, and via standard environment variables. -// AgentURLFromEnv has the following priority order: -// - First, DD_TRACE_AGENT_URL if it is set -// - Then, if either of DD_AGENT_HOST and DD_TRACE_AGENT_PORT are set, -// use http://DD_AGENT_HOST:DD_TRACE_AGENT_PORT, -// defaulting to localhost and 8126, respectively -// - Then, DefaultTraceAgentUDSPath, if the path exists -// - Finally, localhost:8126 -func AgentURLFromEnv() *url.URL { - if agentURL := os.Getenv("DD_TRACE_AGENT_URL"); agentURL != "" { - u, err := url.Parse(agentURL) - if err != nil { - log.Warn("Failed to parse DD_TRACE_AGENT_URL: %s", err.Error()) - } else { - switch u.Scheme { - case "unix", "http", "https": - return u - default: - log.Warn("Unsupported protocol %q in Agent URL %q. Must be one of: http, https, unix.", u.Scheme, agentURL) - } - } - } - - host, providedHost := os.LookupEnv("DD_AGENT_HOST") - port, providedPort := os.LookupEnv("DD_TRACE_AGENT_PORT") - if host == "" { - // We treat set but empty the same as unset - providedHost = false - host = DefaultAgentHostname - } - if port == "" { - // We treat set but empty the same as unset - providedPort = false - port = DefaultTraceAgentPort - } - httpURL := &url.URL{ - Scheme: "http", - Host: net.JoinHostPort(host, port), - } - if providedHost || providedPort { - return httpURL - } - - if _, err := os.Stat(DefaultTraceAgentUDSPath); err == nil { - return &url.URL{ - Scheme: "unix", - Path: DefaultTraceAgentUDSPath, - } - } - return httpURL -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/README.md b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/README.md deleted file mode 100644 index cc60323ea6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/README.md +++ /dev/null @@ -1,212 +0,0 @@ -# Appsec Go Design - -This document describes the design of the `internal/appsec` package and everything under it. This package is responsible -for securing the application by monitoring the operations that are executed by the application and applying actions in -case a security threats is detected. - -Most of the work is to forward information to the module `github.com/DataDog/go-libddwaf` which contains the WAF -(Web Application Firewall) engine. The WAF does most of the decision making about events and actions. Our goal is to -connect the different parts of the application and the WAF engine while keeping up to date the various sources of -configuration that the WAF engine uses. - -### Instrumentation Gateway: Dyngo - -Having the customer (or orchestrion) instrument their code is the hardest part of the job. That's why we want to provide -the simplest API possible for them to use. This means loosing the flexibility or enabling and disabling multiple -products and features at runtime. Flexibility that we still want to provide to the customer, that's why behind every -API entrypoint present in `dd-trace-go/contrib` that support appsec is a call to the `internal/appsec/dyngo` package. - -```mermaid -flowchart LR - -UserCode[User Code] --> Instrumentation --> IG{Instrumentation
Gateway} --> Listener -``` - -Dyngo is a context-scoped event listener system that provide a way to listen dynamically to events that are happening in -the customer code and to react to configuration changes and hot-swap event listeners at runtime. - -```mermaid -flowchart LR - -UserCode[contrib] --> appsec/emitter --> IG{dyngo} --> appsec/listener --> WAF -appsec/remoteconfig -->|config change| IG -appsec/config -->|config change| IG -``` - -### Operation definition requirements - -* Each operation must have a `Start*` and a `Finish` method covering calls to dyngo. -* The content of the arguments and results should not require any external package, at most the standard library. - -Example operation: - -```go -package main - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type ( - ExampleOperation struct { - dyngo.Operation - } - - ExampleOperationArgs struct { - Type string - } - - ExampleOperationResult struct { - Code int - } -) - -func (ExampleOperationArgs) IsArgOf(*ExampleOperation) {} -func (ExampleOperationResult) IsResultOf(*ExampleOperation) {} - -func StartExampleOperation(ctx context.Context, args ExampleOperationArgs) *ExampleOperation { - parent, ok := dyngo.FromContext(ctx) - if !ok { - log.Error("No parent operation found") - return nil - } - op := &ExampleOperation{ - Operation: dyngo.NewOperation(parent), - } - return dyngo.StartOperation(op, args) -} - -func (op *ExampleOperation) Finish(result ExampleOperationResult) { - dyngo.FinishOperation(op, result) -} -``` - -> [!CAUTION] -> Importing external packages in the operation definition will probably cause circular dependencies. This is because -> the operation definition can be used in the package is will instrument, and the package that will instrument it will -> probably import the operation definition. - -### Operation Stack - -Current state of the possible operation stacks - -```mermaid -flowchart TD - - subgraph Top Level Operation - SES[trace.ServiceEntrySpanOperation] - - Context[waf.ContextOperation] - - HTTPH[httpsec.HandlerOperation] - GRPCH[grpcsec.HandlerOperation] - GQL[graphqlsec.RequestOperation] - end - - subgraph HTTP - RequestBody([httpsec.MonitorRequestBody]) - Roundtripper[httpsec.RoundTripOperation] - end - - subgraph GRPC - RequestMessage([grpcsec.MonitorRequestMessage]) - ResponseMessage([grpcsec.MonitorResponseMessage]) - end - - subgraph GraphQL - Exec[graphqlsec.ExecutionOperation] - Resolve[graphqlsec.ResolveOperation] - end - - Code{User Code} - - SES --> Context - Context --> HTTPH --> Code - Context --> GRPCH --> Code - Context --> GQL - - GQL --> Exec --> Resolve --> Code - - Code --> RequestBody - - Code --> RequestMessage - Code --> ResponseMessage - - Code --> Span[trace.SpanOperation] - - Span --> Roundtripper - Span --> OS[ossec.OpenOperation] - Span --> SQL[sqlsec.SQLOperation] - Span --> User[usersec.UserOperation] -``` - -> [!IMPORTANT] -> Please note that this is how the operation SHOULD be stacked. If the user code does not have a Top Level Operation -> then nothing will be monitored. In this case an error log should be produced to explain thoroughly the issue to -> the user. - -### Features - -Features represent an abstract feature added to the tracer by AppSec. They are the bridge between the configuration and -its sources -and the actual code that needs to be ran in case of enablement or disablement of a feature. Features are divided in two -parts: - -- The builder that should be a pure function that takes the configuration and returns a feature object. -- The listeners that are methods of the feature object that are called when an event from the Instrumentation Gateway is - triggered. - -From there, at each configuration change from any config source, the AppSec module will rebuild the feature objects, -register the listeners to the Instrumentation Gateway, and hot-swap the root level operation with the new one, -consequently making the whole AppSec code atomic. - -Here is an example of how a system with only two features, GRPC and HTTP WAF Protection, would look like: - -```mermaid -flowchart TD - - subgraph HTTP Feature - HTTPListener - HTTPBuilder - end - - subgraph GRPC Feature - GRPCBuilder - GRPCListener - end - - subgraph Configuration - RemoteConfig - EnvConfig - ... - end - - Configuration -->|config change| AppSec - - AppSec -->|rebuild| HTTPBuilder - AppSec -->|rebuild| GRPCBuilder - HTTPBuilder -->|register HTTP Listener| IG - GRPCBuilder -->|register GRPC Listener| IG - - - - IG{Instrumentation
Gateway} -->|Start httpsec.HandlerOperation| HTTPListener - IG{Instrumentation
Gateway} -->|Start grpcsec.HandlerOperation| GRPCListener -``` - -All currently available features are the following ones: - -| Feature Name | Description | -|------------------------|--------------------------------------------------------| -| HTTP WAF Protection | Protects HTTP requests from attacks | -| GRPC WAF Protection | Protects GRPC requests from attacks | -| GraphQL WAF Protection | Protects GraphQL requests from attacks | -| SQL RASP | Runtime Application Self-Protection for SQL injections | -| OS RASP | Runtime Application Self-Protection for LFI attacks | -| HTTP RASP | Runtime Application Self-Protection for SSRF attacks | -| User Security | User blocking and login failures/success events | -| WAF Context | Setup of the request scoped context system of the WAF | -| Tracing | Bridge between the tracer and AppSec features | diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/appsec.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/appsec.go deleted file mode 100644 index 65120c7eb6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/appsec.go +++ /dev/null @@ -1,230 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package appsec - -import ( - "fmt" - "sync" - - globalinternal "github.com/DataDog/dd-trace-go/v2/internal" - - appsecLog "github.com/DataDog/appsec-internal-go/log" - "github.com/DataDog/go-libddwaf/v4" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" -) - -// Enabled returns true when AppSec is up and running. Meaning that the appsec build tag is enabled, the env var -// DD_APPSEC_ENABLED is set to true, and the tracer is started. -func Enabled() bool { - mu.RLock() - defer mu.RUnlock() - return activeAppSec != nil && activeAppSec.started -} - -// RASPEnabled returns true when DD_APPSEC_RASP_ENABLED=true or is unset. Granted that AppSec is enabled. -func RASPEnabled() bool { - mu.RLock() - defer mu.RUnlock() - return activeAppSec != nil && activeAppSec.started && activeAppSec.cfg.RASP -} - -// Start AppSec when enabled is enabled by both using the appsec build tag and -// setting the environment variable DD_APPSEC_ENABLED to true. -func Start(opts ...config.StartOption) { - // TODO: Add support to configure the tracer via a public interface - if globalinternal.BoolEnv("_DD_APPSEC_BLOCKING_UNAVAILABLE", false) { - opts = append(opts, config.WithBlockingUnavailable(true)) - } - if globalinternal.BoolEnv("_DD_APPSEC_PROXY_ENVIRONMENT", false) { - opts = append(opts, config.WithProxyEnvironment()) - } - - startConfig := config.NewStartConfig(opts...) - - // AppSec can start either: - // 1. Manually thanks to DD_APPSEC_ENABLED (or via [config.WithEnablementMode]) - // 2. Remotely when DD_APPSEC_ENABLED is undefined - // Note: DD_APPSEC_ENABLED=false takes precedence over remote configuration - // and enforces to have AppSec disabled. - mode, modeOrigin, err := startConfig.EnablementMode() - if err != nil { - logUnexpectedStartError(err) - return - } - - if mode == config.ForcedOff { - log.Debug("appsec: disabled by the configuration: set the environment variable DD_APPSEC_ENABLED to true to enable it") - return - } - - // Check whether libddwaf - required for Threats Detection - is ok or not - if ok, err := libddwaf.Usable(); !ok && err != nil { - // We need to avoid logging an error to APM tracing users who don't necessarily intend to enable appsec - if mode == config.ForcedOn { - logUnexpectedStartError(err) - } else { - // DD_APPSEC_ENABLED is not set so we cannot know what the intent is here, we must log a - // debug message instead to avoid showing an error to APM-tracing-only users. - telemetrylog.Error("appsec: remote activation of threats detection cannot be enabled for the following reasons: %s", err.Error()) - } - return - } - - // From this point we know that AppSec is either enabled or can be enabled through remote config - cfg, err := startConfig.NewConfig() - if err != nil { - logUnexpectedStartError(err) - return - } - appsec := newAppSec(cfg) - - // Start the remote configuration client - log.Debug("appsec: starting the remote configuration client") - if err := appsec.startRC(); err != nil { - telemetrylog.Error("appsec: Remote config: disabled due to an instanciation error: %s", err.Error()) - } - - if mode == config.RCStandby { - // AppSec is not enforced by the env var and can be enabled through remote config - log.Debug("appsec: %s is not set, appsec won't start until activated through remote configuration", config.EnvEnabled) - if err := appsec.enableRemoteActivation(); err != nil { - // ASM is not enabled and can't be enabled through remote configuration. Nothing more can be done. - logUnexpectedStartError(err) - appsec.stopRC() - return - } - log.Debug("appsec: awaiting for possible remote activation") - setActiveAppSec(appsec) - return - } - - if err := appsec.start(); err != nil { // AppSec is specifically enabled - logUnexpectedStartError(err) - appsec.stopRC() - return - } - - registerAppsecStartTelemetry(mode, modeOrigin) - setActiveAppSec(appsec) -} - -// Implement the AppSec log message C1 -func logUnexpectedStartError(err error) { - log.Error("appsec: could not start because of an unexpected error: %s\nNo security activities will be collected. Please contact support at https://docs.datadoghq.com/help/ for help.", err.Error()) - telemetry.Log(telemetry.LogError, fmt.Sprintf("appsec: could not start because of an unexpected error: %s", err.Error()), telemetry.WithTags([]string{"product:appsec"})) - telemetry.ProductStartError(telemetry.NamespaceAppSec, err) -} - -// Stop AppSec. -func Stop() { - setActiveAppSec(nil) -} - -var ( - activeAppSec *appsec - mu sync.RWMutex -) - -func setActiveAppSec(a *appsec) { - mu.Lock() - defer mu.Unlock() - if activeAppSec != nil { - activeAppSec.stopRC() - activeAppSec.stop() - } - activeAppSec = a -} - -type appsec struct { - cfg *config.Config - features []listener.Feature - featuresMu sync.Mutex - started bool -} - -func newAppSec(cfg *config.Config) *appsec { - return &appsec{ - cfg: cfg, - } -} - -// Start AppSec by registering its security protections according to the configured the security rules. -func (a *appsec) start() error { - // Load the waf to catch early errors if any - if ok, err := libddwaf.Load(); err != nil { - // 1. If there is an error and the loading is not ok: log as an unexpected error case and quit appsec - // Note that we assume here that the test for the unsupported target has been done before calling - // this method, so it is now considered an error for this method - if !ok { - return fmt.Errorf("error while loading libddwaf: %w", err) - } - // 2. If there is an error and the loading is ok: log as an informative error where appsec can be used - log.Error("appsec: non-critical error while loading libddwaf: %s", err.Error()) - } - - // Register dyngo listeners - if err := a.SwapRootOperation(); err != nil { - return err - } - - a.enableRCBlocking() - a.enableRASP() - - a.started = true - log.Info("appsec: up and running") - - // TODO: log the config like the APM tracer does but we first need to define - // an user-friendly string representation of our config and its sources - - return nil -} - -// Stop AppSec by unregistering the security protections. -func (a *appsec) stop() { - if !a.started { - return - } - a.started = false - registerAppsecStopTelemetry() - // Disable RC blocking first so that the following is guaranteed not to be concurrent anymore. - a.disableRCBlocking() - - a.featuresMu.Lock() - defer a.featuresMu.Unlock() - - // Disable the currently applied instrumentation - dyngo.SwapRootOperation(nil) - - // Close the WAF manager to release all resources associated with it - a.cfg.WAFManager.Reset() - - // TODO: block until no more requests are using dyngo operations - - for _, feature := range a.features { - feature.Stop() - } - - a.features = nil -} - -func init() { - appsecLog.SetBackend(appsecLog.Backend{ - Debug: log.Debug, - Info: log.Info, - Warn: log.Warn, - Errorf: func(s string, a ...any) error { - err := fmt.Errorf(s, a...) - log.Error("%s", err.Error()) - return err - }, - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/config.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/config.go deleted file mode 100644 index 70385af1d1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/config.go +++ /dev/null @@ -1,223 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package config - -import ( - "fmt" - "time" - - internal "github.com/DataDog/appsec-internal-go/appsec" - - sharedinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/remoteconfig" - "github.com/DataDog/dd-trace-go/v2/internal/stableconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" -) - -func init() { - registerSCAAppConfigTelemetry() -} - -// Register the global app telemetry configuration related to the Software Composition Analysis (SCA) product. -// Report over telemetry whether SCA's enablement env var was set or not along with its value. Nothing is reported in -// case of an error or if the env var is not set. -func registerSCAAppConfigTelemetry() { - _, _, err := stableconfig.Bool(EnvSCAEnabled, false) - if err != nil { - log.Error("appsec: %s", err.Error()) - return - } -} - -// The following environment variables dictate the enablement of different the ASM products. -const ( - // EnvEnabled controls ASM Threats Protection's enablement. - EnvEnabled = "DD_APPSEC_ENABLED" - // EnvSCAEnabled controls ASM Software Composition Analysis (SCA)'s enablement. - EnvSCAEnabled = "DD_APPSEC_SCA_ENABLED" -) - -// StartOption is used to customize the AppSec configuration when invoked with appsec.Start() -type StartOption func(c *StartConfig) - -type StartConfig struct { - // RC is the remote config client configuration to be used. - RC *remoteconfig.ClientConfig - // IsEnabled is a function that determines whether AppSec is enabled or not. When unset, the - // default [IsEnabled] function is used. - EnablementMode func() (EnablementMode, telemetry.Origin, error) - // MetaStructAvailable is true if meta struct is supported by the trace agent. - MetaStructAvailable bool - - APISecOptions []internal.APISecOption - - // BlockingUnavailable is true when the application run in an environment where blocking is not possible - BlockingUnavailable bool - - // ProxyEnvironment is true if the application is running in a proxy environment, - // such as within an Envoy External Processor. - ProxyEnvironment bool -} - -type EnablementMode int8 - -const ( - // ForcedOff is the mode where AppSec is forced to be disabled, not allowing remote activation. - ForcedOff EnablementMode = -1 - // RCStandby is the mode where AppSec is in stand-by, waiting remote activation. - RCStandby EnablementMode = 0 - // ForcedOn is the mode where AppSec is forced to be enabled. - ForcedOn EnablementMode = 1 -) - -func NewStartConfig(opts ...StartOption) *StartConfig { - c := &StartConfig{ - EnablementMode: func() (mode EnablementMode, origin telemetry.Origin, err error) { - enabled, set, err := IsEnabledByEnvironment() - if set { - origin = telemetry.OriginEnvVar - if enabled { - mode = ForcedOn - } else { - mode = ForcedOff - } - } else { - origin = telemetry.OriginDefault - mode = RCStandby - } - return mode, origin, err - }, - } - for _, opt := range opts { - opt(c) - } - return c -} - -// WithEnablementMode forces AppSec enablement, replacing the default initialization conditions -// implemented by [IsEnabledByEnvironment]. -func WithEnablementMode(mode EnablementMode) StartOption { - return func(c *StartConfig) { - c.EnablementMode = func() (EnablementMode, telemetry.Origin, error) { - return mode, telemetry.OriginCode, nil - } - } -} - -// WithRCConfig sets the AppSec remote config client configuration to the specified cfg -func WithRCConfig(cfg remoteconfig.ClientConfig) StartOption { - return func(c *StartConfig) { - c.RC = &cfg - } -} - -func WithMetaStructAvailable(available bool) StartOption { - return func(c *StartConfig) { - c.MetaStructAvailable = available - } -} - -func WithAPISecOptions(opts ...internal.APISecOption) StartOption { - return func(c *StartConfig) { - c.APISecOptions = append(c.APISecOptions, opts...) - } -} - -func WithBlockingUnavailable(unavailable bool) StartOption { - return func(c *StartConfig) { - c.BlockingUnavailable = unavailable - } -} - -func WithProxyEnvironment() StartOption { - return func(c *StartConfig) { - c.APISecOptions = append(c.APISecOptions, internal.WithProxy()) - } -} - -// Config is the AppSec configuration. -type Config struct { - *WAFManager - - // WAFTimeout is the maximum WAF execution time - WAFTimeout time.Duration - // TraceRateLimit is the AppSec trace rate limit (traces per second). - TraceRateLimit int64 - // APISec configuration - APISec internal.APISecConfig - // RC is the remote configuration client used to receive product configuration updates. Nil if RC is disabled (default) - RC *remoteconfig.ClientConfig - // RASP determines whether RASP features are enabled or not. - RASP bool - // SupportedAddresses are the addresses that the AppSec listener will bind to. - SupportedAddresses AddressSet - // MetaStructAvailable is true if meta struct is supported by the trace agent. - MetaStructAvailable bool - // BlockingUnavailable is true when the application run in an environment where blocking is not possible - BlockingUnavailable bool - // TracingAsTransport is true if APM is disabled and manually force keeping a trace is the only way for it to be sent. - TracingAsTransport bool -} - -// AddressSet is a set of WAF addresses. -type AddressSet map[string]struct{} - -func NewAddressSet(addrs []string) AddressSet { - set := make(AddressSet, len(addrs)) - for _, addr := range addrs { - set[addr] = struct{}{} - } - return set -} - -// AnyOf returns true if any of the addresses in the set are in the given list. -func (set AddressSet) AnyOf(anyOf ...string) bool { - for _, addr := range anyOf { - if _, ok := set[addr]; ok { - return true - } - } - - return false -} - -// IsEnabledByEnvironment returns true when appsec is enabled by the environment variable -// [EnvEnabled] being set to a truthy value, as well as whether the environment variable was set at -// all or not (so it is possible to distinguish between explicitly false, and false-by-default). -// If the [EnvEnabled] variable is set to a value that is not a valid boolean (according to -// [strconv.ParseBool]), it is considered false-y, and a detailed error is also returned. -func IsEnabledByEnvironment() (enabled bool, set bool, err error) { - enabled, origin, err := stableconfig.Bool(EnvEnabled, false) - if origin != telemetry.OriginDefault { - set = true - } - return enabled, set, err -} - -// NewConfig returns a fresh appsec configuration read from the env -func (c *StartConfig) NewConfig() (*Config, error) { - data, err := internal.RulesFromEnv() - if err != nil { - return nil, fmt.Errorf("reading WAF rules from environment: %w", err) - } - manager, err := NewWAFManager(internal.NewObfuscatorConfig(), data) - if err != nil { - return nil, err - } - - return &Config{ - WAFManager: manager, - WAFTimeout: internal.WAFTimeoutFromEnv(), - TraceRateLimit: int64(internal.RateLimitFromEnv()), - APISec: internal.NewAPISecConfig(c.APISecOptions...), - RASP: internal.RASPEnabled(), - RC: c.RC, - MetaStructAvailable: c.MetaStructAvailable, - BlockingUnavailable: c.BlockingUnavailable, - TracingAsTransport: !sharedinternal.BoolEnv("DD_APM_TRACING_ENABLED", true), - }, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/wafmanager.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/wafmanager.go deleted file mode 100644 index 78ddf87a0a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/config/wafmanager.go +++ /dev/null @@ -1,186 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package config - -import ( - "bytes" - "encoding/json" - "runtime" - "sync" - - "github.com/DataDog/appsec-internal-go/appsec" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetryLog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/go-libddwaf/v4" -) - -type ( - // WAFManager holds a [libddwaf.Builder] and allows managing its configuration. - WAFManager struct { - builder *libddwaf.Builder - initRules []byte - rulesVersion string - closed bool - mu sync.RWMutex - } -) - -const defaultRulesPath = "ASM_DD/default" - -// NewWAFManager creates a new [WAFManager] with the provided [appsec.ObfuscatorConfig] and initial -// rules (if any). -func NewWAFManager(obfuscator appsec.ObfuscatorConfig, defaultRules []byte) (*WAFManager, error) { - builder, err := libddwaf.NewBuilder(obfuscator.KeyRegex, obfuscator.ValueRegex) - if err != nil { - return nil, err - } - - mgr := &WAFManager{ - builder: builder, - initRules: defaultRules, - } - - if err := mgr.RestoreDefaultConfig(); err != nil { - return nil, err - } - - // Attach a finalizer to close the builder when it is garbage collected, in case - // [WAFManager.Close] is not called explicitly by the user. The call to [libddwaf.Builder.Close] - // is safe to make multiple times. - runtime.SetFinalizer(mgr, func(m *WAFManager) { m.doClose(true) }) - - return mgr, nil -} - -// Reset resets the WAF manager to its initial state. -func (m *WAFManager) Reset() error { - for _, path := range m.ConfigPaths("") { - m.RemoveConfig(path) - } - return m.RestoreDefaultConfig() -} - -// ConfigPaths returns the list of configuration paths currently loaded in the receiving -// [WAFManager]. This is typically used for testing purposes. An optional filter regular expression -// can be provided to limit what paths are returned. -func (m *WAFManager) ConfigPaths(filter string) []string { - m.mu.RLock() - defer m.mu.RUnlock() - - return m.builder.ConfigPaths(filter) -} - -// NewHandle returns a new [*libddwaf.Handle] (which may be nil if no valid WAF could be built) and the -// version of the rules that were used to build it. -func (m *WAFManager) NewHandle() (*libddwaf.Handle, string) { - m.mu.RLock() - rulesVersion := m.rulesVersion - hdl := m.builder.Build() - m.mu.RUnlock() - return hdl, rulesVersion -} - -// Close releases all resources associated with this [WAFManager]. -func (m *WAFManager) Close() { - m.doClose(false) -} - -func (m *WAFManager) doClose(leaked bool) { - m.mu.Lock() - defer m.mu.Unlock() - - if m.closed { - return - } - if leaked { - telemetryLog.Warn("WAFManager was leaked and is being closed by GC. Remember to call WAFManager.Close() explicitly!") - } - - m.builder.Close() - m.rulesVersion = "" - m.closed = true -} - -// RemoveConfig removes a configuration from the receiving [WAFManager]. -func (m *WAFManager) RemoveConfig(path string) { - m.mu.Lock() - defer m.mu.Unlock() - m.builder.RemoveConfig(path) -} - -// RemoveDefaultConfig removes the initial configuration from the receiving [WAFManager]. Returns -// true if the default config was actually removed; false otherwise (e.g, if it had previously been -// removed, or there was no default config to begin with). -func (m *WAFManager) RemoveDefaultConfig() bool { - m.mu.Lock() - defer m.mu.Unlock() - - return m.builder.RemoveConfig(defaultRulesPath) -} - -// AddOrUpdateConfig adds or updates a configuration in the receiving [WAFManager]. -func (m *WAFManager) AddOrUpdateConfig(path string, fragment any) (libddwaf.Diagnostics, error) { - m.mu.Lock() - defer m.mu.Unlock() - diag, err := m.builder.AddOrUpdateConfig(path, fragment) - if err == nil && diag.Version != "" { - m.rulesVersion = diag.Version - } - - // Submit the telemetry metrics for error counts obtained from the [libddwaf.Diagnostics] object. - // See: https://docs.google.com/document/d/1lcCvURsWTS_p01-MvrI6SmDB309L1e8bx9txuUR1zCk/edit?tab=t.0#heading=h.nwzm8andnx41 - eventRulesVersion := diag.Version - if eventRulesVersion == "" { - eventRulesVersion = m.rulesVersion - } - diag.EachFeature(updateTelemetryMetrics(eventRulesVersion)) - - return diag, err -} - -// RestoreDefaultConfig restores the initial configurations to the receiving [WAFManager]. -func (m *WAFManager) RestoreDefaultConfig() error { - if m.initRules == nil { - return nil - } - var rules map[string]any - dec := json.NewDecoder(bytes.NewReader(m.initRules)) - dec.UseNumber() - if err := dec.Decode(&rules); err != nil { - return err - } - diag, err := m.AddOrUpdateConfig(defaultRulesPath, rules) - diag.EachFeature(logLocalDiagnosticMessages) - return err -} - -func logLocalDiagnosticMessages(name string, feature *libddwaf.Feature) { - if feature.Error != "" { - telemetryLog.Error("%s", feature.Error, telemetry.WithTags([]string{"appsec_config_key:" + name, "log_type:local::diagnostic"})) - } - for msg, ids := range feature.Errors { - telemetryLog.Error("%s: %q", msg, ids, telemetry.WithTags([]string{"appsec_config_key:" + name, "log_type:local::diagnostic"})) - } - for msg, ids := range feature.Warnings { - telemetryLog.Warn("%s: %q", msg, ids, telemetry.WithTags([]string{"appsec_config_key:" + name, "log_type:local::diagnostic"})) - } -} - -func updateTelemetryMetrics(eventRulesVersion string) func(name string, feat *libddwaf.Feature) { - return func(name string, feat *libddwaf.Feature) { - errCount := telemetry.Count(telemetry.NamespaceAppSec, "waf.config_errors", []string{ - "waf_version:" + libddwaf.Version(), - "event_rules_version:" + eventRulesVersion, - "config_key:" + name, - "scope:item", - "action:update", - }) - errCount.Submit(0) - for _, ids := range feat.Errors { - errCount.Submit(float64(len(ids))) - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec/user.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec/user.go deleted file mode 100644 index f03301cfc1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec/user.go +++ /dev/null @@ -1,73 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package usersec - -import ( - "context" - "sync" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -const errorLog = ` -appsec: user login monitoring ignored: could not find the http handler instrumentation metadata in the request context: - the request handler is not being monitored by a middleware function or the provided context is not the expected request context -` - -var errorLogOnce sync.Once - -type ( - // UserEventType is the type of user event, such as a successful login or a failed login or any other authenticated request. - UserEventType int - - // UserLoginOperation type representing a call to appsec.SetUser(). It gets both created and destroyed in a single - // call to ExecuteUserIDOperation - UserLoginOperation struct { - dyngo.Operation - EventType UserEventType - } - // UserLoginOperationArgs is the user ID operation arguments. - UserLoginOperationArgs struct{} - - // UserLoginOperationRes is the user ID operation results. - UserLoginOperationRes struct { - UserID string - UserLogin string - UserOrg string - SessionID string - } -) - -const ( - // UserLoginSuccess is the event type for a successful user login, when a new session or JWT is created. - UserLoginSuccess UserEventType = iota - // UserLoginFailure is the event type for a failed user login, when the user ID is not found or the password is incorrect. - UserLoginFailure - // UserSet is the event type for a user ID operation that is not a login, such as any authenticated request made by the user. - UserSet -) - -func StartUserLoginOperation(ctx context.Context, eventType UserEventType, args UserLoginOperationArgs) (*UserLoginOperation, *error) { - parent, ok := dyngo.FromContext(ctx) - if !ok { // Nothing will be reported in this case, but we can still block so we don't return - errorLogOnce.Do(func() { log.Error(errorLog) }) - } - - op := &UserLoginOperation{Operation: dyngo.NewOperation(parent), EventType: eventType} - var err error - dyngo.OnData(op, func(e *events.BlockingSecurityEvent) { err = e }) - dyngo.StartOperation(op, args) - return op, &err -} - -func (op *UserLoginOperation) Finish(args UserLoginOperationRes) { - dyngo.FinishOperation(op, args) -} - -func (UserLoginOperationArgs) IsArgOf(*UserLoginOperation) {} -func (UserLoginOperationRes) IsResultOf(*UserLoginOperation) {} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/context.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/context.go deleted file mode 100644 index 2be48063b2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/context.go +++ /dev/null @@ -1,187 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package waf - -import ( - "context" - "maps" - "slices" - "strings" - "sync" - "sync/atomic" - - "github.com/DataDog/appsec-internal-go/limiter" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/stacktrace" - "github.com/DataDog/go-libddwaf/v4" -) - -type ( - ContextOperation struct { - dyngo.Operation - *trace.ServiceEntrySpanOperation - - // context is an atomic pointer to the current WAF context. - // Makes sure the calls to context.Run are safe. - context atomic.Pointer[libddwaf.Context] - // limiter comes from the WAF feature and is used to limit the number of events as a whole. - limiter limiter.Limiter - // events is where we store WAF events received from the WAF over the course of the request. - events []any - // stacks is where we store stack traces received from the WAF over the course of the request. - stacks []*stacktrace.Event - // derivatives is where we store any span tags generated by the WAF over the course of the request. - derivatives map[string]any - // supportedAddresses is the set of addresses supported by the WAF. - supportedAddresses config.AddressSet - // metrics the place that manages reporting for the current execution - metrics *ContextMetrics - // requestBlocked is used to track if the request has been requestBlocked by the WAF or not. - requestBlocked bool - // mu protects the events, stacks, and derivatives, supportedAddresses, eventRulesetVersion slices, and requestBlocked. - mu sync.Mutex - // logOnce is used to log a warning once when a request has too many WAF events via the built-in limiter or the max value. - logOnce sync.Once - } - - ContextArgs struct{} - - ContextRes struct{} - - // RunEvent is the type of event that should be emitted to child operations to run the WAF - RunEvent struct { - libddwaf.RunAddressData - dyngo.Operation - } - - // SecurityEvent is a dyngo data event sent when a security event is detected by the WAF - SecurityEvent struct{} -) - -func (ContextArgs) IsArgOf(*ContextOperation) {} -func (ContextRes) IsResultOf(*ContextOperation) {} - -func StartContextOperation(ctx context.Context, span trace.TagSetter) (*ContextOperation, context.Context) { - entrySpanOp, ctx := trace.StartServiceEntrySpanOperation(ctx, span) - op := &ContextOperation{ - Operation: dyngo.NewOperation(entrySpanOp), - ServiceEntrySpanOperation: entrySpanOp, - } - return op, dyngo.StartAndRegisterOperation(ctx, op, ContextArgs{}) -} - -func (op *ContextOperation) Finish() { - dyngo.FinishOperation(op, ContextRes{}) - op.ServiceEntrySpanOperation.Finish() -} - -func (op *ContextOperation) SwapContext(ctx *libddwaf.Context) *libddwaf.Context { - return op.context.Swap(ctx) -} - -func (op *ContextOperation) SetLimiter(limiter limiter.Limiter) { - op.limiter = limiter -} - -func (op *ContextOperation) SetMetricsInstance(metrics *ContextMetrics) { - op.metrics = metrics -} - -func (op *ContextOperation) GetMetricsInstance() *ContextMetrics { - return op.metrics -} - -func (op *ContextOperation) SetRequestBlocked() { - op.mu.Lock() - defer op.mu.Unlock() - op.requestBlocked = true -} - -// AddEvents adds WAF events to the operation and returns true if the operation has reached the maximum number of events, by the limiter or the max value. -func (op *ContextOperation) AddEvents(events ...any) bool { - if len(events) == 0 { - return false - } - - if !op.limiter.Allow() { - log.Error("appsec: too many WAF events, stopping further reporting") - return true - } - - op.mu.Lock() - defer op.mu.Unlock() - - const maxWAFEventsPerRequest = 10 - if len(op.events) >= maxWAFEventsPerRequest { - op.logOnce.Do(func() { - log.Warn("appsec: ignoring new WAF event due to the maximum number of security events per request was reached") - }) - return true - } - - op.events = append(op.events, events...) - return false -} - -func (op *ContextOperation) AddStackTraces(stacks ...*stacktrace.Event) { - if len(stacks) == 0 { - return - } - - op.mu.Lock() - defer op.mu.Unlock() - op.stacks = append(op.stacks, stacks...) -} - -func (op *ContextOperation) AbsorbDerivatives(derivatives map[string]any) { - if len(derivatives) == 0 { - return - } - - op.mu.Lock() - defer op.mu.Unlock() - if op.derivatives == nil { - op.derivatives = make(map[string]any, len(derivatives)) - } - - for k, v := range derivatives { - // If the request has been blocked, we don't want to report any derivatives representing the response schema. - if op.requestBlocked && strings.HasPrefix(k, "_dd.appsec.s.res.") { - continue - } - - op.derivatives[k] = v - } -} - -func (op *ContextOperation) Derivatives() map[string]any { - op.mu.Lock() - defer op.mu.Unlock() - return maps.Clone(op.derivatives) -} - -func (op *ContextOperation) Events() []any { - op.mu.Lock() - defer op.mu.Unlock() - return slices.Clone(op.events) -} - -func (op *ContextOperation) StackTraces() []*stacktrace.Event { - op.mu.Lock() - defer op.mu.Unlock() - return slices.Clone(op.stacks) -} - -func (op *ContextOperation) OnEvent(event RunEvent) { - op.Run(event.Operation, event.RunAddressData) -} - -func (op *ContextOperation) SetSupportedAddresses(addrs config.AddressSet) { - op.supportedAddresses = addrs -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/metrics.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/metrics.go deleted file mode 100644 index e2d2a142f2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/metrics.go +++ /dev/null @@ -1,397 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package waf - -import ( - "errors" - "strconv" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/go-libddwaf/v4" - "github.com/DataDog/go-libddwaf/v4/timer" - "github.com/DataDog/go-libddwaf/v4/waferrors" - "github.com/puzpuzpuz/xsync/v3" -) - -// newHandleTelemetryMetric is the name of the metric that will be used to track the initialization of the WAF handle -// this values is changed to waf.updates after the first call to [NewMetricsInstance] -var newHandleTelemetryMetric = "waf.init" -var changeToWafUpdates sync.Once - -// RequestMilestones is a list of things that can happen as a result of a waf call. They are stacked for each requests -// and used as tags to the telemetry metric `waf.requests`. -// this struct can be modified concurrently. -// TODO: add request_excluded and block_failure to the mix once we have the capability to track them -type RequestMilestones struct { - requestBlocked bool - ruleTriggered bool - wafTimeout bool - rateLimited bool - wafError bool - inputTruncated bool -} - -// raspMetricKey is used as a cache key for the metrics having tags depending on the RASP rule type -type raspMetricKey[T any] struct { - typ addresses.RASPRuleType - additionalTag T -} - -// HandleMetrics is a struct that holds all the telemetry metrics for the WAF that lives and die alongside with the WAF handle -// It basically serves as a big cache to not go through the telemetry package each time we want to submit a metric -// and have to recompute all tags that are static (from a WAF handle lifetime perspective) -type HandleMetrics struct { - baseTags []string - baseRASPTags [len(addresses.RASPRuleTypes)][]string - - // Common metric types - - // externalTimerDistributions holds the telemetry metrics for the `rasp.duration_ext`, `waf.duration_ext` metrics - externalTimerDistributions map[addresses.Scope]telemetry.MetricHandle - // internalTimerDistributions holds the telemetry metrics for the `rasp.duration`, `waf.duration` metrics - internalTimerDistributions map[addresses.Scope]telemetry.MetricHandle - - // wafRequestsCounts holds the telemetry metrics for the `waf.requests` metric, lazily filled - wafRequestsCounts *xsync.MapOf[RequestMilestones, telemetry.MetricHandle] - - // Uncommon metric types - - // raspTimeout holds the telemetry metrics for the rasp.timeout metrics since there is no waf.timeout metric - raspTimeout [len(addresses.RASPRuleTypes)]telemetry.MetricHandle - // raspRuleEval holds the telemetry metrics for the `rasp.rule_eval` metric by rule type - raspRuleEval [len(addresses.RASPRuleTypes)]telemetry.MetricHandle - - // Rare metric types - - // truncationCounts holds the telemetry metrics for the `waf.input_truncated` metric, lazily filled - truncationCounts *xsync.MapOf[libddwaf.TruncationReason, telemetry.MetricHandle] - // truncationDistributions holds the telemetry metrics for the `waf.truncated_value_size` metric, lazily filled - truncationDistributions *xsync.MapOf[libddwaf.TruncationReason, telemetry.MetricHandle] - - // Epic metric types - - // wafErrorCount holds the telemetry metrics for the `waf.error` metric, lazily filled - wafErrorCount *xsync.MapOf[int, telemetry.MetricHandle] - // raspErrorCount holds the telemetry metrics for the `rasp.error` metric, lazily filled - raspErrorCount *xsync.MapOf[raspMetricKey[int], telemetry.MetricHandle] - - // Legendary metric types - - // raspRuleMatch holds the telemetry metrics for the `rasp.rule.match` metric, lazily filled - raspRuleMatch *xsync.MapOf[raspMetricKey[string], telemetry.MetricHandle] -} - -var baseRASPTags = [len(addresses.RASPRuleTypes)][]string{ - addresses.RASPRuleTypeLFI: {"rule_type:" + addresses.RASPRuleTypeLFI.String()}, - addresses.RASPRuleTypeSSRF: {"rule_type:" + addresses.RASPRuleTypeSSRF.String()}, - addresses.RASPRuleTypeSQLI: {"rule_type:" + addresses.RASPRuleTypeSQLI.String()}, - addresses.RASPRuleTypeCMDI: {"rule_type:" + addresses.RASPRuleTypeCMDI.String(), "rule_variant:exec"}, -} - -// NewMetricsInstance creates a new HandleMetrics struct and submit the `waf.init` or `waf.updates` metric. To be called with the raw results of the WAF handle initialization -func NewMetricsInstance(newHandle *libddwaf.Handle, eventRulesVersion string) HandleMetrics { - telemetry.Count(telemetry.NamespaceAppSec, newHandleTelemetryMetric, []string{ - "waf_version:" + libddwaf.Version(), - "event_rules_version:" + eventRulesVersion, - "success:" + strconv.FormatBool(newHandle != nil), - }).Submit(1) - - changeToWafUpdates.Do(func() { - newHandleTelemetryMetric = "waf.updates" - }) - - baseTags := []string{ - "event_rules_version:" + eventRulesVersion, - "waf_version:" + libddwaf.Version(), - } - - metrics := HandleMetrics{ - baseTags: baseTags, - externalTimerDistributions: map[addresses.Scope]telemetry.MetricHandle{ - addresses.RASPScope: telemetry.Distribution(telemetry.NamespaceAppSec, "rasp.duration_ext", baseTags), - addresses.WAFScope: telemetry.Distribution(telemetry.NamespaceAppSec, "waf.duration_ext", baseTags), - }, - internalTimerDistributions: map[addresses.Scope]telemetry.MetricHandle{ - addresses.RASPScope: telemetry.Distribution(telemetry.NamespaceAppSec, "rasp.duration", baseTags), - addresses.WAFScope: telemetry.Distribution(telemetry.NamespaceAppSec, "waf.duration", baseTags), - }, - wafRequestsCounts: xsync.NewMapOf[RequestMilestones, telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^6)), - truncationCounts: xsync.NewMapOf[libddwaf.TruncationReason, telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^3)), - truncationDistributions: xsync.NewMapOf[libddwaf.TruncationReason, telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^2)), - wafErrorCount: xsync.NewMapOf[int, telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^3)), - raspErrorCount: xsync.NewMapOf[raspMetricKey[int], telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^3)), - raspRuleMatch: xsync.NewMapOf[raspMetricKey[string], telemetry.MetricHandle](xsync.WithGrowOnly(), xsync.WithPresize(2^3)), - } - - for ruleType := range metrics.baseRASPTags { - tags := make([]string, len(baseRASPTags[ruleType])+len(baseTags)) - copy(tags, baseRASPTags[ruleType]) - copy(tags[len(baseRASPTags[ruleType]):], baseTags) - metrics.baseRASPTags[ruleType] = tags - } - - for ruleType := range metrics.raspRuleEval { - metrics.raspRuleEval[ruleType] = telemetry.Count(telemetry.NamespaceAppSec, "rasp.rule.eval", metrics.baseRASPTags[ruleType]) - } - - for ruleType := range metrics.raspTimeout { - metrics.raspTimeout[ruleType] = telemetry.Count(telemetry.NamespaceAppSec, "rasp.timeout", metrics.baseRASPTags[ruleType]) - } - - return metrics -} - -func (m *HandleMetrics) NewContextMetrics() *ContextMetrics { - return &ContextMetrics{ - HandleMetrics: m, - SumDurations: map[addresses.Scope]map[timer.Key]*atomic.Int64{ - addresses.WAFScope: { - libddwaf.EncodeTimeKey: &atomic.Int64{}, - libddwaf.DurationTimeKey: &atomic.Int64{}, - libddwaf.DecodeTimeKey: &atomic.Int64{}, - }, - addresses.RASPScope: { - libddwaf.EncodeTimeKey: &atomic.Int64{}, - libddwaf.DurationTimeKey: &atomic.Int64{}, - libddwaf.DecodeTimeKey: &atomic.Int64{}, - }, - }, - } -} - -type ContextMetrics struct { - *HandleMetrics - - // SumRASPCalls is the sum of all the RASP calls made by the WAF whatever the rasp rule type it is. - SumRASPCalls atomic.Uint32 - // SumWAFErrors is the sum of all the WAF errors that happened not in the RASP scope. - SumWAFErrors atomic.Uint32 - // SumRASPErrors is the sum of all the RASP errors that happened in the RASP scope. - SumRASPErrors atomic.Uint32 - - // SumWAFTimeouts is the sum of all the WAF timeouts that happened not in the RASP scope. - SumWAFTimeouts atomic.Uint32 - - // SumRASPTimeouts is the sum of all the RASP timeouts that happened in the RASP scope by rule type. - SumRASPTimeouts [len(addresses.RASPRuleTypes)]atomic.Uint32 - - // SumDurations is the sum of all the run durations calls to ddwaf_run behind go-libddwaf - // This map is built statically when ContextMetrics is created and readonly after that. - SumDurations map[addresses.Scope]map[timer.Key]*atomic.Int64 - - // Milestones are the tags of the metric `waf.requests` that will be submitted at the end of the waf context - Milestones RequestMilestones -} - -// Submit increment the metrics for the WAF run stats at the end of each waf context lifecycle -// It registers the metrics: -// - `waf.duration_ext` and `rasp.duration_ext` using [libddwaf.Context.Timer] -// - `waf.duration` and `rasp.duration` using [libddwaf.Result.TimerStats] accumulated in the ContextMetrics -// - `rasp.timeout` for the RASP scope using [libddwaf.Stats.TimeoutRASPCount] -// - `waf.input_truncated` and `waf.truncated_value_size` for the truncations using [libddwaf.Stats.Truncations] -// - `waf.requests` for the milestones using [ContextMetrics.Milestones] -func (m *ContextMetrics) Submit(truncations map[libddwaf.TruncationReason][]int, timerStats map[timer.Key]time.Duration) { - for scope, value := range timerStats { - // Add metrics `{waf,rasp}.duration_ext` - metric, found := m.externalTimerDistributions[scope] - if !found { - telemetrylog.Error("unexpected scope name: %s", scope, telemetry.WithTags([]string{"product:appsec"})) - continue - } - - metric.Submit(float64(value) / float64(time.Microsecond.Nanoseconds())) - - // Add metrics `{waf,rasp}.duration` - for key, value := range m.SumDurations[scope] { - if key != libddwaf.DurationTimeKey { - continue - } - - if metric, found := m.internalTimerDistributions[scope]; found { - metric.Submit(float64(value.Load()) / float64(time.Microsecond.Nanoseconds())) - } - } - } - - for ruleTyp := range m.SumRASPTimeouts { - if nbTimeouts := m.SumRASPTimeouts[ruleTyp].Load(); nbTimeouts > 0 { - m.raspTimeout[ruleTyp].Submit(float64(nbTimeouts)) - } - } - - var truncationTypes libddwaf.TruncationReason - for reason, sizes := range truncations { - truncationTypes |= reason - handle, _ := m.truncationDistributions.LoadOrCompute(reason, func() telemetry.MetricHandle { - return telemetry.Distribution(telemetry.NamespaceAppSec, "waf.truncated_value_size", []string{"truncation_reason:" + strconv.Itoa(int(reason))}) - }) - for _, size := range sizes { - handle.Submit(float64(size)) - } - } - - if truncationTypes != 0 { - handle, _ := m.truncationCounts.LoadOrCompute(truncationTypes, func() telemetry.MetricHandle { - return telemetry.Count(telemetry.NamespaceAppSec, "waf.input_truncated", []string{"truncation_reason:" + strconv.Itoa(int(truncationTypes))}) - }) - handle.Submit(1) - } - - if len(truncations) > 0 { - m.Milestones.inputTruncated = true - } - - m.incWafRequestsCounts() -} - -// incWafRequestsCounts increments the `waf.requests` metric with the current milestones and creates a new metric handle if it does not exist -func (m *ContextMetrics) incWafRequestsCounts() { - handle, _ := m.wafRequestsCounts.LoadOrCompute(m.Milestones, func() telemetry.MetricHandle { - return telemetry.Count(telemetry.NamespaceAppSec, "waf.requests", append([]string{ - "request_blocked:" + strconv.FormatBool(m.Milestones.requestBlocked), - "rule_triggered:" + strconv.FormatBool(m.Milestones.ruleTriggered), - "waf_timeout:" + strconv.FormatBool(m.Milestones.wafTimeout), - "rate_limited:" + strconv.FormatBool(m.Milestones.rateLimited), - "waf_error:" + strconv.FormatBool(m.Milestones.wafError), - "input_truncated:" + strconv.FormatBool(m.Milestones.inputTruncated), - }, m.baseTags...)) - }) - - handle.Submit(1) -} - -// RegisterWafRun register the different outputs of the WAF for the `waf.requests` and also directly increment the `rasp.rule.match` and `rasp.rule.eval` metrics. -// It registers the metrics: -// - `rasp.rule.match` -// - `rasp.rule.eval` -// It accumulate data for: -// - `waf.requests` -// - `rasp.duration` -// - `waf.duration` -func (m *ContextMetrics) RegisterWafRun(addrs libddwaf.RunAddressData, timerStats map[timer.Key]time.Duration, tags RequestMilestones) { - for key, value := range timerStats { - m.SumDurations[addrs.TimerKey][key].Add(int64(value)) - } - - switch addrs.TimerKey { - case addresses.RASPScope: - m.SumRASPCalls.Add(1) - ruleType, ok := addresses.RASPRuleTypeFromAddressSet(addrs) - if !ok { - telemetrylog.Error("unexpected call to RASPRuleTypeFromAddressSet", telemetry.WithTags([]string{"product:appsec"})) - return - } - if metric := m.raspRuleEval[ruleType]; metric != nil { - metric.Submit(1) - } - if tags.ruleTriggered { - blockTag := "block:irrelevant" - if tags.requestBlocked { // TODO: add block:failure to the mix - blockTag = "block:success" - } - - handle, _ := m.raspRuleMatch.LoadOrCompute(raspMetricKey[string]{typ: ruleType, additionalTag: blockTag}, func() telemetry.MetricHandle { - return telemetry.Count(telemetry.NamespaceAppSec, "rasp.rule.match", append([]string{ - blockTag, - }, m.baseRASPTags[ruleType]...)) - }) - - handle.Submit(1) - } - if tags.wafTimeout { - m.SumRASPTimeouts[ruleType].Add(1) - } - case addresses.WAFScope, "": - if tags.requestBlocked { - m.Milestones.requestBlocked = true - } - if tags.ruleTriggered { - m.Milestones.ruleTriggered = true - } - if tags.wafTimeout { - m.Milestones.wafTimeout = true - m.SumWAFTimeouts.Add(1) - } - if tags.rateLimited { - m.Milestones.rateLimited = true - } - if tags.wafError { - m.Milestones.wafError = true - } - default: - telemetrylog.Error("unexpected scope name: %s", addrs.TimerKey, telemetry.WithTags([]string{"product:appsec"})) - } -} - -// IncWafError should be called if go-libddwaf.(*Context).Run() returns an error to increments metrics linked to WAF errors -// It registers the metrics: -// - `waf.error` -// - `rasp.error` -func (m *ContextMetrics) IncWafError(addrs libddwaf.RunAddressData, in error) { - if in == nil { - return - } - - if !errors.Is(in, waferrors.ErrTimeout) { - telemetrylog.Error("unexpected WAF error: %s", in, telemetry.WithTags(append([]string{ - "product:appsec", - }, m.baseTags...))) - } - - switch addrs.TimerKey { - case addresses.RASPScope: - ruleType, ok := addresses.RASPRuleTypeFromAddressSet(addrs) - if !ok { - telemetrylog.Error("unexpected call to RASPRuleTypeFromAddressSet: %s", in, telemetry.WithTags([]string{"product:appsec"})) - } - m.raspError(in, ruleType) - case addresses.WAFScope, "": - m.wafError(in) - default: - telemetrylog.Error("unexpected scope name: %s", addrs.TimerKey, telemetry.WithTags([]string{"product:appsec"})) - } -} - -// defaultWafErrorCode is the default error code if the error does not implement [libddwaf.RunError] -// meaning if the error actual come for the bindings and not from the WAF itself -const defaultWafErrorCode = -127 - -func (m *ContextMetrics) wafError(in error) { - m.SumWAFErrors.Add(1) - errCode := defaultWafErrorCode - if code := waferrors.ToWafErrorCode(in); code != 0 { - errCode = code - } - - handle, _ := m.wafErrorCount.LoadOrCompute(errCode, func() telemetry.MetricHandle { - return telemetry.Count(telemetry.NamespaceAppSec, "waf.error", append([]string{ - "error_code:" + strconv.Itoa(errCode), - }, m.baseTags...)) - }) - - handle.Submit(1) -} - -func (m *ContextMetrics) raspError(in error, ruleType addresses.RASPRuleType) { - m.SumRASPErrors.Add(1) - errCode := defaultWafErrorCode - if code := waferrors.ToWafErrorCode(in); code != 0 { - errCode = code - } - - handle, _ := m.raspErrorCount.LoadOrCompute(raspMetricKey[int]{typ: ruleType, additionalTag: errCode}, func() telemetry.MetricHandle { - return telemetry.Count(telemetry.NamespaceAppSec, "rasp.error", append([]string{ - "error_code:" + strconv.Itoa(errCode), - }, m.baseRASPTags[ruleType]...)) - }) - - handle.Submit(1) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/run.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/run.go deleted file mode 100644 index b12c331928..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf/run.go +++ /dev/null @@ -1,91 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package waf - -import ( - "context" - "errors" - "maps" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/go-libddwaf/v4" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -// Run runs the WAF with the given address data and sends the results to the event receiver -// the event receiver can be the same os the method receiver but not always -// the event receiver is the one that will receive the actions events generated by the WAF -func (op *ContextOperation) Run(eventReceiver dyngo.Operation, addrs libddwaf.RunAddressData) { - ctx := op.context.Load() - if ctx == nil { // Context was closed concurrently - return - } - - // Remove unsupported addresses in case the listener was registered but some addresses are still unsupported - // Technically the WAF does this step for us but doing this check before calling the WAF makes us skip encoding huge - // values that may be discarded by the WAF afterward. - // e.g. gRPC response body address that is not in the default ruleset but will still be sent to the WAF and may be huge - for _, addrType := range []map[string]any{addrs.Persistent, addrs.Ephemeral} { - maps.DeleteFunc(addrType, func(key string, _ any) bool { - _, ok := op.supportedAddresses[key] - return !ok - }) - } - - result, err := ctx.Run(addrs) - if errors.Is(err, waferrors.ErrTimeout) { - log.Debug("appsec: WAF timeout value reached: %s", err.Error()) - } - - op.metrics.IncWafError(addrs, err) - - wafTimeout := errors.Is(err, waferrors.ErrTimeout) - rateLimited := op.AddEvents(result.Events...) - blocking := actions.SendActionEvents(eventReceiver, result.Actions) - op.AbsorbDerivatives(result.Derivatives) - - // Set the trace to ManualKeep if the WAF instructed us to keep it. - if result.Keep { - op.SetTag(ext.ManualKeep, samplernames.AppSec) - } - - if result.HasEvents() { - dyngo.EmitData(op, &SecurityEvent{}) - } - - op.metrics.RegisterWafRun(addrs, result.TimerStats, RequestMilestones{ - requestBlocked: blocking, - ruleTriggered: result.HasEvents(), - wafTimeout: wafTimeout, - rateLimited: rateLimited, - wafError: err != nil && !wafTimeout, - }) -} - -// RunSimple runs the WAF with the given address data and returns an error that should be forwarded to the caller -func RunSimple(ctx context.Context, addrs libddwaf.RunAddressData, errorLog string) error { - parent, _ := dyngo.FromContext(ctx) - if parent == nil { - log.Error("%s", errorLog) - return nil - } - - var err error - op := dyngo.NewOperation(parent) - dyngo.OnData(op, func(e *events.BlockingSecurityEvent) { - err = e - }) - dyngo.EmitData(op, RunEvent{ - Operation: op, - RunAddressData: addrs, - }) - return err -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/features.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/features.go deleted file mode 100644 index b6b7c0fba4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/features.go +++ /dev/null @@ -1,85 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package appsec - -import ( - "errors" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -var features = []listener.NewFeature{ - trace.NewAppsecSpanTransport, - waf.NewWAFFeature, - httpsec.NewHTTPSecFeature, - grpcsec.NewGRPCSecFeature, - graphqlsec.NewGraphQLSecFeature, - usersec.NewUserSecFeature, - sqlsec.NewSQLSecFeature, - ossec.NewOSSecFeature, - httpsec.NewSSRFProtectionFeature, -} - -func (a *appsec) SwapRootOperation() error { - newRoot := dyngo.NewRootOperation() - newFeatures := make([]listener.Feature, 0, len(features)) - var featureErrors []error - for _, newFeature := range features { - feature, err := newFeature(a.cfg, newRoot) - if err != nil { - featureErrors = append(featureErrors, err) - continue - } - - // If error is nil and feature is nil, it means the feature did not activate itself - if feature == nil { - continue - } - - newFeatures = append(newFeatures, feature) - } - - err := errors.Join(featureErrors...) - if err != nil { - for _, feature := range newFeatures { - feature.Stop() - } - return err - } - - a.featuresMu.Lock() - defer a.featuresMu.Unlock() - - oldFeatures := a.features - a.features = newFeatures - - if len(oldFeatures) > 0 { - log.Debug("appsec: stopping the following features: %q", oldFeatures) - } - if len(newFeatures) > 0 { - log.Debug("appsec: starting the following features: %q", newFeatures) - } - - dyngo.SwapRootOperation(newRoot) - - log.Debug("appsec: swapped root operation") - - for _, oldFeature := range oldFeatures { - oldFeature.Stop() - } - - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/feature.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/feature.go deleted file mode 100644 index d22067cd8d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/feature.go +++ /dev/null @@ -1,24 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package listener - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" -) - -// Feature is an interface that represents a feature that can be started and stopped. -type Feature interface { - // String should return a user-friendly name for the feature. - String() string - // Stop stops the feature. - Stop() -} - -// NewFeature is a function that creates a new feature. -// The error returned will be fatal for the application if not nil. -// If both the feature and the error are nil, the feature will be considered inactive. -type NewFeature func(*config.Config, dyngo.Operation) (Feature, error) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec/graphql.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec/graphql.go deleted file mode 100644 index 4de4b95369..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec/graphql.go +++ /dev/null @@ -1,43 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package graphqlsec - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" -) - -type Feature struct{} - -func (*Feature) String() string { - return "GraphQL Security" -} - -func (*Feature) Stop() {} - -func (f *Feature) OnResolveField(op *graphqlsec.ResolveOperation, args graphqlsec.ResolveOperationArgs) { - dyngo.EmitData(op, waf.RunEvent{ - Operation: op, - RunAddressData: addresses.NewAddressesBuilder(). - WithGraphQLResolver(args.FieldName, args.Arguments). - Build(), - }) -} - -func NewGraphQLSecFeature(config *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !config.SupportedAddresses.AnyOf(addresses.GraphQLServerResolverAddr) { - return nil, nil - } - - feature := &Feature{} - dyngo.On(rootOp, feature.OnResolveField) - - return feature, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec/grpc.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec/grpc.go deleted file mode 100644 index 13222a9d32..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec/grpc.go +++ /dev/null @@ -1,75 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package grpcsec - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type Feature struct{} - -func (*Feature) String() string { - return "gRPC Security" -} - -func (*Feature) Stop() {} - -func NewGRPCSecFeature(config *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !config.SupportedAddresses.AnyOf( - addresses.ClientIPAddr, - addresses.GRPCServerMethodAddr, - addresses.GRPCServerRequestMessageAddr, - addresses.GRPCServerRequestMetadataAddr, - addresses.GRPCServerResponseMessageAddr, - addresses.GRPCServerResponseMetadataHeadersAddr, - addresses.GRPCServerResponseMetadataTrailersAddr, - addresses.GRPCServerResponseStatusCodeAddr) { - return nil, nil - } - - feature := &Feature{} - dyngo.On(rootOp, feature.OnStart) - dyngo.OnFinish(rootOp, feature.OnFinish) - return feature, nil -} - -func (f *Feature) OnStart(op *grpcsec.HandlerOperation, args grpcsec.HandlerOperationArgs) { - ipTags, clientIP := httpsec.ClientIPTags(args.Metadata, false, args.RemoteAddr) - log.Debug("appsec: http client ip detection returned `%s`", clientIP) - - op.SetStringTags(ipTags) - - SetRequestMetadataTags(op, args.Metadata) - - op.Run(op, - addresses.NewAddressesBuilder(). - WithGRPCMethod(args.Method). - WithGRPCRequestMetadata(args.Metadata). - WithClientIP(clientIP). - Build(), - ) -} - -func (f *Feature) OnFinish(op *grpcsec.HandlerOperation, res grpcsec.HandlerOperationRes) { - op.Run(op, - addresses.NewAddressesBuilder(). - WithGRPCResponseStatusCode(res.StatusCode). - Build(), - ) -} - -func SetRequestMetadataTags(span trace.TagSetter, metadata map[string][]string) { - for h, v := range httpsec.NormalizeHTTPHeaders(metadata) { - span.SetTag("grpc.metadata."+h, v) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/clientip.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/clientip.go deleted file mode 100644 index 1f5d3c612e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/clientip.go +++ /dev/null @@ -1,110 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package httpsec - -import ( - "net" - "net/netip" - "net/textproto" - "strings" -) - -// ClientIP returns the first public IP address found in the given headers. If -// none is present, it returns the first valid IP address present, possibly -// being a local IP address. The remote address, when valid, is used as fallback -// when no IP address has been found at all. -func ClientIP(hdrs map[string][]string, hasCanonicalHeaders bool, remoteAddr string, monitoredHeaders []string) (remoteIP, clientIP netip.Addr) { - // Walk IP-related headers - var foundIP netip.Addr -headersLoop: - for _, headerName := range monitoredHeaders { - if hasCanonicalHeaders { - headerName = textproto.CanonicalMIMEHeaderKey(headerName) - } - - headerValues, exists := hdrs[headerName] - if !exists { - continue // this monitored header is not present - } - - // Assuming a list of comma-separated IP addresses, split them and build - // the list of values to try to parse as IP addresses - var ips []string - for _, ip := range headerValues { - ips = append(ips, strings.Split(ip, ",")...) - } - - // Look for the first valid or global IP address in the comma-separated list - for _, ipstr := range ips { - ip := parseIP(strings.TrimSpace(ipstr)) - if !ip.IsValid() { - continue - } - // Replace foundIP if still not valid in order to keep the oldest - if !foundIP.IsValid() { - foundIP = ip - } - if isGlobalIP(ip) { - foundIP = ip - break headersLoop - } - } - } - - // Decide which IP address is the client one by starting with the remote IP - if ip := parseIP(remoteAddr); ip.IsValid() { - remoteIP = ip - clientIP = ip - } - - // The IP address found in the headers supersedes a private remote IP address. - if foundIP.IsValid() && !isGlobalIP(remoteIP) || isGlobalIP(foundIP) { - clientIP = foundIP - } - - return remoteIP, clientIP -} - -func parseIP(s string) netip.Addr { - if ip, err := netip.ParseAddr(s); err == nil { - return ip - } - if h, _, err := net.SplitHostPort(s); err == nil { - if ip, err := netip.ParseAddr(h); err == nil { - return ip - } - } - return netip.Addr{} -} - -var ( - ipv6SpecialNetworks = [...]netip.Prefix{ - netip.MustParsePrefix("fec0::/10"), // site local - } - - // This IP block is not routable on internet and an industry standard/trend - // is emerging to use it for traditional IT-managed networking environments - // with limited RFC1918 space allocations. This is also frequently used by - // kubernetes pods' internal networking. It is hence deemed private for the - // purpose of Client IP extraction. - k8sInternalIPv4Prefix = netip.MustParsePrefix("100.65.0.0/10") -) - -func isGlobalIP(ip netip.Addr) bool { - // IsPrivate also checks for ipv6 ULA. - // We care to check for these addresses are not considered public, hence not global. - // See https://www.rfc-editor.org/rfc/rfc4193.txt for more details. - isGlobal := ip.IsValid() && !ip.IsPrivate() && !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !k8sInternalIPv4Prefix.Contains(ip) - if !isGlobal || !ip.Is6() { - return isGlobal - } - for _, n := range ipv6SpecialNetworks { - if n.Contains(ip) { - return false - } - } - return isGlobal -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/http.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/http.go deleted file mode 100644 index 8e1f6d1068..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/http.go +++ /dev/null @@ -1,152 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package httpsec - -import ( - "net/netip" - "strings" - - "github.com/DataDog/appsec-internal-go/apisec" - "github.com/DataDog/appsec-internal-go/appsec" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -type Feature struct { - APISec appsec.APISecConfig - ForceKeepWhenGeneratingSchema bool -} - -func (*Feature) String() string { - return "HTTP Security" -} - -func (*Feature) Stop() {} - -func NewHTTPSecFeature(config *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !config.SupportedAddresses.AnyOf(addresses.ServerRequestMethodAddr, - addresses.ServerRequestRawURIAddr, - addresses.ServerRequestHeadersNoCookiesAddr, - addresses.ServerRequestCookiesAddr, - addresses.ServerRequestQueryAddr, - addresses.ServerRequestPathParamsAddr, - addresses.ServerRequestBodyAddr, - addresses.ServerResponseBodyAddr, - addresses.ServerResponseStatusAddr, - addresses.ServerResponseHeadersNoCookiesAddr, - addresses.ClientIPAddr, - ) { - // We extract headers even when the security features are not enabled... - feature := &HeaderExtractionFeature{} - dyngo.On(rootOp, feature.OnRequest) - dyngo.OnFinish(rootOp, feature.OnResponse) - return feature, nil - } - - feature := &Feature{ - APISec: config.APISec, - ForceKeepWhenGeneratingSchema: config.TracingAsTransport, - } - - dyngo.On(rootOp, feature.OnRequest) - dyngo.OnFinish(rootOp, feature.OnResponse) - return feature, nil -} - -func (feature *Feature) OnRequest(op *httpsec.HandlerOperation, args httpsec.HandlerOperationArgs) { - headers, ip := extractRequestHeaders(op, args) - - op.Run(op, - addresses.NewAddressesBuilder(). - WithMethod(args.Method). - WithRawURI(args.RequestURI). - WithHeadersNoCookies(headers). - WithCookies(args.Cookies). - WithQuery(args.QueryParams). - WithPathParams(args.PathParams). - WithClientIP(ip). - Build(), - ) -} - -func (feature *Feature) OnResponse(op *httpsec.HandlerOperation, resp httpsec.HandlerOperationRes) { - headers := extractResponseHeaders(op, resp) - - builder := addresses.NewAddressesBuilder(). - WithResponseHeadersNoCookies(headers). - WithResponseStatus(resp.StatusCode) - - if feature.shouldExtractShema(op, resp.StatusCode) { - builder = builder.ExtractSchema() - - if feature.ForceKeepWhenGeneratingSchema { - op.SetTag(ext.ManualKeep, samplernames.AppSec) - } - } - - op.Run(op, builder.Build()) - - metric := "no_schema" - for k := range op.Derivatives() { - if strings.HasPrefix(k, "_dd.appsec.s.") { - metric = "schema" - break - } - } - telemetry.Count(telemetry.NamespaceAppSec, "api_security.request."+metric, []string{"framework:" + op.Framework()}).Submit(1) -} - -// shouldExtractShema checks that API Security is enabled and that sampling rate -// allows extracting schemas -func (feature *Feature) shouldExtractShema(op *httpsec.HandlerOperation, statusCode int) bool { - return feature.APISec.Enabled && - feature.APISec.Sampler.DecisionFor(apisec.SamplingKey{ - Method: op.Method(), - Route: op.Route(), - StatusCode: statusCode, - }) -} - -type HeaderExtractionFeature struct{} - -func (*HeaderExtractionFeature) String() string { - return "HTTP Header Extraction" -} - -func (*HeaderExtractionFeature) Stop() {} - -func (*HeaderExtractionFeature) OnRequest(op *httpsec.HandlerOperation, args httpsec.HandlerOperationArgs) { - _, _ = extractRequestHeaders(op, args) -} - -func (*HeaderExtractionFeature) OnResponse(op *httpsec.HandlerOperation, resp httpsec.HandlerOperationRes) { - _ = extractResponseHeaders(op, resp) -} - -func extractRequestHeaders(op *httpsec.HandlerOperation, args httpsec.HandlerOperationArgs) (map[string][]string, netip.Addr) { - tags, ip := ClientIPTags(args.Headers, true, args.RemoteAddr) - - op.SetStringTags(tags) - headers := headersRemoveCookies(args.Headers) - headers["host"] = []string{args.Host} - - setRequestHeadersTags(op, headers) - - return headers, ip -} - -func extractResponseHeaders(op *httpsec.HandlerOperation, resp httpsec.HandlerOperationRes) map[string][]string { - headers := headersRemoveCookies(resp.Headers) - setResponseHeadersTags(op, headers) - return headers -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/request.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/request.go deleted file mode 100644 index 9c5c1aacdd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/request.go +++ /dev/null @@ -1,184 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package httpsec - -import ( - "net/http" - "net/netip" - "os" - "strings" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" -) - -const ( - // envClientIPHeader is the name of the env var used to specify the IP header to be used for client IP collection. - envClientIPHeader = "DD_TRACE_CLIENT_IP_HEADER" -) - -var ( - // defaultIPHeaders is the default list of IP-related headers leveraged to - // retrieve the public client IP address in RemoteAddr. - defaultIPHeaders = []string{ - "x-forwarded-for", - "x-real-ip", - "true-client-ip", - "x-client-ip", - "x-forwarded", - "forwarded-for", - "x-cluster-client-ip", - "fastly-client-ip", - "cf-connecting-ip", - "cf-connecting-ipv6", - } - - // defaultCollectedHeaders is the default list of HTTP headers collected as - // request span tags when appsec is enabled. - defaultCollectedHeaders = append([]string{ - "host", - "content-length", - "content-type", - "content-encoding", - "content-language", - "forwarded", - "via", - "user-agent", - "accept", - "accept-encoding", - "accept-language", - "x-amzn-trace-id", - "cloudfront-viewer-ja3-fingerprint", - "cf-ray", - "x-cloud-trace-context", - "x-appgw-trace-id", - "akamai-user-risk", - "x-sigsci-requestid", - "x-sigsci-tags", - }, defaultIPHeaders...) - - // collectedHeadersLookupMap is a helper lookup map of HTTP headers to - // collect as request span tags when appsec is enabled. It is computed at - // init-time based on defaultCollectedHeaders and leveraged by NormalizeHTTPHeaders. - collectedHeadersLookupMap map[string]struct{} - - // monitoredClientIPHeadersCfg is the list of IP-related headers leveraged to - // retrieve the public client IP address in RemoteAddr. This is defined at init - // time in function of the value of the envClientIPHeader environment variable. - monitoredClientIPHeadersCfg []string -) - -// ClientIPTags returns the resulting Datadog span tags `http.client_ip` -// containing the client IP and `network.client.ip` containing the remote IP. -// The tags are present only if a valid ip address has been returned by -// RemoteAddr(). -func ClientIPTags(headers map[string][]string, hasCanonicalHeaders bool, remoteAddr string) (tags map[string]string, clientIP netip.Addr) { - remoteIP, clientIP := ClientIP(headers, hasCanonicalHeaders, remoteAddr, monitoredClientIPHeadersCfg) - return ClientIPTagsFor(remoteIP, clientIP), clientIP -} - -func ClientIPTagsFor(remoteIP netip.Addr, clientIP netip.Addr) map[string]string { - remoteIPValid := remoteIP.IsValid() - clientIPValid := clientIP.IsValid() - - if !remoteIPValid && !clientIPValid { - return nil - } - - tags := make(map[string]string, 2) - if remoteIPValid { - tags[ext.NetworkClientIP] = remoteIP.String() - } - if clientIPValid { - tags[ext.HTTPClientIP] = clientIP.String() - } - - return tags -} - -// NormalizeHTTPHeaders returns the HTTP headers following Datadog's -// normalization format. -func NormalizeHTTPHeaders(headers map[string][]string) (normalized map[string]string) { - if len(headers) == 0 { - return nil - } - normalized = make(map[string]string, len(collectedHeadersLookupMap)) - for k, v := range headers { - k = normalizeHTTPHeaderName(k) - if _, found := collectedHeadersLookupMap[k]; found { - normalized[k] = normalizeHTTPHeaderValue(v) - } - } - if len(normalized) == 0 { - return nil - } - return normalized -} - -// Remove cookies from the request headers and return the map of headers -// Used from `server.request.headers.no_cookies` and server.response.headers.no_cookies` addresses for the WAF -func headersRemoveCookies(headers http.Header) map[string][]string { - headersNoCookies := make(http.Header, len(headers)) - for k, v := range headers { - k := strings.ToLower(k) - if k == "cookie" { - continue - } - headersNoCookies[k] = v - } - return headersNoCookies -} - -func normalizeHTTPHeaderName(name string) string { - return strings.ToLower(name) -} - -func normalizeHTTPHeaderValue(values []string) string { - return strings.Join(values, ",") -} - -func init() { - makeCollectedHTTPHeadersLookupMap() - readMonitoredClientIPHeadersConfig() -} - -func makeCollectedHTTPHeadersLookupMap() { - collectedHeadersLookupMap = make(map[string]struct{}, len(defaultCollectedHeaders)) - for _, h := range defaultCollectedHeaders { - collectedHeadersLookupMap[h] = struct{}{} - } -} - -func readMonitoredClientIPHeadersConfig() { - if header := os.Getenv(envClientIPHeader); header != "" { - // Make this header the only one to consider in RemoteAddr - monitoredClientIPHeadersCfg = []string{header} - - // Add this header to the list of collected headers - header = normalizeHTTPHeaderName(header) - collectedHeadersLookupMap[header] = struct{}{} - } else { - // No specific IP header was configured, use the default list - monitoredClientIPHeadersCfg = defaultIPHeaders - } -} - -// setRequestHeadersTags sets the AppSec-specific request headers span tags. -func setRequestHeadersTags(span trace.TagSetter, headers map[string][]string) { - setHeadersTags(span, "http.request.headers.", headers) -} - -// setResponseHeadersTags sets the AppSec-specific response headers span tags. -func setResponseHeadersTags(span trace.TagSetter, headers map[string][]string) { - setHeadersTags(span, "http.response.headers.", headers) -} - -// setHeadersTags sets the AppSec-specific headers span tags. -func setHeadersTags(span trace.TagSetter, tagPrefix string, headers map[string][]string) { - for h, v := range NormalizeHTTPHeaders(headers) { - span.SetTag(tagPrefix+h, v) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/roundtripper.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/roundtripper.go deleted file mode 100644 index ad65ae5df2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec/roundtripper.go +++ /dev/null @@ -1,41 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package httpsec - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" -) - -type SSRFProtectionFeature struct{} - -func (*SSRFProtectionFeature) String() string { - return "SSRF Protection" -} - -func (*SSRFProtectionFeature) Stop() {} - -func NewSSRFProtectionFeature(config *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !config.RASP || !config.SupportedAddresses.AnyOf(addresses.ServerIoNetURLAddr) { - return nil, nil - } - - feature := &SSRFProtectionFeature{} - dyngo.On(rootOp, feature.OnStart) - return feature, nil -} - -func (*SSRFProtectionFeature) OnStart(op *httpsec.RoundTripOperation, args httpsec.RoundTripOperationArgs) { - dyngo.EmitData(op, waf.RunEvent{ - Operation: op, - RunAddressData: addresses.NewAddressesBuilder().WithURL(args.URL).Build(), - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec/lfi.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec/lfi.go deleted file mode 100644 index 57cc0995af..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec/lfi.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package ossec - -import ( - "os" - - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" -) - -type Feature struct{} - -func (*Feature) String() string { - return "LFI Protection" -} - -func (*Feature) Stop() {} - -func NewOSSecFeature(cfg *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !cfg.RASP || !cfg.SupportedAddresses.AnyOf(addresses.ServerIOFSFileAddr) { - return nil, nil - } - - feature := &Feature{} - dyngo.On(rootOp, feature.OnStart) - return feature, nil -} - -func (*Feature) OnStart(op *ossec.OpenOperation, args ossec.OpenOperationArgs) { - dyngo.OnData(op, func(err *events.BlockingSecurityEvent) { - dyngo.OnFinish(op, func(_ *ossec.OpenOperation, res ossec.OpenOperationRes[*os.File]) { - if res.Err != nil { - *res.Err = err - } - }) - }) - - dyngo.EmitData(op, waf.RunEvent{ - Operation: op, - RunAddressData: addresses.NewAddressesBuilder(). - WithFilePath(args.Path). - Build(), - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec/sql.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec/sql.go deleted file mode 100644 index 7f3e35d79b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec/sql.go +++ /dev/null @@ -1,43 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package sqlsec - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" -) - -type Feature struct{} - -func (*Feature) String() string { - return "SQLi Protection" -} - -func (*Feature) Stop() {} - -func NewSQLSecFeature(cfg *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !cfg.RASP || !cfg.SupportedAddresses.AnyOf(addresses.ServerDBTypeAddr, addresses.ServerDBStatementAddr) { - return nil, nil - } - - feature := &Feature{} - dyngo.On(rootOp, feature.OnStart) - return feature, nil -} - -func (*Feature) OnStart(op *sqlsec.SQLOperation, args sqlsec.SQLOperationArgs) { - dyngo.EmitData(op, waf.RunEvent{ - Operation: op, - RunAddressData: addresses.NewAddressesBuilder(). - WithDBStatement(args.Query). - WithDBType(args.Driver). - Build(), - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace/trace.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace/trace.go deleted file mode 100644 index eb721c3596..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace/trace.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package trace - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" -) - -// AppSec-specific span tags that are expected to -// be in the web service entry span (span of type `web`) when AppSec is enabled. -var staticAppsecTags = map[string]any{ - "_dd.appsec.enabled": 1, - "_dd.runtime_family": "go", -} - -type AppsecSpanTransport struct{} - -func (*AppsecSpanTransport) String() string { - return "Appsec Span Transport" -} - -func (*AppsecSpanTransport) Stop() {} - -func NewAppsecSpanTransport(_ *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - ast := &AppsecSpanTransport{} - - dyngo.On(rootOp, ast.OnServiceEntryStart) - dyngo.On(rootOp, ast.OnSpanStart) - - return ast, nil -} - -// OnServiceEntryStart is the start listener of the trace.ServiceEntrySpanOperation start event. -// It listens for tags and serializable tags and sets them on the span when finishing the operation. -func (*AppsecSpanTransport) OnServiceEntryStart(op *trace.ServiceEntrySpanOperation, _ trace.ServiceEntrySpanArgs) { - op.SetTags(staticAppsecTags) - dyngo.OnData(op, op.OnSpanTagEvent) - dyngo.OnData(op, op.OnServiceEntrySpanTagEvent) - dyngo.OnData(op, op.OnJSONServiceEntrySpanTagEvent) - dyngo.OnData(op, op.OnServiceEntrySpanTagsBulkEvent) -} - -// OnSpanStart is the start listener of the trace.SpanOperation start event. -// It listens for tags and sets them on the current span when finishing the operation. -func (*AppsecSpanTransport) OnSpanStart(op *trace.SpanOperation, _ trace.SpanArgs) { - dyngo.OnData(op, op.OnSpanTagEvent) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec/usec.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec/usec.go deleted file mode 100644 index 91e490e89f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec/usec.go +++ /dev/null @@ -1,71 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package usersec - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" -) - -type Feature struct{} - -func (*Feature) String() string { - return "User Security" -} - -func (*Feature) Stop() {} - -func NewUserSecFeature(cfg *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if !cfg.SupportedAddresses.AnyOf( - addresses.UserIDAddr, - addresses.UserLoginAddr, - addresses.UserOrgAddr, - addresses.UserSessionIDAddr, - addresses.UserLoginSuccessAddr, - addresses.UserLoginFailureAddr) { - return nil, nil - } - - feature := &Feature{} - dyngo.OnFinish(rootOp, feature.OnFinish) - return feature, nil -} - -func (*Feature) OnFinish(op *usersec.UserLoginOperation, res usersec.UserLoginOperationRes) { - builder := addresses.NewAddressesBuilder(). - WithUserID(res.UserID). - WithUserLogin(res.UserLogin). - WithUserOrg(res.UserOrg). - WithUserSessionID(res.SessionID) - - switch op.EventType { - case usersec.UserLoginSuccess: - builder = builder.WithUserLoginSuccess(). - WithUserID(res.UserID). - WithUserLogin(res.UserLogin). - WithUserOrg(res.UserOrg). - WithUserSessionID(res.SessionID) - case usersec.UserLoginFailure: - builder = builder.WithUserLoginFailure(). - WithUserID(res.UserID). - WithUserLogin(res.UserLogin). - WithUserOrg(res.UserOrg) - case usersec.UserSet: - builder = builder.WithUserID(res.UserID). - WithUserLogin(res.UserLogin). - WithUserOrg(res.UserOrg). - WithUserSessionID(res.SessionID) - } - - dyngo.EmitData(op, waf.RunEvent{ - Operation: op, - RunAddressData: builder.Build(), - }) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/tags.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/tags.go deleted file mode 100644 index 6ce403e4de..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/tags.go +++ /dev/null @@ -1,96 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package waf - -import ( - "slices" - "time" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal" - emitter "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - "github.com/DataDog/go-libddwaf/v4" - "github.com/DataDog/go-libddwaf/v4/timer" -) - -const ( - wafSpanTagPrefix = "_dd.appsec." - eventRulesVersionTag = wafSpanTagPrefix + "event_rules.version" - wafVersionTag = wafSpanTagPrefix + "waf.version" - wafErrorTag = wafSpanTagPrefix + "waf.error" - wafTimeoutTag = wafSpanTagPrefix + "waf.timeouts" - raspRuleEvalTag = wafSpanTagPrefix + "rasp.rule.eval" - raspErrorTag = wafSpanTagPrefix + "rasp.error" - raspTimeoutTag = wafSpanTagPrefix + "rasp.timeout" - truncationTagPrefix = wafSpanTagPrefix + "truncated." - - durationExtSuffix = ".duration_ext" - - blockedRequestTag = "appsec.blocked" -) - -// AddRulesMonitoringTags adds the tags related to security rules monitoring -func AddRulesMonitoringTags(th trace.TagSetter) { - th.SetTag(wafVersionTag, libddwaf.Version()) - th.SetTag(ext.ManualKeep, samplernames.AppSec) -} - -// AddWAFMonitoringTags adds the tags related to the monitoring of the WAF -func AddWAFMonitoringTags(th trace.TagSetter, metrics *emitter.ContextMetrics, rulesVersion string, truncations map[libddwaf.TruncationReason][]int, timerStats map[timer.Key]time.Duration) { - // Rules version is set for every request to help the backend associate Feature duration metrics with rule version - th.SetTag(eventRulesVersionTag, rulesVersion) - - if raspCallsCount := metrics.SumRASPCalls.Load(); raspCallsCount > 0 { - th.SetTag(raspRuleEvalTag, raspCallsCount) - } - - if raspErrorsCount := metrics.SumRASPErrors.Load(); raspErrorsCount > 0 { - th.SetTag(raspErrorTag, raspErrorsCount) - } - - if wafErrorsCount := metrics.SumWAFErrors.Load(); wafErrorsCount > 0 { - th.SetTag(wafErrorTag, wafErrorsCount) - } - - // Add metrics like `waf.duration` and `rasp.duration_ext` - for scope, value := range timerStats { - th.SetTag(wafSpanTagPrefix+string(scope)+durationExtSuffix, float64(value.Nanoseconds())/float64(time.Microsecond.Nanoseconds())) - for component, atomicValue := range metrics.SumDurations[scope] { - if value := atomicValue.Load(); value > 0 { - th.SetTag(wafSpanTagPrefix+string(scope)+"."+string(component), float64(value)/float64(time.Microsecond.Nanoseconds())) - } - } - } - - if value := metrics.SumWAFTimeouts.Load(); value > 0 { - th.SetTag(wafTimeoutTag, value) - } - - var sumRASPTimeouts uint32 - for ruleType := range metrics.SumRASPTimeouts { - sumRASPTimeouts += metrics.SumRASPTimeouts[ruleType].Load() - } - - if sumRASPTimeouts > 0 { - th.SetTag(raspTimeoutTag, sumRASPTimeouts) - } - - for reason, count := range truncations { - if len(count) > 0 { - th.SetTag(truncationTagPrefix+reason.String(), slices.Max(count)) - } - } -} - -// SetEventSpanTags sets the security event span tags related to an appsec event -func SetEventSpanTags(span trace.TagSetter) { - span.SetTag("_dd.origin", "appsec") - // Set the appsec.event tag needed by the appsec backend - span.SetTag("appsec.event", true) - span.SetTag("_dd.p.ts", internal.TraceSourceTagValue{Value: internal.ASMTraceSource}) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/waf.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/waf.go deleted file mode 100644 index b8e9ea02bb..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf/waf.go +++ /dev/null @@ -1,167 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package waf - -import ( - "fmt" - "sync" - "time" - - "github.com/DataDog/appsec-internal-go/limiter" - "github.com/DataDog/dd-trace-go/v2/appsec/events" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions" - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf" - "github.com/DataDog/dd-trace-go/v2/internal/appsec/listener" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/stacktrace" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/go-libddwaf/v4" - "github.com/DataDog/go-libddwaf/v4/timer" -) - -type Feature struct { - timeout time.Duration - limiter *limiter.TokenTicker - handle *libddwaf.Handle - supportedAddrs config.AddressSet - rulesVersion string - reportRulesTags sync.Once - - telemetryMetrics waf.HandleMetrics - - // Determine if we can use [internal.MetaStructValue] to delegate the WAF events serialization to the trace writer - // or if we have to use the [SerializableTag] method to serialize the events - metaStructAvailable bool -} - -func NewWAFFeature(cfg *config.Config, rootOp dyngo.Operation) (listener.Feature, error) { - if ok, err := libddwaf.Load(); err != nil { - // 1. If there is an error and the loading is not ok: log as an unexpected error case and quit appsec - // Note that we assume here that the test for the unsupported target has been done before calling - // this method, so it is now considered an error for this method - if !ok { - return nil, fmt.Errorf("error while loading libddwaf: %w", err) - } - // 2. If there is an error and the loading is ok: log as an informative error where appsec can be used - telemetrylog.Warn("appsec: non-critical error while loading libddwaf: %s", err.Error(), telemetry.WithTags([]string{"product:appsec"})) - } - - newHandle, rulesVersion := cfg.NewHandle() - telemetryMetrics := waf.NewMetricsInstance(newHandle, rulesVersion) - if newHandle == nil { - // As specified @ https://docs.google.com/document/d/1t6U7WXko_QChhoNIApn0-CRNe6SAKuiiAQIyCRPUXP4/edit?tab=t.0#bookmark=id.vddhd140geg7 - telemetrylog.Error("Failed to build WAF instance: no valid rules or processors available", telemetry.WithTags([]string{ - "log_type:rc::asm_dd::diagnostic", - "appsec_config_key:*", - "rc_config_id:*", - })) - return nil, fmt.Errorf("failed to obtain WAF instance from the waf.Builder (loaded paths: %q)", cfg.WAFManager.ConfigPaths("")) - } - - cfg.SupportedAddresses = config.NewAddressSet(newHandle.Addresses()) - - tokenTicker := limiter.NewTokenTicker(cfg.TraceRateLimit, cfg.TraceRateLimit) - tokenTicker.Start() - - feature := &Feature{ - handle: newHandle, - timeout: cfg.WAFTimeout, - limiter: tokenTicker, - supportedAddrs: cfg.SupportedAddresses, - telemetryMetrics: telemetryMetrics, - metaStructAvailable: cfg.MetaStructAvailable, - rulesVersion: rulesVersion, - } - - dyngo.On(rootOp, feature.onStart) - dyngo.OnFinish(rootOp, feature.onFinish) - - return feature, nil -} - -func (waf *Feature) onStart(op *waf.ContextOperation, _ waf.ContextArgs) { - waf.reportRulesTags.Do(func() { - AddRulesMonitoringTags(op) - }) - - ctx, err := waf.handle.NewContext(timer.WithBudget(waf.timeout), timer.WithComponents(addresses.Scopes[:]...)) - if err != nil { - log.Debug("appsec: failed to create WAF context: %s", err.Error()) - } - - op.SwapContext(ctx) - op.SetLimiter(waf.limiter) - op.SetSupportedAddresses(waf.supportedAddrs) - op.SetMetricsInstance(waf.telemetryMetrics.NewContextMetrics()) - - // Run the WAF with the given address data - dyngo.OnData(op, op.OnEvent) - - waf.SetupActionHandlers(op) -} - -func (*Feature) SetupActionHandlers(op *waf.ContextOperation) { - // Set the blocking tag on the operation when a blocking event is received - dyngo.OnData(op, func(*events.BlockingSecurityEvent) { - log.Debug("appsec: blocking event detected") - op.SetTag(blockedRequestTag, true) - op.SetRequestBlocked() - }) - - // Register the stacktrace if one is requested by a WAF action - dyngo.OnData(op, func(action *actions.StackTraceAction) { - log.Debug("appsec: registering stack trace for security purposes") - op.AddStackTraces(action.Event) - }) - - dyngo.OnData(op, func(*waf.SecurityEvent) { - log.Debug("appsec: WAF detected a suspicious event") - SetEventSpanTags(op) - }) -} - -func (waf *Feature) onFinish(op *waf.ContextOperation, _ waf.ContextRes) { - ctx := op.SwapContext(nil) - if ctx == nil { - return - } - - ctx.Close() - - truncations := ctx.Truncations() - timerStats := ctx.Timer.Stats() - metrics := op.GetMetricsInstance() - AddWAFMonitoringTags(op, metrics, waf.rulesVersion, truncations, timerStats) - metrics.Submit(truncations, timerStats) - - if wafEvents := op.Events(); len(wafEvents) > 0 { - tagValue := map[string][]any{"triggers": wafEvents} - if waf.metaStructAvailable { - op.SetTag("appsec", internal.MetaStructValue{Value: tagValue}) - } else { - op.SetSerializableTag("_dd.appsec.json", tagValue) - } - } - - op.SetSerializableTags(op.Derivatives()) - if stacks := op.StackTraces(); len(stacks) > 0 { - op.SetTag(stacktrace.SpanKey, stacktrace.GetSpanValue(stacks...)) - } -} - -func (*Feature) String() string { - return "Web Application Firewall" -} - -func (waf *Feature) Stop() { - waf.limiter.Stop() - waf.handle.Close() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/remoteconfig.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/remoteconfig.go deleted file mode 100644 index 0660597284..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/remoteconfig.go +++ /dev/null @@ -1,403 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package appsec - -import ( - "encoding/json" - "errors" - "fmt" - "maps" - "os" - "slices" - "strings" - - internal "github.com/DataDog/appsec-internal-go/appsec" - "github.com/DataDog/datadog-agent/pkg/remoteconfig/state" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" - "github.com/DataDog/dd-trace-go/v2/internal/remoteconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/go-libddwaf/v4" -) - -// onRCRulesUpdate is the RC callback called when security rules related RC updates are available -func (a *appsec) onRCRulesUpdate(updates map[string]remoteconfig.ProductUpdate) map[string]state.ApplyStatus { - statuses := make(map[string]state.ApplyStatus) - - // If appsec was deactivated through RC, stop here - if !a.started { - for _, pu := range updates { - for path := range pu { - // We are not acknowledging anything... since we are ignoring all these updates... - statuses[path] = state.ApplyStatus{State: state.ApplyStateUnacknowledged} - } - } - return statuses - } - - // Updates the local [config.WAFManager] with the new data... We track deletions and add/updates - // separately as it is important to process all deletions first. - // See: https://docs.google.com/document/d/1t6U7WXko_QChhoNIApn0-CRNe6SAKuiiAQIyCRPUXP4/edit?tab=t.0#heading=h.pqke0ujtvm2j - type UpdatedConfig struct { - Product string - Content map[string]any - } - addOrUpdates := make(map[string]UpdatedConfig) - - for product, prodUpdates := range updates { - for path, data := range prodUpdates { - switch product { - case state.ProductASMDD, state.ProductASMData, state.ProductASM: - if data == nil { - // Perofrm the deletion right away; we need to do these before any other updates... - log.Debug("appsec: remote config: removing configuration %q", path) - a.cfg.WAFManager.RemoveConfig(path) - statuses[path] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - continue - } - cfg := UpdatedConfig{Product: product} - if err := json.Unmarshal(data, &cfg.Content); err != nil { - log.Error("appsec: unmarshaling remote config update for %s (%q): %s", product, path, err.Error()) - statuses[product] = state.ApplyStatus{State: state.ApplyStateError, Error: err.Error()} - continue - } - addOrUpdates[path] = cfg - if product == state.ProductASMDD { - // Remove the default config if present when an ASM_DD config is received. - log.Debug("appsec: remote config: processed ASM_DD addition/update; removing default config if present") - if deletedDefault := a.cfg.WAFManager.RemoveDefaultConfig(); deletedDefault { - log.Debug("appsec: remote config: successfully removed default config") - } - } - case state.ProductASMFeatures: - // This is a global hook, so it'll receive [remoteconfig.ProductASMFeatures] updates as well, which are not - // relevant for this particular handler. These are handled by a product-specific handler, - // [appsec.handleASMFeatures]. - default: - log.Debug("appsec: remote config: ignoring RC update for non-ASM product %q", path) - } - } - } - - // Sort the paths to apply updates in a deterministic order... - addOrUpdatePaths := slices.Collect(maps.Keys(addOrUpdates)) - slices.Sort(addOrUpdatePaths) - - // Apply all the additions and updates - for _, path := range addOrUpdatePaths { - update := addOrUpdates[path] - log.Debug("appsec: remote config: adding/updating configuration %q", path) - diag, err := a.cfg.WAFManager.AddOrUpdateConfig(path, update.Content) - if err != nil { - log.Debug("appsec: remote config: error while adding/updating configuration %q: %s", path, err.Error()) - // Configuration object has been fully rejected; or there was an error processing it or parsing the diagnostics - // value. If we have a diagnostics object, encode all errors from the diagnostics object as a JSON value, as - // described by: - // https://docs.google.com/document/d/1t6U7WXko_QChhoNIApn0-CRNe6SAKuiiAQIyCRPUXP4/edit?tab=t.0#heading=h.6ud96uy74pzs - type errInfo struct { - Error string `json:"error,omitempty"` - Errors map[string][]string `json:"errors,omitempty"` - } - var errs map[string]errInfo - diag.EachFeature(func(name string, feat *libddwaf.Feature) { - var ( - info errInfo - some bool - ) - if feat.Error != "" { - log.Debug("appsec: remote config: error in %q feature %s: %s", path, name, feat.Error) - info.Error = feat.Error - some = true - } - for msg, ids := range feat.Errors { - log.Debug("appsec: remote config: error in %q feature %s: %s for %q", path, name, msg, ids) - if info.Errors == nil { - info.Errors = make(map[string][]string) - } - info.Errors[msg] = ids - some = true - } - if !some { - return - } - if errs == nil { - errs = make(map[string]errInfo) - } - errs[name] = info - }) - - errMsg := err.Error() - if len(errs) > 0 { - if data, err := json.Marshal(errs); err == nil { - errMsg = string(data) - } else { - telemetrylog.Error("appsec: remote config: failed to marshal error details: %s", err.Error()) - } - } - - statuses[path] = state.ApplyStatus{State: state.ApplyStateError, Error: errMsg} - continue - } - - statuses[path] = state.ApplyStatus{State: state.ApplyStateAcknowledged} - diag.EachFeature(logDiagnosticMessages(update.Product, path)) - } - if len(a.cfg.WAFManager.ConfigPaths(`^(?:datadog/\d+|employee)/ASM_DD/.+`)) == 0 { - log.Debug("appsec: remote config: no ASM_DD config loaded; restoring default config if available") - if err := a.cfg.WAFManager.RestoreDefaultConfig(); err != nil { - telemetrylog.Error("appsec: RC could not restore default config: %s", err.Error()) - } - } - - if log.DebugEnabled() { - // Avoiding the call to ConfigPaths if the Debug level is not enabled... - log.Debug("appsec: remote config: rules loaded after update: %q", a.cfg.WAFManager.ConfigPaths("")) - } - - // If an error occurs while updating the WAF handle, don't swap the RulesManager and propagate the error - // to all config statuses since we can't know which config is the faulty one - if err := a.SwapRootOperation(); err != nil { - log.Error("appsec: remote config: could not apply the new security rules: %s", err.Error()) - for k := range statuses { - if statuses[k].State == state.ApplyStateError || statuses[k].State == state.ApplyStateUnacknowledged { - // Leave failed & un-acknowledged configs as-is... This failure is not related to these... - continue - } - statuses[k] = state.ApplyStatus{State: state.ApplyStateError, Error: err.Error()} - } - } - - return statuses -} - -func logDiagnosticMessages(product string, path string) func(string, *libddwaf.Feature) { - return func(name string, feat *libddwaf.Feature) { - if feat.Error == "" && len(feat.Errors) == 0 && len(feat.Warnings) == 0 { - // No errors or warnings; nothing to report... - return - } - - path, _ := remoteconfig.ParsePath(path) - // As defined @ https://docs.google.com/document/d/1t6U7WXko_QChhoNIApn0-CRNe6SAKuiiAQIyCRPUXP4/edit?tab=t.0#bookmark=id.cthxzqjuodhh - tags := []string{ - "log_type:rc::" + strings.ToLower(product) + "::diagnostic", - "appsec_config_key:" + name, - "rc_config_id:" + path.ConfigID, - } - if err := feat.Error; err != "" { - telemetrylog.Error("%s", err, telemetry.WithTags(tags)) - } - for err, ids := range feat.Errors { - telemetrylog.Error("%q: %q", err, ids, telemetry.WithTags(tags)) - } - for err, ids := range feat.Warnings { - telemetrylog.Warn("%q: %q", err, ids, telemetry.WithTags(tags)) - } - } -} - -// handleASMFeatures deserializes an ASM_FEATURES configuration received through remote config -// and starts/stops appsec accordingly. -func (a *appsec) handleASMFeatures(u remoteconfig.ProductUpdate) map[string]state.ApplyStatus { - if len(u) == 0 { - // That should not actually happen; but would not be "invalid" per se. - return nil - } - - if len(u) > 1 { - log.Warn("appsec: Remote Config: received multiple ASM_FEATURES update; not processing any.") - statuses := make(map[string]state.ApplyStatus, len(u)) - for path := range u { - statuses[path] = state.ApplyStatus{State: state.ApplyStateUnacknowledged} - } - return statuses - } - - // NOTE: There is exactly 1 item in the map at this point; but it's a map, so we for-range over it. - var ( - path string - raw []byte - ) - for p, r := range u { - path, raw = p, r - } - - log.Debug("appsec: remote config: processing %s", path) - - // A nil config means ASM was disabled, and we stopped receiving the config file - // Don't ack the config in this case and return early - if raw == nil { - log.Debug("appsec: remote config: Stopping AppSec") - a.stop() - return map[string]state.ApplyStatus{path: {State: state.ApplyStateAcknowledged}} - } - - // Parse the config object we just received... - var parsed state.ASMFeaturesData - if err := json.Unmarshal(raw, &parsed); err != nil { - log.Error("appsec: remote config: error while unmarshalling %q: %s. Configuration won't be applied.", path, err.Error()) - return map[string]state.ApplyStatus{path: {State: state.ApplyStateError, Error: err.Error()}} - } - - // RC triggers activation of ASM; ASM is not started yet... Starting it! - if parsed.ASM.Enabled && !a.started { - log.Debug("appsec: remote config: Starting AppSec") - if err := a.start(); err != nil { - log.Error("appsec: remote config: error while processing %q. Configuration won't be applied: %s", path, err.Error()) - return map[string]state.ApplyStatus{path: {State: state.ApplyStateError, Error: err.Error()}} - } - } - - // RC triggers desactivation of ASM; ASM is started... Stopping it! - if !parsed.ASM.Enabled && a.started { - log.Debug("appsec: remote config: Stopping AppSec") - a.stop() - return map[string]state.ApplyStatus{path: {State: state.ApplyStateAcknowledged}} - } - - // If we got here, we have an idempotent success! - return map[string]state.ApplyStatus{path: {State: state.ApplyStateAcknowledged}} -} - -func (a *appsec) startRC() error { - if a.cfg.RC != nil { - return remoteconfig.Start(*a.cfg.RC) - } - return nil -} - -func (a *appsec) stopRC() { - if a.cfg.RC != nil { - remoteconfig.Stop() - } -} - -func (a *appsec) registerRCProduct(p string) error { - if a.cfg.RC == nil { - return fmt.Errorf("no valid remote configuration client") - } - return remoteconfig.RegisterProduct(p) -} - -func (a *appsec) registerRCCapability(c remoteconfig.Capability) error { - if a.cfg.RC == nil { - return fmt.Errorf("no valid remote configuration client") - } - return remoteconfig.RegisterCapability(c) -} - -func (a *appsec) unregisterRCCapability(c remoteconfig.Capability) error { - if a.cfg.RC == nil { - log.Debug("appsec: remote config: no valid remote configuration client") - return nil - } - return remoteconfig.UnregisterCapability(c) -} - -func (a *appsec) enableRemoteActivation() error { - if a.cfg.RC == nil { - return errors.New("no valid remote configuration client") - } - log.Debug("appsec: Remote Config: subscribing to ASM_FEATURES updates...") - return remoteconfig.Subscribe(state.ProductASMFeatures, a.handleASMFeatures, remoteconfig.ASMActivation) -} - -var baseCapabilities = [...]remoteconfig.Capability{ - remoteconfig.ASMDDMultiConfig, - remoteconfig.ASMDDRules, - remoteconfig.ASMExclusions, - remoteconfig.ASMCustomRules, - remoteconfig.ASMTrustedIPs, - remoteconfig.ASMExclusionData, - remoteconfig.ASMEndpointFingerprinting, - remoteconfig.ASMSessionFingerprinting, - remoteconfig.ASMNetworkFingerprinting, - remoteconfig.ASMHeaderFingerprinting, - remoteconfig.ASMTraceTaggingRules, -} - -var blockingCapabilities = [...]remoteconfig.Capability{ - remoteconfig.ASMUserBlocking, - remoteconfig.ASMRequestBlocking, - remoteconfig.ASMIPBlocking, - remoteconfig.ASMCustomBlockingResponse, -} - -func (a *appsec) enableRCBlocking() { - if a.cfg.RC == nil { - log.Debug("appsec: remote config: no valid remote configuration client") - return - } - - products := []string{state.ProductASM, state.ProductASMDD, state.ProductASMData} - for _, p := range products { - if err := a.registerRCProduct(p); err != nil { - log.Debug("appsec: remote config: couldn't register product %q: %s", p, err.Error()) - } - } - - log.Debug("appsec: remote config: registering onRCRulesUpdate callback") - if err := remoteconfig.RegisterCallback(a.onRCRulesUpdate); err != nil { - log.Debug("appsec: remote config: couldn't register callback: %s", err.Error()) - } - - for _, c := range baseCapabilities { - if err := a.registerRCCapability(c); err != nil { - log.Debug("appsec: remote config: couldn't register capability %d: %s", c, err.Error()) - } - } - - if localRulesPath, hasLocalRules := os.LookupEnv(internal.EnvRules); hasLocalRules { - log.Debug("appsec: remote config: using rules from %s; will not register blocking capabilities", localRulesPath) - return - } - if !a.cfg.BlockingUnavailable { - for _, c := range blockingCapabilities { - if err := a.registerRCCapability(c); err != nil { - log.Debug("appsec: remote config: couldn't register capability %d: %s", c, err.Error()) - } - } - } -} - -func (a *appsec) enableRASP() { - if !a.cfg.RASP { - return - } - if err := remoteconfig.RegisterCapability(remoteconfig.ASMRASPSSRF); err != nil { - log.Debug("appsec: remote config: couldn't register RASP SSRF: %s", err.Error()) - } - if err := remoteconfig.RegisterCapability(remoteconfig.ASMRASPSQLI); err != nil { - log.Debug("appsec: remote config: couldn't register RASP SQLI: %s", err.Error()) - } - if orchestrion.Enabled() { - if err := remoteconfig.RegisterCapability(remoteconfig.ASMRASPLFI); err != nil { - log.Debug("appsec: remote config: couldn't register RASP LFI: %s", err.Error()) - } - } -} - -func (a *appsec) disableRCBlocking() { - if a.cfg.RC == nil { - return - } - for _, c := range baseCapabilities { - if err := a.unregisterRCCapability(c); err != nil { - log.Debug("appsec: remote config: couldn't unregister capability %d: %s", c, err.Error()) - } - } - if !a.cfg.BlockingUnavailable { - for _, c := range blockingCapabilities { - if err := a.unregisterRCCapability(c); err != nil { - log.Debug("appsec: remote config: couldn't unregister capability %d: %s", c, err.Error()) - } - } - } - if err := remoteconfig.UnregisterCallback(a.onRCRulesUpdate); err != nil { - log.Debug("appsec: remote config: couldn't unregister callback: %s", err.Error()) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry.go deleted file mode 100644 index 94b075161a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry.go +++ /dev/null @@ -1,236 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package appsec - -import ( - "bytes" - "errors" - "io" - "os" - "os/exec" - "runtime" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/appsec/config" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - telemetrylog "github.com/DataDog/dd-trace-go/v2/internal/telemetry/log" - "github.com/DataDog/go-libddwaf/v4" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -var ( - detectLibDLOnce sync.Once - wafUsable, wafError = libddwaf.Usable() - wafSupported = !errors.As(wafError, &waferrors.UnsupportedOSArchError{}) && !errors.As(wafError, &waferrors.UnsupportedGoVersionError{}) - staticConfigs = []telemetry.Configuration{ - {Name: "goos", Value: runtime.GOOS, Origin: telemetry.OriginCode}, - {Name: "goarch", Value: runtime.GOARCH, Origin: telemetry.OriginCode}, - {Name: "cgo_enabled", Value: cgoEnabled, Origin: telemetry.OriginCode}, - {Name: "waf_supports_target", Value: wafSupported, Origin: telemetry.OriginCode}, - {Name: "waf_healthy", Value: wafUsable, Origin: telemetry.OriginCode}, - } -) - -// init sends the static telemetry for AppSec. -func init() { - telemetry.RegisterAppConfigs(staticConfigs...) -} - -func registerAppsecStartTelemetry(mode config.EnablementMode, origin telemetry.Origin) { - if mode == config.RCStandby { - return - } - - if origin == telemetry.OriginCode { - telemetry.RegisterAppConfig("WithEnablementMode", mode, telemetry.OriginCode) - } - - telemetry.ProductStarted(telemetry.NamespaceAppSec) - // TODO: add appsec.enabled metric once this metric is enabled backend-side - - detectLibDLOnce.Do(detectLibDL) -} - -func detectLibDL() { - if runtime.GOOS != "linux" { - return - } - - for _, method := range detectLibDLMethods { - if ok, err := method.method(); ok { - telemetrylog.Debug("libdl detected using method: %s", method.name, telemetry.WithTags([]string{"method:" + method.name})) - log.Debug("libdl detected using method: %s", method.name) - telemetry.RegisterAppConfig("libdl_present", true, telemetry.OriginCode) - return - } else if err != nil { - log.Debug("failed to detect libdl with method %s: %v", method.name, err.Error()) - } - } - - telemetry.RegisterAppConfig("libdl_present", false, telemetry.OriginCode) -} - -func registerAppsecStopTelemetry() { - telemetry.ProductStopped(telemetry.NamespaceAppSec) -} - -var detectLibDLMethods = []struct { - name string - method func() (bool, error) -}{ - {"cgo", func() (bool, error) { - return cgoEnabled, nil - }}, - {"ldconfig", ldconfig}, - {"ldsocache", ldCache}, - {"ldd", ldd}, - {"proc_maps", procMaps}, - {"manual_search", manualSearch}, -} - -// ldCache is messily looking into /etc/ld.so.cache to check if libdl.so.2 is present. -// Normally ld.so.cache should be parsed but standards differ so simply looking for the string should make sense. -// It is sadly disabled by default in alpine images. -func ldCache() (bool, error) { - fp, err := os.Open("/etc/ld.so.cache") - if err != nil { - if os.IsNotExist(err) { - return false, nil // ld.so.cache does not exist, so we assume libdl is not present - } - return false, err - } - defer fp.Close() - - output, err := io.ReadAll(io.LimitReader(fp, libDLReadLimit)) - if err != nil { - return false, err - } - - return searchLibdl(output), nil -} - -// ldd on ourself will check if libdl.so if we are currently running with libdl. It needs the ldd binary. -// We first try to check the whole system, then we check the current process. -func ldd() (bool, error) { - var output limitedBuffer - cmd := exec.Command("ldd", "/proc/1/exe") - cmd.Stdout = &output - cmd.Stderr = io.Discard - - oneErr := cmd.Run() - - if searchLibdl(output.Bytes()) { - return true, nil - } - - var selfOutput limitedBuffer - cmd = exec.Command("ldd", "/proc/self/exe") - cmd.Stdout = &output - cmd.Stderr = io.Discard - - selfErr := cmd.Run() - - return searchLibdl(selfOutput.Bytes()), errors.Join(oneErr, selfErr) -} - -// ldconfig -p is the most reliable way to check for libdl.so presence but it does not work on musl. It also -// needs the ldconfig binary, which is not always available in containers or minimal environments. -func ldconfig() (bool, error) { - var output limitedBuffer - cmd := exec.Command("ldconfig", "-p") - cmd.Stdout = &output - cmd.Stderr = io.Discard - - if err := cmd.Run(); err != nil { - return false, err - } - - return searchLibdl(output.Bytes()), nil -} - -// procMaps is another way to check for libdl.so presence, that works on musl if we are running with libdl already. -// but does not always work because libdl can be symlink. -// We first try to check the whole system, then we check the current process. -func procMaps() (bool, error) { - fp, err := os.Open("/proc/1/maps") - if err != nil { - if os.IsNotExist(err) || os.IsPermission(err) { - return false, nil - } - return false, err - } - - defer fp.Close() - - output, oneErr := io.ReadAll(io.LimitReader(fp, libDLReadLimit)) - - if searchLibdl(output) { - return true, nil - } - - fp, err = os.Open("/proc/self/maps") - if err != nil { - if os.IsNotExist(err) { - return false, nil - } - return false, err - } - - defer fp.Close() - - output, selfErr := io.ReadAll(io.LimitReader(fp, libDLReadLimit)) - - return searchLibdl(output), errors.Join(oneErr, selfErr) -} - -// manualSearch is a fallback method to search for libdl.so.2 in common library directories. -// See ld.so(8) for more details on the directories searched by the dynamic linker. -func manualSearch() (bool, error) { - for _, dir := range []string{"/lib", "/usr/lib", "/lib64", "/usr/lib64"} { - entries, err := os.ReadDir(dir) - if err != nil { - if os.IsNotExist(err) { - continue - } - return false, err - } - - for _, entry := range entries { - if !entry.IsDir() && entry.Name() == libDLName { - return true, nil - } - } - } - - return false, nil -} - -func searchLibdl(input []byte) bool { - data := bytes.TrimSpace(input) - if len(data) == 0 { - return false - } - - return bytes.Contains(data, []byte(libDLName)) -} - -// limitedBuffer is a custom buffer that limits its size to 256 KiB. -type limitedBuffer struct { - bytes.Buffer -} - -const ( - libDLReadLimit = 256 * 1024 - libDLName = "libdl.so.2" -) - -func (b *limitedBuffer) Write(p []byte) (n int, err error) { - if b.Len()+len(p) > libDLReadLimit { // 256 KiB limit - return 0, io.ErrShortWrite - } - return b.Buffer.Write(p) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_cgo.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_cgo.go deleted file mode 100644 index da3ce74f6c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_cgo.go +++ /dev/null @@ -1,10 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:build cgo - -package appsec - -const cgoEnabled = true diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_nocgo.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_nocgo.go deleted file mode 100644 index f789693242..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/appsec/telemetry_nocgo.go +++ /dev/null @@ -1,10 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -//go:build !cgo - -package appsec - -const cgoEnabled = false diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/civisibility.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/civisibility.go deleted file mode 100644 index d1d55329a5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/civisibility.go +++ /dev/null @@ -1,41 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package civisibility - -import "sync/atomic" - -type State int - -const ( - StateUninitialized State = iota - StateInitializing - StateInitialized - StateExiting - StateExited -) - -var ( - status atomic.Int32 - isTestMode atomic.Bool -) - -func GetState() State { - // Get the state atomically - return State(status.Load()) -} - -func SetState(state State) { - // Set the state atomically - status.Store(int32(state)) -} - -func SetTestMode() { - isTestMode.Store(true) -} - -func IsTestMode() bool { - return isTestMode.Load() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/ci.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/ci.go deleted file mode 100644 index 4d98c37e07..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/ci.go +++ /dev/null @@ -1,47 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // CIJobID indicates the id of the CI job. - CIJobID = "ci.job.id" - - // CIJobName indicates the name of the CI job. - CIJobName = "ci.job.name" - - // CIJobURL indicates the URL of the CI job. - CIJobURL = "ci.job.url" - - // CIPipelineID indicates the ID of the CI pipeline. - CIPipelineID = "ci.pipeline.id" - - // CIPipelineName indicates the name of the CI pipeline. - CIPipelineName = "ci.pipeline.name" - - // CIPipelineNumber indicates the number of the CI pipeline. - CIPipelineNumber = "ci.pipeline.number" - - // CIPipelineURL indicates the URL of the CI pipeline. - CIPipelineURL = "ci.pipeline.url" - - // CIProviderName indicates the name of the CI provider. - CIProviderName = "ci.provider.name" - - // CIStageName indicates the name of the CI stage. - CIStageName = "ci.stage.name" - - // CINodeName indicates the name of the node in the CI environment. - CINodeName = "ci.node.name" - - // CINodeLabels indicates the labels associated with the node in the CI environment. - CINodeLabels = "ci.node.labels" - - // CIWorkspacePath records an absolute path to the directory where the project has been checked out. - CIWorkspacePath = "ci.workspace_path" - - // CIEnvVars contains environment variables used to get the pipeline correlation ID. - CIEnvVars = "_dd.ci.env_vars" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/env.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/env.go deleted file mode 100644 index ad6e485a48..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/env.go +++ /dev/null @@ -1,58 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // CIVisibilityEnabledEnvironmentVariable indicates if CI Visibility mode is enabled. - // This environment variable should be set to "1" or "true" to enable CI Visibility mode, which activates tracing and other - // features related to CI Visibility in the Datadog platform. - CIVisibilityEnabledEnvironmentVariable = "DD_CIVISIBILITY_ENABLED" - - // CIVisibilityAgentlessEnabledEnvironmentVariable indicates if CI Visibility agentless mode is enabled. - // This environment variable should be set to "1" or "true" to enable agentless mode for CI Visibility, where traces - // are sent directly to Datadog without using a local agent. - CIVisibilityAgentlessEnabledEnvironmentVariable = "DD_CIVISIBILITY_AGENTLESS_ENABLED" - - // CIVisibilityAgentlessURLEnvironmentVariable forces the agentless URL to a custom one. - // This environment variable allows you to specify a custom URL for the agentless intake in CI Visibility mode. - CIVisibilityAgentlessURLEnvironmentVariable = "DD_CIVISIBILITY_AGENTLESS_URL" - - // APIKeyEnvironmentVariable indicates the API key to be used for agentless intake. - // This environment variable should be set to your Datadog API key, allowing the agentless mode to authenticate and - // send data directly to the Datadog platform. - APIKeyEnvironmentVariable = "DD_API_KEY" - - // CIVisibilityTestSessionNameEnvironmentVariable indicate the test session name to be used on CI Visibility payloads - CIVisibilityTestSessionNameEnvironmentVariable = "DD_TEST_SESSION_NAME" - - // CIVisibilityFlakyRetryEnabledEnvironmentVariable kill-switch that allows to explicitly disable retries even if the remote setting is enabled. - // This environment variable should be set to "0" or "false" to disable the flaky retry feature. - CIVisibilityFlakyRetryEnabledEnvironmentVariable = "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED" - - // CIVisibilityFlakyRetryCountEnvironmentVariable indicates the maximum number of retry attempts for a single test case. - CIVisibilityFlakyRetryCountEnvironmentVariable = "DD_CIVISIBILITY_FLAKY_RETRY_COUNT" - - // CIVisibilityTotalFlakyRetryCountEnvironmentVariable indicates the maximum number of retry attempts for the entire session. - CIVisibilityTotalFlakyRetryCountEnvironmentVariable = "DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT" - - // CIVisibilityTestManagementEnabledEnvironmentVariable indicates if the test management feature is enabled. - CIVisibilityTestManagementEnabledEnvironmentVariable = "DD_TEST_MANAGEMENT_ENABLED" - - // CIVisibilityTestManagementAttemptToFixRetriesEnvironmentVariable indicates the maximum number of retries for the attempt to fix a test. - CIVisibilityTestManagementAttemptToFixRetriesEnvironmentVariable = "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES" - - // CIVisibilityAutoInstrumentationProviderEnvironmentVariable indicates that the auto-instrumentation script was used. - CIVisibilityAutoInstrumentationProviderEnvironmentVariable = "DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER" - - // CIVisibilityEnvironmentDataFilePath is the environment variable that holds the path to the file containing the environmental data. - CIVisibilityEnvironmentDataFilePath = "DD_TEST_OPTIMIZATION_ENV_DATA_FILE" - - // CIVisibilityImpactedTestsDetectionEnabled indicates if the impacted tests detection feature is enabled. - CIVisibilityImpactedTestsDetectionEnabled = "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED" - - // CIVisibilityInternalParallelEarlyFlakeDetectionEnabled indicates if the internal parallel early flake detection feature is enabled. - CIVisibilityInternalParallelEarlyFlakeDetectionEnabled = "DD_CIVISIBILITY_INTERNAL_PARALLEL_EARLY_FLAKE_DETECTION_ENABLED" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/git.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/git.go deleted file mode 100644 index 5f7379aa83..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/git.go +++ /dev/null @@ -1,85 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // GitBranch indicates the current git branch. - // This constant is used to tag traces with the branch name being used in the CI/CD process. - GitBranch = "git.branch" - - // GitCommitAuthorDate indicates the git commit author date related to the build. - // This constant is used to tag traces with the date when the author created the commit. - GitCommitAuthorDate = "git.commit.author.date" - - // GitCommitAuthorEmail indicates the git commit author email related to the build. - // This constant is used to tag traces with the email of the author who created the commit. - GitCommitAuthorEmail = "git.commit.author.email" - - // GitCommitAuthorName indicates the git commit author name related to the build. - // This constant is used to tag traces with the name of the author who created the commit. - GitCommitAuthorName = "git.commit.author.name" - - // GitCommitCommitterDate indicates the git commit committer date related to the build. - // This constant is used to tag traces with the date when the committer applied the commit. - GitCommitCommitterDate = "git.commit.committer.date" - - // GitCommitCommitterEmail indicates the git commit committer email related to the build. - // This constant is used to tag traces with the email of the committer who applied the commit. - GitCommitCommitterEmail = "git.commit.committer.email" - - // GitCommitCommitterName indicates the git commit committer name related to the build. - // This constant is used to tag traces with the name of the committer who applied the commit. - GitCommitCommitterName = "git.commit.committer.name" - - // GitCommitMessage indicates the git commit message related to the build. - // This constant is used to tag traces with the message associated with the commit. - GitCommitMessage = "git.commit.message" - - // GitCommitSHA indicates the git commit SHA1 hash related to the build. - // This constant is used to tag traces with the SHA1 hash of the commit. - GitCommitSHA = "git.commit.sha" - - // GitRepositoryURL indicates the git repository URL related to the build. - // This constant is used to tag traces with the URL of the repository where the commit is stored. - GitRepositoryURL = "git.repository_url" - - // GitTag indicates the current git tag. - // This constant is used to tag traces with the tag name associated with the current commit. - GitTag = "git.tag" - - // GitHeadCommit indicates the GIT head commit hash. - GitHeadCommit = "git.commit.head.sha" - - // GitHeadMessage indicates the GIT head commit message. - GitHeadMessage = "git.commit.head.message" - - // GitHeadAuthorDate indicates the GIT head commit author date. - GitHeadAuthorDate = "git.commit.head.author.date" - - // GitHeadAuthorEmail indicates the GIT head commit author email. - GitHeadAuthorEmail = "git.commit.head.author.email" - - // GitHeadAuthorName indicates the GIT head commit author name. - GitHeadAuthorName = "git.commit.head.author.name" - - // GitHeadCommitterDate indicates the GIT head commit committer date. - GitHeadCommitterDate = "git.commit.head.committer.date" - - // GitHeadCommitterEmail indicates the GIT head commit committer email. - GitHeadCommitterEmail = "git.commit.head.committer.email" - - // GitHeadCommitterName indicates the GIT head commit committer name. - GitHeadCommitterName = "git.commit.head.committer.name" - - // GitPrBaseCommit indicates the GIT PR base commit hash. - GitPrBaseCommit = "git.pull_request.base_branch_sha" - - // GitPrBaseBranch indicates the GIT PR base branch name. - GitPrBaseBranch = "git.pull_request.base_branch" - - // PrNumber indicates the pull request number. - PrNumber = "pr.number" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/os.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/os.go deleted file mode 100644 index e065f179f2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/os.go +++ /dev/null @@ -1,21 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // OSPlatform indicates the operating system family (e.g., linux, windows, darwin). - // This constant is used to tag traces with the operating system family on which the tests are running. - OSPlatform = "os.platform" - - // OSVersion indicates the version of the operating system. - // This constant is used to tag traces with the specific version of the operating system on which the tests are running. - OSVersion = "os.version" - - // OSArchitecture indicates the architecture this SDK is built for (e.g., amd64, 386, arm). - // This constant is used to tag traces with the architecture of the operating system for which the tests are built. - // Note: This could be 32-bit on a 64-bit system. - OSArchitecture = "os.architecture" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/runtime.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/runtime.go deleted file mode 100644 index 15257ef258..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/runtime.go +++ /dev/null @@ -1,16 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // RuntimeName indicates the name of the runtime compiler. - // This constant is used to tag traces with the name of the runtime compiler being used (e.g., Go, JVM). - RuntimeName = "runtime.name" - - // RuntimeVersion indicates the version of the runtime compiler. - // This constant is used to tag traces with the specific version of the runtime compiler being used. - RuntimeVersion = "runtime.version" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/span_types.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/span_types.go deleted file mode 100644 index 55f3fe58ed..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/span_types.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // SpanTypeTest marks a span as a test execution. - // This constant is used to indicate that the span represents a test execution. - SpanTypeTest = "test" - - // SpanTypeTestSuite marks a span as a test suite. - // This constant is used to indicate that the span represents the end of a test suite. - SpanTypeTestSuite = "test_suite_end" - - // SpanTypeTestModule marks a span as a test module. - // This constant is used to indicate that the span represents the end of a test module. - SpanTypeTestModule = "test_module_end" - - // SpanTypeTestSession marks a span as a test session. - // This constant is used to indicate that the span represents the end of a test session. - SpanTypeTestSession = "test_session_end" - - // SpanTypeSpan marks a span as a span event. - // This constant is used to indicate that the span represents a general span event. - SpanTypeSpan = "span" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/tags.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/tags.go deleted file mode 100644 index ba1499a2aa..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/tags.go +++ /dev/null @@ -1,71 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // Origin is a tag used to indicate the origin of the data. - // This tag helps in identifying the source of the trace data. - Origin = "_dd.origin" - - // LogicalCPUCores is a tag used to indicate the number of logical cpu cores - // This tag is used by the backend to perform calculations - LogicalCPUCores = "_dd.host.vcpu_count" - - // CIAppTestOrigin defines the CIApp test origin value. - // This constant is used to tag traces that originate from CIApp test executions. - CIAppTestOrigin = "ciapp-test" - - // TestSessionIDTag defines the test session ID tag for the CI Visibility Protocol. - // This constant is used to tag traces with the ID of the test session. - TestSessionIDTag string = "test_session_id" - - // TestModuleIDTag defines the test module ID tag for the CI Visibility Protocol. - // This constant is used to tag traces with the ID of the test module. - TestModuleIDTag string = "test_module_id" - - // TestSuiteIDTag defines the test suite ID tag for the CI Visibility Protocol. - // This constant is used to tag traces with the ID of the test suite. - TestSuiteIDTag string = "test_suite_id" - - // ItrCorrelationIDTag defines the correlation ID for the intelligent test runner tag for the CI Visibility Protocol. - // This constant is used to tag traces with the correlation ID for intelligent test runs. - ItrCorrelationIDTag string = "itr_correlation_id" - - // UserProvidedTestServiceTag defines if the user provided the test service. - UserProvidedTestServiceTag string = "_dd.test.is_user_provided_service" -) - -// Coverage tags -const ( - // CodeCoverageEnabledTag defines if code coverage has been enabled. - // This constant is used to tag traces to indicate whether code coverage measurement is enabled. - CodeCoverageEnabledTag string = "test.code_coverage.enabled" - - // CodeCoveragePercentageOfTotalLines defines the percentage of total code coverage by a session. - // This constant is used to tag traces with the percentage of code lines covered during the test session. - CodeCoveragePercentageOfTotalLines string = "test.code_coverage.lines_pct" -) - -// Capabilities -const ( - // LibraryCapabilitiesTestImpactAnalysis is a tag used to indicate the test impact analysis capability of the library. - LibraryCapabilitiesTestImpactAnalysis = "_dd.library_capabilities.test_impact_analysis" - - // LibraryCapabilitiesEarlyFlakeDetection is a tag used to indicate the early flake detection capability of the library. - LibraryCapabilitiesEarlyFlakeDetection = "_dd.library_capabilities.early_flake_detection" - - // LibraryCapabilitiesAutoTestRetries is a tag used to indicate the auto test retries capability of the library. - LibraryCapabilitiesAutoTestRetries = "_dd.library_capabilities.auto_test_retries" - - // LibraryCapabilitiesTestManagementQuarantine is a tag used to indicate the quarantine capability of the library. - LibraryCapabilitiesTestManagementQuarantine = "_dd.library_capabilities.test_management.quarantine" - - // LibraryCapabilitiesTestManagementDisable is a tag used to indicate the disable capability of the library. - LibraryCapabilitiesTestManagementDisable = "_dd.library_capabilities.test_management.disable" - - // LibraryCapabilitiesTestManagementAttemptToFix is a tag used to indicate the attempt to fix capability of the library. - LibraryCapabilitiesTestManagementAttemptToFix = "_dd.library_capabilities.test_management.attempt_to_fix" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/test_tags.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/test_tags.go deleted file mode 100644 index cd8c40dcf3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants/test_tags.go +++ /dev/null @@ -1,180 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package constants - -const ( - // TestModule indicates the test module name. - // This constant is used to tag traces with the name of the test module. - TestModule = "test.module" - - // TestSuite indicates the test suite name. - // This constant is used to tag traces with the name of the test suite. - TestSuite = "test.suite" - - // TestName indicates the test name. - // This constant is used to tag traces with the name of the test. - TestName = "test.name" - - // TestType indicates the type of the test (e.g., test, benchmark). - // This constant is used to tag traces with the type of the test. - TestType = "test.type" - - // TestFramework indicates the test framework name. - // This constant is used to tag traces with the name of the test framework. - TestFramework = "test.framework" - - // TestFrameworkVersion indicates the test framework version. - // This constant is used to tag traces with the version of the test framework. - TestFrameworkVersion = "test.framework_version" - - // TestStatus indicates the test execution status. - // This constant is used to tag traces with the execution status of the test. - TestStatus = "test.status" - - // TestSkipReason indicates the skip reason of the test. - // This constant is used to tag traces with the reason why the test was skipped. - TestSkipReason = "test.skip_reason" - - // TestSourceFile indicates the source file where the test is located. - // This constant is used to tag traces with the file path of the test source code. - TestSourceFile = "test.source.file" - - // TestSourceStartLine indicates the line of the source file where the test starts. - // This constant is used to tag traces with the line number in the source file where the test starts. - TestSourceStartLine = "test.source.start" - - // TestSourceEndLine indicates the line of the source file where the test ends. - // This constant is used to tag traces with the line number in the source file where the test ends. - TestSourceEndLine = "test.source.end" - - // TestCodeOwners indicates the test code owners. - // This constant is used to tag traces with the code owners responsible for the test. - TestCodeOwners = "test.codeowners" - - // TestCommand indicates the test command. - // This constant is used to tag traces with the command used to execute the test. - TestCommand = "test.command" - - // TestCommandExitCode indicates the test command exit code. - // This constant is used to tag traces with the exit code of the test command. - TestCommandExitCode = "test.exit_code" - - // TestCommandWorkingDirectory indicates the test command working directory relative to the source root. - // This constant is used to tag traces with the working directory path relative to the source root. - TestCommandWorkingDirectory = "test.working_directory" - - // TestSessionName indicates the test session name - // This constant is used to tag traces with the test session name - TestSessionName = "test_session.name" - - // TestIsNew indicates a new test - // This constant is used to tag test events that are detected as new by early flake detection - TestIsNew = "test.is_new" - - // TestIsRetry indicates a retry execution - // This constant is used to tag test events that are part of a retry execution - TestIsRetry = "test.is_retry" - - // TestRetryReason indicates the reason for retrying the test - TestRetryReason = "test.retry_reason" - - // TestEarlyFlakeDetectionRetryAborted indicates a retry abort reason by the early flake detection feature - TestEarlyFlakeDetectionRetryAborted = "test.early_flake.abort_reason" - - // TestSkippedByITR indicates a test skipped by the ITR feature - TestSkippedByITR = "test.skipped_by_itr" - - // SkippedByITRReason indicates the reason why the test was skipped by the ITR feature - SkippedByITRReason = "Skipped by Datadog Intelligent Test Runner" - - // ITRTestsSkipped indicates that tests were skipped by the ITR feature - ITRTestsSkipped = "_dd.ci.itr.tests_skipped" - - // ITRTestsSkippingEnabled indicates that the ITR test skipping feature is enabled - ITRTestsSkippingEnabled = "test.itr.tests_skipping.enabled" - - // ITRTestsSkippingType indicates the type of ITR test skipping - ITRTestsSkippingType = "test.itr.tests_skipping.type" - - // ITRTestsSkippingCount indicates the number of tests skipped by the ITR feature - ITRTestsSkippingCount = "test.itr.tests_skipping.count" - - // CodeCoverageEnabled indicates that code coverage is enabled - CodeCoverageEnabled = "test.code_coverage.enabled" - - // TestUnskippable indicates that the test is unskippable - TestUnskippable = "test.itr.unskippable" - - // TestForcedToRun indicates that the test is forced to run because is unskippable - TestForcedToRun = "test.itr.forced_run" - - // TestIsQuarantined indicates that the test is quarantined - TestIsQuarantined = "test.test_management.is_quarantined" - - // TestIsDisabled indicates that the test is disabled - TestIsDisabled = "test.test_management.is_test_disabled" - - // TestIsAttempToFix indicates that the test is an attempt to fix - TestIsAttempToFix = "test.test_management.is_attempt_to_fix" - - // TestHasFailedAllRetries indicates that the test has failed all retries - TestHasFailedAllRetries = "test.has_failed_all_retries" - - // TestAttemptToFixPassed indicates that the attempt to fix has passed - TestAttemptToFixPassed = "test.test_management.attempt_to_fix_passed" - - // TestManagementEnabled indicates that the test management feature is enabled - TestManagementEnabled = "test.test_management.enabled" - - // TestIsModified indicates that the test is modified - TestIsModified = "test.is_modified" -) - -// Define valid test status types. -const ( - // TestStatusPass marks test execution as passed. - // This constant is used to tag traces with a status indicating that the test passed. - TestStatusPass = "pass" - - // TestStatusFail marks test execution as failed. - // This constant is used to tag traces with a status indicating that the test failed. - TestStatusFail = "fail" - - // TestStatusSkip marks test execution as skipped. - // This constant is used to tag traces with a status indicating that the test was skipped. - TestStatusSkip = "skip" -) - -// Define valid test types. -const ( - // TestTypeTest defines test type as test. - // This constant is used to tag traces indicating that the type of test is a standard test. - TestTypeTest = "test" - - // TestTypeBenchmark defines test type as benchmark. - // This constant is used to tag traces indicating that the type of test is a benchmark. - TestTypeBenchmark = "benchmark" -) - -// Retry reasons -const ( - // AttemptToFixRetryReason indicates that the test is retried due to an attempt to fix. - AttemptToFixRetryReason = "attempt_to_fix" - - // EarlyFlakeDetectionRetryReason indicates that the test is retried due to early flake detection. - EarlyFlakeDetectionRetryReason = "early_flake_detection" - - // AutoTestRetriesRetryReason indicates that the test is retried due to auto test retries. - AutoTestRetriesRetryReason = "auto_test_retry" - - // ExternalRetryReason indicates that the test is retried due to an external reason. - ExternalRetryReason = "external" -) - -const ( - // TestDisabledSkipReason indicates the skip reason for a test that is disabled. - TestDisabledSkipReason = "Flaky test is disabled by Datadog" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/ci_providers.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/ci_providers.go deleted file mode 100644 index 363bb724a1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/ci_providers.go +++ /dev/null @@ -1,688 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "encoding/json" - "fmt" - "os" - "regexp" - "sort" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// providerType defines a function type that returns a map of string key-value pairs. -type providerType = func() map[string]string - -// providers maps environment variable names to their corresponding CI provider extraction functions. -var providers = map[string]providerType{ - "APPVEYOR": extractAppveyor, - "TF_BUILD": extractAzurePipelines, - "BITBUCKET_COMMIT": extractBitbucket, - "BUDDY": extractBuddy, - "BUILDKITE": extractBuildkite, - "CIRCLECI": extractCircleCI, - "GITHUB_SHA": extractGithubActions, - "GITLAB_CI": extractGitlab, - "JENKINS_URL": extractJenkins, - "TEAMCITY_VERSION": extractTeamcity, - "TRAVIS": extractTravis, - "BITRISE_BUILD_SLUG": extractBitrise, - "CF_BUILD_ID": extractCodefresh, - "CODEBUILD_INITIATOR": extractAwsCodePipeline, - "DRONE": extractDrone, -} - -// getEnvVarsJSON returns a JSON representation of the specified environment variables. -func getEnvVarsJSON(envVars ...string) ([]byte, error) { - envVarsMap := make(map[string]string) - for _, envVar := range envVars { - value := os.Getenv(envVar) - if value != "" { - envVarsMap[envVar] = value - } - } - return json.Marshal(envVarsMap) -} - -// getProviderTags extracts CI information from environment variables. -func getProviderTags() map[string]string { - tags := map[string]string{} - for key, provider := range providers { - if _, ok := os.LookupEnv(key); !ok { - continue - } - tags = provider() - } - - // replace with user specific tags - replaceWithUserSpecificTags(tags) - - // Normalize tags - normalizeTags(tags) - - // Expand ~ - if tag, ok := tags[constants.CIWorkspacePath]; ok && tag != "" { - tags[constants.CIWorkspacePath] = ExpandPath(tag) - } - - // remove empty values - for tag, value := range tags { - if value == "" { - delete(tags, tag) - } - } - - if log.DebugEnabled() { - if providerName, ok := tags[constants.CIProviderName]; ok { - log.Debug("civisibility: detected ci provider: %s", providerName) - } else { - log.Debug("civisibility: no ci provider was detected.") - } - } - - return tags -} - -// normalizeTags normalizes specific tags to remove prefixes and sensitive information. -func normalizeTags(tags map[string]string) { - if tag, ok := tags[constants.GitBranch]; ok && tag != "" { - if strings.Contains(tag, "refs/tags") || strings.Contains(tag, "origin/tags") || strings.Contains(tag, "refs/heads/tags") { - tags[constants.GitTag] = normalizeRef(tag) - } - tags[constants.GitBranch] = normalizeRef(tag) - } - if tag, ok := tags[constants.GitTag]; ok && tag != "" { - tags[constants.GitTag] = normalizeRef(tag) - } - if tag, ok := tags[constants.GitPrBaseBranch]; ok && tag != "" { - tags[constants.GitPrBaseBranch] = normalizeRef(tag) - } - if tag, ok := tags[constants.GitRepositoryURL]; ok && tag != "" { - tags[constants.GitRepositoryURL] = filterSensitiveInfo(tag) - } - if tag, ok := tags[constants.CIPipelineURL]; ok && tag != "" { - tags[constants.CIPipelineURL] = filterSensitiveInfo(tag) - } - if tag, ok := tags[constants.CIJobURL]; ok && tag != "" { - tags[constants.CIJobURL] = filterSensitiveInfo(tag) - } - if tag, ok := tags[constants.CIEnvVars]; ok && tag != "" { - tags[constants.CIEnvVars] = filterSensitiveInfo(tag) - } -} - -// replaceWithUserSpecificTags replaces certain tags with user-specific environment variable values. -func replaceWithUserSpecificTags(tags map[string]string) { - replace := func(tagName, envName string) { - tags[tagName] = getEnvironmentVariableIfIsNotEmpty(envName, tags[tagName]) - } - - replace(constants.GitBranch, "DD_GIT_BRANCH") - replace(constants.GitTag, "DD_GIT_TAG") - replace(constants.GitRepositoryURL, "DD_GIT_REPOSITORY_URL") - replace(constants.GitCommitSHA, "DD_GIT_COMMIT_SHA") - replace(constants.GitCommitMessage, "DD_GIT_COMMIT_MESSAGE") - replace(constants.GitCommitAuthorName, "DD_GIT_COMMIT_AUTHOR_NAME") - replace(constants.GitCommitAuthorEmail, "DD_GIT_COMMIT_AUTHOR_EMAIL") - replace(constants.GitCommitAuthorDate, "DD_GIT_COMMIT_AUTHOR_DATE") - replace(constants.GitCommitCommitterName, "DD_GIT_COMMIT_COMMITTER_NAME") - replace(constants.GitCommitCommitterEmail, "DD_GIT_COMMIT_COMMITTER_EMAIL") - replace(constants.GitCommitCommitterDate, "DD_GIT_COMMIT_COMMITTER_DATE") - replace(constants.GitPrBaseBranch, "DD_GIT_PULL_REQUEST_BASE_BRANCH") - replace(constants.GitPrBaseCommit, "DD_GIT_PULL_REQUEST_BASE_BRANCH_SHA") -} - -// getEnvironmentVariableIfIsNotEmpty returns the environment variable value if it is not empty, otherwise returns the default value. -func getEnvironmentVariableIfIsNotEmpty(key string, defaultValue string) string { - if value, ok := os.LookupEnv(key); ok && value != "" { - return value - } - return defaultValue -} - -// normalizeRef normalizes a Git reference name by removing common prefixes. -func normalizeRef(name string) string { - // Define the prefixes to remove - prefixes := []string{"refs/heads/", "refs/", "origin/", "tags/"} - - // Iterate over prefixes and remove them if present - for _, prefix := range prefixes { - if strings.HasPrefix(name, prefix) { - name = strings.TrimPrefix(name, prefix) - } - } - return name -} - -// firstEnv returns the value of the first non-empty environment variable from the provided list. -func firstEnv(keys ...string) string { - for _, key := range keys { - if value, ok := os.LookupEnv(key); ok { - if value != "" { - return value - } - } - } - return "" -} - -// extractAppveyor extracts CI information specific to Appveyor. -func extractAppveyor() map[string]string { - tags := map[string]string{} - url := fmt.Sprintf("https://ci.appveyor.com/project/%s/builds/%s", os.Getenv("APPVEYOR_REPO_NAME"), os.Getenv("APPVEYOR_BUILD_ID")) - tags[constants.CIProviderName] = "appveyor" - if os.Getenv("APPVEYOR_REPO_PROVIDER") == "github" { - tags[constants.GitRepositoryURL] = fmt.Sprintf("https://github.com/%s.git", os.Getenv("APPVEYOR_REPO_NAME")) - } else { - tags[constants.GitRepositoryURL] = os.Getenv("APPVEYOR_REPO_NAME") - } - - tags[constants.GitCommitSHA] = os.Getenv("APPVEYOR_REPO_COMMIT") - tags[constants.GitBranch] = firstEnv("APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH", "APPVEYOR_REPO_BRANCH") - tags[constants.GitTag] = os.Getenv("APPVEYOR_REPO_TAG_NAME") - - tags[constants.CIWorkspacePath] = os.Getenv("APPVEYOR_BUILD_FOLDER") - tags[constants.CIPipelineID] = os.Getenv("APPVEYOR_BUILD_ID") - tags[constants.CIPipelineName] = os.Getenv("APPVEYOR_REPO_NAME") - tags[constants.CIPipelineNumber] = os.Getenv("APPVEYOR_BUILD_NUMBER") - tags[constants.CIPipelineURL] = url - tags[constants.CIJobURL] = url - tags[constants.GitCommitMessage] = fmt.Sprintf("%s\n%s", os.Getenv("APPVEYOR_REPO_COMMIT_MESSAGE"), os.Getenv("APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED")) - tags[constants.GitCommitAuthorName] = os.Getenv("APPVEYOR_REPO_COMMIT_AUTHOR") - tags[constants.GitCommitAuthorEmail] = os.Getenv("APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL") - - tags[constants.GitPrBaseBranch] = os.Getenv("APPVEYOR_REPO_BRANCH") - tags[constants.GitHeadCommit] = os.Getenv("APPVEYOR_PULL_REQUEST_HEAD_COMMIT") - tags[constants.PrNumber] = os.Getenv("APPVEYOR_PULL_REQUEST_NUMBER") - - return tags -} - -// extractAzurePipelines extracts CI information specific to Azure Pipelines. -func extractAzurePipelines() map[string]string { - tags := map[string]string{} - baseURL := fmt.Sprintf("%s%s/_build/results?buildId=%s", os.Getenv("SYSTEM_TEAMFOUNDATIONSERVERURI"), os.Getenv("SYSTEM_TEAMPROJECTID"), os.Getenv("BUILD_BUILDID")) - pipelineURL := baseURL - jobURL := fmt.Sprintf("%s&view=logs&j=%s&t=%s", baseURL, os.Getenv("SYSTEM_JOBID"), os.Getenv("SYSTEM_TASKINSTANCEID")) - branchOrTag := firstEnv("SYSTEM_PULLREQUEST_SOURCEBRANCH", "BUILD_SOURCEBRANCH", "BUILD_SOURCEBRANCHNAME") - branch := "" - tag := "" - if strings.Contains(branchOrTag, "tags/") { - tag = branchOrTag - } else { - branch = branchOrTag - } - tags[constants.CIProviderName] = "azurepipelines" - tags[constants.CIWorkspacePath] = os.Getenv("BUILD_SOURCESDIRECTORY") - - tags[constants.CIPipelineID] = os.Getenv("BUILD_BUILDID") - tags[constants.CIPipelineName] = os.Getenv("BUILD_DEFINITIONNAME") - tags[constants.CIPipelineNumber] = os.Getenv("BUILD_BUILDID") - tags[constants.CIPipelineURL] = pipelineURL - - tags[constants.CIStageName] = os.Getenv("SYSTEM_STAGEDISPLAYNAME") - - tags[constants.CIJobID] = os.Getenv("SYSTEM_JOBID") - tags[constants.CIJobName] = os.Getenv("SYSTEM_JOBDISPLAYNAME") - tags[constants.CIJobURL] = jobURL - - tags[constants.GitRepositoryURL] = firstEnv("SYSTEM_PULLREQUEST_SOURCEREPOSITORYURI", "BUILD_REPOSITORY_URI") - tags[constants.GitCommitSHA] = firstEnv("SYSTEM_PULLREQUEST_SOURCECOMMITID", "BUILD_SOURCEVERSION") - tags[constants.GitBranch] = branch - tags[constants.GitTag] = tag - tags[constants.GitCommitMessage] = os.Getenv("BUILD_SOURCEVERSIONMESSAGE") - tags[constants.GitCommitAuthorName] = os.Getenv("BUILD_REQUESTEDFORID") - tags[constants.GitCommitAuthorEmail] = os.Getenv("BUILD_REQUESTEDFOREMAIL") - - jsonString, err := getEnvVarsJSON("SYSTEM_TEAMPROJECTID", "BUILD_BUILDID", "SYSTEM_JOBID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - tags[constants.GitPrBaseBranch] = os.Getenv("SYSTEM_PULLREQUEST_TARGETBRANCH") - tags[constants.PrNumber] = os.Getenv("SYSTEM_PULLREQUEST_PULLREQUESTNUMBER") - - return tags -} - -// extractBitrise extracts CI information specific to Bitrise. -func extractBitrise() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "bitrise" - tags[constants.GitRepositoryURL] = os.Getenv("GIT_REPOSITORY_URL") - tags[constants.GitCommitSHA] = firstEnv("BITRISE_GIT_COMMIT", "GIT_CLONE_COMMIT_HASH") - tags[constants.GitBranch] = firstEnv("BITRISEIO_PULL_REQUEST_HEAD_BRANCH", "BITRISE_GIT_BRANCH") - tags[constants.GitTag] = os.Getenv("BITRISE_GIT_TAG") - tags[constants.CIWorkspacePath] = os.Getenv("BITRISE_SOURCE_DIR") - tags[constants.CIPipelineID] = os.Getenv("BITRISE_BUILD_SLUG") - tags[constants.CIPipelineName] = os.Getenv("BITRISE_TRIGGERED_WORKFLOW_ID") - tags[constants.CIPipelineNumber] = os.Getenv("BITRISE_BUILD_NUMBER") - tags[constants.CIPipelineURL] = os.Getenv("BITRISE_BUILD_URL") - tags[constants.GitCommitMessage] = os.Getenv("BITRISE_GIT_MESSAGE") - - tags[constants.GitPrBaseBranch] = os.Getenv("BITRISEIO_GIT_BRANCH_DEST") - tags[constants.PrNumber] = os.Getenv("BITRISE_PULL_REQUEST") - - return tags -} - -// extractBitbucket extracts CI information specific to Bitbucket. -func extractBitbucket() map[string]string { - tags := map[string]string{} - url := fmt.Sprintf("https://bitbucket.org/%s/addon/pipelines/home#!/results/%s", os.Getenv("BITBUCKET_REPO_FULL_NAME"), os.Getenv("BITBUCKET_BUILD_NUMBER")) - tags[constants.CIProviderName] = "bitbucket" - tags[constants.GitRepositoryURL] = firstEnv("BITBUCKET_GIT_SSH_ORIGIN", "BITBUCKET_GIT_HTTP_ORIGIN") - tags[constants.GitCommitSHA] = os.Getenv("BITBUCKET_COMMIT") - tags[constants.GitBranch] = os.Getenv("BITBUCKET_BRANCH") - tags[constants.GitTag] = os.Getenv("BITBUCKET_TAG") - tags[constants.CIWorkspacePath] = os.Getenv("BITBUCKET_CLONE_DIR") - tags[constants.CIPipelineID] = strings.Trim(os.Getenv("BITBUCKET_PIPELINE_UUID"), "{}") - tags[constants.CIPipelineNumber] = os.Getenv("BITBUCKET_BUILD_NUMBER") - tags[constants.CIPipelineName] = os.Getenv("BITBUCKET_REPO_FULL_NAME") - tags[constants.CIPipelineURL] = url - tags[constants.CIJobURL] = url - - tags[constants.GitPrBaseBranch] = os.Getenv("BITBUCKET_PR_DESTINATION_BRANCH") - tags[constants.PrNumber] = os.Getenv("BITBUCKET_PR_ID") - - return tags -} - -// extractBuddy extracts CI information specific to Buddy. -func extractBuddy() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "buddy" - tags[constants.CIPipelineID] = fmt.Sprintf("%s/%s", os.Getenv("BUDDY_PIPELINE_ID"), os.Getenv("BUDDY_EXECUTION_ID")) - tags[constants.CIPipelineName] = os.Getenv("BUDDY_PIPELINE_NAME") - tags[constants.CIPipelineNumber] = os.Getenv("BUDDY_EXECUTION_ID") - tags[constants.CIPipelineURL] = os.Getenv("BUDDY_EXECUTION_URL") - tags[constants.GitCommitSHA] = os.Getenv("BUDDY_EXECUTION_REVISION") - tags[constants.GitRepositoryURL] = os.Getenv("BUDDY_SCM_URL") - tags[constants.GitBranch] = os.Getenv("BUDDY_EXECUTION_BRANCH") - tags[constants.GitTag] = os.Getenv("BUDDY_EXECUTION_TAG") - tags[constants.GitCommitMessage] = os.Getenv("BUDDY_EXECUTION_REVISION_MESSAGE") - tags[constants.GitCommitCommitterName] = os.Getenv("BUDDY_EXECUTION_REVISION_COMMITTER_NAME") - tags[constants.GitCommitCommitterEmail] = os.Getenv("BUDDY_EXECUTION_REVISION_COMMITTER_EMAIL") - - tags[constants.GitPrBaseBranch] = os.Getenv("BUDDY_RUN_PR_BASE_BRANCH") - tags[constants.PrNumber] = os.Getenv("BUDDY_RUN_PR_NO") - - return tags -} - -// extractBuildkite extracts CI information specific to Buildkite. -func extractBuildkite() map[string]string { - tags := map[string]string{} - tags[constants.GitBranch] = os.Getenv("BUILDKITE_BRANCH") - tags[constants.GitCommitSHA] = os.Getenv("BUILDKITE_COMMIT") - tags[constants.GitRepositoryURL] = os.Getenv("BUILDKITE_REPO") - tags[constants.GitTag] = os.Getenv("BUILDKITE_TAG") - tags[constants.CIPipelineID] = os.Getenv("BUILDKITE_BUILD_ID") - tags[constants.CIPipelineName] = os.Getenv("BUILDKITE_PIPELINE_SLUG") - tags[constants.CIPipelineNumber] = os.Getenv("BUILDKITE_BUILD_NUMBER") - tags[constants.CIPipelineURL] = os.Getenv("BUILDKITE_BUILD_URL") - tags[constants.CIJobID] = os.Getenv("BUILDKITE_CI_JOB_ID") - tags[constants.CIJobURL] = fmt.Sprintf("%s#%s", os.Getenv("BUILDKITE_BUILD_URL"), os.Getenv("BUILDKITE_JOB_ID")) - tags[constants.CIProviderName] = "buildkite" - tags[constants.CIWorkspacePath] = os.Getenv("BUILDKITE_BUILD_CHECKOUT_PATH") - tags[constants.GitCommitMessage] = os.Getenv("BUILDKITE_MESSAGE") - tags[constants.GitCommitAuthorName] = os.Getenv("BUILDKITE_BUILD_AUTHOR") - tags[constants.GitCommitAuthorEmail] = os.Getenv("BUILDKITE_BUILD_AUTHOR_EMAIL") - tags[constants.CINodeName] = os.Getenv("BUILDKITE_AGENT_ID") - - jsonString, err := getEnvVarsJSON("BUILDKITE_BUILD_ID", "BUILDKITE_JOB_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - var extraTags []string - envVars := os.Environ() - for _, envVar := range envVars { - if strings.HasPrefix(envVar, "BUILDKITE_AGENT_META_DATA_") { - envVarAsTag := envVar - envVarAsTag = strings.TrimPrefix(envVarAsTag, "BUILDKITE_AGENT_META_DATA_") - envVarAsTag = strings.ToLower(envVarAsTag) - envVarAsTag = strings.Replace(envVarAsTag, "=", ":", 1) - extraTags = append(extraTags, envVarAsTag) - } - } - - if len(extraTags) != 0 { - // HACK: Sorting isn't actually needed, but it simplifies testing if the order is consistent - sort.Sort(sort.Reverse(sort.StringSlice(extraTags))) - jsonString, err = json.Marshal(extraTags) - if err == nil { - tags[constants.CINodeLabels] = string(jsonString) - } - } - - tags[constants.GitPrBaseBranch] = os.Getenv("BUILDKITE_PULL_REQUEST_BASE_BRANCH") - tags[constants.PrNumber] = os.Getenv("BUILDKITE_PULL_REQUEST") - - return tags -} - -// extractCircleCI extracts CI information specific to CircleCI. -func extractCircleCI() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "circleci" - tags[constants.GitRepositoryURL] = os.Getenv("CIRCLE_REPOSITORY_URL") - tags[constants.GitCommitSHA] = os.Getenv("CIRCLE_SHA1") - tags[constants.GitTag] = os.Getenv("CIRCLE_TAG") - tags[constants.GitBranch] = os.Getenv("CIRCLE_BRANCH") - tags[constants.CIWorkspacePath] = os.Getenv("CIRCLE_WORKING_DIRECTORY") - tags[constants.CIPipelineID] = os.Getenv("CIRCLE_WORKFLOW_ID") - tags[constants.CIPipelineName] = os.Getenv("CIRCLE_PROJECT_REPONAME") - tags[constants.CIPipelineNumber] = os.Getenv("CIRCLE_BUILD_NUM") - tags[constants.CIPipelineURL] = fmt.Sprintf("https://app.circleci.com/pipelines/workflows/%s", os.Getenv("CIRCLE_WORKFLOW_ID")) - tags[constants.CIJobName] = os.Getenv("CIRCLE_JOB") - tags[constants.CIJobID] = os.Getenv("CIRCLE_BUILD_NUM") - tags[constants.CIJobURL] = os.Getenv("CIRCLE_BUILD_URL") - tags[constants.PrNumber] = os.Getenv("CIRCLE_PR_NUMBER") - - jsonString, err := getEnvVarsJSON("CIRCLE_BUILD_NUM", "CIRCLE_WORKFLOW_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - return tags -} - -// extractGithubActions extracts CI information specific to GitHub Actions. -func extractGithubActions() map[string]string { - tags := map[string]string{} - branchOrTag := firstEnv("GITHUB_HEAD_REF", "GITHUB_REF") - tag := "" - branch := "" - if strings.Contains(branchOrTag, "tags/") { - tag = branchOrTag - } else { - branch = branchOrTag - } - - serverURL := os.Getenv("GITHUB_SERVER_URL") - if serverURL == "" { - serverURL = "https://github.com" - } - serverURL = strings.TrimSuffix(serverURL, "/") - - rawRepository := fmt.Sprintf("%s/%s", serverURL, os.Getenv("GITHUB_REPOSITORY")) - pipelineID := os.Getenv("GITHUB_RUN_ID") - commitSha := os.Getenv("GITHUB_SHA") - - tags[constants.CIProviderName] = "github" - tags[constants.GitRepositoryURL] = rawRepository + ".git" - tags[constants.GitCommitSHA] = commitSha - tags[constants.GitBranch] = branch - tags[constants.GitTag] = tag - tags[constants.CIWorkspacePath] = os.Getenv("GITHUB_WORKSPACE") - tags[constants.CIPipelineID] = pipelineID - tags[constants.CIPipelineNumber] = os.Getenv("GITHUB_RUN_NUMBER") - tags[constants.CIPipelineName] = os.Getenv("GITHUB_WORKFLOW") - tags[constants.CIJobURL] = fmt.Sprintf("%s/commit/%s/checks", rawRepository, commitSha) - tags[constants.CIJobID] = os.Getenv("GITHUB_JOB") - tags[constants.CIJobName] = os.Getenv("GITHUB_JOB") - - attempts := os.Getenv("GITHUB_RUN_ATTEMPT") - if attempts == "" { - tags[constants.CIPipelineURL] = fmt.Sprintf("%s/actions/runs/%s", rawRepository, pipelineID) - } else { - tags[constants.CIPipelineURL] = fmt.Sprintf("%s/actions/runs/%s/attempts/%s", rawRepository, pipelineID, attempts) - } - - jsonString, err := getEnvVarsJSON("GITHUB_SERVER_URL", "GITHUB_REPOSITORY", "GITHUB_RUN_ID", "GITHUB_RUN_ATTEMPT") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - // Extract PR information from the github event json file - eventFilePath := os.Getenv("GITHUB_EVENT_PATH") - if stats, ok := os.Stat(eventFilePath); ok == nil && !stats.IsDir() { - if eventFile, err := os.Open(eventFilePath); err == nil { - defer eventFile.Close() - - var eventJSON struct { - Number int `json:"number"` - PullRequest struct { - Base struct { - Sha string `json:"sha"` - Ref string `json:"ref"` - } `json:"base"` - Head struct { - Sha string `json:"sha"` - } `json:"head"` - } `json:"pull_request"` - } - - eventDecoder := json.NewDecoder(eventFile) - if eventDecoder.Decode(&eventJSON) == nil { - tags[constants.GitHeadCommit] = eventJSON.PullRequest.Head.Sha - tags[constants.GitPrBaseCommit] = eventJSON.PullRequest.Base.Sha - tags[constants.GitPrBaseBranch] = eventJSON.PullRequest.Base.Ref - tags[constants.PrNumber] = fmt.Sprintf("%d", eventJSON.Number) - } - } - } - - // Fallback if GitPrBaseBranch is not set - if tmpVal, ok := tags[constants.GitPrBaseBranch]; !ok || tmpVal == "" { - tags[constants.GitPrBaseBranch] = os.Getenv("GITHUB_BASE_REF") - } - - return tags -} - -// extractGitlab extracts CI information specific to GitLab. -func extractGitlab() map[string]string { - tags := map[string]string{} - url := os.Getenv("CI_PIPELINE_URL") - - tags[constants.CIProviderName] = "gitlab" - tags[constants.GitRepositoryURL] = os.Getenv("CI_REPOSITORY_URL") - tags[constants.GitCommitSHA] = os.Getenv("CI_COMMIT_SHA") - tags[constants.GitBranch] = firstEnv("CI_COMMIT_BRANCH", "CI_COMMIT_REF_NAME") - tags[constants.GitTag] = os.Getenv("CI_COMMIT_TAG") - tags[constants.CIWorkspacePath] = os.Getenv("CI_PROJECT_DIR") - tags[constants.CIPipelineID] = os.Getenv("CI_PIPELINE_ID") - tags[constants.CIPipelineName] = os.Getenv("CI_PROJECT_PATH") - tags[constants.CIPipelineNumber] = os.Getenv("CI_PIPELINE_IID") - tags[constants.CIPipelineURL] = url - tags[constants.CIJobURL] = os.Getenv("CI_JOB_URL") - tags[constants.CIJobID] = os.Getenv("CI_JOB_ID") - tags[constants.CIJobName] = os.Getenv("CI_JOB_NAME") - tags[constants.CIStageName] = os.Getenv("CI_JOB_STAGE") - tags[constants.GitCommitMessage] = os.Getenv("CI_COMMIT_MESSAGE") - tags[constants.CINodeName] = os.Getenv("CI_RUNNER_ID") - tags[constants.CINodeLabels] = os.Getenv("CI_RUNNER_TAGS") - - author := os.Getenv("CI_COMMIT_AUTHOR") - authorArray := strings.FieldsFunc(author, func(s rune) bool { - return s == '<' || s == '>' - }) - tags[constants.GitCommitAuthorName] = strings.TrimSpace(authorArray[0]) - tags[constants.GitCommitAuthorEmail] = strings.TrimSpace(authorArray[1]) - tags[constants.GitCommitAuthorDate] = os.Getenv("CI_COMMIT_TIMESTAMP") - - jsonString, err := getEnvVarsJSON("CI_PROJECT_URL", "CI_PIPELINE_ID", "CI_JOB_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - tags[constants.GitHeadCommit] = os.Getenv("CI_MERGE_REQUEST_SOURCE_BRANCH_SHA") - tags[constants.GitPrBaseCommit] = os.Getenv("CI_MERGE_REQUEST_TARGET_BRANCH_SHA") - tags[constants.GitPrBaseBranch] = os.Getenv("CI_MERGE_REQUEST_TARGET_BRANCH_NAME") - tags[constants.PrNumber] = os.Getenv("CI_MERGE_REQUEST_IID") - - return tags -} - -// extractJenkins extracts CI information specific to Jenkins. -func extractJenkins() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "jenkins" - tags[constants.GitRepositoryURL] = firstEnv("GIT_URL", "GIT_URL_1") - tags[constants.GitCommitSHA] = os.Getenv("GIT_COMMIT") - - branchOrTag := os.Getenv("GIT_BRANCH") - empty := []byte("") - name, hasName := os.LookupEnv("JOB_NAME") - - if strings.Contains(branchOrTag, "tags/") { - tags[constants.GitTag] = branchOrTag - } else { - tags[constants.GitBranch] = branchOrTag - // remove branch for job name - removeBranch := regexp.MustCompile(fmt.Sprintf("/%s", normalizeRef(branchOrTag))) - name = string(removeBranch.ReplaceAll([]byte(name), empty)) - } - - if hasName { - removeVars := regexp.MustCompile("/[^/]+=[^/]*") - name = string(removeVars.ReplaceAll([]byte(name), empty)) - } - - tags[constants.CIWorkspacePath] = os.Getenv("WORKSPACE") - tags[constants.CIPipelineID] = os.Getenv("BUILD_TAG") - tags[constants.CIPipelineNumber] = os.Getenv("BUILD_NUMBER") - tags[constants.CIPipelineName] = name - tags[constants.CIPipelineURL] = os.Getenv("BUILD_URL") - tags[constants.CINodeName] = os.Getenv("NODE_NAME") - tags[constants.PrNumber] = os.Getenv("CHANGE_ID") - tags[constants.GitPrBaseBranch] = os.Getenv("CHANGE_TARGET") - - jsonString, err := getEnvVarsJSON("DD_CUSTOM_TRACE_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - nodeLabels := os.Getenv("NODE_LABELS") - if len(nodeLabels) > 0 { - labelsArray := strings.Split(nodeLabels, " ") - jsonString, err := json.Marshal(labelsArray) - if err == nil { - tags[constants.CINodeLabels] = string(jsonString) - } - } - - return tags -} - -// extractTeamcity extracts CI information specific to TeamCity. -func extractTeamcity() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "teamcity" - tags[constants.CIJobURL] = os.Getenv("BUILD_URL") - tags[constants.CIJobName] = os.Getenv("TEAMCITY_BUILDCONF_NAME") - - tags[constants.PrNumber] = os.Getenv("TEAMCITY_PULLREQUEST_NUMBER") - tags[constants.GitPrBaseBranch] = os.Getenv("TEAMCITY_PULLREQUEST_TARGET_BRANCH") - return tags -} - -// extractCodefresh extracts CI information specific to Codefresh. -func extractCodefresh() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "codefresh" - tags[constants.CIPipelineID] = os.Getenv("CF_BUILD_ID") - tags[constants.CIPipelineName] = os.Getenv("CF_PIPELINE_NAME") - tags[constants.CIPipelineURL] = os.Getenv("CF_BUILD_URL") - tags[constants.CIJobName] = os.Getenv("CF_STEP_NAME") - - jsonString, err := getEnvVarsJSON("CF_BUILD_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - cfBranch := os.Getenv("CF_BRANCH") - isTag := strings.Contains(cfBranch, "tags/") - var refKey string - if isTag { - refKey = constants.GitTag - } else { - refKey = constants.GitBranch - } - tags[refKey] = normalizeRef(cfBranch) - - tags[constants.GitPrBaseBranch] = os.Getenv("CF_PULL_REQUEST_TARGET") - tags[constants.PrNumber] = os.Getenv("CF_PULL_REQUEST_NUMBER") - - return tags -} - -// extractTravis extracts CI information specific to Travis CI. -func extractTravis() map[string]string { - tags := map[string]string{} - prSlug := os.Getenv("TRAVIS_PULL_REQUEST_SLUG") - repoSlug := prSlug - if strings.TrimSpace(repoSlug) == "" { - repoSlug = os.Getenv("TRAVIS_REPO_SLUG") - } - tags[constants.CIProviderName] = "travisci" - tags[constants.GitRepositoryURL] = fmt.Sprintf("https://github.com/%s.git", repoSlug) - tags[constants.GitCommitSHA] = os.Getenv("TRAVIS_COMMIT") - tags[constants.GitTag] = os.Getenv("TRAVIS_TAG") - tags[constants.GitBranch] = firstEnv("TRAVIS_PULL_REQUEST_BRANCH", "TRAVIS_BRANCH") - tags[constants.CIWorkspacePath] = os.Getenv("TRAVIS_BUILD_DIR") - tags[constants.CIPipelineID] = os.Getenv("TRAVIS_BUILD_ID") - tags[constants.CIPipelineNumber] = os.Getenv("TRAVIS_BUILD_NUMBER") - tags[constants.CIPipelineName] = repoSlug - tags[constants.CIPipelineURL] = os.Getenv("TRAVIS_BUILD_WEB_URL") - tags[constants.CIJobURL] = os.Getenv("TRAVIS_JOB_WEB_URL") - tags[constants.GitCommitMessage] = os.Getenv("TRAVIS_COMMIT_MESSAGE") - - tags[constants.GitPrBaseBranch] = os.Getenv("TRAVIS_BRANCH") - tags[constants.GitHeadCommit] = os.Getenv("TRAVIS_PULL_REQUEST_SHA") - tags[constants.PrNumber] = os.Getenv("TRAVIS_PULL_REQUEST") - - return tags -} - -// extractAwsCodePipeline extracts CI information specific to AWS CodePipeline. -func extractAwsCodePipeline() map[string]string { - tags := map[string]string{} - - if !strings.HasPrefix(os.Getenv("CODEBUILD_INITIATOR"), "codepipeline") { - // CODEBUILD_INITIATOR is defined but this is not a codepipeline build - return tags - } - - tags[constants.CIProviderName] = "awscodepipeline" - tags[constants.CIPipelineID] = os.Getenv("DD_PIPELINE_EXECUTION_ID") - tags[constants.CIJobID] = os.Getenv("DD_ACTION_EXECUTION_ID") - - jsonString, err := getEnvVarsJSON("CODEBUILD_BUILD_ARN", "DD_ACTION_EXECUTION_ID", "DD_PIPELINE_EXECUTION_ID") - if err == nil { - tags[constants.CIEnvVars] = string(jsonString) - } - - return tags -} - -// extractDrone extracts CI information specific to Drone CI. -func extractDrone() map[string]string { - tags := map[string]string{} - tags[constants.CIProviderName] = "drone" - tags[constants.GitBranch] = os.Getenv("DRONE_BRANCH") - tags[constants.GitCommitSHA] = os.Getenv("DRONE_COMMIT_SHA") - tags[constants.GitRepositoryURL] = os.Getenv("DRONE_GIT_HTTP_URL") - tags[constants.GitTag] = os.Getenv("DRONE_TAG") - tags[constants.CIPipelineNumber] = os.Getenv("DRONE_BUILD_NUMBER") - tags[constants.CIPipelineURL] = os.Getenv("DRONE_BUILD_LINK") - tags[constants.GitCommitMessage] = os.Getenv("DRONE_COMMIT_MESSAGE") - tags[constants.GitCommitAuthorName] = os.Getenv("DRONE_COMMIT_AUTHOR_NAME") - tags[constants.GitCommitAuthorEmail] = os.Getenv("DRONE_COMMIT_AUTHOR_EMAIL") - tags[constants.CIWorkspacePath] = os.Getenv("DRONE_WORKSPACE") - tags[constants.CIJobName] = os.Getenv("DRONE_STEP_NAME") - tags[constants.CIStageName] = os.Getenv("DRONE_STAGE_NAME") - tags[constants.PrNumber] = os.Getenv("DRONE_PULL_REQUEST") - tags[constants.GitPrBaseBranch] = os.Getenv("DRONE_TARGET_BRANCH") - - return tags -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/codeowners.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/codeowners.go deleted file mode 100644 index 9d606b14db..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/codeowners.go +++ /dev/null @@ -1,325 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "bufio" - "errors" - "fmt" - "os" - "path/filepath" - "strings" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - - logger "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// This is a port of https://github.com/DataDog/dd-trace-dotnet/blob/v2.53.0/tracer/src/Datadog.Trace/Ci/CodeOwners.cs - -type ( - // CodeOwners represents a structured data type that holds sections of code owners. - // Each section maps to a slice of entries, where each entry includes a pattern and a list of owners. - CodeOwners struct { - Sections []*Section - } - - // Section represents a block of structured data of multiple entries in a single section - Section struct { - Name string - Entries []Entry - } - - // Entry represents a single entry in a CODEOWNERS file. - // It includes the pattern for matching files, the list of owners, and the section to which it belongs. - Entry struct { - Pattern string - Owners []string - Section string - } -) - -var ( - // codeowners holds the parsed CODEOWNERS file data. - codeowners *CodeOwners - codeownersMutex sync.Mutex -) - -// GetCodeOwners retrieves and caches the CODEOWNERS data. -// It looks for the CODEOWNERS file in various standard locations within the CI workspace. -// This function is thread-safe due to the use of a mutex. -// -// Returns: -// -// A pointer to a CodeOwners struct containing the parsed CODEOWNERS data, or nil if not found. -func GetCodeOwners() *CodeOwners { - codeownersMutex.Lock() - defer codeownersMutex.Unlock() - - if codeowners != nil { - return codeowners - } - - tags := GetCITags() - if v, ok := tags[constants.CIWorkspacePath]; ok { - paths := []string{ - filepath.Join(v, "CODEOWNERS"), - filepath.Join(v, ".github", "CODEOWNERS"), - filepath.Join(v, ".gitlab", "CODEOWNERS"), - filepath.Join(v, ".docs", "CODEOWNERS"), - } - for _, path := range paths { - if cow, err := parseCodeOwners(path); err == nil { - codeowners = cow - return codeowners - } - } - } - - // If the codeowners file is not found, let's try a last resort by looking in the current directory (for standalone test binaries) - for _, path := range []string{"CODEOWNERS", filepath.Join(filepath.Dir(os.Args[0]), "CODEOWNERS")} { - if cow, err := parseCodeOwners(path); err == nil { - codeowners = cow - return codeowners - } - } - - return nil -} - -// parseCodeOwners reads and parses the CODEOWNERS file located at the given filePath. -func parseCodeOwners(filePath string) (*CodeOwners, error) { - if _, err := os.Stat(filePath); err != nil { - return nil, err - } - cow, err := NewCodeOwners(filePath) - if err == nil { - if logger.DebugEnabled() { - logger.Debug("civisibility: codeowner file '%s' was loaded successfully.", filePath) - } - return cow, nil - } - logger.Debug("Error parsing codeowners: %s", err.Error()) - return nil, err -} - -// NewCodeOwners creates a new instance of CodeOwners by parsing a CODEOWNERS file located at the given filePath. -// It returns an error if the file cannot be read or parsed properly. -func NewCodeOwners(filePath string) (*CodeOwners, error) { - if filePath == "" { - return nil, fmt.Errorf("filePath cannot be empty") - } - - file, err := os.Open(filePath) - if err != nil { - return nil, err - } - defer func() { - err = file.Close() - if err != nil && !errors.Is(os.ErrClosed, err) { - logger.Warn("Error closing codeowners file: %s", err.Error()) - } - }() - - var entriesList []Entry - var sectionsList []string - var currentSectionName string - - scanner := bufio.NewScanner(file) - for scanner.Scan() { - line := scanner.Text() - if len(line) == 0 || line[0] == '#' { - continue - } - - // Identify section headers, which are lines enclosed in square brackets - if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") { - currentSectionName = line[1 : len(line)-1] - foundSectionName := findSectionIgnoreCase(sectionsList, currentSectionName) - if foundSectionName == "" { - sectionsList = append(sectionsList, currentSectionName) - } else { - currentSectionName = foundSectionName - } - continue - } - - finalLine := line - var ownersList []string - terms := strings.Fields(line) - for _, term := range terms { - if len(term) == 0 { - continue - } - - // Identify owners by their prefixes (either @ for usernames or containing @ for emails) - if term[0] == '@' || strings.Contains(term, "@") { - ownersList = append(ownersList, term) - pos := strings.Index(finalLine, term) - if pos > 0 { - finalLine = finalLine[:pos] + finalLine[pos+len(term):] - } - } - } - - finalLine = strings.TrimSpace(finalLine) - if len(finalLine) == 0 { - continue - } - - entriesList = append(entriesList, Entry{Pattern: finalLine, Owners: ownersList, Section: currentSectionName}) - } - - if err := scanner.Err(); err != nil { - return nil, err - } - - // Reverse the entries list to maintain the order of appearance in the file - for i, j := 0, len(entriesList)-1; i < j; i, j = i+1, j-1 { - entriesList[i], entriesList[j] = entriesList[j], entriesList[i] - } - - codeOwners := &CodeOwners{} - for _, entry := range entriesList { - var section *Section - for _, val := range codeOwners.Sections { - if val.Name == entry.Section { - section = val - break - } - } - - if section == nil { - section = &Section{Name: entry.Section, Entries: []Entry{}} - codeOwners.Sections = append(codeOwners.Sections, section) - } - - section.Entries = append(section.Entries, entry) - } - - return codeOwners, nil -} - -// findSectionIgnoreCase searches for a section name in a case-insensitive manner. -// It returns the section name if found, otherwise returns an empty string. -func findSectionIgnoreCase(sections []string, section string) string { - sectionLower := strings.ToLower(section) - for _, s := range sections { - if strings.ToLower(s) == sectionLower { - return s - } - } - return "" -} - -// GetSection gets the first Section entry in the CodeOwners that matches the section name. -// It returns a pointer to the matched entry, or nil if no match is found -func (co *CodeOwners) GetSection(section string) *Section { - for _, value := range co.Sections { - if value.Name == section { - return value - } - } - - return nil -} - -// Match finds the first entry in the CodeOwners that matches the given value. -// It returns a pointer to the matched entry, or nil if no match is found. -func (co *CodeOwners) Match(value string) (*Entry, bool) { - var matchedEntries []Entry - - for _, section := range co.Sections { - for _, entry := range section.Entries { - pattern := entry.Pattern - finalPattern := pattern - - var includeAnythingBefore, includeAnythingAfter bool - - if strings.HasPrefix(pattern, "/") { - includeAnythingBefore = false - } else { - if strings.HasPrefix(finalPattern, "*") { - finalPattern = finalPattern[1:] - } - includeAnythingBefore = true - } - - if strings.HasSuffix(pattern, "/") { - includeAnythingAfter = true - } else if strings.HasSuffix(pattern, "/*") { - includeAnythingAfter = true - finalPattern = finalPattern[:len(finalPattern)-1] - } else { - includeAnythingAfter = false - } - - if includeAnythingAfter { - found := includeAnythingBefore && strings.Contains(value, finalPattern) || strings.HasPrefix(value, finalPattern) - if !found { - continue - } - - if !strings.HasSuffix(pattern, "/*") { - matchedEntries = append(matchedEntries, entry) - break - } - - patternEnd := strings.Index(value, finalPattern) - if patternEnd != -1 { - patternEnd += len(finalPattern) - remainingString := value[patternEnd:] - if strings.Index(remainingString, "/") == -1 { - matchedEntries = append(matchedEntries, entry) - break - } - } - } else { - if includeAnythingBefore { - if strings.HasSuffix(value, finalPattern) { - matchedEntries = append(matchedEntries, entry) - break - } - } else if value == finalPattern { - matchedEntries = append(matchedEntries, entry) - break - } - } - } - } - - switch len(matchedEntries) { - case 0: - return nil, false - case 1: - return &matchedEntries[0], true - default: - patterns := make([]string, 0) - owners := make([]string, 0) - sections := make([]string, 0) - for _, entry := range matchedEntries { - patterns = append(patterns, entry.Pattern) - owners = append(owners, entry.Owners...) - sections = append(sections, entry.Section) - } - return &Entry{ - Pattern: strings.Join(patterns, " | "), - Owners: owners, - Section: strings.Join(sections, " | "), - }, true - } -} - -// GetOwnersString returns a formatted string of the owners list in an Entry. -// It returns an empty string if there are no owners. -func (e *Entry) GetOwnersString() string { - if e.Owners == nil || len(e.Owners) == 0 { - return "" - } - - return "[\"" + strings.Join(e.Owners, "\",\"") + "\"]" -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/environmentTags.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/environmentTags.go deleted file mode 100644 index bf850a2f53..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/environmentTags.go +++ /dev/null @@ -1,345 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "fmt" - "maps" - "os" - "path/filepath" - "regexp" - "runtime" - "strings" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/osinfo" -) - -var ( - // ciTags holds the CI/CD environment variable information. - currentCiTags map[string]string // currentCiTags holds the CI/CD tags after originalCiTags + addedTags - originalCiTags map[string]string // originalCiTags holds the original CI/CD tags after all the CMDs - addedTags map[string]string // addedTags holds the tags added by the user - ciTagsMutex sync.Mutex - - // ciMetrics holds the CI/CD environment numeric variable information - currentCiMetrics map[string]float64 // currentCiMetrics holds the CI/CD metrics after originalCiMetrics + addedMetrics - originalCiMetrics map[string]float64 // originalCiMetrics holds the original CI/CD metrics after all the CMDs - addedMetrics map[string]float64 // addedMetrics holds the metrics added by the user - ciMetricsMutex sync.Mutex -) - -// GetCITags retrieves and caches the CI/CD tags from environment variables. -// It initializes the ciTags map if it is not already initialized. -// This function is thread-safe due to the use of a mutex. -// -// Returns: -// -// A map[string]string containing the CI/CD tags. -func GetCITags() map[string]string { - ciTagsMutex.Lock() - defer ciTagsMutex.Unlock() - - // Return the current tags if they are already initialized - if currentCiTags != nil { - return currentCiTags - } - - if originalCiTags == nil { - // If the original tags are not initialized, create them - originalCiTags = createCITagsMap() - } - - // Create a new map with the added tags - newTags := maps.Clone(originalCiTags) - for k, v := range addedTags { - newTags[k] = v - } - - // Update the current tags - currentCiTags = newTags - return currentCiTags -} - -// AddCITags adds a new tag to the CI/CD tags map. -func AddCITags(tagName, tagValue string) { - ciTagsMutex.Lock() - defer ciTagsMutex.Unlock() - - // Add the tag to the added tags dictionary - if addedTags == nil { - addedTags = make(map[string]string) - } - addedTags[tagName] = tagValue - - // Reset the current tags - currentCiTags = nil -} - -// AddCITagsMap adds a new map of tags to the CI/CD tags map. -func AddCITagsMap(tags map[string]string) { - if tags == nil { - return - } - - ciTagsMutex.Lock() - defer ciTagsMutex.Unlock() - - // Add the tag to the added tags dictionary - if addedTags == nil { - addedTags = make(map[string]string) - } - for k, v := range tags { - addedTags[k] = v - } - - // Reset the current tags - currentCiTags = nil -} - -// ResetCITags resets the CI/CD tags to their original values. -func ResetCITags() { - ciTagsMutex.Lock() - defer ciTagsMutex.Unlock() - - originalCiTags = nil - currentCiTags = nil - addedTags = nil -} - -// GetCIMetrics retrieves and caches the CI/CD metrics from environment variables. -// It initializes the ciMetrics map if it is not already initialized. -// This function is thread-safe due to the use of a mutex. -// -// Returns: -// -// A map[string]float64 containing the CI/CD metrics. -func GetCIMetrics() map[string]float64 { - ciMetricsMutex.Lock() - defer ciMetricsMutex.Unlock() - - // Return the current metrics if they are already initialized - if currentCiMetrics != nil { - return currentCiMetrics - } - - if originalCiMetrics == nil { - // If the original metrics are not initialized, create them - originalCiMetrics = createCIMetricsMap() - } - - // Create a new map with the added metrics - newMetrics := maps.Clone(originalCiMetrics) - for k, v := range addedMetrics { - newMetrics[k] = v - } - - // Update the current metrics - currentCiMetrics = newMetrics - return currentCiMetrics -} - -// AddCIMetrics adds a new metric to the CI/CD metrics map. -func AddCIMetrics(metricName string, metricValue float64) { - ciMetricsMutex.Lock() - defer ciMetricsMutex.Unlock() - - // Add the metric to the added metrics dictionary - if addedMetrics == nil { - addedMetrics = make(map[string]float64) - } - addedMetrics[metricName] = metricValue - - // Reset the current metrics - currentCiMetrics = nil -} - -// AddCIMetricsMap adds a new map of metrics to the CI/CD metrics map. -func AddCIMetricsMap(metrics map[string]float64) { - if metrics == nil { - return - } - - ciMetricsMutex.Lock() - defer ciMetricsMutex.Unlock() - - // Add the metric to the added metrics dictionary - if addedMetrics == nil { - addedMetrics = make(map[string]float64) - } - for k, v := range metrics { - addedMetrics[k] = v - } - - // Reset the current metrics - currentCiMetrics = nil -} - -// ResetCIMetrics resets the CI/CD metrics to their original values. -func ResetCIMetrics() { - ciMetricsMutex.Lock() - defer ciMetricsMutex.Unlock() - - originalCiMetrics = nil - currentCiMetrics = nil - addedMetrics = nil -} - -// GetRelativePathFromCITagsSourceRoot calculates the relative path from the CI workspace root to the specified path. -// If the CI workspace root is not available in the tags, it returns the original path. -// -// Parameters: -// -// path - The absolute or relative file path for which the relative path should be calculated. -// -// Returns: -// -// The relative path from the CI workspace root to the specified path, or the original path if an error occurs. -func GetRelativePathFromCITagsSourceRoot(path string) string { - tags := GetCITags() - if v, ok := tags[constants.CIWorkspacePath]; ok { - relPath, err := filepath.Rel(v, path) - if err == nil { - return filepath.ToSlash(relPath) - } - } - - return path -} - -// createCITagsMap creates a map of CI/CD tags by extracting information from environment variables and the local Git repository. -// It also adds OS and runtime information to the tags. -// -// Returns: -// -// A map[string]string containing the extracted CI/CD tags. -func createCITagsMap() map[string]string { - localTags := getProviderTags() - - // Populate runtime values - localTags[constants.OSPlatform] = runtime.GOOS - localTags[constants.OSVersion] = osinfo.OSVersion() - localTags[constants.OSArchitecture] = runtime.GOARCH - localTags[constants.RuntimeName] = runtime.Compiler - localTags[constants.RuntimeVersion] = runtime.Version() - log.Debug("civisibility: os platform: %s", runtime.GOOS) - log.Debug("civisibility: os architecture: %s", runtime.GOARCH) - log.Debug("civisibility: runtime version: %s", runtime.Version()) - - // Get command line test command - var cmd string - if len(os.Args) == 1 { - cmd = filepath.Base(os.Args[0]) - } else { - cmd = fmt.Sprintf("%s %s ", filepath.Base(os.Args[0]), strings.Join(os.Args[1:], " ")) - } - - // Filter out some parameters to make the command more stable. - cmd = regexp.MustCompile(`(?si)-test.gocoverdir=(.*)\s`).ReplaceAllString(cmd, "") - cmd = regexp.MustCompile(`(?si)-test.v=(.*)\s`).ReplaceAllString(cmd, "") - cmd = regexp.MustCompile(`(?si)-test.testlogfile=(.*)\s`).ReplaceAllString(cmd, "") - cmd = strings.TrimSpace(cmd) - localTags[constants.TestCommand] = cmd - log.Debug("civisibility: test command: %s", cmd) - - // Populate the test session name - if testSessionName, ok := os.LookupEnv(constants.CIVisibilityTestSessionNameEnvironmentVariable); ok { - localTags[constants.TestSessionName] = testSessionName - } else if jobName, ok := localTags[constants.CIJobName]; ok { - localTags[constants.TestSessionName] = fmt.Sprintf("%s-%s", jobName, cmd) - } else { - localTags[constants.TestSessionName] = cmd - } - log.Debug("civisibility: test session name: %s", localTags[constants.TestSessionName]) - - // Check if the user provided the test service - if ddService := os.Getenv("DD_SERVICE"); ddService != "" { - localTags[constants.UserProvidedTestServiceTag] = "true" - } else { - localTags[constants.UserProvidedTestServiceTag] = "false" - } - - // Populate missing git data - gitData, _ := getLocalGitData() - - // Populate Git metadata from the local Git repository if not already present in localTags - if _, ok := localTags[constants.CIWorkspacePath]; !ok { - localTags[constants.CIWorkspacePath] = gitData.SourceRoot - } - if _, ok := localTags[constants.GitRepositoryURL]; !ok { - localTags[constants.GitRepositoryURL] = gitData.RepositoryURL - } - if _, ok := localTags[constants.GitCommitSHA]; !ok { - localTags[constants.GitCommitSHA] = gitData.CommitSha - } - if _, ok := localTags[constants.GitBranch]; !ok { - localTags[constants.GitBranch] = gitData.Branch - } - - // If the commit SHA matches, populate additional Git metadata - if localTags[constants.GitCommitSHA] == gitData.CommitSha { - if _, ok := localTags[constants.GitCommitAuthorDate]; !ok { - localTags[constants.GitCommitAuthorDate] = gitData.AuthorDate.String() - } - if _, ok := localTags[constants.GitCommitAuthorName]; !ok { - localTags[constants.GitCommitAuthorName] = gitData.AuthorName - } - if _, ok := localTags[constants.GitCommitAuthorEmail]; !ok { - localTags[constants.GitCommitAuthorEmail] = gitData.AuthorEmail - } - if _, ok := localTags[constants.GitCommitCommitterDate]; !ok { - localTags[constants.GitCommitCommitterDate] = gitData.CommitterDate.String() - } - if _, ok := localTags[constants.GitCommitCommitterName]; !ok { - localTags[constants.GitCommitCommitterName] = gitData.CommitterName - } - if _, ok := localTags[constants.GitCommitCommitterEmail]; !ok { - localTags[constants.GitCommitCommitterEmail] = gitData.CommitterEmail - } - if _, ok := localTags[constants.GitCommitMessage]; !ok { - localTags[constants.GitCommitMessage] = gitData.CommitMessage - } - } - - // If the head commit SHA is available, populate additional Git head metadata - if headCommitSha, ok := localTags[constants.GitHeadCommit]; ok { - if headCommitData, err := fetchCommitData(headCommitSha); err != nil { - log.Warn("civisibility: failed to fetch head commit data: %s", err.Error()) - } else if headCommitSha == headCommitData.CommitSha { - localTags[constants.GitHeadAuthorDate] = headCommitData.AuthorDate.String() - localTags[constants.GitHeadAuthorName] = headCommitData.AuthorName - localTags[constants.GitHeadAuthorEmail] = headCommitData.AuthorEmail - localTags[constants.GitHeadCommitterDate] = headCommitData.CommitterDate.String() - localTags[constants.GitHeadCommitterName] = headCommitData.CommitterName - localTags[constants.GitHeadCommitterEmail] = headCommitData.CommitterEmail - localTags[constants.GitHeadMessage] = headCommitData.CommitMessage - } else { - log.Warn("civisibility: head commit SHA %s does not match the fetched commit SHA %s", headCommitSha, headCommitData.CommitSha) - } - } - - // Apply environmental data if is available - applyEnvironmentalDataIfRequired(localTags) - - log.Debug("civisibility: workspace directory: %s", localTags[constants.CIWorkspacePath]) - log.Debug("civisibility: common tags created with %d items", len(localTags)) - return localTags -} - -// createCIMetricsMap creates a map of CI/CD tags by extracting information from environment variables and runtime information. -// -// Returns: -// -// A map[string]float64 containing the metrics extracted -func createCIMetricsMap() map[string]float64 { - localMetrics := make(map[string]float64) - localMetrics[constants.LogicalCPUCores] = float64(runtime.NumCPU()) - - log.Debug("civisibility: common metrics created with %d items", len(localMetrics)) - return localMetrics -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/file_environmental_data.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/file_environmental_data.go deleted file mode 100644 index 6c1d975981..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/file_environmental_data.go +++ /dev/null @@ -1,275 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package utils - -import ( - "encoding/json" - "os" - "path/filepath" - "strings" - _ "unsafe" // for go:linkname - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - logger "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type ( - /* - { - "ci.workspace_path": "ci.workspace_path", - "git.repository_url": "git.repository_url", - "git.commit.sha": "git.commit.sha", - "git.branch": "user-supplied-branch", - "git.tag": "user-supplied-tag", - "git.commit.author.date": "usersupplied-authordate", - "git.commit.author.name": "usersupplied-authorname", - "git.commit.author.email": "usersupplied-authoremail", - "git.commit.committer.date": "usersupplied-comitterdate", - "git.commit.committer.name": "usersupplied-comittername", - "git.commit.committer.email": "usersupplied-comitteremail", - "git.commit.message": "usersupplied-message", - "ci.provider.name": "", - "ci.pipeline.id": "", - "ci.pipeline.url": "", - "ci.pipeline.name": "", - "ci.pipeline.number": "", - "ci.stage.name": "", - "ci.job.name": "", - "ci.job.url": "", - "ci.node.name": "", - "ci.node.labels": "", - "_dd.ci.env_vars": "" - } - */ - - // fileEnvironmentalData represents the environmental data for the complete test session. - fileEnvironmentalData struct { - WorkspacePath string `json:"ci.workspace_path,omitempty"` - RepositoryURL string `json:"git.repository_url,omitempty"` - CommitSHA string `json:"git.commit.sha,omitempty"` - Branch string `json:"git.branch,omitempty"` - Tag string `json:"git.tag,omitempty"` - CommitAuthorDate string `json:"git.commit.author.date,omitempty"` - CommitAuthorName string `json:"git.commit.author.name,omitempty"` - CommitAuthorEmail string `json:"git.commit.author.email,omitempty"` - CommitCommitterDate string `json:"git.commit.committer.date,omitempty"` - CommitCommitterName string `json:"git.commit.committer.name,omitempty"` - CommitCommitterEmail string `json:"git.commit.committer.email,omitempty"` - CommitMessage string `json:"git.commit.message,omitempty"` - CIProviderName string `json:"ci.provider.name,omitempty"` - CIPipelineID string `json:"ci.pipeline.id,omitempty"` - CIPipelineURL string `json:"ci.pipeline.url,omitempty"` - CIPipelineName string `json:"ci.pipeline.name,omitempty"` - CIPipelineNumber string `json:"ci.pipeline.number,omitempty"` - CIStageName string `json:"ci.stage.name,omitempty"` - CIJobName string `json:"ci.job.name,omitempty"` - CIJobURL string `json:"ci.job.url,omitempty"` - CINodeName string `json:"ci.node.name,omitempty"` - CINodeLabels string `json:"ci.node.labels,omitempty"` - DDCIEnvVars string `json:"_dd.ci.env_vars,omitempty"` - } -) - -// getEnvironmentalData reads the environmental data from the file. -// -//go:linkname getEnvironmentalData -func getEnvironmentalData() *fileEnvironmentalData { - envDataFileName := getEnvDataFileName() - if _, err := os.Stat(envDataFileName); os.IsNotExist(err) { - logger.Debug("civisibility: reading environmental data from %s not found.", envDataFileName) - return nil - } - file, err := os.Open(envDataFileName) - if err != nil { - logger.Error("civisibility: error reading environmental data from %s: %v", envDataFileName, err.Error()) - return nil - } - defer file.Close() - var envData fileEnvironmentalData - if err := json.NewDecoder(file).Decode(&envData); err != nil { - logger.Error("civisibility: error decoding environmental data from %s: %v", envDataFileName, err.Error()) - return nil - } - logger.Debug("civisibility: loaded environmental data from %s", envDataFileName) - return &envData -} - -// getEnvDataFileName returns the environmental data file name. -// -//go:linkname getEnvDataFileName -func getEnvDataFileName() string { - envDataFileName := strings.TrimSpace(os.Getenv(constants.CIVisibilityEnvironmentDataFilePath)) - if envDataFileName != "" { - return envDataFileName - } - cmd := filepath.Base(os.Args[0]) - cmdWithoutExt := strings.TrimSuffix(cmd, filepath.Ext(cmd)) - folder := filepath.Dir(os.Args[0]) - return filepath.Join(folder, cmdWithoutExt+".env.json") -} - -// applyEnvironmentalDataIfRequired applies the environmental data to the given tags if required. -// -//go:linkname applyEnvironmentalDataIfRequired -func applyEnvironmentalDataIfRequired(tags map[string]string) { - if tags == nil { - return - } - envData := getEnvironmentalData() - if envData == nil { - logger.Debug("civisibility: no environmental data found") - return - } - - logger.Debug("civisibility: applying environmental data") - - if envData.WorkspacePath != "" && tags[constants.CIWorkspacePath] == "" { - tags[constants.CIWorkspacePath] = envData.WorkspacePath - } - - if envData.RepositoryURL != "" && tags[constants.GitRepositoryURL] == "" { - tags[constants.GitRepositoryURL] = envData.RepositoryURL - } - - if envData.CommitSHA != "" && tags[constants.GitCommitSHA] == "" { - tags[constants.GitCommitSHA] = envData.CommitSHA - } - - if envData.Branch != "" && tags[constants.GitBranch] == "" { - tags[constants.GitBranch] = envData.Branch - } - - if envData.Tag != "" && tags[constants.GitTag] == "" { - tags[constants.GitTag] = envData.Tag - } - - if envData.CommitAuthorDate != "" && tags[constants.GitCommitAuthorDate] == "" { - tags[constants.GitCommitAuthorDate] = envData.CommitAuthorDate - } - - if envData.CommitAuthorName != "" && tags[constants.GitCommitAuthorName] == "" { - tags[constants.GitCommitAuthorName] = envData.CommitAuthorName - } - - if envData.CommitAuthorEmail != "" && tags[constants.GitCommitAuthorEmail] == "" { - tags[constants.GitCommitAuthorEmail] = envData.CommitAuthorEmail - } - - if envData.CommitCommitterDate != "" && tags[constants.GitCommitCommitterDate] == "" { - tags[constants.GitCommitCommitterDate] = envData.CommitCommitterDate - } - - if envData.CommitCommitterName != "" && tags[constants.GitCommitCommitterName] == "" { - tags[constants.GitCommitCommitterName] = envData.CommitCommitterName - } - - if envData.CommitCommitterEmail != "" && tags[constants.GitCommitCommitterEmail] == "" { - tags[constants.GitCommitCommitterEmail] = envData.CommitCommitterEmail - } - - if envData.CommitMessage != "" && tags[constants.GitCommitMessage] == "" { - tags[constants.GitCommitMessage] = envData.CommitMessage - } - - if envData.CIProviderName != "" && tags[constants.CIProviderName] == "" { - tags[constants.CIProviderName] = envData.CIProviderName - } - - if envData.CIPipelineID != "" && tags[constants.CIPipelineID] == "" { - tags[constants.CIPipelineID] = envData.CIPipelineID - } - - if envData.CIPipelineURL != "" && tags[constants.CIPipelineURL] == "" { - tags[constants.CIPipelineURL] = envData.CIPipelineURL - } - - if envData.CIPipelineName != "" && tags[constants.CIPipelineName] == "" { - tags[constants.CIPipelineName] = envData.CIPipelineName - } - - if envData.CIPipelineNumber != "" && tags[constants.CIPipelineNumber] == "" { - tags[constants.CIPipelineNumber] = envData.CIPipelineNumber - } - - if envData.CIStageName != "" && tags[constants.CIStageName] == "" { - tags[constants.CIStageName] = envData.CIStageName - } - - if envData.CIJobName != "" && tags[constants.CIJobName] == "" { - tags[constants.CIJobName] = envData.CIJobName - } - - if envData.CIJobURL != "" && tags[constants.CIJobURL] == "" { - tags[constants.CIJobURL] = envData.CIJobURL - } - - if envData.CINodeName != "" && tags[constants.CINodeName] == "" { - tags[constants.CINodeName] = envData.CINodeName - } - - if envData.CINodeLabels != "" && tags[constants.CINodeLabels] == "" { - tags[constants.CINodeLabels] = envData.CINodeLabels - } - - if envData.DDCIEnvVars != "" && tags[constants.CIEnvVars] == "" { - tags[constants.CIEnvVars] = envData.DDCIEnvVars - } -} - -// createEnvironmentalDataFromTags creates a fileEnvironmentalData object from the given tags. -// -//go:linkname createEnvironmentalDataFromTags -func createEnvironmentalDataFromTags(tags map[string]string) *fileEnvironmentalData { - if tags == nil { - return nil - } - - return &fileEnvironmentalData{ - WorkspacePath: tags[constants.CIWorkspacePath], - RepositoryURL: tags[constants.GitRepositoryURL], - CommitSHA: tags[constants.GitCommitSHA], - Branch: tags[constants.GitBranch], - Tag: tags[constants.GitTag], - CommitAuthorDate: tags[constants.GitCommitAuthorDate], - CommitAuthorName: tags[constants.GitCommitAuthorName], - CommitAuthorEmail: tags[constants.GitCommitAuthorEmail], - CommitCommitterDate: tags[constants.GitCommitCommitterDate], - CommitCommitterName: tags[constants.GitCommitCommitterName], - CommitCommitterEmail: tags[constants.GitCommitCommitterEmail], - CommitMessage: tags[constants.GitCommitMessage], - CIProviderName: tags[constants.CIProviderName], - CIPipelineID: tags[constants.CIPipelineID], - CIPipelineURL: tags[constants.CIPipelineURL], - CIPipelineName: tags[constants.CIPipelineName], - CIPipelineNumber: tags[constants.CIPipelineNumber], - CIStageName: tags[constants.CIStageName], - CIJobName: tags[constants.CIJobName], - CIJobURL: tags[constants.CIJobURL], - CINodeName: tags[constants.CINodeName], - CINodeLabels: tags[constants.CINodeLabels], - DDCIEnvVars: tags[constants.CIEnvVars], - } -} - -// writeEnvironmentalDataToFile writes the environmental data to a file. -// -//go:linkname writeEnvironmentalDataToFile -func writeEnvironmentalDataToFile(filePath string, tags map[string]string) error { - envData := createEnvironmentalDataFromTags(tags) - if envData == nil { - return nil - } - - file, err := os.Create(filePath) - if err != nil { - return err - } - defer file.Close() - - encoder := json.NewEncoder(file) - encoder.SetIndent("", " ") - return encoder.Encode(envData) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/git.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/git.go deleted file mode 100644 index cdc860db0b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/git.go +++ /dev/null @@ -1,1010 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "errors" - "fmt" - "os" - "os/exec" - "path/filepath" - "regexp" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// MaxPackFileSizeInMb is the maximum size of a pack file in megabytes. -const MaxPackFileSizeInMb = 3 - -// localCommitData holds information about a single commit in the local Git repository. -type localCommitData struct { - CommitSha string - AuthorDate time.Time - AuthorName string - AuthorEmail string - CommitterDate time.Time - CommitterName string - CommitterEmail string - CommitMessage string -} - -// localGitData holds various pieces of information about the local Git repository, -// including the source root, repository URL, branch, commit SHA, author and committer details, and commit message. -type localGitData struct { - localCommitData - SourceRoot string - RepositoryURL string - Branch string -} - -// gitVersionData holds the major, minor, and patch version numbers of the Git executable. -type gitVersionData struct { - major int - minor int - patch int - err error -} - -var ( - // gitCommandMutex is a mutex used to synchronize access to Git commands to prevent lock errors in git - gitCommandMutex sync.Mutex - - // regexpSensitiveInfo is a regular expression used to match and filter out sensitive information from URLs. - regexpSensitiveInfo = regexp.MustCompile("(https?://|ssh?://)[^/]*@") - - // Constants for base branch detection algorithm - possibleBaseBranches = []string{"main", "master", "preprod", "prod", "dev", "development", "trunk"} - - // BASE_LIKE_BRANCH_FILTER - regex to check if the branch name is similar to a possible base branch - baseLikeBranchFilter = regexp.MustCompile(`^(main|master|preprod|prod|dev|development|trunk|release\/.*|hotfix\/.*)$`) - - // Cached data - - // isGitFoundValue is a boolean flag indicating whether the Git executable is available on the system. - isGitFoundValue bool - - // gitFinder is a sync.Once instance used to ensure that the Git executable is only checked once. - gitFinderOnce sync.Once - - // gitVersion is a sync.Once instance used to ensure that the Git version is only retrieved once. - gitVersionOnce sync.Once - - // gitVersionValue holds the version of the Git executable installed on the system. - gitVersionValue gitVersionData - - // isAShallowCloneRepositoryOnce is a sync.Once instance used to ensure that the check for a shallow clone repository is only performed once. - isAShallowCloneRepositoryOnce atomic.Pointer[sync.Once] - - // isAShallowCloneRepositoryValue is a boolean flag indicating whether the repository is a shallow clone. - isAShallowCloneRepositoryValue bool -) - -// branchMetrics holds metrics for evaluating base branch candidates -type branchMetrics struct { - behind int - ahead int - baseSha string -} - -// isGitFound checks if the Git executable is available on the system. -func isGitFound() bool { - gitFinderOnce.Do(func() { - _, err := exec.LookPath("git") - isGitFoundValue = err == nil - if err != nil { - log.Debug("civisibility.git: git executable not found") - } - }) - return isGitFoundValue -} - -// execGit executes a Git command with the given arguments. -func execGit(commandType telemetry.CommandType, args ...string) (val []byte, err error) { - startTime := time.Now() - if commandType != telemetry.NotSpecifiedCommandsType { - telemetry.GitCommand(commandType) - defer func() { - telemetry.GitCommandMs(commandType, float64(time.Since(startTime).Milliseconds())) - var exitErr *exec.ExitError - if errors.As(err, &exitErr) { - switch exitErr.ExitCode() { - case -1: - telemetry.GitCommandErrors(commandType, telemetry.ECMinus1CommandExitCode) - case 1: - telemetry.GitCommandErrors(commandType, telemetry.EC1CommandExitCode) - case 2: - telemetry.GitCommandErrors(commandType, telemetry.EC2CommandExitCode) - case 127: - telemetry.GitCommandErrors(commandType, telemetry.EC127CommandExitCode) - case 128: - telemetry.GitCommandErrors(commandType, telemetry.EC128CommandExitCode) - case 129: - telemetry.GitCommandErrors(commandType, telemetry.EC129CommandExitCode) - default: - telemetry.GitCommandErrors(commandType, telemetry.UnknownCommandExitCode) - } - } else if err != nil { - telemetry.GitCommandErrors(commandType, telemetry.MissingCommandExitCode) - } - }() - } - if log.DebugEnabled() { - defer func() { - durationInMs := time.Since(startTime).Milliseconds() - if err != nil { - log.Debug("civisibility.git.command [%s][%s][%dms]: git %s", commandType, err.Error(), durationInMs, strings.Join(args, " ")) - } else { - log.Debug("civisibility.git.command [%s][%dms]: git %s", commandType, durationInMs, strings.Join(args, " ")) - } - }() - } - if !isGitFound() { - return nil, errors.New("git executable not found") - } - gitCommandMutex.Lock() - defer gitCommandMutex.Unlock() - return exec.Command("git", args...).CombinedOutput() -} - -// execGitString executes a Git command with the given arguments and returns the output as a string. -func execGitString(commandType telemetry.CommandType, args ...string) (string, error) { - out, err := execGit(commandType, args...) - strOut := strings.TrimSpace(strings.Trim(string(out), "\n")) - return strOut, err -} - -// execGitStringWithInput executes a Git command with the given input and arguments and returns the output as a string. -func execGitStringWithInput(commandType telemetry.CommandType, input string, args ...string) (val string, err error) { - startTime := time.Now() - if commandType != telemetry.NotSpecifiedCommandsType { - telemetry.GitCommand(commandType) - defer func() { - telemetry.GitCommandMs(commandType, float64(time.Since(startTime).Milliseconds())) - var exitErr *exec.ExitError - if errors.As(err, &exitErr) { - switch exitErr.ExitCode() { - case -1: - telemetry.GitCommandErrors(commandType, telemetry.ECMinus1CommandExitCode) - case 1: - telemetry.GitCommandErrors(commandType, telemetry.EC1CommandExitCode) - case 2: - telemetry.GitCommandErrors(commandType, telemetry.EC2CommandExitCode) - case 127: - telemetry.GitCommandErrors(commandType, telemetry.EC127CommandExitCode) - case 128: - telemetry.GitCommandErrors(commandType, telemetry.EC128CommandExitCode) - case 129: - telemetry.GitCommandErrors(commandType, telemetry.EC129CommandExitCode) - default: - telemetry.GitCommandErrors(commandType, telemetry.UnknownCommandExitCode) - } - } else if err != nil { - telemetry.GitCommandErrors(commandType, telemetry.MissingCommandExitCode) - } - }() - } - if log.DebugEnabled() { - defer func() { - durationInMs := time.Since(startTime).Milliseconds() - if err != nil { - log.Debug("civisibility.git.command [%s][%s][%dms]: git %s", commandType, err.Error(), durationInMs, strings.Join(args, " ")) - } else { - log.Debug("civisibility.git.command [%s][%dms]: git %s", commandType, durationInMs, strings.Join(args, " ")) - } - }() - } - gitCommandMutex.Lock() - defer gitCommandMutex.Unlock() - cmd := exec.Command("git", args...) - cmd.Stdin = strings.NewReader(input) - out, err := cmd.CombinedOutput() - strOut := strings.TrimSpace(strings.Trim(string(out), "\n")) - return strOut, err -} - -// getGitVersion retrieves the version of the Git executable installed on the system. -func getGitVersion() (major int, minor int, patch int, err error) { - gitVersionOnce.Do(func() { - out, lerr := execGitString(telemetry.NotSpecifiedCommandsType, "--version") - if lerr != nil { - gitVersionValue = gitVersionData{err: lerr} - return - } - out = strings.TrimSpace(strings.ReplaceAll(out, "git version ", "")) - versionParts := strings.Split(out, ".") - if len(versionParts) < 3 { - gitVersionValue = gitVersionData{err: errors.New("invalid git version")} - return - } - major, _ = strconv.Atoi(versionParts[0]) - minor, _ = strconv.Atoi(versionParts[1]) - patch, _ = strconv.Atoi(versionParts[2]) - gitVersionValue = gitVersionData{ - major: major, - minor: minor, - patch: patch, - err: nil, - } - }) - - return gitVersionValue.major, gitVersionValue.minor, gitVersionValue.patch, gitVersionValue.err -} - -// getLocalGitData retrieves information about the local Git repository from the current HEAD. -// It gathers details such as the repository URL, current branch, latest commit SHA, author and committer details, and commit message. -// -// Returns: -// -// A localGitData struct populated with the retrieved Git data. -// An error if any Git command fails or the retrieved data is incomplete. -func getLocalGitData() (localGitData, error) { - gitData := localGitData{} - - if !isGitFound() { - return gitData, errors.New("git executable not found") - } - - // Ensure we have permissions to read the git directory - if currentDir, err := os.Getwd(); err == nil { - if gitDir, err := getParentGitFolder(currentDir); err == nil && gitDir != "" { - log.Debug("civisibility.git: setting permissions to git folder: %s", gitDir) - if out, err := execGitString(telemetry.GitAddPermissionCommandType, "config", "--global", "--add", "safe.directory", gitDir); err != nil { - log.Debug("civisibility.git: error while setting permissions to git folder: %s\n out: %s\n error: %s", gitDir, out, err.Error()) - } - } else { - log.Debug("civisibility.git: error getting the parent git folder.") - } - } else { - log.Debug("civisibility.git: error getting the current working directory.") - } - - // Extract the absolute path to the Git directory - log.Debug("civisibility.git: getting the absolute path to the Git directory") - out, err := execGitString(telemetry.GetWorkingDirectoryCommandType, "rev-parse", "--show-toplevel") - if err == nil { - gitData.SourceRoot = out - } - - // Extract the repository URL - log.Debug("civisibility.git: getting the repository URL") - out, err = execGitString(telemetry.GetRepositoryCommandsType, "ls-remote", "--get-url") - if err == nil { - gitData.RepositoryURL = filterSensitiveInfo(out) - } - - // Extract the current branch name - log.Debug("civisibility.git: getting the current branch name") - out, err = execGitString(telemetry.GetBranchCommandsType, "rev-parse", "--abbrev-ref", "HEAD") - if err == nil { - gitData.Branch = out - } - - // Get commit details from the latest commit using git log (git log -1 --pretty='%H","%aI","%an","%ae","%cI","%cn","%ce","%B') - log.Debug("civisibility.git: getting the latest commit details") - out, err = execGitString(telemetry.GetGitCommitInfoCommandType, "log", "-1", "--pretty=%H\",\"%at\",\"%an\",\"%ae\",\"%ct\",\"%cn\",\"%ce\",\"%B") - if err != nil { - return gitData, err - } - - // Split the output into individual components - outArray := strings.Split(out, "\",\"") - if len(outArray) < 8 { - return gitData, errors.New("git log failed") - } - - // Parse author and committer dates from Unix timestamp - authorUnixDate, _ := strconv.ParseInt(outArray[1], 10, 64) - committerUnixDate, _ := strconv.ParseInt(outArray[4], 10, 64) - - // Populate the localGitData struct with the parsed information - gitData.CommitSha = outArray[0] - gitData.AuthorDate = time.Unix(authorUnixDate, 0) - gitData.AuthorName = outArray[2] - gitData.AuthorEmail = outArray[3] - gitData.CommitterDate = time.Unix(committerUnixDate, 0) - gitData.CommitterName = outArray[5] - gitData.CommitterEmail = outArray[6] - gitData.CommitMessage = strings.Trim(outArray[7], "\n") - return gitData, nil -} - -// fetchCommitData retrieves commit data for a specific commit SHA in a shallow clone Git repository. -func fetchCommitData(commitSha string) (localCommitData, error) { - commitData := localCommitData{} - - // let's do a first check to see if the repository is a shallow clone - log.Debug("civisibility.fetchCommitData: checking if the repository is a shallow clone") - isAShallowClone, err := isAShallowCloneRepository() - if err != nil { - return commitData, fmt.Errorf("civisibility.fetchCommitData: error checking if the repository is a shallow clone: %s", err.Error()) - } - - // if the git repo is a shallow clone, we try to fecth the commit sha data - if isAShallowClone { - // let's check the git version >= 2.27.0 (git --version) to see if we can unshallow the repository - log.Debug("civisibility.fetchCommitData: checking the git version") - major, minor, patch, err := getGitVersion() - if err != nil { - return commitData, fmt.Errorf("civisibility.fetchCommitData: error getting the git version: %s", err.Error()) - } - log.Debug("civisibility.fetchCommitData: git version: %d.%d.%d", major, minor, patch) - if major < 2 || (major == 2 && minor < 27) { - log.Debug("civisibility.fetchCommitData: the git version is less than 2.27.0 we cannot unshallow the repository") - return commitData, nil - } - - // let's get the remote name - remoteName, err := getRemoteName() - if err != nil { - return commitData, fmt.Errorf("civisibility.fetchCommitData: error getting the remote name: %s\n%s", err.Error(), remoteName) - } - if remoteName == "" { - // if the origin name is empty, we fallback to "origin" - remoteName = "origin" - } - log.Debug("civisibility.fetchCommitData: remote name: %s", remoteName) - - // let's fetch the missing commits and trees from a commit sha - // git fetch --update-shallow --filter="blob:none" --recurse-submodules=no --no-write-fetch-head - log.Debug("civisibility.fetchCommitData: fetching the missing commits and trees from the last month") - if fetchOutput, fetchErr := execGitString( - telemetry.FetchCommandType, - "fetch", - "--update-shallow", - "--filter=blob:none", - "--recurse-submodules=no", - "--no-write-fetch-head", - remoteName, - commitSha); fetchErr != nil { - return commitData, fmt.Errorf("civisibility.fetchCommitData: error: %s\n%s", fetchErr.Error(), fetchOutput) - } - } - - // Get commit details from the latest commit using git log (git show -s --format='%H","%aI","%an","%ae","%cI","%cn","%ce","%B') - log.Debug("civisibility.git: getting the latest commit details") - out, err := execGitString(telemetry.GetGitCommitInfoCommandType, "show", commitSha, "-s", "--format=%H\",\"%at\",\"%an\",\"%ae\",\"%ct\",\"%cn\",\"%ce\",\"%B") - if err != nil { - return commitData, err - } - - // Split the output into individual components - outArray := strings.Split(out, "\",\"") - if len(outArray) < 8 { - return commitData, errors.New("git log failed") - } - - // Parse author and committer dates from Unix timestamp - authorUnixDate, _ := strconv.ParseInt(outArray[1], 10, 64) - committerUnixDate, _ := strconv.ParseInt(outArray[4], 10, 64) - - // Populate the localGitData struct with the parsed information - commitData.CommitSha = outArray[0] - commitData.AuthorDate = time.Unix(authorUnixDate, 0) - commitData.AuthorName = outArray[2] - commitData.AuthorEmail = outArray[3] - commitData.CommitterDate = time.Unix(committerUnixDate, 0) - commitData.CommitterName = outArray[5] - commitData.CommitterEmail = outArray[6] - commitData.CommitMessage = strings.Trim(outArray[7], "\n") - - log.Debug("civisibility.fetchCommitData: was completed successfully") - return commitData, nil -} - -// GetLastLocalGitCommitShas retrieves the commit SHAs of the last 1000 commits in the local Git repository. -func GetLastLocalGitCommitShas() []string { - // git log --format=%H -n 1000 --since=\"1 month ago\" - log.Debug("civisibility.git: getting the commit SHAs of the last 1000 commits in the local Git repository") - out, err := execGitString(telemetry.GetLocalCommitsCommandsType, "log", "--format=%H", "-n", "1000", "--since=\"1 month ago\"") - if err != nil || out == "" { - return []string{} - } - return strings.Split(out, "\n") -} - -// UnshallowGitRepository converts a shallow clone into a complete clone by fetching all missing commits without git content (only commits and tree objects). -func UnshallowGitRepository() (bool, error) { - - // let's do a first check to see if the repository is a shallow clone - log.Debug("civisibility.unshallow: checking if the repository is a shallow clone") - isAShallowClone, err := isAShallowCloneRepository() - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error checking if the repository is a shallow clone: %s", err.Error()) - } - - // if the git repo is not a shallow clone, we can return early - if !isAShallowClone { - log.Debug("civisibility.unshallow: the repository is not a shallow clone") - return false, nil - } - - // the git repo is a shallow clone, we need to double check if there are more than just 1 commit in the logs. - log.Debug("civisibility.unshallow: the repository is a shallow clone, checking if there are more than one commit in the logs") - hasMoreThanOneCommits, err := hasTheGitLogHaveMoreThanOneCommits() - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error checking if the git log has more than one commit: %s", err.Error()) - } - - // if there are more than 1 commits, we can return early - if hasMoreThanOneCommits { - log.Debug("civisibility.unshallow: the git log has more than one commits") - return false, nil - } - - // let's check the git version >= 2.27.0 (git --version) to see if we can unshallow the repository - log.Debug("civisibility.unshallow: checking the git version") - major, minor, patch, err := getGitVersion() - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error getting the git version: %s", err.Error()) - } - log.Debug("civisibility.unshallow: git version: %d.%d.%d", major, minor, patch) - if major < 2 || (major == 2 && minor < 27) { - log.Debug("civisibility.unshallow: the git version is less than 2.27.0 we cannot unshallow the repository") - return false, nil - } - - // after asking for 2 logs lines, if the git log command returns just one commit sha, we reconfigure the repo - // to ask for git commits and trees of the last month (no blobs) - - // let's get the remote name - remoteName, err := getRemoteName() - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error getting the remote name: %s\n%s", err.Error(), remoteName) - } - if remoteName == "" { - // if the origin name is empty, we fallback to "origin" - remoteName = "origin" - } - log.Debug("civisibility.unshallow: remote name: %s", remoteName) - - // let's get the sha of the HEAD (git rev-parse HEAD) - headSha, err := execGitString(telemetry.GetHeadCommandsType, "rev-parse", "HEAD") - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error getting the HEAD sha: %s\n%s", err.Error(), headSha) - } - if headSha == "" { - // if the HEAD is empty, we fallback to the current branch (git branch --show-current) - headSha, err = execGitString(telemetry.GetBranchCommandsType, "branch", "--show-current") - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error getting the current branch: %s\n%s", err.Error(), headSha) - } - } - log.Debug("civisibility.unshallow: HEAD sha: %s", headSha) - - // let's fetch the missing commits and trees from the last month - // git fetch --shallow-since="1 month ago" --update-shallow --filter="blob:none" --recurse-submodules=no $(git config --default origin --get clone.defaultRemoteName) $(git rev-parse HEAD) - log.Debug("civisibility.unshallow: fetching the missing commits and trees from the last month") - fetchOutput, err := execGitString(telemetry.UnshallowCommandsType, "fetch", "--shallow-since=\"1 month ago\"", "--update-shallow", "--filter=blob:none", "--recurse-submodules=no", remoteName, headSha) - - // let's check if the last command was unsuccessful - if err != nil || fetchOutput == "" { - log.Debug("civisibility.unshallow: error fetching the missing commits and trees from the last month: %s", err.Error()) - // *** - // The previous command has a drawback: if the local HEAD is a commit that has not been pushed to the remote, it will fail. - // If this is the case, we fallback to: `git fetch --shallow-since="1 month ago" --update-shallow --filter="blob:none" --recurse-submodules=no $(git config --default origin --get clone.defaultRemoteName) $(git rev-parse --abbrev-ref --symbolic-full-name @{upstream})` - // This command will attempt to use the tracked branch for the current branch in order to unshallow. - // *** - - // let's get the remote branch name: git rev-parse --abbrev-ref --symbolic-full-name @{upstream} - var remoteBranchName string - log.Debug("civisibility.unshallow: getting the remote branch name") - remoteBranchName, err = execGitString(telemetry.UnshallowCommandsType, "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}") - if err == nil { - // let's try the alternative: git fetch --shallow-since="1 month ago" --update-shallow --filter="blob:none" --recurse-submodules=no $(git config --default origin --get clone.defaultRemoteName) $(git rev-parse --abbrev-ref --symbolic-full-name @{upstream}) - log.Debug("civisibility.unshallow: fetching the missing commits and trees from the last month using the remote branch name") - fetchOutput, err = execGitString(telemetry.UnshallowCommandsType, "fetch", "--shallow-since=\"1 month ago\"", "--update-shallow", "--filter=blob:none", "--recurse-submodules=no", remoteName, remoteBranchName) - } - } - - // let's check if the last command was unsuccessful - if err != nil || fetchOutput == "" { - log.Debug("civisibility.unshallow: error fetching the missing commits and trees from the last month: %s", err.Error()) - // *** - // It could be that the CI is working on a detached HEAD or maybe branch tracking hasn't been set up. - // In that case, this command will also fail, and we will finally fallback to we just unshallow all the things: - // `git fetch --shallow-since="1 month ago" --update-shallow --filter="blob:none" --recurse-submodules=no $(git config --default origin --get clone.defaultRemoteName)` - // *** - - // let's try the last fallback: git fetch --shallow-since="1 month ago" --update-shallow --filter="blob:none" --recurse-submodules=no $(git config --default origin --get clone.defaultRemoteName) - log.Debug("civisibility.unshallow: fetching the missing commits and trees from the last month using the origin name") - fetchOutput, err = execGitString(telemetry.UnshallowCommandsType, "fetch", "--shallow-since=\"1 month ago\"", "--update-shallow", "--filter=blob:none", "--recurse-submodules=no", remoteName) - } - - if err != nil { - return false, fmt.Errorf("civisibility.unshallow: error: %s\n%s", err.Error(), fetchOutput) - } - - log.Debug("civisibility.unshallow: was completed successfully") - tmpso := sync.Once{} - isAShallowCloneRepositoryOnce.Store(&tmpso) - return true, nil -} - -// GetGitDiff retrieves the diff between two Git commits using the `git diff` command. -func GetGitDiff(baseCommit, headCommit string) (string, error) { - // git diff -U0 --word-diff=porcelain {baseCommit} {headCommit} - if len(baseCommit) != 40 { - // not a commit sha - var re = regexp.MustCompile(`(?i)^[a-f0-9]{40}$`) - if !re.MatchString(baseCommit) { - // first let's get the remote - remoteOut, err := execGitString(telemetry.GetRemoteCommandsType, "remote", "show") - if err != nil { - log.Debug("civisibility.git: error on git remote show origin: %s , error: %s", remoteOut, err.Error()) - } - if remoteOut == "" { - remoteOut = "origin" - } - - // let's ensure we have all the branch names from the remote - fetchOut, err := execGitString(telemetry.GetHeadCommandsType, "fetch", remoteOut, baseCommit, "--depth=1") - if err != nil { - log.Debug("civisibility.git: error fetching %s/%s: %s, error: %s", remoteOut, baseCommit, fetchOut, err.Error()) - } - - // then let's get the remote branch name - baseCommit = fmt.Sprintf("%s/%s", remoteOut, baseCommit) - } - } - - log.Debug("civisibility.git: getting the diff between %s and %s", baseCommit, headCommit) - out, err := execGitString(telemetry.DiffCommandType, "diff", "-U0", "--word-diff=porcelain", baseCommit, headCommit) - if err != nil { - return "", fmt.Errorf("civisibility.git: error getting the diff from %s to %s: %s | %s", baseCommit, headCommit, err.Error(), out) - } - if out == "" { - return "", fmt.Errorf("civisibility.git: error getting the diff from %s to %s: empty output", baseCommit, headCommit) - } - return out, nil -} - -// filterSensitiveInfo removes sensitive information from a given URL using a regular expression. -// It replaces the user credentials part of the URL (if present) with an empty string. -// -// Parameters: -// -// url - The URL string from which sensitive information should be filtered out. -// -// Returns: -// -// The sanitized URL string with sensitive information removed. -func filterSensitiveInfo(url string) string { - return string(regexpSensitiveInfo.ReplaceAll([]byte(url), []byte("$1"))[:]) -} - -// isAShallowCloneRepository checks if the local Git repository is a shallow clone. -func isAShallowCloneRepository() (bool, error) { - var fErr error - var sOnce *sync.Once - sOnce = isAShallowCloneRepositoryOnce.Load() - if sOnce == nil { - sOnce = &sync.Once{} - isAShallowCloneRepositoryOnce.Store(sOnce) - } - sOnce.Do(func() { - // git rev-parse --is-shallow-repository - out, err := execGitString(telemetry.CheckShallowCommandsType, "rev-parse", "--is-shallow-repository") - if err != nil { - isAShallowCloneRepositoryValue = false - fErr = err - return - } - - isAShallowCloneRepositoryValue = strings.TrimSpace(out) == "true" - }) - - return isAShallowCloneRepositoryValue, fErr -} - -// hasTheGitLogHaveMoreThanOneCommits checks if the local Git repository has more than one commit. -func hasTheGitLogHaveMoreThanOneCommits() (bool, error) { - // git log --format=oneline -n 2 - out, err := execGitString(telemetry.CheckShallowCommandsType, "log", "--format=oneline", "-n", "2") - if err != nil || out == "" { - return false, err - } - - commitsCount := strings.Count(out, "\n") + 1 - return commitsCount > 1, nil -} - -// getObjectsSha get the objects shas from the git repository based on the commits to include and exclude -func getObjectsSha(commitsToInclude []string, commitsToExclude []string) []string { - // git rev-list --objects --no-object-names --filter=blob:none --since="1 month ago" HEAD " + string.Join(" ", commitsToExclude.Select(c => "^" + c)) + " " + string.Join(" ", commitsToInclude); - commitsToExcludeArgs := make([]string, len(commitsToExclude)) - for i, c := range commitsToExclude { - commitsToExcludeArgs[i] = "^" + c - } - args := append([]string{"rev-list", "--objects", "--no-object-names", "--filter=blob:none", "--since=\"1 month ago\"", "HEAD"}, append(commitsToExcludeArgs, commitsToInclude...)...) - out, err := execGitString(telemetry.GetObjectsCommandsType, args...) - if err != nil { - return []string{} - } - return strings.Split(out, "\n") -} - -// CreatePackFiles creates pack files from the given commits to include and exclude. -func CreatePackFiles(commitsToInclude []string, commitsToExclude []string) []string { - // get the objects shas to send - objectsShas := getObjectsSha(commitsToInclude, commitsToExclude) - if len(objectsShas) == 0 { - log.Debug("civisibility: no objects found to send") - return nil - } - - // create the objects shas string - var objectsShasString string - for _, objectSha := range objectsShas { - objectsShasString += objectSha + "\n" - } - - // get a temporary path to store the pack files - temporaryPath, err := os.MkdirTemp("", "pack-objects") - if err != nil { - log.Warn("civisibility: error creating temporary directory: %s", err.Error()) - return nil - } - - // git pack-objects --compression=9 --max-pack-size={MaxPackFileSizeInMb}m "{temporaryPath}" - out, err := execGitStringWithInput(telemetry.PackObjectsCommandsType, objectsShasString, - "pack-objects", "--compression=9", "--max-pack-size="+strconv.Itoa(MaxPackFileSizeInMb)+"m", temporaryPath+"/") - if err != nil { - log.Warn("civisibility: error creating pack files: %s", err.Error()) - return nil - } - - // construct the full path to the pack files - var packFiles []string - for i, packFile := range strings.Split(out, "\n") { - file := filepath.Join(temporaryPath, fmt.Sprintf("-%s.pack", packFile)) - - // check if the pack file exists - if _, err := os.Stat(file); os.IsNotExist(err) { - log.Warn("civisibility: pack file not found: %s", packFiles[i]) - continue - } - - packFiles = append(packFiles, file) - } - - return packFiles -} - -// getParentGitFolder searches from the given directory upwards to find the nearest .git directory. -func getParentGitFolder(innerFolder string) (string, error) { - if innerFolder == "" { - return "", nil - } - - dir := innerFolder - for { - gitDirPath := filepath.Join(dir, ".git") - info, err := os.Stat(gitDirPath) - if err == nil && info.IsDir() { - return gitDirPath, nil - } - if err != nil && !os.IsNotExist(err) { - return "", err - } - - parentDir := filepath.Dir(dir) - // If we've reached the root directory, stop the loop. - if parentDir == dir { - break - } - dir = parentDir - } - - return "", nil -} - -// isDefaultBranch checks if a branch is the default branch -func isDefaultBranch(branch, defaultBranch, remoteName string) bool { - return branch == defaultBranch || branch == remoteName+"/"+defaultBranch -} - -// detectDefaultBranch detects the default branch using git symbolic-ref -func detectDefaultBranch(remoteName string) (string, error) { - // Try to get the default branch using symbolic-ref - defaultRef, err := execGitString(telemetry.SymbolicRefCommandType, "symbolic-ref", "--quiet", "--short", "refs/remotes/"+remoteName+"/HEAD") - if err == nil && defaultRef != "" { - // Remove the remote prefix to get just the branch name - defaultBranch := removeRemotePrefix(defaultRef, remoteName) - if defaultBranch != "" { - log.Debug("civisibility.git: detected default branch from symbolic-ref: %s", defaultBranch) - return defaultBranch, nil - } - } - - log.Debug("civisibility.git: could not get symbolic-ref, trying to find a fallback (main, master)...") - - // Fallback to checking for main/master - fallbackBranch := findFallbackDefaultBranch(remoteName) - if fallbackBranch != "" { - return fallbackBranch, nil - } - - return "", errors.New("could not detect default branch") -} - -// findFallbackDefaultBranch tries to find main or master as fallback default branches -func findFallbackDefaultBranch(remoteName string) string { - fallbackBranches := []string{"main", "master"} - - for _, fallback := range fallbackBranches { - // Check if the remote branch exists - _, err := execGitString(telemetry.ShowRefCommandType, "show-ref", "--verify", "--quiet", "refs/remotes/"+remoteName+"/"+fallback) - if err == nil { - log.Debug("civisibility.git: found fallback default branch: %s", fallback) - return fallback - } - } - - return "" -} - -// GetBaseBranchSha detects the base branch SHA using the algorithm from algorithm.md -func GetBaseBranchSha(defaultBranch string) (string, error) { - if !isGitFound() { - return "", errors.New("git executable not found") - } - - // Step 1 - collect info we'll need later - - // Step 1a - remote_name - remoteName, err := getRemoteName() - if err != nil { - return "", fmt.Errorf("failed to get remote name: %w", err) - } - - // Step 1b - source_branch - sourceBranch, err := getSourceBranch() - if err != nil { - return "", fmt.Errorf("failed to get source branch: %w", err) - } - - // Step 1c - Detect default branch automatically - detectedDefaultBranch, err := detectDefaultBranch(remoteName) - if err != nil { - // Fallback to the provided parameter if detection fails - if defaultBranch == "" { - defaultBranch = "main" // ultimate fallback - } - log.Debug("civisibility.git: failed to detect default branch, using fallback: %s", defaultBranch) - detectedDefaultBranch = defaultBranch - } - - // Step 2 - build candidate branches list and fetch them from remote - var candidateBranches []string - - // Check if we have git.pull_request.base_branch from CI provider environment variables - ciTags := GetCITags() - gitPrBaseBranch := ciTags[constants.GitPrBaseBranch] - - if gitPrBaseBranch != "" { - // Step 2b - we have git.pull_request.base_branch - log.Debug("civisibility.git: using git.pull_request.base_branch from CI: %s", gitPrBaseBranch) - checkAndFetchBranch(gitPrBaseBranch, remoteName) - candidateBranches = []string{gitPrBaseBranch} - } else { - // Step 2a - we don't have git.pull_request.base_branch - // Fetch all possible base branches from remote - for _, branch := range possibleBaseBranches { - checkAndFetchBranch(branch, remoteName) - } - - // Get the list of remote branches present in local repo and see which ones are base-like - remoteBranches, err := getRemoteBranches(remoteName) - if err != nil { - return "", fmt.Errorf("failed to get remote branches: %w", err) - } - - for _, branch := range remoteBranches { - if branch != sourceBranch && isMainLikeBranch(branch, remoteName) { - candidateBranches = append(candidateBranches, branch) - } - } - } - - if len(candidateBranches) == 0 { - return "", errors.New("no candidate base branches found") - } - - // Step 3 - find the best base branch - if len(candidateBranches) == 1 { - // Step 3a - single candidate - baseSha, err := execGitString(telemetry.MergeBaseCommandType, "merge-base", candidateBranches[0], sourceBranch) - if err != nil { - return "", fmt.Errorf("failed to find merge base for %s and %s: %w", candidateBranches[0], sourceBranch, err) - } - return baseSha, nil - } - - // Step 3b - multiple candidates - metrics, err := computeBranchMetrics(candidateBranches, sourceBranch) - if err != nil { - return "", fmt.Errorf("failed to compute branch metrics: %w", err) - } - - baseSha := findBestBranch(metrics, detectedDefaultBranch, remoteName) - if baseSha == "" { - return "", errors.New("failed to find best base branch") - } - - return baseSha, nil -} - -// getRemoteName determines the remote name using the algorithm from algorithm.md -func getRemoteName() (string, error) { - // Try to find remote from upstream tracking - upstream, err := execGitString(telemetry.GetRemoteUpstreamTrackingCommandsType, "rev-parse", "--abbrev-ref", "--symbolic-full-name", "@{upstream}") - if err == nil && upstream != "" { - parts := strings.Split(upstream, "/") - if len(parts) > 0 { - return parts[0], nil - } - } - - // Fallback to first remote if no upstream - remotes, err := execGitString(telemetry.GetRemoteCommandsType, "remote") - if err != nil { - return "origin", nil // ultimate fallback - } - - lines := strings.Split(strings.TrimSpace(remotes), "\n") - if len(lines) > 0 && lines[0] != "" { - return lines[0], nil - } - - return "origin", nil -} - -// getSourceBranch gets the current branch name -func getSourceBranch() (string, error) { - return execGitString(telemetry.GetBranchCommandsType, "rev-parse", "--abbrev-ref", "HEAD") -} - -// isMainLikeBranch checks if a branch name matches the base-like branch pattern -func isMainLikeBranch(branchName, remoteName string) bool { - shortBranchName := removeRemotePrefix(branchName, remoteName) - return baseLikeBranchFilter.MatchString(shortBranchName) -} - -// removeRemotePrefix removes the remote prefix from a branch name -func removeRemotePrefix(branchName, remoteName string) string { - prefix := remoteName + "/" - if strings.HasPrefix(branchName, prefix) { - return strings.TrimPrefix(branchName, prefix) - } - return branchName -} - -// checkAndFetchBranch checks if a branch exists and fetches it if needed -func checkAndFetchBranch(branch, remoteName string) { - // Check if branch exists locally (as remote ref) - _, err := execGitString(telemetry.ShowRefCommandType, "show-ref", "--verify", "--quiet", "refs/remotes/"+remoteName+"/"+branch) - if err == nil { - return // branch exists locally - } - - // Check if branch exists in remote - remoteHeads, err := execGitString(telemetry.LsRemoteHeadsCommandType, "ls-remote", "--heads", remoteName, branch) - if err != nil || remoteHeads == "" { - return // branch doesn't exist in remote - } - - // Fetch the latest commit for this branch from remote (without creating local branch) - _, err = execGitString(telemetry.FetchCommandType, "fetch", "--depth", "1", remoteName, branch) - if err != nil { - log.Debug("civisibility.git: failed to fetch branch %s: %v", branch, err.Error()) - } -} - -// getRemoteBranches gets list of remote tracking branches only (for Step 2a in algorithm) -func getRemoteBranches(remoteName string) ([]string, error) { - // Get remote tracking branches as per algorithm update - remoteOut, err := execGitString(telemetry.ForEachRefCommandType, "for-each-ref", "--format=%(refname:short)", "refs/remotes/"+remoteName) - if err != nil { - return nil, fmt.Errorf("failed to get remote branches: %w", err) - } - - var branches []string - if remoteOut != "" { - remoteBranches := strings.Split(strings.TrimSpace(remoteOut), "\n") - for _, branch := range remoteBranches { - if strings.TrimSpace(branch) != "" { - branches = append(branches, strings.TrimSpace(branch)) - } - } - } - - return branches, nil -} - -// computeBranchMetrics calculates metrics for candidate branches -func computeBranchMetrics(candidates []string, sourceBranch string) (map[string]branchMetrics, error) { - metrics := make(map[string]branchMetrics) - - for _, candidate := range candidates { - // Find common ancestor - baseSha, err := execGitString(telemetry.MergeBaseCommandType, "merge-base", candidate, sourceBranch) - if err != nil || baseSha == "" { - continue - } - - // Count commits ahead/behind - counts, err := execGitString(telemetry.RevListCommandType, "rev-list", "--left-right", "--count", candidate+"..."+sourceBranch) - if err != nil { - continue - } - - parts := strings.Fields(counts) - if len(parts) != 2 { - continue - } - - behind, err1 := strconv.Atoi(parts[0]) - ahead, err2 := strconv.Atoi(parts[1]) - if err1 != nil || err2 != nil { - continue - } - - metrics[candidate] = branchMetrics{ - behind: behind, - ahead: ahead, - baseSha: baseSha, - } - } - - return metrics, nil -} - -// findBestBranch finds the best branch from metrics, preferring default branch on tie -func findBestBranch(metrics map[string]branchMetrics, defaultBranch, remoteName string) string { - if len(metrics) == 0 { - return "" - } - - var bestBranch string - bestScore := []int{int(^uint(0) >> 1), 1, 1} // [ahead, is_not_default, is_remote_prefixed] - max int, not default, remote prefixed - - for branch, data := range metrics { - isDefault := 0 - if isDefaultBranch(branch, defaultBranch, remoteName) { - isDefault = 0 - } else { - isDefault = 1 - } - - // Check if this branch is remote-prefixed (prefer exact branch names) - isRemotePrefixed := 0 - if strings.HasPrefix(branch, remoteName+"/") { - isRemotePrefixed = 1 - } - - score := []int{data.ahead, isDefault, isRemotePrefixed} - - // Compare scores: prefer smaller ahead count, then prefer default branch, then prefer exact branch names - if score[0] < bestScore[0] || - (score[0] == bestScore[0] && score[1] < bestScore[1]) || - (score[0] == bestScore[0] && score[1] == bestScore[1] && score[2] < bestScore[2]) { - bestScore = score - bestBranch = branch - } - } - - if bestBranch != "" { - return metrics[bestBranch].baseSha - } - return "" -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/home.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/home.go deleted file mode 100644 index 2e600237f7..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/home.go +++ /dev/null @@ -1,126 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "bytes" - "os" - "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// This code is based on: https://github.com/mitchellh/go-homedir/blob/v1.1.0/homedir.go (MIT License) - -// ExpandPath expands a file path that starts with '~' to the user's home directory. -// If the path does not start with '~', it is returned unchanged. -// -// Parameters: -// -// path - The file path to be expanded. -// -// Returns: -// -// The expanded file path, with '~' replaced by the user's home directory, if applicable. -func ExpandPath(path string) string { - if len(path) == 0 || path[0] != '~' { - return path - } - - // If the second character is not '/' or '\', return the path unchanged - if len(path) > 1 && path[1] != '/' && path[1] != '\\' { - return path - } - - homeFolder := getHomeDir() - if len(homeFolder) > 0 { - return filepath.Join(homeFolder, path[1:]) - } - - return path -} - -// getHomeDir returns the home directory of the current user. -// The method used to determine the home directory depends on the operating system. -// -// On Windows, it prefers the HOME environment variable, then USERPROFILE, and finally combines HOMEDRIVE and HOMEPATH. -// On Unix-like systems, it prefers the HOME environment variable, and falls back to various shell commands -// to determine the home directory if necessary. -// -// Returns: -// -// The home directory of the current user. -func getHomeDir() (homeDir string) { - defer func() { - log.Debug("civisibility: home directory: %s", homeDir) - }() - - if runtime.GOOS == "windows" { - if home := os.Getenv("HOME"); home != "" { - // First prefer the HOME environment variable - return home - } - if userProfile := os.Getenv("USERPROFILE"); userProfile != "" { - // Prefer the USERPROFILE environment variable - return userProfile - } - - homeDrive := os.Getenv("HOMEDRIVE") - homePath := os.Getenv("HOMEPATH") - return homeDrive + homePath - } - - homeEnv := "HOME" - if runtime.GOOS == "plan9" { - // On plan9, environment variables are lowercase. - homeEnv = "home" - } - - if home := os.Getenv(homeEnv); home != "" { - // Prefer the HOME environment variable - return home - } - - var stdout bytes.Buffer - if runtime.GOOS == "darwin" { - // On macOS, use dscl to read the NFSHomeDirectory - cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`) - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - result := strings.TrimSpace(stdout.String()) - if result != "" { - return result - } - } - } else { - // On other Unix-like systems, use getent to read the passwd entry for the current user - cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - if passwd := strings.TrimSpace(stdout.String()); passwd != "" { - // The passwd entry is in the format: username:password:uid:gid:gecos:home:shell - passwdParts := strings.SplitN(passwd, ":", 7) - if len(passwdParts) > 5 { - return passwdParts[5] - } - } - } - } - - // If all else fails, use the shell to determine the home directory - stdout.Reset() - cmd := exec.Command("sh", "-c", "cd && pwd") - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - return strings.TrimSpace(stdout.String()) - } - - return "" -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/names.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/names.go deleted file mode 100644 index 94eacdb189..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/names.go +++ /dev/null @@ -1,93 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package utils - -import ( - "bytes" - "fmt" - "path/filepath" - "runtime" - "slices" - "strings" -) - -var ( - // ignoredFunctionsFromStackTrace array with functions we want to ignore on the final stacktrace (because doesn't add anything useful) - ignoredFunctionsFromStackTrace = []string{"runtime.gopanic", "runtime.panicmem", "runtime.sigpanic"} -) - -// GetModuleAndSuiteName extracts the module name and suite name from a given program counter (pc). -// This function utilizes runtime.FuncForPC to retrieve the full function name associated with the -// program counter, then splits the string to separate the package name from the function name. -// -// Example 1: -// -// Input: github.com/DataDog/dd-sdk-go-testing.TestRun -// Output: -// module: github.com/DataDog/dd-sdk-go-testing -// suite: testing_test.go -// -// Example 2: -// -// Input: github.com/DataDog/dd-sdk-go-testing.TestRun.func1 -// Output: -// module: github.com/DataDog/dd-sdk-go-testing -// suite: testing_test.go -// -// Parameters: -// -// pc - The program counter for which the module and suite name should be retrieved. -// -// Returns: -// -// module - The module name extracted from the full function name. -// suite - The base name of the file where the function is located. -func GetModuleAndSuiteName(pc uintptr) (module string, suite string) { - funcValue := runtime.FuncForPC(pc) - funcFullName := funcValue.Name() - lastSlash := strings.LastIndexByte(funcFullName, '/') - if lastSlash < 0 { - lastSlash = 0 - } - firstDot := strings.IndexByte(funcFullName[lastSlash:], '.') + lastSlash - file, _ := funcValue.FileLine(funcValue.Entry()) - return funcFullName[:firstDot], filepath.Base(file) -} - -// GetStacktrace retrieves the current stack trace, skipping a specified number of frames. -// -// This function captures the stack trace of the current goroutine, formats it, and returns it as a string. -// It uses runtime.Callers to capture the program counters of the stack frames and runtime.CallersFrames -// to convert these program counters into readable frames. The stack trace is formatted to include the function -// name, file name, and line number of each frame. -// -// Parameters: -// -// skip - The number of stack frames to skip before capturing the stack trace. -// -// Returns: -// -// A string representation of the current stack trace, with each frame on a new line. -func GetStacktrace(skip int) string { - pcs := make([]uintptr, 256) - total := runtime.Callers(skip+2, pcs) - frames := runtime.CallersFrames(pcs[:total]) - buffer := new(bytes.Buffer) - for { - if frame, ok := frames.Next(); ok { - // let's check if we need to ignore this frame - if slices.Contains(ignoredFunctionsFromStackTrace, frame.Function) { - continue - } - // writing frame to the buffer - _, _ = fmt.Fprintf(buffer, "%s\n\t%s:%d\n", frame.Function, frame.File, frame.Line) - } else { - break - } - - } - return buffer.String() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry.go deleted file mode 100644 index 53431615c2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry.go +++ /dev/null @@ -1,173 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package telemetry - -// TestingFramework is a type for testing frameworks -type TestingFramework string - -const ( - GoTestingFramework TestingFramework = "test_framework:testing" - UnknownFramework TestingFramework = "test_framework:unknown" -) - -// TestSessionEventType is a type for test session event types -type TestSessionType []string - -var ( - AppVeyorTestSessionType TestSessionType = []string{"provider:appveyor"} - AzurePipelinesTestSessionType TestSessionType = []string{"provider:azp"} - BitbucketTestSessionType TestSessionType = []string{"provider:bitbucket"} - BitRiseTestSessionType TestSessionType = []string{"provider:bitrise"} - BuildKiteTestSessionType TestSessionType = []string{"provider:buildkite"} - CircleCiTestSessionType TestSessionType = []string{"provider:circleci"} - CodeFreshTestSessionType TestSessionType = []string{"provider:codefresh"} - GithubActionsTestSessionType TestSessionType = []string{"provider:githubactions"} - GitlabTestSessionType TestSessionType = []string{"provider:gitlab"} - JenkinsTestSessionType TestSessionType = []string{"provider:jenkins"} - TeamcityTestSessionType TestSessionType = []string{"provider:teamcity"} - TravisCiTestSessionType TestSessionType = []string{"provider:travisci"} - BuddyCiTestSessionType TestSessionType = []string{"provider:buddyci"} - AwsCodePipelineSessionType TestSessionType = []string{"provider:aws"} - UnsupportedTestSessionType TestSessionType = []string{"provider:unsupported"} - - IsAutoInstrumentationTestSessionType TestSessionType = []string{"auto_injected:true"} -) - -// TestingEventType is a type for testing event types -type TestingEventType []string - -var ( - TestEventType TestingEventType = []string{"event_type:test"} - SuiteEventType TestingEventType = []string{"event_type:suite"} - ModuleEventType TestingEventType = []string{"event_type:module"} - SessionEventType TestingEventType = []string{"event_type:session"} - - UnsupportedCiEventType TestingEventType = []string{"is_unsupported_ci"} - HasCodeOwnerEventType TestingEventType = []string{"has_codeowner"} - IsNewEventType TestingEventType = []string{"is_new:true"} - IsRetryEventType TestingEventType = []string{"is_retry:true"} - EfdAbortSlowEventType TestingEventType = []string{"early_flake_detection_abort_reason:slow"} - IsBenchmarkEventType TestingEventType = []string{"is_benchmark"} - IsAttemptToFixEventType TestingEventType = []string{"is_attempt_to_fix:true"} - IsQuarantinedEventType TestingEventType = []string{"is_quarantined:true"} - IsDisabledEventType TestingEventType = []string{"is_disabled:true"} - HasFailedAllRetriesEventType TestingEventType = []string{"has_failed_all_retries:true"} -) - -// CoverageLibraryType is a type for coverage library types -type CoverageLibraryType string - -const ( - DefaultCoverageLibraryType CoverageLibraryType = "library:default" - UnknownCoverageLibraryType CoverageLibraryType = "library:unknown" -) - -// EndpointType is a type for endpoint types -type EndpointType string - -const ( - TestCycleEndpointType EndpointType = "endpoint:test_cycle" - CodeCoverageEndpointType EndpointType = "endpoint:code_coverage" -) - -// ErrorType is a type for error types -type ErrorType []string - -var ( - TimeoutErrorType ErrorType = []string{"error_type:timeout"} - NetworkErrorType ErrorType = []string{"error_type:network"} - StatusCodeErrorType ErrorType = []string{"error_type:status_code"} - StatusCode4xxErrorType ErrorType = []string{"error_type:status_code_4xx_response"} - StatusCode5xxErrorType ErrorType = []string{"error_type:status_code_5xx_response"} - StatusCode400ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:400"} - StatusCode401ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:401"} - StatusCode403ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:403"} - StatusCode404ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:404"} - StatusCode408ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:408"} - StatusCode429ErrorType ErrorType = []string{"error_type:status_code_4xx_response", "status_code:429"} -) - -// CommandType is a type for commands types -type CommandType string - -const ( - NotSpecifiedCommandsType CommandType = "" - GetRepositoryCommandsType CommandType = "command:get_repository" - GetBranchCommandsType CommandType = "command:get_branch" - GetRemoteCommandsType CommandType = "command:get_remote" - GetRemoteUpstreamTrackingCommandsType CommandType = "command:get_remote_upstream_tracking" - GetHeadCommandsType CommandType = "command:get_head" - CheckShallowCommandsType CommandType = "command:check_shallow" - UnshallowCommandsType CommandType = "command:unshallow" - GetLocalCommitsCommandsType CommandType = "command:get_local_commits" - GetObjectsCommandsType CommandType = "command:get_objects" - PackObjectsCommandsType CommandType = "command:pack_objects" - DiffCommandType CommandType = "command:diff" - ShowRefCommandType CommandType = "command:show_ref" - LsRemoteHeadsCommandType CommandType = "command:ls_remote_heads" - FetchCommandType CommandType = "command:fetch" - ForEachRefCommandType CommandType = "command:for_each_ref" - MergeBaseCommandType CommandType = "command:merge_base" - RevListCommandType CommandType = "command:rev_list" - SymbolicRefCommandType CommandType = "command:symbolic_ref" - GetWorkingDirectoryCommandType CommandType = "command:get_working_directory" - GetGitCommitInfoCommandType CommandType = "command:get_git_info" - GitAddPermissionCommandType CommandType = "command:git_add_permission" -) - -// CommandExitCodeType is a type for command exit codes -type CommandExitCodeType string - -const ( - MissingCommandExitCode CommandExitCodeType = "exit_code:missing" - UnknownCommandExitCode CommandExitCodeType = "exit_code:unknown" - ECMinus1CommandExitCode CommandExitCodeType = "exit_code:-1" - EC1CommandExitCode CommandExitCodeType = "exit_code:1" - EC2CommandExitCode CommandExitCodeType = "exit_code:2" - EC127CommandExitCode CommandExitCodeType = "exit_code:127" - EC128CommandExitCode CommandExitCodeType = "exit_code:128" - EC129CommandExitCode CommandExitCodeType = "exit_code:129" -) - -// RequestCompressedType is a type for request compressed types -type RequestCompressedType string - -const ( - UncompressedRequestCompressedType RequestCompressedType = "" - CompressedRequestCompressedType RequestCompressedType = "rq_compressed:true" -) - -// ResponseCompressedType is a type for response compressed types -type ResponseCompressedType string - -const ( - UncompressedResponseCompressedType ResponseCompressedType = "" - CompressedResponseCompressedType ResponseCompressedType = "rs_compressed:true" -) - -// SettingsResponseType is a type for settings response types -type SettingsResponseType []string - -var ( - CoverageEnabledSettingsResponseType SettingsResponseType = []string{"coverage_enabled"} - ItrSkipEnabledSettingsResponseType SettingsResponseType = []string{"itrskip_enabled"} - EfdEnabledSettingsResponseType SettingsResponseType = []string{"early_flake_detection_enabled:true"} - FlakyTestRetriesEnabledSettingsResponseType SettingsResponseType = []string{"flaky_test_retries_enabled:true"} - TestManagementEnabledSettingsResponseType SettingsResponseType = []string{"test_management_enabled:true"} -) - -// removeEmptyStrings removes empty string values from a slice. -func removeEmptyStrings(s []string) []string { - result := make([]string, len(s)) - n := 0 - for _, str := range s { - if str != "" { - result[n] = str - n++ - } - } - return result[:n] -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_count.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_count.go deleted file mode 100644 index c58a2f9244..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_count.go +++ /dev/null @@ -1,287 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package telemetry - -import ( - "os" - - "github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -func getTestingFramework(testingFramework string) TestingFramework { - telemetryFramework := UnknownFramework - if testingFramework == "golang.org/pkg/testing" { - telemetryFramework = GoTestingFramework - } - return telemetryFramework -} - -func GetErrorTypeFromStatusCode(statusCode int) ErrorType { - switch statusCode { - case 0: - return NetworkErrorType - case 400: - return StatusCode400ErrorType - case 401: - return StatusCode401ErrorType - case 403: - return StatusCode403ErrorType - case 404: - return StatusCode404ErrorType - case 408: - return StatusCode408ErrorType - case 429: - return StatusCode429ErrorType - default: - if statusCode >= 500 && statusCode < 600 { - return StatusCode5xxErrorType - } else if statusCode >= 400 && statusCode < 500 { - return StatusCode4xxErrorType - } - return StatusCodeErrorType - } -} - -func getProviderTestSessionTypeFromProviderString(provider string) TestSessionType { - switch provider { - case "appveyor": - return AppVeyorTestSessionType - case "azurepipelines": - return AzurePipelinesTestSessionType - case "bitbucket": - return BitbucketTestSessionType - case "bitrise": - return BitRiseTestSessionType - case "buildkite": - return BuildKiteTestSessionType - case "circleci": - return CircleCiTestSessionType - case "codefresh": - return CodeFreshTestSessionType - case "github": - return GithubActionsTestSessionType - case "gitlab": - return GitlabTestSessionType - case "jenkins": - return JenkinsTestSessionType - case "teamcity": - return TeamcityTestSessionType - case "travisci": - return TravisCiTestSessionType - case "buddy": - return BuddyCiTestSessionType - case "awscodepipeline": - return AwsCodePipelineSessionType - default: - return UnsupportedTestSessionType - } -} - -func TestSession(providerName string) { - var tags []string - tags = append(tags, getProviderTestSessionTypeFromProviderString(providerName)...) - if os.Getenv(constants.CIVisibilityAutoInstrumentationProviderEnvironmentVariable) != "" { - tags = append(tags, IsAutoInstrumentationTestSessionType...) - } - telemetry.Count(telemetry.NamespaceCIVisibility, "test_session", removeEmptyStrings(tags)).Submit(1.0) -} - -// EventCreated the number of events created by CI Visibility -func EventCreated(testingFramework string, eventType TestingEventType) { - tags := []string{string(getTestingFramework(testingFramework))} - tags = append(tags, eventType...) - telemetry.Count(telemetry.NamespaceCIVisibility, "event_created", removeEmptyStrings(tags)).Submit(1.0) -} - -// EventFinished the number of events finished by CI Visibility -func EventFinished(testingFramework string, eventType TestingEventType) { - tags := []string{string(getTestingFramework(testingFramework))} - tags = append(tags, eventType...) - telemetry.Count(telemetry.NamespaceCIVisibility, "event_finished", removeEmptyStrings(tags)).Submit(1.0) -} - -// CodeCoverageStarted the number of code coverage start calls by CI Visibility -func CodeCoverageStarted(testingFramework string, coverageLibraryType CoverageLibraryType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "code_coverage_started", removeEmptyStrings([]string{ - string(getTestingFramework(testingFramework)), - string(coverageLibraryType), - })).Submit(1.0) -} - -// CodeCoverageFinished the number of code coverage finished calls by CI Visibility -func CodeCoverageFinished(testingFramework string, coverageLibraryType CoverageLibraryType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "code_coverage_finished", removeEmptyStrings([]string{ - string(getTestingFramework(testingFramework)), - string(coverageLibraryType), - })).Submit(1.0) -} - -// EventsEnqueueForSerialization the number of events enqueued for serialization by CI Visibility -func EventsEnqueueForSerialization() { - telemetry.Count(telemetry.NamespaceCIVisibility, "events_enqueued_for_serialization", nil).Submit(1.0) -} - -// EndpointPayloadRequests the number of requests sent to the endpoint, regardless of success, tagged by endpoint type -func EndpointPayloadRequests(endpointType EndpointType, requestCompressedType RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "endpoint_payload.requests", removeEmptyStrings([]string{ - string(endpointType), - string(requestCompressedType), - })).Submit(1.0) -} - -// EndpointPayloadRequestsErrors the number of requests sent to the endpoint that errored, tagget by the error type and endpoint type and status code -func EndpointPayloadRequestsErrors(endpointType EndpointType, errorType ErrorType) { - tags := []string{string(endpointType)} - tags = append(tags, errorType...) - telemetry.Count(telemetry.NamespaceCIVisibility, "endpoint_payload.requests_errors", removeEmptyStrings(tags)).Submit(1.0) -} - -// EndpointPayloadDropped the number of payloads dropped after all retries by CI Visibility -func EndpointPayloadDropped(endpointType EndpointType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "endpoint_payload.dropped", removeEmptyStrings([]string{ - string(endpointType), - })).Submit(1.0) -} - -// GitCommand the number of git commands executed by CI Visibility -func GitCommand(commandType CommandType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git.command", removeEmptyStrings([]string{ - string(commandType), - })).Submit(1.0) -} - -// GitCommandErrors the number of git command that errored by CI Visibility -func GitCommandErrors(commandType CommandType, exitCode CommandExitCodeType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git.command_errors", removeEmptyStrings([]string{ - string(commandType), - string(exitCode), - })).Submit(1.0) -} - -// GitRequestsSearchCommits the number of requests sent to the search commit endpoint, regardless of success. -func GitRequestsSearchCommits(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.search_commits", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// GitRequestsSearchCommitsErrors the number of requests sent to the search commit endpoint that errored, tagged by the error type. -func GitRequestsSearchCommitsErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.search_commits_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// GitRequestsObjectsPack the number of requests sent to the objects pack endpoint, tagged by the request compressed type. -func GitRequestsObjectsPack(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.objects_pack", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// GitRequestsObjectsPackErrors the number of requests sent to the objects pack endpoint that errored, tagged by the error type. -func GitRequestsObjectsPackErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.objects_pack_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// GitRequestsSettings the number of requests sent to the settings endpoint, tagged by the request compressed type. -func GitRequestsSettings(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.settings", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// GitRequestsSettingsErrors the number of requests sent to the settings endpoint that errored, tagged by the error type. -func GitRequestsSettingsErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.settings_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// GitRequestsSettingsResponse the number of settings responses received by CI Visibility, tagged by the settings response type. -func GitRequestsSettingsResponse(settingsResponseType SettingsResponseType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "git_requests.settings_response", removeEmptyStrings(settingsResponseType)).Submit(1.0) -} - -// ITRSkippableTestsRequest the number of requests sent to the ITR skippable tests endpoint, tagged by the request compressed type. -func ITRSkippableTestsRequest(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_skippable_tests.request", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// ITRSkippableTestsRequestErrors the number of requests sent to the ITR skippable tests endpoint that errored, tagged by the error type. -func ITRSkippableTestsRequestErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_skippable_tests.request_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// ITRSkippableTestsResponseTests the number of tests received in the ITR skippable tests response by CI Visibility. -func ITRSkippableTestsResponseTests(value float64) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_skippable_tests.response_tests", nil).Submit(value) -} - -// ITRSkipped the number of ITR tests skipped by CI Visibility, tagged by the event type. -func ITRSkipped(eventType TestingEventType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_skipped", removeEmptyStrings(eventType)).Submit(1.0) -} - -// ITRUnskippable the number of ITR tests unskippable by CI Visibility, tagged by the event type. -func ITRUnskippable(eventType TestingEventType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_unskippable", removeEmptyStrings(eventType)).Submit(1.0) -} - -// ITRForcedRun the number of tests or test suites that would've been skipped by ITR but were forced to run because of their unskippable status by CI Visibility. -func ITRForcedRun(eventType TestingEventType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "itr_forced_run", removeEmptyStrings(eventType)).Submit(1.0) -} - -// CodeCoverageIsEmpty the number of code coverage payloads that are empty by CI Visibility. -func CodeCoverageIsEmpty() { - telemetry.Count(telemetry.NamespaceCIVisibility, "code_coverage.is_empty", nil).Submit(1.0) -} - -// CodeCoverageErrors the number of errors while processing code coverage by CI Visibility. -func CodeCoverageErrors() { - telemetry.Count(telemetry.NamespaceCIVisibility, "code_coverage.errors", nil).Submit(1.0) -} - -// KnownTestsRequest the number of requests sent to the known tests endpoint, tagged by the request compressed type. -func KnownTestsRequest(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "known_tests.request", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// KnownTestsRequestErrors the number of requests sent to the known tests endpoint that errored, tagged by the error type. -func KnownTestsRequestErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "known_tests.request_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// TestManagementTestsRequest the number of requests sent to the test management tests endpoint, tagged by the request compressed type. -func TestManagementTestsRequest(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "test_management_tests.request", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// TestManagementTestsRequestErrors the number of requests sent to the test management tests endpoint that errored, tagged by the error type. -func TestManagementTestsRequestErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "test_management_tests.request_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// ImpactedTestsRequest the number of requests sent to the impacted tests endpoint, tagged by the request compressed type. -func ImpactedTestsRequest(requestCompressed RequestCompressedType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "impacted_tests_detection.request", removeEmptyStrings([]string{ - string(requestCompressed), - })).Submit(1.0) -} - -// ImpactedTestsRequestErrors the number of requests sent to the impacted tests endpoint that errored, tagged by the error type. -func ImpactedTestsRequestErrors(errorType ErrorType) { - telemetry.Count(telemetry.NamespaceCIVisibility, "impacted_tests_detection.request_errors", removeEmptyStrings(errorType)).Submit(1.0) -} - -// ImpactedTestsModified the number of impacted tests that were modified by CI Visibility. -func ImpactedTestsModified() { - telemetry.Count(telemetry.NamespaceCIVisibility, "impacted_tests_detection.is_modified", nil).Submit(1.0) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_distribution.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_distribution.go deleted file mode 100644 index 3d043d319c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry/telemetry_distribution.go +++ /dev/null @@ -1,138 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package telemetry - -import "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - -// EndpointPayloadBytes records the size in bytes of the serialized payload by CI Visibility. -func EndpointPayloadBytes(endpointType EndpointType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "endpoint_payload.bytes", removeEmptyStrings([]string{ - string(endpointType), - })).Submit(value) -} - -// EndpointPayloadRequestsMs records the time it takes to send the payload sent to the endpoint in ms by CI Visibility. -func EndpointPayloadRequestsMs(endpointType EndpointType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "endpoint_payload.requests_ms", removeEmptyStrings([]string{ - string(endpointType), - })).Submit(value) -} - -// EndpointPayloadEventsCount records the number of events in the payload sent to the endpoint by CI Visibility. -func EndpointPayloadEventsCount(endpointType EndpointType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "endpoint_payload.events_count", removeEmptyStrings([]string{ - string(endpointType), - })).Submit(value) -} - -// EndpointEventsSerializationMs records the time it takes to serialize the events in the payload sent to the endpoint in ms by CI Visibility. -func EndpointEventsSerializationMs(endpointType EndpointType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "endpoint_payload.events_serialization_ms", removeEmptyStrings([]string{ - string(endpointType), - })).Submit(value) -} - -// GitCommandMs records the time it takes to execute a git command in ms by CI Visibility. -func GitCommandMs(commandType CommandType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git.command_ms", removeEmptyStrings([]string{ - (string)(commandType), - })).Submit(value) -} - -// GitRequestsSearchCommitsMs records the time it takes to get the response of the search commit quest in ms by CI Visibility. -func GitRequestsSearchCommitsMs(responseCompressedType ResponseCompressedType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git_requests.search_commits_ms", removeEmptyStrings([]string{ - (string)(responseCompressedType), - })).Submit(value) -} - -// GitRequestsObjectsPackMs records the time it takes to get the response of the objects pack request in ms by CI Visibility. -func GitRequestsObjectsPackMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git_requests.objects_pack_ms", nil).Submit(value) -} - -// GitRequestsObjectsPackBytes records the sum of the sizes of the object pack files inside a single payload by CI Visibility -func GitRequestsObjectsPackBytes(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git_requests.objects_pack_bytes", nil).Submit(value) -} - -// GitRequestsObjectsPackFiles records the number of files sent in the object pack payload by CI Visibility. -func GitRequestsObjectsPackFiles(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git_requests.objects_pack_files", nil).Submit(value) -} - -// GitRequestsSettingsMs records the time it takes to get the response of the settings endpoint request in ms by CI Visibility. -func GitRequestsSettingsMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "git_requests.settings_ms", nil).Submit(value) -} - -// ITRSkippableTestsRequestMs records the time it takes to get the response of the itr skippable tests endpoint request in ms by CI Visibility. -func ITRSkippableTestsRequestMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "itr_skippable_tests.request_ms", nil).Submit(value) -} - -// ITRSkippableTestsResponseBytes records the number of bytes received by the endpoint. Tagged with a boolean flag set t if response body is compressed. -func ITRSkippableTestsResponseBytes(responseCompressedType ResponseCompressedType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "itr_skippable_tests.response_bytes", removeEmptyStrings([]string{ - (string)(responseCompressedType), - })).Submit(value) -} - -// CodeCoverageFiles records the number of files in the code coverage report by CI Visibility. -func CodeCoverageFiles(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "code_coverage.files", nil).Submit(value) -} - -// KnownTestsRequestMs records the time it takes to get the response of the known tests endpoint request in ms by CI Visibility. -func KnownTestsRequestMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "known_tests.request_ms", nil).Submit(value) -} - -// KnownTestsResponseBytes records the number of bytes received by the endpoint. Tagged with a boolean flag set to true if response body is compressed. -func KnownTestsResponseBytes(responseCompressedType ResponseCompressedType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "known_tests.response_bytes", removeEmptyStrings([]string{ - string(responseCompressedType), - })).Submit(value) -} - -// KnownTestsResponseTests records the number of tests in the response of the known tests endpoint by CI Visibility. -func KnownTestsResponseTests(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "known_tests.response_tests", nil).Submit(value) -} - -// TestManagementTestsRequestMs records the time it takes to get the response of the test management tests endpoint request in ms by CI Visibility. -func TestManagementTestsRequestMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "test_management_tests.request_ms", nil).Submit(value) -} - -// TestManagementTestsResponseBytes records the number of bytes received by the endpoint. Tagged with a boolean flag set to true if response body is compressed. -func TestManagementTestsResponseBytes(responseCompressedType ResponseCompressedType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "test_management_tests.response_bytes", removeEmptyStrings([]string{ - string(responseCompressedType), - })).Submit(value) -} - -// TestManagementTestsResponseTests records the number of tests in the response of the test management tests endpoint by CI Visibility. -func TestManagementTestsResponseTests(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "test_management_tests.response_tests", nil).Submit(value) -} - -// ImpactedTestsRequestMs records the time it takes to get the response of the impacted tests endpoint request in ms by CI Visibility. -func ImpactedTestsRequestMs(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "impacted_tests_detection.request_ms", nil).Submit(value) -} - -// ImpactedTestsResponseBytes records the number of bytes received by the endpoint. Tagged with a boolean flag set to true if response body is compressed. -func ImpactedTestsResponseBytes(responseCompressedType ResponseCompressedType, value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "impacted_tests_detection.response_bytes", removeEmptyStrings([]string{ - string(responseCompressedType), - })).Submit(value) -} - -// ImpactedTestsResponseFiles records the number of files in the response of the impacted tests endpoint by CI Visibility. -func ImpactedTestsResponseFiles(value float64) { - telemetry.Distribution(telemetry.NamespaceCIVisibility, "impacted_tests_detection.response_files", nil).Submit(value) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_linux.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_linux.go deleted file mode 100644 index 6ac57029f9..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_linux.go +++ /dev/null @@ -1,182 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:build linux - -package internal - -import ( - "bufio" - "fmt" - "io" - "os" - "path" - "regexp" - "strings" - "syscall" -) - -const ( - // cgroupPath is the path to the cgroup file where we can find the container id if one exists. - cgroupPath = "/proc/self/cgroup" - - // cgroupV1BaseController is the base controller used to identify the cgroup v1 mount point in the cgroupMounts map. - cgroupV1BaseController = "memory" - - // defaultCgroupMountPath is the path to the cgroup mount point. - defaultCgroupMountPath = "/sys/fs/cgroup" - - uuidSource = "[0-9a-f]{8}[-_][0-9a-f]{4}[-_][0-9a-f]{4}[-_][0-9a-f]{4}[-_][0-9a-f]{12}|[0-9a-f]{8}(?:-[0-9a-f]{4}){4}$" - containerSource = "[0-9a-f]{64}" - taskSource = "[0-9a-f]{32}-\\d+" - - // From https://github.com/torvalds/linux/blob/5859a2b1991101d6b978f3feb5325dad39421f29/include/linux/proc_ns.h#L41-L49 - // Currently, host namespace inode number are hardcoded, which can be used to detect - // if we're running in host namespace or not (does not work when running in DinD) - hostCgroupNamespaceInode = 0xEFFFFFFB -) - -var ( - // expLine matches a line in the /proc/self/cgroup file. It has a submatch for the last element (path), which contains the container ID. - expLine = regexp.MustCompile(`^\d+:[^:]*:(.+)$`) - - // expContainerID matches contained IDs and sources. Source: https://github.com/Qard/container-info/blob/master/index.js - expContainerID = regexp.MustCompile(fmt.Sprintf(`(%s|%s|%s)(?:.scope)?$`, uuidSource, containerSource, taskSource)) - - // containerID is the containerID read at init from /proc/self/cgroup - containerID string - - // entityID is the entityID to use for the container. It is the `ci-` if the container id available, - // otherwise the cgroup node controller's inode prefixed with `in-` or an empty string on incompatible OS. - // We use the memory controller on cgroupv1 and the root cgroup on cgroupv2. - entityID string -) - -func init() { - containerID = readContainerID(cgroupPath) - entityID = readEntityID(defaultCgroupMountPath, cgroupPath, isHostCgroupNamespace()) -} - -// parseContainerID finds the first container ID reading from r and returns it. -func parseContainerID(r io.Reader) string { - scn := bufio.NewScanner(r) - for scn.Scan() { - path := expLine.FindStringSubmatch(scn.Text()) - if len(path) != 2 { - // invalid entry, continue - continue - } - if parts := expContainerID.FindStringSubmatch(path[1]); len(parts) == 2 { - return parts[1] - } - } - return "" -} - -// readContainerID attempts to return the container ID from the provided file path or empty on failure. -func readContainerID(fpath string) string { - f, err := os.Open(fpath) - if err != nil { - return "" - } - defer f.Close() - return parseContainerID(f) -} - -// ContainerID attempts to return the container ID from /proc/self/cgroup or empty on failure. -func ContainerID() string { - return containerID -} - -// parseCgroupNodePath parses /proc/self/cgroup and returns a map of controller to its associated cgroup node path. -func parseCgroupNodePath(r io.Reader) map[string]string { - res := make(map[string]string) - scn := bufio.NewScanner(r) - for scn.Scan() { - line := scn.Text() - tokens := strings.Split(line, ":") - if len(tokens) != 3 { - continue - } - if tokens[1] == cgroupV1BaseController || tokens[1] == "" { - res[tokens[1]] = tokens[2] - } - } - return res -} - -// getCgroupInode returns the cgroup controller inode if it exists otherwise an empty string. -// The inode is prefixed by "in-" and is used by the agent to retrieve the container ID. -// We first try to retrieve the cgroupv1 memory controller inode, if it fails we try to retrieve the cgroupv2 inode. -func getCgroupInode(cgroupMountPath, procSelfCgroupPath string) string { - // Parse /proc/self/cgroup to retrieve the paths to the memory controller (cgroupv1) and the cgroup node (cgroupv2) - f, err := os.Open(procSelfCgroupPath) - if err != nil { - return "" - } - defer f.Close() - cgroupControllersPaths := parseCgroupNodePath(f) - - // Retrieve the cgroup inode from /sys/fs/cgroup + controller + cgroupNodePath - for _, controller := range []string{cgroupV1BaseController, ""} { - cgroupNodePath, ok := cgroupControllersPaths[controller] - if !ok { - continue - } - inode := inodeForPath(path.Join(cgroupMountPath, controller, cgroupNodePath)) - if inode != "" { - return inode - } - } - return "" -} - -// inodeForPath returns the inode for the provided path or empty on failure. -func inodeForPath(path string) string { - fi, err := os.Stat(path) - if err != nil { - return "" - } - stats, ok := fi.Sys().(*syscall.Stat_t) - if !ok { - return "" - } - return fmt.Sprintf("in-%d", stats.Ino) -} - -// readEntityID attempts to return the cgroup node inode or empty on failure. -func readEntityID(mountPath, cgroupPath string, isHostCgroupNamespace bool) string { - // First try to emit the containerID if available. It will be retrieved if the container is - // running in the host cgroup namespace, independently of the cgroup version. - if containerID != "" { - return "ci-" + containerID - } - // Rely on the inode if we're not running in the host cgroup namespace. - if isHostCgroupNamespace { - return "" - } - return getCgroupInode(mountPath, cgroupPath) -} - -// EntityID attempts to return the container ID or the cgroup node controller's inode if the container ID -// is not available. The cid is prefixed with `ci-` and the inode with `in-`. -func EntityID() string { - return entityID -} - -// isHostCgroupNamespace checks if the agent is running in the host cgroup namespace. -func isHostCgroupNamespace() bool { - fi, err := os.Stat("/proc/self/ns/cgroup") - if err != nil { - return false - } - - stat, ok := fi.Sys().(*syscall.Stat_t) - if ok { - return stat.Ino == hostCgroupNamespaceInode - } - - return false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_stub.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_stub.go deleted file mode 100644 index 38f4e5ce21..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/container_stub.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:build !linux - -package internal - -// ContainerID attempts to return the container ID from /proc/self/cgroup or empty on failure. -func ContainerID() string { - return "" -} - -// EntityID attempts to return the container ID or the cgroup v2 node inode if the container ID is not available. -// The cid is prefixed with `ci-` and the inode with `in-`. -func EntityID() string { - return "" -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/fast_queue.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/fast_queue.go deleted file mode 100644 index 45c2b2328a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/fast_queue.go +++ /dev/null @@ -1,67 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "sync/atomic" - "time" -) - -const ( - queueSize = 10000 -) - -// there are many writers, there is only 1 reader. -// each value will be read at most once. -// reader will stop if it catches up with writer -// if reader is too slow, there is no guarantee in which order values will be dropped. -type fastQueue struct { - elements [queueSize]atomic.Pointer[processorInput] - writePos atomic.Int64 - readPos atomic.Int64 -} - -func newFastQueue() *fastQueue { - return &fastQueue{} -} - -func (q *fastQueue) push(p *processorInput) (dropped bool) { - nextPos := q.writePos.Add(1) - // l is the length of the queue after the element has been added, and before the next element has been read. - l := nextPos - q.readPos.Load() - p.queuePos = nextPos - 1 - q.elements[(nextPos-1)%queueSize].Store(p) - return l > queueSize -} - -func (q *fastQueue) pop() *processorInput { - writePos := q.writePos.Load() - readPos := q.readPos.Load() - if writePos <= readPos { - return nil - } - loaded := q.elements[readPos%queueSize].Load() - if loaded == nil || loaded.queuePos < readPos { - // the write started, but hasn't finished yet, the element we read - // is the one from the previous cycle. - return nil - } - q.readPos.Add(1) - return loaded -} - -func (q *fastQueue) poll(timeout time.Duration) *processorInput { - deadline := time.Now().Add(timeout) - for { - if p := q.pop(); p != nil { - return p - } - if time.Now().After(deadline) { - return nil - } - time.Sleep(10 * time.Millisecond) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/hash_cache.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/hash_cache.go deleted file mode 100644 index 4f92f7d730..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/hash_cache.go +++ /dev/null @@ -1,76 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "strings" - "sync" -) - -const ( - maxHashCacheSize = 1000 -) - -type hashCache struct { - mu sync.RWMutex - m map[string]uint64 -} - -func getHashKey(edgeTags, processTags []string, parentHash uint64) string { - var s strings.Builder - l := 0 - for _, t := range edgeTags { - l += len(t) - } - for _, t := range processTags { - l += len(t) - } - l += 8 - s.Grow(l) - for _, t := range edgeTags { - s.WriteString(t) - } - for _, t := range processTags { - s.WriteString(t) - } - s.WriteByte(byte(parentHash)) - s.WriteByte(byte(parentHash >> 8)) - s.WriteByte(byte(parentHash >> 16)) - s.WriteByte(byte(parentHash >> 24)) - s.WriteByte(byte(parentHash >> 32)) - s.WriteByte(byte(parentHash >> 40)) - s.WriteByte(byte(parentHash >> 48)) - s.WriteByte(byte(parentHash >> 56)) - return s.String() -} - -func (c *hashCache) computeAndGet(key string, parentHash uint64, service, env string, edgeTags, processTags []string) uint64 { - hash := pathwayHash(nodeHash(service, env, edgeTags, processTags), parentHash) - c.mu.Lock() - defer c.mu.Unlock() - if len(c.m) >= maxHashCacheSize { - // high cardinality of hashes shouldn't happen in practice, due to a limited amount of topics consumed - // by each service. - c.m = make(map[string]uint64) - } - c.m[key] = hash - return hash -} - -func (c *hashCache) get(service, env string, edgeTags, processTags []string, parentHash uint64) uint64 { - key := getHashKey(edgeTags, processTags, parentHash) - c.mu.RLock() - if hash, ok := c.m[key]; ok { - c.mu.RUnlock() - return hash - } - c.mu.RUnlock() - return c.computeAndGet(key, parentHash, service, env, edgeTags, processTags) -} - -func newHashCache() *hashCache { - return &hashCache{m: make(map[string]uint64)} -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/pathway.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/pathway.go deleted file mode 100644 index c6ac1df438..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/pathway.go +++ /dev/null @@ -1,97 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "encoding/binary" - "fmt" - "hash/fnv" - "math/rand" - "sort" - "strings" - "time" -) - -var hashableEdgeTags = map[string]struct{}{"event_type": {}, "exchange": {}, "group": {}, "topic": {}, "type": {}, "direction": {}} - -func isWellFormedEdgeTag(t string) bool { - if i := strings.IndexByte(t, ':'); i != -1 { - if _, exists := hashableEdgeTags[t[:i]]; exists { - return true - } - } - return false -} - -func nodeHash(service, env string, edgeTags, processTags []string) uint64 { - h := fnv.New64() - sort.Strings(edgeTags) - h.Write([]byte(service)) - h.Write([]byte(env)) - for _, t := range edgeTags { - if isWellFormedEdgeTag(t) { - h.Write([]byte(t)) - } else { - fmt.Println("not formatted correctly", t) - } - } - for _, t := range processTags { - h.Write([]byte(t)) - } - return h.Sum64() -} - -func pathwayHash(nodeHash, parentHash uint64) uint64 { - b := make([]byte, 16) - binary.LittleEndian.PutUint64(b, nodeHash) - binary.LittleEndian.PutUint64(b[8:], parentHash) - h := fnv.New64() - h.Write(b) - return h.Sum64() -} - -// Pathway is used to monitor how payloads are sent across different services. -// An example Pathway would be: -// service A -- edge 1 --> service B -- edge 2 --> service C -// So it's a branch of services (we also call them "nodes") connected via edges. -// As the payload is sent around, we save the start time (start of service A), -// and the start time of the previous service. -// This allows us to measure the latency of each edge, as well as the latency from origin of any service. -type Pathway struct { - // hash is the hash of the current node, of the parent node, and of the edge that connects the parent node - // to this node. - hash uint64 - // pathwayStart is the start of the first node in the Pathway - pathwayStart time.Time - // edgeStart is the start of the previous node. - edgeStart time.Time -} - -// Merge merges multiple pathways into one. -// The current implementation samples one resulting Pathway. A future implementation could be more clever -// and actually merge the Pathways. -func Merge(pathways []Pathway) Pathway { - if len(pathways) == 0 { - return Pathway{} - } - // Randomly select a pathway to propagate downstream. - n := rand.Intn(len(pathways)) - return pathways[n] -} - -// GetHash gets the hash of a pathway. -func (p Pathway) GetHash() uint64 { - return p.hash -} - -// PathwayStart returns the start timestamp of the pathway -func (p Pathway) PathwayStart() time.Time { - return p.pathwayStart -} - -func (p Pathway) EdgeStart() time.Time { - return p.edgeStart -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload.go deleted file mode 100644 index eee5dff484..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload.go +++ /dev/null @@ -1,85 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:generate go run github.com/tinylib/msgp -unexported -marshal=false -o=payload_msgp.go -tests=false - -package datastreams - -// StatsPayload stores client computed stats. -type StatsPayload struct { - // Env specifies the env. of the application, as defined by the user. - Env string - // Service is the service of the application - Service string - // Stats holds all stats buckets computed within this payload. - Stats []StatsBucket - // TracerVersion is the version of the tracer - TracerVersion string - // Lang is the language of the tracer - Lang string - // Version is the version of the service - Version string - // ProcessTags contains the process level tags. - ProcessTags []string -} - -type ProduceOffset struct { - Topic string - Partition int32 - Offset int64 -} - -type CommitOffset struct { - ConsumerGroup string - Topic string - Partition int32 - Offset int64 -} - -// Backlog represents the size of a queue that hasn't been yet read by the consumer. -type Backlog struct { - // Tags that identify the backlog - Tags []string - // Value of the backlog - Value int64 -} - -// StatsBucket specifies a set of stats computed over a duration. -type StatsBucket struct { - // Start specifies the beginning of this bucket in unix nanoseconds. - Start uint64 - // Duration specifies the duration of this bucket in nanoseconds. - Duration uint64 - // Stats contains a set of statistics computed for the duration of this bucket. - Stats []StatsPoint - // Backlogs store information used to compute queue backlog - Backlogs []Backlog -} - -// TimestampType can be either current or origin. -type TimestampType string - -const ( - // TimestampTypeCurrent is for when the recorded timestamp is based on the - // timestamp of the current StatsPoint. - TimestampTypeCurrent TimestampType = "current" - // TimestampTypeOrigin is for when the recorded timestamp is based on the - // time that the first StatsPoint in the pathway is sent out. - TimestampTypeOrigin TimestampType = "origin" -) - -// StatsPoint contains a set of statistics grouped under various aggregation keys. -type StatsPoint struct { - // These fields indicate the properties under which the stats were aggregated. - EdgeTags []string - Hash uint64 - ParentHash uint64 - // These fields specify the stats for the above aggregation. - // those are distributions of latency in seconds. - PathwayLatency []byte - EdgeLatency []byte - PayloadSize []byte - TimestampType TimestampType -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload_msgp.go deleted file mode 100644 index fe8a9cc876..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/payload_msgp.go +++ /dev/null @@ -1,930 +0,0 @@ -package datastreams - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *Backlog) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Tags": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - if cap(z.Tags) >= int(zb0002) { - z.Tags = (z.Tags)[:zb0002] - } else { - z.Tags = make([]string, zb0002) - } - for za0001 := range z.Tags { - z.Tags[za0001], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Tags", za0001) - return - } - } - case "Value": - z.Value, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Value") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *Backlog) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 2 - // write "Tags" - err = en.Append(0x82, 0xa4, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Tags))) - if err != nil { - err = msgp.WrapError(err, "Tags") - return - } - for za0001 := range z.Tags { - err = en.WriteString(z.Tags[za0001]) - if err != nil { - err = msgp.WrapError(err, "Tags", za0001) - return - } - } - // write "Value" - err = en.Append(0xa5, 0x56, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.Value) - if err != nil { - err = msgp.WrapError(err, "Value") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *Backlog) Msgsize() (s int) { - s = 1 + 5 + msgp.ArrayHeaderSize - for za0001 := range z.Tags { - s += msgp.StringPrefixSize + len(z.Tags[za0001]) - } - s += 6 + msgp.Int64Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *CommitOffset) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "ConsumerGroup": - z.ConsumerGroup, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ConsumerGroup") - return - } - case "Topic": - z.Topic, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Topic") - return - } - case "Partition": - z.Partition, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Partition") - return - } - case "Offset": - z.Offset, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Offset") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *CommitOffset) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 4 - // write "ConsumerGroup" - err = en.Append(0x84, 0xad, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70) - if err != nil { - return - } - err = en.WriteString(z.ConsumerGroup) - if err != nil { - err = msgp.WrapError(err, "ConsumerGroup") - return - } - // write "Topic" - err = en.Append(0xa5, 0x54, 0x6f, 0x70, 0x69, 0x63) - if err != nil { - return - } - err = en.WriteString(z.Topic) - if err != nil { - err = msgp.WrapError(err, "Topic") - return - } - // write "Partition" - err = en.Append(0xa9, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt32(z.Partition) - if err != nil { - err = msgp.WrapError(err, "Partition") - return - } - // write "Offset" - err = en.Append(0xa6, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.Offset) - if err != nil { - err = msgp.WrapError(err, "Offset") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *CommitOffset) Msgsize() (s int) { - s = 1 + 14 + msgp.StringPrefixSize + len(z.ConsumerGroup) + 6 + msgp.StringPrefixSize + len(z.Topic) + 10 + msgp.Int32Size + 7 + msgp.Int64Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *ProduceOffset) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Topic": - z.Topic, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Topic") - return - } - case "Partition": - z.Partition, err = dc.ReadInt32() - if err != nil { - err = msgp.WrapError(err, "Partition") - return - } - case "Offset": - z.Offset, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Offset") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z ProduceOffset) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 3 - // write "Topic" - err = en.Append(0x83, 0xa5, 0x54, 0x6f, 0x70, 0x69, 0x63) - if err != nil { - return - } - err = en.WriteString(z.Topic) - if err != nil { - err = msgp.WrapError(err, "Topic") - return - } - // write "Partition" - err = en.Append(0xa9, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteInt32(z.Partition) - if err != nil { - err = msgp.WrapError(err, "Partition") - return - } - // write "Offset" - err = en.Append(0xa6, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74) - if err != nil { - return - } - err = en.WriteInt64(z.Offset) - if err != nil { - err = msgp.WrapError(err, "Offset") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z ProduceOffset) Msgsize() (s int) { - s = 1 + 6 + msgp.StringPrefixSize + len(z.Topic) + 10 + msgp.Int32Size + 7 + msgp.Int64Size - return -} - -// DecodeMsg implements msgp.Decodable -func (z *StatsBucket) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Start": - z.Start, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - case "Duration": - z.Duration, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - case "Stats": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]StatsPoint, zb0002) - } - for za0001 := range z.Stats { - err = z.Stats[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - case "Backlogs": - var zb0003 uint32 - zb0003, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Backlogs") - return - } - if cap(z.Backlogs) >= int(zb0003) { - z.Backlogs = (z.Backlogs)[:zb0003] - } else { - z.Backlogs = make([]Backlog, zb0003) - } - for za0002 := range z.Backlogs { - var zb0004 uint32 - zb0004, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002) - return - } - for zb0004 > 0 { - zb0004-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002) - return - } - switch msgp.UnsafeString(field) { - case "Tags": - var zb0005 uint32 - zb0005, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Tags") - return - } - if cap(z.Backlogs[za0002].Tags) >= int(zb0005) { - z.Backlogs[za0002].Tags = (z.Backlogs[za0002].Tags)[:zb0005] - } else { - z.Backlogs[za0002].Tags = make([]string, zb0005) - } - for za0003 := range z.Backlogs[za0002].Tags { - z.Backlogs[za0002].Tags[za0003], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Tags", za0003) - return - } - } - case "Value": - z.Backlogs[za0002].Value, err = dc.ReadInt64() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Value") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002) - return - } - } - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *StatsBucket) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 4 - // write "Start" - err = en.Append(0x84, 0xa5, 0x53, 0x74, 0x61, 0x72, 0x74) - if err != nil { - return - } - err = en.WriteUint64(z.Start) - if err != nil { - err = msgp.WrapError(err, "Start") - return - } - // write "Duration" - err = en.Append(0xa8, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteUint64(z.Duration) - if err != nil { - err = msgp.WrapError(err, "Duration") - return - } - // write "Stats" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Stats))) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - for za0001 := range z.Stats { - err = z.Stats[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - // write "Backlogs" - err = en.Append(0xa8, 0x42, 0x61, 0x63, 0x6b, 0x6c, 0x6f, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Backlogs))) - if err != nil { - err = msgp.WrapError(err, "Backlogs") - return - } - for za0002 := range z.Backlogs { - // map header, size 2 - // write "Tags" - err = en.Append(0x82, 0xa4, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Backlogs[za0002].Tags))) - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Tags") - return - } - for za0003 := range z.Backlogs[za0002].Tags { - err = en.WriteString(z.Backlogs[za0002].Tags[za0003]) - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Tags", za0003) - return - } - } - // write "Value" - err = en.Append(0xa5, 0x56, 0x61, 0x6c, 0x75, 0x65) - if err != nil { - return - } - err = en.WriteInt64(z.Backlogs[za0002].Value) - if err != nil { - err = msgp.WrapError(err, "Backlogs", za0002, "Value") - return - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *StatsBucket) Msgsize() (s int) { - s = 1 + 6 + msgp.Uint64Size + 9 + msgp.Uint64Size + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Stats { - s += z.Stats[za0001].Msgsize() - } - s += 9 + msgp.ArrayHeaderSize - for za0002 := range z.Backlogs { - s += 1 + 5 + msgp.ArrayHeaderSize - for za0003 := range z.Backlogs[za0002].Tags { - s += msgp.StringPrefixSize + len(z.Backlogs[za0002].Tags[za0003]) - } - s += 6 + msgp.Int64Size - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *StatsPayload) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "Env": - z.Env, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - case "Service": - z.Service, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - case "Stats": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - if cap(z.Stats) >= int(zb0002) { - z.Stats = (z.Stats)[:zb0002] - } else { - z.Stats = make([]StatsBucket, zb0002) - } - for za0001 := range z.Stats { - err = z.Stats[za0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - case "TracerVersion": - z.TracerVersion, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - case "Lang": - z.Lang, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Lang") - return - } - case "Version": - z.Version, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - case "ProcessTags": - var zb0003 uint32 - zb0003, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "ProcessTags") - return - } - if cap(z.ProcessTags) >= int(zb0003) { - z.ProcessTags = (z.ProcessTags)[:zb0003] - } else { - z.ProcessTags = make([]string, zb0003) - } - for za0002 := range z.ProcessTags { - z.ProcessTags[za0002], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ProcessTags", za0002) - return - } - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *StatsPayload) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 7 - // write "Env" - err = en.Append(0x87, 0xa3, 0x45, 0x6e, 0x76) - if err != nil { - return - } - err = en.WriteString(z.Env) - if err != nil { - err = msgp.WrapError(err, "Env") - return - } - // write "Service" - err = en.Append(0xa7, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Service) - if err != nil { - err = msgp.WrapError(err, "Service") - return - } - // write "Stats" - err = en.Append(0xa5, 0x53, 0x74, 0x61, 0x74, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.Stats))) - if err != nil { - err = msgp.WrapError(err, "Stats") - return - } - for za0001 := range z.Stats { - err = z.Stats[za0001].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Stats", za0001) - return - } - } - // write "TracerVersion" - err = en.Append(0xad, 0x54, 0x72, 0x61, 0x63, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.TracerVersion) - if err != nil { - err = msgp.WrapError(err, "TracerVersion") - return - } - // write "Lang" - err = en.Append(0xa4, 0x4c, 0x61, 0x6e, 0x67) - if err != nil { - return - } - err = en.WriteString(z.Lang) - if err != nil { - err = msgp.WrapError(err, "Lang") - return - } - // write "Version" - err = en.Append(0xa7, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Version) - if err != nil { - err = msgp.WrapError(err, "Version") - return - } - // write "ProcessTags" - err = en.Append(0xab, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.ProcessTags))) - if err != nil { - err = msgp.WrapError(err, "ProcessTags") - return - } - for za0002 := range z.ProcessTags { - err = en.WriteString(z.ProcessTags[za0002]) - if err != nil { - err = msgp.WrapError(err, "ProcessTags", za0002) - return - } - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *StatsPayload) Msgsize() (s int) { - s = 1 + 4 + msgp.StringPrefixSize + len(z.Env) + 8 + msgp.StringPrefixSize + len(z.Service) + 6 + msgp.ArrayHeaderSize - for za0001 := range z.Stats { - s += z.Stats[za0001].Msgsize() - } - s += 14 + msgp.StringPrefixSize + len(z.TracerVersion) + 5 + msgp.StringPrefixSize + len(z.Lang) + 8 + msgp.StringPrefixSize + len(z.Version) + 12 + msgp.ArrayHeaderSize - for za0002 := range z.ProcessTags { - s += msgp.StringPrefixSize + len(z.ProcessTags[za0002]) - } - return -} - -// DecodeMsg implements msgp.Decodable -func (z *StatsPoint) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "EdgeTags": - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err, "EdgeTags") - return - } - if cap(z.EdgeTags) >= int(zb0002) { - z.EdgeTags = (z.EdgeTags)[:zb0002] - } else { - z.EdgeTags = make([]string, zb0002) - } - for za0001 := range z.EdgeTags { - z.EdgeTags[za0001], err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "EdgeTags", za0001) - return - } - } - case "Hash": - z.Hash, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "Hash") - return - } - case "ParentHash": - z.ParentHash, err = dc.ReadUint64() - if err != nil { - err = msgp.WrapError(err, "ParentHash") - return - } - case "PathwayLatency": - z.PathwayLatency, err = dc.ReadBytes(z.PathwayLatency) - if err != nil { - err = msgp.WrapError(err, "PathwayLatency") - return - } - case "EdgeLatency": - z.EdgeLatency, err = dc.ReadBytes(z.EdgeLatency) - if err != nil { - err = msgp.WrapError(err, "EdgeLatency") - return - } - case "PayloadSize": - z.PayloadSize, err = dc.ReadBytes(z.PayloadSize) - if err != nil { - err = msgp.WrapError(err, "PayloadSize") - return - } - case "TimestampType": - { - var zb0003 string - zb0003, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "TimestampType") - return - } - z.TimestampType = TimestampType(zb0003) - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *StatsPoint) EncodeMsg(en *msgp.Writer) (err error) { - // map header, size 7 - // write "EdgeTags" - err = en.Append(0x87, 0xa8, 0x45, 0x64, 0x67, 0x65, 0x54, 0x61, 0x67, 0x73) - if err != nil { - return - } - err = en.WriteArrayHeader(uint32(len(z.EdgeTags))) - if err != nil { - err = msgp.WrapError(err, "EdgeTags") - return - } - for za0001 := range z.EdgeTags { - err = en.WriteString(z.EdgeTags[za0001]) - if err != nil { - err = msgp.WrapError(err, "EdgeTags", za0001) - return - } - } - // write "Hash" - err = en.Append(0xa4, 0x48, 0x61, 0x73, 0x68) - if err != nil { - return - } - err = en.WriteUint64(z.Hash) - if err != nil { - err = msgp.WrapError(err, "Hash") - return - } - // write "ParentHash" - err = en.Append(0xaa, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68) - if err != nil { - return - } - err = en.WriteUint64(z.ParentHash) - if err != nil { - err = msgp.WrapError(err, "ParentHash") - return - } - // write "PathwayLatency" - err = en.Append(0xae, 0x50, 0x61, 0x74, 0x68, 0x77, 0x61, 0x79, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - if err != nil { - return - } - err = en.WriteBytes(z.PathwayLatency) - if err != nil { - err = msgp.WrapError(err, "PathwayLatency") - return - } - // write "EdgeLatency" - err = en.Append(0xab, 0x45, 0x64, 0x67, 0x65, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79) - if err != nil { - return - } - err = en.WriteBytes(z.EdgeLatency) - if err != nil { - err = msgp.WrapError(err, "EdgeLatency") - return - } - // write "PayloadSize" - err = en.Append(0xab, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65) - if err != nil { - return - } - err = en.WriteBytes(z.PayloadSize) - if err != nil { - err = msgp.WrapError(err, "PayloadSize") - return - } - // write "TimestampType" - err = en.Append(0xad, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x54, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(string(z.TimestampType)) - if err != nil { - err = msgp.WrapError(err, "TimestampType") - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *StatsPoint) Msgsize() (s int) { - s = 1 + 9 + msgp.ArrayHeaderSize - for za0001 := range z.EdgeTags { - s += msgp.StringPrefixSize + len(z.EdgeTags[za0001]) - } - s += 5 + msgp.Uint64Size + 11 + msgp.Uint64Size + 15 + msgp.BytesPrefixSize + len(z.PathwayLatency) + 12 + msgp.BytesPrefixSize + len(z.EdgeLatency) + 12 + msgp.BytesPrefixSize + len(z.PayloadSize) + 14 + msgp.StringPrefixSize + len(string(z.TimestampType)) - return -} - -// DecodeMsg implements msgp.Decodable -func (z *TimestampType) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 string - zb0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = TimestampType(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z TimestampType) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteString(string(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z TimestampType) Msgsize() (s int) { - s = msgp.StringPrefixSize + len(string(z)) - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/processor.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/processor.go deleted file mode 100644 index 469660c3e0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/processor.go +++ /dev/null @@ -1,536 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "context" - "fmt" - "math" - "net/http" - "net/url" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/datastreams/options" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/processtags" - "github.com/DataDog/dd-trace-go/v2/internal/version" - - "github.com/DataDog/sketches-go/ddsketch" - "github.com/DataDog/sketches-go/ddsketch/mapping" - "github.com/DataDog/sketches-go/ddsketch/store" - "google.golang.org/protobuf/proto" -) - -const ( - bucketDuration = time.Second * 10 - defaultServiceName = "unnamed-go-service" -) - -// use the same gamma and index offset as the Datadog backend, to avoid doing any conversions in -// the backend that would lead to a loss of precision -var sketchMapping, _ = mapping.NewLogarithmicMappingWithGamma(1.015625, 1.8761281912861705) - -type statsPoint struct { - edgeTags []string - hash uint64 - parentHash uint64 - timestamp int64 - pathwayLatency int64 - edgeLatency int64 - payloadSize int64 - serviceName string - processTags []string -} - -type statsGroup struct { - service string - edgeTags []string - processTags []string - hash uint64 - parentHash uint64 - pathwayLatency *ddsketch.DDSketch - edgeLatency *ddsketch.DDSketch - payloadSize *ddsketch.DDSketch -} - -type bucket struct { - points map[uint64]statsGroup - latestCommitOffsets map[partitionConsumerKey]int64 - latestProduceOffsets map[partitionKey]int64 - latestHighWatermarkOffsets map[partitionKey]int64 - start uint64 - duration uint64 -} - -func newBucket(start, duration uint64) bucket { - return bucket{ - points: make(map[uint64]statsGroup), - latestCommitOffsets: make(map[partitionConsumerKey]int64), - latestProduceOffsets: make(map[partitionKey]int64), - latestHighWatermarkOffsets: make(map[partitionKey]int64), - start: start, - duration: duration, - } -} - -func (b bucket) export(timestampType TimestampType) StatsBucket { - stats := make([]StatsPoint, 0, len(b.points)) - for _, s := range b.points { - pathwayLatency, err := proto.Marshal(s.pathwayLatency.ToProto()) - if err != nil { - log.Error("can't serialize pathway latency. Ignoring: %s", err.Error()) - continue - } - edgeLatency, err := proto.Marshal(s.edgeLatency.ToProto()) - if err != nil { - log.Error("can't serialize edge latency. Ignoring: %s", err.Error()) - continue - } - payloadSize, err := proto.Marshal(s.payloadSize.ToProto()) - if err != nil { - log.Error("can't serialize payload size. Ignoring: %s", err.Error()) - continue - } - stats = append(stats, StatsPoint{ - PathwayLatency: pathwayLatency, - EdgeLatency: edgeLatency, - EdgeTags: s.edgeTags, - Hash: s.hash, - ParentHash: s.parentHash, - TimestampType: timestampType, - PayloadSize: payloadSize, - }) - } - exported := StatsBucket{ - Start: b.start, - Duration: b.duration, - Stats: stats, - Backlogs: make([]Backlog, 0, len(b.latestCommitOffsets)+len(b.latestProduceOffsets)+len(b.latestHighWatermarkOffsets)), - } - for key, offset := range b.latestProduceOffsets { - exported.Backlogs = append(exported.Backlogs, Backlog{Tags: []string{fmt.Sprintf("partition:%d", key.partition), fmt.Sprintf("topic:%s", key.topic), "type:kafka_produce"}, Value: offset}) - } - for key, offset := range b.latestCommitOffsets { - exported.Backlogs = append(exported.Backlogs, Backlog{Tags: []string{fmt.Sprintf("consumer_group:%s", key.group), fmt.Sprintf("partition:%d", key.partition), fmt.Sprintf("topic:%s", key.topic), "type:kafka_commit"}, Value: offset}) - } - for key, offset := range b.latestHighWatermarkOffsets { - exported.Backlogs = append(exported.Backlogs, Backlog{Tags: []string{fmt.Sprintf("partition:%d", key.partition), fmt.Sprintf("topic:%s", key.topic), "type:kafka_high_watermark"}, Value: offset}) - } - return exported -} - -type pointType int - -const ( - pointTypeStats pointType = iota - pointTypeKafkaOffset -) - -type processorInput struct { - point statsPoint - kafkaOffset kafkaOffset - typ pointType - queuePos int64 -} - -type processorStats struct { - payloadsIn int64 - flushedPayloads int64 - flushedBuckets int64 - flushErrors int64 - dropped int64 -} - -type partitionKey struct { - partition int32 - topic string -} - -type partitionConsumerKey struct { - partition int32 - topic string - group string -} - -type offsetType int - -const ( - produceOffset offsetType = iota - commitOffset - highWatermarkOffset -) - -type kafkaOffset struct { - offset int64 - topic string - group string - partition int32 - offsetType offsetType - timestamp int64 -} - -type bucketKey struct { - serviceName string - btime int64 -} - -type Processor struct { - in *fastQueue - hashCache *hashCache - inKafka chan kafkaOffset - tsTypeCurrentBuckets map[bucketKey]bucket - tsTypeOriginBuckets map[bucketKey]bucket - wg sync.WaitGroup - stopped uint64 - stop chan struct{} // closing this channel triggers shutdown - flushRequest chan chan<- struct{} - stats processorStats - transport *httpTransport - statsd internal.StatsdClient - env string - primaryTag string - service string - version string - // used for tests - timeSource func() time.Time -} - -func (p *Processor) time() time.Time { - if p.timeSource != nil { - return p.timeSource() - } - return time.Now() -} - -func NewProcessor(statsd internal.StatsdClient, env, service, version string, agentURL *url.URL, httpClient *http.Client) *Processor { - if service == "" { - service = defaultServiceName - } - p := &Processor{ - tsTypeCurrentBuckets: make(map[bucketKey]bucket), - tsTypeOriginBuckets: make(map[bucketKey]bucket), - hashCache: newHashCache(), - in: newFastQueue(), - stopped: 1, - statsd: statsd, - env: env, - service: service, - version: version, - transport: newHTTPTransport(agentURL, httpClient), - timeSource: time.Now, - } - return p -} - -// alignTs returns the provided timestamp truncated to the bucket size. -// It gives us the start time of the time bucket in which such timestamp falls. -func alignTs(ts, bucketSize int64) int64 { return ts - ts%bucketSize } - -func (p *Processor) getBucket(btime int64, service string, buckets map[bucketKey]bucket) bucket { - k := bucketKey{serviceName: service, btime: btime} - b, ok := buckets[k] - if !ok { - b = newBucket(uint64(btime), uint64(bucketDuration.Nanoseconds())) - buckets[k] = b - } - return b -} -func (p *Processor) addToBuckets(point statsPoint, btime int64, buckets map[bucketKey]bucket) { - b := p.getBucket(btime, point.serviceName, buckets) - group, ok := b.points[point.hash] - if !ok { - group = statsGroup{ - edgeTags: point.edgeTags, - parentHash: point.parentHash, - hash: point.hash, - pathwayLatency: ddsketch.NewDDSketch(sketchMapping, store.DenseStoreConstructor(), store.DenseStoreConstructor()), - edgeLatency: ddsketch.NewDDSketch(sketchMapping, store.DenseStoreConstructor(), store.DenseStoreConstructor()), - payloadSize: ddsketch.NewDDSketch(sketchMapping, store.DenseStoreConstructor(), store.DenseStoreConstructor()), - } - b.points[point.hash] = group - } - if err := group.pathwayLatency.Add(math.Max(float64(point.pathwayLatency)/float64(time.Second), 0)); err != nil { - log.Error("failed to add pathway latency. Ignoring %v.", err.Error()) - } - if err := group.edgeLatency.Add(math.Max(float64(point.edgeLatency)/float64(time.Second), 0)); err != nil { - log.Error("failed to add edge latency. Ignoring %v.", err.Error()) - } - if err := group.payloadSize.Add(float64(point.payloadSize)); err != nil { - log.Error("failed to add payload size. Ignoring %v.", err.Error()) - } -} - -func (p *Processor) add(point statsPoint) { - currentBucketTime := alignTs(point.timestamp, bucketDuration.Nanoseconds()) - p.addToBuckets(point, currentBucketTime, p.tsTypeCurrentBuckets) - originTimestamp := point.timestamp - point.pathwayLatency - originBucketTime := alignTs(originTimestamp, bucketDuration.Nanoseconds()) - p.addToBuckets(point, originBucketTime, p.tsTypeOriginBuckets) -} - -func (p *Processor) addKafkaOffset(o kafkaOffset) { - btime := alignTs(o.timestamp, bucketDuration.Nanoseconds()) - b := p.getBucket(btime, p.service, p.tsTypeCurrentBuckets) - if o.offsetType == produceOffset { - b.latestProduceOffsets[partitionKey{ - partition: o.partition, - topic: o.topic, - }] = o.offset - return - } - if o.offsetType == highWatermarkOffset { - b.latestHighWatermarkOffsets[partitionKey{ - partition: o.partition, - topic: o.topic, - }] = o.offset - return - } - b.latestCommitOffsets[partitionConsumerKey{ - partition: o.partition, - group: o.group, - topic: o.topic, - }] = o.offset -} - -func (p *Processor) processInput(in *processorInput) { - atomic.AddInt64(&p.stats.payloadsIn, 1) - if in.typ == pointTypeStats { - p.add(in.point) - } else if in.typ == pointTypeKafkaOffset { - p.addKafkaOffset(in.kafkaOffset) - } -} - -func (p *Processor) flushInput() { - for { - in := p.in.pop() - if in == nil { - return - } - p.processInput(in) - } -} - -func (p *Processor) run(tick <-chan time.Time) { - for { - select { - case <-p.stop: - // drop in flight payloads on the input channel - p.sendToAgent(p.flush(time.Now().Add(bucketDuration * 10))) - return - case now := <-tick: - p.sendToAgent(p.flush(now)) - case done := <-p.flushRequest: - p.flushInput() - p.sendToAgent(p.flush(time.Now().Add(bucketDuration * 10))) - close(done) - default: - s := p.in.pop() - if s == nil { - time.Sleep(time.Millisecond * 10) - continue - } - p.processInput(s) - } - } -} - -func (p *Processor) Start() { - if atomic.SwapUint64(&p.stopped, 0) == 0 { - // already running - log.Warn("(*Processor).Start called more than once. This is likely a programming error.") - return - } - p.stop = make(chan struct{}) - p.flushRequest = make(chan chan<- struct{}) - p.wg.Add(1) - go func() { - defer p.wg.Done() - p.reportStats() - }() - p.wg.Add(1) - go func() { - defer p.wg.Done() - tick := time.NewTicker(bucketDuration) - defer tick.Stop() - p.run(tick.C) - }() -} - -// Flush triggers a flush and waits for it to complete. -func (p *Processor) Flush() { - if atomic.LoadUint64(&p.stopped) > 0 { - return - } - done := make(chan struct{}) - select { - case p.flushRequest <- done: - <-done - case <-p.stop: - } -} - -func (p *Processor) Stop() { - if atomic.SwapUint64(&p.stopped, 1) > 0 { - return - } - close(p.stop) - p.wg.Wait() -} - -func (p *Processor) reportStats() { - tick := time.NewTicker(time.Second * 10) - defer tick.Stop() - for { - select { - case <-p.stop: - return - case <-tick.C: - } - p.statsd.Count("datadog.datastreams.processor.payloads_in", atomic.SwapInt64(&p.stats.payloadsIn, 0), nil, 1) - p.statsd.Count("datadog.datastreams.processor.flushed_payloads", atomic.SwapInt64(&p.stats.flushedPayloads, 0), nil, 1) - p.statsd.Count("datadog.datastreams.processor.flushed_buckets", atomic.SwapInt64(&p.stats.flushedBuckets, 0), nil, 1) - p.statsd.Count("datadog.datastreams.processor.flush_errors", atomic.SwapInt64(&p.stats.flushErrors, 0), nil, 1) - p.statsd.Count("datadog.datastreams.processor.dropped_payloads", atomic.SwapInt64(&p.stats.dropped, 0), nil, 1) - } -} - -func (p *Processor) flushBucket(buckets map[bucketKey]bucket, bucketKey bucketKey, timestampType TimestampType) StatsBucket { - bucket := buckets[bucketKey] - delete(buckets, bucketKey) - return bucket.export(timestampType) -} - -func (p *Processor) flush(now time.Time) map[string]StatsPayload { - nowNano := now.UnixNano() - payloads := make(map[string]StatsPayload) - addBucket := func(service string, bucket StatsBucket) { - payload, ok := payloads[service] - if !ok { - payload = StatsPayload{ - Service: service, - Version: p.version, - Env: p.env, - Lang: "go", - TracerVersion: version.Tag, - Stats: make([]StatsBucket, 0, 1), - ProcessTags: processtags.GlobalTags().Slice(), - } - } - payload.Stats = append(payload.Stats, bucket) - payloads[service] = payload - } - for bucketKey := range p.tsTypeCurrentBuckets { - if bucketKey.btime > nowNano-bucketDuration.Nanoseconds() { - // do not flush the bucket at the current time - continue - } - addBucket(bucketKey.serviceName, p.flushBucket(p.tsTypeCurrentBuckets, bucketKey, TimestampTypeCurrent)) - } - for bucketKey := range p.tsTypeOriginBuckets { - if bucketKey.btime > nowNano-bucketDuration.Nanoseconds() { - // do not flush the bucket at the current time - continue - } - addBucket(bucketKey.serviceName, p.flushBucket(p.tsTypeOriginBuckets, bucketKey, TimestampTypeOrigin)) - } - return payloads -} - -func (p *Processor) sendToAgent(payloads map[string]StatsPayload) { - for _, payload := range payloads { - atomic.AddInt64(&p.stats.flushedPayloads, 1) - atomic.AddInt64(&p.stats.flushedBuckets, int64(len(payload.Stats))) - if err := p.transport.sendPipelineStats(&payload); err != nil { - atomic.AddInt64(&p.stats.flushErrors, 1) - } - } -} - -func (p *Processor) SetCheckpoint(ctx context.Context, edgeTags ...string) context.Context { - return p.SetCheckpointWithParams(ctx, options.CheckpointParams{}, edgeTags...) -} - -func (p *Processor) SetCheckpointWithParams(ctx context.Context, params options.CheckpointParams, edgeTags ...string) context.Context { - parent, hasParent := PathwayFromContext(ctx) - parentHash := uint64(0) - now := p.time() - pathwayStart := now - edgeStart := now - if hasParent { - pathwayStart = parent.PathwayStart() - edgeStart = parent.EdgeStart() - parentHash = parent.GetHash() - } - service := p.service - if params.ServiceOverride != "" { - service = params.ServiceOverride - } - processTags := processtags.GlobalTags().Slice() - child := Pathway{ - hash: p.hashCache.get(service, p.env, edgeTags, processTags, parentHash), - pathwayStart: pathwayStart, - edgeStart: now, - } - dropped := p.in.push(&processorInput{typ: pointTypeStats, point: statsPoint{ - serviceName: service, - edgeTags: edgeTags, - parentHash: parentHash, - hash: child.hash, - timestamp: now.UnixNano(), - pathwayLatency: now.Sub(pathwayStart).Nanoseconds(), - edgeLatency: now.Sub(edgeStart).Nanoseconds(), - payloadSize: params.PayloadSize, - }}) - if dropped { - atomic.AddInt64(&p.stats.dropped, 1) - } - return ContextWithPathway(ctx, child) -} - -func (p *Processor) TrackKafkaCommitOffset(group string, topic string, partition int32, offset int64) { - dropped := p.in.push(&processorInput{typ: pointTypeKafkaOffset, kafkaOffset: kafkaOffset{ - offset: offset, - group: group, - topic: topic, - partition: partition, - offsetType: commitOffset, - timestamp: p.time().UnixNano()}}) - if dropped { - atomic.AddInt64(&p.stats.dropped, 1) - } -} - -func (p *Processor) TrackKafkaProduceOffset(topic string, partition int32, offset int64) { - dropped := p.in.push(&processorInput{typ: pointTypeKafkaOffset, kafkaOffset: kafkaOffset{ - offset: offset, - topic: topic, - partition: partition, - offsetType: produceOffset, - timestamp: p.time().UnixNano(), - }}) - if dropped { - atomic.AddInt64(&p.stats.dropped, 1) - } -} - -// TrackKafkaHighWatermarkOffset should be used in the consumer, to track the high watermark offsets of each partition. -// The first argument is the Kafka cluster ID, and will be used later. -func (p *Processor) TrackKafkaHighWatermarkOffset(_ string, topic string, partition int32, offset int64) { - dropped := p.in.push(&processorInput{typ: pointTypeKafkaOffset, kafkaOffset: kafkaOffset{ - offset: offset, - topic: topic, - partition: partition, - offsetType: highWatermarkOffset, - timestamp: p.time().UnixNano(), - }}) - if dropped { - atomic.AddInt64(&p.stats.dropped, 1) - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/propagator.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/propagator.go deleted file mode 100644 index bd8168a08d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/propagator.go +++ /dev/null @@ -1,87 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "context" - "encoding/base64" - "encoding/binary" - "errors" - "time" - - "github.com/DataDog/sketches-go/ddsketch/encoding" -) - -type contextKey struct{} - -var activePathwayKey = contextKey{} - -const ( - // PropagationKeyBase64 is the key to use to propagate the pathway between services. - PropagationKeyBase64 = "dd-pathway-ctx-base64" -) - -// Encode encodes the pathway -func (p Pathway) Encode() []byte { - data := make([]byte, 8, 20) - binary.LittleEndian.PutUint64(data, p.hash) - encoding.EncodeVarint64(&data, p.pathwayStart.UnixNano()/int64(time.Millisecond)) - encoding.EncodeVarint64(&data, p.edgeStart.UnixNano()/int64(time.Millisecond)) - return data -} - -// Decode decodes a pathway -func Decode(ctx context.Context, data []byte) (p Pathway, outCtx context.Context, err error) { - if len(data) < 8 { - return p, ctx, errors.New("hash smaller than 8 bytes") - } - p.hash = binary.LittleEndian.Uint64(data) - data = data[8:] - pathwayStart, err := encoding.DecodeVarint64(&data) - if err != nil { - return p, ctx, err - } - edgeStart, err := encoding.DecodeVarint64(&data) - if err != nil { - return p, ctx, err - } - p.pathwayStart = time.Unix(0, pathwayStart*int64(time.Millisecond)) - p.edgeStart = time.Unix(0, edgeStart*int64(time.Millisecond)) - return p, ContextWithPathway(ctx, p), nil -} - -// EncodeBase64 encodes a pathway context into a string using base64 encoding. -func (p Pathway) EncodeBase64() string { - b := p.Encode() - return base64.StdEncoding.EncodeToString(b) -} - -// DecodeBase64 decodes a pathway context from a string using base64 encoding. -func DecodeBase64(ctx context.Context, str string) (p Pathway, outCtx context.Context, err error) { - data, err := base64.StdEncoding.DecodeString(str) - if err != nil { - return p, ctx, err - } - return Decode(ctx, data) -} - -// ContextWithPathway returns a copy of the given context which includes the pathway p. -func ContextWithPathway(ctx context.Context, p Pathway) context.Context { - return context.WithValue(ctx, activePathwayKey, p) -} - -// PathwayFromContext returns the pathway contained in the given context, and whether a -// pathway is found in ctx. -func PathwayFromContext(ctx context.Context) (p Pathway, ok bool) { - if ctx == nil { - return p, false - } - v := ctx.Value(activePathwayKey) - if p, ok := v.(Pathway); ok { - return p, true - } - return p, false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/transport.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/transport.go deleted file mode 100644 index d03bb3e797..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/datastreams/transport.go +++ /dev/null @@ -1,90 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package datastreams - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" - "net/http" - "net/url" - "runtime" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal" - - "github.com/tinylib/msgp/msgp" -) - -type httpTransport struct { - url string // the delivery URL for stats - client *http.Client // the HTTP client used in the POST - headers map[string]string // the Transport headers -} - -func newHTTPTransport(agentURL *url.URL, client *http.Client) *httpTransport { - // initialize the default EncoderPool with Encoder headers - defaultHeaders := map[string]string{ - "Datadog-Meta-Lang": "go", - "Datadog-Meta-Lang-Version": strings.TrimPrefix(runtime.Version(), "go"), - "Datadog-Meta-Lang-Interpreter": runtime.Compiler + "-" + runtime.GOARCH + "-" + runtime.GOOS, - "Content-Type": "application/msgpack", - "Content-Encoding": "gzip", - } - if cid := internal.ContainerID(); cid != "" { - defaultHeaders["Datadog-Container-ID"] = cid - } - if entityID := internal.ContainerID(); entityID != "" { - defaultHeaders["Datadog-Entity-ID"] = entityID - } - url := fmt.Sprintf("%s/v0.1/pipeline_stats", agentURL.String()) - return &httpTransport{ - url: url, - client: client, - headers: defaultHeaders, - } -} - -func (t *httpTransport) sendPipelineStats(p *StatsPayload) error { - var buf bytes.Buffer - gzipWriter, err := gzip.NewWriterLevel(&buf, gzip.BestSpeed) - if err != nil { - return err - } - if err := msgp.Encode(gzipWriter, p); err != nil { - return err - } - err = gzipWriter.Close() - if err != nil { - return err - } - req, err := http.NewRequest("POST", t.url, &buf) - if err != nil { - return err - } - for header, value := range t.headers { - req.Header.Set(header, value) - } - resp, err := t.client.Do(req) - if err != nil { - return err - } - defer resp.Body.Close() - defer io.Copy(io.Discard, req.Body) - if code := resp.StatusCode; code >= 400 { - // error, check the body for context information and - // return a nice error. - txt := http.StatusText(code) - msg := make([]byte, 100) - n, _ := resp.Body.Read(msg) - if n > 0 { - return fmt.Errorf("%s (Status: %s)", msg[:n], txt) - } - return fmt.Errorf("%s", txt) - } - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/env.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/env.go deleted file mode 100644 index 3e7389b572..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/env.go +++ /dev/null @@ -1,140 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package internal - -import ( - "net" - "os" - "strconv" - "strings" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// BoolEnv returns the parsed boolean value of an environment variable, or -// def otherwise. -func BoolEnv(key string, def bool) bool { - vv, ok := os.LookupEnv(key) - if !ok { - return def - } - v, err := strconv.ParseBool(vv) - if err != nil { - log.Warn("Non-boolean value for env var %s, defaulting to %t. Parse failed with error: %v", key, def, err.Error()) - return def - } - return v -} - -// IntEnv returns the parsed int value of an environment variable, or -// def otherwise. -func IntEnv(key string, def int) int { - vv, ok := os.LookupEnv(key) - if !ok { - return def - } - v, err := strconv.Atoi(vv) - if err != nil { - log.Warn("Non-integer value for env var %s, defaulting to %d. Parse failed with error: %v", key, def, err.Error()) - return def - } - return v -} - -// DurationEnv returns the parsed duration value of an environment variable, or -// def otherwise. -func DurationEnv(key string, def time.Duration) time.Duration { - vv, ok := os.LookupEnv(key) - if !ok { - return def - } - v, err := time.ParseDuration(vv) - if err != nil { - log.Warn("Non-duration value for env var %s, defaulting to %d. Parse failed with error: %v", key, def, err.Error()) - return def - } - return v -} - -// IPEnv returns the valid IP value of an environment variable, or def otherwise. -func IPEnv(key string, def net.IP) net.IP { - vv, ok := os.LookupEnv(key) - if !ok { - return def - } - - ip := net.ParseIP(vv) - if ip == nil { - log.Warn("Non-IP value for env var %s, defaulting to %s", key, def.String()) - return def - } - - return ip -} - -// ForEachStringTag runs fn on every key val pair encountered in str. -// str may contain multiple key val pairs separated by either space -// or comma (but not a mixture of both), and each key val pair is separated by a delimiter. -func ForEachStringTag(str string, delimiter string, fn func(key string, val string)) { - sep := " " - if strings.Index(str, ",") > -1 { - // falling back to comma as separator - sep = "," - } - for _, tag := range strings.Split(str, sep) { - tag = strings.TrimSpace(tag) - if tag == "" { - continue - } - kv := strings.SplitN(tag, delimiter, 2) - key := strings.TrimSpace(kv[0]) - if key == "" { - continue - } - var val string - if len(kv) == 2 { - val = strings.TrimSpace(kv[1]) - } - fn(key, val) - } -} - -// ParseTagString returns tags parsed from string as map -func ParseTagString(str string) map[string]string { - res := make(map[string]string) - ForEachStringTag(str, DDTagsDelimiter, func(key, val string) { res[key] = val }) - return res -} - -// FloatEnv returns the parsed float64 value of an environment variable, -// or def otherwise. -func FloatEnv(key string, def float64) float64 { - env, ok := os.LookupEnv(key) - if !ok { - return def - } - v, err := strconv.ParseFloat(env, 64) - if err != nil { - log.Warn("Non-float value for env var %s, defaulting to %f. Parse failed with error: %v", key, def, err.Error()) - return def - } - return v -} - -// BoolVal returns the parsed boolean value of string val, or def if not parseable -func BoolVal(val string, def bool) bool { - v, err := strconv.ParseBool(val) - if err != nil { - return def - } - return v -} - -// ExternalEnvironment returns the value of the DD_EXTERNAL_ENV environment variable. -func ExternalEnvironment() string { - return os.Getenv("DD_EXTERNAL_ENV") -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/gitmetadata.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/gitmetadata.go deleted file mode 100644 index e9ba03ea29..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/gitmetadata.go +++ /dev/null @@ -1,164 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package internal - -import ( - "net/url" - "os" - "runtime/debug" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -const ( - // EnvGitMetadataEnabledFlag specifies the environment variable name for enable/disable - EnvGitMetadataEnabledFlag = "DD_TRACE_GIT_METADATA_ENABLED" - // EnvGitRepositoryURL specifies the environment variable name for git repository URL - EnvGitRepositoryURL = "DD_GIT_REPOSITORY_URL" - // EnvGitCommitSha specifies the environment variable name git commit sha - EnvGitCommitSha = "DD_GIT_COMMIT_SHA" - // EnvDDTags specifies the environment variable name global tags - EnvDDTags = "DD_TAGS" - - // TagRepositoryURL specifies the tag name for git repository URL - TagRepositoryURL = "git.repository_url" - // TagCommitSha specifies the tag name for git commit sha - TagCommitSha = "git.commit.sha" - // TagGoPath specifies the tag name for go module path - TagGoPath = "go_path" - - // TraceTagRepositoryURL specifies the trace tag name for git repository URL - TraceTagRepositoryURL = "_dd.git.repository_url" - // TraceTagCommitSha specifies the trace tag name for git commit sha - TraceTagCommitSha = "_dd.git.commit.sha" - // TraceTagGoPath specifies the trace tag name for go module path - TraceTagGoPath = "_dd.go_path" -) - -var ( - initOnce sync.Once - gitMetadataTags map[string]string -) - -func updateTags(tags map[string]string, key string, value string) { - if _, ok := tags[key]; !ok && value != "" { - tags[key] = value - } -} - -func updateAllTags(tags map[string]string, newtags map[string]string) { - for k, v := range newtags { - updateTags(tags, k, v) - } -} - -// Get git metadata from environment variables -func getTagsFromEnv() map[string]string { - return map[string]string{ - TagRepositoryURL: removeCredentials(os.Getenv(EnvGitRepositoryURL)), - TagCommitSha: os.Getenv(EnvGitCommitSha), - } -} - -// Get git metadata from DD_TAGS -func getTagsFromDDTags() map[string]string { - etags := ParseTagString(os.Getenv(EnvDDTags)) - - return map[string]string{ - TagRepositoryURL: removeCredentials(etags[TagRepositoryURL]), - TagCommitSha: etags[TagCommitSha], - TagGoPath: etags[TagGoPath], - } -} - -// getTagsFromBinary extracts git metadata from binary metadata. -func getTagsFromBinary(readBuildInfo func() (*debug.BuildInfo, bool)) map[string]string { - res := make(map[string]string) - info, ok := readBuildInfo() - if !ok { - log.Debug("ReadBuildInfo failed, skip source code metadata extracting") - return res - } - goPath := info.Path - var vcs, commitSha string - for _, s := range info.Settings { - if s.Key == "vcs" { - vcs = s.Value - } else if s.Key == "vcs.revision" { - commitSha = s.Value - } - } - if vcs != "git" { - log.Debug("Unknown VCS: '%s', skip source code metadata extracting", vcs) - return res - } - res[TagCommitSha] = commitSha - res[TagGoPath] = goPath - return res -} - -// GetGitMetadataTags returns git metadata tags. Returned map is read-only -func GetGitMetadataTags() map[string]string { - initOnce.Do(initGitMetadataTags) - return gitMetadataTags -} - -func initGitMetadataTags() { - gitMetadataTags = make(map[string]string) - - if BoolEnv(EnvGitMetadataEnabledFlag, true) { - updateAllTags(gitMetadataTags, getTagsFromEnv()) - updateAllTags(gitMetadataTags, getTagsFromDDTags()) - updateAllTags(gitMetadataTags, getTagsFromBinary(debug.ReadBuildInfo)) - } -} - -// RefreshGitMetadataTags reset cached metadata tags. NOT thread-safe, use for testing only -func RefreshGitMetadataTags() { - initGitMetadataTags() -} - -// CleanGitMetadataTags cleans up tags from git metadata -func CleanGitMetadataTags(tags map[string]string) { - delete(tags, TagRepositoryURL) - delete(tags, TagCommitSha) - delete(tags, TagGoPath) -} - -// GetTracerGitMetadataTags returns git metadata tags for tracer -// NB: Currently tracer inject tags with some workaround -// (only with _dd prefix and only for the first span in payload) -// So we provide different tag names -func GetTracerGitMetadataTags() map[string]string { - res := make(map[string]string) - tags := GetGitMetadataTags() - - updateTags(res, TraceTagRepositoryURL, tags[TagRepositoryURL]) - updateTags(res, TraceTagCommitSha, tags[TagCommitSha]) - updateTags(res, TraceTagGoPath, tags[TagGoPath]) - - return res -} - -// removeCredentials returns the passed url with potential credentials removed. -// If the input string is not a valid URL, the string is returned as is. -func removeCredentials(urlStr string) string { - if urlStr == "" { - return urlStr - } - u, err := url.Parse(urlStr) - if err != nil { - // not an url, nothing to remove - return urlStr - } - if u.User == nil { - // nothing to remove - return urlStr - } - u.User = nil - return u.String() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/globalconfig/globalconfig.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/globalconfig/globalconfig.go deleted file mode 100644 index 235b5ddb13..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/globalconfig/globalconfig.go +++ /dev/null @@ -1,148 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package globalconfig stores configuration which applies globally to both the tracer -// and integrations. -package globalconfig - -import ( - "math" - "os" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal" - - "github.com/google/uuid" -) - -var cfg = &config{ - analyticsRate: math.NaN(), - runtimeID: uuid.New().String(), - headersAsTags: internal.NewLockMap(map[string]string{}), -} - -type config struct { - mu sync.RWMutex - analyticsRate float64 - serviceName string - runtimeID string - headersAsTags *internal.LockMap - dogstatsdAddr string - statsTags []string -} - -// AnalyticsRate returns the sampling rate at which events should be marked. It uses -// synchronizing mechanisms, meaning that for optimal performance it's best to read it -// once and store it. -func AnalyticsRate() float64 { - cfg.mu.RLock() - defer cfg.mu.RUnlock() - return cfg.analyticsRate -} - -// SetAnalyticsRate sets the given event sampling rate globally. -func SetAnalyticsRate(rate float64) { - cfg.mu.Lock() - defer cfg.mu.Unlock() - cfg.analyticsRate = rate -} - -// ServiceName returns the default service name used by non-client integrations such as servers and frameworks. -func ServiceName() string { - cfg.mu.RLock() - defer cfg.mu.RUnlock() - return cfg.serviceName -} - -// SetServiceName sets the global service name set for this application. -func SetServiceName(name string) { - cfg.mu.Lock() - defer cfg.mu.Unlock() - cfg.serviceName = name -} - -// DogstatsdAddr returns the destination for tracer and contrib statsd clients -func DogstatsdAddr() string { - cfg.mu.RLock() - defer cfg.mu.RUnlock() - return cfg.dogstatsdAddr -} - -// SetDogstatsdAddr sets the destination for statsd clients to be used by tracer and contrib packages -func SetDogstatsdAddr(addr string) { - cfg.mu.Lock() - defer cfg.mu.Unlock() - cfg.dogstatsdAddr = addr -} - -// StatsTags returns a list of tags that apply to statsd payloads for both tracer and contribs -func StatsTags() []string { - cfg.mu.RLock() - defer cfg.mu.RUnlock() - // Copy the slice before returning it, so that callers cannot pollute the underlying array - tags := make([]string, len(cfg.statsTags)) - copy(tags, cfg.statsTags) - return tags -} - -// SetStatsTags configures the list of tags that should be applied to contribs' statsd.Client as global tags -// It should only be called by the tracer package -func SetStatsTags(tags []string) { - cfg.mu.Lock() - defer cfg.mu.Unlock() - // Copy the slice before setting it, so that any changes to the slice provided to SetStatsTags does not pollute the underlying array of statsTags - statsTags := make([]string, len(tags)) - copy(statsTags, tags) - cfg.statsTags = statsTags -} - -// RuntimeID returns this process's unique runtime id. -func RuntimeID() string { - cfg.mu.RLock() - defer cfg.mu.RUnlock() - return cfg.runtimeID -} - -// HeaderTagMap returns the mappings of headers to their tag values -func HeaderTagMap() *internal.LockMap { - return cfg.headersAsTags -} - -// HeaderTag returns the configured tag for a given header. -// This function exists for testing purposes, for performance you may want to use `HeaderTagMap` -func HeaderTag(header string) string { - return cfg.headersAsTags.Get(header) -} - -// SetHeaderTag adds config for header `from` with tag value `to` -func SetHeaderTag(from, to string) { - cfg.headersAsTags.Set(from, to) -} - -// HeaderTagsLen returns the length of globalconfig's headersAsTags map, 0 for empty map -func HeaderTagsLen() int { - return cfg.headersAsTags.Len() -} - -// ClearHeaderTags assigns headersAsTags to a new, empty map -// It is invoked when WithHeaderTags is called, in order to overwrite the config -func ClearHeaderTags() { - cfg.headersAsTags.Clear() -} - -// InstrumentationInstallID returns the install ID as described in DD_INSTRUMENTATION_INSTALL_ID -func InstrumentationInstallID() string { - return os.Getenv("DD_INSTRUMENTATION_INSTALL_ID") -} - -// InstrumentationInstallType returns the install type as described in DD_INSTRUMENTATION_INSTALL_TYPE -func InstrumentationInstallType() string { - return os.Getenv("DD_INSTRUMENTATION_INSTALL_TYPE") -} - -// InstrumentationInstallTime returns the install time as described in DD_INSTRUMENTATION_INSTALL_TIME -func InstrumentationInstallTime() string { - return os.Getenv("DD_INSTRUMENTATION_INSTALL_TIME") -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/azure/azure.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/azure/azure.go deleted file mode 100644 index 953608e6d2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/azure/azure.go +++ /dev/null @@ -1,63 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package azure - -import ( - "context" - "encoding/json" - "fmt" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/validate" -) - -// declare these as vars not const to ease testing -var ( - metadataURL = "http://169.254.169.254" - timeout = 300 * time.Millisecond - - // CloudProviderName contains the inventory name of for Azure - CloudProviderName = "Azure" -) - -func getResponse(ctx context.Context, url string) (string, error) { - return httputils.Get(ctx, url, map[string]string{"Metadata": "true"}, timeout) -} - -// GetHostname returns hostname based on Azure instance metadata. -func GetHostname(ctx context.Context) (string, error) { - metadataJSON, err := instanceMetaFetcher.Fetch(ctx) - if err != nil { - return "", err - } - - var metadata struct { - VMID string - } - if err := json.Unmarshal([]byte(metadataJSON), &metadata); err != nil { - return "", fmt.Errorf("failed to parse Azure instance metadata: %s", err.Error()) - } - - if err := validate.ValidHostname(metadata.VMID); err != nil { - return "", err - } - - return metadata.VMID, nil -} - -var instanceMetaFetcher = cachedfetch.Fetcher{ - Name: "Azure Instance Metadata", - Attempt: func(ctx context.Context) (string, error) { - metadataJSON, err := getResponse(ctx, - metadataURL+"/metadata/instance/compute?api-version=2017-08-01") - if err != nil { - return "", fmt.Errorf("failed to get Azure instance metadata: %s", err.Error()) - } - return metadataJSON, nil - }, -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch/fetcher.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch/fetcher.go deleted file mode 100644 index 2cff43caaa..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch/fetcher.go +++ /dev/null @@ -1,86 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// This file is pulled from datadog-agent/pkg/util/cachedfetch changing the logger and using strings only - -// Package cachedfetch provides a read-through cache for fetched values. -package cachedfetch - -import ( - "context" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// Fetcher supports fetching a value, such as from a cloud service API. An -// attempt is made to fetch the value on each call to Fetch, but if that -// attempt fails then a cached value from the last successful attempt is -// returned, if such a value exists. This helps the agent to "ride out" -// temporary failures in cloud APIs while still fetching fresh data when those -// APIs are functioning properly. Cached values do not expire. -// -// Callers should instantiate one fetcher per piece of data required. -type Fetcher struct { - // function that attempts to fetch the value - Attempt func(context.Context) (string, error) - - // the name of the thing being fetched, used in the default log message. At - // least one of Name and LogFailure must be non-nil. - Name string - - // function to log a fetch failure, given the error and the last successful - // value. This function is not called if there is no last successful value. - // If left at its zero state, a default log message will be generated, using - // Name. - LogFailure func(error, interface{}) - - // previous successfully fetched value - lastValue interface{} - - // mutex to protect access to lastValue - sync.Mutex -} - -// Fetch attempts to fetch the value, returning the result or the last successful -// value, or an error if no attempt has ever been successful. No special handling -// is included for the Context: both context.Cancelled and context.DeadlineExceeded -// are handled like any other error by returning the cached value. -// -// This can be called from multiple goroutines, in which case it will call Attempt -// concurrently. -func (f *Fetcher) Fetch(ctx context.Context) (string, error) { - value, err := f.Attempt(ctx) - if err == nil { - f.Lock() - f.lastValue = value - f.Unlock() - return value, nil - } - - f.Lock() - lastValue := f.lastValue - f.Unlock() - - if lastValue == nil { - // attempt was never successful - return value, err - } - - if f.LogFailure == nil { - log.Debug("Unable to get %s; returning cached value instead", f.Name) - } else { - f.LogFailure(err, lastValue) - } - - return lastValue.(string), nil -} - -// Reset resets the cached value (used for testing) -func (f *Fetcher) Reset() { - f.Lock() - f.lastValue = nil - f.Unlock() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2/ec2.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2/ec2.go deleted file mode 100644 index a1087cab4a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2/ec2.go +++ /dev/null @@ -1,72 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package ec2 - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils" -) - -// declare these as vars not const to ease testing -var ( - metadataURL = "http://169.254.169.254/latest/meta-data" - defaultPrefixes = []string{"ip-", "domu", "ec2amaz-"} - - MaxHostnameSize = 255 -) - -var instanceIDFetcher = cachedfetch.Fetcher{ - Name: "EC2 InstanceID", - Attempt: func(ctx context.Context) (string, error) { - return getMetadataItemWithMaxLength(ctx, - "/instance-id", - MaxHostnameSize, - ) - }, -} - -// GetInstanceID fetches the instance id for current host from the EC2 metadata API -func GetInstanceID(ctx context.Context) (string, error) { - return instanceIDFetcher.Fetch(ctx) -} - -func getMetadataItemWithMaxLength(ctx context.Context, endpoint string, maxLength int) (string, error) { - result, err := getMetadataItem(ctx, endpoint) - if err != nil { - return result, err - } - if len(result) > maxLength { - return "", fmt.Errorf("%v gave a response with length > to %v", endpoint, maxLength) - } - return result, err -} - -func getMetadataItem(ctx context.Context, endpoint string) (string, error) { - return doHTTPRequest(ctx, metadataURL+endpoint) -} - -func doHTTPRequest(ctx context.Context, url string) (string, error) { - headers := map[string]string{} - // Note: This assumes IMDS v1. IMDS v2 won't work in a containerized app and requires an API Token - // Users who have disabled IMDS v1 in favor of v2 will get a fallback hostname from a different provider (likely OS). - return httputils.Get(ctx, url, headers, 300*time.Millisecond) -} - -// IsDefaultHostname checks if a hostname is an EC2 default -func IsDefaultHostname(hostname string) bool { - hostname = strings.ToLower(hostname) - isDefault := false - - for _, val := range defaultPrefixes { - isDefault = isDefault || strings.HasPrefix(hostname, val) - } - return isDefault -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs/aws.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs/aws.go deleted file mode 100644 index 6b4f5f0284..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs/aws.go +++ /dev/null @@ -1,54 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package ecs - -import ( - "context" - "encoding/json" - "fmt" - "os" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils" -) - -// declare these as vars not const to ease testing -var ( - metadataURL = os.Getenv("ECS_CONTAINER_METADATA_URI_V4") - timeout = 300 * time.Millisecond -) - -var taskFetcher = cachedfetch.Fetcher{ - Name: "ECS LaunchType", - Attempt: func(ctx context.Context) (string, error) { - taskJSON, err := getResponse(ctx, metadataURL+"/task") - if err != nil { - return "", fmt.Errorf("failed to get ECS task metadata: %s", err.Error()) - } - return taskJSON, nil - }, -} - -func getResponse(ctx context.Context, url string) (string, error) { - return httputils.Get(ctx, url, map[string]string{}, timeout) -} - -// GetLaunchType gets the launch-type based on the ECS Task metadata endpoint -func GetLaunchType(ctx context.Context) (string, error) { - taskJSON, err := taskFetcher.Fetch(ctx) - if err != nil { - return "", err - } - - var metadata struct { - LaunchType string - } - if err := json.Unmarshal([]byte(taskJSON), &metadata); err != nil { - return "", fmt.Errorf("failed to parse ecs task metadata: %s", err.Error()) - } - return metadata.LaunchType, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_nix.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_nix.go deleted file mode 100644 index 336b809478..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_nix.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// This file is exactly pulled from datadog-agent/pkg/util/hostname - -//go:build !windows -// +build !windows - -package hostname - -import ( - "context" - "os/exec" - "strings" - "time" -) - -func getSystemFQDN() (string, error) { - ctx, cancel := context.WithTimeout(context.Background(), time.Second*1) - defer cancel() - - cmd := exec.CommandContext(ctx, "/bin/hostname", "-f") - - out, err := cmd.Output() - return strings.TrimSpace(string(out)), err -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_windows.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_windows.go deleted file mode 100644 index e76da716d5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/fqdn_windows.go +++ /dev/null @@ -1,14 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package hostname - -import ( - "fmt" -) - -func getSystemFQDN() (string, error) { - return "", fmt.Errorf("SystemFQDN provider not implemented for windows") -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/gce/gce.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/gce/gce.go deleted file mode 100644 index 53036c19d6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/gce/gce.go +++ /dev/null @@ -1,120 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package gce - -import ( - "context" - "fmt" - "strings" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils" -) - -// declare these as vars not const to ease testing -var ( - metadataURL = "http://169.254.169.254/computeMetadata/v1" -) - -var hostnameFetcher = cachedfetch.Fetcher{ - Name: "GCP Hostname", - Attempt: func(ctx context.Context) (string, error) { - hostname, err := getResponseWithMaxLength(ctx, metadataURL+"/instance/hostname", - 255) - if err != nil { - return "", fmt.Errorf("unable to retrieve hostname from GCE: %s", err.Error()) - } - return hostname, nil - }, -} - -var projectIDFetcher = cachedfetch.Fetcher{ - Name: "GCP Project ID", - Attempt: func(ctx context.Context) (string, error) { - projectID, err := getResponseWithMaxLength(ctx, - metadataURL+"/project/project-id", - 255) - if err != nil { - return "", fmt.Errorf("unable to retrieve project ID from GCE: %s", err.Error()) - } - return projectID, err - }, -} - -var nameFetcher = cachedfetch.Fetcher{ - Name: "GCP Instance Name", - Attempt: func(ctx context.Context) (string, error) { - return getResponseWithMaxLength(ctx, - metadataURL+"/instance/name", - 255) - }, -} - -// GetCanonicalHostname returns the DD canonical hostname (prefer: ., otherwise ) -func GetCanonicalHostname(ctx context.Context) (string, error) { - hostname, err := GetHostname(ctx) - if err != nil { - return "", err - } - - instanceAlias, err := getInstanceAlias(ctx, hostname) - if err != nil { - return hostname, nil - } - return instanceAlias, nil -} - -func getInstanceAlias(ctx context.Context, hostname string) (string, error) { - instanceName, err := nameFetcher.Fetch(ctx) - if err != nil { - // If the endpoint is not reachable, fallback on the old way to get the alias. - // For instance, it happens in GKE, where the metadata server is only a subset - // of the Compute Engine metadata server. - // See https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity#gke_mds - if hostname == "" { - return "", fmt.Errorf("unable to retrieve instance name and hostname from GCE: %s", err.Error()) - } - instanceName = strings.SplitN(hostname, ".", 2)[0] - } - - projectID, err := projectIDFetcher.Fetch(ctx) - if err != nil { - return "", err - } - - return fmt.Sprintf("%s.%s", instanceName, projectID), nil -} - -// GetHostname returns the hostname querying GCE Metadata api -func GetHostname(ctx context.Context) (string, error) { - return hostnameFetcher.Fetch(ctx) -} - -func getResponseWithMaxLength(ctx context.Context, endpoint string, maxLength int) (string, error) { - result, err := getResponse(ctx, endpoint) - if err != nil { - return result, err - } - if len(result) > maxLength { - return "", fmt.Errorf("%v gave a response with length > to %v", endpoint, maxLength) - } - return result, err -} - -func getResponse(ctx context.Context, url string) (string, error) { - res, err := httputils.Get(ctx, url, map[string]string{"Metadata-Flavor": "Google"}, 1000*time.Millisecond) - if err != nil { - return "", fmt.Errorf("GCE metadata API error: %s", err.Error()) - } - - // Some cloud platforms will respond with an empty body, causing the agent to assume a faulty hostname - if len(res) <= 0 { - return "", fmt.Errorf("empty response body") - } - - return res, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils/helpers.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils/helpers.go deleted file mode 100644 index 861acc356c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils/helpers.go +++ /dev/null @@ -1,74 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -// This file is pulled from datadog-agent/pkg/util/http (Only removing agent SSL config and unused funcs) - -package httputils - -import ( - "context" - "fmt" - "io" - "net" - "net/http" - "time" -) - -func createTransport() *http.Transport { - return &http.Transport{ - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - // Enables TCP keep-alives to detect broken connections - KeepAlive: 30 * time.Second, - // Disable RFC 6555 Fast Fallback ("Happy Eyeballs") - FallbackDelay: -1 * time.Nanosecond, - }).DialContext, - MaxIdleConns: 100, - MaxIdleConnsPerHost: 5, - // This parameter is set to avoid connections sitting idle in the pool indefinitely - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - Proxy: http.ProxyFromEnvironment, - } -} - -// Get is a high level helper to query a URL and return its body as a string -func Get(ctx context.Context, URL string, headers map[string]string, timeout time.Duration) (string, error) { - client := http.Client{ - Transport: createTransport(), - Timeout: timeout, - } - - req, err := http.NewRequestWithContext(ctx, http.MethodGet, URL, nil) - if err != nil { - return "", err - } - - for header, value := range headers { - req.Header.Add(header, value) - } - - res, err := client.Do(req) - if err != nil { - return "", err - } - - return parseResponse(res, "GET", URL) -} - -func parseResponse(res *http.Response, method string, URL string) (string, error) { - if res.StatusCode != 200 { - return "", fmt.Errorf("status code %d trying to %s %s", res.StatusCode, method, URL) - } - - defer res.Body.Close() - all, err := io.ReadAll(res.Body) - if err != nil { - return "", fmt.Errorf("error while reading response from %s: %s", URL, err) - } - - return string(all), nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/providers.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/providers.go deleted file mode 100644 index b53d71a8f3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/providers.go +++ /dev/null @@ -1,245 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package hostname - -import ( - "context" - "fmt" - "os" - "sync" - "sync/atomic" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/hostname/azure" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/gce" - "github.com/DataDog/dd-trace-go/v2/internal/hostname/validate" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// For testing purposes -var ( - fargatePf = fargate -) - -var ( - cachedHostname string - cachedAt time.Time - cachedProvider string - cacheExpiration = 5 * time.Minute - m sync.RWMutex - isRefreshing atomic.Value -) - -const fargateName = "fargate" - -func init() { - isRefreshing.Store(false) -} - -// getCached returns the cached hostname, cached provider and a bool indicating if the hostname has expired -func getCached(now time.Time) (string, string, bool) { - m.RLock() - defer m.RUnlock() - if now.Sub(cachedAt) > cacheExpiration { - return cachedHostname, cachedProvider, true - } - return cachedHostname, cachedProvider, false -} - -// setCached caches the newHostname -func setCached(now time.Time, newHostname string, newProvider string) { - m.Lock() - defer m.Unlock() - cachedHostname = newHostname - cachedAt = now - cachedProvider = newProvider -} - -type provider struct { - name string - // Should we stop going down the list of providers if this one is successful - stopIfSuccessful bool - pf providerFetch -} - -type providerFetch func(ctx context.Context, currentHostname string) (string, error) - -var providerCatalog = []provider{ - { - name: "configuration", - stopIfSuccessful: true, - pf: fromConfig, - }, - { - name: fargateName, - stopIfSuccessful: true, - pf: fromFargate, - }, - { - name: "gce", - stopIfSuccessful: true, - pf: fromGce, - }, - { - name: "azure", - stopIfSuccessful: true, - pf: fromAzure, - }, - // The following providers are coupled. Their behavior changes depending on the result of the previous provider. - // Therefore, 'stopIfSuccessful' is set to false. - { - name: "fqdn", - stopIfSuccessful: false, - pf: fromFQDN, - }, - { - name: "container", - stopIfSuccessful: false, - pf: fromContainer, - }, - { - name: "os", - stopIfSuccessful: false, - pf: fromOS, - }, - { - name: "aws", - stopIfSuccessful: false, - pf: fromEC2, - }, -} - -// Get returns the cached hostname for the tracer, empty if we haven't found one yet. -// Spawning a go routine to update the hostname if it is empty or out of date -func Get() string { - now := time.Now() - var ( - ch string - expired bool - pv string - ) - // if provider is fargate never refresh - // Otherwise, refresh on expiration or if hostname hasn't been found. - if ch, pv, expired = getCached(now); pv == fargateName || (!expired && ch != "") { - return ch - } - // Use CAS to avoid spawning more than one go-routine trying to update the cached hostname - ir := isRefreshing.CompareAndSwap(false, true) - if ir { - // TODO: One optimization we could do here is hook into the tracer shutdown signal to gracefully disconnect here - // For now, we think the added complexity isn't worth it for this single go routine that only runs every 5 minutes. - go func() { - updateHostname(now) - }() - } - return ch -} - -func updateHostname(now time.Time) { - defer isRefreshing.Store(false) - ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) - defer cancel() - var hostname string - var hnProvider string - - for _, p := range providerCatalog { - detectedHostname, err := p.pf(ctx, hostname) - if err != nil { - log.Debug("Unable to get hostname from provider %q: %v", p.name, err.Error()) - continue - } - hostname = detectedHostname - hnProvider = p.name - log.Debug("Found hostname %s, from provider %s", hostname, p.name) - if p.stopIfSuccessful { - log.Debug("Hostname detection stopping early") - setCached(now, hostname, p.name) - return - } - } - if hostname != "" { - log.Debug("Winning hostname %s from provider %s", hostname, hnProvider) - setCached(now, hostname, hnProvider) - } else { - log.Debug("Unable to reliably determine hostname. You can define one via env var DD_HOSTNAME") - } -} - -func fromConfig(_ context.Context, _ string) (string, error) { - hn := os.Getenv("DD_HOSTNAME") - err := validate.ValidHostname(hn) - if err != nil { - return "", err - } - return hn, nil -} - -func fromFargate(ctx context.Context, _ string) (string, error) { - return fargatePf(ctx) -} - -func fargate(ctx context.Context) (string, error) { - if _, ok := os.LookupEnv("ECS_CONTAINER_METADATA_URI_V4"); !ok { - return "", fmt.Errorf("not running in fargate") - } - launchType, err := ecs.GetLaunchType(ctx) - if err != nil { - return "", err - } - if launchType == "FARGATE" { - // If we're running on fargate we strip the hostname - return "", nil - } - return "", fmt.Errorf("not running in fargate") -} - -func fromGce(ctx context.Context, _ string) (string, error) { - return gce.GetCanonicalHostname(ctx) -} - -func fromAzure(ctx context.Context, _ string) (string, error) { - return azure.GetHostname(ctx) -} - -func fromFQDN(_ context.Context, _ string) (string, error) { - //TODO: test this on windows - fqdn, err := getSystemFQDN() - if err != nil { - return "", fmt.Errorf("unable to get FQDN from system: %s", err.Error()) - } - return fqdn, nil -} - -func fromOS(_ context.Context, currentHostname string) (string, error) { - if currentHostname == "" { - return os.Hostname() - } - return "", fmt.Errorf("skipping OS hostname as a previous provider found a valid hostname") -} - -func fromContainer(_ context.Context, _ string) (string, error) { - // This provider is not implemented as most customers do not provide access to kube-api server, kubelet, or docker socket - // on their application containers. Providing this access is almost always a not-good idea and could be burdensome for customers. - return "", fmt.Errorf("container hostname detection not implemented") -} - -func fromEC2(ctx context.Context, currentHostname string) (string, error) { - if ec2.IsDefaultHostname(currentHostname) { - // If the current hostname is a default one we try to get the instance id - instanceID, err := ec2.GetInstanceID(ctx) - if err != nil { - return "", fmt.Errorf("unable to determine hostname from EC2: %s", err.Error()) - } - err = validate.ValidHostname(instanceID) - if err != nil { - return "", fmt.Errorf("EC2 instance id is not a valid hostname: %s", err.Error()) - } - return instanceID, nil - } - return "", fmt.Errorf("not retrieving hostname from AWS: the host is not an ECS instance and other providers already retrieve non-default hostnames") -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/validate/validate.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/validate/validate.go deleted file mode 100644 index 67527a0854..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/hostname/validate/validate.go +++ /dev/null @@ -1,57 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// This file is exactly pulled from datadog-agent/pkg/util/hostname/validate only changing the logger - -// Package validate provides hostname validation helpers -package validate - -import ( - "fmt" - "regexp" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -const maxLength = 255 - -var ( - validHostnameRfc1123 = regexp.MustCompile(`^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$`) - localhostIdentifiers = []string{ - "localhost", - "localhost.localdomain", - "localhost6.localdomain6", - "ip6-localhost", - } -) - -// ValidHostname determines whether the passed string is a valid hostname. -// In case it's not, the returned error contains the details of the failure. -func ValidHostname(hostname string) error { - if hostname == "" { - return fmt.Errorf("hostname is empty") - } else if isLocal(hostname) { - return fmt.Errorf("%s is a local hostname", hostname) - } else if len(hostname) > maxLength { - log.Error("ValidHostname: name exceeded the maximum length of %d characters", maxLength) - return fmt.Errorf("name exceeded the maximum length of %d characters", maxLength) - } else if !validHostnameRfc1123.MatchString(hostname) { - log.Error("ValidHostname: %s is not RFC1123 compliant", hostname) - return fmt.Errorf("%s is not RFC1123 compliant", hostname) - } - return nil -} - -// check whether the name is in the list of local hostnames -func isLocal(name string) bool { - name = strings.ToLower(name) - for _, val := range localhostIdentifiers { - if val == name { - return true - } - } - return false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfile.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfile.go deleted file mode 100644 index e1bad3bf9b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfile.go +++ /dev/null @@ -1,12 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -//go:build !linux - -package internal - -func CreateMemfd(_ string, _ []byte) (int, error) { - return 0, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfilelinux.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfilelinux.go deleted file mode 100644 index b7719c834e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/inmemoryfilelinux.go +++ /dev/null @@ -1,36 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -//go:build linux - -package internal - -import ( - "fmt" - - "golang.org/x/sys/unix" -) - -func CreateMemfd(name string, data []byte) (int, error) { - fd, err := unix.MemfdCreate(name, unix.MFD_CLOEXEC|unix.MFD_ALLOW_SEALING) - if err != nil { - return 0, fmt.Errorf("failed to create memfd '%s': %v", name, err) - } - - bytesWritten, err := unix.Write(fd, data) - if err != nil { - return 0, fmt.Errorf("failed to write data to memfd (fd: %d): %v", fd, err) - } - if bytesWritten != len(data) { - return 0, fmt.Errorf("data mismatch in memfd (fd: %d): expected to write %d bytes, but wrote %d bytes", fd, len(data), bytesWritten) - } - - _, err = unix.FcntlInt(uintptr(fd), unix.F_ADD_SEALS, unix.F_SEAL_SHRINK|unix.F_SEAL_GROW|unix.F_SEAL_WRITE|unix.F_SEAL_SEAL) - if err != nil { - return 0, fmt.Errorf("failed to seal memfd (fd: %d): %v", fd, err) - } - - return fd, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/log/log.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/log/log.go deleted file mode 100644 index cd381ec773..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/log/log.go +++ /dev/null @@ -1,363 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package log provides logging utilities for the tracer. -package log - -import ( - "fmt" - "log" - "os" - "strconv" - "strings" - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -// Level specifies the logging level that the log package prints at. -type Level int - -func (l Level) String() string { - switch l { - case LevelDebug: - return "DEBUG" - case LevelInfo: - return "INFO" - case LevelWarn: - return "WARN" - case LevelError: - return "ERROR" - default: - return "UNKNOWN" - } -} - -const ( - // LevelDebug represents debug level messages. - LevelDebug Level = iota - // LevelInfo represents informational messages. - LevelInfo - // LevelWarn represents warning messages. - LevelWarn - // LevelError represents error messages. - LevelError -) - -var prefixMsg = fmt.Sprintf("Datadog Tracer %s", version.Tag) - -// Logger implementations are able to log given messages that the tracer might -// output. This interface is duplicated here to avoid a cyclic dependency -// between this package and ddtrace -type Logger interface { - // Log prints the given message. - Log(msg string) -} - -// File name for writing tracer logs, if DD_TRACE_LOG_DIRECTORY has been configured -const LoggerFile = "ddtrace.log" - -// ManagedFile functions like a *os.File but is safe for concurrent use -type ManagedFile struct { - mu sync.RWMutex - file *os.File - closed bool -} - -// Close closes the ManagedFile's *os.File in a concurrent-safe manner, ensuring the file is closed only once -func (m *ManagedFile) Close() error { - m.mu.Lock() - defer m.mu.Unlock() - if m.file == nil || m.closed { - return nil - } - err := m.file.Close() - if err != nil { - return err - } - m.closed = true - return nil -} - -func (m *ManagedFile) Name() string { - m.mu.RLock() - defer m.mu.RUnlock() - if m.file == nil { - return "" - } - return m.file.Name() -} - -var ( - mu sync.RWMutex // guards below fields - levelThreshold = LevelWarn - logger Logger = &defaultLogger{l: log.New(os.Stderr, "", log.LstdFlags)} -) - -// UseLogger sets l as the active logger and returns a function to restore the -// previous logger. The return value is mostly useful when testing. -func UseLogger(l Logger) (undo func()) { - Flush() - mu.Lock() - defer mu.Unlock() - old := logger - logger = l - return func() { - mu.Lock() - defer mu.Unlock() - logger = old - } -} - -// OpenFileAtPath creates a new file at the specified dirPath and configures the logger to write to this file. The dirPath must already exist on the underlying os. -// It returns the file that was created, or nil and an error if the file creation was unsuccessful. -// The caller of OpenFileAtPath is responsible for calling Close() on the ManagedFile -func OpenFileAtPath(dirPath string) (*ManagedFile, error) { - path, err := os.Stat(dirPath) - if err != nil || !path.IsDir() { - return nil, fmt.Errorf("file path %v invalid or does not exist on the underlying os; using default logger to stderr", dirPath) - } - filepath := dirPath + "/" + LoggerFile - f, err := os.OpenFile(filepath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0666) - if err != nil { - return nil, fmt.Errorf("using default logger to stderr due to error creating or opening log file: %s", err.Error()) - } - UseLogger(&defaultLogger{l: log.New(f, "", log.LstdFlags)}) - return &ManagedFile{ - file: f, - }, nil -} - -// SetLevel sets the given lvl as log threshold for logging. -func SetLevel(lvl Level) { - mu.Lock() - defer mu.Unlock() - levelThreshold = lvl -} - -func DefaultLevel() Level { - mu.RLock() - defer mu.RUnlock() - return levelThreshold -} - -// GetLevel returns the currrent log level. -func GetLevel() Level { - mu.Lock() - defer mu.Unlock() - return levelThreshold -} - -// DebugEnabled returns true if debug log messages are enabled. This can be used in extremely -// hot code paths to avoid allocating the ...interface{} argument. -func DebugEnabled() bool { - mu.RLock() - lvl := levelThreshold - mu.RUnlock() - return lvl == LevelDebug -} - -// Debug prints the given message if the level is LevelDebug. -func Debug(fmt string, a ...interface{}) { - if !DebugEnabled() { - return - } - printMsg(LevelDebug, fmt, a...) -} - -// Warn prints a warning message. -func Warn(fmt string, a ...interface{}) { - printMsg(LevelWarn, fmt, a...) -} - -// Info prints an informational message. -func Info(fmt string, a ...interface{}) { - printMsg(LevelInfo, fmt, a...) -} - -var ( - errmu sync.RWMutex // guards below fields - erragg = map[string]*errorReport{} // aggregated errors - errrate = time.Minute // the rate at which errors are reported - erron bool // true if errors are being aggregated -) - -func init() { - if v := os.Getenv("DD_LOGGING_RATE"); v != "" { - setLoggingRate(v) - } - - // This is required because we really want to be able to log errors from dyngo - // but the log package depend on too much packages that we want to instrument. - // So we need to do this to avoid dependency cycles. - dyngo.LogError = Error -} - -func setLoggingRate(v string) { - if sec, err := strconv.ParseInt(v, 10, 64); err != nil { - Warn("Invalid value for DD_LOGGING_RATE: %s", err.Error()) - } else { - if sec < 0 { - Warn("Invalid value for DD_LOGGING_RATE: negative value") - } else { - // DD_LOGGING_RATE = 0 allows to log errors immediately. - errrate = time.Duration(sec) * time.Second - } - } -} - -type errorReport struct { - first time.Time // time when first error occurred - err error - count uint64 -} - -// Error reports an error. Errors get aggregated and logged periodically. The -// default is once per minute or once every DD_LOGGING_RATE number of seconds. -func Error(format string, a ...interface{}) { - key := format // format should 99.9% of the time be constant - if reachedLimit(key) { - // avoid too much lock contention on spammy errors - return - } - errmu.Lock() - defer errmu.Unlock() - report, ok := erragg[key] - if !ok { - erragg[key] = &errorReport{ - err: fmt.Errorf(format, a...), - first: time.Now(), - } - report = erragg[key] - } - report.count++ - if errrate == 0 { - flushLocked() - return - } - if !erron { - erron = true - time.AfterFunc(errrate, Flush) - } -} - -// defaultErrorLimit specifies the maximum number of errors gathered in a report. -const defaultErrorLimit = 200 - -// reachedLimit reports whether the maximum count has been reached for this key. -func reachedLimit(key string) bool { - errmu.RLock() - e, ok := erragg[key] - confirm := ok && e.count > defaultErrorLimit - errmu.RUnlock() - return confirm -} - -// Flush flushes and resets all aggregated errors to the logger. -func Flush() { - errmu.Lock() - defer errmu.Unlock() - flushLocked() -} - -func flushLocked() { - for _, report := range erragg { - var extra string - if report.count > defaultErrorLimit { - extra = fmt.Sprintf(", %d+ additional messages skipped (first occurrence: %s)", defaultErrorLimit, report.first.Format(time.RFC822)) - } else if report.count > 1 { - extra = fmt.Sprintf(", %d additional messages skipped (first occurrence: %s)", report.count-1, report.first.Format(time.RFC822)) - } else { - extra = fmt.Sprintf(" (occurred: %s)", report.first.Format(time.RFC822)) - } - printMsg(LevelError, "%v%s", report.err, extra) - } - for k := range erragg { - // compiler-optimized map-clearing post go1.11 (golang/go#20138) - delete(erragg, k) - } - erron = false -} - -func printMsg(lvl Level, format string, a ...interface{}) { - var b strings.Builder - b.Grow(len(prefixMsg) + 1 + len(lvl.String()) + 2 + len(format)) - b.WriteString(prefixMsg) - b.WriteString(" ") - b.WriteString(lvl.String()) - b.WriteString(": ") - b.WriteString(fmt.Sprintf(format, a...)) - mu.RLock() - if ll, ok := logger.(interface { - LogL(lvl Level, msg string) - }); !ok { - logger.Log(b.String()) - } else { - ll.LogL(lvl, b.String()) - } - mu.RUnlock() -} - -type defaultLogger struct{ l *log.Logger } - -var _ Logger = &defaultLogger{} - -func (p *defaultLogger) Log(msg string) { p.l.Print(msg) } - -// DiscardLogger discards every call to Log(). -type DiscardLogger struct{} - -var _ Logger = &DiscardLogger{} - -// Log implements Logger. -func (d DiscardLogger) Log(_ string) {} - -// RecordLogger records every call to Log() and makes it available via Logs(). -type RecordLogger struct { - m sync.Mutex - logs []string - ignore []string // a log is ignored if it contains a string in ignored -} - -var _ Logger = &RecordLogger{} - -// Ignore adds substrings to the ignore field of RecordLogger, allowing -// the RecordLogger to ignore attempts to log strings with certain substrings. -func (r *RecordLogger) Ignore(substrings ...string) { - r.m.Lock() - defer r.m.Unlock() - r.ignore = append(r.ignore, substrings...) -} - -// Log implements Logger. -func (r *RecordLogger) Log(msg string) { - r.m.Lock() - defer r.m.Unlock() - for _, ignored := range r.ignore { - if strings.Contains(msg, ignored) { - return - } - } - r.logs = append(r.logs, msg) -} - -// Logs returns the ordered list of logs recorded by the logger. -func (r *RecordLogger) Logs() []string { - r.m.Lock() - defer r.m.Unlock() - copied := make([]string, len(r.logs)) - copy(copied, r.logs) - return copied -} - -// Reset resets the logger's internal logs -func (r *RecordLogger) Reset() { - r.m.Lock() - defer r.m.Unlock() - r.logs = r.logs[:0] - r.ignore = r.ignore[:0] -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/meta_internal_types.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/meta_internal_types.go deleted file mode 100644 index 4bd9fb803a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/meta_internal_types.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package internal - -// MetaStructValue is a custom type wrapper used to send metadata to the agent via the `meta_struct` field -// instead of the `meta` inside a span. -type MetaStructValue struct { - Value any // TODO: further constraining Value's type, especially if it becomes public -} - -// TraceSourceTagValue is a custom type wrapper used to create the trace source (_dd.p.ts) tag that will -// be propagated to downstream distributed traces via the `X-Datadog-Tags` HTTP header for example. -// It is represented as a 2 character hexadecimal string -type TraceSourceTagValue struct { - Value TraceSource -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/namingschema/namingschema.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/namingschema/namingschema.go deleted file mode 100644 index 63b31dbc5a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/namingschema/namingschema.go +++ /dev/null @@ -1,98 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -// Package namingschema allows to use the naming schema from the integrations to set different -// service and span/operation names based on the value of the DD_TRACE_SPAN_ATTRIBUTE_SCHEMA environment variable. -package namingschema - -import ( - "os" - "strings" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// Version represents the available naming schema versions. -type Version int - -const ( - // SchemaV0 represents naming schema v0. - SchemaV0 Version = iota - // SchemaV1 represents naming schema v1. - SchemaV1 -) - -type Config struct { - NamingSchemaVersion Version - RemoveIntegrationServiceNames bool - DDService string -} - -var ( - activeNamingSchema atomic.Int32 - removeIntegrationServiceNames atomic.Bool -) - -func LoadFromEnv() { - schemaVersionStr := os.Getenv("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA") - if v, ok := parseVersionStr(schemaVersionStr); ok { - setVersion(v) - } else { - setVersion(SchemaV0) - log.Warn("DD_TRACE_SPAN_ATTRIBUTE_SCHEMA=%s is not a valid value, setting to default of v%d", schemaVersionStr, v) - } - // Allow DD_TRACE_SPAN_ATTRIBUTE_SCHEMA=v0 users to disable default integration (contrib AKA v0) service names. - // These default service names are always disabled for v1 onwards. - SetRemoveIntegrationServiceNames(internal.BoolEnv("DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED", false)) -} - -// ReloadConfig is used to reload the configuration in tests. -func ReloadConfig() { - LoadFromEnv() - globalconfig.SetServiceName(os.Getenv("DD_SERVICE")) -} - -// GetConfig returns the naming schema config. -func GetConfig() Config { - return Config{ - NamingSchemaVersion: GetVersion(), - RemoveIntegrationServiceNames: getRemoveIntegrationServiceNames(), - DDService: globalconfig.ServiceName(), - } -} - -// GetVersion returns the global naming schema version used for this application. -func GetVersion() Version { - return Version(activeNamingSchema.Load()) -} - -// setVersion sets the global naming schema version used for this application. -func setVersion(v Version) { - activeNamingSchema.Store(int32(v)) -} - -// parseVersionStr attempts to parse the version string. -func parseVersionStr(v string) (Version, bool) { - switch strings.ToLower(v) { - case "", "v0": - return SchemaV0, true - case "v1": - return SchemaV1, true - default: - return SchemaV0, false - } -} - -func getRemoveIntegrationServiceNames() bool { - return removeIntegrationServiceNames.Load() -} - -// SetRemoveIntegrationServiceNames sets the value of the RemoveIntegrationServiceNames setting for this application. -func SetRemoveIntegrationServiceNames(v bool) { - removeIntegrationServiceNames.Store(v) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/normalizer/normalizer.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/normalizer/normalizer.go deleted file mode 100644 index 1d0984adc0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/normalizer/normalizer.go +++ /dev/null @@ -1,52 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package normalizer provides tag normalization -package normalizer - -import ( - "net/textproto" - "regexp" - "strings" - - "github.com/DataDog/dd-trace-go/v2/ddtrace/ext" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// headerTagRegexp is used to replace all invalid characters in the config. Only alphanumerics, whitespaces and dashes allowed. -var headerTagRegexp = regexp.MustCompile("[^a-zA-Z0-9 -]") - -// HeaderTag accepts a string that contains a header and an optional mapped tag key, -// e.g, "header" or "header:tag" where `tag` will be the name of the header tag. -// If multiple colons exist in the input, it splits on the last colon. -// e.g, "first:second:third" gets split into `header = "first:second"` and `tag="third"` -// The returned header is in canonical MIMEHeader format. -func HeaderTag(headerAsTag string) (header string, tag string) { - header = strings.ToLower(strings.TrimSpace(headerAsTag)) - // if a colon is found in `headerAsTag` - if last := strings.LastIndex(header, ":"); last >= 0 { - header, tag = header[:last], header[last+1:] - header, tag = strings.TrimSpace(header), strings.TrimSpace(tag) - } else { - tag = ext.HTTPRequestHeaders + "." + headerTagRegexp.ReplaceAllString(header, "_") - } - return textproto.CanonicalMIMEHeaderKey(header), tag -} - -// HeaderTagSlice accepts a slice of strings that contain headers and optional mapped tag key. -// See HeaderTag for details on formatting. -func HeaderTagSlice(headers []string) map[string]string { - headerTagsMap := make(map[string]string) - for _, h := range headers { - header, tag := HeaderTag(h) - // If `header` or `tag` is just the empty string, we don't want to set it. - if len(header) == 0 || len(tag) == 0 { - log.Debug("Header-tag input is in unsupported format; dropping input value %s", h) - continue - } - headerTagsMap[header] = tag - } - return headerTagsMap -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context.go deleted file mode 100644 index f66d12c576..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context.go +++ /dev/null @@ -1,72 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package orchestrion - -import ( - "context" -) - -// WrapContext returns the GLS-wrapped context if orchestrion is enabled, otherwise it returns the given parameter. -func WrapContext(ctx context.Context) context.Context { - if !Enabled() { - return ctx - } - - if ctx != nil { - if _, ok := ctx.(*glsContext); ok { // avoid (some) double wrapping - return ctx - } - } - - if ctx == nil { - ctx = context.Background() - } - - return &glsContext{ctx} -} - -// CtxWithValue runs context.WithValue, adds the result to the GLS slot of orchestrion, and returns it. -// If orchestrion is not enabled, it will run context.WithValue and return the result. -// Since we don't support cross-goroutine switch of the GLS we still run context.WithValue in the case -// we are switching goroutines. -func CtxWithValue(parent context.Context, key, val any) context.Context { - if !Enabled() { - return context.WithValue(parent, key, val) - } - - getDDContextStack().Push(key, val) - return context.WithValue(WrapContext(parent), key, val) -} - -// GLSPopValue pops the value from the GLS slot of orchestrion and returns it. Using context.Context values usually does -// not require to pop any stack because the copy of each previous context makes the local variable in the scope disappear -// when the current function ends. But the GLS is a semi-global variable that can be accessed from any function in the -// stack, so we need to pop the value when we are done with it. -func GLSPopValue(key any) any { - if !Enabled() { - return nil - } - - return getDDContextStack().Pop(key) -} - -var _ context.Context = (*glsContext)(nil) - -type glsContext struct { - context.Context -} - -func (g *glsContext) Value(key any) any { - if !Enabled() { - return g.Context.Value(key) - } - - if val := getDDContextStack().Peek(key); val != nil { - return val - } - - return g.Context.Value(key) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context_stack.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context_stack.go deleted file mode 100644 index 60dd1edcac..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/context_stack.go +++ /dev/null @@ -1,62 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package orchestrion - -// contextStack is the object put in the GLS slot of runtime.g inserted by orchestrion. it is used to store context values -// that are shared across the same goroutine. -// TODO: handle cross-goroutine context values -type contextStack map[any][]any - -// getDDContextStack is a main way to access the GLS slot of runtime.g inserted by orchestrion. This function should not be -// called if the enabled variable is false. -func getDDContextStack() *contextStack { - if gls := getDDGLS(); gls != nil { - return gls.(*contextStack) - } - - newStack := &contextStack{} - setDDGLS(newStack) - return newStack -} - -// Peek returns the top context from the stack without removing it. -func (s *contextStack) Peek(key any) any { - if s == nil || *s == nil { - return nil - } - - stack, ok := (*s)[key] - if !ok || len(stack) == 0 { - return nil - } - - return (*s)[key][len(stack)-1] -} - -// Push adds a context to the stack. -func (s *contextStack) Push(key, val any) { - if s == nil || *s == nil { - return - } - - (*s)[key] = append((*s)[key], val) -} - -// Pop removes the top context from the stack and returns it. -func (s *contextStack) Pop(key any) any { - if s == nil || *s == nil { - return nil - } - - stack, ok := (*s)[key] - if !ok || len(stack) == 0 { - return nil - } - - val := (*s)[key][len(stack)-1] - (*s)[key] = (*s)[key][:len(stack)-1] - return val -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.go deleted file mode 100644 index c36a807ef6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.go +++ /dev/null @@ -1,41 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package orchestrion - -import ( - _ "runtime" // to make sure the symbols we link to are present - _ "unsafe" // for go:linkname -) - -var ( - // getDDGLS returns the current value from the field inserted in runtime.g by orchestrion. - // Or nil if orchestrion is not enabled. - getDDGLS = func() any { return nil } - // setDDGLS sets the value in the field inserted in runtime.g by orchestrion. - // Or does nothing if orchestrion is not enabled. - setDDGLS = func(any) {} -) - -// Accessors set by orchestrion in the runtime package. If orchestrion is not enabled, these will be nil as per the default values. - -//revive:disable:var-naming -//go:linkname __dd_orchestrion_gls_get __dd_orchestrion_gls_get.V2 -var __dd_orchestrion_gls_get func() any - -//go:linkname __dd_orchestrion_gls_set __dd_orchestrion_gls_set.V2 -var __dd_orchestrion_gls_set func(any) - -//revive:enable:var-naming - -// Check at Go init time that the two function variable values created by the -// orchestrion are present, and set the get/set variables to their -// values. -func init() { - if __dd_orchestrion_gls_get != nil && __dd_orchestrion_gls_set != nil { - getDDGLS = __dd_orchestrion_gls_get - setDDGLS = __dd_orchestrion_gls_set - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.orchestrion.yml b/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.orchestrion.yml deleted file mode 100644 index 5afc5284db..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/gls.orchestrion.yml +++ /dev/null @@ -1,48 +0,0 @@ -# Unless explicitly stated otherwise all files in this repository are licensed -# under the Apache License Version 2.0. -# This product includes software developed at Datadog (https://www.datadoghq.com/). -# Copyright 2023-present Datadog, Inc. ---- -# yaml-language-server: $schema=https://datadoghq.dev/orchestrion/schema.json -meta: - name: github.com/DataDog/dd-trace-go/v2/internal/orchestrion - description: Operations that interact with Go's runtime system. - caveats: |- - This configuration introduces a way to access the Goroutine Local Storage (GLS), which is not - meant to be used directly by end-users. This is intended to be used only by tracer internals to - enable trace context forwarding in places where a {{}} - value is not available. - -aspects: - - id: __dd_gls_v2 - join-point: - struct-definition: runtime.g - advice: - - add-struct-field: - name: __dd_gls_v2 - type: any - - add-blank-import: unsafe # Needed for go:linkname - - inject-declarations: - # Reference: https://github.com/golang/go/blob/6d89b38ed86e0bfa0ddaba08dc4071e6bb300eea/src/runtime/HACKING.md?plain=1#L44-L54 - template: |- - //go:linkname __dd_orchestrion_gls_get __dd_orchestrion_gls_get.V2 - var __dd_orchestrion_gls_get = func() any { - return getg().m.curg.__dd_gls_v2 - } - - //go:linkname __dd_orchestrion_gls_set __dd_orchestrion_gls_set.V2 - var __dd_orchestrion_gls_set = func(val any) { - getg().m.curg.__dd_gls_v2 = val - } - - id: goexit1 - join-point: - all-of: - - import-path: runtime - - function-body: - function: - # This is the function that finishes the execution of a goroutine. - # See: https://github.com/golang/go/blob/f38d42f2c4c6ad0d7cbdad5e1417cac3be2a5dcb/src/runtime/proc.go#L4264 - - name: goexit1 - advice: - - prepend-statements: - template: getg().__dd_gls_v2 = nil diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/orchestrion.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/orchestrion.go deleted file mode 100644 index 334a6db149..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/orchestrion/orchestrion.go +++ /dev/null @@ -1,22 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package orchestrion - -// Orchestrion will change this at build-time -// -//orchestrion:enabled -var enabled = false - -// The version of the orchestrion binary used to build the current binray, or -// blank if the current binary was not built using orchestrion. -// -//orchestrion:version -const Version = "" - -// Enabled returns whether the current build was compiled with orchestrion or not. -func Enabled() bool { - return enabled -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo.go deleted file mode 100644 index 32ddb763a1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo.go +++ /dev/null @@ -1,54 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package osinfo - -import ( - "runtime" -) - -// Modified in init functions to provide OS-specific information -var ( - osName = runtime.GOOS - osVersion = "unknown" - arch = runtime.GOARCH - kernelName = "unknown" - kernelRelease = "unknown" - kernelVersion = "unknown" -) - -// OSName returns the name of the operating system, including the distribution -// for Linux when possible. -func OSName() string { - // call out to OS-specific implementation - return osName -} - -// OSVersion returns the operating system release, e.g. major/minor version -// number and build ID. -func OSVersion() string { - // call out to OS-specific implementation - return osVersion -} - -// Architecture returns the architecture of the operating system. -func Architecture() string { - return arch -} - -// KernelName returns the name of the kernel. -func KernelName() string { - return kernelName -} - -// KernelRelease returns the release of the kernel. -func KernelRelease() string { - return kernelRelease -} - -// KernelVersion returns the version of the kernel. -func KernelVersion() string { - return kernelVersion -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_unix.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_unix.go deleted file mode 100644 index 36d96da3aa..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_unix.go +++ /dev/null @@ -1,70 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -//go:build unix - -package osinfo - -import ( - "bufio" - "bytes" - "os" - "os/exec" - "runtime" - "strings" - - "golang.org/x/sys/unix" -) - -func init() { - // Change the default values for backwards compatibility on scenarios - if runtime.GOOS == "linux" { - osName = "Linux (Unknown Distribution)" - kernelName = "Linux" - } - - if runtime.GOOS == "darwin" { - kernelName = "Darwin" - out, err := exec.Command("sw_vers", "-productVersion").Output() - if err != nil { - return - } - - osVersion = string(bytes.Trim(out, "\n")) - } - - var uts unix.Utsname - if err := unix.Uname(&uts); err == nil { - kernelName = string(bytes.TrimRight(uts.Sysname[:], "\x00")) - kernelVersion = string(bytes.TrimRight(uts.Version[:], "\x00")) - kernelRelease = strings.SplitN(strings.TrimRight(string(uts.Release[:]), "\x00"), "-", 2)[0] - - // Backwards compatibility on how data is reported for freebsd - if runtime.GOOS == "freebsd" { - osVersion = kernelRelease - } - } - - f, err := os.Open("/etc/os-release") - if err != nil { - return - } - - defer f.Close() - scanner := bufio.NewScanner(f) - for scanner.Scan() { - parts := strings.SplitN(scanner.Text(), "=", 2) - switch parts[0] { - case "NAME": - osName = strings.Trim(parts[1], "\"") - case "VERSION": - osVersion = strings.Trim(parts[1], "\"") - case "VERSION_ID": - if osVersion == "" { // Fallback to VERSION_ID if VERSION is not set - osVersion = strings.Trim(parts[1], "\"") - } - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_windows.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_windows.go deleted file mode 100644 index 2755284648..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/osinfo/osinfo_windows.go +++ /dev/null @@ -1,52 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:build windows - -package osinfo - -import ( - "fmt" - "strings" - - "golang.org/x/sys/windows/registry" -) - -func init() { - k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) - if err != nil { - return - } - defer k.Close() - - var version strings.Builder - - maj, _, err := k.GetIntegerValue("CurrentMajorVersionNumber") - if err == nil { - version.WriteString(fmt.Sprintf("%d", maj)) - min, _, err := k.GetIntegerValue("CurrentMinorVersionNumber") - if err == nil { - version.WriteString(fmt.Sprintf(".%d", min)) - } - } else { - version.WriteString("unknown") - } - - ed, _, err := k.GetStringValue("EditionID") - if err == nil { - version.WriteString(" " + ed) - } else { - version.WriteString(" Unknown Edition") - } - - build, _, err := k.GetStringValue("CurrentBuild") - if err == nil { - version.WriteString(" Build " + build) - } else { - version.WriteString(" Unknown Build") - } - - osVersion = version.String() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/processtags/processtags.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/processtags/processtags.go deleted file mode 100644 index a820d975f0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/processtags/processtags.go +++ /dev/null @@ -1,155 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package processtags - -import ( - "os" - "path/filepath" - "sort" - "strings" - "sync" - - "github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -const envProcessTagsEnabled = "DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED" - -const ( - tagEntrypointName = "entrypoint.name" - tagEntrypointBasedir = "entrypoint.basedir" - tagEntrypointWorkdir = "entrypoint.workdir" - tagEntrypointType = "entrypoint.type" -) - -const ( - entrypointTypeExecutable = "executable" -) - -var ( - enabled bool - pTags *ProcessTags -) - -func init() { - Reload() -} - -type ProcessTags struct { - mu sync.RWMutex - tags map[string]string - str string - slice []string -} - -// String returns the string representation of the process tags. -func (p *ProcessTags) String() string { - if p == nil { - return "" - } - p.mu.RLock() - defer p.mu.RUnlock() - return p.str -} - -// Slice returns the string slice representation of the process tags. -func (p *ProcessTags) Slice() []string { - if p == nil { - return nil - } - p.mu.RLock() - defer p.mu.RUnlock() - return p.slice -} - -func (p *ProcessTags) merge(newTags map[string]string) { - if len(newTags) == 0 { - return - } - pTags.mu.Lock() - defer pTags.mu.Unlock() - - if p.tags == nil { - p.tags = make(map[string]string) - } - for k, v := range newTags { - p.tags[k] = v - } - - // loop over the sorted map keys so the resulting string and slice versions are created consistently. - keys := make([]string, 0, len(p.tags)) - for k := range p.tags { - keys = append(keys, k) - } - sort.Strings(keys) - - tagsSlice := make([]string, 0, len(p.tags)) - var b strings.Builder - first := true - for _, k := range keys { - val := p.tags[k] - if !first { - b.WriteByte(',') - } - first = false - keyVal := normalize.NormalizeTag(k + ":" + val) - b.WriteString(keyVal) - tagsSlice = append(tagsSlice, keyVal) - } - p.slice = tagsSlice - p.str = b.String() -} - -// Reload initializes the configuration and process tags collection. This is useful for tests. -func Reload() { - enabled = internal.BoolEnv(envProcessTagsEnabled, false) - if !enabled { - return - } - pTags = &ProcessTags{} - tags := collect() - if len(tags) > 0 { - Add(tags) - } -} - -func collect() map[string]string { - tags := make(map[string]string) - execPath, err := os.Executable() - if err != nil { - log.Debug("failed to get binary path: %s", err.Error()) - } else { - baseDirName := filepath.Base(filepath.Dir(execPath)) - tags[tagEntrypointName] = filepath.Base(execPath) - tags[tagEntrypointBasedir] = baseDirName - tags[tagEntrypointType] = entrypointTypeExecutable - } - wd, err := os.Getwd() - if err != nil { - log.Debug("failed to get working directory: %s", err.Error()) - } else { - tags[tagEntrypointWorkdir] = filepath.Base(wd) - } - return tags -} - -// GlobalTags returns the global process tags. -func GlobalTags() *ProcessTags { - if !enabled { - return nil - } - return pTags -} - -// Add merges the given tags into the global processTags map. -func Add(tags map[string]string) { - if !enabled { - return - } - pTags.merge(tags) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/config.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/config.go deleted file mode 100644 index 37e607918f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/config.go +++ /dev/null @@ -1,68 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package remoteconfig - -import ( - "net/http" - "os" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -const ( - envPollIntervalSec = "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS" -) - -// ClientConfig contains the required values to configure a remoteconfig client -type ClientConfig struct { - // The address at which the agent is listening for remoteconfig update requests on - AgentURL string - // The semantic version of the user's application - AppVersion string - // The env this tracer is running in - Env string - // The time interval between two client polls to the agent for updates - PollInterval time.Duration - // The tracer's runtime id - RuntimeID string - // The name of the user's application - ServiceName string - // The semantic version of the tracer - TracerVersion string - // The base TUF root metadata file - TUFRoot string - // HTTP is the HTTP client used to receive config updates - HTTP *http.Client -} - -// DefaultClientConfig returns the default remote config client configuration -func DefaultClientConfig() ClientConfig { - return ClientConfig{ - Env: os.Getenv("DD_ENV"), - HTTP: &http.Client{Timeout: 10 * time.Second}, - PollInterval: pollIntervalFromEnv(), - RuntimeID: globalconfig.RuntimeID(), - ServiceName: globalconfig.ServiceName(), - TracerVersion: version.Tag, - TUFRoot: os.Getenv("DD_RC_TUF_ROOT"), - } -} - -func pollIntervalFromEnv() time.Duration { - interval := internal.FloatEnv(envPollIntervalSec, 5.0) - if interval < 0 { - log.Debug("Remote config: cannot use a negative poll interval: %s = %f. Defaulting to 5s.", envPollIntervalSec, interval) - interval = 5.0 - } else if interval == 0 { - log.Debug("Remote config: poll interval set to 0. Polling will be continuous.") - return time.Nanosecond - } - return time.Duration(interval * float64(time.Second)) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/path.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/path.go deleted file mode 100644 index db09f95fc6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/path.go +++ /dev/null @@ -1,96 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package remoteconfig - -import ( - "fmt" - "strings" -) - -type ( - Path struct { - // The source of the config. Either "datadog/", or "employee" - Source Source - // The name of the product that produced this config (e.g, "ASM_DD"). - Product string - // The ID of the config (e.g, "blocked_ips") - ConfigID string - // The name of the config object (e.g, "config") - Name string - } - Source interface { - fmt.Stringer - isSource() - } - DatadogSource struct { - source - OrgID string - } - EmployeeSource struct { - source - } - source struct{} -) - -// ParsePath parses a remote config target file path into its components. -func ParsePath(filename string) (Path, bool) { - // See: https://docs.google.com/document/d/1u_G7TOr8wJX0dOM_zUDKuRJgxoJU_hVTd5SeaMucQUs/edit?tab=t.0#bookmark=id.ew0e2fwzf8p7 - parts := strings.Split(filename, "/") - if len(parts) < 4 { - return Path{}, false - } - - var source Source - switch parts[0] { - case "datadog": - orgID := parts[1] - if orgID == "" { - // Invalid org ID (empty)... - return Path{}, false - } - for _, c := range orgID { - if c < '0' || c > '9' { - // Invalid org ID (non-numeric)... - return Path{}, false - } - } - source = DatadogSource{OrgID: orgID} - parts = parts[2:] - case "employee": - source = EmployeeSource{} - parts = parts[1:] - default: - // Invalid source... - return Path{}, false - } - - if len(parts) != 3 { - // Invalid number of parts... - return Path{}, false - } - - product, configID, name := parts[0], parts[1], parts[2] - if product == "" || configID == "" || name == "" { - // Invalid product, config ID, or name (none of these can be empty)... - return Path{}, false - } - - return Path{Source: source, Product: product, ConfigID: configID, Name: name}, true -} - -func (p Path) String() string { - return p.Source.String() + "/" + p.Product + "/" + p.ConfigID + "/" + p.Name -} - -func (s DatadogSource) String() string { - return fmt.Sprintf("datadog/%s", s.OrgID) -} - -func (s EmployeeSource) String() string { - return "employee" -} - -func (source) isSource() {} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/remoteconfig.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/remoteconfig.go deleted file mode 100644 index 472905896c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/remoteconfig.go +++ /dev/null @@ -1,694 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package remoteconfig - -import ( - "bytes" - "crypto/rand" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "maps" - "math/big" - "net/http" - "reflect" - "slices" - "sync" - "time" - - rc "github.com/DataDog/datadog-agent/pkg/remoteconfig/state" - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/processtags" -) - -// Callback represents a function that can process a remote config update. -// A Callback function can be registered to a remote config client to automatically -// react upon receiving updates. This function returns the configuration processing status -// for each config file received through the update. -type Callback func(updates map[string]ProductUpdate) map[string]rc.ApplyStatus - -// ProductCallback is like Callback but for a specific product. -type ProductCallback func(update ProductUpdate) map[string]rc.ApplyStatus - -// Capability represents a bit index to be set in clientData.Capabilites in order to register a client -// for a specific capability -type Capability uint - -const ( - _ Capability = iota - // ASMActivation represents the capability to activate ASM through remote configuration - ASMActivation - // ASMIPBlocking represents the capability for ASM to block requests based on user IP - ASMIPBlocking - // ASMDDRules represents the capability to update the rules used by the ASM WAF for threat detection - ASMDDRules - // ASMExclusions represents the capability for ASM to exclude traffic from its protections - ASMExclusions - // ASMRequestBlocking represents the capability for ASM to block requests based on the HTTP request related WAF addresses - ASMRequestBlocking - // ASMResponseBlocking represents the capability for ASM to block requests based on the HTTP response related WAF addresses - ASMResponseBlocking - // ASMUserBlocking represents the capability for ASM to block requests based on user ID - ASMUserBlocking - // ASMCustomRules represents the capability for ASM to receive and use user-defined security rules - ASMCustomRules - // ASMCustomBlockingResponse represents the capability for ASM to receive and use user-defined blocking responses - ASMCustomBlockingResponse - // ASMTrustedIPs represents Trusted IPs through the ASM product - ASMTrustedIPs - // ASMApiSecuritySampleRate represents API Security sampling rate - ASMApiSecuritySampleRate - // APMTracingSampleRate represents the rate at which to sample traces from APM client libraries - APMTracingSampleRate - // APMTracingLogsInjection enables APM client libraries to inject trace ids into log records - APMTracingLogsInjection - // APMTracingHTTPHeaderTags enables APM client libraries to tag http header values to http server or client spans - APMTracingHTTPHeaderTags - // APMTracingCustomTags enables APM client to set custom tags on all spans - APMTracingCustomTags - // ASMProcessorOverrides adds support for processor overrides through the ASM RC Product - ASMProcessorOverrides - // ASMCustomDataScanners adds support for custom data scanners through the ASM RC Product - ASMCustomDataScanners - // ASMExclusionData adds support configurable exclusion filter data from the ASM_DATA Product - ASMExclusionData - // APMTracingEnabled enables APM tracing - APMTracingEnabled - // APMTracingDataStreamsEnabled enables Data Streams Monitoring - APMTracingDataStreamsEnabled - // ASMRASPSQLI enables ASM support for runtime protection against SQL Injection attacks - ASMRASPSQLI - // ASMRASPLFI enables ASM support for runtime protection against Local File Inclusion attacks - ASMRASPLFI - // ASMRASPSSRF enables ASM support for runtime protection against SSRF attacks - ASMRASPSSRF - // ASMRASPSHI enables ASM support for runtime protection against XSS attacks - ASMRASPSHI - // ASMRASPXXE enables ASM support for runtime protection against XXE attacks - ASMRASPXXE - // ASMRASPRCE enables ASM support for runtime protection against Remote Code Execution - ASMRASPRCE - // ASMRASPNOSQLI enables ASM support for runtime protection against NoSQL Injection attacks - ASMRASPNOSQLI - // ASMRASPXSS enables ASM support for runtime protection against Cross Site Scripting attacks - ASMRASPXSS - // APMTracingSampleRules represents the sampling rate using matching rules from APM client libraries - APMTracingSampleRules - // CSMActivation represents the capability to activate CSM through remote configuration - CSMActivation - // ASMAutoUserInstrumMode represents the capability to enable the automatic user instrumentation mode - ASMAutoUserInstrumMode - // ASMEndpointFingerprinting represents the capability to enable endpoint fingerprinting - ASMEndpointFingerprinting - // ASMSessionFingerprinting represents the capability to enable session fingerprinting - ASMSessionFingerprinting - // ASMNetworkFingerprinting represents the capability to enable network fingerprinting - ASMNetworkFingerprinting - // ASMHeaderFingerprinting represents the capability to enable header fingerprinting - ASMHeaderFingerprinting - // ASMTruncationRules is the support for truncation payload rules - ASMTruncationRules - // ASMRASPCommandInjection represents the capability for ASM's RASP Command Injection prevention - ASMRASPCommandInjection - // APMTracingEnableDynamicInstrumentation represents the capability to enable dynamic instrumentation - APMTracingEnableDynamicInstrumentation - // APMTracingEnableExceptionReplay represents the capability to enable exception replay - APMTracingEnableExceptionReplay - // APMTracingEnableCodeOrigin represents the capability to enable code origin - APMTracingEnableCodeOrigin - // APMTracingEnableLiveDebugging represents the capability to enable live debugging - APMTracingEnableLiveDebugging - // ASMDDMultiConfig represents the capability to handle multiple ASM_DD configuration objects - ASMDDMultiConfig - // ASMTraceTaggingRules represents the capability to honor trace tagging rules - ASMTraceTaggingRules -) - -// ErrClientNotStarted is returned when the remote config client is not started. -var ErrClientNotStarted = errors.New("remote config client not started") - -// ProductUpdate represents an update for a specific product. -// It is a map of file path to raw file content -type ProductUpdate map[string][]byte - -// A Client interacts with an Agent to update and track the state of remote -// configuration -type Client struct { - sync.RWMutex - ClientConfig - - clientID string - endpoint string - repository *rc.Repository - stop chan struct{} - - // When acquiring several locks and using defer to release them, make sure to acquire the locks in the following order: - callbacks []Callback - _callbacksMu sync.RWMutex - products map[string]struct{} - productsMu sync.RWMutex - productsWithCallbacks map[string]ProductCallback - productsWithCallbacksMu sync.RWMutex - capabilities map[Capability]struct{} - capabilitiesMu sync.RWMutex - - lastError error -} - -// client is a RC client singleton that can be accessed by multiple products (tracing, ASM, profiling etc.). -// Using a single RC client instance in the tracer is a requirement for remote configuration. -var client *Client - -var ( - startOnce sync.Once - stopOnce sync.Once -) - -// newClient creates a new remoteconfig Client -func newClient(config ClientConfig) (*Client, error) { - repo, err := rc.NewUnverifiedRepository() - if err != nil { - return nil, err - } - if config.HTTP == nil { - config.HTTP = DefaultClientConfig().HTTP - } - - return &Client{ - ClientConfig: config, - clientID: generateID(), - endpoint: fmt.Sprintf("%s/v0.7/config", config.AgentURL), - repository: repo, - stop: make(chan struct{}), - lastError: nil, - callbacks: []Callback{}, - capabilities: map[Capability]struct{}{}, - products: map[string]struct{}{}, - productsWithCallbacks: make(map[string]ProductCallback), - }, nil -} - -// Start starts the client's update poll loop in a fresh goroutine. -// Noop if the client has already started. -func Start(config ClientConfig) error { - var err error - startOnce.Do(func() { - if !internal.BoolEnv("DD_REMOTE_CONFIGURATION_ENABLED", true) { - // Don't start polling if the feature is disabled explicitly - return - } - client, err = newClient(config) - if err != nil { - return - } - go func() { - ticker := time.NewTicker(client.PollInterval) - defer ticker.Stop() - - for { - select { - case <-client.stop: - close(client.stop) - return - case <-ticker.C: - client.Lock() - client.updateState() - client.Unlock() - } - } - }() - }) - return err -} - -// Stop stops the client's update poll loop. -// Noop if the client has already been stopped. -// The remote config client is supposed to have the same lifecycle as the tracer. -// It can't be restarted after a call to Stop() unless explicitly calling Reset(). -func Stop() { - if client == nil { - // In case Stop() is called before Start() - return - } - stopOnce.Do(func() { - log.Debug("remoteconfig: gracefully stopping the client") - client.stop <- struct{}{} - select { - case <-client.stop: - log.Debug("remoteconfig: client stopped successfully") - case <-time.After(time.Second): - log.Debug("remoteconfig: client stopping timeout") - } - }) -} - -// Reset destroys the client instance. -// To be used only in tests to reset the state of the client. -func Reset() { - client = nil - startOnce = sync.Once{} - stopOnce = sync.Once{} -} - -func (c *Client) updateState() { - data, err := c.newUpdateRequest() - if err != nil { - log.Error("remoteconfig: unexpected error while creating a new update request payload: %s", err.Error()) - return - } - - req, err := http.NewRequest(http.MethodGet, c.endpoint, &data) - if err != nil { - log.Error("remoteconfig: unexpected error while creating a new http request: %s", err.Error()) - return - } - if internal.ContainerID() != "" { - req.Header.Set("Datadog-Container-ID", internal.ContainerID()) - } - if internal.EntityID() != "" { - req.Header.Set("Datadog-Entity-ID", internal.EntityID()) - } - - resp, err := c.HTTP.Do(req) - if err != nil { - log.Debug("remoteconfig: http request error: %s", err.Error()) - return - } - // Flush and close the response body when returning (cf. https://pkg.go.dev/net/http#Client.Do) - defer func() { - io.ReadAll(resp.Body) - resp.Body.Close() - }() - - if sc := resp.StatusCode; sc != http.StatusOK { - log.Debug("remoteconfig: http request error: response status code is not 200 (OK) but %s", http.StatusText(sc)) - return - } - - respBody, err := io.ReadAll(resp.Body) - if err != nil { - log.Error("remoteconfig: http request error: could not read the response body: %s", err.Error()) - return - } - - if body := string(respBody); body == `{}` || body == `null` { - return - } - - var update clientGetConfigsResponse - if err := json.Unmarshal(respBody, &update); err != nil { - log.Error("remoteconfig: http request error: could not parse the json response body: %s", err.Error()) - return - } - - c.lastError = c.applyUpdate(&update) -} - -// Subscribe registers a product and its callback to be invoked when the client receives configuration updates. -// Subscribe should be preferred over RegisterProduct and RegisterCallback if your callback only handles a single product. -func Subscribe(product string, callback ProductCallback, capabilities ...Capability) error { - if client == nil { - return ErrClientNotStarted - } - client.productsMu.RLock() - defer client.productsMu.RUnlock() - if _, found := client.products[product]; found { - return fmt.Errorf("product %s already registered via RegisterProduct", product) - } - - client.productsWithCallbacksMu.Lock() - defer client.productsWithCallbacksMu.Unlock() - client.productsWithCallbacks[product] = callback - - client.capabilitiesMu.Lock() - defer client.capabilitiesMu.Unlock() - for _, cap := range capabilities { - client.capabilities[cap] = struct{}{} - } - return nil -} - -// RegisterCallback allows registering a callback that will be invoked when the client -// receives configuration updates. It is up to that callback to then decide what to do -// depending on the product related to the configuration update. -func RegisterCallback(f Callback) error { - if client == nil { - return ErrClientNotStarted - } - client._callbacksMu.Lock() - defer client._callbacksMu.Unlock() - client.callbacks = append(client.callbacks, f) - return nil -} - -// UnregisterCallback removes a previously registered callback from the active callbacks list -// This remove operation preserves ordering -func UnregisterCallback(f Callback) error { - if client == nil { - return ErrClientNotStarted - } - client._callbacksMu.Lock() - defer client._callbacksMu.Unlock() - - toRemove := reflect.ValueOf(f).Pointer() - client.callbacks = slices.DeleteFunc(client.callbacks, func(cb Callback) bool { - return reflect.ValueOf(cb).Pointer() == toRemove - }) - return nil -} - -// RegisterProduct adds a product to the list of products listened by the client -func RegisterProduct(p string) error { - if client == nil { - return ErrClientNotStarted - } - client.productsMu.Lock() - defer client.productsMu.Unlock() - client.productsWithCallbacksMu.RLock() - defer client.productsWithCallbacksMu.RUnlock() - if _, found := client.productsWithCallbacks[p]; found { - return fmt.Errorf("product %s already registered via Subscribe", p) - } - client.products[p] = struct{}{} - return nil -} - -// UnregisterProduct removes a product from the list of products listened by the client -func UnregisterProduct(p string) error { - if client == nil { - return ErrClientNotStarted - } - client.productsMu.Lock() - defer client.productsMu.Unlock() - delete(client.products, p) - return nil -} - -// HasProduct returns whether a given product was registered -func HasProduct(p string) (bool, error) { - if client == nil { - return false, ErrClientNotStarted - } - client.productsMu.RLock() - defer client.productsMu.RUnlock() - client.productsWithCallbacksMu.RLock() - defer client.productsWithCallbacksMu.RUnlock() - _, found := client.products[p] - _, foundWithCallback := client.productsWithCallbacks[p] - return found || foundWithCallback, nil -} - -// RegisterCapability adds a capability to the list of capabilities exposed by the client when requesting -// configuration updates -func RegisterCapability(cpb Capability) error { - if client == nil { - return ErrClientNotStarted - } - client.capabilitiesMu.Lock() - defer client.capabilitiesMu.Unlock() - client.capabilities[cpb] = struct{}{} - return nil -} - -// UnregisterCapability removes a capability from the list of capabilities exposed by the client when requesting -// configuration updates -func UnregisterCapability(cpb Capability) error { - if client == nil { - return ErrClientNotStarted - } - client.capabilitiesMu.Lock() - defer client.capabilitiesMu.Unlock() - delete(client.capabilities, cpb) - return nil -} - -// HasCapability returns whether a given capability was registered -func HasCapability(cpb Capability) (bool, error) { - if client == nil { - return false, ErrClientNotStarted - } - client.capabilitiesMu.RLock() - defer client.capabilitiesMu.RUnlock() - _, found := client.capabilities[cpb] - return found, nil -} - -func (c *Client) allCapabilities() *big.Int { - client.capabilitiesMu.Lock() - defer client.capabilitiesMu.Unlock() - capa := big.NewInt(0) - for i := range c.capabilities { - capa.SetBit(capa, int(i), 1) - } - return capa -} - -func (c *Client) globalCallbacks() []Callback { - c._callbacksMu.RLock() - defer c._callbacksMu.RUnlock() - callbacks := make([]Callback, len(c.callbacks)) - copy(callbacks, c.callbacks) - return callbacks -} - -func (c *Client) productCallbacks() map[string]ProductCallback { - c.productsWithCallbacksMu.RLock() - defer c.productsWithCallbacksMu.RUnlock() - callbacks := make(map[string]ProductCallback, len(c.productsWithCallbacks)) - for k, v := range c.productsWithCallbacks { - callbacks[k] = v - } - return callbacks -} - -func (c *Client) allProducts() []string { - c.productsMu.RLock() - defer c.productsMu.RUnlock() - c.productsWithCallbacksMu.RLock() - defer c.productsWithCallbacksMu.RUnlock() - products := make([]string, 0, len(c.products)+len(c.productsWithCallbacks)) - for p := range c.products { - products = append(products, p) - } - for p := range c.productsWithCallbacks { - products = append(products, p) - } - return products -} - -func (c *Client) applyUpdate(pbUpdate *clientGetConfigsResponse) error { - fileMap := make(map[string][]byte, len(pbUpdate.TargetFiles)) - allProducts := c.allProducts() - productUpdates := make(map[string]ProductUpdate, len(allProducts)) - for _, f := range pbUpdate.TargetFiles { - path, valid := ParsePath(f.Path) - if !valid { - log.Warn("remoteconfig: ignoring invalid target file path: %s", f.Path) - continue - } - - fileMap[f.Path] = f.Raw - if !slices.Contains(allProducts, path.Product) { - log.Debug("remoteconfig: received file for unknown product %s (known: %#v): %s", path.Product, allProducts, f.Path) //nolint:gocritic // Debug logging for unknown products - } - if productUpdates[path.Product] == nil { - productUpdates[path.Product] = make(ProductUpdate) - } - productUpdates[path.Product][f.Path] = f.Raw - } - - mapify := func(s *rc.RepositoryState) map[string]string { - m := make(map[string]string) - for i := range s.Configs { - path := s.CachedFiles[i].Path - product := s.Configs[i].Product - m[path] = product - } - return m - } - - // Check the repository state before and after the update to detect which configs are not being sent anymore. - // This is needed because some products can stop sending configurations, and we want to make sure that the subscribers - // are provided with this information in this case - stateBefore, err := c.repository.CurrentState() - if err != nil { - return fmt.Errorf("repository current state error: %s", err.Error()) - } - products, err := c.repository.Update(rc.Update{ - TUFRoots: pbUpdate.Roots, - TUFTargets: pbUpdate.Targets, - TargetFiles: fileMap, - ClientConfigs: pbUpdate.ClientConfigs, - }) - if err != nil { - return fmt.Errorf("repository update error: %s", err.Error()) - } - stateAfter, err := c.repository.CurrentState() - if err != nil { - return fmt.Errorf("repository current state error after update: %s", err.Error()) - } - - // Create a config files diff between before/after the update to see which config files are missing - mBefore := mapify(&stateBefore) - for k := range mapify(&stateAfter) { - delete(mBefore, k) - } - - // Set the payload data to nil for missing config files. The callbacks then can handle the nil config case to detect - // that this config will not be updated anymore. - updatedProducts := make(map[string]struct{}) - for path, product := range mBefore { - if productUpdates[product] == nil { - productUpdates[product] = make(ProductUpdate) - } - productUpdates[product][path] = nil - updatedProducts[product] = struct{}{} - } - // Aggregate updated products and missing products so that callbacks get called for both - for _, p := range products { - updatedProducts[p] = struct{}{} - } - - if len(updatedProducts) == 0 { - return nil - } - // Performs the callbacks registered and update the application status in the repository (RCTE2) - // In case of several callbacks handling the same config, statuses take precedence in this order: - // 1 - ApplyStateError - // 2 - ApplyStateUnacknowledged - // 3 - ApplyStateAcknowledged - // This makes sure that any product that would need to re-receive the config in a subsequent update will be allowed to - statuses := make(map[string]rc.ApplyStatus) - for _, cb := range c.globalCallbacks() { - for path, status := range cb(productUpdates) { - if s, ok := statuses[path]; !ok || status.State == rc.ApplyStateError || - s.State == rc.ApplyStateAcknowledged && status.State == rc.ApplyStateUnacknowledged { - statuses[path] = status - } - } - } - // Call the product-specific callbacks registered via Subscribe - productCallbacks := c.productCallbacks() - for product, update := range productUpdates { - if fn, ok := productCallbacks[product]; ok { - maps.Copy(statuses, fn(update)) - } - } - for p, s := range statuses { - c.repository.UpdateApplyStatus(p, s) - } - - return nil -} - -func (c *Client) newUpdateRequest() (bytes.Buffer, error) { - state, err := c.repository.CurrentState() - if err != nil { - return bytes.Buffer{}, err - } - // Temporary check while using untrusted repo, for which no initial root file is provided - if state.RootsVersion < 1 { - state.RootsVersion = 1 - } - - pbCachedFiles := make([]*targetFileMeta, 0, len(state.CachedFiles)) - for _, f := range state.CachedFiles { - pbHashes := make([]*targetFileHash, 0, len(f.Hashes)) - for alg, hash := range f.Hashes { - pbHashes = append(pbHashes, &targetFileHash{ - Algorithm: alg, - Hash: hex.EncodeToString(hash), - }) - } - pbCachedFiles = append(pbCachedFiles, &targetFileMeta{ - Path: f.Path, - Length: int64(f.Length), - Hashes: pbHashes, - }) - } - - hasError := c.lastError != nil - errMsg := "" - if hasError { - errMsg = c.lastError.Error() - } - - var pbConfigState []*configState - if !hasError { - pbConfigState = make([]*configState, 0, len(state.Configs)) - for _, f := range state.Configs { - pbConfigState = append(pbConfigState, &configState{ - ID: f.ID, - Version: f.Version, - Product: f.Product, - ApplyState: f.ApplyStatus.State, - ApplyError: f.ApplyStatus.Error, - }) - } - } - - capa := c.allCapabilities() - var tags []string - for k, v := range internal.GetGitMetadataTags() { - tags = append(tags, k+":"+v) - } - req := clientGetConfigsRequest{ - Client: &clientData{ - State: &clientState{ - RootVersion: uint64(state.RootsVersion), - TargetsVersion: uint64(state.TargetsVersion), - ConfigStates: pbConfigState, - HasError: hasError, - Error: errMsg, - }, - ID: c.clientID, - Products: c.allProducts(), - IsTracer: true, - ClientTracer: &clientTracer{ - RuntimeID: c.RuntimeID, - Language: "go", - TracerVersion: c.TracerVersion, - Service: c.ServiceName, - Env: c.Env, - AppVersion: c.AppVersion, - ProcessTags: processtags.GlobalTags().Slice(), - Tags: tags, - }, - Capabilities: capa.Bytes(), - }, - CachedTargetFiles: pbCachedFiles, - } - - var b bytes.Buffer - - err = json.NewEncoder(&b).Encode(&req) - if err != nil { - return bytes.Buffer{}, err - } - - return b, nil -} - -var ( - idSize = 21 - idAlphabet = []rune("_-0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") -) - -func generateID() string { - bytes := make([]byte, idSize) - _, err := rand.Read(bytes) - if err != nil { - panic(err) - } - id := make([]rune, idSize) - for i := 0; i < idSize; i++ { - id[i] = idAlphabet[bytes[i]&63] - } - return string(id[:idSize]) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/types.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/types.go deleted file mode 100644 index fb9272dc3a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/remoteconfig/types.go +++ /dev/null @@ -1,74 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package remoteconfig - -import rc "github.com/DataDog/datadog-agent/pkg/remoteconfig/state" - -type clientData struct { - State *clientState `json:"state,omitempty"` - ID string `json:"id,omitempty"` - Products []string `json:"products,omitempty"` - IsTracer bool `json:"is_tracer,omitempty"` - ClientTracer *clientTracer `json:"client_tracer,omitempty"` - LastSeen uint64 `json:"last_seen,omitempty"` - Capabilities []byte `json:"capabilities,omitempty"` -} - -type clientTracer struct { - RuntimeID string `json:"runtime_id,omitempty"` - Language string `json:"language,omitempty"` - TracerVersion string `json:"tracer_version,omitempty"` - Service string `json:"service,omitempty"` - Env string `json:"env,omitempty"` - AppVersion string `json:"app_version,omitempty"` - Tags []string `json:"tags,omitempty"` - ProcessTags []string `json:"process_tags,omitempty"` -} - -type configState struct { - ID string `json:"id,omitempty"` - Version uint64 `json:"version,omitempty"` - Product string `json:"product,omitempty"` - ApplyState rc.ApplyState `json:"apply_state,omitempty"` - ApplyError string `json:"apply_error,omitempty"` -} - -type clientState struct { - RootVersion uint64 `json:"root_version"` - TargetsVersion uint64 `json:"targets_version"` - ConfigStates []*configState `json:"config_states,omitempty"` - HasError bool `json:"has_error,omitempty"` - Error string `json:"error,omitempty"` - BackendClientState []byte `json:"backend_client_state,omitempty"` -} - -type targetFileHash struct { - Algorithm string `json:"algorithm,omitempty"` - Hash string `json:"hash,omitempty"` -} - -type targetFileMeta struct { - Path string `json:"path,omitempty"` - Length int64 `json:"length,omitempty"` - Hashes []*targetFileHash `json:"hashes,omitempty"` -} - -type clientGetConfigsRequest struct { - Client *clientData `json:"client,omitempty"` - CachedTargetFiles []*targetFileMeta `json:"cached_target_files,omitempty"` -} - -type clientGetConfigsResponse struct { - Roots [][]byte `json:"roots,omitempty"` - Targets []byte `json:"targets,omitempty"` - TargetFiles []*file `json:"target_files,omitempty"` - ClientConfigs []string `json:"client_configs,omitempty"` -} - -type file struct { - Path string `json:"path,omitempty"` - Raw []byte `json:"raw,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/samplernames/samplernames.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/samplernames/samplernames.go deleted file mode 100644 index 54836680ca..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/samplernames/samplernames.go +++ /dev/null @@ -1,45 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package samplernames - -// SamplerName specifies the name of a sampler which was -// responsible for a certain sampling decision. -type SamplerName int8 - -const ( - // Unknown specifies that the span was sampled - // but, the tracer was unable to identify the sampler. - // No sampling decision maker will be propagated. - Unknown SamplerName = -1 - // Default specifies that the span was sampled without any sampler. - Default SamplerName = 0 - // AgentRate specifies that the span was sampled - // with a rate calculated by the trace agent. - AgentRate SamplerName = 1 - // RemoteRate specifies that the span was sampled - // with a dynamically calculated remote rate. - RemoteRate SamplerName = 2 - // RuleRate specifies that the span was sampled by the local RuleSampler. - RuleRate SamplerName = 3 - // Manual specifies that the span was sampled manually by user. - Manual SamplerName = 4 - // AppSec specifies that the span was sampled by AppSec. - AppSec SamplerName = 5 - // RemoteUserRate specifies that the span was sampled - // with a user specified remote rate. - RemoteUserRate SamplerName = 6 - // SingleSpan specifies that the span was sampled by single - // span sampling rules. - SingleSpan SamplerName = 8 - // Sampler name 9 is reserved/used by OTel ingestion. - // Sampler name 10 is reserved for Data jobs (spark, databricks etc) - // RemoteUserRule specifies that the span was sampled by a rule the user configured remotely - // through Datadog UI. - RemoteUserRule SamplerName = 11 - // RemoteDynamicRule specifies that the span was sampled by a rule configured by Datadog - // Dynamic Sampling. - RemoteDynamicRule SamplerName = 12 -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/api.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/api.go deleted file mode 100644 index 78940732d6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/api.go +++ /dev/null @@ -1,86 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package stableconfig provides utilities to load and manage APM configurations -// loaded from YAML configuration files -package stableconfig - -import ( - "errors" - "fmt" - "iter" - "os" - "strconv" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -// ConfigData holds configuration value with its origin and config ID -type ConfigData struct { - Origin telemetry.Origin - Value string - ConfigID string -} - -func reportTelemetryAndReturnWithErr(env string, value bool, origin telemetry.Origin, id string, err error) (bool, telemetry.Origin, error) { - if env == "DD_APPSEC_SCA_ENABLED" && origin == telemetry.OriginDefault { - return value, origin, err - } - telemetry.RegisterAppConfigs(telemetry.Configuration{Name: telemetry.EnvToTelemetryName(env), Value: value, Origin: origin, ID: id}) - return value, origin, err -} - -func reportTelemetryAndReturn(env string, value string, origin telemetry.Origin, id string) (string, telemetry.Origin) { - telemetry.RegisterAppConfigs(telemetry.Configuration{Name: telemetry.EnvToTelemetryName(env), Value: value, Origin: origin, ID: id}) - return value, origin -} - -// Bool returns a boolean config value from managed file-based config, environment variable, -// or local file-based config, in that order. If none provide a valid boolean, it returns the default. -// Also returns the value's origin and any parse error encountered. -func Bool(env string, def bool) (value bool, origin telemetry.Origin, err error) { - for configData := range stableConfigByPriority(env) { - if val, err := strconv.ParseBool(configData.Value); err == nil { - return reportTelemetryAndReturnWithErr(env, val, configData.Origin, configData.ConfigID, nil) - } - err = errors.Join(err, fmt.Errorf("non-boolean value for %s: '%s' in %s configuration, dropping", env, configData.Value, configData.Origin)) - } - return reportTelemetryAndReturnWithErr(env, def, telemetry.OriginDefault, telemetry.EmptyID, err) -} - -// String returns a string config value from managed file-based config, environment variable, -// or local file-based config, in that order. If none are set, it returns the default value and origin. -func String(env string, def string) (string, telemetry.Origin) { - for configData := range stableConfigByPriority(env) { - return reportTelemetryAndReturn(env, configData.Value, configData.Origin, configData.ConfigID) - } - return reportTelemetryAndReturn(env, def, telemetry.OriginDefault, telemetry.EmptyID) -} - -func stableConfigByPriority(env string) iter.Seq[ConfigData] { - return func(yield func(ConfigData) bool) { - if v := ManagedConfig.Get(env); v != "" && !yield(ConfigData{ - Origin: telemetry.OriginManagedStableConfig, - Value: v, - ConfigID: ManagedConfig.GetID(), - }) { - return - } - if v, ok := os.LookupEnv(env); ok && !yield(ConfigData{ - Origin: telemetry.OriginEnvVar, - Value: v, - ConfigID: telemetry.EmptyID, // environment variables do not have config ID - }) { - return - } - if v := LocalConfig.Get(env); v != "" && !yield(ConfigData{ - Origin: telemetry.OriginLocalStableConfig, - Value: v, - ConfigID: LocalConfig.GetID(), - }) { - return - } - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfig.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfig.go deleted file mode 100644 index ddd5348dda..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package stableconfig provides utilities to load and manage APM configurations -// loaded from YAML configuration files -package stableconfig - -import "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - -// stableConfig represents a configuration loaded from a YAML source file. -type stableConfig struct { - Config map[string]string `yaml:"apm_configuration_default,omitempty"` // Configuration key-value pairs. - ID string `yaml:"config_id,omitempty"` // Identifier for the config set. -} - -func (s *stableConfig) get(key string) string { - return s.Config[key] -} - -func (s *stableConfig) getID() string { - return s.ID -} - -// isEmpty checks if the config is considered empty (no ID and no config entries). -func (s *stableConfig) isEmpty() bool { - return s.ID == telemetry.EmptyID && len(s.Config) == 0 -} - -// emptyStableConfig creates and returns a new, empty stableConfig instance. -func emptyStableConfig() *stableConfig { - return &stableConfig{ - Config: make(map[string]string, 0), - ID: telemetry.EmptyID, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfigsource.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfigsource.go deleted file mode 100644 index a6db236545..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stableconfig/stableconfigsource.go +++ /dev/null @@ -1,100 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -// Package stableconfig provides utilities to load and manage APM configurations -// loaded from YAML configuration files -package stableconfig - -import ( - "os" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" - "gopkg.in/yaml.v3" -) - -const ( - // File paths are supported on linux only - localFilePath = "/etc/datadog-agent/application_monitoring.yaml" - managedFilePath = "/etc/datadog-agent/managed/datadog-agent/stable/application_monitoring.yaml" - - // maxFileSize defines the maximum size in bytes for stable config files (4KB). This limit ensures predictable memory use and guards against malformed large files. - maxFileSize = 4 * 1024 -) - -// LocalConfig holds the configuration loaded from the user-managed file. -var LocalConfig = newStableConfigSource(localFilePath, telemetry.OriginLocalStableConfig) - -// ManagedConfig holds the configuration loaded from the fleet-managed file. -var ManagedConfig = newStableConfigSource(managedFilePath, telemetry.OriginManagedStableConfig) - -// stableConfigSource represents a source of stable configuration loaded from a file. -type stableConfigSource struct { - filePath string // Path to the configuration file. - origin telemetry.Origin // Origin identifier for telemetry. - config *stableConfig // Parsed stable configuration. -} - -func (s *stableConfigSource) Get(key string) string { - return s.config.get(key) -} - -func (s *stableConfigSource) GetID() string { - return s.config.getID() -} - -// newStableConfigSource initializes a new stableConfigSource from the given file. -func newStableConfigSource(filePath string, origin telemetry.Origin) *stableConfigSource { - return &stableConfigSource{ - filePath: filePath, - origin: origin, - config: parseFile(filePath), - } -} - -// ParseFile reads and parses the config file at the given path. -// Returns an empty config if the file doesn't exist or is invalid. -func parseFile(filePath string) *stableConfig { - info, err := os.Stat(filePath) - if err != nil { - // It's expected that the stable config file may not exist; its absence is not an error. - if !os.IsNotExist(err) { - log.Warn("Failed to stat stable config file %q, dropping: %v", filePath, err.Error()) - } - return emptyStableConfig() - } - - if info.Size() > maxFileSize { - log.Warn("Stable config file %s exceeds size limit (%d bytes > %d bytes), dropping", - filePath, info.Size(), maxFileSize) - return emptyStableConfig() - } - - data, err := os.ReadFile(filePath) - if err != nil { - // It's expected that the stable config file may not exist; its absence is not an error. - if !os.IsNotExist(err) { - log.Warn("Failed to read stable config file %q, dropping: %v", filePath, err.Error()) - } - return emptyStableConfig() - } - - return fileContentsToConfig(data, filePath) -} - -// fileContentsToConfig parses YAML data into a stableConfig struct. -// Returns an empty config if parsing fails or the data is malformed. -func fileContentsToConfig(data []byte, fileName string) *stableConfig { - scfg := &stableConfig{} - err := yaml.Unmarshal(data, scfg) - if err != nil { - log.Warn("Parsing stable config file %s failed due to error, dropping: %v", fileName, err.Error()) - return emptyStableConfig() - } - if scfg.Config == nil { - scfg.Config = make(map[string]string, 0) - } - return scfg -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event.go deleted file mode 100644 index 649717e740..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event.go +++ /dev/null @@ -1,115 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:generate go run github.com/tinylib/msgp -o event_msgp.go -tests=false - -package stacktrace - -import ( - "github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace" - "github.com/DataDog/dd-trace-go/v2/internal" - - "github.com/tinylib/msgp/msgp" -) - -var _ msgp.Marshaler = (*Event)(nil) - -type EventCategory string - -const ( - // ExceptionEvent is the event type for exception events - ExceptionEvent EventCategory = "exception" - // VulnerabilityEvent is the event type for vulnerability events - VulnerabilityEvent EventCategory = "vulnerability" - // ExploitEvent is the event type for exploit events - ExploitEvent EventCategory = "exploit" -) - -const SpanKey = "_dd.stack" - -// Event is the toplevel structure to contain a stacktrace and the additional information needed to correlate it with other data -type Event struct { - // Category is a well-known type of the event, not optional - Category EventCategory `msg:"-"` - // Type is a value event category specific, optional - Type string `msg:"type,omitempty"` - // Language is the language of the code that generated the event (set to "go" anyway here) - Language string `msg:"language,omitempty"` - // ID is the id of the event, optional for exceptions but mandatory for vulnerabilities and exploits to correlate with more data - ID string `msg:"id,omitempty"` - // Message is a generic message for the event - Message string `msg:"message,omitempty"` - // Frames is the stack trace of the event - Frames StackTrace `msg:"frames"` -} - -// NewEvent creates a new stacktrace event with the given category, type and message -func NewEvent(eventCat EventCategory, options ...Options) *Event { - event := &Event{ - Category: eventCat, - Language: "go", - Frames: SkipAndCapture(defaultCallerSkip), - } - - for _, opt := range options { - opt(event) - } - - return event -} - -// Options is a function type to set optional parameters for the event -type Options func(*Event) - -// WithType sets the type of the event -func WithType(eventType string) Options { - return func(event *Event) { - event.Type = eventType - } -} - -// WithMessage sets the message of the event -func WithMessage(message string) Options { - return func(event *Event) { - event.Message = message - } -} - -// WithID sets the id of the event -func WithID(id string) Options { - return func(event *Event) { - event.ID = id - } -} - -// GetSpanValue returns the value to be set as a tag on a span for the given stacktrace events -func GetSpanValue(events ...*Event) any { - if !Enabled() { - return nil - } - - groupByCategory := make(map[string][]*Event, 3) - for _, event := range events { - if _, ok := groupByCategory[string(event.Category)]; !ok { - groupByCategory[string(event.Category)] = []*Event{event} - continue - } - groupByCategory[string(event.Category)] = append(groupByCategory[string(event.Category)], event) - } - - return internal.MetaStructValue{Value: groupByCategory} -} - -// AddToSpan adds the event to the given span's root span as a tag if stacktrace collection is enabled -func AddToSpan(span trace.TagSetter, events ...*Event) { - value := GetSpanValue(events...) - type rooter interface { - Root() trace.TagSetter - } - if lrs, ok := span.(rooter); ok { - span = lrs.Root() - } - span.SetTag(SpanKey, value) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event_msgp.go deleted file mode 100644 index 3a9e61459c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/event_msgp.go +++ /dev/null @@ -1,335 +0,0 @@ -package stacktrace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *Event) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - z.Type, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "language": - z.Language, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - case "id": - z.ID, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ID") - return - } - case "message": - z.Message, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Message") - return - } - case "frames": - err = z.Frames.DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, "Frames") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *Event) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(5) - var zb0001Mask uint8 /* 5 bits */ - _ = zb0001Mask - if z.Type == "" { - zb0001Len-- - zb0001Mask |= 0x1 - } - if z.Language == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.ID == "" { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.Message == "" { - zb0001Len-- - zb0001Mask |= 0x8 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - if (zb0001Mask & 0x1) == 0 { // if not omitted - // write "type" - err = en.Append(0xa4, 0x74, 0x79, 0x70, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Type) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "language" - err = en.Append(0xa8, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Language) - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "id" - err = en.Append(0xa2, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteString(z.ID) - if err != nil { - err = msgp.WrapError(err, "ID") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "message" - err = en.Append(0xa7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Message) - if err != nil { - err = msgp.WrapError(err, "Message") - return - } - } - // write "frames" - err = en.Append(0xa6, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73) - if err != nil { - return - } - err = z.Frames.EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, "Frames") - return - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *Event) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(5) - var zb0001Mask uint8 /* 5 bits */ - _ = zb0001Mask - if z.Type == "" { - zb0001Len-- - zb0001Mask |= 0x1 - } - if z.Language == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.ID == "" { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.Message == "" { - zb0001Len-- - zb0001Mask |= 0x8 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - if (zb0001Mask & 0x1) == 0 { // if not omitted - // string "type" - o = append(o, 0xa4, 0x74, 0x79, 0x70, 0x65) - o = msgp.AppendString(o, z.Type) - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "language" - o = append(o, 0xa8, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65) - o = msgp.AppendString(o, z.Language) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "id" - o = append(o, 0xa2, 0x69, 0x64) - o = msgp.AppendString(o, z.ID) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "message" - o = append(o, 0xa7, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65) - o = msgp.AppendString(o, z.Message) - } - // string "frames" - o = append(o, 0xa6, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73) - o, err = z.Frames.MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, "Frames") - return - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *Event) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "type": - z.Type, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Type") - return - } - case "language": - z.Language, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Language") - return - } - case "id": - z.ID, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ID") - return - } - case "message": - z.Message, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Message") - return - } - case "frames": - bts, err = z.Frames.UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, "Frames") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *Event) Msgsize() (s int) { - s = 1 + 5 + msgp.StringPrefixSize + len(z.Type) + 9 + msgp.StringPrefixSize + len(z.Language) + 3 + msgp.StringPrefixSize + len(z.ID) + 8 + msgp.StringPrefixSize + len(z.Message) + 7 + z.Frames.Msgsize() - return -} - -// DecodeMsg implements msgp.Decodable -func (z *EventCategory) DecodeMsg(dc *msgp.Reader) (err error) { - { - var zb0001 string - zb0001, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = EventCategory(zb0001) - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z EventCategory) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteString(string(z)) - if err != nil { - err = msgp.WrapError(err) - return - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z EventCategory) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendString(o, string(z)) - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *EventCategory) UnmarshalMsg(bts []byte) (o []byte, err error) { - { - var zb0001 string - zb0001, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - (*z) = EventCategory(zb0001) - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z EventCategory) Msgsize() (s int) { - s = msgp.StringPrefixSize + len(string(z)) - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace.go deleted file mode 100644 index 7c19de1821..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace.go +++ /dev/null @@ -1,253 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -//go:generate go run github.com/tinylib/msgp -o=stacktrace_msgp.go -tests=false - -package stacktrace - -import ( - "errors" - "os" - "regexp" - "runtime" - "strconv" - "strings" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - - "github.com/eapache/queue/v2" -) - -var ( - enabled = true - defaultTopFrameDepth = 8 - defaultMaxDepth = 32 - - // internalPackagesPrefixes is the list of prefixes for internal packages that should be hidden in the stack trace - internalSymbolPrefixes = []string{ - "github.com/DataDog/dd-trace-go/v2", - "github.com/DataDog/dd-trace-go", - "github.com/DataDog/go-libddwaf", - "github.com/DataDog/datadog-agent", - "github.com/DataDog/appsec-internal-go", - "github.com/datadog/orchestrion", - "github.com/DataDog/orchestrion", - } -) - -const ( - defaultCallerSkip = 4 - envStackTraceDepth = "DD_APPSEC_MAX_STACK_TRACE_DEPTH" - envStackTraceEnabled = "DD_APPSEC_STACK_TRACE_ENABLE" -) - -func init() { - if env := os.Getenv(envStackTraceEnabled); env != "" { - if e, err := strconv.ParseBool(env); err == nil { - enabled = e - } else { - log.Error("Failed to parse %s env var as boolean: (using default value: %t) %v", envStackTraceEnabled, enabled, err.Error()) - } - } - - if env := os.Getenv(envStackTraceDepth); env != "" { - if !enabled { - log.Warn("Ignoring %s because stacktrace generation is disable", envStackTraceDepth) - return - } - - if depth, err := strconv.Atoi(env); err == nil { - defaultMaxDepth = depth - } else { - if depth <= 0 { - err = errors.New("value is not a strictly positive integer") - } - log.Error("Failed to parse %s env var as a positive integer: (using default value: %d) %v", envStackTraceDepth, defaultMaxDepth, err.Error()) - } - } - - defaultTopFrameDepth = defaultMaxDepth / 4 -} - -// Enabled returns whether stacktrace should be collected -func Enabled() bool { - return enabled -} - -// StackTrace is intended to be sent over the span tag `_dd.stack`, the first frame is the current frame -type StackTrace []StackFrame - -// StackFrame represents a single frame in the stack trace -type StackFrame struct { - Index uint32 `msg:"id"` // Index of the frame (0 = top of the stack) - Text string `msg:"text,omitempty"` // Text version of the stackframe as a string - File string `msg:"file,omitempty"` // File name where the code line is - Line uint32 `msg:"line,omitempty"` // Line number in the context of the file where the code is - Column uint32 `msg:"column,omitempty"` // Column where the code ran is - Namespace string `msg:"namespace,omitempty"` // Namespace is the fully qualified name of the package where the code is - ClassName string `msg:"class_name,omitempty"` // ClassName is the fully qualified name of the class where the line of code is - Function string `msg:"function,omitempty"` // Function is the fully qualified name of the function where the line of code is -} - -type symbol struct { - Package string - Receiver string - Function string -} - -var symbolRegex = regexp.MustCompile(`^(([^(]+/)?([^(/.]+)?)(\.\(([^/)]+)\))?\.([^/()]+)$`) - -// parseSymbol parses a symbol name into its package, receiver and function -// ex: github.com/DataDog/dd-trace-go/v2/internal/stacktrace.(*Event).NewException -// -> package: github.com/DataDog/dd-trace-go/v2/internal/stacktrace -// -> receiver: *Event -// -> function: NewException -func parseSymbol(name string) symbol { - matches := symbolRegex.FindStringSubmatch(name) - if len(matches) != 7 { - log.Error("Failed to parse symbol for stacktrace: %s", name) - return symbol{ - Package: "", - Receiver: "", - Function: "", - } - } - - return symbol{ - Package: matches[1], - Receiver: matches[5], - Function: matches[6], - } -} - -// Capture create a new stack trace from the current call stack -func Capture() StackTrace { - return SkipAndCapture(defaultCallerSkip) -} - -// SkipAndCapture creates a new stack trace from the current call stack, skipping the first `skip` frames -func SkipAndCapture(skip int) StackTrace { - return skipAndCapture(skip, defaultMaxDepth, internalSymbolPrefixes) -} - -func skipAndCapture(skip int, maxDepth int, symbolSkip []string) StackTrace { - iter := iterator(skip, maxDepth, symbolSkip) - stack := make([]StackFrame, defaultMaxDepth) - nbStoredFrames := 0 - topFramesQueue := queue.New[StackFrame]() - - // We have to make sure we don't store more than maxDepth frames - // if there is more than maxDepth frames, we get X frames from the bottom of the stack and Y from the top - for frame, ok := iter.Next(); ok; frame, ok = iter.Next() { - // we reach the top frames: start to use the queue - if nbStoredFrames >= defaultMaxDepth-defaultTopFrameDepth { - topFramesQueue.Add(frame) - // queue is full, remove the oldest frame - if topFramesQueue.Length() > defaultTopFrameDepth { - topFramesQueue.Remove() - } - continue - } - - // Bottom frames: directly store them in the stack - stack[nbStoredFrames] = frame - nbStoredFrames++ - } - - // Stitch the top frames to the stack - for topFramesQueue.Length() > 0 { - stack[nbStoredFrames] = topFramesQueue.Remove() - nbStoredFrames++ - } - - return stack[:nbStoredFrames] -} - -// framesIterator is an iterator over the frames of a call stack -// It skips internal packages and caches the frames to avoid multiple calls to runtime.Callers -// It also skips the first `skip` frames -// It is not thread-safe -type framesIterator struct { - skipPrefixes []string - cache []uintptr - frames *queue.Queue[runtime.Frame] - cacheDepth int - cacheSize int - currDepth int -} - -func iterator(skip, cacheSize int, internalPrefixSkip []string) framesIterator { - return framesIterator{ - skipPrefixes: internalPrefixSkip, - cache: make([]uintptr, cacheSize), - frames: queue.New[runtime.Frame](), - cacheDepth: skip, - cacheSize: cacheSize, - currDepth: 0, - } -} - -// next returns the next runtime.Frame in the call stack, filling the cache if needed -func (it *framesIterator) next() (runtime.Frame, bool) { - if it.frames.Length() == 0 { - n := runtime.Callers(it.cacheDepth, it.cache) - if n == 0 { - return runtime.Frame{}, false - } - - frames := runtime.CallersFrames(it.cache[:n]) - for { - frame, more := frames.Next() - it.frames.Add(frame) - it.cacheDepth++ - if !more { - break - } - } - } - - it.currDepth++ - return it.frames.Remove(), true -} - -// Next returns the next StackFrame in the call stack, skipping internal packages and refurbishing the cache if needed -func (it *framesIterator) Next() (StackFrame, bool) { - for { - frame, ok := it.next() - if !ok { - return StackFrame{}, false - } - - if it.skipFrame(frame) { - continue - } - - parsedSymbol := parseSymbol(frame.Function) - return StackFrame{ - Index: uint32(it.currDepth - 1), - Text: "", - File: frame.File, - Line: uint32(frame.Line), - Column: 0, // No column given by the runtime - Namespace: parsedSymbol.Package, - ClassName: parsedSymbol.Receiver, - Function: parsedSymbol.Function, - }, true - } -} - -func (it *framesIterator) skipFrame(frame runtime.Frame) bool { - if frame.File == "" { // skip orchestrion generated code - return true - } - - for _, prefix := range it.skipPrefixes { - if strings.HasPrefix(frame.Function, prefix) { - return true - } - } - - return false -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace_msgp.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace_msgp.go deleted file mode 100644 index e10765719e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/stacktrace/stacktrace_msgp.go +++ /dev/null @@ -1,477 +0,0 @@ -package stacktrace - -// Code generated by github.com/tinylib/msgp DO NOT EDIT. - -import ( - "github.com/tinylib/msgp/msgp" -) - -// DecodeMsg implements msgp.Decodable -func (z *StackFrame) DecodeMsg(dc *msgp.Reader) (err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, err = dc.ReadMapHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, err = dc.ReadMapKeyPtr() - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "id": - z.Index, err = dc.ReadUint32() - if err != nil { - err = msgp.WrapError(err, "Index") - return - } - case "text": - z.Text, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Text") - return - } - case "file": - z.File, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "File") - return - } - case "line": - z.Line, err = dc.ReadUint32() - if err != nil { - err = msgp.WrapError(err, "Line") - return - } - case "column": - z.Column, err = dc.ReadUint32() - if err != nil { - err = msgp.WrapError(err, "Column") - return - } - case "namespace": - z.Namespace, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Namespace") - return - } - case "class_name": - z.ClassName, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "ClassName") - return - } - case "function": - z.Function, err = dc.ReadString() - if err != nil { - err = msgp.WrapError(err, "Function") - return - } - default: - err = dc.Skip() - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z *StackFrame) EncodeMsg(en *msgp.Writer) (err error) { - // check for omitted fields - zb0001Len := uint32(8) - var zb0001Mask uint8 /* 8 bits */ - _ = zb0001Mask - if z.Text == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.File == "" { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.Line == 0 { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.Column == 0 { - zb0001Len-- - zb0001Mask |= 0x10 - } - if z.Namespace == "" { - zb0001Len-- - zb0001Mask |= 0x20 - } - if z.ClassName == "" { - zb0001Len-- - zb0001Mask |= 0x40 - } - if z.Function == "" { - zb0001Len-- - zb0001Mask |= 0x80 - } - // variable map header, size zb0001Len - err = en.Append(0x80 | uint8(zb0001Len)) - if err != nil { - return - } - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // write "id" - err = en.Append(0xa2, 0x69, 0x64) - if err != nil { - return - } - err = en.WriteUint32(z.Index) - if err != nil { - err = msgp.WrapError(err, "Index") - return - } - if (zb0001Mask & 0x2) == 0 { // if not omitted - // write "text" - err = en.Append(0xa4, 0x74, 0x65, 0x78, 0x74) - if err != nil { - return - } - err = en.WriteString(z.Text) - if err != nil { - err = msgp.WrapError(err, "Text") - return - } - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // write "file" - err = en.Append(0xa4, 0x66, 0x69, 0x6c, 0x65) - if err != nil { - return - } - err = en.WriteString(z.File) - if err != nil { - err = msgp.WrapError(err, "File") - return - } - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // write "line" - err = en.Append(0xa4, 0x6c, 0x69, 0x6e, 0x65) - if err != nil { - return - } - err = en.WriteUint32(z.Line) - if err != nil { - err = msgp.WrapError(err, "Line") - return - } - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // write "column" - err = en.Append(0xa6, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e) - if err != nil { - return - } - err = en.WriteUint32(z.Column) - if err != nil { - err = msgp.WrapError(err, "Column") - return - } - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // write "namespace" - err = en.Append(0xa9, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65) - if err != nil { - return - } - err = en.WriteString(z.Namespace) - if err != nil { - err = msgp.WrapError(err, "Namespace") - return - } - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // write "class_name" - err = en.Append(0xaa, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65) - if err != nil { - return - } - err = en.WriteString(z.ClassName) - if err != nil { - err = msgp.WrapError(err, "ClassName") - return - } - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // write "function" - err = en.Append(0xa8, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e) - if err != nil { - return - } - err = en.WriteString(z.Function) - if err != nil { - err = msgp.WrapError(err, "Function") - return - } - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z *StackFrame) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - // check for omitted fields - zb0001Len := uint32(8) - var zb0001Mask uint8 /* 8 bits */ - _ = zb0001Mask - if z.Text == "" { - zb0001Len-- - zb0001Mask |= 0x2 - } - if z.File == "" { - zb0001Len-- - zb0001Mask |= 0x4 - } - if z.Line == 0 { - zb0001Len-- - zb0001Mask |= 0x8 - } - if z.Column == 0 { - zb0001Len-- - zb0001Mask |= 0x10 - } - if z.Namespace == "" { - zb0001Len-- - zb0001Mask |= 0x20 - } - if z.ClassName == "" { - zb0001Len-- - zb0001Mask |= 0x40 - } - if z.Function == "" { - zb0001Len-- - zb0001Mask |= 0x80 - } - // variable map header, size zb0001Len - o = append(o, 0x80|uint8(zb0001Len)) - - // skip if no fields are to be emitted - if zb0001Len != 0 { - // string "id" - o = append(o, 0xa2, 0x69, 0x64) - o = msgp.AppendUint32(o, z.Index) - if (zb0001Mask & 0x2) == 0 { // if not omitted - // string "text" - o = append(o, 0xa4, 0x74, 0x65, 0x78, 0x74) - o = msgp.AppendString(o, z.Text) - } - if (zb0001Mask & 0x4) == 0 { // if not omitted - // string "file" - o = append(o, 0xa4, 0x66, 0x69, 0x6c, 0x65) - o = msgp.AppendString(o, z.File) - } - if (zb0001Mask & 0x8) == 0 { // if not omitted - // string "line" - o = append(o, 0xa4, 0x6c, 0x69, 0x6e, 0x65) - o = msgp.AppendUint32(o, z.Line) - } - if (zb0001Mask & 0x10) == 0 { // if not omitted - // string "column" - o = append(o, 0xa6, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e) - o = msgp.AppendUint32(o, z.Column) - } - if (zb0001Mask & 0x20) == 0 { // if not omitted - // string "namespace" - o = append(o, 0xa9, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65) - o = msgp.AppendString(o, z.Namespace) - } - if (zb0001Mask & 0x40) == 0 { // if not omitted - // string "class_name" - o = append(o, 0xaa, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x6e, 0x61, 0x6d, 0x65) - o = msgp.AppendString(o, z.ClassName) - } - if (zb0001Mask & 0x80) == 0 { // if not omitted - // string "function" - o = append(o, 0xa8, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e) - o = msgp.AppendString(o, z.Function) - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *StackFrame) UnmarshalMsg(bts []byte) (o []byte, err error) { - var field []byte - _ = field - var zb0001 uint32 - zb0001, bts, err = msgp.ReadMapHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0001 > 0 { - zb0001-- - field, bts, err = msgp.ReadMapKeyZC(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - switch msgp.UnsafeString(field) { - case "id": - z.Index, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Index") - return - } - case "text": - z.Text, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Text") - return - } - case "file": - z.File, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "File") - return - } - case "line": - z.Line, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Line") - return - } - case "column": - z.Column, bts, err = msgp.ReadUint32Bytes(bts) - if err != nil { - err = msgp.WrapError(err, "Column") - return - } - case "namespace": - z.Namespace, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Namespace") - return - } - case "class_name": - z.ClassName, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "ClassName") - return - } - case "function": - z.Function, bts, err = msgp.ReadStringBytes(bts) - if err != nil { - err = msgp.WrapError(err, "Function") - return - } - default: - bts, err = msgp.Skip(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z *StackFrame) Msgsize() (s int) { - s = 1 + 3 + msgp.Uint32Size + 5 + msgp.StringPrefixSize + len(z.Text) + 5 + msgp.StringPrefixSize + len(z.File) + 5 + msgp.Uint32Size + 7 + msgp.Uint32Size + 10 + msgp.StringPrefixSize + len(z.Namespace) + 11 + msgp.StringPrefixSize + len(z.ClassName) + 9 + msgp.StringPrefixSize + len(z.Function) - return -} - -// DecodeMsg implements msgp.Decodable -func (z *StackTrace) DecodeMsg(dc *msgp.Reader) (err error) { - var zb0002 uint32 - zb0002, err = dc.ReadArrayHeader() - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(StackTrace, zb0002) - } - for zb0001 := range *z { - err = (*z)[zb0001].DecodeMsg(dc) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - return -} - -// EncodeMsg implements msgp.Encodable -func (z StackTrace) EncodeMsg(en *msgp.Writer) (err error) { - err = en.WriteArrayHeader(uint32(len(z))) - if err != nil { - err = msgp.WrapError(err) - return - } - for zb0003 := range z { - err = z[zb0003].EncodeMsg(en) - if err != nil { - err = msgp.WrapError(err, zb0003) - return - } - } - return -} - -// MarshalMsg implements msgp.Marshaler -func (z StackTrace) MarshalMsg(b []byte) (o []byte, err error) { - o = msgp.Require(b, z.Msgsize()) - o = msgp.AppendArrayHeader(o, uint32(len(z))) - for zb0003 := range z { - o, err = z[zb0003].MarshalMsg(o) - if err != nil { - err = msgp.WrapError(err, zb0003) - return - } - } - return -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (z *StackTrace) UnmarshalMsg(bts []byte) (o []byte, err error) { - var zb0002 uint32 - zb0002, bts, err = msgp.ReadArrayHeaderBytes(bts) - if err != nil { - err = msgp.WrapError(err) - return - } - if cap((*z)) >= int(zb0002) { - (*z) = (*z)[:zb0002] - } else { - (*z) = make(StackTrace, zb0002) - } - for zb0001 := range *z { - bts, err = (*z)[zb0001].UnmarshalMsg(bts) - if err != nil { - err = msgp.WrapError(err, zb0001) - return - } - } - o = bts - return -} - -// Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message -func (z StackTrace) Msgsize() (s int) { - s = msgp.ArrayHeaderSize - for zb0003 := range z { - s += z[zb0003].Msgsize() - } - return -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/statsd.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/statsd.go deleted file mode 100644 index 60f3d4431c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/statsd.go +++ /dev/null @@ -1,38 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package internal - -import ( - "time" - - "github.com/DataDog/datadog-go/v5/statsd" -) - -const DefaultDogstatsdAddr = "localhost:8125" - -type StatsdClient interface { - Incr(name string, tags []string, rate float64) error - Count(name string, value int64, tags []string, rate float64) error - CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error - Gauge(name string, value float64, tags []string, rate float64) error - GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error - DistributionSamples(name string, values []float64, tags []string, rate float64) error - Timing(name string, value time.Duration, tags []string, rate float64) error - Flush() error - Close() error -} - -// NewStatsdClient returns a new statsd client with the provided address and globaltags -func NewStatsdClient(addr string, globalTags []string) (StatsdClient, error) { - if addr == "" { - addr = DefaultDogstatsdAddr - } - client, err := statsd.NewDirect(addr, statsd.WithMaxMessagesPerPayload(40), statsd.WithTags(globalTags)) - if err != nil { - return &statsd.NoOpClientDirect{}, err - } - return client, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/README.md b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/README.md deleted file mode 100644 index 2b8f69fd1c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/README.md +++ /dev/null @@ -1,69 +0,0 @@ -# Instrumentation Telemetry Client Architecture - -This documentation details the current architecture of the Instrumentation Telemetry Client of dd-trace-go and was are its capabilities. -For an API documentation, please refer to the [api.go](https://github.com/DataDog/dd-trace-go/blob/main/internal/telemetry/api.go) file content. - -Please, make sure to read the [Specification Documentation](https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/main) before reading this document. - -### Data Flow - -```mermaid -flowchart TD - linkStyle default interpolate basis - globalclient@{ shape: circle } -->|client == nil| recorder - globalclient -->|client != nil| client - recorder@{ shape: cyl } --> client@{ shape: circle } - - subgraph datasources - integrations@{ shape: cyl } - configuration@{ shape: cyl } - dependencies@{ shape: cyl } - products@{ shape: cyl } - logs@{ shape: cyl } - metrics@{ shape: cyl } - end - - client --> datasources - - subgraph mapper - direction LR - app-started --> - default[message-batch
heartbeat
extended-heartbeat] --> app-closing - end - - flush@{ shape:rounded } - - queue@{ shape: cyl } --> flush - - datasources -..->|at flush| mapper --> flush - flush -->|if writer fails| queue - - flush --> writer - - writer --> agent@{ shape: das } - writer --> backend@{ shape: stadium } - agent --> backend -``` - -### Low Level Components - -- **`RingQueue[T]`**: The ring queue is an arbitrary data structure that support growing buffers, a buffer pool, and overflow. It is used as a backend data structure for the payload queue, the recorder and distribution metrics. -- **`Recorder[T]`**: The recorder is a `RingBuffer[func(T)]` that stores functions until the actual value `T` has been created when calling `Replay(T)` dequeues all functions from the recorder and applies them to the value `T`. By default, it can store 512 functions at most. -- **`Range[T]`**: Simple data structure that stores a start and end value, a minimum and maximum interval and has utils functions to help managing ranges. -- **`SyncMap[K, V]`**: Typed version of `sync.Map` -- **`SyncPool[T]`**: Typed version of `sync.Pool` - -### High Level Components - -- **GlobalClient**: The global client is a singleton that is used to access the client instance. It is used to create a new client instance if it does not exist yet. It is also used to access the client instance if it already exists. The global client recorder record calls to the clients until the `StartApp` function is called -- **Client**: The actual `Client` interface implementation. It's main job is to steer data to its corresponding data source. Other than that it actually manages the config of the client and gather data from the data sources to call `Flush` with it. -- **Data Sources**: Each data source implement the `dataSource` interface that has the method `Payload() transport.Payload` that is supposed to flush all data from the data source and make it into a payload ready to be serialized and sent to the backend. - - **Integrations**: The integrations data source is responsible for creating the [`app-integrations-change`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/app_integrations_change.md) payload. A very simple slice and mutex is used as backing store. - - **Configuration**: The configuration data source is responsible for creating the [`app-client-configuration-change`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/app_client_configuration_change.md) payload. A map and mutex is used as backing store. - - **Dependencies**: The dependencies data source is responsible for gathering data [`app-dependencies-loaded`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/app_dependencies_loaded.md) payload. No public API is available for this as this is does in-house with the `ClientConfig.DependencyLoader` function output. - - **Product**: The product data source is responsible for gathering data [`app-product-change`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/app_product_change.md) payload. A map and mutex is used as backing store. - - **Metrics**: The metrics data source is responsible for gathering data for the [`generate-metrics`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/generate_metrics.md) payload. A `SyncMap[metrickey, metricHandle]` is used as backing store. More on that in the metrics specific section - - **Distributions**: The distributions data source is responsible for gathering data for the [`distributions`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/distributions.md) payload. A `SyncMap[distributionkey, distributionHandle]` is used as backing store. More on that in the metrics specific section - - **Logs**: The logs data source is responsible for gathering data for the [`generate-logs`](https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas/logs.md) payload. A `SyncMap[logkey, logValue]` is used as backing store. More on that in the logs specific section. -- **Mapper**: The mapper is also responsible for creating the `app-started`, `app-closing`, `heartbeat`, `extended-heartbeat` and `message-batch` payloads from the data sources that needs data from other payloads but not from the API user. The mapper already return another mapper that will be used in the next call to `Flush`. -- **Writer**: The writer is responsible for sending the payload to the backend. It is a simple interface that has a `Write` method that receives a `transport.Payload` and returns statistics about the write operation. diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/api.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/api.go deleted file mode 100644 index aac5bd0862..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/api.go +++ /dev/null @@ -1,176 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -// Package telemetry provides a telemetry client that is thread-safe burden-less telemetry client following the specification of the instrumentation telemetry from Datadog. -// Specification here: https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/main -// -// The telemetry package has 6 main capabilities: -// - Metrics: Support for [Count], [Rate], [Gauge], [Distribution] metrics. -// - Logs: Support Debug, Warn, Error logs with tags and stack traces via the subpackage [log] or the [Log] function. -// - Product: Start, Stop and Startup errors reporting to the backend -// - App Config: Register and change the configuration of the application and declare its origin -// - Integration: Loading and errors -// - Dependencies: Sending all the dependencies of the application to the backend (for SCA purposes for example) -// -// Each of these capabilities is exposed through the [Client] interface but mainly through the package level functions. -// that mirror and call the global client that is started through the [StartApp] function. -// -// Before the [StartApp] function is called, all called to the global client will be recorded and replay -// when the [StartApp] function is called synchronously. The telemetry client is allowed to record at most 512 calls. -// -// At the end of the app lifetime. If [tracer.Stop] is called, the client should be stopped with the [StopApp] function. -// For all data to be flushed to the backend appropriately. -// -// Note: No public API is available for the dependencies payloads as this is does in-house with the `ClientConfig.DependencyLoader` function output. -package telemetry - -import ( - "io" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// Namespace describes a product to distinguish telemetry coming from -// different products used by the same application -type Namespace = transport.Namespace -type Origin = transport.Origin -type LogLevel = transport.LogLevel - -//goland:noinspection GoVarAndConstTypeMayBeOmitted Goland is having a hard time with the following const block, it keeps deleting the type -const ( - NamespaceGeneral Namespace = transport.NamespaceGeneral - NamespaceTracers Namespace = transport.NamespaceTracers - NamespaceProfilers Namespace = transport.NamespaceProfilers - NamespaceAppSec Namespace = transport.NamespaceAppSec - NamespaceIAST Namespace = transport.NamespaceIAST - NamespaceCIVisibility Namespace = transport.NamespaceCIVisibility - NamespaceMLOps Namespace = transport.NamespaceMLOps - NamespaceRUM Namespace = transport.NamespaceRUM -) - -// Origin describes the source of a configuration change - -//goland:noinspection GoVarAndConstTypeMayBeOmitted Goland is having a hard time with the following const block, it keeps deleting the type -const ( - OriginDefault Origin = transport.OriginDefault - OriginCode Origin = transport.OriginCode - OriginDDConfig Origin = transport.OriginDDConfig - OriginEnvVar Origin = transport.OriginEnvVar - OriginRemoteConfig Origin = transport.OriginRemoteConfig - OriginLocalStableConfig Origin = transport.OriginLocalStableConfig - OriginManagedStableConfig Origin = transport.OriginManagedStableConfig -) - -// EmptyID represents the absence of a configuration ID. -// It can be assigned to the ID field of a Configuration when no ID is available or required. -const EmptyID = "" - -// LogLevel describes the level of a log message - -//goland:noinspection GoVarAndConstTypeMayBeOmitted Goland is having a hard time with the following const block, it keeps deleting the type -const ( - LogDebug LogLevel = transport.LogLevelDebug - LogWarn LogLevel = transport.LogLevelWarn - LogError LogLevel = transport.LogLevelError -) - -// MetricHandle can be used to submit different values for the same metric. -// MetricHandle is used to reduce lock contention when submitting metrics. -// This can also be used ephemerally to submit a single metric value like this: -// -// telemetry.metric(telemetry.Appsec, "my-count", map[string]string{"tag1": "true", "tag2": "1.0"}).Submit(1.0) -type MetricHandle interface { - // Submit submits a value to the metric handle. - Submit(value float64) - // Get returns the last value submitted to the metric handle. - Get() float64 -} - -// Integration is an integration that is configured to be traced. -type Integration struct { - // Name is an arbitrary string that must stay constant for the integration. - Name string - // Version is the version of the integration/dependency that is being loaded. - Version string - // Error is the error that occurred while loading the integration. If this field is specified, the integration is - // considered to be having been forcefully disabled because of the error. - Error string -} - -// Configuration is a key-value pair that is used to configure the application. -type Configuration struct { - // Key is the key of the configuration. - Name string - // Value is the value of the configuration. Need to be json serializable. - Value any - // Origin is the source of the configuration change. - Origin Origin - // ID is the config ID of the configuration change. - ID string -} - -// LogOption is a function that modifies the log message that is sent to the telemetry. -type LogOption func(key *loggerKey, value *loggerValue) - -// Client constitutes all the functions available concurrently for the telemetry users. All methods are thread-safe -// This is an interface for easier testing but all functions will be mirrored at the package level to call -// the global client. -type Client interface { - io.Closer - - // Count obtains the metric handle for the given parameters, or creates a new one if none was created just yet. - // Tags cannot contain commas. - Count(namespace Namespace, name string, tags []string) MetricHandle - - // Rate obtains the metric handle for the given parameters, or creates a new one if none was created just yet. - // Tags cannot contain commas. - Rate(namespace Namespace, name string, tags []string) MetricHandle - - // Gauge obtains the metric handle for the given parameters, or creates a new one if none was created just yet. - // Tags cannot contain commas. - Gauge(namespace Namespace, name string, tags []string) MetricHandle - - // Distribution obtains the metric handle for the given parameters, or creates a new one if none was created just yet. - // Tags cannot contain commas. - Distribution(namespace Namespace, name string, tags []string) MetricHandle - - // Log sends a telemetry log at the desired level with the given text and options. - // Options include sending key-value pairs as tags, and a stack trace frozen from inside the Log function. - Log(level LogLevel, text string, options ...LogOption) - - // ProductStarted declares a product to have started at the customer's request - ProductStarted(product Namespace) - - // ProductStopped declares a product to have being stopped by the customer - ProductStopped(product Namespace) - - // ProductStartError declares that a product could not start because of the following error - ProductStartError(product Namespace, err error) - - // RegisterAppConfig adds a key value pair to the app configuration and send the change to telemetry - // value has to be json serializable and the origin is the source of the change. - RegisterAppConfig(key string, value any, origin Origin) - - // RegisterAppConfigs adds a list of key value pairs to the app configuration and sends the change to telemetry. - // Same as AddAppConfig but for multiple values. - RegisterAppConfigs(kvs ...Configuration) - - // MarkIntegrationAsLoaded marks an integration as loaded in the telemetry - MarkIntegrationAsLoaded(integration Integration) - - // Flush closes the client and flushes any remaining data. - Flush() - - // AppStart sends the telemetry necessary to signal that the app is starting. - // Preferred use via [StartApp] package level function - AppStart() - - // AppStop sends the telemetry necessary to signal that the app is stopping. - // Preferred use via [StopApp] package level function - AppStop() - - // AddFlushTicker adds a function that is called at each telemetry Flush. By default, every minute - AddFlushTicker(ticker func(Client)) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client.go deleted file mode 100644 index 27d34b326d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client.go +++ /dev/null @@ -1,390 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package telemetry - -import ( - "errors" - "os" - "strconv" - "sync" - - "github.com/puzpuzpuz/xsync/v3" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// NewClient creates a new telemetry client with the given service, environment, and version and config. -func NewClient(service, env, version string, config ClientConfig) (Client, error) { - if service == "" { - return nil, errors.New("service name must not be empty") - } - - config = defaultConfig(config) - if err := config.validateConfig(); err != nil { - return nil, err - } - - return newClient(internal.TracerConfig{Service: service, Env: env, Version: version}, config) -} - -func newClient(tracerConfig internal.TracerConfig, config ClientConfig) (*client, error) { - writerConfig, err := newWriterConfig(config, tracerConfig) - if err != nil { - return nil, err - } - - writer, err := internal.NewWriter(writerConfig) - if err != nil { - return nil, err - } - - client := &client{ - tracerConfig: tracerConfig, - writer: writer, - clientConfig: config, - flushMapper: mapper.NewDefaultMapper(config.HeartbeatInterval, config.ExtendedHeartbeatInterval), - payloadQueue: internal.NewRingQueue[transport.Payload](config.PayloadQueueSize), - - dependencies: dependencies{ - DependencyLoader: config.DependencyLoader, - }, - metrics: metrics{ - store: xsync.NewMapOf[metricKey, metricHandle](xsync.WithPresize(knownmetrics.SizeWithFilter(func(decl knownmetrics.Declaration) bool { return decl.Type != transport.DistMetric }))), - skipAllowlist: config.Debug, - }, - distributions: distributions{ - store: xsync.NewMapOf[metricKey, *distribution](xsync.WithPresize(knownmetrics.SizeWithFilter(func(decl knownmetrics.Declaration) bool { return decl.Type == transport.DistMetric }))), - pool: internal.NewSyncPool(func() []float64 { return make([]float64, config.DistributionsSize.Min) }), - skipAllowlist: config.Debug, - queueSize: config.DistributionsSize, - }, - logger: logger{ - store: xsync.NewMapOf[loggerKey, *loggerValue](), - maxDistinctLogs: config.MaxDistinctLogs, - }, - } - - client.dataSources = append(client.dataSources, - &client.integrations, - &client.products, - &client.configuration, - &client.dependencies, - ) - - if config.LogsEnabled { - client.dataSources = append(client.dataSources, &client.logger) - } - - if config.MetricsEnabled { - client.dataSources = append(client.dataSources, &client.metrics, &client.distributions) - } - - client.flushTicker = internal.NewTicker(client.Flush, config.FlushInterval) - - return client, nil -} - -// dataSources is where the data that will be flushed is coming from. I.e metrics, logs, configurations, etc. -type dataSource interface { - Payload() transport.Payload -} - -type client struct { - tracerConfig internal.TracerConfig - clientConfig ClientConfig - - // Data sources - dataSources []dataSource - integrations integrations - products products - configuration configuration - dependencies dependencies - logger logger - metrics metrics - distributions distributions - - // flushMapper is the transformer to use for the next flush on the gathered bodies on this tick - flushMapper mapper.Mapper - flushMapperMu sync.Mutex - - // flushTicker is the ticker that triggers a call to client.Flush every flush interval - flushTicker *internal.Ticker - - // writer is the writer to use to send the payloads to the backend or the agent - writer internal.Writer - - // payloadQueue is used when we cannot flush previously built payload for multiple reasons. - payloadQueue *internal.RingQueue[transport.Payload] - - // flushTickerFuncs are functions that are called just before flushing the data to the backend. - flushTickerFuncs []func(Client) - flushTickerFuncsMu sync.Mutex -} - -func (c *client) Log(level LogLevel, text string, options ...LogOption) { - if !c.clientConfig.LogsEnabled { - return - } - - c.logger.Add(level, text, options...) -} - -func (c *client) MarkIntegrationAsLoaded(integration Integration) { - c.integrations.Add(integration) -} - -func (c *client) Count(namespace Namespace, name string, tags []string) MetricHandle { - if !c.clientConfig.MetricsEnabled { - return noopMetricHandle{} - } - return c.metrics.LoadOrStore(namespace, transport.CountMetric, name, tags) -} - -func (c *client) Rate(namespace Namespace, name string, tags []string) MetricHandle { - if !c.clientConfig.MetricsEnabled { - return noopMetricHandle{} - } - return c.metrics.LoadOrStore(namespace, transport.RateMetric, name, tags) -} - -func (c *client) Gauge(namespace Namespace, name string, tags []string) MetricHandle { - if !c.clientConfig.MetricsEnabled { - return noopMetricHandle{} - } - return c.metrics.LoadOrStore(namespace, transport.GaugeMetric, name, tags) -} - -func (c *client) Distribution(namespace Namespace, name string, tags []string) MetricHandle { - if !c.clientConfig.MetricsEnabled { - return noopMetricHandle{} - } - return c.distributions.LoadOrStore(namespace, name, tags) -} - -func (c *client) ProductStarted(product Namespace) { - c.products.Add(product, true, nil) -} - -func (c *client) ProductStopped(product Namespace) { - c.products.Add(product, false, nil) -} - -func (c *client) ProductStartError(product Namespace, err error) { - c.products.Add(product, false, err) -} - -func (c *client) RegisterAppConfig(key string, value any, origin Origin) { - c.configuration.Add(Configuration{Name: key, Value: value, Origin: origin}) -} - -func (c *client) RegisterAppConfigs(kvs ...Configuration) { - for _, value := range kvs { - c.configuration.Add(value) - } -} - -func (c *client) AddFlushTicker(f func(Client)) { - c.flushTickerFuncsMu.Lock() - defer c.flushTickerFuncsMu.Unlock() - c.flushTickerFuncs = append(c.flushTickerFuncs, f) -} - -func (c *client) Config() ClientConfig { - return c.clientConfig -} - -// Flush sends all the data sources before calling flush -// This function is called by the flushTicker so it should not panic, or it will crash the whole customer application. -// If a panic occurs, we stop the telemetry and log the error. -func (c *client) Flush() { - defer func() { - r := recover() - if r == nil { - return - } - if err, ok := r.(error); ok { - log.Warn("panic while flushing telemetry data, stopping telemetry: %s", err.Error()) - } else { - log.Warn("panic while flushing telemetry data, stopping telemetry!") - } - telemetryClientDisabled = true - if gc, ok := GlobalClient().(*client); ok && gc == c { - SwapClient(nil) - } - }() - - // We call the flushTickerFuncs before flushing the data for data sources - { - c.flushTickerFuncsMu.Lock() - defer c.flushTickerFuncsMu.Unlock() - - for _, f := range c.flushTickerFuncs { - f(c) - } - } - - payloads := make([]transport.Payload, 0, 8) - for _, ds := range c.dataSources { - if payload := ds.Payload(); payload != nil { - payloads = append(payloads, payload) - } - } - - nbBytes, err := c.flush(payloads) - if err != nil { - // We check if the failure is about telemetry or appsec data to log the error at the right level - var dependenciesFound bool - for _, payload := range payloads { - if payload.RequestType() == transport.RequestTypeAppDependenciesLoaded { - dependenciesFound = true - break - } - } - if dependenciesFound { - log.Warn("appsec: error while flushing SCA Security Data: %s", err.Error()) - } else { - log.Debug("telemetry: error while flushing telemetry data: %s", err.Error()) - } - - return - } - - if c.clientConfig.Debug { - log.Debug("telemetry: flushed %d bytes of data", nbBytes) - } -} - -func (c *client) transform(payloads []transport.Payload) []transport.Payload { - c.flushMapperMu.Lock() - defer c.flushMapperMu.Unlock() - payloads, c.flushMapper = c.flushMapper.Transform(payloads) - return payloads -} - -// flush sends all the data sources to the writer after having sent them through the [transform] function. -// It returns the amount of bytes sent to the writer. -func (c *client) flush(payloads []transport.Payload) (int, error) { - payloads = c.transform(payloads) - - if c.payloadQueue.IsEmpty() && len(payloads) == 0 { - return 0, nil - } - - emptyQueue := c.payloadQueue.IsEmpty() - // We enqueue the new payloads to preserve the order of the payloads - c.payloadQueue.Enqueue(payloads...) - payloads = c.payloadQueue.Flush() - - var ( - nbBytes int - speedIncreased bool - failedCalls []internal.EndpointRequestResult - ) - - for i, payload := range payloads { - results, err := c.writer.Flush(payload) - c.computeFlushMetrics(results, err) - if err != nil { - // We stop flushing when we encounter a fatal error, put the bodies in the queue and return the error - if results[len(results)-1].StatusCode == 413 { // If the payload is too large we have no way to divide it, we can only skip it... - log.Warn("telemetry: tried sending a payload that was too large, dropping it") - continue - } - c.payloadQueue.Enqueue(payloads[i:]...) - return nbBytes, err - } - - failedCalls = append(failedCalls, results[:len(results)-1]...) - successfulCall := results[len(results)-1] - - if !speedIncreased && successfulCall.PayloadByteSize > c.clientConfig.EarlyFlushPayloadSize { - // We increase the speed of the flushTicker to try to flush the remaining bodies faster as we are at risk of sending too large bodies to the backend - c.flushTicker.CanIncreaseSpeed() - speedIncreased = true - } - - nbBytes += successfulCall.PayloadByteSize - } - - if emptyQueue && !speedIncreased { // If we did not send a very big payload, and we have no payloads - c.flushTicker.CanDecreaseSpeed() - } - - if len(failedCalls) > 0 { - var errs []error - for _, call := range failedCalls { - errs = append(errs, call.Error) - } - log.Debug("non-fatal error(s) while flushing telemetry data: %v", errors.Join(errs...).Error()) - } - - return nbBytes, nil -} - -// computeFlushMetrics computes and submits the metrics for the flush operation using the output from the writer.Flush method. -// It will submit the number of requests, responses, errors, the number of bytes sent and the duration of the call that was successful. -func (c *client) computeFlushMetrics(results []internal.EndpointRequestResult, reason error) { - if !c.clientConfig.internalMetricsEnabled { - return - } - - indexToEndpoint := func(i int) string { - if i == 0 && c.clientConfig.AgentURL != "" { - return "agent" - } - return "agentless" - } - - for i, result := range results { - endpoint := "endpoint:" + indexToEndpoint(i) - c.Count(transport.NamespaceTelemetry, "telemetry_api.requests", []string{endpoint}).Submit(1) - if result.StatusCode != 0 { - c.Count(transport.NamespaceTelemetry, "telemetry_api.responses", []string{endpoint, "status_code:" + strconv.Itoa(result.StatusCode)}).Submit(1) - } - - if result.Error != nil { - typ := "type:network" - if os.IsTimeout(result.Error) { - typ = "type:timeout" - } - var writerStatusCodeError *internal.WriterStatusCodeError - if errors.As(result.Error, &writerStatusCodeError) { - typ = "type:status_code" - } - c.Count(transport.NamespaceTelemetry, "telemetry_api.errors", []string{endpoint, typ}).Submit(1) - } - } - - if reason != nil { - return - } - - successfulCall := results[len(results)-1] - endpoint := "endpoint:" + indexToEndpoint(len(results)-1) - c.Distribution(transport.NamespaceTelemetry, "telemetry_api.bytes", []string{endpoint}).Submit(float64(successfulCall.PayloadByteSize)) - c.Distribution(transport.NamespaceTelemetry, "telemetry_api.ms", []string{endpoint}).Submit(float64(successfulCall.CallDuration.Milliseconds())) -} - -func (c *client) AppStart() { - c.flushMapperMu.Lock() - defer c.flushMapperMu.Unlock() - c.flushMapper = mapper.NewAppStartedMapper(c.flushMapper) -} - -func (c *client) AppStop() { - c.flushMapperMu.Lock() - defer c.flushMapperMu.Unlock() - c.flushMapper = mapper.NewAppClosingMapper(c.flushMapper) -} - -func (c *client) Close() error { - c.flushTicker.Stop() - return nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client_config.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client_config.go deleted file mode 100644 index 64b1a51e46..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/client_config.go +++ /dev/null @@ -1,290 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package telemetry - -import ( - "fmt" - "net/http" - "net/url" - "os" - "runtime/debug" - "time" - - globalinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal" -) - -type ClientConfig struct { - // DependencyLoader determines how dependency data is sent via telemetry. - // The default value is [debug.ReadBuildInfo] since Application Security Monitoring uses this data to detect vulnerabilities in the ASM-SCA product - // To disable this feature, please implement a function that returns nil, false. - // This can only be controlled via the env var DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED - DependencyLoader func() (*debug.BuildInfo, bool) - - // MetricsEnabled determines whether metrics are sent via telemetry. - // If false, libraries should not send the generate-metrics or distributions events. - // This can only be controlled via the env var DD_TELEMETRY_METRICS_ENABLED - MetricsEnabled bool - - // LogsEnabled determines whether logs are sent via telemetry. - // This can only be controlled via the env var DD_TELEMETRY_LOG_COLLECTION_ENABLED - LogsEnabled bool - - // AgentlessURL is the full URL to the agentless telemetry endpoint. (optional) - // Defaults to https://instrumentation-telemetry-intake.datadoghq.com/api/v2/apmtelemetry - AgentlessURL string - - // AgentURL is the url of the agent to send telemetry to. (optional) - // If the AgentURL is not set, the telemetry client will not attempt to connect to the agent before sending to the agentless endpoint. - AgentURL string - - // HTTPClient is the http client to use for sending telemetry, defaults to a http.DefaultClient copy. - HTTPClient *http.Client - - // HeartbeatInterval is the interval at which to send a heartbeat payload, defaults to 60s. - // The maximum value is 60s. - HeartbeatInterval time.Duration - - // ExtendedHeartbeatInterval is the interval at which to send an extended heartbeat payload, defaults to 24h. - ExtendedHeartbeatInterval time.Duration - - // FlushInterval is the interval at which the client flushes the data. - // By default, the client will start to Flush at 60s intervals and will reduce the interval based on the load till it hit 15s - // Both values cannot be higher than 60s because the heartbeat need to be sent at least every 60s. Values will be clamped otherwise. - FlushInterval internal.Range[time.Duration] - - // PayloadQueueSize is the size of the payload queue. Default range is [4, 32]. - PayloadQueueSize internal.Range[int] - - // DistributionsSize is the size of the distribution queue. Default range is [2^8, 2^14]. - DistributionsSize internal.Range[int] - - // Debug enables debug mode for the telemetry client and sent it to the backend so it logs the request. The - // DD_TELEMETRY_DEBUG environment variable, when set to a truthy value, overrides this setting. - Debug bool - - // APIKey is the API key to use for sending telemetry to the agentless endpoint. (using DD_API_KEY env var by default) - APIKey string - - // EarlyFlushPayloadSize is the size of the payload that will trigger an early flush. - // This is necessary because backend won't allow bodies larger than 5MB. - // The default value here will be 2MB to take into account the large inaccuracy in estimating the size of bodies - EarlyFlushPayloadSize int - - // MaxDistributionsSize is the maximum number of logs with distinct message, level and tags that can be stored per flush window. - // If the limit is reached, logs will be dropped and a log will be sent to the backend about it - // The default value is 1024. - MaxDistinctLogs int32 - - // internalMetricsEnabled determines whether client stats metrics are sent via telemetry. Default to true. - internalMetricsEnabled bool -} - -var ( - // agentlessURL is the endpoint used to send telemetry in an agentless environment. It is - // also the default URL in case connecting to the agent URL fails. - agentlessURL = "https://instrumentation-telemetry-intake.datadoghq.com/api/v2/apmtelemetry" - - // defaultHeartbeatInterval is the default interval at which the agent sends a heartbeat. - defaultHeartbeatInterval = time.Minute - - // defaultExtendedHeartbeatInterval is the default interval at which the agent sends an extended heartbeat. - defaultExtendedHeartbeatInterval = 24 * time.Hour - - // defaultMinFlushInterval is the default interval at which the client flushes the data. - defaultFlushIntervalRange = internal.Range[time.Duration]{ - Min: 15 * time.Second, - Max: 60 * time.Second, - } - - defaultAuthorizedHearbeatRange = internal.Range[time.Duration]{ - Min: time.Microsecond, - Max: time.Minute, - } - - agentProxyAPIPath = "/telemetry/proxy/api/v2/apmtelemetry" - - defaultEarlyFlushPayloadSize = 2 * 1024 * 1024 // 2MB - - // authorizedPayloadSize.Max is specified by the backend to be 5MB. The goal is to never reach this value otherwise our data will be silently dropped. - authorizedPayloadSize = internal.Range[int]{ - Min: 0, - Max: 5 * 1024 * 1024, // 5MB - } - - // TODO: tweak this value once we get real telemetry data from the telemetry client - // This means that, by default, we incur dataloss if we spend ~30mins without flushing, considering we send telemetry data this looks reasonable. - // This also means that in the worst case scenario, memory-wise, the app is stabilized after running for 30mins. - // Ideally both values should be power of 2 because of the way the ring queue is implemented as it's growing - defaultPayloadQueueSize = internal.Range[int]{ - Min: 4, - Max: 32, - } - - // TODO: tweak this value once we get telemetry data from the telemetry client - // Default max size is a 2^14 array of float64 (2^3 bytes) which makes a distribution 128KB bytes array _at worse_. - // Considering we add a point per user request on a simple http server, we would be losing data after 2^14 requests per minute or about 280 requests per second or under 3ms per request. - // If this throughput is constant, the telemetry client flush ticker speed will increase to, at best, double twice to flush 15 seconds of data each time. - // Which will bring our max throughput to 1100 points per second or about 750µs per request. - distributionsSize = internal.Range[int]{ - Min: 1 << 8, - Max: 1 << 14, - } - - // defaultMaxDistinctLogs is the default maximum number of logs with distinct message, level and tags that can be stored in a flush windows. 1024 per minute is already plenty, it's just to avoid memory leaks. - defaultMaxDistinctLogs = int32(256) -) - -func (config ClientConfig) validateConfig() error { - if config.HeartbeatInterval > time.Minute { - return fmt.Errorf("HeartbeatInterval cannot be higher than 60s, got %v", config.HeartbeatInterval) - } - - if config.FlushInterval.Min > time.Minute || config.FlushInterval.Max > time.Minute { - return fmt.Errorf("FlushIntervalRange cannot be higher than 60s, got Min: %v, Max: %v", config.FlushInterval.Min, config.FlushInterval.Max) - } - - if !config.FlushInterval.IsOrdered() { - return fmt.Errorf("FlushIntervalRange Min cannot be higher than Max, got Min: %v, Max: %v", config.FlushInterval.Min, config.FlushInterval.Max) - } - - if !authorizedPayloadSize.Contains(config.EarlyFlushPayloadSize) { - return fmt.Errorf("EarlyFlushPayloadSize must be between 0 and 5MB, got %v", config.EarlyFlushPayloadSize) - } - - return nil -} - -// defaultConfig returns a ClientConfig with default values set. -func defaultConfig(config ClientConfig) ClientConfig { - config.Debug = config.Debug || globalinternal.BoolEnv("DD_TELEMETRY_DEBUG", false) - - if config.AgentlessURL == "" { - config.AgentlessURL = agentlessURL - } - - if config.APIKey == "" { - config.APIKey = os.Getenv("DD_API_KEY") - if config.APIKey == "" { - config.APIKey = os.Getenv("DD-API-KEY") - } - } - - if config.FlushInterval.Min == 0 { - config.FlushInterval.Min = defaultFlushIntervalRange.Min - } else { - config.FlushInterval.Min = defaultAuthorizedHearbeatRange.Clamp(config.FlushInterval.Min) - } - - if config.FlushInterval.Max == 0 { - config.FlushInterval.Max = defaultFlushIntervalRange.Max - } else { - config.FlushInterval.Max = defaultAuthorizedHearbeatRange.Clamp(config.FlushInterval.Max) - } - - heartBeatInterval := defaultHeartbeatInterval - if config.HeartbeatInterval != 0 { - heartBeatInterval = config.HeartbeatInterval - } - - envVal := globalinternal.FloatEnv("DD_TELEMETRY_HEARTBEAT_INTERVAL", heartBeatInterval.Seconds()) - config.HeartbeatInterval = defaultAuthorizedHearbeatRange.Clamp(time.Duration(envVal * float64(time.Second))) - if config.HeartbeatInterval != defaultHeartbeatInterval { - log.Debug("telemetry: using custom heartbeat interval %s", config.HeartbeatInterval) - } - // Make sure we flush at least at each heartbeat interval - config.FlushInterval = config.FlushInterval.ReduceMax(config.HeartbeatInterval) - - if config.HeartbeatInterval == config.FlushInterval.Max { // Since the go ticker is not exact when it comes to the interval, we need to make sure the heartbeat is actually sent - config.HeartbeatInterval = config.HeartbeatInterval - 10*time.Millisecond - } - - if config.DependencyLoader == nil && globalinternal.BoolEnv("DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED", true) { - config.DependencyLoader = debug.ReadBuildInfo - } - - if !config.MetricsEnabled { - config.MetricsEnabled = globalinternal.BoolEnv("DD_TELEMETRY_METRICS_ENABLED", true) - } - - if !config.LogsEnabled { - config.LogsEnabled = globalinternal.BoolEnv("DD_TELEMETRY_LOG_COLLECTION_ENABLED", true) - } - - if !config.internalMetricsEnabled { - config.internalMetricsEnabled = true - } - - if config.EarlyFlushPayloadSize == 0 { - config.EarlyFlushPayloadSize = defaultEarlyFlushPayloadSize - } - - if config.ExtendedHeartbeatInterval == 0 { - config.ExtendedHeartbeatInterval = defaultExtendedHeartbeatInterval - } - - if config.PayloadQueueSize.Min == 0 { - config.PayloadQueueSize.Min = defaultPayloadQueueSize.Min - } - - if config.PayloadQueueSize.Max == 0 { - config.PayloadQueueSize.Max = defaultPayloadQueueSize.Max - } - - if config.DistributionsSize.Min == 0 { - config.DistributionsSize.Min = distributionsSize.Min - } - - if config.DistributionsSize.Max == 0 { - config.DistributionsSize.Max = distributionsSize.Max - } - - if config.MaxDistinctLogs == 0 { - config.MaxDistinctLogs = defaultMaxDistinctLogs - } - - return config -} - -func newWriterConfig(config ClientConfig, tracerConfig internal.TracerConfig) (internal.WriterConfig, error) { - endpoints := make([]*http.Request, 0, 2) - if config.AgentURL != "" { - baseURL, err := url.Parse(config.AgentURL) - if err != nil { - return internal.WriterConfig{}, fmt.Errorf("invalid agent URL: %s", err.Error()) - } - - baseURL.Path = agentProxyAPIPath - request, err := http.NewRequest(http.MethodPost, baseURL.String(), nil) - if err != nil { - return internal.WriterConfig{}, fmt.Errorf("failed to create request: %s", err.Error()) - } - - endpoints = append(endpoints, request) - } - - if config.AgentlessURL != "" && config.APIKey != "" { - request, err := http.NewRequest(http.MethodPost, config.AgentlessURL, nil) - if err != nil { - return internal.WriterConfig{}, fmt.Errorf("failed to create request: %s", err.Error()) - } - - request.Header.Set("DD-API-KEY", config.APIKey) - endpoints = append(endpoints, request) - } - - if len(endpoints) == 0 { - return internal.WriterConfig{}, fmt.Errorf("telemetry: could not build any endpoint, please provide an AgentURL or an APIKey with an optional AgentlessURL") - } - - return internal.WriterConfig{ - TracerConfig: tracerConfig, - Endpoints: endpoints, - HTTPClient: config.HTTPClient, - Debug: config.Debug, - }, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/configuration.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/configuration.go deleted file mode 100644 index ed5668f77a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/configuration.go +++ /dev/null @@ -1,187 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "encoding/json" - "fmt" - "math" - "reflect" - "slices" - "strings" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type configuration struct { - mu sync.Mutex - config map[string]transport.ConfKeyValue - seqID uint64 -} - -func idOrEmpty(id string) string { - if id == EmptyID { - return "" - } - return id -} - -func (c *configuration) Add(kv Configuration) { - c.mu.Lock() - defer c.mu.Unlock() - - if c.config == nil { - c.config = make(map[string]transport.ConfKeyValue) - } - - ID := idOrEmpty(kv.ID) - - c.config[kv.Name] = transport.ConfKeyValue{ - Name: kv.Name, - Value: kv.Value, - Origin: kv.Origin, - ID: ID, - } -} - -func (c *configuration) Payload() transport.Payload { - c.mu.Lock() - defer c.mu.Unlock() - if len(c.config) == 0 { - return nil - } - - configs := make([]transport.ConfKeyValue, len(c.config)) - idx := 0 - for _, conf := range c.config { - if conf.Origin == "" { - conf.Origin = transport.OriginDefault - } - conf.Value = SanitizeConfigValue(conf.Value) - conf.SeqID = c.seqID - configs[idx] = conf - idx++ - c.seqID++ - delete(c.config, conf.Name) - } - - return transport.AppClientConfigurationChange{ - Configuration: configs, - } -} - -// SanitizeConfigValue sanitizes the value of a configuration key to ensure it can be marshalled. -func SanitizeConfigValue(value any) any { - if value == nil { - return "" - } - - // Skip reflection for basic types - switch val := value.(type) { - case string, bool, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return val - case float32: - if math.IsNaN(float64(val)) || math.IsInf(float64(val), 0) { - return "" - } - return val - case float64: - // https://github.com/golang/go/issues/59627 - if math.IsNaN(val) || math.IsInf(val, 0) { - return nil - } - return val - case []string: - return strings.Join(val, ",") // Retro compatibility with old code - } - - if _, ok := value.(json.Marshaler); ok { - return value - } - - if v, ok := value.(fmt.Stringer); ok { - return v.String() - } - - valueOf := reflect.ValueOf(value) - - // Unwrap pointers and interfaces up to 10 levels deep. - for i := 0; i < 10; i++ { - if valueOf.Kind() == reflect.Ptr || valueOf.Kind() == reflect.Interface { - valueOf = valueOf.Elem() - } else { - break - } - } - - switch { - case valueOf.Kind() == reflect.Slice, valueOf.Kind() == reflect.Array: - var sb strings.Builder - sb.WriteString("[") - for i := 0; i < valueOf.Len(); i++ { - if i > 0 { - sb.WriteString(" ") - } - sb.WriteString(fmt.Sprintf("%v", valueOf.Index(i).Interface())) - } - sb.WriteString("]") - return sb.String() - case valueOf.Kind() == reflect.Map: - kvPair := make([]struct { - key string - value string - }, valueOf.Len()) - - iter := valueOf.MapRange() - for i := 0; iter.Next(); i++ { - kvPair[i].key = fmt.Sprintf("%v", iter.Key().Interface()) - kvPair[i].value = fmt.Sprintf("%v", iter.Value().Interface()) - } - - slices.SortStableFunc(kvPair, func(a, b struct { - key string - value string - }) int { - return strings.Compare(a.key, b.key) - }) - - var sb strings.Builder - for _, k := range kvPair { - if sb.Len() > 0 { - sb.WriteString(",") - } - sb.WriteString(k.key) - sb.WriteString(":") - sb.WriteString(k.value) - } - - return sb.String() - } - - return fmt.Sprintf("%v", value) -} - -func EnvToTelemetryName(env string) string { - switch env { - case "DD_TRACE_DEBUG": - return "trace_debug_enabled" - case "DD_APM_TRACING_ENABLED": - return "apm_tracing_enabled" - case "DD_RUNTIME_METRICS_ENABLED": - return "runtime_metrics_enabled" - case "DD_DATA_STREAMS_ENABLED": - return "data_streams_enabled" - case "DD_APPSEC_ENABLED": - return "appsec_enabled" - case "DD_DYNAMIC_INSTRUMENTATION_ENABLED": - return "dynamic_instrumentation_enabled" - case "DD_PROFILING_ENABLED": - return "profiling_enabled" - default: - return env - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/dependencies.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/dependencies.go deleted file mode 100644 index 1f105d3b2a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/dependencies.go +++ /dev/null @@ -1,94 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "runtime/debug" - "strings" - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type dependencies struct { - DependencyLoader func() (*debug.BuildInfo, bool) - - once sync.Once - - mu sync.Mutex - payloads []transport.Payload -} - -func (d *dependencies) Payload() transport.Payload { - d.once.Do(func() { - deps := d.loadDeps() - // Requirement described here: - // https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/producing-telemetry.md#app-dependencies-loaded - const maxPerPayload = 2000 - if len(deps) > maxPerPayload { - log.Debug("telemetry: too many (%d) dependencies to send, sending over multiple bodies", len(deps)) - } - - for i := 0; i < len(deps); i += maxPerPayload { - end := min(i+maxPerPayload, len(deps)) - - d.payloads = append(d.payloads, transport.AppDependenciesLoaded{ - Dependencies: deps[i:end], - }) - } - }) - - d.mu.Lock() - defer d.mu.Unlock() - - if len(d.payloads) == 0 { - return nil - } - - // return payloads one by one - payloadZero := d.payloads[0] - if len(d.payloads) == 1 { - d.payloads = nil - } - - if len(d.payloads) > 1 { - d.payloads = d.payloads[1:] - } - - return payloadZero -} - -// loadDeps returns the dependencies from the DependencyLoader, formatted for telemetry intake. -func (d *dependencies) loadDeps() []transport.Dependency { - if d.DependencyLoader == nil { - return nil - } - - deps, ok := d.DependencyLoader() - if !ok { - log.Debug("telemetry: could not read build info, no dependencies will be reported") - return nil - } - - transportDeps := make([]transport.Dependency, 0, len(deps.Deps)) - for _, dep := range deps.Deps { - if dep == nil { - continue - } - - if dep.Replace != nil && dep.Replace.Version != "" { - dep = dep.Replace - } - - transportDeps = append(transportDeps, transport.Dependency{ - Name: dep.Path, - Version: strings.TrimPrefix(dep.Version, "v"), - }) - } - - return transportDeps -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/distributions.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/distributions.go deleted file mode 100644 index 8cb084cdf0..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/distributions.go +++ /dev/null @@ -1,94 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "fmt" - "sync" - - "github.com/puzpuzpuz/xsync/v3" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type distributions struct { - store *xsync.MapOf[metricKey, *distribution] - pool *internal.SyncPool[[]float64] - queueSize internal.Range[int] - skipAllowlist bool // Debugging feature to skip the allowlist of known metrics -} - -// LoadOrStore returns a MetricHandle for the given distribution metric. If the metric key does not exist, it will be created. -func (d *distributions) LoadOrStore(namespace Namespace, name string, tags []string) MetricHandle { - kind := transport.DistMetric - key := newMetricKey(namespace, kind, name, tags) - handle, loaded := d.store.LoadOrCompute(key, func() *distribution { - return &distribution{ - key: key, - values: internal.NewRingQueueWithPool[float64](d.queueSize, d.pool), - } - }) - if !loaded && !d.skipAllowlist { // The metric is new: validate and log issues about it - if err := validateMetricKey(namespace, kind, name, tags); err != nil { - log.Warn("telemetry: %s", err.Error()) - } - } - - return handle -} - -func (d *distributions) Payload() transport.Payload { - series := make([]transport.DistributionSeries, 0, d.store.Size()) - d.store.Range(func(_ metricKey, handle *distribution) bool { - if payload := handle.payload(); payload.Namespace != "" { - series = append(series, payload) - } - return true - }) - - if len(series) == 0 { - return nil - } - - return transport.Distributions{Series: series, SkipAllowlist: d.skipAllowlist} -} - -type distribution struct { - key metricKey - values *internal.RingQueue[float64] - - logLoss sync.Once -} - -func (d *distribution) Submit(value float64) { - if !d.values.Enqueue(value) { - d.logLoss.Do(func() { - log.Debug("telemetry: distribution %q is losing values because the buffer is full", d.key.name) - Log(LogWarn, fmt.Sprintf("telemetry: distribution %s is losing values because the buffer is full", d.key), WithStacktrace()) - }) - } -} - -func (d *distribution) Get() float64 { - return d.values.ReversePeek() -} - -func (d *distribution) payload() transport.DistributionSeries { - if d.values.IsEmpty() { - return transport.DistributionSeries{} - } - - return transport.DistributionSeries{ - Metric: d.key.name, - Namespace: d.key.namespace, - Tags: d.key.SplitTags(), - Common: knownmetrics.IsCommonMetric(d.key.namespace, d.key.kind, d.key.name), - Points: d.values.Flush(), - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/globalclient.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/globalclient.go deleted file mode 100644 index 591894d590..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/globalclient.go +++ /dev/null @@ -1,273 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package telemetry - -import ( - "sync" - "sync/atomic" - - "github.com/puzpuzpuz/xsync/v3" - - globalinternal "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -var ( - globalClient atomic.Pointer[Client] - - // globalClientRecorder contains all actions done on the global client done before StartApp() with an actual client object is called - globalClientRecorder = internal.NewRecorder[Client]() - - // metricsHandleSwappablePointers contains all the swappableMetricHandle, used to replay actions done before the actual MetricHandle is set - metricsHandleSwappablePointers = xsync.NewMapOf[metricKey, *swappableMetricHandle](xsync.WithPresize(knownmetrics.Size())) -) - -// GlobalClient returns the global telemetry client. -func GlobalClient() Client { - client := globalClient.Load() - if client == nil { - return nil - } - return *client -} - -// StartApp starts the telemetry client with the given client send the app-started telemetry and sets it as the global (*client) -// then calls client.Flush on the client asynchronously. -func StartApp(client Client) { - if Disabled() { - return - } - - if GlobalClient() != nil || SwapClient(client) != nil { - log.Debug("telemetry: StartApp called multiple times, ignoring") - return - } - - client.AppStart() - go client.Flush() -} - -// SwapClient swaps the global client with the given client and Flush the old (*client). -func SwapClient(client Client) Client { - if Disabled() { - return nil - } - - oldClientPtr := globalClient.Swap(&client) - var oldClient Client - if oldClientPtr != nil && *oldClientPtr != nil { - oldClient = *oldClientPtr - } - - if oldClient != nil { - oldClient.Close() - } - - if client == nil { - return oldClient - } - - globalClientRecorder.Replay(client) - // Swap all metrics hot pointers to the new MetricHandle - metricsHandleSwappablePointers.Range(func(_ metricKey, value *swappableMetricHandle) bool { - value.swap(value.maker(client)) - return true - }) - - return oldClient -} - -// MockClient swaps the global client with the given client and clears the recorder to make sure external calls are not replayed. -// It returns a function that can be used to swap back the global client -func MockClient(client Client) func() { - globalClientRecorder.Clear() - metricsHandleSwappablePointers.Clear() - - oldClient := SwapClient(client) - return func() { - SwapClient(oldClient) - } -} - -// StopApp creates the app-stopped telemetry, adding to the queue and Flush all the queue before stopping the (*client). -func StopApp() { - if client := globalClient.Swap(nil); client != nil && *client != nil { - (*client).AppStop() - (*client).Flush() - (*client).Close() - } -} - -var telemetryClientDisabled = !globalinternal.BoolEnv("DD_INSTRUMENTATION_TELEMETRY_ENABLED", true) - -// Disabled returns whether instrumentation telemetry is disabled -// according to the DD_INSTRUMENTATION_TELEMETRY_ENABLED env var -func Disabled() bool { - return telemetryClientDisabled -} - -// Count creates a new metric handle for the given parameters that can be used to submit values. -// Count will always return a [MetricHandle], even if telemetry is disabled or the client has yet to start. -// The [MetricHandle] is then swapped with the actual [MetricHandle] once the client is started. -func Count(namespace Namespace, name string, tags []string) MetricHandle { - return globalClientNewMetric(namespace, transport.CountMetric, name, tags) -} - -// Rate creates a new metric handle for the given parameters that can be used to submit values. -// Rate will always return a [MetricHandle], even if telemetry is disabled or the client has yet to start. -// The [MetricHandle] is then swapped with the actual [MetricHandle] once the client is started. -func Rate(namespace Namespace, name string, tags []string) MetricHandle { - return globalClientNewMetric(namespace, transport.RateMetric, name, tags) -} - -// Gauge creates a new metric handle for the given parameters that can be used to submit values. -// Gauge will always return a [MetricHandle], even if telemetry is disabled or the client has yet to start. -// The [MetricHandle] is then swapped with the actual [MetricHandle] once the client is started. -func Gauge(namespace Namespace, name string, tags []string) MetricHandle { - return globalClientNewMetric(namespace, transport.GaugeMetric, name, tags) -} - -// Distribution creates a new metric handle for the given parameters that can be used to submit values. -// Distribution will always return a [MetricHandle], even if telemetry is disabled or the client has yet to start. -// The [MetricHandle] is then swapped with the actual [MetricHandle] once the client is started. -// The Get() method of the [MetricHandle] will return the last value submitted. -// Distribution MetricHandle is advised to be held in a variable more than the rest of the metric types to avoid too many useless allocations. -func Distribution(namespace Namespace, name string, tags []string) MetricHandle { - return globalClientNewMetric(namespace, transport.DistMetric, name, tags) -} - -func Log(level LogLevel, text string, options ...LogOption) { - globalClientCall(func(client Client) { - client.Log(level, text, options...) - }) -} - -// ProductStarted declares a product to have started at the customer’s request. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func ProductStarted(product Namespace) { - globalClientCall(func(client Client) { - client.ProductStarted(product) - }) -} - -// ProductStopped declares a product to have being stopped by the customer. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func ProductStopped(product Namespace) { - globalClientCall(func(client Client) { - client.ProductStopped(product) - }) -} - -// ProductStartError declares that a product could not start because of the following error. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func ProductStartError(product Namespace, err error) { - globalClientCall(func(client Client) { - client.ProductStartError(product, err) - }) -} - -// RegisterAppConfig adds a key value pair to the app configuration and send the change to telemetry -// value has to be json serializable and the origin is the source of the change. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func RegisterAppConfig(key string, value any, origin Origin) { - globalClientCall(func(client Client) { - client.RegisterAppConfig(key, value, origin) - }) -} - -// RegisterAppConfigs adds a list of key value pairs to the app configuration and sends the change to telemetry. -// Same as AddAppConfig but for multiple values. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func RegisterAppConfigs(kvs ...Configuration) { - globalClientCall(func(client Client) { - client.RegisterAppConfigs(kvs...) - }) -} - -// MarkIntegrationAsLoaded marks an integration as loaded in the telemetry. If telemetry is disabled -// or the client has not started yet it will record the action and replay it once the client is started. -func MarkIntegrationAsLoaded(integration Integration) { - globalClientCall(func(client Client) { - client.MarkIntegrationAsLoaded(integration) - }) -} - -// LoadIntegration marks an integration as loaded in the telemetry client. If telemetry is disabled, it will do nothing. -// If the telemetry client has not started yet, it will record the action and replay it once the client is started. -func LoadIntegration(integration string) { - globalClientCall(func(client Client) { - client.MarkIntegrationAsLoaded(Integration{ - Name: integration, - }) - }) -} - -// AddFlushTicker adds a function that is called at each telemetry Flush. By default, every minute -func AddFlushTicker(ticker func(Client)) { - globalClientCall(func(client Client) { - client.AddFlushTicker(ticker) - }) -} - -var globalClientLogLossOnce sync.Once - -// globalClientCall takes a function that takes a Client and calls it with the global client if it exists. -// otherwise, it records the action for when the client is started. -func globalClientCall(fun func(client Client)) { - if Disabled() { - return - } - - client := globalClient.Load() - if client == nil || *client == nil { - if !globalClientRecorder.Record(fun) { - globalClientLogLossOnce.Do(func() { - log.Debug("telemetry: global client recorder queue is full, dropping telemetry data, please start the telemetry client earlier to avoid data loss") - }) - } - return - } - - fun(*client) -} - -var noopMetricHandleInstance = noopMetricHandle{} - -func globalClientNewMetric(namespace Namespace, kind transport.MetricType, name string, tags []string) MetricHandle { - if Disabled() { - return noopMetricHandleInstance - } - - key := newMetricKey(namespace, kind, name, tags) - hotPtr, _ := metricsHandleSwappablePointers.LoadOrCompute(key, func() *swappableMetricHandle { - maker := func(client Client) MetricHandle { - switch kind { - case transport.CountMetric: - return client.Count(namespace, name, tags) - case transport.RateMetric: - return client.Rate(namespace, name, tags) - case transport.GaugeMetric: - return client.Gauge(namespace, name, tags) - case transport.DistMetric: - return client.Distribution(namespace, name, tags) - } - log.Warn("telemetry: unknown metric type %q", kind) - return nil - } - wrapper := &swappableMetricHandle{maker: maker} - if client := globalClient.Load(); client == nil || *client == nil { - wrapper.recorder = internal.NewRecorder[MetricHandle]() - } - globalClientCall(func(client Client) { - wrapper.swap(maker(client)) - }) - return wrapper - }) - return hotPtr -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/integration.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/integration.go deleted file mode 100644 index 9df61d9154..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/integration.go +++ /dev/null @@ -1,41 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type integrations struct { - mu sync.Mutex - integrations []transport.Integration -} - -func (i *integrations) Add(integration Integration) { - i.mu.Lock() - defer i.mu.Unlock() - i.integrations = append(i.integrations, transport.Integration{ - Name: integration.Name, - Version: integration.Version, - Enabled: integration.Error == "", // no error means the integration was enabled successfully - Error: integration.Error, - }) -} - -func (i *integrations) Payload() transport.Payload { - i.mu.Lock() - defer i.mu.Unlock() - if len(i.integrations) == 0 { - return nil - } - integrations := i.integrations - i.integrations = nil - return transport.AppIntegrationChange{ - Integrations: integrations, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metric.golang.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metric.golang.go deleted file mode 100644 index da51ebcf19..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metric.golang.go +++ /dev/null @@ -1,14 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -// Code generated by 'go run github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/generator'; DO NOT EDIT. - -package knownmetrics - -var golangMetrics = []Declaration{ - { Type: "count", Name: "errorstack.source" }, - { Type: "distribution", Name: "errorstack.duration" }, - { Type: "gauge", Name: "orchestrion.enabled" }, -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.common.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.common.go deleted file mode 100644 index 1c2925f127..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.common.go +++ /dev/null @@ -1,227 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -// Code generated by 'go run github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/generator'; DO NOT EDIT. - -package knownmetrics - -var commonMetrics = []Declaration{ - { Namespace: "appsec", Type: "count", Name: "api_security.missing_route" }, - { Namespace: "appsec", Type: "count", Name: "api_security.request.no_schema" }, - { Namespace: "appsec", Type: "count", Name: "api_security.request.schema" }, - { Namespace: "appsec", Type: "count", Name: "instrum.user_auth.missing_user_id" }, - { Namespace: "appsec", Type: "count", Name: "instrum.user_auth.missing_user_login" }, - { Namespace: "appsec", Type: "count", Name: "rasp.error" }, - { Namespace: "appsec", Type: "count", Name: "rasp.rule.eval" }, - { Namespace: "appsec", Type: "count", Name: "rasp.rule.match" }, - { Namespace: "appsec", Type: "count", Name: "rasp.rule.skipped" }, - { Namespace: "appsec", Type: "count", Name: "rasp.timeout" }, - { Namespace: "appsec", Type: "count", Name: "sdk.event" }, - { Namespace: "appsec", Type: "count", Name: "waf.config_errors" }, - { Namespace: "appsec", Type: "count", Name: "waf.error" }, - { Namespace: "appsec", Type: "count", Name: "waf.init" }, - { Namespace: "appsec", Type: "count", Name: "waf.input_truncated" }, - { Namespace: "appsec", Type: "count", Name: "waf.requests" }, - { Namespace: "appsec", Type: "count", Name: "waf.updates" }, - { Namespace: "appsec", Type: "distribution", Name: "rasp.duration" }, - { Namespace: "appsec", Type: "distribution", Name: "rasp.duration_ext" }, - { Namespace: "appsec", Type: "distribution", Name: "waf.duration" }, - { Namespace: "appsec", Type: "distribution", Name: "waf.duration_ext" }, - { Namespace: "appsec", Type: "distribution", Name: "waf.truncated_value_size" }, - { Namespace: "appsec", Type: "gauge", Name: "enabled" }, - { Namespace: "civisibility", Type: "count", Name: "code_coverage.errors" }, - { Namespace: "civisibility", Type: "count", Name: "code_coverage.is_empty" }, - { Namespace: "civisibility", Type: "count", Name: "code_coverage_finished" }, - { Namespace: "civisibility", Type: "count", Name: "code_coverage_started" }, - { Namespace: "civisibility", Type: "count", Name: "early_flake_detection.request" }, - { Namespace: "civisibility", Type: "count", Name: "early_flake_detection.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "endpoint_payload.dropped" }, - { Namespace: "civisibility", Type: "count", Name: "endpoint_payload.requests" }, - { Namespace: "civisibility", Type: "count", Name: "endpoint_payload.requests_errors" }, - { Namespace: "civisibility", Type: "count", Name: "event_created" }, - { Namespace: "civisibility", Type: "count", Name: "event_finished" }, - { Namespace: "civisibility", Type: "count", Name: "events_enqueued_for_serialization" }, - { Namespace: "civisibility", Type: "count", Name: "flaky_tests.request" }, - { Namespace: "civisibility", Type: "count", Name: "flaky_tests.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "git.command" }, - { Namespace: "civisibility", Type: "count", Name: "git.command_errors" }, - { Namespace: "civisibility", Type: "count", Name: "git.commit_sha_discrepancy" }, - { Namespace: "civisibility", Type: "count", Name: "git.commit_sha_match" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.objects_pack" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.objects_pack_errors" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.search_commits" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.search_commits_errors" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.settings" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.settings_errors" }, - { Namespace: "civisibility", Type: "count", Name: "git_requests.settings_response" }, - { Namespace: "civisibility", Type: "count", Name: "impacted_tests_detection.request" }, - { Namespace: "civisibility", Type: "count", Name: "impacted_tests_detection.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "itr_forced_run" }, - { Namespace: "civisibility", Type: "count", Name: "itr_skippable_tests.request" }, - { Namespace: "civisibility", Type: "count", Name: "itr_skippable_tests.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "itr_skippable_tests.response_suites" }, - { Namespace: "civisibility", Type: "count", Name: "itr_skippable_tests.response_tests" }, - { Namespace: "civisibility", Type: "count", Name: "itr_skipped" }, - { Namespace: "civisibility", Type: "count", Name: "itr_unskippable" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.http_endpoint.dropped" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.http_endpoint.requests" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.http_endpoint.requests_errors" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.logs.dropped" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.logs.submitted" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.traces.dropped" }, - { Namespace: "civisibility", Type: "count", Name: "jenkins.traces.submitted" }, - { Namespace: "civisibility", Type: "count", Name: "known_tests.request" }, - { Namespace: "civisibility", Type: "count", Name: "known_tests.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "manual_api_events" }, - { Namespace: "civisibility", Type: "count", Name: "test_management_tests.request" }, - { Namespace: "civisibility", Type: "count", Name: "test_management_tests.request_errors" }, - { Namespace: "civisibility", Type: "count", Name: "test_session" }, - { Namespace: "civisibility", Type: "distribution", Name: "code_coverage.files" }, - { Namespace: "civisibility", Type: "distribution", Name: "early_flake_detection.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "early_flake_detection.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "early_flake_detection.response_tests" }, - { Namespace: "civisibility", Type: "distribution", Name: "endpoint_payload.bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "endpoint_payload.events_count" }, - { Namespace: "civisibility", Type: "distribution", Name: "endpoint_payload.events_serialization_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "endpoint_payload.requests_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "flaky_tests.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "flaky_tests.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "flaky_tests.response_tests" }, - { Namespace: "civisibility", Type: "distribution", Name: "git.command_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "git_requests.objects_pack_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "git_requests.objects_pack_files" }, - { Namespace: "civisibility", Type: "distribution", Name: "git_requests.objects_pack_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "git_requests.search_commits_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "git_requests.settings_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "impacted_tests_detection.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "impacted_tests_detection.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "impacted_tests_detection.response_files" }, - { Namespace: "civisibility", Type: "distribution", Name: "itr_skippable_tests.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "itr_skippable_tests.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "jenkins.http_endpoint.bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "jenkins.http_endpoint.events_count" }, - { Namespace: "civisibility", Type: "distribution", Name: "jenkins.http_endpoint.requests_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "known_tests.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "known_tests.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "known_tests.response_tests" }, - { Namespace: "civisibility", Type: "distribution", Name: "test_management_tests.request_ms" }, - { Namespace: "civisibility", Type: "distribution", Name: "test_management_tests.response_bytes" }, - { Namespace: "civisibility", Type: "distribution", Name: "test_management_tests.response_tests" }, - { Namespace: "general", Type: "count", Name: "logs_created" }, - { Namespace: "general", Type: "distribution", Name: "init_time" }, - { Namespace: "general", Type: "distribution", Name: "tracer_init_time" }, - { Namespace: "iast", Type: "count", Name: "executed.propagation" }, - { Namespace: "iast", Type: "count", Name: "executed.sink" }, - { Namespace: "iast", Type: "count", Name: "executed.source" }, - { Namespace: "iast", Type: "count", Name: "executed.tainted" }, - { Namespace: "iast", Type: "count", Name: "instrumented.propagation" }, - { Namespace: "iast", Type: "count", Name: "instrumented.sink" }, - { Namespace: "iast", Type: "count", Name: "instrumented.source" }, - { Namespace: "iast", Type: "count", Name: "json.tag.size.exceeded" }, - { Namespace: "iast", Type: "count", Name: "request.tainted" }, - { Namespace: "iast", Type: "count", Name: "suppressed.vulnerabilities" }, - { Namespace: "mlobs", Type: "count", Name: "activate_distributed_headers" }, - { Namespace: "mlobs", Type: "count", Name: "annotations" }, - { Namespace: "mlobs", Type: "count", Name: "dropped_eval_events" }, - { Namespace: "mlobs", Type: "count", Name: "dropped_span_events" }, - { Namespace: "mlobs", Type: "count", Name: "evals_submitted" }, - { Namespace: "mlobs", Type: "count", Name: "evaluators.error" }, - { Namespace: "mlobs", Type: "count", Name: "evaluators.init" }, - { Namespace: "mlobs", Type: "count", Name: "evaluators.run" }, - { Namespace: "mlobs", Type: "count", Name: "inject_distributed_headers" }, - { Namespace: "mlobs", Type: "count", Name: "product_enabled" }, - { Namespace: "mlobs", Type: "count", Name: "span.finished" }, - { Namespace: "mlobs", Type: "count", Name: "span.start" }, - { Namespace: "mlobs", Type: "count", Name: "spans_exported" }, - { Namespace: "mlobs", Type: "count", Name: "user_flush" }, - { Namespace: "mlobs", Type: "count", Name: "user_processor_called" }, - { Namespace: "mlobs", Type: "distribution", Name: "evaluators.rule_sample_rate" }, - { Namespace: "mlobs", Type: "distribution", Name: "init_time" }, - { Namespace: "mlobs", Type: "distribution", Name: "span.raw_size" }, - { Namespace: "mlobs", Type: "distribution", Name: "span.size" }, - { Namespace: "profilers", Type: "count", Name: "profile_api.errors" }, - { Namespace: "profilers", Type: "count", Name: "profile_api.requests" }, - { Namespace: "profilers", Type: "count", Name: "profile_api.responses" }, - { Namespace: "profilers", Type: "distribution", Name: "profile_api.bytes" }, - { Namespace: "profilers", Type: "distribution", Name: "profile_api.ms" }, - { Namespace: "rum", Type: "count", Name: "injection.content_security_policy" }, - { Namespace: "rum", Type: "count", Name: "injection.failed" }, - { Namespace: "rum", Type: "count", Name: "injection.initialization.failed" }, - { Namespace: "rum", Type: "count", Name: "injection.initialization.succeed" }, - { Namespace: "rum", Type: "count", Name: "injection.installation" }, - { Namespace: "rum", Type: "count", Name: "injection.skipped" }, - { Namespace: "rum", Type: "count", Name: "injection.succeed" }, - { Namespace: "rum", Type: "distribution", Name: "injection.installation.duration" }, - { Namespace: "rum", Type: "distribution", Name: "injection.ms" }, - { Namespace: "rum", Type: "distribution", Name: "injection.response.bytes" }, - { Namespace: "sidecar", Type: "count", Name: "server.submitted_payloads" }, - { Namespace: "sidecar", Type: "distribution", Name: "server.memory_usage" }, - { Namespace: "sidecar", Type: "gauge", Name: "server.active_sessions" }, - { Namespace: "telemetry", Type: "count", Name: "telemetry_api.errors" }, - { Namespace: "telemetry", Type: "count", Name: "telemetry_api.requests" }, - { Namespace: "telemetry", Type: "count", Name: "telemetry_api.responses" }, - { Namespace: "telemetry", Type: "distribution", Name: "telemetry_api.bytes" }, - { Namespace: "telemetry", Type: "distribution", Name: "telemetry_api.ms" }, - { Namespace: "tracers", Type: "count", Name: "context_header.truncated" }, - { Namespace: "tracers", Type: "count", Name: "context_header_style.extracted" }, - { Namespace: "tracers", Type: "count", Name: "context_header_style.injected" }, - { Namespace: "tracers", Type: "count", Name: "docker_lib_injection.failure" }, - { Namespace: "tracers", Type: "count", Name: "docker_lib_injection.success" }, - { Namespace: "tracers", Type: "count", Name: "exporter_fallback" }, - { Namespace: "tracers", Type: "count", Name: "host_lib_injection.failure" }, - { Namespace: "tracers", Type: "count", Name: "host_lib_injection.success" }, - { Namespace: "tracers", Type: "count", Name: "inject.error" }, - { Namespace: "tracers", Type: "count", Name: "inject.language_detection" }, - { Namespace: "tracers", Type: "count", Name: "inject.skip" }, - { Namespace: "tracers", Type: "count", Name: "inject.success" }, - { Namespace: "tracers", Type: "count", Name: "integration_errors" }, - { Namespace: "tracers", Type: "count", Name: "k8s_lib_injection.failure" }, - { Namespace: "tracers", Type: "count", Name: "k8s_lib_injection.success" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.abort" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.abort.integration" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.abort.runtime" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.complete" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.error" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.injector.error" }, - { Namespace: "tracers", Type: "count", Name: "library_entrypoint.start" }, - { Namespace: "tracers", Type: "count", Name: "otel.env.hiding" }, - { Namespace: "tracers", Type: "count", Name: "otel.env.invalid" }, - { Namespace: "tracers", Type: "count", Name: "otel.env.unsupported" }, - { Namespace: "tracers", Type: "count", Name: "public_api.called" }, - { Namespace: "tracers", Type: "count", Name: "span_created" }, - { Namespace: "tracers", Type: "count", Name: "span_finished" }, - { Namespace: "tracers", Type: "count", Name: "span_pointer_calculation" }, - { Namespace: "tracers", Type: "count", Name: "span_pointer_calculation.issue" }, - { Namespace: "tracers", Type: "count", Name: "spans_created" }, - { Namespace: "tracers", Type: "count", Name: "spans_dropped" }, - { Namespace: "tracers", Type: "count", Name: "spans_enqueued_for_serialization" }, - { Namespace: "tracers", Type: "count", Name: "spans_finished" }, - { Namespace: "tracers", Type: "count", Name: "stats_api.errors" }, - { Namespace: "tracers", Type: "count", Name: "stats_api.requests" }, - { Namespace: "tracers", Type: "count", Name: "stats_api.responses" }, - { Namespace: "tracers", Type: "count", Name: "trace_api.errors" }, - { Namespace: "tracers", Type: "count", Name: "trace_api.requests" }, - { Namespace: "tracers", Type: "count", Name: "trace_api.responses" }, - { Namespace: "tracers", Type: "count", Name: "trace_chunks_dropped" }, - { Namespace: "tracers", Type: "count", Name: "trace_chunks_enqueued" }, - { Namespace: "tracers", Type: "count", Name: "trace_chunks_enqueued_for_serialization" }, - { Namespace: "tracers", Type: "count", Name: "trace_chunks_sent" }, - { Namespace: "tracers", Type: "count", Name: "trace_partial_flush.count" }, - { Namespace: "tracers", Type: "count", Name: "trace_segments_closed" }, - { Namespace: "tracers", Type: "count", Name: "trace_segments_created" }, - { Namespace: "tracers", Type: "distribution", Name: "inject.latency.baseline" }, - { Namespace: "tracers", Type: "distribution", Name: "inject.latency.end_to_end" }, - { Namespace: "tracers", Type: "distribution", Name: "inject.latency.init_container" }, - { Namespace: "tracers", Type: "distribution", Name: "stats_api.bytes" }, - { Namespace: "tracers", Type: "distribution", Name: "stats_api.ms" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_api.bytes" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_api.ms" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_chunk_serialization.bytes" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_chunk_serialization.ms" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_chunk_size" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_partial_flush.spans_closed" }, - { Namespace: "tracers", Type: "distribution", Name: "trace_partial_flush.spans_remaining" }, - { Namespace: "tracers", Type: "gauge", Name: "stats_buckets" }, -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.go deleted file mode 100644 index f32e77168b..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics/known_metrics.go +++ /dev/null @@ -1,61 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package knownmetrics - -import ( - "slices" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type Declaration struct { - Namespace transport.Namespace `json:"namespace"` - Type transport.MetricType `json:"type"` - Name string `json:"name"` -} - -// IsKnownMetric returns true if the given metric name is a known metric by the backend -// This is linked to generated common_metrics.json file and golang_metrics.json file. If you added new metrics to the backend, you should rerun the generator. -func IsKnownMetric(namespace transport.Namespace, typ transport.MetricType, name string) bool { - return IsCommonMetric(namespace, typ, name) || IsLanguageMetric(typ, name) -} - -// IsCommonMetric returns true if the given metric name is a known common (cross-language) metric by the backend -// This is linked to the generated common_metrics.json file. If you added new metrics to the backend, you should rerun the generator. -func IsCommonMetric(namespace transport.Namespace, typ transport.MetricType, name string) bool { - decl := Declaration{Namespace: namespace, Type: typ, Name: name} - return slices.Contains(commonMetrics, decl) -} - -// Size returns the total number of known metrics, including common and golang metrics -func Size() int { - return len(commonMetrics) + len(golangMetrics) -} - -// SizeWithFilter returns the total number of known metrics, including common and golang metrics, that pass the given filter -func SizeWithFilter(filter func(Declaration) bool) int { - size := 0 - for _, decl := range commonMetrics { - if filter(decl) { - size++ - } - } - - for _, decl := range golangMetrics { - if filter(decl) { - size++ - } - } - - return size -} - -// IsLanguageMetric returns true if the given metric name is a known Go language metric by the backend -// This is linked to the generated golang_metrics.json file. If you added new metrics to the backend, you should rerun the generator. -func IsLanguageMetric(typ transport.MetricType, name string) bool { - decl := Declaration{Type: typ, Name: name} - return slices.Contains(golangMetrics, decl) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_closing.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_closing.go deleted file mode 100644 index da47f19fca..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_closing.go +++ /dev/null @@ -1,23 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package mapper - -import ( - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// NewAppClosingMapper returns a new Mapper that appends an AppClosing payload to the given payloads and calls the underlying Mapper with it. -func NewAppClosingMapper(next Mapper) Mapper { - return &appClosingEnricher{next: next} -} - -type appClosingEnricher struct { - next Mapper -} - -func (t *appClosingEnricher) Transform(payloads []transport.Payload) ([]transport.Payload, Mapper) { - return t.next.Transform(append(payloads, transport.AppClosing{})) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_started.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_started.go deleted file mode 100644 index 3f00575d48..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/app_started.go +++ /dev/null @@ -1,48 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package mapper - -import ( - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type appStartedReducer struct { - next Mapper -} - -// NewAppStartedMapper returns a new Mapper that adds an AppStarted payload to the beginning of all payloads -// and pass it down to irs underlying mapper. -// The AppStarted payload ingest the [transport.AppClientConfigurationChange] and [transport.AppProductChange] payloads -func NewAppStartedMapper(next Mapper) Mapper { - return &appStartedReducer{next: next} -} - -func (t *appStartedReducer) Transform(payloads []transport.Payload) ([]transport.Payload, Mapper) { - appStarted := transport.AppStarted{ - InstallSignature: transport.InstallSignature{ - InstallID: globalconfig.InstrumentationInstallID(), - InstallType: globalconfig.InstrumentationInstallType(), - InstallTime: globalconfig.InstrumentationInstallTime(), - }, - } - - payloadLefts := make([]transport.Payload, 0, len(payloads)) - for _, payload := range payloads { - switch payload := payload.(type) { - case transport.AppClientConfigurationChange: - appStarted.Configuration = payload.Configuration - case transport.AppProductChange: - appStarted.Products = payload.Products - default: - payloadLefts = append(payloadLefts, payload) - } - } - - // The app-started event should be the first event in the payload and not in an message-batch - payloads, mapper := t.next.Transform(payloadLefts) - return append([]transport.Payload{appStarted}, payloads...), mapper -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/default.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/default.go deleted file mode 100644 index 313597dac2..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/default.go +++ /dev/null @@ -1,98 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package mapper - -import ( - "time" - - "golang.org/x/time/rate" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// NewDefaultMapper returns a Mapper that transforms payloads into a MessageBatch and adds a heartbeat message. -// The heartbeat message is added every heartbeatInterval. -func NewDefaultMapper(heartbeatInterval, extendedHeartBeatInterval time.Duration) Mapper { - mapper := &defaultMapper{ - heartbeatEnricher: heartbeatEnricher{ - heartbeatRL: rate.NewLimiter(rate.Every(heartbeatInterval), 1), - extendedHeartbeatRL: rate.NewLimiter(rate.Every(extendedHeartBeatInterval), 1), - }, - } - - // The rate limiter is initialized with a token, but we want the first heartbeat to be sent in one minute, so we consume the token - mapper.heartbeatEnricher.heartbeatRL.Allow() - mapper.heartbeatEnricher.extendedHeartbeatRL.Allow() - return mapper -} - -type defaultMapper struct { - heartbeatEnricher - messageBatchReducer -} - -func (t *defaultMapper) Transform(payloads []transport.Payload) ([]transport.Payload, Mapper) { - payloads, _ = t.heartbeatEnricher.Transform(payloads) - payloads, _ = t.messageBatchReducer.Transform(payloads) - return payloads, t -} - -type messageBatchReducer struct{} - -func (t *messageBatchReducer) Transform(payloads []transport.Payload) ([]transport.Payload, Mapper) { - if len(payloads) <= 1 { - return payloads, t - } - - messages := make([]transport.Message, len(payloads)) - for i, payload := range payloads { - messages[i] = transport.Message{ - RequestType: payload.RequestType(), - Payload: payload, - } - } - - return []transport.Payload{transport.MessageBatch(messages)}, t -} - -type heartbeatEnricher struct { - heartbeatRL *rate.Limiter - extendedHeartbeatRL *rate.Limiter - - extendedHeartbeat transport.AppExtendedHeartbeat - heartbeat transport.AppHeartbeat -} - -func (t *heartbeatEnricher) Transform(payloads []transport.Payload) ([]transport.Payload, Mapper) { - // Built the extended heartbeat using other payloads - // Composition described here: - // https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/producing-telemetry.md#app-extended-heartbeat - for _, payload := range payloads { - switch payload := payload.(type) { - case transport.AppStarted: - // Should be sent only once anyway - t.extendedHeartbeat.Configuration = payload.Configuration - case transport.AppDependenciesLoaded: - if t.extendedHeartbeat.Dependencies == nil { - t.extendedHeartbeat.Dependencies = payload.Dependencies - } - case transport.AppIntegrationChange: - // The number of integrations should be small enough so we can just append to the list - t.extendedHeartbeat.Integrations = append(t.extendedHeartbeat.Integrations, payload.Integrations...) - } - } - - if t.extendedHeartbeatRL.Allow() { - return append(payloads, t.extendedHeartbeat), t - } - - if t.heartbeatRL.Allow() { - return append(payloads, t.heartbeat), t - } - - // We don't send anything - return payloads, t -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/mapper.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/mapper.go deleted file mode 100644 index 116c4ffd0d..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper/mapper.go +++ /dev/null @@ -1,17 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package mapper - -import ( - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// Mapper is an interface for transforming payloads to comply with different types of lifecycle events in the application. -type Mapper interface { - // Transform transforms the given payloads and returns the transformed payloads and the Mapper to use for the next - // transformation at the next flush a minute later - Transform([]transport.Payload) ([]transport.Payload, Mapper) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/range.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/range.go deleted file mode 100644 index c2e1e1852f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/range.go +++ /dev/null @@ -1,39 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "cmp" -) - -// Range is a type that represents a range of values. -type Range[T cmp.Ordered] struct { - Min T - Max T -} - -// IsOrdered checks if the range is ordered. e.g. Min <= Max. -func (r Range[T]) IsOrdered() bool { - return r.Min <= r.Max -} - -// Contains checks if a value is within the range. -func (r Range[T]) Contains(value T) bool { - return value >= r.Min && value <= r.Max -} - -// Clamp squeezes a value between a minimum and maximum value. -func (r Range[T]) Clamp(value T) T { - return max(min(r.Max, value), r.Min) -} - -// ReduceMax returns a new range where value is the new max and min is either the current min or the new value to make sure the range is ordered. -func (r Range[T]) ReduceMax(value T) Range[T] { - return Range[T]{ - Min: min(r.Min, value), - Max: value, - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/recorder.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/recorder.go deleted file mode 100644 index 69c6fdd7f4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/recorder.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -// Recorder is a generic thread-safe type that records functions that could have taken place before object T was created. -// Once object T is created, the Recorder can replay all the recorded functions with object T as an argument. -type Recorder[T any] struct { - queue *RingQueue[func(T)] -} - -// TODO: tweak these values once we get telemetry data from the telemetry client -var queueCap = Range[int]{ - Min: 16, // Initial queue capacity - Max: 512, // Maximum queue capacity -} - -// NewRecorder creates a new [Recorder] instance. with 512 as the maximum number of recorded functions before overflowing. -func NewRecorder[T any]() Recorder[T] { - return Recorder[T]{ - queue: NewRingQueue[func(T)](queueCap), - } -} - -// Record takes a function and records it in the [Recorder]'s queue. If the queue is full, it returns false. -// Once [Recorder.Replay] is called, all recorded functions will be replayed with object T as an argument in order of recording. -func (r Recorder[T]) Record(f func(T)) bool { - if r.queue == nil { - return true - } - return r.queue.Enqueue(f) -} - -// Replay uses T as an argument to replay all recorded functions in order of recording. -func (r Recorder[T]) Replay(t T) { - if r.queue == nil { - return - } - for { - f := r.queue.Dequeue() - if f == nil { - break - } - f(t) - } -} - -// Clear clears the Recorder's queue. -func (r Recorder[T]) Clear() { - r.queue.Clear() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ringbuffer.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ringbuffer.go deleted file mode 100644 index 3d2d31acf4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ringbuffer.go +++ /dev/null @@ -1,195 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package internal - -import ( - "sync" -) - -// RingQueue is a thread-safe ring buffer can be used to store a fixed number of elements and overwrite old values when full. -type RingQueue[T any] struct { - buffer []T - head, tail, count int - // mu is the lock for the buffer, head and tail. - mu sync.Mutex - // pool is the pool of buffers. Normally there should only be one or 2 buffers in the pool. - pool *SyncPool[[]T] - // BufferSizes is the range of buffer sizes that the ring queue can have. - BufferSizes Range[int] -} - -// NewRingQueue creates a new RingQueue with a minimum size and a maximum size. -func NewRingQueue[T any](rang Range[int]) *RingQueue[T] { - return &RingQueue[T]{ - buffer: make([]T, rang.Min), - pool: NewSyncPool[[]T](func() []T { return make([]T, rang.Min) }), - BufferSizes: rang, - } -} - -// NewRingQueueWithPool creates a new RingQueue with a minimum size, a maximum size and a pool. Make sure the pool is properly initialized with the right type -func NewRingQueueWithPool[T any](rang Range[int], pool *SyncPool[[]T]) *RingQueue[T] { - return &RingQueue[T]{ - buffer: make([]T, rang.Min), - pool: pool, - BufferSizes: rang, - } -} - -// Length returns the number of elements currently stored in the queue. -func (rq *RingQueue[T]) Length() int { - rq.mu.Lock() - defer rq.mu.Unlock() - - return rq.count -} - -func (rq *RingQueue[T]) resizeLocked() { - newBuf := make([]T, rq.BufferSizes.Clamp(rq.count*2)) - defer rq.releaseBuffer(rq.buffer) - - if rq.tail > rq.head { - copy(newBuf, rq.buffer[rq.head:rq.tail]) - } else { - n := copy(newBuf, rq.buffer[rq.head:]) - copy(newBuf[n:], rq.buffer[:rq.tail]) - } - - rq.head = 0 - rq.tail = rq.count - rq.buffer = newBuf -} - -func (rq *RingQueue[T]) enqueueLocked(elem T) bool { - spaceLeft := true - if rq.count == len(rq.buffer) { - if len(rq.buffer) == rq.BufferSizes.Max { - spaceLeft = false - // bitwise modulus - rq.head = (rq.head + 1) % len(rq.buffer) - rq.count-- - } else { - rq.resizeLocked() - } - } - - rq.buffer[rq.tail] = elem - rq.tail = (rq.tail + 1) % len(rq.buffer) - rq.count++ - return spaceLeft -} - -// ReversePeek returns the last element that was enqueued without removing it. -func (rq *RingQueue[T]) ReversePeek() T { - rq.mu.Lock() - defer rq.mu.Unlock() - if rq.count == 0 { - var zero T - return zero - } - return rq.buffer[(rq.tail-1+len(rq.buffer))%len(rq.buffer)] -} - -// Enqueue adds one or multiple values to the buffer. Returns false if at least one item had to be pulled out from the queue to make space for new ones -func (rq *RingQueue[T]) Enqueue(vals ...T) bool { - rq.mu.Lock() - defer rq.mu.Unlock() - if len(vals) == 0 { - return true - } - - spaceLeft := true - for _, val := range vals { - spaceLeft = rq.enqueueLocked(val) - } - return spaceLeft -} - -// Dequeue removes a value from the buffer. -func (rq *RingQueue[T]) Dequeue() T { - rq.mu.Lock() - defer rq.mu.Unlock() - - if rq.count == 0 { - var zero T - return zero - } - - ret := rq.buffer[rq.head] - // bitwise modulus - rq.head = (rq.head + 1) % len(rq.buffer) - rq.count-- - return ret -} - -// getBuffer returns the current buffer and resets it. -func (rq *RingQueue[T]) getBuffer() []T { - rq.mu.Lock() - defer rq.mu.Unlock() - return rq.getBufferLocked() -} - -func (rq *RingQueue[T]) getBufferLocked() []T { - prevBuf := rq.buffer - rq.buffer = rq.pool.Get() - rq.head, rq.tail, rq.count = 0, 0, 0 - return prevBuf -} - -// Flush returns a copy of the buffer and resets it. -func (rq *RingQueue[T]) Flush() []T { - rq.mu.Lock() - head, count := rq.head, rq.count - buf := rq.getBufferLocked() - rq.mu.Unlock() - - // If the buffer is less than 12.5% full, we let the buffer get garbage collected because it's too big for the current throughput. - // Except when the buffer is at its minimum size. - if len(buf) == rq.BufferSizes.Min || count*8 >= len(buf) { - defer rq.releaseBuffer(buf) - } - - copyBuf := make([]T, count) - for i := 0; i < count; i++ { - copyBuf[i] = buf[(head+i)%len(buf)] - } - - return copyBuf -} - -// releaseBuffer returns the buffer to the pool. -func (rq *RingQueue[T]) releaseBuffer(buf []T) { - var zero T - buf = buf[:cap(buf)] // Make sure nobody reduced the length of the buffer - for i := range buf { - buf[i] = zero - } - rq.pool.Put(buf) -} - -// IsEmpty returns true if the buffer is empty. -func (rq *RingQueue[T]) IsEmpty() bool { - return rq.Length() == 0 -} - -// IsFull returns true if the buffer is full and cannot accept more elements. -func (rq *RingQueue[T]) IsFull() bool { - rq.mu.Lock() - defer rq.mu.Unlock() - - return len(rq.buffer) == rq.count && len(rq.buffer) == rq.BufferSizes.Max -} - -// Clear removes all elements from the buffer. -func (rq *RingQueue[T]) Clear() { - rq.mu.Lock() - defer rq.mu.Unlock() - rq.head, rq.tail, rq.count = 0, 0, 0 - var zero T - for i := range rq.buffer { - rq.buffer[i] = zero - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/syncpool.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/syncpool.go deleted file mode 100644 index 29ab2f9b1e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/syncpool.go +++ /dev/null @@ -1,34 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "sync" -) - -// SyncPool is a wrapper around [sync.Pool] that provides type safety. -type SyncPool[T any] struct { - pool *sync.Pool -} - -// NewSyncPool creates a new Pool with the given new function. -func NewSyncPool[T any](newT func() T) *SyncPool[T] { - return &SyncPool[T]{ - pool: &sync.Pool{ - New: func() any { - return newT() - }, - }, - } -} - -func (sp *SyncPool[T]) Get() T { - return sp.pool.Get().(T) -} - -func (sp *SyncPool[T]) Put(v T) { - sp.pool.Put(v) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ticker.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ticker.go deleted file mode 100644 index 4d43a624ba..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/ticker.go +++ /dev/null @@ -1,92 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -type TickFunc func() - -type Ticker struct { - ticker *time.Ticker - - tickSpeedMu sync.Mutex - tickSpeed time.Duration - - interval Range[time.Duration] - - tickFunc TickFunc - - stopChan chan struct{} - stopped bool -} - -func NewTicker(tickFunc TickFunc, interval Range[time.Duration]) *Ticker { - ticker := &Ticker{ - ticker: time.NewTicker(interval.Max), - tickSpeed: interval.Max, - interval: interval, - tickFunc: tickFunc, - stopChan: make(chan struct{}), - } - - go func() { - for { - select { - case <-ticker.ticker.C: - tickFunc() - case <-ticker.stopChan: - return - } - } - }() - - return ticker -} - -func (t *Ticker) CanIncreaseSpeed() { - t.tickSpeedMu.Lock() - defer t.tickSpeedMu.Unlock() - - oldTickSpeed := t.tickSpeed - t.tickSpeed = t.interval.Clamp(t.tickSpeed / 2) - - if oldTickSpeed == t.tickSpeed { - return - } - - log.Debug("telemetry: increasing flush speed to an interval of %s", t.tickSpeed) - t.ticker.Reset(t.tickSpeed) -} - -func (t *Ticker) CanDecreaseSpeed() { - t.tickSpeedMu.Lock() - defer t.tickSpeedMu.Unlock() - - oldTickSpeed := t.tickSpeed - t.tickSpeed = t.interval.Clamp(t.tickSpeed * 2) - - if oldTickSpeed == t.tickSpeed { - return - } - - log.Debug("telemetry: decreasing flush speed to an interval of %s", t.tickSpeed) - t.ticker.Reset(t.tickSpeed) -} - -func (t *Ticker) Stop() { - if t.stopped { - return - } - t.ticker.Stop() - t.stopChan <- struct{}{} - close(t.stopChan) - t.stopped = true -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/tracerconfig.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/tracerconfig.go deleted file mode 100644 index 439ff430f3..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/tracerconfig.go +++ /dev/null @@ -1,16 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -// TracerConfig is the configuration for the tracer for the telemetry client. -type TracerConfig struct { - // Service is the name of the service being traced. - Service string - // Env is the environment the service is running in. - Env string - // Version is the version of the service. - Version string -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_closing.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_closing.go deleted file mode 100644 index 11516d34e5..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_closing.go +++ /dev/null @@ -1,12 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppClosing struct{} - -func (AppClosing) RequestType() RequestType { - return RequestTypeAppClosing -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_configuration_change.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_configuration_change.go deleted file mode 100644 index d6ef75de7a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_configuration_change.go +++ /dev/null @@ -1,14 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppClientConfigurationChange struct { - Configuration []ConfKeyValue `json:"configuration"` -} - -func (AppClientConfigurationChange) RequestType() RequestType { - return RequestTypeAppClientConfigurationChange -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_dependencies_loaded.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_dependencies_loaded.go deleted file mode 100644 index 425b01bb9a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_dependencies_loaded.go +++ /dev/null @@ -1,21 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppDependenciesLoaded struct { - Dependencies []Dependency `json:"dependencies"` -} - -func (AppDependenciesLoaded) RequestType() RequestType { - return RequestTypeAppDependenciesLoaded -} - -// Dependency is a Go module on which the application depends. This information -// can be accesed at run-time through the runtime/debug.ReadBuildInfo API. -type Dependency struct { - Name string `json:"name"` - Version string `json:"version,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_extended_heartbeat.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_extended_heartbeat.go deleted file mode 100644 index 62f0e5fed1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_extended_heartbeat.go +++ /dev/null @@ -1,16 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppExtendedHeartbeat struct { - Configuration []ConfKeyValue `json:"configuration,omitempty"` - Dependencies []Dependency `json:"dependencies,omitempty"` - Integrations []Integration `json:"integrations,omitempty"` -} - -func (AppExtendedHeartbeat) RequestType() RequestType { - return RequestTypeAppExtendedHeartBeat -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_heartbeat.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_heartbeat.go deleted file mode 100644 index f2d4bab392..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_heartbeat.go +++ /dev/null @@ -1,16 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// All objects in this file are used to define the payload of the requests sent -// to the telemetry API. -// https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/dad49961203d74ec8236b68ce4b54bbb7ed8716f/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas - -type AppHeartbeat struct{} - -func (AppHeartbeat) RequestType() RequestType { - return RequestTypeAppHeartbeat -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_integration_change.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_integration_change.go deleted file mode 100644 index 20244f033c..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_integration_change.go +++ /dev/null @@ -1,24 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppIntegrationChange struct { - Integrations []Integration `json:"integrations"` -} - -func (AppIntegrationChange) RequestType() RequestType { - return RequestTypeAppIntegrationsChange -} - -// Integration is an integration that is configured to be traced automatically. -type Integration struct { - Name string `json:"name"` - Enabled bool `json:"enabled"` - Version string `json:"version,omitempty"` - AutoEnabled bool `json:"auto_enabled,omitempty"` - Compatible bool `json:"compatible,omitempty"` - Error string `json:"error,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_product_change.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_product_change.go deleted file mode 100644 index dcbf2ec674..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_product_change.go +++ /dev/null @@ -1,22 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type AppProductChange struct { - Products Products `json:"products"` -} - -type Products map[Namespace]Product - -func (AppProductChange) RequestType() RequestType { - return RequestTypeAppProductChange -} - -type Product struct { - Version string `json:"version,omitempty"` - Enabled bool `json:"enabled"` - Error Error `json:"error,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_started.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_started.go deleted file mode 100644 index 3753d78926..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/app_started.go +++ /dev/null @@ -1,37 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// All objects in this file are used to define the payload of the requests sent -// to the telemetry API. -// https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/dad49961203d74ec8236b68ce4b54bbb7ed8716f/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas - -type AppStarted struct { - Products Products `json:"products,omitempty"` - Configuration []ConfKeyValue `json:"configuration,omitempty"` - Error Error `json:"error,omitempty"` - InstallSignature InstallSignature `json:"install_signature,omitempty"` - AdditionalPayload []AdditionalPayload `json:"additional_payload,omitempty"` -} - -func (AppStarted) RequestType() RequestType { - return RequestTypeAppStarted -} - -// InstallSignature is a structure to send the install signature with the -// AppStarted payload. -type InstallSignature struct { - InstallID string `json:"install_id,omitempty"` - InstallType string `json:"install_type,omitempty"` - InstallTime string `json:"install_time,omitempty"` -} - -// AdditionalPayload is a generic structure to send additional data with the -// AppStarted payload. -type AdditionalPayload struct { - Name RequestType `json:"name"` - Value Payload `json:"value"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/body.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/body.go deleted file mode 100644 index 85b15dfa36..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/body.go +++ /dev/null @@ -1,150 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package transport - -import ( - "encoding/json" - "fmt" -) - -// Application is identifying information about the app itself -type Application struct { - ServiceName string `json:"service_name"` - Env string `json:"env"` - ServiceVersion string `json:"service_version"` - TracerVersion string `json:"tracer_version"` - LanguageName string `json:"language_name"` - LanguageVersion string `json:"language_version"` - ProcessTags string `json:"process_tags,omitempty"` -} - -// Host is identifying information about the host on which the app -// is running -type Host struct { - Hostname string `json:"hostname"` - OS string `json:"os"` - OSVersion string `json:"os_version,omitempty"` - Architecture string `json:"architecture"` - KernelName string `json:"kernel_name"` - KernelRelease string `json:"kernel_release"` - KernelVersion string `json:"kernel_version"` -} - -// Body is the common high-level structure encapsulating a telemetry request body -// Described here: https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/main/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Request%20Bodies/telemetry_body.md -type Body struct { - APIVersion string `json:"api_version"` - RequestType RequestType `json:"request_type"` - TracerTime int64 `json:"tracer_time"` - RuntimeID string `json:"runtime_id"` - SeqID int64 `json:"seq_id"` - Debug bool `json:"debug,omitempty"` - Payload Payload `json:"payload"` - Application Application `json:"application"` - Host Host `json:"host"` -} - -// UnmarshalJSON is used to test the telemetry client end to end -func (b *Body) UnmarshalJSON(bytes []byte) error { - var anyMap map[string]json.RawMessage - var err error - if err = json.Unmarshal(bytes, &anyMap); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["api_version"], &b.APIVersion); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["request_type"], &b.RequestType); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["tracer_time"], &b.TracerTime); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["runtime_id"], &b.RuntimeID); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["seq_id"], &b.SeqID); err != nil { - return err - } - - if _, ok := anyMap["debug"]; ok { - if err = json.Unmarshal(anyMap["debug"], &b.Debug); err != nil { - return err - } - } - - if err = json.Unmarshal(anyMap["application"], &b.Application); err != nil { - return err - } - - if err = json.Unmarshal(anyMap["host"], &b.Host); err != nil { - return err - } - - if b.RequestType == RequestTypeMessageBatch { - var messageBatch []struct { - RequestType RequestType `json:"request_type"` - Payload json.RawMessage `json:"payload"` - } - - if err = json.Unmarshal(anyMap["payload"], &messageBatch); err != nil { - return err - } - - batch := make([]Message, len(messageBatch)) - for i, message := range messageBatch { - payload, err := unmarshalPayload(message.Payload, message.RequestType) - if err != nil { - return err - } - batch[i] = Message{RequestType: message.RequestType, Payload: payload} - } - b.Payload = MessageBatch(batch) - return nil - } - - b.Payload, err = unmarshalPayload(anyMap["payload"], b.RequestType) - return err -} - -func unmarshalPayload(bytes json.RawMessage, requestType RequestType) (Payload, error) { - var payload Payload - switch requestType { - case RequestTypeAppClientConfigurationChange: - payload = new(AppClientConfigurationChange) - case RequestTypeAppProductChange: - payload = new(AppProductChange) - case RequestTypeAppIntegrationsChange: - payload = new(AppIntegrationChange) - case RequestTypeAppHeartbeat: - payload = new(AppHeartbeat) - case RequestTypeAppStarted: - payload = new(AppStarted) - case RequestTypeAppClosing: - payload = new(AppClosing) - case RequestTypeAppExtendedHeartBeat: - payload = new(AppExtendedHeartbeat) - case RequestTypeAppDependenciesLoaded: - payload = new(AppDependenciesLoaded) - case RequestTypeDistributions: - payload = new(Distributions) - case RequestTypeGenerateMetrics: - payload = new(GenerateMetrics) - case RequestTypeLogs: - payload = new(Logs) - } - - if err := json.Unmarshal(bytes, payload); err != nil { - return nil, fmt.Errorf("failed to unmarshal payload: %s", err.Error()) - } - - return payload, nil -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/conf_key_value.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/conf_key_value.go deleted file mode 100644 index ea0eaf9bac..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/conf_key_value.go +++ /dev/null @@ -1,18 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// ConfKeyValue is a library-specific configuration value -type ConfKeyValue struct { - Name string `json:"name"` - Value any `json:"value"` // can be any type of integer, float, string, or boolean - Origin Origin `json:"origin"` - ID string `json:"config_id,omitempty"` - Error Error `json:"error,omitempty"` - - // SeqID is used to track the total number of configuration key value pairs applied across the tracer - SeqID uint64 `json:"seq_id,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/distributions.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/distributions.go deleted file mode 100644 index 1dda074488..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/distributions.go +++ /dev/null @@ -1,36 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// All objects in this file are used to define the payload of the requests sent -// to the telemetry API. -// https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/dad49961203d74ec8236b68ce4b54bbb7ed8716f/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas - -type Distributions struct { - Namespace Namespace `json:"namespace"` - Series []DistributionSeries `json:"series"` - SkipAllowlist bool `json:"skip_allowlist,omitempty"` -} - -func (Distributions) RequestType() RequestType { - return RequestTypeDistributions -} - -// DistributionSeries is a sequence of observations for a distribution metric. -// Unlike `MetricData`, DistributionSeries does not store timestamps in `Points` -type DistributionSeries struct { - Metric string `json:"metric"` - Points []float64 `json:"points"` - Tags []string `json:"tags,omitempty"` - // Common distinguishes metrics which are cross-language vs. - // language-specific. - // - // NOTE: If this field isn't present in the request, the API assumes - // the metric is common. So we can't "omitempty" even though the - // field is technically optional. - Common bool `json:"common,omitempty"` - Namespace Namespace `json:"namespace,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/error.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/error.go deleted file mode 100644 index b0de67be42..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/error.go +++ /dev/null @@ -1,12 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// Error stores error information about various tracer events -type Error struct { - Code int `json:"code"` - Message string `json:"message"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/generate-metrics.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/generate-metrics.go deleted file mode 100644 index 220f93a920..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/generate-metrics.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// All objects in this file are used to define the payload of the requests sent -// to the telemetry API. -// https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/dad49961203d74ec8236b68ce4b54bbb7ed8716f/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas - -type GenerateMetrics struct { - Namespace Namespace `json:"namespace,omitempty"` - Series []MetricData `json:"series"` - SkipAllowlist bool `json:"skip_allowlist,omitempty"` -} - -func (GenerateMetrics) RequestType() RequestType { - return RequestTypeGenerateMetrics -} - -// MetricType is the type of metric being sent, either count, gauge, or rate -// distribution is another payload altogether -type MetricType string - -const ( - RateMetric MetricType = "rate" - CountMetric MetricType = "count" - GaugeMetric MetricType = "gauge" - DistMetric MetricType = "distribution" -) - -// MetricData is a sequence of observations for a single named metric. -type MetricData struct { - Metric string `json:"metric"` - // Points stores pairs of timestamps and values - // This first value should be an int64 timestamp and the second should be a float64 value - Points [][2]any `json:"points"` - // Interval is required only for gauge and rate metrics - Interval int64 `json:"interval,omitempty"` - // Type cannot be of type distribution because there is a different payload for it - Type MetricType `json:"type,omitempty"` - Tags []string `json:"tags,omitempty"` - - // Common distinguishes metrics which are cross-language vs. - // language-specific. - // - // NOTE: If this field isn't present in the request, the API assumes - // the metric is common. So we can't "omitempty" even though the - // field is technically optional. - Common bool `json:"common"` - Namespace Namespace `json:"namespace,omitempty"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/logs.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/logs.go deleted file mode 100644 index c0cebe2849..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/logs.go +++ /dev/null @@ -1,31 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type Logs struct { - Logs []LogMessage `json:"logs,omitempty"` -} - -func (Logs) RequestType() RequestType { - return RequestTypeLogs -} - -type LogLevel string - -const ( - LogLevelDebug LogLevel = "DEBUG" - LogLevelWarn LogLevel = "WARN" - LogLevelError LogLevel = "ERROR" -) - -type LogMessage struct { - Message string `json:"message"` - Level LogLevel `json:"level"` - Count uint32 `json:"count,omitempty"` - Tags string `json:"tags,omitempty"` // comma separated list of tags, e.g. "tag1:1,tag2:toto" - StackTrace string `json:"stack_trace,omitempty"` - TracerTime int64 `json:"tracer_time,omitempty"` // Unix timestamp in seconds -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/message_batch.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/message_batch.go deleted file mode 100644 index d1f9f964fe..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/message_batch.go +++ /dev/null @@ -1,17 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type MessageBatch []Message - -func (MessageBatch) RequestType() RequestType { - return RequestTypeMessageBatch -} - -type Message struct { - RequestType RequestType `json:"request_type"` - Payload Payload `json:"payload"` -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/namespace.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/namespace.go deleted file mode 100644 index 02d94aca19..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/namespace.go +++ /dev/null @@ -1,20 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -type Namespace string - -const ( - NamespaceGeneral Namespace = "general" - NamespaceTracers Namespace = "tracers" - NamespaceProfilers Namespace = "profilers" - NamespaceAppSec Namespace = "appsec" - NamespaceIAST Namespace = "iast" - NamespaceTelemetry Namespace = "telemetry" - NamespaceCIVisibility Namespace = "civisibility" - NamespaceMLOps Namespace = "mlops" - NamespaceRUM Namespace = "rum" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/origin.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/origin.go deleted file mode 100644 index 3084d12c43..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/origin.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// Origin describes the source of a configuration change -type Origin string - -const ( - OriginDefault Origin = "default" - OriginCode Origin = "code" - OriginDDConfig Origin = "dd_config" - OriginEnvVar Origin = "env_var" - OriginRemoteConfig Origin = "remote_config" - OriginLocalStableConfig Origin = "local_stable_config" - OriginManagedStableConfig Origin = "fleet_stable_config" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/payload.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/payload.go deleted file mode 100644 index 1a4c0a1dad..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/payload.go +++ /dev/null @@ -1,13 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// Payload is the interface implemented by all telemetry top-level structures, AKA payloads. -// All structs are a strict representation of what is described in Instrumentation Telemetry v2 documentation schemas: -// https://github.com/DataDog/instrumentation-telemetry-api-docs/tree/dad49961203d74ec8236b68ce4b54bbb7ed8716f/GeneratedDocumentation/ApiDocs/v2/SchemaDocumentation/Schemas -type Payload interface { - RequestType() RequestType -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/requesttype.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/requesttype.go deleted file mode 100644 index c1f1bd4058..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport/requesttype.go +++ /dev/null @@ -1,55 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package transport - -// RequestType determines how the Payload of a request should be handled -type RequestType string - -const ( - // RequestTypeAppStarted is the first message sent by the telemetry - // client, containing the configuration loaded at startup - RequestTypeAppStarted RequestType = "app-started" - - // RequestTypeAppHeartbeat is sent periodically by the client to indicate - // that the app is still running - RequestTypeAppHeartbeat RequestType = "app-heartbeat" - - // RequestTypeGenerateMetrics contains count, gauge, or rate metrics accumulated by the - // client, and is sent periodically along with the heartbeat - RequestTypeGenerateMetrics RequestType = "generate-metrics" - - // RequestTypeDistributions is to send distribution type metrics accumulated by the - // client, and is sent periodically along with the heartbeat - RequestTypeDistributions RequestType = "distributions" - - // RequestTypeAppClosing is sent when the telemetry client is stopped - RequestTypeAppClosing RequestType = "app-closing" - - // RequestTypeAppDependenciesLoaded is sent if DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED - // is enabled. Sent when Start is called for the telemetry client. - RequestTypeAppDependenciesLoaded RequestType = "app-dependencies-loaded" - - // RequestTypeAppClientConfigurationChange is sent if there are changes - // to the client library configuration - RequestTypeAppClientConfigurationChange RequestType = "app-client-configuration-change" - - // RequestTypeAppProductChange is sent when products are enabled/disabled - RequestTypeAppProductChange RequestType = "app-product-change" - - // RequestTypeAppIntegrationsChange is sent when the telemetry client starts - // with info on which integrations are used. - RequestTypeAppIntegrationsChange RequestType = "app-integrations-change" - - // RequestTypeMessageBatch is a wrapper over a list of payloads - RequestTypeMessageBatch RequestType = "message-batch" - - // RequestTypeAppExtendedHeartBeat This event will be used as a failsafe if there are any catastrophic data failure. - // The data will be used to reconstruct application records in our db. - RequestTypeAppExtendedHeartBeat RequestType = "app-extended-heartbeat" - - // RequestTypeLogs is used to send logs to the backend - RequestTypeLogs RequestType = "logs" -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/writer.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/writer.go deleted file mode 100644 index fc01dec25e..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/writer.go +++ /dev/null @@ -1,343 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net" - "net/http" - "os" - "runtime" - "sync" - "time" - - "github.com/DataDog/dd-trace-go/v2/internal" - "github.com/DataDog/dd-trace-go/v2/internal/globalconfig" - "github.com/DataDog/dd-trace-go/v2/internal/hostname" - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/osinfo" - "github.com/DataDog/dd-trace-go/v2/internal/processtags" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" - "github.com/DataDog/dd-trace-go/v2/internal/version" -) - -// We copy the transport to avoid using the default one, as it might be -// augmented with tracing and we don't want these calls to be recorded. -// See https://golang.org/pkg/net/http/#DefaultTransport . -var defaultHTTPClient = &http.Client{ - Transport: &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - }).DialContext, - ForceAttemptHTTP2: true, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - }, - Timeout: 5 * time.Second, -} - -func newBody(config TracerConfig, debugMode bool) *transport.Body { - osHostname, err := os.Hostname() - if err != nil { - osHostname = hostname.Get() - } - - if osHostname == "" { - osHostname = "unknown" // hostname field is not allowed to be empty - } - - return &transport.Body{ - APIVersion: "v2", - RuntimeID: globalconfig.RuntimeID(), - Debug: debugMode, - Application: transport.Application{ - ServiceName: config.Service, - Env: config.Env, - ServiceVersion: config.Version, - TracerVersion: version.Tag, - LanguageName: "go", - LanguageVersion: runtime.Version(), - ProcessTags: processtags.GlobalTags().String(), - }, - Host: transport.Host{ - Hostname: osHostname, - OS: osinfo.OSName(), - OSVersion: osinfo.OSVersion(), - Architecture: osinfo.Architecture(), - KernelName: osinfo.KernelName(), - KernelRelease: osinfo.KernelRelease(), - KernelVersion: osinfo.KernelVersion(), - }, - } -} - -// Writer is an interface that allows to send telemetry data to any endpoint that implements the instrumentation telemetry v2 API. -// The telemetry data is sent as a JSON payload as described in the API documentation. -type Writer interface { - // Flush does a synchronous call to the telemetry endpoint with the given payload. Thread-safe. - // It returns a non-empty [EndpointRequestResult] slice and a nil error if the payload was sent successfully. - // Otherwise, the error is a call to [errors.Join] on all errors that occurred. - Flush(transport.Payload) ([]EndpointRequestResult, error) -} - -// EndpointRequestResult is returned by the Flush method of the Writer interface. -type EndpointRequestResult struct { - // Error is the error that occurred when sending the payload to the endpoint. This is nil if the payload was sent successfully. - Error error - // PayloadByteSize is the number of bytes that were sent to the endpoint, zero if the payload was not sent. - PayloadByteSize int - // CallDuration is the duration of the call to the endpoint if the call was successful - CallDuration time.Duration - // StatusCode is the status code of the response from the endpoint even if the call failed but only with an actual HTTP error - StatusCode int -} - -type writer struct { - mu sync.Mutex - body *transport.Body - bodyMu sync.Mutex - httpClient *http.Client - endpoints []*http.Request -} - -type WriterConfig struct { - // TracerConfig is the configuration the tracer sent when the telemetry client was created (required) - TracerConfig - // Endpoints is a list of requests that will be used alongside the body of the telemetry data to create the requests to the telemetry endpoint (required to not be empty) - // The writer will try each endpoint in order until it gets a 2XX HTTP response from the server - Endpoints []*http.Request - // HTTPClient is the http client that will be used to send the telemetry data (defaults to a copy of [http.DefaultClient]) - HTTPClient *http.Client - // Debug is a flag that indicates whether the telemetry client is in debug mode (defaults to false) - Debug bool -} - -func NewWriter(config WriterConfig) (Writer, error) { - if len(config.Endpoints) == 0 { - return nil, fmt.Errorf("telemetry/writer: no endpoints provided") - } - - if config.HTTPClient == nil { - config.HTTPClient = defaultHTTPClient - } - - // Don't allow the client to have a timeout higher than 5 seconds - // This is to avoid blocking the client for too long in case of network issues - if config.HTTPClient.Timeout > 5*time.Second { - copyClient := *config.HTTPClient - config.HTTPClient = ©Client - config.HTTPClient.Timeout = 5 * time.Second - } - - body := newBody(config.TracerConfig, config.Debug) - endpoints := make([]*http.Request, len(config.Endpoints)) - for i, endpoint := range config.Endpoints { - endpoints[i] = preBakeRequest(body, endpoint) - } - - return &writer{ - body: body, - httpClient: config.HTTPClient, - endpoints: endpoints, - }, nil -} - -// preBakeRequest adds all the *static* headers that we already know at the time of the creation of the writer. -// This is useful to avoid querying too many things at the time of the request. -// Headers necessary are described here: -// https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/cf17b41a30fbf31d54e2cfbfc983875d58b02fe1/GeneratedDocumentation/ApiDocs/v2/overview.md#required-http-headers -func preBakeRequest(body *transport.Body, endpoint *http.Request) *http.Request { - clonedEndpoint := endpoint.Clone(context.Background()) - if clonedEndpoint.Header == nil { - clonedEndpoint.Header = make(http.Header, 11) - } - - for key, val := range map[string]string{ - "Content-Type": "application/json", - "DD-Telemetry-API-Version": body.APIVersion, - "DD-Client-Library-Language": body.Application.LanguageName, - "DD-Client-Library-Version": body.Application.TracerVersion, - "DD-Agent-Env": body.Application.Env, - "DD-Agent-Hostname": body.Host.Hostname, - "DD-Agent-Install-Id": globalconfig.InstrumentationInstallID(), - "DD-Agent-Install-Type": globalconfig.InstrumentationInstallType(), - "DD-Agent-Install-Time": globalconfig.InstrumentationInstallTime(), - "Datadog-Container-ID": internal.ContainerID(), - "Datadog-Entity-ID": internal.EntityID(), - // TODO: add support for Cloud provider/resource-type/resource-id headers in another PR and package - // Described here: https://github.com/DataDog/instrumentation-telemetry-api-docs/blob/cf17b41a30fbf31d54e2cfbfc983875d58b02fe1/GeneratedDocumentation/ApiDocs/v2/overview.md#setting-the-serverless-telemetry-headers - } { - if val == "" { - continue - } - clonedEndpoint.Header.Add(key, val) - } - - if body.Debug { - clonedEndpoint.Header.Add("DD-Telemetry-Debug-Enabled", "true") - } - - return clonedEndpoint -} - -// setPayloadToBody sets the payload to the body of the writer and misc fields that are necessary for the payload to be sent. -func (w *writer) setPayloadToBody(payload transport.Payload) { - w.bodyMu.Lock() - defer w.bodyMu.Unlock() - w.body.SeqID++ - w.body.TracerTime = time.Now().Unix() - w.body.RequestType = payload.RequestType() - w.body.Payload = payload -} - -// newRequest creates a new http.Request with the given payload and the necessary headers. -func (w *writer) newRequest(endpoint *http.Request, requestType transport.RequestType) *http.Request { - request := endpoint.Clone(context.Background()) - request.Header.Set("DD-Telemetry-Request-Type", string(requestType)) - - pipeReader, pipeWriter := io.Pipe() - request.Body = pipeReader - go func() { - var err error - defer func() { - // This should normally never happen but since we are encoding arbitrary data in client configuration values payload we need to be careful. - if panicValue := recover(); panicValue != nil { - log.Error("telemetry/writer: panic while encoding payload!") - if err == nil { - panicErr, ok := panicValue.(error) // check if we can use the panic value as an error - if ok { - log.Error("telemetry/writer: panic while encoding payload: %v", panicErr.Error()) - } - pipeWriter.CloseWithError(panicErr) // CloseWithError with nil as parameter is like Close() - } - } - }() - - // If a previous endpoint is still trying to marshall the body, we need to wait for it to realize the pipe is closed and exit. - w.bodyMu.Lock() - defer w.bodyMu.Unlock() - - // No need to wait on this because the http client will close the pipeReader which will close the pipeWriter and finish the goroutine - err = json.NewEncoder(pipeWriter).Encode(w.body) - pipeWriter.CloseWithError(err) - }() - - return request -} - -// SumReaderCloser is a ReadCloser that wraps another ReadCloser and counts the number of bytes read. -type SumReaderCloser struct { - io.ReadCloser - n int -} - -func (s *SumReaderCloser) Read(p []byte) (n int, err error) { - n, err = s.ReadCloser.Read(p) - s.n += n - return -} - -// WriterStatusCodeError is an error that is returned when the writer receives an unexpected status code from the server. -type WriterStatusCodeError struct { - Status string - Body string -} - -func (w *WriterStatusCodeError) Error() string { - return fmt.Sprintf("unexpected status code: %q (received body: %d bytes)", w.Status, len(w.Body)) -} - -func (w *writer) Flush(payload transport.Payload) ([]EndpointRequestResult, error) { - w.mu.Lock() - defer w.mu.Unlock() - - w.setPayloadToBody(payload) - requestType := payload.RequestType() - - var results []EndpointRequestResult - for _, endpoint := range w.endpoints { - var ( - request = w.newRequest(endpoint, requestType) - sumReaderCloser = &SumReaderCloser{ReadCloser: request.Body} - now = time.Now() - ) - - request.Body = sumReaderCloser - response, err := w.httpClient.Do(request) - if err != nil { - results = append(results, EndpointRequestResult{Error: err}) - continue - } - - // We only have a few endpoints, so we can afford to keep the response body stream open until we are done with it - defer response.Body.Close() - - if response.StatusCode >= 300 || response.StatusCode < 200 { - respBodyBytes, _ := io.ReadAll(io.LimitReader(response.Body, 256)) // maybe we can find an error reason in the response body - results = append(results, EndpointRequestResult{Error: &WriterStatusCodeError{ - Status: response.Status, - Body: string(respBodyBytes), - }, StatusCode: response.StatusCode}) - continue - } - - results = append(results, EndpointRequestResult{ - PayloadByteSize: sumReaderCloser.n, - CallDuration: time.Since(now), - StatusCode: response.StatusCode, - }) - - // We succeeded, no need to try the other endpoints - break - } - - var err error - if results[len(results)-1].Error != nil { - var errs []error - for _, result := range results { - errs = append(errs, result.Error) - } - err = errors.Join(errs...) - } - - return results, err -} - -// RecordWriter is a Writer that stores the payloads in memory. Used for testing purposes -type RecordWriter struct { - mu sync.Mutex - payloads []transport.Payload -} - -func (w *RecordWriter) Flush(payload transport.Payload) ([]EndpointRequestResult, error) { - w.mu.Lock() - defer w.mu.Unlock() - w.payloads = append(w.payloads, payload) - return []EndpointRequestResult{ - { - PayloadByteSize: 1, - CallDuration: time.Nanosecond, - }, - }, nil -} - -func (w *RecordWriter) Payloads() []transport.Payload { - w.mu.Lock() - defer w.mu.Unlock() - copyPayloads := make([]transport.Payload, len(w.payloads)) - copy(copyPayloads, w.payloads) - return copyPayloads -} - -var _ Writer = (*RecordWriter)(nil) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/log/log.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/log/log.go deleted file mode 100644 index cc23c2e8a8..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/log/log.go +++ /dev/null @@ -1,54 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package log - -import ( - "fmt" - - internallog "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry" -) - -func divideArgs(args []any) ([]telemetry.LogOption, []any) { - if len(args) == 0 { - return nil, nil - } - - var options []telemetry.LogOption - var fmtArgs []any - for _, arg := range args { - if opt, ok := arg.(telemetry.LogOption); ok { - options = append(options, opt) - } else { - fmtArgs = append(fmtArgs, arg) - } - } - return options, fmtArgs -} - -// Debug sends a telemetry payload with a debug log message to the backend. -func Debug(format string, args ...any) { - log(telemetry.LogDebug, format, args) -} - -// Warn sends a telemetry payload with a warning log message to the backend and the console as a debug log. -func Warn(format string, args ...any) { - log(telemetry.LogWarn, format, args) -} - -// Error sends a telemetry payload with an error log message to the backend and the console as a debug log. -func Error(format string, args ...any) { - log(telemetry.LogError, format, args) -} - -func log(lvl telemetry.LogLevel, format string, args []any) { - opts, fmtArgs := divideArgs(args) - telemetry.Log(lvl, fmt.Sprintf(format, fmtArgs...), opts...) - - if lvl != telemetry.LogDebug { - internallog.Debug(format, fmtArgs...) //nolint:gocritic // Telemetry log plumbing needs to pass through variable format strings - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/logger.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/logger.go deleted file mode 100644 index c3db3c02a1..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/logger.go +++ /dev/null @@ -1,122 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "runtime" - "strings" - "sync" - "sync/atomic" - "time" - - "github.com/puzpuzpuz/xsync/v3" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// WithTags returns a LogOption that sets the tags for the telemetry log message. Tags are key-value pairs that are then -// serialized into a simple "key:value,key2:value2" format. No quoting or escaping is performed. -func WithTags(tags []string) LogOption { - compiledTags := strings.Join(tags, ",") - return func(key *loggerKey, _ *loggerValue) { - if key == nil { - return - } - key.tags = compiledTags - } -} - -// WithStacktrace returns a LogOption that sets the stacktrace for the telemetry log message. The stacktrace is a string -// that is generated inside the WithStacktrace function. Logs demultiplication does not take the stacktrace into account. -// This means that a log that has been demultiplicated will only show of the first log. -func WithStacktrace() LogOption { - buf := make([]byte, 4_096) - buf = buf[:runtime.Stack(buf, false)] - return func(_ *loggerKey, value *loggerValue) { - if value == nil { - return - } - value.stacktrace = string(buf) - } -} - -type loggerKey struct { - tags string - message string - level LogLevel -} - -type loggerValue struct { - count atomic.Uint32 - stacktrace string - time int64 // Unix timestamp -} - -type logger struct { - store *xsync.MapOf[loggerKey, *loggerValue] - - distinctLogs atomic.Int32 - maxDistinctLogs int32 - onceMaxLogsReached sync.Once -} - -func (logger *logger) Add(level LogLevel, text string, opts ...LogOption) { - if logger.distinctLogs.Load() >= logger.maxDistinctLogs { - logger.onceMaxLogsReached.Do(func() { - logger.add(LogError, "telemetry: log count exceeded maximum, dropping log", WithStacktrace()) - }) - return - } - - logger.add(level, text, opts...) -} - -func (logger *logger) add(level LogLevel, text string, opts ...LogOption) { - key := loggerKey{ - message: text, - level: level, - } - - for _, opt := range opts { - opt(&key, nil) - } - - value, _ := logger.store.LoadOrCompute(key, func() *loggerValue { - value := &loggerValue{ - time: time.Now().Unix(), - } - for _, opt := range opts { - opt(nil, value) - } - logger.distinctLogs.Add(1) - return value - }) - - value.count.Add(1) -} - -func (logger *logger) Payload() transport.Payload { - logs := make([]transport.LogMessage, 0, logger.store.Size()+1) - logger.store.Range(func(key loggerKey, value *loggerValue) bool { - logger.store.Delete(key) - logger.distinctLogs.Add(-1) - logs = append(logs, transport.LogMessage{ - Message: key.message, - Level: key.level, - Tags: key.tags, - Count: value.count.Load(), - StackTrace: value.stacktrace, - TracerTime: value.time, - }) - return true - }) - - if len(logs) == 0 { - return nil - } - - return transport.Logs{Logs: logs} -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrichandle.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrichandle.go deleted file mode 100644 index 65e5644d18..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrichandle.go +++ /dev/null @@ -1,72 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "math" - "sync" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal" -) - -// noopMetricHandle is a no-op implementation of a metric handle. -type noopMetricHandle struct{} - -func (noopMetricHandle) Submit(_ float64) {} - -func (noopMetricHandle) Get() float64 { - return math.NaN() -} - -var metricLogLossOnce sync.Once - -// swappableMetricHandle is a MetricHandle that holds a pointer to another MetricHandle and a recorder to replay actions done before the actual MetricHandle is set. -type swappableMetricHandle struct { - ptr atomic.Pointer[MetricHandle] - recorder internal.Recorder[MetricHandle] - maker func(client Client) MetricHandle -} - -func (t *swappableMetricHandle) Submit(value float64) { - if Disabled() { - return - } - - inner := t.ptr.Load() - if inner == nil || *inner == nil { - if !t.recorder.Record(func(handle MetricHandle) { - handle.Submit(value) - }) { - metricLogLossOnce.Do(func() { - msg := "telemetry: metric is losing values because the telemetry client has not been started yet, dropping telemetry data, please start the telemetry client earlier to avoid data loss" - log.Debug("%s\n", msg) - Log(LogError, msg, WithStacktrace()) - }) - } - return - } - - (*inner).Submit(value) -} - -func (t *swappableMetricHandle) Get() float64 { - inner := t.ptr.Load() - if inner == nil || *inner == nil { - return 0 - } - - return (*inner).Get() -} - -func (t *swappableMetricHandle) swap(handle MetricHandle) { - if t.ptr.Swap(&handle) == nil { - t.recorder.Replay(handle) - } -} - -var _ MetricHandle = (*swappableMetricHandle)(nil) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrics.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrics.go deleted file mode 100644 index 8715cd7bd7..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/metrics.go +++ /dev/null @@ -1,256 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "fmt" - "math" - "sort" - "strings" - "sync/atomic" - "time" - - "github.com/puzpuzpuz/xsync/v3" - - "github.com/DataDog/dd-trace-go/v2/internal/log" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics" - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -// metricKey is used as a key in the metrics store hash map. -type metricKey struct { - namespace Namespace - kind transport.MetricType - name string - tags string -} - -func (k metricKey) SplitTags() []string { - if k.tags == "" { - return nil - } - return strings.Split(k.tags, ",") -} - -func (k metricKey) String() string { - return fmt.Sprintf("%s.%s.%s.%s", k.namespace, k.kind, k.name, k.tags) -} - -func validateMetricKey(namespace Namespace, kind transport.MetricType, name string, tags []string) error { - if len(name) == 0 { - return fmt.Errorf("metric name with tags %v should be empty", tags) - } - - if !knownmetrics.IsKnownMetric(namespace, kind, name) { - return fmt.Errorf("metric name %q of kind %q in namespace %q is not a known metric, please update the list of metric names running ./scripts/gen_known_metrics.sh or check that you wrote the name correctly. "+ - "The metric will still be sent", name, string(kind), namespace) - } - - for _, tag := range tags { - if len(tag) == 0 { - return fmt.Errorf("metric %q should not have empty tags", name) - } - - if strings.Contains(tag, ",") { - return fmt.Errorf("metric %q tag %q should not contain commas", name, tag) - } - } - - return nil -} - -// newMetricKey returns a new metricKey with the given parameters with the tags sorted and joined by commas. -func newMetricKey(namespace Namespace, kind transport.MetricType, name string, tags []string) metricKey { - sort.Strings(tags) - return metricKey{namespace: namespace, kind: kind, name: name, tags: strings.Join(tags, ",")} -} - -// metricsHandle is the internal equivalent of MetricHandle for Count/Rate/Gauge metrics that are sent via the payload [transport.GenerateMetrics]. -type metricHandle interface { - MetricHandle - Payload() transport.MetricData -} - -type metrics struct { - store *xsync.MapOf[metricKey, metricHandle] - skipAllowlist bool // Debugging feature to skip the allowlist of known metrics -} - -// LoadOrStore returns a MetricHandle for the given metric key. If the metric key does not exist, it will be created. -func (m *metrics) LoadOrStore(namespace Namespace, kind transport.MetricType, name string, tags []string) MetricHandle { - - var ( - key = newMetricKey(namespace, kind, name, tags) - handle MetricHandle - loaded bool - ) - switch kind { - case transport.CountMetric: - handle, loaded = m.store.LoadOrCompute(key, func() metricHandle { return &count{metric: metric{key: key}} }) - case transport.GaugeMetric: - handle, loaded = m.store.LoadOrCompute(key, func() metricHandle { return &gauge{metric: metric{key: key}} }) - case transport.RateMetric: - handle, loaded = m.store.LoadOrCompute(key, func() metricHandle { - rate := &rate{count: count{metric: metric{key: key}}} - now := time.Now() - rate.intervalStart.Store(&now) - return rate - }) - default: - log.Warn("telemetry: unknown metric type %q", kind) - return nil - } - - if !loaded && !m.skipAllowlist { // The metric is new: validate and log issues about it - if err := validateMetricKey(namespace, kind, name, tags); err != nil { - log.Warn("telemetry: %s", err.Error()) - } - } - - return handle -} - -func (m *metrics) Payload() transport.Payload { - series := make([]transport.MetricData, 0, m.store.Size()) - m.store.Range(func(_ metricKey, handle metricHandle) bool { - if payload := handle.Payload(); payload.Type != "" { - series = append(series, payload) - } - return true - }) - - if len(series) == 0 { - return nil - } - - return transport.GenerateMetrics{Series: series, SkipAllowlist: m.skipAllowlist} -} - -type metricPoint struct { - value float64 - time time.Time -} - -// metric is a meta t -type metric struct { - key metricKey - ptr atomic.Pointer[metricPoint] -} - -func (m *metric) Get() float64 { - if ptr := m.ptr.Load(); ptr != nil { - return ptr.value - } - - return math.NaN() -} - -func (m *metric) Payload() transport.MetricData { - point := m.ptr.Swap(nil) - if point == nil { - return transport.MetricData{} - } - return m.payload(point) -} - -func (m *metric) payload(point *metricPoint) transport.MetricData { - if point == nil { - return transport.MetricData{} - } - - return transport.MetricData{ - Metric: m.key.name, - Namespace: m.key.namespace, - Tags: m.key.SplitTags(), - Type: m.key.kind, - Common: knownmetrics.IsCommonMetric(m.key.namespace, m.key.kind, m.key.name), - Points: [][2]any{ - {point.time.Unix(), point.value}, - }, - } -} - -// count is a metric that represents a single value that is incremented over time and flush and reset at zero when flushed -type count struct { - metric -} - -func (m *count) Submit(newValue float64) { - newPoint := new(metricPoint) - newPoint.time = time.Now() - for { - oldPoint := m.ptr.Load() - var oldValue float64 - if oldPoint != nil { - oldValue = oldPoint.value - } - newPoint.value = oldValue + newValue - if m.ptr.CompareAndSwap(oldPoint, newPoint) { - return - } - } -} - -// gauge is a metric that represents a single value at a point in time that is not incremental -type gauge struct { - metric -} - -func (g *gauge) Submit(value float64) { - newPoint := new(metricPoint) - newPoint.time = time.Now() - newPoint.value = value - for { - oldPoint := g.ptr.Load() - if g.ptr.CompareAndSwap(oldPoint, newPoint) { - return - } - } -} - -// rate is like a count metric but the value sent is divided by an interval of time that is also sent/ -type rate struct { - count - intervalStart atomic.Pointer[time.Time] -} - -func (r *rate) Get() float64 { - sum := r.count.Get() - intervalStart := r.intervalStart.Load() - if intervalStart == nil { - return math.NaN() - } - - intervalSeconds := time.Since(*intervalStart).Seconds() - if int64(intervalSeconds) == 0 { // Interval for rate is too small, we prefer not sending data over sending something wrong - return math.NaN() - } - - return sum / intervalSeconds -} - -func (r *rate) Payload() transport.MetricData { - now := time.Now() - intervalStart := r.intervalStart.Swap(&now) - if intervalStart == nil { - return transport.MetricData{} - } - - intervalSeconds := time.Since(*intervalStart).Seconds() - if int64(intervalSeconds) == 0 { // Interval for rate is too small, we prefer not sending data over sending something wrong - return transport.MetricData{} - } - - point := r.ptr.Swap(nil) - if point == nil { - return transport.MetricData{} - } - - point.value /= intervalSeconds - payload := r.metric.payload(point) - payload.Interval = int64(intervalSeconds) - return payload -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/product.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/product.go deleted file mode 100644 index 166428749a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/telemetry/product.go +++ /dev/null @@ -1,51 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package telemetry - -import ( - "sync" - - "github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport" -) - -type products struct { - mu sync.Mutex - products map[Namespace]transport.Product -} - -func (p *products) Add(namespace Namespace, enabled bool, err error) { - p.mu.Lock() - defer p.mu.Unlock() - if p.products == nil { - p.products = make(map[Namespace]transport.Product) - } - - product := transport.Product{ - Enabled: enabled, - } - - if err != nil { - product.Error = transport.Error{ - Message: err.Error(), - } - } - - p.products[namespace] = product -} - -func (p *products) Payload() transport.Payload { - p.mu.Lock() - defer p.mu.Unlock() - if len(p.products) == 0 { - return nil - } - - res := transport.AppProductChange{ - Products: p.products, - } - p.products = nil - return res -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_context.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_context.go deleted file mode 100644 index 57551220ad..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_context.go +++ /dev/null @@ -1,49 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package internal - -import ( - "context" - - "github.com/DataDog/dd-trace-go/v2/internal/orchestrion" -) - -type executionTracedKey struct{} - -// WithExecutionTraced marks ctx as being associated with an execution trace -// task. It is assumed that ctx already contains a trace task. The caller is -// responsible for ending the task. -// -// This is intended for a specific case where the database/sql contrib package -// only creates spans *after* an operation, in case the operation was -// unavailable, and thus execution trace tasks tied to the span only capture the -// very end. This function enables creating a task *before* creating a span, and -// communicating to the APM tracer that it does not need to create a task. In -// general, APM instrumentation should prefer creating tasks around the -// operation rather than after the fact, if possible. -func WithExecutionTraced(ctx context.Context) context.Context { - return orchestrion.CtxWithValue(ctx, executionTracedKey{}, true) -} - -// WithExecutionNotTraced marks that the context is *not* covered by an -// execution trace task. This is intended to prevent child spans (which inherit -// information from ctx) from being considered covered by a task, when an -// integration may create its own child span with its own execution trace task. -func WithExecutionNotTraced(ctx context.Context) context.Context { - if orchestrion.WrapContext(ctx).Value(executionTracedKey{}) == nil { - // Fast path: if it wasn't marked before, we don't need to wrap - // the context - return ctx - } - return orchestrion.CtxWithValue(ctx, executionTracedKey{}, false) -} - -// IsExecutionTraced returns whether ctx is associated with an execution trace -// task, as indicated via WithExecutionTraced -func IsExecutionTraced(ctx context.Context) bool { - v := orchestrion.WrapContext(ctx).Value(executionTracedKey{}) - return v != nil && v.(bool) -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_source.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_source.go deleted file mode 100644 index 3c92bf312f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/trace_source.go +++ /dev/null @@ -1,73 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "fmt" - "strconv" - - "github.com/DataDog/dd-trace-go/v2/internal/log" -) - -// TraceSource represents the 8-bit bitmask for the _dd.p.ts tag -type TraceSource uint8 - -const ( - APMTraceSource TraceSource = 0x01 - ASMTraceSource TraceSource = 0x02 - DSMTraceSource TraceSource = 0x04 - DJMTraceSource TraceSource = 0x08 - DBMTraceSource TraceSource = 0x10 -) - -// String converts the bitmask to a two-character hexadecimal string -func (ts TraceSource) String() string { - return fmt.Sprintf("%02X", uint8(ts)) -} - -// ParseTraceSource parses a hexadecimal string into a TraceSource bitmask -func ParseTraceSource(hexStr string) (TraceSource, error) { - // Ensure at least 2 chars, allowing up to 8 for forward compatibility (32-bit) - if len(hexStr) < 2 || len(hexStr) > 8 { - return 0, fmt.Errorf("invalid length for TraceSource mask, expected 2 to 8 characters") - } - - // Parse the full mask as a 32-bit unsigned integer - value, err := strconv.ParseUint(hexStr, 16, 32) - if err != nil { - return 0, fmt.Errorf("invalid hexadecimal format: %w", err) - } - - // Extract only the least significant 8 bits (ensuring compliance with 8-bit mask) - return TraceSource(value & 0xFF), nil -} - -func VerifyTraceSourceEnabled(hexStr string, target TraceSource) bool { - ts, err := ParseTraceSource(hexStr) - if err != nil { - if len(hexStr) != 0 { // Empty trace source should not trigger an error log. - log.Error("invalid trace-source hex string given for source verification: %s", err.Error()) - } - return false - } - - return ts.IsSet(target) -} - -// Set enables specific TraceSource (bit) in the bitmask -func (ts *TraceSource) Set(src TraceSource) { - *ts |= src -} - -// Unset disables specific TraceSource (bit) in the bitmask -func (ts *TraceSource) Unset(src TraceSource) { - *ts &^= src -} - -// IsSet checks if a specific TraceSource (bit) is enabled -func (ts TraceSource) IsSet(src TraceSource) bool { - return ts&src != 0 -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/endpoint_counter.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/endpoint_counter.go deleted file mode 100644 index 7d2c3e4a65..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/endpoint_counter.go +++ /dev/null @@ -1,105 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package traceprof - -import ( - "sync" - "sync/atomic" -) - -// globalEndpointCounter is shared between the profiler and the tracer. -var globalEndpointCounter = (func() *EndpointCounter { - // Create endpoint counter with arbitrary limit. - // The pathological edge case would be a service with a high rate (10k/s) of - // short (100ms) spans with unique endpoints (resource names). Over a 60s - // period this would grow the map to 600k items which may cause noticable - // memory, GC overhead and lock contention overhead. The pprof endpoint - // labels are less problematic since there will only be 1000 spans in-flight - // on average. Using a limit of 1000 will result in a similar overhead of - // this features compared to the pprof labels. It also seems like a - // reasonable upper bound for the number of endpoints a normal application - // may service in a 60s period. - ec := NewEndpointCounter(1000) - // Disabled by default ensures almost-zero overhead for tracing users that - // don't have the profiler turned on. - ec.SetEnabled(false) - return ec -})() - -// GlobalEndpointCounter returns the endpoint counter that is shared between -// tracing and profiling to support the unit of work feature. -func GlobalEndpointCounter() *EndpointCounter { - return globalEndpointCounter -} - -// NewEndpointCounter returns a new NewEndpointCounter that will track hit -// counts for up to limit endpoints. A limit of <= 0 indicates no limit. -func NewEndpointCounter(limit int) *EndpointCounter { - return &EndpointCounter{enabled: 1, limit: limit, counts: map[string]uint64{}} -} - -// EndpointCounter counts hits per endpoint. -// -// TODO: This is a naive implementation with poor performance, e.g. 125ns/op in -// BenchmarkEndpointCounter on M1. We can do 10-20x better with something more -// complicated [1]. This will be done in a follow-up PR. -// [1] https://github.com/felixge/countermap/blob/main/xsync_map_counter_map.go -type EndpointCounter struct { - enabled uint64 - mu sync.Mutex - counts map[string]uint64 - limit int -} - -// SetEnabled changes if endpoint counting is enabled or not. The previous -// value is returned. -func (e *EndpointCounter) SetEnabled(enabled bool) bool { - oldVal := atomic.SwapUint64(&e.enabled, boolToUint64(enabled)) - return oldVal == 1 -} - -// Inc increments the hit counter for the given endpoint by 1. If endpoint -// counting is disabled, this method does nothing and is almost zero-cost. -func (e *EndpointCounter) Inc(endpoint string) { - // Fast-path return if endpoint counter is disabled. - if atomic.LoadUint64(&e.enabled) == 0 { - return - } - - // Acquire lock until func returns - e.mu.Lock() - defer e.mu.Unlock() - - // Don't add another endpoint to the map if the limit is reached. See - // globalEndpointCounter comment. - count, ok := e.counts[endpoint] - if !ok && e.limit > 0 && len(e.counts) >= e.limit { - return - } - // Increment the endpoint count - e.counts[endpoint] = count + 1 -} - -// GetAndReset returns the hit counts for all endpoints and resets their counts -// back to 0. -func (e *EndpointCounter) GetAndReset() map[string]uint64 { - // Acquire lock until func returns - e.mu.Lock() - defer e.mu.Unlock() - - // Return current counts and reset internal map. - counts := e.counts - e.counts = make(map[string]uint64) - return counts -} - -// boolToUint64 converts b to 0 if false or 1 if true. -func boolToUint64(b bool) uint64 { - if b { - return 1 - } - return 0 -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/profiler.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/profiler.go deleted file mode 100644 index 2c3088b573..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/profiler.go +++ /dev/null @@ -1,35 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2023 Datadog, Inc. - -package traceprof - -import ( - "sync/atomic" -) - -var profiler struct { - enabled uint32 -} - -func SetProfilerEnabled(val bool) bool { - return atomic.SwapUint32(&profiler.enabled, boolToUint32(val)) != 0 -} - -func profilerEnabled() int { - return int(atomic.LoadUint32(&profiler.enabled)) -} - -func boolToUint32(b bool) uint32 { - if b { - return 1 - } - return 0 -} - -func SetProfilerRootTags(localRootSpan TagSetter) { - localRootSpan.SetTag("_dd.profiling.enabled", profilerEnabled()) -} - -type TagSetter interface{ SetTag(string, interface{}) } diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/traceprof.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/traceprof.go deleted file mode 100644 index dc55bc889f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/traceprof/traceprof.go +++ /dev/null @@ -1,21 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -// Package traceprof contains shared logic for cross-cutting tracer/profiler features. -package traceprof - -// pprof labels applied by the tracer to show up in the profiler's profiles. -const ( - SpanID = "span id" - LocalRootSpanID = "local root span id" - TraceEndpoint = "trace endpoint" -) - -// env variables used to control cross-cutting tracer/profiling features. -const ( - CodeHotspotsEnvVar = "DD_PROFILING_CODE_HOTSPOTS_COLLECTION_ENABLED" // aka code hotspots - EndpointEnvVar = "DD_PROFILING_ENDPOINT_COLLECTION_ENABLED" // aka endpoint profiling - EndpointCountEnvVar = "DD_PROFILING_ENDPOINT_COUNT_ENABLED" // aka unit of work -) diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/tracer.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/tracer.go deleted file mode 100644 index da7a4c5f2f..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/tracer.go +++ /dev/null @@ -1,20 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package internal - -import "sync/atomic" - -var ( - tracerInit atomic.Bool -) - -func SetTracerInitialized(val bool) { - tracerInit.Store(val) -} - -func TracerInitialized() bool { - return tracerInit.Load() -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/uds.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/uds.go deleted file mode 100644 index 4f549490b6..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/uds.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2025 Datadog, Inc. - -package internal - -import ( - "fmt" - "net/url" - "strings" -) - -func UnixDataSocketURL(path string) *url.URL { - return &url.URL{ - Scheme: "http", - Host: fmt.Sprintf("UDS_%s", strings.NewReplacer(":", "_", "/", "_", `\`, "_").Replace(path)), - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer/sanitizer.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer/sanitizer.go deleted file mode 100644 index 11cf8a643a..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer/sanitizer.go +++ /dev/null @@ -1,70 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/) -// Copyright 2016 Datadog, Inc. - -// Package urlsanitizer provides utilities for sanitizing URLs and DSNs by removing sensitive information. -package urlsanitizer - -import ( - "net/url" - "strings" -) - -// SanitizeURL removes user credentials from URLs for safe logging. -// It uses Go's built-in url.Redacted() when possible, which preserves usernames but redacts passwords. -// If the URL can't be parsed but appears to contain credentials, it's fully redacted for security. -func SanitizeURL(rawURL string) string { - if rawURL == "" { - return rawURL - } - - parsedURL, err := url.Parse(rawURL) - if err != nil { - // If parsing fails but we suspect credentials, - // redact entirely for safety. - if containsCredentials(rawURL) { - return "[REDACTED_URL_WITH_CREDENTIALS]" - } - // If no credentials suspected, - // return as-is (might just be a malformed URL without sensitive data) - return rawURL - } - - // If URL has user info, - // use Go's built-in redaction (preserves username, redacts password). - if parsedURL.User != nil { - return parsedURL.Redacted() - } - - // No credentials detected, return as-is - return rawURL -} - -// containsCredentials checks if a URL string might contain credentials -func containsCredentials(rawURL string) bool { - // Look for patterns that suggest credentials: username:password@host - // This is a simple heuristic - if we see :...@ we assume credentials. - if !strings.Contains(rawURL, "://") { - return false - } - - // Find the scheme part. - schemeEnd := strings.Index(rawURL, "://") - if schemeEnd == -1 { - return false - } - - // Look in the part after the scheme for credentials. - rest := rawURL[schemeEnd+3:] - - // If we see a colon followed by an @ sign, likely credentials. - colonIndex := strings.Index(rest, ":") - if colonIndex == -1 { - return false - } - - // Check if there's an @ after the colon - atIndex := strings.Index(rest[colonIndex:], "@") - return atIndex != -1 -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/utils.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/utils.go deleted file mode 100644 index 9c18108bfd..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/utils.go +++ /dev/null @@ -1,152 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package internal - -import ( - "sync" - "sync/atomic" - - "github.com/DataDog/dd-trace-go/v2/internal/samplernames" - xsync "github.com/puzpuzpuz/xsync/v3" -) - -// OtelTagsDelimeter is the separator between key-val pairs for OTEL env vars -const OtelTagsDelimeter = "=" - -// DDTagsDelimiter is the separator between key-val pairs for DD env vars -const DDTagsDelimiter = ":" - -// LockMap uses an RWMutex to synchronize map access to allow for concurrent access. -// This should not be used for cases with heavy write load and performance concerns. -type LockMap struct { - sync.RWMutex - c uint32 - m map[string]string -} - -func NewLockMap(m map[string]string) *LockMap { - return &LockMap{m: m, c: uint32(len(m))} -} - -// Iter iterates over all the map entries passing in keys and values to provided func f. Note this is READ ONLY. -func (l *LockMap) Iter(f func(key string, val string)) { - c := atomic.LoadUint32(&l.c) - if c == 0 { //Fast exit to avoid the cost of RLock/RUnlock for empty maps - return - } - l.RLock() - defer l.RUnlock() - for k, v := range l.m { - f(k, v) - } -} - -func (l *LockMap) Len() int { - l.RLock() - defer l.RUnlock() - return len(l.m) -} - -func (l *LockMap) Clear() { - l.Lock() - defer l.Unlock() - l.m = map[string]string{} - atomic.StoreUint32(&l.c, 0) -} - -func (l *LockMap) Set(k, v string) { - l.Lock() - defer l.Unlock() - if _, ok := l.m[k]; !ok { - atomic.AddUint32(&l.c, 1) - } - l.m[k] = v -} - -func (l *LockMap) Get(k string) string { - l.RLock() - defer l.RUnlock() - return l.m[k] -} - -// XSyncMapCounterMap uses xsync protect counter increments and reads during -// concurrent access. -// Implementation and related tests were taken/inspired by felixge/countermap -// https://github.com/felixge/countermap/pull/2 -type XSyncMapCounterMap struct { - counts *xsync.MapOf[string, *xsync.Counter] -} - -func NewXSyncMapCounterMap() *XSyncMapCounterMap { - return &XSyncMapCounterMap{counts: xsync.NewMapOf[string, *xsync.Counter]()} -} - -func (cm *XSyncMapCounterMap) Inc(key string) { - val, ok := cm.counts.Load(key) - if !ok { - val, _ = cm.counts.LoadOrStore(key, xsync.NewCounter()) - } - val.Inc() -} - -func (cm *XSyncMapCounterMap) GetAndReset() map[string]int64 { - ret := map[string]int64{} - cm.counts.Range(func(key string, _ *xsync.Counter) bool { - v, ok := cm.counts.LoadAndDelete(key) - if ok { - ret[key] = v.Value() - } - return true - }) - return ret -} - -// ToFloat64 attempts to convert value into a float64. If the value is an integer -// greater or equal to 2^53 or less than or equal to -2^53, it will not be converted -// into a float64 to avoid losing precision. If it succeeds in converting, toFloat64 -// returns the value and true, otherwise 0 and false. -func ToFloat64(value any) (f float64, ok bool) { - const maxFloat = (int64(1) << 53) - 1 - const minFloat = -maxFloat - // If any other type is added here, remember to add it to the type switch in - // the `span.SetTag` function to handle pointers to these supported types. - switch i := value.(type) { - case byte: - return float64(i), true - case float32: - return float64(i), true - case float64: - return i, true - case int: - return float64(i), true - case int8: - return float64(i), true - case int16: - return float64(i), true - case int32: - return float64(i), true - case int64: - if i > maxFloat || i < minFloat { - return 0, false - } - return float64(i), true - case uint: - return float64(i), true - case uint16: - return float64(i), true - case uint32: - return float64(i), true - case uint64: - if i > uint64(maxFloat) { - return 0, false - } - return float64(i), true - case samplernames.SamplerName: - return float64(i), true - default: - return 0, false - } -} diff --git a/vendor/github.com/DataDog/dd-trace-go/v2/internal/version/version.go b/vendor/github.com/DataDog/dd-trace-go/v2/internal/version/version.go deleted file mode 100644 index 05f0f0e9a4..0000000000 --- a/vendor/github.com/DataDog/dd-trace-go/v2/internal/version/version.go +++ /dev/null @@ -1,117 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016 Datadog, Inc. - -package version - -import ( - "runtime/debug" - "strconv" - "strings" - "sync" - - "github.com/Masterminds/semver/v3" -) - -// Tag specifies the current release tag. It needs to be manually -// updated. A test checks that the value of Tag never points to a -// git tag that is older than HEAD. -var Tag = "v2.2.3" - -type v1version struct { - Transitional bool - Version string -} - -var v1Tag *v1version - -// Dissected version number. Filled during init() -var ( - // Major is the current major version number - Major int - // Minor is the current minor version number - Minor int - // Patch is the current patch version number - Patch int - // RC is the current release candidate version number - RC int - // once is used to ensure that the v1 version is only found once - once sync.Once -) - -func FindV1Version() (string, bool, bool) { - once.Do(func() { - info, ok := debug.ReadBuildInfo() - if !ok { - return - } - v1Tag = findV1Version(info.Deps) - }) - if v1Tag == nil { - return "", false, false - } - return v1Tag.Version, v1Tag.Transitional, true -} - -func init() { - // Check if we are using a transitional v1.74.x or later version - vt, _, found := FindV1Version() - if found { - Tag = vt - } - v := parseVersion(Tag) - Major, Minor, Patch, RC = v.Major, v.Minor, v.Patch, v.RC -} - -func findV1Version(deps []*debug.Module) *v1version { - var version string - for _, dep := range deps { - if dep.Path != "gopkg.in/DataDog/dd-trace-go.v1" { - continue - } - version = dep.Version - break - } - if version == "" { - return nil - } - vt := &v1version{ - Version: version, - } - v := parseVersion(vt.Version) - if v.Major == 1 && v.Minor >= 74 { - vt.Transitional = true - } - return vt -} - -type version struct { - Major int - Minor int - Patch int - RC int -} - -func parseVersion(value string) version { - var ( - parsedVersion = semver.MustParse(value) - v = version{ - Major: int(parsedVersion.Major()), - Minor: int(parsedVersion.Minor()), - Patch: int(parsedVersion.Patch()), - } - ) - - pr := parsedVersion.Prerelease() - if pr == "" || pr == "dev" { - return v - } - - split := strings.Split(pr, ".") - if len(split) > 1 { - v.RC, _ = strconv.Atoi(split[1]) - } - - return v -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/.gitattributes b/vendor/github.com/DataDog/go-libddwaf/v4/.gitattributes deleted file mode 100644 index 003a800797..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -*.dylib -diff -*.so -diff -*.a -diff diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/.gitignore b/vendor/github.com/DataDog/go-libddwaf/v4/.gitignore deleted file mode 100644 index e9a06fb772..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -.vscode/ -.idea/ - -# Swap files -*.swp - -## Ensure WAF static libraries are not excluded from vendor folders -!internal/lib/*.so.gz -!internal/lib/*.dylib.gz - diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/CODEOWNERS b/vendor/github.com/DataDog/go-libddwaf/v4/CODEOWNERS deleted file mode 100644 index 2e4d479a6b..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/CODEOWNERS +++ /dev/null @@ -1,2 +0,0 @@ -# default owner -* @DataDog/asm-go diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/LICENSE b/vendor/github.com/DataDog/go-libddwaf/v4/LICENSE deleted file mode 100644 index 9301dd7ab9..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2016-present Datadog, Inc. - 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/DataDog/go-libddwaf/v4/README.md b/vendor/github.com/DataDog/go-libddwaf/v4/README.md deleted file mode 100644 index 2432adc937..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/README.md +++ /dev/null @@ -1,155 +0,0 @@ -# go-libddwaf - -This project's goal is to produce a higher level API for the go bindings to [libddwaf](https://github.com/DataDog/libddwaf): DataDog in-app WAF. -It consists of 2 separate entities: the bindings for the calls to libddwaf, and the encoder which job is to convert _any_ go value to its libddwaf object representation. - -An example usage would be: - -```go -import waf "github.com/DataDog/go-libddwaf/v4" - -//go:embed -var ruleset []byte - -func main() { - var parsedRuleset any - - if err := json.Unmarshal(ruleset, &parsedRuleset); err != nil { - panic(err) - } - - builder, err := waf.NewBuilder("", "") - if err != nil { - panic(err) - } - _, err := builder.AddOrUpdateConfig(parsedRuleset) - if err != nil { - panic(err) - } - - wafHandle := builder.Build() - if wafHandle == nil { - panic("WAF handle is nil") - } - defer wafHandle.Close() - - wafCtx := wafHandle.NewContext(timer.WithUnlimitedBudget(), timer.WithComponent("waf", "rasp")) - defer wafCtx.Close() - - matches, actions := wafCtx.Run(RunAddressData{ - Persistent: map[string]any{ - "server.request.path_params": "/rfiinc.txt", - }, - TimerKey: "waf", - }) -} -``` - -The API documentation details can be found on [pkg.go.dev](https://pkg.go.dev/github.com/DataDog/go-libddwaf/v4). - -Originally this project was only here to provide CGO Wrappers to the calls to libddwaf. -But with the appearance of `ddwaf_object` tree like structure, -but also with the intention to build CGO-less bindings, this project size has grown to be a fully integrated brick in the DataDog tracer structure. -Which in turn made it necessary to document the project, to maintain it in an orderly fashion. - -## Supported platforms - -This library currently support the following platform doublets: - -| OS | Arch | -| ----- | ------- | -| Linux | amd64 | -| Linux | aarch64 | -| OSX | amd64 | -| OSX | arm64 | - -This means that when the platform is not supported, top-level functions will return a `WafDisabledError` error including the purpose of it. - -Note that: -* Linux support include for glibc and musl variants -* OSX under 10.9 is not supported -* A build tag named `datadog.no_waf` can be manually added to force the WAF to be disabled. - -## Design - -The WAF bindings have multiple moving parts that are necessary to understand: - -- `Builder`: an object wrapper over the pointer to the C WAF Builder -- `Handle`: an object wrapper over the pointer to the C WAF Handle -- `Context`: an object wrapper over a pointer to the C WAF Context -- Encoder: its goal is to construct a tree of Waf Objects to send to the WAF -- Decoder: Transforms Waf Objects returned from the WAF to usual go objects (e.g. maps, arrays, ...) -- Library: The low-level go bindings to the C library, providing improved typing - -```mermaid -flowchart LR - START:::hidden -->|NewBuilder| Builder -->|Build| Handle - - Handle -->|NewContext| Context - - Context -->|Encode Inputs| Encoder - - Handle -->|Encode Ruleset| Encoder - Handle -->|Init WAF| Library - Context -->|Decode Result| Decoder - - Handle -->|Decode Init Errors| Decoder - - Context -->|Run| Library - Encoder -->|Allocate Waf Objects| runtime.Pinner - - Library -->|Call C code| libddwaf - - classDef hidden display: none; -``` - -### `runtime.Pinner` - -When passing Go values to the WAF, it is necessary to make sure that memory remains valid and does -not move until the WAF no longer has any pointers to it. We do this by using a `runtime.Pinner`. -Persistent address data is added to a `Context`-associated `runtime.Pinner`; while ephemeral address -data is managed by a transient `runtime.Pinner` that only exists for the duration of the call. - -### Typical call to Run() - -Here is an example of the flow of operations on a simple call to `Run()`: - -- Encode input data into WAF Objects and store references in the temporary pool -- Lock the context mutex until the end of the call -- Store references from the temporary pool into the context level pool -- Call `ddwaf_run` -- Decode the matches and actions - -### CGO-less C Bindings - -This library uses [purego](https://github.com/ebitengine/purego) to implement C bindings without requiring use of CGO at compilation time. The high-level workflow -is to embed the C shared library using `go:embed`, dump it into a file, open the library using `dlopen`, load the -symbols using `dlsym`, and finally call them. On Linux systems, using `memfd_create(2)` enables the library to be loaded without -writing to the filesystem. - -Another requirement of `libddwaf` is to have a FHS filesystem on your machine and, for Linux, to provide `libc.so.6`, -`libpthread.so.0`, and `libdl.so.2` as dynamic libraries. - -> :warning: Keep in mind that **purego only works on linux/darwin for amd64/arm64 and so does go-libddwaf.** - -## Contributing pitfalls - -- Cannot dlopen twice in the app lifetime on OSX. It messes with Thread Local Storage and usually finishes with a `std::bad_alloc()` -- `keepAlive()` calls are here to prevent the GC from destroying objects too early -- Since there is a stack switch between the Go code and the C code, usually the only C stacktrace you will ever get is from GDB -- If a segfault happens during a call to the C code, the goroutine stacktrace which has done the call is the one annotated with `[syscall]` -- [GoLand](https://www.jetbrains.com/go/) does not support `CGO_ENABLED=0` (as of June 2023) -- Keep in mind that we fully escape the type system. If you send the wrong data it will segfault in the best cases but not always! -- The structs in `ctypes.go` are here to reproduce the memory layout of the structs in `include/ddwaf.h` because pointers to these structs will be passed directly -- Do not use `uintptr` as function arguments or results types, coming from `unsafe.Pointer` casts of Go values, because they escape the pointer analysis which can create wrongly optimized code and crash. Pointer arithmetic is of course necessary in such a library but must be kept in the same function scope. -- GDB is available on arm64 but is not officially supported so it usually crashes pretty fast (as of June 2023) -- No pointer to variables on the stack shall be sent to the C code because Go stacks can be moved during the C call. More on this [here](https://medium.com/@trinad536/escape-analysis-in-golang-fc81b78f3550) - -## Debugging - -Debug-logging can be enabled for underlying C/C++ library by building (or testing) by setting the -`DD_APPSEC_WAF_LOG_LEVEL` environment variable to one of: `trace`, `debug`, `info`, `warn` (or -`warning`), `error`, `off` (which is the default behavior and logs nothing). - -The `DD_APPSEC_WAF_LOG_FILTER` environment variable can be set to a valid (per the `regexp` package) -regular expression to limit logging to only messages that match the regular expression. diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/builder.go b/vendor/github.com/DataDog/go-libddwaf/v4/builder.go deleted file mode 100644 index e8ed0b3c75..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/builder.go +++ /dev/null @@ -1,180 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "errors" - "fmt" - "runtime" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/ruleset" -) - -// Builder manages an evolving WAF configuration over time. Its lifecycle is -// typically tied to that of a remote configuration client, as its purpose is to -// keep an up-to-date view of the current coniguration with low overhead. This -// type is not safe for concurrent use, and users should protect it with a mutex -// or similar when sharing it across multiple goroutines. All methods of this -// type are safe to call with a nil receiver. -type Builder struct { - handle bindings.WAFBuilder - defaultLoaded bool -} - -// NewBuilder creates a new [Builder] instance. Its lifecycle is typically tied -// to that of a remote configuration client, as its purpose is to keep an -// up-to-date view of the current coniguration with low overhead. Returns nil if -// an error occurs when initializing the builder. The caller is responsible for -// calling [Builder.Close] when the builder is no longer needed. -func NewBuilder(keyObfuscatorRegex string, valueObfuscatorRegex string) (*Builder, error) { - if ok, err := Load(); !ok { - return nil, err - } - - var pinner runtime.Pinner - defer pinner.Unpin() - hdl := wafLib.BuilderInit(newConfig(&pinner, keyObfuscatorRegex, valueObfuscatorRegex)) - - if hdl == 0 { - return nil, errors.New("failed to initialize the WAF builder") - } - - return &Builder{handle: hdl}, nil -} - -// Close releases all resources associated with this builder. -func (b *Builder) Close() { - if b == nil || b.handle == 0 { - return - } - wafLib.BuilderDestroy(b.handle) - b.handle = 0 -} - -var ( - errUpdateFailed = errors.New("failed to update WAF Builder instance") - errBuilderClosed = errors.New("builder has already been closed") -) - -const defaultRecommendedRulesetPath = "::/go-libddwaf/default/recommended.json" - -// AddDefaultRecommendedRuleset adds the default recommended ruleset to the -// receiving [Builder], and returns the [Diagnostics] produced in the process. -func (b *Builder) AddDefaultRecommendedRuleset() (Diagnostics, error) { - var pinner runtime.Pinner - defer pinner.Unpin() - - ruleset, err := ruleset.DefaultRuleset(&pinner) - if err != nil { - return Diagnostics{}, fmt.Errorf("failed to load default recommended ruleset: %w", err) - } - - diag, err := b.addOrUpdateConfig(defaultRecommendedRulesetPath, &ruleset) - if err == nil { - b.defaultLoaded = true - } - return diag, err -} - -// RemoveDefaultRecommendedRuleset removes the default recommended ruleset from -// the receiving [Builder]. Returns true if the removal occurred (meaning the -// default recommended ruleset was indeed present in the builder). -func (b *Builder) RemoveDefaultRecommendedRuleset() bool { - if b.RemoveConfig(defaultRecommendedRulesetPath) { - b.defaultLoaded = false - return true - } - return false -} - -// AddOrUpdateConfig adds or updates a configuration fragment to this [Builder]. -// Returns the [Diagnostics] produced by adding or updating this configuration. -func (b *Builder) AddOrUpdateConfig(path string, fragment any) (Diagnostics, error) { - if b == nil || b.handle == 0 { - return Diagnostics{}, errBuilderClosed - } - - if path == "" { - return Diagnostics{}, errors.New("path cannot be blank") - } - - var pinner runtime.Pinner - defer pinner.Unpin() - - encoder, err := newEncoder(newUnlimitedEncoderConfig(&pinner)) - if err != nil { - return Diagnostics{}, fmt.Errorf("could not create encoder: %w", err) - } - - frag, err := encoder.Encode(fragment) - if err != nil { - return Diagnostics{}, fmt.Errorf("could not encode the config fragment into a WAF object; %w", err) - } - - return b.addOrUpdateConfig(path, frag) -} - -// addOrUpdateConfig adds or updates a configuration fragment to this [Builder]. -// Returns the [Diagnostics] produced by adding or updating this configuration. -func (b *Builder) addOrUpdateConfig(path string, cfg *bindings.WAFObject) (Diagnostics, error) { - var diagnosticsWafObj bindings.WAFObject - defer wafLib.ObjectFree(&diagnosticsWafObj) - - res := wafLib.BuilderAddOrUpdateConfig(b.handle, path, cfg, &diagnosticsWafObj) - - var diags Diagnostics - if !diagnosticsWafObj.IsInvalid() { - // The Diagnostics object will be invalid if the config was completely - // rejected. - var err error - diags, err = decodeDiagnostics(&diagnosticsWafObj) - if err != nil { - return diags, fmt.Errorf("failed to decode WAF diagnostics: %w", err) - } - } - - if !res { - return diags, errUpdateFailed - } - return diags, nil -} - -// RemoveConfig removes the configuration associated with the given path from -// this [Builder]. Returns true if the removal was successful. -func (b *Builder) RemoveConfig(path string) bool { - if b == nil || b.handle == 0 { - return false - } - - return wafLib.BuilderRemoveConfig(b.handle, path) -} - -// ConfigPaths returns the list of currently loaded configuration paths. -func (b *Builder) ConfigPaths(filter string) []string { - if b == nil || b.handle == 0 { - return nil - } - - return wafLib.BuilderGetConfigPaths(b.handle, filter) -} - -// Build creates a new [Handle] instance that uses the current configuration. -// Returns nil if an error occurs when building the handle. The caller is -// responsible for calling [Handle.Close] when the handle is no longer needed. -// This function may return nil. -func (b *Builder) Build() *Handle { - if b == nil || b.handle == 0 { - return nil - } - - hdl := wafLib.BuilderBuildInstance(b.handle) - if hdl == 0 { - return nil - } - - return wrapHandle(hdl) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/context.go b/vendor/github.com/DataDog/go-libddwaf/v4/context.go deleted file mode 100644 index 56fa4acb70..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/context.go +++ /dev/null @@ -1,343 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "fmt" - "maps" - "runtime" - "sync" - "time" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/pin" - "github.com/DataDog/go-libddwaf/v4/timer" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -// Context is a WAF execution context. It allows running the WAF incrementally when calling it -// multiple times to run its rules every time new addresses become available. Each request must have -// its own [Context]. New [Context] instances can be created by calling -// [Handle.NewContext]. -type Context struct { - // Timer registers the time spent in the WAF and go-libddwaf. It is created alongside the Context using the options - // passed in to NewContext. Once its time budget is exhausted, each new call to Context.Run will return a timeout error. - Timer timer.NodeTimer - - handle *Handle // Instance of the WAF - - cContext bindings.WAFContext // The C ddwaf_context pointer - - // mutex protecting the use of cContext which is not thread-safe and truncations - mutex sync.Mutex - - // truncations provides details about truncations that occurred while encoding address data for the WAF execution. - truncations map[TruncationReason][]int - - // pinner is used to retain Go data that is being passed to the WAF as part of - // [RunAddressData.Persistent] until the [Context.Close] method results in the context being - // destroyed. - pinner pin.ConcurrentPinner -} - -// RunAddressData provides address data to the [Context.Run] method. If a given key is present in -// both `Persistent` and `Ephemeral`, the value from `Persistent` will take precedence. -// When encoding Go structs to the WAF-compatible format, fields with the `ddwaf:"ignore"` tag are -// ignored and will not be visible to the WAF. -type RunAddressData struct { - // Persistent address data is scoped to the lifetime of a given Context, and subsquent calls to - // Context.Run with the same address name will be silently ignored. - Persistent map[string]any - // Ephemeral address data is scoped to a given Context.Run call and is not persisted across - // calls. This is used for protocols such as gRPC client/server streaming or GraphQL, where a - // single request can incur multiple subrequests. - Ephemeral map[string]any - - // TimerKey is the key used to track the time spent in the WAF for this run. - // If left empty, a new timer with unlimited budget is started. - TimerKey timer.Key -} - -func (d RunAddressData) isEmpty() bool { - return len(d.Persistent) == 0 && len(d.Ephemeral) == 0 -} - -// newTimer creates a new timer for this run. If the TimerKey is empty, a new timer without taking the parent into account is created. -func (d RunAddressData) newTimer(parent timer.NodeTimer) (timer.NodeTimer, error) { - if d.TimerKey == "" { - return timer.NewTreeTimer( - timer.WithComponents( - EncodeTimeKey, - DurationTimeKey, - DecodeTimeKey, - ), - timer.WithBudget(parent.SumRemaining()), - ) - } - - return parent.NewNode(d.TimerKey, - timer.WithComponents( - EncodeTimeKey, - DurationTimeKey, - DecodeTimeKey, - ), - timer.WithInheritedSumBudget(), - ) -} - -// Run encodes the given [RunAddressData] values and runs them against the WAF rules. -// Callers must check the returned [Result] object even when an error is returned, as the WAF might -// have been able to match some rules and generate events or actions before the error was reached; -// especially when the error is [waferrors.ErrTimeout]. -func (context *Context) Run(addressData RunAddressData) (res Result, err error) { - if addressData.isEmpty() { - return Result{}, nil - } - - // If the context has already timed out, we don't need to run the WAF again - if context.Timer.SumExhausted() { - return Result{}, waferrors.ErrTimeout - } - - runTimer, err := addressData.newTimer(context.Timer) - if err != nil { - return Result{}, err - } - - defer func() { - res.TimerStats = runTimer.Stats() - }() - - runTimer.Start() - defer runTimer.Stop() - - wafEncodeTimer := runTimer.MustLeaf(EncodeTimeKey) - wafEncodeTimer.Start() - defer wafEncodeTimer.Stop() - - persistentData, err := context.encodeOneAddressType(&context.pinner, addressData.Persistent, wafEncodeTimer) - if err != nil { - return Result{}, err - } - - // The WAF releases ephemeral address data at the max of each run call, so we need not keep the Go - // values live beyond that in the same way we need for persistent data. We hence use a separate - // encoder. - var ephemeralPinner runtime.Pinner - defer ephemeralPinner.Unpin() - ephemeralData, err := context.encodeOneAddressType(&ephemeralPinner, addressData.Ephemeral, wafEncodeTimer) - if err != nil { - return Result{}, err - } - - wafEncodeTimer.Stop() - - // ddwaf_run cannot run concurrently, so we need to lock the context - context.mutex.Lock() - defer context.mutex.Unlock() - - if context.cContext == 0 { - // Context has been closed, returning an empty result... - return Result{}, waferrors.ErrContextClosed - } - - if runTimer.SumExhausted() { - return Result{}, waferrors.ErrTimeout - } - - return context.run(persistentData, ephemeralData, runTimer) -} - -// merge merges two maps of slices into a single map of slices. The resulting map will contain all -// keys from both a and b, with the corresponding value from a and b concatenated (in this order) in -// a single slice. The implementation tries to minimize reallocations. -func merge[K comparable, V any](a, b map[K][]V) (merged map[K][]V) { - count := len(a) + len(b) - if count == 0 { - return - } - - keys := make(map[K]struct{}, count) - nothing := struct{}{} - totalCount := 0 - for _, m := range [2]map[K][]V{a, b} { - for k, v := range m { - keys[k] = nothing - totalCount += len(v) - } - } - - merged = make(map[K][]V, count) - values := make([]V, 0, totalCount) - - for k := range keys { - idxS := len(values) // Start index - values = append(values, a[k]...) - values = append(values, b[k]...) - idxE := len(values) // End index - - merged[k] = values[idxS:idxE] - } - - return -} - -// encodeOneAddressType encodes the given addressData values and returns the corresponding WAF -// object and its refs. If the addressData is empty, it returns nil for the WAF object and an empty -// ref pool. -// At this point, if the encoder does not timeout, the only error we can get is an error in case the -// top level object is a nil map, but this behaviour is expected since either persistent or -// ephemeral addresses are allowed to be null one at a time. In this case, Encode will return nil, -// which is what we need to send to ddwaf_run to signal that the address data is empty. -func (context *Context) encodeOneAddressType(pinner pin.Pinner, addressData map[string]any, timer timer.Timer) (*bindings.WAFObject, error) { - if addressData == nil { - return nil, nil - } - - encoder, err := newEncoder(newEncoderConfig(pinner, timer)) - if err != nil { - return nil, fmt.Errorf("could not create encoder: %w", err) - } - - data, _ := encoder.Encode(addressData) - if len(encoder.truncations) > 0 { - context.mutex.Lock() - defer context.mutex.Unlock() - - context.truncations = merge(context.truncations, encoder.truncations) - } - - if timer.Exhausted() { - return nil, waferrors.ErrTimeout - } - - return data, nil -} - -// run executes the ddwaf_run call with the provided data on this context. The caller is responsible for locking the -// context appropriately around this call. -func (context *Context) run(persistentData, ephemeralData *bindings.WAFObject, runTimer timer.NodeTimer) (Result, error) { - var pinner runtime.Pinner - defer pinner.Unpin() - - var result bindings.WAFObject - pinner.Pin(&result) - defer wafLib.ObjectFree(&result) - - // The value of the timeout cannot exceed 2^55 - // cf. https://en.cppreference.com/w/cpp/chrono/duration - timeout := uint64(runTimer.SumRemaining().Microseconds()) & 0x008FFFFFFFFFFFFF - ret := wafLib.Run(context.cContext, persistentData, ephemeralData, &result, timeout) - - decodeTimer := runTimer.MustLeaf(DecodeTimeKey) - decodeTimer.Start() - defer decodeTimer.Stop() - - res, duration, err := unwrapWafResult(ret, &result) - runTimer.AddTime(DurationTimeKey, duration) - return res, err -} - -func unwrapWafResult(ret bindings.WAFReturnCode, result *bindings.WAFObject) (Result, time.Duration, error) { - if !result.IsMap() { - return Result{}, 0, fmt.Errorf("invalid result (expected map, got %s)", result.Type) - } - - entries, err := result.Values() - if err != nil { - return Result{}, 0, err - } - - var ( - res Result - duration time.Duration - ) - for _, entry := range entries { - switch key := entry.MapKey(); key { - case "timeout": - timeout, err := entry.BoolValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode timeout: %w", err) - } - if timeout { - err = waferrors.ErrTimeout - } - case "keep": - keep, err := entry.BoolValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode keep: %w", err) - } - res.Keep = keep - case "duration": - dur, err := entry.UIntValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode duration: %w", err) - } - duration = time.Duration(dur) * time.Nanosecond - case "events": - if !entry.IsArray() { - return Result{}, 0, fmt.Errorf("invalid events (expected array, got %s)", entry.Type) - } - if entry.NbEntries != 0 { - events, err := entry.ArrayValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode events: %w", err) - } - res.Events = events - } - case "actions": - if !entry.IsMap() { - return Result{}, 0, fmt.Errorf("invalid actions (expected map, got %s)", entry.Type) - } - if entry.NbEntries != 0 { - actions, err := entry.MapValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode actions: %w", err) - } - res.Actions = actions - } - case "attributes": - if !entry.IsMap() { - return Result{}, 0, fmt.Errorf("invalid attributes (expected map, got %s)", entry.Type) - } - if entry.NbEntries != 0 { - derivatives, err := entry.MapValue() - if err != nil { - return Result{}, 0, fmt.Errorf("failed to decode attributes: %w", err) - } - res.Derivatives = derivatives - } - } - } - - return res, duration, goRunError(ret) -} - -// Close disposes of the underlying `ddwaf_context` and releases the associated -// internal data. It also decreases the reference count of the [Handle] which -// created this [Context], possibly releasing it completely (if this was the -// last [Context] created from it, and it is no longer in use by its creator). -func (context *Context) Close() { - context.mutex.Lock() - defer context.mutex.Unlock() - - wafLib.ContextDestroy(context.cContext) - defer context.handle.Close() // Reduce the reference counter of the Handle. - context.cContext = 0 // Makes it easy to spot use-after-free/double-free issues - - context.pinner.Unpin() // The pinned data is no longer needed, explicitly release -} - -// Truncations returns the truncations that occurred while encoding address data for WAF execution. -// The key is the truncation reason: either because the object was too deep, the arrays where to large or the strings were too long. -// The value is a slice of integers, each integer being the original size of the object that was truncated. -// In case of the [ObjectTooDeep] reason, the original size can only be approximated because of recursive objects. -func (context *Context) Truncations() map[TruncationReason][]int { - context.mutex.Lock() - defer context.mutex.Unlock() - - return maps.Clone(context.truncations) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/decoder.go b/vendor/github.com/DataDog/go-libddwaf/v4/decoder.go deleted file mode 100644 index 995e0ee5ff..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/decoder.go +++ /dev/null @@ -1,167 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "fmt" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -// decodeErrors transforms the wafObject received by the wafRulesetInfo after the call to wafDl.wafInit to a map where -// keys are the error message and the value is a array of all the rule ids which triggered this specific error -func decodeErrors(obj *bindings.WAFObject) (map[string][]string, error) { - if !obj.IsMap() { - return nil, fmt.Errorf("decodeErrors: %w: expected map, got %s", waferrors.ErrInvalidObjectType, obj.Type) - } - - if obj.Value == 0 && obj.NbEntries == 0 { - return nil, nil - } - - if obj.Value == 0 && obj.NbEntries > 0 { - return nil, waferrors.ErrNilObjectPtr - } - - wafErrors := map[string][]string{} - for i := uint64(0); i < obj.NbEntries; i++ { - objElem := unsafe.CastWithOffset[bindings.WAFObject](obj.Value, i) - - errorMessage := unsafe.GostringSized(unsafe.Cast[byte](objElem.ParameterName), objElem.ParameterNameLength) - ruleIds, err := decodeStringArray(objElem) - if err != nil { - return nil, err - } - - wafErrors[errorMessage] = ruleIds - } - - return wafErrors, nil -} - -func decodeDiagnostics(obj *bindings.WAFObject) (Diagnostics, error) { - if !obj.IsMap() { - return Diagnostics{}, fmt.Errorf("decodeDiagnostics: %w: expected map, got %s", waferrors.ErrInvalidObjectType, obj.Type) - } - if obj.Value == 0 && obj.NbEntries > 0 { - return Diagnostics{}, waferrors.ErrNilObjectPtr - } - - var ( - diags Diagnostics - err error - ) - for i := uint64(0); i < obj.NbEntries; i++ { - objElem := unsafe.CastWithOffset[bindings.WAFObject](obj.Value, i) - key := unsafe.GostringSized(unsafe.Cast[byte](objElem.ParameterName), objElem.ParameterNameLength) - switch key { - case "actions": - diags.Actions, err = decodeFeature(objElem) - case "custom_rules": - diags.CustomRules, err = decodeFeature(objElem) - case "exclusions": - diags.Exclusions, err = decodeFeature(objElem) - case "rules": - diags.Rules, err = decodeFeature(objElem) - case "rules_data": - diags.RulesData, err = decodeFeature(objElem) - case "exclusion_data": - diags.ExclusionData, err = decodeFeature(objElem) - case "rules_override": - diags.RulesOverrides, err = decodeFeature(objElem) - case "processors": - diags.Processors, err = decodeFeature(objElem) - case "scanners": - diags.Scanners, err = decodeFeature(objElem) - case "ruleset_version": - diags.Version = unsafe.GostringSized(unsafe.Cast[byte](objElem.Value), objElem.NbEntries) - default: - // ignore? - } - if err != nil { - return Diagnostics{}, err - } - } - - return diags, nil -} - -func decodeFeature(obj *bindings.WAFObject) (*Feature, error) { - if !obj.IsMap() { - return nil, fmt.Errorf("decodeFeature: %w: expected map, got %s", waferrors.ErrInvalidObjectType, obj.Type) - } - if obj.Value == 0 && obj.NbEntries > 0 { - return nil, waferrors.ErrNilObjectPtr - } - var feature Feature - var err error - - for i := uint64(0); i < obj.NbEntries; i++ { - objElem := unsafe.CastWithOffset[bindings.WAFObject](obj.Value, i) - key := unsafe.GostringSized(unsafe.Cast[byte](objElem.ParameterName), objElem.ParameterNameLength) - switch key { - case "error": - feature.Error = unsafe.GostringSized(unsafe.Cast[byte](objElem.Value), objElem.NbEntries) - case "errors": - feature.Errors, err = decodeErrors(objElem) - case "failed": - feature.Failed, err = decodeStringArray(objElem) - case "loaded": - feature.Loaded, err = decodeStringArray(objElem) - case "skipped": - feature.Skipped, err = decodeStringArray(objElem) - case "warnings": - feature.Warnings, err = decodeErrors(objElem) - default: - return nil, fmt.Errorf("%w: %s", waferrors.ErrUnsupportedValue, key) - } - - if err != nil { - return nil, err - } - } - - return &feature, nil -} - -func decodeStringArray(obj *bindings.WAFObject) ([]string, error) { - // We consider that nil is an empty array - if obj.IsNil() { - return nil, nil - } - - if !obj.IsArray() { - return nil, fmt.Errorf("decodeStringArray: %w: expected array, got %s", waferrors.ErrInvalidObjectType, obj.Type) - } - - if obj.Value == 0 && obj.NbEntries > 0 { - return nil, waferrors.ErrNilObjectPtr - } - - if obj.NbEntries == 0 { - return nil, nil - } - - strArr := make([]string, 0, obj.NbEntries) - for i := uint64(0); i < obj.NbEntries; i++ { - objElem := unsafe.CastWithOffset[bindings.WAFObject](obj.Value, i) - if objElem.Type != bindings.WAFStringType { - return nil, fmt.Errorf("decodeStringArray: %w: expected string, got %s", waferrors.ErrInvalidObjectType, objElem.Type) - } - - strArr = append(strArr, unsafe.GostringSized(unsafe.Cast[byte](objElem.Value), objElem.NbEntries)) - } - - return strArr, nil -} - -// Deprecated: This is merely wrapping [bindings.WAFObject.AnyValue], which should be used directly -// instead. -func DecodeObject(obj *WAFObject) (any, error) { - return obj.AnyValue() -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/diagnostics.go b/vendor/github.com/DataDog/go-libddwaf/v4/diagnostics.go deleted file mode 100644 index c1675af79e..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/diagnostics.go +++ /dev/null @@ -1,89 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "errors" - "fmt" -) - -// Diagnostics stores the information as provided by the WAF about WAF rules parsing and loading. It -// is returned by [Builder.AddOrUpdateConfig]. -type Diagnostics struct { - // Rules contains information about the loaded rules. - Rules *Feature - // CustomRules contains information about the loaded custom rules. - CustomRules *Feature - // Actions contains information about the loaded actions. - Actions *Feature - // Exclusions contains information about the loaded exclusions. - Exclusions *Feature - // RulesOverrides contains information about the loaded rules overrides. - RulesOverrides *Feature - // RulesData contains information about the loaded rules data. - RulesData *Feature - // ExclusionData contains information about the loaded exclusion data. - ExclusionData *Feature - // Processors contains information about the loaded processors. - Processors *Feature - // Scanners contains information about the loaded scanners. - Scanners *Feature - // Version is the version of the parsed ruleset if available. - Version string -} - -// EachFeature calls the provided callback for each (non-nil) feature in this diagnostics object. -func (d *Diagnostics) EachFeature(cb func(string, *Feature)) { - byName := map[string]*Feature{ - "rules": d.Rules, - "custom_rules": d.CustomRules, - "actions": d.Actions, - "exclusions": d.Exclusions, - "rules_overrides": d.RulesOverrides, - "rules_data": d.RulesData, - "exclusion_data": d.ExclusionData, - "processors": d.Processors, - "scanners": d.Scanners, - } - - for name, feat := range byName { - if feat != nil { - cb(name, feat) - } - } -} - -// TopLevelError returns the list of top-level errors reported by the WAF on any of the Diagnostics -// entries, rolled up into a single error value. Returns nil if no top-level errors were reported. -// Individual, item-level errors might still exist. -func (d *Diagnostics) TopLevelError() error { - var err error - d.EachFeature(func(name string, feat *Feature) { - if feat.Error != "" { - err = errors.Join(err, fmt.Errorf("%q: %s", name, feat.Error)) - } - }) - return err -} - -// Feature stores the information as provided by the WAF about loaded and failed -// rules for a specific feature of the WAF ruleset. -type Feature struct { - // Errors is a map of parsing errors to a list of unique identifiers from the elements which - // failed loading due to this specific error. - Errors map[string][]string - // Warnings is a map of parsing warnings to a list of unique identifiers from the elements which - // resulted in this specific warning. - Warnings map[string][]string - // Error is the single error which prevented parsing this feature. - Error string - // Loaded is a list of the unique identifiers from successfully loaded elements. - Loaded []string - // Failed is a list of the unique identifiers from the elements which couldn't be loaded. - Failed []string - // Skipped is a list of the unique identifiers from the elements which were skipped. - Skipped []string -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/encoder.go b/vendor/github.com/DataDog/go-libddwaf/v4/encoder.go deleted file mode 100644 index 4fde6e1e53..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/encoder.go +++ /dev/null @@ -1,598 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "context" - "encoding/json" - "encoding/xml" - "fmt" - "math" - "reflect" - "strings" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/pin" - "github.com/DataDog/go-libddwaf/v4/timer" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -type EncoderConfig struct { - // Pinner is used to pin the data referenced by the encoded wafObjects. - Pinner pin.Pinner - // Timer makes sure the encoder doesn't spend too much time doing its job. - Timer timer.Timer - // MaxContainerSize is the maximum number of elements in a container (list, map, struct) that will be encoded. - MaxContainerSize int - // MaxStringSize is the maximum length of a string that will be encoded. - MaxStringSize int - // MaxObjectDepth is the maximum depth of the object that will be encoded. - MaxObjectDepth int -} - -// encoder encodes Go values into wafObjects. Only the subset of Go types representable into wafObjects -// will be encoded while ignoring the rest of it. -// The encoder allocates the memory required for new wafObjects into the Go memory, which must be kept -// referenced for their lifetime in the C world. This lifetime depends on the ddwaf function being used with. -// the encoded result. The Go references of the allocated wafObjects, along with every Go pointer they may -// reference now or in the future, are stored and referenced in the `cgoRefs` field. The user MUST leverage -// `keepAlive()` with it according to its ddwaf use-case. -type encoder struct { - config EncoderConfig - - // For each TruncationReason, holds the size that is required to avoid truncation for each truncation that happened. - truncations map[TruncationReason][]int -} - -// TruncationReason is a flag representing reasons why some input was not encoded in full. -type TruncationReason uint8 - -const ( - // StringTooLong indicates a string exceeded the maximum string length configured. The truncation - // values indicate the actual length of truncated strings. - StringTooLong TruncationReason = 1 << iota - // ContainerTooLarge indicates a container (list, map, struct) exceeded the maximum number of - // elements configured. The truncation values indicate the actual number of elements in the - // truncated container. - ContainerTooLarge - // ObjectTooDeep indicates an overall object exceeded the maximum encoding depths configured. The - // truncation values indicate an estimated actual depth of the truncated object. The value is - // guaranteed to be less than or equal to the actual depth (it may not be more). - ObjectTooDeep -) - -func (reason TruncationReason) String() string { - switch reason { - case ObjectTooDeep: - return "container_depth" - case ContainerTooLarge: - return "container_size" - case StringTooLong: - return "string_length" - default: - return fmt.Sprintf("TruncationReason(%v)", int(reason)) - } -} - -const ( - AppsecFieldTag = "ddwaf" - AppsecFieldTagValueIgnore = "ignore" -) - -// WAFObject is the C struct that represents a WAF object. It is passed as-is to the C-world. -// It is highly advised to use the methods on the object to manipulate it and not set the fields manually. -type WAFObject = bindings.WAFObject - -// Encodable represent a type that can encode itself into a WAFObject. -// The encodable is responsible for using the [pin.Pinner] -// object passed in the [EncoderConfig] to pin the data referenced by the encoded [bindings.WAFObject]. -// The encoder must also use the [timer.Timer] passed in the [EncoderConfig] to -// make sure it doesn't spend too much time doing its job. -// The encoder must also respect the [EncoderConfig] limits and report truncations. -type Encodable interface { - // Encode encodes the receiver as the WAFObject obj using the provided EncoderConfig and remaining depth allowed. - // It returns a map of truncation reasons and their respective actual sizes. If the error returned is not nil, - // it is greatly advised to return errors from the waferrors package error when it matters. - // Outside of encoding the value, it is expected to check for truncations sizes as advised in the EncoderConfig - // and to regularly call the EncoderConfig.Timer.Exhausted() method to check if the encoding is still allowed - // and return waferrors.ErrTimeout if it is not. - // This method is not expected or required to be safe to concurrently call from multiple goroutines. - Encode(config EncoderConfig, obj *bindings.WAFObject, depth int) (map[TruncationReason][]int, error) -} - -func newEncoder(config EncoderConfig) (*encoder, error) { - if config.Pinner == nil { - return nil, fmt.Errorf("pinner cannot be nil") - } - if config.Timer == nil { - config.Timer, _ = timer.NewTimer(timer.WithUnlimitedBudget()) - } - if config.MaxContainerSize < 0 { - return nil, fmt.Errorf("container max size must be greater than 0") - } - if config.MaxStringSize < 0 { - return nil, fmt.Errorf("string max size must be greater than 0") - } - if config.MaxObjectDepth < 0 { - return nil, fmt.Errorf("object max depth must be greater than 0") - } - - return &encoder{config: config}, nil -} - -func newEncoderConfig(pinner pin.Pinner, timer timer.Timer) EncoderConfig { - return EncoderConfig{ - Pinner: pinner, - Timer: timer, - MaxContainerSize: bindings.MaxContainerSize, - MaxStringSize: bindings.MaxStringLength, - MaxObjectDepth: bindings.MaxContainerDepth, - } -} - -func newUnlimitedEncoderConfig(pinner pin.Pinner) EncoderConfig { - return EncoderConfig{ - Pinner: pinner, - MaxContainerSize: math.MaxInt, - MaxStringSize: math.MaxInt, - MaxObjectDepth: math.MaxInt, - } -} - -// Encode takes a Go value and returns a wafObject pointer and an error. -// The returned wafObject is the root of the tree of nested wafObjects representing the Go value. -// The only error case is if the top-level object is "Unusable" which means that the data is nil or a non-data type -// like a function or a channel. -func (encoder *encoder) Encode(data any) (*bindings.WAFObject, error) { - value := reflect.ValueOf(data) - wo := &bindings.WAFObject{} - - err := encoder.encode(value, wo, encoder.config.MaxObjectDepth) - - if _, ok := encoder.truncations[ObjectTooDeep]; ok && !encoder.config.Timer.Exhausted() { - ctx, cancelCtx := context.WithTimeout(context.Background(), encoder.config.Timer.Remaining()) - defer cancelCtx() - - depth, _ := depthOf(ctx, value) - encoder.truncations[ObjectTooDeep] = []int{depth} - } - - return wo, err -} - -var nullableTypeKinds = map[reflect.Kind]struct{}{ - reflect.Interface: {}, - reflect.Pointer: {}, - reflect.UnsafePointer: {}, - reflect.Map: {}, - reflect.Slice: {}, - reflect.Func: {}, - reflect.Chan: {}, -} - -var ( - jsonNumberType = reflect.TypeFor[json.Number]() - byteArrayType = reflect.TypeFor[[]byte]() -) - -// isValueNil check if the value is nullable and if it is actually nil -// we cannot directly use value.IsNil() because it panics on non-pointer values -func isValueNil(value reflect.Value) bool { - _, nullable := nullableTypeKinds[value.Kind()] - return nullable && value.IsNil() -} - -func (encoder *encoder) encode(value reflect.Value, obj *bindings.WAFObject, depth int) error { - if encoder.config.Timer.Exhausted() { - return waferrors.ErrTimeout - } - - if value.IsValid() && value.CanInterface() { - if encodable, ok := value.Interface().(Encodable); ok { - truncations, err := encodable.Encode(encoder.config, obj, depth) - encoder.truncations = merge(encoder.truncations, truncations) - return err - } - } - - value, kind := resolvePointer(value) - if (kind == reflect.Interface || kind == reflect.Pointer) && !value.IsNil() { - // resolvePointer failed to resolve to something that's not a pointer, it - // has indirected too many times... - return waferrors.ErrTooManyIndirections - } - - // Measure-only runs for leaves - if obj == nil && kind != reflect.Array && kind != reflect.Slice && kind != reflect.Map && kind != reflect.Struct { - // Nothing to do, we were only here to measure object depth! - return nil - } - - switch { - // Terminal cases (leaves of the tree) - // Is invalid type: nil interfaces for example, cannot be used to run any reflect method or it's susceptible to panic - case !value.IsValid() || kind == reflect.Invalid: - return waferrors.ErrUnsupportedValue - // Is nullable type: nil pointers, channels, maps or functions - case isValueNil(value): - obj.SetNil() - - // Booleans - case kind == reflect.Bool: - obj.SetBool(value.Bool()) - - // Numbers - case value.CanInt(): // any int type or alias - obj.SetInt(value.Int()) - case value.CanUint(): // any Uint type or alias - obj.SetUint(value.Uint()) - case value.CanFloat(): // any float type or alias - obj.SetFloat(value.Float()) - - // json.Number -- string-represented arbitrary precision numbers - case value.Type() == jsonNumberType: - encoder.encodeJSONNumber(value.Interface().(json.Number), obj) - - // Strings - case kind == reflect.String: // string type - encoder.encodeString(value.String(), obj) - - case (kind == reflect.Array || kind == reflect.Slice) && value.Type().Elem().Kind() == reflect.Uint8: - // Byte Arrays are skipped voluntarily because they are often used - // to do partial parsing which leads to false positives - return nil - - // Containers (internal nodes of the tree) - - // All recursive cases can only execute if the depth is superior to 0. - case depth <= 0: - // Record that there was a truncation; we will try to measure the actual depth of the object afterwards. - encoder.addTruncation(ObjectTooDeep, -1) - return waferrors.ErrMaxDepthExceeded - - // Either an array or a slice of an array - case kind == reflect.Array || kind == reflect.Slice: - encoder.encodeArray(value, obj, depth-1) - case kind == reflect.Map: - encoder.encodeMap(value, obj, depth-1) - case kind == reflect.Struct: - encoder.encodeStruct(value, obj, depth-1) - - default: - return waferrors.ErrUnsupportedValue - } - - return nil -} - -func (encoder *encoder) encodeJSONNumber(num json.Number, obj *bindings.WAFObject) { - // Important to attempt int64 first, as this is lossless. Values that are either too small or too - // large to be represented as int64 can be represented as float64, but this can be lossy. - if i, err := num.Int64(); err == nil { - obj.SetInt(i) - return - } - - if f, err := num.Float64(); err == nil { - obj.SetFloat(f) - return - } - - // Could not store as int64 nor float, so we'll store it as a string... - encoder.encodeString(num.String(), obj) -} - -func (encoder *encoder) encodeString(str string, obj *bindings.WAFObject) { - size := len(str) - if size > encoder.config.MaxStringSize { - str = str[:encoder.config.MaxStringSize] - encoder.addTruncation(StringTooLong, size) - } - obj.SetString(encoder.config.Pinner, str) -} - -var xmlNameType = reflect.TypeFor[xml.Name]() - -func getFieldNameFromType(field reflect.StructField) (string, bool) { - fieldName := field.Name - - // Private and synthetics fields - if !field.IsExported() { - return "", false - } - - // This is the XML namespace/name pair, this isn't technically part of the data. - if field.Type == xmlNameType { - return "", false - } - - // Use the encoding tag name as field name if present - var contentTypeTag bool - for _, tagName := range []string{"json", "yaml", "xml", "toml"} { - tag, ok := field.Tag.Lookup(tagName) - if !ok { - continue - } - if tag == "-" { - // Explicitly ignored, note that only "-" causes the field to be ignored, - // any qualifier ("-,omitempty" or event "-,") will cause the field to be - // actually named "-" instead of being ignored. - return "", false - } - contentTypeTag = true - tag, _, _ = strings.Cut(tag, ",") - switch tag { - case "": - // Nothing to do - continue - default: - return tag, true - } - } - - // If none of the content-type tags are set, the field name is used; but we - // specifically exclude those fields tagged as coming from a header, path - // parameter or query parameter (this is used by labstack/echo.v4, see - // https://echo.labstack.com/docs/binding). - if !contentTypeTag { - for _, tagName := range []string{"header", "path", "query"} { - if _, ok := field.Tag.Lookup(tagName); ok { - return "", false - } - } - } - - return fieldName, true -} - -// encodeStruct takes a reflect.Value and a wafObject pointer and iterates on the struct field to build -// a wafObject map of type wafMapType. The specificities are the following: -// - It will only take the first encoder.ContainerMaxSize elements of the struct -// - If the field has a json tag it will become the field name -// - Private fields and also values producing an error at encoding will be skipped -// - Even if the element values are invalid or null we still keep them to report the field name -func (encoder *encoder) encodeStruct(value reflect.Value, obj *bindings.WAFObject, depth int) { - if encoder.config.Timer.Exhausted() { - return - } - - typ := value.Type() - nbFields := typ.NumField() - - capacity := nbFields - length := 0 - if capacity > encoder.config.MaxContainerSize { - capacity = encoder.config.MaxContainerSize - } - - objArray := obj.SetMap(encoder.config.Pinner, uint64(capacity)) - for i := 0; i < nbFields; i++ { - if encoder.config.Timer.Exhausted() { - return - } - - if length == capacity { - encoder.addTruncation(ContainerTooLarge, nbFields) - break - } - - fieldType := typ.Field(i) - fieldName, usable := getFieldNameFromType(fieldType) - if tag, ok := fieldType.Tag.Lookup(AppsecFieldTag); !usable || ok && tag == AppsecFieldTagValueIgnore { - // Either the struct field is ignored by json marshaling so can we, - // or the field was explicitly set with `ddwaf:ignore` - continue - } - - objElem := &objArray[length] - // If the Map key is of unsupported type, skip it - encoder.encodeMapKeyFromString(fieldName, objElem) - - if err := encoder.encode(value.Field(i), objElem, depth); err != nil { - // We still need to keep the map key, so we can't discard the full object, instead, we make the value a noop - objElem.SetInvalid() - } - - length++ - } - - // Set the length to the final number of successfully encoded elements - obj.NbEntries = uint64(length) -} - -// encodeMap takes a reflect.Value and a wafObject pointer and iterates on the map elements and returns -// a wafObject map of type wafMapType. The specificities are the following: -// - It will only take the first encoder.ContainerMaxSize elements of the map -// - Even if the element values are invalid or null we still keep them to report the map key -func (encoder *encoder) encodeMap(value reflect.Value, obj *bindings.WAFObject, depth int) { - capacity := value.Len() - if capacity > encoder.config.MaxContainerSize { - capacity = encoder.config.MaxContainerSize - } - - objArray := obj.SetMap(encoder.config.Pinner, uint64(capacity)) - - length := 0 - for iter := value.MapRange(); iter.Next(); { - if encoder.config.Timer.Exhausted() { - return - } - - if length == capacity { - encoder.addTruncation(ContainerTooLarge, value.Len()) - break - } - - objElem := &objArray[length] - if err := encoder.encodeMapKey(iter.Key(), objElem); err != nil { - continue - } - - if err := encoder.encode(iter.Value(), objElem, depth); err != nil { - // We still need to keep the map key, so we can't discard the full object, instead, we make the value a noop - objElem.SetInvalid() - } - - length++ - } - - // Fix the size because we skipped map entries - obj.NbEntries = uint64(length) -} - -// encodeMapKey takes a reflect.Value and a wafObject and returns a wafObject ready to be considered a map entry. We use -// the function cgoRefPool.AllocWafMapKey to store the key in the wafObject. But first we need to grab the real -// underlying value by recursing through the pointer and interface values. -func (encoder *encoder) encodeMapKey(value reflect.Value, obj *bindings.WAFObject) error { - value, kind := resolvePointer(value) - - var keyStr string - switch { - case kind == reflect.Invalid: - return waferrors.ErrInvalidMapKey - case kind == reflect.String: - keyStr = value.String() - case value.Type() == byteArrayType: - keyStr = string(value.Bytes()) - default: - return waferrors.ErrInvalidMapKey - } - - encoder.encodeMapKeyFromString(keyStr, obj) - return nil -} - -// encodeMapKeyFromString takes a string and a wafObject and sets the map key attribute on the wafObject to the supplied -// string. The key may be truncated if it exceeds the maximum string size allowed by the encoder. -func (encoder *encoder) encodeMapKeyFromString(keyStr string, obj *bindings.WAFObject) { - size := len(keyStr) - if size > encoder.config.MaxStringSize { - keyStr = keyStr[:encoder.config.MaxStringSize] - encoder.addTruncation(StringTooLong, size) - } - - obj.SetMapKey(encoder.config.Pinner, keyStr) -} - -// encodeArray takes a reflect.Value and a wafObject pointer and iterates on the elements and returns -// a wafObject array of type wafArrayType. The specificities are the following: -// - It will only take the first encoder.ContainerMaxSize elements of the array -// - Elements producing an error at encoding or null values will be skipped -func (encoder *encoder) encodeArray(value reflect.Value, obj *bindings.WAFObject, depth int) { - length := value.Len() - - capacity := length - if capacity > encoder.config.MaxContainerSize { - capacity = encoder.config.MaxContainerSize - } - - currIndex := 0 - - objArray := obj.SetArray(encoder.config.Pinner, uint64(capacity)) - - for i := 0; i < length; i++ { - if encoder.config.Timer.Exhausted() { - return - } - if currIndex == capacity { - encoder.addTruncation(ContainerTooLarge, length) - break - } - - objElem := &objArray[currIndex] - if err := encoder.encode(value.Index(i), objElem, depth); err != nil { - continue - } - - // If the element is null or invalid it has no impact on the waf execution, therefore we can skip its - // encoding. In this specific case we just overwrite it at the next loop iteration. - if objElem.IsUnusable() { - continue - } - - currIndex++ - } - - // Fix the size because we skipped map entries - obj.NbEntries = uint64(currIndex) -} - -func (encoder *encoder) addTruncation(reason TruncationReason, size int) { - if encoder.truncations == nil { - encoder.truncations = make(map[TruncationReason][]int, 3) - } - encoder.truncations[reason] = append(encoder.truncations[reason], size) -} - -// depthOf returns the depth of the provided object. This is 0 for scalar values, -// such as strings. -func depthOf(ctx context.Context, obj reflect.Value) (depth int, err error) { - if err = ctx.Err(); err != nil { - // Timed out, won't go any deeper - return 0, err - } - - obj, kind := resolvePointer(obj) - - var itemDepth int - switch kind { - case reflect.Array, reflect.Slice: - if obj.Type() == byteArrayType { - // We treat byte slices as strings - return 0, nil - } - for i := 0; i < obj.Len(); i++ { - itemDepth, err = depthOf(ctx, obj.Index(i)) - depth = max(depth, itemDepth) - if err != nil { - break - } - } - return depth + 1, err - case reflect.Map: - for iter := obj.MapRange(); iter.Next(); { - itemDepth, err = depthOf(ctx, iter.Value()) - depth = max(depth, itemDepth) - if err != nil { - break - } - } - return depth + 1, err - case reflect.Struct: - typ := obj.Type() - for i := 0; i < obj.NumField(); i++ { - fieldType := typ.Field(i) - _, usable := getFieldNameFromType(fieldType) - if !usable { - continue - } - - itemDepth, err = depthOf(ctx, obj.Field(i)) - depth = max(depth, itemDepth) - if err != nil { - break - } - } - return depth + 1, err - default: - return 0, nil - } -} - -// resolvePointer attempts to resolve a pointer while limiting the pointer depth -// to be traversed, so that this is not susceptible to an infinite loop when -// provided a self-referencing pointer. -func resolvePointer(obj reflect.Value) (reflect.Value, reflect.Kind) { - kind := obj.Kind() - for limit := 8; limit > 0 && kind == reflect.Pointer || kind == reflect.Interface; limit-- { - if obj.IsNil() { - return obj, kind - } - obj = obj.Elem() - kind = obj.Kind() - } - return obj, kind -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/handle.go b/vendor/github.com/DataDog/go-libddwaf/v4/handle.go deleted file mode 100644 index 013fefcd21..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/handle.go +++ /dev/null @@ -1,169 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "fmt" - "runtime" - "sync/atomic" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - "github.com/DataDog/go-libddwaf/v4/timer" - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -// Handle represents an instance of the WAF for a given ruleset. It is obtained -// from [Builder.Build]; and must be disposed of by calling [Handle.Close] -// once no longer in use. -type Handle struct { - // Lock-less reference counter avoiding blocking calls to the [Handle.Close] - // method while WAF [Context]s are still using the WAF handle. Instead, we let - // the release actually happen only when the reference counter reaches 0. - // This can happen either from a request handler calling its WAF context's - // [Context.Close] method, or either from the appsec instance calling the WAF - // [Handle.Close] method when creating a new WAF handle with new rules. - // Note that this means several instances of the WAF can exist at the same - // time with their own set of rules. This choice was done to be able to - // efficiently update the security rules concurrently, without having to - // block the request handlers for the time of the security rules update. - refCounter atomic.Int32 - - // Instance of the WAF - cHandle bindings.WAFHandle -} - -// wrapHandle wraps the provided C handle into a [Handle]. The caller is -// responsible to ensure the cHandle value is not 0 (NULL). The returned -// [Handle] has a reference count of 1, so callers need not call [Handle.retain] -// on it. -func wrapHandle(cHandle bindings.WAFHandle) *Handle { - handle := &Handle{cHandle: cHandle} - handle.refCounter.Store(1) // We count the handle itself in the counter - return handle -} - -// NewContext returns a new WAF context for the given WAF handle. -// An error is returned when the WAF handle was released or when the WAF context -// couldn't be created. -func (handle *Handle) NewContext(timerOptions ...timer.Option) (*Context, error) { - // Handle has been released - if !handle.retain() { - return nil, fmt.Errorf("handle was released") - } - - cContext := wafLib.ContextInit(handle.cHandle) - if cContext == 0 { - handle.Close() // We couldn't get a context, so we no longer have an implicit reference to the Handle in it... - return nil, fmt.Errorf("could not get C context") - } - - rootTimer, err := timer.NewTreeTimer(timerOptions...) - if err != nil { - return nil, err - } - - return &Context{ - handle: handle, - cContext: cContext, - Timer: rootTimer, - truncations: make(map[TruncationReason][]int, 3), - }, nil -} - -// Addresses returns the list of addresses the WAF has been configured to monitor based on the input -// ruleset. -func (handle *Handle) Addresses() []string { - return wafLib.KnownAddresses(handle.cHandle) -} - -// Actions returns the list of actions the WAF has been configured to monitor based on the input -// ruleset. -func (handle *Handle) Actions() []string { - return wafLib.KnownActions(handle.cHandle) -} - -// Close decrements the reference counter of this [Handle], possibly allowing it to be destroyed -// and all the resources associated with it to be released. -func (handle *Handle) Close() { - if handle.addRefCounter(-1) != 0 { - // Either the counter is still positive (this Handle is still referenced), or it had previously - // reached 0 and some other call has done the cleanup already. - return - } - - wafLib.Destroy(handle.cHandle) - handle.cHandle = 0 // Makes it easy to spot use-after-free/double-free issues -} - -// retain increments the reference counter of this [Handle]. Returns true if the -// [Handle] is still valid, false if it is no longer usable. Calls to -// [Handle.retain] must be balanced with calls to [Handle.Close] in order to -// avoid leaking [Handle]s. -func (handle *Handle) retain() bool { - return handle.addRefCounter(1) > 0 -} - -// addRefCounter adds x to Handle.refCounter. The return valid indicates whether the refCounter -// reached 0 as part of this call or not, which can be used to perform "only-once" activities: -// -// * result > 0 => the Handle is still usable -// * result == 0 => the handle is no longer usable, ref counter reached 0 as part of this call -// * result == -1 => the handle is no longer usable, ref counter was already 0 previously -func (handle *Handle) addRefCounter(x int32) int32 { - // We use a CAS loop to avoid setting the refCounter to a negative value. - for { - current := handle.refCounter.Load() - if current <= 0 { - // The object had already been released - return -1 - } - - next := current + x - if swapped := handle.refCounter.CompareAndSwap(current, next); swapped { - if next < 0 { - // TODO(romain.marcadier): somehow signal unexpected behavior to the - // caller (panic? error?). We currently clamp to 0 in order to avoid - // causing a customer program crash, but this is the symptom of a bug - // and should be investigated (however this clamping hides the issue). - return 0 - } - return next - } - } -} - -func newConfig(pinner *runtime.Pinner, keyObfuscatorRegex string, valueObfuscatorRegex string) *bindings.WAFConfig { - return &bindings.WAFConfig{ - Limits: bindings.WAFConfigLimits{ - MaxContainerDepth: bindings.MaxContainerDepth, - MaxContainerSize: bindings.MaxContainerSize, - MaxStringLength: bindings.MaxStringLength, - }, - Obfuscator: bindings.WAFConfigObfuscator{ - KeyRegex: unsafe.PtrToUintptr(unsafe.Cstring(pinner, keyObfuscatorRegex)), - ValueRegex: unsafe.PtrToUintptr(unsafe.Cstring(pinner, valueObfuscatorRegex)), - }, - // Prevent libddwaf from freeing our Go-memory-allocated ddwaf_objects - FreeFn: 0, - } -} - -func goRunError(rc bindings.WAFReturnCode) error { - switch rc { - case bindings.WAFErrInternal: - return waferrors.ErrInternal - case bindings.WAFErrInvalidObject: - return waferrors.ErrInvalidObject - case bindings.WAFErrInvalidArgument: - return waferrors.ErrInvalidArgument - case bindings.WAFOK, bindings.WAFMatch: - // No error... - return nil - default: - return fmt.Errorf("unknown waf return code %d", int(rc)) - } -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/ctypes.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/ctypes.go deleted file mode 100644 index 1ae771148e..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/ctypes.go +++ /dev/null @@ -1,412 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package bindings - -import ( - "fmt" - "structs" - - "github.com/DataDog/go-libddwaf/v4/internal/pin" - "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - "github.com/DataDog/go-libddwaf/v4/waferrors" - "github.com/pkg/errors" -) - -const ( - MaxStringLength = 4096 - MaxContainerDepth = 20 - MaxContainerSize = 256 -) - -type WAFReturnCode int32 - -const ( - WAFErrInternal WAFReturnCode = iota - 3 - WAFErrInvalidObject - WAFErrInvalidArgument - WAFOK - WAFMatch -) - -// WAFObjectType is an enum in C which has the size of DWORD. -// But DWORD is 4 bytes in amd64 and arm64 so uint32 it is. -type WAFObjectType uint32 - -const WAFInvalidType WAFObjectType = 0 -const ( - WAFIntType WAFObjectType = 1 << iota - WAFUintType - WAFStringType - WAFArrayType - WAFMapType - WAFBoolType - WAFFloatType - WAFNilType -) - -func (w WAFObjectType) String() string { - switch w { - case WAFInvalidType: - return "invalid" - case WAFIntType: - return "int" - case WAFUintType: - return "uint" - case WAFStringType: - return "string" - case WAFArrayType: - return "array" - case WAFMapType: - return "map" - case WAFBoolType: - return "bool" - case WAFFloatType: - return "float" - case WAFNilType: - return "nil" - default: - return fmt.Sprintf("unknown(%d)", w) - } -} - -type WAFObject struct { - _ structs.HostLayout - ParameterName uintptr - ParameterNameLength uint64 - Value uintptr - NbEntries uint64 - Type WAFObjectType - _ [4]byte - // Forced padding - // We only support 2 archs and cgo generated the same padding to both. - // We don't want the C struct to be packed because actually go will do the same padding itself, - // we just add it explicitly to not take any chance. - // And we cannot pack a struct in go so it will get tricky if the struct is - // packed (apart from breaking all tracers of course) -} - -// IsInvalid determines whether this WAF Object has the invalid type (which is the 0-value). -func (w *WAFObject) IsInvalid() bool { - return w.Type == WAFInvalidType -} - -// IsNil determines whether this WAF Object is nil or not. -func (w *WAFObject) IsNil() bool { - return w.Type == WAFNilType -} - -// IsArray determines whether this WAF Object is an array or not. -func (w *WAFObject) IsArray() bool { - return w.Type == WAFArrayType -} - -// IsMap determines whether this WAF Object is a map or not. -func (w *WAFObject) IsMap() bool { - return w.Type == WAFMapType -} - -// IsInt determines whether this WAF Object is a iny or not. -func (w *WAFObject) IsInt() bool { - return w.Type == WAFIntType -} - -// IsUint determines whether this WAF Object is a uint or not. -func (w *WAFObject) IsUint() bool { - return w.Type == WAFUintType -} - -// IsBool determines whether this WAF Object is a bool or not. -func (w *WAFObject) IsBool() bool { - return w.Type == WAFBoolType -} - -// IsFloat determines whether this WAF Object is a float or not. -func (w *WAFObject) IsFloat() bool { - return w.Type == WAFFloatType -} - -// IsString determines whether this WAF Object is a string or not. -func (w *WAFObject) IsString() bool { - return w.Type == WAFStringType -} - -// IsUnusable returns true if the wafObject has no impact on the WAF execution -// But we still need this kind of objects to forward map keys in case the value of the map is invalid -func (w *WAFObject) IsUnusable() bool { - return w.Type == WAFInvalidType || w.Type == WAFNilType -} - -// SetArray sets the receiving [WAFObject] to a new array with the given -// capacity. -func (w *WAFObject) SetArray(pinner pin.Pinner, capacity uint64) []WAFObject { - return w.setArrayTyped(pinner, capacity, WAFArrayType) -} - -// SetArrayData sets the receiving [WAFObject] to the provided array items. -func (w *WAFObject) SetArrayData(pinner pin.Pinner, data []WAFObject) { - w.setArrayDataTyped(pinner, data, WAFArrayType) -} - -// SetMap sets the receiving [WAFObject] to a new map with the given capacity. -func (w *WAFObject) SetMap(pinner pin.Pinner, capacity uint64) []WAFObject { - return w.setArrayTyped(pinner, capacity, WAFMapType) -} - -// SetMapData sets the receiving [WAFObject] to the provided map items. -func (w *WAFObject) SetMapData(pinner pin.Pinner, data []WAFObject) { - w.setArrayDataTyped(pinner, data, WAFMapType) -} - -// SetMapKey sets the receiving [WAFObject] to a new map key with the given -// string. -func (w *WAFObject) SetMapKey(pinner pin.Pinner, key string) { - header := unsafe.NativeStringUnwrap(key) - - w.ParameterNameLength = uint64(header.Len) - if w.ParameterNameLength == 0 { - w.ParameterName = 0 - return - } - pinner.Pin(unsafe.Pointer(header.Data)) - w.ParameterName = uintptr(unsafe.Pointer(header.Data)) -} - -func (w *WAFObject) MapKey() string { - return string(unsafe.Slice(*(**byte)(unsafe.Pointer(&w.ParameterName)), w.ParameterNameLength)) -} - -func (w *WAFObject) Values() ([]WAFObject, error) { - if !w.IsArray() && !w.IsMap() { - return nil, errors.New("value is not an array or map") - } - return unsafe.Slice(*(**WAFObject)(unsafe.Pointer(&w.Value)), w.NbEntries), nil -} - -func (w *WAFObject) AnyValue() (any, error) { - switch w.Type { - case WAFArrayType: - return w.ArrayValue() - case WAFBoolType: - return w.BoolValue() - case WAFFloatType: - return w.FloatValue() - case WAFIntType: - return w.IntValue() - case WAFMapType: - return w.MapValue() - case WAFStringType: - return w.StringValue() - case WAFUintType: - return w.UIntValue() - case WAFNilType: - return nil, nil - default: - return nil, fmt.Errorf("%w: %s", waferrors.ErrUnsupportedValue, w.Type) - } -} - -func (w *WAFObject) ArrayValue() ([]any, error) { - if w.IsNil() { - return nil, nil - } - - if !w.IsArray() { - return nil, errors.New("value is not an array") - } - - items, err := w.Values() - if err != nil { - return nil, err - } - - res := make([]any, len(items)) - for i, item := range items { - res[i], err = item.AnyValue() - if err != nil { - return nil, fmt.Errorf("while decoding item at index %d: %w", i, err) - } - } - return res, nil -} - -func (w *WAFObject) MapValue() (map[string]any, error) { - if w.IsNil() { - return nil, nil - } - - if !w.IsMap() { - return nil, errors.New("value is not a map") - } - - items, err := w.Values() - if err != nil { - return nil, err - } - - res := make(map[string]any, len(items)) - for _, item := range items { - key := item.MapKey() - res[key], err = item.AnyValue() - if err != nil { - return nil, fmt.Errorf("while decoding value at %q: %w", key, err) - } - } - return res, nil -} - -func (w *WAFObject) BoolValue() (bool, error) { - if !w.IsBool() { - return false, errors.New("value is not a boolean") - } - return w.Value != 0, nil -} - -func (w *WAFObject) FloatValue() (float64, error) { - if !w.IsFloat() { - return 0, errors.New("value is not a uint") - } - return *(*float64)(unsafe.Pointer(&w.Value)), nil -} - -func (w *WAFObject) IntValue() (int64, error) { - if !w.IsInt() { - return 0, errors.New("value is not a uint") - } - return int64(w.Value), nil -} - -func (w *WAFObject) StringValue() (string, error) { - if !w.IsString() { - return "", errors.New("value is not a string") - } - return string(unsafe.Slice(*(**byte)(unsafe.Pointer(&w.Value)), w.NbEntries)), nil -} - -func (w *WAFObject) UIntValue() (uint64, error) { - if !w.IsUint() { - return 0, errors.New("value is not a uint") - } - return uint64(w.Value), nil -} - -var blankCStringValue = unsafe.Pointer(unsafe.NativeStringUnwrap("\x00").Data) - -// SetString sets the receiving [WAFObject] value to the given string. -func (w *WAFObject) SetString(pinner pin.Pinner, str string) { - header := unsafe.NativeStringUnwrap(str) - - w.Type = WAFStringType - w.NbEntries = uint64(header.Len) - if w.NbEntries == 0 { - w.Value = uintptr(blankCStringValue) - return - } - pinner.Pin(unsafe.Pointer(header.Data)) - w.Value = uintptr(unsafe.Pointer(header.Data)) -} - -// SetInt sets the receiving [WAFObject] value to the given int. -func (w *WAFObject) SetInt(i int64) { - w.Type = WAFIntType - w.Value = unsafe.NativeToUintptr(i) -} - -// SetUint sets the receiving [WAFObject] value to the given uint. -func (w *WAFObject) SetUint(i uint64) { - w.Type = WAFUintType - w.Value = unsafe.NativeToUintptr(i) -} - -// SetBool sets the receiving [WAFObject] value to the given bool. -func (w *WAFObject) SetBool(b bool) { - w.Type = WAFBoolType - if b { - w.Value = uintptr(1) - } else { - w.Value = uintptr(0) - } -} - -// SetFloat sets the receiving [WAFObject] value to the given float. -func (w *WAFObject) SetFloat(f float64) { - w.Type = WAFFloatType - w.Value = unsafe.NativeToUintptr(f) -} - -// SetNil sets the receiving [WAFObject] to nil. -func (w *WAFObject) SetNil() { - w.Type = WAFNilType - w.Value = 0 -} - -// SetInvalid sets the receiving [WAFObject] to invalid. -func (w *WAFObject) SetInvalid() { - w.Type = WAFInvalidType - w.Value = 0 -} - -func (w *WAFObject) setArrayTyped(pinner pin.Pinner, capacity uint64, t WAFObjectType) []WAFObject { - var arr []WAFObject - if capacity > 0 { - arr = make([]WAFObject, capacity) - } - w.setArrayDataTyped(pinner, arr, t) - return arr -} - -func (w *WAFObject) setArrayDataTyped(pinner pin.Pinner, arr []WAFObject, t WAFObjectType) { - w.Type = t - w.NbEntries = uint64(len(arr)) - if w.NbEntries == 0 { - w.Value = 0 - return - } - - ptr := unsafe.Pointer(unsafe.SliceData(arr)) - pinner.Pin(ptr) - w.Value = uintptr(ptr) -} - -type WAFConfig struct { - _ structs.HostLayout - Limits WAFConfigLimits - Obfuscator WAFConfigObfuscator - FreeFn uintptr -} - -type WAFConfigLimits struct { - _ structs.HostLayout - MaxContainerSize uint32 - MaxContainerDepth uint32 - MaxStringLength uint32 -} - -type WAFConfigObfuscator struct { - _ structs.HostLayout - KeyRegex uintptr // char * - ValueRegex uintptr // char * -} - -type WAFResult struct { - _ structs.HostLayout - Timeout byte - Events WAFObject - Actions WAFObject - Derivatives WAFObject - TotalRuntime uint64 -} - -// WAFBuilder is a forward declaration in ddwaf.h header -// We basically don't need to modify it, only to give it to the waf -type WAFBuilder uintptr - -// WAFHandle is a forward declaration in ddwaf.h header -// We basically don't need to modify it, only to give it to the waf -type WAFHandle uintptr - -// WAFContext is a forward declaration in ddwaf.h header -// We basically don't need to modify it, only to give it to the waf -type WAFContext uintptr diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/libddwaf.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/libddwaf.go deleted file mode 100644 index 0bc2f17e5e..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/libddwaf.go +++ /dev/null @@ -1,79 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package bindings - -import "github.com/ebitengine/purego" - -type wafSymbols struct { - builderInit uintptr - builderAddOrUpdateConfig uintptr - builderRemoveConfig uintptr - builderBuildInstance uintptr - builderGetConfigPaths uintptr - builderDestroy uintptr - setLogCb uintptr - destroy uintptr - knownAddresses uintptr - knownActions uintptr - getVersion uintptr - contextInit uintptr - contextDestroy uintptr - objectFree uintptr - run uintptr -} - -// newWafSymbols resolves the symbols of [wafSymbols] from the provided -// [purego.Dlopen] handle. -func newWafSymbols(handle uintptr) (syms wafSymbols, err error) { - if syms.builderAddOrUpdateConfig, err = purego.Dlsym(handle, "ddwaf_builder_add_or_update_config"); err != nil { - return syms, err - } - if syms.builderBuildInstance, err = purego.Dlsym(handle, "ddwaf_builder_build_instance"); err != nil { - return syms, err - } - if syms.builderDestroy, err = purego.Dlsym(handle, "ddwaf_builder_destroy"); err != nil { - return syms, err - } - if syms.builderGetConfigPaths, err = purego.Dlsym(handle, "ddwaf_builder_get_config_paths"); err != nil { - return syms, err - } - if syms.builderInit, err = purego.Dlsym(handle, "ddwaf_builder_init"); err != nil { - return syms, err - } - if syms.builderRemoveConfig, err = purego.Dlsym(handle, "ddwaf_builder_remove_config"); err != nil { - return syms, err - } - if syms.contextDestroy, err = purego.Dlsym(handle, "ddwaf_context_destroy"); err != nil { - return syms, err - } - if syms.contextInit, err = purego.Dlsym(handle, "ddwaf_context_init"); err != nil { - return syms, err - } - if syms.destroy, err = purego.Dlsym(handle, "ddwaf_destroy"); err != nil { - return syms, err - } - if syms.getVersion, err = purego.Dlsym(handle, "ddwaf_get_version"); err != nil { - return syms, err - } - if syms.knownActions, err = purego.Dlsym(handle, "ddwaf_known_actions"); err != nil { - return syms, err - } - if syms.knownAddresses, err = purego.Dlsym(handle, "ddwaf_known_addresses"); err != nil { - return syms, err - } - if syms.objectFree, err = purego.Dlsym(handle, "ddwaf_object_free"); err != nil { - return syms, err - } - if syms.run, err = purego.Dlsym(handle, "ddwaf_run"); err != nil { - return syms, err - } - if syms.setLogCb, err = purego.Dlsym(handle, "ddwaf_set_log_cb"); err != nil { - return syms, err - } - return syms, nil -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/safe.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/safe.go deleted file mode 100644 index a69799f375..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/safe.go +++ /dev/null @@ -1,47 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package bindings - -import ( - "fmt" - "reflect" - "runtime" - - "github.com/DataDog/go-libddwaf/v4/waferrors" - "github.com/pkg/errors" -) - -func newPanicError(in any, err error) *waferrors.PanicError { - return &waferrors.PanicError{ - In: runtime.FuncForPC(reflect.ValueOf(in).Pointer()).Name(), - Err: err, - } -} - -// tryCall calls function `f` and recovers from any panic occurring while it -// executes, returning it in a `PanicError` object type. -func tryCall[T any](f func() T) (res T, err error) { - defer func() { - r := recover() - if r == nil { - // Note that panic(nil) matches this case and cannot be really tested for. - return - } - - switch actual := r.(type) { - case error: - err = errors.WithStack(actual) - case string: - err = errors.New(actual) - default: - err = fmt.Errorf("%v", r) - } - - err = newPanicError(f, err) - }() - res = f() - return -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl.go deleted file mode 100644 index 66de699f6f..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl.go +++ /dev/null @@ -1,250 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package bindings - -import ( - "errors" - "fmt" - "os" - "runtime" - - "github.com/DataDog/go-libddwaf/v4/internal/lib" - "github.com/DataDog/go-libddwaf/v4/internal/log" - "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - "github.com/ebitengine/purego" -) - -// WAFLib is the type wrapper for all C calls to the waf -// It uses `libwaf` to make C calls -// All calls must go through this one-liner to be type safe -// since purego calls are not type safe -type WAFLib struct { - wafSymbols - handle uintptr -} - -// NewWAFLib loads the libddwaf shared library and resolves all tge relevant symbols. -// The caller is responsible for calling wafDl.Close on the returned object once they -// are done with it so that associated resources can be released. -func NewWAFLib() (dl *WAFLib, err error) { - path, closer, err := lib.DumpEmbeddedWAF() - if err != nil { - return nil, fmt.Errorf("dump embedded WAF: %w", err) - } - defer func() { - if rmErr := closer(); rmErr != nil { - err = errors.Join(err, fmt.Errorf("error removing %s: %w", path, rmErr)) - } - }() - - var handle uintptr - if handle, err = purego.Dlopen(path, purego.RTLD_GLOBAL|purego.RTLD_NOW); err != nil { - return nil, fmt.Errorf("load a dynamic library file: %w", err) - } - - var symbols wafSymbols - if symbols, err = newWafSymbols(handle); err != nil { - if closeErr := purego.Dlclose(handle); closeErr != nil { - err = errors.Join(err, fmt.Errorf("error released the shared libddwaf library: %w", closeErr)) - } - return - } - - dl = &WAFLib{symbols, handle} - - // Try calling the waf to make sure everything is fine - if _, err = tryCall(dl.GetVersion); err != nil { - if closeErr := purego.Dlclose(handle); closeErr != nil { - err = errors.Join(err, fmt.Errorf("error released the shared libddwaf library: %w", closeErr)) - } - return - } - - if val := os.Getenv(log.EnvVarLogLevel); val != "" { - logLevel := log.LevelNamed(val) - if logLevel != log.LevelOff { - dl.SetLogCb(log.CallbackFunctionPointer(), logLevel) - } - } - - return -} - -func (waf *WAFLib) Close() error { - return purego.Dlclose(waf.handle) -} - -// GetVersion returned string is a static string so we do not need to free it -func (waf *WAFLib) GetVersion() string { - return unsafe.Gostring(unsafe.Cast[byte](waf.syscall(waf.getVersion))) -} - -// BuilderInit initializes a new WAF builder with the provided configuration, -// which may be nil. Returns nil in case of an error. -func (waf *WAFLib) BuilderInit(cfg *WAFConfig) WAFBuilder { - var pinner runtime.Pinner - defer pinner.Unpin() - pinner.Pin(cfg) - - return WAFBuilder(waf.syscall(waf.builderInit, unsafe.PtrToUintptr(cfg))) -} - -// BuilderAddOrUpdateConfig adds or updates a configuration based on the -// given path, which must be a unique identifier for the provided configuration. -// Returns false in case of an error. -func (waf *WAFLib) BuilderAddOrUpdateConfig(builder WAFBuilder, path string, config *WAFObject, diags *WAFObject) bool { - var pinner runtime.Pinner - defer pinner.Unpin() - pinner.Pin(config) - pinner.Pin(diags) - - res := waf.syscall(waf.builderAddOrUpdateConfig, - uintptr(builder), - unsafe.PtrToUintptr(unsafe.Cstring(&pinner, path)), - uintptr(len(path)), - unsafe.PtrToUintptr(config), - unsafe.PtrToUintptr(diags), - ) - return byte(res) != 0 -} - -// BuilderRemoveConfig removes a configuration based on the provided path. -// Returns false in case of an error. -func (waf *WAFLib) BuilderRemoveConfig(builder WAFBuilder, path string) bool { - var pinner runtime.Pinner - defer pinner.Unpin() - - return byte(waf.syscall(waf.builderRemoveConfig, - uintptr(builder), - unsafe.PtrToUintptr(unsafe.Cstring(&pinner, path)), - uintptr(len(path)), - )) != 0 -} - -// BuilderBuildInstance builds a WAF instance based on the current set of configurations. -// Returns nil in case of an error. -func (waf *WAFLib) BuilderBuildInstance(builder WAFBuilder) WAFHandle { - return WAFHandle(waf.syscall(waf.builderBuildInstance, uintptr(builder))) -} - -// BuilderGetConfigPaths returns the list of currently loaded paths. -// Returns nil in case of an error. -func (waf *WAFLib) BuilderGetConfigPaths(builder WAFBuilder, filter string) []string { - var paths WAFObject - var pinner runtime.Pinner - defer pinner.Unpin() - pinner.Pin(&filter) - pinner.Pin(&paths) - - count := waf.syscall(waf.builderGetConfigPaths, - uintptr(builder), - unsafe.PtrToUintptr(&paths), - unsafe.PtrToUintptr(unsafe.StringData(filter)), - uintptr(len(filter)), - ) - defer waf.ObjectFree(&paths) - - list := make([]string, 0, count) - for i := range uint64(count) { - obj := unsafe.CastWithOffset[WAFObject](paths.Value, i) - path := unsafe.GostringSized(unsafe.Cast[byte](obj.Value), obj.NbEntries) - list = append(list, path) - } - return list -} - -// BuilderDestroy destroys a WAF builder instance. -func (waf *WAFLib) BuilderDestroy(builder WAFBuilder) { - waf.syscall(waf.builderDestroy, uintptr(builder)) -} - -// SetLogCb sets the log callback function for the WAF. -func (waf *WAFLib) SetLogCb(cb uintptr, level log.Level) { - waf.syscall(waf.setLogCb, cb, uintptr(level)) -} - -// Destroy destroys a WAF instance. -func (waf *WAFLib) Destroy(handle WAFHandle) { - waf.syscall(waf.destroy, uintptr(handle)) -} - -func (waf *WAFLib) KnownAddresses(handle WAFHandle) []string { - return waf.knownX(handle, waf.knownAddresses) -} - -func (waf *WAFLib) KnownActions(handle WAFHandle) []string { - return waf.knownX(handle, waf.knownActions) -} - -func (waf *WAFLib) knownX(handle WAFHandle, symbol uintptr) []string { - var nbAddresses uint32 - - var pinner runtime.Pinner - defer pinner.Unpin() - pinner.Pin(&nbAddresses) - - arrayVoidC := waf.syscall(symbol, uintptr(handle), unsafe.PtrToUintptr(&nbAddresses)) - if arrayVoidC == 0 { - return nil - } - - if nbAddresses == 0 { - return nil - } - - // These C strings are static strings so we do not need to free them - addresses := make([]string, int(nbAddresses)) - for i := 0; i < int(nbAddresses); i++ { - addresses[i] = unsafe.Gostring(*unsafe.CastWithOffset[*byte](arrayVoidC, uint64(i))) - } - - return addresses -} - -func (waf *WAFLib) ContextInit(handle WAFHandle) WAFContext { - return WAFContext(waf.syscall(waf.contextInit, uintptr(handle))) -} - -func (waf *WAFLib) ContextDestroy(context WAFContext) { - waf.syscall(waf.contextDestroy, uintptr(context)) -} - -func (waf *WAFLib) ObjectFree(obj *WAFObject) { - var pinner runtime.Pinner - defer pinner.Unpin() - pinner.Pin(obj) - - waf.syscall(waf.objectFree, unsafe.PtrToUintptr(obj)) -} - -func (waf *WAFLib) Run(context WAFContext, persistentData, ephemeralData *WAFObject, result *WAFObject, timeout uint64) WAFReturnCode { - var pinner runtime.Pinner - defer pinner.Unpin() - - pinner.Pin(persistentData) - pinner.Pin(ephemeralData) - pinner.Pin(result) - - return WAFReturnCode(waf.syscall(waf.run, uintptr(context), unsafe.PtrToUintptr(persistentData), unsafe.PtrToUintptr(ephemeralData), unsafe.PtrToUintptr(result), uintptr(timeout))) -} - -func (waf *WAFLib) Handle() uintptr { - return waf.handle -} - -// syscall is the only way to make C calls with this interface. -// purego implementation limits the number of arguments to 9, it will panic if more are provided -// Note: `purego.SyscallN` has 3 return values: these are the following: -// -// 1st - The return value is a pointer or a int of any type -// 2nd - The return value is a float -// 3rd - The value of `errno` at the end of the call -func (waf *WAFLib) syscall(fn uintptr, args ...uintptr) uintptr { - ret, _, _ := purego.SyscallN(fn, args...) - return ret -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl_unsupported.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl_unsupported.go deleted file mode 100644 index d2a0a9341f..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/bindings/waf_dl_unsupported.go +++ /dev/null @@ -1,59 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Build when the target OS or architecture are not supported -//go:build (!linux && !darwin) || (!amd64 && !arm64) || go1.26 || datadog.no_waf || (!cgo && !appsec) - -package bindings - -import ( - "errors" - - "github.com/DataDog/go-libddwaf/v4/internal/log" -) - -type WAFLib struct{} - -func NewWAFLib() (*WAFLib, error) { - return nil, errors.New("go-libddwaf is not supported on this platform") -} - -func (*WAFLib) Close() error { return nil } - -func (*WAFLib) GetVersion() string { return "" } - -func (*WAFLib) BuilderInit(*WAFConfig) WAFBuilder { return 0 } - -func (*WAFLib) BuilderAddOrUpdateConfig(WAFBuilder, string, *WAFObject, *WAFObject) bool { - return false -} - -func (*WAFLib) BuilderRemoveConfig(WAFBuilder, string) bool { return false } - -func (*WAFLib) BuilderBuildInstance(WAFBuilder) WAFHandle { return 0 } - -func (*WAFLib) BuilderGetConfigPaths(WAFBuilder, string) []string { return nil } - -func (*WAFLib) BuilderDestroy(WAFBuilder) {} - -func (*WAFLib) SetLogCb(uintptr, log.Level) {} - -func (*WAFLib) Destroy(WAFHandle) {} - -func (*WAFLib) KnownAddresses(WAFHandle) []string { return nil } - -func (*WAFLib) KnownActions(WAFHandle) []string { return nil } - -func (*WAFLib) ContextInit(WAFHandle) WAFContext { return 0 } - -func (*WAFLib) ContextDestroy(WAFContext) {} - -func (*WAFLib) ObjectFree(*WAFObject) {} - -func (*WAFLib) Run(WAFContext, *WAFObject, *WAFObject, *WAFObject, uint64) WAFReturnCode { - return WAFErrInternal -} - -func (*WAFLib) Handle() uintptr { return 0 } diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/.version b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/.version deleted file mode 100644 index 7c819a9615..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/.version +++ /dev/null @@ -1 +0,0 @@ -1.25.1 \ No newline at end of file diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/README.md b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/README.md deleted file mode 100644 index 010d41bf4f..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/README.md +++ /dev/null @@ -1,21 +0,0 @@ -## Embedded WAF libraries - -This directory contains Datadog's WAF static libraries taken from the releases -of https://github.com/DataDog/libddwaf - -### Updating - -From the root of the repository, run: - -```console -./_tools/libddwaf-updater/update.sh -Will upgrade from v1.14.0 to v1.15.0 -... downloaded /Datadog/go-libddwaf/include/ddwaf.h -... downloaded /Datadog/go-libddwaf/lib/darwin-arm64/libddwaf.dylib -... downloaded /Datadog/go-libddwaf/lib/darwin-amd64/libddwaf.dylib -... downloaded /Datadog/go-libddwaf/lib/linux-arm64/libddwaf.so -... downloaded /Datadog/go-libddwaf/lib/linux-amd64/libddwaf.so -... downloaded /Datadog/go-libddwaf/lib/linux-armv7/libddwaf.so -... downloaded /Datadog/go-libddwaf/lib/linux-i386/libddwaf.so -All done! Don't forget to check in changes to include/ and lib/, check the libddwaf upgrade guide to update bindings! -``` diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/doc.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/doc.go deleted file mode 100644 index 5f44fb80d1..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Package lib provides a built-in WAF library version for the relevant runtime platform. -package lib diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_darwin.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_darwin.go deleted file mode 100644 index b6c8972021..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_darwin.go +++ /dev/null @@ -1,61 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build darwin && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -import ( - "bytes" - "compress/gzip" - _ "embed" - "errors" - "fmt" - "io" - "os" -) - -// DumpEmbeddedWAF for darwin platform. -// DumpEmbeddedWAF creates a temporary file with the embedded WAF library content and returns the path to the file, -// a closer function and an error. This is the only way to make all implementations of DumpEmbeddedWAF consistent -// across all platforms. -func DumpEmbeddedWAF() (path string, closer func() error, err error) { - file, err := os.CreateTemp("", "libddwaf-*.dylib") - if err != nil { - return "", nil, fmt.Errorf("error creating temp file: %w", err) - } - - defer func() { - if err != nil { - if closeErr := file.Close(); closeErr != nil { - err = errors.Join(err, fmt.Errorf("error closing file: %w", closeErr)) - } - if rmErr := os.Remove(file.Name()); rmErr != nil { - err = errors.Join(err, fmt.Errorf("error removing file: %w", rmErr)) - } - } - }() - - gr, err := gzip.NewReader(bytes.NewReader(libddwaf)) - if err != nil { - return "", nil, fmt.Errorf("error creating gzip reader: %w", err) - } - - if _, err := io.Copy(file, gr); err != nil { - return "", nil, fmt.Errorf("error copying gzip content to file: %w", err) - } - - if err := gr.Close(); err != nil { - return "", nil, fmt.Errorf("error closing gzip reader: %w", err) - } - - if err := file.Close(); err != nil { - return "", nil, fmt.Errorf("error closing dylib file: %w", err) - } - - return file.Name(), func() error { - return os.Remove(file.Name()) - }, nil -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_linux.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_linux.go deleted file mode 100644 index d9f38178d2..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/dump_waf_linux.go +++ /dev/null @@ -1,58 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build linux && (amd64 || arm64) && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -import ( - "bytes" - "compress/gzip" - "errors" - "fmt" - "io" - "os" - - "golang.org/x/sys/unix" -) - -// DumpEmbeddedWAF for linux systems. -// It creates a memfd and writes the embedded WAF library to it. Then it returns the path the /proc/self/fd/ path -// to the file. This trick makes us able to load the library without having to write it to disk. -// Hence, making go-libddwaf work on full read-only filesystems. -func DumpEmbeddedWAF() (path string, closer func() error, err error) { - fd, err := unix.MemfdCreate("libddwaf", 0) - if err != nil { - return "", nil, fmt.Errorf("error creating memfd: %w", err) - } - - file := os.NewFile(uintptr(fd), fmt.Sprintf("/proc/self/fd/%d", fd)) - if file == nil { - return "", nil, errors.New("error creating file from fd") - } - - defer func() { - if file != nil && err != nil { - if closeErr := file.Close(); closeErr != nil { - err = errors.Join(err, fmt.Errorf("error closing file: %w", closeErr)) - } - } - }() - - gr, err := gzip.NewReader(bytes.NewReader(libddwaf)) - if err != nil { - return "", nil, fmt.Errorf("error creating gzip reader: %w", err) - } - - if _, err := io.Copy(file, gr); err != nil { - return "", nil, fmt.Errorf("error copying gzip content to memfd: %w", err) - } - - if err := gr.Close(); err != nil { - return "", nil, fmt.Errorf("error closing gzip reader: %w", err) - } - - return file.Name(), file.Close, nil -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_amd64.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_amd64.go deleted file mode 100644 index 52d7511b39..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_amd64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build darwin && amd64 && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -// THIS FILE IS AUTOGENERATED. DO NOT EDIT. - -import _ "embed" // Needed for go:embed - -//go:embed libddwaf-darwin-amd64.dylib.gz -var libddwaf []byte diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_arm64.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_arm64.go deleted file mode 100644 index cc8498738b..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_darwin_arm64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build darwin && arm64 && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -// THIS FILE IS AUTOGENERATED. DO NOT EDIT. - -import _ "embed" // Needed for go:embed - -//go:embed libddwaf-darwin-arm64.dylib.gz -var libddwaf []byte diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_amd64.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_amd64.go deleted file mode 100644 index 4cc9b52c71..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_amd64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build linux && amd64 && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -// THIS FILE IS AUTOGENERATED. DO NOT EDIT. - -import _ "embed" // Needed for go:embed - -//go:embed libddwaf-linux-amd64.so.gz -var libddwaf []byte diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_arm64.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_arm64.go deleted file mode 100644 index 7d2d299aeb..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/lib_linux_arm64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build linux && arm64 && !go1.26 && !datadog.no_waf && (cgo || appsec) - -package lib - -// THIS FILE IS AUTOGENERATED. DO NOT EDIT. - -import _ "embed" // Needed for go:embed - -//go:embed libddwaf-linux-arm64.so.gz -var libddwaf []byte diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-amd64.dylib.gz b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-amd64.dylib.gz deleted file mode 100644 index 05ba8467c56dd6a182f00d5477613b2bb8a09b94..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 749074 zcmcFqV|Qgu(~hk>&V(lu8xz~MZQHgn;lw!6#I`X>CQc@{?Gy7PZ=N6V?l0ZDclD~Z zYjsyw)pa##90J7u9;nZY9%OH9iB@jIyfHK30zN1c?C=5=ED;%)AK&Xx#wf}P;ftdi ztN7L9cTyt=V&V{Y%+nW^S}l7zCwjWB8np~oqma95F@%jHjV*%>P)1F$hYM(kvxgy4 zV4zMvwKN1~V9ZIMJ~y|)bEJi3RZ4lh9%s2~WtEB=eL+{(c{T`$xZ%olqSB%WI`bH} zjGwGU%NhuUw-n(=lN}>GcO(lBx9gn&imab=lLtI*8;QTVij8BQb*XOOHlL)Ej}NrF z$E5K6ku7jAI0mSzl_XdKaWWV3io1XM8%V?Qgzc4R8K?!b))R zpLA12>5YeJoy@vB8APA)DS6+O!tFe6C-tZKZ+jHz>Yr671x)=nT*u=^68Ks%d=;>ALFo9l1mAGaBY%l~j90b-oQAG(6aMRb|jrLRC1oKcg*<>zpk4lNtczk(w* zX2Lsnj1x4f>{Y+|5m`3sl4z#5n>Sy&j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3Xd>1} zkx198*@tVIQ6P0Nc|3!9MCvAzvUkYztD_>H?KlAAe~t1|DGnQGxJX*b5PRhrnXHi45YhCnzy`oNqRY)tY@mkH82))Bdg7-^%<9%n?igT zH`>p%c!B}LN3`BH3;|>MSRWkq&j%EjeL1PNA*Djg_6?!e^2ifK^E*YG3|;IAW-|=? zNZY!DQj_{tlrrGl*Y+qb)7v$kkCD*5##Z7P628+DU5-UnT<4eyI#!To$R$KPQtF;> z%~CV&q+9Wb{bYx9_<=;(K zG!>2QG!;Q#O1=FYT~Hf{h`;66!kC36y)YHqP}Tw`6xr+`tcY5kt%VSCT%;`#EC3&* zEb6qQH?78>ed_wVoa2`t6rR2YX@Zcn$EO|H{Ry~XIm7cf-IA+kCfvzyFX#C*a9Poj zzdjoXnWX>9EB0}u4o!d^pReW6RWg=&d#6$$7xq3t!-}*0PGdGl7<>r0Q%?HQlf|Z{ zpr8=W!WxY!U^n9%wa-eEMLV~6PIO1r7T_yLXpm$|y_aaYj#5RG@SuApw~qhq{u%*T z$$gFDYP%VR)Hb}pP$5&JnIMh{otPs!xwinuyqEI_AbG4=5`gm^z=adp)#p~Egg)vq z4##IiJDk_(OPUZ8U7*GZGyFawhX4rcO%=n;ezbMsX!CNA(A3-)Sh~I-Q^xd_OJ4M9}^s;F{PK yyI+(0S0;EcgNRw+rcOA7@Nu61UioMK4Dp>p@!z)s2nfi(f8Hj~zK)rMApZ+NMrX|c diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-arm64.dylib.gz b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-darwin-arm64.dylib.gz deleted file mode 100644 index 3e27856a1df64248014319651147e70491ffb773..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 692213 zcmce7g;N~Q^ENKQA;B%-0|X839s)^l2ynQ&yBrRI;KXn^2oMrng1fuR;fEi7zySw$ z!2S4Ey??{IRlBu2+dZ}2Gc`R=KfNr81Q`E2u+S$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lib/libddwaf-linux-amd64.so.gz b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/libddwaf-linux-amd64.so.gz deleted file mode 100644 index 894bd822c9001d617f584d2fcccb235f1f9962d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 937414 zcmaI730RU@|3CapO<7q|nOdokD{V@yzXl12B z>CD(%0ZJZQu++sRDm+Xi6 zoZ6wg;MJ<)iA?+QOs_+4O_Sy{+8WtfX&31tTK_rIq)=3;I3~lRYzBLxMTXXEI1Dnc z>HuT(pPqjPTkr;id&qR5DRPtjSH_b7#tC#2QRS|0`13uVfXCp+2|6O_V@rhlfa>q~ z3))Ub$#exXJ&N&B>U(VX{a29*HH9&Vej}*QOl~pub#P2yzeF43A1jirjZdPcIH7E@)p&J-u1n7IRev2(bQ@|-@2;f~ zr?jRXS)PLYZh*Mh7%f&kJwM%7roYo9z>0g`4)Cq%CCbiB4qCrqpnDGg@U&wS%GP*Q z>6KBlxN+)843RKxm&pj6PHalDZDcBm^Ej)pYb18`3?+UJe*5&QCh;PAsWLnR@2a0W zfSIG1!w8=iH2D`wjE4v8Eu}%zR!w{ty{>706Jnw9%mCjea$)2W`bDKGlek9z^8nY9 zJcseav~?44q4Az_-14Q&0h?_w1V+ z9~!f`OQZnoqQt^lG?m4DVXodn_J(w= zG|;zVFuvzJO`IlJ#knw9i2B~R>7(g8i7vLE{{pK+zn99lr}adrrCq28#MpZJVFSiu z3~#6Q-~{{8x8AMD78|U;WS6sRZnLBI5@OZ2X|r_oh^fk5I^XXJQ!^0d#?MX@g@0~0 zP_N?WOv=J$jq&12pNs!0iA6@I!85z0Z%w8d{O{OzjCC#_I}N0M#B;_hL^*FvkyK?W zr`LDsh3&z$|1g$*ylI@DH$*yT2uvBAmbk5Cc=5bf-K~(e`K`hGC_gAM;VJzaqa&}R z+!*ia#`Nb~sLO|UzA%KvGEMc@b|pVn4ekHquPy?$ ze2~m^C;LPuZWQ}=Sq8Q-e_Z*6I+WQUx+6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4EhRSnYZ_e`)NwHBB?zQ97Zqcx(YqzT|9rF4d@*rykd8O*1 zVB%#7PB+SRjEFwus{}cAza{8v0e(1Upj+miOsW&4?&0VfzAt8AC#g67>}^FkXIc@F z2W)i%(OI~7h2@Bhh*Xv3)2|XRkAU!yuVqtmqu*BsTW|08*T0JK7#c95$LGrWbx!Pb z_xF`c!~!Q6+u5*b8;dxQvk`iT6LDPD&v$Zd&1|&zm4o|TC*tdm{n8@B&A)%(PxD}` z8M3h<4R8PO{dTV%lbZ7Ws!7{ByCaSkSFDU;?$B|Gr$=S|CKtN9b;mB-;kA9ed{+xj z>pE%ul(S1%No-?O+Xbv4M}4BRn+kHNd1Y5vqwaIVK3Y-PgbST0a$R~c+# z+vIBYI1aD3jXWh36FvDFO6h)!Q~a^!x5nmY#X00 zzm8eUPxQW4cJOCigXU(W% zNZz!8aqgV}%EVV$NzH%*G4?SHWbwA_aiJLD`<$~OPh2cCouM|0goTL+(Ky%gKb4hh zQgX}RN}XZsO1=3oG?r`IMgtks4GbHX6yAI=z*IK%|C-koTR^s-1?`dPQ(zF%H;fs7 zRx2zd_13%oU-Ii_%wNY^(}J$dzg~@tWm0(=p@H~kZ3WCLybN7a=A|+w{atk06*OFH zAD5EW$KHc;0YiE471rWBVDX7g_!bu1`&? diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/version.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/version.go deleted file mode 100644 index 8c0828e9c8..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/lib/version.go +++ /dev/null @@ -1,13 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2024 Datadog, Inc. - -package lib - -import ( - _ "embed" // For go:embed -) - -//go:embed .version -var EmbeddedWAFVersion string diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/ddwaf.h b/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/ddwaf.h deleted file mode 100644 index e7f00f7962..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/ddwaf.h +++ /dev/null @@ -1,814 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are -// dual-licensed under the Apache-2.0 License or BSD-3-Clause License. -// -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -#ifndef DDWAF_H -#define DDWAF_H - -#ifdef __cplusplus -namespace ddwaf{ -class waf; -class context_wrapper; -class waf_builder; -} // namespace ddwaf -using ddwaf_handle = ddwaf::waf *; -using ddwaf_context = ddwaf::context_wrapper *; -using ddwaf_builder = ddwaf::waf_builder *; - -extern "C" -{ -#endif - -#include -#include -#include - -#define DDWAF_MAX_STRING_LENGTH 4096 -#define DDWAF_MAX_CONTAINER_DEPTH 20 -#define DDWAF_MAX_CONTAINER_SIZE 256 -#define DDWAF_RUN_TIMEOUT 5000 - -/** - * @enum DDWAF_OBJ_TYPE - * - * Specifies the type of a ddwaf::object. - **/ -typedef enum -{ - DDWAF_OBJ_INVALID = 0, - // 64-bit signed integer type - DDWAF_OBJ_SIGNED = 1 << 0, - // 64-bit unsigned integer type - DDWAF_OBJ_UNSIGNED = 1 << 1, - // UTF-8 string of length nbEntries - DDWAF_OBJ_STRING = 1 << 2, - // Array of ddwaf_object of length nbEntries, each item having no parameterName - DDWAF_OBJ_ARRAY = 1 << 3, - // Array of ddwaf_object of length nbEntries, each item having a parameterName - DDWAF_OBJ_MAP = 1 << 4, - // Boolean type - DDWAF_OBJ_BOOL = 1 << 5, - // 64-bit float (or double) type - DDWAF_OBJ_FLOAT = 1 << 6, - // Null type, only used for its semantical value - DDWAF_OBJ_NULL = 1 << 7, -} DDWAF_OBJ_TYPE; - -/** - * @enum DDWAF_RET_CODE - * - * Codes returned by ddwaf_run. - **/ -typedef enum -{ - DDWAF_ERR_INTERNAL = -3, - DDWAF_ERR_INVALID_OBJECT = -2, - DDWAF_ERR_INVALID_ARGUMENT = -1, - DDWAF_OK = 0, - DDWAF_MATCH = 1, -} DDWAF_RET_CODE; - -/** - * @enum DDWAF_LOG_LEVEL - * - * Internal WAF log levels, to be used when setting the minimum log level and cb. - **/ -typedef enum -{ - DDWAF_LOG_TRACE, - DDWAF_LOG_DEBUG, - DDWAF_LOG_INFO, - DDWAF_LOG_WARN, - DDWAF_LOG_ERROR, - DDWAF_LOG_OFF, -} DDWAF_LOG_LEVEL; - -#ifndef __cplusplus -typedef struct _ddwaf_handle* ddwaf_handle; -typedef struct _ddwaf_context* ddwaf_context; -typedef struct _ddwaf_builder* ddwaf_builder; -#endif - -typedef struct _ddwaf_object ddwaf_object; -typedef struct _ddwaf_config ddwaf_config; -/** - * @struct ddwaf_object - * - * Generic object used to pass data and rules to the WAF. - **/ -struct _ddwaf_object -{ - const char* parameterName; - uint64_t parameterNameLength; - // uintValue should be at least as wide as the widest type on the platform. - union - { - const char* stringValue; - uint64_t uintValue; - int64_t intValue; - ddwaf_object* array; - bool boolean; - double f64; - }; - uint64_t nbEntries; - DDWAF_OBJ_TYPE type; -}; - -/** - * @typedef ddwaf_object_free_fn - * - * Type of the function to free ddwaf::objects. - **/ -typedef void (*ddwaf_object_free_fn)(ddwaf_object *object); - -/** - * @struct ddwaf_config - * - * Configuration to be provided to the WAF - **/ -struct _ddwaf_config -{ - struct _ddwaf_config_limits { - /** Maximum size of ddwaf::object containers. */ - uint32_t max_container_size; - /** Maximum depth of ddwaf::object containers. */ - uint32_t max_container_depth; - /** Maximum length of ddwaf::object strings. */ - uint32_t max_string_length; - } limits; - - /** Obfuscator regexes - the strings are owned by the caller */ - struct _ddwaf_config_obfuscator { - /** Regular expression for key-based obfuscation */ - const char *key_regex; - /** Regular expression for value-based obfuscation */ - const char *value_regex; - } obfuscator; - - /** Function to free the ddwaf::object provided to the context during calls - * to ddwaf_run. If the value of this function is NULL, the objects will - * not be freed. The default value should be ddwaf_object_free. */ - ddwaf_object_free_fn free_fn; -}; - -/** - * @typedef ddwaf_log_cb - * - * Callback that powerwaf will call to relay messages to the binding. - * - * @param level The logging level. - * @param function The native function that emitted the message. (nonnull) - * @param file The file of the native function that emmitted the message. (nonnull) - * @param line The line where the message was emmitted. - * @param message The size of the logging message. NUL-terminated - * @param message_len The length of the logging message (excluding NUL terminator). - */ -typedef void (*ddwaf_log_cb)( - DDWAF_LOG_LEVEL level, const char* function, const char* file, unsigned line, - const char* message, uint64_t message_len); - -/** - * ddwaf_init - * - * Initialize a ddwaf instance - * - * @param ruleset ddwaf::object map containing rules, exclusions, rules_override and rules_data. (nonnull) - * @param config Optional configuration of the WAF. (nullable) - * @param diagnostics Optional ruleset parsing diagnostics. (nullable) - * - * @return Handle to the WAF instance or NULL on error. - * - * @note If config is NULL, default values will be used, including the default - * free function (ddwaf_object_free). - * - * @note If ruleset is NULL, the diagnostics object will not be initialised. - **/ -ddwaf_handle ddwaf_init(const ddwaf_object *ruleset, - const ddwaf_config* config, ddwaf_object *diagnostics); - -/** - * ddwaf_destroy - * - * Destroy a WAF instance. - * - * @param handle Handle to the WAF instance. - */ -void ddwaf_destroy(ddwaf_handle handle); - -/** - * ddwaf_known_addresses - * - * Get an array of known (root) addresses used by rules, exclusion filters and - * processors. This array contains both required and optional addresses. A more - * accurate distinction between required and optional addresses is provided - * within the diagnostics. - * - * The memory is owned by the WAF and should not be freed. - * - * @param handle Handle to the WAF instance. - * @param size Output parameter in which the size will be returned. The value of - * size will be 0 if the return value is NULL. - * @return NULL if empty, otherwise a pointer to an array with size elements. - * - * @note This function is not thread-safe - * @note The returned array should be considered invalid after calling ddwaf_destroy - * on the handle used to obtain it. - **/ -const char* const* ddwaf_known_addresses(const ddwaf_handle handle, uint32_t *size); -/** - * ddwaf_known_actions - * - * Get an array of all the action types which could be triggered as a result of - * the current set of rules and exclusion filters. - * - * The memory is owned by the WAF and should not be freed. - * - * @param handle Handle to the WAF instance. - * @param size Output parameter in which the size will be returned. The value of - * size will be 0 if the return value is NULL. - * @return NULL if empty, otherwise a pointer to an array with size elements. - * - * @note This function is not thread-safe - * @note The returned array should be considered invalid after calling ddwaf_destroy - * on the handle used to obtain it. - **/ -const char *const *ddwaf_known_actions(const ddwaf_handle handle, uint32_t *size); -/** - * ddwaf_context_init - * - * Context object to perform matching using the provided WAF instance. - * - * @param handle Handle of the WAF instance containing the ruleset definition. (nonnull) - - * @return Handle to the context instance. - * - * @note The WAF instance needs to be valid for the lifetime of the context. - **/ -ddwaf_context ddwaf_context_init(const ddwaf_handle handle); - -/** - * ddwaf_run - * - * Perform a matching operation on the provided data - * - * @param context WAF context to be used in this run, this will determine the - * ruleset which will be used and it will also ensure that - * parameters are taken into account across runs (nonnull) - * - * @param persistent_data Data on which to perform the pattern matching. This - * data will be stored by the context and used across multiple calls to this - * function. Once the context is destroyed, the used-defined free function - * will be used to free the data provided. Note that the data passed must be - * valid until the destruction of the context. The object must be a map of - * {string, } in which each key represents the relevant address - * associated to the value, which can be of an arbitrary type. This parameter - * can be null if ephemeral data is provided. - * - * @param ephemeral_data Data on which to perform the pattern matching. This - * data will not be cached by the WAF. Matches arising from this data will - * also not be cached at any level. The data will be freed at the end of the - * call to ddwaf_run. The object must be a map of {string, } in which - * each key represents the relevant address associated to the value, which - * can be of an arbitrary type. This parameter can be null if persistent data - * is provided. - * - * @param result (nullable) Object map containing the following items: - * - events: an array of the generated events. - * - actions: a map of the generated actions in the format: - * {action type: { }, ...} - * - duration: an unsigned specifying the total runtime of the - * call in nanoseconds. - * - timeout: whether there has been a timeout during the call. - * - attributes: a map containing all derived objects in the - * format: {tag, value} - * - keep: whether the data contained herein must override any - * transport sampling through the relevant mechanism. - * This structure must be freed by the caller and will contain all - * specified keys when the value returned by ddwaf_run is either - * DDWAF_OK or DDWAF_MATCH and will be empty otherwise. - * @param timeout Maximum time budget in microseconds. - * - * @return Return code of the operation. - * @error DDWAF_ERR_INVALID_ARGUMENT The context is invalid, the data will not - * be freed. - * @error DDWAF_ERR_INVALID_OBJECT The data provided didn't match the desired - * structure or contained invalid objects, the - * data will be freed by this function. - * @error DDWAF_ERR_INTERNAL There was an unexpected error and the operation did - * not succeed. The state of the WAF is undefined if - * this error is produced and the ownership of the - * data is unknown. The result structure will not be - * filled if this error occurs. - * - * Notes on addresses: - * - Within a single run, addresses provided should be unique. - * If duplicate persistent addresses are provided: - * - Within the same batch, the latest one in the structure will be the one - * used for evaluation. - * - Within two different batches, the second batch will only use the new data. - * - * Ephemeral addresses are designed to be duplicated across batches, but if - * duplicate addresses are provided within the same batch, the latest one seen - * will be the one used. - * - * Duplicate addresses of different types (ephemeral, persistent), are not - * permitted. An existing address will never be replaced by a duplicate one - * of a different type, but it doesn't result in a critical failure. Due to the - * nature of ephemerals, an ephemeral address can be replaced in a subsequent - * batch by a persistent address, however taking advantage of this is not - * recommended and might be explicitly rejected in the future. - **/ -DDWAF_RET_CODE ddwaf_run(ddwaf_context context, ddwaf_object *persistent_data, - ddwaf_object *ephemeral_data, ddwaf_object *result, uint64_t timeout); - -/** - * ddwaf_context_destroy - * - * Performs the destruction of the context, freeing the data passed to it through - * ddwaf_run using the used-defined free function. - * - * @param context Context to destroy. (nonnull) - **/ -void ddwaf_context_destroy(ddwaf_context context); - -/** - * ddwaf_builder_init - * - * Initialize an instace of the waf builder. - * - * @param config Optional configuration of the WAF. (nullable) - * - * @return Handle to the builer instance or NULL on error. - * - * @note If config is NULL, default values will be used, including the default - * free function (ddwaf_object_free). - **/ -ddwaf_builder ddwaf_builder_init(const ddwaf_config *config); - -/** - * ddwaf_builder_add_or_update_config - * - * Adds or updates a configuration based on the given path, which must be a unique - * identifier for the provided configuration. - * - * @param builder Builder to perform the operation on. (nonnull) - * @param path A string containing the path of the configuration, this must uniquely identify the configuration. (nonnull) - * @param path_len The length of the string contained within path. - * @param config ddwaf::object map containing rules, exclusions, rules_override and rules_data. (nonnull) - * @param diagnostics Optional ruleset parsing diagnostics. (nullable) - * - * @return Whether the operation succeeded (true) or failed (false). - * - * @note if any of the arguments are NULL, the diagnostics object will not be initialised. - * @note The memory associated with the path, config and diagnostics must be freed by the caller. - * @note This function is not thread-safe. - **/ -bool ddwaf_builder_add_or_update_config(ddwaf_builder builder, const char *path, uint32_t path_len, const ddwaf_object *config, ddwaf_object *diagnostics); - -/** - * ddwaf_builder_remove_config - * - * Removes a configuration based on the provided path. - * - * @param builder Builder to perform the operation on. (nonnull) - * @param path A string containing the path of the configuration to be removed. (nonnull) - * @param path_len The length of the string contained within path. - * - * @return Whether the operation succeeded (true) or failed (false). - * - * @note The memory associated with the path must be freed by the caller. - * @note This function is not thread-safe. - **/ -bool ddwaf_builder_remove_config(ddwaf_builder builder, const char *path, uint32_t path_len); - -/** - * ddwaf_builder_build_instance - * - * Builds a ddwaf instance based on the current set of configurations. - * - * @param builder Builder to perform the operation on. (nonnull) - * - * @return Handle to the new WAF instance or NULL if there was an error. - * - * @note This function is not thread-safe. - **/ -ddwaf_handle ddwaf_builder_build_instance(ddwaf_builder builder); - -/** - * ddwaf_builder_get_config_paths - * - * Provides an array of the currently loaded paths, optionally matching the - * regex provided in filter. In addition, the count is provided as the return - * value, allowing paths to be nullptr. - * - * @param builder Builder to perform the operation on. (nonnull) - * @param paths The object in which paths will be returned, as an array of - * strings. If NULL, only the count is provided. (nullable) - * @param filter An optional string regex to filter the provided paths. The - * provided regular expression is used unanchored so matches can be found - * at any point within the path, any necessary anchors must be explicitly - * added to the regex. (nullable). - * @oaran filter_len The length of the filter string (or 0 otherwise). - * - * @return The total number of configurations loaded or, if provided, the number - * of those matching the filter. - * - * @note This function is not thread-safe and the memory of the paths object must - * be freed by the caller. - **/ -uint32_t ddwaf_builder_get_config_paths(ddwaf_builder builder, ddwaf_object *paths, const char *filter, uint32_t filter_len); - -/** - * ddwaf_builder_destroy - * - * Destroy an instance of the builder. - * - * @param builder Builder to perform the operation on. (nonnull) - */ -void ddwaf_builder_destroy(ddwaf_builder builder); - -/** - * ddwaf_object_invalid - * - * Creates an invalid object. - * - * @param object Object to perform the operation on. (nonnull) - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_invalid(ddwaf_object *object); - -/** - * ddwaf_object_null - * - * Creates an null object. Provides a different semantical value to invalid as - * it can be used to signify that a value is null rather than of an unknown type. - * - * @param object Object to perform the operation on. (nonnull) - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_null(ddwaf_object *object); - -/** - * ddwaf_object_string - * - * Creates an object from a string. - * - * @param object Object to perform the operation on. (nonnull) - * @param string String to initialise the object with, this string will be copied - * and its length will be calculated using strlen(string). (nonnull) - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_string(ddwaf_object *object, const char *string); - -/** - * ddwaf_object_stringl - * - * Creates an object from a string and its length. - * - * @param object Object to perform the operation on. (nonnull) - * @param string String to initialise the object with, this string will be - * copied. (nonnull) - * @param length Length of the string. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_stringl(ddwaf_object *object, const char *string, size_t length); - -/** - * ddwaf_object_stringl_nc - * - * Creates an object with the string pointer and length provided. - * - * @param object Object to perform the operation on. (nonnull) - * @param string String pointer to initialise the object with. - * @param length Length of the string. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_stringl_nc(ddwaf_object *object, const char *string, size_t length); - -/** - * ddwaf_object_string_from_unsigned - * - * Creates an object using an unsigned integer (64-bit). The resulting object - * will contain a string created using the integer provided. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Integer to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_string_from_unsigned(ddwaf_object *object, uint64_t value); - -/** - * ddwaf_object_string_from_signed - * - * Creates an object using a signed integer (64-bit). The resulting object - * will contain a string created using the integer provided. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Integer to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_string_from_signed(ddwaf_object *object, int64_t value); - -/** - * ddwaf_object_unsigned_force - * - * Creates an object using an unsigned integer (64-bit). The resulting object - * will contain an unsigned integer as opposed to a string. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Integer to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_unsigned(ddwaf_object *object, uint64_t value); - -/** - * ddwaf_object_signed_force - * - * Creates an object using a signed integer (64-bit). The resulting object - * will contain a signed integer as opposed to a string. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Integer to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_signed(ddwaf_object *object, int64_t value); - -/** - * ddwaf_object_bool - * - * Creates an object using a boolean, the resulting object will contain a - * boolean as opposed to a string. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Boolean to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_bool(ddwaf_object *object, bool value); - -/** - * ddwaf_object_float - * - * Creates an object using a double, the resulting object will contain a - * double as opposed to a string. - * - * @param object Object to perform the operation on. (nonnull) - * @param value Double to initialise the object with. - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_float(ddwaf_object *object, double value); - -/** - * ddwaf_object_array - * - * Creates an array object, for sequential storage. - * - * @param object Object to perform the operation on. (nonnull) - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_array(ddwaf_object *object); - -/** - * ddwaf_object_map - * - * Creates a map object, for key-value storage. - * - * @param object Object to perform the operation on. (nonnull) - * - * @return A pointer to the passed object or NULL if the operation failed. - **/ -ddwaf_object* ddwaf_object_map(ddwaf_object *object); - -/** - * ddwaf_object_array_add - * - * Inserts an object into an array object. - * - * @param array Array in which to insert the object. (nonnull) - * @param object Object to insert into the array. (nonnull) - * - * @return The success or failure of the operation. - **/ -bool ddwaf_object_array_add(ddwaf_object *array, ddwaf_object *object); - -/** - * ddwaf_object_map_add - * - * Inserts an object into an map object, using a key. - * - * @param map Map in which to insert the object. (nonnull) - * @param key The key for indexing purposes, this string will be copied and its - * length will be calcualted using strlen(key). (nonnull) - * @param object Object to insert into the array. (nonnull) - * - * @return The success or failure of the operation. - **/ -bool ddwaf_object_map_add(ddwaf_object *map, const char *key, ddwaf_object *object); - -/** - * ddwaf_object_map_addl - * - * Inserts an object into an map object, using a key and its length. - * - * @param map Map in which to insert the object. (nonnull) - * @param key The key for indexing purposes, this string will be copied (nonnull) - * @param length Length of the key. - * @param object Object to insert into the array. (nonnull) - * - * @return The success or failure of the operation. - **/ -bool ddwaf_object_map_addl(ddwaf_object *map, const char *key, size_t length, ddwaf_object *object); - -/** - * ddwaf_object_map_addl_nc - * - * Inserts an object into an map object, using a key and its length, but without - * creating a copy of the key. - * - * @param map Map in which to insert the object. (nonnull) - * @param key The key for indexing purposes, this string will be copied (nonnull) - * @param length Length of the key. - * @param object Object to insert into the array. (nonnull) - * - * @return The success or failure of the operation. - **/ -bool ddwaf_object_map_addl_nc(ddwaf_object *map, const char *key, size_t length, ddwaf_object *object); - -/** - * ddwaf_object_type - * - * Returns the type of the object. - * - * @param object The object from which to get the type. - * - * @return The object type of DDWAF_OBJ_INVALID if NULL. - **/ -DDWAF_OBJ_TYPE ddwaf_object_type(const ddwaf_object *object); - -/** - * ddwaf_object_size - * - * Returns the size of the container object. - * - * @param object The object from which to get the size. - * - * @return The object size or 0 if the object is not a container (array, map). - **/ -size_t ddwaf_object_size(const ddwaf_object *object); - -/** - * ddwaf_object_length - * - * Returns the length of the string object. - * - * @param object The object from which to get the length. - * - * @return The string length or 0 if the object is not a string. - **/ -size_t ddwaf_object_length(const ddwaf_object *object); - -/** - * ddwaf_object_get_key - * - * Returns the key contained within the object. - * - * @param object The object from which to get the key. - * @param length Output parameter on which to return the length of the key, - * this parameter is optional / nullable. - * - * @return The key of the object or NULL if the object doesn't contain a key. - **/ -const char* ddwaf_object_get_key(const ddwaf_object *object, size_t *length); - -/** - * ddwaf_object_get_string - * - * Returns the string contained within the object. - * - * @param object The object from which to get the string. - * @param length Output parameter on which to return the length of the string, - * this parameter is optional / nullable. - * - * @return The string of the object or NULL if the object is not a string. - **/ -const char* ddwaf_object_get_string(const ddwaf_object *object, size_t *length); - -/** - * ddwaf_object_get_unsigned - * - * Returns the uint64 contained within the object. - * - * @param object The object from which to get the integer. - * - * @return The integer or 0 if the object is not an unsigned. - **/ -uint64_t ddwaf_object_get_unsigned(const ddwaf_object *object); - -/** - * ddwaf_object_get_signed - * - * Returns the int64 contained within the object. - * - * @param object The object from which to get the integer. - * - * @return The integer or 0 if the object is not a signed. - **/ -int64_t ddwaf_object_get_signed(const ddwaf_object *object); - -/** - * ddwaf_object_get_float - * - * Returns the float64 (double) contained within the object. - * - * @param object The object from which to get the float. - * - * @return The float or 0.0 if the object is not a float. - **/ -double ddwaf_object_get_float(const ddwaf_object *object); - -/** - * ddwaf_object_get_bool - * - * Returns the boolean contained within the object. - * - * @param object The object from which to get the boolean. - * - * @return The boolean or false if the object is not a boolean. - **/ -bool ddwaf_object_get_bool(const ddwaf_object *object); - -/** - * ddwaf_object_get_index - * - * Returns the object contained in the container at the given index. - * - * @param object The container from which to extract the object. - * @param index The position of the required object within the container. - * - * @return The requested object or NULL if the index is out of bounds or the - * object is not a container. - **/ -const ddwaf_object* ddwaf_object_get_index(const ddwaf_object *object, size_t index); - -/** - * ddwaf_object_find - * - * Returns the object within the given map with a key matching the provided one. - * - * @param object The container from which to extract the object. - * @param key A string representing the key to find. - * @param length Length of the key. - * - * @return The requested object or NULL if the key was not found or the - * object is not a container. - **/ -const ddwaf_object* ddwaf_object_find(const ddwaf_object *object, const char *key, size_t length); - -/** - * ddwaf_object_free - * - * @param object Object to free. (nonnull) - **/ -void ddwaf_object_free(ddwaf_object *object); - -/** - * ddwaf_get_version - * - * Return the version of the library - * - * @return version Version string, note that this should not be freed - **/ -const char *ddwaf_get_version(); - -/** - * ddwaf_set_log_cb - * - * Sets the callback to relay logging messages to the binding - * - * @param cb The callback to call, or NULL to stop relaying messages - * @param min_level The minimum logging level for which to relay messages - * - * @return whether the operation succeeded or not - * - * @note This function is not thread-safe - **/ -bool ddwaf_set_log_cb(ddwaf_log_cb cb, DDWAF_LOG_LEVEL min_level); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /*DDWAF_H */ diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log.go deleted file mode 100644 index 447ac711fa..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log.go +++ /dev/null @@ -1,97 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package log - -import ( - "fmt" - "log" - "os" - "regexp" - "strings" -) - -// Level replicates the definition of `DDWAF_LOG_LEVEL` from `ddwaf.h`. -type Level int - -const ( - LevelTrace Level = iota - LevelDebug - LevelInfo - LevelWarning - LevelError - LevelOff -) - -// LevelNamed returns the log level corresponding to the given name, or LevelOff -// if the name corresponds to no known log level. -func LevelNamed(name string) Level { - switch strings.ToLower(name) { - case "trace": - return LevelTrace - case "debug": - return LevelDebug - case "info": - return LevelInfo - case "warn", "warning": - return LevelWarning - case "error": - return LevelError - case "off": - return LevelOff - default: - return LevelOff - } -} - -func (l Level) String() string { - switch l { - case LevelTrace: - return "TRACE" - case LevelDebug: - return "DEBUG" - case LevelInfo: - return "INFO" - case LevelWarning: - return "WARN" - case LevelError: - return "ERROR" - case LevelOff: - return "OFF" - default: - return fmt.Sprintf("0x%X", uintptr(l)) - } -} - -var filter *regexp.Regexp - -func logMessage(level Level, function, file string, line uint, message string) { - entry := fmt.Sprintf("[%s] libddwaf @ %s:%d (%s): %s", level, file, line, function, message) - - if filter != nil && !filter.MatchString(entry) { - return - } - - log.Println(entry) -} - -const EnvVarLogLevel = "DD_APPSEC_WAF_LOG_LEVEL" - -func init() { - const envVarFilter = "DD_APPSEC_WAF_LOG_FILTER" - - if val := os.Getenv(EnvVarLogLevel); val == "" { - // No log level configured, don't even attempt parsing the regexp. - return - } - - if val := os.Getenv(envVarFilter); val != "" { - var err error - filter, err = regexp.Compile(val) - if err != nil { - log.Fatalf("invalid %s value: %v", envVarFilter, err) - } - } -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_cgo.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_cgo.go deleted file mode 100644 index 8f0715174a..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_cgo.go +++ /dev/null @@ -1,35 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && cgo - -package log - -// #include "./ddwaf.h" -// extern void ddwafLogCallbackFnV4( -// DDWAF_LOG_LEVEL level, -// char* function, -// char* file, -// unsigned line, -// char* message, -// uint64_t message_len -// ); -import "C" -import "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - -// CallbackFunctionPointer returns a pointer to the log callback function which -// can be used with libddwaf. -func CallbackFunctionPointer() uintptr { - return uintptr(C.ddwafLogCallbackFnV4) -} - -//export ddwafLogCallbackFnV4 -func ddwafLogCallbackFnV4(level C.DDWAF_LOG_LEVEL, fnPtr, filePtr *C.char, line C.unsigned, msgPtr *C.char, _ C.uint64_t) { - function := unsafe.Gostring(unsafe.CastNative[C.char, byte](fnPtr)) - file := unsafe.Gostring(unsafe.CastNative[C.char, byte](filePtr)) - message := unsafe.Gostring(unsafe.CastNative[C.char, byte](msgPtr)) - - logMessage(Level(level), function, file, uint(line), message) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_purego.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_purego.go deleted file mode 100644 index 7bbc92acfc..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_purego.go +++ /dev/null @@ -1,37 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build (linux || darwin) && (amd64 || arm64) && !go1.26 && !datadog.no_waf && !cgo && appsec - -package log - -import ( - "sync" - - "github.com/DataDog/go-libddwaf/v4/internal/unsafe" - - "github.com/ebitengine/purego" -) - -var ( - once = sync.OnceValue(func() uintptr { - return purego.NewCallback(ddwafLogCallbackFn) - }) - functionPointer uintptr -) - -// CallbackFunctionPointer returns a pointer to the log callback function which -// can be used with libddwaf. -func CallbackFunctionPointer() uintptr { - return once() -} - -func ddwafLogCallbackFn(level Level, fnPtr, filePtr *byte, line uint, msgPtr *byte, _ uint64) { - function := unsafe.Gostring(fnPtr) - file := unsafe.Gostring(filePtr) - message := unsafe.Gostring(msgPtr) - - logMessage(level, function, file, line, message) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_unsupported.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_unsupported.go deleted file mode 100644 index f548fec116..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/log/log_unsupported.go +++ /dev/null @@ -1,14 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build (!linux && !darwin) || (!amd64 && !arm64) || go1.26 || datadog.no_waf || (!cgo && !appsec) - -package log - -// CallbackFunctionPointer returns a NULL pointer since this particular platform -// configuration is not supported by purego, and cgo is disabled. -func CallbackFunctionPointer() uintptr { - return 0 -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/pin/pinner.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/pin/pinner.go deleted file mode 100644 index 457b976bce..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/pin/pinner.go +++ /dev/null @@ -1,53 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package pin - -import ( - "runtime" - "sync" -) - -// A Pinner is a set of Go objects each pinned to a fixed location in memory. -// The [Pinner.Pin] method pins one object, while [Pinner.Unpin] unpins all -// pinned objects. See their comments for more information. -type Pinner interface { - // Pin pins a Go object, preventing it from being moved or freed by the - // garbage collector until the [Pinner.Unpin] method has been called. - // - // A pointer to a pinned object can be directly stored in C memory or can be - // contained in Go memory passed to C functions. If the pinned object itself - // contains pointers to Go objects, these objects must be pinned separately if - // they are going to be accessed from C code. - // - // The argument must be a pointer of any type or an [unsafe.Pointer]. - // It's safe to call Pin on non-Go pointers, in which case Pin will do - // nothing. - Pin(any) - - // Unpin unpins all pinned objects of the [Pinner]. - Unpin() -} - -var _ Pinner = (*runtime.Pinner)(nil) - -// ConcurrentPinner is a [Pinner] that is safe for concurrent use by multiple -// goroutines. -type ConcurrentPinner struct { - runtime.Pinner - sync.Mutex -} - -func (p *ConcurrentPinner) Pin(v any) { - p.Lock() - p.Pinner.Pin(v) - p.Unlock() -} - -func (p *ConcurrentPinner) Unpin() { - p.Lock() - p.Pinner.Unpin() - p.Unlock() -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/.gitattributes b/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/.gitattributes deleted file mode 100644 index fb0380ea54..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -/recommended.json.gz linguist-vendored diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/recommended.json.gz b/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/recommended.json.gz deleted file mode 100644 index 79ef209419688e5fd06d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Z!{5+Cf3pQ{^)uu2q#0hSZXq{6jB_2-`C Yv6!S=qyP7R0RRC1|2C9|@RsEQ00ac$)c^nh diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset.go deleted file mode 100644 index e66b2d8160..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset.go +++ /dev/null @@ -1,36 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build linux || darwin - -package ruleset - -import ( - "bytes" - "compress/gzip" - _ "embed" - "runtime" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/json" -) // For go:embed - -//go:embed recommended.json.gz -var defaultRuleset []byte - -func DefaultRuleset(pinner *runtime.Pinner) (bindings.WAFObject, error) { - gz, err := gzip.NewReader(bytes.NewReader(defaultRuleset)) - if err != nil { - return bindings.WAFObject{}, err - } - - dec := json.NewDecoder(gz, pinner) - - var ruleset bindings.WAFObject - if err := dec.Decode(&ruleset); err != nil { - return bindings.WAFObject{}, err - } - return ruleset, nil -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset_unsupported.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset_unsupported.go deleted file mode 100644 index 524bde301d..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/ruleset/ruleset_unsupported.go +++ /dev/null @@ -1,19 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -//go:build !(linux || darwin) - -package ruleset - -import ( - "errors" - "runtime" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" -) - -func DefaultRuleset(pinner *runtime.Pinner) (bindings.WAFObject, error) { - return bindings.WAFObject{}, errors.New("the default ruleset is not available on unsupported platforms") -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_cgo_disabled.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_cgo_disabled.go deleted file mode 100644 index 0c06bdf5a8..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_cgo_disabled.go +++ /dev/null @@ -1,16 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// The Go build tag "appsec" was introduced to avoid having CGO_ENABLED=0 breaking changes -// due to purego's dynamic link against libdl.so, which is not expected when CGO is disabled. -//go:build !cgo && !appsec - -package support - -import "github.com/DataDog/go-libddwaf/v4/waferrors" - -func init() { - wafSupportErrors = append(wafSupportErrors, waferrors.CgoDisabledError{}) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_manually_disabled.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_manually_disabled.go deleted file mode 100644 index 98aa5e3d33..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_manually_disabled.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Manually set datadog.no_waf build tag -//go:build datadog.no_waf - -package support - -import "github.com/DataDog/go-libddwaf/v4/waferrors" - -func init() { - wafManuallyDisabledErr = waferrors.ManuallyDisabledError{} -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_support.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_support.go deleted file mode 100644 index cfd81a6a35..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_support.go +++ /dev/null @@ -1,21 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package support - -// Errors used to report data using the Health function -// Store all the errors related to why go-liddwaf is unavailable for the current target at runtime. -var wafSupportErrors []error - -// Not nil if the build tag `datadog.no_waf` is set -var wafManuallyDisabledErr error - -func WafSupportErrors() []error { - return wafSupportErrors -} - -func WafManuallyDisabledError() error { - return wafManuallyDisabledErr -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_go.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_go.go deleted file mode 100644 index 7e8d745248..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_go.go +++ /dev/null @@ -1,15 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Unsupported Go versions (>=) -//go:build go1.26 - -package support - -import "github.com/DataDog/go-libddwaf/v4/waferrors" - -func init() { - wafSupportErrors = append(wafSupportErrors, waferrors.UnsupportedGoVersionError{}) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_target.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_target.go deleted file mode 100644 index 2757cc54cc..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/support/waf_unsupported_target.go +++ /dev/null @@ -1,20 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -// Unsupported target OS or architecture -// Unsupported OS Unsupported Arch -//go:build (!linux && !darwin) || (!amd64 && !arm64) - -package support - -import ( - "runtime" - - "github.com/DataDog/go-libddwaf/v4/waferrors" -) - -func init() { - wafSupportErrors = append(wafSupportErrors, waferrors.UnsupportedOSArchError{OS: runtime.GOOS, Arch: runtime.GOARCH}) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/internal/unsafe/utils.go b/vendor/github.com/DataDog/go-libddwaf/v4/internal/unsafe/utils.go deleted file mode 100644 index 6f6c74d1fb..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/internal/unsafe/utils.go +++ /dev/null @@ -1,112 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package unsafe - -import ( - "runtime" - "unsafe" -) - -type Pointer = unsafe.Pointer - -func SliceData[E any, T ~[]E](slice T) *E { - return unsafe.SliceData(slice) -} - -func StringData(str string) *byte { - return unsafe.StringData(str) -} - -// Gostring copies a char* to a Go string. -func Gostring(ptr *byte) string { - if ptr == nil { - return "" - } - var length int - for *(*byte)(unsafe.Add(unsafe.Pointer(ptr), uintptr(length))) != '\x00' { - length++ - } - //string builtin copies the slice - return string(unsafe.Slice(ptr, length)) -} - -type StringHeader struct { - Len int - Data *byte -} - -// NativeStringUnwrap cast a native string type into it's runtime value. -func NativeStringUnwrap(str string) StringHeader { - return StringHeader{ - Data: unsafe.StringData(str), - Len: len(str), - } -} - -func GostringSized(ptr *byte, size uint64) string { - if ptr == nil { - return "" - } - return string(unsafe.Slice(ptr, size)) -} - -// Cstring converts a go string to *byte that can be passed to C code. -func Cstring(pinner *runtime.Pinner, name string) *byte { - var b = make([]byte, len(name)+1) - copy(b, name) - pinner.Pin(&b[0]) - return unsafe.SliceData(b) -} - -// Cast is used to centralize unsafe use C of allocated pointer. -// We take the address and then dereference it to trick go vet from creating a possible misuse of unsafe.Pointer -func Cast[T any](ptr uintptr) *T { - return (*T)(*(*unsafe.Pointer)(unsafe.Pointer(&ptr))) -} - -type Native interface { - ~byte | ~float64 | ~float32 | ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~bool | ~uintptr -} - -func CastNative[N Native, T Native](ptr *N) *T { - return (*T)(*(*unsafe.Pointer)(unsafe.Pointer(&ptr))) -} - -// NativeToUintptr is a helper used by populate WafObject values -// with Go values -func NativeToUintptr[T any](x T) uintptr { - return *(*uintptr)(unsafe.Pointer(&x)) -} - -// UintToNative is a helper used retrieve Go values from an uintptr encoded -// value from a WafObject -func UintptrToNative[T any](x uintptr) T { - return *(*T)(unsafe.Pointer(&x)) -} - -// CastWithOffset is the same as cast but adding an offset to the pointer by a multiple of the size -// of the type pointed. -func CastWithOffset[T any](ptr uintptr, offset uint64) *T { - return (*T)(unsafe.Add(*(*unsafe.Pointer)(unsafe.Pointer(&ptr)), offset*uint64(unsafe.Sizeof(*new(T))))) -} - -// PtrToUintptr is a helper to centralize of usage of unsafe.Pointer -// do not use this function to cast interfaces -func PtrToUintptr[T any](arg *T) uintptr { - return uintptr(unsafe.Pointer(arg)) -} - -func SliceToUintptr[T any](arg []T) uintptr { - return uintptr(unsafe.Pointer(unsafe.SliceData(arg))) -} - -func Slice[T any](ptr *T, length uint64) []T { - return unsafe.Slice(ptr, length) -} - -func String(ptr *byte, length uint64) string { - return unsafe.String(ptr, length) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/json/decoder.go b/vendor/github.com/DataDog/go-libddwaf/v4/json/decoder.go deleted file mode 100644 index 462b8c025c..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/json/decoder.go +++ /dev/null @@ -1,138 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package json - -import ( - "encoding/json" - "errors" - "fmt" - "io" - "runtime" - "strconv" - "unique" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" -) - -type Decoder struct { - pinner *runtime.Pinner - json *json.Decoder -} - -func NewDecoder(rd io.Reader, pinner *runtime.Pinner) *Decoder { - js := json.NewDecoder(rd) - js.UseNumber() - return &Decoder{pinner: pinner, json: js} -} - -func (d *Decoder) Decode(v *bindings.WAFObject) error { - tok, err := d.json.Token() - if err != nil { - return err - } - - switch tok := tok.(type) { - case json.Delim: - switch tok { - case '{': - return d.decodeMap(v) - case '[': - return d.decodeArray(v) - default: - return fmt.Errorf("%w: %q", errors.ErrUnsupported, tok) - } - - case json.Number: - return decodeNumber(v, tok) - - case bool: - v.SetBool(tok) - return nil - - case string: - v.SetString(d.pinner, tok) - return nil - - case nil: - v.SetNil() - return nil - - default: - return fmt.Errorf("%w: %T %v", errors.ErrUnsupported, tok, tok) - } -} - -func (d *Decoder) decodeArray(v *bindings.WAFObject) error { - var items []bindings.WAFObject - for d.json.More() { - var v bindings.WAFObject - if err := d.Decode(&v); err != nil { - return err - } - items = append(items, v) - } - - // Consume the closing bracket... - if _, err := d.json.Token(); err != nil { - return err - } - - v.SetArrayData(d.pinner, items) - return nil -} - -func (d *Decoder) decodeMap(v *bindings.WAFObject) error { - var items []bindings.WAFObject - for d.json.More() { - keyTok, err := d.json.Token() - if err != nil { - return err - } - key, ok := keyTok.(string) - if !ok { - return fmt.Errorf("expected string key, got %T %q", keyTok, keyTok) - } - // To reduce the overall amount of memory that is retained by the resulting WAFObjects, we make - // the keys unique, as they are repeated a lot in the original JSON. - key = unique.Make(key).Value() - - var v bindings.WAFObject - v.SetMapKey(d.pinner, key) - if err := d.Decode(&v); err != nil { - return err - } - items = append(items, v) - } - - // Consume the closing brace... - if _, err := d.json.Token(); err != nil { - return err - } - - v.SetMapData(d.pinner, items) - return nil -} - -func decodeNumber(v *bindings.WAFObject, tok json.Number) error { - if i, err := strconv.ParseUint(string(tok), 10, 64); err == nil { - v.SetUint(i) - return nil - } - - if i, err := tok.Int64(); err == nil { - v.SetInt(i) - return nil - } - - f, err := tok.Float64() - if err != nil { - return fmt.Errorf("invalid number %q: %w", tok, err) - } - - v.SetFloat(f) - - return nil -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/result.go b/vendor/github.com/DataDog/go-libddwaf/v4/result.go deleted file mode 100644 index 9528b667d1..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/result.go +++ /dev/null @@ -1,60 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "time" - - "github.com/DataDog/go-libddwaf/v4/timer" -) - -// Result stores the multiple values returned by a call to [Context.Run]. -type Result struct { - // Events is the list of events the WAF detected, together with any relevant - // details. These are typically forwarded as opaque objects to the Datadog - // backend. - Events []any - - // Derivatives is the set of key-value pairs generated by the WAF, and which - // need to be reported on the trace to provide additional data to the Datadog - // backend. - Derivatives map[string]any - - // Actions is the set of actions the WAF decided on when evaluating rules - // against the provided address data. It maps action types to their dynamic - // parameter values. - Actions map[string]any - - // Timer returns the time spend in the different parts of the run. Keys can be found with the suffix [ - TimerStats map[timer.Key]time.Duration - - // Keep is true if the WAF instructs the trace should be set to manual keep priority. - Keep bool -} - -// HasEvents return true if the [Result] holds at least 1 event. -func (r *Result) HasEvents() bool { - return len(r.Events) > 0 -} - -// HasDerivatives return true if the [Result] holds at least 1 derivative. -func (r *Result) HasDerivatives() bool { - return len(r.Derivatives) > 0 -} - -// HasActions return true if the [Result] holds at least 1 action. -func (r *Result) HasActions() bool { - return len(r.Actions) > 0 -} - -const ( - // EncodeTimeKey is the key used to track the time spent encoding the address data reported in [Result.TimerStats]. - EncodeTimeKey timer.Key = "encode" - // DurationTimeKey is the key used to track the time spent in libddwaf ddwaf_run C function reported in [Result.TimerStats]. - DurationTimeKey timer.Key = "duration" - // DecodeTimeKey is the key used to track the time spent decoding the address data reported in [Result.TimerStats]. - DecodeTimeKey timer.Key = "decode" -) diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/base_timer.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/base_timer.go deleted file mode 100644 index f51ee7ca36..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/base_timer.go +++ /dev/null @@ -1,128 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "errors" - "time" -) - -// baseTimer is the type used for all the timers that won't have children -// It's implementation is more lightweight than nodeTimer and can be used as a standalone timer using NewTimer -type baseTimer struct { - - // config is the configuration of the timer - config config - - clock - - // start is the time when the timer was started - start time.Time - - // parent is the parent timer. It is used to progate the stop of the timer to the parent timer and get the remaining time in case the budget has to be inherited. - parent NodeTimer - - // componentName is the name of the component of the timer. It is used to store the time spent in the component and to propagate the stop of the timer to the parent timer. - componentName Key - - // spent is the time spent on the timer, set after calling stop - spent time.Duration - // stopped is true if the timer has been stopped - stopped bool -} - -var _ Timer = (*baseTimer)(nil) - -// NewTimer creates a new Timer with the given options. You have to specify either the option WithBudget or WithUnlimitedBudget. -func NewTimer(options ...Option) (Timer, error) { - config := newConfig(options...) - if config.budget == DynamicBudget { - return nil, errors.New("root timer cannot inherit parent budget, please provide a budget using timer.WithBudget() or timer.WithUnlimitedBudget()") - } - - if len(config.components) > 0 { - return nil, errors.New("NewTimer: timer that have components must use NewTreeTimer()") - } - - return &baseTimer{ - config: config, - clock: newTimeCache(), - }, nil -} - -func (timer *baseTimer) Start() time.Time { - // already started before - if timer.start != (time.Time{}) { - return timer.start - } - - if timer.config.budget == DynamicBudget && timer.parent != nil { - timer.config.budget = timer.config.dynamicBudget(timer.parent) - } - - timer.start = timer.now() - return timer.start -} - -func (timer *baseTimer) Spent() time.Duration { - // timer was never started - if timer.start.IsZero() { - return 0 - } - - // timer was already stopped - if timer.stopped { - return timer.spent - } - - return time.Since(timer.start) -} - -func (timer *baseTimer) Remaining() time.Duration { - if timer.config.budget == UnlimitedBudget { - return UnlimitedBudget - } - - remaining := timer.config.budget - timer.Spent() - if remaining < 0 { - return 0 - } - - return remaining -} - -func (timer *baseTimer) Exhausted() bool { - if timer.config.budget == UnlimitedBudget { - return false - } - - return timer.Spent() > timer.config.budget -} - -func (timer *baseTimer) Stop() time.Duration { - // If the current timer has already stopped, return the current spent time - if timer.stopped { - return timer.spent - } - - timer.spent = timer.Spent() - timer.stopped = true - if timer.parent != nil { - timer.parent.childStopped(timer.componentName, timer.spent) - } - - return timer.spent -} - -func (timer *baseTimer) Timed(timedFunc func(timer Timer)) (spent time.Duration) { - timer.Start() - defer func() { - spent = timer.Stop() - }() - - timedFunc(timer) - return -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/clock.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/clock.go deleted file mode 100644 index d20e1781b7..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/clock.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "time" -) - -// clock is a simple cache for time.Now() to hopefully avoid some expensive calls to REALTIME part of time.Now() -type clock struct { - lastRequest time.Time -} - -func newTimeCache() clock { - return clock{ - lastRequest: time.Now(), - } -} - -func (ct *clock) now() time.Time { - // If the diff is greater than ~2^32 then the monotonic clock has wrapped around - // and time.Since will do a call to time.Now() for us. - ct.lastRequest = ct.lastRequest.Add(time.Since(ct.lastRequest)) - return ct.lastRequest -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/component.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/component.go deleted file mode 100644 index 7ccb504eee..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/component.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "sync/atomic" -) - -// components store the data shared between child timers of the same component name -type components struct { - lookup map[Key]*atomic.Int64 - storage []atomic.Int64 -} - -func newComponents(names []Key) components { - lookup := make(map[Key]*atomic.Int64, len(names)) - storage := make([]atomic.Int64, len(names)) - for i, name := range names { - lookup[name] = &storage[i] - } - return components{ - lookup: lookup, - storage: storage, - } -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/config.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/config.go deleted file mode 100644 index dbaa7f0bb9..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/config.go +++ /dev/null @@ -1,86 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "math" - "time" -) - -const ( - // UnlimitedBudget is a special value for the budget that means the timer has no budget - UnlimitedBudget = time.Duration(math.MaxInt64) - - // DynamicBudget is a special value for the budget that means the timer should inherit the budget from its parent - // It is the default value if no options such as WithBudget, WithUnlimitedBudget or WithInheritedBudget are provided - DynamicBudget = ^time.Duration(0) -) - -// DynamicBudgetFunc is a function that is called on all children when a change to the parent happens -type DynamicBudgetFunc func(timer NodeTimer) time.Duration - -// config is the configuration of a timer. It can be created through the use of options -type config struct { - dynamicBudget DynamicBudgetFunc - // components store all the components of the timer - components []Key - // budget is the time budget for the timer - budget time.Duration -} - -func newConfig(options ...Option) config { - config := config{} - // Make sure the budget is inherited by default - WithInheritedSumBudget()(&config) - for _, option := range options { - option(&config) - } - return config -} - -// Option are the configuration options for any type of timer. Please read the documentation of said timer to see which options are available -type Option func(*config) - -// WithBudget is an Option that sets the budget value -func WithBudget(budget time.Duration) Option { - return func(c *config) { - c.budget = budget - } -} - -// WithUnlimitedBudget is an Option that sets the UnlimitedBudget flag on config.budget -func WithUnlimitedBudget() Option { - return func(c *config) { - c.budget = UnlimitedBudget - } -} - -// WithInheritedBudget is an Option that sets the DynamicBudget flag on config.budget -func WithInheritedBudget() Option { - return func(c *config) { - c.budget = DynamicBudget - c.dynamicBudget = func(timer NodeTimer) time.Duration { - return timer.Remaining() - } - } -} - -// WithInheritedSumBudget is an Option that sets the DynamicBudget flag on config.budget and sets the DynamicBudgetFunc to sum the remaining time of all children -func WithInheritedSumBudget() Option { - return func(c *config) { - c.budget = DynamicBudget - c.dynamicBudget = func(timer NodeTimer) time.Duration { - return timer.SumRemaining() - } - } -} - -// WithComponents is an Option that adds multiple components to the components list -func WithComponents(components ...Key) Option { - return func(c *config) { - c.components = append(c.components, components...) - } -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/node_timer.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/node_timer.go deleted file mode 100644 index 5d20a062c7..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/node_timer.go +++ /dev/null @@ -1,138 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "errors" - "fmt" - "time" -) - -// nodeTimer is the type used for all the timers that can (and will) have children -type nodeTimer struct { - baseTimer - components -} - -var _ NodeTimer = (*nodeTimer)(nil) - -// NewTreeTimer creates a new Timer with the given options. You have to specify either the option WithBudget or WithUnlimitedBudget and at least one component using the WithComponents option. -func NewTreeTimer(options ...Option) (NodeTimer, error) { - config := newConfig(options...) - if config.budget == DynamicBudget { - return nil, errors.New("root timer cannot inherit parent budget, please provide a budget using timer.WithBudget() or timer.WithUnlimitedBudget()") - } - - return &nodeTimer{ - baseTimer: baseTimer{ - config: config, - clock: newTimeCache(), - }, - components: newComponents(config.components), - }, nil -} - -func (timer *nodeTimer) NewNode(name Key, options ...Option) (NodeTimer, error) { - config := newConfig(options...) - if len(config.components) == 0 { - return nil, errors.New("NewNode: node timer must have at least one component, otherwise use NewLeaf()") - } - - _, ok := timer.components.lookup[name] - if !ok { - return nil, fmt.Errorf("NewNode: component %s not found", name) - } - - return &nodeTimer{ - baseTimer: baseTimer{ - config: config, - clock: timer.clock, - parent: timer, - componentName: name, - }, - components: newComponents(config.components), - }, nil -} - -func (timer *nodeTimer) NewLeaf(name Key, options ...Option) (Timer, error) { - config := newConfig(options...) - if len(config.components) != 0 { - return nil, errors.New("NewLeaf: leaf timer cannot have components, otherwise use NewNode()") - } - - _, ok := timer.components.lookup[name] - if !ok { - return nil, fmt.Errorf("NewLeaf: component %s not found", name) - } - - return &baseTimer{ - clock: timer.clock, - config: config, - componentName: name, - parent: timer, - }, nil -} - -func (timer *nodeTimer) MustLeaf(name Key, options ...Option) Timer { - leaf, err := timer.NewLeaf(name, options...) - if err != nil { - panic(err) - } - return leaf -} - -func (timer *nodeTimer) childStarted() {} - -func (timer *nodeTimer) childStopped(componentName Key, duration time.Duration) { - timer.components.lookup[componentName].Add(int64(duration)) -} - -func (timer *nodeTimer) AddTime(name Key, duration time.Duration) { - value, ok := timer.components.lookup[name] - if !ok { - return - } - - value.Add(int64(duration)) -} - -func (timer *nodeTimer) Stats() map[Key]time.Duration { - stats := make(map[Key]time.Duration, len(timer.components.lookup)) - for name, component := range timer.components.lookup { - stats[name] = time.Duration(component.Load()) - } - - return stats -} - -func (timer *nodeTimer) SumSpent() time.Duration { - var sum time.Duration - for _, component := range timer.components.lookup { - sum += time.Duration(component.Load()) - } - return sum -} - -func (timer *nodeTimer) SumRemaining() time.Duration { - if timer.config.budget == UnlimitedBudget { - return UnlimitedBudget - } - - remaining := timer.config.budget - timer.SumSpent() - if remaining < 0 { - return 0 - } - - return remaining -} - -func (timer *nodeTimer) SumExhausted() bool { - if timer.config.budget == UnlimitedBudget { - return false - } - - return timer.SumSpent() > timer.config.budget -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/timer/timer.go b/vendor/github.com/DataDog/go-libddwaf/v4/timer/timer.go deleted file mode 100644 index 2a67ed1c47..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/timer/timer.go +++ /dev/null @@ -1,118 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2022 Datadog, Inc. - -package timer - -import ( - "time" -) - -// Key is used to key track of each component of a tree timer. It can be used create constants that can be used to identify components in the tree. -type Key string - -// Timer is the default interface for all timers. NewTimer will provide you with a Timer. -// Keep in mind that they are NOT thread-safe and once Stop() is called, the Timer cannot be restarted. -type Timer interface { - // Start starts the timer and returns the start time. - // If the timer was already started, it returns the previous start time. - // If the timer was started without specifying a budget, it will inherit the budget from its parent when calling Start(). - // if the timer has no parent and no budget was specified, the call creating the timer (either NewTreeTimer or NewTimer) will return an error asking to specify a budget (which can be unlimited). - // Start is NOT thread-safe - Start() time.Time - - // Stop ends the timer and returns the time spent on the timer as Spent() would. - // Stop will trigger the computation of sum timers if the timer is part of a tree. See NodeTimer for more information. - // Stop is NOT thread-safe - Stop() time.Duration - - // Spent returns the current time spent between Start() and Stop() or between Start() and now if the timer is still running. - // Spent is thread-safe - Spent() time.Duration - - // Remaining returns the time remaining before the timer reaches its budget. (budget - Spent()) - // It returns 0 if the timer is exhausted. Remaining may never return a value below zero. - // Remaining only makes sense if the timer has a budget. If the timer has no budget, it returns the special value UnlimitedBudget. - // Remaining is thread-safe - Remaining() time.Duration - - // Exhausted returns true if the timer spent in the timer is greater than the budget. (Spent() > budget) - // Exhausted may return true only in case the time has a budget. If the timer has n, it returns false. - // Exhausted is thread-safe - Exhausted() bool - - // Timed is a convenience function that starts the timer, calls the provided function and stops the timer. - // Timed is panic-safe and will stop the timer even if the function panics. - // Timed is NOT thread-safe - Timed(timedFunc func(timer Timer)) time.Duration -} - -// SumTimer is a sub-interface for timers capable of having children and making the sum of their time spent. -// NewTreeTimer will provide you with a timer supporting this interface -type SumTimer interface { - // SumSpent returns the sum of the time spent in each component of the timer. - // SumSpent is thread-safe - SumSpent() time.Duration - - // SumRemaining returns the sum of the time remaining in each component of the timer. - // SumRemaining returns UnlimitedBudget if the timer has no budget. (UnlimitedBudget) - // SumRemaining is thread-safe - SumRemaining() time.Duration - - // SumExhausted returns true if the sum of the time spent in each component of the timer is greater than the budget. - // SumExhausted returns false if the timer has no budget. (UnlimitedBudget) - // SumExhausted is thread-safe - SumExhausted() bool -} - -// NodeTimer is the interface for tree timers. NewTreeTimer will provide you with a NodeTimer. -// NodeTimer can have children (NodeTimer or Timer) and will compute the sum of their spent time each time a children timer calls its Stop() method. -// To add children to a NodeTimer, you have to specify component names when creating the timer with the WithComponent and WithComponents options. -// The component names must be unique and cannot be empty. The component names are used to identify the children timers. -// The returned timer can now create children timers using the NewNode and NewLeaf functions using the names provided when creating the parent timer. -// Multiple timers from the same component can be used in parallel and will be summed together. -// In parallel to that, NodeTimer can have their own wall time timer and budget that will apply to the sum of their children and their own timer. -// The following functions are the same as the Timer interface but works using the sum of the children timers: -// - SumSpent() -> Spent() -// - SumRemaining() -> Remaining() -// - SumExhausted() -> Exhausted() -// Keep in mind that the timer itself (only Start and Stop) is NOT thread-safe and once Stop() is called, the NodeTimer cannot be restarted. -type NodeTimer interface { - Timer - SumTimer - - // NewNode creates a new NodeTimer with the given name and options. The given name must match one of the component name of the parent timer. - // A node timer is required to have at least one component. If no component is provided, it will return an error asking you to use NewLeaf instead. - // If no budget is provided, it will inherit the budget from its parent when calling Start(). - // NewNode is thread-safe - NewNode(name Key, options ...Option) (NodeTimer, error) - - // NewLeaf creates a new Timer with the given name and options. The given name must match one of the component name of the parent timer. - // A leaf timer is forbidden to have components. If a component is provided, it will return an error asking you to use NewNode instead. - // If no budget is provided, it will inherit the budget from its parent when calling Start(). - // NewLeaf is thread-safe - NewLeaf(name Key, options ...Option) (Timer, error) - - // MustLeaf creates a new Timer with the given name and options. The given name must match one of the component name of the parent timer. - // MustLeaf wraps a call to NewLeaf but will panic if the error is not nil. - // MustLeaf is thread-safe - MustLeaf(name Key, options ...Option) Timer - - // AddTime adds the given duration to the component of the timer with the given name. - // AddTime is thread-safe - AddTime(name Key, duration time.Duration) - - // Stats returns a map of the time spent in each component of the timer. - // Stats is thread-safe - Stats() map[Key]time.Duration - - // childStarted is used to propagate the start of a child timer to the parent timer through the whole tree. - childStarted() - - // childStopped is used to propagate the time spent in a child timer to the parent timer through the whole tree. - childStopped(componentName Key, duration time.Duration) - - // now is a convenience wrapper to swap the time.Now() function for testing and performance purposes. - now() time.Time -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/waf.go b/vendor/github.com/DataDog/go-libddwaf/v4/waf.go deleted file mode 100644 index fe0051287e..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/waf.go +++ /dev/null @@ -1,80 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package libddwaf - -import ( - "errors" - "sync" - - "github.com/DataDog/go-libddwaf/v4/internal/bindings" - "github.com/DataDog/go-libddwaf/v4/internal/support" -) - -// Globally dlopen() libddwaf only once because several dlopens (eg. in tests) -// aren't supported by macOS. -var ( - // libddwaf's dynamic library handle and entrypoints - wafLib *bindings.WAFLib - // libddwaf's dlopen error if any - wafLoadErr error - openWafOnce sync.Once -) - -// Load loads libddwaf's dynamic library. The dynamic library is opened only -// once by the first call to this function and internally stored globally. -// No function is currently provided in this API to unload it. -// -// This function is automatically called by [NewBuilder], and most users need -// not explicitly call it. It is however useful in order to explicitly check -// for the status of the WAF library's initialization. -// -// The function returns true when libddwaf was successfully loaded, along with -// an error value. An error might still be returned even though the WAF load was -// successful: in such cases the error is indicative that some non-critical -// features are not available; but the WAF may still be used. -func Load() (bool, error) { - if ok, err := Usable(); !ok { - return false, err - } - - openWafOnce.Do(func() { - wafLib, wafLoadErr = bindings.NewWAFLib() - if wafLoadErr != nil { - return - } - wafVersion = wafLib.GetVersion() - }) - - return wafLib != nil, wafLoadErr -} - -var wafVersion string - -// Version returns the version returned by libddwaf. -// It relies on the dynamic loading of the library, which can fail and return -// an empty string or the previously loaded version, if any. -func Version() string { - _, _ = Load() - return wafVersion -} - -// Usable returns true if the WAF is usable, false and an error otherwise. -// -// If the WAF is usable, an error value may still be returned and should be -// treated as a warning (it is non-blocking). -// -// The following conditions are checked: -// - The WAF library has been loaded successfully (you need to call [Load] first for this case to be -// taken into account) -// - The WAF library has not been manually disabled with the `datadog.no_waf` go build tag -// - The WAF library is not in an unsupported OS/Arch -// - The WAF library is not in an unsupported Go version -func Usable() (bool, error) { - wafSupportErrors := errors.Join(support.WafSupportErrors()...) - wafManuallyDisabledErr := support.WafManuallyDisabledError() - - return (wafLib != nil || wafLoadErr == nil) && wafSupportErrors == nil && wafManuallyDisabledErr == nil, errors.Join(wafLoadErr, wafSupportErrors, wafManuallyDisabledErr) -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/support.go b/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/support.go deleted file mode 100644 index 37cd2fc6ab..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/support.go +++ /dev/null @@ -1,48 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package waferrors - -import ( - "fmt" - "runtime" -) - -// UnsupportedOSArchError is a wrapper error type helping to handle the error -// case of trying to execute this package when the OS or architecture is not supported. -type UnsupportedOSArchError struct { - OS string - Arch string -} - -func (e UnsupportedOSArchError) Error() string { - return fmt.Sprintf("unsupported OS/Arch: %s/%s", e.OS, e.Arch) -} - -// UnsupportedGoVersionError is a wrapper error type helping to handle the error -// case of trying to execute this package when the Go version is not supported. -type UnsupportedGoVersionError struct{} - -func (e UnsupportedGoVersionError) Error() string { - return fmt.Sprintf( - "unsupported Go version: %s (try running `go get github.com/DataDog/go-libddwaf@latest`)", - runtime.Version(), - ) -} - -type CgoDisabledError struct{} - -func (e CgoDisabledError) Error() string { - return "go-libddwaf is disabled when cgo is disabled unless you compile with the go build tag `appsec`. It will require libdl.so.2. libpthread.so.0 and libc.so.6 shared libraries at run time on linux" -} - -// ManuallyDisabledError is a wrapper error type helping to handle the error -// case of trying to execute this package when the WAF has been manually disabled with -// the `datadog.no_waf` go build tag. -type ManuallyDisabledError struct{} - -func (e ManuallyDisabledError) Error() string { - return "the WAF has been manually disabled using the `datadog.no_waf` go build tag" -} diff --git a/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/waf.go b/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/waf.go deleted file mode 100644 index 34c46c880f..0000000000 --- a/vendor/github.com/DataDog/go-libddwaf/v4/waferrors/waf.go +++ /dev/null @@ -1,108 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License Version 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2016-present Datadog, Inc. - -package waferrors - -import ( - "errors" - "fmt" -) - -var ( - // ErrContextClosed is returned when an operation is attempted on a - // [github.com/DataDog/go-libddwaf/v4.Context] that has already been closed. - ErrContextClosed = errors.New("closed WAF context") - - // ErrMaxDepthExceeded is returned when the WAF encounters a value that - // exceeds the maximum depth. - ErrMaxDepthExceeded = errors.New("max depth exceeded") - // ErrUnsupportedValue is returned when the WAF encounters a value that - // is not supported by the encoder or decoder. - ErrUnsupportedValue = errors.New("unsupported Go value") - // ErrInvalidMapKey is returned when the WAF encounters an invalid map key. - ErrInvalidMapKey = errors.New("invalid WAF object map key") - // ErrNilObjectPtr is returned when the WAF encounters a nil object pointer at - // an unexpected location. - ErrNilObjectPtr = errors.New("nil WAF object pointer") - // ErrInvalidObjectType is returned when the WAF encounters an invalid type - // when decoding a value. - ErrInvalidObjectType = errors.New("invalid type encountered when decoding") - // ErrTooManyIndirections is returned when the WAF encounters a value that - // exceeds the maximum number of indirections (pointer to pointer to...). - ErrTooManyIndirections = errors.New("too many indirections") -) - -// RunError the WAF can return when running it. -type RunError int - -// Errors the WAF can return when running it. -const ( - // ErrInternal denotes a WAF internal error. - ErrInternal RunError = iota + 1 - // ErrInvalidObject is returned when the WAF received an invalid object. - ErrInvalidObject - // ErrInvalidArgument is returned when the WAF received an invalid argument. - ErrInvalidArgument - // ErrTimeout is returned when the WAF ran out of time budget to spend. - ErrTimeout - // ErrOutOfMemory is returned when the WAF ran out of memory when trying to - // allocate a result object. - ErrOutOfMemory - // ErrEmptyRuleAddresses is returned when the WAF received an empty list of - // rule addresses. - ErrEmptyRuleAddresses -) - -var errorStrMap = map[RunError]string{ - ErrInternal: "internal waf error", - ErrInvalidObject: "invalid waf object", - ErrInvalidArgument: "invalid waf argument", - ErrTimeout: "waf timeout", - ErrOutOfMemory: "out of memory", - ErrEmptyRuleAddresses: "empty rule addresses", -} - -// Error returns the string representation of the [RunError]. -func (e RunError) Error() string { - description, ok := errorStrMap[e] - if !ok { - return fmt.Sprintf("unknown waf error %d", e) - } - - return description -} - -// ToWafErrorCode converts an error to a WAF error code, returns zero if the -// error is not a [RunError]. -func ToWafErrorCode(in error) int { - var runError RunError - if !errors.As(in, &runError) { - return 0 - } - return int(runError) -} - -// PanicError is an error type wrapping a recovered panic value that happened -// during a function call. Such error must be considered unrecoverable and be -// used to try to gracefully abort. Keeping using this package after such an -// error is unreliable and the caller must rather stop using the library. -// Examples include safety checks errors. -type PanicError struct { - // The recovered panic error while executing the function `in`. - Err error - // The function symbol name that was given to `tryCall()`. - In string -} - -// Unwrap the error and return it. -// Required by errors.Is and errors.As functions. -func (e *PanicError) Unwrap() error { - return e.Err -} - -// Error returns the error string representation. -func (e *PanicError) Error() string { - return fmt.Sprintf("panic while executing %s: %#+v", e.In, e.Err) -} diff --git a/vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE b/vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/DataDog/go-runtime-metrics-internal/LICENSE-3rdparty.csv b/vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE-3rdparty.csv deleted file mode 100644 index 9e444fcd53..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/LICENSE-3rdparty.csv +++ /dev/null @@ -1,7 +0,0 @@ -Component,Origin,License,Copyright -N/A,github.com/davecgh/go-spew,ISC,Copyright (c) 2012-2016 Dave Collins -N/A,github.com/pmezard/go-difflib,BSD 3-Clause,"Copyright (c) 2013, Patrick Mezard" -N/A,github.com/stretchr/testify,MIT,"Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors." -N/A,gopkg.in/check.v1,BSD-2-Clause,Copyright (c) 2010-2013 Gustavo Niemeyer -N/A,gopkg.in/yaml.v3,MIT,Copyright (c) 2006-2010 Kirill Simonov + Copyright (c) 2006-2011 Kirill Simonov -N/A,gopkg.in/yaml.v3,Apache-2.0,Copyright (c) 2011-2019 Canonical Ltd \ No newline at end of file diff --git a/vendor/github.com/DataDog/go-runtime-metrics-internal/NOTICE b/vendor/github.com/DataDog/go-runtime-metrics-internal/NOTICE deleted file mode 100644 index 702d2b3eaa..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/NOTICE +++ /dev/null @@ -1,4 +0,0 @@ -Datadog go-runtime-metrics-internal -Copyright 2024-2024 Datadog, Inc. - -This product includes software developed at Datadog (). \ No newline at end of file diff --git a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/histogram.go b/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/histogram.go deleted file mode 100644 index 9ae911eea5..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/histogram.go +++ /dev/null @@ -1,195 +0,0 @@ -package runtimemetrics - -import ( - "math" - "runtime/metrics" - "slices" - "sort" -) - -// As of 2023/04, the statsd client does not support sending fully formed -// histograms to the datadog-agent. -// -// These helpers extract the histograms exported by the runtime/metrics -// package into multiple values representing: avg, min, max, median, p95 -// and p99 values of these histograms, so we can submit them as gauges to -// the agent. - -type histogramStats struct { - Avg float64 - Min float64 // aka P0 - Median float64 // aka P50 - P95 float64 - P99 float64 - Max float64 // aka P100 -} - -type distributionSample struct { - Value float64 - Rate float64 -} - -func distributionSamplesFromHist(h *metrics.Float64Histogram, samples []distributionSample) []distributionSample { - for i, count := range h.Counts { - start, end := h.Buckets[i], h.Buckets[i+1] - // Handle edge cases where start or end of buckets could be infinity - if i == 0 && math.IsInf(h.Buckets[0], -1) { - start = end - } - if i == len(h.Counts)-1 && math.IsInf(h.Buckets[len(h.Buckets)-1], 1) { - end = start - } - if start == end && math.IsInf(start, 0) { - // All buckets are empty, return early - return samples - } - - if count == 0 { - // Don't submit empty buckets - continue - } - - sample := distributionSample{ - Value: (start + end) / 2, - Rate: 1 / float64(count), - } - samples = append(samples, sample) - } - return samples -} - -func statsFromHist(h *metrics.Float64Histogram) *histogramStats { - p := percentiles(h, []float64{0, 0.5, 0.95, 0.99, 1}) - return &histogramStats{ - Avg: avg(h), - Min: p[0], - Median: p[1], - P95: p[2], - P99: p[3], - Max: p[4], - } -} - -// Return the difference between both histograms, and whether -// the two histograms are equal -// We assume a and b always have the same lengths for `Counts` and -// `Buckets` slices which is guaranteed by the runtime/metrics -// package: https://go.dev/src/runtime/metrics/histogram.go -func sub(a, b *metrics.Float64Histogram) (*metrics.Float64Histogram, bool) { - equal := true - res := &metrics.Float64Histogram{ - Counts: make([]uint64, len(a.Counts)), - Buckets: make([]float64, len(a.Buckets)), - } - copy(res.Buckets, a.Buckets) - for i := range res.Counts { - count := a.Counts[i] - b.Counts[i] - res.Counts[i] = count - if equal && count != 0 { - equal = false - } - } - return res, equal -} - -func avg(h *metrics.Float64Histogram) float64 { - var total float64 - var cumulative float64 - for i, count := range h.Counts { - start, end := h.Buckets[i], h.Buckets[i+1] - // Handle edge cases where start or end of buckets could be infinity - if i == 0 && math.IsInf(h.Buckets[0], -1) { - start = end - } - if i == len(h.Counts)-1 && math.IsInf(h.Buckets[len(h.Buckets)-1], 1) { - end = start - } - if start == end && math.IsInf(start, 0) { - return 0 - } - cumulative += float64(count) * (float64(start+end) / 2) - total += float64(count) - } - if total == 0 { - return 0 - } - return cumulative / total -} - -// This function takes a runtime/metrics histogram, and a slice of all -// percentiles to compute for that histogram. It computes all percentiles -// in a single pass and returns the results which is more efficient than -// computing each percentile separately. -func percentiles(h *metrics.Float64Histogram, pInput []float64) []float64 { - p := make([]float64, len(pInput)) - copy(p, pInput) - sort.Float64s(p) - - if p[0] < 0.0 || p[len(p)-1] > 1.0 { - panic("percentiles is invoked with a <0 or >1 percentile") - } - - results := make([]float64, len(p)) - - var total float64 // total count across all buckets - for i := range h.Counts { - total += float64(h.Counts[i]) - } - - var cumulative float64 // cumulative count of all buckets we've iterated through - var start, end float64 // start and end of current bucket - i := 0 // index of current bucket - j := 0 // index of the percentile we're currently calculating - - for j < len(p) && i < len(h.Counts) { - start, end = h.Buckets[i], h.Buckets[i+1] - // Avoid interpolating with Inf if our percentile lies in an edge bucket - if i == 0 && math.IsInf(h.Buckets[0], -1) { - start = end - } - if i == len(h.Counts)-1 && math.IsInf(h.Buckets[len(h.Buckets)-1], 1) { - end = start - } - - if start == end && math.IsInf(start, 0) { - return results - } - - // adds the counts of this bucket, to check whether the percentile is in this bucket - bucketCount := float64(h.Counts[i]) - cumulative += bucketCount - - // Skip empty buckets at the beginning of the histogram and as long as we still have - // percentiles to compute, check whether the target percentile falls in this bucket - for (cumulative > 0) && j < len(p) && (cumulative >= total*p[j]) { - // The target percentile is somewhere in the current bucket: [start, end] - // and corresponds to a count in: [cumulative-bucketCount, cumulative] - // We use linear interpolation to estimate the value of the percentile - // within the bucket. - // - // bucketCount - // <---------------------------------> - // percentileCount - // <-------------------> - // |....................@.............| - // ^ ^ ^ - // counts: cumulative-bucketCount | total*p[j] | cumulative - // | | - // buckets: start | percentile | end - // - percentileCount := total*p[j] - (cumulative - bucketCount) - results[j] = start + (end-start)*(percentileCount/bucketCount) // percentile - // we can have multiple percentiles fall in the same bucket, so we check if the - // next percentile falls in this bucket - j++ - } - i++ - } - - orderedResults := make([]float64, len(p)) - for i := range orderedResults { - orderedResults[i] = results[slices.Index(p, pInput[i])] - } - - return orderedResults -} diff --git a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/runtime_metrics.go b/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/runtime_metrics.go deleted file mode 100644 index 8bcee704eb..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/runtime_metrics.go +++ /dev/null @@ -1,461 +0,0 @@ -// Package runtimemetrics exports all runtime/metrics via statsd on a regular interval. -package runtimemetrics - -import ( - "cmp" - "errors" - "fmt" - "log/slog" - "math" - "regexp" - "runtime/metrics" - "strings" - "sync" - "sync/atomic" - "time" -) - -// Options are the options for the runtime metrics emitter. -type Options struct { - // Logger is used to log errors. Defaults to slog.Default() if nil. - Logger *slog.Logger - // Tags are added to all metrics. - Tags []string - // Period is the period at which we poll runtime/metrics and report - // them to statsd. Defaults to 10s. - // - // The statsd client aggregates this data, usually over a 2s window [1], and - // so does the agent, usually over a 10s window [2]. - // - // We submit one data point per aggregation window, using the - // CountWithTimestamp / GaugeWithTimestamp APIs for submitting precisely - // aligned metrics, to enable comparing them with one another. - // - // [1] https://github.com/DataDog/datadog-go/blob/e612112c8bb396b33ad5d9edd645d289b07d0e40/statsd/options.go/#L23 - // [2] https://docs.datadoghq.com/developers/dogstatsd/data_aggregation/#how-is-aggregation-performed-with-the-dogstatsd-server - Period time.Duration - // AllowMultipleInstances is used to allow multiple instances of the runtime - // metrics emitter to be started. This is useful in cases where the - // application is using multiple runtimemetrics.Emitter instances to report - // metrics to different statsd clients. - AllowMultipleInstances bool -} - -// instances is used prevent multiple instances of the runtime metrics emitter -// from being started concurrently by accident. -var instances atomic.Int64 - -// NewEmitter creates a new runtime metrics emitter and starts it. Unless -// AllowMultipleInstances is set to true, it will return an error if an emitter -// has already been started and not stopped yet. This is to prevent -// accidental misconfigurations in larger systems. -func NewEmitter(statsd partialStatsdClientInterface, opts *Options) (*Emitter, error) { - if opts == nil { - opts = &Options{} - } - if n := instances.Add(1); n > 1 && !opts.AllowMultipleInstances { - instances.Add(-1) - return nil, errors.New("runtimemetrics has already been started") - } - e := &Emitter{ - statsd: statsd, - logger: cmp.Or(opts.Logger, slog.Default()), - tags: opts.Tags, - stop: make(chan struct{}), - stopped: make(chan struct{}), - period: cmp.Or(opts.Period, 10*time.Second), - } - go e.emit() - return e, nil -} - -// Emitter submits runtime/metrics to statsd on a regular interval. -type Emitter struct { - statsd partialStatsdClientInterface - logger *slog.Logger - tags []string - period time.Duration - - stop chan struct{} - stopped chan struct{} -} - -// emit emits runtime/metrics to statsd on a regular interval. -func (e *Emitter) emit() { - descs := supportedMetrics() - tags := append(getBaseTags(), e.tags...) - rms := newRuntimeMetricStore(descs, e.statsd, e.logger, tags) - // TODO: Go services experiencing high scheduling latency might see a - // large variance for the period in between rms.report calls. This might - // cause spikes in cumulative metric reporting. Should we try to correct - // for this by measuring the actual reporting time delta to adjust - // the numbers? - // - // Another challenge is that some metrics only update after GC mark - // termination, see [1][2]. This means that it's likely that the rate of - // submission for those metrics will be dependant on the service's workload - // and GC configuration. - // - // [1] https://github.com/golang/go/blob/go1.21.3/src/runtime/mstats.go#L939 - // [2] https://github.com/golang/go/issues/59749 - tick := time.Tick(e.period) - for { - select { - case <-e.stop: - close(e.stopped) - return - case <-tick: - rms.report() - } - } -} - -// Stop stops the emitter. It is idempotent. -func (e *Emitter) Stop() { - select { - case <-e.stop: - <-e.stopped - return - default: - close(e.stop) - <-e.stopped - instances.Add(-1) - } -} - -type runtimeMetric struct { - ddMetricName string - cumulative bool - - currentValue metrics.Value - previousValue metrics.Value -} - -// the map key is the name of the metric in runtime/metrics -type runtimeMetricStore struct { - metrics map[string]*runtimeMetric - statsd partialStatsdClientInterface - logger *slog.Logger - baseTags []string - unknownMetricLogOnce *sync.Once - unsupportedKindLogOnce *sync.Once -} - -// partialStatsdClientInterface is the subset of statsd.ClientInterface that is -// used by this package. -type partialStatsdClientInterface interface { - // Rate is used in the datadog-go statsd library to sample to values sent, - // we should always submit a rate >=1 to ensure our submissions are not sampled. - // The rate is forwarded to the agent but then discarded for gauge metrics. - GaugeWithTimestamp(name string, value float64, tags []string, rate float64, timestamp time.Time) error - CountWithTimestamp(name string, value int64, tags []string, rate float64, timestamp time.Time) error - DistributionSamples(name string, values []float64, tags []string, rate float64) error -} - -func newRuntimeMetricStore(descs []metrics.Description, statsdClient partialStatsdClientInterface, logger *slog.Logger, tags []string) runtimeMetricStore { - rms := runtimeMetricStore{ - metrics: map[string]*runtimeMetric{}, - statsd: statsdClient, - logger: logger, - baseTags: tags, - unknownMetricLogOnce: &sync.Once{}, - unsupportedKindLogOnce: &sync.Once{}, - } - - for _, d := range descs { - cumulative := d.Cumulative - - // /sched/latencies:seconds is incorrectly set as non-cumulative, - // fixed by https://go-review.googlesource.com/c/go/+/486755 - // TODO: Use a build tag to apply this logic to Go versions < 1.20. - if d.Name == "/sched/latencies:seconds" { - cumulative = true - } - - ddMetricName, err := datadogMetricName(d.Name) - if err != nil { - rms.logger.Warn("runtimemetrics: not reporting one of the runtime metrics", slog.Attr{Key: "error", Value: slog.StringValue(err.Error())}) - continue - } - - rms.metrics[d.Name] = &runtimeMetric{ - ddMetricName: ddMetricName, - cumulative: cumulative, - } - } - - rms.update() - - return rms -} - -func (rms runtimeMetricStore) update() { - // TODO: Reuse this slice to avoid allocations? Note: I don't see these - // allocs show up in profiling. - samples := make([]metrics.Sample, len(rms.metrics)) - i := 0 - // NOTE: Map iteration in Go is randomized, so we end up randomizing the - // samples slice. In theory this should not impact correctness, but it's - // worth keeping in mind in case problems are observed in the future. - for name := range rms.metrics { - samples[i].Name = name - i++ - } - metrics.Read(samples) - for _, s := range samples { - runtimeMetric := rms.metrics[s.Name] - - runtimeMetric.previousValue = runtimeMetric.currentValue - runtimeMetric.currentValue = s.Value - } -} - -func (rms runtimeMetricStore) report() { - ts := time.Now() - rms.update() - samples := []distributionSample{} - - rms.statsd.GaugeWithTimestamp(datadogMetricPrefix+"enabled", 1, rms.baseTags, 1, ts) - for name, rm := range rms.metrics { - switch rm.currentValue.Kind() { - case metrics.KindUint64: - v := rm.currentValue.Uint64() - // if the value didn't change between two reporting - // cycles, don't submit anything. this avoids having - // inaccurate drops to zero - // we submit 0 values to be able to distinguish between - // cases where the metric was never reported as opposed - // to the metric always being equal to zero - if rm.cumulative && v != 0 && v == rm.previousValue.Uint64() { - continue - } - - // Some of the Uint64 metrics are actually calculated as a difference by the Go runtime: v = uint64(x - y) - // - // Notably, this means that if x < y, then v will be roughly MaxUint64 (minus epsilon). - // This then shows up as '16 EiB' in Datadog graphs, because MaxUint64 bytes = 2^64 = 2^(4 + 10x6) = 2^4 x (2^10)^6 = 16 x 1024^6 = 16 EiB. - // - // This is known to happen with the '/memory/classes/heap/unused:bytes' metric: https://github.com/golang/go/blob/go1.22.1/src/runtime/metrics.go#L364 - // Until this bug is fixed, we log the problematic value and skip submitting that point to avoid spurious spikes in graphs. - if v > math.MaxUint64/2 { - tags := make([]string, 0, len(rms.baseTags)+1) - tags = append(tags, rms.baseTags...) - tags = append(tags, "metric_name:"+rm.ddMetricName) - rms.statsd.CountWithTimestamp(datadogMetricPrefix+"skipped_values", 1, tags, 1, ts) - - // Some metrics are ~sort of expected to report this high value (e.g. - // "runtime.go.metrics.gc_gogc.percent" will consistently report "MaxUint64 - 1" if - // GOGC is OFF). We only want to log the full heap stats for the not-so-expected - // case of "heap unused bytes". - if name == "/memory/classes/heap/unused:bytes" { - logAttrs := []any{ - slog.Attr{Key: "metric_name", Value: slog.StringValue(rm.ddMetricName)}, - slog.Attr{Key: "timestamp", Value: slog.TimeValue(ts)}, - slog.Attr{Key: "uint64(x-y)", Value: slog.Uint64Value(v)}, - slog.Attr{ - // If v is very close to MaxUint64, it will be hard to read "how negative was x-y", so we compute it here for convenience: - Key: "int64(x-y)", - Value: slog.Int64Value(-int64(math.MaxUint64 - v + 1)), // the '+1' is necessary because if int64(x-y)=-1, then uint64(x-y)=MaxUint64 - }, - } - - // Append all Uint64 values for maximum observability - for name, rm := range rms.metrics { - if rm.currentValue.Kind() == metrics.KindUint64 { - logAttrs = append(logAttrs, slog.Attr{Key: name, Value: slog.Uint64Value(rm.currentValue.Uint64())}) - } - } - - rms.logger.Warn("runtimemetrics: skipped submission of absurd value", logAttrs...) - } - continue - } - - rms.statsd.GaugeWithTimestamp(rm.ddMetricName, float64(v), rms.baseTags, 1, ts) - case metrics.KindFloat64: - v := rm.currentValue.Float64() - // if the value didn't change between two reporting - // cycles, don't submit anything. this avoids having - // inaccurate drops to zero - // we submit 0 values to be able to distinguish between - // cases where the metric was never reported as opposed - // to the metric always being equal to zero - if rm.cumulative && v != 0 && v == rm.previousValue.Float64() { - continue - } - rms.statsd.GaugeWithTimestamp(rm.ddMetricName, v, rms.baseTags, 1, ts) - case metrics.KindFloat64Histogram: - v := rm.currentValue.Float64Histogram() - var equal bool - if rm.cumulative { - // Note: This branch should ALWAYS be taken as of go1.21. - v, equal = sub(v, rm.previousValue.Float64Histogram()) - // if the histogram didn't change between two reporting - // cycles, don't submit anything. this avoids having - // inaccurate drops to zero for percentile metrics - if equal { - continue - } - } - - samples = samples[:0] - distSamples := distributionSamplesFromHist(v, samples) - values := make([]float64, len(distSamples)) - for i, ds := range distSamples { - values[i] = ds.Value - rms.statsd.DistributionSamples(rm.ddMetricName, values[i:i+1], rms.baseTags, ds.Rate) - } - - stats := statsFromHist(v) - // TODO: Could/should we use datadog distribution metrics for this? - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".avg", stats.Avg, rms.baseTags, 1, ts) - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".min", stats.Min, rms.baseTags, 1, ts) - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".max", stats.Max, rms.baseTags, 1, ts) - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".median", stats.Median, rms.baseTags, 1, ts) - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".p95", stats.P95, rms.baseTags, 1, ts) - rms.statsd.GaugeWithTimestamp(rm.ddMetricName+".p99", stats.P99, rms.baseTags, 1, ts) - case metrics.KindBad: - // This should never happen because all metrics are supported - // by construction. - rms.unknownMetricLogOnce.Do(func() { - rms.logger.Error("runtimemetrics: encountered an unknown metric, this should never happen and might indicate a bug", slog.Attr{Key: "metric_name", Value: slog.StringValue(name)}) - }) - default: - // This may happen as new metric kinds get added. - // - // The safest thing to do here is to simply log it somewhere once - // as something to look into, but ignore it for now. - rms.unsupportedKindLogOnce.Do(func() { - rms.logger.Error("runtimemetrics: unsupported metric kind, support for that kind should be added in pkg/runtimemetrics", - slog.Attr{Key: "metric_name", Value: slog.StringValue(name)}, - slog.Attr{Key: "kind", Value: slog.AnyValue(rm.currentValue.Kind())}, - ) - }) - } - } -} - -// regex extracted from https://cs.opensource.google/go/go/+/refs/tags/go1.20.3:src/runtime/metrics/description.go;l=13 -var runtimeMetricRegex = regexp.MustCompile("^(?P/[^:]+):(?P[^:*/]+(?:[*/][^:*/]+)*)$") - -// see https://docs.datadoghq.com/metrics/custom_metrics/#naming-custom-metrics -var datadogMetricRegex = regexp.MustCompile(`[^a-zA-Z0-9\._]`) - -const datadogMetricPrefix = "runtime.go.metrics." - -func datadogMetricName(runtimeName string) (string, error) { - m := runtimeMetricRegex.FindStringSubmatch(runtimeName) - - if len(m) != 3 { - return "", fmt.Errorf("failed to parse metric name for metric %s", runtimeName) - } - - // strip leading "/" - metricPath := strings.TrimPrefix(m[1], "/") - metricUnit := m[2] - - name := datadogMetricRegex.ReplaceAllString(metricPath+"."+metricUnit, "_") - - // Note: This prefix is special. Don't change it without consulting the - // runtime/metrics squad. - return datadogMetricPrefix + name, nil -} - -var startTags struct { - sync.Mutex - tags []string -} - -// Start starts reporting runtime/metrics to the given statsd client. -// -// Deprecated: Use NewEmitter instead. -func Start(statsd partialStatsdClientInterface, logger *slog.Logger) error { - startTags.Lock() - defer startTags.Unlock() - _, err := NewEmitter(statsd, &Options{Logger: logger, Tags: startTags.tags}) - return err -} - -// SetBaseTags sets the base tags that will be added to all metrics when using -// the Start function. -// -// Deprecated: Use NewEmitter with Options.Tags instead. -func SetBaseTags(tags []string) { - startTags.Lock() - defer startTags.Unlock() - startTags.tags = tags -} - -// supportedMetrics returns the list of metrics that are supported. -func supportedMetrics() []metrics.Description { - descs := metrics.All() - supported := make([]metrics.Description, 0, len(supportedMetricsTable)) - for _, d := range descs { - if _, ok := supportedMetricsTable[d.Name]; ok { - supported = append(supported, d) - } - } - return supported -} - -// supportedMetricsTable contains all metrics as of go1.24, except godebug -// metrics to limit cardinality. New metrics are added manually b/c they need -// to be registered in the backend first. -var supportedMetricsTable = map[string]struct{}{ - "/cgo/go-to-c-calls:calls": {}, - "/cpu/classes/gc/mark/assist:cpu-seconds": {}, - "/cpu/classes/gc/mark/dedicated:cpu-seconds": {}, - "/cpu/classes/gc/mark/idle:cpu-seconds": {}, - "/cpu/classes/gc/pause:cpu-seconds": {}, - "/cpu/classes/gc/total:cpu-seconds": {}, - "/cpu/classes/idle:cpu-seconds": {}, - "/cpu/classes/scavenge/assist:cpu-seconds": {}, - "/cpu/classes/scavenge/background:cpu-seconds": {}, - "/cpu/classes/scavenge/total:cpu-seconds": {}, - "/cpu/classes/total:cpu-seconds": {}, - "/cpu/classes/user:cpu-seconds": {}, - "/gc/cycles/automatic:gc-cycles": {}, - "/gc/cycles/forced:gc-cycles": {}, - "/gc/cycles/total:gc-cycles": {}, - "/gc/gogc:percent": {}, - "/gc/gomemlimit:bytes": {}, - "/gc/heap/allocs-by-size:bytes": {}, - "/gc/heap/allocs:bytes": {}, - "/gc/heap/allocs:objects": {}, - "/gc/heap/frees-by-size:bytes": {}, - "/gc/heap/frees:bytes": {}, - "/gc/heap/frees:objects": {}, - "/gc/heap/goal:bytes": {}, - "/gc/heap/live:bytes": {}, - "/gc/heap/objects:objects": {}, - "/gc/heap/tiny/allocs:objects": {}, - "/gc/limiter/last-enabled:gc-cycle": {}, - "/gc/pauses:seconds": {}, - "/gc/scan/globals:bytes": {}, - "/gc/scan/heap:bytes": {}, - "/gc/scan/stack:bytes": {}, - "/gc/scan/total:bytes": {}, - "/gc/stack/starting-size:bytes": {}, - "/memory/classes/heap/free:bytes": {}, - "/memory/classes/heap/objects:bytes": {}, - "/memory/classes/heap/released:bytes": {}, - "/memory/classes/heap/stacks:bytes": {}, - "/memory/classes/heap/unused:bytes": {}, - "/memory/classes/metadata/mcache/free:bytes": {}, - "/memory/classes/metadata/mcache/inuse:bytes": {}, - "/memory/classes/metadata/mspan/free:bytes": {}, - "/memory/classes/metadata/mspan/inuse:bytes": {}, - "/memory/classes/metadata/other:bytes": {}, - "/memory/classes/os-stacks:bytes": {}, - "/memory/classes/other:bytes": {}, - "/memory/classes/profiling/buckets:bytes": {}, - "/memory/classes/total:bytes": {}, - "/sched/gomaxprocs:threads": {}, - "/sched/goroutines:goroutines": {}, - "/sched/latencies:seconds": {}, - "/sched/pauses/stopping/gc:seconds": {}, - "/sched/pauses/stopping/other:seconds": {}, - "/sched/pauses/total/gc:seconds": {}, - "/sched/pauses/total/other:seconds": {}, - "/sync/mutex/wait/total:seconds": {}, -} diff --git a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/tags.go b/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/tags.go deleted file mode 100644 index 9e34094358..0000000000 --- a/vendor/github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics/tags.go +++ /dev/null @@ -1,71 +0,0 @@ -package runtimemetrics - -import ( - "fmt" - "math" - "runtime" - "runtime/metrics" -) - -func getBaseTags() []string { - const gogcMetricName = "/gc/gogc:percent" - const gomemlimitMetricName = "/gc/gomemlimit:bytes" - const gomaxProcsMetricName = "/sched/gomaxprocs:threads" - - samples := []metrics.Sample{ - {Name: gogcMetricName}, - {Name: gomemlimitMetricName}, - {Name: gomaxProcsMetricName}, - } - - baseTags := make([]string, 0, len(samples)+1) - baseTags = append(baseTags, "goversion:"+runtime.Version()) - - metrics.Read(samples) - - for _, s := range samples { - switch s.Name { - case gogcMetricName: - gogc := s.Value.Uint64() - var goGCTagValue string - if gogc == math.MaxUint64 { - goGCTagValue = "off" - } else { - goGCTagValue = fmt.Sprintf("%d", gogc) - } - baseTags = append(baseTags, fmt.Sprintf("gogc:%s", goGCTagValue)) - case gomemlimitMetricName: - gomemlimit := s.Value.Uint64() - var goMemLimitTagValue string - if gomemlimit == math.MaxInt64 { - goMemLimitTagValue = "unlimited" - } else { - // Convert GOMEMLIMIT to a human-readable string with the right byte unit - goMemLimitTagValue = formatByteSize(gomemlimit) - } - baseTags = append(baseTags, fmt.Sprintf("gomemlimit:%s", goMemLimitTagValue)) - case gomaxProcsMetricName: - gomaxprocs := s.Value.Uint64() - baseTags = append(baseTags, fmt.Sprintf("gomaxprocs:%d", gomaxprocs)) - } - } - - return baseTags -} - -// Function to format byte size with the right unit -func formatByteSize(bytes uint64) string { - const ( - unit = 1024 - format = "%.0f %sB" - ) - if bytes < unit { - return fmt.Sprintf(format, float64(bytes), "") - } - div, exp := int64(unit), 0 - for n := bytes / unit; n >= unit; n /= unit { - div *= unit - exp++ - } - return fmt.Sprintf(format, float64(bytes)/float64(div), string("KMGTPE"[exp])+"i") -} diff --git a/vendor/github.com/DataDog/go-sqllexer/.gitignore b/vendor/github.com/DataDog/go-sqllexer/.gitignore deleted file mode 100644 index 0fa6069b7d..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/.gitignore +++ /dev/null @@ -1,27 +0,0 @@ -# If you prefer the allow list template instead of the deny list, see community template: -# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore -# -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -# Go workspace file -go.work - -# Go fuzz test files -testdata/fuzz/ - -# Benchmark files -bench \ No newline at end of file diff --git a/vendor/github.com/DataDog/go-sqllexer/LICENSE b/vendor/github.com/DataDog/go-sqllexer/LICENSE deleted file mode 100644 index fec91553f1..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 Datadog, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/DataDog/go-sqllexer/README.md b/vendor/github.com/DataDog/go-sqllexer/README.md deleted file mode 100644 index dc9c849496..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# go-sqllexer - -This repository contains a hand written SQL Lexer that tokenizes SQL queries with a focus on obfuscating and normalization. The lexer is written in Go with no external dependencies. -**Note** This is NOT a SQL parser, it only tokenizes SQL queries. - -## Features - -- :rocket: Fast and lightweight tokenization (not regex based) -- :lock: Obfuscates sensitive data (e.g. numbers, strings, specific literals like dollar quoted strings in Postgres, etc.) -- :book: Even works with truncated queries -- :globe_with_meridians: UTF-8 support -- :wrench: Normalizes obfuscated queries - -## Installation - -```bash -go get github.com/DataDog/go-sqllexer -``` - -## Usage - -### Tokenize - -```go -import "github.com/DataDog/go-sqllexer" - -func main() { - query := "SELECT * FROM users WHERE id = 1" - lexer := sqllexer.New(query) - for { - token := lexer.Scan() - if token.Type == EOF { - break - } - fmt.Println(token) - } -} -``` - -### Obfuscate - -```go -import ( - "fmt" - "github.com/DataDog/go-sqllexer" -) - -func main() { - query := "SELECT * FROM users WHERE id = 1" - obfuscator := sqllexer.NewObfuscator() - obfuscated := obfuscator.Obfuscate(query) - // "SELECT * FROM users WHERE id = ?" - fmt.Println(obfuscated) -} -``` - -### Normalize - -```go -import ( - "fmt" - "github.com/DataDog/go-sqllexer" -) - -func main() { - query := "SELECT * FROM users WHERE id in (?, ?)" - normalizer := sqllexer.NewNormalizer( - WithCollectComments(true), - WithCollectCommands(true), - WithCollectTables(true), - WithKeepSQLAlias(false), - ) - normalized, statementMetadata, err := normalizer.Normalize(query) - // "SELECT * FROM users WHERE id in (?)" - fmt.Println(normalized) -} -``` - -## Testing - -```bash -go test -v ./... -``` - -## Benchmarks - -```bash -go test -bench=. -benchmem ./... -``` - -## License - -[MIT License](LICENSE) diff --git a/vendor/github.com/DataDog/go-sqllexer/normalizer.go b/vendor/github.com/DataDog/go-sqllexer/normalizer.go deleted file mode 100644 index bb1b3300b3..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/normalizer.go +++ /dev/null @@ -1,405 +0,0 @@ -package sqllexer - -import ( - "fmt" - "strings" -) - -type normalizerConfig struct { - // CollectTables specifies whether the normalizer should also extract the table names that a query addresses - CollectTables bool `json:"collect_tables"` - - // CollectCommands specifies whether the normalizer should extract and return commands as SQL metadata - CollectCommands bool `json:"collect_commands"` - - // CollectComments specifies whether the normalizer should extract and return comments as SQL metadata - CollectComments bool `json:"collect_comments"` - - // CollectProcedure specifies whether the normalizer should extract and return procedure name as SQL metadata - CollectProcedure bool `json:"collect_procedure"` - - // KeepSQLAlias specifies whether SQL aliases ("AS") should be truncated. - KeepSQLAlias bool `json:"keep_sql_alias"` - - // UppercaseKeywords specifies whether SQL keywords should be uppercased. - UppercaseKeywords bool `json:"uppercase_keywords"` - - // RemoveSpaceBetweenParentheses specifies whether spaces should be kept between parentheses. - // Spaces are inserted between parentheses by default. but this can be disabled by setting this to true. - RemoveSpaceBetweenParentheses bool `json:"remove_space_between_parentheses"` - - // KeepTrailingSemicolon specifies whether the normalizer should keep the trailing semicolon. - // The trailing semicolon is removed by default, but this can be disabled by setting this to true. - // PL/SQL requires a trailing semicolon, so this should be set to true when normalizing PL/SQL. - KeepTrailingSemicolon bool `json:"keep_trailing_semicolon"` - - // KeepIdentifierQuotation specifies whether the normalizer should keep the quotation of identifiers. - KeepIdentifierQuotation bool `json:"keep_identifier_quotation"` -} - -type normalizerOption func(*normalizerConfig) - -func WithCollectTables(collectTables bool) normalizerOption { - return func(c *normalizerConfig) { - c.CollectTables = collectTables - } -} - -func WithCollectCommands(collectCommands bool) normalizerOption { - return func(c *normalizerConfig) { - c.CollectCommands = collectCommands - } -} - -func WithCollectComments(collectComments bool) normalizerOption { - return func(c *normalizerConfig) { - c.CollectComments = collectComments - } -} - -func WithKeepSQLAlias(keepSQLAlias bool) normalizerOption { - return func(c *normalizerConfig) { - c.KeepSQLAlias = keepSQLAlias - } -} - -func WithUppercaseKeywords(uppercaseKeywords bool) normalizerOption { - return func(c *normalizerConfig) { - c.UppercaseKeywords = uppercaseKeywords - } -} - -func WithCollectProcedures(collectProcedure bool) normalizerOption { - return func(c *normalizerConfig) { - c.CollectProcedure = collectProcedure - } -} - -func WithRemoveSpaceBetweenParentheses(removeSpaceBetweenParentheses bool) normalizerOption { - return func(c *normalizerConfig) { - c.RemoveSpaceBetweenParentheses = removeSpaceBetweenParentheses - } -} - -func WithKeepTrailingSemicolon(keepTrailingSemicolon bool) normalizerOption { - return func(c *normalizerConfig) { - c.KeepTrailingSemicolon = keepTrailingSemicolon - } -} - -func WithKeepIdentifierQuotation(keepIdentifierQuotation bool) normalizerOption { - return func(c *normalizerConfig) { - c.KeepIdentifierQuotation = keepIdentifierQuotation - } -} - -type StatementMetadata struct { - Size int `json:"size"` - Tables []string `json:"tables"` - Comments []string `json:"comments"` - Commands []string `json:"commands"` - Procedures []string `json:"procedures"` -} - -type metadataSet struct { - size int - tablesSet map[string]struct{} - commentsSet map[string]struct{} - commandsSet map[string]struct{} - proceduresSet map[string]struct{} -} - -// addMetadata adds a value to a metadata slice if it doesn't exist in the set -func (m *metadataSet) addMetadata(value string, set map[string]struct{}, slice *[]string) { - if _, exists := set[value]; !exists { - set[value] = struct{}{} - *slice = append(*slice, value) - m.size += len(value) - } -} - -type groupablePlaceholder struct { - groupable bool -} - -type headState struct { - readFirstNonSpaceNonComment bool - inLeadingParenthesesExpression bool - foundLeadingExpressionInParentheses bool - standaloneExpressionInParentheses bool - expressionInParentheses strings.Builder -} - -type Normalizer struct { - config *normalizerConfig -} - -func NewNormalizer(opts ...normalizerOption) *Normalizer { - normalizer := Normalizer{ - config: &normalizerConfig{}, - } - - for _, opt := range opts { - opt(normalizer.config) - } - - return &normalizer -} - -// normalizeToken is a helper function that handles the common normalization logic -func (n *Normalizer) normalizeToken(lexer *Lexer, normalizedSQLBuilder *strings.Builder, meta *metadataSet, statementMetadata *StatementMetadata, preProcessToken func(*Token, *LastValueToken), lexerOpts ...lexerOption) (err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("error normalizing SQL token: %v", r) - } - }() - - var groupablePlaceholder groupablePlaceholder - var headState headState - var ctes map[string]bool - - // Only allocate CTEs map if collecting tables - if n.config.CollectTables { - ctes = make(map[string]bool, 2) - } - - var lastValueToken *LastValueToken - - for { - token := lexer.Scan() - if preProcessToken != nil { - // pre-process the token, often used for obfuscation - preProcessToken(token, lastValueToken) - } - if n.shouldCollectMetadata() { - n.collectMetadata(token, lastValueToken, meta, statementMetadata, ctes) - } - n.normalizeSQL(token, lastValueToken, normalizedSQLBuilder, &groupablePlaceholder, &headState, lexerOpts...) - if token.Type == EOF { - break - } - if isValueToken(token) { - lastValueToken = token.getLastValueToken() - } - } - - return nil -} - -func (n *Normalizer) Normalize(input string, lexerOpts ...lexerOption) (normalizedSQL string, statementMetadata *StatementMetadata, err error) { - lexer := New(input, lexerOpts...) - var normalizedSQLBuilder strings.Builder - normalizedSQLBuilder.Grow(len(input)) - - meta := &metadataSet{ - tablesSet: map[string]struct{}{}, - commentsSet: map[string]struct{}{}, - commandsSet: map[string]struct{}{}, - proceduresSet: map[string]struct{}{}, - } - - statementMetadata = &StatementMetadata{ - Tables: []string{}, - Comments: []string{}, - Commands: []string{}, - Procedures: []string{}, - } - - if err = n.normalizeToken(lexer, &normalizedSQLBuilder, meta, statementMetadata, nil, lexerOpts...); err != nil { - return "", nil, err - } - - normalizedSQL = normalizedSQLBuilder.String() - statementMetadata.Size = meta.size - return n.trimNormalizedSQL(normalizedSQL), statementMetadata, nil -} - -func (n *Normalizer) shouldCollectMetadata() bool { - return n.config.CollectTables || n.config.CollectCommands || n.config.CollectComments || n.config.CollectProcedure -} - -func (n *Normalizer) collectMetadata(token *Token, lastValueToken *LastValueToken, meta *metadataSet, statementMetadata *StatementMetadata, ctes map[string]bool) { - if n.config.CollectComments && (token.Type == COMMENT || token.Type == MULTILINE_COMMENT) { - comment := token.Value - meta.addMetadata(comment, meta.commentsSet, &statementMetadata.Comments) - } else if token.Type == COMMAND { - if n.config.CollectCommands { - command := strings.ToUpper(token.Value) - meta.addMetadata(command, meta.commandsSet, &statementMetadata.Commands) - } - } else if token.Type == IDENT || token.Type == QUOTED_IDENT || token.Type == FUNCTION { - tokenVal := token.Value - if token.Type == QUOTED_IDENT { - tokenVal = trimQuotes(token) - if !n.config.KeepIdentifierQuotation { - // trim quotes and set the token type to IDENT - token.Value = tokenVal - token.Type = IDENT - } - } - if lastValueToken != nil && lastValueToken.Type == CTE_INDICATOR { - ctes[tokenVal] = true - } else if n.config.CollectTables && lastValueToken != nil && lastValueToken.isTableIndicator { - if _, ok := ctes[tokenVal]; !ok { - meta.addMetadata(tokenVal, meta.tablesSet, &statementMetadata.Tables) - } - } else if n.config.CollectProcedure && lastValueToken != nil && lastValueToken.Type == PROC_INDICATOR { - meta.addMetadata(tokenVal, meta.proceduresSet, &statementMetadata.Procedures) - } - } -} - -func (n *Normalizer) normalizeSQL(token *Token, lastValueToken *LastValueToken, normalizedSQLBuilder *strings.Builder, groupablePlaceholder *groupablePlaceholder, headState *headState, lexerOpts ...lexerOption) { - if token.Type != SPACE && token.Type != COMMENT && token.Type != MULTILINE_COMMENT { - if token.Type == QUOTED_IDENT && !n.config.KeepIdentifierQuotation { - token.Value = trimQuotes(token) - } - - // handle leading expression in parentheses - if !headState.readFirstNonSpaceNonComment { - headState.readFirstNonSpaceNonComment = true - if token.Type == PUNCTUATION && token.Value == "(" { - headState.inLeadingParenthesesExpression = true - headState.standaloneExpressionInParentheses = true - } - } - if token.Type == EOF { - if headState.standaloneExpressionInParentheses { - normalizedSQLBuilder.WriteString(headState.expressionInParentheses.String()) - } - return - } else if headState.foundLeadingExpressionInParentheses { - headState.standaloneExpressionInParentheses = false - } - - if token.Type == DOLLAR_QUOTED_FUNCTION && token.Value != StringPlaceholder { - // if the token is a dollar quoted function and it is not obfuscated, - // we need to recusively normalize the content of the dollar quoted function - quotedFunc := token.Value[6 : len(token.Value)-6] // remove the $func$ prefix and suffix - normalizedQuotedFunc, _, err := n.Normalize(quotedFunc) - if err == nil { - // replace the content of the dollar quoted function with the normalized content - // if there is an error, we just keep the original content - var normalizedDollarQuotedFunc strings.Builder - normalizedDollarQuotedFunc.Grow(len(normalizedQuotedFunc) + 12) - normalizedDollarQuotedFunc.WriteString("$func$") - normalizedDollarQuotedFunc.WriteString(normalizedQuotedFunc) - normalizedDollarQuotedFunc.WriteString("$func$") - token.Value = normalizedDollarQuotedFunc.String() - } - } - - if !n.config.KeepSQLAlias { - // discard SQL alias - if token.Type == ALIAS_INDICATOR { - return - } - - if lastValueToken != nil && lastValueToken.Type == ALIAS_INDICATOR { - if token.Type == IDENT || token.Type == QUOTED_IDENT { - return - } else { - // if the last token is AS and the current token is not IDENT, - // this could be a CTE like WITH ... AS (...), - // so we do not discard the current token - n.appendSpace(token, lastValueToken, normalizedSQLBuilder) - n.writeToken(lastValueToken.Type, lastValueToken.Value, normalizedSQLBuilder) - } - } - } - - // group consecutive obfuscated values into single placeholder - if n.isObfuscatedValueGroupable(token, lastValueToken, groupablePlaceholder, normalizedSQLBuilder) { - // return the token but not write it to the normalizedSQLBuilder - return - } - - if headState.inLeadingParenthesesExpression { - n.appendSpace(token, lastValueToken, &headState.expressionInParentheses) - n.writeToken(token.Type, token.Value, &headState.expressionInParentheses) - if token.Type == PUNCTUATION && token.Value == ")" { - headState.inLeadingParenthesesExpression = false - headState.foundLeadingExpressionInParentheses = true - } - } else { - n.appendSpace(token, lastValueToken, normalizedSQLBuilder) - n.writeToken(token.Type, token.Value, normalizedSQLBuilder) - } - } -} - -func (n *Normalizer) writeToken(tokenType TokenType, tokenValue string, normalizedSQLBuilder *strings.Builder) { - if n.config.UppercaseKeywords && (tokenType == COMMAND || tokenType == KEYWORD) { - normalizedSQLBuilder.WriteString(strings.ToUpper(tokenValue)) - } else { - normalizedSQLBuilder.WriteString(tokenValue) - } -} - -func (n *Normalizer) isObfuscatedValueGroupable(token *Token, lastValueToken *LastValueToken, groupablePlaceholder *groupablePlaceholder, normalizedSQLBuilder *strings.Builder) bool { - if token.Value == NumberPlaceholder || token.Value == StringPlaceholder { - if lastValueToken == nil { - // if the last token is nil, we know it's the start of groupable placeholders - return false - } - if lastValueToken.Value == "(" || lastValueToken.Value == "[" { - // if the last token is "(" or "[", and the current token is a placeholder, - // we know it's the start of groupable placeholders - // we don't return here because we still need to write the first placeholder - groupablePlaceholder.groupable = true - } else if lastValueToken.Value == "," && groupablePlaceholder.groupable { - return true - } - } - - if lastValueToken != nil && (lastValueToken.Value == NumberPlaceholder || lastValueToken.Value == StringPlaceholder) && token.Value == "," && groupablePlaceholder.groupable { - return true - } - - if groupablePlaceholder.groupable && (token.Value == ")" || token.Value == "]") { - // end of groupable placeholders - groupablePlaceholder.groupable = false - return false - } - - if groupablePlaceholder.groupable && token.Value != NumberPlaceholder && token.Value != StringPlaceholder && lastValueToken != nil && lastValueToken.Value == "," { - // This is a tricky edge case. If we are inside a groupbale block, and the current token is not a placeholder, - // we not only want to write the current token to the normalizedSQLBuilder, but also write the last comma that we skipped. - // For example, (?, ARRAY[?, ?, ?]) should be normalized as (?, ARRAY[?]) - normalizedSQLBuilder.WriteString(lastValueToken.Value) - return false - } - - return false -} - -func (n *Normalizer) appendSpace(token *Token, lastValueToken *LastValueToken, normalizedSQLBuilder *strings.Builder) { - // do not add a space between parentheses if RemoveSpaceBetweenParentheses is true - if n.config.RemoveSpaceBetweenParentheses && lastValueToken != nil && (lastValueToken.Type == FUNCTION || lastValueToken.Value == "(" || lastValueToken.Value == "[") { - return - } - - if n.config.RemoveSpaceBetweenParentheses && (token.Value == ")" || token.Value == "]") { - return - } - - switch token.Value { - case ",", ";": - return - case "=": - if lastValueToken != nil && lastValueToken.Value == ":" { - return - } - fallthrough - default: - normalizedSQLBuilder.WriteString(" ") - } -} - -func (n *Normalizer) trimNormalizedSQL(normalizedSQL string) string { - if !n.config.KeepTrailingSemicolon { - // Remove trailing semicolon - normalizedSQL = strings.TrimSuffix(normalizedSQL, ";") - } - return strings.TrimSpace(normalizedSQL) -} diff --git a/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go b/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go deleted file mode 100644 index 377457b2ae..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/obfuscate_and_normalize.go +++ /dev/null @@ -1,38 +0,0 @@ -package sqllexer - -import "strings" - -// ObfuscateAndNormalize takes an input SQL string and returns an normalized SQL string with metadata -// This function is a convenience function that combines the Obfuscator and Normalizer in one pass -func ObfuscateAndNormalize(input string, obfuscator *Obfuscator, normalizer *Normalizer, lexerOpts ...lexerOption) (normalizedSQL string, statementMetadata *StatementMetadata, err error) { - lexer := New(input, lexerOpts...) - var normalizedSQLBuilder strings.Builder - normalizedSQLBuilder.Grow(len(input)) - - meta := &metadataSet{ - tablesSet: map[string]struct{}{}, - commentsSet: map[string]struct{}{}, - commandsSet: map[string]struct{}{}, - proceduresSet: map[string]struct{}{}, - } - - statementMetadata = &StatementMetadata{ - Tables: []string{}, - Comments: []string{}, - Commands: []string{}, - Procedures: []string{}, - } - - obfuscate := func(token *Token, lastValueToken *LastValueToken) { - obfuscator.ObfuscateTokenValue(token, lastValueToken, lexerOpts...) - } - - // Pass obfuscation as the pre-process step - if err = normalizer.normalizeToken(lexer, &normalizedSQLBuilder, meta, statementMetadata, obfuscate, lexerOpts...); err != nil { - return "", nil, err - } - - normalizedSQL = normalizedSQLBuilder.String() - statementMetadata.Size = meta.size - return normalizer.trimNormalizedSQL(normalizedSQL), statementMetadata, nil -} diff --git a/vendor/github.com/DataDog/go-sqllexer/obfuscator.go b/vendor/github.com/DataDog/go-sqllexer/obfuscator.go deleted file mode 100644 index 07c77de2e7..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/obfuscator.go +++ /dev/null @@ -1,156 +0,0 @@ -package sqllexer - -import ( - "strings" -) - -type obfuscatorConfig struct { - DollarQuotedFunc bool `json:"dollar_quoted_func"` - ReplaceDigits bool `json:"replace_digits"` - ReplacePositionalParameter bool `json:"replace_positional_parameter"` - ReplaceBoolean bool `json:"replace_boolean"` - ReplaceNull bool `json:"replace_null"` - KeepJsonPath bool `json:"keep_json_path"` // by default, we replace json path with placeholder - ReplaceBindParameter bool `json:"replace_bind_parameter"` -} - -type obfuscatorOption func(*obfuscatorConfig) - -func WithReplaceDigits(replaceDigits bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.ReplaceDigits = replaceDigits - } -} - -func WithReplacePositionalParameter(replacePositionalParameter bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.ReplacePositionalParameter = replacePositionalParameter - } -} - -func WithReplaceBoolean(replaceBoolean bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.ReplaceBoolean = replaceBoolean - } -} - -func WithReplaceNull(replaceNull bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.ReplaceNull = replaceNull - } -} - -func WithDollarQuotedFunc(dollarQuotedFunc bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.DollarQuotedFunc = dollarQuotedFunc - } -} - -func WithKeepJsonPath(keepJsonPath bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.KeepJsonPath = keepJsonPath - } -} - -func WithReplaceBindParameter(replaceBindParameter bool) obfuscatorOption { - return func(c *obfuscatorConfig) { - c.ReplaceBindParameter = replaceBindParameter - } -} - -type Obfuscator struct { - config *obfuscatorConfig -} - -func NewObfuscator(opts ...obfuscatorOption) *Obfuscator { - obfuscator := &Obfuscator{ - config: &obfuscatorConfig{}, - } - - for _, opt := range opts { - opt(obfuscator.config) - } - - return obfuscator -} - -const ( - StringPlaceholder = "?" - NumberPlaceholder = "?" -) - -// Obfuscate takes an input SQL string and returns an obfuscated SQL string. -// The obfuscator replaces all literal values with a single placeholder -func (o *Obfuscator) Obfuscate(input string, lexerOpts ...lexerOption) string { - var obfuscatedSQL strings.Builder - obfuscatedSQL.Grow(len(input)) - - lexer := New( - input, - lexerOpts..., - ) - - var lastValueToken *LastValueToken - - for { - token := lexer.Scan() - if token.Type == EOF { - break - } - o.ObfuscateTokenValue(token, lastValueToken, lexerOpts...) - obfuscatedSQL.WriteString(token.Value) - if isValueToken(token) { - lastValueToken = token.getLastValueToken() - } - } - - return strings.TrimSpace(obfuscatedSQL.String()) -} - -func (o *Obfuscator) ObfuscateTokenValue(token *Token, lastValueToken *LastValueToken, lexerOpts ...lexerOption) { - switch token.Type { - case NUMBER: - if o.config.KeepJsonPath && lastValueToken != nil && lastValueToken.Type == JSON_OP { - break - } - token.Value = NumberPlaceholder - case DOLLAR_QUOTED_FUNCTION: - if o.config.DollarQuotedFunc { - // obfuscate the content of dollar quoted function - quotedFunc := token.Value[6 : len(token.Value)-6] // remove the $func$ prefix and suffix - var obfuscatedDollarQuotedFunc strings.Builder - obfuscatedDollarQuotedFunc.Grow(len(quotedFunc) + 12) - obfuscatedDollarQuotedFunc.WriteString("$func$") - obfuscatedDollarQuotedFunc.WriteString(o.Obfuscate(quotedFunc, lexerOpts...)) - obfuscatedDollarQuotedFunc.WriteString("$func$") - token.Value = obfuscatedDollarQuotedFunc.String() - break - } - token.Value = StringPlaceholder - case STRING, INCOMPLETE_STRING, DOLLAR_QUOTED_STRING: - if o.config.KeepJsonPath && lastValueToken != nil && lastValueToken.Type == JSON_OP { - break - } - token.Value = StringPlaceholder - case POSITIONAL_PARAMETER: - if o.config.ReplacePositionalParameter { - token.Value = StringPlaceholder - } - case BIND_PARAMETER: - if o.config.ReplaceBindParameter { - token.Value = StringPlaceholder - } - case BOOLEAN: - if o.config.ReplaceBoolean { - token.Value = StringPlaceholder - } - case NULL: - if o.config.ReplaceNull { - token.Value = StringPlaceholder - } - case IDENT, QUOTED_IDENT: - if o.config.ReplaceDigits && token.hasDigits { - token.Value = replaceDigits(token, NumberPlaceholder) - } - } -} diff --git a/vendor/github.com/DataDog/go-sqllexer/sqllexer.go b/vendor/github.com/DataDog/go-sqllexer/sqllexer.go deleted file mode 100644 index e16fe80354..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/sqllexer.go +++ /dev/null @@ -1,637 +0,0 @@ -package sqllexer - -import ( - "unicode/utf8" -) - -type TokenType int - -const ( - ERROR TokenType = iota - EOF - SPACE // space or newline - STRING // string literal - INCOMPLETE_STRING // incomplete string literal so that we can obfuscate it, e.g. 'abc - NUMBER // number literal - IDENT // identifier - QUOTED_IDENT // quoted identifier - OPERATOR // operator - WILDCARD // wildcard * - COMMENT // comment - MULTILINE_COMMENT // multiline comment - PUNCTUATION // punctuation - DOLLAR_QUOTED_FUNCTION // dollar quoted function - DOLLAR_QUOTED_STRING // dollar quoted string - POSITIONAL_PARAMETER // numbered parameter - BIND_PARAMETER // bind parameter - FUNCTION // function - SYSTEM_VARIABLE // system variable - UNKNOWN // unknown token - COMMAND // SQL commands like SELECT, INSERT - KEYWORD // Other SQL keywords - JSON_OP // JSON operators - BOOLEAN // boolean literal - NULL // null literal - PROC_INDICATOR // procedure indicator - CTE_INDICATOR // CTE indicator - ALIAS_INDICATOR // alias indicator -) - -// Token represents a SQL token with its type and value. -type Token struct { - Type TokenType - Value string - isTableIndicator bool // true if the token is a table indicator - hasDigits bool - hasQuotes bool // private - only used by trimQuotes - lastValueToken LastValueToken // private - internal state -} - -type LastValueToken struct { - Type TokenType - Value string - isTableIndicator bool -} - -// getLastValueToken can be private since it's only used internally -func (t *Token) getLastValueToken() *LastValueToken { - t.lastValueToken.Type = t.Type - t.lastValueToken.Value = t.Value - t.lastValueToken.isTableIndicator = t.isTableIndicator - return &t.lastValueToken -} - -type LexerConfig struct { - DBMS DBMSType `json:"dbms,omitempty"` -} - -type lexerOption func(*LexerConfig) - -func WithDBMS(dbms DBMSType) lexerOption { - dbms = getDBMSFromAlias(dbms) - return func(c *LexerConfig) { - c.DBMS = dbms - } -} - -type trieNode struct { - children map[rune]*trieNode - isEnd bool - tokenType TokenType - isTableIndicator bool -} - -// SQL Lexer inspired from Rob Pike's talk on Lexical Scanning in Go -type Lexer struct { - src string // the input src string - cursor int // the current position of the cursor - start int // the start position of the current token - config *LexerConfig - token *Token - hasQuotes bool // true if any quotes in token - hasDigits bool // true if the token has digits - isTableIndicator bool // true if the token is a table indicator -} - -func New(input string, opts ...lexerOption) *Lexer { - lexer := &Lexer{ - src: input, - config: &LexerConfig{}, - token: &Token{}, - } - for _, opt := range opts { - opt(lexer.config) - } - return lexer -} - -// Scan scans the next token and returns it. -func (s *Lexer) Scan() *Token { - ch := s.peek() - switch { - case isSpace(ch): - return s.scanWhitespace() - case isLetter(ch): - return s.scanIdentifier(ch) - case isDoubleQuote(ch): - return s.scanDoubleQuotedIdentifier('"') - case isSingleQuote(ch): - return s.scanString() - case isSingleLineComment(ch, s.lookAhead(1)): - return s.scanSingleLineComment(ch) - case isMultiLineComment(ch, s.lookAhead(1)): - return s.scanMultiLineComment() - case isLeadingSign(ch): - // if the leading sign is followed by a digit, then it's a number - // although this is not strictly true, it's good enough for our purposes - nextCh := s.lookAhead(1) - if isDigit(nextCh) || nextCh == '.' { - return s.scanNumberWithLeadingSign() - } - return s.scanOperator(ch) - case isDigit(ch): - return s.scanNumber(ch) - case isWildcard(ch): - return s.scanWildcard() - case ch == '$': - if isDigit(s.lookAhead(1)) { - // if the dollar sign is followed by a digit, then it's a numbered parameter - return s.scanPositionalParameter() - } - if s.config.DBMS == DBMSSQLServer && isLetter(s.lookAhead(1)) { - return s.scanIdentifier(ch) - } - return s.scanDollarQuotedString() - case ch == ':': - if s.config.DBMS == DBMSOracle && isAlphaNumeric(s.lookAhead(1)) { - return s.scanBindParameter() - } - return s.scanOperator(ch) - case ch == '`': - if s.config.DBMS == DBMSMySQL { - return s.scanDoubleQuotedIdentifier('`') - } - return s.scanUnknown() // backtick is only valid in mysql - case ch == '#': - if s.config.DBMS == DBMSSQLServer { - return s.scanIdentifier(ch) - } else if s.config.DBMS == DBMSMySQL { - // MySQL treats # as a comment - return s.scanSingleLineComment(ch) - } - return s.scanOperator(ch) - case ch == '@': - if s.lookAhead(1) == '@' { - if isAlphaNumeric(s.lookAhead(2)) { - return s.scanSystemVariable() - } - s.start = s.cursor - s.nextBy(2) // consume @@ - return s.emit(JSON_OP) - } - if isAlphaNumeric(s.lookAhead(1)) { - if s.config.DBMS == DBMSSnowflake { - return s.scanIdentifier(ch) - } - return s.scanBindParameter() - } - if s.lookAhead(1) == '?' || s.lookAhead(1) == '>' { - s.start = s.cursor - s.nextBy(2) // consume @? or @> - return s.emit(JSON_OP) - } - fallthrough - case isOperator(ch): - return s.scanOperator(ch) - case isPunctuation(ch): - if ch == '[' && s.config.DBMS == DBMSSQLServer { - return s.scanDoubleQuotedIdentifier('[') - } - return s.scanPunctuation() - case isEOF(ch): - return s.emit(EOF) - default: - return s.scanUnknown() - } -} - -// lookAhead returns the rune n positions ahead of the cursor. -func (s *Lexer) lookAhead(n int) rune { - pos := s.cursor + n - if pos >= len(s.src) || pos < 0 { - return 0 - } - // Fast path for ASCII - b := s.src[pos] - if b < utf8.RuneSelf { - return rune(b) - } - // Slow path for non-ASCII - r, _ := utf8.DecodeRuneInString(s.src[pos:]) - return r -} - -// peek returns the rune at the cursor position. -func (s *Lexer) peek() rune { - return s.lookAhead(0) -} - -// nextBy advances the cursor by n positions and returns the rune at the cursor position. -func (s *Lexer) nextBy(n int) rune { - // advance the cursor by n and return the rune at the cursor position - if s.cursor+n > len(s.src) { - return 0 - } - s.cursor += n - if s.cursor >= len(s.src) { - return 0 - } - // Fast path for ASCII - b := s.src[s.cursor] - if b < utf8.RuneSelf { - return rune(b) - } - // Slow path for non-ASCII - r, _ := utf8.DecodeRuneInString(s.src[s.cursor:]) - return r -} - -// next advances the cursor by 1 position and returns the rune at the cursor position. -func (s *Lexer) next() rune { - return s.nextBy(1) -} - -func (s *Lexer) matchAt(match []rune) bool { - if s.cursor+len(match) > len(s.src) { - return false - } - for i, ch := range match { - if s.src[s.cursor+i] != byte(ch) { - return false - } - } - return true -} - -func (s *Lexer) scanNumberWithLeadingSign() *Token { - s.start = s.cursor - ch := s.next() // consume the leading sign - return s.scanDecimalNumber(ch) -} - -func (s *Lexer) scanNumber(ch rune) *Token { - s.start = s.cursor - return s.scanNumberic(ch) -} - -func (s *Lexer) scanNumberic(ch rune) *Token { - s.start = s.cursor - if ch == '0' { - nextCh := s.lookAhead(1) - if nextCh == 'x' || nextCh == 'X' { - return s.scanHexNumber() - } else if nextCh >= '0' && nextCh <= '7' { - return s.scanOctalNumber() - } - } - - ch = s.next() // consume first digit - return s.scanDecimalNumber(ch) -} - -func (s *Lexer) scanDecimalNumber(ch rune) *Token { - // scan digits - for isDigit(ch) || ch == '.' || isExpontent(ch) { - if isExpontent(ch) { - ch = s.next() - if isLeadingSign(ch) { - ch = s.next() - } - } else { - ch = s.next() - } - } - return s.emit(NUMBER) -} - -func (s *Lexer) scanHexNumber() *Token { - ch := s.nextBy(2) // consume 0x or 0X - - for isDigit(ch) || ('a' <= ch && ch <= 'f') || ('A' <= ch && ch <= 'F') { - ch = s.next() - } - return s.emit(NUMBER) -} - -func (s *Lexer) scanOctalNumber() *Token { - ch := s.nextBy(2) // consume the leading 0 and number - - for '0' <= ch && ch <= '7' { - ch = s.next() - } - return s.emit(NUMBER) -} - -func (s *Lexer) scanString() *Token { - s.start = s.cursor - escaped := false - escapedQuote := false - - ch := s.next() // consume opening quote - - for ; !isEOF(ch); ch = s.next() { - if escaped { - escaped = false - escapedQuote = ch == '\'' - continue - } - - if ch == '\\' { - escaped = true - continue - } - - if ch == '\'' { - s.next() // consume the closing quote - return s.emit(STRING) - } - } - // Special case: if we ended with an escaped quote (e.g. ESCAPE '\') - if escapedQuote { - return s.emit(STRING) - } - // If we get here, we hit EOF before finding closing quote - return s.emit(INCOMPLETE_STRING) -} - -func (s *Lexer) scanIdentifier(ch rune) *Token { - s.start = s.cursor - node := keywordRoot - pos := s.cursor - - // If first character is Unicode, skip trie lookup - if ch > 127 { - for isIdentifier(ch) { - s.hasDigits = s.hasDigits || isDigit(ch) - ch = s.nextBy(utf8.RuneLen(ch)) - } - if s.start == s.cursor { - return s.scanUnknown() - } - return s.emit(IDENT) - } - - // ASCII characters - try keyword matching - for isAsciiLetter(ch) || ch == '_' { - // Convert to uppercase for case-insensitive matching - upperCh := ch - if ch >= 'a' && ch <= 'z' { - upperCh -= 32 - } - - // Try to follow trie path - if next, exists := node.children[upperCh]; exists { - node = next - pos = s.cursor - ch = s.next() - } else { - // No more matches possible in trie - // Reset node for next potential keyword - // and continue scanning identifier - node = keywordRoot - ch = s.next() - break - } - } - - // If we found a complete keyword and next char is whitespace - if node.isEnd && (isPunctuation(ch) || isSpace(ch) || isEOF(ch)) { - s.cursor = pos + 1 // Include the last matched character - s.isTableIndicator = node.isTableIndicator - return s.emit(node.tokenType) - } - - // Continue scanning identifier if no keyword match - for isIdentifier(ch) { - s.hasDigits = s.hasDigits || isDigit(ch) - ch = s.nextBy(utf8.RuneLen(ch)) - } - - if s.start == s.cursor { - return s.scanUnknown() - } - - if ch == '(' { - return s.emit(FUNCTION) - } - return s.emit(IDENT) -} - -func (s *Lexer) scanDoubleQuotedIdentifier(delimiter rune) *Token { - closingDelimiter := delimiter - if delimiter == '[' { - closingDelimiter = ']' - } - - s.start = s.cursor - s.hasQuotes = true - ch := s.next() // consume the opening quote - for { - // encountered the closing quote - // BUT if it's followed by .", then we should keep going - // e.g. postgres "foo"."bar" - // e.g. sqlserver [foo].[bar] - if ch == closingDelimiter { - specialCase := []rune{closingDelimiter, '.', delimiter} - if s.matchAt([]rune(specialCase)) { - ch = s.nextBy(3) // consume the "." - continue - } - break - } - if isEOF(ch) { - s.hasQuotes = false // if we hit EOF, we clear the quotes - return s.emit(ERROR) - } - s.hasDigits = s.hasDigits || isDigit(ch) - ch = s.next() - } - s.next() // consume the closing quote - return s.emit(QUOTED_IDENT) -} - -func (s *Lexer) scanWhitespace() *Token { - // scan whitespace, tab, newline, carriage return - s.start = s.cursor - ch := s.next() - for isSpace(ch) { - ch = s.next() - } - return s.emit(SPACE) -} - -func (s *Lexer) scanOperator(lastCh rune) *Token { - s.start = s.cursor - ch := s.next() // consume the first character - - // Check for json operators - switch lastCh { - case '-': - if ch == '>' { - ch = s.next() - if ch == '>' { - s.next() - return s.emit(JSON_OP) // ->> - } - return s.emit(JSON_OP) // -> - } - case '#': - if ch == '>' { - ch = s.next() - if ch == '>' { - s.next() - return s.emit(JSON_OP) // #>> - } - return s.emit(JSON_OP) // #> - } else if ch == '-' { - s.next() - return s.emit(JSON_OP) // #- - } - case '?': - if ch == '|' { - s.next() - return s.emit(JSON_OP) // ?| - } else if ch == '&' { - s.next() - return s.emit(JSON_OP) // ?& - } - case '<': - if ch == '@' { - s.next() - return s.emit(JSON_OP) // <@ - } - } - - for isOperator(ch) && !(lastCh == '=' && (ch == '?' || ch == '@')) { - // hack: we don't want to treat "=?" as an single operator - lastCh = ch - ch = s.next() - } - - return s.emit(OPERATOR) -} - -func (s *Lexer) scanWildcard() *Token { - s.start = s.cursor - s.next() - return s.emit(WILDCARD) -} - -func (s *Lexer) scanSingleLineComment(ch rune) *Token { - s.start = s.cursor - if ch == '#' { - ch = s.next() // consume the opening # - } else { - ch = s.nextBy(2) // consume the opening dashes - } - for ch != '\n' && !isEOF(ch) { - ch = s.next() - } - return s.emit(COMMENT) -} - -func (s *Lexer) scanMultiLineComment() *Token { - s.start = s.cursor - ch := s.nextBy(2) // consume the opening slash and asterisk - for { - if ch == '*' && s.lookAhead(1) == '/' { - s.nextBy(2) // consume the closing asterisk and slash - break - } - if isEOF(ch) { - // encountered EOF before closing comment - // this usually happens when the comment is truncated - return s.emit(ERROR) - } - ch = s.next() - } - return s.emit(MULTILINE_COMMENT) -} - -func (s *Lexer) scanPunctuation() *Token { - s.start = s.cursor - s.next() - return s.emit(PUNCTUATION) -} - -func (s *Lexer) scanDollarQuotedString() *Token { - s.start = s.cursor - ch := s.next() // consume the dollar sign - tagStart := s.cursor - - for s.cursor < len(s.src) && ch != '$' { - ch = s.next() - } - s.next() // consume the closing dollar sign of the tag - tag := s.src[tagStart-1 : s.cursor] // include the opening and closing dollar sign e.g. $tag$ - - for s.cursor < len(s.src) { - if s.matchAt([]rune(tag)) { - s.nextBy(len(tag)) // consume the closing tag - if tag == "$func$" { - return s.emit(DOLLAR_QUOTED_FUNCTION) - } - return s.emit(DOLLAR_QUOTED_STRING) - } - s.next() - } - return s.emit(ERROR) -} - -func (s *Lexer) scanPositionalParameter() *Token { - s.start = s.cursor - ch := s.nextBy(2) // consume the dollar sign and the number - for { - if !isDigit(ch) { - break - } - ch = s.next() - } - return s.emit(POSITIONAL_PARAMETER) -} - -func (s *Lexer) scanBindParameter() *Token { - s.start = s.cursor - ch := s.nextBy(2) // consume the (colon|at sign) and the char - for { - if !isAlphaNumeric(ch) { - break - } - ch = s.next() - } - return s.emit(BIND_PARAMETER) -} - -func (s *Lexer) scanSystemVariable() *Token { - s.start = s.cursor - ch := s.nextBy(2) // consume @@ - // Must be followed by at least one alphanumeric character - if !isAlphaNumeric(ch) { - return s.emit(ERROR) - } - for isAlphaNumeric(ch) { - ch = s.next() - } - return s.emit(SYSTEM_VARIABLE) -} - -func (s *Lexer) scanUnknown() *Token { - // When we see an unknown token, we advance the cursor until we see something that looks like a token boundary. - s.start = s.cursor - s.next() - return s.emit(UNKNOWN) -} - -// Modify emit function to use positions and maintain links -func (s *Lexer) emit(t TokenType) *Token { - tok := s.token - lastValueToken := tok.lastValueToken - - // Zero other fields - *tok = Token{ - Type: t, - Value: s.src[s.start:s.cursor], - isTableIndicator: s.isTableIndicator, - lastValueToken: lastValueToken, - } - - tok.hasDigits = s.hasDigits - tok.hasQuotes = s.hasQuotes - - // Reset lexer state - s.start = s.cursor - s.isTableIndicator = false - s.hasDigits = false - - return tok -} diff --git a/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go b/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go deleted file mode 100644 index 2d199a1080..0000000000 --- a/vendor/github.com/DataDog/go-sqllexer/sqllexer_utils.go +++ /dev/null @@ -1,349 +0,0 @@ -package sqllexer - -import ( - "strings" - "unicode" -) - -type DBMSType string - -const ( - // DBMSSQLServer is a MS SQL - DBMSSQLServer DBMSType = "mssql" - DBMSSQLServerAlias1 DBMSType = "sql-server" // .Net tracer - DBMSSQLServerAlias2 DBMSType = "sqlserver" // Java tracer - // DBMSPostgres is a PostgreSQL Server - DBMSPostgres DBMSType = "postgresql" - DBMSPostgresAlias1 DBMSType = "postgres" // Ruby, JavaScript tracers - // DBMSMySQL is a MySQL Server - DBMSMySQL DBMSType = "mysql" - // DBMSOracle is a Oracle Server - DBMSOracle DBMSType = "oracle" - // DBMSSnowflake is a Snowflake Server - DBMSSnowflake DBMSType = "snowflake" -) - -var dbmsAliases = map[DBMSType]DBMSType{ - DBMSSQLServerAlias1: DBMSSQLServer, - DBMSSQLServerAlias2: DBMSSQLServer, - DBMSPostgresAlias1: DBMSPostgres, -} - -func getDBMSFromAlias(alias DBMSType) DBMSType { - if canonical, exists := dbmsAliases[alias]; exists { - return canonical - } - return alias -} - -var commands = []string{ - "SELECT", - "INSERT", - "UPDATE", - "DELETE", - "CREATE", - "ALTER", - "DROP", - "JOIN", - "GRANT", - "REVOKE", - "COMMIT", - "BEGIN", - "TRUNCATE", - "MERGE", - "EXECUTE", - "EXEC", - "EXPLAIN", - "STRAIGHT_JOIN", - "USE", - "CLONE", -} - -var tableIndicatorCommands = []string{ - "JOIN", - "UPDATE", - "STRAIGHT_JOIN", // MySQL - "CLONE", // Snowflake -} - -var tableIndicatorKeywords = []string{ - "FROM", - "INTO", - "TABLE", - "EXISTS", // Drop Table If Exists - "ONLY", // PostgreSQL -} - -var keywords = []string{ - "ADD", - "ALL", - "AND", - "ANY", - "ASC", - "BETWEEN", - "BY", - "CASE", - "CHECK", - "COLUMN", - "CONSTRAINT", - "DATABASE", - "DECLARE", - "DEFAULT", - "DESC", - "DISTINCT", - "ELSE", - "END", - "ESCAPE", - "EXISTS", - "FOREIGN", - "FROM", - "GROUP", - "HAVING", - "IN", - "INDEX", - "INNER", - "INTO", - "IS", - "KEY", - "LEFT", - "LIKE", - "LIMIT", - "NOT", - "ON", - "OR", - "ORDER", - "OUT", - "OUTER", - "PRIMARY", - "PROCEDURE", - "REPLACE", - "RETURNS", - "RIGHT", - "ROLLBACK", - "ROWNUM", - "SET", - "SOME", - "TABLE", - "TOP", - "UNION", - "UNIQUE", - "VALUES", - "VIEW", - "WHERE", - "CUBE", - "ROLLUP", - "LITERAL", - "WINDOW", - "VACCUM", - "ANALYZE", - "ILIKE", - "USING", - "ASSERTION", - "DOMAIN", - "CLUSTER", - "COPY", - "PLPGSQL", - "TRIGGER", - "TEMPORARY", - "UNLOGGED", - "RECURSIVE", - "RETURNING", - "OFFSET", - "OF", - "SKIP", - "IF", - "ONLY", -} - -var ( - // Pre-defined constants for common values - booleanValues = []string{ - "TRUE", - "FALSE", - } - - nullValues = []string{ - "NULL", - } - - procedureNames = []string{ - "PROCEDURE", - "PROC", - } - - ctes = []string{ - "WITH", - } - - alias = []string{ - "AS", - } -) - -// buildCombinedTrie combines all types of SQL keywords into a single trie -// This trie is used for efficient case-insensitive keyword matching during lexing -func buildCombinedTrie() *trieNode { - root := &trieNode{children: make(map[rune]*trieNode)} - - // Add all types of keywords - addToTrie(root, commands, COMMAND, false) - addToTrie(root, keywords, KEYWORD, false) - addToTrie(root, tableIndicatorCommands, COMMAND, true) - addToTrie(root, tableIndicatorKeywords, KEYWORD, true) - addToTrie(root, booleanValues, BOOLEAN, false) - addToTrie(root, nullValues, NULL, false) - addToTrie(root, procedureNames, PROC_INDICATOR, false) - addToTrie(root, ctes, CTE_INDICATOR, false) - addToTrie(root, alias, ALIAS_INDICATOR, false) - - return root -} - -func addToTrie(root *trieNode, words []string, tokenType TokenType, isTableIndicator bool) { - for _, word := range words { - node := root - // Convert to uppercase for case-insensitive matching - for _, ch := range strings.ToUpper(word) { - if next, exists := node.children[ch]; exists { - node = next - } else { - next = &trieNode{children: make(map[rune]*trieNode)} - node.children[ch] = next - node = next - } - } - node.isEnd = true - node.tokenType = tokenType - node.isTableIndicator = isTableIndicator - } -} - -var keywordRoot = buildCombinedTrie() - -// TODO: Optimize these functions to work with rune positions instead of string operations -// They are currently used by obfuscator and normalizer, which we'll optimize later -func replaceDigits(token *Token, placeholder string) string { - var replacedToken strings.Builder - replacedToken.Grow(len(token.Value)) - - var lastWasDigit bool - for _, r := range token.Value { - if isDigit(r) { - if !lastWasDigit { - replacedToken.WriteString(placeholder) - lastWasDigit = true - } - } else { - replacedToken.WriteRune(r) - lastWasDigit = false - } - } - - return replacedToken.String() -} - -func trimQuotes(token *Token) string { - var trimmedToken strings.Builder - trimmedToken.Grow(len(token.Value)) - - for _, r := range token.Value { - if isDoubleQuote(r) || r == '[' || r == ']' || r == '`' { - // trimmedToken.WriteString(placeholder) - } else { - trimmedToken.WriteRune(r) - } - } - token.hasQuotes = false - return trimmedToken.String() -} - -// isDigit checks if a rune is a digit (0-9) -func isDigit(ch rune) bool { - return ch >= '0' && ch <= '9' -} - -// isLeadingDigit checks if a rune is + or - -func isLeadingSign(ch rune) bool { - return ch == '+' || ch == '-' -} - -// isExponent checks if a rune is an exponent (e or E) -func isExpontent(ch rune) bool { - return ch == 'e' || ch == 'E' -} - -// isSpace checks if a rune is a space or newline -func isSpace(ch rune) bool { - return ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r' -} - -// isAsciiLetter checks if a rune is an ASCII letter (a-z or A-Z) -func isAsciiLetter(ch rune) bool { - return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') -} - -// isLetter checks if a rune is an ASCII letter (a-z or A-Z) or unicode letter -func isLetter(ch rune) bool { - return isAsciiLetter(ch) || ch == '_' || - (ch > 127 && unicode.IsLetter(ch)) -} - -// isAlphaNumeric checks if a rune is an ASCII letter (a-z or A-Z), digit (0-9), or unicode number -func isAlphaNumeric(ch rune) bool { - return isLetter(ch) || isDigit(ch) || - (ch > 127 && unicode.IsNumber(ch)) -} - -// isDoubleQuote checks if a rune is a double quote (") -func isDoubleQuote(ch rune) bool { - return ch == '"' -} - -// isSingleQuote checks if a rune is a single quote (') -func isSingleQuote(ch rune) bool { - return ch == '\'' -} - -// isOperator checks if a rune is an operator -func isOperator(ch rune) bool { - return ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '=' || ch == '<' || ch == '>' || - ch == '!' || ch == '&' || ch == '|' || ch == '^' || ch == '%' || ch == '~' || ch == '?' || - ch == '@' || ch == ':' || ch == '#' -} - -// isWildcard checks if a rune is a wildcard (*) -func isWildcard(ch rune) bool { - return ch == '*' -} - -// isSinglelineComment checks if two runes are a single line comment (--) -func isSingleLineComment(ch rune, nextCh rune) bool { - return ch == '-' && nextCh == '-' -} - -// isMultiLineComment checks if two runes are a multi line comment (/*) -func isMultiLineComment(ch rune, nextCh rune) bool { - return ch == '/' && nextCh == '*' -} - -// isPunctuation checks if a rune is a punctuation character -func isPunctuation(ch rune) bool { - return ch == '(' || ch == ')' || ch == ',' || ch == ';' || ch == '.' || ch == ':' || - ch == '[' || ch == ']' || ch == '{' || ch == '}' -} - -// isEOF checks if a rune is EOF (end of file) -func isEOF(ch rune) bool { - return ch == 0 -} - -// isIdentifier checks if a rune is an identifier -func isIdentifier(ch rune) bool { - return ch == '.' || ch == '?' || ch == '$' || ch == '#' || ch == '/' || ch == '@' || ch == '!' || isLetter(ch) || isDigit(ch) -} - -// isValueToken checks if a token is a value token -// A value token is a token that is not a space, comment, or EOF -func isValueToken(token *Token) bool { - return token.Type != EOF && token.Type != SPACE && token.Type != COMMENT && token.Type != MULTILINE_COMMENT -} diff --git a/vendor/github.com/DataDog/go-tuf/LICENSE b/vendor/github.com/DataDog/go-tuf/LICENSE deleted file mode 100644 index 38163dd4bd..0000000000 --- a/vendor/github.com/DataDog/go-tuf/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014-2020 Prime Directive, 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 Prime Directive, 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/DataDog/go-tuf/client/client.go b/vendor/github.com/DataDog/go-tuf/client/client.go deleted file mode 100644 index 6a3e137fda..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/client.go +++ /dev/null @@ -1,955 +0,0 @@ -package client - -import ( - "bytes" - "encoding/hex" - "encoding/json" - "io" - - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/internal/roles" - "github.com/DataDog/go-tuf/util" - "github.com/DataDog/go-tuf/verify" -) - -const ( - // This is the upper limit in bytes we will use to limit the download - // size of the root/timestamp roles, since we might not don't know how - // big it is. - defaultRootDownloadLimit = 512000 - defaultTimestampDownloadLimit = 16384 - defaultMaxDelegations = 32 - defaultMaxRootRotations = 1e3 -) - -// LocalStore is local storage for downloaded top-level metadata. -type LocalStore interface { - io.Closer - - // GetMeta returns top-level metadata from local storage. The keys are - // in the form `ROLE.json`, with ROLE being a valid top-level role. - GetMeta() (map[string]json.RawMessage, error) - - // SetMeta persists the given top-level metadata in local storage, the - // name taking the same format as the keys returned by GetMeta. - SetMeta(name string, meta json.RawMessage) error - - // DeleteMeta deletes a given metadata. - DeleteMeta(name string) error -} - -// RemoteStore downloads top-level metadata and target files from a remote -// repository. -type RemoteStore interface { - // GetMeta downloads the given metadata from remote storage. - // - // `name` is the filename of the metadata (e.g. "root.json") - // - // `err` is ErrNotFound if the given file does not exist. - // - // `size` is the size of the stream, -1 indicating an unknown length. - GetMeta(name string) (stream io.ReadCloser, size int64, err error) - - // GetTarget downloads the given target file from remote storage. - // - // `path` is the path of the file relative to the root of the remote - // targets directory (e.g. "/path/to/file.txt"). - // - // `err` is ErrNotFound if the given file does not exist. - // - // `size` is the size of the stream, -1 indicating an unknown length. - GetTarget(path string) (stream io.ReadCloser, size int64, err error) -} - -// Client provides methods for fetching updates from a remote repository and -// downloading remote target files. -type Client struct { - local LocalStore - remote RemoteStore - - // The following four fields represent the versions of metatdata either - // from local storage or from recently downloaded metadata - rootVer int64 - targetsVer int64 - snapshotVer int64 - timestampVer int64 - - // targets is the list of available targets, either from local storage - // or from recently downloaded targets metadata - targets data.TargetFiles - - // localMeta is the raw metadata from local storage and is used to - // check whether remote metadata is present locally - localMeta map[string]json.RawMessage - - // db is a key DB used for verifying metadata - db *verify.DB - - // consistentSnapshot indicates whether the remote storage is using - // consistent snapshots (as specified in root.json) - consistentSnapshot bool - - // MaxDelegations limits by default the number of delegations visited for any - // target - MaxDelegations int - - // MaxRootRotations limits the number of downloaded roots in 1.0.19 root updater - MaxRootRotations int -} - -func NewClient(local LocalStore, remote RemoteStore) *Client { - return &Client{ - local: local, - remote: remote, - MaxDelegations: defaultMaxDelegations, - MaxRootRotations: defaultMaxRootRotations, - } -} - -// Init initializes a local repository from root metadata. -// -// The root's keys are extracted from the root and saved in local storage. -// Root expiration is not checked. -// It is expected that rootJSON was securely distributed with the software -// being updated. -func (c *Client) Init(rootJSON []byte) error { - err := c.loadAndVerifyRootMeta(rootJSON, true /*ignoreExpiredCheck*/) - if err != nil { - return err - } - return c.local.SetMeta("root.json", rootJSON) -} - -// Update downloads and verifies remote metadata and returns updated targets. -// It always performs root update (5.2 and 5.3) section of the v1.0.19 spec. -// -// https://theupdateframework.github.io/specification/v1.0.19/index.html#load-trusted-root -func (c *Client) Update() (data.TargetFiles, error) { - if err := c.UpdateRoots(); err != nil { - if _, ok := err.(verify.ErrExpired); ok { - // For backward compatibility, we wrap the ErrExpired inside - // ErrDecodeFailed. - return nil, ErrDecodeFailed{"root.json", err} - } - return nil, err - } - - // Load trusted metadata files, if any, and verify them against the latest root - c.getLocalMeta() - - // 5.4.1 - Download the timestamp metadata - timestampJSON, err := c.downloadMetaUnsafe("timestamp.json", defaultTimestampDownloadLimit) - if err != nil { - return nil, err - } - // 5.4.(2,3 and 4) - Verify timestamp against various attacks - // Returns the extracted snapshot metadata - snapshotMeta, sameTimestampVersion, err := c.decodeTimestamp(timestampJSON) - if sameTimestampVersion { - // The new timestamp.json file had the same version; we don't need to - // update, so bail early. - return c.targets, nil - } - - if err != nil { - return nil, err - } - // 5.4.5 - Persist the timestamp metadata - if err := c.local.SetMeta("timestamp.json", timestampJSON); err != nil { - return nil, err - } - - // 5.5.1 - Download snapshot metadata - // 5.5.2 and 5.5.4 - Check against timestamp role's snapshot hash and version - snapshotJSON, err := c.downloadMetaFromTimestamp("snapshot.json", snapshotMeta) - if err != nil { - return nil, err - } - // 5.5.(3,5 and 6) - Verify snapshot against various attacks - // Returns the extracted metadata files - snapshotMetas, err := c.decodeSnapshot(snapshotJSON) - if err != nil { - return nil, err - } - // 5.5.7 - Persist snapshot metadata - if err := c.local.SetMeta("snapshot.json", snapshotJSON); err != nil { - return nil, err - } - - // If we don't have the targets.json, download it, determine updated - // targets and save targets.json in local storage - var updatedTargets data.TargetFiles - targetsMeta := snapshotMetas["targets.json"] - if !c.hasMetaFromSnapshot("targets.json", targetsMeta) { - // 5.6.1 - Download the top-level targets metadata file - // 5.6.2 and 5.6.4 - Check against snapshot role's targets hash and version - targetsJSON, err := c.downloadMetaFromSnapshot("targets.json", targetsMeta) - if err != nil { - return nil, err - } - // 5.6.(3 and 5) - Verify signatures and check against freeze attack - updatedTargets, err = c.decodeTargets(targetsJSON) - if err != nil { - return nil, err - } - // 5.6.6 - Persist targets metadata - if err := c.local.SetMeta("targets.json", targetsJSON); err != nil { - return nil, err - } - } - - return updatedTargets, nil -} - -func (c *Client) UpdateRoots() error { - // https://theupdateframework.github.io/specification/v1.0.19/index.html#load-trusted-root - // 5.2 Load the trusted root metadata file. We assume that a good, - // trusted copy of this file was shipped with the package manager - // or software updater using an out-of-band process. - if err := c.loadAndVerifyLocalRootMeta( /*ignoreExpiredCheck=*/ true); err != nil { - return err - } - m, err := c.local.GetMeta() - if err != nil { - return err - } - - type KeyInfo struct { - KeyIDs map[string]bool - Threshold int - } - - // Prepare for 5.3.11: If the timestamp and / or snapshot keys have been rotated, - // then delete the trusted timestamp and snapshot metadata files. - getKeyInfo := func(role string) KeyInfo { - keyIDs := make(map[string]bool) - for k := range c.db.GetRole(role).KeyIDs { - keyIDs[k] = true - } - return KeyInfo{keyIDs, c.db.GetRole(role).Threshold} - } - - // The nonRootKeyInfo looks like this: - // { - // "timestamp": {KeyIDs={"KEYID1": true, "KEYID2": true}, Threshold=2}, - // "snapshot": {KeyIDs={"KEYID3": true}, Threshold=1}, - // "targets": {KeyIDs={"KEYID4": true, "KEYID5": true, "KEYID6": true}, Threshold=1} - // } - - nonRootKeyInfo := map[string]KeyInfo{"timestamp": {}, "snapshot": {}, "targets": {}} - for k := range nonRootKeyInfo { - nonRootKeyInfo[k] = getKeyInfo(k) - } - - // 5.3.1 Temorarily turn on the consistent snapshots in order to download - // versioned root metadata files as described next. - consistentSnapshot := c.consistentSnapshot - c.consistentSnapshot = true - - nRootMetadata := m["root.json"] - - // https://theupdateframework.github.io/specification/v1.0.19/index.html#update-root - - // 5.3.1 Since it may now be signed using entirely different keys, - // the client MUST somehow be able to establish a trusted line of - // continuity to the latest set of keys (see § 6.1 Key - // management and migration). To do so, the client MUST - // download intermediate root metadata files, until the - // latest available one is reached. Therefore, it MUST - // temporarily turn on consistent snapshots in order to - // download versioned root metadata files as described next. - - // This loop returns on error or breaks after downloading the lastest root metadata. - // 5.3.2 Let N denote the version number of the trusted root metadata file. - for i := 0; i < c.MaxRootRotations; i++ { - // 5.3.3 Try downloading version nPlusOne of the root metadata file. - // NOTE: as a side effect, we do update c.rootVer to nPlusOne between iterations. - nPlusOne := c.rootVer + 1 - nPlusOneRootPath := util.VersionedPath("root.json", nPlusOne) - nPlusOneRootMetadata, err := c.downloadMetaUnsafe(nPlusOneRootPath, defaultRootDownloadLimit) - - if err != nil { - if _, ok := err.(ErrMissingRemoteMetadata); ok { - // stop when the next root can't be downloaded - break - } - return err - } - - // 5.3.4 Check for an arbitrary software attack. - // 5.3.4.1 Check that N signed N+1 - nPlusOneRootMetadataSigned, err := c.verifyRoot(nRootMetadata, nPlusOneRootMetadata) - if err != nil { - return err - } - - // 5.3.4.2 check that N+1 signed itself. - if _, err := c.verifyRoot(nPlusOneRootMetadata, nPlusOneRootMetadata); err != nil { - // 5.3.6 Note that the expiration of the new (intermediate) root - // metadata file does not matter yet, because we will check for - // it in step 5.3.10. - return err - } - - // 5.3.5 Check for a rollback attack. Here, we check that nPlusOneRootMetadataSigned.version == nPlusOne. - if nPlusOneRootMetadataSigned.Version != nPlusOne { - return verify.ErrWrongVersion{ - Given: nPlusOneRootMetadataSigned.Version, - Expected: nPlusOne, - } - } - - // 5.3.7 Set the trusted root metadata file to the new root metadata file. - c.rootVer = nPlusOneRootMetadataSigned.Version - // NOTE: following up on 5.3.1, we want to always have consistent snapshots on for the duration - // of root rotation. AFTER the rotation is over, we will set it to the value of the last root. - consistentSnapshot = nPlusOneRootMetadataSigned.ConsistentSnapshot - // 5.3.8 Persist root metadata. The client MUST write the file to non-volatile storage as FILENAME.EXT (e.g. root.json). - // NOTE: Internally, setMeta stores metadata in LevelDB in a persistent manner. - if err := c.local.SetMeta("root.json", nPlusOneRootMetadata); err != nil { - return err - } - nRootMetadata = nPlusOneRootMetadata - // 5.3.9 Repeat steps 5.3.2 to 5.3.9 - - } // End of the for loop. - - // 5.3.10 Check for a freeze attack. - // NOTE: This will check for any, including freeze, attack. - if err := c.loadAndVerifyLocalRootMeta( /*ignoreExpiredCheck=*/ false); err != nil { - return err - } - - countDeleted := func(s1 map[string]bool, s2 map[string]bool) int { - c := 0 - for k := range s1 { - if _, ok := s2[k]; !ok { - c++ - } - } - return c - } - - // 5.3.11 To recover from fast-forward attack, certain metadata files need - // to be deleted if a threshold of keys are revoked. - // List of metadata that should be deleted per role if a threshold of keys - // are revoked: - // (based on the ongoing PR: https://github.com/mnm678/specification/tree/e50151d9df632299ddea364c4f44fe8ca9c10184) - // timestamp -> delete timestamp.json - // snapshot -> delete timestamp.json and snapshot.json - // targets -> delete snapshot.json and targets.json - // - // nonRootKeyInfo contains the keys and thresholds from root.json - // that were on disk before the root update process begins. - for topLevelRolename := range nonRootKeyInfo { - // ki contains the keys and thresholds from the latest downloaded root.json. - ki := getKeyInfo(topLevelRolename) - if countDeleted(nonRootKeyInfo[topLevelRolename].KeyIDs, ki.KeyIDs) >= nonRootKeyInfo[topLevelRolename].Threshold { - deleteMeta := map[string][]string{ - "timestamp": {"timestamp.json"}, - "snapshot": {"timestamp.json", "snapshot.json"}, - "targets": {"snapshot.json", "targets.json"}, - } - - for _, r := range deleteMeta[topLevelRolename] { - c.local.DeleteMeta(r) - } - } - } - - // 5.3.12 Set whether consistent snapshots are used as per the trusted root metadata file. - c.consistentSnapshot = consistentSnapshot - return nil -} - -// getLocalMeta decodes and verifies metadata from local storage. -// The verification of local files is purely for consistency, if an attacker -// has compromised the local storage, there is no guarantee it can be trusted. -// Before trying to load the metadata files, it clears the in-memory copy of the local metadata. -// This is to insure that all of the loaded metadata files at the end are indeed verified by the latest root. -// If some of the metadata files fail to load it will proceed with trying to load the rest, -// but still return an error at the end, if such occurred. Otherwise returns nil. -func (c *Client) getLocalMeta() error { - var retErr error - loadFailed := false - // Clear the in-memory copy of the local metadata. The goal is to reload and take into account - // only the metadata files that are verified by the latest root. Otherwise, their content should - // be ignored. - c.localMeta = make(map[string]json.RawMessage) - - // Load the latest root meta - if err := c.loadAndVerifyLocalRootMeta( /*ignoreExpiredCheck=*/ false); err != nil { - return err - } - - // Load into memory the existing meta, if any, from the local storage - meta, err := c.local.GetMeta() - if err != nil { - return nil - } - - // Verify the top-level metadata (timestamp, snapshot and targets) against the latest root and load it, if okay - if timestampJSON, ok := meta["timestamp.json"]; ok { - timestamp := &data.Timestamp{} - if err := c.db.UnmarshalTrusted(timestampJSON, timestamp, "timestamp"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["timestamp.json"] = meta["timestamp.json"] - c.timestampVer = timestamp.Version - } - } - - snapshot := &data.Snapshot{} - if snapshotJSON, ok := meta["snapshot.json"]; ok { - if err := c.db.UnmarshalTrusted(snapshotJSON, snapshot, "snapshot"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["snapshot.json"] = meta["snapshot.json"] - c.snapshotVer = snapshot.Version - } - } - - if targetsJSON, ok := meta["targets.json"]; ok { - targets := &data.Targets{} - if err := c.db.UnmarshalTrusted(targetsJSON, targets, "targets"); err != nil { - loadFailed = true - retErr = err - } else { - c.localMeta["targets.json"] = meta["targets.json"] - c.targetsVer = targets.Version - // FIXME(TUF-0.9) temporarily support files with leading path separators. - // c.targets = targets.Targets - c.loadTargets(targets.Targets) - } - } - - if loadFailed { - // If any of the metadata failed to be verified, return the reason for that failure - // and fail fast before delegated targets - return retErr - } - - // verifiedDelegatedTargets is a set of verified delegated targets - for fileName, fileContent := range meta { - if roles.IsDelegatedTargetsManifest(fileName) { - c.localMeta[fileName] = fileContent - } - } - - if loadFailed { - // If any of the metadata failed to be verified, return the reason for that failure - return retErr - } - return nil -} - -// loadAndVerifyLocalRootMeta decodes and verifies root metadata from -// local storage and loads the top-level keys. This method first clears -// the DB for top-level keys and then loads the new keys. -func (c *Client) loadAndVerifyLocalRootMeta(ignoreExpiredCheck bool) error { - meta, err := c.local.GetMeta() - if err != nil { - return err - } - rootJSON, ok := meta["root.json"] - if !ok { - return ErrNoRootKeys - } - return c.loadAndVerifyRootMeta(rootJSON, ignoreExpiredCheck) -} - -// loadAndVerifyRootMeta decodes and verifies root metadata and loads the top-level keys. -// This method first clears the DB for top-level keys and then loads the new keys. -func (c *Client) loadAndVerifyRootMeta(rootJSON []byte, ignoreExpiredCheck bool) error { - // unmarshal root.json without verifying as we need the root - // keys first - s := &data.Signed{} - if err := json.Unmarshal(rootJSON, s); err != nil { - return err - } - root := &data.Root{} - if err := json.Unmarshal(s.Signed, root); err != nil { - return err - } - ndb := verify.NewDB() - for id, k := range root.Keys { - if err := ndb.AddKey(id, k); err != nil { - return err - } - } - for name, role := range root.Roles { - if err := ndb.AddRole(name, role); err != nil { - return err - } - } - // Any trusted local root metadata version must be greater than 0. - if ignoreExpiredCheck { - if err := ndb.VerifyIgnoreExpiredCheck(s, "root", 0); err != nil { - return err - } - } else { - if err := ndb.Verify(s, "root", 0); err != nil { - return err - } - } - c.consistentSnapshot = root.ConsistentSnapshot - c.rootVer = root.Version - c.db = ndb - return nil -} - -// verifyRoot verifies Signed section of the bJSON -// using verification keys in aJSON. -func (c *Client) verifyRoot(aJSON []byte, bJSON []byte) (*data.Root, error) { - aSigned := &data.Signed{} - if err := json.Unmarshal(aJSON, aSigned); err != nil { - return nil, err - } - aRoot := &data.Root{} - if err := json.Unmarshal(aSigned.Signed, aRoot); err != nil { - return nil, err - } - - bSigned := &data.Signed{} - if err := json.Unmarshal(bJSON, bSigned); err != nil { - return nil, err - } - bRoot := &data.Root{} - if err := json.Unmarshal(bSigned.Signed, bRoot); err != nil { - return nil, err - } - - ndb := verify.NewDB() - for id, k := range aRoot.Keys { - if err := ndb.AddKey(id, k); err != nil { - return nil, err - } - } - for name, role := range aRoot.Roles { - if err := ndb.AddRole(name, role); err != nil { - return nil, err - } - } - - if err := ndb.VerifySignatures(bSigned, "root"); err != nil { - return nil, err - } - return bRoot, nil -} - -// FIXME(TUF-0.9) TUF is considering removing support for target files starting -// with a leading path separator. In order to be backwards compatible, we'll -// just remove leading separators for now. -func (c *Client) loadTargets(targets data.TargetFiles) { - c.targets = make(data.TargetFiles) - for name, meta := range targets { - c.targets[name] = meta - c.targets[util.NormalizeTarget(name)] = meta - } -} - -// downloadMetaUnsafe downloads top-level metadata from remote storage without -// verifying it's length and hashes (used for example to download timestamp.json -// which has unknown size). It will download at most maxMetaSize bytes. -func (c *Client) downloadMetaUnsafe(name string, maxMetaSize int64) ([]byte, error) { - r, size, err := c.remote.GetMeta(name) - if err != nil { - if IsNotFound(err) { - return nil, ErrMissingRemoteMetadata{name} - } - return nil, ErrDownloadFailed{name, err} - } - defer r.Close() - - // return ErrMetaTooLarge if the reported size is greater than maxMetaSize - if size > maxMetaSize { - return nil, ErrMetaTooLarge{name, size, maxMetaSize} - } - - // although the size has been checked above, use a LimitReader in case - // the reported size is inaccurate, or size is -1 which indicates an - // unknown length - return io.ReadAll(io.LimitReader(r, maxMetaSize)) -} - -// remoteGetFunc is the type of function the download method uses to download -// remote files -type remoteGetFunc func(string) (io.ReadCloser, int64, error) - -// downloadHashed tries to download the hashed prefixed version of the file. -func (c *Client) downloadHashed(file string, get remoteGetFunc, hashes data.Hashes) (io.ReadCloser, int64, error) { - // try each hashed path in turn, and either return the contents, - // try the next one if a 404 is returned, or return an error - for _, path := range util.HashedPaths(file, hashes) { - r, size, err := get(path) - if err != nil { - if IsNotFound(err) { - continue - } - return nil, 0, err - } - return r, size, nil - } - return nil, 0, ErrNotFound{file} -} - -// download downloads the given target file from remote storage using the get -// function, adding hashes to the path if consistent snapshots are in use -func (c *Client) downloadTarget(file string, get remoteGetFunc, hashes data.Hashes) (io.ReadCloser, int64, error) { - if c.consistentSnapshot { - return c.downloadHashed(file, get, hashes) - } else { - return get(file) - } -} - -// downloadVersionedMeta downloads top-level metadata from remote storage and -// verifies it using the given file metadata. -func (c *Client) downloadMeta(name string, version int64, m data.FileMeta) ([]byte, error) { - r, size, err := func() (io.ReadCloser, int64, error) { - if c.consistentSnapshot { - path := util.VersionedPath(name, version) - r, size, err := c.remote.GetMeta(path) - if err == nil { - return r, size, nil - } - - return nil, 0, err - } else { - return c.remote.GetMeta(name) - } - }() - if err != nil { - if IsNotFound(err) { - return nil, ErrMissingRemoteMetadata{name} - } - return nil, err - } - defer r.Close() - - // return ErrWrongSize if the reported size is known and incorrect - var stream io.Reader - if m.Length != 0 { - if size >= 0 && size != m.Length { - return nil, ErrWrongSize{name, size, m.Length} - } - - // wrap the data in a LimitReader so we download at most m.Length bytes - stream = io.LimitReader(r, m.Length) - } else { - stream = r - } - - return io.ReadAll(stream) -} - -func (c *Client) downloadMetaFromSnapshot(name string, m data.SnapshotFileMeta) ([]byte, error) { - b, err := c.downloadMeta(name, m.Version, data.FileMeta{Length: m.Length, Hashes: m.Hashes}) - if err != nil { - return nil, err - } - - // 5.6.2 – Check length and hashes of fetched bytes *before* parsing metadata - if err := util.BytesMatchLenAndHashes(b, m.Length, m.Hashes); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, err - } - - // 5.6.4 - Check against snapshot role's version - if err := util.VersionEqual(meta.Version, m.Version); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - return b, nil -} - -func (c *Client) downloadMetaFromTimestamp(name string, m data.TimestampFileMeta) ([]byte, error) { - b, err := c.downloadMeta(name, m.Version, data.FileMeta{Length: m.Length, Hashes: m.Hashes}) - if err != nil { - return nil, err - } - - // 5.2.2. – Check length and hashes of fetched bytes *before* parsing metadata - if err := util.BytesMatchLenAndHashes(b, m.Length, m.Hashes); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - meta, err := util.GenerateTimestampFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, err - } - - // 5.5.4 - Check against timestamp role's version - if err := util.VersionEqual(meta.Version, m.Version); err != nil { - return nil, ErrDownloadFailed{name, err} - } - - return b, nil -} - -// decodeSnapshot decodes and verifies snapshot metadata, and returns the new -// root and targets file meta. -func (c *Client) decodeSnapshot(b json.RawMessage) (data.SnapshotFiles, error) { - snapshot := &data.Snapshot{} - // 5.5.(3 and 6) - Verify it's signed correctly and it's not expired - if err := c.db.Unmarshal(b, snapshot, "snapshot", c.snapshotVer); err != nil { - return data.SnapshotFiles{}, ErrDecodeFailed{"snapshot.json", err} - } - // 5.5.5 - Check for top-level targets rollback attack - // Verify explicitly that current targets meta version is less than or equal to the new one - if snapshot.Meta["targets.json"].Version < c.targetsVer { - return data.SnapshotFiles{}, verify.ErrLowVersion{Actual: snapshot.Meta["targets.json"].Version, Current: c.targetsVer} - } - - // 5.5.5 - Get the local/trusted snapshot metadata, if any, and check all target metafiles against rollback attack - // In case the local snapshot metadata was not verified by the keys in the latest root during getLocalMeta(), - // snapshot.json won't be present in c.localMeta and thus this check will not be processed. - if snapshotJSON, ok := c.localMeta["snapshot.json"]; ok { - currentSnapshot := &data.Snapshot{} - if err := c.db.UnmarshalTrusted(snapshotJSON, currentSnapshot, "snapshot"); err != nil { - return data.SnapshotFiles{}, err - } - // 5.5.5 - Check for rollback attacks in both top-level and delegated targets roles (note that the Meta object includes both) - for path, local := range currentSnapshot.Meta { - if newMeta, ok := snapshot.Meta[path]; ok { - // 5.5.5 - Check for rollback attack - if newMeta.Version < local.Version { - return data.SnapshotFiles{}, verify.ErrLowVersion{Actual: newMeta.Version, Current: local.Version} - } - } else { - // 5.5.5 - Abort the update if a target file has been removed from the new snapshot file - return data.SnapshotFiles{}, verify.ErrMissingTargetFile - } - } - } - // At this point we can trust the new snapshot, the top-level targets, and any delegated targets versions it refers to - // so we can update the client's trusted versions and proceed with persisting the new snapshot metadata - // c.snapshotVer was already set when we verified the timestamp metadata - c.targetsVer = snapshot.Meta["targets.json"].Version - return snapshot.Meta, nil -} - -// decodeTargets decodes and verifies targets metadata, sets c.targets and -// returns updated targets. -func (c *Client) decodeTargets(b json.RawMessage) (data.TargetFiles, error) { - targets := &data.Targets{} - // 5.6.(3 and 5) - Verify signatures and check against freeze attack - if err := c.db.Unmarshal(b, targets, "targets", c.targetsVer); err != nil { - return nil, ErrDecodeFailed{"targets.json", err} - } - // Generate a list with the updated targets - updatedTargets := make(data.TargetFiles) - for path, meta := range targets.Targets { - if local, ok := c.targets[path]; ok { - if err := util.TargetFileMetaEqual(local, meta); err == nil { - continue - } - } - updatedTargets[path] = meta - } - // c.targetsVer was already updated when we verified the snapshot metadata - // FIXME(TUF-0.9) temporarily support files with leading path separators. - // c.targets = targets.Targets - c.loadTargets(targets.Targets) - return updatedTargets, nil -} - -// decodeTimestamp decodes and verifies timestamp metadata, and returns the -// new snapshot file meta and signals whether the update should be aborted early -// (the new timestamp has the same version as the old one, so there's no need to -// complete the update). -func (c *Client) decodeTimestamp(b json.RawMessage) (data.TimestampFileMeta, bool, error) { - timestamp := &data.Timestamp{} - - if err := c.db.Unmarshal(b, timestamp, "timestamp", c.timestampVer); err != nil { - return data.TimestampFileMeta{}, false, ErrDecodeFailed{"timestamp.json", err} - } - // 5.4.3.1 - Check for timestamp rollback attack - // We already checked for timestamp.Version < c.timestampVer in the Unmarshal call above. - // Here, we're checking for version equality, which indicates that we can abandon this update. - if timestamp.Version == c.timestampVer { - return data.TimestampFileMeta{}, true, nil - } - // 5.4.3.2 - Check for snapshot rollback attack - // Verify that the current snapshot meta version is less than or equal to the new one - if timestamp.Meta["snapshot.json"].Version < c.snapshotVer { - return data.TimestampFileMeta{}, false, verify.ErrLowVersion{Actual: timestamp.Meta["snapshot.json"].Version, Current: c.snapshotVer} - } - // At this point we can trust the new timestamp and the snapshot version it refers to - // so we can update the client's trusted versions and proceed with persisting the new timestamp - c.timestampVer = timestamp.Version - c.snapshotVer = timestamp.Meta["snapshot.json"].Version - return timestamp.Meta["snapshot.json"], false, nil -} - -// hasMetaFromSnapshot checks whether local metadata has the given meta -func (c *Client) hasMetaFromSnapshot(name string, m data.SnapshotFileMeta) bool { - _, ok := c.localMetaFromSnapshot(name, m) - return ok -} - -// localMetaFromSnapshot returns localmetadata if it matches the snapshot -func (c *Client) localMetaFromSnapshot(name string, m data.SnapshotFileMeta) (json.RawMessage, bool) { - b, ok := c.localMeta[name] - if !ok { - return nil, false - } - meta, err := util.GenerateSnapshotFileMeta(bytes.NewReader(b), m.Hashes.HashAlgorithms()...) - if err != nil { - return nil, false - } - err = util.SnapshotFileMetaEqual(meta, m) - return b, err == nil -} - -type Destination interface { - io.Writer - Delete() error -} - -// Download downloads the given target file from remote storage into dest. -// -// dest will be deleted and an error returned in the following situations: -// -// - The target does not exist in the local targets.json -// - Failed to fetch the chain of delegations accessible from local snapshot.json -// - The target does not exist in any targets -// - Metadata cannot be generated for the downloaded data -// - Generated metadata does not match local metadata for the given file -// - Size of the download does not match if the reported size is known and -// incorrect -func (c *Client) Download(name string, dest Destination) (err error) { - return c.DownloadBatch(map[string]Destination{name: dest}) -} - -// DownloadBatch is a batched version of Download. -func (c *Client) DownloadBatch(targetFiles map[string]Destination) (err error) { - // delete dest if there is an error - defer func() { - if err != nil { - for _, dest := range targetFiles { - dest.Delete() - } - } - }() - - // populate c.targets from local storage if not set - if c.targets == nil { - if err := c.getLocalMeta(); err != nil { - return err - } - } - - var names []string - for name := range targetFiles { - names = append(names, name) - } - targets, err := c.getTargetFileMetas(names) - if err != nil { - return err - } - - for name, dest := range targetFiles { - err := c.download(name, targets[name], dest) - if err != nil { - return err - } - } - return nil -} - -func (c *Client) download(name string, localMeta data.TargetFileMeta, dest Destination) error { - // get the data from remote storage - normalizedName := util.NormalizeTarget(name) - r, size, err := c.downloadTarget(normalizedName, c.remote.GetTarget, localMeta.Hashes) - if err != nil { - return err - } - defer r.Close() - - // return ErrWrongSize if the reported size is known and incorrect - if size >= 0 && size != localMeta.Length { - return ErrWrongSize{name, size, localMeta.Length} - } - - // wrap the data in a LimitReader so we download at most localMeta.Length bytes - stream := io.LimitReader(r, localMeta.Length) - - // read the data, simultaneously writing it to dest and generating metadata - actual, err := util.GenerateTargetFileMeta(io.TeeReader(stream, dest), localMeta.HashAlgorithms()...) - if err != nil { - return ErrDownloadFailed{name, err} - } - - // check the data has the correct length and hashes - if err := util.TargetFileMetaEqual(actual, localMeta); err != nil { - if e, ok := err.(util.ErrWrongLength); ok { - return ErrWrongSize{name, e.Actual, e.Expected} - } - return ErrDownloadFailed{name, err} - } - return nil -} - -func (c *Client) VerifyDigest(digest string, digestAlg string, length int64, path string) error { - localMeta, ok := c.targets[path] - if !ok { - return ErrUnknownTarget{Name: path, SnapshotVersion: c.snapshotVer} - } - - actual := data.FileMeta{Length: length, Hashes: make(data.Hashes, 1)} - var err error - actual.Hashes[digestAlg], err = hex.DecodeString(digest) - if err != nil { - return err - } - - if err := util.TargetFileMetaEqual(data.TargetFileMeta{FileMeta: actual}, localMeta); err != nil { - if e, ok := err.(util.ErrWrongLength); ok { - return ErrWrongSize{path, e.Actual, e.Expected} - } - return ErrDownloadFailed{path, err} - } - - return nil -} - -// Target returns the target metadata for a specific target if it -// exists, searching from top-level level targets then through -// all delegations. If it does not, ErrNotFound will be returned. -func (c *Client) Target(name string) (data.TargetFileMeta, error) { - targets, err := c.TargetBatch([]string{name}) - if err != nil { - return data.TargetFileMeta{}, err - } - return targets[name], nil -} - -// TargetBatch is a batched version of Target. -func (c *Client) TargetBatch(names []string) (data.TargetFiles, error) { - targets, err := c.getTargetFileMetas(names) - if err == nil { - return targets, nil - } - if _, ok := err.(ErrUnknownTarget); ok { - return nil, ErrNotFound{err.(ErrUnknownTarget).Name} - } - return nil, err -} - -// Targets returns the complete list of available top-level targets. -func (c *Client) Targets() (data.TargetFiles, error) { - // populate c.targets from local storage if not set - if c.targets == nil { - if err := c.getLocalMeta(); err != nil { - return nil, err - } - } - return c.targets, nil -} diff --git a/vendor/github.com/DataDog/go-tuf/client/delegations.go b/vendor/github.com/DataDog/go-tuf/client/delegations.go deleted file mode 100644 index 96f10bbdfa..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/delegations.go +++ /dev/null @@ -1,193 +0,0 @@ -package client - -import ( - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/pkg/targets" - "github.com/DataDog/go-tuf/util" - "github.com/DataDog/go-tuf/verify" -) - -type delegatedTargetsCache struct { - meta map[string]*data.Targets -} - -func newDelegatedTargetsCache() *delegatedTargetsCache { - return &delegatedTargetsCache{ - meta: make(map[string]*data.Targets), - } -} - -func (c *delegatedTargetsCache) loadDelegatedTargets(client *Client, snapshot *data.Snapshot, role string, db *verify.DB) (*data.Targets, error) { - if t, ok := c.meta[role]; ok { - return t, nil - } - - targets, err := client.loadDelegatedTargets(snapshot, role, db) - if err != nil { - return nil, err - } - - c.meta[role] = targets - return targets, nil -} - -// getTargetFileMeta searches for a verified TargetFileMeta matching a target -// Requires a local snapshot to be loaded and is locked to the snapshot versions. -func (c *Client) getTargetFileMeta(target string) (data.TargetFileMeta, error) { - metas, err := c.getTargetFileMetas([]string{target}) - if err != nil { - return data.TargetFileMeta{}, err - } - return metas[target], nil -} - -func (c *Client) getTargetFileMetas(targets []string) (data.TargetFiles, error) { - snapshot, err := c.loadLocalSnapshot() - if err != nil { - return nil, err - } - cache := newDelegatedTargetsCache() - targetFileMetas := make(data.TargetFiles, len(targets)) - for _, target := range targets { - normalizedTarget := util.NormalizeTarget(target) - targetFileMeta, _, err := c.getTargetFileMetaDelegationPath(normalizedTarget, snapshot, cache) - if _, ok := err.(ErrUnknownTarget); ok { - return nil, ErrUnknownTarget{target, snapshot.Version} - } - if err != nil { - return nil, err - } - targetFileMetas[target] = targetFileMeta - } - return targetFileMetas, nil -} - -// getTargetFileMetaDelegationPath searches for a verified TargetFileMeta matching a target -// Requires snapshot to be passed and is locked to that specific snapshot versions. -// Searches through delegated targets following TUF spec 1.0.19 section 5.6. -func (c *Client) getTargetFileMetaDelegationPath(target string, snapshot *data.Snapshot, cache *delegatedTargetsCache) (data.TargetFileMeta, []string, error) { - // delegationsIterator covers 5.6.7 - // - pre-order depth-first search starting with the top targets - // - filter delegations with paths or path_hash_prefixes matching searched target - // - 5.6.7.1 cycles protection - // - 5.6.7.2 terminations - delegations, err := targets.NewDelegationsIterator(target, c.db) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - - targetFileMeta := data.TargetFileMeta{} - delegationRole := "" - - for i := 0; i < c.MaxDelegations; i++ { - d, ok := delegations.Next() - if !ok { - return data.TargetFileMeta{}, nil, ErrUnknownTarget{target, snapshot.Version} - } - - // covers 5.6.{1,2,3,4,5,6} - targets, err := cache.loadDelegatedTargets(c, snapshot, d.Delegatee.Name, d.DB) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - - // stop when the searched TargetFileMeta is found - if m, ok := targets.Targets[target]; ok { - delegationRole = d.Delegatee.Name - targetFileMeta = m - break - } - - if targets.Delegations != nil { - delegationsDB, err := verify.NewDBFromDelegations(targets.Delegations) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - err = delegations.Add(targets.Delegations.Roles, d.Delegatee.Name, delegationsDB) - if err != nil { - return data.TargetFileMeta{}, nil, err - } - } - } - - if len(delegationRole) > 0 { - return targetFileMeta, buildPath(delegations.Parent, delegationRole, ""), nil - } - - return data.TargetFileMeta{}, nil, ErrMaxDelegations{ - Target: target, - MaxDelegations: c.MaxDelegations, - SnapshotVersion: snapshot.Version, - } -} - -func buildPath(parent func(string) string, start string, end string) []string { - if start == end { - return nil - } - - path := []string{start} - current := start - for { - current = parent(current) - if current == end { - break - } - path = append(path, current) - } - return path -} - -func (c *Client) loadLocalSnapshot() (*data.Snapshot, error) { - if err := c.getLocalMeta(); err != nil { - return nil, err - } - rawS, ok := c.localMeta["snapshot.json"] - if !ok { - return nil, ErrNoLocalSnapshot - } - - snapshot := &data.Snapshot{} - if err := c.db.Unmarshal(rawS, snapshot, "snapshot", c.snapshotVer); err != nil { - return nil, ErrDecodeFailed{"snapshot.json", err} - } - return snapshot, nil -} - -// loadDelegatedTargets downloads, decodes, verifies and stores targets -func (c *Client) loadDelegatedTargets(snapshot *data.Snapshot, role string, db *verify.DB) (*data.Targets, error) { - var err error - fileName := role + ".json" - fileMeta, ok := snapshot.Meta[fileName] - if !ok { - return nil, ErrRoleNotInSnapshot{role, snapshot.Version} - } - - // 5.6.1 download target if not in the local store - // 5.6.2 check against snapshot hash - // 5.6.4 check against snapshot version - raw, alreadyStored := c.localMetaFromSnapshot(fileName, fileMeta) - if !alreadyStored { - raw, err = c.downloadMetaFromSnapshot(fileName, fileMeta) - if err != nil { - return nil, err - } - } - - targets := &data.Targets{} - // 5.6.3 verify signature with parent public keys - // 5.6.5 verify that the targets is not expired - // role "targets" is a top role verified by root keys loaded in the client db - err = db.Unmarshal(raw, targets, role, fileMeta.Version) - if err != nil { - return nil, ErrDecodeFailed{fileName, err} - } - - // 5.6.6 persist - if !alreadyStored { - if err := c.local.SetMeta(fileName, raw); err != nil { - return nil, err - } - } - return targets, nil -} diff --git a/vendor/github.com/DataDog/go-tuf/client/errors.go b/vendor/github.com/DataDog/go-tuf/client/errors.go deleted file mode 100644 index 3e7a5dcc4d..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/errors.go +++ /dev/null @@ -1,107 +0,0 @@ -package client - -import ( - "errors" - "fmt" -) - -var ( - ErrNoRootKeys = errors.New("tuf: no root keys found in local meta store") - ErrInsufficientKeys = errors.New("tuf: insufficient keys to meet threshold") - ErrNoLocalSnapshot = errors.New("tuf: no snapshot stored locally") -) - -type ErrMissingRemoteMetadata struct { - Name string -} - -func (e ErrMissingRemoteMetadata) Error() string { - return fmt.Sprintf("tuf: missing remote metadata %s", e.Name) -} - -type ErrDownloadFailed struct { - File string - Err error -} - -func (e ErrDownloadFailed) Error() string { - return fmt.Sprintf("tuf: failed to download %s: %s", e.File, e.Err) -} - -type ErrDecodeFailed struct { - File string - Err error -} - -func (e ErrDecodeFailed) Error() string { - return fmt.Sprintf("tuf: failed to decode %s: %s", e.File, e.Err) -} - -type ErrMaxDelegations struct { - Target string - MaxDelegations int - SnapshotVersion int64 -} - -func (e ErrMaxDelegations) Error() string { - return fmt.Sprintf("tuf: max delegation of %d reached searching for %s with snapshot version %d", e.MaxDelegations, e.Target, e.SnapshotVersion) -} - -type ErrNotFound struct { - File string -} - -func (e ErrNotFound) Error() string { - return fmt.Sprintf("tuf: file not found: %s", e.File) -} - -func IsNotFound(err error) bool { - _, ok := err.(ErrNotFound) - return ok -} - -type ErrWrongSize struct { - File string - Actual int64 - Expected int64 -} - -func (e ErrWrongSize) Error() string { - return fmt.Sprintf("tuf: unexpected file size: %s (expected %d bytes, got %d bytes)", e.File, e.Expected, e.Actual) -} - -type ErrUnknownTarget struct { - Name string - SnapshotVersion int64 -} - -func (e ErrUnknownTarget) Error() string { - return fmt.Sprintf("tuf: unknown target file: %s with snapshot version %d", e.Name, e.SnapshotVersion) -} - -type ErrMetaTooLarge struct { - Name string - Size int64 - MaxSize int64 -} - -func (e ErrMetaTooLarge) Error() string { - return fmt.Sprintf("tuf: %s size %d bytes greater than maximum %d bytes", e.Name, e.Size, e.MaxSize) -} - -type ErrInvalidURL struct { - URL string -} - -func (e ErrInvalidURL) Error() string { - return fmt.Sprintf("tuf: invalid repository URL %s", e.URL) -} - -type ErrRoleNotInSnapshot struct { - Role string - SnapshotVersion int64 -} - -func (e ErrRoleNotInSnapshot) Error() string { - return fmt.Sprintf("tuf: role %s not in snapshot version %d", e.Role, e.SnapshotVersion) -} diff --git a/vendor/github.com/DataDog/go-tuf/client/file_store.go b/vendor/github.com/DataDog/go-tuf/client/file_store.go deleted file mode 100644 index 520bbe73a3..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/file_store.go +++ /dev/null @@ -1,90 +0,0 @@ -package client - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/fs" -) - -// FileRemoteStore provides a RemoteStore interface compatible -// implementation that can be used where the RemoteStore is backed by a -// fs.FS. This is useful for example in air-gapped environments where there's no -// possibility to make outbound network connections. -// By having this be a fs.FS instead of directories allows the repository to -// be backed by something that's not persisted to disk. -func NewFileRemoteStore(fsys fs.FS, targetDir string) (*FileRemoteStore, error) { - if fsys == nil { - return nil, errors.New("nil fs.FS") - } - t := targetDir - if t == "" { - t = "targets" - } - // Make sure directory exists - d, err := fsys.Open(t) - if err != nil { - return nil, fmt.Errorf("failed to open targets directory %s: %w", t, err) - } - fi, err := d.Stat() - if err != nil { - return nil, fmt.Errorf("failed to stat targets directory %s: %w", t, err) - } - if !fi.IsDir() { - return nil, fmt.Errorf("targets directory not a directory %s", t) - } - - fsysT, err := fs.Sub(fsys, t) - if err != nil { - return nil, fmt.Errorf("failed to open targets directory %s: %w", t, err) - } - return &FileRemoteStore{fsys: fsys, targetDir: fsysT}, nil -} - -type FileRemoteStore struct { - // Meta directory fs - fsys fs.FS - // Target directory fs. - targetDir fs.FS - // In order to be able to make write operations (create, delete) we can't - // use fs.FS for it (it's read only), so we have to know the underlying - // directory that add/delete test methods can use. This is only necessary - // for testing purposes. - testDir string -} - -func (f *FileRemoteStore) GetMeta(name string) (io.ReadCloser, int64, error) { - rc, b, err := f.get(f.fsys, name) - return handleErrors(name, rc, b, err) -} - -func (f *FileRemoteStore) GetTarget(name string) (io.ReadCloser, int64, error) { - rc, b, err := f.get(f.targetDir, name) - return handleErrors(name, rc, b, err) -} - -func (f *FileRemoteStore) get(fsys fs.FS, s string) (io.ReadCloser, int64, error) { - if !fs.ValidPath(s) { - return nil, 0, fmt.Errorf("invalid path %s", s) - } - - b, err := fs.ReadFile(fsys, s) - if err != nil { - return nil, -1, err - } - return io.NopCloser(bytes.NewReader(b)), int64(len(b)), nil -} - -// handleErrors converts NotFound errors to something that TUF knows how to -// handle properly. For example, when looking for n+1 root files, this is a -// signal that it will stop looking. -func handleErrors(name string, rc io.ReadCloser, b int64, err error) (io.ReadCloser, int64, error) { - if err == nil { - return rc, b, err - } - if errors.Is(err, fs.ErrNotExist) { - return rc, b, ErrNotFound{name} - } - return rc, b, err -} diff --git a/vendor/github.com/DataDog/go-tuf/client/local_store.go b/vendor/github.com/DataDog/go-tuf/client/local_store.go deleted file mode 100644 index bb9421f5d4..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/local_store.go +++ /dev/null @@ -1,29 +0,0 @@ -package client - -import ( - "encoding/json" -) - -func MemoryLocalStore() LocalStore { - return make(memoryLocalStore) -} - -type memoryLocalStore map[string]json.RawMessage - -func (m memoryLocalStore) GetMeta() (map[string]json.RawMessage, error) { - return m, nil -} - -func (m memoryLocalStore) SetMeta(name string, meta json.RawMessage) error { - m[name] = meta - return nil -} - -func (m memoryLocalStore) DeleteMeta(name string) error { - delete(m, name) - return nil -} - -func (m memoryLocalStore) Close() error { - return nil -} diff --git a/vendor/github.com/DataDog/go-tuf/client/remote_store.go b/vendor/github.com/DataDog/go-tuf/client/remote_store.go deleted file mode 100644 index 17a63fc593..0000000000 --- a/vendor/github.com/DataDog/go-tuf/client/remote_store.go +++ /dev/null @@ -1,109 +0,0 @@ -package client - -import ( - "fmt" - "io" - "net/http" - "net/url" - "path" - "strconv" - "strings" - "time" -) - -type HTTPRemoteOptions struct { - MetadataPath string - TargetsPath string - UserAgent string - Retries *HTTPRemoteRetries -} - -type HTTPRemoteRetries struct { - Delay time.Duration - Total time.Duration -} - -var DefaultHTTPRetries = &HTTPRemoteRetries{ - Delay: time.Second, - Total: 10 * time.Second, -} - -func HTTPRemoteStore(baseURL string, opts *HTTPRemoteOptions, client *http.Client) (RemoteStore, error) { - if !strings.HasPrefix(baseURL, "http") { - return nil, ErrInvalidURL{baseURL} - } - if opts == nil { - opts = &HTTPRemoteOptions{} - } - if opts.TargetsPath == "" { - opts.TargetsPath = "targets" - } - if client == nil { - client = http.DefaultClient - } - return &httpRemoteStore{baseURL, opts, client}, nil -} - -type httpRemoteStore struct { - baseURL string - opts *HTTPRemoteOptions - cli *http.Client -} - -func (h *httpRemoteStore) GetMeta(name string) (io.ReadCloser, int64, error) { - return h.get(path.Join(h.opts.MetadataPath, name)) -} - -func (h *httpRemoteStore) GetTarget(name string) (io.ReadCloser, int64, error) { - return h.get(path.Join(h.opts.TargetsPath, name)) -} - -func (h *httpRemoteStore) get(s string) (io.ReadCloser, int64, error) { - u := h.url(s) - req, err := http.NewRequest("GET", u, nil) - if err != nil { - return nil, 0, err - } - if h.opts.UserAgent != "" { - req.Header.Set("User-Agent", h.opts.UserAgent) - } - var res *http.Response - if r := h.opts.Retries; r != nil { - for start := time.Now(); time.Since(start) < r.Total; time.Sleep(r.Delay) { - res, err = h.cli.Do(req) - if err == nil && (res.StatusCode < 500 || res.StatusCode > 599) { - break - } - } - } else { - res, err = h.cli.Do(req) - } - if err != nil { - return nil, 0, err - } - - if res.StatusCode == http.StatusNotFound { - res.Body.Close() - return nil, 0, ErrNotFound{s} - } else if res.StatusCode != http.StatusOK { - res.Body.Close() - return nil, 0, &url.Error{ - Op: "GET", - URL: u, - Err: fmt.Errorf("unexpected HTTP status %d", res.StatusCode), - } - } - - size, err := strconv.ParseInt(res.Header.Get("Content-Length"), 10, 0) - if err != nil { - return res.Body, -1, nil - } - return res.Body, size, nil -} - -func (h *httpRemoteStore) url(path string) string { - if !strings.HasPrefix(path, "/") { - path = "/" + path - } - return h.baseURL + path -} diff --git a/vendor/github.com/DataDog/go-tuf/data/hex_bytes.go b/vendor/github.com/DataDog/go-tuf/data/hex_bytes.go deleted file mode 100644 index ec200412ef..0000000000 --- a/vendor/github.com/DataDog/go-tuf/data/hex_bytes.go +++ /dev/null @@ -1,42 +0,0 @@ -package data - -import ( - "crypto/sha256" - "encoding/hex" - "errors" -) - -type HexBytes []byte - -func (b *HexBytes) UnmarshalJSON(data []byte) error { - if len(data) < 2 || len(data)%2 != 0 || data[0] != '"' || data[len(data)-1] != '"' { - return errors.New("tuf: invalid JSON hex bytes") - } - res := make([]byte, hex.DecodedLen(len(data)-2)) - _, err := hex.Decode(res, data[1:len(data)-1]) - if err != nil { - return err - } - *b = res - return nil -} - -func (b HexBytes) MarshalJSON() ([]byte, error) { - res := make([]byte, hex.EncodedLen(len(b))+2) - res[0] = '"' - res[len(res)-1] = '"' - hex.Encode(res[1:], b) - return res, nil -} - -func (b HexBytes) String() string { - return hex.EncodeToString(b) -} - -// 4.5. File formats: targets.json and delegated target roles: -// ...each target path, when hashed with the SHA-256 hash function to produce -// a 64-byte hexadecimal digest (HEX_DIGEST)... -func PathHexDigest(s string) string { - b := sha256.Sum256([]byte(s)) - return hex.EncodeToString(b[:]) -} diff --git a/vendor/github.com/DataDog/go-tuf/data/types.go b/vendor/github.com/DataDog/go-tuf/data/types.go deleted file mode 100644 index eb00489b67..0000000000 --- a/vendor/github.com/DataDog/go-tuf/data/types.go +++ /dev/null @@ -1,348 +0,0 @@ -package data - -import ( - "bytes" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "path" - "strings" - "sync" - "time" - - "github.com/secure-systems-lab/go-securesystemslib/cjson" -) - -type KeyType string - -type KeyScheme string - -type HashAlgorithm string - -const ( - KeyIDLength = sha256.Size * 2 - - KeyTypeEd25519 KeyType = "ed25519" - // From version 1.0.32, the reference implementation defines 'ecdsa', - // not 'ecdsa-sha2-nistp256' for NIST P-256 curves. - KeyTypeECDSA_SHA2_P256 KeyType = "ecdsa" - KeyTypeECDSA_SHA2_P256_OLD_FMT KeyType = "ecdsa-sha2-nistp256" - KeyTypeRSASSA_PSS_SHA256 KeyType = "rsa" - - KeySchemeEd25519 KeyScheme = "ed25519" - KeySchemeECDSA_SHA2_P256 KeyScheme = "ecdsa-sha2-nistp256" - KeySchemeRSASSA_PSS_SHA256 KeyScheme = "rsassa-pss-sha256" - - HashAlgorithmSHA256 HashAlgorithm = "sha256" - HashAlgorithmSHA512 HashAlgorithm = "sha512" -) - -var ( - HashAlgorithms = []HashAlgorithm{HashAlgorithmSHA256, HashAlgorithmSHA512} - ErrPathsAndPathHashesSet = errors.New("tuf: failed validation of delegated target: paths and path_hash_prefixes are both set") -) - -type Signed struct { - Signed json.RawMessage `json:"signed"` - Signatures []Signature `json:"signatures"` -} - -type Signature struct { - KeyID string `json:"keyid"` - Signature HexBytes `json:"sig"` -} - -type PublicKey struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme"` - Algorithms []HashAlgorithm `json:"keyid_hash_algorithms,omitempty"` - Value json.RawMessage `json:"keyval"` - - ids []string - idOnce sync.Once -} - -type PrivateKey struct { - Type KeyType `json:"keytype"` - Scheme KeyScheme `json:"scheme,omitempty"` - Algorithms []HashAlgorithm `json:"keyid_hash_algorithms,omitempty"` - Value json.RawMessage `json:"keyval"` -} - -func (k *PublicKey) IDs() []string { - k.idOnce.Do(func() { - data, err := cjson.EncodeCanonical(k) - if err != nil { - panic(fmt.Errorf("tuf: error creating key ID: %w", err)) - } - digest := sha256.Sum256(data) - k.ids = []string{hex.EncodeToString(digest[:])} - }) - return k.ids -} - -func (k *PublicKey) ContainsID(id string) bool { - for _, keyid := range k.IDs() { - if id == keyid { - return true - } - } - return false -} - -func DefaultExpires(role string) time.Time { - var t time.Time - switch role { - case "root": - t = time.Now().AddDate(1, 0, 0) - case "snapshot": - t = time.Now().AddDate(0, 0, 7) - case "timestamp": - t = time.Now().AddDate(0, 0, 1) - default: - // targets and delegated targets - t = time.Now().AddDate(0, 3, 0) - } - return t.UTC().Round(time.Second) -} - -type Root struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Keys map[string]*PublicKey `json:"keys"` - Roles map[string]*Role `json:"roles"` - Custom *json.RawMessage `json:"custom,omitempty"` - - ConsistentSnapshot bool `json:"consistent_snapshot"` -} - -func NewRoot() *Root { - return &Root{ - Type: "root", - SpecVersion: "1.0", - Expires: DefaultExpires("root"), - Keys: make(map[string]*PublicKey), - Roles: make(map[string]*Role), - ConsistentSnapshot: true, - } -} - -func (r *Root) AddKey(key *PublicKey) bool { - changed := false - for _, id := range key.IDs() { - if _, ok := r.Keys[id]; !ok { - changed = true - r.Keys[id] = key - } - } - return changed -} - -type Role struct { - KeyIDs []string `json:"keyids"` - Threshold int `json:"threshold"` -} - -func (r *Role) AddKeyIDs(ids []string) bool { - roleIDs := make(map[string]struct{}) - for _, id := range r.KeyIDs { - roleIDs[id] = struct{}{} - } - changed := false - for _, id := range ids { - if _, ok := roleIDs[id]; !ok { - changed = true - r.KeyIDs = append(r.KeyIDs, id) - } - } - return changed -} - -type Files map[string]TargetFileMeta - -type Hashes map[string]HexBytes - -func (f Hashes) HashAlgorithms() []string { - funcs := make([]string, 0, len(f)) - for name := range f { - funcs = append(funcs, name) - } - return funcs -} - -type metapathFileMeta struct { - Length int64 `json:"length,omitempty"` - Hashes Hashes `json:"hashes,omitempty"` - Version int64 `json:"version"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -// SnapshotFileMeta is the meta field of a snapshot -// Note: Contains a `custom` field -type SnapshotFileMeta metapathFileMeta - -type SnapshotFiles map[string]SnapshotFileMeta - -type Snapshot struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta SnapshotFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func NewSnapshot() *Snapshot { - return &Snapshot{ - Type: "snapshot", - SpecVersion: "1.0", - Expires: DefaultExpires("snapshot"), - Meta: make(SnapshotFiles), - } -} - -type FileMeta struct { - Length int64 `json:"length"` - Hashes Hashes `json:"hashes"` -} - -type TargetFiles map[string]TargetFileMeta - -type TargetFileMeta struct { - FileMeta - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func (f TargetFileMeta) HashAlgorithms() []string { - return f.FileMeta.Hashes.HashAlgorithms() -} - -type Targets struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Targets TargetFiles `json:"targets"` - Delegations *Delegations `json:"delegations,omitempty"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -// Delegations represents the edges from a parent Targets role to one or more -// delegated target roles. See spec v1.0.19 section 4.5. -type Delegations struct { - Keys map[string]*PublicKey `json:"keys"` - Roles []DelegatedRole `json:"roles"` -} - -// DelegatedRole describes a delegated role, including what paths it is -// reponsible for. See spec v1.0.19 section 4.5. -type DelegatedRole struct { - Name string `json:"name"` - KeyIDs []string `json:"keyids"` - Threshold int `json:"threshold"` - Terminating bool `json:"terminating"` - PathHashPrefixes []string `json:"path_hash_prefixes,omitempty"` - Paths []string `json:"paths"` -} - -// MatchesPath evaluates whether the path patterns or path hash prefixes match -// a given file. This determines whether a delegated role is responsible for -// signing and verifying the file. -func (d *DelegatedRole) MatchesPath(file string) (bool, error) { - if err := d.validatePaths(); err != nil { - return false, err - } - - for _, pattern := range d.Paths { - if matched, _ := path.Match(pattern, file); matched { - return true, nil - } - } - - pathHash := PathHexDigest(file) - for _, hashPrefix := range d.PathHashPrefixes { - if strings.HasPrefix(pathHash, hashPrefix) { - return true, nil - } - } - - return false, nil -} - -// validatePaths enforces the spec -// https://theupdateframework.github.io/specification/v1.0.19/index.html#file-formats-targets -// 'role MUST specify only one of the "path_hash_prefixes" or "paths"' -// Marshalling and unmarshalling JSON will fail and return -// ErrPathsAndPathHashesSet if both fields are set and not empty. -func (d *DelegatedRole) validatePaths() error { - if len(d.PathHashPrefixes) > 0 && len(d.Paths) > 0 { - return ErrPathsAndPathHashesSet - } - - return nil -} - -// MarshalJSON is called when writing the struct to JSON. We validate prior to -// marshalling to ensure that an invalid delegated role can not be serialized -// to JSON. -func (d *DelegatedRole) MarshalJSON() ([]byte, error) { - type delegatedRoleAlias DelegatedRole - - if err := d.validatePaths(); err != nil { - return nil, err - } - - return json.Marshal((*delegatedRoleAlias)(d)) -} - -// UnmarshalJSON is called when reading the struct from JSON. We validate once -// unmarshalled to ensure that an error is thrown if an invalid delegated role -// is read. -func (d *DelegatedRole) UnmarshalJSON(b []byte) error { - type delegatedRoleAlias DelegatedRole - - // Prepare decoder - dec := json.NewDecoder(bytes.NewReader(b)) - - // Unmarshal delegated role - if err := dec.Decode((*delegatedRoleAlias)(d)); err != nil { - return err - } - - return d.validatePaths() -} - -func NewTargets() *Targets { - return &Targets{ - Type: "targets", - SpecVersion: "1.0", - Expires: DefaultExpires("targets"), - Targets: make(TargetFiles), - } -} - -type TimestampFileMeta metapathFileMeta - -type TimestampFiles map[string]TimestampFileMeta - -type Timestamp struct { - Type string `json:"_type"` - SpecVersion string `json:"spec_version"` - Version int64 `json:"version"` - Expires time.Time `json:"expires"` - Meta TimestampFiles `json:"meta"` - Custom *json.RawMessage `json:"custom,omitempty"` -} - -func NewTimestamp() *Timestamp { - return &Timestamp{ - Type: "timestamp", - SpecVersion: "1.0", - Expires: DefaultExpires("timestamp"), - Meta: make(TimestampFiles), - } -} diff --git a/vendor/github.com/DataDog/go-tuf/internal/roles/roles.go b/vendor/github.com/DataDog/go-tuf/internal/roles/roles.go deleted file mode 100644 index 0b134b2a00..0000000000 --- a/vendor/github.com/DataDog/go-tuf/internal/roles/roles.go +++ /dev/null @@ -1,48 +0,0 @@ -package roles - -import ( - "strconv" - "strings" -) - -var TopLevelRoles = map[string]struct{}{ - "root": {}, - "targets": {}, - "snapshot": {}, - "timestamp": {}, -} - -func IsTopLevelRole(name string) bool { - _, ok := TopLevelRoles[name] - return ok -} - -func IsDelegatedTargetsRole(name string) bool { - return !IsTopLevelRole(name) -} - -func IsTopLevelManifest(name string) bool { - if IsVersionedManifest(name) { - var found bool - _, name, found = strings.Cut(name, ".") - if !found { - panic("expected a versioned manifest of the form x.role.json") - } - } - return IsTopLevelRole(strings.TrimSuffix(name, ".json")) -} - -func IsDelegatedTargetsManifest(name string) bool { - return !IsTopLevelManifest(name) -} - -func IsVersionedManifest(name string) bool { - parts := strings.Split(name, ".") - // Versioned manifests have the form "x.role.json" - if len(parts) < 3 { - return false - } - - _, err := strconv.Atoi(parts[0]) - return err == nil -} diff --git a/vendor/github.com/DataDog/go-tuf/internal/sets/strings.go b/vendor/github.com/DataDog/go-tuf/internal/sets/strings.go deleted file mode 100644 index 7eee57d094..0000000000 --- a/vendor/github.com/DataDog/go-tuf/internal/sets/strings.go +++ /dev/null @@ -1,24 +0,0 @@ -package sets - -func StringSliceToSet(items []string) map[string]struct{} { - s := map[string]struct{}{} - for _, item := range items { - s[item] = struct{}{} - } - return s -} - -func StringSetToSlice(items map[string]struct{}) []string { - ret := []string{} - - for k := range items { - ret = append(ret, k) - } - - return ret -} - -func DeduplicateStrings(items []string) []string { - s := StringSliceToSet(items) - return StringSetToSlice(s) -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/deprecated_ecdsa.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/deprecated_ecdsa.go deleted file mode 100644 index 6c4c206827..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/deprecated_ecdsa.go +++ /dev/null @@ -1,101 +0,0 @@ -package keys - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/sha256" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/DataDog/go-tuf/data" -) - -func NewDeprecatedEcdsaVerifier() Verifier { - return &ecdsaVerifierWithDeprecatedSupport{} -} - -type ecdsaVerifierWithDeprecatedSupport struct { - key *data.PublicKey - // This will switch based on whether this is a PEM-encoded key - // or a deprecated hex-encoded key. - Verifier -} - -func (p *ecdsaVerifierWithDeprecatedSupport) UnmarshalPublicKey(key *data.PublicKey) error { - p.key = key - pemVerifier := &EcdsaVerifier{} - if err := pemVerifier.UnmarshalPublicKey(key); err != nil { - // Try the deprecated hex-encoded verifier - hexVerifier := &deprecatedP256Verifier{} - if err := hexVerifier.UnmarshalPublicKey(key); err != nil { - return err - } - p.Verifier = hexVerifier - return nil - } - p.Verifier = pemVerifier - return nil -} - -/* - Deprecated ecdsaVerifier that used hex-encoded public keys. - This MAY be used to verify existing metadata that used this - old format. This will be deprecated soon, ensure that repositories - are re-signed and clients receieve a fully compliant root. -*/ - -type deprecatedP256Verifier struct { - PublicKey data.HexBytes `json:"public"` - key *data.PublicKey -} - -func (p *deprecatedP256Verifier) Public() string { - return p.PublicKey.String() -} - -func (p *deprecatedP256Verifier) Verify(msg, sigBytes []byte) error { - x, y := elliptic.Unmarshal(elliptic.P256(), p.PublicKey) - k := &ecdsa.PublicKey{ - Curve: elliptic.P256(), - X: x, - Y: y, - } - - hash := sha256.Sum256(msg) - - if !ecdsa.VerifyASN1(k, hash[:], sigBytes) { - return errors.New("tuf: deprecated ecdsa signature verification failed") - } - return nil -} - -func (p *deprecatedP256Verifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *deprecatedP256Verifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - curve := elliptic.P256() - - // Parse as uncompressed marshalled point. - x, _ := elliptic.Unmarshal(curve, p.PublicKey) - if x == nil { - return errors.New("tuf: invalid ecdsa public key point") - } - - p.key = key - return nil -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/ecdsa.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/ecdsa.go deleted file mode 100644 index ea75b97e87..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/ecdsa.go +++ /dev/null @@ -1,173 +0,0 @@ -package keys - -import ( - "bytes" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/sha256" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - - "github.com/DataDog/go-tuf/data" -) - -func init() { - // Note: we use LoadOrStore here to prevent accidentally overriding the - // an explicit deprecated ECDSA verifier. - // TODO: When deprecated ECDSA is removed, this can switch back to Store. - VerifierMap.LoadOrStore(data.KeyTypeECDSA_SHA2_P256_OLD_FMT, NewEcdsaVerifier) - VerifierMap.LoadOrStore(data.KeyTypeECDSA_SHA2_P256, NewEcdsaVerifier) - SignerMap.Store(data.KeyTypeECDSA_SHA2_P256_OLD_FMT, newEcdsaSigner) - SignerMap.Store(data.KeyTypeECDSA_SHA2_P256, newEcdsaSigner) -} - -func NewEcdsaVerifier() Verifier { - return &EcdsaVerifier{} -} - -func newEcdsaSigner() Signer { - return &ecdsaSigner{} -} - -type EcdsaVerifier struct { - PublicKey *PKIXPublicKey `json:"public"` - ecdsaKey *ecdsa.PublicKey - key *data.PublicKey -} - -func (p *EcdsaVerifier) Public() string { - // This is already verified to succeed when unmarshalling a public key. - r, err := x509.MarshalPKIXPublicKey(p.ecdsaKey) - if err != nil { - // TODO: Gracefully handle these errors. - // See https://github.com/DataDog/go-tuf/issues/363 - panic(err) - } - return string(r) -} - -func (p *EcdsaVerifier) Verify(msg, sigBytes []byte) error { - hash := sha256.Sum256(msg) - - if !ecdsa.VerifyASN1(p.ecdsaKey, hash[:], sigBytes) { - return errors.New("tuf: ecdsa signature verification failed") - } - return nil -} - -func (p *EcdsaVerifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *EcdsaVerifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - ecdsaKey, ok := p.PublicKey.PublicKey.(*ecdsa.PublicKey) - if !ok { - return fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(ecdsaKey); err != nil { - return fmt.Errorf("marshalling to PKIX key: invalid public key") - } - - p.ecdsaKey = ecdsaKey - p.key = key - return nil -} - -type ecdsaSigner struct { - *ecdsa.PrivateKey -} - -type ecdsaPrivateKeyValue struct { - Private string `json:"private"` - Public *PKIXPublicKey `json:"public"` -} - -func (s *ecdsaSigner) PublicData() *data.PublicKey { - // This uses a trusted public key JSON format with a trusted Public value. - keyValBytes, _ := json.Marshal(EcdsaVerifier{PublicKey: &PKIXPublicKey{PublicKey: s.Public()}}) - return &data.PublicKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s *ecdsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return ecdsa.SignASN1(rand.Reader, s.PrivateKey, hash[:]) -} - -func (s *ecdsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - priv, err := x509.MarshalECPrivateKey(s.PrivateKey) - if err != nil { - return nil, err - } - pemKey := pem.EncodeToMemory(&pem.Block{Type: "EC PRIVATE KEY", Bytes: priv}) - val, err := json.Marshal(ecdsaPrivateKeyValue{ - Private: string(pemKey), - Public: &PKIXPublicKey{PublicKey: s.Public()}, - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeECDSA_SHA2_P256, - Scheme: data.KeySchemeECDSA_SHA2_P256, - Algorithms: data.HashAlgorithms, - Value: val, - }, nil -} - -func (s *ecdsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - val := ecdsaPrivateKeyValue{} - if err := json.Unmarshal(key.Value, &val); err != nil { - return err - } - block, _ := pem.Decode([]byte(val.Private)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "EC PRIVATE KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - k, err := x509.ParseECPrivateKey(block.Bytes) - if err != nil { - return err - } - if k.Curve != elliptic.P256() { - return errors.New("unsupported ecdsa curve") - } - if _, err := json.Marshal(EcdsaVerifier{ - PublicKey: &PKIXPublicKey{PublicKey: k.Public()}}); err != nil { - return fmt.Errorf("invalid public key: %s", err) - } - - s.PrivateKey = k - return nil -} - -func GenerateEcdsaKey() (*ecdsaSigner, error) { - privkey, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) - if err != nil { - return nil, err - } - return &ecdsaSigner{privkey}, nil -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/ed25519.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/ed25519.go deleted file mode 100644 index 4667147fda..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/ed25519.go +++ /dev/null @@ -1,161 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/ed25519" - "crypto/rand" - "crypto/subtle" - "encoding/json" - "errors" - "fmt" - "io" - - "github.com/DataDog/go-tuf/data" -) - -func init() { - SignerMap.Store(data.KeyTypeEd25519, NewEd25519Signer) - VerifierMap.Store(data.KeyTypeEd25519, NewEd25519Verifier) -} - -func NewEd25519Signer() Signer { - return &ed25519Signer{} -} - -func NewEd25519Verifier() Verifier { - return &ed25519Verifier{} -} - -type ed25519Verifier struct { - PublicKey data.HexBytes `json:"public"` - key *data.PublicKey -} - -func (e *ed25519Verifier) Public() string { - return string(e.PublicKey) -} - -func (e *ed25519Verifier) Verify(msg, sig []byte) error { - if !ed25519.Verify([]byte(e.PublicKey), msg, sig) { - return errors.New("tuf: ed25519 signature verification failed") - } - return nil -} - -func (e *ed25519Verifier) MarshalPublicKey() *data.PublicKey { - return e.key -} - -func (e *ed25519Verifier) UnmarshalPublicKey(key *data.PublicKey) error { - e.key = key - - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(e); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - if n := len(e.PublicKey); n != ed25519.PublicKeySize { - return fmt.Errorf("tuf: unexpected public key length for ed25519 key, expected %d, got %d", ed25519.PublicKeySize, n) - } - return nil -} - -type Ed25519PrivateKeyValue struct { - Public data.HexBytes `json:"public"` - Private data.HexBytes `json:"private"` -} - -type ed25519Signer struct { - ed25519.PrivateKey -} - -func GenerateEd25519Key() (*ed25519Signer, error) { - _, private, err := ed25519.GenerateKey(rand.Reader) - if err != nil { - return nil, err - } - if err != nil { - return nil, err - } - return &ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(private)), - }, nil -} - -func NewEd25519SignerFromKey(keyValue Ed25519PrivateKeyValue) *ed25519Signer { - return &ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(keyValue.Private)), - } -} - -func (e *ed25519Signer) SignMessage(message []byte) ([]byte, error) { - return e.Sign(rand.Reader, message, crypto.Hash(0)) -} - -func (e *ed25519Signer) MarshalPrivateKey() (*data.PrivateKey, error) { - valueBytes, err := json.Marshal(Ed25519PrivateKeyValue{ - Public: data.HexBytes([]byte(e.PrivateKey.Public().(ed25519.PublicKey))), - Private: data.HexBytes(e.PrivateKey), - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: valueBytes, - }, nil -} - -func (e *ed25519Signer) UnmarshalPrivateKey(key *data.PrivateKey) error { - keyValue := &Ed25519PrivateKeyValue{} - - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(keyValue); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the private key is truncated or too large: %w", err) - } - } - - // Check private key length - if n := len(keyValue.Private); n != ed25519.PrivateKeySize { - return fmt.Errorf("tuf: invalid ed25519 private key length, expected %d, got %d", ed25519.PrivateKeySize, n) - } - - // Generate public key from private key - pub, _, err := ed25519.GenerateKey(bytes.NewReader(keyValue.Private)) - if err != nil { - return fmt.Errorf("tuf: unable to derive public key from private key: %w", err) - } - - // Compare keys - if subtle.ConstantTimeCompare(keyValue.Public, pub) != 1 { - return errors.New("tuf: public and private keys don't match") - } - - // Prepare signer - *e = ed25519Signer{ - PrivateKey: ed25519.PrivateKey(data.HexBytes(keyValue.Private)), - } - return nil -} - -func (e *ed25519Signer) PublicData() *data.PublicKey { - keyValBytes, _ := json.Marshal(ed25519Verifier{PublicKey: []byte(e.PrivateKey.Public().(ed25519.PublicKey))}) - return &data.PublicKey{ - Type: data.KeyTypeEd25519, - Scheme: data.KeySchemeEd25519, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/keys.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/keys.go deleted file mode 100644 index 7fc25316e1..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/keys.go +++ /dev/null @@ -1,82 +0,0 @@ -package keys - -import ( - "errors" - "fmt" - "sync" - - "github.com/DataDog/go-tuf/data" -) - -// MaxJSONKeySize defines the maximum length of a JSON payload. -const MaxJSONKeySize = 512 * 1024 // 512Kb - -// SignerMap stores mapping between key type strings and signer constructors. -var SignerMap sync.Map - -// Verifier stores mapping between key type strings and verifier constructors. -var VerifierMap sync.Map - -var ( - ErrInvalid = errors.New("tuf: signature verification failed") - ErrInvalidKey = errors.New("invalid key") -) - -// A Verifier verifies public key signatures. -type Verifier interface { - // UnmarshalPublicKey takes key data to a working verifier implementation for the key type. - // This performs any validation over the data.PublicKey to ensure that the verifier is usable - // to verify signatures. - UnmarshalPublicKey(key *data.PublicKey) error - - // MarshalPublicKey returns the data.PublicKey object associated with the verifier. - MarshalPublicKey() *data.PublicKey - - // This is the public string used as a unique identifier for the verifier instance. - Public() string - - // Verify takes a message and signature, all as byte slices, - // and determines whether the signature is valid for the given - // key and message. - Verify(msg, sig []byte) error -} - -type Signer interface { - // MarshalPrivateKey returns the private key data. - MarshalPrivateKey() (*data.PrivateKey, error) - - // UnmarshalPrivateKey takes private key data to a working Signer implementation for the key type. - UnmarshalPrivateKey(key *data.PrivateKey) error - - // Returns the public data.PublicKey from the private key - PublicData() *data.PublicKey - - // Sign returns the signature of the message. - // The signer is expected to do its own hashing, so the full message will be - // provided as the message to Sign with a zero opts.HashFunc(). - SignMessage(message []byte) ([]byte, error) -} - -func GetVerifier(key *data.PublicKey) (Verifier, error) { - st, ok := VerifierMap.Load(key.Type) - if !ok { - return nil, ErrInvalidKey - } - s := st.(func() Verifier)() - if err := s.UnmarshalPublicKey(key); err != nil { - return nil, fmt.Errorf("tuf: error unmarshalling key: %w", err) - } - return s, nil -} - -func GetSigner(key *data.PrivateKey) (Signer, error) { - st, ok := SignerMap.Load(key.Type) - if !ok { - return nil, ErrInvalidKey - } - s := st.(func() Signer)() - if err := s.UnmarshalPrivateKey(key); err != nil { - return nil, fmt.Errorf("tuf: error unmarshalling key: %w", err) - } - return s, nil -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/pkix.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/pkix.go deleted file mode 100644 index e58d4c9f83..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/pkix.go +++ /dev/null @@ -1,56 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" -) - -type PKIXPublicKey struct { - crypto.PublicKey -} - -func (p *PKIXPublicKey) MarshalJSON() ([]byte, error) { - bytes, err := x509.MarshalPKIXPublicKey(p.PublicKey) - if err != nil { - return nil, err - } - pemBytes := pem.EncodeToMemory(&pem.Block{ - Type: "PUBLIC KEY", - Bytes: bytes, - }) - return json.Marshal(string(pemBytes)) -} - -func (p *PKIXPublicKey) UnmarshalJSON(b []byte) error { - var pemValue string - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(b), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(&pemValue); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - block, _ := pem.Decode([]byte(pemValue)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "PUBLIC KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - pub, err := x509.ParsePKIXPublicKey(block.Bytes) - if err != nil { - return err - } - p.PublicKey = pub - return nil -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/keys/rsa.go b/vendor/github.com/DataDog/go-tuf/pkg/keys/rsa.go deleted file mode 100644 index 17d7690a7b..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/keys/rsa.go +++ /dev/null @@ -1,162 +0,0 @@ -package keys - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "encoding/json" - "encoding/pem" - "errors" - "fmt" - "io" - - "github.com/DataDog/go-tuf/data" -) - -func init() { - VerifierMap.Store(data.KeyTypeRSASSA_PSS_SHA256, newRsaVerifier) - SignerMap.Store(data.KeyTypeRSASSA_PSS_SHA256, newRsaSigner) -} - -func newRsaVerifier() Verifier { - return &rsaVerifier{} -} - -func newRsaSigner() Signer { - return &rsaSigner{} -} - -type rsaVerifier struct { - PublicKey *PKIXPublicKey `json:"public"` - rsaKey *rsa.PublicKey - key *data.PublicKey -} - -func (p *rsaVerifier) Public() string { - // This is already verified to succeed when unmarshalling a public key. - r, err := x509.MarshalPKIXPublicKey(p.rsaKey) - if err != nil { - // TODO: Gracefully handle these errors. - // See https://github.com/DataDog/go-tuf/issues/363 - panic(err) - } - return string(r) -} - -func (p *rsaVerifier) Verify(msg, sigBytes []byte) error { - hash := sha256.Sum256(msg) - - return rsa.VerifyPSS(p.rsaKey, crypto.SHA256, hash[:], sigBytes, &rsa.PSSOptions{}) -} - -func (p *rsaVerifier) MarshalPublicKey() *data.PublicKey { - return p.key -} - -func (p *rsaVerifier) UnmarshalPublicKey(key *data.PublicKey) error { - // Prepare decoder limited to 512Kb - dec := json.NewDecoder(io.LimitReader(bytes.NewReader(key.Value), MaxJSONKeySize)) - - // Unmarshal key value - if err := dec.Decode(p); err != nil { - if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { - return fmt.Errorf("tuf: the public key is truncated or too large: %w", err) - } - return err - } - - rsaKey, ok := p.PublicKey.PublicKey.(*rsa.PublicKey) - if !ok { - return fmt.Errorf("invalid public key") - } - - if _, err := x509.MarshalPKIXPublicKey(rsaKey); err != nil { - return fmt.Errorf("marshalling to PKIX key: invalid public key") - } - - p.rsaKey = rsaKey - p.key = key - return nil -} - -type rsaSigner struct { - *rsa.PrivateKey -} - -type rsaPrivateKeyValue struct { - Private string `json:"private"` - Public *PKIXPublicKey `json:"public"` -} - -func (s *rsaSigner) PublicData() *data.PublicKey { - keyValBytes, _ := json.Marshal(rsaVerifier{PublicKey: &PKIXPublicKey{PublicKey: s.Public()}}) - return &data.PublicKey{ - Type: data.KeyTypeRSASSA_PSS_SHA256, - Scheme: data.KeySchemeRSASSA_PSS_SHA256, - Algorithms: data.HashAlgorithms, - Value: keyValBytes, - } -} - -func (s *rsaSigner) SignMessage(message []byte) ([]byte, error) { - hash := sha256.Sum256(message) - return rsa.SignPSS(rand.Reader, s.PrivateKey, crypto.SHA256, hash[:], &rsa.PSSOptions{}) -} - -func (s *rsaSigner) ContainsID(id string) bool { - return s.PublicData().ContainsID(id) -} - -func (s *rsaSigner) MarshalPrivateKey() (*data.PrivateKey, error) { - priv := x509.MarshalPKCS1PrivateKey(s.PrivateKey) - pemKey := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Bytes: priv}) - val, err := json.Marshal(rsaPrivateKeyValue{ - Private: string(pemKey), - Public: &PKIXPublicKey{PublicKey: s.Public()}, - }) - if err != nil { - return nil, err - } - return &data.PrivateKey{ - Type: data.KeyTypeRSASSA_PSS_SHA256, - Scheme: data.KeySchemeRSASSA_PSS_SHA256, - Algorithms: data.HashAlgorithms, - Value: val, - }, nil -} - -func (s *rsaSigner) UnmarshalPrivateKey(key *data.PrivateKey) error { - val := rsaPrivateKeyValue{} - if err := json.Unmarshal(key.Value, &val); err != nil { - return err - } - block, _ := pem.Decode([]byte(val.Private)) - if block == nil { - return errors.New("invalid PEM value") - } - if block.Type != "RSA PRIVATE KEY" { - return fmt.Errorf("invalid block type: %s", block.Type) - } - k, err := x509.ParsePKCS1PrivateKey(block.Bytes) - if err != nil { - return err - } - if _, err := json.Marshal(rsaVerifier{ - PublicKey: &PKIXPublicKey{PublicKey: k.Public()}}); err != nil { - return fmt.Errorf("invalid public key: %s", err) - } - - s.PrivateKey = k - return nil -} - -func GenerateRsaKey() (*rsaSigner, error) { - privkey, err := rsa.GenerateKey(rand.Reader, 2048) - if err != nil { - return nil, err - } - return &rsaSigner{privkey}, nil -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/targets/delegation.go b/vendor/github.com/DataDog/go-tuf/pkg/targets/delegation.go deleted file mode 100644 index d155d070f4..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/targets/delegation.go +++ /dev/null @@ -1,102 +0,0 @@ -package targets - -import ( - "errors" - - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/internal/sets" - "github.com/DataDog/go-tuf/verify" -) - -type Delegation struct { - Delegator string - Delegatee data.DelegatedRole - DB *verify.DB -} - -type delegationsIterator struct { - stack []Delegation - target string - visitedRoles map[string]struct{} - parents map[string]string -} - -var ErrTopLevelTargetsRoleMissing = errors.New("tuf: top level targets role missing from top level keys DB") - -// NewDelegationsIterator initialises an iterator with a first step -// on top level targets. -func NewDelegationsIterator(target string, topLevelKeysDB *verify.DB) (*delegationsIterator, error) { - targetsRole := topLevelKeysDB.GetRole("targets") - if targetsRole == nil { - return nil, ErrTopLevelTargetsRoleMissing - } - - i := &delegationsIterator{ - target: target, - stack: []Delegation{ - { - Delegatee: data.DelegatedRole{ - Name: "targets", - KeyIDs: sets.StringSetToSlice(targetsRole.KeyIDs), - Threshold: targetsRole.Threshold, - }, - DB: topLevelKeysDB, - }, - }, - visitedRoles: make(map[string]struct{}), - parents: make(map[string]string), - } - return i, nil -} - -func (d *delegationsIterator) Next() (value Delegation, ok bool) { - if len(d.stack) == 0 { - return Delegation{}, false - } - delegation := d.stack[len(d.stack)-1] - d.stack = d.stack[:len(d.stack)-1] - - // 5.6.7.1: If this role has been visited before, then skip this role (so - // that cycles in the delegation graph are avoided). - roleName := delegation.Delegatee.Name - if _, ok := d.visitedRoles[roleName]; ok { - return d.Next() - } - d.visitedRoles[roleName] = struct{}{} - - // 5.6.7.2 trim delegations to visit, only the current role and its delegations - // will be considered - // https://github.com/theupdateframework/specification/issues/168 - if delegation.Delegatee.Terminating { - // Empty the stack. - d.stack = d.stack[0:0] - } - return delegation, true -} - -func (d *delegationsIterator) Add(roles []data.DelegatedRole, delegator string, db *verify.DB) error { - for i := len(roles) - 1; i >= 0; i-- { - // Push the roles onto the stack in reverse so we get an preorder traversal - // of the delegations graph. - r := roles[i] - matchesPath, err := r.MatchesPath(d.target) - if err != nil { - return err - } - if matchesPath { - delegation := Delegation{ - Delegator: delegator, - Delegatee: r, - DB: db, - } - d.stack = append(d.stack, delegation) - d.parents[r.Name] = delegator - } - } - - return nil -} - -func (d *delegationsIterator) Parent(role string) string { - return d.parents[role] -} diff --git a/vendor/github.com/DataDog/go-tuf/pkg/targets/hash_bins.go b/vendor/github.com/DataDog/go-tuf/pkg/targets/hash_bins.go deleted file mode 100644 index 95f4405d42..0000000000 --- a/vendor/github.com/DataDog/go-tuf/pkg/targets/hash_bins.go +++ /dev/null @@ -1,113 +0,0 @@ -package targets - -import ( - "fmt" - "strconv" - "strings" -) - -const MinDelegationHashPrefixBitLen = 1 -const MaxDelegationHashPrefixBitLen = 32 - -// hexEncode formats x as a hex string. The hex string is left padded with -// zeros to padWidth, if necessary. -func hexEncode(x uint64, padWidth int) string { - // Benchmarked to be more than 10x faster than padding with Sprintf. - s := strconv.FormatUint(x, 16) - if len(s) >= padWidth { - return s - } - return strings.Repeat("0", padWidth-len(s)) + s -} - -const bitsPerHexDigit = 4 - -// numHexDigits returns the number of hex digits required to encode the given -// number of bits. -func numHexDigits(numBits int) int { - // ceil(numBits / bitsPerHexDigit) - return ((numBits - 1) / bitsPerHexDigit) + 1 -} - -// HashBins represents an ordered list of hash bin target roles, which together -// partition the space of target path hashes equal-sized buckets based on path -// has prefix. -type HashBins struct { - rolePrefix string - bitLen int - hexDigitLen int - - numBins uint64 - numPrefixesPerBin uint64 -} - -// NewHashBins creates a HashBins partitioning with 2^bitLen buckets. -func NewHashBins(rolePrefix string, bitLen int) (*HashBins, error) { - if bitLen < MinDelegationHashPrefixBitLen || bitLen > MaxDelegationHashPrefixBitLen { - return nil, fmt.Errorf("bitLen is out of bounds, should be between %v and %v inclusive", MinDelegationHashPrefixBitLen, MaxDelegationHashPrefixBitLen) - } - - hexDigitLen := numHexDigits(bitLen) - numBins := uint64(1) << bitLen - - numPrefixesTotal := uint64(1) << (bitsPerHexDigit * hexDigitLen) - numPrefixesPerBin := numPrefixesTotal / numBins - - return &HashBins{ - rolePrefix: rolePrefix, - bitLen: bitLen, - hexDigitLen: hexDigitLen, - numBins: numBins, - numPrefixesPerBin: numPrefixesPerBin, - }, nil -} - -// NumBins returns the number of hash bin partitions. -func (hb *HashBins) NumBins() uint64 { - return hb.numBins -} - -// GetBin returns the HashBin at index i, or nil if i is out of bounds. -func (hb *HashBins) GetBin(i uint64) *HashBin { - if i >= hb.numBins { - return nil - } - - return &HashBin{ - rolePrefix: hb.rolePrefix, - hexDigitLen: hb.hexDigitLen, - first: i * hb.numPrefixesPerBin, - last: ((i + 1) * hb.numPrefixesPerBin) - 1, - } -} - -// HashBin represents a hex prefix range. First should be less than Last. -type HashBin struct { - rolePrefix string - hexDigitLen int - first uint64 - last uint64 -} - -// RoleName returns the name of the role that signs for the HashBin. -func (b *HashBin) RoleName() string { - if b.first == b.last { - return b.rolePrefix + hexEncode(b.first, b.hexDigitLen) - } - - return b.rolePrefix + hexEncode(b.first, b.hexDigitLen) + "-" + hexEncode(b.last, b.hexDigitLen) -} - -// HashPrefixes returns a slice of all hash prefixes in the bin. -func (b *HashBin) HashPrefixes() []string { - n := int(b.last - b.first + 1) - ret := make([]string, int(n)) - - x := b.first - for i := 0; i < n; i++ { - ret[i] = hexEncode(x, b.hexDigitLen) - x++ - } - - return ret -} diff --git a/vendor/github.com/DataDog/go-tuf/util/util.go b/vendor/github.com/DataDog/go-tuf/util/util.go deleted file mode 100644 index a9b23b007d..0000000000 --- a/vendor/github.com/DataDog/go-tuf/util/util.go +++ /dev/null @@ -1,332 +0,0 @@ -package util - -import ( - "bytes" - "crypto/hmac" - "crypto/sha256" - "crypto/sha512" - "encoding/hex" - "encoding/json" - "fmt" - "hash" - "io" - "os" - "path" - "path/filepath" - "strconv" - "strings" - - "github.com/DataDog/go-tuf/data" -) - -type ErrWrongLength struct { - Expected int64 - Actual int64 -} - -func (e ErrWrongLength) Error() string { - return fmt.Sprintf("wrong length, expected %d got %d", e.Expected, e.Actual) -} - -type ErrWrongVersion struct { - Expected int64 - Actual int64 -} - -func (e ErrWrongVersion) Error() string { - return fmt.Sprintf("wrong version, expected %d got %d", e.Expected, e.Actual) -} - -type ErrWrongHash struct { - Type string - Expected data.HexBytes - Actual data.HexBytes -} - -func (e ErrWrongHash) Error() string { - return fmt.Sprintf("wrong %s hash, expected %s got %s", e.Type, hex.EncodeToString(e.Expected), hex.EncodeToString(e.Actual)) -} - -type ErrNoCommonHash struct { - Expected data.Hashes - Actual data.Hashes -} - -func (e ErrNoCommonHash) Error() string { - types := func(a data.Hashes) []string { - t := make([]string, 0, len(a)) - for typ := range a { - t = append(t, typ) - } - return t - } - return fmt.Sprintf("no common hash function, expected one of %s, got %s", types(e.Expected), types(e.Actual)) -} - -type ErrUnknownHashAlgorithm struct { - Name string -} - -func (e ErrUnknownHashAlgorithm) Error() string { - return fmt.Sprintf("unknown hash algorithm: %s", e.Name) -} - -type PassphraseFunc func(role string, confirm bool, change bool) ([]byte, error) - -func FileMetaEqual(actual data.FileMeta, expected data.FileMeta) error { - if actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - - return nil -} - -func BytesMatchLenAndHashes(fetched []byte, length int64, hashes data.Hashes) error { - flen := int64(len(fetched)) - if length != 0 && flen != length { - return ErrWrongLength{length, flen} - } - - for alg, expected := range hashes { - var h hash.Hash - switch alg { - case "sha256": - h = sha256.New() - case "sha512": - h = sha512.New() - default: - return ErrUnknownHashAlgorithm{alg} - } - h.Write(fetched) - hash := h.Sum(nil) - if !hmac.Equal(hash, expected) { - return ErrWrongHash{alg, expected, hash} - } - } - - return nil -} - -func hashEqual(actual data.Hashes, expected data.Hashes) error { - hashChecked := false - for typ, hash := range expected { - if h, ok := actual[typ]; ok { - hashChecked = true - if !hmac.Equal(h, hash) { - return ErrWrongHash{typ, hash, h} - } - } - } - if !hashChecked { - return ErrNoCommonHash{expected, actual} - } - return nil -} - -func VersionEqual(actual int64, expected int64) error { - if actual != expected { - return ErrWrongVersion{expected, actual} - } - return nil -} - -func SnapshotFileMetaEqual(actual data.SnapshotFileMeta, expected data.SnapshotFileMeta) error { - // TUF-1.0 no longer considers the length and hashes to be a required - // member of snapshots. However they are considering requiring hashes - // for delegated roles to avoid an attack described in Section 5.6 of - // the Mercury paper: - // https://github.com/theupdateframework/specification/pull/40 - if expected.Length != 0 && actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - // 5.6.2 - Check against snapshot role's targets hash - if len(expected.Hashes) != 0 { - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - } - // 5.6.4 - Check against snapshot role's snapshot version - if err := VersionEqual(actual.Version, expected.Version); err != nil { - return err - } - - return nil -} - -func TargetFileMetaEqual(actual data.TargetFileMeta, expected data.TargetFileMeta) error { - return FileMetaEqual(actual.FileMeta, expected.FileMeta) -} - -func TimestampFileMetaEqual(actual data.TimestampFileMeta, expected data.TimestampFileMeta) error { - // TUF no longer considers the length and hashes to be a required - // member of Timestamp. - if expected.Length != 0 && actual.Length != expected.Length { - return ErrWrongLength{expected.Length, actual.Length} - } - // 5.5.2 - Check against timestamp role's snapshot hash - if len(expected.Hashes) != 0 { - if err := hashEqual(actual.Hashes, expected.Hashes); err != nil { - return err - } - } - // 5.5.4 - Check against timestamp role's snapshot version - if err := VersionEqual(actual.Version, expected.Version); err != nil { - return err - } - - return nil -} - -const defaultHashAlgorithm = "sha512" - -func GenerateFileMeta(r io.Reader, hashAlgorithms ...string) (data.FileMeta, error) { - if len(hashAlgorithms) == 0 { - hashAlgorithms = []string{defaultHashAlgorithm} - } - hashes := make(map[string]hash.Hash, len(hashAlgorithms)) - for _, hashAlgorithm := range hashAlgorithms { - var h hash.Hash - switch hashAlgorithm { - case "sha256": - h = sha256.New() - case "sha512": - h = sha512.New() - default: - return data.FileMeta{}, ErrUnknownHashAlgorithm{hashAlgorithm} - } - hashes[hashAlgorithm] = h - r = io.TeeReader(r, h) - } - n, err := io.Copy(io.Discard, r) - if err != nil { - return data.FileMeta{}, err - } - m := data.FileMeta{Length: n, Hashes: make(data.Hashes, len(hashes))} - for hashAlgorithm, h := range hashes { - m.Hashes[hashAlgorithm] = h.Sum(nil) - } - return m, nil -} - -type versionedMeta struct { - Version int64 `json:"version"` -} - -func generateVersionedFileMeta(r io.Reader, hashAlgorithms ...string) (data.FileMeta, int64, error) { - b, err := io.ReadAll(r) - if err != nil { - return data.FileMeta{}, 0, err - } - - m, err := GenerateFileMeta(bytes.NewReader(b), hashAlgorithms...) - if err != nil { - return data.FileMeta{}, 0, err - } - - s := data.Signed{} - if err := json.Unmarshal(b, &s); err != nil { - return data.FileMeta{}, 0, err - } - - vm := versionedMeta{} - if err := json.Unmarshal(s.Signed, &vm); err != nil { - return data.FileMeta{}, 0, err - } - - return m, vm.Version, nil -} - -func GenerateSnapshotFileMeta(r io.Reader, hashAlgorithms ...string) (data.SnapshotFileMeta, error) { - m, v, err := generateVersionedFileMeta(r, hashAlgorithms...) - if err != nil { - return data.SnapshotFileMeta{}, err - } - return data.SnapshotFileMeta{ - Length: m.Length, - Hashes: m.Hashes, - Version: v, - }, nil -} - -func GenerateTargetFileMeta(r io.Reader, hashAlgorithms ...string) (data.TargetFileMeta, error) { - m, err := GenerateFileMeta(r, hashAlgorithms...) - if err != nil { - return data.TargetFileMeta{}, err - } - return data.TargetFileMeta{ - FileMeta: m, - }, nil -} - -func GenerateTimestampFileMeta(r io.Reader, hashAlgorithms ...string) (data.TimestampFileMeta, error) { - m, v, err := generateVersionedFileMeta(r, hashAlgorithms...) - if err != nil { - return data.TimestampFileMeta{}, err - } - return data.TimestampFileMeta{ - Length: m.Length, - Hashes: m.Hashes, - Version: v, - }, nil -} - -func NormalizeTarget(p string) string { - // FIXME(TUF-0.9) TUF-1.0 is considering banning paths that begin with - // a leading path separator, to avoid surprising behavior when joining - // target and delgated paths. python-tuf raises an exception if any - // path starts with '/', but since we need to be cross compatible with - // TUF-0.9 we still need to support leading slashes. For now, we will - // just strip them out, but eventually we should also consider turning - // them into an error. - return strings.TrimPrefix(path.Join("/", p), "/") -} - -func VersionedPath(p string, version int64) string { - return path.Join(path.Dir(p), strconv.FormatInt(version, 10)+"."+path.Base(p)) -} - -func HashedPaths(p string, hashes data.Hashes) []string { - paths := make([]string, 0, len(hashes)) - for _, hash := range hashes { - hashedPath := path.Join(path.Dir(p), hash.String()+"."+path.Base(p)) - paths = append(paths, hashedPath) - } - return paths -} - -func AtomicallyWriteFile(filename string, data []byte, perm os.FileMode) error { - dir, name := filepath.Split(filename) - f, err := os.CreateTemp(dir, name) - if err != nil { - return err - } - - _, err = f.Write(data) - if err != nil { - f.Close() - os.Remove(f.Name()) - return err - } - - if err = f.Chmod(perm); err != nil { - f.Close() - os.Remove(f.Name()) - return err - } - - if err := f.Close(); err != nil { - os.Remove(f.Name()) - return err - } - - if err := os.Rename(f.Name(), filename); err != nil { - os.Remove(f.Name()) - return err - } - - return nil -} diff --git a/vendor/github.com/DataDog/go-tuf/verify/db.go b/vendor/github.com/DataDog/go-tuf/verify/db.go deleted file mode 100644 index 1961c98fb3..0000000000 --- a/vendor/github.com/DataDog/go-tuf/verify/db.go +++ /dev/null @@ -1,104 +0,0 @@ -package verify - -import ( - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/internal/roles" - "github.com/DataDog/go-tuf/pkg/keys" -) - -type Role struct { - KeyIDs map[string]struct{} - Threshold int -} - -func (r *Role) ValidKey(id string) bool { - _, ok := r.KeyIDs[id] - return ok -} - -type DB struct { - roles map[string]*Role - verifiers map[string]keys.Verifier -} - -func NewDB() *DB { - return &DB{ - roles: make(map[string]*Role), - verifiers: make(map[string]keys.Verifier), - } -} - -// NewDBFromDelegations returns a DB that verifies delegations -// of a given Targets. -func NewDBFromDelegations(d *data.Delegations) (*DB, error) { - db := &DB{ - roles: make(map[string]*Role, len(d.Roles)), - verifiers: make(map[string]keys.Verifier, len(d.Keys)), - } - for _, r := range d.Roles { - if _, ok := roles.TopLevelRoles[r.Name]; ok { - return nil, ErrInvalidDelegatedRole - } - role := &data.Role{Threshold: r.Threshold, KeyIDs: r.KeyIDs} - if err := db.AddRole(r.Name, role); err != nil { - return nil, err - } - } - for id, k := range d.Keys { - if err := db.AddKey(id, k); err != nil { - return nil, err - } - } - return db, nil -} - -func (db *DB) AddKey(id string, k *data.PublicKey) error { - verifier, err := keys.GetVerifier(k) - if err != nil { - return err // ErrInvalidKey - } - - // TUF is considering in TAP-12 removing the - // requirement that the keyid hash algorithm be derived - // from the public key. So to be forwards compatible, - // we allow any key ID, rather than checking k.ContainsID(id) - // - // AddKey should be idempotent, so we allow re-adding the same PublicKey. - // - // TAP-12: https://github.com/theupdateframework/taps/blob/master/tap12.md - if oldVerifier, exists := db.verifiers[id]; exists && oldVerifier.Public() != verifier.Public() { - return ErrRepeatID{id} - } - - db.verifiers[id] = verifier - return nil -} - -func (db *DB) AddRole(name string, r *data.Role) error { - if r.Threshold < 1 { - return ErrInvalidThreshold - } - - role := &Role{ - KeyIDs: make(map[string]struct{}), - Threshold: r.Threshold, - } - for _, id := range r.KeyIDs { - role.KeyIDs[id] = struct{}{} - } - - db.roles[name] = role - return nil -} - -func (db *DB) GetVerifier(id string) (keys.Verifier, error) { - k, ok := db.verifiers[id] - if !ok { - return nil, ErrMissingKey - } - return k, nil -} - -func (db *DB) GetRole(name string) *Role { - return db.roles[name] -} diff --git a/vendor/github.com/DataDog/go-tuf/verify/errors.go b/vendor/github.com/DataDog/go-tuf/verify/errors.go deleted file mode 100644 index f71d4bda94..0000000000 --- a/vendor/github.com/DataDog/go-tuf/verify/errors.go +++ /dev/null @@ -1,73 +0,0 @@ -package verify - -import ( - "errors" - "fmt" - "time" -) - -var ( - ErrMissingKey = errors.New("tuf: missing key") - ErrNoSignatures = errors.New("tuf: data has no signatures") - ErrInvalid = errors.New("tuf: signature verification failed") - ErrWrongMethod = errors.New("tuf: invalid signature type") - ErrWrongMetaType = errors.New("tuf: meta file has wrong type") - ErrExists = errors.New("tuf: key already in db") - ErrInvalidKey = errors.New("tuf: invalid key") - ErrInvalidRole = errors.New("tuf: invalid role") - ErrInvalidDelegatedRole = errors.New("tuf: invalid delegated role") - ErrInvalidKeyID = errors.New("tuf: invalid key id") - ErrInvalidThreshold = errors.New("tuf: invalid role threshold") - ErrMissingTargetFile = errors.New("tuf: missing previously listed targets metadata file") -) - -type ErrRepeatID struct { - KeyID string -} - -func (e ErrRepeatID) Error() string { - return fmt.Sprintf("tuf: duplicate key id (%s)", e.KeyID) -} - -type ErrUnknownRole struct { - Role string -} - -func (e ErrUnknownRole) Error() string { - return fmt.Sprintf("tuf: unknown role %q", e.Role) -} - -type ErrExpired struct { - Expired time.Time -} - -func (e ErrExpired) Error() string { - return fmt.Sprintf("expired at %s", e.Expired) -} - -type ErrLowVersion struct { - Actual int64 - Current int64 -} - -func (e ErrLowVersion) Error() string { - return fmt.Sprintf("version %d is lower than current version %d", e.Actual, e.Current) -} - -type ErrWrongVersion struct { - Given int64 - Expected int64 -} - -func (e ErrWrongVersion) Error() string { - return fmt.Sprintf("version %d does not match the expected version %d", e.Given, e.Expected) -} - -type ErrRoleThreshold struct { - Expected int - Actual int -} - -func (e ErrRoleThreshold) Error() string { - return "tuf: valid signatures did not meet threshold" -} diff --git a/vendor/github.com/DataDog/go-tuf/verify/verify.go b/vendor/github.com/DataDog/go-tuf/verify/verify.go deleted file mode 100644 index b0cf333ca5..0000000000 --- a/vendor/github.com/DataDog/go-tuf/verify/verify.go +++ /dev/null @@ -1,187 +0,0 @@ -package verify - -import ( - "encoding/json" - "strings" - "time" - - "github.com/DataDog/go-tuf/data" - "github.com/DataDog/go-tuf/internal/roles" - "github.com/DataDog/go-tuf/pkg/keys" - "github.com/secure-systems-lab/go-securesystemslib/cjson" -) - -type signedMeta struct { - Type string `json:"_type"` - Expires time.Time `json:"expires"` - Version int64 `json:"version"` -} - -// VerifySignature takes a signed JSON message, a signature, and a -// verifier and verifies the given signature on the JSON message -// using the verifier. It returns an error if verification fails. -func VerifySignature(signed json.RawMessage, sig data.HexBytes, - verifier keys.Verifier) error { - var decoded map[string]interface{} - if err := json.Unmarshal(signed, &decoded); err != nil { - return err - } - msg, err := cjson.EncodeCanonical(decoded) - if err != nil { - return err - } - return verifier.Verify(msg, sig) -} - -func (db *DB) VerifyIgnoreExpiredCheck(s *data.Signed, role string, minVersion int64) error { - if err := db.VerifySignatures(s, role); err != nil { - return err - } - - sm := &signedMeta{} - if err := json.Unmarshal(s.Signed, sm); err != nil { - return err - } - - if roles.IsTopLevelRole(role) { - // Top-level roles can only sign metadata of the same type (e.g. snapshot - // metadata must be signed by the snapshot role). - if !strings.EqualFold(sm.Type, role) { - return ErrWrongMetaType - } - } else { - // Delegated (non-top-level) roles may only sign targets metadata. - if strings.ToLower(sm.Type) != "targets" { - return ErrWrongMetaType - } - } - - if sm.Version < minVersion { - return ErrLowVersion{sm.Version, minVersion} - } - - return nil -} - -func (db *DB) Verify(s *data.Signed, role string, minVersion int64) error { - // Verify signatures and versions - err := db.VerifyIgnoreExpiredCheck(s, role, minVersion) - - if err != nil { - return err - } - - sm := &signedMeta{} - if err := json.Unmarshal(s.Signed, sm); err != nil { - return err - } - // Verify expiration - if IsExpired(sm.Expires) { - return ErrExpired{sm.Expires} - } - - return nil -} - -var IsExpired = func(t time.Time) bool { - return time.Until(t) <= 0 -} - -func (db *DB) VerifySignatures(s *data.Signed, role string) error { - if len(s.Signatures) == 0 { - return ErrNoSignatures - } - - roleData := db.GetRole(role) - if roleData == nil { - return ErrUnknownRole{role} - } - - // Verify that a threshold of keys signed the data. Since keys can have - // multiple key ids, we need to protect against multiple attached - // signatures that just differ on the key id. - verifiedKeyIDs := make(map[string]struct{}) - numVerifiedKeys := 0 - for _, sig := range s.Signatures { - if !roleData.ValidKey(sig.KeyID) { - continue - } - verifier, err := db.GetVerifier(sig.KeyID) - if err != nil { - continue - } - - if err := VerifySignature(s.Signed, sig.Signature, verifier); err != nil { - // If a signature fails verification, don't count it towards the - // threshold but also return early and error out immediately. - // Note: Because of this, it is impossible to distinguish between - // an error of an invalid signature and a threshold not achieved. - // Invalid signatures lead to not achieving the threshold. - continue - } - - // Only consider this key valid if we haven't seen any of it's - // key ids before. - // Careful: we must not rely on the key IDs _declared in the file_, - // instead we get to decide what key IDs this key correspond to. - // XXX dangerous; better stop supporting multiple key IDs altogether. - keyIDs := verifier.MarshalPublicKey().IDs() - wasKeySeen := false - for _, keyID := range keyIDs { - if _, present := verifiedKeyIDs[keyID]; present { - wasKeySeen = true - } - } - if !wasKeySeen { - for _, id := range keyIDs { - verifiedKeyIDs[id] = struct{}{} - } - - numVerifiedKeys++ - } - } - if numVerifiedKeys < roleData.Threshold { - return ErrRoleThreshold{roleData.Threshold, numVerifiedKeys} - } - - return nil -} - -func (db *DB) Unmarshal(b []byte, v interface{}, role string, minVersion int64) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - if err := db.Verify(s, role, minVersion); err != nil { - return err - } - return json.Unmarshal(s.Signed, v) -} - -// UnmarshalExpired is exactly like Unmarshal except ignores expired timestamp error. -func (db *DB) UnmarshalIgnoreExpired(b []byte, v interface{}, role string, minVersion int64) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - // Note: If verification fails, then we wont attempt to unmarshal - // unless when verification error is errExpired. - verifyErr := db.Verify(s, role, minVersion) - if verifyErr != nil { - if _, ok := verifyErr.(ErrExpired); !ok { - return verifyErr - } - } - return json.Unmarshal(s.Signed, v) -} - -func (db *DB) UnmarshalTrusted(b []byte, v interface{}, role string) error { - s := &data.Signed{} - if err := json.Unmarshal(b, s); err != nil { - return err - } - if err := db.VerifySignatures(s, role); err != nil { - return err - } - return json.Unmarshal(s.Signed, v) -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/LICENSE b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/attributes.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/attributes.go deleted file mode 100644 index 133cf7b8e8..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/attributes.go +++ /dev/null @@ -1,304 +0,0 @@ -// Copyright The OpenTelemetry 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 attributes - -import ( - "fmt" - "strings" - - "go.opentelemetry.io/collector/pdata/pcommon" - semconv127 "go.opentelemetry.io/collector/semconv/v1.27.0" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -// customContainerTagPrefix defines the prefix for custom container tags. -const customContainerTagPrefix = "datadog.container.tag." - -var ( - // coreMapping defines the mapping between OpenTelemetry semantic conventions - // and Datadog Agent conventions for env, service and version. - coreMapping = map[string]string{ - // Datadog conventions - // https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging/ - conventions.AttributeDeploymentEnvironment: "env", - semconv127.AttributeServiceName: "service", - semconv127.AttributeServiceVersion: "version", - semconv127.AttributeDeploymentEnvironmentName: "env", - } - - // ContainerMappings defines the mapping between OpenTelemetry semantic conventions - // and Datadog Agent conventions for containers. - ContainerMappings = map[string]string{ - // Containers - semconv127.AttributeContainerID: "container_id", - semconv127.AttributeContainerName: "container_name", - semconv127.AttributeContainerImageName: "image_name", - conventions.AttributeContainerImageTag: "image_tag", - semconv127.AttributeContainerRuntime: "runtime", - - // Cloud conventions - // https://www.datadoghq.com/blog/tagging-best-practices/ - semconv127.AttributeCloudProvider: "cloud_provider", - semconv127.AttributeCloudRegion: "region", - semconv127.AttributeCloudAvailabilityZone: "zone", - - // ECS conventions - // https://github.com/DataDog/datadog-agent/blob/e081bed/pkg/tagger/collectors/ecs_extract.go - semconv127.AttributeAWSECSTaskFamily: "task_family", - semconv127.AttributeAWSECSTaskARN: "task_arn", - semconv127.AttributeAWSECSClusterARN: "ecs_cluster_name", - semconv127.AttributeAWSECSTaskRevision: "task_version", - semconv127.AttributeAWSECSContainerARN: "ecs_container_name", - - // Kubernetes resource name (via semantic conventions) - // https://github.com/DataDog/datadog-agent/blob/e081bed/pkg/util/kubernetes/const.go - semconv127.AttributeK8SContainerName: "kube_container_name", - semconv127.AttributeK8SClusterName: "kube_cluster_name", - semconv127.AttributeK8SDeploymentName: "kube_deployment", - semconv127.AttributeK8SReplicaSetName: "kube_replica_set", - semconv127.AttributeK8SStatefulSetName: "kube_stateful_set", - semconv127.AttributeK8SDaemonSetName: "kube_daemon_set", - semconv127.AttributeK8SJobName: "kube_job", - semconv127.AttributeK8SCronJobName: "kube_cronjob", - semconv127.AttributeK8SNamespaceName: "kube_namespace", - semconv127.AttributeK8SPodName: "pod_name", - } - - // Kubernetes mappings defines the mapping between Kubernetes conventions (both general and Datadog specific) - // and Datadog Agent conventions. The Datadog Agent conventions can be found at - // https://github.com/DataDog/datadog-agent/blob/e081bed/pkg/tagger/collectors/const.go and - // https://github.com/DataDog/datadog-agent/blob/e081bed/pkg/util/kubernetes/const.go - kubernetesMapping = map[string]string{ - // Standard Datadog labels - "tags.datadoghq.com/env": "env", - "tags.datadoghq.com/service": "service", - "tags.datadoghq.com/version": "version", - - // Standard Kubernetes labels - "app.kubernetes.io/name": "kube_app_name", - "app.kubernetes.io/instance": "kube_app_instance", - "app.kubernetes.io/version": "kube_app_version", - "app.kuberenetes.io/component": "kube_app_component", - "app.kubernetes.io/part-of": "kube_app_part_of", - "app.kubernetes.io/managed-by": "kube_app_managed_by", - } - - // Kubernetes out of the box Datadog tags - // https://docs.datadoghq.com/containers/kubernetes/tag/?tab=containerizedagent#out-of-the-box-tags - // https://github.com/DataDog/datadog-agent/blob/d33d042d6786e8b85f72bb627fbf06ad8a658031/comp/core/tagger/taggerimpl/collectors/workloadmeta_extract.go - // Note: if any OTel semantics happen to overlap with these tag names, they will also be added as Datadog tags. - kubernetesDDTags = map[string]struct{}{ - "architecture": {}, - "availability-zone": {}, - "chronos_job": {}, - "chronos_job_owner": {}, - "cluster_name": {}, - "container_id": {}, - "container_name": {}, - "dd_remote_config_id": {}, - "dd_remote_config_rev": {}, - "display_container_name": {}, - "docker_image": {}, - "ecs_cluster_name": {}, - "ecs_container_name": {}, - "eks_fargate_node": {}, - "env": {}, - "git.commit.sha": {}, - "git.repository_url": {}, - "image_id": {}, - "image_name": {}, - "image_tag": {}, - "kube_app_component": {}, - "kube_app_instance": {}, - "kube_app_managed_by": {}, - "kube_app_name": {}, - "kube_app_part_of": {}, - "kube_app_version": {}, - "kube_container_name": {}, - "kube_cronjob": {}, - "kube_daemon_set": {}, - "kube_deployment": {}, - "kube_job": {}, - "kube_namespace": {}, - "kube_ownerref_kind": {}, - "kube_ownerref_name": {}, - "kube_priority_class": {}, - "kube_qos": {}, - "kube_replica_set": {}, - "kube_replication_controller": {}, - "kube_service": {}, - "kube_stateful_set": {}, - "language": {}, - "marathon_app": {}, - "mesos_task": {}, - "nomad_dc": {}, - "nomad_group": {}, - "nomad_job": {}, - "nomad_namespace": {}, - "nomad_task": {}, - "oshift_deployment": {}, - "oshift_deployment_config": {}, - "os_name": {}, - "os_version": {}, - "persistentvolumeclaim": {}, - "pod_name": {}, - "pod_phase": {}, - "rancher_container": {}, - "rancher_service": {}, - "rancher_stack": {}, - "region": {}, - "service": {}, - "short_image": {}, - "swarm_namespace": {}, - "swarm_service": {}, - "task_name": {}, - "task_family": {}, - "task_version": {}, - "task_arn": {}, - "version": {}, - } - - // HTTPMappings defines the mapping between OpenTelemetry semantic conventions - // and Datadog Agent conventions for HTTP attributes. - HTTPMappings = map[string]string{ - semconv127.AttributeClientAddress: "http.client_ip", - semconv127.AttributeHTTPResponseBodySize: "http.response.content_length", - semconv127.AttributeHTTPResponseStatusCode: "http.status_code", - semconv127.AttributeHTTPRequestBodySize: "http.request.content_length", - "http.request.header.referrer": "http.referrer", - semconv127.AttributeHTTPRequestMethod: "http.method", - semconv127.AttributeHTTPRoute: "http.route", - semconv127.AttributeNetworkProtocolVersion: "http.version", - semconv127.AttributeServerAddress: "http.server_name", - semconv127.AttributeURLFull: "http.url", - semconv127.AttributeUserAgentOriginal: "http.useragent", - } -) - -// TagsFromAttributes converts a selected list of attributes -// to a tag list that can be added to metrics. -func TagsFromAttributes(attrs pcommon.Map) []string { - tags := make([]string, 0, attrs.Len()) - - var processAttributes processAttributes - var systemAttributes systemAttributes - - attrs.Range(func(key string, value pcommon.Value) bool { - switch key { - // Process attributes - case semconv127.AttributeProcessExecutableName: - processAttributes.ExecutableName = value.Str() - case semconv127.AttributeProcessExecutablePath: - processAttributes.ExecutablePath = value.Str() - case semconv127.AttributeProcessCommand: - processAttributes.Command = value.Str() - case semconv127.AttributeProcessCommandLine: - processAttributes.CommandLine = value.Str() - case semconv127.AttributeProcessPID: - processAttributes.PID = value.Int() - case semconv127.AttributeProcessOwner: - processAttributes.Owner = value.Str() - - // System attributes - case semconv127.AttributeOSType: - systemAttributes.OSType = value.Str() - } - - // core attributes mapping - if datadogKey, found := coreMapping[key]; found && value.Str() != "" { - tags = append(tags, fmt.Sprintf("%s:%s", datadogKey, value.Str())) - } - - // Kubernetes labels mapping - if datadogKey, found := kubernetesMapping[key]; found && value.Str() != "" { - tags = append(tags, fmt.Sprintf("%s:%s", datadogKey, value.Str())) - } - - // Kubernetes DD tags - if _, found := kubernetesDDTags[key]; found { - tags = append(tags, fmt.Sprintf("%s:%s", key, value.Str())) - } - return true - }) - - // Container Tag mappings - ctags := ContainerTagsFromResourceAttributes(attrs) - for key, val := range ctags { - tags = append(tags, fmt.Sprintf("%s:%s", key, val)) - } - - tags = append(tags, processAttributes.extractTags()...) - tags = append(tags, systemAttributes.extractTags()...) - - return tags -} - -// OriginIDFromAttributes gets the origin IDs from resource attributes. -// If not found, an empty string is returned for each of them. -func OriginIDFromAttributes(attrs pcommon.Map) (originID string) { - // originID is always empty. Container ID is preferred over Kubernetes pod UID. - // Prefixes come from pkg/util/kubernetes/kubelet and pkg/util/containers. - if containerID, ok := attrs.Get(conventions.AttributeContainerID); ok { - originID = "container_id://" + containerID.AsString() - } else if podUID, ok := attrs.Get(conventions.AttributeK8SPodUID); ok { - originID = "kubernetes_pod_uid://" + podUID.AsString() - } - return -} - -// ContainerTagFromResourceAttributes extracts container tags from the given -// set of resource attributes. Container tags are extracted via semantic -// conventions. Customer container tags are extracted via resource attributes -// prefixed by datadog.container.tag. Custom container tag values of a different type -// than ValueTypeStr will be ignored. -// In the case of duplicates between semantic conventions and custom resource attributes -// (e.g. container.id, datadog.container.tag.container_id) the semantic convention takes -// precedence. -func ContainerTagsFromResourceAttributes(attrs pcommon.Map) map[string]string { - ddtags := make(map[string]string) - attrs.Range(func(key string, value pcommon.Value) bool { - // Semantic Conventions - if datadogKey, found := ContainerMappings[key]; found && value.Str() != "" { - ddtags[datadogKey] = value.Str() - } - // Custom (datadog.container.tag namespace) - if strings.HasPrefix(key, customContainerTagPrefix) { - customKey := strings.TrimPrefix(key, customContainerTagPrefix) - if customKey != "" && value.Str() != "" { - // Do not replace if set via semantic conventions mappings. - if _, found := ddtags[customKey]; !found { - ddtags[customKey] = value.Str() - } - } - } - return true - }) - return ddtags -} - -// ContainerTagFromAttributes extracts the value of _dd.tags.container from the given -// set of attributes. -// Deprecated: Deprecated in favor of ContainerTagFromResourceAttributes. -func ContainerTagFromAttributes(attr map[string]string) map[string]string { - ddtags := make(map[string]string) - for key, val := range attr { - datadogKey, found := ContainerMappings[key] - if !found { - continue - } - ddtags[datadogKey] = val - } - return ddtags -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure/azure.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure/azure.go deleted file mode 100644 index 1b52838e54..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure/azure.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry 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 azure - -import ( - "strings" - - "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -const ( - // AttributeResourceGroupName is the Azure resource group name attribute - AttributeResourceGroupName = "azure.resourcegroup.name" -) - -// HostInfo has the Azure host information -type HostInfo struct { - HostAliases []string -} - -// HostnameFromAttrs gets the Azure hostname from attributes. -func HostnameFromAttrs(attrs pcommon.Map) (string, bool) { - if vmID, ok := attrs.Get(conventions.AttributeHostID); ok { - return vmID.Str(), true - } - - if hostname, ok := attrs.Get(conventions.AttributeHostName); ok { - return hostname.Str(), true - } - - return "", false -} - -// ClusterNameFromAttributes gets the Azure cluster name from attributes -func ClusterNameFromAttributes(attrs pcommon.Map) (string, bool) { - // Get cluster name from resource group from pkg/util/cloudprovider/azure:GetClusterName - if resourceGroup, ok := attrs.Get(AttributeResourceGroupName); ok { - splitAll := strings.Split(resourceGroup.Str(), "_") - if len(splitAll) < 4 || strings.ToLower(splitAll[0]) != "mc" { - return "", false // Failed to parse - } - return splitAll[len(splitAll)-2], true - } - - return "", false -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2/ec2.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2/ec2.go deleted file mode 100644 index 1aa80649e5..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2/ec2.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright OpenTelemetry 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 ec2 - -import ( - "fmt" - "strings" - - "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -var ( - defaultPrefixes = [3]string{"ip-", "domu", "ec2amaz-"} - ec2TagPrefix = "ec2.tag." - clusterTagPrefix = ec2TagPrefix + "kubernetes.io/cluster/" -) - -// HostInfo holds the EC2 host information. -type HostInfo struct { - InstanceID string - EC2Hostname string - EC2Tags []string -} - -// isDefaultHostname checks if a hostname is an EC2 default -func isDefaultHostname(hostname string) bool { - for _, val := range defaultPrefixes { - if strings.HasPrefix(hostname, val) { - return true - } - } - - return false -} - -// HostnameFromAttrs gets a valid hostname from labels -// if available -func HostnameFromAttrs(attrs pcommon.Map) (string, bool) { - if hostID, ok := attrs.Get(conventions.AttributeHostID); ok { - return hostID.Str(), true - } - - return "", false -} - -// HostInfoFromAttributes gets EC2 host info from attributes following -// OpenTelemetry semantic conventions -func HostInfoFromAttributes(attrs pcommon.Map) (hostInfo *HostInfo) { - hostInfo = &HostInfo{} - - if hostID, ok := attrs.Get(conventions.AttributeHostID); ok { - hostInfo.InstanceID = hostID.Str() - } - - if hostName, ok := attrs.Get(conventions.AttributeHostName); ok { - hostInfo.EC2Hostname = hostName.Str() - } - - attrs.Range(func(k string, v pcommon.Value) bool { - if strings.HasPrefix(k, ec2TagPrefix) { - tag := fmt.Sprintf("%s:%s", strings.TrimPrefix(k, ec2TagPrefix), v.Str()) - hostInfo.EC2Tags = append(hostInfo.EC2Tags, tag) - } - return true - }) - - return -} - -// ClusterNameFromAttributes gets the AWS cluster name from attributes -func ClusterNameFromAttributes(attrs pcommon.Map) (clusterName string, ok bool) { - // Get cluster name from tag keys - // https://github.com/DataDog/datadog-agent/blob/1c94b11/pkg/util/ec2/ec2.go#L238 - attrs.Range(func(k string, _ pcommon.Value) bool { - if strings.HasPrefix(k, clusterTagPrefix) { - clusterName = strings.Split(k, "/")[2] - ok = true - } - return true - }) - return -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gateway_usage.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gateway_usage.go deleted file mode 100644 index 27d965f813..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gateway_usage.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright OpenTelemetry 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 attributes - -import "sync" - -// GatewayUsage is a HostFromAttributesHandler that detects if the setup is a gateway. -// If two attributes have different hostnames, then we consider the setup is a gateway. -type GatewayUsage struct { - firstHostname string - gatewayUsage bool - m sync.Mutex -} - -var _ HostFromAttributesHandler = (*GatewayUsage)(nil) - -// NewGatewayUsage returns a new GatewayUsage. -// If two attributes have different hostnames, then we consider the setup is a gateway. -func NewGatewayUsage() *GatewayUsage { - return &GatewayUsage{} -} - -// OnHost implements HostFromAttributesHandler. -func (g *GatewayUsage) OnHost(host string) { - g.m.Lock() - defer g.m.Unlock() - if g.firstHostname == "" { - g.firstHostname = host - } else if g.firstHostname != host { - g.gatewayUsage = true - } -} - -// GatewayUsage returns true if the GatewayUsage was detected. -func (g *GatewayUsage) GatewayUsage() bool { - g.m.Lock() - defer g.m.Unlock() - return g.gatewayUsage -} - -// Gauge returns 1 if the GatewayUsage was detected, 0 otherwise. -func (g *GatewayUsage) Gauge() float64 { - if g.GatewayUsage() { - return 1 - } - return 0 -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp/gcp.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp/gcp.go deleted file mode 100644 index 81b9cdfd5d..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp/gcp.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry 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 gcp - -import ( - "fmt" - "strings" - - "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -// HostInfo holds the GCP host information. -type HostInfo struct { - HostAliases []string - GCPTags []string -} - -// HostnameFromAttrs gets the GCP Integration hostname from attributes -// if available. -func HostnameFromAttrs(attrs pcommon.Map) (string, bool) { - hostName, ok := attrs.Get(conventions.AttributeHostName) - if !ok { - // We need the hostname. - return "", false - } - - name := hostName.Str() - if strings.Count(name, ".") >= 3 { - // Unless the host.name attribute has been tampered with, use the same logic as the Agent to - // extract the hostname: https://github.com/DataDog/datadog-agent/blob/7.36.0/pkg/util/cloudproviders/gce/gce.go#L106 - name = strings.SplitN(name, ".", 2)[0] - } - - cloudAccount, ok := attrs.Get(conventions.AttributeCloudAccountID) - if !ok { - // We need the project ID. - return "", false - } - - alias := fmt.Sprintf("%s.%s", name, cloudAccount.Str()) - return alias, true -} - -// HostInfoFromAttrs gets GCP host info from attributes following -// OpenTelemetry semantic conventions -func HostInfoFromAttrs(attrs pcommon.Map) (hostInfo *HostInfo) { - hostInfo = &HostInfo{} - - if hostID, ok := attrs.Get(conventions.AttributeHostID); ok { - hostInfo.GCPTags = append(hostInfo.GCPTags, fmt.Sprintf("instance-id:%s", hostID.Str())) - } - - if cloudZone, ok := attrs.Get(conventions.AttributeCloudAvailabilityZone); ok { - hostInfo.GCPTags = append(hostInfo.GCPTags, fmt.Sprintf("zone:%s", cloudZone.Str())) - } - - if hostType, ok := attrs.Get(conventions.AttributeHostType); ok { - hostInfo.GCPTags = append(hostInfo.GCPTags, fmt.Sprintf("instance-type:%s", hostType.Str())) - } - - if cloudAccount, ok := attrs.Get(conventions.AttributeCloudAccountID); ok { - hostInfo.GCPTags = append(hostInfo.GCPTags, fmt.Sprintf("project:%s", cloudAccount.Str())) - } - - return -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/process.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/process.go deleted file mode 100644 index 29378e7838..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/process.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright The OpenTelemetry 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 attributes - -import ( - "fmt" - - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -type processAttributes struct { - ExecutableName string - ExecutablePath string - Command string - CommandLine string - PID int64 - Owner string -} - -func (pattrs *processAttributes) extractTags() []string { - tags := make([]string, 0, 1) - - // According to OTel conventions: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/process.md, - // a process can be defined by any of the 4 following attributes: process.executable.name, process.executable.path, process.command or process.command_line - // (process.command_args isn't in the current attribute conventions: https://github.com/open-telemetry/opentelemetry-collector/blob/ecb27f49d4e26ae42d82e6ea18d57b08e252452d/model/semconv/opentelemetry.go#L58-L63) - // We go through them, and add the first available one as a tag to identify the process. - // We don't want to add all of them to avoid unnecessarily increasing the number of tags attached to a metric. - - // TODO: check if this order should be changed. - switch { - case pattrs.ExecutableName != "": // otelcol - tags = append(tags, fmt.Sprintf("%s:%s", conventions.AttributeProcessExecutableName, pattrs.ExecutableName)) - case pattrs.ExecutablePath != "": // /usr/bin/cmd/otelcol - tags = append(tags, fmt.Sprintf("%s:%s", conventions.AttributeProcessExecutablePath, pattrs.ExecutablePath)) - case pattrs.Command != "": // cmd/otelcol - tags = append(tags, fmt.Sprintf("%s:%s", conventions.AttributeProcessCommand, pattrs.Command)) - case pattrs.CommandLine != "": // cmd/otelcol --config="/path/to/config.yaml" - tags = append(tags, fmt.Sprintf("%s:%s", conventions.AttributeProcessCommandLine, pattrs.CommandLine)) - } - - // For now, we don't care about the process ID nor the process owner. - - return tags -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source.go deleted file mode 100644 index c145975f44..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright OpenTelemetry 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 attributes - -import ( - "go.opentelemetry.io/collector/pdata/pcommon" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" - - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp" - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" -) - -const ( - // AttributeDatadogHostname the datadog host name attribute - AttributeDatadogHostname = "datadog.host.name" - // AttributeK8sNodeName the datadog k8s node name attribute - AttributeK8sNodeName = "k8s.node.name" - // Attribute host is a literal host tag. - // We check for this to avoid double tagging. - AttributeHost = "host" -) - -func getClusterName(attrs pcommon.Map) (string, bool) { - if k8sClusterName, ok := attrs.Get(conventions.AttributeK8SClusterName); ok { - return k8sClusterName.Str(), true - } - - cloudProvider, ok := attrs.Get(conventions.AttributeCloudProvider) - if ok && cloudProvider.Str() == conventions.AttributeCloudProviderAzure { - return azure.ClusterNameFromAttributes(attrs) - } else if ok && cloudProvider.Str() == conventions.AttributeCloudProviderAWS { - return ec2.ClusterNameFromAttributes(attrs) - } - - return "", false -} - -// hostnameFromAttributes tries to get a valid hostname from attributes by checking, in order: -// -// 1. the "host" attribute to avoid double tagging if present. -// -// 2. a custom Datadog hostname provided by the "datadog.host.name" attribute -// -// 3. cloud provider specific hostname for AWS, Azure or GCP, -// -// 4. the Kubernetes node name (and cluster name if available), -// -// 5. the cloud provider host ID and -// -// 6. the host.name attribute. -// -// It returns a boolean value indicated if any name was found -func hostnameFromAttributes(attrs pcommon.Map) (string, bool) { - // Check if the host is localhost or 0.0.0.0, if so discard it. - // We don't do the more strict validation done for metadata, - // to avoid breaking users existing invalid-but-accepted hostnames. - var invalidHosts = map[string]struct{}{ - "0.0.0.0": {}, - "127.0.0.1": {}, - "localhost": {}, - "localhost.localdomain": {}, - "localhost6.localdomain6": {}, - "ip6-localhost": {}, - } - - candidateHost, ok := unsanitizedHostnameFromAttributes(attrs) - if _, invalid := invalidHosts[candidateHost]; invalid { - return "", false - } - return candidateHost, ok -} - -func k8sHostnameFromAttributes(attrs pcommon.Map) (string, bool) { - node, ok := attrs.Get(AttributeK8sNodeName) - if !ok { - return "", false - } - - if cluster, ok := getClusterName(attrs); ok { - return node.Str() + "-" + cluster, true - } - return node.Str(), true -} - -func unsanitizedHostnameFromAttributes(attrs pcommon.Map) (string, bool) { - // Literal 'host' tag. Check and use to avoid double tagging. - if literalHost, ok := attrs.Get(AttributeHost); ok { - // Use even if not a string, so that we avoid double tagging if - // `resource_attributes_as_tags` is true and 'host' has a non-string value. - return literalHost.AsString(), true - } - - // Custom hostname: useful for overriding in k8s/cloud envs - if customHostname, ok := attrs.Get(AttributeDatadogHostname); ok { - return customHostname.Str(), true - } - - if launchType, ok := attrs.Get(conventions.AttributeAWSECSLaunchtype); ok && launchType.Str() == conventions.AttributeAWSECSLaunchtypeFargate { - // If on AWS ECS Fargate, we don't have a hostname - return "", false - } - - cloudProvider, ok := attrs.Get(conventions.AttributeCloudProvider) - switch { - case ok && cloudProvider.Str() == conventions.AttributeCloudProviderAWS: - return ec2.HostnameFromAttrs(attrs) - case ok && cloudProvider.Str() == conventions.AttributeCloudProviderGCP: - return gcp.HostnameFromAttrs(attrs) - case ok && cloudProvider.Str() == conventions.AttributeCloudProviderAzure: - return azure.HostnameFromAttrs(attrs) - } - - // Kubernetes: node-cluster if cluster name is available, else node - k8sName, k8sOk := k8sHostnameFromAttributes(attrs) - if k8sOk { - return k8sName, true - } - - // host id from cloud provider - if hostID, ok := attrs.Get(conventions.AttributeHostID); ok { - return hostID.Str(), true - } - - // hostname from cloud provider or OS - if hostName, ok := attrs.Get(conventions.AttributeHostName); ok { - return hostName.Str(), true - } - - return "", false -} - -// HostFromAttributesHandler calls OnHost when a hostname is extracted from attributes. -type HostFromAttributesHandler interface { - OnHost(string) -} - -// SourceFromAttrs gets a telemetry signal source from its attributes. -// Deprecated: Use Translator.ResourceToSource or Translator.AttributesToSource instead. -func SourceFromAttrs(attrs pcommon.Map, hostFromAttributesHandler HostFromAttributesHandler) (source.Source, bool) { - if launchType, ok := attrs.Get(conventions.AttributeAWSECSLaunchtype); ok && launchType.Str() == conventions.AttributeAWSECSLaunchtypeFargate { - if taskARN, ok := attrs.Get(conventions.AttributeAWSECSTaskARN); ok { - return source.Source{Kind: source.AWSECSFargateKind, Identifier: taskARN.Str()}, true - } - } - - if host, ok := hostnameFromAttributes(attrs); ok { - if hostFromAttributesHandler != nil { - hostFromAttributesHandler.OnHost(host) - } - return source.Source{Kind: source.HostnameKind, Identifier: host}, true - } - - return source.Source{}, false -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source/source_provider.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source/source_provider.go deleted file mode 100644 index 4f686f9bb8..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source/source_provider.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The OpenTelemetry 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 source - -import ( - "context" - "fmt" -) - -// Kind of source -type Kind string - -const ( - // InvalidKind is an invalid kind. It is the zero value of Kind. - InvalidKind Kind = "" - // HostnameKind is a host source. - HostnameKind Kind = "host" - // AWSECSFargateKind is a serverless source on AWS ECS Fargate. - AWSECSFargateKind Kind = "task_arn" -) - -// Source represents a telemetry source. -type Source struct { - // Kind of source (serverless v. host). - Kind Kind - // Identifier that uniquely determines the source. - Identifier string -} - -// Tag associated to a source. -func (s *Source) Tag() string { - return fmt.Sprintf("%s:%s", s.Kind, s.Identifier) -} - -// Provider identifies a source. -type Provider interface { - // Source gets the source from the current context. - Source(ctx context.Context) (Source, error) -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/system.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/system.go deleted file mode 100644 index 01b45b9d7d..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/system.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry 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 attributes - -import ( - "fmt" - - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" -) - -type systemAttributes struct { - OSType string -} - -func (sattrs *systemAttributes) extractTags() []string { - tags := make([]string, 0, 1) - - // Add OS type, eg. WINDOWS, LINUX, etc. - if sattrs.OSType != "" { - tags = append(tags, fmt.Sprintf("%s:%s", conventions.AttributeOSType, sattrs.OSType)) - } - - return tags -} diff --git a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/translator.go b/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/translator.go deleted file mode 100644 index e10cda8187..0000000000 --- a/vendor/github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/translator.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright OpenTelemetry 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 attributes - -import ( - "context" - "fmt" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - - "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" -) - -const missingSourceMetricName string = "datadog.otlp_translator.resources.missing_source" - -// Translator of attributes. -type Translator struct { - missingSources metric.Int64Counter -} - -// NewTranslator returns a new attributes translator. -func NewTranslator(set component.TelemetrySettings) (*Translator, error) { - meter := set.MeterProvider.Meter("github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes") - missingSources, err := meter.Int64Counter( - missingSourceMetricName, - metric.WithDescription("OTLP resources that are missing a source (e.g. hostname)"), - metric.WithUnit("{resource}"), - ) - if err != nil { - return nil, fmt.Errorf("failed to build missing source counter: %w", err) - } - - return &Translator{ - missingSources: missingSources, - }, nil -} - -// ResourceToSource gets a telemetry signal source from its resource attributes. -func (p *Translator) ResourceToSource(ctx context.Context, res pcommon.Resource, set attribute.Set, hostFromAttributesHandler HostFromAttributesHandler) (source.Source, bool) { - src, ok := SourceFromAttrs(res.Attributes(), hostFromAttributesHandler) - if !ok { - p.missingSources.Add(ctx, 1, metric.WithAttributeSet(set)) - } - - return src, ok -} - -// AttributesToSource gets a telemetry signal source from a set of attributes. -// As opposed to ResourceToSource, this does not keep track of failed requests. -// -// NOTE: This method SHOULD NOT generally be used: it is only used in the logs implementation -// because of a fallback logic that will be removed. The attributes detected are resource attributes, -// not attributes from a telemetry signal. -func (p *Translator) AttributesToSource(_ context.Context, attrs pcommon.Map) (source.Source, bool) { - return SourceFromAttrs(attrs, nil) -} diff --git a/vendor/github.com/DataDog/sketches-go/LICENSE b/vendor/github.com/DataDog/sketches-go/LICENSE deleted file mode 100644 index 7882f2d9e9..0000000000 --- a/vendor/github.com/DataDog/sketches-go/LICENSE +++ /dev/null @@ -1,200 +0,0 @@ - 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 - - 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 2021 Datadog, Inc. - 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/DataDog/sketches-go/LICENSE-3rdparty.csv b/vendor/github.com/DataDog/sketches-go/LICENSE-3rdparty.csv deleted file mode 100644 index db2f8cca0a..0000000000 --- a/vendor/github.com/DataDog/sketches-go/LICENSE-3rdparty.csv +++ /dev/null @@ -1,3 +0,0 @@ -Component,Origin,License -import (test),github.com/google/gofuzz,Apache-2.0 -import (test),github.com/stretchr/testify,MIT diff --git a/vendor/github.com/DataDog/sketches-go/NOTICE b/vendor/github.com/DataDog/sketches-go/NOTICE deleted file mode 100644 index 7ae253a014..0000000000 --- a/vendor/github.com/DataDog/sketches-go/NOTICE +++ /dev/null @@ -1,4 +0,0 @@ -Datadog sketches-go -Copyright 2021 Datadog, Inc. - -This product includes software developed at Datadog (https://www.datadoghq.com/). diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/ddsketch.go b/vendor/github.com/DataDog/sketches-go/ddsketch/ddsketch.go deleted file mode 100644 index 10445f0550..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/ddsketch.go +++ /dev/null @@ -1,790 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package ddsketch - -import ( - "errors" - "io" - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/mapping" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" - "github.com/DataDog/sketches-go/ddsketch/stat" - "github.com/DataDog/sketches-go/ddsketch/store" -) - -var ( - ErrUntrackableNaN = errors.New("input value is NaN and cannot be tracked by the sketch") - ErrUntrackableTooLow = errors.New("input value is too low and cannot be tracked by the sketch") - ErrUntrackableTooHigh = errors.New("input value is too high and cannot be tracked by the sketch") - ErrNegativeCount = errors.New("count cannot be negative") - errEmptySketch = errors.New("no such element exists") - errUnknownFlag = errors.New("unknown encoding flag") -) - -// Unexported to prevent usage and avoid the cost of dynamic dispatch -type quantileSketch interface { - RelativeAccuracy() float64 - IsEmpty() bool - GetCount() float64 - GetZeroCount() float64 - GetSum() float64 - GetPositiveValueStore() store.Store - GetNegativeValueStore() store.Store - GetMinValue() (float64, error) - GetMaxValue() (float64, error) - GetValueAtQuantile(quantile float64) (float64, error) - GetValuesAtQuantiles(quantiles []float64) ([]float64, error) - ForEach(f func(value, count float64) (stop bool)) - Add(value float64) error - AddWithCount(value, count float64) error - // MergeWith - // ChangeMapping - Reweight(factor float64) error - Clear() - // Copy - Encode(b *[]byte, omitIndexMapping bool) - DecodeAndMergeWith(b []byte) error -} - -var _ quantileSketch = (*DDSketch)(nil) -var _ quantileSketch = (*DDSketchWithExactSummaryStatistics)(nil) - -type DDSketch struct { - mapping.IndexMapping - positiveValueStore store.Store - negativeValueStore store.Store - zeroCount float64 -} - -func NewDDSketchFromStoreProvider(indexMapping mapping.IndexMapping, storeProvider store.Provider) *DDSketch { - return NewDDSketch(indexMapping, storeProvider(), storeProvider()) -} - -func NewDDSketch(indexMapping mapping.IndexMapping, positiveValueStore store.Store, negativeValueStore store.Store) *DDSketch { - return &DDSketch{ - IndexMapping: indexMapping, - positiveValueStore: positiveValueStore, - negativeValueStore: negativeValueStore, - } -} - -func NewDefaultDDSketch(relativeAccuracy float64) (*DDSketch, error) { - m, err := mapping.NewDefaultMapping(relativeAccuracy) - if err != nil { - return nil, err - } - return NewDDSketchFromStoreProvider(m, store.DefaultProvider), nil -} - -// Constructs an instance of DDSketch that offers constant-time insertion and whose size grows indefinitely -// to accommodate for the range of input values. -func LogUnboundedDenseDDSketch(relativeAccuracy float64) (*DDSketch, error) { - indexMapping, err := mapping.NewLogarithmicMapping(relativeAccuracy) - if err != nil { - return nil, err - } - return NewDDSketch(indexMapping, store.NewDenseStore(), store.NewDenseStore()), nil -} - -// Constructs an instance of DDSketch that offers constant-time insertion and whose size grows until the -// maximum number of bins is reached, at which point bins with lowest indices are collapsed, which causes the -// relative accuracy guarantee to be lost on lowest quantiles if values are all positive, or the mid-range -// quantiles for values closest to zero if values include negative numbers. -func LogCollapsingLowestDenseDDSketch(relativeAccuracy float64, maxNumBins int) (*DDSketch, error) { - indexMapping, err := mapping.NewLogarithmicMapping(relativeAccuracy) - if err != nil { - return nil, err - } - return NewDDSketch(indexMapping, store.NewCollapsingLowestDenseStore(maxNumBins), store.NewCollapsingLowestDenseStore(maxNumBins)), nil -} - -// Constructs an instance of DDSketch that offers constant-time insertion and whose size grows until the -// maximum number of bins is reached, at which point bins with highest indices are collapsed, which causes the -// relative accuracy guarantee to be lost on highest quantiles if values are all positive, or the lowest and -// highest quantiles if values include negative numbers. -func LogCollapsingHighestDenseDDSketch(relativeAccuracy float64, maxNumBins int) (*DDSketch, error) { - indexMapping, err := mapping.NewLogarithmicMapping(relativeAccuracy) - if err != nil { - return nil, err - } - return NewDDSketch(indexMapping, store.NewCollapsingHighestDenseStore(maxNumBins), store.NewCollapsingHighestDenseStore(maxNumBins)), nil -} - -// Adds a value to the sketch. -func (s *DDSketch) Add(value float64) error { - return s.AddWithCount(value, float64(1)) -} - -// Adds a value to the sketch with a float64 count. -func (s *DDSketch) AddWithCount(value, count float64) error { - if count < 0 { - return ErrNegativeCount - } - - if value > s.MinIndexableValue() { - if value > s.MaxIndexableValue() { - return ErrUntrackableTooHigh - } - s.positiveValueStore.AddWithCount(s.Index(value), count) - } else if value < -s.MinIndexableValue() { - if value < -s.MaxIndexableValue() { - return ErrUntrackableTooLow - } - s.negativeValueStore.AddWithCount(s.Index(-value), count) - } else if math.IsNaN(value) { - return ErrUntrackableNaN - } else { - s.zeroCount += count - } - return nil -} - -// Return a (deep) copy of this sketch. -func (s *DDSketch) Copy() *DDSketch { - return &DDSketch{ - IndexMapping: s.IndexMapping, - positiveValueStore: s.positiveValueStore.Copy(), - negativeValueStore: s.negativeValueStore.Copy(), - zeroCount: s.zeroCount, - } -} - -// Clear empties the sketch while allowing reusing already allocated memory. -func (s *DDSketch) Clear() { - s.positiveValueStore.Clear() - s.negativeValueStore.Clear() - s.zeroCount = 0 -} - -// Return the value at the specified quantile. Return a non-nil error if the quantile is invalid -// or if the sketch is empty. -func (s *DDSketch) GetValueAtQuantile(quantile float64) (float64, error) { - if quantile < 0 || quantile > 1 { - return math.NaN(), errors.New("The quantile must be between 0 and 1.") - } - - count := s.GetCount() - if count == 0 { - return math.NaN(), errEmptySketch - } - - // Use an explicit floating point conversion (as per Go specification) to make sure that no - // "fused multiply and add" (FMA) operation is used in the following code subtracting values - // from `rank`. Not doing so can lead to inconsistent rounding and return value for this - // function, depending on the architecture and whether FMA operations are used or not by the - // compiler. - rank := float64(quantile * (count - 1)) - - negativeValueCount := s.negativeValueStore.TotalCount() - if rank < negativeValueCount { - return -s.Value(s.negativeValueStore.KeyAtRank(negativeValueCount - 1 - rank)), nil - } else if rank < s.zeroCount+negativeValueCount { - return 0, nil - } else { - return s.Value(s.positiveValueStore.KeyAtRank(rank - s.zeroCount - negativeValueCount)), nil - } -} - -// Return the values at the respective specified quantiles. Return a non-nil error if any of the quantiles -// is invalid or if the sketch is empty. -func (s *DDSketch) GetValuesAtQuantiles(quantiles []float64) ([]float64, error) { - values := make([]float64, len(quantiles)) - for i, q := range quantiles { - val, err := s.GetValueAtQuantile(q) - if err != nil { - return nil, err - } - values[i] = val - } - return values, nil -} - -// Return the total number of values that have been added to this sketch. -func (s *DDSketch) GetCount() float64 { - return s.zeroCount + s.positiveValueStore.TotalCount() + s.negativeValueStore.TotalCount() -} - -// GetZeroCount returns the number of zero values that have been added to this sketch. -// Note: values that are very small (lower than MinIndexableValue if positive, or higher than -MinIndexableValue if negative) -// are also mapped to the zero bucket. -func (s *DDSketch) GetZeroCount() float64 { - return s.zeroCount -} - -// Return true iff no value has been added to this sketch. -func (s *DDSketch) IsEmpty() bool { - return s.zeroCount == 0 && s.positiveValueStore.IsEmpty() && s.negativeValueStore.IsEmpty() -} - -// Return the maximum value that has been added to this sketch. Return a non-nil error if the sketch -// is empty. -func (s *DDSketch) GetMaxValue() (float64, error) { - if !s.positiveValueStore.IsEmpty() { - maxIndex, _ := s.positiveValueStore.MaxIndex() - return s.Value(maxIndex), nil - } else if s.zeroCount > 0 { - return 0, nil - } else { - minIndex, err := s.negativeValueStore.MinIndex() - if err != nil { - return math.NaN(), err - } - return -s.Value(minIndex), nil - } -} - -// Return the minimum value that has been added to this sketch. Returns a non-nil error if the sketch -// is empty. -func (s *DDSketch) GetMinValue() (float64, error) { - if !s.negativeValueStore.IsEmpty() { - maxIndex, _ := s.negativeValueStore.MaxIndex() - return -s.Value(maxIndex), nil - } else if s.zeroCount > 0 { - return 0, nil - } else { - minIndex, err := s.positiveValueStore.MinIndex() - if err != nil { - return math.NaN(), err - } - return s.Value(minIndex), nil - } -} - -// GetSum returns an approximation of the sum of the values that have been added to the sketch. If the -// values that have been added to the sketch all have the same sign, the approximation error has -// the relative accuracy guarantees of the mapping used for this sketch. -func (s *DDSketch) GetSum() (sum float64) { - s.ForEach(func(value float64, count float64) (stop bool) { - sum += value * count - return false - }) - return sum -} - -// GetPositiveValueStore returns the store.Store object that contains the positive -// values of the sketch. -func (s *DDSketch) GetPositiveValueStore() store.Store { - return s.positiveValueStore -} - -// GetNegativeValueStore returns the store.Store object that contains the negative -// values of the sketch. -func (s *DDSketch) GetNegativeValueStore() store.Store { - return s.negativeValueStore -} - -// ForEach applies f on the bins of the sketches until f returns true. -// There is no guarantee on the bin iteration order. -func (s *DDSketch) ForEach(f func(value, count float64) (stop bool)) { - if s.zeroCount != 0 && f(0, s.zeroCount) { - return - } - stopped := false - s.positiveValueStore.ForEach(func(index int, count float64) bool { - stopped = f(s.IndexMapping.Value(index), count) - return stopped - }) - if stopped { - return - } - s.negativeValueStore.ForEach(func(index int, count float64) bool { - return f(-s.IndexMapping.Value(index), count) - }) -} - -// Merges the other sketch into this one. After this operation, this sketch encodes the values that -// were added to both this and the other sketches. -func (s *DDSketch) MergeWith(other *DDSketch) error { - if !s.IndexMapping.Equals(other.IndexMapping) { - return errors.New("Cannot merge sketches with different index mappings.") - } - s.positiveValueStore.MergeWith(other.positiveValueStore) - s.negativeValueStore.MergeWith(other.negativeValueStore) - s.zeroCount += other.zeroCount - return nil -} - -// Generates a protobuf representation of this DDSketch. -func (s *DDSketch) ToProto() *sketchpb.DDSketch { - return &sketchpb.DDSketch{ - Mapping: s.IndexMapping.ToProto(), - PositiveValues: s.positiveValueStore.ToProto(), - NegativeValues: s.negativeValueStore.ToProto(), - ZeroCount: s.zeroCount, - } -} - -func (s *DDSketch) EncodeProto(w io.Writer) { - builder := sketchpb.NewDDSketchBuilder(w) - - builder.SetMapping(func(indexMappingBuilder *sketchpb.IndexMappingBuilder) { - s.IndexMapping.EncodeProto(indexMappingBuilder) - }) - - builder.SetZeroCount(s.zeroCount) - builder.SetNegativeValues(func(storeBuilder *sketchpb.StoreBuilder) { - s.negativeValueStore.EncodeProto(storeBuilder) - }) - - builder.SetPositiveValues(func(storeBuilder *sketchpb.StoreBuilder) { - s.positiveValueStore.EncodeProto(storeBuilder) - }) -} - -// FromProto builds a new instance of DDSketch based on the provided protobuf representation, using a Dense store. -func FromProto(pb *sketchpb.DDSketch) (*DDSketch, error) { - return FromProtoWithStoreProvider(pb, store.DenseStoreConstructor) -} - -func FromProtoWithStoreProvider(pb *sketchpb.DDSketch, storeProvider store.Provider) (*DDSketch, error) { - positiveValueStore := storeProvider() - if pb.PositiveValues != nil { - store.MergeWithProto(positiveValueStore, pb.PositiveValues) - } - negativeValueStore := storeProvider() - if pb.NegativeValues != nil { - store.MergeWithProto(negativeValueStore, pb.NegativeValues) - } - m, err := mapping.FromProto(pb.Mapping) - if err != nil { - return nil, err - } - return &DDSketch{ - IndexMapping: m, - positiveValueStore: positiveValueStore, - negativeValueStore: negativeValueStore, - zeroCount: pb.ZeroCount, - }, nil -} - -// Encode serializes the sketch and appends the serialized content to the provided []byte. -// If the capacity of the provided []byte is large enough, Encode does not allocate memory space. -// When the index mapping is known at the time of deserialization, omitIndexMapping can be set to true to avoid encoding it and to make the serialized content smaller. -// The encoding format is described in the encoding/flag module. -func (s *DDSketch) Encode(b *[]byte, omitIndexMapping bool) { - if s.zeroCount != 0 { - enc.EncodeFlag(b, enc.FlagZeroCountVarFloat) - enc.EncodeVarfloat64(b, s.zeroCount) - } - - if !omitIndexMapping { - s.IndexMapping.Encode(b) - } - - s.positiveValueStore.Encode(b, enc.FlagTypePositiveStore) - s.negativeValueStore.Encode(b, enc.FlagTypeNegativeStore) -} - -// DecodeDDSketch deserializes a sketch. -// Stores are built using storeProvider. The store type needs not match the -// store that the serialized sketch initially used. However, using the same -// store type may make decoding faster. In the absence of high performance -// requirements, store.BufferedPaginatedStoreConstructor is a sound enough -// choice of store provider. -// To avoid memory allocations, it is possible to use a store provider that -// reuses stores, by calling Clear() on previously used stores before providing -// the store. -// If the serialized data does not contain the index mapping, you need to -// specify the index mapping that was used in the sketch that was encoded. -// Otherwise, you can use nil and the index mapping will be decoded from the -// serialized data. -// It is possible to decode with this function an encoded -// DDSketchWithExactSummaryStatistics, but the exact summary statistics will be -// lost. -func DecodeDDSketch(b []byte, storeProvider store.Provider, indexMapping mapping.IndexMapping) (*DDSketch, error) { - s := &DDSketch{ - IndexMapping: indexMapping, - positiveValueStore: storeProvider(), - negativeValueStore: storeProvider(), - zeroCount: float64(0), - } - err := s.DecodeAndMergeWith(b) - return s, err -} - -// DecodeAndMergeWith deserializes a sketch and merges its content in the -// receiver sketch. -// If the serialized content contains an index mapping that differs from the one -// of the receiver, DecodeAndMergeWith returns an error. -func (s *DDSketch) DecodeAndMergeWith(bb []byte) error { - return s.decodeAndMergeWith(bb, func(b *[]byte, flag enc.Flag) error { - switch flag { - case enc.FlagCount, enc.FlagSum, enc.FlagMin, enc.FlagMax: - // Exact summary stats are ignored. - if len(*b) < 8 { - return io.EOF - } - *b = (*b)[8:] - return nil - default: - return errUnknownFlag - } - }) -} - -func (s *DDSketch) decodeAndMergeWith(bb []byte, fallbackDecode func(b *[]byte, flag enc.Flag) error) error { - b := &bb - for len(*b) > 0 { - flag, err := enc.DecodeFlag(b) - if err != nil { - return err - } - switch flag.Type() { - case enc.FlagTypePositiveStore: - s.positiveValueStore.DecodeAndMergeWith(b, flag.SubFlag()) - case enc.FlagTypeNegativeStore: - s.negativeValueStore.DecodeAndMergeWith(b, flag.SubFlag()) - case enc.FlagTypeIndexMapping: - decodedIndexMapping, err := mapping.Decode(b, flag) - if err != nil { - return err - } - if s.IndexMapping != nil && !s.IndexMapping.Equals(decodedIndexMapping) { - return errors.New("index mapping mismatch") - } - s.IndexMapping = decodedIndexMapping - default: - switch flag { - - case enc.FlagZeroCountVarFloat: - decodedZeroCount, err := enc.DecodeVarfloat64(b) - if err != nil { - return err - } - s.zeroCount += decodedZeroCount - - default: - err := fallbackDecode(b, flag) - if err != nil { - return err - } - } - } - } - - if s.IndexMapping == nil { - return errors.New("missing index mapping") - } - return nil -} - -// ChangeMapping changes the store to a new mapping. -// it doesn't change s but returns a newly created sketch. -// positiveStore and negativeStore must be different stores, and be empty when the function is called. -// It is not the conversion that minimizes the loss in relative -// accuracy, but it avoids artefacts like empty bins that make the histograms look bad. -// scaleFactor allows to scale out / in all values. (changing units for eg) -func (s *DDSketch) ChangeMapping(newMapping mapping.IndexMapping, positiveStore store.Store, negativeStore store.Store, scaleFactor float64) *DDSketch { - if scaleFactor == 1 && s.IndexMapping.Equals(newMapping) { - return s.Copy() - } - changeStoreMapping(s.IndexMapping, newMapping, s.positiveValueStore, positiveStore, scaleFactor) - changeStoreMapping(s.IndexMapping, newMapping, s.negativeValueStore, negativeStore, scaleFactor) - newSketch := NewDDSketch(newMapping, positiveStore, negativeStore) - newSketch.zeroCount = s.zeroCount - return newSketch -} - -func changeStoreMapping(oldMapping, newMapping mapping.IndexMapping, oldStore, newStore store.Store, scaleFactor float64) { - oldStore.ForEach(func(index int, count float64) (stop bool) { - inLowerBound := oldMapping.LowerBound(index) * scaleFactor - inHigherBound := oldMapping.LowerBound(index+1) * scaleFactor - inSize := inHigherBound - inLowerBound - for outIndex := newMapping.Index(inLowerBound); newMapping.LowerBound(outIndex) < inHigherBound; outIndex++ { - outLowerBound := newMapping.LowerBound(outIndex) - outHigherBound := newMapping.LowerBound(outIndex + 1) - lowerIntersectionBound := math.Max(outLowerBound, inLowerBound) - higherIntersectionBound := math.Min(outHigherBound, inHigherBound) - intersectionSize := higherIntersectionBound - lowerIntersectionBound - proportion := intersectionSize / inSize - newStore.AddWithCount(outIndex, proportion*count) - } - return false - }) -} - -// Reweight multiplies all values from the sketch by w, but keeps the same global distribution. -// w has to be strictly greater than 0. -func (s *DDSketch) Reweight(w float64) error { - if w <= 0 { - return errors.New("can't reweight by a negative factor") - } - if w == 1 { - return nil - } - s.zeroCount *= w - if err := s.positiveValueStore.Reweight(w); err != nil { - return err - } - if err := s.negativeValueStore.Reweight(w); err != nil { - return err - } - return nil -} - -// DDSketchWithExactSummaryStatistics returns exact count, sum, min and max, as -// opposed to DDSketch, which may return approximate values for those -// statistics. Because of the need to track them exactly, adding and merging -// operations are slightly more exepensive than those of DDSketch. -type DDSketchWithExactSummaryStatistics struct { - *DDSketch - summaryStatistics *stat.SummaryStatistics -} - -func NewDefaultDDSketchWithExactSummaryStatistics(relativeAccuracy float64) (*DDSketchWithExactSummaryStatistics, error) { - sketch, err := NewDefaultDDSketch(relativeAccuracy) - if err != nil { - return nil, err - } - return &DDSketchWithExactSummaryStatistics{ - DDSketch: sketch, - summaryStatistics: stat.NewSummaryStatistics(), - }, nil -} - -func NewDDSketchWithExactSummaryStatistics(mapping mapping.IndexMapping, storeProvider store.Provider) *DDSketchWithExactSummaryStatistics { - return &DDSketchWithExactSummaryStatistics{ - DDSketch: NewDDSketchFromStoreProvider(mapping, storeProvider), - summaryStatistics: stat.NewSummaryStatistics(), - } -} - -// NewDDSketchWithExactSummaryStatisticsFromData constructs DDSketchWithExactSummaryStatistics from the provided sketch and exact summary statistics. -func NewDDSketchWithExactSummaryStatisticsFromData(sketch *DDSketch, summaryStatistics *stat.SummaryStatistics) (*DDSketchWithExactSummaryStatistics, error) { - if sketch.IsEmpty() != (summaryStatistics.Count() == 0) { - return nil, errors.New("sketch and summary statistics do not match") - } - return &DDSketchWithExactSummaryStatistics{ - DDSketch: sketch, - summaryStatistics: summaryStatistics, - }, nil -} - -func (s *DDSketchWithExactSummaryStatistics) IsEmpty() bool { - return s.summaryStatistics.Count() == 0 -} - -func (s *DDSketchWithExactSummaryStatistics) GetCount() float64 { - return s.summaryStatistics.Count() -} - -// GetZeroCount returns the number of zero values that have been added to this sketch. -// Note: values that are very small (lower than MinIndexableValue if positive, or higher than -MinIndexableValue if negative) -// are also mapped to the zero bucket. -func (s *DDSketchWithExactSummaryStatistics) GetZeroCount() float64 { - return s.DDSketch.zeroCount -} - -func (s *DDSketchWithExactSummaryStatistics) GetSum() float64 { - return s.summaryStatistics.Sum() -} - -// GetPositiveValueStore returns the store.Store object that contains the positive -// values of the sketch. -func (s *DDSketchWithExactSummaryStatistics) GetPositiveValueStore() store.Store { - return s.DDSketch.positiveValueStore -} - -// GetNegativeValueStore returns the store.Store object that contains the negative -// values of the sketch. -func (s *DDSketchWithExactSummaryStatistics) GetNegativeValueStore() store.Store { - return s.DDSketch.negativeValueStore -} - -func (s *DDSketchWithExactSummaryStatistics) GetMinValue() (float64, error) { - if s.DDSketch.IsEmpty() { - return math.NaN(), errEmptySketch - } - return s.summaryStatistics.Min(), nil -} - -func (s *DDSketchWithExactSummaryStatistics) GetMaxValue() (float64, error) { - if s.DDSketch.IsEmpty() { - return math.NaN(), errEmptySketch - } - return s.summaryStatistics.Max(), nil -} - -func (s *DDSketchWithExactSummaryStatistics) GetValueAtQuantile(quantile float64) (float64, error) { - value, err := s.DDSketch.GetValueAtQuantile(quantile) - min := s.summaryStatistics.Min() - if value < min { - return min, err - } - max := s.summaryStatistics.Max() - if value > max { - return max, err - } - return value, err -} - -func (s *DDSketchWithExactSummaryStatistics) GetValuesAtQuantiles(quantiles []float64) ([]float64, error) { - values, err := s.DDSketch.GetValuesAtQuantiles(quantiles) - min := s.summaryStatistics.Min() - max := s.summaryStatistics.Max() - for i := range values { - if values[i] < min { - values[i] = min - } else if values[i] > max { - values[i] = max - } - } - return values, err -} - -func (s *DDSketchWithExactSummaryStatistics) ForEach(f func(value, count float64) (stop bool)) { - s.DDSketch.ForEach(f) -} - -func (s *DDSketchWithExactSummaryStatistics) Clear() { - s.DDSketch.Clear() - s.summaryStatistics.Clear() -} - -func (s *DDSketchWithExactSummaryStatistics) Add(value float64) error { - err := s.DDSketch.Add(value) - if err != nil { - return err - } - s.summaryStatistics.Add(value, 1) - return nil -} - -func (s *DDSketchWithExactSummaryStatistics) AddWithCount(value, count float64) error { - if count == 0 { - return nil - } - err := s.DDSketch.AddWithCount(value, count) - if err != nil { - return err - } - s.summaryStatistics.Add(value, count) - return nil -} - -func (s *DDSketchWithExactSummaryStatistics) MergeWith(o *DDSketchWithExactSummaryStatistics) error { - err := s.DDSketch.MergeWith(o.DDSketch) - if err != nil { - return err - } - s.summaryStatistics.MergeWith(o.summaryStatistics) - return nil -} - -func (s *DDSketchWithExactSummaryStatistics) Copy() *DDSketchWithExactSummaryStatistics { - return &DDSketchWithExactSummaryStatistics{ - DDSketch: s.DDSketch.Copy(), - summaryStatistics: s.summaryStatistics.Copy(), - } -} - -func (s *DDSketchWithExactSummaryStatistics) Reweight(factor float64) error { - err := s.DDSketch.Reweight(factor) - if err != nil { - return err - } - s.summaryStatistics.Reweight(factor) - return nil -} - -func (s *DDSketchWithExactSummaryStatistics) ChangeMapping(newMapping mapping.IndexMapping, storeProvider store.Provider, scaleFactor float64) *DDSketchWithExactSummaryStatistics { - summaryStatisticsCopy := s.summaryStatistics.Copy() - summaryStatisticsCopy.Rescale(scaleFactor) - return &DDSketchWithExactSummaryStatistics{ - DDSketch: s.DDSketch.ChangeMapping(newMapping, storeProvider(), storeProvider(), scaleFactor), - summaryStatistics: summaryStatisticsCopy, - } -} - -func (s *DDSketchWithExactSummaryStatistics) Encode(b *[]byte, omitIndexMapping bool) { - if s.summaryStatistics.Count() != 0 { - enc.EncodeFlag(b, enc.FlagCount) - enc.EncodeVarfloat64(b, s.summaryStatistics.Count()) - } - if s.summaryStatistics.Sum() != 0 { - enc.EncodeFlag(b, enc.FlagSum) - enc.EncodeFloat64LE(b, s.summaryStatistics.Sum()) - } - if s.summaryStatistics.Min() != math.Inf(1) { - enc.EncodeFlag(b, enc.FlagMin) - enc.EncodeFloat64LE(b, s.summaryStatistics.Min()) - } - if s.summaryStatistics.Max() != math.Inf(-1) { - enc.EncodeFlag(b, enc.FlagMax) - enc.EncodeFloat64LE(b, s.summaryStatistics.Max()) - } - s.DDSketch.Encode(b, omitIndexMapping) -} - -// DecodeDDSketchWithExactSummaryStatistics deserializes a sketch. -// Stores are built using storeProvider. The store type needs not match the -// store that the serialized sketch initially used. However, using the same -// store type may make decoding faster. In the absence of high performance -// requirements, store.DefaultProvider is a sound enough choice of store -// provider. -// To avoid memory allocations, it is possible to use a store provider that -// reuses stores, by calling Clear() on previously used stores before providing -// the store. -// If the serialized data does not contain the index mapping, you need to -// specify the index mapping that was used in the sketch that was encoded. -// Otherwise, you can use nil and the index mapping will be decoded from the -// serialized data. -// It is not possible to decode with this function an encoded DDSketch (unless -// it is empty), because it does not track exact summary statistics -func DecodeDDSketchWithExactSummaryStatistics(b []byte, storeProvider store.Provider, indexMapping mapping.IndexMapping) (*DDSketchWithExactSummaryStatistics, error) { - s := &DDSketchWithExactSummaryStatistics{ - DDSketch: &DDSketch{ - IndexMapping: indexMapping, - positiveValueStore: storeProvider(), - negativeValueStore: storeProvider(), - zeroCount: float64(0), - }, - summaryStatistics: stat.NewSummaryStatistics(), - } - err := s.DecodeAndMergeWith(b) - return s, err -} - -func (s *DDSketchWithExactSummaryStatistics) DecodeAndMergeWith(bb []byte) error { - err := s.DDSketch.decodeAndMergeWith(bb, func(b *[]byte, flag enc.Flag) error { - switch flag { - case enc.FlagCount: - count, err := enc.DecodeVarfloat64(b) - if err != nil { - return err - } - s.summaryStatistics.AddToCount(count) - return nil - case enc.FlagSum: - sum, err := enc.DecodeFloat64LE(b) - if err != nil { - return err - } - s.summaryStatistics.AddToSum(sum) - return nil - case enc.FlagMin, enc.FlagMax: - stat, err := enc.DecodeFloat64LE(b) - if err != nil { - return err - } - s.summaryStatistics.Add(stat, 0) - return nil - default: - return errUnknownFlag - } - }) - if err != nil { - return err - } - // It is assumed that if the count is encoded, other exact summary - // statistics are encoded as well, which is the case if Encode is used. - if s.summaryStatistics.Count() == 0 && !s.DDSketch.IsEmpty() { - return errors.New("missing exact summary statistics") - } - return nil -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/encoding/encoding.go b/vendor/github.com/DataDog/sketches-go/ddsketch/encoding/encoding.go deleted file mode 100644 index c50dc1adb9..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/encoding/encoding.go +++ /dev/null @@ -1,208 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package encoding - -import ( - "encoding/binary" - "errors" - "io" - "math" - "math/bits" -) - -// Encoding functions append bytes to the provided *[]byte, allowing avoiding -// allocations if the slice initially has a large enough capacity. -// Decoding functions also take *[]byte as input, and when they do not return an -// error, advance the slice so that it starts at the immediate byte after the -// decoded part (or so that it is empty if there is no such byte). - -const ( - MaxVarLen64 = 9 - varfloat64Rotate = 6 -) - -var uvarint64Sizes = initUvarint64Sizes() -var varfloat64Sizes = initVarfloat64Sizes() - -// EncodeUvarint64 serializes 64-bit unsigned integers 7 bits at a time, -// starting with the least significant bits. The most significant bit in each -// output byte is the continuation bit and indicates whether there are -// additional non-zero bits encoded in following bytes. There are at most 9 -// output bytes and the last one does not have a continuation bit, allowing for -// it to encode 8 bits (8*7+8 = 64). -func EncodeUvarint64(b *[]byte, v uint64) { - for i := 0; i < MaxVarLen64-1; i++ { - if v < 0x80 { - break - } - *b = append(*b, byte(v)|byte(0x80)) - v >>= 7 - } - *b = append(*b, byte(v)) -} - -// DecodeUvarint64 deserializes 64-bit unsigned integers that have been encoded -// using EncodeUvarint64. -func DecodeUvarint64(b *[]byte) (uint64, error) { - x := uint64(0) - s := uint(0) - for i := 0; ; i++ { - if len(*b) <= i { - return 0, io.EOF - } - n := (*b)[i] - if n < 0x80 || i == MaxVarLen64-1 { - *b = (*b)[i+1:] - return x | uint64(n)<>i) - sizes[i] = len(b) - } - return sizes -} - -// EncodeVarint64 serializes 64-bit signed integers using zig-zag encoding, -// which ensures small-scale integers are turned into unsigned integers that -// have leading zeros, whether they are positive or negative, hence allows for -// space-efficient varuint encoding of those values. -func EncodeVarint64(b *[]byte, v int64) { - EncodeUvarint64(b, uint64(v>>(64-1)^(v<<1))) -} - -// DecodeVarint64 deserializes 64-bit signed integers that have been encoded -// using EncodeVarint32. -func DecodeVarint64(b *[]byte) (int64, error) { - v, err := DecodeUvarint64(b) - return int64((v >> 1) ^ -(v & 1)), err -} - -// Varint64Size returns the number of bytes that EncodeVarint64 encodes a 64-bit -// signed integer into. -func Varint64Size(v int64) int { - return Uvarint64Size(uint64(v>>(64-1) ^ (v << 1))) -} - -var errVarint32Overflow = errors.New("varint overflows a 32-bit integer") - -// DecodeVarint32 deserializes 32-bit signed integers that have been encoded -// using EncodeVarint64. -func DecodeVarint32(b *[]byte) (int32, error) { - v, err := DecodeVarint64(b) - if err != nil { - return 0, err - } - if v > math.MaxInt32 || v < math.MinInt32 { - return 0, errVarint32Overflow - } - return int32(v), nil -} - -// EncodeFloat64LE serializes 64-bit floating-point values, starting with the -// least significant bytes. -func EncodeFloat64LE(b *[]byte, v float64) { - *b = append(*b, make([]byte, 8)...) - binary.LittleEndian.PutUint64((*b)[len(*b)-8:], math.Float64bits(v)) -} - -// DecodeFloat64LE deserializes 64-bit floating-point values that have been -// encoded with EncodeFloat64LE. -func DecodeFloat64LE(b *[]byte) (float64, error) { - if len(*b) < 8 { - return 0, io.EOF - } - v := math.Float64frombits(binary.LittleEndian.Uint64(*b)) - *b = (*b)[8:] - return v, nil -} - -// EncodeVarfloat64 serializes 64-bit floating-point values using a method that -// is similar to the varuint encoding and that is space-efficient for -// non-negative integer values. The output takes at most 9 bytes. -// Input values are first shifted as floating-point values (+1), then transmuted -// to integer values, then shifted again as integer values (-Float64bits(1)). -// That is in order to minimize the number of non-zero bits when dealing with -// non-negative integer values. -// After that transformation, any input integer value no greater than 2^53 (the -// largest integer value that can be encoded exactly as a 64-bit floating-point -// value) will have at least 6 leading zero bits. By rotating bits to the left, -// those bits end up at the right of the binary representation. -// The resulting bits are then encoded similarly to the varuint method, but -// starting with the most significant bits. -func EncodeVarfloat64(b *[]byte, v float64) { - x := bits.RotateLeft64(math.Float64bits(v+1)-math.Float64bits(1), varfloat64Rotate) - for i := 0; i < MaxVarLen64-1; i++ { - n := byte(x >> (8*8 - 7)) - x <<= 7 - if x == 0 { - *b = append(*b, n) - return - } - *b = append(*b, n|byte(0x80)) - } - n := byte(x >> (8 * 7)) - *b = append(*b, n) -} - -// DecodeVarfloat64 deserializes 64-bit floating-point values that have been -// encoded with EncodeVarfloat64. -func DecodeVarfloat64(b *[]byte) (float64, error) { - x := uint64(0) - i := int(0) - s := uint(8*8 - 7) - for { - if len(*b) <= i { - return 0, io.EOF - } - n := (*b)[i] - if i == MaxVarLen64-1 { - x |= uint64(n) - break - } - if n < 0x80 { - x |= uint64(n) << s - break - } - x |= uint64(n&0x7F) << s - i++ - s -= 7 - } - *b = (*b)[i+1:] - return math.Float64frombits(bits.RotateLeft64(x, -varfloat64Rotate)+math.Float64bits(1)) - 1, nil -} - -// Varfloat64Size returns the number of bytes that EncodeVarfloat64 encodes a -// 64-bit floating-point value into. -func Varfloat64Size(v float64) int { - x := bits.RotateLeft64(math.Float64bits(v+1)-math.Float64bits(1), varfloat64Rotate) - return varfloat64Sizes[bits.TrailingZeros64(x)] -} - -func initVarfloat64Sizes() [65]int { - var sizes [65]int - b := []byte{} - for i := 0; i <= 64; i++ { - b = b[:0] - EncodeVarfloat64(&b, math.Float64frombits(bits.RotateLeft64(^uint64(0)<>exponentShift) - exponentBias) -} - -func getSignificandPlusOne(float64Bits uint64) float64 { - return math.Float64frombits((float64Bits & significandMask) | oneMask) -} - -// exponent should be >= -1022 and <= 1023 -// significandPlusOne should be >= 1 and < 2 -func buildFloat64(exponent int, significandPlusOne float64) float64 { - return math.Float64frombits( - (uint64((exponent+exponentBias)<sketches-java -type CubicallyInterpolatedMapping struct { - gamma float64 // base - indexOffset float64 - multiplier float64 // precomputed for performance - minIndexableValue float64 - maxIndexableValue float64 -} - -func NewCubicallyInterpolatedMapping(relativeAccuracy float64) (*CubicallyInterpolatedMapping, error) { - if relativeAccuracy <= 0 || relativeAccuracy >= 1 { - return nil, errors.New("The relative accuracy must be between 0 and 1.") - } - gamma := math.Pow((1+relativeAccuracy)/(1-relativeAccuracy), 10*math.Ln2/7) // > 1 - m, _ := NewCubicallyInterpolatedMappingWithGamma(gamma, 0) - return m, nil -} - -func NewCubicallyInterpolatedMappingWithGamma(gamma, indexOffset float64) (*CubicallyInterpolatedMapping, error) { - if gamma <= 1 { - return nil, errors.New("Gamma must be greater than 1.") - } - multiplier := 1 / math.Log2(gamma) - adjustedGamma := math.Pow(gamma, 7/(10*math.Ln2)) - m := CubicallyInterpolatedMapping{ - gamma: gamma, - indexOffset: indexOffset, - multiplier: multiplier, - minIndexableValue: math.Max( - math.Exp2((math.MinInt32-indexOffset)/multiplier+1), // so that index >= MinInt32 - minNormalFloat64*adjustedGamma, - ), - maxIndexableValue: math.Min( - math.Exp2((math.MaxInt32-indexOffset)/multiplier-1), // so that index <= MaxInt32 - math.Exp(expOverflow)/(2*adjustedGamma)*(adjustedGamma+1), // so that math.Exp does not overflow - ), - } - return &m, nil -} - -func (m *CubicallyInterpolatedMapping) Equals(other IndexMapping) bool { - o, ok := other.(*CubicallyInterpolatedMapping) - if !ok { - return false - } - tol := 1e-12 - return withinTolerance(m.gamma, o.gamma, tol) && withinTolerance(m.indexOffset, o.indexOffset, tol) -} - -func (m *CubicallyInterpolatedMapping) Index(value float64) int { - index := m.approximateLog(value)*m.multiplier + m.indexOffset - if index >= 0 { - return int(index) - } else { - return int(index) - 1 - } -} - -func (m *CubicallyInterpolatedMapping) Value(index int) float64 { - return m.LowerBound(index) * (1 + m.RelativeAccuracy()) -} - -func (m *CubicallyInterpolatedMapping) LowerBound(index int) float64 { - return m.approximateInverseLog((float64(index) - m.indexOffset) / m.multiplier) -} - -// Return an approximation of Math.log(x) / Math.log(base(2)). -func (m *CubicallyInterpolatedMapping) approximateLog(x float64) float64 { - bits := math.Float64bits(x) - e := getExponent(bits) - s := getSignificandPlusOne(bits) - 1 - return ((A*s+B)*s+C)*s + e -} - -// The exact inverse of approximateLog. -func (m *CubicallyInterpolatedMapping) approximateInverseLog(x float64) float64 { - exponent := math.Floor(x) - // Derived from Cardano's formula - d0 := B*B - 3*A*C - d1 := 2*B*B*B - 9*A*B*C - 27*A*A*(x-exponent) - p := math.Cbrt((d1 - math.Sqrt(d1*d1-4*d0*d0*d0)) / 2) - significandPlusOne := -(B+p+d0/p)/(3*A) + 1 - return buildFloat64(int(exponent), significandPlusOne) -} - -func (m *CubicallyInterpolatedMapping) MinIndexableValue() float64 { - return m.minIndexableValue -} - -func (m *CubicallyInterpolatedMapping) MaxIndexableValue() float64 { - return m.maxIndexableValue -} - -func (m *CubicallyInterpolatedMapping) RelativeAccuracy() float64 { - return 1 - 2/(1+math.Exp(7.0/10*math.Log2(m.gamma))) -} - -func (m *CubicallyInterpolatedMapping) ToProto() *sketchpb.IndexMapping { - return &sketchpb.IndexMapping{ - Gamma: m.gamma, - IndexOffset: m.indexOffset, - Interpolation: sketchpb.IndexMapping_CUBIC, - } -} - -func (m *CubicallyInterpolatedMapping) EncodeProto(builder *sketchpb.IndexMappingBuilder) { - builder.SetGamma(m.gamma) - builder.SetIndexOffset(m.indexOffset) - builder.SetInterpolation(uint64(sketchpb.IndexMapping_CUBIC)) -} - -func (m *CubicallyInterpolatedMapping) Encode(b *[]byte) { - enc.EncodeFlag(b, enc.FlagIndexMappingBaseCubic) - enc.EncodeFloat64LE(b, m.gamma) - enc.EncodeFloat64LE(b, m.indexOffset) -} - -func (m *CubicallyInterpolatedMapping) string() string { - var buffer bytes.Buffer - buffer.WriteString(fmt.Sprintf("gamma: %v, indexOffset: %v\n", m.gamma, m.indexOffset)) - return buffer.String() -} - -var _ IndexMapping = (*CubicallyInterpolatedMapping)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/index_mapping.go b/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/index_mapping.go deleted file mode 100644 index 62262d2c42..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/index_mapping.go +++ /dev/null @@ -1,96 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package mapping - -import ( - "errors" - "fmt" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -const ( - expOverflow = 7.094361393031e+02 // The value at which math.Exp overflows - minNormalFloat64 = 2.2250738585072014e-308 //2^(-1022) -) - -type IndexMapping interface { - Equals(other IndexMapping) bool - Index(value float64) int - Value(index int) float64 - LowerBound(index int) float64 - RelativeAccuracy() float64 - // MinIndexableValue returns the minimum positive value that can be mapped to an index. - MinIndexableValue() float64 - // MaxIndexableValue returns the maximum positive value that can be mapped to an index. - MaxIndexableValue() float64 - ToProto() *sketchpb.IndexMapping - EncodeProto(builder *sketchpb.IndexMappingBuilder) - // Encode encodes a mapping and appends its content to the provided []byte. - Encode(b *[]byte) -} - -func NewDefaultMapping(relativeAccuracy float64) (IndexMapping, error) { - return NewLogarithmicMapping(relativeAccuracy) -} - -// FromProto returns an Index mapping from the protobuf definition of it -func FromProto(m *sketchpb.IndexMapping) (IndexMapping, error) { - if m == nil { - return nil, errors.New("cannot create IndexMapping from nil protobuf index mapping") - } - switch m.Interpolation { - case sketchpb.IndexMapping_NONE: - return NewLogarithmicMappingWithGamma(m.Gamma, m.IndexOffset) - case sketchpb.IndexMapping_LINEAR: - return NewLinearlyInterpolatedMappingWithGamma(m.Gamma, m.IndexOffset) - case sketchpb.IndexMapping_CUBIC: - return NewCubicallyInterpolatedMappingWithGamma(m.Gamma, m.IndexOffset) - default: - return nil, fmt.Errorf("interpolation not supported: %d", m.Interpolation) - } -} - -// Decode decodes a mapping and updates the provided []byte so that it starts -// immediately after the encoded mapping. -func Decode(b *[]byte, flag enc.Flag) (IndexMapping, error) { - switch flag { - - case enc.FlagIndexMappingBaseLogarithmic: - gamma, indexOffset, err := decodeLogLikeIndexMapping(b) - if err != nil { - return nil, err - } - return NewLogarithmicMappingWithGamma(gamma, indexOffset) - - case enc.FlagIndexMappingBaseLinear: - gamma, indexOffset, err := decodeLogLikeIndexMapping(b) - if err != nil { - return nil, err - } - return NewLinearlyInterpolatedMappingWithGamma(gamma, indexOffset) - - case enc.FlagIndexMappingBaseCubic: - gamma, indexOffset, err := decodeLogLikeIndexMapping(b) - if err != nil { - return nil, err - } - return NewCubicallyInterpolatedMappingWithGamma(gamma, indexOffset) - - default: - return nil, errors.New("unknown mapping") - } -} - -func decodeLogLikeIndexMapping(b *[]byte) (gamma, indexOffset float64, err error) { - gamma, err = enc.DecodeFloat64LE(b) - if err != nil { - return - } - indexOffset, err = enc.DecodeFloat64LE(b) - return -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/linearly_interpolated_mapping.go b/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/linearly_interpolated_mapping.go deleted file mode 100644 index aa4499177c..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/linearly_interpolated_mapping.go +++ /dev/null @@ -1,148 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package mapping - -import ( - "bytes" - "errors" - "fmt" - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -// LinearlyInterpolatedMapping is a fast IndexMapping that approximates the -// memory-optimal LogarithmicMapping by extracting the floor value of the -// logarithm to the base 2 from the binary representations of floating-point -// values and linearly interpolating the logarithm in-between. -type LinearlyInterpolatedMapping struct { - gamma float64 // base - indexOffset float64 - multiplier float64 // precomputed for performance - minIndexableValue float64 - maxIndexableValue float64 -} - -func NewLinearlyInterpolatedMapping(relativeAccuracy float64) (*LinearlyInterpolatedMapping, error) { - if relativeAccuracy <= 0 || relativeAccuracy >= 1 { - return nil, errors.New("The relative accuracy must be between 0 and 1.") - } - gamma := math.Pow((1+relativeAccuracy)/(1-relativeAccuracy), math.Ln2) // > 1 - indexOffset := 1 / math.Log2(gamma) // for backward compatibility - m, _ := NewLinearlyInterpolatedMappingWithGamma(gamma, indexOffset) - return m, nil -} - -func NewLinearlyInterpolatedMappingWithGamma(gamma, indexOffset float64) (*LinearlyInterpolatedMapping, error) { - if gamma <= 1 { - return nil, errors.New("Gamma must be greater than 1.") - } - multiplier := 1 / math.Log2(gamma) - adjustedGamma := math.Pow(gamma, 1/math.Ln2) - m := LinearlyInterpolatedMapping{ - gamma: gamma, - indexOffset: indexOffset, - multiplier: multiplier, - minIndexableValue: math.Max( - math.Exp2((math.MinInt32-indexOffset)/multiplier+1), // so that index >= MinInt32 - minNormalFloat64*adjustedGamma, - ), - maxIndexableValue: math.Min( - math.Exp2((math.MaxInt32-indexOffset)/multiplier-1), // so that index <= MaxInt32 - math.Exp(expOverflow)/(2*adjustedGamma)*(adjustedGamma+1), // so that math.Exp does not overflow - ), - } - return &m, nil -} - -func (m *LinearlyInterpolatedMapping) Equals(other IndexMapping) bool { - o, ok := other.(*LinearlyInterpolatedMapping) - if !ok { - return false - } - tol := 1e-12 - return withinTolerance(m.gamma, o.gamma, tol) && withinTolerance(m.indexOffset, o.indexOffset, tol) -} - -func (m *LinearlyInterpolatedMapping) Index(value float64) int { - index := m.approximateLog(value)*m.multiplier + m.indexOffset - if index >= 0 { - return int(index) - } else { - return int(index) - 1 - } -} - -func (m *LinearlyInterpolatedMapping) Value(index int) float64 { - return m.LowerBound(index) * (1 + m.RelativeAccuracy()) -} - -func (m *LinearlyInterpolatedMapping) LowerBound(index int) float64 { - return m.approximateInverseLog((float64(index) - m.indexOffset) / m.multiplier) -} - -// Return an approximation of Math.log(x) / Math.log(2) -func (m *LinearlyInterpolatedMapping) approximateLog(x float64) float64 { - bits := math.Float64bits(x) - return getExponent(bits) + getSignificandPlusOne(bits) - 1 -} - -// The exact inverse of approximateLog. -func (m *LinearlyInterpolatedMapping) approximateInverseLog(x float64) float64 { - exponent := math.Floor(x) - significandPlusOne := x - exponent + 1 - return buildFloat64(int(exponent), significandPlusOne) -} - -func (m *LinearlyInterpolatedMapping) MinIndexableValue() float64 { - return m.minIndexableValue -} - -func (m *LinearlyInterpolatedMapping) MaxIndexableValue() float64 { - return m.maxIndexableValue -} - -func (m *LinearlyInterpolatedMapping) RelativeAccuracy() float64 { - return 1 - 2/(1+math.Exp(math.Log2(m.gamma))) -} - -// Generates a protobuf representation of this LinearlyInterpolatedMapping. -func (m *LinearlyInterpolatedMapping) ToProto() *sketchpb.IndexMapping { - return &sketchpb.IndexMapping{ - Gamma: m.gamma, - IndexOffset: m.indexOffset, - Interpolation: sketchpb.IndexMapping_LINEAR, - } -} - -func (m *LinearlyInterpolatedMapping) EncodeProto(builder *sketchpb.IndexMappingBuilder) { - builder.SetGamma(m.gamma) - builder.SetIndexOffset(m.indexOffset) - builder.SetInterpolation(uint64(sketchpb.IndexMapping_LINEAR)) -} - -func (m *LinearlyInterpolatedMapping) Encode(b *[]byte) { - enc.EncodeFlag(b, enc.FlagIndexMappingBaseLinear) - enc.EncodeFloat64LE(b, m.gamma) - enc.EncodeFloat64LE(b, m.indexOffset) -} - -func (m *LinearlyInterpolatedMapping) string() string { - var buffer bytes.Buffer - buffer.WriteString(fmt.Sprintf("gamma: %v, indexOffset: %v\n", m.gamma, m.indexOffset)) - return buffer.String() -} - -func withinTolerance(x, y, tolerance float64) bool { - if x == 0 || y == 0 { - return math.Abs(x) <= tolerance && math.Abs(y) <= tolerance - } else { - return math.Abs(x-y) <= tolerance*math.Max(math.Abs(x), math.Abs(y)) - } -} - -var _ IndexMapping = (*LinearlyInterpolatedMapping)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/logarithmic_mapping.go b/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/logarithmic_mapping.go deleted file mode 100644 index 7ac2ac477a..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/mapping/logarithmic_mapping.go +++ /dev/null @@ -1,125 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package mapping - -import ( - "bytes" - "errors" - "fmt" - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -// LogarithmicMapping is an IndexMapping that is memory-optimal, that is to say -// that given a targeted relative accuracy, it requires the least number of -// indices to cover a given range of values. This is done by logarithmically -// mapping floating-point values to integers. -type LogarithmicMapping struct { - gamma float64 // base - indexOffset float64 - multiplier float64 // precomputed for performance - minIndexableValue float64 - maxIndexableValue float64 -} - -func NewLogarithmicMapping(relativeAccuracy float64) (*LogarithmicMapping, error) { - if relativeAccuracy <= 0 || relativeAccuracy >= 1 { - return nil, errors.New("The relative accuracy must be between 0 and 1.") - } - gamma := (1 + relativeAccuracy) / (1 - relativeAccuracy) // > 1 - m, _ := NewLogarithmicMappingWithGamma(gamma, 0) - return m, nil -} - -func NewLogarithmicMappingWithGamma(gamma, indexOffset float64) (*LogarithmicMapping, error) { - if gamma <= 1 { - return nil, errors.New("Gamma must be greater than 1.") - } - multiplier := 1 / math.Log(gamma) - m := &LogarithmicMapping{ - gamma: gamma, - indexOffset: indexOffset, - multiplier: multiplier, - minIndexableValue: math.Max( - math.Exp((math.MinInt32-indexOffset)/multiplier+1), // so that index >= MinInt32 - minNormalFloat64*gamma, - ), - maxIndexableValue: math.Min( - math.Exp((math.MaxInt32-indexOffset)/multiplier-1), // so that index <= MaxInt32 - math.Exp(expOverflow)/(2*gamma)*(gamma+1), // so that math.Exp does not overflow - ), - } - return m, nil -} - -func (m *LogarithmicMapping) Equals(other IndexMapping) bool { - o, ok := other.(*LogarithmicMapping) - if !ok { - return false - } - tol := 1e-12 - return withinTolerance(m.gamma, o.gamma, tol) && withinTolerance(m.indexOffset, o.indexOffset, tol) -} - -func (m *LogarithmicMapping) Index(value float64) int { - index := math.Log(value)*m.multiplier + m.indexOffset - if index >= 0 { - return int(index) - } else { - return int(index) - 1 // faster than Math.Floor - } -} - -func (m *LogarithmicMapping) Value(index int) float64 { - return m.LowerBound(index) * (1 + m.RelativeAccuracy()) -} - -func (m *LogarithmicMapping) LowerBound(index int) float64 { - return math.Exp((float64(index) - m.indexOffset) / m.multiplier) -} - -func (m *LogarithmicMapping) MinIndexableValue() float64 { - return m.minIndexableValue -} - -func (m *LogarithmicMapping) MaxIndexableValue() float64 { - return m.maxIndexableValue -} - -func (m *LogarithmicMapping) RelativeAccuracy() float64 { - return 1 - 2/(1+m.gamma) -} - -// Generates a protobuf representation of this LogarithicMapping. -func (m *LogarithmicMapping) ToProto() *sketchpb.IndexMapping { - return &sketchpb.IndexMapping{ - Gamma: m.gamma, - IndexOffset: m.indexOffset, - Interpolation: sketchpb.IndexMapping_NONE, - } -} - -func (m *LogarithmicMapping) EncodeProto(builder *sketchpb.IndexMappingBuilder) { - builder.SetGamma(m.gamma) - builder.SetIndexOffset(m.indexOffset) - builder.SetInterpolation(uint64(sketchpb.IndexMapping_NONE)) -} - -func (m *LogarithmicMapping) Encode(b *[]byte) { - enc.EncodeFlag(b, enc.FlagIndexMappingBaseLogarithmic) - enc.EncodeFloat64LE(b, m.gamma) - enc.EncodeFloat64LE(b, m.indexOffset) -} - -func (m *LogarithmicMapping) string() string { - var buffer bytes.Buffer - buffer.WriteString(fmt.Sprintf("gamma: %v, indexOffset: %v\n", m.gamma, m.indexOffset)) - return buffer.String() -} - -var _ IndexMapping = (*LogarithmicMapping)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.pb.go b/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.pb.go deleted file mode 100644 index 3bff93da09..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.pb.go +++ /dev/null @@ -1,448 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v4.25.1 -// source: ddsketch.proto - -package sketchpb - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type IndexMapping_Interpolation int32 - -const ( - IndexMapping_NONE IndexMapping_Interpolation = 0 - IndexMapping_LINEAR IndexMapping_Interpolation = 1 - IndexMapping_QUADRATIC IndexMapping_Interpolation = 2 - IndexMapping_CUBIC IndexMapping_Interpolation = 3 -) - -// Enum value maps for IndexMapping_Interpolation. -var ( - IndexMapping_Interpolation_name = map[int32]string{ - 0: "NONE", - 1: "LINEAR", - 2: "QUADRATIC", - 3: "CUBIC", - } - IndexMapping_Interpolation_value = map[string]int32{ - "NONE": 0, - "LINEAR": 1, - "QUADRATIC": 2, - "CUBIC": 3, - } -) - -func (x IndexMapping_Interpolation) Enum() *IndexMapping_Interpolation { - p := new(IndexMapping_Interpolation) - *p = x - return p -} - -func (x IndexMapping_Interpolation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (IndexMapping_Interpolation) Descriptor() protoreflect.EnumDescriptor { - return file_ddsketch_proto_enumTypes[0].Descriptor() -} - -func (IndexMapping_Interpolation) Type() protoreflect.EnumType { - return &file_ddsketch_proto_enumTypes[0] -} - -func (x IndexMapping_Interpolation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use IndexMapping_Interpolation.Descriptor instead. -func (IndexMapping_Interpolation) EnumDescriptor() ([]byte, []int) { - return file_ddsketch_proto_rawDescGZIP(), []int{1, 0} -} - -// A DDSketch is essentially a histogram that partitions the range of positive values into an infinite number of -// indexed bins whose size grows exponentially. It keeps track of the number of values (or possibly floating-point -// weights) added to each bin. Negative values are partitioned like positive values, symmetrically to zero. -// The value zero as well as its close neighborhood that would be mapped to extreme bin indexes is mapped to a specific -// counter. -type DDSketch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The mapping between positive values and the bin indexes they belong to. - Mapping *IndexMapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` - // The store for keeping track of positive values. - PositiveValues *Store `protobuf:"bytes,2,opt,name=positiveValues,proto3" json:"positiveValues,omitempty"` - // The store for keeping track of negative values. A negative value v is mapped using its positive opposite -v. - NegativeValues *Store `protobuf:"bytes,3,opt,name=negativeValues,proto3" json:"negativeValues,omitempty"` - // The count for the value zero and its close neighborhood (whose width depends on the mapping). - ZeroCount float64 `protobuf:"fixed64,4,opt,name=zeroCount,proto3" json:"zeroCount,omitempty"` -} - -func (x *DDSketch) Reset() { - *x = DDSketch{} - if protoimpl.UnsafeEnabled { - mi := &file_ddsketch_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DDSketch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DDSketch) ProtoMessage() {} - -func (x *DDSketch) ProtoReflect() protoreflect.Message { - mi := &file_ddsketch_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DDSketch.ProtoReflect.Descriptor instead. -func (*DDSketch) Descriptor() ([]byte, []int) { - return file_ddsketch_proto_rawDescGZIP(), []int{0} -} - -func (x *DDSketch) GetMapping() *IndexMapping { - if x != nil { - return x.Mapping - } - return nil -} - -func (x *DDSketch) GetPositiveValues() *Store { - if x != nil { - return x.PositiveValues - } - return nil -} - -func (x *DDSketch) GetNegativeValues() *Store { - if x != nil { - return x.NegativeValues - } - return nil -} - -func (x *DDSketch) GetZeroCount() float64 { - if x != nil { - return x.ZeroCount - } - return 0 -} - -// How to map positive values to the bins they belong to. -type IndexMapping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The gamma parameter of the mapping, such that bin index that a value v belongs to is roughly equal to - // log(v)/log(gamma). - Gamma float64 `protobuf:"fixed64,1,opt,name=gamma,proto3" json:"gamma,omitempty"` - // An offset that can be used to shift all bin indexes. - IndexOffset float64 `protobuf:"fixed64,2,opt,name=indexOffset,proto3" json:"indexOffset,omitempty"` - // To speed up the computation of the index a value belongs to, the computation of the log may be approximated using - // the fact that the log to the base 2 of powers of 2 can be computed at a low cost from the binary representation of - // the input value. Other values can be approximated by interpolating between successive powers of 2 (linearly, - // quadratically or cubically). - // NONE means that the log is to be computed exactly (no interpolation). - Interpolation IndexMapping_Interpolation `protobuf:"varint,3,opt,name=interpolation,proto3,enum=IndexMapping_Interpolation" json:"interpolation,omitempty"` -} - -func (x *IndexMapping) Reset() { - *x = IndexMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_ddsketch_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *IndexMapping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*IndexMapping) ProtoMessage() {} - -func (x *IndexMapping) ProtoReflect() protoreflect.Message { - mi := &file_ddsketch_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use IndexMapping.ProtoReflect.Descriptor instead. -func (*IndexMapping) Descriptor() ([]byte, []int) { - return file_ddsketch_proto_rawDescGZIP(), []int{1} -} - -func (x *IndexMapping) GetGamma() float64 { - if x != nil { - return x.Gamma - } - return 0 -} - -func (x *IndexMapping) GetIndexOffset() float64 { - if x != nil { - return x.IndexOffset - } - return 0 -} - -func (x *IndexMapping) GetInterpolation() IndexMapping_Interpolation { - if x != nil { - return x.Interpolation - } - return IndexMapping_NONE -} - -// A Store maps bin indexes to their respective counts. -// Counts can be encoded sparsely using binCounts, but also in a contiguous way using contiguousBinCounts and -// contiguousBinIndexOffset. Given that non-empty bins are in practice usually contiguous or close to one another, the -// latter contiguous encoding method is usually more efficient than the sparse one. -// Both encoding methods can be used conjointly. If a bin appears in both the sparse and the contiguous encodings, its -// count value is the sum of the counts in each encodings. -type Store struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The bin counts, encoded sparsely. - BinCounts map[int32]float64 `protobuf:"bytes,1,rep,name=binCounts,proto3" json:"binCounts,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"` - // The bin counts, encoded contiguously. The values of contiguousBinCounts are the counts for the bins of indexes - // o, o+1, o+2, etc., where o is contiguousBinIndexOffset. - ContiguousBinCounts []float64 `protobuf:"fixed64,2,rep,packed,name=contiguousBinCounts,proto3" json:"contiguousBinCounts,omitempty"` - ContiguousBinIndexOffset int32 `protobuf:"zigzag32,3,opt,name=contiguousBinIndexOffset,proto3" json:"contiguousBinIndexOffset,omitempty"` -} - -func (x *Store) Reset() { - *x = Store{} - if protoimpl.UnsafeEnabled { - mi := &file_ddsketch_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Store) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Store) ProtoMessage() {} - -func (x *Store) ProtoReflect() protoreflect.Message { - mi := &file_ddsketch_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Store.ProtoReflect.Descriptor instead. -func (*Store) Descriptor() ([]byte, []int) { - return file_ddsketch_proto_rawDescGZIP(), []int{2} -} - -func (x *Store) GetBinCounts() map[int32]float64 { - if x != nil { - return x.BinCounts - } - return nil -} - -func (x *Store) GetContiguousBinCounts() []float64 { - if x != nil { - return x.ContiguousBinCounts - } - return nil -} - -func (x *Store) GetContiguousBinIndexOffset() int32 { - if x != nil { - return x.ContiguousBinIndexOffset - } - return 0 -} - -var File_ddsketch_proto protoreflect.FileDescriptor - -var file_ddsketch_proto_rawDesc = []byte{ - 0x0a, 0x0e, 0x64, 0x64, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xb1, 0x01, 0x0a, 0x08, 0x44, 0x44, 0x53, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x12, 0x27, 0x0a, - 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, - 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2e, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, - 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x06, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x52, 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x7a, 0x65, 0x72, 0x6f, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x7a, 0x65, 0x72, 0x6f, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xca, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x61, 0x6d, 0x6d, 0x61, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x67, 0x61, 0x6d, 0x6d, 0x61, 0x12, 0x20, 0x0a, 0x0b, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, - 0x52, 0x0b, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x41, 0x0a, - 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x3f, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4c, - 0x49, 0x4e, 0x45, 0x41, 0x52, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x51, 0x55, 0x41, 0x44, 0x52, - 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x55, 0x42, 0x49, 0x43, 0x10, - 0x03, 0x22, 0xec, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x62, - 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x42, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x62, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x12, 0x34, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, 0x42, 0x69, - 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x01, 0x42, 0x02, 0x10, - 0x01, 0x52, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, 0x75, 0x6f, 0x75, 0x73, 0x42, 0x69, 0x6e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, - 0x75, 0x6f, 0x75, 0x73, 0x42, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x18, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x67, - 0x75, 0x6f, 0x75, 0x73, 0x42, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4f, 0x66, 0x66, 0x73, - 0x65, 0x74, 0x1a, 0x3c, 0x0a, 0x0e, 0x42, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x11, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x44, - 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x65, 0x73, 0x2d, - 0x67, 0x6f, 0x2f, 0x64, 0x64, 0x73, 0x6b, 0x65, 0x74, 0x63, 0x68, 0x2f, 0x70, 0x62, 0x2f, 0x73, - 0x6b, 0x65, 0x74, 0x63, 0x68, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_ddsketch_proto_rawDescOnce sync.Once - file_ddsketch_proto_rawDescData = file_ddsketch_proto_rawDesc -) - -func file_ddsketch_proto_rawDescGZIP() []byte { - file_ddsketch_proto_rawDescOnce.Do(func() { - file_ddsketch_proto_rawDescData = protoimpl.X.CompressGZIP(file_ddsketch_proto_rawDescData) - }) - return file_ddsketch_proto_rawDescData -} - -var file_ddsketch_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_ddsketch_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_ddsketch_proto_goTypes = []any{ - (IndexMapping_Interpolation)(0), // 0: IndexMapping.Interpolation - (*DDSketch)(nil), // 1: DDSketch - (*IndexMapping)(nil), // 2: IndexMapping - (*Store)(nil), // 3: Store - nil, // 4: Store.BinCountsEntry -} -var file_ddsketch_proto_depIdxs = []int32{ - 2, // 0: DDSketch.mapping:type_name -> IndexMapping - 3, // 1: DDSketch.positiveValues:type_name -> Store - 3, // 2: DDSketch.negativeValues:type_name -> Store - 0, // 3: IndexMapping.interpolation:type_name -> IndexMapping.Interpolation - 4, // 4: Store.binCounts:type_name -> Store.BinCountsEntry - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name -} - -func init() { file_ddsketch_proto_init() } -func file_ddsketch_proto_init() { - if File_ddsketch_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_ddsketch_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*DDSketch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ddsketch_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*IndexMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_ddsketch_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Store); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_ddsketch_proto_rawDesc, - NumEnums: 1, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_ddsketch_proto_goTypes, - DependencyIndexes: file_ddsketch_proto_depIdxs, - EnumInfos: file_ddsketch_proto_enumTypes, - MessageInfos: file_ddsketch_proto_msgTypes, - }.Build() - File_ddsketch_proto = out.File - file_ddsketch_proto_rawDesc = nil - file_ddsketch_proto_goTypes = nil - file_ddsketch_proto_depIdxs = nil -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.proto_builder.go b/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.proto_builder.go deleted file mode 100644 index 898ec3326b..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/pb/sketchpb/ddsketch.proto_builder.go +++ /dev/null @@ -1,161 +0,0 @@ -// THIS IS A GENERATED FILE -// DO NOT EDIT -package sketchpb - -import ( - bytes "bytes" - protowire "google.golang.org/protobuf/encoding/protowire" - io "io" - math "math" -) - -type DDSketchBuilder struct { - writer io.Writer - buf bytes.Buffer - scratch []byte - indexMappingBuilder IndexMappingBuilder - storeBuilder StoreBuilder -} - -func NewDDSketchBuilder(writer io.Writer) *DDSketchBuilder { - return &DDSketchBuilder{ - writer: writer, - } -} -func (x *DDSketchBuilder) Reset(writer io.Writer) { - x.buf.Reset() - x.writer = writer -} -func (x *DDSketchBuilder) SetMapping(cb func(w *IndexMappingBuilder)) { - x.buf.Reset() - x.indexMappingBuilder.writer = &x.buf - x.indexMappingBuilder.scratch = x.scratch - cb(&x.indexMappingBuilder) - x.scratch = protowire.AppendVarint(x.scratch[:0], 0xa) - x.scratch = protowire.AppendVarint(x.scratch, uint64(x.buf.Len())) - x.writer.Write(x.scratch) - x.writer.Write(x.buf.Bytes()) -} -func (x *DDSketchBuilder) SetPositiveValues(cb func(w *StoreBuilder)) { - x.buf.Reset() - x.storeBuilder.writer = &x.buf - x.storeBuilder.scratch = x.scratch - cb(&x.storeBuilder) - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x12) - x.scratch = protowire.AppendVarint(x.scratch, uint64(x.buf.Len())) - x.writer.Write(x.scratch) - x.writer.Write(x.buf.Bytes()) -} -func (x *DDSketchBuilder) SetNegativeValues(cb func(w *StoreBuilder)) { - x.buf.Reset() - x.storeBuilder.writer = &x.buf - x.storeBuilder.scratch = x.scratch - cb(&x.storeBuilder) - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x1a) - x.scratch = protowire.AppendVarint(x.scratch, uint64(x.buf.Len())) - x.writer.Write(x.scratch) - x.writer.Write(x.buf.Bytes()) -} -func (x *DDSketchBuilder) SetZeroCount(v float64) { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x21) - x.scratch = protowire.AppendFixed64(x.scratch, math.Float64bits(v)) - x.writer.Write(x.scratch) -} - -type IndexMappingBuilder struct { - writer io.Writer - buf bytes.Buffer - scratch []byte -} - -func NewIndexMappingBuilder(writer io.Writer) *IndexMappingBuilder { - return &IndexMappingBuilder{ - writer: writer, - } -} -func (x *IndexMappingBuilder) Reset(writer io.Writer) { - x.buf.Reset() - x.writer = writer -} -func (x *IndexMappingBuilder) SetGamma(v float64) { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x9) - x.scratch = protowire.AppendFixed64(x.scratch, math.Float64bits(v)) - x.writer.Write(x.scratch) -} -func (x *IndexMappingBuilder) SetIndexOffset(v float64) { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x11) - x.scratch = protowire.AppendFixed64(x.scratch, math.Float64bits(v)) - x.writer.Write(x.scratch) -} -func (x *IndexMappingBuilder) SetInterpolation(v uint64) { - if v != 0 { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x18) - x.scratch = protowire.AppendVarint(x.scratch, v) - x.writer.Write(x.scratch) - } -} - -type StoreBuilder struct { - writer io.Writer - buf bytes.Buffer - scratch []byte - store_BinCountsEntryBuilder Store_BinCountsEntryBuilder -} - -func NewStoreBuilder(writer io.Writer) *StoreBuilder { - return &StoreBuilder{ - writer: writer, - } -} -func (x *StoreBuilder) Reset(writer io.Writer) { - x.buf.Reset() - x.writer = writer -} -func (x *StoreBuilder) AddBinCounts(cb func(w *Store_BinCountsEntryBuilder)) { - x.buf.Reset() - x.store_BinCountsEntryBuilder.writer = &x.buf - x.store_BinCountsEntryBuilder.scratch = x.scratch - cb(&x.store_BinCountsEntryBuilder) - x.scratch = protowire.AppendVarint(x.scratch[:0], 0xa) - x.scratch = protowire.AppendVarint(x.scratch, uint64(x.buf.Len())) - x.writer.Write(x.scratch) - x.writer.Write(x.buf.Bytes()) -} -func (x *StoreBuilder) AddContiguousBinCounts(v float64) { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x11) - x.scratch = protowire.AppendFixed64(x.scratch, math.Float64bits(v)) - x.writer.Write(x.scratch) -} -func (x *StoreBuilder) SetContiguousBinIndexOffset(v int32) { - x.scratch = x.scratch[:0] - x.scratch = protowire.AppendVarint(x.scratch, 0x18) - x.scratch = protowire.AppendVarint(x.scratch, protowire.EncodeZigZag(int64(v))) - x.writer.Write(x.scratch) -} - -type Store_BinCountsEntryBuilder struct { - writer io.Writer - buf bytes.Buffer - scratch []byte -} - -func NewStore_BinCountsEntryBuilder(writer io.Writer) *Store_BinCountsEntryBuilder { - return &Store_BinCountsEntryBuilder{ - writer: writer, - } -} -func (x *Store_BinCountsEntryBuilder) Reset(writer io.Writer) { - x.buf.Reset() - x.writer = writer -} -func (x *Store_BinCountsEntryBuilder) SetKey(v int32) { - x.scratch = x.scratch[:0] - x.scratch = protowire.AppendVarint(x.scratch, 0x8) - x.scratch = protowire.AppendVarint(x.scratch, protowire.EncodeZigZag(int64(v))) - x.writer.Write(x.scratch) -} -func (x *Store_BinCountsEntryBuilder) SetValue(v float64) { - x.scratch = protowire.AppendVarint(x.scratch[:0], 0x11) - x.scratch = protowire.AppendFixed64(x.scratch, math.Float64bits(v)) - x.writer.Write(x.scratch) -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/stat/summary.go b/vendor/github.com/DataDog/sketches-go/ddsketch/stat/summary.go deleted file mode 100644 index 5d56f39445..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/stat/summary.go +++ /dev/null @@ -1,171 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package stat - -import ( - "fmt" - "math" -) - -// SummaryStatistics keeps track of the count, the sum, the min and the max of -// recorded values. We use a compensated sum to avoid accumulating rounding -// errors (see https://en.wikipedia.org/wiki/Kahan_summation_algorithm). -type SummaryStatistics struct { - count float64 - sum float64 - sumCompensation float64 - simpleSum float64 - min float64 - max float64 -} - -func NewSummaryStatistics() *SummaryStatistics { - return &SummaryStatistics{ - count: 0, - sum: 0, - sumCompensation: 0, - simpleSum: 0, - min: math.Inf(1), - max: math.Inf(-1), - } -} - -// NewSummaryStatisticsFromData constructs SummaryStatistics from the provided data. -func NewSummaryStatisticsFromData(count, sum, min, max float64) (*SummaryStatistics, error) { - if !(count >= 0) { - return nil, fmt.Errorf("count (%g) must be positive or zero", count) - } - if count > 0 && min > max { - return nil, fmt.Errorf("min (%g) cannot be greater than max (%g) if count (%g) is positive", min, max, count) - } - if count == 0 && (min != math.Inf(1) || max != math.Inf(-1)) { - return nil, fmt.Errorf("empty summary statistics must have min (%g) and max (%g) equal to positive and negative infinities respectively", min, max) - } - return &SummaryStatistics{ - count: count, - sum: sum, - sumCompensation: 0, - simpleSum: sum, - min: min, - max: max, - }, nil -} - -func (s *SummaryStatistics) Count() float64 { - return s.count -} - -func (s *SummaryStatistics) Sum() float64 { - // Better error bounds to add both terms as the final sum - tmp := s.sum + s.sumCompensation - if math.IsNaN(tmp) && math.IsInf(s.simpleSum, 0) { - // If the compensated sum is spuriously NaN from accumulating one or more same-signed infinite - // values, return the correctly-signed infinity stored in simpleSum. - return s.simpleSum - } else { - return tmp - } -} - -func (s *SummaryStatistics) Min() float64 { - return s.min -} - -func (s *SummaryStatistics) Max() float64 { - return s.max -} - -func (s *SummaryStatistics) Add(value, count float64) { - s.AddToCount(count) - s.AddToSum(value * count) - if value < s.min { - s.min = value - } - if value > s.max { - s.max = value - } -} - -func (s *SummaryStatistics) AddToCount(addend float64) { - s.count += addend -} - -func (s *SummaryStatistics) AddToSum(addend float64) { - s.sumWithCompensation(addend) - s.simpleSum += addend -} - -func (s *SummaryStatistics) MergeWith(o *SummaryStatistics) { - s.count += o.count - s.sumWithCompensation(o.sum) - s.sumWithCompensation(o.sumCompensation) - s.simpleSum += o.simpleSum - if o.min < s.min { - s.min = o.min - } - if o.max > s.max { - s.max = o.max - } -} - -func (s *SummaryStatistics) sumWithCompensation(value float64) { - tmp := value - s.sumCompensation - velvel := s.sum + tmp // little wolf of rounding error - s.sumCompensation = velvel - s.sum - tmp - s.sum = velvel -} - -// Reweight adjusts the statistics so that they are equal to what they would -// have been if AddWithCount had been called with counts multiplied by factor. -func (s *SummaryStatistics) Reweight(factor float64) { - s.count *= factor - s.sum *= factor - s.sumCompensation *= factor - s.simpleSum *= factor - if factor == 0 { - s.min = math.Inf(1) - s.max = math.Inf(-1) - } -} - -// Rescale adjusts the statistics so that they are equal to what they would have -// been if AddWithCount had been called with values multiplied by factor. -func (s *SummaryStatistics) Rescale(factor float64) { - s.sum *= factor - s.sumCompensation *= factor - s.simpleSum *= factor - if factor > 0 { - s.min *= factor - s.max *= factor - } else if factor < 0 { - tmp := s.max * factor - s.max = s.min * factor - s.min = tmp - } else if s.count != 0 { - s.min = 0 - s.max = 0 - } -} - -func (s *SummaryStatistics) Clear() { - s.count = 0 - s.sum = 0 - s.sumCompensation = 0 - s.simpleSum = 0 - s.min = math.Inf(1) - s.max = math.Inf(-1) -} - -func (s *SummaryStatistics) Copy() *SummaryStatistics { - return &SummaryStatistics{ - count: s.count, - sum: s.sum, - sumCompensation: s.sumCompensation, - simpleSum: s.simpleSum, - min: s.min, - max: s.max, - } -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/bin.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/bin.go deleted file mode 100644 index 19843ba9e1..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/bin.go +++ /dev/null @@ -1,28 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import "errors" - -type Bin struct { - index int - count float64 -} - -func NewBin(index int, count float64) (*Bin, error) { - if count < 0 { - return nil, errors.New("The count cannot be negative") - } - return &Bin{index: index, count: count}, nil -} - -func (b Bin) Index() int { - return b.index -} - -func (b Bin) Count() float64 { - return b.count -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/buffered_paginated.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/buffered_paginated.go deleted file mode 100644 index a0a9e1e739..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/buffered_paginated.go +++ /dev/null @@ -1,681 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "errors" - "sort" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -const ( - ptrSize = 32 << (^uintptr(0) >> 63) - intSize = 32 << (^uint(0) >> 63) - float64size = 64 - bufferEntrySize = intSize - countSize = float64size - - defaultPageLenLog2 = 5 // pageLen = 32 -) - -// BufferedPaginatedStore allocates storage for counts in aligned fixed-size -// pages, themselves stored in a dynamically-sized slice. A page encodes the -// counts for a contiguous range of indexes, and two pages that are contiguous -// in the slice encode ranges that are contiguous. In addition, input indexes -// that are added to the store with a count equal to 1 can be stored in a -// buffer. -// The store favors using the buffer and only creates pages when the memory size -// of the page is no greater than the memory space that is needed to keep in the -// buffer the indexes that could otherwise be encoded in that page. That means -// that some indexes may stay indefinitely in the buffer if, to be removed from -// the buffer, they would create a page that is almost empty. The process that -// transfers indexes from the buffer to pages is called compaction. -// This store never collapses or merges bins, therefore, it does not introduce -// any error in itself. In particular, MinIndex(), MaxIndex(), Bins() and -// KeyAtRank() return exact results. -// There is no upper bound on the memory size that this store needs to encode -// input indexes, and some input data distributions may make it reach large -// sizes. However, thanks to the buffer and the fact that only required pages -// are allocated, it can be much more space efficient than alternative stores, -// especially dense stores, in various situations, including when only few -// indexes are added (with their counts equal to 1), when the input data has a -// few outliers or when the input data distribution is multimodal. -type BufferedPaginatedStore struct { - buffer []int // FIXME: in practice, int32 (even int16, depending on the accuracy parameter) is enough - bufferCompactionTriggerLen int // compaction happens only after this buffer length is reached - - pages [][]float64 // len == cap, the slice is always used to its maximum capacity - minPageIndex int // minPageIndex == maxInt iff pages are unused (they may still be allocated) - pageLenLog2 int - pageLenMask int -} - -func NewBufferedPaginatedStore() *BufferedPaginatedStore { - initialBufferCapacity := 4 - pageLenLog2 := defaultPageLenLog2 - pageLen := 1 << pageLenLog2 - - return &BufferedPaginatedStore{ - buffer: make([]int, 0, initialBufferCapacity), - bufferCompactionTriggerLen: 2 * pageLen, - pages: nil, - minPageIndex: maxInt, - pageLenLog2: pageLenLog2, - pageLenMask: pageLen - 1, - } -} - -// pageIndex returns the page number the given index falls on. -func (s *BufferedPaginatedStore) pageIndex(index int) int { - return index >> s.pageLenLog2 -} - -// lineIndex returns the line number within a page that the given index falls on. -func (s *BufferedPaginatedStore) lineIndex(index int) int { - return index & s.pageLenMask -} - -// index returns the store-level index for a given page number and a line within that page. -func (s *BufferedPaginatedStore) index(pageIndex, lineIndex int) int { - return pageIndex<= s.minPageIndex && pageIndex < s.minPageIndex+len(s.pages) { - // No need to extend s.pages. - page := &s.pages[pageIndex-s.minPageIndex] - if ensureExists && len(*page) == 0 { - *page = append(*page, make([]float64, pageLen)...) - } - return *page - } - - if !ensureExists { - return nil - } - - if pageIndex < s.minPageIndex { - if s.minPageIndex == maxInt { - if len(s.pages) == 0 { - s.pages = append(s.pages, make([][]float64, s.newPagesLen(1))...) - } - s.minPageIndex = pageIndex - len(s.pages)/2 - } else { - // Extends s.pages left. - newLen := s.newPagesLen(s.minPageIndex - pageIndex + 1 + len(s.pages)) - addedLen := newLen - len(s.pages) - s.pages = append(s.pages, make([][]float64, addedLen)...) - copy(s.pages[addedLen:], s.pages) - for i := 0; i < addedLen; i++ { - s.pages[i] = nil - } - s.minPageIndex -= addedLen - } - } else { - // Extends s.pages right. - s.pages = append(s.pages, make([][]float64, s.newPagesLen(pageIndex-s.minPageIndex+1)-len(s.pages))...) - } - - page := &s.pages[pageIndex-s.minPageIndex] - if len(*page) == 0 { - *page = append(*page, make([]float64, pageLen)...) - } - return *page -} - -func (s *BufferedPaginatedStore) newPagesLen(required int) int { - // Grow in size by multiples of 64 bytes - pageGrowthIncrement := 64 * 8 / ptrSize - return (required + pageGrowthIncrement - 1) & -pageGrowthIncrement -} - -// compact transfers indexes from the buffer to the pages. It only creates new -// pages if they can encode enough buffered indexes so that it frees more space -// in the buffer than the new page takes. -func (s *BufferedPaginatedStore) compact() { - pageLen := 1 << s.pageLenLog2 - - s.sortBuffer() - - for bufferPos := 0; bufferPos < len(s.buffer); { - bufferPageStart := bufferPos - pageIndex := s.pageIndex(s.buffer[bufferPageStart]) - bufferPos++ - for bufferPos < len(s.buffer) && s.pageIndex(s.buffer[bufferPos]) == pageIndex { - bufferPos++ - } - bufferPageEnd := bufferPos - - // We avoid creating a new page if it would take more memory space than - // what we would free in the buffer. Note that even when the page itself - // takes less memory space than the buffered indexes that can be encoded - // in the page, because we may have to extend s.pages, the store may end - // up larger. However, for the sake of simplicity, we ignore the length - // of s.pages. - ensureExists := (bufferPageEnd-bufferPageStart)*bufferEntrySize >= pageLen*float64size - newPage := s.page(pageIndex, ensureExists) - if len(newPage) > 0 { - for _, index := range s.buffer[bufferPageStart:bufferPageEnd] { - newPage[s.lineIndex(index)]++ - } - copy(s.buffer[bufferPageStart:], s.buffer[bufferPageEnd:]) - s.buffer = s.buffer[:len(s.buffer)+bufferPageStart-bufferPageEnd] - bufferPos = bufferPageStart - } - } - - s.bufferCompactionTriggerLen = len(s.buffer) + pageLen -} - -func (s *BufferedPaginatedStore) sortBuffer() { - sort.Ints(s.buffer) -} - -func (s *BufferedPaginatedStore) Add(index int) { - pageIndex := s.pageIndex(index) - if pageIndex >= s.minPageIndex && pageIndex < s.minPageIndex+len(s.pages) { - page := s.pages[pageIndex-s.minPageIndex] - if len(page) > 0 { - page[s.lineIndex(index)]++ - return - } - } - - // The page does not exist, use the buffer. - if len(s.buffer) == cap(s.buffer) && len(s.buffer) >= s.bufferCompactionTriggerLen { - s.compact() - } - - s.buffer = append(s.buffer, index) -} - -func (s *BufferedPaginatedStore) AddBin(bin Bin) { - s.AddWithCount(bin.Index(), bin.Count()) -} - -func (s *BufferedPaginatedStore) AddWithCount(index int, count float64) { - if count == 0 { - return - } else if count == 1 { - s.Add(index) - } else { - s.page(s.pageIndex(index), true)[s.lineIndex(index)] += count - } -} - -func (s *BufferedPaginatedStore) IsEmpty() bool { - if len(s.buffer) > 0 { - return false - } - for _, page := range s.pages { - for _, count := range page { - if count > 0 { - return false - } - } - } - return true -} - -func (s *BufferedPaginatedStore) TotalCount() float64 { - totalCount := float64(len(s.buffer)) - for _, page := range s.pages { - for _, count := range page { - totalCount += count - } - } - return totalCount -} - -func (s *BufferedPaginatedStore) MinIndex() (int, error) { - isEmpty := true - - // Iterate over the buffer. - var minIndex int - for _, index := range s.buffer { - if isEmpty || index < minIndex { - isEmpty = false - minIndex = index - } - } - - // Iterate over the pages. - for pageIndex := s.minPageIndex; pageIndex < s.minPageIndex+len(s.pages) && (isEmpty || pageIndex <= s.pageIndex(minIndex)); pageIndex++ { - page := s.pages[pageIndex-s.minPageIndex] - if len(page) == 0 { - continue - } - - var lineIndexRangeEnd int - if !isEmpty && pageIndex == s.pageIndex(minIndex) { - lineIndexRangeEnd = s.lineIndex(minIndex) - } else { - lineIndexRangeEnd = 1 << s.pageLenLog2 - } - - for lineIndex := 0; lineIndex < lineIndexRangeEnd; lineIndex++ { - if page[lineIndex] > 0 { - return s.index(pageIndex, lineIndex), nil - } - } - } - - if isEmpty { - return 0, errUndefinedMinIndex - } else { - return minIndex, nil - } -} - -func (s *BufferedPaginatedStore) MaxIndex() (int, error) { - isEmpty := true - - // Iterate over the buffer. - var maxIndex int - for _, index := range s.buffer { - if isEmpty || index > maxIndex { - isEmpty = false - maxIndex = index - } - } - - // Iterate over the pages. - for pageIndex := s.minPageIndex + len(s.pages) - 1; pageIndex >= s.minPageIndex && (isEmpty || pageIndex >= s.pageIndex(maxIndex)); pageIndex-- { - page := s.pages[pageIndex-s.minPageIndex] - if len(page) == 0 { - continue - } - - var lineIndexRangeStart int - if !isEmpty && pageIndex == s.pageIndex(maxIndex) { - lineIndexRangeStart = s.lineIndex(maxIndex) - } else { - lineIndexRangeStart = 0 - } - - for lineIndex := len(page) - 1; lineIndex >= lineIndexRangeStart; lineIndex-- { - if page[lineIndex] > 0 { - return s.index(pageIndex, lineIndex), nil - } - } - } - - if isEmpty { - return 0, errUndefinedMaxIndex - } else { - return maxIndex, nil - } -} - -func (s *BufferedPaginatedStore) KeyAtRank(rank float64) int { - if rank < 0 { - rank = 0 - } - key, err := s.minIndexWithCumulCount(func(cumulCount float64) bool { - return cumulCount > rank - }) - - if err != nil { - maxIndex, err := s.MaxIndex() - if err == nil { - return maxIndex - } else { - // FIXME: make Store's KeyAtRank consistent with MinIndex and MaxIndex - return 0 - } - } - return key -} - -// minIndexWithCumulCount returns the minimum index whose cumulative count (that -// is, the sum of the counts associated with the indexes less than or equal to -// the index) verifies the predicate. -func (s *BufferedPaginatedStore) minIndexWithCumulCount(predicate func(float64) bool) (int, error) { - s.sortBuffer() - cumulCount := float64(0) - - // Iterate over the pages and the buffer simultaneously. - bufferPos := 0 - for pageOffset, page := range s.pages { - for lineIndex, count := range page { - index := s.index(s.minPageIndex+pageOffset, lineIndex) - - // Iterate over the buffer until index is reached. - for ; bufferPos < len(s.buffer) && s.buffer[bufferPos] < index; bufferPos++ { - cumulCount++ - if predicate(cumulCount) { - return s.buffer[bufferPos], nil - } - } - cumulCount += count - if predicate(cumulCount) { - return index, nil - } - } - } - - // Iterate over the rest of the buffer - for ; bufferPos < len(s.buffer); bufferPos++ { - cumulCount++ - if predicate(cumulCount) { - return s.buffer[bufferPos], nil - } - } - - return 0, errors.New("the predicate on the cumulative count is never verified") -} - -func (s *BufferedPaginatedStore) MergeWith(other Store) { - o, ok := other.(*BufferedPaginatedStore) - if ok && s.pageLenLog2 == o.pageLenLog2 { - // Merge pages. - for oPageOffset, oPage := range o.pages { - if len(oPage) == 0 { - continue - } - oPageIndex := o.minPageIndex + oPageOffset - page := s.page(oPageIndex, true) - for i, oCount := range oPage { - page[i] += oCount - } - } - - // Merge buffers. - for _, index := range o.buffer { - s.Add(index) - } - } else { - // Fallback merging. - other.ForEach(func(index int, count float64) (stop bool) { - s.AddWithCount(index, count) - return false - }) - } -} - -func (s *BufferedPaginatedStore) MergeWithProto(pb *sketchpb.Store) { - for index, count := range pb.BinCounts { - s.AddWithCount(int(index), count) - } - for indexOffset, count := range pb.ContiguousBinCounts { - s.AddWithCount(int(pb.ContiguousBinIndexOffset)+indexOffset, count) - } -} - -func (s *BufferedPaginatedStore) Bins() <-chan Bin { - s.sortBuffer() - ch := make(chan Bin) - go func() { - defer close(ch) - bufferPos := 0 - - // Iterate over the pages and the buffer simultaneously. - for pageOffset, page := range s.pages { - for lineIndex, count := range page { - if count == 0 { - continue - } - - index := s.index(s.minPageIndex+pageOffset, lineIndex) - - // Iterate over the buffer until index is reached. - var indexBufferStartPos int - for { - indexBufferStartPos = bufferPos - if indexBufferStartPos >= len(s.buffer) || s.buffer[indexBufferStartPos] > index { - break - } - bufferPos++ - for bufferPos < len(s.buffer) && s.buffer[bufferPos] == s.buffer[indexBufferStartPos] { - bufferPos++ - } - if s.buffer[indexBufferStartPos] == index { - break - } - ch <- Bin{index: s.buffer[indexBufferStartPos], count: float64(bufferPos - indexBufferStartPos)} - } - ch <- Bin{index: index, count: count + float64(bufferPos-indexBufferStartPos)} - } - } - - // Iterate over the rest of the buffer. - for bufferPos < len(s.buffer) { - indexBufferStartPos := bufferPos - bufferPos++ - for bufferPos < len(s.buffer) && s.buffer[bufferPos] == s.buffer[indexBufferStartPos] { - bufferPos++ - } - bin := Bin{index: s.buffer[indexBufferStartPos], count: float64(bufferPos - indexBufferStartPos)} - ch <- bin - } - }() - return ch -} - -func (s *BufferedPaginatedStore) ForEach(f func(index int, count float64) (stop bool)) { - s.sortBuffer() - bufferPos := 0 - - // Iterate over the pages and the buffer simultaneously. - for pageOffset, page := range s.pages { - for lineIndex, count := range page { - if count == 0 { - continue - } - - index := s.index(s.minPageIndex+pageOffset, lineIndex) - - // Iterate over the buffer until index is reached. - var indexBufferStartPos int - for { - indexBufferStartPos = bufferPos - if indexBufferStartPos >= len(s.buffer) || s.buffer[indexBufferStartPos] > index { - break - } - bufferPos++ - for bufferPos < len(s.buffer) && s.buffer[bufferPos] == s.buffer[indexBufferStartPos] { - bufferPos++ - } - if s.buffer[indexBufferStartPos] == index { - break - } - if f(s.buffer[indexBufferStartPos], float64(bufferPos-indexBufferStartPos)) { - return - } - } - if f(index, count+float64(bufferPos-indexBufferStartPos)) { - return - } - } - } - - // Iterate over the rest of the buffer. - for bufferPos < len(s.buffer) { - indexBufferStartPos := bufferPos - bufferPos++ - for bufferPos < len(s.buffer) && s.buffer[bufferPos] == s.buffer[indexBufferStartPos] { - bufferPos++ - } - if f(s.buffer[indexBufferStartPos], float64(bufferPos-indexBufferStartPos)) { - return - } - } -} - -func (s *BufferedPaginatedStore) Copy() Store { - bufferCopy := make([]int, len(s.buffer)) - copy(bufferCopy, s.buffer) - pagesCopy := make([][]float64, len(s.pages)) - for i, page := range s.pages { - if len(page) > 0 { - pageCopy := make([]float64, len(page)) - copy(pageCopy, page) - pagesCopy[i] = pageCopy - } - } - return &BufferedPaginatedStore{ - buffer: bufferCopy, - bufferCompactionTriggerLen: s.bufferCompactionTriggerLen, - pages: pagesCopy, - minPageIndex: s.minPageIndex, - pageLenLog2: s.pageLenLog2, - pageLenMask: s.pageLenMask, - } -} - -func (s *BufferedPaginatedStore) Clear() { - s.buffer = s.buffer[:0] - for i := range s.pages { - s.pages[i] = s.pages[i][:0] - } - s.minPageIndex = maxInt -} - -func (s *BufferedPaginatedStore) ToProto() *sketchpb.Store { - if s.IsEmpty() { - return &sketchpb.Store{} - } - // FIXME: add heuristic to use contiguousBinCounts when cheaper. - binCounts := make(map[int32]float64) - s.ForEach(func(index int, count float64) (stop bool) { - binCounts[int32(index)] = count - return false - }) - return &sketchpb.Store{ - BinCounts: binCounts, - } -} - -func (s *BufferedPaginatedStore) EncodeProto(builder *sketchpb.StoreBuilder) { - if s.IsEmpty() { - return - } - - s.ForEach(func(index int, count float64) (stop bool) { - builder.AddBinCounts(func(w *sketchpb.Store_BinCountsEntryBuilder) { - w.SetKey(int32(index)) - w.SetValue(count) - }) - return false - }) -} - -func (s *BufferedPaginatedStore) Reweight(w float64) error { - if w <= 0 { - return errors.New("can't reweight by a negative factor") - } - if w == 1 { - return nil - } - buffer := s.buffer - s.buffer = s.buffer[:0] - for _, p := range s.pages { - for i := range p { - p[i] *= w - } - } - for _, index := range buffer { - s.AddWithCount(index, w) - } - return nil -} - -func (s *BufferedPaginatedStore) Encode(b *[]byte, t enc.FlagType) { - s.compact() - if len(s.buffer) > 0 { - enc.EncodeFlag(b, enc.NewFlag(t, enc.BinEncodingIndexDeltas)) - enc.EncodeUvarint64(b, uint64(len(s.buffer))) - previousIndex := 0 - for _, index := range s.buffer { - enc.EncodeVarint64(b, int64(index-previousIndex)) - previousIndex = index - } - } - - for pageOffset, page := range s.pages { - if len(page) > 0 { - enc.EncodeFlag(b, enc.NewFlag(t, enc.BinEncodingContiguousCounts)) - enc.EncodeUvarint64(b, uint64(len(page))) - enc.EncodeVarint64(b, int64(s.index(s.minPageIndex+pageOffset, 0))) - enc.EncodeVarint64(b, 1) - for _, count := range page { - enc.EncodeVarfloat64(b, count) - } - } - } -} - -func (s *BufferedPaginatedStore) DecodeAndMergeWith(b *[]byte, encodingMode enc.SubFlag) error { - switch encodingMode { - - case enc.BinEncodingIndexDeltas: - numBins, err := enc.DecodeUvarint64(b) - if err != nil { - return err - } - remaining := int(numBins) - index := int64(0) - // Process indexes in batches to avoid checking after each insertion - // whether compaction should happen. - for { - batchSize := min(remaining, max(cap(s.buffer), s.bufferCompactionTriggerLen)-len(s.buffer)) - for i := 0; i < batchSize; i++ { - indexDelta, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - index += indexDelta - s.buffer = append(s.buffer, int(index)) - } - remaining -= batchSize - if remaining == 0 { - return nil - } - s.compact() - } - - case enc.BinEncodingContiguousCounts: - numBins, err := enc.DecodeUvarint64(b) - if err != nil { - return err - } - indexOffset, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - indexDelta, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - pageLen := 1 << s.pageLenLog2 - for i := uint64(0); i < numBins; { - page := s.page(s.pageIndex(int(indexOffset)), true) - lineIndex := s.lineIndex(int(indexOffset)) - for lineIndex >= 0 && lineIndex < pageLen && i < numBins { - count, err := enc.DecodeVarfloat64(b) - if err != nil { - return err - } - page[lineIndex] += count - lineIndex += int(indexDelta) - indexOffset += indexDelta - i++ - } - } - return nil - - default: - return DecodeAndMergeWith(s, b, encodingMode) - } -} - -var _ Store = (*BufferedPaginatedStore)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_highest_dense_store.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_highest_dense_store.go deleted file mode 100644 index 2a431a1766..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_highest_dense_store.go +++ /dev/null @@ -1,188 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" -) - -type CollapsingHighestDenseStore struct { - DenseStore - maxNumBins int - isCollapsed bool -} - -func NewCollapsingHighestDenseStore(maxNumBins int) *CollapsingHighestDenseStore { - return &CollapsingHighestDenseStore{ - DenseStore: DenseStore{minIndex: math.MaxInt32, maxIndex: math.MinInt32}, - maxNumBins: maxNumBins, - isCollapsed: false, - } -} - -func (s *CollapsingHighestDenseStore) Add(index int) { - s.AddWithCount(index, float64(1)) -} - -func (s *CollapsingHighestDenseStore) AddBin(bin Bin) { - index := bin.Index() - count := bin.Count() - if count == 0 { - return - } - s.AddWithCount(index, count) -} - -func (s *CollapsingHighestDenseStore) AddWithCount(index int, count float64) { - if count == 0 { - return - } - arrayIndex := s.normalize(index) - s.bins[arrayIndex] += count - s.count += count -} - -// Normalize the store, if necessary, so that the counter of the specified index can be updated. -func (s *CollapsingHighestDenseStore) normalize(index int) int { - if index > s.maxIndex { - if s.isCollapsed { - return len(s.bins) - 1 - } else { - s.extendRange(index, index) - if s.isCollapsed { - return len(s.bins) - 1 - } - } - } else if index < s.minIndex { - s.extendRange(index, index) - } - return index - s.offset -} - -func (s *CollapsingHighestDenseStore) getNewLength(newMinIndex, newMaxIndex int) int { - return min(s.DenseStore.getNewLength(newMinIndex, newMaxIndex), s.maxNumBins) -} - -func (s *CollapsingHighestDenseStore) extendRange(newMinIndex, newMaxIndex int) { - newMinIndex = min(newMinIndex, s.minIndex) - newMaxIndex = max(newMaxIndex, s.maxIndex) - if s.IsEmpty() { - initialLength := s.getNewLength(newMinIndex, newMaxIndex) - s.bins = append(s.bins, make([]float64, initialLength)...) - s.offset = newMinIndex - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - s.adjust(newMinIndex, newMaxIndex) - } else if newMinIndex >= s.offset && newMaxIndex < s.offset+len(s.bins) { - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - } else { - // To avoid shifting too often when nearing the capacity of the array, - // we may grow it before we actually reach the capacity. - newLength := s.getNewLength(newMinIndex, newMaxIndex) - if newLength > len(s.bins) { - s.bins = append(s.bins, make([]float64, newLength-len(s.bins))...) - } - s.adjust(newMinIndex, newMaxIndex) - } -} - -// Adjust bins, offset, minIndex and maxIndex, without resizing the bins slice in order to make it fit the -// specified range. -func (s *CollapsingHighestDenseStore) adjust(newMinIndex, newMaxIndex int) { - if newMaxIndex-newMinIndex+1 > len(s.bins) { - // The range of indices is too wide, buckets of lowest indices need to be collapsed. - newMaxIndex = newMinIndex + len(s.bins) - 1 - if newMaxIndex <= s.minIndex { - // There will be only one non-empty bucket. - s.bins = make([]float64, len(s.bins)) - s.offset = newMinIndex - s.maxIndex = newMaxIndex - s.bins[len(s.bins)-1] = s.count - } else { - shift := s.offset - newMinIndex - if shift > 0 { - // Collapse the buckets. - n := float64(0) - for i := newMaxIndex + 1; i <= s.maxIndex; i++ { - n += s.bins[i-s.offset] - } - s.resetBins(newMaxIndex+1, s.maxIndex) - s.bins[newMaxIndex-s.offset] += n - s.maxIndex = newMaxIndex - // Shift the buckets to make room for newMinIndex. - s.shiftCounts(shift) - } else { - // Shift the buckets to make room for newMaxIndex. - s.shiftCounts(shift) - s.maxIndex = newMaxIndex - } - } - s.minIndex = newMinIndex - s.isCollapsed = true - } else { - s.centerCounts(newMinIndex, newMaxIndex) - } -} - -func (s *CollapsingHighestDenseStore) MergeWith(other Store) { - if other.IsEmpty() { - return - } - o, ok := other.(*CollapsingHighestDenseStore) - if !ok { - other.ForEach(func(index int, count float64) (stop bool) { - s.AddWithCount(index, count) - return false - }) - return - } - if o.minIndex < s.minIndex || o.maxIndex > s.maxIndex { - s.extendRange(o.minIndex, o.maxIndex) - } - idx := o.maxIndex - for ; idx > s.maxIndex && idx >= o.minIndex; idx-- { - s.bins[len(s.bins)-1] += o.bins[idx-o.offset] - } - for ; idx > o.minIndex; idx-- { - s.bins[idx-s.offset] += o.bins[idx-o.offset] - } - // This is a separate test so that the comparison in the previous loop is strict (>) and handles - // o.minIndex = Integer.MIN_VALUE. - if idx == o.minIndex { - s.bins[idx-s.offset] += o.bins[idx-o.offset] - } - s.count += o.count -} - -func (s *CollapsingHighestDenseStore) Copy() Store { - bins := make([]float64, len(s.bins)) - copy(bins, s.bins) - return &CollapsingHighestDenseStore{ - DenseStore: DenseStore{ - bins: bins, - count: s.count, - offset: s.offset, - minIndex: s.minIndex, - maxIndex: s.maxIndex, - }, - maxNumBins: s.maxNumBins, - isCollapsed: s.isCollapsed, - } -} - -func (s *CollapsingHighestDenseStore) Clear() { - s.DenseStore.Clear() - s.isCollapsed = false -} - -func (s *CollapsingHighestDenseStore) DecodeAndMergeWith(r *[]byte, encodingMode enc.SubFlag) error { - return DecodeAndMergeWith(s, r, encodingMode) -} - -var _ Store = (*CollapsingHighestDenseStore)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_lowest_dense_store.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_lowest_dense_store.go deleted file mode 100644 index 80ae2a5076..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/collapsing_lowest_dense_store.go +++ /dev/null @@ -1,207 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" -) - -// CollapsingLowestDenseStore is a dynamically growing contiguous (non-sparse) store. -// The lower bins get combined so that the total number of bins do not exceed maxNumBins. -type CollapsingLowestDenseStore struct { - DenseStore - maxNumBins int - isCollapsed bool -} - -func NewCollapsingLowestDenseStore(maxNumBins int) *CollapsingLowestDenseStore { - // Bins are not allocated until values are added. - // When the first value is added, a small number of bins are allocated. The number of bins will - // grow as needed up to maxNumBins. - return &CollapsingLowestDenseStore{ - DenseStore: DenseStore{minIndex: math.MaxInt32, maxIndex: math.MinInt32}, - maxNumBins: maxNumBins, - isCollapsed: false, - } -} - -func (s *CollapsingLowestDenseStore) Add(index int) { - s.AddWithCount(index, float64(1)) -} - -func (s *CollapsingLowestDenseStore) AddBin(bin Bin) { - index := bin.Index() - count := bin.Count() - if count == 0 { - return - } - s.AddWithCount(index, count) -} - -func (s *CollapsingLowestDenseStore) AddWithCount(index int, count float64) { - if count == 0 { - return - } - arrayIndex := s.normalize(index) - s.bins[arrayIndex] += count - s.count += count -} - -// Normalize the store, if necessary, so that the counter of the specified index can be updated. -func (s *CollapsingLowestDenseStore) normalize(index int) int { - if index < s.minIndex { - if s.isCollapsed { - return 0 - } else { - s.extendRange(index, index) - if s.isCollapsed { - return 0 - } - } - } else if index > s.maxIndex { - s.extendRange(index, index) - } - return index - s.offset -} - -func (s *CollapsingLowestDenseStore) getNewLength(newMinIndex, newMaxIndex int) int { - return min(s.DenseStore.getNewLength(newMinIndex, newMaxIndex), s.maxNumBins) -} - -func (s *CollapsingLowestDenseStore) extendRange(newMinIndex, newMaxIndex int) { - newMinIndex = min(newMinIndex, s.minIndex) - newMaxIndex = max(newMaxIndex, s.maxIndex) - if s.IsEmpty() { - initialLength := s.getNewLength(newMinIndex, newMaxIndex) - s.bins = append(s.bins, make([]float64, initialLength)...) - s.offset = newMinIndex - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - s.adjust(newMinIndex, newMaxIndex) - } else if newMinIndex >= s.offset && newMaxIndex < s.offset+len(s.bins) { - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - } else { - // To avoid shifting too often when nearing the capacity of the array, - // we may grow it before we actually reach the capacity. - newLength := s.getNewLength(newMinIndex, newMaxIndex) - if newLength > len(s.bins) { - s.bins = append(s.bins, make([]float64, newLength-len(s.bins))...) - } - s.adjust(newMinIndex, newMaxIndex) - } -} - -// Adjust bins, offset, minIndex and maxIndex, without resizing the bins slice in order to make it fit the -// specified range. -func (s *CollapsingLowestDenseStore) adjust(newMinIndex, newMaxIndex int) { - if newMaxIndex-newMinIndex+1 > len(s.bins) { - // The range of indices is too wide, buckets of lowest indices need to be collapsed. - newMinIndex = newMaxIndex - len(s.bins) + 1 - if newMinIndex >= s.maxIndex { - // There will be only one non-empty bucket. - s.bins = make([]float64, len(s.bins)) - s.offset = newMinIndex - s.minIndex = newMinIndex - s.bins[0] = s.count - } else { - shift := s.offset - newMinIndex - if shift < 0 { - // Collapse the buckets. - n := float64(0) - for i := s.minIndex; i < newMinIndex; i++ { - n += s.bins[i-s.offset] - } - s.resetBins(s.minIndex, newMinIndex-1) - s.bins[newMinIndex-s.offset] += n - s.minIndex = newMinIndex - // Shift the buckets to make room for newMaxIndex. - s.shiftCounts(shift) - } else { - // Shift the buckets to make room for newMinIndex. - s.shiftCounts(shift) - s.minIndex = newMinIndex - } - } - s.maxIndex = newMaxIndex - s.isCollapsed = true - } else { - s.centerCounts(newMinIndex, newMaxIndex) - } -} - -func (s *CollapsingLowestDenseStore) MergeWith(other Store) { - if other.IsEmpty() { - return - } - o, ok := other.(*CollapsingLowestDenseStore) - if !ok { - other.ForEach(func(index int, count float64) (stop bool) { - s.AddWithCount(index, count) - return false - }) - return - } - if o.minIndex < s.minIndex || o.maxIndex > s.maxIndex { - s.extendRange(o.minIndex, o.maxIndex) - } - idx := o.minIndex - for ; idx < s.minIndex && idx <= o.maxIndex; idx++ { - s.bins[0] += o.bins[idx-o.offset] - } - for ; idx < o.maxIndex; idx++ { - s.bins[idx-s.offset] += o.bins[idx-o.offset] - } - // This is a separate test so that the comparison in the previous loop is strict (<) and handles - // store.maxIndex = Integer.MAX_VALUE. - if idx == o.maxIndex { - s.bins[idx-s.offset] += o.bins[idx-o.offset] - } - s.count += o.count -} - -func (s *CollapsingLowestDenseStore) Copy() Store { - bins := make([]float64, len(s.bins)) - copy(bins, s.bins) - return &CollapsingLowestDenseStore{ - DenseStore: DenseStore{ - bins: bins, - count: s.count, - offset: s.offset, - minIndex: s.minIndex, - maxIndex: s.maxIndex, - }, - maxNumBins: s.maxNumBins, - isCollapsed: s.isCollapsed, - } -} - -func (s *CollapsingLowestDenseStore) Clear() { - s.DenseStore.Clear() - s.isCollapsed = false -} - -func (s *CollapsingLowestDenseStore) DecodeAndMergeWith(r *[]byte, encodingMode enc.SubFlag) error { - return DecodeAndMergeWith(s, r, encodingMode) -} - -var _ Store = (*CollapsingLowestDenseStore)(nil) - -func max(x, y int) int { - if x > y { - return x - } - return y -} - -func min(x, y int) int { - if x < y { - return x - } - return y -} diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/dense_store.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/dense_store.go deleted file mode 100644 index 817d36e058..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/dense_store.go +++ /dev/null @@ -1,341 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "bytes" - "errors" - "fmt" - "math" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -const ( - arrayLengthOverhead = 64 - arrayLengthGrowthIncrement = 0.1 - - // Grow the bins with an extra growthBuffer bins to prevent growing too often - growthBuffer = 128 -) - -// DenseStore is a dynamically growing contiguous (non-sparse) store. The number of bins are -// bound only by the size of the slice that can be allocated. -type DenseStore struct { - bins []float64 - count float64 - offset int - minIndex int - maxIndex int -} - -func NewDenseStore() *DenseStore { - return &DenseStore{minIndex: math.MaxInt32, maxIndex: math.MinInt32} -} - -func (s *DenseStore) Add(index int) { - s.AddWithCount(index, float64(1)) -} - -func (s *DenseStore) AddBin(bin Bin) { - if bin.count == 0 { - return - } - s.AddWithCount(bin.index, bin.count) -} - -func (s *DenseStore) AddWithCount(index int, count float64) { - if count == 0 { - return - } - arrayIndex := s.normalize(index) - s.bins[arrayIndex] += count - s.count += count -} - -// Normalize the store, if necessary, so that the counter of the specified index can be updated. -func (s *DenseStore) normalize(index int) int { - if index < s.minIndex || index > s.maxIndex { - s.extendRange(index, index) - } - return index - s.offset -} - -func (s *DenseStore) getNewLength(newMinIndex, newMaxIndex int) int { - desiredLength := newMaxIndex - newMinIndex + 1 - return int((float64(desiredLength+arrayLengthOverhead-1)/arrayLengthGrowthIncrement + 1) * arrayLengthGrowthIncrement) -} - -func (s *DenseStore) extendRange(newMinIndex, newMaxIndex int) { - - newMinIndex = min(newMinIndex, s.minIndex) - newMaxIndex = max(newMaxIndex, s.maxIndex) - - if s.IsEmpty() { - initialLength := s.getNewLength(newMinIndex, newMaxIndex) - s.bins = append(s.bins, make([]float64, initialLength)...) - s.offset = newMinIndex - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - s.adjust(newMinIndex, newMaxIndex) - } else if newMinIndex >= s.offset && newMaxIndex < s.offset+len(s.bins) { - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex - } else { - // To avoid shifting too often when nearing the capacity of the array, - // we may grow it before we actually reach the capacity. - newLength := s.getNewLength(newMinIndex, newMaxIndex) - if newLength > len(s.bins) { - s.bins = append(s.bins, make([]float64, newLength-len(s.bins))...) - } - s.adjust(newMinIndex, newMaxIndex) - } -} - -// Adjust bins, offset, minIndex and maxIndex, without resizing the bins slice in order to make it fit the -// specified range. -func (s *DenseStore) adjust(newMinIndex, newMaxIndex int) { - s.centerCounts(newMinIndex, newMaxIndex) -} - -func (s *DenseStore) centerCounts(newMinIndex, newMaxIndex int) { - midIndex := newMinIndex + (newMaxIndex-newMinIndex+1)/2 - s.shiftCounts(s.offset + len(s.bins)/2 - midIndex) - s.minIndex = newMinIndex - s.maxIndex = newMaxIndex -} - -func (s *DenseStore) shiftCounts(shift int) { - minArrIndex := s.minIndex - s.offset - maxArrIndex := s.maxIndex - s.offset - copy(s.bins[minArrIndex+shift:], s.bins[minArrIndex:maxArrIndex+1]) - if shift > 0 { - s.resetBins(s.minIndex, s.minIndex+shift-1) - } else { - s.resetBins(s.maxIndex+shift+1, s.maxIndex) - } - s.offset -= shift -} - -func (s *DenseStore) resetBins(fromIndex, toIndex int) { - for i := fromIndex - s.offset; i <= toIndex-s.offset; i++ { - s.bins[i] = 0 - } -} - -func (s *DenseStore) IsEmpty() bool { - return s.count == 0 -} - -func (s *DenseStore) TotalCount() float64 { - return s.count -} - -func (s *DenseStore) MinIndex() (int, error) { - if s.IsEmpty() { - return 0, errUndefinedMinIndex - } - return s.minIndex, nil -} - -func (s *DenseStore) MaxIndex() (int, error) { - if s.IsEmpty() { - return 0, errUndefinedMaxIndex - } - return s.maxIndex, nil -} - -// Return the key for the value at rank -func (s *DenseStore) KeyAtRank(rank float64) int { - if rank < 0 { - rank = 0 - } - var n float64 - for i, b := range s.bins { - n += b - if n > rank { - return i + s.offset - } - } - return s.maxIndex -} - -func (s *DenseStore) MergeWith(other Store) { - if other.IsEmpty() { - return - } - o, ok := other.(*DenseStore) - if !ok { - other.ForEach(func(index int, count float64) (stop bool) { - s.AddWithCount(index, count) - return false - }) - return - } - if o.minIndex < s.minIndex || o.maxIndex > s.maxIndex { - s.extendRange(o.minIndex, o.maxIndex) - } - for idx := o.minIndex; idx <= o.maxIndex; idx++ { - s.bins[idx-s.offset] += o.bins[idx-o.offset] - } - s.count += o.count -} - -func (s *DenseStore) Bins() <-chan Bin { - ch := make(chan Bin) - go func() { - defer close(ch) - for idx := s.minIndex; idx <= s.maxIndex; idx++ { - if s.bins[idx-s.offset] > 0 { - ch <- Bin{index: idx, count: s.bins[idx-s.offset]} - } - } - }() - return ch -} - -func (s *DenseStore) ForEach(f func(index int, count float64) (stop bool)) { - for idx := s.minIndex; idx <= s.maxIndex; idx++ { - if s.bins[idx-s.offset] > 0 { - if f(idx, s.bins[idx-s.offset]) { - return - } - } - } -} - -func (s *DenseStore) Copy() Store { - bins := make([]float64, len(s.bins)) - copy(bins, s.bins) - return &DenseStore{ - bins: bins, - count: s.count, - offset: s.offset, - minIndex: s.minIndex, - maxIndex: s.maxIndex, - } -} - -func (s *DenseStore) Clear() { - s.bins = s.bins[:0] - s.count = 0 - s.minIndex = math.MaxInt32 - s.maxIndex = math.MinInt32 -} - -func (s *DenseStore) string() string { - var buffer bytes.Buffer - buffer.WriteString("{") - for i := 0; i < len(s.bins); i++ { - index := i + s.offset - buffer.WriteString(fmt.Sprintf("%d: %f, ", index, s.bins[i])) - } - buffer.WriteString(fmt.Sprintf("count: %v, offset: %d, minIndex: %d, maxIndex: %d}", s.count, s.offset, s.minIndex, s.maxIndex)) - return buffer.String() -} - -func (s *DenseStore) ToProto() *sketchpb.Store { - if s.IsEmpty() { - return &sketchpb.Store{ContiguousBinCounts: nil} - } - bins := make([]float64, s.maxIndex-s.minIndex+1) - copy(bins, s.bins[s.minIndex-s.offset:s.maxIndex-s.offset+1]) - return &sketchpb.Store{ - ContiguousBinCounts: bins, - ContiguousBinIndexOffset: int32(s.minIndex), - } -} - -func (s *DenseStore) EncodeProto(builder *sketchpb.StoreBuilder) { - if s.IsEmpty() { - return - } - - for i := s.minIndex - s.offset; i < s.maxIndex-s.offset+1; i++ { - builder.AddContiguousBinCounts(s.bins[i]) - } - builder.SetContiguousBinIndexOffset(int32(s.minIndex)) -} - -func (s *DenseStore) Reweight(w float64) error { - if w <= 0 { - return errors.New("can't reweight by a negative factor") - } - if w == 1 { - return nil - } - s.count *= w - for idx := s.minIndex; idx <= s.maxIndex; idx++ { - s.bins[idx-s.offset] *= w - } - return nil -} - -func (s *DenseStore) Encode(b *[]byte, t enc.FlagType) { - if s.IsEmpty() { - return - } - - denseEncodingSize := 0 - numBins := uint64(s.maxIndex-s.minIndex) + 1 - denseEncodingSize += enc.Uvarint64Size(numBins) - denseEncodingSize += enc.Varint64Size(int64(s.minIndex)) - denseEncodingSize += enc.Varint64Size(1) - - sparseEncodingSize := 0 - numNonEmptyBins := uint64(0) - - previousIndex := s.minIndex - for index := s.minIndex; index <= s.maxIndex; index++ { - count := s.bins[index-s.offset] - countVarFloat64Size := enc.Varfloat64Size(count) - denseEncodingSize += countVarFloat64Size - if count != 0 { - numNonEmptyBins++ - sparseEncodingSize += enc.Varint64Size(int64(index - previousIndex)) - sparseEncodingSize += countVarFloat64Size - previousIndex = index - } - } - sparseEncodingSize += enc.Uvarint64Size(numNonEmptyBins) - - if denseEncodingSize <= sparseEncodingSize { - s.encodeDensely(b, t, numBins) - } else { - s.encodeSparsely(b, t, numNonEmptyBins) - } -} - -func (s *DenseStore) encodeDensely(b *[]byte, t enc.FlagType, numBins uint64) { - enc.EncodeFlag(b, enc.NewFlag(t, enc.BinEncodingContiguousCounts)) - enc.EncodeUvarint64(b, numBins) - enc.EncodeVarint64(b, int64(s.minIndex)) - enc.EncodeVarint64(b, 1) - for index := s.minIndex; index <= s.maxIndex; index++ { - enc.EncodeVarfloat64(b, s.bins[index-s.offset]) - } -} - -func (s *DenseStore) encodeSparsely(b *[]byte, t enc.FlagType, numNonEmptyBins uint64) { - enc.EncodeFlag(b, enc.NewFlag(t, enc.BinEncodingIndexDeltasAndCounts)) - enc.EncodeUvarint64(b, numNonEmptyBins) - previousIndex := 0 - for index := s.minIndex; index <= s.maxIndex; index++ { - count := s.bins[index-s.offset] - if count != 0 { - enc.EncodeVarint64(b, int64(index-previousIndex)) - enc.EncodeVarfloat64(b, count) - previousIndex = index - } - } -} - -func (s *DenseStore) DecodeAndMergeWith(b *[]byte, encodingMode enc.SubFlag) error { - return DecodeAndMergeWith(s, b, encodingMode) -} - -var _ Store = (*DenseStore)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/sparse.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/sparse.go deleted file mode 100644 index e0163f972b..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/sparse.go +++ /dev/null @@ -1,194 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "errors" - "sort" - - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -type SparseStore struct { - counts map[int]float64 -} - -func NewSparseStore() *SparseStore { - return &SparseStore{counts: make(map[int]float64)} -} - -func (s *SparseStore) Add(index int) { - s.counts[index]++ -} - -func (s *SparseStore) AddBin(bin Bin) { - s.AddWithCount(bin.index, bin.count) -} - -func (s *SparseStore) AddWithCount(index int, count float64) { - if count == 0 { - return - } - s.counts[index] += count -} - -func (s *SparseStore) Bins() <-chan Bin { - orderedBins := s.orderedBins() - ch := make(chan Bin) - go func() { - defer close(ch) - for _, bin := range orderedBins { - ch <- bin - } - }() - return ch -} - -func (s *SparseStore) orderedBins() []Bin { - bins := make([]Bin, 0, len(s.counts)) - for index, count := range s.counts { - bins = append(bins, Bin{index: index, count: count}) - } - sort.Slice(bins, func(i, j int) bool { return bins[i].index < bins[j].index }) - return bins -} - -func (s *SparseStore) ForEach(f func(index int, count float64) (stop bool)) { - for index, count := range s.counts { - if f(index, count) { - return - } - } -} - -func (s *SparseStore) Copy() Store { - countsCopy := make(map[int]float64) - for index, count := range s.counts { - countsCopy[index] = count - } - return &SparseStore{counts: countsCopy} -} - -func (s *SparseStore) Clear() { - for index := range s.counts { - delete(s.counts, index) - } -} - -func (s *SparseStore) IsEmpty() bool { - return len(s.counts) == 0 -} - -func (s *SparseStore) MaxIndex() (int, error) { - if s.IsEmpty() { - return 0, errUndefinedMaxIndex - } - maxIndex := minInt - for index := range s.counts { - if index > maxIndex { - maxIndex = index - } - } - return maxIndex, nil -} - -func (s *SparseStore) MinIndex() (int, error) { - if s.IsEmpty() { - return 0, errUndefinedMinIndex - } - minIndex := maxInt - for index := range s.counts { - if index < minIndex { - minIndex = index - } - } - return minIndex, nil -} - -func (s *SparseStore) TotalCount() float64 { - totalCount := float64(0) - for _, count := range s.counts { - totalCount += count - } - return totalCount -} - -func (s *SparseStore) KeyAtRank(rank float64) int { - orderedBins := s.orderedBins() - cumulCount := float64(0) - for _, bin := range orderedBins { - cumulCount += bin.count - if cumulCount > rank { - return bin.index - } - } - maxIndex, err := s.MaxIndex() - if err == nil { - return maxIndex - } else { - // FIXME: make Store's KeyAtRank consistent with MinIndex and MaxIndex - return 0 - } -} - -func (s *SparseStore) MergeWith(store Store) { - store.ForEach(func(index int, count float64) (stop bool) { - s.AddWithCount(index, count) - return false - }) -} - -func (s *SparseStore) ToProto() *sketchpb.Store { - binCounts := make(map[int32]float64) - for index, count := range s.counts { - binCounts[int32(index)] = count - } - return &sketchpb.Store{BinCounts: binCounts} -} - -func (s *SparseStore) EncodeProto(builder *sketchpb.StoreBuilder) { - - for index, count := range s.counts { - builder.AddBinCounts(func(w *sketchpb.Store_BinCountsEntryBuilder) { - w.SetKey(int32(index)) - w.SetValue(count) - }) - } -} - -func (s *SparseStore) Reweight(w float64) error { - if w <= 0 { - return errors.New("can't reweight by a negative factor") - } - if w == 1 { - return nil - } - for index := range s.counts { - s.counts[index] *= w - } - return nil -} - -func (s *SparseStore) Encode(b *[]byte, t enc.FlagType) { - if s.IsEmpty() { - return - } - enc.EncodeFlag(b, enc.NewFlag(t, enc.BinEncodingIndexDeltasAndCounts)) - enc.EncodeUvarint64(b, uint64(len(s.counts))) - previousIndex := 0 - for index, count := range s.counts { - enc.EncodeVarint64(b, int64(index-previousIndex)) - enc.EncodeVarfloat64(b, count) - previousIndex = index - } -} - -func (s *SparseStore) DecodeAndMergeWith(b *[]byte, encodingMode enc.SubFlag) error { - return DecodeAndMergeWith(s, b, encodingMode) -} - -var _ Store = (*SparseStore)(nil) diff --git a/vendor/github.com/DataDog/sketches-go/ddsketch/store/store.go b/vendor/github.com/DataDog/sketches-go/ddsketch/store/store.go deleted file mode 100644 index ca4fd92f79..0000000000 --- a/vendor/github.com/DataDog/sketches-go/ddsketch/store/store.go +++ /dev/null @@ -1,153 +0,0 @@ -// Unless explicitly stated otherwise all files in this repository are licensed -// under the Apache License 2.0. -// This product includes software developed at Datadog (https://www.datadoghq.com/). -// Copyright 2021 Datadog, Inc. - -package store - -import ( - "errors" - enc "github.com/DataDog/sketches-go/ddsketch/encoding" - "github.com/DataDog/sketches-go/ddsketch/pb/sketchpb" -) - -type Provider func() Store - -var ( - DefaultProvider = Provider(BufferedPaginatedStoreConstructor) - DenseStoreConstructor = Provider(func() Store { return NewDenseStore() }) - BufferedPaginatedStoreConstructor = Provider(func() Store { return NewBufferedPaginatedStore() }) - SparseStoreConstructor = Provider(func() Store { return NewSparseStore() }) -) - -const ( - maxInt = int(^uint(0) >> 1) - minInt = ^maxInt -) - -var ( - errUndefinedMinIndex = errors.New("MinIndex of empty store is undefined") - errUndefinedMaxIndex = errors.New("MaxIndex of empty store is undefined") -) - -type Store interface { - Add(index int) - AddBin(bin Bin) - AddWithCount(index int, count float64) - // Bins returns a channel that emits the bins that are encoded in the store. - // Note that this leaks a channel and a goroutine if it is not iterated to completion. - Bins() <-chan Bin - // ForEach applies f to all elements of the store or until f returns true. - ForEach(f func(index int, count float64) (stop bool)) - Copy() Store - // Clear empties the store while allowing reusing already allocated memory. - // In some situations, it may be advantageous to clear and reuse a store - // rather than instantiating a new one. Keeping reusing the same store again - // and again on varying input data distributions may however ultimately make - // the store overly large and may waste memory space. - Clear() - IsEmpty() bool - MaxIndex() (int, error) - MinIndex() (int, error) - TotalCount() float64 - KeyAtRank(rank float64) int - MergeWith(store Store) - ToProto() *sketchpb.Store - EncodeProto(builder *sketchpb.StoreBuilder) - // Reweight multiplies all values from the store by w, but keeps the same global distribution. - Reweight(w float64) error - // Encode encodes the bins of the store and appends its content to the - // provided []byte. - // The provided FlagType indicates whether the store encodes positive or - // negative values. - Encode(b *[]byte, t enc.FlagType) - // DecodeAndMergeWith decodes bins that have been encoded in the format of - // the provided binEncodingMode and merges them within the receiver store. - // It updates the provided []byte so that it starts immediately after the - // encoded bins. - DecodeAndMergeWith(b *[]byte, binEncodingMode enc.SubFlag) error -} - -// FromProto returns an instance of DenseStore that contains the data in the provided protobuf representation. -func FromProto(pb *sketchpb.Store) *DenseStore { - store := NewDenseStore() - MergeWithProto(store, pb) - return store -} - -// MergeWithProto merges the distribution in a protobuf Store to an existing store. -// - if called with an empty store, this simply populates the store with the distribution in the protobuf Store. -// - if called with a non-empty store, this has the same outcome as deserializing the protobuf Store, then merging. -func MergeWithProto(store Store, pb *sketchpb.Store) { - for idx, count := range pb.BinCounts { - store.AddWithCount(int(idx), count) - } - for idx, count := range pb.ContiguousBinCounts { - store.AddWithCount(idx+int(pb.ContiguousBinIndexOffset), count) - } -} - -func DecodeAndMergeWith(s Store, b *[]byte, binEncodingMode enc.SubFlag) error { - switch binEncodingMode { - - case enc.BinEncodingIndexDeltasAndCounts: - numBins, err := enc.DecodeUvarint64(b) - if err != nil { - return err - } - index := int64(0) - for i := uint64(0); i < numBins; i++ { - indexDelta, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - count, err := enc.DecodeVarfloat64(b) - if err != nil { - return err - } - index += indexDelta - s.AddWithCount(int(index), count) - } - - case enc.BinEncodingIndexDeltas: - numBins, err := enc.DecodeUvarint64(b) - if err != nil { - return err - } - index := int64(0) - for i := uint64(0); i < numBins; i++ { - indexDelta, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - index += indexDelta - s.Add(int(index)) - } - - case enc.BinEncodingContiguousCounts: - numBins, err := enc.DecodeUvarint64(b) - if err != nil { - return err - } - index, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - indexDelta, err := enc.DecodeVarint64(b) - if err != nil { - return err - } - for i := uint64(0); i < numBins; i++ { - count, err := enc.DecodeVarfloat64(b) - if err != nil { - return err - } - s.AddWithCount(int(index), count) - index += indexDelta - } - - default: - return errors.New("unknown bin encoding") - } - return nil -} diff --git a/vendor/github.com/Masterminds/semver/v3/.gitignore b/vendor/github.com/Masterminds/semver/v3/.gitignore deleted file mode 100644 index 6b061e6174..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_fuzz/ \ No newline at end of file diff --git a/vendor/github.com/Masterminds/semver/v3/.golangci.yml b/vendor/github.com/Masterminds/semver/v3/.golangci.yml deleted file mode 100644 index fbc6332592..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/.golangci.yml +++ /dev/null @@ -1,27 +0,0 @@ -run: - deadline: 2m - -linters: - disable-all: true - enable: - - misspell - - govet - - staticcheck - - errcheck - - unparam - - ineffassign - - nakedret - - gocyclo - - dupl - - goimports - - revive - - gosec - - gosimple - - typecheck - - unused - -linters-settings: - gofmt: - simplify: true - dupl: - threshold: 600 diff --git a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md b/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md deleted file mode 100644 index f95a504fe7..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/CHANGELOG.md +++ /dev/null @@ -1,242 +0,0 @@ -# Changelog - -## 3.3.0 (2024-08-27) - -### Added - -- #238: Add LessThanEqual and GreaterThanEqual functions (thanks @grosser) -- #213: nil version equality checking (thanks @KnutZuidema) - -### Changed - -- #241: Simplify StrictNewVersion parsing (thanks @grosser) -- Testing support up through Go 1.23 -- Minimum version set to 1.21 as this is what's tested now -- Fuzz testing now supports caching - -## 3.2.1 (2023-04-10) - -### Changed - -- #198: Improved testing around pre-release names -- #200: Improved code scanning with addition of CodeQL -- #201: Testing now includes Go 1.20. Go 1.17 has been dropped -- #202: Migrated Fuzz testing to Go built-in Fuzzing. CI runs daily -- #203: Docs updated for security details - -### Fixed - -- #199: Fixed issue with range transformations - -## 3.2.0 (2022-11-28) - -### Added - -- #190: Added text marshaling and unmarshaling -- #167: Added JSON marshalling for constraints (thanks @SimonTheLeg) -- #173: Implement encoding.TextMarshaler and encoding.TextUnmarshaler on Version (thanks @MarkRosemaker) -- #179: Added New() version constructor (thanks @kazhuravlev) - -### Changed - -- #182/#183: Updated CI testing setup - -### Fixed - -- #186: Fixing issue where validation of constraint section gave false positives -- #176: Fix constraints check with *-0 (thanks @mtt0) -- #181: Fixed Caret operator (^) gives unexpected results when the minor version in constraint is 0 (thanks @arshchimni) -- #161: Fixed godoc (thanks @afirth) - -## 3.1.1 (2020-11-23) - -### Fixed - -- #158: Fixed issue with generated regex operation order that could cause problem - -## 3.1.0 (2020-04-15) - -### Added - -- #131: Add support for serializing/deserializing SQL (thanks @ryancurrah) - -### Changed - -- #148: More accurate validation messages on constraints - -## 3.0.3 (2019-12-13) - -### Fixed - -- #141: Fixed issue with <= comparison - -## 3.0.2 (2019-11-14) - -### Fixed - -- #134: Fixed broken constraint checking with ^0.0 (thanks @krmichelos) - -## 3.0.1 (2019-09-13) - -### Fixed - -- #125: Fixes issue with module path for v3 - -## 3.0.0 (2019-09-12) - -This is a major release of the semver package which includes API changes. The Go -API is compatible with ^1. The Go API was not changed because many people are using -`go get` without Go modules for their applications and API breaking changes cause -errors which we have or would need to support. - -The changes in this release are the handling based on the data passed into the -functions. These are described in the added and changed sections below. - -### Added - -- StrictNewVersion function. This is similar to NewVersion but will return an - error if the version passed in is not a strict semantic version. For example, - 1.2.3 would pass but v1.2.3 or 1.2 would fail because they are not strictly - speaking semantic versions. This function is faster, performs fewer operations, - and uses fewer allocations than NewVersion. -- Fuzzing has been performed on NewVersion, StrictNewVersion, and NewConstraint. - The Makefile contains the operations used. For more information on you can start - on Wikipedia at https://en.wikipedia.org/wiki/Fuzzing -- Now using Go modules - -### Changed - -- NewVersion has proper prerelease and metadata validation with error messages - to signal an issue with either of them -- ^ now operates using a similar set of rules to npm/js and Rust/Cargo. If the - version is >=1 the ^ ranges works the same as v1. For major versions of 0 the - rules have changed. The minor version is treated as the stable version unless - a patch is specified and then it is equivalent to =. One difference from npm/js - is that prereleases there are only to a specific version (e.g. 1.2.3). - Prereleases here look over multiple versions and follow semantic version - ordering rules. This pattern now follows along with the expected and requested - handling of this packaged by numerous users. - -## 1.5.0 (2019-09-11) - -### Added - -- #103: Add basic fuzzing for `NewVersion()` (thanks @jesse-c) - -### Changed - -- #82: Clarify wildcard meaning in range constraints and update tests for it (thanks @greysteil) -- #83: Clarify caret operator range for pre-1.0.0 dependencies (thanks @greysteil) -- #72: Adding docs comment pointing to vert for a cli -- #71: Update the docs on pre-release comparator handling -- #89: Test with new go versions (thanks @thedevsaddam) -- #87: Added $ to ValidPrerelease for better validation (thanks @jeremycarroll) - -### Fixed - -- #78: Fix unchecked error in example code (thanks @ravron) -- #70: Fix the handling of pre-releases and the 0.0.0 release edge case -- #97: Fixed copyright file for proper display on GitHub -- #107: Fix handling prerelease when sorting alphanum and num -- #109: Fixed where Validate sometimes returns wrong message on error - -## 1.4.2 (2018-04-10) - -### Changed - -- #72: Updated the docs to point to vert for a console appliaction -- #71: Update the docs on pre-release comparator handling - -### Fixed - -- #70: Fix the handling of pre-releases and the 0.0.0 release edge case - -## 1.4.1 (2018-04-02) - -### Fixed - -- Fixed #64: Fix pre-release precedence issue (thanks @uudashr) - -## 1.4.0 (2017-10-04) - -### Changed - -- #61: Update NewVersion to parse ints with a 64bit int size (thanks @zknill) - -## 1.3.1 (2017-07-10) - -### Fixed - -- Fixed #57: number comparisons in prerelease sometimes inaccurate - -## 1.3.0 (2017-05-02) - -### Added - -- #45: Added json (un)marshaling support (thanks @mh-cbon) -- Stability marker. See https://masterminds.github.io/stability/ - -### Fixed - -- #51: Fix handling of single digit tilde constraint (thanks @dgodd) - -### Changed - -- #55: The godoc icon moved from png to svg - -## 1.2.3 (2017-04-03) - -### Fixed - -- #46: Fixed 0.x.x and 0.0.x in constraints being treated as * - -## Release 1.2.2 (2016-12-13) - -### Fixed - -- #34: Fixed issue where hyphen range was not working with pre-release parsing. - -## Release 1.2.1 (2016-11-28) - -### Fixed - -- #24: Fixed edge case issue where constraint "> 0" does not handle "0.0.1-alpha" - properly. - -## Release 1.2.0 (2016-11-04) - -### Added - -- #20: Added MustParse function for versions (thanks @adamreese) -- #15: Added increment methods on versions (thanks @mh-cbon) - -### Fixed - -- Issue #21: Per the SemVer spec (section 9) a pre-release is unstable and - might not satisfy the intended compatibility. The change here ignores pre-releases - on constraint checks (e.g., ~ or ^) when a pre-release is not part of the - constraint. For example, `^1.2.3` will ignore pre-releases while - `^1.2.3-alpha` will include them. - -## Release 1.1.1 (2016-06-30) - -### Changed - -- Issue #9: Speed up version comparison performance (thanks @sdboyer) -- Issue #8: Added benchmarks (thanks @sdboyer) -- Updated Go Report Card URL to new location -- Updated Readme to add code snippet formatting (thanks @mh-cbon) -- Updating tagging to v[SemVer] structure for compatibility with other tools. - -## Release 1.1.0 (2016-03-11) - -- Issue #2: Implemented validation to provide reasons a versions failed a - constraint. - -## Release 1.0.1 (2015-12-31) - -- Fixed #1: * constraint failing on valid versions. - -## Release 1.0.0 (2015-10-20) - -- Initial release diff --git a/vendor/github.com/Masterminds/semver/v3/LICENSE.txt b/vendor/github.com/Masterminds/semver/v3/LICENSE.txt deleted file mode 100644 index 9ff7da9c48..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2014-2019, Matt Butcher and Matt Farina - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/Masterminds/semver/v3/Makefile b/vendor/github.com/Masterminds/semver/v3/Makefile deleted file mode 100644 index 9ca87a2c79..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -GOPATH=$(shell go env GOPATH) -GOLANGCI_LINT=$(GOPATH)/bin/golangci-lint - -.PHONY: lint -lint: $(GOLANGCI_LINT) - @echo "==> Linting codebase" - @$(GOLANGCI_LINT) run - -.PHONY: test -test: - @echo "==> Running tests" - GO111MODULE=on go test -v - -.PHONY: test-cover -test-cover: - @echo "==> Running Tests with coverage" - GO111MODULE=on go test -cover . - -.PHONY: fuzz -fuzz: - @echo "==> Running Fuzz Tests" - go env GOCACHE - go test -fuzz=FuzzNewVersion -fuzztime=15s . - go test -fuzz=FuzzStrictNewVersion -fuzztime=15s . - go test -fuzz=FuzzNewConstraint -fuzztime=15s . - -$(GOLANGCI_LINT): - # Install golangci-lint. The configuration for it is in the .golangci.yml - # file in the root of the repository - echo ${GOPATH} - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.56.2 diff --git a/vendor/github.com/Masterminds/semver/v3/README.md b/vendor/github.com/Masterminds/semver/v3/README.md deleted file mode 100644 index ed56936084..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/README.md +++ /dev/null @@ -1,258 +0,0 @@ -# SemVer - -The `semver` package provides the ability to work with [Semantic Versions](http://semver.org) in Go. Specifically it provides the ability to: - -* Parse semantic versions -* Sort semantic versions -* Check if a semantic version fits within a set of constraints -* Optionally work with a `v` prefix - -[![Stability: -Active](https://masterminds.github.io/stability/active.svg)](https://masterminds.github.io/stability/active.html) -[![](https://github.com/Masterminds/semver/workflows/Tests/badge.svg)](https://github.com/Masterminds/semver/actions) -[![GoDoc](https://img.shields.io/static/v1?label=godoc&message=reference&color=blue)](https://pkg.go.dev/github.com/Masterminds/semver/v3) -[![Go Report Card](https://goreportcard.com/badge/github.com/Masterminds/semver)](https://goreportcard.com/report/github.com/Masterminds/semver) - -## Package Versions - -Note, import `github.com/Masterminds/semver/v3` to use the latest version. - -There are three major versions fo the `semver` package. - -* 3.x.x is the stable and active version. This version is focused on constraint - compatibility for range handling in other tools from other languages. It has - a similar API to the v1 releases. The development of this version is on the master - branch. The documentation for this version is below. -* 2.x was developed primarily for [dep](https://github.com/golang/dep). There are - no tagged releases and the development was performed by [@sdboyer](https://github.com/sdboyer). - There are API breaking changes from v1. This version lives on the [2.x branch](https://github.com/Masterminds/semver/tree/2.x). -* 1.x.x is the original release. It is no longer maintained. You should use the - v3 release instead. You can read the documentation for the 1.x.x release - [here](https://github.com/Masterminds/semver/blob/release-1/README.md). - -## Parsing Semantic Versions - -There are two functions that can parse semantic versions. The `StrictNewVersion` -function only parses valid version 2 semantic versions as outlined in the -specification. The `NewVersion` function attempts to coerce a version into a -semantic version and parse it. For example, if there is a leading v or a version -listed without all 3 parts (e.g. `v1.2`) it will attempt to coerce it into a valid -semantic version (e.g., 1.2.0). In both cases a `Version` object is returned -that can be sorted, compared, and used in constraints. - -When parsing a version an error is returned if there is an issue parsing the -version. For example, - - v, err := semver.NewVersion("1.2.3-beta.1+build345") - -The version object has methods to get the parts of the version, compare it to -other versions, convert the version back into a string, and get the original -string. Getting the original string is useful if the semantic version was coerced -into a valid form. - -## Sorting Semantic Versions - -A set of versions can be sorted using the `sort` package from the standard library. -For example, - -```go -raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} -vs := make([]*semver.Version, len(raw)) -for i, r := range raw { - v, err := semver.NewVersion(r) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - vs[i] = v -} - -sort.Sort(semver.Collection(vs)) -``` - -## Checking Version Constraints - -There are two methods for comparing versions. One uses comparison methods on -`Version` instances and the other uses `Constraints`. There are some important -differences to notes between these two methods of comparison. - -1. When two versions are compared using functions such as `Compare`, `LessThan`, - and others it will follow the specification and always include pre-releases - within the comparison. It will provide an answer that is valid with the - comparison section of the spec at https://semver.org/#spec-item-11 -2. When constraint checking is used for checks or validation it will follow a - different set of rules that are common for ranges with tools like npm/js - and Rust/Cargo. This includes considering pre-releases to be invalid if the - ranges does not include one. If you want to have it include pre-releases a - simple solution is to include `-0` in your range. -3. Constraint ranges can have some complex rules including the shorthand use of - ~ and ^. For more details on those see the options below. - -There are differences between the two methods or checking versions because the -comparison methods on `Version` follow the specification while comparison ranges -are not part of the specification. Different packages and tools have taken it -upon themselves to come up with range rules. This has resulted in differences. -For example, npm/js and Cargo/Rust follow similar patterns while PHP has a -different pattern for ^. The comparison features in this package follow the -npm/js and Cargo/Rust lead because applications using it have followed similar -patters with their versions. - -Checking a version against version constraints is one of the most featureful -parts of the package. - -```go -c, err := semver.NewConstraint(">= 1.2.3") -if err != nil { - // Handle constraint not being parsable. -} - -v, err := semver.NewVersion("1.3") -if err != nil { - // Handle version not being parsable. -} -// Check if the version meets the constraints. The variable a will be true. -a := c.Check(v) -``` - -### Basic Comparisons - -There are two elements to the comparisons. First, a comparison string is a list -of space or comma separated AND comparisons. These are then separated by || (OR) -comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a -comparison that's greater than or equal to 1.2 and less than 3.0.0 or is -greater than or equal to 4.2.3. - -The basic comparisons are: - -* `=`: equal (aliased to no operator) -* `!=`: not equal -* `>`: greater than -* `<`: less than -* `>=`: greater than or equal to -* `<=`: less than or equal to - -### Working With Prerelease Versions - -Pre-releases, for those not familiar with them, are used for software releases -prior to stable or generally available releases. Examples of pre-releases include -development, alpha, beta, and release candidate releases. A pre-release may be -a version such as `1.2.3-beta.1` while the stable release would be `1.2.3`. In the -order of precedence, pre-releases come before their associated releases. In this -example `1.2.3-beta.1 < 1.2.3`. - -According to the Semantic Version specification, pre-releases may not be -API compliant with their release counterpart. It says, - -> A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version. - -SemVer's comparisons using constraints without a pre-release comparator will skip -pre-release versions. For example, `>=1.2.3` will skip pre-releases when looking -at a list of releases while `>=1.2.3-0` will evaluate and find pre-releases. - -The reason for the `0` as a pre-release version in the example comparison is -because pre-releases can only contain ASCII alphanumerics and hyphens (along with -`.` separators), per the spec. Sorting happens in ASCII sort order, again per the -spec. The lowest character is a `0` in ASCII sort order -(see an [ASCII Table](http://www.asciitable.com/)) - -Understanding ASCII sort ordering is important because A-Z comes before a-z. That -means `>=1.2.3-BETA` will return `1.2.3-alpha`. What you might expect from case -sensitivity doesn't apply here. This is due to ASCII sort ordering which is what -the spec specifies. - -### Hyphen Range Comparisons - -There are multiple methods to handle ranges and the first is hyphens ranges. -These look like: - -* `1.2 - 1.4.5` which is equivalent to `>= 1.2 <= 1.4.5` -* `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` - -Note that `1.2-1.4.5` without whitespace is parsed completely differently; it's -parsed as a single constraint `1.2.0` with _prerelease_ `1.4.5`. - -### Wildcards In Comparisons - -The `x`, `X`, and `*` characters can be used as a wildcard character. This works -for all comparison operators. When used on the `=` operator it falls -back to the patch level comparison (see tilde below). For example, - -* `1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` -* `>= 1.2.x` is equivalent to `>= 1.2.0` -* `<= 2.x` is equivalent to `< 3` -* `*` is equivalent to `>= 0.0.0` - -### Tilde Range Comparisons (Patch) - -The tilde (`~`) comparison operator is for patch level ranges when a minor -version is specified and major level changes when the minor number is missing. -For example, - -* `~1.2.3` is equivalent to `>= 1.2.3, < 1.3.0` -* `~1` is equivalent to `>= 1, < 2` -* `~2.3` is equivalent to `>= 2.3, < 2.4` -* `~1.2.x` is equivalent to `>= 1.2.0, < 1.3.0` -* `~1.x` is equivalent to `>= 1, < 2` - -### Caret Range Comparisons (Major) - -The caret (`^`) comparison operator is for major level changes once a stable -(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts -as the API stability level. This is useful when comparisons of API versions as a -major change is API breaking. For example, - -* `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` -* `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` -* `^2.3` is equivalent to `>= 2.3, < 3` -* `^2.x` is equivalent to `>= 2.0.0, < 3` -* `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` -* `^0.2` is equivalent to `>=0.2.0 <0.3.0` -* `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` -* `^0.0` is equivalent to `>=0.0.0 <0.1.0` -* `^0` is equivalent to `>=0.0.0 <1.0.0` - -## Validation - -In addition to testing a version against a constraint, a version can be validated -against a constraint. When validation fails a slice of errors containing why a -version didn't meet the constraint is returned. For example, - -```go -c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") -if err != nil { - // Handle constraint not being parseable. -} - -v, err := semver.NewVersion("1.3") -if err != nil { - // Handle version not being parseable. -} - -// Validate a version against a constraint. -a, msgs := c.Validate(v) -// a is false -for _, m := range msgs { - fmt.Println(m) - - // Loops over the errors which would read - // "1.3 is greater than 1.2.3" - // "1.3 is less than 1.4" -} -``` - -## Contribute - -If you find an issue or want to contribute please file an [issue](https://github.com/Masterminds/semver/issues) -or [create a pull request](https://github.com/Masterminds/semver/pulls). - -## Security - -Security is an important consideration for this project. The project currently -uses the following tools to help discover security issues: - -* [CodeQL](https://github.com/Masterminds/semver) -* [gosec](https://github.com/securego/gosec) -* Daily Fuzz testing - -If you believe you have found a security vulnerability you can privately disclose -it through the [GitHub security page](https://github.com/Masterminds/semver/security). diff --git a/vendor/github.com/Masterminds/semver/v3/SECURITY.md b/vendor/github.com/Masterminds/semver/v3/SECURITY.md deleted file mode 100644 index a30a66b1f7..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/SECURITY.md +++ /dev/null @@ -1,19 +0,0 @@ -# Security Policy - -## Supported Versions - -The following versions of semver are currently supported: - -| Version | Supported | -| ------- | ------------------ | -| 3.x | :white_check_mark: | -| 2.x | :x: | -| 1.x | :x: | - -Fixes are only released for the latest minor version in the form of a patch release. - -## Reporting a Vulnerability - -You can privately disclose a vulnerability through GitHubs -[private vulnerability reporting](https://github.com/Masterminds/semver/security/advisories) -mechanism. diff --git a/vendor/github.com/Masterminds/semver/v3/collection.go b/vendor/github.com/Masterminds/semver/v3/collection.go deleted file mode 100644 index a78235895f..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/collection.go +++ /dev/null @@ -1,24 +0,0 @@ -package semver - -// Collection is a collection of Version instances and implements the sort -// interface. See the sort package for more details. -// https://golang.org/pkg/sort/ -type Collection []*Version - -// Len returns the length of a collection. The number of Version instances -// on the slice. -func (c Collection) Len() int { - return len(c) -} - -// Less is needed for the sort interface to compare two Version objects on the -// slice. If checks if one is less than the other. -func (c Collection) Less(i, j int) bool { - return c[i].LessThan(c[j]) -} - -// Swap is needed for the sort interface to replace the Version objects -// at two different positions in the slice. -func (c Collection) Swap(i, j int) { - c[i], c[j] = c[j], c[i] -} diff --git a/vendor/github.com/Masterminds/semver/v3/constraints.go b/vendor/github.com/Masterminds/semver/v3/constraints.go deleted file mode 100644 index 8461c7ed90..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/constraints.go +++ /dev/null @@ -1,594 +0,0 @@ -package semver - -import ( - "bytes" - "errors" - "fmt" - "regexp" - "strings" -) - -// Constraints is one or more constraint that a semantic version can be -// checked against. -type Constraints struct { - constraints [][]*constraint -} - -// NewConstraint returns a Constraints instance that a Version instance can -// be checked against. If there is a parse error it will be returned. -func NewConstraint(c string) (*Constraints, error) { - - // Rewrite - ranges into a comparison operation. - c = rewriteRange(c) - - ors := strings.Split(c, "||") - or := make([][]*constraint, len(ors)) - for k, v := range ors { - - // TODO: Find a way to validate and fetch all the constraints in a simpler form - - // Validate the segment - if !validConstraintRegex.MatchString(v) { - return nil, fmt.Errorf("improper constraint: %s", v) - } - - cs := findConstraintRegex.FindAllString(v, -1) - if cs == nil { - cs = append(cs, v) - } - result := make([]*constraint, len(cs)) - for i, s := range cs { - pc, err := parseConstraint(s) - if err != nil { - return nil, err - } - - result[i] = pc - } - or[k] = result - } - - o := &Constraints{constraints: or} - return o, nil -} - -// Check tests if a version satisfies the constraints. -func (cs Constraints) Check(v *Version) bool { - // TODO(mattfarina): For v4 of this library consolidate the Check and Validate - // functions as the underlying functions make that possible now. - // loop over the ORs and check the inner ANDs - for _, o := range cs.constraints { - joy := true - for _, c := range o { - if check, _ := c.check(v); !check { - joy = false - break - } - } - - if joy { - return true - } - } - - return false -} - -// Validate checks if a version satisfies a constraint. If not a slice of -// reasons for the failure are returned in addition to a bool. -func (cs Constraints) Validate(v *Version) (bool, []error) { - // loop over the ORs and check the inner ANDs - var e []error - - // Capture the prerelease message only once. When it happens the first time - // this var is marked - var prerelesase bool - for _, o := range cs.constraints { - joy := true - for _, c := range o { - // Before running the check handle the case there the version is - // a prerelease and the check is not searching for prereleases. - if c.con.pre == "" && v.pre != "" { - if !prerelesase { - em := fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - e = append(e, em) - prerelesase = true - } - joy = false - - } else { - - if _, err := c.check(v); err != nil { - e = append(e, err) - joy = false - } - } - } - - if joy { - return true, []error{} - } - } - - return false, e -} - -func (cs Constraints) String() string { - buf := make([]string, len(cs.constraints)) - var tmp bytes.Buffer - - for k, v := range cs.constraints { - tmp.Reset() - vlen := len(v) - for kk, c := range v { - tmp.WriteString(c.string()) - - // Space separate the AND conditions - if vlen > 1 && kk < vlen-1 { - tmp.WriteString(" ") - } - } - buf[k] = tmp.String() - } - - return strings.Join(buf, " || ") -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (cs *Constraints) UnmarshalText(text []byte) error { - temp, err := NewConstraint(string(text)) - if err != nil { - return err - } - - *cs = *temp - - return nil -} - -// MarshalText implements the encoding.TextMarshaler interface. -func (cs Constraints) MarshalText() ([]byte, error) { - return []byte(cs.String()), nil -} - -var constraintOps map[string]cfunc -var constraintRegex *regexp.Regexp -var constraintRangeRegex *regexp.Regexp - -// Used to find individual constraints within a multi-constraint string -var findConstraintRegex *regexp.Regexp - -// Used to validate an segment of ANDs is valid -var validConstraintRegex *regexp.Regexp - -const cvRegex string = `v?([0-9|x|X|\*]+)(\.[0-9|x|X|\*]+)?(\.[0-9|x|X|\*]+)?` + - `(-([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` + - `(\+([0-9A-Za-z\-]+(\.[0-9A-Za-z\-]+)*))?` - -func init() { - constraintOps = map[string]cfunc{ - "": constraintTildeOrEqual, - "=": constraintTildeOrEqual, - "!=": constraintNotEqual, - ">": constraintGreaterThan, - "<": constraintLessThan, - ">=": constraintGreaterThanEqual, - "=>": constraintGreaterThanEqual, - "<=": constraintLessThanEqual, - "=<": constraintLessThanEqual, - "~": constraintTilde, - "~>": constraintTilde, - "^": constraintCaret, - } - - ops := `=||!=|>|<|>=|=>|<=|=<|~|~>|\^` - - constraintRegex = regexp.MustCompile(fmt.Sprintf( - `^\s*(%s)\s*(%s)\s*$`, - ops, - cvRegex)) - - constraintRangeRegex = regexp.MustCompile(fmt.Sprintf( - `\s*(%s)\s+-\s+(%s)\s*`, - cvRegex, cvRegex)) - - findConstraintRegex = regexp.MustCompile(fmt.Sprintf( - `(%s)\s*(%s)`, - ops, - cvRegex)) - - // The first time a constraint shows up will look slightly different from - // future times it shows up due to a leading space or comma in a given - // string. - validConstraintRegex = regexp.MustCompile(fmt.Sprintf( - `^(\s*(%s)\s*(%s)\s*)((?:\s+|,\s*)(%s)\s*(%s)\s*)*$`, - ops, - cvRegex, - ops, - cvRegex)) -} - -// An individual constraint -type constraint struct { - // The version used in the constraint check. For example, if a constraint - // is '<= 2.0.0' the con a version instance representing 2.0.0. - con *Version - - // The original parsed version (e.g., 4.x from != 4.x) - orig string - - // The original operator for the constraint - origfunc string - - // When an x is used as part of the version (e.g., 1.x) - minorDirty bool - dirty bool - patchDirty bool -} - -// Check if a version meets the constraint -func (c *constraint) check(v *Version) (bool, error) { - return constraintOps[c.origfunc](v, c) -} - -// String prints an individual constraint into a string -func (c *constraint) string() string { - return c.origfunc + c.orig -} - -type cfunc func(v *Version, c *constraint) (bool, error) - -func parseConstraint(c string) (*constraint, error) { - if len(c) > 0 { - m := constraintRegex.FindStringSubmatch(c) - if m == nil { - return nil, fmt.Errorf("improper constraint: %s", c) - } - - cs := &constraint{ - orig: m[2], - origfunc: m[1], - } - - ver := m[2] - minorDirty := false - patchDirty := false - dirty := false - if isX(m[3]) || m[3] == "" { - ver = fmt.Sprintf("0.0.0%s", m[6]) - dirty = true - } else if isX(strings.TrimPrefix(m[4], ".")) || m[4] == "" { - minorDirty = true - dirty = true - ver = fmt.Sprintf("%s.0.0%s", m[3], m[6]) - } else if isX(strings.TrimPrefix(m[5], ".")) || m[5] == "" { - dirty = true - patchDirty = true - ver = fmt.Sprintf("%s%s.0%s", m[3], m[4], m[6]) - } - - con, err := NewVersion(ver) - if err != nil { - - // The constraintRegex should catch any regex parsing errors. So, - // we should never get here. - return nil, errors.New("constraint Parser Error") - } - - cs.con = con - cs.minorDirty = minorDirty - cs.patchDirty = patchDirty - cs.dirty = dirty - - return cs, nil - } - - // The rest is the special case where an empty string was passed in which - // is equivalent to * or >=0.0.0 - con, err := StrictNewVersion("0.0.0") - if err != nil { - - // The constraintRegex should catch any regex parsing errors. So, - // we should never get here. - return nil, errors.New("constraint Parser Error") - } - - cs := &constraint{ - con: con, - orig: c, - origfunc: "", - minorDirty: false, - patchDirty: false, - dirty: true, - } - return cs, nil -} - -// Constraint functions -func constraintNotEqual(v *Version, c *constraint) (bool, error) { - if c.dirty { - - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - if c.con.Major() != v.Major() { - return true, nil - } - if c.con.Minor() != v.Minor() && !c.minorDirty { - return true, nil - } else if c.minorDirty { - return false, fmt.Errorf("%s is equal to %s", v, c.orig) - } else if c.con.Patch() != v.Patch() && !c.patchDirty { - return true, nil - } else if c.patchDirty { - // Need to handle prereleases if present - if v.Prerelease() != "" || c.con.Prerelease() != "" { - eq := comparePrerelease(v.Prerelease(), c.con.Prerelease()) != 0 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is equal to %s", v, c.orig) - } - return false, fmt.Errorf("%s is equal to %s", v, c.orig) - } - } - - eq := v.Equal(c.con) - if eq { - return false, fmt.Errorf("%s is equal to %s", v, c.orig) - } - - return true, nil -} - -func constraintGreaterThan(v *Version, c *constraint) (bool, error) { - - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - var eq bool - - if !c.dirty { - eq = v.Compare(c.con) == 1 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) - } - - if v.Major() > c.con.Major() { - return true, nil - } else if v.Major() < c.con.Major() { - return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) - } else if c.minorDirty { - // This is a range case such as >11. When the version is something like - // 11.1.0 is it not > 11. For that we would need 12 or higher - return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) - } else if c.patchDirty { - // This is for ranges such as >11.1. A version of 11.1.1 is not greater - // which one of 11.2.1 is greater - eq = v.Minor() > c.con.Minor() - if eq { - return true, nil - } - return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) - } - - // If we have gotten here we are not comparing pre-preleases and can use the - // Compare function to accomplish that. - eq = v.Compare(c.con) == 1 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is less than or equal to %s", v, c.orig) -} - -func constraintLessThan(v *Version, c *constraint) (bool, error) { - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - eq := v.Compare(c.con) < 0 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is greater than or equal to %s", v, c.orig) -} - -func constraintGreaterThanEqual(v *Version, c *constraint) (bool, error) { - - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - eq := v.Compare(c.con) >= 0 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is less than %s", v, c.orig) -} - -func constraintLessThanEqual(v *Version, c *constraint) (bool, error) { - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - var eq bool - - if !c.dirty { - eq = v.Compare(c.con) <= 0 - if eq { - return true, nil - } - return false, fmt.Errorf("%s is greater than %s", v, c.orig) - } - - if v.Major() > c.con.Major() { - return false, fmt.Errorf("%s is greater than %s", v, c.orig) - } else if v.Major() == c.con.Major() && v.Minor() > c.con.Minor() && !c.minorDirty { - return false, fmt.Errorf("%s is greater than %s", v, c.orig) - } - - return true, nil -} - -// ~*, ~>* --> >= 0.0.0 (any) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0, <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0, <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0, <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3, <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0, <1.3.0 -func constraintTilde(v *Version, c *constraint) (bool, error) { - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - if v.LessThan(c.con) { - return false, fmt.Errorf("%s is less than %s", v, c.orig) - } - - // ~0.0.0 is a special case where all constraints are accepted. It's - // equivalent to >= 0.0.0. - if c.con.Major() == 0 && c.con.Minor() == 0 && c.con.Patch() == 0 && - !c.minorDirty && !c.patchDirty { - return true, nil - } - - if v.Major() != c.con.Major() { - return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) - } - - if v.Minor() != c.con.Minor() && !c.minorDirty { - return false, fmt.Errorf("%s does not have same major and minor version as %s", v, c.orig) - } - - return true, nil -} - -// When there is a .x (dirty) status it automatically opts in to ~. Otherwise -// it's a straight = -func constraintTildeOrEqual(v *Version, c *constraint) (bool, error) { - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - if c.dirty { - return constraintTilde(v, c) - } - - eq := v.Equal(c.con) - if eq { - return true, nil - } - - return false, fmt.Errorf("%s is not equal to %s", v, c.orig) -} - -// ^* --> (any) -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2 --> >=1.2.0 <2.0.0 -// ^1 --> >=1.0.0 <2.0.0 -// ^0.2.3 --> >=0.2.3 <0.3.0 -// ^0.2 --> >=0.2.0 <0.3.0 -// ^0.0.3 --> >=0.0.3 <0.0.4 -// ^0.0 --> >=0.0.0 <0.1.0 -// ^0 --> >=0.0.0 <1.0.0 -func constraintCaret(v *Version, c *constraint) (bool, error) { - // If there is a pre-release on the version but the constraint isn't looking - // for them assume that pre-releases are not compatible. See issue 21 for - // more details. - if v.Prerelease() != "" && c.con.Prerelease() == "" { - return false, fmt.Errorf("%s is a prerelease version and the constraint is only looking for release versions", v) - } - - // This less than handles prereleases - if v.LessThan(c.con) { - return false, fmt.Errorf("%s is less than %s", v, c.orig) - } - - var eq bool - - // ^ when the major > 0 is >=x.y.z < x+1 - if c.con.Major() > 0 || c.minorDirty { - - // ^ has to be within a major range for > 0. Everything less than was - // filtered out with the LessThan call above. This filters out those - // that greater but not within the same major range. - eq = v.Major() == c.con.Major() - if eq { - return true, nil - } - return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) - } - - // ^ when the major is 0 and minor > 0 is >=0.y.z < 0.y+1 - if c.con.Major() == 0 && v.Major() > 0 { - return false, fmt.Errorf("%s does not have same major version as %s", v, c.orig) - } - // If the con Minor is > 0 it is not dirty - if c.con.Minor() > 0 || c.patchDirty { - eq = v.Minor() == c.con.Minor() - if eq { - return true, nil - } - return false, fmt.Errorf("%s does not have same minor version as %s. Expected minor versions to match when constraint major version is 0", v, c.orig) - } - // ^ when the minor is 0 and minor > 0 is =0.0.z - if c.con.Minor() == 0 && v.Minor() > 0 { - return false, fmt.Errorf("%s does not have same minor version as %s", v, c.orig) - } - - // At this point the major is 0 and the minor is 0 and not dirty. The patch - // is not dirty so we need to check if they are equal. If they are not equal - eq = c.con.Patch() == v.Patch() - if eq { - return true, nil - } - return false, fmt.Errorf("%s does not equal %s. Expect version and constraint to equal when major and minor versions are 0", v, c.orig) -} - -func isX(x string) bool { - switch x { - case "x", "*", "X": - return true - default: - return false - } -} - -func rewriteRange(i string) string { - m := constraintRangeRegex.FindAllStringSubmatch(i, -1) - if m == nil { - return i - } - o := i - for _, v := range m { - t := fmt.Sprintf(">= %s, <= %s ", v[1], v[11]) - o = strings.Replace(o, v[0], t, 1) - } - - return o -} diff --git a/vendor/github.com/Masterminds/semver/v3/doc.go b/vendor/github.com/Masterminds/semver/v3/doc.go deleted file mode 100644 index 74f97caa57..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/doc.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Package semver provides the ability to work with Semantic Versions (http://semver.org) in Go. - -Specifically it provides the ability to: - - - Parse semantic versions - - Sort semantic versions - - Check if a semantic version fits within a set of constraints - - Optionally work with a `v` prefix - -# Parsing Semantic Versions - -There are two functions that can parse semantic versions. The `StrictNewVersion` -function only parses valid version 2 semantic versions as outlined in the -specification. The `NewVersion` function attempts to coerce a version into a -semantic version and parse it. For example, if there is a leading v or a version -listed without all 3 parts (e.g. 1.2) it will attempt to coerce it into a valid -semantic version (e.g., 1.2.0). In both cases a `Version` object is returned -that can be sorted, compared, and used in constraints. - -When parsing a version an optional error can be returned if there is an issue -parsing the version. For example, - - v, err := semver.NewVersion("1.2.3-beta.1+b345") - -The version object has methods to get the parts of the version, compare it to -other versions, convert the version back into a string, and get the original -string. For more details please see the documentation -at https://godoc.org/github.com/Masterminds/semver. - -# Sorting Semantic Versions - -A set of versions can be sorted using the `sort` package from the standard library. -For example, - - raw := []string{"1.2.3", "1.0", "1.3", "2", "0.4.2",} - vs := make([]*semver.Version, len(raw)) - for i, r := range raw { - v, err := semver.NewVersion(r) - if err != nil { - t.Errorf("Error parsing version: %s", err) - } - - vs[i] = v - } - - sort.Sort(semver.Collection(vs)) - -# Checking Version Constraints and Comparing Versions - -There are two methods for comparing versions. One uses comparison methods on -`Version` instances and the other is using Constraints. There are some important -differences to notes between these two methods of comparison. - - 1. When two versions are compared using functions such as `Compare`, `LessThan`, - and others it will follow the specification and always include prereleases - within the comparison. It will provide an answer valid with the comparison - spec section at https://semver.org/#spec-item-11 - 2. When constraint checking is used for checks or validation it will follow a - different set of rules that are common for ranges with tools like npm/js - and Rust/Cargo. This includes considering prereleases to be invalid if the - ranges does not include on. If you want to have it include pre-releases a - simple solution is to include `-0` in your range. - 3. Constraint ranges can have some complex rules including the shorthard use of - ~ and ^. For more details on those see the options below. - -There are differences between the two methods or checking versions because the -comparison methods on `Version` follow the specification while comparison ranges -are not part of the specification. Different packages and tools have taken it -upon themselves to come up with range rules. This has resulted in differences. -For example, npm/js and Cargo/Rust follow similar patterns which PHP has a -different pattern for ^. The comparison features in this package follow the -npm/js and Cargo/Rust lead because applications using it have followed similar -patters with their versions. - -Checking a version against version constraints is one of the most featureful -parts of the package. - - c, err := semver.NewConstraint(">= 1.2.3") - if err != nil { - // Handle constraint not being parsable. - } - - v, err := semver.NewVersion("1.3") - if err != nil { - // Handle version not being parsable. - } - // Check if the version meets the constraints. The a variable will be true. - a := c.Check(v) - -# Basic Comparisons - -There are two elements to the comparisons. First, a comparison string is a list -of comma or space separated AND comparisons. These are then separated by || (OR) -comparisons. For example, `">= 1.2 < 3.0.0 || >= 4.2.3"` is looking for a -comparison that's greater than or equal to 1.2 and less than 3.0.0 or is -greater than or equal to 4.2.3. This can also be written as -`">= 1.2, < 3.0.0 || >= 4.2.3"` - -The basic comparisons are: - - - `=`: equal (aliased to no operator) - - `!=`: not equal - - `>`: greater than - - `<`: less than - - `>=`: greater than or equal to - - `<=`: less than or equal to - -# Hyphen Range Comparisons - -There are multiple methods to handle ranges and the first is hyphens ranges. -These look like: - - - `1.2 - 1.4.5` which is equivalent to `>= 1.2, <= 1.4.5` - - `2.3.4 - 4.5` which is equivalent to `>= 2.3.4 <= 4.5` - -# Wildcards In Comparisons - -The `x`, `X`, and `*` characters can be used as a wildcard character. This works -for all comparison operators. When used on the `=` operator it falls -back to the tilde operation. For example, - - - `1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` - - `>= 1.2.x` is equivalent to `>= 1.2.0` - - `<= 2.x` is equivalent to `<= 3` - - `*` is equivalent to `>= 0.0.0` - -Tilde Range Comparisons (Patch) - -The tilde (`~`) comparison operator is for patch level ranges when a minor -version is specified and major level changes when the minor number is missing. -For example, - - - `~1.2.3` is equivalent to `>= 1.2.3 < 1.3.0` - - `~1` is equivalent to `>= 1, < 2` - - `~2.3` is equivalent to `>= 2.3 < 2.4` - - `~1.2.x` is equivalent to `>= 1.2.0 < 1.3.0` - - `~1.x` is equivalent to `>= 1 < 2` - -Caret Range Comparisons (Major) - -The caret (`^`) comparison operator is for major level changes once a stable -(1.0.0) release has occurred. Prior to a 1.0.0 release the minor versions acts -as the API stability level. This is useful when comparisons of API versions as a -major change is API breaking. For example, - - - `^1.2.3` is equivalent to `>= 1.2.3, < 2.0.0` - - `^1.2.x` is equivalent to `>= 1.2.0, < 2.0.0` - - `^2.3` is equivalent to `>= 2.3, < 3` - - `^2.x` is equivalent to `>= 2.0.0, < 3` - - `^0.2.3` is equivalent to `>=0.2.3 <0.3.0` - - `^0.2` is equivalent to `>=0.2.0 <0.3.0` - - `^0.0.3` is equivalent to `>=0.0.3 <0.0.4` - - `^0.0` is equivalent to `>=0.0.0 <0.1.0` - - `^0` is equivalent to `>=0.0.0 <1.0.0` - -# Validation - -In addition to testing a version against a constraint, a version can be validated -against a constraint. When validation fails a slice of errors containing why a -version didn't meet the constraint is returned. For example, - - c, err := semver.NewConstraint("<= 1.2.3, >= 1.4") - if err != nil { - // Handle constraint not being parseable. - } - - v, _ := semver.NewVersion("1.3") - if err != nil { - // Handle version not being parseable. - } - - // Validate a version against a constraint. - a, msgs := c.Validate(v) - // a is false - for _, m := range msgs { - fmt.Println(m) - - // Loops over the errors which would read - // "1.3 is greater than 1.2.3" - // "1.3 is less than 1.4" - } -*/ -package semver diff --git a/vendor/github.com/Masterminds/semver/v3/version.go b/vendor/github.com/Masterminds/semver/v3/version.go deleted file mode 100644 index 304edc3422..0000000000 --- a/vendor/github.com/Masterminds/semver/v3/version.go +++ /dev/null @@ -1,645 +0,0 @@ -package semver - -import ( - "bytes" - "database/sql/driver" - "encoding/json" - "errors" - "fmt" - "regexp" - "strconv" - "strings" -) - -// The compiled version of the regex created at init() is cached here so it -// only needs to be created once. -var versionRegex *regexp.Regexp - -var ( - // ErrInvalidSemVer is returned a version is found to be invalid when - // being parsed. - ErrInvalidSemVer = errors.New("Invalid Semantic Version") - - // ErrEmptyString is returned when an empty string is passed in for parsing. - ErrEmptyString = errors.New("Version string empty") - - // ErrInvalidCharacters is returned when invalid characters are found as - // part of a version - ErrInvalidCharacters = errors.New("Invalid characters in version") - - // ErrSegmentStartsZero is returned when a version segment starts with 0. - // This is invalid in SemVer. - ErrSegmentStartsZero = errors.New("Version segment starts with 0") - - // ErrInvalidMetadata is returned when the metadata is an invalid format - ErrInvalidMetadata = errors.New("Invalid Metadata string") - - // ErrInvalidPrerelease is returned when the pre-release is an invalid format - ErrInvalidPrerelease = errors.New("Invalid Prerelease string") -) - -// semVerRegex is the regular expression used to parse a semantic version. -// This is not the official regex from the semver spec. It has been modified to allow for loose handling -// where versions like 2.1 are detected. -const semVerRegex string = `v?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?` + - `(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?` + - `(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?` - -// Version represents a single semantic version. -type Version struct { - major, minor, patch uint64 - pre string - metadata string - original string -} - -func init() { - versionRegex = regexp.MustCompile("^" + semVerRegex + "$") -} - -const ( - num string = "0123456789" - allowed string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" + num -) - -// StrictNewVersion parses a given version and returns an instance of Version or -// an error if unable to parse the version. Only parses valid semantic versions. -// Performs checking that can find errors within the version. -// If you want to coerce a version such as 1 or 1.2 and parse it as the 1.x -// releases of semver did, use the NewVersion() function. -func StrictNewVersion(v string) (*Version, error) { - // Parsing here does not use RegEx in order to increase performance and reduce - // allocations. - - if len(v) == 0 { - return nil, ErrEmptyString - } - - // Split the parts into [0]major, [1]minor, and [2]patch,prerelease,build - parts := strings.SplitN(v, ".", 3) - if len(parts) != 3 { - return nil, ErrInvalidSemVer - } - - sv := &Version{ - original: v, - } - - // Extract build metadata - if strings.Contains(parts[2], "+") { - extra := strings.SplitN(parts[2], "+", 2) - sv.metadata = extra[1] - parts[2] = extra[0] - if err := validateMetadata(sv.metadata); err != nil { - return nil, err - } - } - - // Extract build prerelease - if strings.Contains(parts[2], "-") { - extra := strings.SplitN(parts[2], "-", 2) - sv.pre = extra[1] - parts[2] = extra[0] - if err := validatePrerelease(sv.pre); err != nil { - return nil, err - } - } - - // Validate the number segments are valid. This includes only having positive - // numbers and no leading 0's. - for _, p := range parts { - if !containsOnly(p, num) { - return nil, ErrInvalidCharacters - } - - if len(p) > 1 && p[0] == '0' { - return nil, ErrSegmentStartsZero - } - } - - // Extract major, minor, and patch - var err error - sv.major, err = strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return nil, err - } - - sv.minor, err = strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return nil, err - } - - sv.patch, err = strconv.ParseUint(parts[2], 10, 64) - if err != nil { - return nil, err - } - - return sv, nil -} - -// NewVersion parses a given version and returns an instance of Version or -// an error if unable to parse the version. If the version is SemVer-ish it -// attempts to convert it to SemVer. If you want to validate it was a strict -// semantic version at parse time see StrictNewVersion(). -func NewVersion(v string) (*Version, error) { - m := versionRegex.FindStringSubmatch(v) - if m == nil { - return nil, ErrInvalidSemVer - } - - sv := &Version{ - metadata: m[5], - pre: m[4], - original: v, - } - - var err error - sv.major, err = strconv.ParseUint(m[1], 10, 64) - if err != nil { - return nil, fmt.Errorf("Error parsing version segment: %s", err) - } - - if m[2] != "" { - sv.minor, err = strconv.ParseUint(m[2], 10, 64) - if err != nil { - return nil, fmt.Errorf("Error parsing version segment: %s", err) - } - } else { - sv.minor = 0 - } - - if m[3] != "" { - sv.patch, err = strconv.ParseUint(m[3], 10, 64) - if err != nil { - return nil, fmt.Errorf("Error parsing version segment: %s", err) - } - } else { - sv.patch = 0 - } - - // Perform some basic due diligence on the extra parts to ensure they are - // valid. - - if sv.pre != "" { - if err = validatePrerelease(sv.pre); err != nil { - return nil, err - } - } - - if sv.metadata != "" { - if err = validateMetadata(sv.metadata); err != nil { - return nil, err - } - } - - return sv, nil -} - -// New creates a new instance of Version with each of the parts passed in as -// arguments instead of parsing a version string. -func New(major, minor, patch uint64, pre, metadata string) *Version { - v := Version{ - major: major, - minor: minor, - patch: patch, - pre: pre, - metadata: metadata, - original: "", - } - - v.original = v.String() - - return &v -} - -// MustParse parses a given version and panics on error. -func MustParse(v string) *Version { - sv, err := NewVersion(v) - if err != nil { - panic(err) - } - return sv -} - -// String converts a Version object to a string. -// Note, if the original version contained a leading v this version will not. -// See the Original() method to retrieve the original value. Semantic Versions -// don't contain a leading v per the spec. Instead it's optional on -// implementation. -func (v Version) String() string { - var buf bytes.Buffer - - fmt.Fprintf(&buf, "%d.%d.%d", v.major, v.minor, v.patch) - if v.pre != "" { - fmt.Fprintf(&buf, "-%s", v.pre) - } - if v.metadata != "" { - fmt.Fprintf(&buf, "+%s", v.metadata) - } - - return buf.String() -} - -// Original returns the original value passed in to be parsed. -func (v *Version) Original() string { - return v.original -} - -// Major returns the major version. -func (v Version) Major() uint64 { - return v.major -} - -// Minor returns the minor version. -func (v Version) Minor() uint64 { - return v.minor -} - -// Patch returns the patch version. -func (v Version) Patch() uint64 { - return v.patch -} - -// Prerelease returns the pre-release version. -func (v Version) Prerelease() string { - return v.pre -} - -// Metadata returns the metadata on the version. -func (v Version) Metadata() string { - return v.metadata -} - -// originalVPrefix returns the original 'v' prefix if any. -func (v Version) originalVPrefix() string { - // Note, only lowercase v is supported as a prefix by the parser. - if v.original != "" && v.original[:1] == "v" { - return v.original[:1] - } - return "" -} - -// IncPatch produces the next patch version. -// If the current version does not have prerelease/metadata information, -// it unsets metadata and prerelease values, increments patch number. -// If the current version has any of prerelease or metadata information, -// it unsets both values and keeps current patch value -func (v Version) IncPatch() Version { - vNext := v - // according to http://semver.org/#spec-item-9 - // Pre-release versions have a lower precedence than the associated normal version. - // according to http://semver.org/#spec-item-10 - // Build metadata SHOULD be ignored when determining version precedence. - if v.pre != "" { - vNext.metadata = "" - vNext.pre = "" - } else { - vNext.metadata = "" - vNext.pre = "" - vNext.patch = v.patch + 1 - } - vNext.original = v.originalVPrefix() + "" + vNext.String() - return vNext -} - -// IncMinor produces the next minor version. -// Sets patch to 0. -// Increments minor number. -// Unsets metadata. -// Unsets prerelease status. -func (v Version) IncMinor() Version { - vNext := v - vNext.metadata = "" - vNext.pre = "" - vNext.patch = 0 - vNext.minor = v.minor + 1 - vNext.original = v.originalVPrefix() + "" + vNext.String() - return vNext -} - -// IncMajor produces the next major version. -// Sets patch to 0. -// Sets minor to 0. -// Increments major number. -// Unsets metadata. -// Unsets prerelease status. -func (v Version) IncMajor() Version { - vNext := v - vNext.metadata = "" - vNext.pre = "" - vNext.patch = 0 - vNext.minor = 0 - vNext.major = v.major + 1 - vNext.original = v.originalVPrefix() + "" + vNext.String() - return vNext -} - -// SetPrerelease defines the prerelease value. -// Value must not include the required 'hyphen' prefix. -func (v Version) SetPrerelease(prerelease string) (Version, error) { - vNext := v - if len(prerelease) > 0 { - if err := validatePrerelease(prerelease); err != nil { - return vNext, err - } - } - vNext.pre = prerelease - vNext.original = v.originalVPrefix() + "" + vNext.String() - return vNext, nil -} - -// SetMetadata defines metadata value. -// Value must not include the required 'plus' prefix. -func (v Version) SetMetadata(metadata string) (Version, error) { - vNext := v - if len(metadata) > 0 { - if err := validateMetadata(metadata); err != nil { - return vNext, err - } - } - vNext.metadata = metadata - vNext.original = v.originalVPrefix() + "" + vNext.String() - return vNext, nil -} - -// LessThan tests if one version is less than another one. -func (v *Version) LessThan(o *Version) bool { - return v.Compare(o) < 0 -} - -// LessThanEqual tests if one version is less or equal than another one. -func (v *Version) LessThanEqual(o *Version) bool { - return v.Compare(o) <= 0 -} - -// GreaterThan tests if one version is greater than another one. -func (v *Version) GreaterThan(o *Version) bool { - return v.Compare(o) > 0 -} - -// GreaterThanEqual tests if one version is greater or equal than another one. -func (v *Version) GreaterThanEqual(o *Version) bool { - return v.Compare(o) >= 0 -} - -// Equal tests if two versions are equal to each other. -// Note, versions can be equal with different metadata since metadata -// is not considered part of the comparable version. -func (v *Version) Equal(o *Version) bool { - if v == o { - return true - } - if v == nil || o == nil { - return false - } - return v.Compare(o) == 0 -} - -// Compare compares this version to another one. It returns -1, 0, or 1 if -// the version smaller, equal, or larger than the other version. -// -// Versions are compared by X.Y.Z. Build metadata is ignored. Prerelease is -// lower than the version without a prerelease. Compare always takes into account -// prereleases. If you want to work with ranges using typical range syntaxes that -// skip prereleases if the range is not looking for them use constraints. -func (v *Version) Compare(o *Version) int { - // Compare the major, minor, and patch version for differences. If a - // difference is found return the comparison. - if d := compareSegment(v.Major(), o.Major()); d != 0 { - return d - } - if d := compareSegment(v.Minor(), o.Minor()); d != 0 { - return d - } - if d := compareSegment(v.Patch(), o.Patch()); d != 0 { - return d - } - - // At this point the major, minor, and patch versions are the same. - ps := v.pre - po := o.Prerelease() - - if ps == "" && po == "" { - return 0 - } - if ps == "" { - return 1 - } - if po == "" { - return -1 - } - - return comparePrerelease(ps, po) -} - -// UnmarshalJSON implements JSON.Unmarshaler interface. -func (v *Version) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - temp, err := NewVersion(s) - if err != nil { - return err - } - v.major = temp.major - v.minor = temp.minor - v.patch = temp.patch - v.pre = temp.pre - v.metadata = temp.metadata - v.original = temp.original - return nil -} - -// MarshalJSON implements JSON.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (v *Version) UnmarshalText(text []byte) error { - temp, err := NewVersion(string(text)) - if err != nil { - return err - } - - *v = *temp - - return nil -} - -// MarshalText implements the encoding.TextMarshaler interface. -func (v Version) MarshalText() ([]byte, error) { - return []byte(v.String()), nil -} - -// Scan implements the SQL.Scanner interface. -func (v *Version) Scan(value interface{}) error { - var s string - s, _ = value.(string) - temp, err := NewVersion(s) - if err != nil { - return err - } - v.major = temp.major - v.minor = temp.minor - v.patch = temp.patch - v.pre = temp.pre - v.metadata = temp.metadata - v.original = temp.original - return nil -} - -// Value implements the Driver.Valuer interface. -func (v Version) Value() (driver.Value, error) { - return v.String(), nil -} - -func compareSegment(v, o uint64) int { - if v < o { - return -1 - } - if v > o { - return 1 - } - - return 0 -} - -func comparePrerelease(v, o string) int { - // split the prelease versions by their part. The separator, per the spec, - // is a . - sparts := strings.Split(v, ".") - oparts := strings.Split(o, ".") - - // Find the longer length of the parts to know how many loop iterations to - // go through. - slen := len(sparts) - olen := len(oparts) - - l := slen - if olen > slen { - l = olen - } - - // Iterate over each part of the prereleases to compare the differences. - for i := 0; i < l; i++ { - // Since the lentgh of the parts can be different we need to create - // a placeholder. This is to avoid out of bounds issues. - stemp := "" - if i < slen { - stemp = sparts[i] - } - - otemp := "" - if i < olen { - otemp = oparts[i] - } - - d := comparePrePart(stemp, otemp) - if d != 0 { - return d - } - } - - // Reaching here means two versions are of equal value but have different - // metadata (the part following a +). They are not identical in string form - // but the version comparison finds them to be equal. - return 0 -} - -func comparePrePart(s, o string) int { - // Fastpath if they are equal - if s == o { - return 0 - } - - // When s or o are empty we can use the other in an attempt to determine - // the response. - if s == "" { - if o != "" { - return -1 - } - return 1 - } - - if o == "" { - if s != "" { - return 1 - } - return -1 - } - - // When comparing strings "99" is greater than "103". To handle - // cases like this we need to detect numbers and compare them. According - // to the semver spec, numbers are always positive. If there is a - at the - // start like -99 this is to be evaluated as an alphanum. numbers always - // have precedence over alphanum. Parsing as Uints because negative numbers - // are ignored. - - oi, n1 := strconv.ParseUint(o, 10, 64) - si, n2 := strconv.ParseUint(s, 10, 64) - - // The case where both are strings compare the strings - if n1 != nil && n2 != nil { - if s > o { - return 1 - } - return -1 - } else if n1 != nil { - // o is a string and s is a number - return -1 - } else if n2 != nil { - // s is a string and o is a number - return 1 - } - // Both are numbers - if si > oi { - return 1 - } - return -1 -} - -// Like strings.ContainsAny but does an only instead of any. -func containsOnly(s string, comp string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(comp, r) - }) == -1 -} - -// From the spec, "Identifiers MUST comprise only -// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. -// Numeric identifiers MUST NOT include leading zeroes.". These segments can -// be dot separated. -func validatePrerelease(p string) error { - eparts := strings.Split(p, ".") - for _, p := range eparts { - if p == "" { - return ErrInvalidMetadata - } else if containsOnly(p, num) { - if len(p) > 1 && p[0] == '0' { - return ErrSegmentStartsZero - } - } else if !containsOnly(p, allowed) { - return ErrInvalidPrerelease - } - } - - return nil -} - -// From the spec, "Build metadata MAY be denoted by -// appending a plus sign and a series of dot separated identifiers immediately -// following the patch or pre-release version. Identifiers MUST comprise only -// ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty." -func validateMetadata(m string) error { - eparts := strings.Split(m, ".") - for _, p := range eparts { - if p == "" { - return ErrInvalidMetadata - } else if !containsOnly(p, allowed) { - return ErrInvalidMetadata - } - } - return nil -} diff --git a/vendor/github.com/Microsoft/go-winio/.gitattributes b/vendor/github.com/Microsoft/go-winio/.gitattributes deleted file mode 100644 index 94f480de94..0000000000 --- a/vendor/github.com/Microsoft/go-winio/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text=auto eol=lf \ No newline at end of file diff --git a/vendor/github.com/Microsoft/go-winio/.gitignore b/vendor/github.com/Microsoft/go-winio/.gitignore deleted file mode 100644 index 815e20660e..0000000000 --- a/vendor/github.com/Microsoft/go-winio/.gitignore +++ /dev/null @@ -1,10 +0,0 @@ -.vscode/ - -*.exe - -# testing -testdata - -# go workspaces -go.work -go.work.sum diff --git a/vendor/github.com/Microsoft/go-winio/.golangci.yml b/vendor/github.com/Microsoft/go-winio/.golangci.yml deleted file mode 100644 index faedfe937a..0000000000 --- a/vendor/github.com/Microsoft/go-winio/.golangci.yml +++ /dev/null @@ -1,147 +0,0 @@ -linters: - enable: - # style - - containedctx # struct contains a context - - dupl # duplicate code - - errname # erorrs are named correctly - - nolintlint # "//nolint" directives are properly explained - - revive # golint replacement - - unconvert # unnecessary conversions - - wastedassign - - # bugs, performance, unused, etc ... - - contextcheck # function uses a non-inherited context - - errorlint # errors not wrapped for 1.13 - - exhaustive # check exhaustiveness of enum switch statements - - gofmt # files are gofmt'ed - - gosec # security - - nilerr # returns nil even with non-nil error - - thelper # test helpers without t.Helper() - - unparam # unused function params - -issues: - exclude-dirs: - - pkg/etw/sample - - exclude-rules: - # err is very often shadowed in nested scopes - - linters: - - govet - text: '^shadow: declaration of "err" shadows declaration' - - # ignore long lines for skip autogen directives - - linters: - - revive - text: "^line-length-limit: " - source: "^//(go:generate|sys) " - - #TODO: remove after upgrading to go1.18 - # ignore comment spacing for nolint and sys directives - - linters: - - revive - text: "^comment-spacings: no space between comment delimiter and comment text" - source: "//(cspell:|nolint:|sys |todo)" - - # not on go 1.18 yet, so no any - - linters: - - revive - text: "^use-any: since GO 1.18 'interface{}' can be replaced by 'any'" - - # allow unjustified ignores of error checks in defer statements - - linters: - - nolintlint - text: "^directive `//nolint:errcheck` should provide explanation" - source: '^\s*defer ' - - # allow unjustified ignores of error lints for io.EOF - - linters: - - nolintlint - text: "^directive `//nolint:errorlint` should provide explanation" - source: '[=|!]= io.EOF' - - -linters-settings: - exhaustive: - default-signifies-exhaustive: true - govet: - enable-all: true - disable: - # struct order is often for Win32 compat - # also, ignore pointer bytes/GC issues for now until performance becomes an issue - - fieldalignment - nolintlint: - require-explanation: true - require-specific: true - revive: - # revive is more configurable than static check, so likely the preferred alternative to static-check - # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997) - enable-all-rules: - true - # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md - rules: - # rules with required arguments - - name: argument-limit - disabled: true - - name: banned-characters - disabled: true - - name: cognitive-complexity - disabled: true - - name: cyclomatic - disabled: true - - name: file-header - disabled: true - - name: function-length - disabled: true - - name: function-result-limit - disabled: true - - name: max-public-structs - disabled: true - # geneally annoying rules - - name: add-constant # complains about any and all strings and integers - disabled: true - - name: confusing-naming # we frequently use "Foo()" and "foo()" together - disabled: true - - name: flag-parameter # excessive, and a common idiom we use - disabled: true - - name: unhandled-error # warns over common fmt.Print* and io.Close; rely on errcheck instead - disabled: true - # general config - - name: line-length-limit - arguments: - - 140 - - name: var-naming - arguments: - - [] - - - CID - - CRI - - CTRD - - DACL - - DLL - - DOS - - ETW - - FSCTL - - GCS - - GMSA - - HCS - - HV - - IO - - LCOW - - LDAP - - LPAC - - LTSC - - MMIO - - NT - - OCI - - PMEM - - PWSH - - RX - - SACl - - SID - - SMB - - TX - - VHD - - VHDX - - VMID - - VPCI - - WCOW - - WIM diff --git a/vendor/github.com/Microsoft/go-winio/CODEOWNERS b/vendor/github.com/Microsoft/go-winio/CODEOWNERS deleted file mode 100644 index ae1b4942b9..0000000000 --- a/vendor/github.com/Microsoft/go-winio/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ - * @microsoft/containerplat diff --git a/vendor/github.com/Microsoft/go-winio/LICENSE b/vendor/github.com/Microsoft/go-winio/LICENSE deleted file mode 100644 index b8b569d774..0000000000 --- a/vendor/github.com/Microsoft/go-winio/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2015 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - diff --git a/vendor/github.com/Microsoft/go-winio/README.md b/vendor/github.com/Microsoft/go-winio/README.md deleted file mode 100644 index 7474b4f0b6..0000000000 --- a/vendor/github.com/Microsoft/go-winio/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# go-winio [![Build Status](https://github.com/microsoft/go-winio/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/go-winio/actions/workflows/ci.yml) - -This repository contains utilities for efficiently performing Win32 IO operations in -Go. Currently, this is focused on accessing named pipes and other file handles, and -for using named pipes as a net transport. - -This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go -to reuse the thread to schedule another goroutine. This limits support to Windows Vista and -newer operating systems. This is similar to the implementation of network sockets in Go's net -package. - -Please see the LICENSE file for licensing information. - -## Contributing - -This project welcomes contributions and suggestions. -Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that -you have the right to, and actually do, grant us the rights to use your contribution. -For details, visit [Microsoft CLA](https://cla.microsoft.com). - -When you submit a pull request, a CLA-bot will automatically determine whether you need to -provide a CLA and decorate the PR appropriately (e.g., label, comment). -Simply follow the instructions provided by the bot. -You will only need to do this once across all repos using our CLA. - -Additionally, the pull request pipeline requires the following steps to be performed before -mergining. - -### Code Sign-Off - -We require that contributors sign their commits using [`git commit --signoff`][git-commit-s] -to certify they either authored the work themselves or otherwise have permission to use it in this project. - -A range of commits can be signed off using [`git rebase --signoff`][git-rebase-s]. - -Please see [the developer certificate](https://developercertificate.org) for more info, -as well as to make sure that you can attest to the rules listed. -Our CI uses the DCO Github app to ensure that all commits in a given PR are signed-off. - -### Linting - -Code must pass a linting stage, which uses [`golangci-lint`][lint]. -The linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run -automatically with VSCode by adding the following to your workspace or folder settings: - -```json - "go.lintTool": "golangci-lint", - "go.lintOnSave": "package", -``` - -Additional editor [integrations options are also available][lint-ide]. - -Alternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root: - -```shell -# use . or specify a path to only lint a package -# to show all lint errors, use flags "--max-issues-per-linter=0 --max-same-issues=0" -> golangci-lint run ./... -``` - -### Go Generate - -The pipeline checks that auto-generated code, via `go generate`, are up to date. - -This can be done for the entire repo: - -```shell -> go generate ./... -``` - -## Code of Conduct - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or -contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. - -## Special Thanks - -Thanks to [natefinch][natefinch] for the inspiration for this library. -See [npipe](https://github.com/natefinch/npipe) for another named pipe implementation. - -[lint]: https://golangci-lint.run/ -[lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration -[lint-install]: https://golangci-lint.run/usage/install/#local-installation - -[git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s -[git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff - -[natefinch]: https://github.com/natefinch diff --git a/vendor/github.com/Microsoft/go-winio/SECURITY.md b/vendor/github.com/Microsoft/go-winio/SECURITY.md deleted file mode 100644 index 869fdfe2b2..0000000000 --- a/vendor/github.com/Microsoft/go-winio/SECURITY.md +++ /dev/null @@ -1,41 +0,0 @@ - - -## Security - -Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). - -If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below. - -## Reporting Security Issues - -**Please do not report security vulnerabilities through public GitHub issues.** - -Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report). - -If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey). - -You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc). - -Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: - - * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) - * Full paths of source file(s) related to the manifestation of the issue - * The location of the affected source code (tag/branch/commit or direct URL) - * Any special configuration required to reproduce the issue - * Step-by-step instructions to reproduce the issue - * Proof-of-concept or exploit code (if possible) - * Impact of the issue, including how an attacker might exploit the issue - -This information will help us triage your report more quickly. - -If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs. - -## Preferred Languages - -We prefer all communications to be in English. - -## Policy - -Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd). - - diff --git a/vendor/github.com/Microsoft/go-winio/backup.go b/vendor/github.com/Microsoft/go-winio/backup.go deleted file mode 100644 index b54341daac..0000000000 --- a/vendor/github.com/Microsoft/go-winio/backup.go +++ /dev/null @@ -1,287 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "encoding/binary" - "errors" - "fmt" - "io" - "os" - "runtime" - "unicode/utf16" - - "github.com/Microsoft/go-winio/internal/fs" - "golang.org/x/sys/windows" -) - -//sys backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead -//sys backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite - -const ( - BackupData = uint32(iota + 1) - BackupEaData - BackupSecurity - BackupAlternateData - BackupLink - BackupPropertyData - BackupObjectId //revive:disable-line:var-naming ID, not Id - BackupReparseData - BackupSparseBlock - BackupTxfsData -) - -const ( - StreamSparseAttributes = uint32(8) -) - -//nolint:revive // var-naming: ALL_CAPS -const ( - WRITE_DAC = windows.WRITE_DAC - WRITE_OWNER = windows.WRITE_OWNER - ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY -) - -// BackupHeader represents a backup stream of a file. -type BackupHeader struct { - //revive:disable-next-line:var-naming ID, not Id - Id uint32 // The backup stream ID - Attributes uint32 // Stream attributes - Size int64 // The size of the stream in bytes - Name string // The name of the stream (for BackupAlternateData only). - Offset int64 // The offset of the stream in the file (for BackupSparseBlock only). -} - -type win32StreamID struct { - StreamID uint32 - Attributes uint32 - Size uint64 - NameSize uint32 -} - -// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series -// of BackupHeader values. -type BackupStreamReader struct { - r io.Reader - bytesLeft int64 -} - -// NewBackupStreamReader produces a BackupStreamReader from any io.Reader. -func NewBackupStreamReader(r io.Reader) *BackupStreamReader { - return &BackupStreamReader{r, 0} -} - -// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if -// it was not completely read. -func (r *BackupStreamReader) Next() (*BackupHeader, error) { - if r.bytesLeft > 0 { //nolint:nestif // todo: flatten this - if s, ok := r.r.(io.Seeker); ok { - // Make sure Seek on io.SeekCurrent sometimes succeeds - // before trying the actual seek. - if _, err := s.Seek(0, io.SeekCurrent); err == nil { - if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil { - return nil, err - } - r.bytesLeft = 0 - } - } - if _, err := io.Copy(io.Discard, r); err != nil { - return nil, err - } - } - var wsi win32StreamID - if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil { - return nil, err - } - hdr := &BackupHeader{ - Id: wsi.StreamID, - Attributes: wsi.Attributes, - Size: int64(wsi.Size), - } - if wsi.NameSize != 0 { - name := make([]uint16, int(wsi.NameSize/2)) - if err := binary.Read(r.r, binary.LittleEndian, name); err != nil { - return nil, err - } - hdr.Name = windows.UTF16ToString(name) - } - if wsi.StreamID == BackupSparseBlock { - if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil { - return nil, err - } - hdr.Size -= 8 - } - r.bytesLeft = hdr.Size - return hdr, nil -} - -// Read reads from the current backup stream. -func (r *BackupStreamReader) Read(b []byte) (int, error) { - if r.bytesLeft == 0 { - return 0, io.EOF - } - if int64(len(b)) > r.bytesLeft { - b = b[:r.bytesLeft] - } - n, err := r.r.Read(b) - r.bytesLeft -= int64(n) - if err == io.EOF { - err = io.ErrUnexpectedEOF - } else if r.bytesLeft == 0 && err == nil { - err = io.EOF - } - return n, err -} - -// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API. -type BackupStreamWriter struct { - w io.Writer - bytesLeft int64 -} - -// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer. -func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter { - return &BackupStreamWriter{w, 0} -} - -// WriteHeader writes the next backup stream header and prepares for calls to Write(). -func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error { - if w.bytesLeft != 0 { - return fmt.Errorf("missing %d bytes", w.bytesLeft) - } - name := utf16.Encode([]rune(hdr.Name)) - wsi := win32StreamID{ - StreamID: hdr.Id, - Attributes: hdr.Attributes, - Size: uint64(hdr.Size), - NameSize: uint32(len(name) * 2), - } - if hdr.Id == BackupSparseBlock { - // Include space for the int64 block offset - wsi.Size += 8 - } - if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil { - return err - } - if len(name) != 0 { - if err := binary.Write(w.w, binary.LittleEndian, name); err != nil { - return err - } - } - if hdr.Id == BackupSparseBlock { - if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil { - return err - } - } - w.bytesLeft = hdr.Size - return nil -} - -// Write writes to the current backup stream. -func (w *BackupStreamWriter) Write(b []byte) (int, error) { - if w.bytesLeft < int64(len(b)) { - return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft) - } - n, err := w.w.Write(b) - w.bytesLeft -= int64(n) - return n, err -} - -// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API. -type BackupFileReader struct { - f *os.File - includeSecurity bool - ctx uintptr -} - -// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true, -// Read will attempt to read the security descriptor of the file. -func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader { - r := &BackupFileReader{f, includeSecurity, 0} - return r -} - -// Read reads a backup stream from the file by calling the Win32 API BackupRead(). -func (r *BackupFileReader) Read(b []byte) (int, error) { - var bytesRead uint32 - err := backupRead(windows.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx) - if err != nil { - return 0, &os.PathError{Op: "BackupRead", Path: r.f.Name(), Err: err} - } - runtime.KeepAlive(r.f) - if bytesRead == 0 { - return 0, io.EOF - } - return int(bytesRead), nil -} - -// Close frees Win32 resources associated with the BackupFileReader. It does not close -// the underlying file. -func (r *BackupFileReader) Close() error { - if r.ctx != 0 { - _ = backupRead(windows.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx) - runtime.KeepAlive(r.f) - r.ctx = 0 - } - return nil -} - -// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API. -type BackupFileWriter struct { - f *os.File - includeSecurity bool - ctx uintptr -} - -// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true, -// Write() will attempt to restore the security descriptor from the stream. -func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter { - w := &BackupFileWriter{f, includeSecurity, 0} - return w -} - -// Write restores a portion of the file using the provided backup stream. -func (w *BackupFileWriter) Write(b []byte) (int, error) { - var bytesWritten uint32 - err := backupWrite(windows.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx) - if err != nil { - return 0, &os.PathError{Op: "BackupWrite", Path: w.f.Name(), Err: err} - } - runtime.KeepAlive(w.f) - if int(bytesWritten) != len(b) { - return int(bytesWritten), errors.New("not all bytes could be written") - } - return len(b), nil -} - -// Close frees Win32 resources associated with the BackupFileWriter. It does not -// close the underlying file. -func (w *BackupFileWriter) Close() error { - if w.ctx != 0 { - _ = backupWrite(windows.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx) - runtime.KeepAlive(w.f) - w.ctx = 0 - } - return nil -} - -// OpenForBackup opens a file or directory, potentially skipping access checks if the backup -// or restore privileges have been acquired. -// -// If the file opened was a directory, it cannot be used with Readdir(). -func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) { - h, err := fs.CreateFile(path, - fs.AccessMask(access), - fs.FileShareMode(share), - nil, - fs.FileCreationDisposition(createmode), - fs.FILE_FLAG_BACKUP_SEMANTICS|fs.FILE_FLAG_OPEN_REPARSE_POINT, - 0, - ) - if err != nil { - err = &os.PathError{Op: "open", Path: path, Err: err} - return nil, err - } - return os.NewFile(uintptr(h), path), nil -} diff --git a/vendor/github.com/Microsoft/go-winio/doc.go b/vendor/github.com/Microsoft/go-winio/doc.go deleted file mode 100644 index 1f5bfe2d54..0000000000 --- a/vendor/github.com/Microsoft/go-winio/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -// This package provides utilities for efficiently performing Win32 IO operations in Go. -// Currently, this package is provides support for genreal IO and management of -// - named pipes -// - files -// - [Hyper-V sockets] -// -// This code is similar to Go's [net] package, and uses IO completion ports to avoid -// blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines. -// -// This limits support to Windows Vista and newer operating systems. -// -// Additionally, this package provides support for: -// - creating and managing GUIDs -// - writing to [ETW] -// - opening and manageing VHDs -// - parsing [Windows Image files] -// - auto-generating Win32 API code -// -// [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service -// [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw- -// [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images -package winio diff --git a/vendor/github.com/Microsoft/go-winio/ea.go b/vendor/github.com/Microsoft/go-winio/ea.go deleted file mode 100644 index e104dbdfdf..0000000000 --- a/vendor/github.com/Microsoft/go-winio/ea.go +++ /dev/null @@ -1,137 +0,0 @@ -package winio - -import ( - "bytes" - "encoding/binary" - "errors" -) - -type fileFullEaInformation struct { - NextEntryOffset uint32 - Flags uint8 - NameLength uint8 - ValueLength uint16 -} - -var ( - fileFullEaInformationSize = binary.Size(&fileFullEaInformation{}) - - errInvalidEaBuffer = errors.New("invalid extended attribute buffer") - errEaNameTooLarge = errors.New("extended attribute name too large") - errEaValueTooLarge = errors.New("extended attribute value too large") -) - -// ExtendedAttribute represents a single Windows EA. -type ExtendedAttribute struct { - Name string - Value []byte - Flags uint8 -} - -func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) { - var info fileFullEaInformation - err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info) - if err != nil { - err = errInvalidEaBuffer - return ea, nb, err - } - - nameOffset := fileFullEaInformationSize - nameLen := int(info.NameLength) - valueOffset := nameOffset + int(info.NameLength) + 1 - valueLen := int(info.ValueLength) - nextOffset := int(info.NextEntryOffset) - if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) { - err = errInvalidEaBuffer - return ea, nb, err - } - - ea.Name = string(b[nameOffset : nameOffset+nameLen]) - ea.Value = b[valueOffset : valueOffset+valueLen] - ea.Flags = info.Flags - if info.NextEntryOffset != 0 { - nb = b[info.NextEntryOffset:] - } - return ea, nb, err -} - -// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION -// buffer retrieved from BackupRead, ZwQueryEaFile, etc. -func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) { - for len(b) != 0 { - ea, nb, err := parseEa(b) - if err != nil { - return nil, err - } - - eas = append(eas, ea) - b = nb - } - return eas, err -} - -func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error { - if int(uint8(len(ea.Name))) != len(ea.Name) { - return errEaNameTooLarge - } - if int(uint16(len(ea.Value))) != len(ea.Value) { - return errEaValueTooLarge - } - entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value)) - withPadding := (entrySize + 3) &^ 3 - nextOffset := uint32(0) - if !last { - nextOffset = withPadding - } - info := fileFullEaInformation{ - NextEntryOffset: nextOffset, - Flags: ea.Flags, - NameLength: uint8(len(ea.Name)), - ValueLength: uint16(len(ea.Value)), - } - - err := binary.Write(buf, binary.LittleEndian, &info) - if err != nil { - return err - } - - _, err = buf.Write([]byte(ea.Name)) - if err != nil { - return err - } - - err = buf.WriteByte(0) - if err != nil { - return err - } - - _, err = buf.Write(ea.Value) - if err != nil { - return err - } - - _, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize]) - if err != nil { - return err - } - - return nil -} - -// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION -// buffer for use with BackupWrite, ZwSetEaFile, etc. -func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) { - var buf bytes.Buffer - for i := range eas { - last := false - if i == len(eas)-1 { - last = true - } - - err := writeEa(&buf, &eas[i], last) - if err != nil { - return nil, err - } - } - return buf.Bytes(), nil -} diff --git a/vendor/github.com/Microsoft/go-winio/file.go b/vendor/github.com/Microsoft/go-winio/file.go deleted file mode 100644 index fe82a180db..0000000000 --- a/vendor/github.com/Microsoft/go-winio/file.go +++ /dev/null @@ -1,320 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "errors" - "io" - "runtime" - "sync" - "sync/atomic" - "syscall" - "time" - - "golang.org/x/sys/windows" -) - -//sys cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) = CancelIoEx -//sys createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) = CreateIoCompletionPort -//sys getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus -//sys setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes -//sys wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult - -var ( - ErrFileClosed = errors.New("file has already been closed") - ErrTimeout = &timeoutError{} -) - -type timeoutError struct{} - -func (*timeoutError) Error() string { return "i/o timeout" } -func (*timeoutError) Timeout() bool { return true } -func (*timeoutError) Temporary() bool { return true } - -type timeoutChan chan struct{} - -var ioInitOnce sync.Once -var ioCompletionPort windows.Handle - -// ioResult contains the result of an asynchronous IO operation. -type ioResult struct { - bytes uint32 - err error -} - -// ioOperation represents an outstanding asynchronous Win32 IO. -type ioOperation struct { - o windows.Overlapped - ch chan ioResult -} - -func initIO() { - h, err := createIoCompletionPort(windows.InvalidHandle, 0, 0, 0xffffffff) - if err != nil { - panic(err) - } - ioCompletionPort = h - go ioCompletionProcessor(h) -} - -// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall. -// It takes ownership of this handle and will close it if it is garbage collected. -type win32File struct { - handle windows.Handle - wg sync.WaitGroup - wgLock sync.RWMutex - closing atomic.Bool - socket bool - readDeadline deadlineHandler - writeDeadline deadlineHandler -} - -type deadlineHandler struct { - setLock sync.Mutex - channel timeoutChan - channelLock sync.RWMutex - timer *time.Timer - timedout atomic.Bool -} - -// makeWin32File makes a new win32File from an existing file handle. -func makeWin32File(h windows.Handle) (*win32File, error) { - f := &win32File{handle: h} - ioInitOnce.Do(initIO) - _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff) - if err != nil { - return nil, err - } - err = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE) - if err != nil { - return nil, err - } - f.readDeadline.channel = make(timeoutChan) - f.writeDeadline.channel = make(timeoutChan) - return f, nil -} - -// Deprecated: use NewOpenFile instead. -func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) { - return NewOpenFile(windows.Handle(h)) -} - -func NewOpenFile(h windows.Handle) (io.ReadWriteCloser, error) { - // If we return the result of makeWin32File directly, it can result in an - // interface-wrapped nil, rather than a nil interface value. - f, err := makeWin32File(h) - if err != nil { - return nil, err - } - return f, nil -} - -// closeHandle closes the resources associated with a Win32 handle. -func (f *win32File) closeHandle() { - f.wgLock.Lock() - // Atomically set that we are closing, releasing the resources only once. - if !f.closing.Swap(true) { - f.wgLock.Unlock() - // cancel all IO and wait for it to complete - _ = cancelIoEx(f.handle, nil) - f.wg.Wait() - // at this point, no new IO can start - windows.Close(f.handle) - f.handle = 0 - } else { - f.wgLock.Unlock() - } -} - -// Close closes a win32File. -func (f *win32File) Close() error { - f.closeHandle() - return nil -} - -// IsClosed checks if the file has been closed. -func (f *win32File) IsClosed() bool { - return f.closing.Load() -} - -// prepareIO prepares for a new IO operation. -// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning. -func (f *win32File) prepareIO() (*ioOperation, error) { - f.wgLock.RLock() - if f.closing.Load() { - f.wgLock.RUnlock() - return nil, ErrFileClosed - } - f.wg.Add(1) - f.wgLock.RUnlock() - c := &ioOperation{} - c.ch = make(chan ioResult) - return c, nil -} - -// ioCompletionProcessor processes completed async IOs forever. -func ioCompletionProcessor(h windows.Handle) { - for { - var bytes uint32 - var key uintptr - var op *ioOperation - err := getQueuedCompletionStatus(h, &bytes, &key, &op, windows.INFINITE) - if op == nil { - panic(err) - } - op.ch <- ioResult{bytes, err} - } -} - -// todo: helsaawy - create an asyncIO version that takes a context - -// asyncIO processes the return value from ReadFile or WriteFile, blocking until -// the operation has actually completed. -func (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) { - if err != windows.ERROR_IO_PENDING { //nolint:errorlint // err is Errno - return int(bytes), err - } - - if f.closing.Load() { - _ = cancelIoEx(f.handle, &c.o) - } - - var timeout timeoutChan - if d != nil { - d.channelLock.Lock() - timeout = d.channel - d.channelLock.Unlock() - } - - var r ioResult - select { - case r = <-c.ch: - err = r.err - if err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno - if f.closing.Load() { - err = ErrFileClosed - } - } else if err != nil && f.socket { - // err is from Win32. Query the overlapped structure to get the winsock error. - var bytes, flags uint32 - err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags) - } - case <-timeout: - _ = cancelIoEx(f.handle, &c.o) - r = <-c.ch - err = r.err - if err == windows.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno - err = ErrTimeout - } - } - - // runtime.KeepAlive is needed, as c is passed via native - // code to ioCompletionProcessor, c must remain alive - // until the channel read is complete. - // todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive? - runtime.KeepAlive(c) - return int(r.bytes), err -} - -// Read reads from a file handle. -func (f *win32File) Read(b []byte) (int, error) { - c, err := f.prepareIO() - if err != nil { - return 0, err - } - defer f.wg.Done() - - if f.readDeadline.timedout.Load() { - return 0, ErrTimeout - } - - var bytes uint32 - err = windows.ReadFile(f.handle, b, &bytes, &c.o) - n, err := f.asyncIO(c, &f.readDeadline, bytes, err) - runtime.KeepAlive(b) - - // Handle EOF conditions. - if err == nil && n == 0 && len(b) != 0 { - return 0, io.EOF - } else if err == windows.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno - return 0, io.EOF - } - return n, err -} - -// Write writes to a file handle. -func (f *win32File) Write(b []byte) (int, error) { - c, err := f.prepareIO() - if err != nil { - return 0, err - } - defer f.wg.Done() - - if f.writeDeadline.timedout.Load() { - return 0, ErrTimeout - } - - var bytes uint32 - err = windows.WriteFile(f.handle, b, &bytes, &c.o) - n, err := f.asyncIO(c, &f.writeDeadline, bytes, err) - runtime.KeepAlive(b) - return n, err -} - -func (f *win32File) SetReadDeadline(deadline time.Time) error { - return f.readDeadline.set(deadline) -} - -func (f *win32File) SetWriteDeadline(deadline time.Time) error { - return f.writeDeadline.set(deadline) -} - -func (f *win32File) Flush() error { - return windows.FlushFileBuffers(f.handle) -} - -func (f *win32File) Fd() uintptr { - return uintptr(f.handle) -} - -func (d *deadlineHandler) set(deadline time.Time) error { - d.setLock.Lock() - defer d.setLock.Unlock() - - if d.timer != nil { - if !d.timer.Stop() { - <-d.channel - } - d.timer = nil - } - d.timedout.Store(false) - - select { - case <-d.channel: - d.channelLock.Lock() - d.channel = make(chan struct{}) - d.channelLock.Unlock() - default: - } - - if deadline.IsZero() { - return nil - } - - timeoutIO := func() { - d.timedout.Store(true) - close(d.channel) - } - - now := time.Now() - duration := deadline.Sub(now) - if deadline.After(now) { - // Deadline is in the future, set a timer to wait - d.timer = time.AfterFunc(duration, timeoutIO) - } else { - // Deadline is in the past. Cancel all pending IO now. - timeoutIO() - } - return nil -} diff --git a/vendor/github.com/Microsoft/go-winio/fileinfo.go b/vendor/github.com/Microsoft/go-winio/fileinfo.go deleted file mode 100644 index c860eb9917..0000000000 --- a/vendor/github.com/Microsoft/go-winio/fileinfo.go +++ /dev/null @@ -1,106 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "os" - "runtime" - "unsafe" - - "golang.org/x/sys/windows" -) - -// FileBasicInfo contains file access time and file attributes information. -type FileBasicInfo struct { - CreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime - FileAttributes uint32 - _ uint32 // padding -} - -// alignedFileBasicInfo is a FileBasicInfo, but aligned to uint64 by containing -// uint64 rather than windows.Filetime. Filetime contains two uint32s. uint64 -// alignment is necessary to pass this as FILE_BASIC_INFO. -type alignedFileBasicInfo struct { - CreationTime, LastAccessTime, LastWriteTime, ChangeTime uint64 - FileAttributes uint32 - _ uint32 // padding -} - -// GetFileBasicInfo retrieves times and attributes for a file. -func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) { - bi := &alignedFileBasicInfo{} - if err := windows.GetFileInformationByHandleEx( - windows.Handle(f.Fd()), - windows.FileBasicInfo, - (*byte)(unsafe.Pointer(bi)), - uint32(unsafe.Sizeof(*bi)), - ); err != nil { - return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} - } - runtime.KeepAlive(f) - // Reinterpret the alignedFileBasicInfo as a FileBasicInfo so it matches the - // public API of this module. The data may be unnecessarily aligned. - return (*FileBasicInfo)(unsafe.Pointer(bi)), nil -} - -// SetFileBasicInfo sets times and attributes for a file. -func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error { - // Create an alignedFileBasicInfo based on a FileBasicInfo. The copy is - // suitable to pass to GetFileInformationByHandleEx. - biAligned := *(*alignedFileBasicInfo)(unsafe.Pointer(bi)) - if err := windows.SetFileInformationByHandle( - windows.Handle(f.Fd()), - windows.FileBasicInfo, - (*byte)(unsafe.Pointer(&biAligned)), - uint32(unsafe.Sizeof(biAligned)), - ); err != nil { - return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err} - } - runtime.KeepAlive(f) - return nil -} - -// FileStandardInfo contains extended information for the file. -// FILE_STANDARD_INFO in WinBase.h -// https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info -type FileStandardInfo struct { - AllocationSize, EndOfFile int64 - NumberOfLinks uint32 - DeletePending, Directory bool -} - -// GetFileStandardInfo retrieves ended information for the file. -func GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) { - si := &FileStandardInfo{} - if err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()), - windows.FileStandardInfo, - (*byte)(unsafe.Pointer(si)), - uint32(unsafe.Sizeof(*si))); err != nil { - return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} - } - runtime.KeepAlive(f) - return si, nil -} - -// FileIDInfo contains the volume serial number and file ID for a file. This pair should be -// unique on a system. -type FileIDInfo struct { - VolumeSerialNumber uint64 - FileID [16]byte -} - -// GetFileID retrieves the unique (volume, file ID) pair for a file. -func GetFileID(f *os.File) (*FileIDInfo, error) { - fileID := &FileIDInfo{} - if err := windows.GetFileInformationByHandleEx( - windows.Handle(f.Fd()), - windows.FileIdInfo, - (*byte)(unsafe.Pointer(fileID)), - uint32(unsafe.Sizeof(*fileID)), - ); err != nil { - return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err} - } - runtime.KeepAlive(f) - return fileID, nil -} diff --git a/vendor/github.com/Microsoft/go-winio/hvsock.go b/vendor/github.com/Microsoft/go-winio/hvsock.go deleted file mode 100644 index c4fdd9d4ae..0000000000 --- a/vendor/github.com/Microsoft/go-winio/hvsock.go +++ /dev/null @@ -1,582 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "os" - "time" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/Microsoft/go-winio/internal/socket" - "github.com/Microsoft/go-winio/pkg/guid" -) - -const afHVSock = 34 // AF_HYPERV - -// Well known Service and VM IDs -// https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards - -// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions. -func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000 - return guid.GUID{} -} - -// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions. -func HvsockGUIDBroadcast() guid.GUID { // ffffffff-ffff-ffff-ffff-ffffffffffff - return guid.GUID{ - Data1: 0xffffffff, - Data2: 0xffff, - Data3: 0xffff, - Data4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}, - } -} - -// HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector. -func HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838 - return guid.GUID{ - Data1: 0xe0e16197, - Data2: 0xdd56, - Data3: 0x4a10, - Data4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38}, - } -} - -// HvsockGUIDSiloHost is the address of a silo's host partition: -// - The silo host of a hosted silo is the utility VM. -// - The silo host of a silo on a physical host is the physical host. -func HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568 - return guid.GUID{ - Data1: 0x36bd0c5c, - Data2: 0x7276, - Data3: 0x4223, - Data4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68}, - } -} - -// HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions. -func HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd - return guid.GUID{ - Data1: 0x90db8b89, - Data2: 0xd35, - Data3: 0x4f79, - Data4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd}, - } -} - -// HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition. -// Listening on this VmId accepts connection from: -// - Inside silos: silo host partition. -// - Inside hosted silo: host of the VM. -// - Inside VM: VM host. -// - Physical host: Not supported. -func HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878 - return guid.GUID{ - Data1: 0xa42e7cda, - Data2: 0xd03f, - Data3: 0x480c, - Data4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78}, - } -} - -// hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol. -func hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3 - return guid.GUID{ - Data2: 0xfacb, - Data3: 0x11e6, - Data4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3}, - } -} - -// An HvsockAddr is an address for a AF_HYPERV socket. -type HvsockAddr struct { - VMID guid.GUID - ServiceID guid.GUID -} - -type rawHvsockAddr struct { - Family uint16 - _ uint16 - VMID guid.GUID - ServiceID guid.GUID -} - -var _ socket.RawSockaddr = &rawHvsockAddr{} - -// Network returns the address's network name, "hvsock". -func (*HvsockAddr) Network() string { - return "hvsock" -} - -func (addr *HvsockAddr) String() string { - return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID) -} - -// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port. -func VsockServiceID(port uint32) guid.GUID { - g := hvsockVsockServiceTemplate() // make a copy - g.Data1 = port - return g -} - -func (addr *HvsockAddr) raw() rawHvsockAddr { - return rawHvsockAddr{ - Family: afHVSock, - VMID: addr.VMID, - ServiceID: addr.ServiceID, - } -} - -func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) { - addr.VMID = raw.VMID - addr.ServiceID = raw.ServiceID -} - -// Sockaddr returns a pointer to and the size of this struct. -// -// Implements the [socket.RawSockaddr] interface, and allows use in -// [socket.Bind] and [socket.ConnectEx]. -func (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) { - return unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil -} - -// Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`. -func (r *rawHvsockAddr) FromBytes(b []byte) error { - n := int(unsafe.Sizeof(rawHvsockAddr{})) - - if len(b) < n { - return fmt.Errorf("got %d, want %d: %w", len(b), n, socket.ErrBufferSize) - } - - copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n]) - if r.Family != afHVSock { - return fmt.Errorf("got %d, want %d: %w", r.Family, afHVSock, socket.ErrAddrFamily) - } - - return nil -} - -// HvsockListener is a socket listener for the AF_HYPERV address family. -type HvsockListener struct { - sock *win32File - addr HvsockAddr -} - -var _ net.Listener = &HvsockListener{} - -// HvsockConn is a connected socket of the AF_HYPERV address family. -type HvsockConn struct { - sock *win32File - local, remote HvsockAddr -} - -var _ net.Conn = &HvsockConn{} - -func newHVSocket() (*win32File, error) { - fd, err := windows.Socket(afHVSock, windows.SOCK_STREAM, 1) - if err != nil { - return nil, os.NewSyscallError("socket", err) - } - f, err := makeWin32File(fd) - if err != nil { - windows.Close(fd) - return nil, err - } - f.socket = true - return f, nil -} - -// ListenHvsock listens for connections on the specified hvsock address. -func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) { - l := &HvsockListener{addr: *addr} - - var sock *win32File - sock, err = newHVSocket() - if err != nil { - return nil, l.opErr("listen", err) - } - defer func() { - if err != nil { - _ = sock.Close() - } - }() - - sa := addr.raw() - err = socket.Bind(sock.handle, &sa) - if err != nil { - return nil, l.opErr("listen", os.NewSyscallError("socket", err)) - } - err = windows.Listen(sock.handle, 16) - if err != nil { - return nil, l.opErr("listen", os.NewSyscallError("listen", err)) - } - return &HvsockListener{sock: sock, addr: *addr}, nil -} - -func (l *HvsockListener) opErr(op string, err error) error { - return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err} -} - -// Addr returns the listener's network address. -func (l *HvsockListener) Addr() net.Addr { - return &l.addr -} - -// Accept waits for the next connection and returns it. -func (l *HvsockListener) Accept() (_ net.Conn, err error) { - sock, err := newHVSocket() - if err != nil { - return nil, l.opErr("accept", err) - } - defer func() { - if sock != nil { - sock.Close() - } - }() - c, err := l.sock.prepareIO() - if err != nil { - return nil, l.opErr("accept", err) - } - defer l.sock.wg.Done() - - // AcceptEx, per documentation, requires an extra 16 bytes per address. - // - // https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex - const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{})) - var addrbuf [addrlen * 2]byte - - var bytes uint32 - err = windows.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /* rxdatalen */, addrlen, addrlen, &bytes, &c.o) - if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil { - return nil, l.opErr("accept", os.NewSyscallError("acceptex", err)) - } - - conn := &HvsockConn{ - sock: sock, - } - // The local address returned in the AcceptEx buffer is the same as the Listener socket's - // address. However, the service GUID reported by GetSockName is different from the Listeners - // socket, and is sometimes the same as the local address of the socket that dialed the - // address, with the service GUID.Data1 incremented, but othertimes is different. - // todo: does the local address matter? is the listener's address or the actual address appropriate? - conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0]))) - conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen]))) - - // initialize the accepted socket and update its properties with those of the listening socket - if err = windows.Setsockopt(sock.handle, - windows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT, - (*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil { - return nil, conn.opErr("accept", os.NewSyscallError("setsockopt", err)) - } - - sock = nil - return conn, nil -} - -// Close closes the listener, causing any pending Accept calls to fail. -func (l *HvsockListener) Close() error { - return l.sock.Close() -} - -// HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]). -type HvsockDialer struct { - // Deadline is the time the Dial operation must connect before erroring. - Deadline time.Time - - // Retries is the number of additional connects to try if the connection times out, is refused, - // or the host is unreachable - Retries uint - - // RetryWait is the time to wait after a connection error to retry - RetryWait time.Duration - - rt *time.Timer // redial wait timer -} - -// Dial the Hyper-V socket at addr. -// -// See [HvsockDialer.Dial] for more information. -func Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) { - return (&HvsockDialer{}).Dial(ctx, addr) -} - -// Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful. -// Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between -// retries. -// -// Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx. -func (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) { - op := "dial" - // create the conn early to use opErr() - conn = &HvsockConn{ - remote: *addr, - } - - if !d.Deadline.IsZero() { - var cancel context.CancelFunc - ctx, cancel = context.WithDeadline(ctx, d.Deadline) - defer cancel() - } - - // preemptive timeout/cancellation check - if err = ctx.Err(); err != nil { - return nil, conn.opErr(op, err) - } - - sock, err := newHVSocket() - if err != nil { - return nil, conn.opErr(op, err) - } - defer func() { - if sock != nil { - sock.Close() - } - }() - - sa := addr.raw() - err = socket.Bind(sock.handle, &sa) - if err != nil { - return nil, conn.opErr(op, os.NewSyscallError("bind", err)) - } - - c, err := sock.prepareIO() - if err != nil { - return nil, conn.opErr(op, err) - } - defer sock.wg.Done() - var bytes uint32 - for i := uint(0); i <= d.Retries; i++ { - err = socket.ConnectEx( - sock.handle, - &sa, - nil, // sendBuf - 0, // sendDataLen - &bytes, - (*windows.Overlapped)(unsafe.Pointer(&c.o))) - _, err = sock.asyncIO(c, nil, bytes, err) - if i < d.Retries && canRedial(err) { - if err = d.redialWait(ctx); err == nil { - continue - } - } - break - } - if err != nil { - return nil, conn.opErr(op, os.NewSyscallError("connectex", err)) - } - - // update the connection properties, so shutdown can be used - if err = windows.Setsockopt( - sock.handle, - windows.SOL_SOCKET, - windows.SO_UPDATE_CONNECT_CONTEXT, - nil, // optvalue - 0, // optlen - ); err != nil { - return nil, conn.opErr(op, os.NewSyscallError("setsockopt", err)) - } - - // get the local name - var sal rawHvsockAddr - err = socket.GetSockName(sock.handle, &sal) - if err != nil { - return nil, conn.opErr(op, os.NewSyscallError("getsockname", err)) - } - conn.local.fromRaw(&sal) - - // one last check for timeout, since asyncIO doesn't check the context - if err = ctx.Err(); err != nil { - return nil, conn.opErr(op, err) - } - - conn.sock = sock - sock = nil - - return conn, nil -} - -// redialWait waits before attempting to redial, resetting the timer as appropriate. -func (d *HvsockDialer) redialWait(ctx context.Context) (err error) { - if d.RetryWait == 0 { - return nil - } - - if d.rt == nil { - d.rt = time.NewTimer(d.RetryWait) - } else { - // should already be stopped and drained - d.rt.Reset(d.RetryWait) - } - - select { - case <-ctx.Done(): - case <-d.rt.C: - return nil - } - - // stop and drain the timer - if !d.rt.Stop() { - <-d.rt.C - } - return ctx.Err() -} - -// assumes error is a plain, unwrapped windows.Errno provided by direct syscall. -func canRedial(err error) bool { - //nolint:errorlint // guaranteed to be an Errno - switch err { - case windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT, - windows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL: - return true - default: - return false - } -} - -func (conn *HvsockConn) opErr(op string, err error) error { - // translate from "file closed" to "socket closed" - if errors.Is(err, ErrFileClosed) { - err = socket.ErrSocketClosed - } - return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err} -} - -func (conn *HvsockConn) Read(b []byte) (int, error) { - c, err := conn.sock.prepareIO() - if err != nil { - return 0, conn.opErr("read", err) - } - defer conn.sock.wg.Done() - buf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))} - var flags, bytes uint32 - err = windows.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil) - n, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err) - if err != nil { - var eno windows.Errno - if errors.As(err, &eno) { - err = os.NewSyscallError("wsarecv", eno) - } - return 0, conn.opErr("read", err) - } else if n == 0 { - err = io.EOF - } - return n, err -} - -func (conn *HvsockConn) Write(b []byte) (int, error) { - t := 0 - for len(b) != 0 { - n, err := conn.write(b) - if err != nil { - return t + n, err - } - t += n - b = b[n:] - } - return t, nil -} - -func (conn *HvsockConn) write(b []byte) (int, error) { - c, err := conn.sock.prepareIO() - if err != nil { - return 0, conn.opErr("write", err) - } - defer conn.sock.wg.Done() - buf := windows.WSABuf{Buf: &b[0], Len: uint32(len(b))} - var bytes uint32 - err = windows.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil) - n, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err) - if err != nil { - var eno windows.Errno - if errors.As(err, &eno) { - err = os.NewSyscallError("wsasend", eno) - } - return 0, conn.opErr("write", err) - } - return n, err -} - -// Close closes the socket connection, failing any pending read or write calls. -func (conn *HvsockConn) Close() error { - return conn.sock.Close() -} - -func (conn *HvsockConn) IsClosed() bool { - return conn.sock.IsClosed() -} - -// shutdown disables sending or receiving on a socket. -func (conn *HvsockConn) shutdown(how int) error { - if conn.IsClosed() { - return socket.ErrSocketClosed - } - - err := windows.Shutdown(conn.sock.handle, how) - if err != nil { - // If the connection was closed, shutdowns fail with "not connected" - if errors.Is(err, windows.WSAENOTCONN) || - errors.Is(err, windows.WSAESHUTDOWN) { - err = socket.ErrSocketClosed - } - return os.NewSyscallError("shutdown", err) - } - return nil -} - -// CloseRead shuts down the read end of the socket, preventing future read operations. -func (conn *HvsockConn) CloseRead() error { - err := conn.shutdown(windows.SHUT_RD) - if err != nil { - return conn.opErr("closeread", err) - } - return nil -} - -// CloseWrite shuts down the write end of the socket, preventing future write operations and -// notifying the other endpoint that no more data will be written. -func (conn *HvsockConn) CloseWrite() error { - err := conn.shutdown(windows.SHUT_WR) - if err != nil { - return conn.opErr("closewrite", err) - } - return nil -} - -// LocalAddr returns the local address of the connection. -func (conn *HvsockConn) LocalAddr() net.Addr { - return &conn.local -} - -// RemoteAddr returns the remote address of the connection. -func (conn *HvsockConn) RemoteAddr() net.Addr { - return &conn.remote -} - -// SetDeadline implements the net.Conn SetDeadline method. -func (conn *HvsockConn) SetDeadline(t time.Time) error { - // todo: implement `SetDeadline` for `win32File` - if err := conn.SetReadDeadline(t); err != nil { - return fmt.Errorf("set read deadline: %w", err) - } - if err := conn.SetWriteDeadline(t); err != nil { - return fmt.Errorf("set write deadline: %w", err) - } - return nil -} - -// SetReadDeadline implements the net.Conn SetReadDeadline method. -func (conn *HvsockConn) SetReadDeadline(t time.Time) error { - return conn.sock.SetReadDeadline(t) -} - -// SetWriteDeadline implements the net.Conn SetWriteDeadline method. -func (conn *HvsockConn) SetWriteDeadline(t time.Time) error { - return conn.sock.SetWriteDeadline(t) -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go b/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go deleted file mode 100644 index 1f65388178..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/fs/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// This package contains Win32 filesystem functionality. -package fs diff --git a/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go b/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go deleted file mode 100644 index 0cd9621df7..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/fs/fs.go +++ /dev/null @@ -1,262 +0,0 @@ -//go:build windows - -package fs - -import ( - "golang.org/x/sys/windows" - - "github.com/Microsoft/go-winio/internal/stringbuffer" -) - -//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go fs.go - -// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew -//sys CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateFileW - -const NullHandle windows.Handle = 0 - -// AccessMask defines standard, specific, and generic rights. -// -// Used with CreateFile and NtCreateFile (and co.). -// -// Bitmask: -// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 -// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 -// +---------------+---------------+-------------------------------+ -// |G|G|G|G|Resvd|A| StandardRights| SpecificRights | -// |R|W|E|A| |S| | | -// +-+-------------+---------------+-------------------------------+ -// -// GR Generic Read -// GW Generic Write -// GE Generic Exectue -// GA Generic All -// Resvd Reserved -// AS Access Security System -// -// https://learn.microsoft.com/en-us/windows/win32/secauthz/access-mask -// -// https://learn.microsoft.com/en-us/windows/win32/secauthz/generic-access-rights -// -// https://learn.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants -type AccessMask = windows.ACCESS_MASK - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // Not actually any. - // - // For CreateFile: "query certain metadata such as file, directory, or device attributes without accessing that file or device" - // https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilew#parameters - FILE_ANY_ACCESS AccessMask = 0 - - GENERIC_READ AccessMask = 0x8000_0000 - GENERIC_WRITE AccessMask = 0x4000_0000 - GENERIC_EXECUTE AccessMask = 0x2000_0000 - GENERIC_ALL AccessMask = 0x1000_0000 - ACCESS_SYSTEM_SECURITY AccessMask = 0x0100_0000 - - // Specific Object Access - // from ntioapi.h - - FILE_READ_DATA AccessMask = (0x0001) // file & pipe - FILE_LIST_DIRECTORY AccessMask = (0x0001) // directory - - FILE_WRITE_DATA AccessMask = (0x0002) // file & pipe - FILE_ADD_FILE AccessMask = (0x0002) // directory - - FILE_APPEND_DATA AccessMask = (0x0004) // file - FILE_ADD_SUBDIRECTORY AccessMask = (0x0004) // directory - FILE_CREATE_PIPE_INSTANCE AccessMask = (0x0004) // named pipe - - FILE_READ_EA AccessMask = (0x0008) // file & directory - FILE_READ_PROPERTIES AccessMask = FILE_READ_EA - - FILE_WRITE_EA AccessMask = (0x0010) // file & directory - FILE_WRITE_PROPERTIES AccessMask = FILE_WRITE_EA - - FILE_EXECUTE AccessMask = (0x0020) // file - FILE_TRAVERSE AccessMask = (0x0020) // directory - - FILE_DELETE_CHILD AccessMask = (0x0040) // directory - - FILE_READ_ATTRIBUTES AccessMask = (0x0080) // all - - FILE_WRITE_ATTRIBUTES AccessMask = (0x0100) // all - - FILE_ALL_ACCESS AccessMask = (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF) - FILE_GENERIC_READ AccessMask = (STANDARD_RIGHTS_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES | FILE_READ_EA | SYNCHRONIZE) - FILE_GENERIC_WRITE AccessMask = (STANDARD_RIGHTS_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA | FILE_APPEND_DATA | SYNCHRONIZE) - FILE_GENERIC_EXECUTE AccessMask = (STANDARD_RIGHTS_EXECUTE | FILE_READ_ATTRIBUTES | FILE_EXECUTE | SYNCHRONIZE) - - SPECIFIC_RIGHTS_ALL AccessMask = 0x0000FFFF - - // Standard Access - // from ntseapi.h - - DELETE AccessMask = 0x0001_0000 - READ_CONTROL AccessMask = 0x0002_0000 - WRITE_DAC AccessMask = 0x0004_0000 - WRITE_OWNER AccessMask = 0x0008_0000 - SYNCHRONIZE AccessMask = 0x0010_0000 - - STANDARD_RIGHTS_REQUIRED AccessMask = 0x000F_0000 - - STANDARD_RIGHTS_READ AccessMask = READ_CONTROL - STANDARD_RIGHTS_WRITE AccessMask = READ_CONTROL - STANDARD_RIGHTS_EXECUTE AccessMask = READ_CONTROL - - STANDARD_RIGHTS_ALL AccessMask = 0x001F_0000 -) - -type FileShareMode uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - FILE_SHARE_NONE FileShareMode = 0x00 - FILE_SHARE_READ FileShareMode = 0x01 - FILE_SHARE_WRITE FileShareMode = 0x02 - FILE_SHARE_DELETE FileShareMode = 0x04 - FILE_SHARE_VALID_FLAGS FileShareMode = 0x07 -) - -type FileCreationDisposition uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // from winbase.h - - CREATE_NEW FileCreationDisposition = 0x01 - CREATE_ALWAYS FileCreationDisposition = 0x02 - OPEN_EXISTING FileCreationDisposition = 0x03 - OPEN_ALWAYS FileCreationDisposition = 0x04 - TRUNCATE_EXISTING FileCreationDisposition = 0x05 -) - -// Create disposition values for NtCreate* -type NTFileCreationDisposition uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // From ntioapi.h - - FILE_SUPERSEDE NTFileCreationDisposition = 0x00 - FILE_OPEN NTFileCreationDisposition = 0x01 - FILE_CREATE NTFileCreationDisposition = 0x02 - FILE_OPEN_IF NTFileCreationDisposition = 0x03 - FILE_OVERWRITE NTFileCreationDisposition = 0x04 - FILE_OVERWRITE_IF NTFileCreationDisposition = 0x05 - FILE_MAXIMUM_DISPOSITION NTFileCreationDisposition = 0x05 -) - -// CreateFile and co. take flags or attributes together as one parameter. -// Define alias until we can use generics to allow both -// -// https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants -type FileFlagOrAttribute uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // from winnt.h - - FILE_FLAG_WRITE_THROUGH FileFlagOrAttribute = 0x8000_0000 - FILE_FLAG_OVERLAPPED FileFlagOrAttribute = 0x4000_0000 - FILE_FLAG_NO_BUFFERING FileFlagOrAttribute = 0x2000_0000 - FILE_FLAG_RANDOM_ACCESS FileFlagOrAttribute = 0x1000_0000 - FILE_FLAG_SEQUENTIAL_SCAN FileFlagOrAttribute = 0x0800_0000 - FILE_FLAG_DELETE_ON_CLOSE FileFlagOrAttribute = 0x0400_0000 - FILE_FLAG_BACKUP_SEMANTICS FileFlagOrAttribute = 0x0200_0000 - FILE_FLAG_POSIX_SEMANTICS FileFlagOrAttribute = 0x0100_0000 - FILE_FLAG_OPEN_REPARSE_POINT FileFlagOrAttribute = 0x0020_0000 - FILE_FLAG_OPEN_NO_RECALL FileFlagOrAttribute = 0x0010_0000 - FILE_FLAG_FIRST_PIPE_INSTANCE FileFlagOrAttribute = 0x0008_0000 -) - -// NtCreate* functions take a dedicated CreateOptions parameter. -// -// https://learn.microsoft.com/en-us/windows/win32/api/Winternl/nf-winternl-ntcreatefile -// -// https://learn.microsoft.com/en-us/windows/win32/devnotes/nt-create-named-pipe-file -type NTCreateOptions uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // From ntioapi.h - - FILE_DIRECTORY_FILE NTCreateOptions = 0x0000_0001 - FILE_WRITE_THROUGH NTCreateOptions = 0x0000_0002 - FILE_SEQUENTIAL_ONLY NTCreateOptions = 0x0000_0004 - FILE_NO_INTERMEDIATE_BUFFERING NTCreateOptions = 0x0000_0008 - - FILE_SYNCHRONOUS_IO_ALERT NTCreateOptions = 0x0000_0010 - FILE_SYNCHRONOUS_IO_NONALERT NTCreateOptions = 0x0000_0020 - FILE_NON_DIRECTORY_FILE NTCreateOptions = 0x0000_0040 - FILE_CREATE_TREE_CONNECTION NTCreateOptions = 0x0000_0080 - - FILE_COMPLETE_IF_OPLOCKED NTCreateOptions = 0x0000_0100 - FILE_NO_EA_KNOWLEDGE NTCreateOptions = 0x0000_0200 - FILE_DISABLE_TUNNELING NTCreateOptions = 0x0000_0400 - FILE_RANDOM_ACCESS NTCreateOptions = 0x0000_0800 - - FILE_DELETE_ON_CLOSE NTCreateOptions = 0x0000_1000 - FILE_OPEN_BY_FILE_ID NTCreateOptions = 0x0000_2000 - FILE_OPEN_FOR_BACKUP_INTENT NTCreateOptions = 0x0000_4000 - FILE_NO_COMPRESSION NTCreateOptions = 0x0000_8000 -) - -type FileSQSFlag = FileFlagOrAttribute - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - // from winbase.h - - SECURITY_ANONYMOUS FileSQSFlag = FileSQSFlag(SecurityAnonymous << 16) - SECURITY_IDENTIFICATION FileSQSFlag = FileSQSFlag(SecurityIdentification << 16) - SECURITY_IMPERSONATION FileSQSFlag = FileSQSFlag(SecurityImpersonation << 16) - SECURITY_DELEGATION FileSQSFlag = FileSQSFlag(SecurityDelegation << 16) - - SECURITY_SQOS_PRESENT FileSQSFlag = 0x0010_0000 - SECURITY_VALID_SQOS_FLAGS FileSQSFlag = 0x001F_0000 -) - -// GetFinalPathNameByHandle flags -// -// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew#parameters -type GetFinalPathFlag uint32 - -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. -const ( - GetFinalPathDefaultFlag GetFinalPathFlag = 0x0 - - FILE_NAME_NORMALIZED GetFinalPathFlag = 0x0 - FILE_NAME_OPENED GetFinalPathFlag = 0x8 - - VOLUME_NAME_DOS GetFinalPathFlag = 0x0 - VOLUME_NAME_GUID GetFinalPathFlag = 0x1 - VOLUME_NAME_NT GetFinalPathFlag = 0x2 - VOLUME_NAME_NONE GetFinalPathFlag = 0x4 -) - -// getFinalPathNameByHandle facilitates calling the Windows API GetFinalPathNameByHandle -// with the given handle and flags. It transparently takes care of creating a buffer of the -// correct size for the call. -// -// https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfinalpathnamebyhandlew -func GetFinalPathNameByHandle(h windows.Handle, flags GetFinalPathFlag) (string, error) { - b := stringbuffer.NewWString() - //TODO: can loop infinitely if Win32 keeps returning the same (or a larger) n? - for { - n, err := windows.GetFinalPathNameByHandle(h, b.Pointer(), b.Cap(), uint32(flags)) - if err != nil { - return "", err - } - // If the buffer wasn't large enough, n will be the total size needed (including null terminator). - // Resize and try again. - if n > b.Cap() { - b.ResizeTo(n) - continue - } - // If the buffer is large enough, n will be the size not including the null terminator. - // Convert to a Go string and return. - return b.String(), nil - } -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/fs/security.go b/vendor/github.com/Microsoft/go-winio/internal/fs/security.go deleted file mode 100644 index 81760ac67e..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/fs/security.go +++ /dev/null @@ -1,12 +0,0 @@ -package fs - -// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ne-winnt-security_impersonation_level -type SecurityImpersonationLevel int32 // C default enums underlying type is `int`, which is Go `int32` - -// Impersonation levels -const ( - SecurityAnonymous SecurityImpersonationLevel = 0 - SecurityIdentification SecurityImpersonationLevel = 1 - SecurityImpersonation SecurityImpersonationLevel = 2 - SecurityDelegation SecurityImpersonationLevel = 3 -) diff --git a/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go deleted file mode 100644 index a94e234c70..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/fs/zsyscall_windows.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build windows - -// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. - -package fs - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" -) - -var _ unsafe.Pointer - -// Do the interface allocations only once for common -// Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) - errERROR_EINVAL error = syscall.EINVAL -) - -// errnoErr returns common boxed Errno values, to prevent -// allocations at runtime. -func errnoErr(e syscall.Errno) error { - switch e { - case 0: - return errERROR_EINVAL - case errnoERROR_IO_PENDING: - return errERROR_IO_PENDING - } - return e -} - -var ( - modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - - procCreateFileW = modkernel32.NewProc("CreateFileW") -) - -func CreateFile(name string, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(name) - if err != nil { - return - } - return _CreateFile(_p0, access, mode, sa, createmode, attrs, templatefile) -} - -func _CreateFile(name *uint16, access AccessMask, mode FileShareMode, sa *windows.SecurityAttributes, createmode FileCreationDisposition, attrs FileFlagOrAttribute, templatefile windows.Handle) (handle windows.Handle, err error) { - r0, _, e1 := syscall.SyscallN(procCreateFileW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile)) - handle = windows.Handle(r0) - if handle == windows.InvalidHandle { - err = errnoErr(e1) - } - return -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go b/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go deleted file mode 100644 index 7e82f9afa9..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go +++ /dev/null @@ -1,20 +0,0 @@ -package socket - -import ( - "unsafe" -) - -// RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The -// struct must meet the Win32 sockaddr requirements specified here: -// https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2 -// -// Specifically, the struct size must be least larger than an int16 (unsigned short) -// for the address family. -type RawSockaddr interface { - // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing - // for the RawSockaddr's data to be overwritten by syscalls (if necessary). - // - // It is the callers responsibility to validate that the values are valid; invalid - // pointers or size can cause a panic. - Sockaddr() (unsafe.Pointer, int32, error) -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go b/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go deleted file mode 100644 index 88580d974e..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go +++ /dev/null @@ -1,177 +0,0 @@ -//go:build windows - -package socket - -import ( - "errors" - "fmt" - "net" - "sync" - "syscall" - "unsafe" - - "github.com/Microsoft/go-winio/pkg/guid" - "golang.org/x/sys/windows" -) - -//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go - -//sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname -//sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername -//sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind - -const socketError = uintptr(^uint32(0)) - -var ( - // todo(helsaawy): create custom error types to store the desired vs actual size and addr family? - - ErrBufferSize = errors.New("buffer size") - ErrAddrFamily = errors.New("address family") - ErrInvalidPointer = errors.New("invalid pointer") - ErrSocketClosed = fmt.Errorf("socket closed: %w", net.ErrClosed) -) - -// todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error) - -// GetSockName writes the local address of socket s to the [RawSockaddr] rsa. -// If rsa is not large enough, the [windows.WSAEFAULT] is returned. -func GetSockName(s windows.Handle, rsa RawSockaddr) error { - ptr, l, err := rsa.Sockaddr() - if err != nil { - return fmt.Errorf("could not retrieve socket pointer and size: %w", err) - } - - // although getsockname returns WSAEFAULT if the buffer is too small, it does not set - // &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy - return getsockname(s, ptr, &l) -} - -// GetPeerName returns the remote address the socket is connected to. -// -// See [GetSockName] for more information. -func GetPeerName(s windows.Handle, rsa RawSockaddr) error { - ptr, l, err := rsa.Sockaddr() - if err != nil { - return fmt.Errorf("could not retrieve socket pointer and size: %w", err) - } - - return getpeername(s, ptr, &l) -} - -func Bind(s windows.Handle, rsa RawSockaddr) (err error) { - ptr, l, err := rsa.Sockaddr() - if err != nil { - return fmt.Errorf("could not retrieve socket pointer and size: %w", err) - } - - return bind(s, ptr, l) -} - -// "golang.org/x/sys/windows".ConnectEx and .Bind only accept internal implementations of the -// their sockaddr interface, so they cannot be used with HvsockAddr -// Replicate functionality here from -// https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go - -// The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at -// runtime via a WSAIoctl call: -// https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks - -type runtimeFunc struct { - id guid.GUID - once sync.Once - addr uintptr - err error -} - -func (f *runtimeFunc) Load() error { - f.once.Do(func() { - var s windows.Handle - s, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP) - if f.err != nil { - return - } - defer windows.CloseHandle(s) //nolint:errcheck - - var n uint32 - f.err = windows.WSAIoctl(s, - windows.SIO_GET_EXTENSION_FUNCTION_POINTER, - (*byte)(unsafe.Pointer(&f.id)), - uint32(unsafe.Sizeof(f.id)), - (*byte)(unsafe.Pointer(&f.addr)), - uint32(unsafe.Sizeof(f.addr)), - &n, - nil, // overlapped - 0, // completionRoutine - ) - }) - return f.err -} - -var ( - // todo: add `AcceptEx` and `GetAcceptExSockaddrs` - WSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS - Data1: 0x25a207b9, - Data2: 0xddf3, - Data3: 0x4660, - Data4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}, - } - - connectExFunc = runtimeFunc{id: WSAID_CONNECTEX} -) - -func ConnectEx( - fd windows.Handle, - rsa RawSockaddr, - sendBuf *byte, - sendDataLen uint32, - bytesSent *uint32, - overlapped *windows.Overlapped, -) error { - if err := connectExFunc.Load(); err != nil { - return fmt.Errorf("failed to load ConnectEx function pointer: %w", err) - } - ptr, n, err := rsa.Sockaddr() - if err != nil { - return err - } - return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped) -} - -// BOOL LpfnConnectex( -// [in] SOCKET s, -// [in] const sockaddr *name, -// [in] int namelen, -// [in, optional] PVOID lpSendBuffer, -// [in] DWORD dwSendDataLength, -// [out] LPDWORD lpdwBytesSent, -// [in] LPOVERLAPPED lpOverlapped -// ) - -func connectEx( - s windows.Handle, - name unsafe.Pointer, - namelen int32, - sendBuf *byte, - sendDataLen uint32, - bytesSent *uint32, - overlapped *windows.Overlapped, -) (err error) { - r1, _, e1 := syscall.SyscallN(connectExFunc.addr, - uintptr(s), - uintptr(name), - uintptr(namelen), - uintptr(unsafe.Pointer(sendBuf)), - uintptr(sendDataLen), - uintptr(unsafe.Pointer(bytesSent)), - uintptr(unsafe.Pointer(overlapped)), - ) - - if r1 == 0 { - if e1 != 0 { - err = error(e1) - } else { - err = syscall.EINVAL - } - } - return err -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go deleted file mode 100644 index e1504126aa..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go +++ /dev/null @@ -1,69 +0,0 @@ -//go:build windows - -// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. - -package socket - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" -) - -var _ unsafe.Pointer - -// Do the interface allocations only once for common -// Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) - errERROR_EINVAL error = syscall.EINVAL -) - -// errnoErr returns common boxed Errno values, to prevent -// allocations at runtime. -func errnoErr(e syscall.Errno) error { - switch e { - case 0: - return errERROR_EINVAL - case errnoERROR_IO_PENDING: - return errERROR_IO_PENDING - } - return e -} - -var ( - modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") - - procbind = modws2_32.NewProc("bind") - procgetpeername = modws2_32.NewProc("getpeername") - procgetsockname = modws2_32.NewProc("getsockname") -) - -func bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) { - r1, _, e1 := syscall.SyscallN(procbind.Addr(), uintptr(s), uintptr(name), uintptr(namelen)) - if r1 == socketError { - err = errnoErr(e1) - } - return -} - -func getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) { - r1, _, e1 := syscall.SyscallN(procgetpeername.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen))) - if r1 == socketError { - err = errnoErr(e1) - } - return -} - -func getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) { - r1, _, e1 := syscall.SyscallN(procgetsockname.Addr(), uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen))) - if r1 == socketError { - err = errnoErr(e1) - } - return -} diff --git a/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go b/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go deleted file mode 100644 index 42ebc019fc..0000000000 --- a/vendor/github.com/Microsoft/go-winio/internal/stringbuffer/wstring.go +++ /dev/null @@ -1,132 +0,0 @@ -package stringbuffer - -import ( - "sync" - "unicode/utf16" -) - -// TODO: worth exporting and using in mkwinsyscall? - -// Uint16BufferSize is the buffer size in the pool, chosen somewhat arbitrarily to accommodate -// large path strings: -// MAX_PATH (260) + size of volume GUID prefix (49) + null terminator = 310. -const MinWStringCap = 310 - -// use *[]uint16 since []uint16 creates an extra allocation where the slice header -// is copied to heap and then referenced via pointer in the interface header that sync.Pool -// stores. -var pathPool = sync.Pool{ // if go1.18+ adds Pool[T], use that to store []uint16 directly - New: func() interface{} { - b := make([]uint16, MinWStringCap) - return &b - }, -} - -func newBuffer() []uint16 { return *(pathPool.Get().(*[]uint16)) } - -// freeBuffer copies the slice header data, and puts a pointer to that in the pool. -// This avoids taking a pointer to the slice header in WString, which can be set to nil. -func freeBuffer(b []uint16) { pathPool.Put(&b) } - -// WString is a wide string buffer ([]uint16) meant for storing UTF-16 encoded strings -// for interacting with Win32 APIs. -// Sizes are specified as uint32 and not int. -// -// It is not thread safe. -type WString struct { - // type-def allows casting to []uint16 directly, use struct to prevent that and allow adding fields in the future. - - // raw buffer - b []uint16 -} - -// NewWString returns a [WString] allocated from a shared pool with an -// initial capacity of at least [MinWStringCap]. -// Since the buffer may have been previously used, its contents are not guaranteed to be empty. -// -// The buffer should be freed via [WString.Free] -func NewWString() *WString { - return &WString{ - b: newBuffer(), - } -} - -func (b *WString) Free() { - if b.empty() { - return - } - freeBuffer(b.b) - b.b = nil -} - -// ResizeTo grows the buffer to at least c and returns the new capacity, freeing the -// previous buffer back into pool. -func (b *WString) ResizeTo(c uint32) uint32 { - // already sufficient (or n is 0) - if c <= b.Cap() { - return b.Cap() - } - - if c <= MinWStringCap { - c = MinWStringCap - } - // allocate at-least double buffer size, as is done in [bytes.Buffer] and other places - if c <= 2*b.Cap() { - c = 2 * b.Cap() - } - - b2 := make([]uint16, c) - if !b.empty() { - copy(b2, b.b) - freeBuffer(b.b) - } - b.b = b2 - return c -} - -// Buffer returns the underlying []uint16 buffer. -func (b *WString) Buffer() []uint16 { - if b.empty() { - return nil - } - return b.b -} - -// Pointer returns a pointer to the first uint16 in the buffer. -// If the [WString.Free] has already been called, the pointer will be nil. -func (b *WString) Pointer() *uint16 { - if b.empty() { - return nil - } - return &b.b[0] -} - -// String returns the returns the UTF-8 encoding of the UTF-16 string in the buffer. -// -// It assumes that the data is null-terminated. -func (b *WString) String() string { - // Using [windows.UTF16ToString] would require importing "golang.org/x/sys/windows" - // and would make this code Windows-only, which makes no sense. - // So copy UTF16ToString code into here. - // If other windows-specific code is added, switch to [windows.UTF16ToString] - - s := b.b - for i, v := range s { - if v == 0 { - s = s[:i] - break - } - } - return string(utf16.Decode(s)) -} - -// Cap returns the underlying buffer capacity. -func (b *WString) Cap() uint32 { - if b.empty() { - return 0 - } - return b.cap() -} - -func (b *WString) cap() uint32 { return uint32(cap(b.b)) } -func (b *WString) empty() bool { return b == nil || b.cap() == 0 } diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go deleted file mode 100644 index a2da6639d0..0000000000 --- a/vendor/github.com/Microsoft/go-winio/pipe.go +++ /dev/null @@ -1,586 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "os" - "runtime" - "time" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/Microsoft/go-winio/internal/fs" -) - -//sys connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) = ConnectNamedPipe -//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) [failretval==windows.InvalidHandle] = CreateNamedPipeW -//sys disconnectNamedPipe(pipe windows.Handle) (err error) = DisconnectNamedPipe -//sys getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo -//sys getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW -//sys ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) = ntdll.NtCreateNamedPipeFile -//sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb -//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U -//sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl - -type PipeConn interface { - net.Conn - Disconnect() error - Flush() error -} - -// type aliases for mkwinsyscall code -type ( - ntAccessMask = fs.AccessMask - ntFileShareMode = fs.FileShareMode - ntFileCreationDisposition = fs.NTFileCreationDisposition - ntFileOptions = fs.NTCreateOptions -) - -type ioStatusBlock struct { - Status, Information uintptr -} - -// typedef struct _OBJECT_ATTRIBUTES { -// ULONG Length; -// HANDLE RootDirectory; -// PUNICODE_STRING ObjectName; -// ULONG Attributes; -// PVOID SecurityDescriptor; -// PVOID SecurityQualityOfService; -// } OBJECT_ATTRIBUTES; -// -// https://learn.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes -type objectAttributes struct { - Length uintptr - RootDirectory uintptr - ObjectName *unicodeString - Attributes uintptr - SecurityDescriptor *securityDescriptor - SecurityQoS uintptr -} - -type unicodeString struct { - Length uint16 - MaximumLength uint16 - Buffer uintptr -} - -// typedef struct _SECURITY_DESCRIPTOR { -// BYTE Revision; -// BYTE Sbz1; -// SECURITY_DESCRIPTOR_CONTROL Control; -// PSID Owner; -// PSID Group; -// PACL Sacl; -// PACL Dacl; -// } SECURITY_DESCRIPTOR, *PISECURITY_DESCRIPTOR; -// -// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-security_descriptor -type securityDescriptor struct { - Revision byte - Sbz1 byte - Control uint16 - Owner uintptr - Group uintptr - Sacl uintptr //revive:disable-line:var-naming SACL, not Sacl - Dacl uintptr //revive:disable-line:var-naming DACL, not Dacl -} - -type ntStatus int32 - -func (status ntStatus) Err() error { - if status >= 0 { - return nil - } - return rtlNtStatusToDosError(status) -} - -var ( - // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed. - ErrPipeListenerClosed = net.ErrClosed - - errPipeWriteClosed = errors.New("pipe has been closed for write") -) - -type win32Pipe struct { - *win32File - path string -} - -var _ PipeConn = (*win32Pipe)(nil) - -type win32MessageBytePipe struct { - win32Pipe - writeClosed bool - readEOF bool -} - -type pipeAddress string - -func (f *win32Pipe) LocalAddr() net.Addr { - return pipeAddress(f.path) -} - -func (f *win32Pipe) RemoteAddr() net.Addr { - return pipeAddress(f.path) -} - -func (f *win32Pipe) SetDeadline(t time.Time) error { - if err := f.SetReadDeadline(t); err != nil { - return err - } - return f.SetWriteDeadline(t) -} - -func (f *win32Pipe) Disconnect() error { - return disconnectNamedPipe(f.win32File.handle) -} - -// CloseWrite closes the write side of a message pipe in byte mode. -func (f *win32MessageBytePipe) CloseWrite() error { - if f.writeClosed { - return errPipeWriteClosed - } - err := f.win32File.Flush() - if err != nil { - return err - } - _, err = f.win32File.Write(nil) - if err != nil { - return err - } - f.writeClosed = true - return nil -} - -// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since -// they are used to implement CloseWrite(). -func (f *win32MessageBytePipe) Write(b []byte) (int, error) { - if f.writeClosed { - return 0, errPipeWriteClosed - } - if len(b) == 0 { - return 0, nil - } - return f.win32File.Write(b) -} - -// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message -// mode pipe will return io.EOF, as will all subsequent reads. -func (f *win32MessageBytePipe) Read(b []byte) (int, error) { - if f.readEOF { - return 0, io.EOF - } - n, err := f.win32File.Read(b) - if err == io.EOF { //nolint:errorlint - // If this was the result of a zero-byte read, then - // it is possible that the read was due to a zero-size - // message. Since we are simulating CloseWrite with a - // zero-byte message, ensure that all future Read() calls - // also return EOF. - f.readEOF = true - } else if err == windows.ERROR_MORE_DATA { //nolint:errorlint // err is Errno - // ERROR_MORE_DATA indicates that the pipe's read mode is message mode - // and the message still has more bytes. Treat this as a success, since - // this package presents all named pipes as byte streams. - err = nil - } - return n, err -} - -func (pipeAddress) Network() string { - return "pipe" -} - -func (s pipeAddress) String() string { - return string(s) -} - -// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout. -func tryDialPipe(ctx context.Context, path *string, access fs.AccessMask, impLevel PipeImpLevel) (windows.Handle, error) { - for { - select { - case <-ctx.Done(): - return windows.Handle(0), ctx.Err() - default: - h, err := fs.CreateFile(*path, - access, - 0, // mode - nil, // security attributes - fs.OPEN_EXISTING, - fs.FILE_FLAG_OVERLAPPED|fs.SECURITY_SQOS_PRESENT|fs.FileSQSFlag(impLevel), - 0, // template file handle - ) - if err == nil { - return h, nil - } - if err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno - return h, &os.PathError{Err: err, Op: "open", Path: *path} - } - // Wait 10 msec and try again. This is a rather simplistic - // view, as we always try each 10 milliseconds. - time.Sleep(10 * time.Millisecond) - } - } -} - -// DialPipe connects to a named pipe by path, timing out if the connection -// takes longer than the specified duration. If timeout is nil, then we use -// a default timeout of 2 seconds. (We do not use WaitNamedPipe.) -func DialPipe(path string, timeout *time.Duration) (net.Conn, error) { - var absTimeout time.Time - if timeout != nil { - absTimeout = time.Now().Add(*timeout) - } else { - absTimeout = time.Now().Add(2 * time.Second) - } - ctx, cancel := context.WithDeadline(context.Background(), absTimeout) - defer cancel() - conn, err := DialPipeContext(ctx, path) - if errors.Is(err, context.DeadlineExceeded) { - return nil, ErrTimeout - } - return conn, err -} - -// DialPipeContext attempts to connect to a named pipe by `path` until `ctx` -// cancellation or timeout. -func DialPipeContext(ctx context.Context, path string) (net.Conn, error) { - return DialPipeAccess(ctx, path, uint32(fs.GENERIC_READ|fs.GENERIC_WRITE)) -} - -// PipeImpLevel is an enumeration of impersonation levels that may be set -// when calling DialPipeAccessImpersonation. -type PipeImpLevel uint32 - -const ( - PipeImpLevelAnonymous = PipeImpLevel(fs.SECURITY_ANONYMOUS) - PipeImpLevelIdentification = PipeImpLevel(fs.SECURITY_IDENTIFICATION) - PipeImpLevelImpersonation = PipeImpLevel(fs.SECURITY_IMPERSONATION) - PipeImpLevelDelegation = PipeImpLevel(fs.SECURITY_DELEGATION) -) - -// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx` -// cancellation or timeout. -func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) { - return DialPipeAccessImpLevel(ctx, path, access, PipeImpLevelAnonymous) -} - -// DialPipeAccessImpLevel attempts to connect to a named pipe by `path` with -// `access` at `impLevel` until `ctx` cancellation or timeout. The other -// DialPipe* implementations use PipeImpLevelAnonymous. -func DialPipeAccessImpLevel(ctx context.Context, path string, access uint32, impLevel PipeImpLevel) (net.Conn, error) { - var err error - var h windows.Handle - h, err = tryDialPipe(ctx, &path, fs.AccessMask(access), impLevel) - if err != nil { - return nil, err - } - - var flags uint32 - err = getNamedPipeInfo(h, &flags, nil, nil, nil) - if err != nil { - return nil, err - } - - f, err := makeWin32File(h) - if err != nil { - windows.Close(h) - return nil, err - } - - // If the pipe is in message mode, return a message byte pipe, which - // supports CloseWrite(). - if flags&windows.PIPE_TYPE_MESSAGE != 0 { - return &win32MessageBytePipe{ - win32Pipe: win32Pipe{win32File: f, path: path}, - }, nil - } - return &win32Pipe{win32File: f, path: path}, nil -} - -type acceptResponse struct { - f *win32File - err error -} - -type win32PipeListener struct { - firstHandle windows.Handle - path string - config PipeConfig - acceptCh chan (chan acceptResponse) - closeCh chan int - doneCh chan int -} - -func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (windows.Handle, error) { - path16, err := windows.UTF16FromString(path) - if err != nil { - return 0, &os.PathError{Op: "open", Path: path, Err: err} - } - - var oa objectAttributes - oa.Length = unsafe.Sizeof(oa) - - var ntPath unicodeString - if err := rtlDosPathNameToNtPathName(&path16[0], - &ntPath, - 0, - 0, - ).Err(); err != nil { - return 0, &os.PathError{Op: "open", Path: path, Err: err} - } - defer windows.LocalFree(windows.Handle(ntPath.Buffer)) //nolint:errcheck - oa.ObjectName = &ntPath - oa.Attributes = windows.OBJ_CASE_INSENSITIVE - - // The security descriptor is only needed for the first pipe. - if first { - if sd != nil { - //todo: does `sdb` need to be allocated on the heap, or can go allocate it? - l := uint32(len(sd)) - sdb, err := windows.LocalAlloc(0, l) - if err != nil { - return 0, fmt.Errorf("LocalAlloc for security descriptor with of length %d: %w", l, err) - } - defer windows.LocalFree(windows.Handle(sdb)) //nolint:errcheck - copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd) - oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb)) - } else { - // Construct the default named pipe security descriptor. - var dacl uintptr - if err := rtlDefaultNpAcl(&dacl).Err(); err != nil { - return 0, fmt.Errorf("getting default named pipe ACL: %w", err) - } - defer windows.LocalFree(windows.Handle(dacl)) //nolint:errcheck - - sdb := &securityDescriptor{ - Revision: 1, - Control: windows.SE_DACL_PRESENT, - Dacl: dacl, - } - oa.SecurityDescriptor = sdb - } - } - - typ := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS) - if c.MessageMode { - typ |= windows.FILE_PIPE_MESSAGE_TYPE - } - - disposition := fs.FILE_OPEN - access := fs.GENERIC_READ | fs.GENERIC_WRITE | fs.SYNCHRONIZE - if first { - disposition = fs.FILE_CREATE - // By not asking for read or write access, the named pipe file system - // will put this pipe into an initially disconnected state, blocking - // client connections until the next call with first == false. - access = fs.SYNCHRONIZE - } - - timeout := int64(-50 * 10000) // 50ms - - var ( - h windows.Handle - iosb ioStatusBlock - ) - err = ntCreateNamedPipeFile(&h, - access, - &oa, - &iosb, - fs.FILE_SHARE_READ|fs.FILE_SHARE_WRITE, - disposition, - 0, - typ, - 0, - 0, - 0xffffffff, - uint32(c.InputBufferSize), - uint32(c.OutputBufferSize), - &timeout).Err() - if err != nil { - return 0, &os.PathError{Op: "open", Path: path, Err: err} - } - - runtime.KeepAlive(ntPath) - return h, nil -} - -func (l *win32PipeListener) makeServerPipe() (*win32File, error) { - h, err := makeServerPipeHandle(l.path, nil, &l.config, false) - if err != nil { - return nil, err - } - f, err := makeWin32File(h) - if err != nil { - windows.Close(h) - return nil, err - } - return f, nil -} - -func (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) { - p, err := l.makeServerPipe() - if err != nil { - return nil, err - } - - // Wait for the client to connect. - ch := make(chan error) - go func(p *win32File) { - ch <- connectPipe(p) - }(p) - - select { - case err = <-ch: - if err != nil { - p.Close() - p = nil - } - case <-l.closeCh: - // Abort the connect request by closing the handle. - p.Close() - p = nil - err = <-ch - if err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno - err = ErrPipeListenerClosed - } - } - return p, err -} - -func (l *win32PipeListener) listenerRoutine() { - closed := false - for !closed { - select { - case <-l.closeCh: - closed = true - case responseCh := <-l.acceptCh: - var ( - p *win32File - err error - ) - for { - p, err = l.makeConnectedServerPipe() - // If the connection was immediately closed by the client, try - // again. - if err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno - break - } - } - responseCh <- acceptResponse{p, err} - closed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno - } - } - windows.Close(l.firstHandle) - l.firstHandle = 0 - // Notify Close() and Accept() callers that the handle has been closed. - close(l.doneCh) -} - -// PipeConfig contain configuration for the pipe listener. -type PipeConfig struct { - // SecurityDescriptor contains a Windows security descriptor in SDDL format. - SecurityDescriptor string - - // MessageMode determines whether the pipe is in byte or message mode. In either - // case the pipe is read in byte mode by default. The only practical difference in - // this implementation is that CloseWrite() is only supported for message mode pipes; - // CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only - // transferred to the reader (and returned as io.EOF in this implementation) - // when the pipe is in message mode. - MessageMode bool - - // InputBufferSize specifies the size of the input buffer, in bytes. - InputBufferSize int32 - - // OutputBufferSize specifies the size of the output buffer, in bytes. - OutputBufferSize int32 -} - -// ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe. -// The pipe must not already exist. -func ListenPipe(path string, c *PipeConfig) (net.Listener, error) { - var ( - sd []byte - err error - ) - if c == nil { - c = &PipeConfig{} - } - if c.SecurityDescriptor != "" { - sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor) - if err != nil { - return nil, err - } - } - h, err := makeServerPipeHandle(path, sd, c, true) - if err != nil { - return nil, err - } - l := &win32PipeListener{ - firstHandle: h, - path: path, - config: *c, - acceptCh: make(chan (chan acceptResponse)), - closeCh: make(chan int), - doneCh: make(chan int), - } - go l.listenerRoutine() - return l, nil -} - -func connectPipe(p *win32File) error { - c, err := p.prepareIO() - if err != nil { - return err - } - defer p.wg.Done() - - err = connectNamedPipe(p.handle, &c.o) - _, err = p.asyncIO(c, nil, 0, err) - if err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno - return err - } - return nil -} - -func (l *win32PipeListener) Accept() (net.Conn, error) { - ch := make(chan acceptResponse) - select { - case l.acceptCh <- ch: - response := <-ch - err := response.err - if err != nil { - return nil, err - } - if l.config.MessageMode { - return &win32MessageBytePipe{ - win32Pipe: win32Pipe{win32File: response.f, path: l.path}, - }, nil - } - return &win32Pipe{win32File: response.f, path: l.path}, nil - case <-l.doneCh: - return nil, ErrPipeListenerClosed - } -} - -func (l *win32PipeListener) Close() error { - select { - case l.closeCh <- 1: - <-l.doneCh - case <-l.doneCh: - } - return nil -} - -func (l *win32PipeListener) Addr() net.Addr { - return pipeAddress(l.path) -} diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go deleted file mode 100644 index 48ce4e9243..0000000000 --- a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go +++ /dev/null @@ -1,232 +0,0 @@ -// Package guid provides a GUID type. The backing structure for a GUID is -// identical to that used by the golang.org/x/sys/windows GUID type. -// There are two main binary encodings used for a GUID, the big-endian encoding, -// and the Windows (mixed-endian) encoding. See here for details: -// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding -package guid - -import ( - "crypto/rand" - "crypto/sha1" //nolint:gosec // not used for secure application - "encoding" - "encoding/binary" - "fmt" - "strconv" -) - -//go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment - -// Variant specifies which GUID variant (or "type") of the GUID. It determines -// how the entirety of the rest of the GUID is interpreted. -type Variant uint8 - -// The variants specified by RFC 4122 section 4.1.1. -const ( - // VariantUnknown specifies a GUID variant which does not conform to one of - // the variant encodings specified in RFC 4122. - VariantUnknown Variant = iota - VariantNCS - VariantRFC4122 // RFC 4122 - VariantMicrosoft - VariantFuture -) - -// Version specifies how the bits in the GUID were generated. For instance, a -// version 4 GUID is randomly generated, and a version 5 is generated from the -// hash of an input string. -type Version uint8 - -func (v Version) String() string { - return strconv.FormatUint(uint64(v), 10) -} - -var _ = (encoding.TextMarshaler)(GUID{}) -var _ = (encoding.TextUnmarshaler)(&GUID{}) - -// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122. -func NewV4() (GUID, error) { - var b [16]byte - if _, err := rand.Read(b[:]); err != nil { - return GUID{}, err - } - - g := FromArray(b) - g.setVersion(4) // Version 4 means randomly generated. - g.setVariant(VariantRFC4122) - - return g, nil -} - -// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing) -// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name, -// and the sample code treats it as a series of bytes, so we do the same here. -// -// Some implementations, such as those found on Windows, treat the name as a -// big-endian UTF16 stream of bytes. If that is desired, the string can be -// encoded as such before being passed to this function. -func NewV5(namespace GUID, name []byte) (GUID, error) { - b := sha1.New() //nolint:gosec // not used for secure application - namespaceBytes := namespace.ToArray() - b.Write(namespaceBytes[:]) - b.Write(name) - - a := [16]byte{} - copy(a[:], b.Sum(nil)) - - g := FromArray(a) - g.setVersion(5) // Version 5 means generated from a string. - g.setVariant(VariantRFC4122) - - return g, nil -} - -func fromArray(b [16]byte, order binary.ByteOrder) GUID { - var g GUID - g.Data1 = order.Uint32(b[0:4]) - g.Data2 = order.Uint16(b[4:6]) - g.Data3 = order.Uint16(b[6:8]) - copy(g.Data4[:], b[8:16]) - return g -} - -func (g GUID) toArray(order binary.ByteOrder) [16]byte { - b := [16]byte{} - order.PutUint32(b[0:4], g.Data1) - order.PutUint16(b[4:6], g.Data2) - order.PutUint16(b[6:8], g.Data3) - copy(b[8:16], g.Data4[:]) - return b -} - -// FromArray constructs a GUID from a big-endian encoding array of 16 bytes. -func FromArray(b [16]byte) GUID { - return fromArray(b, binary.BigEndian) -} - -// ToArray returns an array of 16 bytes representing the GUID in big-endian -// encoding. -func (g GUID) ToArray() [16]byte { - return g.toArray(binary.BigEndian) -} - -// FromWindowsArray constructs a GUID from a Windows encoding array of bytes. -func FromWindowsArray(b [16]byte) GUID { - return fromArray(b, binary.LittleEndian) -} - -// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows -// encoding. -func (g GUID) ToWindowsArray() [16]byte { - return g.toArray(binary.LittleEndian) -} - -func (g GUID) String() string { - return fmt.Sprintf( - "%08x-%04x-%04x-%04x-%012x", - g.Data1, - g.Data2, - g.Data3, - g.Data4[:2], - g.Data4[2:]) -} - -// FromString parses a string containing a GUID and returns the GUID. The only -// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` -// format. -func FromString(s string) (GUID, error) { - if len(s) != 36 { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - - var g GUID - - data1, err := strconv.ParseUint(s[0:8], 16, 32) - if err != nil { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - g.Data1 = uint32(data1) - - data2, err := strconv.ParseUint(s[9:13], 16, 16) - if err != nil { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - g.Data2 = uint16(data2) - - data3, err := strconv.ParseUint(s[14:18], 16, 16) - if err != nil { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - g.Data3 = uint16(data3) - - for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} { - v, err := strconv.ParseUint(s[x:x+2], 16, 8) - if err != nil { - return GUID{}, fmt.Errorf("invalid GUID %q", s) - } - g.Data4[i] = uint8(v) - } - - return g, nil -} - -func (g *GUID) setVariant(v Variant) { - d := g.Data4[0] - switch v { - case VariantNCS: - d = (d & 0x7f) - case VariantRFC4122: - d = (d & 0x3f) | 0x80 - case VariantMicrosoft: - d = (d & 0x1f) | 0xc0 - case VariantFuture: - d = (d & 0x0f) | 0xe0 - case VariantUnknown: - fallthrough - default: - panic(fmt.Sprintf("invalid variant: %d", v)) - } - g.Data4[0] = d -} - -// Variant returns the GUID variant, as defined in RFC 4122. -func (g GUID) Variant() Variant { - b := g.Data4[0] - if b&0x80 == 0 { - return VariantNCS - } else if b&0xc0 == 0x80 { - return VariantRFC4122 - } else if b&0xe0 == 0xc0 { - return VariantMicrosoft - } else if b&0xe0 == 0xe0 { - return VariantFuture - } - return VariantUnknown -} - -func (g *GUID) setVersion(v Version) { - g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12) -} - -// Version returns the GUID version, as defined in RFC 4122. -func (g GUID) Version() Version { - return Version((g.Data3 & 0xF000) >> 12) -} - -// MarshalText returns the textual representation of the GUID. -func (g GUID) MarshalText() ([]byte, error) { - return []byte(g.String()), nil -} - -// UnmarshalText takes the textual representation of a GUID, and unmarhals it -// into this GUID. -func (g *GUID) UnmarshalText(text []byte) error { - g2, err := FromString(string(text)) - if err != nil { - return err - } - *g = g2 - return nil -} diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go deleted file mode 100644 index 805bd35484..0000000000 --- a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !windows -// +build !windows - -package guid - -// GUID represents a GUID/UUID. It has the same structure as -// golang.org/x/sys/windows.GUID so that it can be used with functions expecting -// that type. It is defined as its own type as that is only available to builds -// targeted at `windows`. The representation matches that used by native Windows -// code. -type GUID struct { - Data1 uint32 - Data2 uint16 - Data3 uint16 - Data4 [8]byte -} diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go deleted file mode 100644 index 27e45ee5cc..0000000000 --- a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build windows -// +build windows - -package guid - -import "golang.org/x/sys/windows" - -// GUID represents a GUID/UUID. It has the same structure as -// golang.org/x/sys/windows.GUID so that it can be used with functions expecting -// that type. It is defined as its own type so that stringification and -// marshaling can be supported. The representation matches that used by native -// Windows code. -type GUID windows.GUID diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go deleted file mode 100644 index 4076d3132f..0000000000 --- a/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT. - -package guid - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[VariantUnknown-0] - _ = x[VariantNCS-1] - _ = x[VariantRFC4122-2] - _ = x[VariantMicrosoft-3] - _ = x[VariantFuture-4] -} - -const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture" - -var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33} - -func (i Variant) String() string { - if i >= Variant(len(_Variant_index)-1) { - return "Variant(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Variant_name[_Variant_index[i]:_Variant_index[i+1]] -} diff --git a/vendor/github.com/Microsoft/go-winio/privilege.go b/vendor/github.com/Microsoft/go-winio/privilege.go deleted file mode 100644 index d9b90b6e86..0000000000 --- a/vendor/github.com/Microsoft/go-winio/privilege.go +++ /dev/null @@ -1,196 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "bytes" - "encoding/binary" - "fmt" - "runtime" - "sync" - "unicode/utf16" - - "golang.org/x/sys/windows" -) - -//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges -//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf -//sys revertToSelf() (err error) = advapi32.RevertToSelf -//sys openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken -//sys getCurrentThread() (h windows.Handle) = GetCurrentThread -//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW -//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW -//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW - -const ( - //revive:disable-next-line:var-naming ALL_CAPS - SE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED - - //revive:disable-next-line:var-naming ALL_CAPS - ERROR_NOT_ALL_ASSIGNED windows.Errno = windows.ERROR_NOT_ALL_ASSIGNED - - SeBackupPrivilege = "SeBackupPrivilege" - SeRestorePrivilege = "SeRestorePrivilege" - SeSecurityPrivilege = "SeSecurityPrivilege" -) - -var ( - privNames = make(map[string]uint64) - privNameMutex sync.Mutex -) - -// PrivilegeError represents an error enabling privileges. -type PrivilegeError struct { - privileges []uint64 -} - -func (e *PrivilegeError) Error() string { - s := "Could not enable privilege " - if len(e.privileges) > 1 { - s = "Could not enable privileges " - } - for i, p := range e.privileges { - if i != 0 { - s += ", " - } - s += `"` - s += getPrivilegeName(p) - s += `"` - } - return s -} - -// RunWithPrivilege enables a single privilege for a function call. -func RunWithPrivilege(name string, fn func() error) error { - return RunWithPrivileges([]string{name}, fn) -} - -// RunWithPrivileges enables privileges for a function call. -func RunWithPrivileges(names []string, fn func() error) error { - privileges, err := mapPrivileges(names) - if err != nil { - return err - } - runtime.LockOSThread() - defer runtime.UnlockOSThread() - token, err := newThreadToken() - if err != nil { - return err - } - defer releaseThreadToken(token) - err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED) - if err != nil { - return err - } - return fn() -} - -func mapPrivileges(names []string) ([]uint64, error) { - privileges := make([]uint64, 0, len(names)) - privNameMutex.Lock() - defer privNameMutex.Unlock() - for _, name := range names { - p, ok := privNames[name] - if !ok { - err := lookupPrivilegeValue("", name, &p) - if err != nil { - return nil, err - } - privNames[name] = p - } - privileges = append(privileges, p) - } - return privileges, nil -} - -// EnableProcessPrivileges enables privileges globally for the process. -func EnableProcessPrivileges(names []string) error { - return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED) -} - -// DisableProcessPrivileges disables privileges globally for the process. -func DisableProcessPrivileges(names []string) error { - return enableDisableProcessPrivilege(names, 0) -} - -func enableDisableProcessPrivilege(names []string, action uint32) error { - privileges, err := mapPrivileges(names) - if err != nil { - return err - } - - p := windows.CurrentProcess() - var token windows.Token - err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token) - if err != nil { - return err - } - - defer token.Close() - return adjustPrivileges(token, privileges, action) -} - -func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error { - var b bytes.Buffer - _ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges))) - for _, p := range privileges { - _ = binary.Write(&b, binary.LittleEndian, p) - _ = binary.Write(&b, binary.LittleEndian, action) - } - prevState := make([]byte, b.Len()) - reqSize := uint32(0) - success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize) - if !success { - return err - } - if err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno - return &PrivilegeError{privileges} - } - return nil -} - -func getPrivilegeName(luid uint64) string { - var nameBuffer [256]uint16 - bufSize := uint32(len(nameBuffer)) - err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize) - if err != nil { - return fmt.Sprintf("", luid) - } - - var displayNameBuffer [256]uint16 - displayBufSize := uint32(len(displayNameBuffer)) - var langID uint32 - err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID) - if err != nil { - return fmt.Sprintf("", string(utf16.Decode(nameBuffer[:bufSize]))) - } - - return string(utf16.Decode(displayNameBuffer[:displayBufSize])) -} - -func newThreadToken() (windows.Token, error) { - err := impersonateSelf(windows.SecurityImpersonation) - if err != nil { - return 0, err - } - - var token windows.Token - err = openThreadToken(getCurrentThread(), windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, false, &token) - if err != nil { - rerr := revertToSelf() - if rerr != nil { - panic(rerr) - } - return 0, err - } - return token, nil -} - -func releaseThreadToken(h windows.Token) { - err := revertToSelf() - if err != nil { - panic(err) - } - h.Close() -} diff --git a/vendor/github.com/Microsoft/go-winio/reparse.go b/vendor/github.com/Microsoft/go-winio/reparse.go deleted file mode 100644 index 67d1a104a6..0000000000 --- a/vendor/github.com/Microsoft/go-winio/reparse.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "bytes" - "encoding/binary" - "fmt" - "strings" - "unicode/utf16" - "unsafe" -) - -const ( - reparseTagMountPoint = 0xA0000003 - reparseTagSymlink = 0xA000000C -) - -type reparseDataBuffer struct { - ReparseTag uint32 - ReparseDataLength uint16 - Reserved uint16 - SubstituteNameOffset uint16 - SubstituteNameLength uint16 - PrintNameOffset uint16 - PrintNameLength uint16 -} - -// ReparsePoint describes a Win32 symlink or mount point. -type ReparsePoint struct { - Target string - IsMountPoint bool -} - -// UnsupportedReparsePointError is returned when trying to decode a non-symlink or -// mount point reparse point. -type UnsupportedReparsePointError struct { - Tag uint32 -} - -func (e *UnsupportedReparsePointError) Error() string { - return fmt.Sprintf("unsupported reparse point %x", e.Tag) -} - -// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink -// or a mount point. -func DecodeReparsePoint(b []byte) (*ReparsePoint, error) { - tag := binary.LittleEndian.Uint32(b[0:4]) - return DecodeReparsePointData(tag, b[8:]) -} - -func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) { - isMountPoint := false - switch tag { - case reparseTagMountPoint: - isMountPoint = true - case reparseTagSymlink: - default: - return nil, &UnsupportedReparsePointError{tag} - } - nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6]) - if !isMountPoint { - nameOffset += 4 - } - nameLength := binary.LittleEndian.Uint16(b[6:8]) - name := make([]uint16, nameLength/2) - err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name) - if err != nil { - return nil, err - } - return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil -} - -func isDriveLetter(c byte) bool { - return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') -} - -// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or -// mount point. -func EncodeReparsePoint(rp *ReparsePoint) []byte { - // Generate an NT path and determine if this is a relative path. - var ntTarget string - relative := false - if strings.HasPrefix(rp.Target, `\\?\`) { - ntTarget = `\??\` + rp.Target[4:] - } else if strings.HasPrefix(rp.Target, `\\`) { - ntTarget = `\??\UNC\` + rp.Target[2:] - } else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' { - ntTarget = `\??\` + rp.Target - } else { - ntTarget = rp.Target - relative = true - } - - // The paths must be NUL-terminated even though they are counted strings. - target16 := utf16.Encode([]rune(rp.Target + "\x00")) - ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00")) - - size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8 - size += len(ntTarget16)*2 + len(target16)*2 - - tag := uint32(reparseTagMountPoint) - if !rp.IsMountPoint { - tag = reparseTagSymlink - size += 4 // Add room for symlink flags - } - - data := reparseDataBuffer{ - ReparseTag: tag, - ReparseDataLength: uint16(size), - SubstituteNameOffset: 0, - SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2), - PrintNameOffset: uint16(len(ntTarget16) * 2), - PrintNameLength: uint16((len(target16) - 1) * 2), - } - - var b bytes.Buffer - _ = binary.Write(&b, binary.LittleEndian, &data) - if !rp.IsMountPoint { - flags := uint32(0) - if relative { - flags |= 1 - } - _ = binary.Write(&b, binary.LittleEndian, flags) - } - - _ = binary.Write(&b, binary.LittleEndian, ntTarget16) - _ = binary.Write(&b, binary.LittleEndian, target16) - return b.Bytes() -} diff --git a/vendor/github.com/Microsoft/go-winio/sd.go b/vendor/github.com/Microsoft/go-winio/sd.go deleted file mode 100644 index c3685e98e1..0000000000 --- a/vendor/github.com/Microsoft/go-winio/sd.go +++ /dev/null @@ -1,133 +0,0 @@ -//go:build windows -// +build windows - -package winio - -import ( - "errors" - "fmt" - "unsafe" - - "golang.org/x/sys/windows" -) - -//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW -//sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW -//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW -//sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW - -type AccountLookupError struct { - Name string - Err error -} - -func (e *AccountLookupError) Error() string { - if e.Name == "" { - return "lookup account: empty account name specified" - } - var s string - switch { - case errors.Is(e.Err, windows.ERROR_INVALID_SID): - s = "the security ID structure is invalid" - case errors.Is(e.Err, windows.ERROR_NONE_MAPPED): - s = "not found" - default: - s = e.Err.Error() - } - return "lookup account " + e.Name + ": " + s -} - -func (e *AccountLookupError) Unwrap() error { return e.Err } - -type SddlConversionError struct { - Sddl string - Err error -} - -func (e *SddlConversionError) Error() string { - return "convert " + e.Sddl + ": " + e.Err.Error() -} - -func (e *SddlConversionError) Unwrap() error { return e.Err } - -// LookupSidByName looks up the SID of an account by name -// -//revive:disable-next-line:var-naming SID, not Sid -func LookupSidByName(name string) (sid string, err error) { - if name == "" { - return "", &AccountLookupError{name, windows.ERROR_NONE_MAPPED} - } - - var sidSize, sidNameUse, refDomainSize uint32 - err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse) - if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno - return "", &AccountLookupError{name, err} - } - sidBuffer := make([]byte, sidSize) - refDomainBuffer := make([]uint16, refDomainSize) - err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse) - if err != nil { - return "", &AccountLookupError{name, err} - } - var strBuffer *uint16 - err = convertSidToStringSid(&sidBuffer[0], &strBuffer) - if err != nil { - return "", &AccountLookupError{name, err} - } - sid = windows.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:]) - _, _ = windows.LocalFree(windows.Handle(unsafe.Pointer(strBuffer))) - return sid, nil -} - -// LookupNameBySid looks up the name of an account by SID -// -//revive:disable-next-line:var-naming SID, not Sid -func LookupNameBySid(sid string) (name string, err error) { - if sid == "" { - return "", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED} - } - - sidBuffer, err := windows.UTF16PtrFromString(sid) - if err != nil { - return "", &AccountLookupError{sid, err} - } - - var sidPtr *byte - if err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil { - return "", &AccountLookupError{sid, err} - } - defer windows.LocalFree(windows.Handle(unsafe.Pointer(sidPtr))) //nolint:errcheck - - var nameSize, refDomainSize, sidNameUse uint32 - err = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse) - if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno - return "", &AccountLookupError{sid, err} - } - - nameBuffer := make([]uint16, nameSize) - refDomainBuffer := make([]uint16, refDomainSize) - err = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse) - if err != nil { - return "", &AccountLookupError{sid, err} - } - - name = windows.UTF16ToString(nameBuffer) - return name, nil -} - -func SddlToSecurityDescriptor(sddl string) ([]byte, error) { - sd, err := windows.SecurityDescriptorFromString(sddl) - if err != nil { - return nil, &SddlConversionError{Sddl: sddl, Err: err} - } - b := unsafe.Slice((*byte)(unsafe.Pointer(sd)), sd.Length()) - return b, nil -} - -func SecurityDescriptorToSddl(sd []byte) (string, error) { - if l := int(unsafe.Sizeof(windows.SECURITY_DESCRIPTOR{})); len(sd) < l { - return "", fmt.Errorf("SecurityDescriptor (%d) smaller than expected (%d): %w", len(sd), l, windows.ERROR_INCORRECT_SIZE) - } - s := (*windows.SECURITY_DESCRIPTOR)(unsafe.Pointer(&sd[0])) - return s.String(), nil -} diff --git a/vendor/github.com/Microsoft/go-winio/syscall.go b/vendor/github.com/Microsoft/go-winio/syscall.go deleted file mode 100644 index a6ca111b39..0000000000 --- a/vendor/github.com/Microsoft/go-winio/syscall.go +++ /dev/null @@ -1,5 +0,0 @@ -//go:build windows - -package winio - -//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go diff --git a/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go deleted file mode 100644 index 89b66eda8c..0000000000 --- a/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go +++ /dev/null @@ -1,378 +0,0 @@ -//go:build windows - -// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT. - -package winio - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" -) - -var _ unsafe.Pointer - -// Do the interface allocations only once for common -// Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) - errERROR_EINVAL error = syscall.EINVAL -) - -// errnoErr returns common boxed Errno values, to prevent -// allocations at runtime. -func errnoErr(e syscall.Errno) error { - switch e { - case 0: - return errERROR_EINVAL - case errnoERROR_IO_PENDING: - return errERROR_IO_PENDING - } - return e -} - -var ( - modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") - modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - modntdll = windows.NewLazySystemDLL("ntdll.dll") - modws2_32 = windows.NewLazySystemDLL("ws2_32.dll") - - procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges") - procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") - procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW") - procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf") - procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") - procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW") - procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW") - procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW") - procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW") - procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken") - procRevertToSelf = modadvapi32.NewProc("RevertToSelf") - procBackupRead = modkernel32.NewProc("BackupRead") - procBackupWrite = modkernel32.NewProc("BackupWrite") - procCancelIoEx = modkernel32.NewProc("CancelIoEx") - procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe") - procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") - procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW") - procDisconnectNamedPipe = modkernel32.NewProc("DisconnectNamedPipe") - procGetCurrentThread = modkernel32.NewProc("GetCurrentThread") - procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW") - procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo") - procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") - procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") - procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile") - procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl") - procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U") - procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb") - procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult") -) - -func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) { - var _p0 uint32 - if releaseAll { - _p0 = 1 - } - r0, _, e1 := syscall.SyscallN(procAdjustTokenPrivileges.Addr(), uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize))) - success = r0 != 0 - if true { - err = errnoErr(e1) - } - return -} - -func convertSidToStringSid(sid *byte, str **uint16) (err error) { - r1, _, e1 := syscall.SyscallN(procConvertSidToStringSidW.Addr(), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func convertStringSidToSid(str *uint16, sid **byte) (err error) { - r1, _, e1 := syscall.SyscallN(procConvertStringSidToSidW.Addr(), uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func impersonateSelf(level uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procImpersonateSelf.Addr(), uintptr(level)) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(accountName) - if err != nil { - return - } - return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse) -} - -func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procLookupAccountNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procLookupAccountSidW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(systemName) - if err != nil { - return - } - return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId) -} - -func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procLookupPrivilegeDisplayNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(systemName) - if err != nil { - return - } - return _lookupPrivilegeName(_p0, luid, buffer, size) -} - -func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procLookupPrivilegeNameW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(systemName) - if err != nil { - return - } - var _p1 *uint16 - _p1, err = syscall.UTF16PtrFromString(name) - if err != nil { - return - } - return _lookupPrivilegeValue(_p0, _p1, luid) -} - -func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) { - r1, _, e1 := syscall.SyscallN(procLookupPrivilegeValueW.Addr(), uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func openThreadToken(thread windows.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) { - var _p0 uint32 - if openAsSelf { - _p0 = 1 - } - r1, _, e1 := syscall.SyscallN(procOpenThreadToken.Addr(), uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func revertToSelf() (err error) { - r1, _, e1 := syscall.SyscallN(procRevertToSelf.Addr()) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func backupRead(h windows.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) { - var _p0 *byte - if len(b) > 0 { - _p0 = &b[0] - } - var _p1 uint32 - if abort { - _p1 = 1 - } - var _p2 uint32 - if processSecurity { - _p2 = 1 - } - r1, _, e1 := syscall.SyscallN(procBackupRead.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func backupWrite(h windows.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) { - var _p0 *byte - if len(b) > 0 { - _p0 = &b[0] - } - var _p1 uint32 - if abort { - _p1 = 1 - } - var _p2 uint32 - if processSecurity { - _p2 = 1 - } - r1, _, e1 := syscall.SyscallN(procBackupWrite.Addr(), uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func cancelIoEx(file windows.Handle, o *windows.Overlapped) (err error) { - r1, _, e1 := syscall.SyscallN(procCancelIoEx.Addr(), uintptr(file), uintptr(unsafe.Pointer(o))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func connectNamedPipe(pipe windows.Handle, o *windows.Overlapped) (err error) { - r1, _, e1 := syscall.SyscallN(procConnectNamedPipe.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(o))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func createIoCompletionPort(file windows.Handle, port windows.Handle, key uintptr, threadCount uint32) (newport windows.Handle, err error) { - r0, _, e1 := syscall.SyscallN(procCreateIoCompletionPort.Addr(), uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount)) - newport = windows.Handle(r0) - if newport == 0 { - err = errnoErr(e1) - } - return -} - -func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) { - var _p0 *uint16 - _p0, err = syscall.UTF16PtrFromString(name) - if err != nil { - return - } - return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa) -} - -func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *windows.SecurityAttributes) (handle windows.Handle, err error) { - r0, _, e1 := syscall.SyscallN(procCreateNamedPipeW.Addr(), uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa))) - handle = windows.Handle(r0) - if handle == windows.InvalidHandle { - err = errnoErr(e1) - } - return -} - -func disconnectNamedPipe(pipe windows.Handle) (err error) { - r1, _, e1 := syscall.SyscallN(procDisconnectNamedPipe.Addr(), uintptr(pipe)) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func getCurrentThread() (h windows.Handle) { - r0, _, _ := syscall.SyscallN(procGetCurrentThread.Addr()) - h = windows.Handle(r0) - return -} - -func getNamedPipeHandleState(pipe windows.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procGetNamedPipeHandleStateW.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize)) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func getNamedPipeInfo(pipe windows.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procGetNamedPipeInfo.Addr(), uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func getQueuedCompletionStatus(port windows.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) { - r1, _, e1 := syscall.SyscallN(procGetQueuedCompletionStatus.Addr(), uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout)) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func setFileCompletionNotificationModes(h windows.Handle, flags uint8) (err error) { - r1, _, e1 := syscall.SyscallN(procSetFileCompletionNotificationModes.Addr(), uintptr(h), uintptr(flags)) - if r1 == 0 { - err = errnoErr(e1) - } - return -} - -func ntCreateNamedPipeFile(pipe *windows.Handle, access ntAccessMask, oa *objectAttributes, iosb *ioStatusBlock, share ntFileShareMode, disposition ntFileCreationDisposition, options ntFileOptions, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) { - r0, _, _ := syscall.SyscallN(procNtCreateNamedPipeFile.Addr(), uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout))) - status = ntStatus(r0) - return -} - -func rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) { - r0, _, _ := syscall.SyscallN(procRtlDefaultNpAcl.Addr(), uintptr(unsafe.Pointer(dacl))) - status = ntStatus(r0) - return -} - -func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) { - r0, _, _ := syscall.SyscallN(procRtlDosPathNameToNtPathName_U.Addr(), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved)) - status = ntStatus(r0) - return -} - -func rtlNtStatusToDosError(status ntStatus) (winerr error) { - r0, _, _ := syscall.SyscallN(procRtlNtStatusToDosErrorNoTeb.Addr(), uintptr(status)) - if r0 != 0 { - winerr = syscall.Errno(r0) - } - return -} - -func wsaGetOverlappedResult(h windows.Handle, o *windows.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) { - var _p0 uint32 - if wait { - _p0 = 1 - } - r1, _, e1 := syscall.SyscallN(procWSAGetOverlappedResult.Addr(), uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags))) - if r1 == 0 { - err = errnoErr(e1) - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/NOTICE.txt b/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt deleted file mode 100644 index 899129ecc4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/NOTICE.txt +++ /dev/null @@ -1,3 +0,0 @@ -AWS SDK for Go -Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. -Copyright 2014-2015 Stripe, Inc. diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go deleted file mode 100644 index 6504a21864..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/accountid_endpoint_mode.go +++ /dev/null @@ -1,18 +0,0 @@ -package aws - -// AccountIDEndpointMode controls how a resolved AWS account ID is handled for endpoint routing. -type AccountIDEndpointMode string - -const ( - // AccountIDEndpointModeUnset indicates the AWS account ID will not be used for endpoint routing - AccountIDEndpointModeUnset AccountIDEndpointMode = "" - - // AccountIDEndpointModePreferred indicates the AWS account ID will be used for endpoint routing if present - AccountIDEndpointModePreferred = "preferred" - - // AccountIDEndpointModeRequired indicates an error will be returned if the AWS account ID is not resolved from identity - AccountIDEndpointModeRequired = "required" - - // AccountIDEndpointModeDisabled indicates the AWS account ID will be ignored during endpoint routing - AccountIDEndpointModeDisabled = "disabled" -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go deleted file mode 100644 index 4152caade1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/checksum.go +++ /dev/null @@ -1,33 +0,0 @@ -package aws - -// RequestChecksumCalculation controls request checksum calculation workflow -type RequestChecksumCalculation int - -const ( - // RequestChecksumCalculationUnset is the unset value for RequestChecksumCalculation - RequestChecksumCalculationUnset RequestChecksumCalculation = iota - - // RequestChecksumCalculationWhenSupported indicates request checksum will be calculated - // if the operation supports input checksums - RequestChecksumCalculationWhenSupported - - // RequestChecksumCalculationWhenRequired indicates request checksum will be calculated - // if required by the operation or if user elects to set a checksum algorithm in request - RequestChecksumCalculationWhenRequired -) - -// ResponseChecksumValidation controls response checksum validation workflow -type ResponseChecksumValidation int - -const ( - // ResponseChecksumValidationUnset is the unset value for ResponseChecksumValidation - ResponseChecksumValidationUnset ResponseChecksumValidation = iota - - // ResponseChecksumValidationWhenSupported indicates response checksum will be validated - // if the operation supports output checksums - ResponseChecksumValidationWhenSupported - - // ResponseChecksumValidationWhenRequired indicates response checksum will only - // be validated if the operation requires output checksum validation - ResponseChecksumValidationWhenRequired -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go deleted file mode 100644 index 3219517dab..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/config.go +++ /dev/null @@ -1,250 +0,0 @@ -package aws - -import ( - "net/http" - - smithybearer "github.com/aws/smithy-go/auth/bearer" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// HTTPClient provides the interface to provide custom HTTPClients. Generally -// *http.Client is sufficient for most use cases. The HTTPClient should not -// follow 301 or 302 redirects. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// A Config provides service configuration for service clients. -type Config struct { - // The region to send requests to. This parameter is required and must - // be configured globally or on a per-client basis unless otherwise - // noted. A full list of regions is found in the "Regions and Endpoints" - // document. - // - // See http://docs.aws.amazon.com/general/latest/gr/rande.html for - // information on AWS regions. - Region string - - // The credentials object to use when signing requests. - // Use the LoadDefaultConfig to load configuration from all the SDK's supported - // sources, and resolve credentials using the SDK's default credential chain. - Credentials CredentialsProvider - - // The Bearer Authentication token provider to use for authenticating API - // operation calls with a Bearer Authentication token. The API clients and - // operation must support Bearer Authentication scheme in order for the - // token provider to be used. API clients created with NewFromConfig will - // automatically be configured with this option, if the API client support - // Bearer Authentication. - // - // The SDK's config.LoadDefaultConfig can automatically populate this - // option for external configuration options such as SSO session. - // https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html - BearerAuthTokenProvider smithybearer.TokenProvider - - // The HTTP Client the SDK's API clients will use to invoke HTTP requests. - // The SDK defaults to a BuildableClient allowing API clients to create - // copies of the HTTP Client for service specific customizations. - // - // Use a (*http.Client) for custom behavior. Using a custom http.Client - // will prevent the SDK from modifying the HTTP client. - HTTPClient HTTPClient - - // An endpoint resolver that can be used to provide or override an endpoint - // for the given service and region. - // - // See the `aws.EndpointResolver` documentation for additional usage - // information. - // - // Deprecated: See Config.EndpointResolverWithOptions - EndpointResolver EndpointResolver - - // An endpoint resolver that can be used to provide or override an endpoint - // for the given service and region. - // - // When EndpointResolverWithOptions is specified, it will be used by a - // service client rather than using EndpointResolver if also specified. - // - // See the `aws.EndpointResolverWithOptions` documentation for additional - // usage information. - // - // Deprecated: with the release of endpoint resolution v2 in API clients, - // EndpointResolver and EndpointResolverWithOptions are deprecated. - // Providing a value for this field will likely prevent you from using - // newer endpoint-related service features. See API client options - // EndpointResolverV2 and BaseEndpoint. - EndpointResolverWithOptions EndpointResolverWithOptions - - // RetryMaxAttempts specifies the maximum number attempts an API client - // will call an operation that fails with a retryable error. - // - // API Clients will only use this value to construct a retryer if the - // Config.Retryer member is not nil. This value will be ignored if - // Retryer is not nil. - RetryMaxAttempts int - - // RetryMode specifies the retry model the API client will be created with. - // - // API Clients will only use this value to construct a retryer if the - // Config.Retryer member is not nil. This value will be ignored if - // Retryer is not nil. - RetryMode RetryMode - - // Retryer is a function that provides a Retryer implementation. A Retryer - // guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. - // - // In general, the provider function should return a new instance of a - // Retryer if you are attempting to provide a consistent Retryer - // configuration across all clients. This will ensure that each client will - // be provided a new instance of the Retryer implementation, and will avoid - // issues such as sharing the same retry token bucket across services. - // - // If not nil, RetryMaxAttempts, and RetryMode will be ignored by API - // clients. - Retryer func() Retryer - - // ConfigSources are the sources that were used to construct the Config. - // Allows for additional configuration to be loaded by clients. - ConfigSources []interface{} - - // APIOptions provides the set of middleware mutations modify how the API - // client requests will be handled. This is useful for adding additional - // tracing data to a request, or changing behavior of the SDK's client. - APIOptions []func(*middleware.Stack) error - - // The logger writer interface to write logging messages to. Defaults to - // standard error. - Logger logging.Logger - - // Configures the events that will be sent to the configured logger. This - // can be used to configure the logging of signing, retries, request, and - // responses of the SDK clients. - // - // See the ClientLogMode type documentation for the complete set of logging - // modes and available configuration. - ClientLogMode ClientLogMode - - // The configured DefaultsMode. If not specified, service clients will - // default to legacy. - // - // Supported modes are: auto, cross-region, in-region, legacy, mobile, - // standard - DefaultsMode DefaultsMode - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode - // is set to DefaultsModeAuto and is initialized by - // `config.LoadDefaultConfig`. You should not populate this structure - // programmatically, or rely on the values here within your applications. - RuntimeEnvironment RuntimeEnvironment - - // AppId is an optional application specific identifier that can be set. - // When set it will be appended to the User-Agent header of every request - // in the form of App/{AppId}. This variable is sourced from environment - // variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id. - // See https://docs.aws.amazon.com/sdkref/latest/guide/settings-reference.html for - // more information on environment variables and shared config settings. - AppID string - - // BaseEndpoint is an intermediary transfer location to a service specific - // BaseEndpoint on a service's Options. - BaseEndpoint *string - - // DisableRequestCompression toggles if an operation request could be - // compressed or not. Will be set to false by default. This variable is sourced from - // environment variable AWS_DISABLE_REQUEST_COMPRESSION or the shared config profile attribute - // disable_request_compression - DisableRequestCompression bool - - // RequestMinCompressSizeBytes sets the inclusive min bytes of a request body that could be - // compressed. Will be set to 10240 by default and must be within 0 and 10485760 bytes inclusively. - // This variable is sourced from environment variable AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES or - // the shared config profile attribute request_min_compression_size_bytes - RequestMinCompressSizeBytes int64 - - // Controls how a resolved AWS account ID is handled for endpoint routing. - AccountIDEndpointMode AccountIDEndpointMode - - // RequestChecksumCalculation determines when request checksum calculation is performed. - // - // There are two possible values for this setting: - // - // 1. RequestChecksumCalculationWhenSupported (default): The checksum is always calculated - // if the operation supports it, regardless of whether the user sets an algorithm in the request. - // - // 2. RequestChecksumCalculationWhenRequired: The checksum is only calculated if the user - // explicitly sets a checksum algorithm in the request. - // - // This setting is sourced from the environment variable AWS_REQUEST_CHECKSUM_CALCULATION - // or the shared config profile attribute "request_checksum_calculation". - RequestChecksumCalculation RequestChecksumCalculation - - // ResponseChecksumValidation determines when response checksum validation is performed - // - // There are two possible values for this setting: - // - // 1. ResponseChecksumValidationWhenSupported (default): The checksum is always validated - // if the operation supports it, regardless of whether the user sets the validation mode to ENABLED in request. - // - // 2. ResponseChecksumValidationWhenRequired: The checksum is only validated if the user - // explicitly sets the validation mode to ENABLED in the request - // This variable is sourced from environment variable AWS_RESPONSE_CHECKSUM_VALIDATION or - // the shared config profile attribute "response_checksum_validation". - ResponseChecksumValidation ResponseChecksumValidation - - // Registry of HTTP interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // Priority list of preferred auth scheme IDs. - AuthSchemePreference []string - - // ServiceOptions provides service specific configuration options that will be applied - // when constructing clients for specific services. Each callback function receives the service ID - // and the service's Options struct, allowing for dynamic configuration based on the service. - ServiceOptions []func(string, any) -} - -// NewConfig returns a new Config pointer that can be chained with builder -// methods to set multiple configuration values inline without using pointers. -func NewConfig() *Config { - return &Config{} -} - -// Copy will return a shallow copy of the Config object. -func (c Config) Copy() Config { - cp := c - return cp -} - -// EndpointDiscoveryEnableState indicates if endpoint discovery is -// enabled, disabled, auto or unset state. -// -// Default behavior (Auto or Unset) indicates operations that require endpoint -// discovery will use Endpoint Discovery by default. Operations that -// optionally use Endpoint Discovery will not use Endpoint Discovery -// unless EndpointDiscovery is explicitly enabled. -type EndpointDiscoveryEnableState uint - -// Enumeration values for EndpointDiscoveryEnableState -const ( - // EndpointDiscoveryUnset represents EndpointDiscoveryEnableState is unset. - // Users do not need to use this value explicitly. The behavior for unset - // is the same as for EndpointDiscoveryAuto. - EndpointDiscoveryUnset EndpointDiscoveryEnableState = iota - - // EndpointDiscoveryAuto represents an AUTO state that allows endpoint - // discovery only when required by the api. This is the default - // configuration resolved by the client if endpoint discovery is neither - // enabled or disabled. - EndpointDiscoveryAuto // default state - - // EndpointDiscoveryDisabled indicates client MUST not perform endpoint - // discovery even when required. - EndpointDiscoveryDisabled - - // EndpointDiscoveryEnabled indicates client MUST always perform endpoint - // discovery if supported for the operation. - EndpointDiscoveryEnabled -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go deleted file mode 100644 index 4d8e26ef32..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/context.go +++ /dev/null @@ -1,22 +0,0 @@ -package aws - -import ( - "context" - "time" -) - -type suppressedContext struct { - context.Context -} - -func (s *suppressedContext) Deadline() (deadline time.Time, ok bool) { - return time.Time{}, false -} - -func (s *suppressedContext) Done() <-chan struct{} { - return nil -} - -func (s *suppressedContext) Err() error { - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go deleted file mode 100644 index 623890e8d8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credential_cache.go +++ /dev/null @@ -1,235 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "sync/atomic" - "time" - - sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/sync/singleflight" -) - -// CredentialsCacheOptions are the options -type CredentialsCacheOptions struct { - - // ExpiryWindow will allow the credentials to trigger refreshing prior to - // the credentials actually expiring. This is beneficial so race conditions - // with expiring credentials do not cause request to fail unexpectedly - // due to ExpiredTokenException exceptions. - // - // An ExpiryWindow of 10s would cause calls to IsExpired() to return true - // 10 seconds before the credentials are actually expired. This can cause an - // increased number of requests to refresh the credentials to occur. - // - // If ExpiryWindow is 0 or less it will be ignored. - ExpiryWindow time.Duration - - // ExpiryWindowJitterFrac provides a mechanism for randomizing the - // expiration of credentials within the configured ExpiryWindow by a random - // percentage. Valid values are between 0.0 and 1.0. - // - // As an example if ExpiryWindow is 60 seconds and ExpiryWindowJitterFrac - // is 0.5 then credentials will be set to expire between 30 to 60 seconds - // prior to their actual expiration time. - // - // If ExpiryWindow is 0 or less then ExpiryWindowJitterFrac is ignored. - // If ExpiryWindowJitterFrac is 0 then no randomization will be applied to the window. - // If ExpiryWindowJitterFrac < 0 the value will be treated as 0. - // If ExpiryWindowJitterFrac > 1 the value will be treated as 1. - ExpiryWindowJitterFrac float64 -} - -// CredentialsCache provides caching and concurrency safe credentials retrieval -// via the provider's retrieve method. -// -// CredentialsCache will look for optional interfaces on the Provider to adjust -// how the credential cache handles credentials caching. -// -// - HandleFailRefreshCredentialsCacheStrategy - Allows provider to handle -// credential refresh failures. This could return an updated Credentials -// value, or attempt another means of retrieving credentials. -// -// - AdjustExpiresByCredentialsCacheStrategy - Allows provider to adjust how -// credentials Expires is modified. This could modify how the Credentials -// Expires is adjusted based on the CredentialsCache ExpiryWindow option. -// Such as providing a floor not to reduce the Expires below. -type CredentialsCache struct { - provider CredentialsProvider - - options CredentialsCacheOptions - creds atomic.Value - sf singleflight.Group -} - -// NewCredentialsCache returns a CredentialsCache that wraps provider. Provider -// is expected to not be nil. A variadic list of one or more functions can be -// provided to modify the CredentialsCache configuration. This allows for -// configuration of credential expiry window and jitter. -func NewCredentialsCache(provider CredentialsProvider, optFns ...func(options *CredentialsCacheOptions)) *CredentialsCache { - options := CredentialsCacheOptions{} - - for _, fn := range optFns { - fn(&options) - } - - if options.ExpiryWindow < 0 { - options.ExpiryWindow = 0 - } - - if options.ExpiryWindowJitterFrac < 0 { - options.ExpiryWindowJitterFrac = 0 - } else if options.ExpiryWindowJitterFrac > 1 { - options.ExpiryWindowJitterFrac = 1 - } - - return &CredentialsCache{ - provider: provider, - options: options, - } -} - -// Retrieve returns the credentials. If the credentials have already been -// retrieved, and not expired the cached credentials will be returned. If the -// credentials have not been retrieved yet, or expired the provider's Retrieve -// method will be called. -// -// Returns and error if the provider's retrieve method returns an error. -func (p *CredentialsCache) Retrieve(ctx context.Context) (Credentials, error) { - if creds, ok := p.getCreds(); ok && !creds.Expired() { - return creds, nil - } - - resCh := p.sf.DoChan("", func() (interface{}, error) { - return p.singleRetrieve(&suppressedContext{ctx}) - }) - select { - case res := <-resCh: - return res.Val.(Credentials), res.Err - case <-ctx.Done(): - return Credentials{}, &RequestCanceledError{Err: ctx.Err()} - } -} - -func (p *CredentialsCache) singleRetrieve(ctx context.Context) (interface{}, error) { - currCreds, ok := p.getCreds() - if ok && !currCreds.Expired() { - return currCreds, nil - } - - newCreds, err := p.provider.Retrieve(ctx) - if err != nil { - handleFailToRefresh := defaultHandleFailToRefresh - if cs, ok := p.provider.(HandleFailRefreshCredentialsCacheStrategy); ok { - handleFailToRefresh = cs.HandleFailToRefresh - } - newCreds, err = handleFailToRefresh(ctx, currCreds, err) - if err != nil { - return Credentials{}, fmt.Errorf("failed to refresh cached credentials, %w", err) - } - } - - if newCreds.CanExpire && p.options.ExpiryWindow > 0 { - adjustExpiresBy := defaultAdjustExpiresBy - if cs, ok := p.provider.(AdjustExpiresByCredentialsCacheStrategy); ok { - adjustExpiresBy = cs.AdjustExpiresBy - } - - randFloat64, err := sdkrand.CryptoRandFloat64() - if err != nil { - return Credentials{}, fmt.Errorf("failed to get random provider, %w", err) - } - - var jitter time.Duration - if p.options.ExpiryWindowJitterFrac > 0 { - jitter = time.Duration(randFloat64 * - p.options.ExpiryWindowJitterFrac * float64(p.options.ExpiryWindow)) - } - - newCreds, err = adjustExpiresBy(newCreds, -(p.options.ExpiryWindow - jitter)) - if err != nil { - return Credentials{}, fmt.Errorf("failed to adjust credentials expires, %w", err) - } - } - - p.creds.Store(&newCreds) - return newCreds, nil -} - -// getCreds returns the currently stored credentials and true. Returning false -// if no credentials were stored. -func (p *CredentialsCache) getCreds() (Credentials, bool) { - v := p.creds.Load() - if v == nil { - return Credentials{}, false - } - - c := v.(*Credentials) - if c == nil || !c.HasKeys() { - return Credentials{}, false - } - - return *c, true -} - -// ProviderSources returns a list of where the underlying credential provider -// has been sourced, if available. Returns empty if the provider doesn't implement -// the interface -func (p *CredentialsCache) ProviderSources() []CredentialSource { - asSource, ok := p.provider.(CredentialProviderSource) - if !ok { - return []CredentialSource{} - } - return asSource.ProviderSources() -} - -// Invalidate will invalidate the cached credentials. The next call to Retrieve -// will cause the provider's Retrieve method to be called. -func (p *CredentialsCache) Invalidate() { - p.creds.Store((*Credentials)(nil)) -} - -// IsCredentialsProvider returns whether credential provider wrapped by CredentialsCache -// matches the target provider type. -func (p *CredentialsCache) IsCredentialsProvider(target CredentialsProvider) bool { - return IsCredentialsProvider(p.provider, target) -} - -// HandleFailRefreshCredentialsCacheStrategy is an interface for -// CredentialsCache to allow CredentialsProvider how failed to refresh -// credentials is handled. -type HandleFailRefreshCredentialsCacheStrategy interface { - // Given the previously cached Credentials, if any, and refresh error, may - // returns new or modified set of Credentials, or error. - // - // Credential caches may use default implementation if nil. - HandleFailToRefresh(context.Context, Credentials, error) (Credentials, error) -} - -// defaultHandleFailToRefresh returns the passed in error. -func defaultHandleFailToRefresh(ctx context.Context, _ Credentials, err error) (Credentials, error) { - return Credentials{}, err -} - -// AdjustExpiresByCredentialsCacheStrategy is an interface for CredentialCache -// to allow CredentialsProvider to intercept adjustments to Credentials expiry -// based on expectations and use cases of CredentialsProvider. -// -// Credential caches may use default implementation if nil. -type AdjustExpiresByCredentialsCacheStrategy interface { - // Given a Credentials as input, applying any mutations and - // returning the potentially updated Credentials, or error. - AdjustExpiresBy(Credentials, time.Duration) (Credentials, error) -} - -// defaultAdjustExpiresBy adds the duration to the passed in credentials Expires, -// and returns the updated credentials value. If Credentials value's CanExpire -// is false, the passed in credentials are returned unchanged. -func defaultAdjustExpiresBy(creds Credentials, dur time.Duration) (Credentials, error) { - if !creds.CanExpire { - return creds, nil - } - - creds.Expires = creds.Expires.Add(dur) - return creds, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go deleted file mode 100644 index 4ad2ee4405..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/credentials.go +++ /dev/null @@ -1,230 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "reflect" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -// AnonymousCredentials provides a sentinel CredentialsProvider that should be -// used to instruct the SDK's signing middleware to not sign the request. -// -// Using `nil` credentials when configuring an API client will achieve the same -// result. The AnonymousCredentials type allows you to configure the SDK's -// external config loading to not attempt to source credentials from the shared -// config or environment. -// -// For example you can use this CredentialsProvider with an API client's -// Options to instruct the client not to sign a request for accessing public -// S3 bucket objects. -// -// The following example demonstrates using the AnonymousCredentials to prevent -// SDK's external config loading attempt to resolve credentials. -// -// cfg, err := config.LoadDefaultConfig(context.TODO(), -// config.WithCredentialsProvider(aws.AnonymousCredentials{}), -// ) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } -// -// client := s3.NewFromConfig(cfg) -// -// Alternatively you can leave the API client Option's `Credential` member to -// nil. If using the `NewFromConfig` constructor you'll need to explicitly set -// the `Credentials` member to nil, if the external config resolved a -// credential provider. -// -// client := s3.New(s3.Options{ -// // Credentials defaults to a nil value. -// }) -// -// This can also be configured for specific operations calls too. -// -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// log.Fatalf("failed to load config, %v", err) -// } -// -// client := s3.NewFromConfig(config) -// -// result, err := client.GetObject(context.TODO(), s3.GetObject{ -// Bucket: aws.String("example-bucket"), -// Key: aws.String("example-key"), -// }, func(o *s3.Options) { -// o.Credentials = nil -// // Or -// o.Credentials = aws.AnonymousCredentials{} -// }) -type AnonymousCredentials struct{} - -// Retrieve implements the CredentialsProvider interface, but will always -// return error, and cannot be used to sign a request. The AnonymousCredentials -// type is used as a sentinel type instructing the AWS request signing -// middleware to not sign a request. -func (AnonymousCredentials) Retrieve(context.Context) (Credentials, error) { - return Credentials{Source: "AnonymousCredentials"}, - fmt.Errorf("the AnonymousCredentials is not a valid credential provider, and cannot be used to sign AWS requests with") -} - -// CredentialSource is the source of the credential provider. -// A provider can have multiple credential sources: For example, a provider that reads a profile, calls ECS to -// get credentials and then assumes a role using STS will have all these as part of its provider chain. -type CredentialSource int - -const ( - // CredentialSourceUndefined is the sentinel zero value - CredentialSourceUndefined CredentialSource = iota - // CredentialSourceCode credentials resolved from code, cli parameters, session object, or client instance - CredentialSourceCode - // CredentialSourceEnvVars credentials resolved from environment variables - CredentialSourceEnvVars - // CredentialSourceEnvVarsSTSWebIDToken credentials resolved from environment variables for assuming a role with STS using a web identity token - CredentialSourceEnvVarsSTSWebIDToken - // CredentialSourceSTSAssumeRole credentials resolved from STS using AssumeRole - CredentialSourceSTSAssumeRole - // CredentialSourceSTSAssumeRoleSaml credentials resolved from STS using assume role with SAML - CredentialSourceSTSAssumeRoleSaml - // CredentialSourceSTSAssumeRoleWebID credentials resolved from STS using assume role with web identity - CredentialSourceSTSAssumeRoleWebID - // CredentialSourceSTSFederationToken credentials resolved from STS using a federation token - CredentialSourceSTSFederationToken - // CredentialSourceSTSSessionToken credentials resolved from STS using a session token S - CredentialSourceSTSSessionToken - // CredentialSourceProfile credentials resolved from a config file(s) profile with static credentials - CredentialSourceProfile - // CredentialSourceProfileSourceProfile credentials resolved from a source profile in a config file(s) profile - CredentialSourceProfileSourceProfile - // CredentialSourceProfileNamedProvider credentials resolved from a named provider in a config file(s) profile (like EcsContainer) - CredentialSourceProfileNamedProvider - // CredentialSourceProfileSTSWebIDToken credentials resolved from configuration for assuming a role with STS using web identity token in a config file(s) profile - CredentialSourceProfileSTSWebIDToken - // CredentialSourceProfileSSO credentials resolved from an SSO session in a config file(s) profile - CredentialSourceProfileSSO - // CredentialSourceSSO credentials resolved from an SSO session - CredentialSourceSSO - // CredentialSourceProfileSSOLegacy credentials resolved from an SSO session in a config file(s) profile using legacy format - CredentialSourceProfileSSOLegacy - // CredentialSourceSSOLegacy credentials resolved from an SSO session using legacy format - CredentialSourceSSOLegacy - // CredentialSourceProfileProcess credentials resolved from a process in a config file(s) profile - CredentialSourceProfileProcess - // CredentialSourceProcess credentials resolved from a process - CredentialSourceProcess - // CredentialSourceHTTP credentials resolved from an HTTP endpoint - CredentialSourceHTTP - // CredentialSourceIMDS credentials resolved from the instance metadata service (IMDS) - CredentialSourceIMDS -) - -// A Credentials is the AWS credentials value for individual credential fields. -type Credentials struct { - // AWS Access key ID - AccessKeyID string - - // AWS Secret Access Key - SecretAccessKey string - - // AWS Session Token - SessionToken string - - // Source of the credentials - Source string - - // States if the credentials can expire or not. - CanExpire bool - - // The time the credentials will expire at. Should be ignored if CanExpire - // is false. - Expires time.Time - - // The ID of the account for the credentials. - AccountID string -} - -// Expired returns if the credentials have expired. -func (v Credentials) Expired() bool { - if v.CanExpire { - // Calling Round(0) on the current time will truncate the monotonic - // reading only. Ensures credential expiry time is always based on - // reported wall-clock time. - return !v.Expires.After(sdk.NowTime().Round(0)) - } - - return false -} - -// HasKeys returns if the credentials keys are set. -func (v Credentials) HasKeys() bool { - return len(v.AccessKeyID) > 0 && len(v.SecretAccessKey) > 0 -} - -// A CredentialsProvider is the interface for any component which will provide -// credentials Credentials. A CredentialsProvider is required to manage its own -// Expired state, and what to be expired means. -// -// A credentials provider implementation can be wrapped with a CredentialCache -// to cache the credential value retrieved. Without the cache the SDK will -// attempt to retrieve the credentials for every request. -type CredentialsProvider interface { - // Retrieve returns nil if it successfully retrieved the value. - // Error is returned if the value were not obtainable, or empty. - Retrieve(ctx context.Context) (Credentials, error) -} - -// CredentialProviderSource allows any credential provider to track -// all providers where a credential provider were sourced. For example, if the credentials came from a -// call to a role specified in the profile, this method will give the whole breadcrumb trail -type CredentialProviderSource interface { - ProviderSources() []CredentialSource -} - -// CredentialsProviderFunc provides a helper wrapping a function value to -// satisfy the CredentialsProvider interface. -type CredentialsProviderFunc func(context.Context) (Credentials, error) - -// Retrieve delegates to the function value the CredentialsProviderFunc wraps. -func (fn CredentialsProviderFunc) Retrieve(ctx context.Context) (Credentials, error) { - return fn(ctx) -} - -type isCredentialsProvider interface { - IsCredentialsProvider(CredentialsProvider) bool -} - -// IsCredentialsProvider returns whether the target CredentialProvider is the same type as provider when comparing the -// implementation type. -// -// If provider has a method IsCredentialsProvider(CredentialsProvider) bool it will be responsible for validating -// whether target matches the credential provider type. -// -// When comparing the CredentialProvider implementations provider and target for equality, the following rules are used: -// -// If provider is of type T and target is of type V, true if type *T is the same as type *V, otherwise false -// If provider is of type *T and target is of type V, true if type *T is the same as type *V, otherwise false -// If provider is of type T and target is of type *V, true if type *T is the same as type *V, otherwise false -// If provider is of type *T and target is of type *V,true if type *T is the same as type *V, otherwise false -func IsCredentialsProvider(provider, target CredentialsProvider) bool { - if target == nil || provider == nil { - return provider == target - } - - if x, ok := provider.(isCredentialsProvider); ok { - return x.IsCredentialsProvider(target) - } - - targetType := reflect.TypeOf(target) - if targetType.Kind() != reflect.Ptr { - targetType = reflect.PtrTo(targetType) - } - - providerType := reflect.TypeOf(provider) - if providerType.Kind() != reflect.Ptr { - providerType = reflect.PtrTo(providerType) - } - - return targetType.AssignableTo(providerType) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go deleted file mode 100644 index fd408e5186..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/auto.go +++ /dev/null @@ -1,38 +0,0 @@ -package defaults - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - "runtime" - "strings" -) - -var getGOOS = func() string { - return runtime.GOOS -} - -// ResolveDefaultsModeAuto is used to determine the effective aws.DefaultsMode when the mode -// is set to aws.DefaultsModeAuto. -func ResolveDefaultsModeAuto(region string, environment aws.RuntimeEnvironment) aws.DefaultsMode { - goos := getGOOS() - if goos == "android" || goos == "ios" { - return aws.DefaultsModeMobile - } - - var currentRegion string - if len(environment.EnvironmentIdentifier) > 0 { - currentRegion = environment.Region - } - - if len(currentRegion) == 0 && len(environment.EC2InstanceMetadataRegion) > 0 { - currentRegion = environment.EC2InstanceMetadataRegion - } - - if len(region) > 0 && len(currentRegion) > 0 { - if strings.EqualFold(region, currentRegion) { - return aws.DefaultsModeInRegion - } - return aws.DefaultsModeCrossRegion - } - - return aws.DefaultsModeStandard -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go deleted file mode 100644 index 8b7e01fa29..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/configuration.go +++ /dev/null @@ -1,43 +0,0 @@ -package defaults - -import ( - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// Configuration is the set of SDK configuration options that are determined based -// on the configured DefaultsMode. -type Configuration struct { - // RetryMode is the configuration's default retry mode API clients should - // use for constructing a Retryer. - RetryMode aws.RetryMode - - // ConnectTimeout is the maximum amount of time a dial will wait for - // a connect to complete. - // - // See https://pkg.go.dev/net#Dialer.Timeout - ConnectTimeout *time.Duration - - // TLSNegotiationTimeout specifies the maximum amount of time waiting to - // wait for a TLS handshake. - // - // See https://pkg.go.dev/net/http#Transport.TLSHandshakeTimeout - TLSNegotiationTimeout *time.Duration -} - -// GetConnectTimeout returns the ConnectTimeout value, returns false if the value is not set. -func (c *Configuration) GetConnectTimeout() (time.Duration, bool) { - if c.ConnectTimeout == nil { - return 0, false - } - return *c.ConnectTimeout, true -} - -// GetTLSNegotiationTimeout returns the TLSNegotiationTimeout value, returns false if the value is not set. -func (c *Configuration) GetTLSNegotiationTimeout() (time.Duration, bool) { - if c.TLSNegotiationTimeout == nil { - return 0, false - } - return *c.TLSNegotiationTimeout, true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go deleted file mode 100644 index dbaa873dc8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/defaults.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsconfig. DO NOT EDIT. - -package defaults - -import ( - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "time" -) - -// GetModeConfiguration returns the default Configuration descriptor for the given mode. -// -// Supports the following modes: cross-region, in-region, mobile, standard -func GetModeConfiguration(mode aws.DefaultsMode) (Configuration, error) { - var mv aws.DefaultsMode - mv.SetFromString(string(mode)) - - switch mv { - case aws.DefaultsModeCrossRegion: - settings := Configuration{ - ConnectTimeout: aws.Duration(3100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeInRegion: - settings := Configuration{ - ConnectTimeout: aws.Duration(1100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(1100 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeMobile: - settings := Configuration{ - ConnectTimeout: aws.Duration(30000 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(30000 * time.Millisecond), - } - return settings, nil - case aws.DefaultsModeStandard: - settings := Configuration{ - ConnectTimeout: aws.Duration(3100 * time.Millisecond), - RetryMode: aws.RetryMode("standard"), - TLSNegotiationTimeout: aws.Duration(3100 * time.Millisecond), - } - return settings, nil - default: - return Configuration{}, fmt.Errorf("unsupported defaults mode: %v", mode) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go deleted file mode 100644 index 2d90011b42..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaults/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package defaults provides recommended configuration values for AWS SDKs and CLIs. -package defaults diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go deleted file mode 100644 index fcf9387c28..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/defaultsmode.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by github.com/aws/aws-sdk-go-v2/internal/codegen/cmd/defaultsmode. DO NOT EDIT. - -package aws - -import ( - "strings" -) - -// DefaultsMode is the SDK defaults mode setting. -type DefaultsMode string - -// The DefaultsMode constants. -const ( - // DefaultsModeAuto is an experimental mode that builds on the standard mode. - // The SDK will attempt to discover the execution environment to determine the - // appropriate settings automatically. - // - // Note that the auto detection is heuristics-based and does not guarantee 100% - // accuracy. STANDARD mode will be used if the execution environment cannot - // be determined. The auto detection might query EC2 Instance Metadata service - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html), - // which might introduce latency. Therefore we recommend choosing an explicit - // defaults_mode instead if startup latency is critical to your application - DefaultsModeAuto DefaultsMode = "auto" - - // DefaultsModeCrossRegion builds on the standard mode and includes optimization - // tailored for applications which call AWS services in a different region - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeCrossRegion DefaultsMode = "cross-region" - - // DefaultsModeInRegion builds on the standard mode and includes optimization - // tailored for applications which call AWS services from within the same AWS - // region - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeInRegion DefaultsMode = "in-region" - - // DefaultsModeLegacy provides default settings that vary per SDK and were used - // prior to establishment of defaults_mode - DefaultsModeLegacy DefaultsMode = "legacy" - - // DefaultsModeMobile builds on the standard mode and includes optimization - // tailored for mobile applications - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeMobile DefaultsMode = "mobile" - - // DefaultsModeStandard provides the latest recommended default values that - // should be safe to run in most scenarios - // - // Note that the default values vended from this mode might change as best practices - // may evolve. As a result, it is encouraged to perform tests when upgrading - // the SDK - DefaultsModeStandard DefaultsMode = "standard" -) - -// SetFromString sets the DefaultsMode value to one of the pre-defined constants that matches -// the provided string when compared using EqualFold. If the value does not match a known -// constant it will be set to as-is and the function will return false. As a special case, if the -// provided value is a zero-length string, the mode will be set to LegacyDefaultsMode. -func (d *DefaultsMode) SetFromString(v string) (ok bool) { - switch { - case strings.EqualFold(v, string(DefaultsModeAuto)): - *d = DefaultsModeAuto - ok = true - case strings.EqualFold(v, string(DefaultsModeCrossRegion)): - *d = DefaultsModeCrossRegion - ok = true - case strings.EqualFold(v, string(DefaultsModeInRegion)): - *d = DefaultsModeInRegion - ok = true - case strings.EqualFold(v, string(DefaultsModeLegacy)): - *d = DefaultsModeLegacy - ok = true - case strings.EqualFold(v, string(DefaultsModeMobile)): - *d = DefaultsModeMobile - ok = true - case strings.EqualFold(v, string(DefaultsModeStandard)): - *d = DefaultsModeStandard - ok = true - case len(v) == 0: - *d = DefaultsModeLegacy - ok = true - default: - *d = DefaultsMode(v) - } - return ok -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go deleted file mode 100644 index d8b6e09e59..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/doc.go +++ /dev/null @@ -1,62 +0,0 @@ -// Package aws provides the core SDK's utilities and shared types. Use this package's -// utilities to simplify setting and reading API operations parameters. -// -// # Value and Pointer Conversion Utilities -// -// This package includes a helper conversion utility for each scalar type the SDK's -// API use. These utilities make getting a pointer of the scalar, and dereferencing -// a pointer easier. -// -// Each conversion utility comes in two forms. Value to Pointer and Pointer to Value. -// The Pointer to value will safely dereference the pointer and return its value. -// If the pointer was nil, the scalar's zero value will be returned. -// -// The value to pointer functions will be named after the scalar type. So get a -// *string from a string value use the "String" function. This makes it easy to -// to get pointer of a literal string value, because getting the address of a -// literal requires assigning the value to a variable first. -// -// var strPtr *string -// -// // Without the SDK's conversion functions -// str := "my string" -// strPtr = &str -// -// // With the SDK's conversion functions -// strPtr = aws.String("my string") -// -// // Convert *string to string value -// str = aws.ToString(strPtr) -// -// In addition to scalars the aws package also includes conversion utilities for -// map and slice for commonly types used in API parameters. The map and slice -// conversion functions use similar naming pattern as the scalar conversion -// functions. -// -// var strPtrs []*string -// var strs []string = []string{"Go", "Gophers", "Go"} -// -// // Convert []string to []*string -// strPtrs = aws.StringSlice(strs) -// -// // Convert []*string to []string -// strs = aws.ToStringSlice(strPtrs) -// -// # SDK Default HTTP Client -// -// The SDK will use the http.DefaultClient if a HTTP client is not provided to -// the SDK's Session, or service client constructor. This means that if the -// http.DefaultClient is modified by other components of your application the -// modifications will be picked up by the SDK as well. -// -// In some cases this might be intended, but it is a better practice to create -// a custom HTTP Client to share explicitly through your application. You can -// configure the SDK to use the custom HTTP Client by setting the HTTPClient -// value of the SDK's Config type when creating a Session or service client. -package aws - -// generate.go uses a build tag of "ignore", go run doesn't need to specify -// this because go run ignores all build flags when running a go file directly. -//go:generate go run -tags codegen generate.go -//go:generate go run -tags codegen logging_generate.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go deleted file mode 100644 index 99edbf3ee6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/endpoints.go +++ /dev/null @@ -1,247 +0,0 @@ -package aws - -import ( - "fmt" -) - -// DualStackEndpointState is a constant to describe the dual-stack endpoint resolution behavior. -type DualStackEndpointState uint - -const ( - // DualStackEndpointStateUnset is the default value behavior for dual-stack endpoint resolution. - DualStackEndpointStateUnset DualStackEndpointState = iota - - // DualStackEndpointStateEnabled enables dual-stack endpoint resolution for service endpoints. - DualStackEndpointStateEnabled - - // DualStackEndpointStateDisabled disables dual-stack endpoint resolution for endpoints. - DualStackEndpointStateDisabled -) - -// GetUseDualStackEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value. -// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState. -func GetUseDualStackEndpoint(options ...interface{}) (value DualStackEndpointState, found bool) { - type iface interface { - GetUseDualStackEndpoint() DualStackEndpointState - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetUseDualStackEndpoint() - found = true - break - } - } - return value, found -} - -// FIPSEndpointState is a constant to describe the FIPS endpoint resolution behavior. -type FIPSEndpointState uint - -const ( - // FIPSEndpointStateUnset is the default value behavior for FIPS endpoint resolution. - FIPSEndpointStateUnset FIPSEndpointState = iota - - // FIPSEndpointStateEnabled enables FIPS endpoint resolution for service endpoints. - FIPSEndpointStateEnabled - - // FIPSEndpointStateDisabled disables FIPS endpoint resolution for endpoints. - FIPSEndpointStateDisabled -) - -// GetUseFIPSEndpoint takes a service's EndpointResolverOptions and returns the UseDualStackEndpoint value. -// Returns boolean false if the provided options does not have a method to retrieve the DualStackEndpointState. -func GetUseFIPSEndpoint(options ...interface{}) (value FIPSEndpointState, found bool) { - type iface interface { - GetUseFIPSEndpoint() FIPSEndpointState - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetUseFIPSEndpoint() - found = true - break - } - } - return value, found -} - -// Endpoint represents the endpoint a service client should make API operation -// calls to. -// -// The SDK will automatically resolve these endpoints per API client using an -// internal endpoint resolvers. If you'd like to provide custom endpoint -// resolving behavior you can implement the EndpointResolver interface. -// -// Deprecated: This structure was used with the global [EndpointResolver] -// interface, which has been deprecated in favor of service-specific endpoint -// resolution. See the deprecation docs on that interface for more information. -type Endpoint struct { - // The base URL endpoint the SDK API clients will use to make API calls to. - // The SDK will suffix URI path and query elements to this endpoint. - URL string - - // Specifies if the endpoint's hostname can be modified by the SDK's API - // client. - // - // If the hostname is mutable the SDK API clients may modify any part of - // the hostname based on the requirements of the API, (e.g. adding, or - // removing content in the hostname). Such as, Amazon S3 API client - // prefixing "bucketname" to the hostname, or changing the - // hostname service name component from "s3." to "s3-accesspoint.dualstack." - // for the dualstack endpoint of an S3 Accesspoint resource. - // - // Care should be taken when providing a custom endpoint for an API. If the - // endpoint hostname is mutable, and the client cannot modify the endpoint - // correctly, the operation call will most likely fail, or have undefined - // behavior. - // - // If hostname is immutable, the SDK API clients will not modify the - // hostname of the URL. This may cause the API client not to function - // correctly if the API requires the operation specific hostname values - // to be used by the client. - // - // This flag does not modify the API client's behavior if this endpoint - // will be used instead of Endpoint Discovery, or if the endpoint will be - // used to perform Endpoint Discovery. That behavior is configured via the - // API Client's Options. - HostnameImmutable bool - - // The AWS partition the endpoint belongs to. - PartitionID string - - // The service name that should be used for signing the requests to the - // endpoint. - SigningName string - - // The region that should be used for signing the request to the endpoint. - SigningRegion string - - // The signing method that should be used for signing the requests to the - // endpoint. - SigningMethod string - - // The source of the Endpoint. By default, this will be EndpointSourceServiceMetadata. - // When providing a custom endpoint, you should set the source as EndpointSourceCustom. - // If source is not provided when providing a custom endpoint, the SDK may not - // perform required host mutations correctly. Source should be used along with - // HostnameImmutable property as per the usage requirement. - Source EndpointSource -} - -// EndpointSource is the endpoint source type. -// -// Deprecated: The global [Endpoint] structure is deprecated. -type EndpointSource int - -const ( - // EndpointSourceServiceMetadata denotes service modeled endpoint metadata is used as Endpoint Source. - EndpointSourceServiceMetadata EndpointSource = iota - - // EndpointSourceCustom denotes endpoint is a custom endpoint. This source should be used when - // user provides a custom endpoint to be used by the SDK. - EndpointSourceCustom -) - -// EndpointNotFoundError is a sentinel error to indicate that the -// EndpointResolver implementation was unable to resolve an endpoint for the -// given service and region. Resolvers should use this to indicate that an API -// client should fallback and attempt to use it's internal default resolver to -// resolve the endpoint. -type EndpointNotFoundError struct { - Err error -} - -// Error is the error message. -func (e *EndpointNotFoundError) Error() string { - return fmt.Sprintf("endpoint not found, %v", e.Err) -} - -// Unwrap returns the underlying error. -func (e *EndpointNotFoundError) Unwrap() error { - return e.Err -} - -// EndpointResolver is an endpoint resolver that can be used to provide or -// override an endpoint for the given service and region. API clients will -// attempt to use the EndpointResolver first to resolve an endpoint if -// available. If the EndpointResolver returns an EndpointNotFoundError error, -// API clients will fallback to attempting to resolve the endpoint using its -// internal default endpoint resolver. -// -// Deprecated: The global endpoint resolution interface is deprecated. The API -// for endpoint resolution is now unique to each service and is set via the -// EndpointResolverV2 field on service client options. Setting a value for -// EndpointResolver on aws.Config or service client options will prevent you -// from using any endpoint-related service features released after the -// introduction of EndpointResolverV2. You may also encounter broken or -// unexpected behavior when using the old global interface with services that -// use many endpoint-related customizations such as S3. -type EndpointResolver interface { - ResolveEndpoint(service, region string) (Endpoint, error) -} - -// EndpointResolverFunc wraps a function to satisfy the EndpointResolver interface. -// -// Deprecated: The global endpoint resolution interface is deprecated. See -// deprecation docs on [EndpointResolver]. -type EndpointResolverFunc func(service, region string) (Endpoint, error) - -// ResolveEndpoint calls the wrapped function and returns the results. -func (e EndpointResolverFunc) ResolveEndpoint(service, region string) (Endpoint, error) { - return e(service, region) -} - -// EndpointResolverWithOptions is an endpoint resolver that can be used to provide or -// override an endpoint for the given service, region, and the service client's EndpointOptions. API clients will -// attempt to use the EndpointResolverWithOptions first to resolve an endpoint if -// available. If the EndpointResolverWithOptions returns an EndpointNotFoundError error, -// API clients will fallback to attempting to resolve the endpoint using its -// internal default endpoint resolver. -// -// Deprecated: The global endpoint resolution interface is deprecated. See -// deprecation docs on [EndpointResolver]. -type EndpointResolverWithOptions interface { - ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) -} - -// EndpointResolverWithOptionsFunc wraps a function to satisfy the EndpointResolverWithOptions interface. -// -// Deprecated: The global endpoint resolution interface is deprecated. See -// deprecation docs on [EndpointResolver]. -type EndpointResolverWithOptionsFunc func(service, region string, options ...interface{}) (Endpoint, error) - -// ResolveEndpoint calls the wrapped function and returns the results. -func (e EndpointResolverWithOptionsFunc) ResolveEndpoint(service, region string, options ...interface{}) (Endpoint, error) { - return e(service, region, options...) -} - -// GetDisableHTTPS takes a service's EndpointResolverOptions and returns the DisableHTTPS value. -// Returns boolean false if the provided options does not have a method to retrieve the DisableHTTPS. -func GetDisableHTTPS(options ...interface{}) (value bool, found bool) { - type iface interface { - GetDisableHTTPS() bool - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetDisableHTTPS() - found = true - break - } - } - return value, found -} - -// GetResolvedRegion takes a service's EndpointResolverOptions and returns the ResolvedRegion value. -// Returns boolean false if the provided options does not have a method to retrieve the ResolvedRegion. -func GetResolvedRegion(options ...interface{}) (value string, found bool) { - type iface interface { - GetResolvedRegion() string - } - for _, option := range options { - if i, ok := option.(iface); ok { - value = i.GetResolvedRegion() - found = true - break - } - } - return value, found -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go deleted file mode 100644 index f390a08f9f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/errors.go +++ /dev/null @@ -1,9 +0,0 @@ -package aws - -// MissingRegionError is an error that is returned if region configuration -// value was not found. -type MissingRegionError struct{} - -func (*MissingRegionError) Error() string { - return "an AWS region is required, but was not found" -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go deleted file mode 100644 index 2394418e9b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/from_ptr.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by aws/generate.go DO NOT EDIT. - -package aws - -import ( - "github.com/aws/smithy-go/ptr" - "time" -) - -// ToBool returns bool value dereferenced if the passed -// in pointer was not nil. Returns a bool zero value if the -// pointer was nil. -func ToBool(p *bool) (v bool) { - return ptr.ToBool(p) -} - -// ToBoolSlice returns a slice of bool values, that are -// dereferenced if the passed in pointer was not nil. Returns a bool -// zero value if the pointer was nil. -func ToBoolSlice(vs []*bool) []bool { - return ptr.ToBoolSlice(vs) -} - -// ToBoolMap returns a map of bool values, that are -// dereferenced if the passed in pointer was not nil. The bool -// zero value is used if the pointer was nil. -func ToBoolMap(vs map[string]*bool) map[string]bool { - return ptr.ToBoolMap(vs) -} - -// ToByte returns byte value dereferenced if the passed -// in pointer was not nil. Returns a byte zero value if the -// pointer was nil. -func ToByte(p *byte) (v byte) { - return ptr.ToByte(p) -} - -// ToByteSlice returns a slice of byte values, that are -// dereferenced if the passed in pointer was not nil. Returns a byte -// zero value if the pointer was nil. -func ToByteSlice(vs []*byte) []byte { - return ptr.ToByteSlice(vs) -} - -// ToByteMap returns a map of byte values, that are -// dereferenced if the passed in pointer was not nil. The byte -// zero value is used if the pointer was nil. -func ToByteMap(vs map[string]*byte) map[string]byte { - return ptr.ToByteMap(vs) -} - -// ToString returns string value dereferenced if the passed -// in pointer was not nil. Returns a string zero value if the -// pointer was nil. -func ToString(p *string) (v string) { - return ptr.ToString(p) -} - -// ToStringSlice returns a slice of string values, that are -// dereferenced if the passed in pointer was not nil. Returns a string -// zero value if the pointer was nil. -func ToStringSlice(vs []*string) []string { - return ptr.ToStringSlice(vs) -} - -// ToStringMap returns a map of string values, that are -// dereferenced if the passed in pointer was not nil. The string -// zero value is used if the pointer was nil. -func ToStringMap(vs map[string]*string) map[string]string { - return ptr.ToStringMap(vs) -} - -// ToInt returns int value dereferenced if the passed -// in pointer was not nil. Returns a int zero value if the -// pointer was nil. -func ToInt(p *int) (v int) { - return ptr.ToInt(p) -} - -// ToIntSlice returns a slice of int values, that are -// dereferenced if the passed in pointer was not nil. Returns a int -// zero value if the pointer was nil. -func ToIntSlice(vs []*int) []int { - return ptr.ToIntSlice(vs) -} - -// ToIntMap returns a map of int values, that are -// dereferenced if the passed in pointer was not nil. The int -// zero value is used if the pointer was nil. -func ToIntMap(vs map[string]*int) map[string]int { - return ptr.ToIntMap(vs) -} - -// ToInt8 returns int8 value dereferenced if the passed -// in pointer was not nil. Returns a int8 zero value if the -// pointer was nil. -func ToInt8(p *int8) (v int8) { - return ptr.ToInt8(p) -} - -// ToInt8Slice returns a slice of int8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int8 -// zero value if the pointer was nil. -func ToInt8Slice(vs []*int8) []int8 { - return ptr.ToInt8Slice(vs) -} - -// ToInt8Map returns a map of int8 values, that are -// dereferenced if the passed in pointer was not nil. The int8 -// zero value is used if the pointer was nil. -func ToInt8Map(vs map[string]*int8) map[string]int8 { - return ptr.ToInt8Map(vs) -} - -// ToInt16 returns int16 value dereferenced if the passed -// in pointer was not nil. Returns a int16 zero value if the -// pointer was nil. -func ToInt16(p *int16) (v int16) { - return ptr.ToInt16(p) -} - -// ToInt16Slice returns a slice of int16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int16 -// zero value if the pointer was nil. -func ToInt16Slice(vs []*int16) []int16 { - return ptr.ToInt16Slice(vs) -} - -// ToInt16Map returns a map of int16 values, that are -// dereferenced if the passed in pointer was not nil. The int16 -// zero value is used if the pointer was nil. -func ToInt16Map(vs map[string]*int16) map[string]int16 { - return ptr.ToInt16Map(vs) -} - -// ToInt32 returns int32 value dereferenced if the passed -// in pointer was not nil. Returns a int32 zero value if the -// pointer was nil. -func ToInt32(p *int32) (v int32) { - return ptr.ToInt32(p) -} - -// ToInt32Slice returns a slice of int32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int32 -// zero value if the pointer was nil. -func ToInt32Slice(vs []*int32) []int32 { - return ptr.ToInt32Slice(vs) -} - -// ToInt32Map returns a map of int32 values, that are -// dereferenced if the passed in pointer was not nil. The int32 -// zero value is used if the pointer was nil. -func ToInt32Map(vs map[string]*int32) map[string]int32 { - return ptr.ToInt32Map(vs) -} - -// ToInt64 returns int64 value dereferenced if the passed -// in pointer was not nil. Returns a int64 zero value if the -// pointer was nil. -func ToInt64(p *int64) (v int64) { - return ptr.ToInt64(p) -} - -// ToInt64Slice returns a slice of int64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int64 -// zero value if the pointer was nil. -func ToInt64Slice(vs []*int64) []int64 { - return ptr.ToInt64Slice(vs) -} - -// ToInt64Map returns a map of int64 values, that are -// dereferenced if the passed in pointer was not nil. The int64 -// zero value is used if the pointer was nil. -func ToInt64Map(vs map[string]*int64) map[string]int64 { - return ptr.ToInt64Map(vs) -} - -// ToUint returns uint value dereferenced if the passed -// in pointer was not nil. Returns a uint zero value if the -// pointer was nil. -func ToUint(p *uint) (v uint) { - return ptr.ToUint(p) -} - -// ToUintSlice returns a slice of uint values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint -// zero value if the pointer was nil. -func ToUintSlice(vs []*uint) []uint { - return ptr.ToUintSlice(vs) -} - -// ToUintMap returns a map of uint values, that are -// dereferenced if the passed in pointer was not nil. The uint -// zero value is used if the pointer was nil. -func ToUintMap(vs map[string]*uint) map[string]uint { - return ptr.ToUintMap(vs) -} - -// ToUint8 returns uint8 value dereferenced if the passed -// in pointer was not nil. Returns a uint8 zero value if the -// pointer was nil. -func ToUint8(p *uint8) (v uint8) { - return ptr.ToUint8(p) -} - -// ToUint8Slice returns a slice of uint8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint8 -// zero value if the pointer was nil. -func ToUint8Slice(vs []*uint8) []uint8 { - return ptr.ToUint8Slice(vs) -} - -// ToUint8Map returns a map of uint8 values, that are -// dereferenced if the passed in pointer was not nil. The uint8 -// zero value is used if the pointer was nil. -func ToUint8Map(vs map[string]*uint8) map[string]uint8 { - return ptr.ToUint8Map(vs) -} - -// ToUint16 returns uint16 value dereferenced if the passed -// in pointer was not nil. Returns a uint16 zero value if the -// pointer was nil. -func ToUint16(p *uint16) (v uint16) { - return ptr.ToUint16(p) -} - -// ToUint16Slice returns a slice of uint16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint16 -// zero value if the pointer was nil. -func ToUint16Slice(vs []*uint16) []uint16 { - return ptr.ToUint16Slice(vs) -} - -// ToUint16Map returns a map of uint16 values, that are -// dereferenced if the passed in pointer was not nil. The uint16 -// zero value is used if the pointer was nil. -func ToUint16Map(vs map[string]*uint16) map[string]uint16 { - return ptr.ToUint16Map(vs) -} - -// ToUint32 returns uint32 value dereferenced if the passed -// in pointer was not nil. Returns a uint32 zero value if the -// pointer was nil. -func ToUint32(p *uint32) (v uint32) { - return ptr.ToUint32(p) -} - -// ToUint32Slice returns a slice of uint32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint32 -// zero value if the pointer was nil. -func ToUint32Slice(vs []*uint32) []uint32 { - return ptr.ToUint32Slice(vs) -} - -// ToUint32Map returns a map of uint32 values, that are -// dereferenced if the passed in pointer was not nil. The uint32 -// zero value is used if the pointer was nil. -func ToUint32Map(vs map[string]*uint32) map[string]uint32 { - return ptr.ToUint32Map(vs) -} - -// ToUint64 returns uint64 value dereferenced if the passed -// in pointer was not nil. Returns a uint64 zero value if the -// pointer was nil. -func ToUint64(p *uint64) (v uint64) { - return ptr.ToUint64(p) -} - -// ToUint64Slice returns a slice of uint64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint64 -// zero value if the pointer was nil. -func ToUint64Slice(vs []*uint64) []uint64 { - return ptr.ToUint64Slice(vs) -} - -// ToUint64Map returns a map of uint64 values, that are -// dereferenced if the passed in pointer was not nil. The uint64 -// zero value is used if the pointer was nil. -func ToUint64Map(vs map[string]*uint64) map[string]uint64 { - return ptr.ToUint64Map(vs) -} - -// ToFloat32 returns float32 value dereferenced if the passed -// in pointer was not nil. Returns a float32 zero value if the -// pointer was nil. -func ToFloat32(p *float32) (v float32) { - return ptr.ToFloat32(p) -} - -// ToFloat32Slice returns a slice of float32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float32 -// zero value if the pointer was nil. -func ToFloat32Slice(vs []*float32) []float32 { - return ptr.ToFloat32Slice(vs) -} - -// ToFloat32Map returns a map of float32 values, that are -// dereferenced if the passed in pointer was not nil. The float32 -// zero value is used if the pointer was nil. -func ToFloat32Map(vs map[string]*float32) map[string]float32 { - return ptr.ToFloat32Map(vs) -} - -// ToFloat64 returns float64 value dereferenced if the passed -// in pointer was not nil. Returns a float64 zero value if the -// pointer was nil. -func ToFloat64(p *float64) (v float64) { - return ptr.ToFloat64(p) -} - -// ToFloat64Slice returns a slice of float64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float64 -// zero value if the pointer was nil. -func ToFloat64Slice(vs []*float64) []float64 { - return ptr.ToFloat64Slice(vs) -} - -// ToFloat64Map returns a map of float64 values, that are -// dereferenced if the passed in pointer was not nil. The float64 -// zero value is used if the pointer was nil. -func ToFloat64Map(vs map[string]*float64) map[string]float64 { - return ptr.ToFloat64Map(vs) -} - -// ToTime returns time.Time value dereferenced if the passed -// in pointer was not nil. Returns a time.Time zero value if the -// pointer was nil. -func ToTime(p *time.Time) (v time.Time) { - return ptr.ToTime(p) -} - -// ToTimeSlice returns a slice of time.Time values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Time -// zero value if the pointer was nil. -func ToTimeSlice(vs []*time.Time) []time.Time { - return ptr.ToTimeSlice(vs) -} - -// ToTimeMap returns a map of time.Time values, that are -// dereferenced if the passed in pointer was not nil. The time.Time -// zero value is used if the pointer was nil. -func ToTimeMap(vs map[string]*time.Time) map[string]time.Time { - return ptr.ToTimeMap(vs) -} - -// ToDuration returns time.Duration value dereferenced if the passed -// in pointer was not nil. Returns a time.Duration zero value if the -// pointer was nil. -func ToDuration(p *time.Duration) (v time.Duration) { - return ptr.ToDuration(p) -} - -// ToDurationSlice returns a slice of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Duration -// zero value if the pointer was nil. -func ToDurationSlice(vs []*time.Duration) []time.Duration { - return ptr.ToDurationSlice(vs) -} - -// ToDurationMap returns a map of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. The time.Duration -// zero value is used if the pointer was nil. -func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration { - return ptr.ToDurationMap(vs) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go deleted file mode 100644 index 1820ff0fba..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package aws - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.39.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go deleted file mode 100644 index 91c94d987b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by aws/logging_generate.go DO NOT EDIT. - -package aws - -// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where -// each bit is a flag that describes the logging behavior for one or more client components. -// The entire 64-bit group is reserved for later expansion by the SDK. -// -// Example: Setting ClientLogMode to enable logging of retries and requests -// -// clientLogMode := aws.LogRetries | aws.LogRequest -// -// Example: Adding an additional log mode to an existing ClientLogMode value -// -// clientLogMode |= aws.LogResponse -type ClientLogMode uint64 - -// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events. -const ( - LogSigning ClientLogMode = 1 << (64 - 1 - iota) - LogRetries - LogRequest - LogRequestWithBody - LogResponse - LogResponseWithBody - LogDeprecatedUsage - LogRequestEventMessage - LogResponseEventMessage -) - -// IsSigning returns whether the Signing logging mode bit is set -func (m ClientLogMode) IsSigning() bool { - return m&LogSigning != 0 -} - -// IsRetries returns whether the Retries logging mode bit is set -func (m ClientLogMode) IsRetries() bool { - return m&LogRetries != 0 -} - -// IsRequest returns whether the Request logging mode bit is set -func (m ClientLogMode) IsRequest() bool { - return m&LogRequest != 0 -} - -// IsRequestWithBody returns whether the RequestWithBody logging mode bit is set -func (m ClientLogMode) IsRequestWithBody() bool { - return m&LogRequestWithBody != 0 -} - -// IsResponse returns whether the Response logging mode bit is set -func (m ClientLogMode) IsResponse() bool { - return m&LogResponse != 0 -} - -// IsResponseWithBody returns whether the ResponseWithBody logging mode bit is set -func (m ClientLogMode) IsResponseWithBody() bool { - return m&LogResponseWithBody != 0 -} - -// IsDeprecatedUsage returns whether the DeprecatedUsage logging mode bit is set -func (m ClientLogMode) IsDeprecatedUsage() bool { - return m&LogDeprecatedUsage != 0 -} - -// IsRequestEventMessage returns whether the RequestEventMessage logging mode bit is set -func (m ClientLogMode) IsRequestEventMessage() bool { - return m&LogRequestEventMessage != 0 -} - -// IsResponseEventMessage returns whether the ResponseEventMessage logging mode bit is set -func (m ClientLogMode) IsResponseEventMessage() bool { - return m&LogResponseEventMessage != 0 -} - -// ClearSigning clears the Signing logging mode bit -func (m *ClientLogMode) ClearSigning() { - *m &^= LogSigning -} - -// ClearRetries clears the Retries logging mode bit -func (m *ClientLogMode) ClearRetries() { - *m &^= LogRetries -} - -// ClearRequest clears the Request logging mode bit -func (m *ClientLogMode) ClearRequest() { - *m &^= LogRequest -} - -// ClearRequestWithBody clears the RequestWithBody logging mode bit -func (m *ClientLogMode) ClearRequestWithBody() { - *m &^= LogRequestWithBody -} - -// ClearResponse clears the Response logging mode bit -func (m *ClientLogMode) ClearResponse() { - *m &^= LogResponse -} - -// ClearResponseWithBody clears the ResponseWithBody logging mode bit -func (m *ClientLogMode) ClearResponseWithBody() { - *m &^= LogResponseWithBody -} - -// ClearDeprecatedUsage clears the DeprecatedUsage logging mode bit -func (m *ClientLogMode) ClearDeprecatedUsage() { - *m &^= LogDeprecatedUsage -} - -// ClearRequestEventMessage clears the RequestEventMessage logging mode bit -func (m *ClientLogMode) ClearRequestEventMessage() { - *m &^= LogRequestEventMessage -} - -// ClearResponseEventMessage clears the ResponseEventMessage logging mode bit -func (m *ClientLogMode) ClearResponseEventMessage() { - *m &^= LogResponseEventMessage -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go deleted file mode 100644 index 6ecc2231a1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/logging_generate.go +++ /dev/null @@ -1,95 +0,0 @@ -//go:build clientlogmode -// +build clientlogmode - -package main - -import ( - "fmt" - "log" - "os" - "strings" - "text/template" -) - -var config = struct { - ModeBits []string -}{ - // Items should be appended only to keep bit-flag positions stable - ModeBits: []string{ - "Signing", - "Retries", - "Request", - "RequestWithBody", - "Response", - "ResponseWithBody", - "DeprecatedUsage", - "RequestEventMessage", - "ResponseEventMessage", - }, -} - -func bitName(name string) string { - return strings.ToUpper(name[:1]) + name[1:] -} - -var tmpl = template.Must(template.New("ClientLogMode").Funcs(map[string]interface{}{ - "symbolName": func(name string) string { - return "Log" + bitName(name) - }, - "bitName": bitName, -}).Parse(`// Code generated by aws/logging_generate.go DO NOT EDIT. - -package aws - -// ClientLogMode represents the logging mode of SDK clients. The client logging mode is a bit-field where -// each bit is a flag that describes the logging behavior for one or more client components. -// The entire 64-bit group is reserved for later expansion by the SDK. -// -// Example: Setting ClientLogMode to enable logging of retries and requests -// clientLogMode := aws.LogRetries | aws.LogRequest -// -// Example: Adding an additional log mode to an existing ClientLogMode value -// clientLogMode |= aws.LogResponse -type ClientLogMode uint64 - -// Supported ClientLogMode bits that can be configured to toggle logging of specific SDK events. -const ( -{{- range $index, $field := .ModeBits }} - {{ (symbolName $field) }}{{- if (eq 0 $index) }} ClientLogMode = 1 << (64 - 1 - iota){{- end }} -{{- end }} -) -{{ range $_, $field := .ModeBits }} -// Is{{- bitName $field }} returns whether the {{ bitName $field }} logging mode bit is set -func (m ClientLogMode) Is{{- bitName $field }}() bool { - return m&{{- (symbolName $field) }} != 0 -} -{{ end }} -{{- range $_, $field := .ModeBits }} -// Clear{{- bitName $field }} clears the {{ bitName $field }} logging mode bit -func (m *ClientLogMode) Clear{{- bitName $field }}() { - *m &^= {{ (symbolName $field) }} -} -{{ end -}} -`)) - -func main() { - uniqueBitFields := make(map[string]struct{}) - - for _, bitName := range config.ModeBits { - if _, ok := uniqueBitFields[strings.ToLower(bitName)]; ok { - panic(fmt.Sprintf("duplicate bit field: %s", bitName)) - } - uniqueBitFields[bitName] = struct{}{} - } - - file, err := os.Create("logging.go") - if err != nil { - log.Fatal(err) - } - defer file.Close() - - err = tmpl.Execute(file, config) - if err != nil { - log.Fatal(err) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go deleted file mode 100644 index d66f0960aa..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/metadata.go +++ /dev/null @@ -1,213 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/aws" - - "github.com/aws/smithy-go/middleware" -) - -// RegisterServiceMetadata registers metadata about the service and operation into the middleware context -// so that it is available at runtime for other middleware to introspect. -type RegisterServiceMetadata struct { - ServiceID string - SigningName string - Region string - OperationName string -} - -// ID returns the middleware identifier. -func (s *RegisterServiceMetadata) ID() string { - return "RegisterServiceMetadata" -} - -// HandleInitialize registers service metadata information into the middleware context, allowing for introspection. -func (s RegisterServiceMetadata) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) (out middleware.InitializeOutput, metadata middleware.Metadata, err error) { - if len(s.ServiceID) > 0 { - ctx = SetServiceID(ctx, s.ServiceID) - } - if len(s.SigningName) > 0 { - ctx = SetSigningName(ctx, s.SigningName) - } - if len(s.Region) > 0 { - ctx = setRegion(ctx, s.Region) - } - if len(s.OperationName) > 0 { - ctx = setOperationName(ctx, s.OperationName) - } - return next.HandleInitialize(ctx, in) -} - -// service metadata keys for storing and lookup of runtime stack information. -type ( - serviceIDKey struct{} - signingNameKey struct{} - signingRegionKey struct{} - regionKey struct{} - operationNameKey struct{} - partitionIDKey struct{} - requiresLegacyEndpointsKey struct{} -) - -// GetServiceID retrieves the service id from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetServiceID(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, serviceIDKey{}).(string) - return v -} - -// GetSigningName retrieves the service signing name from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. The resolved signing name is available -// in the signer properties object passed to the signer. -func GetSigningName(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, signingNameKey{}).(string) - return v -} - -// GetSigningRegion retrieves the region from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. The resolved signing region is available -// in the signer properties object passed to the signer. -func GetSigningRegion(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, signingRegionKey{}).(string) - return v -} - -// GetRegion retrieves the endpoint region from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetRegion(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, regionKey{}).(string) - return v -} - -// GetOperationName retrieves the service operation metadata from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetOperationName(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, operationNameKey{}).(string) - return v -} - -// GetPartitionID retrieves the endpoint partition id from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetPartitionID(ctx context.Context) string { - v, _ := middleware.GetStackValue(ctx, partitionIDKey{}).(string) - return v -} - -// GetRequiresLegacyEndpoints the flag used to indicate if legacy endpoint -// customizations need to be executed. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetRequiresLegacyEndpoints(ctx context.Context) bool { - v, _ := middleware.GetStackValue(ctx, requiresLegacyEndpointsKey{}).(bool) - return v -} - -// SetRequiresLegacyEndpoints set or modifies the flag indicated that -// legacy endpoint customizations are needed. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetRequiresLegacyEndpoints(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, requiresLegacyEndpointsKey{}, value) -} - -// SetSigningName set or modifies the sigv4 or sigv4a signing name on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. Use WithSigV4SigningName client option -// funcs instead. -func SetSigningName(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, signingNameKey{}, value) -} - -// SetSigningRegion sets or modifies the region on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -// -// Deprecated: This value is unstable. Use WithSigV4SigningRegion client option -// funcs instead. -func SetSigningRegion(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, signingRegionKey{}, value) -} - -// SetServiceID sets the service id on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetServiceID(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, serviceIDKey{}, value) -} - -// setRegion sets the endpoint region on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setRegion(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, regionKey{}, value) -} - -// setOperationName sets the service operation on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setOperationName(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, operationNameKey{}, value) -} - -// SetPartitionID sets the partition id of a resolved region on the context -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetPartitionID(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, partitionIDKey{}, value) -} - -// EndpointSource key -type endpointSourceKey struct{} - -// GetEndpointSource returns an endpoint source if set on context -func GetEndpointSource(ctx context.Context) (v aws.EndpointSource) { - v, _ = middleware.GetStackValue(ctx, endpointSourceKey{}).(aws.EndpointSource) - return v -} - -// SetEndpointSource sets endpoint source on context -func SetEndpointSource(ctx context.Context, value aws.EndpointSource) context.Context { - return middleware.WithStackValue(ctx, endpointSourceKey{}, value) -} - -type signingCredentialsKey struct{} - -// GetSigningCredentials returns the credentials that were used for signing if set on context. -func GetSigningCredentials(ctx context.Context) (v aws.Credentials) { - v, _ = middleware.GetStackValue(ctx, signingCredentialsKey{}).(aws.Credentials) - return v -} - -// SetSigningCredentials sets the credentails used for signing on the context. -func SetSigningCredentials(ctx context.Context, value aws.Credentials) context.Context { - return middleware.WithStackValue(ctx, signingCredentialsKey{}, value) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go deleted file mode 100644 index 6d5f0079c2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/middleware.go +++ /dev/null @@ -1,168 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ClientRequestID is a Smithy BuildMiddleware that will generate a unique ID for logical API operation -// invocation. -type ClientRequestID struct{} - -// ID the identifier for the ClientRequestID -func (r *ClientRequestID) ID() string { - return "ClientRequestID" -} - -// HandleBuild attaches a unique operation invocation id for the operation to the request -func (r ClientRequestID) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", req) - } - - invocationID, err := smithyrand.NewUUID(rand.Reader).GetUUID() - if err != nil { - return out, metadata, err - } - - const invocationIDHeader = "Amz-Sdk-Invocation-Id" - req.Header[invocationIDHeader] = append(req.Header[invocationIDHeader][:0], invocationID) - - return next.HandleBuild(ctx, in) -} - -// RecordResponseTiming records the response timing for the SDK client requests. -type RecordResponseTiming struct{} - -// ID is the middleware identifier -func (a *RecordResponseTiming) ID() string { - return "RecordResponseTiming" -} - -// HandleDeserialize calculates response metadata and clock skew -func (a RecordResponseTiming) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - responseAt := sdk.NowTime() - setResponseAt(&metadata, responseAt) - - var serverTime time.Time - - switch resp := out.RawResponse.(type) { - case *smithyhttp.Response: - respDateHeader := resp.Header.Get("Date") - if len(respDateHeader) == 0 { - break - } - var parseErr error - serverTime, parseErr = smithyhttp.ParseTime(respDateHeader) - if parseErr != nil { - logger := middleware.GetLogger(ctx) - logger.Logf(logging.Warn, "failed to parse response Date header value, got %v", - parseErr.Error()) - break - } - setServerTime(&metadata, serverTime) - } - - if !serverTime.IsZero() { - attemptSkew := serverTime.Sub(responseAt) - setAttemptSkew(&metadata, attemptSkew) - } - - return out, metadata, err -} - -type responseAtKey struct{} - -// GetResponseAt returns the time response was received at. -func GetResponseAt(metadata middleware.Metadata) (v time.Time, ok bool) { - v, ok = metadata.Get(responseAtKey{}).(time.Time) - return v, ok -} - -// setResponseAt sets the response time on the metadata. -func setResponseAt(metadata *middleware.Metadata, v time.Time) { - metadata.Set(responseAtKey{}, v) -} - -type serverTimeKey struct{} - -// GetServerTime returns the server time for response. -func GetServerTime(metadata middleware.Metadata) (v time.Time, ok bool) { - v, ok = metadata.Get(serverTimeKey{}).(time.Time) - return v, ok -} - -// setServerTime sets the server time on the metadata. -func setServerTime(metadata *middleware.Metadata, v time.Time) { - metadata.Set(serverTimeKey{}, v) -} - -type attemptSkewKey struct{} - -// GetAttemptSkew returns Attempt clock skew for response from metadata. -func GetAttemptSkew(metadata middleware.Metadata) (v time.Duration, ok bool) { - v, ok = metadata.Get(attemptSkewKey{}).(time.Duration) - return v, ok -} - -// setAttemptSkew sets the attempt clock skew on the metadata. -func setAttemptSkew(metadata *middleware.Metadata, v time.Duration) { - metadata.Set(attemptSkewKey{}, v) -} - -// AddClientRequestIDMiddleware adds ClientRequestID to the middleware stack -func AddClientRequestIDMiddleware(stack *middleware.Stack) error { - return stack.Build.Add(&ClientRequestID{}, middleware.After) -} - -// AddRecordResponseTiming adds RecordResponseTiming middleware to the -// middleware stack. -func AddRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&RecordResponseTiming{}, middleware.After) -} - -// rawResponseKey is the accessor key used to store and access the -// raw response within the response metadata. -type rawResponseKey struct{} - -// AddRawResponse middleware adds raw response on to the metadata -type AddRawResponse struct{} - -// ID the identifier for the ClientRequestID -func (m *AddRawResponse) ID() string { - return "AddRawResponseToMetadata" -} - -// HandleDeserialize adds raw response on the middleware metadata -func (m AddRawResponse) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - metadata.Set(rawResponseKey{}, out.RawResponse) - return out, metadata, err -} - -// AddRawResponseToMetadata adds middleware to the middleware stack that -// store raw response on to the metadata. -func AddRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&AddRawResponse{}, middleware.Before) -} - -// GetRawResponse returns raw response set on metadata -func GetRawResponse(metadata middleware.Metadata) interface{} { - return metadata.Get(rawResponseKey{}) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go deleted file mode 100644 index ba262dadcd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build go1.16 -// +build go1.16 - -package middleware - -import "runtime" - -func getNormalizedOSName() (os string) { - switch runtime.GOOS { - case "android": - os = "android" - case "linux": - os = "linux" - case "windows": - os = "windows" - case "darwin": - os = "macos" - case "ios": - os = "ios" - default: - os = "other" - } - return os -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go deleted file mode 100644 index e14a1e4ecb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/osname_go115.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build !go1.16 -// +build !go1.16 - -package middleware - -import "runtime" - -func getNormalizedOSName() (os string) { - switch runtime.GOOS { - case "android": - os = "android" - case "linux": - os = "linux" - case "windows": - os = "windows" - case "darwin": - // Due to Apple M1 we can't distinguish between macOS and iOS when GOOS/GOARCH is darwin/amd64 - // For now declare this as "other" until we have a better detection mechanism. - fallthrough - default: - os = "other" - } - return os -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go deleted file mode 100644 index 3f6aaf231e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/recursion_detection.go +++ /dev/null @@ -1,94 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "os" -) - -const envAwsLambdaFunctionName = "AWS_LAMBDA_FUNCTION_NAME" -const envAmznTraceID = "_X_AMZN_TRACE_ID" -const amznTraceIDHeader = "X-Amzn-Trace-Id" - -// AddRecursionDetection adds recursionDetection to the middleware stack -func AddRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&RecursionDetection{}, middleware.After) -} - -// RecursionDetection detects Lambda environment and sets its X-Ray trace ID to request header if absent -// to avoid recursion invocation in Lambda -type RecursionDetection struct{} - -// ID returns the middleware identifier -func (m *RecursionDetection) ID() string { - return "RecursionDetection" -} - -// HandleBuild detects Lambda environment and adds its trace ID to request header if absent -func (m *RecursionDetection) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - _, hasLambdaEnv := os.LookupEnv(envAwsLambdaFunctionName) - xAmznTraceID, hasTraceID := os.LookupEnv(envAmznTraceID) - value := req.Header.Get(amznTraceIDHeader) - // only set the X-Amzn-Trace-Id header when it is not set initially, the - // current environment is Lambda and the _X_AMZN_TRACE_ID env variable exists - if value != "" || !hasLambdaEnv || !hasTraceID { - return next.HandleBuild(ctx, in) - } - - req.Header.Set(amznTraceIDHeader, percentEncode(xAmznTraceID)) - return next.HandleBuild(ctx, in) -} - -func percentEncode(s string) string { - upperhex := "0123456789ABCDEF" - hexCount := 0 - for i := 0; i < len(s); i++ { - c := s[i] - if shouldEncode(c) { - hexCount++ - } - } - - if hexCount == 0 { - return s - } - - required := len(s) + 2*hexCount - t := make([]byte, required) - j := 0 - for i := 0; i < len(s); i++ { - if c := s[i]; shouldEncode(c) { - t[j] = '%' - t[j+1] = upperhex[c>>4] - t[j+2] = upperhex[c&15] - j += 3 - } else { - t[j] = c - j++ - } - } - return string(t) -} - -func shouldEncode(c byte) bool { - if 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || '0' <= c && c <= '9' { - return false - } - switch c { - case '-', '=', ';', ':', '+', '&', '[', ']', '{', '}', '"', '\'', ',': - return false - default: - return true - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go deleted file mode 100644 index dd3391fe41..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id.go +++ /dev/null @@ -1,27 +0,0 @@ -package middleware - -import ( - "github.com/aws/smithy-go/middleware" -) - -// requestIDKey is used to retrieve request id from response metadata -type requestIDKey struct{} - -// SetRequestIDMetadata sets the provided request id over middleware metadata -func SetRequestIDMetadata(metadata *middleware.Metadata, id string) { - metadata.Set(requestIDKey{}, id) -} - -// GetRequestIDMetadata retrieves the request id from middleware metadata -// returns string and bool indicating value of request id, whether request id was set. -func GetRequestIDMetadata(metadata middleware.Metadata) (string, bool) { - if !metadata.Has(requestIDKey{}) { - return "", false - } - - v, ok := metadata.Get(requestIDKey{}).(string) - if !ok { - return "", true - } - return v, true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go deleted file mode 100644 index 128b60a731..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/request_id_retriever.go +++ /dev/null @@ -1,57 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddRequestIDRetrieverMiddleware adds request id retriever middleware -func AddRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - // add error wrapper middleware before operation deserializers so that it can wrap the error response - // returned by operation deserializers - return stack.Deserialize.Insert(&RequestIDRetriever{}, "OperationDeserializer", middleware.Before) -} - -// RequestIDRetriever middleware captures the AWS service request ID from the -// raw response. -type RequestIDRetriever struct { -} - -// ID returns the middleware identifier -func (m *RequestIDRetriever) ID() string { - return "RequestIDRetriever" -} - -// HandleDeserialize pulls the AWS request ID from the response, storing it in -// operation metadata. -func (m *RequestIDRetriever) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - // No raw response to wrap with. - return out, metadata, err - } - - // Different header which can map to request id - requestIDHeaderList := []string{"X-Amzn-Requestid", "X-Amz-RequestId"} - - for _, h := range requestIDHeaderList { - // check for headers known to contain Request id - if v := resp.Header.Get(h); len(v) != 0 { - // set reqID on metadata for successful responses. - SetRequestIDMetadata(&metadata, v) - - span, _ := tracing.GetSpan(ctx) - span.SetProperty("aws.request_id", v) - break - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go deleted file mode 100644 index 3314230fd8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ /dev/null @@ -1,393 +0,0 @@ -package middleware - -import ( - "context" - "fmt" - "os" - "runtime" - "sort" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -var languageVersion = strings.TrimPrefix(runtime.Version(), "go") - -// SDKAgentKeyType is the metadata type to add to the SDK agent string -type SDKAgentKeyType int - -// The set of valid SDKAgentKeyType constants. If an unknown value is assigned for SDKAgentKeyType it will -// be mapped to AdditionalMetadata. -const ( - _ SDKAgentKeyType = iota - APIMetadata - OperatingSystemMetadata - LanguageMetadata - EnvironmentMetadata - FeatureMetadata - ConfigMetadata - FrameworkMetadata - AdditionalMetadata - ApplicationIdentifier - FeatureMetadata2 -) - -// Hardcoded value to specify which version of the user agent we're using -const uaMetadata = "ua/2.1" - -func (k SDKAgentKeyType) string() string { - switch k { - case APIMetadata: - return "api" - case OperatingSystemMetadata: - return "os" - case LanguageMetadata: - return "lang" - case EnvironmentMetadata: - return "exec-env" - case FeatureMetadata: - return "ft" - case ConfigMetadata: - return "cfg" - case FrameworkMetadata: - return "lib" - case ApplicationIdentifier: - return "app" - case FeatureMetadata2: - return "m" - case AdditionalMetadata: - fallthrough - default: - return "md" - } -} - -const execEnvVar = `AWS_EXECUTION_ENV` - -var validChars = map[rune]bool{ - '!': true, '#': true, '$': true, '%': true, '&': true, '\'': true, '*': true, '+': true, - '-': true, '.': true, '^': true, '_': true, '`': true, '|': true, '~': true, -} - -// UserAgentFeature enumerates tracked SDK features. -type UserAgentFeature string - -// Enumerates UserAgentFeature. -const ( - UserAgentFeatureResourceModel UserAgentFeature = "A" // n/a (we don't generate separate resource types) - - UserAgentFeatureWaiter = "B" - UserAgentFeaturePaginator = "C" - - UserAgentFeatureRetryModeLegacy = "D" // n/a (equivalent to standard) - UserAgentFeatureRetryModeStandard = "E" - UserAgentFeatureRetryModeAdaptive = "F" - - UserAgentFeatureS3Transfer = "G" - UserAgentFeatureS3CryptoV1N = "H" // n/a (crypto client is external) - UserAgentFeatureS3CryptoV2 = "I" // n/a - UserAgentFeatureS3ExpressBucket = "J" - UserAgentFeatureS3AccessGrants = "K" // not yet implemented - - UserAgentFeatureGZIPRequestCompression = "L" - - UserAgentFeatureProtocolRPCV2CBOR = "M" - - UserAgentFeatureAccountIDEndpoint = "O" // DO NOT IMPLEMENT: rules output is not currently defined. SDKs should not parse endpoints for feature information. - UserAgentFeatureAccountIDModePreferred = "P" - UserAgentFeatureAccountIDModeDisabled = "Q" - UserAgentFeatureAccountIDModeRequired = "R" - - UserAgentFeatureRequestChecksumCRC32 = "U" - UserAgentFeatureRequestChecksumCRC32C = "V" - UserAgentFeatureRequestChecksumCRC64 = "W" - UserAgentFeatureRequestChecksumSHA1 = "X" - UserAgentFeatureRequestChecksumSHA256 = "Y" - UserAgentFeatureRequestChecksumWhenSupported = "Z" - UserAgentFeatureRequestChecksumWhenRequired = "a" - UserAgentFeatureResponseChecksumWhenSupported = "b" - UserAgentFeatureResponseChecksumWhenRequired = "c" - - UserAgentFeatureDynamoDBUserAgent = "d" // not yet implemented - - UserAgentFeatureCredentialsCode = "e" - UserAgentFeatureCredentialsJvmSystemProperties = "f" // n/a (this is not a JVM sdk) - UserAgentFeatureCredentialsEnvVars = "g" - UserAgentFeatureCredentialsEnvVarsStsWebIDToken = "h" - UserAgentFeatureCredentialsStsAssumeRole = "i" - UserAgentFeatureCredentialsStsAssumeRoleSaml = "j" // not yet implemented - UserAgentFeatureCredentialsStsAssumeRoleWebID = "k" - UserAgentFeatureCredentialsStsFederationToken = "l" // not yet implemented - UserAgentFeatureCredentialsStsSessionToken = "m" // not yet implemented - UserAgentFeatureCredentialsProfile = "n" - UserAgentFeatureCredentialsProfileSourceProfile = "o" - UserAgentFeatureCredentialsProfileNamedProvider = "p" - UserAgentFeatureCredentialsProfileStsWebIDToken = "q" - UserAgentFeatureCredentialsProfileSso = "r" - UserAgentFeatureCredentialsSso = "s" - UserAgentFeatureCredentialsProfileSsoLegacy = "t" - UserAgentFeatureCredentialsSsoLegacy = "u" - UserAgentFeatureCredentialsProfileProcess = "v" - UserAgentFeatureCredentialsProcess = "w" - UserAgentFeatureCredentialsBoto2ConfigFile = "x" // n/a (this is not boto/Python) - UserAgentFeatureCredentialsAwsSdkStore = "y" // n/a (this is used by .NET based sdk) - UserAgentFeatureCredentialsHTTP = "z" - UserAgentFeatureCredentialsIMDS = "0" - - UserAgentFeatureBearerServiceEnvVars = "3" -) - -var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ - aws.CredentialSourceCode: UserAgentFeatureCredentialsCode, - aws.CredentialSourceEnvVars: UserAgentFeatureCredentialsEnvVars, - aws.CredentialSourceEnvVarsSTSWebIDToken: UserAgentFeatureCredentialsEnvVarsStsWebIDToken, - aws.CredentialSourceSTSAssumeRole: UserAgentFeatureCredentialsStsAssumeRole, - aws.CredentialSourceSTSAssumeRoleSaml: UserAgentFeatureCredentialsStsAssumeRoleSaml, - aws.CredentialSourceSTSAssumeRoleWebID: UserAgentFeatureCredentialsStsAssumeRoleWebID, - aws.CredentialSourceSTSFederationToken: UserAgentFeatureCredentialsStsFederationToken, - aws.CredentialSourceSTSSessionToken: UserAgentFeatureCredentialsStsSessionToken, - aws.CredentialSourceProfile: UserAgentFeatureCredentialsProfile, - aws.CredentialSourceProfileSourceProfile: UserAgentFeatureCredentialsProfileSourceProfile, - aws.CredentialSourceProfileNamedProvider: UserAgentFeatureCredentialsProfileNamedProvider, - aws.CredentialSourceProfileSTSWebIDToken: UserAgentFeatureCredentialsProfileStsWebIDToken, - aws.CredentialSourceProfileSSO: UserAgentFeatureCredentialsProfileSso, - aws.CredentialSourceSSO: UserAgentFeatureCredentialsSso, - aws.CredentialSourceProfileSSOLegacy: UserAgentFeatureCredentialsProfileSsoLegacy, - aws.CredentialSourceSSOLegacy: UserAgentFeatureCredentialsSsoLegacy, - aws.CredentialSourceProfileProcess: UserAgentFeatureCredentialsProfileProcess, - aws.CredentialSourceProcess: UserAgentFeatureCredentialsProcess, - aws.CredentialSourceHTTP: UserAgentFeatureCredentialsHTTP, - aws.CredentialSourceIMDS: UserAgentFeatureCredentialsIMDS, -} - -// RequestUserAgent is a build middleware that set the User-Agent for the request. -type RequestUserAgent struct { - sdkAgent, userAgent *smithyhttp.UserAgentBuilder - features map[UserAgentFeature]struct{} -} - -// NewRequestUserAgent returns a new requestUserAgent which will set the User-Agent and X-Amz-User-Agent for the -// request. -// -// User-Agent example: -// -// aws-sdk-go-v2/1.2.3 -// -// X-Amz-User-Agent example: -// -// aws-sdk-go-v2/1.2.3 md/GOOS/linux md/GOARCH/amd64 lang/go/1.15 -func NewRequestUserAgent() *RequestUserAgent { - userAgent, sdkAgent := smithyhttp.NewUserAgentBuilder(), smithyhttp.NewUserAgentBuilder() - addProductName(userAgent) - addUserAgentMetadata(userAgent) - addProductName(sdkAgent) - - r := &RequestUserAgent{ - sdkAgent: sdkAgent, - userAgent: userAgent, - features: map[UserAgentFeature]struct{}{}, - } - - addSDKMetadata(r) - - return r -} - -func addSDKMetadata(r *RequestUserAgent) { - r.AddSDKAgentKey(OperatingSystemMetadata, getNormalizedOSName()) - r.AddSDKAgentKeyValue(LanguageMetadata, "go", languageVersion) - r.AddSDKAgentKeyValue(AdditionalMetadata, "GOOS", runtime.GOOS) - r.AddSDKAgentKeyValue(AdditionalMetadata, "GOARCH", runtime.GOARCH) - if ev := os.Getenv(execEnvVar); len(ev) > 0 { - r.AddSDKAgentKey(EnvironmentMetadata, ev) - } -} - -func addProductName(builder *smithyhttp.UserAgentBuilder) { - builder.AddKeyValue(aws.SDKName, aws.SDKVersion) -} - -func addUserAgentMetadata(builder *smithyhttp.UserAgentBuilder) { - builder.AddKey(uaMetadata) -} - -// AddUserAgentKey retrieves a requestUserAgent from the provided stack, or initializes one. -func AddUserAgentKey(key string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddUserAgentKey(key) - return nil - } -} - -// AddUserAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one. -func AddUserAgentKeyValue(key, value string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddUserAgentKeyValue(key, value) - return nil - } -} - -// AddSDKAgentKey retrieves a requestUserAgent from the provided stack, or initializes one. -func AddSDKAgentKey(keyType SDKAgentKeyType, key string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddSDKAgentKey(keyType, key) - return nil - } -} - -// AddSDKAgentKeyValue retrieves a requestUserAgent from the provided stack, or initializes one. -func AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) func(*middleware.Stack) error { - return func(stack *middleware.Stack) error { - requestUserAgent, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - requestUserAgent.AddSDKAgentKeyValue(keyType, key, value) - return nil - } -} - -// AddRequestUserAgentMiddleware registers a requestUserAgent middleware on the stack if not present. -func AddRequestUserAgentMiddleware(stack *middleware.Stack) error { - _, err := getOrAddRequestUserAgent(stack) - return err -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*RequestUserAgent, error) { - id := (*RequestUserAgent)(nil).ID() - bm, ok := stack.Build.Get(id) - if !ok { - bm = NewRequestUserAgent() - err := stack.Build.Add(bm, middleware.After) - if err != nil { - return nil, err - } - } - - requestUserAgent, ok := bm.(*RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", bm, id) - } - - return requestUserAgent, nil -} - -// AddUserAgentKey adds the component identified by name to the User-Agent string. -func (u *RequestUserAgent) AddUserAgentKey(key string) { - u.userAgent.AddKey(strings.Map(rules, key)) -} - -// AddUserAgentKeyValue adds the key identified by the given name and value to the User-Agent string. -func (u *RequestUserAgent) AddUserAgentKeyValue(key, value string) { - u.userAgent.AddKeyValue(strings.Map(rules, key), strings.Map(rules, value)) -} - -// AddUserAgentFeature adds the feature ID to the tracking list to be emitted -// in the final User-Agent string. -func (u *RequestUserAgent) AddUserAgentFeature(feature UserAgentFeature) { - u.features[feature] = struct{}{} -} - -// AddSDKAgentKey adds the component identified by name to the User-Agent string. -func (u *RequestUserAgent) AddSDKAgentKey(keyType SDKAgentKeyType, key string) { - // TODO: should target sdkAgent - u.userAgent.AddKey(keyType.string() + "/" + strings.Map(rules, key)) -} - -// AddSDKAgentKeyValue adds the key identified by the given name and value to the User-Agent string. -func (u *RequestUserAgent) AddSDKAgentKeyValue(keyType SDKAgentKeyType, key, value string) { - // TODO: should target sdkAgent - u.userAgent.AddKeyValue(keyType.string(), strings.Map(rules, key)+"#"+strings.Map(rules, value)) -} - -// AddCredentialsSource adds the credential source as a feature on the User-Agent string -func (u *RequestUserAgent) AddCredentialsSource(source aws.CredentialSource) { - x, ok := credentialSourceToFeature[source] - if ok { - u.AddUserAgentFeature(x) - } -} - -// ID the name of the middleware. -func (u *RequestUserAgent) ID() string { - return "UserAgent" -} - -// HandleBuild adds or appends the constructed user agent to the request. -func (u *RequestUserAgent) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - switch req := in.Request.(type) { - case *smithyhttp.Request: - u.addHTTPUserAgent(req) - // TODO: To be re-enabled - // u.addHTTPSDKAgent(req) - default: - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - return next.HandleBuild(ctx, in) -} - -func (u *RequestUserAgent) addHTTPUserAgent(request *smithyhttp.Request) { - const userAgent = "User-Agent" - if len(u.features) > 0 { - updateHTTPHeader(request, userAgent, buildFeatureMetrics(u.features)) - } - updateHTTPHeader(request, userAgent, u.userAgent.Build()) -} - -func (u *RequestUserAgent) addHTTPSDKAgent(request *smithyhttp.Request) { - const sdkAgent = "X-Amz-User-Agent" - updateHTTPHeader(request, sdkAgent, u.sdkAgent.Build()) -} - -func updateHTTPHeader(request *smithyhttp.Request, header string, value string) { - var current string - if v := request.Header[header]; len(v) > 0 { - current = v[0] - } - if len(current) > 0 { - current = value + " " + current - } else { - current = value - } - request.Header[header] = append(request.Header[header][:0], current) -} - -func rules(r rune) rune { - switch { - case r >= '0' && r <= '9': - return r - case r >= 'A' && r <= 'Z' || r >= 'a' && r <= 'z': - return r - case validChars[r]: - return r - default: - return '-' - } -} - -func buildFeatureMetrics(features map[UserAgentFeature]struct{}) string { - fs := make([]string, 0, len(features)) - for f := range features { - fs = append(fs, string(f)) - } - - sort.Strings(fs) - return fmt.Sprintf("%s/%s", FeatureMetadata2.string(), strings.Join(fs, ",")) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go deleted file mode 100644 index 6669a3ddfd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/array.go +++ /dev/null @@ -1,61 +0,0 @@ -package query - -import ( - "net/url" - "strconv" -) - -// Array represents the encoding of Query lists and sets. A Query array is a -// representation of a list of values of a fixed type. A serialized array might -// look like the following: -// -// ListName.member.1=foo -// &ListName.member.2=bar -// &Listname.member.3=baz -type Array struct { - // The query values to add the array to. - values url.Values - // The array's prefix, which includes the names of all parent structures - // and ends with the name of the list. For example, the prefix might be - // "ParentStructure.ListName". This prefix will be used to form the full - // keys for each element in the list. For example, an entry might have the - // key "ParentStructure.ListName.member.MemberName.1". - // - // When the array is not flat the prefix will contain the memberName otherwise the memberName is ignored - prefix string - // Elements are stored in values, so we keep track of the list size here. - size int32 - // Empty lists are encoded as "=", if we add a value later we will - // remove this encoding - emptyValue Value -} - -func newArray(values url.Values, prefix string, flat bool, memberName string) *Array { - emptyValue := newValue(values, prefix, flat) - emptyValue.String("") - - if !flat { - // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead - prefix = prefix + keySeparator + memberName - } - - return &Array{ - values: values, - prefix: prefix, - emptyValue: emptyValue, - } -} - -// Value adds a new element to the Query Array. Returns a Value type used to -// encode the array element. -func (a *Array) Value() Value { - if a.size == 0 { - delete(a.values, a.emptyValue.key) - } - - // Query lists start a 1, so adjust the size first - a.size++ - // Lists can't have flat members - // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead - return newValue(a.values, a.prefix+keySeparator+strconv.FormatInt(int64(a.size), 10), false) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go deleted file mode 100644 index 2ecf9241cd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/encoder.go +++ /dev/null @@ -1,80 +0,0 @@ -package query - -import ( - "io" - "net/url" - "sort" -) - -// Encoder is a Query encoder that supports construction of Query body -// values using methods. -type Encoder struct { - // The query values that will be built up to manage encoding. - values url.Values - // The writer that the encoded body will be written to. - writer io.Writer - Value -} - -// NewEncoder returns a new Query body encoder -func NewEncoder(writer io.Writer) *Encoder { - values := url.Values{} - return &Encoder{ - values: values, - writer: writer, - Value: newBaseValue(values), - } -} - -// Encode returns the []byte slice representing the current -// state of the Query encoder. -func (e Encoder) Encode() error { - ws, ok := e.writer.(interface{ WriteString(string) (int, error) }) - if !ok { - // Fall back to less optimal byte slice casting if WriteString isn't available. - ws = &wrapWriteString{writer: e.writer} - } - - // Get the keys and sort them to have a stable output - keys := make([]string, 0, len(e.values)) - for k := range e.values { - keys = append(keys, k) - } - sort.Strings(keys) - isFirstEntry := true - for _, key := range keys { - queryValues := e.values[key] - escapedKey := url.QueryEscape(key) - for _, value := range queryValues { - if !isFirstEntry { - if _, err := ws.WriteString(`&`); err != nil { - return err - } - } else { - isFirstEntry = false - } - if _, err := ws.WriteString(escapedKey); err != nil { - return err - } - if _, err := ws.WriteString(`=`); err != nil { - return err - } - if _, err := ws.WriteString(url.QueryEscape(value)); err != nil { - return err - } - } - } - return nil -} - -// wrapWriteString wraps an io.Writer to provide a WriteString method -// where one is not available. -type wrapWriteString struct { - writer io.Writer -} - -// WriteString writes a string to the wrapped writer by casting it to -// a byte array first. -func (w wrapWriteString) WriteString(v string) (int, error) { - return w.writer.Write([]byte(v)) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go deleted file mode 100644 index dea242b8b6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/map.go +++ /dev/null @@ -1,78 +0,0 @@ -package query - -import ( - "fmt" - "net/url" -) - -// Map represents the encoding of Query maps. A Query map is a representation -// of a mapping of arbitrary string keys to arbitrary values of a fixed type. -// A Map differs from an Object in that the set of keys is not fixed, in that -// the values must all be of the same type, and that map entries are ordered. -// A serialized map might look like the following: -// -// MapName.entry.1.key=Foo -// &MapName.entry.1.value=spam -// &MapName.entry.2.key=Bar -// &MapName.entry.2.value=eggs -type Map struct { - // The query values to add the map to. - values url.Values - // The map's prefix, which includes the names of all parent structures - // and ends with the name of the object. For example, the prefix might be - // "ParentStructure.MapName". This prefix will be used to form the full - // keys for each key-value pair of the map. For example, a value might have - // the key "ParentStructure.MapName.1.value". - // - // While this is currently represented as a string that gets added to, it - // could also be represented as a stack that only gets condensed into a - // string when a finalized key is created. This could potentially reduce - // allocations. - prefix string - // Whether the map is flat or not. A map that is not flat will produce the - // following entries to the url.Values for a given key-value pair: - // MapName.entry.1.KeyLocationName=mykey - // MapName.entry.1.ValueLocationName=myvalue - // A map that is flat will produce the following: - // MapName.1.KeyLocationName=mykey - // MapName.1.ValueLocationName=myvalue - flat bool - // The location name of the key. In most cases this should be "key". - keyLocationName string - // The location name of the value. In most cases this should be "value". - valueLocationName string - // Elements are stored in values, so we keep track of the list size here. - size int32 -} - -func newMap(values url.Values, prefix string, flat bool, keyLocationName string, valueLocationName string) *Map { - return &Map{ - values: values, - prefix: prefix, - flat: flat, - keyLocationName: keyLocationName, - valueLocationName: valueLocationName, - } -} - -// Key adds the given named key to the Query map. -// Returns a Value encoder that should be used to encode a Query value type. -func (m *Map) Key(name string) Value { - // Query lists start a 1, so adjust the size first - m.size++ - var key string - var value string - if m.flat { - key = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.keyLocationName) - value = fmt.Sprintf("%s.%d.%s", m.prefix, m.size, m.valueLocationName) - } else { - key = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.keyLocationName) - value = fmt.Sprintf("%s.entry.%d.%s", m.prefix, m.size, m.valueLocationName) - } - - // The key can only be a string, so we just go ahead and set it here - newValue(m.values, key, false).String(name) - - // Maps can't have flat members - return newValue(m.values, value, false) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go deleted file mode 100644 index 3603447911..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/middleware.go +++ /dev/null @@ -1,62 +0,0 @@ -package query - -import ( - "context" - "fmt" - "io/ioutil" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddAsGetRequestMiddleware adds a middleware to the Serialize stack after the -// operation serializer that will convert the query request body to a GET -// operation with the query message in the HTTP request querystring. -func AddAsGetRequestMiddleware(stack *middleware.Stack) error { - return stack.Serialize.Insert(&asGetRequest{}, "OperationSerializer", middleware.After) -} - -type asGetRequest struct{} - -func (*asGetRequest) ID() string { return "Query:AsGetRequest" } - -func (m *asGetRequest) HandleSerialize( - ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("expect smithy HTTP Request, got %T", input.Request) - } - - req.Method = "GET" - - // If the stream is not set, nothing else to do. - stream := req.GetStream() - if stream == nil { - return next.HandleSerialize(ctx, input) - } - - // Clear the stream since there will not be any body. - req.Header.Del("Content-Type") - req, err = req.SetStream(nil) - if err != nil { - return out, metadata, fmt.Errorf("unable update request body %w", err) - } - input.Request = req - - // Update request query with the body's query string value. - delim := "" - if len(req.URL.RawQuery) != 0 { - delim = "&" - } - - b, err := ioutil.ReadAll(stream) - if err != nil { - return out, metadata, fmt.Errorf("unable to get request body %w", err) - } - req.URL.RawQuery += delim + string(b) - - return next.HandleSerialize(ctx, input) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go deleted file mode 100644 index 305a8ace30..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/object.go +++ /dev/null @@ -1,68 +0,0 @@ -package query - -import "net/url" - -// Object represents the encoding of Query structures and unions. A Query -// object is a representation of a mapping of string keys to arbitrary -// values where there is a fixed set of keys whose values each have their -// own known type. A serialized object might look like the following: -// -// ObjectName.Foo=value -// &ObjectName.Bar=5 -type Object struct { - // The query values to add the object to. - values url.Values - // The object's prefix, which includes the names of all parent structures - // and ends with the name of the object. For example, the prefix might be - // "ParentStructure.ObjectName". This prefix will be used to form the full - // keys for each member of the object. For example, a member might have the - // key "ParentStructure.ObjectName.MemberName". - // - // While this is currently represented as a string that gets added to, it - // could also be represented as a stack that only gets condensed into a - // string when a finalized key is created. This could potentially reduce - // allocations. - prefix string -} - -func newObject(values url.Values, prefix string) *Object { - return &Object{ - values: values, - prefix: prefix, - } -} - -// Key adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query value type. -func (o *Object) Key(name string) Value { - return o.key(name, false) -} - -// KeyWithValues adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query list of values. -func (o *Object) KeyWithValues(name string) Value { - return o.keyWithValues(name, false) -} - -// FlatKey adds the given named key to the Query object. -// Returns a Value encoder that should be used to encode a Query value type. The -// value will be flattened if it is a map or array. -func (o *Object) FlatKey(name string) Value { - return o.key(name, true) -} - -func (o *Object) key(name string, flatValue bool) Value { - if o.prefix != "" { - // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead - return newValue(o.values, o.prefix+keySeparator+name, flatValue) - } - return newValue(o.values, name, flatValue) -} - -func (o *Object) keyWithValues(name string, flatValue bool) Value { - if o.prefix != "" { - // This uses string concatenation in place of fmt.Sprintf as fmt.Sprintf has a much higher resource overhead - return newAppendValue(o.values, o.prefix+keySeparator+name, flatValue) - } - return newAppendValue(o.values, name, flatValue) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go deleted file mode 100644 index 8063c592dd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/query/value.go +++ /dev/null @@ -1,117 +0,0 @@ -package query - -import ( - "math/big" - "net/url" - - "github.com/aws/smithy-go/encoding/httpbinding" -) - -const keySeparator = "." - -// Value represents a Query Value type. -type Value struct { - // The query values to add the value to. - values url.Values - // The value's key, which will form the prefix for complex types. - key string - // Whether the value should be flattened or not if it's a flattenable type. - flat bool - queryValue httpbinding.QueryValue -} - -func newValue(values url.Values, key string, flat bool) Value { - return Value{ - values: values, - key: key, - flat: flat, - queryValue: httpbinding.NewQueryValue(values, key, false), - } -} - -func newAppendValue(values url.Values, key string, flat bool) Value { - return Value{ - values: values, - key: key, - flat: flat, - queryValue: httpbinding.NewQueryValue(values, key, true), - } -} - -func newBaseValue(values url.Values) Value { - return Value{ - values: values, - queryValue: httpbinding.NewQueryValue(nil, "", false), - } -} - -// Array returns a new Array encoder. -func (qv Value) Array(locationName string) *Array { - return newArray(qv.values, qv.key, qv.flat, locationName) -} - -// Object returns a new Object encoder. -func (qv Value) Object() *Object { - return newObject(qv.values, qv.key) -} - -// Map returns a new Map encoder. -func (qv Value) Map(keyLocationName string, valueLocationName string) *Map { - return newMap(qv.values, qv.key, qv.flat, keyLocationName, valueLocationName) -} - -// Base64EncodeBytes encodes v as a base64 query string value. -// This is intended to enable compatibility with the JSON encoder. -func (qv Value) Base64EncodeBytes(v []byte) { - qv.queryValue.Blob(v) -} - -// Boolean encodes v as a query string value -func (qv Value) Boolean(v bool) { - qv.queryValue.Boolean(v) -} - -// String encodes v as a query string value -func (qv Value) String(v string) { - qv.queryValue.String(v) -} - -// Byte encodes v as a query string value -func (qv Value) Byte(v int8) { - qv.queryValue.Byte(v) -} - -// Short encodes v as a query string value -func (qv Value) Short(v int16) { - qv.queryValue.Short(v) -} - -// Integer encodes v as a query string value -func (qv Value) Integer(v int32) { - qv.queryValue.Integer(v) -} - -// Long encodes v as a query string value -func (qv Value) Long(v int64) { - qv.queryValue.Long(v) -} - -// Float encodes v as a query string value -func (qv Value) Float(v float32) { - qv.queryValue.Float(v) -} - -// Double encodes v as a query string value -func (qv Value) Double(v float64) { - qv.queryValue.Double(v) -} - -// BigInteger encodes v as a query string value -func (qv Value) BigInteger(v *big.Int) { - qv.queryValue.BigInteger(v) -} - -// BigDecimal encodes v as a query string value -func (qv Value) BigDecimal(v *big.Float) { - qv.queryValue.BigDecimal(v) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go deleted file mode 100644 index 1bce78a4d4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/restjson/decoder_util.go +++ /dev/null @@ -1,85 +0,0 @@ -package restjson - -import ( - "encoding/json" - "io" - "strings" - - "github.com/aws/smithy-go" -) - -// GetErrorInfo util looks for code, __type, and message members in the -// json body. These members are optionally available, and the function -// returns the value of member if it is available. This function is useful to -// identify the error code, msg in a REST JSON error response. -func GetErrorInfo(decoder *json.Decoder) (errorType string, message string, err error) { - var errInfo struct { - Code string - Type string `json:"__type"` - Message string - } - - err = decoder.Decode(&errInfo) - if err != nil { - if err == io.EOF { - return errorType, message, nil - } - return errorType, message, err - } - - // assign error type - if len(errInfo.Code) != 0 { - errorType = errInfo.Code - } else if len(errInfo.Type) != 0 { - errorType = errInfo.Type - } - - // assign error message - if len(errInfo.Message) != 0 { - message = errInfo.Message - } - - // sanitize error - if len(errorType) != 0 { - errorType = SanitizeErrorCode(errorType) - } - - return errorType, message, nil -} - -// SanitizeErrorCode sanitizes the errorCode string . -// The rule for sanitizing is if a `:` character is present, then take only the -// contents before the first : character in the value. -// If a # character is present, then take only the contents after the -// first # character in the value. -func SanitizeErrorCode(errorCode string) string { - if strings.ContainsAny(errorCode, ":") { - errorCode = strings.SplitN(errorCode, ":", 2)[0] - } - - if strings.ContainsAny(errorCode, "#") { - errorCode = strings.SplitN(errorCode, "#", 2)[1] - } - - return errorCode -} - -// GetSmithyGenericAPIError returns smithy generic api error and an error interface. -// Takes in json decoder, and error Code string as args. The function retrieves error message -// and error code from the decoder body. If errorCode of length greater than 0 is passed in as -// an argument, it is used instead. -func GetSmithyGenericAPIError(decoder *json.Decoder, errorCode string) (*smithy.GenericAPIError, error) { - errorType, message, err := GetErrorInfo(decoder) - if err != nil { - return nil, err - } - - if len(errorCode) == 0 { - errorCode = errorType - } - - return &smithy.GenericAPIError{ - Code: errorCode, - Message: message, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go deleted file mode 100644 index 6975ce6524..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/protocol/xml/error_utils.go +++ /dev/null @@ -1,48 +0,0 @@ -package xml - -import ( - "encoding/xml" - "fmt" - "io" -) - -// ErrorComponents represents the error response fields -// that will be deserialized from an xml error response body -type ErrorComponents struct { - Code string - Message string - RequestID string -} - -// GetErrorResponseComponents returns the error fields from an xml error response body -func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) { - if noErrorWrapping { - var errResponse noWrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents(errResponse), nil - } - - var errResponse wrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents(errResponse), nil -} - -// noWrappedErrorResponse represents the error response body with -// no internal Error wrapping -type noWrappedErrorResponse struct { - Code string `xml:"Code"` - Message string `xml:"Message"` - RequestID string `xml:"RequestId"` -} - -// wrappedErrorResponse represents the error response body -// wrapped within Error -type wrappedErrorResponse struct { - Code string `xml:"Error>Code"` - Message string `xml:"Error>Message"` - RequestID string `xml:"RequestId"` -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go deleted file mode 100644 index 8c78364105..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/none.go +++ /dev/null @@ -1,20 +0,0 @@ -package ratelimit - -import "context" - -// None implements a no-op rate limiter which effectively disables client-side -// rate limiting (also known as "retry quotas"). -// -// GetToken does nothing and always returns a nil error. The returned -// token-release function does nothing, and always returns a nil error. -// -// AddTokens does nothing and always returns a nil error. -var None = &none{} - -type none struct{} - -func (*none) GetToken(ctx context.Context, cost uint) (func() error, error) { - return func() error { return nil }, nil -} - -func (*none) AddTokens(v uint) error { return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go deleted file mode 100644 index 974ef594f0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_bucket.go +++ /dev/null @@ -1,96 +0,0 @@ -package ratelimit - -import ( - "sync" -) - -// TokenBucket provides a concurrency safe utility for adding and removing -// tokens from the available token bucket. -type TokenBucket struct { - remainingTokens uint - maxCapacity uint - minCapacity uint - mu sync.Mutex -} - -// NewTokenBucket returns an initialized TokenBucket with the capacity -// specified. -func NewTokenBucket(i uint) *TokenBucket { - return &TokenBucket{ - remainingTokens: i, - maxCapacity: i, - minCapacity: 1, - } -} - -// Retrieve attempts to reduce the available tokens by the amount requested. If -// there are tokens available true will be returned along with the number of -// available tokens remaining. If amount requested is larger than the available -// capacity, false will be returned along with the available capacity. If the -// amount is less than the available capacity, the capacity will be reduced by -// that amount, and the remaining capacity and true will be returned. -func (t *TokenBucket) Retrieve(amount uint) (available uint, retrieved bool) { - t.mu.Lock() - defer t.mu.Unlock() - - if amount > t.remainingTokens { - return t.remainingTokens, false - } - - t.remainingTokens -= amount - return t.remainingTokens, true -} - -// Refund returns the amount of tokens back to the available token bucket, up -// to the initial capacity. -func (t *TokenBucket) Refund(amount uint) { - t.mu.Lock() - defer t.mu.Unlock() - - // Capacity cannot exceed max capacity. - t.remainingTokens = uintMin(t.remainingTokens+amount, t.maxCapacity) -} - -// Capacity returns the maximum capacity of tokens that the bucket could -// contain. -func (t *TokenBucket) Capacity() uint { - t.mu.Lock() - defer t.mu.Unlock() - - return t.maxCapacity -} - -// Remaining returns the number of tokens that remaining in the bucket. -func (t *TokenBucket) Remaining() uint { - t.mu.Lock() - defer t.mu.Unlock() - - return t.remainingTokens -} - -// Resize adjusts the size of the token bucket. Returns the capacity remaining. -func (t *TokenBucket) Resize(size uint) uint { - t.mu.Lock() - defer t.mu.Unlock() - - t.maxCapacity = uintMax(size, t.minCapacity) - - // Capacity needs to be capped at max capacity, if max size reduced. - t.remainingTokens = uintMin(t.remainingTokens, t.maxCapacity) - - return t.remainingTokens -} - -func uintMin(a, b uint) uint { - if a < b { - return a - } - return b -} - -func uintMax(a, b uint) uint { - if a > b { - return a - } - return b -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go deleted file mode 100644 index d89090ad38..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/ratelimit/token_rate_limit.go +++ /dev/null @@ -1,83 +0,0 @@ -package ratelimit - -import ( - "context" - "fmt" -) - -type rateToken struct { - tokenCost uint - bucket *TokenBucket -} - -func (t rateToken) release() error { - t.bucket.Refund(t.tokenCost) - return nil -} - -// TokenRateLimit provides a Token Bucket RateLimiter implementation -// that limits the overall number of retry attempts that can be made across -// operation invocations. -type TokenRateLimit struct { - bucket *TokenBucket -} - -// NewTokenRateLimit returns an TokenRateLimit with default values. -// Functional options can configure the retry rate limiter. -func NewTokenRateLimit(tokens uint) *TokenRateLimit { - return &TokenRateLimit{ - bucket: NewTokenBucket(tokens), - } -} - -type canceledError struct { - Err error -} - -func (c canceledError) CanceledError() bool { return true } -func (c canceledError) Unwrap() error { return c.Err } -func (c canceledError) Error() string { - return fmt.Sprintf("canceled, %v", c.Err) -} - -// GetToken may cause a available pool of retry quota to be -// decremented. Will return an error if the decremented value can not be -// reduced from the retry quota. -func (l *TokenRateLimit) GetToken(ctx context.Context, cost uint) (func() error, error) { - select { - case <-ctx.Done(): - return nil, canceledError{Err: ctx.Err()} - default: - } - if avail, ok := l.bucket.Retrieve(cost); !ok { - return nil, QuotaExceededError{Available: avail, Requested: cost} - } - - return rateToken{ - tokenCost: cost, - bucket: l.bucket, - }.release, nil -} - -// AddTokens increments the token bucket by a fixed amount. -func (l *TokenRateLimit) AddTokens(v uint) error { - l.bucket.Refund(v) - return nil -} - -// Remaining returns the number of remaining tokens in the bucket. -func (l *TokenRateLimit) Remaining() uint { - return l.bucket.Remaining() -} - -// QuotaExceededError provides the SDK error when the retries for a given -// token bucket have been exhausted. -type QuotaExceededError struct { - Available uint - Requested uint -} - -func (e QuotaExceededError) Error() string { - return fmt.Sprintf("retry quota exceeded, %d available, %d requested", - e.Available, e.Requested) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go deleted file mode 100644 index d8d00e6158..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/request.go +++ /dev/null @@ -1,25 +0,0 @@ -package aws - -import ( - "fmt" -) - -// TODO remove replace with smithy.CanceledError - -// RequestCanceledError is the error that will be returned by an API request -// that was canceled. Requests given a Context may return this error when -// canceled. -type RequestCanceledError struct { - Err error -} - -// CanceledError returns true to satisfy interfaces checking for canceled errors. -func (*RequestCanceledError) CanceledError() bool { return true } - -// Unwrap returns the underlying error, if there was one. -func (e *RequestCanceledError) Unwrap() error { - return e.Err -} -func (e *RequestCanceledError) Error() string { - return fmt.Sprintf("request canceled, %v", e.Err) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go deleted file mode 100644 index 4dfde85737..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive.go +++ /dev/null @@ -1,156 +0,0 @@ -package retry - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -const ( - // DefaultRequestCost is the cost of a single request from the adaptive - // rate limited token bucket. - DefaultRequestCost uint = 1 -) - -// DefaultThrottles provides the set of errors considered throttle errors that -// are checked by default. -var DefaultThrottles = []IsErrorThrottle{ - ThrottleErrorCode{ - Codes: DefaultThrottleErrorCodes, - }, -} - -// AdaptiveModeOptions provides the functional options for configuring the -// adaptive retry mode, and delay behavior. -type AdaptiveModeOptions struct { - // If the adaptive token bucket is empty, when an attempt will be made - // AdaptiveMode will sleep until a token is available. This can occur when - // attempts fail with throttle errors. Use this option to disable the sleep - // until token is available, and return error immediately. - FailOnNoAttemptTokens bool - - // The cost of an attempt from the AdaptiveMode's adaptive token bucket. - RequestCost uint - - // Set of strategies to determine if the attempt failed due to a throttle - // error. - // - // It is safe to append to this list in NewAdaptiveMode's functional options. - Throttles []IsErrorThrottle - - // Set of options for standard retry mode that AdaptiveMode is built on top - // of. AdaptiveMode may apply its own defaults to Standard retry mode that - // are different than the defaults of NewStandard. Use these options to - // override the default options. - StandardOptions []func(*StandardOptions) -} - -// AdaptiveMode provides an experimental retry strategy that expands on the -// Standard retry strategy, adding client attempt rate limits. The attempt rate -// limit is initially unrestricted, but becomes restricted when the attempt -// fails with for a throttle error. When restricted AdaptiveMode may need to -// sleep before an attempt is made, if too many throttles have been received. -// AdaptiveMode's sleep can be canceled with context cancel. Set -// AdaptiveModeOptions FailOnNoAttemptTokens to change the behavior from sleep, -// to fail fast. -// -// Eventually unrestricted attempt rate limit will be restored once attempts no -// longer are failing due to throttle errors. -type AdaptiveMode struct { - options AdaptiveModeOptions - throttles IsErrorThrottles - - retryer aws.RetryerV2 - rateLimit *adaptiveRateLimit -} - -// NewAdaptiveMode returns an initialized AdaptiveMode retry strategy. -func NewAdaptiveMode(optFns ...func(*AdaptiveModeOptions)) *AdaptiveMode { - o := AdaptiveModeOptions{ - RequestCost: DefaultRequestCost, - Throttles: append([]IsErrorThrottle{}, DefaultThrottles...), - } - for _, fn := range optFns { - fn(&o) - } - - return &AdaptiveMode{ - options: o, - throttles: IsErrorThrottles(o.Throttles), - retryer: NewStandard(o.StandardOptions...), - rateLimit: newAdaptiveRateLimit(), - } -} - -// IsErrorRetryable returns if the failed attempt is retryable. This check -// should determine if the error can be retried, or if the error is -// terminal. -func (a *AdaptiveMode) IsErrorRetryable(err error) bool { - return a.retryer.IsErrorRetryable(err) -} - -// MaxAttempts returns the maximum number of attempts that can be made for -// an attempt before failing. A value of 0 implies that the attempt should -// be retried until it succeeds if the errors are retryable. -func (a *AdaptiveMode) MaxAttempts() int { - return a.retryer.MaxAttempts() -} - -// RetryDelay returns the delay that should be used before retrying the -// attempt. Will return error if the if the delay could not be determined. -func (a *AdaptiveMode) RetryDelay(attempt int, opErr error) ( - time.Duration, error, -) { - return a.retryer.RetryDelay(attempt, opErr) -} - -// GetRetryToken attempts to deduct the retry cost from the retry token pool. -// Returning the token release function, or error. -func (a *AdaptiveMode) GetRetryToken(ctx context.Context, opErr error) ( - releaseToken func(error) error, err error, -) { - return a.retryer.GetRetryToken(ctx, opErr) -} - -// GetInitialToken returns the initial attempt token that can increment the -// retry token pool if the attempt is successful. -// -// Deprecated: This method does not provide a way to block using Context, -// nor can it return an error. Use RetryerV2, and GetAttemptToken instead. Only -// present to implement Retryer interface. -func (a *AdaptiveMode) GetInitialToken() (releaseToken func(error) error) { - return nopRelease -} - -// GetAttemptToken returns the attempt token that can be used to rate limit -// attempt calls. Will be used by the SDK's retry package's Attempt -// middleware to get an attempt token prior to calling the temp and releasing -// the attempt token after the attempt has been made. -func (a *AdaptiveMode) GetAttemptToken(ctx context.Context) (func(error) error, error) { - for { - acquiredToken, waitTryAgain := a.rateLimit.AcquireToken(a.options.RequestCost) - if acquiredToken { - break - } - if a.options.FailOnNoAttemptTokens { - return nil, fmt.Errorf( - "unable to get attempt token, and FailOnNoAttemptTokens enables") - } - - if err := sdk.SleepWithContext(ctx, waitTryAgain); err != nil { - return nil, fmt.Errorf("failed to wait for token to be available, %w", err) - } - } - - return a.handleResponse, nil -} - -func (a *AdaptiveMode) handleResponse(opErr error) error { - throttled := a.throttles.IsErrorThrottle(opErr).Bool() - - a.rateLimit.Update(throttled) - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go deleted file mode 100644 index ad96d9b8c5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_ratelimit.go +++ /dev/null @@ -1,158 +0,0 @@ -package retry - -import ( - "math" - "sync" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdk" -) - -type adaptiveRateLimit struct { - tokenBucketEnabled bool - - smooth float64 - beta float64 - scaleConstant float64 - minFillRate float64 - - fillRate float64 - calculatedRate float64 - lastRefilled time.Time - measuredTxRate float64 - lastTxRateBucket float64 - requestCount int64 - lastMaxRate float64 - lastThrottleTime time.Time - timeWindow float64 - - tokenBucket *adaptiveTokenBucket - - mu sync.Mutex -} - -func newAdaptiveRateLimit() *adaptiveRateLimit { - now := sdk.NowTime() - return &adaptiveRateLimit{ - smooth: 0.8, - beta: 0.7, - scaleConstant: 0.4, - - minFillRate: 0.5, - - lastTxRateBucket: math.Floor(timeFloat64Seconds(now)), - lastThrottleTime: now, - - tokenBucket: newAdaptiveTokenBucket(0), - } -} - -func (a *adaptiveRateLimit) Enable(v bool) { - a.mu.Lock() - defer a.mu.Unlock() - - a.tokenBucketEnabled = v -} - -func (a *adaptiveRateLimit) AcquireToken(amount uint) ( - tokenAcquired bool, waitTryAgain time.Duration, -) { - a.mu.Lock() - defer a.mu.Unlock() - - if !a.tokenBucketEnabled { - return true, 0 - } - - a.tokenBucketRefill() - - available, ok := a.tokenBucket.Retrieve(float64(amount)) - if !ok { - waitDur := float64Seconds((float64(amount) - available) / a.fillRate) - return false, waitDur - } - - return true, 0 -} - -func (a *adaptiveRateLimit) Update(throttled bool) { - a.mu.Lock() - defer a.mu.Unlock() - - a.updateMeasuredRate() - - if throttled { - rateToUse := a.measuredTxRate - if a.tokenBucketEnabled { - rateToUse = math.Min(a.measuredTxRate, a.fillRate) - } - - a.lastMaxRate = rateToUse - a.calculateTimeWindow() - a.lastThrottleTime = sdk.NowTime() - a.calculatedRate = a.cubicThrottle(rateToUse) - a.tokenBucketEnabled = true - } else { - a.calculateTimeWindow() - a.calculatedRate = a.cubicSuccess(sdk.NowTime()) - } - - newRate := math.Min(a.calculatedRate, 2*a.measuredTxRate) - a.tokenBucketUpdateRate(newRate) -} - -func (a *adaptiveRateLimit) cubicSuccess(t time.Time) float64 { - dt := secondsFloat64(t.Sub(a.lastThrottleTime)) - return (a.scaleConstant * math.Pow(dt-a.timeWindow, 3)) + a.lastMaxRate -} - -func (a *adaptiveRateLimit) cubicThrottle(rateToUse float64) float64 { - return rateToUse * a.beta -} - -func (a *adaptiveRateLimit) calculateTimeWindow() { - a.timeWindow = math.Pow((a.lastMaxRate*(1.-a.beta))/a.scaleConstant, 1./3.) -} - -func (a *adaptiveRateLimit) tokenBucketUpdateRate(newRPS float64) { - a.tokenBucketRefill() - a.fillRate = math.Max(newRPS, a.minFillRate) - a.tokenBucket.Resize(newRPS) -} - -func (a *adaptiveRateLimit) updateMeasuredRate() { - now := sdk.NowTime() - timeBucket := math.Floor(timeFloat64Seconds(now)*2.) / 2. - a.requestCount++ - - if timeBucket > a.lastTxRateBucket { - currentRate := float64(a.requestCount) / (timeBucket - a.lastTxRateBucket) - a.measuredTxRate = (currentRate * a.smooth) + (a.measuredTxRate * (1. - a.smooth)) - a.requestCount = 0 - a.lastTxRateBucket = timeBucket - } -} - -func (a *adaptiveRateLimit) tokenBucketRefill() { - now := sdk.NowTime() - if a.lastRefilled.IsZero() { - a.lastRefilled = now - return - } - - fillAmount := secondsFloat64(now.Sub(a.lastRefilled)) * a.fillRate - a.tokenBucket.Refund(fillAmount) - a.lastRefilled = now -} - -func float64Seconds(v float64) time.Duration { - return time.Duration(v * float64(time.Second)) -} - -func secondsFloat64(v time.Duration) float64 { - return float64(v) / float64(time.Second) -} - -func timeFloat64Seconds(v time.Time) float64 { - return float64(v.UnixNano()) / float64(time.Second) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go deleted file mode 100644 index 052723e8ed..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/adaptive_token_bucket.go +++ /dev/null @@ -1,83 +0,0 @@ -package retry - -import ( - "math" - "sync" -) - -// adaptiveTokenBucket provides a concurrency safe utility for adding and -// removing tokens from the available token bucket. -type adaptiveTokenBucket struct { - remainingTokens float64 - maxCapacity float64 - minCapacity float64 - mu sync.Mutex -} - -// newAdaptiveTokenBucket returns an initialized adaptiveTokenBucket with the -// capacity specified. -func newAdaptiveTokenBucket(i float64) *adaptiveTokenBucket { - return &adaptiveTokenBucket{ - remainingTokens: i, - maxCapacity: i, - minCapacity: 1, - } -} - -// Retrieve attempts to reduce the available tokens by the amount requested. If -// there are tokens available true will be returned along with the number of -// available tokens remaining. If amount requested is larger than the available -// capacity, false will be returned along with the available capacity. If the -// amount is less than the available capacity, the capacity will be reduced by -// that amount, and the remaining capacity and true will be returned. -func (t *adaptiveTokenBucket) Retrieve(amount float64) (available float64, retrieved bool) { - t.mu.Lock() - defer t.mu.Unlock() - - if amount > t.remainingTokens { - return t.remainingTokens, false - } - - t.remainingTokens -= amount - return t.remainingTokens, true -} - -// Refund returns the amount of tokens back to the available token bucket, up -// to the initial capacity. -func (t *adaptiveTokenBucket) Refund(amount float64) { - t.mu.Lock() - defer t.mu.Unlock() - - // Capacity cannot exceed max capacity. - t.remainingTokens = math.Min(t.remainingTokens+amount, t.maxCapacity) -} - -// Capacity returns the maximum capacity of tokens that the bucket could -// contain. -func (t *adaptiveTokenBucket) Capacity() float64 { - t.mu.Lock() - defer t.mu.Unlock() - - return t.maxCapacity -} - -// Remaining returns the number of tokens that remaining in the bucket. -func (t *adaptiveTokenBucket) Remaining() float64 { - t.mu.Lock() - defer t.mu.Unlock() - - return t.remainingTokens -} - -// Resize adjusts the size of the token bucket. Returns the capacity remaining. -func (t *adaptiveTokenBucket) Resize(size float64) float64 { - t.mu.Lock() - defer t.mu.Unlock() - - t.maxCapacity = math.Max(size, t.minCapacity) - - // Capacity needs to be capped at max capacity, if max size reduced. - t.remainingTokens = math.Min(t.remainingTokens, t.maxCapacity) - - return t.remainingTokens -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go deleted file mode 100644 index bfa5bf7d13..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/attempt_metrics.go +++ /dev/null @@ -1,51 +0,0 @@ -package retry - -import ( - "context" - - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" -) - -type attemptMetrics struct { - Attempts metrics.Int64Counter - Errors metrics.Int64Counter - - AttemptDuration metrics.Float64Histogram -} - -func newAttemptMetrics(meter metrics.Meter) (*attemptMetrics, error) { - m := &attemptMetrics{} - var err error - - m.Attempts, err = meter.Int64Counter("client.call.attempts", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "{attempt}" - o.Description = "The number of attempts for an individual operation" - }) - if err != nil { - return nil, err - } - m.Errors, err = meter.Int64Counter("client.call.errors", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "{error}" - o.Description = "The number of errors for an operation" - }) - if err != nil { - return nil, err - } - m.AttemptDuration, err = meter.Float64Histogram("client.call.attempt_duration", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "The time it takes to connect to the service, send the request, and get back HTTP status code and headers (including time queued waiting to be sent)" - }) - if err != nil { - return nil, err - } - - return m, nil -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go deleted file mode 100644 index 3a08ebe0a7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/doc.go +++ /dev/null @@ -1,80 +0,0 @@ -// Package retry provides interfaces and implementations for SDK request retry behavior. -// -// # Retryer Interface and Implementations -// -// This package defines Retryer interface that is used to either implement custom retry behavior -// or to extend the existing retry implementations provided by the SDK. This package provides a single -// retry implementation: Standard. -// -// # Standard -// -// Standard is the default retryer implementation used by service clients. The standard retryer is a rate limited -// retryer that has a configurable max attempts to limit the number of retry attempts when a retryable error occurs. -// In addition, the retryer uses a configurable token bucket to rate limit the retry attempts across the client, -// and uses an additional delay policy to limit the time between a requests subsequent attempts. -// -// By default the standard retryer uses the DefaultRetryables slice of IsErrorRetryable types to determine whether -// a given error is retryable. By default this list of retryables includes the following: -// - Retrying errors that implement the RetryableError method, and return true. -// - Connection Errors -// - Errors that implement a ConnectionError, Temporary, or Timeout method that return true. -// - Connection Reset Errors. -// - net.OpErr types that are dialing errors or are temporary. -// - HTTP Status Codes: 500, 502, 503, and 504. -// - API Error Codes -// - RequestTimeout, RequestTimeoutException -// - Throttling, ThrottlingException, ThrottledException, RequestThrottledException, TooManyRequestsException, -// RequestThrottled, SlowDown, EC2ThrottledException -// - ProvisionedThroughputExceededException, RequestLimitExceeded, BandwidthLimitExceeded, LimitExceededException -// - TransactionInProgressException, PriorRequestNotComplete -// -// The standard retryer will not retry a request in the event if the context associated with the request -// has been cancelled. Applications must handle this case explicitly if they wish to retry with a different context -// value. -// -// You can configure the standard retryer implementation to fit your applications by constructing a standard retryer -// using the NewStandard function, and providing one more functional argument that mutate the StandardOptions -// structure. StandardOptions provides the ability to modify the token bucket rate limiter, retryable error conditions, -// and the retry delay policy. -// -// For example to modify the default retry attempts for the standard retryer: -// -// // configure the custom retryer -// customRetry := retry.NewStandard(func(o *retry.StandardOptions) { -// o.MaxAttempts = 5 -// }) -// -// // create a service client with the retryer -// s3.NewFromConfig(cfg, func(o *s3.Options) { -// o.Retryer = customRetry -// }) -// -// # Utilities -// -// A number of package functions have been provided to easily wrap retryer implementations in an implementation agnostic -// way. These are: -// -// AddWithErrorCodes - Provides the ability to add additional API error codes that should be considered retryable -// in addition to those considered retryable by the provided retryer. -// -// AddWithMaxAttempts - Provides the ability to set the max number of attempts for retrying a request by wrapping -// a retryer implementation. -// -// AddWithMaxBackoffDelay - Provides the ability to set the max back off delay that can occur before retrying a -// request by wrapping a retryer implementation. -// -// The following package functions have been provided to easily satisfy different retry interfaces to further customize -// a given retryer's behavior: -// -// BackoffDelayerFunc - Can be used to wrap a function to satisfy the BackoffDelayer interface. For example, -// you can use this method to easily create custom back off policies to be used with the -// standard retryer. -// -// IsErrorRetryableFunc - Can be used to wrap a function to satisfy the IsErrorRetryable interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be retried. -// -// IsErrorTimeoutFunc - Can be used to wrap a function to satisfy IsErrorTimeout interface. For example, -// this can be used to extend the standard retryer to add additional logic to determine if an -// error should be considered a timeout. -package retry diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go deleted file mode 100644 index 3e432eefe7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/errors.go +++ /dev/null @@ -1,20 +0,0 @@ -package retry - -import "fmt" - -// MaxAttemptsError provides the error when the maximum number of attempts have -// been exceeded. -type MaxAttemptsError struct { - Attempt int - Err error -} - -func (e *MaxAttemptsError) Error() string { - return fmt.Sprintf("exceeded maximum number of attempts, %d, %v", e.Attempt, e.Err) -} - -// Unwrap returns the nested error causing the max attempts error. Provides the -// implementation for errors.Is and errors.As to unwrap nested errors. -func (e *MaxAttemptsError) Unwrap() error { - return e.Err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go deleted file mode 100644 index c266996dea..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/jitter_backoff.go +++ /dev/null @@ -1,49 +0,0 @@ -package retry - -import ( - "math" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/timeconv" -) - -// ExponentialJitterBackoff provides backoff delays with jitter based on the -// number of attempts. -type ExponentialJitterBackoff struct { - maxBackoff time.Duration - // precomputed number of attempts needed to reach max backoff. - maxBackoffAttempts float64 - - randFloat64 func() (float64, error) -} - -// NewExponentialJitterBackoff returns an ExponentialJitterBackoff configured -// for the max backoff. -func NewExponentialJitterBackoff(maxBackoff time.Duration) *ExponentialJitterBackoff { - return &ExponentialJitterBackoff{ - maxBackoff: maxBackoff, - maxBackoffAttempts: math.Log2( - float64(maxBackoff) / float64(time.Second)), - randFloat64: rand.CryptoRandFloat64, - } -} - -// BackoffDelay returns the duration to wait before the next attempt should be -// made. Returns an error if unable get a duration. -func (j *ExponentialJitterBackoff) BackoffDelay(attempt int, err error) (time.Duration, error) { - if attempt > int(j.maxBackoffAttempts) { - return j.maxBackoff, nil - } - - b, err := j.randFloat64() - if err != nil { - return 0, err - } - - // [0.0, 1.0) * 2 ^ attempts - ri := int64(1 << uint64(attempt)) - delaySeconds := b * float64(ri) - - return timeconv.FloatSecondsDur(delaySeconds), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go deleted file mode 100644 index 7a3f183018..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/metadata.go +++ /dev/null @@ -1,52 +0,0 @@ -package retry - -import ( - awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" -) - -// attemptResultsKey is a metadata accessor key to retrieve metadata -// for all request attempts. -type attemptResultsKey struct { -} - -// GetAttemptResults retrieves attempts results from middleware metadata. -func GetAttemptResults(metadata middleware.Metadata) (AttemptResults, bool) { - m, ok := metadata.Get(attemptResultsKey{}).(AttemptResults) - return m, ok -} - -// AttemptResults represents struct containing metadata returned by all request attempts. -type AttemptResults struct { - - // Results is a slice consisting attempt result from all request attempts. - // Results are stored in order request attempt is made. - Results []AttemptResult -} - -// AttemptResult represents attempt result returned by a single request attempt. -type AttemptResult struct { - - // Err is the error if received for the request attempt. - Err error - - // Retryable denotes if request may be retried. This states if an - // error is considered retryable. - Retryable bool - - // Retried indicates if this request was retried. - Retried bool - - // ResponseMetadata is any existing metadata passed via the response middlewares. - ResponseMetadata middleware.Metadata -} - -// addAttemptResults adds attempt results to middleware metadata -func addAttemptResults(metadata *middleware.Metadata, v AttemptResults) { - metadata.Set(attemptResultsKey{}, v) -} - -// GetRawResponse returns raw response recorded for the attempt result -func (a AttemptResult) GetRawResponse() interface{} { - return awsmiddle.GetRawResponse(a.ResponseMetadata) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go deleted file mode 100644 index 5549922ab8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/middleware.go +++ /dev/null @@ -1,418 +0,0 @@ -package retry - -import ( - "context" - "errors" - "fmt" - "strconv" - "strings" - "time" - - internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" - "github.com/aws/smithy-go" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - smithymiddle "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - "github.com/aws/smithy-go/transport/http" -) - -// RequestCloner is a function that can take an input request type and clone -// the request for use in a subsequent retry attempt. -type RequestCloner func(interface{}) interface{} - -type retryMetadata struct { - AttemptNum int - AttemptTime time.Time - MaxAttempts int - AttemptClockSkew time.Duration -} - -// Attempt is a Smithy Finalize middleware that handles retry attempts using -// the provided Retryer implementation. -type Attempt struct { - // Enable the logging of retry attempts performed by the SDK. This will - // include logging retry attempts, unretryable errors, and when max - // attempts are reached. - LogAttempts bool - - // A Meter instance for recording retry-related metrics. - OperationMeter metrics.Meter - - retryer aws.RetryerV2 - requestCloner RequestCloner -} - -// define the threshold at which we will consider certain kind of errors to be probably -// caused by clock skew -const skewThreshold = 4 * time.Minute - -// NewAttemptMiddleware returns a new Attempt retry middleware. -func NewAttemptMiddleware(retryer aws.Retryer, requestCloner RequestCloner, optFns ...func(*Attempt)) *Attempt { - m := &Attempt{ - retryer: wrapAsRetryerV2(retryer), - requestCloner: requestCloner, - } - for _, fn := range optFns { - fn(m) - } - if m.OperationMeter == nil { - m.OperationMeter = metrics.NopMeterProvider{}.Meter("") - } - - return m -} - -// ID returns the middleware identifier -func (r *Attempt) ID() string { return "Retry" } - -func (r Attempt) logf(logger logging.Logger, classification logging.Classification, format string, v ...interface{}) { - if !r.LogAttempts { - return - } - logger.Logf(classification, format, v...) -} - -// HandleFinalize utilizes the provider Retryer implementation to attempt -// retries over the next handler -func (r *Attempt) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) ( - out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error, -) { - var attemptNum int - var attemptClockSkew time.Duration - var attemptResults AttemptResults - - maxAttempts := r.retryer.MaxAttempts() - releaseRetryToken := nopRelease - - retryMetrics, err := newAttemptMetrics(r.OperationMeter) - if err != nil { - return out, metadata, err - } - - for { - attemptNum++ - attemptInput := in - attemptInput.Request = r.requestCloner(attemptInput.Request) - - // Record the metadata for the for attempt being started. - attemptCtx := setRetryMetadata(ctx, retryMetadata{ - AttemptNum: attemptNum, - AttemptTime: sdk.NowTime().UTC(), - MaxAttempts: maxAttempts, - AttemptClockSkew: attemptClockSkew, - }) - - // Setting clock skew to be used on other context (like signing) - ctx = internalcontext.SetAttemptSkewContext(ctx, attemptClockSkew) - - var attemptResult AttemptResult - - attemptCtx, span := tracing.StartSpan(attemptCtx, "Attempt", func(o *tracing.SpanOptions) { - o.Properties.Set("operation.attempt", attemptNum) - }) - retryMetrics.Attempts.Add(ctx, 1, withOperationMetadata(ctx)) - - start := sdk.NowTime() - out, attemptResult, releaseRetryToken, err = r.handleAttempt(attemptCtx, attemptInput, releaseRetryToken, next) - elapsed := sdk.NowTime().Sub(start) - - retryMetrics.AttemptDuration.Record(ctx, float64(elapsed)/1e9, withOperationMetadata(ctx)) - if err != nil { - retryMetrics.Errors.Add(ctx, 1, withOperationMetadata(ctx), func(o *metrics.RecordMetricOptions) { - o.Properties.Set("exception.type", errorType(err)) - }) - } - - span.End() - - attemptClockSkew, _ = awsmiddle.GetAttemptSkew(attemptResult.ResponseMetadata) - - // AttemptResult Retried states that the attempt was not successful, and - // should be retried. - shouldRetry := attemptResult.Retried - - // Add attempt metadata to list of all attempt metadata - attemptResults.Results = append(attemptResults.Results, attemptResult) - - if !shouldRetry { - // Ensure the last response's metadata is used as the bases for result - // metadata returned by the stack. The Slice of attempt results - // will be added to this cloned metadata. - metadata = attemptResult.ResponseMetadata.Clone() - - break - } - } - - addAttemptResults(&metadata, attemptResults) - return out, metadata, err -} - -// handleAttempt handles an individual request attempt. -func (r *Attempt) handleAttempt( - ctx context.Context, in smithymiddle.FinalizeInput, releaseRetryToken func(error) error, next smithymiddle.FinalizeHandler, -) ( - out smithymiddle.FinalizeOutput, attemptResult AttemptResult, _ func(error) error, err error, -) { - defer func() { - attemptResult.Err = err - }() - - // Short circuit if this attempt never can succeed because the context is - // canceled. This reduces the chance of token pools being modified for - // attempts that will not be made - select { - case <-ctx.Done(): - return out, attemptResult, nopRelease, ctx.Err() - default: - } - - //------------------------------ - // Get Attempt Token - //------------------------------ - releaseAttemptToken, err := r.retryer.GetAttemptToken(ctx) - if err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to get retry Send token, %w", err) - } - - //------------------------------ - // Send Attempt - //------------------------------ - logger := smithymiddle.GetLogger(ctx) - service, operation := awsmiddle.GetServiceID(ctx), awsmiddle.GetOperationName(ctx) - retryMetadata, _ := getRetryMetadata(ctx) - attemptNum := retryMetadata.AttemptNum - maxAttempts := retryMetadata.MaxAttempts - - // Following attempts must ensure the request payload stream starts in a - // rewound state. - if attemptNum > 1 { - if rewindable, ok := in.Request.(interface{ RewindStream() error }); ok { - if rewindErr := rewindable.RewindStream(); rewindErr != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to rewind transport stream for retry, %w", rewindErr) - } - } - - r.logf(logger, logging.Debug, "retrying request %s/%s, attempt %d", - service, operation, attemptNum) - } - - var metadata smithymiddle.Metadata - out, metadata, err = next.HandleFinalize(ctx, in) - attemptResult.ResponseMetadata = metadata - - //------------------------------ - // Bookkeeping - //------------------------------ - // Release the retry token based on the state of the attempt's error (if any). - if releaseError := releaseRetryToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release retry token after request error, %w", err) - } - // Release the attempt token based on the state of the attempt's error (if any). - if releaseError := releaseAttemptToken(err); releaseError != nil && err != nil { - return out, attemptResult, nopRelease, fmt.Errorf( - "failed to release initial token after request error, %w", err) - } - // If there was no error making the attempt, nothing further to do. There - // will be nothing to retry. - if err == nil { - return out, attemptResult, nopRelease, err - } - - err = wrapAsClockSkew(ctx, err) - - //------------------------------ - // Is Retryable and Should Retry - //------------------------------ - // If the attempt failed with an unretryable error, nothing further to do - // but return, and inform the caller about the terminal failure. - retryable := r.retryer.IsErrorRetryable(err) - if !retryable { - r.logf(logger, logging.Debug, "request failed with unretryable error %v", err) - return out, attemptResult, nopRelease, err - } - - // set retryable to true - attemptResult.Retryable = true - - // Once the maximum number of attempts have been exhausted there is nothing - // further to do other than inform the caller about the terminal failure. - if maxAttempts > 0 && attemptNum >= maxAttempts { - r.logf(logger, logging.Debug, "max retry attempts exhausted, max %d", maxAttempts) - err = &MaxAttemptsError{ - Attempt: attemptNum, - Err: err, - } - return out, attemptResult, nopRelease, err - } - - //------------------------------ - // Get Retry (aka Retry Quota) Token - //------------------------------ - // Get a retry token that will be released after the - releaseRetryToken, retryTokenErr := r.retryer.GetRetryToken(ctx, err) - if retryTokenErr != nil { - return out, attemptResult, nopRelease, errors.Join(err, retryTokenErr) - } - - //------------------------------ - // Retry Delay and Sleep - //------------------------------ - // Get the retry delay before another attempt can be made, and sleep for - // that time. Potentially early exist if the sleep is canceled via the - // context. - retryDelay, reqErr := r.retryer.RetryDelay(attemptNum, err) - if reqErr != nil { - return out, attemptResult, releaseRetryToken, reqErr - } - if reqErr = sdk.SleepWithContext(ctx, retryDelay); reqErr != nil { - err = &aws.RequestCanceledError{Err: reqErr} - return out, attemptResult, releaseRetryToken, err - } - - // The request should be re-attempted. - attemptResult.Retried = true - - return out, attemptResult, releaseRetryToken, err -} - -// errors that, if detected when we know there's a clock skew, -// can be retried and have a high chance of success -var possibleSkewCodes = map[string]struct{}{ - "InvalidSignatureException": {}, - "SignatureDoesNotMatch": {}, - "AuthFailure": {}, -} - -var definiteSkewCodes = map[string]struct{}{ - "RequestExpired": {}, - "RequestInTheFuture": {}, - "RequestTimeTooSkewed": {}, -} - -// wrapAsClockSkew checks if this error could be related to a clock skew -// error and if so, wrap the error. -func wrapAsClockSkew(ctx context.Context, err error) error { - var v interface{ ErrorCode() string } - if !errors.As(err, &v) { - return err - } - if _, ok := definiteSkewCodes[v.ErrorCode()]; ok { - return &retryableClockSkewError{Err: err} - } - _, isPossibleSkewCode := possibleSkewCodes[v.ErrorCode()] - if skew := internalcontext.GetAttemptSkewContext(ctx); skew > skewThreshold && isPossibleSkewCode { - return &retryableClockSkewError{Err: err} - } - return err -} - -// MetricsHeader attaches SDK request metric header for retries to the transport -type MetricsHeader struct{} - -// ID returns the middleware identifier -func (r *MetricsHeader) ID() string { - return "RetryMetricsHeader" -} - -// HandleFinalize attaches the SDK request metric header to the transport layer -func (r MetricsHeader) HandleFinalize(ctx context.Context, in smithymiddle.FinalizeInput, next smithymiddle.FinalizeHandler) ( - out smithymiddle.FinalizeOutput, metadata smithymiddle.Metadata, err error, -) { - retryMetadata, _ := getRetryMetadata(ctx) - - const retryMetricHeader = "Amz-Sdk-Request" - var parts []string - - parts = append(parts, "attempt="+strconv.Itoa(retryMetadata.AttemptNum)) - if retryMetadata.MaxAttempts != 0 { - parts = append(parts, "max="+strconv.Itoa(retryMetadata.MaxAttempts)) - } - - var ttl time.Time - if deadline, ok := ctx.Deadline(); ok { - ttl = deadline - } - - // Only append the TTL if it can be determined. - if !ttl.IsZero() && retryMetadata.AttemptClockSkew > 0 { - const unixTimeFormat = "20060102T150405Z" - ttl = ttl.Add(retryMetadata.AttemptClockSkew) - parts = append(parts, "ttl="+ttl.Format(unixTimeFormat)) - } - - switch req := in.Request.(type) { - case *http.Request: - req.Header[retryMetricHeader] = append(req.Header[retryMetricHeader][:0], strings.Join(parts, "; ")) - default: - return out, metadata, fmt.Errorf("unknown transport type %T", req) - } - - return next.HandleFinalize(ctx, in) -} - -type retryMetadataKey struct{} - -// getRetryMetadata retrieves retryMetadata from the context and a bool -// indicating if it was set. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func getRetryMetadata(ctx context.Context) (metadata retryMetadata, ok bool) { - metadata, ok = smithymiddle.GetStackValue(ctx, retryMetadataKey{}).(retryMetadata) - return metadata, ok -} - -// setRetryMetadata sets the retryMetadata on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func setRetryMetadata(ctx context.Context, metadata retryMetadata) context.Context { - return smithymiddle.WithStackValue(ctx, retryMetadataKey{}, metadata) -} - -// AddRetryMiddlewaresOptions is the set of options that can be passed to -// AddRetryMiddlewares for configuring retry associated middleware. -type AddRetryMiddlewaresOptions struct { - Retryer aws.Retryer - - // Enable the logging of retry attempts performed by the SDK. This will - // include logging retry attempts, unretryable errors, and when max - // attempts are reached. - LogRetryAttempts bool -} - -// AddRetryMiddlewares adds retry middleware to operation middleware stack -func AddRetryMiddlewares(stack *smithymiddle.Stack, options AddRetryMiddlewaresOptions) error { - attempt := NewAttemptMiddleware(options.Retryer, http.RequestCloner, func(middleware *Attempt) { - middleware.LogAttempts = options.LogRetryAttempts - }) - - // index retry to before signing, if signing exists - if err := stack.Finalize.Insert(attempt, "Signing", smithymiddle.Before); err != nil { - return err - } - - if err := stack.Finalize.Insert(&MetricsHeader{}, attempt.ID(), smithymiddle.After); err != nil { - return err - } - return nil -} - -// Determines the value of exception.type for metrics purposes. We prefer an -// API-specific error code, otherwise it's just the Go type for the value. -func errorType(err error) string { - var terr smithy.APIError - if errors.As(err, &terr) { - return terr.ErrorCode() - } - return fmt.Sprintf("%T", err) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go deleted file mode 100644 index af81635b3f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retry.go +++ /dev/null @@ -1,90 +0,0 @@ -package retry - -import ( - "context" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// AddWithErrorCodes returns a Retryer with additional error codes considered -// for determining if the error should be retried. -func AddWithErrorCodes(r aws.Retryer, codes ...string) aws.Retryer { - retryable := &RetryableErrorCode{ - Codes: map[string]struct{}{}, - } - for _, c := range codes { - retryable.Codes[c] = struct{}{} - } - - return &withIsErrorRetryable{ - RetryerV2: wrapAsRetryerV2(r), - Retryable: retryable, - } -} - -type withIsErrorRetryable struct { - aws.RetryerV2 - Retryable IsErrorRetryable -} - -func (r *withIsErrorRetryable) IsErrorRetryable(err error) bool { - if v := r.Retryable.IsErrorRetryable(err); v != aws.UnknownTernary { - return v.Bool() - } - return r.RetryerV2.IsErrorRetryable(err) -} - -// AddWithMaxAttempts returns a Retryer with MaxAttempts set to the value -// specified. -func AddWithMaxAttempts(r aws.Retryer, max int) aws.Retryer { - return &withMaxAttempts{ - RetryerV2: wrapAsRetryerV2(r), - Max: max, - } -} - -type withMaxAttempts struct { - aws.RetryerV2 - Max int -} - -func (w *withMaxAttempts) MaxAttempts() int { - return w.Max -} - -// AddWithMaxBackoffDelay returns a retryer wrapping the passed in retryer -// overriding the RetryDelay behavior for a alternate minimum initial backoff -// delay. -func AddWithMaxBackoffDelay(r aws.Retryer, delay time.Duration) aws.Retryer { - return &withMaxBackoffDelay{ - RetryerV2: wrapAsRetryerV2(r), - backoff: NewExponentialJitterBackoff(delay), - } -} - -type withMaxBackoffDelay struct { - aws.RetryerV2 - backoff *ExponentialJitterBackoff -} - -func (r *withMaxBackoffDelay) RetryDelay(attempt int, err error) (time.Duration, error) { - return r.backoff.BackoffDelay(attempt, err) -} - -type wrappedAsRetryerV2 struct { - aws.Retryer -} - -func wrapAsRetryerV2(r aws.Retryer) aws.RetryerV2 { - v, ok := r.(aws.RetryerV2) - if !ok { - v = wrappedAsRetryerV2{Retryer: r} - } - - return v -} - -func (w wrappedAsRetryerV2) GetAttemptToken(context.Context) (func(error) error, error) { - return w.Retryer.GetInitialToken(), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go deleted file mode 100644 index 1b485f9988..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/retryable_error.go +++ /dev/null @@ -1,228 +0,0 @@ -package retry - -import ( - "errors" - "fmt" - "net" - "net/url" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorRetryable provides the interface of an implementation to determine if -// a error as the result of an operation is retryable. -type IsErrorRetryable interface { - IsErrorRetryable(error) aws.Ternary -} - -// IsErrorRetryables is a collection of checks to determine of the error is -// retryable. Iterates through the checks and returns the state of retryable -// if any check returns something other than unknown. -type IsErrorRetryables []IsErrorRetryable - -// IsErrorRetryable returns if the error is retryable if any of the checks in -// the list return a value other than unknown. -func (r IsErrorRetryables) IsErrorRetryable(err error) aws.Ternary { - for _, re := range r { - if v := re.IsErrorRetryable(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorRetryableFunc wraps a function with the IsErrorRetryable interface. -type IsErrorRetryableFunc func(error) aws.Ternary - -// IsErrorRetryable returns if the error is retryable. -func (fn IsErrorRetryableFunc) IsErrorRetryable(err error) aws.Ternary { - return fn(err) -} - -// RetryableError is an IsErrorRetryable implementation which uses the -// optional interface Retryable on the error value to determine if the error is -// retryable. -type RetryableError struct{} - -// IsErrorRetryable returns if the error is retryable if it satisfies the -// Retryable interface, and returns if the attempt should be retried. -func (RetryableError) IsErrorRetryable(err error) aws.Ternary { - var v interface{ RetryableError() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - return aws.BoolTernary(v.RetryableError()) -} - -// NoRetryCanceledError detects if the error was an request canceled error and -// returns if so. -type NoRetryCanceledError struct{} - -// IsErrorRetryable returns the error is not retryable if the request was -// canceled. -func (NoRetryCanceledError) IsErrorRetryable(err error) aws.Ternary { - var v interface{ CanceledError() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - if v.CanceledError() { - return aws.FalseTernary - } - return aws.UnknownTernary -} - -// RetryableConnectionError determines if the underlying error is an HTTP -// connection and returns if it should be retried. -// -// Includes errors such as connection reset, connection refused, net dial, -// temporary, and timeout errors. -type RetryableConnectionError struct{} - -// IsErrorRetryable returns if the error is caused by and HTTP connection -// error, and should be retried. -func (r RetryableConnectionError) IsErrorRetryable(err error) aws.Ternary { - if err == nil { - return aws.UnknownTernary - } - var retryable bool - - var conErr interface{ ConnectionError() bool } - var tempErr interface{ Temporary() bool } - var timeoutErr interface{ Timeout() bool } - var urlErr *url.Error - var netOpErr *net.OpError - var dnsError *net.DNSError - - if errors.As(err, &dnsError) { - // NXDOMAIN errors should not be retried - if dnsError.IsNotFound { - return aws.BoolTernary(false) - } - - // if !dnsError.Temporary(), error may or may not be temporary, - // (i.e. !Temporary() =/=> !retryable) so we should fall through to - // remaining checks - if dnsError.Temporary() { - return aws.BoolTernary(true) - } - } - - switch { - case errors.As(err, &conErr) && conErr.ConnectionError(): - retryable = true - - case strings.Contains(err.Error(), "use of closed network connection"): - fallthrough - case strings.Contains(err.Error(), "connection reset"): - // The errors "connection reset" and "use of closed network connection" - // are effectively the same. It appears to be the difference between - // sync and async read of TCP RST in the stdlib's net.Conn read loop. - // see #2737 - retryable = true - - case errors.As(err, &urlErr): - // Refused connections should be retried as the service may not yet be - // running on the port. Go TCP dial considers refused connections as - // not temporary. - if strings.Contains(urlErr.Error(), "connection refused") { - retryable = true - } else { - return r.IsErrorRetryable(errors.Unwrap(urlErr)) - } - - case errors.As(err, &netOpErr): - // Network dial, or temporary network errors are always retryable. - if strings.EqualFold(netOpErr.Op, "dial") || netOpErr.Temporary() { - retryable = true - } else { - return r.IsErrorRetryable(errors.Unwrap(netOpErr)) - } - - case errors.As(err, &tempErr) && tempErr.Temporary(): - // Fallback to the generic temporary check, with temporary errors - // retryable. - retryable = true - - case errors.As(err, &timeoutErr) && timeoutErr.Timeout(): - // Fallback to the generic timeout check, with timeout errors - // retryable. - retryable = true - - default: - return aws.UnknownTernary - } - - return aws.BoolTernary(retryable) - -} - -// RetryableHTTPStatusCode provides a IsErrorRetryable based on HTTP status -// codes. -type RetryableHTTPStatusCode struct { - Codes map[int]struct{} -} - -// IsErrorRetryable return if the passed in error is retryable based on the -// HTTP status code. -func (r RetryableHTTPStatusCode) IsErrorRetryable(err error) aws.Ternary { - var v interface{ HTTPStatusCode() int } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.HTTPStatusCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} - -// RetryableErrorCode determines if an attempt should be retried based on the -// API error code. -type RetryableErrorCode struct { - Codes map[string]struct{} -} - -// IsErrorRetryable return if the error is retryable based on the error codes. -// Returns unknown if the error doesn't have a code or it is unknown. -func (r RetryableErrorCode) IsErrorRetryable(err error) aws.Ternary { - var v interface{ ErrorCode() string } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.ErrorCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} - -// retryableClockSkewError marks errors that can be caused by clock skew -// (difference between server time and client time). -// This is returned when there's certain confidence that adjusting the client time -// could allow a retry to succeed -type retryableClockSkewError struct{ Err error } - -func (e *retryableClockSkewError) Error() string { - return fmt.Sprintf("Probable clock skew error: %v", e.Err) -} - -// Unwrap returns the wrapped error. -func (e *retryableClockSkewError) Unwrap() error { - return e.Err -} - -// RetryableError allows the retryer to retry this request -func (e *retryableClockSkewError) RetryableError() bool { - return true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go deleted file mode 100644 index d5ea93222e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/standard.go +++ /dev/null @@ -1,269 +0,0 @@ -package retry - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws/ratelimit" -) - -// BackoffDelayer provides the interface for determining the delay to before -// another request attempt, that previously failed. -type BackoffDelayer interface { - BackoffDelay(attempt int, err error) (time.Duration, error) -} - -// BackoffDelayerFunc provides a wrapper around a function to determine the -// backoff delay of an attempt retry. -type BackoffDelayerFunc func(int, error) (time.Duration, error) - -// BackoffDelay returns the delay before attempt to retry a request. -func (fn BackoffDelayerFunc) BackoffDelay(attempt int, err error) (time.Duration, error) { - return fn(attempt, err) -} - -const ( - // DefaultMaxAttempts is the maximum of attempts for an API request - DefaultMaxAttempts int = 3 - - // DefaultMaxBackoff is the maximum back off delay between attempts - DefaultMaxBackoff time.Duration = 20 * time.Second -) - -// Default retry token quota values. -const ( - DefaultRetryRateTokens uint = 500 - DefaultRetryCost uint = 5 - DefaultRetryTimeoutCost uint = 10 - DefaultNoRetryIncrement uint = 1 -) - -// DefaultRetryableHTTPStatusCodes is the default set of HTTP status codes the SDK -// should consider as retryable errors. -var DefaultRetryableHTTPStatusCodes = map[int]struct{}{ - 500: {}, - 502: {}, - 503: {}, - 504: {}, -} - -// DefaultRetryableErrorCodes provides the set of API error codes that should -// be retried. -var DefaultRetryableErrorCodes = map[string]struct{}{ - "RequestTimeout": {}, - "RequestTimeoutException": {}, -} - -// DefaultThrottleErrorCodes provides the set of API error codes that are -// considered throttle errors. -var DefaultThrottleErrorCodes = map[string]struct{}{ - "Throttling": {}, - "ThrottlingException": {}, - "ThrottledException": {}, - "RequestThrottledException": {}, - "TooManyRequestsException": {}, - "ProvisionedThroughputExceededException": {}, - "TransactionInProgressException": {}, - "RequestLimitExceeded": {}, - "BandwidthLimitExceeded": {}, - "LimitExceededException": {}, - "RequestThrottled": {}, - "SlowDown": {}, - "PriorRequestNotComplete": {}, - "EC2ThrottledException": {}, -} - -// DefaultRetryables provides the set of retryable checks that are used by -// default. -var DefaultRetryables = []IsErrorRetryable{ - NoRetryCanceledError{}, - RetryableError{}, - RetryableConnectionError{}, - RetryableHTTPStatusCode{ - Codes: DefaultRetryableHTTPStatusCodes, - }, - RetryableErrorCode{ - Codes: DefaultRetryableErrorCodes, - }, - RetryableErrorCode{ - Codes: DefaultThrottleErrorCodes, - }, -} - -// DefaultTimeouts provides the set of timeout checks that are used by default. -var DefaultTimeouts = []IsErrorTimeout{ - TimeouterError{}, -} - -// StandardOptions provides the functional options for configuring the standard -// retryable, and delay behavior. -type StandardOptions struct { - // Maximum number of attempts that should be made. - MaxAttempts int - - // MaxBackoff duration between retried attempts. - MaxBackoff time.Duration - - // Provides the backoff strategy the retryer will use to determine the - // delay between retry attempts. - Backoff BackoffDelayer - - // Set of strategies to determine if the attempt should be retried based on - // the error response received. - // - // It is safe to append to this list in NewStandard's functional options. - Retryables []IsErrorRetryable - - // Set of strategies to determine if the attempt failed due to a timeout - // error. - // - // It is safe to append to this list in NewStandard's functional options. - Timeouts []IsErrorTimeout - - // Provides the rate limiting strategy for rate limiting attempt retries - // across all attempts the retryer is being used with. - // - // A RateLimiter operates as a token bucket with a set capacity, where - // attempt failures events consume tokens. A retry attempt that attempts to - // consume more tokens than what's available results in operation failure. - // The default implementation is parameterized as follows: - // - a capacity of 500 (DefaultRetryRateTokens) - // - a retry caused by a timeout costs 10 tokens (DefaultRetryCost) - // - a retry caused by other errors costs 5 tokens (DefaultRetryTimeoutCost) - // - an operation that succeeds on the 1st attempt adds 1 token (DefaultNoRetryIncrement) - // - // You can disable rate limiting by setting this field to ratelimit.None. - RateLimiter RateLimiter - - // The cost to deduct from the RateLimiter's token bucket per retry. - RetryCost uint - - // The cost to deduct from the RateLimiter's token bucket per retry caused - // by timeout error. - RetryTimeoutCost uint - - // The cost to payback to the RateLimiter's token bucket for successful - // attempts. - NoRetryIncrement uint -} - -// RateLimiter provides the interface for limiting the rate of attempt retries -// allowed by the retryer. -type RateLimiter interface { - GetToken(ctx context.Context, cost uint) (releaseToken func() error, err error) - AddTokens(uint) error -} - -// Standard is the standard retry pattern for the SDK. It uses a set of -// retryable checks to determine of the failed attempt should be retried, and -// what retry delay should be used. -type Standard struct { - options StandardOptions - - timeout IsErrorTimeout - retryable IsErrorRetryable - backoff BackoffDelayer -} - -// NewStandard initializes a standard retry behavior with defaults that can be -// overridden via functional options. -func NewStandard(fnOpts ...func(*StandardOptions)) *Standard { - o := StandardOptions{ - MaxAttempts: DefaultMaxAttempts, - MaxBackoff: DefaultMaxBackoff, - Retryables: append([]IsErrorRetryable{}, DefaultRetryables...), - Timeouts: append([]IsErrorTimeout{}, DefaultTimeouts...), - - RateLimiter: ratelimit.NewTokenRateLimit(DefaultRetryRateTokens), - RetryCost: DefaultRetryCost, - RetryTimeoutCost: DefaultRetryTimeoutCost, - NoRetryIncrement: DefaultNoRetryIncrement, - } - for _, fn := range fnOpts { - fn(&o) - } - if o.MaxAttempts <= 0 { - o.MaxAttempts = DefaultMaxAttempts - } - - backoff := o.Backoff - if backoff == nil { - backoff = NewExponentialJitterBackoff(o.MaxBackoff) - } - - return &Standard{ - options: o, - backoff: backoff, - retryable: IsErrorRetryables(o.Retryables), - timeout: IsErrorTimeouts(o.Timeouts), - } -} - -// MaxAttempts returns the maximum number of attempts that can be made for a -// request before failing. -func (s *Standard) MaxAttempts() int { - return s.options.MaxAttempts -} - -// IsErrorRetryable returns if the error is can be retried or not. Should not -// consider the number of attempts made. -func (s *Standard) IsErrorRetryable(err error) bool { - return s.retryable.IsErrorRetryable(err).Bool() -} - -// RetryDelay returns the delay to use before another request attempt is made. -func (s *Standard) RetryDelay(attempt int, err error) (time.Duration, error) { - return s.backoff.BackoffDelay(attempt, err) -} - -// GetAttemptToken returns the token to be released after then attempt completes. -// The release token will add NoRetryIncrement to the RateLimiter token pool if -// the attempt was successful. If the attempt failed, nothing will be done. -func (s *Standard) GetAttemptToken(context.Context) (func(error) error, error) { - return s.GetInitialToken(), nil -} - -// GetInitialToken returns a token for adding the NoRetryIncrement to the -// RateLimiter token if the attempt completed successfully without error. -// -// InitialToken applies to result of the each attempt, including the first. -// Whereas the RetryToken applies to the result of subsequent attempts. -// -// Deprecated: use GetAttemptToken instead. -func (s *Standard) GetInitialToken() func(error) error { - return releaseToken(s.noRetryIncrement).release -} - -func (s *Standard) noRetryIncrement() error { - return s.options.RateLimiter.AddTokens(s.options.NoRetryIncrement) -} - -// GetRetryToken attempts to deduct the retry cost from the retry token pool. -// Returning the token release function, or error. -func (s *Standard) GetRetryToken(ctx context.Context, opErr error) (func(error) error, error) { - cost := s.options.RetryCost - - if s.timeout.IsErrorTimeout(opErr).Bool() { - cost = s.options.RetryTimeoutCost - } - - fn, err := s.options.RateLimiter.GetToken(ctx, cost) - if err != nil { - return nil, fmt.Errorf("failed to get rate limit token, %w", err) - } - - return releaseToken(fn).release, nil -} - -func nopRelease(error) error { return nil } - -type releaseToken func() error - -func (f releaseToken) release(err error) error { - if err != nil { - return nil - } - - return f() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go deleted file mode 100644 index c4b844d15f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/throttle_error.go +++ /dev/null @@ -1,60 +0,0 @@ -package retry - -import ( - "errors" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorThrottle provides the interface of an implementation to determine if -// a error response from an operation is a throttling error. -type IsErrorThrottle interface { - IsErrorThrottle(error) aws.Ternary -} - -// IsErrorThrottles is a collection of checks to determine of the error a -// throttle error. Iterates through the checks and returns the state of -// throttle if any check returns something other than unknown. -type IsErrorThrottles []IsErrorThrottle - -// IsErrorThrottle returns if the error is a throttle error if any of the -// checks in the list return a value other than unknown. -func (r IsErrorThrottles) IsErrorThrottle(err error) aws.Ternary { - for _, re := range r { - if v := re.IsErrorThrottle(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorThrottleFunc wraps a function with the IsErrorThrottle interface. -type IsErrorThrottleFunc func(error) aws.Ternary - -// IsErrorThrottle returns if the error is a throttle error. -func (fn IsErrorThrottleFunc) IsErrorThrottle(err error) aws.Ternary { - return fn(err) -} - -// ThrottleErrorCode determines if an attempt should be retried based on the -// API error code. -type ThrottleErrorCode struct { - Codes map[string]struct{} -} - -// IsErrorThrottle return if the error is a throttle error based on the error -// codes. Returns unknown if the error doesn't have a code or it is unknown. -func (r ThrottleErrorCode) IsErrorThrottle(err error) aws.Ternary { - var v interface{ ErrorCode() string } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - _, ok := r.Codes[v.ErrorCode()] - if !ok { - return aws.UnknownTernary - } - - return aws.TrueTernary -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go deleted file mode 100644 index 3d47870d2d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retry/timeout_error.go +++ /dev/null @@ -1,52 +0,0 @@ -package retry - -import ( - "errors" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// IsErrorTimeout provides the interface of an implementation to determine if -// a error matches. -type IsErrorTimeout interface { - IsErrorTimeout(err error) aws.Ternary -} - -// IsErrorTimeouts is a collection of checks to determine of the error is -// retryable. Iterates through the checks and returns the state of retryable -// if any check returns something other than unknown. -type IsErrorTimeouts []IsErrorTimeout - -// IsErrorTimeout returns if the error is retryable if any of the checks in -// the list return a value other than unknown. -func (ts IsErrorTimeouts) IsErrorTimeout(err error) aws.Ternary { - for _, t := range ts { - if v := t.IsErrorTimeout(err); v != aws.UnknownTernary { - return v - } - } - return aws.UnknownTernary -} - -// IsErrorTimeoutFunc wraps a function with the IsErrorTimeout interface. -type IsErrorTimeoutFunc func(error) aws.Ternary - -// IsErrorTimeout returns if the error is retryable. -func (fn IsErrorTimeoutFunc) IsErrorTimeout(err error) aws.Ternary { - return fn(err) -} - -// TimeouterError provides the IsErrorTimeout implementation for determining if -// an error is a timeout based on type with the Timeout method. -type TimeouterError struct{} - -// IsErrorTimeout returns if the error is a timeout error. -func (t TimeouterError) IsErrorTimeout(err error) aws.Ternary { - var v interface{ Timeout() bool } - - if !errors.As(err, &v) { - return aws.UnknownTernary - } - - return aws.BoolTernary(v.Timeout()) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go deleted file mode 100644 index b0ba4cb2f0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/retryer.go +++ /dev/null @@ -1,127 +0,0 @@ -package aws - -import ( - "context" - "fmt" - "time" -) - -// RetryMode provides the mode the API client will use to create a retryer -// based on. -type RetryMode string - -const ( - // RetryModeStandard model provides rate limited retry attempts with - // exponential backoff delay. - RetryModeStandard RetryMode = "standard" - - // RetryModeAdaptive model provides attempt send rate limiting on throttle - // responses in addition to standard mode's retry rate limiting. - // - // Adaptive retry mode is experimental and is subject to change in the - // future. - RetryModeAdaptive RetryMode = "adaptive" -) - -// ParseRetryMode attempts to parse a RetryMode from the given string. -// Returning error if the value is not a known RetryMode. -func ParseRetryMode(v string) (mode RetryMode, err error) { - switch v { - case "standard": - return RetryModeStandard, nil - case "adaptive": - return RetryModeAdaptive, nil - default: - return mode, fmt.Errorf("unknown RetryMode, %v", v) - } -} - -func (m RetryMode) String() string { return string(m) } - -// Retryer is an interface to determine if a given error from a -// attempt should be retried, and if so what backoff delay to apply. The -// default implementation used by most services is the retry package's Standard -// type. Which contains basic retry logic using exponential backoff. -type Retryer interface { - // IsErrorRetryable returns if the failed attempt is retryable. This check - // should determine if the error can be retried, or if the error is - // terminal. - IsErrorRetryable(error) bool - - // MaxAttempts returns the maximum number of attempts that can be made for - // an attempt before failing. A value of 0 implies that the attempt should - // be retried until it succeeds if the errors are retryable. - MaxAttempts() int - - // RetryDelay returns the delay that should be used before retrying the - // attempt. Will return error if the delay could not be determined. - RetryDelay(attempt int, opErr error) (time.Duration, error) - - // GetRetryToken attempts to deduct the retry cost from the retry token pool. - // Returning the token release function, or error. - GetRetryToken(ctx context.Context, opErr error) (releaseToken func(error) error, err error) - - // GetInitialToken returns the initial attempt token that can increment the - // retry token pool if the attempt is successful. - GetInitialToken() (releaseToken func(error) error) -} - -// RetryerV2 is an interface to determine if a given error from an attempt -// should be retried, and if so what backoff delay to apply. The default -// implementation used by most services is the retry package's Standard type. -// Which contains basic retry logic using exponential backoff. -// -// RetryerV2 replaces the Retryer interface, deprecating the GetInitialToken -// method in favor of GetAttemptToken which takes a context, and can return an error. -// -// The SDK's retry package's Attempt middleware, and utilities will always -// wrap a Retryer as a RetryerV2. Delegating to GetInitialToken, only if -// GetAttemptToken is not implemented. -type RetryerV2 interface { - Retryer - - // GetInitialToken returns the initial attempt token that can increment the - // retry token pool if the attempt is successful. - // - // Deprecated: This method does not provide a way to block using Context, - // nor can it return an error. Use RetryerV2, and GetAttemptToken instead. - GetInitialToken() (releaseToken func(error) error) - - // GetAttemptToken returns the send token that can be used to rate limit - // attempt calls. Will be used by the SDK's retry package's Attempt - // middleware to get a send token prior to calling the temp and releasing - // the send token after the attempt has been made. - GetAttemptToken(context.Context) (func(error) error, error) -} - -// NopRetryer provides a RequestRetryDecider implementation that will flag -// all attempt errors as not retryable, with a max attempts of 1. -type NopRetryer struct{} - -// IsErrorRetryable returns false for all error values. -func (NopRetryer) IsErrorRetryable(error) bool { return false } - -// MaxAttempts always returns 1 for the original attempt. -func (NopRetryer) MaxAttempts() int { return 1 } - -// RetryDelay is not valid for the NopRetryer. Will always return error. -func (NopRetryer) RetryDelay(int, error) (time.Duration, error) { - return 0, fmt.Errorf("not retrying any attempt errors") -} - -// GetRetryToken returns a stub function that does nothing. -func (NopRetryer) GetRetryToken(context.Context, error) (func(error) error, error) { - return nopReleaseToken, nil -} - -// GetInitialToken returns a stub function that does nothing. -func (NopRetryer) GetInitialToken() func(error) error { - return nopReleaseToken -} - -// GetAttemptToken returns a stub function that does nothing. -func (NopRetryer) GetAttemptToken(context.Context) (func(error) error, error) { - return nopReleaseToken, nil -} - -func nopReleaseToken(error) error { return nil } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go deleted file mode 100644 index 3af9b2b336..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/runtime.go +++ /dev/null @@ -1,14 +0,0 @@ -package aws - -// ExecutionEnvironmentID is the AWS execution environment runtime identifier. -type ExecutionEnvironmentID string - -// RuntimeEnvironment is a collection of values that are determined at runtime -// based on the environment that the SDK is executing in. Some of these values -// may or may not be present based on the executing environment and certain SDK -// configuration properties that drive whether these values are populated.. -type RuntimeEnvironment struct { - EnvironmentIdentifier ExecutionEnvironmentID - Region string - EC2InstanceMetadataRegion string -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go deleted file mode 100644 index cbf22f1d0b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/cache.go +++ /dev/null @@ -1,115 +0,0 @@ -package v4 - -import ( - "strings" - "sync" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -func lookupKey(service, region string) string { - var s strings.Builder - s.Grow(len(region) + len(service) + 3) - s.WriteString(region) - s.WriteRune('/') - s.WriteString(service) - return s.String() -} - -type derivedKey struct { - AccessKey string - Date time.Time - Credential []byte -} - -type derivedKeyCache struct { - values map[string]derivedKey - mutex sync.RWMutex -} - -func newDerivedKeyCache() derivedKeyCache { - return derivedKeyCache{ - values: make(map[string]derivedKey), - } -} - -func (s *derivedKeyCache) Get(credentials aws.Credentials, service, region string, signingTime SigningTime) []byte { - key := lookupKey(service, region) - s.mutex.RLock() - if cred, ok := s.get(key, credentials, signingTime.Time); ok { - s.mutex.RUnlock() - return cred - } - s.mutex.RUnlock() - - s.mutex.Lock() - if cred, ok := s.get(key, credentials, signingTime.Time); ok { - s.mutex.Unlock() - return cred - } - cred := deriveKey(credentials.SecretAccessKey, service, region, signingTime) - entry := derivedKey{ - AccessKey: credentials.AccessKeyID, - Date: signingTime.Time, - Credential: cred, - } - s.values[key] = entry - s.mutex.Unlock() - - return cred -} - -func (s *derivedKeyCache) get(key string, credentials aws.Credentials, signingTime time.Time) ([]byte, bool) { - cacheEntry, ok := s.retrieveFromCache(key) - if ok && cacheEntry.AccessKey == credentials.AccessKeyID && isSameDay(signingTime, cacheEntry.Date) { - return cacheEntry.Credential, true - } - return nil, false -} - -func (s *derivedKeyCache) retrieveFromCache(key string) (derivedKey, bool) { - if v, ok := s.values[key]; ok { - return v, true - } - return derivedKey{}, false -} - -// SigningKeyDeriver derives a signing key from a set of credentials -type SigningKeyDeriver struct { - cache derivedKeyCache -} - -// NewSigningKeyDeriver returns a new SigningKeyDeriver -func NewSigningKeyDeriver() *SigningKeyDeriver { - return &SigningKeyDeriver{ - cache: newDerivedKeyCache(), - } -} - -// DeriveKey returns a derived signing key from the given credentials to be used with SigV4 signing. -func (k *SigningKeyDeriver) DeriveKey(credential aws.Credentials, service, region string, signingTime SigningTime) []byte { - return k.cache.Get(credential, service, region, signingTime) -} - -func deriveKey(secret, service, region string, t SigningTime) []byte { - hmacDate := HMACSHA256([]byte("AWS4"+secret), []byte(t.ShortTimeFormat())) - hmacRegion := HMACSHA256(hmacDate, []byte(region)) - hmacService := HMACSHA256(hmacRegion, []byte(service)) - return HMACSHA256(hmacService, []byte("aws4_request")) -} - -func isSameDay(x, y time.Time) bool { - xYear, xMonth, xDay := x.Date() - yYear, yMonth, yDay := y.Date() - - if xYear != yYear { - return false - } - - if xMonth != yMonth { - return false - } - - return xDay == yDay -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go deleted file mode 100644 index a23cb003bf..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/const.go +++ /dev/null @@ -1,40 +0,0 @@ -package v4 - -// Signature Version 4 (SigV4) Constants -const ( - // EmptyStringSHA256 is the hex encoded sha256 value of an empty string - EmptyStringSHA256 = `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` - - // UnsignedPayload indicates that the request payload body is unsigned - UnsignedPayload = "UNSIGNED-PAYLOAD" - - // AmzAlgorithmKey indicates the signing algorithm - AmzAlgorithmKey = "X-Amz-Algorithm" - - // AmzSecurityTokenKey indicates the security token to be used with temporary credentials - AmzSecurityTokenKey = "X-Amz-Security-Token" - - // AmzDateKey is the UTC timestamp for the request in the format YYYYMMDD'T'HHMMSS'Z' - AmzDateKey = "X-Amz-Date" - - // AmzCredentialKey is the access key ID and credential scope - AmzCredentialKey = "X-Amz-Credential" - - // AmzSignedHeadersKey is the set of headers signed for the request - AmzSignedHeadersKey = "X-Amz-SignedHeaders" - - // AmzSignatureKey is the query parameter to store the SigV4 signature - AmzSignatureKey = "X-Amz-Signature" - - // TimeFormat is the time format to be used in the X-Amz-Date header or query parameter - TimeFormat = "20060102T150405Z" - - // ShortTimeFormat is the shorten time format used in the credential scope - ShortTimeFormat = "20060102" - - // ContentSHAKey is the SHA256 of request body - ContentSHAKey = "X-Amz-Content-Sha256" - - // StreamingEventsPayload indicates that the request payload body is a signed event stream. - StreamingEventsPayload = "STREAMING-AWS4-HMAC-SHA256-EVENTS" -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go deleted file mode 100644 index c61955ad5b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/header_rules.go +++ /dev/null @@ -1,82 +0,0 @@ -package v4 - -import ( - sdkstrings "github.com/aws/aws-sdk-go-v2/internal/strings" -) - -// Rules houses a set of Rule needed for validation of a -// string value -type Rules []Rule - -// Rule interface allows for more flexible rules and just simply -// checks whether or not a value adheres to that Rule -type Rule interface { - IsValid(value string) bool -} - -// IsValid will iterate through all rules and see if any rules -// apply to the value and supports nested rules -func (r Rules) IsValid(value string) bool { - for _, rule := range r { - if rule.IsValid(value) { - return true - } - } - return false -} - -// MapRule generic Rule for maps -type MapRule map[string]struct{} - -// IsValid for the map Rule satisfies whether it exists in the map -func (m MapRule) IsValid(value string) bool { - _, ok := m[value] - return ok -} - -// AllowList is a generic Rule for include listing -type AllowList struct { - Rule -} - -// IsValid for AllowList checks if the value is within the AllowList -func (w AllowList) IsValid(value string) bool { - return w.Rule.IsValid(value) -} - -// ExcludeList is a generic Rule for exclude listing -type ExcludeList struct { - Rule -} - -// IsValid for AllowList checks if the value is within the AllowList -func (b ExcludeList) IsValid(value string) bool { - return !b.Rule.IsValid(value) -} - -// Patterns is a list of strings to match against -type Patterns []string - -// IsValid for Patterns checks each pattern and returns if a match has -// been found -func (p Patterns) IsValid(value string) bool { - for _, pattern := range p { - if sdkstrings.HasPrefixFold(value, pattern) { - return true - } - } - return false -} - -// InclusiveRules rules allow for rules to depend on one another -type InclusiveRules []Rule - -// IsValid will return true if all rules are true -func (r InclusiveRules) IsValid(value string) bool { - for _, rule := range r { - if !rule.IsValid(value) { - return false - } - } - return true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go deleted file mode 100644 index d99b32ceb0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/headers.go +++ /dev/null @@ -1,70 +0,0 @@ -package v4 - -// IgnoredHeaders is a list of headers that are ignored during signing -var IgnoredHeaders = Rules{ - ExcludeList{ - MapRule{ - "Authorization": struct{}{}, - "User-Agent": struct{}{}, - "X-Amzn-Trace-Id": struct{}{}, - "Expect": struct{}{}, - "Transfer-Encoding": struct{}{}, - }, - }, -} - -// RequiredSignedHeaders is a allow list for Build canonical headers. -var RequiredSignedHeaders = Rules{ - AllowList{ - MapRule{ - "Cache-Control": struct{}{}, - "Content-Disposition": struct{}{}, - "Content-Encoding": struct{}{}, - "Content-Language": struct{}{}, - "Content-Md5": struct{}{}, - "Content-Type": struct{}{}, - "Expires": struct{}{}, - "If-Match": struct{}{}, - "If-Modified-Since": struct{}{}, - "If-None-Match": struct{}{}, - "If-Unmodified-Since": struct{}{}, - "Range": struct{}{}, - "X-Amz-Acl": struct{}{}, - "X-Amz-Copy-Source": struct{}{}, - "X-Amz-Copy-Source-If-Match": struct{}{}, - "X-Amz-Copy-Source-If-Modified-Since": struct{}{}, - "X-Amz-Copy-Source-If-None-Match": struct{}{}, - "X-Amz-Copy-Source-If-Unmodified-Since": struct{}{}, - "X-Amz-Copy-Source-Range": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Algorithm": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key": struct{}{}, - "X-Amz-Copy-Source-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, - "X-Amz-Grant-Full-control": struct{}{}, - "X-Amz-Grant-Read": struct{}{}, - "X-Amz-Grant-Read-Acp": struct{}{}, - "X-Amz-Grant-Write": struct{}{}, - "X-Amz-Grant-Write-Acp": struct{}{}, - "X-Amz-Metadata-Directive": struct{}{}, - "X-Amz-Mfa": struct{}{}, - "X-Amz-Server-Side-Encryption": struct{}{}, - "X-Amz-Server-Side-Encryption-Aws-Kms-Key-Id": struct{}{}, - "X-Amz-Server-Side-Encryption-Context": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Algorithm": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Key": struct{}{}, - "X-Amz-Server-Side-Encryption-Customer-Key-Md5": struct{}{}, - "X-Amz-Storage-Class": struct{}{}, - "X-Amz-Website-Redirect-Location": struct{}{}, - "X-Amz-Content-Sha256": struct{}{}, - "X-Amz-Tagging": struct{}{}, - }, - }, - Patterns{"X-Amz-Object-Lock-"}, - Patterns{"X-Amz-Meta-"}, -} - -// AllowedQueryHoisting is a allowed list for Build query headers. The boolean value -// represents whether or not it is a pattern. -var AllowedQueryHoisting = InclusiveRules{ - ExcludeList{RequiredSignedHeaders}, - Patterns{"X-Amz-"}, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go deleted file mode 100644 index e7fa7a1b1e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/hmac.go +++ /dev/null @@ -1,13 +0,0 @@ -package v4 - -import ( - "crypto/hmac" - "crypto/sha256" -) - -// HMACSHA256 computes a HMAC-SHA256 of data given the provided key. -func HMACSHA256(key []byte, data []byte) []byte { - hash := hmac.New(sha256.New, key) - hash.Write(data) - return hash.Sum(nil) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go deleted file mode 100644 index bf93659a43..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/host.go +++ /dev/null @@ -1,75 +0,0 @@ -package v4 - -import ( - "net/http" - "strings" -) - -// SanitizeHostForHeader removes default port from host and updates request.Host -func SanitizeHostForHeader(r *http.Request) { - host := getHost(r) - port := portOnly(host) - if port != "" && isDefaultPort(r.URL.Scheme, port) { - r.Host = stripPort(host) - } -} - -// Returns host from request -func getHost(r *http.Request) string { - if r.Host != "" { - return r.Host - } - - return r.URL.Host -} - -// Hostname returns u.Host, without any port number. -// -// If Host is an IPv6 literal with a port number, Hostname returns the -// IPv6 literal without the square brackets. IPv6 literals may include -// a zone identifier. -// -// Copied from the Go 1.8 standard library (net/url) -func stripPort(hostport string) string { - colon := strings.IndexByte(hostport, ':') - if colon == -1 { - return hostport - } - if i := strings.IndexByte(hostport, ']'); i != -1 { - return strings.TrimPrefix(hostport[:i], "[") - } - return hostport[:colon] -} - -// Port returns the port part of u.Host, without the leading colon. -// If u.Host doesn't contain a port, Port returns an empty string. -// -// Copied from the Go 1.8 standard library (net/url) -func portOnly(hostport string) string { - colon := strings.IndexByte(hostport, ':') - if colon == -1 { - return "" - } - if i := strings.Index(hostport, "]:"); i != -1 { - return hostport[i+len("]:"):] - } - if strings.Contains(hostport, "]") { - return "" - } - return hostport[colon+len(":"):] -} - -// Returns true if the specified URI is using the standard port -// (i.e. port 80 for HTTP URIs or 443 for HTTPS URIs) -func isDefaultPort(scheme, port string) bool { - if port == "" { - return true - } - - lowerCaseScheme := strings.ToLower(scheme) - if (lowerCaseScheme == "http" && port == "80") || (lowerCaseScheme == "https" && port == "443") { - return true - } - - return false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go deleted file mode 100644 index fc7887909e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/scope.go +++ /dev/null @@ -1,13 +0,0 @@ -package v4 - -import "strings" - -// BuildCredentialScope builds the Signature Version 4 (SigV4) signing scope -func BuildCredentialScope(signingTime SigningTime, region, service string) string { - return strings.Join([]string{ - signingTime.ShortTimeFormat(), - region, - service, - "aws4_request", - }, "/") -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go deleted file mode 100644 index 1de06a765d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/time.go +++ /dev/null @@ -1,36 +0,0 @@ -package v4 - -import "time" - -// SigningTime provides a wrapper around a time.Time which provides cached values for SigV4 signing. -type SigningTime struct { - time.Time - timeFormat string - shortTimeFormat string -} - -// NewSigningTime creates a new SigningTime given a time.Time -func NewSigningTime(t time.Time) SigningTime { - return SigningTime{ - Time: t, - } -} - -// TimeFormat provides a time formatted in the X-Amz-Date format. -func (m *SigningTime) TimeFormat() string { - return m.format(&m.timeFormat, TimeFormat) -} - -// ShortTimeFormat provides a time formatted of 20060102. -func (m *SigningTime) ShortTimeFormat() string { - return m.format(&m.shortTimeFormat, ShortTimeFormat) -} - -func (m *SigningTime) format(target *string, format string) string { - if len(*target) > 0 { - return *target - } - v := m.Time.Format(format) - *target = v - return v -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go deleted file mode 100644 index d025dbaa06..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4/util.go +++ /dev/null @@ -1,80 +0,0 @@ -package v4 - -import ( - "net/url" - "strings" -) - -const doubleSpace = " " - -// StripExcessSpaces will rewrite the passed in slice's string values to not -// contain multiple side-by-side spaces. -func StripExcessSpaces(str string) string { - var j, k, l, m, spaces int - // Trim trailing spaces - for j = len(str) - 1; j >= 0 && str[j] == ' '; j-- { - } - - // Trim leading spaces - for k = 0; k < j && str[k] == ' '; k++ { - } - str = str[k : j+1] - - // Strip multiple spaces. - j = strings.Index(str, doubleSpace) - if j < 0 { - return str - } - - buf := []byte(str) - for k, m, l = j, j, len(buf); k < l; k++ { - if buf[k] == ' ' { - if spaces == 0 { - // First space. - buf[m] = buf[k] - m++ - } - spaces++ - } else { - // End of multiple spaces. - spaces = 0 - buf[m] = buf[k] - m++ - } - } - - return string(buf[:m]) -} - -// GetURIPath returns the escaped URI component from the provided URL. -func GetURIPath(u *url.URL) string { - var uriPath string - - if len(u.Opaque) > 0 { - const schemeSep, pathSep, queryStart = "//", "/", "?" - - opaque := u.Opaque - // Cut off the query string if present. - if idx := strings.Index(opaque, queryStart); idx >= 0 { - opaque = opaque[:idx] - } - - // Cutout the scheme separator if present. - if strings.Index(opaque, schemeSep) == 0 { - opaque = opaque[len(schemeSep):] - } - - // capture URI path starting with first path separator. - if idx := strings.Index(opaque, pathSep); idx >= 0 { - uriPath = opaque[idx:] - } - } else { - uriPath = u.EscapedPath() - } - - if len(uriPath) == 0 { - uriPath = "/" - } - - return uriPath -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go deleted file mode 100644 index 8a46220a37..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/middleware.go +++ /dev/null @@ -1,420 +0,0 @@ -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "io" - "net/http" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const computePayloadHashMiddlewareID = "ComputePayloadHash" - -// HashComputationError indicates an error occurred while computing the signing hash -type HashComputationError struct { - Err error -} - -// Error is the error message -func (e *HashComputationError) Error() string { - return fmt.Sprintf("failed to compute payload hash: %v", e.Err) -} - -// Unwrap returns the underlying error if one is set -func (e *HashComputationError) Unwrap() error { - return e.Err -} - -// SigningError indicates an error condition occurred while performing SigV4 signing -type SigningError struct { - Err error -} - -func (e *SigningError) Error() string { - return fmt.Sprintf("failed to sign request: %v", e.Err) -} - -// Unwrap returns the underlying error cause -func (e *SigningError) Unwrap() error { - return e.Err -} - -// UseDynamicPayloadSigningMiddleware swaps the compute payload sha256 middleware with a resolver middleware that -// switches between unsigned and signed payload based on TLS state for request. -// This middleware should not be used for AWS APIs that do not support unsigned payload signing auth. -// By default, SDK uses this middleware for known AWS APIs that support such TLS based auth selection . -// -// Usage example - -// S3 PutObject API allows unsigned payload signing auth usage when TLS is enabled, and uses this middleware to -// dynamically switch between unsigned and signed payload based on TLS state for request. -func UseDynamicPayloadSigningMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &dynamicPayloadSigningMiddleware{}) - return err -} - -// dynamicPayloadSigningMiddleware dynamically resolves the middleware that computes and set payload sha256 middleware. -type dynamicPayloadSigningMiddleware struct { -} - -// ID returns the resolver identifier -func (m *dynamicPayloadSigningMiddleware) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize delegates SHA256 computation according to whether the request -// is TLS-enabled. -func (m *dynamicPayloadSigningMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if req.IsHTTPS() { - return (&UnsignedPayload{}).HandleFinalize(ctx, in, next) - } - return (&ComputePayloadSHA256{}).HandleFinalize(ctx, in, next) -} - -// UnsignedPayload sets the SigV4 request payload hash to unsigned. -// -// Will not set the Unsigned Payload magic SHA value, if a SHA has already been -// stored in the context. (e.g. application pre-computed SHA256 before making -// API call). -// -// This middleware does not check the X-Amz-Content-Sha256 header, if that -// header is serialized a middleware must translate it into the context. -type UnsignedPayload struct{} - -// AddUnsignedPayloadMiddleware adds unsignedPayload to the operation -// middleware stack -func AddUnsignedPayloadMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -// ID returns the unsignedPayload identifier -func (m *UnsignedPayload) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize sets the payload hash magic value to the unsigned sentinel. -func (m *UnsignedPayload) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if GetPayloadHash(ctx) == "" { - ctx = SetPayloadHash(ctx, v4Internal.UnsignedPayload) - } - return next.HandleFinalize(ctx, in) -} - -// ComputePayloadSHA256 computes SHA256 payload hash to sign. -// -// Will not set the Unsigned Payload magic SHA value, if a SHA has already been -// stored in the context. (e.g. application pre-computed SHA256 before making -// API call). -// -// This middleware does not check the X-Amz-Content-Sha256 header, if that -// header is serialized a middleware must translate it into the context. -type ComputePayloadSHA256 struct{} - -// AddComputePayloadSHA256Middleware adds computePayloadSHA256 to the -// operation middleware stack -func AddComputePayloadSHA256Middleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -// RemoveComputePayloadSHA256Middleware removes computePayloadSHA256 from the -// operation middleware stack -func RemoveComputePayloadSHA256Middleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Remove(computePayloadHashMiddlewareID) - return err -} - -// ID is the middleware name -func (m *ComputePayloadSHA256) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize computes the payload hash for the request, storing it to the -// context. This is a no-op if a caller has previously set that value. -func (m *ComputePayloadSHA256) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if GetPayloadHash(ctx) != "" { - return next.HandleFinalize(ctx, in) - } - - _, span := tracing.StartSpan(ctx, "ComputePayloadSHA256") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("unexpected request middleware type %T", in.Request), - } - } - - hash := sha256.New() - if stream := req.GetStream(); stream != nil { - _, err = io.Copy(hash, stream) - if err != nil { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("failed to compute payload hash, %w", err), - } - } - - if err := req.RewindStream(); err != nil { - return out, metadata, &HashComputationError{ - Err: fmt.Errorf("failed to seek body to start, %w", err), - } - } - } - - ctx = SetPayloadHash(ctx, hex.EncodeToString(hash.Sum(nil))) - - span.End() - return next.HandleFinalize(ctx, in) -} - -// SwapComputePayloadSHA256ForUnsignedPayloadMiddleware replaces the -// ComputePayloadSHA256 middleware with the UnsignedPayload middleware. -// -// Use this to disable computing the Payload SHA256 checksum and instead use -// UNSIGNED-PAYLOAD for the SHA256 value. -func SwapComputePayloadSHA256ForUnsignedPayloadMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Swap(computePayloadHashMiddlewareID, &UnsignedPayload{}) - return err -} - -// ContentSHA256Header sets the X-Amz-Content-Sha256 header value to -// the Payload hash stored in the context. -type ContentSHA256Header struct{} - -// AddContentSHA256HeaderMiddleware adds ContentSHA256Header to the -// operation middleware stack -func AddContentSHA256HeaderMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&ContentSHA256Header{}, computePayloadHashMiddlewareID, middleware.After) -} - -// RemoveContentSHA256HeaderMiddleware removes contentSHA256Header middleware -// from the operation middleware stack -func RemoveContentSHA256HeaderMiddleware(stack *middleware.Stack) error { - _, err := stack.Finalize.Remove((*ContentSHA256Header)(nil).ID()) - return err -} - -// ID returns the ContentSHA256HeaderMiddleware identifier -func (m *ContentSHA256Header) ID() string { - return "SigV4ContentSHA256Header" -} - -// HandleFinalize sets the X-Amz-Content-Sha256 header value to the Payload hash -// stored in the context. -func (m *ContentSHA256Header) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &HashComputationError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)} - } - - req.Header.Set(v4Internal.ContentSHAKey, GetPayloadHash(ctx)) - return next.HandleFinalize(ctx, in) -} - -// SignHTTPRequestMiddlewareOptions is the configuration options for -// [SignHTTPRequestMiddleware]. -// -// Deprecated: [SignHTTPRequestMiddleware] is deprecated. -type SignHTTPRequestMiddlewareOptions struct { - CredentialsProvider aws.CredentialsProvider - Signer HTTPSigner - LogSigning bool -} - -// SignHTTPRequestMiddleware is a `FinalizeMiddleware` implementation for SigV4 -// HTTP Signing. -// -// Deprecated: AWS service clients no longer use this middleware. Signing as an -// SDK operation is now performed through an internal per-service middleware -// which opaquely selects and uses the signer from the resolved auth scheme. -type SignHTTPRequestMiddleware struct { - credentialsProvider aws.CredentialsProvider - signer HTTPSigner - logSigning bool -} - -// NewSignHTTPRequestMiddleware constructs a [SignHTTPRequestMiddleware] using -// the given [Signer] for signing requests. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func NewSignHTTPRequestMiddleware(options SignHTTPRequestMiddlewareOptions) *SignHTTPRequestMiddleware { - return &SignHTTPRequestMiddleware{ - credentialsProvider: options.CredentialsProvider, - signer: options.Signer, - logSigning: options.LogSigning, - } -} - -// ID is the SignHTTPRequestMiddleware identifier. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func (s *SignHTTPRequestMiddleware) ID() string { - return "Signing" -} - -// HandleFinalize will take the provided input and sign the request using the -// SigV4 authentication scheme. -// -// Deprecated: SignHTTPRequestMiddleware is deprecated. -func (s *SignHTTPRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if !haveCredentialProvider(s.credentialsProvider) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &SigningError{Err: fmt.Errorf("unexpected request middleware type %T", in.Request)} - } - - signingName, signingRegion := awsmiddleware.GetSigningName(ctx), awsmiddleware.GetSigningRegion(ctx) - payloadHash := GetPayloadHash(ctx) - if len(payloadHash) == 0 { - return out, metadata, &SigningError{Err: fmt.Errorf("computed payload hash missing from context")} - } - - credentials, err := s.credentialsProvider.Retrieve(ctx) - if err != nil { - return out, metadata, &SigningError{Err: fmt.Errorf("failed to retrieve credentials: %w", err)} - } - - signerOptions := []func(o *SignerOptions){ - func(o *SignerOptions) { - o.Logger = middleware.GetLogger(ctx) - o.LogSigning = s.logSigning - }, - } - - // existing DisableURIPathEscaping is equivalent in purpose - // to authentication scheme property DisableDoubleEncoding - disableDoubleEncoding, overridden := internalauth.GetDisableDoubleEncoding(ctx) - if overridden { - signerOptions = append(signerOptions, func(o *SignerOptions) { - o.DisableURIPathEscaping = disableDoubleEncoding - }) - } - - err = s.signer.SignHTTP(ctx, credentials, req.Request, payloadHash, signingName, signingRegion, sdk.NowTime(), signerOptions...) - if err != nil { - return out, metadata, &SigningError{Err: fmt.Errorf("failed to sign http request, %w", err)} - } - - ctx = awsmiddleware.SetSigningCredentials(ctx, credentials) - - return next.HandleFinalize(ctx, in) -} - -// StreamingEventsPayload signs input event stream messages. -type StreamingEventsPayload struct{} - -// AddStreamingEventsPayload adds the streamingEventsPayload middleware to the stack. -func AddStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&StreamingEventsPayload{}, middleware.Before) -} - -// ID identifies the middleware. -func (s *StreamingEventsPayload) ID() string { - return computePayloadHashMiddlewareID -} - -// HandleFinalize marks the input stream to be signed with SigV4. -func (s *StreamingEventsPayload) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - contentSHA := GetPayloadHash(ctx) - if len(contentSHA) == 0 { - contentSHA = v4Internal.StreamingEventsPayload - } - - ctx = SetPayloadHash(ctx, contentSHA) - - return next.HandleFinalize(ctx, in) -} - -// GetSignedRequestSignature attempts to extract the signature of the request. -// Returning an error if the request is unsigned, or unable to extract the -// signature. -func GetSignedRequestSignature(r *http.Request) ([]byte, error) { - const authHeaderSignatureElem = "Signature=" - - if auth := r.Header.Get(authorizationHeader); len(auth) != 0 { - ps := strings.Split(auth, ",") - for _, p := range ps { - p = strings.TrimSpace(p) - if idx := strings.Index(p, authHeaderSignatureElem); idx >= 0 { - sig := p[len(authHeaderSignatureElem):] - if len(sig) == 0 { - return nil, fmt.Errorf("invalid request signature authorization header") - } - return hex.DecodeString(sig) - } - } - } - - if sig := r.URL.Query().Get("X-Amz-Signature"); len(sig) != 0 { - return hex.DecodeString(sig) - } - - return nil, fmt.Errorf("request not signed") -} - -func haveCredentialProvider(p aws.CredentialsProvider) bool { - if p == nil { - return false - } - - return !aws.IsCredentialsProvider(p, (*aws.AnonymousCredentials)(nil)) -} - -type payloadHashKey struct{} - -// GetPayloadHash retrieves the payload hash to use for signing -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetPayloadHash(ctx context.Context) (v string) { - v, _ = middleware.GetStackValue(ctx, payloadHashKey{}).(string) - return v -} - -// SetPayloadHash sets the payload hash to be used for signing the request -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetPayloadHash(ctx context.Context, hash string) context.Context { - return middleware.WithStackValue(ctx, payloadHashKey{}, hash) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go deleted file mode 100644 index e1a0665124..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/presign_middleware.go +++ /dev/null @@ -1,127 +0,0 @@ -package v4 - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go/middleware" - smithyHTTP "github.com/aws/smithy-go/transport/http" -) - -// HTTPPresigner is an interface to a SigV4 signer that can sign create a -// presigned URL for a HTTP requests. -type HTTPPresigner interface { - PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*SignerOptions), - ) (url string, signedHeader http.Header, err error) -} - -// PresignedHTTPRequest provides the URL and signed headers that are included -// in the presigned URL. -type PresignedHTTPRequest struct { - URL string - Method string - SignedHeader http.Header -} - -// PresignHTTPRequestMiddlewareOptions is the options for the PresignHTTPRequestMiddleware middleware. -type PresignHTTPRequestMiddlewareOptions struct { - CredentialsProvider aws.CredentialsProvider - Presigner HTTPPresigner - LogSigning bool -} - -// PresignHTTPRequestMiddleware provides the Finalize middleware for creating a -// presigned URL for an HTTP request. -// -// Will short circuit the middleware stack and not forward onto the next -// Finalize handler. -type PresignHTTPRequestMiddleware struct { - credentialsProvider aws.CredentialsProvider - presigner HTTPPresigner - logSigning bool -} - -// NewPresignHTTPRequestMiddleware returns a new PresignHTTPRequestMiddleware -// initialized with the presigner. -func NewPresignHTTPRequestMiddleware(options PresignHTTPRequestMiddlewareOptions) *PresignHTTPRequestMiddleware { - return &PresignHTTPRequestMiddleware{ - credentialsProvider: options.CredentialsProvider, - presigner: options.Presigner, - logSigning: options.LogSigning, - } -} - -// ID provides the middleware ID. -func (*PresignHTTPRequestMiddleware) ID() string { return "PresignHTTPRequest" } - -// HandleFinalize will take the provided input and create a presigned url for -// the http request using the SigV4 presign authentication scheme. -// -// Since the signed request is not a valid HTTP request -func (s *PresignHTTPRequestMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyHTTP.Request) - if !ok { - return out, metadata, &SigningError{ - Err: fmt.Errorf("unexpected request middleware type %T", in.Request), - } - } - - httpReq := req.Build(ctx) - if !haveCredentialProvider(s.credentialsProvider) { - out.Result = &PresignedHTTPRequest{ - URL: httpReq.URL.String(), - Method: httpReq.Method, - SignedHeader: http.Header{}, - } - - return out, metadata, nil - } - - signingName := awsmiddleware.GetSigningName(ctx) - signingRegion := awsmiddleware.GetSigningRegion(ctx) - payloadHash := GetPayloadHash(ctx) - if len(payloadHash) == 0 { - return out, metadata, &SigningError{ - Err: fmt.Errorf("computed payload hash missing from context"), - } - } - - credentials, err := s.credentialsProvider.Retrieve(ctx) - if err != nil { - return out, metadata, &SigningError{ - Err: fmt.Errorf("failed to retrieve credentials: %w", err), - } - } - - u, h, err := s.presigner.PresignHTTP(ctx, credentials, - httpReq, payloadHash, signingName, signingRegion, sdk.NowTime(), - func(o *SignerOptions) { - o.Logger = middleware.GetLogger(ctx) - o.LogSigning = s.logSigning - }) - if err != nil { - return out, metadata, &SigningError{ - Err: fmt.Errorf("failed to sign http request, %w", err), - } - } - - out.Result = &PresignedHTTPRequest{ - URL: u, - Method: httpReq.Method, - SignedHeader: h, - } - - return out, metadata, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go deleted file mode 100644 index 32875e0779..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/stream.go +++ /dev/null @@ -1,86 +0,0 @@ -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "github.com/aws/aws-sdk-go-v2/aws" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - "strings" - "time" -) - -// EventStreamSigner is an AWS EventStream protocol signer. -type EventStreamSigner interface { - GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error) -} - -// StreamSignerOptions is the configuration options for StreamSigner. -type StreamSignerOptions struct{} - -// StreamSigner implements Signature Version 4 (SigV4) signing of event stream encoded payloads. -type StreamSigner struct { - options StreamSignerOptions - - credentials aws.Credentials - service string - region string - - prevSignature []byte - - signingKeyDeriver *v4Internal.SigningKeyDeriver -} - -// NewStreamSigner returns a new AWS EventStream protocol signer. -func NewStreamSigner(credentials aws.Credentials, service, region string, seedSignature []byte, optFns ...func(*StreamSignerOptions)) *StreamSigner { - o := StreamSignerOptions{} - - for _, fn := range optFns { - fn(&o) - } - - return &StreamSigner{ - options: o, - credentials: credentials, - service: service, - region: region, - signingKeyDeriver: v4Internal.NewSigningKeyDeriver(), - prevSignature: seedSignature, - } -} - -// GetSignature signs the provided header and payload bytes. -func (s *StreamSigner) GetSignature(ctx context.Context, headers, payload []byte, signingTime time.Time, optFns ...func(*StreamSignerOptions)) ([]byte, error) { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - prevSignature := s.prevSignature - - st := v4Internal.NewSigningTime(signingTime.UTC()) - - sigKey := s.signingKeyDeriver.DeriveKey(s.credentials, s.service, s.region, st) - - scope := v4Internal.BuildCredentialScope(st, s.region, s.service) - - stringToSign := s.buildEventStreamStringToSign(headers, payload, prevSignature, scope, &st) - - signature := v4Internal.HMACSHA256(sigKey, []byte(stringToSign)) - s.prevSignature = signature - - return signature, nil -} - -func (s *StreamSigner) buildEventStreamStringToSign(headers, payload, previousSignature []byte, credentialScope string, signingTime *v4Internal.SigningTime) string { - hash := sha256.New() - return strings.Join([]string{ - "AWS4-HMAC-SHA256-PAYLOAD", - signingTime.TimeFormat(), - credentialScope, - hex.EncodeToString(previousSignature), - hex.EncodeToString(makeHash(hash, headers)), - hex.EncodeToString(makeHash(hash, payload)), - }, "\n") -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go deleted file mode 100644 index 7ed91d5bac..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/signer/v4/v4.go +++ /dev/null @@ -1,564 +0,0 @@ -// Package v4 implements the AWS signature version 4 algorithm (commonly known -// as SigV4). -// -// For more information about SigV4, see [Signing AWS API requests] in the IAM -// user guide. -// -// While this implementation CAN work in an external context, it is developed -// primarily for SDK use and you may encounter fringe behaviors around header -// canonicalization. -// -// # Pre-escaping a request URI -// -// AWS v4 signature validation requires that the canonical string's URI path -// component must be the escaped form of the HTTP request's path. -// -// The Go HTTP client will perform escaping automatically on the HTTP request. -// This may cause signature validation errors because the request differs from -// the URI path or query from which the signature was generated. -// -// Because of this, we recommend that you explicitly escape the request when -// using this signer outside of the SDK to prevent possible signature mismatch. -// This can be done by setting URL.Opaque on the request. The signer will -// prefer that value, falling back to the return of URL.EscapedPath if unset. -// -// When setting URL.Opaque you must do so in the form of: -// -// "///" -// -// // e.g. -// "//example.com/some/path" -// -// The leading "//" and hostname are required or the escaping will not work -// correctly. -// -// The TestStandaloneSign unit test provides a complete example of using the -// signer outside of the SDK and pre-escaping the URI path. -// -// [Signing AWS API requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_aws-signing.html -package v4 - -import ( - "context" - "crypto/sha256" - "encoding/hex" - "fmt" - "hash" - "net/http" - "net/textproto" - "net/url" - "sort" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - v4Internal "github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4" - "github.com/aws/smithy-go/encoding/httpbinding" - "github.com/aws/smithy-go/logging" -) - -const ( - signingAlgorithm = "AWS4-HMAC-SHA256" - authorizationHeader = "Authorization" - - // Version of signing v4 - Version = "SigV4" -) - -// HTTPSigner is an interface to a SigV4 signer that can sign HTTP requests -type HTTPSigner interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*SignerOptions)) error -} - -type keyDerivator interface { - DeriveKey(credential aws.Credentials, service, region string, signingTime v4Internal.SigningTime) []byte -} - -// SignerOptions is the SigV4 Signer options. -type SignerOptions struct { - // Disables the Signer's moving HTTP header key/value pairs from the HTTP - // request header to the request's query string. This is most commonly used - // with pre-signed requests preventing headers from being added to the - // request's query string. - DisableHeaderHoisting bool - - // Disables the automatic escaping of the URI path of the request for the - // siganture's canonical string's path. For services that do not need additional - // escaping then use this to disable the signer escaping the path. - // - // S3 is an example of a service that does not need additional escaping. - // - // http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html - DisableURIPathEscaping bool - - // The logger to send log messages to. - Logger logging.Logger - - // Enable logging of signed requests. - // This will enable logging of the canonical request, the string to sign, and for presigning the subsequent - // presigned URL. - LogSigning bool - - // Disables setting the session token on the request as part of signing - // through X-Amz-Security-Token. This is needed for variations of v4 that - // present the token elsewhere. - DisableSessionToken bool -} - -// Signer applies AWS v4 signing to given request. Use this to sign requests -// that need to be signed with AWS V4 Signatures. -type Signer struct { - options SignerOptions - keyDerivator keyDerivator -} - -// NewSigner returns a new SigV4 Signer -func NewSigner(optFns ...func(signer *SignerOptions)) *Signer { - options := SignerOptions{} - - for _, fn := range optFns { - fn(&options) - } - - return &Signer{options: options, keyDerivator: v4Internal.NewSigningKeyDeriver()} -} - -type httpSigner struct { - Request *http.Request - ServiceName string - Region string - Time v4Internal.SigningTime - Credentials aws.Credentials - KeyDerivator keyDerivator - IsPreSign bool - - PayloadHash string - - DisableHeaderHoisting bool - DisableURIPathEscaping bool - DisableSessionToken bool -} - -func (s *httpSigner) Build() (signedRequest, error) { - req := s.Request - - query := req.URL.Query() - headers := req.Header - - s.setRequiredSigningFields(headers, query) - - // Sort Each Query Key's Values - for key := range query { - sort.Strings(query[key]) - } - - v4Internal.SanitizeHostForHeader(req) - - credentialScope := s.buildCredentialScope() - credentialStr := s.Credentials.AccessKeyID + "/" + credentialScope - if s.IsPreSign { - query.Set(v4Internal.AmzCredentialKey, credentialStr) - } - - unsignedHeaders := headers - if s.IsPreSign && !s.DisableHeaderHoisting { - var urlValues url.Values - urlValues, unsignedHeaders = buildQuery(v4Internal.AllowedQueryHoisting, headers) - for k := range urlValues { - query[k] = urlValues[k] - } - } - - host := req.URL.Host - if len(req.Host) > 0 { - host = req.Host - } - - signedHeaders, signedHeadersStr, canonicalHeaderStr := s.buildCanonicalHeaders(host, v4Internal.IgnoredHeaders, unsignedHeaders, s.Request.ContentLength) - - if s.IsPreSign { - query.Set(v4Internal.AmzSignedHeadersKey, signedHeadersStr) - } - - var rawQuery strings.Builder - rawQuery.WriteString(strings.Replace(query.Encode(), "+", "%20", -1)) - - canonicalURI := v4Internal.GetURIPath(req.URL) - if !s.DisableURIPathEscaping { - canonicalURI = httpbinding.EscapePath(canonicalURI, false) - } - - canonicalString := s.buildCanonicalString( - req.Method, - canonicalURI, - rawQuery.String(), - signedHeadersStr, - canonicalHeaderStr, - ) - - strToSign := s.buildStringToSign(credentialScope, canonicalString) - signingSignature, err := s.buildSignature(strToSign) - if err != nil { - return signedRequest{}, err - } - - if s.IsPreSign { - rawQuery.WriteString("&X-Amz-Signature=") - rawQuery.WriteString(signingSignature) - } else { - headers[authorizationHeader] = append(headers[authorizationHeader][:0], buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature)) - } - - req.URL.RawQuery = rawQuery.String() - - return signedRequest{ - Request: req, - SignedHeaders: signedHeaders, - CanonicalString: canonicalString, - StringToSign: strToSign, - PreSigned: s.IsPreSign, - }, nil -} - -func buildAuthorizationHeader(credentialStr, signedHeadersStr, signingSignature string) string { - const credential = "Credential=" - const signedHeaders = "SignedHeaders=" - const signature = "Signature=" - const commaSpace = ", " - - var parts strings.Builder - parts.Grow(len(signingAlgorithm) + 1 + - len(credential) + len(credentialStr) + 2 + - len(signedHeaders) + len(signedHeadersStr) + 2 + - len(signature) + len(signingSignature), - ) - parts.WriteString(signingAlgorithm) - parts.WriteRune(' ') - parts.WriteString(credential) - parts.WriteString(credentialStr) - parts.WriteString(commaSpace) - parts.WriteString(signedHeaders) - parts.WriteString(signedHeadersStr) - parts.WriteString(commaSpace) - parts.WriteString(signature) - parts.WriteString(signingSignature) - return parts.String() -} - -// SignHTTP signs AWS v4 requests with the provided payload hash, service name, region the -// request is made to, and time the request is signed at. The signTime allows -// you to specify that a request is signed for the future, and cannot be -// used until then. -// -// The payloadHash is the hex encoded SHA-256 hash of the request payload, and -// must be provided. Even if the request has no payload (aka body). If the -// request has no payload you should use the hex encoded SHA-256 of an empty -// string as the payloadHash value. -// -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -// -// Some services such as Amazon S3 accept alternative values for the payload -// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be -// included in the request signature. -// -// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html -// -// Sign differs from Presign in that it will sign the request using HTTP -// header values. This type of signing is intended for http.Request values that -// will not be shared, or are shared in a way the header values on the request -// will not be lost. -// -// The passed in request will be modified in place. -func (s Signer) SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(options *SignerOptions)) error { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - signer := &httpSigner{ - Request: r, - PayloadHash: payloadHash, - ServiceName: service, - Region: region, - Credentials: credentials, - Time: v4Internal.NewSigningTime(signingTime.UTC()), - DisableHeaderHoisting: options.DisableHeaderHoisting, - DisableURIPathEscaping: options.DisableURIPathEscaping, - DisableSessionToken: options.DisableSessionToken, - KeyDerivator: s.keyDerivator, - } - - signedRequest, err := signer.Build() - if err != nil { - return err - } - - logSigningInfo(ctx, options, &signedRequest, false) - - return nil -} - -// PresignHTTP signs AWS v4 requests with the payload hash, service name, region -// the request is made to, and time the request is signed at. The signTime -// allows you to specify that a request is signed for the future, and cannot -// be used until then. -// -// Returns the signed URL and the map of HTTP headers that were included in the -// signature or an error if signing the request failed. For presigned requests -// these headers and their values must be included on the HTTP request when it -// is made. This is helpful to know what header values need to be shared with -// the party the presigned request will be distributed to. -// -// The payloadHash is the hex encoded SHA-256 hash of the request payload, and -// must be provided. Even if the request has no payload (aka body). If the -// request has no payload you should use the hex encoded SHA-256 of an empty -// string as the payloadHash value. -// -// "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" -// -// Some services such as Amazon S3 accept alternative values for the payload -// hash, such as "UNSIGNED-PAYLOAD" for requests where the body will not be -// included in the request signature. -// -// https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-header-based-auth.html -// -// PresignHTTP differs from SignHTTP in that it will sign the request using -// query string instead of header values. This allows you to share the -// Presigned Request's URL with third parties, or distribute it throughout your -// system with minimal dependencies. -// -// PresignHTTP will not set the expires time of the presigned request -// automatically. To specify the expire duration for a request add the -// "X-Amz-Expires" query parameter on the request with the value as the -// duration in seconds the presigned URL should be considered valid for. This -// parameter is not used by all AWS services, and is most notable used by -// Amazon S3 APIs. -// -// expires := 20 * time.Minute -// query := req.URL.Query() -// query.Set("X-Amz-Expires", strconv.FormatInt(int64(expires/time.Second), 10)) -// req.URL.RawQuery = query.Encode() -// -// This method does not modify the provided request. -func (s *Signer) PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*SignerOptions), -) (signedURI string, signedHeaders http.Header, err error) { - options := s.options - - for _, fn := range optFns { - fn(&options) - } - - signer := &httpSigner{ - Request: r.Clone(r.Context()), - PayloadHash: payloadHash, - ServiceName: service, - Region: region, - Credentials: credentials, - Time: v4Internal.NewSigningTime(signingTime.UTC()), - IsPreSign: true, - DisableHeaderHoisting: options.DisableHeaderHoisting, - DisableURIPathEscaping: options.DisableURIPathEscaping, - DisableSessionToken: options.DisableSessionToken, - KeyDerivator: s.keyDerivator, - } - - signedRequest, err := signer.Build() - if err != nil { - return "", nil, err - } - - logSigningInfo(ctx, options, &signedRequest, true) - - signedHeaders = make(http.Header) - - // For the signed headers we canonicalize the header keys in the returned map. - // This avoids situations where can standard library double headers like host header. For example the standard - // library will set the Host header, even if it is present in lower-case form. - for k, v := range signedRequest.SignedHeaders { - key := textproto.CanonicalMIMEHeaderKey(k) - signedHeaders[key] = append(signedHeaders[key], v...) - } - - return signedRequest.Request.URL.String(), signedHeaders, nil -} - -func (s *httpSigner) buildCredentialScope() string { - return v4Internal.BuildCredentialScope(s.Time, s.Region, s.ServiceName) -} - -func buildQuery(r v4Internal.Rule, header http.Header) (url.Values, http.Header) { - query := url.Values{} - unsignedHeaders := http.Header{} - - // A list of headers to be converted to lower case to mitigate a limitation from S3 - lowerCaseHeaders := map[string]string{ - "X-Amz-Expected-Bucket-Owner": "x-amz-expected-bucket-owner", // see #2508 - "X-Amz-Request-Payer": "x-amz-request-payer", // see #2764 - } - - for k, h := range header { - if newKey, ok := lowerCaseHeaders[k]; ok { - k = newKey - } - - if r.IsValid(k) { - query[k] = h - } else { - unsignedHeaders[k] = h - } - } - - return query, unsignedHeaders -} - -func (s *httpSigner) buildCanonicalHeaders(host string, rule v4Internal.Rule, header http.Header, length int64) (signed http.Header, signedHeaders, canonicalHeadersStr string) { - signed = make(http.Header) - - var headers []string - const hostHeader = "host" - headers = append(headers, hostHeader) - signed[hostHeader] = append(signed[hostHeader], host) - - const contentLengthHeader = "content-length" - if length > 0 { - headers = append(headers, contentLengthHeader) - signed[contentLengthHeader] = append(signed[contentLengthHeader], strconv.FormatInt(length, 10)) - } - - for k, v := range header { - if !rule.IsValid(k) { - continue // ignored header - } - if strings.EqualFold(k, contentLengthHeader) { - // prevent signing already handled content-length header. - continue - } - - lowerCaseKey := strings.ToLower(k) - if _, ok := signed[lowerCaseKey]; ok { - // include additional values - signed[lowerCaseKey] = append(signed[lowerCaseKey], v...) - continue - } - - headers = append(headers, lowerCaseKey) - signed[lowerCaseKey] = v - } - sort.Strings(headers) - - signedHeaders = strings.Join(headers, ";") - - var canonicalHeaders strings.Builder - n := len(headers) - const colon = ':' - for i := 0; i < n; i++ { - if headers[i] == hostHeader { - canonicalHeaders.WriteString(hostHeader) - canonicalHeaders.WriteRune(colon) - canonicalHeaders.WriteString(v4Internal.StripExcessSpaces(host)) - } else { - canonicalHeaders.WriteString(headers[i]) - canonicalHeaders.WriteRune(colon) - // Trim out leading, trailing, and dedup inner spaces from signed header values. - values := signed[headers[i]] - for j, v := range values { - cleanedValue := strings.TrimSpace(v4Internal.StripExcessSpaces(v)) - canonicalHeaders.WriteString(cleanedValue) - if j < len(values)-1 { - canonicalHeaders.WriteRune(',') - } - } - } - canonicalHeaders.WriteRune('\n') - } - canonicalHeadersStr = canonicalHeaders.String() - - return signed, signedHeaders, canonicalHeadersStr -} - -func (s *httpSigner) buildCanonicalString(method, uri, query, signedHeaders, canonicalHeaders string) string { - return strings.Join([]string{ - method, - uri, - query, - canonicalHeaders, - signedHeaders, - s.PayloadHash, - }, "\n") -} - -func (s *httpSigner) buildStringToSign(credentialScope, canonicalRequestString string) string { - return strings.Join([]string{ - signingAlgorithm, - s.Time.TimeFormat(), - credentialScope, - hex.EncodeToString(makeHash(sha256.New(), []byte(canonicalRequestString))), - }, "\n") -} - -func makeHash(hash hash.Hash, b []byte) []byte { - hash.Reset() - hash.Write(b) - return hash.Sum(nil) -} - -func (s *httpSigner) buildSignature(strToSign string) (string, error) { - key := s.KeyDerivator.DeriveKey(s.Credentials, s.ServiceName, s.Region, s.Time) - return hex.EncodeToString(v4Internal.HMACSHA256(key, []byte(strToSign))), nil -} - -func (s *httpSigner) setRequiredSigningFields(headers http.Header, query url.Values) { - amzDate := s.Time.TimeFormat() - - if s.IsPreSign { - query.Set(v4Internal.AmzAlgorithmKey, signingAlgorithm) - sessionToken := s.Credentials.SessionToken - if !s.DisableSessionToken && len(sessionToken) > 0 { - query.Set("X-Amz-Security-Token", sessionToken) - } - - query.Set(v4Internal.AmzDateKey, amzDate) - return - } - - headers[v4Internal.AmzDateKey] = append(headers[v4Internal.AmzDateKey][:0], amzDate) - - if !s.DisableSessionToken && len(s.Credentials.SessionToken) > 0 { - headers[v4Internal.AmzSecurityTokenKey] = append(headers[v4Internal.AmzSecurityTokenKey][:0], s.Credentials.SessionToken) - } -} - -func logSigningInfo(ctx context.Context, options SignerOptions, request *signedRequest, isPresign bool) { - if !options.LogSigning { - return - } - signedURLMsg := "" - if isPresign { - signedURLMsg = fmt.Sprintf(logSignedURLMsg, request.Request.URL.String()) - } - logger := logging.WithContext(ctx, options.Logger) - logger.Logf(logging.Debug, logSignInfoMsg, request.CanonicalString, request.StringToSign, signedURLMsg) -} - -type signedRequest struct { - Request *http.Request - SignedHeaders http.Header - CanonicalString string - StringToSign string - PreSigned bool -} - -const logSignInfoMsg = `Request Signature: ----[ CANONICAL STRING ]----------------------------- -%s ----[ STRING TO SIGN ]-------------------------------- -%s%s ------------------------------------------------------` -const logSignedURLMsg = ` ----[ SIGNED URL ]------------------------------------ -%s` diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go deleted file mode 100644 index f3fc4d610d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/to_ptr.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by aws/generate.go DO NOT EDIT. - -package aws - -import ( - "github.com/aws/smithy-go/ptr" - "time" -) - -// Bool returns a pointer value for the bool value passed in. -func Bool(v bool) *bool { - return ptr.Bool(v) -} - -// BoolSlice returns a slice of bool pointers from the values -// passed in. -func BoolSlice(vs []bool) []*bool { - return ptr.BoolSlice(vs) -} - -// BoolMap returns a map of bool pointers from the values -// passed in. -func BoolMap(vs map[string]bool) map[string]*bool { - return ptr.BoolMap(vs) -} - -// Byte returns a pointer value for the byte value passed in. -func Byte(v byte) *byte { - return ptr.Byte(v) -} - -// ByteSlice returns a slice of byte pointers from the values -// passed in. -func ByteSlice(vs []byte) []*byte { - return ptr.ByteSlice(vs) -} - -// ByteMap returns a map of byte pointers from the values -// passed in. -func ByteMap(vs map[string]byte) map[string]*byte { - return ptr.ByteMap(vs) -} - -// String returns a pointer value for the string value passed in. -func String(v string) *string { - return ptr.String(v) -} - -// StringSlice returns a slice of string pointers from the values -// passed in. -func StringSlice(vs []string) []*string { - return ptr.StringSlice(vs) -} - -// StringMap returns a map of string pointers from the values -// passed in. -func StringMap(vs map[string]string) map[string]*string { - return ptr.StringMap(vs) -} - -// Int returns a pointer value for the int value passed in. -func Int(v int) *int { - return ptr.Int(v) -} - -// IntSlice returns a slice of int pointers from the values -// passed in. -func IntSlice(vs []int) []*int { - return ptr.IntSlice(vs) -} - -// IntMap returns a map of int pointers from the values -// passed in. -func IntMap(vs map[string]int) map[string]*int { - return ptr.IntMap(vs) -} - -// Int8 returns a pointer value for the int8 value passed in. -func Int8(v int8) *int8 { - return ptr.Int8(v) -} - -// Int8Slice returns a slice of int8 pointers from the values -// passed in. -func Int8Slice(vs []int8) []*int8 { - return ptr.Int8Slice(vs) -} - -// Int8Map returns a map of int8 pointers from the values -// passed in. -func Int8Map(vs map[string]int8) map[string]*int8 { - return ptr.Int8Map(vs) -} - -// Int16 returns a pointer value for the int16 value passed in. -func Int16(v int16) *int16 { - return ptr.Int16(v) -} - -// Int16Slice returns a slice of int16 pointers from the values -// passed in. -func Int16Slice(vs []int16) []*int16 { - return ptr.Int16Slice(vs) -} - -// Int16Map returns a map of int16 pointers from the values -// passed in. -func Int16Map(vs map[string]int16) map[string]*int16 { - return ptr.Int16Map(vs) -} - -// Int32 returns a pointer value for the int32 value passed in. -func Int32(v int32) *int32 { - return ptr.Int32(v) -} - -// Int32Slice returns a slice of int32 pointers from the values -// passed in. -func Int32Slice(vs []int32) []*int32 { - return ptr.Int32Slice(vs) -} - -// Int32Map returns a map of int32 pointers from the values -// passed in. -func Int32Map(vs map[string]int32) map[string]*int32 { - return ptr.Int32Map(vs) -} - -// Int64 returns a pointer value for the int64 value passed in. -func Int64(v int64) *int64 { - return ptr.Int64(v) -} - -// Int64Slice returns a slice of int64 pointers from the values -// passed in. -func Int64Slice(vs []int64) []*int64 { - return ptr.Int64Slice(vs) -} - -// Int64Map returns a map of int64 pointers from the values -// passed in. -func Int64Map(vs map[string]int64) map[string]*int64 { - return ptr.Int64Map(vs) -} - -// Uint returns a pointer value for the uint value passed in. -func Uint(v uint) *uint { - return ptr.Uint(v) -} - -// UintSlice returns a slice of uint pointers from the values -// passed in. -func UintSlice(vs []uint) []*uint { - return ptr.UintSlice(vs) -} - -// UintMap returns a map of uint pointers from the values -// passed in. -func UintMap(vs map[string]uint) map[string]*uint { - return ptr.UintMap(vs) -} - -// Uint8 returns a pointer value for the uint8 value passed in. -func Uint8(v uint8) *uint8 { - return ptr.Uint8(v) -} - -// Uint8Slice returns a slice of uint8 pointers from the values -// passed in. -func Uint8Slice(vs []uint8) []*uint8 { - return ptr.Uint8Slice(vs) -} - -// Uint8Map returns a map of uint8 pointers from the values -// passed in. -func Uint8Map(vs map[string]uint8) map[string]*uint8 { - return ptr.Uint8Map(vs) -} - -// Uint16 returns a pointer value for the uint16 value passed in. -func Uint16(v uint16) *uint16 { - return ptr.Uint16(v) -} - -// Uint16Slice returns a slice of uint16 pointers from the values -// passed in. -func Uint16Slice(vs []uint16) []*uint16 { - return ptr.Uint16Slice(vs) -} - -// Uint16Map returns a map of uint16 pointers from the values -// passed in. -func Uint16Map(vs map[string]uint16) map[string]*uint16 { - return ptr.Uint16Map(vs) -} - -// Uint32 returns a pointer value for the uint32 value passed in. -func Uint32(v uint32) *uint32 { - return ptr.Uint32(v) -} - -// Uint32Slice returns a slice of uint32 pointers from the values -// passed in. -func Uint32Slice(vs []uint32) []*uint32 { - return ptr.Uint32Slice(vs) -} - -// Uint32Map returns a map of uint32 pointers from the values -// passed in. -func Uint32Map(vs map[string]uint32) map[string]*uint32 { - return ptr.Uint32Map(vs) -} - -// Uint64 returns a pointer value for the uint64 value passed in. -func Uint64(v uint64) *uint64 { - return ptr.Uint64(v) -} - -// Uint64Slice returns a slice of uint64 pointers from the values -// passed in. -func Uint64Slice(vs []uint64) []*uint64 { - return ptr.Uint64Slice(vs) -} - -// Uint64Map returns a map of uint64 pointers from the values -// passed in. -func Uint64Map(vs map[string]uint64) map[string]*uint64 { - return ptr.Uint64Map(vs) -} - -// Float32 returns a pointer value for the float32 value passed in. -func Float32(v float32) *float32 { - return ptr.Float32(v) -} - -// Float32Slice returns a slice of float32 pointers from the values -// passed in. -func Float32Slice(vs []float32) []*float32 { - return ptr.Float32Slice(vs) -} - -// Float32Map returns a map of float32 pointers from the values -// passed in. -func Float32Map(vs map[string]float32) map[string]*float32 { - return ptr.Float32Map(vs) -} - -// Float64 returns a pointer value for the float64 value passed in. -func Float64(v float64) *float64 { - return ptr.Float64(v) -} - -// Float64Slice returns a slice of float64 pointers from the values -// passed in. -func Float64Slice(vs []float64) []*float64 { - return ptr.Float64Slice(vs) -} - -// Float64Map returns a map of float64 pointers from the values -// passed in. -func Float64Map(vs map[string]float64) map[string]*float64 { - return ptr.Float64Map(vs) -} - -// Time returns a pointer value for the time.Time value passed in. -func Time(v time.Time) *time.Time { - return ptr.Time(v) -} - -// TimeSlice returns a slice of time.Time pointers from the values -// passed in. -func TimeSlice(vs []time.Time) []*time.Time { - return ptr.TimeSlice(vs) -} - -// TimeMap returns a map of time.Time pointers from the values -// passed in. -func TimeMap(vs map[string]time.Time) map[string]*time.Time { - return ptr.TimeMap(vs) -} - -// Duration returns a pointer value for the time.Duration value passed in. -func Duration(v time.Duration) *time.Duration { - return ptr.Duration(v) -} - -// DurationSlice returns a slice of time.Duration pointers from the values -// passed in. -func DurationSlice(vs []time.Duration) []*time.Duration { - return ptr.DurationSlice(vs) -} - -// DurationMap returns a map of time.Duration pointers from the values -// passed in. -func DurationMap(vs map[string]time.Duration) map[string]*time.Duration { - return ptr.DurationMap(vs) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go deleted file mode 100644 index 8d7c35a9ec..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/client.go +++ /dev/null @@ -1,342 +0,0 @@ -package http - -import ( - "context" - "crypto/tls" - "net" - "net/http" - "reflect" - "sync" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/tracing" -) - -// Defaults for the HTTPTransportBuilder. -var ( - // Default connection pool options - DefaultHTTPTransportMaxIdleConns = 100 - DefaultHTTPTransportMaxIdleConnsPerHost = 10 - - // Default connection timeouts - DefaultHTTPTransportIdleConnTimeout = 90 * time.Second - DefaultHTTPTransportTLSHandleshakeTimeout = 10 * time.Second - DefaultHTTPTransportExpectContinueTimeout = 1 * time.Second - - // Default to TLS 1.2 for all HTTPS requests. - DefaultHTTPTransportTLSMinVersion uint16 = tls.VersionTLS12 -) - -// Timeouts for net.Dialer's network connection. -var ( - DefaultDialConnectTimeout = 30 * time.Second - DefaultDialKeepAliveTimeout = 30 * time.Second -) - -// BuildableClient provides a HTTPClient implementation with options to -// create copies of the HTTPClient when additional configuration is provided. -// -// The client's methods will not share the http.Transport value between copies -// of the BuildableClient. Only exported member values of the Transport and -// optional Dialer will be copied between copies of BuildableClient. -type BuildableClient struct { - transport *http.Transport - dialer *net.Dialer - - initOnce sync.Once - - clientTimeout time.Duration - client *http.Client -} - -// NewBuildableClient returns an initialized client for invoking HTTP -// requests. -func NewBuildableClient() *BuildableClient { - return &BuildableClient{} -} - -// Do implements the HTTPClient interface's Do method to invoke a HTTP request, -// and receive the response. Uses the BuildableClient's current -// configuration to invoke the http.Request. -// -// If connection pooling is enabled (aka HTTP KeepAlive) the client will only -// share pooled connections with its own instance. Copies of the -// BuildableClient will have their own connection pools. -// -// Redirect (3xx) responses will not be followed, the HTTP response received -// will returned instead. -func (b *BuildableClient) Do(req *http.Request) (*http.Response, error) { - b.initOnce.Do(b.build) - - return b.client.Do(req) -} - -// Freeze returns a frozen aws.HTTPClient implementation that is no longer a BuildableClient. -// Use this to prevent the SDK from applying DefaultMode configuration values to a buildable client. -func (b *BuildableClient) Freeze() aws.HTTPClient { - cpy := b.clone() - cpy.build() - return cpy.client -} - -func (b *BuildableClient) build() { - b.client = wrapWithLimitedRedirect(&http.Client{ - Timeout: b.clientTimeout, - Transport: b.GetTransport(), - }) -} - -func (b *BuildableClient) clone() *BuildableClient { - cpy := NewBuildableClient() - cpy.transport = b.GetTransport() - cpy.dialer = b.GetDialer() - cpy.clientTimeout = b.clientTimeout - - return cpy -} - -// WithTransportOptions copies the BuildableClient and returns it with the -// http.Transport options applied. -// -// If a non (*http.Transport) was set as the round tripper, the round tripper -// will be replaced with a default Transport value before invoking the option -// functions. -func (b *BuildableClient) WithTransportOptions(opts ...func(*http.Transport)) *BuildableClient { - cpy := b.clone() - - tr := cpy.GetTransport() - for _, opt := range opts { - opt(tr) - } - cpy.transport = tr - - return cpy -} - -// WithDialerOptions copies the BuildableClient and returns it with the -// net.Dialer options applied. Will set the client's http.Transport DialContext -// member. -func (b *BuildableClient) WithDialerOptions(opts ...func(*net.Dialer)) *BuildableClient { - cpy := b.clone() - - dialer := cpy.GetDialer() - for _, opt := range opts { - opt(dialer) - } - cpy.dialer = dialer - - tr := cpy.GetTransport() - tr.DialContext = cpy.dialer.DialContext - cpy.transport = tr - - return cpy -} - -// WithTimeout Sets the timeout used by the client for all requests. -func (b *BuildableClient) WithTimeout(timeout time.Duration) *BuildableClient { - cpy := b.clone() - cpy.clientTimeout = timeout - return cpy -} - -// GetTransport returns a copy of the client's HTTP Transport. -func (b *BuildableClient) GetTransport() *http.Transport { - var tr *http.Transport - if b.transport != nil { - tr = b.transport.Clone() - } else { - tr = defaultHTTPTransport() - } - - return tr -} - -// GetDialer returns a copy of the client's network dialer. -func (b *BuildableClient) GetDialer() *net.Dialer { - var dialer *net.Dialer - if b.dialer != nil { - dialer = shallowCopyStruct(b.dialer).(*net.Dialer) - } else { - dialer = defaultDialer() - } - - return dialer -} - -// GetTimeout returns a copy of the client's timeout to cancel requests with. -func (b *BuildableClient) GetTimeout() time.Duration { - return b.clientTimeout -} - -func defaultDialer() *net.Dialer { - return &net.Dialer{ - Timeout: DefaultDialConnectTimeout, - KeepAlive: DefaultDialKeepAliveTimeout, - DualStack: true, - } -} - -func defaultHTTPTransport() *http.Transport { - dialer := defaultDialer() - - tr := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: traceDialContext(dialer.DialContext), - TLSHandshakeTimeout: DefaultHTTPTransportTLSHandleshakeTimeout, - MaxIdleConns: DefaultHTTPTransportMaxIdleConns, - MaxIdleConnsPerHost: DefaultHTTPTransportMaxIdleConnsPerHost, - IdleConnTimeout: DefaultHTTPTransportIdleConnTimeout, - ExpectContinueTimeout: DefaultHTTPTransportExpectContinueTimeout, - ForceAttemptHTTP2: true, - TLSClientConfig: &tls.Config{ - MinVersion: DefaultHTTPTransportTLSMinVersion, - }, - } - - return tr -} - -type dialContext func(ctx context.Context, network, addr string) (net.Conn, error) - -func traceDialContext(dc dialContext) dialContext { - return func(ctx context.Context, network, addr string) (net.Conn, error) { - span, _ := tracing.GetSpan(ctx) - span.SetProperty("net.peer.name", addr) - - conn, err := dc(ctx, network, addr) - if err != nil { - return conn, err - } - - raddr := conn.RemoteAddr() - if raddr == nil { - return conn, err - } - - host, port, err := net.SplitHostPort(raddr.String()) - if err != nil { // don't blow up just because we couldn't parse - span.SetProperty("net.peer.addr", raddr.String()) - } else { - span.SetProperty("net.peer.host", host) - span.SetProperty("net.peer.port", port) - } - - return conn, err - } -} - -// shallowCopyStruct creates a shallow copy of the passed in source struct, and -// returns that copy of the same struct type. -func shallowCopyStruct(src interface{}) interface{} { - srcVal := reflect.ValueOf(src) - srcValType := srcVal.Type() - - var returnAsPtr bool - if srcValType.Kind() == reflect.Ptr { - srcVal = srcVal.Elem() - srcValType = srcValType.Elem() - returnAsPtr = true - } - dstVal := reflect.New(srcValType).Elem() - - for i := 0; i < srcValType.NumField(); i++ { - ft := srcValType.Field(i) - if len(ft.PkgPath) != 0 { - // unexported fields have a PkgPath - continue - } - - dstVal.Field(i).Set(srcVal.Field(i)) - } - - if returnAsPtr { - dstVal = dstVal.Addr() - } - - return dstVal.Interface() -} - -// wrapWithLimitedRedirect updates the Client's Transport and CheckRedirect to -// not follow any redirect other than 307 and 308. No other redirect will be -// followed. -// -// If the client does not have a Transport defined will use a new SDK default -// http.Transport configuration. -func wrapWithLimitedRedirect(c *http.Client) *http.Client { - tr := c.Transport - if tr == nil { - tr = defaultHTTPTransport() - } - - cc := *c - cc.CheckRedirect = limitedRedirect - cc.Transport = suppressBadHTTPRedirectTransport{ - tr: tr, - } - - return &cc -} - -// limitedRedirect is a CheckRedirect that prevents the client from following -// any non 307/308 HTTP status code redirects. -// -// The 307 and 308 redirects are allowed because the client must use the -// original HTTP method for the redirected to location. Whereas 301 and 302 -// allow the client to switch to GET for the redirect. -// -// Suppresses all redirect requests with a URL of badHTTPRedirectLocation. -func limitedRedirect(r *http.Request, via []*http.Request) error { - // Request.Response, in CheckRedirect is the response that is triggering - // the redirect. - resp := r.Response - if r.URL.String() == badHTTPRedirectLocation { - resp.Header.Del(badHTTPRedirectLocation) - return http.ErrUseLastResponse - } - - switch resp.StatusCode { - case 307, 308: - // Only allow 307 and 308 redirects as they preserve the method. - return nil - } - - return http.ErrUseLastResponse -} - -// suppressBadHTTPRedirectTransport provides an http.RoundTripper -// implementation that wraps another http.RoundTripper to prevent HTTP client -// receiving 301 and 302 HTTP responses redirects without the required location -// header. -// -// Clients using this utility must have a CheckRedirect, e.g. limitedRedirect, -// that check for responses with having a URL of baseHTTPRedirectLocation, and -// suppress the redirect. -type suppressBadHTTPRedirectTransport struct { - tr http.RoundTripper -} - -const badHTTPRedirectLocation = `https://amazonaws.com/badhttpredirectlocation` - -// RoundTrip backfills a stub location when a 301/302 response is received -// without a location. This stub location is used by limitedRedirect to prevent -// the HTTP client from failing attempting to use follow a redirect without a -// location value. -func (t suppressBadHTTPRedirectTransport) RoundTrip(r *http.Request) (*http.Response, error) { - resp, err := t.tr.RoundTrip(r) - if err != nil { - return resp, err - } - - // S3 is the only known service to return 301 without location header. - // The Go standard library HTTP client will return an opaque error if it - // tries to follow a 301/302 response missing the location header. - switch resp.StatusCode { - case 301, 302: - if v := resp.Header.Get("Location"); len(v) == 0 { - resp.Header.Set("Location", badHTTPRedirectLocation) - } - } - - return resp, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go deleted file mode 100644 index 556f54a7f7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/content_type.go +++ /dev/null @@ -1,42 +0,0 @@ -package http - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// removeContentTypeHeader is a build middleware that removes -// content type header if content-length header is unset or -// is set to zero, -type removeContentTypeHeader struct { -} - -// ID the name of the middleware. -func (m *removeContentTypeHeader) ID() string { - return "RemoveContentTypeHeader" -} - -// HandleBuild adds or appends the constructed user agent to the request. -func (m *removeContentTypeHeader) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - // remove contentTypeHeader when content-length is zero - if req.ContentLength == 0 { - req.Header.Del("content-type") - } - - return next.HandleBuild(ctx, in) -} - -// RemoveContentTypeHeader removes content-type header if -// content length is unset or equal to zero. -func RemoveContentTypeHeader(stack *middleware.Stack) error { - return stack.Build.Add(&removeContentTypeHeader{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go deleted file mode 100644 index 44651c9902..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error.go +++ /dev/null @@ -1,33 +0,0 @@ -package http - -import ( - "errors" - "fmt" - - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ResponseError provides the HTTP centric error type wrapping the underlying error -// with the HTTP response value and the deserialized RequestID. -type ResponseError struct { - *smithyhttp.ResponseError - - // RequestID associated with response error - RequestID string -} - -// ServiceRequestID returns the request id associated with Response Error -func (e *ResponseError) ServiceRequestID() string { return e.RequestID } - -// Error returns the formatted error -func (e *ResponseError) Error() string { - return fmt.Sprintf( - "https response error StatusCode: %d, RequestID: %s, %v", - e.Response.StatusCode, e.RequestID, e.Err) -} - -// As populates target and returns true if the type of target is a error type that -// the ResponseError embeds, (e.g.AWS HTTP ResponseError) -func (e *ResponseError) As(target interface{}) bool { - return errors.As(e.ResponseError, target) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go deleted file mode 100644 index a1ad20fe34..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/response_error_middleware.go +++ /dev/null @@ -1,56 +0,0 @@ -package http - -import ( - "context" - - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddResponseErrorMiddleware adds response error wrapper middleware -func AddResponseErrorMiddleware(stack *middleware.Stack) error { - // add error wrapper middleware before request id retriever middleware so that it can wrap the error response - // returned by operation deserializers - return stack.Deserialize.Insert(&ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) -} - -// ResponseErrorWrapper wraps operation errors with ResponseError. -type ResponseErrorWrapper struct { -} - -// ID returns the middleware identifier -func (m *ResponseErrorWrapper) ID() string { - return "ResponseErrorWrapper" -} - -// HandleDeserialize wraps the stack error with smithyhttp.ResponseError. -func (m *ResponseErrorWrapper) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err == nil { - // Nothing to do when there is no error. - return out, metadata, err - } - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - // No raw response to wrap with. - return out, metadata, err - } - - // look for request id in metadata - reqID, _ := awsmiddleware.GetRequestIDMetadata(metadata) - - // Wrap the returned smithy error with the request id retrieved from the metadata - err = &ResponseError{ - ResponseError: &smithyhttp.ResponseError{ - Response: resp, - Err: err, - }, - RequestID: reqID, - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go deleted file mode 100644 index 993929bd9b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/transport/http/timeout_read_closer.go +++ /dev/null @@ -1,104 +0,0 @@ -package http - -import ( - "context" - "fmt" - "io" - "time" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type readResult struct { - n int - err error -} - -// ResponseTimeoutError is an error when the reads from the response are -// delayed longer than the timeout the read was configured for. -type ResponseTimeoutError struct { - TimeoutDur time.Duration -} - -// Timeout returns that the error is was caused by a timeout, and can be -// retried. -func (*ResponseTimeoutError) Timeout() bool { return true } - -func (e *ResponseTimeoutError) Error() string { - return fmt.Sprintf("read on body reach timeout limit, %v", e.TimeoutDur) -} - -// timeoutReadCloser will handle body reads that take too long. -// We will return a ErrReadTimeout error if a timeout occurs. -type timeoutReadCloser struct { - reader io.ReadCloser - duration time.Duration -} - -// Read will spin off a goroutine to call the reader's Read method. We will -// select on the timer's channel or the read's channel. Whoever completes first -// will be returned. -func (r *timeoutReadCloser) Read(b []byte) (int, error) { - timer := time.NewTimer(r.duration) - c := make(chan readResult, 1) - - go func() { - n, err := r.reader.Read(b) - timer.Stop() - c <- readResult{n: n, err: err} - }() - - select { - case data := <-c: - return data.n, data.err - case <-timer.C: - return 0, &ResponseTimeoutError{TimeoutDur: r.duration} - } -} - -func (r *timeoutReadCloser) Close() error { - return r.reader.Close() -} - -// AddResponseReadTimeoutMiddleware adds a middleware to the stack that wraps the -// response body so that a read that takes too long will return an error. -func AddResponseReadTimeoutMiddleware(stack *middleware.Stack, duration time.Duration) error { - return stack.Deserialize.Add(&readTimeout{duration: duration}, middleware.After) -} - -// readTimeout wraps the response body with a timeoutReadCloser -type readTimeout struct { - duration time.Duration -} - -// ID returns the id of the middleware -func (*readTimeout) ID() string { - return "ReadResponseTimeout" -} - -// HandleDeserialize implements the DeserializeMiddleware interface -func (m *readTimeout) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - response.Body = &timeoutReadCloser{ - reader: response.Body, - duration: m.duration, - } - out.RawResponse = response - - return out, metadata, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go deleted file mode 100644 index cc3ae81140..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/types.go +++ /dev/null @@ -1,42 +0,0 @@ -package aws - -import ( - "fmt" -) - -// Ternary is an enum allowing an unknown or none state in addition to a bool's -// true and false. -type Ternary int - -func (t Ternary) String() string { - switch t { - case UnknownTernary: - return "unknown" - case FalseTernary: - return "false" - case TrueTernary: - return "true" - default: - return fmt.Sprintf("unknown value, %d", int(t)) - } -} - -// Bool returns true if the value is TrueTernary, false otherwise. -func (t Ternary) Bool() bool { - return t == TrueTernary -} - -// Enumerations for the values of the Ternary type. -const ( - UnknownTernary Ternary = iota - FalseTernary - TrueTernary -) - -// BoolTernary returns a true or false Ternary value for the bool provided. -func BoolTernary(v bool) Ternary { - if v { - return TrueTernary - } - return FalseTernary -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go deleted file mode 100644 index 5f729d45e1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/version.go +++ /dev/null @@ -1,8 +0,0 @@ -// Package aws provides core functionality for making requests to AWS services. -package aws - -// SDKName is the name of this AWS SDK -const SDKName = "aws-sdk-go-v2" - -// SDKVersion is the version of this SDK -const SDKVersion = goModuleVersion diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md deleted file mode 100644 index 526537b8bb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/CHANGELOG.md +++ /dev/null @@ -1,945 +0,0 @@ -# v1.31.12 (2025-09-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.11 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.10 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.9 (2025-09-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.8 (2025-09-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.7 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.6 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.5 (2025-08-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.4 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.3 (2025-08-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.2 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.1 (2025-08-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.3 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.2 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.1 (2025-07-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.18 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.17 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.16 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.15 (2025-06-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.14 (2025-04-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.13 (2025-04-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.12 (2025-03-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.11 (2025-03-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.10 (2025-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.9 (2025-03-04.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.8 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.7 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.6 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.5 (2025-02-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.4 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.3 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.2 (2025-01-24) - -* **Bug Fix**: Fix env config naming and usage of deprecated ioutil -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.29.1 (2025-01-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.0 (2025-01-15) - -* **Feature**: S3 client behavior is updated to always calculate a checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). The checksum algorithm used by default now becomes CRC32. Checksum behavior can be configured using `when_supported` and `when_required` options - in code using RequestChecksumCalculation, in shared config using request_checksum_calculation, or as env variable using AWS_REQUEST_CHECKSUM_CALCULATION. The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using `when_supported` and `when_required` options - in code using ResponseChecksumValidation, in shared config using response_checksum_validation, or as env variable using AWS_RESPONSE_CHECKSUM_VALIDATION. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.11 (2025-01-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.10 (2025-01-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.9 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.8 (2025-01-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.7 (2024-12-19) - -* **Bug Fix**: Fix improper use of printf-style functions. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.6 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.5 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.4 (2024-11-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.3 (2024-11-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.2 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.0 (2024-10-16) - -* **Feature**: Adds the LoadOptions hook `WithBaseEndpoint` for setting global endpoint override in-code. - -# v1.27.43 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.42 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.41 (2024-10-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.40 (2024-10-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.39 (2024-09-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.38 (2024-09-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.37 (2024-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.36 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.35 (2024-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.34 (2024-09-16) - -* **Bug Fix**: Read `AWS_CONTAINER_CREDENTIALS_FULL_URI` env variable if set when reading a profile with `credential_source`. Also ensure `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI` is always read before it - -# v1.27.33 (2024-09-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.32 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.31 (2024-08-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.30 (2024-08-23) - -* **Bug Fix**: Don't fail credentials unit tests if credentials are found on a file - -# v1.27.29 (2024-08-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.28 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.27 (2024-07-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.26 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.25 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.24 (2024-07-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.23 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.22 (2024-06-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.21 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.20 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.19 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.18 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.17 (2024-06-03) - -* **Documentation**: Add deprecation docs to global endpoint resolution interfaces. These APIs were previously deprecated with the introduction of service-specific endpoint resolution (EndpointResolverV2 and BaseEndpoint on service client options). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.16 (2024-05-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.15 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.14 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.13 (2024-05-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.12 (2024-05-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.11 (2024-04-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.10 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.9 (2024-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.8 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.7 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.6 (2024-03-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.5 (2024-03-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.4 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.3 (2024-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.1 (2024-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.6 (2024-01-22) - -* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.5 (2024-01-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.4 (2024-01-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.3 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.2 (2023-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.1 (2023-12-08) - -* **Bug Fix**: Correct loading of [services *] sections into shared config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2023-12-07) - -* **Feature**: Support modeled request compression. The only algorithm supported at this time is `gzip`. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.12 (2023-12-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.11 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.10 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.9 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.8 (2023-11-28.3) - -* **Bug Fix**: Correct resolution of S3Express auth disable toggle. - -# v1.25.7 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.6 (2023-11-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.5 (2023-11-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.3 (2023-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.2 (2023-11-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.1 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2023-11-14) - -* **Feature**: Add support for dynamic auth token from file and EKS container host in absolute/relative URIs in the HTTP credential provider. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2023-11-13) - -* **Feature**: Replace the legacy config parser with a modern, less-strict implementation. Parsing failures within a section will now simply ignore the invalid line rather than silently drop the entire section. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.0 (2023-11-09.2) - -* **Feature**: BREAKFIX: In order to support subproperty parsing, invalid property definitions must not be ignored -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.3 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.2 (2023-11-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.1 (2023-11-06) - -* No change notes available for this release. - -# v1.22.0 (2023-11-02) - -* **Feature**: Add env and shared config settings for disabling IMDSv1 fallback. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2023-10-24) - -* No change notes available for this release. - -# v1.19.0 (2023-10-16) - -* **Feature**: Modify logic of retrieving user agent appID from env config - -# v1.18.45 (2023-10-12) - -* **Bug Fix**: Fail to load config if an explicitly provided profile doesn't exist. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.44 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.43 (2023-10-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.42 (2023-09-22) - -* **Bug Fix**: Fixed a bug where merging `max_attempts` or `duration_seconds` fields across shared config files with invalid values would silently default them to 0. -* **Bug Fix**: Move type assertion of config values out of the parsing stage, which resolves an issue where the contents of a profile would silently be dropped with certain numeric formats. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.41 (2023-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.40 (2023-09-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.39 (2023-09-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.38 (2023-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.37 (2023-08-23) - -* No change notes available for this release. - -# v1.18.36 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.35 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.34 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.33 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.32 (2023-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.31 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.30 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.29 (2023-07-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.28 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.27 (2023-06-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.26 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.25 (2023-05-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.24 (2023-05-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.23 (2023-05-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.22 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.21 (2023-04-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.20 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.19 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.18 (2023-03-16) - -* **Bug Fix**: Allow RoleARN to be set as functional option on STS WebIdentityRoleOptions. Fixes aws/aws-sdk-go-v2#2015. - -# v1.18.17 (2023-03-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.16 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.15 (2023-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.14 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.13 (2023-02-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.12 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.11 (2023-02-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.10 (2023-01-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.9 (2023-01-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.8 (2023-01-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2022-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.6 (2022-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2022-12-15) - -* **Bug Fix**: Unify logic between shared config and in finding home directory -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.3 (2022-11-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2022-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2022-11-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2022-11-11) - -* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 -* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.11 (2022-11-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.10 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.9 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.8 (2022-09-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.7 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.6 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.5 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.4 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.3 (2022-08-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2022-08-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2022-08-14) - -* **Feature**: Add alternative mechanism for determning the users `$HOME` or `%USERPROFILE%` location when the environment variables are not present. - -# v1.16.1 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2022-08-10) - -* **Feature**: Adds support for the following settings in the `~/.aws/credentials` file: `sso_account_id`, `sso_region`, `sso_role_name`, `sso_start_url`, and `ca_bundle`. - -# v1.15.17 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.16 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.15 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.14 (2022-07-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.13 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.12 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.11 (2022-06-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.10 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.9 (2022-05-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.8 (2022-05-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.7 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.6 (2022-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.5 (2022-05-09) - -* **Bug Fix**: Fixes a bug in LoadDefaultConfig to correctly assign ConfigSources so all config resolvers have access to the config sources. This fixes the feature/ec2/imds client not having configuration applied via config.LoadOptions such as EC2IMDSClientEnableState. PR [#1682](https://github.com/aws/aws-sdk-go-v2/pull/1682) - -# v1.15.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2022-02-24) - -* **Feature**: Adds support for loading RetryMaxAttempts and RetryMod from the environment and shared configuration files. These parameters drive how the SDK's API client will initialize its default retryer, if custome retryer has not been specified. See [config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/config) module and [aws.Config](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws#Config) for more information about and how to use these new options. -* **Feature**: Adds support for the `ca_bundle` parameter in shared config and credentials files. The usage of the file is the same as environment variable, `AWS_CA_BUNDLE`, but sourced from shared config. Fixes [#1589](https://github.com/aws/aws-sdk-go-v2/issues/1589) -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2022-01-28) - -* **Bug Fix**: Fixes LoadDefaultConfig handling of errors returned by passed in functional options. Previously errors returned from the LoadOptions passed into LoadDefaultConfig were incorrectly ignored. [#1562](https://github.com/aws/aws-sdk-go-v2/pull/1562). Thanks to [Pinglei Guo](https://github.com/pingleig) for submitting this PR. -* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug. -* **Bug Fix**: Updates `config` module to use os.UserHomeDir instead of hard coded environment variable for OS. [#1563](https://github.com/aws/aws-sdk-go-v2/pull/1563) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-01-07) - -* **Feature**: Add load option for CredentialCache. Adds a new member to the LoadOptions struct, CredentialsCacheOptions. This member allows specifying a function that will be used to configure the CredentialsCache. The CredentialsCacheOptions will only be used if the configuration loader will wrap the underlying credential provider in the CredentialsCache. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2021-12-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2021-12-02) - -* **Feature**: Add support for specifying `EndpointResolverWithOptions` on `LoadOptions`, and associated `WithEndpointResolverWithOptions`. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.3 (2021-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.2 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.1 (2021-11-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.3 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.2 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.1 (2021-09-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-09-02) - -* **Feature**: Add support for S3 Multi-Region Access Point ARNs. - -# v1.7.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-08-04) - -* **Feature**: adds error handling for defered close calls -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-07-15) - -* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-07-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-06-25) - -* **Feature**: Adds configuration setting for enabling endpoint discovery. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-05-20) - -* **Feature**: SSO credentials can now be defined alongside other credential providers within the same configuration profile. -* **Bug Fix**: Profile names were incorrectly normalized to lower-case, which could result in unexpected profile configurations. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/config/auth_scheme_preference.go b/vendor/github.com/aws/aws-sdk-go-v2/config/auth_scheme_preference.go deleted file mode 100644 index 99e1236614..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/auth_scheme_preference.go +++ /dev/null @@ -1,19 +0,0 @@ -package config - -import "strings" - -func toAuthSchemePreferenceList(cfg string) []string { - if len(cfg) == 0 { - return nil - } - parts := strings.Split(cfg, ",") - ids := make([]string, 0, len(parts)) - - for _, p := range parts { - if id := strings.TrimSpace(p); len(id) > 0 { - ids = append(ids, id) - } - } - - return ids -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/config.go deleted file mode 100644 index caa20a158a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/config.go +++ /dev/null @@ -1,235 +0,0 @@ -package config - -import ( - "context" - "os" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// defaultAWSConfigResolvers are a slice of functions that will resolve external -// configuration values into AWS configuration values. -// -// This will setup the AWS configuration's Region, -var defaultAWSConfigResolvers = []awsConfigResolver{ - // Resolves the default configuration the SDK's aws.Config will be - // initialized with. - resolveDefaultAWSConfig, - - // Sets the logger to be used. Could be user provided logger, and client - // logging mode. - resolveLogger, - resolveClientLogMode, - - // Sets the HTTP client and configuration to use for making requests using - // the HTTP transport. - resolveHTTPClient, - resolveCustomCABundle, - - // Sets the endpoint resolving behavior the API Clients will use for making - // requests to. Clients default to their own clients this allows overrides - // to be specified. The resolveEndpointResolver option is deprecated, but - // we still need to set it for backwards compatibility on config - // construction. - resolveEndpointResolver, - resolveEndpointResolverWithOptions, - - // Sets the retry behavior API clients will use within their retry attempt - // middleware. Defaults to unset, allowing API clients to define their own - // retry behavior. - resolveRetryer, - - // Sets the region the API Clients should use for making requests to. - resolveRegion, - resolveEC2IMDSRegion, - resolveDefaultRegion, - - // Sets the additional set of middleware stack mutators that will custom - // API client request pipeline middleware. - resolveAPIOptions, - - // Resolves the DefaultsMode that should be used by SDK clients. If this - // mode is set to DefaultsModeAuto. - // - // Comes after HTTPClient and CustomCABundle to ensure the HTTP client is - // configured if provided before invoking IMDS if mode is auto. Comes - // before resolving credentials so that those subsequent clients use the - // configured auto mode. - resolveDefaultsModeOptions, - - // Sets the resolved credentials the API clients will use for - // authentication. Provides the SDK's default credential chain. - // - // Should probably be the last step in the resolve chain to ensure that all - // other configurations are resolved first in case downstream credentials - // implementations depend on or can be configured with earlier resolved - // configuration options. - resolveCredentials, - - // Sets the resolved bearer authentication token API clients will use for - // httpBearerAuth authentication scheme. - resolveBearerAuthToken, - - // Sets the sdk app ID if present in env var or shared config profile - resolveAppID, - - resolveBaseEndpoint, - - // Sets the DisableRequestCompression if present in env var or shared config profile - resolveDisableRequestCompression, - - // Sets the RequestMinCompressSizeBytes if present in env var or shared config profile - resolveRequestMinCompressSizeBytes, - - // Sets the AccountIDEndpointMode if present in env var or shared config profile - resolveAccountIDEndpointMode, - - // Sets the RequestChecksumCalculation if present in env var or shared config profile - resolveRequestChecksumCalculation, - - // Sets the ResponseChecksumValidation if present in env var or shared config profile - resolveResponseChecksumValidation, - - resolveInterceptors, - - resolveAuthSchemePreference, - - // Sets the ServiceOptions if present in LoadOptions - resolveServiceOptions, -} - -// A Config represents a generic configuration value or set of values. This type -// will be used by the AWSConfigResolvers to extract -// -// General the Config type will use type assertion against the Provider interfaces -// to extract specific data from the Config. -type Config interface{} - -// A loader is used to load external configuration data and returns it as -// a generic Config type. -// -// The loader should return an error if it fails to load the external configuration -// or the configuration data is malformed, or required components missing. -type loader func(context.Context, configs) (Config, error) - -// An awsConfigResolver will extract configuration data from the configs slice -// using the provider interfaces to extract specific functionality. The extracted -// configuration values will be written to the AWS Config value. -// -// The resolver should return an error if it it fails to extract the data, the -// data is malformed, or incomplete. -type awsConfigResolver func(ctx context.Context, cfg *aws.Config, configs configs) error - -// configs is a slice of Config values. These values will be used by the -// AWSConfigResolvers to extract external configuration values to populate the -// AWS Config type. -// -// Use AppendFromLoaders to add additional external Config values that are -// loaded from external sources. -// -// Use ResolveAWSConfig after external Config values have been added or loaded -// to extract the loaded configuration values into the AWS Config. -type configs []Config - -// AppendFromLoaders iterates over the slice of loaders passed in calling each -// loader function in order. The external config value returned by the loader -// will be added to the returned configs slice. -// -// If a loader returns an error this method will stop iterating and return -// that error. -func (cs configs) AppendFromLoaders(ctx context.Context, loaders []loader) (configs, error) { - for _, fn := range loaders { - cfg, err := fn(ctx, cs) - if err != nil { - return nil, err - } - - cs = append(cs, cfg) - } - - return cs, nil -} - -// ResolveAWSConfig returns a AWS configuration populated with values by calling -// the resolvers slice passed in. Each resolver is called in order. Any resolver -// may overwrite the AWS Configuration value of a previous resolver. -// -// If an resolver returns an error this method will return that error, and stop -// iterating over the resolvers. -func (cs configs) ResolveAWSConfig(ctx context.Context, resolvers []awsConfigResolver) (aws.Config, error) { - var cfg aws.Config - - for _, fn := range resolvers { - if err := fn(ctx, &cfg, cs); err != nil { - return aws.Config{}, err - } - } - - return cfg, nil -} - -// ResolveConfig calls the provide function passing slice of configuration sources. -// This implements the aws.ConfigResolver interface. -func (cs configs) ResolveConfig(f func(configs []interface{}) error) error { - var cfgs []interface{} - for i := range cs { - cfgs = append(cfgs, cs[i]) - } - return f(cfgs) -} - -// LoadDefaultConfig reads the SDK's default external configurations, and -// populates an AWS Config with the values from the external configurations. -// -// An optional variadic set of additional Config values can be provided as input -// that will be prepended to the configs slice. Use this to add custom configuration. -// The custom configurations must satisfy the respective providers for their data -// or the custom data will be ignored by the resolvers and config loaders. -// -// cfg, err := config.LoadDefaultConfig( context.TODO(), -// config.WithSharedConfigProfile("test-profile"), -// ) -// if err != nil { -// panic(fmt.Sprintf("failed loading config, %v", err)) -// } -// -// The default configuration sources are: -// * Environment Variables -// * Shared Configuration and Shared Credentials files. -func LoadDefaultConfig(ctx context.Context, optFns ...func(*LoadOptions) error) (cfg aws.Config, err error) { - var options LoadOptions - for _, optFn := range optFns { - if err := optFn(&options); err != nil { - return aws.Config{}, err - } - } - - // assign Load Options to configs - var cfgCpy = configs{options} - - cfgCpy, err = cfgCpy.AppendFromLoaders(ctx, resolveConfigLoaders(&options)) - if err != nil { - return aws.Config{}, err - } - - cfg, err = cfgCpy.ResolveAWSConfig(ctx, defaultAWSConfigResolvers) - if err != nil { - return aws.Config{}, err - } - - return cfg, nil -} - -func resolveConfigLoaders(options *LoadOptions) []loader { - loaders := make([]loader, 2) - loaders[0] = loadEnvConfig - - // specification of a profile should cause a load failure if it doesn't exist - if os.Getenv(awsProfileEnv) != "" || options.SharedConfigProfile != "" { - loaders[1] = loadSharedConfig - } else { - loaders[1] = loadSharedConfigIgnoreNotExist - } - - return loaders -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go b/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go deleted file mode 100644 index 20b66367ff..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/defaultsmode.go +++ /dev/null @@ -1,47 +0,0 @@ -package config - -import ( - "context" - "os" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" -) - -const execEnvVar = "AWS_EXECUTION_ENV" - -// DefaultsModeOptions is the set of options that are used to configure -type DefaultsModeOptions struct { - // The SDK configuration defaults mode. Defaults to legacy if not specified. - // - // Supported modes are: auto, cross-region, in-region, legacy, mobile, standard - Mode aws.DefaultsMode - - // The EC2 Instance Metadata Client that should be used when performing environment - // discovery when aws.DefaultsModeAuto is set. - // - // If not specified the SDK will construct a client if the instance metadata service has not been disabled by - // the AWS_EC2_METADATA_DISABLED environment variable. - IMDSClient *imds.Client -} - -func resolveDefaultsModeRuntimeEnvironment(ctx context.Context, envConfig *EnvConfig, client *imds.Client) (aws.RuntimeEnvironment, error) { - getRegionOutput, err := client.GetRegion(ctx, &imds.GetRegionInput{}) - // honor context timeouts, but if we couldn't talk to IMDS don't fail runtime environment introspection. - select { - case <-ctx.Done(): - return aws.RuntimeEnvironment{}, err - default: - } - - var imdsRegion string - if err == nil { - imdsRegion = getRegionOutput.Region - } - - return aws.RuntimeEnvironment{ - EnvironmentIdentifier: aws.ExecutionEnvironmentID(os.Getenv(execEnvVar)), - Region: envConfig.Region, - EC2InstanceMetadataRegion: imdsRegion, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go deleted file mode 100644 index aab7164e28..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Package config provides utilities for loading configuration from multiple -// sources that can be used to configure the SDK's API clients, and utilities. -// -// The config package will load configuration from environment variables, AWS -// shared configuration file (~/.aws/config), and AWS shared credentials file -// (~/.aws/credentials). -// -// Use the LoadDefaultConfig to load configuration from all the SDK's supported -// sources, and resolve credentials using the SDK's default credential chain. -// -// LoadDefaultConfig allows for a variadic list of additional Config sources that can -// provide one or more configuration values which can be used to programmatically control the resolution -// of a specific value, or allow for broader range of additional configuration sources not supported by the SDK. -// A Config source implements one or more provider interfaces defined in this package. Config sources passed in will -// take precedence over the default environment and shared config sources used by the SDK. If one or more Config sources -// implement the same provider interface, priority will be handled by the order in which the sources were passed in. -// -// A number of helpers (prefixed by “With“) are provided in this package that implement their respective provider -// interface. These helpers should be used for overriding configuration programmatically at runtime. -package config diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go deleted file mode 100644 index e932c63dfb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/env_config.go +++ /dev/null @@ -1,932 +0,0 @@ -package config - -import ( - "bytes" - "context" - "fmt" - "io" - "os" - "strconv" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - smithyrequestcompression "github.com/aws/smithy-go/private/requestcompression" -) - -// CredentialsSourceName provides a name of the provider when config is -// loaded from environment. -const CredentialsSourceName = "EnvConfigCredentials" - -// Environment variables that will be read for configuration values. -const ( - awsAccessKeyIDEnv = "AWS_ACCESS_KEY_ID" - awsAccessKeyEnv = "AWS_ACCESS_KEY" - - awsSecretAccessKeyEnv = "AWS_SECRET_ACCESS_KEY" - awsSecretKeyEnv = "AWS_SECRET_KEY" - - awsSessionTokenEnv = "AWS_SESSION_TOKEN" - - awsContainerCredentialsFullURIEnv = "AWS_CONTAINER_CREDENTIALS_FULL_URI" - awsContainerCredentialsRelativeURIEnv = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI" - awsContainerAuthorizationTokenEnv = "AWS_CONTAINER_AUTHORIZATION_TOKEN" - - awsRegionEnv = "AWS_REGION" - awsDefaultRegionEnv = "AWS_DEFAULT_REGION" - - awsProfileEnv = "AWS_PROFILE" - awsDefaultProfileEnv = "AWS_DEFAULT_PROFILE" - - awsSharedCredentialsFileEnv = "AWS_SHARED_CREDENTIALS_FILE" - - awsConfigFileEnv = "AWS_CONFIG_FILE" - - awsCABundleEnv = "AWS_CA_BUNDLE" - - awsWebIdentityTokenFileEnv = "AWS_WEB_IDENTITY_TOKEN_FILE" - - awsRoleARNEnv = "AWS_ROLE_ARN" - awsRoleSessionNameEnv = "AWS_ROLE_SESSION_NAME" - - awsEnableEndpointDiscoveryEnv = "AWS_ENABLE_ENDPOINT_DISCOVERY" - - awsS3UseARNRegionEnv = "AWS_S3_USE_ARN_REGION" - - awsEc2MetadataServiceEndpointModeEnv = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE" - - awsEc2MetadataServiceEndpointEnv = "AWS_EC2_METADATA_SERVICE_ENDPOINT" - - awsEc2MetadataDisabledEnv = "AWS_EC2_METADATA_DISABLED" - awsEc2MetadataV1DisabledEnv = "AWS_EC2_METADATA_V1_DISABLED" - - awsS3DisableMultiRegionAccessPointsEnv = "AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS" - - awsUseDualStackEndpointEnv = "AWS_USE_DUALSTACK_ENDPOINT" - - awsUseFIPSEndpointEnv = "AWS_USE_FIPS_ENDPOINT" - - awsDefaultsModeEnv = "AWS_DEFAULTS_MODE" - - awsMaxAttemptsEnv = "AWS_MAX_ATTEMPTS" - awsRetryModeEnv = "AWS_RETRY_MODE" - awsSdkUaAppIDEnv = "AWS_SDK_UA_APP_ID" - - awsIgnoreConfiguredEndpointURLEnv = "AWS_IGNORE_CONFIGURED_ENDPOINT_URLS" - awsEndpointURLEnv = "AWS_ENDPOINT_URL" - - awsDisableRequestCompressionEnv = "AWS_DISABLE_REQUEST_COMPRESSION" - awsRequestMinCompressionSizeBytesEnv = "AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES" - - awsS3DisableExpressSessionAuthEnv = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH" - - awsAccountIDEnv = "AWS_ACCOUNT_ID" - awsAccountIDEndpointModeEnv = "AWS_ACCOUNT_ID_ENDPOINT_MODE" - - awsRequestChecksumCalculation = "AWS_REQUEST_CHECKSUM_CALCULATION" - awsResponseChecksumValidation = "AWS_RESPONSE_CHECKSUM_VALIDATION" - - awsAuthSchemePreferenceEnv = "AWS_AUTH_SCHEME_PREFERENCE" -) - -var ( - credAccessEnvKeys = []string{ - awsAccessKeyIDEnv, - awsAccessKeyEnv, - } - credSecretEnvKeys = []string{ - awsSecretAccessKeyEnv, - awsSecretKeyEnv, - } - regionEnvKeys = []string{ - awsRegionEnv, - awsDefaultRegionEnv, - } - profileEnvKeys = []string{ - awsProfileEnv, - awsDefaultProfileEnv, - } -) - -// EnvConfig is a collection of environment values the SDK will read -// setup config from. All environment values are optional. But some values -// such as credentials require multiple values to be complete or the values -// will be ignored. -type EnvConfig struct { - // Environment configuration values. If set both Access Key ID and Secret Access - // Key must be provided. Session Token and optionally also be provided, but is - // not required. - // - // # Access Key ID - // AWS_ACCESS_KEY_ID=AKID - // AWS_ACCESS_KEY=AKID # only read if AWS_ACCESS_KEY_ID is not set. - // - // # Secret Access Key - // AWS_SECRET_ACCESS_KEY=SECRET - // AWS_SECRET_KEY=SECRET # only read if AWS_SECRET_ACCESS_KEY is not set. - // - // # Session Token - // AWS_SESSION_TOKEN=TOKEN - Credentials aws.Credentials - - // ContainerCredentialsEndpoint value is the HTTP enabled endpoint to retrieve credentials - // using the endpointcreds.Provider - ContainerCredentialsEndpoint string - - // ContainerCredentialsRelativePath is the relative URI path that will be used when attempting to retrieve - // credentials from the container endpoint. - ContainerCredentialsRelativePath string - - // ContainerAuthorizationToken is the authorization token that will be included in the HTTP Authorization - // header when attempting to retrieve credentials from the container credentials endpoint. - ContainerAuthorizationToken string - - // Region value will instruct the SDK where to make service API requests to. If is - // not provided in the environment the region must be provided before a service - // client request is made. - // - // AWS_REGION=us-west-2 - // AWS_DEFAULT_REGION=us-west-2 - Region string - - // Profile name the SDK should load use when loading shared configuration from the - // shared configuration files. If not provided "default" will be used as the - // profile name. - // - // AWS_PROFILE=my_profile - // AWS_DEFAULT_PROFILE=my_profile - SharedConfigProfile string - - // Shared credentials file path can be set to instruct the SDK to use an alternate - // file for the shared credentials. If not set the file will be loaded from - // $HOME/.aws/credentials on Linux/Unix based systems, and - // %USERPROFILE%\.aws\credentials on Windows. - // - // AWS_SHARED_CREDENTIALS_FILE=$HOME/my_shared_credentials - SharedCredentialsFile string - - // Shared config file path can be set to instruct the SDK to use an alternate - // file for the shared config. If not set the file will be loaded from - // $HOME/.aws/config on Linux/Unix based systems, and - // %USERPROFILE%\.aws\config on Windows. - // - // AWS_CONFIG_FILE=$HOME/my_shared_config - SharedConfigFile string - - // Sets the path to a custom Credentials Authority (CA) Bundle PEM file - // that the SDK will use instead of the system's root CA bundle. - // Only use this if you want to configure the SDK to use a custom set - // of CAs. - // - // Enabling this option will attempt to merge the Transport - // into the SDK's HTTP client. If the client's Transport is - // not a http.Transport an error will be returned. If the - // Transport's TLS config is set this option will cause the - // SDK to overwrite the Transport's TLS config's RootCAs value. - // - // Setting a custom HTTPClient in the aws.Config options will override this setting. - // To use this option and custom HTTP client, the HTTP client needs to be provided - // when creating the config. Not the service client. - // - // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle - CustomCABundle string - - // Enables endpoint discovery via environment variables. - // - // AWS_ENABLE_ENDPOINT_DISCOVERY=true - EnableEndpointDiscovery aws.EndpointDiscoveryEnableState - - // Specifies the WebIdentity token the SDK should use to assume a role - // with. - // - // AWS_WEB_IDENTITY_TOKEN_FILE=file_path - WebIdentityTokenFilePath string - - // Specifies the IAM role arn to use when assuming an role. - // - // AWS_ROLE_ARN=role_arn - RoleARN string - - // Specifies the IAM role session name to use when assuming a role. - // - // AWS_ROLE_SESSION_NAME=session_name - RoleSessionName string - - // Specifies if the S3 service should allow ARNs to direct the region - // the client's requests are sent to. - // - // AWS_S3_USE_ARN_REGION=true - S3UseARNRegion *bool - - // Specifies if the EC2 IMDS service client is enabled. - // - // AWS_EC2_METADATA_DISABLED=true - EC2IMDSClientEnableState imds.ClientEnableState - - // Specifies if EC2 IMDSv1 fallback is disabled. - // - // AWS_EC2_METADATA_V1_DISABLED=true - EC2IMDSv1Disabled *bool - - // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) - // - // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6 - EC2IMDSEndpointMode imds.EndpointModeState - - // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode. - // - // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://fd00:ec2::254 - EC2IMDSEndpoint string - - // Specifies if the S3 service should disable multi-region access points - // support. - // - // AWS_S3_DISABLE_MULTIREGION_ACCESS_POINTS=true - S3DisableMultiRegionAccessPoints *bool - - // Specifies that SDK clients must resolve a dual-stack endpoint for - // services. - // - // AWS_USE_DUALSTACK_ENDPOINT=true - UseDualStackEndpoint aws.DualStackEndpointState - - // Specifies that SDK clients must resolve a FIPS endpoint for - // services. - // - // AWS_USE_FIPS_ENDPOINT=true - UseFIPSEndpoint aws.FIPSEndpointState - - // Specifies the SDK Defaults Mode used by services. - // - // AWS_DEFAULTS_MODE=standard - DefaultsMode aws.DefaultsMode - - // Specifies the maximum number attempts an API client will call an - // operation that fails with a retryable error. - // - // AWS_MAX_ATTEMPTS=3 - RetryMaxAttempts int - - // Specifies the retry model the API client will be created with. - // - // aws_retry_mode=standard - RetryMode aws.RetryMode - - // aws sdk app ID that can be added to user agent header string - AppID string - - // Flag used to disable configured endpoints. - IgnoreConfiguredEndpoints *bool - - // Value to contain configured endpoints to be propagated to - // corresponding endpoint resolution field. - BaseEndpoint string - - // determine if request compression is allowed, default to false - // retrieved from env var AWS_DISABLE_REQUEST_COMPRESSION - DisableRequestCompression *bool - - // inclusive threshold request body size to trigger compression, - // default to 10240 and must be within 0 and 10485760 bytes inclusive - // retrieved from env var AWS_REQUEST_MIN_COMPRESSION_SIZE_BYTES - RequestMinCompressSizeBytes *int64 - - // Whether S3Express auth is disabled. - // - // This will NOT prevent requests from being made to S3Express buckets, it - // will only bypass the modified endpoint routing and signing behaviors - // associated with the feature. - S3DisableExpressAuth *bool - - // Indicates whether account ID will be required/ignored in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - - // Indicates whether request checksum should be calculated - RequestChecksumCalculation aws.RequestChecksumCalculation - - // Indicates whether response checksum should be validated - ResponseChecksumValidation aws.ResponseChecksumValidation - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// loadEnvConfig reads configuration values from the OS's environment variables. -// Returning the a Config typed EnvConfig to satisfy the ConfigLoader func type. -func loadEnvConfig(ctx context.Context, cfgs configs) (Config, error) { - return NewEnvConfig() -} - -// NewEnvConfig retrieves the SDK's environment configuration. -// See `EnvConfig` for the values that will be retrieved. -func NewEnvConfig() (EnvConfig, error) { - var cfg EnvConfig - - creds := aws.Credentials{ - Source: CredentialsSourceName, - } - setStringFromEnvVal(&creds.AccessKeyID, credAccessEnvKeys) - setStringFromEnvVal(&creds.SecretAccessKey, credSecretEnvKeys) - if creds.HasKeys() { - creds.AccountID = os.Getenv(awsAccountIDEnv) - creds.SessionToken = os.Getenv(awsSessionTokenEnv) - cfg.Credentials = creds - } - - cfg.ContainerCredentialsEndpoint = os.Getenv(awsContainerCredentialsFullURIEnv) - cfg.ContainerCredentialsRelativePath = os.Getenv(awsContainerCredentialsRelativeURIEnv) - cfg.ContainerAuthorizationToken = os.Getenv(awsContainerAuthorizationTokenEnv) - - setStringFromEnvVal(&cfg.Region, regionEnvKeys) - setStringFromEnvVal(&cfg.SharedConfigProfile, profileEnvKeys) - - cfg.SharedCredentialsFile = os.Getenv(awsSharedCredentialsFileEnv) - cfg.SharedConfigFile = os.Getenv(awsConfigFileEnv) - - cfg.CustomCABundle = os.Getenv(awsCABundleEnv) - - cfg.WebIdentityTokenFilePath = os.Getenv(awsWebIdentityTokenFileEnv) - - cfg.RoleARN = os.Getenv(awsRoleARNEnv) - cfg.RoleSessionName = os.Getenv(awsRoleSessionNameEnv) - - cfg.AppID = os.Getenv(awsSdkUaAppIDEnv) - - if err := setBoolPtrFromEnvVal(&cfg.DisableRequestCompression, []string{awsDisableRequestCompressionEnv}); err != nil { - return cfg, err - } - if err := setInt64PtrFromEnvVal(&cfg.RequestMinCompressSizeBytes, []string{awsRequestMinCompressionSizeBytesEnv}, smithyrequestcompression.MaxRequestMinCompressSizeBytes); err != nil { - return cfg, err - } - - if err := setEndpointDiscoveryTypeFromEnvVal(&cfg.EnableEndpointDiscovery, []string{awsEnableEndpointDiscoveryEnv}); err != nil { - return cfg, err - } - - if err := setBoolPtrFromEnvVal(&cfg.S3UseARNRegion, []string{awsS3UseARNRegionEnv}); err != nil { - return cfg, err - } - - setEC2IMDSClientEnableState(&cfg.EC2IMDSClientEnableState, []string{awsEc2MetadataDisabledEnv}) - if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, []string{awsEc2MetadataServiceEndpointModeEnv}); err != nil { - return cfg, err - } - cfg.EC2IMDSEndpoint = os.Getenv(awsEc2MetadataServiceEndpointEnv) - if err := setBoolPtrFromEnvVal(&cfg.EC2IMDSv1Disabled, []string{awsEc2MetadataV1DisabledEnv}); err != nil { - return cfg, err - } - - if err := setBoolPtrFromEnvVal(&cfg.S3DisableMultiRegionAccessPoints, []string{awsS3DisableMultiRegionAccessPointsEnv}); err != nil { - return cfg, err - } - - if err := setUseDualStackEndpointFromEnvVal(&cfg.UseDualStackEndpoint, []string{awsUseDualStackEndpointEnv}); err != nil { - return cfg, err - } - - if err := setUseFIPSEndpointFromEnvVal(&cfg.UseFIPSEndpoint, []string{awsUseFIPSEndpointEnv}); err != nil { - return cfg, err - } - - if err := setDefaultsModeFromEnvVal(&cfg.DefaultsMode, []string{awsDefaultsModeEnv}); err != nil { - return cfg, err - } - - if err := setIntFromEnvVal(&cfg.RetryMaxAttempts, []string{awsMaxAttemptsEnv}); err != nil { - return cfg, err - } - if err := setRetryModeFromEnvVal(&cfg.RetryMode, []string{awsRetryModeEnv}); err != nil { - return cfg, err - } - - setStringFromEnvVal(&cfg.BaseEndpoint, []string{awsEndpointURLEnv}) - - if err := setBoolPtrFromEnvVal(&cfg.IgnoreConfiguredEndpoints, []string{awsIgnoreConfiguredEndpointURLEnv}); err != nil { - return cfg, err - } - - if err := setBoolPtrFromEnvVal(&cfg.S3DisableExpressAuth, []string{awsS3DisableExpressSessionAuthEnv}); err != nil { - return cfg, err - } - - if err := setAIDEndPointModeFromEnvVal(&cfg.AccountIDEndpointMode, []string{awsAccountIDEndpointModeEnv}); err != nil { - return cfg, err - } - - if err := setRequestChecksumCalculationFromEnvVal(&cfg.RequestChecksumCalculation, []string{awsRequestChecksumCalculation}); err != nil { - return cfg, err - } - if err := setResponseChecksumValidationFromEnvVal(&cfg.ResponseChecksumValidation, []string{awsResponseChecksumValidation}); err != nil { - return cfg, err - } - - cfg.AuthSchemePreference = toAuthSchemePreferenceList(os.Getenv(awsAuthSchemePreferenceEnv)) - - return cfg, nil -} - -func (c EnvConfig) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) { - if len(c.DefaultsMode) == 0 { - return "", false, nil - } - return c.DefaultsMode, true, nil -} - -func (c EnvConfig) getAppID(context.Context) (string, bool, error) { - return c.AppID, len(c.AppID) > 0, nil -} - -func (c EnvConfig) getDisableRequestCompression(context.Context) (bool, bool, error) { - if c.DisableRequestCompression == nil { - return false, false, nil - } - return *c.DisableRequestCompression, true, nil -} - -func (c EnvConfig) getRequestMinCompressSizeBytes(context.Context) (int64, bool, error) { - if c.RequestMinCompressSizeBytes == nil { - return 0, false, nil - } - return *c.RequestMinCompressSizeBytes, true, nil -} - -func (c EnvConfig) getAccountIDEndpointMode(context.Context) (aws.AccountIDEndpointMode, bool, error) { - return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil -} - -func (c EnvConfig) getRequestChecksumCalculation(context.Context) (aws.RequestChecksumCalculation, bool, error) { - return c.RequestChecksumCalculation, c.RequestChecksumCalculation > 0, nil -} - -func (c EnvConfig) getResponseChecksumValidation(context.Context) (aws.ResponseChecksumValidation, bool, error) { - return c.ResponseChecksumValidation, c.ResponseChecksumValidation > 0, nil -} - -// GetRetryMaxAttempts returns the value of AWS_MAX_ATTEMPTS if was specified, -// and not 0. -func (c EnvConfig) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) { - if c.RetryMaxAttempts == 0 { - return 0, false, nil - } - return c.RetryMaxAttempts, true, nil -} - -// GetRetryMode returns the RetryMode of AWS_RETRY_MODE if was specified, and a -// valid value. -func (c EnvConfig) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) { - if len(c.RetryMode) == 0 { - return "", false, nil - } - return c.RetryMode, true, nil -} - -func setEC2IMDSClientEnableState(state *imds.ClientEnableState, keys []string) { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - switch { - case strings.EqualFold(value, "true"): - *state = imds.ClientDisabled - case strings.EqualFold(value, "false"): - *state = imds.ClientEnabled - default: - continue - } - break - } -} - -func setDefaultsModeFromEnvVal(mode *aws.DefaultsMode, keys []string) error { - for _, k := range keys { - if value := os.Getenv(k); len(value) > 0 { - if ok := mode.SetFromString(value); !ok { - return fmt.Errorf("invalid %s value: %s", k, value) - } - break - } - } - return nil -} - -func setRetryModeFromEnvVal(mode *aws.RetryMode, keys []string) (err error) { - for _, k := range keys { - if value := os.Getenv(k); len(value) > 0 { - *mode, err = aws.ParseRetryMode(value) - if err != nil { - return fmt.Errorf("invalid %s value, %w", k, err) - } - break - } - } - return nil -} - -func setEC2IMDSEndpointMode(mode *imds.EndpointModeState, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - if err := mode.SetFromString(value); err != nil { - return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err) - } - } - return nil -} - -func setAIDEndPointModeFromEnvVal(m *aws.AccountIDEndpointMode, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - - switch value { - case "preferred": - *m = aws.AccountIDEndpointModePreferred - case "required": - *m = aws.AccountIDEndpointModeRequired - case "disabled": - *m = aws.AccountIDEndpointModeDisabled - default: - return fmt.Errorf("invalid value for environment variable, %s=%s, must be preferred/required/disabled", k, value) - } - break - } - return nil -} - -func setRequestChecksumCalculationFromEnvVal(m *aws.RequestChecksumCalculation, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - - switch strings.ToLower(value) { - case checksumWhenSupported: - *m = aws.RequestChecksumCalculationWhenSupported - case checksumWhenRequired: - *m = aws.RequestChecksumCalculationWhenRequired - default: - return fmt.Errorf("invalid value for environment variable, %s=%s, must be when_supported/when_required", k, value) - } - } - return nil -} - -func setResponseChecksumValidationFromEnvVal(m *aws.ResponseChecksumValidation, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - - switch strings.ToLower(value) { - case checksumWhenSupported: - *m = aws.ResponseChecksumValidationWhenSupported - case checksumWhenRequired: - *m = aws.ResponseChecksumValidationWhenRequired - default: - return fmt.Errorf("invalid value for environment variable, %s=%s, must be when_supported/when_required", k, value) - } - - } - return nil -} - -// GetRegion returns the AWS Region if set in the environment. Returns an empty -// string if not set. -func (c EnvConfig) getRegion(ctx context.Context) (string, bool, error) { - if len(c.Region) == 0 { - return "", false, nil - } - return c.Region, true, nil -} - -// GetSharedConfigProfile returns the shared config profile if set in the -// environment. Returns an empty string if not set. -func (c EnvConfig) getSharedConfigProfile(ctx context.Context) (string, bool, error) { - if len(c.SharedConfigProfile) == 0 { - return "", false, nil - } - - return c.SharedConfigProfile, true, nil -} - -// getSharedConfigFiles returns a slice of filenames set in the environment. -// -// Will return the filenames in the order of: -// * Shared Config -func (c EnvConfig) getSharedConfigFiles(context.Context) ([]string, bool, error) { - var files []string - if v := c.SharedConfigFile; len(v) > 0 { - files = append(files, v) - } - - if len(files) == 0 { - return nil, false, nil - } - return files, true, nil -} - -// getSharedCredentialsFiles returns a slice of filenames set in the environment. -// -// Will return the filenames in the order of: -// * Shared Credentials -func (c EnvConfig) getSharedCredentialsFiles(context.Context) ([]string, bool, error) { - var files []string - if v := c.SharedCredentialsFile; len(v) > 0 { - files = append(files, v) - } - if len(files) == 0 { - return nil, false, nil - } - return files, true, nil -} - -// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was -func (c EnvConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) { - if len(c.CustomCABundle) == 0 { - return nil, false, nil - } - - b, err := os.ReadFile(c.CustomCABundle) - if err != nil { - return nil, false, err - } - return bytes.NewReader(b), true, nil -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func (c EnvConfig) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { - if c.IgnoreConfiguredEndpoints == nil { - return false, false, nil - } - - return *c.IgnoreConfiguredEndpoints, true, nil -} - -func (c EnvConfig) getBaseEndpoint(context.Context) (string, bool, error) { - return c.BaseEndpoint, len(c.BaseEndpoint) > 0, nil -} - -// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use -// with configured endpoints. -func (c EnvConfig) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { - if endpt := os.Getenv(fmt.Sprintf("%s_%s", awsEndpointURLEnv, normalizeEnv(sdkID))); endpt != "" { - return endpt, true, nil - } - return "", false, nil -} - -func normalizeEnv(sdkID string) string { - upper := strings.ToUpper(sdkID) - return strings.ReplaceAll(upper, " ", "_") -} - -// GetS3UseARNRegion returns whether to allow ARNs to direct the region -// the S3 client's requests are sent to. -func (c EnvConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) { - if c.S3UseARNRegion == nil { - return false, false, nil - } - - return *c.S3UseARNRegion, true, nil -} - -// GetS3DisableMultiRegionAccessPoints returns whether to disable multi-region access point -// support for the S3 client. -func (c EnvConfig) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value, ok bool, err error) { - if c.S3DisableMultiRegionAccessPoints == nil { - return false, false, nil - } - - return *c.S3DisableMultiRegionAccessPoints, true, nil -} - -// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be -// used for requests. -func (c EnvConfig) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) { - if c.UseDualStackEndpoint == aws.DualStackEndpointStateUnset { - return aws.DualStackEndpointStateUnset, false, nil - } - - return c.UseDualStackEndpoint, true, nil -} - -// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be -// used for requests. -func (c EnvConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) { - if c.UseFIPSEndpoint == aws.FIPSEndpointStateUnset { - return aws.FIPSEndpointStateUnset, false, nil - } - - return c.UseFIPSEndpoint, true, nil -} - -func setStringFromEnvVal(dst *string, keys []string) { - for _, k := range keys { - if v := os.Getenv(k); len(v) > 0 { - *dst = v - break - } - } -} - -func setIntFromEnvVal(dst *int, keys []string) error { - for _, k := range keys { - if v := os.Getenv(k); len(v) > 0 { - i, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return fmt.Errorf("invalid value %s=%s, %w", k, v, err) - } - *dst = int(i) - break - } - } - - return nil -} - -func setBoolPtrFromEnvVal(dst **bool, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - - if *dst == nil { - *dst = new(bool) - } - - switch { - case strings.EqualFold(value, "false"): - **dst = false - case strings.EqualFold(value, "true"): - **dst = true - default: - return fmt.Errorf( - "invalid value for environment variable, %s=%s, need true or false", - k, value) - } - break - } - - return nil -} - -func setInt64PtrFromEnvVal(dst **int64, keys []string, max int64) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue - } - - v, err := strconv.ParseInt(value, 10, 64) - if err != nil { - return fmt.Errorf("invalid value for env var, %s=%s, need int64", k, value) - } else if v < 0 || v > max { - return fmt.Errorf("invalid range for env var min request compression size bytes %q, must be within 0 and 10485760 inclusively", v) - } - if *dst == nil { - *dst = new(int64) - } - - **dst = v - break - } - - return nil -} - -func setEndpointDiscoveryTypeFromEnvVal(dst *aws.EndpointDiscoveryEnableState, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue // skip if empty - } - - switch { - case strings.EqualFold(value, endpointDiscoveryDisabled): - *dst = aws.EndpointDiscoveryDisabled - case strings.EqualFold(value, endpointDiscoveryEnabled): - *dst = aws.EndpointDiscoveryEnabled - case strings.EqualFold(value, endpointDiscoveryAuto): - *dst = aws.EndpointDiscoveryAuto - default: - return fmt.Errorf( - "invalid value for environment variable, %s=%s, need true, false or auto", - k, value) - } - } - return nil -} - -func setUseDualStackEndpointFromEnvVal(dst *aws.DualStackEndpointState, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue // skip if empty - } - - switch { - case strings.EqualFold(value, "true"): - *dst = aws.DualStackEndpointStateEnabled - case strings.EqualFold(value, "false"): - *dst = aws.DualStackEndpointStateDisabled - default: - return fmt.Errorf( - "invalid value for environment variable, %s=%s, need true, false", - k, value) - } - } - return nil -} - -func setUseFIPSEndpointFromEnvVal(dst *aws.FIPSEndpointState, keys []string) error { - for _, k := range keys { - value := os.Getenv(k) - if len(value) == 0 { - continue // skip if empty - } - - switch { - case strings.EqualFold(value, "true"): - *dst = aws.FIPSEndpointStateEnabled - case strings.EqualFold(value, "false"): - *dst = aws.FIPSEndpointStateDisabled - default: - return fmt.Errorf( - "invalid value for environment variable, %s=%s, need true, false", - k, value) - } - } - return nil -} - -// GetEnableEndpointDiscovery returns resolved value for EnableEndpointDiscovery env variable setting. -func (c EnvConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error) { - if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset { - return aws.EndpointDiscoveryUnset, false, nil - } - - return c.EnableEndpointDiscovery, true, nil -} - -// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface. -func (c EnvConfig) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) { - if c.EC2IMDSClientEnableState == imds.ClientDefaultEnableState { - return imds.ClientDefaultEnableState, false, nil - } - - return c.EC2IMDSClientEnableState, true, nil -} - -// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface. -func (c EnvConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) { - if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset { - return imds.EndpointModeStateUnset, false, nil - } - - return c.EC2IMDSEndpointMode, true, nil -} - -// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface. -func (c EnvConfig) GetEC2IMDSEndpoint() (string, bool, error) { - if len(c.EC2IMDSEndpoint) == 0 { - return "", false, nil - } - - return c.EC2IMDSEndpoint, true, nil -} - -// GetEC2IMDSV1FallbackDisabled implements an EC2IMDSV1FallbackDisabled option -// resolver interface. -func (c EnvConfig) GetEC2IMDSV1FallbackDisabled() (bool, bool) { - if c.EC2IMDSv1Disabled == nil { - return false, false - } - - return *c.EC2IMDSv1Disabled, true -} - -// GetS3DisableExpressAuth returns the configured value for -// [EnvConfig.S3DisableExpressAuth]. -func (c EnvConfig) GetS3DisableExpressAuth() (value, ok bool) { - if c.S3DisableExpressAuth == nil { - return false, false - } - - return *c.S3DisableExpressAuth, true -} - -func (c EnvConfig) getAuthSchemePreference() ([]string, bool) { - if len(c.AuthSchemePreference) > 0 { - return c.AuthSchemePreference, true - } - return nil, false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go deleted file mode 100644 index 654a7a77fb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/generate.go +++ /dev/null @@ -1,4 +0,0 @@ -package config - -//go:generate go run -tags codegen ./codegen -output=provider_assert_test.go -//go:generate gofmt -s -w ./ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go deleted file mode 100644 index 8274236780..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package config - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.31.12" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go b/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go deleted file mode 100644 index 7cb5a13658..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/load_options.go +++ /dev/null @@ -1,1355 +0,0 @@ -package config - -import ( - "context" - "io" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds" - "github.com/aws/aws-sdk-go-v2/credentials/processcreds" - "github.com/aws/aws-sdk-go-v2/credentials/ssocreds" - "github.com/aws/aws-sdk-go-v2/credentials/stscreds" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - smithybearer "github.com/aws/smithy-go/auth/bearer" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// LoadOptionsFunc is a type alias for LoadOptions functional option -type LoadOptionsFunc func(*LoadOptions) error - -// LoadOptions are discrete set of options that are valid for loading the -// configuration -type LoadOptions struct { - - // Region is the region to send requests to. - Region string - - // Credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // Token provider for authentication operations with bearer authentication. - BearerAuthTokenProvider smithybearer.TokenProvider - - // HTTPClient the SDK's API clients will use to invoke HTTP requests. - HTTPClient HTTPClient - - // EndpointResolver that can be used to provide or override an endpoint for - // the given service and region. - // - // See the `aws.EndpointResolver` documentation on usage. - // - // Deprecated: See EndpointResolverWithOptions - EndpointResolver aws.EndpointResolver - - // EndpointResolverWithOptions that can be used to provide or override an - // endpoint for the given service and region. - // - // See the `aws.EndpointResolverWithOptions` documentation on usage. - EndpointResolverWithOptions aws.EndpointResolverWithOptions - - // RetryMaxAttempts specifies the maximum number attempts an API client - // will call an operation that fails with a retryable error. - // - // This value will only be used if Retryer option is nil. - RetryMaxAttempts int - - // RetryMode specifies the retry model the API client will be created with. - // - // This value will only be used if Retryer option is nil. - RetryMode aws.RetryMode - - // Retryer is a function that provides a Retryer implementation. A Retryer - // guides how HTTP requests should be retried in case of recoverable - // failures. - // - // If not nil, RetryMaxAttempts, and RetryMode will be ignored. - Retryer func() aws.Retryer - - // APIOptions provides the set of middleware mutations modify how the API - // client requests will be handled. This is useful for adding additional - // tracing data to a request, or changing behavior of the SDK's client. - APIOptions []func(*middleware.Stack) error - - // Logger writer interface to write logging messages to. - Logger logging.Logger - - // ClientLogMode is used to configure the events that will be sent to the - // configured logger. This can be used to configure the logging of signing, - // retries, request, and responses of the SDK clients. - // - // See the ClientLogMode type documentation for the complete set of logging - // modes and available configuration. - ClientLogMode *aws.ClientLogMode - - // SharedConfigProfile is the profile to be used when loading the SharedConfig - SharedConfigProfile string - - // SharedConfigFiles is the slice of custom shared config files to use when - // loading the SharedConfig. A non-default profile used within config file - // must have name defined with prefix 'profile '. eg [profile xyz] - // indicates a profile with name 'xyz'. To read more on the format of the - // config file, please refer the documentation at - // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-config - // - // If duplicate profiles are provided within the same, or across multiple - // shared config files, the next parsed profile will override only the - // properties that conflict with the previously defined profile. Note that - // if duplicate profiles are provided within the SharedCredentialsFiles and - // SharedConfigFiles, the properties defined in shared credentials file - // take precedence. - SharedConfigFiles []string - - // SharedCredentialsFile is the slice of custom shared credentials files to - // use when loading the SharedConfig. The profile name used within - // credentials file must not prefix 'profile '. eg [xyz] indicates a - // profile with name 'xyz'. Profile declared as [profile xyz] will be - // ignored. To read more on the format of the credentials file, please - // refer the documentation at - // https://docs.aws.amazon.com/credref/latest/refdocs/file-format.html#file-format-creds - // - // If duplicate profiles are provided with a same, or across multiple - // shared credentials files, the next parsed profile will override only - // properties that conflict with the previously defined profile. Note that - // if duplicate profiles are provided within the SharedCredentialsFiles and - // SharedConfigFiles, the properties defined in shared credentials file - // take precedence. - SharedCredentialsFiles []string - - // CustomCABundle is CA bundle PEM bytes reader - CustomCABundle io.Reader - - // DefaultRegion is the fall back region, used if a region was not resolved - // from other sources - DefaultRegion string - - // UseEC2IMDSRegion indicates if SDK should retrieve the region - // from the EC2 Metadata service - UseEC2IMDSRegion *UseEC2IMDSRegion - - // CredentialsCacheOptions is a function for setting the - // aws.CredentialsCacheOptions - CredentialsCacheOptions func(*aws.CredentialsCacheOptions) - - // BearerAuthTokenCacheOptions is a function for setting the smithy-go - // auth/bearer#TokenCacheOptions - BearerAuthTokenCacheOptions func(*smithybearer.TokenCacheOptions) - - // SSOTokenProviderOptions is a function for setting the - // credentials/ssocreds.SSOTokenProviderOptions - SSOTokenProviderOptions func(*ssocreds.SSOTokenProviderOptions) - - // ProcessCredentialOptions is a function for setting - // the processcreds.Options - ProcessCredentialOptions func(*processcreds.Options) - - // EC2RoleCredentialOptions is a function for setting - // the ec2rolecreds.Options - EC2RoleCredentialOptions func(*ec2rolecreds.Options) - - // EndpointCredentialOptions is a function for setting - // the endpointcreds.Options - EndpointCredentialOptions func(*endpointcreds.Options) - - // WebIdentityRoleCredentialOptions is a function for setting - // the stscreds.WebIdentityRoleOptions - WebIdentityRoleCredentialOptions func(*stscreds.WebIdentityRoleOptions) - - // AssumeRoleCredentialOptions is a function for setting the - // stscreds.AssumeRoleOptions - AssumeRoleCredentialOptions func(*stscreds.AssumeRoleOptions) - - // SSOProviderOptions is a function for setting - // the ssocreds.Options - SSOProviderOptions func(options *ssocreds.Options) - - // LogConfigurationWarnings when set to true, enables logging - // configuration warnings - LogConfigurationWarnings *bool - - // S3UseARNRegion specifies if the S3 service should allow ARNs to direct - // the region, the client's requests are sent to. - S3UseARNRegion *bool - - // S3DisableMultiRegionAccessPoints specifies if the S3 service should disable - // the S3 Multi-Region access points feature. - S3DisableMultiRegionAccessPoints *bool - - // EnableEndpointDiscovery specifies if endpoint discovery is enable for - // the client. - EnableEndpointDiscovery aws.EndpointDiscoveryEnableState - - // Specifies if the EC2 IMDS service client is enabled. - // - // AWS_EC2_METADATA_DISABLED=true - EC2IMDSClientEnableState imds.ClientEnableState - - // Specifies the EC2 Instance Metadata Service default endpoint selection - // mode (IPv4 or IPv6) - EC2IMDSEndpointMode imds.EndpointModeState - - // Specifies the EC2 Instance Metadata Service endpoint to use. If - // specified it overrides EC2IMDSEndpointMode. - EC2IMDSEndpoint string - - // Specifies that SDK clients must resolve a dual-stack endpoint for - // services. - UseDualStackEndpoint aws.DualStackEndpointState - - // Specifies that SDK clients must resolve a FIPS endpoint for - // services. - UseFIPSEndpoint aws.FIPSEndpointState - - // Specifies the SDK configuration mode for defaults. - DefaultsModeOptions DefaultsModeOptions - - // The sdk app ID retrieved from env var or shared config to be added to request user agent header - AppID string - - // Specifies whether an operation request could be compressed - DisableRequestCompression *bool - - // The inclusive min bytes of a request body that could be compressed - RequestMinCompressSizeBytes *int64 - - // Whether S3 Express auth is disabled. - S3DisableExpressAuth *bool - - // Whether account id should be built into endpoint resolution - AccountIDEndpointMode aws.AccountIDEndpointMode - - // Specify if request checksum should be calculated - RequestChecksumCalculation aws.RequestChecksumCalculation - - // Specifies if response checksum should be validated - ResponseChecksumValidation aws.ResponseChecksumValidation - - // Service endpoint override. This value is not necessarily final and is - // passed to the service's EndpointResolverV2 for further delegation. - BaseEndpoint string - - // Registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string - - // ServiceOptions provides service specific configuration options that will be applied - // when constructing clients for specific services. Each callback function receives the service ID - // and the service's Options struct, allowing for dynamic configuration based on the service. - ServiceOptions []func(string, any) -} - -func (o LoadOptions) getDefaultsMode(ctx context.Context) (aws.DefaultsMode, bool, error) { - if len(o.DefaultsModeOptions.Mode) == 0 { - return "", false, nil - } - return o.DefaultsModeOptions.Mode, true, nil -} - -// GetRetryMaxAttempts returns the RetryMaxAttempts if specified in the -// LoadOptions and not 0. -func (o LoadOptions) GetRetryMaxAttempts(ctx context.Context) (int, bool, error) { - if o.RetryMaxAttempts == 0 { - return 0, false, nil - } - return o.RetryMaxAttempts, true, nil -} - -// GetRetryMode returns the RetryMode specified in the LoadOptions. -func (o LoadOptions) GetRetryMode(ctx context.Context) (aws.RetryMode, bool, error) { - if len(o.RetryMode) == 0 { - return "", false, nil - } - return o.RetryMode, true, nil -} - -func (o LoadOptions) getDefaultsModeIMDSClient(ctx context.Context) (*imds.Client, bool, error) { - if o.DefaultsModeOptions.IMDSClient == nil { - return nil, false, nil - } - return o.DefaultsModeOptions.IMDSClient, true, nil -} - -// getRegion returns Region from config's LoadOptions -func (o LoadOptions) getRegion(ctx context.Context) (string, bool, error) { - if len(o.Region) == 0 { - return "", false, nil - } - - return o.Region, true, nil -} - -// getAppID returns AppID from config's LoadOptions -func (o LoadOptions) getAppID(ctx context.Context) (string, bool, error) { - return o.AppID, len(o.AppID) > 0, nil -} - -// getDisableRequestCompression returns DisableRequestCompression from config's LoadOptions -func (o LoadOptions) getDisableRequestCompression(ctx context.Context) (bool, bool, error) { - if o.DisableRequestCompression == nil { - return false, false, nil - } - return *o.DisableRequestCompression, true, nil -} - -// getRequestMinCompressSizeBytes returns RequestMinCompressSizeBytes from config's LoadOptions -func (o LoadOptions) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) { - if o.RequestMinCompressSizeBytes == nil { - return 0, false, nil - } - return *o.RequestMinCompressSizeBytes, true, nil -} - -func (o LoadOptions) getAccountIDEndpointMode(ctx context.Context) (aws.AccountIDEndpointMode, bool, error) { - return o.AccountIDEndpointMode, len(o.AccountIDEndpointMode) > 0, nil -} - -func (o LoadOptions) getRequestChecksumCalculation(ctx context.Context) (aws.RequestChecksumCalculation, bool, error) { - return o.RequestChecksumCalculation, o.RequestChecksumCalculation > 0, nil -} - -func (o LoadOptions) getResponseChecksumValidation(ctx context.Context) (aws.ResponseChecksumValidation, bool, error) { - return o.ResponseChecksumValidation, o.ResponseChecksumValidation > 0, nil -} - -func (o LoadOptions) getBaseEndpoint(context.Context) (string, bool, error) { - return o.BaseEndpoint, o.BaseEndpoint != "", nil -} - -func (o LoadOptions) getServiceOptions(context.Context) ([]func(string, any), bool, error) { - return o.ServiceOptions, len(o.ServiceOptions) > 0, nil -} - -// GetServiceBaseEndpoint satisfies (internal/configsources).ServiceBaseEndpointProvider. -// -// The sdkID value is unused because LoadOptions only supports setting a GLOBAL -// endpoint override. In-code, per-service endpoint overrides are performed via -// functional options in service client space. -func (o LoadOptions) GetServiceBaseEndpoint(context.Context, string) (string, bool, error) { - return o.BaseEndpoint, o.BaseEndpoint != "", nil -} - -// WithRegion is a helper function to construct functional options -// that sets Region on config's LoadOptions. Setting the region to -// an empty string, will result in the region value being ignored. -// If multiple WithRegion calls are made, the last call overrides -// the previous call values. -func WithRegion(v string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Region = v - return nil - } -} - -// WithAppID is a helper function to construct functional options -// that sets AppID on config's LoadOptions. -func WithAppID(ID string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.AppID = ID - return nil - } -} - -// WithDisableRequestCompression is a helper function to construct functional options -// that sets DisableRequestCompression on config's LoadOptions. -func WithDisableRequestCompression(DisableRequestCompression *bool) LoadOptionsFunc { - return func(o *LoadOptions) error { - if DisableRequestCompression == nil { - return nil - } - o.DisableRequestCompression = DisableRequestCompression - return nil - } -} - -// WithRequestMinCompressSizeBytes is a helper function to construct functional options -// that sets RequestMinCompressSizeBytes on config's LoadOptions. -func WithRequestMinCompressSizeBytes(RequestMinCompressSizeBytes *int64) LoadOptionsFunc { - return func(o *LoadOptions) error { - if RequestMinCompressSizeBytes == nil { - return nil - } - o.RequestMinCompressSizeBytes = RequestMinCompressSizeBytes - return nil - } -} - -// WithAccountIDEndpointMode is a helper function to construct functional options -// that sets AccountIDEndpointMode on config's LoadOptions -func WithAccountIDEndpointMode(m aws.AccountIDEndpointMode) LoadOptionsFunc { - return func(o *LoadOptions) error { - if m != "" { - o.AccountIDEndpointMode = m - } - return nil - } -} - -// WithRequestChecksumCalculation is a helper function to construct functional options -// that sets RequestChecksumCalculation on config's LoadOptions -func WithRequestChecksumCalculation(c aws.RequestChecksumCalculation) LoadOptionsFunc { - return func(o *LoadOptions) error { - if c > 0 { - o.RequestChecksumCalculation = c - } - return nil - } -} - -// WithResponseChecksumValidation is a helper function to construct functional options -// that sets ResponseChecksumValidation on config's LoadOptions -func WithResponseChecksumValidation(v aws.ResponseChecksumValidation) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.ResponseChecksumValidation = v - return nil - } -} - -// getDefaultRegion returns DefaultRegion from config's LoadOptions -func (o LoadOptions) getDefaultRegion(ctx context.Context) (string, bool, error) { - if len(o.DefaultRegion) == 0 { - return "", false, nil - } - - return o.DefaultRegion, true, nil -} - -// WithDefaultRegion is a helper function to construct functional options -// that sets a DefaultRegion on config's LoadOptions. Setting the default -// region to an empty string, will result in the default region value -// being ignored. If multiple WithDefaultRegion calls are made, the last -// call overrides the previous call values. Note that both WithRegion and -// WithEC2IMDSRegion call takes precedence over WithDefaultRegion call -// when resolving region. -func WithDefaultRegion(v string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.DefaultRegion = v - return nil - } -} - -// getSharedConfigProfile returns SharedConfigProfile from config's LoadOptions -func (o LoadOptions) getSharedConfigProfile(ctx context.Context) (string, bool, error) { - if len(o.SharedConfigProfile) == 0 { - return "", false, nil - } - - return o.SharedConfigProfile, true, nil -} - -// WithSharedConfigProfile is a helper function to construct functional options -// that sets SharedConfigProfile on config's LoadOptions. Setting the shared -// config profile to an empty string, will result in the shared config profile -// value being ignored. -// If multiple WithSharedConfigProfile calls are made, the last call overrides -// the previous call values. -func WithSharedConfigProfile(v string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.SharedConfigProfile = v - return nil - } -} - -// getSharedConfigFiles returns SharedConfigFiles set on config's LoadOptions -func (o LoadOptions) getSharedConfigFiles(ctx context.Context) ([]string, bool, error) { - if o.SharedConfigFiles == nil { - return nil, false, nil - } - - return o.SharedConfigFiles, true, nil -} - -// WithSharedConfigFiles is a helper function to construct functional options -// that sets slice of SharedConfigFiles on config's LoadOptions. -// Setting the shared config files to an nil string slice, will result in the -// shared config files value being ignored. -// If multiple WithSharedConfigFiles calls are made, the last call overrides -// the previous call values. -func WithSharedConfigFiles(v []string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.SharedConfigFiles = v - return nil - } -} - -// getSharedCredentialsFiles returns SharedCredentialsFiles set on config's LoadOptions -func (o LoadOptions) getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error) { - if o.SharedCredentialsFiles == nil { - return nil, false, nil - } - - return o.SharedCredentialsFiles, true, nil -} - -// WithSharedCredentialsFiles is a helper function to construct functional options -// that sets slice of SharedCredentialsFiles on config's LoadOptions. -// Setting the shared credentials files to an nil string slice, will result in the -// shared credentials files value being ignored. -// If multiple WithSharedCredentialsFiles calls are made, the last call overrides -// the previous call values. -func WithSharedCredentialsFiles(v []string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.SharedCredentialsFiles = v - return nil - } -} - -// getCustomCABundle returns CustomCABundle from LoadOptions -func (o LoadOptions) getCustomCABundle(ctx context.Context) (io.Reader, bool, error) { - if o.CustomCABundle == nil { - return nil, false, nil - } - - return o.CustomCABundle, true, nil -} - -// WithCustomCABundle is a helper function to construct functional options -// that sets CustomCABundle on config's LoadOptions. Setting the custom CA Bundle -// to nil will result in custom CA Bundle value being ignored. -// If multiple WithCustomCABundle calls are made, the last call overrides the -// previous call values. -func WithCustomCABundle(v io.Reader) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.CustomCABundle = v - return nil - } -} - -// UseEC2IMDSRegion provides a regionProvider that retrieves the region -// from the EC2 Metadata service. -type UseEC2IMDSRegion struct { - // If unset will default to generic EC2 IMDS client. - Client *imds.Client -} - -// getRegion attempts to retrieve the region from EC2 Metadata service. -func (p *UseEC2IMDSRegion) getRegion(ctx context.Context) (string, bool, error) { - if ctx == nil { - ctx = context.Background() - } - - client := p.Client - if client == nil { - client = imds.New(imds.Options{}) - } - - result, err := client.GetRegion(ctx, nil) - if err != nil { - return "", false, err - } - if len(result.Region) != 0 { - return result.Region, true, nil - } - return "", false, nil -} - -// getEC2IMDSRegion returns the value of EC2 IMDS region. -func (o LoadOptions) getEC2IMDSRegion(ctx context.Context) (string, bool, error) { - if o.UseEC2IMDSRegion == nil { - return "", false, nil - } - - return o.UseEC2IMDSRegion.getRegion(ctx) -} - -// WithEC2IMDSRegion is a helper function to construct functional options -// that enables resolving EC2IMDS region. The function takes -// in a UseEC2IMDSRegion functional option, and can be used to set the -// EC2IMDS client which will be used to resolve EC2IMDSRegion. -// If no functional option is provided, an EC2IMDS client is built and used -// by the resolver. If multiple WithEC2IMDSRegion calls are made, the last -// call overrides the previous call values. Note that the WithRegion calls takes -// precedence over WithEC2IMDSRegion when resolving region. -func WithEC2IMDSRegion(fnOpts ...func(o *UseEC2IMDSRegion)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.UseEC2IMDSRegion = &UseEC2IMDSRegion{} - - for _, fn := range fnOpts { - fn(o.UseEC2IMDSRegion) - } - return nil - } -} - -// getCredentialsProvider returns the credentials value -func (o LoadOptions) getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error) { - if o.Credentials == nil { - return nil, false, nil - } - - return o.Credentials, true, nil -} - -// WithCredentialsProvider is a helper function to construct functional options -// that sets Credential provider value on config's LoadOptions. If credentials -// provider is set to nil, the credentials provider value will be ignored. -// If multiple WithCredentialsProvider calls are made, the last call overrides -// the previous call values. -func WithCredentialsProvider(v aws.CredentialsProvider) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Credentials = v - return nil - } -} - -// getCredentialsCacheOptionsProvider returns the wrapped function to set aws.CredentialsCacheOptions -func (o LoadOptions) getCredentialsCacheOptions(ctx context.Context) (func(*aws.CredentialsCacheOptions), bool, error) { - if o.CredentialsCacheOptions == nil { - return nil, false, nil - } - - return o.CredentialsCacheOptions, true, nil -} - -// WithCredentialsCacheOptions is a helper function to construct functional -// options that sets a function to modify the aws.CredentialsCacheOptions the -// aws.CredentialsCache will be configured with, if the CredentialsCache is used -// by the configuration loader. -// -// If multiple WithCredentialsCacheOptions calls are made, the last call -// overrides the previous call values. -func WithCredentialsCacheOptions(v func(*aws.CredentialsCacheOptions)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.CredentialsCacheOptions = v - return nil - } -} - -// getBearerAuthTokenProvider returns the credentials value -func (o LoadOptions) getBearerAuthTokenProvider(ctx context.Context) (smithybearer.TokenProvider, bool, error) { - if o.BearerAuthTokenProvider == nil { - return nil, false, nil - } - - return o.BearerAuthTokenProvider, true, nil -} - -// WithBearerAuthTokenProvider is a helper function to construct functional options -// that sets Credential provider value on config's LoadOptions. If credentials -// provider is set to nil, the credentials provider value will be ignored. -// If multiple WithBearerAuthTokenProvider calls are made, the last call overrides -// the previous call values. -func WithBearerAuthTokenProvider(v smithybearer.TokenProvider) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.BearerAuthTokenProvider = v - return nil - } -} - -// getBearerAuthTokenCacheOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions -func (o LoadOptions) getBearerAuthTokenCacheOptions(ctx context.Context) (func(*smithybearer.TokenCacheOptions), bool, error) { - if o.BearerAuthTokenCacheOptions == nil { - return nil, false, nil - } - - return o.BearerAuthTokenCacheOptions, true, nil -} - -// WithBearerAuthTokenCacheOptions is a helper function to construct functional options -// that sets a function to modify the TokenCacheOptions the smithy-go -// auth/bearer#TokenCache will be configured with, if the TokenCache is used by -// the configuration loader. -// -// If multiple WithBearerAuthTokenCacheOptions calls are made, the last call overrides -// the previous call values. -func WithBearerAuthTokenCacheOptions(v func(*smithybearer.TokenCacheOptions)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.BearerAuthTokenCacheOptions = v - return nil - } -} - -// getSSOTokenProviderOptionsProvider returns the wrapped function to set smithybearer.TokenCacheOptions -func (o LoadOptions) getSSOTokenProviderOptions(ctx context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error) { - if o.SSOTokenProviderOptions == nil { - return nil, false, nil - } - - return o.SSOTokenProviderOptions, true, nil -} - -// WithSSOTokenProviderOptions is a helper function to construct functional -// options that sets a function to modify the SSOtokenProviderOptions the SDK's -// credentials/ssocreds#SSOProvider will be configured with, if the -// SSOTokenProvider is used by the configuration loader. -// -// If multiple WithSSOTokenProviderOptions calls are made, the last call overrides -// the previous call values. -func WithSSOTokenProviderOptions(v func(*ssocreds.SSOTokenProviderOptions)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.SSOTokenProviderOptions = v - return nil - } -} - -// getProcessCredentialOptions returns the wrapped function to set processcreds.Options -func (o LoadOptions) getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) { - if o.ProcessCredentialOptions == nil { - return nil, false, nil - } - - return o.ProcessCredentialOptions, true, nil -} - -// WithProcessCredentialOptions is a helper function to construct functional options -// that sets a function to use processcreds.Options on config's LoadOptions. -// If process credential options is set to nil, the process credential value will -// be ignored. If multiple WithProcessCredentialOptions calls are made, the last call -// overrides the previous call values. -func WithProcessCredentialOptions(v func(*processcreds.Options)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.ProcessCredentialOptions = v - return nil - } -} - -// getEC2RoleCredentialOptions returns the wrapped function to set the ec2rolecreds.Options -func (o LoadOptions) getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error) { - if o.EC2RoleCredentialOptions == nil { - return nil, false, nil - } - - return o.EC2RoleCredentialOptions, true, nil -} - -// WithEC2RoleCredentialOptions is a helper function to construct functional options -// that sets a function to use ec2rolecreds.Options on config's LoadOptions. If -// EC2 role credential options is set to nil, the EC2 role credential options value -// will be ignored. If multiple WithEC2RoleCredentialOptions calls are made, -// the last call overrides the previous call values. -func WithEC2RoleCredentialOptions(v func(*ec2rolecreds.Options)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EC2RoleCredentialOptions = v - return nil - } -} - -// getEndpointCredentialOptions returns the wrapped function to set endpointcreds.Options -func (o LoadOptions) getEndpointCredentialOptions(context.Context) (func(*endpointcreds.Options), bool, error) { - if o.EndpointCredentialOptions == nil { - return nil, false, nil - } - - return o.EndpointCredentialOptions, true, nil -} - -// WithEndpointCredentialOptions is a helper function to construct functional options -// that sets a function to use endpointcreds.Options on config's LoadOptions. If -// endpoint credential options is set to nil, the endpoint credential options -// value will be ignored. If multiple WithEndpointCredentialOptions calls are made, -// the last call overrides the previous call values. -func WithEndpointCredentialOptions(v func(*endpointcreds.Options)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EndpointCredentialOptions = v - return nil - } -} - -// getWebIdentityRoleCredentialOptions returns the wrapped function -func (o LoadOptions) getWebIdentityRoleCredentialOptions(context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error) { - if o.WebIdentityRoleCredentialOptions == nil { - return nil, false, nil - } - - return o.WebIdentityRoleCredentialOptions, true, nil -} - -// WithWebIdentityRoleCredentialOptions is a helper function to construct -// functional options that sets a function to use stscreds.WebIdentityRoleOptions -// on config's LoadOptions. If web identity role credentials options is set to nil, -// the web identity role credentials value will be ignored. If multiple -// WithWebIdentityRoleCredentialOptions calls are made, the last call -// overrides the previous call values. -func WithWebIdentityRoleCredentialOptions(v func(*stscreds.WebIdentityRoleOptions)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.WebIdentityRoleCredentialOptions = v - return nil - } -} - -// getAssumeRoleCredentialOptions returns AssumeRoleCredentialOptions from LoadOptions -func (o LoadOptions) getAssumeRoleCredentialOptions(context.Context) (func(options *stscreds.AssumeRoleOptions), bool, error) { - if o.AssumeRoleCredentialOptions == nil { - return nil, false, nil - } - - return o.AssumeRoleCredentialOptions, true, nil -} - -// WithAssumeRoleCredentialOptions is a helper function to construct -// functional options that sets a function to use stscreds.AssumeRoleOptions -// on config's LoadOptions. If assume role credentials options is set to nil, -// the assume role credentials value will be ignored. If multiple -// WithAssumeRoleCredentialOptions calls are made, the last call overrides -// the previous call values. -func WithAssumeRoleCredentialOptions(v func(*stscreds.AssumeRoleOptions)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.AssumeRoleCredentialOptions = v - return nil - } -} - -func (o LoadOptions) getHTTPClient(ctx context.Context) (HTTPClient, bool, error) { - if o.HTTPClient == nil { - return nil, false, nil - } - - return o.HTTPClient, true, nil -} - -// WithHTTPClient is a helper function to construct functional options -// that sets HTTPClient on LoadOptions. If HTTPClient is set to nil, -// the HTTPClient value will be ignored. -// If multiple WithHTTPClient calls are made, the last call overrides -// the previous call values. -func WithHTTPClient(v HTTPClient) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.HTTPClient = v - return nil - } -} - -func (o LoadOptions) getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error) { - if o.APIOptions == nil { - return nil, false, nil - } - - return o.APIOptions, true, nil -} - -// WithAPIOptions is a helper function to construct functional options -// that sets APIOptions on LoadOptions. If APIOptions is set to nil, the -// APIOptions value is ignored. If multiple WithAPIOptions calls are -// made, the last call overrides the previous call values. -func WithAPIOptions(v []func(*middleware.Stack) error) LoadOptionsFunc { - return func(o *LoadOptions) error { - if v == nil { - return nil - } - - o.APIOptions = append(o.APIOptions, v...) - return nil - } -} - -func (o LoadOptions) getRetryMaxAttempts(ctx context.Context) (int, bool, error) { - if o.RetryMaxAttempts == 0 { - return 0, false, nil - } - - return o.RetryMaxAttempts, true, nil -} - -// WithRetryMaxAttempts is a helper function to construct functional options that sets -// RetryMaxAttempts on LoadOptions. If RetryMaxAttempts is unset, the RetryMaxAttempts value is -// ignored. If multiple WithRetryMaxAttempts calls are made, the last call overrides -// the previous call values. -// -// Will be ignored of LoadOptions.Retryer or WithRetryer are used. -func WithRetryMaxAttempts(v int) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.RetryMaxAttempts = v - return nil - } -} - -func (o LoadOptions) getRetryMode(ctx context.Context) (aws.RetryMode, bool, error) { - if o.RetryMode == "" { - return "", false, nil - } - - return o.RetryMode, true, nil -} - -// WithRetryMode is a helper function to construct functional options that sets -// RetryMode on LoadOptions. If RetryMode is unset, the RetryMode value is -// ignored. If multiple WithRetryMode calls are made, the last call overrides -// the previous call values. -// -// Will be ignored of LoadOptions.Retryer or WithRetryer are used. -func WithRetryMode(v aws.RetryMode) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.RetryMode = v - return nil - } -} - -func (o LoadOptions) getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) { - if o.Retryer == nil { - return nil, false, nil - } - - return o.Retryer, true, nil -} - -// WithRetryer is a helper function to construct functional options -// that sets Retryer on LoadOptions. If Retryer is set to nil, the -// Retryer value is ignored. If multiple WithRetryer calls are -// made, the last call overrides the previous call values. -func WithRetryer(v func() aws.Retryer) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Retryer = v - return nil - } -} - -func (o LoadOptions) getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error) { - if o.EndpointResolver == nil { - return nil, false, nil - } - - return o.EndpointResolver, true, nil -} - -// WithEndpointResolver is a helper function to construct functional options -// that sets the EndpointResolver on LoadOptions. If the EndpointResolver is set to nil, -// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls -// are made, the last call overrides the previous call values. -// -// Deprecated: The global endpoint resolution interface is deprecated. The API -// for endpoint resolution is now unique to each service and is set via the -// EndpointResolverV2 field on service client options. Use of -// WithEndpointResolver or WithEndpointResolverWithOptions will prevent you -// from using any endpoint-related service features released after the -// introduction of EndpointResolverV2. You may also encounter broken or -// unexpected behavior when using the old global interface with services that -// use many endpoint-related customizations such as S3. -func WithEndpointResolver(v aws.EndpointResolver) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EndpointResolver = v - return nil - } -} - -func (o LoadOptions) getEndpointResolverWithOptions(ctx context.Context) (aws.EndpointResolverWithOptions, bool, error) { - if o.EndpointResolverWithOptions == nil { - return nil, false, nil - } - - return o.EndpointResolverWithOptions, true, nil -} - -// WithEndpointResolverWithOptions is a helper function to construct functional options -// that sets the EndpointResolverWithOptions on LoadOptions. If the EndpointResolverWithOptions is set to nil, -// the EndpointResolver value is ignored. If multiple WithEndpointResolver calls -// are made, the last call overrides the previous call values. -// -// Deprecated: The global endpoint resolution interface is deprecated. See -// deprecation docs on [WithEndpointResolver]. -func WithEndpointResolverWithOptions(v aws.EndpointResolverWithOptions) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EndpointResolverWithOptions = v - return nil - } -} - -func (o LoadOptions) getLogger(ctx context.Context) (logging.Logger, bool, error) { - if o.Logger == nil { - return nil, false, nil - } - - return o.Logger, true, nil -} - -// WithLogger is a helper function to construct functional options -// that sets Logger on LoadOptions. If Logger is set to nil, the -// Logger value will be ignored. If multiple WithLogger calls are made, -// the last call overrides the previous call values. -func WithLogger(v logging.Logger) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Logger = v - return nil - } -} - -func (o LoadOptions) getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error) { - if o.ClientLogMode == nil { - return 0, false, nil - } - - return *o.ClientLogMode, true, nil -} - -// WithClientLogMode is a helper function to construct functional options -// that sets client log mode on LoadOptions. If client log mode is set to nil, -// the client log mode value will be ignored. If multiple WithClientLogMode calls are made, -// the last call overrides the previous call values. -func WithClientLogMode(v aws.ClientLogMode) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.ClientLogMode = &v - return nil - } -} - -func (o LoadOptions) getLogConfigurationWarnings(ctx context.Context) (v bool, found bool, err error) { - if o.LogConfigurationWarnings == nil { - return false, false, nil - } - return *o.LogConfigurationWarnings, true, nil -} - -// WithLogConfigurationWarnings is a helper function to construct -// functional options that can be used to set LogConfigurationWarnings -// on LoadOptions. -// -// If multiple WithLogConfigurationWarnings calls are made, the last call -// overrides the previous call values. -func WithLogConfigurationWarnings(v bool) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.LogConfigurationWarnings = &v - return nil - } -} - -// GetS3UseARNRegion returns whether to allow ARNs to direct the region -// the S3 client's requests are sent to. -func (o LoadOptions) GetS3UseARNRegion(ctx context.Context) (v bool, found bool, err error) { - if o.S3UseARNRegion == nil { - return false, false, nil - } - return *o.S3UseARNRegion, true, nil -} - -// WithS3UseARNRegion is a helper function to construct functional options -// that can be used to set S3UseARNRegion on LoadOptions. -// If multiple WithS3UseARNRegion calls are made, the last call overrides -// the previous call values. -func WithS3UseARNRegion(v bool) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.S3UseARNRegion = &v - return nil - } -} - -// GetS3DisableMultiRegionAccessPoints returns whether to disable -// the S3 multi-region access points feature. -func (o LoadOptions) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (v bool, found bool, err error) { - if o.S3DisableMultiRegionAccessPoints == nil { - return false, false, nil - } - return *o.S3DisableMultiRegionAccessPoints, true, nil -} - -// WithS3DisableMultiRegionAccessPoints is a helper function to construct functional options -// that can be used to set S3DisableMultiRegionAccessPoints on LoadOptions. -// If multiple WithS3DisableMultiRegionAccessPoints calls are made, the last call overrides -// the previous call values. -func WithS3DisableMultiRegionAccessPoints(v bool) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.S3DisableMultiRegionAccessPoints = &v - return nil - } -} - -// GetEnableEndpointDiscovery returns if the EnableEndpointDiscovery flag is set. -func (o LoadOptions) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) { - if o.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset { - return aws.EndpointDiscoveryUnset, false, nil - } - return o.EnableEndpointDiscovery, true, nil -} - -// WithEndpointDiscovery is a helper function to construct functional options -// that can be used to enable endpoint discovery on LoadOptions for supported clients. -// If multiple WithEndpointDiscovery calls are made, the last call overrides -// the previous call values. -func WithEndpointDiscovery(v aws.EndpointDiscoveryEnableState) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EnableEndpointDiscovery = v - return nil - } -} - -// getSSOProviderOptions returns AssumeRoleCredentialOptions from LoadOptions -func (o LoadOptions) getSSOProviderOptions(context.Context) (func(options *ssocreds.Options), bool, error) { - if o.SSOProviderOptions == nil { - return nil, false, nil - } - - return o.SSOProviderOptions, true, nil -} - -// WithSSOProviderOptions is a helper function to construct -// functional options that sets a function to use ssocreds.Options -// on config's LoadOptions. If the SSO credential provider options is set to nil, -// the sso provider options value will be ignored. If multiple -// WithSSOProviderOptions calls are made, the last call overrides -// the previous call values. -func WithSSOProviderOptions(v func(*ssocreds.Options)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.SSOProviderOptions = v - return nil - } -} - -// GetEC2IMDSClientEnableState implements a EC2IMDSClientEnableState options resolver interface. -func (o LoadOptions) GetEC2IMDSClientEnableState() (imds.ClientEnableState, bool, error) { - if o.EC2IMDSClientEnableState == imds.ClientDefaultEnableState { - return imds.ClientDefaultEnableState, false, nil - } - - return o.EC2IMDSClientEnableState, true, nil -} - -// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface. -func (o LoadOptions) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) { - if o.EC2IMDSEndpointMode == imds.EndpointModeStateUnset { - return imds.EndpointModeStateUnset, false, nil - } - - return o.EC2IMDSEndpointMode, true, nil -} - -// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface. -func (o LoadOptions) GetEC2IMDSEndpoint() (string, bool, error) { - if len(o.EC2IMDSEndpoint) == 0 { - return "", false, nil - } - - return o.EC2IMDSEndpoint, true, nil -} - -// WithEC2IMDSClientEnableState is a helper function to construct functional options that sets the EC2IMDSClientEnableState. -func WithEC2IMDSClientEnableState(v imds.ClientEnableState) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EC2IMDSClientEnableState = v - return nil - } -} - -// WithEC2IMDSEndpointMode is a helper function to construct functional options that sets the EC2IMDSEndpointMode. -func WithEC2IMDSEndpointMode(v imds.EndpointModeState) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EC2IMDSEndpointMode = v - return nil - } -} - -// WithEC2IMDSEndpoint is a helper function to construct functional options that sets the EC2IMDSEndpoint. -func WithEC2IMDSEndpoint(v string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.EC2IMDSEndpoint = v - return nil - } -} - -// WithUseDualStackEndpoint is a helper function to construct -// functional options that can be used to set UseDualStackEndpoint on LoadOptions. -func WithUseDualStackEndpoint(v aws.DualStackEndpointState) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.UseDualStackEndpoint = v - return nil - } -} - -// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be -// used for requests. -func (o LoadOptions) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) { - if o.UseDualStackEndpoint == aws.DualStackEndpointStateUnset { - return aws.DualStackEndpointStateUnset, false, nil - } - return o.UseDualStackEndpoint, true, nil -} - -// WithUseFIPSEndpoint is a helper function to construct -// functional options that can be used to set UseFIPSEndpoint on LoadOptions. -func WithUseFIPSEndpoint(v aws.FIPSEndpointState) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.UseFIPSEndpoint = v - return nil - } -} - -// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be -// used for requests. -func (o LoadOptions) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) { - if o.UseFIPSEndpoint == aws.FIPSEndpointStateUnset { - return aws.FIPSEndpointStateUnset, false, nil - } - return o.UseFIPSEndpoint, true, nil -} - -// WithDefaultsMode sets the SDK defaults configuration mode to the value provided. -// -// Zero or more functional options can be provided to provide configuration options for performing -// environment discovery when using aws.DefaultsModeAuto. -func WithDefaultsMode(mode aws.DefaultsMode, optFns ...func(options *DefaultsModeOptions)) LoadOptionsFunc { - do := DefaultsModeOptions{ - Mode: mode, - } - for _, fn := range optFns { - fn(&do) - } - return func(options *LoadOptions) error { - options.DefaultsModeOptions = do - return nil - } -} - -// GetS3DisableExpressAuth returns the configured value for -// [EnvConfig.S3DisableExpressAuth]. -func (o LoadOptions) GetS3DisableExpressAuth() (value, ok bool) { - if o.S3DisableExpressAuth == nil { - return false, false - } - - return *o.S3DisableExpressAuth, true -} - -// WithS3DisableExpressAuth sets [LoadOptions.S3DisableExpressAuth] -// to the value provided. -func WithS3DisableExpressAuth(v bool) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.S3DisableExpressAuth = &v - return nil - } -} - -// WithBaseEndpoint is a helper function to construct functional options that -// sets BaseEndpoint on config's LoadOptions. Empty values have no effect, and -// subsequent calls to this API override previous ones. -// -// This is an in-code setting, therefore, any value set using this hook takes -// precedence over and will override ALL environment and shared config -// directives that set endpoint URLs. Functional options on service clients -// have higher specificity, and functional options that modify the value of -// BaseEndpoint on a client will take precedence over this setting. -func WithBaseEndpoint(v string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.BaseEndpoint = v - return nil - } -} - -// WithServiceOptions is a helper function to construct functional options -// that sets ServiceOptions on config's LoadOptions. -func WithServiceOptions(callbacks ...func(string, any)) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.ServiceOptions = append(o.ServiceOptions, callbacks...) - return nil - } -} - -// WithBeforeExecution adds the BeforeExecutionInterceptor to config. -func WithBeforeExecution(i smithyhttp.BeforeExecutionInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeExecution = append(o.Interceptors.BeforeExecution, i) - return nil - } -} - -// WithBeforeSerialization adds the BeforeSerializationInterceptor to config. -func WithBeforeSerialization(i smithyhttp.BeforeSerializationInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeSerialization = append(o.Interceptors.BeforeSerialization, i) - return nil - } -} - -// WithAfterSerialization adds the AfterSerializationInterceptor to config. -func WithAfterSerialization(i smithyhttp.AfterSerializationInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterSerialization = append(o.Interceptors.AfterSerialization, i) - return nil - } -} - -// WithBeforeRetryLoop adds the BeforeRetryLoopInterceptor to config. -func WithBeforeRetryLoop(i smithyhttp.BeforeRetryLoopInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeRetryLoop = append(o.Interceptors.BeforeRetryLoop, i) - return nil - } -} - -// WithBeforeAttempt adds the BeforeAttemptInterceptor to config. -func WithBeforeAttempt(i smithyhttp.BeforeAttemptInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeAttempt = append(o.Interceptors.BeforeAttempt, i) - return nil - } -} - -// WithBeforeSigning adds the BeforeSigningInterceptor to config. -func WithBeforeSigning(i smithyhttp.BeforeSigningInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeSigning = append(o.Interceptors.BeforeSigning, i) - return nil - } -} - -// WithAfterSigning adds the AfterSigningInterceptor to config. -func WithAfterSigning(i smithyhttp.AfterSigningInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterSigning = append(o.Interceptors.AfterSigning, i) - return nil - } -} - -// WithBeforeTransmit adds the BeforeTransmitInterceptor to config. -func WithBeforeTransmit(i smithyhttp.BeforeTransmitInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeTransmit = append(o.Interceptors.BeforeTransmit, i) - return nil - } -} - -// WithAfterTransmit adds the AfterTransmitInterceptor to config. -func WithAfterTransmit(i smithyhttp.AfterTransmitInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterTransmit = append(o.Interceptors.AfterTransmit, i) - return nil - } -} - -// WithBeforeDeserialization adds the BeforeDeserializationInterceptor to config. -func WithBeforeDeserialization(i smithyhttp.BeforeDeserializationInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.BeforeDeserialization = append(o.Interceptors.BeforeDeserialization, i) - return nil - } -} - -// WithAfterDeserialization adds the AfterDeserializationInterceptor to config. -func WithAfterDeserialization(i smithyhttp.AfterDeserializationInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterDeserialization = append(o.Interceptors.AfterDeserialization, i) - return nil - } -} - -// WithAfterAttempt adds the AfterAttemptInterceptor to config. -func WithAfterAttempt(i smithyhttp.AfterAttemptInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterAttempt = append(o.Interceptors.AfterAttempt, i) - return nil - } -} - -// WithAfterExecution adds the AfterExecutionInterceptor to config. -func WithAfterExecution(i smithyhttp.AfterExecutionInterceptor) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.Interceptors.AfterExecution = append(o.Interceptors.AfterExecution, i) - return nil - } -} - -// WithAuthSchemePreference sets the priority order of auth schemes on config. -// -// Schemes are expressed as names e.g. sigv4a or sigv4. -func WithAuthSchemePreference(schemeIDs ...string) LoadOptionsFunc { - return func(o *LoadOptions) error { - o.AuthSchemePreference = schemeIDs - return nil - } -} - -func (o LoadOptions) getAuthSchemePreference() ([]string, bool) { - if len(o.AuthSchemePreference) > 0 { - return o.AuthSchemePreference, true - } - return nil, false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/local.go b/vendor/github.com/aws/aws-sdk-go-v2/config/local.go deleted file mode 100644 index b629137c82..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/local.go +++ /dev/null @@ -1,51 +0,0 @@ -package config - -import ( - "fmt" - "net" - "net/url" -) - -var lookupHostFn = net.LookupHost - -func isLoopbackHost(host string) (bool, error) { - ip := net.ParseIP(host) - if ip != nil { - return ip.IsLoopback(), nil - } - - // Host is not an ip, perform lookup - addrs, err := lookupHostFn(host) - if err != nil { - return false, err - } - if len(addrs) == 0 { - return false, fmt.Errorf("no addrs found for host, %s", host) - } - - for _, addr := range addrs { - if !net.ParseIP(addr).IsLoopback() { - return false, nil - } - } - - return true, nil -} - -func validateLocalURL(v string) error { - u, err := url.Parse(v) - if err != nil { - return err - } - - host := u.Hostname() - if len(host) == 0 { - return fmt.Errorf("unable to parse host from local HTTP cred provider URL") - } else if isLoopback, err := isLoopbackHost(host); err != nil { - return fmt.Errorf("failed to resolve host %q, %v", host, err) - } else if !isLoopback { - return fmt.Errorf("invalid endpoint host, %q, only host resolving to loopback addresses are allowed", host) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go deleted file mode 100644 index 18b9b5ad20..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/provider.go +++ /dev/null @@ -1,786 +0,0 @@ -package config - -import ( - "context" - "io" - "net/http" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds" - "github.com/aws/aws-sdk-go-v2/credentials/processcreds" - "github.com/aws/aws-sdk-go-v2/credentials/ssocreds" - "github.com/aws/aws-sdk-go-v2/credentials/stscreds" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - smithybearer "github.com/aws/smithy-go/auth/bearer" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// sharedConfigProfileProvider provides access to the shared config profile -// name external configuration value. -type sharedConfigProfileProvider interface { - getSharedConfigProfile(ctx context.Context) (string, bool, error) -} - -// getSharedConfigProfile searches the configs for a sharedConfigProfileProvider -// and returns the value if found. Returns an error if a provider fails before a -// value is found. -func getSharedConfigProfile(ctx context.Context, configs configs) (value string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(sharedConfigProfileProvider); ok { - value, found, err = p.getSharedConfigProfile(ctx) - if err != nil || found { - break - } - } - } - return -} - -// sharedConfigFilesProvider provides access to the shared config filesnames -// external configuration value. -type sharedConfigFilesProvider interface { - getSharedConfigFiles(ctx context.Context) ([]string, bool, error) -} - -// getSharedConfigFiles searches the configs for a sharedConfigFilesProvider -// and returns the value if found. Returns an error if a provider fails before a -// value is found. -func getSharedConfigFiles(ctx context.Context, configs configs) (value []string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(sharedConfigFilesProvider); ok { - value, found, err = p.getSharedConfigFiles(ctx) - if err != nil || found { - break - } - } - } - - return -} - -// sharedCredentialsFilesProvider provides access to the shared credentials filesnames -// external configuration value. -type sharedCredentialsFilesProvider interface { - getSharedCredentialsFiles(ctx context.Context) ([]string, bool, error) -} - -// getSharedCredentialsFiles searches the configs for a sharedCredentialsFilesProvider -// and returns the value if found. Returns an error if a provider fails before a -// value is found. -func getSharedCredentialsFiles(ctx context.Context, configs configs) (value []string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(sharedCredentialsFilesProvider); ok { - value, found, err = p.getSharedCredentialsFiles(ctx) - if err != nil || found { - break - } - } - } - - return -} - -// customCABundleProvider provides access to the custom CA bundle PEM bytes. -type customCABundleProvider interface { - getCustomCABundle(ctx context.Context) (io.Reader, bool, error) -} - -// getCustomCABundle searches the configs for a customCABundleProvider -// and returns the value if found. Returns an error if a provider fails before a -// value is found. -func getCustomCABundle(ctx context.Context, configs configs) (value io.Reader, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(customCABundleProvider); ok { - value, found, err = p.getCustomCABundle(ctx) - if err != nil || found { - break - } - } - } - - return -} - -// regionProvider provides access to the region external configuration value. -type regionProvider interface { - getRegion(ctx context.Context) (string, bool, error) -} - -// getRegion searches the configs for a regionProvider and returns the value -// if found. Returns an error if a provider fails before a value is found. -func getRegion(ctx context.Context, configs configs) (value string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(regionProvider); ok { - value, found, err = p.getRegion(ctx) - if err != nil || found { - break - } - } - } - return -} - -// IgnoreConfiguredEndpointsProvider is needed to search for all providers -// that provide a flag to disable configured endpoints. -type IgnoreConfiguredEndpointsProvider interface { - GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error) -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok { - value, found, err = p.GetIgnoreConfiguredEndpoints(ctx) - if err != nil || found { - break - } - } - } - return -} - -type baseEndpointProvider interface { - getBaseEndpoint(ctx context.Context) (string, bool, error) -} - -func getBaseEndpoint(ctx context.Context, configs configs) (value string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(baseEndpointProvider); ok { - value, found, err = p.getBaseEndpoint(ctx) - if err != nil || found { - break - } - } - } - return -} - -type servicesObjectProvider interface { - getServicesObject(ctx context.Context) (map[string]map[string]string, bool, error) -} - -func getServicesObject(ctx context.Context, configs configs) (value map[string]map[string]string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(servicesObjectProvider); ok { - value, found, err = p.getServicesObject(ctx) - if err != nil || found { - break - } - } - } - return -} - -// appIDProvider provides access to the sdk app ID value -type appIDProvider interface { - getAppID(ctx context.Context) (string, bool, error) -} - -func getAppID(ctx context.Context, configs configs) (value string, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(appIDProvider); ok { - value, found, err = p.getAppID(ctx) - if err != nil || found { - break - } - } - } - return -} - -// disableRequestCompressionProvider provides access to the DisableRequestCompression -type disableRequestCompressionProvider interface { - getDisableRequestCompression(context.Context) (bool, bool, error) -} - -func getDisableRequestCompression(ctx context.Context, configs configs) (value bool, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(disableRequestCompressionProvider); ok { - value, found, err = p.getDisableRequestCompression(ctx) - if err != nil || found { - break - } - } - } - return -} - -// requestMinCompressSizeBytesProvider provides access to the MinCompressSizeBytes -type requestMinCompressSizeBytesProvider interface { - getRequestMinCompressSizeBytes(context.Context) (int64, bool, error) -} - -func getRequestMinCompressSizeBytes(ctx context.Context, configs configs) (value int64, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(requestMinCompressSizeBytesProvider); ok { - value, found, err = p.getRequestMinCompressSizeBytes(ctx) - if err != nil || found { - break - } - } - } - return -} - -// accountIDEndpointModeProvider provides access to the AccountIDEndpointMode -type accountIDEndpointModeProvider interface { - getAccountIDEndpointMode(context.Context) (aws.AccountIDEndpointMode, bool, error) -} - -func getAccountIDEndpointMode(ctx context.Context, configs configs) (value aws.AccountIDEndpointMode, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(accountIDEndpointModeProvider); ok { - value, found, err = p.getAccountIDEndpointMode(ctx) - if err != nil || found { - break - } - } - } - return -} - -// requestChecksumCalculationProvider provides access to the RequestChecksumCalculation -type requestChecksumCalculationProvider interface { - getRequestChecksumCalculation(context.Context) (aws.RequestChecksumCalculation, bool, error) -} - -func getRequestChecksumCalculation(ctx context.Context, configs configs) (value aws.RequestChecksumCalculation, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(requestChecksumCalculationProvider); ok { - value, found, err = p.getRequestChecksumCalculation(ctx) - if err != nil || found { - break - } - } - } - return -} - -// responseChecksumValidationProvider provides access to the ResponseChecksumValidation -type responseChecksumValidationProvider interface { - getResponseChecksumValidation(context.Context) (aws.ResponseChecksumValidation, bool, error) -} - -func getResponseChecksumValidation(ctx context.Context, configs configs) (value aws.ResponseChecksumValidation, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(responseChecksumValidationProvider); ok { - value, found, err = p.getResponseChecksumValidation(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ec2IMDSRegionProvider provides access to the ec2 imds region -// configuration value -type ec2IMDSRegionProvider interface { - getEC2IMDSRegion(ctx context.Context) (string, bool, error) -} - -// getEC2IMDSRegion searches the configs for a ec2IMDSRegionProvider and -// returns the value if found. Returns an error if a provider fails before -// a value is found. -func getEC2IMDSRegion(ctx context.Context, configs configs) (region string, found bool, err error) { - for _, cfg := range configs { - if provider, ok := cfg.(ec2IMDSRegionProvider); ok { - region, found, err = provider.getEC2IMDSRegion(ctx) - if err != nil || found { - break - } - } - } - return -} - -// credentialsProviderProvider provides access to the credentials external -// configuration value. -type credentialsProviderProvider interface { - getCredentialsProvider(ctx context.Context) (aws.CredentialsProvider, bool, error) -} - -// getCredentialsProvider searches the configs for a credentialsProviderProvider -// and returns the value if found. Returns an error if a provider fails before a -// value is found. -func getCredentialsProvider(ctx context.Context, configs configs) (p aws.CredentialsProvider, found bool, err error) { - for _, cfg := range configs { - if provider, ok := cfg.(credentialsProviderProvider); ok { - p, found, err = provider.getCredentialsProvider(ctx) - if err != nil || found { - break - } - } - } - return -} - -// credentialsCacheOptionsProvider is an interface for retrieving a function for setting -// the aws.CredentialsCacheOptions. -type credentialsCacheOptionsProvider interface { - getCredentialsCacheOptions(ctx context.Context) (func(*aws.CredentialsCacheOptions), bool, error) -} - -// getCredentialsCacheOptionsProvider is an interface for retrieving a function for setting -// the aws.CredentialsCacheOptions. -func getCredentialsCacheOptionsProvider(ctx context.Context, configs configs) ( - f func(*aws.CredentialsCacheOptions), found bool, err error, -) { - for _, config := range configs { - if p, ok := config.(credentialsCacheOptionsProvider); ok { - f, found, err = p.getCredentialsCacheOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// bearerAuthTokenProviderProvider provides access to the bearer authentication -// token external configuration value. -type bearerAuthTokenProviderProvider interface { - getBearerAuthTokenProvider(context.Context) (smithybearer.TokenProvider, bool, error) -} - -// getBearerAuthTokenProvider searches the config sources for a -// bearerAuthTokenProviderProvider and returns the value if found. Returns an -// error if a provider fails before a value is found. -func getBearerAuthTokenProvider(ctx context.Context, configs configs) (p smithybearer.TokenProvider, found bool, err error) { - for _, cfg := range configs { - if provider, ok := cfg.(bearerAuthTokenProviderProvider); ok { - p, found, err = provider.getBearerAuthTokenProvider(ctx) - if err != nil || found { - break - } - } - } - return -} - -// bearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for -// setting the smithy-go auth/bearer#TokenCacheOptions. -type bearerAuthTokenCacheOptionsProvider interface { - getBearerAuthTokenCacheOptions(context.Context) (func(*smithybearer.TokenCacheOptions), bool, error) -} - -// getBearerAuthTokenCacheOptionsProvider is an interface for retrieving a function for -// setting the smithy-go auth/bearer#TokenCacheOptions. -func getBearerAuthTokenCacheOptions(ctx context.Context, configs configs) ( - f func(*smithybearer.TokenCacheOptions), found bool, err error, -) { - for _, config := range configs { - if p, ok := config.(bearerAuthTokenCacheOptionsProvider); ok { - f, found, err = p.getBearerAuthTokenCacheOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ssoTokenProviderOptionsProvider is an interface for retrieving a function for -// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions. -type ssoTokenProviderOptionsProvider interface { - getSSOTokenProviderOptions(context.Context) (func(*ssocreds.SSOTokenProviderOptions), bool, error) -} - -// getSSOTokenProviderOptions is an interface for retrieving a function for -// setting the SDK's credentials/ssocreds#SSOTokenProviderOptions. -func getSSOTokenProviderOptions(ctx context.Context, configs configs) ( - f func(*ssocreds.SSOTokenProviderOptions), found bool, err error, -) { - for _, config := range configs { - if p, ok := config.(ssoTokenProviderOptionsProvider); ok { - f, found, err = p.getSSOTokenProviderOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ssoTokenProviderOptionsProvider - -// processCredentialOptions is an interface for retrieving a function for setting -// the processcreds.Options. -type processCredentialOptions interface { - getProcessCredentialOptions(ctx context.Context) (func(*processcreds.Options), bool, error) -} - -// getProcessCredentialOptions searches the slice of configs and returns the first function found -func getProcessCredentialOptions(ctx context.Context, configs configs) (f func(*processcreds.Options), found bool, err error) { - for _, config := range configs { - if p, ok := config.(processCredentialOptions); ok { - f, found, err = p.getProcessCredentialOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ec2RoleCredentialOptionsProvider is an interface for retrieving a function -// for setting the ec2rolecreds.Provider options. -type ec2RoleCredentialOptionsProvider interface { - getEC2RoleCredentialOptions(ctx context.Context) (func(*ec2rolecreds.Options), bool, error) -} - -// getEC2RoleCredentialProviderOptions searches the slice of configs and returns the first function found -func getEC2RoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*ec2rolecreds.Options), found bool, err error) { - for _, config := range configs { - if p, ok := config.(ec2RoleCredentialOptionsProvider); ok { - f, found, err = p.getEC2RoleCredentialOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// defaultRegionProvider is an interface for retrieving a default region if a region was not resolved from other sources -type defaultRegionProvider interface { - getDefaultRegion(ctx context.Context) (string, bool, error) -} - -// getDefaultRegion searches the slice of configs and returns the first fallback region found -func getDefaultRegion(ctx context.Context, configs configs) (value string, found bool, err error) { - for _, config := range configs { - if p, ok := config.(defaultRegionProvider); ok { - value, found, err = p.getDefaultRegion(ctx) - if err != nil || found { - break - } - } - } - return -} - -// endpointCredentialOptionsProvider is an interface for retrieving a function for setting -// the endpointcreds.ProviderOptions. -type endpointCredentialOptionsProvider interface { - getEndpointCredentialOptions(ctx context.Context) (func(*endpointcreds.Options), bool, error) -} - -// getEndpointCredentialProviderOptions searches the slice of configs and returns the first function found -func getEndpointCredentialProviderOptions(ctx context.Context, configs configs) (f func(*endpointcreds.Options), found bool, err error) { - for _, config := range configs { - if p, ok := config.(endpointCredentialOptionsProvider); ok { - f, found, err = p.getEndpointCredentialOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// webIdentityRoleCredentialOptionsProvider is an interface for retrieving a function for setting -// the stscreds.WebIdentityRoleProvider. -type webIdentityRoleCredentialOptionsProvider interface { - getWebIdentityRoleCredentialOptions(ctx context.Context) (func(*stscreds.WebIdentityRoleOptions), bool, error) -} - -// getWebIdentityCredentialProviderOptions searches the slice of configs and returns the first function found -func getWebIdentityCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.WebIdentityRoleOptions), found bool, err error) { - for _, config := range configs { - if p, ok := config.(webIdentityRoleCredentialOptionsProvider); ok { - f, found, err = p.getWebIdentityRoleCredentialOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// assumeRoleCredentialOptionsProvider is an interface for retrieving a function for setting -// the stscreds.AssumeRoleOptions. -type assumeRoleCredentialOptionsProvider interface { - getAssumeRoleCredentialOptions(ctx context.Context) (func(*stscreds.AssumeRoleOptions), bool, error) -} - -// getAssumeRoleCredentialProviderOptions searches the slice of configs and returns the first function found -func getAssumeRoleCredentialProviderOptions(ctx context.Context, configs configs) (f func(*stscreds.AssumeRoleOptions), found bool, err error) { - for _, config := range configs { - if p, ok := config.(assumeRoleCredentialOptionsProvider); ok { - f, found, err = p.getAssumeRoleCredentialOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// HTTPClient is an HTTP client implementation -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// httpClientProvider is an interface for retrieving HTTPClient -type httpClientProvider interface { - getHTTPClient(ctx context.Context) (HTTPClient, bool, error) -} - -// getHTTPClient searches the slice of configs and returns the HTTPClient set on configs -func getHTTPClient(ctx context.Context, configs configs) (client HTTPClient, found bool, err error) { - for _, config := range configs { - if p, ok := config.(httpClientProvider); ok { - client, found, err = p.getHTTPClient(ctx) - if err != nil || found { - break - } - } - } - return -} - -// apiOptionsProvider is an interface for retrieving APIOptions -type apiOptionsProvider interface { - getAPIOptions(ctx context.Context) ([]func(*middleware.Stack) error, bool, error) -} - -// getAPIOptions searches the slice of configs and returns the APIOptions set on configs -func getAPIOptions(ctx context.Context, configs configs) (apiOptions []func(*middleware.Stack) error, found bool, err error) { - for _, config := range configs { - if p, ok := config.(apiOptionsProvider); ok { - // retrieve APIOptions from configs and set it on cfg - apiOptions, found, err = p.getAPIOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// endpointResolverProvider is an interface for retrieving an aws.EndpointResolver from a configuration source -type endpointResolverProvider interface { - getEndpointResolver(ctx context.Context) (aws.EndpointResolver, bool, error) -} - -// getEndpointResolver searches the provided config sources for a EndpointResolverFunc that can be used -// to configure the aws.Config.EndpointResolver value. -func getEndpointResolver(ctx context.Context, configs configs) (f aws.EndpointResolver, found bool, err error) { - for _, c := range configs { - if p, ok := c.(endpointResolverProvider); ok { - f, found, err = p.getEndpointResolver(ctx) - if err != nil || found { - break - } - } - } - return -} - -// endpointResolverWithOptionsProvider is an interface for retrieving an aws.EndpointResolverWithOptions from a configuration source -type endpointResolverWithOptionsProvider interface { - getEndpointResolverWithOptions(ctx context.Context) (aws.EndpointResolverWithOptions, bool, error) -} - -// getEndpointResolver searches the provided config sources for a EndpointResolverFunc that can be used -// to configure the aws.Config.EndpointResolver value. -func getEndpointResolverWithOptions(ctx context.Context, configs configs) (f aws.EndpointResolverWithOptions, found bool, err error) { - for _, c := range configs { - if p, ok := c.(endpointResolverWithOptionsProvider); ok { - f, found, err = p.getEndpointResolverWithOptions(ctx) - if err != nil || found { - break - } - } - } - return -} - -// loggerProvider is an interface for retrieving a logging.Logger from a configuration source. -type loggerProvider interface { - getLogger(ctx context.Context) (logging.Logger, bool, error) -} - -// getLogger searches the provided config sources for a logging.Logger that can be used -// to configure the aws.Config.Logger value. -func getLogger(ctx context.Context, configs configs) (l logging.Logger, found bool, err error) { - for _, c := range configs { - if p, ok := c.(loggerProvider); ok { - l, found, err = p.getLogger(ctx) - if err != nil || found { - break - } - } - } - return -} - -// clientLogModeProvider is an interface for retrieving the aws.ClientLogMode from a configuration source. -type clientLogModeProvider interface { - getClientLogMode(ctx context.Context) (aws.ClientLogMode, bool, error) -} - -func getClientLogMode(ctx context.Context, configs configs) (m aws.ClientLogMode, found bool, err error) { - for _, c := range configs { - if p, ok := c.(clientLogModeProvider); ok { - m, found, err = p.getClientLogMode(ctx) - if err != nil || found { - break - } - } - } - return -} - -// retryProvider is an configuration provider for custom Retryer. -type retryProvider interface { - getRetryer(ctx context.Context) (func() aws.Retryer, bool, error) -} - -func getRetryer(ctx context.Context, configs configs) (v func() aws.Retryer, found bool, err error) { - for _, c := range configs { - if p, ok := c.(retryProvider); ok { - v, found, err = p.getRetryer(ctx) - if err != nil || found { - break - } - } - } - return -} - -// logConfigurationWarningsProvider is an configuration provider for -// retrieving a boolean indicating whether configuration issues should -// be logged when loading from config sources -type logConfigurationWarningsProvider interface { - getLogConfigurationWarnings(ctx context.Context) (bool, bool, error) -} - -func getLogConfigurationWarnings(ctx context.Context, configs configs) (v bool, found bool, err error) { - for _, c := range configs { - if p, ok := c.(logConfigurationWarningsProvider); ok { - v, found, err = p.getLogConfigurationWarnings(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ssoCredentialOptionsProvider is an interface for retrieving a function for setting -// the ssocreds.Options. -type ssoCredentialOptionsProvider interface { - getSSOProviderOptions(context.Context) (func(*ssocreds.Options), bool, error) -} - -func getSSOProviderOptions(ctx context.Context, configs configs) (v func(options *ssocreds.Options), found bool, err error) { - for _, c := range configs { - if p, ok := c.(ssoCredentialOptionsProvider); ok { - v, found, err = p.getSSOProviderOptions(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} - -type defaultsModeIMDSClientProvider interface { - getDefaultsModeIMDSClient(context.Context) (*imds.Client, bool, error) -} - -func getDefaultsModeIMDSClient(ctx context.Context, configs configs) (v *imds.Client, found bool, err error) { - for _, c := range configs { - if p, ok := c.(defaultsModeIMDSClientProvider); ok { - v, found, err = p.getDefaultsModeIMDSClient(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} - -type defaultsModeProvider interface { - getDefaultsMode(context.Context) (aws.DefaultsMode, bool, error) -} - -func getDefaultsMode(ctx context.Context, configs configs) (v aws.DefaultsMode, found bool, err error) { - for _, c := range configs { - if p, ok := c.(defaultsModeProvider); ok { - v, found, err = p.getDefaultsMode(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} - -type retryMaxAttemptsProvider interface { - GetRetryMaxAttempts(context.Context) (int, bool, error) -} - -func getRetryMaxAttempts(ctx context.Context, configs configs) (v int, found bool, err error) { - for _, c := range configs { - if p, ok := c.(retryMaxAttemptsProvider); ok { - v, found, err = p.GetRetryMaxAttempts(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} - -type retryModeProvider interface { - GetRetryMode(context.Context) (aws.RetryMode, bool, error) -} - -func getRetryMode(ctx context.Context, configs configs) (v aws.RetryMode, found bool, err error) { - for _, c := range configs { - if p, ok := c.(retryModeProvider); ok { - v, found, err = p.GetRetryMode(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} - -func getAuthSchemePreference(ctx context.Context, configs configs) ([]string, bool) { - type provider interface { - getAuthSchemePreference() ([]string, bool) - } - - for _, cfg := range configs { - if p, ok := cfg.(provider); ok { - if v, ok := p.getAuthSchemePreference(); ok { - return v, true - } - } - } - return nil, false -} - -type serviceOptionsProvider interface { - getServiceOptions(ctx context.Context) ([]func(string, any), bool, error) -} - -func getServiceOptions(ctx context.Context, configs configs) (v []func(string, any), found bool, err error) { - for _, c := range configs { - if p, ok := c.(serviceOptionsProvider); ok { - v, found, err = p.getServiceOptions(ctx) - if err != nil || found { - break - } - } - } - return v, found, err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go deleted file mode 100644 index 92a16d718d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve.go +++ /dev/null @@ -1,444 +0,0 @@ -package config - -import ( - "context" - "crypto/tls" - "crypto/x509" - "fmt" - "io/ioutil" - "net/http" - "os" - - "github.com/aws/aws-sdk-go-v2/aws" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/smithy-go/logging" -) - -// resolveDefaultAWSConfig will write default configuration values into the cfg -// value. It will write the default values, overwriting any previous value. -// -// This should be used as the first resolver in the slice of resolvers when -// resolving external configuration. -func resolveDefaultAWSConfig(ctx context.Context, cfg *aws.Config, cfgs configs) error { - var sources []interface{} - for _, s := range cfgs { - sources = append(sources, s) - } - - *cfg = aws.Config{ - Logger: logging.NewStandardLogger(os.Stderr), - ConfigSources: sources, - } - return nil -} - -// resolveCustomCABundle extracts the first instance of a custom CA bundle filename -// from the external configurations. It will update the HTTP Client's builder -// to be configured with the custom CA bundle. -// -// Config provider used: -// * customCABundleProvider -func resolveCustomCABundle(ctx context.Context, cfg *aws.Config, cfgs configs) error { - pemCerts, found, err := getCustomCABundle(ctx, cfgs) - if err != nil { - // TODO error handling, What is the best way to handle this? - // capture previous errors continue. error out if all errors - return err - } - if !found { - return nil - } - - if cfg.HTTPClient == nil { - cfg.HTTPClient = awshttp.NewBuildableClient() - } - - trOpts, ok := cfg.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return fmt.Errorf("unable to add custom RootCAs HTTPClient, "+ - "has no WithTransportOptions, %T", cfg.HTTPClient) - } - - var appendErr error - client := trOpts.WithTransportOptions(func(tr *http.Transport) { - if tr.TLSClientConfig == nil { - tr.TLSClientConfig = &tls.Config{} - } - if tr.TLSClientConfig.RootCAs == nil { - tr.TLSClientConfig.RootCAs = x509.NewCertPool() - } - - b, err := ioutil.ReadAll(pemCerts) - if err != nil { - appendErr = fmt.Errorf("failed to read custom CA bundle PEM file") - } - - if !tr.TLSClientConfig.RootCAs.AppendCertsFromPEM(b) { - appendErr = fmt.Errorf("failed to load custom CA bundle PEM file") - } - }) - if appendErr != nil { - return appendErr - } - - cfg.HTTPClient = client - return err -} - -// resolveRegion extracts the first instance of a Region from the configs slice. -// -// Config providers used: -// * regionProvider -func resolveRegion(ctx context.Context, cfg *aws.Config, configs configs) error { - v, found, err := getRegion(ctx, configs) - if err != nil { - // TODO error handling, What is the best way to handle this? - // capture previous errors continue. error out if all errors - return err - } - if !found { - return nil - } - - cfg.Region = v - return nil -} - -func resolveBaseEndpoint(ctx context.Context, cfg *aws.Config, configs configs) error { - var downcastCfgSources []interface{} - for _, cs := range configs { - downcastCfgSources = append(downcastCfgSources, interface{}(cs)) - } - - if val, found, err := GetIgnoreConfiguredEndpoints(ctx, downcastCfgSources); found && val && err == nil { - cfg.BaseEndpoint = nil - return nil - } - - v, found, err := getBaseEndpoint(ctx, configs) - if err != nil { - return err - } - - if !found { - return nil - } - cfg.BaseEndpoint = aws.String(v) - return nil -} - -// resolveAppID extracts the sdk app ID from the configs slice's SharedConfig or env var -func resolveAppID(ctx context.Context, cfg *aws.Config, configs configs) error { - ID, _, err := getAppID(ctx, configs) - if err != nil { - return err - } - - cfg.AppID = ID - return nil -} - -// resolveDisableRequestCompression extracts the DisableRequestCompression from the configs slice's -// SharedConfig or EnvConfig -func resolveDisableRequestCompression(ctx context.Context, cfg *aws.Config, configs configs) error { - disable, _, err := getDisableRequestCompression(ctx, configs) - if err != nil { - return err - } - - cfg.DisableRequestCompression = disable - return nil -} - -// resolveRequestMinCompressSizeBytes extracts the RequestMinCompressSizeBytes from the configs slice's -// SharedConfig or EnvConfig -func resolveRequestMinCompressSizeBytes(ctx context.Context, cfg *aws.Config, configs configs) error { - minBytes, found, err := getRequestMinCompressSizeBytes(ctx, configs) - if err != nil { - return err - } - // must set a default min size 10240 if not configured - if !found { - minBytes = 10240 - } - cfg.RequestMinCompressSizeBytes = minBytes - return nil -} - -// resolveAccountIDEndpointMode extracts the AccountIDEndpointMode from the configs slice's -// SharedConfig or EnvConfig -func resolveAccountIDEndpointMode(ctx context.Context, cfg *aws.Config, configs configs) error { - m, found, err := getAccountIDEndpointMode(ctx, configs) - if err != nil { - return err - } - - if !found { - m = aws.AccountIDEndpointModePreferred - } - - cfg.AccountIDEndpointMode = m - return nil -} - -// resolveRequestChecksumCalculation extracts the RequestChecksumCalculation from the configs slice's -// SharedConfig or EnvConfig -func resolveRequestChecksumCalculation(ctx context.Context, cfg *aws.Config, configs configs) error { - c, found, err := getRequestChecksumCalculation(ctx, configs) - if err != nil { - return err - } - - if !found { - c = aws.RequestChecksumCalculationWhenSupported - } - cfg.RequestChecksumCalculation = c - return nil -} - -// resolveResponseValidation extracts the ResponseChecksumValidation from the configs slice's -// SharedConfig or EnvConfig -func resolveResponseChecksumValidation(ctx context.Context, cfg *aws.Config, configs configs) error { - c, found, err := getResponseChecksumValidation(ctx, configs) - if err != nil { - return err - } - - if !found { - c = aws.ResponseChecksumValidationWhenSupported - } - cfg.ResponseChecksumValidation = c - return nil -} - -// resolveDefaultRegion extracts the first instance of a default region and sets `aws.Config.Region` to the default -// region if region had not been resolved from other sources. -func resolveDefaultRegion(ctx context.Context, cfg *aws.Config, configs configs) error { - if len(cfg.Region) > 0 { - return nil - } - - v, found, err := getDefaultRegion(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.Region = v - - return nil -} - -// resolveHTTPClient extracts the first instance of a HTTPClient and sets `aws.Config.HTTPClient` to the HTTPClient instance -// if one has not been resolved from other sources. -func resolveHTTPClient(ctx context.Context, cfg *aws.Config, configs configs) error { - c, found, err := getHTTPClient(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.HTTPClient = c - return nil -} - -// resolveAPIOptions extracts the first instance of APIOptions and sets `aws.Config.APIOptions` to the resolved API options -// if one has not been resolved from other sources. -func resolveAPIOptions(ctx context.Context, cfg *aws.Config, configs configs) error { - o, found, err := getAPIOptions(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.APIOptions = o - - return nil -} - -// resolveEndpointResolver extracts the first instance of a EndpointResolverFunc from the config slice -// and sets the functions result on the aws.Config.EndpointResolver -func resolveEndpointResolver(ctx context.Context, cfg *aws.Config, configs configs) error { - endpointResolver, found, err := getEndpointResolver(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.EndpointResolver = endpointResolver - - return nil -} - -// resolveEndpointResolver extracts the first instance of a EndpointResolverFunc from the config slice -// and sets the functions result on the aws.Config.EndpointResolver -func resolveEndpointResolverWithOptions(ctx context.Context, cfg *aws.Config, configs configs) error { - endpointResolver, found, err := getEndpointResolverWithOptions(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.EndpointResolverWithOptions = endpointResolver - - return nil -} - -func resolveLogger(ctx context.Context, cfg *aws.Config, configs configs) error { - logger, found, err := getLogger(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.Logger = logger - - return nil -} - -func resolveClientLogMode(ctx context.Context, cfg *aws.Config, configs configs) error { - mode, found, err := getClientLogMode(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.ClientLogMode = mode - - return nil -} - -func resolveRetryer(ctx context.Context, cfg *aws.Config, configs configs) error { - retryer, found, err := getRetryer(ctx, configs) - if err != nil { - return err - } - - if found { - cfg.Retryer = retryer - return nil - } - - // Only load the retry options if a custom retryer has not be specified. - if err = resolveRetryMaxAttempts(ctx, cfg, configs); err != nil { - return err - } - return resolveRetryMode(ctx, cfg, configs) -} - -func resolveEC2IMDSRegion(ctx context.Context, cfg *aws.Config, configs configs) error { - if len(cfg.Region) > 0 { - return nil - } - - region, found, err := getEC2IMDSRegion(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.Region = region - - return nil -} - -func resolveDefaultsModeOptions(ctx context.Context, cfg *aws.Config, configs configs) error { - defaultsMode, found, err := getDefaultsMode(ctx, configs) - if err != nil { - return err - } - if !found { - defaultsMode = aws.DefaultsModeLegacy - } - - var environment aws.RuntimeEnvironment - if defaultsMode == aws.DefaultsModeAuto { - envConfig, _, _ := getAWSConfigSources(configs) - - client, found, err := getDefaultsModeIMDSClient(ctx, configs) - if err != nil { - return err - } - if !found { - client = imds.NewFromConfig(*cfg) - } - - environment, err = resolveDefaultsModeRuntimeEnvironment(ctx, envConfig, client) - if err != nil { - return err - } - } - - cfg.DefaultsMode = defaultsMode - cfg.RuntimeEnvironment = environment - - return nil -} - -func resolveRetryMaxAttempts(ctx context.Context, cfg *aws.Config, configs configs) error { - maxAttempts, found, err := getRetryMaxAttempts(ctx, configs) - if err != nil || !found { - return err - } - cfg.RetryMaxAttempts = maxAttempts - - return nil -} - -func resolveRetryMode(ctx context.Context, cfg *aws.Config, configs configs) error { - retryMode, found, err := getRetryMode(ctx, configs) - if err != nil || !found { - return err - } - cfg.RetryMode = retryMode - - return nil -} - -func resolveInterceptors(ctx context.Context, cfg *aws.Config, configs configs) error { - // LoadOptions is the only thing that you can really configure interceptors - // on so just check that directly. - for _, c := range configs { - if loadopts, ok := c.(LoadOptions); ok { - cfg.Interceptors = loadopts.Interceptors.Copy() - } - } - return nil -} - -func resolveAuthSchemePreference(ctx context.Context, cfg *aws.Config, configs configs) error { - if pref, ok := getAuthSchemePreference(ctx, configs); ok { - cfg.AuthSchemePreference = pref - } - return nil -} - -func resolveServiceOptions(ctx context.Context, cfg *aws.Config, configs configs) error { - serviceOptions, found, err := getServiceOptions(ctx, configs) - if err != nil { - return err - } - if !found { - return nil - } - - cfg.ServiceOptions = serviceOptions - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go deleted file mode 100644 index a8ebb3c0a3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_bearer_token.go +++ /dev/null @@ -1,122 +0,0 @@ -package config - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials/ssocreds" - "github.com/aws/aws-sdk-go-v2/service/ssooidc" - smithybearer "github.com/aws/smithy-go/auth/bearer" -) - -// resolveBearerAuthToken extracts a token provider from the config sources. -// -// If an explicit bearer authentication token provider is not found the -// resolver will fallback to resolving token provider via other config sources -// such as SharedConfig. -func resolveBearerAuthToken(ctx context.Context, cfg *aws.Config, configs configs) error { - found, err := resolveBearerAuthTokenProvider(ctx, cfg, configs) - if found || err != nil { - return err - } - - return resolveBearerAuthTokenProviderChain(ctx, cfg, configs) -} - -// resolveBearerAuthTokenProvider extracts the first instance of -// BearerAuthTokenProvider from the config sources. -// -// The resolved BearerAuthTokenProvider will be wrapped in a cache to ensure -// the Token is only refreshed when needed. This also protects the -// TokenProvider so it can be used concurrently. -// -// Config providers used: -// * bearerAuthTokenProviderProvider -func resolveBearerAuthTokenProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) { - tokenProvider, found, err := getBearerAuthTokenProvider(ctx, configs) - if !found || err != nil { - return false, err - } - - cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache( - ctx, configs, tokenProvider) - if err != nil { - return false, err - } - - return true, nil -} - -func resolveBearerAuthTokenProviderChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) { - _, sharedConfig, _ := getAWSConfigSources(configs) - - var provider smithybearer.TokenProvider - - if sharedConfig.SSOSession != nil { - provider, err = resolveBearerAuthSSOTokenProvider( - ctx, cfg, sharedConfig.SSOSession, configs) - } - - if err == nil && provider != nil { - cfg.BearerAuthTokenProvider, err = wrapWithBearerAuthTokenCache( - ctx, configs, provider) - } - - return err -} - -func resolveBearerAuthSSOTokenProvider(ctx context.Context, cfg *aws.Config, session *SSOSession, configs configs) (*ssocreds.SSOTokenProvider, error) { - ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs) - if err != nil { - return nil, fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err) - } - - var optFns []func(*ssocreds.SSOTokenProviderOptions) - if found { - optFns = append(optFns, ssoTokenProviderOptionsFn) - } - - cachePath, err := ssocreds.StandardCachedTokenFilepath(session.Name) - if err != nil { - return nil, fmt.Errorf("failed to get SSOTokenProvider's cache path, %w", err) - } - - client := ssooidc.NewFromConfig(*cfg) - provider := ssocreds.NewSSOTokenProvider(client, cachePath, optFns...) - - return provider, nil -} - -// wrapWithBearerAuthTokenCache will wrap provider with an smithy-go -// bearer/auth#TokenCache with the provided options if the provider is not -// already a TokenCache. -func wrapWithBearerAuthTokenCache( - ctx context.Context, - cfgs configs, - provider smithybearer.TokenProvider, - optFns ...func(*smithybearer.TokenCacheOptions), -) (smithybearer.TokenProvider, error) { - _, ok := provider.(*smithybearer.TokenCache) - if ok { - return provider, nil - } - - tokenCacheConfigOptions, optionsFound, err := getBearerAuthTokenCacheOptions(ctx, cfgs) - if err != nil { - return nil, err - } - - opts := make([]func(*smithybearer.TokenCacheOptions), 0, 2+len(optFns)) - opts = append(opts, func(o *smithybearer.TokenCacheOptions) { - o.RefreshBeforeExpires = 5 * time.Minute - o.RetrieveBearerTokenTimeout = 30 * time.Second - }) - opts = append(opts, optFns...) - if optionsFound { - opts = append(opts, tokenCacheConfigOptions) - } - - return smithybearer.NewTokenCache(provider, opts...), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go b/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go deleted file mode 100644 index b00259df03..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/resolve_credentials.go +++ /dev/null @@ -1,627 +0,0 @@ -package config - -import ( - "context" - "fmt" - "io/ioutil" - "net" - "net/url" - "os" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials" - "github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds" - "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds" - "github.com/aws/aws-sdk-go-v2/credentials/processcreds" - "github.com/aws/aws-sdk-go-v2/credentials/ssocreds" - "github.com/aws/aws-sdk-go-v2/credentials/stscreds" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/aws-sdk-go-v2/service/sso" - "github.com/aws/aws-sdk-go-v2/service/ssooidc" - "github.com/aws/aws-sdk-go-v2/service/sts" -) - -const ( - // valid credential source values - credSourceEc2Metadata = "Ec2InstanceMetadata" - credSourceEnvironment = "Environment" - credSourceECSContainer = "EcsContainer" - httpProviderAuthFileEnvVar = "AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE" -) - -// direct representation of the IPv4 address for the ECS container -// "169.254.170.2" -var ecsContainerIPv4 net.IP = []byte{ - 169, 254, 170, 2, -} - -// direct representation of the IPv4 address for the EKS container -// "169.254.170.23" -var eksContainerIPv4 net.IP = []byte{ - 169, 254, 170, 23, -} - -// direct representation of the IPv6 address for the EKS container -// "fd00:ec2::23" -var eksContainerIPv6 net.IP = []byte{ - 0xFD, 0, 0xE, 0xC2, - 0, 0, 0, 0, - 0, 0, 0, 0, - 0, 0, 0, 0x23, -} - -var ( - ecsContainerEndpoint = "http://169.254.170.2" // not constant to allow for swapping during unit-testing -) - -// resolveCredentials extracts a credential provider from slice of config -// sources. -// -// If an explicit credential provider is not found the resolver will fallback -// to resolving credentials by extracting a credential provider from EnvConfig -// and SharedConfig. -func resolveCredentials(ctx context.Context, cfg *aws.Config, configs configs) error { - found, err := resolveCredentialProvider(ctx, cfg, configs) - if found || err != nil { - return err - } - - return resolveCredentialChain(ctx, cfg, configs) -} - -// resolveCredentialProvider extracts the first instance of Credentials from the -// config slices. -// -// The resolved CredentialProvider will be wrapped in a cache to ensure the -// credentials are only refreshed when needed. This also protects the -// credential provider to be used concurrently. -// -// Config providers used: -// * credentialsProviderProvider -func resolveCredentialProvider(ctx context.Context, cfg *aws.Config, configs configs) (bool, error) { - credProvider, found, err := getCredentialsProvider(ctx, configs) - if !found || err != nil { - return false, err - } - - cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, credProvider) - if err != nil { - return false, err - } - - return true, nil -} - -// resolveCredentialChain resolves a credential provider chain using EnvConfig -// and SharedConfig if present in the slice of provided configs. -// -// The resolved CredentialProvider will be wrapped in a cache to ensure the -// credentials are only refreshed when needed. This also protects the -// credential provider to be used concurrently. -func resolveCredentialChain(ctx context.Context, cfg *aws.Config, configs configs) (err error) { - envConfig, sharedConfig, other := getAWSConfigSources(configs) - - // When checking if a profile was specified programmatically we should only consider the "other" - // configuration sources that have been provided. This ensures we correctly honor the expected credential - // hierarchy. - _, sharedProfileSet, err := getSharedConfigProfile(ctx, other) - if err != nil { - return err - } - - switch { - case sharedProfileSet: - ctx, err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other) - case envConfig.Credentials.HasKeys(): - ctx = addCredentialSource(ctx, aws.CredentialSourceEnvVars) - cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials, Source: getCredentialSources(ctx)} - case len(envConfig.WebIdentityTokenFilePath) > 0: - ctx = addCredentialSource(ctx, aws.CredentialSourceEnvVarsSTSWebIDToken) - err = assumeWebIdentity(ctx, cfg, envConfig.WebIdentityTokenFilePath, envConfig.RoleARN, envConfig.RoleSessionName, configs) - default: - ctx, err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig, other) - } - if err != nil { - return err - } - - // Wrap the resolved provider in a cache so the SDK will cache credentials. - cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, cfg.Credentials) - if err != nil { - return err - } - - return nil -} - -func resolveCredsFromProfile(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedConfig *SharedConfig, configs configs) (ctx2 context.Context, err error) { - switch { - case sharedConfig.Source != nil: - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileSourceProfile) - // Assume IAM role with credentials source from a different profile. - ctx, err = resolveCredsFromProfile(ctx, cfg, envConfig, sharedConfig.Source, configs) - - case sharedConfig.Credentials.HasKeys(): - // Static Credentials from Shared Config/Credentials file. - ctx = addCredentialSource(ctx, aws.CredentialSourceProfile) - cfg.Credentials = credentials.StaticCredentialsProvider{ - Value: sharedConfig.Credentials, - Source: getCredentialSources(ctx), - } - - case len(sharedConfig.CredentialSource) != 0: - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileNamedProvider) - ctx, err = resolveCredsFromSource(ctx, cfg, envConfig, sharedConfig, configs) - - case len(sharedConfig.WebIdentityTokenFile) != 0: - // Credentials from Assume Web Identity token require an IAM Role, and - // that roll will be assumed. May be wrapped with another assume role - // via SourceProfile. - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileSTSWebIDToken) - return ctx, assumeWebIdentity(ctx, cfg, sharedConfig.WebIdentityTokenFile, sharedConfig.RoleARN, sharedConfig.RoleSessionName, configs) - - case sharedConfig.hasSSOConfiguration(): - if sharedConfig.hasLegacySSOConfiguration() { - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileSSOLegacy) - ctx = addCredentialSource(ctx, aws.CredentialSourceSSOLegacy) - } else { - ctx = addCredentialSource(ctx, aws.CredentialSourceSSO) - } - if sharedConfig.SSOSession != nil { - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileSSO) - } - err = resolveSSOCredentials(ctx, cfg, sharedConfig, configs) - - case len(sharedConfig.CredentialProcess) != 0: - // Get credentials from CredentialProcess - ctx = addCredentialSource(ctx, aws.CredentialSourceProfileProcess) - ctx = addCredentialSource(ctx, aws.CredentialSourceProcess) - err = processCredentials(ctx, cfg, sharedConfig, configs) - - case len(envConfig.ContainerCredentialsRelativePath) != 0: - ctx = addCredentialSource(ctx, aws.CredentialSourceHTTP) - err = resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) - - case len(envConfig.ContainerCredentialsEndpoint) != 0: - ctx = addCredentialSource(ctx, aws.CredentialSourceHTTP) - err = resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) - - default: - ctx = addCredentialSource(ctx, aws.CredentialSourceIMDS) - err = resolveEC2RoleCredentials(ctx, cfg, configs) - } - if err != nil { - return ctx, err - } - - if len(sharedConfig.RoleARN) > 0 { - return ctx, credsFromAssumeRole(ctx, cfg, sharedConfig, configs) - } - - return ctx, nil -} - -func resolveSSOCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error { - if err := sharedConfig.validateSSOConfiguration(); err != nil { - return err - } - - var options []func(*ssocreds.Options) - v, found, err := getSSOProviderOptions(ctx, configs) - if err != nil { - return err - } - if found { - options = append(options, v) - } - - cfgCopy := cfg.Copy() - - options = append(options, func(o *ssocreds.Options) { - o.CredentialSources = getCredentialSources(ctx) - }) - - if sharedConfig.SSOSession != nil { - ssoTokenProviderOptionsFn, found, err := getSSOTokenProviderOptions(ctx, configs) - if err != nil { - return fmt.Errorf("failed to get SSOTokenProviderOptions from config sources, %w", err) - } - var optFns []func(*ssocreds.SSOTokenProviderOptions) - if found { - optFns = append(optFns, ssoTokenProviderOptionsFn) - } - cfgCopy.Region = sharedConfig.SSOSession.SSORegion - cachedPath, err := ssocreds.StandardCachedTokenFilepath(sharedConfig.SSOSession.Name) - if err != nil { - return err - } - oidcClient := ssooidc.NewFromConfig(cfgCopy) - tokenProvider := ssocreds.NewSSOTokenProvider(oidcClient, cachedPath, optFns...) - options = append(options, func(o *ssocreds.Options) { - o.SSOTokenProvider = tokenProvider - o.CachedTokenFilepath = cachedPath - }) - } else { - cfgCopy.Region = sharedConfig.SSORegion - } - - cfg.Credentials = ssocreds.New(sso.NewFromConfig(cfgCopy), sharedConfig.SSOAccountID, sharedConfig.SSORoleName, sharedConfig.SSOStartURL, options...) - - return nil -} - -func ecsContainerURI(path string) string { - return fmt.Sprintf("%s%s", ecsContainerEndpoint, path) -} - -func processCredentials(ctx context.Context, cfg *aws.Config, sharedConfig *SharedConfig, configs configs) error { - var opts []func(*processcreds.Options) - - options, found, err := getProcessCredentialOptions(ctx, configs) - if err != nil { - return err - } - if found { - opts = append(opts, options) - } - - opts = append(opts, func(o *processcreds.Options) { - o.CredentialSources = getCredentialSources(ctx) - }) - - cfg.Credentials = processcreds.NewProvider(sharedConfig.CredentialProcess, opts...) - - return nil -} - -// isAllowedHost allows host to be loopback or known ECS/EKS container IPs -// -// host can either be an IP address OR an unresolved hostname - resolution will -// be automatically performed in the latter case -func isAllowedHost(host string) (bool, error) { - if ip := net.ParseIP(host); ip != nil { - return isIPAllowed(ip), nil - } - - addrs, err := lookupHostFn(host) - if err != nil { - return false, err - } - - for _, addr := range addrs { - if ip := net.ParseIP(addr); ip == nil || !isIPAllowed(ip) { - return false, nil - } - } - - return true, nil -} - -func isIPAllowed(ip net.IP) bool { - return ip.IsLoopback() || - ip.Equal(ecsContainerIPv4) || - ip.Equal(eksContainerIPv4) || - ip.Equal(eksContainerIPv6) -} - -func resolveLocalHTTPCredProvider(ctx context.Context, cfg *aws.Config, endpointURL, authToken string, configs configs) error { - var resolveErr error - - parsed, err := url.Parse(endpointURL) - if err != nil { - resolveErr = fmt.Errorf("invalid URL, %w", err) - } else { - host := parsed.Hostname() - if len(host) == 0 { - resolveErr = fmt.Errorf("unable to parse host from local HTTP cred provider URL") - } else if parsed.Scheme == "http" { - if isAllowedHost, allowHostErr := isAllowedHost(host); allowHostErr != nil { - resolveErr = fmt.Errorf("failed to resolve host %q, %v", host, allowHostErr) - } else if !isAllowedHost { - resolveErr = fmt.Errorf("invalid endpoint host, %q, only loopback/ecs/eks hosts are allowed", host) - } - } - } - - if resolveErr != nil { - return resolveErr - } - - return resolveHTTPCredProvider(ctx, cfg, endpointURL, authToken, configs) -} - -func resolveHTTPCredProvider(ctx context.Context, cfg *aws.Config, url, authToken string, configs configs) error { - optFns := []func(*endpointcreds.Options){ - func(options *endpointcreds.Options) { - if len(authToken) != 0 { - options.AuthorizationToken = authToken - } - if authFilePath := os.Getenv(httpProviderAuthFileEnvVar); authFilePath != "" { - options.AuthorizationTokenProvider = endpointcreds.TokenProviderFunc(func() (string, error) { - var contents []byte - var err error - if contents, err = ioutil.ReadFile(authFilePath); err != nil { - return "", fmt.Errorf("failed to read authorization token from %v: %v", authFilePath, err) - } - return string(contents), nil - }) - } - options.APIOptions = cfg.APIOptions - if cfg.Retryer != nil { - options.Retryer = cfg.Retryer() - } - options.CredentialSources = getCredentialSources(ctx) - }, - } - - optFn, found, err := getEndpointCredentialProviderOptions(ctx, configs) - if err != nil { - return err - } - if found { - optFns = append(optFns, optFn) - } - - provider := endpointcreds.New(url, optFns...) - - cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider, func(options *aws.CredentialsCacheOptions) { - options.ExpiryWindow = 5 * time.Minute - }) - if err != nil { - return err - } - - return nil -} - -func resolveCredsFromSource(ctx context.Context, cfg *aws.Config, envConfig *EnvConfig, sharedCfg *SharedConfig, configs configs) (context.Context, error) { - switch sharedCfg.CredentialSource { - case credSourceEc2Metadata: - ctx = addCredentialSource(ctx, aws.CredentialSourceIMDS) - return ctx, resolveEC2RoleCredentials(ctx, cfg, configs) - - case credSourceEnvironment: - ctx = addCredentialSource(ctx, aws.CredentialSourceHTTP) - cfg.Credentials = credentials.StaticCredentialsProvider{Value: envConfig.Credentials, Source: getCredentialSources(ctx)} - - case credSourceECSContainer: - ctx = addCredentialSource(ctx, aws.CredentialSourceHTTP) - if len(envConfig.ContainerCredentialsRelativePath) != 0 { - return ctx, resolveHTTPCredProvider(ctx, cfg, ecsContainerURI(envConfig.ContainerCredentialsRelativePath), envConfig.ContainerAuthorizationToken, configs) - } - if len(envConfig.ContainerCredentialsEndpoint) != 0 { - return ctx, resolveLocalHTTPCredProvider(ctx, cfg, envConfig.ContainerCredentialsEndpoint, envConfig.ContainerAuthorizationToken, configs) - } - return ctx, fmt.Errorf("EcsContainer was specified as the credential_source, but neither 'AWS_CONTAINER_CREDENTIALS_RELATIVE_URI' or AWS_CONTAINER_CREDENTIALS_FULL_URI' was set") - - default: - return ctx, fmt.Errorf("credential_source values must be EcsContainer, Ec2InstanceMetadata, or Environment") - } - - return ctx, nil -} - -func resolveEC2RoleCredentials(ctx context.Context, cfg *aws.Config, configs configs) error { - optFns := make([]func(*ec2rolecreds.Options), 0, 2) - - optFn, found, err := getEC2RoleCredentialProviderOptions(ctx, configs) - if err != nil { - return err - } - if found { - optFns = append(optFns, optFn) - } - - optFns = append(optFns, func(o *ec2rolecreds.Options) { - // Only define a client from config if not already defined. - if o.Client == nil { - o.Client = imds.NewFromConfig(*cfg) - } - o.CredentialSources = getCredentialSources(ctx) - }) - - provider := ec2rolecreds.New(optFns...) - - cfg.Credentials, err = wrapWithCredentialsCache(ctx, configs, provider) - if err != nil { - return err - } - return nil -} - -func getAWSConfigSources(cfgs configs) (*EnvConfig, *SharedConfig, configs) { - var ( - envConfig *EnvConfig - sharedConfig *SharedConfig - other configs - ) - - for i := range cfgs { - switch c := cfgs[i].(type) { - case EnvConfig: - if envConfig == nil { - envConfig = &c - } - case *EnvConfig: - if envConfig == nil { - envConfig = c - } - case SharedConfig: - if sharedConfig == nil { - sharedConfig = &c - } - case *SharedConfig: - if envConfig == nil { - sharedConfig = c - } - default: - other = append(other, c) - } - } - - if envConfig == nil { - envConfig = &EnvConfig{} - } - - if sharedConfig == nil { - sharedConfig = &SharedConfig{} - } - - return envConfig, sharedConfig, other -} - -// AssumeRoleTokenProviderNotSetError is an error returned when creating a -// session when the MFAToken option is not set when shared config is configured -// load assume a role with an MFA token. -type AssumeRoleTokenProviderNotSetError struct{} - -// Error is the error message -func (e AssumeRoleTokenProviderNotSetError) Error() string { - return fmt.Sprintf("assume role with MFA enabled, but AssumeRoleTokenProvider session option not set.") -} - -func assumeWebIdentity(ctx context.Context, cfg *aws.Config, filepath string, roleARN, sessionName string, configs configs) error { - if len(filepath) == 0 { - return fmt.Errorf("token file path is not set") - } - - optFns := []func(*stscreds.WebIdentityRoleOptions){ - func(options *stscreds.WebIdentityRoleOptions) { - options.RoleSessionName = sessionName - }, - } - - optFn, found, err := getWebIdentityCredentialProviderOptions(ctx, configs) - if err != nil { - return err - } - - if found { - optFns = append(optFns, optFn) - } - - opts := stscreds.WebIdentityRoleOptions{ - RoleARN: roleARN, - } - - optFns = append(optFns, func(options *stscreds.WebIdentityRoleOptions) { - options.CredentialSources = getCredentialSources(ctx) - }) - - for _, fn := range optFns { - fn(&opts) - } - - if len(opts.RoleARN) == 0 { - return fmt.Errorf("role ARN is not set") - } - - client := opts.Client - if client == nil { - client = sts.NewFromConfig(*cfg) - } - - provider := stscreds.NewWebIdentityRoleProvider(client, roleARN, stscreds.IdentityTokenFile(filepath), optFns...) - - cfg.Credentials = provider - - return nil -} - -func credsFromAssumeRole(ctx context.Context, cfg *aws.Config, sharedCfg *SharedConfig, configs configs) (err error) { - // resolve credentials early - credentialSources := getCredentialSources(ctx) - optFns := []func(*stscreds.AssumeRoleOptions){ - func(options *stscreds.AssumeRoleOptions) { - options.RoleSessionName = sharedCfg.RoleSessionName - if sharedCfg.RoleDurationSeconds != nil { - if *sharedCfg.RoleDurationSeconds/time.Minute > 15 { - options.Duration = *sharedCfg.RoleDurationSeconds - } - } - // Assume role with external ID - if len(sharedCfg.ExternalID) > 0 { - options.ExternalID = aws.String(sharedCfg.ExternalID) - } - - // Assume role with MFA - if len(sharedCfg.MFASerial) != 0 { - options.SerialNumber = aws.String(sharedCfg.MFASerial) - } - - // add existing credential chain - options.CredentialSources = credentialSources - }, - } - - optFn, found, err := getAssumeRoleCredentialProviderOptions(ctx, configs) - if err != nil { - return err - } - if found { - optFns = append(optFns, optFn) - } - - { - // Synthesize options early to validate configuration errors sooner to ensure a token provider - // is present if the SerialNumber was set. - var o stscreds.AssumeRoleOptions - for _, fn := range optFns { - fn(&o) - } - if o.TokenProvider == nil && o.SerialNumber != nil { - return AssumeRoleTokenProviderNotSetError{} - } - } - cfg.Credentials = stscreds.NewAssumeRoleProvider(sts.NewFromConfig(*cfg), sharedCfg.RoleARN, optFns...) - - return nil -} - -// wrapWithCredentialsCache will wrap provider with an aws.CredentialsCache -// with the provided options if the provider is not already a -// aws.CredentialsCache. -func wrapWithCredentialsCache( - ctx context.Context, - cfgs configs, - provider aws.CredentialsProvider, - optFns ...func(options *aws.CredentialsCacheOptions), -) (aws.CredentialsProvider, error) { - _, ok := provider.(*aws.CredentialsCache) - if ok { - return provider, nil - } - - credCacheOptions, optionsFound, err := getCredentialsCacheOptionsProvider(ctx, cfgs) - if err != nil { - return nil, err - } - - // force allocation of a new slice if the additional options are - // needed, to prevent overwriting the passed in slice of options. - optFns = optFns[:len(optFns):len(optFns)] - if optionsFound { - optFns = append(optFns, credCacheOptions) - } - - return aws.NewCredentialsCache(provider, optFns...), nil -} - -// credentialSource stores the chain of providers that was used to create an instance of -// a credentials provider on the context -type credentialSource struct{} - -func addCredentialSource(ctx context.Context, source aws.CredentialSource) context.Context { - existing, ok := ctx.Value(credentialSource{}).([]aws.CredentialSource) - if !ok { - existing = []aws.CredentialSource{source} - } else { - existing = append(existing, source) - } - return context.WithValue(ctx, credentialSource{}, existing) -} - -func getCredentialSources(ctx context.Context) []aws.CredentialSource { - return ctx.Value(credentialSource{}).([]aws.CredentialSource) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go deleted file mode 100644 index 97be3f7569..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/config/shared_config.go +++ /dev/null @@ -1,1696 +0,0 @@ -package config - -import ( - "bytes" - "context" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - "github.com/aws/aws-sdk-go-v2/internal/ini" - "github.com/aws/aws-sdk-go-v2/internal/shareddefaults" - "github.com/aws/smithy-go/logging" - smithyrequestcompression "github.com/aws/smithy-go/private/requestcompression" -) - -const ( - // Prefix to use for filtering profiles. The profile prefix should only - // exist in the shared config file, not the credentials file. - profilePrefix = `profile ` - - // Prefix to be used for SSO sections. These are supposed to only exist in - // the shared config file, not the credentials file. - ssoSectionPrefix = `sso-session ` - - // Prefix for services section. It is referenced in profile via the services - // parameter to configure clients for service-specific parameters. - servicesPrefix = `services ` - - // string equivalent for boolean - endpointDiscoveryDisabled = `false` - endpointDiscoveryEnabled = `true` - endpointDiscoveryAuto = `auto` - - // Static Credentials group - accessKeyIDKey = `aws_access_key_id` // group required - secretAccessKey = `aws_secret_access_key` // group required - sessionTokenKey = `aws_session_token` // optional - - // Assume Role Credentials group - roleArnKey = `role_arn` // group required - sourceProfileKey = `source_profile` // group required - credentialSourceKey = `credential_source` // group required (or source_profile) - externalIDKey = `external_id` // optional - mfaSerialKey = `mfa_serial` // optional - roleSessionNameKey = `role_session_name` // optional - roleDurationSecondsKey = "duration_seconds" // optional - - // AWS Single Sign-On (AWS SSO) group - ssoSessionNameKey = "sso_session" - - ssoRegionKey = "sso_region" - ssoStartURLKey = "sso_start_url" - - ssoAccountIDKey = "sso_account_id" - ssoRoleNameKey = "sso_role_name" - - // Additional Config fields - regionKey = `region` - - // endpoint discovery group - enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional - - // External Credential process - credentialProcessKey = `credential_process` // optional - - // Web Identity Token File - webIdentityTokenFileKey = `web_identity_token_file` // optional - - // S3 ARN Region Usage - s3UseARNRegionKey = "s3_use_arn_region" - - ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode" - - ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint" - - ec2MetadataV1DisabledKey = "ec2_metadata_v1_disabled" - - // Use DualStack Endpoint Resolution - useDualStackEndpoint = "use_dualstack_endpoint" - - // DefaultSharedConfigProfile is the default profile to be used when - // loading configuration from the config files if another profile name - // is not provided. - DefaultSharedConfigProfile = `default` - - // S3 Disable Multi-Region AccessPoints - s3DisableMultiRegionAccessPointsKey = `s3_disable_multiregion_access_points` - - useFIPSEndpointKey = "use_fips_endpoint" - - defaultsModeKey = "defaults_mode" - - // Retry options - retryMaxAttemptsKey = "max_attempts" - retryModeKey = "retry_mode" - - caBundleKey = "ca_bundle" - - sdkAppID = "sdk_ua_app_id" - - ignoreConfiguredEndpoints = "ignore_configured_endpoint_urls" - - endpointURL = "endpoint_url" - - servicesSectionKey = "services" - - disableRequestCompression = "disable_request_compression" - requestMinCompressionSizeBytes = "request_min_compression_size_bytes" - - s3DisableExpressSessionAuthKey = "s3_disable_express_session_auth" - - accountIDKey = "aws_account_id" - accountIDEndpointMode = "account_id_endpoint_mode" - - requestChecksumCalculationKey = "request_checksum_calculation" - responseChecksumValidationKey = "response_checksum_validation" - checksumWhenSupported = "when_supported" - checksumWhenRequired = "when_required" - - authSchemePreferenceKey = "auth_scheme_preference" -) - -// defaultSharedConfigProfile allows for swapping the default profile for testing -var defaultSharedConfigProfile = DefaultSharedConfigProfile - -// DefaultSharedCredentialsFilename returns the SDK's default file path -// for the shared credentials file. -// -// Builds the shared config file path based on the OS's platform. -// -// - Linux/Unix: $HOME/.aws/credentials -// - Windows: %USERPROFILE%\.aws\credentials -func DefaultSharedCredentialsFilename() string { - return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "credentials") -} - -// DefaultSharedConfigFilename returns the SDK's default file path for -// the shared config file. -// -// Builds the shared config file path based on the OS's platform. -// -// - Linux/Unix: $HOME/.aws/config -// - Windows: %USERPROFILE%\.aws\config -func DefaultSharedConfigFilename() string { - return filepath.Join(shareddefaults.UserHomeDir(), ".aws", "config") -} - -// DefaultSharedConfigFiles is a slice of the default shared config files that -// the will be used in order to load the SharedConfig. -var DefaultSharedConfigFiles = []string{ - DefaultSharedConfigFilename(), -} - -// DefaultSharedCredentialsFiles is a slice of the default shared credentials -// files that the will be used in order to load the SharedConfig. -var DefaultSharedCredentialsFiles = []string{ - DefaultSharedCredentialsFilename(), -} - -// SSOSession provides the shared configuration parameters of the sso-session -// section. -type SSOSession struct { - Name string - SSORegion string - SSOStartURL string -} - -func (s *SSOSession) setFromIniSection(section ini.Section) { - updateString(&s.Name, section, ssoSessionNameKey) - updateString(&s.SSORegion, section, ssoRegionKey) - updateString(&s.SSOStartURL, section, ssoStartURLKey) -} - -// Services contains values configured in the services section -// of the AWS configuration file. -type Services struct { - // Services section values - // {"serviceId": {"key": "value"}} - // e.g. {"s3": {"endpoint_url": "example.com"}} - ServiceValues map[string]map[string]string -} - -func (s *Services) setFromIniSection(section ini.Section) { - if s.ServiceValues == nil { - s.ServiceValues = make(map[string]map[string]string) - } - for _, service := range section.List() { - s.ServiceValues[service] = section.Map(service) - } -} - -// SharedConfig represents the configuration fields of the SDK config files. -type SharedConfig struct { - Profile string - - // Credentials values from the config file. Both aws_access_key_id - // and aws_secret_access_key must be provided together in the same file - // to be considered valid. The values will be ignored if not a complete group. - // aws_session_token is an optional field that can be provided if both of the - // other two fields are also provided. - // - // aws_access_key_id - // aws_secret_access_key - // aws_session_token - Credentials aws.Credentials - - CredentialSource string - CredentialProcess string - WebIdentityTokenFile string - - // SSO session options - SSOSessionName string - SSOSession *SSOSession - - // Legacy SSO session options - SSORegion string - SSOStartURL string - - // SSO fields not used - SSOAccountID string - SSORoleName string - - RoleARN string - ExternalID string - MFASerial string - RoleSessionName string - RoleDurationSeconds *time.Duration - - SourceProfileName string - Source *SharedConfig - - // Region is the region the SDK should use for looking up AWS service endpoints - // and signing requests. - // - // region = us-west-2 - Region string - - // EnableEndpointDiscovery can be enabled or disabled in the shared config - // by setting endpoint_discovery_enabled to true, or false respectively. - // - // endpoint_discovery_enabled = true - EnableEndpointDiscovery aws.EndpointDiscoveryEnableState - - // Specifies if the S3 service should allow ARNs to direct the region - // the client's requests are sent to. - // - // s3_use_arn_region=true - S3UseARNRegion *bool - - // Specifies the EC2 Instance Metadata Service default endpoint selection - // mode (IPv4 or IPv6) - // - // ec2_metadata_service_endpoint_mode=IPv6 - EC2IMDSEndpointMode imds.EndpointModeState - - // Specifies the EC2 Instance Metadata Service endpoint to use. If - // specified it overrides EC2IMDSEndpointMode. - // - // ec2_metadata_service_endpoint=http://fd00:ec2::254 - EC2IMDSEndpoint string - - // Specifies that IMDS clients should not fallback to IMDSv1 if token - // requests fail. - // - // ec2_metadata_v1_disabled=true - EC2IMDSv1Disabled *bool - - // Specifies if the S3 service should disable support for Multi-Region - // access-points - // - // s3_disable_multiregion_access_points=true - S3DisableMultiRegionAccessPoints *bool - - // Specifies that SDK clients must resolve a dual-stack endpoint for - // services. - // - // use_dualstack_endpoint=true - UseDualStackEndpoint aws.DualStackEndpointState - - // Specifies that SDK clients must resolve a FIPS endpoint for - // services. - // - // use_fips_endpoint=true - UseFIPSEndpoint aws.FIPSEndpointState - - // Specifies which defaults mode should be used by services. - // - // defaults_mode=standard - DefaultsMode aws.DefaultsMode - - // Specifies the maximum number attempts an API client will call an - // operation that fails with a retryable error. - // - // max_attempts=3 - RetryMaxAttempts int - - // Specifies the retry model the API client will be created with. - // - // retry_mode=standard - RetryMode aws.RetryMode - - // Sets the path to a custom Credentials Authority (CA) Bundle PEM file - // that the SDK will use instead of the system's root CA bundle. Only use - // this if you want to configure the SDK to use a custom set of CAs. - // - // Enabling this option will attempt to merge the Transport into the SDK's - // HTTP client. If the client's Transport is not a http.Transport an error - // will be returned. If the Transport's TLS config is set this option will - // cause the SDK to overwrite the Transport's TLS config's RootCAs value. - // - // Setting a custom HTTPClient in the aws.Config options will override this - // setting. To use this option and custom HTTP client, the HTTP client - // needs to be provided when creating the config. Not the service client. - // - // ca_bundle=$HOME/my_custom_ca_bundle - CustomCABundle string - - // aws sdk app ID that can be added to user agent header string - AppID string - - // Flag used to disable configured endpoints. - IgnoreConfiguredEndpoints *bool - - // Value to contain configured endpoints to be propagated to - // corresponding endpoint resolution field. - BaseEndpoint string - - // Services section config. - ServicesSectionName string - Services Services - - // determine if request compression is allowed, default to false - // retrieved from config file's profile field disable_request_compression - DisableRequestCompression *bool - - // inclusive threshold request body size to trigger compression, - // default to 10240 and must be within 0 and 10485760 bytes inclusive - // retrieved from config file's profile field request_min_compression_size_bytes - RequestMinCompressSizeBytes *int64 - - // Whether S3Express auth is disabled. - // - // This will NOT prevent requests from being made to S3Express buckets, it - // will only bypass the modified endpoint routing and signing behaviors - // associated with the feature. - S3DisableExpressAuth *bool - - AccountIDEndpointMode aws.AccountIDEndpointMode - - // RequestChecksumCalculation indicates if the request checksum should be calculated - RequestChecksumCalculation aws.RequestChecksumCalculation - - // ResponseChecksumValidation indicates if the response checksum should be validated - ResponseChecksumValidation aws.ResponseChecksumValidation - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -func (c SharedConfig) getDefaultsMode(ctx context.Context) (value aws.DefaultsMode, ok bool, err error) { - if len(c.DefaultsMode) == 0 { - return "", false, nil - } - - return c.DefaultsMode, true, nil -} - -// GetRetryMaxAttempts returns the maximum number of attempts an API client -// created Retryer should attempt an operation call before failing. -func (c SharedConfig) GetRetryMaxAttempts(ctx context.Context) (value int, ok bool, err error) { - if c.RetryMaxAttempts == 0 { - return 0, false, nil - } - - return c.RetryMaxAttempts, true, nil -} - -// GetRetryMode returns the model the API client should create its Retryer in. -func (c SharedConfig) GetRetryMode(ctx context.Context) (value aws.RetryMode, ok bool, err error) { - if len(c.RetryMode) == 0 { - return "", false, nil - } - - return c.RetryMode, true, nil -} - -// GetS3UseARNRegion returns if the S3 service should allow ARNs to direct the region -// the client's requests are sent to. -func (c SharedConfig) GetS3UseARNRegion(ctx context.Context) (value, ok bool, err error) { - if c.S3UseARNRegion == nil { - return false, false, nil - } - - return *c.S3UseARNRegion, true, nil -} - -// GetEnableEndpointDiscovery returns if the enable_endpoint_discovery is set. -func (c SharedConfig) GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, ok bool, err error) { - if c.EnableEndpointDiscovery == aws.EndpointDiscoveryUnset { - return aws.EndpointDiscoveryUnset, false, nil - } - - return c.EnableEndpointDiscovery, true, nil -} - -// GetS3DisableMultiRegionAccessPoints returns if the S3 service should disable support for Multi-Region -// access-points. -func (c SharedConfig) GetS3DisableMultiRegionAccessPoints(ctx context.Context) (value, ok bool, err error) { - if c.S3DisableMultiRegionAccessPoints == nil { - return false, false, nil - } - - return *c.S3DisableMultiRegionAccessPoints, true, nil -} - -// GetRegion returns the region for the profile if a region is set. -func (c SharedConfig) getRegion(ctx context.Context) (string, bool, error) { - if len(c.Region) == 0 { - return "", false, nil - } - return c.Region, true, nil -} - -// GetCredentialsProvider returns the credentials for a profile if they were set. -func (c SharedConfig) getCredentialsProvider() (aws.Credentials, bool, error) { - return c.Credentials, true, nil -} - -// GetEC2IMDSEndpointMode implements a EC2IMDSEndpointMode option resolver interface. -func (c SharedConfig) GetEC2IMDSEndpointMode() (imds.EndpointModeState, bool, error) { - if c.EC2IMDSEndpointMode == imds.EndpointModeStateUnset { - return imds.EndpointModeStateUnset, false, nil - } - - return c.EC2IMDSEndpointMode, true, nil -} - -// GetEC2IMDSEndpoint implements a EC2IMDSEndpoint option resolver interface. -func (c SharedConfig) GetEC2IMDSEndpoint() (string, bool, error) { - if len(c.EC2IMDSEndpoint) == 0 { - return "", false, nil - } - - return c.EC2IMDSEndpoint, true, nil -} - -// GetEC2IMDSV1FallbackDisabled implements an EC2IMDSV1FallbackDisabled option -// resolver interface. -func (c SharedConfig) GetEC2IMDSV1FallbackDisabled() (bool, bool) { - if c.EC2IMDSv1Disabled == nil { - return false, false - } - - return *c.EC2IMDSv1Disabled, true -} - -// GetUseDualStackEndpoint returns whether the service's dual-stack endpoint should be -// used for requests. -func (c SharedConfig) GetUseDualStackEndpoint(ctx context.Context) (value aws.DualStackEndpointState, found bool, err error) { - if c.UseDualStackEndpoint == aws.DualStackEndpointStateUnset { - return aws.DualStackEndpointStateUnset, false, nil - } - - return c.UseDualStackEndpoint, true, nil -} - -// GetUseFIPSEndpoint returns whether the service's FIPS endpoint should be -// used for requests. -func (c SharedConfig) GetUseFIPSEndpoint(ctx context.Context) (value aws.FIPSEndpointState, found bool, err error) { - if c.UseFIPSEndpoint == aws.FIPSEndpointStateUnset { - return aws.FIPSEndpointStateUnset, false, nil - } - - return c.UseFIPSEndpoint, true, nil -} - -// GetS3DisableExpressAuth returns the configured value for -// [SharedConfig.S3DisableExpressAuth]. -func (c SharedConfig) GetS3DisableExpressAuth() (value, ok bool) { - if c.S3DisableExpressAuth == nil { - return false, false - } - - return *c.S3DisableExpressAuth, true -} - -// GetCustomCABundle returns the custom CA bundle's PEM bytes if the file was -func (c SharedConfig) getCustomCABundle(context.Context) (io.Reader, bool, error) { - if len(c.CustomCABundle) == 0 { - return nil, false, nil - } - - b, err := ioutil.ReadFile(c.CustomCABundle) - if err != nil { - return nil, false, err - } - return bytes.NewReader(b), true, nil -} - -// getAppID returns the sdk app ID if set in shared config profile -func (c SharedConfig) getAppID(context.Context) (string, bool, error) { - return c.AppID, len(c.AppID) > 0, nil -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func (c SharedConfig) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { - if c.IgnoreConfiguredEndpoints == nil { - return false, false, nil - } - - return *c.IgnoreConfiguredEndpoints, true, nil -} - -func (c SharedConfig) getBaseEndpoint(context.Context) (string, bool, error) { - return c.BaseEndpoint, len(c.BaseEndpoint) > 0, nil -} - -// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use -// with configured endpoints. -func (c SharedConfig) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { - if service, ok := c.Services.ServiceValues[normalizeShared(sdkID)]; ok { - if endpt, ok := service[endpointURL]; ok { - return endpt, true, nil - } - } - return "", false, nil -} - -func normalizeShared(sdkID string) string { - lower := strings.ToLower(sdkID) - return strings.ReplaceAll(lower, " ", "_") -} - -func (c SharedConfig) getServicesObject(context.Context) (map[string]map[string]string, bool, error) { - return c.Services.ServiceValues, c.Services.ServiceValues != nil, nil -} - -// loadSharedConfigIgnoreNotExist is an alias for loadSharedConfig with the -// addition of ignoring when none of the files exist or when the profile -// is not found in any of the files. -func loadSharedConfigIgnoreNotExist(ctx context.Context, configs configs) (Config, error) { - cfg, err := loadSharedConfig(ctx, configs) - if err != nil { - if _, ok := err.(SharedConfigProfileNotExistError); ok { - return SharedConfig{}, nil - } - return nil, err - } - - return cfg, nil -} - -// loadSharedConfig uses the configs passed in to load the SharedConfig from file -// The file names and profile name are sourced from the configs. -// -// If profile name is not provided DefaultSharedConfigProfile (default) will -// be used. -// -// If shared config filenames are not provided DefaultSharedConfigFiles will -// be used. -// -// Config providers used: -// * sharedConfigProfileProvider -// * sharedConfigFilesProvider -func loadSharedConfig(ctx context.Context, configs configs) (Config, error) { - var profile string - var configFiles []string - var credentialsFiles []string - var ok bool - var err error - - profile, ok, err = getSharedConfigProfile(ctx, configs) - if err != nil { - return nil, err - } - if !ok { - profile = defaultSharedConfigProfile - } - - configFiles, ok, err = getSharedConfigFiles(ctx, configs) - if err != nil { - return nil, err - } - - credentialsFiles, ok, err = getSharedCredentialsFiles(ctx, configs) - if err != nil { - return nil, err - } - - // setup logger if log configuration warning is seti - var logger logging.Logger - logWarnings, found, err := getLogConfigurationWarnings(ctx, configs) - if err != nil { - return SharedConfig{}, err - } - if found && logWarnings { - logger, found, err = getLogger(ctx, configs) - if err != nil { - return SharedConfig{}, err - } - if !found { - logger = logging.NewStandardLogger(os.Stderr) - } - } - - return LoadSharedConfigProfile(ctx, profile, - func(o *LoadSharedConfigOptions) { - o.Logger = logger - o.ConfigFiles = configFiles - o.CredentialsFiles = credentialsFiles - }, - ) -} - -// LoadSharedConfigOptions struct contains optional values that can be used to load the config. -type LoadSharedConfigOptions struct { - - // CredentialsFiles are the shared credentials files - CredentialsFiles []string - - // ConfigFiles are the shared config files - ConfigFiles []string - - // Logger is the logger used to log shared config behavior - Logger logging.Logger -} - -// LoadSharedConfigProfile retrieves the configuration from the list of files -// using the profile provided. The order the files are listed will determine -// precedence. Values in subsequent files will overwrite values defined in -// earlier files. -// -// For example, given two files A and B. Both define credentials. If the order -// of the files are A then B, B's credential values will be used instead of A's. -// -// If config files are not set, SDK will default to using a file at location `.aws/config` if present. -// If credentials files are not set, SDK will default to using a file at location `.aws/credentials` if present. -// No default files are set, if files set to an empty slice. -// -// You can read more about shared config and credentials file location at -// https://docs.aws.amazon.com/credref/latest/refdocs/file-location.html#file-location -func LoadSharedConfigProfile(ctx context.Context, profile string, optFns ...func(*LoadSharedConfigOptions)) (SharedConfig, error) { - var option LoadSharedConfigOptions - for _, fn := range optFns { - fn(&option) - } - - if option.ConfigFiles == nil { - option.ConfigFiles = DefaultSharedConfigFiles - } - - if option.CredentialsFiles == nil { - option.CredentialsFiles = DefaultSharedCredentialsFiles - } - - // load shared configuration sections from shared configuration INI options - configSections, err := loadIniFiles(option.ConfigFiles) - if err != nil { - return SharedConfig{}, err - } - - // check for profile prefix and drop duplicates or invalid profiles - err = processConfigSections(ctx, &configSections, option.Logger) - if err != nil { - return SharedConfig{}, err - } - - // load shared credentials sections from shared credentials INI options - credentialsSections, err := loadIniFiles(option.CredentialsFiles) - if err != nil { - return SharedConfig{}, err - } - - // check for profile prefix and drop duplicates or invalid profiles - err = processCredentialsSections(ctx, &credentialsSections, option.Logger) - if err != nil { - return SharedConfig{}, err - } - - err = mergeSections(&configSections, credentialsSections) - if err != nil { - return SharedConfig{}, err - } - - cfg := SharedConfig{} - profiles := map[string]struct{}{} - - if err = cfg.setFromIniSections(profiles, profile, configSections, option.Logger); err != nil { - return SharedConfig{}, err - } - - return cfg, nil -} - -func processConfigSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error { - skipSections := map[string]struct{}{} - - for _, section := range sections.List() { - if _, ok := skipSections[section]; ok { - continue - } - - // drop sections from config file that do not have expected prefixes. - switch { - case strings.HasPrefix(section, profilePrefix): - // Rename sections to remove "profile " prefixing to match with - // credentials file. If default is already present, it will be - // dropped. - newName, err := renameProfileSection(section, sections, logger) - if err != nil { - return fmt.Errorf("failed to rename profile section, %w", err) - } - skipSections[newName] = struct{}{} - - case strings.HasPrefix(section, ssoSectionPrefix): - case strings.HasPrefix(section, servicesPrefix): - case strings.EqualFold(section, "default"): - default: - // drop this section, as invalid profile name - sections.DeleteSection(section) - - if logger != nil { - logger.Logf(logging.Debug, "A profile defined with name `%v` is ignored. "+ - "For use within a shared configuration file, "+ - "a non-default profile must have `profile ` "+ - "prefixed to the profile name.", - section, - ) - } - } - } - return nil -} - -func renameProfileSection(section string, sections *ini.Sections, logger logging.Logger) (string, error) { - v, ok := sections.GetSection(section) - if !ok { - return "", fmt.Errorf("error processing profiles within the shared configuration files") - } - - // delete section with profile as prefix - sections.DeleteSection(section) - - // set the value to non-prefixed name in sections. - section = strings.TrimPrefix(section, profilePrefix) - if sections.HasSection(section) { - oldSection, _ := sections.GetSection(section) - v.Logs = append(v.Logs, - fmt.Sprintf("A non-default profile not prefixed with `profile ` found in %s, "+ - "overriding non-default profile from %s", - v.SourceFile, oldSection.SourceFile)) - sections.DeleteSection(section) - } - - // assign non-prefixed name to section - v.Name = section - sections.SetSection(section, v) - - return section, nil -} - -func processCredentialsSections(ctx context.Context, sections *ini.Sections, logger logging.Logger) error { - for _, section := range sections.List() { - // drop profiles with prefix for credential files - if strings.HasPrefix(section, profilePrefix) { - // drop this section, as invalid profile name - sections.DeleteSection(section) - - if logger != nil { - logger.Logf(logging.Debug, - "The profile defined with name `%v` is ignored. A profile with the `profile ` prefix is invalid "+ - "for the shared credentials file.\n", - section, - ) - } - } - } - return nil -} - -func loadIniFiles(filenames []string) (ini.Sections, error) { - mergedSections := ini.NewSections() - - for _, filename := range filenames { - sections, err := ini.OpenFile(filename) - var v *ini.UnableToReadFile - if ok := errors.As(err, &v); ok { - // Skip files which can't be opened and read for whatever reason. - // We treat such files as empty, and do not fall back to other locations. - continue - } else if err != nil { - return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err} - } - - // mergeSections into mergedSections - err = mergeSections(&mergedSections, sections) - if err != nil { - return ini.Sections{}, SharedConfigLoadError{Filename: filename, Err: err} - } - } - - return mergedSections, nil -} - -// mergeSections merges source section properties into destination section properties -func mergeSections(dst *ini.Sections, src ini.Sections) error { - for _, sectionName := range src.List() { - srcSection, _ := src.GetSection(sectionName) - - if (!srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey)) || - (srcSection.Has(accessKeyIDKey) && !srcSection.Has(secretAccessKey)) { - srcSection.Errors = append(srcSection.Errors, - fmt.Errorf("partial credentials found for profile %v", sectionName)) - } - - if !dst.HasSection(sectionName) { - dst.SetSection(sectionName, srcSection) - continue - } - - // merge with destination srcSection - dstSection, _ := dst.GetSection(sectionName) - - // errors should be overriden if any - dstSection.Errors = srcSection.Errors - - // Access key id update - if srcSection.Has(accessKeyIDKey) && srcSection.Has(secretAccessKey) { - accessKey := srcSection.String(accessKeyIDKey) - secretKey := srcSection.String(secretAccessKey) - - if dstSection.Has(accessKeyIDKey) { - dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, accessKeyIDKey, - dstSection.SourceFile[accessKeyIDKey], srcSection.SourceFile[accessKeyIDKey])) - } - - // update access key - v, err := ini.NewStringValue(accessKey) - if err != nil { - return fmt.Errorf("error merging access key, %w", err) - } - dstSection.UpdateValue(accessKeyIDKey, v) - - // update secret key - v, err = ini.NewStringValue(secretKey) - if err != nil { - return fmt.Errorf("error merging secret key, %w", err) - } - dstSection.UpdateValue(secretAccessKey, v) - - // update session token - if err = mergeStringKey(&srcSection, &dstSection, sectionName, sessionTokenKey); err != nil { - return err - } - - // update source file to reflect where the static creds came from - dstSection.UpdateSourceFile(accessKeyIDKey, srcSection.SourceFile[accessKeyIDKey]) - dstSection.UpdateSourceFile(secretAccessKey, srcSection.SourceFile[secretAccessKey]) - } - - stringKeys := []string{ - roleArnKey, - sourceProfileKey, - credentialSourceKey, - externalIDKey, - mfaSerialKey, - roleSessionNameKey, - regionKey, - enableEndpointDiscoveryKey, - credentialProcessKey, - webIdentityTokenFileKey, - s3UseARNRegionKey, - s3DisableMultiRegionAccessPointsKey, - ec2MetadataServiceEndpointModeKey, - ec2MetadataServiceEndpointKey, - ec2MetadataV1DisabledKey, - useDualStackEndpoint, - useFIPSEndpointKey, - defaultsModeKey, - retryModeKey, - caBundleKey, - roleDurationSecondsKey, - retryMaxAttemptsKey, - - ssoSessionNameKey, - ssoAccountIDKey, - ssoRegionKey, - ssoRoleNameKey, - ssoStartURLKey, - - authSchemePreferenceKey, - } - for i := range stringKeys { - if err := mergeStringKey(&srcSection, &dstSection, sectionName, stringKeys[i]); err != nil { - return err - } - } - - // set srcSection on dst srcSection - *dst = dst.SetSection(sectionName, dstSection) - } - - return nil -} - -func mergeStringKey(srcSection *ini.Section, dstSection *ini.Section, sectionName, key string) error { - if srcSection.Has(key) { - srcValue := srcSection.String(key) - val, err := ini.NewStringValue(srcValue) - if err != nil { - return fmt.Errorf("error merging %s, %w", key, err) - } - - if dstSection.Has(key) { - dstSection.Logs = append(dstSection.Logs, newMergeKeyLogMessage(sectionName, key, - dstSection.SourceFile[key], srcSection.SourceFile[key])) - } - - dstSection.UpdateValue(key, val) - dstSection.UpdateSourceFile(key, srcSection.SourceFile[key]) - } - return nil -} - -func newMergeKeyLogMessage(sectionName, key, dstSourceFile, srcSourceFile string) string { - return fmt.Sprintf("For profile: %v, overriding %v value, defined in %v "+ - "with a %v value found in a duplicate profile defined at file %v. \n", - sectionName, key, dstSourceFile, key, srcSourceFile) -} - -// Returns an error if all of the files fail to load. If at least one file is -// successfully loaded and contains the profile, no error will be returned. -func (c *SharedConfig) setFromIniSections(profiles map[string]struct{}, profile string, - sections ini.Sections, logger logging.Logger) error { - c.Profile = profile - - section, ok := sections.GetSection(profile) - if !ok { - return SharedConfigProfileNotExistError{ - Profile: profile, - } - } - - // if logs are appended to the section, log them - if section.Logs != nil && logger != nil { - for _, log := range section.Logs { - logger.Logf(logging.Debug, log) - } - } - - // set config from the provided INI section - err := c.setFromIniSection(profile, section) - if err != nil { - return fmt.Errorf("error fetching config from profile, %v, %w", profile, err) - } - - if _, ok := profiles[profile]; ok { - // if this is the second instance of the profile the Assume Role - // options must be cleared because they are only valid for the - // first reference of a profile. The self linked instance of the - // profile only have credential provider options. - c.clearAssumeRoleOptions() - } else { - // First time a profile has been seen. Assert if the credential type - // requires a role ARN, the ARN is also set - if err := c.validateCredentialsConfig(profile); err != nil { - return err - } - } - - // if not top level profile and has credentials, return with credentials. - if len(profiles) != 0 && c.Credentials.HasKeys() { - return nil - } - - profiles[profile] = struct{}{} - - // validate no colliding credentials type are present - if err := c.validateCredentialType(); err != nil { - return err - } - - // Link source profiles for assume roles - if len(c.SourceProfileName) != 0 { - // Linked profile via source_profile ignore credential provider - // options, the source profile must provide the credentials. - c.clearCredentialOptions() - - srcCfg := &SharedConfig{} - err := srcCfg.setFromIniSections(profiles, c.SourceProfileName, sections, logger) - if err != nil { - // SourceProfileName that doesn't exist is an error in configuration. - if _, ok := err.(SharedConfigProfileNotExistError); ok { - err = SharedConfigAssumeRoleError{ - RoleARN: c.RoleARN, - Profile: c.SourceProfileName, - Err: err, - } - } - return err - } - - if !srcCfg.hasCredentials() { - return SharedConfigAssumeRoleError{ - RoleARN: c.RoleARN, - Profile: c.SourceProfileName, - } - } - - c.Source = srcCfg - } - - // If the profile contains an SSO session parameter, the session MUST exist - // as a section in the config file. Load the SSO session using the name - // provided. If the session section is not found or incomplete an error - // will be returned. - if c.hasSSOTokenProviderConfiguration() { - section, ok := sections.GetSection(ssoSectionPrefix + strings.TrimSpace(c.SSOSessionName)) - if !ok { - return fmt.Errorf("failed to find SSO session section, %v", c.SSOSessionName) - } - var ssoSession SSOSession - ssoSession.setFromIniSection(section) - ssoSession.Name = c.SSOSessionName - c.SSOSession = &ssoSession - } - - if len(c.ServicesSectionName) > 0 { - if section, ok := sections.GetSection(servicesPrefix + c.ServicesSectionName); ok { - var svcs Services - svcs.setFromIniSection(section) - c.Services = svcs - } - } - - return nil -} - -// setFromIniSection loads the configuration from the profile section defined in -// the provided INI file. A SharedConfig pointer type value is used so that -// multiple config file loadings can be chained. -// -// Only loads complete logically grouped values, and will not set fields in cfg -// for incomplete grouped values in the config. Such as credentials. For example -// if a config file only includes aws_access_key_id but no aws_secret_access_key -// the aws_access_key_id will be ignored. -func (c *SharedConfig) setFromIniSection(profile string, section ini.Section) error { - if len(section.Name) == 0 { - sources := make([]string, 0) - for _, v := range section.SourceFile { - sources = append(sources, v) - } - - return fmt.Errorf("parsing error : could not find profile section name after processing files: %v", sources) - } - - if len(section.Errors) != 0 { - var errStatement string - for i, e := range section.Errors { - errStatement = fmt.Sprintf("%d, %v\n", i+1, e.Error()) - } - return fmt.Errorf("Error using profile: \n %v", errStatement) - } - - // Assume Role - updateString(&c.RoleARN, section, roleArnKey) - updateString(&c.ExternalID, section, externalIDKey) - updateString(&c.MFASerial, section, mfaSerialKey) - updateString(&c.RoleSessionName, section, roleSessionNameKey) - updateString(&c.SourceProfileName, section, sourceProfileKey) - updateString(&c.CredentialSource, section, credentialSourceKey) - updateString(&c.Region, section, regionKey) - - // AWS Single Sign-On (AWS SSO) - // SSO session options - updateString(&c.SSOSessionName, section, ssoSessionNameKey) - - // Legacy SSO session options - updateString(&c.SSORegion, section, ssoRegionKey) - updateString(&c.SSOStartURL, section, ssoStartURLKey) - - // SSO fields not used - updateString(&c.SSOAccountID, section, ssoAccountIDKey) - updateString(&c.SSORoleName, section, ssoRoleNameKey) - - // we're retaining a behavioral quirk with this field that existed before - // the removal of literal parsing for #2276: - // - if the key is missing, the config field will not be set - // - if the key is set to a non-numeric, the config field will be set to 0 - if section.Has(roleDurationSecondsKey) { - if v, ok := section.Int(roleDurationSecondsKey); ok { - c.RoleDurationSeconds = aws.Duration(time.Duration(v) * time.Second) - } else { - c.RoleDurationSeconds = aws.Duration(time.Duration(0)) - } - } - - updateString(&c.CredentialProcess, section, credentialProcessKey) - updateString(&c.WebIdentityTokenFile, section, webIdentityTokenFileKey) - - updateEndpointDiscoveryType(&c.EnableEndpointDiscovery, section, enableEndpointDiscoveryKey) - updateBoolPtr(&c.S3UseARNRegion, section, s3UseARNRegionKey) - updateBoolPtr(&c.S3DisableMultiRegionAccessPoints, section, s3DisableMultiRegionAccessPointsKey) - updateBoolPtr(&c.S3DisableExpressAuth, section, s3DisableExpressSessionAuthKey) - - if err := updateEC2MetadataServiceEndpointMode(&c.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %v", ec2MetadataServiceEndpointModeKey, err) - } - updateString(&c.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey) - updateBoolPtr(&c.EC2IMDSv1Disabled, section, ec2MetadataV1DisabledKey) - - updateUseDualStackEndpoint(&c.UseDualStackEndpoint, section, useDualStackEndpoint) - updateUseFIPSEndpoint(&c.UseFIPSEndpoint, section, useFIPSEndpointKey) - - if err := updateDefaultsMode(&c.DefaultsMode, section, defaultsModeKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", defaultsModeKey, err) - } - - if err := updateInt(&c.RetryMaxAttempts, section, retryMaxAttemptsKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", retryMaxAttemptsKey, err) - } - if err := updateRetryMode(&c.RetryMode, section, retryModeKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", retryModeKey, err) - } - - updateString(&c.CustomCABundle, section, caBundleKey) - - // user agent app ID added to request User-Agent header - updateString(&c.AppID, section, sdkAppID) - - updateBoolPtr(&c.IgnoreConfiguredEndpoints, section, ignoreConfiguredEndpoints) - - updateString(&c.BaseEndpoint, section, endpointURL) - - if err := updateDisableRequestCompression(&c.DisableRequestCompression, section, disableRequestCompression); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", disableRequestCompression, err) - } - if err := updateRequestMinCompressSizeBytes(&c.RequestMinCompressSizeBytes, section, requestMinCompressionSizeBytes); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", requestMinCompressionSizeBytes, err) - } - - if err := updateAIDEndpointMode(&c.AccountIDEndpointMode, section, accountIDEndpointMode); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", accountIDEndpointMode, err) - } - - if err := updateRequestChecksumCalculation(&c.RequestChecksumCalculation, section, requestChecksumCalculationKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", requestChecksumCalculationKey, err) - } - if err := updateResponseChecksumValidation(&c.ResponseChecksumValidation, section, responseChecksumValidationKey); err != nil { - return fmt.Errorf("failed to load %s from shared config, %w", responseChecksumValidationKey, err) - } - - // Shared Credentials - creds := aws.Credentials{ - AccessKeyID: section.String(accessKeyIDKey), - SecretAccessKey: section.String(secretAccessKey), - SessionToken: section.String(sessionTokenKey), - Source: fmt.Sprintf("SharedConfigCredentials: %s", section.SourceFile[accessKeyIDKey]), - AccountID: section.String(accountIDKey), - } - - if creds.HasKeys() { - c.Credentials = creds - } - - updateString(&c.ServicesSectionName, section, servicesSectionKey) - - c.AuthSchemePreference = toAuthSchemePreferenceList(section.String(authSchemePreferenceKey)) - - return nil -} - -func updateRequestMinCompressSizeBytes(bytes **int64, sec ini.Section, key string) error { - if !sec.Has(key) { - return nil - } - - v, ok := sec.Int(key) - if !ok { - return fmt.Errorf("invalid value for min request compression size bytes %s, need int64", sec.String(key)) - } - if v < 0 || v > smithyrequestcompression.MaxRequestMinCompressSizeBytes { - return fmt.Errorf("invalid range for min request compression size bytes %d, must be within 0 and 10485760 inclusively", v) - } - *bytes = new(int64) - **bytes = v - return nil -} - -func updateDisableRequestCompression(disable **bool, sec ini.Section, key string) error { - if !sec.Has(key) { - return nil - } - - v := sec.String(key) - switch { - case v == "true": - *disable = new(bool) - **disable = true - case v == "false": - *disable = new(bool) - **disable = false - default: - return fmt.Errorf("invalid value for shared config profile field, %s=%s, need true or false", key, v) - } - return nil -} - -func updateAIDEndpointMode(m *aws.AccountIDEndpointMode, sec ini.Section, key string) error { - if !sec.Has(key) { - return nil - } - - v := sec.String(key) - switch v { - case "preferred": - *m = aws.AccountIDEndpointModePreferred - case "required": - *m = aws.AccountIDEndpointModeRequired - case "disabled": - *m = aws.AccountIDEndpointModeDisabled - default: - return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be preferred/required/disabled", key, v) - } - - return nil -} - -func updateRequestChecksumCalculation(m *aws.RequestChecksumCalculation, sec ini.Section, key string) error { - if !sec.Has(key) { - return nil - } - - v := sec.String(key) - switch strings.ToLower(v) { - case checksumWhenSupported: - *m = aws.RequestChecksumCalculationWhenSupported - case checksumWhenRequired: - *m = aws.RequestChecksumCalculationWhenRequired - default: - return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be when_supported/when_required", key, v) - } - - return nil -} - -func updateResponseChecksumValidation(m *aws.ResponseChecksumValidation, sec ini.Section, key string) error { - if !sec.Has(key) { - return nil - } - - v := sec.String(key) - switch strings.ToLower(v) { - case checksumWhenSupported: - *m = aws.ResponseChecksumValidationWhenSupported - case checksumWhenRequired: - *m = aws.ResponseChecksumValidationWhenRequired - default: - return fmt.Errorf("invalid value for shared config profile field, %s=%s, must be when_supported/when_required", key, v) - } - - return nil -} - -func (c SharedConfig) getRequestMinCompressSizeBytes(ctx context.Context) (int64, bool, error) { - if c.RequestMinCompressSizeBytes == nil { - return 0, false, nil - } - return *c.RequestMinCompressSizeBytes, true, nil -} - -func (c SharedConfig) getDisableRequestCompression(ctx context.Context) (bool, bool, error) { - if c.DisableRequestCompression == nil { - return false, false, nil - } - return *c.DisableRequestCompression, true, nil -} - -func (c SharedConfig) getAccountIDEndpointMode(ctx context.Context) (aws.AccountIDEndpointMode, bool, error) { - return c.AccountIDEndpointMode, len(c.AccountIDEndpointMode) > 0, nil -} - -func (c SharedConfig) getRequestChecksumCalculation(ctx context.Context) (aws.RequestChecksumCalculation, bool, error) { - return c.RequestChecksumCalculation, c.RequestChecksumCalculation > 0, nil -} - -func (c SharedConfig) getResponseChecksumValidation(ctx context.Context) (aws.ResponseChecksumValidation, bool, error) { - return c.ResponseChecksumValidation, c.ResponseChecksumValidation > 0, nil -} - -func updateDefaultsMode(mode *aws.DefaultsMode, section ini.Section, key string) error { - if !section.Has(key) { - return nil - } - value := section.String(key) - if ok := mode.SetFromString(value); !ok { - return fmt.Errorf("invalid value: %s", value) - } - return nil -} - -func updateRetryMode(mode *aws.RetryMode, section ini.Section, key string) (err error) { - if !section.Has(key) { - return nil - } - value := section.String(key) - if *mode, err = aws.ParseRetryMode(value); err != nil { - return err - } - return nil -} - -func updateEC2MetadataServiceEndpointMode(endpointMode *imds.EndpointModeState, section ini.Section, key string) error { - if !section.Has(key) { - return nil - } - value := section.String(key) - return endpointMode.SetFromString(value) -} - -func (c *SharedConfig) validateCredentialsConfig(profile string) error { - if err := c.validateCredentialsRequireARN(profile); err != nil { - return err - } - - return nil -} - -func (c *SharedConfig) validateCredentialsRequireARN(profile string) error { - var credSource string - - switch { - case len(c.SourceProfileName) != 0: - credSource = sourceProfileKey - case len(c.CredentialSource) != 0: - credSource = credentialSourceKey - case len(c.WebIdentityTokenFile) != 0: - credSource = webIdentityTokenFileKey - } - - if len(credSource) != 0 && len(c.RoleARN) == 0 { - return CredentialRequiresARNError{ - Type: credSource, - Profile: profile, - } - } - - return nil -} - -func (c *SharedConfig) validateCredentialType() error { - // Only one or no credential type can be defined. - if !oneOrNone( - len(c.SourceProfileName) != 0, - len(c.CredentialSource) != 0, - len(c.CredentialProcess) != 0, - len(c.WebIdentityTokenFile) != 0, - ) { - return fmt.Errorf("only one credential type may be specified per profile: source profile, credential source, credential process, web identity token") - } - - return nil -} - -func (c *SharedConfig) validateSSOConfiguration() error { - if c.hasSSOTokenProviderConfiguration() { - err := c.validateSSOTokenProviderConfiguration() - if err != nil { - return err - } - return nil - } - - if c.hasLegacySSOConfiguration() { - err := c.validateLegacySSOConfiguration() - if err != nil { - return err - } - } - return nil -} - -func (c *SharedConfig) validateSSOTokenProviderConfiguration() error { - var missing []string - - if len(c.SSOSessionName) == 0 { - missing = append(missing, ssoSessionNameKey) - } - - if c.SSOSession == nil { - missing = append(missing, ssoSectionPrefix) - } else { - if len(c.SSOSession.SSORegion) == 0 { - missing = append(missing, ssoRegionKey) - } - - if len(c.SSOSession.SSOStartURL) == 0 { - missing = append(missing, ssoStartURLKey) - } - } - - if len(missing) > 0 { - return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", - c.Profile, strings.Join(missing, ", ")) - } - - if len(c.SSORegion) > 0 && c.SSORegion != c.SSOSession.SSORegion { - return fmt.Errorf("%s in profile %q must match %s in %s", ssoRegionKey, c.Profile, ssoRegionKey, ssoSectionPrefix) - } - - if len(c.SSOStartURL) > 0 && c.SSOStartURL != c.SSOSession.SSOStartURL { - return fmt.Errorf("%s in profile %q must match %s in %s", ssoStartURLKey, c.Profile, ssoStartURLKey, ssoSectionPrefix) - } - - return nil -} - -func (c *SharedConfig) validateLegacySSOConfiguration() error { - var missing []string - - if len(c.SSORegion) == 0 { - missing = append(missing, ssoRegionKey) - } - - if len(c.SSOStartURL) == 0 { - missing = append(missing, ssoStartURLKey) - } - - if len(c.SSOAccountID) == 0 { - missing = append(missing, ssoAccountIDKey) - } - - if len(c.SSORoleName) == 0 { - missing = append(missing, ssoRoleNameKey) - } - - if len(missing) > 0 { - return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", - c.Profile, strings.Join(missing, ", ")) - } - return nil -} - -func (c *SharedConfig) hasCredentials() bool { - switch { - case len(c.SourceProfileName) != 0: - case len(c.CredentialSource) != 0: - case len(c.CredentialProcess) != 0: - case len(c.WebIdentityTokenFile) != 0: - case c.hasSSOConfiguration(): - case c.Credentials.HasKeys(): - default: - return false - } - - return true -} - -func (c *SharedConfig) hasSSOConfiguration() bool { - return c.hasSSOTokenProviderConfiguration() || c.hasLegacySSOConfiguration() -} - -func (c *SharedConfig) hasSSOTokenProviderConfiguration() bool { - return len(c.SSOSessionName) > 0 -} - -func (c *SharedConfig) hasLegacySSOConfiguration() bool { - return len(c.SSORegion) > 0 || len(c.SSOAccountID) > 0 || len(c.SSOStartURL) > 0 || len(c.SSORoleName) > 0 -} - -func (c *SharedConfig) clearAssumeRoleOptions() { - c.RoleARN = "" - c.ExternalID = "" - c.MFASerial = "" - c.RoleSessionName = "" - c.SourceProfileName = "" -} - -func (c *SharedConfig) clearCredentialOptions() { - c.CredentialSource = "" - c.CredentialProcess = "" - c.WebIdentityTokenFile = "" - c.Credentials = aws.Credentials{} - c.SSOAccountID = "" - c.SSORegion = "" - c.SSORoleName = "" - c.SSOStartURL = "" -} - -// SharedConfigLoadError is an error for the shared config file failed to load. -type SharedConfigLoadError struct { - Filename string - Err error -} - -// Unwrap returns the underlying error that caused the failure. -func (e SharedConfigLoadError) Unwrap() error { - return e.Err -} - -func (e SharedConfigLoadError) Error() string { - return fmt.Sprintf("failed to load shared config file, %s, %v", e.Filename, e.Err) -} - -// SharedConfigProfileNotExistError is an error for the shared config when -// the profile was not find in the config file. -type SharedConfigProfileNotExistError struct { - Filename []string - Profile string - Err error -} - -// Unwrap returns the underlying error that caused the failure. -func (e SharedConfigProfileNotExistError) Unwrap() error { - return e.Err -} - -func (e SharedConfigProfileNotExistError) Error() string { - return fmt.Sprintf("failed to get shared config profile, %s", e.Profile) -} - -// SharedConfigAssumeRoleError is an error for the shared config when the -// profile contains assume role information, but that information is invalid -// or not complete. -type SharedConfigAssumeRoleError struct { - Profile string - RoleARN string - Err error -} - -// Unwrap returns the underlying error that caused the failure. -func (e SharedConfigAssumeRoleError) Unwrap() error { - return e.Err -} - -func (e SharedConfigAssumeRoleError) Error() string { - return fmt.Sprintf("failed to load assume role %s, of profile %s, %v", - e.RoleARN, e.Profile, e.Err) -} - -// CredentialRequiresARNError provides the error for shared config credentials -// that are incorrectly configured in the shared config or credentials file. -type CredentialRequiresARNError struct { - // type of credentials that were configured. - Type string - - // Profile name the credentials were in. - Profile string -} - -// Error satisfies the error interface. -func (e CredentialRequiresARNError) Error() string { - return fmt.Sprintf( - "credential type %s requires role_arn, profile %s", - e.Type, e.Profile, - ) -} - -func oneOrNone(bs ...bool) bool { - var count int - - for _, b := range bs { - if b { - count++ - if count > 1 { - return false - } - } - } - - return true -} - -// updateString will only update the dst with the value in the section key, key -// is present in the section. -func updateString(dst *string, section ini.Section, key string) { - if !section.Has(key) { - return - } - *dst = section.String(key) -} - -// updateInt will only update the dst with the value in the section key, key -// is present in the section. -// -// Down casts the INI integer value from a int64 to an int, which could be -// different bit size depending on platform. -func updateInt(dst *int, section ini.Section, key string) error { - if !section.Has(key) { - return nil - } - - v, ok := section.Int(key) - if !ok { - return fmt.Errorf("invalid value %s=%s, expect integer", key, section.String(key)) - } - - *dst = int(v) - return nil -} - -// updateBool will only update the dst with the value in the section key, key -// is present in the section. -func updateBool(dst *bool, section ini.Section, key string) { - if !section.Has(key) { - return - } - - // retains pre-#2276 behavior where non-bool value would resolve to false - v, _ := section.Bool(key) - *dst = v -} - -// updateBoolPtr will only update the dst with the value in the section key, -// key is present in the section. -func updateBoolPtr(dst **bool, section ini.Section, key string) { - if !section.Has(key) { - return - } - - // retains pre-#2276 behavior where non-bool value would resolve to false - v, _ := section.Bool(key) - *dst = new(bool) - **dst = v -} - -// updateEndpointDiscoveryType will only update the dst with the value in the section, if -// a valid key and corresponding EndpointDiscoveryType is found. -func updateEndpointDiscoveryType(dst *aws.EndpointDiscoveryEnableState, section ini.Section, key string) { - if !section.Has(key) { - return - } - - value := section.String(key) - if len(value) == 0 { - return - } - - switch { - case strings.EqualFold(value, endpointDiscoveryDisabled): - *dst = aws.EndpointDiscoveryDisabled - case strings.EqualFold(value, endpointDiscoveryEnabled): - *dst = aws.EndpointDiscoveryEnabled - case strings.EqualFold(value, endpointDiscoveryAuto): - *dst = aws.EndpointDiscoveryAuto - } -} - -// updateEndpointDiscoveryType will only update the dst with the value in the section, if -// a valid key and corresponding EndpointDiscoveryType is found. -func updateUseDualStackEndpoint(dst *aws.DualStackEndpointState, section ini.Section, key string) { - if !section.Has(key) { - return - } - - // retains pre-#2276 behavior where non-bool value would resolve to false - if v, _ := section.Bool(key); v { - *dst = aws.DualStackEndpointStateEnabled - } else { - *dst = aws.DualStackEndpointStateDisabled - } - - return -} - -// updateEndpointDiscoveryType will only update the dst with the value in the section, if -// a valid key and corresponding EndpointDiscoveryType is found. -func updateUseFIPSEndpoint(dst *aws.FIPSEndpointState, section ini.Section, key string) { - if !section.Has(key) { - return - } - - // retains pre-#2276 behavior where non-bool value would resolve to false - if v, _ := section.Bool(key); v { - *dst = aws.FIPSEndpointStateEnabled - } else { - *dst = aws.FIPSEndpointStateDisabled - } - - return -} - -func (c SharedConfig) getAuthSchemePreference() ([]string, bool) { - if len(c.AuthSchemePreference) > 0 { - return c.AuthSchemePreference, true - } - return nil, false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md deleted file mode 100644 index 015f24d3be..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/CHANGELOG.md +++ /dev/null @@ -1,843 +0,0 @@ -# v1.18.16 (2025-09-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.15 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.14 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.13 (2025-09-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.12 (2025-09-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.11 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.10 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.9 (2025-08-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.8 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2025-08-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.6 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2025-08-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2025-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.3 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2025-07-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.71 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.70 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.69 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.68 (2025-06-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.67 (2025-04-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.66 (2025-04-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.65 (2025-03-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.64 (2025-03-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.63 (2025-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.62 (2025-03-04.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.61 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.60 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.59 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.58 (2025-02-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.57 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.56 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.55 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.17.54 (2025-01-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.53 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.52 (2025-01-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.51 (2025-01-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.50 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.49 (2025-01-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.48 (2024-12-19) - -* **Bug Fix**: Fix improper use of printf-style functions. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.47 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.46 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.45 (2024-11-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.44 (2024-11-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.43 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.42 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.41 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.40 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.39 (2024-10-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.38 (2024-10-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.37 (2024-09-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.36 (2024-09-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.35 (2024-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.34 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.33 (2024-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.32 (2024-09-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.31 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.30 (2024-08-26) - -* **Bug Fix**: Save SSO cached token expiry in UTC to ensure cross-SDK compatibility. - -# v1.17.29 (2024-08-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.28 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.27 (2024-07-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.26 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.25 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.24 (2024-07-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.23 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.22 (2024-06-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.21 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.20 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.19 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.18 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.17 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.16 (2024-05-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.15 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.14 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.13 (2024-05-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.12 (2024-05-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.11 (2024-04-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.10 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.9 (2024-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.8 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.7 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.6 (2024-03-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.5 (2024-03-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.4 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.3 (2024-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2024-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.16 (2024-01-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.15 (2024-01-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.14 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.13 (2023-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.12 (2023-12-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.11 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.10 (2023-12-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.9 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.7 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.6 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.5 (2023-11-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.4 (2023-11-21) - -* **Bug Fix**: Don't expect error responses to have a JSON payload in the endpointcreds provider. - -# v1.16.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2023-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.1 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-11-14) - -* **Feature**: Add support for dynamic auth token from file and EKS container host in absolute/relative URIs in the HTTP credential provider. - -# v1.15.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-11-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.43 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.42 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.41 (2023-10-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.40 (2023-09-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.39 (2023-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.38 (2023-09-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.37 (2023-09-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.36 (2023-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.31 (2023-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.30 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.29 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.28 (2023-07-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.27 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.26 (2023-06-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.25 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.24 (2023-05-09) - -* No change notes available for this release. - -# v1.13.23 (2023-05-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.22 (2023-05-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.21 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.20 (2023-04-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.19 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.18 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.17 (2023-03-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.16 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.15 (2023-02-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.14 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.13 (2023-02-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.12 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.11 (2023-02-01) - -* No change notes available for this release. - -# v1.13.10 (2023-01-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.9 (2023-01-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2023-01-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2022-12-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2022-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2022-12-15) - -* **Bug Fix**: Unify logic between shared config and in finding home directory -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2022-11-22) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2022-11-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2022-11-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-11-11) - -* **Announcement**: When using the SSOTokenProvider, a previous implementation incorrectly compensated for invalid SSOTokenProvider configurations in the shared profile. This has been fixed via PR #1903 and tracked in issue #1846 -* **Feature**: Adds token refresh support (via SSOTokenProvider) when using the SSOCredentialProvider - -# v1.12.24 (2022-11-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.23 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.22 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.21 (2022-09-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.20 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.19 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.18 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.17 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.16 (2022-08-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.15 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2022-08-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.9 (2022-07-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-06-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-05-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-05-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-04-25) - -* **Feature**: Adds Duration and Policy options that can be used when creating stscreds.WebIdentityRoleProvider credentials provider. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.2 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-03-23) - -* **Feature**: Update `ec2rolecreds` package's `Provider` to implememnt support for CredentialsCache new optional caching strategy interfaces, HandleFailRefreshCredentialsCacheStrategy and AdjustExpiresByCredentialsCacheStrategy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-02-24) - -* **Feature**: Adds support for `SourceIdentity` to `stscreds.AssumeRoleProvider` [#1588](https://github.com/aws/aws-sdk-go-v2/pull/1588). Fixes [#1575](https://github.com/aws/aws-sdk-go-v2/issues/1575) -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.5 (2021-12-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.4 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.3 (2021-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.2 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-11-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.3 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-10) - -* **Documentation**: Fixes the AssumeRoleProvider's documentation for using custom TokenProviders. - -# v1.4.0 (2021-08-27) - -* **Feature**: Adds support for Tags and TransitiveTagKeys to stscreds.AssumeRoleProvider. Closes https://github.com/aws/aws-sdk-go-v2/issues/723 -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Bug Fix**: Fixed example usages of aws.CredentialsCache ([#1275](https://github.com/aws/aws-sdk-go-v2/pull/1275)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/credentials/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go deleted file mode 100644 index f6e2873ab9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -/* -Package credentials provides types for retrieving credentials from credentials sources. -*/ -package credentials diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go deleted file mode 100644 index 6ed71b42b2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/doc.go +++ /dev/null @@ -1,58 +0,0 @@ -// Package ec2rolecreds provides the credentials provider implementation for -// retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS. -// -// # Concurrency and caching -// -// The Provider is not safe to be used concurrently, and does not provide any -// caching of credentials retrieved. You should wrap the Provider with a -// `aws.CredentialsCache` to provide concurrency safety, and caching of -// credentials. -// -// # Loading credentials with the SDK's AWS Config -// -// The EC2 Instance role credentials provider will automatically be the resolved -// credential provider in the credential chain if no other credential provider is -// resolved first. -// -// To explicitly instruct the SDK's credentials resolving to use the EC2 Instance -// role for credentials, you specify a `credentials_source` property in the config -// profile the SDK will load. -// -// [default] -// credential_source = Ec2InstanceMetadata -// -// # Loading credentials with the Provider directly -// -// Another way to use the EC2 Instance role credentials provider is to create it -// directly and assign it as the credentials provider for an API client. -// -// The following example creates a credentials provider for a command, and wraps -// it with the CredentialsCache before assigning the provider to the Amazon S3 API -// client's Credentials option. -// -// provider := imds.New(imds.Options{}) -// -// // Create the service client value configured for credentials. -// svc := s3.New(s3.Options{ -// Credentials: aws.NewCredentialsCache(provider), -// }) -// -// If you need more control, you can set the configuration options on the -// credentials provider using the imds.Options type to configure the EC2 IMDS -// API Client and ExpiryWindow of the retrieved credentials. -// -// provider := imds.New(imds.Options{ -// // See imds.Options type's documentation for more options available. -// Client: imds.New(Options{ -// HTTPClient: customHTTPClient, -// }), -// -// // Modify how soon credentials expire prior to their original expiry time. -// ExpiryWindow: 5 * time.Minute, -// }) -// -// # EC2 IMDS API Client -// -// See the github.com/aws/aws-sdk-go-v2/feature/ec2/imds module for more details on -// configuring the client, and options available. -package ec2rolecreds diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go deleted file mode 100644 index a95e6c8bdd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds/provider.go +++ /dev/null @@ -1,241 +0,0 @@ -package ec2rolecreds - -import ( - "bufio" - "context" - "encoding/json" - "fmt" - "math" - "path" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/feature/ec2/imds" - sdkrand "github.com/aws/aws-sdk-go-v2/internal/rand" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// ProviderName provides a name of EC2Role provider -const ProviderName = "EC2RoleProvider" - -// GetMetadataAPIClient provides the interface for an EC2 IMDS API client for the -// GetMetadata operation. -type GetMetadataAPIClient interface { - GetMetadata(context.Context, *imds.GetMetadataInput, ...func(*imds.Options)) (*imds.GetMetadataOutput, error) -} - -// A Provider retrieves credentials from the EC2 service, and keeps track if -// those credentials are expired. -// -// The New function must be used to create the with a custom EC2 IMDS client. -// -// p := &ec2rolecreds.New(func(o *ec2rolecreds.Options{ -// o.Client = imds.New(imds.Options{/* custom options */}) -// }) -type Provider struct { - options Options -} - -// Options is a list of user settable options for setting the behavior of the Provider. -type Options struct { - // The API client that will be used by the provider to make GetMetadata API - // calls to EC2 IMDS. - // - // If nil, the provider will default to the EC2 IMDS client. - Client GetMetadataAPIClient - - // The chain of providers that was used to create this provider - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// New returns an initialized Provider value configured to retrieve -// credentials from EC2 Instance Metadata service. -func New(optFns ...func(*Options)) *Provider { - options := Options{} - - for _, fn := range optFns { - fn(&options) - } - - if options.Client == nil { - options.Client = imds.New(imds.Options{}) - } - - return &Provider{ - options: options, - } -} - -// Retrieve retrieves credentials from the EC2 service. Error will be returned -// if the request fails, or unable to extract the desired credentials. -func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - credsList, err := requestCredList(ctx, p.options.Client) - if err != nil { - return aws.Credentials{Source: ProviderName}, err - } - - if len(credsList) == 0 { - return aws.Credentials{Source: ProviderName}, - fmt.Errorf("unexpected empty EC2 IMDS role list") - } - credsName := credsList[0] - - roleCreds, err := requestCred(ctx, p.options.Client, credsName) - if err != nil { - return aws.Credentials{Source: ProviderName}, err - } - - creds := aws.Credentials{ - AccessKeyID: roleCreds.AccessKeyID, - SecretAccessKey: roleCreds.SecretAccessKey, - SessionToken: roleCreds.Token, - Source: ProviderName, - - CanExpire: true, - Expires: roleCreds.Expiration, - } - - // Cap role credentials Expires to 1 hour so they can be refreshed more - // often. Jitter will be applied credentials cache if being used. - if anHour := sdk.NowTime().Add(1 * time.Hour); creds.Expires.After(anHour) { - creds.Expires = anHour - } - - return creds, nil -} - -// HandleFailToRefresh will extend the credentials Expires time if it it is -// expired. If the credentials will not expire within the minimum time, they -// will be returned. -// -// If the credentials cannot expire, the original error will be returned. -func (p *Provider) HandleFailToRefresh(ctx context.Context, prevCreds aws.Credentials, err error) ( - aws.Credentials, error, -) { - if !prevCreds.CanExpire { - return aws.Credentials{}, err - } - - if prevCreds.Expires.After(sdk.NowTime().Add(5 * time.Minute)) { - return prevCreds, nil - } - - newCreds := prevCreds - randFloat64, err := sdkrand.CryptoRandFloat64() - if err != nil { - return aws.Credentials{}, fmt.Errorf("failed to get random float, %w", err) - } - - // Random distribution of [5,15) minutes. - expireOffset := time.Duration(randFloat64*float64(10*time.Minute)) + 5*time.Minute - newCreds.Expires = sdk.NowTime().Add(expireOffset) - - logger := middleware.GetLogger(ctx) - logger.Logf(logging.Warn, "Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted again in %v minutes.", math.Floor(expireOffset.Minutes())) - - return newCreds, nil -} - -// AdjustExpiresBy will adds the passed in duration to the passed in -// credential's Expires time, unless the time until Expires is less than 15 -// minutes. Returns the credentials, even if not updated. -func (p *Provider) AdjustExpiresBy(creds aws.Credentials, dur time.Duration) ( - aws.Credentials, error, -) { - if !creds.CanExpire { - return creds, nil - } - if creds.Expires.Before(sdk.NowTime().Add(15 * time.Minute)) { - return creds, nil - } - - creds.Expires = creds.Expires.Add(dur) - return creds, nil -} - -// ec2RoleCredRespBody provides the shape for unmarshaling credential -// request responses. -type ec2RoleCredRespBody struct { - // Success State - Expiration time.Time - AccessKeyID string - SecretAccessKey string - Token string - - // Error state - Code string - Message string -} - -const iamSecurityCredsPath = "/iam/security-credentials/" - -// requestCredList requests a list of credentials from the EC2 service. If -// there are no credentials, or there is an error making or receiving the -// request -func requestCredList(ctx context.Context, client GetMetadataAPIClient) ([]string, error) { - resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{ - Path: iamSecurityCredsPath, - }) - if err != nil { - return nil, fmt.Errorf("no EC2 IMDS role found, %w", err) - } - defer resp.Content.Close() - - credsList := []string{} - s := bufio.NewScanner(resp.Content) - for s.Scan() { - credsList = append(credsList, s.Text()) - } - - if err := s.Err(); err != nil { - return nil, fmt.Errorf("failed to read EC2 IMDS role, %w", err) - } - - return credsList, nil -} - -// requestCred requests the credentials for a specific credentials from the EC2 service. -// -// If the credentials cannot be found, or there is an error reading the response -// and error will be returned. -func requestCred(ctx context.Context, client GetMetadataAPIClient, credsName string) (ec2RoleCredRespBody, error) { - resp, err := client.GetMetadata(ctx, &imds.GetMetadataInput{ - Path: path.Join(iamSecurityCredsPath, credsName), - }) - if err != nil { - return ec2RoleCredRespBody{}, - fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w", - credsName, err) - } - defer resp.Content.Close() - - var respCreds ec2RoleCredRespBody - if err := json.NewDecoder(resp.Content).Decode(&respCreds); err != nil { - return ec2RoleCredRespBody{}, - fmt.Errorf("failed to decode %s EC2 IMDS role credentials, %w", - credsName, err) - } - - if !strings.EqualFold(respCreds.Code, "Success") { - // If an error code was returned something failed requesting the role. - return ec2RoleCredRespBody{}, - fmt.Errorf("failed to get %s EC2 IMDS role credentials, %w", - credsName, - &smithy.GenericAPIError{Code: respCreds.Code, Message: respCreds.Message}) - } - - return respCreds, nil -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *Provider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceIMDS} - } // If no source has been set, assume this is used directly which means just call to assume role - return p.options.CredentialSources -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go deleted file mode 100644 index c3f5dadcec..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/auth.go +++ /dev/null @@ -1,48 +0,0 @@ -package client - -import ( - "context" - "github.com/aws/smithy-go/middleware" -) - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} - -type signRequestMiddleware struct { -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go deleted file mode 100644 index dc291c97cd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/client.go +++ /dev/null @@ -1,165 +0,0 @@ -package client - -import ( - "context" - "fmt" - "net/http" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - "github.com/aws/smithy-go" - smithymiddleware "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ServiceID is the client identifer -const ServiceID = "endpoint-credentials" - -// HTTPClient is a client for sending HTTP requests -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// Options is the endpoint client configurable options -type Options struct { - // The endpoint to retrieve credentials from - Endpoint string - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. - Retryer aws.Retryer - - // Set of options to modify how the credentials operation is invoked. - APIOptions []func(*smithymiddleware.Stack) error -} - -// Copy creates a copy of the API options. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*smithymiddleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - return to -} - -// Client is an client for retrieving AWS credentials from an endpoint -type Client struct { - options Options -} - -// New constructs a new Client from the given options -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - if options.HTTPClient == nil { - options.HTTPClient = awshttp.NewBuildableClient() - } - - if options.Retryer == nil { - // Amazon-owned implementations of this endpoint are known to sometimes - // return plaintext responses (i.e. no Code) like normal, add a few - // additional status codes - options.Retryer = retry.NewStandard(func(o *retry.StandardOptions) { - o.Retryables = append(o.Retryables, retry.RetryableHTTPStatusCode{ - Codes: map[int]struct{}{ - http.StatusTooManyRequests: {}, - }, - }) - }) - } - - for _, fn := range optFns { - fn(&options) - } - - client := &Client{ - options: options, - } - - return client -} - -// GetCredentialsInput is the input to send with the endpoint service to receive credentials. -type GetCredentialsInput struct { - AuthorizationToken string -} - -// GetCredentials retrieves credentials from credential endpoint -func (c *Client) GetCredentials(ctx context.Context, params *GetCredentialsInput, optFns ...func(*Options)) (*GetCredentialsOutput, error) { - stack := smithymiddleware.NewStack("GetCredentials", smithyhttp.NewStackRequest) - options := c.options.Copy() - for _, fn := range optFns { - fn(&options) - } - - stack.Serialize.Add(&serializeOpGetCredential{}, smithymiddleware.After) - stack.Build.Add(&buildEndpoint{Endpoint: options.Endpoint}, smithymiddleware.After) - stack.Deserialize.Add(&deserializeOpGetCredential{}, smithymiddleware.After) - addProtocolFinalizerMiddlewares(stack, options, "GetCredentials") - retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{Retryer: options.Retryer}) - middleware.AddSDKAgentKey(middleware.FeatureMetadata, ServiceID) - smithyhttp.AddErrorCloseResponseBodyMiddleware(stack) - smithyhttp.AddCloseResponseBodyMiddleware(stack) - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, err - } - } - - handler := smithymiddleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, _, err := handler.Handle(ctx, params) - if err != nil { - return nil, err - } - - return result.(*GetCredentialsOutput), err -} - -// GetCredentialsOutput is the response from the credential endpoint -type GetCredentialsOutput struct { - Expiration *time.Time - AccessKeyID string - SecretAccessKey string - Token string - AccountID string -} - -// EndpointError is an error returned from the endpoint service -type EndpointError struct { - Code string `json:"code"` - Message string `json:"message"` - Fault smithy.ErrorFault `json:"-"` - statusCode int `json:"-"` -} - -// Error is the error mesage string -func (e *EndpointError) Error() string { - return fmt.Sprintf("%s: %s", e.Code, e.Message) -} - -// ErrorCode is the error code returned by the endpoint -func (e *EndpointError) ErrorCode() string { - return e.Code -} - -// ErrorMessage is the error message returned by the endpoint -func (e *EndpointError) ErrorMessage() string { - return e.Message -} - -// ErrorFault indicates error fault classification -func (e *EndpointError) ErrorFault() smithy.ErrorFault { - return e.Fault -} - -// HTTPStatusCode implements retry.HTTPStatusCode. -func (e *EndpointError) HTTPStatusCode() int { - return e.statusCode -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go deleted file mode 100644 index 748ee67244..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/endpoints.go +++ /dev/null @@ -1,20 +0,0 @@ -package client - -import ( - "context" - "github.com/aws/smithy-go/middleware" -) - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go deleted file mode 100644 index f2820d20ea..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client/middleware.go +++ /dev/null @@ -1,164 +0,0 @@ -package client - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/url" - - "github.com/aws/smithy-go" - smithymiddleware "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type buildEndpoint struct { - Endpoint string -} - -func (b *buildEndpoint) ID() string { - return "BuildEndpoint" -} - -func (b *buildEndpoint) HandleBuild(ctx context.Context, in smithymiddleware.BuildInput, next smithymiddleware.BuildHandler) ( - out smithymiddleware.BuildOutput, metadata smithymiddleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport, %T", in.Request) - } - - if len(b.Endpoint) == 0 { - return out, metadata, fmt.Errorf("endpoint not provided") - } - - parsed, err := url.Parse(b.Endpoint) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint, %w", err) - } - - request.URL = parsed - - return next.HandleBuild(ctx, in) -} - -type serializeOpGetCredential struct{} - -func (s *serializeOpGetCredential) ID() string { - return "OperationSerializer" -} - -func (s *serializeOpGetCredential) HandleSerialize(ctx context.Context, in smithymiddleware.SerializeInput, next smithymiddleware.SerializeHandler) ( - out smithymiddleware.SerializeOutput, metadata smithymiddleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type, %T", in.Request) - } - - params, ok := in.Parameters.(*GetCredentialsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters, %T", in.Parameters) - } - - const acceptHeader = "Accept" - request.Header[acceptHeader] = append(request.Header[acceptHeader][:0], "application/json") - - if len(params.AuthorizationToken) > 0 { - const authHeader = "Authorization" - request.Header[authHeader] = append(request.Header[authHeader][:0], params.AuthorizationToken) - } - - return next.HandleSerialize(ctx, in) -} - -type deserializeOpGetCredential struct{} - -func (d *deserializeOpGetCredential) ID() string { - return "OperationDeserializer" -} - -func (d *deserializeOpGetCredential) HandleDeserialize(ctx context.Context, in smithymiddleware.DeserializeInput, next smithymiddleware.DeserializeHandler) ( - out smithymiddleware.DeserializeOutput, metadata smithymiddleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, deserializeError(response) - } - - var shape *GetCredentialsOutput - if err = json.NewDecoder(response.Body).Decode(&shape); err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to deserialize json response, %w", err)} - } - - out.Result = shape - return out, metadata, err -} - -func deserializeError(response *smithyhttp.Response) error { - // we could be talking to anything, json isn't guaranteed - // see https://github.com/aws/aws-sdk-go-v2/issues/2316 - if response.Header.Get("Content-Type") == "application/json" { - return deserializeJSONError(response) - } - - msg, err := io.ReadAll(response.Body) - if err != nil { - return &smithy.DeserializationError{ - Err: fmt.Errorf("read response, %w", err), - } - } - - return &EndpointError{ - // no sensible value for Code - Message: string(msg), - Fault: stof(response.StatusCode), - statusCode: response.StatusCode, - } -} - -func deserializeJSONError(response *smithyhttp.Response) error { - var errShape *EndpointError - if err := json.NewDecoder(response.Body).Decode(&errShape); err != nil { - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode error message, %w", err), - } - } - - errShape.Fault = stof(response.StatusCode) - errShape.statusCode = response.StatusCode - return errShape -} - -// maps HTTP status code to smithy ErrorFault -func stof(code int) smithy.ErrorFault { - if code >= 500 { - return smithy.FaultServer - } - return smithy.FaultClient -} - -func addProtocolFinalizerMiddlewares(stack *smithymiddleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, smithymiddleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", smithymiddleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %w", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", smithymiddleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %w", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", smithymiddleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go deleted file mode 100644 index c8ac6d9ff1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/provider.go +++ /dev/null @@ -1,207 +0,0 @@ -// Package endpointcreds provides support for retrieving credentials from an -// arbitrary HTTP endpoint. -// -// The credentials endpoint Provider can receive both static and refreshable -// credentials that will expire. Credentials are static when an "Expiration" -// value is not provided in the endpoint's response. -// -// Static credentials will never expire once they have been retrieved. The format -// of the static credentials response: -// -// { -// "AccessKeyId" : "MUA...", -// "SecretAccessKey" : "/7PC5om....", -// } -// -// Refreshable credentials will expire within the "ExpiryWindow" of the Expiration -// value in the response. The format of the refreshable credentials response: -// -// { -// "AccessKeyId" : "MUA...", -// "SecretAccessKey" : "/7PC5om....", -// "Token" : "AQoDY....=", -// "Expiration" : "2016-02-25T06:03:31Z" -// } -// -// Errors should be returned in the following format and only returned with 400 -// or 500 HTTP status codes. -// -// { -// "code": "ErrorCode", -// "message": "Helpful error message." -// } -package endpointcreds - -import ( - "context" - "fmt" - "net/http" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client" - "github.com/aws/smithy-go/middleware" -) - -// ProviderName is the name of the credentials provider. -const ProviderName = `CredentialsEndpointProvider` - -type getCredentialsAPIClient interface { - GetCredentials(context.Context, *client.GetCredentialsInput, ...func(*client.Options)) (*client.GetCredentialsOutput, error) -} - -// Provider satisfies the aws.CredentialsProvider interface, and is a client to -// retrieve credentials from an arbitrary endpoint. -type Provider struct { - // The AWS Client to make HTTP requests to the endpoint with. The endpoint - // the request will be made to is provided by the aws.Config's - // EndpointResolver. - client getCredentialsAPIClient - - options Options -} - -// HTTPClient is a client for sending HTTP requests -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// Options is structure of configurable options for Provider -type Options struct { - // Endpoint to retrieve credentials from. Required - Endpoint string - - // HTTPClient to handle sending HTTP requests to the target endpoint. - HTTPClient HTTPClient - - // Set of options to modify how the credentials operation is invoked. - APIOptions []func(*middleware.Stack) error - - // The Retryer to be used for determining whether a failed requested should be retried - Retryer aws.Retryer - - // Optional authorization token value if set will be used as the value of - // the Authorization header of the endpoint credential request. - // - // When constructed from environment, the provider will use the value of - // AWS_CONTAINER_AUTHORIZATION_TOKEN environment variable as the token - // - // Will be overridden if AuthorizationTokenProvider is configured - AuthorizationToken string - - // Optional auth provider func to dynamically load the auth token from a file - // everytime a credential is retrieved - // - // When constructed from environment, the provider will read and use the content - // of the file pointed to by AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE environment variable - // as the auth token everytime credentials are retrieved - // - // Will override AuthorizationToken if configured - AuthorizationTokenProvider AuthTokenProvider - - // The chain of providers that was used to create this provider - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// AuthTokenProvider defines an interface to dynamically load a value to be passed -// for the Authorization header of a credentials request. -type AuthTokenProvider interface { - GetToken() (string, error) -} - -// TokenProviderFunc is a func type implementing AuthTokenProvider interface -// and enables customizing token provider behavior -type TokenProviderFunc func() (string, error) - -// GetToken func retrieves auth token according to TokenProviderFunc implementation -func (p TokenProviderFunc) GetToken() (string, error) { - return p() -} - -// New returns a credentials Provider for retrieving AWS credentials -// from arbitrary endpoint. -func New(endpoint string, optFns ...func(*Options)) *Provider { - o := Options{ - Endpoint: endpoint, - } - - for _, fn := range optFns { - fn(&o) - } - - p := &Provider{ - client: client.New(client.Options{ - HTTPClient: o.HTTPClient, - Endpoint: o.Endpoint, - APIOptions: o.APIOptions, - Retryer: o.Retryer, - }), - options: o, - } - - return p -} - -// Retrieve will attempt to request the credentials from the endpoint the Provider -// was configured for. And error will be returned if the retrieval fails. -func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - resp, err := p.getCredentials(ctx) - if err != nil { - return aws.Credentials{}, fmt.Errorf("failed to load credentials, %w", err) - } - - creds := aws.Credentials{ - AccessKeyID: resp.AccessKeyID, - SecretAccessKey: resp.SecretAccessKey, - SessionToken: resp.Token, - Source: ProviderName, - AccountID: resp.AccountID, - } - - if resp.Expiration != nil { - creds.CanExpire = true - creds.Expires = *resp.Expiration - } - - return creds, nil -} - -func (p *Provider) getCredentials(ctx context.Context) (*client.GetCredentialsOutput, error) { - authToken, err := p.resolveAuthToken() - if err != nil { - return nil, fmt.Errorf("resolve auth token: %v", err) - } - - return p.client.GetCredentials(ctx, &client.GetCredentialsInput{ - AuthorizationToken: authToken, - }) -} - -func (p *Provider) resolveAuthToken() (string, error) { - authToken := p.options.AuthorizationToken - - var err error - if p.options.AuthorizationTokenProvider != nil { - authToken, err = p.options.AuthorizationTokenProvider.GetToken() - if err != nil { - return "", err - } - } - - if strings.ContainsAny(authToken, "\r\n") { - return "", fmt.Errorf("authorization token contains invalid newline sequence") - } - - return authToken, nil -} - -var _ aws.CredentialProviderSource = (*Provider)(nil) - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *Provider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceHTTP} - } - return p.options.CredentialSources -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go deleted file mode 100644 index 03357b7603..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package credentials - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.16" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go deleted file mode 100644 index a3137b8fa9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/doc.go +++ /dev/null @@ -1,92 +0,0 @@ -// Package processcreds is a credentials provider to retrieve credentials from a -// external CLI invoked process. -// -// WARNING: The following describes a method of sourcing credentials from an external -// process. This can potentially be dangerous, so proceed with caution. Other -// credential providers should be preferred if at all possible. If using this -// option, you should make sure that the config file is as locked down as possible -// using security best practices for your operating system. -// -// # Concurrency and caching -// -// The Provider is not safe to be used concurrently, and does not provide any -// caching of credentials retrieved. You should wrap the Provider with a -// `aws.CredentialsCache` to provide concurrency safety, and caching of -// credentials. -// -// # Loading credentials with the SDKs AWS Config -// -// You can use credentials from a AWS shared config `credential_process` in a -// variety of ways. -// -// One way is to setup your shared config file, located in the default -// location, with the `credential_process` key and the command you want to be -// called. You also need to set the AWS_SDK_LOAD_CONFIG environment variable -// (e.g., `export AWS_SDK_LOAD_CONFIG=1`) to use the shared config file. -// -// [default] -// credential_process = /command/to/call -// -// Loading configuration using external will use the credential process to -// retrieve credentials. NOTE: If there are credentials in the profile you are -// using, the credential process will not be used. -// -// // Initialize a session to load credentials. -// cfg, _ := config.LoadDefaultConfig(context.TODO()) -// -// // Create S3 service client to use the credentials. -// svc := s3.NewFromConfig(cfg) -// -// # Loading credentials with the Provider directly -// -// Another way to use the credentials process provider is by using the -// `NewProvider` constructor to create the provider and providing a it with a -// command to be executed to retrieve credentials. -// -// The following example creates a credentials provider for a command, and wraps -// it with the CredentialsCache before assigning the provider to the Amazon S3 API -// client's Credentials option. -// -// // Create credentials using the Provider. -// provider := processcreds.NewProvider("/path/to/command") -// -// // Create the service client value configured for credentials. -// svc := s3.New(s3.Options{ -// Credentials: aws.NewCredentialsCache(provider), -// }) -// -// If you need more control, you can set any configurable options in the -// credentials using one or more option functions. -// -// provider := processcreds.NewProvider("/path/to/command", -// func(o *processcreds.Options) { -// // Override the provider's default timeout -// o.Timeout = 2 * time.Minute -// }) -// -// You can also use your own `exec.Cmd` value by satisfying a value that satisfies -// the `NewCommandBuilder` interface and use the `NewProviderCommand` constructor. -// -// // Create an exec.Cmd -// cmdBuilder := processcreds.NewCommandBuilderFunc( -// func(ctx context.Context) (*exec.Cmd, error) { -// cmd := exec.CommandContext(ctx, -// "customCLICommand", -// "-a", "argument", -// ) -// cmd.Env = []string{ -// "ENV_VAR_FOO=value", -// "ENV_VAR_BAR=other_value", -// } -// -// return cmd, nil -// }, -// ) -// -// // Create credentials using your exec.Cmd and custom timeout -// provider := processcreds.NewProviderCommand(cmdBuilder, -// func(opt *processcreds.Provider) { -// // optionally override the provider's default timeout -// opt.Timeout = 1 * time.Second -// }) -package processcreds diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go deleted file mode 100644 index dfc6b2548e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/processcreds/provider.go +++ /dev/null @@ -1,296 +0,0 @@ -package processcreds - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "os" - "os/exec" - "runtime" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/internal/sdkio" -) - -const ( - // ProviderName is the name this credentials provider will label any - // returned credentials Value with. - ProviderName = `ProcessProvider` - - // DefaultTimeout default limit on time a process can run. - DefaultTimeout = time.Duration(1) * time.Minute -) - -// ProviderError is an error indicating failure initializing or executing the -// process credentials provider -type ProviderError struct { - Err error -} - -// Error returns the error message. -func (e *ProviderError) Error() string { - return fmt.Sprintf("process provider error: %v", e.Err) -} - -// Unwrap returns the underlying error the provider error wraps. -func (e *ProviderError) Unwrap() error { - return e.Err -} - -// Provider satisfies the credentials.Provider interface, and is a -// client to retrieve credentials from a process. -type Provider struct { - // Provides a constructor for exec.Cmd that are invoked by the provider for - // retrieving credentials. Use this to provide custom creation of exec.Cmd - // with things like environment variables, or other configuration. - // - // The provider defaults to the DefaultNewCommand function. - commandBuilder NewCommandBuilder - - options Options -} - -// Options is the configuration options for configuring the Provider. -type Options struct { - // Timeout limits the time a process can run. - Timeout time.Duration - // The chain of providers that was used to create this provider - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// NewCommandBuilder provides the interface for specifying how command will be -// created that the Provider will use to retrieve credentials with. -type NewCommandBuilder interface { - NewCommand(context.Context) (*exec.Cmd, error) -} - -// NewCommandBuilderFunc provides a wrapper type around a function pointer to -// satisfy the NewCommandBuilder interface. -type NewCommandBuilderFunc func(context.Context) (*exec.Cmd, error) - -// NewCommand calls the underlying function pointer the builder was initialized with. -func (fn NewCommandBuilderFunc) NewCommand(ctx context.Context) (*exec.Cmd, error) { - return fn(ctx) -} - -// DefaultNewCommandBuilder provides the default NewCommandBuilder -// implementation used by the provider. It takes a command and arguments to -// invoke. The command will also be initialized with the current process -// environment variables, stderr, and stdin pipes. -type DefaultNewCommandBuilder struct { - Args []string -} - -// NewCommand returns an initialized exec.Cmd with the builder's initialized -// Args. The command is also initialized current process environment variables, -// stderr, and stdin pipes. -func (b DefaultNewCommandBuilder) NewCommand(ctx context.Context) (*exec.Cmd, error) { - var cmdArgs []string - if runtime.GOOS == "windows" { - cmdArgs = []string{"cmd.exe", "/C"} - } else { - cmdArgs = []string{"sh", "-c"} - } - - if len(b.Args) == 0 { - return nil, &ProviderError{ - Err: fmt.Errorf("failed to prepare command: command must not be empty"), - } - } - - cmdArgs = append(cmdArgs, b.Args...) - cmd := exec.CommandContext(ctx, cmdArgs[0], cmdArgs[1:]...) - cmd.Env = os.Environ() - - cmd.Stderr = os.Stderr // display stderr on console for MFA - cmd.Stdin = os.Stdin // enable stdin for MFA - - return cmd, nil -} - -// NewProvider returns a pointer to a new Credentials object wrapping the -// Provider. -// -// The provider defaults to the DefaultNewCommandBuilder for creating command -// the Provider will use to retrieve credentials with. -func NewProvider(command string, options ...func(*Options)) *Provider { - var args []string - - // Ensure that the command arguments are not set if the provided command is - // empty. This will error out when the command is executed since no - // arguments are specified. - if len(command) > 0 { - args = []string{command} - } - - commanBuilder := DefaultNewCommandBuilder{ - Args: args, - } - return NewProviderCommand(commanBuilder, options...) -} - -// NewProviderCommand returns a pointer to a new Credentials object with the -// specified command, and default timeout duration. Use this to provide custom -// creation of exec.Cmd for options like environment variables, or other -// configuration. -func NewProviderCommand(builder NewCommandBuilder, options ...func(*Options)) *Provider { - p := &Provider{ - commandBuilder: builder, - options: Options{ - Timeout: DefaultTimeout, - }, - } - - for _, option := range options { - option(&p.options) - } - - return p -} - -// A CredentialProcessResponse is the AWS credentials format that must be -// returned when executing an external credential_process. -type CredentialProcessResponse struct { - // As of this writing, the Version key must be set to 1. This might - // increment over time as the structure evolves. - Version int - - // The access key ID that identifies the temporary security credentials. - AccessKeyID string `json:"AccessKeyId"` - - // The secret access key that can be used to sign requests. - SecretAccessKey string - - // The token that users must pass to the service API to use the temporary credentials. - SessionToken string - - // The date on which the current credentials expire. - Expiration *time.Time - - // The ID of the account for credentials - AccountID string `json:"AccountId"` -} - -// Retrieve executes the credential process command and returns the -// credentials, or error if the command fails. -func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - out, err := p.executeCredentialProcess(ctx) - if err != nil { - return aws.Credentials{Source: ProviderName}, err - } - - // Serialize and validate response - resp := &CredentialProcessResponse{} - if err = json.Unmarshal(out, resp); err != nil { - return aws.Credentials{Source: ProviderName}, &ProviderError{ - Err: fmt.Errorf("parse failed of process output: %s, error: %w", out, err), - } - } - - if resp.Version != 1 { - return aws.Credentials{Source: ProviderName}, &ProviderError{ - Err: fmt.Errorf("wrong version in process output (not 1)"), - } - } - - if len(resp.AccessKeyID) == 0 { - return aws.Credentials{Source: ProviderName}, &ProviderError{ - Err: fmt.Errorf("missing AccessKeyId in process output"), - } - } - - if len(resp.SecretAccessKey) == 0 { - return aws.Credentials{Source: ProviderName}, &ProviderError{ - Err: fmt.Errorf("missing SecretAccessKey in process output"), - } - } - - creds := aws.Credentials{ - Source: ProviderName, - AccessKeyID: resp.AccessKeyID, - SecretAccessKey: resp.SecretAccessKey, - SessionToken: resp.SessionToken, - AccountID: resp.AccountID, - } - - // Handle expiration - if resp.Expiration != nil { - creds.CanExpire = true - creds.Expires = *resp.Expiration - } - - return creds, nil -} - -// executeCredentialProcess starts the credential process on the OS and -// returns the results or an error. -func (p *Provider) executeCredentialProcess(ctx context.Context) ([]byte, error) { - if p.options.Timeout >= 0 { - var cancelFunc func() - ctx, cancelFunc = context.WithTimeout(ctx, p.options.Timeout) - defer cancelFunc() - } - - cmd, err := p.commandBuilder.NewCommand(ctx) - if err != nil { - return nil, err - } - - // get creds json on process's stdout - output := bytes.NewBuffer(make([]byte, 0, int(8*sdkio.KibiByte))) - if cmd.Stdout != nil { - cmd.Stdout = io.MultiWriter(cmd.Stdout, output) - } else { - cmd.Stdout = output - } - - execCh := make(chan error, 1) - go executeCommand(cmd, execCh) - - select { - case execError := <-execCh: - if execError == nil { - break - } - select { - case <-ctx.Done(): - return output.Bytes(), &ProviderError{ - Err: fmt.Errorf("credential process timed out: %w", execError), - } - default: - return output.Bytes(), &ProviderError{ - Err: fmt.Errorf("error in credential_process: %w", execError), - } - } - } - - out := output.Bytes() - if runtime.GOOS == "windows" { - // windows adds slashes to quotes - out = bytes.ReplaceAll(out, []byte(`\"`), []byte(`"`)) - } - - return out, nil -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *Provider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceProcess} - } - return p.options.CredentialSources -} - -func executeCommand(cmd *exec.Cmd, exec chan error) { - // Start the command - err := cmd.Start() - if err == nil { - err = cmd.Wait() - } - - exec <- err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go deleted file mode 100644 index ece1e65f73..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/doc.go +++ /dev/null @@ -1,81 +0,0 @@ -// Package ssocreds provides a credential provider for retrieving temporary AWS -// credentials using an SSO access token. -// -// IMPORTANT: The provider in this package does not initiate or perform the AWS -// SSO login flow. The SDK provider expects that you have already performed the -// SSO login flow using AWS CLI using the "aws sso login" command, or by some -// other mechanism. The provider must find a valid non-expired access token for -// the AWS SSO user portal URL in ~/.aws/sso/cache. If a cached token is not -// found, it is expired, or the file is malformed an error will be returned. -// -// # Loading AWS SSO credentials with the AWS shared configuration file -// -// You can use configure AWS SSO credentials from the AWS shared configuration file by -// specifying the required keys in the profile and referencing an sso-session: -// -// sso_session -// sso_account_id -// sso_role_name -// -// For example, the following defines a profile "devsso" and specifies the AWS -// SSO parameters that defines the target account, role, sign-on portal, and -// the region where the user portal is located. Note: all SSO arguments must be -// provided, or an error will be returned. -// -// [profile devsso] -// sso_session = dev-session -// sso_role_name = SSOReadOnlyRole -// sso_account_id = 123456789012 -// -// [sso-session dev-session] -// sso_start_url = https://my-sso-portal.awsapps.com/start -// sso_region = us-east-1 -// sso_registration_scopes = sso:account:access -// -// Using the config module, you can load the AWS SDK shared configuration, and -// specify that this profile be used to retrieve credentials. For example: -// -// config, err := config.LoadDefaultConfig(context.TODO(), config.WithSharedConfigProfile("devsso")) -// if err != nil { -// return err -// } -// -// # Programmatically loading AWS SSO credentials directly -// -// You can programmatically construct the AWS SSO Provider in your application, -// and provide the necessary information to load and retrieve temporary -// credentials using an access token from ~/.aws/sso/cache. -// -// ssoClient := sso.NewFromConfig(cfg) -// ssoOidcClient := ssooidc.NewFromConfig(cfg) -// tokenPath, err := ssocreds.StandardCachedTokenFilepath("dev-session") -// if err != nil { -// return err -// } -// -// var provider aws.CredentialsProvider -// provider = ssocreds.New(ssoClient, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start", func(options *ssocreds.Options) { -// options.SSOTokenProvider = ssocreds.NewSSOTokenProvider(ssoOidcClient, tokenPath) -// }) -// -// // Wrap the provider with aws.CredentialsCache to cache the credentials until their expire time -// provider = aws.NewCredentialsCache(provider) -// -// credentials, err := provider.Retrieve(context.TODO()) -// if err != nil { -// return err -// } -// -// It is important that you wrap the Provider with aws.CredentialsCache if you -// are programmatically constructing the provider directly. This prevents your -// application from accessing the cached access token and requesting new -// credentials each time the credentials are used. -// -// # Additional Resources -// -// Configuring the AWS CLI to use AWS Single Sign-On: -// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html -// -// AWS Single Sign-On User Guide: -// https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html -package ssocreds diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go deleted file mode 100644 index 46ae2f9231..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_cached_token.go +++ /dev/null @@ -1,233 +0,0 @@ -package ssocreds - -import ( - "crypto/sha1" - "encoding/hex" - "encoding/json" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/aws-sdk-go-v2/internal/shareddefaults" -) - -var osUserHomeDur = shareddefaults.UserHomeDir - -// StandardCachedTokenFilepath returns the filepath for the cached SSO token file, or -// error if unable get derive the path. Key that will be used to compute a SHA1 -// value that is hex encoded. -// -// Derives the filepath using the Key as: -// -// ~/.aws/sso/cache/.json -func StandardCachedTokenFilepath(key string) (string, error) { - homeDir := osUserHomeDur() - if len(homeDir) == 0 { - return "", fmt.Errorf("unable to get USER's home directory for cached token") - } - hash := sha1.New() - if _, err := hash.Write([]byte(key)); err != nil { - return "", fmt.Errorf("unable to compute cached token filepath key SHA1 hash, %w", err) - } - - cacheFilename := strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json" - - return filepath.Join(homeDir, ".aws", "sso", "cache", cacheFilename), nil -} - -type tokenKnownFields struct { - AccessToken string `json:"accessToken,omitempty"` - ExpiresAt *rfc3339 `json:"expiresAt,omitempty"` - - RefreshToken string `json:"refreshToken,omitempty"` - ClientID string `json:"clientId,omitempty"` - ClientSecret string `json:"clientSecret,omitempty"` -} - -type token struct { - tokenKnownFields - UnknownFields map[string]interface{} `json:"-"` -} - -func (t token) MarshalJSON() ([]byte, error) { - fields := map[string]interface{}{} - - setTokenFieldString(fields, "accessToken", t.AccessToken) - setTokenFieldRFC3339(fields, "expiresAt", t.ExpiresAt) - - setTokenFieldString(fields, "refreshToken", t.RefreshToken) - setTokenFieldString(fields, "clientId", t.ClientID) - setTokenFieldString(fields, "clientSecret", t.ClientSecret) - - for k, v := range t.UnknownFields { - if _, ok := fields[k]; ok { - return nil, fmt.Errorf("unknown token field %v, duplicates known field", k) - } - fields[k] = v - } - - return json.Marshal(fields) -} - -func setTokenFieldString(fields map[string]interface{}, key, value string) { - if value == "" { - return - } - fields[key] = value -} -func setTokenFieldRFC3339(fields map[string]interface{}, key string, value *rfc3339) { - if value == nil { - return - } - fields[key] = value -} - -func (t *token) UnmarshalJSON(b []byte) error { - var fields map[string]interface{} - if err := json.Unmarshal(b, &fields); err != nil { - return nil - } - - t.UnknownFields = map[string]interface{}{} - - for k, v := range fields { - var err error - switch k { - case "accessToken": - err = getTokenFieldString(v, &t.AccessToken) - case "expiresAt": - err = getTokenFieldRFC3339(v, &t.ExpiresAt) - case "refreshToken": - err = getTokenFieldString(v, &t.RefreshToken) - case "clientId": - err = getTokenFieldString(v, &t.ClientID) - case "clientSecret": - err = getTokenFieldString(v, &t.ClientSecret) - default: - t.UnknownFields[k] = v - } - - if err != nil { - return fmt.Errorf("field %q, %w", k, err) - } - } - - return nil -} - -func getTokenFieldString(v interface{}, value *string) error { - var ok bool - *value, ok = v.(string) - if !ok { - return fmt.Errorf("expect value to be string, got %T", v) - } - return nil -} - -func getTokenFieldRFC3339(v interface{}, value **rfc3339) error { - var stringValue string - if err := getTokenFieldString(v, &stringValue); err != nil { - return err - } - - timeValue, err := parseRFC3339(stringValue) - if err != nil { - return err - } - - *value = &timeValue - return nil -} - -func loadCachedToken(filename string) (token, error) { - fileBytes, err := ioutil.ReadFile(filename) - if err != nil { - return token{}, fmt.Errorf("failed to read cached SSO token file, %w", err) - } - - var t token - if err := json.Unmarshal(fileBytes, &t); err != nil { - return token{}, fmt.Errorf("failed to parse cached SSO token file, %w", err) - } - - if len(t.AccessToken) == 0 || t.ExpiresAt == nil || time.Time(*t.ExpiresAt).IsZero() { - return token{}, fmt.Errorf( - "cached SSO token must contain accessToken and expiresAt fields") - } - - return t, nil -} - -func storeCachedToken(filename string, t token, fileMode os.FileMode) (err error) { - tmpFilename := filename + ".tmp-" + strconv.FormatInt(sdk.NowTime().UnixNano(), 10) - if err := writeCacheFile(tmpFilename, fileMode, t); err != nil { - return err - } - - if err := os.Rename(tmpFilename, filename); err != nil { - return fmt.Errorf("failed to replace old cached SSO token file, %w", err) - } - - return nil -} - -func writeCacheFile(filename string, fileMode os.FileMode, t token) (err error) { - var f *os.File - f, err = os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_RDWR, fileMode) - if err != nil { - return fmt.Errorf("failed to create cached SSO token file %w", err) - } - - defer func() { - closeErr := f.Close() - if err == nil && closeErr != nil { - err = fmt.Errorf("failed to close cached SSO token file, %w", closeErr) - } - }() - - encoder := json.NewEncoder(f) - - if err = encoder.Encode(t); err != nil { - return fmt.Errorf("failed to serialize cached SSO token, %w", err) - } - - return nil -} - -type rfc3339 time.Time - -func parseRFC3339(v string) (rfc3339, error) { - parsed, err := time.Parse(time.RFC3339, v) - if err != nil { - return rfc3339{}, fmt.Errorf("expected RFC3339 timestamp: %w", err) - } - - return rfc3339(parsed), nil -} - -func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) { - var value string - - // Use JSON unmarshal to unescape the quoted value making use of JSON's - // unquoting rules. - if err = json.Unmarshal(bytes, &value); err != nil { - return err - } - - *r, err = parseRFC3339(value) - - return nil -} - -func (r *rfc3339) MarshalJSON() ([]byte, error) { - value := time.Time(*r).UTC().Format(time.RFC3339) - - // Use JSON unmarshal to unescape the quoted value making use of JSON's - // quoting rules. - return json.Marshal(value) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go deleted file mode 100644 index 3ed9cbb3ec..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_credentials_provider.go +++ /dev/null @@ -1,165 +0,0 @@ -package ssocreds - -import ( - "context" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/aws-sdk-go-v2/service/sso" -) - -// ProviderName is the name of the provider used to specify the source of -// credentials. -const ProviderName = "SSOProvider" - -// GetRoleCredentialsAPIClient is a API client that implements the -// GetRoleCredentials operation. -type GetRoleCredentialsAPIClient interface { - GetRoleCredentials(context.Context, *sso.GetRoleCredentialsInput, ...func(*sso.Options)) ( - *sso.GetRoleCredentialsOutput, error, - ) -} - -// Options is the Provider options structure. -type Options struct { - // The Client which is configured for the AWS Region where the AWS SSO user - // portal is located. - Client GetRoleCredentialsAPIClient - - // The AWS account that is assigned to the user. - AccountID string - - // The role name that is assigned to the user. - RoleName string - - // The URL that points to the organization's AWS Single Sign-On (AWS SSO) - // user portal. - StartURL string - - // The filepath the cached token will be retrieved from. If unset Provider will - // use the startURL to determine the filepath at. - // - // ~/.aws/sso/cache/.json - // - // If custom cached token filepath is used, the Provider's startUrl - // parameter will be ignored. - CachedTokenFilepath string - - // Used by the SSOCredentialProvider if a token configuration - // profile is used in the shared config - SSOTokenProvider *SSOTokenProvider - - // The chain of providers that was used to create this provider. - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// Provider is an AWS credential provider that retrieves temporary AWS -// credentials by exchanging an SSO login token. -type Provider struct { - options Options - - cachedTokenFilepath string -} - -// New returns a new AWS Single Sign-On (AWS SSO) credential provider. The -// provided client is expected to be configured for the AWS Region where the -// AWS SSO user portal is located. -func New(client GetRoleCredentialsAPIClient, accountID, roleName, startURL string, optFns ...func(options *Options)) *Provider { - options := Options{ - Client: client, - AccountID: accountID, - RoleName: roleName, - StartURL: startURL, - } - - for _, fn := range optFns { - fn(&options) - } - - return &Provider{ - options: options, - cachedTokenFilepath: options.CachedTokenFilepath, - } -} - -// Retrieve retrieves temporary AWS credentials from the configured Amazon -// Single Sign-On (AWS SSO) user portal by exchanging the accessToken present -// in ~/.aws/sso/cache. However, if a token provider configuration exists -// in the shared config, then we ought to use the token provider rather then -// direct access on the cached token. -func (p *Provider) Retrieve(ctx context.Context) (aws.Credentials, error) { - var accessToken *string - if p.options.SSOTokenProvider != nil { - token, err := p.options.SSOTokenProvider.RetrieveBearerToken(ctx) - if err != nil { - return aws.Credentials{}, err - } - accessToken = &token.Value - } else { - if p.cachedTokenFilepath == "" { - cachedTokenFilepath, err := StandardCachedTokenFilepath(p.options.StartURL) - if err != nil { - return aws.Credentials{}, &InvalidTokenError{Err: err} - } - p.cachedTokenFilepath = cachedTokenFilepath - } - - tokenFile, err := loadCachedToken(p.cachedTokenFilepath) - if err != nil { - return aws.Credentials{}, &InvalidTokenError{Err: err} - } - - if tokenFile.ExpiresAt == nil || sdk.NowTime().After(time.Time(*tokenFile.ExpiresAt)) { - return aws.Credentials{}, &InvalidTokenError{} - } - accessToken = &tokenFile.AccessToken - } - - output, err := p.options.Client.GetRoleCredentials(ctx, &sso.GetRoleCredentialsInput{ - AccessToken: accessToken, - AccountId: &p.options.AccountID, - RoleName: &p.options.RoleName, - }) - if err != nil { - return aws.Credentials{}, err - } - - return aws.Credentials{ - AccessKeyID: aws.ToString(output.RoleCredentials.AccessKeyId), - SecretAccessKey: aws.ToString(output.RoleCredentials.SecretAccessKey), - SessionToken: aws.ToString(output.RoleCredentials.SessionToken), - CanExpire: true, - Expires: time.Unix(0, output.RoleCredentials.Expiration*int64(time.Millisecond)).UTC(), - Source: ProviderName, - AccountID: p.options.AccountID, - }, nil -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *Provider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceSSO} - } - return p.options.CredentialSources -} - -// InvalidTokenError is the error type that is returned if loaded token has -// expired or is otherwise invalid. To refresh the SSO session run AWS SSO -// login with the corresponding profile. -type InvalidTokenError struct { - Err error -} - -func (i *InvalidTokenError) Unwrap() error { - return i.Err -} - -func (i *InvalidTokenError) Error() string { - const msg = "the SSO session has expired or is invalid" - if i.Err == nil { - return msg - } - return msg + ": " + i.Err.Error() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go deleted file mode 100644 index 7f4fc54677..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/ssocreds/sso_token_provider.go +++ /dev/null @@ -1,147 +0,0 @@ -package ssocreds - -import ( - "context" - "fmt" - "os" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/aws-sdk-go-v2/service/ssooidc" - "github.com/aws/smithy-go/auth/bearer" -) - -// CreateTokenAPIClient provides the interface for the SSOTokenProvider's API -// client for calling CreateToken operation to refresh the SSO token. -type CreateTokenAPIClient interface { - CreateToken(context.Context, *ssooidc.CreateTokenInput, ...func(*ssooidc.Options)) ( - *ssooidc.CreateTokenOutput, error, - ) -} - -// SSOTokenProviderOptions provides the options for configuring the -// SSOTokenProvider. -type SSOTokenProviderOptions struct { - // Client that can be overridden - Client CreateTokenAPIClient - - // The set of API Client options to be applied when invoking the - // CreateToken operation. - ClientOptions []func(*ssooidc.Options) - - // The path the file containing the cached SSO token will be read from. - // Initialized the NewSSOTokenProvider's cachedTokenFilepath parameter. - CachedTokenFilepath string -} - -// SSOTokenProvider provides an utility for refreshing SSO AccessTokens for -// Bearer Authentication. The SSOTokenProvider can only be used to refresh -// already cached SSO Tokens. This utility cannot perform the initial SSO -// create token. -// -// The SSOTokenProvider is not safe to use concurrently. It must be wrapped in -// a utility such as smithy-go's auth/bearer#TokenCache. The SDK's -// config.LoadDefaultConfig will automatically wrap the SSOTokenProvider with -// the smithy-go TokenCache, if the external configuration loaded configured -// for an SSO session. -// -// The initial SSO create token should be preformed with the AWS CLI before the -// Go application using the SSOTokenProvider will need to retrieve the SSO -// token. If the AWS CLI has not created the token cache file, this provider -// will return an error when attempting to retrieve the cached token. -// -// This provider will attempt to refresh the cached SSO token periodically if -// needed when RetrieveBearerToken is called. -// -// A utility such as the AWS CLI must be used to initially create the SSO -// session and cached token file. -// https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html -type SSOTokenProvider struct { - options SSOTokenProviderOptions -} - -var _ bearer.TokenProvider = (*SSOTokenProvider)(nil) - -// NewSSOTokenProvider returns an initialized SSOTokenProvider that will -// periodically refresh the SSO token cached stored in the cachedTokenFilepath. -// The cachedTokenFilepath file's content will be rewritten by the token -// provider when the token is refreshed. -// -// The client must be configured for the AWS region the SSO token was created for. -func NewSSOTokenProvider(client CreateTokenAPIClient, cachedTokenFilepath string, optFns ...func(o *SSOTokenProviderOptions)) *SSOTokenProvider { - options := SSOTokenProviderOptions{ - Client: client, - CachedTokenFilepath: cachedTokenFilepath, - } - for _, fn := range optFns { - fn(&options) - } - - provider := &SSOTokenProvider{ - options: options, - } - - return provider -} - -// RetrieveBearerToken returns the SSO token stored in the cachedTokenFilepath -// the SSOTokenProvider was created with. If the token has expired -// RetrieveBearerToken will attempt to refresh it. If the token cannot be -// refreshed or is not present an error will be returned. -// -// A utility such as the AWS CLI must be used to initially create the SSO -// session and cached token file. https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html -func (p SSOTokenProvider) RetrieveBearerToken(ctx context.Context) (bearer.Token, error) { - cachedToken, err := loadCachedToken(p.options.CachedTokenFilepath) - if err != nil { - return bearer.Token{}, err - } - - if cachedToken.ExpiresAt != nil && sdk.NowTime().After(time.Time(*cachedToken.ExpiresAt)) { - cachedToken, err = p.refreshToken(ctx, cachedToken) - if err != nil { - return bearer.Token{}, fmt.Errorf("refresh cached SSO token failed, %w", err) - } - } - - expiresAt := aws.ToTime((*time.Time)(cachedToken.ExpiresAt)) - return bearer.Token{ - Value: cachedToken.AccessToken, - CanExpire: !expiresAt.IsZero(), - Expires: expiresAt, - }, nil -} - -func (p SSOTokenProvider) refreshToken(ctx context.Context, cachedToken token) (token, error) { - if cachedToken.ClientSecret == "" || cachedToken.ClientID == "" || cachedToken.RefreshToken == "" { - return token{}, fmt.Errorf("cached SSO token is expired, or not present, and cannot be refreshed") - } - - createResult, err := p.options.Client.CreateToken(ctx, &ssooidc.CreateTokenInput{ - ClientId: &cachedToken.ClientID, - ClientSecret: &cachedToken.ClientSecret, - RefreshToken: &cachedToken.RefreshToken, - GrantType: aws.String("refresh_token"), - }, p.options.ClientOptions...) - if err != nil { - return token{}, fmt.Errorf("unable to refresh SSO token, %w", err) - } - - expiresAt := sdk.NowTime().Add(time.Duration(createResult.ExpiresIn) * time.Second) - - cachedToken.AccessToken = aws.ToString(createResult.AccessToken) - cachedToken.ExpiresAt = (*rfc3339)(&expiresAt) - cachedToken.RefreshToken = aws.ToString(createResult.RefreshToken) - - fileInfo, err := os.Stat(p.options.CachedTokenFilepath) - if err != nil { - return token{}, fmt.Errorf("failed to stat cached SSO token file %w", err) - } - - if err = storeCachedToken(p.options.CachedTokenFilepath, cachedToken, fileInfo.Mode()); err != nil { - return token{}, fmt.Errorf("unable to cache refreshed SSO token, %w", err) - } - - return cachedToken, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go deleted file mode 100644 index a469abdb79..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/static_provider.go +++ /dev/null @@ -1,63 +0,0 @@ -package credentials - -import ( - "context" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -const ( - // StaticCredentialsName provides a name of Static provider - StaticCredentialsName = "StaticCredentials" -) - -// StaticCredentialsEmptyError is emitted when static credentials are empty. -type StaticCredentialsEmptyError struct{} - -func (*StaticCredentialsEmptyError) Error() string { - return "static credentials are empty" -} - -// A StaticCredentialsProvider is a set of credentials which are set, and will -// never expire. -type StaticCredentialsProvider struct { - Value aws.Credentials - // These values are for reporting purposes and are not meant to be set up directly - Source []aws.CredentialSource -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (s StaticCredentialsProvider) ProviderSources() []aws.CredentialSource { - if s.Source == nil { - return []aws.CredentialSource{aws.CredentialSourceCode} // If no source has been set, assume this is used directly which means hardcoded creds - } - return s.Source -} - -// NewStaticCredentialsProvider return a StaticCredentialsProvider initialized with the AWS -// credentials passed in. -func NewStaticCredentialsProvider(key, secret, session string) StaticCredentialsProvider { - return StaticCredentialsProvider{ - Value: aws.Credentials{ - AccessKeyID: key, - SecretAccessKey: secret, - SessionToken: session, - }, - } -} - -// Retrieve returns the credentials or error if the credentials are invalid. -func (s StaticCredentialsProvider) Retrieve(_ context.Context) (aws.Credentials, error) { - v := s.Value - if v.AccessKeyID == "" || v.SecretAccessKey == "" { - return aws.Credentials{ - Source: StaticCredentialsName, - }, &StaticCredentialsEmptyError{} - } - - if len(v.Source) == 0 { - v.Source = StaticCredentialsName - } - - return v, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go deleted file mode 100644 index 1ccf71e77e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/assume_role_provider.go +++ /dev/null @@ -1,338 +0,0 @@ -// Package stscreds are credential Providers to retrieve STS AWS credentials. -// -// STS provides multiple ways to retrieve credentials which can be used when making -// future AWS service API operation calls. -// -// The SDK will ensure that per instance of credentials.Credentials all requests -// to refresh the credentials will be synchronized. But, the SDK is unable to -// ensure synchronous usage of the AssumeRoleProvider if the value is shared -// between multiple Credentials or service clients. -// -// # Assume Role -// -// To assume an IAM role using STS with the SDK you can create a new Credentials -// with the SDKs's stscreds package. -// -// // Initial credentials loaded from SDK's default credential chain. Such as -// // the environment, shared credentials (~/.aws/credentials), or EC2 Instance -// // Role. These credentials will be used to to make the STS Assume Role API. -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } -// -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN. -// stsSvc := sts.NewFromConfig(cfg) -// creds := stscreds.NewAssumeRoleProvider(stsSvc, "myRoleArn") -// -// cfg.Credentials = aws.NewCredentialsCache(creds) -// -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) -// -// # Assume Role with custom MFA Token provider -// -// To assume an IAM role with a MFA token you can either specify a custom MFA -// token provider or use the SDK's built in StdinTokenProvider that will prompt -// the user for a token code each time the credentials need to to be refreshed. -// Specifying a custom token provider allows you to control where the token -// code is retrieved from, and how it is refreshed. -// -// With a custom token provider, the provider is responsible for refreshing the -// token code when called. -// -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } -// -// staticTokenProvider := func() (string, error) { -// return someTokenCode, nil -// } -// -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN using the MFA token code provided. -// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { -// o.SerialNumber = aws.String("myTokenSerialNumber") -// o.TokenProvider = staticTokenProvider -// }) -// -// cfg.Credentials = aws.NewCredentialsCache(creds) -// -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) -// -// # Assume Role with MFA Token Provider -// -// To assume an IAM role with MFA for longer running tasks where the credentials -// may need to be refreshed setting the TokenProvider field of AssumeRoleProvider -// will allow the credential provider to prompt for new MFA token code when the -// role's credentials need to be refreshed. -// -// The StdinTokenProvider function is available to prompt on stdin to retrieve -// the MFA token code from the user. You can also implement custom prompts by -// satisfying the TokenProvider function signature. -// -// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will -// have undesirable results as the StdinTokenProvider will not be synchronized. A -// single Credentials with an AssumeRoleProvider can be shared safely. -// -// cfg, err := config.LoadDefaultConfig(context.TODO()) -// if err != nil { -// panic(err) -// } -// -// // Create the credentials from AssumeRoleProvider to assume the role -// // referenced by the "myRoleARN" ARN using the MFA token code provided. -// creds := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(cfg), "myRoleArn", func(o *stscreds.AssumeRoleOptions) { -// o.SerialNumber = aws.String("myTokenSerialNumber") -// o.TokenProvider = stscreds.StdinTokenProvider -// }) -// -// cfg.Credentials = aws.NewCredentialsCache(creds) -// -// // Create service client value configured for credentials -// // from assumed role. -// svc := s3.NewFromConfig(cfg) -package stscreds - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/service/sts" - "github.com/aws/aws-sdk-go-v2/service/sts/types" -) - -// StdinTokenProvider will prompt on stdout and read from stdin for a string value. -// An error is returned if reading from stdin fails. -// -// Use this function go read MFA tokens from stdin. The function makes no attempt -// to make atomic prompts from stdin across multiple gorouties. -// -// Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will -// have undesirable results as the StdinTokenProvider will not be synchronized. A -// single Credentials with an AssumeRoleProvider can be shared safely -// -// Will wait forever until something is provided on the stdin. -func StdinTokenProvider() (string, error) { - var v string - fmt.Printf("Assume Role MFA token code: ") - _, err := fmt.Scanln(&v) - - return v, err -} - -// ProviderName provides a name of AssumeRole provider -const ProviderName = "AssumeRoleProvider" - -// AssumeRoleAPIClient is a client capable of the STS AssumeRole operation. -type AssumeRoleAPIClient interface { - AssumeRole(ctx context.Context, params *sts.AssumeRoleInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleOutput, error) -} - -// DefaultDuration is the default amount of time in minutes that the -// credentials will be valid for. This value is only used by AssumeRoleProvider -// for specifying the default expiry duration of an assume role. -// -// Other providers such as WebIdentityRoleProvider do not use this value, and -// instead rely on STS API's default parameter handing to assign a default -// value. -var DefaultDuration = time.Duration(15) * time.Minute - -// AssumeRoleProvider retrieves temporary credentials from the STS service, and -// keeps track of their expiration time. -// -// This credential provider will be used by the SDKs default credential change -// when shared configuration is enabled, and the shared config or shared credentials -// file configure assume role. See Session docs for how to do this. -// -// AssumeRoleProvider does not provide any synchronization and it is not safe -// to share this value across multiple Credentials, Sessions, or service clients -// without also sharing the same Credentials instance. -type AssumeRoleProvider struct { - options AssumeRoleOptions -} - -// AssumeRoleOptions is the configurable options for AssumeRoleProvider -type AssumeRoleOptions struct { - // Client implementation of the AssumeRole operation. Required - Client AssumeRoleAPIClient - - // IAM Role ARN to be assumed. Required - RoleARN string - - // Session name, if you wish to uniquely identify this session. - RoleSessionName string - - // Expiry duration of the STS credentials. Defaults to 15 minutes if not set. - Duration time.Duration - - // Optional ExternalID to pass along, defaults to nil if not set. - ExternalID *string - - // The policy plain text must be 2048 bytes or shorter. However, an internal - // conversion compresses it into a packed binary format with a separate limit. - // The PackedPolicySize response element indicates by percentage how close to - // the upper size limit the policy is, with 100% equaling the maximum allowed - // size. - Policy *string - - // The ARNs of IAM managed policies you want to use as managed session policies. - // The policies must exist in the same account as the role. - // - // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plain text that you use for both inline and managed session - // policies can't exceed 2,048 characters. - // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. - // - // Passing policies to this operation returns new temporary credentials. The - // resulting session's permissions are the intersection of the role's identity-based - // policy and the session policies. You can use the role's temporary credentials - // in subsequent AWS API calls to access resources in the account that owns - // the role. You cannot use session policies to grant more permissions than - // those allowed by the identity-based policy of the role that is being assumed. - // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) - // in the IAM User Guide. - PolicyARNs []types.PolicyDescriptorType - - // The identification number of the MFA device that is associated with the user - // who is making the AssumeRole call. Specify this value if the trust policy - // of the role being assumed includes a condition that requires MFA authentication. - // The value is either the serial number for a hardware device (such as GAHT12345678) - // or an Amazon Resource Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). - SerialNumber *string - - // The source identity specified by the principal that is calling the AssumeRole - // operation. You can require users to specify a source identity when they assume a - // role. You do this by using the sts:SourceIdentity condition key in a role trust - // policy. You can use source identity information in CloudTrail logs to determine - // who took actions with a role. You can use the aws:SourceIdentity condition key - // to further control access to Amazon Web Services resources based on the value of - // source identity. For more information about using source identity, see Monitor - // and control actions taken with assumed roles - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) - // in the IAM User Guide. - SourceIdentity *string - - // Async method of providing MFA token code for assuming an IAM role with MFA. - // The value returned by the function will be used as the TokenCode in the Retrieve - // call. See StdinTokenProvider for a provider that prompts and reads from stdin. - // - // This token provider will be called when ever the assumed role's - // credentials need to be refreshed when SerialNumber is set. - TokenProvider func() (string, error) - - // A list of session tags that you want to pass. Each session tag consists of a key - // name and an associated value. For more information about session tags, see - // Tagging STS Sessions - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in the - // IAM User Guide. This parameter is optional. You can pass up to 50 session tags. - Tags []types.Tag - - // A list of keys for session tags that you want to set as transitive. If you set a - // tag key as transitive, the corresponding key and value passes to subsequent - // sessions in a role chain. For more information, see Chaining Roles with Session - // Tags - // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining) - // in the IAM User Guide. This parameter is optional. - TransitiveTagKeys []string - - // The chain of providers that was used to create this provider - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// NewAssumeRoleProvider constructs and returns a credentials provider that -// will retrieve credentials by assuming a IAM role using STS. -func NewAssumeRoleProvider(client AssumeRoleAPIClient, roleARN string, optFns ...func(*AssumeRoleOptions)) *AssumeRoleProvider { - o := AssumeRoleOptions{ - Client: client, - RoleARN: roleARN, - } - - for _, fn := range optFns { - fn(&o) - } - - return &AssumeRoleProvider{ - options: o, - } -} - -// Retrieve generates a new set of temporary credentials using STS. -func (p *AssumeRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error) { - // Apply defaults where parameters are not set. - if len(p.options.RoleSessionName) == 0 { - // Try to work out a role name that will hopefully end up unique. - p.options.RoleSessionName = fmt.Sprintf("aws-go-sdk-%d", time.Now().UTC().UnixNano()) - } - if p.options.Duration == 0 { - // Expire as often as AWS permits. - p.options.Duration = DefaultDuration - } - input := &sts.AssumeRoleInput{ - DurationSeconds: aws.Int32(int32(p.options.Duration / time.Second)), - PolicyArns: p.options.PolicyARNs, - RoleArn: aws.String(p.options.RoleARN), - RoleSessionName: aws.String(p.options.RoleSessionName), - ExternalId: p.options.ExternalID, - SourceIdentity: p.options.SourceIdentity, - Tags: p.options.Tags, - TransitiveTagKeys: p.options.TransitiveTagKeys, - } - if p.options.Policy != nil { - input.Policy = p.options.Policy - } - if p.options.SerialNumber != nil { - if p.options.TokenProvider != nil { - input.SerialNumber = p.options.SerialNumber - code, err := p.options.TokenProvider() - if err != nil { - return aws.Credentials{}, err - } - input.TokenCode = aws.String(code) - } else { - return aws.Credentials{}, fmt.Errorf("assume role with MFA enabled, but TokenProvider is not set") - } - } - - resp, err := p.options.Client.AssumeRole(ctx, input) - if err != nil { - return aws.Credentials{Source: ProviderName}, err - } - - var accountID string - if resp.AssumedRoleUser != nil { - accountID = getAccountID(resp.AssumedRoleUser) - } - - return aws.Credentials{ - AccessKeyID: *resp.Credentials.AccessKeyId, - SecretAccessKey: *resp.Credentials.SecretAccessKey, - SessionToken: *resp.Credentials.SessionToken, - Source: ProviderName, - - CanExpire: true, - Expires: *resp.Credentials.Expiration, - AccountID: accountID, - }, nil -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *AssumeRoleProvider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceSTSAssumeRole} - } // If no source has been set, assume this is used directly which means just call to assume role - return append(p.options.CredentialSources, aws.CredentialSourceSTSAssumeRole) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go deleted file mode 100644 index 5f4286dda4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/credentials/stscreds/web_identity_provider.go +++ /dev/null @@ -1,181 +0,0 @@ -package stscreds - -import ( - "context" - "fmt" - "io/ioutil" - "strconv" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/aws-sdk-go-v2/service/sts" - "github.com/aws/aws-sdk-go-v2/service/sts/types" -) - -var invalidIdentityTokenExceptionCode = (&types.InvalidIdentityTokenException{}).ErrorCode() - -const ( - // WebIdentityProviderName is the web identity provider name - WebIdentityProviderName = "WebIdentityCredentials" -) - -// AssumeRoleWithWebIdentityAPIClient is a client capable of the STS AssumeRoleWithWebIdentity operation. -type AssumeRoleWithWebIdentityAPIClient interface { - AssumeRoleWithWebIdentity(ctx context.Context, params *sts.AssumeRoleWithWebIdentityInput, optFns ...func(*sts.Options)) (*sts.AssumeRoleWithWebIdentityOutput, error) -} - -// WebIdentityRoleProvider is used to retrieve credentials using -// an OIDC token. -type WebIdentityRoleProvider struct { - options WebIdentityRoleOptions -} - -// WebIdentityRoleOptions is a structure of configurable options for WebIdentityRoleProvider -type WebIdentityRoleOptions struct { - // Client implementation of the AssumeRoleWithWebIdentity operation. Required - Client AssumeRoleWithWebIdentityAPIClient - - // JWT Token Provider. Required - TokenRetriever IdentityTokenRetriever - - // IAM Role ARN to assume. Required - RoleARN string - - // Session name, if you wish to uniquely identify this session. - RoleSessionName string - - // Expiry duration of the STS credentials. STS will assign a default expiry - // duration if this value is unset. This is different from the Duration - // option of AssumeRoleProvider, which automatically assigns 15 minutes if - // Duration is unset. - // - // See the STS AssumeRoleWithWebIdentity API reference guide for more - // information on defaults. - // https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html - Duration time.Duration - - // An IAM policy in JSON format that you want to use as an inline session policy. - Policy *string - - // The Amazon Resource Names (ARNs) of the IAM managed policies that you - // want to use as managed session policies. The policies must exist in the - // same account as the role. - PolicyARNs []types.PolicyDescriptorType - - // The chain of providers that was used to create this provider - // These values are for reporting purposes and are not meant to be set up directly - CredentialSources []aws.CredentialSource -} - -// IdentityTokenRetriever is an interface for retrieving a JWT -type IdentityTokenRetriever interface { - GetIdentityToken() ([]byte, error) -} - -// IdentityTokenFile is for retrieving an identity token from the given file name -type IdentityTokenFile string - -// GetIdentityToken retrieves the JWT token from the file and returns the contents as a []byte -func (j IdentityTokenFile) GetIdentityToken() ([]byte, error) { - b, err := ioutil.ReadFile(string(j)) - if err != nil { - return nil, fmt.Errorf("unable to read file at %s: %v", string(j), err) - } - - return b, nil -} - -// NewWebIdentityRoleProvider will return a new WebIdentityRoleProvider with the -// provided stsiface.ClientAPI -func NewWebIdentityRoleProvider(client AssumeRoleWithWebIdentityAPIClient, roleARN string, tokenRetriever IdentityTokenRetriever, optFns ...func(*WebIdentityRoleOptions)) *WebIdentityRoleProvider { - o := WebIdentityRoleOptions{ - Client: client, - RoleARN: roleARN, - TokenRetriever: tokenRetriever, - } - - for _, fn := range optFns { - fn(&o) - } - - return &WebIdentityRoleProvider{options: o} -} - -// Retrieve will attempt to assume a role from a token which is located at -// 'WebIdentityTokenFilePath' specified destination and if that is empty an -// error will be returned. -func (p *WebIdentityRoleProvider) Retrieve(ctx context.Context) (aws.Credentials, error) { - b, err := p.options.TokenRetriever.GetIdentityToken() - if err != nil { - return aws.Credentials{}, fmt.Errorf("failed to retrieve jwt from provide source, %w", err) - } - - sessionName := p.options.RoleSessionName - if len(sessionName) == 0 { - // session name is used to uniquely identify a session. This simply - // uses unix time in nanoseconds to uniquely identify sessions. - sessionName = strconv.FormatInt(sdk.NowTime().UnixNano(), 10) - } - input := &sts.AssumeRoleWithWebIdentityInput{ - PolicyArns: p.options.PolicyARNs, - RoleArn: &p.options.RoleARN, - RoleSessionName: &sessionName, - WebIdentityToken: aws.String(string(b)), - } - if p.options.Duration != 0 { - // If set use the value, otherwise STS will assign a default expiration duration. - input.DurationSeconds = aws.Int32(int32(p.options.Duration / time.Second)) - } - if p.options.Policy != nil { - input.Policy = p.options.Policy - } - - resp, err := p.options.Client.AssumeRoleWithWebIdentity(ctx, input, func(options *sts.Options) { - options.Retryer = retry.AddWithErrorCodes(options.Retryer, invalidIdentityTokenExceptionCode) - }) - if err != nil { - return aws.Credentials{}, fmt.Errorf("failed to retrieve credentials, %w", err) - } - - var accountID string - if resp.AssumedRoleUser != nil { - accountID = getAccountID(resp.AssumedRoleUser) - } - - // InvalidIdentityToken error is a temporary error that can occur - // when assuming an Role with a JWT web identity token. - - value := aws.Credentials{ - AccessKeyID: aws.ToString(resp.Credentials.AccessKeyId), - SecretAccessKey: aws.ToString(resp.Credentials.SecretAccessKey), - SessionToken: aws.ToString(resp.Credentials.SessionToken), - Source: WebIdentityProviderName, - CanExpire: true, - Expires: *resp.Credentials.Expiration, - AccountID: accountID, - } - return value, nil -} - -// extract accountID from arn with format "arn:partition:service:region:account-id:[resource-section]" -func getAccountID(u *types.AssumedRoleUser) string { - if u.Arn == nil { - return "" - } - parts := strings.Split(*u.Arn, ":") - if len(parts) < 5 { - return "" - } - return parts[4] -} - -// ProviderSources returns the credential chain that was used to construct this provider -func (p *WebIdentityRoleProvider) ProviderSources() []aws.CredentialSource { - if p.options.CredentialSources == nil { - return []aws.CredentialSource{aws.CredentialSourceSTSAssumeRoleWebID} - } - return p.options.CredentialSources -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md deleted file mode 100644 index 6b8c454739..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/CHANGELOG.md +++ /dev/null @@ -1,494 +0,0 @@ -# v1.18.9 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.8 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.6 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.3 (2025-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2025-07-29) - -* **Feature**: Add config switch `DisableDefaultMaxBackoff` that allows you to disable the default maximum backoff (1 second) for IMDS calls retry attempt - -# v1.17.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.33 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.32 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.31 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.30 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.29 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.28 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.27 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.26 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.25 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.16.24 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.23 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.22 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.21 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.20 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.19 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.18 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.17 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.16 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.15 (2024-10-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.14 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.13 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.12 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.11 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.10 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.9 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.7 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.6 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.5 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.4 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.3 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.1 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2024-03-21) - -* **Feature**: Add config switch `DisableDefaultTimeout` that allows you to disable the default operation timeout (5 seconds) for IMDS calls. - -# v1.15.4 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.3 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.11 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.10 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.9 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.8 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.7 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.6 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.5 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.4 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.3 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.2 (2023-11-02) - -* No change notes available for this release. - -# v1.14.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.13 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.12 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.11 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.10 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.9 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2023-03-14) - -* **Feature**: Add flag to disable IMDSv1 fallback - -# v1.12.24 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.23 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.22 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.19 (2022-10-24) - -* **Bug Fix**: Fixes an issue that prevented logging of the API request or responses when the respective log modes were enabled. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-11-06) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-10-11) - -* **Feature**: Respect passed in Context Deadline/Timeout. Updates the IMDS Client operations to not override the passed in Context's Deadline or Timeout options. If an Client operation is called with a Context with a Deadline or Timeout, the client will no longer override it with the client's default timeout. -* **Bug Fix**: Fix IMDS client's response handling and operation timeout race. Fixes #1253 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-04) - -* **Feature**: adds error handling for defered close calls -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-07-15) - -* **Feature**: Support has been added for EC2 IPv6-enabled Instance Metadata Service Endpoints. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go deleted file mode 100644 index 75edc4e9d6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_client.go +++ /dev/null @@ -1,358 +0,0 @@ -package imds - -import ( - "context" - "fmt" - "net" - "net/http" - "os" - "strings" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/retry" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalconfig "github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// ServiceID provides the unique name of this API client -const ServiceID = "ec2imds" - -// Client provides the API client for interacting with the Amazon EC2 Instance -// Metadata Service API. -type Client struct { - options Options -} - -// ClientEnableState provides an enumeration if the client is enabled, -// disabled, or default behavior. -type ClientEnableState = internalconfig.ClientEnableState - -// Enumeration values for ClientEnableState -const ( - ClientDefaultEnableState ClientEnableState = internalconfig.ClientDefaultEnableState // default behavior - ClientDisabled ClientEnableState = internalconfig.ClientDisabled // client disabled - ClientEnabled ClientEnableState = internalconfig.ClientEnabled // client enabled -) - -// EndpointModeState is an enum configuration variable describing the client endpoint mode. -// Not configurable directly, but used when using the NewFromConfig. -type EndpointModeState = internalconfig.EndpointModeState - -// Enumeration values for EndpointModeState -const ( - EndpointModeStateUnset EndpointModeState = internalconfig.EndpointModeStateUnset - EndpointModeStateIPv4 EndpointModeState = internalconfig.EndpointModeStateIPv4 - EndpointModeStateIPv6 EndpointModeState = internalconfig.EndpointModeStateIPv6 -) - -const ( - disableClientEnvVar = "AWS_EC2_METADATA_DISABLED" - - // Client endpoint options - endpointEnvVar = "AWS_EC2_METADATA_SERVICE_ENDPOINT" - - defaultIPv4Endpoint = "http://169.254.169.254" - defaultIPv6Endpoint = "http://[fd00:ec2::254]" -) - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - options.HTTPClient = resolveHTTPClient(options.HTTPClient) - - if options.Retryer == nil { - options.Retryer = retry.NewStandard() - } - if !options.DisableDefaultMaxBackoff { - options.Retryer = retry.AddWithMaxBackoffDelay(options.Retryer, 1*time.Second) - } - - if options.ClientEnableState == ClientDefaultEnableState { - if v := os.Getenv(disableClientEnvVar); strings.EqualFold(v, "true") { - options.ClientEnableState = ClientDisabled - } - } - - if len(options.Endpoint) == 0 { - if v := os.Getenv(endpointEnvVar); len(v) != 0 { - options.Endpoint = v - } - } - - client := &Client{ - options: options, - } - - if client.options.tokenProvider == nil && !client.options.disableAPIToken { - client.options.tokenProvider = newTokenProvider(client, defaultTokenTTL) - } - - return client -} - -// NewFromConfig returns an initialized Client based the AWS SDK config, and -// functional options. Provide additional functional options to further -// configure the behavior of the client, such as changing the client's endpoint -// or adding custom middleware behavior. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - APIOptions: append([]func(*middleware.Stack) error{}, cfg.APIOptions...), - HTTPClient: cfg.HTTPClient, - ClientLogMode: cfg.ClientLogMode, - Logger: cfg.Logger, - } - - if cfg.Retryer != nil { - opts.Retryer = cfg.Retryer() - } - - resolveClientEnableState(cfg, &opts) - resolveEndpointConfig(cfg, &opts) - resolveEndpointModeConfig(cfg, &opts) - resolveEnableFallback(cfg, &opts) - - return New(opts, optFns...) -} - -// Options provides the fields for configuring the API client's behavior. -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation - // call to modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The endpoint the client will use to retrieve EC2 instance metadata. - // - // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EndpointMode. - // - // If unset, and the environment variable AWS_EC2_METADATA_SERVICE_ENDPOINT - // has a value the client will use the value of the environment variable as - // the endpoint for operation calls. - // - // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] - Endpoint string - - // The endpoint selection mode the client will use if no explicit endpoint is provided using the Endpoint field. - // - // Setting EndpointMode to EndpointModeStateIPv4 will configure the client to use the default EC2 IPv4 endpoint. - // Setting EndpointMode to EndpointModeStateIPv6 will configure the client to use the default EC2 IPv6 endpoint. - // - // By default if EndpointMode is not set (EndpointModeStateUnset) than the default endpoint selection mode EndpointModeStateIPv4. - EndpointMode EndpointModeState - - // The HTTP client to invoke API calls with. Defaults to client's default - // HTTP implementation if nil. - HTTPClient HTTPClient - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. - Retryer aws.Retryer - - // Changes if the EC2 Instance Metadata client is enabled or not. Client - // will default to enabled if not set to ClientDisabled. When the client is - // disabled it will return an error for all operation calls. - // - // If ClientEnableState value is ClientDefaultEnableState (default value), - // and the environment variable "AWS_EC2_METADATA_DISABLED" is set to - // "true", the client will be disabled. - // - // AWS_EC2_METADATA_DISABLED=true - ClientEnableState ClientEnableState - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // Configure IMDSv1 fallback behavior. By default, the client will attempt - // to fall back to IMDSv1 as needed for backwards compatibility. When set to [aws.FalseTernary] - // the client will return any errors encountered from attempting to fetch a token - // instead of silently using the insecure data flow of IMDSv1. - // - // See [configuring IMDS] for more information. - // - // [configuring IMDS]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html - EnableFallback aws.Ternary - - // By default, all IMDS client operations enforce a 5-second timeout. You - // can disable that behavior with this setting. - DisableDefaultTimeout bool - - // By default all IMDS client operations enforce a 1-second retry delay at maximum. - // You can disable that behavior with this setting. - DisableDefaultMaxBackoff bool - - // provides the caching of API tokens used for operation calls. If unset, - // the API token will not be retrieved for the operation. - tokenProvider *tokenProvider - - // option to disable the API token provider for testing. - disableAPIToken bool -} - -// HTTPClient provides the interface for a client making HTTP requests with the -// API. -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -// Copy creates a copy of the API options. -func (o Options) Copy() Options { - to := o - to.APIOptions = append([]func(*middleware.Stack) error{}, o.APIOptions...) - return to -} - -// WithAPIOptions wraps the API middleware functions, as a functional option -// for the API Client Options. Use this helper to add additional functional -// options to the API client, or operation calls. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), - stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - for _, fn := range optFns { - fn(&options) - } - - if options.ClientEnableState == ClientDisabled { - return nil, metadata, &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: fmt.Errorf( - "access disabled to EC2 IMDS via client option, or %q environment variable", - disableClientEnvVar), - } - } - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) - if err != nil { - return nil, metadata, &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - return result, metadata, err -} - -const ( - // HTTP client constants - defaultDialerTimeout = 250 * time.Millisecond - defaultResponseHeaderTimeout = 500 * time.Millisecond -) - -func resolveHTTPClient(client HTTPClient) HTTPClient { - if client == nil { - client = awshttp.NewBuildableClient() - } - - if c, ok := client.(*awshttp.BuildableClient); ok { - client = c. - WithDialerOptions(func(d *net.Dialer) { - // Use a custom Dial timeout for the EC2 Metadata service to account - // for the possibility the application might not be running in an - // environment with the service present. The client should fail fast in - // this case. - d.Timeout = defaultDialerTimeout - }). - WithTransportOptions(func(tr *http.Transport) { - // Use a custom Transport timeout for the EC2 Metadata service to - // account for the possibility that the application might be running in - // a container, and EC2Metadata service drops the connection after a - // single IP Hop. The client should fail fast in this case. - tr.ResponseHeaderTimeout = defaultResponseHeaderTimeout - }) - } - - return client -} - -func resolveClientEnableState(cfg aws.Config, options *Options) error { - if options.ClientEnableState != ClientDefaultEnableState { - return nil - } - value, found, err := internalconfig.ResolveClientEnableState(cfg.ConfigSources) - if err != nil || !found { - return err - } - options.ClientEnableState = value - return nil -} - -func resolveEndpointModeConfig(cfg aws.Config, options *Options) error { - if options.EndpointMode != EndpointModeStateUnset { - return nil - } - value, found, err := internalconfig.ResolveEndpointModeConfig(cfg.ConfigSources) - if err != nil || !found { - return err - } - options.EndpointMode = value - return nil -} - -func resolveEndpointConfig(cfg aws.Config, options *Options) error { - if len(options.Endpoint) != 0 { - return nil - } - value, found, err := internalconfig.ResolveEndpointConfig(cfg.ConfigSources) - if err != nil || !found { - return err - } - options.Endpoint = value - return nil -} - -func resolveEnableFallback(cfg aws.Config, options *Options) { - if options.EnableFallback != aws.UnknownTernary { - return - } - - disabled, ok := internalconfig.ResolveV1FallbackDisabled(cfg.ConfigSources) - if !ok { - return - } - - if disabled { - options.EnableFallback = aws.FalseTernary - } else { - options.EnableFallback = aws.TrueTernary - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go deleted file mode 100644 index af58b6bb10..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetDynamicData.go +++ /dev/null @@ -1,77 +0,0 @@ -package imds - -import ( - "context" - "fmt" - "io" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getDynamicDataPath = "/latest/dynamic" - -// GetDynamicData uses the path provided to request information from the EC2 -// instance metadata service for dynamic data. The content will be returned -// as a string, or error if the request failed. -func (c *Client) GetDynamicData(ctx context.Context, params *GetDynamicDataInput, optFns ...func(*Options)) (*GetDynamicDataOutput, error) { - if params == nil { - params = &GetDynamicDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetDynamicData", params, optFns, - addGetDynamicDataMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetDynamicDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetDynamicDataInput provides the input parameters for the GetDynamicData -// operation. -type GetDynamicDataInput struct { - // The relative dynamic data path to retrieve. Can be empty string to - // retrieve a response containing a new line separated list of dynamic data - // resources available. - // - // Must not include the dynamic data base path. - // - // May include leading slash. If Path includes trailing slash the trailing - // slash will be included in the request for the resource. - Path string -} - -// GetDynamicDataOutput provides the output parameters for the GetDynamicData -// operation. -type GetDynamicDataOutput struct { - Content io.ReadCloser - - ResultMetadata middleware.Metadata -} - -func addGetDynamicDataMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetDynamicData", - buildGetDynamicDataPath, - buildGetDynamicDataOutput) -} - -func buildGetDynamicDataPath(params interface{}) (string, error) { - p, ok := params.(*GetDynamicDataInput) - if !ok { - return "", fmt.Errorf("unknown parameter type %T", params) - } - - return appendURIPath(getDynamicDataPath, p.Path), nil -} - -func buildGetDynamicDataOutput(resp *smithyhttp.Response) (interface{}, error) { - return &GetDynamicDataOutput{ - Content: resp.Body, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go deleted file mode 100644 index 5111cc90ca..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetIAMInfo.go +++ /dev/null @@ -1,103 +0,0 @@ -package imds - -import ( - "context" - "encoding/json" - "fmt" - "io" - "strings" - "time" - - "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getIAMInfoPath = getMetadataPath + "/iam/info" - -// GetIAMInfo retrieves an identity document describing an -// instance. Error is returned if the request fails or is unable to parse -// the response. -func (c *Client) GetIAMInfo( - ctx context.Context, params *GetIAMInfoInput, optFns ...func(*Options), -) ( - *GetIAMInfoOutput, error, -) { - if params == nil { - params = &GetIAMInfoInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetIAMInfo", params, optFns, - addGetIAMInfoMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetIAMInfoOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetIAMInfoInput provides the input parameters for GetIAMInfo operation. -type GetIAMInfoInput struct{} - -// GetIAMInfoOutput provides the output parameters for GetIAMInfo operation. -type GetIAMInfoOutput struct { - IAMInfo - - ResultMetadata middleware.Metadata -} - -func addGetIAMInfoMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetIAMInfo", - buildGetIAMInfoPath, - buildGetIAMInfoOutput, - ) -} - -func buildGetIAMInfoPath(params interface{}) (string, error) { - return getIAMInfoPath, nil -} - -func buildGetIAMInfoOutput(resp *smithyhttp.Response) (v interface{}, err error) { - defer func() { - closeErr := resp.Body.Close() - if err == nil { - err = closeErr - } else if closeErr != nil { - err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err) - } - }() - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(resp.Body, ringBuffer) - - imdsResult := &GetIAMInfoOutput{} - if err = json.NewDecoder(body).Decode(&imdsResult.IAMInfo); err != nil { - return nil, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode instance identity document, %w", err), - Snapshot: ringBuffer.Bytes(), - } - } - // Any code other success is an error - if !strings.EqualFold(imdsResult.Code, "success") { - return nil, fmt.Errorf("failed to get EC2 IMDS IAM info, %s", - imdsResult.Code) - } - - return imdsResult, nil -} - -// IAMInfo provides the shape for unmarshaling an IAM info from the metadata -// API. -type IAMInfo struct { - Code string - LastUpdated time.Time - InstanceProfileArn string - InstanceProfileID string -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go deleted file mode 100644 index dc8c09edf0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetInstanceIdentityDocument.go +++ /dev/null @@ -1,110 +0,0 @@ -package imds - -import ( - "context" - "encoding/json" - "fmt" - "io" - "time" - - "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getInstanceIdentityDocumentPath = getDynamicDataPath + "/instance-identity/document" - -// GetInstanceIdentityDocument retrieves an identity document describing an -// instance. Error is returned if the request fails or is unable to parse -// the response. -func (c *Client) GetInstanceIdentityDocument( - ctx context.Context, params *GetInstanceIdentityDocumentInput, optFns ...func(*Options), -) ( - *GetInstanceIdentityDocumentOutput, error, -) { - if params == nil { - params = &GetInstanceIdentityDocumentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetInstanceIdentityDocument", params, optFns, - addGetInstanceIdentityDocumentMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetInstanceIdentityDocumentOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetInstanceIdentityDocumentInput provides the input parameters for -// GetInstanceIdentityDocument operation. -type GetInstanceIdentityDocumentInput struct{} - -// GetInstanceIdentityDocumentOutput provides the output parameters for -// GetInstanceIdentityDocument operation. -type GetInstanceIdentityDocumentOutput struct { - InstanceIdentityDocument - - ResultMetadata middleware.Metadata -} - -func addGetInstanceIdentityDocumentMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetInstanceIdentityDocument", - buildGetInstanceIdentityDocumentPath, - buildGetInstanceIdentityDocumentOutput, - ) -} - -func buildGetInstanceIdentityDocumentPath(params interface{}) (string, error) { - return getInstanceIdentityDocumentPath, nil -} - -func buildGetInstanceIdentityDocumentOutput(resp *smithyhttp.Response) (v interface{}, err error) { - defer func() { - closeErr := resp.Body.Close() - if err == nil { - err = closeErr - } else if closeErr != nil { - err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err) - } - }() - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(resp.Body, ringBuffer) - - output := &GetInstanceIdentityDocumentOutput{} - if err = json.NewDecoder(body).Decode(&output.InstanceIdentityDocument); err != nil { - return nil, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode instance identity document, %w", err), - Snapshot: ringBuffer.Bytes(), - } - } - - return output, nil -} - -// InstanceIdentityDocument provides the shape for unmarshaling -// an instance identity document -type InstanceIdentityDocument struct { - DevpayProductCodes []string `json:"devpayProductCodes"` - MarketplaceProductCodes []string `json:"marketplaceProductCodes"` - AvailabilityZone string `json:"availabilityZone"` - PrivateIP string `json:"privateIp"` - Version string `json:"version"` - Region string `json:"region"` - InstanceID string `json:"instanceId"` - BillingProducts []string `json:"billingProducts"` - InstanceType string `json:"instanceType"` - AccountID string `json:"accountId"` - PendingTime time.Time `json:"pendingTime"` - ImageID string `json:"imageId"` - KernelID string `json:"kernelId"` - RamdiskID string `json:"ramdiskId"` - Architecture string `json:"architecture"` -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go deleted file mode 100644 index 869bfc9feb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetMetadata.go +++ /dev/null @@ -1,77 +0,0 @@ -package imds - -import ( - "context" - "fmt" - "io" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getMetadataPath = "/latest/meta-data" - -// GetMetadata uses the path provided to request information from the Amazon -// EC2 Instance Metadata Service. The content will be returned as a string, or -// error if the request failed. -func (c *Client) GetMetadata(ctx context.Context, params *GetMetadataInput, optFns ...func(*Options)) (*GetMetadataOutput, error) { - if params == nil { - params = &GetMetadataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetMetadata", params, optFns, - addGetMetadataMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetMetadataOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetMetadataInput provides the input parameters for the GetMetadata -// operation. -type GetMetadataInput struct { - // The relative metadata path to retrieve. Can be empty string to retrieve - // a response containing a new line separated list of metadata resources - // available. - // - // Must not include the metadata base path. - // - // May include leading slash. If Path includes trailing slash the trailing slash - // will be included in the request for the resource. - Path string -} - -// GetMetadataOutput provides the output parameters for the GetMetadata -// operation. -type GetMetadataOutput struct { - Content io.ReadCloser - - ResultMetadata middleware.Metadata -} - -func addGetMetadataMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetMetadata", - buildGetMetadataPath, - buildGetMetadataOutput) -} - -func buildGetMetadataPath(params interface{}) (string, error) { - p, ok := params.(*GetMetadataInput) - if !ok { - return "", fmt.Errorf("unknown parameter type %T", params) - } - - return appendURIPath(getMetadataPath, p.Path), nil -} - -func buildGetMetadataOutput(resp *smithyhttp.Response) (interface{}, error) { - return &GetMetadataOutput{ - Content: resp.Body, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go deleted file mode 100644 index 8c0572bb5c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetRegion.go +++ /dev/null @@ -1,73 +0,0 @@ -package imds - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// GetRegion retrieves an identity document describing an -// instance. Error is returned if the request fails or is unable to parse -// the response. -func (c *Client) GetRegion( - ctx context.Context, params *GetRegionInput, optFns ...func(*Options), -) ( - *GetRegionOutput, error, -) { - if params == nil { - params = &GetRegionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetRegion", params, optFns, - addGetRegionMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetRegionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetRegionInput provides the input parameters for GetRegion operation. -type GetRegionInput struct{} - -// GetRegionOutput provides the output parameters for GetRegion operation. -type GetRegionOutput struct { - Region string - - ResultMetadata middleware.Metadata -} - -func addGetRegionMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetRegion", - buildGetInstanceIdentityDocumentPath, - buildGetRegionOutput, - ) -} - -func buildGetRegionOutput(resp *smithyhttp.Response) (interface{}, error) { - out, err := buildGetInstanceIdentityDocumentOutput(resp) - if err != nil { - return nil, err - } - - result, ok := out.(*GetInstanceIdentityDocumentOutput) - if !ok { - return nil, fmt.Errorf("unexpected instance identity document type, %T", out) - } - - region := result.Region - if len(region) == 0 { - return "", fmt.Errorf("instance metadata did not return a region value") - } - - return &GetRegionOutput{ - Region: region, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go deleted file mode 100644 index 1f9ee97a5b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetToken.go +++ /dev/null @@ -1,119 +0,0 @@ -package imds - -import ( - "context" - "fmt" - "io" - "strconv" - "strings" - "time" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getTokenPath = "/latest/api/token" -const tokenTTLHeader = "X-Aws-Ec2-Metadata-Token-Ttl-Seconds" - -// getToken uses the duration to return a token for EC2 IMDS, or an error if -// the request failed. -func (c *Client) getToken(ctx context.Context, params *getTokenInput, optFns ...func(*Options)) (*getTokenOutput, error) { - if params == nil { - params = &getTokenInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "getToken", params, optFns, - addGetTokenMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*getTokenOutput) - out.ResultMetadata = metadata - return out, nil -} - -type getTokenInput struct { - TokenTTL time.Duration -} - -type getTokenOutput struct { - Token string - TokenTTL time.Duration - - ResultMetadata middleware.Metadata -} - -func addGetTokenMiddleware(stack *middleware.Stack, options Options) error { - err := addRequestMiddleware(stack, - options, - "PUT", - "GetToken", - buildGetTokenPath, - buildGetTokenOutput) - if err != nil { - return err - } - - err = stack.Serialize.Add(&tokenTTLRequestHeader{}, middleware.After) - if err != nil { - return err - } - - return nil -} - -func buildGetTokenPath(interface{}) (string, error) { - return getTokenPath, nil -} - -func buildGetTokenOutput(resp *smithyhttp.Response) (v interface{}, err error) { - defer func() { - closeErr := resp.Body.Close() - if err == nil { - err = closeErr - } else if closeErr != nil { - err = fmt.Errorf("response body close error: %v, original error: %w", closeErr, err) - } - }() - - ttlHeader := resp.Header.Get(tokenTTLHeader) - tokenTTL, err := strconv.ParseInt(ttlHeader, 10, 64) - if err != nil { - return nil, fmt.Errorf("unable to parse API token, %w", err) - } - - var token strings.Builder - if _, err = io.Copy(&token, resp.Body); err != nil { - return nil, fmt.Errorf("unable to read API token, %w", err) - } - - return &getTokenOutput{ - Token: token.String(), - TokenTTL: time.Duration(tokenTTL) * time.Second, - }, nil -} - -type tokenTTLRequestHeader struct{} - -func (*tokenTTLRequestHeader) ID() string { return "tokenTTLRequestHeader" } -func (*tokenTTLRequestHeader) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("expect HTTP transport, got %T", in.Request) - } - - input, ok := in.Parameters.(*getTokenInput) - if !ok { - return out, metadata, fmt.Errorf("expect getTokenInput, got %T", in.Parameters) - } - - req.Header.Set(tokenTTLHeader, strconv.Itoa(int(input.TokenTTL/time.Second))) - - return next.HandleSerialize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go deleted file mode 100644 index 8903697244..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/api_op_GetUserData.go +++ /dev/null @@ -1,61 +0,0 @@ -package imds - -import ( - "context" - "io" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const getUserDataPath = "/latest/user-data" - -// GetUserData uses the path provided to request information from the EC2 -// instance metadata service for dynamic data. The content will be returned -// as a string, or error if the request failed. -func (c *Client) GetUserData(ctx context.Context, params *GetUserDataInput, optFns ...func(*Options)) (*GetUserDataOutput, error) { - if params == nil { - params = &GetUserDataInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetUserData", params, optFns, - addGetUserDataMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*GetUserDataOutput) - out.ResultMetadata = metadata - return out, nil -} - -// GetUserDataInput provides the input parameters for the GetUserData -// operation. -type GetUserDataInput struct{} - -// GetUserDataOutput provides the output parameters for the GetUserData -// operation. -type GetUserDataOutput struct { - Content io.ReadCloser - - ResultMetadata middleware.Metadata -} - -func addGetUserDataMiddleware(stack *middleware.Stack, options Options) error { - return addAPIRequestMiddleware(stack, - options, - "GetUserData", - buildGetUserDataPath, - buildGetUserDataOutput) -} - -func buildGetUserDataPath(params interface{}) (string, error) { - return getUserDataPath, nil -} - -func buildGetUserDataOutput(resp *smithyhttp.Response) (interface{}, error) { - return &GetUserDataOutput{ - Content: resp.Body, - }, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go deleted file mode 100644 index ad283cf825..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/auth.go +++ /dev/null @@ -1,48 +0,0 @@ -package imds - -import ( - "context" - "github.com/aws/smithy-go/middleware" -) - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} - -type signRequestMiddleware struct { -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go deleted file mode 100644 index d5765c36b1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// Package imds provides the API client for interacting with the Amazon EC2 -// Instance Metadata Service. -// -// All Client operation calls have a default timeout. If the operation is not -// completed before this timeout expires, the operation will be canceled. This -// timeout can be overridden through the following: -// - Set the options flag DisableDefaultTimeout -// - Provide a Context with a timeout or deadline with calling the client's operations. -// -// See the EC2 IMDS user guide for more information on using the API. -// https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html -package imds diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go deleted file mode 100644 index d7540da348..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/endpoints.go +++ /dev/null @@ -1,20 +0,0 @@ -package imds - -import ( - "context" - "github.com/aws/smithy-go/middleware" -) - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go deleted file mode 100644 index ce89f5829d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package imds - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.18.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go deleted file mode 100644 index ce77455893..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config/resolvers.go +++ /dev/null @@ -1,114 +0,0 @@ -package config - -import ( - "fmt" - "strings" -) - -// ClientEnableState provides an enumeration if the client is enabled, -// disabled, or default behavior. -type ClientEnableState uint - -// Enumeration values for ClientEnableState -const ( - ClientDefaultEnableState ClientEnableState = iota - ClientDisabled - ClientEnabled -) - -// EndpointModeState is the EC2 IMDS Endpoint Configuration Mode -type EndpointModeState uint - -// Enumeration values for ClientEnableState -const ( - EndpointModeStateUnset EndpointModeState = iota - EndpointModeStateIPv4 - EndpointModeStateIPv6 -) - -// SetFromString sets the EndpointModeState based on the provided string value. Unknown values will default to EndpointModeStateUnset -func (e *EndpointModeState) SetFromString(v string) error { - v = strings.TrimSpace(v) - - switch { - case len(v) == 0: - *e = EndpointModeStateUnset - case strings.EqualFold(v, "IPv6"): - *e = EndpointModeStateIPv6 - case strings.EqualFold(v, "IPv4"): - *e = EndpointModeStateIPv4 - default: - return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4") - } - return nil -} - -// ClientEnableStateResolver is a config resolver interface for retrieving whether the IMDS client is disabled. -type ClientEnableStateResolver interface { - GetEC2IMDSClientEnableState() (ClientEnableState, bool, error) -} - -// EndpointModeResolver is a config resolver interface for retrieving the EndpointModeState configuration. -type EndpointModeResolver interface { - GetEC2IMDSEndpointMode() (EndpointModeState, bool, error) -} - -// EndpointResolver is a config resolver interface for retrieving the endpoint. -type EndpointResolver interface { - GetEC2IMDSEndpoint() (string, bool, error) -} - -type v1FallbackDisabledResolver interface { - GetEC2IMDSV1FallbackDisabled() (bool, bool) -} - -// ResolveClientEnableState resolves the ClientEnableState from a list of configuration sources. -func ResolveClientEnableState(sources []interface{}) (value ClientEnableState, found bool, err error) { - for _, source := range sources { - if resolver, ok := source.(ClientEnableStateResolver); ok { - value, found, err = resolver.GetEC2IMDSClientEnableState() - if err != nil || found { - return value, found, err - } - } - } - return value, found, err -} - -// ResolveEndpointModeConfig resolves the EndpointModeState from a list of configuration sources. -func ResolveEndpointModeConfig(sources []interface{}) (value EndpointModeState, found bool, err error) { - for _, source := range sources { - if resolver, ok := source.(EndpointModeResolver); ok { - value, found, err = resolver.GetEC2IMDSEndpointMode() - if err != nil || found { - return value, found, err - } - } - } - return value, found, err -} - -// ResolveEndpointConfig resolves the endpoint from a list of configuration sources. -func ResolveEndpointConfig(sources []interface{}) (value string, found bool, err error) { - for _, source := range sources { - if resolver, ok := source.(EndpointResolver); ok { - value, found, err = resolver.GetEC2IMDSEndpoint() - if err != nil || found { - return value, found, err - } - } - } - return value, found, err -} - -// ResolveV1FallbackDisabled ... -func ResolveV1FallbackDisabled(sources []interface{}) (bool, bool) { - for _, source := range sources { - if resolver, ok := source.(v1FallbackDisabledResolver); ok { - if v, found := resolver.GetEC2IMDSV1FallbackDisabled(); found { - return v, true - } - } - } - return false, false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go deleted file mode 100644 index 90cf4aeb3d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/request_middleware.go +++ /dev/null @@ -1,313 +0,0 @@ -package imds - -import ( - "bytes" - "context" - "fmt" - "io/ioutil" - "net/url" - "path" - "time" - - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func addAPIRequestMiddleware(stack *middleware.Stack, - options Options, - operation string, - getPath func(interface{}) (string, error), - getOutput func(*smithyhttp.Response) (interface{}, error), -) (err error) { - err = addRequestMiddleware(stack, options, "GET", operation, getPath, getOutput) - if err != nil { - return err - } - - // Token Serializer build and state management. - if !options.disableAPIToken { - err = stack.Finalize.Insert(options.tokenProvider, (*retry.Attempt)(nil).ID(), middleware.After) - if err != nil { - return err - } - - err = stack.Deserialize.Insert(options.tokenProvider, "OperationDeserializer", middleware.Before) - if err != nil { - return err - } - } - - return nil -} - -func addRequestMiddleware(stack *middleware.Stack, - options Options, - method string, - operation string, - getPath func(interface{}) (string, error), - getOutput func(*smithyhttp.Response) (interface{}, error), -) (err error) { - err = awsmiddleware.AddSDKAgentKey(awsmiddleware.FeatureMetadata, "ec2-imds")(stack) - if err != nil { - return err - } - - // Operation timeout - err = stack.Initialize.Add(&operationTimeout{ - Disabled: options.DisableDefaultTimeout, - DefaultTimeout: defaultOperationTimeout, - }, middleware.Before) - if err != nil { - return err - } - - // Operation Serializer - err = stack.Serialize.Add(&serializeRequest{ - GetPath: getPath, - Method: method, - }, middleware.After) - if err != nil { - return err - } - - // Operation endpoint resolver - err = stack.Serialize.Insert(&resolveEndpoint{ - Endpoint: options.Endpoint, - EndpointMode: options.EndpointMode, - }, "OperationSerializer", middleware.Before) - if err != nil { - return err - } - - // Operation Deserializer - err = stack.Deserialize.Add(&deserializeResponse{ - GetOutput: getOutput, - }, middleware.After) - if err != nil { - return err - } - - err = stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: options.ClientLogMode.IsRequest(), - LogRequestWithBody: options.ClientLogMode.IsRequestWithBody(), - LogResponse: options.ClientLogMode.IsResponse(), - LogResponseWithBody: options.ClientLogMode.IsResponseWithBody(), - }, middleware.After) - if err != nil { - return err - } - - err = addSetLoggerMiddleware(stack, options) - if err != nil { - return err - } - - if err := addProtocolFinalizerMiddlewares(stack, options, operation); err != nil { - return fmt.Errorf("add protocol finalizers: %w", err) - } - - // Retry support - return retry.AddRetryMiddlewares(stack, retry.AddRetryMiddlewaresOptions{ - Retryer: options.Retryer, - LogRetryAttempts: options.ClientLogMode.IsRetries(), - }) -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -type serializeRequest struct { - GetPath func(interface{}) (string, error) - Method string -} - -func (*serializeRequest) ID() string { - return "OperationSerializer" -} - -func (m *serializeRequest) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - reqPath, err := m.GetPath(in.Parameters) - if err != nil { - return out, metadata, fmt.Errorf("unable to get request URL path, %w", err) - } - - request.Request.URL.Path = reqPath - request.Request.Method = m.Method - - return next.HandleSerialize(ctx, in) -} - -type deserializeResponse struct { - GetOutput func(*smithyhttp.Response) (interface{}, error) -} - -func (*deserializeResponse) ID() string { - return "OperationDeserializer" -} - -func (m *deserializeResponse) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, fmt.Errorf( - "unexpected transport response type, %T, want %T", out.RawResponse, resp) - } - defer resp.Body.Close() - - // read the full body so that any operation timeouts cleanup will not race - // the body being read. - body, err := ioutil.ReadAll(resp.Body) - if err != nil { - return out, metadata, fmt.Errorf("read response body failed, %w", err) - } - resp.Body = ioutil.NopCloser(bytes.NewReader(body)) - - // Anything that's not 200 |< 300 is error - if resp.StatusCode < 200 || resp.StatusCode >= 300 { - return out, metadata, &smithyhttp.ResponseError{ - Response: resp, - Err: fmt.Errorf("request to EC2 IMDS failed"), - } - } - - result, err := m.GetOutput(resp) - if err != nil { - return out, metadata, fmt.Errorf( - "unable to get deserialized result for response, %w", err, - ) - } - out.Result = result - - return out, metadata, err -} - -type resolveEndpoint struct { - Endpoint string - EndpointMode EndpointModeState -} - -func (*resolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *resolveEndpoint) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - var endpoint string - if len(m.Endpoint) > 0 { - endpoint = m.Endpoint - } else { - switch m.EndpointMode { - case EndpointModeStateIPv6: - endpoint = defaultIPv6Endpoint - case EndpointModeStateIPv4: - fallthrough - case EndpointModeStateUnset: - endpoint = defaultIPv4Endpoint - default: - return out, metadata, fmt.Errorf("unsupported IMDS endpoint mode") - } - } - - req.URL, err = url.Parse(endpoint) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - return next.HandleSerialize(ctx, in) -} - -const ( - defaultOperationTimeout = 5 * time.Second -) - -// operationTimeout adds a timeout on the middleware stack if the Context the -// stack was called with does not have a deadline. The next middleware must -// complete before the timeout, or the context will be canceled. -// -// If DefaultTimeout is zero, no default timeout will be used if the Context -// does not have a timeout. -// -// The next middleware must also ensure that any resources that are also -// canceled by the stack's context are completely consumed before returning. -// Otherwise the timeout cleanup will race the resource being consumed -// upstream. -type operationTimeout struct { - Disabled bool - DefaultTimeout time.Duration -} - -func (*operationTimeout) ID() string { return "OperationTimeout" } - -func (m *operationTimeout) HandleInitialize( - ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler, -) ( - output middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.Disabled { - return next.HandleInitialize(ctx, input) - } - - if _, ok := ctx.Deadline(); !ok && m.DefaultTimeout != 0 { - var cancelFn func() - ctx, cancelFn = context.WithTimeout(ctx, m.DefaultTimeout) - defer cancelFn() - } - - return next.HandleInitialize(ctx, input) -} - -// appendURIPath joins a URI path component to the existing path with `/` -// separators between the path components. If the path being added ends with a -// trailing `/` that slash will be maintained. -func appendURIPath(base, add string) string { - reqPath := path.Join(base, add) - if len(add) != 0 && add[len(add)-1] == '/' { - reqPath += "/" - } - return reqPath -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %w", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %w", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go b/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go deleted file mode 100644 index 5703c6e16a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/feature/ec2/imds/token_provider.go +++ /dev/null @@ -1,261 +0,0 @@ -package imds - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/logging" - "net/http" - "sync" - "sync/atomic" - "time" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const ( - // Headers for Token and TTL - tokenHeader = "x-aws-ec2-metadata-token" - defaultTokenTTL = 5 * time.Minute -) - -type tokenProvider struct { - client *Client - tokenTTL time.Duration - - token *apiToken - tokenMux sync.RWMutex - - disabled uint32 // Atomic updated -} - -func newTokenProvider(client *Client, ttl time.Duration) *tokenProvider { - return &tokenProvider{ - client: client, - tokenTTL: ttl, - } -} - -// apiToken provides the API token used by all operation calls for th EC2 -// Instance metadata service. -type apiToken struct { - token string - expires time.Time -} - -var timeNow = time.Now - -// Expired returns if the token is expired. -func (t *apiToken) Expired() bool { - // Calling Round(0) on the current time will truncate the monotonic reading only. Ensures credential expiry - // time is always based on reported wall-clock time. - return timeNow().Round(0).After(t.expires) -} - -func (t *tokenProvider) ID() string { return "APITokenProvider" } - -// HandleFinalize is the finalize stack middleware, that if the token provider is -// enabled, will attempt to add the cached API token to the request. If the API -// token is not cached, it will be retrieved in a separate API call, getToken. -// -// For retry attempts, handler must be added after attempt retryer. -// -// If request for getToken fails the token provider may be disabled from future -// requests, depending on the response status code. -func (t *tokenProvider) HandleFinalize( - ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if t.fallbackEnabled() && !t.enabled() { - // short-circuits to insecure data flow if token provider is disabled. - return next.HandleFinalize(ctx, input) - } - - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport request type %T", input.Request) - } - - tok, err := t.getToken(ctx) - if err != nil { - // If the error allows the token to downgrade to insecure flow allow that. - var bypassErr *bypassTokenRetrievalError - if errors.As(err, &bypassErr) { - return next.HandleFinalize(ctx, input) - } - - return out, metadata, fmt.Errorf("failed to get API token, %w", err) - } - - req.Header.Set(tokenHeader, tok.token) - - return next.HandleFinalize(ctx, input) -} - -// HandleDeserialize is the deserialize stack middleware for determining if the -// operation the token provider is decorating failed because of a 401 -// unauthorized status code. If the operation failed for that reason the token -// provider needs to be re-enabled so that it can start adding the API token to -// operation calls. -func (t *tokenProvider) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, input) - if err == nil { - return out, metadata, err - } - - resp, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, fmt.Errorf("expect HTTP transport, got %T", out.RawResponse) - } - - if resp.StatusCode == http.StatusUnauthorized { // unauthorized - t.enable() - err = &retryableError{Err: err, isRetryable: true} - } - - return out, metadata, err -} - -func (t *tokenProvider) getToken(ctx context.Context) (tok *apiToken, err error) { - if t.fallbackEnabled() && !t.enabled() { - return nil, &bypassTokenRetrievalError{ - Err: fmt.Errorf("cannot get API token, provider disabled"), - } - } - - t.tokenMux.RLock() - tok = t.token - t.tokenMux.RUnlock() - - if tok != nil && !tok.Expired() { - return tok, nil - } - - tok, err = t.updateToken(ctx) - if err != nil { - return nil, err - } - - return tok, nil -} - -func (t *tokenProvider) updateToken(ctx context.Context) (*apiToken, error) { - t.tokenMux.Lock() - defer t.tokenMux.Unlock() - - // Prevent multiple requests to update retrieving the token. - if t.token != nil && !t.token.Expired() { - tok := t.token - return tok, nil - } - - result, err := t.client.getToken(ctx, &getTokenInput{ - TokenTTL: t.tokenTTL, - }) - if err != nil { - var statusErr interface{ HTTPStatusCode() int } - if errors.As(err, &statusErr) { - switch statusErr.HTTPStatusCode() { - // Disable future get token if failed because of 403, 404, or 405 - case http.StatusForbidden, - http.StatusNotFound, - http.StatusMethodNotAllowed: - - if t.fallbackEnabled() { - logger := middleware.GetLogger(ctx) - logger.Logf(logging.Warn, "falling back to IMDSv1: %v", err) - t.disable() - } - - // 400 errors are terminal, and need to be upstreamed - case http.StatusBadRequest: - return nil, err - } - } - - // Disable if request send failed or timed out getting response - var re *smithyhttp.RequestSendError - var ce *smithy.CanceledError - if errors.As(err, &re) || errors.As(err, &ce) { - atomic.StoreUint32(&t.disabled, 1) - } - - if !t.fallbackEnabled() { - // NOTE: getToken() is an implementation detail of some outer operation - // (e.g. GetMetadata). It has its own retries that have already been exhausted. - // Mark the underlying error as a terminal error. - err = &retryableError{Err: err, isRetryable: false} - return nil, err - } - - // Token couldn't be retrieved, fallback to IMDSv1 insecure flow for this request - // and allow the request to proceed. Future requests _may_ re-attempt fetching a - // token if not disabled. - return nil, &bypassTokenRetrievalError{Err: err} - } - - tok := &apiToken{ - token: result.Token, - expires: timeNow().Add(result.TokenTTL), - } - t.token = tok - - return tok, nil -} - -// enabled returns if the token provider is current enabled or not. -func (t *tokenProvider) enabled() bool { - return atomic.LoadUint32(&t.disabled) == 0 -} - -// fallbackEnabled returns false if EnableFallback is [aws.FalseTernary], true otherwise -func (t *tokenProvider) fallbackEnabled() bool { - switch t.client.options.EnableFallback { - case aws.FalseTernary: - return false - default: - return true - } -} - -// disable disables the token provider and it will no longer attempt to inject -// the token, nor request updates. -func (t *tokenProvider) disable() { - atomic.StoreUint32(&t.disabled, 1) -} - -// enable enables the token provide to start refreshing tokens, and adding them -// to the pending request. -func (t *tokenProvider) enable() { - t.tokenMux.Lock() - t.token = nil - t.tokenMux.Unlock() - atomic.StoreUint32(&t.disabled, 0) -} - -type bypassTokenRetrievalError struct { - Err error -} - -func (e *bypassTokenRetrievalError) Error() string { - return fmt.Sprintf("bypass token retrieval, %v", e.Err) -} - -func (e *bypassTokenRetrievalError) Unwrap() error { return e.Err } - -type retryableError struct { - Err error - isRetryable bool -} - -func (e *retryableError) RetryableError() bool { return e.isRetryable } - -func (e *retryableError) Error() string { return e.Err.Error() } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go deleted file mode 100644 index 0b81db5480..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/auth.go +++ /dev/null @@ -1,45 +0,0 @@ -package auth - -import ( - "github.com/aws/smithy-go/auth" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// HTTPAuthScheme is the SDK's internal implementation of smithyhttp.AuthScheme -// for pre-existing implementations where the signer was added to client -// config. SDK clients will key off of this type and ensure per-operation -// updates to those signers persist on the scheme itself. -type HTTPAuthScheme struct { - schemeID string - signer smithyhttp.Signer -} - -var _ smithyhttp.AuthScheme = (*HTTPAuthScheme)(nil) - -// NewHTTPAuthScheme returns an auth scheme instance with the given config. -func NewHTTPAuthScheme(schemeID string, signer smithyhttp.Signer) *HTTPAuthScheme { - return &HTTPAuthScheme{ - schemeID: schemeID, - signer: signer, - } -} - -// SchemeID identifies the auth scheme. -func (s *HTTPAuthScheme) SchemeID() string { - return s.schemeID -} - -// IdentityResolver gets the identity resolver for the auth scheme. -func (s *HTTPAuthScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver { - return o.GetIdentityResolver(s.schemeID) -} - -// Signer gets the signer for the auth scheme. -func (s *HTTPAuthScheme) Signer() smithyhttp.Signer { - return s.signer -} - -// WithSigner returns a new instance of the auth scheme with the updated signer. -func (s *HTTPAuthScheme) WithSigner(signer smithyhttp.Signer) *HTTPAuthScheme { - return NewHTTPAuthScheme(s.schemeID, signer) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go deleted file mode 100644 index bbc2ec06ec..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/scheme.go +++ /dev/null @@ -1,191 +0,0 @@ -package auth - -import ( - "context" - "fmt" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -// SigV4 is a constant representing -// Authentication Scheme Signature Version 4 -const SigV4 = "sigv4" - -// SigV4A is a constant representing -// Authentication Scheme Signature Version 4A -const SigV4A = "sigv4a" - -// SigV4S3Express identifies the S3 S3Express auth scheme. -const SigV4S3Express = "sigv4-s3express" - -// None is a constant representing the -// None Authentication Scheme -const None = "none" - -// SupportedSchemes is a data structure -// that indicates the list of supported AWS -// authentication schemes -var SupportedSchemes = map[string]bool{ - SigV4: true, - SigV4A: true, - SigV4S3Express: true, - None: true, -} - -// AuthenticationScheme is a representation of -// AWS authentication schemes -type AuthenticationScheme interface { - isAuthenticationScheme() -} - -// AuthenticationSchemeV4 is a AWS SigV4 representation -type AuthenticationSchemeV4 struct { - Name string - SigningName *string - SigningRegion *string - DisableDoubleEncoding *bool -} - -func (a *AuthenticationSchemeV4) isAuthenticationScheme() {} - -// AuthenticationSchemeV4A is a AWS SigV4A representation -type AuthenticationSchemeV4A struct { - Name string - SigningName *string - SigningRegionSet []string - DisableDoubleEncoding *bool -} - -func (a *AuthenticationSchemeV4A) isAuthenticationScheme() {} - -// AuthenticationSchemeNone is a representation for the none auth scheme -type AuthenticationSchemeNone struct{} - -func (a *AuthenticationSchemeNone) isAuthenticationScheme() {} - -// NoAuthenticationSchemesFoundError is used in signaling -// that no authentication schemes have been specified. -type NoAuthenticationSchemesFoundError struct{} - -func (e *NoAuthenticationSchemesFoundError) Error() string { - return fmt.Sprint("No authentication schemes specified.") -} - -// UnSupportedAuthenticationSchemeSpecifiedError is used in -// signaling that only unsupported authentication schemes -// were specified. -type UnSupportedAuthenticationSchemeSpecifiedError struct { - UnsupportedSchemes []string -} - -func (e *UnSupportedAuthenticationSchemeSpecifiedError) Error() string { - return fmt.Sprint("Unsupported authentication scheme specified.") -} - -// GetAuthenticationSchemes extracts the relevant authentication scheme data -// into a custom strongly typed Go data structure. -func GetAuthenticationSchemes(p *smithy.Properties) ([]AuthenticationScheme, error) { - var result []AuthenticationScheme - if !p.Has("authSchemes") { - return nil, &NoAuthenticationSchemesFoundError{} - } - - authSchemes, _ := p.Get("authSchemes").([]interface{}) - - var unsupportedSchemes []string - for _, scheme := range authSchemes { - authScheme, _ := scheme.(map[string]interface{}) - - version := authScheme["name"].(string) - switch version { - case SigV4, SigV4S3Express: - v4Scheme := AuthenticationSchemeV4{ - Name: version, - SigningName: getSigningName(authScheme), - SigningRegion: getSigningRegion(authScheme), - DisableDoubleEncoding: getDisableDoubleEncoding(authScheme), - } - result = append(result, AuthenticationScheme(&v4Scheme)) - case SigV4A: - v4aScheme := AuthenticationSchemeV4A{ - Name: SigV4A, - SigningName: getSigningName(authScheme), - SigningRegionSet: getSigningRegionSet(authScheme), - DisableDoubleEncoding: getDisableDoubleEncoding(authScheme), - } - result = append(result, AuthenticationScheme(&v4aScheme)) - case None: - noneScheme := AuthenticationSchemeNone{} - result = append(result, AuthenticationScheme(&noneScheme)) - default: - unsupportedSchemes = append(unsupportedSchemes, authScheme["name"].(string)) - continue - } - } - - if len(result) == 0 { - return nil, &UnSupportedAuthenticationSchemeSpecifiedError{ - UnsupportedSchemes: unsupportedSchemes, - } - } - - return result, nil -} - -type disableDoubleEncoding struct{} - -// SetDisableDoubleEncoding sets or modifies the disable double encoding option -// on the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func SetDisableDoubleEncoding(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, disableDoubleEncoding{}, value) -} - -// GetDisableDoubleEncoding retrieves the disable double encoding option -// from the context. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetDisableDoubleEncoding(ctx context.Context) (value bool, ok bool) { - value, ok = middleware.GetStackValue(ctx, disableDoubleEncoding{}).(bool) - return value, ok -} - -func getSigningName(authScheme map[string]interface{}) *string { - signingName, ok := authScheme["signingName"].(string) - if !ok || signingName == "" { - return nil - } - return &signingName -} - -func getSigningRegionSet(authScheme map[string]interface{}) []string { - untypedSigningRegionSet, ok := authScheme["signingRegionSet"].([]interface{}) - if !ok { - return nil - } - signingRegionSet := []string{} - for _, item := range untypedSigningRegionSet { - signingRegionSet = append(signingRegionSet, item.(string)) - } - return signingRegionSet -} - -func getSigningRegion(authScheme map[string]interface{}) *string { - signingRegion, ok := authScheme["signingRegion"].(string) - if !ok || signingRegion == "" { - return nil - } - return &signingRegion -} - -func getDisableDoubleEncoding(authScheme map[string]interface{}) *bool { - disableDoubleEncoding, ok := authScheme["disableDoubleEncoding"].(bool) - if !ok { - return nil - } - return &disableDoubleEncoding -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go deleted file mode 100644 index f059b5d391..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_adapter.go +++ /dev/null @@ -1,43 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - "time" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/auth/bearer" -) - -// BearerTokenAdapter adapts smithy bearer.Token to smithy auth.Identity. -type BearerTokenAdapter struct { - Token bearer.Token -} - -var _ auth.Identity = (*BearerTokenAdapter)(nil) - -// Expiration returns the time of expiration for the token. -func (v *BearerTokenAdapter) Expiration() time.Time { - return v.Token.Expires -} - -// BearerTokenProviderAdapter adapts smithy bearer.TokenProvider to smithy -// auth.IdentityResolver. -type BearerTokenProviderAdapter struct { - Provider bearer.TokenProvider -} - -var _ (auth.IdentityResolver) = (*BearerTokenProviderAdapter)(nil) - -// GetIdentity retrieves a bearer token using the underlying provider. -func (v *BearerTokenProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) ( - auth.Identity, error, -) { - token, err := v.Provider.RetrieveBearerToken(ctx) - if err != nil { - return nil, fmt.Errorf("get token: %w", err) - } - - return &BearerTokenAdapter{Token: token}, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go deleted file mode 100644 index a88281527c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/bearer_token_signer_adapter.go +++ /dev/null @@ -1,35 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/auth/bearer" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// BearerTokenSignerAdapter adapts smithy bearer.Signer to smithy http -// auth.Signer. -type BearerTokenSignerAdapter struct { - Signer bearer.Signer -} - -var _ (smithyhttp.Signer) = (*BearerTokenSignerAdapter)(nil) - -// SignRequest signs the request with the provided bearer token. -func (v *BearerTokenSignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, _ smithy.Properties) error { - ca, ok := identity.(*BearerTokenAdapter) - if !ok { - return fmt.Errorf("unexpected identity type: %T", identity) - } - - signed, err := v.Signer.SignWithBearerToken(ctx, ca.Token, r) - if err != nil { - return fmt.Errorf("sign request: %w", err) - } - - *r = *signed.(*smithyhttp.Request) - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go deleted file mode 100644 index f926c4aaa7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/credentials_adapter.go +++ /dev/null @@ -1,46 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - "time" - - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// CredentialsAdapter adapts aws.Credentials to auth.Identity. -type CredentialsAdapter struct { - Credentials aws.Credentials -} - -var _ auth.Identity = (*CredentialsAdapter)(nil) - -// Expiration returns the time of expiration for the credentials. -func (v *CredentialsAdapter) Expiration() time.Time { - return v.Credentials.Expires -} - -// CredentialsProviderAdapter adapts aws.CredentialsProvider to auth.IdentityResolver. -type CredentialsProviderAdapter struct { - Provider aws.CredentialsProvider -} - -var _ (auth.IdentityResolver) = (*CredentialsProviderAdapter)(nil) - -// GetIdentity retrieves AWS credentials using the underlying provider. -func (v *CredentialsProviderAdapter) GetIdentity(ctx context.Context, _ smithy.Properties) ( - auth.Identity, error, -) { - if v.Provider == nil { - return &CredentialsAdapter{Credentials: aws.Credentials{}}, nil - } - - creds, err := v.Provider.Retrieve(ctx) - if err != nil { - return nil, fmt.Errorf("get credentials: %w", err) - } - - return &CredentialsAdapter{Credentials: creds}, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go deleted file mode 100644 index 42b4586733..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/smithy.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package smithy adapts concrete AWS auth and signing types to the generic smithy versions. -package smithy diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go deleted file mode 100644 index 24db8e144c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/auth/smithy/v4signer_adapter.go +++ /dev/null @@ -1,57 +0,0 @@ -package smithy - -import ( - "context" - "fmt" - - v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" - "github.com/aws/aws-sdk-go-v2/internal/sdk" - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// V4SignerAdapter adapts v4.HTTPSigner to smithy http.Signer. -type V4SignerAdapter struct { - Signer v4.HTTPSigner - Logger logging.Logger - LogSigning bool -} - -var _ (smithyhttp.Signer) = (*V4SignerAdapter)(nil) - -// SignRequest signs the request with the provided identity. -func (v *V4SignerAdapter) SignRequest(ctx context.Context, r *smithyhttp.Request, identity auth.Identity, props smithy.Properties) error { - ca, ok := identity.(*CredentialsAdapter) - if !ok { - return fmt.Errorf("unexpected identity type: %T", identity) - } - - name, ok := smithyhttp.GetSigV4SigningName(&props) - if !ok { - return fmt.Errorf("sigv4 signing name is required") - } - - region, ok := smithyhttp.GetSigV4SigningRegion(&props) - if !ok { - return fmt.Errorf("sigv4 signing region is required") - } - - hash := v4.GetPayloadHash(ctx) - signingTime := sdk.NowTime() - skew := internalcontext.GetAttemptSkewContext(ctx) - signingTime = signingTime.Add(skew) - err := v.Signer.SignHTTP(ctx, ca.Credentials, r.Request, hash, name, region, signingTime, func(o *v4.SignerOptions) { - o.DisableURIPathEscaping, _ = smithyhttp.GetDisableDoubleEncoding(&props) - - o.Logger = v.Logger - o.LogSigning = v.LogSigning - }) - if err != nil { - return fmt.Errorf("sign http: %w", err) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md deleted file mode 100644 index b34f47c915..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ /dev/null @@ -1,455 +0,0 @@ -# v1.4.9 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.8 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.7 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.6 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.5 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.4 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.3 (2025-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.37 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.36 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.35 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.34 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.33 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.32 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.31 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.30 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.29 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.3.28 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.27 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.26 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.25 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.24 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.23 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.22 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.21 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.20 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.19 (2024-10-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.18 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.17 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.16 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.15 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.14 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.13 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.12 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.11 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.10 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.9 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.8 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.7 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.6 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.5 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.4 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2024-03-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.43 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.42 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.41 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.40 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.39 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.38 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.37 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.36 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.35 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.34 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.33 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.32 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.31 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.30 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.29 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.28 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.27 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.26 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.25 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.24 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.23 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.22 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.21 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.20 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.19 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.18 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.17 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.16 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.15 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.14 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.13 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.12 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.11 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.10 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.9 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.8 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.7 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.6 (2022-03-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.5 (2022-02-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.4 (2022-01-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.3 (2022-01-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.7 (2021-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.6 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.5 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.4 (2021-08-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.2 (2021-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.1 (2021-07-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.0 (2021-06-25) - -* **Release**: Release new modules -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/internal/configsources/config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go deleted file mode 100644 index cd4d19b898..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/config.go +++ /dev/null @@ -1,65 +0,0 @@ -package configsources - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" -) - -// EnableEndpointDiscoveryProvider is an interface for retrieving external configuration value -// for Enable Endpoint Discovery -type EnableEndpointDiscoveryProvider interface { - GetEnableEndpointDiscovery(ctx context.Context) (value aws.EndpointDiscoveryEnableState, found bool, err error) -} - -// ResolveEnableEndpointDiscovery extracts the first instance of a EnableEndpointDiscoveryProvider from the config slice. -// Additionally returns a aws.EndpointDiscoveryEnableState to indicate if the value was found in provided configs, -// and error if one is encountered. -func ResolveEnableEndpointDiscovery(ctx context.Context, configs []interface{}) (value aws.EndpointDiscoveryEnableState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(EnableEndpointDiscoveryProvider); ok { - value, found, err = p.GetEnableEndpointDiscovery(ctx) - if err != nil || found { - break - } - } - } - return -} - -// UseDualStackEndpointProvider is an interface for retrieving external configuration values for UseDualStackEndpoint -type UseDualStackEndpointProvider interface { - GetUseDualStackEndpoint(context.Context) (value aws.DualStackEndpointState, found bool, err error) -} - -// ResolveUseDualStackEndpoint extracts the first instance of a UseDualStackEndpoint from the config slice. -// Additionally returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseDualStackEndpoint(ctx context.Context, configs []interface{}) (value aws.DualStackEndpointState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(UseDualStackEndpointProvider); ok { - value, found, err = p.GetUseDualStackEndpoint(ctx) - if err != nil || found { - break - } - } - } - return -} - -// UseFIPSEndpointProvider is an interface for retrieving external configuration values for UseFIPSEndpoint -type UseFIPSEndpointProvider interface { - GetUseFIPSEndpoint(context.Context) (value aws.FIPSEndpointState, found bool, err error) -} - -// ResolveUseFIPSEndpoint extracts the first instance of a UseFIPSEndpointProvider from the config slice. -// Additionally, returns a boolean to indicate if the value was found in provided configs, and error if one is encountered. -func ResolveUseFIPSEndpoint(ctx context.Context, configs []interface{}) (value aws.FIPSEndpointState, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(UseFIPSEndpointProvider); ok { - value, found, err = p.GetUseFIPSEndpoint(ctx) - if err != nil || found { - break - } - } - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go deleted file mode 100644 index e7835f8524..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/endpoints.go +++ /dev/null @@ -1,57 +0,0 @@ -package configsources - -import ( - "context" -) - -// ServiceBaseEndpointProvider is needed to search for all providers -// that provide a configured service endpoint -type ServiceBaseEndpointProvider interface { - GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) -} - -// IgnoreConfiguredEndpointsProvider is needed to search for all providers -// that provide a flag to disable configured endpoints. -// -// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because -// service packages cannot import github.com/aws/aws-sdk-go-v2/config -// due to result import cycle error. -type IgnoreConfiguredEndpointsProvider interface { - GetIgnoreConfiguredEndpoints(ctx context.Context) (bool, bool, error) -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -// -// Currently duplicated from github.com/aws/aws-sdk-go-v2/config because -// service packages cannot import github.com/aws/aws-sdk-go-v2/config -// due to result import cycle error. -func GetIgnoreConfiguredEndpoints(ctx context.Context, configs []interface{}) (value bool, found bool, err error) { - for _, cfg := range configs { - if p, ok := cfg.(IgnoreConfiguredEndpointsProvider); ok { - value, found, err = p.GetIgnoreConfiguredEndpoints(ctx) - if err != nil || found { - break - } - } - } - return -} - -// ResolveServiceBaseEndpoint is used to retrieve service endpoints from configured sources -// while allowing for configured endpoints to be disabled -func ResolveServiceBaseEndpoint(ctx context.Context, sdkID string, configs []interface{}) (value string, found bool, err error) { - if val, found, _ := GetIgnoreConfiguredEndpoints(ctx, configs); found && val { - return "", false, nil - } - - for _, cs := range configs { - if p, ok := cs.(ServiceBaseEndpointProvider); ok { - value, found, err = p.GetServiceBaseEndpoint(context.Background(), sdkID) - if err != nil || found { - break - } - } - } - return -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go deleted file mode 100644 index ebc2f6a765..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package configsources - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go deleted file mode 100644 index f0c283d394..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/context/context.go +++ /dev/null @@ -1,52 +0,0 @@ -package context - -import ( - "context" - "time" - - "github.com/aws/smithy-go/middleware" -) - -type s3BackendKey struct{} -type checksumInputAlgorithmKey struct{} -type clockSkew struct{} - -const ( - // S3BackendS3Express identifies the S3Express backend - S3BackendS3Express = "S3Express" -) - -// SetS3Backend stores the resolved endpoint backend within the request -// context, which is required for a variety of custom S3 behaviors. -func SetS3Backend(ctx context.Context, typ string) context.Context { - return middleware.WithStackValue(ctx, s3BackendKey{}, typ) -} - -// GetS3Backend retrieves the stored endpoint backend within the context. -func GetS3Backend(ctx context.Context) string { - v, _ := middleware.GetStackValue(ctx, s3BackendKey{}).(string) - return v -} - -// SetChecksumInputAlgorithm sets the request checksum algorithm on the -// context. -func SetChecksumInputAlgorithm(ctx context.Context, value string) context.Context { - return middleware.WithStackValue(ctx, checksumInputAlgorithmKey{}, value) -} - -// GetChecksumInputAlgorithm returns the checksum algorithm from the context. -func GetChecksumInputAlgorithm(ctx context.Context) string { - v, _ := middleware.GetStackValue(ctx, checksumInputAlgorithmKey{}).(string) - return v -} - -// SetAttemptSkewContext sets the clock skew value on the context -func SetAttemptSkewContext(ctx context.Context, v time.Duration) context.Context { - return middleware.WithStackValue(ctx, clockSkew{}, v) -} - -// GetAttemptSkewContext gets the clock skew value from the context -func GetAttemptSkewContext(ctx context.Context) time.Duration { - x, _ := middleware.GetStackValue(ctx, clockSkew{}).(time.Duration) - return x -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go deleted file mode 100644 index e6223dd3b3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go +++ /dev/null @@ -1,94 +0,0 @@ -package awsrulesfn - -import ( - "strings" -) - -// ARN provides AWS ARN components broken out into a data structure. -type ARN struct { - Partition string - Service string - Region string - AccountId string - ResourceId OptionalStringSlice -} - -const ( - arnDelimiters = ":" - resourceDelimiters = "/:" - arnSections = 6 - arnPrefix = "arn:" - - // zero-indexed - sectionPartition = 1 - sectionService = 2 - sectionRegion = 3 - sectionAccountID = 4 - sectionResource = 5 -) - -// ParseARN returns an [ARN] value parsed from the input string provided. If -// the ARN cannot be parsed nil will be returned, and error added to -// [ErrorCollector]. -func ParseARN(input string) *ARN { - if !strings.HasPrefix(input, arnPrefix) { - return nil - } - - sections := strings.SplitN(input, arnDelimiters, arnSections) - if numSections := len(sections); numSections != arnSections { - return nil - } - - if sections[sectionPartition] == "" { - return nil - } - if sections[sectionService] == "" { - return nil - } - if sections[sectionResource] == "" { - return nil - } - - return &ARN{ - Partition: sections[sectionPartition], - Service: sections[sectionService], - Region: sections[sectionRegion], - AccountId: sections[sectionAccountID], - ResourceId: splitResource(sections[sectionResource]), - } -} - -// splitResource splits the resource components by the ARN resource delimiters. -func splitResource(v string) []string { - var parts []string - var offset int - - for offset <= len(v) { - idx := strings.IndexAny(v[offset:], "/:") - if idx < 0 { - parts = append(parts, v[offset:]) - break - } - parts = append(parts, v[offset:idx+offset]) - offset += idx + 1 - } - - return parts -} - -// OptionalStringSlice provides a helper to safely get the index of a string -// slice that may be out of bounds. Returns pointer to string if index is -// valid. Otherwise returns nil. -type OptionalStringSlice []string - -// Get returns a string pointer of the string at index i if the index is valid. -// Otherwise returns nil. -func (s OptionalStringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go deleted file mode 100644 index d5a365853f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package awsrulesfn provides AWS focused endpoint rule functions for -// evaluating endpoint resolution rules. -package awsrulesfn diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go deleted file mode 100644 index df72da97ce..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/generate.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build codegen -// +build codegen - -package awsrulesfn - -//go:generate go run -tags codegen ./internal/partition/codegen.go -model partitions.json -output partitions.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go deleted file mode 100644 index 637e5fc18e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go +++ /dev/null @@ -1,51 +0,0 @@ -package awsrulesfn - -import ( - "net" - "strings" - - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket -// name and can be used with Amazon S3 virtual hosted style addressing. Similar -// to [rulesfn.IsValidHostLabel] with the added restriction that the length of label -// must be [3:63] characters long, all lowercase, and not formatted as an IP -// address. -func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool { - // input should not be formatted as an IP address - // NOTE: this will technically trip up on IPv6 hosts with zone IDs, but - // validation further down will catch that anyway (it's guaranteed to have - // unfriendly characters % and : if that's the case) - if net.ParseIP(input) != nil { - return false - } - - var labels []string - if allowSubDomains { - labels = strings.Split(input, ".") - } else { - labels = []string{input} - } - - for _, label := range labels { - // validate special length constraints - if l := len(label); l < 3 || l > 63 { - return false - } - - // Validate no capital letters - for _, r := range label { - if r >= 'A' && r <= 'Z' { - return false - } - } - - // Validate valid host label - if !smithyhttp.ValidHostLabel(label) { - return false - } - } - - return true -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go deleted file mode 100644 index 91414afe81..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go +++ /dev/null @@ -1,76 +0,0 @@ -package awsrulesfn - -import "regexp" - -// Partition provides the metadata describing an AWS partition. -type Partition struct { - ID string `json:"id"` - Regions map[string]RegionOverrides `json:"regions"` - RegionRegex string `json:"regionRegex"` - DefaultConfig PartitionConfig `json:"outputs"` -} - -// PartitionConfig provides the endpoint metadata for an AWS region or partition. -type PartitionConfig struct { - Name string `json:"name"` - DnsSuffix string `json:"dnsSuffix"` - DualStackDnsSuffix string `json:"dualStackDnsSuffix"` - SupportsFIPS bool `json:"supportsFIPS"` - SupportsDualStack bool `json:"supportsDualStack"` - ImplicitGlobalRegion string `json:"implicitGlobalRegion"` -} - -type RegionOverrides struct { - Name *string `json:"name"` - DnsSuffix *string `json:"dnsSuffix"` - DualStackDnsSuffix *string `json:"dualStackDnsSuffix"` - SupportsFIPS *bool `json:"supportsFIPS"` - SupportsDualStack *bool `json:"supportsDualStack"` -} - -const defaultPartition = "aws" - -func getPartition(partitions []Partition, region string) *PartitionConfig { - for _, partition := range partitions { - if v, ok := partition.Regions[region]; ok { - p := mergeOverrides(partition.DefaultConfig, v) - return &p - } - } - - for _, partition := range partitions { - regionRegex := regexp.MustCompile(partition.RegionRegex) - if regionRegex.MatchString(region) { - v := partition.DefaultConfig - return &v - } - } - - for _, partition := range partitions { - if partition.ID == defaultPartition { - v := partition.DefaultConfig - return &v - } - } - - return nil -} - -func mergeOverrides(into PartitionConfig, from RegionOverrides) PartitionConfig { - if from.Name != nil { - into.Name = *from.Name - } - if from.DnsSuffix != nil { - into.DnsSuffix = *from.DnsSuffix - } - if from.DualStackDnsSuffix != nil { - into.DualStackDnsSuffix = *from.DualStackDnsSuffix - } - if from.SupportsFIPS != nil { - into.SupportsFIPS = *from.SupportsFIPS - } - if from.SupportsDualStack != nil { - into.SupportsDualStack = *from.SupportsDualStack - } - return into -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go deleted file mode 100644 index 6ad5df6469..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ /dev/null @@ -1,489 +0,0 @@ -// Code generated by endpoint/awsrulesfn/internal/partition. DO NOT EDIT. - -package awsrulesfn - -// GetPartition returns an AWS [Partition] for the region provided. If the -// partition cannot be determined then the default partition (AWS commercial) -// will be returned. -func GetPartition(region string) *PartitionConfig { - return getPartition(partitions, region) -} - -var partitions = []Partition{ - { - ID: "aws", - RegionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "us-east-1", - }, - Regions: map[string]RegionOverrides{ - "af-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-east-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-northeast-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-south-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-4": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-5": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-6": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ap-southeast-7": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "aws-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ca-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "ca-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-central-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-north-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-south-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-west-3": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "il-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "me-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "me-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "mx-central-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "sa-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-east-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-west-2": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-cn", - RegionRegex: "^cn\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-cn", - DnsSuffix: "amazonaws.com.cn", - DualStackDnsSuffix: "api.amazonwebservices.com.cn", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "cn-northwest-1", - }, - Regions: map[string]RegionOverrides{ - "aws-cn-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "cn-north-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "cn-northwest-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-eusc", - RegionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-eusc", - DnsSuffix: "amazonaws.eu", - DualStackDnsSuffix: "api.amazonwebservices.eu", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "eusc-de-east-1", - }, - Regions: map[string]RegionOverrides{ - "eusc-de-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso", - RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso", - DnsSuffix: "c2s.ic.gov", - DualStackDnsSuffix: "api.aws.ic.gov", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "us-iso-east-1", - }, - Regions: map[string]RegionOverrides{ - "aws-iso-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-iso-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-iso-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso-b", - RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-b", - DnsSuffix: "sc2s.sgov.gov", - DualStackDnsSuffix: "api.aws.scloud", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "us-isob-east-1", - }, - Regions: map[string]RegionOverrides{ - "aws-iso-b-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-isob-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso-e", - RegionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-e", - DnsSuffix: "cloud.adc-e.uk", - DualStackDnsSuffix: "api.cloud-aws.adc-e.uk", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "eu-isoe-west-1", - }, - Regions: map[string]RegionOverrides{ - "aws-iso-e-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "eu-isoe-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-iso-f", - RegionRegex: "^us\\-isof\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-iso-f", - DnsSuffix: "csp.hci.ic.gov", - DualStackDnsSuffix: "api.aws.hci.ic.gov", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "us-isof-south-1", - }, - Regions: map[string]RegionOverrides{ - "aws-iso-f-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-isof-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-isof-south-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, - { - ID: "aws-us-gov", - RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", - DefaultConfig: PartitionConfig{ - Name: "aws-us-gov", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", - SupportsFIPS: true, - SupportsDualStack: true, - ImplicitGlobalRegion: "us-gov-west-1", - }, - Regions: map[string]RegionOverrides{ - "aws-us-gov-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-west-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json deleted file mode 100644 index b346b0be9b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ /dev/null @@ -1,264 +0,0 @@ -{ - "partitions" : [ { - "id" : "aws", - "outputs" : { - "dnsSuffix" : "amazonaws.com", - "dualStackDnsSuffix" : "api.aws", - "implicitGlobalRegion" : "us-east-1", - "name" : "aws", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", - "regions" : { - "af-south-1" : { - "description" : "Africa (Cape Town)" - }, - "ap-east-1" : { - "description" : "Asia Pacific (Hong Kong)" - }, - "ap-east-2" : { - "description" : "Asia Pacific (Taipei)" - }, - "ap-northeast-1" : { - "description" : "Asia Pacific (Tokyo)" - }, - "ap-northeast-2" : { - "description" : "Asia Pacific (Seoul)" - }, - "ap-northeast-3" : { - "description" : "Asia Pacific (Osaka)" - }, - "ap-south-1" : { - "description" : "Asia Pacific (Mumbai)" - }, - "ap-south-2" : { - "description" : "Asia Pacific (Hyderabad)" - }, - "ap-southeast-1" : { - "description" : "Asia Pacific (Singapore)" - }, - "ap-southeast-2" : { - "description" : "Asia Pacific (Sydney)" - }, - "ap-southeast-3" : { - "description" : "Asia Pacific (Jakarta)" - }, - "ap-southeast-4" : { - "description" : "Asia Pacific (Melbourne)" - }, - "ap-southeast-5" : { - "description" : "Asia Pacific (Malaysia)" - }, - "ap-southeast-6" : { - "description" : "Asia Pacific (New Zealand)" - }, - "ap-southeast-7" : { - "description" : "Asia Pacific (Thailand)" - }, - "aws-global" : { - "description" : "aws global region" - }, - "ca-central-1" : { - "description" : "Canada (Central)" - }, - "ca-west-1" : { - "description" : "Canada West (Calgary)" - }, - "eu-central-1" : { - "description" : "Europe (Frankfurt)" - }, - "eu-central-2" : { - "description" : "Europe (Zurich)" - }, - "eu-north-1" : { - "description" : "Europe (Stockholm)" - }, - "eu-south-1" : { - "description" : "Europe (Milan)" - }, - "eu-south-2" : { - "description" : "Europe (Spain)" - }, - "eu-west-1" : { - "description" : "Europe (Ireland)" - }, - "eu-west-2" : { - "description" : "Europe (London)" - }, - "eu-west-3" : { - "description" : "Europe (Paris)" - }, - "il-central-1" : { - "description" : "Israel (Tel Aviv)" - }, - "me-central-1" : { - "description" : "Middle East (UAE)" - }, - "me-south-1" : { - "description" : "Middle East (Bahrain)" - }, - "mx-central-1" : { - "description" : "Mexico (Central)" - }, - "sa-east-1" : { - "description" : "South America (Sao Paulo)" - }, - "us-east-1" : { - "description" : "US East (N. Virginia)" - }, - "us-east-2" : { - "description" : "US East (Ohio)" - }, - "us-west-1" : { - "description" : "US West (N. California)" - }, - "us-west-2" : { - "description" : "US West (Oregon)" - } - } - }, { - "id" : "aws-cn", - "outputs" : { - "dnsSuffix" : "amazonaws.com.cn", - "dualStackDnsSuffix" : "api.amazonwebservices.com.cn", - "implicitGlobalRegion" : "cn-northwest-1", - "name" : "aws-cn", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^cn\\-\\w+\\-\\d+$", - "regions" : { - "aws-cn-global" : { - "description" : "aws-cn global region" - }, - "cn-north-1" : { - "description" : "China (Beijing)" - }, - "cn-northwest-1" : { - "description" : "China (Ningxia)" - } - } - }, { - "id" : "aws-eusc", - "outputs" : { - "dnsSuffix" : "amazonaws.eu", - "dualStackDnsSuffix" : "api.amazonwebservices.eu", - "implicitGlobalRegion" : "eusc-de-east-1", - "name" : "aws-eusc", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^eusc\\-(de)\\-\\w+\\-\\d+$", - "regions" : { - "eusc-de-east-1" : { - "description" : "EU (Germany)" - } - } - }, { - "id" : "aws-iso", - "outputs" : { - "dnsSuffix" : "c2s.ic.gov", - "dualStackDnsSuffix" : "api.aws.ic.gov", - "implicitGlobalRegion" : "us-iso-east-1", - "name" : "aws-iso", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-global" : { - "description" : "aws-iso global region" - }, - "us-iso-east-1" : { - "description" : "US ISO East" - }, - "us-iso-west-1" : { - "description" : "US ISO WEST" - } - } - }, { - "id" : "aws-iso-b", - "outputs" : { - "dnsSuffix" : "sc2s.sgov.gov", - "dualStackDnsSuffix" : "api.aws.scloud", - "implicitGlobalRegion" : "us-isob-east-1", - "name" : "aws-iso-b", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-b-global" : { - "description" : "aws-iso-b global region" - }, - "us-isob-east-1" : { - "description" : "US ISOB East (Ohio)" - } - } - }, { - "id" : "aws-iso-e", - "outputs" : { - "dnsSuffix" : "cloud.adc-e.uk", - "dualStackDnsSuffix" : "api.cloud-aws.adc-e.uk", - "implicitGlobalRegion" : "eu-isoe-west-1", - "name" : "aws-iso-e", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-e-global" : { - "description" : "aws-iso-e global region" - }, - "eu-isoe-west-1" : { - "description" : "EU ISOE West" - } - } - }, { - "id" : "aws-iso-f", - "outputs" : { - "dnsSuffix" : "csp.hci.ic.gov", - "dualStackDnsSuffix" : "api.aws.hci.ic.gov", - "implicitGlobalRegion" : "us-isof-south-1", - "name" : "aws-iso-f", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-f-global" : { - "description" : "aws-iso-f global region" - }, - "us-isof-east-1" : { - "description" : "US ISOF EAST" - }, - "us-isof-south-1" : { - "description" : "US ISOF SOUTH" - } - } - }, { - "id" : "aws-us-gov", - "outputs" : { - "dnsSuffix" : "amazonaws.com", - "dualStackDnsSuffix" : "api.aws", - "implicitGlobalRegion" : "us-gov-west-1", - "name" : "aws-us-gov", - "supportsDualStack" : true, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$", - "regions" : { - "aws-us-gov-global" : { - "description" : "aws-us-gov global region" - }, - "us-gov-east-1" : { - "description" : "AWS GovCloud (US-East)" - }, - "us-gov-west-1" : { - "description" : "AWS GovCloud (US-West)" - } - } - } ], - "version" : "1.1" -} \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go deleted file mode 100644 index 67950ca366..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/endpoints.go +++ /dev/null @@ -1,201 +0,0 @@ -package endpoints - -import ( - "fmt" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -const ( - defaultProtocol = "https" - defaultSigner = "v4" -) - -var ( - protocolPriority = []string{"https", "http"} - signerPriority = []string{"v4"} -) - -// Options provide configuration needed to direct how endpoints are resolved. -type Options struct { - // Disable usage of HTTPS (TLS / SSL) - DisableHTTPS bool -} - -// Partitions is a slice of partition -type Partitions []Partition - -// ResolveEndpoint resolves a service endpoint for the given region and options. -func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) { - if len(ps) == 0 { - return aws.Endpoint{}, fmt.Errorf("no partitions found") - } - - for i := 0; i < len(ps); i++ { - if !ps[i].canResolveEndpoint(region) { - continue - } - - return ps[i].ResolveEndpoint(region, opts) - } - - // fallback to first partition format to use when resolving the endpoint. - return ps[0].ResolveEndpoint(region, opts) -} - -// Partition is an AWS partition description for a service and its' region endpoints. -type Partition struct { - ID string - RegionRegex *regexp.Regexp - PartitionEndpoint string - IsRegionalized bool - Defaults Endpoint - Endpoints Endpoints -} - -func (p Partition) canResolveEndpoint(region string) bool { - _, ok := p.Endpoints[region] - return ok || p.RegionRegex.MatchString(region) -} - -// ResolveEndpoint resolves and service endpoint for the given region and options. -func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) { - if len(region) == 0 && len(p.PartitionEndpoint) != 0 { - region = p.PartitionEndpoint - } - - e, _ := p.endpointForRegion(region) - - return e.resolve(p.ID, region, p.Defaults, options), nil -} - -func (p Partition) endpointForRegion(region string) (Endpoint, bool) { - if e, ok := p.Endpoints[region]; ok { - return e, true - } - - if !p.IsRegionalized { - return p.Endpoints[p.PartitionEndpoint], region == p.PartitionEndpoint - } - - // Unable to find any matching endpoint, return - // blank that will be used for generic endpoint creation. - return Endpoint{}, false -} - -// Endpoints is a map of service config regions to endpoints -type Endpoints map[string]Endpoint - -// CredentialScope is the credential scope of a region and service -type CredentialScope struct { - Region string - Service string -} - -// Endpoint is a service endpoint description -type Endpoint struct { - // True if the endpoint cannot be resolved for this partition/region/service - Unresolveable aws.Ternary - - Hostname string - Protocols []string - - CredentialScope CredentialScope - - SignatureVersions []string `json:"signatureVersions"` -} - -func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) aws.Endpoint { - var merged Endpoint - merged.mergeIn(def) - merged.mergeIn(e) - e = merged - - var u string - if e.Unresolveable != aws.TrueTernary { - // Only attempt to resolve the endpoint if it can be resolved. - hostname := strings.Replace(e.Hostname, "{region}", region, 1) - - scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS) - u = scheme + "://" + hostname - } - - signingRegion := e.CredentialScope.Region - if len(signingRegion) == 0 { - signingRegion = region - } - signingName := e.CredentialScope.Service - - return aws.Endpoint{ - URL: u, - PartitionID: partition, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), - } -} - -func (e *Endpoint) mergeIn(other Endpoint) { - if other.Unresolveable != aws.UnknownTernary { - e.Unresolveable = other.Unresolveable - } - if len(other.Hostname) > 0 { - e.Hostname = other.Hostname - } - if len(other.Protocols) > 0 { - e.Protocols = other.Protocols - } - if len(other.CredentialScope.Region) > 0 { - e.CredentialScope.Region = other.CredentialScope.Region - } - if len(other.CredentialScope.Service) > 0 { - e.CredentialScope.Service = other.CredentialScope.Service - } - if len(other.SignatureVersions) > 0 { - e.SignatureVersions = other.SignatureVersions - } -} - -func getEndpointScheme(protocols []string, disableHTTPS bool) string { - if disableHTTPS { - return "http" - } - - return getByPriority(protocols, protocolPriority, defaultProtocol) -} - -func getByPriority(s []string, p []string, def string) string { - if len(s) == 0 { - return def - } - - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { - if s[j] == p[i] { - return s[j] - } - } - } - - return s[0] -} - -// MapFIPSRegion extracts the intrinsic AWS region from one that may have an -// embedded FIPS microformat. -func MapFIPSRegion(region string) string { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(region, fipsInfix) || - strings.Contains(region, fipsPrefix) || - strings.Contains(region, fipsSuffix) { - region = strings.ReplaceAll(region, fipsInfix, "-") - region = strings.ReplaceAll(region, fipsPrefix, "") - region = strings.ReplaceAll(region, fipsSuffix, "") - } - - return region -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md deleted file mode 100644 index 8de3bfec8c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ /dev/null @@ -1,430 +0,0 @@ -# v2.7.9 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.8 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.7 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.6 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.5 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.4 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.3 (2025-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.2 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.7.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.37 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.36 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.35 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.34 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.33 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.32 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.31 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.30 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.29 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v2.6.28 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.27 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.26 (2024-12-19) - -* **Bug Fix**: Fix improper use of printf-style functions. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.25 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.24 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.23 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.22 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.21 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.20 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.19 (2024-10-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.18 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.17 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.16 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.15 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.14 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.13 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.12 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.11 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.10 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.9 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.8 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.7 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.6 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.5 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.4 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.3 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.6.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.5.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.37 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.36 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.31 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.30 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.29 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.28 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.27 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.26 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.25 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.24 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.23 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.22 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.19 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.4.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.3.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.2.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.1.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v2.0.0 (2021-11-06) - -* **Release**: Endpoint Variant Model Support -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go deleted file mode 100644 index 32251a7e3c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/endpoints.go +++ /dev/null @@ -1,302 +0,0 @@ -package endpoints - -import ( - "fmt" - "github.com/aws/smithy-go/logging" - "regexp" - "strings" - - "github.com/aws/aws-sdk-go-v2/aws" -) - -// DefaultKey is a compound map key of a variant and other values. -type DefaultKey struct { - Variant EndpointVariant - ServiceVariant ServiceVariant -} - -// EndpointKey is a compound map key of a region and associated variant value. -type EndpointKey struct { - Region string - Variant EndpointVariant - ServiceVariant ServiceVariant -} - -// EndpointVariant is a bit field to describe the endpoints attributes. -type EndpointVariant uint64 - -const ( - // FIPSVariant indicates that the endpoint is FIPS capable. - FIPSVariant EndpointVariant = 1 << (64 - 1 - iota) - - // DualStackVariant indicates that the endpoint is DualStack capable. - DualStackVariant -) - -// ServiceVariant is a bit field to describe the service endpoint attributes. -type ServiceVariant uint64 - -const ( - defaultProtocol = "https" - defaultSigner = "v4" -) - -var ( - protocolPriority = []string{"https", "http"} - signerPriority = []string{"v4", "s3v4"} -) - -// Options provide configuration needed to direct how endpoints are resolved. -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the provided logger. - LogDeprecated bool - - // ResolvedRegion is the resolved region string. If provided (non-zero length) it takes priority - // over the region name passed to the ResolveEndpoint call. - ResolvedRegion string - - // Disable usage of HTTPS (TLS / SSL) - DisableHTTPS bool - - // Instruct the resolver to use a service endpoint that supports dual-stack. - // If a service does not have a dual-stack endpoint an error will be returned by the resolver. - UseDualStackEndpoint aws.DualStackEndpointState - - // Instruct the resolver to use a service endpoint that supports FIPS. - // If a service does not have a FIPS endpoint an error will be returned by the resolver. - UseFIPSEndpoint aws.FIPSEndpointState - - // ServiceVariant is a bitfield of service specified endpoint variant data. - ServiceVariant ServiceVariant -} - -// GetEndpointVariant returns the EndpointVariant for the variant associated options. -func (o Options) GetEndpointVariant() (v EndpointVariant) { - if o.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled { - v |= DualStackVariant - } - if o.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled { - v |= FIPSVariant - } - return v -} - -// Partitions is a slice of partition -type Partitions []Partition - -// ResolveEndpoint resolves a service endpoint for the given region and options. -func (ps Partitions) ResolveEndpoint(region string, opts Options) (aws.Endpoint, error) { - if len(ps) == 0 { - return aws.Endpoint{}, fmt.Errorf("no partitions found") - } - - if opts.Logger == nil { - opts.Logger = logging.Nop{} - } - - if len(opts.ResolvedRegion) > 0 { - region = opts.ResolvedRegion - } - - for i := 0; i < len(ps); i++ { - if !ps[i].canResolveEndpoint(region, opts) { - continue - } - - return ps[i].ResolveEndpoint(region, opts) - } - - // fallback to first partition format to use when resolving the endpoint. - return ps[0].ResolveEndpoint(region, opts) -} - -// Partition is an AWS partition description for a service and its' region endpoints. -type Partition struct { - ID string - RegionRegex *regexp.Regexp - PartitionEndpoint string - IsRegionalized bool - Defaults map[DefaultKey]Endpoint - Endpoints Endpoints -} - -func (p Partition) canResolveEndpoint(region string, opts Options) bool { - _, ok := p.Endpoints[EndpointKey{ - Region: region, - Variant: opts.GetEndpointVariant(), - }] - return ok || p.RegionRegex.MatchString(region) -} - -// ResolveEndpoint resolves and service endpoint for the given region and options. -func (p Partition) ResolveEndpoint(region string, options Options) (resolved aws.Endpoint, err error) { - if len(region) == 0 && len(p.PartitionEndpoint) != 0 { - region = p.PartitionEndpoint - } - - endpoints := p.Endpoints - - variant := options.GetEndpointVariant() - serviceVariant := options.ServiceVariant - - defaults := p.Defaults[DefaultKey{ - Variant: variant, - ServiceVariant: serviceVariant, - }] - - return p.endpointForRegion(region, variant, serviceVariant, endpoints).resolve(p.ID, region, defaults, options) -} - -func (p Partition) endpointForRegion(region string, variant EndpointVariant, serviceVariant ServiceVariant, endpoints Endpoints) Endpoint { - key := EndpointKey{ - Region: region, - Variant: variant, - } - - if e, ok := endpoints[key]; ok { - return e - } - - if !p.IsRegionalized { - return endpoints[EndpointKey{ - Region: p.PartitionEndpoint, - Variant: variant, - ServiceVariant: serviceVariant, - }] - } - - // Unable to find any matching endpoint, return - // blank that will be used for generic endpoint creation. - return Endpoint{} -} - -// Endpoints is a map of service config regions to endpoints -type Endpoints map[EndpointKey]Endpoint - -// CredentialScope is the credential scope of a region and service -type CredentialScope struct { - Region string - Service string -} - -// Endpoint is a service endpoint description -type Endpoint struct { - // True if the endpoint cannot be resolved for this partition/region/service - Unresolveable aws.Ternary - - Hostname string - Protocols []string - - CredentialScope CredentialScope - - SignatureVersions []string - - // Indicates that this endpoint is deprecated. - Deprecated aws.Ternary -} - -// IsZero returns whether the endpoint structure is an empty (zero) value. -func (e Endpoint) IsZero() bool { - switch { - case e.Unresolveable != aws.UnknownTernary: - return false - case len(e.Hostname) != 0: - return false - case len(e.Protocols) != 0: - return false - case e.CredentialScope != (CredentialScope{}): - return false - case len(e.SignatureVersions) != 0: - return false - } - return true -} - -func (e Endpoint) resolve(partition, region string, def Endpoint, options Options) (aws.Endpoint, error) { - var merged Endpoint - merged.mergeIn(def) - merged.mergeIn(e) - e = merged - - if e.IsZero() { - return aws.Endpoint{}, fmt.Errorf("unable to resolve endpoint for region: %v", region) - } - - var u string - if e.Unresolveable != aws.TrueTernary { - // Only attempt to resolve the endpoint if it can be resolved. - hostname := strings.Replace(e.Hostname, "{region}", region, 1) - - scheme := getEndpointScheme(e.Protocols, options.DisableHTTPS) - u = scheme + "://" + hostname - } - - signingRegion := e.CredentialScope.Region - if len(signingRegion) == 0 { - signingRegion = region - } - signingName := e.CredentialScope.Service - - if e.Deprecated == aws.TrueTernary && options.LogDeprecated { - options.Logger.Logf(logging.Warn, "endpoint identifier %q, url %q marked as deprecated", region, u) - } - - return aws.Endpoint{ - URL: u, - PartitionID: partition, - SigningRegion: signingRegion, - SigningName: signingName, - SigningMethod: getByPriority(e.SignatureVersions, signerPriority, defaultSigner), - }, nil -} - -func (e *Endpoint) mergeIn(other Endpoint) { - if other.Unresolveable != aws.UnknownTernary { - e.Unresolveable = other.Unresolveable - } - if len(other.Hostname) > 0 { - e.Hostname = other.Hostname - } - if len(other.Protocols) > 0 { - e.Protocols = other.Protocols - } - if len(other.CredentialScope.Region) > 0 { - e.CredentialScope.Region = other.CredentialScope.Region - } - if len(other.CredentialScope.Service) > 0 { - e.CredentialScope.Service = other.CredentialScope.Service - } - if len(other.SignatureVersions) > 0 { - e.SignatureVersions = other.SignatureVersions - } - if other.Deprecated != aws.UnknownTernary { - e.Deprecated = other.Deprecated - } -} - -func getEndpointScheme(protocols []string, disableHTTPS bool) string { - if disableHTTPS { - return "http" - } - - return getByPriority(protocols, protocolPriority, defaultProtocol) -} - -func getByPriority(s []string, p []string, def string) string { - if len(s) == 0 { - return def - } - - for i := 0; i < len(p); i++ { - for j := 0; j < len(s); j++ { - if s[j] == p[i] { - return s[j] - } - } - } - - return s[0] -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go deleted file mode 100644 index c5168da33a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package endpoints - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md deleted file mode 100644 index f729db535b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/CHANGELOG.md +++ /dev/null @@ -1,283 +0,0 @@ -# v1.8.3 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 - -# v1.8.2 (2025-01-24) - -* **Bug Fix**: Refactor filepath.Walk to filepath.WalkDir - -# v1.8.1 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. - -# v1.8.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. - -# v1.7.3 (2024-01-22) - -* **Bug Fix**: Remove invalid escaping of shared config values. All values in the shared config file will now be interpreted literally, save for fully-quoted strings which are unwrapped for legacy reasons. - -# v1.7.2 (2023-12-08) - -* **Bug Fix**: Correct loading of [services *] sections into shared config. - -# v1.7.1 (2023-11-16) - -* **Bug Fix**: Fix recognition of trailing comments in shared config properties. # or ; separators that aren't preceded by whitespace at the end of a property value should be considered part of it. - -# v1.7.0 (2023-11-13) - -* **Feature**: Replace the legacy config parser with a modern, less-strict implementation. Parsing failures within a section will now simply ignore the invalid line rather than silently drop the entire section. - -# v1.6.0 (2023-11-09.2) - -* **Feature**: BREAKFIX: In order to support subproperty parsing, invalid property definitions must not be ignored - -# v1.5.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.1 (2023-11-07) - -* **Bug Fix**: Fix subproperty performance regression - -# v1.5.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.45 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.44 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.43 (2023-09-22) - -* **Bug Fix**: Fixed a bug where merging `max_attempts` or `duration_seconds` fields across shared config files with invalid values would silently default them to 0. -* **Bug Fix**: Move type assertion of config values out of the parsing stage, which resolves an issue where the contents of a profile would silently be dropped with certain numeric formats. - -# v1.3.42 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.41 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.40 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.39 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.38 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.37 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.36 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.35 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.34 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.33 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.32 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.31 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.30 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.29 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.28 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.27 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.26 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.25 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.24 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.23 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.22 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.21 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.20 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.19 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.18 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.17 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.16 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.15 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.14 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.13 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.12 (2022-05-17) - -* **Bug Fix**: Removes the fuzz testing files from the module, as they are invalid and not used. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.11 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.10 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.9 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.8 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.7 (2022-03-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.6 (2022-02-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.5 (2022-01-28) - -* **Bug Fix**: Fixes the SDK's handling of `duration_sections` in the shared credentials file or specified in multiple shared config and shared credentials files under the same profile. [#1568](https://github.com/aws/aws-sdk-go-v2/pull/1568). Thanks to [Amir Szekely](https://github.com/kichik) for help reproduce this bug. - -# v1.3.4 (2022-01-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2022-01-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.5 (2021-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.4 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.3 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.2 (2021-08-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-08-04) - -* **Feature**: adds error handling for defered close calls -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-07-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-07-01) - -* **Feature**: Support for `:`, `=`, `[`, `]` being present in expression values. - -# v1.0.1 (2021-06-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.0.0 (2021-05-20) - -* **Release**: The `github.com/aws/aws-sdk-go-v2/internal/ini` package is now a Go Module. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/internal/ini/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go deleted file mode 100644 index 0f278d55e6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/errors.go +++ /dev/null @@ -1,22 +0,0 @@ -package ini - -import "fmt" - -// UnableToReadFile is an error indicating that a ini file could not be read -type UnableToReadFile struct { - Err error -} - -// Error returns an error message and the underlying error message if present -func (e *UnableToReadFile) Error() string { - base := "unable to read file" - if e.Err == nil { - return base - } - return fmt.Sprintf("%s: %v", base, e.Err) -} - -// Unwrap returns the underlying error -func (e *UnableToReadFile) Unwrap() error { - return e.Err -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go deleted file mode 100644 index 00df0e3cb9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package ini - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.8.3" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go deleted file mode 100644 index cefcce91e7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/ini.go +++ /dev/null @@ -1,56 +0,0 @@ -// Package ini implements parsing of the AWS shared config file. -// -// Example: -// sections, err := ini.OpenFile("/path/to/file") -// if err != nil { -// panic(err) -// } -// -// profile := "foo" -// section, ok := sections.GetSection(profile) -// if !ok { -// fmt.Printf("section %q could not be found", profile) -// } -package ini - -import ( - "fmt" - "io" - "os" - "strings" -) - -// OpenFile parses shared config from the given file path. -func OpenFile(path string) (sections Sections, err error) { - f, oerr := os.Open(path) - if oerr != nil { - return Sections{}, &UnableToReadFile{Err: oerr} - } - - defer func() { - closeErr := f.Close() - if err == nil { - err = closeErr - } else if closeErr != nil { - err = fmt.Errorf("close error: %v, original error: %w", closeErr, err) - } - }() - - return Parse(f, path) -} - -// Parse parses shared config from the given reader. -func Parse(r io.Reader, path string) (Sections, error) { - contents, err := io.ReadAll(r) - if err != nil { - return Sections{}, fmt.Errorf("read all: %v", err) - } - - lines := strings.Split(string(contents), "\n") - tokens, err := tokenize(lines) - if err != nil { - return Sections{}, fmt.Errorf("tokenize: %v", err) - } - - return parse(tokens, path), nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go deleted file mode 100644 index 2422d90461..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/parse.go +++ /dev/null @@ -1,109 +0,0 @@ -package ini - -import ( - "fmt" - "strings" -) - -func parse(tokens []lineToken, path string) Sections { - parser := &parser{ - path: path, - sections: NewSections(), - } - parser.parse(tokens) - return parser.sections -} - -type parser struct { - csection, ckey string // current state - path string // source file path - sections Sections // parse result -} - -func (p *parser) parse(tokens []lineToken) { - for _, otok := range tokens { - switch tok := otok.(type) { - case *lineTokenProfile: - p.handleProfile(tok) - case *lineTokenProperty: - p.handleProperty(tok) - case *lineTokenSubProperty: - p.handleSubProperty(tok) - case *lineTokenContinuation: - p.handleContinuation(tok) - } - } -} - -func (p *parser) handleProfile(tok *lineTokenProfile) { - name := tok.Name - if tok.Type != "" { - name = fmt.Sprintf("%s %s", tok.Type, tok.Name) - } - p.ckey = "" - p.csection = name - if _, ok := p.sections.container[name]; !ok { - p.sections.container[name] = NewSection(name) - } -} - -func (p *parser) handleProperty(tok *lineTokenProperty) { - if p.csection == "" { - return // LEGACY: don't error on "global" properties - } - - p.ckey = tok.Key - if _, ok := p.sections.container[p.csection].values[tok.Key]; ok { - section := p.sections.container[p.csection] - section.Logs = append(p.sections.container[p.csection].Logs, - fmt.Sprintf( - "For profile: %v, overriding %v value, with a %v value found in a duplicate profile defined later in the same file %v. \n", - p.csection, tok.Key, tok.Key, p.path, - ), - ) - p.sections.container[p.csection] = section - } - - p.sections.container[p.csection].values[tok.Key] = Value{ - str: tok.Value, - } - p.sections.container[p.csection].SourceFile[tok.Key] = p.path -} - -func (p *parser) handleSubProperty(tok *lineTokenSubProperty) { - if p.csection == "" { - return // LEGACY: don't error on "global" properties - } - - if p.ckey == "" || p.sections.container[p.csection].values[p.ckey].str != "" { - // This is an "orphaned" subproperty, either because it's at - // the beginning of a section or because the last property's - // value isn't empty. Either way we're lenient here and - // "promote" this to a normal property. - p.handleProperty(&lineTokenProperty{ - Key: tok.Key, - Value: strings.TrimSpace(trimPropertyComment(tok.Value)), - }) - return - } - - if p.sections.container[p.csection].values[p.ckey].mp == nil { - p.sections.container[p.csection].values[p.ckey] = Value{ - mp: map[string]string{}, - } - } - p.sections.container[p.csection].values[p.ckey].mp[tok.Key] = tok.Value -} - -func (p *parser) handleContinuation(tok *lineTokenContinuation) { - if p.ckey == "" { - return - } - - value, _ := p.sections.container[p.csection].values[p.ckey] - if value.str != "" && value.mp == nil { - value.str = fmt.Sprintf("%s\n%s", value.str, tok.Value) - } - - p.sections.container[p.csection].values[p.ckey] = value -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go deleted file mode 100644 index dd89848e69..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/sections.go +++ /dev/null @@ -1,157 +0,0 @@ -package ini - -import ( - "sort" -) - -// Sections is a map of Section structures that represent -// a configuration. -type Sections struct { - container map[string]Section -} - -// NewSections returns empty ini Sections -func NewSections() Sections { - return Sections{ - container: make(map[string]Section, 0), - } -} - -// GetSection will return section p. If section p does not exist, -// false will be returned in the second parameter. -func (t Sections) GetSection(p string) (Section, bool) { - v, ok := t.container[p] - return v, ok -} - -// HasSection denotes if Sections consist of a section with -// provided name. -func (t Sections) HasSection(p string) bool { - _, ok := t.container[p] - return ok -} - -// SetSection sets a section value for provided section name. -func (t Sections) SetSection(p string, v Section) Sections { - t.container[p] = v - return t -} - -// DeleteSection deletes a section entry/value for provided section name./ -func (t Sections) DeleteSection(p string) { - delete(t.container, p) -} - -// values represents a map of union values. -type values map[string]Value - -// List will return a list of all sections that were successfully -// parsed. -func (t Sections) List() []string { - keys := make([]string, len(t.container)) - i := 0 - for k := range t.container { - keys[i] = k - i++ - } - - sort.Strings(keys) - return keys -} - -// Section contains a name and values. This represent -// a sectioned entry in a configuration file. -type Section struct { - // Name is the Section profile name - Name string - - // values are the values within parsed profile - values values - - // Errors is the list of errors - Errors []error - - // Logs is the list of logs - Logs []string - - // SourceFile is the INI Source file from where this section - // was retrieved. They key is the property, value is the - // source file the property was retrieved from. - SourceFile map[string]string -} - -// NewSection returns an initialize section for the name -func NewSection(name string) Section { - return Section{ - Name: name, - values: values{}, - SourceFile: map[string]string{}, - } -} - -// List will return a list of all -// services in values -func (t Section) List() []string { - keys := make([]string, len(t.values)) - i := 0 - for k := range t.values { - keys[i] = k - i++ - } - - sort.Strings(keys) - return keys -} - -// UpdateSourceFile updates source file for a property to provided filepath. -func (t Section) UpdateSourceFile(property string, filepath string) { - t.SourceFile[property] = filepath -} - -// UpdateValue updates value for a provided key with provided value -func (t Section) UpdateValue(k string, v Value) error { - t.values[k] = v - return nil -} - -// Has will return whether or not an entry exists in a given section -func (t Section) Has(k string) bool { - _, ok := t.values[k] - return ok -} - -// ValueType will returned what type the union is set to. If -// k was not found, the NoneType will be returned. -func (t Section) ValueType(k string) (ValueType, bool) { - v, ok := t.values[k] - return v.Type, ok -} - -// Bool returns a bool value at k -func (t Section) Bool(k string) (bool, bool) { - return t.values[k].BoolValue() -} - -// Int returns an integer value at k -func (t Section) Int(k string) (int64, bool) { - return t.values[k].IntValue() -} - -// Map returns a map value at k -func (t Section) Map(k string) map[string]string { - return t.values[k].MapValue() -} - -// Float64 returns a float value at k -func (t Section) Float64(k string) (float64, bool) { - return t.values[k].FloatValue() -} - -// String returns the string value at k -func (t Section) String(k string) string { - _, ok := t.values[k] - if !ok { - return "" - } - return t.values[k].StringValue() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go deleted file mode 100644 index ed77d08351..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/strings.go +++ /dev/null @@ -1,89 +0,0 @@ -package ini - -import ( - "strings" -) - -func trimProfileComment(s string) string { - r, _, _ := strings.Cut(s, "#") - r, _, _ = strings.Cut(r, ";") - return r -} - -func trimPropertyComment(s string) string { - r, _, _ := strings.Cut(s, " #") - r, _, _ = strings.Cut(r, " ;") - r, _, _ = strings.Cut(r, "\t#") - r, _, _ = strings.Cut(r, "\t;") - return r -} - -// assumes no surrounding comment -func splitProperty(s string) (string, string, bool) { - equalsi := strings.Index(s, "=") - coloni := strings.Index(s, ":") // LEGACY: also supported for property assignment - sep := "=" - if equalsi == -1 || coloni != -1 && coloni < equalsi { - sep = ":" - } - - k, v, ok := strings.Cut(s, sep) - if !ok { - return "", "", false - } - return strings.TrimSpace(k), strings.TrimSpace(v), true -} - -// assumes no surrounding comment, whitespace, or profile brackets -func splitProfile(s string) (string, string) { - var first int - for i, r := range s { - if isLineSpace(r) { - if first == 0 { - first = i - } - } else { - if first != 0 { - return s[:first], s[i:] - } - } - } - if first == 0 { - return "", s // type component is effectively blank - } - return "", "" -} - -func isLineSpace(r rune) bool { - return r == ' ' || r == '\t' -} - -func unquote(s string) string { - if isSingleQuoted(s) || isDoubleQuoted(s) { - return s[1 : len(s)-1] - } - return s -} - -// applies various legacy conversions to property values: -// - remote wrapping single/doublequotes -func legacyStrconv(s string) string { - s = unquote(s) - return s -} - -func isSingleQuoted(s string) bool { - return hasAffixes(s, "'", "'") -} - -func isDoubleQuoted(s string) bool { - return hasAffixes(s, `"`, `"`) -} - -func isBracketed(s string) bool { - return hasAffixes(s, "[", "]") -} - -func hasAffixes(s, left, right string) bool { - return strings.HasPrefix(s, left) && strings.HasSuffix(s, right) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go deleted file mode 100644 index 6e9a03744e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/token.go +++ /dev/null @@ -1,32 +0,0 @@ -package ini - -type lineToken interface { - isLineToken() -} - -type lineTokenProfile struct { - Type string - Name string -} - -func (*lineTokenProfile) isLineToken() {} - -type lineTokenProperty struct { - Key string - Value string -} - -func (*lineTokenProperty) isLineToken() {} - -type lineTokenContinuation struct { - Value string -} - -func (*lineTokenContinuation) isLineToken() {} - -type lineTokenSubProperty struct { - Key string - Value string -} - -func (*lineTokenSubProperty) isLineToken() {} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go deleted file mode 100644 index 89a7736841..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/tokenize.go +++ /dev/null @@ -1,92 +0,0 @@ -package ini - -import ( - "strings" -) - -func tokenize(lines []string) ([]lineToken, error) { - tokens := make([]lineToken, 0, len(lines)) - for _, line := range lines { - if len(strings.TrimSpace(line)) == 0 || isLineComment(line) { - continue - } - - if tok := asProfile(line); tok != nil { - tokens = append(tokens, tok) - } else if tok := asProperty(line); tok != nil { - tokens = append(tokens, tok) - } else if tok := asSubProperty(line); tok != nil { - tokens = append(tokens, tok) - } else if tok := asContinuation(line); tok != nil { - tokens = append(tokens, tok) - } // unrecognized tokens are effectively ignored - } - return tokens, nil -} - -func isLineComment(line string) bool { - trimmed := strings.TrimLeft(line, " \t") - return strings.HasPrefix(trimmed, "#") || strings.HasPrefix(trimmed, ";") -} - -func asProfile(line string) *lineTokenProfile { // " [ type name ] ; comment" - trimmed := strings.TrimSpace(trimProfileComment(line)) // "[ type name ]" - if !isBracketed(trimmed) { - return nil - } - trimmed = trimmed[1 : len(trimmed)-1] // " type name " (or just " name ") - trimmed = strings.TrimSpace(trimmed) // "type name" / "name" - typ, name := splitProfile(trimmed) - return &lineTokenProfile{ - Type: typ, - Name: name, - } -} - -func asProperty(line string) *lineTokenProperty { - if isLineSpace(rune(line[0])) { - return nil - } - - trimmed := trimPropertyComment(line) - trimmed = strings.TrimRight(trimmed, " \t") - k, v, ok := splitProperty(trimmed) - if !ok { - return nil - } - - return &lineTokenProperty{ - Key: strings.ToLower(k), // LEGACY: normalize key case - Value: legacyStrconv(v), // LEGACY: see func docs - } -} - -func asSubProperty(line string) *lineTokenSubProperty { - if !isLineSpace(rune(line[0])) { - return nil - } - - // comments on sub-properties are included in the value - trimmed := strings.TrimLeft(line, " \t") - k, v, ok := splitProperty(trimmed) - if !ok { - return nil - } - - return &lineTokenSubProperty{ // same LEGACY constraints as in normal property - Key: strings.ToLower(k), - Value: legacyStrconv(v), - } -} - -func asContinuation(line string) *lineTokenContinuation { - if !isLineSpace(rune(line[0])) { - return nil - } - - // includes comments like sub-properties - trimmed := strings.TrimLeft(line, " \t") - return &lineTokenContinuation{ - Value: trimmed, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go deleted file mode 100644 index e3706b3c31..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/ini/value.go +++ /dev/null @@ -1,93 +0,0 @@ -package ini - -import ( - "fmt" - "strconv" - "strings" -) - -// ValueType is an enum that will signify what type -// the Value is -type ValueType int - -func (v ValueType) String() string { - switch v { - case NoneType: - return "NONE" - case StringType: - return "STRING" - } - - return "" -} - -// ValueType enums -const ( - NoneType = ValueType(iota) - StringType - QuotedStringType -) - -// Value is a union container -type Value struct { - Type ValueType - - str string - mp map[string]string -} - -// NewStringValue returns a Value type generated using a string input. -func NewStringValue(str string) (Value, error) { - return Value{str: str}, nil -} - -func (v Value) String() string { - switch v.Type { - case StringType: - return fmt.Sprintf("string: %s", string(v.str)) - case QuotedStringType: - return fmt.Sprintf("quoted string: %s", string(v.str)) - default: - return "union not set" - } -} - -// MapValue returns a map value for sub properties -func (v Value) MapValue() map[string]string { - return v.mp -} - -// IntValue returns an integer value -func (v Value) IntValue() (int64, bool) { - i, err := strconv.ParseInt(string(v.str), 0, 64) - if err != nil { - return 0, false - } - return i, true -} - -// FloatValue returns a float value -func (v Value) FloatValue() (float64, bool) { - f, err := strconv.ParseFloat(string(v.str), 64) - if err != nil { - return 0, false - } - return f, true -} - -// BoolValue returns a bool value -func (v Value) BoolValue() (bool, bool) { - // we don't use ParseBool as it recognizes more than what we've - // historically supported - if strings.EqualFold(v.str, "true") { - return true, true - } else if strings.EqualFold(v.str, "false") { - return false, true - } - return false, false -} - -// StringValue returns the string value -func (v Value) StringValue() string { - return v.str -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go deleted file mode 100644 index 8e24a3f0a4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/middleware/middleware.go +++ /dev/null @@ -1,42 +0,0 @@ -package middleware - -import ( - "context" - "sync/atomic" - "time" - - internalcontext "github.com/aws/aws-sdk-go-v2/internal/context" - "github.com/aws/smithy-go/middleware" -) - -// AddTimeOffsetMiddleware sets a value representing clock skew on the request context. -// This can be read by other operations (such as signing) to correct the date value they send -// on the request -type AddTimeOffsetMiddleware struct { - Offset *atomic.Int64 -} - -// ID the identifier for AddTimeOffsetMiddleware -func (m *AddTimeOffsetMiddleware) ID() string { return "AddTimeOffsetMiddleware" } - -// HandleBuild sets a value for attemptSkew on the request context if one is set on the client. -func (m AddTimeOffsetMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - if m.Offset != nil { - offset := time.Duration(m.Offset.Load()) - ctx = internalcontext.SetAttemptSkewContext(ctx, offset) - } - return next.HandleBuild(ctx, in) -} - -// HandleDeserialize gets the clock skew context from the context, and if set, sets it on the pointer -// held by AddTimeOffsetMiddleware -func (m *AddTimeOffsetMiddleware) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - if v := internalcontext.GetAttemptSkewContext(ctx); v != 0 { - m.Offset.Store(v.Nanoseconds()) - } - return next.HandleDeserialize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go deleted file mode 100644 index c8484dcd75..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/rand/rand.go +++ /dev/null @@ -1,33 +0,0 @@ -package rand - -import ( - "crypto/rand" - "fmt" - "io" - "math/big" -) - -func init() { - Reader = rand.Reader -} - -// Reader provides a random reader that can reset during testing. -var Reader io.Reader - -var floatMaxBigInt = big.NewInt(1 << 53) - -// Float64 returns a float64 read from an io.Reader source. The returned float will be between [0.0, 1.0). -func Float64(reader io.Reader) (float64, error) { - bi, err := rand.Int(reader, floatMaxBigInt) - if err != nil { - return 0, fmt.Errorf("failed to read random value, %v", err) - } - - return float64(bi.Int64()) / (1 << 53), nil -} - -// CryptoRandFloat64 returns a random float64 obtained from the crypto rand -// source. -func CryptoRandFloat64() (float64, error) { - return Float64(Reader) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go deleted file mode 100644 index 2b42cbe642..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/interfaces.go +++ /dev/null @@ -1,9 +0,0 @@ -package sdk - -// Invalidator provides access to a type's invalidate method to make it -// invalidate it cache. -// -// e.g aws.SafeCredentialsProvider's Invalidate method. -type Invalidator interface { - Invalidate() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go deleted file mode 100644 index 8e8dabad54..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdk/time.go +++ /dev/null @@ -1,74 +0,0 @@ -package sdk - -import ( - "context" - "time" -) - -func init() { - NowTime = time.Now - Sleep = time.Sleep - SleepWithContext = sleepWithContext -} - -// NowTime is a value for getting the current time. This value can be overridden -// for testing mocking out current time. -var NowTime func() time.Time - -// Sleep is a value for sleeping for a duration. This value can be overridden -// for testing and mocking out sleep duration. -var Sleep func(time.Duration) - -// SleepWithContext will wait for the timer duration to expire, or the context -// is canceled. Which ever happens first. If the context is canceled the Context's -// error will be returned. -// -// This value can be overridden for testing and mocking out sleep duration. -var SleepWithContext func(context.Context, time.Duration) error - -// sleepWithContext will wait for the timer duration to expire, or the context -// is canceled. Which ever happens first. If the context is canceled the -// Context's error will be returned. -func sleepWithContext(ctx context.Context, dur time.Duration) error { - t := time.NewTimer(dur) - defer t.Stop() - - select { - case <-t.C: - break - case <-ctx.Done(): - return ctx.Err() - } - - return nil -} - -// noOpSleepWithContext does nothing, returns immediately. -func noOpSleepWithContext(context.Context, time.Duration) error { - return nil -} - -func noOpSleep(time.Duration) {} - -// TestingUseNopSleep is a utility for disabling sleep across the SDK for -// testing. -func TestingUseNopSleep() func() { - SleepWithContext = noOpSleepWithContext - Sleep = noOpSleep - - return func() { - SleepWithContext = sleepWithContext - Sleep = time.Sleep - } -} - -// TestingUseReferenceTime is a utility for swapping the time function across the SDK to return a specific reference time -// for testing purposes. -func TestingUseReferenceTime(referenceTime time.Time) func() { - NowTime = func() time.Time { - return referenceTime - } - return func() { - NowTime = time.Now - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go deleted file mode 100644 index 6c443988bb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sdkio/byte.go +++ /dev/null @@ -1,12 +0,0 @@ -package sdkio - -const ( - // Byte is 8 bits - Byte int64 = 1 - // KibiByte (KiB) is 1024 Bytes - KibiByte = Byte * 1024 - // MebiByte (MiB) is 1024 KiB - MebiByte = KibiByte * 1024 - // GibiByte (GiB) is 1024 MiB - GibiByte = MebiByte * 1024 -) diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go deleted file mode 100644 index c96b717e08..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/shareddefaults/shared_config.go +++ /dev/null @@ -1,47 +0,0 @@ -package shareddefaults - -import ( - "os" - "os/user" - "path/filepath" -) - -// SharedCredentialsFilename returns the SDK's default file path -// for the shared credentials file. -// -// Builds the shared config file path based on the OS's platform. -// -// - Linux/Unix: $HOME/.aws/credentials -// - Windows: %USERPROFILE%\.aws\credentials -func SharedCredentialsFilename() string { - return filepath.Join(UserHomeDir(), ".aws", "credentials") -} - -// SharedConfigFilename returns the SDK's default file path for -// the shared config file. -// -// Builds the shared config file path based on the OS's platform. -// -// - Linux/Unix: $HOME/.aws/config -// - Windows: %USERPROFILE%\.aws\config -func SharedConfigFilename() string { - return filepath.Join(UserHomeDir(), ".aws", "config") -} - -// UserHomeDir returns the home directory for the user the process is -// running under. -func UserHomeDir() string { - // Ignore errors since we only care about Windows and *nix. - home, _ := os.UserHomeDir() - - if len(home) > 0 { - return home - } - - currUser, _ := user.Current() - if currUser != nil { - home = currUser.HomeDir - } - - return home -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go deleted file mode 100644 index d008ae27cb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/strings/strings.go +++ /dev/null @@ -1,11 +0,0 @@ -package strings - -import ( - "strings" -) - -// HasPrefixFold tests whether the string s begins with prefix, interpreted as UTF-8 strings, -// under Unicode case-folding. -func HasPrefixFold(s, prefix string) bool { - return len(s) >= len(prefix) && strings.EqualFold(s[0:len(prefix)], prefix) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE deleted file mode 100644 index fe6a62006a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/LICENSE +++ /dev/null @@ -1,28 +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 COPYIGHT 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/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go deleted file mode 100644 index cb70616e80..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/docs.go +++ /dev/null @@ -1,7 +0,0 @@ -// Package singleflight provides a duplicate function call suppression -// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight -// package. The package is forked, because the package a part of the unstable -// and unversioned golang.org/x/sync module. -// -// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight -package singleflight diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go deleted file mode 100644 index e8a1b17d56..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/sync/singleflight/singleflight.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2013 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 singleflight - -import ( - "bytes" - "errors" - "fmt" - "runtime" - "runtime/debug" - "sync" -) - -// errGoexit indicates the runtime.Goexit was called in -// the user given function. -var errGoexit = errors.New("runtime.Goexit was called") - -// A panicError is an arbitrary value recovered from a panic -// with the stack trace during the execution of given function. -type panicError struct { - value interface{} - stack []byte -} - -// Error implements error interface. -func (p *panicError) Error() string { - return fmt.Sprintf("%v\n\n%s", p.value, p.stack) -} - -func newPanicError(v interface{}) error { - stack := debug.Stack() - - // The first line of the stack trace is of the form "goroutine N [status]:" - // but by the time the panic reaches Do the goroutine may no longer exist - // and its status will have changed. Trim out the misleading line. - if line := bytes.IndexByte(stack[:], '\n'); line >= 0 { - stack = stack[line+1:] - } - return &panicError{value: v, stack: stack} -} - -// call is an in-flight or completed singleflight.Do call -type call struct { - wg sync.WaitGroup - - // These fields are written once before the WaitGroup is done - // and are only read after the WaitGroup is done. - val interface{} - err error - - // forgotten indicates whether Forget was called with this call's key - // while the call was still in flight. - forgotten bool - - // These fields are read and written with the singleflight - // mutex held before the WaitGroup is done, and are read but - // not written after the WaitGroup is done. - dups int - chans []chan<- Result -} - -// Group represents a class of work and forms a namespace in -// which units of work can be executed with duplicate suppression. -type Group struct { - mu sync.Mutex // protects m - m map[string]*call // lazily initialized -} - -// Result holds the results of Do, so they can be passed -// on a channel. -type Result struct { - Val interface{} - Err error - Shared bool -} - -// Do executes and returns the results of the given function, making -// sure that only one execution is in-flight for a given key at a -// time. If a duplicate comes in, the duplicate caller waits for the -// original to complete and receives the same results. -// The return value shared indicates whether v was given to multiple callers. -func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) { - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - g.mu.Unlock() - c.wg.Wait() - - if e, ok := c.err.(*panicError); ok { - panic(e) - } else if c.err == errGoexit { - runtime.Goexit() - } - return c.val, c.err, true - } - c := new(call) - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - g.doCall(c, key, fn) - return c.val, c.err, c.dups > 0 -} - -// DoChan is like Do but returns a channel that will receive the -// results when they are ready. -// -// The returned channel will not be closed. -func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result { - ch := make(chan Result, 1) - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - c.chans = append(c.chans, ch) - g.mu.Unlock() - return ch - } - c := &call{chans: []chan<- Result{ch}} - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - go g.doCall(c, key, fn) - - return ch -} - -// doCall handles the single call for a key. -func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) { - normalReturn := false - recovered := false - - // use double-defer to distinguish panic from runtime.Goexit, - // more details see https://golang.org/cl/134395 - defer func() { - // the given function invoked runtime.Goexit - if !normalReturn && !recovered { - c.err = errGoexit - } - - c.wg.Done() - g.mu.Lock() - defer g.mu.Unlock() - if !c.forgotten { - delete(g.m, key) - } - - if e, ok := c.err.(*panicError); ok { - // In order to prevent the waiting channels from being blocked forever, - // needs to ensure that this panic cannot be recovered. - if len(c.chans) > 0 { - go panic(e) - select {} // Keep this goroutine around so that it will appear in the crash dump. - } else { - panic(e) - } - } else if c.err == errGoexit { - // Already in the process of goexit, no need to call again - } else { - // Normal return - for _, ch := range c.chans { - ch <- Result{c.val, c.err, c.dups > 0} - } - } - }() - - func() { - defer func() { - if !normalReturn { - // Ideally, we would wait to take a stack trace until we've determined - // whether this is a panic or a runtime.Goexit. - // - // Unfortunately, the only way we can distinguish the two is to see - // whether the recover stopped the goroutine from terminating, and by - // the time we know that, the part of the stack trace relevant to the - // panic has been discarded. - if r := recover(); r != nil { - c.err = newPanicError(r) - } - } - }() - - c.val, c.err = fn() - normalReturn = true - }() - - if !normalReturn { - recovered = true - } -} - -// Forget tells the singleflight to forget about a key. Future calls -// to Do for this key will call the function rather than waiting for -// an earlier call to complete. -func (g *Group) Forget(key string) { - g.mu.Lock() - if c, ok := g.m[key]; ok { - c.forgotten = true - } - delete(g.m, key) - g.mu.Unlock() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go deleted file mode 100644 index 5d69db5f24..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/timeconv/duration.go +++ /dev/null @@ -1,13 +0,0 @@ -package timeconv - -import "time" - -// FloatSecondsDur converts a fractional seconds to duration. -func FloatSecondsDur(v float64) time.Duration { - return time.Duration(v * float64(time.Second)) -} - -// DurSecondsFloat converts a duration into fractional seconds. -func DurSecondsFloat(d time.Duration) float64 { - return float64(d) / float64(time.Second) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md deleted file mode 100644 index 607fc09220..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/CHANGELOG.md +++ /dev/null @@ -1,176 +0,0 @@ -# v1.13.1 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. - -# v1.13.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. - -# v1.12.4 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. - -# v1.12.3 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 - -# v1.12.2 (2025-01-24) - -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.12.1 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. - -# v1.12.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. - -# v1.11.5 (2024-09-20) - -* No change notes available for this release. - -# v1.11.4 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. - -# v1.11.3 (2024-06-28) - -* No change notes available for this release. - -# v1.11.2 (2024-03-29) - -* No change notes available for this release. - -# v1.11.1 (2024-02-21) - -* No change notes available for this release. - -# v1.11.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. - -# v1.10.4 (2023-12-07) - -* No change notes available for this release. - -# v1.10.3 (2023-11-30) - -* No change notes available for this release. - -# v1.10.2 (2023-11-29) - -* No change notes available for this release. - -# v1.10.1 (2023-11-15) - -* No change notes available for this release. - -# v1.10.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). - -# v1.9.15 (2023-10-06) - -* No change notes available for this release. - -# v1.9.14 (2023-08-18) - -* No change notes available for this release. - -# v1.9.13 (2023-08-07) - -* No change notes available for this release. - -# v1.9.12 (2023-07-31) - -* No change notes available for this release. - -# v1.9.11 (2022-12-02) - -* No change notes available for this release. - -# v1.9.10 (2022-10-24) - -* No change notes available for this release. - -# v1.9.9 (2022-09-14) - -* No change notes available for this release. - -# v1.9.8 (2022-09-02) - -* No change notes available for this release. - -# v1.9.7 (2022-08-31) - -* No change notes available for this release. - -# v1.9.6 (2022-08-29) - -* No change notes available for this release. - -# v1.9.5 (2022-08-11) - -* No change notes available for this release. - -# v1.9.4 (2022-08-09) - -* No change notes available for this release. - -# v1.9.3 (2022-06-29) - -* No change notes available for this release. - -# v1.9.2 (2022-06-07) - -* No change notes available for this release. - -# v1.9.1 (2022-03-24) - -* No change notes available for this release. - -# v1.9.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.8.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.7.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.6.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.5.0 (2021-11-06) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.4.0 (2021-10-21) - -* **Feature**: Updated to latest version - -# v1.3.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.2.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. - -# v1.2.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go deleted file mode 100644 index 3f451fc9b4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/accept_encoding_gzip.go +++ /dev/null @@ -1,176 +0,0 @@ -package acceptencoding - -import ( - "compress/gzip" - "context" - "fmt" - "io" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -const acceptEncodingHeaderKey = "Accept-Encoding" -const contentEncodingHeaderKey = "Content-Encoding" - -// AddAcceptEncodingGzipOptions provides the options for the -// AddAcceptEncodingGzip middleware setup. -type AddAcceptEncodingGzipOptions struct { - Enable bool -} - -// AddAcceptEncodingGzip explicitly adds handling for accept-encoding GZIP -// middleware to the operation stack. This allows checksums to be correctly -// computed without disabling GZIP support. -func AddAcceptEncodingGzip(stack *middleware.Stack, options AddAcceptEncodingGzipOptions) error { - if options.Enable { - if err := stack.Finalize.Add(&EnableGzip{}, middleware.Before); err != nil { - return err - } - if err := stack.Deserialize.Insert(&DecompressGzip{}, "OperationDeserializer", middleware.After); err != nil { - return err - } - return nil - } - - return stack.Finalize.Add(&DisableGzip{}, middleware.Before) -} - -// DisableGzip provides the middleware that will -// disable the underlying http client automatically enabling for gzip -// decompress content-encoding support. -type DisableGzip struct{} - -// ID returns the id for the middleware. -func (*DisableGzip) ID() string { - return "DisableAcceptEncodingGzip" -} - -// HandleFinalize implements the FinalizeMiddleware interface. -func (*DisableGzip) HandleFinalize( - ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - output middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return output, metadata, &smithy.SerializationError{ - Err: fmt.Errorf("unknown request type %T", input.Request), - } - } - - // Explicitly enable gzip support, this will prevent the http client from - // auto extracting the zipped content. - req.Header.Set(acceptEncodingHeaderKey, "identity") - - return next.HandleFinalize(ctx, input) -} - -// EnableGzip provides a middleware to enable support for -// gzip responses, with manual decompression. This prevents the underlying HTTP -// client from performing the gzip decompression automatically. -type EnableGzip struct{} - -// ID returns the id for the middleware. -func (*EnableGzip) ID() string { - return "AcceptEncodingGzip" -} - -// HandleFinalize implements the FinalizeMiddleware interface. -func (*EnableGzip) HandleFinalize( - ctx context.Context, input middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - output middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := input.Request.(*smithyhttp.Request) - if !ok { - return output, metadata, &smithy.SerializationError{ - Err: fmt.Errorf("unknown request type %T", input.Request), - } - } - - // Explicitly enable gzip support, this will prevent the http client from - // auto extracting the zipped content. - req.Header.Set(acceptEncodingHeaderKey, "gzip") - - return next.HandleFinalize(ctx, input) -} - -// DecompressGzip provides the middleware for decompressing a gzip -// response from the service. -type DecompressGzip struct{} - -// ID returns the id for the middleware. -func (*DecompressGzip) ID() string { - return "DecompressGzip" -} - -// HandleDeserialize implements the DeserializeMiddlware interface. -func (*DecompressGzip) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - output, metadata, err = next.HandleDeserialize(ctx, input) - if err != nil { - return output, metadata, err - } - - resp, ok := output.RawResponse.(*smithyhttp.Response) - if !ok { - return output, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("unknown response type %T", output.RawResponse), - } - } - if v := resp.Header.Get(contentEncodingHeaderKey); v != "gzip" { - return output, metadata, err - } - - // Clear content length since it will no longer be valid once the response - // body is decompressed. - resp.Header.Del("Content-Length") - resp.ContentLength = -1 - - resp.Body = wrapGzipReader(resp.Body) - - return output, metadata, err -} - -type gzipReader struct { - reader io.ReadCloser - gzip *gzip.Reader -} - -func wrapGzipReader(reader io.ReadCloser) *gzipReader { - return &gzipReader{ - reader: reader, - } -} - -// Read wraps the gzip reader around the underlying io.Reader to extract the -// response bytes on the fly. -func (g *gzipReader) Read(b []byte) (n int, err error) { - if g.gzip == nil { - g.gzip, err = gzip.NewReader(g.reader) - if err != nil { - g.gzip = nil // ensure uninitialized gzip value isn't used in close. - return 0, fmt.Errorf("failed to decompress gzip response, %w", err) - } - } - - return g.gzip.Read(b) -} - -func (g *gzipReader) Close() error { - if g.gzip == nil { - return nil - } - - if err := g.gzip.Close(); err != nil { - g.reader.Close() - return fmt.Errorf("failed to decompress gzip response, %w", err) - } - - return g.reader.Close() -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go deleted file mode 100644 index 7056d9bf6f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/doc.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Package acceptencoding provides customizations associated with Accept Encoding Header. - -# Accept encoding gzip - -The Go HTTP client automatically supports accept-encoding and content-encoding -gzip by default. This default behavior is not desired by the SDK, and prevents -validating the response body's checksum. To prevent this the SDK must manually -control usage of content-encoding gzip. - -To control content-encoding, the SDK must always set the `Accept-Encoding` -header to a value. This prevents the HTTP client from using gzip automatically. -When gzip is enabled on the API client, the SDK's customization will control -decompressing the gzip data in order to not break the checksum validation. When -gzip is disabled, the API client will disable gzip, preventing the HTTP -client's default behavior. - -An `EnableAcceptEncodingGzip` option may or may not be present depending on the client using -the below middleware. The option if present can be used to enable auto decompressing -gzip by the SDK. -*/ -package acceptencoding diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go deleted file mode 100644 index 7a0b6aae29..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package acceptencoding - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md deleted file mode 100644 index 6f143784e1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/CHANGELOG.md +++ /dev/null @@ -1,482 +0,0 @@ -# v1.13.9 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2025-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2025-08-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.18 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.17 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.16 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.15 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.12.9 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.20 (2024-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.19 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.18 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.17 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.16 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.15 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.14 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.13 (2024-06-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.12 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.11 (2024-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.10 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.9 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.8 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.7 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.6 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.5 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.4 (2024-03-05) - -* **Bug Fix**: Restore typo'd API `AddAsIsInternalPresigingMiddleware` as an alias for backwards compatibility. - -# v1.11.3 (2024-03-04) - -* **Bug Fix**: Correct a typo in internal AddAsIsPresigningMiddleware API. - -# v1.11.2 (2024-02-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.10 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.9 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.8 (2023-12-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.7 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.6 (2023-11-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.3 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.2 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.1 (2023-11-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.37 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.36 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.35 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.34 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.33 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.32 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.31 (2023-07-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.30 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.29 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.28 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.27 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.26 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.25 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.24 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.23 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.22 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.21 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.20 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.19 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.18 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.17 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.16 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-02-24) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.2 (2021-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-11-06) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.1.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go deleted file mode 100644 index 5d5286f92c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/context.go +++ /dev/null @@ -1,56 +0,0 @@ -package presignedurl - -import ( - "context" - - "github.com/aws/smithy-go/middleware" -) - -// WithIsPresigning adds the isPresigning sentinel value to a context to signal -// that the middleware stack is using the presign flow. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func WithIsPresigning(ctx context.Context) context.Context { - return middleware.WithStackValue(ctx, isPresigningKey{}, true) -} - -// GetIsPresigning returns if the context contains the isPresigning sentinel -// value for presigning flows. -// -// Scoped to stack values. Use github.com/aws/smithy-go/middleware#ClearStackValues -// to clear all stack values. -func GetIsPresigning(ctx context.Context) bool { - v, _ := middleware.GetStackValue(ctx, isPresigningKey{}).(bool) - return v -} - -type isPresigningKey struct{} - -// AddAsIsPresigningMiddleware adds a middleware to the head of the stack that -// will update the stack's context to be flagged as being invoked for the -// purpose of presigning. -func AddAsIsPresigningMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(asIsPresigningMiddleware{}, middleware.Before) -} - -// AddAsIsPresigingMiddleware is an alias for backwards compatibility. -// -// Deprecated: This API was released with a typo. Use -// [AddAsIsPresigningMiddleware] instead. -func AddAsIsPresigingMiddleware(stack *middleware.Stack) error { - return AddAsIsPresigningMiddleware(stack) -} - -type asIsPresigningMiddleware struct{} - -func (asIsPresigningMiddleware) ID() string { return "AsIsPresigningMiddleware" } - -func (asIsPresigningMiddleware) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - ctx = WithIsPresigning(ctx) - return next.HandleInitialize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go deleted file mode 100644 index 1b85375cf8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package presignedurl provides the customizations for API clients to fill in -// presigned URLs into input parameters. -package presignedurl diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go deleted file mode 100644 index bc347369d8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package presignedurl - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.9" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go b/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go deleted file mode 100644 index 1e2f5c8122..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/internal/presigned-url/middleware.go +++ /dev/null @@ -1,110 +0,0 @@ -package presignedurl - -import ( - "context" - "fmt" - - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - v4 "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - - "github.com/aws/smithy-go/middleware" -) - -// URLPresigner provides the interface to presign the input parameters in to a -// presigned URL. -type URLPresigner interface { - // PresignURL presigns a URL. - PresignURL(ctx context.Context, srcRegion string, params interface{}) (*v4.PresignedHTTPRequest, error) -} - -// ParameterAccessor provides an collection of accessor to for retrieving and -// setting the values needed to PresignedURL generation -type ParameterAccessor struct { - // GetPresignedURL accessor points to a function that retrieves a presigned url if present - GetPresignedURL func(interface{}) (string, bool, error) - - // GetSourceRegion accessor points to a function that retrieves source region for presigned url - GetSourceRegion func(interface{}) (string, bool, error) - - // CopyInput accessor points to a function that takes in an input, and returns a copy. - CopyInput func(interface{}) (interface{}, error) - - // SetDestinationRegion accessor points to a function that sets destination region on api input struct - SetDestinationRegion func(interface{}, string) error - - // SetPresignedURL accessor points to a function that sets presigned url on api input struct - SetPresignedURL func(interface{}, string) error -} - -// Options provides the set of options needed by the presigned URL middleware. -type Options struct { - // Accessor are the parameter accessors used by this middleware - Accessor ParameterAccessor - - // Presigner is the URLPresigner used by the middleware - Presigner URLPresigner -} - -// AddMiddleware adds the Presign URL middleware to the middleware stack. -func AddMiddleware(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&presign{options: opts}, middleware.Before) -} - -// RemoveMiddleware removes the Presign URL middleware from the stack. -func RemoveMiddleware(stack *middleware.Stack) error { - _, err := stack.Initialize.Remove((*presign)(nil).ID()) - return err -} - -type presign struct { - options Options -} - -func (m *presign) ID() string { return "Presign" } - -func (m *presign) HandleInitialize( - ctx context.Context, input middleware.InitializeInput, next middleware.InitializeHandler, -) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - // If PresignedURL is already set ignore middleware. - if _, ok, err := m.options.Accessor.GetPresignedURL(input.Parameters); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } else if ok { - return next.HandleInitialize(ctx, input) - } - - // If have source region is not set ignore middleware. - srcRegion, ok, err := m.options.Accessor.GetSourceRegion(input.Parameters) - if err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } else if !ok || len(srcRegion) == 0 { - return next.HandleInitialize(ctx, input) - } - - // Create a copy of the original input so the destination region value can - // be added. This ensures that value does not leak into the original - // request parameters. - paramCpy, err := m.options.Accessor.CopyInput(input.Parameters) - if err != nil { - return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err) - } - - // Destination region is the API client's configured region. - dstRegion := awsmiddleware.GetRegion(ctx) - if err = m.options.Accessor.SetDestinationRegion(paramCpy, dstRegion); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } - - presignedReq, err := m.options.Presigner.PresignURL(ctx, srcRegion, paramCpy) - if err != nil { - return out, metadata, fmt.Errorf("unable to create presigned URL, %w", err) - } - - // Update the original input with the presigned URL value. - if err = m.options.Accessor.SetPresignedURL(input.Parameters, presignedReq.URL); err != nil { - return out, metadata, fmt.Errorf("presign middleware failed, %w", err) - } - - return next.HandleInitialize(ctx, input) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md deleted file mode 100644 index 27726a098d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/CHANGELOG.md +++ /dev/null @@ -1,724 +0,0 @@ -# v1.58.4 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.58.3 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.58.2 (2025-09-10) - -* No change notes available for this release. - -# v1.58.1 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.58.0 (2025-09-03) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (New Zealand) Region (ap-southeast-6) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.57.2 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.57.1 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.57.0 (2025-08-26) - -* **Feature**: Remove incorrect endpoint tests - -# v1.56.2 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.56.1 (2025-08-20) - -* **Bug Fix**: Remove unused deserialization code. - -# v1.56.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.55.0 (2025-08-04) - -* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.54.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.53.1 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.53.0 (2025-07-03) - -* **Feature**: Amazon Route 53 now supports the iso-e regions for private DNS Amazon VPCs and cloudwatch healthchecks. - -# v1.52.2 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.52.1 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.52.0 (2025-06-06) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (Taipei) Region (ap-east-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.51.1 (2025-04-10) - -* No change notes available for this release. - -# v1.51.0 (2025-04-03) - -* **Feature**: Added us-gov-east-1 and us-gov-west-1 as valid Latency Based Routing regions for change-resource-record-sets. - -# v1.50.0 (2025-03-18) - -* **Feature**: Amazon Route 53 now supports the iso-f regions for private DNS Amazon VPCs and cloudwatch healthchecks. - -# v1.49.1 (2025-03-04.2) - -* **Bug Fix**: Add assurance test for operation order. - -# v1.49.0 (2025-02-27) - -* **Feature**: Track credential providers via User-Agent Feature ids -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.8 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.7 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.6 (2025-02-04) - -* No change notes available for this release. - -# v1.48.5 (2025-01-31) - -* **Dependency Update**: Switch to code-generated waiter matchers, removing the dependency on go-jmespath. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.4 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.3 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.48.2 (2025-01-17) - -* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. - -# v1.48.1 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.48.0 (2025-01-14) - -* **Feature**: Amazon Route 53 now supports the Mexico (Central) Region (mx-central-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region -* **Bug Fix**: Fix issue where waiters were not failing on unmatched errors as they should. This may have breaking behavioral changes for users in fringe cases. See [this announcement](https://github.com/aws/aws-sdk-go-v2/discussions/2954) for more information. - -# v1.47.1 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.47.0 (2025-01-08) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (Thailand) Region (ap-southeast-7) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region - -# v1.46.4 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.46.3 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.46.2 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.46.1 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.46.0 (2024-10-30) - -* **Feature**: This release adds support for TLSA, SSHFP, SVCB, and HTTPS record types. - -# v1.45.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.45.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.45.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.45.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.44.4 (2024-10-03) - -* No change notes available for this release. - -# v1.44.3 (2024-09-27) - -* No change notes available for this release. - -# v1.44.2 (2024-09-25) - -* No change notes available for this release. - -# v1.44.1 (2024-09-23) - -* No change notes available for this release. - -# v1.44.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.43.3 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.43.2 (2024-09-04) - -* No change notes available for this release. - -# v1.43.1 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.43.0 (2024-08-22) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (Malaysia) Region (ap-southeast-5) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.42.4 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.42.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.42.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.42.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.42.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.41.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.41.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.11 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.10 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.9 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.8 (2024-05-23) - -* No change notes available for this release. - -# v1.40.7 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.6 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.5 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.40.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.40.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.39.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.39.0 (2024-02-16) - -* **Feature**: Add new ClientOptions field to waiter config which allows you to extend the config for operation calls made by waiters. - -# v1.38.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.37.1 (2024-01-30) - -* **Documentation**: Update the SDKs for text changes in the APIs. - -# v1.37.0 (2024-01-10) - -* **Feature**: Route53 now supports geoproximity routing in AWS regions - -# v1.36.1 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.36.0 (2023-12-20) - -* **Feature**: Amazon Route 53 now supports the Canada West (Calgary) Region (ca-west-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.35.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.35.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.35.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.4 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.34.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.0 (2023-11-06) - -* **Feature**: Add partitional endpoints for iso-e and iso-f. - -# v1.33.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.0 (2023-10-24) - -* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162). - -# v1.30.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.0 (2023-10-05) - -* **Feature**: Add hostedzonetype filter to ListHostedZones API. - -# v1.29.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.1 (2023-08-01) - -* No change notes available for this release. - -# v1.29.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Feature**: Amazon Route 53 now supports the Israel (Tel Aviv) Region (il-central-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.6 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.5 (2023-07-26) - -* **Documentation**: Update that corrects the documents for received feedback. - -# v1.28.4 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.3 (2023-06-15) - -* No change notes available for this release. - -# v1.28.2 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2023-05-04) - -* No change notes available for this release. - -# v1.28.0 (2023-04-24) - -* **Feature**: added paginator for listResourceRecordSets -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.7 (2023-04-10) - -* No change notes available for this release. - -# v1.27.6 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.5 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.4 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.3 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.27.2 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.0 (2023-01-24) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (Melbourne) Region (ap-southeast-4) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.26.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.25.2 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.1 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2022-11-21) - -* **Feature**: Amazon Route 53 now supports the Asia Pacific (Hyderabad) Region (ap-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.24.0 (2022-11-15) - -* **Feature**: Amazon Route 53 now supports the Europe (Spain) Region (eu-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.23.0 (2022-11-08) - -* **Feature**: Amazon Route 53 now supports the Europe (Zurich) Region (eu-central-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - -# v1.22.4 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.3 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.2 (2022-09-21) - -* **Bug Fix**: Updated GetChange to sanitize /change/ prefix of the changeId returned from the service. - -# v1.22.1 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.0 (2022-09-14) - -* **Feature**: Amazon Route 53 now supports the Middle East (UAE) Region (me-central-1) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.11 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.10 (2022-09-01) - -* **Documentation**: Documentation updates for Amazon Route 53. - -# v1.21.9 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.8 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.7 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.6 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.5 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.4 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.2 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2022-06-01) - -* **Feature**: Add new APIs to support Route 53 IP Based Routing - -# v1.20.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2022-02-24.2) - -* **Feature**: API client updated - -# v1.18.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. -* **Feature**: API client updated - -# v1.14.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2021-11-12) - -* **Feature**: Waiters now have a `WaitForOutput` method, which can be used to retrieve the output of the successful wait operation. Thank you to [Andrew Haines](https://github.com/haines) for contributing this feature. - -# v1.13.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2021-08-19) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2021-08-12) - -* **Feature**: API client updated - -# v1.8.0 (2021-08-04) - -* **Feature**: Updated to latest API model. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-06-25) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.2 (2021-06-04) - -* **Documentation**: Updated service client to latest API model. - -# v1.6.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Feature**: Updated to latest service API model. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/route53/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go deleted file mode 100644 index 8293333425..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_client.go +++ /dev/null @@ -1,1267 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - route53cust "github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "strings" - "sync/atomic" - "time" -) - -const ServiceID = "Route 53" -const ServiceAPIVersion = "2013-04-01" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/route53") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/route53") -} - -// Client provides the API client to make operations call for Amazon Route 53. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/route53") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveInterceptors(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, func(o *Options) { - for _, opt := range cfg.ServiceOptions { - opt(ServiceID, o) - } - for _, opt := range optFns { - opt(o) - } - }) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func resolveInterceptors(cfg aws.Config, o *Options) { - o.Interceptors = cfg.Interceptors.Copy() -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "route53", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/route53") - }) - if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - -func addCredentialSource(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addSanitizeURLMiddleware(stack *middleware.Stack) error { - return route53cust.AddSanitizeURLMiddleware(stack, route53cust.AddSanitizeURLMiddlewareOptions{SanitizeURLInput: sanitizeURLInput}) -} - -// Check for and split apart Route53 resource IDs, setting only the last piece. -// This allows the output of one operation e.g. foo/1234 to be used as input in -// another operation (e.g. it expects just '1234') -func sanitizeURLInput(input interface{}) error { - switch i := input.(type) { - case *ActivateKeySigningKeyInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *AssociateVPCWithHostedZoneInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *ChangeResourceRecordSetsInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *CreateHostedZoneInput: - if i.DelegationSetId != nil { - idx := strings.LastIndex(*i.DelegationSetId, `/`) - v := (*i.DelegationSetId)[idx+1:] - i.DelegationSetId = &v - } - - case *CreateKeySigningKeyInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *CreateQueryLoggingConfigInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *CreateReusableDelegationSetInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *CreateTrafficPolicyInstanceInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *CreateVPCAssociationAuthorizationInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *DeactivateKeySigningKeyInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *DeleteHostedZoneInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - case *DeleteKeySigningKeyInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *DeleteReusableDelegationSetInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - case *DeleteVPCAssociationAuthorizationInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *DisableHostedZoneDNSSECInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *DisassociateVPCFromHostedZoneInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *EnableHostedZoneDNSSECInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *GetChangeInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - case *GetDNSSECInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *GetHostedZoneInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - case *GetHostedZoneLimitInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *GetReusableDelegationSetInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - case *GetReusableDelegationSetLimitInput: - if i.DelegationSetId != nil { - idx := strings.LastIndex(*i.DelegationSetId, `/`) - v := (*i.DelegationSetId)[idx+1:] - i.DelegationSetId = &v - } - - case *ListHostedZonesInput: - if i.DelegationSetId != nil { - idx := strings.LastIndex(*i.DelegationSetId, `/`) - v := (*i.DelegationSetId)[idx+1:] - i.DelegationSetId = &v - } - - case *ListHostedZonesByNameInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *ListQueryLoggingConfigsInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *ListResourceRecordSetsInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *ListTrafficPolicyInstancesInput: - if i.HostedZoneIdMarker != nil { - idx := strings.LastIndex(*i.HostedZoneIdMarker, `/`) - v := (*i.HostedZoneIdMarker)[idx+1:] - i.HostedZoneIdMarker = &v - } - - case *ListTrafficPolicyInstancesByHostedZoneInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *ListTrafficPolicyInstancesByPolicyInput: - if i.HostedZoneIdMarker != nil { - idx := strings.LastIndex(*i.HostedZoneIdMarker, `/`) - v := (*i.HostedZoneIdMarker)[idx+1:] - i.HostedZoneIdMarker = &v - } - - case *ListVPCAssociationAuthorizationsInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *TestDNSAnswerInput: - if i.HostedZoneId != nil { - idx := strings.LastIndex(*i.HostedZoneId, `/`) - v := (*i.HostedZoneId)[idx+1:] - i.HostedZoneId = &v - } - - case *UpdateHostedZoneCommentInput: - if i.Id != nil { - idx := strings.LastIndex(*i.Id, `/`) - v := (*i.Id)[idx+1:] - i.Id = &v - } - - default: - break - } - return nil -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ - Interceptors: opts.Interceptors.BeforeRetryLoop, - }, "Retry", middleware.Before) -} - -func addInterceptAttempt(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ - BeforeAttempt: opts.Interceptors.BeforeAttempt, - AfterAttempt: opts.Interceptors.AfterAttempt, - }, "Retry", middleware.After) -} - -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go deleted file mode 100644 index d6bc5a35ce..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ActivateKeySigningKey.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC. -// This operation changes the KSK status to ACTIVE . -func (c *Client) ActivateKeySigningKey(ctx context.Context, params *ActivateKeySigningKeyInput, optFns ...func(*Options)) (*ActivateKeySigningKeyOutput, error) { - if params == nil { - params = &ActivateKeySigningKeyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ActivateKeySigningKey", params, optFns, c.addOperationActivateKeySigningKeyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ActivateKeySigningKeyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ActivateKeySigningKeyInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - // A string used to identify a key-signing key (KSK). Name can include numbers, - // letters, and underscores (_). Name must be unique for each key-signing key in - // the same hosted zone. - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -type ActivateKeySigningKeyOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationActivateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpActivateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpActivateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ActivateKeySigningKey"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpActivateKeySigningKeyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opActivateKeySigningKey(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opActivateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ActivateKeySigningKey", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go deleted file mode 100644 index efe6e140ed..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_AssociateVPCWithHostedZone.go +++ /dev/null @@ -1,237 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates an Amazon VPC with a private hosted zone. -// -// To perform the association, the VPC and the private hosted zone must already -// exist. You can't convert a public hosted zone into a private hosted zone. -// -// If you want to associate a VPC that was created by using one Amazon Web -// Services account with a private hosted zone that was created by using a -// different account, the Amazon Web Services account that created the private -// hosted zone must first submit a CreateVPCAssociationAuthorization request. Then -// the account that created the VPC must submit an AssociateVPCWithHostedZone -// request. -// -// When granting access, the hosted zone and the Amazon VPC must belong to the -// same partition. A partition is a group of Amazon Web Services Regions. Each -// Amazon Web Services account is scoped to one partition. -// -// The following are the supported partitions: -// -// - aws - Amazon Web Services Regions -// -// - aws-cn - China Regions -// -// - aws-us-gov - Amazon Web Services GovCloud (US) Region -// -// For more information, see [Access Management] in the Amazon Web Services General Reference. -// -// [Access Management]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -func (c *Client) AssociateVPCWithHostedZone(ctx context.Context, params *AssociateVPCWithHostedZoneInput, optFns ...func(*Options)) (*AssociateVPCWithHostedZoneOutput, error) { - if params == nil { - params = &AssociateVPCWithHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateVPCWithHostedZone", params, optFns, c.addOperationAssociateVPCWithHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateVPCWithHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to associate a VPC -// with a private hosted zone. -type AssociateVPCWithHostedZoneInput struct { - - // The ID of the private hosted zone that you want to associate an Amazon VPC with. - // - // Note that you can't associate a VPC with a hosted zone that doesn't have an - // existing VPC association. - // - // This member is required. - HostedZoneId *string - - // A complex type that contains information about the VPC that you want to - // associate with a private hosted zone. - // - // This member is required. - VPC *types.VPC - - // Optional: A comment about the association request. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the -// AssociateVPCWithHostedZone request. -type AssociateVPCWithHostedZoneOutput struct { - - // A complex type that describes the changes made to your hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateVPCWithHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpAssociateVPCWithHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpAssociateVPCWithHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateVPCWithHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpAssociateVPCWithHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateVPCWithHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateVPCWithHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateVPCWithHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go deleted file mode 100644 index de2072ded2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeCidrCollection.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates, changes, or deletes CIDR blocks within a collection. Contains -// authoritative IP information mapping blocks to one or multiple locations. -// -// A change request can update multiple locations in a collection at a time, which -// is helpful if you want to move one or more CIDR blocks from one location to -// another in one transaction, without downtime. -// -// # Limits -// -// The max number of CIDR blocks included in the request is 1000. As a result, big -// updates require multiple API calls. -// -// PUT and DELETE_IF_EXISTS -// -// Use ChangeCidrCollection to perform the following actions: -// -// - PUT : Create a CIDR block within the specified collection. -// -// - DELETE_IF_EXISTS : Delete an existing CIDR block from the collection. -func (c *Client) ChangeCidrCollection(ctx context.Context, params *ChangeCidrCollectionInput, optFns ...func(*Options)) (*ChangeCidrCollectionOutput, error) { - if params == nil { - params = &ChangeCidrCollectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ChangeCidrCollection", params, optFns, c.addOperationChangeCidrCollectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ChangeCidrCollectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ChangeCidrCollectionInput struct { - - // Information about changes to a CIDR collection. - // - // This member is required. - Changes []types.CidrCollectionChange - - // The UUID of the CIDR collection to update. - // - // This member is required. - Id *string - - // A sequential counter that Amazon Route 53 sets to 1 when you create a - // collection and increments it by 1 each time you update the collection. - // - // We recommend that you use ListCidrCollection to get the current value of - // CollectionVersion for the collection that you want to update, and then include - // that value with the change request. This prevents Route 53 from overwriting an - // intervening update: - // - // - If the value in the request matches the value of CollectionVersion in the - // collection, Route 53 updates the collection. - // - // - If the value of CollectionVersion in the collection is greater than the - // value in the request, the collection was changed after you got the version - // number. Route 53 does not update the collection, and it returns a - // CidrCollectionVersionMismatch error. - CollectionVersion *int64 - - noSmithyDocumentSerde -} - -type ChangeCidrCollectionOutput struct { - - // The ID that is returned by ChangeCidrCollection . You can use it as input to - // GetChange to see if a CIDR collection change has propagated or not. - // - // This member is required. - Id *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationChangeCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpChangeCidrCollection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeCidrCollection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ChangeCidrCollection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpChangeCidrCollectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeCidrCollection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opChangeCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ChangeCidrCollection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go deleted file mode 100644 index 7e0bab87de..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeResourceRecordSets.go +++ /dev/null @@ -1,294 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - route53cust "github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates, changes, or deletes a resource record set, which contains -// authoritative DNS information for a specified domain name or subdomain name. For -// example, you can use ChangeResourceRecordSets to create a resource record set -// that routes traffic for test.example.com to a web server that has an IP address -// of 192.0.2.44. -// -// # Deleting Resource Record Sets -// -// To delete a resource record set, you must specify all the same values that you -// specified when you created it. -// -// # Change Batches and Transactional Changes -// -// The request body must include a document with a ChangeResourceRecordSetsRequest -// element. The request body contains a list of change items, known as a change -// batch. Change batches are considered transactional changes. Route 53 validates -// the changes in the request and then either makes all or none of the changes in -// the change batch request. This ensures that DNS routing isn't adversely affected -// by partial changes to the resource record sets in a hosted zone. -// -// For example, suppose a change batch request contains two changes: it deletes -// the CNAME resource record set for www.example.com and creates an alias resource -// record set for www.example.com. If validation for both records succeeds, Route -// 53 deletes the first resource record set and creates the second resource record -// set in a single operation. If validation for either the DELETE or the CREATE -// action fails, then the request is canceled, and the original CNAME record -// continues to exist. -// -// If you try to delete the same resource record set more than once in a single -// change batch, Route 53 returns an InvalidChangeBatch error. -// -// # Traffic Flow -// -// To create resource record sets for complex routing configurations, use either -// the traffic flow visual editor in the Route 53 console or the API actions for -// traffic policies and traffic policy instances. Save the configuration as a -// traffic policy, then associate the traffic policy with one or more domain names -// (such as example.com) or subdomain names (such as www.example.com), in the same -// hosted zone or in multiple hosted zones. You can roll back the updates if the -// new configuration isn't performing as expected. For more information, see [Using Traffic Flow to Route DNS Traffic]in -// the Amazon Route 53 Developer Guide. -// -// # Create, Delete, and Upsert -// -// Use ChangeResourceRecordsSetsRequest to perform the following actions: -// -// - CREATE : Creates a resource record set that has the specified values. -// -// - DELETE : Deletes an existing resource record set that has the specified -// values. -// -// - UPSERT : If a resource set doesn't exist, Route 53 creates it. If a resource -// set exists Route 53 updates it with the values in the request. -// -// # Syntaxes for Creating, Updating, and Deleting Resource Record Sets -// -// The syntax for a request depends on the type of resource record set that you -// want to create, delete, or update, such as weighted, alias, or failover. The XML -// elements in your request must appear in the order listed in the syntax. -// -// For an example for each type of resource record set, see "Examples." -// -// Don't refer to the syntax in the "Parameter Syntax" section, which includes all -// of the elements for every kind of resource record set that you can create, -// delete, or update by using ChangeResourceRecordSets . -// -// # Change Propagation to Route 53 DNS Servers -// -// When you submit a ChangeResourceRecordSets request, Route 53 propagates your -// changes to all of the Route 53 authoritative DNS servers managing the hosted -// zone. While your changes are propagating, GetChange returns a status of PENDING -// . When propagation is complete, GetChange returns a status of INSYNC . Changes -// generally propagate to all Route 53 name servers managing the hosted zone within -// 60 seconds. For more information, see [GetChange]. -// -// # Limits on ChangeResourceRecordSets Requests -// -// For information about the limits on a ChangeResourceRecordSets request, see [Limits] in -// the Amazon Route 53 Developer Guide. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [GetChange]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html -// [Using Traffic Flow to Route DNS Traffic]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/traffic-flow.html -func (c *Client) ChangeResourceRecordSets(ctx context.Context, params *ChangeResourceRecordSetsInput, optFns ...func(*Options)) (*ChangeResourceRecordSetsOutput, error) { - if params == nil { - params = &ChangeResourceRecordSetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ChangeResourceRecordSets", params, optFns, c.addOperationChangeResourceRecordSetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ChangeResourceRecordSetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains change information for the resource record set. -type ChangeResourceRecordSetsInput struct { - - // A complex type that contains an optional comment and the Changes element. - // - // This member is required. - ChangeBatch *types.ChangeBatch - - // The ID of the hosted zone that contains the resource record sets that you want - // to change. - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -// A complex type containing the response for the request. -type ChangeResourceRecordSetsOutput struct { - - // A complex type that contains information about changes made to your hosted zone. - // - // This element contains an ID that you use when performing a [GetChange] action to get - // detailed information about the change. - // - // [GetChange]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationChangeResourceRecordSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpChangeResourceRecordSets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeResourceRecordSets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ChangeResourceRecordSets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpChangeResourceRecordSetsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeResourceRecordSets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = route53cust.HandleCustomErrorDeserialization(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opChangeResourceRecordSets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ChangeResourceRecordSets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go deleted file mode 100644 index 007b73ead6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ChangeTagsForResource.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds, edits, or deletes tags for a health check or a hosted zone. -// -// For information about using tags for cost allocation, see [Using Cost Allocation Tags] in the Billing and -// Cost Management User Guide. -// -// [Using Cost Allocation Tags]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html -func (c *Client) ChangeTagsForResource(ctx context.Context, params *ChangeTagsForResourceInput, optFns ...func(*Options)) (*ChangeTagsForResourceOutput, error) { - if params == nil { - params = &ChangeTagsForResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ChangeTagsForResource", params, optFns, c.addOperationChangeTagsForResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ChangeTagsForResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the tags that you want to add, -// edit, or delete. -type ChangeTagsForResourceInput struct { - - // The ID of the resource for which you want to add, change, or delete tags. - // - // This member is required. - ResourceId *string - - // The type of the resource. - // - // - The resource type for health checks is healthcheck . - // - // - The resource type for hosted zones is hostedzone . - // - // This member is required. - ResourceType types.TagResourceType - - // A complex type that contains a list of the tags that you want to add to the - // specified health check or hosted zone and/or the tags that you want to edit - // Value for. - // - // You can add a maximum of 10 tags to a health check or a hosted zone. - AddTags []types.Tag - - // A complex type that contains a list of the tags that you want to delete from - // the specified health check or hosted zone. You can specify up to 10 keys. - RemoveTagKeys []string - - noSmithyDocumentSerde -} - -// Empty response for the request. -type ChangeTagsForResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationChangeTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpChangeTagsForResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpChangeTagsForResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ChangeTagsForResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpChangeTagsForResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opChangeTagsForResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opChangeTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ChangeTagsForResource", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go deleted file mode 100644 index cd18dfc964..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateCidrCollection.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a CIDR collection in the current Amazon Web Services account. -func (c *Client) CreateCidrCollection(ctx context.Context, params *CreateCidrCollectionInput, optFns ...func(*Options)) (*CreateCidrCollectionOutput, error) { - if params == nil { - params = &CreateCidrCollectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateCidrCollection", params, optFns, c.addOperationCreateCidrCollectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateCidrCollectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateCidrCollectionInput struct { - - // A client-specific token that allows requests to be securely retried so that the - // intended outcome will only occur once, retries receive a similar response, and - // there are no additional edge cases to handle. - // - // This member is required. - CallerReference *string - - // A unique identifier for the account that can be used to reference the - // collection from other API calls. - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -type CreateCidrCollectionOutput struct { - - // A complex type that contains information about the CIDR collection. - Collection *types.CidrCollection - - // A unique URL that represents the location for the CIDR collection. - Location *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateCidrCollection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateCidrCollection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateCidrCollection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateCidrCollectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateCidrCollection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateCidrCollection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go deleted file mode 100644 index 40b47eef98..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHealthCheck.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new health check. -// -// For information about adding health checks to resource record sets, see [HealthCheckId] in [ChangeResourceRecordSets]. -// -// # ELB Load Balancers -// -// If you're registering EC2 instances with an Elastic Load Balancing (ELB) load -// balancer, do not create Amazon Route 53 health checks for the EC2 instances. -// When you register an EC2 instance with a load balancer, you configure settings -// for an ELB health check, which performs a similar function to a Route 53 health -// check. -// -// # Private Hosted Zones -// -// You can associate health checks with failover resource record sets in a private -// hosted zone. Note the following: -// -// - Route 53 health checkers are outside the VPC. To check the health of an -// endpoint within a VPC by IP address, you must assign a public IP address to the -// instance in the VPC. -// -// - You can configure a health checker to check the health of an external -// resource that the instance relies on, such as a database server. -// -// - You can create a CloudWatch metric, associate an alarm with the metric, and -// then create a health check that is based on the state of the alarm. For example, -// you might create a CloudWatch metric that checks the status of the Amazon EC2 -// StatusCheckFailed metric, add an alarm to the metric, and then create a health -// check that is based on the state of the alarm. For information about creating -// CloudWatch metrics and alarms by using the CloudWatch console, see the [Amazon CloudWatch User Guide]. -// -// [HealthCheckId]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ResourceRecordSet.html#Route53-Type-ResourceRecordSet-HealthCheckId -// [ChangeResourceRecordSets]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html -// [Amazon CloudWatch User Guide]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html -func (c *Client) CreateHealthCheck(ctx context.Context, params *CreateHealthCheckInput, optFns ...func(*Options)) (*CreateHealthCheckOutput, error) { - if params == nil { - params = &CreateHealthCheckInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateHealthCheck", params, optFns, c.addOperationCreateHealthCheckMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateHealthCheckOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains the health check request information. -type CreateHealthCheckInput struct { - - // A unique string that identifies the request and that allows you to retry a - // failed CreateHealthCheck request without the risk of creating two identical - // health checks: - // - // - If you send a CreateHealthCheck request with the same CallerReference and - // settings as a previous request, and if the health check doesn't exist, Amazon - // Route 53 creates the health check. If the health check does exist, Route 53 - // returns the settings for the existing health check. - // - // - If you send a CreateHealthCheck request with the same CallerReference as a - // deleted health check, regardless of the settings, Route 53 returns a - // HealthCheckAlreadyExists error. - // - // - If you send a CreateHealthCheck request with the same CallerReference as an - // existing health check but with different settings, Route 53 returns a - // HealthCheckAlreadyExists error. - // - // - If you send a CreateHealthCheck request with a unique CallerReference but - // settings identical to an existing health check, Route 53 creates the health - // check. - // - // Route 53 does not store the CallerReference for a deleted health check - // indefinitely. The CallerReference for a deleted health check will be deleted - // after a number of days. - // - // This member is required. - CallerReference *string - - // A complex type that contains settings for a new health check. - // - // This member is required. - HealthCheckConfig *types.HealthCheckConfig - - noSmithyDocumentSerde -} - -// A complex type containing the response information for the new health check. -type CreateHealthCheckOutput struct { - - // A complex type that contains identifying information about the health check. - // - // This member is required. - HealthCheck *types.HealthCheck - - // The unique URL representing the new health check. - // - // This member is required. - Location *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateHealthCheck{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateHealthCheck{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateHealthCheck"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateHealthCheckValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHealthCheck(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateHealthCheck", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go deleted file mode 100644 index 66ec7ea190..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateHostedZone.go +++ /dev/null @@ -1,326 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new public or private hosted zone. You create records in a public -// hosted zone to define how you want to route traffic on the internet for a -// domain, such as example.com, and its subdomains (apex.example.com, -// acme.example.com). You create records in a private hosted zone to define how you -// want to route traffic for a domain and its subdomains within one or more Amazon -// Virtual Private Clouds (Amazon VPCs). -// -// You can't convert a public hosted zone to a private hosted zone or vice versa. -// Instead, you must create a new hosted zone with the same name and create new -// resource record sets. -// -// For more information about charges for hosted zones, see [Amazon Route 53 Pricing]. -// -// Note the following: -// -// - You can't create a hosted zone for a top-level domain (TLD) such as .com. -// -// - For public hosted zones, Route 53 automatically creates a default SOA -// record and four NS records for the zone. For more information about SOA and NS -// records, see [NS and SOA Records that Route 53 Creates for a Hosted Zone]in the Amazon Route 53 Developer Guide. -// -// If you want to use the same name servers for multiple public hosted zones, you -// -// can optionally associate a reusable delegation set with the hosted zone. See the -// DelegationSetId element. -// -// - If your domain is registered with a registrar other than Route 53, you must -// update the name servers with your registrar to make Route 53 the DNS service for -// the domain. For more information, see [Migrating DNS Service for an Existing Domain to Amazon Route 53]in the Amazon Route 53 Developer Guide. -// -// When you submit a CreateHostedZone request, the initial status of the hosted -// zone is PENDING . For public hosted zones, this means that the NS and SOA -// records are not yet available on all Route 53 DNS servers. When the NS and SOA -// records are available, the status of the zone changes to INSYNC . -// -// The CreateHostedZone request requires the caller to have an ec2:DescribeVpcs -// permission. -// -// When creating private hosted zones, the Amazon VPC must belong to the same -// partition where the hosted zone is created. A partition is a group of Amazon Web -// Services Regions. Each Amazon Web Services account is scoped to one partition. -// -// The following are the supported partitions: -// -// - aws - Amazon Web Services Regions -// -// - aws-cn - China Regions -// -// - aws-us-gov - Amazon Web Services GovCloud (US) Region -// -// For more information, see [Access Management] in the Amazon Web Services General Reference. -// -// [Access Management]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -// [NS and SOA Records that Route 53 Creates for a Hosted Zone]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/SOA-NSrecords.html -// [Amazon Route 53 Pricing]: http://aws.amazon.com/route53/pricing/ -// -// [Migrating DNS Service for an Existing Domain to Amazon Route 53]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/MigratingDNS.html -func (c *Client) CreateHostedZone(ctx context.Context, params *CreateHostedZoneInput, optFns ...func(*Options)) (*CreateHostedZoneOutput, error) { - if params == nil { - params = &CreateHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateHostedZone", params, optFns, c.addOperationCreateHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to create a public -// or private hosted zone. -type CreateHostedZoneInput struct { - - // A unique string that identifies the request and that allows failed - // CreateHostedZone requests to be retried without the risk of executing the - // operation twice. You must use a unique CallerReference string every time you - // submit a CreateHostedZone request. CallerReference can be any unique string, - // for example, a date/time stamp. - // - // This member is required. - CallerReference *string - - // The name of the domain. Specify a fully qualified domain name, for example, - // www.example.com. The trailing dot is optional; Amazon Route 53 assumes that the - // domain name is fully qualified. This means that Route 53 treats www.example.com - // (without a trailing dot) and www.example.com. (with a trailing dot) as - // identical. - // - // If you're creating a public hosted zone, this is the name you have registered - // with your DNS registrar. If your domain name is registered with a registrar - // other than Route 53, change the name servers for your domain to the set of - // NameServers that CreateHostedZone returns in DelegationSet . - // - // This member is required. - Name *string - - // If you want to associate a reusable delegation set with this hosted zone, the - // ID that Amazon Route 53 assigned to the reusable delegation set when you created - // it. For more information about reusable delegation sets, see [CreateReusableDelegationSet]. - // - // If you are using a reusable delegation set to create a public hosted zone for a - // subdomain, make sure that the parent hosted zone doesn't use one or more of the - // same name servers. If you have overlapping nameservers, the operation will cause - // a ConflictingDomainsExist error. - // - // [CreateReusableDelegationSet]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html - DelegationSetId *string - - // (Optional) A complex type that contains the following optional values: - // - // - For public and private hosted zones, an optional comment - // - // - For private hosted zones, an optional PrivateZone element - // - // If you don't specify a comment or the PrivateZone element, omit HostedZoneConfig - // and the other elements. - HostedZoneConfig *types.HostedZoneConfig - - // (Private hosted zones only) A complex type that contains information about the - // Amazon VPC that you're associating with this hosted zone. - // - // You can specify only one Amazon VPC when you create a private hosted zone. If - // you are associating a VPC with a hosted zone with this request, the paramaters - // VPCId and VPCRegion are also required. - // - // To associate additional Amazon VPCs with the hosted zone, use [AssociateVPCWithHostedZone] after you create - // a hosted zone. - // - // [AssociateVPCWithHostedZone]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_AssociateVPCWithHostedZone.html - VPC *types.VPC - - noSmithyDocumentSerde -} - -// A complex type containing the response information for the hosted zone. -type CreateHostedZoneOutput struct { - - // A complex type that contains information about the CreateHostedZone request. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // A complex type that describes the name servers for this hosted zone. - // - // This member is required. - DelegationSet *types.DelegationSet - - // A complex type that contains general information about the hosted zone. - // - // This member is required. - HostedZone *types.HostedZone - - // The unique URL representing the new hosted zone. - // - // This member is required. - Location *string - - // A complex type that contains information about an Amazon VPC that you - // associated with this hosted zone. - VPC *types.VPC - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go deleted file mode 100644 index 463d9ab815..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateKeySigningKey.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new key-signing key (KSK) associated with a hosted zone. You can only -// have two KSKs per hosted zone. -func (c *Client) CreateKeySigningKey(ctx context.Context, params *CreateKeySigningKeyInput, optFns ...func(*Options)) (*CreateKeySigningKeyOutput, error) { - if params == nil { - params = &CreateKeySigningKeyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateKeySigningKey", params, optFns, c.addOperationCreateKeySigningKeyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateKeySigningKeyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateKeySigningKeyInput struct { - - // A unique string that identifies the request. - // - // This member is required. - CallerReference *string - - // The unique string (ID) used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - // The Amazon resource name (ARN) for a customer managed key in Key Management - // Service (KMS). The KeyManagementServiceArn must be unique for each key-signing - // key (KSK) in a single hosted zone. To see an example of KeyManagementServiceArn - // that grants the correct permissions for DNSSEC, scroll down to Example. - // - // You must configure the customer managed customer managed key as follows: - // - // Status Enabled - // - // Key spec ECC_NIST_P256 - // - // Key usage Sign and verify - // - // Key policy The key policy must give permission for the following actions: - // - // - DescribeKey - // - // - GetPublicKey - // - // - Sign - // - // The key policy must also include the Amazon Route 53 service in the principal - // for your account. Specify the following: - // - // - "Service": "dnssec-route53.amazonaws.com" - // - // For more information about working with a customer managed key in KMS, see [Key Management Service concepts]. - // - // [Key Management Service concepts]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html - // - // This member is required. - KeyManagementServiceArn *string - - // A string used to identify a key-signing key (KSK). Name can include numbers, - // letters, and underscores (_). Name must be unique for each key-signing key in - // the same hosted zone. - // - // This member is required. - Name *string - - // A string specifying the initial status of the key-signing key (KSK). You can - // set the value to ACTIVE or INACTIVE . - // - // This member is required. - Status *string - - noSmithyDocumentSerde -} - -type CreateKeySigningKeyOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // The key-signing key (KSK) that the request creates. - // - // This member is required. - KeySigningKey *types.KeySigningKey - - // The unique URL representing the new key-signing key (KSK). - // - // This member is required. - Location *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateKeySigningKey"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateKeySigningKeyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateKeySigningKey(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateKeySigningKey", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go deleted file mode 100644 index 2fbe01765a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateQueryLoggingConfig.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a configuration for DNS query logging. After you create a query logging -// configuration, Amazon Route 53 begins to publish log data to an Amazon -// CloudWatch Logs log group. -// -// DNS query logs contain information about the queries that Route 53 receives for -// a specified public hosted zone, such as the following: -// -// - Route 53 edge location that responded to the DNS query -// -// - Domain or subdomain that was requested -// -// - DNS record type, such as A or AAAA -// -// - DNS response code, such as NoError or ServFail -// -// Log Group and Resource Policy Before you create a query logging configuration, -// perform the following operations. -// -// If you create a query logging configuration using the Route 53 console, Route -// 53 performs these operations automatically. -// -// - Create a CloudWatch Logs log group, and make note of the ARN, which you -// specify when you create a query logging configuration. Note the following: -// -// - You must create the log group in the us-east-1 region. -// -// - You must use the same Amazon Web Services account to create the log group -// and the hosted zone that you want to configure query logging for. -// -// - When you create log groups for query logging, we recommend that you use a -// consistent prefix, for example: -// -// /aws/route53/hosted zone name -// -// In the next step, you'll create a resource policy, which controls access to one -// -// or more log groups and the associated Amazon Web Services resources, such as -// Route 53 hosted zones. There's a limit on the number of resource policies that -// you can create, so we recommend that you use a consistent prefix so you can use -// the same resource policy for all the log groups that you create for query -// logging. -// -// - Create a CloudWatch Logs resource policy, and give it the permissions that -// Route 53 needs to create log streams and to send query logs to log streams. You -// must create the CloudWatch Logs resource policy in the us-east-1 region. For the -// value of Resource , specify the ARN for the log group that you created in the -// previous step. To use the same resource policy for all the CloudWatch Logs log -// groups that you created for query logging configurations, replace the hosted -// zone name with * , for example: -// -// arn:aws:logs:us-east-1:123412341234:log-group:/aws/route53/* -// -// To avoid the confused deputy problem, a security issue where an entity without -// -// a permission for an action can coerce a more-privileged entity to perform it, -// you can optionally limit the permissions that a service has to a resource in a -// resource-based policy by supplying the following values: -// -// - For aws:SourceArn , supply the hosted zone ARN used in creating the query -// logging configuration. For example, aws:SourceArn: -// arn:aws:route53:::hostedzone/hosted zone ID . -// -// - For aws:SourceAccount , supply the account ID for the account that creates -// the query logging configuration. For example, aws:SourceAccount:111111111111 . -// -// For more information, see [The confused deputy problem]in the Amazon Web Services IAM User Guide. -// -// You can't use the CloudWatch console to create or edit a resource policy. You -// -// must use the CloudWatch API, one of the Amazon Web Services SDKs, or the CLI. -// -// Log Streams and Edge Locations When Route 53 finishes creating the -// configuration for DNS query logging, it does the following: -// -// - Creates a log stream for an edge location the first time that the edge -// location responds to DNS queries for the specified hosted zone. That log stream -// is used to log all queries that Route 53 responds to for that edge location. -// -// - Begins to send query logs to the applicable log stream. -// -// The name of each log stream is in the following format: -// -// hosted zone ID/edge location code -// -// The edge location code is a three-letter code and an arbitrarily assigned -// number, for example, DFW3. The three-letter code typically corresponds with the -// International Air Transport Association airport code for an airport near the -// edge location. (These abbreviations might change in the future.) For a list of -// edge locations, see "The Route 53 Global Network" on the [Route 53 Product Details]page. -// -// Queries That Are Logged Query logs contain only the queries that DNS resolvers -// forward to Route 53. If a DNS resolver has already cached the response to a -// query (such as the IP address for a load balancer for example.com), the resolver -// will continue to return the cached response. It doesn't forward another query to -// Route 53 until the TTL for the corresponding resource record set expires. -// Depending on how many DNS queries are submitted for a resource record set, and -// depending on the TTL for that resource record set, query logs might contain -// information about only one query out of every several thousand queries that are -// submitted to DNS. For more information about how DNS works, see [Routing Internet Traffic to Your Website or Web Application]in the Amazon -// Route 53 Developer Guide. -// -// Log File Format For a list of the values in each query log and the format of -// each value, see [Logging DNS Queries]in the Amazon Route 53 Developer Guide. -// -// Pricing For information about charges for query logs, see [Amazon CloudWatch Pricing]. -// -// How to Stop Logging If you want Route 53 to stop sending query logs to -// CloudWatch Logs, delete the query logging configuration. For more information, -// see [DeleteQueryLoggingConfig]. -// -// [The confused deputy problem]: https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html -// [DeleteQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteQueryLoggingConfig.html -// [Routing Internet Traffic to Your Website or Web Application]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html -// [Route 53 Product Details]: http://aws.amazon.com/route53/details/ -// [Amazon CloudWatch Pricing]: http://aws.amazon.com/cloudwatch/pricing/ -// [Logging DNS Queries]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html -func (c *Client) CreateQueryLoggingConfig(ctx context.Context, params *CreateQueryLoggingConfigInput, optFns ...func(*Options)) (*CreateQueryLoggingConfigOutput, error) { - if params == nil { - params = &CreateQueryLoggingConfigInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateQueryLoggingConfig", params, optFns, c.addOperationCreateQueryLoggingConfigMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateQueryLoggingConfigOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateQueryLoggingConfigInput struct { - - // The Amazon Resource Name (ARN) for the log group that you want to Amazon Route - // 53 to send query logs to. This is the format of the ARN: - // - // arn:aws:logs:region:account-id:log-group:log_group_name - // - // To get the ARN for a log group, you can use the CloudWatch console, the [DescribeLogGroups] API - // action, the [describe-log-groups]command, or the applicable command in one of the Amazon Web - // Services SDKs. - // - // [describe-log-groups]: https://docs.aws.amazon.com/cli/latest/reference/logs/describe-log-groups.html - // [DescribeLogGroups]: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogGroups.html - // - // This member is required. - CloudWatchLogsLogGroupArn *string - - // The ID of the hosted zone that you want to log queries for. You can log queries - // only for public hosted zones. - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -type CreateQueryLoggingConfigOutput struct { - - // The unique URL representing the new query logging configuration. - // - // This member is required. - Location *string - - // A complex type that contains the ID for a query logging configuration, the ID - // of the hosted zone that you want to log queries for, and the ARN for the log - // group that you want Amazon Route 53 to send query logs to. - // - // This member is required. - QueryLoggingConfig *types.QueryLoggingConfig - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateQueryLoggingConfig"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateQueryLoggingConfigValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateQueryLoggingConfig(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateQueryLoggingConfig", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go deleted file mode 100644 index a5071125db..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateReusableDelegationSet.go +++ /dev/null @@ -1,254 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a delegation set (a group of four name servers) that can be reused by -// multiple hosted zones that were created by the same Amazon Web Services account. -// -// You can also create a reusable delegation set that uses the four name servers -// that are associated with an existing hosted zone. Specify the hosted zone ID in -// the CreateReusableDelegationSet request. -// -// You can't associate a reusable delegation set with a private hosted zone. -// -// For information about using a reusable delegation set to configure white label -// name servers, see [Configuring White Label Name Servers]. -// -// The process for migrating existing hosted zones to use a reusable delegation -// set is comparable to the process for configuring white label name servers. You -// need to perform the following steps: -// -// - Create a reusable delegation set. -// -// - Recreate hosted zones, and reduce the TTL to 60 seconds or less. -// -// - Recreate resource record sets in the new hosted zones. -// -// - Change the registrar's name servers to use the name servers for the new -// hosted zones. -// -// - Monitor traffic for the website or application. -// -// - Change TTLs back to their original values. -// -// If you want to migrate existing hosted zones to use a reusable delegation set, -// the existing hosted zones can't use any of the name servers that are assigned to -// the reusable delegation set. If one or more hosted zones do use one or more name -// servers that are assigned to the reusable delegation set, you can do one of the -// following: -// -// - For small numbers of hosted zones—up to a few hundred—it's relatively easy -// to create reusable delegation sets until you get one that has four name servers -// that don't overlap with any of the name servers in your hosted zones. -// -// - For larger numbers of hosted zones, the easiest solution is to use more -// than one reusable delegation set. -// -// - For larger numbers of hosted zones, you can also migrate hosted zones that -// have overlapping name servers to hosted zones that don't have overlapping name -// servers, then migrate the hosted zones again to use the reusable delegation set. -// -// [Configuring White Label Name Servers]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html -func (c *Client) CreateReusableDelegationSet(ctx context.Context, params *CreateReusableDelegationSetInput, optFns ...func(*Options)) (*CreateReusableDelegationSetOutput, error) { - if params == nil { - params = &CreateReusableDelegationSetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateReusableDelegationSet", params, optFns, c.addOperationCreateReusableDelegationSetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateReusableDelegationSetOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateReusableDelegationSetInput struct { - - // A unique string that identifies the request, and that allows you to retry - // failed CreateReusableDelegationSet requests without the risk of executing the - // operation twice. You must use a unique CallerReference string every time you - // submit a CreateReusableDelegationSet request. CallerReference can be any unique - // string, for example a date/time stamp. - // - // This member is required. - CallerReference *string - - // If you want to mark the delegation set for an existing hosted zone as reusable, - // the ID for that hosted zone. - HostedZoneId *string - - noSmithyDocumentSerde -} - -type CreateReusableDelegationSetOutput struct { - - // A complex type that contains name server information. - // - // This member is required. - DelegationSet *types.DelegationSet - - // The unique URL representing the new reusable delegation set. - // - // This member is required. - Location *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateReusableDelegationSet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateReusableDelegationSetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReusableDelegationSet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateReusableDelegationSet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go deleted file mode 100644 index 223c0c4866..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicy.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a traffic policy, which you use to create multiple DNS resource record -// sets for one domain name (such as example.com) or one subdomain name (such as -// www.example.com). -func (c *Client) CreateTrafficPolicy(ctx context.Context, params *CreateTrafficPolicyInput, optFns ...func(*Options)) (*CreateTrafficPolicyOutput, error) { - if params == nil { - params = &CreateTrafficPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicy", params, optFns, c.addOperationCreateTrafficPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the traffic policy that you want -// to create. -type CreateTrafficPolicyInput struct { - - // The definition of this traffic policy in JSON format. For more information, see [Traffic Policy Document Format] - // . - // - // [Traffic Policy Document Format]: https://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html - // - // This member is required. - Document *string - - // The name of the traffic policy. - // - // This member is required. - Name *string - - // (Optional) Any comments that you want to include about the traffic policy. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the -// CreateTrafficPolicy request. -type CreateTrafficPolicyOutput struct { - - // A unique URL that represents a new traffic policy. - // - // This member is required. - Location *string - - // A complex type that contains settings for the new traffic policy. - // - // This member is required. - TrafficPolicy *types.TrafficPolicy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateTrafficPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go deleted file mode 100644 index dda062fb97..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyInstance.go +++ /dev/null @@ -1,241 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates resource record sets in a specified hosted zone based on the settings -// in a specified traffic policy version. In addition, CreateTrafficPolicyInstance -// associates the resource record sets with a specified domain name (such as -// example.com) or subdomain name (such as www.example.com). Amazon Route 53 -// responds to DNS queries for the domain or subdomain name by using the resource -// record sets that CreateTrafficPolicyInstance created. -// -// After you submit an CreateTrafficPolicyInstance request, there's a brief delay -// while Amazon Route 53 creates the resource record sets that are specified in the -// traffic policy definition. Use GetTrafficPolicyInstance with the id of new -// traffic policy instance to confirm that the CreateTrafficPolicyInstance request -// completed successfully. For more information, see the State response element. -func (c *Client) CreateTrafficPolicyInstance(ctx context.Context, params *CreateTrafficPolicyInstanceInput, optFns ...func(*Options)) (*CreateTrafficPolicyInstanceOutput, error) { - if params == nil { - params = &CreateTrafficPolicyInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicyInstance", params, optFns, c.addOperationCreateTrafficPolicyInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficPolicyInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the resource record sets that -// you want to create based on a specified traffic policy. -type CreateTrafficPolicyInstanceInput struct { - - // The ID of the hosted zone that you want Amazon Route 53 to create resource - // record sets in by using the configuration in a traffic policy. - // - // This member is required. - HostedZoneId *string - - // The domain name (such as example.com) or subdomain name (such as - // www.example.com) for which Amazon Route 53 responds to DNS queries by using the - // resource record sets that Route 53 creates for this traffic policy instance. - // - // This member is required. - Name *string - - // (Optional) The TTL that you want Amazon Route 53 to assign to all of the - // resource record sets that it creates in the specified hosted zone. - // - // This member is required. - TTL *int64 - - // The ID of the traffic policy that you want to use to create resource record - // sets in the specified hosted zone. - // - // This member is required. - TrafficPolicyId *string - - // The version of the traffic policy that you want to use to create resource - // record sets in the specified hosted zone. - // - // This member is required. - TrafficPolicyVersion *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the -// CreateTrafficPolicyInstance request. -type CreateTrafficPolicyInstanceOutput struct { - - // A unique URL that represents a new traffic policy instance. - // - // This member is required. - Location *string - - // A complex type that contains settings for the new traffic policy instance. - // - // This member is required. - TrafficPolicyInstance *types.TrafficPolicyInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficPolicyInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicyInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficPolicyInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go deleted file mode 100644 index 7135a5c579..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateTrafficPolicyVersion.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new version of an existing traffic policy. When you create a new -// version of a traffic policy, you specify the ID of the traffic policy that you -// want to update and a JSON-formatted document that describes the new version. You -// use traffic policies to create multiple DNS resource record sets for one domain -// name (such as example.com) or one subdomain name (such as www.example.com). You -// can create a maximum of 1000 versions of a traffic policy. If you reach the -// limit and need to create another version, you'll need to start a new traffic -// policy. -func (c *Client) CreateTrafficPolicyVersion(ctx context.Context, params *CreateTrafficPolicyVersionInput, optFns ...func(*Options)) (*CreateTrafficPolicyVersionOutput, error) { - if params == nil { - params = &CreateTrafficPolicyVersionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTrafficPolicyVersion", params, optFns, c.addOperationCreateTrafficPolicyVersionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTrafficPolicyVersionOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the traffic policy that you want -// to create a new version for. -type CreateTrafficPolicyVersionInput struct { - - // The definition of this version of the traffic policy, in JSON format. You - // specified the JSON in the CreateTrafficPolicyVersion request. For more - // information about the JSON format, see [CreateTrafficPolicy]. - // - // [CreateTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html - // - // This member is required. - Document *string - - // The ID of the traffic policy for which you want to create a new version. - // - // This member is required. - Id *string - - // The comment that you specified in the CreateTrafficPolicyVersion request, if - // any. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the -// CreateTrafficPolicyVersion request. -type CreateTrafficPolicyVersionOutput struct { - - // A unique URL that represents a new traffic policy version. - // - // This member is required. - Location *string - - // A complex type that contains settings for the new version of the traffic policy. - // - // This member is required. - TrafficPolicy *types.TrafficPolicy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTrafficPolicyVersionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateTrafficPolicyVersion{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateTrafficPolicyVersion{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTrafficPolicyVersion"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateTrafficPolicyVersionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTrafficPolicyVersion(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTrafficPolicyVersion", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go deleted file mode 100644 index 8be8c888f5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_CreateVPCAssociationAuthorization.go +++ /dev/null @@ -1,221 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Authorizes the Amazon Web Services account that created a specified VPC to -// submit an AssociateVPCWithHostedZone request to associate the VPC with a -// specified hosted zone that was created by a different account. To submit a -// CreateVPCAssociationAuthorization request, you must use the account that created -// the hosted zone. After you authorize the association, use the account that -// created the VPC to submit an AssociateVPCWithHostedZone request. -// -// If you want to associate multiple VPCs that you created by using one account -// with a hosted zone that you created by using a different account, you must -// submit one authorization request for each VPC. -func (c *Client) CreateVPCAssociationAuthorization(ctx context.Context, params *CreateVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*CreateVPCAssociationAuthorizationOutput, error) { - if params == nil { - params = &CreateVPCAssociationAuthorizationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVPCAssociationAuthorization", params, optFns, c.addOperationCreateVPCAssociationAuthorizationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVPCAssociationAuthorizationOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to authorize -// associating a VPC with your private hosted zone. Authorization is only required -// when a private hosted zone and a VPC were created by using different accounts. -type CreateVPCAssociationAuthorizationInput struct { - - // The ID of the private hosted zone that you want to authorize associating a VPC - // with. - // - // This member is required. - HostedZoneId *string - - // A complex type that contains the VPC ID and region for the VPC that you want to - // authorize associating with your hosted zone. - // - // This member is required. - VPC *types.VPC - - noSmithyDocumentSerde -} - -// A complex type that contains the response information from a -// CreateVPCAssociationAuthorization request. -type CreateVPCAssociationAuthorizationOutput struct { - - // The ID of the hosted zone that you authorized associating a VPC with. - // - // This member is required. - HostedZoneId *string - - // The VPC that you authorized associating with a hosted zone. - // - // This member is required. - VPC *types.VPC - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpCreateVPCAssociationAuthorization{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpCreateVPCAssociationAuthorization{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVPCAssociationAuthorization"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVPCAssociationAuthorization", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go deleted file mode 100644 index c83ff92053..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeactivateKeySigningKey.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deactivates a key-signing key (KSK) so that it will not be used for signing by -// DNSSEC. This operation changes the KSK status to INACTIVE . -func (c *Client) DeactivateKeySigningKey(ctx context.Context, params *DeactivateKeySigningKeyInput, optFns ...func(*Options)) (*DeactivateKeySigningKeyOutput, error) { - if params == nil { - params = &DeactivateKeySigningKeyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeactivateKeySigningKey", params, optFns, c.addOperationDeactivateKeySigningKeyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeactivateKeySigningKeyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeactivateKeySigningKeyInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - // A string used to identify a key-signing key (KSK). - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -type DeactivateKeySigningKeyOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeactivateKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeactivateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeactivateKeySigningKey{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeactivateKeySigningKey"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeactivateKeySigningKeyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeactivateKeySigningKey(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeactivateKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeactivateKeySigningKey", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go deleted file mode 100644 index c8c325b130..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteCidrCollection.go +++ /dev/null @@ -1,186 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a CIDR collection in the current Amazon Web Services account. The -// collection must be empty before it can be deleted. -func (c *Client) DeleteCidrCollection(ctx context.Context, params *DeleteCidrCollectionInput, optFns ...func(*Options)) (*DeleteCidrCollectionOutput, error) { - if params == nil { - params = &DeleteCidrCollectionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteCidrCollection", params, optFns, c.addOperationDeleteCidrCollectionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteCidrCollectionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteCidrCollectionInput struct { - - // The UUID of the collection to delete. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -type DeleteCidrCollectionOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteCidrCollectionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteCidrCollection{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteCidrCollection{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteCidrCollection"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteCidrCollectionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteCidrCollection(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteCidrCollection(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteCidrCollection", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go deleted file mode 100644 index 2f88202aa7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHealthCheck.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a health check. -// -// Amazon Route 53 does not prevent you from deleting a health check even if the -// health check is associated with one or more resource record sets. If you delete -// a health check and you don't update the associated resource record sets, the -// future status of the health check can't be predicted and may change. This will -// affect the routing of DNS queries for your DNS failover configuration. For more -// information, see [Replacing and Deleting Health Checks]in the Amazon Route 53 Developer Guide. -// -// If you're using Cloud Map and you configured Cloud Map to create a Route 53 -// health check when you register an instance, you can't use the Route 53 -// DeleteHealthCheck command to delete the health check. The health check is -// deleted automatically when you deregister the instance; there can be a delay of -// several hours before the health check is deleted from Route 53. -// -// [Replacing and Deleting Health Checks]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html#health-checks-deleting.html -func (c *Client) DeleteHealthCheck(ctx context.Context, params *DeleteHealthCheckInput, optFns ...func(*Options)) (*DeleteHealthCheckOutput, error) { - if params == nil { - params = &DeleteHealthCheckInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteHealthCheck", params, optFns, c.addOperationDeleteHealthCheckMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteHealthCheckOutput) - out.ResultMetadata = metadata - return out, nil -} - -// This action deletes a health check. -type DeleteHealthCheckInput struct { - - // The ID of the health check that you want to delete. - // - // This member is required. - HealthCheckId *string - - noSmithyDocumentSerde -} - -// An empty element. -type DeleteHealthCheckOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHealthCheck{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHealthCheck{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteHealthCheck"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteHealthCheckValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHealthCheck(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteHealthCheck", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go deleted file mode 100644 index 1e54eeb0ca..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteHostedZone.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a hosted zone. -// -// If the hosted zone was created by another service, such as Cloud Map, see [Deleting Public Hosted Zones That Were Created by Another Service] in -// the Amazon Route 53 Developer Guide for information about how to delete it. (The -// process is the same for public and private hosted zones that were created by -// another service.) -// -// If you want to keep your domain registration but you want to stop routing -// internet traffic to your website or web application, we recommend that you -// delete resource record sets in the hosted zone instead of deleting the hosted -// zone. -// -// If you delete a hosted zone, you can't undelete it. You must create a new -// hosted zone and update the name servers for your domain registration, which can -// require up to 48 hours to take effect. (If you delegated responsibility for a -// subdomain to a hosted zone and you delete the child hosted zone, you must update -// the name servers in the parent hosted zone.) In addition, if you delete a hosted -// zone, someone could hijack the domain and route traffic to their own resources -// using your domain name. -// -// If you want to avoid the monthly charge for the hosted zone, you can transfer -// DNS service for the domain to a free DNS service. When you transfer DNS service, -// you have to update the name servers for the domain registration. If the domain -// is registered with Route 53, see [UpdateDomainNameservers]for information about how to replace Route 53 -// name servers with name servers for the new DNS service. If the domain is -// registered with another registrar, use the method provided by the registrar to -// update name servers for the domain registration. For more information, perform -// an internet search on "free DNS service." -// -// You can delete a hosted zone only if it contains only the default SOA record -// and NS resource record sets. If the hosted zone contains other resource record -// sets, you must delete them before you can delete the hosted zone. If you try to -// delete a hosted zone that contains other resource record sets, the request -// fails, and Route 53 returns a HostedZoneNotEmpty error. For information about -// deleting records from your hosted zone, see [ChangeResourceRecordSets]. -// -// To verify that the hosted zone has been deleted, do one of the following: -// -// - Use the GetHostedZone action to request information about the hosted zone. -// -// - Use the ListHostedZones action to get a list of the hosted zones associated -// with the current Amazon Web Services account. -// -// [ChangeResourceRecordSets]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html -// [Deleting Public Hosted Zones That Were Created by Another Service]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DeleteHostedZone.html#delete-public-hosted-zone-created-by-another-service -// [UpdateDomainNameservers]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_domains_UpdateDomainNameservers.html -func (c *Client) DeleteHostedZone(ctx context.Context, params *DeleteHostedZoneInput, optFns ...func(*Options)) (*DeleteHostedZoneOutput, error) { - if params == nil { - params = &DeleteHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteHostedZone", params, optFns, c.addOperationDeleteHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to delete a hosted zone. -type DeleteHostedZoneInput struct { - - // The ID of the hosted zone you want to delete. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a DeleteHostedZone request. -type DeleteHostedZoneOutput struct { - - // A complex type that contains the ID, the status, and the date and time of a - // request to delete a hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go deleted file mode 100644 index 9be291177c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteKeySigningKey.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a key-signing key (KSK). Before you can delete a KSK, you must -// deactivate it. The KSK must be deactivated before you can delete it regardless -// of whether the hosted zone is enabled for DNSSEC signing. -// -// You can use [DeactivateKeySigningKey] to deactivate the key before you delete it. -// -// Use [GetDNSSEC] to verify that the KSK is in an INACTIVE status. -// -// [DeactivateKeySigningKey]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeactivateKeySigningKey.html -// [GetDNSSEC]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetDNSSEC.html -func (c *Client) DeleteKeySigningKey(ctx context.Context, params *DeleteKeySigningKeyInput, optFns ...func(*Options)) (*DeleteKeySigningKeyOutput, error) { - if params == nil { - params = &DeleteKeySigningKeyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteKeySigningKey", params, optFns, c.addOperationDeleteKeySigningKeyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteKeySigningKeyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteKeySigningKeyInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - // A string used to identify a key-signing key (KSK). - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -type DeleteKeySigningKeyOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteKeySigningKeyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteKeySigningKey{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteKeySigningKey{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteKeySigningKey"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteKeySigningKeyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteKeySigningKey(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteKeySigningKey(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteKeySigningKey", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go deleted file mode 100644 index f5c7f5f735..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteQueryLoggingConfig.go +++ /dev/null @@ -1,191 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a configuration for DNS query logging. If you delete a configuration, -// Amazon Route 53 stops sending query logs to CloudWatch Logs. Route 53 doesn't -// delete any logs that are already in CloudWatch Logs. -// -// For more information about DNS query logs, see [CreateQueryLoggingConfig]. -// -// [CreateQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html -func (c *Client) DeleteQueryLoggingConfig(ctx context.Context, params *DeleteQueryLoggingConfigInput, optFns ...func(*Options)) (*DeleteQueryLoggingConfigOutput, error) { - if params == nil { - params = &DeleteQueryLoggingConfigInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteQueryLoggingConfig", params, optFns, c.addOperationDeleteQueryLoggingConfigMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteQueryLoggingConfigOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteQueryLoggingConfigInput struct { - - // The ID of the configuration that you want to delete. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -type DeleteQueryLoggingConfigOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteQueryLoggingConfig"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteQueryLoggingConfigValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteQueryLoggingConfig", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go deleted file mode 100644 index 3a3b7248f2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteReusableDelegationSet.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a reusable delegation set. -// -// You can delete a reusable delegation set only if it isn't associated with any -// hosted zones. -// -// To verify that the reusable delegation set is not associated with any hosted -// zones, submit a [GetReusableDelegationSet]request and specify the ID of the reusable delegation set that -// you want to delete. -// -// [GetReusableDelegationSet]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSet.html -func (c *Client) DeleteReusableDelegationSet(ctx context.Context, params *DeleteReusableDelegationSetInput, optFns ...func(*Options)) (*DeleteReusableDelegationSetOutput, error) { - if params == nil { - params = &DeleteReusableDelegationSetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteReusableDelegationSet", params, optFns, c.addOperationDeleteReusableDelegationSetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteReusableDelegationSetOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to delete a reusable delegation set. -type DeleteReusableDelegationSetInput struct { - - // The ID of the reusable delegation set that you want to delete. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// An empty element. -type DeleteReusableDelegationSetOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteReusableDelegationSet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteReusableDelegationSetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReusableDelegationSet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteReusableDelegationSet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go deleted file mode 100644 index 1879c292ad..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicy.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a traffic policy. -// -// When you delete a traffic policy, Route 53 sets a flag on the policy to -// indicate that it has been deleted. However, Route 53 never fully deletes the -// traffic policy. Note the following: -// -// - Deleted traffic policies aren't listed if you run [ListTrafficPolicies]. -// -// - There's no way to get a list of deleted policies. -// -// - If you retain the ID of the policy, you can get information about the -// policy, including the traffic policy document, by running [GetTrafficPolicy]. -// -// [ListTrafficPolicies]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListTrafficPolicies.html -// [GetTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html -func (c *Client) DeleteTrafficPolicy(ctx context.Context, params *DeleteTrafficPolicyInput, optFns ...func(*Options)) (*DeleteTrafficPolicyOutput, error) { - if params == nil { - params = &DeleteTrafficPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicy", params, optFns, c.addOperationDeleteTrafficPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to delete a specified traffic policy version. -type DeleteTrafficPolicyInput struct { - - // The ID of the traffic policy that you want to delete. - // - // This member is required. - Id *string - - // The version number of the traffic policy that you want to delete. - // - // This member is required. - Version *int32 - - noSmithyDocumentSerde -} - -// An empty element. -type DeleteTrafficPolicyOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteTrafficPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go deleted file mode 100644 index 6c186bc7a5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteTrafficPolicyInstance.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a traffic policy instance and all of the resource record sets that -// Amazon Route 53 created when you created the instance. -// -// In the Route 53 console, traffic policy instances are known as policy records. -func (c *Client) DeleteTrafficPolicyInstance(ctx context.Context, params *DeleteTrafficPolicyInstanceInput, optFns ...func(*Options)) (*DeleteTrafficPolicyInstanceOutput, error) { - if params == nil { - params = &DeleteTrafficPolicyInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteTrafficPolicyInstance", params, optFns, c.addOperationDeleteTrafficPolicyInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteTrafficPolicyInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to delete a specified traffic policy instance. -type DeleteTrafficPolicyInstanceInput struct { - - // The ID of the traffic policy instance that you want to delete. - // - // When you delete a traffic policy instance, Amazon Route 53 also deletes all of - // the resource record sets that were created when you created the traffic policy - // instance. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// An empty element. -type DeleteTrafficPolicyInstanceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTrafficPolicyInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteTrafficPolicyInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go deleted file mode 100644 index 8641dbf7b2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DeleteVPCAssociationAuthorization.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes authorization to submit an AssociateVPCWithHostedZone request to -// associate a specified VPC with a hosted zone that was created by a different -// account. You must use the account that created the hosted zone to submit a -// DeleteVPCAssociationAuthorization request. -// -// Sending this request only prevents the Amazon Web Services account that created -// the VPC from associating the VPC with the Amazon Route 53 hosted zone in the -// future. If the VPC is already associated with the hosted zone, -// DeleteVPCAssociationAuthorization won't disassociate the VPC from the hosted -// zone. If you want to delete an existing association, use -// DisassociateVPCFromHostedZone . -func (c *Client) DeleteVPCAssociationAuthorization(ctx context.Context, params *DeleteVPCAssociationAuthorizationInput, optFns ...func(*Options)) (*DeleteVPCAssociationAuthorizationOutput, error) { - if params == nil { - params = &DeleteVPCAssociationAuthorizationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVPCAssociationAuthorization", params, optFns, c.addOperationDeleteVPCAssociationAuthorizationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVPCAssociationAuthorizationOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to remove -// authorization to associate a VPC that was created by one Amazon Web Services -// account with a hosted zone that was created with a different Amazon Web Services -// account. -type DeleteVPCAssociationAuthorizationInput struct { - - // When removing authorization to associate a VPC that was created by one Amazon - // Web Services account with a hosted zone that was created with a different Amazon - // Web Services account, the ID of the hosted zone. - // - // This member is required. - HostedZoneId *string - - // When removing authorization to associate a VPC that was created by one Amazon - // Web Services account with a hosted zone that was created with a different Amazon - // Web Services account, a complex type that includes the ID and region of the VPC. - // - // This member is required. - VPC *types.VPC - - noSmithyDocumentSerde -} - -// Empty response for the request. -type DeleteVPCAssociationAuthorizationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVPCAssociationAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDeleteVPCAssociationAuthorization{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDeleteVPCAssociationAuthorization{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVPCAssociationAuthorization"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVPCAssociationAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVPCAssociationAuthorization", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go deleted file mode 100644 index 1b1ce96018..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisableHostedZoneDNSSEC.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disables DNSSEC signing in a specific hosted zone. This action does not -// deactivate any key-signing keys (KSKs) that are active in the hosted zone. -func (c *Client) DisableHostedZoneDNSSEC(ctx context.Context, params *DisableHostedZoneDNSSECInput, optFns ...func(*Options)) (*DisableHostedZoneDNSSECOutput, error) { - if params == nil { - params = &DisableHostedZoneDNSSECInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisableHostedZoneDNSSEC", params, optFns, c.addOperationDisableHostedZoneDNSSECMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisableHostedZoneDNSSECOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisableHostedZoneDNSSECInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -type DisableHostedZoneDNSSECOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDisableHostedZoneDNSSEC{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisableHostedZoneDNSSEC{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisableHostedZoneDNSSEC"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDisableHostedZoneDNSSECValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisableHostedZoneDNSSEC", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go deleted file mode 100644 index 86ef7cf2bb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_DisassociateVPCFromHostedZone.go +++ /dev/null @@ -1,245 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an Amazon Route -// 53 private hosted zone. Note the following: -// -// - You can't disassociate the last Amazon VPC from a private hosted zone. -// -// - You can't convert a private hosted zone into a public hosted zone. -// -// - You can submit a DisassociateVPCFromHostedZone request using either the -// account that created the hosted zone or the account that created the Amazon VPC. -// -// - Some services, such as Cloud Map and Amazon Elastic File System (Amazon -// EFS) automatically create hosted zones and associate VPCs with the hosted zones. -// A service can create a hosted zone using your account or using its own account. -// You can disassociate a VPC from a hosted zone only if the service created the -// hosted zone using your account. -// -// When you run [DisassociateVPCFromHostedZone], if the hosted zone has a value for OwningAccount , you can use -// -// DisassociateVPCFromHostedZone . If the hosted zone has a value for -// OwningService , you can't use DisassociateVPCFromHostedZone . -// -// When revoking access, the hosted zone and the Amazon VPC must belong to the -// same partition. A partition is a group of Amazon Web Services Regions. Each -// Amazon Web Services account is scoped to one partition. -// -// The following are the supported partitions: -// -// - aws - Amazon Web Services Regions -// -// - aws-cn - China Regions -// -// - aws-us-gov - Amazon Web Services GovCloud (US) Region -// -// For more information, see [Access Management] in the Amazon Web Services General Reference. -// -// [Access Management]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -// [DisassociateVPCFromHostedZone]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListHostedZonesByVPC.html -func (c *Client) DisassociateVPCFromHostedZone(ctx context.Context, params *DisassociateVPCFromHostedZoneInput, optFns ...func(*Options)) (*DisassociateVPCFromHostedZoneOutput, error) { - if params == nil { - params = &DisassociateVPCFromHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateVPCFromHostedZone", params, optFns, c.addOperationDisassociateVPCFromHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateVPCFromHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the VPC that you want to -// disassociate from a specified private hosted zone. -type DisassociateVPCFromHostedZoneInput struct { - - // The ID of the private hosted zone that you want to disassociate a VPC from. - // - // This member is required. - HostedZoneId *string - - // A complex type that contains information about the VPC that you're - // disassociating from the specified hosted zone. - // - // This member is required. - VPC *types.VPC - - // Optional: A comment about the disassociation request. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the disassociate -// request. -type DisassociateVPCFromHostedZoneOutput struct { - - // A complex type that describes the changes made to the specified private hosted - // zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateVPCFromHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpDisassociateVPCFromHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpDisassociateVPCFromHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateVPCFromHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateVPCFromHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateVPCFromHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go deleted file mode 100644 index c3b57a1ef8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_EnableHostedZoneDNSSEC.go +++ /dev/null @@ -1,196 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Enables DNSSEC signing in a specific hosted zone. -func (c *Client) EnableHostedZoneDNSSEC(ctx context.Context, params *EnableHostedZoneDNSSECInput, optFns ...func(*Options)) (*EnableHostedZoneDNSSECOutput, error) { - if params == nil { - params = &EnableHostedZoneDNSSECInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "EnableHostedZoneDNSSEC", params, optFns, c.addOperationEnableHostedZoneDNSSECMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*EnableHostedZoneDNSSECOutput) - out.ResultMetadata = metadata - return out, nil -} - -type EnableHostedZoneDNSSECInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -type EnableHostedZoneDNSSECOutput struct { - - // A complex type that describes change information about changes made to your - // hosted zone. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationEnableHostedZoneDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpEnableHostedZoneDNSSEC{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpEnableHostedZoneDNSSEC{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "EnableHostedZoneDNSSEC"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpEnableHostedZoneDNSSECValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opEnableHostedZoneDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "EnableHostedZoneDNSSEC", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go deleted file mode 100644 index 38085fa0d6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetAccountLimit.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the specified limit for the current account, for example, the maximum -// number of health checks that you can create using the account. -// -// For the default limit, see [Limits] in the Amazon Route 53 Developer Guide. To request -// a higher limit, [open a case]. -// -// You can also view account limits in Amazon Web Services Trusted Advisor. Sign -// in to the Amazon Web Services Management Console and open the Trusted Advisor -// console at [https://console.aws.amazon.com/trustedadvisor/]. Then choose Service limits in the navigation pane. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [https://console.aws.amazon.com/trustedadvisor/]: https://console.aws.amazon.com/trustedadvisor -// [open a case]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53 -func (c *Client) GetAccountLimit(ctx context.Context, params *GetAccountLimitInput, optFns ...func(*Options)) (*GetAccountLimitOutput, error) { - if params == nil { - params = &GetAccountLimitInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAccountLimit", params, optFns, c.addOperationGetAccountLimitMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAccountLimitOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetAccountLimitInput struct { - - // The limit that you want to get. Valid values include the following: - // - // - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you - // can create using the current account. - // - // - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can - // create using the current account. - // - // - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable - // delegation sets that you can create using the current account. - // - // - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that - // you can create using the current account. - // - // - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy - // instances that you can create using the current account. (Traffic policy - // instances are referred to as traffic flow policy records in the Amazon Route 53 - // console.) - // - // This member is required. - Type types.AccountLimitType - - noSmithyDocumentSerde -} - -// A complex type that contains the requested limit. -type GetAccountLimitOutput struct { - - // The current number of entities that you have created of the specified type. For - // example, if you specified MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in - // the request, the value of Count is the current number of health checks that you - // have created using the current account. - // - // This member is required. - Count int64 - - // The current setting for the specified limit. For example, if you specified - // MAX_HEALTH_CHECKS_BY_OWNER for the value of Type in the request, the value of - // Limit is the maximum number of health checks that you can create using the - // current account. - // - // This member is required. - Limit *types.AccountLimit - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAccountLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetAccountLimit{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetAccountLimit{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccountLimit"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetAccountLimitValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccountLimit(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetAccountLimit(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAccountLimit", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go deleted file mode 100644 index f4face97ad..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetChange.go +++ /dev/null @@ -1,400 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - smithywaiter "github.com/aws/smithy-go/waiter" - "time" -) - -// Returns the current status of a change batch request. The status is one of the -// following values: -// -// - PENDING indicates that the changes in this request have not propagated to -// all Amazon Route 53 DNS servers managing the hosted zone. This is the initial -// status of all change batch requests. -// -// - INSYNC indicates that the changes have propagated to all Route 53 DNS -// servers managing the hosted zone. -func (c *Client) GetChange(ctx context.Context, params *GetChangeInput, optFns ...func(*Options)) (*GetChangeOutput, error) { - if params == nil { - params = &GetChangeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetChange", params, optFns, c.addOperationGetChangeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetChangeOutput) - out.ResultMetadata = metadata - return out, nil -} - -// The input for a GetChange request. -type GetChangeInput struct { - - // The ID of the change batch request. The value that you specify here is the - // value that ChangeResourceRecordSets returned in the Id element when you - // submitted the request. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// A complex type that contains the ChangeInfo element. -type GetChangeOutput struct { - - // A complex type that contains information about the specified change batch. - // - // This member is required. - ChangeInfo *types.ChangeInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetChangeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetChange{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetChange{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetChange"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetChangeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChange(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ResourceRecordSetsChangedWaiterOptions are waiter options for -// ResourceRecordSetsChangedWaiter -type ResourceRecordSetsChangedWaiterOptions struct { - - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - // - // Passing options here is functionally equivalent to passing values to this - // config's ClientOptions field that extend the inner client's APIOptions directly. - APIOptions []func(*middleware.Stack) error - - // Functional options to be passed to all operations invoked by this client. - // - // Function values that modify the inner APIOptions are applied after the waiter - // config's own APIOptions modifiers. - ClientOptions []func(*Options) - - // MinDelay is the minimum amount of time to delay between retries. If unset, - // ResourceRecordSetsChangedWaiter will use default minimum delay of 30 seconds. - // Note that MinDelay must resolve to a value lesser than or equal to the MaxDelay. - MinDelay time.Duration - - // MaxDelay is the maximum amount of time to delay between retries. If unset or - // set to zero, ResourceRecordSetsChangedWaiter will use default max delay of 120 - // seconds. Note that MaxDelay must resolve to value greater than or equal to the - // MinDelay. - MaxDelay time.Duration - - // LogWaitAttempts is used to enable logging for waiter retry attempts - LogWaitAttempts bool - - // Retryable is function that can be used to override the service defined - // waiter-behavior based on operation output, or returned error. This function is - // used by the waiter to decide if a state is retryable or a terminal state. - // - // By default service-modeled logic will populate this option. This option can - // thus be used to define a custom waiter state with fall-back to service-modeled - // waiter state mutators.The function returns an error in case of a failure state. - // In case of retry state, this function returns a bool value of true and nil - // error, while in case of success it returns a bool value of false and nil error. - Retryable func(context.Context, *GetChangeInput, *GetChangeOutput, error) (bool, error) -} - -// ResourceRecordSetsChangedWaiter defines the waiters for -// ResourceRecordSetsChanged -type ResourceRecordSetsChangedWaiter struct { - client GetChangeAPIClient - - options ResourceRecordSetsChangedWaiterOptions -} - -// NewResourceRecordSetsChangedWaiter constructs a ResourceRecordSetsChangedWaiter. -func NewResourceRecordSetsChangedWaiter(client GetChangeAPIClient, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) *ResourceRecordSetsChangedWaiter { - options := ResourceRecordSetsChangedWaiterOptions{} - options.MinDelay = 30 * time.Second - options.MaxDelay = 120 * time.Second - options.Retryable = resourceRecordSetsChangedStateRetryable - - for _, fn := range optFns { - fn(&options) - } - return &ResourceRecordSetsChangedWaiter{ - client: client, - options: options, - } -} - -// Wait calls the waiter function for ResourceRecordSetsChanged waiter. The -// maxWaitDur is the maximum wait duration the waiter will wait. The maxWaitDur is -// required and must be greater than zero. -func (w *ResourceRecordSetsChangedWaiter) Wait(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) error { - _, err := w.WaitForOutput(ctx, params, maxWaitDur, optFns...) - return err -} - -// WaitForOutput calls the waiter function for ResourceRecordSetsChanged waiter -// and returns the output of the successful operation. The maxWaitDur is the -// maximum wait duration the waiter will wait. The maxWaitDur is required and must -// be greater than zero. -func (w *ResourceRecordSetsChangedWaiter) WaitForOutput(ctx context.Context, params *GetChangeInput, maxWaitDur time.Duration, optFns ...func(*ResourceRecordSetsChangedWaiterOptions)) (*GetChangeOutput, error) { - if maxWaitDur <= 0 { - return nil, fmt.Errorf("maximum wait time for waiter must be greater than zero") - } - - options := w.options - for _, fn := range optFns { - fn(&options) - } - - if options.MaxDelay <= 0 { - options.MaxDelay = 120 * time.Second - } - - if options.MinDelay > options.MaxDelay { - return nil, fmt.Errorf("minimum waiter delay %v must be lesser than or equal to maximum waiter delay of %v.", options.MinDelay, options.MaxDelay) - } - - ctx, cancelFn := context.WithTimeout(ctx, maxWaitDur) - defer cancelFn() - - logger := smithywaiter.Logger{} - remainingTime := maxWaitDur - - var attempt int64 - for { - - attempt++ - apiOptions := options.APIOptions - start := time.Now() - - if options.LogWaitAttempts { - logger.Attempt = attempt - apiOptions = append([]func(*middleware.Stack) error{}, options.APIOptions...) - apiOptions = append(apiOptions, logger.AddLogger) - } - - out, err := w.client.GetChange(ctx, params, func(o *Options) { - baseOpts := []func(*Options){ - addIsWaiterUserAgent, - } - o.APIOptions = append(o.APIOptions, apiOptions...) - for _, opt := range baseOpts { - opt(o) - } - for _, opt := range options.ClientOptions { - opt(o) - } - }) - - retryable, err := options.Retryable(ctx, params, out, err) - if err != nil { - return nil, err - } - if !retryable { - return out, nil - } - - remainingTime -= time.Since(start) - if remainingTime < options.MinDelay || remainingTime <= 0 { - break - } - - // compute exponential backoff between waiter retries - delay, err := smithywaiter.ComputeDelay( - attempt, options.MinDelay, options.MaxDelay, remainingTime, - ) - if err != nil { - return nil, fmt.Errorf("error computing waiter delay, %w", err) - } - - remainingTime -= delay - // sleep for the delay amount before invoking a request - if err := smithytime.SleepWithContext(ctx, delay); err != nil { - return nil, fmt.Errorf("request cancelled while waiting, %w", err) - } - } - return nil, fmt.Errorf("exceeded max wait time for ResourceRecordSetsChanged waiter") -} - -func resourceRecordSetsChangedStateRetryable(ctx context.Context, input *GetChangeInput, output *GetChangeOutput, err error) (bool, error) { - - if err == nil { - v1 := output.ChangeInfo - var v2 types.ChangeStatus - if v1 != nil { - v3 := v1.Status - v2 = v3 - } - expectedValue := "INSYNC" - var pathValue string - pathValue = string(v2) - if pathValue == expectedValue { - return false, nil - } - } - - if err != nil { - return false, err - } - return true, nil -} - -// GetChangeAPIClient is a client that implements the GetChange operation. -type GetChangeAPIClient interface { - GetChange(context.Context, *GetChangeInput, ...func(*Options)) (*GetChangeOutput, error) -} - -var _ GetChangeAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opGetChange(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetChange", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go deleted file mode 100644 index ee03402f92..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetCheckerIpRanges.go +++ /dev/null @@ -1,192 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Route 53 does not perform authorization for this API because it retrieves -// information that is already available to the public. -// -// GetCheckerIpRanges still works, but we recommend that you download -// ip-ranges.json, which includes IP address ranges for all Amazon Web Services -// services. For more information, see [IP Address Ranges of Amazon Route 53 Servers]in the Amazon Route 53 Developer Guide. -// -// [IP Address Ranges of Amazon Route 53 Servers]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/route-53-ip-addresses.html -func (c *Client) GetCheckerIpRanges(ctx context.Context, params *GetCheckerIpRangesInput, optFns ...func(*Options)) (*GetCheckerIpRangesOutput, error) { - if params == nil { - params = &GetCheckerIpRangesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetCheckerIpRanges", params, optFns, c.addOperationGetCheckerIpRangesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetCheckerIpRangesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Empty request. -type GetCheckerIpRangesInput struct { - noSmithyDocumentSerde -} - -// A complex type that contains the CheckerIpRanges element. -type GetCheckerIpRangesOutput struct { - - // A complex type that contains sorted list of IP ranges in CIDR format for Amazon - // Route 53 health checkers. - // - // This member is required. - CheckerIpRanges []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetCheckerIpRangesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetCheckerIpRanges{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetCheckerIpRanges{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetCheckerIpRanges"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCheckerIpRanges(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetCheckerIpRanges(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetCheckerIpRanges", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go deleted file mode 100644 index a61ac6de0e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetDNSSEC.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns information about DNSSEC for a specific hosted zone, including the -// key-signing keys (KSKs) in the hosted zone. -func (c *Client) GetDNSSEC(ctx context.Context, params *GetDNSSECInput, optFns ...func(*Options)) (*GetDNSSECOutput, error) { - if params == nil { - params = &GetDNSSECInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetDNSSEC", params, optFns, c.addOperationGetDNSSECMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetDNSSECOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetDNSSECInput struct { - - // A unique string used to identify a hosted zone. - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -type GetDNSSECOutput struct { - - // The key-signing keys (KSKs) in your account. - // - // This member is required. - KeySigningKeys []types.KeySigningKey - - // A string representing the status of DNSSEC. - // - // This member is required. - Status *types.DNSSECStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetDNSSECMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetDNSSEC{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetDNSSEC{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetDNSSEC"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetDNSSECValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetDNSSEC(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetDNSSEC(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetDNSSEC", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go deleted file mode 100644 index 0d0dec99c3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetGeoLocation.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about whether a specified geographic location is supported for -// Amazon Route 53 geolocation resource record sets. -// -// Route 53 does not perform authorization for this API because it retrieves -// information that is already available to the public. -// -// Use the following syntax to determine whether a continent is supported for -// geolocation: -// -// GET /2013-04-01/geolocation?continentcode=two-letter abbreviation for a -// continent -// -// Use the following syntax to determine whether a country is supported for -// geolocation: -// -// GET /2013-04-01/geolocation?countrycode=two-character country code -// -// Use the following syntax to determine whether a subdivision of a country is -// supported for geolocation: -// -// GET /2013-04-01/geolocation?countrycode=two-character country -// code&subdivisioncode=subdivision code -func (c *Client) GetGeoLocation(ctx context.Context, params *GetGeoLocationInput, optFns ...func(*Options)) (*GetGeoLocationOutput, error) { - if params == nil { - params = &GetGeoLocationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetGeoLocation", params, optFns, c.addOperationGetGeoLocationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetGeoLocationOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request for information about whether a specified geographic location is -// supported for Amazon Route 53 geolocation resource record sets. -type GetGeoLocationInput struct { - - // For geolocation resource record sets, a two-letter abbreviation that identifies - // a continent. Amazon Route 53 supports the following continent codes: - // - // - AF: Africa - // - // - AN: Antarctica - // - // - AS: Asia - // - // - EU: Europe - // - // - OC: Oceania - // - // - NA: North America - // - // - SA: South America - ContinentCode *string - - // Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2]. - // - // Route 53 also supports the country code UA for Ukraine. - // - // [ISO standard 3166-1 alpha-2]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - CountryCode *string - - // The code for the subdivision, such as a particular state within the United - // States. For a list of US state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations]on the United States Postal - // Service website. For a list of all supported subdivision codes, use the [ListGeoLocations]API. - // - // [ListGeoLocations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html - // [Appendix B: Two–Letter State and Possession Abbreviations]: https://pe.usps.com/text/pub28/28apb.htm - SubdivisionCode *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the specified -// geolocation code. -type GetGeoLocationOutput struct { - - // A complex type that contains the codes and full continent, country, and - // subdivision names for the specified geolocation code. - // - // This member is required. - GeoLocationDetails *types.GeoLocationDetails - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetGeoLocationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetGeoLocation{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetGeoLocation{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetGeoLocation"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetGeoLocation(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetGeoLocation(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetGeoLocation", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go deleted file mode 100644 index 8fc27da97c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheck.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about a specified health check. -func (c *Client) GetHealthCheck(ctx context.Context, params *GetHealthCheckInput, optFns ...func(*Options)) (*GetHealthCheckOutput, error) { - if params == nil { - params = &GetHealthCheckInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHealthCheck", params, optFns, c.addOperationGetHealthCheckMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHealthCheckOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get information about a specified health check. -type GetHealthCheckInput struct { - - // The identifier that Amazon Route 53 assigned to the health check when you - // created it. When you add or update a resource record set, you use this value to - // specify which health check to use. The value can be up to 64 characters long. - // - // This member is required. - HealthCheckId *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a GetHealthCheck request. -type GetHealthCheckOutput struct { - - // A complex type that contains information about one health check that is - // associated with the current Amazon Web Services account. - // - // This member is required. - HealthCheck *types.HealthCheck - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheck{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheck{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHealthCheck"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetHealthCheckValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheck(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHealthCheck", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go deleted file mode 100644 index 1c1a9e9e2e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckCount.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the number of health checks that are associated with the current -// Amazon Web Services account. -func (c *Client) GetHealthCheckCount(ctx context.Context, params *GetHealthCheckCountInput, optFns ...func(*Options)) (*GetHealthCheckCountOutput, error) { - if params == nil { - params = &GetHealthCheckCountInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckCount", params, optFns, c.addOperationGetHealthCheckCountMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHealthCheckCountOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request for the number of health checks that are associated with the current -// Amazon Web Services account. -type GetHealthCheckCountInput struct { - noSmithyDocumentSerde -} - -// A complex type that contains the response to a GetHealthCheckCount request. -type GetHealthCheckCountOutput struct { - - // The number of health checks associated with the current Amazon Web Services - // account. - // - // This member is required. - HealthCheckCount *int64 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHealthCheckCountMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckCount{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckCount{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHealthCheckCount"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckCount(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHealthCheckCount(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHealthCheckCount", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go deleted file mode 100644 index 30a9c34c6a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckLastFailureReason.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the reason that a specified health check failed most recently. -func (c *Client) GetHealthCheckLastFailureReason(ctx context.Context, params *GetHealthCheckLastFailureReasonInput, optFns ...func(*Options)) (*GetHealthCheckLastFailureReasonOutput, error) { - if params == nil { - params = &GetHealthCheckLastFailureReasonInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckLastFailureReason", params, optFns, c.addOperationGetHealthCheckLastFailureReasonMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHealthCheckLastFailureReasonOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request for the reason that a health check failed most recently. -type GetHealthCheckLastFailureReasonInput struct { - - // The ID for the health check for which you want the last failure reason. When - // you created the health check, CreateHealthCheck returned the ID in the - // response, in the HealthCheckId element. - // - // If you want to get the last failure reason for a calculated health check, you - // must use the Amazon Route 53 console or the CloudWatch console. You can't use - // GetHealthCheckLastFailureReason for a calculated health check. - // - // This member is required. - HealthCheckId *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a GetHealthCheckLastFailureReason -// request. -type GetHealthCheckLastFailureReasonOutput struct { - - // A list that contains one Observation element for each Amazon Route 53 health - // checker that is reporting a last failure reason. - // - // This member is required. - HealthCheckObservations []types.HealthCheckObservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHealthCheckLastFailureReasonMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckLastFailureReason{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckLastFailureReason{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHealthCheckLastFailureReason"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHealthCheckLastFailureReason(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHealthCheckLastFailureReason", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go deleted file mode 100644 index 1ba7d6a131..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHealthCheckStatus.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets status of a specified health check. -// -// This API is intended for use during development to diagnose behavior. It -// doesn’t support production use-cases with high query rates that require -// immediate and actionable responses. -func (c *Client) GetHealthCheckStatus(ctx context.Context, params *GetHealthCheckStatusInput, optFns ...func(*Options)) (*GetHealthCheckStatusOutput, error) { - if params == nil { - params = &GetHealthCheckStatusInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHealthCheckStatus", params, optFns, c.addOperationGetHealthCheckStatusMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHealthCheckStatusOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get the status for a health check. -type GetHealthCheckStatusInput struct { - - // The ID for the health check that you want the current status for. When you - // created the health check, CreateHealthCheck returned the ID in the response, in - // the HealthCheckId element. - // - // If you want to check the status of a calculated health check, you must use the - // Amazon Route 53 console or the CloudWatch console. You can't use - // GetHealthCheckStatus to get the status of a calculated health check. - // - // This member is required. - HealthCheckId *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a GetHealthCheck request. -type GetHealthCheckStatusOutput struct { - - // A list that contains one HealthCheckObservation element for each Amazon Route - // 53 health checker that is reporting a status about the health check endpoint. - // - // This member is required. - HealthCheckObservations []types.HealthCheckObservation - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHealthCheckStatusMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHealthCheckStatus{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHealthCheckStatus{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHealthCheckStatus"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetHealthCheckStatusValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHealthCheckStatus(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHealthCheckStatus(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHealthCheckStatus", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go deleted file mode 100644 index 18a207dfde..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZone.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about a specified hosted zone including the four name servers -// assigned to the hosted zone. -// -// returns the VPCs associated with the specified hosted zone and does not reflect -// the VPC associations by Route 53 Profiles. To get the associations to a Profile, -// call the [ListProfileAssociations]API. -// -// [ListProfileAssociations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileAssociations.html -func (c *Client) GetHostedZone(ctx context.Context, params *GetHostedZoneInput, optFns ...func(*Options)) (*GetHostedZoneOutput, error) { - if params == nil { - params = &GetHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHostedZone", params, optFns, c.addOperationGetHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get information about a specified hosted zone. -type GetHostedZoneInput struct { - - // The ID of the hosted zone that you want to get information about. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// A complex type that contain the response to a GetHostedZone request. -type GetHostedZoneOutput struct { - - // A complex type that contains general information about the specified hosted - // zone. - // - // This member is required. - HostedZone *types.HostedZone - - // A complex type that lists the Amazon Route 53 name servers for the specified - // hosted zone. - DelegationSet *types.DelegationSet - - // A complex type that contains information about the VPCs that are associated - // with the specified hosted zone. - VPCs []types.VPC - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go deleted file mode 100644 index 7be86df4a4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneCount.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the number of hosted zones that are associated with the current -// Amazon Web Services account. -func (c *Client) GetHostedZoneCount(ctx context.Context, params *GetHostedZoneCountInput, optFns ...func(*Options)) (*GetHostedZoneCountOutput, error) { - if params == nil { - params = &GetHostedZoneCountInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneCount", params, optFns, c.addOperationGetHostedZoneCountMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHostedZoneCountOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to retrieve a count of all the hosted zones that are associated with -// the current Amazon Web Services account. -type GetHostedZoneCountInput struct { - noSmithyDocumentSerde -} - -// A complex type that contains the response to a GetHostedZoneCount request. -type GetHostedZoneCountOutput struct { - - // The total number of public and private hosted zones that are associated with - // the current Amazon Web Services account. - // - // This member is required. - HostedZoneCount *int64 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHostedZoneCountMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneCount{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneCount{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHostedZoneCount"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneCount(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHostedZoneCount(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHostedZoneCount", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go deleted file mode 100644 index fd7a21f537..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetHostedZoneLimit.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the specified limit for a specified hosted zone, for example, the maximum -// number of records that you can create in the hosted zone. -// -// For the default limit, see [Limits] in the Amazon Route 53 Developer Guide. To request -// a higher limit, [open a case]. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [open a case]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53 -func (c *Client) GetHostedZoneLimit(ctx context.Context, params *GetHostedZoneLimitInput, optFns ...func(*Options)) (*GetHostedZoneLimitOutput, error) { - if params == nil { - params = &GetHostedZoneLimitInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetHostedZoneLimit", params, optFns, c.addOperationGetHostedZoneLimitMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetHostedZoneLimitOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetHostedZoneLimitInput struct { - - // The ID of the hosted zone that you want to get a limit for. - // - // This member is required. - HostedZoneId *string - - // The limit that you want to get. Valid values include the following: - // - // - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in - // the specified hosted zone. - // - // - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can - // associate with the specified private hosted zone. - // - // This member is required. - Type types.HostedZoneLimitType - - noSmithyDocumentSerde -} - -// A complex type that contains the requested limit. -type GetHostedZoneLimitOutput struct { - - // The current number of entities that you have created of the specified type. For - // example, if you specified MAX_RRSETS_BY_ZONE for the value of Type in the - // request, the value of Count is the current number of records that you have - // created in the specified hosted zone. - // - // This member is required. - Count int64 - - // The current setting for the specified limit. For example, if you specified - // MAX_RRSETS_BY_ZONE for the value of Type in the request, the value of Limit is - // the maximum number of records that you can create in the specified hosted zone. - // - // This member is required. - Limit *types.HostedZoneLimit - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetHostedZoneLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetHostedZoneLimit{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetHostedZoneLimit{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetHostedZoneLimit"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetHostedZoneLimitValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetHostedZoneLimit(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetHostedZoneLimit(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetHostedZoneLimit", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go deleted file mode 100644 index 920ab18c6c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetQueryLoggingConfig.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about a specified configuration for DNS query logging. -// -// For more information about DNS query logs, see [CreateQueryLoggingConfig] and [Logging DNS Queries]. -// -// [CreateQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html -// [Logging DNS Queries]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html -func (c *Client) GetQueryLoggingConfig(ctx context.Context, params *GetQueryLoggingConfigInput, optFns ...func(*Options)) (*GetQueryLoggingConfigOutput, error) { - if params == nil { - params = &GetQueryLoggingConfigInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetQueryLoggingConfig", params, optFns, c.addOperationGetQueryLoggingConfigMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetQueryLoggingConfigOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetQueryLoggingConfigInput struct { - - // The ID of the configuration for DNS query logging that you want to get - // information about. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -type GetQueryLoggingConfigOutput struct { - - // A complex type that contains information about the query logging configuration - // that you specified in a [GetQueryLoggingConfig]request. - // - // [GetQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetQueryLoggingConfig.html - // - // This member is required. - QueryLoggingConfig *types.QueryLoggingConfig - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetQueryLoggingConfigMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetQueryLoggingConfig{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetQueryLoggingConfig"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetQueryLoggingConfigValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetQueryLoggingConfig(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetQueryLoggingConfig(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetQueryLoggingConfig", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go deleted file mode 100644 index 1cd8ef146f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSet.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves information about a specified reusable delegation set, including the -// four name servers that are assigned to the delegation set. -func (c *Client) GetReusableDelegationSet(ctx context.Context, params *GetReusableDelegationSetInput, optFns ...func(*Options)) (*GetReusableDelegationSetOutput, error) { - if params == nil { - params = &GetReusableDelegationSetInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSet", params, optFns, c.addOperationGetReusableDelegationSetMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetReusableDelegationSetOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get information about a specified reusable delegation set. -type GetReusableDelegationSetInput struct { - - // The ID of the reusable delegation set that you want to get a list of name - // servers for. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to the GetReusableDelegationSet -// request. -type GetReusableDelegationSetOutput struct { - - // A complex type that contains information about the reusable delegation set. - // - // This member is required. - DelegationSet *types.DelegationSet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetReusableDelegationSetMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSet{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetReusableDelegationSet"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetReusableDelegationSetValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSet(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetReusableDelegationSet(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetReusableDelegationSet", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go deleted file mode 100644 index 0f86f1290d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetReusableDelegationSetLimit.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the maximum number of hosted zones that you can associate with the -// specified reusable delegation set. -// -// For the default limit, see [Limits] in the Amazon Route 53 Developer Guide. To request -// a higher limit, [open a case]. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [open a case]: https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-route53 -func (c *Client) GetReusableDelegationSetLimit(ctx context.Context, params *GetReusableDelegationSetLimitInput, optFns ...func(*Options)) (*GetReusableDelegationSetLimitOutput, error) { - if params == nil { - params = &GetReusableDelegationSetLimitInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetReusableDelegationSetLimit", params, optFns, c.addOperationGetReusableDelegationSetLimitMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetReusableDelegationSetLimitOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the request to create a hosted -// zone. -type GetReusableDelegationSetLimitInput struct { - - // The ID of the delegation set that you want to get the limit for. - // - // This member is required. - DelegationSetId *string - - // Specify MAX_ZONES_BY_REUSABLE_DELEGATION_SET to get the maximum number of - // hosted zones that you can associate with the specified reusable delegation set. - // - // This member is required. - Type types.ReusableDelegationSetLimitType - - noSmithyDocumentSerde -} - -// A complex type that contains the requested limit. -type GetReusableDelegationSetLimitOutput struct { - - // The current number of hosted zones that you can associate with the specified - // reusable delegation set. - // - // This member is required. - Count int64 - - // The current setting for the limit on hosted zones that you can associate with - // the specified reusable delegation set. - // - // This member is required. - Limit *types.ReusableDelegationSetLimit - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetReusableDelegationSetLimitMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetReusableDelegationSetLimit{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetReusableDelegationSetLimit{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetReusableDelegationSetLimit"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetReusableDelegationSetLimitValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetReusableDelegationSetLimit(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetReusableDelegationSetLimit", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go deleted file mode 100644 index 40d94defb7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicy.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about a specific traffic policy version. -// -// For information about how of deleting a traffic policy affects the response -// from GetTrafficPolicy , see [DeleteTrafficPolicy]. -// -// [DeleteTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html -func (c *Client) GetTrafficPolicy(ctx context.Context, params *GetTrafficPolicyInput, optFns ...func(*Options)) (*GetTrafficPolicyOutput, error) { - if params == nil { - params = &GetTrafficPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicy", params, optFns, c.addOperationGetTrafficPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTrafficPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Gets information about a specific traffic policy version. -type GetTrafficPolicyInput struct { - - // The ID of the traffic policy that you want to get information about. - // - // This member is required. - Id *string - - // The version number of the traffic policy that you want to get information about. - // - // This member is required. - Version *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type GetTrafficPolicyOutput struct { - - // A complex type that contains settings for the specified traffic policy. - // - // This member is required. - TrafficPolicy *types.TrafficPolicy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTrafficPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTrafficPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetTrafficPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetTrafficPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTrafficPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go deleted file mode 100644 index 7247078d05..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstance.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about a specified traffic policy instance. -// -// Use GetTrafficPolicyInstance with the id of new traffic policy instance to -// confirm that the CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request completed successfully. For more information, see the State response -// element. -// -// In the Route 53 console, traffic policy instances are known as policy records. -func (c *Client) GetTrafficPolicyInstance(ctx context.Context, params *GetTrafficPolicyInstanceInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceOutput, error) { - if params == nil { - params = &GetTrafficPolicyInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstance", params, optFns, c.addOperationGetTrafficPolicyInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTrafficPolicyInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Gets information about a specified traffic policy instance. -type GetTrafficPolicyInstanceInput struct { - - // The ID of the traffic policy instance that you want to get information about. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type GetTrafficPolicyInstanceOutput struct { - - // A complex type that contains settings for the traffic policy instance. - // - // This member is required. - TrafficPolicyInstance *types.TrafficPolicyInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTrafficPolicyInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetTrafficPolicyInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTrafficPolicyInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go deleted file mode 100644 index d8eb511fb5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_GetTrafficPolicyInstanceCount.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the number of traffic policy instances that are associated with the -// current Amazon Web Services account. -func (c *Client) GetTrafficPolicyInstanceCount(ctx context.Context, params *GetTrafficPolicyInstanceCountInput, optFns ...func(*Options)) (*GetTrafficPolicyInstanceCountOutput, error) { - if params == nil { - params = &GetTrafficPolicyInstanceCountInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetTrafficPolicyInstanceCount", params, optFns, c.addOperationGetTrafficPolicyInstanceCountMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetTrafficPolicyInstanceCountOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Request to get the number of traffic policy instances that are associated with -// the current Amazon Web Services account. -type GetTrafficPolicyInstanceCountInput struct { - noSmithyDocumentSerde -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type GetTrafficPolicyInstanceCountOutput struct { - - // The number of traffic policy instances that are associated with the current - // Amazon Web Services account. - // - // This member is required. - TrafficPolicyInstanceCount *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetTrafficPolicyInstanceCountMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpGetTrafficPolicyInstanceCount{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpGetTrafficPolicyInstanceCount{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetTrafficPolicyInstanceCount"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetTrafficPolicyInstanceCount(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetTrafficPolicyInstanceCount", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go deleted file mode 100644 index 8e0aec265e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrBlocks.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a paginated list of location objects and their CIDR blocks. -func (c *Client) ListCidrBlocks(ctx context.Context, params *ListCidrBlocksInput, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) { - if params == nil { - params = &ListCidrBlocksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListCidrBlocks", params, optFns, c.addOperationListCidrBlocksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListCidrBlocksOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListCidrBlocksInput struct { - - // The UUID of the CIDR collection. - // - // This member is required. - CollectionId *string - - // The name of the CIDR collection location. - LocationName *string - - // Maximum number of results you want returned. - MaxResults *int32 - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListCidrBlocksOutput struct { - - // A complex type that contains information about the CIDR blocks. - CidrBlocks []types.CidrBlockSummary - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - // - // If no value is provided, the listing of results starts from the beginning. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListCidrBlocksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrBlocks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrBlocks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListCidrBlocks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListCidrBlocksValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrBlocks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListCidrBlocksPaginatorOptions is the paginator options for ListCidrBlocks -type ListCidrBlocksPaginatorOptions struct { - // Maximum number of results you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListCidrBlocksPaginator is a paginator for ListCidrBlocks -type ListCidrBlocksPaginator struct { - options ListCidrBlocksPaginatorOptions - client ListCidrBlocksAPIClient - params *ListCidrBlocksInput - nextToken *string - firstPage bool -} - -// NewListCidrBlocksPaginator returns a new ListCidrBlocksPaginator -func NewListCidrBlocksPaginator(client ListCidrBlocksAPIClient, params *ListCidrBlocksInput, optFns ...func(*ListCidrBlocksPaginatorOptions)) *ListCidrBlocksPaginator { - if params == nil { - params = &ListCidrBlocksInput{} - } - - options := ListCidrBlocksPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListCidrBlocksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListCidrBlocksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListCidrBlocks page. -func (p *ListCidrBlocksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrBlocksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListCidrBlocks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListCidrBlocksAPIClient is a client that implements the ListCidrBlocks -// operation. -type ListCidrBlocksAPIClient interface { - ListCidrBlocks(context.Context, *ListCidrBlocksInput, ...func(*Options)) (*ListCidrBlocksOutput, error) -} - -var _ ListCidrBlocksAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListCidrBlocks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListCidrBlocks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go deleted file mode 100644 index 524ce8a067..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrCollections.go +++ /dev/null @@ -1,292 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a paginated list of CIDR collections in the Amazon Web Services account -// (metadata only). -func (c *Client) ListCidrCollections(ctx context.Context, params *ListCidrCollectionsInput, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) { - if params == nil { - params = &ListCidrCollectionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListCidrCollections", params, optFns, c.addOperationListCidrCollectionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListCidrCollectionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListCidrCollectionsInput struct { - - // The maximum number of CIDR collections to return in the response. - MaxResults *int32 - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - // - // If no value is provided, the listing of results starts from the beginning. - NextToken *string - - noSmithyDocumentSerde -} - -type ListCidrCollectionsOutput struct { - - // A complex type with information about the CIDR collection. - CidrCollections []types.CollectionSummary - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - // - // If no value is provided, the listing of results starts from the beginning. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListCidrCollectionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrCollections{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrCollections{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListCidrCollections"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrCollections(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListCidrCollectionsPaginatorOptions is the paginator options for -// ListCidrCollections -type ListCidrCollectionsPaginatorOptions struct { - // The maximum number of CIDR collections to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListCidrCollectionsPaginator is a paginator for ListCidrCollections -type ListCidrCollectionsPaginator struct { - options ListCidrCollectionsPaginatorOptions - client ListCidrCollectionsAPIClient - params *ListCidrCollectionsInput - nextToken *string - firstPage bool -} - -// NewListCidrCollectionsPaginator returns a new ListCidrCollectionsPaginator -func NewListCidrCollectionsPaginator(client ListCidrCollectionsAPIClient, params *ListCidrCollectionsInput, optFns ...func(*ListCidrCollectionsPaginatorOptions)) *ListCidrCollectionsPaginator { - if params == nil { - params = &ListCidrCollectionsInput{} - } - - options := ListCidrCollectionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListCidrCollectionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListCidrCollectionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListCidrCollections page. -func (p *ListCidrCollectionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrCollectionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListCidrCollections(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListCidrCollectionsAPIClient is a client that implements the -// ListCidrCollections operation. -type ListCidrCollectionsAPIClient interface { - ListCidrCollections(context.Context, *ListCidrCollectionsInput, ...func(*Options)) (*ListCidrCollectionsOutput, error) -} - -var _ ListCidrCollectionsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListCidrCollections(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListCidrCollections", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go deleted file mode 100644 index 0ad494fe69..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListCidrLocations.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a paginated list of CIDR locations for the given collection (metadata -// only, does not include CIDR blocks). -func (c *Client) ListCidrLocations(ctx context.Context, params *ListCidrLocationsInput, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) { - if params == nil { - params = &ListCidrLocationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListCidrLocations", params, optFns, c.addOperationListCidrLocationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListCidrLocationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListCidrLocationsInput struct { - - // The CIDR collection ID. - // - // This member is required. - CollectionId *string - - // The maximum number of CIDR collection locations to return in the response. - MaxResults *int32 - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - // - // If no value is provided, the listing of results starts from the beginning. - NextToken *string - - noSmithyDocumentSerde -} - -type ListCidrLocationsOutput struct { - - // A complex type that contains information about the list of CIDR locations. - CidrLocations []types.LocationSummary - - // An opaque pagination token to indicate where the service is to begin - // enumerating results. - // - // If no value is provided, the listing of results starts from the beginning. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListCidrLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListCidrLocations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListCidrLocations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListCidrLocations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListCidrLocationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListCidrLocations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListCidrLocationsPaginatorOptions is the paginator options for ListCidrLocations -type ListCidrLocationsPaginatorOptions struct { - // The maximum number of CIDR collection locations to return in the response. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListCidrLocationsPaginator is a paginator for ListCidrLocations -type ListCidrLocationsPaginator struct { - options ListCidrLocationsPaginatorOptions - client ListCidrLocationsAPIClient - params *ListCidrLocationsInput - nextToken *string - firstPage bool -} - -// NewListCidrLocationsPaginator returns a new ListCidrLocationsPaginator -func NewListCidrLocationsPaginator(client ListCidrLocationsAPIClient, params *ListCidrLocationsInput, optFns ...func(*ListCidrLocationsPaginatorOptions)) *ListCidrLocationsPaginator { - if params == nil { - params = &ListCidrLocationsInput{} - } - - options := ListCidrLocationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListCidrLocationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListCidrLocationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListCidrLocations page. -func (p *ListCidrLocationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListCidrLocationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListCidrLocations(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListCidrLocationsAPIClient is a client that implements the ListCidrLocations -// operation. -type ListCidrLocationsAPIClient interface { - ListCidrLocations(context.Context, *ListCidrLocationsInput, ...func(*Options)) (*ListCidrLocationsOutput, error) -} - -var _ ListCidrLocationsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListCidrLocations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListCidrLocations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go deleted file mode 100644 index 1b57fe240e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListGeoLocations.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves a list of supported geographic locations. -// -// Countries are listed first, and continents are listed last. If Amazon Route 53 -// supports subdivisions for a country (for example, states or provinces), the -// subdivisions for that country are listed in alphabetical order immediately after -// the corresponding country. -// -// Route 53 does not perform authorization for this API because it retrieves -// information that is already available to the public. -// -// For a list of supported geolocation codes, see the [GeoLocation] data type. -// -// [GeoLocation]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html -func (c *Client) ListGeoLocations(ctx context.Context, params *ListGeoLocationsInput, optFns ...func(*Options)) (*ListGeoLocationsOutput, error) { - if params == nil { - params = &ListGeoLocationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListGeoLocations", params, optFns, c.addOperationListGeoLocationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListGeoLocationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get a list of geographic locations that Amazon Route 53 supports -// for geolocation resource record sets. -type ListGeoLocationsInput struct { - - // (Optional) The maximum number of geolocations to be included in the response - // body for this request. If more than maxitems geolocations remain to be listed, - // then the value of the IsTruncated element in the response is true . - MaxItems *int32 - - // The code for the continent with which you want to start listing locations that - // Amazon Route 53 supports for geolocation. If Route 53 has already returned a - // page or more of results, if IsTruncated is true, and if NextContinentCode from - // the previous response has a value, enter that value in startcontinentcode to - // return the next page of results. - // - // Include startcontinentcode only if you want to list continents. Don't include - // startcontinentcode when you're listing countries or countries with their - // subdivisions. - StartContinentCode *string - - // The code for the country with which you want to start listing locations that - // Amazon Route 53 supports for geolocation. If Route 53 has already returned a - // page or more of results, if IsTruncated is true , and if NextCountryCode from - // the previous response has a value, enter that value in startcountrycode to - // return the next page of results. - StartCountryCode *string - - // The code for the state of the United States with which you want to start - // listing locations that Amazon Route 53 supports for geolocation. If Route 53 has - // already returned a page or more of results, if IsTruncated is true , and if - // NextSubdivisionCode from the previous response has a value, enter that value in - // startsubdivisioncode to return the next page of results. - // - // To list subdivisions (U.S. states), you must include both startcountrycode and - // startsubdivisioncode . - StartSubdivisionCode *string - - noSmithyDocumentSerde -} - -// A complex type containing the response information for the request. -type ListGeoLocationsOutput struct { - - // A complex type that contains one GeoLocationDetails element for each location - // that Amazon Route 53 supports for geolocation. - // - // This member is required. - GeoLocationDetailsList []types.GeoLocationDetails - - // A value that indicates whether more locations remain to be listed after the - // last location in this response. If so, the value of IsTruncated is true . To get - // more values, submit another request and include the values of NextContinentCode - // , NextCountryCode , and NextSubdivisionCode in the startcontinentcode , - // startcountrycode , and startsubdivisioncode , as applicable. - // - // This member is required. - IsTruncated bool - - // The value that you specified for MaxItems in the request. - // - // This member is required. - MaxItems *int32 - - // If IsTruncated is true , you can make a follow-up request to display more - // locations. Enter the value of NextContinentCode in the startcontinentcode - // parameter in another ListGeoLocations request. - NextContinentCode *string - - // If IsTruncated is true , you can make a follow-up request to display more - // locations. Enter the value of NextCountryCode in the startcountrycode parameter - // in another ListGeoLocations request. - NextCountryCode *string - - // If IsTruncated is true , you can make a follow-up request to display more - // locations. Enter the value of NextSubdivisionCode in the startsubdivisioncode - // parameter in another ListGeoLocations request. - NextSubdivisionCode *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListGeoLocationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListGeoLocations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListGeoLocations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListGeoLocations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGeoLocations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListGeoLocations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListGeoLocations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go deleted file mode 100644 index 6a1f1c5e51..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHealthChecks.go +++ /dev/null @@ -1,327 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieve a list of the health checks that are associated with the current -// Amazon Web Services account. -func (c *Client) ListHealthChecks(ctx context.Context, params *ListHealthChecksInput, optFns ...func(*Options)) (*ListHealthChecksOutput, error) { - if params == nil { - params = &ListHealthChecksInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListHealthChecks", params, optFns, c.addOperationListHealthChecksMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListHealthChecksOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to retrieve a list of the health checks that are associated with the -// current Amazon Web Services account. -type ListHealthChecksInput struct { - - // If the value of IsTruncated in the previous response was true , you have more - // health checks. To get another group, submit another ListHealthChecks request. - // - // For the value of marker , specify the value of NextMarker from the previous - // response, which is the ID of the first health check that Amazon Route 53 will - // return if you submit another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more health checks to get. - Marker *string - - // The maximum number of health checks that you want ListHealthChecks to return in - // response to the current request. Amazon Route 53 returns a maximum of 1000 - // items. If you set MaxItems to a value greater than 1000, Route 53 returns only - // the first 1000 health checks. - MaxItems *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a ListHealthChecks request. -type ListHealthChecksOutput struct { - - // A complex type that contains one HealthCheck element for each health check that - // is associated with the current Amazon Web Services account. - // - // This member is required. - HealthChecks []types.HealthCheck - - // A flag that indicates whether there are more health checks to be listed. If the - // response was truncated, you can get the next group of health checks by - // submitting another ListHealthChecks request and specifying the value of - // NextMarker in the marker parameter. - // - // This member is required. - IsTruncated bool - - // For the second and subsequent calls to ListHealthChecks , Marker is the value - // that you specified for the marker parameter in the previous request. - // - // This member is required. - Marker *string - - // The value that you specified for the maxitems parameter in the call to - // ListHealthChecks that produced the current response. - // - // This member is required. - MaxItems *int32 - - // If IsTruncated is true , the value of NextMarker identifies the first health - // check that Amazon Route 53 returns if you submit another ListHealthChecks - // request and specify the value of NextMarker in the marker parameter. - NextMarker *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListHealthChecksMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListHealthChecks{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHealthChecks{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListHealthChecks"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHealthChecks(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListHealthChecksPaginatorOptions is the paginator options for ListHealthChecks -type ListHealthChecksPaginatorOptions struct { - // The maximum number of health checks that you want ListHealthChecks to return in - // response to the current request. Amazon Route 53 returns a maximum of 1000 - // items. If you set MaxItems to a value greater than 1000, Route 53 returns only - // the first 1000 health checks. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListHealthChecksPaginator is a paginator for ListHealthChecks -type ListHealthChecksPaginator struct { - options ListHealthChecksPaginatorOptions - client ListHealthChecksAPIClient - params *ListHealthChecksInput - nextToken *string - firstPage bool -} - -// NewListHealthChecksPaginator returns a new ListHealthChecksPaginator -func NewListHealthChecksPaginator(client ListHealthChecksAPIClient, params *ListHealthChecksInput, optFns ...func(*ListHealthChecksPaginatorOptions)) *ListHealthChecksPaginator { - if params == nil { - params = &ListHealthChecksInput{} - } - - options := ListHealthChecksPaginatorOptions{} - if params.MaxItems != nil { - options.Limit = *params.MaxItems - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListHealthChecksPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListHealthChecksPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListHealthChecks page. -func (p *ListHealthChecksPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHealthChecksOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxItems = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListHealthChecks(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextMarker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListHealthChecksAPIClient is a client that implements the ListHealthChecks -// operation. -type ListHealthChecksAPIClient interface { - ListHealthChecks(context.Context, *ListHealthChecksInput, ...func(*Options)) (*ListHealthChecksOutput, error) -} - -var _ ListHealthChecksAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListHealthChecks(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListHealthChecks", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go deleted file mode 100644 index 2a7b4b0767..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZones.go +++ /dev/null @@ -1,344 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves a list of the public and private hosted zones that are associated -// with the current Amazon Web Services account. The response includes a -// HostedZones child element for each hosted zone. -// -// Amazon Route 53 returns a maximum of 100 items in each response. If you have a -// lot of hosted zones, you can use the maxitems parameter to list them in groups -// of up to 100. -func (c *Client) ListHostedZones(ctx context.Context, params *ListHostedZonesInput, optFns ...func(*Options)) (*ListHostedZonesOutput, error) { - if params == nil { - params = &ListHostedZonesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListHostedZones", params, optFns, c.addOperationListHostedZonesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListHostedZonesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to retrieve a list of the public and private hosted zones that are -// associated with the current Amazon Web Services account. -type ListHostedZonesInput struct { - - // If you're using reusable delegation sets and you want to list all of the hosted - // zones that are associated with a reusable delegation set, specify the ID of that - // reusable delegation set. - DelegationSetId *string - - // (Optional) Specifies if the hosted zone is private. - HostedZoneType types.HostedZoneType - - // If the value of IsTruncated in the previous response was true , you have more - // hosted zones. To get more hosted zones, submit another ListHostedZones request. - // - // For the value of marker , specify the value of NextMarker from the previous - // response, which is the ID of the first hosted zone that Amazon Route 53 will - // return if you submit another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more hosted zones to get. - Marker *string - - // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to - // return. If you have more than maxitems hosted zones, the value of IsTruncated - // in the response is true , and the value of NextMarker is the hosted zone ID of - // the first hosted zone that Route 53 will return if you submit another request. - MaxItems *int32 - - noSmithyDocumentSerde -} - -type ListHostedZonesOutput struct { - - // A complex type that contains general information about the hosted zone. - // - // This member is required. - HostedZones []types.HostedZone - - // A flag indicating whether there are more hosted zones to be listed. If the - // response was truncated, you can get more hosted zones by submitting another - // ListHostedZones request and specifying the value of NextMarker in the marker - // parameter. - // - // This member is required. - IsTruncated bool - - // For the second and subsequent calls to ListHostedZones , Marker is the value - // that you specified for the marker parameter in the request that produced the - // current response. - // - // This member is required. - Marker *string - - // The value that you specified for the maxitems parameter in the call to - // ListHostedZones that produced the current response. - // - // This member is required. - MaxItems *int32 - - // If IsTruncated is true , the value of NextMarker identifies the first hosted - // zone in the next group of hosted zones. Submit another ListHostedZones request, - // and specify the value of NextMarker from the response in the marker parameter. - // - // This element is present only if IsTruncated is true . - NextMarker *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListHostedZonesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZones{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZones{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListHostedZones"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZones(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListHostedZonesPaginatorOptions is the paginator options for ListHostedZones -type ListHostedZonesPaginatorOptions struct { - // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to - // return. If you have more than maxitems hosted zones, the value of IsTruncated - // in the response is true , and the value of NextMarker is the hosted zone ID of - // the first hosted zone that Route 53 will return if you submit another request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListHostedZonesPaginator is a paginator for ListHostedZones -type ListHostedZonesPaginator struct { - options ListHostedZonesPaginatorOptions - client ListHostedZonesAPIClient - params *ListHostedZonesInput - nextToken *string - firstPage bool -} - -// NewListHostedZonesPaginator returns a new ListHostedZonesPaginator -func NewListHostedZonesPaginator(client ListHostedZonesAPIClient, params *ListHostedZonesInput, optFns ...func(*ListHostedZonesPaginatorOptions)) *ListHostedZonesPaginator { - if params == nil { - params = &ListHostedZonesInput{} - } - - options := ListHostedZonesPaginatorOptions{} - if params.MaxItems != nil { - options.Limit = *params.MaxItems - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListHostedZonesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.Marker, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListHostedZonesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListHostedZones page. -func (p *ListHostedZonesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListHostedZonesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.Marker = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxItems = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListHostedZones(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextMarker - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListHostedZonesAPIClient is a client that implements the ListHostedZones -// operation. -type ListHostedZonesAPIClient interface { - ListHostedZones(context.Context, *ListHostedZonesInput, ...func(*Options)) (*ListHostedZonesOutput, error) -} - -var _ ListHostedZonesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListHostedZones(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListHostedZones", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go deleted file mode 100644 index 8f95ca1910..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByName.go +++ /dev/null @@ -1,305 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves a list of your hosted zones in lexicographic order. The response -// includes a HostedZones child element for each hosted zone created by the -// current Amazon Web Services account. -// -// ListHostedZonesByName sorts hosted zones by name with the labels reversed. For -// example: -// -// com.example.www. -// -// Note the trailing dot, which can change the sort order in some circumstances. -// -// If the domain name includes escape characters or Punycode, ListHostedZonesByName -// alphabetizes the domain name using the escaped or Punycoded value, which is the -// format that Amazon Route 53 saves in its database. For example, to create a -// hosted zone for exämple.com, you specify ex\344mple.com for the domain name. -// ListHostedZonesByName alphabetizes it as: -// -// com.ex\344mple. -// -// The labels are reversed and alphabetized using the escaped value. For more -// information about valid domain name formats, including internationalized domain -// names, see [DNS Domain Name Format]in the Amazon Route 53 Developer Guide. -// -// Route 53 returns up to 100 items in each response. If you have a lot of hosted -// zones, use the MaxItems parameter to list them in groups of up to 100. The -// response includes values that help navigate from one group of MaxItems hosted -// zones to the next: -// -// - The DNSName and HostedZoneId elements in the response contain the values, if -// any, specified for the dnsname and hostedzoneid parameters in the request that -// produced the current response. -// -// - The MaxItems element in the response contains the value, if any, that you -// specified for the maxitems parameter in the request that produced the current -// response. -// -// - If the value of IsTruncated in the response is true, there are more hosted -// zones associated with the current Amazon Web Services account. -// -// If IsTruncated is false, this response includes the last hosted zone that is -// -// associated with the current account. The NextDNSName element and -// NextHostedZoneId elements are omitted from the response. -// -// - The NextDNSName and NextHostedZoneId elements in the response contain the -// domain name and the hosted zone ID of the next hosted zone that is associated -// with the current Amazon Web Services account. If you want to list more hosted -// zones, make another call to ListHostedZonesByName , and specify the value of -// NextDNSName and NextHostedZoneId in the dnsname and hostedzoneid parameters, -// respectively. -// -// [DNS Domain Name Format]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html -func (c *Client) ListHostedZonesByName(ctx context.Context, params *ListHostedZonesByNameInput, optFns ...func(*Options)) (*ListHostedZonesByNameOutput, error) { - if params == nil { - params = &ListHostedZonesByNameInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByName", params, optFns, c.addOperationListHostedZonesByNameMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListHostedZonesByNameOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Retrieves a list of the public and private hosted zones that are associated -// with the current Amazon Web Services account in ASCII order by domain name. -type ListHostedZonesByNameInput struct { - - // (Optional) For your first request to ListHostedZonesByName , include the dnsname - // parameter only if you want to specify the name of the first hosted zone in the - // response. If you don't include the dnsname parameter, Amazon Route 53 returns - // all of the hosted zones that were created by the current Amazon Web Services - // account, in ASCII order. For subsequent requests, include both dnsname and - // hostedzoneid parameters. For dnsname , specify the value of NextDNSName from - // the previous response. - DNSName *string - - // (Optional) For your first request to ListHostedZonesByName , do not include the - // hostedzoneid parameter. - // - // If you have more hosted zones than the value of maxitems , ListHostedZonesByName - // returns only the first maxitems hosted zones. To get the next group of maxitems - // hosted zones, submit another request to ListHostedZonesByName and include both - // dnsname and hostedzoneid parameters. For the value of hostedzoneid , specify the - // value of the NextHostedZoneId element from the previous response. - HostedZoneId *string - - // The maximum number of hosted zones to be included in the response body for this - // request. If you have more than maxitems hosted zones, then the value of the - // IsTruncated element in the response is true, and the values of NextDNSName and - // NextHostedZoneId specify the first hosted zone in the next group of maxitems - // hosted zones. - MaxItems *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListHostedZonesByNameOutput struct { - - // A complex type that contains general information about the hosted zone. - // - // This member is required. - HostedZones []types.HostedZone - - // A flag that indicates whether there are more hosted zones to be listed. If the - // response was truncated, you can get the next group of maxitems hosted zones by - // calling ListHostedZonesByName again and specifying the values of NextDNSName - // and NextHostedZoneId elements in the dnsname and hostedzoneid parameters. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the maxitems parameter in the call to - // ListHostedZonesByName that produced the current response. - // - // This member is required. - MaxItems *int32 - - // For the second and subsequent calls to ListHostedZonesByName , DNSName is the - // value that you specified for the dnsname parameter in the request that produced - // the current response. - DNSName *string - - // The ID that Amazon Route 53 assigned to the hosted zone when you created it. - HostedZoneId *string - - // If IsTruncated is true, the value of NextDNSName is the name of the first - // hosted zone in the next group of maxitems hosted zones. Call - // ListHostedZonesByName again and specify the value of NextDNSName and - // NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. - // - // This element is present only if IsTruncated is true . - NextDNSName *string - - // If IsTruncated is true , the value of NextHostedZoneId identifies the first - // hosted zone in the next group of maxitems hosted zones. Call - // ListHostedZonesByName again and specify the value of NextDNSName and - // NextHostedZoneId in the dnsname and hostedzoneid parameters, respectively. - // - // This element is present only if IsTruncated is true . - NextHostedZoneId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListHostedZonesByNameMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByName{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByName{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListHostedZonesByName"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByName(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListHostedZonesByName(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListHostedZonesByName", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go deleted file mode 100644 index 0d7036b157..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListHostedZonesByVPC.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all the private hosted zones that a specified VPC is associated with, -// regardless of which Amazon Web Services account or Amazon Web Services service -// owns the hosted zones. The HostedZoneOwner structure in the response contains -// one of the following values: -// -// - An OwningAccount element, which contains the account number of either the -// current Amazon Web Services account or another Amazon Web Services account. Some -// services, such as Cloud Map, create hosted zones using the current account. -// -// - An OwningService element, which identifies the Amazon Web Services service -// that created and owns the hosted zone. For example, if a hosted zone was created -// by Amazon Elastic File System (Amazon EFS), the value of Owner is -// efs.amazonaws.com . -// -// ListHostedZonesByVPC returns the hosted zones associated with the specified VPC -// and does not reflect the hosted zone associations to VPCs via Route 53 Profiles. -// To get the associations to a Profile, call the [ListProfileResourceAssociations]API. -// -// When listing private hosted zones, the hosted zone and the Amazon VPC must -// belong to the same partition where the hosted zones were created. A partition is -// a group of Amazon Web Services Regions. Each Amazon Web Services account is -// scoped to one partition. -// -// The following are the supported partitions: -// -// - aws - Amazon Web Services Regions -// -// - aws-cn - China Regions -// -// - aws-us-gov - Amazon Web Services GovCloud (US) Region -// -// For more information, see [Access Management] in the Amazon Web Services General Reference. -// -// [Access Management]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -// [ListProfileResourceAssociations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53profiles_ListProfileResourceAssociations.html -func (c *Client) ListHostedZonesByVPC(ctx context.Context, params *ListHostedZonesByVPCInput, optFns ...func(*Options)) (*ListHostedZonesByVPCOutput, error) { - if params == nil { - params = &ListHostedZonesByVPCInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListHostedZonesByVPC", params, optFns, c.addOperationListHostedZonesByVPCMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListHostedZonesByVPCOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Lists all the private hosted zones that a specified VPC is associated with, -// regardless of which Amazon Web Services account created the hosted zones. -type ListHostedZonesByVPCInput struct { - - // The ID of the Amazon VPC that you want to list hosted zones for. - // - // This member is required. - VPCId *string - - // For the Amazon VPC that you specified for VPCId , the Amazon Web Services Region - // that you created the VPC in. - // - // This member is required. - VPCRegion types.VPCRegion - - // (Optional) The maximum number of hosted zones that you want Amazon Route 53 to - // return. If the specified VPC is associated with more than MaxItems hosted - // zones, the response includes a NextToken element. NextToken contains an - // encrypted token that identifies the first hosted zone that Route 53 will return - // if you submit another request. - MaxItems *int32 - - // If the previous response included a NextToken element, the specified VPC is - // associated with more hosted zones. To get more hosted zones, submit another - // ListHostedZonesByVPC request. - // - // For the value of NextToken , specify the value of NextToken from the previous - // response. - // - // If the previous response didn't include a NextToken element, there are no more - // hosted zones to get. - NextToken *string - - noSmithyDocumentSerde -} - -type ListHostedZonesByVPCOutput struct { - - // A list that contains one HostedZoneSummary element for each hosted zone that - // the specified Amazon VPC is associated with. Each HostedZoneSummary element - // contains the hosted zone name and ID, and information about who owns the hosted - // zone. - // - // This member is required. - HostedZoneSummaries []types.HostedZoneSummary - - // The value that you specified for MaxItems in the most recent - // ListHostedZonesByVPC request. - // - // This member is required. - MaxItems *int32 - - // The value that you will use for NextToken in the next ListHostedZonesByVPC - // request. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListHostedZonesByVPCMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListHostedZonesByVPC{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListHostedZonesByVPC{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListHostedZonesByVPC"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListHostedZonesByVPCValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListHostedZonesByVPC(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListHostedZonesByVPC(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListHostedZonesByVPC", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go deleted file mode 100644 index 4582c8f212..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListQueryLoggingConfigs.go +++ /dev/null @@ -1,343 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the configurations for DNS query logging that are associated with the -// current Amazon Web Services account or the configuration that is associated with -// a specified hosted zone. -// -// For more information about DNS query logs, see [CreateQueryLoggingConfig]. Additional information, -// including the format of DNS query logs, appears in [Logging DNS Queries]in the Amazon Route 53 -// Developer Guide. -// -// [CreateQueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateQueryLoggingConfig.html -// [Logging DNS Queries]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/query-logs.html -func (c *Client) ListQueryLoggingConfigs(ctx context.Context, params *ListQueryLoggingConfigsInput, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) { - if params == nil { - params = &ListQueryLoggingConfigsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListQueryLoggingConfigs", params, optFns, c.addOperationListQueryLoggingConfigsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListQueryLoggingConfigsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListQueryLoggingConfigsInput struct { - - // (Optional) If you want to list the query logging configuration that is - // associated with a hosted zone, specify the ID in HostedZoneId . - // - // If you don't specify a hosted zone ID, ListQueryLoggingConfigs returns all of - // the configurations that are associated with the current Amazon Web Services - // account. - HostedZoneId *string - - // (Optional) The maximum number of query logging configurations that you want - // Amazon Route 53 to return in response to the current request. If the current - // Amazon Web Services account has more than MaxResults configurations, use the - // value of [NextToken]in the response to get the next page of results. - // - // If you don't specify a value for MaxResults , Route 53 returns up to 100 - // configurations. - // - // [NextToken]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax - MaxResults *int32 - - // (Optional) If the current Amazon Web Services account has more than MaxResults - // query logging configurations, use NextToken to get the second and subsequent - // pages of results. - // - // For the first ListQueryLoggingConfigs request, omit this value. - // - // For the second and subsequent requests, get the value of NextToken from the - // previous response and specify that value for NextToken in the request. - NextToken *string - - noSmithyDocumentSerde -} - -type ListQueryLoggingConfigsOutput struct { - - // An array that contains one [QueryLoggingConfig] element for each configuration for DNS query - // logging that is associated with the current Amazon Web Services account. - // - // [QueryLoggingConfig]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_QueryLoggingConfig.html - // - // This member is required. - QueryLoggingConfigs []types.QueryLoggingConfig - - // If a response includes the last of the query logging configurations that are - // associated with the current Amazon Web Services account, NextToken doesn't - // appear in the response. - // - // If a response doesn't include the last of the configurations, you can get more - // configurations by submitting another [ListQueryLoggingConfigs]request. Get the value of NextToken that - // Amazon Route 53 returned in the previous response and include it in NextToken - // in the next request. - // - // [ListQueryLoggingConfigs]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListQueryLoggingConfigsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListQueryLoggingConfigs{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListQueryLoggingConfigs{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListQueryLoggingConfigs"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListQueryLoggingConfigs(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListQueryLoggingConfigsPaginatorOptions is the paginator options for -// ListQueryLoggingConfigs -type ListQueryLoggingConfigsPaginatorOptions struct { - // (Optional) The maximum number of query logging configurations that you want - // Amazon Route 53 to return in response to the current request. If the current - // Amazon Web Services account has more than MaxResults configurations, use the - // value of [NextToken]in the response to get the next page of results. - // - // If you don't specify a value for MaxResults , Route 53 returns up to 100 - // configurations. - // - // [NextToken]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListQueryLoggingConfigs.html#API_ListQueryLoggingConfigs_RequestSyntax - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListQueryLoggingConfigsPaginator is a paginator for ListQueryLoggingConfigs -type ListQueryLoggingConfigsPaginator struct { - options ListQueryLoggingConfigsPaginatorOptions - client ListQueryLoggingConfigsAPIClient - params *ListQueryLoggingConfigsInput - nextToken *string - firstPage bool -} - -// NewListQueryLoggingConfigsPaginator returns a new -// ListQueryLoggingConfigsPaginator -func NewListQueryLoggingConfigsPaginator(client ListQueryLoggingConfigsAPIClient, params *ListQueryLoggingConfigsInput, optFns ...func(*ListQueryLoggingConfigsPaginatorOptions)) *ListQueryLoggingConfigsPaginator { - if params == nil { - params = &ListQueryLoggingConfigsInput{} - } - - options := ListQueryLoggingConfigsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListQueryLoggingConfigsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListQueryLoggingConfigsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListQueryLoggingConfigs page. -func (p *ListQueryLoggingConfigsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListQueryLoggingConfigs(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListQueryLoggingConfigsAPIClient is a client that implements the -// ListQueryLoggingConfigs operation. -type ListQueryLoggingConfigsAPIClient interface { - ListQueryLoggingConfigs(context.Context, *ListQueryLoggingConfigsInput, ...func(*Options)) (*ListQueryLoggingConfigsOutput, error) -} - -var _ ListQueryLoggingConfigsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListQueryLoggingConfigs(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListQueryLoggingConfigs", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go deleted file mode 100644 index 548d0d6ada..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListResourceRecordSets.go +++ /dev/null @@ -1,338 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the resource record sets in a specified hosted zone. -// -// ListResourceRecordSets returns up to 300 resource record sets at a time in -// ASCII order, beginning at a position specified by the name and type elements. -// -// # Sort order -// -// ListResourceRecordSets sorts results first by DNS name with the labels -// reversed, for example: -// -// com.example.www. -// -// Note the trailing dot, which can change the sort order when the record name -// contains characters that appear before . (decimal 46) in the ASCII table. These -// characters include the following: ! " # $ % & ' ( ) * + , - -// -// When multiple records have the same DNS name, ListResourceRecordSets sorts -// results by the record type. -// -// # Specifying where to start listing records -// -// You can use the name and type elements to specify the resource record set that -// the list begins with: -// -// If you do not specify Name or Type The results begin with the first resource -// record set that the hosted zone contains. -// -// If you specify Name but not Type The results begin with the first resource -// record set in the list whose name is greater than or equal to Name . -// -// If you specify Type but not Name Amazon Route 53 returns the InvalidInput error. -// -// If you specify both Name and Type The results begin with the first resource -// record set in the list whose name is greater than or equal to Name , and whose -// type is greater than or equal to Type . -// -// Type is only used to sort between records with the same record Name. -// -// # Resource record sets that are PENDING -// -// This action returns the most current version of the records. This includes -// records that are PENDING , and that are not yet available on all Route 53 DNS -// servers. -// -// # Changing resource record sets -// -// To ensure that you get an accurate listing of the resource record sets for a -// hosted zone at a point in time, do not submit a ChangeResourceRecordSets -// request while you're paging through the results of a ListResourceRecordSets -// request. If you do, some pages may display results without the latest changes -// while other pages display results with the latest changes. -// -// # Displaying the next page of results -// -// If a ListResourceRecordSets command returns more than one page of results, the -// value of IsTruncated is true . To display the next page of results, get the -// values of NextRecordName , NextRecordType , and NextRecordIdentifier (if any) -// from the response. Then submit another ListResourceRecordSets request, and -// specify those values for StartRecordName , StartRecordType , and -// StartRecordIdentifier . -func (c *Client) ListResourceRecordSets(ctx context.Context, params *ListResourceRecordSetsInput, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) { - if params == nil { - params = &ListResourceRecordSetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListResourceRecordSets", params, optFns, c.addOperationListResourceRecordSetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListResourceRecordSetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request for the resource record sets that are associated with a specified -// hosted zone. -type ListResourceRecordSetsInput struct { - - // The ID of the hosted zone that contains the resource record sets that you want - // to list. - // - // This member is required. - HostedZoneId *string - - // (Optional) The maximum number of resource records sets to include in the - // response body for this request. If the response includes more than maxitems - // resource record sets, the value of the IsTruncated element in the response is - // true , and the values of the NextRecordName and NextRecordType elements in the - // response identify the first resource record set in the next group of maxitems - // resource record sets. - MaxItems *int32 - - // Resource record sets that have a routing policy other than simple: If results - // were truncated for a given DNS name and type, specify the value of - // NextRecordIdentifier from the previous response to get the next resource record - // set that has the current DNS name and type. - StartRecordIdentifier *string - - // The first name in the lexicographic ordering of resource record sets that you - // want to list. If the specified record name doesn't exist, the results begin with - // the first resource record set that has a name greater than the value of name . - StartRecordName *string - - // The type of resource record set to begin the record listing from. - // - // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | MX | NAPTR - // | NS | PTR | SOA | SPF | SRV | TXT - // - // Values for weighted, latency, geolocation, and failover resource record sets: A - // | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT - // - // Values for alias resource record sets: - // - // - API Gateway custom regional API or edge-optimized API: A - // - // - CloudFront distribution: A or AAAA - // - // - Elastic Beanstalk environment that has a regionalized subdomain: A - // - // - Elastic Load Balancing load balancer: A | AAAA - // - // - S3 bucket: A - // - // - VPC interface VPC endpoint: A - // - // - Another resource record set in this hosted zone: The type of the resource - // record set that the alias references. - // - // Constraint: Specifying type without specifying name returns an InvalidInput - // error. - StartRecordType types.RRType - - noSmithyDocumentSerde -} - -// A complex type that contains list information for the resource record set. -type ListResourceRecordSetsOutput struct { - - // A flag that indicates whether more resource record sets remain to be listed. If - // your results were truncated, you can make a follow-up pagination request by - // using the NextRecordName element. - // - // This member is required. - IsTruncated bool - - // The maximum number of records you requested. - // - // This member is required. - MaxItems *int32 - - // Information about multiple resource record sets. - // - // This member is required. - ResourceRecordSets []types.ResourceRecordSet - - // Resource record sets that have a routing policy other than simple: If results - // were truncated for a given DNS name and type, the value of SetIdentifier for - // the next resource record set that has the current DNS name and type. - // - // For information about routing policies, see [Choosing a Routing Policy] in the Amazon Route 53 Developer - // Guide. - // - // [Choosing a Routing Policy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html - NextRecordIdentifier *string - - // If the results were truncated, the name of the next record in the list. - // - // This element is present only if IsTruncated is true. - NextRecordName *string - - // If the results were truncated, the type of the next record in the list. - // - // This element is present only if IsTruncated is true. - NextRecordType types.RRType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListResourceRecordSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListResourceRecordSets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListResourceRecordSets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceRecordSets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListResourceRecordSetsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceRecordSets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListResourceRecordSets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListResourceRecordSets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go deleted file mode 100644 index 72aff70213..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListReusableDelegationSets.go +++ /dev/null @@ -1,232 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves a list of the reusable delegation sets that are associated with the -// current Amazon Web Services account. -func (c *Client) ListReusableDelegationSets(ctx context.Context, params *ListReusableDelegationSetsInput, optFns ...func(*Options)) (*ListReusableDelegationSetsOutput, error) { - if params == nil { - params = &ListReusableDelegationSetsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListReusableDelegationSets", params, optFns, c.addOperationListReusableDelegationSetsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListReusableDelegationSetsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get a list of the reusable delegation sets that are associated -// with the current Amazon Web Services account. -type ListReusableDelegationSetsInput struct { - - // If the value of IsTruncated in the previous response was true , you have more - // reusable delegation sets. To get another group, submit another - // ListReusableDelegationSets request. - // - // For the value of marker , specify the value of NextMarker from the previous - // response, which is the ID of the first reusable delegation set that Amazon Route - // 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more reusable delegation sets to get. - Marker *string - - // The number of reusable delegation sets that you want Amazon Route 53 to return - // in the response to this request. If you specify a value greater than 100, Route - // 53 returns only the first 100 reusable delegation sets. - MaxItems *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains information about the reusable delegation sets -// that are associated with the current Amazon Web Services account. -type ListReusableDelegationSetsOutput struct { - - // A complex type that contains one DelegationSet element for each reusable - // delegation set that was created by the current Amazon Web Services account. - // - // This member is required. - DelegationSets []types.DelegationSet - - // A flag that indicates whether there are more reusable delegation sets to be - // listed. - // - // This member is required. - IsTruncated bool - - // For the second and subsequent calls to ListReusableDelegationSets , Marker is - // the value that you specified for the marker parameter in the request that - // produced the current response. - // - // This member is required. - Marker *string - - // The value that you specified for the maxitems parameter in the call to - // ListReusableDelegationSets that produced the current response. - // - // This member is required. - MaxItems *int32 - - // If IsTruncated is true , the value of NextMarker identifies the next reusable - // delegation set that Amazon Route 53 will return if you submit another - // ListReusableDelegationSets request and specify the value of NextMarker in the - // marker parameter. - NextMarker *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListReusableDelegationSetsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListReusableDelegationSets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListReusableDelegationSets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListReusableDelegationSets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListReusableDelegationSets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListReusableDelegationSets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListReusableDelegationSets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go deleted file mode 100644 index 8c034e752f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResource.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists tags for one health check or hosted zone. -// -// For information about using tags for cost allocation, see [Using Cost Allocation Tags] in the Billing and -// Cost Management User Guide. -// -// [Using Cost Allocation Tags]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html -func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { - if params == nil { - params = &ListTagsForResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type containing information about a request for a list of the tags -// that are associated with an individual resource. -type ListTagsForResourceInput struct { - - // The ID of the resource for which you want to retrieve tags. - // - // This member is required. - ResourceId *string - - // The type of the resource. - // - // - The resource type for health checks is healthcheck . - // - // - The resource type for hosted zones is hostedzone . - // - // This member is required. - ResourceType types.TagResourceType - - noSmithyDocumentSerde -} - -// A complex type that contains information about the health checks or hosted -// zones for which you want to list tags. -type ListTagsForResourceOutput struct { - - // A ResourceTagSet containing tags associated with the specified resource. - // - // This member is required. - ResourceTagSet *types.ResourceTagSet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForResource", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go deleted file mode 100644 index ca569d4668..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTagsForResources.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists tags for up to 10 health checks or hosted zones. -// -// For information about using tags for cost allocation, see [Using Cost Allocation Tags] in the Billing and -// Cost Management User Guide. -// -// [Using Cost Allocation Tags]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html -func (c *Client) ListTagsForResources(ctx context.Context, params *ListTagsForResourcesInput, optFns ...func(*Options)) (*ListTagsForResourcesOutput, error) { - if params == nil { - params = &ListTagsForResourcesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForResources", params, optFns, c.addOperationListTagsForResourcesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForResourcesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the health checks or hosted -// zones for which you want to list tags. -type ListTagsForResourcesInput struct { - - // A complex type that contains the ResourceId element for each resource for which - // you want to get a list of tags. - // - // This member is required. - ResourceIds []string - - // The type of the resources. - // - // - The resource type for health checks is healthcheck . - // - // - The resource type for hosted zones is hostedzone . - // - // This member is required. - ResourceType types.TagResourceType - - noSmithyDocumentSerde -} - -// A complex type containing tags for the specified resources. -type ListTagsForResourcesOutput struct { - - // A list of ResourceTagSet s containing tags associated with the specified - // resources. - // - // This member is required. - ResourceTagSets []types.ResourceTagSet - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTagsForResources{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTagsForResources{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResources"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListTagsForResourcesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResources(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForResources(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForResources", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go deleted file mode 100644 index f8b8313eb3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicies.go +++ /dev/null @@ -1,233 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the latest version for every traffic policy that is -// associated with the current Amazon Web Services account. Policies are listed in -// the order that they were created in. -// -// For information about how of deleting a traffic policy affects the response -// from ListTrafficPolicies , see [DeleteTrafficPolicy]. -// -// [DeleteTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html -func (c *Client) ListTrafficPolicies(ctx context.Context, params *ListTrafficPoliciesInput, optFns ...func(*Options)) (*ListTrafficPoliciesOutput, error) { - if params == nil { - params = &ListTrafficPoliciesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicies", params, optFns, c.addOperationListTrafficPoliciesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTrafficPoliciesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains the information about the request to list the -// traffic policies that are associated with the current Amazon Web Services -// account. -type ListTrafficPoliciesInput struct { - - // (Optional) The maximum number of traffic policies that you want Amazon Route 53 - // to return in response to this request. If you have more than MaxItems traffic - // policies, the value of IsTruncated in the response is true , and the value of - // TrafficPolicyIdMarker is the ID of the first traffic policy that Route 53 will - // return if you submit another request. - MaxItems *int32 - - // (Conditional) For your first request to ListTrafficPolicies , don't include the - // TrafficPolicyIdMarker parameter. - // - // If you have more traffic policies than the value of MaxItems , - // ListTrafficPolicies returns only the first MaxItems traffic policies. To get - // the next group of policies, submit another request to ListTrafficPolicies . For - // the value of TrafficPolicyIdMarker , specify the value of TrafficPolicyIdMarker - // that was returned in the previous response. - TrafficPolicyIdMarker *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListTrafficPoliciesOutput struct { - - // A flag that indicates whether there are more traffic policies to be listed. If - // the response was truncated, you can get the next group of traffic policies by - // submitting another ListTrafficPolicies request and specifying the value of - // TrafficPolicyIdMarker in the TrafficPolicyIdMarker request parameter. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the MaxItems parameter in the - // ListTrafficPolicies request that produced the current response. - // - // This member is required. - MaxItems *int32 - - // If the value of IsTruncated is true , TrafficPolicyIdMarker is the ID of the - // first traffic policy in the next group of MaxItems traffic policies. - // - // This member is required. - TrafficPolicyIdMarker *string - - // A list that contains one TrafficPolicySummary element for each traffic policy - // that was created by the current Amazon Web Services account. - // - // This member is required. - TrafficPolicySummaries []types.TrafficPolicySummary - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTrafficPoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicies{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicies{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTrafficPolicies"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicies(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTrafficPolicies(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTrafficPolicies", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go deleted file mode 100644 index 39d7c2b497..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstances.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the traffic policy instances that you created by using -// the current Amazon Web Services account. -// -// After you submit an UpdateTrafficPolicyInstance request, there's a brief delay -// while Amazon Route 53 creates the resource record sets that are specified in the -// traffic policy definition. For more information, see the State response element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot of -// traffic policy instances, you can use the MaxItems parameter to list them in -// groups of up to 100. -func (c *Client) ListTrafficPolicyInstances(ctx context.Context, params *ListTrafficPolicyInstancesInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesOutput, error) { - if params == nil { - params = &ListTrafficPolicyInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstances", params, optFns, c.addOperationListTrafficPolicyInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTrafficPolicyInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to get information about the traffic policy instances that you -// created by using the current Amazon Web Services account. -type ListTrafficPolicyInstancesInput struct { - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of HostedZoneId , specify the - // value of HostedZoneIdMarker from the previous response, which is the hosted - // zone ID of the first traffic policy instance in the next group of traffic policy - // instances. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - HostedZoneIdMarker *string - - // The maximum number of traffic policy instances that you want Amazon Route 53 to - // return in response to a ListTrafficPolicyInstances request. If you have more - // than MaxItems traffic policy instances, the value of the IsTruncated element in - // the response is true , and the values of HostedZoneIdMarker , - // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker represent - // the first traffic policy instance in the next group of MaxItems traffic policy - // instances. - MaxItems *int32 - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename , - // specify the value of TrafficPolicyInstanceNameMarker from the previous - // response, which is the name of the first traffic policy instance in the next - // group of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype , - // specify the value of TrafficPolicyInstanceTypeMarker from the previous - // response, which is the type of the first traffic policy instance in the next - // group of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker types.RRType - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesOutput struct { - - // A flag that indicates whether there are more traffic policy instances to be - // listed. If the response was truncated, you can get more traffic policy instances - // by calling ListTrafficPolicyInstances again and specifying the values of the - // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and - // TrafficPolicyInstanceTypeMarker in the corresponding request parameters. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the MaxItems parameter in the call to - // ListTrafficPolicyInstances that produced the current response. - // - // This member is required. - MaxItems *int32 - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // This member is required. - TrafficPolicyInstances []types.TrafficPolicyInstance - - // If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the - // first traffic policy instance that Route 53 will return if you submit another - // ListTrafficPolicyInstances request. - HostedZoneIdMarker *string - - // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance that Route 53 will return if you submit another - // ListTrafficPolicyInstances request. - TrafficPolicyInstanceNameMarker *string - - // If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the - // resource record sets that are associated with the first traffic policy instance - // that Amazon Route 53 will return if you submit another - // ListTrafficPolicyInstances request. - TrafficPolicyInstanceTypeMarker types.RRType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTrafficPolicyInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTrafficPolicyInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTrafficPolicyInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTrafficPolicyInstances", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go deleted file mode 100644 index 922c52fdce..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByHostedZone.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the traffic policy instances that you created in a -// specified hosted zone. -// -// After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request, there's a brief delay while Amazon Route 53 creates the resource record -// sets that are specified in the traffic policy definition. For more information, -// see the State response element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot of -// traffic policy instances, you can use the MaxItems parameter to list them in -// groups of up to 100. -func (c *Client) ListTrafficPolicyInstancesByHostedZone(ctx context.Context, params *ListTrafficPolicyInstancesByHostedZoneInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByHostedZoneOutput, error) { - if params == nil { - params = &ListTrafficPolicyInstancesByHostedZoneInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByHostedZone", params, optFns, c.addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTrafficPolicyInstancesByHostedZoneOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request for the traffic policy instances that you created in a specified -// hosted zone. -type ListTrafficPolicyInstancesByHostedZoneInput struct { - - // The ID of the hosted zone that you want to list traffic policy instances for. - // - // This member is required. - HostedZoneId *string - - // The maximum number of traffic policy instances to be included in the response - // body for this request. If you have more than MaxItems traffic policy instances, - // the value of the IsTruncated element in the response is true , and the values of - // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and - // TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that - // Amazon Route 53 will return if you submit another request. - MaxItems *int32 - - // If the value of IsTruncated in the previous response is true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancename , - // specify the value of TrafficPolicyInstanceNameMarker from the previous - // response, which is the name of the first traffic policy instance in the next - // group of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string - - // If the value of IsTruncated in the previous response is true, you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstances request. For the value of trafficpolicyinstancetype , - // specify the value of TrafficPolicyInstanceTypeMarker from the previous - // response, which is the type of the first traffic policy instance in the next - // group of traffic policy instances. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker types.RRType - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesByHostedZoneOutput struct { - - // A flag that indicates whether there are more traffic policy instances to be - // listed. If the response was truncated, you can get the next group of traffic - // policy instances by submitting another ListTrafficPolicyInstancesByHostedZone - // request and specifying the values of HostedZoneIdMarker , - // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker in the - // corresponding request parameters. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the MaxItems parameter in the - // ListTrafficPolicyInstancesByHostedZone request that produced the current - // response. - // - // This member is required. - MaxItems *int32 - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // This member is required. - TrafficPolicyInstances []types.TrafficPolicyInstance - - // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance in the next group of traffic policy instances. - TrafficPolicyInstanceNameMarker *string - - // If IsTruncated is true, TrafficPolicyInstanceTypeMarker is the DNS type of the - // resource record sets that are associated with the first traffic policy instance - // in the next group of traffic policy instances. - TrafficPolicyInstanceTypeMarker types.RRType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTrafficPolicyInstancesByHostedZoneMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTrafficPolicyInstancesByHostedZone"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByHostedZone(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTrafficPolicyInstancesByHostedZone", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go deleted file mode 100644 index 0277994445..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyInstancesByPolicy.go +++ /dev/null @@ -1,293 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about the traffic policy instances that you created by using a -// specify traffic policy version. -// -// After you submit a CreateTrafficPolicyInstance or an UpdateTrafficPolicyInstance -// request, there's a brief delay while Amazon Route 53 creates the resource record -// sets that are specified in the traffic policy definition. For more information, -// see the State response element. -// -// Route 53 returns a maximum of 100 items in each response. If you have a lot of -// traffic policy instances, you can use the MaxItems parameter to list them in -// groups of up to 100. -func (c *Client) ListTrafficPolicyInstancesByPolicy(ctx context.Context, params *ListTrafficPolicyInstancesByPolicyInput, optFns ...func(*Options)) (*ListTrafficPolicyInstancesByPolicyOutput, error) { - if params == nil { - params = &ListTrafficPolicyInstancesByPolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyInstancesByPolicy", params, optFns, c.addOperationListTrafficPolicyInstancesByPolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTrafficPolicyInstancesByPolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains the information about the request to list your -// traffic policy instances. -type ListTrafficPolicyInstancesByPolicyInput struct { - - // The ID of the traffic policy for which you want to list traffic policy - // instances. - // - // This member is required. - TrafficPolicyId *string - - // The version of the traffic policy for which you want to list traffic policy - // instances. The version must be associated with the traffic policy that is - // specified by TrafficPolicyId . - // - // This member is required. - TrafficPolicyVersion *int32 - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of hostedzoneid , specify the value of HostedZoneIdMarker from - // the previous response, which is the hosted zone ID of the first traffic policy - // instance that Amazon Route 53 will return if you submit another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - HostedZoneIdMarker *string - - // The maximum number of traffic policy instances to be included in the response - // body for this request. If you have more than MaxItems traffic policy instances, - // the value of the IsTruncated element in the response is true , and the values of - // HostedZoneIdMarker , TrafficPolicyInstanceNameMarker , and - // TrafficPolicyInstanceTypeMarker represent the first traffic policy instance that - // Amazon Route 53 will return if you submit another request. - MaxItems *int32 - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of trafficpolicyinstancename , specify the value of - // TrafficPolicyInstanceNameMarker from the previous response, which is the name of - // the first traffic policy instance that Amazon Route 53 will return if you submit - // another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceNameMarker *string - - // If the value of IsTruncated in the previous response was true , you have more - // traffic policy instances. To get more traffic policy instances, submit another - // ListTrafficPolicyInstancesByPolicy request. - // - // For the value of trafficpolicyinstancetype , specify the value of - // TrafficPolicyInstanceTypeMarker from the previous response, which is the name of - // the first traffic policy instance that Amazon Route 53 will return if you submit - // another request. - // - // If the value of IsTruncated in the previous response was false , there are no - // more traffic policy instances to get. - TrafficPolicyInstanceTypeMarker types.RRType - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyInstancesByPolicyOutput struct { - - // A flag that indicates whether there are more traffic policy instances to be - // listed. If the response was truncated, you can get the next group of traffic - // policy instances by calling ListTrafficPolicyInstancesByPolicy again and - // specifying the values of the HostedZoneIdMarker , - // TrafficPolicyInstanceNameMarker , and TrafficPolicyInstanceTypeMarker elements - // in the corresponding request parameters. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the MaxItems parameter in the call to - // ListTrafficPolicyInstancesByPolicy that produced the current response. - // - // This member is required. - MaxItems *int32 - - // A list that contains one TrafficPolicyInstance element for each traffic policy - // instance that matches the elements in the request. - // - // This member is required. - TrafficPolicyInstances []types.TrafficPolicyInstance - - // If IsTruncated is true , HostedZoneIdMarker is the ID of the hosted zone of the - // first traffic policy instance in the next group of traffic policy instances. - HostedZoneIdMarker *string - - // If IsTruncated is true , TrafficPolicyInstanceNameMarker is the name of the - // first traffic policy instance in the next group of MaxItems traffic policy - // instances. - TrafficPolicyInstanceNameMarker *string - - // If IsTruncated is true , TrafficPolicyInstanceTypeMarker is the DNS type of the - // resource record sets that are associated with the first traffic policy instance - // in the next group of MaxItems traffic policy instances. - TrafficPolicyInstanceTypeMarker types.RRType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTrafficPolicyInstancesByPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTrafficPolicyInstancesByPolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTrafficPolicyInstancesByPolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTrafficPolicyInstancesByPolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go deleted file mode 100644 index 03257862c9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListTrafficPolicyVersions.go +++ /dev/null @@ -1,240 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets information about all of the versions for a specified traffic policy. -// -// Traffic policy versions are listed in numerical order by VersionNumber . -func (c *Client) ListTrafficPolicyVersions(ctx context.Context, params *ListTrafficPolicyVersionsInput, optFns ...func(*Options)) (*ListTrafficPolicyVersionsOutput, error) { - if params == nil { - params = &ListTrafficPolicyVersionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTrafficPolicyVersions", params, optFns, c.addOperationListTrafficPolicyVersionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTrafficPolicyVersionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains the information about the request to list your -// traffic policies. -type ListTrafficPolicyVersionsInput struct { - - // Specify the value of Id of the traffic policy for which you want to list all - // versions. - // - // This member is required. - Id *string - - // The maximum number of traffic policy versions that you want Amazon Route 53 to - // include in the response body for this request. If the specified traffic policy - // has more than MaxItems versions, the value of IsTruncated in the response is - // true , and the value of the TrafficPolicyVersionMarker element is the ID of the - // first version that Route 53 will return if you submit another request. - MaxItems *int32 - - // For your first request to ListTrafficPolicyVersions , don't include the - // TrafficPolicyVersionMarker parameter. - // - // If you have more traffic policy versions than the value of MaxItems , - // ListTrafficPolicyVersions returns only the first group of MaxItems versions. To - // get more traffic policy versions, submit another ListTrafficPolicyVersions - // request. For the value of TrafficPolicyVersionMarker , specify the value of - // TrafficPolicyVersionMarker in the previous response. - TrafficPolicyVersionMarker *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListTrafficPolicyVersionsOutput struct { - - // A flag that indicates whether there are more traffic policies to be listed. If - // the response was truncated, you can get the next group of traffic policies by - // submitting another ListTrafficPolicyVersions request and specifying the value - // of NextMarker in the marker parameter. - // - // This member is required. - IsTruncated bool - - // The value that you specified for the maxitems parameter in the - // ListTrafficPolicyVersions request that produced the current response. - // - // This member is required. - MaxItems *int32 - - // A list that contains one TrafficPolicy element for each traffic policy version - // that is associated with the specified traffic policy. - // - // This member is required. - TrafficPolicies []types.TrafficPolicy - - // If IsTruncated is true , the value of TrafficPolicyVersionMarker identifies the - // first traffic policy that Amazon Route 53 will return if you submit another - // request. Call ListTrafficPolicyVersions again and specify the value of - // TrafficPolicyVersionMarker in the TrafficPolicyVersionMarker request parameter. - // - // This element is present only if IsTruncated is true . - // - // This member is required. - TrafficPolicyVersionMarker *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTrafficPolicyVersionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListTrafficPolicyVersions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListTrafficPolicyVersions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTrafficPolicyVersions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListTrafficPolicyVersionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTrafficPolicyVersions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTrafficPolicyVersions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTrafficPolicyVersions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go deleted file mode 100644 index be579fc8bb..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_ListVPCAssociationAuthorizations.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets a list of the VPCs that were created by other accounts and that can be -// associated with a specified hosted zone because you've submitted one or more -// CreateVPCAssociationAuthorization requests. -// -// The response includes a VPCs element with a VPC child element for each VPC that -// can be associated with the hosted zone. -func (c *Client) ListVPCAssociationAuthorizations(ctx context.Context, params *ListVPCAssociationAuthorizationsInput, optFns ...func(*Options)) (*ListVPCAssociationAuthorizationsOutput, error) { - if params == nil { - params = &ListVPCAssociationAuthorizationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListVPCAssociationAuthorizations", params, optFns, c.addOperationListVPCAssociationAuthorizationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListVPCAssociationAuthorizationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about that can be associated with your -// hosted zone. -type ListVPCAssociationAuthorizationsInput struct { - - // The ID of the hosted zone for which you want a list of VPCs that can be - // associated with the hosted zone. - // - // This member is required. - HostedZoneId *string - - // Optional: An integer that specifies the maximum number of VPCs that you want - // Amazon Route 53 to return. If you don't specify a value for MaxResults , Route - // 53 returns up to 50 VPCs per page. - MaxResults *int32 - - // Optional: If a response includes a NextToken element, there are more VPCs that - // can be associated with the specified hosted zone. To get the next page of - // results, submit another request, and include the value of NextToken from the - // response in the nexttoken parameter in another ListVPCAssociationAuthorizations - // request. - NextToken *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the request. -type ListVPCAssociationAuthorizationsOutput struct { - - // The ID of the hosted zone that you can associate the listed VPCs with. - // - // This member is required. - HostedZoneId *string - - // The list of VPCs that are authorized to be associated with the specified hosted - // zone. - // - // This member is required. - VPCs []types.VPC - - // When the response includes a NextToken element, there are more VPCs that can be - // associated with the specified hosted zone. To get the next page of VPCs, submit - // another ListVPCAssociationAuthorizations request, and include the value of the - // NextToken element from the response in the nexttoken request parameter. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListVPCAssociationAuthorizationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpListVPCAssociationAuthorizations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpListVPCAssociationAuthorizations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListVPCAssociationAuthorizations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListVPCAssociationAuthorizationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListVPCAssociationAuthorizations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListVPCAssociationAuthorizations", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go deleted file mode 100644 index b35cd88dda..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_TestDNSAnswer.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the value that Amazon Route 53 returns in response to a DNS request for a -// specified record name and type. You can optionally specify the IP address of a -// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. -// -// This call only supports querying public hosted zones. -// -// The TestDnsAnswer returns information similar to what you would expect from -// the answer section of the dig command. Therefore, if you query for the name -// servers of a subdomain that point to the parent name servers, those will not be -// returned. -func (c *Client) TestDNSAnswer(ctx context.Context, params *TestDNSAnswerInput, optFns ...func(*Options)) (*TestDNSAnswerOutput, error) { - if params == nil { - params = &TestDNSAnswerInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TestDNSAnswer", params, optFns, c.addOperationTestDNSAnswerMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TestDNSAnswerOutput) - out.ResultMetadata = metadata - return out, nil -} - -// Gets the value that Amazon Route 53 returns in response to a DNS request for a -// specified record name and type. You can optionally specify the IP address of a -// DNS resolver, an EDNS0 client subnet IP address, and a subnet mask. -type TestDNSAnswerInput struct { - - // The ID of the hosted zone that you want Amazon Route 53 to simulate a query for. - // - // This member is required. - HostedZoneId *string - - // The name of the resource record set that you want Amazon Route 53 to simulate a - // query for. - // - // This member is required. - RecordName *string - - // The type of the resource record set. - // - // This member is required. - RecordType types.RRType - - // If the resolver that you specified for resolverip supports EDNS0, specify the - // IPv4 or IPv6 address of a client in the applicable location, for example, - // 192.0.2.44 or 2001:db8:85a3::8a2e:370:7334 . - EDNS0ClientSubnetIP *string - - // If you specify an IP address for edns0clientsubnetip , you can optionally - // specify the number of bits of the IP address that you want the checking tool to - // include in the DNS query. For example, if you specify 192.0.2.44 for - // edns0clientsubnetip and 24 for edns0clientsubnetmask , the checking tool will - // simulate a request from 192.0.2.0/24. The default value is 24 bits for IPv4 - // addresses and 64 bits for IPv6 addresses. - // - // The range of valid values depends on whether edns0clientsubnetip is an IPv4 or - // an IPv6 address: - // - // - IPv4: Specify a value between 0 and 32 - // - // - IPv6: Specify a value between 0 and 128 - EDNS0ClientSubnetMask *string - - // If you want to simulate a request from a specific DNS resolver, specify the IP - // address for that resolver. If you omit this value, TestDnsAnswer uses the IP - // address of a DNS resolver in the Amazon Web Services US East (N. Virginia) - // Region ( us-east-1 ). - ResolverIP *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to a TestDNSAnswer request. -type TestDNSAnswerOutput struct { - - // The Amazon Route 53 name server used to respond to the request. - // - // This member is required. - Nameserver *string - - // The protocol that Amazon Route 53 used to respond to the request, either UDP or - // TCP . - // - // This member is required. - Protocol *string - - // A list that contains values that Amazon Route 53 returned for this resource - // record set. - // - // This member is required. - RecordData []string - - // The name of the resource record set that you submitted a request for. - // - // This member is required. - RecordName *string - - // The type of the resource record set that you submitted a request for. - // - // This member is required. - RecordType types.RRType - - // A code that indicates whether the request is valid or not. The most common - // response code is NOERROR , meaning that the request is valid. If the response is - // not valid, Amazon Route 53 returns a response code that describes the error. For - // a list of possible response codes, see [DNS RCODES]on the IANA website. - // - // [DNS RCODES]: http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6 - // - // This member is required. - ResponseCode *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTestDNSAnswerMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpTestDNSAnswer{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpTestDNSAnswer{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TestDNSAnswer"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpTestDNSAnswerValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTestDNSAnswer(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTestDNSAnswer(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TestDNSAnswer", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go deleted file mode 100644 index 4b6a9100b0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHealthCheck.go +++ /dev/null @@ -1,479 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates an existing health check. Note that some values can't be updated. -// -// For more information about updating health checks, see [Creating, Updating, and Deleting Health Checks] in the Amazon Route 53 -// Developer Guide. -// -// [Creating, Updating, and Deleting Health Checks]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/health-checks-creating-deleting.html -func (c *Client) UpdateHealthCheck(ctx context.Context, params *UpdateHealthCheckInput, optFns ...func(*Options)) (*UpdateHealthCheckOutput, error) { - if params == nil { - params = &UpdateHealthCheckInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateHealthCheck", params, optFns, c.addOperationUpdateHealthCheckMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateHealthCheckOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about a request to update a health -// check. -type UpdateHealthCheckInput struct { - - // The ID for the health check for which you want detailed information. When you - // created the health check, CreateHealthCheck returned the ID in the response, in - // the HealthCheckId element. - // - // This member is required. - HealthCheckId *string - - // A complex type that identifies the CloudWatch alarm that you want Amazon Route - // 53 health checkers to use to determine whether the specified health check is - // healthy. - AlarmIdentifier *types.AlarmIdentifier - - // A complex type that contains one ChildHealthCheck element for each health check - // that you want to associate with a CALCULATED health check. - ChildHealthChecks []string - - // Stops Route 53 from performing health checks. When you disable a health check, - // here's what happens: - // - // - Health checks that check the health of endpoints: Route 53 stops submitting - // requests to your application, server, or other resource. - // - // - Calculated health checks: Route 53 stops aggregating the status of the - // referenced health checks. - // - // - Health checks that monitor CloudWatch alarms: Route 53 stops monitoring the - // corresponding CloudWatch metrics. - // - // After you disable a health check, Route 53 considers the status of the health - // check to always be healthy. If you configured DNS failover, Route 53 continues - // to route traffic to the corresponding resources. Additionally, in disabled - // state, you can also invert the status of the health check to route traffic - // differently. For more information, see [Inverted]. - // - // Charges for a health check still apply when the health check is disabled. For - // more information, see [Amazon Route 53 Pricing]. - // - // [Inverted]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-Inverted - // [Amazon Route 53 Pricing]: http://aws.amazon.com/route53/pricing/ - Disabled *bool - - // Specify whether you want Amazon Route 53 to send the value of - // FullyQualifiedDomainName to the endpoint in the client_hello message during TLS - // negotiation. This allows the endpoint to respond to HTTPS health check requests - // with the applicable SSL/TLS certificate. - // - // Some endpoints require that HTTPS requests include the host name in the - // client_hello message. If you don't enable SNI, the status of the health check - // will be SSL alert handshake_failure . A health check can also have that status - // for other reasons. If SNI is enabled and you're still getting the error, check - // the SSL/TLS configuration on your endpoint and confirm that your certificate is - // valid. - // - // The SSL/TLS certificate on your endpoint includes a domain name in the Common - // Name field and possibly several more in the Subject Alternative Names field. - // One of the domain names in the certificate should match the value that you - // specify for FullyQualifiedDomainName . If the endpoint responds to the - // client_hello message with a certificate that does not include the domain name - // that you specified in FullyQualifiedDomainName , a health checker will retry the - // handshake. In the second attempt, the health checker will omit - // FullyQualifiedDomainName from the client_hello message. - EnableSNI *bool - - // The number of consecutive health checks that an endpoint must pass or fail for - // Amazon Route 53 to change the current status of the endpoint from unhealthy to - // healthy or vice versa. For more information, see [How Amazon Route 53 Determines Whether an Endpoint Is Healthy]in the Amazon Route 53 - // Developer Guide. - // - // If you don't specify a value for FailureThreshold , the default value is three - // health checks. - // - // [How Amazon Route 53 Determines Whether an Endpoint Is Healthy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html - FailureThreshold *int32 - - // Amazon Route 53 behavior depends on whether you specify a value for IPAddress . - // - // If a health check already has a value for IPAddress , you can change the value. - // However, you can't update an existing health check to add or remove the value of - // IPAddress . - // - // If you specify a value for IPAddress : - // - // Route 53 sends health check requests to the specified IPv4 or IPv6 address and - // passes the value of FullyQualifiedDomainName in the Host header for all health - // checks except TCP health checks. This is typically the fully qualified DNS name - // of the endpoint on which you want Route 53 to perform health checks. - // - // When Route 53 checks the health of an endpoint, here is how it constructs the - // Host header: - // - // - If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , - // Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the - // Host header. - // - // - If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type - // , Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the - // Host header. - // - // - If you specify another value for Port and any value except TCP for Type , - // Route 53 passes FullyQualifiedDomainName : Port to the endpoint in the Host - // header. - // - // If you don't specify a value for FullyQualifiedDomainName , Route 53 substitutes - // the value of IPAddress in the Host header in each of the above cases. - // - // If you don't specify a value for IPAddress : - // - // If you don't specify a value for IPAddress , Route 53 sends a DNS request to the - // domain that you specify in FullyQualifiedDomainName at the interval you specify - // in RequestInterval . Using an IPv4 address that is returned by DNS, Route 53 - // then checks the health of the endpoint. - // - // If you don't specify a value for IPAddress , you can’t update the health check - // to remove the FullyQualifiedDomainName ; if you don’t specify a value for - // IPAddress on creation, a FullyQualifiedDomainName is required. - // - // If you don't specify a value for IPAddress , Route 53 uses only IPv4 to send - // health checks to the endpoint. If there's no resource record set with a type of - // A for the name that you specify for FullyQualifiedDomainName , the health check - // fails with a "DNS resolution failed" error. - // - // If you want to check the health of weighted, latency, or failover resource - // record sets and you choose to specify the endpoint only by - // FullyQualifiedDomainName , we recommend that you create a separate health check - // for each endpoint. For example, create a health check for each HTTP server that - // is serving content for www.example.com. For the value of - // FullyQualifiedDomainName , specify the domain name of the server (such as - // us-east-2-www.example.com ), not the name of the resource record sets - // (www.example.com). - // - // In this configuration, if the value of FullyQualifiedDomainName matches the - // name of the resource record sets and you then associate the health check with - // those resource record sets, health check results will be unpredictable. - // - // In addition, if the value of Type is HTTP , HTTPS , HTTP_STR_MATCH , or - // HTTPS_STR_MATCH , Route 53 passes the value of FullyQualifiedDomainName in the - // Host header, as it does when you specify a value for IPAddress . If the value of - // Type is TCP , Route 53 doesn't pass a Host header. - FullyQualifiedDomainName *string - - // A sequential counter that Amazon Route 53 sets to 1 when you create a health - // check and increments by 1 each time you update settings for the health check. - // - // We recommend that you use GetHealthCheck or ListHealthChecks to get the current - // value of HealthCheckVersion for the health check that you want to update, and - // that you include that value in your UpdateHealthCheck request. This prevents - // Route 53 from overwriting an intervening update: - // - // - If the value in the UpdateHealthCheck request matches the value of - // HealthCheckVersion in the health check, Route 53 updates the health check with - // the new settings. - // - // - If the value of HealthCheckVersion in the health check is greater, the - // health check was changed after you got the version number. Route 53 does not - // update the health check, and it returns a HealthCheckVersionMismatch error. - HealthCheckVersion *int64 - - // The number of child health checks that are associated with a CALCULATED health - // that Amazon Route 53 must consider healthy for the CALCULATED health check to - // be considered healthy. To specify the child health checks that you want to - // associate with a CALCULATED health check, use the ChildHealthChecks and - // ChildHealthCheck elements. - // - // Note the following: - // - // - If you specify a number greater than the number of child health checks, - // Route 53 always considers this health check to be unhealthy. - // - // - If you specify 0 , Route 53 always considers this health check to be healthy. - HealthThreshold *int32 - - // The IPv4 or IPv6 IP address for the endpoint that you want Amazon Route 53 to - // perform health checks on. If you don't specify a value for IPAddress , Route 53 - // sends a DNS request to resolve the domain name that you specify in - // FullyQualifiedDomainName at the interval that you specify in RequestInterval . - // Using an IP address that is returned by DNS, Route 53 then checks the health of - // the endpoint. - // - // Use one of the following formats for the value of IPAddress : - // - // - IPv4 address: four values between 0 and 255, separated by periods (.), for - // example, 192.0.2.44 . - // - // - IPv6 address: eight groups of four hexadecimal values, separated by colons - // (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also - // shorten IPv6 addresses as described in RFC 5952, for example, - // 2001:db8:85a3::abcd:1:2345 . - // - // If the endpoint is an EC2 instance, we recommend that you create an Elastic IP - // address, associate it with your EC2 instance, and specify the Elastic IP address - // for IPAddress . This ensures that the IP address of your instance never changes. - // For more information, see the applicable documentation: - // - // - Linux: [Elastic IP Addresses (EIP)]in the Amazon EC2 User Guide for Linux Instances - // - // - Windows: [Elastic IP Addresses (EIP)]in the Amazon EC2 User Guide for Windows Instances - // - // If a health check already has a value for IPAddress , you can change the value. - // However, you can't update an existing health check to add or remove the value of - // IPAddress . - // - // For more information, see [FullyQualifiedDomainName]. - // - // Constraints: Route 53 can't check the health of endpoints for which the IP - // address is in local, private, non-routable, or multicast ranges. For more - // information about IP addresses for which you can't create health checks, see the - // following documents: - // - // [RFC 5735, Special Use IPv4 Addresses] - // - // [RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space] - // - // [RFC 5156, Special-Use IPv6 Addresses] - // - // [RFC 5735, Special Use IPv4 Addresses]: https://tools.ietf.org/html/rfc5735 - // [FullyQualifiedDomainName]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName - // [Elastic IP Addresses (EIP)]: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-ip-addresses-eip.html - // [RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space]: https://tools.ietf.org/html/rfc6598 - // [RFC 5156, Special-Use IPv6 Addresses]: https://tools.ietf.org/html/rfc5156 - IPAddress *string - - // When CloudWatch has insufficient data about the metric to determine the alarm - // state, the status that you want Amazon Route 53 to assign to the health check: - // - // - Healthy : Route 53 considers the health check to be healthy. - // - // - Unhealthy : Route 53 considers the health check to be unhealthy. - // - // - LastKnownStatus : By default, Route 53 uses the status of the health check - // from the last time CloudWatch had sufficient data to determine the alarm state. - // For new health checks that have no last known status, the status for the health - // check is healthy. - InsufficientDataHealthStatus types.InsufficientDataHealthStatus - - // Specify whether you want Amazon Route 53 to invert the status of a health - // check, for example, to consider a health check unhealthy when it otherwise would - // be considered healthy. - Inverted *bool - - // The port on the endpoint that you want Amazon Route 53 to perform health checks - // on. - // - // Don't specify a value for Port when you specify a value for Type of - // CLOUDWATCH_METRIC or CALCULATED . - Port *int32 - - // A complex type that contains one Region element for each region that you want - // Amazon Route 53 health checkers to check the specified endpoint from. - Regions []types.HealthCheckRegion - - // A complex type that contains one ResettableElementName element for each element - // that you want to reset to the default value. Valid values for - // ResettableElementName include the following: - // - // - ChildHealthChecks : Amazon Route 53 resets [ChildHealthChecks]to null. - // - // - FullyQualifiedDomainName : Route 53 resets [FullyQualifiedDomainName]. to null. - // - // - Regions : Route 53 resets the [Regions]list to the default set of regions. - // - // - ResourcePath : Route 53 resets [ResourcePath]to null. - // - // [ResourcePath]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ResourcePath - // [ChildHealthChecks]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-ChildHealthChecks - // [FullyQualifiedDomainName]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName - // [Regions]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions - ResetElements []types.ResettableElementName - - // The path that you want Amazon Route 53 to request when performing health - // checks. The path can be any value for which your endpoint will return an HTTP - // status code of 2xx or 3xx when the endpoint is healthy, for example the file - // /docs/route53-health-check.html. You can also include query string parameters, - // for example, /welcome.html?language=jp&login=y . - // - // Specify this value only if you want to change it. - ResourcePath *string - - // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH , the string that you - // want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Route 53 considers the - // resource healthy. (You can't change the value of Type when you update a health - // check.) - SearchString *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to the UpdateHealthCheck request. -type UpdateHealthCheckOutput struct { - - // A complex type that contains the response to an UpdateHealthCheck request. - // - // This member is required. - HealthCheck *types.HealthCheck - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateHealthCheckMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHealthCheck{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHealthCheck{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateHealthCheck"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUpdateHealthCheckValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHealthCheck(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateHealthCheck(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateHealthCheck", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go deleted file mode 100644 index 54a805dafe..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateHostedZoneComment.go +++ /dev/null @@ -1,203 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the comment for a specified hosted zone. -func (c *Client) UpdateHostedZoneComment(ctx context.Context, params *UpdateHostedZoneCommentInput, optFns ...func(*Options)) (*UpdateHostedZoneCommentOutput, error) { - if params == nil { - params = &UpdateHostedZoneCommentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateHostedZoneComment", params, optFns, c.addOperationUpdateHostedZoneCommentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateHostedZoneCommentOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A request to update the comment for a hosted zone. -type UpdateHostedZoneCommentInput struct { - - // The ID for the hosted zone that you want to update the comment for. - // - // This member is required. - Id *string - - // The new comment for the hosted zone. If you don't specify a value for Comment , - // Amazon Route 53 deletes the existing value of the Comment element, if any. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains the response to the UpdateHostedZoneComment -// request. -type UpdateHostedZoneCommentOutput struct { - - // A complex type that contains the response to the UpdateHostedZoneComment - // request. - // - // This member is required. - HostedZone *types.HostedZone - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateHostedZoneCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateHostedZoneComment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateHostedZoneComment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateHostedZoneComment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUpdateHostedZoneCommentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateHostedZoneComment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addSanitizeURLMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateHostedZoneComment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateHostedZoneComment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go deleted file mode 100644 index e9529c9363..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyComment.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the comment for a specified traffic policy version. -func (c *Client) UpdateTrafficPolicyComment(ctx context.Context, params *UpdateTrafficPolicyCommentInput, optFns ...func(*Options)) (*UpdateTrafficPolicyCommentOutput, error) { - if params == nil { - params = &UpdateTrafficPolicyCommentInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyComment", params, optFns, c.addOperationUpdateTrafficPolicyCommentMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateTrafficPolicyCommentOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the traffic policy that you want -// to update the comment for. -type UpdateTrafficPolicyCommentInput struct { - - // The new comment for the specified traffic policy and version. - // - // This member is required. - Comment *string - - // The value of Id for the traffic policy that you want to update the comment for. - // - // This member is required. - Id *string - - // The value of Version for the traffic policy that you want to update the comment - // for. - // - // This member is required. - Version *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains the response information for the traffic policy. -type UpdateTrafficPolicyCommentOutput struct { - - // A complex type that contains settings for the specified traffic policy. - // - // This member is required. - TrafficPolicy *types.TrafficPolicy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateTrafficPolicyCommentMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyComment{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyComment{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateTrafficPolicyComment"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUpdateTrafficPolicyCommentValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateTrafficPolicyComment(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateTrafficPolicyComment", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go deleted file mode 100644 index e8ed20ab87..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/api_op_UpdateTrafficPolicyInstance.go +++ /dev/null @@ -1,237 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// After you submit a UpdateTrafficPolicyInstance request, there's a brief delay -// while Route 53 creates the resource record sets that are specified in the -// traffic policy definition. Use GetTrafficPolicyInstance with the id of updated -// traffic policy instance confirm that the UpdateTrafficPolicyInstance request -// completed successfully. For more information, see the State response element. -// -// Updates the resource record sets in a specified hosted zone that were created -// based on the settings in a specified traffic policy version. -// -// When you update a traffic policy instance, Amazon Route 53 continues to respond -// to DNS queries for the root resource record set name (such as example.com) while -// it replaces one group of resource record sets with another. Route 53 performs -// the following operations: -// -// - Route 53 creates a new group of resource record sets based on the specified -// traffic policy. This is true regardless of how significant the differences are -// between the existing resource record sets and the new resource record sets. -// -// - When all of the new resource record sets have been created, Route 53 starts -// to respond to DNS queries for the root resource record set name (such as -// example.com) by using the new resource record sets. -// -// - Route 53 deletes the old group of resource record sets that are associated -// with the root resource record set name. -func (c *Client) UpdateTrafficPolicyInstance(ctx context.Context, params *UpdateTrafficPolicyInstanceInput, optFns ...func(*Options)) (*UpdateTrafficPolicyInstanceOutput, error) { - if params == nil { - params = &UpdateTrafficPolicyInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateTrafficPolicyInstance", params, optFns, c.addOperationUpdateTrafficPolicyInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateTrafficPolicyInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -// A complex type that contains information about the resource record sets that -// you want to update based on a specified traffic policy instance. -type UpdateTrafficPolicyInstanceInput struct { - - // The ID of the traffic policy instance that you want to update. - // - // This member is required. - Id *string - - // The TTL that you want Amazon Route 53 to assign to all of the updated resource - // record sets. - // - // This member is required. - TTL *int64 - - // The ID of the traffic policy that you want Amazon Route 53 to use to update - // resource record sets for the specified traffic policy instance. - // - // This member is required. - TrafficPolicyId *string - - // The version of the traffic policy that you want Amazon Route 53 to use to - // update resource record sets for the specified traffic policy instance. - // - // This member is required. - TrafficPolicyVersion *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains information about the resource record sets that -// Amazon Route 53 created based on a specified traffic policy. -type UpdateTrafficPolicyInstanceOutput struct { - - // A complex type that contains settings for the updated traffic policy instance. - // - // This member is required. - TrafficPolicyInstance *types.TrafficPolicyInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateTrafficPolicyInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestxml_serializeOpUpdateTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestxml_deserializeOpUpdateTrafficPolicyInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateTrafficPolicyInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateTrafficPolicyInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateTrafficPolicyInstance", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/auth.go deleted file mode 100644 index aa2929ba64..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/auth.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "slices" - "strings" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "route53") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - sorted := sortAuthOptions(options, m.options.AuthSchemePreference) - for _, option := range sorted { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { - byPriority := make([]*smithyauth.Option, 0, len(options)) - for _, prefName := range preferred { - for _, option := range options { - optName := option.SchemeID - if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { - optName = parts[1] - } - if prefName == optName { - byPriority = append(byPriority, option) - } - } - } - for _, option := range options { - if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { - return o.SchemeID == option.SchemeID - }) { - byPriority = append(byPriority, option) - } - } - return byPriority -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go deleted file mode 100644 index ddd97661dd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/deserializers.go +++ /dev/null @@ -1,22883 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "bytes" - "context" - "encoding/xml" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - smithy "github.com/aws/smithy-go" - smithyxml "github.com/aws/smithy-go/encoding/xml" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "strconv" - "strings" -) - -type awsRestxml_deserializeOpActivateKeySigningKey struct { -} - -func (*awsRestxml_deserializeOpActivateKeySigningKey) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpActivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorActivateKeySigningKey(response, &metadata) - } - output := &ActivateKeySigningKeyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorActivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKMSArn", errorCode): - return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("InvalidSigningStatus", errorCode): - return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) - - case strings.EqualFold("NoSuchKeySigningKey", errorCode): - return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentActivateKeySigningKeyOutput(v **ActivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ActivateKeySigningKeyOutput - if *v == nil { - sv = &ActivateKeySigningKeyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpAssociateVPCWithHostedZone struct { -} - -func (*awsRestxml_deserializeOpAssociateVPCWithHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpAssociateVPCWithHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response, &metadata) - } - output := &AssociateVPCWithHostedZoneOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorAssociateVPCWithHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConflictingDomainExists", errorCode): - return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidVPCId", errorCode): - return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) - - case strings.EqualFold("LimitsExceeded", errorCode): - return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("NotAuthorizedException", errorCode): - return awsRestxml_deserializeErrorNotAuthorizedException(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - case strings.EqualFold("PublicZoneVPCAssociation", errorCode): - return awsRestxml_deserializeErrorPublicZoneVPCAssociation(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentAssociateVPCWithHostedZoneOutput(v **AssociateVPCWithHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssociateVPCWithHostedZoneOutput - if *v == nil { - sv = &AssociateVPCWithHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpChangeCidrCollection struct { -} - -func (*awsRestxml_deserializeOpChangeCidrCollection) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpChangeCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorChangeCidrCollection(response, &metadata) - } - output := &ChangeCidrCollectionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorChangeCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("CidrBlockInUseException", errorCode): - return awsRestxml_deserializeErrorCidrBlockInUseException(response, errorBody) - - case strings.EqualFold("CidrCollectionVersionMismatchException", errorCode): - return awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response, errorBody) - - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("LimitsExceeded", errorCode): - return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) - - case strings.EqualFold("NoSuchCidrCollectionException", errorCode): - return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentChangeCidrCollectionOutput(v **ChangeCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ChangeCidrCollectionOutput - if *v == nil { - sv = &ChangeCidrCollectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpChangeResourceRecordSets struct { -} - -func (*awsRestxml_deserializeOpChangeResourceRecordSets) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpChangeResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorChangeResourceRecordSets(response, &metadata) - } - output := &ChangeResourceRecordSetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorChangeResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidChangeBatch", errorCode): - return awsRestxml_deserializeErrorInvalidChangeBatch(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentChangeResourceRecordSetsOutput(v **ChangeResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ChangeResourceRecordSetsOutput - if *v == nil { - sv = &ChangeResourceRecordSetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpChangeTagsForResource struct { -} - -func (*awsRestxml_deserializeOpChangeTagsForResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpChangeTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorChangeTagsForResource(response, &metadata) - } - output := &ChangeTagsForResourceOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorChangeTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestxml_deserializeErrorThrottlingException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpCreateCidrCollection struct { -} - -func (*awsRestxml_deserializeOpCreateCidrCollection) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateCidrCollection(response, &metadata) - } - output := &CreateCidrCollectionOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("CidrCollectionAlreadyExistsException", errorCode): - return awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response, errorBody) - - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("LimitsExceeded", errorCode): - return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateCidrCollectionOutput(v *CreateCidrCollectionOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateCidrCollectionOutput(v **CreateCidrCollectionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateCidrCollectionOutput - if *v == nil { - sv = &CreateCidrCollectionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Collection", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCidrCollection(&sv.Collection, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateHealthCheck struct { -} - -func (*awsRestxml_deserializeOpCreateHealthCheck) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateHealthCheck(response, &metadata) - } - output := &CreateHealthCheckOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("HealthCheckAlreadyExists", errorCode): - return awsRestxml_deserializeErrorHealthCheckAlreadyExists(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("TooManyHealthChecks", errorCode): - return awsRestxml_deserializeErrorTooManyHealthChecks(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateHealthCheckOutput(v *CreateHealthCheckOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateHealthCheckOutput(v **CreateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateHealthCheckOutput - if *v == nil { - sv = &CreateHealthCheckOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheck", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateHostedZone struct { -} - -func (*awsRestxml_deserializeOpCreateHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateHostedZone(response, &metadata) - } - output := &CreateHostedZoneOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConflictingDomainExists", errorCode): - return awsRestxml_deserializeErrorConflictingDomainExists(response, errorBody) - - case strings.EqualFold("DelegationSetNotAvailable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) - - case strings.EqualFold("DelegationSetNotReusable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) - - case strings.EqualFold("HostedZoneAlreadyExists", errorCode): - return awsRestxml_deserializeErrorHostedZoneAlreadyExists(response, errorBody) - - case strings.EqualFold("InvalidDomainName", errorCode): - return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidVPCId", errorCode): - return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) - - case strings.EqualFold("NoSuchDelegationSet", errorCode): - return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) - - case strings.EqualFold("TooManyHostedZones", errorCode): - return awsRestxml_deserializeErrorTooManyHostedZones(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateHostedZoneOutput(v *CreateHostedZoneOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateHostedZoneOutput(v **CreateHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateHostedZoneOutput - if *v == nil { - sv = &CreateHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("DelegationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("HostedZone", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("VPC", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateKeySigningKey struct { -} - -func (*awsRestxml_deserializeOpCreateKeySigningKey) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateKeySigningKey(response, &metadata) - } - output := &CreateKeySigningKeyOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKMSArn", errorCode): - return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyName", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyName(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("InvalidSigningStatus", errorCode): - return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) - - case strings.EqualFold("KeySigningKeyAlreadyExists", errorCode): - return awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("TooManyKeySigningKeys", errorCode): - return awsRestxml_deserializeErrorTooManyKeySigningKeys(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateKeySigningKeyOutput(v *CreateKeySigningKeyOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateKeySigningKeyOutput(v **CreateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateKeySigningKeyOutput - if *v == nil { - sv = &CreateKeySigningKeyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("KeySigningKey", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentKeySigningKey(&sv.KeySigningKey, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateQueryLoggingConfig struct { -} - -func (*awsRestxml_deserializeOpCreateQueryLoggingConfig) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response, &metadata) - } - output := &CreateQueryLoggingConfigOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InsufficientCloudWatchLogsResourcePolicy", errorCode): - return awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchCloudWatchLogsLogGroup", errorCode): - return awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("QueryLoggingConfigAlreadyExists", errorCode): - return awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateQueryLoggingConfigOutput(v *CreateQueryLoggingConfigOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateQueryLoggingConfigOutput(v **CreateQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateQueryLoggingConfigOutput - if *v == nil { - sv = &CreateQueryLoggingConfigOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("QueryLoggingConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateReusableDelegationSet struct { -} - -func (*awsRestxml_deserializeOpCreateReusableDelegationSet) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response, &metadata) - } - output := &CreateReusableDelegationSetOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("DelegationSetAlreadyCreated", errorCode): - return awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response, errorBody) - - case strings.EqualFold("DelegationSetAlreadyReusable", errorCode): - return awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response, errorBody) - - case strings.EqualFold("DelegationSetNotAvailable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotAvailable(response, errorBody) - - case strings.EqualFold("HostedZoneNotFound", errorCode): - return awsRestxml_deserializeErrorHostedZoneNotFound(response, errorBody) - - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("LimitsExceeded", errorCode): - return awsRestxml_deserializeErrorLimitsExceeded(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateReusableDelegationSetOutput(v *CreateReusableDelegationSetOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateReusableDelegationSetOutput(v **CreateReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateReusableDelegationSetOutput - if *v == nil { - sv = &CreateReusableDelegationSetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DelegationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateTrafficPolicy struct { -} - -func (*awsRestxml_deserializeOpCreateTrafficPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicy(response, &metadata) - } - output := &CreateTrafficPolicyOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): - return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) - - case strings.EqualFold("TooManyTrafficPolicies", errorCode): - return awsRestxml_deserializeErrorTooManyTrafficPolicies(response, errorBody) - - case strings.EqualFold("TrafficPolicyAlreadyExists", errorCode): - return awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyOutput(v *CreateTrafficPolicyOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateTrafficPolicyOutput(v **CreateTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficPolicyOutput - if *v == nil { - sv = &CreateTrafficPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicy", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateTrafficPolicyInstance struct { -} - -func (*awsRestxml_deserializeOpCreateTrafficPolicyInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response, &metadata) - } - output := &CreateTrafficPolicyInstanceOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - case strings.EqualFold("TooManyTrafficPolicyInstances", errorCode): - return awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response, errorBody) - - case strings.EqualFold("TrafficPolicyInstanceAlreadyExists", errorCode): - return awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyInstanceOutput(v *CreateTrafficPolicyInstanceOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateTrafficPolicyInstanceOutput(v **CreateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficPolicyInstanceOutput - if *v == nil { - sv = &CreateTrafficPolicyInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateTrafficPolicyVersion struct { -} - -func (*awsRestxml_deserializeOpCreateTrafficPolicyVersion) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateTrafficPolicyVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response, &metadata) - } - output := &CreateTrafficPolicyVersionOutput{} - out.Result = output - - err = awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(output, response) - if err != nil { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response with invalid Http bindings, %w", err)} - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateTrafficPolicyVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidTrafficPolicyDocument", errorCode): - return awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - case strings.EqualFold("TooManyTrafficPolicyVersionsForCurrentPolicy", errorCode): - return awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpHttpBindingsCreateTrafficPolicyVersionOutput(v *CreateTrafficPolicyVersionOutput, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } - - if headerValues := response.Header.Values("Location"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.Location = ptr.String(headerValues[0]) - } - - return nil -} -func awsRestxml_deserializeOpDocumentCreateTrafficPolicyVersionOutput(v **CreateTrafficPolicyVersionOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateTrafficPolicyVersionOutput - if *v == nil { - sv = &CreateTrafficPolicyVersionOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicy", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpCreateVPCAssociationAuthorization struct { -} - -func (*awsRestxml_deserializeOpCreateVPCAssociationAuthorization) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpCreateVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response, &metadata) - } - output := &CreateVPCAssociationAuthorizationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorCreateVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidVPCId", errorCode): - return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("TooManyVPCAssociationAuthorizations", errorCode): - return awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentCreateVPCAssociationAuthorizationOutput(v **CreateVPCAssociationAuthorizationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *CreateVPCAssociationAuthorizationOutput - if *v == nil { - sv = &CreateVPCAssociationAuthorizationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("VPC", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentVPC(&sv.VPC, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpDeactivateKeySigningKey struct { -} - -func (*awsRestxml_deserializeOpDeactivateKeySigningKey) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeactivateKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response, &metadata) - } - output := &DeactivateKeySigningKeyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeactivateKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("InvalidSigningStatus", errorCode): - return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) - - case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): - return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) - - case strings.EqualFold("KeySigningKeyInUse", errorCode): - return awsRestxml_deserializeErrorKeySigningKeyInUse(response, errorBody) - - case strings.EqualFold("NoSuchKeySigningKey", errorCode): - return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentDeactivateKeySigningKeyOutput(v **DeactivateKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeactivateKeySigningKeyOutput - if *v == nil { - sv = &DeactivateKeySigningKeyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpDeleteCidrCollection struct { -} - -func (*awsRestxml_deserializeOpDeleteCidrCollection) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteCidrCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteCidrCollection(response, &metadata) - } - output := &DeleteCidrCollectionOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteCidrCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("CidrCollectionInUseException", errorCode): - return awsRestxml_deserializeErrorCidrCollectionInUseException(response, errorBody) - - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchCidrCollectionException", errorCode): - return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteHealthCheck struct { -} - -func (*awsRestxml_deserializeOpDeleteHealthCheck) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteHealthCheck(response, &metadata) - } - output := &DeleteHealthCheckOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("HealthCheckInUse", errorCode): - return awsRestxml_deserializeErrorHealthCheckInUse(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteHostedZone struct { -} - -func (*awsRestxml_deserializeOpDeleteHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteHostedZone(response, &metadata) - } - output := &DeleteHostedZoneOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("HostedZoneNotEmpty", errorCode): - return awsRestxml_deserializeErrorHostedZoneNotEmpty(response, errorBody) - - case strings.EqualFold("InvalidDomainName", errorCode): - return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentDeleteHostedZoneOutput(v **DeleteHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteHostedZoneOutput - if *v == nil { - sv = &DeleteHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpDeleteKeySigningKey struct { -} - -func (*awsRestxml_deserializeOpDeleteKeySigningKey) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteKeySigningKey) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteKeySigningKey(response, &metadata) - } - output := &DeleteKeySigningKeyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteKeySigningKey(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKMSArn", errorCode): - return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("InvalidSigningStatus", errorCode): - return awsRestxml_deserializeErrorInvalidSigningStatus(response, errorBody) - - case strings.EqualFold("NoSuchKeySigningKey", errorCode): - return awsRestxml_deserializeErrorNoSuchKeySigningKey(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentDeleteKeySigningKeyOutput(v **DeleteKeySigningKeyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DeleteKeySigningKeyOutput - if *v == nil { - sv = &DeleteKeySigningKeyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpDeleteQueryLoggingConfig struct { -} - -func (*awsRestxml_deserializeOpDeleteQueryLoggingConfig) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response, &metadata) - } - output := &DeleteQueryLoggingConfigOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): - return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteReusableDelegationSet struct { -} - -func (*awsRestxml_deserializeOpDeleteReusableDelegationSet) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response, &metadata) - } - output := &DeleteReusableDelegationSetOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("DelegationSetInUse", errorCode): - return awsRestxml_deserializeErrorDelegationSetInUse(response, errorBody) - - case strings.EqualFold("DelegationSetNotReusable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchDelegationSet", errorCode): - return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteTrafficPolicy struct { -} - -func (*awsRestxml_deserializeOpDeleteTrafficPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response, &metadata) - } - output := &DeleteTrafficPolicyOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - case strings.EqualFold("TrafficPolicyInUse", errorCode): - return awsRestxml_deserializeErrorTrafficPolicyInUse(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteTrafficPolicyInstance struct { -} - -func (*awsRestxml_deserializeOpDeleteTrafficPolicyInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response, &metadata) - } - output := &DeleteTrafficPolicyInstanceOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDeleteVPCAssociationAuthorization struct { -} - -func (*awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDeleteVPCAssociationAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response, &metadata) - } - output := &DeleteVPCAssociationAuthorizationOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDeleteVPCAssociationAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidVPCId", errorCode): - return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("VPCAssociationAuthorizationNotFound", errorCode): - return awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestxml_deserializeOpDisableHostedZoneDNSSEC struct { -} - -func (*awsRestxml_deserializeOpDisableHostedZoneDNSSEC) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDisableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response, &metadata) - } - output := &DisableHostedZoneDNSSECOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDisableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("DNSSECNotFound", errorCode): - return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) - - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKMSArn", errorCode): - return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("KeySigningKeyInParentDSRecord", errorCode): - return awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentDisableHostedZoneDNSSECOutput(v **DisableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisableHostedZoneDNSSECOutput - if *v == nil { - sv = &DisableHostedZoneDNSSECOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpDisassociateVPCFromHostedZone struct { -} - -func (*awsRestxml_deserializeOpDisassociateVPCFromHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpDisassociateVPCFromHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response, &metadata) - } - output := &DisassociateVPCFromHostedZoneOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorDisassociateVPCFromHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidVPCId", errorCode): - return awsRestxml_deserializeErrorInvalidVPCId(response, errorBody) - - case strings.EqualFold("LastVPCAssociation", errorCode): - return awsRestxml_deserializeErrorLastVPCAssociation(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("VPCAssociationNotFound", errorCode): - return awsRestxml_deserializeErrorVPCAssociationNotFound(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentDisassociateVPCFromHostedZoneOutput(v **DisassociateVPCFromHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DisassociateVPCFromHostedZoneOutput - if *v == nil { - sv = &DisassociateVPCFromHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpEnableHostedZoneDNSSEC struct { -} - -func (*awsRestxml_deserializeOpEnableHostedZoneDNSSEC) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpEnableHostedZoneDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response, &metadata) - } - output := &EnableHostedZoneDNSSECOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorEnableHostedZoneDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("DNSSECNotFound", errorCode): - return awsRestxml_deserializeErrorDNSSECNotFound(response, errorBody) - - case strings.EqualFold("HostedZonePartiallyDelegated", errorCode): - return awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response, errorBody) - - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidKMSArn", errorCode): - return awsRestxml_deserializeErrorInvalidKMSArn(response, errorBody) - - case strings.EqualFold("InvalidKeySigningKeyStatus", errorCode): - return awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response, errorBody) - - case strings.EqualFold("KeySigningKeyWithActiveStatusNotFound", errorCode): - return awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentEnableHostedZoneDNSSECOutput(v **EnableHostedZoneDNSSECOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *EnableHostedZoneDNSSECOutput - if *v == nil { - sv = &EnableHostedZoneDNSSECOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetAccountLimit struct { -} - -func (*awsRestxml_deserializeOpGetAccountLimit) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetAccountLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetAccountLimit(response, &metadata) - } - output := &GetAccountLimitOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetAccountLimitOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetAccountLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetAccountLimitOutput(v **GetAccountLimitOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetAccountLimitOutput - if *v == nil { - sv = &GetAccountLimitOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = i64 - } - - case strings.EqualFold("Limit", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentAccountLimit(&sv.Limit, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetChange struct { -} - -func (*awsRestxml_deserializeOpGetChange) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetChange) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetChange(response, &metadata) - } - output := &GetChangeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetChangeOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetChange(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchChange", errorCode): - return awsRestxml_deserializeErrorNoSuchChange(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetChangeOutput(v **GetChangeOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetChangeOutput - if *v == nil { - sv = &GetChangeOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ChangeInfo", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChangeInfo(&sv.ChangeInfo, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetCheckerIpRanges struct { -} - -func (*awsRestxml_deserializeOpGetCheckerIpRanges) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetCheckerIpRanges) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetCheckerIpRanges(response, &metadata) - } - output := &GetCheckerIpRangesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetCheckerIpRanges(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetCheckerIpRangesOutput(v **GetCheckerIpRangesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetCheckerIpRangesOutput - if *v == nil { - sv = &GetCheckerIpRangesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CheckerIpRanges", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCheckerIpRanges(&sv.CheckerIpRanges, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetDNSSEC struct { -} - -func (*awsRestxml_deserializeOpGetDNSSEC) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetDNSSEC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetDNSSEC(response, &metadata) - } - output := &GetDNSSECOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetDNSSECOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetDNSSEC(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidArgument", errorCode): - return awsRestxml_deserializeErrorInvalidArgument(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetDNSSECOutput(v **GetDNSSECOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetDNSSECOutput - if *v == nil { - sv = &GetDNSSECOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("KeySigningKeys", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentKeySigningKeys(&sv.KeySigningKeys, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Status", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDNSSECStatus(&sv.Status, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetGeoLocation struct { -} - -func (*awsRestxml_deserializeOpGetGeoLocation) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetGeoLocation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetGeoLocation(response, &metadata) - } - output := &GetGeoLocationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetGeoLocationOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetGeoLocation(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchGeoLocation", errorCode): - return awsRestxml_deserializeErrorNoSuchGeoLocation(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetGeoLocationOutput(v **GetGeoLocationOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetGeoLocationOutput - if *v == nil { - sv = &GetGeoLocationOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("GeoLocationDetails", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentGeoLocationDetails(&sv.GeoLocationDetails, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHealthCheck struct { -} - -func (*awsRestxml_deserializeOpGetHealthCheck) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheck(response, &metadata) - } - output := &GetHealthCheckOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHealthCheckOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("IncompatibleVersion", errorCode): - return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHealthCheckOutput(v **GetHealthCheckOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHealthCheckOutput - if *v == nil { - sv = &GetHealthCheckOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheck", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHealthCheckCount struct { -} - -func (*awsRestxml_deserializeOpGetHealthCheckCount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHealthCheckCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckCount(response, &metadata) - } - output := &GetHealthCheckCountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHealthCheckCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHealthCheckCountOutput(v **GetHealthCheckCountOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHealthCheckCountOutput - if *v == nil { - sv = &GetHealthCheckCountOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheckCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HealthCheckCount = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHealthCheckLastFailureReason struct { -} - -func (*awsRestxml_deserializeOpGetHealthCheckLastFailureReason) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHealthCheckLastFailureReason) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response, &metadata) - } - output := &GetHealthCheckLastFailureReasonOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHealthCheckLastFailureReason(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHealthCheckLastFailureReasonOutput(v **GetHealthCheckLastFailureReasonOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHealthCheckLastFailureReasonOutput - if *v == nil { - sv = &GetHealthCheckLastFailureReasonOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheckObservations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHealthCheckStatus struct { -} - -func (*awsRestxml_deserializeOpGetHealthCheckStatus) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHealthCheckStatus) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHealthCheckStatus(response, &metadata) - } - output := &GetHealthCheckStatusOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHealthCheckStatus(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHealthCheckStatusOutput(v **GetHealthCheckStatusOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHealthCheckStatusOutput - if *v == nil { - sv = &GetHealthCheckStatusOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheckObservations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheckObservations(&sv.HealthCheckObservations, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHostedZone struct { -} - -func (*awsRestxml_deserializeOpGetHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHostedZone(response, &metadata) - } - output := &GetHostedZoneOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHostedZoneOutput(v **GetHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHostedZoneOutput - if *v == nil { - sv = &GetHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DelegationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("HostedZone", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("VPCs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHostedZoneCount struct { -} - -func (*awsRestxml_deserializeOpGetHostedZoneCount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHostedZoneCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneCount(response, &metadata) - } - output := &GetHostedZoneCountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHostedZoneCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHostedZoneCountOutput(v **GetHostedZoneCountOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHostedZoneCountOutput - if *v == nil { - sv = &GetHostedZoneCountOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HostedZoneCount = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetHostedZoneLimit struct { -} - -func (*awsRestxml_deserializeOpGetHostedZoneLimit) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetHostedZoneLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetHostedZoneLimit(response, &metadata) - } - output := &GetHostedZoneLimitOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetHostedZoneLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("HostedZoneNotPrivate", errorCode): - return awsRestxml_deserializeErrorHostedZoneNotPrivate(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetHostedZoneLimitOutput(v **GetHostedZoneLimitOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetHostedZoneLimitOutput - if *v == nil { - sv = &GetHostedZoneLimitOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = i64 - } - - case strings.EqualFold("Limit", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZoneLimit(&sv.Limit, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetQueryLoggingConfig struct { -} - -func (*awsRestxml_deserializeOpGetQueryLoggingConfig) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetQueryLoggingConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response, &metadata) - } - output := &GetQueryLoggingConfigOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetQueryLoggingConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchQueryLoggingConfig", errorCode): - return awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetQueryLoggingConfigOutput(v **GetQueryLoggingConfigOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetQueryLoggingConfigOutput - if *v == nil { - sv = &GetQueryLoggingConfigOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("QueryLoggingConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&sv.QueryLoggingConfig, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetReusableDelegationSet struct { -} - -func (*awsRestxml_deserializeOpGetReusableDelegationSet) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetReusableDelegationSet) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSet(response, &metadata) - } - output := &GetReusableDelegationSetOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetReusableDelegationSet(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("DelegationSetNotReusable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchDelegationSet", errorCode): - return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetReusableDelegationSetOutput(v **GetReusableDelegationSetOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetReusableDelegationSetOutput - if *v == nil { - sv = &GetReusableDelegationSetOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DelegationSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSet(&sv.DelegationSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetReusableDelegationSetLimit struct { -} - -func (*awsRestxml_deserializeOpGetReusableDelegationSetLimit) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetReusableDelegationSetLimit) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response, &metadata) - } - output := &GetReusableDelegationSetLimitOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetReusableDelegationSetLimit(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchDelegationSet", errorCode): - return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetReusableDelegationSetLimitOutput(v **GetReusableDelegationSetLimitOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetReusableDelegationSetLimitOutput - if *v == nil { - sv = &GetReusableDelegationSetLimitOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Count", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Count = i64 - } - - case strings.EqualFold("Limit", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentReusableDelegationSetLimit(&sv.Limit, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetTrafficPolicy struct { -} - -func (*awsRestxml_deserializeOpGetTrafficPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetTrafficPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicy(response, &metadata) - } - output := &GetTrafficPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetTrafficPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetTrafficPolicyOutput(v **GetTrafficPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTrafficPolicyOutput - if *v == nil { - sv = &GetTrafficPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicy", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetTrafficPolicyInstance struct { -} - -func (*awsRestxml_deserializeOpGetTrafficPolicyInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response, &metadata) - } - output := &GetTrafficPolicyInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceOutput(v **GetTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTrafficPolicyInstanceOutput - if *v == nil { - sv = &GetTrafficPolicyInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpGetTrafficPolicyInstanceCount struct { -} - -func (*awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpGetTrafficPolicyInstanceCount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response, &metadata) - } - output := &GetTrafficPolicyInstanceCountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorGetTrafficPolicyInstanceCount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentGetTrafficPolicyInstanceCountOutput(v **GetTrafficPolicyInstanceCountOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetTrafficPolicyInstanceCountOutput - if *v == nil { - sv = &GetTrafficPolicyInstanceCountOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicyInstanceCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TrafficPolicyInstanceCount = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListCidrBlocks struct { -} - -func (*awsRestxml_deserializeOpListCidrBlocks) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListCidrBlocks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListCidrBlocks(response, &metadata) - } - output := &ListCidrBlocksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListCidrBlocksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListCidrBlocks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchCidrCollectionException", errorCode): - return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) - - case strings.EqualFold("NoSuchCidrLocationException", errorCode): - return awsRestxml_deserializeErrorNoSuchCidrLocationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListCidrBlocksOutput(v **ListCidrBlocksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListCidrBlocksOutput - if *v == nil { - sv = &ListCidrBlocksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CidrBlocks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCidrBlockSummaries(&sv.CidrBlocks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListCidrCollections struct { -} - -func (*awsRestxml_deserializeOpListCidrCollections) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListCidrCollections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListCidrCollections(response, &metadata) - } - output := &ListCidrCollectionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListCidrCollections(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListCidrCollectionsOutput(v **ListCidrCollectionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListCidrCollectionsOutput - if *v == nil { - sv = &ListCidrCollectionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CidrCollections", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCollectionSummaries(&sv.CidrCollections, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListCidrLocations struct { -} - -func (*awsRestxml_deserializeOpListCidrLocations) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListCidrLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListCidrLocations(response, &metadata) - } - output := &ListCidrLocationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListCidrLocationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListCidrLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchCidrCollectionException", errorCode): - return awsRestxml_deserializeErrorNoSuchCidrCollectionException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListCidrLocationsOutput(v **ListCidrLocationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListCidrLocationsOutput - if *v == nil { - sv = &ListCidrLocationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CidrLocations", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentLocationSummaries(&sv.CidrLocations, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListGeoLocations struct { -} - -func (*awsRestxml_deserializeOpListGeoLocations) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListGeoLocations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListGeoLocations(response, &metadata) - } - output := &ListGeoLocationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListGeoLocationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListGeoLocations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListGeoLocationsOutput(v **ListGeoLocationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListGeoLocationsOutput - if *v == nil { - sv = &ListGeoLocationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("GeoLocationDetailsList", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentGeoLocationDetailsList(&sv.GeoLocationDetailsList, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextContinentCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextContinentCode = ptr.String(xtv) - } - - case strings.EqualFold("NextCountryCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextCountryCode = ptr.String(xtv) - } - - case strings.EqualFold("NextSubdivisionCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextSubdivisionCode = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListHealthChecks struct { -} - -func (*awsRestxml_deserializeOpListHealthChecks) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListHealthChecks) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListHealthChecks(response, &metadata) - } - output := &ListHealthChecksOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListHealthChecksOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListHealthChecks(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("IncompatibleVersion", errorCode): - return awsRestxml_deserializeErrorIncompatibleVersion(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListHealthChecksOutput(v **ListHealthChecksOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListHealthChecksOutput - if *v == nil { - sv = &ListHealthChecksOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthChecks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthChecks(&sv.HealthChecks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("Marker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Marker = ptr.String(xtv) - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextMarker = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListHostedZones struct { -} - -func (*awsRestxml_deserializeOpListHostedZones) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListHostedZones) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListHostedZones(response, &metadata) - } - output := &ListHostedZonesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListHostedZonesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListHostedZones(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("DelegationSetNotReusable", errorCode): - return awsRestxml_deserializeErrorDelegationSetNotReusable(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchDelegationSet", errorCode): - return awsRestxml_deserializeErrorNoSuchDelegationSet(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListHostedZonesOutput(v **ListHostedZonesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListHostedZonesOutput - if *v == nil { - sv = &ListHostedZonesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZones", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("Marker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Marker = ptr.String(xtv) - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextMarker = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListHostedZonesByName struct { -} - -func (*awsRestxml_deserializeOpListHostedZonesByName) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListHostedZonesByName) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByName(response, &metadata) - } - output := &ListHostedZonesByNameOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListHostedZonesByName(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidDomainName", errorCode): - return awsRestxml_deserializeErrorInvalidDomainName(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListHostedZonesByNameOutput(v **ListHostedZonesByNameOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListHostedZonesByNameOutput - if *v == nil { - sv = &ListHostedZonesByNameOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DNSName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DNSName = ptr.String(xtv) - } - - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("HostedZones", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZones(&sv.HostedZones, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextDNSName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextDNSName = ptr.String(xtv) - } - - case strings.EqualFold("NextHostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextHostedZoneId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListHostedZonesByVPC struct { -} - -func (*awsRestxml_deserializeOpListHostedZonesByVPC) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListHostedZonesByVPC) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListHostedZonesByVPC(response, &metadata) - } - output := &ListHostedZonesByVPCOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListHostedZonesByVPC(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidPaginationToken", errorCode): - return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListHostedZonesByVPCOutput(v **ListHostedZonesByVPCOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListHostedZonesByVPCOutput - if *v == nil { - sv = &ListHostedZonesByVPCOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneSummaries", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZoneSummaries(&sv.HostedZoneSummaries, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListQueryLoggingConfigs struct { -} - -func (*awsRestxml_deserializeOpListQueryLoggingConfigs) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListQueryLoggingConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response, &metadata) - } - output := &ListQueryLoggingConfigsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListQueryLoggingConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidPaginationToken", errorCode): - return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListQueryLoggingConfigsOutput(v **ListQueryLoggingConfigsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListQueryLoggingConfigsOutput - if *v == nil { - sv = &ListQueryLoggingConfigsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("QueryLoggingConfigs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentQueryLoggingConfigs(&sv.QueryLoggingConfigs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListResourceRecordSets struct { -} - -func (*awsRestxml_deserializeOpListResourceRecordSets) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListResourceRecordSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListResourceRecordSets(response, &metadata) - } - output := &ListResourceRecordSetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListResourceRecordSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListResourceRecordSetsOutput(v **ListResourceRecordSetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListResourceRecordSetsOutput - if *v == nil { - sv = &ListResourceRecordSetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextRecordIdentifier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextRecordIdentifier = ptr.String(xtv) - } - - case strings.EqualFold("NextRecordName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextRecordName = ptr.String(xtv) - } - - case strings.EqualFold("NextRecordType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextRecordType = types.RRType(xtv) - } - - case strings.EqualFold("ResourceRecordSets", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentResourceRecordSets(&sv.ResourceRecordSets, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListReusableDelegationSets struct { -} - -func (*awsRestxml_deserializeOpListReusableDelegationSets) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListReusableDelegationSets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListReusableDelegationSets(response, &metadata) - } - output := &ListReusableDelegationSetsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListReusableDelegationSets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListReusableDelegationSetsOutput(v **ListReusableDelegationSetsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListReusableDelegationSetsOutput - if *v == nil { - sv = &ListReusableDelegationSetsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DelegationSets", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSets(&sv.DelegationSets, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("Marker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Marker = ptr.String(xtv) - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("NextMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextMarker = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTagsForResource struct { -} - -func (*awsRestxml_deserializeOpListTagsForResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTagsForResource(response, &metadata) - } - output := &ListTagsForResourceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTagsForResourceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestxml_deserializeErrorThrottlingException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTagsForResourceOutput - if *v == nil { - sv = &ListTagsForResourceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ResourceTagSet", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentResourceTagSet(&sv.ResourceTagSet, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTagsForResources struct { -} - -func (*awsRestxml_deserializeOpListTagsForResources) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTagsForResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTagsForResources(response, &metadata) - } - output := &ListTagsForResourcesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTagsForResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestxml_deserializeErrorThrottlingException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTagsForResourcesOutput(v **ListTagsForResourcesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTagsForResourcesOutput - if *v == nil { - sv = &ListTagsForResourcesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ResourceTagSets", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentResourceTagSetList(&sv.ResourceTagSets, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTrafficPolicies struct { -} - -func (*awsRestxml_deserializeOpListTrafficPolicies) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTrafficPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicies(response, &metadata) - } - output := &ListTrafficPoliciesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTrafficPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTrafficPoliciesOutput(v **ListTrafficPoliciesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTrafficPoliciesOutput - if *v == nil { - sv = &ListTrafficPoliciesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TrafficPolicyIdMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyIdMarker = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicySummaries", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicySummaries(&sv.TrafficPolicySummaries, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTrafficPolicyInstances struct { -} - -func (*awsRestxml_deserializeOpListTrafficPolicyInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTrafficPolicyInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response, &metadata) - } - output := &ListTrafficPolicyInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTrafficPolicyInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesOutput(v **ListTrafficPolicyInstancesOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTrafficPolicyInstancesOutput - if *v == nil { - sv = &ListTrafficPolicyInstancesOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneIdMarker = ptr.String(xtv) - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone struct { -} - -func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByHostedZone) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response, &metadata) - } - output := &ListTrafficPolicyInstancesByHostedZoneOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByHostedZone(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByHostedZoneOutput(v **ListTrafficPolicyInstancesByHostedZoneOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTrafficPolicyInstancesByHostedZoneOutput - if *v == nil { - sv = &ListTrafficPolicyInstancesByHostedZoneOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy struct { -} - -func (*awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTrafficPolicyInstancesByPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response, &metadata) - } - output := &ListTrafficPolicyInstancesByPolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTrafficPolicyInstancesByPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTrafficPolicyInstancesByPolicyOutput(v **ListTrafficPolicyInstancesByPolicyOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTrafficPolicyInstancesByPolicyOutput - if *v == nil { - sv = &ListTrafficPolicyInstancesByPolicyOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneIdMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneIdMarker = ptr.String(xtv) - } - - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TrafficPolicyInstanceNameMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceNameMarker = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyInstances", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstances(&sv.TrafficPolicyInstances, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("TrafficPolicyInstanceTypeMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceTypeMarker = types.RRType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListTrafficPolicyVersions struct { -} - -func (*awsRestxml_deserializeOpListTrafficPolicyVersions) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListTrafficPolicyVersions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response, &metadata) - } - output := &ListTrafficPolicyVersionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListTrafficPolicyVersions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListTrafficPolicyVersionsOutput(v **ListTrafficPolicyVersionsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListTrafficPolicyVersionsOutput - if *v == nil { - sv = &ListTrafficPolicyVersionsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("IsTruncated", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected PageTruncated to be of type *bool, got %T instead", val) - } - sv.IsTruncated = xtv - } - - case strings.EqualFold("MaxItems", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.MaxItems = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TrafficPolicies", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicies(&sv.TrafficPolicies, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("TrafficPolicyVersionMarker", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyVersionMarker = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpListVPCAssociationAuthorizations struct { -} - -func (*awsRestxml_deserializeOpListVPCAssociationAuthorizations) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpListVPCAssociationAuthorizations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response, &metadata) - } - output := &ListVPCAssociationAuthorizationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorListVPCAssociationAuthorizations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("InvalidPaginationToken", errorCode): - return awsRestxml_deserializeErrorInvalidPaginationToken(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentListVPCAssociationAuthorizationsOutput(v **ListVPCAssociationAuthorizationsOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *ListVPCAssociationAuthorizationsOutput - if *v == nil { - sv = &ListVPCAssociationAuthorizationsOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("NextToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NextToken = ptr.String(xtv) - } - - case strings.EqualFold("VPCs", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentVPCs(&sv.VPCs, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpTestDNSAnswer struct { -} - -func (*awsRestxml_deserializeOpTestDNSAnswer) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpTestDNSAnswer) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorTestDNSAnswer(response, &metadata) - } - output := &TestDNSAnswerOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorTestDNSAnswer(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentTestDNSAnswerOutput(v **TestDNSAnswerOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *TestDNSAnswerOutput - if *v == nil { - sv = &TestDNSAnswerOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Nameserver", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Nameserver = ptr.String(xtv) - } - - case strings.EqualFold("Protocol", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Protocol = ptr.String(xtv) - } - - case strings.EqualFold("RecordData", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentRecordData(&sv.RecordData, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("RecordName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RecordName = ptr.String(xtv) - } - - case strings.EqualFold("RecordType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RecordType = types.RRType(xtv) - } - - case strings.EqualFold("ResponseCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResponseCode = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpUpdateHealthCheck struct { -} - -func (*awsRestxml_deserializeOpUpdateHealthCheck) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpUpdateHealthCheck) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorUpdateHealthCheck(response, &metadata) - } - output := &UpdateHealthCheckOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorUpdateHealthCheck(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("HealthCheckVersionMismatch", errorCode): - return awsRestxml_deserializeErrorHealthCheckVersionMismatch(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHealthCheck", errorCode): - return awsRestxml_deserializeErrorNoSuchHealthCheck(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentUpdateHealthCheckOutput(v **UpdateHealthCheckOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateHealthCheckOutput - if *v == nil { - sv = &UpdateHealthCheckOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HealthCheck", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheck(&sv.HealthCheck, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpUpdateHostedZoneComment struct { -} - -func (*awsRestxml_deserializeOpUpdateHostedZoneComment) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpUpdateHostedZoneComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response, &metadata) - } - output := &UpdateHostedZoneCommentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorUpdateHostedZoneComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchHostedZone", errorCode): - return awsRestxml_deserializeErrorNoSuchHostedZone(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentUpdateHostedZoneCommentOutput(v **UpdateHostedZoneCommentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateHostedZoneCommentOutput - if *v == nil { - sv = &UpdateHostedZoneCommentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZone", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZone(&sv.HostedZone, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpUpdateTrafficPolicyComment struct { -} - -func (*awsRestxml_deserializeOpUpdateTrafficPolicyComment) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpUpdateTrafficPolicyComment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response, &metadata) - } - output := &UpdateTrafficPolicyCommentOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorUpdateTrafficPolicyComment(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConcurrentModification", errorCode): - return awsRestxml_deserializeErrorConcurrentModification(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyCommentOutput(v **UpdateTrafficPolicyCommentOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateTrafficPolicyCommentOutput - if *v == nil { - sv = &UpdateTrafficPolicyCommentOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicy", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicy(&sv.TrafficPolicy, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -type awsRestxml_deserializeOpUpdateTrafficPolicyInstance struct { -} - -func (*awsRestxml_deserializeOpUpdateTrafficPolicyInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestxml_deserializeOpUpdateTrafficPolicyInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response, &metadata) - } - output := &UpdateTrafficPolicyInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - err = awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestxml_deserializeOpErrorUpdateTrafficPolicyInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ConflictingTypes", errorCode): - return awsRestxml_deserializeErrorConflictingTypes(response, errorBody) - - case strings.EqualFold("InvalidInput", errorCode): - return awsRestxml_deserializeErrorInvalidInput(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicy", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicy(response, errorBody) - - case strings.EqualFold("NoSuchTrafficPolicyInstance", errorCode): - return awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response, errorBody) - - case strings.EqualFold("PriorRequestNotComplete", errorCode): - return awsRestxml_deserializeErrorPriorRequestNotComplete(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestxml_deserializeOpDocumentUpdateTrafficPolicyInstanceOutput(v **UpdateTrafficPolicyInstanceOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *UpdateTrafficPolicyInstanceOutput - if *v == nil { - sv = &UpdateTrafficPolicyInstanceOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&sv.TrafficPolicyInstance, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeErrorCidrBlockInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CidrBlockInUseException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCidrBlockInUseException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorCidrCollectionAlreadyExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CidrCollectionAlreadyExistsException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorCidrCollectionInUseException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CidrCollectionInUseException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCidrCollectionInUseException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorCidrCollectionVersionMismatchException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CidrCollectionVersionMismatchException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorConcurrentModification(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConcurrentModification{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentConcurrentModification(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorConflictingDomainExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictingDomainExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentConflictingDomainExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorConflictingTypes(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictingTypes{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentConflictingTypes(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDelegationSetAlreadyCreated(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DelegationSetAlreadyCreated{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDelegationSetAlreadyReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DelegationSetAlreadyReusable{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDelegationSetInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DelegationSetInUse{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDelegationSetInUse(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDelegationSetNotAvailable(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DelegationSetNotAvailable{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDelegationSetNotAvailable(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDelegationSetNotReusable(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DelegationSetNotReusable{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDelegationSetNotReusable(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorDNSSECNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.DNSSECNotFound{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentDNSSECNotFound(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHealthCheckAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HealthCheckAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHealthCheckAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHealthCheckInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HealthCheckInUse{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHealthCheckInUse(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHealthCheckVersionMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HealthCheckVersionMismatch{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHealthCheckVersionMismatch(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHostedZoneAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HostedZoneAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHostedZoneAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHostedZoneNotEmpty(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HostedZoneNotEmpty{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHostedZoneNotEmpty(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHostedZoneNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HostedZoneNotFound{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHostedZoneNotFound(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHostedZoneNotPrivate(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HostedZoneNotPrivate{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHostedZoneNotPrivate(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorHostedZonePartiallyDelegated(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.HostedZonePartiallyDelegated{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorIncompatibleVersion(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IncompatibleVersion{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentIncompatibleVersion(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInsufficientCloudWatchLogsResourcePolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InsufficientCloudWatchLogsResourcePolicy{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidArgument(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidArgument{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidArgument(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidChangeBatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidChangeBatch{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidChangeBatch(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidDomainName(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidDomainName{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidDomainName(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidInput(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidInput{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidInput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidKeySigningKeyName(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidKeySigningKeyName{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidKeySigningKeyName(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidKeySigningKeyStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidKeySigningKeyStatus{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidKMSArn(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidKMSArn{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidKMSArn(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidPaginationToken(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidPaginationToken{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidPaginationToken(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidSigningStatus(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidSigningStatus{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidSigningStatus(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidTrafficPolicyDocument(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidTrafficPolicyDocument{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorInvalidVPCId(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidVPCId{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentInvalidVPCId(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorKeySigningKeyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.KeySigningKeyAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorKeySigningKeyInParentDSRecord(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.KeySigningKeyInParentDSRecord{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorKeySigningKeyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.KeySigningKeyInUse{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentKeySigningKeyInUse(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorKeySigningKeyWithActiveStatusNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.KeySigningKeyWithActiveStatusNotFound{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorLastVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.LastVPCAssociation{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentLastVPCAssociation(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorLimitsExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.LimitsExceeded{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentLimitsExceeded(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchChange(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchChange{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchChange(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchCidrCollectionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchCidrCollectionException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchCidrCollectionException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchCidrLocationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchCidrLocationException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchCidrLocationException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchCloudWatchLogsLogGroup(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchCloudWatchLogsLogGroup{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchDelegationSet(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchDelegationSet{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchDelegationSet(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchGeoLocation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchGeoLocation{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchGeoLocation(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchHealthCheck(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchHealthCheck{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchHealthCheck(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchHostedZone(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchHostedZone{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchHostedZone(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchKeySigningKey(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchKeySigningKey{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchKeySigningKey(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchQueryLoggingConfig(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchQueryLoggingConfig{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchTrafficPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchTrafficPolicy{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchTrafficPolicy(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNoSuchTrafficPolicyInstance(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NoSuchTrafficPolicyInstance{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorNotAuthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NotAuthorizedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentNotAuthorizedException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorPriorRequestNotComplete(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PriorRequestNotComplete{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentPriorRequestNotComplete(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorPublicZoneVPCAssociation(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PublicZoneVPCAssociation{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentPublicZoneVPCAssociation(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorQueryLoggingConfigAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.QueryLoggingConfigAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentThrottlingException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyHealthChecks(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyHealthChecks{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyHealthChecks(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyHostedZones(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyHostedZones{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyHostedZones(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyKeySigningKeys(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyKeySigningKeys{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyKeySigningKeys(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyTrafficPolicies(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyTrafficPolicies{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyTrafficPolicies(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyTrafficPolicyInstances(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyTrafficPolicyInstances{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyTrafficPolicyVersionsForCurrentPolicy(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTooManyVPCAssociationAuthorizations(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyVPCAssociationAuthorizations{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTrafficPolicyAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TrafficPolicyAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTrafficPolicyInstanceAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TrafficPolicyInstanceAlreadyExists{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorTrafficPolicyInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TrafficPolicyInUse{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentTrafficPolicyInUse(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorVPCAssociationAuthorizationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.VPCAssociationAuthorizationNotFound{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeErrorVPCAssociationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.VPCAssociationNotFound{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsRestxml_deserializeDocumentVPCAssociationNotFound(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsRestxml_deserializeDocumentAccountLimit(v **types.AccountLimit, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AccountLimit - if *v == nil { - sv = &types.AccountLimit{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.AccountLimitType(xtv) - } - - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Value = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentAlarmIdentifier(v **types.AlarmIdentifier, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AlarmIdentifier - if *v == nil { - sv = &types.AlarmIdentifier{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = types.CloudWatchRegion(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentAliasTarget(v **types.AliasTarget, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AliasTarget - if *v == nil { - sv = &types.AliasTarget{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DNSName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DNSName = ptr.String(xtv) - } - - case strings.EqualFold("EvaluateTargetHealth", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected AliasHealthEnabled to be of type *bool, got %T instead", val) - } - sv.EvaluateTargetHealth = xtv - } - - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentChangeInfo(v **types.ChangeInfo, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ChangeInfo - if *v == nil { - sv = &types.ChangeInfo{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Comment", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Comment = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("Status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = types.ChangeStatus(xtv) - } - - case strings.EqualFold("SubmittedAt", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.SubmittedAt = ptr.Time(t) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCheckerIpRanges(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("member", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCheckerIpRangesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentChildHealthCheckList(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("ChildHealthCheck", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentChildHealthCheckListUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentCidrBlockInUseException(v **types.CidrBlockInUseException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrBlockInUseException - if *v == nil { - sv = &types.CidrBlockInUseException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrBlockSummaries(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CidrBlockSummary - if *v == nil { - sv = make([]types.CidrBlockSummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.CidrBlockSummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrBlockSummariesUnwrapped(v *[]types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { - var sv []types.CidrBlockSummary - if *v == nil { - sv = make([]types.CidrBlockSummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CidrBlockSummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentCidrBlockSummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentCidrBlockSummary(v **types.CidrBlockSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrBlockSummary - if *v == nil { - sv = &types.CidrBlockSummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CidrBlock", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CidrBlock = ptr.String(xtv) - } - - case strings.EqualFold("LocationName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocationName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrCollection(v **types.CidrCollection, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrCollection - if *v == nil { - sv = &types.CidrCollection{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Version = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrCollectionAlreadyExistsException(v **types.CidrCollectionAlreadyExistsException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrCollectionAlreadyExistsException - if *v == nil { - sv = &types.CidrCollectionAlreadyExistsException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrCollectionInUseException(v **types.CidrCollectionInUseException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrCollectionInUseException - if *v == nil { - sv = &types.CidrCollectionInUseException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrCollectionVersionMismatchException(v **types.CidrCollectionVersionMismatchException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrCollectionVersionMismatchException - if *v == nil { - sv = &types.CidrCollectionVersionMismatchException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCidrRoutingConfig(v **types.CidrRoutingConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CidrRoutingConfig - if *v == nil { - sv = &types.CidrRoutingConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CollectionId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CollectionId = ptr.String(xtv) - } - - case strings.EqualFold("LocationName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocationName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(v **types.CloudWatchAlarmConfiguration, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CloudWatchAlarmConfiguration - if *v == nil { - sv = &types.CloudWatchAlarmConfiguration{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ComparisonOperator", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ComparisonOperator = types.ComparisonOperator(xtv) - } - - case strings.EqualFold("Dimensions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDimensionList(&sv.Dimensions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("EvaluationPeriods", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.EvaluationPeriods = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("MetricName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.MetricName = ptr.String(xtv) - } - - case strings.EqualFold("Namespace", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Namespace = ptr.String(xtv) - } - - case strings.EqualFold("Period", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Period = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Statistic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Statistic = types.Statistic(xtv) - } - - case strings.EqualFold("Threshold", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - f64, err := strconv.ParseFloat(xtv, 64) - if err != nil { - return err - } - sv.Threshold = ptr.Float64(f64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCollectionSummaries(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.CollectionSummary - if *v == nil { - sv = make([]types.CollectionSummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.CollectionSummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCollectionSummariesUnwrapped(v *[]types.CollectionSummary, decoder smithyxml.NodeDecoder) error { - var sv []types.CollectionSummary - if *v == nil { - sv = make([]types.CollectionSummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.CollectionSummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentCollectionSummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentCollectionSummary(v **types.CollectionSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.CollectionSummary - if *v == nil { - sv = &types.CollectionSummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Version = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentConcurrentModification(v **types.ConcurrentModification, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConcurrentModification - if *v == nil { - sv = &types.ConcurrentModification{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentConflictingDomainExists(v **types.ConflictingDomainExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConflictingDomainExists - if *v == nil { - sv = &types.ConflictingDomainExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentConflictingTypes(v **types.ConflictingTypes, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ConflictingTypes - if *v == nil { - sv = &types.ConflictingTypes{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentCoordinates(v **types.Coordinates, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Coordinates - if *v == nil { - sv = &types.Coordinates{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Latitude", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Latitude = ptr.String(xtv) - } - - case strings.EqualFold("Longitude", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Longitude = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSet(v **types.DelegationSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSet - if *v == nil { - sv = &types.DelegationSet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CallerReference", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CallerReference = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("NameServers", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentDelegationSetNameServers(&sv.NameServers, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetAlreadyCreated(v **types.DelegationSetAlreadyCreated, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSetAlreadyCreated - if *v == nil { - sv = &types.DelegationSetAlreadyCreated{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetAlreadyReusable(v **types.DelegationSetAlreadyReusable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSetAlreadyReusable - if *v == nil { - sv = &types.DelegationSetAlreadyReusable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetInUse(v **types.DelegationSetInUse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSetInUse - if *v == nil { - sv = &types.DelegationSetInUse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetNameServers(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("NameServer", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetNameServersUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentDelegationSetNotAvailable(v **types.DelegationSetNotAvailable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSetNotAvailable - if *v == nil { - sv = &types.DelegationSetNotAvailable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetNotReusable(v **types.DelegationSetNotReusable, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DelegationSetNotReusable - if *v == nil { - sv = &types.DelegationSetNotReusable{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSets(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.DelegationSet - if *v == nil { - sv = make([]types.DelegationSet, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("DelegationSet", t.Name.Local): - var col types.DelegationSet - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDelegationSetsUnwrapped(v *[]types.DelegationSet, decoder smithyxml.NodeDecoder) error { - var sv []types.DelegationSet - if *v == nil { - sv = make([]types.DelegationSet, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.DelegationSet - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentDelegationSet(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentDimension(v **types.Dimension, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Dimension - if *v == nil { - sv = &types.Dimension{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDimensionList(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Dimension - if *v == nil { - sv = make([]types.Dimension, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("Dimension", t.Name.Local): - var col types.Dimension - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDimensionListUnwrapped(v *[]types.Dimension, decoder smithyxml.NodeDecoder) error { - var sv []types.Dimension - if *v == nil { - sv = make([]types.Dimension, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Dimension - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentDimension(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentDNSSECNotFound(v **types.DNSSECNotFound, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DNSSECNotFound - if *v == nil { - sv = &types.DNSSECNotFound{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentDNSSECStatus(v **types.DNSSECStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.DNSSECStatus - if *v == nil { - sv = &types.DNSSECStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ServeSignature", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServeSignature = ptr.String(xtv) - } - - case strings.EqualFold("StatusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentErrorMessages(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("Message", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentErrorMessagesUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentGeoLocation(v **types.GeoLocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GeoLocation - if *v == nil { - sv = &types.GeoLocation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ContinentCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ContinentCode = ptr.String(xtv) - } - - case strings.EqualFold("CountryCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CountryCode = ptr.String(xtv) - } - - case strings.EqualFold("SubdivisionCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubdivisionCode = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentGeoLocationDetails(v **types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GeoLocationDetails - if *v == nil { - sv = &types.GeoLocationDetails{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ContinentCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ContinentCode = ptr.String(xtv) - } - - case strings.EqualFold("ContinentName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ContinentName = ptr.String(xtv) - } - - case strings.EqualFold("CountryCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CountryCode = ptr.String(xtv) - } - - case strings.EqualFold("CountryName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CountryName = ptr.String(xtv) - } - - case strings.EqualFold("SubdivisionCode", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubdivisionCode = ptr.String(xtv) - } - - case strings.EqualFold("SubdivisionName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubdivisionName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentGeoLocationDetailsList(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.GeoLocationDetails - if *v == nil { - sv = make([]types.GeoLocationDetails, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("GeoLocationDetails", t.Name.Local): - var col types.GeoLocationDetails - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentGeoLocationDetailsListUnwrapped(v *[]types.GeoLocationDetails, decoder smithyxml.NodeDecoder) error { - var sv []types.GeoLocationDetails - if *v == nil { - sv = make([]types.GeoLocationDetails, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.GeoLocationDetails - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentGeoLocationDetails(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentGeoProximityLocation(v **types.GeoProximityLocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.GeoProximityLocation - if *v == nil { - sv = &types.GeoProximityLocation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AWSRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AWSRegion = ptr.String(xtv) - } - - case strings.EqualFold("Bias", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Bias = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Coordinates", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCoordinates(&sv.Coordinates, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("LocalZoneGroup", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocalZoneGroup = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheck(v **types.HealthCheck, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheck - if *v == nil { - sv = &types.HealthCheck{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CallerReference", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CallerReference = ptr.String(xtv) - } - - case strings.EqualFold("CloudWatchAlarmConfiguration", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCloudWatchAlarmConfiguration(&sv.CloudWatchAlarmConfiguration, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("HealthCheckConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheckConfig(&sv.HealthCheckConfig, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("HealthCheckVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HealthCheckVersion = ptr.Int64(i64) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("LinkedService", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckAlreadyExists(v **types.HealthCheckAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheckAlreadyExists - if *v == nil { - sv = &types.HealthCheckAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckConfig(v **types.HealthCheckConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheckConfig - if *v == nil { - sv = &types.HealthCheckConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AlarmIdentifier", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentAlarmIdentifier(&sv.AlarmIdentifier, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("ChildHealthChecks", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentChildHealthCheckList(&sv.ChildHealthChecks, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Disabled", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Disabled to be of type *bool, got %T instead", val) - } - sv.Disabled = ptr.Bool(xtv) - } - - case strings.EqualFold("EnableSNI", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected EnableSNI to be of type *bool, got %T instead", val) - } - sv.EnableSNI = ptr.Bool(xtv) - } - - case strings.EqualFold("FailureThreshold", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.FailureThreshold = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("FullyQualifiedDomainName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FullyQualifiedDomainName = ptr.String(xtv) - } - - case strings.EqualFold("HealthThreshold", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.HealthThreshold = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("InsufficientDataHealthStatus", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.InsufficientDataHealthStatus = types.InsufficientDataHealthStatus(xtv) - } - - case strings.EqualFold("Inverted", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected Inverted to be of type *bool, got %T instead", val) - } - sv.Inverted = ptr.Bool(xtv) - } - - case strings.EqualFold("IPAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IPAddress = ptr.String(xtv) - } - - case strings.EqualFold("MeasureLatency", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected MeasureLatency to be of type *bool, got %T instead", val) - } - sv.MeasureLatency = ptr.Bool(xtv) - } - - case strings.EqualFold("Port", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Regions", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHealthCheckRegionList(&sv.Regions, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("RequestInterval", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.RequestInterval = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("ResourcePath", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourcePath = ptr.String(xtv) - } - - case strings.EqualFold("RoutingControlArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.RoutingControlArn = ptr.String(xtv) - } - - case strings.EqualFold("SearchString", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SearchString = ptr.String(xtv) - } - - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.HealthCheckType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckInUse(v **types.HealthCheckInUse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheckInUse - if *v == nil { - sv = &types.HealthCheckInUse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckObservation(v **types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheckObservation - if *v == nil { - sv = &types.HealthCheckObservation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("IPAddress", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.IPAddress = ptr.String(xtv) - } - - case strings.EqualFold("Region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = types.HealthCheckRegion(xtv) - } - - case strings.EqualFold("StatusReport", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentStatusReport(&sv.StatusReport, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckObservations(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HealthCheckObservation - if *v == nil { - sv = make([]types.HealthCheckObservation, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("HealthCheckObservation", t.Name.Local): - var col types.HealthCheckObservation - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckObservationsUnwrapped(v *[]types.HealthCheckObservation, decoder smithyxml.NodeDecoder) error { - var sv []types.HealthCheckObservation - if *v == nil { - sv = make([]types.HealthCheckObservation, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HealthCheckObservation - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentHealthCheckObservation(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentHealthCheckRegionList(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HealthCheckRegion - if *v == nil { - sv = make([]types.HealthCheckRegion, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("Region", t.Name.Local): - var col types.HealthCheckRegion - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = types.HealthCheckRegion(xtv) - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthCheckRegionListUnwrapped(v *[]types.HealthCheckRegion, decoder smithyxml.NodeDecoder) error { - var sv []types.HealthCheckRegion - if *v == nil { - sv = make([]types.HealthCheckRegion, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HealthCheckRegion - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = types.HealthCheckRegion(xtv) - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentHealthChecks(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HealthCheck - if *v == nil { - sv = make([]types.HealthCheck, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("HealthCheck", t.Name.Local): - var col types.HealthCheck - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHealthChecksUnwrapped(v *[]types.HealthCheck, decoder smithyxml.NodeDecoder) error { - var sv []types.HealthCheck - if *v == nil { - sv = make([]types.HealthCheck, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HealthCheck - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentHealthCheck(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentHealthCheckVersionMismatch(v **types.HealthCheckVersionMismatch, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HealthCheckVersionMismatch - if *v == nil { - sv = &types.HealthCheckVersionMismatch{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZone(v **types.HostedZone, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZone - if *v == nil { - sv = &types.HostedZone{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CallerReference", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CallerReference = ptr.String(xtv) - } - - case strings.EqualFold("Config", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZoneConfig(&sv.Config, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("LinkedService", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentLinkedService(&sv.LinkedService, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("ResourceRecordSetCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.ResourceRecordSetCount = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneAlreadyExists(v **types.HostedZoneAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneAlreadyExists - if *v == nil { - sv = &types.HostedZoneAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneConfig(v **types.HostedZoneConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneConfig - if *v == nil { - sv = &types.HostedZoneConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Comment", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Comment = ptr.String(xtv) - } - - case strings.EqualFold("PrivateZone", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected IsPrivateZone to be of type *bool, got %T instead", val) - } - sv.PrivateZone = xtv - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneLimit(v **types.HostedZoneLimit, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneLimit - if *v == nil { - sv = &types.HostedZoneLimit{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.HostedZoneLimitType(xtv) - } - - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Value = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneNotEmpty(v **types.HostedZoneNotEmpty, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneNotEmpty - if *v == nil { - sv = &types.HostedZoneNotEmpty{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneNotFound(v **types.HostedZoneNotFound, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneNotFound - if *v == nil { - sv = &types.HostedZoneNotFound{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneNotPrivate(v **types.HostedZoneNotPrivate, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneNotPrivate - if *v == nil { - sv = &types.HostedZoneNotPrivate{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneOwner(v **types.HostedZoneOwner, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneOwner - if *v == nil { - sv = &types.HostedZoneOwner{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("OwningAccount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwningAccount = ptr.String(xtv) - } - - case strings.EqualFold("OwningService", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.OwningService = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZonePartiallyDelegated(v **types.HostedZonePartiallyDelegated, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZonePartiallyDelegated - if *v == nil { - sv = &types.HostedZonePartiallyDelegated{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZones(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HostedZone - if *v == nil { - sv = make([]types.HostedZone, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("HostedZone", t.Name.Local): - var col types.HostedZone - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZonesUnwrapped(v *[]types.HostedZone, decoder smithyxml.NodeDecoder) error { - var sv []types.HostedZone - if *v == nil { - sv = make([]types.HostedZone, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HostedZone - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentHostedZone(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentHostedZoneSummaries(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.HostedZoneSummary - if *v == nil { - sv = make([]types.HostedZoneSummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("HostedZoneSummary", t.Name.Local): - var col types.HostedZoneSummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentHostedZoneSummariesUnwrapped(v *[]types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { - var sv []types.HostedZoneSummary - if *v == nil { - sv = make([]types.HostedZoneSummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.HostedZoneSummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentHostedZoneSummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentHostedZoneSummary(v **types.HostedZoneSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.HostedZoneSummary - if *v == nil { - sv = &types.HostedZoneSummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Owner", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentHostedZoneOwner(&sv.Owner, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentIncompatibleVersion(v **types.IncompatibleVersion, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IncompatibleVersion - if *v == nil { - sv = &types.IncompatibleVersion{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInsufficientCloudWatchLogsResourcePolicy(v **types.InsufficientCloudWatchLogsResourcePolicy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InsufficientCloudWatchLogsResourcePolicy - if *v == nil { - sv = &types.InsufficientCloudWatchLogsResourcePolicy{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidArgument(v **types.InvalidArgument, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidArgument - if *v == nil { - sv = &types.InvalidArgument{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidChangeBatch(v **types.InvalidChangeBatch, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidChangeBatch - if *v == nil { - sv = &types.InvalidChangeBatch{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - case strings.EqualFold("messages", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentErrorMessages(&sv.Messages, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidDomainName(v **types.InvalidDomainName, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidDomainName - if *v == nil { - sv = &types.InvalidDomainName{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidInput(v **types.InvalidInput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidInput - if *v == nil { - sv = &types.InvalidInput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidKeySigningKeyName(v **types.InvalidKeySigningKeyName, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidKeySigningKeyName - if *v == nil { - sv = &types.InvalidKeySigningKeyName{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidKeySigningKeyStatus(v **types.InvalidKeySigningKeyStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidKeySigningKeyStatus - if *v == nil { - sv = &types.InvalidKeySigningKeyStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidKMSArn(v **types.InvalidKMSArn, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidKMSArn - if *v == nil { - sv = &types.InvalidKMSArn{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidPaginationToken(v **types.InvalidPaginationToken, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidPaginationToken - if *v == nil { - sv = &types.InvalidPaginationToken{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidSigningStatus(v **types.InvalidSigningStatus, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidSigningStatus - if *v == nil { - sv = &types.InvalidSigningStatus{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidTrafficPolicyDocument(v **types.InvalidTrafficPolicyDocument, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidTrafficPolicyDocument - if *v == nil { - sv = &types.InvalidTrafficPolicyDocument{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentInvalidVPCId(v **types.InvalidVPCId, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidVPCId - if *v == nil { - sv = &types.InvalidVPCId{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKey(v **types.KeySigningKey, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeySigningKey - if *v == nil { - sv = &types.KeySigningKey{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CreatedDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(t) - } - - case strings.EqualFold("DigestAlgorithmMnemonic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DigestAlgorithmMnemonic = ptr.String(xtv) - } - - case strings.EqualFold("DigestAlgorithmType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.DigestAlgorithmType = int32(i64) - } - - case strings.EqualFold("DigestValue", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DigestValue = ptr.String(xtv) - } - - case strings.EqualFold("DNSKEYRecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DNSKEYRecord = ptr.String(xtv) - } - - case strings.EqualFold("DSRecord", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DSRecord = ptr.String(xtv) - } - - case strings.EqualFold("Flag", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Flag = int32(i64) - } - - case strings.EqualFold("KeyTag", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.KeyTag = int32(i64) - } - - case strings.EqualFold("KmsArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.KmsArn = ptr.String(xtv) - } - - case strings.EqualFold("LastModifiedDate", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.LastModifiedDate = ptr.Time(t) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("PublicKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.PublicKey = ptr.String(xtv) - } - - case strings.EqualFold("SigningAlgorithmMnemonic", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SigningAlgorithmMnemonic = ptr.String(xtv) - } - - case strings.EqualFold("SigningAlgorithmType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.SigningAlgorithmType = int32(i64) - } - - case strings.EqualFold("Status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - case strings.EqualFold("StatusMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.StatusMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKeyAlreadyExists(v **types.KeySigningKeyAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeySigningKeyAlreadyExists - if *v == nil { - sv = &types.KeySigningKeyAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKeyInParentDSRecord(v **types.KeySigningKeyInParentDSRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeySigningKeyInParentDSRecord - if *v == nil { - sv = &types.KeySigningKeyInParentDSRecord{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKeyInUse(v **types.KeySigningKeyInUse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeySigningKeyInUse - if *v == nil { - sv = &types.KeySigningKeyInUse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKeys(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.KeySigningKey - if *v == nil { - sv = make([]types.KeySigningKey, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.KeySigningKey - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentKeySigningKeysUnwrapped(v *[]types.KeySigningKey, decoder smithyxml.NodeDecoder) error { - var sv []types.KeySigningKey - if *v == nil { - sv = make([]types.KeySigningKey, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.KeySigningKey - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentKeySigningKey(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentKeySigningKeyWithActiveStatusNotFound(v **types.KeySigningKeyWithActiveStatusNotFound, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.KeySigningKeyWithActiveStatusNotFound - if *v == nil { - sv = &types.KeySigningKeyWithActiveStatusNotFound{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentLastVPCAssociation(v **types.LastVPCAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LastVPCAssociation - if *v == nil { - sv = &types.LastVPCAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentLimitsExceeded(v **types.LimitsExceeded, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LimitsExceeded - if *v == nil { - sv = &types.LimitsExceeded{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentLinkedService(v **types.LinkedService, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LinkedService - if *v == nil { - sv = &types.LinkedService{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Description", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Description = ptr.String(xtv) - } - - case strings.EqualFold("ServicePrincipal", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ServicePrincipal = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentLocationSummaries(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.LocationSummary - if *v == nil { - sv = make([]types.LocationSummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("member", t.Name.Local): - var col types.LocationSummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentLocationSummariesUnwrapped(v *[]types.LocationSummary, decoder smithyxml.NodeDecoder) error { - var sv []types.LocationSummary - if *v == nil { - sv = make([]types.LocationSummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.LocationSummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentLocationSummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentLocationSummary(v **types.LocationSummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.LocationSummary - if *v == nil { - sv = &types.LocationSummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("LocationName", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.LocationName = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchChange(v **types.NoSuchChange, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchChange - if *v == nil { - sv = &types.NoSuchChange{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchCidrCollectionException(v **types.NoSuchCidrCollectionException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchCidrCollectionException - if *v == nil { - sv = &types.NoSuchCidrCollectionException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchCidrLocationException(v **types.NoSuchCidrLocationException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchCidrLocationException - if *v == nil { - sv = &types.NoSuchCidrLocationException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchCloudWatchLogsLogGroup(v **types.NoSuchCloudWatchLogsLogGroup, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchCloudWatchLogsLogGroup - if *v == nil { - sv = &types.NoSuchCloudWatchLogsLogGroup{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchDelegationSet(v **types.NoSuchDelegationSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchDelegationSet - if *v == nil { - sv = &types.NoSuchDelegationSet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchGeoLocation(v **types.NoSuchGeoLocation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchGeoLocation - if *v == nil { - sv = &types.NoSuchGeoLocation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchHealthCheck(v **types.NoSuchHealthCheck, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchHealthCheck - if *v == nil { - sv = &types.NoSuchHealthCheck{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchHostedZone(v **types.NoSuchHostedZone, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchHostedZone - if *v == nil { - sv = &types.NoSuchHostedZone{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchKeySigningKey(v **types.NoSuchKeySigningKey, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchKeySigningKey - if *v == nil { - sv = &types.NoSuchKeySigningKey{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchQueryLoggingConfig(v **types.NoSuchQueryLoggingConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchQueryLoggingConfig - if *v == nil { - sv = &types.NoSuchQueryLoggingConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchTrafficPolicy(v **types.NoSuchTrafficPolicy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchTrafficPolicy - if *v == nil { - sv = &types.NoSuchTrafficPolicy{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNoSuchTrafficPolicyInstance(v **types.NoSuchTrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NoSuchTrafficPolicyInstance - if *v == nil { - sv = &types.NoSuchTrafficPolicyInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentNotAuthorizedException(v **types.NotAuthorizedException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.NotAuthorizedException - if *v == nil { - sv = &types.NotAuthorizedException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentPriorRequestNotComplete(v **types.PriorRequestNotComplete, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PriorRequestNotComplete - if *v == nil { - sv = &types.PriorRequestNotComplete{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentPublicZoneVPCAssociation(v **types.PublicZoneVPCAssociation, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PublicZoneVPCAssociation - if *v == nil { - sv = &types.PublicZoneVPCAssociation{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentQueryLoggingConfig(v **types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.QueryLoggingConfig - if *v == nil { - sv = &types.QueryLoggingConfig{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CloudWatchLogsLogGroupArn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.CloudWatchLogsLogGroupArn = ptr.String(xtv) - } - - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentQueryLoggingConfigAlreadyExists(v **types.QueryLoggingConfigAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.QueryLoggingConfigAlreadyExists - if *v == nil { - sv = &types.QueryLoggingConfigAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentQueryLoggingConfigs(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.QueryLoggingConfig - if *v == nil { - sv = make([]types.QueryLoggingConfig, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("QueryLoggingConfig", t.Name.Local): - var col types.QueryLoggingConfig - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentQueryLoggingConfigsUnwrapped(v *[]types.QueryLoggingConfig, decoder smithyxml.NodeDecoder) error { - var sv []types.QueryLoggingConfig - if *v == nil { - sv = make([]types.QueryLoggingConfig, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.QueryLoggingConfig - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentQueryLoggingConfig(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentRecordData(v *[]string, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - decoder = memberDecoder - switch { - case strings.EqualFold("RecordDataEntry", t.Name.Local): - var col string - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - col = xtv - } - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentRecordDataUnwrapped(v *[]string, decoder smithyxml.NodeDecoder) error { - var sv []string - if *v == nil { - sv = make([]string, 0) - } else { - sv = *v - } - - switch { - default: - var mv string - t := decoder.StartEl - _ = t - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - mv = xtv - } - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentResourceRecord(v **types.ResourceRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResourceRecord - if *v == nil { - sv = &types.ResourceRecord{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceRecords(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ResourceRecord - if *v == nil { - sv = make([]types.ResourceRecord, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("ResourceRecord", t.Name.Local): - var col types.ResourceRecord - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceRecordsUnwrapped(v *[]types.ResourceRecord, decoder smithyxml.NodeDecoder) error { - var sv []types.ResourceRecord - if *v == nil { - sv = make([]types.ResourceRecord, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ResourceRecord - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentResourceRecord(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentResourceRecordSet(v **types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResourceRecordSet - if *v == nil { - sv = &types.ResourceRecordSet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AliasTarget", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentAliasTarget(&sv.AliasTarget, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("CidrRoutingConfig", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentCidrRoutingConfig(&sv.CidrRoutingConfig, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Failover", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Failover = types.ResourceRecordSetFailover(xtv) - } - - case strings.EqualFold("GeoLocation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentGeoLocation(&sv.GeoLocation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("GeoProximityLocation", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentGeoProximityLocation(&sv.GeoProximityLocation, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("HealthCheckId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HealthCheckId = ptr.String(xtv) - } - - case strings.EqualFold("MultiValueAnswer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv, err := strconv.ParseBool(string(val)) - if err != nil { - return fmt.Errorf("expected ResourceRecordSetMultiValueAnswer to be of type *bool, got %T instead", val) - } - sv.MultiValueAnswer = ptr.Bool(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Region", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Region = types.ResourceRecordSetRegion(xtv) - } - - case strings.EqualFold("ResourceRecords", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentResourceRecords(&sv.ResourceRecords, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("SetIdentifier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SetIdentifier = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyInstanceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyInstanceId = ptr.String(xtv) - } - - case strings.EqualFold("TTL", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TTL = ptr.Int64(i64) - } - - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.RRType(xtv) - } - - case strings.EqualFold("Weight", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Weight = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceRecordSets(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ResourceRecordSet - if *v == nil { - sv = make([]types.ResourceRecordSet, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("ResourceRecordSet", t.Name.Local): - var col types.ResourceRecordSet - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceRecordSetsUnwrapped(v *[]types.ResourceRecordSet, decoder smithyxml.NodeDecoder) error { - var sv []types.ResourceRecordSet - if *v == nil { - sv = make([]types.ResourceRecordSet, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ResourceRecordSet - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentResourceRecordSet(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentResourceTagSet(v **types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ResourceTagSet - if *v == nil { - sv = &types.ResourceTagSet{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("ResourceId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceId = ptr.String(xtv) - } - - case strings.EqualFold("ResourceType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.ResourceType = types.TagResourceType(xtv) - } - - case strings.EqualFold("Tags", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsRestxml_deserializeDocumentTagList(&sv.Tags, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceTagSetList(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.ResourceTagSet - if *v == nil { - sv = make([]types.ResourceTagSet, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("ResourceTagSet", t.Name.Local): - var col types.ResourceTagSet - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentResourceTagSetListUnwrapped(v *[]types.ResourceTagSet, decoder smithyxml.NodeDecoder) error { - var sv []types.ResourceTagSet - if *v == nil { - sv = make([]types.ResourceTagSet, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.ResourceTagSet - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentResourceTagSet(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentReusableDelegationSetLimit(v **types.ReusableDelegationSetLimit, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ReusableDelegationSetLimit - if *v == nil { - sv = &types.ReusableDelegationSetLimit{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.ReusableDelegationSetLimitType(xtv) - } - - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Value = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentStatusReport(v **types.StatusReport, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.StatusReport - if *v == nil { - sv = &types.StatusReport{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("CheckedTime", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.CheckedTime = ptr.Time(t) - } - - case strings.EqualFold("Status", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Status = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTag(v **types.Tag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Tag - if *v == nil { - sv = &types.Tag{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Key", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Key = ptr.String(xtv) - } - - case strings.EqualFold("Value", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Value = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTagList(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.Tag - if *v == nil { - sv = make([]types.Tag, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("Tag", t.Name.Local): - var col types.Tag - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTagListUnwrapped(v *[]types.Tag, decoder smithyxml.NodeDecoder) error { - var sv []types.Tag - if *v == nil { - sv = make([]types.Tag, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.Tag - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTag(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentThrottlingException(v **types.ThrottlingException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ThrottlingException - if *v == nil { - sv = &types.ThrottlingException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyHealthChecks(v **types.TooManyHealthChecks, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyHealthChecks - if *v == nil { - sv = &types.TooManyHealthChecks{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyHostedZones(v **types.TooManyHostedZones, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyHostedZones - if *v == nil { - sv = &types.TooManyHostedZones{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyKeySigningKeys(v **types.TooManyKeySigningKeys, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyKeySigningKeys - if *v == nil { - sv = &types.TooManyKeySigningKeys{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyTrafficPolicies(v **types.TooManyTrafficPolicies, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyTrafficPolicies - if *v == nil { - sv = &types.TooManyTrafficPolicies{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyTrafficPolicyInstances(v **types.TooManyTrafficPolicyInstances, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyTrafficPolicyInstances - if *v == nil { - sv = &types.TooManyTrafficPolicyInstances{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyTrafficPolicyVersionsForCurrentPolicy(v **types.TooManyTrafficPolicyVersionsForCurrentPolicy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyTrafficPolicyVersionsForCurrentPolicy - if *v == nil { - sv = &types.TooManyTrafficPolicyVersionsForCurrentPolicy{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTooManyVPCAssociationAuthorizations(v **types.TooManyVPCAssociationAuthorizations, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TooManyVPCAssociationAuthorizations - if *v == nil { - sv = &types.TooManyVPCAssociationAuthorizations{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicies(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficPolicy - if *v == nil { - sv = make([]types.TrafficPolicy, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("TrafficPolicy", t.Name.Local): - var col types.TrafficPolicy - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPoliciesUnwrapped(v *[]types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficPolicy - if *v == nil { - sv = make([]types.TrafficPolicy, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficPolicy - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTrafficPolicy(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentTrafficPolicy(v **types.TrafficPolicy, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicy - if *v == nil { - sv = &types.TrafficPolicy{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Comment", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Comment = ptr.String(xtv) - } - - case strings.EqualFold("Document", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Document = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.RRType(xtv) - } - - case strings.EqualFold("Version", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.Version = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicyAlreadyExists(v **types.TrafficPolicyAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicyAlreadyExists - if *v == nil { - sv = &types.TrafficPolicyAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicyInstance(v **types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicyInstance - if *v == nil { - sv = &types.TrafficPolicyInstance{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("HostedZoneId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.HostedZoneId = ptr.String(xtv) - } - - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("Message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("State", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.State = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyId = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.TrafficPolicyType = types.RRType(xtv) - } - - case strings.EqualFold("TrafficPolicyVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TrafficPolicyVersion = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("TTL", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TTL = ptr.Int64(i64) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicyInstanceAlreadyExists(v **types.TrafficPolicyInstanceAlreadyExists, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicyInstanceAlreadyExists - if *v == nil { - sv = &types.TrafficPolicyInstanceAlreadyExists{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicyInstances(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficPolicyInstance - if *v == nil { - sv = make([]types.TrafficPolicyInstance, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("TrafficPolicyInstance", t.Name.Local): - var col types.TrafficPolicyInstance - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicyInstancesUnwrapped(v *[]types.TrafficPolicyInstance, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficPolicyInstance - if *v == nil { - sv = make([]types.TrafficPolicyInstance, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficPolicyInstance - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTrafficPolicyInstance(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentTrafficPolicyInUse(v **types.TrafficPolicyInUse, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicyInUse - if *v == nil { - sv = &types.TrafficPolicyInUse{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicySummaries(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.TrafficPolicySummary - if *v == nil { - sv = make([]types.TrafficPolicySummary, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("TrafficPolicySummary", t.Name.Local): - var col types.TrafficPolicySummary - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentTrafficPolicySummariesUnwrapped(v *[]types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { - var sv []types.TrafficPolicySummary - if *v == nil { - sv = make([]types.TrafficPolicySummary, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.TrafficPolicySummary - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentTrafficPolicySummary(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} -func awsRestxml_deserializeDocumentTrafficPolicySummary(v **types.TrafficPolicySummary, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.TrafficPolicySummary - if *v == nil { - sv = &types.TrafficPolicySummary{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Id", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Id = ptr.String(xtv) - } - - case strings.EqualFold("LatestVersion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.LatestVersion = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Name", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Name = ptr.String(xtv) - } - - case strings.EqualFold("TrafficPolicyCount", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.TrafficPolicyCount = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Type", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Type = types.RRType(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentVPC(v **types.VPC, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VPC - if *v == nil { - sv = &types.VPC{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("VPCId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VPCId = ptr.String(xtv) - } - - case strings.EqualFold("VPCRegion", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.VPCRegion = types.VPCRegion(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentVPCAssociationAuthorizationNotFound(v **types.VPCAssociationAuthorizationNotFound, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VPCAssociationAuthorizationNotFound - if *v == nil { - sv = &types.VPCAssociationAuthorizationNotFound{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentVPCAssociationNotFound(v **types.VPCAssociationNotFound, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.VPCAssociationNotFound - if *v == nil { - sv = &types.VPCAssociationNotFound{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentVPCs(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv []types.VPC - if *v == nil { - sv = make([]types.VPC, 0) - } else { - sv = *v - } - - originalDecoder := decoder - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - switch { - case strings.EqualFold("VPC", t.Name.Local): - var col types.VPC - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &col - if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { - return err - } - col = *destAddr - sv = append(sv, col) - - default: - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsRestxml_deserializeDocumentVPCsUnwrapped(v *[]types.VPC, decoder smithyxml.NodeDecoder) error { - var sv []types.VPC - if *v == nil { - sv = make([]types.VPC, 0) - } else { - sv = *v - } - - switch { - default: - var mv types.VPC - t := decoder.StartEl - _ = t - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - destAddr := &mv - if err := awsRestxml_deserializeDocumentVPC(&destAddr, nodeDecoder); err != nil { - return err - } - mv = *destAddr - sv = append(sv, mv) - } - *v = sv - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go deleted file mode 100644 index 1cdd613a4a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/doc.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package route53 provides the API client, operations, and parameter types for -// Amazon Route 53. -// -// Amazon Route 53 is a highly available and scalable Domain Name System (DNS) web -// service. -// -// You can use Route 53 to: -// -// - Register domain names. -// -// For more information, see [How domain registration works]. -// -// - Route internet traffic to the resources for your domain -// -// For more information, see [How internet traffic is routed to your website or web application]. -// -// - Check the health of your resources. -// -// For more information, see [How Route 53 checks the health of your resources]. -// -// [How domain registration works]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-domain-registration.html -// [How Route 53 checks the health of your resources]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-health-checks.html -// [How internet traffic is routed to your website or web application]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/welcome-dns-service.html -package route53 diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go deleted file mode 100644 index 076f2fc64b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/endpoints.go +++ /dev/null @@ -1,880 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "route53" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_ROUTE_53") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Route 53", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _PartitionResult.Name == "aws" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws" { - if _UseFIPS == true { - if _UseDualStack == false { - uriString := "https://route53-fips.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-cn" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.amazonaws.com.cn" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "cn-northwest-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-us-gov" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.us-gov.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-us-gov" { - if _UseFIPS == true { - if _UseDualStack == false { - uriString := "https://route53.us-gov.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-gov-west-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-iso" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.c2s.ic.gov" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-iso-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-iso-b" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.sc2s.sgov.gov" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-isob-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-iso-e" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.cloud.adc-e.uk" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "eu-isoe-west-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-iso-f" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.csp.hci.ic.gov" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-isof-south-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _PartitionResult.Name == "aws-eusc" { - if _UseFIPS == false { - if _UseDualStack == false { - uriString := "https://route53.amazonaws.eu" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "route53") - smithyhttp.SetSigV4ASigningName(&sp, "route53") - - smithyhttp.SetSigV4SigningRegion(&sp, "eusc-de-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://route53-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://route53-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://route53.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://route53.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json deleted file mode 100644 index 3fe1cbb9b7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/generated.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_ActivateKeySigningKey.go", - "api_op_AssociateVPCWithHostedZone.go", - "api_op_ChangeCidrCollection.go", - "api_op_ChangeResourceRecordSets.go", - "api_op_ChangeTagsForResource.go", - "api_op_CreateCidrCollection.go", - "api_op_CreateHealthCheck.go", - "api_op_CreateHostedZone.go", - "api_op_CreateKeySigningKey.go", - "api_op_CreateQueryLoggingConfig.go", - "api_op_CreateReusableDelegationSet.go", - "api_op_CreateTrafficPolicy.go", - "api_op_CreateTrafficPolicyInstance.go", - "api_op_CreateTrafficPolicyVersion.go", - "api_op_CreateVPCAssociationAuthorization.go", - "api_op_DeactivateKeySigningKey.go", - "api_op_DeleteCidrCollection.go", - "api_op_DeleteHealthCheck.go", - "api_op_DeleteHostedZone.go", - "api_op_DeleteKeySigningKey.go", - "api_op_DeleteQueryLoggingConfig.go", - "api_op_DeleteReusableDelegationSet.go", - "api_op_DeleteTrafficPolicy.go", - "api_op_DeleteTrafficPolicyInstance.go", - "api_op_DeleteVPCAssociationAuthorization.go", - "api_op_DisableHostedZoneDNSSEC.go", - "api_op_DisassociateVPCFromHostedZone.go", - "api_op_EnableHostedZoneDNSSEC.go", - "api_op_GetAccountLimit.go", - "api_op_GetChange.go", - "api_op_GetCheckerIpRanges.go", - "api_op_GetDNSSEC.go", - "api_op_GetGeoLocation.go", - "api_op_GetHealthCheck.go", - "api_op_GetHealthCheckCount.go", - "api_op_GetHealthCheckLastFailureReason.go", - "api_op_GetHealthCheckStatus.go", - "api_op_GetHostedZone.go", - "api_op_GetHostedZoneCount.go", - "api_op_GetHostedZoneLimit.go", - "api_op_GetQueryLoggingConfig.go", - "api_op_GetReusableDelegationSet.go", - "api_op_GetReusableDelegationSetLimit.go", - "api_op_GetTrafficPolicy.go", - "api_op_GetTrafficPolicyInstance.go", - "api_op_GetTrafficPolicyInstanceCount.go", - "api_op_ListCidrBlocks.go", - "api_op_ListCidrCollections.go", - "api_op_ListCidrLocations.go", - "api_op_ListGeoLocations.go", - "api_op_ListHealthChecks.go", - "api_op_ListHostedZones.go", - "api_op_ListHostedZonesByName.go", - "api_op_ListHostedZonesByVPC.go", - "api_op_ListQueryLoggingConfigs.go", - "api_op_ListResourceRecordSets.go", - "api_op_ListReusableDelegationSets.go", - "api_op_ListTagsForResource.go", - "api_op_ListTagsForResources.go", - "api_op_ListTrafficPolicies.go", - "api_op_ListTrafficPolicyInstances.go", - "api_op_ListTrafficPolicyInstancesByHostedZone.go", - "api_op_ListTrafficPolicyInstancesByPolicy.go", - "api_op_ListTrafficPolicyVersions.go", - "api_op_ListVPCAssociationAuthorizations.go", - "api_op_TestDNSAnswer.go", - "api_op_UpdateHealthCheck.go", - "api_op_UpdateHostedZoneComment.go", - "api_op_UpdateTrafficPolicyComment.go", - "api_op_UpdateTrafficPolicyInstance.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "sra_operation_order_test.go", - "types/enums.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.22", - "module": "github.com/aws/aws-sdk-go-v2/service/route53", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go deleted file mode 100644 index 03995656e7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package route53 - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.58.4" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go deleted file mode 100644 index 2f397c8ac9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/handwritten_paginators.go +++ /dev/null @@ -1,113 +0,0 @@ -package route53 - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/route53/types" -) - -// ListResourceRecordSetsAPIClient is a client that implements the ListResourceRecordSets -// operation -type ListResourceRecordSetsAPIClient interface { - ListResourceRecordSets(context.Context, *ListResourceRecordSetsInput, ...func(*Options)) (*ListResourceRecordSetsOutput, error) -} - -var _ ListResourceRecordSetsAPIClient = (*Client)(nil) - -// ListResourceRecordSetsPaginatorOptions is the paginator options for ListResourceRecordSets -type ListResourceRecordSetsPaginatorOptions struct { - // (Optional) The maximum number of ResourceRecordSets that you want Amazon Route 53 to - // return. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListResourceRecordSetsPaginator is a paginator for ListResourceRecordSets -type ListResourceRecordSetsPaginator struct { - options ListResourceRecordSetsPaginatorOptions - client ListResourceRecordSetsAPIClient - params *ListResourceRecordSetsInput - firstPage bool - startRecordName *string - startRecordType types.RRType - startRecordIdentifier *string - isTruncated bool -} - -// NewListResourceRecordSetsPaginator returns a new ListResourceRecordSetsPaginator -func NewListResourceRecordSetsPaginator(client ListResourceRecordSetsAPIClient, params *ListResourceRecordSetsInput, optFns ...func(*ListResourceRecordSetsPaginatorOptions)) *ListResourceRecordSetsPaginator { - if params == nil { - params = &ListResourceRecordSetsInput{} - } - - options := ListResourceRecordSetsPaginatorOptions{} - if params.MaxItems != nil { - options.Limit = *params.MaxItems - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListResourceRecordSetsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - startRecordName: params.StartRecordName, - startRecordType: params.StartRecordType, - startRecordIdentifier: params.StartRecordIdentifier, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListResourceRecordSetsPaginator) HasMorePages() bool { - return p.firstPage || p.isTruncated -} - -// NextPage retrieves the next ListResourceRecordSets page. -func (p *ListResourceRecordSetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceRecordSetsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.StartRecordName = p.startRecordName - params.StartRecordIdentifier = p.startRecordIdentifier - params.StartRecordType = p.startRecordType - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxItems = limit - - result, err := p.client.ListResourceRecordSets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.startRecordName - p.isTruncated = result.IsTruncated - p.startRecordName = nil - p.startRecordIdentifier = nil - p.startRecordType = "" - if result.IsTruncated { - p.startRecordName = result.NextRecordName - p.startRecordIdentifier = result.NextRecordIdentifier - p.startRecordType = result.NextRecordType - } - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.startRecordName != nil && - *prevToken == *p.startRecordName { - p.isTruncated = false - } - - return result, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go deleted file mode 100644 index 466627d5d0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/custom_error_deser.go +++ /dev/null @@ -1,94 +0,0 @@ -package customizations - -import ( - "bytes" - "context" - "encoding/xml" - "fmt" - "io" - "io/ioutil" - "strings" - - "github.com/aws/smithy-go" - smithyxml "github.com/aws/smithy-go/encoding/xml" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithyhttp "github.com/aws/smithy-go/transport/http" - - awsmiddle "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/route53/types" -) - -// HandleCustomErrorDeserialization check if Route53 response is an error and needs -// custom error deserialization. -func HandleCustomErrorDeserialization(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&processResponse{}, "OperationDeserializer", middleware.After) -} - -// middleware to process raw response and look for error response with InvalidChangeBatch error tag -type processResponse struct{} - -// ID returns the middleware ID. -func (*processResponse) ID() string { - return "Route53:ProcessResponseForCustomErrorResponse" -} - -func (m *processResponse) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - // check if success response - if response.StatusCode >= 200 && response.StatusCode < 300 { - return - } - - var readBuff bytes.Buffer - body := io.TeeReader(response.Body, &readBuff) - - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - - // rewind response body - response.Body = ioutil.NopCloser(io.MultiReader(&readBuff, response.Body)) - - // if start tag is "InvalidChangeBatch", the error response needs custom unmarshaling. - if strings.EqualFold(t.Name.Local, "InvalidChangeBatch") { - return out, metadata, route53CustomErrorDeser(&metadata, response) - } - - return out, metadata, err -} - -// error type for invalidChangeBatchError -type invalidChangeBatchError struct { - Messages []string `xml:"Messages>Message"` - RequestID string `xml:"RequestId"` -} - -func route53CustomErrorDeser(metadata *middleware.Metadata, response *smithyhttp.Response) error { - err := invalidChangeBatchError{} - xml.NewDecoder(response.Body).Decode(&err) - - // set request id in metadata - if len(err.RequestID) != 0 { - awsmiddle.SetRequestIDMetadata(metadata, err.RequestID) - } - - return &types.InvalidChangeBatch{ - Message: ptr.String("ChangeBatch errors occurred"), - Messages: err.Messages, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go deleted file mode 100644 index a787a631cd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/doc.go +++ /dev/null @@ -1,53 +0,0 @@ -// Package customizations provides customizations for the Amazon Route53 API client. -// -// This package provides support for following customizations -// -// Process Response Middleware: used for custom error deserializing -// Sanitize URL Middleware: used for sanitizing url with HostedZoneID member -// -// # Process Response Middleware -// -// Route53 operation "ChangeResourceRecordSets" can have an error response returned in -// a slightly different format. This customization is only applicable to -// ChangeResourceRecordSets operation of Route53. -// -// Here's a sample error response: -// -// -// -// -// Tried to create resource record set duplicate.example.com. type A, but it already exists -// -// -// -// The processResponse middleware customizations enables SDK to check for an error -// response starting with "InvalidChangeBatch" tag prior to deserialization. -// -// As this check in error response needs to be performed earlier than response -// deserialization. Since the behavior of Deserialization is in -// reverse order to the other stack steps its easier to consider that "after" means -// "before". -// -// Middleware layering: -// -// HTTP Response -> process response error -> deserialize -// -// In case the returned error response has `InvalidChangeBatch` format, the error is -// deserialized and returned. The operation deserializer does not attempt to deserialize -// as an error is returned by the process response error middleware. -// -// # Sanitize URL Middleware -// -// Route53 operations may return a response containing an id member value appended with -// a string, for example. an id 1234 may be returned as 'foo/1234'. While round-tripping such response -// id value into another operation request, SDK must strip out the additional prefix if any. -// The Sanitize URL Middleware strips out such additionally prepended string to the id. -// -// The Id member with such prepended strings target shape 'ResourceId' or 'DelegationSetId'. -// This customization thus is applied only for operations with id's targeting those target shapes. -// This customization has to be applied before the input is serialized. -// -// Middleware layering: -// -// Input -> Sanitize URL Middleware -> serialize -> next -package customizations diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go deleted file mode 100644 index b3b92057b9..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations/sanitizeurl.go +++ /dev/null @@ -1,63 +0,0 @@ -package customizations - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// AddSanitizeURLMiddlewareOptions provides the options for Route53SanitizeURL middleware setup -type AddSanitizeURLMiddlewareOptions struct { - // functional pointer to sanitize hosted zone id member - // The function is intended to take an input value, - // look for hosted zone id input member and sanitize the value - // to strip out an excess `/hostedzone/` prefix that can be present in - // the hosted zone id input member. - // - // returns an error if any. - SanitizeURLInput func(interface{}) error -} - -// AddSanitizeURLMiddleware add the middleware necessary to modify Route53 input before op serialization. -func AddSanitizeURLMiddleware(stack *middleware.Stack, options AddSanitizeURLMiddlewareOptions) error { - return stack.Serialize.Insert(&sanitizeURL{ - sanitizeURLInput: options.SanitizeURLInput, - }, "OperationSerializer", middleware.Before) -} - -// sanitizeURL cleans up potential formatting issues in the Route53 path. -// -// Notably it will strip out an excess `/hostedzone/` prefix that can be present in -// the hosted zone id input member. That excess prefix is there because some route53 apis return -// the id in that format, so this middleware enables round-tripping those values. -type sanitizeURL struct { - sanitizeURLInput func(interface{}) error -} - -// ID returns the id for the middleware. -func (*sanitizeURL) ID() string { - return "Route53:SanitizeURL" -} - -// HandleSerialize implements the SerializeMiddleware interface. -func (m *sanitizeURL) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{ - Err: fmt.Errorf("unknown request type %T", in.Request), - } - } - - if err := m.sanitizeURLInput(in.Parameters); err != nil { - return out, metadata, err - } - - return next.HandleSerialize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go deleted file mode 100644 index e761afdcef..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints/endpoints.go +++ /dev/null @@ -1,432 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver Route 53 endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsEusc *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "route53.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "route53-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: false, - PartitionEndpoint: "aws-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-global", - }: endpoints.Endpoint{ - Hostname: "route53.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "aws-global", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "fips-aws-global", - }: endpoints.Endpoint{ - Hostname: "route53-fips.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - Deprecated: aws.TrueTernary, - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "route53.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "route53-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: false, - PartitionEndpoint: "aws-cn-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-cn-global", - }: endpoints.Endpoint{ - Hostname: "route53.amazonaws.com.cn", - CredentialScope: endpoints.CredentialScope{ - Region: "cn-northwest-1", - }, - }, - }, - }, - { - ID: "aws-eusc", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsEusc, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: false, - PartitionEndpoint: "aws-iso-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-iso-global", - }: endpoints.Endpoint{ - Hostname: "route53.c2s.ic.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-iso-east-1", - }, - }, - }, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: false, - PartitionEndpoint: "aws-iso-b-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-iso-b-global", - }: endpoints.Endpoint{ - Hostname: "route53.sc2s.sgov.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-isob-east-1", - }, - }, - }, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: false, - PartitionEndpoint: "aws-iso-e-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-iso-e-global", - }: endpoints.Endpoint{ - Hostname: "route53.cloud.adc-e.uk", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-isoe-west-1", - }, - }, - }, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: false, - PartitionEndpoint: "aws-iso-f-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-iso-f-global", - }: endpoints.Endpoint{ - Hostname: "route53.csp.hci.ic.gov", - CredentialScope: endpoints.CredentialScope{ - Region: "us-isof-south-1", - }, - }, - }, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "route53.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "route53-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "route53.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: false, - PartitionEndpoint: "aws-us-gov-global", - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "aws-us-gov-global", - }: endpoints.Endpoint{ - Hostname: "route53.us-gov.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "aws-us-gov-global", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "route53.us-gov.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "fips-aws-us-gov-global", - }: endpoints.Endpoint{ - Hostname: "route53.us-gov.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - Deprecated: aws.TrueTernary, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/options.go deleted file mode 100644 index 3d10d3febe..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/options.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Client registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - to.Interceptors = o.Interceptors.Copy() - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go deleted file mode 100644 index f2c0d921a0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/serializers.go +++ /dev/null @@ -1,7221 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - smithyxml "github.com/aws/smithy-go/encoding/xml" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type awsRestxml_serializeOpActivateKeySigningKey struct { -} - -func (*awsRestxml_serializeOpActivateKeySigningKey) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpActivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ActivateKeySigningKeyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if v.Name == nil || len(*v.Name) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} - } - if v.Name != nil { - if err := encoder.SetURI("Name").String(*v.Name); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpAssociateVPCWithHostedZone struct { -} - -func (*awsRestxml_serializeOpAssociateVPCWithHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpAssociateVPCWithHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AssociateVPCWithHostedZoneRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - if v.VPC != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPC", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpChangeCidrCollection struct { -} - -func (*awsRestxml_serializeOpChangeCidrCollection) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpChangeCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ChangeCidrCollectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChangeCidrCollectionRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentChangeCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsChangeCidrCollectionInput(v *ChangeCidrCollectionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentChangeCidrCollectionInput(v *ChangeCidrCollectionInput, value smithyxml.Value) error { - defer value.Close() - if v.Changes != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Changes", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentCidrCollectionChanges(v.Changes, el); err != nil { - return err - } - } - if v.CollectionVersion != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CollectionVersion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.CollectionVersion) - } - return nil -} - -type awsRestxml_serializeOpChangeResourceRecordSets struct { -} - -func (*awsRestxml_serializeOpChangeResourceRecordSets) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpChangeResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ChangeResourceRecordSetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChangeResourceRecordSetsRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput, value smithyxml.Value) error { - defer value.Close() - if v.ChangeBatch != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChangeBatch", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentChangeBatch(v.ChangeBatch, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpChangeTagsForResource struct { -} - -func (*awsRestxml_serializeOpChangeTagsForResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpChangeTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ChangeTagsForResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChangeTagsForResourceRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentChangeTagsForResourceInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsChangeTagsForResourceInput(v *ChangeTagsForResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceId == nil || len(*v.ResourceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} - } - if v.ResourceId != nil { - if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { - return err - } - } - - if len(v.ResourceType) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} - } - if len(v.ResourceType) > 0 { - if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentChangeTagsForResourceInput(v *ChangeTagsForResourceInput, value smithyxml.Value) error { - defer value.Close() - if v.AddTags != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AddTags", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentTagList(v.AddTags, el); err != nil { - return err - } - } - if v.RemoveTagKeys != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "RemoveTagKeys", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentTagKeyList(v.RemoveTagKeys, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpCreateCidrCollection struct { -} - -func (*awsRestxml_serializeOpCreateCidrCollection) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateCidrCollectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateCidrCollectionRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateCidrCollectionInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateCidrCollectionInput(v *CreateCidrCollectionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateCidrCollectionInput(v *CreateCidrCollectionInput, value smithyxml.Value) error { - defer value.Close() - if v.CallerReference != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CallerReference", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CallerReference) - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - return nil -} - -type awsRestxml_serializeOpCreateHealthCheck struct { -} - -func (*awsRestxml_serializeOpCreateHealthCheck) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateHealthCheckInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateHealthCheckRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateHealthCheckInput(v *CreateHealthCheckInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateHealthCheckInput(v *CreateHealthCheckInput, value smithyxml.Value) error { - defer value.Close() - if v.CallerReference != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CallerReference", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CallerReference) - } - if v.HealthCheckConfig != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HealthCheckConfig", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentHealthCheckConfig(v.HealthCheckConfig, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpCreateHostedZone struct { -} - -func (*awsRestxml_serializeOpCreateHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateHostedZoneRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateHostedZoneInput(v *CreateHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateHostedZoneInput(v *CreateHostedZoneInput, value smithyxml.Value) error { - defer value.Close() - if v.CallerReference != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CallerReference", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CallerReference) - } - if v.DelegationSetId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "DelegationSetId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.DelegationSetId) - } - if v.HostedZoneConfig != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneConfig", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentHostedZoneConfig(v.HostedZoneConfig, el); err != nil { - return err - } - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - if v.VPC != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPC", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpCreateKeySigningKey struct { -} - -func (*awsRestxml_serializeOpCreateKeySigningKey) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateKeySigningKeyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateKeySigningKeyRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateKeySigningKeyInput(v *CreateKeySigningKeyInput, value smithyxml.Value) error { - defer value.Close() - if v.CallerReference != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CallerReference", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CallerReference) - } - if v.HostedZoneId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HostedZoneId) - } - if v.KeyManagementServiceArn != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "KeyManagementServiceArn", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.KeyManagementServiceArn) - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - if v.Status != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Status", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Status) - } - return nil -} - -type awsRestxml_serializeOpCreateQueryLoggingConfig struct { -} - -func (*awsRestxml_serializeOpCreateQueryLoggingConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateQueryLoggingConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateQueryLoggingConfigRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput, value smithyxml.Value) error { - defer value.Close() - if v.CloudWatchLogsLogGroupArn != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CloudWatchLogsLogGroupArn", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CloudWatchLogsLogGroupArn) - } - if v.HostedZoneId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HostedZoneId) - } - return nil -} - -type awsRestxml_serializeOpCreateReusableDelegationSet struct { -} - -func (*awsRestxml_serializeOpCreateReusableDelegationSet) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateReusableDelegationSetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateReusableDelegationSetRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput, value smithyxml.Value) error { - defer value.Close() - if v.CallerReference != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CallerReference", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CallerReference) - } - if v.HostedZoneId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HostedZoneId) - } - return nil -} - -type awsRestxml_serializeOpCreateTrafficPolicy struct { -} - -func (*awsRestxml_serializeOpCreateTrafficPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateTrafficPolicyRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateTrafficPolicyInput(v *CreateTrafficPolicyInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - if v.Document != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Document", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Document) - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - return nil -} - -type awsRestxml_serializeOpCreateTrafficPolicyInstance struct { -} - -func (*awsRestxml_serializeOpCreateTrafficPolicyInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateTrafficPolicyInstanceRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput, value smithyxml.Value) error { - defer value.Close() - if v.HostedZoneId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HostedZoneId) - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - if v.TrafficPolicyId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TrafficPolicyId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.TrafficPolicyId) - } - if v.TrafficPolicyVersion != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TrafficPolicyVersion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.TrafficPolicyVersion) - } - if v.TTL != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TTL", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.TTL) - } - return nil -} - -type awsRestxml_serializeOpCreateTrafficPolicyVersion struct { -} - -func (*awsRestxml_serializeOpCreateTrafficPolicyVersion) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateTrafficPolicyVersion) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateTrafficPolicyVersionRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - if v.Document != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Document", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Document) - } - return nil -} - -type awsRestxml_serializeOpCreateVPCAssociationAuthorization struct { -} - -func (*awsRestxml_serializeOpCreateVPCAssociationAuthorization) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpCreateVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CreateVPCAssociationAuthorizationRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput, value smithyxml.Value) error { - defer value.Close() - if v.VPC != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPC", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpDeactivateKeySigningKey struct { -} - -func (*awsRestxml_serializeOpDeactivateKeySigningKey) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeactivateKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeactivateKeySigningKeyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if v.Name == nil || len(*v.Name) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} - } - if v.Name != nil { - if err := encoder.SetURI("Name").String(*v.Name); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteCidrCollection struct { -} - -func (*awsRestxml_serializeOpDeleteCidrCollection) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteCidrCollection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteCidrCollectionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteCidrCollectionInput(v *DeleteCidrCollectionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteHealthCheck struct { -} - -func (*awsRestxml_serializeOpDeleteHealthCheck) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteHealthCheckInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteHealthCheckInput(v *DeleteHealthCheckInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} - } - if v.HealthCheckId != nil { - if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteHostedZone struct { -} - -func (*awsRestxml_serializeOpDeleteHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteHostedZoneInput(v *DeleteHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteKeySigningKey struct { -} - -func (*awsRestxml_serializeOpDeleteKeySigningKey) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteKeySigningKey) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteKeySigningKeyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if v.Name == nil || len(*v.Name) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Name must not be empty")} - } - if v.Name != nil { - if err := encoder.SetURI("Name").String(*v.Name); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteQueryLoggingConfig struct { -} - -func (*awsRestxml_serializeOpDeleteQueryLoggingConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteReusableDelegationSet struct { -} - -func (*awsRestxml_serializeOpDeleteReusableDelegationSet) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteReusableDelegationSetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteTrafficPolicy struct { -} - -func (*awsRestxml_serializeOpDeleteTrafficPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - if v.Version == nil { - return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} - } - if v.Version != nil { - if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteTrafficPolicyInstance struct { -} - -func (*awsRestxml_serializeOpDeleteTrafficPolicyInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDeleteVPCAssociationAuthorization struct { -} - -func (*awsRestxml_serializeOpDeleteVPCAssociationAuthorization) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDeleteVPCAssociationAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "DeleteVPCAssociationAuthorizationRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput, value smithyxml.Value) error { - defer value.Close() - if v.VPC != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPC", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpDisableHostedZoneDNSSEC struct { -} - -func (*awsRestxml_serializeOpDisableHostedZoneDNSSEC) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDisableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpDisassociateVPCFromHostedZone struct { -} - -func (*awsRestxml_serializeOpDisassociateVPCFromHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpDisassociateVPCFromHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "DisassociateVPCFromHostedZoneRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - if v.VPC != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPC", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentVPC(v.VPC, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpEnableHostedZoneDNSSEC struct { -} - -func (*awsRestxml_serializeOpEnableHostedZoneDNSSEC) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpEnableHostedZoneDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetAccountLimit struct { -} - -func (*awsRestxml_serializeOpGetAccountLimit) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetAccountLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAccountLimitInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/accountlimit/{Type}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetAccountLimitInput(v *GetAccountLimitInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if len(v.Type) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} - } - if len(v.Type) > 0 { - if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetChange struct { -} - -func (*awsRestxml_serializeOpGetChange) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetChange) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetChangeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/change/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetChangeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetChangeInput(v *GetChangeInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetCheckerIpRanges struct { -} - -func (*awsRestxml_serializeOpGetCheckerIpRanges) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetCheckerIpRanges) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetCheckerIpRangesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/checkeripranges") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetCheckerIpRangesInput(v *GetCheckerIpRangesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestxml_serializeOpGetDNSSEC struct { -} - -func (*awsRestxml_serializeOpGetDNSSEC) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetDNSSEC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetDNSSECInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/dnssec") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetDNSSECInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetDNSSECInput(v *GetDNSSECInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetGeoLocation struct { -} - -func (*awsRestxml_serializeOpGetGeoLocation) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetGeoLocation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetGeoLocationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocation") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetGeoLocationInput(v *GetGeoLocationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ContinentCode != nil { - encoder.SetQuery("continentcode").String(*v.ContinentCode) - } - - if v.CountryCode != nil { - encoder.SetQuery("countrycode").String(*v.CountryCode) - } - - if v.SubdivisionCode != nil { - encoder.SetQuery("subdivisioncode").String(*v.SubdivisionCode) - } - - return nil -} - -type awsRestxml_serializeOpGetHealthCheck struct { -} - -func (*awsRestxml_serializeOpGetHealthCheck) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHealthCheckInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHealthCheckInput(v *GetHealthCheckInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} - } - if v.HealthCheckId != nil { - if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetHealthCheckCount struct { -} - -func (*awsRestxml_serializeOpGetHealthCheckCount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHealthCheckCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHealthCheckCountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheckcount") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHealthCheckCountInput(v *GetHealthCheckCountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestxml_serializeOpGetHealthCheckLastFailureReason struct { -} - -func (*awsRestxml_serializeOpGetHealthCheckLastFailureReason) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHealthCheckLastFailureReason) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} - } - if v.HealthCheckId != nil { - if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetHealthCheckStatus struct { -} - -func (*awsRestxml_serializeOpGetHealthCheckStatus) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHealthCheckStatus) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHealthCheckStatusInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}/status") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHealthCheckStatusInput(v *GetHealthCheckStatusInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} - } - if v.HealthCheckId != nil { - if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetHostedZone struct { -} - -func (*awsRestxml_serializeOpGetHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHostedZoneInput(v *GetHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetHostedZoneCount struct { -} - -func (*awsRestxml_serializeOpGetHostedZoneCount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHostedZoneCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHostedZoneCountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonecount") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHostedZoneCountInput(v *GetHostedZoneCountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestxml_serializeOpGetHostedZoneLimit struct { -} - -func (*awsRestxml_serializeOpGetHostedZoneLimit) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetHostedZoneLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetHostedZoneLimitInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetHostedZoneLimitInput(v *GetHostedZoneLimitInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if len(v.Type) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} - } - if len(v.Type) > 0 { - if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetQueryLoggingConfig struct { -} - -func (*awsRestxml_serializeOpGetQueryLoggingConfig) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetQueryLoggingConfig) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetQueryLoggingConfigInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetReusableDelegationSet struct { -} - -func (*awsRestxml_serializeOpGetReusableDelegationSet) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetReusableDelegationSet) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetReusableDelegationSetInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetInput(v *GetReusableDelegationSetInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetReusableDelegationSetLimit struct { -} - -func (*awsRestxml_serializeOpGetReusableDelegationSetLimit) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetReusableDelegationSetLimit) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.DelegationSetId == nil || len(*v.DelegationSetId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member DelegationSetId must not be empty")} - } - if v.DelegationSetId != nil { - if err := encoder.SetURI("DelegationSetId").String(*v.DelegationSetId); err != nil { - return err - } - } - - if len(v.Type) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Type must not be empty")} - } - if len(v.Type) > 0 { - if err := encoder.SetURI("Type").String(string(v.Type)); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetTrafficPolicy struct { -} - -func (*awsRestxml_serializeOpGetTrafficPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetTrafficPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTrafficPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInput(v *GetTrafficPolicyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - if v.Version == nil { - return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} - } - if v.Version != nil { - if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetTrafficPolicyInstance struct { -} - -func (*awsRestxml_serializeOpGetTrafficPolicyInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpGetTrafficPolicyInstanceCount struct { -} - -func (*awsRestxml_serializeOpGetTrafficPolicyInstanceCount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpGetTrafficPolicyInstanceCount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetTrafficPolicyInstanceCountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstancecount") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsGetTrafficPolicyInstanceCountInput(v *GetTrafficPolicyInstanceCountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestxml_serializeOpListCidrBlocks struct { -} - -func (*awsRestxml_serializeOpListCidrBlocks) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListCidrBlocks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListCidrBlocksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListCidrBlocksInput(v *ListCidrBlocksInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.CollectionId == nil || len(*v.CollectionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")} - } - if v.CollectionId != nil { - if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil { - return err - } - } - - if v.LocationName != nil { - encoder.SetQuery("location").String(*v.LocationName) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxresults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - return nil -} - -type awsRestxml_serializeOpListCidrCollections struct { -} - -func (*awsRestxml_serializeOpListCidrCollections) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListCidrCollections) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListCidrCollectionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListCidrCollectionsInput(v *ListCidrCollectionsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxresults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - return nil -} - -type awsRestxml_serializeOpListCidrLocations struct { -} - -func (*awsRestxml_serializeOpListCidrLocations) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListCidrLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListCidrLocationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/cidrcollection/{CollectionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListCidrLocationsInput(v *ListCidrLocationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.CollectionId == nil || len(*v.CollectionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member CollectionId must not be empty")} - } - if v.CollectionId != nil { - if err := encoder.SetURI("CollectionId").String(*v.CollectionId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("maxresults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - return nil -} - -type awsRestxml_serializeOpListGeoLocations struct { -} - -func (*awsRestxml_serializeOpListGeoLocations) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListGeoLocations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListGeoLocationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/geolocations") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListGeoLocationsInput(v *ListGeoLocationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.StartContinentCode != nil { - encoder.SetQuery("startcontinentcode").String(*v.StartContinentCode) - } - - if v.StartCountryCode != nil { - encoder.SetQuery("startcountrycode").String(*v.StartCountryCode) - } - - if v.StartSubdivisionCode != nil { - encoder.SetQuery("startsubdivisioncode").String(*v.StartSubdivisionCode) - } - - return nil -} - -type awsRestxml_serializeOpListHealthChecks struct { -} - -func (*awsRestxml_serializeOpListHealthChecks) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListHealthChecks) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListHealthChecksInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListHealthChecksInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListHealthChecksInput(v *ListHealthChecksInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Marker != nil { - encoder.SetQuery("marker").String(*v.Marker) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - return nil -} - -type awsRestxml_serializeOpListHostedZones struct { -} - -func (*awsRestxml_serializeOpListHostedZones) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListHostedZones) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListHostedZonesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListHostedZonesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListHostedZonesInput(v *ListHostedZonesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.DelegationSetId != nil { - encoder.SetQuery("delegationsetid").String(*v.DelegationSetId) - } - - if len(v.HostedZoneType) > 0 { - encoder.SetQuery("hostedzonetype").String(string(v.HostedZoneType)) - } - - if v.Marker != nil { - encoder.SetQuery("marker").String(*v.Marker) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - return nil -} - -type awsRestxml_serializeOpListHostedZonesByName struct { -} - -func (*awsRestxml_serializeOpListHostedZonesByName) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListHostedZonesByName) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListHostedZonesByNameInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyname") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListHostedZonesByNameInput(v *ListHostedZonesByNameInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.DNSName != nil { - encoder.SetQuery("dnsname").String(*v.DNSName) - } - - if v.HostedZoneId != nil { - encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - return nil -} - -type awsRestxml_serializeOpListHostedZonesByVPC struct { -} - -func (*awsRestxml_serializeOpListHostedZonesByVPC) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListHostedZonesByVPC) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListHostedZonesByVPCInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzonesbyvpc") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - if v.VPCId != nil { - encoder.SetQuery("vpcid").String(*v.VPCId) - } - - if len(v.VPCRegion) > 0 { - encoder.SetQuery("vpcregion").String(string(v.VPCRegion)) - } - - return nil -} - -type awsRestxml_serializeOpListQueryLoggingConfigs struct { -} - -func (*awsRestxml_serializeOpListQueryLoggingConfigs) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListQueryLoggingConfigs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListQueryLoggingConfigsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/queryloggingconfig") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListQueryLoggingConfigsInput(v *ListQueryLoggingConfigsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId != nil { - encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) - } - - if v.MaxResults != nil { - encoder.SetQuery("maxresults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - return nil -} - -type awsRestxml_serializeOpListResourceRecordSets struct { -} - -func (*awsRestxml_serializeOpListResourceRecordSets) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListResourceRecordSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListResourceRecordSetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/rrset") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListResourceRecordSetsInput(v *ListResourceRecordSetsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.StartRecordIdentifier != nil { - encoder.SetQuery("identifier").String(*v.StartRecordIdentifier) - } - - if v.StartRecordName != nil { - encoder.SetQuery("name").String(*v.StartRecordName) - } - - if len(v.StartRecordType) > 0 { - encoder.SetQuery("type").String(string(v.StartRecordType)) - } - - return nil -} - -type awsRestxml_serializeOpListReusableDelegationSets struct { -} - -func (*awsRestxml_serializeOpListReusableDelegationSets) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListReusableDelegationSets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListReusableDelegationSetsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/delegationset") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListReusableDelegationSetsInput(v *ListReusableDelegationSetsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Marker != nil { - encoder.SetQuery("marker").String(*v.Marker) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - return nil -} - -type awsRestxml_serializeOpListTagsForResource struct { -} - -func (*awsRestxml_serializeOpListTagsForResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTagsForResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}/{ResourceId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceId == nil || len(*v.ResourceId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} - } - if v.ResourceId != nil { - if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { - return err - } - } - - if len(v.ResourceType) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} - } - if len(v.ResourceType) > 0 { - if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { - return err - } - } - - return nil -} - -type awsRestxml_serializeOpListTagsForResources struct { -} - -func (*awsRestxml_serializeOpListTagsForResources) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTagsForResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTagsForResourcesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/tags/{ResourceType}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ListTagsForResourcesRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentListTagsForResourcesInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTagsForResourcesInput(v *ListTagsForResourcesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if len(v.ResourceType) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceType must not be empty")} - } - if len(v.ResourceType) > 0 { - if err := encoder.SetURI("ResourceType").String(string(v.ResourceType)); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentListTagsForResourcesInput(v *ListTagsForResourcesInput, value smithyxml.Value) error { - defer value.Close() - if v.ResourceIds != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourceIds", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentTagResourceIdList(v.ResourceIds, el); err != nil { - return err - } - } - return nil -} - -type awsRestxml_serializeOpListTrafficPolicies struct { -} - -func (*awsRestxml_serializeOpListTrafficPolicies) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTrafficPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTrafficPoliciesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTrafficPoliciesInput(v *ListTrafficPoliciesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.TrafficPolicyIdMarker != nil { - encoder.SetQuery("trafficpolicyid").String(*v.TrafficPolicyIdMarker) - } - - return nil -} - -type awsRestxml_serializeOpListTrafficPolicyInstances struct { -} - -func (*awsRestxml_serializeOpListTrafficPolicyInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTrafficPolicyInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTrafficPolicyInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesInput(v *ListTrafficPolicyInstancesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneIdMarker != nil { - encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.TrafficPolicyInstanceNameMarker != nil { - encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) - } - - if len(v.TrafficPolicyInstanceTypeMarker) > 0 { - encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) - } - - return nil -} - -type awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone struct { -} - -func (*awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByHostedZone) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/hostedzone") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId != nil { - encoder.SetQuery("id").String(*v.HostedZoneId) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.TrafficPolicyInstanceNameMarker != nil { - encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) - } - - if len(v.TrafficPolicyInstanceTypeMarker) > 0 { - encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) - } - - return nil -} - -type awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy struct { -} - -func (*awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTrafficPolicyInstancesByPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstances/trafficpolicy") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneIdMarker != nil { - encoder.SetQuery("hostedzoneid").String(*v.HostedZoneIdMarker) - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.TrafficPolicyId != nil { - encoder.SetQuery("id").String(*v.TrafficPolicyId) - } - - if v.TrafficPolicyInstanceNameMarker != nil { - encoder.SetQuery("trafficpolicyinstancename").String(*v.TrafficPolicyInstanceNameMarker) - } - - if len(v.TrafficPolicyInstanceTypeMarker) > 0 { - encoder.SetQuery("trafficpolicyinstancetype").String(string(v.TrafficPolicyInstanceTypeMarker)) - } - - if v.TrafficPolicyVersion != nil { - encoder.SetQuery("version").Integer(*v.TrafficPolicyVersion) - } - - return nil -} - -type awsRestxml_serializeOpListTrafficPolicyVersions struct { -} - -func (*awsRestxml_serializeOpListTrafficPolicyVersions) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListTrafficPolicyVersions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicies/{Id}/versions") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - if v.MaxItems != nil { - encoder.SetQuery("maxitems").Integer(*v.MaxItems) - } - - if v.TrafficPolicyVersionMarker != nil { - encoder.SetQuery("trafficpolicyversion").String(*v.TrafficPolicyVersionMarker) - } - - return nil -} - -type awsRestxml_serializeOpListVPCAssociationAuthorizations struct { -} - -func (*awsRestxml_serializeOpListVPCAssociationAuthorizations) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpListVPCAssociationAuthorizations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HostedZoneId == nil || len(*v.HostedZoneId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HostedZoneId must not be empty")} - } - if v.HostedZoneId != nil { - if err := encoder.SetURI("HostedZoneId").String(*v.HostedZoneId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("maxresults").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("nexttoken").String(*v.NextToken) - } - - return nil -} - -type awsRestxml_serializeOpTestDNSAnswer struct { -} - -func (*awsRestxml_serializeOpTestDNSAnswer) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpTestDNSAnswer) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TestDNSAnswerInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/testdnsanswer") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsTestDNSAnswerInput(v *TestDNSAnswerInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.EDNS0ClientSubnetIP != nil { - encoder.SetQuery("edns0clientsubnetip").String(*v.EDNS0ClientSubnetIP) - } - - if v.EDNS0ClientSubnetMask != nil { - encoder.SetQuery("edns0clientsubnetmask").String(*v.EDNS0ClientSubnetMask) - } - - if v.HostedZoneId != nil { - encoder.SetQuery("hostedzoneid").String(*v.HostedZoneId) - } - - if v.RecordName != nil { - encoder.SetQuery("recordname").String(*v.RecordName) - } - - if len(v.RecordType) > 0 { - encoder.SetQuery("recordtype").String(string(v.RecordType)) - } - - if v.ResolverIP != nil { - encoder.SetQuery("resolverip").String(*v.ResolverIP) - } - - return nil -} - -type awsRestxml_serializeOpUpdateHealthCheck struct { -} - -func (*awsRestxml_serializeOpUpdateHealthCheck) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpUpdateHealthCheck) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateHealthCheckInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/healthcheck/{HealthCheckId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "UpdateHealthCheckRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentUpdateHealthCheckInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsUpdateHealthCheckInput(v *UpdateHealthCheckInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.HealthCheckId == nil || len(*v.HealthCheckId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member HealthCheckId must not be empty")} - } - if v.HealthCheckId != nil { - if err := encoder.SetURI("HealthCheckId").String(*v.HealthCheckId); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentUpdateHealthCheckInput(v *UpdateHealthCheckInput, value smithyxml.Value) error { - defer value.Close() - if v.AlarmIdentifier != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AlarmIdentifier", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { - return err - } - } - if v.ChildHealthChecks != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChildHealthChecks", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { - return err - } - } - if v.Disabled != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Disabled", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.Disabled) - } - if v.EnableSNI != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "EnableSNI", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.EnableSNI) - } - if v.FailureThreshold != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "FailureThreshold", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.FailureThreshold) - } - if v.FullyQualifiedDomainName != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "FullyQualifiedDomainName", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.FullyQualifiedDomainName) - } - if v.HealthCheckVersion != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HealthCheckVersion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.HealthCheckVersion) - } - if v.HealthThreshold != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HealthThreshold", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.HealthThreshold) - } - if len(v.InsufficientDataHealthStatus) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "InsufficientDataHealthStatus", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.InsufficientDataHealthStatus)) - } - if v.Inverted != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Inverted", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.Inverted) - } - if v.IPAddress != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "IPAddress", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.IPAddress) - } - if v.Port != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Port", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.Port) - } - if v.Regions != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Regions", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { - return err - } - } - if v.ResetElements != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResetElements", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentResettableElementNameList(v.ResetElements, el); err != nil { - return err - } - } - if v.ResourcePath != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourcePath", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.ResourcePath) - } - if v.SearchString != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "SearchString", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.SearchString) - } - return nil -} - -type awsRestxml_serializeOpUpdateHostedZoneComment struct { -} - -func (*awsRestxml_serializeOpUpdateHostedZoneComment) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpUpdateHostedZoneComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateHostedZoneCommentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/hostedzone/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "UpdateHostedZoneCommentRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - return nil -} - -type awsRestxml_serializeOpUpdateTrafficPolicyComment struct { -} - -func (*awsRestxml_serializeOpUpdateTrafficPolicyComment) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpUpdateTrafficPolicyComment) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicy/{Id}/{Version}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "UpdateTrafficPolicyCommentRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - if v.Version == nil { - return &smithy.SerializationError{Err: fmt.Errorf("input member Version must not be empty")} - } - if v.Version != nil { - if err := encoder.SetURI("Version").Integer(*v.Version); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - return nil -} - -type awsRestxml_serializeOpUpdateTrafficPolicyInstance struct { -} - -func (*awsRestxml_serializeOpUpdateTrafficPolicyInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestxml_serializeOpUpdateTrafficPolicyInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/2013-04-01/trafficpolicyinstance/{Id}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/xml") - - xmlEncoder := smithyxml.NewEncoder(bytes.NewBuffer(nil)) - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "UpdateTrafficPolicyInstanceRequest", - }, - Attr: rootAttr, - } - root.Attr = append(root.Attr, smithyxml.NewNamespaceAttribute("", "https://route53.amazonaws.com/doc/2013-04-01/")) - if err := awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(input, xmlEncoder.RootElement(root)); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request, err = request.SetStream(bytes.NewReader(xmlEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestxml_serializeOpHttpBindingsUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.Id == nil || len(*v.Id) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member Id must not be empty")} - } - if v.Id != nil { - if err := encoder.SetURI("Id").String(*v.Id); err != nil { - return err - } - } - - return nil -} - -func awsRestxml_serializeOpDocumentUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput, value smithyxml.Value) error { - defer value.Close() - if v.TrafficPolicyId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TrafficPolicyId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.TrafficPolicyId) - } - if v.TrafficPolicyVersion != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TrafficPolicyVersion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.TrafficPolicyVersion) - } - if v.TTL != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TTL", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.TTL) - } - return nil -} - -func awsRestxml_serializeDocumentAlarmIdentifier(v *types.AlarmIdentifier, value smithyxml.Value) error { - defer value.Close() - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - if len(v.Region) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Region", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Region)) - } - return nil -} - -func awsRestxml_serializeDocumentAliasTarget(v *types.AliasTarget, value smithyxml.Value) error { - defer value.Close() - if v.DNSName != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "DNSName", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.DNSName) - } - { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "EvaluateTargetHealth", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(v.EvaluateTargetHealth) - } - if v.HostedZoneId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HostedZoneId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HostedZoneId) - } - return nil -} - -func awsRestxml_serializeDocumentChange(v *types.Change, value smithyxml.Value) error { - defer value.Close() - if len(v.Action) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Action", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Action)) - } - if v.ResourceRecordSet != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourceRecordSet", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentResourceRecordSet(v.ResourceRecordSet, el); err != nil { - return err - } - } - return nil -} - -func awsRestxml_serializeDocumentChangeBatch(v *types.ChangeBatch, value smithyxml.Value) error { - defer value.Close() - if v.Changes != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Changes", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentChanges(v.Changes, el); err != nil { - return err - } - } - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - return nil -} - -func awsRestxml_serializeDocumentChanges(v []types.Change, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Change", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - if err := awsRestxml_serializeDocumentChange(&v[i], am); err != nil { - return err - } - } - return nil -} - -func awsRestxml_serializeDocumentChildHealthCheckList(v []string, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChildHealthCheck", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(v[i]) - } - return nil -} - -func awsRestxml_serializeDocumentCidrCollectionChange(v *types.CidrCollectionChange, value smithyxml.Value) error { - defer value.Close() - if len(v.Action) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Action", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Action)) - } - if v.CidrList != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CidrList", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentCidrList(v.CidrList, el); err != nil { - return err - } - } - if v.LocationName != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "LocationName", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.LocationName) - } - return nil -} - -func awsRestxml_serializeDocumentCidrCollectionChanges(v []types.CidrCollectionChange, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - array = value.Array() - for i := range v { - am := array.Member() - if err := awsRestxml_serializeDocumentCidrCollectionChange(&v[i], am); err != nil { - return err - } - } - return nil -} - -func awsRestxml_serializeDocumentCidrList(v []string, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Cidr", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(v[i]) - } - return nil -} - -func awsRestxml_serializeDocumentCidrRoutingConfig(v *types.CidrRoutingConfig, value smithyxml.Value) error { - defer value.Close() - if v.CollectionId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CollectionId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CollectionId) - } - if v.LocationName != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "LocationName", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.LocationName) - } - return nil -} - -func awsRestxml_serializeDocumentCoordinates(v *types.Coordinates, value smithyxml.Value) error { - defer value.Close() - if v.Latitude != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Latitude", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Latitude) - } - if v.Longitude != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Longitude", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Longitude) - } - return nil -} - -func awsRestxml_serializeDocumentGeoLocation(v *types.GeoLocation, value smithyxml.Value) error { - defer value.Close() - if v.ContinentCode != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ContinentCode", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.ContinentCode) - } - if v.CountryCode != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CountryCode", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.CountryCode) - } - if v.SubdivisionCode != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "SubdivisionCode", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.SubdivisionCode) - } - return nil -} - -func awsRestxml_serializeDocumentGeoProximityLocation(v *types.GeoProximityLocation, value smithyxml.Value) error { - defer value.Close() - if v.AWSRegion != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AWSRegion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.AWSRegion) - } - if v.Bias != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Bias", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.Bias) - } - if v.Coordinates != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Coordinates", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentCoordinates(v.Coordinates, el); err != nil { - return err - } - } - if v.LocalZoneGroup != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "LocalZoneGroup", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.LocalZoneGroup) - } - return nil -} - -func awsRestxml_serializeDocumentHealthCheckConfig(v *types.HealthCheckConfig, value smithyxml.Value) error { - defer value.Close() - if v.AlarmIdentifier != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AlarmIdentifier", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentAlarmIdentifier(v.AlarmIdentifier, el); err != nil { - return err - } - } - if v.ChildHealthChecks != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ChildHealthChecks", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentChildHealthCheckList(v.ChildHealthChecks, el); err != nil { - return err - } - } - if v.Disabled != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Disabled", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.Disabled) - } - if v.EnableSNI != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "EnableSNI", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.EnableSNI) - } - if v.FailureThreshold != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "FailureThreshold", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.FailureThreshold) - } - if v.FullyQualifiedDomainName != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "FullyQualifiedDomainName", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.FullyQualifiedDomainName) - } - if v.HealthThreshold != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HealthThreshold", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.HealthThreshold) - } - if len(v.InsufficientDataHealthStatus) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "InsufficientDataHealthStatus", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.InsufficientDataHealthStatus)) - } - if v.Inverted != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Inverted", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.Inverted) - } - if v.IPAddress != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "IPAddress", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.IPAddress) - } - if v.MeasureLatency != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "MeasureLatency", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.MeasureLatency) - } - if v.Port != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Port", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.Port) - } - if v.Regions != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Regions", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentHealthCheckRegionList(v.Regions, el); err != nil { - return err - } - } - if v.RequestInterval != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "RequestInterval", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Integer(*v.RequestInterval) - } - if v.ResourcePath != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourcePath", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.ResourcePath) - } - if v.RoutingControlArn != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "RoutingControlArn", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.RoutingControlArn) - } - if v.SearchString != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "SearchString", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.SearchString) - } - if len(v.Type) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Type", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Type)) - } - return nil -} - -func awsRestxml_serializeDocumentHealthCheckRegionList(v []types.HealthCheckRegion, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Region", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(string(v[i])) - } - return nil -} - -func awsRestxml_serializeDocumentHostedZoneConfig(v *types.HostedZoneConfig, value smithyxml.Value) error { - defer value.Close() - if v.Comment != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Comment", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Comment) - } - if v.PrivateZone { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "PrivateZone", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(v.PrivateZone) - } - return nil -} - -func awsRestxml_serializeDocumentResettableElementNameList(v []types.ResettableElementName, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResettableElementName", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(string(v[i])) - } - return nil -} - -func awsRestxml_serializeDocumentResourceRecord(v *types.ResourceRecord, value smithyxml.Value) error { - defer value.Close() - if v.Value != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Value", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Value) - } - return nil -} - -func awsRestxml_serializeDocumentResourceRecords(v []types.ResourceRecord, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourceRecord", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - if err := awsRestxml_serializeDocumentResourceRecord(&v[i], am); err != nil { - return err - } - } - return nil -} - -func awsRestxml_serializeDocumentResourceRecordSet(v *types.ResourceRecordSet, value smithyxml.Value) error { - defer value.Close() - if v.AliasTarget != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "AliasTarget", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentAliasTarget(v.AliasTarget, el); err != nil { - return err - } - } - if v.CidrRoutingConfig != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "CidrRoutingConfig", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentCidrRoutingConfig(v.CidrRoutingConfig, el); err != nil { - return err - } - } - if len(v.Failover) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Failover", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Failover)) - } - if v.GeoLocation != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "GeoLocation", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentGeoLocation(v.GeoLocation, el); err != nil { - return err - } - } - if v.GeoProximityLocation != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "GeoProximityLocation", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentGeoProximityLocation(v.GeoProximityLocation, el); err != nil { - return err - } - } - if v.HealthCheckId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "HealthCheckId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.HealthCheckId) - } - if v.MultiValueAnswer != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "MultiValueAnswer", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Boolean(*v.MultiValueAnswer) - } - if v.Name != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Name", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Name) - } - if len(v.Region) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Region", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Region)) - } - if v.ResourceRecords != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourceRecords", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - if err := awsRestxml_serializeDocumentResourceRecords(v.ResourceRecords, el); err != nil { - return err - } - } - if v.SetIdentifier != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "SetIdentifier", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.SetIdentifier) - } - if v.TrafficPolicyInstanceId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TrafficPolicyInstanceId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.TrafficPolicyInstanceId) - } - if v.TTL != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "TTL", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.TTL) - } - if len(v.Type) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Type", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.Type)) - } - if v.Weight != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Weight", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.Long(*v.Weight) - } - return nil -} - -func awsRestxml_serializeDocumentTag(v *types.Tag, value smithyxml.Value) error { - defer value.Close() - if v.Key != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Key", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Key) - } - if v.Value != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Value", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.Value) - } - return nil -} - -func awsRestxml_serializeDocumentTagKeyList(v []string, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Key", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(v[i]) - } - return nil -} - -func awsRestxml_serializeDocumentTagList(v []types.Tag, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "Tag", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - if err := awsRestxml_serializeDocumentTag(&v[i], am); err != nil { - return err - } - } - return nil -} - -func awsRestxml_serializeDocumentTagResourceIdList(v []string, value smithyxml.Value) error { - var array *smithyxml.Array - if !value.IsFlattened() { - defer value.Close() - } - customMemberNameAttr := []smithyxml.Attr{} - customMemberName := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "ResourceId", - }, - Attr: customMemberNameAttr, - } - array = value.ArrayWithCustomName(customMemberName) - for i := range v { - am := array.Member() - am.String(v[i]) - } - return nil -} - -func awsRestxml_serializeDocumentVPC(v *types.VPC, value smithyxml.Value) error { - defer value.Close() - if v.VPCId != nil { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPCId", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(*v.VPCId) - } - if len(v.VPCRegion) > 0 { - rootAttr := []smithyxml.Attr{} - root := smithyxml.StartElement{ - Name: smithyxml.Name{ - Local: "VPCRegion", - }, - Attr: rootAttr, - } - el := value.MemberElement(root) - el.String(string(v.VPCRegion)) - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go deleted file mode 100644 index dcaa40e79a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/enums.go +++ /dev/null @@ -1,680 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type AccountLimitType string - -// Enum values for AccountLimitType -const ( - AccountLimitTypeMaxHealthChecksByOwner AccountLimitType = "MAX_HEALTH_CHECKS_BY_OWNER" - AccountLimitTypeMaxHostedZonesByOwner AccountLimitType = "MAX_HOSTED_ZONES_BY_OWNER" - AccountLimitTypeMaxTrafficPolicyInstancesByOwner AccountLimitType = "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER" - AccountLimitTypeMaxReusableDelegationSetsByOwner AccountLimitType = "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER" - AccountLimitTypeMaxTrafficPoliciesByOwner AccountLimitType = "MAX_TRAFFIC_POLICIES_BY_OWNER" -) - -// Values returns all known values for AccountLimitType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (AccountLimitType) Values() []AccountLimitType { - return []AccountLimitType{ - "MAX_HEALTH_CHECKS_BY_OWNER", - "MAX_HOSTED_ZONES_BY_OWNER", - "MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER", - "MAX_REUSABLE_DELEGATION_SETS_BY_OWNER", - "MAX_TRAFFIC_POLICIES_BY_OWNER", - } -} - -type ChangeAction string - -// Enum values for ChangeAction -const ( - ChangeActionCreate ChangeAction = "CREATE" - ChangeActionDelete ChangeAction = "DELETE" - ChangeActionUpsert ChangeAction = "UPSERT" -) - -// Values returns all known values for ChangeAction. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChangeAction) Values() []ChangeAction { - return []ChangeAction{ - "CREATE", - "DELETE", - "UPSERT", - } -} - -type ChangeStatus string - -// Enum values for ChangeStatus -const ( - ChangeStatusPending ChangeStatus = "PENDING" - ChangeStatusInsync ChangeStatus = "INSYNC" -) - -// Values returns all known values for ChangeStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChangeStatus) Values() []ChangeStatus { - return []ChangeStatus{ - "PENDING", - "INSYNC", - } -} - -type CidrCollectionChangeAction string - -// Enum values for CidrCollectionChangeAction -const ( - CidrCollectionChangeActionPut CidrCollectionChangeAction = "PUT" - CidrCollectionChangeActionDeleteIfExists CidrCollectionChangeAction = "DELETE_IF_EXISTS" -) - -// Values returns all known values for CidrCollectionChangeAction. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (CidrCollectionChangeAction) Values() []CidrCollectionChangeAction { - return []CidrCollectionChangeAction{ - "PUT", - "DELETE_IF_EXISTS", - } -} - -type CloudWatchRegion string - -// Enum values for CloudWatchRegion -const ( - CloudWatchRegionUsEast1 CloudWatchRegion = "us-east-1" - CloudWatchRegionUsEast2 CloudWatchRegion = "us-east-2" - CloudWatchRegionUsWest1 CloudWatchRegion = "us-west-1" - CloudWatchRegionUsWest2 CloudWatchRegion = "us-west-2" - CloudWatchRegionCaCentral1 CloudWatchRegion = "ca-central-1" - CloudWatchRegionEuCentral1 CloudWatchRegion = "eu-central-1" - CloudWatchRegionEuCentral2 CloudWatchRegion = "eu-central-2" - CloudWatchRegionEuWest1 CloudWatchRegion = "eu-west-1" - CloudWatchRegionEuWest2 CloudWatchRegion = "eu-west-2" - CloudWatchRegionEuWest3 CloudWatchRegion = "eu-west-3" - CloudWatchRegionApEast1 CloudWatchRegion = "ap-east-1" - CloudWatchRegionMeSouth1 CloudWatchRegion = "me-south-1" - CloudWatchRegionMeCentral1 CloudWatchRegion = "me-central-1" - CloudWatchRegionApSouth1 CloudWatchRegion = "ap-south-1" - CloudWatchRegionApSouth2 CloudWatchRegion = "ap-south-2" - CloudWatchRegionApSoutheast1 CloudWatchRegion = "ap-southeast-1" - CloudWatchRegionApSoutheast2 CloudWatchRegion = "ap-southeast-2" - CloudWatchRegionApSoutheast3 CloudWatchRegion = "ap-southeast-3" - CloudWatchRegionApNortheast1 CloudWatchRegion = "ap-northeast-1" - CloudWatchRegionApNortheast2 CloudWatchRegion = "ap-northeast-2" - CloudWatchRegionApNortheast3 CloudWatchRegion = "ap-northeast-3" - CloudWatchRegionEuNorth1 CloudWatchRegion = "eu-north-1" - CloudWatchRegionSaEast1 CloudWatchRegion = "sa-east-1" - CloudWatchRegionCnNorthwest1 CloudWatchRegion = "cn-northwest-1" - CloudWatchRegionCnNorth1 CloudWatchRegion = "cn-north-1" - CloudWatchRegionAfSouth1 CloudWatchRegion = "af-south-1" - CloudWatchRegionEuSouth1 CloudWatchRegion = "eu-south-1" - CloudWatchRegionEuSouth2 CloudWatchRegion = "eu-south-2" - CloudWatchRegionUsGovWest1 CloudWatchRegion = "us-gov-west-1" - CloudWatchRegionUsGovEast1 CloudWatchRegion = "us-gov-east-1" - CloudWatchRegionUsIsoEast1 CloudWatchRegion = "us-iso-east-1" - CloudWatchRegionUsIsoWest1 CloudWatchRegion = "us-iso-west-1" - CloudWatchRegionUsIsobEast1 CloudWatchRegion = "us-isob-east-1" - CloudWatchRegionApSoutheast4 CloudWatchRegion = "ap-southeast-4" - CloudWatchRegionIlCentral1 CloudWatchRegion = "il-central-1" - CloudWatchRegionCaWest1 CloudWatchRegion = "ca-west-1" - CloudWatchRegionApSoutheast5 CloudWatchRegion = "ap-southeast-5" - CloudWatchRegionMxCentral1 CloudWatchRegion = "mx-central-1" - CloudWatchRegionUsIsofSouth1 CloudWatchRegion = "us-isof-south-1" - CloudWatchRegionUsIsofEast1 CloudWatchRegion = "us-isof-east-1" - CloudWatchRegionApSoutheast7 CloudWatchRegion = "ap-southeast-7" - CloudWatchRegionApEast2 CloudWatchRegion = "ap-east-2" - CloudWatchRegionEuIsoeWest1 CloudWatchRegion = "eu-isoe-west-1" - CloudWatchRegionApSoutheast6 CloudWatchRegion = "ap-southeast-6" -) - -// Values returns all known values for CloudWatchRegion. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (CloudWatchRegion) Values() []CloudWatchRegion { - return []CloudWatchRegion{ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "ca-central-1", - "eu-central-1", - "eu-central-2", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "ap-east-1", - "me-south-1", - "me-central-1", - "ap-south-1", - "ap-south-2", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "eu-north-1", - "sa-east-1", - "cn-northwest-1", - "cn-north-1", - "af-south-1", - "eu-south-1", - "eu-south-2", - "us-gov-west-1", - "us-gov-east-1", - "us-iso-east-1", - "us-iso-west-1", - "us-isob-east-1", - "ap-southeast-4", - "il-central-1", - "ca-west-1", - "ap-southeast-5", - "mx-central-1", - "us-isof-south-1", - "us-isof-east-1", - "ap-southeast-7", - "ap-east-2", - "eu-isoe-west-1", - "ap-southeast-6", - } -} - -type ComparisonOperator string - -// Enum values for ComparisonOperator -const ( - ComparisonOperatorGreaterThanOrEqualToThreshold ComparisonOperator = "GreaterThanOrEqualToThreshold" - ComparisonOperatorGreaterThanThreshold ComparisonOperator = "GreaterThanThreshold" - ComparisonOperatorLessThanThreshold ComparisonOperator = "LessThanThreshold" - ComparisonOperatorLessThanOrEqualToThreshold ComparisonOperator = "LessThanOrEqualToThreshold" -) - -// Values returns all known values for ComparisonOperator. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ComparisonOperator) Values() []ComparisonOperator { - return []ComparisonOperator{ - "GreaterThanOrEqualToThreshold", - "GreaterThanThreshold", - "LessThanThreshold", - "LessThanOrEqualToThreshold", - } -} - -type HealthCheckRegion string - -// Enum values for HealthCheckRegion -const ( - HealthCheckRegionUsEast1 HealthCheckRegion = "us-east-1" - HealthCheckRegionUsWest1 HealthCheckRegion = "us-west-1" - HealthCheckRegionUsWest2 HealthCheckRegion = "us-west-2" - HealthCheckRegionEuWest1 HealthCheckRegion = "eu-west-1" - HealthCheckRegionApSoutheast1 HealthCheckRegion = "ap-southeast-1" - HealthCheckRegionApSoutheast2 HealthCheckRegion = "ap-southeast-2" - HealthCheckRegionApNortheast1 HealthCheckRegion = "ap-northeast-1" - HealthCheckRegionSaEast1 HealthCheckRegion = "sa-east-1" -) - -// Values returns all known values for HealthCheckRegion. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (HealthCheckRegion) Values() []HealthCheckRegion { - return []HealthCheckRegion{ - "us-east-1", - "us-west-1", - "us-west-2", - "eu-west-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-northeast-1", - "sa-east-1", - } -} - -type HealthCheckType string - -// Enum values for HealthCheckType -const ( - HealthCheckTypeHttp HealthCheckType = "HTTP" - HealthCheckTypeHttps HealthCheckType = "HTTPS" - HealthCheckTypeHttpStrMatch HealthCheckType = "HTTP_STR_MATCH" - HealthCheckTypeHttpsStrMatch HealthCheckType = "HTTPS_STR_MATCH" - HealthCheckTypeTcp HealthCheckType = "TCP" - HealthCheckTypeCalculated HealthCheckType = "CALCULATED" - HealthCheckTypeCloudwatchMetric HealthCheckType = "CLOUDWATCH_METRIC" - HealthCheckTypeRecoveryControl HealthCheckType = "RECOVERY_CONTROL" -) - -// Values returns all known values for HealthCheckType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (HealthCheckType) Values() []HealthCheckType { - return []HealthCheckType{ - "HTTP", - "HTTPS", - "HTTP_STR_MATCH", - "HTTPS_STR_MATCH", - "TCP", - "CALCULATED", - "CLOUDWATCH_METRIC", - "RECOVERY_CONTROL", - } -} - -type HostedZoneLimitType string - -// Enum values for HostedZoneLimitType -const ( - HostedZoneLimitTypeMaxRrsetsByZone HostedZoneLimitType = "MAX_RRSETS_BY_ZONE" - HostedZoneLimitTypeMaxVpcsAssociatedByZone HostedZoneLimitType = "MAX_VPCS_ASSOCIATED_BY_ZONE" -) - -// Values returns all known values for HostedZoneLimitType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (HostedZoneLimitType) Values() []HostedZoneLimitType { - return []HostedZoneLimitType{ - "MAX_RRSETS_BY_ZONE", - "MAX_VPCS_ASSOCIATED_BY_ZONE", - } -} - -type HostedZoneType string - -// Enum values for HostedZoneType -const ( - HostedZoneTypePrivateHostedZone HostedZoneType = "PrivateHostedZone" -) - -// Values returns all known values for HostedZoneType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (HostedZoneType) Values() []HostedZoneType { - return []HostedZoneType{ - "PrivateHostedZone", - } -} - -type InsufficientDataHealthStatus string - -// Enum values for InsufficientDataHealthStatus -const ( - InsufficientDataHealthStatusHealthy InsufficientDataHealthStatus = "Healthy" - InsufficientDataHealthStatusUnhealthy InsufficientDataHealthStatus = "Unhealthy" - InsufficientDataHealthStatusLastKnownStatus InsufficientDataHealthStatus = "LastKnownStatus" -) - -// Values returns all known values for InsufficientDataHealthStatus. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (InsufficientDataHealthStatus) Values() []InsufficientDataHealthStatus { - return []InsufficientDataHealthStatus{ - "Healthy", - "Unhealthy", - "LastKnownStatus", - } -} - -type ResettableElementName string - -// Enum values for ResettableElementName -const ( - ResettableElementNameFullyQualifiedDomainName ResettableElementName = "FullyQualifiedDomainName" - ResettableElementNameRegions ResettableElementName = "Regions" - ResettableElementNameResourcePath ResettableElementName = "ResourcePath" - ResettableElementNameChildHealthChecks ResettableElementName = "ChildHealthChecks" -) - -// Values returns all known values for ResettableElementName. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ResettableElementName) Values() []ResettableElementName { - return []ResettableElementName{ - "FullyQualifiedDomainName", - "Regions", - "ResourcePath", - "ChildHealthChecks", - } -} - -type ResourceRecordSetFailover string - -// Enum values for ResourceRecordSetFailover -const ( - ResourceRecordSetFailoverPrimary ResourceRecordSetFailover = "PRIMARY" - ResourceRecordSetFailoverSecondary ResourceRecordSetFailover = "SECONDARY" -) - -// Values returns all known values for ResourceRecordSetFailover. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ResourceRecordSetFailover) Values() []ResourceRecordSetFailover { - return []ResourceRecordSetFailover{ - "PRIMARY", - "SECONDARY", - } -} - -type ResourceRecordSetRegion string - -// Enum values for ResourceRecordSetRegion -const ( - ResourceRecordSetRegionUsEast1 ResourceRecordSetRegion = "us-east-1" - ResourceRecordSetRegionUsEast2 ResourceRecordSetRegion = "us-east-2" - ResourceRecordSetRegionUsWest1 ResourceRecordSetRegion = "us-west-1" - ResourceRecordSetRegionUsWest2 ResourceRecordSetRegion = "us-west-2" - ResourceRecordSetRegionCaCentral1 ResourceRecordSetRegion = "ca-central-1" - ResourceRecordSetRegionEuWest1 ResourceRecordSetRegion = "eu-west-1" - ResourceRecordSetRegionEuWest2 ResourceRecordSetRegion = "eu-west-2" - ResourceRecordSetRegionEuWest3 ResourceRecordSetRegion = "eu-west-3" - ResourceRecordSetRegionEuCentral1 ResourceRecordSetRegion = "eu-central-1" - ResourceRecordSetRegionEuCentral2 ResourceRecordSetRegion = "eu-central-2" - ResourceRecordSetRegionApSoutheast1 ResourceRecordSetRegion = "ap-southeast-1" - ResourceRecordSetRegionApSoutheast2 ResourceRecordSetRegion = "ap-southeast-2" - ResourceRecordSetRegionApSoutheast3 ResourceRecordSetRegion = "ap-southeast-3" - ResourceRecordSetRegionApNortheast1 ResourceRecordSetRegion = "ap-northeast-1" - ResourceRecordSetRegionApNortheast2 ResourceRecordSetRegion = "ap-northeast-2" - ResourceRecordSetRegionApNortheast3 ResourceRecordSetRegion = "ap-northeast-3" - ResourceRecordSetRegionEuNorth1 ResourceRecordSetRegion = "eu-north-1" - ResourceRecordSetRegionSaEast1 ResourceRecordSetRegion = "sa-east-1" - ResourceRecordSetRegionCnNorth1 ResourceRecordSetRegion = "cn-north-1" - ResourceRecordSetRegionCnNorthwest1 ResourceRecordSetRegion = "cn-northwest-1" - ResourceRecordSetRegionApEast1 ResourceRecordSetRegion = "ap-east-1" - ResourceRecordSetRegionMeSouth1 ResourceRecordSetRegion = "me-south-1" - ResourceRecordSetRegionMeCentral1 ResourceRecordSetRegion = "me-central-1" - ResourceRecordSetRegionApSouth1 ResourceRecordSetRegion = "ap-south-1" - ResourceRecordSetRegionApSouth2 ResourceRecordSetRegion = "ap-south-2" - ResourceRecordSetRegionAfSouth1 ResourceRecordSetRegion = "af-south-1" - ResourceRecordSetRegionEuSouth1 ResourceRecordSetRegion = "eu-south-1" - ResourceRecordSetRegionEuSouth2 ResourceRecordSetRegion = "eu-south-2" - ResourceRecordSetRegionApSoutheast4 ResourceRecordSetRegion = "ap-southeast-4" - ResourceRecordSetRegionIlCentral1 ResourceRecordSetRegion = "il-central-1" - ResourceRecordSetRegionCaWest1 ResourceRecordSetRegion = "ca-west-1" - ResourceRecordSetRegionApSoutheast5 ResourceRecordSetRegion = "ap-southeast-5" - ResourceRecordSetRegionMxCentral1 ResourceRecordSetRegion = "mx-central-1" - ResourceRecordSetRegionApSoutheast7 ResourceRecordSetRegion = "ap-southeast-7" - ResourceRecordSetRegionUsGovEast1 ResourceRecordSetRegion = "us-gov-east-1" - ResourceRecordSetRegionUsGovWest1 ResourceRecordSetRegion = "us-gov-west-1" - ResourceRecordSetRegionApEast2 ResourceRecordSetRegion = "ap-east-2" - ResourceRecordSetRegionApSoutheast6 ResourceRecordSetRegion = "ap-southeast-6" -) - -// Values returns all known values for ResourceRecordSetRegion. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ResourceRecordSetRegion) Values() []ResourceRecordSetRegion { - return []ResourceRecordSetRegion{ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "ca-central-1", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-central-1", - "eu-central-2", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "eu-north-1", - "sa-east-1", - "cn-north-1", - "cn-northwest-1", - "ap-east-1", - "me-south-1", - "me-central-1", - "ap-south-1", - "ap-south-2", - "af-south-1", - "eu-south-1", - "eu-south-2", - "ap-southeast-4", - "il-central-1", - "ca-west-1", - "ap-southeast-5", - "mx-central-1", - "ap-southeast-7", - "us-gov-east-1", - "us-gov-west-1", - "ap-east-2", - "ap-southeast-6", - } -} - -type ReusableDelegationSetLimitType string - -// Enum values for ReusableDelegationSetLimitType -const ( - ReusableDelegationSetLimitTypeMaxZonesByReusableDelegationSet ReusableDelegationSetLimitType = "MAX_ZONES_BY_REUSABLE_DELEGATION_SET" -) - -// Values returns all known values for ReusableDelegationSetLimitType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ReusableDelegationSetLimitType) Values() []ReusableDelegationSetLimitType { - return []ReusableDelegationSetLimitType{ - "MAX_ZONES_BY_REUSABLE_DELEGATION_SET", - } -} - -type RRType string - -// Enum values for RRType -const ( - RRTypeSoa RRType = "SOA" - RRTypeA RRType = "A" - RRTypeTxt RRType = "TXT" - RRTypeNs RRType = "NS" - RRTypeCname RRType = "CNAME" - RRTypeMx RRType = "MX" - RRTypeNaptr RRType = "NAPTR" - RRTypePtr RRType = "PTR" - RRTypeSrv RRType = "SRV" - RRTypeSpf RRType = "SPF" - RRTypeAaaa RRType = "AAAA" - RRTypeCaa RRType = "CAA" - RRTypeDs RRType = "DS" - RRTypeTlsa RRType = "TLSA" - RRTypeSshfp RRType = "SSHFP" - RRTypeSvcb RRType = "SVCB" - RRTypeHttps RRType = "HTTPS" -) - -// Values returns all known values for RRType. Note that this can be expanded in -// the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (RRType) Values() []RRType { - return []RRType{ - "SOA", - "A", - "TXT", - "NS", - "CNAME", - "MX", - "NAPTR", - "PTR", - "SRV", - "SPF", - "AAAA", - "CAA", - "DS", - "TLSA", - "SSHFP", - "SVCB", - "HTTPS", - } -} - -type Statistic string - -// Enum values for Statistic -const ( - StatisticAverage Statistic = "Average" - StatisticSum Statistic = "Sum" - StatisticSampleCount Statistic = "SampleCount" - StatisticMaximum Statistic = "Maximum" - StatisticMinimum Statistic = "Minimum" -) - -// Values returns all known values for Statistic. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (Statistic) Values() []Statistic { - return []Statistic{ - "Average", - "Sum", - "SampleCount", - "Maximum", - "Minimum", - } -} - -type TagResourceType string - -// Enum values for TagResourceType -const ( - TagResourceTypeHealthcheck TagResourceType = "healthcheck" - TagResourceTypeHostedzone TagResourceType = "hostedzone" -) - -// Values returns all known values for TagResourceType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TagResourceType) Values() []TagResourceType { - return []TagResourceType{ - "healthcheck", - "hostedzone", - } -} - -type VPCRegion string - -// Enum values for VPCRegion -const ( - VPCRegionUsEast1 VPCRegion = "us-east-1" - VPCRegionUsEast2 VPCRegion = "us-east-2" - VPCRegionUsWest1 VPCRegion = "us-west-1" - VPCRegionUsWest2 VPCRegion = "us-west-2" - VPCRegionEuWest1 VPCRegion = "eu-west-1" - VPCRegionEuWest2 VPCRegion = "eu-west-2" - VPCRegionEuWest3 VPCRegion = "eu-west-3" - VPCRegionEuCentral1 VPCRegion = "eu-central-1" - VPCRegionEuCentral2 VPCRegion = "eu-central-2" - VPCRegionApEast1 VPCRegion = "ap-east-1" - VPCRegionMeSouth1 VPCRegion = "me-south-1" - VPCRegionUsGovWest1 VPCRegion = "us-gov-west-1" - VPCRegionUsGovEast1 VPCRegion = "us-gov-east-1" - VPCRegionUsIsoEast1 VPCRegion = "us-iso-east-1" - VPCRegionUsIsoWest1 VPCRegion = "us-iso-west-1" - VPCRegionUsIsobEast1 VPCRegion = "us-isob-east-1" - VPCRegionMeCentral1 VPCRegion = "me-central-1" - VPCRegionApSoutheast1 VPCRegion = "ap-southeast-1" - VPCRegionApSoutheast2 VPCRegion = "ap-southeast-2" - VPCRegionApSoutheast3 VPCRegion = "ap-southeast-3" - VPCRegionApSouth1 VPCRegion = "ap-south-1" - VPCRegionApSouth2 VPCRegion = "ap-south-2" - VPCRegionApNortheast1 VPCRegion = "ap-northeast-1" - VPCRegionApNortheast2 VPCRegion = "ap-northeast-2" - VPCRegionApNortheast3 VPCRegion = "ap-northeast-3" - VPCRegionEuNorth1 VPCRegion = "eu-north-1" - VPCRegionSaEast1 VPCRegion = "sa-east-1" - VPCRegionCaCentral1 VPCRegion = "ca-central-1" - VPCRegionCnNorth1 VPCRegion = "cn-north-1" - VPCRegionCnNorthwest1 VPCRegion = "cn-northwest-1" - VPCRegionAfSouth1 VPCRegion = "af-south-1" - VPCRegionEuSouth1 VPCRegion = "eu-south-1" - VPCRegionEuSouth2 VPCRegion = "eu-south-2" - VPCRegionApSoutheast4 VPCRegion = "ap-southeast-4" - VPCRegionIlCentral1 VPCRegion = "il-central-1" - VPCRegionCaWest1 VPCRegion = "ca-west-1" - VPCRegionApSoutheast5 VPCRegion = "ap-southeast-5" - VPCRegionMxCentral1 VPCRegion = "mx-central-1" - VPCRegionUsIsofSouth1 VPCRegion = "us-isof-south-1" - VPCRegionUsIsofEast1 VPCRegion = "us-isof-east-1" - VPCRegionApSoutheast7 VPCRegion = "ap-southeast-7" - VPCRegionApEast2 VPCRegion = "ap-east-2" - VPCRegionEuIsoeWest1 VPCRegion = "eu-isoe-west-1" - VPCRegionApSoutheast6 VPCRegion = "ap-southeast-6" -) - -// Values returns all known values for VPCRegion. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (VPCRegion) Values() []VPCRegion { - return []VPCRegion{ - "us-east-1", - "us-east-2", - "us-west-1", - "us-west-2", - "eu-west-1", - "eu-west-2", - "eu-west-3", - "eu-central-1", - "eu-central-2", - "ap-east-1", - "me-south-1", - "us-gov-west-1", - "us-gov-east-1", - "us-iso-east-1", - "us-iso-west-1", - "us-isob-east-1", - "me-central-1", - "ap-southeast-1", - "ap-southeast-2", - "ap-southeast-3", - "ap-south-1", - "ap-south-2", - "ap-northeast-1", - "ap-northeast-2", - "ap-northeast-3", - "eu-north-1", - "sa-east-1", - "ca-central-1", - "cn-north-1", - "cn-northwest-1", - "af-south-1", - "eu-south-1", - "eu-south-2", - "ap-southeast-4", - "il-central-1", - "ca-west-1", - "ap-southeast-5", - "mx-central-1", - "us-isof-south-1", - "us-isof-east-1", - "ap-southeast-7", - "ap-east-2", - "eu-isoe-west-1", - "ap-southeast-6", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go deleted file mode 100644 index 05f57a4277..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/errors.go +++ /dev/null @@ -1,1978 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// This CIDR block is already in use. -type CidrBlockInUseException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *CidrBlockInUseException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *CidrBlockInUseException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *CidrBlockInUseException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "CidrBlockInUseException" - } - return *e.ErrorCodeOverride -} -func (e *CidrBlockInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A CIDR collection with this name and a different caller reference already -// exists in this account. -type CidrCollectionAlreadyExistsException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *CidrCollectionAlreadyExistsException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *CidrCollectionAlreadyExistsException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *CidrCollectionAlreadyExistsException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "CidrCollectionAlreadyExistsException" - } - return *e.ErrorCodeOverride -} -func (e *CidrCollectionAlreadyExistsException) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// This CIDR collection is in use, and isn't empty. -type CidrCollectionInUseException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *CidrCollectionInUseException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *CidrCollectionInUseException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *CidrCollectionInUseException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "CidrCollectionInUseException" - } - return *e.ErrorCodeOverride -} -func (e *CidrCollectionInUseException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The CIDR collection version you provided, doesn't match the one in the -// ListCidrCollections operation. -type CidrCollectionVersionMismatchException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *CidrCollectionVersionMismatchException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *CidrCollectionVersionMismatchException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *CidrCollectionVersionMismatchException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "CidrCollectionVersionMismatchException" - } - return *e.ErrorCodeOverride -} -func (e *CidrCollectionVersionMismatchException) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// Another user submitted a request to create, update, or delete the object at the -// same time that you did. Retry the request. -type ConcurrentModification struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ConcurrentModification) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ConcurrentModification) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ConcurrentModification) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ConcurrentModification" - } - return *e.ErrorCodeOverride -} -func (e *ConcurrentModification) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The cause of this error depends on the operation that you're performing: -// -// - Create a public hosted zone: Two hosted zones that have the same name or -// that have a parent/child relationship (example.com and test.example.com) can't -// have any common name servers. You tried to create a hosted zone that has the -// same name as an existing hosted zone or that's the parent or child of an -// existing hosted zone, and you specified a delegation set that shares one or more -// name servers with the existing hosted zone. For more information, see [CreateReusableDelegationSet]. -// -// - Create a private hosted zone: A hosted zone with the specified name already -// exists and is already associated with the Amazon VPC that you specified. -// -// - Associate VPCs with a private hosted zone: The VPC that you specified is -// already associated with another hosted zone that has the same name. -// -// [CreateReusableDelegationSet]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateReusableDelegationSet.html -type ConflictingDomainExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ConflictingDomainExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ConflictingDomainExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ConflictingDomainExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ConflictingDomainExists" - } - return *e.ErrorCodeOverride -} -func (e *ConflictingDomainExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You tried to update a traffic policy instance by using a traffic policy version -// that has a different DNS type than the current type for the instance. You -// specified the type in the JSON document in the CreateTrafficPolicy or -// CreateTrafficPolicyVersion request. -type ConflictingTypes struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ConflictingTypes) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ConflictingTypes) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ConflictingTypes) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ConflictingTypes" - } - return *e.ErrorCodeOverride -} -func (e *ConflictingTypes) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A delegation set with the same owner and caller reference combination has -// already been created. -type DelegationSetAlreadyCreated struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DelegationSetAlreadyCreated) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DelegationSetAlreadyCreated) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DelegationSetAlreadyCreated) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DelegationSetAlreadyCreated" - } - return *e.ErrorCodeOverride -} -func (e *DelegationSetAlreadyCreated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified delegation set has already been marked as reusable. -type DelegationSetAlreadyReusable struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DelegationSetAlreadyReusable) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DelegationSetAlreadyReusable) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DelegationSetAlreadyReusable) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DelegationSetAlreadyReusable" - } - return *e.ErrorCodeOverride -} -func (e *DelegationSetAlreadyReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified delegation contains associated hosted zones which must be deleted -// before the reusable delegation set can be deleted. -type DelegationSetInUse struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DelegationSetInUse) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DelegationSetInUse) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DelegationSetInUse) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DelegationSetInUse" - } - return *e.ErrorCodeOverride -} -func (e *DelegationSetInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You can create a hosted zone that has the same name as an existing hosted zone -// (example.com is common), but there is a limit to the number of hosted zones that -// have the same name. If you get this error, Amazon Route 53 has reached that -// limit. If you own the domain name and Route 53 generates this error, contact -// Customer Support. -type DelegationSetNotAvailable struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DelegationSetNotAvailable) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DelegationSetNotAvailable) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DelegationSetNotAvailable) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DelegationSetNotAvailable" - } - return *e.ErrorCodeOverride -} -func (e *DelegationSetNotAvailable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A reusable delegation set with the specified ID does not exist. -type DelegationSetNotReusable struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DelegationSetNotReusable) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DelegationSetNotReusable) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DelegationSetNotReusable) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DelegationSetNotReusable" - } - return *e.ErrorCodeOverride -} -func (e *DelegationSetNotReusable) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The hosted zone doesn't have any DNSSEC resources. -type DNSSECNotFound struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DNSSECNotFound) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DNSSECNotFound) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DNSSECNotFound) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DNSSECNotFound" - } - return *e.ErrorCodeOverride -} -func (e *DNSSECNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The health check you're attempting to create already exists. Amazon Route 53 -// -// returns this error when you submit a request that has the following values: -// -// - The same value for CallerReference as an existing health check, and one or -// more values that differ from the existing health check that has the same caller -// reference. -// -// - The same value for CallerReference as a health check that you created and -// later deleted, regardless of the other settings in the request. -type HealthCheckAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HealthCheckAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HealthCheckAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HealthCheckAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HealthCheckAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *HealthCheckAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This error code is not in use. -type HealthCheckInUse struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HealthCheckInUse) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HealthCheckInUse) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HealthCheckInUse) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HealthCheckInUse" - } - return *e.ErrorCodeOverride -} -func (e *HealthCheckInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The value of HealthCheckVersion in the request doesn't match the value of -// HealthCheckVersion in the health check. -type HealthCheckVersionMismatch struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HealthCheckVersionMismatch) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HealthCheckVersionMismatch) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HealthCheckVersionMismatch) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HealthCheckVersionMismatch" - } - return *e.ErrorCodeOverride -} -func (e *HealthCheckVersionMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The hosted zone you're trying to create already exists. Amazon Route 53 returns -// this error when a hosted zone has already been created with the specified -// CallerReference . -type HostedZoneAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HostedZoneAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HostedZoneAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HostedZoneAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HostedZoneAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *HostedZoneAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The hosted zone contains resource records that are not SOA or NS records. -type HostedZoneNotEmpty struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HostedZoneNotEmpty) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HostedZoneNotEmpty) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HostedZoneNotEmpty) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HostedZoneNotEmpty" - } - return *e.ErrorCodeOverride -} -func (e *HostedZoneNotEmpty) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified HostedZone can't be found. -type HostedZoneNotFound struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HostedZoneNotFound) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HostedZoneNotFound) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HostedZoneNotFound) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HostedZoneNotFound" - } - return *e.ErrorCodeOverride -} -func (e *HostedZoneNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified hosted zone is a public hosted zone, not a private hosted zone. -type HostedZoneNotPrivate struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HostedZoneNotPrivate) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HostedZoneNotPrivate) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HostedZoneNotPrivate) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HostedZoneNotPrivate" - } - return *e.ErrorCodeOverride -} -func (e *HostedZoneNotPrivate) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The hosted zone nameservers don't match the parent nameservers. The hosted zone -// and parent must have the same nameservers. -type HostedZonePartiallyDelegated struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *HostedZonePartiallyDelegated) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *HostedZonePartiallyDelegated) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *HostedZonePartiallyDelegated) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "HostedZonePartiallyDelegated" - } - return *e.ErrorCodeOverride -} -func (e *HostedZonePartiallyDelegated) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The resource you're trying to access is unsupported on this Amazon Route 53 -// endpoint. -type IncompatibleVersion struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *IncompatibleVersion) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *IncompatibleVersion) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *IncompatibleVersion) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "IncompatibleVersion" - } - return *e.ErrorCodeOverride -} -func (e *IncompatibleVersion) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Amazon Route 53 doesn't have the permissions required to create log streams and -// send query logs to log streams. Possible causes include the following: -// -// - There is no resource policy that specifies the log group ARN in the value -// for Resource . -// -// - The resource policy that includes the log group ARN in the value for -// Resource doesn't have the necessary permissions. -// -// - The resource policy hasn't finished propagating yet. -// -// - The Key management service (KMS) key you specified doesn’t exist or it -// can’t be used with the log group associated with query log. Update or provide a -// resource policy to grant permissions for the KMS key. -// -// - The Key management service (KMS) key you specified is marked as disabled -// for the log group associated with query log. Update or provide a resource policy -// to grant permissions for the KMS key. -type InsufficientCloudWatchLogsResourcePolicy struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InsufficientCloudWatchLogsResourcePolicy) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InsufficientCloudWatchLogsResourcePolicy" - } - return *e.ErrorCodeOverride -} -func (e *InsufficientCloudWatchLogsResourcePolicy) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// Parameter name is not valid. -type InvalidArgument struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidArgument) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidArgument) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidArgument) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidArgument" - } - return *e.ErrorCodeOverride -} -func (e *InvalidArgument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This exception contains a list of messages that might contain one or more error -// messages. Each error message indicates one error in the change batch. -type InvalidChangeBatch struct { - Message *string - - ErrorCodeOverride *string - - Messages []string - - noSmithyDocumentSerde -} - -func (e *InvalidChangeBatch) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidChangeBatch) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidChangeBatch) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidChangeBatch" - } - return *e.ErrorCodeOverride -} -func (e *InvalidChangeBatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified domain name is not valid. -type InvalidDomainName struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidDomainName) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidDomainName) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidDomainName) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidDomainName" - } - return *e.ErrorCodeOverride -} -func (e *InvalidDomainName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The input is not valid. -type InvalidInput struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidInput) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidInput) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidInput) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidInput" - } - return *e.ErrorCodeOverride -} -func (e *InvalidInput) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The key-signing key (KSK) name that you specified isn't a valid name. -type InvalidKeySigningKeyName struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidKeySigningKeyName) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidKeySigningKeyName) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidKeySigningKeyName) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidKeySigningKeyName" - } - return *e.ErrorCodeOverride -} -func (e *InvalidKeySigningKeyName) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The key-signing key (KSK) status isn't valid or another KSK has the status -// INTERNAL_FAILURE . -type InvalidKeySigningKeyStatus struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidKeySigningKeyStatus) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidKeySigningKeyStatus) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidKeySigningKeyStatus) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidKeySigningKeyStatus" - } - return *e.ErrorCodeOverride -} -func (e *InvalidKeySigningKeyStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The KeyManagementServiceArn that you specified isn't valid to use with DNSSEC -// signing. -type InvalidKMSArn struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidKMSArn) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidKMSArn) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidKMSArn) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidKMSArn" - } - return *e.ErrorCodeOverride -} -func (e *InvalidKMSArn) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The value that you specified to get the second or subsequent page of results is -// invalid. -type InvalidPaginationToken struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidPaginationToken) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidPaginationToken) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidPaginationToken) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidPaginationToken" - } - return *e.ErrorCodeOverride -} -func (e *InvalidPaginationToken) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Your hosted zone status isn't valid for this operation. In the hosted zone, -// change the status to enable DNSSEC or disable DNSSEC . -type InvalidSigningStatus struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidSigningStatus) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidSigningStatus) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidSigningStatus) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidSigningStatus" - } - return *e.ErrorCodeOverride -} -func (e *InvalidSigningStatus) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The format of the traffic policy document that you specified in the Document -// element is not valid. -type InvalidTrafficPolicyDocument struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidTrafficPolicyDocument) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidTrafficPolicyDocument) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidTrafficPolicyDocument) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidTrafficPolicyDocument" - } - return *e.ErrorCodeOverride -} -func (e *InvalidTrafficPolicyDocument) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The VPC ID that you specified either isn't a valid ID or the current account is -// not authorized to access this VPC. -type InvalidVPCId struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidVPCId) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidVPCId) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidVPCId) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidVPCId" - } - return *e.ErrorCodeOverride -} -func (e *InvalidVPCId) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You've already created a key-signing key (KSK) with this name or with the same -// customer managed key ARN. -type KeySigningKeyAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *KeySigningKeyAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *KeySigningKeyAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *KeySigningKeyAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "KeySigningKeyAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *KeySigningKeyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The key-signing key (KSK) is specified in a parent DS record. -type KeySigningKeyInParentDSRecord struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *KeySigningKeyInParentDSRecord) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *KeySigningKeyInParentDSRecord) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *KeySigningKeyInParentDSRecord) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "KeySigningKeyInParentDSRecord" - } - return *e.ErrorCodeOverride -} -func (e *KeySigningKeyInParentDSRecord) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The key-signing key (KSK) that you specified can't be deactivated because it's -// the only KSK for a currently-enabled DNSSEC. Disable DNSSEC signing, or add or -// enable another KSK. -type KeySigningKeyInUse struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *KeySigningKeyInUse) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *KeySigningKeyInUse) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *KeySigningKeyInUse) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "KeySigningKeyInUse" - } - return *e.ErrorCodeOverride -} -func (e *KeySigningKeyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A key-signing key (KSK) with ACTIVE status wasn't found. -type KeySigningKeyWithActiveStatusNotFound struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *KeySigningKeyWithActiveStatusNotFound) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *KeySigningKeyWithActiveStatusNotFound) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *KeySigningKeyWithActiveStatusNotFound) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "KeySigningKeyWithActiveStatusNotFound" - } - return *e.ErrorCodeOverride -} -func (e *KeySigningKeyWithActiveStatusNotFound) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// The VPC that you're trying to disassociate from the private hosted zone is the -// last VPC that is associated with the hosted zone. Amazon Route 53 doesn't -// support disassociating the last VPC from a hosted zone. -type LastVPCAssociation struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *LastVPCAssociation) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *LastVPCAssociation) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *LastVPCAssociation) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "LastVPCAssociation" - } - return *e.ErrorCodeOverride -} -func (e *LastVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This operation can't be completed because the current account has reached the -// limit on the resource you are trying to create. To request a higher limit, [create a case]with -// the Amazon Web Services Support Center. -// -// [create a case]: http://aws.amazon.com/route53-request -type LimitsExceeded struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *LimitsExceeded) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *LimitsExceeded) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *LimitsExceeded) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "LimitsExceeded" - } - return *e.ErrorCodeOverride -} -func (e *LimitsExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A change with the specified change ID does not exist. -type NoSuchChange struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchChange) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchChange) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchChange) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchChange" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchChange) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The CIDR collection you specified, doesn't exist. -type NoSuchCidrCollectionException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchCidrCollectionException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchCidrCollectionException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchCidrCollectionException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchCidrCollectionException" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchCidrCollectionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The CIDR collection location doesn't match any locations in your account. -type NoSuchCidrLocationException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchCidrLocationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchCidrLocationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchCidrLocationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchCidrLocationException" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchCidrLocationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// There is no CloudWatch Logs log group with the specified ARN. -type NoSuchCloudWatchLogsLogGroup struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchCloudWatchLogsLogGroup) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchCloudWatchLogsLogGroup) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchCloudWatchLogsLogGroup) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchCloudWatchLogsLogGroup" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchCloudWatchLogsLogGroup) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A reusable delegation set with the specified ID does not exist. -type NoSuchDelegationSet struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchDelegationSet) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchDelegationSet) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchDelegationSet) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchDelegationSet" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchDelegationSet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Amazon Route 53 doesn't support the specified geographic location. For a list -// of supported geolocation codes, see the [GeoLocation]data type. -// -// [GeoLocation]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GeoLocation.html -type NoSuchGeoLocation struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchGeoLocation) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchGeoLocation) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchGeoLocation) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchGeoLocation" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchGeoLocation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// No health check exists with the specified ID. -type NoSuchHealthCheck struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchHealthCheck) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchHealthCheck) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchHealthCheck) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchHealthCheck" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchHealthCheck) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// No hosted zone exists with the ID that you specified. -type NoSuchHostedZone struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchHostedZone) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchHostedZone) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchHostedZone) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchHostedZone" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchHostedZone) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified key-signing key (KSK) doesn't exist. -type NoSuchKeySigningKey struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchKeySigningKey) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchKeySigningKey) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchKeySigningKey) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchKeySigningKey" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchKeySigningKey) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// There is no DNS query logging configuration with the specified ID. -type NoSuchQueryLoggingConfig struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchQueryLoggingConfig) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchQueryLoggingConfig) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchQueryLoggingConfig) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchQueryLoggingConfig" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchQueryLoggingConfig) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// No traffic policy exists with the specified ID. -type NoSuchTrafficPolicy struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchTrafficPolicy) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchTrafficPolicy) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchTrafficPolicy) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchTrafficPolicy" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchTrafficPolicy) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// No traffic policy instance exists with the specified ID. -type NoSuchTrafficPolicyInstance struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NoSuchTrafficPolicyInstance) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NoSuchTrafficPolicyInstance) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NoSuchTrafficPolicyInstance) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NoSuchTrafficPolicyInstance" - } - return *e.ErrorCodeOverride -} -func (e *NoSuchTrafficPolicyInstance) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Associating the specified VPC with the specified hosted zone has not been -// authorized. -type NotAuthorizedException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *NotAuthorizedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *NotAuthorizedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *NotAuthorizedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "NotAuthorizedException" - } - return *e.ErrorCodeOverride -} -func (e *NotAuthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// If Amazon Route 53 can't process a request before the next request arrives, it -// will reject subsequent requests for the same hosted zone and return an HTTP 400 -// error ( Bad request ). If Route 53 returns this error repeatedly for the same -// request, we recommend that you wait, in intervals of increasing duration, before -// you try the request again. -type PriorRequestNotComplete struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *PriorRequestNotComplete) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *PriorRequestNotComplete) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *PriorRequestNotComplete) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "PriorRequestNotComplete" - } - return *e.ErrorCodeOverride -} -func (e *PriorRequestNotComplete) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You're trying to associate a VPC with a public hosted zone. Amazon Route 53 -// doesn't support associating a VPC with a public hosted zone. -type PublicZoneVPCAssociation struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *PublicZoneVPCAssociation) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *PublicZoneVPCAssociation) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *PublicZoneVPCAssociation) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "PublicZoneVPCAssociation" - } - return *e.ErrorCodeOverride -} -func (e *PublicZoneVPCAssociation) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You can create only one query logging configuration for a hosted zone, and a -// query logging configuration already exists for this hosted zone. -type QueryLoggingConfigAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *QueryLoggingConfigAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *QueryLoggingConfigAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *QueryLoggingConfigAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "QueryLoggingConfigAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *QueryLoggingConfigAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The limit on the number of requests per second was exceeded. -type ThrottlingException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ThrottlingException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ThrottlingException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ThrottlingException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ThrottlingException" - } - return *e.ErrorCodeOverride -} -func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This health check can't be created because the current account has reached the -// limit on the number of active health checks. -// -// For information about default limits, see [Limits] in the Amazon Route 53 Developer -// Guide. -// -// For information about how to get the current limit for an account, see [GetAccountLimit]. To -// request a higher limit, [create a case]with the Amazon Web Services Support Center. -// -// You have reached the maximum number of active health checks for an Amazon Web -// Services account. To request a higher limit, [create a case]with the Amazon Web Services -// Support Center. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [GetAccountLimit]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html -// [create a case]: http://aws.amazon.com/route53-request -type TooManyHealthChecks struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyHealthChecks) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyHealthChecks) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyHealthChecks) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyHealthChecks" - } - return *e.ErrorCodeOverride -} -func (e *TooManyHealthChecks) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This operation can't be completed either because the current account has -// reached the limit on the number of hosted zones or because you've reached the -// limit on the number of hosted zones that can be associated with a reusable -// delegation set. -// -// For information about default limits, see [Limits] in the Amazon Route 53 Developer -// Guide. -// -// To get the current limit on hosted zones that can be created by an account, see [GetAccountLimit] -// . -// -// To get the current limit on hosted zones that can be associated with a reusable -// delegation set, see [GetReusableDelegationSetLimit]. -// -// To request a higher limit, [create a case] with the Amazon Web Services Support Center. -// -// [GetReusableDelegationSetLimit]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetReusableDelegationSetLimit.html -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [GetAccountLimit]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html -// [create a case]: http://aws.amazon.com/route53-request -type TooManyHostedZones struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyHostedZones) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyHostedZones) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyHostedZones) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyHostedZones" - } - return *e.ErrorCodeOverride -} -func (e *TooManyHostedZones) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// You've reached the limit for the number of key-signing keys (KSKs). Remove at -// least one KSK, and then try again. -type TooManyKeySigningKeys struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyKeySigningKeys) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyKeySigningKeys) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyKeySigningKeys) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyKeySigningKeys" - } - return *e.ErrorCodeOverride -} -func (e *TooManyKeySigningKeys) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This traffic policy can't be created because the current account has reached -// the limit on the number of traffic policies. -// -// For information about default limits, see [Limits] in the Amazon Route 53 Developer -// Guide. -// -// To get the current limit for an account, see [GetAccountLimit]. -// -// To request a higher limit, [create a case] with the Amazon Web Services Support Center. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [GetAccountLimit]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html -// [create a case]: http://aws.amazon.com/route53-request -type TooManyTrafficPolicies struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyTrafficPolicies) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyTrafficPolicies) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyTrafficPolicies) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyTrafficPolicies" - } - return *e.ErrorCodeOverride -} -func (e *TooManyTrafficPolicies) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This traffic policy instance can't be created because the current account has -// reached the limit on the number of traffic policy instances. -// -// For information about default limits, see [Limits] in the Amazon Route 53 Developer -// Guide. -// -// For information about how to get the current limit for an account, see [GetAccountLimit]. -// -// To request a higher limit, [create a case] with the Amazon Web Services Support Center. -// -// [Limits]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DNSLimitations.html -// [GetAccountLimit]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetAccountLimit.html -// [create a case]: http://aws.amazon.com/route53-request -type TooManyTrafficPolicyInstances struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyTrafficPolicyInstances) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyTrafficPolicyInstances) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyTrafficPolicyInstances) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyTrafficPolicyInstances" - } - return *e.ErrorCodeOverride -} -func (e *TooManyTrafficPolicyInstances) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// This traffic policy version can't be created because you've reached the limit -// of 1000 on the number of versions that you can create for the current traffic -// policy. -// -// To create more traffic policy versions, you can use [GetTrafficPolicy] to get the traffic policy -// document for a specified traffic policy version, and then use [CreateTrafficPolicy]to create a new -// traffic policy using the traffic policy document. -// -// [CreateTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateTrafficPolicy.html -// [GetTrafficPolicy]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetTrafficPolicy.html -type TooManyTrafficPolicyVersionsForCurrentPolicy struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyTrafficPolicyVersionsForCurrentPolicy" - } - return *e.ErrorCodeOverride -} -func (e *TooManyTrafficPolicyVersionsForCurrentPolicy) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// You've created the maximum number of authorizations that can be created for the -// specified hosted zone. To authorize another VPC to be associated with the hosted -// zone, submit a DeleteVPCAssociationAuthorization request to remove an existing -// authorization. To get a list of existing authorizations, submit a -// ListVPCAssociationAuthorizations request. -type TooManyVPCAssociationAuthorizations struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyVPCAssociationAuthorizations) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyVPCAssociationAuthorizations) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyVPCAssociationAuthorizations) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyVPCAssociationAuthorizations" - } - return *e.ErrorCodeOverride -} -func (e *TooManyVPCAssociationAuthorizations) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// A traffic policy that has the same value for Name already exists. -type TrafficPolicyAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TrafficPolicyAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TrafficPolicyAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TrafficPolicyAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TrafficPolicyAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *TrafficPolicyAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// There is already a traffic policy instance with the specified ID. -type TrafficPolicyInstanceAlreadyExists struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TrafficPolicyInstanceAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TrafficPolicyInstanceAlreadyExists) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TrafficPolicyInstanceAlreadyExists) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TrafficPolicyInstanceAlreadyExists" - } - return *e.ErrorCodeOverride -} -func (e *TrafficPolicyInstanceAlreadyExists) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// One or more traffic policy instances were created by using the specified -// traffic policy. -type TrafficPolicyInUse struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TrafficPolicyInUse) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TrafficPolicyInUse) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TrafficPolicyInUse) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TrafficPolicyInUse" - } - return *e.ErrorCodeOverride -} -func (e *TrafficPolicyInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The VPC that you specified is not authorized to be associated with the hosted -// zone. -type VPCAssociationAuthorizationNotFound struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *VPCAssociationAuthorizationNotFound) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *VPCAssociationAuthorizationNotFound) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *VPCAssociationAuthorizationNotFound) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "VPCAssociationAuthorizationNotFound" - } - return *e.ErrorCodeOverride -} -func (e *VPCAssociationAuthorizationNotFound) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// The specified VPC and hosted zone are not currently associated. -type VPCAssociationNotFound struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *VPCAssociationNotFound) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *VPCAssociationNotFound) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *VPCAssociationNotFound) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "VPCAssociationNotFound" - } - return *e.ErrorCodeOverride -} -func (e *VPCAssociationNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go deleted file mode 100644 index a213c93f26..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/types/types.go +++ /dev/null @@ -1,2232 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type AccountLimit struct { - - // The limit that you requested. Valid values include the following: - // - // - MAX_HEALTH_CHECKS_BY_OWNER: The maximum number of health checks that you - // can create using the current account. - // - // - MAX_HOSTED_ZONES_BY_OWNER: The maximum number of hosted zones that you can - // create using the current account. - // - // - MAX_REUSABLE_DELEGATION_SETS_BY_OWNER: The maximum number of reusable - // delegation sets that you can create using the current account. - // - // - MAX_TRAFFIC_POLICIES_BY_OWNER: The maximum number of traffic policies that - // you can create using the current account. - // - // - MAX_TRAFFIC_POLICY_INSTANCES_BY_OWNER: The maximum number of traffic policy - // instances that you can create using the current account. (Traffic policy - // instances are referred to as traffic flow policy records in the Amazon Route 53 - // console.) - // - // This member is required. - Type AccountLimitType - - // The current value for the limit that is specified by [Type]. - // - // [Type]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_AccountLimit.html#Route53-Type-AccountLimit-Type - // - // This member is required. - Value *int64 - - noSmithyDocumentSerde -} - -// A complex type that identifies the CloudWatch alarm that you want Amazon Route -// 53 health checkers to use to determine whether the specified health check is -// healthy. -type AlarmIdentifier struct { - - // The name of the CloudWatch alarm that you want Amazon Route 53 health checkers - // to use to determine whether this health check is healthy. - // - // Route 53 supports CloudWatch alarms with the following features: - // - // - Standard-resolution metrics. High-resolution metrics aren't supported. For - // more information, see [High-Resolution Metrics]in the Amazon CloudWatch User Guide. - // - // - Statistics: Average, Minimum, Maximum, Sum, and SampleCount. Extended - // statistics aren't supported. - // - // [High-Resolution Metrics]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/publishingMetrics.html#high-resolution-metrics - // - // This member is required. - Name *string - - // For the CloudWatch alarm that you want Route 53 health checkers to use to - // determine whether this health check is healthy, the region that the alarm was - // created in. - // - // For the current list of CloudWatch regions, see [Amazon CloudWatch endpoints and quotas] in the Amazon Web Services - // General Reference. - // - // [Amazon CloudWatch endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/cw_region.html - // - // This member is required. - Region CloudWatchRegion - - noSmithyDocumentSerde -} - -// Alias resource record sets only: Information about the Amazon Web Services -// -// resource, such as a CloudFront distribution or an Amazon S3 bucket, that you -// want to route traffic to. -// -// When creating resource record sets for a private hosted zone, note the -// following: -// -// - For information about creating failover resource record sets in a private -// hosted zone, see [Configuring Failover in a Private Hosted Zone]. -// -// [Configuring Failover in a Private Hosted Zone]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html -type AliasTarget struct { - - // Alias resource record sets only: The value that you specify depends on where - // you want to route queries: - // - // Amazon API Gateway custom regional APIs and edge-optimized APIs Specify the - // applicable domain name for your API. You can get the applicable value using the - // CLI command [get-domain-names]: - // - // - For regional APIs, specify the value of regionalDomainName . - // - // - For edge-optimized APIs, specify the value of distributionDomainName . This - // is the name of the associated CloudFront distribution, such as - // da1b2c3d4e5.cloudfront.net . - // - // The name of the record that you're creating must match a custom domain name for - // your API, such as api.example.com . - // - // Amazon Virtual Private Cloud interface VPC endpoint Enter the API endpoint for - // the interface endpoint, such as - // vpce-123456789abcdef01-example-us-east-1a.elasticloadbalancing.us-east-1.vpce.amazonaws.com - // . For edge-optimized APIs, this is the domain name for the corresponding - // CloudFront distribution. You can get the value of DnsName using the CLI command [describe-vpc-endpoints] - // . - // - // CloudFront distribution Specify the domain name that CloudFront assigned when - // you created your distribution. - // - // Your CloudFront distribution must include an alternate domain name that matches - // the name of the resource record set. For example, if the name of the resource - // record set is acme.example.com, your CloudFront distribution must include - // acme.example.com as one of the alternate domain names. For more information, see - // [Using Alternate Domain Names (CNAMEs)]in the Amazon CloudFront Developer Guide. - // - // You can't create a resource record set in a private hosted zone to route - // traffic to a CloudFront distribution. - // - // For failover alias records, you can't specify a CloudFront distribution for - // both the primary and secondary records. A distribution must include an alternate - // domain name that matches the name of the record. However, the primary and - // secondary records have the same name, and you can't include the same alternate - // domain name in more than one distribution. - // - // Elastic Beanstalk environment If the domain name for your Elastic Beanstalk - // environment includes the region that you deployed the environment in, you can - // create an alias record that routes traffic to the environment. For example, the - // domain name my-environment.us-west-2.elasticbeanstalk.com is a regionalized - // domain name. - // - // For environments that were created before early 2016, the domain name doesn't - // include the region. To route traffic to these environments, you must create a - // CNAME record instead of an alias record. Note that you can't create a CNAME - // record for the root domain name. For example, if your domain name is - // example.com, you can create a record that routes traffic for acme.example.com to - // your Elastic Beanstalk environment, but you can't create a record that routes - // traffic for example.com to your Elastic Beanstalk environment. - // - // For Elastic Beanstalk environments that have regionalized subdomains, specify - // the CNAME attribute for the environment. You can use the following methods to - // get the value of the CNAME attribute: - // - // - Amazon Web Services Management Console: For information about how to get - // the value by using the console, see [Using Custom Domains with Elastic Beanstalk]in the Elastic Beanstalk Developer Guide. - // - // - Elastic Beanstalk API: Use the DescribeEnvironments action to get the value - // of the CNAME attribute. For more information, see [DescribeEnvironments]in the Elastic Beanstalk - // API Reference. - // - // - CLI: Use the describe-environments command to get the value of the CNAME - // attribute. For more information, see [describe-environments]in the CLI Command Reference. - // - // ELB load balancer Specify the DNS name that is associated with the load - // balancer. Get the DNS name by using the Amazon Web Services Management Console, - // the ELB API, or the CLI. - // - // - Amazon Web Services Management Console: Go to the EC2 page, choose Load - // Balancers in the navigation pane, choose the load balancer, choose the - // Description tab, and get the value of the DNS name field. - // - // If you're routing traffic to a Classic Load Balancer, get the value that begins - // with dualstack. If you're routing traffic to another type of load balancer, get - // the value that applies to the record type, A or AAAA. - // - // - Elastic Load Balancing API: Use DescribeLoadBalancers to get the value of - // DNSName . For more information, see the applicable guide: - // - // - Classic Load Balancers: [DescribeLoadBalancers] - // - // - Application and Network Load Balancers: [DescribeLoadBalancers] - // - // - CLI: Use describe-load-balancers to get the value of DNSName . For more - // information, see the applicable guide: - // - // - Classic Load Balancers: [describe-load-balancers] - // - // - Application and Network Load Balancers: [describe-load-balancers] - // - // Global Accelerator accelerator Specify the DNS name for your accelerator: - // - // - Global Accelerator API: To get the DNS name, use [DescribeAccelerator]. - // - // - CLI: To get the DNS name, use [describe-accelerator]. - // - // Amazon S3 bucket that is configured as a static website Specify the domain name - // of the Amazon S3 website endpoint that you created the bucket in, for example, - // s3-website.us-east-2.amazonaws.com . For more information about valid values, - // see the table [Amazon S3 Website Endpoints]in the Amazon Web Services General Reference. For more - // information about using S3 buckets for websites, see [Getting Started with Amazon Route 53]in the Amazon Route 53 - // Developer Guide. - // - // Another Route 53 resource record set Specify the value of the Name element for - // a resource record set in the current hosted zone. - // - // If you're creating an alias record that has the same name as the hosted zone - // (known as the zone apex), you can't specify the domain name for a record for - // which the value of Type is CNAME . This is because the alias record must have - // the same type as the record that you're routing traffic to, and creating a CNAME - // record for the zone apex isn't supported even for an alias record. - // - // [DescribeEnvironments]: https://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_DescribeEnvironments.html - // [describe-environments]: https://docs.aws.amazon.com/cli/latest/reference/elasticbeanstalk/describe-environments.html - // [Getting Started with Amazon Route 53]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/getting-started.html - // [describe-accelerator]: https://docs.aws.amazon.com/cli/latest/reference/globalaccelerator/describe-accelerator.html - // [Amazon S3 Website Endpoints]: https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints - // [DescribeAccelerator]: https://docs.aws.amazon.com/global-accelerator/latest/api/API_DescribeAccelerator.html - // [Using Custom Domains with Elastic Beanstalk]: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customdomains.html - // [describe-load-balancers]: http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html - // [DescribeLoadBalancers]: https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html - // [get-domain-names]: https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html - // [Using Alternate Domain Names (CNAMEs)]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html - // [describe-vpc-endpoints]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html - // - // This member is required. - DNSName *string - - // Applies only to alias, failover alias, geolocation alias, latency alias, and - // weighted alias resource record sets: When EvaluateTargetHealth is true , an - // alias resource record set inherits the health of the referenced Amazon Web - // Services resource, such as an ELB load balancer or another resource record set - // in the hosted zone. - // - // Note the following: - // - // CloudFront distributions You can't set EvaluateTargetHealth to true when the - // alias target is a CloudFront distribution. - // - // Elastic Beanstalk environments that have regionalized subdomains If you specify - // an Elastic Beanstalk environment in DNSName and the environment contains an ELB - // load balancer, Elastic Load Balancing routes queries only to the healthy Amazon - // EC2 instances that are registered with the load balancer. (An environment - // automatically contains an ELB load balancer if it includes more than one Amazon - // EC2 instance.) If you set EvaluateTargetHealth to true and either no Amazon EC2 - // instances are healthy or the load balancer itself is unhealthy, Route 53 routes - // queries to other available resources that are healthy, if any. - // - // If the environment contains a single Amazon EC2 instance, there are no special - // requirements. - // - // ELB load balancers Health checking behavior depends on the type of load - // balancer: - // - // - Classic Load Balancers: If you specify an ELB Classic Load Balancer in - // DNSName , Elastic Load Balancing routes queries only to the healthy Amazon EC2 - // instances that are registered with the load balancer. If you set - // EvaluateTargetHealth to true and either no EC2 instances are healthy or the - // load balancer itself is unhealthy, Route 53 routes queries to other resources. - // - // - Application and Network Load Balancers: If you specify an ELB Application - // or Network Load Balancer and you set EvaluateTargetHealth to true , Route 53 - // routes queries to the load balancer based on the health of the target groups - // that are associated with the load balancer: - // - // - For an Application or Network Load Balancer to be considered healthy, every - // target group that contains targets must contain at least one healthy target. If - // any target group contains only unhealthy targets, the load balancer is - // considered unhealthy, and Route 53 routes queries to other resources. - // - // - A target group that has no registered targets is considered unhealthy. - // - // When you create a load balancer, you configure settings for Elastic Load - // Balancing health checks; they're not Route 53 health checks, but they perform a - // similar function. Do not create Route 53 health checks for the EC2 instances - // that you register with an ELB load balancer. - // - // S3 buckets There are no special requirements for setting EvaluateTargetHealth - // to true when the alias target is an S3 bucket. - // - // Other records in the same hosted zone If the Amazon Web Services resource that - // you specify in DNSName is a record or a group of records (for example, a group - // of weighted records) but is not another alias record, we recommend that you - // associate a health check with all of the records in the alias target. For more - // information, see [What Happens When You Omit Health Checks?]in the Amazon Route 53 Developer Guide. - // - // For more information and examples, see [Amazon Route 53 Health Checks and DNS Failover] in the Amazon Route 53 Developer Guide. - // - // [Amazon Route 53 Health Checks and DNS Failover]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html - // [What Happens When You Omit Health Checks?]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-complex-configs.html#dns-failover-complex-configs-hc-omitting - // - // This member is required. - EvaluateTargetHealth bool - - // Alias resource records sets only: The value used depends on where you want to - // route traffic: - // - // Amazon API Gateway custom regional APIs and edge-optimized APIs Specify the - // hosted zone ID for your API. You can get the applicable value using the CLI - // command [get-domain-names]: - // - // - For regional APIs, specify the value of regionalHostedZoneId . - // - // - For edge-optimized APIs, specify the value of distributionHostedZoneId . - // - // Amazon Virtual Private Cloud interface VPC endpoint Specify the hosted zone ID - // for your interface endpoint. You can get the value of HostedZoneId using the - // CLI command [describe-vpc-endpoints]. - // - // CloudFront distribution Specify Z2FDTNDATAQYW2 . - // - // Alias resource record sets for CloudFront can't be created in a private zone. - // - // Elastic Beanstalk environment Specify the hosted zone ID for the region that - // you created the environment in. The environment must have a regionalized - // subdomain. For a list of regions and the corresponding hosted zone IDs, see [Elastic Beanstalk endpoints and quotas]in - // the Amazon Web Services General Reference. - // - // ELB load balancer Specify the value of the hosted zone ID for the load - // balancer. Use the following methods to get the hosted zone ID: - // - // [Elastic Load Balancing endpoints and quotas] - // - topic in the Amazon Web Services General Reference: Use the value that - // corresponds with the region that you created your load balancer in. Note that - // there are separate columns for Application and Classic Load Balancers and for - // Network Load Balancers. - // - // - Amazon Web Services Management Console: Go to the Amazon EC2 page, choose - // Load Balancers in the navigation pane, select the load balancer, and get the - // value of the Hosted zone field on the Description tab. - // - // - Elastic Load Balancing API: Use DescribeLoadBalancers to get the applicable - // value. For more information, see the applicable guide: - // - // - Classic Load Balancers: Use [DescribeLoadBalancers]to get the value of CanonicalHostedZoneNameId . - // - // - Application and Network Load Balancers: Use [DescribeLoadBalancers]to get the value of - // CanonicalHostedZoneId . - // - // - CLI: Use describe-load-balancers to get the applicable value. For more - // information, see the applicable guide: - // - // - Classic Load Balancers: Use [describe-load-balancers]to get the value of CanonicalHostedZoneNameId . - // - // - Application and Network Load Balancers: Use [describe-load-balancers]to get the value of - // CanonicalHostedZoneId . - // - // Global Accelerator accelerator Specify Z2BJ6XQ5FK7U4H . - // - // An Amazon S3 bucket configured as a static website Specify the hosted zone ID - // for the region that you created the bucket in. For more information about valid - // values, see the table [Amazon S3 Website Endpoints]in the Amazon Web Services General Reference. - // - // Another Route 53 resource record set in your hosted zone Specify the hosted - // zone ID of your hosted zone. (An alias resource record set can't reference a - // resource record set in a different hosted zone.) - // - // [Amazon S3 Website Endpoints]: https://docs.aws.amazon.com/general/latest/gr/s3.html#s3_website_region_endpoints - // [describe-load-balancers]: http://docs.aws.amazon.com/cli/latest/reference/elbv2/describe-load-balancers.html - // [DescribeLoadBalancers]: https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html - // [Elastic Beanstalk endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/elasticbeanstalk.html - // [get-domain-names]: https://docs.aws.amazon.com/cli/latest/reference/apigateway/get-domain-names.html - // [describe-vpc-endpoints]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-vpc-endpoints.html - // [Elastic Load Balancing endpoints and quotas]: https://docs.aws.amazon.com/general/latest/gr/elb.html - // - // This member is required. - HostedZoneId *string - - noSmithyDocumentSerde -} - -// The information for each resource record set that you want to change. -type Change struct { - - // The action to perform: - // - // - CREATE : Creates a resource record set that has the specified values. - // - // - DELETE : Deletes a existing resource record set. - // - // To delete the resource record set that is associated with a traffic policy - // instance, use [DeleteTrafficPolicyInstance]. Amazon Route 53 will delete the resource record set - // automatically. If you delete the resource record set by using - // ChangeResourceRecordSets , Route 53 doesn't automatically delete the traffic - // policy instance, and you'll continue to be charged for it even though it's no - // longer in use. - // - // - UPSERT : If a resource record set doesn't already exist, Route 53 creates - // it. If a resource record set does exist, Route 53 updates it with the values in - // the request. - // - // [DeleteTrafficPolicyInstance]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicyInstance.html - // - // This member is required. - Action ChangeAction - - // Information about the resource record set to create, delete, or update. - // - // This member is required. - ResourceRecordSet *ResourceRecordSet - - noSmithyDocumentSerde -} - -// The information for a change request. -type ChangeBatch struct { - - // Information about the changes to make to the record sets. - // - // This member is required. - Changes []Change - - // Optional: Any comments you want to include about a change batch request. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that describes change information about changes made to your -// hosted zone. -type ChangeInfo struct { - - // This element contains an ID that you use when performing a [GetChange] action to get - // detailed information about the change. - // - // [GetChange]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_GetChange.html - // - // This member is required. - Id *string - - // The current state of the request. PENDING indicates that this request has not - // yet been applied to all Amazon Route 53 DNS servers. - // - // This member is required. - Status ChangeStatus - - // The date and time that the change request was submitted in [ISO 8601 format] and Coordinated - // Universal Time (UTC). For example, the value 2017-03-27T17:48:16.751Z - // represents March 27, 2017 at 17:48:16.751 UTC. - // - // [ISO 8601 format]: https://en.wikipedia.org/wiki/ISO_8601 - // - // This member is required. - SubmittedAt *time.Time - - // A comment you can provide. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that lists the CIDR blocks. -type CidrBlockSummary struct { - - // Value for the CIDR block. - CidrBlock *string - - // The location name of the CIDR block. - LocationName *string - - noSmithyDocumentSerde -} - -// A complex type that identifies a CIDR collection. -type CidrCollection struct { - - // The ARN of the collection. Can be used to reference the collection in IAM - // policy or in another Amazon Web Services account. - Arn *string - - // The unique ID of the CIDR collection. - Id *string - - // The name of a CIDR collection. - Name *string - - // A sequential counter that Route 53 sets to 1 when you create a CIDR collection - // and increments by 1 each time you update settings for the CIDR collection. - Version *int64 - - noSmithyDocumentSerde -} - -// A complex type that contains information about the CIDR collection change. -type CidrCollectionChange struct { - - // CIDR collection change action. - // - // This member is required. - Action CidrCollectionChangeAction - - // List of CIDR blocks. - // - // This member is required. - CidrList []string - - // Name of the location that is associated with the CIDR collection. - // - // This member is required. - LocationName *string - - noSmithyDocumentSerde -} - -// The object that is specified in resource record set object when you are linking -// a resource record set to a CIDR location. -// -// A LocationName with an asterisk “*” can be used to create a default CIDR -// record. CollectionId is still required for default record. -type CidrRoutingConfig struct { - - // The CIDR collection ID. - // - // This member is required. - CollectionId *string - - // The CIDR collection location name. - // - // This member is required. - LocationName *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about the CloudWatch alarm that Amazon -// Route 53 is monitoring for this health check. -type CloudWatchAlarmConfiguration struct { - - // For the metric that the CloudWatch alarm is associated with, the arithmetic - // operation that is used for the comparison. - // - // This member is required. - ComparisonOperator ComparisonOperator - - // For the metric that the CloudWatch alarm is associated with, the number of - // periods that the metric is compared to the threshold. - // - // This member is required. - EvaluationPeriods *int32 - - // The name of the CloudWatch metric that the alarm is associated with. - // - // This member is required. - MetricName *string - - // The namespace of the metric that the alarm is associated with. For more - // information, see [Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference]in the Amazon CloudWatch User Guide. - // - // [Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html - // - // This member is required. - Namespace *string - - // For the metric that the CloudWatch alarm is associated with, the duration of - // one evaluation period in seconds. - // - // This member is required. - Period *int32 - - // For the metric that the CloudWatch alarm is associated with, the statistic that - // is applied to the metric. - // - // This member is required. - Statistic Statistic - - // For the metric that the CloudWatch alarm is associated with, the value the - // metric is compared with. - // - // This member is required. - Threshold *float64 - - // For the metric that the CloudWatch alarm is associated with, a complex type - // that contains information about the dimensions for the metric. For information, - // see [Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference]in the Amazon CloudWatch User Guide. - // - // [Amazon CloudWatch Namespaces, Dimensions, and Metrics Reference]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html - Dimensions []Dimension - - noSmithyDocumentSerde -} - -// A complex type that is an entry in an [CidrCollection] array. -// -// [CidrCollection]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CidrCollection.html -type CollectionSummary struct { - - // The ARN of the collection summary. Can be used to reference the collection in - // IAM policy or cross-account. - Arn *string - - // Unique ID for the CIDR collection. - Id *string - - // The name of a CIDR collection. - Name *string - - // A sequential counter that Route 53 sets to 1 when you create a CIDR collection - // and increments by 1 each time you update settings for the CIDR collection. - Version *int64 - - noSmithyDocumentSerde -} - -// A complex type that lists the coordinates for a geoproximity resource record. -type Coordinates struct { - - // Specifies a coordinate of the north–south position of a geographic point on - // the surface of the Earth (-90 - 90). - // - // This member is required. - Latitude *string - - // Specifies a coordinate of the east–west position of a geographic point on the - // surface of the Earth (-180 - 180). - // - // This member is required. - Longitude *string - - noSmithyDocumentSerde -} - -// A complex type that lists the name servers in a delegation set, as well as the -// CallerReference and the ID for the delegation set. -type DelegationSet struct { - - // A complex type that contains a list of the authoritative name servers for a - // hosted zone or for a reusable delegation set. - // - // This member is required. - NameServers []string - - // The value that you specified for CallerReference when you created the reusable - // delegation set. - CallerReference *string - - // The ID that Amazon Route 53 assigns to a reusable delegation set. - Id *string - - noSmithyDocumentSerde -} - -// For the metric that the CloudWatch alarm is associated with, a complex type -// that contains information about one dimension. -type Dimension struct { - - // For the metric that the CloudWatch alarm is associated with, the name of one - // dimension. - // - // This member is required. - Name *string - - // For the metric that the CloudWatch alarm is associated with, the value of one - // dimension. - // - // This member is required. - Value *string - - noSmithyDocumentSerde -} - -// A string representing the status of DNSSEC signing. -type DNSSECStatus struct { - - // A string that represents the current hosted zone signing status. - // - // Status can have one of the following values: - // - // SIGNING DNSSEC signing is enabled for the hosted zone. - // - // NOT_SIGNING DNSSEC signing is not enabled for the hosted zone. - // - // DELETING DNSSEC signing is in the process of being removed for the hosted zone. - // - // ACTION_NEEDED There is a problem with signing in the hosted zone that requires - // you to take action to resolve. For example, the customer managed key might have - // been deleted, or the permissions for the customer managed key might have been - // changed. - // - // INTERNAL_FAILURE There was an error during a request. Before you can continue - // to work with DNSSEC signing, including with key-signing keys (KSKs), you must - // correct the problem by enabling or disabling DNSSEC signing for the hosted zone. - ServeSignature *string - - // The status message provided for the following DNSSEC signing status: - // INTERNAL_FAILURE . The status message includes information about what the - // problem might be and steps that you can take to correct the issue. - StatusMessage *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about a geographic location. -type GeoLocation struct { - - // The two-letter code for the continent. - // - // Amazon Route 53 supports the following continent codes: - // - // - AF: Africa - // - // - AN: Antarctica - // - // - AS: Asia - // - // - EU: Europe - // - // - OC: Oceania - // - // - NA: North America - // - // - SA: South America - // - // Constraint: Specifying ContinentCode with either CountryCode or SubdivisionCode - // returns an InvalidInput error. - ContinentCode *string - - // For geolocation resource record sets, the two-letter code for a country. - // - // Amazon Route 53 uses the two-letter country codes that are specified in [ISO standard 3166-1 alpha-2]. - // - // Route 53 also supports the country code UA for Ukraine. - // - // [ISO standard 3166-1 alpha-2]: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - CountryCode *string - - // For geolocation resource record sets, the two-letter code for a state of the - // United States. Route 53 doesn't support any other values for SubdivisionCode . - // For a list of state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations]on the United States Postal Service - // website. - // - // If you specify subdivisioncode , you must also specify US for CountryCode . - // - // [Appendix B: Two–Letter State and Possession Abbreviations]: https://pe.usps.com/text/pub28/28apb.htm - SubdivisionCode *string - - noSmithyDocumentSerde -} - -// A complex type that contains the codes and full continent, country, and -// subdivision names for the specified geolocation code. -type GeoLocationDetails struct { - - // The two-letter code for the continent. - ContinentCode *string - - // The full name of the continent. - ContinentName *string - - // The two-letter code for the country. - CountryCode *string - - // The name of the country. - CountryName *string - - // The code for the subdivision, such as a particular state within the United - // States. For a list of US state abbreviations, see [Appendix B: Two–Letter State and Possession Abbreviations]on the United States Postal - // Service website. For a list of all supported subdivision codes, use the [ListGeoLocations]API. - // - // [ListGeoLocations]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListGeoLocations.html - // [Appendix B: Two–Letter State and Possession Abbreviations]: https://pe.usps.com/text/pub28/28apb.htm - SubdivisionCode *string - - // The full name of the subdivision. Route 53 currently supports only states in - // the United States. - SubdivisionName *string - - noSmithyDocumentSerde -} - -// (Resource record sets only): A complex type that lets you specify where your -// -// resources are located. Only one of LocalZoneGroup , Coordinates , or Amazon Web -// ServicesRegion is allowed per request at a time. -// -// For more information about geoproximity routing, see [Geoproximity routing] in the Amazon Route 53 -// Developer Guide. -// -// [Geoproximity routing]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy-geoproximity.html -type GeoProximityLocation struct { - - // The Amazon Web Services Region the resource you are directing DNS traffic to, - // is in. - AWSRegion *string - - // The bias increases or decreases the size of the geographic region from which - // Route 53 routes traffic to a resource. - // - // To use Bias to change the size of the geographic region, specify the applicable - // value for the bias: - // - // - To expand the size of the geographic region from which Route 53 routes - // traffic to a resource, specify a positive integer from 1 to 99 for the bias. - // Route 53 shrinks the size of adjacent regions. - // - // - To shrink the size of the geographic region from which Route 53 routes - // traffic to a resource, specify a negative bias of -1 to -99. Route 53 expands - // the size of adjacent regions. - Bias *int32 - - // Contains the longitude and latitude for a geographic region. - Coordinates *Coordinates - - // Specifies an Amazon Web Services Local Zone Group. - // - // A local Zone Group is usually the Local Zone code without the ending character. - // For example, if the Local Zone is us-east-1-bue-1a the Local Zone Group is - // us-east-1-bue-1 . - // - // You can identify the Local Zones Group for a specific Local Zone by using the [describe-availability-zones] - // CLI command: - // - // This command returns: "GroupName": "us-west-2-den-1" , specifying that the Local - // Zone us-west-2-den-1a belongs to the Local Zone Group us-west-2-den-1 . - // - // [describe-availability-zones]: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-availability-zones.html - LocalZoneGroup *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about one health check that is -// associated with the current Amazon Web Services account. -type HealthCheck struct { - - // A unique string that you specified when you created the health check. - // - // This member is required. - CallerReference *string - - // A complex type that contains detailed information about one health check. - // - // This member is required. - HealthCheckConfig *HealthCheckConfig - - // The version of the health check. You can optionally pass this value in a call - // to UpdateHealthCheck to prevent overwriting another change to the health check. - // - // This member is required. - HealthCheckVersion *int64 - - // The identifier that Amazon Route 53 assigned to the health check when you - // created it. When you add or update a resource record set, you use this value to - // specify which health check to use. The value can be up to 64 characters long. - // - // This member is required. - Id *string - - // A complex type that contains information about the CloudWatch alarm that Amazon - // Route 53 is monitoring for this health check. - CloudWatchAlarmConfiguration *CloudWatchAlarmConfiguration - - // If the health check was created by another service, the service that created - // the health check. When a health check is created by another service, you can't - // edit or delete it using Amazon Route 53. - LinkedService *LinkedService - - noSmithyDocumentSerde -} - -// A complex type that contains information about the health check. -type HealthCheckConfig struct { - - // The type of health check that you want to create, which indicates how Amazon - // Route 53 determines whether an endpoint is healthy. - // - // You can't change the value of Type after you create a health check. - // - // You can create the following types of health checks: - // - // - HTTP: Route 53 tries to establish a TCP connection. If successful, Route 53 - // submits an HTTP request and waits for an HTTP status code of 200 or greater and - // less than 400. - // - // - HTTPS: Route 53 tries to establish a TCP connection. If successful, Route - // 53 submits an HTTPS request and waits for an HTTP status code of 200 or greater - // and less than 400. - // - // If you specify HTTPS for the value of Type , the endpoint must support TLS v1.0, - // v1.1, or v1.2. - // - // - HTTP_STR_MATCH: Route 53 tries to establish a TCP connection. If - // successful, Route 53 submits an HTTP request and searches the first 5,120 bytes - // of the response body for the string that you specify in SearchString . - // - // - HTTPS_STR_MATCH: Route 53 tries to establish a TCP connection. If - // successful, Route 53 submits an HTTPS request and searches the first 5,120 - // bytes of the response body for the string that you specify in SearchString . - // - // - TCP: Route 53 tries to establish a TCP connection. - // - // - CLOUDWATCH_METRIC: The health check is associated with a CloudWatch alarm. - // If the state of the alarm is OK , the health check is considered healthy. If - // the state is ALARM , the health check is considered unhealthy. If CloudWatch - // doesn't have sufficient data to determine whether the state is OK or ALARM , - // the health check status depends on the setting for - // InsufficientDataHealthStatus : Healthy , Unhealthy , or LastKnownStatus . - // - // - CALCULATED: For health checks that monitor the status of other health - // checks, Route 53 adds up the number of health checks that Route 53 health - // checkers consider to be healthy and compares that number with the value of - // HealthThreshold . - // - // - RECOVERY_CONTROL: The health check is associated with a Route53 Application - // Recovery Controller routing control. If the routing control state is ON , the - // health check is considered healthy. If the state is OFF , the health check is - // considered unhealthy. - // - // For more information, see [How Route 53 Determines Whether an Endpoint Is Healthy] in the Amazon Route 53 Developer Guide. - // - // [How Route 53 Determines Whether an Endpoint Is Healthy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html - // - // This member is required. - Type HealthCheckType - - // A complex type that identifies the CloudWatch alarm that you want Amazon Route - // 53 health checkers to use to determine whether the specified health check is - // healthy. - AlarmIdentifier *AlarmIdentifier - - // (CALCULATED Health Checks Only) A complex type that contains one - // ChildHealthCheck element for each health check that you want to associate with a - // CALCULATED health check. - ChildHealthChecks []string - - // Stops Route 53 from performing health checks. When you disable a health check, - // here's what happens: - // - // - Health checks that check the health of endpoints: Route 53 stops submitting - // requests to your application, server, or other resource. - // - // - Calculated health checks: Route 53 stops aggregating the status of the - // referenced health checks. - // - // - Health checks that monitor CloudWatch alarms: Route 53 stops monitoring the - // corresponding CloudWatch metrics. - // - // After you disable a health check, Route 53 considers the status of the health - // check to always be healthy. If you configured DNS failover, Route 53 continues - // to route traffic to the corresponding resources. If you want to stop routing - // traffic to a resource, change the value of [Inverted]. - // - // Charges for a health check still apply when the health check is disabled. For - // more information, see [Amazon Route 53 Pricing]. - // - // [Inverted]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-Inverted - // [Amazon Route 53 Pricing]: http://aws.amazon.com/route53/pricing/ - Disabled *bool - - // Specify whether you want Amazon Route 53 to send the value of - // FullyQualifiedDomainName to the endpoint in the client_hello message during TLS - // negotiation. This allows the endpoint to respond to HTTPS health check requests - // with the applicable SSL/TLS certificate. - // - // Some endpoints require that HTTPS requests include the host name in the - // client_hello message. If you don't enable SNI, the status of the health check - // will be SSL alert handshake_failure . A health check can also have that status - // for other reasons. If SNI is enabled and you're still getting the error, check - // the SSL/TLS configuration on your endpoint and confirm that your certificate is - // valid. - // - // The SSL/TLS certificate on your endpoint includes a domain name in the Common - // Name field and possibly several more in the Subject Alternative Names field. - // One of the domain names in the certificate should match the value that you - // specify for FullyQualifiedDomainName . If the endpoint responds to the - // client_hello message with a certificate that does not include the domain name - // that you specified in FullyQualifiedDomainName , a health checker will retry the - // handshake. In the second attempt, the health checker will omit - // FullyQualifiedDomainName from the client_hello message. - EnableSNI *bool - - // The number of consecutive health checks that an endpoint must pass or fail for - // Amazon Route 53 to change the current status of the endpoint from unhealthy to - // healthy or vice versa. For more information, see [How Amazon Route 53 Determines Whether an Endpoint Is Healthy]in the Amazon Route 53 - // Developer Guide. - // - // If you don't specify a value for FailureThreshold , the default value is three - // health checks. - // - // [How Amazon Route 53 Determines Whether an Endpoint Is Healthy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html - FailureThreshold *int32 - - // Amazon Route 53 behavior depends on whether you specify a value for IPAddress . - // - // If you specify a value for IPAddress : - // - // Amazon Route 53 sends health check requests to the specified IPv4 or IPv6 - // address and passes the value of FullyQualifiedDomainName in the Host header for - // all health checks except TCP health checks. This is typically the fully - // qualified DNS name of the endpoint on which you want Route 53 to perform health - // checks. - // - // When Route 53 checks the health of an endpoint, here is how it constructs the - // Host header: - // - // - If you specify a value of 80 for Port and HTTP or HTTP_STR_MATCH for Type , - // Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the - // Host header. - // - // - If you specify a value of 443 for Port and HTTPS or HTTPS_STR_MATCH for Type - // , Route 53 passes the value of FullyQualifiedDomainName to the endpoint in the - // Host header. - // - // - If you specify another value for Port and any value except TCP for Type , - // Route 53 passes FullyQualifiedDomainName:Port to the endpoint in the Host - // header. - // - // If you don't specify a value for FullyQualifiedDomainName , Route 53 substitutes - // the value of IPAddress in the Host header in each of the preceding cases. - // - // If you don't specify a value for IPAddress : - // - // Route 53 sends a DNS request to the domain that you specify for - // FullyQualifiedDomainName at the interval that you specify for RequestInterval . - // Using an IPv4 address that DNS returns, Route 53 then checks the health of the - // endpoint. - // - // If you don't specify a value for IPAddress , Route 53 uses only IPv4 to send - // health checks to the endpoint. If there's no resource record set with a type of - // A for the name that you specify for FullyQualifiedDomainName , the health check - // fails with a "DNS resolution failed" error. - // - // If you want to check the health of weighted, latency, or failover resource - // record sets and you choose to specify the endpoint only by - // FullyQualifiedDomainName , we recommend that you create a separate health check - // for each endpoint. For example, create a health check for each HTTP server that - // is serving content for www.example.com. For the value of - // FullyQualifiedDomainName , specify the domain name of the server (such as - // us-east-2-www.example.com), not the name of the resource record sets - // (www.example.com). - // - // In this configuration, if you create a health check for which the value of - // FullyQualifiedDomainName matches the name of the resource record sets and you - // then associate the health check with those resource record sets, health check - // results will be unpredictable. - // - // In addition, if the value that you specify for Type is HTTP , HTTPS , - // HTTP_STR_MATCH , or HTTPS_STR_MATCH , Route 53 passes the value of - // FullyQualifiedDomainName in the Host header, as it does when you specify a - // value for IPAddress . If the value of Type is TCP , Route 53 doesn't pass a Host - // header. - FullyQualifiedDomainName *string - - // The number of child health checks that are associated with a CALCULATED health - // check that Amazon Route 53 must consider healthy for the CALCULATED health - // check to be considered healthy. To specify the child health checks that you want - // to associate with a CALCULATED health check, use the [ChildHealthChecks] element. - // - // Note the following: - // - // - If you specify a number greater than the number of child health checks, - // Route 53 always considers this health check to be unhealthy. - // - // - If you specify 0 , Route 53 always considers this health check to be healthy. - // - // [ChildHealthChecks]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-ChildHealthChecks - HealthThreshold *int32 - - // The IPv4 or IPv6 IP address of the endpoint that you want Amazon Route 53 to - // perform health checks on. If you don't specify a value for IPAddress , Route 53 - // sends a DNS request to resolve the domain name that you specify in - // FullyQualifiedDomainName at the interval that you specify in RequestInterval . - // Using an IP address returned by DNS, Route 53 then checks the health of the - // endpoint. - // - // Use one of the following formats for the value of IPAddress : - // - // - IPv4 address: four values between 0 and 255, separated by periods (.), for - // example, 192.0.2.44 . - // - // - IPv6 address: eight groups of four hexadecimal values, separated by colons - // (:), for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345 . You can also - // shorten IPv6 addresses as described in RFC 5952, for example, - // 2001:db8:85a3::abcd:1:2345 . - // - // If the endpoint is an EC2 instance, we recommend that you create an Elastic IP - // address, associate it with your EC2 instance, and specify the Elastic IP address - // for IPAddress . This ensures that the IP address of your instance will never - // change. - // - // For more information, see [FullyQualifiedDomainName]. - // - // Constraints: Route 53 can't check the health of endpoints for which the IP - // address is in local, private, non-routable, or multicast ranges. For more - // information about IP addresses for which you can't create health checks, see the - // following documents: - // - // [RFC 5735, Special Use IPv4 Addresses] - // - // [RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space] - // - // [RFC 5156, Special-Use IPv6 Addresses] - // - // When the value of Type is CALCULATED or CLOUDWATCH_METRIC , omit IPAddress . - // - // [RFC 5735, Special Use IPv4 Addresses]: https://tools.ietf.org/html/rfc5735 - // [FullyQualifiedDomainName]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_UpdateHealthCheck.html#Route53-UpdateHealthCheck-request-FullyQualifiedDomainName - // [RFC 6598, IANA-Reserved IPv4 Prefix for Shared Address Space]: https://tools.ietf.org/html/rfc6598 - // [RFC 5156, Special-Use IPv6 Addresses]: https://tools.ietf.org/html/rfc5156 - IPAddress *string - - // When CloudWatch has insufficient data about the metric to determine the alarm - // state, the status that you want Amazon Route 53 to assign to the health check: - // - // - Healthy : Route 53 considers the health check to be healthy. - // - // - Unhealthy : Route 53 considers the health check to be unhealthy. - // - // - LastKnownStatus : Route 53 uses the status of the health check from the last - // time that CloudWatch had sufficient data to determine the alarm state. For new - // health checks that have no last known status, the default status for the health - // check is healthy. - InsufficientDataHealthStatus InsufficientDataHealthStatus - - // Specify whether you want Amazon Route 53 to invert the status of a health - // check, for example, to consider a health check unhealthy when it otherwise would - // be considered healthy. - Inverted *bool - - // Specify whether you want Amazon Route 53 to measure the latency between health - // checkers in multiple Amazon Web Services regions and your endpoint, and to - // display CloudWatch latency graphs on the Health Checks page in the Route 53 - // console. - // - // You can't change the value of MeasureLatency after you create a health check. - MeasureLatency *bool - - // The port on the endpoint that you want Amazon Route 53 to perform health checks - // on. - // - // Don't specify a value for Port when you specify a value for Type of - // CLOUDWATCH_METRIC or CALCULATED . - Port *int32 - - // A complex type that contains one Region element for each region from which you - // want Amazon Route 53 health checkers to check the specified endpoint. - // - // If you don't specify any regions, Route 53 health checkers automatically - // performs checks from all of the regions that are listed under Valid Values. - // - // If you update a health check to remove a region that has been performing health - // checks, Route 53 will briefly continue to perform checks from that region to - // ensure that some health checkers are always checking the endpoint (for example, - // if you replace three regions with four different regions). - Regions []HealthCheckRegion - - // The number of seconds between the time that Amazon Route 53 gets a response - // from your endpoint and the time that it sends the next health check request. - // Each Route 53 health checker makes requests at this interval. - // - // You can't change the value of RequestInterval after you create a health check. - // - // If you don't specify a value for RequestInterval , the default value is 30 - // seconds. - RequestInterval *int32 - - // The path, if any, that you want Amazon Route 53 to request when performing - // health checks. The path can be any value for which your endpoint will return an - // HTTP status code of 2xx or 3xx when the endpoint is healthy, for example, the - // file /docs/route53-health-check.html. You can also include query string - // parameters, for example, /welcome.html?language=jp&login=y . - ResourcePath *string - - // The Amazon Resource Name (ARN) for the Route 53 Application Recovery Controller - // routing control. - // - // For more information about Route 53 Application Recovery Controller, see [Route 53 Application Recovery Controller Developer Guide.]. - // - // [Route 53 Application Recovery Controller Developer Guide.]: https://docs.aws.amazon.com/r53recovery/latest/dg/what-is-route-53-recovery.html - RoutingControlArn *string - - // If the value of Type is HTTP_STR_MATCH or HTTPS_STR_MATCH , the string that you - // want Amazon Route 53 to search for in the response body from the specified - // resource. If the string appears in the response body, Route 53 considers the - // resource healthy. - // - // Route 53 considers case when searching for SearchString in the response body. - SearchString *string - - noSmithyDocumentSerde -} - -// A complex type that contains the last failure reason as reported by one Amazon -// Route 53 health checker. -type HealthCheckObservation struct { - - // The IP address of the Amazon Route 53 health checker that provided the failure - // reason in StatusReport . - IPAddress *string - - // The region of the Amazon Route 53 health checker that provided the status in - // StatusReport . - Region HealthCheckRegion - - // A complex type that contains the last failure reason as reported by one Amazon - // Route 53 health checker and the time of the failed health check. - StatusReport *StatusReport - - noSmithyDocumentSerde -} - -// A complex type that contains general information about the hosted zone. -type HostedZone struct { - - // The value that you specified for CallerReference when you created the hosted - // zone. - // - // This member is required. - CallerReference *string - - // The ID that Amazon Route 53 assigned to the hosted zone when you created it. - // - // This member is required. - Id *string - - // The name of the domain. For public hosted zones, this is the name that you have - // registered with your DNS registrar. - // - // For information about how to specify characters other than a-z , 0-9 , and - - // (hyphen) and how to specify internationalized domain names, see [CreateHostedZone]. - // - // [CreateHostedZone]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html - // - // This member is required. - Name *string - - // A complex type that includes the Comment and PrivateZone elements. If you - // omitted the HostedZoneConfig and Comment elements from the request, the Config - // and Comment elements don't appear in the response. - Config *HostedZoneConfig - - // If the hosted zone was created by another service, the service that created the - // hosted zone. When a hosted zone is created by another service, you can't edit or - // delete it using Route 53. - LinkedService *LinkedService - - // The number of resource record sets in the hosted zone. - ResourceRecordSetCount *int64 - - noSmithyDocumentSerde -} - -// A complex type that contains an optional comment about your hosted zone. If you -// don't want to specify a comment, omit both the HostedZoneConfig and Comment -// elements. -type HostedZoneConfig struct { - - // Any comments that you want to include about the hosted zone. - Comment *string - - // A value that indicates whether this is a private hosted zone. - PrivateZone bool - - noSmithyDocumentSerde -} - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type HostedZoneLimit struct { - - // The limit that you requested. Valid values include the following: - // - // - MAX_RRSETS_BY_ZONE: The maximum number of records that you can create in - // the specified hosted zone. - // - // - MAX_VPCS_ASSOCIATED_BY_ZONE: The maximum number of Amazon VPCs that you can - // associate with the specified private hosted zone. - // - // This member is required. - Type HostedZoneLimitType - - // The current value for the limit that is specified by Type . - // - // This member is required. - Value *int64 - - noSmithyDocumentSerde -} - -// A complex type that identifies a hosted zone that a specified Amazon VPC is -// associated with and the owner of the hosted zone. If there is a value for -// OwningAccount , there is no value for OwningService , and vice versa. -type HostedZoneOwner struct { - - // If the hosted zone was created by an Amazon Web Services account, or was - // created by an Amazon Web Services service that creates hosted zones using the - // current account, OwningAccount contains the account ID of that account. For - // example, when you use Cloud Map to create a hosted zone, Cloud Map creates the - // hosted zone using the current Amazon Web Services account. - OwningAccount *string - - // If an Amazon Web Services service uses its own account to create a hosted zone - // and associate the specified VPC with that hosted zone, OwningService contains - // an abbreviation that identifies the service. For example, if Amazon Elastic File - // System (Amazon EFS) created a hosted zone and associated a VPC with the hosted - // zone, the value of OwningService is efs.amazonaws.com . - OwningService *string - - noSmithyDocumentSerde -} - -// In the response to a ListHostedZonesByVPC request, the HostedZoneSummaries -// element contains one HostedZoneSummary element for each hosted zone that the -// specified Amazon VPC is associated with. Each HostedZoneSummary element -// contains the hosted zone name and ID, and information about who owns the hosted -// zone. -type HostedZoneSummary struct { - - // The Route 53 hosted zone ID of a private hosted zone that the specified VPC is - // associated with. - // - // This member is required. - HostedZoneId *string - - // The name of the private hosted zone, such as example.com . - // - // This member is required. - Name *string - - // The owner of a private hosted zone that the specified VPC is associated with. - // The owner can be either an Amazon Web Services account or an Amazon Web Services - // service. - // - // This member is required. - Owner *HostedZoneOwner - - noSmithyDocumentSerde -} - -// A key-signing key (KSK) is a complex type that represents a public/private key -// pair. The private key is used to generate a digital signature for the zone -// signing key (ZSK). The public key is stored in the DNS and is used to -// authenticate the ZSK. A KSK is always associated with a hosted zone; it cannot -// exist by itself. -type KeySigningKey struct { - - // The date when the key-signing key (KSK) was created. - CreatedDate *time.Time - - // A string that represents a DNSKEY record. - DNSKEYRecord *string - - // A string that represents a delegation signer (DS) record. - DSRecord *string - - // A string used to represent the delegation signer digest algorithm. This value - // must follow the guidelines provided by [RFC-8624 Section 3.3]. - // - // [RFC-8624 Section 3.3]: https://tools.ietf.org/html/rfc8624#section-3.3 - DigestAlgorithmMnemonic *string - - // An integer used to represent the delegation signer digest algorithm. This value - // must follow the guidelines provided by [RFC-8624 Section 3.3]. - // - // [RFC-8624 Section 3.3]: https://tools.ietf.org/html/rfc8624#section-3.3 - DigestAlgorithmType int32 - - // A cryptographic digest of a DNSKEY resource record (RR). DNSKEY records are - // used to publish the public key that resolvers can use to verify DNSSEC - // signatures that are used to secure certain kinds of information provided by the - // DNS system. - DigestValue *string - - // An integer that specifies how the key is used. For key-signing key (KSK), this - // value is always 257. - Flag int32 - - // An integer used to identify the DNSSEC record for the domain name. The process - // used to calculate the value is described in [RFC-4034 Appendix B]. - // - // [RFC-4034 Appendix B]: https://tools.ietf.org/rfc/rfc4034.txt - KeyTag int32 - - // The Amazon resource name (ARN) used to identify the customer managed key in Key - // Management Service (KMS). The KmsArn must be unique for each key-signing key - // (KSK) in a single hosted zone. - // - // You must configure the customer managed key as follows: - // - // Status Enabled - // - // Key spec ECC_NIST_P256 - // - // Key usage Sign and verify - // - // Key policy The key policy must give permission for the following actions: - // - // - DescribeKey - // - // - GetPublicKey - // - // - Sign - // - // The key policy must also include the Amazon Route 53 service in the principal - // for your account. Specify the following: - // - // - "Service": "dnssec-route53.amazonaws.com" - // - // For more information about working with the customer managed key in KMS, see [Key Management Service concepts]. - // - // [Key Management Service concepts]: https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html - KmsArn *string - - // The last time that the key-signing key (KSK) was changed. - LastModifiedDate *time.Time - - // A string used to identify a key-signing key (KSK). Name can include numbers, - // letters, and underscores (_). Name must be unique for each key-signing key in - // the same hosted zone. - Name *string - - // The public key, represented as a Base64 encoding, as required by [RFC-4034 Page 5]. - // - // [RFC-4034 Page 5]: https://tools.ietf.org/rfc/rfc4034.txt - PublicKey *string - - // A string used to represent the signing algorithm. This value must follow the - // guidelines provided by [RFC-8624 Section 3.1]. - // - // [RFC-8624 Section 3.1]: https://tools.ietf.org/html/rfc8624#section-3.1 - SigningAlgorithmMnemonic *string - - // An integer used to represent the signing algorithm. This value must follow the - // guidelines provided by [RFC-8624 Section 3.1]. - // - // [RFC-8624 Section 3.1]: https://tools.ietf.org/html/rfc8624#section-3.1 - SigningAlgorithmType int32 - - // A string that represents the current key-signing key (KSK) status. - // - // Status can have one of the following values: - // - // ACTIVE The KSK is being used for signing. - // - // INACTIVE The KSK is not being used for signing. - // - // DELETING The KSK is in the process of being deleted. - // - // ACTION_NEEDED There is a problem with the KSK that requires you to take action - // to resolve. For example, the customer managed key might have been deleted, or - // the permissions for the customer managed key might have been changed. - // - // INTERNAL_FAILURE There was an error during a request. Before you can continue - // to work with DNSSEC signing, including actions that involve this KSK, you must - // correct the problem. For example, you may need to activate or deactivate the - // KSK. - Status *string - - // The status message provided for the following key-signing key (KSK) statuses: - // ACTION_NEEDED or INTERNAL_FAILURE . The status message includes information - // about what the problem might be and steps that you can take to correct the - // issue. - StatusMessage *string - - noSmithyDocumentSerde -} - -// If a health check or hosted zone was created by another service, LinkedService -// is a complex type that describes the service that created the resource. When a -// resource is created by another service, you can't edit or delete it using Amazon -// Route 53. -type LinkedService struct { - - // If the health check or hosted zone was created by another service, an optional - // description that can be provided by the other service. When a resource is - // created by another service, you can't edit or delete it using Amazon Route 53. - Description *string - - // If the health check or hosted zone was created by another service, the service - // that created the resource. When a resource is created by another service, you - // can't edit or delete it using Amazon Route 53. - ServicePrincipal *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about the CIDR location. -type LocationSummary struct { - - // A string that specifies a location name. - LocationName *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about a configuration for DNS query -// logging. -type QueryLoggingConfig struct { - - // The Amazon Resource Name (ARN) of the CloudWatch Logs log group that Amazon - // Route 53 is publishing logs to. - // - // This member is required. - CloudWatchLogsLogGroupArn *string - - // The ID of the hosted zone that CloudWatch Logs is logging queries for. - // - // This member is required. - HostedZoneId *string - - // The ID for a configuration for DNS query logging. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// Information specific to the resource record. -// -// If you're creating an alias resource record set, omit ResourceRecord . -type ResourceRecord struct { - - // The current or new DNS record value, not to exceed 4,000 characters. In the - // case of a DELETE action, if the current value does not match the actual value, - // an error is returned. For descriptions about how to format Value for different - // record types, see [Supported DNS Resource Record Types]in the Amazon Route 53 Developer Guide. - // - // You can specify more than one value for all record types except CNAME and SOA . - // - // If you're creating an alias resource record set, omit Value . - // - // [Supported DNS Resource Record Types]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html - // - // This member is required. - Value *string - - noSmithyDocumentSerde -} - -// Information about the resource record set to create or delete. -type ResourceRecordSet struct { - - // For ChangeResourceRecordSets requests, the name of the record that you want to - // create, update, or delete. For ListResourceRecordSets responses, the name of a - // record in the specified hosted zone. - // - // ChangeResourceRecordSets Only - // - // Enter a fully qualified domain name, for example, www.example.com . You can - // optionally include a trailing dot. If you omit the trailing dot, Amazon Route 53 - // assumes that the domain name that you specify is fully qualified. This means - // that Route 53 treats www.example.com (without a trailing dot) and - // www.example.com. (with a trailing dot) as identical. - // - // For information about how to specify characters other than a-z , 0-9 , and - - // (hyphen) and how to specify internationalized domain names, see [DNS Domain Name Format]in the Amazon - // Route 53 Developer Guide. - // - // You can use the asterisk (*) wildcard to replace the leftmost label in a domain - // name, for example, *.example.com . Note the following: - // - // - The * must replace the entire label. For example, you can't specify - // *prod.example.com or prod*.example.com . - // - // - The * can't replace any of the middle labels, for example, - // marketing.*.example.com. - // - // - If you include * in any position other than the leftmost label in a domain - // name, DNS treats it as an * character (ASCII 42), not as a wildcard. - // - // You can't use the * wildcard for resource records sets that have a type of NS. - // - // [DNS Domain Name Format]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DomainNameFormat.html - // - // This member is required. - Name *string - - // The DNS record type. For information about different record types and how data - // is encoded for them, see [Supported DNS Resource Record Types]in the Amazon Route 53 Developer Guide. - // - // Valid values for basic resource record sets: A | AAAA | CAA | CNAME | DS | MX | - // NAPTR | NS | PTR | SOA | SPF | SRV | TXT | TLSA | SSHFP | SVCB | HTTPS - // - // Values for weighted, latency, geolocation, and failover resource record sets: A - // | AAAA | CAA | CNAME | MX | NAPTR | PTR | SPF | SRV | TXT | TLSA | SSHFP | SVCB - // | HTTPS . When creating a group of weighted, latency, geolocation, or failover - // resource record sets, specify the same value for all of the resource record sets - // in the group. - // - // Valid values for multivalue answer resource record sets: A | AAAA | MX | NAPTR - // | PTR | SPF | SRV | TXT | CAA | TLSA | SSHFP | SVCB | HTTPS - // - // SPF records were formerly used to verify the identity of the sender of email - // messages. However, we no longer recommend that you create resource record sets - // for which the value of Type is SPF . RFC 7208, Sender Policy Framework (SPF) for - // Authorizing Use of Domains in Email, Version 1, has been updated to say, - // "...[I]ts existence and mechanism defined in [RFC4408] have led to some - // interoperability issues. Accordingly, its use is no longer appropriate for SPF - // version 1; implementations are not to use it." In RFC 7208, see section 14.1, [The SPF DNS Record Type]. - // - // Values for alias resource record sets: - // - // - Amazon API Gateway custom regional APIs and edge-optimized APIs: A - // - // - CloudFront distributions: A - // - // If IPv6 is enabled for the distribution, create two resource record sets to - // route traffic to your distribution, one with a value of A and one with a value - // of AAAA . - // - // - Amazon API Gateway environment that has a regionalized subdomain: A - // - // - ELB load balancers: A | AAAA - // - // - Amazon S3 buckets: A - // - // - Amazon Virtual Private Cloud interface VPC endpoints A - // - // - Another resource record set in this hosted zone: Specify the type of the - // resource record set that you're creating the alias for. All values are supported - // except NS and SOA . - // - // If you're creating an alias record that has the same name as the hosted zone - // (known as the zone apex), you can't route traffic to a record for which the - // value of Type is CNAME . This is because the alias record must have the same - // type as the record you're routing traffic to, and creating a CNAME record for - // the zone apex isn't supported even for an alias record. - // - // [Supported DNS Resource Record Types]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/ResourceRecordTypes.html - // [The SPF DNS Record Type]: http://tools.ietf.org/html/rfc7208#section-14.1 - // - // This member is required. - Type RRType - - // Alias resource record sets only: Information about the Amazon Web Services - // resource, such as a CloudFront distribution or an Amazon S3 bucket, that you - // want to route traffic to. - // - // If you're creating resource records sets for a private hosted zone, note the - // following: - // - // - You can't create an alias resource record set in a private hosted zone to - // route traffic to a CloudFront distribution. - // - // - For information about creating failover resource record sets in a private - // hosted zone, see [Configuring Failover in a Private Hosted Zone]in the Amazon Route 53 Developer Guide. - // - // [Configuring Failover in a Private Hosted Zone]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html - AliasTarget *AliasTarget - - // The object that is specified in resource record set object when you are linking - // a resource record set to a CIDR location. - // - // A LocationName with an asterisk “*” can be used to create a default CIDR - // record. CollectionId is still required for default record. - CidrRoutingConfig *CidrRoutingConfig - - // Failover resource record sets only: To configure failover, you add the Failover - // element to two resource record sets. For one resource record set, you specify - // PRIMARY as the value for Failover ; for the other resource record set, you - // specify SECONDARY . In addition, you include the HealthCheckId element and - // specify the health check that you want Amazon Route 53 to perform for each - // resource record set. - // - // Except where noted, the following failover behaviors assume that you have - // included the HealthCheckId element in both resource record sets: - // - // - When the primary resource record set is healthy, Route 53 responds to DNS - // queries with the applicable value from the primary resource record set - // regardless of the health of the secondary resource record set. - // - // - When the primary resource record set is unhealthy and the secondary - // resource record set is healthy, Route 53 responds to DNS queries with the - // applicable value from the secondary resource record set. - // - // - When the secondary resource record set is unhealthy, Route 53 responds to - // DNS queries with the applicable value from the primary resource record set - // regardless of the health of the primary resource record set. - // - // - If you omit the HealthCheckId element for the secondary resource record set, - // and if the primary resource record set is unhealthy, Route 53 always responds to - // DNS queries with the applicable value from the secondary resource record set. - // This is true regardless of the health of the associated endpoint. - // - // You can't create non-failover resource record sets that have the same values - // for the Name and Type elements as failover resource record sets. - // - // For failover alias resource record sets, you must also include the - // EvaluateTargetHealth element and set the value to true. - // - // For more information about configuring failover for Route 53, see the following - // topics in the Amazon Route 53 Developer Guide: - // - // [Route 53 Health Checks and DNS Failover] - // - // [Configuring Failover in a Private Hosted Zone] - // - // [Configuring Failover in a Private Hosted Zone]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html - // [Route 53 Health Checks and DNS Failover]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html - Failover ResourceRecordSetFailover - - // Geolocation resource record sets only: A complex type that lets you control - // how Amazon Route 53 responds to DNS queries based on the geographic origin of - // the query. For example, if you want all queries from Africa to be routed to a - // web server with an IP address of 192.0.2.111 , create a resource record set with - // a Type of A and a ContinentCode of AF . - // - // If you create separate resource record sets for overlapping geographic regions - // (for example, one resource record set for a continent and one for a country on - // the same continent), priority goes to the smallest geographic region. This - // allows you to route most queries for a continent to one resource and to route - // queries for a country on that continent to a different resource. - // - // You can't create two geolocation resource record sets that specify the same - // geographic location. - // - // The value * in the CountryCode element matches all geographic locations that - // aren't specified in other geolocation resource record sets that have the same - // values for the Name and Type elements. - // - // Geolocation works by mapping IP addresses to locations. However, some IP - // addresses aren't mapped to geographic locations, so even if you create - // geolocation resource record sets that cover all seven continents, Route 53 will - // receive some DNS queries from locations that it can't identify. We recommend - // that you create a resource record set for which the value of CountryCode is * . - // Two groups of queries are routed to the resource that you specify in this - // record: queries that come from locations for which you haven't created - // geolocation resource record sets and queries from IP addresses that aren't - // mapped to a location. If you don't create a * resource record set, Route 53 - // returns a "no answer" response for queries from those locations. - // - // You can't create non-geolocation resource record sets that have the same values - // for the Name and Type elements as geolocation resource record sets. - GeoLocation *GeoLocation - - // GeoproximityLocation resource record sets only: A complex type that lets you - // control how Route 53 responds to DNS queries based on the geographic origin of - // the query and your resources. - GeoProximityLocation *GeoProximityLocation - - // If you want Amazon Route 53 to return this resource record set in response to a - // DNS query only when the status of a health check is healthy, include the - // HealthCheckId element and specify the ID of the applicable health check. - // - // Route 53 determines whether a resource record set is healthy based on one of - // the following: - // - // - By periodically sending a request to the endpoint that is specified in the - // health check - // - // - By aggregating the status of a specified group of health checks (calculated - // health checks) - // - // - By determining the current state of a CloudWatch alarm (CloudWatch metric - // health checks) - // - // Route 53 doesn't check the health of the endpoint that is specified in the - // resource record set, for example, the endpoint specified by the IP address in - // the Value element. When you add a HealthCheckId element to a resource record - // set, Route 53 checks the health of the endpoint that you specified in the health - // check. - // - // For more information, see the following topics in the Amazon Route 53 Developer - // Guide: - // - // [How Amazon Route 53 Determines Whether an Endpoint Is Healthy] - // - // [Route 53 Health Checks and DNS Failover] - // - // [Configuring Failover in a Private Hosted Zone] - // - // When to Specify HealthCheckId - // - // Specifying a value for HealthCheckId is useful only when Route 53 is choosing - // between two or more resource record sets to respond to a DNS query, and you want - // Route 53 to base the choice in part on the status of a health check. Configuring - // health checks makes sense only in the following configurations: - // - // - Non-alias resource record sets: You're checking the health of a group of - // non-alias resource record sets that have the same routing policy, name, and type - // (such as multiple weighted records named www.example.com with a type of A) and - // you specify health check IDs for all the resource record sets. - // - // If the health check status for a resource record set is healthy, Route 53 - // includes the record among the records that it responds to DNS queries with. - // - // If the health check status for a resource record set is unhealthy, Route 53 - // stops responding to DNS queries using the value for that resource record set. - // - // If the health check status for all resource record sets in the group is - // unhealthy, Route 53 considers all resource record sets in the group healthy and - // responds to DNS queries accordingly. - // - // - Alias resource record sets: You specify the following settings: - // - // - You set EvaluateTargetHealth to true for an alias resource record set in a - // group of resource record sets that have the same routing policy, name, and type - // (such as multiple weighted records named www.example.com with a type of A). - // - // - You configure the alias resource record set to route traffic to a non-alias - // resource record set in the same hosted zone. - // - // - You specify a health check ID for the non-alias resource record set. - // - // If the health check status is healthy, Route 53 considers the alias resource - // record set to be healthy and includes the alias record among the records that it - // responds to DNS queries with. - // - // If the health check status is unhealthy, Route 53 stops responding to DNS - // queries using the alias resource record set. - // - // The alias resource record set can also route traffic to a group of non-alias - // resource record sets that have the same routing policy, name, and type. In that - // configuration, associate health checks with all of the resource record sets in - // the group of non-alias resource record sets. - // - // Geolocation Routing - // - // For geolocation resource record sets, if an endpoint is unhealthy, Route 53 - // looks for a resource record set for the larger, associated geographic region. - // For example, suppose you have resource record sets for a state in the United - // States, for the entire United States, for North America, and a resource record - // set that has * for CountryCode is * , which applies to all locations. If the - // endpoint for the state resource record set is unhealthy, Route 53 checks for - // healthy resource record sets in the following order until it finds a resource - // record set for which the endpoint is healthy: - // - // - The United States - // - // - North America - // - // - The default resource record set - // - // Specifying the Health Check Endpoint by Domain Name - // - // If your health checks specify the endpoint only by domain name, we recommend - // that you create a separate health check for each endpoint. For example, create a - // health check for each HTTP server that is serving content for www.example.com . - // For the value of FullyQualifiedDomainName , specify the domain name of the - // server (such as us-east-2-www.example.com ), not the name of the resource record - // sets ( www.example.com ). - // - // Health check results will be unpredictable if you do the following: - // - // - Create a health check that has the same value for FullyQualifiedDomainName - // as the name of a resource record set. - // - // - Associate that health check with the resource record set. - // - // [Configuring Failover in a Private Hosted Zone]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-private-hosted-zones.html - // [Route 53 Health Checks and DNS Failover]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover.html - // [How Amazon Route 53 Determines Whether an Endpoint Is Healthy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html - HealthCheckId *string - - // Multivalue answer resource record sets only: To route traffic approximately - // randomly to multiple resources, such as web servers, create one multivalue - // answer record for each resource and specify true for MultiValueAnswer . Note the - // following: - // - // - If you associate a health check with a multivalue answer resource record - // set, Amazon Route 53 responds to DNS queries with the corresponding IP address - // only when the health check is healthy. - // - // - If you don't associate a health check with a multivalue answer record, - // Route 53 always considers the record to be healthy. - // - // - Route 53 responds to DNS queries with up to eight healthy records; if you - // have eight or fewer healthy records, Route 53 responds to all DNS queries with - // all the healthy records. - // - // - If you have more than eight healthy records, Route 53 responds to different - // DNS resolvers with different combinations of healthy records. - // - // - When all records are unhealthy, Route 53 responds to DNS queries with up to - // eight unhealthy records. - // - // - If a resource becomes unavailable after a resolver caches a response, - // client software typically tries another of the IP addresses in the response. - // - // You can't create multivalue answer alias records. - MultiValueAnswer *bool - - // Latency-based resource record sets only: The Amazon EC2 Region where you - // created the resource that this resource record set refers to. The resource - // typically is an Amazon Web Services resource, such as an EC2 instance or an ELB - // load balancer, and is referred to by an IP address or a DNS domain name, - // depending on the record type. - // - // When Amazon Route 53 receives a DNS query for a domain name and type for which - // you have created latency resource record sets, Route 53 selects the latency - // resource record set that has the lowest latency between the end user and the - // associated Amazon EC2 Region. Route 53 then returns the value that is associated - // with the selected resource record set. - // - // Note the following: - // - // - You can only specify one ResourceRecord per latency resource record set. - // - // - You can only create one latency resource record set for each Amazon EC2 - // Region. - // - // - You aren't required to create latency resource record sets for all Amazon - // EC2 Regions. Route 53 will choose the region with the best latency from among - // the regions that you create latency resource record sets for. - // - // - You can't create non-latency resource record sets that have the same values - // for the Name and Type elements as latency resource record sets. - Region ResourceRecordSetRegion - - // Information about the resource records to act upon. - // - // If you're creating an alias resource record set, omit ResourceRecords . - ResourceRecords []ResourceRecord - - // Resource record sets that have a routing policy other than simple: An - // identifier that differentiates among multiple resource record sets that have the - // same combination of name and type, such as multiple weighted resource record - // sets named acme.example.com that have a type of A. In a group of resource record - // sets that have the same name and type, the value of SetIdentifier must be - // unique for each resource record set. - // - // For information about routing policies, see [Choosing a Routing Policy] in the Amazon Route 53 Developer - // Guide. - // - // [Choosing a Routing Policy]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html - SetIdentifier *string - - // The resource record cache time to live (TTL), in seconds. Note the following: - // - // - If you're creating or updating an alias resource record set, omit TTL . - // Amazon Route 53 uses the value of TTL for the alias target. - // - // - If you're associating this resource record set with a health check (if - // you're adding a HealthCheckId element), we recommend that you specify a TTL of - // 60 seconds or less so clients respond quickly to changes in health status. - // - // - All of the resource record sets in a group of weighted resource record sets - // must have the same value for TTL . - // - // - If a group of weighted resource record sets includes one or more weighted - // alias resource record sets for which the alias target is an ELB load balancer, - // we recommend that you specify a TTL of 60 seconds for all of the non-alias - // weighted resource record sets that have the same name and type. Values other - // than 60 seconds (the TTL for load balancers) will change the effect of the - // values that you specify for Weight . - TTL *int64 - - // When you create a traffic policy instance, Amazon Route 53 automatically - // creates a resource record set. TrafficPolicyInstanceId is the ID of the traffic - // policy instance that Route 53 created this resource record set for. - // - // To delete the resource record set that is associated with a traffic policy - // instance, use DeleteTrafficPolicyInstance . Route 53 will delete the resource - // record set automatically. If you delete the resource record set by using - // ChangeResourceRecordSets , Route 53 doesn't automatically delete the traffic - // policy instance, and you'll continue to be charged for it even though it's no - // longer in use. - TrafficPolicyInstanceId *string - - // Weighted resource record sets only: Among resource record sets that have the - // same combination of DNS name and type, a value that determines the proportion of - // DNS queries that Amazon Route 53 responds to using the current resource record - // set. Route 53 calculates the sum of the weights for the resource record sets - // that have the same combination of DNS name and type. Route 53 then responds to - // queries based on the ratio of a resource's weight to the total. Note the - // following: - // - // - You must specify a value for the Weight element for every weighted resource - // record set. - // - // - You can only specify one ResourceRecord per weighted resource record set. - // - // - You can't create latency, failover, or geolocation resource record sets - // that have the same values for the Name and Type elements as weighted resource - // record sets. - // - // - You can create a maximum of 100 weighted resource record sets that have the - // same values for the Name and Type elements. - // - // - For weighted (but not weighted alias) resource record sets, if you set - // Weight to 0 for a resource record set, Route 53 never responds to queries with - // the applicable value for that resource record set. However, if you set Weight - // to 0 for all resource record sets that have the same combination of DNS name - // and type, traffic is routed to all resources with equal probability. - // - // The effect of setting Weight to 0 is different when you associate health checks - // with weighted resource record sets. For more information, see [Options for Configuring Route 53 Active-Active and Active-Passive Failover]in the Amazon - // Route 53 Developer Guide. - // - // [Options for Configuring Route 53 Active-Active and Active-Passive Failover]: https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-configuring-options.html - Weight *int64 - - noSmithyDocumentSerde -} - -// A complex type containing a resource and its associated tags. -type ResourceTagSet struct { - - // The ID for the specified resource. - ResourceId *string - - // The type of the resource. - // - // - The resource type for health checks is healthcheck . - // - // - The resource type for hosted zones is hostedzone . - ResourceType TagResourceType - - // The tags associated with the specified resource. - Tags []Tag - - noSmithyDocumentSerde -} - -// A complex type that contains the type of limit that you specified in the -// request and the current value for that limit. -type ReusableDelegationSetLimit struct { - - // The limit that you requested: MAX_ZONES_BY_REUSABLE_DELEGATION_SET , the maximum - // number of hosted zones that you can associate with the specified reusable - // delegation set. - // - // This member is required. - Type ReusableDelegationSetLimitType - - // The current value for the MAX_ZONES_BY_REUSABLE_DELEGATION_SET limit. - // - // This member is required. - Value *int64 - - noSmithyDocumentSerde -} - -// A complex type that contains the status that one Amazon Route 53 health checker -// reports and the time of the health check. -type StatusReport struct { - - // The date and time that the health checker performed the health check in [ISO 8601 format] and - // Coordinated Universal Time (UTC). For example, the value - // 2017-03-27T17:48:16.751Z represents March 27, 2017 at 17:48:16.751 UTC. - // - // [ISO 8601 format]: https://en.wikipedia.org/wiki/ISO_8601 - CheckedTime *time.Time - - // A description of the status of the health check endpoint as reported by one of - // the Amazon Route 53 health checkers. - Status *string - - noSmithyDocumentSerde -} - -// A complex type that contains information about a tag that you want to add or -// edit for the specified health check or hosted zone. -type Tag struct { - - // The value of Key depends on the operation that you want to perform: - // - // - Add a tag to a health check or hosted zone: Key is the name that you want to - // give the new tag. - // - // - Edit a tag: Key is the name of the tag that you want to change the Value for. - // - // - Delete a key: Key is the name of the tag you want to remove. - // - // - Give a name to a health check: Edit the default Name tag. In the Amazon - // Route 53 console, the list of your health checks includes a Name column that - // lets you see the name that you've given to each health check. - Key *string - - // The value of Value depends on the operation that you want to perform: - // - // - Add a tag to a health check or hosted zone: Value is the value that you want - // to give the new tag. - // - // - Edit a tag: Value is the new value that you want to assign the tag. - Value *string - - noSmithyDocumentSerde -} - -// A complex type that contains settings for a traffic policy. -type TrafficPolicy struct { - - // The definition of a traffic policy in JSON format. You specify the JSON - // document to use for a new traffic policy in the CreateTrafficPolicy request. - // For more information about the JSON format, see [Traffic Policy Document Format]. - // - // [Traffic Policy Document Format]: https://docs.aws.amazon.com/Route53/latest/APIReference/api-policies-traffic-policy-document-format.html - // - // This member is required. - Document *string - - // The ID that Amazon Route 53 assigned to a traffic policy when you created it. - // - // This member is required. - Id *string - - // The name that you specified when you created the traffic policy. - // - // This member is required. - Name *string - - // The DNS type of the resource record sets that Amazon Route 53 creates when you - // use a traffic policy to create a traffic policy instance. - // - // This member is required. - Type RRType - - // The version number that Amazon Route 53 assigns to a traffic policy. For a new - // traffic policy, the value of Version is always 1. - // - // This member is required. - Version *int32 - - // The comment that you specify in the CreateTrafficPolicy request, if any. - Comment *string - - noSmithyDocumentSerde -} - -// A complex type that contains settings for the new traffic policy instance. -type TrafficPolicyInstance struct { - - // The ID of the hosted zone that Amazon Route 53 created resource record sets in. - // - // This member is required. - HostedZoneId *string - - // The ID that Amazon Route 53 assigned to the new traffic policy instance. - // - // This member is required. - Id *string - - // If State is Failed , an explanation of the reason for the failure. If State is - // another value, Message is empty. - // - // This member is required. - Message *string - - // The DNS name, such as www.example.com, for which Amazon Route 53 responds to - // queries by using the resource record sets that are associated with this traffic - // policy instance. - // - // This member is required. - Name *string - - // The value of State is one of the following values: - // - // Applied Amazon Route 53 has finished creating resource record sets, and changes - // have propagated to all Route 53 edge locations. - // - // Creating Route 53 is creating the resource record sets. Use - // GetTrafficPolicyInstance to confirm that the CreateTrafficPolicyInstance - // request completed successfully. - // - // Failed Route 53 wasn't able to create or update the resource record sets. When - // the value of State is Failed , see Message for an explanation of what caused - // the request to fail. - // - // This member is required. - State *string - - // The TTL that Amazon Route 53 assigned to all of the resource record sets that - // it created in the specified hosted zone. - // - // This member is required. - TTL *int64 - - // The ID of the traffic policy that Amazon Route 53 used to create resource - // record sets in the specified hosted zone. - // - // This member is required. - TrafficPolicyId *string - - // The DNS type that Amazon Route 53 assigned to all of the resource record sets - // that it created for this traffic policy instance. - // - // This member is required. - TrafficPolicyType RRType - - // The version of the traffic policy that Amazon Route 53 used to create resource - // record sets in the specified hosted zone. - // - // This member is required. - TrafficPolicyVersion *int32 - - noSmithyDocumentSerde -} - -// A complex type that contains information about the latest version of one -// traffic policy that is associated with the current Amazon Web Services account. -type TrafficPolicySummary struct { - - // The ID that Amazon Route 53 assigned to the traffic policy when you created it. - // - // This member is required. - Id *string - - // The version number of the latest version of the traffic policy. - // - // This member is required. - LatestVersion *int32 - - // The name that you specified for the traffic policy when you created it. - // - // This member is required. - Name *string - - // The number of traffic policies that are associated with the current Amazon Web - // Services account. - // - // This member is required. - TrafficPolicyCount *int32 - - // The DNS type of the resource record sets that Amazon Route 53 creates when you - // use a traffic policy to create a traffic policy instance. - // - // This member is required. - Type RRType - - noSmithyDocumentSerde -} - -// (Private hosted zones only) A complex type that contains information about an -// Amazon VPC. -// -// If you associate a private hosted zone with an Amazon VPC when you make a [CreateHostedZone] -// request, the following parameters are also required. -// -// [CreateHostedZone]: https://docs.aws.amazon.com/Route53/latest/APIReference/API_CreateHostedZone.html -type VPC struct { - - // (Private hosted zones only) The ID of an Amazon VPC. - VPCId *string - - // (Private hosted zones only) The region that an Amazon VPC was created in. - VPCRegion VPCRegion - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go deleted file mode 100644 index d34881a781..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/route53/validators.go +++ /dev/null @@ -1,2604 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package route53 - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/route53/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpActivateKeySigningKey struct { -} - -func (*validateOpActivateKeySigningKey) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpActivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ActivateKeySigningKeyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpActivateKeySigningKeyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociateVPCWithHostedZone struct { -} - -func (*validateOpAssociateVPCWithHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateVPCWithHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateVPCWithHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateVPCWithHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpChangeCidrCollection struct { -} - -func (*validateOpChangeCidrCollection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpChangeCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ChangeCidrCollectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpChangeCidrCollectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpChangeResourceRecordSets struct { -} - -func (*validateOpChangeResourceRecordSets) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpChangeResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ChangeResourceRecordSetsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpChangeResourceRecordSetsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpChangeTagsForResource struct { -} - -func (*validateOpChangeTagsForResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpChangeTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ChangeTagsForResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpChangeTagsForResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateCidrCollection struct { -} - -func (*validateOpCreateCidrCollection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateCidrCollectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateCidrCollectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateHealthCheck struct { -} - -func (*validateOpCreateHealthCheck) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateHealthCheckInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateHealthCheckInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateHostedZone struct { -} - -func (*validateOpCreateHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateKeySigningKey struct { -} - -func (*validateOpCreateKeySigningKey) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateKeySigningKeyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateKeySigningKeyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateQueryLoggingConfig struct { -} - -func (*validateOpCreateQueryLoggingConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateQueryLoggingConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateQueryLoggingConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateReusableDelegationSet struct { -} - -func (*validateOpCreateReusableDelegationSet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateReusableDelegationSetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateReusableDelegationSetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTrafficPolicy struct { -} - -func (*validateOpCreateTrafficPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTrafficPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTrafficPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTrafficPolicyInstance struct { -} - -func (*validateOpCreateTrafficPolicyInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTrafficPolicyInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTrafficPolicyInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTrafficPolicyVersion struct { -} - -func (*validateOpCreateTrafficPolicyVersion) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTrafficPolicyVersion) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTrafficPolicyVersionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTrafficPolicyVersionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateVPCAssociationAuthorization struct { -} - -func (*validateOpCreateVPCAssociationAuthorization) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateVPCAssociationAuthorizationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateVPCAssociationAuthorizationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeactivateKeySigningKey struct { -} - -func (*validateOpDeactivateKeySigningKey) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeactivateKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeactivateKeySigningKeyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeactivateKeySigningKeyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteCidrCollection struct { -} - -func (*validateOpDeleteCidrCollection) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteCidrCollection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteCidrCollectionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteCidrCollectionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteHealthCheck struct { -} - -func (*validateOpDeleteHealthCheck) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteHealthCheckInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteHealthCheckInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteHostedZone struct { -} - -func (*validateOpDeleteHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteKeySigningKey struct { -} - -func (*validateOpDeleteKeySigningKey) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteKeySigningKey) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteKeySigningKeyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteKeySigningKeyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteQueryLoggingConfig struct { -} - -func (*validateOpDeleteQueryLoggingConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteQueryLoggingConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteQueryLoggingConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteReusableDelegationSet struct { -} - -func (*validateOpDeleteReusableDelegationSet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteReusableDelegationSetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteReusableDelegationSetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficPolicy struct { -} - -func (*validateOpDeleteTrafficPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteTrafficPolicyInstance struct { -} - -func (*validateOpDeleteTrafficPolicyInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteTrafficPolicyInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteTrafficPolicyInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteVPCAssociationAuthorization struct { -} - -func (*validateOpDeleteVPCAssociationAuthorization) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteVPCAssociationAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVPCAssociationAuthorizationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVPCAssociationAuthorizationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisableHostedZoneDNSSEC struct { -} - -func (*validateOpDisableHostedZoneDNSSEC) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisableHostedZoneDNSSECInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisableHostedZoneDNSSECInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateVPCFromHostedZone struct { -} - -func (*validateOpDisassociateVPCFromHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateVPCFromHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateVPCFromHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateVPCFromHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpEnableHostedZoneDNSSEC struct { -} - -func (*validateOpEnableHostedZoneDNSSEC) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpEnableHostedZoneDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*EnableHostedZoneDNSSECInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpEnableHostedZoneDNSSECInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetAccountLimit struct { -} - -func (*validateOpGetAccountLimit) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetAccountLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAccountLimitInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAccountLimitInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetChange struct { -} - -func (*validateOpGetChange) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetChange) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetChangeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetChangeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetDNSSEC struct { -} - -func (*validateOpGetDNSSEC) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetDNSSEC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetDNSSECInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetDNSSECInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHealthCheck struct { -} - -func (*validateOpGetHealthCheck) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHealthCheckInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHealthCheckInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHealthCheckLastFailureReason struct { -} - -func (*validateOpGetHealthCheckLastFailureReason) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHealthCheckLastFailureReason) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHealthCheckLastFailureReasonInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHealthCheckLastFailureReasonInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHealthCheckStatus struct { -} - -func (*validateOpGetHealthCheckStatus) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHealthCheckStatus) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHealthCheckStatusInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHealthCheckStatusInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHostedZone struct { -} - -func (*validateOpGetHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetHostedZoneLimit struct { -} - -func (*validateOpGetHostedZoneLimit) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetHostedZoneLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetHostedZoneLimitInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetHostedZoneLimitInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetQueryLoggingConfig struct { -} - -func (*validateOpGetQueryLoggingConfig) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetQueryLoggingConfig) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetQueryLoggingConfigInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetQueryLoggingConfigInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetReusableDelegationSet struct { -} - -func (*validateOpGetReusableDelegationSet) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetReusableDelegationSet) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetReusableDelegationSetInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetReusableDelegationSetInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetReusableDelegationSetLimit struct { -} - -func (*validateOpGetReusableDelegationSetLimit) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetReusableDelegationSetLimit) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetReusableDelegationSetLimitInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetReusableDelegationSetLimitInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTrafficPolicy struct { -} - -func (*validateOpGetTrafficPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTrafficPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTrafficPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTrafficPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetTrafficPolicyInstance struct { -} - -func (*validateOpGetTrafficPolicyInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetTrafficPolicyInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetTrafficPolicyInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListCidrBlocks struct { -} - -func (*validateOpListCidrBlocks) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListCidrBlocks) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListCidrBlocksInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListCidrBlocksInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListCidrLocations struct { -} - -func (*validateOpListCidrLocations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListCidrLocations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListCidrLocationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListCidrLocationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListHostedZonesByVPC struct { -} - -func (*validateOpListHostedZonesByVPC) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListHostedZonesByVPC) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListHostedZonesByVPCInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListHostedZonesByVPCInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListResourceRecordSets struct { -} - -func (*validateOpListResourceRecordSets) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListResourceRecordSets) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListResourceRecordSetsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListResourceRecordSetsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTagsForResource struct { -} - -func (*validateOpListTagsForResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTagsForResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTagsForResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTagsForResources struct { -} - -func (*validateOpListTagsForResources) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTagsForResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTagsForResourcesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTagsForResourcesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTrafficPolicyInstancesByHostedZone struct { -} - -func (*validateOpListTrafficPolicyInstancesByHostedZone) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTrafficPolicyInstancesByHostedZone) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTrafficPolicyInstancesByHostedZoneInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTrafficPolicyInstancesByHostedZoneInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTrafficPolicyInstancesByPolicy struct { -} - -func (*validateOpListTrafficPolicyInstancesByPolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTrafficPolicyInstancesByPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTrafficPolicyInstancesByPolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTrafficPolicyInstancesByPolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTrafficPolicyVersions struct { -} - -func (*validateOpListTrafficPolicyVersions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTrafficPolicyVersions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTrafficPolicyVersionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTrafficPolicyVersionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListVPCAssociationAuthorizations struct { -} - -func (*validateOpListVPCAssociationAuthorizations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListVPCAssociationAuthorizations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListVPCAssociationAuthorizationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListVPCAssociationAuthorizationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTestDNSAnswer struct { -} - -func (*validateOpTestDNSAnswer) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTestDNSAnswer) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TestDNSAnswerInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTestDNSAnswerInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateHealthCheck struct { -} - -func (*validateOpUpdateHealthCheck) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateHealthCheck) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateHealthCheckInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateHealthCheckInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateHostedZoneComment struct { -} - -func (*validateOpUpdateHostedZoneComment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateHostedZoneComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateHostedZoneCommentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateHostedZoneCommentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateTrafficPolicyComment struct { -} - -func (*validateOpUpdateTrafficPolicyComment) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateTrafficPolicyComment) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateTrafficPolicyCommentInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateTrafficPolicyCommentInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateTrafficPolicyInstance struct { -} - -func (*validateOpUpdateTrafficPolicyInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateTrafficPolicyInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateTrafficPolicyInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateTrafficPolicyInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpActivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpActivateKeySigningKey{}, middleware.After) -} - -func addOpAssociateVPCWithHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateVPCWithHostedZone{}, middleware.After) -} - -func addOpChangeCidrCollectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpChangeCidrCollection{}, middleware.After) -} - -func addOpChangeResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpChangeResourceRecordSets{}, middleware.After) -} - -func addOpChangeTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpChangeTagsForResource{}, middleware.After) -} - -func addOpCreateCidrCollectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateCidrCollection{}, middleware.After) -} - -func addOpCreateHealthCheckValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateHealthCheck{}, middleware.After) -} - -func addOpCreateHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateHostedZone{}, middleware.After) -} - -func addOpCreateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateKeySigningKey{}, middleware.After) -} - -func addOpCreateQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateQueryLoggingConfig{}, middleware.After) -} - -func addOpCreateReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateReusableDelegationSet{}, middleware.After) -} - -func addOpCreateTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTrafficPolicy{}, middleware.After) -} - -func addOpCreateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTrafficPolicyInstance{}, middleware.After) -} - -func addOpCreateTrafficPolicyVersionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTrafficPolicyVersion{}, middleware.After) -} - -func addOpCreateVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVPCAssociationAuthorization{}, middleware.After) -} - -func addOpDeactivateKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeactivateKeySigningKey{}, middleware.After) -} - -func addOpDeleteCidrCollectionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteCidrCollection{}, middleware.After) -} - -func addOpDeleteHealthCheckValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteHealthCheck{}, middleware.After) -} - -func addOpDeleteHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteHostedZone{}, middleware.After) -} - -func addOpDeleteKeySigningKeyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteKeySigningKey{}, middleware.After) -} - -func addOpDeleteQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteQueryLoggingConfig{}, middleware.After) -} - -func addOpDeleteReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteReusableDelegationSet{}, middleware.After) -} - -func addOpDeleteTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficPolicy{}, middleware.After) -} - -func addOpDeleteTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteTrafficPolicyInstance{}, middleware.After) -} - -func addOpDeleteVPCAssociationAuthorizationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVPCAssociationAuthorization{}, middleware.After) -} - -func addOpDisableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisableHostedZoneDNSSEC{}, middleware.After) -} - -func addOpDisassociateVPCFromHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateVPCFromHostedZone{}, middleware.After) -} - -func addOpEnableHostedZoneDNSSECValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpEnableHostedZoneDNSSEC{}, middleware.After) -} - -func addOpGetAccountLimitValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAccountLimit{}, middleware.After) -} - -func addOpGetChangeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetChange{}, middleware.After) -} - -func addOpGetDNSSECValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetDNSSEC{}, middleware.After) -} - -func addOpGetHealthCheckValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHealthCheck{}, middleware.After) -} - -func addOpGetHealthCheckLastFailureReasonValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHealthCheckLastFailureReason{}, middleware.After) -} - -func addOpGetHealthCheckStatusValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHealthCheckStatus{}, middleware.After) -} - -func addOpGetHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHostedZone{}, middleware.After) -} - -func addOpGetHostedZoneLimitValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetHostedZoneLimit{}, middleware.After) -} - -func addOpGetQueryLoggingConfigValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetQueryLoggingConfig{}, middleware.After) -} - -func addOpGetReusableDelegationSetValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetReusableDelegationSet{}, middleware.After) -} - -func addOpGetReusableDelegationSetLimitValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetReusableDelegationSetLimit{}, middleware.After) -} - -func addOpGetTrafficPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTrafficPolicy{}, middleware.After) -} - -func addOpGetTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetTrafficPolicyInstance{}, middleware.After) -} - -func addOpListCidrBlocksValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListCidrBlocks{}, middleware.After) -} - -func addOpListCidrLocationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListCidrLocations{}, middleware.After) -} - -func addOpListHostedZonesByVPCValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListHostedZonesByVPC{}, middleware.After) -} - -func addOpListResourceRecordSetsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListResourceRecordSets{}, middleware.After) -} - -func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) -} - -func addOpListTagsForResourcesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResources{}, middleware.After) -} - -func addOpListTrafficPolicyInstancesByHostedZoneValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByHostedZone{}, middleware.After) -} - -func addOpListTrafficPolicyInstancesByPolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTrafficPolicyInstancesByPolicy{}, middleware.After) -} - -func addOpListTrafficPolicyVersionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTrafficPolicyVersions{}, middleware.After) -} - -func addOpListVPCAssociationAuthorizationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListVPCAssociationAuthorizations{}, middleware.After) -} - -func addOpTestDNSAnswerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTestDNSAnswer{}, middleware.After) -} - -func addOpUpdateHealthCheckValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateHealthCheck{}, middleware.After) -} - -func addOpUpdateHostedZoneCommentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateHostedZoneComment{}, middleware.After) -} - -func addOpUpdateTrafficPolicyCommentValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateTrafficPolicyComment{}, middleware.After) -} - -func addOpUpdateTrafficPolicyInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateTrafficPolicyInstance{}, middleware.After) -} - -func validateAlarmIdentifier(v *types.AlarmIdentifier) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AlarmIdentifier"} - if len(v.Region) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Region")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAliasTarget(v *types.AliasTarget) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AliasTarget"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.DNSName == nil { - invalidParams.Add(smithy.NewErrParamRequired("DNSName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateChange(v *types.Change) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Change"} - if len(v.Action) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Action")) - } - if v.ResourceRecordSet == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceRecordSet")) - } else if v.ResourceRecordSet != nil { - if err := validateResourceRecordSet(v.ResourceRecordSet); err != nil { - invalidParams.AddNested("ResourceRecordSet", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateChangeBatch(v *types.ChangeBatch) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ChangeBatch"} - if v.Changes == nil { - invalidParams.Add(smithy.NewErrParamRequired("Changes")) - } else if v.Changes != nil { - if err := validateChanges(v.Changes); err != nil { - invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateChanges(v []types.Change) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Changes"} - for i := range v { - if err := validateChange(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCidrCollectionChange(v *types.CidrCollectionChange) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChange"} - if v.LocationName == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocationName")) - } - if len(v.Action) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Action")) - } - if v.CidrList == nil { - invalidParams.Add(smithy.NewErrParamRequired("CidrList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCidrCollectionChanges(v []types.CidrCollectionChange) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CidrCollectionChanges"} - for i := range v { - if err := validateCidrCollectionChange(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCidrRoutingConfig(v *types.CidrRoutingConfig) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CidrRoutingConfig"} - if v.CollectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) - } - if v.LocationName == nil { - invalidParams.Add(smithy.NewErrParamRequired("LocationName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCoordinates(v *types.Coordinates) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Coordinates"} - if v.Latitude == nil { - invalidParams.Add(smithy.NewErrParamRequired("Latitude")) - } - if v.Longitude == nil { - invalidParams.Add(smithy.NewErrParamRequired("Longitude")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateGeoProximityLocation(v *types.GeoProximityLocation) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GeoProximityLocation"} - if v.Coordinates != nil { - if err := validateCoordinates(v.Coordinates); err != nil { - invalidParams.AddNested("Coordinates", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateHealthCheckConfig(v *types.HealthCheckConfig) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "HealthCheckConfig"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if v.AlarmIdentifier != nil { - if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil { - invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateResourceRecord(v *types.ResourceRecord) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResourceRecord"} - if v.Value == nil { - invalidParams.Add(smithy.NewErrParamRequired("Value")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateResourceRecords(v []types.ResourceRecord) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResourceRecords"} - for i := range v { - if err := validateResourceRecord(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateResourceRecordSet(v *types.ResourceRecordSet) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ResourceRecordSet"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if v.ResourceRecords != nil { - if err := validateResourceRecords(v.ResourceRecords); err != nil { - invalidParams.AddNested("ResourceRecords", err.(smithy.InvalidParamsError)) - } - } - if v.AliasTarget != nil { - if err := validateAliasTarget(v.AliasTarget); err != nil { - invalidParams.AddNested("AliasTarget", err.(smithy.InvalidParamsError)) - } - } - if v.CidrRoutingConfig != nil { - if err := validateCidrRoutingConfig(v.CidrRoutingConfig); err != nil { - invalidParams.AddNested("CidrRoutingConfig", err.(smithy.InvalidParamsError)) - } - } - if v.GeoProximityLocation != nil { - if err := validateGeoProximityLocation(v.GeoProximityLocation); err != nil { - invalidParams.AddNested("GeoProximityLocation", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpActivateKeySigningKeyInput(v *ActivateKeySigningKeyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ActivateKeySigningKeyInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateVPCWithHostedZoneInput(v *AssociateVPCWithHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateVPCWithHostedZoneInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.VPC == nil { - invalidParams.Add(smithy.NewErrParamRequired("VPC")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpChangeCidrCollectionInput(v *ChangeCidrCollectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ChangeCidrCollectionInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Changes == nil { - invalidParams.Add(smithy.NewErrParamRequired("Changes")) - } else if v.Changes != nil { - if err := validateCidrCollectionChanges(v.Changes); err != nil { - invalidParams.AddNested("Changes", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpChangeResourceRecordSetsInput(v *ChangeResourceRecordSetsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ChangeResourceRecordSetsInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.ChangeBatch == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChangeBatch")) - } else if v.ChangeBatch != nil { - if err := validateChangeBatch(v.ChangeBatch); err != nil { - invalidParams.AddNested("ChangeBatch", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpChangeTagsForResourceInput(v *ChangeTagsForResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ChangeTagsForResourceInput"} - if len(v.ResourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) - } - if v.ResourceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateCidrCollectionInput(v *CreateCidrCollectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateCidrCollectionInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.CallerReference == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateHealthCheckInput(v *CreateHealthCheckInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateHealthCheckInput"} - if v.CallerReference == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) - } - if v.HealthCheckConfig == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckConfig")) - } else if v.HealthCheckConfig != nil { - if err := validateHealthCheckConfig(v.HealthCheckConfig); err != nil { - invalidParams.AddNested("HealthCheckConfig", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateHostedZoneInput(v *CreateHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateHostedZoneInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.CallerReference == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateKeySigningKeyInput(v *CreateKeySigningKeyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateKeySigningKeyInput"} - if v.CallerReference == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) - } - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.KeyManagementServiceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("KeyManagementServiceArn")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Status == nil { - invalidParams.Add(smithy.NewErrParamRequired("Status")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateQueryLoggingConfigInput(v *CreateQueryLoggingConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateQueryLoggingConfigInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.CloudWatchLogsLogGroupArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("CloudWatchLogsLogGroupArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateReusableDelegationSetInput(v *CreateReusableDelegationSetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateReusableDelegationSetInput"} - if v.CallerReference == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallerReference")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTrafficPolicyInput(v *CreateTrafficPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Document == nil { - invalidParams.Add(smithy.NewErrParamRequired("Document")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTrafficPolicyInstanceInput(v *CreateTrafficPolicyInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyInstanceInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.TTL == nil { - invalidParams.Add(smithy.NewErrParamRequired("TTL")) - } - if v.TrafficPolicyId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) - } - if v.TrafficPolicyVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTrafficPolicyVersionInput(v *CreateTrafficPolicyVersionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTrafficPolicyVersionInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Document == nil { - invalidParams.Add(smithy.NewErrParamRequired("Document")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVPCAssociationAuthorizationInput(v *CreateVPCAssociationAuthorizationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVPCAssociationAuthorizationInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.VPC == nil { - invalidParams.Add(smithy.NewErrParamRequired("VPC")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeactivateKeySigningKeyInput(v *DeactivateKeySigningKeyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeactivateKeySigningKeyInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteCidrCollectionInput(v *DeleteCidrCollectionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteCidrCollectionInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteHealthCheckInput(v *DeleteHealthCheckInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteHealthCheckInput"} - if v.HealthCheckId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteHostedZoneInput(v *DeleteHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteHostedZoneInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteKeySigningKeyInput(v *DeleteKeySigningKeyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteKeySigningKeyInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteQueryLoggingConfigInput(v *DeleteQueryLoggingConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteQueryLoggingConfigInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteReusableDelegationSetInput(v *DeleteReusableDelegationSetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteReusableDelegationSetInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficPolicyInput(v *DeleteTrafficPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Version == nil { - invalidParams.Add(smithy.NewErrParamRequired("Version")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteTrafficPolicyInstanceInput(v *DeleteTrafficPolicyInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteTrafficPolicyInstanceInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVPCAssociationAuthorizationInput(v *DeleteVPCAssociationAuthorizationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVPCAssociationAuthorizationInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.VPC == nil { - invalidParams.Add(smithy.NewErrParamRequired("VPC")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisableHostedZoneDNSSECInput(v *DisableHostedZoneDNSSECInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisableHostedZoneDNSSECInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateVPCFromHostedZoneInput(v *DisassociateVPCFromHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateVPCFromHostedZoneInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.VPC == nil { - invalidParams.Add(smithy.NewErrParamRequired("VPC")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpEnableHostedZoneDNSSECInput(v *EnableHostedZoneDNSSECInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EnableHostedZoneDNSSECInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAccountLimitInput(v *GetAccountLimitInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAccountLimitInput"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetChangeInput(v *GetChangeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetChangeInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetDNSSECInput(v *GetDNSSECInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetDNSSECInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHealthCheckInput(v *GetHealthCheckInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckInput"} - if v.HealthCheckId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHealthCheckLastFailureReasonInput(v *GetHealthCheckLastFailureReasonInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckLastFailureReasonInput"} - if v.HealthCheckId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHealthCheckStatusInput(v *GetHealthCheckStatusInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHealthCheckStatusInput"} - if v.HealthCheckId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHostedZoneInput(v *GetHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetHostedZoneLimitInput(v *GetHostedZoneLimitInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetHostedZoneLimitInput"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetQueryLoggingConfigInput(v *GetQueryLoggingConfigInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetQueryLoggingConfigInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetReusableDelegationSetInput(v *GetReusableDelegationSetInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetReusableDelegationSetLimitInput(v *GetReusableDelegationSetLimitInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetReusableDelegationSetLimitInput"} - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if v.DelegationSetId == nil { - invalidParams.Add(smithy.NewErrParamRequired("DelegationSetId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTrafficPolicyInput(v *GetTrafficPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Version == nil { - invalidParams.Add(smithy.NewErrParamRequired("Version")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetTrafficPolicyInstanceInput(v *GetTrafficPolicyInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetTrafficPolicyInstanceInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListCidrBlocksInput(v *ListCidrBlocksInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListCidrBlocksInput"} - if v.CollectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListCidrLocationsInput(v *ListCidrLocationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListCidrLocationsInput"} - if v.CollectionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("CollectionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListHostedZonesByVPCInput(v *ListHostedZonesByVPCInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListHostedZonesByVPCInput"} - if v.VPCId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VPCId")) - } - if len(v.VPCRegion) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("VPCRegion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListResourceRecordSetsInput(v *ListResourceRecordSetsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListResourceRecordSetsInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} - if len(v.ResourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) - } - if v.ResourceId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTagsForResourcesInput(v *ListTagsForResourcesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourcesInput"} - if len(v.ResourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ResourceType")) - } - if v.ResourceIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTrafficPolicyInstancesByHostedZoneInput(v *ListTrafficPolicyInstancesByHostedZoneInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByHostedZoneInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTrafficPolicyInstancesByPolicyInput(v *ListTrafficPolicyInstancesByPolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyInstancesByPolicyInput"} - if v.TrafficPolicyId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) - } - if v.TrafficPolicyVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTrafficPolicyVersionsInput(v *ListTrafficPolicyVersionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTrafficPolicyVersionsInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListVPCAssociationAuthorizationsInput(v *ListVPCAssociationAuthorizationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListVPCAssociationAuthorizationsInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTestDNSAnswerInput(v *TestDNSAnswerInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TestDNSAnswerInput"} - if v.HostedZoneId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HostedZoneId")) - } - if v.RecordName == nil { - invalidParams.Add(smithy.NewErrParamRequired("RecordName")) - } - if len(v.RecordType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("RecordType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateHealthCheckInput(v *UpdateHealthCheckInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateHealthCheckInput"} - if v.HealthCheckId == nil { - invalidParams.Add(smithy.NewErrParamRequired("HealthCheckId")) - } - if v.AlarmIdentifier != nil { - if err := validateAlarmIdentifier(v.AlarmIdentifier); err != nil { - invalidParams.AddNested("AlarmIdentifier", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateHostedZoneCommentInput(v *UpdateHostedZoneCommentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateHostedZoneCommentInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateTrafficPolicyCommentInput(v *UpdateTrafficPolicyCommentInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyCommentInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Version == nil { - invalidParams.Add(smithy.NewErrParamRequired("Version")) - } - if v.Comment == nil { - invalidParams.Add(smithy.NewErrParamRequired("Comment")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateTrafficPolicyInstanceInput(v *UpdateTrafficPolicyInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateTrafficPolicyInstanceInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.TTL == nil { - invalidParams.Add(smithy.NewErrParamRequired("TTL")) - } - if v.TrafficPolicyId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyId")) - } - if v.TrafficPolicyVersion == nil { - invalidParams.Add(smithy.NewErrParamRequired("TrafficPolicyVersion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md deleted file mode 100644 index 922acc0e7e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/CHANGELOG.md +++ /dev/null @@ -1,777 +0,0 @@ -# v1.39.6 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.5 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.4 (2025-09-10) - -* No change notes available for this release. - -# v1.39.3 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.2 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.1 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.39.0 (2025-08-26) - -* **Feature**: Remove incorrect endpoint tests - -# v1.38.2 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.1 (2025-08-20) - -* **Bug Fix**: Remove unused deserialization code. - -# v1.38.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.37.0 (2025-08-04) - -* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.36.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.36.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.8 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.7 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.6 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.5 (2025-06-06) - -* No change notes available for this release. - -# v1.35.4 (2025-04-16) - -* No change notes available for this release. - -# v1.35.3 (2025-04-03) - -* No change notes available for this release. - -# v1.35.2 (2025-03-06) - -* No change notes available for this release. - -# v1.35.1 (2025-03-04.2) - -* **Bug Fix**: Add assurance test for operation order. - -# v1.35.0 (2025-02-27) - -* **Feature**: Track credential providers via User-Agent Feature ids -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.19 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.18 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.17 (2025-02-04) - -* No change notes available for this release. - -# v1.34.16 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.15 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.14 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.34.13 (2025-01-17) - -* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. - -# v1.34.12 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.11 (2025-01-14) - -* No change notes available for this release. - -# v1.34.10 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.9 (2025-01-08) - -* No change notes available for this release. - -# v1.34.8 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.7 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.6 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.5 (2024-11-07) - -* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses - -# v1.34.4 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.4 (2024-10-03) - -* No change notes available for this release. - -# v1.33.3 (2024-09-27) - -* No change notes available for this release. - -# v1.33.2 (2024-09-25) - -* No change notes available for this release. - -# v1.33.1 (2024-09-23) - -* No change notes available for this release. - -# v1.33.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.9 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.32.8 (2024-09-04) - -* No change notes available for this release. - -# v1.32.7 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.6 (2024-08-22) - -* No change notes available for this release. - -# v1.32.5 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.4 (2024-07-18) - -* **Documentation**: Doc only update for Secrets Manager - -# v1.32.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.31.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.1 (2024-06-17) - -* **Documentation**: Doc only update for Secrets Manager -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.0 (2024-06-12) - -* **Feature**: Introducing RotationToken parameter for PutSecretValue API - -# v1.29.3 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.2 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.1 (2024-05-23) - -* No change notes available for this release. - -# v1.29.0 (2024-05-20) - -* **Feature**: add v2 smoke tests and smithy smokeTests trait for SDK testing - -# v1.28.9 (2024-05-16) - -* **Documentation**: Documentation updates for AWS Secrets Manager -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.8 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.7 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.28.6 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.5 (2024-03-27) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.28.4 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.3 (2024-03-14) - -* **Documentation**: Doc only update for Secrets Manager - -# v1.28.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.27.3 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.2 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.27.1 (2024-02-15) - -* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. -* **Documentation**: Doc only update for Secrets Manager - -# v1.27.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.2 (2024-01-11) - -* **Documentation**: Doc only update for Secrets Manager - -# v1.26.1 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2023-12-22) - -* **Feature**: Update endpoint rules and examples. - -# v1.25.6 (2023-12-20) - -* No change notes available for this release. - -# v1.25.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.25.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.25.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.2 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.1 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.24.0 (2023-11-27) - -* **Feature**: AWS Secrets Manager has released the BatchGetSecretValue API, which allows customers to fetch up to 20 Secrets with a single request using a list of secret names or filters. - -# v1.23.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.6 (2023-10-19) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.21.5 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.4 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.2 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2023-08-10) - -* **Feature**: Add additional InvalidRequestException to list of possible exceptions for ListSecret. - -# v1.20.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2023-08-01) - -* No change notes available for this release. - -# v1.20.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.12 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.11 (2023-07-13) - -* **Documentation**: Documentation updates for Secrets Manager -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.10 (2023-06-15) - -* No change notes available for this release. - -# v1.19.9 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.8 (2023-05-16) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.19.7 (2023-05-04) - -* No change notes available for this release. - -# v1.19.6 (2023-04-27) - -* No change notes available for this release. - -# v1.19.5 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.4 (2023-04-19) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.19.3 (2023-04-10) - -* No change notes available for this release. - -# v1.19.2 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-03-10) - -* **Feature**: The type definitions of SecretString and SecretBinary now have a minimum length of 1 in the model to match the exception thrown when you pass in empty values. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2023-03-02) - -* No change notes available for this release. - -# v1.18.6 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.18.5 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.18.3 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2023-01-23) - -* No change notes available for this release. - -# v1.18.1 (2023-01-12) - -* **Documentation**: Update documentation for new ListSecrets and DescribeSecret parameters - -# v1.18.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.17.0 (2022-12-29) - -* **Feature**: Added owning service filter, include planned deletion flag, and next rotation date response parameter in ListSecrets. - -# v1.16.11 (2022-12-22) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.16.10 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.9 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2022-11-22) - -* No change notes available for this release. - -# v1.16.7 (2022-11-17) - -* **Documentation**: Documentation updates for Secrets Manager. - -# v1.16.6 (2022-11-16) - -* No change notes available for this release. - -# v1.16.5 (2022-11-10) - -* No change notes available for this release. - -# v1.16.4 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.3 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2022-09-29) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.16.1 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2022-09-14) - -* **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.22 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.21 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.20 (2022-08-30) - -* No change notes available for this release. - -# v1.15.19 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.18 (2022-08-17) - -* **Documentation**: Documentation updates for Secrets Manager. - -# v1.15.17 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.16 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.15 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.14 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.13 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.12 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.11 (2022-06-16) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.15.10 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.9 (2022-05-25) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.15.8 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.7 (2022-05-11) - -* **Documentation**: Doc only update for Secrets Manager that fixes several customer-reported issues. - -# v1.15.6 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.5 (2022-04-21) - -* **Documentation**: Documentation updates for Secrets Manager - -# v1.15.4 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.3 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.2 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2022-03-11) - -* **Documentation**: Documentation updates for Secrets Manager. - -# v1.15.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-01-07) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. -* **Documentation**: API client updated - -# v1.10.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2021-11-12) - -* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. - -# v1.9.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-10-11) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.1 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-08-04) - -* **Feature**: Updated to latest API model. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/secretsmanager/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_client.go deleted file mode 100644 index 6e606be15d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_client.go +++ /dev/null @@ -1,1035 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - cryptorand "crypto/rand" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - smithyrand "github.com/aws/smithy-go/rand" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "Secrets Manager" -const ServiceAPIVersion = "2017-10-17" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/secretsmanager") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/secretsmanager") -} - -// Client provides the API client to make operations call for AWS Secrets Manager. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveIdempotencyTokenProvider(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/secretsmanager") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveInterceptors(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, func(o *Options) { - for _, opt := range cfg.ServiceOptions { - opt(ServiceID, o) - } - for _, opt := range optFns { - opt(o) - } - }) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func resolveInterceptors(cfg aws.Config, o *Options) { - o.Interceptors = cfg.Interceptors.Copy() -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "secretsmanager", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func resolveIdempotencyTokenProvider(o *Options) { - if o.IdempotencyTokenProvider != nil { - return - } - o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/secretsmanager") - }) - if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - -func addCredentialSource(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -// IdempotencyTokenProvider interface for providing idempotency token -type IdempotencyTokenProvider interface { - GetIdempotencyToken() (string, error) -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ - Interceptors: opts.Interceptors.BeforeRetryLoop, - }, "Retry", middleware.Before) -} - -func addInterceptAttempt(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ - BeforeAttempt: opts.Interceptors.BeforeAttempt, - AfterAttempt: opts.Interceptors.AfterAttempt, - }, "Retry", middleware.After) -} - -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_BatchGetSecretValue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_BatchGetSecretValue.go deleted file mode 100644 index 37d44f0590..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_BatchGetSecretValue.go +++ /dev/null @@ -1,333 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the contents of the encrypted fields SecretString or SecretBinary for -// up to 20 secrets. To retrieve a single secret, call GetSecretValue. -// -// To choose which secrets to retrieve, you can specify a list of secrets by name -// or ARN, or you can use filters. If Secrets Manager encounters errors such as -// AccessDeniedException while attempting to retrieve any of the secrets, you can -// see the errors in Errors in the response. -// -// Secrets Manager generates CloudTrail GetSecretValue log entries for each secret -// you request when you call this action. Do not include sensitive information in -// request parameters because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:BatchGetSecretValue , and you must have -// secretsmanager:GetSecretValue for each secret. If you use filters, you must also -// have secretsmanager:ListSecrets . If the secrets are encrypted using -// customer-managed keys instead of the Amazon Web Services managed key -// aws/secretsmanager , then you also need kms:Decrypt permissions for the keys. -// For more information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) BatchGetSecretValue(ctx context.Context, params *BatchGetSecretValueInput, optFns ...func(*Options)) (*BatchGetSecretValueOutput, error) { - if params == nil { - params = &BatchGetSecretValueInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchGetSecretValue", params, optFns, c.addOperationBatchGetSecretValueMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchGetSecretValueOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchGetSecretValueInput struct { - - // The filters to choose which secrets to retrieve. You must include Filters or - // SecretIdList , but not both. - Filters []types.Filter - - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call BatchGetSecretValue again with the - // value from NextToken . To use this parameter, you must also use the Filters - // parameter. - MaxResults *int32 - - // A token that indicates where the output should continue from, if a previous - // call did not show all results. To get the next results, call BatchGetSecretValue - // again with this value. - NextToken *string - - // The ARN or names of the secrets to retrieve. You must include Filters or - // SecretIdList , but not both. - SecretIdList []string - - noSmithyDocumentSerde -} - -type BatchGetSecretValueOutput struct { - - // A list of errors Secrets Manager encountered while attempting to retrieve - // individual secrets. - Errors []types.APIErrorType - - // Secrets Manager includes this value if there's more output available than what - // is included in the current response. This can occur even when the response - // includes no values at all, such as when you ask for a filtered view of a long - // list. To get the next results, call BatchGetSecretValue again with this value. - NextToken *string - - // A list of secret values. - SecretValues []types.SecretValueEntry - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchGetSecretValueMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpBatchGetSecretValue{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpBatchGetSecretValue{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchGetSecretValue"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetSecretValue(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// BatchGetSecretValuePaginatorOptions is the paginator options for -// BatchGetSecretValue -type BatchGetSecretValuePaginatorOptions struct { - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call BatchGetSecretValue again with the - // value from NextToken . To use this parameter, you must also use the Filters - // parameter. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// BatchGetSecretValuePaginator is a paginator for BatchGetSecretValue -type BatchGetSecretValuePaginator struct { - options BatchGetSecretValuePaginatorOptions - client BatchGetSecretValueAPIClient - params *BatchGetSecretValueInput - nextToken *string - firstPage bool -} - -// NewBatchGetSecretValuePaginator returns a new BatchGetSecretValuePaginator -func NewBatchGetSecretValuePaginator(client BatchGetSecretValueAPIClient, params *BatchGetSecretValueInput, optFns ...func(*BatchGetSecretValuePaginatorOptions)) *BatchGetSecretValuePaginator { - if params == nil { - params = &BatchGetSecretValueInput{} - } - - options := BatchGetSecretValuePaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &BatchGetSecretValuePaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *BatchGetSecretValuePaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next BatchGetSecretValue page. -func (p *BatchGetSecretValuePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*BatchGetSecretValueOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.BatchGetSecretValue(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// BatchGetSecretValueAPIClient is a client that implements the -// BatchGetSecretValue operation. -type BatchGetSecretValueAPIClient interface { - BatchGetSecretValue(context.Context, *BatchGetSecretValueInput, ...func(*Options)) (*BatchGetSecretValueOutput, error) -} - -var _ BatchGetSecretValueAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opBatchGetSecretValue(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchGetSecretValue", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go deleted file mode 100644 index 4314e5133a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CancelRotateSecret.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Turns off automatic rotation, and if a rotation is currently in progress, -// cancels the rotation. -// -// If you cancel a rotation in progress, it can leave the VersionStage labels in -// an unexpected state. You might need to remove the staging label AWSPENDING from -// the partially created version. You also need to determine whether to roll back -// to the previous version of the secret by moving the staging label AWSCURRENT to -// the version that has AWSPENDING . To determine which version has a specific -// staging label, call ListSecretVersionIds. Then use UpdateSecretVersionStage to change staging labels. For more information, -// see [How rotation works]. -// -// To turn on automatic rotation again, call RotateSecret. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:CancelRotateSecret . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [How rotation works]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) CancelRotateSecret(ctx context.Context, params *CancelRotateSecretInput, optFns ...func(*Options)) (*CancelRotateSecretOutput, error) { - if params == nil { - params = &CancelRotateSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CancelRotateSecret", params, optFns, c.addOperationCancelRotateSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CancelRotateSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CancelRotateSecretInput struct { - - // The ARN or name of the secret. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type CancelRotateSecretOutput struct { - - // The ARN of the secret. - ARN *string - - // The name of the secret. - Name *string - - // The unique identifier of the version of the secret created during the rotation. - // This version might not be complete, and should be evaluated for possible - // deletion. We recommend that you remove the VersionStage value AWSPENDING from - // this version so that Secrets Manager can delete it. Failing to clean up a - // cancelled rotation can block you from starting future rotations. - VersionId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCancelRotateSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpCancelRotateSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCancelRotateSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CancelRotateSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCancelRotateSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCancelRotateSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCancelRotateSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CancelRotateSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go deleted file mode 100644 index 82fc72f20f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_CreateSecret.go +++ /dev/null @@ -1,424 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new secret. A secret can be a password, a set of credentials such as -// a user name and password, an OAuth token, or other secret information that you -// store in an encrypted form in Secrets Manager. The secret also includes the -// connection information to access a database or other service, which Secrets -// Manager doesn't encrypt. A secret in Secrets Manager consists of both the -// protected secret data and the important information needed to manage the secret. -// -// For secrets that use managed rotation, you need to create the secret through -// the managing service. For more information, see [Secrets Manager secrets managed by other Amazon Web Services services]. -// -// For information about creating a secret in the console, see [Create a secret]. -// -// To create a secret, you can provide the secret value to be encrypted in either -// the SecretString parameter or the SecretBinary parameter, but not both. If you -// include SecretString or SecretBinary then Secrets Manager creates an initial -// secret version and automatically attaches the staging label AWSCURRENT to it. -// -// For database credentials you want to rotate, for Secrets Manager to be able to -// rotate the secret, you must make sure the JSON you store in the SecretString -// matches the [JSON structure of a database secret]. -// -// If you don't specify an KMS encryption key, Secrets Manager uses the Amazon Web -// Services managed key aws/secretsmanager . If this key doesn't already exist in -// your account, then Secrets Manager creates it for you automatically. All users -// and roles in the Amazon Web Services account automatically have access to use -// aws/secretsmanager . Creating aws/secretsmanager can result in a one-time -// significant delay in returning the result. -// -// If the secret is in a different Amazon Web Services account from the -// credentials calling the API, then you can't use aws/secretsmanager to encrypt -// the secret, and you must create and use a customer managed KMS key. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters except SecretBinary or -// SecretString because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:CreateSecret . If you include tags in the -// secret, you also need secretsmanager:TagResource . To add replica Regions, you -// must also have secretsmanager:ReplicateSecretToRegions . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// To encrypt the secret with a KMS key other than aws/secretsmanager , you need -// kms:GenerateDataKey and kms:Decrypt permission to the key. -// -// When you enter commands in a command shell, there is a risk of the command -// history being accessed or utilities having access to your command parameters. -// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Secrets Manager secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html -// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html -// [Create a secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_create-basic-secret.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [JSON structure of a database secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_secret_json_structure.html -func (c *Client) CreateSecret(ctx context.Context, params *CreateSecretInput, optFns ...func(*Options)) (*CreateSecretOutput, error) { - if params == nil { - params = &CreateSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSecret", params, optFns, c.addOperationCreateSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSecretInput struct { - - // The name of the new secret. - // - // The secret name can contain ASCII letters, numbers, and the following - // characters: /_+=.@- - // - // Do not end your secret name with a hyphen followed by six characters. If you do - // so, you risk confusion and unexpected results when searching for a secret by - // partial ARN. Secrets Manager automatically adds a hyphen and six random - // characters after the secret name at the end of the ARN. - // - // This member is required. - Name *string - - // A list of Regions and KMS keys to replicate secrets. - AddReplicaRegions []types.ReplicaRegionType - - // If you include SecretString or SecretBinary , then Secrets Manager creates an - // initial version for the secret, and this parameter specifies the unique - // identifier for the new version. - // - // If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs - // to call this operation, then you can leave this parameter empty. The CLI or SDK - // generates a random UUID for you and includes it as the value for this parameter - // in the request. - // - // If you generate a raw HTTP request to the Secrets Manager service endpoint, - // then you must generate a ClientRequestToken and include it in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during a rotation. We recommend that you generate a [UUID-type]value to ensure uniqueness - // of your versions within the specified secret. - // - // - If the ClientRequestToken value isn't already associated with a version of - // the secret then a new version of the secret is created. - // - // - If a version with this value already exists and the version SecretString and - // SecretBinary values are the same as those in the request, then the request is - // ignored. - // - // - If a version with this value already exists and that version's SecretString - // and SecretBinary values are different from those in the request, then the - // request fails because you cannot modify an existing version. Instead, use PutSecretValueto - // create a new version. - // - // This value becomes the VersionId of the new version. - // - // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier - ClientRequestToken *string - - // The description of the secret. - Description *string - - // Specifies whether to overwrite a secret with the same name in the destination - // Region. By default, secrets aren't overwritten. - ForceOverwriteReplicaSecret bool - - // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt - // the secret value in the secret. An alias is always prefixed by alias/ , for - // example alias/aws/secretsmanager . For more information, see [About aliases]. - // - // To use a KMS key in a different account, use the key ARN or the alias ARN. - // - // If you don't specify this value, then Secrets Manager uses the key - // aws/secretsmanager . If that key doesn't yet exist, then Secrets Manager creates - // it for you automatically the first time it encrypts the secret value. - // - // If the secret is in a different Amazon Web Services account from the - // credentials calling the API, then you can't use aws/secretsmanager to encrypt - // the secret, and you must create and use a customer managed KMS key. - // - // [About aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html - KmsKeyId *string - - // The binary data to encrypt and store in the new version of the secret. We - // recommend that you store your binary data in a file and then pass the contents - // of the file as a parameter. - // - // Either SecretString or SecretBinary must have a value, but not both. - // - // This parameter is not available in the Secrets Manager console. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretBinary []byte - - // The text data to encrypt and store in this new version of the secret. We - // recommend you use a JSON structure of key/value pairs for your secret value. - // - // Either SecretString or SecretBinary must have a value, but not both. - // - // If you create a secret by using the Secrets Manager console then Secrets - // Manager puts the protected secret text in only the SecretString parameter. The - // Secrets Manager console stores the information as a JSON structure of key/value - // pairs that a Lambda rotation function can parse. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretString *string - - // A list of tags to attach to the secret. Each tag is a key and value pair of - // strings in a JSON text string, for example: - // - // [{"Key":"CostCenter","Value":"12345"},{"Key":"environment","Value":"production"}] - // - // Secrets Manager tag key names are case sensitive. A tag with the key "ABC" is a - // different tag from one with key "abc". - // - // If you check tags in permissions policies as part of your security strategy, - // then adding or removing a tag can change permissions. If the completion of this - // operation would result in you losing your permissions for this secret, then - // Secrets Manager blocks the operation and returns an Access Denied error. For - // more information, see [Control access to secrets using tags]and [Limit access to identities with tags that match secrets' tags]. - // - // For information about how to format a JSON parameter for the various command - // line tool environments, see [Using JSON for Parameters]. If your command-line tool or SDK requires - // quotation marks around the parameter, you should use single quotes to avoid - // confusion with the double quotes required in the JSON text. - // - // For tag quotas and naming restrictions, see [Service quotas for Tagging] in the Amazon Web Services General - // Reference guide. - // - // [Limit access to identities with tags that match secrets' tags]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#auth-and-access_tags2 - // [Using JSON for Parameters]: https://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#cli-using-param-json - // [Service quotas for Tagging]: https://docs.aws.amazon.com/general/latest/gr/arg.html#taged-reference-quotas - // [Control access to secrets using tags]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html#tag-secrets-abac - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateSecretOutput struct { - - // The ARN of the new secret. The ARN includes the name of the secret followed by - // six random characters. This ensures that if you create a new secret with the - // same name as a deleted secret, then users with access to the old secret don't - // get access to the new secret because the ARNs are different. - ARN *string - - // The name of the new secret. - Name *string - - // A list of the replicas of this secret and their status: - // - // - Failed , which indicates that the replica was not created. - // - // - InProgress , which indicates that Secrets Manager is in the process of - // creating the replica. - // - // - InSync , which indicates that the replica was created. - ReplicationStatus []types.ReplicationStatusType - - // The unique identifier associated with the version of the new secret. - VersionId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateSecretMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateSecret struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateSecret) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateSecretInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateSecretMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateSecret{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go deleted file mode 100644 index fdb6f3425e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteResourcePolicy.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the resource-based permission policy attached to the secret. To attach -// a policy to a secret, use PutResourcePolicy. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:DeleteResourcePolicy . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) DeleteResourcePolicy(ctx context.Context, params *DeleteResourcePolicyInput, optFns ...func(*Options)) (*DeleteResourcePolicyOutput, error) { - if params == nil { - params = &DeleteResourcePolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteResourcePolicy", params, optFns, c.addOperationDeleteResourcePolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteResourcePolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteResourcePolicyInput struct { - - // The ARN or name of the secret to delete the attached resource-based policy for. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type DeleteResourcePolicyOutput struct { - - // The ARN of the secret that the resource-based policy was deleted for. - ARN *string - - // The name of the secret that the resource-based policy was deleted for. - Name *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteResourcePolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteResourcePolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteResourcePolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteResourcePolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteResourcePolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteResourcePolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go deleted file mode 100644 index 5e1bd49658..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DeleteSecret.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Deletes a secret and all of its versions. You can specify a recovery window -// during which you can restore the secret. The minimum recovery window is 7 days. -// The default recovery window is 30 days. Secrets Manager attaches a DeletionDate -// stamp to the secret that specifies the end of the recovery window. At the end of -// the recovery window, Secrets Manager deletes the secret permanently. -// -// You can't delete a primary secret that is replicated to other Regions. You must -// first delete the replicas using RemoveRegionsFromReplication, and then delete the primary secret. When you -// delete a replica, it is deleted immediately. -// -// You can't directly delete a version of a secret. Instead, you remove all -// staging labels from the version using UpdateSecretVersionStage. This marks the version as deprecated, -// and then Secrets Manager can automatically delete the version in the background. -// -// To determine whether an application still uses a secret, you can create an -// Amazon CloudWatch alarm to alert you to any attempts to access a secret during -// the recovery window. For more information, see [Monitor secrets scheduled for deletion]. -// -// Secrets Manager performs the permanent secret deletion at the end of the -// waiting period as a background task with low priority. There is no guarantee of -// a specific time after the recovery window for the permanent delete to occur. -// -// At any time before recovery window ends, you can use RestoreSecret to remove the DeletionDate -// and cancel the deletion of the secret. -// -// When a secret is scheduled for deletion, you cannot retrieve the secret value. -// You must first cancel the deletion with RestoreSecretand then you can retrieve the secret. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:DeleteSecret . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Monitor secrets scheduled for deletion]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring_cloudwatch_deleted-secrets.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) DeleteSecret(ctx context.Context, params *DeleteSecretInput, optFns ...func(*Options)) (*DeleteSecretOutput, error) { - if params == nil { - params = &DeleteSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSecret", params, optFns, c.addOperationDeleteSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSecretInput struct { - - // The ARN or name of the secret to delete. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // Specifies whether to delete the secret without any recovery window. You can't - // use both this parameter and RecoveryWindowInDays in the same call. If you don't - // use either, then by default Secrets Manager uses a 30 day recovery window. - // - // Secrets Manager performs the actual deletion with an asynchronous background - // process, so there might be a short delay before the secret is permanently - // deleted. If you delete a secret and then immediately create a secret with the - // same name, use appropriate back off and retry logic. - // - // If you forcibly delete an already deleted or nonexistent secret, the operation - // does not return ResourceNotFoundException . - // - // Use this parameter with caution. This parameter causes the operation to skip - // the normal recovery window before the permanent deletion that Secrets Manager - // would normally impose with the RecoveryWindowInDays parameter. If you delete a - // secret with the ForceDeleteWithoutRecovery parameter, then you have no - // opportunity to recover the secret. You lose the secret permanently. - ForceDeleteWithoutRecovery *bool - - // The number of days from 7 to 30 that Secrets Manager waits before permanently - // deleting the secret. You can't use both this parameter and - // ForceDeleteWithoutRecovery in the same call. If you don't use either, then by - // default Secrets Manager uses a 30 day recovery window. - RecoveryWindowInDays *int64 - - noSmithyDocumentSerde -} - -type DeleteSecretOutput struct { - - // The ARN of the secret. - ARN *string - - // The date and time after which this secret Secrets Manager can permanently - // delete this secret, and it can no longer be restored. This value is the date and - // time of the delete request plus the number of days in RecoveryWindowInDays . - DeletionDate *time.Time - - // The name of the secret. - Name *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDeleteSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go deleted file mode 100644 index f1cc6d5637..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_DescribeSecret.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Retrieves the details of a secret. It does not include the encrypted secret -// value. Secrets Manager only returns fields that have a value in the response. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:DescribeSecret . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) DescribeSecret(ctx context.Context, params *DescribeSecretInput, optFns ...func(*Options)) (*DescribeSecretOutput, error) { - if params == nil { - params = &DescribeSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeSecret", params, optFns, c.addOperationDescribeSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeSecretInput struct { - - // The ARN or name of the secret. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type DescribeSecretOutput struct { - - // The ARN of the secret. - ARN *string - - // The date the secret was created. - CreatedDate *time.Time - - // The date the secret is scheduled for deletion. If it is not scheduled for - // deletion, this field is omitted. When you delete a secret, Secrets Manager - // requires a recovery window of at least 7 days before deleting the secret. Some - // time after the deleted date, Secrets Manager deletes the secret, including all - // of its versions. - // - // If a secret is scheduled for deletion, then its details, including the - // encrypted secret value, is not accessible. To cancel a scheduled deletion and - // restore access to the secret, use RestoreSecret. - DeletedDate *time.Time - - // The description of the secret. - Description *string - - // The key ID or alias ARN of the KMS key that Secrets Manager uses to encrypt the - // secret value. If the secret is encrypted with the Amazon Web Services managed - // key aws/secretsmanager , this field is omitted. Secrets created using the - // console use an KMS key ID. - KmsKeyId *string - - // The date that the secret was last accessed in the Region. This field is omitted - // if the secret has never been retrieved in the Region. - LastAccessedDate *time.Time - - // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time - - // The last date and time that Secrets Manager rotated the secret. If the secret - // isn't configured for rotation or rotation has been disabled, Secrets Manager - // returns null. - LastRotatedDate *time.Time - - // The name of the secret. - Name *string - - // The next rotation is scheduled to occur on or before this date. If the secret - // isn't configured for rotation or rotation has been disabled, Secrets Manager - // returns null. If rotation fails, Secrets Manager retries the entire rotation - // process multiple times. If rotation is unsuccessful, this date may be in the - // past. - // - // This date represents the latest date that rotation will occur, but it is not an - // approximate rotation date. In some cases, for example if you turn off automatic - // rotation and then turn it back on, the next rotation may occur much sooner than - // this date. - NextRotationDate *time.Time - - // The ID of the service that created this secret. For more information, see [Secrets managed by other Amazon Web Services services]. - // - // [Secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html - OwningService *string - - // The Region the secret is in. If a secret is replicated to other Regions, the - // replicas are listed in ReplicationStatus . - PrimaryRegion *string - - // A list of the replicas of this secret and their status: - // - // - Failed , which indicates that the replica was not created. - // - // - InProgress , which indicates that Secrets Manager is in the process of - // creating the replica. - // - // - InSync , which indicates that the replica was created. - ReplicationStatus []types.ReplicationStatusType - - // Specifies whether automatic rotation is turned on for this secret. If the - // secret has never been configured for rotation, Secrets Manager returns null. - // - // To turn on rotation, use RotateSecret. To turn off rotation, use CancelRotateSecret. - RotationEnabled *bool - - // The ARN of the Lambda function that Secrets Manager invokes to rotate the - // secret. - RotationLambdaARN *string - - // The rotation schedule and Lambda function for this secret. If the secret - // previously had rotation turned on, but it is now turned off, this field shows - // the previous rotation schedule and rotation function. If the secret never had - // rotation turned on, this field is omitted. - RotationRules *types.RotationRulesType - - // The list of tags attached to the secret. To add tags to a secret, use TagResource. To - // remove tags, use UntagResource. - Tags []types.Tag - - // A list of the versions of the secret that have staging labels attached. - // Versions that don't have staging labels are considered deprecated and Secrets - // Manager can delete them. - // - // Secrets Manager uses staging labels to indicate the status of a secret version - // during rotation. The three staging labels for rotation are: - // - // - AWSCURRENT , which indicates the current version of the secret. - // - // - AWSPENDING , which indicates the version of the secret that contains new - // secret information that will become the next current version when rotation - // finishes. - // - // During rotation, Secrets Manager creates an AWSPENDING version ID before - // creating the new secret version. To check if a secret version exists, call GetSecretValue. - // - // - AWSPREVIOUS , which indicates the previous current version of the secret. - // You can use this as the last known good version. - // - // For more information about rotation and staging labels, see [How rotation works]. - // - // [How rotation works]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_how.html - VersionIdsToStages map[string][]string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDescribeSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetRandomPassword.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetRandomPassword.go deleted file mode 100644 index ce7cd4bb93..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetRandomPassword.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Generates a random password. We recommend that you specify the maximum length -// and include every character type that the system you are generating a password -// for can support. By default, Secrets Manager uses uppercase and lowercase -// letters, numbers, and the following characters in passwords: -// !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~ -// -// Secrets Manager generates a CloudTrail log entry when you call this action. -// -// Required permissions: secretsmanager:GetRandomPassword . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) GetRandomPassword(ctx context.Context, params *GetRandomPasswordInput, optFns ...func(*Options)) (*GetRandomPasswordOutput, error) { - if params == nil { - params = &GetRandomPasswordInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetRandomPassword", params, optFns, c.addOperationGetRandomPasswordMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetRandomPasswordOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetRandomPasswordInput struct { - - // A string of the characters that you don't want in the password. - ExcludeCharacters *string - - // Specifies whether to exclude lowercase letters from the password. If you don't - // include this switch, the password can contain lowercase letters. - ExcludeLowercase *bool - - // Specifies whether to exclude numbers from the password. If you don't include - // this switch, the password can contain numbers. - ExcludeNumbers *bool - - // Specifies whether to exclude the following punctuation characters from the - // password: ! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~ . If - // you don't include this switch, the password can contain punctuation. - ExcludePunctuation *bool - - // Specifies whether to exclude uppercase letters from the password. If you don't - // include this switch, the password can contain uppercase letters. - ExcludeUppercase *bool - - // Specifies whether to include the space character. If you include this switch, - // the password can contain space characters. - IncludeSpace *bool - - // The length of the password. If you don't include this parameter, the default - // length is 32 characters. - PasswordLength *int64 - - // Specifies whether to include at least one upper and lowercase letter, one - // number, and one punctuation. If you don't include this switch, the password - // contains at least one of every character type. - RequireEachIncludedType *bool - - noSmithyDocumentSerde -} - -type GetRandomPasswordOutput struct { - - // A string with the password. - RandomPassword *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetRandomPasswordMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetRandomPassword{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetRandomPassword{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetRandomPassword"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRandomPassword(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetRandomPassword(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetRandomPassword", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go deleted file mode 100644 index ecb563386c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetResourcePolicy.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the JSON text of the resource-based policy document attached to the -// secret. For more information about permissions policies attached to a secret, -// see [Permissions policies attached to a secret]. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:GetResourcePolicy . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Permissions policies attached to a secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-policies.html -func (c *Client) GetResourcePolicy(ctx context.Context, params *GetResourcePolicyInput, optFns ...func(*Options)) (*GetResourcePolicyOutput, error) { - if params == nil { - params = &GetResourcePolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetResourcePolicy", params, optFns, c.addOperationGetResourcePolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetResourcePolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetResourcePolicyInput struct { - - // The ARN or name of the secret to retrieve the attached resource-based policy - // for. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type GetResourcePolicyOutput struct { - - // The ARN of the secret that the resource-based policy was retrieved for. - ARN *string - - // The name of the secret that the resource-based policy was retrieved for. - Name *string - - // A JSON-formatted string that contains the permissions policy attached to the - // secret. For more information about permissions policies, see [Authentication and access control for Secrets Manager]. - // - // [Authentication and access control for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html - ResourcePolicy *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetResourcePolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetResourcePolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetResourcePolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetResourcePolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetResourcePolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetResourcePolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetSecretValue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetSecretValue.go deleted file mode 100644 index 2ddeedc589..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_GetSecretValue.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Retrieves the contents of the encrypted fields SecretString or SecretBinary -// from the specified version of a secret, whichever contains content. -// -// To retrieve the values for a group of secrets, call BatchGetSecretValue. -// -// We recommend that you cache your secret values by using client-side caching. -// Caching secrets improves speed and reduces your costs. For more information, see -// [Cache secrets for your applications]. -// -// To retrieve the previous version of a secret, use VersionStage and specify -// AWSPREVIOUS. To revert to the previous version of a secret, call [UpdateSecretVersionStage]. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:GetSecretValue . If the secret is encrypted -// using a customer-managed key instead of the Amazon Web Services managed key -// aws/secretsmanager , then you also need kms:Decrypt permissions for that key. -// For more information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [UpdateSecretVersionStage]: https://docs.aws.amazon.com/cli/latest/reference/secretsmanager/update-secret-version-stage.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Cache secrets for your applications]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieving-secrets.html -func (c *Client) GetSecretValue(ctx context.Context, params *GetSecretValueInput, optFns ...func(*Options)) (*GetSecretValueOutput, error) { - if params == nil { - params = &GetSecretValueInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSecretValue", params, optFns, c.addOperationGetSecretValueMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSecretValueOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSecretValueInput struct { - - // The ARN or name of the secret to retrieve. To retrieve a secret from another - // account, you must use an ARN. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // The unique identifier of the version of the secret to retrieve. If you include - // both this parameter and VersionStage , the two parameters must refer to the same - // secret version. If you don't specify either a VersionStage or VersionId , then - // Secrets Manager returns the AWSCURRENT version. - // - // This value is typically a [UUID-type] value with 32 hexadecimal digits. - // - // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier - VersionId *string - - // The staging label of the version of the secret to retrieve. - // - // Secrets Manager uses staging labels to keep track of different versions during - // the rotation process. If you include both this parameter and VersionId , the two - // parameters must refer to the same secret version. If you don't specify either a - // VersionStage or VersionId , Secrets Manager returns the AWSCURRENT version. - VersionStage *string - - noSmithyDocumentSerde -} - -type GetSecretValueOutput struct { - - // The ARN of the secret. - ARN *string - - // The date and time that this version of the secret was created. If you don't - // specify which version in VersionId or VersionStage , then Secrets Manager uses - // the AWSCURRENT version. - CreatedDate *time.Time - - // The friendly name of the secret. - Name *string - - // The decrypted secret value, if the secret value was originally provided as - // binary data in the form of a byte array. When you retrieve a SecretBinary using - // the HTTP API, the Python SDK, or the Amazon Web Services CLI, the value is - // Base64-encoded. Otherwise, it is not encoded. - // - // If the secret was created by using the Secrets Manager console, or if the - // secret value was originally provided as a string, then this field is omitted. - // The secret value appears in SecretString instead. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretBinary []byte - - // The decrypted secret value, if the secret value was originally provided as a - // string or through the Secrets Manager console. - // - // If this secret was created by using the console, then Secrets Manager stores - // the information as a JSON structure of key/value pairs. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretString *string - - // The unique identifier of this version of the secret. - VersionId *string - - // A list of all of the staging labels currently attached to this version of the - // secret. - VersionStages []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSecretValueMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetSecretValue{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetSecretValue{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSecretValue"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetSecretValueValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSecretValue(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSecretValue(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSecretValue", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go deleted file mode 100644 index b77947e392..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecretVersionIds.go +++ /dev/null @@ -1,338 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the versions of a secret. Secrets Manager uses staging labels to indicate -// the different versions of a secret. For more information, see [Secrets Manager concepts: Versions]. -// -// To list the secrets in the account, use ListSecrets. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:ListSecretVersionIds . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Secrets Manager concepts: Versions]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) ListSecretVersionIds(ctx context.Context, params *ListSecretVersionIdsInput, optFns ...func(*Options)) (*ListSecretVersionIdsOutput, error) { - if params == nil { - params = &ListSecretVersionIdsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListSecretVersionIds", params, optFns, c.addOperationListSecretVersionIdsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListSecretVersionIdsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListSecretVersionIdsInput struct { - - // The ARN or name of the secret whose versions you want to list. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // Specifies whether to include versions of secrets that don't have any staging - // labels attached to them. Versions without staging labels are considered - // deprecated and are subject to deletion by Secrets Manager. By default, versions - // without staging labels aren't included. - IncludeDeprecated *bool - - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call ListSecretVersionIds again with the - // value from NextToken . - MaxResults *int32 - - // A token that indicates where the output should continue from, if a previous - // call did not show all results. To get the next results, call - // ListSecretVersionIds again with this value. - NextToken *string - - noSmithyDocumentSerde -} - -type ListSecretVersionIdsOutput struct { - - // The ARN of the secret. - ARN *string - - // The name of the secret. - Name *string - - // Secrets Manager includes this value if there's more output available than what - // is included in the current response. This can occur even when the response - // includes no values at all, such as when you ask for a filtered view of a long - // list. To get the next results, call ListSecretVersionIds again with this value. - NextToken *string - - // A list of the versions of the secret. - Versions []types.SecretVersionsListEntry - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListSecretVersionIdsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSecretVersionIds{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSecretVersionIds{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListSecretVersionIds"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListSecretVersionIdsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecretVersionIds(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListSecretVersionIdsPaginatorOptions is the paginator options for -// ListSecretVersionIds -type ListSecretVersionIdsPaginatorOptions struct { - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call ListSecretVersionIds again with the - // value from NextToken . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListSecretVersionIdsPaginator is a paginator for ListSecretVersionIds -type ListSecretVersionIdsPaginator struct { - options ListSecretVersionIdsPaginatorOptions - client ListSecretVersionIdsAPIClient - params *ListSecretVersionIdsInput - nextToken *string - firstPage bool -} - -// NewListSecretVersionIdsPaginator returns a new ListSecretVersionIdsPaginator -func NewListSecretVersionIdsPaginator(client ListSecretVersionIdsAPIClient, params *ListSecretVersionIdsInput, optFns ...func(*ListSecretVersionIdsPaginatorOptions)) *ListSecretVersionIdsPaginator { - if params == nil { - params = &ListSecretVersionIdsInput{} - } - - options := ListSecretVersionIdsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListSecretVersionIdsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListSecretVersionIdsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListSecretVersionIds page. -func (p *ListSecretVersionIdsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSecretVersionIdsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListSecretVersionIds(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListSecretVersionIdsAPIClient is a client that implements the -// ListSecretVersionIds operation. -type ListSecretVersionIdsAPIClient interface { - ListSecretVersionIds(context.Context, *ListSecretVersionIdsInput, ...func(*Options)) (*ListSecretVersionIdsOutput, error) -} - -var _ ListSecretVersionIdsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListSecretVersionIds(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListSecretVersionIds", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecrets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecrets.go deleted file mode 100644 index b4157c06a8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ListSecrets.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the secrets that are stored by Secrets Manager in the Amazon Web Services -// account, not including secrets that are marked for deletion. To see secrets -// marked for deletion, use the Secrets Manager console. -// -// All Secrets Manager operations are eventually consistent. ListSecrets might not -// reflect changes from the last five minutes. You can get more recent information -// for a specific secret by calling DescribeSecret. -// -// To list the versions of a secret, use ListSecretVersionIds. -// -// To retrieve the values for the secrets, call BatchGetSecretValue or GetSecretValue. -// -// For information about finding secrets in the console, see [Find secrets in Secrets Manager]. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:ListSecrets . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Find secrets in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html -func (c *Client) ListSecrets(ctx context.Context, params *ListSecretsInput, optFns ...func(*Options)) (*ListSecretsOutput, error) { - if params == nil { - params = &ListSecretsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListSecrets", params, optFns, c.addOperationListSecretsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListSecretsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListSecretsInput struct { - - // The filters to apply to the list of secrets. - Filters []types.Filter - - // Specifies whether to include secrets scheduled for deletion. By default, - // secrets scheduled for deletion aren't included. - IncludePlannedDeletion *bool - - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call ListSecrets again with the value from - // NextToken . - MaxResults *int32 - - // A token that indicates where the output should continue from, if a previous - // call did not show all results. To get the next results, call ListSecrets again - // with this value. - NextToken *string - - // Secrets are listed by CreatedDate . - SortOrder types.SortOrderType - - noSmithyDocumentSerde -} - -type ListSecretsOutput struct { - - // Secrets Manager includes this value if there's more output available than what - // is included in the current response. This can occur even when the response - // includes no values at all, such as when you ask for a filtered view of a long - // list. To get the next results, call ListSecrets again with this value. - NextToken *string - - // A list of the secrets in the account. - SecretList []types.SecretListEntry - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListSecretsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListSecrets{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListSecrets{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListSecrets"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSecrets(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListSecretsPaginatorOptions is the paginator options for ListSecrets -type ListSecretsPaginatorOptions struct { - // The number of results to include in the response. - // - // If there are more results available, in the response, Secrets Manager includes - // NextToken . To get the next results, call ListSecrets again with the value from - // NextToken . - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListSecretsPaginator is a paginator for ListSecrets -type ListSecretsPaginator struct { - options ListSecretsPaginatorOptions - client ListSecretsAPIClient - params *ListSecretsInput - nextToken *string - firstPage bool -} - -// NewListSecretsPaginator returns a new ListSecretsPaginator -func NewListSecretsPaginator(client ListSecretsAPIClient, params *ListSecretsInput, optFns ...func(*ListSecretsPaginatorOptions)) *ListSecretsPaginator { - if params == nil { - params = &ListSecretsInput{} - } - - options := ListSecretsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListSecretsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListSecretsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListSecrets page. -func (p *ListSecretsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSecretsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListSecrets(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListSecretsAPIClient is a client that implements the ListSecrets operation. -type ListSecretsAPIClient interface { - ListSecrets(context.Context, *ListSecretsInput, ...func(*Options)) (*ListSecretsOutput, error) -} - -var _ ListSecretsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListSecrets(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListSecrets", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go deleted file mode 100644 index 2ee4981608..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutResourcePolicy.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches a resource-based permission policy to a secret. A resource-based -// policy is optional. For more information, see [Authentication and access control for Secrets Manager] -// -// For information about attaching a policy in the console, see [Attach a permissions policy to a secret]. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:PutResourcePolicy . For more information, -// see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Attach a permissions policy to a secret]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_resource-based-policies.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Authentication and access control for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -func (c *Client) PutResourcePolicy(ctx context.Context, params *PutResourcePolicyInput, optFns ...func(*Options)) (*PutResourcePolicyOutput, error) { - if params == nil { - params = &PutResourcePolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutResourcePolicy", params, optFns, c.addOperationPutResourcePolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutResourcePolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutResourcePolicyInput struct { - - // A JSON-formatted string for an Amazon Web Services resource-based policy. For - // example policies, see [Permissions policy examples]. - // - // [Permissions policy examples]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html - // - // This member is required. - ResourcePolicy *string - - // The ARN or name of the secret to attach the resource-based policy. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // Specifies whether to block resource-based policies that allow broad access to - // the secret, for example those that use a wildcard for the principal. By default, - // public policies aren't blocked. - // - // Resource policy validation and the BlockPublicPolicy parameter help protect - // your resources by preventing public access from being granted through the - // resource policies that are directly attached to your secrets. In addition to - // using these features, carefully inspect the following policies to confirm that - // they do not grant public access: - // - // - Identity-based policies attached to associated Amazon Web Services - // principals (for example, IAM roles) - // - // - Resource-based policies attached to associated Amazon Web Services - // resources (for example, Key Management Service (KMS) keys) - // - // To review permissions to your secrets, see [Determine who has permissions to your secrets]. - // - // [Determine who has permissions to your secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/determine-acccess_examine-iam-policies.html - BlockPublicPolicy *bool - - noSmithyDocumentSerde -} - -type PutResourcePolicyOutput struct { - - // The ARN of the secret. - ARN *string - - // The name of the secret. - Name *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutResourcePolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutResourcePolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutResourcePolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpPutResourcePolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutResourcePolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutResourcePolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutSecretValue.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutSecretValue.go deleted file mode 100644 index b36f2b7c36..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_PutSecretValue.go +++ /dev/null @@ -1,369 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new version with a new encrypted secret value and attaches it to the -// secret. The version can contain a new SecretString value or a new SecretBinary -// value. -// -// We recommend you avoid calling PutSecretValue at a sustained rate of more than -// once every 10 minutes. When you update the secret value, Secrets Manager creates -// a new version of the secret. Secrets Manager removes outdated versions when -// there are more than 100, but it does not remove versions created less than 24 -// hours ago. If you call PutSecretValue more than once every 10 minutes, you -// create more versions than Secrets Manager removes, and you will reach the quota -// for secret versions. -// -// You can specify the staging labels to attach to the new version in VersionStages -// . If you don't include VersionStages , then Secrets Manager automatically moves -// the staging label AWSCURRENT to this version. If this operation creates the -// first version for the secret, then Secrets Manager automatically attaches the -// staging label AWSCURRENT to it. If this operation moves the staging label -// AWSCURRENT from another version to this version, then Secrets Manager also -// automatically moves the staging label AWSPREVIOUS to the version that AWSCURRENT -// was removed from. -// -// This operation is idempotent. If you call this operation with a -// ClientRequestToken that matches an existing version's VersionId, and you specify -// the same secret data, the operation succeeds but does nothing. However, if the -// secret data is different, then the operation fails because you can't modify an -// existing version; you can only create new ones. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters except SecretBinary , -// SecretString , or RotationToken because it might be logged. For more -// information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:PutSecretValue . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// When you enter commands in a command shell, there is a risk of the command -// history being accessed or utilities having access to your command parameters. -// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) PutSecretValue(ctx context.Context, params *PutSecretValueInput, optFns ...func(*Options)) (*PutSecretValueOutput, error) { - if params == nil { - params = &PutSecretValueInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutSecretValue", params, optFns, c.addOperationPutSecretValueMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutSecretValueOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutSecretValueInput struct { - - // The ARN or name of the secret to add a new version to. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // If the secret doesn't already exist, use CreateSecret instead. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // A unique identifier for the new version of the secret. - // - // If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs - // to call this operation, then you can leave this parameter empty. The CLI or SDK - // generates a random UUID for you and includes it as the value for this parameter - // in the request. - // - // If you generate a raw HTTP request to the Secrets Manager service endpoint, - // then you must generate a ClientRequestToken and include it in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during a rotation. We recommend that you generate a [UUID-type]value to ensure uniqueness - // of your versions within the specified secret. - // - // - If the ClientRequestToken value isn't already associated with a version of - // the secret then a new version of the secret is created. - // - // - If a version with this value already exists and that version's SecretString - // or SecretBinary values are the same as those in the request then the request - // is ignored. The operation is idempotent. - // - // - If a version with this value already exists and the version of the - // SecretString and SecretBinary values are different from those in the request, - // then the request fails because you can't modify a secret version. You can only - // create new versions to store new secret values. - // - // This value becomes the VersionId of the new version. - // - // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier - ClientRequestToken *string - - // A unique identifier that indicates the source of the request. For cross-account - // rotation (when you rotate a secret in one account by using a Lambda rotation - // function in another account) and the Lambda rotation function assumes an IAM - // role to call Secrets Manager, Secrets Manager validates the identity with the - // rotation token. For more information, see [How rotation works]. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - // - // [How rotation works]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html - RotationToken *string - - // The binary data to encrypt and store in the new version of the secret. To use - // this parameter in the command-line tools, we recommend that you store your - // binary data in a file and then pass the contents of the file as a parameter. - // - // You must include SecretBinary or SecretString , but not both. - // - // You can't access this value from the Secrets Manager console. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretBinary []byte - - // The text to encrypt and store in the new version of the secret. - // - // You must include SecretBinary or SecretString , but not both. - // - // We recommend you create the secret string as JSON key/value pairs, as shown in - // the example. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretString *string - - // A list of staging labels to attach to this version of the secret. Secrets - // Manager uses staging labels to track versions of a secret through the rotation - // process. - // - // If you specify a staging label that's already associated with a different - // version of the same secret, then Secrets Manager removes the label from the - // other version and attaches it to this version. If you specify AWSCURRENT , and - // it is already attached to another version, then Secrets Manager also moves the - // staging label AWSPREVIOUS to the version that AWSCURRENT was removed from. - // - // If you don't include VersionStages , then Secrets Manager automatically moves - // the staging label AWSCURRENT to this version. - VersionStages []string - - noSmithyDocumentSerde -} - -type PutSecretValueOutput struct { - - // The ARN of the secret. - ARN *string - - // The name of the secret. - Name *string - - // The unique identifier of the version of the secret. - VersionId *string - - // The list of staging labels that are currently attached to this version of the - // secret. Secrets Manager uses staging labels to track a version as it progresses - // through the secret rotation process. - VersionStages []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutSecretValueMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpPutSecretValue{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpPutSecretValue{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutSecretValue"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opPutSecretValueMiddleware(stack, options); err != nil { - return err - } - if err = addOpPutSecretValueValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutSecretValue(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpPutSecretValue struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpPutSecretValue) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpPutSecretValue) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*PutSecretValueInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *PutSecretValueInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opPutSecretValueMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpPutSecretValue{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opPutSecretValue(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutSecretValue", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RemoveRegionsFromReplication.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RemoveRegionsFromReplication.go deleted file mode 100644 index 8b30e7902c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RemoveRegionsFromReplication.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// For a secret that is replicated to other Regions, deletes the secret replicas -// from the Regions you specify. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:RemoveRegionsFromReplication . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) RemoveRegionsFromReplication(ctx context.Context, params *RemoveRegionsFromReplicationInput, optFns ...func(*Options)) (*RemoveRegionsFromReplicationOutput, error) { - if params == nil { - params = &RemoveRegionsFromReplicationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RemoveRegionsFromReplication", params, optFns, c.addOperationRemoveRegionsFromReplicationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RemoveRegionsFromReplicationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RemoveRegionsFromReplicationInput struct { - - // The Regions of the replicas to remove. - // - // This member is required. - RemoveReplicaRegions []string - - // The ARN or name of the secret. - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type RemoveRegionsFromReplicationOutput struct { - - // The ARN of the primary secret. - ARN *string - - // The status of replicas for this secret after you remove Regions. - ReplicationStatus []types.ReplicationStatusType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRemoveRegionsFromReplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpRemoveRegionsFromReplication{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRemoveRegionsFromReplication{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RemoveRegionsFromReplication"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpRemoveRegionsFromReplicationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveRegionsFromReplication(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRemoveRegionsFromReplication(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RemoveRegionsFromReplication", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ReplicateSecretToRegions.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ReplicateSecretToRegions.go deleted file mode 100644 index 1f8587856c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ReplicateSecretToRegions.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Replicates the secret to a new Regions. See [Multi-Region secrets]. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:ReplicateSecretToRegions . If the primary -// secret is encrypted with a KMS key other than aws/secretsmanager , you also need -// kms:Decrypt permission to the key. To encrypt the replicated secret with a KMS -// key other than aws/secretsmanager , you need kms:GenerateDataKey and kms:Encrypt -// to the key. For more information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Multi-Region secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/create-manage-multi-region-secrets.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) ReplicateSecretToRegions(ctx context.Context, params *ReplicateSecretToRegionsInput, optFns ...func(*Options)) (*ReplicateSecretToRegionsOutput, error) { - if params == nil { - params = &ReplicateSecretToRegionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ReplicateSecretToRegions", params, optFns, c.addOperationReplicateSecretToRegionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ReplicateSecretToRegionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ReplicateSecretToRegionsInput struct { - - // A list of Regions in which to replicate the secret. - // - // This member is required. - AddReplicaRegions []types.ReplicaRegionType - - // The ARN or name of the secret to replicate. - // - // This member is required. - SecretId *string - - // Specifies whether to overwrite a secret with the same name in the destination - // Region. By default, secrets aren't overwritten. - ForceOverwriteReplicaSecret bool - - noSmithyDocumentSerde -} - -type ReplicateSecretToRegionsOutput struct { - - // The ARN of the primary secret. - ARN *string - - // The status of replication. - ReplicationStatus []types.ReplicationStatusType - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationReplicateSecretToRegionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpReplicateSecretToRegions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpReplicateSecretToRegions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ReplicateSecretToRegions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpReplicateSecretToRegionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opReplicateSecretToRegions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opReplicateSecretToRegions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ReplicateSecretToRegions", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RestoreSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RestoreSecret.go deleted file mode 100644 index 07cede8289..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RestoreSecret.go +++ /dev/null @@ -1,209 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Cancels the scheduled deletion of a secret by removing the DeletedDate time -// stamp. You can access a secret again after it has been restored. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:RestoreSecret . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) RestoreSecret(ctx context.Context, params *RestoreSecretInput, optFns ...func(*Options)) (*RestoreSecretOutput, error) { - if params == nil { - params = &RestoreSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RestoreSecret", params, optFns, c.addOperationRestoreSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RestoreSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RestoreSecretInput struct { - - // The ARN or name of the secret to restore. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type RestoreSecretOutput struct { - - // The ARN of the secret that was restored. - ARN *string - - // The name of the secret that was restored. - Name *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRestoreSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpRestoreSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRestoreSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RestoreSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpRestoreSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRestoreSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRestoreSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RestoreSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RotateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RotateSecret.go deleted file mode 100644 index f2f4d5bcc4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_RotateSecret.go +++ /dev/null @@ -1,311 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Configures and starts the asynchronous process of rotating the secret. For -// information about rotation, see [Rotate secrets]in the Secrets Manager User Guide. If you -// include the configuration parameters, the operation sets the values for the -// secret and then immediately starts a rotation. If you don't include the -// configuration parameters, the operation starts a rotation with the values -// already stored in the secret. -// -// When rotation is successful, the AWSPENDING staging label might be attached to -// the same version as the AWSCURRENT version, or it might not be attached to any -// version. If the AWSPENDING staging label is present but not attached to the -// same version as AWSCURRENT , then any later invocation of RotateSecret assumes -// that a previous rotation request is still in progress and returns an error. When -// rotation is unsuccessful, the AWSPENDING staging label might be attached to an -// empty secret version. For more information, see [Troubleshoot rotation]in the Secrets Manager User -// Guide. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:RotateSecret . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. You also need lambda:InvokeFunction permissions on the rotation function. -// For more information, see [Permissions for rotation]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Permissions for rotation]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets-required-permissions-function.html -// [Rotate secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotating-secrets.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Troubleshoot rotation]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot_rotation.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) RotateSecret(ctx context.Context, params *RotateSecretInput, optFns ...func(*Options)) (*RotateSecretOutput, error) { - if params == nil { - params = &RotateSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RotateSecret", params, optFns, c.addOperationRotateSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RotateSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RotateSecretInput struct { - - // The ARN or name of the secret to rotate. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // A unique identifier for the new version of the secret. You only need to specify - // this value if you implement your own retry logic and you want to ensure that - // Secrets Manager doesn't attempt to create a secret version twice. - // - // If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs - // to call this operation, then you can leave this parameter empty. The CLI or SDK - // generates a random UUID for you and includes it as the value for this parameter - // in the request. - // - // If you generate a raw HTTP request to the Secrets Manager service endpoint, - // then you must generate a ClientRequestToken and include it in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during a rotation. We recommend that you generate a [UUID-type]value to ensure uniqueness - // of your versions within the specified secret. - // - // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier - ClientRequestToken *string - - // Specifies whether to rotate the secret immediately or wait until the next - // scheduled rotation window. The rotation schedule is defined in RotateSecretRequest$RotationRules. - // - // For secrets that use a Lambda rotation function to rotate, if you don't - // immediately rotate the secret, Secrets Manager tests the rotation configuration - // by running the [testSecret step]testSecret of the Lambda rotation function. The test creates an - // AWSPENDING version of the secret and then removes it. - // - // By default, Secrets Manager rotates the secret immediately. - // - // [testSecret step]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_lambda-functions.html#rotate-secrets_lambda-functions-code - RotateImmediately *bool - - // For secrets that use a Lambda rotation function to rotate, the ARN of the - // Lambda rotation function. - // - // For secrets that use managed rotation, omit this field. For more information, - // see [Managed rotation]in the Secrets Manager User Guide. - // - // [Managed rotation]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_managed.html - RotationLambdaARN *string - - // A structure that defines the rotation configuration for this secret. - RotationRules *types.RotationRulesType - - noSmithyDocumentSerde -} - -type RotateSecretOutput struct { - - // The ARN of the secret. - ARN *string - - // The name of the secret. - Name *string - - // The ID of the new version of the secret. - VersionId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRotateSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpRotateSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpRotateSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RotateSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opRotateSecretMiddleware(stack, options); err != nil { - return err - } - if err = addOpRotateSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRotateSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpRotateSecret struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpRotateSecret) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpRotateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*RotateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *RotateSecretInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opRotateSecretMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpRotateSecret{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opRotateSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RotateSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go deleted file mode 100644 index aa89ac1d85..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_StopReplicationToReplica.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes the link between the replica secret and the primary secret and promotes -// the replica to a primary secret in the replica Region. -// -// You must call this operation from the Region in which you want to promote the -// replica to a primary secret. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:StopReplicationToReplica . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) StopReplicationToReplica(ctx context.Context, params *StopReplicationToReplicaInput, optFns ...func(*Options)) (*StopReplicationToReplicaOutput, error) { - if params == nil { - params = &StopReplicationToReplicaInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StopReplicationToReplica", params, optFns, c.addOperationStopReplicationToReplicaMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StopReplicationToReplicaOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StopReplicationToReplicaInput struct { - - // The ARN of the primary secret. - // - // This member is required. - SecretId *string - - noSmithyDocumentSerde -} - -type StopReplicationToReplicaOutput struct { - - // The ARN of the promoted secret. The ARN is the same as the original primary - // secret except the Region is changed. - ARN *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStopReplicationToReplicaMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpStopReplicationToReplica{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpStopReplicationToReplica{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StopReplicationToReplica"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpStopReplicationToReplicaValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopReplicationToReplica(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStopReplicationToReplica(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StopReplicationToReplica", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_TagResource.go deleted file mode 100644 index e6f52f4a2c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_TagResource.go +++ /dev/null @@ -1,226 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Attaches tags to a secret. Tags consist of a key name and a value. Tags are -// part of the secret's metadata. They are not associated with specific versions of -// the secret. This operation appends tags to the existing list of tags. -// -// For tag quotas and naming restrictions, see [Service quotas for Tagging] in the Amazon Web Services General -// Reference guide. -// -// If you use tags as part of your security strategy, then adding or removing a -// tag can change permissions. If successfully completing this operation would -// result in you losing your permissions for this secret, then the operation is -// blocked and returns an Access Denied error. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:TagResource . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Service quotas for Tagging]: https://docs.aws.amazon.com/general/latest/gr/arg.html#taged-reference-quotas -func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { - if params == nil { - params = &TagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagResourceInput struct { - - // The identifier for the secret to attach tags to. You can specify either the - // Amazon Resource Name (ARN) or the friendly name of the secret. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // The tags to attach to the secret as a JSON text string argument. Each element - // in the list consists of a Key and a Value . - // - // For storing multiple values, we recommend that you use a JSON text string - // argument and specify key/value pairs. For more information, see [Specifying parameter values for the Amazon Web Services CLI]in the Amazon - // Web Services CLI User Guide. - // - // [Specifying parameter values for the Amazon Web Services CLI]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html - // - // This member is required. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type TagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpTagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagResource", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UntagResource.go deleted file mode 100644 index 2dc6ed9339..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UntagResource.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes specific tags from a secret. -// -// This operation is idempotent. If a requested tag is not attached to the secret, -// no error is returned and the secret metadata is unchanged. -// -// If you use tags as part of your security strategy, then removing a tag can -// change permissions. If successfully completing this operation would result in -// you losing your permissions for this secret, then the operation is blocked and -// returns an Access Denied error. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:UntagResource . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { - if params == nil { - params = &UntagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagResourceInput struct { - - // The ARN or name of the secret. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // A list of tag key names to remove from the secret. You don't specify the value. - // Both the key and its associated value are removed. - // - // This parameter requires a JSON text string argument. - // - // For storing multiple values, we recommend that you use a JSON text string - // argument and specify key/value pairs. For more information, see [Specifying parameter values for the Amazon Web Services CLI]in the Amazon - // Web Services CLI User Guide. - // - // [Specifying parameter values for the Amazon Web Services CLI]: https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-parameters.html - // - // This member is required. - TagKeys []string - - noSmithyDocumentSerde -} - -type UntagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUntagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagResource", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecret.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecret.go deleted file mode 100644 index 4037471441..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecret.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the details of a secret, including metadata and the secret value. To -// change the secret value, you can also use PutSecretValue. -// -// To change the rotation configuration of a secret, use RotateSecret instead. -// -// To change a secret so that it is managed by another service, you need to -// recreate the secret in that service. See [Secrets Manager secrets managed by other Amazon Web Services services]. -// -// We recommend you avoid calling UpdateSecret at a sustained rate of more than -// once every 10 minutes. When you call UpdateSecret to update the secret value, -// Secrets Manager creates a new version of the secret. Secrets Manager removes -// outdated versions when there are more than 100, but it does not remove versions -// created less than 24 hours ago. If you update the secret value more than once -// every 10 minutes, you create more versions than Secrets Manager removes, and you -// will reach the quota for secret versions. -// -// If you include SecretString or SecretBinary to create a new secret version, -// Secrets Manager automatically moves the staging label AWSCURRENT to the new -// version. Then it attaches the label AWSPREVIOUS to the version that AWSCURRENT -// was removed from. -// -// If you call this operation with a ClientRequestToken that matches an existing -// version's VersionId , the operation results in an error. You can't modify an -// existing version, you can only create a new version. To remove a version, remove -// all staging labels from it. See UpdateSecretVersionStage. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters except SecretBinary or -// SecretString because it might be logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:UpdateSecret . For more information, see [IAM policy actions for Secrets Manager] -// and [Authentication and access control in Secrets Manager]. If you use a customer managed key, you must also have kms:GenerateDataKey -// , kms:Encrypt , and kms:Decrypt permissions on the key. If you change the KMS -// key and you don't have kms:Encrypt permission to the new key, Secrets Manager -// does not re-encrypt existing secret versions with the new key. For more -// information, see [Secret encryption and decryption]. -// -// When you enter commands in a command shell, there is a risk of the command -// history being accessed or utilities having access to your command parameters. -// This is a concern if the command includes the value of a secret. Learn how to [Mitigate the risks of using command-line tools to store Secrets Manager secrets]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Secret encryption and decryption]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security-encryption.html -// [Secrets Manager secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html -// [Mitigate the risks of using command-line tools to store Secrets Manager secrets]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/security_cli-exposure-risks.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) UpdateSecret(ctx context.Context, params *UpdateSecretInput, optFns ...func(*Options)) (*UpdateSecretOutput, error) { - if params == nil { - params = &UpdateSecretInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSecret", params, optFns, c.addOperationUpdateSecretMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSecretOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSecretInput struct { - - // The ARN or name of the secret. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // If you include SecretString or SecretBinary , then Secrets Manager creates a new - // version for the secret, and this parameter specifies the unique identifier for - // the new version. - // - // If you use the Amazon Web Services CLI or one of the Amazon Web Services SDKs - // to call this operation, then you can leave this parameter empty. The CLI or SDK - // generates a random UUID for you and includes it as the value for this parameter - // in the request. - // - // If you generate a raw HTTP request to the Secrets Manager service endpoint, - // then you must generate a ClientRequestToken and include it in the request. - // - // This value helps ensure idempotency. Secrets Manager uses this value to prevent - // the accidental creation of duplicate versions if there are failures and retries - // during a rotation. We recommend that you generate a [UUID-type]value to ensure uniqueness - // of your versions within the specified secret. - // - // [UUID-type]: https://wikipedia.org/wiki/Universally_unique_identifier - ClientRequestToken *string - - // The description of the secret. - Description *string - - // The ARN, key ID, or alias of the KMS key that Secrets Manager uses to encrypt - // new secret versions as well as any existing versions with the staging labels - // AWSCURRENT , AWSPENDING , or AWSPREVIOUS . If you don't have kms:Encrypt - // permission to the new key, Secrets Manager does not re-encrypt existing secret - // versions with the new key. For more information about versions and staging - // labels, see [Concepts: Version]. - // - // A key alias is always prefixed by alias/ , for example alias/aws/secretsmanager - // . For more information, see [About aliases]. - // - // If you set this to an empty string, Secrets Manager uses the Amazon Web - // Services managed key aws/secretsmanager . If this key doesn't already exist in - // your account, then Secrets Manager creates it for you automatically. All users - // and roles in the Amazon Web Services account automatically have access to use - // aws/secretsmanager . Creating aws/secretsmanager can result in a one-time - // significant delay in returning the result. - // - // You can only use the Amazon Web Services managed key aws/secretsmanager if you - // call this operation using credentials from the same Amazon Web Services account - // that owns the secret. If the secret is in a different account, then you must use - // a customer managed key and provide the ARN of that KMS key in this field. The - // user making the call must have permissions to both the secret and the KMS key in - // their respective accounts. - // - // [Concepts: Version]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version - // [About aliases]: https://docs.aws.amazon.com/kms/latest/developerguide/alias-about.html - KmsKeyId *string - - // The binary data to encrypt and store in the new version of the secret. We - // recommend that you store your binary data in a file and then pass the contents - // of the file as a parameter. - // - // Either SecretBinary or SecretString must have a value, but not both. - // - // You can't access this parameter in the Secrets Manager console. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretBinary []byte - - // The text data to encrypt and store in the new version of the secret. We - // recommend you use a JSON structure of key/value pairs for your secret value. - // - // Either SecretBinary or SecretString must have a value, but not both. - // - // Sensitive: This field contains sensitive information, so the service does not - // include it in CloudTrail log entries. If you create your own log entries, you - // must also avoid logging the information in this field. - SecretString *string - - noSmithyDocumentSerde -} - -type UpdateSecretOutput struct { - - // The ARN of the secret that was updated. - ARN *string - - // The name of the secret that was updated. - Name *string - - // If Secrets Manager created a new version of the secret during this operation, - // then VersionId contains the unique identifier of the new version. - VersionId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSecretMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateSecret{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateSecret{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSecret"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opUpdateSecretMiddleware(stack, options); err != nil { - return err - } - if err = addOpUpdateSecretValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecret(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpUpdateSecret struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpUpdateSecret) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpUpdateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*UpdateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateSecretInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opUpdateSecretMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateSecret{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opUpdateSecret(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSecret", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecretVersionStage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecretVersionStage.go deleted file mode 100644 index c0fc5871b6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_UpdateSecretVersionStage.go +++ /dev/null @@ -1,247 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Modifies the staging labels attached to a version of a secret. Secrets Manager -// uses staging labels to track a version as it progresses through the secret -// rotation process. Each staging label can be attached to only one version at a -// time. To add a staging label to a version when it is already attached to another -// version, Secrets Manager first removes it from the other version first and then -// attaches it to this one. For more information about versions and staging labels, -// see [Concepts: Version]. -// -// The staging labels that you specify in the VersionStage parameter are added to -// the existing list of staging labels for the version. -// -// You can move the AWSCURRENT staging label to this version by including it in -// this call. -// -// Whenever you move AWSCURRENT , Secrets Manager automatically moves the label -// AWSPREVIOUS to the version that AWSCURRENT was removed from. -// -// If this action results in the last label being removed from a version, then the -// version is considered to be 'deprecated' and can be deleted by Secrets Manager. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:UpdateSecretVersionStage . For more -// information, see [IAM policy actions for Secrets Manager]and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [Concepts: Version]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/getting-started.html#term_version -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -func (c *Client) UpdateSecretVersionStage(ctx context.Context, params *UpdateSecretVersionStageInput, optFns ...func(*Options)) (*UpdateSecretVersionStageOutput, error) { - if params == nil { - params = &UpdateSecretVersionStageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSecretVersionStage", params, optFns, c.addOperationUpdateSecretVersionStageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSecretVersionStageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSecretVersionStageInput struct { - - // The ARN or the name of the secret with the version and staging labelsto modify. - // - // For an ARN, we recommend that you specify a complete ARN rather than a partial - // ARN. See [Finding a secret from a partial ARN]. - // - // [Finding a secret from a partial ARN]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/troubleshoot.html#ARN_secretnamehyphen - // - // This member is required. - SecretId *string - - // The staging label to add to this version. - // - // This member is required. - VersionStage *string - - // The ID of the version to add the staging label to. To remove a label from a - // version, then do not specify this parameter. - // - // If the staging label is already attached to a different version of the secret, - // then you must also specify the RemoveFromVersionId parameter. - MoveToVersionId *string - - // The ID of the version that the staging label is to be removed from. If the - // staging label you are trying to attach to one version is already attached to a - // different version, then you must include this parameter and specify the version - // that the label is to be removed from. If the label is attached and you either do - // not specify this parameter, or the version ID does not match, then the operation - // fails. - RemoveFromVersionId *string - - noSmithyDocumentSerde -} - -type UpdateSecretVersionStageOutput struct { - - // The ARN of the secret that was updated. - ARN *string - - // The name of the secret that was updated. - Name *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSecretVersionStageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateSecretVersionStage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateSecretVersionStage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSecretVersionStage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpUpdateSecretVersionStageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSecretVersionStage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSecretVersionStage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSecretVersionStage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ValidateResourcePolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ValidateResourcePolicy.go deleted file mode 100644 index 8eb3fd31dc..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/api_op_ValidateResourcePolicy.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Validates that a resource policy does not grant a wide range of principals -// access to your secret. A resource-based policy is optional for secrets. -// -// The API performs three checks when validating the policy: -// -// - Sends a call to [Zelkova], an automated reasoning engine, to ensure your resource -// policy does not allow broad access to your secret, for example policies that use -// a wildcard for the principal. -// -// - Checks for correct syntax in a policy. -// -// - Verifies the policy does not lock out a caller. -// -// Secrets Manager generates a CloudTrail log entry when you call this action. Do -// not include sensitive information in request parameters because it might be -// logged. For more information, see [Logging Secrets Manager events with CloudTrail]. -// -// Required permissions: secretsmanager:ValidateResourcePolicy and -// secretsmanager:PutResourcePolicy . For more information, see [IAM policy actions for Secrets Manager] and [Authentication and access control in Secrets Manager]. -// -// [Authentication and access control in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access.html -// [Logging Secrets Manager events with CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/retrieve-ct-entries.html -// [IAM policy actions for Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/reference_iam-permissions.html#reference_iam-permissions_actions -// [Zelkova]: https://aws.amazon.com/blogs/security/protect-sensitive-data-in-the-cloud-with-automated-reasoning-zelkova/ -func (c *Client) ValidateResourcePolicy(ctx context.Context, params *ValidateResourcePolicyInput, optFns ...func(*Options)) (*ValidateResourcePolicyOutput, error) { - if params == nil { - params = &ValidateResourcePolicyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ValidateResourcePolicy", params, optFns, c.addOperationValidateResourcePolicyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ValidateResourcePolicyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ValidateResourcePolicyInput struct { - - // A JSON-formatted string that contains an Amazon Web Services resource-based - // policy. The policy in the string identifies who can access or manage this secret - // and its versions. For example policies, see [Permissions policy examples]. - // - // [Permissions policy examples]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/auth-and-access_examples.html - // - // This member is required. - ResourcePolicy *string - - // The ARN or name of the secret with the resource-based policy you want to - // validate. - SecretId *string - - noSmithyDocumentSerde -} - -type ValidateResourcePolicyOutput struct { - - // True if your policy passes validation, otherwise false. - PolicyValidationPassed bool - - // Validation errors if your policy didn't pass validation. - ValidationErrors []types.ValidationErrorsEntry - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationValidateResourcePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpValidateResourcePolicy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpValidateResourcePolicy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ValidateResourcePolicy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpValidateResourcePolicyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opValidateResourcePolicy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opValidateResourcePolicy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ValidateResourcePolicy", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/auth.go deleted file mode 100644 index a425538886..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/auth.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "slices" - "strings" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "secretsmanager") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - sorted := sortAuthOptions(options, m.options.AuthSchemePreference) - for _, option := range sorted { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { - byPriority := make([]*smithyauth.Option, 0, len(options)) - for _, prefName := range preferred { - for _, option := range options { - optName := option.SchemeID - if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { - optName = parts[1] - } - if prefName == optName { - byPriority = append(byPriority, option) - } - } - } - for _, option := range options { - if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { - return o.SchemeID == option.SchemeID - }) { - byPriority = append(byPriority, option) - } - } - return byPriority -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/deserializers.go deleted file mode 100644 index 718a7aa013..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/deserializers.go +++ /dev/null @@ -1,6085 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "bytes" - "context" - "encoding/base64" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - smithy "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "io/ioutil" - "strings" -) - -type awsAwsjson11_deserializeOpBatchGetSecretValue struct { -} - -func (*awsAwsjson11_deserializeOpBatchGetSecretValue) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpBatchGetSecretValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorBatchGetSecretValue(response, &metadata) - } - output := &BatchGetSecretValueOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentBatchGetSecretValueOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorBatchGetSecretValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DecryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorDecryptionFailure(response, errorBody) - - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpCancelRotateSecret struct { -} - -func (*awsAwsjson11_deserializeOpCancelRotateSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpCancelRotateSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCancelRotateSecret(response, &metadata) - } - output := &CancelRotateSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentCancelRotateSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorCancelRotateSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpCreateSecret struct { -} - -func (*awsAwsjson11_deserializeOpCreateSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpCreateSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorCreateSecret(response, &metadata) - } - output := &CreateSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentCreateSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorCreateSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DecryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorDecryptionFailure(response, errorBody) - - case strings.EqualFold("EncryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorEncryptionFailure(response, errorBody) - - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocumentException", errorCode): - return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsAwsjson11_deserializeErrorResourceExistsException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteResourcePolicy struct { -} - -func (*awsAwsjson11_deserializeOpDeleteResourcePolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDeleteResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response, &metadata) - } - output := &DeleteResourcePolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDeleteResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteSecret struct { -} - -func (*awsAwsjson11_deserializeOpDeleteSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDeleteSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDeleteSecret(response, &metadata) - } - output := &DeleteSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDeleteSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDeleteSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribeSecret struct { -} - -func (*awsAwsjson11_deserializeOpDescribeSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribeSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorDescribeSecret(response, &metadata) - } - output := &DescribeSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentDescribeSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorDescribeSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetRandomPassword struct { -} - -func (*awsAwsjson11_deserializeOpGetRandomPassword) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetRandomPassword) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetRandomPassword(response, &metadata) - } - output := &GetRandomPasswordOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentGetRandomPasswordOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorGetRandomPassword(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetResourcePolicy struct { -} - -func (*awsAwsjson11_deserializeOpGetResourcePolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetResourcePolicy(response, &metadata) - } - output := &GetResourcePolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentGetResourcePolicyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorGetResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpGetSecretValue struct { -} - -func (*awsAwsjson11_deserializeOpGetSecretValue) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpGetSecretValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetSecretValue(response, &metadata) - } - output := &GetSecretValueOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentGetSecretValueOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorGetSecretValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DecryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorDecryptionFailure(response, errorBody) - - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListSecrets struct { -} - -func (*awsAwsjson11_deserializeOpListSecrets) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListSecrets) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSecrets(response, &metadata) - } - output := &ListSecretsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentListSecretsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorListSecrets(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListSecretVersionIds struct { -} - -func (*awsAwsjson11_deserializeOpListSecretVersionIds) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListSecretVersionIds) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorListSecretVersionIds(response, &metadata) - } - output := &ListSecretVersionIdsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentListSecretVersionIdsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorListSecretVersionIds(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpPutResourcePolicy struct { -} - -func (*awsAwsjson11_deserializeOpPutResourcePolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpPutResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutResourcePolicy(response, &metadata) - } - output := &PutResourcePolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorPutResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocumentException", errorCode): - return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PublicPolicyException", errorCode): - return awsAwsjson11_deserializeErrorPublicPolicyException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpPutSecretValue struct { -} - -func (*awsAwsjson11_deserializeOpPutSecretValue) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpPutSecretValue) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorPutSecretValue(response, &metadata) - } - output := &PutSecretValueOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentPutSecretValueOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorPutSecretValue(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DecryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorDecryptionFailure(response, errorBody) - - case strings.EqualFold("EncryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorEncryptionFailure(response, errorBody) - - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsAwsjson11_deserializeErrorResourceExistsException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpRemoveRegionsFromReplication struct { -} - -func (*awsAwsjson11_deserializeOpRemoveRegionsFromReplication) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpRemoveRegionsFromReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRemoveRegionsFromReplication(response, &metadata) - } - output := &RemoveRegionsFromReplicationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRemoveRegionsFromReplicationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorRemoveRegionsFromReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpReplicateSecretToRegions struct { -} - -func (*awsAwsjson11_deserializeOpReplicateSecretToRegions) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpReplicateSecretToRegions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorReplicateSecretToRegions(response, &metadata) - } - output := &ReplicateSecretToRegionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentReplicateSecretToRegionsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorReplicateSecretToRegions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpRestoreSecret struct { -} - -func (*awsAwsjson11_deserializeOpRestoreSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpRestoreSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRestoreSecret(response, &metadata) - } - output := &RestoreSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRestoreSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorRestoreSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpRotateSecret struct { -} - -func (*awsAwsjson11_deserializeOpRotateSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpRotateSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorRotateSecret(response, &metadata) - } - output := &RotateSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentRotateSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorRotateSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpStopReplicationToReplica struct { -} - -func (*awsAwsjson11_deserializeOpStopReplicationToReplica) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpStopReplicationToReplica) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorStopReplicationToReplica(response, &metadata) - } - output := &StopReplicationToReplicaOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentStopReplicationToReplicaOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorStopReplicationToReplica(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpTagResource struct { -} - -func (*awsAwsjson11_deserializeOpTagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorTagResource(response, &metadata) - } - output := &TagResourceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUntagResource struct { -} - -func (*awsAwsjson11_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUntagResource(response, &metadata) - } - output := &UntagResourceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateSecret struct { -} - -func (*awsAwsjson11_deserializeOpUpdateSecret) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateSecret) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSecret(response, &metadata) - } - output := &UpdateSecretOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentUpdateSecretOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorUpdateSecret(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("DecryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorDecryptionFailure(response, errorBody) - - case strings.EqualFold("EncryptionFailure", errorCode): - return awsAwsjson11_deserializeErrorEncryptionFailure(response, errorBody) - - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocumentException", errorCode): - return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PreconditionNotMetException", errorCode): - return awsAwsjson11_deserializeErrorPreconditionNotMetException(response, errorBody) - - case strings.EqualFold("ResourceExistsException", errorCode): - return awsAwsjson11_deserializeErrorResourceExistsException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateSecretVersionStage struct { -} - -func (*awsAwsjson11_deserializeOpUpdateSecretVersionStage) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateSecretVersionStage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateSecretVersionStage(response, &metadata) - } - output := &UpdateSecretVersionStageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentUpdateSecretVersionStageOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorUpdateSecretVersionStage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpValidateResourcePolicy struct { -} - -func (*awsAwsjson11_deserializeOpValidateResourcePolicy) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpValidateResourcePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorValidateResourcePolicy(response, &metadata) - } - output := &ValidateResourcePolicyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsAwsjson11_deserializeOpDocumentValidateResourcePolicyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsjson11_deserializeOpErrorValidateResourcePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InternalServiceError", errorCode): - return awsAwsjson11_deserializeErrorInternalServiceError(response, errorBody) - - case strings.EqualFold("InvalidParameterException", errorCode): - return awsAwsjson11_deserializeErrorInvalidParameterException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsAwsjson11_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocumentException", errorCode): - return awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsAwsjson11_deserializeErrorDecryptionFailure(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.DecryptionFailure{} - err := awsAwsjson11_deserializeDocumentDecryptionFailure(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorEncryptionFailure(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.EncryptionFailure{} - err := awsAwsjson11_deserializeDocumentEncryptionFailure(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorInternalServiceError(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InternalServiceError{} - err := awsAwsjson11_deserializeDocumentInternalServiceError(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorInvalidNextTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InvalidNextTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorInvalidParameterException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InvalidParameterException{} - err := awsAwsjson11_deserializeDocumentInvalidParameterException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.InvalidRequestException{} - err := awsAwsjson11_deserializeDocumentInvalidRequestException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.MalformedPolicyDocumentException{} - err := awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorPreconditionNotMetException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.PreconditionNotMetException{} - err := awsAwsjson11_deserializeDocumentPreconditionNotMetException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorPublicPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.PublicPolicyException{} - err := awsAwsjson11_deserializeDocumentPublicPolicyException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorResourceExistsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ResourceExistsException{} - err := awsAwsjson11_deserializeDocumentResourceExistsException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - output := &types.ResourceNotFoundException{} - err := awsAwsjson11_deserializeDocumentResourceNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeDocumentAPIErrorListType(v *[]types.APIErrorType, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.APIErrorType - if *v == nil { - cv = []types.APIErrorType{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.APIErrorType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentAPIErrorType(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentAPIErrorType(v **types.APIErrorType, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.APIErrorType - if *v == nil { - sv = &types.APIErrorType{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ErrorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = ptr.String(jtv) - } - - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "SecretId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretIdType to be of type string, got %T instead", value) - } - sv.SecretId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentDecryptionFailure(v **types.DecryptionFailure, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.DecryptionFailure - if *v == nil { - sv = &types.DecryptionFailure{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentEncryptionFailure(v **types.EncryptionFailure, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.EncryptionFailure - if *v == nil { - sv = &types.EncryptionFailure{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInternalServiceError(v **types.InternalServiceError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InternalServiceError - if *v == nil { - sv = &types.InternalServiceError{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidNextTokenException - if *v == nil { - sv = &types.InvalidNextTokenException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidParameterException(v **types.InvalidParameterException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidParameterException - if *v == nil { - sv = &types.InvalidParameterException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidRequestException - if *v == nil { - sv = &types.InvalidRequestException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentKmsKeyIdListType(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyIdType to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LimitExceededException - if *v == nil { - sv = &types.LimitExceededException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.MalformedPolicyDocumentException - if *v == nil { - sv = &types.MalformedPolicyDocumentException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentPreconditionNotMetException(v **types.PreconditionNotMetException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PreconditionNotMetException - if *v == nil { - sv = &types.PreconditionNotMetException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentPublicPolicyException(v **types.PublicPolicyException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PublicPolicyException - if *v == nil { - sv = &types.PublicPolicyException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentReplicationStatusListType(v *[]types.ReplicationStatusType, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ReplicationStatusType - if *v == nil { - cv = []types.ReplicationStatusType{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ReplicationStatusType - destAddr := &col - if err := awsAwsjson11_deserializeDocumentReplicationStatusType(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentReplicationStatusType(v **types.ReplicationStatusType, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ReplicationStatusType - if *v == nil { - sv = &types.ReplicationStatusType{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyIdType to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) - } - - case "LastAccessedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastAccessedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastAccessedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegionType to be of type string, got %T instead", value) - } - sv.Region = ptr.String(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusType to be of type string, got %T instead", value) - } - sv.Status = types.StatusType(jtv) - } - - case "StatusMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusMessageType to be of type string, got %T instead", value) - } - sv.StatusMessage = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentResourceExistsException(v **types.ResourceExistsException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ResourceExistsException - if *v == nil { - sv = &types.ResourceExistsException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ResourceNotFoundException - if *v == nil { - sv = &types.ResourceNotFoundException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentRotationRulesType(v **types.RotationRulesType, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.RotationRulesType - if *v == nil { - sv = &types.RotationRulesType{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AutomaticallyAfterDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected AutomaticallyRotateAfterDaysType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AutomaticallyAfterDays = ptr.Int64(i64) - } - - case "Duration": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DurationType to be of type string, got %T instead", value) - } - sv.Duration = ptr.String(jtv) - } - - case "ScheduleExpression": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScheduleExpressionType to be of type string, got %T instead", value) - } - sv.ScheduleExpression = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretListEntry(v **types.SecretListEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SecretListEntry - if *v == nil { - sv = &types.SecretListEntry{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "CreatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimestampType to be a JSON Number, got %T instead", value) - - } - } - - case "DeletedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DeletedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DeletedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DescriptionType to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyIdType to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) - } - - case "LastAccessedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastAccessedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastAccessedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "LastChangedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastChangedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastChangedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "LastRotatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastRotatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastRotatedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "NextRotationDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.NextRotationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected NextRotationDateType to be a JSON Number, got %T instead", value) - - } - } - - case "OwningService": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OwningServiceType to be of type string, got %T instead", value) - } - sv.OwningService = ptr.String(jtv) - } - - case "PrimaryRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegionType to be of type string, got %T instead", value) - } - sv.PrimaryRegion = ptr.String(jtv) - } - - case "RotationEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected RotationEnabledType to be of type *bool, got %T instead", value) - } - sv.RotationEnabled = ptr.Bool(jtv) - } - - case "RotationLambdaARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RotationLambdaARNType to be of type string, got %T instead", value) - } - sv.RotationLambdaARN = ptr.String(jtv) - } - - case "RotationRules": - if err := awsAwsjson11_deserializeDocumentRotationRulesType(&sv.RotationRules, value); err != nil { - return err - } - - case "SecretVersionsToStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionsToStagesMapType(&sv.SecretVersionsToStages, value); err != nil { - return err - } - - case "Tags": - if err := awsAwsjson11_deserializeDocumentTagListType(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretListType(v *[]types.SecretListEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.SecretListEntry - if *v == nil { - cv = []types.SecretListEntry{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SecretListEntry - destAddr := &col - if err := awsAwsjson11_deserializeDocumentSecretListEntry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretValueEntry(v **types.SecretValueEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SecretValueEntry - if *v == nil { - sv = &types.SecretValueEntry{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "CreatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "SecretBinary": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretBinaryType to be []byte, got %T instead", value) - } - dv, err := base64.StdEncoding.DecodeString(jtv) - if err != nil { - return fmt.Errorf("failed to base64 decode SecretBinaryType, %w", err) - } - sv.SecretBinary = dv - } - - case "SecretString": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretStringType to be of type string, got %T instead", value) - } - sv.SecretString = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - case "VersionStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionStagesType(&sv.VersionStages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretValuesType(v *[]types.SecretValueEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.SecretValueEntry - if *v == nil { - cv = []types.SecretValueEntry{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SecretValueEntry - destAddr := &col - if err := awsAwsjson11_deserializeDocumentSecretValueEntry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretVersionsListEntry(v **types.SecretVersionsListEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SecretVersionsListEntry - if *v == nil { - sv = &types.SecretVersionsListEntry{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CreatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "KmsKeyIds": - if err := awsAwsjson11_deserializeDocumentKmsKeyIdListType(&sv.KmsKeyIds, value); err != nil { - return err - } - - case "LastAccessedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastAccessedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastAccessedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - case "VersionStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionStagesType(&sv.VersionStages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretVersionsListType(v *[]types.SecretVersionsListEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.SecretVersionsListEntry - if *v == nil { - cv = []types.SecretVersionsListEntry{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SecretVersionsListEntry - destAddr := &col - if err := awsAwsjson11_deserializeDocumentSecretVersionsListEntry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretVersionStagesType(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionStageType to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentSecretVersionsToStagesMapType(v *map[string][]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var mv map[string][]string - if *v == nil { - mv = map[string][]string{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal []string - mapVar := parsedVal - if err := awsAwsjson11_deserializeDocumentSecretVersionStagesType(&mapVar, value); err != nil { - return err - } - parsedVal = mapVar - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Tag - if *v == nil { - sv = &types.Tag{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Key": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagKeyType to be of type string, got %T instead", value) - } - sv.Key = ptr.String(jtv) - } - - case "Value": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagValueType to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentTagListType(v *[]types.Tag, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Tag - if *v == nil { - cv = []types.Tag{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Tag - destAddr := &col - if err := awsAwsjson11_deserializeDocumentTag(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentValidationErrorsEntry(v **types.ValidationErrorsEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ValidationErrorsEntry - if *v == nil { - sv = &types.ValidationErrorsEntry{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CheckName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameType to be of type string, got %T instead", value) - } - sv.CheckName = ptr.String(jtv) - } - - case "ErrorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentValidationErrorsType(v *[]types.ValidationErrorsEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ValidationErrorsEntry - if *v == nil { - cv = []types.ValidationErrorsEntry{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ValidationErrorsEntry - destAddr := &col - if err := awsAwsjson11_deserializeDocumentValidationErrorsEntry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeOpDocumentBatchGetSecretValueOutput(v **BatchGetSecretValueOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *BatchGetSecretValueOutput - if *v == nil { - sv = &BatchGetSecretValueOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Errors": - if err := awsAwsjson11_deserializeDocumentAPIErrorListType(&sv.Errors, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "SecretValues": - if err := awsAwsjson11_deserializeDocumentSecretValuesType(&sv.SecretValues, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentCancelRotateSecretOutput(v **CancelRotateSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CancelRotateSecretOutput - if *v == nil { - sv = &CancelRotateSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentCreateSecretOutput(v **CreateSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateSecretOutput - if *v == nil { - sv = &CreateSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "ReplicationStatus": - if err := awsAwsjson11_deserializeDocumentReplicationStatusListType(&sv.ReplicationStatus, value); err != nil { - return err - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDeleteResourcePolicyOutput(v **DeleteResourcePolicyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteResourcePolicyOutput - if *v == nil { - sv = &DeleteResourcePolicyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDeleteSecretOutput(v **DeleteSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteSecretOutput - if *v == nil { - sv = &DeleteSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "DeletionDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DeletionDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DeletionDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDescribeSecretOutput(v **DescribeSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeSecretOutput - if *v == nil { - sv = &DescribeSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "CreatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimestampType to be a JSON Number, got %T instead", value) - - } - } - - case "DeletedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.DeletedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected DeletedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DescriptionType to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "KmsKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected KmsKeyIdType to be of type string, got %T instead", value) - } - sv.KmsKeyId = ptr.String(jtv) - } - - case "LastAccessedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastAccessedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastAccessedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "LastChangedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastChangedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastChangedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "LastRotatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastRotatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastRotatedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "NextRotationDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.NextRotationDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected NextRotationDateType to be a JSON Number, got %T instead", value) - - } - } - - case "OwningService": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OwningServiceType to be of type string, got %T instead", value) - } - sv.OwningService = ptr.String(jtv) - } - - case "PrimaryRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegionType to be of type string, got %T instead", value) - } - sv.PrimaryRegion = ptr.String(jtv) - } - - case "ReplicationStatus": - if err := awsAwsjson11_deserializeDocumentReplicationStatusListType(&sv.ReplicationStatus, value); err != nil { - return err - } - - case "RotationEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected RotationEnabledType to be of type *bool, got %T instead", value) - } - sv.RotationEnabled = ptr.Bool(jtv) - } - - case "RotationLambdaARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RotationLambdaARNType to be of type string, got %T instead", value) - } - sv.RotationLambdaARN = ptr.String(jtv) - } - - case "RotationRules": - if err := awsAwsjson11_deserializeDocumentRotationRulesType(&sv.RotationRules, value); err != nil { - return err - } - - case "Tags": - if err := awsAwsjson11_deserializeDocumentTagListType(&sv.Tags, value); err != nil { - return err - } - - case "VersionIdsToStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionsToStagesMapType(&sv.VersionIdsToStages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentGetRandomPasswordOutput(v **GetRandomPasswordOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetRandomPasswordOutput - if *v == nil { - sv = &GetRandomPasswordOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "RandomPassword": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RandomPasswordType to be of type string, got %T instead", value) - } - sv.RandomPassword = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentGetResourcePolicyOutput(v **GetResourcePolicyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetResourcePolicyOutput - if *v == nil { - sv = &GetResourcePolicyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "ResourcePolicy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyResourcePolicyType to be of type string, got %T instead", value) - } - sv.ResourcePolicy = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentGetSecretValueOutput(v **GetSecretValueOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetSecretValueOutput - if *v == nil { - sv = &GetSecretValueOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "CreatedDate": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedDateType to be a JSON Number, got %T instead", value) - - } - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "SecretBinary": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretBinaryType to be []byte, got %T instead", value) - } - dv, err := base64.StdEncoding.DecodeString(jtv) - if err != nil { - return fmt.Errorf("failed to base64 decode SecretBinaryType, %w", err) - } - sv.SecretBinary = dv - } - - case "SecretString": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretStringType to be of type string, got %T instead", value) - } - sv.SecretString = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - case "VersionStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionStagesType(&sv.VersionStages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListSecretsOutput(v **ListSecretsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListSecretsOutput - if *v == nil { - sv = &ListSecretsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "SecretList": - if err := awsAwsjson11_deserializeDocumentSecretListType(&sv.SecretList, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListSecretVersionIdsOutput(v **ListSecretVersionIdsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListSecretVersionIdsOutput - if *v == nil { - sv = &ListSecretVersionIdsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "Versions": - if err := awsAwsjson11_deserializeDocumentSecretVersionsListType(&sv.Versions, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentPutResourcePolicyOutput(v **PutResourcePolicyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutResourcePolicyOutput - if *v == nil { - sv = &PutResourcePolicyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentPutSecretValueOutput(v **PutSecretValueOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutSecretValueOutput - if *v == nil { - sv = &PutSecretValueOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - case "VersionStages": - if err := awsAwsjson11_deserializeDocumentSecretVersionStagesType(&sv.VersionStages, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentRemoveRegionsFromReplicationOutput(v **RemoveRegionsFromReplicationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RemoveRegionsFromReplicationOutput - if *v == nil { - sv = &RemoveRegionsFromReplicationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "ReplicationStatus": - if err := awsAwsjson11_deserializeDocumentReplicationStatusListType(&sv.ReplicationStatus, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentReplicateSecretToRegionsOutput(v **ReplicateSecretToRegionsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ReplicateSecretToRegionsOutput - if *v == nil { - sv = &ReplicateSecretToRegionsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "ReplicationStatus": - if err := awsAwsjson11_deserializeDocumentReplicationStatusListType(&sv.ReplicationStatus, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentRestoreSecretOutput(v **RestoreSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RestoreSecretOutput - if *v == nil { - sv = &RestoreSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentRotateSecretOutput(v **RotateSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RotateSecretOutput - if *v == nil { - sv = &RotateSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentStopReplicationToReplicaOutput(v **StopReplicationToReplicaOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *StopReplicationToReplicaOutput - if *v == nil { - sv = &StopReplicationToReplicaOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUpdateSecretOutput(v **UpdateSecretOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateSecretOutput - if *v == nil { - sv = &UpdateSecretOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "VersionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretVersionIdType to be of type string, got %T instead", value) - } - sv.VersionId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUpdateSecretVersionStageOutput(v **UpdateSecretVersionStageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateSecretVersionStageOutput - if *v == nil { - sv = &UpdateSecretVersionStageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ARN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretARNType to be of type string, got %T instead", value) - } - sv.ARN = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretNameType to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentValidateResourcePolicyOutput(v **ValidateResourcePolicyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ValidateResourcePolicyOutput - if *v == nil { - sv = &ValidateResourcePolicyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PolicyValidationPassed": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanType to be of type *bool, got %T instead", value) - } - sv.PolicyValidationPassed = jtv - } - - case "ValidationErrors": - if err := awsAwsjson11_deserializeDocumentValidationErrorsType(&sv.ValidationErrors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type protocolErrorInfo struct { - Type string `json:"__type"` - Message string - Code any // nonstandard for awsjson but some services do present the type here -} - -func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { - var errInfo protocolErrorInfo - if err := decoder.Decode(&errInfo); err != nil { - if err == io.EOF { - return errInfo, nil - } - return errInfo, err - } - - return errInfo, nil -} - -func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { - if len(headerType) != 0 { - return headerType, true - } else if len(bodyInfo.Type) != 0 { - return bodyInfo.Type, true - } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { - return code, true - } - return "", false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/doc.go deleted file mode 100644 index 2d0ba2e656..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/doc.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package secretsmanager provides the API client, operations, and parameter types -// for AWS Secrets Manager. -// -// # Amazon Web Services Secrets Manager -// -// Amazon Web Services Secrets Manager provides a service to enable you to store, -// manage, and retrieve, secrets. -// -// This guide provides descriptions of the Secrets Manager API. For more -// information about using this service, see the [Amazon Web Services Secrets Manager User Guide]. -// -// # API Version -// -// This version of the Secrets Manager API Reference documents the Secrets Manager -// API version 2017-10-17. -// -// For a list of endpoints, see [Amazon Web Services Secrets Manager endpoints]. -// -// # Support and Feedback for Amazon Web Services Secrets Manager -// -// We welcome your feedback. Send your comments to awssecretsmanager-feedback@amazon.com, or post your feedback and -// questions in the [Amazon Web Services Secrets Manager Discussion Forum]. For more information about the Amazon Web Services -// Discussion Forums, see [Forums Help]. -// -// # Logging API Requests -// -// Amazon Web Services Secrets Manager supports Amazon Web Services CloudTrail, a -// service that records Amazon Web Services API calls for your Amazon Web Services -// account and delivers log files to an Amazon S3 bucket. By using information -// that's collected by Amazon Web Services CloudTrail, you can determine the -// requests successfully made to Secrets Manager, who made the request, when it was -// made, and so on. For more about Amazon Web Services Secrets Manager and support -// for Amazon Web Services CloudTrail, see [Logging Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail]in the Amazon Web Services Secrets -// Manager User Guide. To learn more about CloudTrail, including enabling it and -// find your log files, see the [Amazon Web Services CloudTrail User Guide]. -// -// [Forums Help]: http://forums.aws.amazon.com/help.jspa -// [Amazon Web Services CloudTrail User Guide]: https://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html -// [Amazon Web Services Secrets Manager endpoints]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/asm_access.html#endpoints -// [Amazon Web Services Secrets Manager User Guide]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/introduction.html -// [Amazon Web Services Secrets Manager Discussion Forum]: http://forums.aws.amazon.com/forum.jspa?forumID=296 -// [Logging Amazon Web Services Secrets Manager Events with Amazon Web Services CloudTrail]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/monitoring.html#monitoring_cloudtrail -package secretsmanager diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/endpoints.go deleted file mode 100644 index 054e3c9136..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/endpoints.go +++ /dev/null @@ -1,634 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "secretsmanager" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_SECRETS_MANAGER") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "Secrets Manager", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - if "aws" == _PartitionResult.Name { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager-fips.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if "aws-us-gov" == _PartitionResult.Name { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager-fips.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - if "aws" == _PartitionResult.Name { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if "aws-cn" == _PartitionResult.Name { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com.cn") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if "aws-us-gov" == _PartitionResult.Name { - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://secretsmanager.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json deleted file mode 100644 index de89e16b88..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/generated.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_BatchGetSecretValue.go", - "api_op_CancelRotateSecret.go", - "api_op_CreateSecret.go", - "api_op_DeleteResourcePolicy.go", - "api_op_DeleteSecret.go", - "api_op_DescribeSecret.go", - "api_op_GetRandomPassword.go", - "api_op_GetResourcePolicy.go", - "api_op_GetSecretValue.go", - "api_op_ListSecretVersionIds.go", - "api_op_ListSecrets.go", - "api_op_PutResourcePolicy.go", - "api_op_PutSecretValue.go", - "api_op_RemoveRegionsFromReplication.go", - "api_op_ReplicateSecretToRegions.go", - "api_op_RestoreSecret.go", - "api_op_RotateSecret.go", - "api_op_StopReplicationToReplica.go", - "api_op_TagResource.go", - "api_op_UntagResource.go", - "api_op_UpdateSecret.go", - "api_op_UpdateSecretVersionStage.go", - "api_op_ValidateResourcePolicy.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "sra_operation_order_test.go", - "types/enums.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.22", - "module": "github.com/aws/aws-sdk-go-v2/service/secretsmanager", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go deleted file mode 100644 index bbffe36fbd..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package secretsmanager - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.39.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints/endpoints.go deleted file mode 100644 index 2e8af1375e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints/endpoints.go +++ /dev/null @@ -1,740 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver Secrets Manager endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsEusc *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "af-south-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-east-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-5", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-5", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ap-southeast-6", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-7", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-7", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-central-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-central-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-central-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "ca-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-west-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-west-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-west-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "ca-west-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-central-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-north-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-3", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "il-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "il-central-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "me-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-central-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-south-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "mx-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "mx-central-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-east-2-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-west-2-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "cn-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "cn-north-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - Variant: endpoints.DualStackVariant, - }: {}, - }, - }, - { - ID: "aws-eusc", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsEusc, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-iso-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-east-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-iso-east-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-iso-west-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - }, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-isob-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-isob-east-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-isob-east-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - }, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "eu-isoe-west-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-isof-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-isof-south-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "secretsmanager-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "secretsmanager-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "secretsmanager.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-east-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - Variant: endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - Variant: endpoints.FIPSVariant, - }: {}, - endpoints.EndpointKey{ - Region: "us-gov-west-1-fips", - }: endpoints.Endpoint{ - Deprecated: aws.TrueTernary, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/options.go deleted file mode 100644 index bd4a53573c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/options.go +++ /dev/null @@ -1,243 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // Provides idempotency tokens values that will be automatically populated into - // idempotent API operations. - IdempotencyTokenProvider IdempotencyTokenProvider - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Client registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - to.Interceptors = o.Interceptors.Copy() - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/serializers.go deleted file mode 100644 index 2f04e03ad0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/serializers.go +++ /dev/null @@ -1,2156 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/secretsmanager/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - smithyjson "github.com/aws/smithy-go/encoding/json" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "path" -) - -type awsAwsjson11_serializeOpBatchGetSecretValue struct { -} - -func (*awsAwsjson11_serializeOpBatchGetSecretValue) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpBatchGetSecretValue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*BatchGetSecretValueInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.BatchGetSecretValue") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentBatchGetSecretValueInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpCancelRotateSecret struct { -} - -func (*awsAwsjson11_serializeOpCancelRotateSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpCancelRotateSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CancelRotateSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.CancelRotateSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentCancelRotateSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpCreateSecret struct { -} - -func (*awsAwsjson11_serializeOpCreateSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpCreateSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.CreateSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentCreateSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpDeleteResourcePolicy struct { -} - -func (*awsAwsjson11_serializeOpDeleteResourcePolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDeleteResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteResourcePolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.DeleteResourcePolicy") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpDeleteSecret struct { -} - -func (*awsAwsjson11_serializeOpDeleteSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDeleteSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.DeleteSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpDescribeSecret struct { -} - -func (*awsAwsjson11_serializeOpDescribeSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDescribeSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.DescribeSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDescribeSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpGetRandomPassword struct { -} - -func (*awsAwsjson11_serializeOpGetRandomPassword) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpGetRandomPassword) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetRandomPasswordInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.GetRandomPassword") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentGetRandomPasswordInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpGetResourcePolicy struct { -} - -func (*awsAwsjson11_serializeOpGetResourcePolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpGetResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetResourcePolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.GetResourcePolicy") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentGetResourcePolicyInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpGetSecretValue struct { -} - -func (*awsAwsjson11_serializeOpGetSecretValue) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpGetSecretValue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSecretValueInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.GetSecretValue") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentGetSecretValueInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpListSecrets struct { -} - -func (*awsAwsjson11_serializeOpListSecrets) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListSecrets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSecretsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.ListSecrets") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListSecretsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpListSecretVersionIds struct { -} - -func (*awsAwsjson11_serializeOpListSecretVersionIds) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListSecretVersionIds) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSecretVersionIdsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.ListSecretVersionIds") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListSecretVersionIdsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpPutResourcePolicy struct { -} - -func (*awsAwsjson11_serializeOpPutResourcePolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpPutResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutResourcePolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.PutResourcePolicy") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpPutSecretValue struct { -} - -func (*awsAwsjson11_serializeOpPutSecretValue) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpPutSecretValue) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutSecretValueInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.PutSecretValue") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentPutSecretValueInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpRemoveRegionsFromReplication struct { -} - -func (*awsAwsjson11_serializeOpRemoveRegionsFromReplication) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpRemoveRegionsFromReplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RemoveRegionsFromReplicationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.RemoveRegionsFromReplication") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRemoveRegionsFromReplicationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpReplicateSecretToRegions struct { -} - -func (*awsAwsjson11_serializeOpReplicateSecretToRegions) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpReplicateSecretToRegions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ReplicateSecretToRegionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.ReplicateSecretToRegions") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentReplicateSecretToRegionsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpRestoreSecret struct { -} - -func (*awsAwsjson11_serializeOpRestoreSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpRestoreSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestoreSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.RestoreSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRestoreSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpRotateSecret struct { -} - -func (*awsAwsjson11_serializeOpRotateSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpRotateSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RotateSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.RotateSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentRotateSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpStopReplicationToReplica struct { -} - -func (*awsAwsjson11_serializeOpStopReplicationToReplica) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpStopReplicationToReplica) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StopReplicationToReplicaInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.StopReplicationToReplica") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentStopReplicationToReplicaInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpTagResource struct { -} - -func (*awsAwsjson11_serializeOpTagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.TagResource") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpUntagResource struct { -} - -func (*awsAwsjson11_serializeOpUntagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UntagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.UntagResource") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpUpdateSecret struct { -} - -func (*awsAwsjson11_serializeOpUpdateSecret) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUpdateSecret) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSecretInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.UpdateSecret") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUpdateSecretInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpUpdateSecretVersionStage struct { -} - -func (*awsAwsjson11_serializeOpUpdateSecretVersionStage) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUpdateSecretVersionStage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSecretVersionStageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.UpdateSecretVersionStage") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUpdateSecretVersionStageInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpValidateResourcePolicy struct { -} - -func (*awsAwsjson11_serializeOpValidateResourcePolicy) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpValidateResourcePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ValidateResourcePolicyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") - httpBindingEncoder.SetHeader("X-Amz-Target").String("secretsmanager.ValidateResourcePolicy") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentValidateResourcePolicyInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsAwsjson11_serializeDocumentAddReplicaRegionListType(v []types.ReplicaRegionType, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsAwsjson11_serializeDocumentReplicaRegionType(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsjson11_serializeDocumentFilter(v *types.Filter, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Key) > 0 { - ok := object.Key("Key") - ok.String(string(v.Key)) - } - - if v.Values != nil { - ok := object.Key("Values") - if err := awsAwsjson11_serializeDocumentFilterValuesStringList(v.Values, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeDocumentFiltersListType(v []types.Filter, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsAwsjson11_serializeDocumentFilter(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsjson11_serializeDocumentFilterValuesStringList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentRemoveReplicaRegionListType(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentReplicaRegionType(v *types.ReplicaRegionType, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.KmsKeyId != nil { - ok := object.Key("KmsKeyId") - ok.String(*v.KmsKeyId) - } - - if v.Region != nil { - ok := object.Key("Region") - ok.String(*v.Region) - } - - return nil -} - -func awsAwsjson11_serializeDocumentRotationRulesType(v *types.RotationRulesType, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AutomaticallyAfterDays != nil { - ok := object.Key("AutomaticallyAfterDays") - ok.Long(*v.AutomaticallyAfterDays) - } - - if v.Duration != nil { - ok := object.Key("Duration") - ok.String(*v.Duration) - } - - if v.ScheduleExpression != nil { - ok := object.Key("ScheduleExpression") - ok.String(*v.ScheduleExpression) - } - - return nil -} - -func awsAwsjson11_serializeDocumentSecretIdListType(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentSecretVersionStagesType(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Key != nil { - ok := object.Key("Key") - ok.String(*v.Key) - } - - if v.Value != nil { - ok := object.Key("Value") - ok.String(*v.Value) - } - - return nil -} - -func awsAwsjson11_serializeDocumentTagKeyListType(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentTagListType(v []types.Tag, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsAwsjson11_serializeDocumentTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsjson11_serializeOpDocumentBatchGetSecretValueInput(v *BatchGetSecretValueInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsAwsjson11_serializeDocumentFiltersListType(v.Filters, ok); err != nil { - return err - } - } - - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) - } - - if v.SecretIdList != nil { - ok := object.Key("SecretIdList") - if err := awsAwsjson11_serializeDocumentSecretIdListType(v.SecretIdList, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentCancelRotateSecretInput(v *CancelRotateSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentCreateSecretInput(v *CreateSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AddReplicaRegions != nil { - ok := object.Key("AddReplicaRegions") - if err := awsAwsjson11_serializeDocumentAddReplicaRegionListType(v.AddReplicaRegions, ok); err != nil { - return err - } - } - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) - } - - if v.ForceOverwriteReplicaSecret { - ok := object.Key("ForceOverwriteReplicaSecret") - ok.Boolean(v.ForceOverwriteReplicaSecret) - } - - if v.KmsKeyId != nil { - ok := object.Key("KmsKeyId") - ok.String(*v.KmsKeyId) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - if v.SecretBinary != nil { - ok := object.Key("SecretBinary") - ok.Base64EncodeBytes(v.SecretBinary) - } - - if v.SecretString != nil { - ok := object.Key("SecretString") - ok.String(*v.SecretString) - } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsAwsjson11_serializeDocumentTagListType(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDeleteResourcePolicyInput(v *DeleteResourcePolicyInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDeleteSecretInput(v *DeleteSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ForceDeleteWithoutRecovery != nil { - ok := object.Key("ForceDeleteWithoutRecovery") - ok.Boolean(*v.ForceDeleteWithoutRecovery) - } - - if v.RecoveryWindowInDays != nil { - ok := object.Key("RecoveryWindowInDays") - ok.Long(*v.RecoveryWindowInDays) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDescribeSecretInput(v *DescribeSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentGetRandomPasswordInput(v *GetRandomPasswordInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ExcludeCharacters != nil { - ok := object.Key("ExcludeCharacters") - ok.String(*v.ExcludeCharacters) - } - - if v.ExcludeLowercase != nil { - ok := object.Key("ExcludeLowercase") - ok.Boolean(*v.ExcludeLowercase) - } - - if v.ExcludeNumbers != nil { - ok := object.Key("ExcludeNumbers") - ok.Boolean(*v.ExcludeNumbers) - } - - if v.ExcludePunctuation != nil { - ok := object.Key("ExcludePunctuation") - ok.Boolean(*v.ExcludePunctuation) - } - - if v.ExcludeUppercase != nil { - ok := object.Key("ExcludeUppercase") - ok.Boolean(*v.ExcludeUppercase) - } - - if v.IncludeSpace != nil { - ok := object.Key("IncludeSpace") - ok.Boolean(*v.IncludeSpace) - } - - if v.PasswordLength != nil { - ok := object.Key("PasswordLength") - ok.Long(*v.PasswordLength) - } - - if v.RequireEachIncludedType != nil { - ok := object.Key("RequireEachIncludedType") - ok.Boolean(*v.RequireEachIncludedType) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentGetResourcePolicyInput(v *GetResourcePolicyInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentGetSecretValueInput(v *GetSecretValueInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.VersionId != nil { - ok := object.Key("VersionId") - ok.String(*v.VersionId) - } - - if v.VersionStage != nil { - ok := object.Key("VersionStage") - ok.String(*v.VersionStage) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListSecretsInput(v *ListSecretsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Filters != nil { - ok := object.Key("Filters") - if err := awsAwsjson11_serializeDocumentFiltersListType(v.Filters, ok); err != nil { - return err - } - } - - if v.IncludePlannedDeletion != nil { - ok := object.Key("IncludePlannedDeletion") - ok.Boolean(*v.IncludePlannedDeletion) - } - - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) - } - - if len(v.SortOrder) > 0 { - ok := object.Key("SortOrder") - ok.String(string(v.SortOrder)) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListSecretVersionIdsInput(v *ListSecretVersionIdsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.IncludeDeprecated != nil { - ok := object.Key("IncludeDeprecated") - ok.Boolean(*v.IncludeDeprecated) - } - - if v.MaxResults != nil { - ok := object.Key("MaxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("NextToken") - ok.String(*v.NextToken) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentPutResourcePolicyInput(v *PutResourcePolicyInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BlockPublicPolicy != nil { - ok := object.Key("BlockPublicPolicy") - ok.Boolean(*v.BlockPublicPolicy) - } - - if v.ResourcePolicy != nil { - ok := object.Key("ResourcePolicy") - ok.String(*v.ResourcePolicy) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentPutSecretValueInput(v *PutSecretValueInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RotationToken != nil { - ok := object.Key("RotationToken") - ok.String(*v.RotationToken) - } - - if v.SecretBinary != nil { - ok := object.Key("SecretBinary") - ok.Base64EncodeBytes(v.SecretBinary) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.SecretString != nil { - ok := object.Key("SecretString") - ok.String(*v.SecretString) - } - - if v.VersionStages != nil { - ok := object.Key("VersionStages") - if err := awsAwsjson11_serializeDocumentSecretVersionStagesType(v.VersionStages, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentRemoveRegionsFromReplicationInput(v *RemoveRegionsFromReplicationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RemoveReplicaRegions != nil { - ok := object.Key("RemoveReplicaRegions") - if err := awsAwsjson11_serializeDocumentRemoveReplicaRegionListType(v.RemoveReplicaRegions, ok); err != nil { - return err - } - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentReplicateSecretToRegionsInput(v *ReplicateSecretToRegionsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AddReplicaRegions != nil { - ok := object.Key("AddReplicaRegions") - if err := awsAwsjson11_serializeDocumentAddReplicaRegionListType(v.AddReplicaRegions, ok); err != nil { - return err - } - } - - if v.ForceOverwriteReplicaSecret { - ok := object.Key("ForceOverwriteReplicaSecret") - ok.Boolean(v.ForceOverwriteReplicaSecret) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentRestoreSecretInput(v *RestoreSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentRotateSecretInput(v *RotateSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.RotateImmediately != nil { - ok := object.Key("RotateImmediately") - ok.Boolean(*v.RotateImmediately) - } - - if v.RotationLambdaARN != nil { - ok := object.Key("RotationLambdaARN") - ok.String(*v.RotationLambdaARN) - } - - if v.RotationRules != nil { - ok := object.Key("RotationRules") - if err := awsAwsjson11_serializeDocumentRotationRulesType(v.RotationRules, ok); err != nil { - return err - } - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentStopReplicationToReplicaInput(v *StopReplicationToReplicaInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsAwsjson11_serializeDocumentTagListType(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.TagKeys != nil { - ok := object.Key("TagKeys") - if err := awsAwsjson11_serializeDocumentTagKeyListType(v.TagKeys, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUpdateSecretInput(v *UpdateSecretInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Description != nil { - ok := object.Key("Description") - ok.String(*v.Description) - } - - if v.KmsKeyId != nil { - ok := object.Key("KmsKeyId") - ok.String(*v.KmsKeyId) - } - - if v.SecretBinary != nil { - ok := object.Key("SecretBinary") - ok.Base64EncodeBytes(v.SecretBinary) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.SecretString != nil { - ok := object.Key("SecretString") - ok.String(*v.SecretString) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUpdateSecretVersionStageInput(v *UpdateSecretVersionStageInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MoveToVersionId != nil { - ok := object.Key("MoveToVersionId") - ok.String(*v.MoveToVersionId) - } - - if v.RemoveFromVersionId != nil { - ok := object.Key("RemoveFromVersionId") - ok.String(*v.RemoveFromVersionId) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - if v.VersionStage != nil { - ok := object.Key("VersionStage") - ok.String(*v.VersionStage) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentValidateResourcePolicyInput(v *ValidateResourcePolicyInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ResourcePolicy != nil { - ok := object.Key("ResourcePolicy") - ok.String(*v.ResourcePolicy) - } - - if v.SecretId != nil { - ok := object.Key("SecretId") - ok.String(*v.SecretId) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go deleted file mode 100644 index e458ec8fec..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/enums.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type FilterNameStringType string - -// Enum values for FilterNameStringType -const ( - FilterNameStringTypeDescription FilterNameStringType = "description" - FilterNameStringTypeName FilterNameStringType = "name" - FilterNameStringTypeTagKey FilterNameStringType = "tag-key" - FilterNameStringTypeTagValue FilterNameStringType = "tag-value" - FilterNameStringTypePrimaryRegion FilterNameStringType = "primary-region" - FilterNameStringTypeOwningService FilterNameStringType = "owning-service" - FilterNameStringTypeAll FilterNameStringType = "all" -) - -// Values returns all known values for FilterNameStringType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (FilterNameStringType) Values() []FilterNameStringType { - return []FilterNameStringType{ - "description", - "name", - "tag-key", - "tag-value", - "primary-region", - "owning-service", - "all", - } -} - -type SortOrderType string - -// Enum values for SortOrderType -const ( - SortOrderTypeAsc SortOrderType = "asc" - SortOrderTypeDesc SortOrderType = "desc" -) - -// Values returns all known values for SortOrderType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (SortOrderType) Values() []SortOrderType { - return []SortOrderType{ - "asc", - "desc", - } -} - -type StatusType string - -// Enum values for StatusType -const ( - StatusTypeInSync StatusType = "InSync" - StatusTypeFailed StatusType = "Failed" - StatusTypeInProgress StatusType = "InProgress" -) - -// Values returns all known values for StatusType. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (StatusType) Values() []StatusType { - return []StatusType{ - "InSync", - "Failed", - "InProgress", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/errors.go deleted file mode 100644 index 09c59ed19c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/errors.go +++ /dev/null @@ -1,339 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// Secrets Manager can't decrypt the protected secret text using the provided KMS -// key. -type DecryptionFailure struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *DecryptionFailure) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *DecryptionFailure) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *DecryptionFailure) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "DecryptionFailure" - } - return *e.ErrorCodeOverride -} -func (e *DecryptionFailure) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Secrets Manager can't encrypt the protected secret text using the provided KMS -// key. Check that the KMS key is available, enabled, and not in an invalid state. -// For more information, see [Key state: Effect on your KMS key]. -// -// [Key state: Effect on your KMS key]: https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html -type EncryptionFailure struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *EncryptionFailure) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *EncryptionFailure) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *EncryptionFailure) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "EncryptionFailure" - } - return *e.ErrorCodeOverride -} -func (e *EncryptionFailure) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// An error occurred on the server side. -type InternalServiceError struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InternalServiceError) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InternalServiceError) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InternalServiceError) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InternalServiceError" - } - return *e.ErrorCodeOverride -} -func (e *InternalServiceError) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// The NextToken value is invalid. -type InvalidNextTokenException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidNextTokenException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidNextTokenException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidNextTokenException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidNextTokenException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The parameter name or value is invalid. -type InvalidParameterException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidParameterException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidParameterException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidParameterException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidParameterException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidParameterException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A parameter value is not valid for the current state of the resource. -// -// Possible causes: -// -// - The secret is scheduled for deletion. -// -// - You tried to enable rotation on a secret that doesn't already have a Lambda -// function ARN configured and you didn't include such an ARN as a parameter in -// this call. -// -// - The secret is managed by another service, and you must use that service to -// update it. For more information, see [Secrets managed by other Amazon Web Services services]. -// -// [Secrets managed by other Amazon Web Services services]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/service-linked-secrets.html -type InvalidRequestException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidRequestException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidRequestException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidRequestException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidRequestException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request failed because it would exceed one of the Secrets Manager quotas. -type LimitExceededException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *LimitExceededException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *LimitExceededException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *LimitExceededException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "LimitExceededException" - } - return *e.ErrorCodeOverride -} -func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The resource policy has syntax errors. -type MalformedPolicyDocumentException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *MalformedPolicyDocumentException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *MalformedPolicyDocumentException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *MalformedPolicyDocumentException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "MalformedPolicyDocumentException" - } - return *e.ErrorCodeOverride -} -func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request failed because you did not complete all the prerequisite steps. -type PreconditionNotMetException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *PreconditionNotMetException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *PreconditionNotMetException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *PreconditionNotMetException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "PreconditionNotMetException" - } - return *e.ErrorCodeOverride -} -func (e *PreconditionNotMetException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The BlockPublicPolicy parameter is set to true, and the resource policy did not -// prevent broad access to the secret. -type PublicPolicyException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *PublicPolicyException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *PublicPolicyException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *PublicPolicyException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "PublicPolicyException" - } - return *e.ErrorCodeOverride -} -func (e *PublicPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A resource with the ID you requested already exists. -type ResourceExistsException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ResourceExistsException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ResourceExistsException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ResourceExistsException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ResourceExistsException" - } - return *e.ErrorCodeOverride -} -func (e *ResourceExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Secrets Manager can't find the resource that you asked for. -type ResourceNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ResourceNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ResourceNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ResourceNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ResourceNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go deleted file mode 100644 index 7b848975a3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/types/types.go +++ /dev/null @@ -1,321 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// The error Secrets Manager encountered while retrieving an individual secret as -// part of BatchGetSecretValue. -type APIErrorType struct { - - // The error Secrets Manager encountered while retrieving an individual secret as - // part of BatchGetSecretValue, for example ResourceNotFoundException , InvalidParameterException , - // InvalidRequestException , DecryptionFailure , or AccessDeniedException . - ErrorCode *string - - // A message describing the error. - Message *string - - // The ARN or name of the secret. - SecretId *string - - noSmithyDocumentSerde -} - -// Allows you to add filters when you use the search function in Secrets Manager. -// For more information, see [Find secrets in Secrets Manager]. -// -// [Find secrets in Secrets Manager]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/manage_search-secret.html -type Filter struct { - - // The following are keys you can use: - // - // - description: Prefix match, not case-sensitive. - // - // - name: Prefix match, case-sensitive. - // - // - tag-key: Prefix match, case-sensitive. - // - // - tag-value: Prefix match, case-sensitive. - // - // - primary-region: Prefix match, case-sensitive. - // - // - owning-service: Prefix match, case-sensitive. - // - // - all: Breaks the filter value string into words and then searches all - // attributes for matches. Not case-sensitive. - Key FilterNameStringType - - // The keyword to filter for. - // - // You can prefix your search value with an exclamation mark ( ! ) in order to - // perform negation filters. - Values []string - - noSmithyDocumentSerde -} - -// A custom type that specifies a Region and the KmsKeyId for a replica secret. -type ReplicaRegionType struct { - - // The ARN, key ID, or alias of the KMS key to encrypt the secret. If you don't - // include this field, Secrets Manager uses aws/secretsmanager . - KmsKeyId *string - - // A Region code. For a list of Region codes, see [Name and code of Regions]. - // - // [Name and code of Regions]: https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints - Region *string - - noSmithyDocumentSerde -} - -// A replication object consisting of a RegionReplicationStatus object and -// includes a Region, KMSKeyId, status, and status message. -type ReplicationStatusType struct { - - // Can be an ARN , Key ID , or Alias . - KmsKeyId *string - - // The date that the secret was last accessed in the Region. This field is omitted - // if the secret has never been retrieved in the Region. - LastAccessedDate *time.Time - - // The Region where replication occurs. - Region *string - - // The status can be InProgress , Failed , or InSync . - Status StatusType - - // Status message such as "Secret with this name already exists in this region". - StatusMessage *string - - noSmithyDocumentSerde -} - -// A structure that defines the rotation configuration for the secret. -type RotationRulesType struct { - - // The number of days between rotations of the secret. You can use this value to - // check that your secret meets your compliance guidelines for how often secrets - // must be rotated. If you use this field to set the rotation schedule, Secrets - // Manager calculates the next rotation date based on the previous rotation. - // Manually updating the secret value by calling PutSecretValue or UpdateSecret is - // considered a valid rotation. - // - // In DescribeSecret and ListSecrets , this value is calculated from the rotation - // schedule after every successful rotation. In RotateSecret , you can set the - // rotation schedule in RotationRules with AutomaticallyAfterDays or - // ScheduleExpression , but not both. To set a rotation schedule in hours, use - // ScheduleExpression . - AutomaticallyAfterDays *int64 - - // The length of the rotation window in hours, for example 3h for a three hour - // window. Secrets Manager rotates your secret at any time during this window. The - // window must not extend into the next rotation window or the next UTC day. The - // window starts according to the ScheduleExpression . If you don't specify a - // Duration , for a ScheduleExpression in hours, the window automatically closes - // after one hour. For a ScheduleExpression in days, the window automatically - // closes at the end of the UTC day. For more information, including examples, see [Schedule expressions in Secrets Manager rotation] - // in the Secrets Manager Users Guide. - // - // [Schedule expressions in Secrets Manager rotation]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html - Duration *string - - // A cron() or rate() expression that defines the schedule for rotating your - // secret. Secrets Manager rotation schedules use UTC time zone. Secrets Manager - // rotates your secret any time during a rotation window. - // - // Secrets Manager rate() expressions represent the interval in hours or days that - // you want to rotate your secret, for example rate(12 hours) or rate(10 days) . - // You can rotate a secret as often as every four hours. If you use a rate() - // expression, the rotation window starts at midnight. For a rate in hours, the - // default rotation window closes after one hour. For a rate in days, the default - // rotation window closes at the end of the day. You can set the Duration to - // change the rotation window. The rotation window must not extend into the next - // UTC day or into the next rotation window. - // - // You can use a cron() expression to create a rotation schedule that is more - // detailed than a rotation interval. For more information, including examples, see - // [Schedule expressions in Secrets Manager rotation]in the Secrets Manager Users Guide. For a cron expression that represents a - // schedule in hours, the default rotation window closes after one hour. For a cron - // expression that represents a schedule in days, the default rotation window - // closes at the end of the day. You can set the Duration to change the rotation - // window. The rotation window must not extend into the next UTC day or into the - // next rotation window. - // - // [Schedule expressions in Secrets Manager rotation]: https://docs.aws.amazon.com/secretsmanager/latest/userguide/rotate-secrets_schedule.html - ScheduleExpression *string - - noSmithyDocumentSerde -} - -// A structure that contains the details about a secret. It does not include the -// encrypted SecretString and SecretBinary values. To get those values, use [GetSecretValue] . -// -// [GetSecretValue]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html -type SecretListEntry struct { - - // The Amazon Resource Name (ARN) of the secret. - ARN *string - - // The date and time when a secret was created. - CreatedDate *time.Time - - // The date and time the deletion of the secret occurred. Not present on active - // secrets. The secret can be recovered until the number of days in the recovery - // window has passed, as specified in the RecoveryWindowInDays parameter of the [DeleteSecret] - // DeleteSecret operation. - // - // [DeleteSecret]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html - DeletedDate *time.Time - - // The user-provided description of the secret. - Description *string - - // The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. - // If the secret is encrypted with the Amazon Web Services managed key - // aws/secretsmanager , this field is omitted. - KmsKeyId *string - - // The date that the secret was last accessed in the Region. This field is omitted - // if the secret has never been retrieved in the Region. - LastAccessedDate *time.Time - - // The last date and time that this secret was modified in any way. - LastChangedDate *time.Time - - // The most recent date and time that the Secrets Manager rotation process was - // successfully completed. This value is null if the secret hasn't ever rotated. - LastRotatedDate *time.Time - - // The friendly name of the secret. - Name *string - - // The next rotation is scheduled to occur on or before this date. If the secret - // isn't configured for rotation or rotation has been disabled, Secrets Manager - // returns null. - NextRotationDate *time.Time - - // Returns the name of the service that created the secret. - OwningService *string - - // The Region where Secrets Manager originated the secret. - PrimaryRegion *string - - // Indicates whether automatic, scheduled rotation is enabled for this secret. - RotationEnabled *bool - - // The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to - // rotate and expire the secret either automatically per the schedule or manually - // by a call to [RotateSecret]RotateSecret . - // - // [RotateSecret]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html - RotationLambdaARN *string - - // A structure that defines the rotation configuration for the secret. - RotationRules *RotationRulesType - - // A list of all of the currently assigned SecretVersionStage staging labels and - // the SecretVersionId attached to each one. Staging labels are used to keep track - // of the different versions during the rotation process. - // - // A version that does not have any SecretVersionStage is considered deprecated - // and subject to deletion. Such versions are not included in this list. - SecretVersionsToStages map[string][]string - - // The list of user-defined tags associated with the secret. To add tags to a - // secret, use [TagResource]TagResource . To remove tags, use [UntagResource]UntagResource . - // - // [TagResource]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html - // [UntagResource]: https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html - Tags []Tag - - noSmithyDocumentSerde -} - -// A structure that contains the secret value and other details for a secret. -type SecretValueEntry struct { - - // The Amazon Resource Name (ARN) of the secret. - ARN *string - - // The date the secret was created. - CreatedDate *time.Time - - // The friendly name of the secret. - Name *string - - // The decrypted secret value, if the secret value was originally provided as - // binary data in the form of a byte array. The parameter represents the binary - // data as a [base64-encoded]string. - // - // [base64-encoded]: https://tools.ietf.org/html/rfc4648#section-4 - SecretBinary []byte - - // The decrypted secret value, if the secret value was originally provided as a - // string or through the Secrets Manager console. - SecretString *string - - // The unique version identifier of this version of the secret. - VersionId *string - - // A list of all of the staging labels currently attached to this version of the - // secret. - VersionStages []string - - noSmithyDocumentSerde -} - -// A structure that contains information about one version of a secret. -type SecretVersionsListEntry struct { - - // The date and time this version of the secret was created. - CreatedDate *time.Time - - // The KMS keys used to encrypt the secret version. - KmsKeyIds []string - - // The date that this version of the secret was last accessed. Note that the - // resolution of this field is at the date level and does not include the time. - LastAccessedDate *time.Time - - // The unique version identifier of this version of the secret. - VersionId *string - - // An array of staging labels that are currently associated with this version of - // the secret. - VersionStages []string - - noSmithyDocumentSerde -} - -// A structure that contains information about a tag. -type Tag struct { - - // The key identifier, or name, of the tag. - Key *string - - // The string value associated with the key of the tag. - Value *string - - noSmithyDocumentSerde -} - -// Displays errors that occurred during validation of the resource policy. -type ValidationErrorsEntry struct { - - // Checks the name of the policy. - CheckName *string - - // Displays error messages if validation encounters problems during validation of - // the resource policy. - ErrorMessage *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go deleted file mode 100644 index 90159c6cf1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/secretsmanager/validators.go +++ /dev/null @@ -1,808 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package secretsmanager - -import ( - "context" - "fmt" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpCancelRotateSecret struct { -} - -func (*validateOpCancelRotateSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCancelRotateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CancelRotateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCancelRotateSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateSecret struct { -} - -func (*validateOpCreateSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteResourcePolicy struct { -} - -func (*validateOpDeleteResourcePolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteResourcePolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteResourcePolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDeleteSecret struct { -} - -func (*validateOpDeleteSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeSecret struct { -} - -func (*validateOpDescribeSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetResourcePolicy struct { -} - -func (*validateOpGetResourcePolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetResourcePolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetResourcePolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSecretValue struct { -} - -func (*validateOpGetSecretValue) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSecretValue) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSecretValueInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSecretValueInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListSecretVersionIds struct { -} - -func (*validateOpListSecretVersionIds) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListSecretVersionIds) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListSecretVersionIdsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListSecretVersionIdsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutResourcePolicy struct { -} - -func (*validateOpPutResourcePolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutResourcePolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutResourcePolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutSecretValue struct { -} - -func (*validateOpPutSecretValue) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutSecretValue) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutSecretValueInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutSecretValueInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRemoveRegionsFromReplication struct { -} - -func (*validateOpRemoveRegionsFromReplication) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRemoveRegionsFromReplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RemoveRegionsFromReplicationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRemoveRegionsFromReplicationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpReplicateSecretToRegions struct { -} - -func (*validateOpReplicateSecretToRegions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpReplicateSecretToRegions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ReplicateSecretToRegionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpReplicateSecretToRegionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestoreSecret struct { -} - -func (*validateOpRestoreSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestoreSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestoreSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestoreSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRotateSecret struct { -} - -func (*validateOpRotateSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRotateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RotateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRotateSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStopReplicationToReplica struct { -} - -func (*validateOpStopReplicationToReplica) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStopReplicationToReplica) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StopReplicationToReplicaInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStopReplicationToReplicaInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagResource struct { -} - -func (*validateOpTagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagResource struct { -} - -func (*validateOpUntagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateSecret struct { -} - -func (*validateOpUpdateSecret) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateSecret) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateSecretInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateSecretInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateSecretVersionStage struct { -} - -func (*validateOpUpdateSecretVersionStage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateSecretVersionStage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateSecretVersionStageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateSecretVersionStageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpValidateResourcePolicy struct { -} - -func (*validateOpValidateResourcePolicy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpValidateResourcePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ValidateResourcePolicyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpValidateResourcePolicyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpCancelRotateSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCancelRotateSecret{}, middleware.After) -} - -func addOpCreateSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSecret{}, middleware.After) -} - -func addOpDeleteResourcePolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteResourcePolicy{}, middleware.After) -} - -func addOpDeleteSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSecret{}, middleware.After) -} - -func addOpDescribeSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeSecret{}, middleware.After) -} - -func addOpGetResourcePolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetResourcePolicy{}, middleware.After) -} - -func addOpGetSecretValueValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSecretValue{}, middleware.After) -} - -func addOpListSecretVersionIdsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListSecretVersionIds{}, middleware.After) -} - -func addOpPutResourcePolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutResourcePolicy{}, middleware.After) -} - -func addOpPutSecretValueValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutSecretValue{}, middleware.After) -} - -func addOpRemoveRegionsFromReplicationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRemoveRegionsFromReplication{}, middleware.After) -} - -func addOpReplicateSecretToRegionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpReplicateSecretToRegions{}, middleware.After) -} - -func addOpRestoreSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestoreSecret{}, middleware.After) -} - -func addOpRotateSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRotateSecret{}, middleware.After) -} - -func addOpStopReplicationToReplicaValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStopReplicationToReplica{}, middleware.After) -} - -func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) -} - -func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) -} - -func addOpUpdateSecretValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSecret{}, middleware.After) -} - -func addOpUpdateSecretVersionStageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSecretVersionStage{}, middleware.After) -} - -func addOpValidateResourcePolicyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpValidateResourcePolicy{}, middleware.After) -} - -func validateOpCancelRotateSecretInput(v *CancelRotateSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CancelRotateSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSecretInput(v *CreateSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSecretInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteResourcePolicyInput(v *DeleteResourcePolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteResourcePolicyInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSecretInput(v *DeleteSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeSecretInput(v *DescribeSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetResourcePolicyInput(v *GetResourcePolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetResourcePolicyInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSecretValueInput(v *GetSecretValueInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSecretValueInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListSecretVersionIdsInput(v *ListSecretVersionIdsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListSecretVersionIdsInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPutResourcePolicyInput(v *PutResourcePolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PutResourcePolicyInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.ResourcePolicy == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourcePolicy")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpPutSecretValueInput(v *PutSecretValueInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "PutSecretValueInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRemoveRegionsFromReplicationInput(v *RemoveRegionsFromReplicationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RemoveRegionsFromReplicationInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.RemoveReplicaRegions == nil { - invalidParams.Add(smithy.NewErrParamRequired("RemoveReplicaRegions")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpReplicateSecretToRegionsInput(v *ReplicateSecretToRegionsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ReplicateSecretToRegionsInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.AddReplicaRegions == nil { - invalidParams.Add(smithy.NewErrParamRequired("AddReplicaRegions")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRestoreSecretInput(v *RestoreSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RestoreSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRotateSecretInput(v *RotateSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RotateSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStopReplicationToReplicaInput(v *StopReplicationToReplicaInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StopReplicationToReplicaInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTagResourceInput(v *TagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUntagResourceInput(v *UntagResourceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateSecretInput(v *UpdateSecretInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateSecretInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateSecretVersionStageInput(v *UpdateSecretVersionStageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateSecretVersionStageInput"} - if v.SecretId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SecretId")) - } - if v.VersionStage == nil { - invalidParams.Add(smithy.NewErrParamRequired("VersionStage")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpValidateResourcePolicyInput(v *ValidateResourcePolicyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ValidateResourcePolicyInput"} - if v.ResourcePolicy == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourcePolicy")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md deleted file mode 100644 index 4c5e39d873..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/CHANGELOG.md +++ /dev/null @@ -1,675 +0,0 @@ -# v1.29.6 (2025-09-29) - -* No change notes available for this release. - -# v1.29.5 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.4 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.3 (2025-09-10) - -* No change notes available for this release. - -# v1.29.2 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.1 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.0 (2025-08-28) - -* **Feature**: Remove incorrect endpoint tests - -# v1.28.3 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.2 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2025-08-20) - -* **Bug Fix**: Remove unused deserialization code. - -# v1.28.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.0 (2025-08-04) - -* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.6 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.5 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.4 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.3 (2025-04-03) - -* No change notes available for this release. - -# v1.25.2 (2025-03-25) - -* No change notes available for this release. - -# v1.25.1 (2025-03-04.2) - -* **Bug Fix**: Add assurance test for operation order. - -# v1.25.0 (2025-02-27) - -* **Feature**: Track credential providers via User-Agent Feature ids -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.16 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.15 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.14 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.13 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.12 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.24.11 (2025-01-17) - -* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. - -# v1.24.10 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.9 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.8 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.7 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.6 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.5 (2024-11-07) - -* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses - -# v1.24.4 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.4 (2024-10-03) - -* No change notes available for this release. - -# v1.23.3 (2024-09-27) - -* No change notes available for this release. - -# v1.23.2 (2024-09-25) - -* No change notes available for this release. - -# v1.23.1 (2024-09-23) - -* No change notes available for this release. - -# v1.23.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.8 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.22.7 (2024-09-04) - -* No change notes available for this release. - -# v1.22.6 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.5 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.4 (2024-07-18) - -* No change notes available for this release. - -# v1.22.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.21.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.12 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.11 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.10 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.9 (2024-05-23) - -* No change notes available for this release. - -# v1.20.8 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.7 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.6 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.20.5 (2024-04-05) - -* No change notes available for this release. - -# v1.20.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.19.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.19.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2024-01-18) - -* No change notes available for this release. - -# v1.18.6 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.18.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.18.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.4 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.17.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2023-10-02) - -* **Feature**: Fix FIPS Endpoints in aws-us-gov. - -# v1.14.1 (2023-09-22) - -* No change notes available for this release. - -# v1.14.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.13.6 (2023-08-31) - -* No change notes available for this release. - -# v1.13.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2023-08-01) - -* No change notes available for this release. - -# v1.13.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.14 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2023-06-15) - -* No change notes available for this release. - -# v1.12.11 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2023-05-04) - -* No change notes available for this release. - -# v1.12.9 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2023-04-10) - -* No change notes available for this release. - -# v1.12.7 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.5 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.12.3 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.12.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.11.28 (2022-12-20) - -* No change notes available for this release. - -# v1.11.27 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.26 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.25 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.24 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.23 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.22 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.21 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.20 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.19 (2022-08-30) - -* **Documentation**: Documentation updates for the AWS IAM Identity Center Portal CLI Reference. - -# v1.11.18 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.17 (2022-08-15) - -* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On) - -# v1.11.16 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.15 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.14 (2022-08-08) - -* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.13 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.12 (2022-07-11) - -* No change notes available for this release. - -# v1.11.11 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.10 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.9 (2022-06-16) - -* No change notes available for this release. - -# v1.11.8 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.7 (2022-05-26) - -* No change notes available for this release. - -# v1.11.6 (2022-05-25) - -* No change notes available for this release. - -# v1.11.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Documentation**: Updated API models -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-12-21) - -* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. - -# v1.6.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Feature**: Updated service to latest API model. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/sso/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go deleted file mode 100644 index 2c498e4689..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_client.go +++ /dev/null @@ -1,1019 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "SSO" -const ServiceAPIVersion = "2019-06-10" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sso") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sso") -} - -// Client provides the API client to make operations call for AWS Single Sign-On. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveInterceptors(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, func(o *Options) { - for _, opt := range cfg.ServiceOptions { - opt(ServiceID, o) - } - for _, opt := range optFns { - opt(o) - } - }) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func resolveInterceptors(cfg aws.Config, o *Options) { - o.Interceptors = cfg.Interceptors.Copy() -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sso", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sso") - }) - if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - -func addCredentialSource(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ - Interceptors: opts.Interceptors.BeforeRetryLoop, - }, "Retry", middleware.Before) -} - -func addInterceptAttempt(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ - BeforeAttempt: opts.Interceptors.BeforeAttempt, - AfterAttempt: opts.Interceptors.AfterAttempt, - }, "Retry", middleware.After) -} - -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go deleted file mode 100644 index df5dc1674f..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_GetRoleCredentials.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sso/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the STS short-term credentials for a given role name that is assigned -// to the user. -func (c *Client) GetRoleCredentials(ctx context.Context, params *GetRoleCredentialsInput, optFns ...func(*Options)) (*GetRoleCredentialsOutput, error) { - if params == nil { - params = &GetRoleCredentialsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetRoleCredentials", params, optFns, c.addOperationGetRoleCredentialsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetRoleCredentialsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetRoleCredentialsInput struct { - - // The token issued by the CreateToken API call. For more information, see [CreateToken] in the - // IAM Identity Center OIDC API Reference Guide. - // - // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html - // - // This member is required. - AccessToken *string - - // The identifier for the AWS account that is assigned to the user. - // - // This member is required. - AccountId *string - - // The friendly name of the role that is assigned to the user. - // - // This member is required. - RoleName *string - - noSmithyDocumentSerde -} - -type GetRoleCredentialsOutput struct { - - // The credentials for the role that is assigned to the user. - RoleCredentials *types.RoleCredentials - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetRoleCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetRoleCredentials{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetRoleCredentials{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetRoleCredentials"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetRoleCredentialsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetRoleCredentials(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetRoleCredentials(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetRoleCredentials", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go deleted file mode 100644 index 2a3b2ad902..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccountRoles.go +++ /dev/null @@ -1,299 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sso/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all roles that are assigned to the user for a given AWS account. -func (c *Client) ListAccountRoles(ctx context.Context, params *ListAccountRolesInput, optFns ...func(*Options)) (*ListAccountRolesOutput, error) { - if params == nil { - params = &ListAccountRolesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAccountRoles", params, optFns, c.addOperationListAccountRolesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAccountRolesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAccountRolesInput struct { - - // The token issued by the CreateToken API call. For more information, see [CreateToken] in the - // IAM Identity Center OIDC API Reference Guide. - // - // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html - // - // This member is required. - AccessToken *string - - // The identifier for the AWS account that is assigned to the user. - // - // This member is required. - AccountId *string - - // The number of items that clients can request per page. - MaxResults *int32 - - // The page token from the previous response output when you request subsequent - // pages. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAccountRolesOutput struct { - - // The page token client that is used to retrieve the list of accounts. - NextToken *string - - // A paginated response with the list of roles and the next token if more results - // are available. - RoleList []types.RoleInfo - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAccountRolesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccountRoles{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccountRoles{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccountRoles"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListAccountRolesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccountRoles(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAccountRolesPaginatorOptions is the paginator options for ListAccountRoles -type ListAccountRolesPaginatorOptions struct { - // The number of items that clients can request per page. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAccountRolesPaginator is a paginator for ListAccountRoles -type ListAccountRolesPaginator struct { - options ListAccountRolesPaginatorOptions - client ListAccountRolesAPIClient - params *ListAccountRolesInput - nextToken *string - firstPage bool -} - -// NewListAccountRolesPaginator returns a new ListAccountRolesPaginator -func NewListAccountRolesPaginator(client ListAccountRolesAPIClient, params *ListAccountRolesInput, optFns ...func(*ListAccountRolesPaginatorOptions)) *ListAccountRolesPaginator { - if params == nil { - params = &ListAccountRolesInput{} - } - - options := ListAccountRolesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAccountRolesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAccountRolesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAccountRoles page. -func (p *ListAccountRolesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountRolesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAccountRoles(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListAccountRolesAPIClient is a client that implements the ListAccountRoles -// operation. -type ListAccountRolesAPIClient interface { - ListAccountRoles(context.Context, *ListAccountRolesInput, ...func(*Options)) (*ListAccountRolesOutput, error) -} - -var _ ListAccountRolesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAccountRoles(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAccountRoles", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go deleted file mode 100644 index f6114a7c10..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_ListAccounts.go +++ /dev/null @@ -1,297 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sso/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all AWS accounts assigned to the user. These AWS accounts are assigned by -// the administrator of the account. For more information, see [Assign User Access]in the IAM Identity -// Center User Guide. This operation returns a paginated response. -// -// [Assign User Access]: https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers -func (c *Client) ListAccounts(ctx context.Context, params *ListAccountsInput, optFns ...func(*Options)) (*ListAccountsOutput, error) { - if params == nil { - params = &ListAccountsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAccounts", params, optFns, c.addOperationListAccountsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAccountsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAccountsInput struct { - - // The token issued by the CreateToken API call. For more information, see [CreateToken] in the - // IAM Identity Center OIDC API Reference Guide. - // - // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html - // - // This member is required. - AccessToken *string - - // This is the number of items clients can request per page. - MaxResults *int32 - - // (Optional) When requesting subsequent pages, this is the page token from the - // previous response output. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAccountsOutput struct { - - // A paginated response with the list of account information and the next token if - // more results are available. - AccountList []types.AccountInfo - - // The page token client that is used to retrieve the list of accounts. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAccountsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAccounts{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAccounts{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAccounts"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpListAccountsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAccounts(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAccountsPaginatorOptions is the paginator options for ListAccounts -type ListAccountsPaginatorOptions struct { - // This is the number of items clients can request per page. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAccountsPaginator is a paginator for ListAccounts -type ListAccountsPaginator struct { - options ListAccountsPaginatorOptions - client ListAccountsAPIClient - params *ListAccountsInput - nextToken *string - firstPage bool -} - -// NewListAccountsPaginator returns a new ListAccountsPaginator -func NewListAccountsPaginator(client ListAccountsAPIClient, params *ListAccountsInput, optFns ...func(*ListAccountsPaginatorOptions)) *ListAccountsPaginator { - if params == nil { - params = &ListAccountsInput{} - } - - options := ListAccountsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAccountsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAccountsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAccounts page. -func (p *ListAccountsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAccountsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAccounts(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListAccountsAPIClient is a client that implements the ListAccounts operation. -type ListAccountsAPIClient interface { - ListAccounts(context.Context, *ListAccountsInput, ...func(*Options)) (*ListAccountsOutput, error) -} - -var _ ListAccountsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAccounts(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAccounts", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go deleted file mode 100644 index 2c7f181c34..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/api_op_Logout.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes the locally stored SSO tokens from the client-side cache and sends an -// API call to the IAM Identity Center service to invalidate the corresponding -// server-side IAM Identity Center sign in session. -// -// If a user uses IAM Identity Center to access the AWS CLI, the user’s IAM -// Identity Center sign in session is used to obtain an IAM session, as specified -// in the corresponding IAM Identity Center permission set. More specifically, IAM -// Identity Center assumes an IAM role in the target account on behalf of the user, -// and the corresponding temporary AWS credentials are returned to the client. -// -// After user logout, any existing IAM role sessions that were created by using -// IAM Identity Center permission sets continue based on the duration configured in -// the permission set. For more information, see [User authentications]in the IAM Identity Center User -// Guide. -// -// [User authentications]: https://docs.aws.amazon.com/singlesignon/latest/userguide/authconcept.html -func (c *Client) Logout(ctx context.Context, params *LogoutInput, optFns ...func(*Options)) (*LogoutOutput, error) { - if params == nil { - params = &LogoutInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "Logout", params, optFns, c.addOperationLogoutMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*LogoutOutput) - out.ResultMetadata = metadata - return out, nil -} - -type LogoutInput struct { - - // The token issued by the CreateToken API call. For more information, see [CreateToken] in the - // IAM Identity Center OIDC API Reference Guide. - // - // [CreateToken]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html - // - // This member is required. - AccessToken *string - - noSmithyDocumentSerde -} - -type LogoutOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationLogoutMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpLogout{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpLogout{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "Logout"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpLogoutValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opLogout(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opLogout(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "Logout", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go deleted file mode 100644 index 708e53c5ad..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/auth.go +++ /dev/null @@ -1,363 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "slices" - "strings" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{ - "GetRoleCredentials": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "ListAccountRoles": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "ListAccounts": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "Logout": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, -} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "awsssoportal") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - sorted := sortAuthOptions(options, m.options.AuthSchemePreference) - for _, option := range sorted { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { - byPriority := make([]*smithyauth.Option, 0, len(options)) - for _, prefName := range preferred { - for _, option := range options { - optName := option.SchemeID - if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { - optName = parts[1] - } - if prefName == optName { - byPriority = append(byPriority, option) - } - } - } - for _, option := range options { - if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { - return o.SchemeID == option.SchemeID - }) { - byPriority = append(byPriority, option) - } - } - return byPriority -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go deleted file mode 100644 index a889f3c7a7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/deserializers.go +++ /dev/null @@ -1,1172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/sso/types" - smithy "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "io/ioutil" - "strings" -) - -type awsRestjson1_deserializeOpGetRoleCredentials struct { -} - -func (*awsRestjson1_deserializeOpGetRoleCredentials) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetRoleCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRoleCredentials(response, &metadata) - } - output := &GetRoleCredentialsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetRoleCredentialsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetRoleCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetRoleCredentialsOutput(v **GetRoleCredentialsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetRoleCredentialsOutput - if *v == nil { - sv = &GetRoleCredentialsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "roleCredentials": - if err := awsRestjson1_deserializeDocumentRoleCredentials(&sv.RoleCredentials, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAccountRoles struct { -} - -func (*awsRestjson1_deserializeOpListAccountRoles) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAccountRoles) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccountRoles(response, &metadata) - } - output := &ListAccountRolesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAccountRolesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAccountRoles(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAccountRolesOutput(v **ListAccountRolesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAccountRolesOutput - if *v == nil { - sv = &ListAccountRolesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "roleList": - if err := awsRestjson1_deserializeDocumentRoleListType(&sv.RoleList, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAccounts struct { -} - -func (*awsRestjson1_deserializeOpListAccounts) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccounts(response, &metadata) - } - output := &ListAccountsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAccountsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAccountsOutput(v **ListAccountsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAccountsOutput - if *v == nil { - sv = &ListAccountsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accountList": - if err := awsRestjson1_deserializeDocumentAccountListType(&sv.AccountList, value); err != nil { - return err - } - - case "nextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenType to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpLogout struct { -} - -func (*awsRestjson1_deserializeOpLogout) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpLogout) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorLogout(response, &metadata) - } - output := &LogoutOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorLogout(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - - case strings.EqualFold("UnauthorizedException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequestException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyRequestsException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorUnauthorizedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnauthorizedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentUnauthorizedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccountInfo(v **types.AccountInfo, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccountInfo - if *v == nil { - sv = &types.AccountInfo{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountIdType to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "accountName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountNameType to be of type string, got %T instead", value) - } - sv.AccountName = ptr.String(jtv) - } - - case "emailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailAddressType to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAccountListType(v *[]types.AccountInfo, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AccountInfo - if *v == nil { - cv = []types.AccountInfo{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AccountInfo - destAddr := &col - if err := awsRestjson1_deserializeDocumentAccountInfo(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidRequestException - if *v == nil { - sv = &types.InvalidRequestException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ResourceNotFoundException - if *v == nil { - sv = &types.ResourceNotFoundException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentRoleCredentials(v **types.RoleCredentials, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.RoleCredentials - if *v == nil { - sv = &types.RoleCredentials{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accessKeyId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccessKeyType to be of type string, got %T instead", value) - } - sv.AccessKeyId = ptr.String(jtv) - } - - case "expiration": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ExpirationTimestampType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Expiration = i64 - } - - case "secretAccessKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SecretAccessKeyType to be of type string, got %T instead", value) - } - sv.SecretAccessKey = ptr.String(jtv) - } - - case "sessionToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SessionTokenType to be of type string, got %T instead", value) - } - sv.SessionToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentRoleInfo(v **types.RoleInfo, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.RoleInfo - if *v == nil { - sv = &types.RoleInfo{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountIdType to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "roleName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RoleNameType to be of type string, got %T instead", value) - } - sv.RoleName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentRoleListType(v *[]types.RoleInfo, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.RoleInfo - if *v == nil { - cv = []types.RoleInfo{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.RoleInfo - destAddr := &col - if err := awsRestjson1_deserializeDocumentRoleInfo(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentTooManyRequestsException(v **types.TooManyRequestsException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.TooManyRequestsException - if *v == nil { - sv = &types.TooManyRequestsException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentUnauthorizedException(v **types.UnauthorizedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.UnauthorizedException - if *v == nil { - sv = &types.UnauthorizedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go deleted file mode 100644 index 7f6e429fda..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/doc.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package sso provides the API client, operations, and parameter types for AWS -// Single Sign-On. -// -// AWS IAM Identity Center (successor to AWS Single Sign-On) Portal is a web -// service that makes it easy for you to assign user access to IAM Identity Center -// resources such as the AWS access portal. Users can get AWS account applications -// and roles assigned to them and get federated into the application. -// -// Although AWS Single Sign-On was renamed, the sso and identitystore API -// namespaces will continue to retain their original name for backward -// compatibility purposes. For more information, see [IAM Identity Center rename]. -// -// This reference guide describes the IAM Identity Center Portal operations that -// you can call programatically and includes detailed information on data types and -// errors. -// -// AWS provides SDKs that consist of libraries and sample code for various -// programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android. -// The SDKs provide a convenient way to create programmatic access to IAM Identity -// Center and other AWS services. For more information about the AWS SDKs, -// including how to download and install them, see [Tools for Amazon Web Services]. -// -// [Tools for Amazon Web Services]: http://aws.amazon.com/tools/ -// [IAM Identity Center rename]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html#renamed -package sso diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go deleted file mode 100644 index 2b22ab779c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/endpoints.go +++ /dev/null @@ -1,558 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "awsssoportal" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_SSO") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SSO", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://portal.sso-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - if _PartitionResult.Name == "aws-us-gov" { - uriString := func() string { - var out strings.Builder - out.WriteString("https://portal.sso.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://portal.sso-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://portal.sso.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://portal.sso.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json deleted file mode 100644 index 1a88fe4df8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/generated.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_GetRoleCredentials.go", - "api_op_ListAccountRoles.go", - "api_op_ListAccounts.go", - "api_op_Logout.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "sra_operation_order_test.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.22", - "module": "github.com/aws/aws-sdk-go-v2/service/sso", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go deleted file mode 100644 index 3628768ce4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package sso - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.29.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go deleted file mode 100644 index 8bb8730be0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints/endpoints.go +++ /dev/null @@ -1,603 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver SSO endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsEusc *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "portal.sso.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "portal.sso-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.af-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "af-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-northeast-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-northeast-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-northeast-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-3", - }, - }, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-south-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-south-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-south-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-southeast-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-southeast-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-southeast-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-3", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-southeast-4.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-4", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-5", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ap-southeast-5.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-5", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-7", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "ca-west-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.ca-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-central-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-central-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-central-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-north-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-north-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-south-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-south-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-south-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{ - Hostname: "portal.sso.eu-west-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-3", - }, - }, - endpoints.EndpointKey{ - Region: "il-central-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.il-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "il-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "me-central-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.me-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "me-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.me-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "me-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "mx-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.sa-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "sa-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-east-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-2", - }, - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-2", - }, - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "portal.sso.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "portal.sso-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "cn-north-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.cn-north-1.amazonaws.com.cn", - CredentialScope: endpoints.CredentialScope{ - Region: "cn-north-1", - }, - }, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.cn-northwest-1.amazonaws.com.cn", - CredentialScope: endpoints.CredentialScope{ - Region: "cn-northwest-1", - }, - }, - }, - }, - { - ID: "aws-eusc", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsEusc, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "portal.sso.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "portal.sso-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "portal.sso-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "portal.sso.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-gov-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - }: endpoints.Endpoint{ - Hostname: "portal.sso.us-gov-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go deleted file mode 100644 index 277550af47..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/options.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Client registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - to.Interceptors = o.Interceptors.Copy() - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go deleted file mode 100644 index a7a5b57de0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/serializers.go +++ /dev/null @@ -1,309 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type awsRestjson1_serializeOpGetRoleCredentials struct { -} - -func (*awsRestjson1_serializeOpGetRoleCredentials) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetRoleCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetRoleCredentialsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/federation/credentials") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetRoleCredentialsInput(v *GetRoleCredentialsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccessToken != nil { - locationName := "X-Amz-Sso_bearer_token" - encoder.SetHeader(locationName).String(*v.AccessToken) - } - - if v.AccountId != nil { - encoder.SetQuery("account_id").String(*v.AccountId) - } - - if v.RoleName != nil { - encoder.SetQuery("role_name").String(*v.RoleName) - } - - return nil -} - -type awsRestjson1_serializeOpListAccountRoles struct { -} - -func (*awsRestjson1_serializeOpListAccountRoles) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAccountRoles) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAccountRolesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/assignment/roles") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAccountRolesInput(v *ListAccountRolesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccessToken != nil { - locationName := "X-Amz-Sso_bearer_token" - encoder.SetHeader(locationName).String(*v.AccessToken) - } - - if v.AccountId != nil { - encoder.SetQuery("account_id").String(*v.AccountId) - } - - if v.MaxResults != nil { - encoder.SetQuery("max_result").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next_token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListAccounts struct { -} - -func (*awsRestjson1_serializeOpListAccounts) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAccountsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/assignment/accounts") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAccountsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccessToken != nil { - locationName := "X-Amz-Sso_bearer_token" - encoder.SetHeader(locationName).String(*v.AccessToken) - } - - if v.MaxResults != nil { - encoder.SetQuery("max_result").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next_token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpLogout struct { -} - -func (*awsRestjson1_serializeOpLogout) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpLogout) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*LogoutInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/logout") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsLogoutInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsLogoutInput(v *LogoutInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccessToken != nil { - locationName := "X-Amz-Sso_bearer_token" - encoder.SetHeader(locationName).String(*v.AccessToken) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go deleted file mode 100644 index e97a126e8b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/errors.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// Indicates that a problem occurred with the input to the request. For example, a -// required parameter might be missing or out of range. -type InvalidRequestException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidRequestException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidRequestException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidRequestException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidRequestException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified resource doesn't exist. -type ResourceNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ResourceNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ResourceNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ResourceNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ResourceNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the request is being made too frequently and is more than what -// the server can handle. -type TooManyRequestsException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TooManyRequestsException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TooManyRequestsException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TooManyRequestsException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TooManyRequestsException" - } - return *e.ErrorCodeOverride -} -func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the request is not authorized. This can happen due to an invalid -// access token in the request. -type UnauthorizedException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *UnauthorizedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *UnauthorizedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *UnauthorizedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "UnauthorizedException" - } - return *e.ErrorCodeOverride -} -func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go deleted file mode 100644 index 07ac468e31..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/types/types.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" -) - -// Provides information about your AWS account. -type AccountInfo struct { - - // The identifier of the AWS account that is assigned to the user. - AccountId *string - - // The display name of the AWS account that is assigned to the user. - AccountName *string - - // The email address of the AWS account that is assigned to the user. - EmailAddress *string - - noSmithyDocumentSerde -} - -// Provides information about the role credentials that are assigned to the user. -type RoleCredentials struct { - - // The identifier used for the temporary security credentials. For more - // information, see [Using Temporary Security Credentials to Request Access to AWS Resources]in the AWS IAM User Guide. - // - // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html - AccessKeyId *string - - // The date on which temporary security credentials expire. - Expiration int64 - - // The key that is used to sign the request. For more information, see [Using Temporary Security Credentials to Request Access to AWS Resources] in the AWS - // IAM User Guide. - // - // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html - SecretAccessKey *string - - // The token used for temporary credentials. For more information, see [Using Temporary Security Credentials to Request Access to AWS Resources] in the AWS - // IAM User Guide. - // - // [Using Temporary Security Credentials to Request Access to AWS Resources]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html - SessionToken *string - - noSmithyDocumentSerde -} - -// Provides information about the role that is assigned to the user. -type RoleInfo struct { - - // The identifier of the AWS account assigned to the user. - AccountId *string - - // The friendly name of the role that is assigned to the user. - RoleName *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go deleted file mode 100644 index f6bf461f74..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sso/validators.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sso - -import ( - "context" - "fmt" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpGetRoleCredentials struct { -} - -func (*validateOpGetRoleCredentials) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetRoleCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetRoleCredentialsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetRoleCredentialsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAccountRoles struct { -} - -func (*validateOpListAccountRoles) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAccountRoles) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAccountRolesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAccountRolesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAccounts struct { -} - -func (*validateOpListAccounts) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAccounts) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAccountsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAccountsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpLogout struct { -} - -func (*validateOpLogout) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpLogout) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*LogoutInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpLogoutInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpGetRoleCredentialsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetRoleCredentials{}, middleware.After) -} - -func addOpListAccountRolesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAccountRoles{}, middleware.After) -} - -func addOpListAccountsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAccounts{}, middleware.After) -} - -func addOpLogoutValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpLogout{}, middleware.After) -} - -func validateOpGetRoleCredentialsInput(v *GetRoleCredentialsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetRoleCredentialsInput"} - if v.RoleName == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleName")) - } - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.AccessToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAccountRolesInput(v *ListAccountRolesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAccountRolesInput"} - if v.AccessToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) - } - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAccountsInput(v *ListAccountsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAccountsInput"} - if v.AccessToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpLogoutInput(v *LogoutInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "LogoutInput"} - if v.AccessToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md deleted file mode 100644 index dc5e399a88..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/CHANGELOG.md +++ /dev/null @@ -1,671 +0,0 @@ -# v1.35.1 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.0 (2025-09-23) - -* **Feature**: This release includes exception definition and documentation updates. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.5 (2025-09-22) - -* No change notes available for this release. - -# v1.34.4 (2025-09-10) - -* No change notes available for this release. - -# v1.34.3 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.2 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.1 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.0 (2025-08-26) - -* **Feature**: Remove incorrect endpoint tests - -# v1.33.2 (2025-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.1 (2025-08-20) - -* **Bug Fix**: Remove unused deserialization code. - -# v1.33.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.0 (2025-08-04) - -* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.4 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.3 (2025-06-17) - -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.2 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.1 (2025-04-03) - -* No change notes available for this release. - -# v1.30.0 (2025-03-27) - -* **Feature**: This release adds AwsAdditionalDetails in the CreateTokenWithIAM API response. - -# v1.29.2 (2025-03-24) - -* No change notes available for this release. - -# v1.29.1 (2025-03-04.2) - -* **Bug Fix**: Add assurance test for operation order. - -# v1.29.0 (2025-02-27) - -* **Feature**: Track credential providers via User-Agent Feature ids -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.15 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.14 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.13 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.12 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.11 (2025-01-24) - -* **Documentation**: Fixed typos in the descriptions. -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.28.10 (2025-01-17) - -* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. - -# v1.28.9 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.8 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.7 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.6 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.5 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.4 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.4 (2024-10-03) - -* No change notes available for this release. - -# v1.27.3 (2024-09-27) - -* No change notes available for this release. - -# v1.27.2 (2024-09-25) - -* No change notes available for this release. - -# v1.27.1 (2024-09-23) - -* No change notes available for this release. - -# v1.27.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.8 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.26.7 (2024-09-04) - -* No change notes available for this release. - -# v1.26.6 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.5 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.4 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.3 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.2 (2024-07-03) - -* No change notes available for this release. - -# v1.26.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.25.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.6 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.5 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.4 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.3 (2024-05-23) - -* No change notes available for this release. - -# v1.24.2 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.1 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2024-05-10) - -* **Feature**: Updated request parameters for PKCE support. - -# v1.23.5 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.23.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.22.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.22.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.7 (2024-01-16) - -* No change notes available for this release. - -# v1.21.6 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.21.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.21.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.3 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.2 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.20.1 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2023-11-17) - -* **Feature**: Adding support for `sso-oauth:CreateTokenWithIAM`. - -# v1.19.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.3 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.2 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.1 (2023-09-22) - -* No change notes available for this release. - -# v1.17.0 (2023-09-20) - -* **Feature**: Update FIPS endpoints in aws-us-gov. - -# v1.16.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.15.6 (2023-09-05) - -* No change notes available for this release. - -# v1.15.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-08-01) - -* No change notes available for this release. - -# v1.15.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.14 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.13 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.12 (2023-06-15) - -* No change notes available for this release. - -# v1.14.11 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.10 (2023-05-04) - -* No change notes available for this release. - -# v1.14.9 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.8 (2023-04-10) - -* No change notes available for this release. - -# v1.14.7 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.6 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.5 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.4 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.14.3 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.2 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.14.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.13.11 (2022-12-19) - -* No change notes available for this release. - -# v1.13.10 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.9 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.7 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2022-09-30) - -* **Documentation**: Documentation updates for the IAM Identity Center OIDC CLI Reference. - -# v1.13.5 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.3 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.1 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-08-25) - -* **Feature**: Updated required request parameters on IAM Identity Center's OIDC CreateToken action. - -# v1.12.14 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.13 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.12 (2022-08-08) - -* **Documentation**: Documentation updates to reflect service rename - AWS IAM Identity Center (successor to AWS Single Sign-On) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.11 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.10 (2022-07-11) - -* No change notes available for this release. - -# v1.12.9 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.8 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.7 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.6 (2022-05-27) - -* No change notes available for this release. - -# v1.12.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-01-07) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-10-11) - -* **Feature**: API client updated -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-09-17) - -* **Feature**: Updated API client and endpoints to latest revision. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-27) - -* **Feature**: Updated API model to latest revision. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/ssooidc/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go deleted file mode 100644 index 12ad2f5d9d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_client.go +++ /dev/null @@ -1,1019 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "SSO OIDC" -const ServiceAPIVersion = "2019-06-10" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/ssooidc") -} - -// Client provides the API client to make operations call for AWS SSO OIDC. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveInterceptors(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, func(o *Options) { - for _, opt := range cfg.ServiceOptions { - opt(ServiceID, o) - } - for _, opt := range optFns { - opt(o) - } - }) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func resolveInterceptors(cfg aws.Config, o *Options) { - o.Interceptors = cfg.Interceptors.Copy() -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "ssooidc", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/ssooidc") - }) - if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - -func addCredentialSource(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ - Interceptors: opts.Interceptors.BeforeRetryLoop, - }, "Retry", middleware.Before) -} - -func addInterceptAttempt(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ - BeforeAttempt: opts.Interceptors.BeforeAttempt, - AfterAttempt: opts.Interceptors.AfterAttempt, - }, "Retry", middleware.After) -} - -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go deleted file mode 100644 index 681eb4087c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateToken.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates and returns access and refresh tokens for clients that are -// authenticated using client secrets. The access token can be used to fetch -// short-lived credentials for the assigned AWS accounts or to access application -// APIs using bearer authentication. -func (c *Client) CreateToken(ctx context.Context, params *CreateTokenInput, optFns ...func(*Options)) (*CreateTokenOutput, error) { - if params == nil { - params = &CreateTokenInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateToken", params, optFns, c.addOperationCreateTokenMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTokenOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTokenInput struct { - - // The unique identifier string for the client or application. This value comes - // from the result of the RegisterClientAPI. - // - // This member is required. - ClientId *string - - // A secret string generated for the client. This value should come from the - // persisted result of the RegisterClientAPI. - // - // This member is required. - ClientSecret *string - - // Supports the following OAuth grant types: Authorization Code, Device Code, and - // Refresh Token. Specify one of the following values, depending on the grant type - // that you want: - // - // * Authorization Code - authorization_code - // - // * Device Code - urn:ietf:params:oauth:grant-type:device_code - // - // * Refresh Token - refresh_token - // - // This member is required. - GrantType *string - - // Used only when calling this API for the Authorization Code grant type. The - // short-lived code is used to identify this authorization request. - Code *string - - // Used only when calling this API for the Authorization Code grant type. This - // value is generated by the client and presented to validate the original code - // challenge value the client passed at authorization time. - CodeVerifier *string - - // Used only when calling this API for the Device Code grant type. This - // short-lived code is used to identify this authorization request. This comes from - // the result of the StartDeviceAuthorizationAPI. - DeviceCode *string - - // Used only when calling this API for the Authorization Code grant type. This - // value specifies the location of the client or application that has registered to - // receive the authorization code. - RedirectUri *string - - // Used only when calling this API for the Refresh Token grant type. This token is - // used to refresh short-lived tokens, such as the access token, that might expire. - // - // For more information about the features and limitations of the current IAM - // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the [IAM Identity Center OIDC API Reference]. - // - // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html - RefreshToken *string - - // The list of scopes for which authorization is requested. This parameter has no - // effect; the access token will always include all scopes configured during client - // registration. - Scope []string - - noSmithyDocumentSerde -} - -type CreateTokenOutput struct { - - // A bearer token to access Amazon Web Services accounts and applications assigned - // to a user. - AccessToken *string - - // Indicates the time in seconds when an access token will expire. - ExpiresIn int32 - - // The idToken is not implemented or supported. For more information about the - // features and limitations of the current IAM Identity Center OIDC implementation, - // see Considerations for Using this Guide in the [IAM Identity Center OIDC API Reference]. - // - // A JSON Web Token (JWT) that identifies who is associated with the issued access - // token. - // - // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html - IdToken *string - - // A token that, if present, can be used to refresh a previously issued access - // token that might have expired. - // - // For more information about the features and limitations of the current IAM - // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the [IAM Identity Center OIDC API Reference]. - // - // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html - RefreshToken *string - - // Used to notify the client that the returned token is an access token. The - // supported token type is Bearer . - TokenType *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateToken{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateToken{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateTokenValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go deleted file mode 100644 index d7a27da595..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_CreateTokenWithIAM.go +++ /dev/null @@ -1,318 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/ssooidc/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates and returns access and refresh tokens for authorized client -// applications that are authenticated using any IAM entity, such as a service role -// or user. These tokens might contain defined scopes that specify permissions such -// as read:profile or write:data . Through downscoping, you can use the scopes -// parameter to request tokens with reduced permissions compared to the original -// client application's permissions or, if applicable, the refresh token's scopes. -// The access token can be used to fetch short-lived credentials for the assigned -// Amazon Web Services accounts or to access application APIs using bearer -// authentication. -// -// This API is used with Signature Version 4. For more information, see [Amazon Web Services Signature Version 4 for API Requests]. -// -// [Amazon Web Services Signature Version 4 for API Requests]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html -func (c *Client) CreateTokenWithIAM(ctx context.Context, params *CreateTokenWithIAMInput, optFns ...func(*Options)) (*CreateTokenWithIAMOutput, error) { - if params == nil { - params = &CreateTokenWithIAMInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateTokenWithIAM", params, optFns, c.addOperationCreateTokenWithIAMMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateTokenWithIAMOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateTokenWithIAMInput struct { - - // The unique identifier string for the client or application. This value is an - // application ARN that has OAuth grants configured. - // - // This member is required. - ClientId *string - - // Supports the following OAuth grant types: Authorization Code, Refresh Token, - // JWT Bearer, and Token Exchange. Specify one of the following values, depending - // on the grant type that you want: - // - // * Authorization Code - authorization_code - // - // * Refresh Token - refresh_token - // - // * JWT Bearer - urn:ietf:params:oauth:grant-type:jwt-bearer - // - // * Token Exchange - urn:ietf:params:oauth:grant-type:token-exchange - // - // This member is required. - GrantType *string - - // Used only when calling this API for the JWT Bearer grant type. This value - // specifies the JSON Web Token (JWT) issued by a trusted token issuer. To - // authorize a trusted token issuer, configure the JWT Bearer GrantOptions for the - // application. - Assertion *string - - // Used only when calling this API for the Authorization Code grant type. This - // short-lived code is used to identify this authorization request. The code is - // obtained through a redirect from IAM Identity Center to a redirect URI persisted - // in the Authorization Code GrantOptions for the application. - Code *string - - // Used only when calling this API for the Authorization Code grant type. This - // value is generated by the client and presented to validate the original code - // challenge value the client passed at authorization time. - CodeVerifier *string - - // Used only when calling this API for the Authorization Code grant type. This - // value specifies the location of the client or application that has registered to - // receive the authorization code. - RedirectUri *string - - // Used only when calling this API for the Refresh Token grant type. This token is - // used to refresh short-lived tokens, such as the access token, that might expire. - // - // For more information about the features and limitations of the current IAM - // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the [IAM Identity Center OIDC API Reference]. - // - // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html - RefreshToken *string - - // Used only when calling this API for the Token Exchange grant type. This value - // specifies the type of token that the requester can receive. The following values - // are supported: - // - // * Access Token - urn:ietf:params:oauth:token-type:access_token - // - // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token - RequestedTokenType *string - - // The list of scopes for which authorization is requested. The access token that - // is issued is limited to the scopes that are granted. If the value is not - // specified, IAM Identity Center authorizes all scopes configured for the - // application, including the following default scopes: openid , aws , - // sts:identity_context . - Scope []string - - // Used only when calling this API for the Token Exchange grant type. This value - // specifies the subject of the exchange. The value of the subject token must be an - // access token issued by IAM Identity Center to a different client or application. - // The access token must have authorized scopes that indicate the requested - // application as a target audience. - SubjectToken *string - - // Used only when calling this API for the Token Exchange grant type. This value - // specifies the type of token that is passed as the subject of the exchange. The - // following value is supported: - // - // * Access Token - urn:ietf:params:oauth:token-type:access_token - SubjectTokenType *string - - noSmithyDocumentSerde -} - -type CreateTokenWithIAMOutput struct { - - // A bearer token to access Amazon Web Services accounts and applications assigned - // to a user. - AccessToken *string - - // A structure containing information from IAM Identity Center managed user and - // group information. - AwsAdditionalDetails *types.AwsAdditionalDetails - - // Indicates the time in seconds when an access token will expire. - ExpiresIn int32 - - // A JSON Web Token (JWT) that identifies the user associated with the issued - // access token. - IdToken *string - - // Indicates the type of tokens that are issued by IAM Identity Center. The - // following values are supported: - // - // * Access Token - urn:ietf:params:oauth:token-type:access_token - // - // * Refresh Token - urn:ietf:params:oauth:token-type:refresh_token - IssuedTokenType *string - - // A token that, if present, can be used to refresh a previously issued access - // token that might have expired. - // - // For more information about the features and limitations of the current IAM - // Identity Center OIDC implementation, see Considerations for Using this Guide in - // the [IAM Identity Center OIDC API Reference]. - // - // [IAM Identity Center OIDC API Reference]: https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/Welcome.html - RefreshToken *string - - // The list of scopes for which authorization is granted. The access token that is - // issued is limited to the scopes that are granted. - Scope []string - - // Used to notify the requester that the returned token is an access token. The - // supported token type is Bearer . - TokenType *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateTokenWithIAMMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTokenWithIAM{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTokenWithIAM{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTokenWithIAM"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpCreateTokenWithIAMValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTokenWithIAM(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateTokenWithIAM(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateTokenWithIAM", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go deleted file mode 100644 index 8d50092fb1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_RegisterClient.go +++ /dev/null @@ -1,242 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Registers a public client with IAM Identity Center. This allows clients to -// perform authorization using the authorization code grant with Proof Key for Code -// Exchange (PKCE) or the device code grant. -func (c *Client) RegisterClient(ctx context.Context, params *RegisterClientInput, optFns ...func(*Options)) (*RegisterClientOutput, error) { - if params == nil { - params = &RegisterClientInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RegisterClient", params, optFns, c.addOperationRegisterClientMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RegisterClientOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RegisterClientInput struct { - - // The friendly name of the client. - // - // This member is required. - ClientName *string - - // The type of client. The service supports only public as a client type. Anything - // other than public will be rejected by the service. - // - // This member is required. - ClientType *string - - // This IAM Identity Center application ARN is used to define - // administrator-managed configuration for public client access to resources. At - // authorization, the scopes, grants, and redirect URI available to this client - // will be restricted by this application resource. - EntitledApplicationArn *string - - // The list of OAuth 2.0 grant types that are defined by the client. This list is - // used to restrict the token granting flows available to the client. Supports the - // following OAuth 2.0 grant types: Authorization Code, Device Code, and Refresh - // Token. - // - // * Authorization Code - authorization_code - // - // * Device Code - urn:ietf:params:oauth:grant-type:device_code - // - // * Refresh Token - refresh_token - GrantTypes []string - - // The IAM Identity Center Issuer URL associated with an instance of IAM Identity - // Center. This value is needed for user access to resources through the client. - IssuerUrl *string - - // The list of redirect URI that are defined by the client. At completion of - // authorization, this list is used to restrict what locations the user agent can - // be redirected back to. - RedirectUris []string - - // The list of scopes that are defined by the client. Upon authorization, this - // list is used to restrict permissions when granting an access token. - Scopes []string - - noSmithyDocumentSerde -} - -type RegisterClientOutput struct { - - // An endpoint that the client can use to request authorization. - AuthorizationEndpoint *string - - // The unique identifier string for each client. This client uses this identifier - // to get authenticated by the service in subsequent calls. - ClientId *string - - // Indicates the time at which the clientId and clientSecret were issued. - ClientIdIssuedAt int64 - - // A secret string generated for the client. The client will use this string to - // get authenticated by the service in subsequent calls. - ClientSecret *string - - // Indicates the time at which the clientId and clientSecret will become invalid. - ClientSecretExpiresAt int64 - - // An endpoint that the client can use to create tokens. - TokenEndpoint *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRegisterClientMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpRegisterClient{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRegisterClient{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RegisterClient"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpRegisterClientValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRegisterClient(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opRegisterClient(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RegisterClient", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go deleted file mode 100644 index 7242ac82b6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/api_op_StartDeviceAuthorization.go +++ /dev/null @@ -1,224 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Initiates device authorization by requesting a pair of verification codes from -// the authorization service. -func (c *Client) StartDeviceAuthorization(ctx context.Context, params *StartDeviceAuthorizationInput, optFns ...func(*Options)) (*StartDeviceAuthorizationOutput, error) { - if params == nil { - params = &StartDeviceAuthorizationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartDeviceAuthorization", params, optFns, c.addOperationStartDeviceAuthorizationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartDeviceAuthorizationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartDeviceAuthorizationInput struct { - - // The unique identifier string for the client that is registered with IAM - // Identity Center. This value should come from the persisted result of the RegisterClientAPI - // operation. - // - // This member is required. - ClientId *string - - // A secret string that is generated for the client. This value should come from - // the persisted result of the RegisterClientAPI operation. - // - // This member is required. - ClientSecret *string - - // The URL for the Amazon Web Services access portal. For more information, see [Using the Amazon Web Services access portal] - // in the IAM Identity Center User Guide. - // - // [Using the Amazon Web Services access portal]: https://docs.aws.amazon.com/singlesignon/latest/userguide/using-the-portal.html - // - // This member is required. - StartUrl *string - - noSmithyDocumentSerde -} - -type StartDeviceAuthorizationOutput struct { - - // The short-lived code that is used by the device when polling for a session - // token. - DeviceCode *string - - // Indicates the number of seconds in which the verification code will become - // invalid. - ExpiresIn int32 - - // Indicates the number of seconds the client must wait between attempts when - // polling for a session. - Interval int32 - - // A one-time user verification code. This is needed to authorize an in-use device. - UserCode *string - - // The URI of the verification page that takes the userCode to authorize the - // device. - VerificationUri *string - - // An alternate URL that the client can use to automatically launch a browser. - // This process skips the manual step in which the user visits the verification - // page and enters their code. - VerificationUriComplete *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartDeviceAuthorizationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStartDeviceAuthorization{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartDeviceAuthorization{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartDeviceAuthorization"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpStartDeviceAuthorizationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartDeviceAuthorization(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStartDeviceAuthorization(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartDeviceAuthorization", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go deleted file mode 100644 index 89b01c629d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/auth.go +++ /dev/null @@ -1,357 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "slices" - "strings" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{ - "CreateToken": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "RegisterClient": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "StartDeviceAuthorization": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, -} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "sso-oauth") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - sorted := sortAuthOptions(options, m.options.AuthSchemePreference) - for _, option := range sorted { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { - byPriority := make([]*smithyauth.Option, 0, len(options)) - for _, prefName := range preferred { - for _, option := range options { - optName := option.SchemeID - if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { - optName = parts[1] - } - if prefName == optName { - byPriority = append(byPriority, option) - } - } - } - for _, option := range options { - if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { - return o.SchemeID == option.SchemeID - }) { - byPriority = append(byPriority, option) - } - } - return byPriority -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go deleted file mode 100644 index fb9a0df519..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/deserializers.go +++ /dev/null @@ -1,2244 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/ssooidc/types" - smithy "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "strings" -) - -type awsRestjson1_deserializeOpCreateToken struct { -} - -func (*awsRestjson1_deserializeOpCreateToken) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateToken(response, &metadata) - } - output := &CreateTokenOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateTokenOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AuthorizationPendingException", errorCode): - return awsRestjson1_deserializeErrorAuthorizationPendingException(response, errorBody) - - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsRestjson1_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("InvalidClientException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody) - - case strings.EqualFold("InvalidGrantException", errorCode): - return awsRestjson1_deserializeErrorInvalidGrantException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("InvalidScopeException", errorCode): - return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody) - - case strings.EqualFold("SlowDownException", errorCode): - return awsRestjson1_deserializeErrorSlowDownException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - case strings.EqualFold("UnsupportedGrantTypeException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateTokenOutput(v **CreateTokenOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateTokenOutput - if *v == nil { - sv = &CreateTokenOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accessToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccessToken to be of type string, got %T instead", value) - } - sv.AccessToken = ptr.String(jtv) - } - - case "expiresIn": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ExpiresIn = int32(i64) - } - - case "idToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IdToken to be of type string, got %T instead", value) - } - sv.IdToken = ptr.String(jtv) - } - - case "refreshToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value) - } - sv.RefreshToken = ptr.String(jtv) - } - - case "tokenType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TokenType to be of type string, got %T instead", value) - } - sv.TokenType = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateTokenWithIAM struct { -} - -func (*awsRestjson1_deserializeOpCreateTokenWithIAM) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpCreateTokenWithIAM) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateTokenWithIAM(response, &metadata) - } - output := &CreateTokenWithIAMOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateTokenWithIAMOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorCreateTokenWithIAM(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("AuthorizationPendingException", errorCode): - return awsRestjson1_deserializeErrorAuthorizationPendingException(response, errorBody) - - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsRestjson1_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("InvalidClientException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody) - - case strings.EqualFold("InvalidGrantException", errorCode): - return awsRestjson1_deserializeErrorInvalidGrantException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("InvalidRequestRegionException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestRegionException(response, errorBody) - - case strings.EqualFold("InvalidScopeException", errorCode): - return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody) - - case strings.EqualFold("SlowDownException", errorCode): - return awsRestjson1_deserializeErrorSlowDownException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - case strings.EqualFold("UnsupportedGrantTypeException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentCreateTokenWithIAMOutput(v **CreateTokenWithIAMOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateTokenWithIAMOutput - if *v == nil { - sv = &CreateTokenWithIAMOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "accessToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccessToken to be of type string, got %T instead", value) - } - sv.AccessToken = ptr.String(jtv) - } - - case "awsAdditionalDetails": - if err := awsRestjson1_deserializeDocumentAwsAdditionalDetails(&sv.AwsAdditionalDetails, value); err != nil { - return err - } - - case "expiresIn": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ExpiresIn = int32(i64) - } - - case "idToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IdToken to be of type string, got %T instead", value) - } - sv.IdToken = ptr.String(jtv) - } - - case "issuedTokenType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TokenTypeURI to be of type string, got %T instead", value) - } - sv.IssuedTokenType = ptr.String(jtv) - } - - case "refreshToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RefreshToken to be of type string, got %T instead", value) - } - sv.RefreshToken = ptr.String(jtv) - } - - case "scope": - if err := awsRestjson1_deserializeDocumentScopes(&sv.Scope, value); err != nil { - return err - } - - case "tokenType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TokenType to be of type string, got %T instead", value) - } - sv.TokenType = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpRegisterClient struct { -} - -func (*awsRestjson1_deserializeOpRegisterClient) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRegisterClient) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegisterClient(response, &metadata) - } - output := &RegisterClientOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentRegisterClientOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRegisterClient(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("InvalidClientMetadataException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientMetadataException(response, errorBody) - - case strings.EqualFold("InvalidRedirectUriException", errorCode): - return awsRestjson1_deserializeErrorInvalidRedirectUriException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("InvalidScopeException", errorCode): - return awsRestjson1_deserializeErrorInvalidScopeException(response, errorBody) - - case strings.EqualFold("SlowDownException", errorCode): - return awsRestjson1_deserializeErrorSlowDownException(response, errorBody) - - case strings.EqualFold("UnsupportedGrantTypeException", errorCode): - return awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentRegisterClientOutput(v **RegisterClientOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RegisterClientOutput - if *v == nil { - sv = &RegisterClientOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "authorizationEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected URI to be of type string, got %T instead", value) - } - sv.AuthorizationEndpoint = ptr.String(jtv) - } - - case "clientId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientId to be of type string, got %T instead", value) - } - sv.ClientId = ptr.String(jtv) - } - - case "clientIdIssuedAt": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ClientIdIssuedAt = i64 - } - - case "clientSecret": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientSecret to be of type string, got %T instead", value) - } - sv.ClientSecret = ptr.String(jtv) - } - - case "clientSecretExpiresAt": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LongTimeStampType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ClientSecretExpiresAt = i64 - } - - case "tokenEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected URI to be of type string, got %T instead", value) - } - sv.TokenEndpoint = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpStartDeviceAuthorization struct { -} - -func (*awsRestjson1_deserializeOpStartDeviceAuthorization) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartDeviceAuthorization) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response, &metadata) - } - output := &StartDeviceAuthorizationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartDeviceAuthorization(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("InvalidClientException", errorCode): - return awsRestjson1_deserializeErrorInvalidClientException(response, errorBody) - - case strings.EqualFold("InvalidRequestException", errorCode): - return awsRestjson1_deserializeErrorInvalidRequestException(response, errorBody) - - case strings.EqualFold("SlowDownException", errorCode): - return awsRestjson1_deserializeErrorSlowDownException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentStartDeviceAuthorizationOutput(v **StartDeviceAuthorizationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *StartDeviceAuthorizationOutput - if *v == nil { - sv = &StartDeviceAuthorizationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "deviceCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DeviceCode to be of type string, got %T instead", value) - } - sv.DeviceCode = ptr.String(jtv) - } - - case "expiresIn": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ExpirationInSeconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ExpiresIn = int32(i64) - } - - case "interval": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected IntervalInSeconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Interval = int32(i64) - } - - case "userCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserCode to be of type string, got %T instead", value) - } - sv.UserCode = ptr.String(jtv) - } - - case "verificationUri": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected URI to be of type string, got %T instead", value) - } - sv.VerificationUri = ptr.String(jtv) - } - - case "verificationUriComplete": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected URI to be of type string, got %T instead", value) - } - sv.VerificationUriComplete = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorAuthorizationPendingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AuthorizationPendingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAuthorizationPendingException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ExpiredTokenException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentExpiredTokenException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidClientException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidClientException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidClientMetadataException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidClientMetadataException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidClientMetadataException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidGrantException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidGrantException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidGrantException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidRedirectUriException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRedirectUriException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidRedirectUriException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequestException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidRequestException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidRequestRegionException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidRequestRegionException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidRequestRegionException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInvalidScopeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidScopeException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentInvalidScopeException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorSlowDownException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.SlowDownException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentSlowDownException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnauthorizedClientException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentUnauthorizedClientException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorUnsupportedGrantTypeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnsupportedGrantTypeException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccessDeniedException - if *v == nil { - sv = &types.AccessDeniedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - case "reason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccessDeniedExceptionReason to be of type string, got %T instead", value) - } - sv.Reason = types.AccessDeniedExceptionReason(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAuthorizationPendingException(v **types.AuthorizationPendingException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AuthorizationPendingException - if *v == nil { - sv = &types.AuthorizationPendingException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAwsAdditionalDetails(v **types.AwsAdditionalDetails, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AwsAdditionalDetails - if *v == nil { - sv = &types.AwsAdditionalDetails{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "identityContext": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected IdentityContext to be of type string, got %T instead", value) - } - sv.IdentityContext = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ExpiredTokenException - if *v == nil { - sv = &types.ExpiredTokenException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InternalServerException - if *v == nil { - sv = &types.InternalServerException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidClientException(v **types.InvalidClientException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidClientException - if *v == nil { - sv = &types.InvalidClientException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidClientMetadataException(v **types.InvalidClientMetadataException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidClientMetadataException - if *v == nil { - sv = &types.InvalidClientMetadataException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidGrantException(v **types.InvalidGrantException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidGrantException - if *v == nil { - sv = &types.InvalidGrantException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidRedirectUriException(v **types.InvalidRedirectUriException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidRedirectUriException - if *v == nil { - sv = &types.InvalidRedirectUriException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidRequestException(v **types.InvalidRequestException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidRequestException - if *v == nil { - sv = &types.InvalidRequestException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - case "reason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InvalidRequestExceptionReason to be of type string, got %T instead", value) - } - sv.Reason = types.InvalidRequestExceptionReason(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidRequestRegionException(v **types.InvalidRequestRegionException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidRequestRegionException - if *v == nil { - sv = &types.InvalidRequestRegionException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "endpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Location to be of type string, got %T instead", value) - } - sv.Endpoint = ptr.String(jtv) - } - - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - case "region": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Region to be of type string, got %T instead", value) - } - sv.Region = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvalidScopeException(v **types.InvalidScopeException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InvalidScopeException - if *v == nil { - sv = &types.InvalidScopeException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentScopes(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Scope to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentSlowDownException(v **types.SlowDownException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SlowDownException - if *v == nil { - sv = &types.SlowDownException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.UnauthorizedClientException - if *v == nil { - sv = &types.UnauthorizedClientException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentUnsupportedGrantTypeException(v **types.UnsupportedGrantTypeException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.UnsupportedGrantTypeException - if *v == nil { - sv = &types.UnsupportedGrantTypeException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "error": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Error to be of type string, got %T instead", value) - } - sv.Error_ = ptr.String(jtv) - } - - case "error_description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorDescription to be of type string, got %T instead", value) - } - sv.Error_description = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go deleted file mode 100644 index aa9cf731d4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/doc.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package ssooidc provides the API client, operations, and parameter types for -// AWS SSO OIDC. -// -// IAM Identity Center OpenID Connect (OIDC) is a web service that enables a -// client (such as CLI or a native application) to register with IAM Identity -// Center. The service also enables the client to fetch the user’s access token -// upon successful authentication and authorization with IAM Identity Center. -// -// # API namespaces -// -// IAM Identity Center uses the sso and identitystore API namespaces. IAM Identity -// Center OpenID Connect uses the sso-oauth namespace. -// -// # Considerations for using this guide -// -// Before you begin using this guide, we recommend that you first review the -// following important information about how the IAM Identity Center OIDC service -// works. -// -// - The IAM Identity Center OIDC service currently implements only the portions -// of the OAuth 2.0 Device Authorization Grant standard ([https://tools.ietf.org/html/rfc8628] ) that are necessary to -// enable single sign-on authentication with the CLI. -// -// - With older versions of the CLI, the service only emits OIDC access tokens, -// so to obtain a new token, users must explicitly re-authenticate. To access the -// OIDC flow that supports token refresh and doesn’t require re-authentication, -// update to the latest CLI version (1.27.10 for CLI V1 and 2.9.0 for CLI V2) with -// support for OIDC token refresh and configurable IAM Identity Center session -// durations. For more information, see [Configure Amazon Web Services access portal session duration]. -// -// - The access tokens provided by this service grant access to all Amazon Web -// Services account entitlements assigned to an IAM Identity Center user, not just -// a particular application. -// -// - The documentation in this guide does not describe the mechanism to convert -// the access token into Amazon Web Services Auth (“sigv4”) credentials for use -// with IAM-protected Amazon Web Services service endpoints. For more information, -// see [GetRoleCredentials]in the IAM Identity Center Portal API Reference Guide. -// -// For general information about IAM Identity Center, see [What is IAM Identity Center?] in the IAM Identity -// Center User Guide. -// -// [Configure Amazon Web Services access portal session duration]: https://docs.aws.amazon.com/singlesignon/latest/userguide/configure-user-session.html -// [GetRoleCredentials]: https://docs.aws.amazon.com/singlesignon/latest/PortalAPIReference/API_GetRoleCredentials.html -// [https://tools.ietf.org/html/rfc8628]: https://tools.ietf.org/html/rfc8628 -// [What is IAM Identity Center?]: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html -package ssooidc diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go deleted file mode 100644 index 1e001f7a9e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/endpoints.go +++ /dev/null @@ -1,558 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "sso-oauth" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_SSO_OIDC") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "SSO OIDC", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://oidc-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - if _PartitionResult.Name == "aws-us-gov" { - uriString := func() string { - var out strings.Builder - out.WriteString("https://oidc.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://oidc-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://oidc.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://oidc.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json deleted file mode 100644 index f3b0b242ac..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/generated.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_CreateToken.go", - "api_op_CreateTokenWithIAM.go", - "api_op_RegisterClient.go", - "api_op_StartDeviceAuthorization.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "sra_operation_order_test.go", - "types/enums.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.22", - "module": "github.com/aws/aws-sdk-go-v2/service/ssooidc", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go deleted file mode 100644 index 765f6371da..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package ssooidc - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.35.1" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go deleted file mode 100644 index f15c1a3ff5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints/endpoints.go +++ /dev/null @@ -1,603 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver SSO OIDC endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsEusc *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "oidc.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "oidc-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{ - Hostname: "oidc.af-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "af-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-northeast-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-northeast-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-northeast-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-northeast-3", - }, - }, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-south-2", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-south-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-south-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-southeast-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-1", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-southeast-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-2", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-southeast-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-3", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-southeast-4.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-4", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-5", - }: endpoints.Endpoint{ - Hostname: "oidc.ap-southeast-5.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ap-southeast-5", - }, - }, - endpoints.EndpointKey{ - Region: "ap-southeast-7", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ca-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "ca-west-1", - }: endpoints.Endpoint{ - Hostname: "oidc.ca-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "ca-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-central-2", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-central-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-central-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-north-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-north-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-south-2", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-south-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-south-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-2", - }, - }, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{ - Hostname: "oidc.eu-west-3.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "eu-west-3", - }, - }, - endpoints.EndpointKey{ - Region: "il-central-1", - }: endpoints.Endpoint{ - Hostname: "oidc.il-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "il-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "me-central-1", - }: endpoints.Endpoint{ - Hostname: "oidc.me-central-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "me-central-1", - }, - }, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{ - Hostname: "oidc.me-south-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "me-south-1", - }, - }, - endpoints.EndpointKey{ - Region: "mx-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{ - Hostname: "oidc.sa-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "sa-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{ - Hostname: "oidc.us-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{ - Hostname: "oidc.us-east-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-2", - }, - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{ - Hostname: "oidc.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{ - Hostname: "oidc.us-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-2", - }, - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "oidc.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "oidc-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "cn-north-1", - }: endpoints.Endpoint{ - Hostname: "oidc.cn-north-1.amazonaws.com.cn", - CredentialScope: endpoints.CredentialScope{ - Region: "cn-north-1", - }, - }, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{ - Hostname: "oidc.cn-northwest-1.amazonaws.com.cn", - CredentialScope: endpoints.CredentialScope{ - Region: "cn-northwest-1", - }, - }, - }, - }, - { - ID: "aws-eusc", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsEusc, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "oidc.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "oidc-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "oidc-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "oidc.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{ - Hostname: "oidc.us-gov-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - }: endpoints.Endpoint{ - Hostname: "oidc.us-gov-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go deleted file mode 100644 index f35f3d5a31..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/options.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Client registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - to.Interceptors = o.Interceptors.Copy() - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go deleted file mode 100644 index 1ad103d1ed..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/serializers.go +++ /dev/null @@ -1,512 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "bytes" - "context" - "fmt" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - smithyjson "github.com/aws/smithy-go/encoding/json" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -type awsRestjson1_serializeOpCreateToken struct { -} - -func (*awsRestjson1_serializeOpCreateToken) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTokenInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/token") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateTokenInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateTokenInput(v *CreateTokenInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateTokenInput(v *CreateTokenInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientId != nil { - ok := object.Key("clientId") - ok.String(*v.ClientId) - } - - if v.ClientSecret != nil { - ok := object.Key("clientSecret") - ok.String(*v.ClientSecret) - } - - if v.Code != nil { - ok := object.Key("code") - ok.String(*v.Code) - } - - if v.CodeVerifier != nil { - ok := object.Key("codeVerifier") - ok.String(*v.CodeVerifier) - } - - if v.DeviceCode != nil { - ok := object.Key("deviceCode") - ok.String(*v.DeviceCode) - } - - if v.GrantType != nil { - ok := object.Key("grantType") - ok.String(*v.GrantType) - } - - if v.RedirectUri != nil { - ok := object.Key("redirectUri") - ok.String(*v.RedirectUri) - } - - if v.RefreshToken != nil { - ok := object.Key("refreshToken") - ok.String(*v.RefreshToken) - } - - if v.Scope != nil { - ok := object.Key("scope") - if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpCreateTokenWithIAM struct { -} - -func (*awsRestjson1_serializeOpCreateTokenWithIAM) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpCreateTokenWithIAM) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*CreateTokenWithIAMInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/token?aws_iam=t") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateTokenWithIAMInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateTokenWithIAMInput(v *CreateTokenWithIAMInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Assertion != nil { - ok := object.Key("assertion") - ok.String(*v.Assertion) - } - - if v.ClientId != nil { - ok := object.Key("clientId") - ok.String(*v.ClientId) - } - - if v.Code != nil { - ok := object.Key("code") - ok.String(*v.Code) - } - - if v.CodeVerifier != nil { - ok := object.Key("codeVerifier") - ok.String(*v.CodeVerifier) - } - - if v.GrantType != nil { - ok := object.Key("grantType") - ok.String(*v.GrantType) - } - - if v.RedirectUri != nil { - ok := object.Key("redirectUri") - ok.String(*v.RedirectUri) - } - - if v.RefreshToken != nil { - ok := object.Key("refreshToken") - ok.String(*v.RefreshToken) - } - - if v.RequestedTokenType != nil { - ok := object.Key("requestedTokenType") - ok.String(*v.RequestedTokenType) - } - - if v.Scope != nil { - ok := object.Key("scope") - if err := awsRestjson1_serializeDocumentScopes(v.Scope, ok); err != nil { - return err - } - } - - if v.SubjectToken != nil { - ok := object.Key("subjectToken") - ok.String(*v.SubjectToken) - } - - if v.SubjectTokenType != nil { - ok := object.Key("subjectTokenType") - ok.String(*v.SubjectTokenType) - } - - return nil -} - -type awsRestjson1_serializeOpRegisterClient struct { -} - -func (*awsRestjson1_serializeOpRegisterClient) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRegisterClient) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegisterClientInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/client/register") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentRegisterClientInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRegisterClientInput(v *RegisterClientInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentRegisterClientInput(v *RegisterClientInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientName != nil { - ok := object.Key("clientName") - ok.String(*v.ClientName) - } - - if v.ClientType != nil { - ok := object.Key("clientType") - ok.String(*v.ClientType) - } - - if v.EntitledApplicationArn != nil { - ok := object.Key("entitledApplicationArn") - ok.String(*v.EntitledApplicationArn) - } - - if v.GrantTypes != nil { - ok := object.Key("grantTypes") - if err := awsRestjson1_serializeDocumentGrantTypes(v.GrantTypes, ok); err != nil { - return err - } - } - - if v.IssuerUrl != nil { - ok := object.Key("issuerUrl") - ok.String(*v.IssuerUrl) - } - - if v.RedirectUris != nil { - ok := object.Key("redirectUris") - if err := awsRestjson1_serializeDocumentRedirectUris(v.RedirectUris, ok); err != nil { - return err - } - } - - if v.Scopes != nil { - ok := object.Key("scopes") - if err := awsRestjson1_serializeDocumentScopes(v.Scopes, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpStartDeviceAuthorization struct { -} - -func (*awsRestjson1_serializeOpStartDeviceAuthorization) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStartDeviceAuthorization) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartDeviceAuthorizationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/device_authorization") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientId != nil { - ok := object.Key("clientId") - ok.String(*v.ClientId) - } - - if v.ClientSecret != nil { - ok := object.Key("clientSecret") - ok.String(*v.ClientSecret) - } - - if v.StartUrl != nil { - ok := object.Key("startUrl") - ok.String(*v.StartUrl) - } - - return nil -} - -func awsRestjson1_serializeDocumentGrantTypes(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentRedirectUris(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentScopes(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/enums.go deleted file mode 100644 index b14a3c0581..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/enums.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -type AccessDeniedExceptionReason string - -// Enum values for AccessDeniedExceptionReason -const ( - AccessDeniedExceptionReasonKmsAccessDenied AccessDeniedExceptionReason = "KMS_AccessDeniedException" -) - -// Values returns all known values for AccessDeniedExceptionReason. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (AccessDeniedExceptionReason) Values() []AccessDeniedExceptionReason { - return []AccessDeniedExceptionReason{ - "KMS_AccessDeniedException", - } -} - -type InvalidRequestExceptionReason string - -// Enum values for InvalidRequestExceptionReason -const ( - InvalidRequestExceptionReasonKmsKeyNotFound InvalidRequestExceptionReason = "KMS_NotFoundException" - InvalidRequestExceptionReasonKmsInvalidKeyUsage InvalidRequestExceptionReason = "KMS_InvalidKeyUsageException" - InvalidRequestExceptionReasonKmsInvalidState InvalidRequestExceptionReason = "KMS_InvalidStateException" - InvalidRequestExceptionReasonKmsDisabledKey InvalidRequestExceptionReason = "KMS_DisabledException" -) - -// Values returns all known values for InvalidRequestExceptionReason. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (InvalidRequestExceptionReason) Values() []InvalidRequestExceptionReason { - return []InvalidRequestExceptionReason{ - "KMS_NotFoundException", - "KMS_InvalidKeyUsageException", - "KMS_InvalidStateException", - "KMS_DisabledException", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go deleted file mode 100644 index a1a3c7ef0d..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/errors.go +++ /dev/null @@ -1,430 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// You do not have sufficient access to perform this action. -type AccessDeniedException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Reason AccessDeniedExceptionReason - Error_description *string - - noSmithyDocumentSerde -} - -func (e *AccessDeniedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AccessDeniedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AccessDeniedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AccessDeniedException" - } - return *e.ErrorCodeOverride -} -func (e *AccessDeniedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that a request to authorize a client with an access user session -// token is pending. -type AuthorizationPendingException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *AuthorizationPendingException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *AuthorizationPendingException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *AuthorizationPendingException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "AuthorizationPendingException" - } - return *e.ErrorCodeOverride -} -func (e *AuthorizationPendingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the token issued by the service is expired and is no longer -// valid. -type ExpiredTokenException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *ExpiredTokenException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ExpiredTokenException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ExpiredTokenException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ExpiredTokenException" - } - return *e.ErrorCodeOverride -} -func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that an error from the service occurred while trying to process a -// request. -type InternalServerException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InternalServerException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InternalServerException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InternalServerException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InternalServerException" - } - return *e.ErrorCodeOverride -} -func (e *InternalServerException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// Indicates that the clientId or clientSecret in the request is invalid. For -// example, this can occur when a client sends an incorrect clientId or an expired -// clientSecret . -type InvalidClientException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidClientException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidClientException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidClientException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidClientException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the client information sent in the request during registration -// is invalid. -type InvalidClientMetadataException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidClientMetadataException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidClientMetadataException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidClientMetadataException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidClientMetadataException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidClientMetadataException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that a request contains an invalid grant. This can occur if a client -// makes a CreateTokenrequest with an invalid grant type. -type InvalidGrantException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidGrantException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidGrantException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidGrantException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidGrantException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidGrantException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that one or more redirect URI in the request is not supported for -// this operation. -type InvalidRedirectUriException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidRedirectUriException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidRedirectUriException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidRedirectUriException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidRedirectUriException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidRedirectUriException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that something is wrong with the input to the request. For example, a -// required parameter might be missing or out of range. -type InvalidRequestException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Reason InvalidRequestExceptionReason - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidRequestException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidRequestException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidRequestException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidRequestException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that a token provided as input to the request was issued by and is -// only usable by calling IAM Identity Center endpoints in another region. -type InvalidRequestRegionException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - Endpoint *string - Region *string - - noSmithyDocumentSerde -} - -func (e *InvalidRequestRegionException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidRequestRegionException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidRequestRegionException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidRequestRegionException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidRequestRegionException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the scope provided in the request is invalid. -type InvalidScopeException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *InvalidScopeException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidScopeException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidScopeException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidScopeException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidScopeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the client is making the request too frequently and is more than -// the service can handle. -type SlowDownException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *SlowDownException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *SlowDownException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *SlowDownException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "SlowDownException" - } - return *e.ErrorCodeOverride -} -func (e *SlowDownException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the client is not currently authorized to make the request. This -// can happen when a clientId is not issued for a public client. -type UnauthorizedClientException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *UnauthorizedClientException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *UnauthorizedClientException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *UnauthorizedClientException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "UnauthorizedClientException" - } - return *e.ErrorCodeOverride -} -func (e *UnauthorizedClientException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Indicates that the grant type in the request is not supported by the service. -type UnsupportedGrantTypeException struct { - Message *string - - ErrorCodeOverride *string - - Error_ *string - Error_description *string - - noSmithyDocumentSerde -} - -func (e *UnsupportedGrantTypeException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *UnsupportedGrantTypeException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *UnsupportedGrantTypeException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "UnsupportedGrantTypeException" - } - return *e.ErrorCodeOverride -} -func (e *UnsupportedGrantTypeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go deleted file mode 100644 index de15e8f051..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/types/types.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" -) - -// This structure contains Amazon Web Services-specific parameter extensions and -// the [identity context]. -// -// [identity context]: https://docs.aws.amazon.com/singlesignon/latest/userguide/trustedidentitypropagation-overview.html -type AwsAdditionalDetails struct { - - // The trusted context assertion is signed and encrypted by STS. It provides - // access to sts:identity_context claim in the idToken without JWT parsing - // - // Identity context comprises information that Amazon Web Services services use to - // make authorization decisions when they receive requests. - IdentityContext *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go deleted file mode 100644 index 9c17e4c8e1..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/ssooidc/validators.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package ssooidc - -import ( - "context" - "fmt" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpCreateToken struct { -} - -func (*validateOpCreateToken) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTokenInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTokenInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateTokenWithIAM struct { -} - -func (*validateOpCreateTokenWithIAM) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateTokenWithIAM) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateTokenWithIAMInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateTokenWithIAMInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegisterClient struct { -} - -func (*validateOpRegisterClient) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegisterClient) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegisterClientInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegisterClientInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartDeviceAuthorization struct { -} - -func (*validateOpStartDeviceAuthorization) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartDeviceAuthorization) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartDeviceAuthorizationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartDeviceAuthorizationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpCreateTokenValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateToken{}, middleware.After) -} - -func addOpCreateTokenWithIAMValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateTokenWithIAM{}, middleware.After) -} - -func addOpRegisterClientValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegisterClient{}, middleware.After) -} - -func addOpStartDeviceAuthorizationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartDeviceAuthorization{}, middleware.After) -} - -func validateOpCreateTokenInput(v *CreateTokenInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTokenInput"} - if v.ClientId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientId")) - } - if v.ClientSecret == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientSecret")) - } - if v.GrantType == nil { - invalidParams.Add(smithy.NewErrParamRequired("GrantType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateTokenWithIAMInput(v *CreateTokenWithIAMInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateTokenWithIAMInput"} - if v.ClientId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientId")) - } - if v.GrantType == nil { - invalidParams.Add(smithy.NewErrParamRequired("GrantType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpRegisterClientInput(v *RegisterClientInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "RegisterClientInput"} - if v.ClientName == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientName")) - } - if v.ClientType == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpStartDeviceAuthorizationInput(v *StartDeviceAuthorizationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StartDeviceAuthorizationInput"} - if v.ClientId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientId")) - } - if v.ClientSecret == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientSecret")) - } - if v.StartUrl == nil { - invalidParams.Add(smithy.NewErrParamRequired("StartUrl")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md deleted file mode 100644 index 77183922d3..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/CHANGELOG.md +++ /dev/null @@ -1,710 +0,0 @@ -# v1.38.6 (2025-09-26) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.5 (2025-09-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.4 (2025-09-10) - -* No change notes available for this release. - -# v1.38.3 (2025-09-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.2 (2025-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.1 (2025-08-27) - -* **Dependency Update**: Update to smithy-go v1.23.0. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.38.0 (2025-08-21) - -* **Feature**: Remove incorrect endpoint tests -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.37.1 (2025-08-20) - -* **Bug Fix**: Remove unused deserialization code. - -# v1.37.0 (2025-08-11) - -* **Feature**: Add support for configuring per-service Options via callback on global config. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.36.0 (2025-08-04) - -* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.1 (2025-07-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.35.0 (2025-07-28) - -* **Feature**: Add support for HTTP interceptors. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.1 (2025-07-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.34.0 (2025-06-17) - -* **Feature**: The AWS Security Token Service APIs AssumeRoleWithSAML and AssumeRoleWithWebIdentity can now be invoked without pre-configured AWS credentials in the SDK configuration. -* **Dependency Update**: Update to smithy-go v1.22.4. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.21 (2025-06-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.20 (2025-06-06) - -* No change notes available for this release. - -# v1.33.19 (2025-04-10) - -* No change notes available for this release. - -# v1.33.18 (2025-04-03) - -* No change notes available for this release. - -# v1.33.17 (2025-03-04.2) - -* **Bug Fix**: Add assurance test for operation order. - -# v1.33.16 (2025-02-27) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.15 (2025-02-18) - -* **Bug Fix**: Bump go version to 1.22 -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.14 (2025-02-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.13 (2025-02-04) - -* No change notes available for this release. - -# v1.33.12 (2025-01-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.11 (2025-01-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.10 (2025-01-24) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade to smithy-go v1.22.2. - -# v1.33.9 (2025-01-17) - -* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. - -# v1.33.8 (2025-01-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.7 (2025-01-14) - -* No change notes available for this release. - -# v1.33.6 (2025-01-10) - -* **Documentation**: Fixed typos in the descriptions. - -# v1.33.5 (2025-01-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.4 (2025-01-08) - -* No change notes available for this release. - -# v1.33.3 (2024-12-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.2 (2024-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.1 (2024-11-18) - -* **Dependency Update**: Update to smithy-go v1.22.1. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.33.0 (2024-11-14) - -* **Feature**: This release introduces the new API 'AssumeRoot', which returns short-term credentials that you can use to perform privileged tasks. - -# v1.32.4 (2024-11-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.3 (2024-10-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.2 (2024-10-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.1 (2024-10-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.32.0 (2024-10-04) - -* **Feature**: Add support for HTTP client metrics. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.31.4 (2024-10-03) - -* No change notes available for this release. - -# v1.31.3 (2024-09-27) - -* No change notes available for this release. - -# v1.31.2 (2024-09-25) - -* No change notes available for this release. - -# v1.31.1 (2024-09-23) - -* No change notes available for this release. - -# v1.31.0 (2024-09-20) - -* **Feature**: Add tracing and metrics support to service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.8 (2024-09-17) - -* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. - -# v1.30.7 (2024-09-04) - -* No change notes available for this release. - -# v1.30.6 (2024-09-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.5 (2024-08-22) - -* No change notes available for this release. - -# v1.30.4 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.30.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.29.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.29.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.13 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.12 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.11 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.10 (2024-05-23) - -* No change notes available for this release. - -# v1.28.9 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.8 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.7 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.28.6 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.5 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.4 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.3 (2024-03-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.2 (2024-03-04) - -* **Bug Fix**: Update internal/presigned-url dependency for corrected API name. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.28.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.27.2 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.27.1 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.27.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.7 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.6 (2023-12-20) - -* No change notes available for this release. - -# v1.26.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.26.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. -* **Bug Fix**: STS `AssumeRoleWithSAML` and `AssumeRoleWithWebIdentity` would incorrectly attempt to use SigV4 authentication. - -# v1.26.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.26.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Documentation**: Documentation updates for AWS Security Token Service. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.6 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.5 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.25.4 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.3 (2023-11-17) - -* **Documentation**: API updates for the AWS Security Token Service - -# v1.25.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.25.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.24.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.0 (2023-10-02) - -* **Feature**: STS API updates for assumeRole - -# v1.22.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.21.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2023-08-01) - -* No change notes available for this release. - -# v1.21.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.1 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.0 (2023-07-25) - -* **Feature**: API updates for the AWS Security Token Service - -# v1.19.3 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.2 (2023-06-15) - -* No change notes available for this release. - -# v1.19.1 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-05-08) - -* **Feature**: Documentation updates for AWS Security Token Service. - -# v1.18.11 (2023-05-04) - -* No change notes available for this release. - -# v1.18.10 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.9 (2023-04-10) - -* No change notes available for this release. - -# v1.18.8 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.7 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.6 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.18.4 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.3 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions -* **Dependency Update**: Upgrade smithy to 1.27.2 and correct empty query list serialization. - -# v1.18.2 (2023-01-25) - -* **Documentation**: Doc only change to update wording in a key topic - -# v1.18.1 (2023-01-23) - -* No change notes available for this release. - -# v1.18.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.17.7 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.6 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.5 (2022-11-22) - -* No change notes available for this release. - -# v1.17.4 (2022-11-17) - -* **Documentation**: Documentation updates for AWS Security Token Service. - -# v1.17.3 (2022-11-16) - -* No change notes available for this release. - -# v1.17.2 (2022-11-10) - -* No change notes available for this release. - -# v1.17.1 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2022-10-21) - -* **Feature**: Add presign functionality for sts:AssumeRole operation -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.19 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.18 (2022-09-14) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.17 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.16 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.15 (2022-08-30) - -* No change notes available for this release. - -# v1.16.14 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.13 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.12 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.11 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.10 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.9 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.8 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.7 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.6 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.5 (2022-05-16) - -* **Documentation**: Documentation updates for AWS Security Token Service. - -# v1.16.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Documentation**: Updated service client model to latest release. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2021-12-21) - -* **Feature**: Updated to latest service endpoints - -# v1.11.1 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2021-11-30) - -* **Feature**: API client updated - -# v1.10.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2021-11-12) - -* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. - -# v1.9.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2021-10-21) - -* **Feature**: API client updated -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.2 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.1 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.6.0 (2021-07-15) - -* **Feature**: The ErrorCode method on generated service error types has been corrected to match the API model. -* **Documentation**: Updated service model to latest revision. -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-06-25) - -* **Feature**: API client updated -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/aws/aws-sdk-go-v2/service/sts/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go deleted file mode 100644 index 6658babc95..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_client.go +++ /dev/null @@ -1,1171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/protocol/query" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - acceptencodingcust "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding" - presignedurlcust "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "STS" -const ServiceAPIVersion = "2011-06-15" - -type operationMetrics struct { - Duration metrics.Float64Histogram - SerializeDuration metrics.Float64Histogram - ResolveIdentityDuration metrics.Float64Histogram - ResolveEndpointDuration metrics.Float64Histogram - SignRequestDuration metrics.Float64Histogram - DeserializeDuration metrics.Float64Histogram -} - -func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { - switch name { - case "client.call.duration": - return m.Duration - case "client.call.serialization_duration": - return m.SerializeDuration - case "client.call.resolve_identity_duration": - return m.ResolveIdentityDuration - case "client.call.resolve_endpoint_duration": - return m.ResolveEndpointDuration - case "client.call.signing_duration": - return m.SignRequestDuration - case "client.call.deserialization_duration": - return m.DeserializeDuration - default: - panic("unrecognized operation metric") - } -} - -func timeOperationMetric[T any]( - ctx context.Context, metric string, fn func() (T, error), - opts ...metrics.RecordMetricOption, -) (T, error) { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - start := time.Now() - v, err := fn() - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - return v, err -} - -func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { - instr := getOperationMetrics(ctx).histogramFor(metric) - opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) - - var ended bool - start := time.Now() - return func() { - if ended { - return - } - ended = true - - end := time.Now() - - elapsed := end.Sub(start) - instr.Record(ctx, float64(elapsed)/1e9, opts...) - } -} - -func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { - return func(o *metrics.RecordMetricOptions) { - o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) - o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) - } -} - -type operationMetricsKey struct{} - -func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { - meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/sts") - om := &operationMetrics{} - - var err error - - om.Duration, err = operationMetricTimer(meter, "client.call.duration", - "Overall call duration (including retries and time to send or receive request and response body)") - if err != nil { - return nil, err - } - om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", - "The time it takes to serialize a message body") - if err != nil { - return nil, err - } - om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", - "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") - if err != nil { - return nil, err - } - om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", - "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") - if err != nil { - return nil, err - } - om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", - "The time it takes to sign a request") - if err != nil { - return nil, err - } - om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", - "The time it takes to deserialize a message body") - if err != nil { - return nil, err - } - - return context.WithValue(parent, operationMetricsKey{}, om), nil -} - -func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { - return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = desc - }) -} - -func getOperationMetrics(ctx context.Context) *operationMetrics { - return ctx.Value(operationMetricsKey{}).(*operationMetrics) -} - -func operationTracer(p tracing.TracerProvider) tracing.Tracer { - return p.Tracer("github.com/aws/aws-sdk-go-v2/service/sts") -} - -// Client provides the API client to make operations call for AWS Security Token -// Service. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveTracerProvider(&options) - - resolveMeterProvider(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation( - ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, -) ( - result interface{}, metadata middleware.Metadata, err error, -) { - ctx = middleware.ClearStackValues(ctx) - ctx = middleware.WithServiceID(ctx, ServiceID) - ctx = middleware.WithOperationName(ctx, opID) - - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - ctx, err = withOperationMetrics(ctx, options.MeterProvider) - if err != nil { - return nil, metadata, err - } - - tracer := operationTracer(options.TracerProvider) - spanName := fmt.Sprintf("%s.%s", ServiceID, opID) - - ctx = tracing.WithOperationTracer(ctx, tracer) - - ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { - o.Kind = tracing.SpanKindClient - o.Properties.Set("rpc.system", "aws-api") - o.Properties.Set("rpc.method", opID) - o.Properties.Set("rpc.service", ServiceID) - }) - endTimer := startMetricTimer(ctx, "client.call.duration") - defer endTimer() - defer span.End() - - handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { - o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts") - }) - decorated := middleware.DecorateHandler(handler, stack) - result, metadata, err = decorated.Handle(ctx, params) - if err != nil { - span.SetProperty("exception.type", fmt.Sprintf("%T", err)) - span.SetProperty("exception.message", err.Error()) - - var aerr smithy.APIError - if errors.As(err, &aerr) { - span.SetProperty("api.error_code", aerr.ErrorCode()) - span.SetProperty("api.error_message", aerr.ErrorMessage()) - span.SetProperty("api.error_fault", aerr.ErrorFault().String()) - } - - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - - span.SetProperty("error", err != nil) - if err == nil { - span.SetStatus(tracing.SpanStatusOK) - } else { - span.SetStatus(tracing.SpanStatusError) - } - - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AuthSchemePreference: cfg.AuthSchemePreference, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveInterceptors(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, func(o *Options) { - for _, opt := range cfg.ServiceOptions { - opt(ServiceID, o) - } - for _, opt := range optFns { - opt(o) - } - }) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func resolveInterceptors(cfg aws.Config, o *Options) { - o.Interceptors = cfg.Interceptors.Copy() -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "sts", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} - -func addSpanRetryLoop(stack *middleware.Stack, options Options) error { - return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) -} - -type spanRetryLoop struct { - options Options -} - -func (*spanRetryLoop) ID() string { - return "spanRetryLoop" -} - -func (m *spanRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - middleware.FinalizeOutput, middleware.Metadata, error, -) { - tracer := operationTracer(m.options.TracerProvider) - ctx, span := tracer.StartSpan(ctx, "RetryLoop") - defer span.End() - - return next.HandleFinalize(ctx, in) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/sts") - }) - if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -type setCredentialSourceMiddleware struct { - ua *awsmiddleware.RequestUserAgent - options Options -} - -func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } - -func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) - if !ok { - return next.HandleBuild(ctx, in) - } - providerSources := asProviderSource.ProviderSources() - for _, source := range providerSources { - m.ua.AddCredentialsSource(source) - } - return next.HandleBuild(ctx, in) -} - -func addCredentialSource(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - mw := setCredentialSourceMiddleware{ua: ua, options: options} - return stack.Build.Insert(&mw, "UserAgent", middleware.Before) -} - -func resolveTracerProvider(options *Options) { - if options.TracerProvider == nil { - options.TracerProvider = &tracing.NopTracerProvider{} - } -} - -func resolveMeterProvider(options *Options) { - if options.MeterProvider == nil { - options.MeterProvider = metrics.NopMeterProvider{} - } -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -// HTTPPresignerV4 represents presigner interface used by presign url client -type HTTPPresignerV4 interface { - PresignHTTP( - ctx context.Context, credentials aws.Credentials, r *http.Request, - payloadHash string, service string, region string, signingTime time.Time, - optFns ...func(*v4.SignerOptions), - ) (url string, signedHeader http.Header, err error) -} - -// PresignOptions represents the presign client options -type PresignOptions struct { - - // ClientOptions are list of functional options to mutate client options used by - // the presign client. - ClientOptions []func(*Options) - - // Presigner is the presigner used by the presign url client - Presigner HTTPPresignerV4 -} - -func (o PresignOptions) copy() PresignOptions { - clientOptions := make([]func(*Options), len(o.ClientOptions)) - copy(clientOptions, o.ClientOptions) - o.ClientOptions = clientOptions - return o -} - -// WithPresignClientFromClientOptions is a helper utility to retrieve a function -// that takes PresignOption as input -func WithPresignClientFromClientOptions(optFns ...func(*Options)) func(*PresignOptions) { - return withPresignClientFromClientOptions(optFns).options -} - -type withPresignClientFromClientOptions []func(*Options) - -func (w withPresignClientFromClientOptions) options(o *PresignOptions) { - o.ClientOptions = append(o.ClientOptions, w...) -} - -// PresignClient represents the presign url client -type PresignClient struct { - client *Client - options PresignOptions -} - -// NewPresignClient generates a presign client using provided API Client and -// presign options -func NewPresignClient(c *Client, optFns ...func(*PresignOptions)) *PresignClient { - var options PresignOptions - for _, fn := range optFns { - fn(&options) - } - if len(options.ClientOptions) != 0 { - c = New(c.options, options.ClientOptions...) - } - - if options.Presigner == nil { - options.Presigner = newDefaultV4Signer(c.options) - } - - return &PresignClient{ - client: c, - options: options, - } -} - -func withNopHTTPClientAPIOption(o *Options) { - o.HTTPClient = smithyhttp.NopClient{} -} - -type presignContextPolyfillMiddleware struct { -} - -func (*presignContextPolyfillMiddleware) ID() string { - return "presignContextPolyfill" -} - -func (m *presignContextPolyfillMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - schemeID := rscheme.Scheme.SchemeID() - - if schemeID == "aws.auth#sigv4" || schemeID == "com.amazonaws.s3#sigv4express" { - if sn, ok := smithyhttp.GetSigV4SigningName(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningName(ctx, sn) - } - if sr, ok := smithyhttp.GetSigV4SigningRegion(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningRegion(ctx, sr) - } - } else if schemeID == "aws.auth#sigv4a" { - if sn, ok := smithyhttp.GetSigV4ASigningName(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningName(ctx, sn) - } - if sr, ok := smithyhttp.GetSigV4ASigningRegions(&rscheme.SignerProperties); ok { - ctx = awsmiddleware.SetSigningRegion(ctx, sr[0]) - } - } - - return next.HandleFinalize(ctx, in) -} - -type presignConverter PresignOptions - -func (c presignConverter) convertToPresignMiddleware(stack *middleware.Stack, options Options) (err error) { - if _, ok := stack.Finalize.Get((*acceptencodingcust.DisableGzip)(nil).ID()); ok { - stack.Finalize.Remove((*acceptencodingcust.DisableGzip)(nil).ID()) - } - if _, ok := stack.Finalize.Get((*retry.Attempt)(nil).ID()); ok { - stack.Finalize.Remove((*retry.Attempt)(nil).ID()) - } - if _, ok := stack.Finalize.Get((*retry.MetricsHeader)(nil).ID()); ok { - stack.Finalize.Remove((*retry.MetricsHeader)(nil).ID()) - } - stack.Deserialize.Clear() - stack.Build.Remove((*awsmiddleware.ClientRequestID)(nil).ID()) - stack.Build.Remove("UserAgent") - if err := stack.Finalize.Insert(&presignContextPolyfillMiddleware{}, "Signing", middleware.Before); err != nil { - return err - } - - pmw := v4.NewPresignHTTPRequestMiddleware(v4.PresignHTTPRequestMiddlewareOptions{ - CredentialsProvider: options.Credentials, - Presigner: c.Presigner, - LogSigning: options.ClientLogMode.IsSigning(), - }) - if _, err := stack.Finalize.Swap("Signing", pmw); err != nil { - return err - } - if err = smithyhttp.AddNoPayloadDefaultContentTypeRemover(stack); err != nil { - return err - } - // convert request to a GET request - err = query.AddAsGetRequestMiddleware(stack) - if err != nil { - return err - } - err = presignedurlcust.AddAsIsPresigningMiddleware(stack) - if err != nil { - return err - } - return nil -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} - -func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ - Interceptors: opts.Interceptors.BeforeRetryLoop, - }, "Retry", middleware.Before) -} - -func addInterceptAttempt(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ - BeforeAttempt: opts.Interceptors.BeforeAttempt, - AfterAttempt: opts.Interceptors.AfterAttempt, - }, "Retry", middleware.After) -} - -func addInterceptExecution(stack *middleware.Stack, opts Options) error { - return stack.Initialize.Add(&smithyhttp.InterceptExecution{ - BeforeExecution: opts.Interceptors.BeforeExecution, - AfterExecution: opts.Interceptors.AfterExecution, - }, middleware.Before) -} - -func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ - Interceptors: opts.Interceptors.BeforeSerialization, - }, "OperationSerializer", middleware.Before) -} - -func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { - return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ - Interceptors: opts.Interceptors.AfterSerialization, - }, "OperationSerializer", middleware.After) -} - -func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ - Interceptors: opts.Interceptors.BeforeSigning, - }, "Signing", middleware.Before) -} - -func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { - return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ - Interceptors: opts.Interceptors.AfterSigning, - }, "Signing", middleware.After) -} - -func addInterceptTransmit(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ - BeforeTransmit: opts.Interceptors.BeforeTransmit, - AfterTransmit: opts.Interceptors.AfterTransmit, - }, middleware.After) -} - -func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ - Interceptors: opts.Interceptors.BeforeDeserialization, - }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) -} - -func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { - return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ - Interceptors: opts.Interceptors.AfterDeserialization, - }, "OperationDeserializer", middleware.Before) -} - -type spanInitializeStart struct { -} - -func (*spanInitializeStart) ID() string { - return "spanInitializeStart" -} - -func (m *spanInitializeStart) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "Initialize") - - return next.HandleInitialize(ctx, in) -} - -type spanInitializeEnd struct { -} - -func (*spanInitializeEnd) ID() string { - return "spanInitializeEnd" -} - -func (m *spanInitializeEnd) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - middleware.InitializeOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleInitialize(ctx, in) -} - -type spanBuildRequestStart struct { -} - -func (*spanBuildRequestStart) ID() string { - return "spanBuildRequestStart" -} - -func (m *spanBuildRequestStart) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - middleware.SerializeOutput, middleware.Metadata, error, -) { - ctx, _ = tracing.StartSpan(ctx, "BuildRequest") - - return next.HandleSerialize(ctx, in) -} - -type spanBuildRequestEnd struct { -} - -func (*spanBuildRequestEnd) ID() string { - return "spanBuildRequestEnd" -} - -func (m *spanBuildRequestEnd) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - middleware.BuildOutput, middleware.Metadata, error, -) { - ctx, span := tracing.PopSpan(ctx) - span.End() - - return next.HandleBuild(ctx, in) -} - -func addSpanInitializeStart(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) -} - -func addSpanInitializeEnd(stack *middleware.Stack) error { - return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) -} - -func addSpanBuildRequestStart(stack *middleware.Stack) error { - return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) -} - -func addSpanBuildRequestEnd(stack *middleware.Stack) error { - return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go deleted file mode 100644 index f3a93418fa..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRole.go +++ /dev/null @@ -1,580 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of temporary security credentials that you can use to access -// Amazon Web Services resources. These temporary credentials consist of an access -// key ID, a secret access key, and a security token. Typically, you use AssumeRole -// within your account or for cross-account access. For a comparison of AssumeRole -// with other API operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the -// IAM User Guide. -// -// # Permissions -// -// The temporary security credentials created by AssumeRole can be used to make -// API calls to any Amazon Web Services service with the following exception: You -// cannot call the Amazon Web Services STS GetFederationToken or GetSessionToken -// API operations. -// -// (Optional) You can pass inline or managed session policies to this operation. -// You can pass a single JSON policy document to use as an inline session policy. -// You can also specify up to 10 managed policy Amazon Resource Names (ARNs) to use -// as managed session policies. The plaintext that you use for both inline and -// managed session policies can't exceed 2,048 characters. Passing policies to this -// operation returns new temporary credentials. The resulting session's permissions -// are the intersection of the role's identity-based policy and the session -// policies. You can use the role's temporary credentials in subsequent Amazon Web -// Services API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see [Session Policies]in the IAM User Guide. -// -// When you create a role, you create two policies: a role trust policy that -// specifies who can assume the role, and a permissions policy that specifies what -// can be done with the role. You specify the trusted principal that is allowed to -// assume the role in the role trust policy. -// -// To assume a role from a different account, your Amazon Web Services account -// must be trusted by the role. The trust relationship is defined in the role's -// trust policy when the role is created. That trust policy states which accounts -// are allowed to delegate that access to users in the account. -// -// A user who wants to access a role in a different account must also have -// permissions that are delegated from the account administrator. The administrator -// must attach a policy that allows the user to call AssumeRole for the ARN of the -// role in the other account. -// -// To allow a user to assume a role in the same account, you can do either of the -// following: -// -// - Attach a policy to the user that allows the user to call AssumeRole (as long -// as the role's trust policy trusts the account). -// -// - Add the user as a principal directly in the role's trust policy. -// -// You can do either because the role’s trust policy acts as an IAM resource-based -// policy. When a resource-based policy grants access to a principal in the same -// account, no additional identity-based policy is required. For more information -// about trust policies and resource-based policies, see [IAM Policies]in the IAM User Guide. -// -// # Tags -// -// (Optional) You can pass tag key-value pairs to your session. These tags are -// called session tags. For more information about session tags, see [Passing Session Tags in STS]in the IAM -// User Guide. -// -// An administrator must grant you the permissions necessary to pass session tags. -// The administrator can also create granular permissions to allow you to pass only -// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. -// -// You can set the session tags as transitive. Transitive tags persist during role -// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. -// -// # Using MFA with AssumeRole -// -// (Optional) You can include multi-factor authentication (MFA) information when -// you call AssumeRole . This is useful for cross-account scenarios to ensure that -// the user that assumes the role has been authenticated with an Amazon Web -// Services MFA device. In that scenario, the trust policy of the role being -// assumed includes a condition that tests for MFA authentication. If the caller -// does not include valid MFA information, the request to assume the role is -// denied. The condition in a trust policy that tests for MFA authentication might -// look like the following example. -// -// "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} -// -// For more information, see [Configuring MFA-Protected API Access] in the IAM User Guide guide. -// -// To use MFA with AssumeRole , you pass values for the SerialNumber and TokenCode -// parameters. The SerialNumber value identifies the user's hardware or virtual -// MFA device. The TokenCode is the time-based one-time password (TOTP) that the -// MFA device produces. -// -// [Configuring MFA-Protected API Access]: https://docs.aws.amazon.com/IAM/latest/UserGuide/MFAProtectedAPI.html -// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [IAM Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html -// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html -// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html -// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html -func (c *Client) AssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*Options)) (*AssumeRoleOutput, error) { - if params == nil { - params = &AssumeRoleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssumeRole", params, optFns, c.addOperationAssumeRoleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssumeRoleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssumeRoleInput struct { - - // The Amazon Resource Name (ARN) of the role to assume. - // - // This member is required. - RoleArn *string - - // An identifier for the assumed role session. - // - // Use the role session name to uniquely identify a session when the same role is - // assumed by different principals or for different reasons. In cross-account - // scenarios, the role session name is visible to, and can be logged by the account - // that owns the role. The role session name is also used in the ARN of the assumed - // role principal. This means that subsequent cross-account API requests that use - // the temporary security credentials will expose the role session name to the - // external account in their CloudTrail logs. - // - // For security purposes, administrators can view this field in [CloudTrail logs] to help identify - // who performed an action in Amazon Web Services. Your administrator might require - // that you specify your user name as the session name when you assume the role. - // For more information, see [sts:RoleSessionName]sts:RoleSessionName . - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds - // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname - // - // This member is required. - RoleSessionName *string - - // The duration, in seconds, of the role session. The value specified can range - // from 900 seconds (15 minutes) up to the maximum session duration set for the - // role. The maximum session duration setting can have a value from 1 hour to 12 - // hours. If you specify a value higher than this setting or the administrator - // setting (whichever is lower), the operation fails. For example, if you specify a - // session duration of 12 hours, but your administrator set the maximum session - // duration to 6 hours, your operation fails. - // - // Role chaining limits your Amazon Web Services CLI or Amazon Web Services API - // role session to a maximum of one hour. When you use the AssumeRole API - // operation to assume a role, you can specify the duration of your role session - // with the DurationSeconds parameter. You can specify a parameter value of up to - // 43200 seconds (12 hours), depending on the maximum session duration setting for - // your role. However, if you assume a role using role chaining and provide a - // DurationSeconds parameter value greater than one hour, the operation fails. To - // learn how to view the maximum value for your role, see [Update the maximum session duration for a role]. - // - // By default, the value is set to 3600 seconds. - // - // The DurationSeconds parameter is separate from the duration of a console - // session that you might request using the returned credentials. The request to - // the federation endpoint for a console sign-in token takes a SessionDuration - // parameter that specifies the maximum length of the console session. For more - // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. - // - // [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration - // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html - DurationSeconds *int32 - - // A unique identifier that might be required when you assume a role in another - // account. If the administrator of the account to which the role belongs provided - // you with an external ID, then provide that value in the ExternalId parameter. - // This value can be any string, such as a passphrase or account number. A - // cross-account role is usually set up to trust everyone in an account. Therefore, - // the administrator of the trusting account might send an external ID to the - // administrator of the trusted account. That way, only someone with the ID can - // assume the role, rather than everyone in the account. For more information about - // the external ID, see [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]in the IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@:/- - // - // [How to Use an External ID When Granting Access to Your Amazon Web Services Resources to a Third Party]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html - ExternalId *string - - // An IAM policy in JSON format that you want to use as an inline session policy. - // - // This parameter is optional. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM - // User Guide. - // - // The plaintext that you use for both inline and managed session policies can't - // exceed 2,048 characters. The JSON policy characters can be any ASCII character - // from the space character to the end of the valid character list (\u0020 through - // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage - // return (\u000D) characters. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // For more information about role session permissions, see [Session policies]. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - Policy *string - - // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to - // use as managed session policies. The policies must exist in the same account as - // the role. - // - // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plaintext that you use for both inline and managed session policies - // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the - // Amazon Web Services General Reference. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // Passing policies to this operation returns new temporary credentials. The - // resulting session's permissions are the intersection of the role's - // identity-based policy and the session policies. You can use the role's temporary - // credentials in subsequent Amazon Web Services API calls to access resources in - // the account that owns the role. You cannot use session policies to grant more - // permissions than those allowed by the identity-based policy of the role that is - // being assumed. For more information, see [Session Policies]in the IAM User Guide. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - PolicyArns []types.PolicyDescriptorType - - // A list of previously acquired trusted context assertions in the format of a - // JSON array. The trusted context assertion is signed and encrypted by Amazon Web - // Services STS. - // - // The following is an example of a ProvidedContext value that includes a single - // trusted context assertion and the ARN of the context provider from which the - // trusted context assertion was generated. - // - // [{"ProviderArn":"arn:aws:iam::aws:contextProvider/IdentityCenter","ContextAssertion":"trusted-context-assertion"}] - ProvidedContexts []types.ProvidedContext - - // The identification number of the MFA device that is associated with the user - // who is making the AssumeRole call. Specify this value if the trust policy of - // the role being assumed includes a condition that requires MFA authentication. - // The value is either the serial number for a hardware device (such as - // GAHT12345678 ) or an Amazon Resource Name (ARN) for a virtual device (such as - // arn:aws:iam::123456789012:mfa/user ). - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - SerialNumber *string - - // The source identity specified by the principal that is calling the AssumeRole - // operation. The source identity value persists across [chained role]sessions. - // - // You can require users to specify a source identity when they assume a role. You - // do this by using the [sts:SourceIdentity]sts:SourceIdentity condition key in a role trust policy. - // You can use source identity information in CloudTrail logs to determine who took - // actions with a role. You can use the aws:SourceIdentity condition key to - // further control access to Amazon Web Services resources based on the value of - // source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the - // IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: +=,.@-. You cannot use a - // value that begins with the text aws: . This prefix is reserved for Amazon Web - // Services internal use. - // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#iam-term-role-chaining - // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html - // [sts:SourceIdentity]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-sourceidentity - SourceIdentity *string - - // A list of session tags that you want to pass. Each session tag consists of a - // key name and an associated value. For more information about session tags, see [Tagging Amazon Web Services STS Sessions] - // in the IAM User Guide. - // - // This parameter is optional. You can pass up to 50 session tags. The plaintext - // session tag keys can’t exceed 128 characters, and the values can’t exceed 256 - // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // You can pass a session tag with the same key as a tag that is already attached - // to the role. When you do, session tags override a role tag with the same key. - // - // Tag key–value pairs are not case sensitive, but case is preserved. This means - // that you cannot have separate Department and department tag keys. Assume that - // the role has the Department = Marketing tag and you pass the department = - // engineering session tag. Department and department are not saved as separate - // tags, and the session tag passed in the request takes precedence over the role - // tag. - // - // Additionally, if you used temporary credentials to perform this operation, the - // new session inherits any transitive session tags from the calling session. If - // you pass a session tag with the same key as an inherited tag, the operation - // fails. To view the inherited tags for a session, see the CloudTrail logs. For - // more information, see [Viewing Session Tags in CloudTrail]in the IAM User Guide. - // - // [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html - // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length - // [Viewing Session Tags in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_ctlogs - Tags []types.Tag - - // The value provided by the MFA device, if the trust policy of the role being - // assumed requires MFA. (In other words, if the policy includes a condition that - // tests for MFA). If the role being assumed requires MFA and if the TokenCode - // value is missing or expired, the AssumeRole call returns an "access denied" - // error. - // - // The format for this parameter, as described by its regex pattern, is a sequence - // of six numeric digits. - TokenCode *string - - // A list of keys for session tags that you want to set as transitive. If you set - // a tag key as transitive, the corresponding key and value passes to subsequent - // sessions in a role chain. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. - // - // This parameter is optional. The transitive status of a session tag does not - // impact its packed binary size. - // - // If you choose not to specify a transitive tag key, then no tags are passed from - // this session to any subsequent sessions. - // - // [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining - TransitiveTagKeys []string - - noSmithyDocumentSerde -} - -// Contains the response to a successful AssumeRole request, including temporary Amazon Web -// Services credentials that can be used to make Amazon Web Services requests. -type AssumeRoleOutput struct { - - // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers - // that you can use to refer to the resulting temporary security credentials. For - // example, you can reference these credentials as a principal in a resource-based - // policy by using the ARN or assumed role ID. The ARN and ID include the - // RoleSessionName that you specified when you called AssumeRole . - AssumedRoleUser *types.AssumedRoleUser - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. - PackedPolicySize *int32 - - // The source identity specified by the principal that is calling the AssumeRole - // operation. - // - // You can require users to specify a source identity when they assume a role. You - // do this by using the sts:SourceIdentity condition key in a role trust policy. - // You can use source identity information in CloudTrail logs to determine who took - // actions with a role. You can use the aws:SourceIdentity condition key to - // further control access to Amazon Web Services resources based on the value of - // source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in the - // IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html - SourceIdentity *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssumeRoleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRole{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRole{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRole"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpAssumeRoleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRole(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssumeRole(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRole", - } -} - -// PresignAssumeRole is used to generate a presigned HTTP Request which contains -// presigned URL, signed headers and HTTP method used. -func (c *PresignClient) PresignAssumeRole(ctx context.Context, params *AssumeRoleInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { - if params == nil { - params = &AssumeRoleInput{} - } - options := c.options.copy() - for _, fn := range optFns { - fn(&options) - } - clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption) - - result, _, err := c.client.invokeOperation(ctx, "AssumeRole", params, clientOptFns, - c.client.addOperationAssumeRoleMiddlewares, - presignConverter(options).convertToPresignMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*v4.PresignedHTTPRequest) - return out, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go deleted file mode 100644 index 9dcceec12a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithSAML.go +++ /dev/null @@ -1,488 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of temporary security credentials for users who have been -// authenticated via a SAML authentication response. This operation provides a -// mechanism for tying an enterprise identity store or directory to role-based -// Amazon Web Services access without user-specific credentials or configuration. -// For a comparison of AssumeRoleWithSAML with the other API operations that -// produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. -// -// The temporary security credentials returned by this operation consist of an -// access key ID, a secret access key, and a security token. Applications can use -// these temporary security credentials to sign calls to Amazon Web Services -// services. -// -// # Session Duration -// -// By default, the temporary security credentials created by AssumeRoleWithSAML -// last for one hour. However, you can use the optional DurationSeconds parameter -// to specify the duration of your session. Your role session lasts for the -// duration that you specify, or until the time specified in the SAML -// authentication response's SessionNotOnOrAfter value, whichever is shorter. You -// can provide a DurationSeconds value from 900 seconds (15 minutes) up to the -// maximum session duration setting for the role. This setting can have a value -// from 1 hour to 12 hours. To learn how to view the maximum value for your role, -// see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. The maximum session duration limit applies when you -// use the AssumeRole* API operations or the assume-role* CLI commands. However -// the limit does not apply when you use those operations to create a console URL. -// For more information, see [Using IAM Roles]in the IAM User Guide. -// -// [Role chaining]limits your CLI or Amazon Web Services API role session to a maximum of one -// hour. When you use the AssumeRole API operation to assume a role, you can -// specify the duration of your role session with the DurationSeconds parameter. -// You can specify a parameter value of up to 43200 seconds (12 hours), depending -// on the maximum session duration setting for your role. However, if you assume a -// role using role chaining and provide a DurationSeconds parameter value greater -// than one hour, the operation fails. -// -// # Permissions -// -// The temporary security credentials created by AssumeRoleWithSAML can be used to -// make API calls to any Amazon Web Services service with the following exception: -// you cannot call the STS GetFederationToken or GetSessionToken API operations. -// -// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a -// single JSON policy document to use as an inline session policy. You can also -// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed -// session policies. The plaintext that you use for both inline and managed session -// policies can't exceed 2,048 characters. Passing policies to this operation -// returns new temporary credentials. The resulting session's permissions are the -// intersection of the role's identity-based policy and the session policies. You -// can use the role's temporary credentials in subsequent Amazon Web Services API -// calls to access resources in the account that owns the role. You cannot use -// session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see [Session Policies]in the IAM User Guide. -// -// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services -// security credentials. The identity of the caller is validated by using keys in -// the metadata document that is uploaded for the SAML provider entity for your -// identity provider. -// -// Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. The -// entry includes the value in the NameID element of the SAML assertion. We -// recommend that you use a NameIDType that is not associated with any personally -// identifiable information (PII). For example, you could instead use the -// persistent identifier ( urn:oasis:names:tc:SAML:2.0:nameid-format:persistent ). -// -// # Tags -// -// (Optional) You can configure your IdP to pass attributes into your SAML -// assertion as session tags. Each session tag consists of a key name and an -// associated value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User -// Guide. -// -// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed -// 128 characters and the values can’t exceed 256 characters. For these and -// additional limits, see [IAM and STS Character Limits]in the IAM User Guide. -// -// An Amazon Web Services conversion compresses the passed inline session policy, -// managed policy ARNs, and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates -// by percentage how close the policies and tags for your request are to the upper -// size limit. -// -// You can pass a session tag with the same key as a tag that is attached to the -// role. When you do, session tags override the role's tags with the same key. -// -// An administrator must grant you the permissions necessary to pass session tags. -// The administrator can also create granular permissions to allow you to pass only -// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. -// -// You can set the session tags as transitive. Transitive tags persist during role -// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. -// -// # SAML Configuration -// -// Before your application can call AssumeRoleWithSAML , you must configure your -// SAML identity provider (IdP) to issue the claims required by Amazon Web -// Services. Additionally, you must use Identity and Access Management (IAM) to -// create a SAML provider entity in your Amazon Web Services account that -// represents your identity provider. You must also create an IAM role that -// specifies this SAML provider in its trust policy. -// -// For more information, see the following resources: -// -// [About SAML 2.0-based Federation] -// - in the IAM User Guide. -// -// [Creating SAML Identity Providers] -// - in the IAM User Guide. -// -// [Configuring a Relying Party and Claims] -// - in the IAM User Guide. -// -// [Creating a Role for SAML 2.0 Federation] -// - in the IAM User Guide. -// -// [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session -// [Creating a Role for SAML 2.0 Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-idp_saml.html -// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [Creating SAML Identity Providers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml.html -// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html -// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html -// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html -// [Configuring a Relying Party and Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_create_saml_relying-party.html -// [Role chaining]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining -// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html -// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -// [About SAML 2.0-based Federation]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_saml.html -// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -func (c *Client) AssumeRoleWithSAML(ctx context.Context, params *AssumeRoleWithSAMLInput, optFns ...func(*Options)) (*AssumeRoleWithSAMLOutput, error) { - if params == nil { - params = &AssumeRoleWithSAMLInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssumeRoleWithSAML", params, optFns, c.addOperationAssumeRoleWithSAMLMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssumeRoleWithSAMLOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssumeRoleWithSAMLInput struct { - - // The Amazon Resource Name (ARN) of the SAML provider in IAM that describes the - // IdP. - // - // This member is required. - PrincipalArn *string - - // The Amazon Resource Name (ARN) of the role that the caller is assuming. - // - // This member is required. - RoleArn *string - - // The base64 encoded SAML authentication response provided by the IdP. - // - // For more information, see [Configuring a Relying Party and Adding Claims] in the IAM User Guide. - // - // [Configuring a Relying Party and Adding Claims]: https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html - // - // This member is required. - SAMLAssertion *string - - // The duration, in seconds, of the role session. Your role session lasts for the - // duration that you specify for the DurationSeconds parameter, or until the time - // specified in the SAML authentication response's SessionNotOnOrAfter value, - // whichever is shorter. You can provide a DurationSeconds value from 900 seconds - // (15 minutes) up to the maximum session duration setting for the role. This - // setting can have a value from 1 hour to 12 hours. If you specify a value higher - // than this setting, the operation fails. For example, if you specify a session - // duration of 12 hours, but your administrator set the maximum session duration to - // 6 hours, your operation fails. To learn how to view the maximum value for your - // role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. - // - // By default, the value is set to 3600 seconds. - // - // The DurationSeconds parameter is separate from the duration of a console - // session that you might request using the returned credentials. The request to - // the federation endpoint for a console sign-in token takes a SessionDuration - // parameter that specifies the maximum length of the console session. For more - // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. - // - // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session - // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html - DurationSeconds *int32 - - // An IAM policy in JSON format that you want to use as an inline session policy. - // - // This parameter is optional. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM - // User Guide. - // - // The plaintext that you use for both inline and managed session policies can't - // exceed 2,048 characters. The JSON policy characters can be any ASCII character - // from the space character to the end of the valid character list (\u0020 through - // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage - // return (\u000D) characters. - // - // For more information about role session permissions, see [Session policies]. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - Policy *string - - // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to - // use as managed session policies. The policies must exist in the same account as - // the role. - // - // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plaintext that you use for both inline and managed session policies - // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the - // Amazon Web Services General Reference. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // Passing policies to this operation returns new temporary credentials. The - // resulting session's permissions are the intersection of the role's - // identity-based policy and the session policies. You can use the role's temporary - // credentials in subsequent Amazon Web Services API calls to access resources in - // the account that owns the role. You cannot use session policies to grant more - // permissions than those allowed by the identity-based policy of the role that is - // being assumed. For more information, see [Session Policies]in the IAM User Guide. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - PolicyArns []types.PolicyDescriptorType - - noSmithyDocumentSerde -} - -// Contains the response to a successful AssumeRoleWithSAML request, including temporary Amazon Web -// Services credentials that can be used to make Amazon Web Services requests. -type AssumeRoleWithSAMLOutput struct { - - // The identifiers for the temporary security credentials that the operation - // returns. - AssumedRoleUser *types.AssumedRoleUser - - // The value of the Recipient attribute of the SubjectConfirmationData element of - // the SAML assertion. - Audience *string - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // The value of the Issuer element of the SAML assertion. - Issuer *string - - // A hash value based on the concatenation of the following: - // - // - The Issuer response value. - // - // - The Amazon Web Services account ID. - // - // - The friendly name (the last part of the ARN) of the SAML provider in IAM. - // - // The combination of NameQualifier and Subject can be used to uniquely identify a - // user. - // - // The following pseudocode shows how the hash value is calculated: - // - // BASE64 ( SHA1 ( "https://example.com/saml" + "123456789012" + "/MySAMLIdP" ) ) - NameQualifier *string - - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. - PackedPolicySize *int32 - - // The value in the SourceIdentity attribute in the SAML assertion. The source - // identity value persists across [chained role]sessions. - // - // You can require users to set a source identity value when they assume a role. - // You do this by using the sts:SourceIdentity condition key in a role trust - // policy. That way, actions that are taken with the role are associated with that - // user. After the source identity is set, the value cannot be changed. It is - // present in the request for all actions that are taken by the role and persists - // across [chained role]sessions. You can configure your SAML identity provider to use an - // attribute associated with your users, like user name or email, as the source - // identity when calling AssumeRoleWithSAML . You do this by adding an attribute to - // the SAML assertion. For more information about using source identity, see [Monitor and control actions taken with assumed roles]in - // the IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts - // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html - SourceIdentity *string - - // The value of the NameID element in the Subject element of the SAML assertion. - Subject *string - - // The format of the name ID, as defined by the Format attribute in the NameID - // element of the SAML assertion. Typical examples of the format are transient or - // persistent . - // - // If the format includes the prefix urn:oasis:names:tc:SAML:2.0:nameid-format , - // that prefix is removed. For example, - // urn:oasis:names:tc:SAML:2.0:nameid-format:transient is returned as transient . - // If the format includes any other prefix, the format is returned with no - // modifications. - SubjectType *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssumeRoleWithSAMLMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithSAML{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoleWithSAML{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithSAML"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpAssumeRoleWithSAMLValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithSAML(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssumeRoleWithSAML(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoleWithSAML", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go deleted file mode 100644 index 5975a0cdee..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoleWithWebIdentity.go +++ /dev/null @@ -1,508 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of temporary security credentials for users who have been -// authenticated in a mobile or web application with a web identity provider. -// Example providers include the OAuth 2.0 providers Login with Amazon and -// Facebook, or any OpenID Connect-compatible identity provider such as Google or [Amazon Cognito federated identities]. -// -// For mobile applications, we recommend that you use Amazon Cognito. You can use -// Amazon Cognito with the [Amazon Web Services SDK for iOS Developer Guide]and the [Amazon Web Services SDK for Android Developer Guide] to uniquely identify a user. You can also -// supply the user with a consistent identity throughout the lifetime of an -// application. -// -// To learn more about Amazon Cognito, see [Amazon Cognito identity pools] in Amazon Cognito Developer Guide. -// -// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web -// Services security credentials. Therefore, you can distribute an application (for -// example, on mobile devices) that requests temporary security credentials without -// including long-term Amazon Web Services credentials in the application. You also -// don't need to deploy server-based proxy services that use long-term Amazon Web -// Services credentials. Instead, the identity of the caller is validated by using -// a token from the web identity provider. For a comparison of -// AssumeRoleWithWebIdentity with the other API operations that produce temporary -// credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. -// -// The temporary security credentials returned by this API consist of an access -// key ID, a secret access key, and a security token. Applications can use these -// temporary security credentials to sign calls to Amazon Web Services service API -// operations. -// -// # Session Duration -// -// By default, the temporary security credentials created by -// AssumeRoleWithWebIdentity last for one hour. However, you can use the optional -// DurationSeconds parameter to specify the duration of your session. You can -// provide a value from 900 seconds (15 minutes) up to the maximum session duration -// setting for the role. This setting can have a value from 1 hour to 12 hours. To -// learn how to view the maximum value for your role, see [Update the maximum session duration for a role]in the IAM User Guide. -// The maximum session duration limit applies when you use the AssumeRole* API -// operations or the assume-role* CLI commands. However the limit does not apply -// when you use those operations to create a console URL. For more information, see -// [Using IAM Roles]in the IAM User Guide. -// -// # Permissions -// -// The temporary security credentials created by AssumeRoleWithWebIdentity can be -// used to make API calls to any Amazon Web Services service with the following -// exception: you cannot call the STS GetFederationToken or GetSessionToken API -// operations. -// -// (Optional) You can pass inline or managed [session policies] to this operation. You can pass a -// single JSON policy document to use as an inline session policy. You can also -// specify up to 10 managed policy Amazon Resource Names (ARNs) to use as managed -// session policies. The plaintext that you use for both inline and managed session -// policies can't exceed 2,048 characters. Passing policies to this operation -// returns new temporary credentials. The resulting session's permissions are the -// intersection of the role's identity-based policy and the session policies. You -// can use the role's temporary credentials in subsequent Amazon Web Services API -// calls to access resources in the account that owns the role. You cannot use -// session policies to grant more permissions than those allowed by the -// identity-based policy of the role that is being assumed. For more information, -// see [Session Policies]in the IAM User Guide. -// -// # Tags -// -// (Optional) You can configure your IdP to pass attributes into your web identity -// token as session tags. Each session tag consists of a key name and an associated -// value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User Guide. -// -// You can pass up to 50 session tags. The plaintext session tag keys can’t exceed -// 128 characters and the values can’t exceed 256 characters. For these and -// additional limits, see [IAM and STS Character Limits]in the IAM User Guide. -// -// An Amazon Web Services conversion compresses the passed inline session policy, -// managed policy ARNs, and session tags into a packed binary format that has a -// separate limit. Your request can fail for this limit even if your plaintext -// meets the other requirements. The PackedPolicySize response element indicates -// by percentage how close the policies and tags for your request are to the upper -// size limit. -// -// You can pass a session tag with the same key as a tag that is attached to the -// role. When you do, the session tag overrides the role tag with the same key. -// -// An administrator must grant you the permissions necessary to pass session tags. -// The administrator can also create granular permissions to allow you to pass only -// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. -// -// You can set the session tags as transitive. Transitive tags persist during role -// chaining. For more information, see [Chaining Roles with Session Tags]in the IAM User Guide. -// -// # Identities -// -// Before your application can call AssumeRoleWithWebIdentity , you must have an -// identity token from a supported identity provider and create a role that the -// application can assume. The role that your application assumes must trust the -// identity provider that is associated with the identity token. In other words, -// the identity provider must be specified in the role's trust policy. -// -// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail -// logs. The entry includes the [Subject]of the provided web identity token. We recommend -// that you avoid using any personally identifiable information (PII) in this -// field. For example, you could instead use a GUID or a pairwise identifier, as [suggested in the OIDC specification]. -// -// For more information about how to use OIDC federation and the -// AssumeRoleWithWebIdentity API, see the following resources: -// -// [Using Web Identity Federation API Operations for Mobile Apps] -// - and [Federation Through a Web-based Identity Provider]. -// -// [Amazon Web Services SDK for iOS Developer Guide] -// - and [Amazon Web Services SDK for Android Developer Guide]. These toolkits contain sample apps that show how to invoke the -// identity providers. The toolkits then show how to use the information from these -// providers to get and use temporary security credentials. -// -// [Amazon Web Services SDK for iOS Developer Guide]: http://aws.amazon.com/sdkforios/ -// [Amazon Web Services SDK for Android Developer Guide]: http://aws.amazon.com/sdkforandroid/ -// [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length -// [session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html -// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html -// [Subject]: http://openid.net/specs/openid-connect-core-1_0.html#Claims -// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html -// [Amazon Cognito identity pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html -// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity -// [Using IAM Roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html -// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Amazon Cognito federated identities]: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html -// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -// [Chaining Roles with Session Tags]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html#id_session-tags_role-chaining -// [Update the maximum session duration for a role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_update-role-settings.html#id_roles_update-session-duration -// [Using Web Identity Federation API Operations for Mobile Apps]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_oidc_manual.html -// [suggested in the OIDC specification]: http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes -func (c *Client) AssumeRoleWithWebIdentity(ctx context.Context, params *AssumeRoleWithWebIdentityInput, optFns ...func(*Options)) (*AssumeRoleWithWebIdentityOutput, error) { - if params == nil { - params = &AssumeRoleWithWebIdentityInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssumeRoleWithWebIdentity", params, optFns, c.addOperationAssumeRoleWithWebIdentityMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssumeRoleWithWebIdentityOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssumeRoleWithWebIdentityInput struct { - - // The Amazon Resource Name (ARN) of the role that the caller is assuming. - // - // Additional considerations apply to Amazon Cognito identity pools that assume [cross-account IAM roles]. - // The trust policies of these roles must accept the cognito-identity.amazonaws.com - // service principal and must contain the cognito-identity.amazonaws.com:aud - // condition key to restrict role assumption to users from your intended identity - // pools. A policy that trusts Amazon Cognito identity pools without this condition - // creates a risk that a user from an unintended identity pool can assume the role. - // For more information, see [Trust policies for IAM roles in Basic (Classic) authentication]in the Amazon Cognito Developer Guide. - // - // [cross-account IAM roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies-cross-account-resource-access.html - // [Trust policies for IAM roles in Basic (Classic) authentication]: https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#trust-policies - // - // This member is required. - RoleArn *string - - // An identifier for the assumed role session. Typically, you pass the name or - // identifier that is associated with the user who is using your application. That - // way, the temporary security credentials that your application will use are - // associated with that user. This session name is included as part of the ARN and - // assumed role ID in the AssumedRoleUser response element. - // - // For security purposes, administrators can view this field in [CloudTrail logs] to help identify - // who performed an action in Amazon Web Services. Your administrator might require - // that you specify your user name as the session name when you assume the role. - // For more information, see [sts:RoleSessionName]sts:RoleSessionName . - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html#cloudtrail-integration_signin-tempcreds - // [sts:RoleSessionName]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_iam-condition-keys.html#ck_rolesessionname - // - // This member is required. - RoleSessionName *string - - // The OAuth 2.0 access token or OpenID Connect ID token that is provided by the - // identity provider. Your application must get this token by authenticating the - // user who is using your application with a web identity provider before the - // application makes an AssumeRoleWithWebIdentity call. Timestamps in the token - // must be formatted as either an integer or a long integer. Tokens must be signed - // using either RSA keys (RS256, RS384, or RS512) or ECDSA keys (ES256, ES384, or - // ES512). - // - // This member is required. - WebIdentityToken *string - - // The duration, in seconds, of the role session. The value can range from 900 - // seconds (15 minutes) up to the maximum session duration setting for the role. - // This setting can have a value from 1 hour to 12 hours. If you specify a value - // higher than this setting, the operation fails. For example, if you specify a - // session duration of 12 hours, but your administrator set the maximum session - // duration to 6 hours, your operation fails. To learn how to view the maximum - // value for your role, see [View the Maximum Session Duration Setting for a Role]in the IAM User Guide. - // - // By default, the value is set to 3600 seconds. - // - // The DurationSeconds parameter is separate from the duration of a console - // session that you might request using the returned credentials. The request to - // the federation endpoint for a console sign-in token takes a SessionDuration - // parameter that specifies the maximum length of the console session. For more - // information, see [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]in the IAM User Guide. - // - // [View the Maximum Session Duration Setting for a Role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session - // [Creating a URL that Enables Federated Users to Access the Amazon Web Services Management Console]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html - DurationSeconds *int32 - - // An IAM policy in JSON format that you want to use as an inline session policy. - // - // This parameter is optional. Passing policies to this operation returns new - // temporary credentials. The resulting session's permissions are the intersection - // of the role's identity-based policy and the session policies. You can use the - // role's temporary credentials in subsequent Amazon Web Services API calls to - // access resources in the account that owns the role. You cannot use session - // policies to grant more permissions than those allowed by the identity-based - // policy of the role that is being assumed. For more information, see [Session Policies]in the IAM - // User Guide. - // - // The plaintext that you use for both inline and managed session policies can't - // exceed 2,048 characters. The JSON policy characters can be any ASCII character - // from the space character to the end of the valid character list (\u0020 through - // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage - // return (\u000D) characters. - // - // For more information about role session permissions, see [Session policies]. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Session policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - Policy *string - - // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to - // use as managed session policies. The policies must exist in the same account as - // the role. - // - // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plaintext that you use for both inline and managed session policies - // can't exceed 2,048 characters. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the - // Amazon Web Services General Reference. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // Passing policies to this operation returns new temporary credentials. The - // resulting session's permissions are the intersection of the role's - // identity-based policy and the session policies. You can use the role's temporary - // credentials in subsequent Amazon Web Services API calls to access resources in - // the account that owns the role. You cannot use session policies to grant more - // permissions than those allowed by the identity-based policy of the role that is - // being assumed. For more information, see [Session Policies]in the IAM User Guide. - // - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - PolicyArns []types.PolicyDescriptorType - - // The fully qualified host component of the domain name of the OAuth 2.0 identity - // provider. Do not specify this value for an OpenID Connect identity provider. - // - // Currently www.amazon.com and graph.facebook.com are the only supported identity - // providers for OAuth 2.0 access tokens. Do not include URL schemes and port - // numbers. - // - // Do not specify this value for OpenID Connect ID tokens. - ProviderId *string - - noSmithyDocumentSerde -} - -// Contains the response to a successful AssumeRoleWithWebIdentity request, including temporary Amazon Web -// Services credentials that can be used to make Amazon Web Services requests. -type AssumeRoleWithWebIdentityOutput struct { - - // The Amazon Resource Name (ARN) and the assumed role ID, which are identifiers - // that you can use to refer to the resulting temporary security credentials. For - // example, you can reference these credentials as a principal in a resource-based - // policy by using the ARN or assumed role ID. The ARN and ID include the - // RoleSessionName that you specified when you called AssumeRole . - AssumedRoleUser *types.AssumedRoleUser - - // The intended audience (also known as client ID) of the web identity token. This - // is traditionally the client identifier issued to the application that requested - // the web identity token. - Audience *string - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. - PackedPolicySize *int32 - - // The issuing authority of the web identity token presented. For OpenID Connect - // ID tokens, this contains the value of the iss field. For OAuth 2.0 access - // tokens, this contains the value of the ProviderId parameter that was passed in - // the AssumeRoleWithWebIdentity request. - Provider *string - - // The value of the source identity that is returned in the JSON web token (JWT) - // from the identity provider. - // - // You can require users to set a source identity value when they assume a role. - // You do this by using the sts:SourceIdentity condition key in a role trust - // policy. That way, actions that are taken with the role are associated with that - // user. After the source identity is set, the value cannot be changed. It is - // present in the request for all actions that are taken by the role and persists - // across [chained role]sessions. You can configure your identity provider to use an attribute - // associated with your users, like user name or email, as the source identity when - // calling AssumeRoleWithWebIdentity . You do this by adding a claim to the JSON - // web token. To learn more about OIDC tokens and claims, see [Using Tokens with User Pools]in the Amazon - // Cognito Developer Guide. For more information about using source identity, see [Monitor and control actions taken with assumed roles] - // in the IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [chained role]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html#id_roles_terms-and-concepts - // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html - // [Using Tokens with User Pools]: https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html - SourceIdentity *string - - // The unique user identifier that is returned by the identity provider. This - // identifier is associated with the WebIdentityToken that was submitted with the - // AssumeRoleWithWebIdentity call. The identifier is typically unique to the user - // and the application that acquired the WebIdentityToken (pairwise identifier). - // For OpenID Connect ID tokens, this field contains the value returned by the - // identity provider as the token's sub (Subject) claim. - SubjectFromWebIdentityToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssumeRoleWithWebIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoleWithWebIdentity{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoleWithWebIdentity{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoleWithWebIdentity"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpAssumeRoleWithWebIdentityValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssumeRoleWithWebIdentity(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoleWithWebIdentity", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go deleted file mode 100644 index 571f06728a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_AssumeRoot.go +++ /dev/null @@ -1,253 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of short term credentials you can use to perform privileged tasks -// on a member account in your organization. -// -// Before you can launch a privileged session, you must have centralized root -// access in your organization. For steps to enable this feature, see [Centralize root access for member accounts]in the IAM -// User Guide. -// -// The STS global endpoint is not supported for AssumeRoot. You must send this -// request to a Regional STS endpoint. For more information, see [Endpoints]. -// -// You can track AssumeRoot in CloudTrail logs to determine what actions were -// performed in a session. For more information, see [Track privileged tasks in CloudTrail]in the IAM User Guide. -// -// [Endpoints]: https://docs.aws.amazon.com/STS/latest/APIReference/welcome.html#sts-endpoints -// [Track privileged tasks in CloudTrail]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-track-privileged-tasks.html -// [Centralize root access for member accounts]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-enable-root-access.html -func (c *Client) AssumeRoot(ctx context.Context, params *AssumeRootInput, optFns ...func(*Options)) (*AssumeRootOutput, error) { - if params == nil { - params = &AssumeRootInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssumeRoot", params, optFns, c.addOperationAssumeRootMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssumeRootOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssumeRootInput struct { - - // The member account principal ARN or account ID. - // - // This member is required. - TargetPrincipal *string - - // The identity based policy that scopes the session to the privileged tasks that - // can be performed. You can use one of following Amazon Web Services managed - // policies to scope root session actions. - // - // [IAMAuditRootUserCredentials] - // - // [IAMCreateRootUserPassword] - // - // [IAMDeleteRootUserCredentials] - // - // [S3UnlockBucketPolicy] - // - // [SQSUnlockQueuePolicy] - // - // [IAMDeleteRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMDeleteRootUserCredentials - // [IAMCreateRootUserPassword]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMCreateRootUserPassword - // [IAMAuditRootUserCredentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-IAMAuditRootUserCredentials - // [S3UnlockBucketPolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-S3UnlockBucketPolicy - // [SQSUnlockQueuePolicy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/security-iam-awsmanpol.html#security-iam-awsmanpol-SQSUnlockQueuePolicy - // - // This member is required. - TaskPolicyArn *types.PolicyDescriptorType - - // The duration, in seconds, of the privileged session. The value can range from 0 - // seconds up to the maximum session duration of 900 seconds (15 minutes). If you - // specify a value higher than this setting, the operation fails. - // - // By default, the value is set to 900 seconds. - DurationSeconds *int32 - - noSmithyDocumentSerde -} - -type AssumeRootOutput struct { - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // The source identity specified by the principal that is calling the AssumeRoot - // operation. - // - // You can use the aws:SourceIdentity condition key to control access based on the - // value of source identity. For more information about using source identity, see [Monitor and control actions taken with assumed roles] - // in the IAM User Guide. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // [Monitor and control actions taken with assumed roles]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html - SourceIdentity *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssumeRootMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpAssumeRoot{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpAssumeRoot{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssumeRoot"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpAssumeRootValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssumeRoot(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssumeRoot(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssumeRoot", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go deleted file mode 100644 index 786bac89b8..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_DecodeAuthorizationMessage.go +++ /dev/null @@ -1,225 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Decodes additional information about the authorization status of a request from -// an encoded message returned in response to an Amazon Web Services request. -// -// For example, if a user is not authorized to perform an operation that he or she -// has requested, the request returns a Client.UnauthorizedOperation response (an -// HTTP 403 response). Some Amazon Web Services operations additionally return an -// encoded message that can provide details about this authorization failure. -// -// Only certain Amazon Web Services operations return an encoded authorization -// message. The documentation for an individual operation indicates whether that -// operation returns an encoded message in addition to returning an HTTP code. -// -// The message is encoded because the details of the authorization status can -// contain privileged information that the user who requested the operation should -// not see. To decode an authorization status message, a user must be granted -// permissions through an IAM [policy]to request the DecodeAuthorizationMessage ( -// sts:DecodeAuthorizationMessage ) action. -// -// The decoded message includes the following type of information: -// -// - Whether the request was denied due to an explicit deny or due to the -// absence of an explicit allow. For more information, see [Determining Whether a Request is Allowed or Denied]in the IAM User -// Guide. -// -// - The principal who made the request. -// -// - The requested action. -// -// - The requested resource. -// -// - The values of condition keys in the context of the user's request. -// -// [Determining Whether a Request is Allowed or Denied]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_evaluation-logic.html#policy-eval-denyallow -// [policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html -func (c *Client) DecodeAuthorizationMessage(ctx context.Context, params *DecodeAuthorizationMessageInput, optFns ...func(*Options)) (*DecodeAuthorizationMessageOutput, error) { - if params == nil { - params = &DecodeAuthorizationMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DecodeAuthorizationMessage", params, optFns, c.addOperationDecodeAuthorizationMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DecodeAuthorizationMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DecodeAuthorizationMessageInput struct { - - // The encoded message that was returned with the response. - // - // This member is required. - EncodedMessage *string - - noSmithyDocumentSerde -} - -// A document that contains additional information about the authorization status -// of a request from an encoded message that is returned in response to an Amazon -// Web Services request. -type DecodeAuthorizationMessageOutput struct { - - // The API returns a response with the decoded message. - DecodedMessage *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDecodeAuthorizationMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpDecodeAuthorizationMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpDecodeAuthorizationMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DecodeAuthorizationMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpDecodeAuthorizationMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDecodeAuthorizationMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDecodeAuthorizationMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DecodeAuthorizationMessage", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go deleted file mode 100644 index 6c1f878981..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetAccessKeyInfo.go +++ /dev/null @@ -1,216 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the account identifier for the specified access key ID. -// -// Access keys consist of two parts: an access key ID (for example, -// AKIAIOSFODNN7EXAMPLE ) and a secret access key (for example, -// wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY ). For more information about access -// keys, see [Managing Access Keys for IAM Users]in the IAM User Guide. -// -// When you pass an access key ID to this operation, it returns the ID of the -// Amazon Web Services account to which the keys belong. Access key IDs beginning -// with AKIA are long-term credentials for an IAM user or the Amazon Web Services -// account root user. Access key IDs beginning with ASIA are temporary credentials -// that are created using STS operations. If the account in the response belongs to -// you, you can sign in as the root user and review your root user access keys. -// Then, you can pull a [credentials report]to learn which IAM user owns the keys. To learn who -// requested the temporary credentials for an ASIA access key, view the STS events -// in your [CloudTrail logs]in the IAM User Guide. -// -// This operation does not indicate the state of the access key. The key might be -// active, inactive, or deleted. Active keys might not have permissions to perform -// an operation. Providing a deleted access key might return an error that the key -// doesn't exist. -// -// [credentials report]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html -// [CloudTrail logs]: https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html -// [Managing Access Keys for IAM Users]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html -func (c *Client) GetAccessKeyInfo(ctx context.Context, params *GetAccessKeyInfoInput, optFns ...func(*Options)) (*GetAccessKeyInfoOutput, error) { - if params == nil { - params = &GetAccessKeyInfoInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAccessKeyInfo", params, optFns, c.addOperationGetAccessKeyInfoMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAccessKeyInfoOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAccessKeyInfoInput struct { - - // The identifier of an access key. - // - // This parameter allows (through its regex pattern) a string of characters that - // can consist of any upper- or lowercase letter or digit. - // - // This member is required. - AccessKeyId *string - - noSmithyDocumentSerde -} - -type GetAccessKeyInfoOutput struct { - - // The number used to identify the Amazon Web Services account. - Account *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAccessKeyInfoMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpGetAccessKeyInfo{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetAccessKeyInfo{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAccessKeyInfo"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetAccessKeyInfoValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAccessKeyInfo(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetAccessKeyInfo(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAccessKeyInfo", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go deleted file mode 100644 index 7d0653398b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetCallerIdentity.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns details about the IAM user or role whose credentials are used to call -// the operation. -// -// No permissions are required to perform this operation. If an administrator -// attaches a policy to your identity that explicitly denies access to the -// sts:GetCallerIdentity action, you can still perform this operation. Permissions -// are not required because the same information is returned when access is denied. -// To view an example response, see [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]in the IAM User Guide. -// -// [I Am Not Authorized to Perform: iam:DeleteVirtualMFADevice]: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_access-denied-delete-mfa -func (c *Client) GetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*Options)) (*GetCallerIdentityOutput, error) { - if params == nil { - params = &GetCallerIdentityInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetCallerIdentity", params, optFns, c.addOperationGetCallerIdentityMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetCallerIdentityOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetCallerIdentityInput struct { - noSmithyDocumentSerde -} - -// Contains the response to a successful GetCallerIdentity request, including information about the -// entity making the request. -type GetCallerIdentityOutput struct { - - // The Amazon Web Services account ID number of the account that owns or contains - // the calling entity. - Account *string - - // The Amazon Web Services ARN associated with the calling entity. - Arn *string - - // The unique identifier of the calling entity. The exact value depends on the - // type of entity that is making the call. The values returned are those listed in - // the aws:userid column in the [Principal table]found on the Policy Variables reference page in - // the IAM User Guide. - // - // [Principal table]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_variables.html#principaltable - UserId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetCallerIdentityMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpGetCallerIdentity{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetCallerIdentity{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetCallerIdentity"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetCallerIdentity(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetCallerIdentity(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetCallerIdentity", - } -} - -// PresignGetCallerIdentity is used to generate a presigned HTTP Request which -// contains presigned URL, signed headers and HTTP method used. -func (c *PresignClient) PresignGetCallerIdentity(ctx context.Context, params *GetCallerIdentityInput, optFns ...func(*PresignOptions)) (*v4.PresignedHTTPRequest, error) { - if params == nil { - params = &GetCallerIdentityInput{} - } - options := c.options.copy() - for _, fn := range optFns { - fn(&options) - } - clientOptFns := append(options.ClientOptions, withNopHTTPClientAPIOption) - - result, _, err := c.client.invokeOperation(ctx, "GetCallerIdentity", params, clientOptFns, - c.client.addOperationGetCallerIdentityMiddlewares, - presignConverter(options).convertToPresignMiddleware, - ) - if err != nil { - return nil, err - } - - out := result.(*v4.PresignedHTTPRequest) - return out, nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go deleted file mode 100644 index 1c2f28e519..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetFederationToken.go +++ /dev/null @@ -1,429 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of temporary security credentials (consisting of an access key -// ID, a secret access key, and a security token) for a user. A typical use is in a -// proxy application that gets temporary security credentials on behalf of -// distributed applications inside a corporate network. -// -// You must call the GetFederationToken operation using the long-term security -// credentials of an IAM user. As a result, this call is appropriate in contexts -// where those credentials can be safeguarded, usually in a server-based -// application. For a comparison of GetFederationToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. -// -// Although it is possible to call GetFederationToken using the security -// credentials of an Amazon Web Services account root user rather than an IAM user -// that you create for the purpose of a proxy application, we do not recommend it. -// For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in the IAM User Guide. -// -// You can create a mobile-based or browser-based app that can authenticate users -// using a web identity provider like Login with Amazon, Facebook, Google, or an -// OpenID Connect-compatible identity provider. In this case, we recommend that you -// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User -// Guide. -// -// # Session duration -// -// The temporary credentials are valid for the specified duration, from 900 -// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default -// session duration is 43,200 seconds (12 hours). Temporary credentials obtained by -// using the root user credentials have a maximum duration of 3,600 seconds (1 -// hour). -// -// # Permissions -// -// You can use the temporary credentials created by GetFederationToken in any -// Amazon Web Services service with the following exceptions: -// -// - You cannot call any IAM operations using the CLI or the Amazon Web Services -// API. This limitation does not apply to console sessions. -// -// - You cannot call any STS operations except GetCallerIdentity . -// -// You can use temporary credentials for single sign-on (SSO) to the console. -// -// You must pass an inline or managed [session policy] to this operation. You can pass a single -// JSON policy document to use as an inline session policy. You can also specify up -// to 10 managed policy Amazon Resource Names (ARNs) to use as managed session -// policies. The plaintext that you use for both inline and managed session -// policies can't exceed 2,048 characters. -// -// Though the session policy parameters are optional, if you do not pass a policy, -// then the resulting federated user session has no permissions. When you pass -// session policies, the session permissions are the intersection of the IAM user -// policies and the session policies that you pass. This gives you a way to further -// restrict the permissions for a federated user. You cannot use session policies -// to grant more permissions than those that are defined in the permissions policy -// of the IAM user. For more information, see [Session Policies]in the IAM User Guide. For -// information about using GetFederationToken to create temporary security -// credentials, see [GetFederationToken—Federation Through a Custom Identity Broker]. -// -// You can use the credentials to access a resource that has a resource-based -// policy. If that policy specifically references the federated user session in the -// Principal element of the policy, the session has the permissions allowed by the -// policy. These permissions are granted in addition to the permissions granted by -// the session policies. -// -// # Tags -// -// (Optional) You can pass tag key-value pairs to your session. These are called -// session tags. For more information about session tags, see [Passing Session Tags in STS]in the IAM User -// Guide. -// -// You can create a mobile-based or browser-based app that can authenticate users -// using a web identity provider like Login with Amazon, Facebook, Google, or an -// OpenID Connect-compatible identity provider. In this case, we recommend that you -// use [Amazon Cognito]or AssumeRoleWithWebIdentity . For more information, see [Federation Through a Web-based Identity Provider] in the IAM User -// Guide. -// -// An administrator must grant you the permissions necessary to pass session tags. -// The administrator can also create granular permissions to allow you to pass only -// specific session tags. For more information, see [Tutorial: Using Tags for Attribute-Based Access Control]in the IAM User Guide. -// -// Tag key–value pairs are not case sensitive, but case is preserved. This means -// that you cannot have separate Department and department tag keys. Assume that -// the user that you are federating has the Department = Marketing tag and you -// pass the department = engineering session tag. Department and department are -// not saved as separate tags, and the session tag passed in the request takes -// precedence over the user tag. -// -// [Federation Through a Web-based Identity Provider]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity -// [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Amazon Cognito]: http://aws.amazon.com/cognito/ -// [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session -// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -// [GetFederationToken—Federation Through a Custom Identity Broker]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken -// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials -// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html -// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html -// [Tutorial: Using Tags for Attribute-Based Access Control]: https://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_attribute-based-access-control.html -func (c *Client) GetFederationToken(ctx context.Context, params *GetFederationTokenInput, optFns ...func(*Options)) (*GetFederationTokenOutput, error) { - if params == nil { - params = &GetFederationTokenInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetFederationToken", params, optFns, c.addOperationGetFederationTokenMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetFederationTokenOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetFederationTokenInput struct { - - // The name of the federated user. The name is used as an identifier for the - // temporary security credentials (such as Bob ). For example, you can reference - // the federated user name in a resource-based policy, such as in an Amazon S3 - // bucket policy. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@- - // - // This member is required. - Name *string - - // The duration, in seconds, that the session should last. Acceptable durations - // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds - // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained - // using root user credentials are restricted to a maximum of 3,600 seconds (one - // hour). If the specified duration is longer than one hour, the session obtained - // by using root user credentials defaults to one hour. - DurationSeconds *int32 - - // An IAM policy in JSON format that you want to use as an inline session policy. - // - // You must pass an inline or managed [session policy] to this operation. You can pass a single - // JSON policy document to use as an inline session policy. You can also specify up - // to 10 managed policy Amazon Resource Names (ARNs) to use as managed session - // policies. - // - // This parameter is optional. However, if you do not pass any session policies, - // then the resulting federated user session has no permissions. - // - // When you pass session policies, the session permissions are the intersection of - // the IAM user policies and the session policies that you pass. This gives you a - // way to further restrict the permissions for a federated user. You cannot use - // session policies to grant more permissions than those that are defined in the - // permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User - // Guide. - // - // The resulting credentials can be used to access a resource that has a - // resource-based policy. If that policy specifically references the federated user - // session in the Principal element of the policy, the session has the permissions - // allowed by the policy. These permissions are granted in addition to the - // permissions that are granted by the session policies. - // - // The plaintext that you use for both inline and managed session policies can't - // exceed 2,048 characters. The JSON policy characters can be any ASCII character - // from the space character to the end of the valid character list (\u0020 through - // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage - // return (\u000D) characters. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - Policy *string - - // The Amazon Resource Names (ARNs) of the IAM managed policies that you want to - // use as a managed session policy. The policies must exist in the same account as - // the IAM user that is requesting federated access. - // - // You must pass an inline or managed [session policy] to this operation. You can pass a single - // JSON policy document to use as an inline session policy. You can also specify up - // to 10 managed policy Amazon Resource Names (ARNs) to use as managed session - // policies. The plaintext that you use for both inline and managed session - // policies can't exceed 2,048 characters. You can provide up to 10 managed policy - // ARNs. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web Services General - // Reference. - // - // This parameter is optional. However, if you do not pass any session policies, - // then the resulting federated user session has no permissions. - // - // When you pass session policies, the session permissions are the intersection of - // the IAM user policies and the session policies that you pass. This gives you a - // way to further restrict the permissions for a federated user. You cannot use - // session policies to grant more permissions than those that are defined in the - // permissions policy of the IAM user. For more information, see [Session Policies]in the IAM User - // Guide. - // - // The resulting credentials can be used to access a resource that has a - // resource-based policy. If that policy specifically references the federated user - // session in the Principal element of the policy, the session has the permissions - // allowed by the policy. These permissions are granted in addition to the - // permissions that are granted by the session policies. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // [session policy]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Session Policies]: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session - // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - PolicyArns []types.PolicyDescriptorType - - // A list of session tags. Each session tag consists of a key name and an - // associated value. For more information about session tags, see [Passing Session Tags in STS]in the IAM User - // Guide. - // - // This parameter is optional. You can pass up to 50 session tags. The plaintext - // session tag keys can’t exceed 128 characters and the values can’t exceed 256 - // characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User Guide. - // - // An Amazon Web Services conversion compresses the passed inline session policy, - // managed policy ARNs, and session tags into a packed binary format that has a - // separate limit. Your request can fail for this limit even if your plaintext - // meets the other requirements. The PackedPolicySize response element indicates - // by percentage how close the policies and tags for your request are to the upper - // size limit. - // - // You can pass a session tag with the same key as a tag that is already attached - // to the user you are federating. When you do, session tags override a user tag - // with the same key. - // - // Tag key–value pairs are not case sensitive, but case is preserved. This means - // that you cannot have separate Department and department tag keys. Assume that - // the role has the Department = Marketing tag and you pass the department = - // engineering session tag. Department and department are not saved as separate - // tags, and the session tag passed in the request takes precedence over the role - // tag. - // - // [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html - // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length - Tags []types.Tag - - noSmithyDocumentSerde -} - -// Contains the response to a successful GetFederationToken request, including temporary Amazon Web -// Services credentials that can be used to make Amazon Web Services requests. -type GetFederationTokenOutput struct { - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // Identifiers for the federated user associated with the credentials (such as - // arn:aws:sts::123456789012:federated-user/Bob or 123456789012:Bob ). You can use - // the federated user's ARN in your resource-based policies, such as an Amazon S3 - // bucket policy. - FederatedUser *types.FederatedUser - - // A percentage value that indicates the packed size of the session policies and - // session tags combined passed in the request. The request fails if the packed - // size is greater than 100 percent, which means the policies and tags exceeded the - // allowed space. - PackedPolicySize *int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetFederationTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpGetFederationToken{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetFederationToken{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetFederationToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = addOpGetFederationTokenValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetFederationToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetFederationToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetFederationToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go deleted file mode 100644 index 2560469900..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/api_op_GetSessionToken.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a set of temporary credentials for an Amazon Web Services account or -// IAM user. The credentials consist of an access key ID, a secret access key, and -// a security token. Typically, you use GetSessionToken if you want to use MFA to -// protect programmatic calls to specific Amazon Web Services API operations like -// Amazon EC2 StopInstances . -// -// MFA-enabled IAM users must call GetSessionToken and submit an MFA code that is -// associated with their MFA device. Using the temporary security credentials that -// the call returns, IAM users can then make programmatic calls to API operations -// that require MFA authentication. An incorrect MFA code causes the API to return -// an access denied error. For a comparison of GetSessionToken with the other API -// operations that produce temporary credentials, see [Requesting Temporary Security Credentials]and [Compare STS credentials] in the IAM User Guide. -// -// No permissions are required for users to perform this operation. The purpose of -// the sts:GetSessionToken operation is to authenticate the user using MFA. You -// cannot use policies to control authentication operations. For more information, -// see [Permissions for GetSessionToken]in the IAM User Guide. -// -// # Session Duration -// -// The GetSessionToken operation must be called by using the long-term Amazon Web -// Services security credentials of an IAM user. Credentials that are created by -// IAM users are valid for the duration that you specify. This duration can range -// from 900 seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours), -// with a default of 43,200 seconds (12 hours). Credentials based on account -// credentials can range from 900 seconds (15 minutes) up to 3,600 seconds (1 -// hour), with a default of 1 hour. -// -// # Permissions -// -// The temporary security credentials created by GetSessionToken can be used to -// make API calls to any Amazon Web Services service with the following exceptions: -// -// - You cannot call any IAM API operations unless MFA authentication -// information is included in the request. -// -// - You cannot call any STS API except AssumeRole or GetCallerIdentity . -// -// The credentials that GetSessionToken returns are based on permissions -// associated with the IAM user whose credentials were used to call the operation. -// The temporary credentials have the same permissions as the IAM user. -// -// Although it is possible to call GetSessionToken using the security credentials -// of an Amazon Web Services account root user rather than an IAM user, we do not -// recommend it. If GetSessionToken is called using root user credentials, the -// temporary credentials have root user permissions. For more information, see [Safeguard your root user credentials and don't use them for everyday tasks]in -// the IAM User Guide -// -// For more information about using GetSessionToken to create temporary -// credentials, see [Temporary Credentials for Users in Untrusted Environments]in the IAM User Guide. -// -// [Permissions for GetSessionToken]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_getsessiontoken.html -// [Temporary Credentials for Users in Untrusted Environments]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken -// [Safeguard your root user credentials and don't use them for everyday tasks]: https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#lock-away-credentials -// [Requesting Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html -// [Compare STS credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_sts-comparison.html -func (c *Client) GetSessionToken(ctx context.Context, params *GetSessionTokenInput, optFns ...func(*Options)) (*GetSessionTokenOutput, error) { - if params == nil { - params = &GetSessionTokenInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSessionToken", params, optFns, c.addOperationGetSessionTokenMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSessionTokenOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSessionTokenInput struct { - - // The duration, in seconds, that the credentials should remain valid. Acceptable - // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600 - // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions for - // Amazon Web Services account owners are restricted to a maximum of 3,600 seconds - // (one hour). If the duration is longer than one hour, the session for Amazon Web - // Services account owners defaults to one hour. - DurationSeconds *int32 - - // The identification number of the MFA device that is associated with the IAM - // user who is making the GetSessionToken call. Specify this value if the IAM user - // has a policy that requires MFA authentication. The value is either the serial - // number for a hardware device (such as GAHT12345678 ) or an Amazon Resource Name - // (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user ). You - // can find the device for an IAM user by going to the Amazon Web Services - // Management Console and viewing the user's security credentials. - // - // The regex used to validate this parameter is a string of characters consisting - // of upper- and lower-case alphanumeric characters with no spaces. You can also - // include underscores or any of the following characters: =,.@:/- - SerialNumber *string - - // The value provided by the MFA device, if MFA is required. If any policy - // requires the IAM user to submit an MFA code, specify this value. If MFA - // authentication is required, the user must provide a code when requesting a set - // of temporary security credentials. A user who fails to provide the code receives - // an "access denied" response when requesting resources that require MFA - // authentication. - // - // The format for this parameter, as described by its regex pattern, is a sequence - // of six numeric digits. - TokenCode *string - - noSmithyDocumentSerde -} - -// Contains the response to a successful GetSessionToken request, including temporary Amazon Web -// Services credentials that can be used to make Amazon Web Services requests. -type GetSessionTokenOutput struct { - - // The temporary security credentials, which include an access key ID, a secret - // access key, and a security (or session) token. - // - // The size of the security token that STS API operations return is not fixed. We - // strongly recommend that you make no assumptions about the maximum size. - Credentials *types.Credentials - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSessionTokenMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsquery_serializeOpGetSessionToken{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsquery_deserializeOpGetSessionToken{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSessionToken"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addCredentialSource(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSessionToken(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addInterceptBeforeRetryLoop(stack, options); err != nil { - return err - } - if err = addInterceptAttempt(stack, options); err != nil { - return err - } - if err = addInterceptExecution(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSerialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterSerialization(stack, options); err != nil { - return err - } - if err = addInterceptBeforeSigning(stack, options); err != nil { - return err - } - if err = addInterceptAfterSigning(stack, options); err != nil { - return err - } - if err = addInterceptTransmit(stack, options); err != nil { - return err - } - if err = addInterceptBeforeDeserialization(stack, options); err != nil { - return err - } - if err = addInterceptAfterDeserialization(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSessionToken(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSessionToken", - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go deleted file mode 100644 index 2a81b3fb19..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/auth.go +++ /dev/null @@ -1,351 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "slices" - "strings" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{ - "AssumeRoleWithSAML": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, - - "AssumeRoleWithWebIdentity": func(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - {SchemeID: smithyauth.SchemeIDAnonymous}, - } - }, -} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "sts") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") - defer span.End() - - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - - span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) - span.End() - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - sorted := sortAuthOptions(options, m.options.AuthSchemePreference) - for _, option := range sorted { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { - byPriority := make([]*smithyauth.Option, 0, len(options)) - for _, prefName := range preferred { - for _, option := range options { - optName := option.SchemeID - if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { - optName = parts[1] - } - if prefName == optName { - byPriority = append(byPriority, option) - } - } - } - for _, option := range options { - if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { - return o.SchemeID == option.SchemeID - }) { - byPriority = append(byPriority, option) - } - } - return byPriority -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") - defer span.End() - - rscheme := getResolvedAuthScheme(innerCtx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", - func() (smithyauth.Identity, error) { - return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) - }, - func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - - span.End() - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { - options Options -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "SignRequest") - defer span.End() - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { - return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) - }, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) - }) - if err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go deleted file mode 100644 index a1ac917ec6..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/deserializers.go +++ /dev/null @@ -1,2710 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "bytes" - "context" - "encoding/xml" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - awsxml "github.com/aws/aws-sdk-go-v2/aws/protocol/xml" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - smithy "github.com/aws/smithy-go" - smithyxml "github.com/aws/smithy-go/encoding/xml" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "strconv" - "strings" -) - -type awsAwsquery_deserializeOpAssumeRole struct { -} - -func (*awsAwsquery_deserializeOpAssumeRole) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpAssumeRole) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorAssumeRole(response, &metadata) - } - output := &AssumeRoleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("AssumeRoleResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentAssumeRoleOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorAssumeRole(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocument", errorCode): - return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PackedPolicyTooLarge", errorCode): - return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody) - - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpAssumeRoleWithSAML struct { -} - -func (*awsAwsquery_deserializeOpAssumeRoleWithSAML) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpAssumeRoleWithSAML) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response, &metadata) - } - output := &AssumeRoleWithSAMLOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("AssumeRoleWithSAMLResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorAssumeRoleWithSAML(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("IDPRejectedClaim", errorCode): - return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody) - - case strings.EqualFold("InvalidIdentityToken", errorCode): - return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocument", errorCode): - return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PackedPolicyTooLarge", errorCode): - return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody) - - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpAssumeRoleWithWebIdentity struct { -} - -func (*awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpAssumeRoleWithWebIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response, &metadata) - } - output := &AssumeRoleWithWebIdentityOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("AssumeRoleWithWebIdentityResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorAssumeRoleWithWebIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("IDPCommunicationError", errorCode): - return awsAwsquery_deserializeErrorIDPCommunicationErrorException(response, errorBody) - - case strings.EqualFold("IDPRejectedClaim", errorCode): - return awsAwsquery_deserializeErrorIDPRejectedClaimException(response, errorBody) - - case strings.EqualFold("InvalidIdentityToken", errorCode): - return awsAwsquery_deserializeErrorInvalidIdentityTokenException(response, errorBody) - - case strings.EqualFold("MalformedPolicyDocument", errorCode): - return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PackedPolicyTooLarge", errorCode): - return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody) - - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpAssumeRoot struct { -} - -func (*awsAwsquery_deserializeOpAssumeRoot) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpAssumeRoot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorAssumeRoot(response, &metadata) - } - output := &AssumeRootOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("AssumeRootResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentAssumeRootOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorAssumeRoot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("ExpiredTokenException", errorCode): - return awsAwsquery_deserializeErrorExpiredTokenException(response, errorBody) - - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpDecodeAuthorizationMessage struct { -} - -func (*awsAwsquery_deserializeOpDecodeAuthorizationMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpDecodeAuthorizationMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response, &metadata) - } - output := &DecodeAuthorizationMessageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("DecodeAuthorizationMessageResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorDecodeAuthorizationMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("InvalidAuthorizationMessageException", errorCode): - return awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpGetAccessKeyInfo struct { -} - -func (*awsAwsquery_deserializeOpGetAccessKeyInfo) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpGetAccessKeyInfo) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response, &metadata) - } - output := &GetAccessKeyInfoOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetAccessKeyInfoResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorGetAccessKeyInfo(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpGetCallerIdentity struct { -} - -func (*awsAwsquery_deserializeOpGetCallerIdentity) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpGetCallerIdentity) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetCallerIdentity(response, &metadata) - } - output := &GetCallerIdentityOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetCallerIdentityResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorGetCallerIdentity(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpGetFederationToken struct { -} - -func (*awsAwsquery_deserializeOpGetFederationToken) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpGetFederationToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetFederationToken(response, &metadata) - } - output := &GetFederationTokenOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetFederationTokenResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorGetFederationToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("MalformedPolicyDocument", errorCode): - return awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response, errorBody) - - case strings.EqualFold("PackedPolicyTooLarge", errorCode): - return awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response, errorBody) - - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsquery_deserializeOpGetSessionToken struct { -} - -func (*awsAwsquery_deserializeOpGetSessionToken) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsquery_deserializeOpGetSessionToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsquery_deserializeOpErrorGetSessionToken(response, &metadata) - } - output := &GetSessionTokenOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return out, metadata, nil - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("GetSessionTokenResult") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - return out, metadata, err -} - -func awsAwsquery_deserializeOpErrorGetSessionToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - errorComponents, err := awsxml.GetErrorResponseComponents(errorBody, false) - if err != nil { - return err - } - if reqID := errorComponents.RequestID; len(reqID) != 0 { - awsmiddleware.SetRequestIDMetadata(metadata, reqID) - } - if len(errorComponents.Code) != 0 { - errorCode = errorComponents.Code - } - if len(errorComponents.Message) != 0 { - errorMessage = errorComponents.Message - } - errorBody.Seek(0, io.SeekStart) - switch { - case strings.EqualFold("RegionDisabledException", errorCode): - return awsAwsquery_deserializeErrorRegionDisabledException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsAwsquery_deserializeErrorExpiredTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ExpiredTokenException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentExpiredTokenException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorIDPCommunicationErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IDPCommunicationErrorException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentIDPCommunicationErrorException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorIDPRejectedClaimException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.IDPRejectedClaimException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentIDPRejectedClaimException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorInvalidAuthorizationMessageException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidAuthorizationMessageException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorInvalidIdentityTokenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InvalidIdentityTokenException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentInvalidIdentityTokenException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorMalformedPolicyDocumentException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.MalformedPolicyDocumentException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorPackedPolicyTooLargeException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.PackedPolicyTooLargeException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeErrorRegionDisabledException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.RegionDisabledException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) - rootDecoder := xml.NewDecoder(body) - t, err := smithyxml.FetchRootElement(rootDecoder) - if err == io.EOF { - return output - } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) - t, err = decoder.GetElement("Error") - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - decoder = smithyxml.WrapNodeDecoder(decoder.Decoder, t) - err = awsAwsquery_deserializeDocumentRegionDisabledException(&output, decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - return output -} - -func awsAwsquery_deserializeDocumentAssumedRoleUser(v **types.AssumedRoleUser, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.AssumedRoleUser - if *v == nil { - sv = &types.AssumedRoleUser{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("AssumedRoleId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AssumedRoleId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentCredentials(v **types.Credentials, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.Credentials - if *v == nil { - sv = &types.Credentials{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AccessKeyId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.AccessKeyId = ptr.String(xtv) - } - - case strings.EqualFold("Expiration", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - t, err := smithytime.ParseDateTime(xtv) - if err != nil { - return err - } - sv.Expiration = ptr.Time(t) - } - - case strings.EqualFold("SecretAccessKey", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SecretAccessKey = ptr.String(xtv) - } - - case strings.EqualFold("SessionToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SessionToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentExpiredTokenException(v **types.ExpiredTokenException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.ExpiredTokenException - if *v == nil { - sv = &types.ExpiredTokenException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentFederatedUser(v **types.FederatedUser, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.FederatedUser - if *v == nil { - sv = &types.FederatedUser{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("FederatedUserId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.FederatedUserId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentIDPCommunicationErrorException(v **types.IDPCommunicationErrorException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IDPCommunicationErrorException - if *v == nil { - sv = &types.IDPCommunicationErrorException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentIDPRejectedClaimException(v **types.IDPRejectedClaimException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.IDPRejectedClaimException - if *v == nil { - sv = &types.IDPRejectedClaimException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentInvalidAuthorizationMessageException(v **types.InvalidAuthorizationMessageException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidAuthorizationMessageException - if *v == nil { - sv = &types.InvalidAuthorizationMessageException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentInvalidIdentityTokenException(v **types.InvalidIdentityTokenException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.InvalidIdentityTokenException - if *v == nil { - sv = &types.InvalidIdentityTokenException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentMalformedPolicyDocumentException(v **types.MalformedPolicyDocumentException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.MalformedPolicyDocumentException - if *v == nil { - sv = &types.MalformedPolicyDocumentException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentPackedPolicyTooLargeException(v **types.PackedPolicyTooLargeException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.PackedPolicyTooLargeException - if *v == nil { - sv = &types.PackedPolicyTooLargeException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeDocumentRegionDisabledException(v **types.RegionDisabledException, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *types.RegionDisabledException - if *v == nil { - sv = &types.RegionDisabledException{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("message", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Message = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentAssumeRoleOutput(v **AssumeRoleOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssumeRoleOutput - if *v == nil { - sv = &AssumeRoleOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AssumedRoleUser", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("PackedPolicySize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PackedPolicySize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("SourceIdentity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIdentity = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentAssumeRoleWithSAMLOutput(v **AssumeRoleWithSAMLOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssumeRoleWithSAMLOutput - if *v == nil { - sv = &AssumeRoleWithSAMLOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AssumedRoleUser", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Audience", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Audience = ptr.String(xtv) - } - - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Issuer", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Issuer = ptr.String(xtv) - } - - case strings.EqualFold("NameQualifier", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.NameQualifier = ptr.String(xtv) - } - - case strings.EqualFold("PackedPolicySize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PackedPolicySize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("SourceIdentity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIdentity = ptr.String(xtv) - } - - case strings.EqualFold("Subject", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Subject = ptr.String(xtv) - } - - case strings.EqualFold("SubjectType", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubjectType = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentAssumeRoleWithWebIdentityOutput(v **AssumeRoleWithWebIdentityOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssumeRoleWithWebIdentityOutput - if *v == nil { - sv = &AssumeRoleWithWebIdentityOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("AssumedRoleUser", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentAssumedRoleUser(&sv.AssumedRoleUser, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("Audience", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Audience = ptr.String(xtv) - } - - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("PackedPolicySize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PackedPolicySize = ptr.Int32(int32(i64)) - } - - case strings.EqualFold("Provider", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Provider = ptr.String(xtv) - } - - case strings.EqualFold("SourceIdentity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIdentity = ptr.String(xtv) - } - - case strings.EqualFold("SubjectFromWebIdentityToken", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SubjectFromWebIdentityToken = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentAssumeRootOutput(v **AssumeRootOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *AssumeRootOutput - if *v == nil { - sv = &AssumeRootOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("SourceIdentity", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.SourceIdentity = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentDecodeAuthorizationMessageOutput(v **DecodeAuthorizationMessageOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *DecodeAuthorizationMessageOutput - if *v == nil { - sv = &DecodeAuthorizationMessageOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("DecodedMessage", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.DecodedMessage = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentGetAccessKeyInfoOutput(v **GetAccessKeyInfoOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetAccessKeyInfoOutput - if *v == nil { - sv = &GetAccessKeyInfoOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Account", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Account = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentGetCallerIdentityOutput(v **GetCallerIdentityOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetCallerIdentityOutput - if *v == nil { - sv = &GetCallerIdentityOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Account", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Account = ptr.String(xtv) - } - - case strings.EqualFold("Arn", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.Arn = ptr.String(xtv) - } - - case strings.EqualFold("UserId", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - sv.UserId = ptr.String(xtv) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentGetFederationTokenOutput(v **GetFederationTokenOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetFederationTokenOutput - if *v == nil { - sv = &GetFederationTokenOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("FederatedUser", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentFederatedUser(&sv.FederatedUser, nodeDecoder); err != nil { - return err - } - - case strings.EqualFold("PackedPolicySize", t.Name.Local): - val, err := decoder.Value() - if err != nil { - return err - } - if val == nil { - break - } - { - xtv := string(val) - i64, err := strconv.ParseInt(xtv, 10, 64) - if err != nil { - return err - } - sv.PackedPolicySize = ptr.Int32(int32(i64)) - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} - -func awsAwsquery_deserializeOpDocumentGetSessionTokenOutput(v **GetSessionTokenOutput, decoder smithyxml.NodeDecoder) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - var sv *GetSessionTokenOutput - if *v == nil { - sv = &GetSessionTokenOutput{} - } else { - sv = *v - } - - for { - t, done, err := decoder.Token() - if err != nil { - return err - } - if done { - break - } - originalDecoder := decoder - decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) - switch { - case strings.EqualFold("Credentials", t.Name.Local): - nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) - if err := awsAwsquery_deserializeDocumentCredentials(&sv.Credentials, nodeDecoder); err != nil { - return err - } - - default: - // Do nothing and ignore the unexpected tag element - err = decoder.Decoder.Skip() - if err != nil { - return err - } - - } - decoder = originalDecoder - } - *v = sv - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go deleted file mode 100644 index cbb19c7f66..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package sts provides the API client, operations, and parameter types for AWS -// Security Token Service. -// -// # Security Token Service -// -// Security Token Service (STS) enables you to request temporary, -// limited-privilege credentials for users. This guide provides descriptions of the -// STS API. For more information about using this service, see [Temporary Security Credentials]. -// -// [Temporary Security Credentials]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html -package sts diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go deleted file mode 100644 index 945682e1a5..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/endpoints.go +++ /dev/null @@ -1,1139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "sts" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_STS") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "STS", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string - - // Whether the global endpoint should be used, rather then the regional endpoint - // for us-east-1. - // - // Defaults to false if no value is - // provided. - // - // AWS::STS::UseGlobalEndpoint - UseGlobalEndpoint *bool -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - if p.UseGlobalEndpoint == nil { - return fmt.Errorf("parameter UseGlobalEndpoint is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - - if p.UseGlobalEndpoint == nil { - p.UseGlobalEndpoint = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _ = _UseDualStack - _UseFIPS := *params.UseFIPS - _ = _UseFIPS - _UseGlobalEndpoint := *params.UseGlobalEndpoint - _ = _UseGlobalEndpoint - - if _UseGlobalEndpoint == true { - if !(params.Endpoint != nil) { - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == false { - if _UseDualStack == false { - if _Region == "ap-northeast-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "ap-south-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "ap-southeast-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "ap-southeast-2" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "aws-global" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "ca-central-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "eu-central-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "eu-north-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "eu-west-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "eu-west-2" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "eu-west-3" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "sa-east-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "us-east-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "us-east-2" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "us-west-1" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - if _Region == "us-west-2" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, _Region) - return sp - }(), - }, - }) - return out - }(), - }, nil - } - } - } - } - } - } - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - if _PartitionResult.Name == "aws-us-gov" { - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts.") - out.WriteString(_Region) - out.WriteString(".amazonaws.com") - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - if _Region == "aws-global" { - uriString := "https://sts.amazonaws.com" - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: func() smithy.Properties { - var out smithy.Properties - smithyauth.SetAuthOptions(&out, []*smithyauth.Option{ - { - SchemeID: "aws.auth#sigv4", - SignerProperties: func() smithy.Properties { - var sp smithy.Properties - smithyhttp.SetSigV4SigningName(&sp, "sts") - smithyhttp.SetSigV4ASigningName(&sp, "sts") - - smithyhttp.SetSigV4SigningRegion(&sp, "us-east-1") - return sp - }(), - }, - }) - return out - }(), - }, nil - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://sts.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "ResolveEndpoint") - defer span.End() - - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", - func() (smithyendpoints.Endpoint, error) { - return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - }) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - span.End() - return next.HandleFinalize(ctx, in) -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json deleted file mode 100644 index 86bb3b79be..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/generated.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding": "v1.0.5", - "github.com/aws/aws-sdk-go-v2/service/internal/presigned-url": "v1.0.7", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_AssumeRole.go", - "api_op_AssumeRoleWithSAML.go", - "api_op_AssumeRoleWithWebIdentity.go", - "api_op_AssumeRoot.go", - "api_op_DecodeAuthorizationMessage.go", - "api_op_GetAccessKeyInfo.go", - "api_op_GetCallerIdentity.go", - "api_op_GetFederationToken.go", - "api_op_GetSessionToken.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "sra_operation_order_test.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.22", - "module": "github.com/aws/aws-sdk-go-v2/service/sts", - "unstable": false -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go deleted file mode 100644 index dd0eacf56c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package sts - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.38.6" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go deleted file mode 100644 index 1dc87dd6bf..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints/endpoints.go +++ /dev/null @@ -1,563 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver STS endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsEusc *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "sts.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "sts-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "af-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-4", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-5", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-6", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-7", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "aws-global", - }: endpoints.Endpoint{ - Hostname: "sts.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - }, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-south-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-3", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "il-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "me-south-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "mx-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "sa-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.us-east-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-east-1-fips", - }: endpoints.Endpoint{ - Hostname: "sts-fips.us-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-2", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.us-east-2.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-east-2-fips", - }: endpoints.Endpoint{ - Hostname: "sts-fips.us-east-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-east-2", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.us-west-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-west-1-fips", - }: endpoints.Endpoint{ - Hostname: "sts-fips.us-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-2", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.us-west-2.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-west-2-fips", - }: endpoints.Endpoint{ - Hostname: "sts-fips.us-west-2.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-west-2", - }, - Deprecated: aws.TrueTernary, - }, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "sts.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "sts-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "cn-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "cn-northwest-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-eusc", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.amazonaws.eu", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsEusc, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-iso-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-iso-west-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-isob-east-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "eu-isoe-west-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-isof-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-isof-south-1", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "sts.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "sts-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "sts.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "us-gov-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-gov-east-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts.us-gov-east-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-gov-east-1-fips", - }: endpoints.Endpoint{ - Hostname: "sts.us-gov-east-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-east-1", - }, - Deprecated: aws.TrueTernary, - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-gov-west-1", - Variant: endpoints.FIPSVariant, - }: { - Hostname: "sts.us-gov-west-1.amazonaws.com", - }, - endpoints.EndpointKey{ - Region: "us-gov-west-1-fips", - }: endpoints.Endpoint{ - Hostname: "sts.us-gov-west-1.amazonaws.com", - CredentialScope: endpoints.CredentialScope{ - Region: "us-gov-west-1", - }, - Deprecated: aws.TrueTernary, - }, - }, - }, -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go deleted file mode 100644 index f60b7d3381..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/options.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The client meter provider. - MeterProvider metrics.MeterProvider - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The client tracer provider. - TracerProvider tracing.TracerProvider - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // Client registry of operation interceptors. - Interceptors smithyhttp.InterceptorRegistry - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme - - // Priority list of preferred auth scheme names (e.g. sigv4a). - AuthSchemePreference []string -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - to.Interceptors = o.Interceptors.Copy() - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go deleted file mode 100644 index 96b222136b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/serializers.go +++ /dev/null @@ -1,1005 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/query" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" - smithyhttp "github.com/aws/smithy-go/transport/http" - "path" -) - -type awsAwsquery_serializeOpAssumeRole struct { -} - -func (*awsAwsquery_serializeOpAssumeRole) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpAssumeRole) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssumeRoleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssumeRole") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentAssumeRoleInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpAssumeRoleWithSAML struct { -} - -func (*awsAwsquery_serializeOpAssumeRoleWithSAML) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpAssumeRoleWithSAML) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssumeRoleWithSAMLInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssumeRoleWithSAML") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpAssumeRoleWithWebIdentity struct { -} - -func (*awsAwsquery_serializeOpAssumeRoleWithWebIdentity) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpAssumeRoleWithWebIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssumeRoleWithWebIdentity") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpAssumeRoot struct { -} - -func (*awsAwsquery_serializeOpAssumeRoot) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpAssumeRoot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*AssumeRootInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("AssumeRoot") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentAssumeRootInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpDecodeAuthorizationMessage struct { -} - -func (*awsAwsquery_serializeOpDecodeAuthorizationMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpDecodeAuthorizationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DecodeAuthorizationMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("DecodeAuthorizationMessage") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpGetAccessKeyInfo struct { -} - -func (*awsAwsquery_serializeOpGetAccessKeyInfo) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpGetAccessKeyInfo) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAccessKeyInfoInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetAccessKeyInfo") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpGetCallerIdentity struct { -} - -func (*awsAwsquery_serializeOpGetCallerIdentity) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpGetCallerIdentity) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetCallerIdentityInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetCallerIdentity") - body.Key("Version").String("2011-06-15") - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpGetFederationToken struct { -} - -func (*awsAwsquery_serializeOpGetFederationToken) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpGetFederationToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetFederationTokenInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetFederationToken") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentGetFederationTokenInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} - -type awsAwsquery_serializeOpGetSessionToken struct { -} - -func (*awsAwsquery_serializeOpGetSessionToken) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsquery_serializeOpGetSessionToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSessionTokenInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - operationPath := "/" - if len(request.Request.URL.Path) == 0 { - request.Request.URL.Path = operationPath - } else { - request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) - if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { - request.Request.URL.Path += "/" - } - } - request.Request.Method = "POST" - httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - httpBindingEncoder.SetHeader("Content-Type").String("application/x-www-form-urlencoded") - - bodyWriter := bytes.NewBuffer(nil) - bodyEncoder := query.NewEncoder(bodyWriter) - body := bodyEncoder.Object() - body.Key("Action").String("GetSessionToken") - body.Key("Version").String("2011-06-15") - - if err := awsAwsquery_serializeOpDocumentGetSessionTokenInput(input, bodyEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - err = bodyEncoder.Encode() - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(bodyWriter.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsAwsquery_serializeDocumentPolicyDescriptorListType(v []types.PolicyDescriptorType, value query.Value) error { - array := value.Array("member") - - for i := range v { - av := array.Value() - if err := awsAwsquery_serializeDocumentPolicyDescriptorType(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsquery_serializeDocumentPolicyDescriptorType(v *types.PolicyDescriptorType, value query.Value) error { - object := value.Object() - _ = object - - if v.Arn != nil { - objectKey := object.Key("arn") - objectKey.String(*v.Arn) - } - - return nil -} - -func awsAwsquery_serializeDocumentProvidedContext(v *types.ProvidedContext, value query.Value) error { - object := value.Object() - _ = object - - if v.ContextAssertion != nil { - objectKey := object.Key("ContextAssertion") - objectKey.String(*v.ContextAssertion) - } - - if v.ProviderArn != nil { - objectKey := object.Key("ProviderArn") - objectKey.String(*v.ProviderArn) - } - - return nil -} - -func awsAwsquery_serializeDocumentProvidedContextsListType(v []types.ProvidedContext, value query.Value) error { - array := value.Array("member") - - for i := range v { - av := array.Value() - if err := awsAwsquery_serializeDocumentProvidedContext(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsquery_serializeDocumentTag(v *types.Tag, value query.Value) error { - object := value.Object() - _ = object - - if v.Key != nil { - objectKey := object.Key("Key") - objectKey.String(*v.Key) - } - - if v.Value != nil { - objectKey := object.Key("Value") - objectKey.String(*v.Value) - } - - return nil -} - -func awsAwsquery_serializeDocumentTagKeyListType(v []string, value query.Value) error { - array := value.Array("member") - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsquery_serializeDocumentTagListType(v []types.Tag, value query.Value) error { - array := value.Array("member") - - for i := range v { - av := array.Value() - if err := awsAwsquery_serializeDocumentTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsquery_serializeOpDocumentAssumeRoleInput(v *AssumeRoleInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.ExternalId != nil { - objectKey := object.Key("ExternalId") - objectKey.String(*v.ExternalId) - } - - if v.Policy != nil { - objectKey := object.Key("Policy") - objectKey.String(*v.Policy) - } - - if v.PolicyArns != nil { - objectKey := object.Key("PolicyArns") - if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { - return err - } - } - - if v.ProvidedContexts != nil { - objectKey := object.Key("ProvidedContexts") - if err := awsAwsquery_serializeDocumentProvidedContextsListType(v.ProvidedContexts, objectKey); err != nil { - return err - } - } - - if v.RoleArn != nil { - objectKey := object.Key("RoleArn") - objectKey.String(*v.RoleArn) - } - - if v.RoleSessionName != nil { - objectKey := object.Key("RoleSessionName") - objectKey.String(*v.RoleSessionName) - } - - if v.SerialNumber != nil { - objectKey := object.Key("SerialNumber") - objectKey.String(*v.SerialNumber) - } - - if v.SourceIdentity != nil { - objectKey := object.Key("SourceIdentity") - objectKey.String(*v.SourceIdentity) - } - - if v.Tags != nil { - objectKey := object.Key("Tags") - if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { - return err - } - } - - if v.TokenCode != nil { - objectKey := object.Key("TokenCode") - objectKey.String(*v.TokenCode) - } - - if v.TransitiveTagKeys != nil { - objectKey := object.Key("TransitiveTagKeys") - if err := awsAwsquery_serializeDocumentTagKeyListType(v.TransitiveTagKeys, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsAwsquery_serializeOpDocumentAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.Policy != nil { - objectKey := object.Key("Policy") - objectKey.String(*v.Policy) - } - - if v.PolicyArns != nil { - objectKey := object.Key("PolicyArns") - if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { - return err - } - } - - if v.PrincipalArn != nil { - objectKey := object.Key("PrincipalArn") - objectKey.String(*v.PrincipalArn) - } - - if v.RoleArn != nil { - objectKey := object.Key("RoleArn") - objectKey.String(*v.RoleArn) - } - - if v.SAMLAssertion != nil { - objectKey := object.Key("SAMLAssertion") - objectKey.String(*v.SAMLAssertion) - } - - return nil -} - -func awsAwsquery_serializeOpDocumentAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.Policy != nil { - objectKey := object.Key("Policy") - objectKey.String(*v.Policy) - } - - if v.PolicyArns != nil { - objectKey := object.Key("PolicyArns") - if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { - return err - } - } - - if v.ProviderId != nil { - objectKey := object.Key("ProviderId") - objectKey.String(*v.ProviderId) - } - - if v.RoleArn != nil { - objectKey := object.Key("RoleArn") - objectKey.String(*v.RoleArn) - } - - if v.RoleSessionName != nil { - objectKey := object.Key("RoleSessionName") - objectKey.String(*v.RoleSessionName) - } - - if v.WebIdentityToken != nil { - objectKey := object.Key("WebIdentityToken") - objectKey.String(*v.WebIdentityToken) - } - - return nil -} - -func awsAwsquery_serializeOpDocumentAssumeRootInput(v *AssumeRootInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.TargetPrincipal != nil { - objectKey := object.Key("TargetPrincipal") - objectKey.String(*v.TargetPrincipal) - } - - if v.TaskPolicyArn != nil { - objectKey := object.Key("TaskPolicyArn") - if err := awsAwsquery_serializeDocumentPolicyDescriptorType(v.TaskPolicyArn, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsAwsquery_serializeOpDocumentDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput, value query.Value) error { - object := value.Object() - _ = object - - if v.EncodedMessage != nil { - objectKey := object.Key("EncodedMessage") - objectKey.String(*v.EncodedMessage) - } - - return nil -} - -func awsAwsquery_serializeOpDocumentGetAccessKeyInfoInput(v *GetAccessKeyInfoInput, value query.Value) error { - object := value.Object() - _ = object - - if v.AccessKeyId != nil { - objectKey := object.Key("AccessKeyId") - objectKey.String(*v.AccessKeyId) - } - - return nil -} - -func awsAwsquery_serializeOpDocumentGetCallerIdentityInput(v *GetCallerIdentityInput, value query.Value) error { - object := value.Object() - _ = object - - return nil -} - -func awsAwsquery_serializeOpDocumentGetFederationTokenInput(v *GetFederationTokenInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.Name != nil { - objectKey := object.Key("Name") - objectKey.String(*v.Name) - } - - if v.Policy != nil { - objectKey := object.Key("Policy") - objectKey.String(*v.Policy) - } - - if v.PolicyArns != nil { - objectKey := object.Key("PolicyArns") - if err := awsAwsquery_serializeDocumentPolicyDescriptorListType(v.PolicyArns, objectKey); err != nil { - return err - } - } - - if v.Tags != nil { - objectKey := object.Key("Tags") - if err := awsAwsquery_serializeDocumentTagListType(v.Tags, objectKey); err != nil { - return err - } - } - - return nil -} - -func awsAwsquery_serializeOpDocumentGetSessionTokenInput(v *GetSessionTokenInput, value query.Value) error { - object := value.Object() - _ = object - - if v.DurationSeconds != nil { - objectKey := object.Key("DurationSeconds") - objectKey.Integer(*v.DurationSeconds) - } - - if v.SerialNumber != nil { - objectKey := object.Key("SerialNumber") - objectKey.String(*v.SerialNumber) - } - - if v.TokenCode != nil { - objectKey := object.Key("TokenCode") - objectKey.String(*v.TokenCode) - } - - return nil -} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go deleted file mode 100644 index 041629bba2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/errors.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// The web identity token that was passed is expired or is not valid. Get a new -// identity token from the identity provider and then retry the request. -type ExpiredTokenException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ExpiredTokenException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ExpiredTokenException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ExpiredTokenException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ExpiredTokenException" - } - return *e.ErrorCodeOverride -} -func (e *ExpiredTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request could not be fulfilled because the identity provider (IDP) that was -// asked to verify the incoming identity token could not be reached. This is often -// a transient error caused by network conditions. Retry the request a limited -// number of times so that you don't exceed the request rate. If the error -// persists, the identity provider might be down or not responding. -type IDPCommunicationErrorException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *IDPCommunicationErrorException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *IDPCommunicationErrorException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *IDPCommunicationErrorException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "IDPCommunicationError" - } - return *e.ErrorCodeOverride -} -func (e *IDPCommunicationErrorException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The identity provider (IdP) reported that authentication failed. This might be -// because the claim is invalid. -// -// If this error is returned for the AssumeRoleWithWebIdentity operation, it can -// also mean that the claim has expired or has been explicitly revoked. -type IDPRejectedClaimException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *IDPRejectedClaimException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *IDPRejectedClaimException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *IDPRejectedClaimException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "IDPRejectedClaim" - } - return *e.ErrorCodeOverride -} -func (e *IDPRejectedClaimException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The error returned if the message passed to DecodeAuthorizationMessage was -// invalid. This can happen if the token contains invalid characters, such as line -// breaks, or if the message has expired. -type InvalidAuthorizationMessageException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidAuthorizationMessageException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidAuthorizationMessageException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidAuthorizationMessageException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidAuthorizationMessageException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidAuthorizationMessageException) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// The web identity token that was passed could not be validated by Amazon Web -// Services. Get a new identity token from the identity provider and then retry the -// request. -type InvalidIdentityTokenException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidIdentityTokenException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidIdentityTokenException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidIdentityTokenException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidIdentityToken" - } - return *e.ErrorCodeOverride -} -func (e *InvalidIdentityTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request was rejected because the policy document was malformed. The error -// message describes the specific error. -type MalformedPolicyDocumentException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *MalformedPolicyDocumentException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *MalformedPolicyDocumentException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *MalformedPolicyDocumentException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "MalformedPolicyDocument" - } - return *e.ErrorCodeOverride -} -func (e *MalformedPolicyDocumentException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An Amazon Web Services conversion -// compresses the session policy document, session policy ARNs, and session tags -// into a packed binary format that has a separate limit. The error message -// indicates by percentage how close the policies and tags are to the upper size -// limit. For more information, see [Passing Session Tags in STS]in the IAM User Guide. -// -// You could receive this error even though you meet other defined session policy -// and session tag limits. For more information, see [IAM and STS Entity Character Limits]in the IAM User Guide. -// -// [Passing Session Tags in STS]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -// [IAM and STS Entity Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html#reference_iam-limits-entity-length -type PackedPolicyTooLargeException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *PackedPolicyTooLargeException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *PackedPolicyTooLargeException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *PackedPolicyTooLargeException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "PackedPolicyTooLarge" - } - return *e.ErrorCodeOverride -} -func (e *PackedPolicyTooLargeException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// STS is not activated in the requested region for the account that is being -// asked to generate credentials. The account administrator must use the IAM -// console to activate STS in that region. For more information, see [Activating and Deactivating STS in an Amazon Web Services Region]in the IAM -// User Guide. -// -// [Activating and Deactivating STS in an Amazon Web Services Region]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html -type RegionDisabledException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *RegionDisabledException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *RegionDisabledException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *RegionDisabledException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "RegionDisabledException" - } - return *e.ErrorCodeOverride -} -func (e *RegionDisabledException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go deleted file mode 100644 index dff7a3c2e7..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/types/types.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" - "time" -) - -// The identifiers for the temporary security credentials that the operation -// returns. -type AssumedRoleUser struct { - - // The ARN of the temporary security credentials that are returned from the AssumeRole - // action. For more information about ARNs and how to use them in policies, see [IAM Identifiers]in - // the IAM User Guide. - // - // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html - // - // This member is required. - Arn *string - - // A unique identifier that contains the role ID and the role session name of the - // role that is being assumed. The role ID is generated by Amazon Web Services when - // the role is created. - // - // This member is required. - AssumedRoleId *string - - noSmithyDocumentSerde -} - -// Amazon Web Services credentials for API authentication. -type Credentials struct { - - // The access key ID that identifies the temporary security credentials. - // - // This member is required. - AccessKeyId *string - - // The date on which the current credentials expire. - // - // This member is required. - Expiration *time.Time - - // The secret access key that can be used to sign requests. - // - // This member is required. - SecretAccessKey *string - - // The token that users must pass to the service API to use the temporary - // credentials. - // - // This member is required. - SessionToken *string - - noSmithyDocumentSerde -} - -// Identifiers for the federated user that is associated with the credentials. -type FederatedUser struct { - - // The ARN that specifies the federated user that is associated with the - // credentials. For more information about ARNs and how to use them in policies, - // see [IAM Identifiers]in the IAM User Guide. - // - // [IAM Identifiers]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html - // - // This member is required. - Arn *string - - // The string that identifies the federated user associated with the credentials, - // similar to the unique ID of an IAM user. - // - // This member is required. - FederatedUserId *string - - noSmithyDocumentSerde -} - -// A reference to the IAM managed policy that is passed as a session policy for a -// role session or a federated user session. -type PolicyDescriptorType struct { - - // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session - // policy for the role. For more information about ARNs, see [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]in the Amazon Web - // Services General Reference. - // - // [Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - Arn *string - - noSmithyDocumentSerde -} - -// Contains information about the provided context. This includes the signed and -// encrypted trusted context assertion and the context provider ARN from which the -// trusted context assertion was generated. -type ProvidedContext struct { - - // The signed and encrypted trusted context assertion generated by the context - // provider. The trusted context assertion is signed and encrypted by Amazon Web - // Services STS. - ContextAssertion *string - - // The context provider ARN from which the trusted context assertion was generated. - ProviderArn *string - - noSmithyDocumentSerde -} - -// You can pass custom key-value pair attributes when you assume a role or -// federate a user. These are called session tags. You can then use the session -// tags to control access to resources. For more information, see [Tagging Amazon Web Services STS Sessions]in the IAM User -// Guide. -// -// [Tagging Amazon Web Services STS Sessions]: https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html -type Tag struct { - - // The key for a session tag. - // - // You can pass up to 50 session tags. The plain text session tag keys can’t - // exceed 128 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User - // Guide. - // - // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length - // - // This member is required. - Key *string - - // The value for a session tag. - // - // You can pass up to 50 session tags. The plain text session tag values can’t - // exceed 256 characters. For these and additional limits, see [IAM and STS Character Limits]in the IAM User - // Guide. - // - // [IAM and STS Character Limits]: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length - // - // This member is required. - Value *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go deleted file mode 100644 index 1026e22118..0000000000 --- a/vendor/github.com/aws/aws-sdk-go-v2/service/sts/validators.go +++ /dev/null @@ -1,347 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package sts - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/sts/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpAssumeRole struct { -} - -func (*validateOpAssumeRole) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssumeRole) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssumeRoleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssumeRoleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssumeRoleWithSAML struct { -} - -func (*validateOpAssumeRoleWithSAML) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssumeRoleWithSAML) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssumeRoleWithSAMLInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssumeRoleWithSAMLInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssumeRoleWithWebIdentity struct { -} - -func (*validateOpAssumeRoleWithWebIdentity) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssumeRoleWithWebIdentity) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssumeRoleWithWebIdentityInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssumeRoleWithWebIdentityInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssumeRoot struct { -} - -func (*validateOpAssumeRoot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssumeRoot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssumeRootInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssumeRootInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDecodeAuthorizationMessage struct { -} - -func (*validateOpDecodeAuthorizationMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDecodeAuthorizationMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DecodeAuthorizationMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDecodeAuthorizationMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetAccessKeyInfo struct { -} - -func (*validateOpGetAccessKeyInfo) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetAccessKeyInfo) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAccessKeyInfoInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAccessKeyInfoInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetFederationToken struct { -} - -func (*validateOpGetFederationToken) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetFederationToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetFederationTokenInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetFederationTokenInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpAssumeRoleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssumeRole{}, middleware.After) -} - -func addOpAssumeRoleWithSAMLValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssumeRoleWithSAML{}, middleware.After) -} - -func addOpAssumeRoleWithWebIdentityValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssumeRoleWithWebIdentity{}, middleware.After) -} - -func addOpAssumeRootValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssumeRoot{}, middleware.After) -} - -func addOpDecodeAuthorizationMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDecodeAuthorizationMessage{}, middleware.After) -} - -func addOpGetAccessKeyInfoValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAccessKeyInfo{}, middleware.After) -} - -func addOpGetFederationTokenValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetFederationToken{}, middleware.After) -} - -func validateTag(v *types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Tag"} - if v.Key == nil { - invalidParams.Add(smithy.NewErrParamRequired("Key")) - } - if v.Value == nil { - invalidParams.Add(smithy.NewErrParamRequired("Value")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTagListType(v []types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagListType"} - for i := range v { - if err := validateTag(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssumeRoleInput(v *AssumeRoleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleInput"} - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } - if v.RoleSessionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName")) - } - if v.Tags != nil { - if err := validateTagListType(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssumeRoleWithSAMLInput(v *AssumeRoleWithSAMLInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithSAMLInput"} - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } - if v.PrincipalArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("PrincipalArn")) - } - if v.SAMLAssertion == nil { - invalidParams.Add(smithy.NewErrParamRequired("SAMLAssertion")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssumeRoleWithWebIdentityInput(v *AssumeRoleWithWebIdentityInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssumeRoleWithWebIdentityInput"} - if v.RoleArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleArn")) - } - if v.RoleSessionName == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoleSessionName")) - } - if v.WebIdentityToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("WebIdentityToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssumeRootInput(v *AssumeRootInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssumeRootInput"} - if v.TargetPrincipal == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetPrincipal")) - } - if v.TaskPolicyArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("TaskPolicyArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDecodeAuthorizationMessageInput(v *DecodeAuthorizationMessageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DecodeAuthorizationMessageInput"} - if v.EncodedMessage == nil { - invalidParams.Add(smithy.NewErrParamRequired("EncodedMessage")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAccessKeyInfoInput(v *GetAccessKeyInfoInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAccessKeyInfoInput"} - if v.AccessKeyId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccessKeyId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetFederationTokenInput(v *GetFederationTokenInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetFederationTokenInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Tags != nil { - if err := validateTagListType(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/vendor/github.com/aws/smithy-go/.gitignore b/vendor/github.com/aws/smithy-go/.gitignore deleted file mode 100644 index 2518b34915..0000000000 --- a/vendor/github.com/aws/smithy-go/.gitignore +++ /dev/null @@ -1,29 +0,0 @@ -# Eclipse -.classpath -.project -.settings/ - -# Intellij -.idea/ -*.iml -*.iws - -# Mac -.DS_Store - -# Maven -target/ -**/dependency-reduced-pom.xml - -# Gradle -/.gradle -build/ -*/out/ -*/*/out/ - -# VS Code -bin/ -.vscode/ - -# make -c.out diff --git a/vendor/github.com/aws/smithy-go/.travis.yml b/vendor/github.com/aws/smithy-go/.travis.yml deleted file mode 100644 index f8d1035cc3..0000000000 --- a/vendor/github.com/aws/smithy-go/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: go -sudo: true -dist: bionic - -branches: - only: - - main - -os: - - linux - - osx - # Travis doesn't work with windows and Go tip - #- windows - -go: - - tip - -matrix: - allow_failures: - - go: tip - -before_install: - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi - - (cd /tmp/; go get golang.org/x/lint/golint) - -script: - - make go test -v ./...; - diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md deleted file mode 100644 index 8b6ab29500..0000000000 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ /dev/null @@ -1,330 +0,0 @@ -# Release (2025-08-27) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.23.0 - * **Feature**: Sort map keys in JSON Document types. - -# Release (2025-07-24) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.5 - * **Feature**: Add HTTP interceptors. - -# Release (2025-06-16) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.4 - * **Bug Fix**: Fix CBOR serd empty check for string and enum fields - * **Bug Fix**: Fix HTTP metrics data race. - * **Bug Fix**: Replace usages of deprecated ioutil package. - -# Release (2025-02-17) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.3 - * **Dependency Update**: Bump minimum Go version to 1.22 per our language support policy. - -# Release (2025-01-21) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.2 - * **Bug Fix**: Fix HTTP metrics data race. - * **Bug Fix**: Replace usages of deprecated ioutil package. - -# Release (2024-11-15) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.1 - * **Bug Fix**: Fix failure to replace URI path segments when their names overlap. - -# Release (2024-10-03) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.22.0 - * **Feature**: Add HTTP client metrics. - -# Release (2024-09-25) - -## Module Highlights -* `github.com/aws/smithy-go/aws-http-auth`: [v1.0.0](aws-http-auth/CHANGELOG.md#v100-2024-09-25) - * **Release**: Initial release of module aws-http-auth, which implements generically consumable SigV4 and SigV4a request signing. - -# Release (2024-09-19) - -## General Highlights -* **Dependency Update**: Updated to the latest SDK module versions - -## Module Highlights -* `github.com/aws/smithy-go`: v1.21.0 - * **Feature**: Add tracing and metrics APIs, and builtin instrumentation for both, in generated clients. -* `github.com/aws/smithy-go/metrics/smithyotelmetrics`: [v1.0.0](metrics/smithyotelmetrics/CHANGELOG.md#v100-2024-09-19) - * **Release**: Initial release of `smithyotelmetrics` module, which is used to adapt an OpenTelemetry SDK meter provider to be used with Smithy clients. -* `github.com/aws/smithy-go/tracing/smithyoteltracing`: [v1.0.0](tracing/smithyoteltracing/CHANGELOG.md#v100-2024-09-19) - * **Release**: Initial release of `smithyoteltracing` module, which is used to adapt an OpenTelemetry SDK tracer provider to be used with Smithy clients. - -# Release (2024-08-14) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.4 - * **Dependency Update**: Bump minimum Go version to 1.21. - -# Release (2024-06-27) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.3 - * **Bug Fix**: Fix encoding/cbor test overflow on x86. - -# Release (2024-03-29) - -* No change notes available for this release. - -# Release (2024-02-21) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.1 - * **Bug Fix**: Remove runtime dependency on go-cmp. - -# Release (2024-02-13) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.20.0 - * **Feature**: Add codegen definition for sigv4a trait. - * **Feature**: Bump minimum Go version to 1.20 per our language support policy. - -# Release (2023-12-07) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.19.0 - * **Feature**: Support modeled request compression. - -# Release (2023-11-30) - -* No change notes available for this release. - -# Release (2023-11-29) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.18.0 - * **Feature**: Expose Options() method on generated service clients. - -# Release (2023-11-15) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.17.0 - * **Feature**: Support identity/auth components of client reference architecture. - -# Release (2023-10-31) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.16.0 - * **Feature**: **LANG**: Bump minimum go version to 1.19. - -# Release (2023-10-06) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.15.0 - * **Feature**: Add `http.WithHeaderComment` middleware. - -# Release (2023-08-18) - -* No change notes available for this release. - -# Release (2023-08-07) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.14.1 - * **Bug Fix**: Prevent duplicated error returns in EndpointResolverV2 default implementation. - -# Release (2023-07-31) - -## General Highlights -* **Feature**: Adds support for smithy-modeled endpoint resolution. - -# Release (2022-12-02) - -* No change notes available for this release. - -# Release (2022-10-24) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.13.4 - * **Bug Fix**: fixed document type checking for encoding nested types - -# Release (2022-09-14) - -* No change notes available for this release. - -# Release (v1.13.2) - -* No change notes available for this release. - -# Release (v1.13.1) - -* No change notes available for this release. - -# Release (v1.13.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.13.0 - * **Feature**: Adds support for the Smithy httpBearerAuth authentication trait to smithy-go. This allows the SDK to support the bearer authentication flow for API operations decorated with httpBearerAuth. An API client will need to be provided with its own bearer.TokenProvider implementation or use the bearer.StaticTokenProvider implementation. - -# Release (v1.12.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.12.1 - * **Bug Fix**: Fixes a bug where JSON object keys were not escaped. - -# Release (v1.12.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.12.0 - * **Feature**: `transport/http`: Add utility for setting context metadata when operation serializer automatically assigns content-type default value. - -# Release (v1.11.3) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.3 - * **Dependency Update**: Updates smithy-go unit test dependency go-cmp to 0.5.8. - -# Release (v1.11.2) - -* No change notes available for this release. - -# Release (v1.11.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.1 - * **Bug Fix**: Updates the smithy-go HTTP Request to correctly handle building the request to an http.Request. Related to [aws/aws-sdk-go-v2#1583](https://github.com/aws/aws-sdk-go-v2/issues/1583) - -# Release (v1.11.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.11.0 - * **Feature**: Updates deserialization of header list to supported quoted strings - -# Release (v1.10.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.10.0 - * **Feature**: Add `ptr.Duration`, `ptr.ToDuration`, `ptr.DurationSlice`, `ptr.ToDurationSlice`, `ptr.DurationMap`, and `ptr.ToDurationMap` functions for the `time.Duration` type. - -# Release (v1.9.1) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.9.1 - * **Documentation**: Fixes various typos in Go package documentation. - -# Release (v1.9.0) - -## Module Highlights -* `github.com/aws/smithy-go`: v1.9.0 - * **Feature**: sync: OnceErr, can be used to concurrently record a signal when an error has occurred. - * **Bug Fix**: `transport/http`: CloseResponseBody and ErrorCloseResponseBody middleware have been updated to ensure that the body is fully drained before closing. - -# Release v1.8.1 - -### Smithy Go Module -* **Bug Fix**: Fixed an issue that would cause the HTTP Content-Length to be set to 0 if the stream body was not set. - * Fixes [aws/aws-sdk-go-v2#1418](https://github.com/aws/aws-sdk-go-v2/issues/1418) - -# Release v1.8.0 - -### Smithy Go Module - -* `time`: Add support for parsing additional DateTime timestamp format ([#324](https://github.com/aws/smithy-go/pull/324)) - * Adds support for parsing DateTime timestamp formatted time similar to RFC 3339, but without the `Z` character, nor UTC offset. - * Fixes [#1387](https://github.com/aws/aws-sdk-go-v2/issues/1387) - -# Release v1.7.0 - -### Smithy Go Module -* `ptr`: Handle error for deferred file close call ([#314](https://github.com/aws/smithy-go/pull/314)) - * Handle error for defer close call -* `middleware`: Add Clone to Metadata ([#318](https://github.com/aws/smithy-go/pull/318)) - * Adds a new Clone method to the middleware Metadata type. This provides a shallow clone of the entries in the Metadata. -* `document`: Add new package for document shape serialization support ([#310](https://github.com/aws/smithy-go/pull/310)) - -### Codegen -* Add Smithy Document Shape Support ([#310](https://github.com/aws/smithy-go/pull/310)) - * Adds support for Smithy Document shapes and supporting types for protocols to implement support - -# Release v1.6.0 (2021-07-15) - -### Smithy Go Module -* `encoding/httpbinding`: Support has been added for encoding `float32` and `float64` values that are `NaN`, `Infinity`, or `-Infinity`. ([#316](https://github.com/aws/smithy-go/pull/316)) - -### Codegen -* Adds support for handling `float32` and `float64` `NaN` values in HTTP Protocol Unit Tests. ([#316](https://github.com/aws/smithy-go/pull/316)) -* Adds support protocol generator implementations to override the error code string returned by `ErrorCode` methods on generated error types. ([#315](https://github.com/aws/smithy-go/pull/315)) - -# Release v1.5.0 (2021-06-25) - -### Smithy Go module -* `time`: Update time parsing to not be as strict for HTTPDate and DateTime ([#307](https://github.com/aws/smithy-go/pull/307)) - * Fixes [#302](https://github.com/aws/smithy-go/issues/302) by changing time to UTC before formatting so no local offset time is lost. - -### Codegen -* Adds support for integrating client members via plugins ([#301](https://github.com/aws/smithy-go/pull/301)) -* Fix serialization of enum types marked with payload trait ([#296](https://github.com/aws/smithy-go/pull/296)) -* Update generation of API client modules to include a manifest of files generated ([#283](https://github.com/aws/smithy-go/pull/283)) -* Update Group Java group ID for smithy-go generator ([#298](https://github.com/aws/smithy-go/pull/298)) -* Support the delegation of determining the errors that can occur for an operation ([#304](https://github.com/aws/smithy-go/pull/304)) -* Support for marking and documenting deprecated client config fields. ([#303](https://github.com/aws/smithy-go/pull/303)) - -# Release v1.4.0 (2021-05-06) - -### Smithy Go module -* `encoding/xml`: Fix escaping of Next Line and Line Start in XML Encoder ([#267](https://github.com/aws/smithy-go/pull/267)) - -### Codegen -* Add support for Smithy 1.7 ([#289](https://github.com/aws/smithy-go/pull/289)) -* Add support for httpQueryParams location -* Add support for model renaming conflict resolution with service closure - -# Release v1.3.1 (2021-04-08) - -### Smithy Go module -* `transport/http`: Loosen endpoint hostname validation to allow specifying port numbers. ([#279](https://github.com/aws/smithy-go/pull/279)) -* `io`: Fix RingBuffer panics due to out of bounds index. ([#282](https://github.com/aws/smithy-go/pull/282)) - -# Release v1.3.0 (2021-04-01) - -### Smithy Go module -* `transport/http`: Add utility to safely join string to url path, and url raw query. - -### Codegen -* Update HttpBindingProtocolGenerator to use http/transport JoinPath and JoinQuery utility. - -# Release v1.2.0 (2021-03-12) - -### Smithy Go module -* Fix support for parsing shortened year format in HTTP Date header. -* Fix GitHub APIDiff action workflow to get gorelease tool correctly. -* Fix codegen artifact unit test for Go 1.16 - -### Codegen -* Fix generating paginator nil parameter handling before usage. -* Fix Serialize unboxed members decorated as required. -* Add ability to define resolvers at both client construction and operation invocation. -* Support for extending paginators with custom runtime trait diff --git a/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md b/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md deleted file mode 100644 index 5b627cfa60..0000000000 --- a/vendor/github.com/aws/smithy-go/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,4 +0,0 @@ -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md b/vendor/github.com/aws/smithy-go/CONTRIBUTING.md deleted file mode 100644 index 1f8d01ff6a..0000000000 --- a/vendor/github.com/aws/smithy-go/CONTRIBUTING.md +++ /dev/null @@ -1,90 +0,0 @@ -# Contributing Guidelines - -Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional -documentation, we greatly value feedback and contributions from our community. - -Please read through this document before submitting any issues or pull requests to ensure we have all the necessary -information to effectively respond to your bug report or contribution. - - -## Reporting Bugs/Feature Requests - -We welcome you to use the GitHub issue tracker to report bugs or suggest features. - -When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already -reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: - -* A reproducible test case or series of steps -* The version of our code being used -* Any modifications you've made relevant to the bug -* Anything unusual about your environment or deployment - - -## Contributing via Pull Requests -Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: - -1. You are working against the latest source on the *main* branch. -2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. -3. You open an issue to discuss any significant work - we would hate for your time to be wasted. - -To send us a pull request, please: - -1. Fork the repository. -2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. -3. Ensure local tests pass. -4. Commit to your fork using clear commit messages. -5. Send us a pull request, answering any default questions in the pull request interface. -6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. - -GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and -[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). - -### Changelog Documents - -(You can SKIP this step if you are only changing the code generator, and not the runtime). - -When submitting a pull request please include a changelog file on a folder named `.changelog`. -These are used to generate the content `CHANGELOG.md` and Release Notes. The format of the file is as follows: - -``` -{ - "id": "12345678-1234-1234-1234-123456789012" - "type": "bugfix" - "collapse": true - "description": "Fix improper use of printf-style functions.", - "modules": [ - "." - ] -} -``` - -* id: a UUID. This should also be used for the name of the file, so if your id is `12345678-1234-1234-1234-123456789012` the file should be named `12345678-1234-1234-1234-123456789012.json/` -* type: one of the following: - * bugfix: Fixing an existing bug - * Feature: Adding a new feature to an existing service - * Release: Releasing a new module - * Dependency: Updating dependencies - * Announcement: Making an announcement, like deprecation of a module -* collapse: whether this change should appear separately on the release notes on every module listed on `modules` (`"collapse": false`), or if it should show up as a single entry (`"collapse": true`) - * For the smithy-go repository this should always be `false` -* description: Description of this change. Most of the times is the same as the title of the PR -* modules: which Go modules does this change impact. The root module is expressed as "." - - -## Finding contributions to work on -Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start. - - -## Code of Conduct -This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). -For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact -opensource-codeofconduct@amazon.com with any additional questions or comments. - - -## Security issue notifications -If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. - - -## Licensing - -See the [LICENSE](LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. diff --git a/vendor/github.com/aws/smithy-go/LICENSE b/vendor/github.com/aws/smithy-go/LICENSE deleted file mode 100644 index 67db858821..0000000000 --- a/vendor/github.com/aws/smithy-go/LICENSE +++ /dev/null @@ -1,175 +0,0 @@ - - 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. diff --git a/vendor/github.com/aws/smithy-go/Makefile b/vendor/github.com/aws/smithy-go/Makefile deleted file mode 100644 index 34b17ab2fe..0000000000 --- a/vendor/github.com/aws/smithy-go/Makefile +++ /dev/null @@ -1,125 +0,0 @@ -PRE_RELEASE_VERSION ?= - -RELEASE_MANIFEST_FILE ?= -RELEASE_CHGLOG_DESC_FILE ?= - -REPOTOOLS_VERSION ?= latest -REPOTOOLS_MODULE = github.com/awslabs/aws-go-multi-module-repository-tools -REPOTOOLS_CMD_CALCULATE_RELEASE = ${REPOTOOLS_MODULE}/cmd/calculaterelease@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS ?= -REPOTOOLS_CMD_UPDATE_REQUIRES = ${REPOTOOLS_MODULE}/cmd/updaterequires@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_UPDATE_MODULE_METADATA = ${REPOTOOLS_MODULE}/cmd/updatemodulemeta@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_GENERATE_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/generatechangelog@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_CHANGELOG = ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_TAG_RELEASE = ${REPOTOOLS_MODULE}/cmd/tagrelease@${REPOTOOLS_VERSION} -REPOTOOLS_CMD_MODULE_VERSION = ${REPOTOOLS_MODULE}/cmd/moduleversion@${REPOTOOLS_VERSION} - -UNIT_TEST_TAGS= -BUILD_TAGS= - -ifneq ($(PRE_RELEASE_VERSION),) - REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS += -preview=${PRE_RELEASE_VERSION} -endif - -smithy-publish-local: - cd codegen && ./gradlew publishToMavenLocal - -smithy-build: - cd codegen && ./gradlew build - -smithy-clean: - cd codegen && ./gradlew clean - -GRADLE_RETRIES := 3 -GRADLE_SLEEP := 2 - -# We're making a call to ./gradlew to trigger downloading Gradle and -# starting the daemon. Any call works, so using `./gradlew help` -ensure-gradle-up: - @cd codegen && for i in $(shell seq 1 $(GRADLE_RETRIES)); do \ - echo "Checking if Gradle daemon is up, attempt $$i..."; \ - if ./gradlew help; then \ - echo "Gradle daemon is up!"; \ - exit 0; \ - fi; \ - echo "Failed to start Gradle, retrying in $(GRADLE_SLEEP) seconds..."; \ - sleep $(GRADLE_SLEEP); \ - done; \ - echo "Failed to start Gradle after $(GRADLE_RETRIES) attempts."; \ - exit 1 - -################## -# Linting/Verify # -################## -.PHONY: verify vet cover - -verify: vet - -vet: - go vet ${BUILD_TAGS} --all ./... - -cover: - go test ${BUILD_TAGS} -coverprofile c.out ./... - @cover=`go tool cover -func c.out | grep '^total:' | awk '{ print $$3+0 }'`; \ - echo "total (statements): $$cover%"; - -################ -# Unit Testing # -################ -.PHONY: unit unit-race unit-test unit-race-test - -unit: verify - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} ./... - -unit-race: verify - go test ${BUILD_TAGS} ${RUN_NONE} ./... && \ - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... - -unit-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} ./... - -unit-race-test: verify - go test -timeout=1m ${UNIT_TEST_TAGS} -race -cpu=4 ./... - -##################### -# Release Process # -##################### -.PHONY: preview-release pre-release-validation release - -preview-release: - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS} - -pre-release-validation: - @if [[ -z "${RELEASE_MANIFEST_FILE}" ]]; then \ - echo "RELEASE_MANIFEST_FILE is required to specify the file to write the release manifest" && false; \ - fi - @if [[ -z "${RELEASE_CHGLOG_DESC_FILE}" ]]; then \ - echo "RELEASE_CHGLOG_DESC_FILE is required to specify the file to write the release notes" && false; \ - fi - -release: pre-release-validation - go run ${REPOTOOLS_CMD_CALCULATE_RELEASE} -o ${RELEASE_MANIFEST_FILE} ${REPOTOOLS_CMD_CALCULATE_RELEASE_ADDITIONAL_ARGS} - go run ${REPOTOOLS_CMD_UPDATE_REQUIRES} -release ${RELEASE_MANIFEST_FILE} - go run ${REPOTOOLS_CMD_UPDATE_MODULE_METADATA} -release ${RELEASE_MANIFEST_FILE} - go run ${REPOTOOLS_CMD_GENERATE_CHANGELOG} -release ${RELEASE_MANIFEST_FILE} -o ${RELEASE_CHGLOG_DESC_FILE} - go run ${REPOTOOLS_CMD_CHANGELOG} rm -all - go run ${REPOTOOLS_CMD_TAG_RELEASE} -release ${RELEASE_MANIFEST_FILE} - -module-version: - @go run ${REPOTOOLS_CMD_MODULE_VERSION} . - -############## -# Repo Tools # -############## -.PHONY: install-changelog - -external-changelog: - mkdir -p .changelog - cp changelog-template.json .changelog/00000000-0000-0000-0000-000000000000.json - @echo "Generate a new UUID and update the file at .changelog/00000000-0000-0000-0000-000000000000.json" - @echo "Make sure to rename the file with your new id, like .changelog/12345678-1234-1234-1234-123456789012.json" - @echo "See CONTRIBUTING.md 'Changelog Documents' and an example at https://github.com/aws/smithy-go/pull/543/files" - -install-changelog: - go install ${REPOTOOLS_MODULE}/cmd/changelog@${REPOTOOLS_VERSION} diff --git a/vendor/github.com/aws/smithy-go/NOTICE b/vendor/github.com/aws/smithy-go/NOTICE deleted file mode 100644 index 616fc58894..0000000000 --- a/vendor/github.com/aws/smithy-go/NOTICE +++ /dev/null @@ -1 +0,0 @@ -Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md deleted file mode 100644 index 77a74ae0c2..0000000000 --- a/vendor/github.com/aws/smithy-go/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Smithy Go - -[![Go Build Status](https://github.com/aws/smithy-go/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/go.yml)[![Codegen Build Status](https://github.com/aws/smithy-go/actions/workflows/codegen.yml/badge.svg?branch=main)](https://github.com/aws/smithy-go/actions/workflows/codegen.yml) - -[Smithy](https://smithy.io/) code generators for Go and the accompanying smithy-go runtime. - -The smithy-go runtime requires a minimum version of Go 1.22. - -**WARNING: All interfaces are subject to change.** - -## :no_entry_sign: DO NOT use the code generators in this repository - -**The code generators in this repository do not generate working clients at -this time.** - -In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), -such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), -in order to generate transport mechanisms and serialization/deserialization -code ("serde") accordingly. - -The code generator does not currently support any protocols out of the box. -Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) -exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are -tracking the movement of those out of the SDK into smithy-go in -[#458](https://github.com/aws/smithy-go/issues/458), but there's currently no -timeline for doing so. - -## Plugins - -This repository implements the following Smithy build plugins: - -| ID | GAV prefix | Description | -|----|------------|-------------| -| `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | -| `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | -| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go shape code generation (types only) for Smithy models. | - -**NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.** - -## `go-codegen` - -### Configuration - -[`GoSettings`](codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoSettings.java) -contains all of the settings enabled from `smithy-build.json` and helper -methods and types. The up-to-date list of top-level properties enabled for -`go-client-codegen` can be found in `GoSettings::from()`. - -| Setting | Type | Required | Description | -|-----------------|---------|----------|-----------------------------------------------------------------------------------------------------------------------------| -| `service` | string | yes | The Shape ID of the service for which to generate the client. | -| `module` | string | yes | Name of the module in `generated.json` (and `go.mod` if `generateGoMod` is enabled) and `doc.go`. | -| `generateGoMod` | boolean | | Whether to generate a default `go.mod` file. The default value is `false`. | -| `goDirective` | string | | [Go directive](https://go.dev/ref/mod#go-mod-file-go) of the module. The default value is the minimum supported Go version. | - -### Supported protocols - -| Protocol | Notes | -|----------|-------| -| [`smithy.protocols#rpcv2Cbor`](https://smithy.io/2.0/additional-specs/protocols/smithy-rpc-v2.html) | Event streaming not yet implemented. | - -### Example - -This example applies the `go-codegen` build plugin to the Smithy quickstart -example created from `smithy init`: - -```json -{ - "version": "1.0", - "sources": [ - "models" - ], - "maven": { - "dependencies": [ - "software.amazon.smithy.go:smithy-go-codegen:0.1.0" - ] - }, - "plugins": { - "go-codegen": { - "service": "example.weather#Weather", - "module": "github.com/example/weather", - "generateGoMod": true, - "goDirective": "1.22" - } - } -} -``` - -## `go-server-codegen` - -This plugin is a work-in-progress and is currently undocumented. - -## `go-shape-codegen` - -This plugin is a work-in-progress and is currently undocumented. - -## License - -This project is licensed under the Apache-2.0 License. - diff --git a/vendor/github.com/aws/smithy-go/auth/auth.go b/vendor/github.com/aws/smithy-go/auth/auth.go deleted file mode 100644 index 5bdb70c9a7..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/auth.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package auth defines protocol-agnostic authentication types for smithy -// clients. -package auth diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go b/vendor/github.com/aws/smithy-go/auth/bearer/docs.go deleted file mode 100644 index 1c9b9715cb..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/docs.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package bearer provides middleware and utilities for authenticating API -// operation calls with a Bearer Token. -package bearer diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go b/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go deleted file mode 100644 index 8c7d720995..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/middleware.go +++ /dev/null @@ -1,104 +0,0 @@ -package bearer - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Message is the middleware stack's request transport message value. -type Message interface{} - -// Signer provides an interface for implementations to decorate a request -// message with a bearer token. The signer is responsible for validating the -// message type is compatible with the signer. -type Signer interface { - SignWithBearerToken(context.Context, Token, Message) (Message, error) -} - -// AuthenticationMiddleware provides the Finalize middleware step for signing -// an request message with a bearer token. -type AuthenticationMiddleware struct { - signer Signer - tokenProvider TokenProvider -} - -// AddAuthenticationMiddleware helper adds the AuthenticationMiddleware to the -// middleware Stack in the Finalize step with the options provided. -func AddAuthenticationMiddleware(s *middleware.Stack, signer Signer, tokenProvider TokenProvider) error { - return s.Finalize.Add( - NewAuthenticationMiddleware(signer, tokenProvider), - middleware.After, - ) -} - -// NewAuthenticationMiddleware returns an initialized AuthenticationMiddleware. -func NewAuthenticationMiddleware(signer Signer, tokenProvider TokenProvider) *AuthenticationMiddleware { - return &AuthenticationMiddleware{ - signer: signer, - tokenProvider: tokenProvider, - } -} - -const authenticationMiddlewareID = "BearerTokenAuthentication" - -// ID returns the resolver identifier -func (m *AuthenticationMiddleware) ID() string { - return authenticationMiddlewareID -} - -// HandleFinalize implements the FinalizeMiddleware interface in order to -// update the request with bearer token authentication. -func (m *AuthenticationMiddleware) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - token, err := m.tokenProvider.RetrieveBearerToken(ctx) - if err != nil { - return out, metadata, fmt.Errorf("failed AuthenticationMiddleware wrap message, %w", err) - } - - signedMessage, err := m.signer.SignWithBearerToken(ctx, token, in.Request) - if err != nil { - return out, metadata, fmt.Errorf("failed AuthenticationMiddleware sign message, %w", err) - } - - in.Request = signedMessage - return next.HandleFinalize(ctx, in) -} - -// SignHTTPSMessage provides a bearer token authentication implementation that -// will sign the message with the provided bearer token. -// -// Will fail if the message is not a smithy-go HTTP request or the request is -// not HTTPS. -type SignHTTPSMessage struct{} - -// NewSignHTTPSMessage returns an initialized signer for HTTP messages. -func NewSignHTTPSMessage() *SignHTTPSMessage { - return &SignHTTPSMessage{} -} - -// SignWithBearerToken returns a copy of the HTTP request with the bearer token -// added via the "Authorization" header, per RFC 6750, https://datatracker.ietf.org/doc/html/rfc6750. -// -// Returns an error if the request's URL scheme is not HTTPS, or the request -// message is not an smithy-go HTTP Request pointer type. -func (SignHTTPSMessage) SignWithBearerToken(ctx context.Context, token Token, message Message) (Message, error) { - req, ok := message.(*smithyhttp.Request) - if !ok { - return nil, fmt.Errorf("expect smithy-go HTTP Request, got %T", message) - } - - if !req.IsHTTPS() { - return nil, fmt.Errorf("bearer token with HTTP request requires HTTPS") - } - - reqClone := req.Clone() - reqClone.Header.Set("Authorization", "Bearer "+token.Value) - - return reqClone, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token.go b/vendor/github.com/aws/smithy-go/auth/bearer/token.go deleted file mode 100644 index be260d4c76..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/token.go +++ /dev/null @@ -1,50 +0,0 @@ -package bearer - -import ( - "context" - "time" -) - -// Token provides a type wrapping a bearer token and expiration metadata. -type Token struct { - Value string - - CanExpire bool - Expires time.Time -} - -// Expired returns if the token's Expires time is before or equal to the time -// provided. If CanExpires is false, Expired will always return false. -func (t Token) Expired(now time.Time) bool { - if !t.CanExpire { - return false - } - now = now.Round(0) - return now.Equal(t.Expires) || now.After(t.Expires) -} - -// TokenProvider provides interface for retrieving bearer tokens. -type TokenProvider interface { - RetrieveBearerToken(context.Context) (Token, error) -} - -// TokenProviderFunc provides a helper utility to wrap a function as a type -// that implements the TokenProvider interface. -type TokenProviderFunc func(context.Context) (Token, error) - -// RetrieveBearerToken calls the wrapped function, returning the Token or -// error. -func (fn TokenProviderFunc) RetrieveBearerToken(ctx context.Context) (Token, error) { - return fn(ctx) -} - -// StaticTokenProvider provides a utility for wrapping a static bearer token -// value within an implementation of a token provider. -type StaticTokenProvider struct { - Token Token -} - -// RetrieveBearerToken returns the static token specified. -func (s StaticTokenProvider) RetrieveBearerToken(context.Context) (Token, error) { - return s.Token, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go b/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go deleted file mode 100644 index 223ddf52bb..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/bearer/token_cache.go +++ /dev/null @@ -1,208 +0,0 @@ -package bearer - -import ( - "context" - "fmt" - "sync/atomic" - "time" - - smithycontext "github.com/aws/smithy-go/context" - "github.com/aws/smithy-go/internal/sync/singleflight" -) - -// package variable that can be override in unit tests. -var timeNow = time.Now - -// TokenCacheOptions provides a set of optional configuration options for the -// TokenCache TokenProvider. -type TokenCacheOptions struct { - // The duration before the token will expire when the credentials will be - // refreshed. If DisableAsyncRefresh is true, the RetrieveBearerToken calls - // will be blocking. - // - // Asynchronous refreshes are deduplicated, and only one will be in-flight - // at a time. If the token expires while an asynchronous refresh is in - // flight, the next call to RetrieveBearerToken will block on that refresh - // to return. - RefreshBeforeExpires time.Duration - - // The timeout the underlying TokenProvider's RetrieveBearerToken call must - // return within, or will be canceled. Defaults to 0, no timeout. - // - // If 0 timeout, its possible for the underlying tokenProvider's - // RetrieveBearerToken call to block forever. Preventing subsequent - // TokenCache attempts to refresh the token. - // - // If this timeout is reached all pending deduplicated calls to - // TokenCache RetrieveBearerToken will fail with an error. - RetrieveBearerTokenTimeout time.Duration - - // The minimum duration between asynchronous refresh attempts. If the next - // asynchronous recent refresh attempt was within the minimum delay - // duration, the call to retrieve will return the current cached token, if - // not expired. - // - // The asynchronous retrieve is deduplicated across multiple calls when - // RetrieveBearerToken is called. The asynchronous retrieve is not a - // periodic task. It is only performed when the token has not yet expired, - // and the current item is within the RefreshBeforeExpires window, and the - // TokenCache's RetrieveBearerToken method is called. - // - // If 0, (default) there will be no minimum delay between asynchronous - // refresh attempts. - // - // If DisableAsyncRefresh is true, this option is ignored. - AsyncRefreshMinimumDelay time.Duration - - // Sets if the TokenCache will attempt to refresh the token in the - // background asynchronously instead of blocking for credentials to be - // refreshed. If disabled token refresh will be blocking. - // - // The first call to RetrieveBearerToken will always be blocking, because - // there is no cached token. - DisableAsyncRefresh bool -} - -// TokenCache provides an utility to cache Bearer Authentication tokens from a -// wrapped TokenProvider. The TokenCache can be has options to configure the -// cache's early and asynchronous refresh of the token. -type TokenCache struct { - options TokenCacheOptions - provider TokenProvider - - cachedToken atomic.Value - lastRefreshAttemptTime atomic.Value - sfGroup singleflight.Group -} - -// NewTokenCache returns a initialized TokenCache that implements the -// TokenProvider interface. Wrapping the provider passed in. Also taking a set -// of optional functional option parameters to configure the token cache. -func NewTokenCache(provider TokenProvider, optFns ...func(*TokenCacheOptions)) *TokenCache { - var options TokenCacheOptions - for _, fn := range optFns { - fn(&options) - } - - return &TokenCache{ - options: options, - provider: provider, - } -} - -// RetrieveBearerToken returns the token if it could be obtained, or error if a -// valid token could not be retrieved. -// -// The passed in Context's cancel/deadline/timeout will impacting only this -// individual retrieve call and not any other already queued up calls. This -// means underlying provider's RetrieveBearerToken calls could block for ever, -// and not be canceled with the Context. Set RetrieveBearerTokenTimeout to -// provide a timeout, preventing the underlying TokenProvider blocking forever. -// -// By default, if the passed in Context is canceled, all of its values will be -// considered expired. The wrapped TokenProvider will not be able to lookup the -// values from the Context once it is expired. This is done to protect against -// expired values no longer being valid. To disable this behavior, use -// smithy-go's context.WithPreserveExpiredValues to add a value to the Context -// before calling RetrieveBearerToken to enable support for expired values. -// -// Without RetrieveBearerTokenTimeout there is the potential for a underlying -// Provider's RetrieveBearerToken call to sit forever. Blocking in subsequent -// attempts at refreshing the token. -func (p *TokenCache) RetrieveBearerToken(ctx context.Context) (Token, error) { - cachedToken, ok := p.getCachedToken() - if !ok || cachedToken.Expired(timeNow()) { - return p.refreshBearerToken(ctx) - } - - // Check if the token should be refreshed before it expires. - refreshToken := cachedToken.Expired(timeNow().Add(p.options.RefreshBeforeExpires)) - if !refreshToken { - return cachedToken, nil - } - - if p.options.DisableAsyncRefresh { - return p.refreshBearerToken(ctx) - } - - p.tryAsyncRefresh(ctx) - - return cachedToken, nil -} - -// tryAsyncRefresh attempts to asynchronously refresh the token returning the -// already cached token. If it AsyncRefreshMinimumDelay option is not zero, and -// the duration since the last refresh is less than that value, nothing will be -// done. -func (p *TokenCache) tryAsyncRefresh(ctx context.Context) { - if p.options.AsyncRefreshMinimumDelay != 0 { - var lastRefreshAttempt time.Time - if v := p.lastRefreshAttemptTime.Load(); v != nil { - lastRefreshAttempt = v.(time.Time) - } - - if timeNow().Before(lastRefreshAttempt.Add(p.options.AsyncRefreshMinimumDelay)) { - return - } - } - - // Ignore the returned channel so this won't be blocking, and limit the - // number of additional goroutines created. - p.sfGroup.DoChan("async-refresh", func() (interface{}, error) { - res, err := p.refreshBearerToken(ctx) - if p.options.AsyncRefreshMinimumDelay != 0 { - var refreshAttempt time.Time - if err != nil { - refreshAttempt = timeNow() - } - p.lastRefreshAttemptTime.Store(refreshAttempt) - } - - return res, err - }) -} - -func (p *TokenCache) refreshBearerToken(ctx context.Context) (Token, error) { - resCh := p.sfGroup.DoChan("refresh-token", func() (interface{}, error) { - ctx := smithycontext.WithSuppressCancel(ctx) - if v := p.options.RetrieveBearerTokenTimeout; v != 0 { - var cancel func() - ctx, cancel = context.WithTimeout(ctx, v) - defer cancel() - } - return p.singleRetrieve(ctx) - }) - - select { - case res := <-resCh: - return res.Val.(Token), res.Err - case <-ctx.Done(): - return Token{}, fmt.Errorf("retrieve bearer token canceled, %w", ctx.Err()) - } -} - -func (p *TokenCache) singleRetrieve(ctx context.Context) (interface{}, error) { - token, err := p.provider.RetrieveBearerToken(ctx) - if err != nil { - return Token{}, fmt.Errorf("failed to retrieve bearer token, %w", err) - } - - p.cachedToken.Store(&token) - return token, nil -} - -// getCachedToken returns the currently cached token and true if found. Returns -// false if no token is cached. -func (p *TokenCache) getCachedToken() (Token, bool) { - v := p.cachedToken.Load() - if v == nil { - return Token{}, false - } - - t := v.(*Token) - if t == nil || t.Value == "" { - return Token{}, false - } - - return *t, true -} diff --git a/vendor/github.com/aws/smithy-go/auth/identity.go b/vendor/github.com/aws/smithy-go/auth/identity.go deleted file mode 100644 index ba8cf70d4d..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/identity.go +++ /dev/null @@ -1,47 +0,0 @@ -package auth - -import ( - "context" - "time" - - "github.com/aws/smithy-go" -) - -// Identity contains information that identifies who the user making the -// request is. -type Identity interface { - Expiration() time.Time -} - -// IdentityResolver defines the interface through which an Identity is -// retrieved. -type IdentityResolver interface { - GetIdentity(context.Context, smithy.Properties) (Identity, error) -} - -// IdentityResolverOptions defines the interface through which an entity can be -// queried to retrieve an IdentityResolver for a given auth scheme. -type IdentityResolverOptions interface { - GetIdentityResolver(schemeID string) IdentityResolver -} - -// AnonymousIdentity is a sentinel to indicate no identity. -type AnonymousIdentity struct{} - -var _ Identity = (*AnonymousIdentity)(nil) - -// Expiration returns the zero value for time, as anonymous identity never -// expires. -func (*AnonymousIdentity) Expiration() time.Time { - return time.Time{} -} - -// AnonymousIdentityResolver returns AnonymousIdentity. -type AnonymousIdentityResolver struct{} - -var _ IdentityResolver = (*AnonymousIdentityResolver)(nil) - -// GetIdentity returns AnonymousIdentity. -func (*AnonymousIdentityResolver) GetIdentity(_ context.Context, _ smithy.Properties) (Identity, error) { - return &AnonymousIdentity{}, nil -} diff --git a/vendor/github.com/aws/smithy-go/auth/option.go b/vendor/github.com/aws/smithy-go/auth/option.go deleted file mode 100644 index d5dabff04b..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/option.go +++ /dev/null @@ -1,25 +0,0 @@ -package auth - -import "github.com/aws/smithy-go" - -type ( - authOptionsKey struct{} -) - -// Option represents a possible authentication method for an operation. -type Option struct { - SchemeID string - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -// GetAuthOptions gets auth Options from Properties. -func GetAuthOptions(p *smithy.Properties) ([]*Option, bool) { - v, ok := p.Get(authOptionsKey{}).([]*Option) - return v, ok -} - -// SetAuthOptions sets auth Options on Properties. -func SetAuthOptions(p *smithy.Properties, options []*Option) { - p.Set(authOptionsKey{}, options) -} diff --git a/vendor/github.com/aws/smithy-go/auth/scheme_id.go b/vendor/github.com/aws/smithy-go/auth/scheme_id.go deleted file mode 100644 index fb6a57c640..0000000000 --- a/vendor/github.com/aws/smithy-go/auth/scheme_id.go +++ /dev/null @@ -1,20 +0,0 @@ -package auth - -// Anonymous -const ( - SchemeIDAnonymous = "smithy.api#noAuth" -) - -// HTTP auth schemes -const ( - SchemeIDHTTPBasic = "smithy.api#httpBasicAuth" - SchemeIDHTTPDigest = "smithy.api#httpDigestAuth" - SchemeIDHTTPBearer = "smithy.api#httpBearerAuth" - SchemeIDHTTPAPIKey = "smithy.api#httpApiKeyAuth" -) - -// AWS auth schemes -const ( - SchemeIDSigV4 = "aws.auth#sigv4" - SchemeIDSigV4A = "aws.auth#sigv4a" -) diff --git a/vendor/github.com/aws/smithy-go/changelog-template.json b/vendor/github.com/aws/smithy-go/changelog-template.json deleted file mode 100644 index d36e2b3e1a..0000000000 --- a/vendor/github.com/aws/smithy-go/changelog-template.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "00000000-0000-0000-0000-000000000000", - "type": "feature|bugfix|dependency", - "description": "Description of your changes", - "collapse": false, - "modules": [ - "." - ] -} diff --git a/vendor/github.com/aws/smithy-go/context/suppress_expired.go b/vendor/github.com/aws/smithy-go/context/suppress_expired.go deleted file mode 100644 index a39b84a278..0000000000 --- a/vendor/github.com/aws/smithy-go/context/suppress_expired.go +++ /dev/null @@ -1,81 +0,0 @@ -package context - -import "context" - -// valueOnlyContext provides a utility to preserve only the values of a -// Context. Suppressing any cancellation or deadline on that context being -// propagated downstream of this value. -// -// If preserveExpiredValues is false (default), and the valueCtx is canceled, -// calls to lookup values with the Values method, will always return nil. Setting -// preserveExpiredValues to true, will allow the valueOnlyContext to lookup -// values in valueCtx even if valueCtx is canceled. -// -// Based on the Go standard libraries net/lookup.go onlyValuesCtx utility. -// https://github.com/golang/go/blob/da2773fe3e2f6106634673a38dc3a6eb875fe7d8/src/net/lookup.go -type valueOnlyContext struct { - context.Context - - preserveExpiredValues bool - valuesCtx context.Context -} - -var _ context.Context = (*valueOnlyContext)(nil) - -// Value looks up the key, returning its value. If configured to not preserve -// values of expired context, and the wrapping context is canceled, nil will be -// returned. -func (v *valueOnlyContext) Value(key interface{}) interface{} { - if !v.preserveExpiredValues { - select { - case <-v.valuesCtx.Done(): - return nil - default: - } - } - - return v.valuesCtx.Value(key) -} - -// WithSuppressCancel wraps the Context value, suppressing its deadline and -// cancellation events being propagated downstream to consumer of the returned -// context. -// -// By default the wrapped Context's Values are available downstream until the -// wrapped Context is canceled. Once the wrapped Context is canceled, Values -// method called on the context return will no longer lookup any key. As they -// are now considered expired. -// -// To override this behavior, use WithPreserveExpiredValues on the Context -// before it is wrapped by WithSuppressCancel. This will make the Context -// returned by WithSuppressCancel allow lookup of expired values. -func WithSuppressCancel(ctx context.Context) context.Context { - return &valueOnlyContext{ - Context: context.Background(), - valuesCtx: ctx, - - preserveExpiredValues: GetPreserveExpiredValues(ctx), - } -} - -type preserveExpiredValuesKey struct{} - -// WithPreserveExpiredValues adds a Value to the Context if expired values -// should be preserved, and looked up by a Context wrapped by -// WithSuppressCancel. -// -// WithPreserveExpiredValues must be added as a value to a Context, before that -// Context is wrapped by WithSuppressCancel -func WithPreserveExpiredValues(ctx context.Context, enable bool) context.Context { - return context.WithValue(ctx, preserveExpiredValuesKey{}, enable) -} - -// GetPreserveExpiredValues looks up, and returns the PreserveExpressValues -// value in the context. Returning true if enabled, false otherwise. -func GetPreserveExpiredValues(ctx context.Context) bool { - v := ctx.Value(preserveExpiredValuesKey{}) - if v != nil { - return v.(bool) - } - return false -} diff --git a/vendor/github.com/aws/smithy-go/doc.go b/vendor/github.com/aws/smithy-go/doc.go deleted file mode 100644 index 87b0c74b75..0000000000 --- a/vendor/github.com/aws/smithy-go/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package smithy provides the core components for a Smithy SDK. -package smithy diff --git a/vendor/github.com/aws/smithy-go/document.go b/vendor/github.com/aws/smithy-go/document.go deleted file mode 100644 index dec498c57b..0000000000 --- a/vendor/github.com/aws/smithy-go/document.go +++ /dev/null @@ -1,10 +0,0 @@ -package smithy - -// Document provides access to loosely structured data in a document-like -// format. -// -// Deprecated: See the github.com/aws/smithy-go/document package. -type Document interface { - UnmarshalDocument(interface{}) error - GetValue() (interface{}, error) -} diff --git a/vendor/github.com/aws/smithy-go/document/doc.go b/vendor/github.com/aws/smithy-go/document/doc.go deleted file mode 100644 index 03055b7a1c..0000000000 --- a/vendor/github.com/aws/smithy-go/document/doc.go +++ /dev/null @@ -1,12 +0,0 @@ -// Package document provides interface definitions and error types for document types. -// -// A document is a protocol-agnostic type which supports a JSON-like data-model. You can use this type to send -// UTF-8 strings, arbitrary precision numbers, booleans, nulls, a list of these values, and a map of UTF-8 -// strings to these values. -// -// API Clients expose document constructors in their respective client document packages which must be used to -// Marshal and Unmarshal Go types to and from their respective protocol representations. -// -// See the Marshaler and Unmarshaler type documentation for more details on how to Go types can be converted to and from -// document types. -package document diff --git a/vendor/github.com/aws/smithy-go/document/document.go b/vendor/github.com/aws/smithy-go/document/document.go deleted file mode 100644 index 8f852d95c6..0000000000 --- a/vendor/github.com/aws/smithy-go/document/document.go +++ /dev/null @@ -1,153 +0,0 @@ -package document - -import ( - "fmt" - "math/big" - "strconv" -) - -// Marshaler is an interface for a type that marshals a document to its protocol-specific byte representation and -// returns the resulting bytes. A non-nil error will be returned if an error is encountered during marshaling. -// -// Marshal supports basic scalars (int,uint,float,bool,string), big.Int, and big.Float, maps, slices, and structs. -// Anonymous nested types are flattened based on Go anonymous type visibility. -// -// When defining struct types. the `document` struct tag can be used to control how the value will be -// marshaled into the resulting protocol document. -// -// // Field is ignored -// Field int `document:"-"` -// -// // Field object of key "myName" -// Field int `document:"myName"` -// -// // Field object key of key "myName", and -// // Field is omitted if the field is a zero value for the type. -// Field int `document:"myName,omitempty"` -// -// // Field object key of "Field", and -// // Field is omitted if the field is a zero value for the type. -// Field int `document:",omitempty"` -// -// All struct fields, including anonymous fields, are marshaled unless the -// any of the following conditions are meet. -// -// - the field is not exported -// - document field tag is "-" -// - document field tag specifies "omitempty", and is a zero value. -// -// Pointer and interface values are encoded as the value pointed to or -// contained in the interface. A nil value encodes as a null -// value unless `omitempty` struct tag is provided. -// -// Channel, complex, and function values are not encoded and will be skipped -// when walking the value to be marshaled. -// -// time.Time is not supported and will cause the Marshaler to return an error. These values should be represented -// by your application as a string or numerical representation. -// -// Errors that occur when marshaling will stop the marshaler, and return the error. -// -// Marshal cannot represent cyclic data structures and will not handle them. -// Passing cyclic structures to Marshal will result in an infinite recursion. -type Marshaler interface { - MarshalSmithyDocument() ([]byte, error) -} - -// Unmarshaler is an interface for a type that unmarshals a document from its protocol-specific representation, and -// stores the result into the value pointed by v. If v is nil or not a pointer then InvalidUnmarshalError will be -// returned. -// -// Unmarshaler supports the same encodings produced by a document Marshaler. This includes support for the `document` -// struct field tag for controlling how struct fields are unmarshaled. -// -// Both generic interface{} and concrete types are valid unmarshal destination types. When unmarshaling a document -// into an empty interface the Unmarshaler will store one of these values: -// bool, for boolean values -// document.Number, for arbitrary-precision numbers (int64, float64, big.Int, big.Float) -// string, for string values -// []interface{}, for array values -// map[string]interface{}, for objects -// nil, for null values -// -// When unmarshaling, any error that occurs will halt the unmarshal and return the error. -type Unmarshaler interface { - UnmarshalSmithyDocument(v interface{}) error -} - -type noSerde interface { - noSmithyDocumentSerde() -} - -// NoSerde is a sentinel value to indicate that a given type should not be marshaled or unmarshaled -// into a protocol document. -type NoSerde struct{} - -func (n NoSerde) noSmithyDocumentSerde() {} - -var _ noSerde = (*NoSerde)(nil) - -// IsNoSerde returns whether the given type implements the no smithy document serde interface. -func IsNoSerde(x interface{}) bool { - _, ok := x.(noSerde) - return ok -} - -// Number is an arbitrary precision numerical value -type Number string - -// Int64 returns the number as a string. -func (n Number) String() string { - return string(n) -} - -// Int64 returns the number as an int64. -func (n Number) Int64() (int64, error) { - return n.intOfBitSize(64) -} - -func (n Number) intOfBitSize(bitSize int) (int64, error) { - return strconv.ParseInt(string(n), 10, bitSize) -} - -// Uint64 returns the number as a uint64. -func (n Number) Uint64() (uint64, error) { - return n.uintOfBitSize(64) -} - -func (n Number) uintOfBitSize(bitSize int) (uint64, error) { - return strconv.ParseUint(string(n), 10, bitSize) -} - -// Float32 returns the number parsed as a 32-bit float, returns a float64. -func (n Number) Float32() (float64, error) { - return n.floatOfBitSize(32) -} - -// Float64 returns the number as a float64. -func (n Number) Float64() (float64, error) { - return n.floatOfBitSize(64) -} - -// Float64 returns the number as a float64. -func (n Number) floatOfBitSize(bitSize int) (float64, error) { - return strconv.ParseFloat(string(n), bitSize) -} - -// BigFloat attempts to convert the number to a big.Float, returns an error if the operation fails. -func (n Number) BigFloat() (*big.Float, error) { - f, ok := (&big.Float{}).SetString(string(n)) - if !ok { - return nil, fmt.Errorf("failed to convert to big.Float") - } - return f, nil -} - -// BigInt attempts to convert the number to a big.Int, returns an error if the operation fails. -func (n Number) BigInt() (*big.Int, error) { - f, ok := (&big.Int{}).SetString(string(n), 10) - if !ok { - return nil, fmt.Errorf("failed to convert to big.Float") - } - return f, nil -} diff --git a/vendor/github.com/aws/smithy-go/document/errors.go b/vendor/github.com/aws/smithy-go/document/errors.go deleted file mode 100644 index 046a7a7653..0000000000 --- a/vendor/github.com/aws/smithy-go/document/errors.go +++ /dev/null @@ -1,75 +0,0 @@ -package document - -import ( - "fmt" - "reflect" -) - -// UnmarshalTypeError is an error type representing an error -// unmarshaling a Smithy document to a Go value type. This is different -// from UnmarshalError in that it does not wrap an underlying error type. -type UnmarshalTypeError struct { - Value string - Type reflect.Type -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *UnmarshalTypeError) Error() string { - return fmt.Sprintf("unmarshal failed, cannot unmarshal %s into Go value type %s", - e.Value, e.Type.String()) -} - -// An InvalidUnmarshalError is an error type representing an invalid type -// encountered while unmarshaling a Smithy document to a Go value type. -type InvalidUnmarshalError struct { - Type reflect.Type -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *InvalidUnmarshalError) Error() string { - var msg string - if e.Type == nil { - msg = "cannot unmarshal to nil value" - } else if e.Type.Kind() != reflect.Ptr { - msg = fmt.Sprintf("cannot unmarshal to non-pointer value, got %s", e.Type.String()) - } else { - msg = fmt.Sprintf("cannot unmarshal to nil value, %s", e.Type.String()) - } - - return fmt.Sprintf("unmarshal failed, %s", msg) -} - -// An UnmarshalError wraps an error that occurred while unmarshaling a -// Smithy document into a Go type. This is different from -// UnmarshalTypeError in that it wraps the underlying error that occurred. -type UnmarshalError struct { - Err error - Value string - Type reflect.Type -} - -// Unwrap returns the underlying unmarshaling error -func (e *UnmarshalError) Unwrap() error { - return e.Err -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *UnmarshalError) Error() string { - return fmt.Sprintf("unmarshal failed, cannot unmarshal %q into %s, %v", - e.Value, e.Type.String(), e.Err) -} - -// An InvalidMarshalError is an error type representing an error -// occurring when marshaling a Go value type. -type InvalidMarshalError struct { - Message string -} - -// Error returns the string representation of the error. -// Satisfying the error interface. -func (e *InvalidMarshalError) Error() string { - return fmt.Sprintf("marshal failed, %s", e.Message) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/doc.go b/vendor/github.com/aws/smithy-go/encoding/doc.go deleted file mode 100644 index 792fdfa08b..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package encoding provides utilities for encoding values for specific -// document encodings. - -package encoding diff --git a/vendor/github.com/aws/smithy-go/encoding/encoding.go b/vendor/github.com/aws/smithy-go/encoding/encoding.go deleted file mode 100644 index 2fdfb52250..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/encoding.go +++ /dev/null @@ -1,40 +0,0 @@ -package encoding - -import ( - "fmt" - "math" - "strconv" -) - -// EncodeFloat encodes a float value as per the stdlib encoder for json and xml protocol -// This encodes a float value into dst while attempting to conform to ES6 ToString for Numbers -// -// Based on encoding/json floatEncoder from the Go Standard Library -// https://golang.org/src/encoding/json/encode.go -func EncodeFloat(dst []byte, v float64, bits int) []byte { - if math.IsInf(v, 0) || math.IsNaN(v) { - panic(fmt.Sprintf("invalid float value: %s", strconv.FormatFloat(v, 'g', -1, bits))) - } - - abs := math.Abs(v) - fmt := byte('f') - - if abs != 0 { - if bits == 64 && (abs < 1e-6 || abs >= 1e21) || bits == 32 && (float32(abs) < 1e-6 || float32(abs) >= 1e21) { - fmt = 'e' - } - } - - dst = strconv.AppendFloat(dst, v, fmt, -1, bits) - - if fmt == 'e' { - // clean up e-09 to e-9 - n := len(dst) - if n >= 4 && dst[n-4] == 'e' && dst[n-3] == '-' && dst[n-2] == '0' { - dst[n-2] = dst[n-1] - dst = dst[:n-1] - } - } - - return dst -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go deleted file mode 100644 index 543e7cf038..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/encode.go +++ /dev/null @@ -1,123 +0,0 @@ -package httpbinding - -import ( - "fmt" - "net/http" - "net/url" - "strconv" - "strings" -) - -const ( - contentLengthHeader = "Content-Length" - floatNaN = "NaN" - floatInfinity = "Infinity" - floatNegInfinity = "-Infinity" -) - -// An Encoder provides encoding of REST URI path, query, and header components -// of an HTTP request. Can also encode a stream as the payload. -// -// Does not support SetFields. -type Encoder struct { - path, rawPath, pathBuffer []byte - - query url.Values - header http.Header -} - -// NewEncoder creates a new encoder from the passed in request. It assumes that -// raw path contains no valuable information at this point, so it passes in path -// as path and raw path for subsequent trans -func NewEncoder(path, query string, headers http.Header) (*Encoder, error) { - return NewEncoderWithRawPath(path, path, query, headers) -} - -// NewHTTPBindingEncoder creates a new encoder from the passed in request. All query and -// header values will be added on top of the request's existing values. Overwriting -// duplicate values. -func NewEncoderWithRawPath(path, rawPath, query string, headers http.Header) (*Encoder, error) { - parseQuery, err := url.ParseQuery(query) - if err != nil { - return nil, fmt.Errorf("failed to parse query string: %w", err) - } - - e := &Encoder{ - path: []byte(path), - rawPath: []byte(rawPath), - query: parseQuery, - header: headers.Clone(), - } - - return e, nil -} - -// Encode returns a REST protocol encoder for encoding HTTP bindings. -// -// Due net/http requiring `Content-Length` to be specified on the http.Request#ContentLength directly. Encode -// will look for whether the header is present, and if so will remove it and set the respective value on http.Request. -// -// Returns any error occurring during encoding. -func (e *Encoder) Encode(req *http.Request) (*http.Request, error) { - req.URL.Path, req.URL.RawPath = string(e.path), string(e.rawPath) - req.URL.RawQuery = e.query.Encode() - - // net/http ignores Content-Length header and requires it to be set on http.Request - if v := e.header.Get(contentLengthHeader); len(v) > 0 { - iv, err := strconv.ParseInt(v, 10, 64) - if err != nil { - return nil, err - } - req.ContentLength = iv - e.header.Del(contentLengthHeader) - } - - req.Header = e.header - - return req, nil -} - -// AddHeader returns a HeaderValue for appending to the given header name -func (e *Encoder) AddHeader(key string) HeaderValue { - return newHeaderValue(e.header, key, true) -} - -// SetHeader returns a HeaderValue for setting the given header name -func (e *Encoder) SetHeader(key string) HeaderValue { - return newHeaderValue(e.header, key, false) -} - -// Headers returns a Header used for encoding headers with the given prefix -func (e *Encoder) Headers(prefix string) Headers { - return Headers{ - header: e.header, - prefix: strings.TrimSpace(prefix), - } -} - -// HasHeader returns if a header with the key specified exists with one or -// more value. -func (e Encoder) HasHeader(key string) bool { - return len(e.header[key]) != 0 -} - -// SetURI returns a URIValue used for setting the given path key -func (e *Encoder) SetURI(key string) URIValue { - return newURIValue(&e.path, &e.rawPath, &e.pathBuffer, key) -} - -// SetQuery returns a QueryValue used for setting the given query key -func (e *Encoder) SetQuery(key string) QueryValue { - return NewQueryValue(e.query, key, false) -} - -// AddQuery returns a QueryValue used for appending the given query key -func (e *Encoder) AddQuery(key string) QueryValue { - return NewQueryValue(e.query, key, true) -} - -// HasQuery returns if a query with the key specified exists with one or -// more values. -func (e *Encoder) HasQuery(key string) bool { - return len(e.query.Get(key)) != 0 -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go deleted file mode 100644 index f9256e175f..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/header.go +++ /dev/null @@ -1,122 +0,0 @@ -package httpbinding - -import ( - "encoding/base64" - "math" - "math/big" - "net/http" - "strconv" - "strings" -) - -// Headers is used to encode header keys using a provided prefix -type Headers struct { - header http.Header - prefix string -} - -// AddHeader returns a HeaderValue used to append values to prefix+key -func (h Headers) AddHeader(key string) HeaderValue { - return h.newHeaderValue(key, true) -} - -// SetHeader returns a HeaderValue used to set the value of prefix+key -func (h Headers) SetHeader(key string) HeaderValue { - return h.newHeaderValue(key, false) -} - -func (h Headers) newHeaderValue(key string, append bool) HeaderValue { - return newHeaderValue(h.header, h.prefix+strings.TrimSpace(key), append) -} - -// HeaderValue is used to encode values to an HTTP header -type HeaderValue struct { - header http.Header - key string - append bool -} - -func newHeaderValue(header http.Header, key string, append bool) HeaderValue { - return HeaderValue{header: header, key: strings.TrimSpace(key), append: append} -} - -func (h HeaderValue) modifyHeader(value string) { - if h.append { - h.header[h.key] = append(h.header[h.key], value) - } else { - h.header[h.key] = append(h.header[h.key][:0], value) - } -} - -// String encodes the value v as the header string value -func (h HeaderValue) String(v string) { - h.modifyHeader(v) -} - -// Byte encodes the value v as a query string value -func (h HeaderValue) Byte(v int8) { - h.Long(int64(v)) -} - -// Short encodes the value v as a query string value -func (h HeaderValue) Short(v int16) { - h.Long(int64(v)) -} - -// Integer encodes the value v as the header string value -func (h HeaderValue) Integer(v int32) { - h.Long(int64(v)) -} - -// Long encodes the value v as the header string value -func (h HeaderValue) Long(v int64) { - h.modifyHeader(strconv.FormatInt(v, 10)) -} - -// Boolean encodes the value v as a query string value -func (h HeaderValue) Boolean(v bool) { - h.modifyHeader(strconv.FormatBool(v)) -} - -// Float encodes the value v as a query string value -func (h HeaderValue) Float(v float32) { - h.float(float64(v), 32) -} - -// Double encodes the value v as a query string value -func (h HeaderValue) Double(v float64) { - h.float(v, 64) -} - -func (h HeaderValue) float(v float64, bitSize int) { - switch { - case math.IsNaN(v): - h.String(floatNaN) - case math.IsInf(v, 1): - h.String(floatInfinity) - case math.IsInf(v, -1): - h.String(floatNegInfinity) - default: - h.modifyHeader(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes the value v as a query string value -func (h HeaderValue) BigInteger(v *big.Int) { - h.modifyHeader(v.String()) -} - -// BigDecimal encodes the value v as a query string value -func (h HeaderValue) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - h.Long(i) - return - } - h.modifyHeader(v.Text('e', -1)) -} - -// Blob encodes the value v as a base64 header string value -func (h HeaderValue) Blob(v []byte) { - encodeToString := base64.StdEncoding.EncodeToString(v) - h.modifyHeader(encodeToString) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go deleted file mode 100644 index 9ae308540c..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/path_replace.go +++ /dev/null @@ -1,108 +0,0 @@ -package httpbinding - -import ( - "bytes" - "fmt" -) - -const ( - uriTokenStart = '{' - uriTokenStop = '}' - uriTokenSkip = '+' -) - -func bufCap(b []byte, n int) []byte { - if cap(b) < n { - return make([]byte, 0, n) - } - - return b[0:0] -} - -// replacePathElement replaces a single element in the path []byte. -// Escape is used to control whether the value will be escaped using Amazon path escape style. -func replacePathElement(path, fieldBuf []byte, key, val string, escape bool) ([]byte, []byte, error) { - // search for "{}". If not found, search for the greedy version "{+}". If none are found, return error - fieldBuf = bufCap(fieldBuf, len(key)+2) // { } - fieldBuf = append(fieldBuf, uriTokenStart) - fieldBuf = append(fieldBuf, key...) - fieldBuf = append(fieldBuf, uriTokenStop) - - start := bytes.Index(path, fieldBuf) - encodeSep := true - if start < 0 { - fieldBuf = bufCap(fieldBuf, len(key)+3) // { [+] } - fieldBuf = append(fieldBuf, uriTokenStart) - fieldBuf = append(fieldBuf, key...) - fieldBuf = append(fieldBuf, uriTokenSkip) - fieldBuf = append(fieldBuf, uriTokenStop) - - start = bytes.Index(path, fieldBuf) - if start < 0 { - return path, fieldBuf, fmt.Errorf("invalid path index, start=%d. %s", start, path) - } - encodeSep = false - } - end := start + len(fieldBuf) - - if escape { - val = EscapePath(val, encodeSep) - } - - fieldBuf = bufCap(fieldBuf, len(val)) - fieldBuf = append(fieldBuf, val...) - - keyLen := end - start - valLen := len(fieldBuf) - - if keyLen == valLen { - copy(path[start:], fieldBuf) - return path, fieldBuf, nil - } - - newLen := len(path) + (valLen - keyLen) - if len(path) < newLen { - path = path[:cap(path)] - } - if cap(path) < newLen { - newURI := make([]byte, newLen) - copy(newURI, path) - path = newURI - } - - // shift - copy(path[start+valLen:], path[end:]) - path = path[:newLen] - copy(path[start:], fieldBuf) - - return path, fieldBuf, nil -} - -// EscapePath escapes part of a URL path in Amazon style. -func EscapePath(path string, encodeSep bool) string { - var buf bytes.Buffer - for i := 0; i < len(path); i++ { - c := path[i] - if noEscape[c] || (c == '/' && !encodeSep) { - buf.WriteByte(c) - } else { - fmt.Fprintf(&buf, "%%%02X", c) - } - } - return buf.String() -} - -var noEscape [256]bool - -func init() { - for i := 0; i < len(noEscape); i++ { - // AWS expects every character except these to be escaped - noEscape[i] = (i >= 'A' && i <= 'Z') || - (i >= 'a' && i <= 'z') || - (i >= '0' && i <= '9') || - i == '-' || - i == '.' || - i == '_' || - i == '~' - } -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go deleted file mode 100644 index c2e7d0a20f..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/query.go +++ /dev/null @@ -1,107 +0,0 @@ -package httpbinding - -import ( - "encoding/base64" - "math" - "math/big" - "net/url" - "strconv" -) - -// QueryValue is used to encode query key values -type QueryValue struct { - query url.Values - key string - append bool -} - -// NewQueryValue creates a new QueryValue which enables encoding -// a query value into the given url.Values. -func NewQueryValue(query url.Values, key string, append bool) QueryValue { - return QueryValue{ - query: query, - key: key, - append: append, - } -} - -func (qv QueryValue) updateKey(value string) { - if qv.append { - qv.query.Add(qv.key, value) - } else { - qv.query.Set(qv.key, value) - } -} - -// Blob encodes v as a base64 query string value -func (qv QueryValue) Blob(v []byte) { - encodeToString := base64.StdEncoding.EncodeToString(v) - qv.updateKey(encodeToString) -} - -// Boolean encodes v as a query string value -func (qv QueryValue) Boolean(v bool) { - qv.updateKey(strconv.FormatBool(v)) -} - -// String encodes v as a query string value -func (qv QueryValue) String(v string) { - qv.updateKey(v) -} - -// Byte encodes v as a query string value -func (qv QueryValue) Byte(v int8) { - qv.Long(int64(v)) -} - -// Short encodes v as a query string value -func (qv QueryValue) Short(v int16) { - qv.Long(int64(v)) -} - -// Integer encodes v as a query string value -func (qv QueryValue) Integer(v int32) { - qv.Long(int64(v)) -} - -// Long encodes v as a query string value -func (qv QueryValue) Long(v int64) { - qv.updateKey(strconv.FormatInt(v, 10)) -} - -// Float encodes v as a query string value -func (qv QueryValue) Float(v float32) { - qv.float(float64(v), 32) -} - -// Double encodes v as a query string value -func (qv QueryValue) Double(v float64) { - qv.float(v, 64) -} - -func (qv QueryValue) float(v float64, bitSize int) { - switch { - case math.IsNaN(v): - qv.String(floatNaN) - case math.IsInf(v, 1): - qv.String(floatInfinity) - case math.IsInf(v, -1): - qv.String(floatNegInfinity) - default: - qv.updateKey(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes v as a query string value -func (qv QueryValue) BigInteger(v *big.Int) { - qv.updateKey(v.String()) -} - -// BigDecimal encodes v as a query string value -func (qv QueryValue) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - qv.Long(i) - return - } - qv.updateKey(v.Text('e', -1)) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go b/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go deleted file mode 100644 index f04e11984a..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/httpbinding/uri.go +++ /dev/null @@ -1,111 +0,0 @@ -package httpbinding - -import ( - "math" - "math/big" - "strconv" - "strings" -) - -// URIValue is used to encode named URI parameters -type URIValue struct { - path, rawPath, buffer *[]byte - - key string -} - -func newURIValue(path *[]byte, rawPath *[]byte, buffer *[]byte, key string) URIValue { - return URIValue{path: path, rawPath: rawPath, buffer: buffer, key: key} -} - -func (u URIValue) modifyURI(value string) (err error) { - *u.path, *u.buffer, err = replacePathElement(*u.path, *u.buffer, u.key, value, false) - if err != nil { - return err - } - *u.rawPath, *u.buffer, err = replacePathElement(*u.rawPath, *u.buffer, u.key, value, true) - return err -} - -// Boolean encodes v as a URI string value -func (u URIValue) Boolean(v bool) error { - return u.modifyURI(strconv.FormatBool(v)) -} - -// String encodes v as a URI string value -func (u URIValue) String(v string) error { - return u.modifyURI(v) -} - -// Byte encodes v as a URI string value -func (u URIValue) Byte(v int8) error { - return u.Long(int64(v)) -} - -// Short encodes v as a URI string value -func (u URIValue) Short(v int16) error { - return u.Long(int64(v)) -} - -// Integer encodes v as a URI string value -func (u URIValue) Integer(v int32) error { - return u.Long(int64(v)) -} - -// Long encodes v as a URI string value -func (u URIValue) Long(v int64) error { - return u.modifyURI(strconv.FormatInt(v, 10)) -} - -// Float encodes v as a query string value -func (u URIValue) Float(v float32) error { - return u.float(float64(v), 32) -} - -// Double encodes v as a query string value -func (u URIValue) Double(v float64) error { - return u.float(v, 64) -} - -func (u URIValue) float(v float64, bitSize int) error { - switch { - case math.IsNaN(v): - return u.String(floatNaN) - case math.IsInf(v, 1): - return u.String(floatInfinity) - case math.IsInf(v, -1): - return u.String(floatNegInfinity) - default: - return u.modifyURI(strconv.FormatFloat(v, 'f', -1, bitSize)) - } -} - -// BigInteger encodes v as a query string value -func (u URIValue) BigInteger(v *big.Int) error { - return u.modifyURI(v.String()) -} - -// BigDecimal encodes v as a query string value -func (u URIValue) BigDecimal(v *big.Float) error { - if i, accuracy := v.Int64(); accuracy == big.Exact { - return u.Long(i) - } - return u.modifyURI(v.Text('e', -1)) -} - -// SplitURI parses a Smithy HTTP binding trait URI -func SplitURI(uri string) (path, query string) { - queryStart := strings.IndexRune(uri, '?') - if queryStart == -1 { - path = uri - return path, query - } - - path = uri[:queryStart] - if queryStart+1 >= len(uri) { - return path, query - } - query = uri[queryStart+1:] - - return path, query -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/array.go b/vendor/github.com/aws/smithy-go/encoding/json/array.go deleted file mode 100644 index 7a232f660f..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/array.go +++ /dev/null @@ -1,35 +0,0 @@ -package json - -import ( - "bytes" -) - -// Array represents the encoding of a JSON Array -type Array struct { - w *bytes.Buffer - writeComma bool - scratch *[]byte -} - -func newArray(w *bytes.Buffer, scratch *[]byte) *Array { - w.WriteRune(leftBracket) - return &Array{w: w, scratch: scratch} -} - -// Value adds a new element to the JSON Array. -// Returns a Value type that is used to encode -// the array element. -func (a *Array) Value() Value { - if a.writeComma { - a.w.WriteRune(comma) - } else { - a.writeComma = true - } - - return newValue(a.w, a.scratch) -} - -// Close encodes the end of the JSON Array -func (a *Array) Close() { - a.w.WriteRune(rightBracket) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/constants.go b/vendor/github.com/aws/smithy-go/encoding/json/constants.go deleted file mode 100644 index 91044092ae..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/constants.go +++ /dev/null @@ -1,15 +0,0 @@ -package json - -const ( - leftBrace = '{' - rightBrace = '}' - - leftBracket = '[' - rightBracket = ']' - - comma = ',' - quote = '"' - colon = ':' - - null = "null" -) diff --git a/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go b/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go deleted file mode 100644 index 7050c85b3c..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/decoder_util.go +++ /dev/null @@ -1,139 +0,0 @@ -package json - -import ( - "bytes" - "encoding/json" - "fmt" - "io" -) - -// DiscardUnknownField discards unknown fields from a decoder body. -// This function is useful while deserializing a JSON body with additional -// unknown information that should be discarded. -func DiscardUnknownField(decoder *json.Decoder) error { - // This deliberately does not share logic with CollectUnknownField, even - // though it could, because if we were to delegate to that then we'd incur - // extra allocations and general memory usage. - v, err := decoder.Token() - if err == io.EOF { - return nil - } - if err != nil { - return err - } - - if _, ok := v.(json.Delim); ok { - for decoder.More() { - err = DiscardUnknownField(decoder) - } - endToken, err := decoder.Token() - if err != nil { - return err - } - if _, ok := endToken.(json.Delim); !ok { - return fmt.Errorf("invalid JSON : expected json delimiter, found %T %v", - endToken, endToken) - } - } - - return nil -} - -// CollectUnknownField grabs the contents of unknown fields from the decoder body -// and returns them as a byte slice. This is useful for skipping unknown fields without -// completely discarding them. -func CollectUnknownField(decoder *json.Decoder) ([]byte, error) { - result, err := collectUnknownField(decoder) - if err != nil { - return nil, err - } - - buff := bytes.NewBuffer(nil) - encoder := json.NewEncoder(buff) - - if err := encoder.Encode(result); err != nil { - return nil, err - } - - return buff.Bytes(), nil -} - -func collectUnknownField(decoder *json.Decoder) (interface{}, error) { - // Grab the initial value. This could either be a concrete value like a string or a a - // delimiter. - token, err := decoder.Token() - if err == io.EOF { - return nil, nil - } - if err != nil { - return nil, err - } - - // If it's an array or object, we'll need to recurse. - delim, ok := token.(json.Delim) - if ok { - var result interface{} - if delim == '{' { - result, err = collectUnknownObject(decoder) - if err != nil { - return nil, err - } - } else { - result, err = collectUnknownArray(decoder) - if err != nil { - return nil, err - } - } - - // Discard the closing token. decoder.Token handles checking for matching delimiters - if _, err := decoder.Token(); err != nil { - return nil, err - } - return result, nil - } - - return token, nil -} - -func collectUnknownArray(decoder *json.Decoder) ([]interface{}, error) { - // We need to create an empty array here instead of a nil array, since by getting - // into this function at all we necessarily have seen a non-nil list. - array := []interface{}{} - - for decoder.More() { - value, err := collectUnknownField(decoder) - if err != nil { - return nil, err - } - array = append(array, value) - } - - return array, nil -} - -func collectUnknownObject(decoder *json.Decoder) (map[string]interface{}, error) { - object := make(map[string]interface{}) - - for decoder.More() { - key, err := collectUnknownField(decoder) - if err != nil { - return nil, err - } - - // Keys have to be strings, which is particularly important as the encoder - // won't except a map with interface{} keys - stringKey, ok := key.(string) - if !ok { - return nil, fmt.Errorf("expected string key, found %T", key) - } - - value, err := collectUnknownField(decoder) - if err != nil { - return nil, err - } - - object[stringKey] = value - } - - return object, nil -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/encoder.go b/vendor/github.com/aws/smithy-go/encoding/json/encoder.go deleted file mode 100644 index 8772953f1e..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/encoder.go +++ /dev/null @@ -1,30 +0,0 @@ -package json - -import ( - "bytes" -) - -// Encoder is JSON encoder that supports construction of JSON values -// using methods. -type Encoder struct { - w *bytes.Buffer - Value -} - -// NewEncoder returns a new JSON encoder -func NewEncoder() *Encoder { - writer := bytes.NewBuffer(nil) - scratch := make([]byte, 64) - - return &Encoder{w: writer, Value: newValue(writer, &scratch)} -} - -// String returns the String output of the JSON encoder -func (e Encoder) String() string { - return e.w.String() -} - -// Bytes returns the []byte slice of the JSON encoder -func (e Encoder) Bytes() []byte { - return e.w.Bytes() -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/escape.go b/vendor/github.com/aws/smithy-go/encoding/json/escape.go deleted file mode 100644 index d984d0cdca..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/escape.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2016 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. - -// Copied and modified from Go 1.8 stdlib's encoding/json/#safeSet - -package json - -import ( - "bytes" - "unicode/utf8" -) - -// safeSet holds the value true if the ASCII character with the given array -// position can be represented inside a JSON string without any further -// escaping. -// -// All values are true except for the ASCII control characters (0-31), the -// double quote ("), and the backslash character ("\"). -var safeSet = [utf8.RuneSelf]bool{ - ' ': true, - '!': true, - '"': false, - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - '(': true, - ')': true, - '*': true, - '+': true, - ',': true, - '-': true, - '.': true, - '/': true, - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - ':': true, - ';': true, - '<': true, - '=': true, - '>': true, - '?': true, - '@': true, - 'A': true, - 'B': true, - 'C': true, - 'D': true, - 'E': true, - 'F': true, - 'G': true, - 'H': true, - 'I': true, - 'J': true, - 'K': true, - 'L': true, - 'M': true, - 'N': true, - 'O': true, - 'P': true, - 'Q': true, - 'R': true, - 'S': true, - 'T': true, - 'U': true, - 'V': true, - 'W': true, - 'X': true, - 'Y': true, - 'Z': true, - '[': true, - '\\': false, - ']': true, - '^': true, - '_': true, - '`': true, - 'a': true, - 'b': true, - 'c': true, - 'd': true, - 'e': true, - 'f': true, - 'g': true, - 'h': true, - 'i': true, - 'j': true, - 'k': true, - 'l': true, - 'm': true, - 'n': true, - 'o': true, - 'p': true, - 'q': true, - 'r': true, - 's': true, - 't': true, - 'u': true, - 'v': true, - 'w': true, - 'x': true, - 'y': true, - 'z': true, - '{': true, - '|': true, - '}': true, - '~': true, - '\u007f': true, -} - -// copied from Go 1.8 stdlib's encoding/json/#hex -var hex = "0123456789abcdef" - -// escapeStringBytes escapes and writes the passed in string bytes to the dst -// buffer -// -// Copied and modifed from Go 1.8 stdlib's encodeing/json/#encodeState.stringBytes -func escapeStringBytes(e *bytes.Buffer, s []byte) { - e.WriteByte('"') - start := 0 - for i := 0; i < len(s); { - if b := s[i]; b < utf8.RuneSelf { - if safeSet[b] { - i++ - continue - } - if start < i { - e.Write(s[start:i]) - } - switch b { - case '\\', '"': - e.WriteByte('\\') - e.WriteByte(b) - case '\n': - e.WriteByte('\\') - e.WriteByte('n') - case '\r': - e.WriteByte('\\') - e.WriteByte('r') - case '\t': - e.WriteByte('\\') - e.WriteByte('t') - default: - // This encodes bytes < 0x20 except for \t, \n and \r. - // If escapeHTML is set, it also escapes <, >, and & - // because they can lead to security holes when - // user-controlled strings are rendered into JSON - // and served to some browsers. - e.WriteString(`\u00`) - e.WriteByte(hex[b>>4]) - e.WriteByte(hex[b&0xF]) - } - i++ - start = i - continue - } - c, size := utf8.DecodeRune(s[i:]) - if c == utf8.RuneError && size == 1 { - if start < i { - e.Write(s[start:i]) - } - e.WriteString(`\ufffd`) - i += size - start = i - continue - } - // U+2028 is LINE SEPARATOR. - // U+2029 is PARAGRAPH SEPARATOR. - // They are both technically valid characters in JSON strings, - // but don't work in JSONP, which has to be evaluated as JavaScript, - // and can lead to security holes there. It is valid JSON to - // escape them, so we do so unconditionally. - // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion. - if c == '\u2028' || c == '\u2029' { - if start < i { - e.Write(s[start:i]) - } - e.WriteString(`\u202`) - e.WriteByte(hex[c&0xF]) - i += size - start = i - continue - } - i += size - } - if start < len(s) { - e.Write(s[start:]) - } - e.WriteByte('"') -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/object.go b/vendor/github.com/aws/smithy-go/encoding/json/object.go deleted file mode 100644 index 722346d035..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/object.go +++ /dev/null @@ -1,40 +0,0 @@ -package json - -import ( - "bytes" -) - -// Object represents the encoding of a JSON Object type -type Object struct { - w *bytes.Buffer - writeComma bool - scratch *[]byte -} - -func newObject(w *bytes.Buffer, scratch *[]byte) *Object { - w.WriteRune(leftBrace) - return &Object{w: w, scratch: scratch} -} - -func (o *Object) writeKey(key string) { - escapeStringBytes(o.w, []byte(key)) - o.w.WriteRune(colon) -} - -// Key adds the given named key to the JSON object. -// Returns a Value encoder that should be used to encode -// a JSON value type. -func (o *Object) Key(name string) Value { - if o.writeComma { - o.w.WriteRune(comma) - } else { - o.writeComma = true - } - o.writeKey(name) - return newValue(o.w, o.scratch) -} - -// Close encodes the end of the JSON Object -func (o *Object) Close() { - o.w.WriteRune(rightBrace) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/json/value.go b/vendor/github.com/aws/smithy-go/encoding/json/value.go deleted file mode 100644 index b41ff1e15c..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/json/value.go +++ /dev/null @@ -1,149 +0,0 @@ -package json - -import ( - "bytes" - "encoding/base64" - "math/big" - "strconv" - - "github.com/aws/smithy-go/encoding" -) - -// Value represents a JSON Value type -// JSON Value types: Object, Array, String, Number, Boolean, and Null -type Value struct { - w *bytes.Buffer - scratch *[]byte -} - -// newValue returns a new Value encoder -func newValue(w *bytes.Buffer, scratch *[]byte) Value { - return Value{w: w, scratch: scratch} -} - -// String encodes v as a JSON string -func (jv Value) String(v string) { - escapeStringBytes(jv.w, []byte(v)) -} - -// Byte encodes v as a JSON number -func (jv Value) Byte(v int8) { - jv.Long(int64(v)) -} - -// Short encodes v as a JSON number -func (jv Value) Short(v int16) { - jv.Long(int64(v)) -} - -// Integer encodes v as a JSON number -func (jv Value) Integer(v int32) { - jv.Long(int64(v)) -} - -// Long encodes v as a JSON number -func (jv Value) Long(v int64) { - *jv.scratch = strconv.AppendInt((*jv.scratch)[:0], v, 10) - jv.w.Write(*jv.scratch) -} - -// ULong encodes v as a JSON number -func (jv Value) ULong(v uint64) { - *jv.scratch = strconv.AppendUint((*jv.scratch)[:0], v, 10) - jv.w.Write(*jv.scratch) -} - -// Float encodes v as a JSON number -func (jv Value) Float(v float32) { - jv.float(float64(v), 32) -} - -// Double encodes v as a JSON number -func (jv Value) Double(v float64) { - jv.float(v, 64) -} - -func (jv Value) float(v float64, bits int) { - *jv.scratch = encoding.EncodeFloat((*jv.scratch)[:0], v, bits) - jv.w.Write(*jv.scratch) -} - -// Boolean encodes v as a JSON boolean -func (jv Value) Boolean(v bool) { - *jv.scratch = strconv.AppendBool((*jv.scratch)[:0], v) - jv.w.Write(*jv.scratch) -} - -// Base64EncodeBytes writes v as a base64 value in JSON string -func (jv Value) Base64EncodeBytes(v []byte) { - encodeByteSlice(jv.w, (*jv.scratch)[:0], v) -} - -// Write writes v directly to the JSON document -func (jv Value) Write(v []byte) { - jv.w.Write(v) -} - -// Array returns a new Array encoder -func (jv Value) Array() *Array { - return newArray(jv.w, jv.scratch) -} - -// Object returns a new Object encoder -func (jv Value) Object() *Object { - return newObject(jv.w, jv.scratch) -} - -// Null encodes a null JSON value -func (jv Value) Null() { - jv.w.WriteString(null) -} - -// BigInteger encodes v as JSON value -func (jv Value) BigInteger(v *big.Int) { - jv.w.Write([]byte(v.Text(10))) -} - -// BigDecimal encodes v as JSON value -func (jv Value) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - jv.Long(i) - return - } - // TODO: Should this try to match ES6 ToString similar to stdlib JSON? - jv.w.Write([]byte(v.Text('e', -1))) -} - -// Based on encoding/json encodeByteSlice from the Go Standard Library -// https://golang.org/src/encoding/json/encode.go -func encodeByteSlice(w *bytes.Buffer, scratch []byte, v []byte) { - if v == nil { - w.WriteString(null) - return - } - - w.WriteRune(quote) - - encodedLen := base64.StdEncoding.EncodedLen(len(v)) - if encodedLen <= len(scratch) { - // If the encoded bytes fit in e.scratch, avoid an extra - // allocation and use the cheaper Encoding.Encode. - dst := scratch[:encodedLen] - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else if encodedLen <= 1024 { - // The encoded bytes are short enough to allocate for, and - // Encoding.Encode is still cheaper. - dst := make([]byte, encodedLen) - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else { - // The encoded bytes are too long to cheaply allocate, and - // Encoding.Encode is no longer noticeably cheaper. - enc := base64.NewEncoder(base64.StdEncoding, w) - enc.Write(v) - enc.Close() - } - - w.WriteRune(quote) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/array.go b/vendor/github.com/aws/smithy-go/encoding/xml/array.go deleted file mode 100644 index 508f3c997e..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/array.go +++ /dev/null @@ -1,49 +0,0 @@ -package xml - -// arrayMemberWrapper is the default member wrapper tag name for XML Array type -var arrayMemberWrapper = StartElement{ - Name: Name{Local: "member"}, -} - -// Array represents the encoding of a XML array type -type Array struct { - w writer - scratch *[]byte - - // member start element is the array member wrapper start element - memberStartElement StartElement - - // isFlattened indicates if the array is a flattened array. - isFlattened bool -} - -// newArray returns an array encoder. -// It also takes in the member start element, array start element. -// It takes in a isFlattened bool, indicating that an array is flattened array. -// -// A wrapped array ["value1", "value2"] is represented as -// `value1value2`. - -// A flattened array `someList: ["value1", "value2"]` is represented as -// `value1value2`. -func newArray(w writer, scratch *[]byte, memberStartElement StartElement, arrayStartElement StartElement, isFlattened bool) *Array { - var memberWrapper = memberStartElement - if isFlattened { - memberWrapper = arrayStartElement - } - - return &Array{ - w: w, - scratch: scratch, - memberStartElement: memberWrapper, - isFlattened: isFlattened, - } -} - -// Member adds a new member to the XML array. -// It returns a Value encoder. -func (a *Array) Member() Value { - v := newValue(a.w, a.scratch, a.memberStartElement) - v.isFlattened = a.isFlattened - return v -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/constants.go b/vendor/github.com/aws/smithy-go/encoding/xml/constants.go deleted file mode 100644 index ccee90a636..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/constants.go +++ /dev/null @@ -1,10 +0,0 @@ -package xml - -const ( - leftAngleBracket = '<' - rightAngleBracket = '>' - forwardSlash = '/' - colon = ':' - equals = '=' - quote = '"' -) diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go b/vendor/github.com/aws/smithy-go/encoding/xml/doc.go deleted file mode 100644 index f9200093e8..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/doc.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Package xml holds the XMl encoder utility. This utility is written in accordance to our design to delegate to -shape serializer function in which a xml.Value will be passed around. - -Resources followed: https://smithy.io/2.0/spec/protocol-traits.html#xml-bindings - -Member Element - -Member element should be used to encode xml shapes into xml elements except for flattened xml shapes. Member element -write their own element start tag. These elements should always be closed. - -Flattened Element - -Flattened element should be used to encode shapes marked with flattened trait into xml elements. Flattened element -do not write a start tag, and thus should not be closed. - -Simple types encoding - -All simple type methods on value such as String(), Long() etc; auto close the associated member element. - -Array - -Array returns the collection encoder. It has two modes, wrapped and flattened encoding. - -Wrapped arrays have two methods Array() and ArrayWithCustomName() which facilitate array member wrapping. -By default, a wrapped array members are wrapped with `member` named start element. - - appletree - -Flattened arrays rely on Value being marked as flattened. -If a shape is marked as flattened, Array() will use the shape element name as wrapper for array elements. - - appletree - -Map - -Map is the map encoder. It has two modes, wrapped and flattened encoding. - -Wrapped map has Array() method, which facilitate map member wrapping. -By default, a wrapped map members are wrapped with `entry` named start element. - - appletreesnowice - -Flattened map rely on Value being marked as flattened. -If a shape is marked as flattened, Map() will use the shape element name as wrapper for map entry elements. - - appletreesnowice -*/ -package xml diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/element.go b/vendor/github.com/aws/smithy-go/encoding/xml/element.go deleted file mode 100644 index ae84e7999e..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/element.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2009 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. - -// Copied and modified from Go 1.14 stdlib's encoding/xml - -package xml - -// A Name represents an XML name (Local) annotated -// with a name space identifier (Space). -// In tokens returned by Decoder.Token, the Space identifier -// is given as a canonical URL, not the short prefix used -// in the document being parsed. -type Name struct { - Space, Local string -} - -// An Attr represents an attribute in an XML element (Name=Value). -type Attr struct { - Name Name - Value string -} - -/* -NewAttribute returns a pointer to an attribute. -It takes in a local name aka attribute name, and value -representing the attribute value. -*/ -func NewAttribute(local, value string) Attr { - return Attr{ - Name: Name{ - Local: local, - }, - Value: value, - } -} - -/* -NewNamespaceAttribute returns a pointer to an attribute. -It takes in a local name aka attribute name, and value -representing the attribute value. - -NewNamespaceAttribute appends `xmlns:` in front of namespace -prefix. - -For creating a name space attribute representing -`xmlns:prefix="http://example.com`, the breakdown would be: -local = "prefix" -value = "http://example.com" -*/ -func NewNamespaceAttribute(local, value string) Attr { - attr := NewAttribute(local, value) - - // default name space identifier - attr.Name.Space = "xmlns" - return attr -} - -// A StartElement represents an XML start element. -type StartElement struct { - Name Name - Attr []Attr -} - -// Copy creates a new copy of StartElement. -func (e StartElement) Copy() StartElement { - attrs := make([]Attr, len(e.Attr)) - copy(attrs, e.Attr) - e.Attr = attrs - return e -} - -// End returns the corresponding XML end element. -func (e StartElement) End() EndElement { - return EndElement{e.Name} -} - -// returns true if start element local name is empty -func (e StartElement) isZero() bool { - return len(e.Name.Local) == 0 -} - -// An EndElement represents an XML end element. -type EndElement struct { - Name Name -} - -// returns true if end element local name is empty -func (e EndElement) isZero() bool { - return len(e.Name.Local) == 0 -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go deleted file mode 100644 index 16fb3dddb0..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/encoder.go +++ /dev/null @@ -1,51 +0,0 @@ -package xml - -// writer interface used by the xml encoder to write an encoded xml -// document in a writer. -type writer interface { - - // Write takes in a byte slice and returns number of bytes written and error - Write(p []byte) (n int, err error) - - // WriteRune takes in a rune and returns number of bytes written and error - WriteRune(r rune) (n int, err error) - - // WriteString takes in a string and returns number of bytes written and error - WriteString(s string) (n int, err error) - - // String method returns a string - String() string - - // Bytes return a byte slice. - Bytes() []byte -} - -// Encoder is an XML encoder that supports construction of XML values -// using methods. The encoder takes in a writer and maintains a scratch buffer. -type Encoder struct { - w writer - scratch *[]byte -} - -// NewEncoder returns an XML encoder -func NewEncoder(w writer) *Encoder { - scratch := make([]byte, 64) - - return &Encoder{w: w, scratch: &scratch} -} - -// String returns the string output of the XML encoder -func (e Encoder) String() string { - return e.w.String() -} - -// Bytes returns the []byte slice of the XML encoder -func (e Encoder) Bytes() []byte { - return e.w.Bytes() -} - -// RootElement builds a root element encoding -// It writes it's start element tag. The value should be closed. -func (e Encoder) RootElement(element StartElement) Value { - return newValue(e.w, e.scratch, element) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go b/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go deleted file mode 100644 index f3db6ccca8..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/error_utils.go +++ /dev/null @@ -1,51 +0,0 @@ -package xml - -import ( - "encoding/xml" - "fmt" - "io" -) - -// ErrorComponents represents the error response fields -// that will be deserialized from an xml error response body -type ErrorComponents struct { - Code string - Message string -} - -// GetErrorResponseComponents returns the error fields from an xml error response body -func GetErrorResponseComponents(r io.Reader, noErrorWrapping bool) (ErrorComponents, error) { - if noErrorWrapping { - var errResponse noWrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents{ - Code: errResponse.Code, - Message: errResponse.Message, - }, nil - } - - var errResponse wrappedErrorResponse - if err := xml.NewDecoder(r).Decode(&errResponse); err != nil && err != io.EOF { - return ErrorComponents{}, fmt.Errorf("error while deserializing xml error response: %w", err) - } - return ErrorComponents{ - Code: errResponse.Code, - Message: errResponse.Message, - }, nil -} - -// noWrappedErrorResponse represents the error response body with -// no internal ... -type wrappedErrorResponse struct { - Code string `xml:"Error>Code"` - Message string `xml:"Error>Message"` -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/escape.go b/vendor/github.com/aws/smithy-go/encoding/xml/escape.go deleted file mode 100644 index 1c5479af67..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/escape.go +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2009 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. - -// Copied and modified from Go 1.14 stdlib's encoding/xml - -package xml - -import ( - "unicode/utf8" -) - -// Copied from Go 1.14 stdlib's encoding/xml -var ( - escQuot = []byte(""") // shorter than """ - escApos = []byte("'") // shorter than "'" - escAmp = []byte("&") - escLT = []byte("<") - escGT = []byte(">") - escTab = []byte(" ") - escNL = []byte(" ") - escCR = []byte(" ") - escFFFD = []byte("\uFFFD") // Unicode replacement character - - // Additional Escapes - escNextLine = []byte("…") - escLS = []byte("
") -) - -// Decide whether the given rune is in the XML Character Range, per -// the Char production of https://www.xml.com/axml/testaxml.htm, -// Section 2.2 Characters. -func isInCharacterRange(r rune) (inrange bool) { - return r == 0x09 || - r == 0x0A || - r == 0x0D || - r >= 0x20 && r <= 0xD7FF || - r >= 0xE000 && r <= 0xFFFD || - r >= 0x10000 && r <= 0x10FFFF -} - -// TODO: When do we need to escape the string? -// Based on encoding/xml escapeString from the Go Standard Library. -// https://golang.org/src/encoding/xml/xml.go -func escapeString(e writer, s string) { - var esc []byte - last := 0 - for i := 0; i < len(s); { - r, width := utf8.DecodeRuneInString(s[i:]) - i += width - switch r { - case '"': - esc = escQuot - case '\'': - esc = escApos - case '&': - esc = escAmp - case '<': - esc = escLT - case '>': - esc = escGT - case '\t': - esc = escTab - case '\n': - esc = escNL - case '\r': - esc = escCR - case '\u0085': - // Not escaped by stdlib - esc = escNextLine - case '\u2028': - // Not escaped by stdlib - esc = escLS - default: - if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) { - esc = escFFFD - break - } - continue - } - e.WriteString(s[last : i-width]) - e.Write(esc) - last = i - } - e.WriteString(s[last:]) -} - -// escapeText writes to w the properly escaped XML equivalent -// of the plain text data s. If escapeNewline is true, newline -// characters will be escaped. -// -// Based on encoding/xml escapeText from the Go Standard Library. -// https://golang.org/src/encoding/xml/xml.go -func escapeText(e writer, s []byte) { - var esc []byte - last := 0 - for i := 0; i < len(s); { - r, width := utf8.DecodeRune(s[i:]) - i += width - switch r { - case '"': - esc = escQuot - case '\'': - esc = escApos - case '&': - esc = escAmp - case '<': - esc = escLT - case '>': - esc = escGT - case '\t': - esc = escTab - case '\n': - // This always escapes newline, which is different than stdlib's optional - // escape of new line. - esc = escNL - case '\r': - esc = escCR - case '\u0085': - // Not escaped by stdlib - esc = escNextLine - case '\u2028': - // Not escaped by stdlib - esc = escLS - default: - if !isInCharacterRange(r) || (r == 0xFFFD && width == 1) { - esc = escFFFD - break - } - continue - } - e.Write(s[last : i-width]) - e.Write(esc) - last = i - } - e.Write(s[last:]) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/map.go b/vendor/github.com/aws/smithy-go/encoding/xml/map.go deleted file mode 100644 index e42858965c..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/map.go +++ /dev/null @@ -1,53 +0,0 @@ -package xml - -// mapEntryWrapper is the default member wrapper start element for XML Map entry -var mapEntryWrapper = StartElement{ - Name: Name{Local: "entry"}, -} - -// Map represents the encoding of a XML map type -type Map struct { - w writer - scratch *[]byte - - // member start element is the map entry wrapper start element - memberStartElement StartElement - - // isFlattened returns true if the map is a flattened map - isFlattened bool -} - -// newMap returns a map encoder which sets the default map -// entry wrapper to `entry`. -// -// A map `someMap : {{key:"abc", value:"123"}}` is represented as -// `abc123`. -func newMap(w writer, scratch *[]byte) *Map { - return &Map{ - w: w, - scratch: scratch, - memberStartElement: mapEntryWrapper, - } -} - -// newFlattenedMap returns a map encoder which sets the map -// entry wrapper to the passed in memberWrapper`. -// -// A flattened map `someMap : {{key:"abc", value:"123"}}` is represented as -// `abc123`. -func newFlattenedMap(w writer, scratch *[]byte, memberWrapper StartElement) *Map { - return &Map{ - w: w, - scratch: scratch, - memberStartElement: memberWrapper, - isFlattened: true, - } -} - -// Entry returns a Value encoder with map's element. -// It writes the member wrapper start tag for each entry. -func (m *Map) Entry() Value { - v := newValue(m.w, m.scratch, m.memberStartElement) - v.isFlattened = m.isFlattened - return v -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/value.go b/vendor/github.com/aws/smithy-go/encoding/xml/value.go deleted file mode 100644 index 09434b2c0b..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/value.go +++ /dev/null @@ -1,302 +0,0 @@ -package xml - -import ( - "encoding/base64" - "fmt" - "math/big" - "strconv" - - "github.com/aws/smithy-go/encoding" -) - -// Value represents an XML Value type -// XML Value types: Object, Array, Map, String, Number, Boolean. -type Value struct { - w writer - scratch *[]byte - - // xml start element is the associated start element for the Value - startElement StartElement - - // indicates if the Value represents a flattened shape - isFlattened bool -} - -// newFlattenedValue returns a Value encoder. newFlattenedValue does NOT write the start element tag -func newFlattenedValue(w writer, scratch *[]byte, startElement StartElement) Value { - return Value{ - w: w, - scratch: scratch, - startElement: startElement, - } -} - -// newValue writes the start element xml tag and returns a Value -func newValue(w writer, scratch *[]byte, startElement StartElement) Value { - writeStartElement(w, startElement) - return Value{w: w, scratch: scratch, startElement: startElement} -} - -// writeStartElement takes in a start element and writes it. -// It handles namespace, attributes in start element. -func writeStartElement(w writer, el StartElement) error { - if el.isZero() { - return fmt.Errorf("xml start element cannot be nil") - } - - w.WriteRune(leftAngleBracket) - - if len(el.Name.Space) != 0 { - escapeString(w, el.Name.Space) - w.WriteRune(colon) - } - escapeString(w, el.Name.Local) - for _, attr := range el.Attr { - w.WriteRune(' ') - writeAttribute(w, &attr) - } - - w.WriteRune(rightAngleBracket) - return nil -} - -// writeAttribute writes an attribute from a provided Attribute -// For a namespace attribute, the attr.Name.Space must be defined as "xmlns". -// https://www.w3.org/TR/REC-xml-names/#NT-DefaultAttName -func writeAttribute(w writer, attr *Attr) { - // if local, space both are not empty - if len(attr.Name.Space) != 0 && len(attr.Name.Local) != 0 { - escapeString(w, attr.Name.Space) - w.WriteRune(colon) - } - - // if prefix is empty, the default `xmlns` space should be used as prefix. - if len(attr.Name.Local) == 0 { - attr.Name.Local = attr.Name.Space - } - - escapeString(w, attr.Name.Local) - w.WriteRune(equals) - w.WriteRune(quote) - escapeString(w, attr.Value) - w.WriteRune(quote) -} - -// writeEndElement takes in a end element and writes it. -func writeEndElement(w writer, el EndElement) error { - if el.isZero() { - return fmt.Errorf("xml end element cannot be nil") - } - - w.WriteRune(leftAngleBracket) - w.WriteRune(forwardSlash) - - if len(el.Name.Space) != 0 { - escapeString(w, el.Name.Space) - w.WriteRune(colon) - } - escapeString(w, el.Name.Local) - w.WriteRune(rightAngleBracket) - - return nil -} - -// String encodes v as a XML string. -// It will auto close the parent xml element tag. -func (xv Value) String(v string) { - escapeString(xv.w, v) - xv.Close() -} - -// Byte encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Byte(v int8) { - xv.Long(int64(v)) -} - -// Short encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Short(v int16) { - xv.Long(int64(v)) -} - -// Integer encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Integer(v int32) { - xv.Long(int64(v)) -} - -// Long encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Long(v int64) { - *xv.scratch = strconv.AppendInt((*xv.scratch)[:0], v, 10) - xv.w.Write(*xv.scratch) - - xv.Close() -} - -// Float encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Float(v float32) { - xv.float(float64(v), 32) - xv.Close() -} - -// Double encodes v as a XML number. -// It will auto close the parent xml element tag. -func (xv Value) Double(v float64) { - xv.float(v, 64) - xv.Close() -} - -func (xv Value) float(v float64, bits int) { - *xv.scratch = encoding.EncodeFloat((*xv.scratch)[:0], v, bits) - xv.w.Write(*xv.scratch) -} - -// Boolean encodes v as a XML boolean. -// It will auto close the parent xml element tag. -func (xv Value) Boolean(v bool) { - *xv.scratch = strconv.AppendBool((*xv.scratch)[:0], v) - xv.w.Write(*xv.scratch) - - xv.Close() -} - -// Base64EncodeBytes writes v as a base64 value in XML string. -// It will auto close the parent xml element tag. -func (xv Value) Base64EncodeBytes(v []byte) { - encodeByteSlice(xv.w, (*xv.scratch)[:0], v) - xv.Close() -} - -// BigInteger encodes v big.Int as XML value. -// It will auto close the parent xml element tag. -func (xv Value) BigInteger(v *big.Int) { - xv.w.Write([]byte(v.Text(10))) - xv.Close() -} - -// BigDecimal encodes v big.Float as XML value. -// It will auto close the parent xml element tag. -func (xv Value) BigDecimal(v *big.Float) { - if i, accuracy := v.Int64(); accuracy == big.Exact { - xv.Long(i) - return - } - - xv.w.Write([]byte(v.Text('e', -1))) - xv.Close() -} - -// Write writes v directly to the xml document -// if escapeXMLText is set to true, write will escape text. -// It will auto close the parent xml element tag. -func (xv Value) Write(v []byte, escapeXMLText bool) { - // escape and write xml text - if escapeXMLText { - escapeText(xv.w, v) - } else { - // write xml directly - xv.w.Write(v) - } - - xv.Close() -} - -// MemberElement does member element encoding. It returns a Value. -// Member Element method should be used for all shapes except flattened shapes. -// -// A call to MemberElement will write nested element tags directly using the -// provided start element. The value returned by MemberElement should be closed. -func (xv Value) MemberElement(element StartElement) Value { - return newValue(xv.w, xv.scratch, element) -} - -// FlattenedElement returns flattened element encoding. It returns a Value. -// This method should be used for flattened shapes. -// -// Unlike MemberElement, flattened element will NOT write element tags -// directly for the associated start element. -// -// The value returned by the FlattenedElement does not need to be closed. -func (xv Value) FlattenedElement(element StartElement) Value { - v := newFlattenedValue(xv.w, xv.scratch, element) - v.isFlattened = true - return v -} - -// Array returns an array encoder. By default, the members of array are -// wrapped with `` element tag. -// If value is marked as flattened, the start element is used to wrap the members instead of -// the `` element. -func (xv Value) Array() *Array { - return newArray(xv.w, xv.scratch, arrayMemberWrapper, xv.startElement, xv.isFlattened) -} - -/* -ArrayWithCustomName returns an array encoder. - -It takes named start element as an argument, the named start element will used to wrap xml array entries. -for eg, `entry1` -Here `customName` named start element will be wrapped on each array member. -*/ -func (xv Value) ArrayWithCustomName(element StartElement) *Array { - return newArray(xv.w, xv.scratch, element, xv.startElement, xv.isFlattened) -} - -/* -Map returns a map encoder. By default, the map entries are -wrapped with `` element tag. - -If value is marked as flattened, the start element is used to wrap the entry instead of -the `` element. -*/ -func (xv Value) Map() *Map { - // flattened map - if xv.isFlattened { - return newFlattenedMap(xv.w, xv.scratch, xv.startElement) - } - - // un-flattened map - return newMap(xv.w, xv.scratch) -} - -// encodeByteSlice is modified copy of json encoder's encodeByteSlice. -// It is used to base64 encode a byte slice. -func encodeByteSlice(w writer, scratch []byte, v []byte) { - if v == nil { - return - } - - encodedLen := base64.StdEncoding.EncodedLen(len(v)) - if encodedLen <= len(scratch) { - // If the encoded bytes fit in e.scratch, avoid an extra - // allocation and use the cheaper Encoding.Encode. - dst := scratch[:encodedLen] - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else if encodedLen <= 1024 { - // The encoded bytes are short enough to allocate for, and - // Encoding.Encode is still cheaper. - dst := make([]byte, encodedLen) - base64.StdEncoding.Encode(dst, v) - w.Write(dst) - } else { - // The encoded bytes are too long to cheaply allocate, and - // Encoding.Encode is no longer noticeably cheaper. - enc := base64.NewEncoder(base64.StdEncoding, w) - enc.Write(v) - enc.Close() - } -} - -// IsFlattened returns true if value is for flattened shape. -func (xv Value) IsFlattened() bool { - return xv.isFlattened -} - -// Close closes the value. -func (xv Value) Close() { - writeEndElement(xv.w, xv.startElement.End()) -} diff --git a/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go b/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go deleted file mode 100644 index dc4eebdffa..0000000000 --- a/vendor/github.com/aws/smithy-go/encoding/xml/xml_decoder.go +++ /dev/null @@ -1,154 +0,0 @@ -package xml - -import ( - "encoding/xml" - "fmt" - "strings" -) - -// NodeDecoder is a XML decoder wrapper that is responsible to decoding -// a single XML Node element and it's nested member elements. This wrapper decoder -// takes in the start element of the top level node being decoded. -type NodeDecoder struct { - Decoder *xml.Decoder - StartEl xml.StartElement -} - -// WrapNodeDecoder returns an initialized XMLNodeDecoder -func WrapNodeDecoder(decoder *xml.Decoder, startEl xml.StartElement) NodeDecoder { - return NodeDecoder{ - Decoder: decoder, - StartEl: startEl, - } -} - -// Token on a Node Decoder returns a xml StartElement. It returns a boolean that indicates the -// a token is the node decoder's end node token; and an error which indicates any error -// that occurred while retrieving the start element -func (d NodeDecoder) Token() (t xml.StartElement, done bool, err error) { - for { - token, e := d.Decoder.Token() - if e != nil { - return t, done, e - } - - // check if we reach end of the node being decoded - if el, ok := token.(xml.EndElement); ok { - return t, el == d.StartEl.End(), err - } - - if t, ok := token.(xml.StartElement); ok { - return restoreAttrNamespaces(t), false, err - } - - // skip token if it is a comment or preamble or empty space value due to indentation - // or if it's a value and is not expected - } -} - -// restoreAttrNamespaces update XML attributes to restore the short namespaces found within -// the raw XML document. -func restoreAttrNamespaces(node xml.StartElement) xml.StartElement { - if len(node.Attr) == 0 { - return node - } - - // Generate a mapping of XML namespace values to their short names. - ns := map[string]string{} - for _, a := range node.Attr { - if a.Name.Space == "xmlns" { - ns[a.Value] = a.Name.Local - break - } - } - - for i, a := range node.Attr { - if a.Name.Space == "xmlns" { - continue - } - // By default, xml.Decoder will fully resolve these namespaces. So if you had - // then by default the second attribute would have the `Name.Space` resolved to `baz`. But we need it to - // continue to resolve as `bar` so we can easily identify it later on. - if v, ok := ns[node.Attr[i].Name.Space]; ok { - node.Attr[i].Name.Space = v - } - } - return node -} - -// GetElement looks for the given tag name at the current level, and returns the element if found, and -// skipping over non-matching elements. Returns an error if the node is not found, or if an error occurs while walking -// the document. -func (d NodeDecoder) GetElement(name string) (t xml.StartElement, err error) { - for { - token, done, err := d.Token() - if err != nil { - return t, err - } - if done { - return t, fmt.Errorf("%s node not found", name) - } - switch { - case strings.EqualFold(name, token.Name.Local): - return token, nil - default: - err = d.Decoder.Skip() - if err != nil { - return t, err - } - } - } -} - -// Value provides an abstraction to retrieve char data value within an xml element. -// The method will return an error if it encounters a nested xml element instead of char data. -// This method should only be used to retrieve simple type or blob shape values as []byte. -func (d NodeDecoder) Value() (c []byte, err error) { - t, e := d.Decoder.Token() - if e != nil { - return c, e - } - - endElement := d.StartEl.End() - - switch ev := t.(type) { - case xml.CharData: - c = ev.Copy() - case xml.EndElement: // end tag or self-closing - if ev == endElement { - return []byte{}, err - } - return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t) - default: - return c, fmt.Errorf("expected value for %v element, got %T type %v instead", d.StartEl.Name.Local, t, t) - } - - t, e = d.Decoder.Token() - if e != nil { - return c, e - } - - if ev, ok := t.(xml.EndElement); ok { - if ev == endElement { - return c, err - } - } - - return c, fmt.Errorf("expected end element %v, got %T type %v instead", endElement, t, t) -} - -// FetchRootElement takes in a decoder and returns the first start element within the xml body. -// This function is useful in fetching the start element of an XML response and ignore the -// comments and preamble -func FetchRootElement(decoder *xml.Decoder) (startElement xml.StartElement, err error) { - for { - t, e := decoder.Token() - if e != nil { - return startElement, e - } - - if startElement, ok := t.(xml.StartElement); ok { - return startElement, err - } - } -} diff --git a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go b/vendor/github.com/aws/smithy-go/endpoints/endpoint.go deleted file mode 100644 index f778272be3..0000000000 --- a/vendor/github.com/aws/smithy-go/endpoints/endpoint.go +++ /dev/null @@ -1,23 +0,0 @@ -package transport - -import ( - "net/http" - "net/url" - - "github.com/aws/smithy-go" -) - -// Endpoint is the endpoint object returned by Endpoint resolution V2 -type Endpoint struct { - // The complete URL minimally specifying the scheme and host. - // May optionally specify the port and base path component. - URI url.URL - - // An optional set of headers to be sent using transport layer headers. - Headers http.Header - - // A grab-bag property map of endpoint attributes. The - // values present here are subject to change, or being add/removed at any - // time. - Properties smithy.Properties -} diff --git a/vendor/github.com/aws/smithy-go/errors.go b/vendor/github.com/aws/smithy-go/errors.go deleted file mode 100644 index d6948d0206..0000000000 --- a/vendor/github.com/aws/smithy-go/errors.go +++ /dev/null @@ -1,137 +0,0 @@ -package smithy - -import "fmt" - -// APIError provides the generic API and protocol agnostic error type all SDK -// generated exception types will implement. -type APIError interface { - error - - // ErrorCode returns the error code for the API exception. - ErrorCode() string - // ErrorMessage returns the error message for the API exception. - ErrorMessage() string - // ErrorFault returns the fault for the API exception. - ErrorFault() ErrorFault -} - -// GenericAPIError provides a generic concrete API error type that SDKs can use -// to deserialize error responses into. Should be used for unmodeled or untyped -// errors. -type GenericAPIError struct { - Code string - Message string - Fault ErrorFault -} - -// ErrorCode returns the error code for the API exception. -func (e *GenericAPIError) ErrorCode() string { return e.Code } - -// ErrorMessage returns the error message for the API exception. -func (e *GenericAPIError) ErrorMessage() string { return e.Message } - -// ErrorFault returns the fault for the API exception. -func (e *GenericAPIError) ErrorFault() ErrorFault { return e.Fault } - -func (e *GenericAPIError) Error() string { - return fmt.Sprintf("api error %s: %s", e.Code, e.Message) -} - -var _ APIError = (*GenericAPIError)(nil) - -// OperationError decorates an underlying error which occurred while invoking -// an operation with names of the operation and API. -type OperationError struct { - ServiceID string - OperationName string - Err error -} - -// Service returns the name of the API service the error occurred with. -func (e *OperationError) Service() string { return e.ServiceID } - -// Operation returns the name of the API operation the error occurred with. -func (e *OperationError) Operation() string { return e.OperationName } - -// Unwrap returns the nested error if any, or nil. -func (e *OperationError) Unwrap() error { return e.Err } - -func (e *OperationError) Error() string { - return fmt.Sprintf("operation error %s: %s, %v", e.ServiceID, e.OperationName, e.Err) -} - -// DeserializationError provides a wrapper for an error that occurs during -// deserialization. -type DeserializationError struct { - Err error // original error - Snapshot []byte -} - -// Error returns a formatted error for DeserializationError -func (e *DeserializationError) Error() string { - const msg = "deserialization failed" - if e.Err == nil { - return msg - } - return fmt.Sprintf("%s, %v", msg, e.Err) -} - -// Unwrap returns the underlying Error in DeserializationError -func (e *DeserializationError) Unwrap() error { return e.Err } - -// ErrorFault provides the type for a Smithy API error fault. -type ErrorFault int - -// ErrorFault enumeration values -const ( - FaultUnknown ErrorFault = iota - FaultServer - FaultClient -) - -func (f ErrorFault) String() string { - switch f { - case FaultServer: - return "server" - case FaultClient: - return "client" - default: - return "unknown" - } -} - -// SerializationError represents an error that occurred while attempting to serialize a request -type SerializationError struct { - Err error // original error -} - -// Error returns a formatted error for SerializationError -func (e *SerializationError) Error() string { - const msg = "serialization failed" - if e.Err == nil { - return msg - } - return fmt.Sprintf("%s: %v", msg, e.Err) -} - -// Unwrap returns the underlying Error in SerializationError -func (e *SerializationError) Unwrap() error { return e.Err } - -// CanceledError is the error that will be returned by an API request that was -// canceled. API operations given a Context may return this error when -// canceled. -type CanceledError struct { - Err error -} - -// CanceledError returns true to satisfy interfaces checking for canceled errors. -func (*CanceledError) CanceledError() bool { return true } - -// Unwrap returns the underlying error, if there was one. -func (e *CanceledError) Unwrap() error { - return e.Err -} - -func (e *CanceledError) Error() string { - return fmt.Sprintf("canceled, %v", e.Err) -} diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go deleted file mode 100644 index 945db0af30..0000000000 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package smithy - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.0" diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE deleted file mode 100644 index fe6a62006a..0000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/LICENSE +++ /dev/null @@ -1,28 +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 COPYIGHT 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/aws/smithy-go/internal/sync/singleflight/docs.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go deleted file mode 100644 index 9c9d02b94b..0000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/docs.go +++ /dev/null @@ -1,8 +0,0 @@ -// Package singleflight provides a duplicate function call suppression -// mechanism. This package is a fork of the Go golang.org/x/sync/singleflight -// package. The package is forked, because the package a part of the unstable -// and unversioned golang.org/x/sync module. -// -// https://github.com/golang/sync/tree/67f06af15bc961c363a7260195bcd53487529a21/singleflight - -package singleflight diff --git a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go b/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go deleted file mode 100644 index e8a1b17d56..0000000000 --- a/vendor/github.com/aws/smithy-go/internal/sync/singleflight/singleflight.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2013 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 singleflight - -import ( - "bytes" - "errors" - "fmt" - "runtime" - "runtime/debug" - "sync" -) - -// errGoexit indicates the runtime.Goexit was called in -// the user given function. -var errGoexit = errors.New("runtime.Goexit was called") - -// A panicError is an arbitrary value recovered from a panic -// with the stack trace during the execution of given function. -type panicError struct { - value interface{} - stack []byte -} - -// Error implements error interface. -func (p *panicError) Error() string { - return fmt.Sprintf("%v\n\n%s", p.value, p.stack) -} - -func newPanicError(v interface{}) error { - stack := debug.Stack() - - // The first line of the stack trace is of the form "goroutine N [status]:" - // but by the time the panic reaches Do the goroutine may no longer exist - // and its status will have changed. Trim out the misleading line. - if line := bytes.IndexByte(stack[:], '\n'); line >= 0 { - stack = stack[line+1:] - } - return &panicError{value: v, stack: stack} -} - -// call is an in-flight or completed singleflight.Do call -type call struct { - wg sync.WaitGroup - - // These fields are written once before the WaitGroup is done - // and are only read after the WaitGroup is done. - val interface{} - err error - - // forgotten indicates whether Forget was called with this call's key - // while the call was still in flight. - forgotten bool - - // These fields are read and written with the singleflight - // mutex held before the WaitGroup is done, and are read but - // not written after the WaitGroup is done. - dups int - chans []chan<- Result -} - -// Group represents a class of work and forms a namespace in -// which units of work can be executed with duplicate suppression. -type Group struct { - mu sync.Mutex // protects m - m map[string]*call // lazily initialized -} - -// Result holds the results of Do, so they can be passed -// on a channel. -type Result struct { - Val interface{} - Err error - Shared bool -} - -// Do executes and returns the results of the given function, making -// sure that only one execution is in-flight for a given key at a -// time. If a duplicate comes in, the duplicate caller waits for the -// original to complete and receives the same results. -// The return value shared indicates whether v was given to multiple callers. -func (g *Group) Do(key string, fn func() (interface{}, error)) (v interface{}, err error, shared bool) { - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - g.mu.Unlock() - c.wg.Wait() - - if e, ok := c.err.(*panicError); ok { - panic(e) - } else if c.err == errGoexit { - runtime.Goexit() - } - return c.val, c.err, true - } - c := new(call) - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - g.doCall(c, key, fn) - return c.val, c.err, c.dups > 0 -} - -// DoChan is like Do but returns a channel that will receive the -// results when they are ready. -// -// The returned channel will not be closed. -func (g *Group) DoChan(key string, fn func() (interface{}, error)) <-chan Result { - ch := make(chan Result, 1) - g.mu.Lock() - if g.m == nil { - g.m = make(map[string]*call) - } - if c, ok := g.m[key]; ok { - c.dups++ - c.chans = append(c.chans, ch) - g.mu.Unlock() - return ch - } - c := &call{chans: []chan<- Result{ch}} - c.wg.Add(1) - g.m[key] = c - g.mu.Unlock() - - go g.doCall(c, key, fn) - - return ch -} - -// doCall handles the single call for a key. -func (g *Group) doCall(c *call, key string, fn func() (interface{}, error)) { - normalReturn := false - recovered := false - - // use double-defer to distinguish panic from runtime.Goexit, - // more details see https://golang.org/cl/134395 - defer func() { - // the given function invoked runtime.Goexit - if !normalReturn && !recovered { - c.err = errGoexit - } - - c.wg.Done() - g.mu.Lock() - defer g.mu.Unlock() - if !c.forgotten { - delete(g.m, key) - } - - if e, ok := c.err.(*panicError); ok { - // In order to prevent the waiting channels from being blocked forever, - // needs to ensure that this panic cannot be recovered. - if len(c.chans) > 0 { - go panic(e) - select {} // Keep this goroutine around so that it will appear in the crash dump. - } else { - panic(e) - } - } else if c.err == errGoexit { - // Already in the process of goexit, no need to call again - } else { - // Normal return - for _, ch := range c.chans { - ch <- Result{c.val, c.err, c.dups > 0} - } - } - }() - - func() { - defer func() { - if !normalReturn { - // Ideally, we would wait to take a stack trace until we've determined - // whether this is a panic or a runtime.Goexit. - // - // Unfortunately, the only way we can distinguish the two is to see - // whether the recover stopped the goroutine from terminating, and by - // the time we know that, the part of the stack trace relevant to the - // panic has been discarded. - if r := recover(); r != nil { - c.err = newPanicError(r) - } - } - }() - - c.val, c.err = fn() - normalReturn = true - }() - - if !normalReturn { - recovered = true - } -} - -// Forget tells the singleflight to forget about a key. Future calls -// to Do for this key will call the function rather than waiting for -// an earlier call to complete. -func (g *Group) Forget(key string) { - g.mu.Lock() - if c, ok := g.m[key]; ok { - c.forgotten = true - } - delete(g.m, key) - g.mu.Unlock() -} diff --git a/vendor/github.com/aws/smithy-go/io/byte.go b/vendor/github.com/aws/smithy-go/io/byte.go deleted file mode 100644 index f8417c15b8..0000000000 --- a/vendor/github.com/aws/smithy-go/io/byte.go +++ /dev/null @@ -1,12 +0,0 @@ -package io - -const ( - // Byte is 8 bits - Byte int64 = 1 - // KibiByte (KiB) is 1024 Bytes - KibiByte = Byte * 1024 - // MebiByte (MiB) is 1024 KiB - MebiByte = KibiByte * 1024 - // GibiByte (GiB) is 1024 MiB - GibiByte = MebiByte * 1024 -) diff --git a/vendor/github.com/aws/smithy-go/io/doc.go b/vendor/github.com/aws/smithy-go/io/doc.go deleted file mode 100644 index a6a33eaf56..0000000000 --- a/vendor/github.com/aws/smithy-go/io/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package io provides utilities for Smithy generated API clients. -package io diff --git a/vendor/github.com/aws/smithy-go/io/reader.go b/vendor/github.com/aws/smithy-go/io/reader.go deleted file mode 100644 index 07063f2960..0000000000 --- a/vendor/github.com/aws/smithy-go/io/reader.go +++ /dev/null @@ -1,16 +0,0 @@ -package io - -import ( - "io" -) - -// ReadSeekNopCloser wraps an io.ReadSeeker with an additional Close method -// that does nothing. -type ReadSeekNopCloser struct { - io.ReadSeeker -} - -// Close does nothing. -func (ReadSeekNopCloser) Close() error { - return nil -} diff --git a/vendor/github.com/aws/smithy-go/io/ringbuffer.go b/vendor/github.com/aws/smithy-go/io/ringbuffer.go deleted file mode 100644 index 06b476add8..0000000000 --- a/vendor/github.com/aws/smithy-go/io/ringbuffer.go +++ /dev/null @@ -1,94 +0,0 @@ -package io - -import ( - "bytes" - "io" -) - -// RingBuffer struct satisfies io.ReadWrite interface. -// -// ReadBuffer is a revolving buffer data structure, which can be used to store snapshots of data in a -// revolving window. -type RingBuffer struct { - slice []byte - start int - end int - size int -} - -// NewRingBuffer method takes in a byte slice as an input and returns a RingBuffer. -func NewRingBuffer(slice []byte) *RingBuffer { - ringBuf := RingBuffer{ - slice: slice, - } - return &ringBuf -} - -// Write method inserts the elements in a byte slice, and returns the number of bytes written along with any error. -func (r *RingBuffer) Write(p []byte) (int, error) { - for _, b := range p { - // check if end points to invalid index, we need to circle back - if r.end == len(r.slice) { - r.end = 0 - } - // check if start points to invalid index, we need to circle back - if r.start == len(r.slice) { - r.start = 0 - } - // if ring buffer is filled, increment the start index - if r.size == len(r.slice) { - r.size-- - r.start++ - } - - r.slice[r.end] = b - r.end++ - r.size++ - } - return len(p), nil -} - -// Read copies the data on the ring buffer into the byte slice provided to the method. -// Returns the read count along with any error encountered while reading. -func (r *RingBuffer) Read(p []byte) (int, error) { - // readCount keeps track of the number of bytes read - var readCount int - for j := 0; j < len(p); j++ { - // if ring buffer is empty or completely read - // return EOF error. - if r.size == 0 { - return readCount, io.EOF - } - - if r.start == len(r.slice) { - r.start = 0 - } - - p[j] = r.slice[r.start] - readCount++ - // increment the start pointer for ring buffer - r.start++ - // decrement the size of ring buffer - r.size-- - } - return readCount, nil -} - -// Len returns the number of unread bytes in the buffer. -func (r *RingBuffer) Len() int { - return r.size -} - -// Bytes returns a copy of the RingBuffer's bytes. -func (r RingBuffer) Bytes() []byte { - var b bytes.Buffer - io.Copy(&b, &r) - return b.Bytes() -} - -// Reset resets the ring buffer. -func (r *RingBuffer) Reset() { - *r = RingBuffer{ - slice: r.slice, - } -} diff --git a/vendor/github.com/aws/smithy-go/local-mod-replace.sh b/vendor/github.com/aws/smithy-go/local-mod-replace.sh deleted file mode 100644 index 800bf37695..0000000000 --- a/vendor/github.com/aws/smithy-go/local-mod-replace.sh +++ /dev/null @@ -1,39 +0,0 @@ -#1/usr/bin/env bash - -PROJECT_DIR="" -SMITHY_SOURCE_DIR=$(cd `dirname $0` && pwd) - -usage() { - echo "Usage: $0 [-s SMITHY_SOURCE_DIR] [-d PROJECT_DIR]" 1>&2 - exit 1 -} - -while getopts "hs:d:" options; do - case "${options}" in - s) - SMITHY_SOURCE_DIR=${OPTARG} - if [ "$SMITHY_SOURCE_DIR" == "" ]; then - echo "path to smithy-go source directory is required" || exit - usage - fi - ;; - d) - PROJECT_DIR=${OPTARG} - ;; - h) - usage - ;; - *) - usage - ;; - esac -done - -if [ "$PROJECT_DIR" != "" ]; then - cd $PROJECT_DIR || exit -fi - -go mod graph | awk '{print $1}' | cut -d '@' -f 1 | sort | uniq | grep "github.com/aws/smithy-go" | while read x; do - repPath=${x/github.com\/aws\/smithy-go/${SMITHY_SOURCE_DIR}} - echo -replace $x=$repPath -done | xargs go mod edit diff --git a/vendor/github.com/aws/smithy-go/logging/logger.go b/vendor/github.com/aws/smithy-go/logging/logger.go deleted file mode 100644 index 2071924bd3..0000000000 --- a/vendor/github.com/aws/smithy-go/logging/logger.go +++ /dev/null @@ -1,82 +0,0 @@ -package logging - -import ( - "context" - "io" - "log" -) - -// Classification is the type of the log entry's classification name. -type Classification string - -// Set of standard classifications that can be used by clients and middleware -const ( - Warn Classification = "WARN" - Debug Classification = "DEBUG" -) - -// Logger is an interface for logging entries at certain classifications. -type Logger interface { - // Logf is expected to support the standard fmt package "verbs". - Logf(classification Classification, format string, v ...interface{}) -} - -// LoggerFunc is a wrapper around a function to satisfy the Logger interface. -type LoggerFunc func(classification Classification, format string, v ...interface{}) - -// Logf delegates the logging request to the wrapped function. -func (f LoggerFunc) Logf(classification Classification, format string, v ...interface{}) { - f(classification, format, v...) -} - -// ContextLogger is an optional interface a Logger implementation may expose that provides -// the ability to create context aware log entries. -type ContextLogger interface { - WithContext(context.Context) Logger -} - -// WithContext will pass the provided context to logger if it implements the ContextLogger interface and return the resulting -// logger. Otherwise the logger will be returned as is. As a special case if a nil logger is provided, a Nop logger will -// be returned to the caller. -func WithContext(ctx context.Context, logger Logger) Logger { - if logger == nil { - return Nop{} - } - - cl, ok := logger.(ContextLogger) - if !ok { - return logger - } - - return cl.WithContext(ctx) -} - -// Nop is a Logger implementation that simply does not perform any logging. -type Nop struct{} - -// Logf simply returns without performing any action -func (n Nop) Logf(Classification, string, ...interface{}) { - return -} - -// StandardLogger is a Logger implementation that wraps the standard library logger, and delegates logging to it's -// Printf method. -type StandardLogger struct { - Logger *log.Logger -} - -// Logf logs the given classification and message to the underlying logger. -func (s StandardLogger) Logf(classification Classification, format string, v ...interface{}) { - if len(classification) != 0 { - format = string(classification) + " " + format - } - - s.Logger.Printf(format, v...) -} - -// NewStandardLogger returns a new StandardLogger -func NewStandardLogger(writer io.Writer) *StandardLogger { - return &StandardLogger{ - Logger: log.New(writer, "SDK ", log.LstdFlags), - } -} diff --git a/vendor/github.com/aws/smithy-go/metrics/metrics.go b/vendor/github.com/aws/smithy-go/metrics/metrics.go deleted file mode 100644 index c009d9f278..0000000000 --- a/vendor/github.com/aws/smithy-go/metrics/metrics.go +++ /dev/null @@ -1,136 +0,0 @@ -// Package metrics defines the metrics APIs used by Smithy clients. -package metrics - -import ( - "context" - - "github.com/aws/smithy-go" -) - -// MeterProvider is the entry point for creating a Meter. -type MeterProvider interface { - Meter(scope string, opts ...MeterOption) Meter -} - -// MeterOption applies configuration to a Meter. -type MeterOption func(o *MeterOptions) - -// MeterOptions represents configuration for a Meter. -type MeterOptions struct { - Properties smithy.Properties -} - -// Meter is the entry point for creation of measurement instruments. -type Meter interface { - // integer/synchronous - Int64Counter(name string, opts ...InstrumentOption) (Int64Counter, error) - Int64UpDownCounter(name string, opts ...InstrumentOption) (Int64UpDownCounter, error) - Int64Gauge(name string, opts ...InstrumentOption) (Int64Gauge, error) - Int64Histogram(name string, opts ...InstrumentOption) (Int64Histogram, error) - - // integer/asynchronous - Int64AsyncCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) - Int64AsyncUpDownCounter(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) - Int64AsyncGauge(name string, callback Int64Callback, opts ...InstrumentOption) (AsyncInstrument, error) - - // floating-point/synchronous - Float64Counter(name string, opts ...InstrumentOption) (Float64Counter, error) - Float64UpDownCounter(name string, opts ...InstrumentOption) (Float64UpDownCounter, error) - Float64Gauge(name string, opts ...InstrumentOption) (Float64Gauge, error) - Float64Histogram(name string, opts ...InstrumentOption) (Float64Histogram, error) - - // floating-point/asynchronous - Float64AsyncCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) - Float64AsyncUpDownCounter(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) - Float64AsyncGauge(name string, callback Float64Callback, opts ...InstrumentOption) (AsyncInstrument, error) -} - -// InstrumentOption applies configuration to an instrument. -type InstrumentOption func(o *InstrumentOptions) - -// InstrumentOptions represents configuration for an instrument. -type InstrumentOptions struct { - UnitLabel string - Description string -} - -// Int64Counter measures a monotonically increasing int64 value. -type Int64Counter interface { - Add(context.Context, int64, ...RecordMetricOption) -} - -// Int64UpDownCounter measures a fluctuating int64 value. -type Int64UpDownCounter interface { - Add(context.Context, int64, ...RecordMetricOption) -} - -// Int64Gauge samples a discrete int64 value. -type Int64Gauge interface { - Sample(context.Context, int64, ...RecordMetricOption) -} - -// Int64Histogram records multiple data points for an int64 value. -type Int64Histogram interface { - Record(context.Context, int64, ...RecordMetricOption) -} - -// Float64Counter measures a monotonically increasing float64 value. -type Float64Counter interface { - Add(context.Context, float64, ...RecordMetricOption) -} - -// Float64UpDownCounter measures a fluctuating float64 value. -type Float64UpDownCounter interface { - Add(context.Context, float64, ...RecordMetricOption) -} - -// Float64Gauge samples a discrete float64 value. -type Float64Gauge interface { - Sample(context.Context, float64, ...RecordMetricOption) -} - -// Float64Histogram records multiple data points for an float64 value. -type Float64Histogram interface { - Record(context.Context, float64, ...RecordMetricOption) -} - -// AsyncInstrument is the universal handle returned for creation of all async -// instruments. -// -// Callers use the Stop() API to unregister the callback passed at instrument -// creation. -type AsyncInstrument interface { - Stop() -} - -// Int64Callback describes a function invoked when an async int64 instrument is -// read. -type Int64Callback func(context.Context, Int64Observer) - -// Int64Observer is the interface passed to async int64 instruments. -// -// Callers use the Observe() API of this interface to report metrics to the -// underlying collector. -type Int64Observer interface { - Observe(context.Context, int64, ...RecordMetricOption) -} - -// Float64Callback describes a function invoked when an async float64 -// instrument is read. -type Float64Callback func(context.Context, Float64Observer) - -// Float64Observer is the interface passed to async int64 instruments. -// -// Callers use the Observe() API of this interface to report metrics to the -// underlying collector. -type Float64Observer interface { - Observe(context.Context, float64, ...RecordMetricOption) -} - -// RecordMetricOption applies configuration to a recorded metric. -type RecordMetricOption func(o *RecordMetricOptions) - -// RecordMetricOptions represents configuration for a recorded metric. -type RecordMetricOptions struct { - Properties smithy.Properties -} diff --git a/vendor/github.com/aws/smithy-go/metrics/nop.go b/vendor/github.com/aws/smithy-go/metrics/nop.go deleted file mode 100644 index fb374e1fb8..0000000000 --- a/vendor/github.com/aws/smithy-go/metrics/nop.go +++ /dev/null @@ -1,67 +0,0 @@ -package metrics - -import "context" - -// NopMeterProvider is a no-op metrics implementation. -type NopMeterProvider struct{} - -var _ MeterProvider = (*NopMeterProvider)(nil) - -// Meter returns a meter which creates no-op instruments. -func (NopMeterProvider) Meter(string, ...MeterOption) Meter { - return nopMeter{} -} - -type nopMeter struct{} - -var _ Meter = (*nopMeter)(nil) - -func (nopMeter) Int64Counter(string, ...InstrumentOption) (Int64Counter, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64UpDownCounter(string, ...InstrumentOption) (Int64UpDownCounter, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64Gauge(string, ...InstrumentOption) (Int64Gauge, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64Histogram(string, ...InstrumentOption) (Int64Histogram, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64AsyncCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64AsyncUpDownCounter(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Int64AsyncGauge(string, Int64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[int64]{}, nil -} -func (nopMeter) Float64Counter(string, ...InstrumentOption) (Float64Counter, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64UpDownCounter(string, ...InstrumentOption) (Float64UpDownCounter, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64Gauge(string, ...InstrumentOption) (Float64Gauge, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64Histogram(string, ...InstrumentOption) (Float64Histogram, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64AsyncCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64AsyncUpDownCounter(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil -} -func (nopMeter) Float64AsyncGauge(string, Float64Callback, ...InstrumentOption) (AsyncInstrument, error) { - return nopInstrument[float64]{}, nil -} - -type nopInstrument[N any] struct{} - -func (nopInstrument[N]) Add(context.Context, N, ...RecordMetricOption) {} -func (nopInstrument[N]) Sample(context.Context, N, ...RecordMetricOption) {} -func (nopInstrument[N]) Record(context.Context, N, ...RecordMetricOption) {} -func (nopInstrument[_]) Stop() {} diff --git a/vendor/github.com/aws/smithy-go/middleware/context.go b/vendor/github.com/aws/smithy-go/middleware/context.go deleted file mode 100644 index f51aa4f04f..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/context.go +++ /dev/null @@ -1,41 +0,0 @@ -package middleware - -import "context" - -type ( - serviceIDKey struct{} - operationNameKey struct{} -) - -// WithServiceID adds a service ID to the context, scoped to middleware stack -// values. -// -// This API is called in the client runtime when bootstrapping an operation and -// should not typically be used directly. -func WithServiceID(parent context.Context, id string) context.Context { - return WithStackValue(parent, serviceIDKey{}, id) -} - -// GetServiceID retrieves the service ID from the context. This is typically -// the service shape's name from its Smithy model. Service clients for specific -// systems (e.g. AWS SDK) may use an alternate designated value. -func GetServiceID(ctx context.Context) string { - id, _ := GetStackValue(ctx, serviceIDKey{}).(string) - return id -} - -// WithOperationName adds the operation name to the context, scoped to -// middleware stack values. -// -// This API is called in the client runtime when bootstrapping an operation and -// should not typically be used directly. -func WithOperationName(parent context.Context, id string) context.Context { - return WithStackValue(parent, operationNameKey{}, id) -} - -// GetOperationName retrieves the operation name from the context. This is -// typically the operation shape's name from its Smithy model. -func GetOperationName(ctx context.Context) string { - name, _ := GetStackValue(ctx, operationNameKey{}).(string) - return name -} diff --git a/vendor/github.com/aws/smithy-go/middleware/doc.go b/vendor/github.com/aws/smithy-go/middleware/doc.go deleted file mode 100644 index 9858928a7f..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/doc.go +++ /dev/null @@ -1,67 +0,0 @@ -// Package middleware provides transport agnostic middleware for decorating SDK -// handlers. -// -// The Smithy middleware stack provides ordered behavior to be invoked on an -// underlying handler. The stack is separated into steps that are invoked in a -// static order. A step is a collection of middleware that are injected into a -// ordered list defined by the user. The user may add, insert, swap, and remove a -// step's middleware. When the stack is invoked the step middleware become static, -// and their order cannot be modified. -// -// A stack and its step middleware are **not** safe to modify concurrently. -// -// A stack will use the ordered list of middleware to decorate a underlying -// handler. A handler could be something like an HTTP Client that round trips an -// API operation over HTTP. -// -// Smithy Middleware Stack -// -// A Stack is a collection of middleware that wrap a handler. The stack can be -// broken down into discreet steps. Each step may contain zero or more middleware -// specific to that stack's step. -// -// A Stack Step is a predefined set of middleware that are invoked in a static -// order by the Stack. These steps represent fixed points in the middleware stack -// for organizing specific behavior, such as serialize and build. A Stack Step is -// composed of zero or more middleware that are specific to that step. A step may -// define its own set of input/output parameters the generic input/output -// parameters are cast from. A step calls its middleware recursively, before -// calling the next step in the stack returning the result or error of the step -// middleware decorating the underlying handler. -// -// * Initialize: Prepares the input, and sets any default parameters as needed, -// (e.g. idempotency token, and presigned URLs). -// -// * Serialize: Serializes the prepared input into a data structure that can be -// consumed by the target transport's message, (e.g. REST-JSON serialization). -// -// * Build: Adds additional metadata to the serialized transport message, (e.g. -// HTTP's Content-Length header, or body checksum). Decorations and -// modifications to the message should be copied to all message attempts. -// -// * Finalize: Performs final preparations needed before sending the message. The -// message should already be complete by this stage, and is only alternated to -// meet the expectations of the recipient, (e.g. Retry and AWS SigV4 request -// signing). -// -// * Deserialize: Reacts to the handler's response returned by the recipient of -// the request message. Deserializes the response into a structured type or -// error above stacks can react to. -// -// Adding Middleware to a Stack Step -// -// Middleware can be added to a step front or back, or relative, by name, to an -// existing middleware in that stack. If a middleware does not have a name, a -// unique name will be generated at the middleware and be added to the step. -// -// // Create middleware stack -// stack := middleware.NewStack() -// -// // Add middleware to stack steps -// stack.Initialize.Add(paramValidationMiddleware, middleware.After) -// stack.Serialize.Add(marshalOperationFoo, middleware.After) -// stack.Deserialize.Add(unmarshalOperationFoo, middleware.After) -// -// // Invoke middleware on handler. -// resp, err := stack.HandleMiddleware(ctx, req.Input, clientHandler) -package middleware diff --git a/vendor/github.com/aws/smithy-go/middleware/logging.go b/vendor/github.com/aws/smithy-go/middleware/logging.go deleted file mode 100644 index c2f0dbb6bd..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/logging.go +++ /dev/null @@ -1,46 +0,0 @@ -package middleware - -import ( - "context" - - "github.com/aws/smithy-go/logging" -) - -// loggerKey is the context value key for which the logger is associated with. -type loggerKey struct{} - -// GetLogger takes a context to retrieve a Logger from. If no logger is present on the context a logging.Nop logger -// is returned. If the logger retrieved from context supports the ContextLogger interface, the context will be passed -// to the WithContext method and the resulting logger will be returned. Otherwise the stored logger is returned as is. -func GetLogger(ctx context.Context) logging.Logger { - logger, ok := ctx.Value(loggerKey{}).(logging.Logger) - if !ok || logger == nil { - return logging.Nop{} - } - - return logging.WithContext(ctx, logger) -} - -// SetLogger sets the provided logger value on the provided ctx. -func SetLogger(ctx context.Context, logger logging.Logger) context.Context { - return context.WithValue(ctx, loggerKey{}, logger) -} - -type setLogger struct { - Logger logging.Logger -} - -// AddSetLoggerMiddleware adds a middleware that will add the provided logger to the middleware context. -func AddSetLoggerMiddleware(stack *Stack, logger logging.Logger) error { - return stack.Initialize.Add(&setLogger{Logger: logger}, After) -} - -func (a *setLogger) ID() string { - return "SetLogger" -} - -func (a *setLogger) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, -) { - return next.HandleInitialize(SetLogger(ctx, a.Logger), in) -} diff --git a/vendor/github.com/aws/smithy-go/middleware/metadata.go b/vendor/github.com/aws/smithy-go/middleware/metadata.go deleted file mode 100644 index 7bb7dbcf5a..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/metadata.go +++ /dev/null @@ -1,65 +0,0 @@ -package middleware - -// MetadataReader provides an interface for reading metadata from the -// underlying metadata container. -type MetadataReader interface { - Get(key interface{}) interface{} -} - -// Metadata provides storing and reading metadata values. Keys may be any -// comparable value type. Get and set will panic if key is not a comparable -// value type. -// -// Metadata uses lazy initialization, and Set method must be called as an -// addressable value, or pointer. Not doing so may cause key/value pair to not -// be set. -type Metadata struct { - values map[interface{}]interface{} -} - -// Get attempts to retrieve the value the key points to. Returns nil if the -// key was not found. -// -// Panics if key type is not comparable. -func (m Metadata) Get(key interface{}) interface{} { - return m.values[key] -} - -// Clone creates a shallow copy of Metadata entries, returning a new Metadata -// value with the original entries copied into it. -func (m Metadata) Clone() Metadata { - vs := make(map[interface{}]interface{}, len(m.values)) - for k, v := range m.values { - vs[k] = v - } - - return Metadata{ - values: vs, - } -} - -// Set stores the value pointed to by the key. If a value already exists at -// that key it will be replaced with the new value. -// -// Set method must be called as an addressable value, or pointer. If Set is not -// called as an addressable value or pointer, the key value pair being set may -// be lost. -// -// Panics if the key type is not comparable. -func (m *Metadata) Set(key, value interface{}) { - if m.values == nil { - m.values = map[interface{}]interface{}{} - } - m.values[key] = value -} - -// Has returns whether the key exists in the metadata. -// -// Panics if the key type is not comparable. -func (m Metadata) Has(key interface{}) bool { - if m.values == nil { - return false - } - _, ok := m.values[key] - return ok -} diff --git a/vendor/github.com/aws/smithy-go/middleware/middleware.go b/vendor/github.com/aws/smithy-go/middleware/middleware.go deleted file mode 100644 index 803b7c7518..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/middleware.go +++ /dev/null @@ -1,71 +0,0 @@ -package middleware - -import ( - "context" -) - -// Handler provides the interface for performing the logic to obtain an output, -// or error for the given input. -type Handler interface { - // Handle performs logic to obtain an output for the given input. Handler - // should be decorated with middleware to perform input specific behavior. - Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, - ) -} - -// HandlerFunc provides a wrapper around a function pointer to be used as a -// middleware handler. -type HandlerFunc func(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) - -// Handle invokes the underlying function, returning the result. -func (fn HandlerFunc) Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) { - return fn(ctx, input) -} - -// Middleware provides the interface to call handlers in a chain. -type Middleware interface { - // ID provides a unique identifier for the middleware. - ID() string - - // Performs the middleware's handling of the input, returning the output, - // or error. The middleware can invoke the next Handler if handling should - // continue. - HandleMiddleware(ctx context.Context, input interface{}, next Handler) ( - output interface{}, metadata Metadata, err error, - ) -} - -// decoratedHandler wraps a middleware in order to to call the next handler in -// the chain. -type decoratedHandler struct { - // The next handler to be called. - Next Handler - - // The current middleware decorating the handler. - With Middleware -} - -// Handle implements the Handler interface to handle a operation invocation. -func (m decoratedHandler) Handle(ctx context.Context, input interface{}) ( - output interface{}, metadata Metadata, err error, -) { - return m.With.HandleMiddleware(ctx, input, m.Next) -} - -// DecorateHandler decorates a handler with a middleware. Wrapping the handler -// with the middleware. -func DecorateHandler(h Handler, with ...Middleware) Handler { - for i := len(with) - 1; i >= 0; i-- { - h = decoratedHandler{ - Next: h, - With: with[i], - } - } - - return h -} diff --git a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go b/vendor/github.com/aws/smithy-go/middleware/ordered_group.go deleted file mode 100644 index 4b195308c5..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/ordered_group.go +++ /dev/null @@ -1,268 +0,0 @@ -package middleware - -import "fmt" - -// RelativePosition provides specifying the relative position of a middleware -// in an ordered group. -type RelativePosition int - -// Relative position for middleware in steps. -const ( - After RelativePosition = iota - Before -) - -type ider interface { - ID() string -} - -// orderedIDs provides an ordered collection of items with relative ordering -// by name. -type orderedIDs struct { - order *relativeOrder - items map[string]ider -} - -const baseOrderedItems = 5 - -func newOrderedIDs() *orderedIDs { - return &orderedIDs{ - order: newRelativeOrder(), - items: make(map[string]ider, baseOrderedItems), - } -} - -// Add injects the item to the relative position of the item group. Returns an -// error if the item already exists. -func (g *orderedIDs) Add(m ider, pos RelativePosition) error { - id := m.ID() - if len(id) == 0 { - return fmt.Errorf("empty ID, ID must not be empty") - } - - if err := g.order.Add(pos, id); err != nil { - return err - } - - g.items[id] = m - return nil -} - -// Insert injects the item relative to an existing item id. Returns an error if -// the original item does not exist, or the item being added already exists. -func (g *orderedIDs) Insert(m ider, relativeTo string, pos RelativePosition) error { - if len(m.ID()) == 0 { - return fmt.Errorf("insert ID must not be empty") - } - if len(relativeTo) == 0 { - return fmt.Errorf("relative to ID must not be empty") - } - - if err := g.order.Insert(relativeTo, pos, m.ID()); err != nil { - return err - } - - g.items[m.ID()] = m - return nil -} - -// Get returns the ider identified by id. If ider is not present, returns false. -func (g *orderedIDs) Get(id string) (ider, bool) { - v, ok := g.items[id] - return v, ok -} - -// Swap removes the item by id, replacing it with the new item. Returns an error -// if the original item doesn't exist. -func (g *orderedIDs) Swap(id string, m ider) (ider, error) { - if len(id) == 0 { - return nil, fmt.Errorf("swap from ID must not be empty") - } - - iderID := m.ID() - if len(iderID) == 0 { - return nil, fmt.Errorf("swap to ID must not be empty") - } - - if err := g.order.Swap(id, iderID); err != nil { - return nil, err - } - - removed := g.items[id] - - delete(g.items, id) - g.items[iderID] = m - - return removed, nil -} - -// Remove removes the item by id. Returns an error if the item -// doesn't exist. -func (g *orderedIDs) Remove(id string) (ider, error) { - if len(id) == 0 { - return nil, fmt.Errorf("remove ID must not be empty") - } - - if err := g.order.Remove(id); err != nil { - return nil, err - } - - removed := g.items[id] - delete(g.items, id) - return removed, nil -} - -func (g *orderedIDs) List() []string { - items := g.order.List() - order := make([]string, len(items)) - copy(order, items) - return order -} - -// Clear removes all entries and slots. -func (g *orderedIDs) Clear() { - g.order.Clear() - g.items = map[string]ider{} -} - -// GetOrder returns the item in the order it should be invoked in. -func (g *orderedIDs) GetOrder() []interface{} { - order := g.order.List() - ordered := make([]interface{}, len(order)) - for i := 0; i < len(order); i++ { - ordered[i] = g.items[order[i]] - } - - return ordered -} - -// relativeOrder provides ordering of item -type relativeOrder struct { - order []string -} - -func newRelativeOrder() *relativeOrder { - return &relativeOrder{ - order: make([]string, 0, baseOrderedItems), - } -} - -// Add inserts an item into the order relative to the position provided. -func (s *relativeOrder) Add(pos RelativePosition, ids ...string) error { - if len(ids) == 0 { - return nil - } - - for _, id := range ids { - if _, ok := s.has(id); ok { - return fmt.Errorf("already exists, %v", id) - } - } - - switch pos { - case Before: - return s.insert(0, Before, ids...) - - case After: - s.order = append(s.order, ids...) - - default: - return fmt.Errorf("invalid position, %v", int(pos)) - } - - return nil -} - -// Insert injects an item before or after the relative item. Returns -// an error if the relative item does not exist. -func (s *relativeOrder) Insert(relativeTo string, pos RelativePosition, ids ...string) error { - if len(ids) == 0 { - return nil - } - - for _, id := range ids { - if _, ok := s.has(id); ok { - return fmt.Errorf("already exists, %v", id) - } - } - - i, ok := s.has(relativeTo) - if !ok { - return fmt.Errorf("not found, %v", relativeTo) - } - - return s.insert(i, pos, ids...) -} - -// Swap will replace the item id with the to item. Returns an -// error if the original item id does not exist. Allows swapping out an -// item for another item with the same id. -func (s *relativeOrder) Swap(id, to string) error { - i, ok := s.has(id) - if !ok { - return fmt.Errorf("not found, %v", id) - } - - if _, ok = s.has(to); ok && id != to { - return fmt.Errorf("already exists, %v", to) - } - - s.order[i] = to - return nil -} - -func (s *relativeOrder) Remove(id string) error { - i, ok := s.has(id) - if !ok { - return fmt.Errorf("not found, %v", id) - } - - s.order = append(s.order[:i], s.order[i+1:]...) - return nil -} - -func (s *relativeOrder) List() []string { - return s.order -} - -func (s *relativeOrder) Clear() { - s.order = s.order[0:0] -} - -func (s *relativeOrder) insert(i int, pos RelativePosition, ids ...string) error { - switch pos { - case Before: - n := len(ids) - var src []string - if n <= cap(s.order)-len(s.order) { - s.order = s.order[:len(s.order)+n] - src = s.order - } else { - src = s.order - s.order = make([]string, len(s.order)+n) - copy(s.order[:i], src[:i]) // only when allocating a new slice do we need to copy the front half - } - copy(s.order[i+n:], src[i:]) - copy(s.order[i:], ids) - case After: - if i == len(s.order)-1 || len(s.order) == 0 { - s.order = append(s.order, ids...) - } else { - s.order = append(s.order[:i+1], append(ids, s.order[i+1:]...)...) - } - - default: - return fmt.Errorf("invalid position, %v", int(pos)) - } - - return nil -} - -func (s *relativeOrder) has(id string) (i int, found bool) { - for i := 0; i < len(s.order); i++ { - if s.order[i] == id { - return i, true - } - } - return 0, false -} diff --git a/vendor/github.com/aws/smithy-go/middleware/stack.go b/vendor/github.com/aws/smithy-go/middleware/stack.go deleted file mode 100644 index 45ccb5b93c..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/stack.go +++ /dev/null @@ -1,209 +0,0 @@ -package middleware - -import ( - "context" - "io" - "strings" -) - -// Stack provides protocol and transport agnostic set of middleware split into -// distinct steps. Steps have specific transitions between them, that are -// managed by the individual step. -// -// Steps are composed as middleware around the underlying handler in the -// following order: -// -// Initialize -> Serialize -> Build -> Finalize -> Deserialize -> Handler -// -// Any middleware within the chain may choose to stop and return an error or -// response. Since the middleware decorate the handler like a call stack, each -// middleware will receive the result of the next middleware in the chain. -// Middleware that does not need to react to an input, or result must forward -// along the input down the chain, or return the result back up the chain. -// -// Initialize <- Serialize -> Build -> Finalize <- Deserialize <- Handler -type Stack struct { - // Initialize prepares the input, and sets any default parameters as - // needed, (e.g. idempotency token, and presigned URLs). - // - // Takes Input Parameters, and returns result or error. - // - // Receives result or error from Serialize step. - Initialize *InitializeStep - - // Serialize serializes the prepared input into a data structure that can be consumed - // by the target transport's message, (e.g. REST-JSON serialization) - // - // Converts Input Parameters into a Request, and returns the result or error. - // - // Receives result or error from Build step. - Serialize *SerializeStep - - // Build adds additional metadata to the serialized transport message - // (e.g. HTTP's Content-Length header, or body checksum). Decorations and - // modifications to the message should be copied to all message attempts. - // - // Takes Request, and returns result or error. - // - // Receives result or error from Finalize step. - Build *BuildStep - - // Finalize performs final preparations needed before sending the message. The - // message should already be complete by this stage, and is only alternated - // to meet the expectations of the recipient (e.g. Retry and AWS SigV4 - // request signing) - // - // Takes Request, and returns result or error. - // - // Receives result or error from Deserialize step. - Finalize *FinalizeStep - - // Deserialize reacts to the handler's response returned by the recipient of the request - // message. Deserializes the response into a structured type or error above - // stacks can react to. - // - // Should only forward Request to underlying handler. - // - // Takes Request, and returns result or error. - // - // Receives raw response, or error from underlying handler. - Deserialize *DeserializeStep - - id string -} - -// NewStack returns an initialize empty stack. -func NewStack(id string, newRequestFn func() interface{}) *Stack { - return &Stack{ - id: id, - Initialize: NewInitializeStep(), - Serialize: NewSerializeStep(newRequestFn), - Build: NewBuildStep(), - Finalize: NewFinalizeStep(), - Deserialize: NewDeserializeStep(), - } -} - -// ID returns the unique ID for the stack as a middleware. -func (s *Stack) ID() string { return s.id } - -// HandleMiddleware invokes the middleware stack decorating the next handler. -// Each step of stack will be invoked in order before calling the next step. -// With the next handler call last. -// -// The input value must be the input parameters of the operation being -// performed. -// -// Will return the result of the operation, or error. -func (s *Stack) HandleMiddleware(ctx context.Context, input interface{}, next Handler) ( - output interface{}, metadata Metadata, err error, -) { - h := DecorateHandler(next, - s.Initialize, - s.Serialize, - s.Build, - s.Finalize, - s.Deserialize, - ) - - return h.Handle(ctx, input) -} - -// List returns a list of all middleware in the stack by step. -func (s *Stack) List() []string { - var l []string - l = append(l, s.id) - - l = append(l, s.Initialize.ID()) - l = append(l, s.Initialize.List()...) - - l = append(l, s.Serialize.ID()) - l = append(l, s.Serialize.List()...) - - l = append(l, s.Build.ID()) - l = append(l, s.Build.List()...) - - l = append(l, s.Finalize.ID()) - l = append(l, s.Finalize.List()...) - - l = append(l, s.Deserialize.ID()) - l = append(l, s.Deserialize.List()...) - - return l -} - -func (s *Stack) String() string { - var b strings.Builder - - w := &indentWriter{w: &b} - - w.WriteLine(s.id) - w.Push() - - writeStepItems(w, s.Initialize) - writeStepItems(w, s.Serialize) - writeStepItems(w, s.Build) - writeStepItems(w, s.Finalize) - writeStepItems(w, s.Deserialize) - - return b.String() -} - -type stackStepper interface { - ID() string - List() []string -} - -func writeStepItems(w *indentWriter, s stackStepper) { - type lister interface { - List() []string - } - - w.WriteLine(s.ID()) - w.Push() - - defer w.Pop() - - // ignore stack to prevent circular iterations - if _, ok := s.(*Stack); ok { - return - } - - for _, id := range s.List() { - w.WriteLine(id) - } -} - -type stringWriter interface { - io.Writer - WriteString(string) (int, error) - WriteRune(rune) (int, error) -} - -type indentWriter struct { - w stringWriter - depth int -} - -const indentDepth = "\t\t\t\t\t\t\t\t\t\t" - -func (w *indentWriter) Push() { - w.depth++ -} - -func (w *indentWriter) Pop() { - w.depth-- - if w.depth < 0 { - w.depth = 0 - } -} - -func (w *indentWriter) WriteLine(v string) { - w.w.WriteString(indentDepth[:w.depth]) - - v = strings.ReplaceAll(v, "\n", "\\n") - v = strings.ReplaceAll(v, "\r", "\\r") - - w.w.WriteString(v) - w.w.WriteRune('\n') -} diff --git a/vendor/github.com/aws/smithy-go/middleware/stack_values.go b/vendor/github.com/aws/smithy-go/middleware/stack_values.go deleted file mode 100644 index ef96009ba1..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/stack_values.go +++ /dev/null @@ -1,100 +0,0 @@ -package middleware - -import ( - "context" - "reflect" - "strings" -) - -// WithStackValue adds a key value pair to the context that is intended to be -// scoped to a stack. Use ClearStackValues to get a new context with all stack -// values cleared. -func WithStackValue(ctx context.Context, key, value interface{}) context.Context { - md, _ := ctx.Value(stackValuesKey{}).(*stackValues) - - md = withStackValue(md, key, value) - return context.WithValue(ctx, stackValuesKey{}, md) -} - -// ClearStackValues returns a context without any stack values. -func ClearStackValues(ctx context.Context) context.Context { - return context.WithValue(ctx, stackValuesKey{}, nil) -} - -// GetStackValues returns the value pointed to by the key within the stack -// values, if it is present. -func GetStackValue(ctx context.Context, key interface{}) interface{} { - md, _ := ctx.Value(stackValuesKey{}).(*stackValues) - if md == nil { - return nil - } - - return md.Value(key) -} - -type stackValuesKey struct{} - -type stackValues struct { - key interface{} - value interface{} - parent *stackValues -} - -func withStackValue(parent *stackValues, key, value interface{}) *stackValues { - if key == nil { - panic("nil key") - } - if !reflect.TypeOf(key).Comparable() { - panic("key is not comparable") - } - return &stackValues{key: key, value: value, parent: parent} -} - -func (m *stackValues) Value(key interface{}) interface{} { - if key == m.key { - return m.value - } - - if m.parent == nil { - return nil - } - - return m.parent.Value(key) -} - -func (c *stackValues) String() string { - var str strings.Builder - - cc := c - for cc == nil { - str.WriteString("(" + - reflect.TypeOf(c.key).String() + - ": " + - stringify(cc.value) + - ")") - if cc.parent != nil { - str.WriteString(" -> ") - } - cc = cc.parent - } - str.WriteRune('}') - - return str.String() -} - -type stringer interface { - String() string -} - -// stringify tries a bit to stringify v, without using fmt, since we don't -// want context depending on the unicode tables. This is only used by -// *valueCtx.String(). -func stringify(v interface{}) string { - switch s := v.(type) { - case stringer: - return s.String() - case string: - return s - } - return "" -} diff --git a/vendor/github.com/aws/smithy-go/middleware/step_build.go b/vendor/github.com/aws/smithy-go/middleware/step_build.go deleted file mode 100644 index 7e1d94caee..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_build.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import ( - "context" -) - -// BuildInput provides the input parameters for the BuildMiddleware to consume. -// BuildMiddleware may modify the Request value before forwarding the input -// along to the next BuildHandler. -type BuildInput struct { - Request interface{} -} - -// BuildOutput provides the result returned by the next BuildHandler. -type BuildOutput struct { - Result interface{} -} - -// BuildHandler provides the interface for the next handler the -// BuildMiddleware will call in the middleware chain. -type BuildHandler interface { - HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, - ) -} - -// BuildMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next BuildHandler for further -// processing. -type BuildMiddleware interface { - // Unique ID for the middleware in theBuildStep. The step does not allow - // duplicate IDs. - ID() string - - // Invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( - out BuildOutput, metadata Metadata, err error, - ) -} - -// BuildMiddlewareFunc returns a BuildMiddleware with the unique ID provided, -// and the func to be invoked. -func BuildMiddlewareFunc(id string, fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error)) BuildMiddleware { - return buildMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type buildMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, BuildInput, BuildHandler) (BuildOutput, Metadata, error) -} - -// ID returns the unique ID for the middleware. -func (s buildMiddlewareFunc) ID() string { return s.id } - -// HandleBuild invokes the middleware Fn. -func (s buildMiddlewareFunc) HandleBuild(ctx context.Context, in BuildInput, next BuildHandler) ( - out BuildOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ BuildMiddleware = (buildMiddlewareFunc{}) - -// BuildStep provides the ordered grouping of BuildMiddleware to be invoked on -// a handler. -type BuildStep struct { - ids *orderedIDs -} - -// NewBuildStep returns a BuildStep ready to have middleware for -// initialization added to it. -func NewBuildStep() *BuildStep { - return &BuildStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*BuildStep)(nil) - -// ID returns the unique name of the step as a middleware. -func (s *BuildStep) ID() string { - return "Build stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *BuildStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h BuildHandler = buildWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedBuildHandler{ - Next: h, - With: order[i].(BuildMiddleware), - } - } - - sIn := BuildInput{ - Request: in, - } - - res, metadata, err := h.HandleBuild(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *BuildStep) Get(id string) (BuildMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(BuildMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *BuildStep) Add(m BuildMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware id. -// Returns an error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *BuildStep) Insert(m BuildMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or an error if the middleware to be removed -// doesn't exist. -func (s *BuildStep) Swap(id string, m BuildMiddleware) (BuildMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(BuildMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *BuildStep) Remove(id string) (BuildMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(BuildMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *BuildStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *BuildStep) Clear() { - s.ids.Clear() -} - -type buildWrapHandler struct { - Next Handler -} - -var _ BuildHandler = (*buildWrapHandler)(nil) - -// Implements BuildHandler, converts types and delegates to underlying -// generic handler. -func (w buildWrapHandler) HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return BuildOutput{ - Result: res, - }, metadata, err -} - -type decoratedBuildHandler struct { - Next BuildHandler - With BuildMiddleware -} - -var _ BuildHandler = (*decoratedBuildHandler)(nil) - -func (h decoratedBuildHandler) HandleBuild(ctx context.Context, in BuildInput) ( - out BuildOutput, metadata Metadata, err error, -) { - return h.With.HandleBuild(ctx, in, h.Next) -} - -// BuildHandlerFunc provides a wrapper around a function to be used as a build middleware handler. -type BuildHandlerFunc func(context.Context, BuildInput) (BuildOutput, Metadata, error) - -// HandleBuild invokes the wrapped function with the provided arguments. -func (b BuildHandlerFunc) HandleBuild(ctx context.Context, in BuildInput) (BuildOutput, Metadata, error) { - return b(ctx, in) -} - -var _ BuildHandler = BuildHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go b/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go deleted file mode 100644 index 4486072157..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_deserialize.go +++ /dev/null @@ -1,217 +0,0 @@ -package middleware - -import ( - "context" -) - -// DeserializeInput provides the input parameters for the DeserializeInput to -// consume. DeserializeMiddleware should not modify the Request, and instead -// forward it along to the next DeserializeHandler. -type DeserializeInput struct { - Request interface{} -} - -// DeserializeOutput provides the result returned by the next -// DeserializeHandler. The DeserializeMiddleware should deserialize the -// RawResponse into a Result that can be consumed by middleware higher up in -// the stack. -type DeserializeOutput struct { - RawResponse interface{} - Result interface{} -} - -// DeserializeHandler provides the interface for the next handler the -// DeserializeMiddleware will call in the middleware chain. -type DeserializeHandler interface { - HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, - ) -} - -// DeserializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next DeserializeHandler for further -// processing. -type DeserializeMiddleware interface { - // ID returns a unique ID for the middleware in the DeserializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleDeserialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) ( - out DeserializeOutput, metadata Metadata, err error, - ) -} - -// DeserializeMiddlewareFunc returns a DeserializeMiddleware with the unique ID -// provided, and the func to be invoked. -func DeserializeMiddlewareFunc(id string, fn func(context.Context, DeserializeInput, DeserializeHandler) (DeserializeOutput, Metadata, error)) DeserializeMiddleware { - return deserializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type deserializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, DeserializeInput, DeserializeHandler) ( - DeserializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s deserializeMiddlewareFunc) ID() string { return s.id } - -// HandleDeserialize invokes the middleware Fn. -func (s deserializeMiddlewareFunc) HandleDeserialize(ctx context.Context, in DeserializeInput, next DeserializeHandler) ( - out DeserializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ DeserializeMiddleware = (deserializeMiddlewareFunc{}) - -// DeserializeStep provides the ordered grouping of DeserializeMiddleware to be -// invoked on a handler. -type DeserializeStep struct { - ids *orderedIDs -} - -// NewDeserializeStep returns a DeserializeStep ready to have middleware for -// initialization added to it. -func NewDeserializeStep() *DeserializeStep { - return &DeserializeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*DeserializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *DeserializeStep) ID() string { - return "Deserialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *DeserializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h DeserializeHandler = deserializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedDeserializeHandler{ - Next: h, - With: order[i].(DeserializeMiddleware), - } - } - - sIn := DeserializeInput{ - Request: in, - } - - res, metadata, err := h.HandleDeserialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *DeserializeStep) Get(id string) (DeserializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(DeserializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *DeserializeStep) Add(m DeserializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *DeserializeStep) Insert(m DeserializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *DeserializeStep) Swap(id string, m DeserializeMiddleware) (DeserializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(DeserializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *DeserializeStep) Remove(id string) (DeserializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(DeserializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *DeserializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *DeserializeStep) Clear() { - s.ids.Clear() -} - -type deserializeWrapHandler struct { - Next Handler -} - -var _ DeserializeHandler = (*deserializeWrapHandler)(nil) - -// HandleDeserialize implements DeserializeHandler, converts types and delegates to underlying -// generic handler. -func (w deserializeWrapHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, -) { - resp, metadata, err := w.Next.Handle(ctx, in.Request) - return DeserializeOutput{ - RawResponse: resp, - }, metadata, err -} - -type decoratedDeserializeHandler struct { - Next DeserializeHandler - With DeserializeMiddleware -} - -var _ DeserializeHandler = (*decoratedDeserializeHandler)(nil) - -func (h decoratedDeserializeHandler) HandleDeserialize(ctx context.Context, in DeserializeInput) ( - out DeserializeOutput, metadata Metadata, err error, -) { - return h.With.HandleDeserialize(ctx, in, h.Next) -} - -// DeserializeHandlerFunc provides a wrapper around a function to be used as a deserialize middleware handler. -type DeserializeHandlerFunc func(context.Context, DeserializeInput) (DeserializeOutput, Metadata, error) - -// HandleDeserialize invokes the wrapped function with the given arguments. -func (d DeserializeHandlerFunc) HandleDeserialize(ctx context.Context, in DeserializeInput) (DeserializeOutput, Metadata, error) { - return d(ctx, in) -} - -var _ DeserializeHandler = DeserializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go b/vendor/github.com/aws/smithy-go/middleware/step_finalize.go deleted file mode 100644 index 065e3885de..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_finalize.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import "context" - -// FinalizeInput provides the input parameters for the FinalizeMiddleware to -// consume. FinalizeMiddleware may modify the Request value before forwarding -// the FinalizeInput along to the next next FinalizeHandler. -type FinalizeInput struct { - Request interface{} -} - -// FinalizeOutput provides the result returned by the next FinalizeHandler. -type FinalizeOutput struct { - Result interface{} -} - -// FinalizeHandler provides the interface for the next handler the -// FinalizeMiddleware will call in the middleware chain. -type FinalizeHandler interface { - HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, - ) -} - -// FinalizeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next FinalizeHandler for further -// processing. -type FinalizeMiddleware interface { - // ID returns a unique ID for the middleware in the FinalizeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleFinalize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) ( - out FinalizeOutput, metadata Metadata, err error, - ) -} - -// FinalizeMiddlewareFunc returns a FinalizeMiddleware with the unique ID -// provided, and the func to be invoked. -func FinalizeMiddlewareFunc(id string, fn func(context.Context, FinalizeInput, FinalizeHandler) (FinalizeOutput, Metadata, error)) FinalizeMiddleware { - return finalizeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type finalizeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, FinalizeInput, FinalizeHandler) ( - FinalizeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s finalizeMiddlewareFunc) ID() string { return s.id } - -// HandleFinalize invokes the middleware Fn. -func (s finalizeMiddlewareFunc) HandleFinalize(ctx context.Context, in FinalizeInput, next FinalizeHandler) ( - out FinalizeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ FinalizeMiddleware = (finalizeMiddlewareFunc{}) - -// FinalizeStep provides the ordered grouping of FinalizeMiddleware to be -// invoked on a handler. -type FinalizeStep struct { - ids *orderedIDs -} - -// NewFinalizeStep returns a FinalizeStep ready to have middleware for -// initialization added to it. -func NewFinalizeStep() *FinalizeStep { - return &FinalizeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*FinalizeStep)(nil) - -// ID returns the unique id of the step as a middleware. -func (s *FinalizeStep) ID() string { - return "Finalize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *FinalizeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h FinalizeHandler = finalizeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedFinalizeHandler{ - Next: h, - With: order[i].(FinalizeMiddleware), - } - } - - sIn := FinalizeInput{ - Request: in, - } - - res, metadata, err := h.HandleFinalize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *FinalizeStep) Get(id string) (FinalizeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(FinalizeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *FinalizeStep) Add(m FinalizeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *FinalizeStep) Insert(m FinalizeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *FinalizeStep) Swap(id string, m FinalizeMiddleware) (FinalizeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(FinalizeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *FinalizeStep) Remove(id string) (FinalizeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(FinalizeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *FinalizeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *FinalizeStep) Clear() { - s.ids.Clear() -} - -type finalizeWrapHandler struct { - Next Handler -} - -var _ FinalizeHandler = (*finalizeWrapHandler)(nil) - -// HandleFinalize implements FinalizeHandler, converts types and delegates to underlying -// generic handler. -func (w finalizeWrapHandler) HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return FinalizeOutput{ - Result: res, - }, metadata, err -} - -type decoratedFinalizeHandler struct { - Next FinalizeHandler - With FinalizeMiddleware -} - -var _ FinalizeHandler = (*decoratedFinalizeHandler)(nil) - -func (h decoratedFinalizeHandler) HandleFinalize(ctx context.Context, in FinalizeInput) ( - out FinalizeOutput, metadata Metadata, err error, -) { - return h.With.HandleFinalize(ctx, in, h.Next) -} - -// FinalizeHandlerFunc provides a wrapper around a function to be used as a finalize middleware handler. -type FinalizeHandlerFunc func(context.Context, FinalizeInput) (FinalizeOutput, Metadata, error) - -// HandleFinalize invokes the wrapped function with the given arguments. -func (f FinalizeHandlerFunc) HandleFinalize(ctx context.Context, in FinalizeInput) (FinalizeOutput, Metadata, error) { - return f(ctx, in) -} - -var _ FinalizeHandler = FinalizeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go b/vendor/github.com/aws/smithy-go/middleware/step_initialize.go deleted file mode 100644 index fe359144d2..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_initialize.go +++ /dev/null @@ -1,211 +0,0 @@ -package middleware - -import "context" - -// InitializeInput wraps the input parameters for the InitializeMiddlewares to -// consume. InitializeMiddleware may modify the parameter value before -// forwarding it along to the next InitializeHandler. -type InitializeInput struct { - Parameters interface{} -} - -// InitializeOutput provides the result returned by the next InitializeHandler. -type InitializeOutput struct { - Result interface{} -} - -// InitializeHandler provides the interface for the next handler the -// InitializeMiddleware will call in the middleware chain. -type InitializeHandler interface { - HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, - ) -} - -// InitializeMiddleware provides the interface for middleware specific to the -// initialize step. Delegates to the next InitializeHandler for further -// processing. -type InitializeMiddleware interface { - // ID returns a unique ID for the middleware in the InitializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleInitialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, - ) -} - -// InitializeMiddlewareFunc returns a InitializeMiddleware with the unique ID provided, -// and the func to be invoked. -func InitializeMiddlewareFunc(id string, fn func(context.Context, InitializeInput, InitializeHandler) (InitializeOutput, Metadata, error)) InitializeMiddleware { - return initializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type initializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, InitializeInput, InitializeHandler) ( - InitializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s initializeMiddlewareFunc) ID() string { return s.id } - -// HandleInitialize invokes the middleware Fn. -func (s initializeMiddlewareFunc) HandleInitialize(ctx context.Context, in InitializeInput, next InitializeHandler) ( - out InitializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ InitializeMiddleware = (initializeMiddlewareFunc{}) - -// InitializeStep provides the ordered grouping of InitializeMiddleware to be -// invoked on a handler. -type InitializeStep struct { - ids *orderedIDs -} - -// NewInitializeStep returns an InitializeStep ready to have middleware for -// initialization added to it. -func NewInitializeStep() *InitializeStep { - return &InitializeStep{ - ids: newOrderedIDs(), - } -} - -var _ Middleware = (*InitializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *InitializeStep) ID() string { - return "Initialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *InitializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h InitializeHandler = initializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedInitializeHandler{ - Next: h, - With: order[i].(InitializeMiddleware), - } - } - - sIn := InitializeInput{ - Parameters: in, - } - - res, metadata, err := h.HandleInitialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *InitializeStep) Get(id string) (InitializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(InitializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *InitializeStep) Add(m InitializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *InitializeStep) Insert(m InitializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *InitializeStep) Swap(id string, m InitializeMiddleware) (InitializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(InitializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *InitializeStep) Remove(id string) (InitializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(InitializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *InitializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *InitializeStep) Clear() { - s.ids.Clear() -} - -type initializeWrapHandler struct { - Next Handler -} - -var _ InitializeHandler = (*initializeWrapHandler)(nil) - -// HandleInitialize implements InitializeHandler, converts types and delegates to underlying -// generic handler. -func (w initializeWrapHandler) HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Parameters) - return InitializeOutput{ - Result: res, - }, metadata, err -} - -type decoratedInitializeHandler struct { - Next InitializeHandler - With InitializeMiddleware -} - -var _ InitializeHandler = (*decoratedInitializeHandler)(nil) - -func (h decoratedInitializeHandler) HandleInitialize(ctx context.Context, in InitializeInput) ( - out InitializeOutput, metadata Metadata, err error, -) { - return h.With.HandleInitialize(ctx, in, h.Next) -} - -// InitializeHandlerFunc provides a wrapper around a function to be used as an initialize middleware handler. -type InitializeHandlerFunc func(context.Context, InitializeInput) (InitializeOutput, Metadata, error) - -// HandleInitialize calls the wrapped function with the provided arguments. -func (i InitializeHandlerFunc) HandleInitialize(ctx context.Context, in InitializeInput) (InitializeOutput, Metadata, error) { - return i(ctx, in) -} - -var _ InitializeHandler = InitializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go b/vendor/github.com/aws/smithy-go/middleware/step_serialize.go deleted file mode 100644 index 114bafcede..0000000000 --- a/vendor/github.com/aws/smithy-go/middleware/step_serialize.go +++ /dev/null @@ -1,219 +0,0 @@ -package middleware - -import "context" - -// SerializeInput provides the input parameters for the SerializeMiddleware to -// consume. SerializeMiddleware may modify the Request value before forwarding -// SerializeInput along to the next SerializeHandler. The Parameters member -// should not be modified by SerializeMiddleware, InitializeMiddleware should -// be responsible for modifying the provided Parameter value. -type SerializeInput struct { - Parameters interface{} - Request interface{} -} - -// SerializeOutput provides the result returned by the next SerializeHandler. -type SerializeOutput struct { - Result interface{} -} - -// SerializeHandler provides the interface for the next handler the -// SerializeMiddleware will call in the middleware chain. -type SerializeHandler interface { - HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, - ) -} - -// SerializeMiddleware provides the interface for middleware specific to the -// serialize step. Delegates to the next SerializeHandler for further -// processing. -type SerializeMiddleware interface { - // ID returns a unique ID for the middleware in the SerializeStep. The step does not - // allow duplicate IDs. - ID() string - - // HandleSerialize invokes the middleware behavior which must delegate to the next handler - // for the middleware chain to continue. The method must return a result or - // error to its caller. - HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) ( - out SerializeOutput, metadata Metadata, err error, - ) -} - -// SerializeMiddlewareFunc returns a SerializeMiddleware with the unique ID -// provided, and the func to be invoked. -func SerializeMiddlewareFunc(id string, fn func(context.Context, SerializeInput, SerializeHandler) (SerializeOutput, Metadata, error)) SerializeMiddleware { - return serializeMiddlewareFunc{ - id: id, - fn: fn, - } -} - -type serializeMiddlewareFunc struct { - // Unique ID for the middleware. - id string - - // Middleware function to be called. - fn func(context.Context, SerializeInput, SerializeHandler) ( - SerializeOutput, Metadata, error, - ) -} - -// ID returns the unique ID for the middleware. -func (s serializeMiddlewareFunc) ID() string { return s.id } - -// HandleSerialize invokes the middleware Fn. -func (s serializeMiddlewareFunc) HandleSerialize(ctx context.Context, in SerializeInput, next SerializeHandler) ( - out SerializeOutput, metadata Metadata, err error, -) { - return s.fn(ctx, in, next) -} - -var _ SerializeMiddleware = (serializeMiddlewareFunc{}) - -// SerializeStep provides the ordered grouping of SerializeMiddleware to be -// invoked on a handler. -type SerializeStep struct { - newRequest func() interface{} - ids *orderedIDs -} - -// NewSerializeStep returns a SerializeStep ready to have middleware for -// initialization added to it. The newRequest func parameter is used to -// initialize the transport specific request for the stack SerializeStep to -// serialize the input parameters into. -func NewSerializeStep(newRequest func() interface{}) *SerializeStep { - return &SerializeStep{ - ids: newOrderedIDs(), - newRequest: newRequest, - } -} - -var _ Middleware = (*SerializeStep)(nil) - -// ID returns the unique ID of the step as a middleware. -func (s *SerializeStep) ID() string { - return "Serialize stack step" -} - -// HandleMiddleware invokes the middleware by decorating the next handler -// provided. Returns the result of the middleware and handler being invoked. -// -// Implements Middleware interface. -func (s *SerializeStep) HandleMiddleware(ctx context.Context, in interface{}, next Handler) ( - out interface{}, metadata Metadata, err error, -) { - order := s.ids.GetOrder() - - var h SerializeHandler = serializeWrapHandler{Next: next} - for i := len(order) - 1; i >= 0; i-- { - h = decoratedSerializeHandler{ - Next: h, - With: order[i].(SerializeMiddleware), - } - } - - sIn := SerializeInput{ - Parameters: in, - Request: s.newRequest(), - } - - res, metadata, err := h.HandleSerialize(ctx, sIn) - return res.Result, metadata, err -} - -// Get retrieves the middleware identified by id. If the middleware is not present, returns false. -func (s *SerializeStep) Get(id string) (SerializeMiddleware, bool) { - get, ok := s.ids.Get(id) - if !ok { - return nil, false - } - return get.(SerializeMiddleware), ok -} - -// Add injects the middleware to the relative position of the middleware group. -// Returns an error if the middleware already exists. -func (s *SerializeStep) Add(m SerializeMiddleware, pos RelativePosition) error { - return s.ids.Add(m, pos) -} - -// Insert injects the middleware relative to an existing middleware ID. -// Returns error if the original middleware does not exist, or the middleware -// being added already exists. -func (s *SerializeStep) Insert(m SerializeMiddleware, relativeTo string, pos RelativePosition) error { - return s.ids.Insert(m, relativeTo, pos) -} - -// Swap removes the middleware by id, replacing it with the new middleware. -// Returns the middleware removed, or error if the middleware to be removed -// doesn't exist. -func (s *SerializeStep) Swap(id string, m SerializeMiddleware) (SerializeMiddleware, error) { - removed, err := s.ids.Swap(id, m) - if err != nil { - return nil, err - } - - return removed.(SerializeMiddleware), nil -} - -// Remove removes the middleware by id. Returns error if the middleware -// doesn't exist. -func (s *SerializeStep) Remove(id string) (SerializeMiddleware, error) { - removed, err := s.ids.Remove(id) - if err != nil { - return nil, err - } - - return removed.(SerializeMiddleware), nil -} - -// List returns a list of the middleware in the step. -func (s *SerializeStep) List() []string { - return s.ids.List() -} - -// Clear removes all middleware in the step. -func (s *SerializeStep) Clear() { - s.ids.Clear() -} - -type serializeWrapHandler struct { - Next Handler -} - -var _ SerializeHandler = (*serializeWrapHandler)(nil) - -// Implements SerializeHandler, converts types and delegates to underlying -// generic handler. -func (w serializeWrapHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, -) { - res, metadata, err := w.Next.Handle(ctx, in.Request) - return SerializeOutput{ - Result: res, - }, metadata, err -} - -type decoratedSerializeHandler struct { - Next SerializeHandler - With SerializeMiddleware -} - -var _ SerializeHandler = (*decoratedSerializeHandler)(nil) - -func (h decoratedSerializeHandler) HandleSerialize(ctx context.Context, in SerializeInput) ( - out SerializeOutput, metadata Metadata, err error, -) { - return h.With.HandleSerialize(ctx, in, h.Next) -} - -// SerializeHandlerFunc provides a wrapper around a function to be used as a serialize middleware handler. -type SerializeHandlerFunc func(context.Context, SerializeInput) (SerializeOutput, Metadata, error) - -// HandleSerialize calls the wrapped function with the provided arguments. -func (s SerializeHandlerFunc) HandleSerialize(ctx context.Context, in SerializeInput) (SerializeOutput, Metadata, error) { - return s(ctx, in) -} - -var _ SerializeHandler = SerializeHandlerFunc(nil) diff --git a/vendor/github.com/aws/smithy-go/modman.toml b/vendor/github.com/aws/smithy-go/modman.toml deleted file mode 100644 index aac582fa2c..0000000000 --- a/vendor/github.com/aws/smithy-go/modman.toml +++ /dev/null @@ -1,9 +0,0 @@ -[dependencies] - -[modules] - - [modules.codegen] - no_tag = true - - [modules."codegen/smithy-go-codegen/build/test-generated/go/internal/testmodule"] - no_tag = true diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go b/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go deleted file mode 100644 index 004d78f213..0000000000 --- a/vendor/github.com/aws/smithy-go/private/requestcompression/gzip.go +++ /dev/null @@ -1,30 +0,0 @@ -package requestcompression - -import ( - "bytes" - "compress/gzip" - "fmt" - "io" -) - -func gzipCompress(input io.Reader) ([]byte, error) { - var b bytes.Buffer - w, err := gzip.NewWriterLevel(&b, gzip.DefaultCompression) - if err != nil { - return nil, fmt.Errorf("failed to create gzip writer, %v", err) - } - - inBytes, err := io.ReadAll(input) - if err != nil { - return nil, fmt.Errorf("failed read payload to compress, %v", err) - } - - if _, err = w.Write(inBytes); err != nil { - return nil, fmt.Errorf("failed to write payload to be compressed, %v", err) - } - if err = w.Close(); err != nil { - return nil, fmt.Errorf("failed to flush payload being compressed, %v", err) - } - - return b.Bytes(), nil -} diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go b/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go deleted file mode 100644 index 06c16afc11..0000000000 --- a/vendor/github.com/aws/smithy-go/private/requestcompression/middleware_capture_request_compression.go +++ /dev/null @@ -1,52 +0,0 @@ -package requestcompression - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "net/http" -) - -const captureUncompressedRequestID = "CaptureUncompressedRequest" - -// AddCaptureUncompressedRequestMiddleware captures http request before compress encoding for check -func AddCaptureUncompressedRequestMiddleware(stack *middleware.Stack, buf *bytes.Buffer) error { - return stack.Serialize.Insert(&captureUncompressedRequestMiddleware{ - buf: buf, - }, "RequestCompression", middleware.Before) -} - -type captureUncompressedRequestMiddleware struct { - req *http.Request - buf *bytes.Buffer - bytes []byte -} - -// ID returns id of the captureUncompressedRequestMiddleware -func (*captureUncompressedRequestMiddleware) ID() string { - return captureUncompressedRequestID -} - -// HandleSerialize captures request payload before it is compressed by request compression middleware -func (m *captureUncompressedRequestMiddleware) HandleSerialize(ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler, -) ( - output middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - request, ok := input.Request.(*smithyhttp.Request) - if !ok { - return output, metadata, fmt.Errorf("error when retrieving http request") - } - - _, err = io.Copy(m.buf, request.GetStream()) - if err != nil { - return output, metadata, fmt.Errorf("error when copying http request stream: %q", err) - } - if err = request.RewindStream(); err != nil { - return output, metadata, fmt.Errorf("error when rewinding request stream: %q", err) - } - - return next.HandleSerialize(ctx, input) -} diff --git a/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go b/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go deleted file mode 100644 index 7c41476039..0000000000 --- a/vendor/github.com/aws/smithy-go/private/requestcompression/request_compression.go +++ /dev/null @@ -1,103 +0,0 @@ -// Package requestcompression implements runtime support for smithy-modeled -// request compression. -// -// This package is designated as private and is intended for use only by the -// smithy client runtime. The exported API therein is not considered stable and -// is subject to breaking changes without notice. -package requestcompression - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/transport/http" - "io" -) - -const MaxRequestMinCompressSizeBytes = 10485760 - -// Enumeration values for supported compress Algorithms. -const ( - GZIP = "gzip" -) - -type compressFunc func(io.Reader) ([]byte, error) - -var allowedAlgorithms = map[string]compressFunc{ - GZIP: gzipCompress, -} - -// AddRequestCompression add requestCompression middleware to op stack -func AddRequestCompression(stack *middleware.Stack, disabled bool, minBytes int64, algorithms []string) error { - return stack.Serialize.Add(&requestCompression{ - disableRequestCompression: disabled, - requestMinCompressSizeBytes: minBytes, - compressAlgorithms: algorithms, - }, middleware.After) -} - -type requestCompression struct { - disableRequestCompression bool - requestMinCompressSizeBytes int64 - compressAlgorithms []string -} - -// ID returns the ID of the middleware -func (m requestCompression) ID() string { - return "RequestCompression" -} - -// HandleSerialize gzip compress the request's stream/body if enabled by config fields -func (m requestCompression) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if m.disableRequestCompression { - return next.HandleSerialize(ctx, in) - } - // still need to check requestMinCompressSizeBytes in case it is out of range after service client config - if m.requestMinCompressSizeBytes < 0 || m.requestMinCompressSizeBytes > MaxRequestMinCompressSizeBytes { - return out, metadata, fmt.Errorf("invalid range for min request compression size bytes %d, must be within 0 and 10485760 inclusively", m.requestMinCompressSizeBytes) - } - - req, ok := in.Request.(*http.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - for _, algorithm := range m.compressAlgorithms { - compressFunc := allowedAlgorithms[algorithm] - if compressFunc != nil { - if stream := req.GetStream(); stream != nil { - size, found, err := req.StreamLength() - if err != nil { - return out, metadata, fmt.Errorf("error while finding request stream length, %v", err) - } else if !found || size < m.requestMinCompressSizeBytes { - return next.HandleSerialize(ctx, in) - } - - compressedBytes, err := compressFunc(stream) - if err != nil { - return out, metadata, fmt.Errorf("failed to compress request stream, %v", err) - } - - var newReq *http.Request - if newReq, err = req.SetStream(bytes.NewReader(compressedBytes)); err != nil { - return out, metadata, fmt.Errorf("failed to set request stream, %v", err) - } - *req = *newReq - - if val := req.Header.Get("Content-Encoding"); val != "" { - req.Header.Set("Content-Encoding", fmt.Sprintf("%s, %s", val, algorithm)) - } else { - req.Header.Set("Content-Encoding", algorithm) - } - } - break - } - } - - return next.HandleSerialize(ctx, in) -} diff --git a/vendor/github.com/aws/smithy-go/properties.go b/vendor/github.com/aws/smithy-go/properties.go deleted file mode 100644 index 68df4c4e0e..0000000000 --- a/vendor/github.com/aws/smithy-go/properties.go +++ /dev/null @@ -1,69 +0,0 @@ -package smithy - -import "maps" - -// PropertiesReader provides an interface for reading metadata from the -// underlying metadata container. -type PropertiesReader interface { - Get(key any) any -} - -// Properties provides storing and reading metadata values. Keys may be any -// comparable value type. Get and Set will panic if a key is not comparable. -// -// The zero value for a Properties instance is ready for reads/writes without -// any additional initialization. -type Properties struct { - values map[any]any -} - -// Get attempts to retrieve the value the key points to. Returns nil if the -// key was not found. -// -// Panics if key type is not comparable. -func (m *Properties) Get(key any) any { - m.lazyInit() - return m.values[key] -} - -// Set stores the value pointed to by the key. If a value already exists at -// that key it will be replaced with the new value. -// -// Panics if the key type is not comparable. -func (m *Properties) Set(key, value any) { - m.lazyInit() - m.values[key] = value -} - -// Has returns whether the key exists in the metadata. -// -// Panics if the key type is not comparable. -func (m *Properties) Has(key any) bool { - m.lazyInit() - _, ok := m.values[key] - return ok -} - -// SetAll accepts all of the given Properties into the receiver, overwriting -// any existing keys in the case of conflicts. -func (m *Properties) SetAll(other *Properties) { - if other.values == nil { - return - } - - m.lazyInit() - for k, v := range other.values { - m.values[k] = v - } -} - -// Values returns a shallow clone of the property set's values. -func (m *Properties) Values() map[any]any { - return maps.Clone(m.values) -} - -func (m *Properties) lazyInit() { - if m.values == nil { - m.values = map[any]any{} - } -} diff --git a/vendor/github.com/aws/smithy-go/ptr/doc.go b/vendor/github.com/aws/smithy-go/ptr/doc.go deleted file mode 100644 index bc1f699616..0000000000 --- a/vendor/github.com/aws/smithy-go/ptr/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// Package ptr provides utilities for converting scalar literal type values to and from pointers inline. -package ptr - -//go:generate go run -tags codegen generate.go -//go:generate gofmt -w -s . diff --git a/vendor/github.com/aws/smithy-go/ptr/from_ptr.go b/vendor/github.com/aws/smithy-go/ptr/from_ptr.go deleted file mode 100644 index a2845bb2c8..0000000000 --- a/vendor/github.com/aws/smithy-go/ptr/from_ptr.go +++ /dev/null @@ -1,601 +0,0 @@ -// Code generated by smithy-go/ptr/generate.go DO NOT EDIT. -package ptr - -import ( - "time" -) - -// ToBool returns bool value dereferenced if the passed -// in pointer was not nil. Returns a bool zero value if the -// pointer was nil. -func ToBool(p *bool) (v bool) { - if p == nil { - return v - } - - return *p -} - -// ToBoolSlice returns a slice of bool values, that are -// dereferenced if the passed in pointer was not nil. Returns a bool -// zero value if the pointer was nil. -func ToBoolSlice(vs []*bool) []bool { - ps := make([]bool, len(vs)) - for i, v := range vs { - ps[i] = ToBool(v) - } - - return ps -} - -// ToBoolMap returns a map of bool values, that are -// dereferenced if the passed in pointer was not nil. The bool -// zero value is used if the pointer was nil. -func ToBoolMap(vs map[string]*bool) map[string]bool { - ps := make(map[string]bool, len(vs)) - for k, v := range vs { - ps[k] = ToBool(v) - } - - return ps -} - -// ToByte returns byte value dereferenced if the passed -// in pointer was not nil. Returns a byte zero value if the -// pointer was nil. -func ToByte(p *byte) (v byte) { - if p == nil { - return v - } - - return *p -} - -// ToByteSlice returns a slice of byte values, that are -// dereferenced if the passed in pointer was not nil. Returns a byte -// zero value if the pointer was nil. -func ToByteSlice(vs []*byte) []byte { - ps := make([]byte, len(vs)) - for i, v := range vs { - ps[i] = ToByte(v) - } - - return ps -} - -// ToByteMap returns a map of byte values, that are -// dereferenced if the passed in pointer was not nil. The byte -// zero value is used if the pointer was nil. -func ToByteMap(vs map[string]*byte) map[string]byte { - ps := make(map[string]byte, len(vs)) - for k, v := range vs { - ps[k] = ToByte(v) - } - - return ps -} - -// ToString returns string value dereferenced if the passed -// in pointer was not nil. Returns a string zero value if the -// pointer was nil. -func ToString(p *string) (v string) { - if p == nil { - return v - } - - return *p -} - -// ToStringSlice returns a slice of string values, that are -// dereferenced if the passed in pointer was not nil. Returns a string -// zero value if the pointer was nil. -func ToStringSlice(vs []*string) []string { - ps := make([]string, len(vs)) - for i, v := range vs { - ps[i] = ToString(v) - } - - return ps -} - -// ToStringMap returns a map of string values, that are -// dereferenced if the passed in pointer was not nil. The string -// zero value is used if the pointer was nil. -func ToStringMap(vs map[string]*string) map[string]string { - ps := make(map[string]string, len(vs)) - for k, v := range vs { - ps[k] = ToString(v) - } - - return ps -} - -// ToInt returns int value dereferenced if the passed -// in pointer was not nil. Returns a int zero value if the -// pointer was nil. -func ToInt(p *int) (v int) { - if p == nil { - return v - } - - return *p -} - -// ToIntSlice returns a slice of int values, that are -// dereferenced if the passed in pointer was not nil. Returns a int -// zero value if the pointer was nil. -func ToIntSlice(vs []*int) []int { - ps := make([]int, len(vs)) - for i, v := range vs { - ps[i] = ToInt(v) - } - - return ps -} - -// ToIntMap returns a map of int values, that are -// dereferenced if the passed in pointer was not nil. The int -// zero value is used if the pointer was nil. -func ToIntMap(vs map[string]*int) map[string]int { - ps := make(map[string]int, len(vs)) - for k, v := range vs { - ps[k] = ToInt(v) - } - - return ps -} - -// ToInt8 returns int8 value dereferenced if the passed -// in pointer was not nil. Returns a int8 zero value if the -// pointer was nil. -func ToInt8(p *int8) (v int8) { - if p == nil { - return v - } - - return *p -} - -// ToInt8Slice returns a slice of int8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int8 -// zero value if the pointer was nil. -func ToInt8Slice(vs []*int8) []int8 { - ps := make([]int8, len(vs)) - for i, v := range vs { - ps[i] = ToInt8(v) - } - - return ps -} - -// ToInt8Map returns a map of int8 values, that are -// dereferenced if the passed in pointer was not nil. The int8 -// zero value is used if the pointer was nil. -func ToInt8Map(vs map[string]*int8) map[string]int8 { - ps := make(map[string]int8, len(vs)) - for k, v := range vs { - ps[k] = ToInt8(v) - } - - return ps -} - -// ToInt16 returns int16 value dereferenced if the passed -// in pointer was not nil. Returns a int16 zero value if the -// pointer was nil. -func ToInt16(p *int16) (v int16) { - if p == nil { - return v - } - - return *p -} - -// ToInt16Slice returns a slice of int16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int16 -// zero value if the pointer was nil. -func ToInt16Slice(vs []*int16) []int16 { - ps := make([]int16, len(vs)) - for i, v := range vs { - ps[i] = ToInt16(v) - } - - return ps -} - -// ToInt16Map returns a map of int16 values, that are -// dereferenced if the passed in pointer was not nil. The int16 -// zero value is used if the pointer was nil. -func ToInt16Map(vs map[string]*int16) map[string]int16 { - ps := make(map[string]int16, len(vs)) - for k, v := range vs { - ps[k] = ToInt16(v) - } - - return ps -} - -// ToInt32 returns int32 value dereferenced if the passed -// in pointer was not nil. Returns a int32 zero value if the -// pointer was nil. -func ToInt32(p *int32) (v int32) { - if p == nil { - return v - } - - return *p -} - -// ToInt32Slice returns a slice of int32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int32 -// zero value if the pointer was nil. -func ToInt32Slice(vs []*int32) []int32 { - ps := make([]int32, len(vs)) - for i, v := range vs { - ps[i] = ToInt32(v) - } - - return ps -} - -// ToInt32Map returns a map of int32 values, that are -// dereferenced if the passed in pointer was not nil. The int32 -// zero value is used if the pointer was nil. -func ToInt32Map(vs map[string]*int32) map[string]int32 { - ps := make(map[string]int32, len(vs)) - for k, v := range vs { - ps[k] = ToInt32(v) - } - - return ps -} - -// ToInt64 returns int64 value dereferenced if the passed -// in pointer was not nil. Returns a int64 zero value if the -// pointer was nil. -func ToInt64(p *int64) (v int64) { - if p == nil { - return v - } - - return *p -} - -// ToInt64Slice returns a slice of int64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a int64 -// zero value if the pointer was nil. -func ToInt64Slice(vs []*int64) []int64 { - ps := make([]int64, len(vs)) - for i, v := range vs { - ps[i] = ToInt64(v) - } - - return ps -} - -// ToInt64Map returns a map of int64 values, that are -// dereferenced if the passed in pointer was not nil. The int64 -// zero value is used if the pointer was nil. -func ToInt64Map(vs map[string]*int64) map[string]int64 { - ps := make(map[string]int64, len(vs)) - for k, v := range vs { - ps[k] = ToInt64(v) - } - - return ps -} - -// ToUint returns uint value dereferenced if the passed -// in pointer was not nil. Returns a uint zero value if the -// pointer was nil. -func ToUint(p *uint) (v uint) { - if p == nil { - return v - } - - return *p -} - -// ToUintSlice returns a slice of uint values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint -// zero value if the pointer was nil. -func ToUintSlice(vs []*uint) []uint { - ps := make([]uint, len(vs)) - for i, v := range vs { - ps[i] = ToUint(v) - } - - return ps -} - -// ToUintMap returns a map of uint values, that are -// dereferenced if the passed in pointer was not nil. The uint -// zero value is used if the pointer was nil. -func ToUintMap(vs map[string]*uint) map[string]uint { - ps := make(map[string]uint, len(vs)) - for k, v := range vs { - ps[k] = ToUint(v) - } - - return ps -} - -// ToUint8 returns uint8 value dereferenced if the passed -// in pointer was not nil. Returns a uint8 zero value if the -// pointer was nil. -func ToUint8(p *uint8) (v uint8) { - if p == nil { - return v - } - - return *p -} - -// ToUint8Slice returns a slice of uint8 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint8 -// zero value if the pointer was nil. -func ToUint8Slice(vs []*uint8) []uint8 { - ps := make([]uint8, len(vs)) - for i, v := range vs { - ps[i] = ToUint8(v) - } - - return ps -} - -// ToUint8Map returns a map of uint8 values, that are -// dereferenced if the passed in pointer was not nil. The uint8 -// zero value is used if the pointer was nil. -func ToUint8Map(vs map[string]*uint8) map[string]uint8 { - ps := make(map[string]uint8, len(vs)) - for k, v := range vs { - ps[k] = ToUint8(v) - } - - return ps -} - -// ToUint16 returns uint16 value dereferenced if the passed -// in pointer was not nil. Returns a uint16 zero value if the -// pointer was nil. -func ToUint16(p *uint16) (v uint16) { - if p == nil { - return v - } - - return *p -} - -// ToUint16Slice returns a slice of uint16 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint16 -// zero value if the pointer was nil. -func ToUint16Slice(vs []*uint16) []uint16 { - ps := make([]uint16, len(vs)) - for i, v := range vs { - ps[i] = ToUint16(v) - } - - return ps -} - -// ToUint16Map returns a map of uint16 values, that are -// dereferenced if the passed in pointer was not nil. The uint16 -// zero value is used if the pointer was nil. -func ToUint16Map(vs map[string]*uint16) map[string]uint16 { - ps := make(map[string]uint16, len(vs)) - for k, v := range vs { - ps[k] = ToUint16(v) - } - - return ps -} - -// ToUint32 returns uint32 value dereferenced if the passed -// in pointer was not nil. Returns a uint32 zero value if the -// pointer was nil. -func ToUint32(p *uint32) (v uint32) { - if p == nil { - return v - } - - return *p -} - -// ToUint32Slice returns a slice of uint32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint32 -// zero value if the pointer was nil. -func ToUint32Slice(vs []*uint32) []uint32 { - ps := make([]uint32, len(vs)) - for i, v := range vs { - ps[i] = ToUint32(v) - } - - return ps -} - -// ToUint32Map returns a map of uint32 values, that are -// dereferenced if the passed in pointer was not nil. The uint32 -// zero value is used if the pointer was nil. -func ToUint32Map(vs map[string]*uint32) map[string]uint32 { - ps := make(map[string]uint32, len(vs)) - for k, v := range vs { - ps[k] = ToUint32(v) - } - - return ps -} - -// ToUint64 returns uint64 value dereferenced if the passed -// in pointer was not nil. Returns a uint64 zero value if the -// pointer was nil. -func ToUint64(p *uint64) (v uint64) { - if p == nil { - return v - } - - return *p -} - -// ToUint64Slice returns a slice of uint64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a uint64 -// zero value if the pointer was nil. -func ToUint64Slice(vs []*uint64) []uint64 { - ps := make([]uint64, len(vs)) - for i, v := range vs { - ps[i] = ToUint64(v) - } - - return ps -} - -// ToUint64Map returns a map of uint64 values, that are -// dereferenced if the passed in pointer was not nil. The uint64 -// zero value is used if the pointer was nil. -func ToUint64Map(vs map[string]*uint64) map[string]uint64 { - ps := make(map[string]uint64, len(vs)) - for k, v := range vs { - ps[k] = ToUint64(v) - } - - return ps -} - -// ToFloat32 returns float32 value dereferenced if the passed -// in pointer was not nil. Returns a float32 zero value if the -// pointer was nil. -func ToFloat32(p *float32) (v float32) { - if p == nil { - return v - } - - return *p -} - -// ToFloat32Slice returns a slice of float32 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float32 -// zero value if the pointer was nil. -func ToFloat32Slice(vs []*float32) []float32 { - ps := make([]float32, len(vs)) - for i, v := range vs { - ps[i] = ToFloat32(v) - } - - return ps -} - -// ToFloat32Map returns a map of float32 values, that are -// dereferenced if the passed in pointer was not nil. The float32 -// zero value is used if the pointer was nil. -func ToFloat32Map(vs map[string]*float32) map[string]float32 { - ps := make(map[string]float32, len(vs)) - for k, v := range vs { - ps[k] = ToFloat32(v) - } - - return ps -} - -// ToFloat64 returns float64 value dereferenced if the passed -// in pointer was not nil. Returns a float64 zero value if the -// pointer was nil. -func ToFloat64(p *float64) (v float64) { - if p == nil { - return v - } - - return *p -} - -// ToFloat64Slice returns a slice of float64 values, that are -// dereferenced if the passed in pointer was not nil. Returns a float64 -// zero value if the pointer was nil. -func ToFloat64Slice(vs []*float64) []float64 { - ps := make([]float64, len(vs)) - for i, v := range vs { - ps[i] = ToFloat64(v) - } - - return ps -} - -// ToFloat64Map returns a map of float64 values, that are -// dereferenced if the passed in pointer was not nil. The float64 -// zero value is used if the pointer was nil. -func ToFloat64Map(vs map[string]*float64) map[string]float64 { - ps := make(map[string]float64, len(vs)) - for k, v := range vs { - ps[k] = ToFloat64(v) - } - - return ps -} - -// ToTime returns time.Time value dereferenced if the passed -// in pointer was not nil. Returns a time.Time zero value if the -// pointer was nil. -func ToTime(p *time.Time) (v time.Time) { - if p == nil { - return v - } - - return *p -} - -// ToTimeSlice returns a slice of time.Time values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Time -// zero value if the pointer was nil. -func ToTimeSlice(vs []*time.Time) []time.Time { - ps := make([]time.Time, len(vs)) - for i, v := range vs { - ps[i] = ToTime(v) - } - - return ps -} - -// ToTimeMap returns a map of time.Time values, that are -// dereferenced if the passed in pointer was not nil. The time.Time -// zero value is used if the pointer was nil. -func ToTimeMap(vs map[string]*time.Time) map[string]time.Time { - ps := make(map[string]time.Time, len(vs)) - for k, v := range vs { - ps[k] = ToTime(v) - } - - return ps -} - -// ToDuration returns time.Duration value dereferenced if the passed -// in pointer was not nil. Returns a time.Duration zero value if the -// pointer was nil. -func ToDuration(p *time.Duration) (v time.Duration) { - if p == nil { - return v - } - - return *p -} - -// ToDurationSlice returns a slice of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. Returns a time.Duration -// zero value if the pointer was nil. -func ToDurationSlice(vs []*time.Duration) []time.Duration { - ps := make([]time.Duration, len(vs)) - for i, v := range vs { - ps[i] = ToDuration(v) - } - - return ps -} - -// ToDurationMap returns a map of time.Duration values, that are -// dereferenced if the passed in pointer was not nil. The time.Duration -// zero value is used if the pointer was nil. -func ToDurationMap(vs map[string]*time.Duration) map[string]time.Duration { - ps := make(map[string]time.Duration, len(vs)) - for k, v := range vs { - ps[k] = ToDuration(v) - } - - return ps -} diff --git a/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go b/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go deleted file mode 100644 index 97f01011e7..0000000000 --- a/vendor/github.com/aws/smithy-go/ptr/gen_scalars.go +++ /dev/null @@ -1,83 +0,0 @@ -//go:build codegen -// +build codegen - -package ptr - -import "strings" - -func GetScalars() Scalars { - return Scalars{ - {Type: "bool"}, - {Type: "byte"}, - {Type: "string"}, - {Type: "int"}, - {Type: "int8"}, - {Type: "int16"}, - {Type: "int32"}, - {Type: "int64"}, - {Type: "uint"}, - {Type: "uint8"}, - {Type: "uint16"}, - {Type: "uint32"}, - {Type: "uint64"}, - {Type: "float32"}, - {Type: "float64"}, - {Type: "Time", Import: &Import{Path: "time"}}, - {Type: "Duration", Import: &Import{Path: "time"}}, - } -} - -// Import provides the import path and optional alias -type Import struct { - Path string - Alias string -} - -// Package returns the Go package name for the import. Returns alias if set. -func (i Import) Package() string { - if v := i.Alias; len(v) != 0 { - return v - } - - if v := i.Path; len(v) != 0 { - parts := strings.Split(v, "/") - pkg := parts[len(parts)-1] - return pkg - } - - return "" -} - -// Scalar provides the definition of a type to generate pointer utilities for. -type Scalar struct { - Type string - Import *Import -} - -// Name returns the exported function name for the type. -func (t Scalar) Name() string { - return strings.Title(t.Type) -} - -// Symbol returns the scalar's Go symbol with path if needed. -func (t Scalar) Symbol() string { - if t.Import != nil { - return t.Import.Package() + "." + t.Type - } - return t.Type -} - -// Scalars is a list of scalars. -type Scalars []Scalar - -// Imports returns all imports for the scalars. -func (ts Scalars) Imports() []*Import { - imports := []*Import{} - for _, t := range ts { - if v := t.Import; v != nil { - imports = append(imports, v) - } - } - - return imports -} diff --git a/vendor/github.com/aws/smithy-go/ptr/to_ptr.go b/vendor/github.com/aws/smithy-go/ptr/to_ptr.go deleted file mode 100644 index 0bfbbecbdc..0000000000 --- a/vendor/github.com/aws/smithy-go/ptr/to_ptr.go +++ /dev/null @@ -1,499 +0,0 @@ -// Code generated by smithy-go/ptr/generate.go DO NOT EDIT. -package ptr - -import ( - "time" -) - -// Bool returns a pointer value for the bool value passed in. -func Bool(v bool) *bool { - return &v -} - -// BoolSlice returns a slice of bool pointers from the values -// passed in. -func BoolSlice(vs []bool) []*bool { - ps := make([]*bool, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// BoolMap returns a map of bool pointers from the values -// passed in. -func BoolMap(vs map[string]bool) map[string]*bool { - ps := make(map[string]*bool, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Byte returns a pointer value for the byte value passed in. -func Byte(v byte) *byte { - return &v -} - -// ByteSlice returns a slice of byte pointers from the values -// passed in. -func ByteSlice(vs []byte) []*byte { - ps := make([]*byte, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// ByteMap returns a map of byte pointers from the values -// passed in. -func ByteMap(vs map[string]byte) map[string]*byte { - ps := make(map[string]*byte, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// String returns a pointer value for the string value passed in. -func String(v string) *string { - return &v -} - -// StringSlice returns a slice of string pointers from the values -// passed in. -func StringSlice(vs []string) []*string { - ps := make([]*string, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// StringMap returns a map of string pointers from the values -// passed in. -func StringMap(vs map[string]string) map[string]*string { - ps := make(map[string]*string, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int returns a pointer value for the int value passed in. -func Int(v int) *int { - return &v -} - -// IntSlice returns a slice of int pointers from the values -// passed in. -func IntSlice(vs []int) []*int { - ps := make([]*int, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// IntMap returns a map of int pointers from the values -// passed in. -func IntMap(vs map[string]int) map[string]*int { - ps := make(map[string]*int, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int8 returns a pointer value for the int8 value passed in. -func Int8(v int8) *int8 { - return &v -} - -// Int8Slice returns a slice of int8 pointers from the values -// passed in. -func Int8Slice(vs []int8) []*int8 { - ps := make([]*int8, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int8Map returns a map of int8 pointers from the values -// passed in. -func Int8Map(vs map[string]int8) map[string]*int8 { - ps := make(map[string]*int8, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int16 returns a pointer value for the int16 value passed in. -func Int16(v int16) *int16 { - return &v -} - -// Int16Slice returns a slice of int16 pointers from the values -// passed in. -func Int16Slice(vs []int16) []*int16 { - ps := make([]*int16, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int16Map returns a map of int16 pointers from the values -// passed in. -func Int16Map(vs map[string]int16) map[string]*int16 { - ps := make(map[string]*int16, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int32 returns a pointer value for the int32 value passed in. -func Int32(v int32) *int32 { - return &v -} - -// Int32Slice returns a slice of int32 pointers from the values -// passed in. -func Int32Slice(vs []int32) []*int32 { - ps := make([]*int32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int32Map returns a map of int32 pointers from the values -// passed in. -func Int32Map(vs map[string]int32) map[string]*int32 { - ps := make(map[string]*int32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Int64 returns a pointer value for the int64 value passed in. -func Int64(v int64) *int64 { - return &v -} - -// Int64Slice returns a slice of int64 pointers from the values -// passed in. -func Int64Slice(vs []int64) []*int64 { - ps := make([]*int64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Int64Map returns a map of int64 pointers from the values -// passed in. -func Int64Map(vs map[string]int64) map[string]*int64 { - ps := make(map[string]*int64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint returns a pointer value for the uint value passed in. -func Uint(v uint) *uint { - return &v -} - -// UintSlice returns a slice of uint pointers from the values -// passed in. -func UintSlice(vs []uint) []*uint { - ps := make([]*uint, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// UintMap returns a map of uint pointers from the values -// passed in. -func UintMap(vs map[string]uint) map[string]*uint { - ps := make(map[string]*uint, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint8 returns a pointer value for the uint8 value passed in. -func Uint8(v uint8) *uint8 { - return &v -} - -// Uint8Slice returns a slice of uint8 pointers from the values -// passed in. -func Uint8Slice(vs []uint8) []*uint8 { - ps := make([]*uint8, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint8Map returns a map of uint8 pointers from the values -// passed in. -func Uint8Map(vs map[string]uint8) map[string]*uint8 { - ps := make(map[string]*uint8, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint16 returns a pointer value for the uint16 value passed in. -func Uint16(v uint16) *uint16 { - return &v -} - -// Uint16Slice returns a slice of uint16 pointers from the values -// passed in. -func Uint16Slice(vs []uint16) []*uint16 { - ps := make([]*uint16, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint16Map returns a map of uint16 pointers from the values -// passed in. -func Uint16Map(vs map[string]uint16) map[string]*uint16 { - ps := make(map[string]*uint16, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint32 returns a pointer value for the uint32 value passed in. -func Uint32(v uint32) *uint32 { - return &v -} - -// Uint32Slice returns a slice of uint32 pointers from the values -// passed in. -func Uint32Slice(vs []uint32) []*uint32 { - ps := make([]*uint32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint32Map returns a map of uint32 pointers from the values -// passed in. -func Uint32Map(vs map[string]uint32) map[string]*uint32 { - ps := make(map[string]*uint32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Uint64 returns a pointer value for the uint64 value passed in. -func Uint64(v uint64) *uint64 { - return &v -} - -// Uint64Slice returns a slice of uint64 pointers from the values -// passed in. -func Uint64Slice(vs []uint64) []*uint64 { - ps := make([]*uint64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Uint64Map returns a map of uint64 pointers from the values -// passed in. -func Uint64Map(vs map[string]uint64) map[string]*uint64 { - ps := make(map[string]*uint64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Float32 returns a pointer value for the float32 value passed in. -func Float32(v float32) *float32 { - return &v -} - -// Float32Slice returns a slice of float32 pointers from the values -// passed in. -func Float32Slice(vs []float32) []*float32 { - ps := make([]*float32, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Float32Map returns a map of float32 pointers from the values -// passed in. -func Float32Map(vs map[string]float32) map[string]*float32 { - ps := make(map[string]*float32, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Float64 returns a pointer value for the float64 value passed in. -func Float64(v float64) *float64 { - return &v -} - -// Float64Slice returns a slice of float64 pointers from the values -// passed in. -func Float64Slice(vs []float64) []*float64 { - ps := make([]*float64, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// Float64Map returns a map of float64 pointers from the values -// passed in. -func Float64Map(vs map[string]float64) map[string]*float64 { - ps := make(map[string]*float64, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Time returns a pointer value for the time.Time value passed in. -func Time(v time.Time) *time.Time { - return &v -} - -// TimeSlice returns a slice of time.Time pointers from the values -// passed in. -func TimeSlice(vs []time.Time) []*time.Time { - ps := make([]*time.Time, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// TimeMap returns a map of time.Time pointers from the values -// passed in. -func TimeMap(vs map[string]time.Time) map[string]*time.Time { - ps := make(map[string]*time.Time, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} - -// Duration returns a pointer value for the time.Duration value passed in. -func Duration(v time.Duration) *time.Duration { - return &v -} - -// DurationSlice returns a slice of time.Duration pointers from the values -// passed in. -func DurationSlice(vs []time.Duration) []*time.Duration { - ps := make([]*time.Duration, len(vs)) - for i, v := range vs { - vv := v - ps[i] = &vv - } - - return ps -} - -// DurationMap returns a map of time.Duration pointers from the values -// passed in. -func DurationMap(vs map[string]time.Duration) map[string]*time.Duration { - ps := make(map[string]*time.Duration, len(vs)) - for k, v := range vs { - vv := v - ps[k] = &vv - } - - return ps -} diff --git a/vendor/github.com/aws/smithy-go/rand/doc.go b/vendor/github.com/aws/smithy-go/rand/doc.go deleted file mode 100644 index f8b25d5625..0000000000 --- a/vendor/github.com/aws/smithy-go/rand/doc.go +++ /dev/null @@ -1,3 +0,0 @@ -// Package rand provides utilities for creating and working with random value -// generators. -package rand diff --git a/vendor/github.com/aws/smithy-go/rand/rand.go b/vendor/github.com/aws/smithy-go/rand/rand.go deleted file mode 100644 index 9c479f62b5..0000000000 --- a/vendor/github.com/aws/smithy-go/rand/rand.go +++ /dev/null @@ -1,31 +0,0 @@ -package rand - -import ( - "crypto/rand" - "fmt" - "io" - "math/big" -) - -func init() { - Reader = rand.Reader -} - -// Reader provides a random reader that can reset during testing. -var Reader io.Reader - -// Int63n returns a int64 between zero and value of max, read from an io.Reader source. -func Int63n(reader io.Reader, max int64) (int64, error) { - bi, err := rand.Int(reader, big.NewInt(max)) - if err != nil { - return 0, fmt.Errorf("failed to read random value, %w", err) - } - - return bi.Int64(), nil -} - -// CryptoRandInt63n returns a random int64 between zero and value of max -// obtained from the crypto rand source. -func CryptoRandInt63n(max int64) (int64, error) { - return Int63n(Reader, max) -} diff --git a/vendor/github.com/aws/smithy-go/rand/uuid.go b/vendor/github.com/aws/smithy-go/rand/uuid.go deleted file mode 100644 index dc81cbc68a..0000000000 --- a/vendor/github.com/aws/smithy-go/rand/uuid.go +++ /dev/null @@ -1,87 +0,0 @@ -package rand - -import ( - "encoding/hex" - "io" -) - -const dash byte = '-' - -// UUIDIdempotencyToken provides a utility to get idempotency tokens in the -// UUID format. -type UUIDIdempotencyToken struct { - uuid *UUID -} - -// NewUUIDIdempotencyToken returns a idempotency token provider returning -// tokens in the UUID random format using the reader provided. -func NewUUIDIdempotencyToken(r io.Reader) *UUIDIdempotencyToken { - return &UUIDIdempotencyToken{uuid: NewUUID(r)} -} - -// GetIdempotencyToken returns a random UUID value for Idempotency token. -func (u UUIDIdempotencyToken) GetIdempotencyToken() (string, error) { - return u.uuid.GetUUID() -} - -// UUID provides computing random UUID version 4 values from a random source -// reader. -type UUID struct { - randSrc io.Reader -} - -// NewUUID returns an initialized UUID value that can be used to retrieve -// random UUID version 4 values. -func NewUUID(r io.Reader) *UUID { - return &UUID{randSrc: r} -} - -// GetUUID returns a random UUID version 4 string representation sourced from the random reader the -// UUID was created with. Returns an error if unable to compute the UUID. -func (r *UUID) GetUUID() (string, error) { - var b [16]byte - if _, err := io.ReadFull(r.randSrc, b[:]); err != nil { - return "", err - } - r.makeUUIDv4(b[:]) - return format(b), nil -} - -// GetBytes returns a byte slice containing a random UUID version 4 sourced from the random reader the -// UUID was created with. Returns an error if unable to compute the UUID. -func (r *UUID) GetBytes() (u []byte, err error) { - u = make([]byte, 16) - if _, err = io.ReadFull(r.randSrc, u); err != nil { - return u, err - } - r.makeUUIDv4(u) - return u, nil -} - -func (r *UUID) makeUUIDv4(u []byte) { - // 13th character is "4" - u[6] = (u[6] & 0x0f) | 0x40 // Version 4 - // 17th character is "8", "9", "a", or "b" - u[8] = (u[8] & 0x3f) | 0x80 // Variant most significant bits are 10x where x can be either 1 or 0 -} - -// Format returns the canonical text representation of a UUID. -// This implementation is optimized to not use fmt. -// Example: 82e42f16-b6cc-4d5b-95f5-d403c4befd3d -func format(u [16]byte) string { - // https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29 - - var scratch [36]byte - - hex.Encode(scratch[:8], u[0:4]) - scratch[8] = dash - hex.Encode(scratch[9:13], u[4:6]) - scratch[13] = dash - hex.Encode(scratch[14:18], u[6:8]) - scratch[18] = dash - hex.Encode(scratch[19:23], u[8:10]) - scratch[23] = dash - hex.Encode(scratch[24:], u[10:]) - - return string(scratch[:]) -} diff --git a/vendor/github.com/aws/smithy-go/time/time.go b/vendor/github.com/aws/smithy-go/time/time.go deleted file mode 100644 index b552a09f8a..0000000000 --- a/vendor/github.com/aws/smithy-go/time/time.go +++ /dev/null @@ -1,134 +0,0 @@ -package time - -import ( - "context" - "fmt" - "math/big" - "strings" - "time" -) - -const ( - // dateTimeFormat is a IMF-fixdate formatted RFC3339 section 5.6 - dateTimeFormatInput = "2006-01-02T15:04:05.999999999Z" - dateTimeFormatInputNoZ = "2006-01-02T15:04:05.999999999" - dateTimeFormatOutput = "2006-01-02T15:04:05.999Z" - - // httpDateFormat is a date time defined by RFC 7231#section-7.1.1.1 - // IMF-fixdate with no UTC offset. - httpDateFormat = "Mon, 02 Jan 2006 15:04:05 GMT" - // Additional formats needed for compatibility. - httpDateFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT" - httpDateFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT" -) - -var millisecondFloat = big.NewFloat(1e3) - -// FormatDateTime formats value as a date-time, (RFC3339 section 5.6) -// -// Example: 1985-04-12T23:20:50.52Z -func FormatDateTime(value time.Time) string { - return value.UTC().Format(dateTimeFormatOutput) -} - -// ParseDateTime parses a string as a date-time, (RFC3339 section 5.6) -// -// Example: 1985-04-12T23:20:50.52Z -func ParseDateTime(value string) (time.Time, error) { - return tryParse(value, - dateTimeFormatInput, - dateTimeFormatInputNoZ, - time.RFC3339Nano, - time.RFC3339, - ) -} - -// FormatHTTPDate formats value as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate) -// -// Example: Tue, 29 Apr 2014 18:30:38 GMT -func FormatHTTPDate(value time.Time) string { - return value.UTC().Format(httpDateFormat) -} - -// ParseHTTPDate parses a string as a http-date, (RFC 7231#section-7.1.1.1 IMF-fixdate) -// -// Example: Tue, 29 Apr 2014 18:30:38 GMT -func ParseHTTPDate(value string) (time.Time, error) { - return tryParse(value, - httpDateFormat, - httpDateFormatSingleDigitDay, - httpDateFormatSingleDigitDayTwoDigitYear, - time.RFC850, - time.ANSIC, - ) -} - -// FormatEpochSeconds returns value as a Unix time in seconds with with decimal precision -// -// Example: 1515531081.123 -func FormatEpochSeconds(value time.Time) float64 { - ms := value.UnixNano() / int64(time.Millisecond) - return float64(ms) / 1e3 -} - -// ParseEpochSeconds returns value as a Unix time in seconds with with decimal precision -// -// Example: 1515531081.123 -func ParseEpochSeconds(value float64) time.Time { - f := big.NewFloat(value) - f = f.Mul(f, millisecondFloat) - i, _ := f.Int64() - // Offset to `UTC` because time.Unix returns the time value based on system - // local setting. - return time.Unix(0, i*1e6).UTC() -} - -func tryParse(v string, formats ...string) (time.Time, error) { - var errs parseErrors - for _, f := range formats { - t, err := time.Parse(f, v) - if err != nil { - errs = append(errs, parseError{ - Format: f, - Err: err, - }) - continue - } - return t, nil - } - - return time.Time{}, fmt.Errorf("unable to parse time string, %w", errs) -} - -type parseErrors []parseError - -func (es parseErrors) Error() string { - var s strings.Builder - for _, e := range es { - fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err) - } - - return "parse errors:" + s.String() -} - -type parseError struct { - Format string - Err error -} - -// SleepWithContext will wait for the timer duration to expire, or until the context -// is canceled. Whichever happens first. If the context is canceled the -// Context's error will be returned. -func SleepWithContext(ctx context.Context, dur time.Duration) error { - t := time.NewTimer(dur) - defer t.Stop() - - select { - case <-t.C: - break - case <-ctx.Done(): - return ctx.Err() - } - - return nil -} diff --git a/vendor/github.com/aws/smithy-go/tracing/context.go b/vendor/github.com/aws/smithy-go/tracing/context.go deleted file mode 100644 index a404ed9d37..0000000000 --- a/vendor/github.com/aws/smithy-go/tracing/context.go +++ /dev/null @@ -1,96 +0,0 @@ -package tracing - -import "context" - -type ( - operationTracerKey struct{} - spanLineageKey struct{} -) - -// GetSpan returns the active trace Span on the context. -// -// The boolean in the return indicates whether a Span was actually in the -// context, but a no-op implementation will be returned if not, so callers -// can generally disregard the boolean unless they wish to explicitly confirm -// presence/absence of a Span. -func GetSpan(ctx context.Context) (Span, bool) { - lineage := getLineage(ctx) - if len(lineage) == 0 { - return nopSpan{}, false - } - - return lineage[len(lineage)-1], true -} - -// WithSpan sets the active trace Span on the context. -func WithSpan(parent context.Context, span Span) context.Context { - lineage := getLineage(parent) - if len(lineage) == 0 { - return context.WithValue(parent, spanLineageKey{}, []Span{span}) - } - - lineage = append(lineage, span) - return context.WithValue(parent, spanLineageKey{}, lineage) -} - -// PopSpan pops the current Span off the context, setting the active Span on -// the returned Context back to its parent and returning the REMOVED one. -// -// PopSpan on a context with no active Span will return a no-op instance. -// -// This is mostly necessary for the runtime to manage base trace spans due to -// the wrapped-function nature of the middleware stack. End-users of Smithy -// clients SHOULD NOT generally be using this API. -func PopSpan(parent context.Context) (context.Context, Span) { - lineage := getLineage(parent) - if len(lineage) == 0 { - return parent, nopSpan{} - } - - span := lineage[len(lineage)-1] - lineage = lineage[:len(lineage)-1] - return context.WithValue(parent, spanLineageKey{}, lineage), span -} - -func getLineage(ctx context.Context) []Span { - v := ctx.Value(spanLineageKey{}) - if v == nil { - return nil - } - - return v.([]Span) -} - -// GetOperationTracer returns the embedded operation-scoped Tracer on a -// Context. -// -// The boolean in the return indicates whether a Tracer was actually in the -// context, but a no-op implementation will be returned if not, so callers -// can generally disregard the boolean unless they wish to explicitly confirm -// presence/absence of a Tracer. -func GetOperationTracer(ctx context.Context) (Tracer, bool) { - v := ctx.Value(operationTracerKey{}) - if v == nil { - return nopTracer{}, false - } - - return v.(Tracer), true -} - -// WithOperationTracer returns a child Context embedding the given Tracer. -// -// The runtime will use this embed a scoped tracer for client operations, -// Smithy/SDK client callers DO NOT need to do this explicitly. -func WithOperationTracer(parent context.Context, tracer Tracer) context.Context { - return context.WithValue(parent, operationTracerKey{}, tracer) -} - -// StartSpan is a convenience API for creating tracing Spans from a Context. -// -// StartSpan uses the operation-scoped Tracer, previously stored using -// [WithOperationTracer], to start the Span. If a Tracer has not been embedded -// the returned Span will be a no-op implementation. -func StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) { - tracer, _ := GetOperationTracer(ctx) - return tracer.StartSpan(ctx, name, opts...) -} diff --git a/vendor/github.com/aws/smithy-go/tracing/nop.go b/vendor/github.com/aws/smithy-go/tracing/nop.go deleted file mode 100644 index 573d28b1c1..0000000000 --- a/vendor/github.com/aws/smithy-go/tracing/nop.go +++ /dev/null @@ -1,32 +0,0 @@ -package tracing - -import "context" - -// NopTracerProvider is a no-op tracing implementation. -type NopTracerProvider struct{} - -var _ TracerProvider = (*NopTracerProvider)(nil) - -// Tracer returns a tracer which creates no-op spans. -func (NopTracerProvider) Tracer(string, ...TracerOption) Tracer { - return nopTracer{} -} - -type nopTracer struct{} - -var _ Tracer = (*nopTracer)(nil) - -func (nopTracer) StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) { - return ctx, nopSpan{} -} - -type nopSpan struct{} - -var _ Span = (*nopSpan)(nil) - -func (nopSpan) Name() string { return "" } -func (nopSpan) Context() SpanContext { return SpanContext{} } -func (nopSpan) AddEvent(string, ...EventOption) {} -func (nopSpan) SetProperty(any, any) {} -func (nopSpan) SetStatus(SpanStatus) {} -func (nopSpan) End() {} diff --git a/vendor/github.com/aws/smithy-go/tracing/tracing.go b/vendor/github.com/aws/smithy-go/tracing/tracing.go deleted file mode 100644 index 089ed3932e..0000000000 --- a/vendor/github.com/aws/smithy-go/tracing/tracing.go +++ /dev/null @@ -1,95 +0,0 @@ -// Package tracing defines tracing APIs to be used by Smithy clients. -package tracing - -import ( - "context" - - "github.com/aws/smithy-go" -) - -// SpanStatus records the "success" state of an observed span. -type SpanStatus int - -// Enumeration of SpanStatus. -const ( - SpanStatusUnset SpanStatus = iota - SpanStatusOK - SpanStatusError -) - -// SpanKind indicates the nature of the work being performed. -type SpanKind int - -// Enumeration of SpanKind. -const ( - SpanKindInternal SpanKind = iota - SpanKindClient - SpanKindServer - SpanKindProducer - SpanKindConsumer -) - -// TracerProvider is the entry point for creating client traces. -type TracerProvider interface { - Tracer(scope string, opts ...TracerOption) Tracer -} - -// TracerOption applies configuration to a tracer. -type TracerOption func(o *TracerOptions) - -// TracerOptions represent configuration for tracers. -type TracerOptions struct { - Properties smithy.Properties -} - -// Tracer is the entry point for creating observed client Spans. -// -// Spans created by tracers propagate by existing on the Context. Consumers of -// the API can use [GetSpan] to pull the active Span from a Context. -// -// Creation of child Spans is implicit through Context persistence. If -// CreateSpan is called with a Context that holds a Span, the result will be a -// child of that Span. -type Tracer interface { - StartSpan(ctx context.Context, name string, opts ...SpanOption) (context.Context, Span) -} - -// SpanOption applies configuration to a span. -type SpanOption func(o *SpanOptions) - -// SpanOptions represent configuration for span events. -type SpanOptions struct { - Kind SpanKind - Properties smithy.Properties -} - -// Span records a conceptually individual unit of work that takes place in a -// Smithy client operation. -type Span interface { - Name() string - Context() SpanContext - AddEvent(name string, opts ...EventOption) - SetStatus(status SpanStatus) - SetProperty(k, v any) - End() -} - -// EventOption applies configuration to a span event. -type EventOption func(o *EventOptions) - -// EventOptions represent configuration for span events. -type EventOptions struct { - Properties smithy.Properties -} - -// SpanContext uniquely identifies a Span. -type SpanContext struct { - TraceID string - SpanID string - IsRemote bool -} - -// IsValid is true when a span has nonzero trace and span IDs. -func (ctx *SpanContext) IsValid() bool { - return len(ctx.TraceID) != 0 && len(ctx.SpanID) != 0 -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth.go b/vendor/github.com/aws/smithy-go/transport/http/auth.go deleted file mode 100644 index 58e1ab5ef8..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/auth.go +++ /dev/null @@ -1,21 +0,0 @@ -package http - -import ( - "context" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// AuthScheme defines an HTTP authentication scheme. -type AuthScheme interface { - SchemeID() string - IdentityResolver(auth.IdentityResolverOptions) auth.IdentityResolver - Signer() Signer -} - -// Signer defines the interface through which HTTP requests are supplemented -// with an Identity. -type Signer interface { - SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go b/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go deleted file mode 100644 index d60cf2a60f..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/auth_schemes.go +++ /dev/null @@ -1,45 +0,0 @@ -package http - -import ( - "context" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/auth" -) - -// NewAnonymousScheme returns the anonymous HTTP auth scheme. -func NewAnonymousScheme() AuthScheme { - return &authScheme{ - schemeID: auth.SchemeIDAnonymous, - signer: &nopSigner{}, - } -} - -// authScheme is parameterized to generically implement the exported AuthScheme -// interface -type authScheme struct { - schemeID string - signer Signer -} - -var _ AuthScheme = (*authScheme)(nil) - -func (s *authScheme) SchemeID() string { - return s.schemeID -} - -func (s *authScheme) IdentityResolver(o auth.IdentityResolverOptions) auth.IdentityResolver { - return o.GetIdentityResolver(s.schemeID) -} - -func (s *authScheme) Signer() Signer { - return s.signer -} - -type nopSigner struct{} - -var _ Signer = (*nopSigner)(nil) - -func (*nopSigner) SignRequest(context.Context, *Request, auth.Identity, smithy.Properties) error { - return nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go b/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go deleted file mode 100644 index bc4ad6e797..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/checksum_middleware.go +++ /dev/null @@ -1,70 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -const contentMD5Header = "Content-Md5" - -// contentMD5Checksum provides a middleware to compute and set -// content-md5 checksum for a http request -type contentMD5Checksum struct { -} - -// AddContentChecksumMiddleware adds checksum middleware to middleware's -// build step. -func AddContentChecksumMiddleware(stack *middleware.Stack) error { - // This middleware must be executed before request body is set. - return stack.Build.Add(&contentMD5Checksum{}, middleware.Before) -} - -// ID returns the identifier for the checksum middleware -func (m *contentMD5Checksum) ID() string { return "ContentChecksum" } - -// HandleBuild adds behavior to compute md5 checksum and add content-md5 header -// on http request -func (m *contentMD5Checksum) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // if Content-MD5 header is already present, return - if v := req.Header.Get(contentMD5Header); len(v) != 0 { - return next.HandleBuild(ctx, in) - } - - // fetch the request stream. - stream := req.GetStream() - // compute checksum if payload is explicit - if stream != nil { - if !req.IsStreamSeekable() { - return out, metadata, fmt.Errorf( - "unseekable stream is not supported for computing md5 checksum") - } - - v, err := computeMD5Checksum(stream) - if err != nil { - return out, metadata, fmt.Errorf("error computing md5 checksum, %w", err) - } - - // reset the request stream - if err := req.RewindStream(); err != nil { - return out, metadata, fmt.Errorf( - "error rewinding request stream after computing md5 checksum, %w", err) - } - - // set the 'Content-MD5' header - req.Header.Set(contentMD5Header, string(v)) - } - - // set md5 header value - return next.HandleBuild(ctx, in) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/client.go b/vendor/github.com/aws/smithy-go/transport/http/client.go deleted file mode 100644 index 0fceae81db..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/client.go +++ /dev/null @@ -1,161 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http" - - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/metrics" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/tracing" -) - -// ClientDo provides the interface for custom HTTP client implementations. -type ClientDo interface { - Do(*http.Request) (*http.Response, error) -} - -// ClientDoFunc provides a helper to wrap a function as an HTTP client for -// round tripping requests. -type ClientDoFunc func(*http.Request) (*http.Response, error) - -// Do will invoke the underlying func, returning the result. -func (fn ClientDoFunc) Do(r *http.Request) (*http.Response, error) { - return fn(r) -} - -// ClientHandler wraps a client that implements the HTTP Do method. Standard -// implementation is http.Client. -type ClientHandler struct { - client ClientDo - - Meter metrics.Meter // For HTTP client metrics. -} - -// NewClientHandler returns an initialized middleware handler for the client. -// -// Deprecated: Use [NewClientHandlerWithOptions]. -func NewClientHandler(client ClientDo) ClientHandler { - return NewClientHandlerWithOptions(client) -} - -// NewClientHandlerWithOptions returns an initialized middleware handler for the client -// with applied options. -func NewClientHandlerWithOptions(client ClientDo, opts ...func(*ClientHandler)) ClientHandler { - h := ClientHandler{ - client: client, - } - for _, opt := range opts { - opt(&h) - } - if h.Meter == nil { - h.Meter = metrics.NopMeterProvider{}.Meter("") - } - return h -} - -// Handle implements the middleware Handler interface, that will invoke the -// underlying HTTP client. Requires the input to be a Smithy *Request. Returns -// a smithy *Response, or error if the request failed. -func (c ClientHandler) Handle(ctx context.Context, input interface{}) ( - out interface{}, metadata middleware.Metadata, err error, -) { - ctx, span := tracing.StartSpan(ctx, "DoHTTPRequest") - defer span.End() - - ctx, client, err := withMetrics(ctx, c.client, c.Meter) - if err != nil { - return nil, metadata, fmt.Errorf("instrument with HTTP metrics: %w", err) - } - - req, ok := input.(*Request) - if !ok { - return nil, metadata, fmt.Errorf("expect Smithy http.Request value as input, got unsupported type %T", input) - } - - builtRequest := req.Build(ctx) - if err := ValidateEndpointHost(builtRequest.Host); err != nil { - return nil, metadata, err - } - - span.SetProperty("http.method", req.Method) - span.SetProperty("http.request_content_length", -1) // at least indicate unknown - length, ok, err := req.StreamLength() - if err != nil { - return nil, metadata, err - } - if ok { - span.SetProperty("http.request_content_length", length) - } - - resp, err := client.Do(builtRequest) - if resp == nil { - // Ensure a http response value is always present to prevent unexpected - // panics. - resp = &http.Response{ - Header: http.Header{}, - Body: http.NoBody, - } - } - if err != nil { - err = &RequestSendError{Err: err} - - // Override the error with a context canceled error, if that was canceled. - select { - case <-ctx.Done(): - err = &smithy.CanceledError{Err: ctx.Err()} - default: - } - } - - // HTTP RoundTripper *should* close the request body. But this may not happen in a timely manner. - // So instead Smithy *Request Build wraps the body to be sent in a safe closer that will clear the - // stream reference so that it can be safely reused. - if builtRequest.Body != nil { - _ = builtRequest.Body.Close() - } - - span.SetProperty("net.protocol.version", fmt.Sprintf("%d.%d", resp.ProtoMajor, resp.ProtoMinor)) - span.SetProperty("http.status_code", resp.StatusCode) - span.SetProperty("http.response_content_length", resp.ContentLength) - - return &Response{Response: resp}, metadata, err -} - -// RequestSendError provides a generic request transport error. This error -// should wrap errors making HTTP client requests. -// -// The ClientHandler will wrap the HTTP client's error if the client request -// fails, and did not fail because of context canceled. -type RequestSendError struct { - Err error -} - -// ConnectionError returns that the error is related to not being able to send -// the request, or receive a response from the service. -func (e *RequestSendError) ConnectionError() bool { - return true -} - -// Unwrap returns the underlying error, if there was one. -func (e *RequestSendError) Unwrap() error { - return e.Err -} - -func (e *RequestSendError) Error() string { - return fmt.Sprintf("request send failed, %v", e.Err) -} - -// NopClient provides a client that ignores the request, and returns an empty -// successful HTTP response value. -type NopClient struct{} - -// Do ignores the request and returns a 200 status empty response. -func (NopClient) Do(r *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: 200, - Header: http.Header{}, - Body: http.NoBody, - }, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/doc.go b/vendor/github.com/aws/smithy-go/transport/http/doc.go deleted file mode 100644 index 07366ac85a..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -/* -Package http provides the HTTP transport client and request/response types -needed to round trip API operation calls with an service. -*/ -package http diff --git a/vendor/github.com/aws/smithy-go/transport/http/headerlist.go b/vendor/github.com/aws/smithy-go/transport/http/headerlist.go deleted file mode 100644 index cbc9deb4df..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/headerlist.go +++ /dev/null @@ -1,163 +0,0 @@ -package http - -import ( - "fmt" - "strconv" - "strings" - "unicode" -) - -func splitHeaderListValues(vs []string, splitFn func(string) ([]string, error)) ([]string, error) { - values := make([]string, 0, len(vs)) - - for i := 0; i < len(vs); i++ { - parts, err := splitFn(vs[i]) - if err != nil { - return nil, err - } - values = append(values, parts...) - } - - return values, nil -} - -// SplitHeaderListValues attempts to split the elements of the slice by commas, -// and return a list of all values separated. Returns error if unable to -// separate the values. -func SplitHeaderListValues(vs []string) ([]string, error) { - return splitHeaderListValues(vs, quotedCommaSplit) -} - -func quotedCommaSplit(v string) (parts []string, err error) { - v = strings.TrimSpace(v) - - expectMore := true - for i := 0; i < len(v); i++ { - if unicode.IsSpace(rune(v[i])) { - continue - } - expectMore = false - - // leading space in part is ignored. - // Start of value must be non-space, or quote. - // - // - If quote, enter quoted mode, find next non-escaped quote to - // terminate the value. - // - Otherwise, find next comma to terminate value. - - remaining := v[i:] - - var value string - var valueLen int - if remaining[0] == '"' { - //------------------------------ - // Quoted value - //------------------------------ - var j int - var skipQuote bool - for j += 1; j < len(remaining); j++ { - if remaining[j] == '\\' || (remaining[j] != '\\' && skipQuote) { - skipQuote = !skipQuote - continue - } - if remaining[j] == '"' { - break - } - } - if j == len(remaining) || j == 1 { - return nil, fmt.Errorf("value %v missing closing double quote", - remaining) - } - valueLen = j + 1 - - tail := remaining[valueLen:] - var k int - for ; k < len(tail); k++ { - if !unicode.IsSpace(rune(tail[k])) && tail[k] != ',' { - return nil, fmt.Errorf("value %v has non-space trailing characters", - remaining) - } - if tail[k] == ',' { - expectMore = true - break - } - } - value = remaining[:valueLen] - value, err = strconv.Unquote(value) - if err != nil { - return nil, fmt.Errorf("failed to unquote value %v, %w", value, err) - } - - // Pad valueLen to include trailing space(s) so `i` is updated correctly. - valueLen += k - - } else { - //------------------------------ - // Unquoted value - //------------------------------ - - // Index of the next comma is the length of the value, or end of string. - valueLen = strings.Index(remaining, ",") - if valueLen != -1 { - expectMore = true - } else { - valueLen = len(remaining) - } - value = strings.TrimSpace(remaining[:valueLen]) - } - - i += valueLen - parts = append(parts, value) - - } - - if expectMore { - parts = append(parts, "") - } - - return parts, nil -} - -// SplitHTTPDateTimestampHeaderListValues attempts to split the HTTP-Date -// timestamp values in the slice by commas, and return a list of all values -// separated. The split is aware of the HTTP-Date timestamp format, and will skip -// comma within the timestamp value. Returns an error if unable to split the -// timestamp values. -func SplitHTTPDateTimestampHeaderListValues(vs []string) ([]string, error) { - return splitHeaderListValues(vs, splitHTTPDateHeaderValue) -} - -func splitHTTPDateHeaderValue(v string) ([]string, error) { - if n := strings.Count(v, ","); n <= 1 { - // Nothing to do if only contains a no, or single HTTPDate value - return []string{v}, nil - } else if n%2 == 0 { - return nil, fmt.Errorf("invalid timestamp HTTPDate header comma separations, %q", v) - } - - var parts []string - var i, j int - - var doSplit bool - for ; i < len(v); i++ { - if v[i] == ',' { - if doSplit { - doSplit = false - parts = append(parts, strings.TrimSpace(v[j:i])) - j = i + 1 - } else { - // Skip the first comma in the timestamp value since that - // separates the day from the rest of the timestamp. - // - // Tue, 17 Dec 2019 23:48:18 GMT - doSplit = true - } - } - } - // Add final part - if j < len(v) { - parts = append(parts, strings.TrimSpace(v[j:])) - } - - return parts, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/host.go b/vendor/github.com/aws/smithy-go/transport/http/host.go deleted file mode 100644 index db9801bea5..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/host.go +++ /dev/null @@ -1,89 +0,0 @@ -package http - -import ( - "fmt" - "net" - "strconv" - "strings" -) - -// ValidateEndpointHost validates that the host string passed in is a valid RFC -// 3986 host. Returns error if the host is not valid. -func ValidateEndpointHost(host string) error { - var errors strings.Builder - var hostname string - var port string - var err error - - if strings.Contains(host, ":") { - hostname, port, err = net.SplitHostPort(host) - if err != nil { - errors.WriteString(fmt.Sprintf("\n endpoint %v, failed to parse, got ", host)) - errors.WriteString(err.Error()) - } - - if !ValidPortNumber(port) { - errors.WriteString(fmt.Sprintf("port number should be in range [0-65535], got %v", port)) - } - } else { - hostname = host - } - - labels := strings.Split(hostname, ".") - for i, label := range labels { - if i == len(labels)-1 && len(label) == 0 { - // Allow trailing dot for FQDN hosts. - continue - } - - if !ValidHostLabel(label) { - errors.WriteString("\nendpoint host domain labels must match \"[a-zA-Z0-9-]{1,63}\", but found: ") - errors.WriteString(label) - } - } - - if len(hostname) == 0 && len(port) != 0 { - errors.WriteString("\nendpoint host with port must not be empty") - } - - if len(hostname) > 255 { - errors.WriteString(fmt.Sprintf("\nendpoint host must be less than 255 characters, but was %d", len(hostname))) - } - - if len(errors.String()) > 0 { - return fmt.Errorf("invalid endpoint host%s", errors.String()) - } - return nil -} - -// ValidPortNumber returns whether the port is valid RFC 3986 port. -func ValidPortNumber(port string) bool { - i, err := strconv.Atoi(port) - if err != nil { - return false - } - - if i < 0 || i > 65535 { - return false - } - return true -} - -// ValidHostLabel returns whether the label is a valid RFC 3986 host label. -func ValidHostLabel(label string) bool { - if l := len(label); l == 0 || l > 63 { - return false - } - for _, r := range label { - switch { - case r >= '0' && r <= '9': - case r >= 'A' && r <= 'Z': - case r >= 'a' && r <= 'z': - case r == '-': - default: - return false - } - } - - return true -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/interceptor.go b/vendor/github.com/aws/smithy-go/transport/http/interceptor.go deleted file mode 100644 index e21f2632a6..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/interceptor.go +++ /dev/null @@ -1,321 +0,0 @@ -package http - -import ( - "context" -) - -func icopy[T any](v []T) []T { - s := make([]T, len(v)) - copy(s, v) - return s -} - -// InterceptorContext is all the information available in different -// interceptors. -// -// Not all information is available in each interceptor, see each interface -// definition for more details. -type InterceptorContext struct { - Input any - Request *Request - - Output any - Response *Response -} - -// InterceptorRegistry holds a list of operation interceptors. -// -// Interceptors allow callers to insert custom behavior at well-defined points -// within a client's operation lifecycle. -// -// # Interceptor context -// -// All interceptors are invoked with a context object that contains input and -// output containers for the operation. The individual fields that are -// available will depend on what the interceptor is and, in certain -// interceptors, how far the operation was able to progress. See the -// documentation for each interface definition for more information about field -// availability. -// -// Implementations MUST NOT directly mutate the values of the fields in the -// interceptor context. They are free to mutate the existing values _pointed -// to_ by those fields, however. -// -// # Returning errors -// -// All interceptors can return errors. If an interceptor returns an error -// _before_ the client's retry loop, the operation will fail immediately. If -// one returns an error _within_ the retry loop, the error WILL be considered -// according to the client's retry policy. -// -// # Adding interceptors -// -// Idiomatically you will simply use one of the Add() receiver methods to -// register interceptors as desired. However, the list for each interface is -// exported on the registry struct and the caller is free to manipulate it -// directly, for example, to register a number of interceptors all at once, or -// to remove one that was previously registered. -// -// The base SDK client WILL NOT add any interceptors. SDK operations and -// customizations are implemented in terms of middleware. -// -// Modifications to the registry will not persist across operation calls when -// using per-operation functional options. This means you can register -// interceptors on a per-operation basis without affecting other operations. -type InterceptorRegistry struct { - BeforeExecution []BeforeExecutionInterceptor - BeforeSerialization []BeforeSerializationInterceptor - AfterSerialization []AfterSerializationInterceptor - BeforeRetryLoop []BeforeRetryLoopInterceptor - BeforeAttempt []BeforeAttemptInterceptor - BeforeSigning []BeforeSigningInterceptor - AfterSigning []AfterSigningInterceptor - BeforeTransmit []BeforeTransmitInterceptor - AfterTransmit []AfterTransmitInterceptor - BeforeDeserialization []BeforeDeserializationInterceptor - AfterDeserialization []AfterDeserializationInterceptor - AfterAttempt []AfterAttemptInterceptor - AfterExecution []AfterExecutionInterceptor -} - -// Copy returns a deep copy of the registry. This is used by SDK clients on -// each operation call in order to prevent per-op config mutation from -// persisting. -func (i *InterceptorRegistry) Copy() InterceptorRegistry { - return InterceptorRegistry{ - BeforeExecution: icopy(i.BeforeExecution), - BeforeSerialization: icopy(i.BeforeSerialization), - AfterSerialization: icopy(i.AfterSerialization), - BeforeRetryLoop: icopy(i.BeforeRetryLoop), - BeforeAttempt: icopy(i.BeforeAttempt), - BeforeSigning: icopy(i.BeforeSigning), - AfterSigning: icopy(i.AfterSigning), - BeforeTransmit: icopy(i.BeforeTransmit), - AfterTransmit: icopy(i.AfterTransmit), - BeforeDeserialization: icopy(i.BeforeDeserialization), - AfterDeserialization: icopy(i.AfterDeserialization), - AfterAttempt: icopy(i.AfterAttempt), - AfterExecution: icopy(i.AfterExecution), - } -} - -// AddBeforeExecution registers the provided BeforeExecutionInterceptor. -func (i *InterceptorRegistry) AddBeforeExecution(v BeforeExecutionInterceptor) { - i.BeforeExecution = append(i.BeforeExecution, v) -} - -// AddBeforeSerialization registers the provided BeforeSerializationInterceptor. -func (i *InterceptorRegistry) AddBeforeSerialization(v BeforeSerializationInterceptor) { - i.BeforeSerialization = append(i.BeforeSerialization, v) -} - -// AddAfterSerialization registers the provided AfterSerializationInterceptor. -func (i *InterceptorRegistry) AddAfterSerialization(v AfterSerializationInterceptor) { - i.AfterSerialization = append(i.AfterSerialization, v) -} - -// AddBeforeRetryLoop registers the provided BeforeRetryLoopInterceptor. -func (i *InterceptorRegistry) AddBeforeRetryLoop(v BeforeRetryLoopInterceptor) { - i.BeforeRetryLoop = append(i.BeforeRetryLoop, v) -} - -// AddBeforeAttempt registers the provided BeforeAttemptInterceptor. -func (i *InterceptorRegistry) AddBeforeAttempt(v BeforeAttemptInterceptor) { - i.BeforeAttempt = append(i.BeforeAttempt, v) -} - -// AddBeforeSigning registers the provided BeforeSigningInterceptor. -func (i *InterceptorRegistry) AddBeforeSigning(v BeforeSigningInterceptor) { - i.BeforeSigning = append(i.BeforeSigning, v) -} - -// AddAfterSigning registers the provided AfterSigningInterceptor. -func (i *InterceptorRegistry) AddAfterSigning(v AfterSigningInterceptor) { - i.AfterSigning = append(i.AfterSigning, v) -} - -// AddBeforeTransmit registers the provided BeforeTransmitInterceptor. -func (i *InterceptorRegistry) AddBeforeTransmit(v BeforeTransmitInterceptor) { - i.BeforeTransmit = append(i.BeforeTransmit, v) -} - -// AddAfterTransmit registers the provided AfterTransmitInterceptor. -func (i *InterceptorRegistry) AddAfterTransmit(v AfterTransmitInterceptor) { - i.AfterTransmit = append(i.AfterTransmit, v) -} - -// AddBeforeDeserialization registers the provided BeforeDeserializationInterceptor. -func (i *InterceptorRegistry) AddBeforeDeserialization(v BeforeDeserializationInterceptor) { - i.BeforeDeserialization = append(i.BeforeDeserialization, v) -} - -// AddAfterDeserialization registers the provided AfterDeserializationInterceptor. -func (i *InterceptorRegistry) AddAfterDeserialization(v AfterDeserializationInterceptor) { - i.AfterDeserialization = append(i.AfterDeserialization, v) -} - -// AddAfterAttempt registers the provided AfterAttemptInterceptor. -func (i *InterceptorRegistry) AddAfterAttempt(v AfterAttemptInterceptor) { - i.AfterAttempt = append(i.AfterAttempt, v) -} - -// AddAfterExecution registers the provided AfterExecutionInterceptor. -func (i *InterceptorRegistry) AddAfterExecution(v AfterExecutionInterceptor) { - i.AfterExecution = append(i.AfterExecution, v) -} - -// BeforeExecutionInterceptor runs before anything else in the operation -// lifecycle. -// -// Available InterceptorContext fields: -// - Input -type BeforeExecutionInterceptor interface { - BeforeExecution(ctx context.Context, in *InterceptorContext) error -} - -// BeforeSerializationInterceptor runs before the operation input is serialized -// into its transport request. -// -// Serialization occurs before the operation's retry loop. -// -// Available InterceptorContext fields: -// - Input -type BeforeSerializationInterceptor interface { - BeforeSerialization(ctx context.Context, in *InterceptorContext) error -} - -// AfterSerializationInterceptor runs after the operation input is serialized -// into its transport request. -// -// Available InterceptorContext fields: -// - Input -// - Request -type AfterSerializationInterceptor interface { - AfterSerialization(ctx context.Context, in *InterceptorContext) error -} - -// BeforeRetryLoopInterceptor runs right before the operation enters the retry loop. -// -// Available InterceptorContext fields: -// - Input -// - Request -type BeforeRetryLoopInterceptor interface { - BeforeRetryLoop(ctx context.Context, in *InterceptorContext) error -} - -// BeforeAttemptInterceptor runs right before every attempt in the retry loop. -// -// If this interceptor returns an error, AfterAttempt interceptors WILL NOT be -// invoked. -// -// Available InterceptorContext fields: -// - Input -// - Request -type BeforeAttemptInterceptor interface { - BeforeAttempt(ctx context.Context, in *InterceptorContext) error -} - -// BeforeSigningInterceptor runs right before the request is signed. -// -// Signing occurs within the operation's retry loop. -// -// Available InterceptorContext fields: -// - Input -// - Request -type BeforeSigningInterceptor interface { - BeforeSigning(ctx context.Context, in *InterceptorContext) error -} - -// AfterSigningInterceptor runs right after the request is signed. -// -// It is unsafe to modify the outgoing HTTP request at or past this hook, since -// doing so may invalidate the signature of the request. -// -// Available InterceptorContext fields: -// - Input -// - Request -type AfterSigningInterceptor interface { - AfterSigning(ctx context.Context, in *InterceptorContext) error -} - -// BeforeTransmitInterceptor runs right before the HTTP request is sent. -// -// HTTP transmit occurs within the operation's retry loop. -// -// Available InterceptorContext fields: -// - Input -// - Request -type BeforeTransmitInterceptor interface { - BeforeTransmit(ctx context.Context, in *InterceptorContext) error -} - -// AfterTransmitInterceptor runs right after the HTTP response is received. -// -// It will always be invoked when a response is received, regardless of its -// status code. Conversely, it WILL NOT be invoked if the HTTP round-trip was -// not successful, e.g. because of a DNS resolution error -// -// Available InterceptorContext fields: -// - Input -// - Request -// - Response -type AfterTransmitInterceptor interface { - AfterTransmit(ctx context.Context, in *InterceptorContext) error -} - -// BeforeDeserializationInterceptor runs right before the incoming HTTP response -// is deserialized. -// -// This interceptor IS NOT invoked if the HTTP round-trip was not successful. -// -// Deserialization occurs within the operation's retry loop. -// -// Available InterceptorContext fields: -// - Input -// - Request -// - Response -type BeforeDeserializationInterceptor interface { - BeforeDeserialization(ctx context.Context, in *InterceptorContext) error -} - -// AfterDeserializationInterceptor runs right after the incoming HTTP response -// is deserialized. This hook is invoked regardless of whether the deserialized -// result was an error. -// -// This interceptor IS NOT invoked if the HTTP round-trip was not successful. -// -// Available InterceptorContext fields: -// - Input -// - Output (IF the operation had a success-level response) -// - Request -// - Response -type AfterDeserializationInterceptor interface { - AfterDeserialization(ctx context.Context, in *InterceptorContext) error -} - -// AfterAttemptInterceptor runs right after the incoming HTTP response -// is deserialized. This hook is invoked regardless of whether the deserialized -// result was an error, or if another interceptor within the retry loop -// returned an error. -// -// Available InterceptorContext fields: -// - Input -// - Output (IF the operation had a success-level response) -// - Request (IF the operation did not return an error during serialization) -// - Response (IF the operation was able to transmit the HTTP request) -type AfterAttemptInterceptor interface { - AfterAttempt(ctx context.Context, in *InterceptorContext) error -} - -// AfterExecutionInterceptor runs after everything else. It runs regardless of -// how far the operation progressed in its lifecycle, and regardless of whether -// the operation succeeded or failed. -// -// Available InterceptorContext fields: -// - Input -// - Output (IF the operation had a success-level response) -// - Request (IF the operation did not return an error during serialization) -// - Response (IF the operation was able to transmit the HTTP request) -type AfterExecutionInterceptor interface { - AfterExecution(ctx context.Context, in *InterceptorContext) error -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go b/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go deleted file mode 100644 index 2cc4b57f89..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/interceptor_middleware.go +++ /dev/null @@ -1,325 +0,0 @@ -package http - -import ( - "context" - "errors" - - "github.com/aws/smithy-go/middleware" -) - -type ictxKey struct{} - -func withIctx(ctx context.Context) context.Context { - return middleware.WithStackValue(ctx, ictxKey{}, &InterceptorContext{}) -} - -func getIctx(ctx context.Context) *InterceptorContext { - return middleware.GetStackValue(ctx, ictxKey{}).(*InterceptorContext) -} - -// InterceptExecution runs Before/AfterExecutionInterceptors. -type InterceptExecution struct { - BeforeExecution []BeforeExecutionInterceptor - AfterExecution []AfterExecutionInterceptor -} - -// ID identifies the middleware. -func (m *InterceptExecution) ID() string { - return "InterceptExecution" -} - -// HandleInitialize runs the interceptors. -func (m *InterceptExecution) HandleInitialize( - ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, -) ( - out middleware.InitializeOutput, md middleware.Metadata, err error, -) { - ctx = withIctx(ctx) - getIctx(ctx).Input = in.Parameters - - for _, i := range m.BeforeExecution { - if err := i.BeforeExecution(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - out, md, err = next.HandleInitialize(ctx, in) - - for _, i := range m.AfterExecution { - if err := i.AfterExecution(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return out, md, err -} - -// InterceptBeforeSerialization runs BeforeSerializationInterceptors. -type InterceptBeforeSerialization struct { - Interceptors []BeforeSerializationInterceptor -} - -// ID identifies the middleware. -func (m *InterceptBeforeSerialization) ID() string { - return "InterceptBeforeSerialization" -} - -// HandleSerialize runs the interceptors. -func (m *InterceptBeforeSerialization) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.Interceptors { - if err := i.BeforeSerialization(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return next.HandleSerialize(ctx, in) -} - -// InterceptAfterSerialization runs AfterSerializationInterceptors. -type InterceptAfterSerialization struct { - Interceptors []AfterSerializationInterceptor -} - -// ID identifies the middleware. -func (m *InterceptAfterSerialization) ID() string { - return "InterceptAfterSerialization" -} - -// HandleSerialize runs the interceptors. -func (m *InterceptAfterSerialization) HandleSerialize( - ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, md middleware.Metadata, err error, -) { - getIctx(ctx).Request = in.Request.(*Request) - - for _, i := range m.Interceptors { - if err := i.AfterSerialization(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return next.HandleSerialize(ctx, in) -} - -// InterceptBeforeRetryLoop runs BeforeRetryLoopInterceptors. -type InterceptBeforeRetryLoop struct { - Interceptors []BeforeRetryLoopInterceptor -} - -// ID identifies the middleware. -func (m *InterceptBeforeRetryLoop) ID() string { - return "InterceptBeforeRetryLoop" -} - -// HandleFinalize runs the interceptors. -func (m *InterceptBeforeRetryLoop) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.Interceptors { - if err := i.BeforeRetryLoop(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return next.HandleFinalize(ctx, in) -} - -// InterceptBeforeSigning runs BeforeSigningInterceptors. -type InterceptBeforeSigning struct { - Interceptors []BeforeSigningInterceptor -} - -// ID identifies the middleware. -func (m *InterceptBeforeSigning) ID() string { - return "InterceptBeforeSigning" -} - -// HandleFinalize runs the interceptors. -func (m *InterceptBeforeSigning) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.Interceptors { - if err := i.BeforeSigning(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return next.HandleFinalize(ctx, in) -} - -// InterceptAfterSigning runs AfterSigningInterceptors. -type InterceptAfterSigning struct { - Interceptors []AfterSigningInterceptor -} - -// ID identifies the middleware. -func (m *InterceptAfterSigning) ID() string { - return "InterceptAfterSigning" -} - -// HandleFinalize runs the interceptors. -func (m *InterceptAfterSigning) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.Interceptors { - if err := i.AfterSigning(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return next.HandleFinalize(ctx, in) -} - -// InterceptTransmit runs BeforeTransmitInterceptors and AfterTransmitInterceptors. -type InterceptTransmit struct { - BeforeTransmit []BeforeTransmitInterceptor - AfterTransmit []AfterTransmitInterceptor -} - -// ID identifies the middleware. -func (m *InterceptTransmit) ID() string { - return "InterceptTransmit" -} - -// HandleDeserialize runs the interceptors. -func (m *InterceptTransmit) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.BeforeTransmit { - if err := i.BeforeTransmit(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - out, md, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, md, err - } - - // the root of the decorated middleware guarantees this will be here - // (client.go: ClientHandler.Handle) - getIctx(ctx).Response = out.RawResponse.(*Response) - - for _, i := range m.AfterTransmit { - if err := i.AfterTransmit(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return out, md, err -} - -// InterceptBeforeDeserialization runs BeforeDeserializationInterceptors. -type InterceptBeforeDeserialization struct { - Interceptors []BeforeDeserializationInterceptor -} - -// ID identifies the middleware. -func (m *InterceptBeforeDeserialization) ID() string { - return "InterceptBeforeDeserialization" -} - -// HandleDeserialize runs the interceptors. -func (m *InterceptBeforeDeserialization) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, md middleware.Metadata, err error, -) { - out, md, err = next.HandleDeserialize(ctx, in) - if err != nil { - var terr *RequestSendError - if errors.As(err, &terr) { - return out, md, err - } - } - - for _, i := range m.Interceptors { - if err := i.BeforeDeserialization(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return out, md, err -} - -// InterceptAfterDeserialization runs AfterDeserializationInterceptors. -type InterceptAfterDeserialization struct { - Interceptors []AfterDeserializationInterceptor -} - -// ID identifies the middleware. -func (m *InterceptAfterDeserialization) ID() string { - return "InterceptAfterDeserialization" -} - -// HandleDeserialize runs the interceptors. -func (m *InterceptAfterDeserialization) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, md middleware.Metadata, err error, -) { - out, md, err = next.HandleDeserialize(ctx, in) - if err != nil { - var terr *RequestSendError - if errors.As(err, &terr) { - return out, md, err - } - } - - getIctx(ctx).Output = out.Result - - for _, i := range m.Interceptors { - if err := i.AfterDeserialization(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return out, md, err -} - -// InterceptAttempt runs AfterAttemptInterceptors. -type InterceptAttempt struct { - BeforeAttempt []BeforeAttemptInterceptor - AfterAttempt []AfterAttemptInterceptor -} - -// ID identifies the middleware. -func (m *InterceptAttempt) ID() string { - return "InterceptAttempt" -} - -// HandleFinalize runs the interceptors. -func (m *InterceptAttempt) HandleFinalize( - ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, -) ( - out middleware.FinalizeOutput, md middleware.Metadata, err error, -) { - for _, i := range m.BeforeAttempt { - if err := i.BeforeAttempt(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - out, md, err = next.HandleFinalize(ctx, in) - - for _, i := range m.AfterAttempt { - if err := i.AfterAttempt(ctx, getIctx(ctx)); err != nil { - return out, md, err - } - } - - return out, md, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go b/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go deleted file mode 100644 index 941a8d6b51..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/internal/io/safe.go +++ /dev/null @@ -1,75 +0,0 @@ -package io - -import ( - "io" - "sync" -) - -// NewSafeReadCloser returns a new safeReadCloser that wraps readCloser. -func NewSafeReadCloser(readCloser io.ReadCloser) io.ReadCloser { - sr := &safeReadCloser{ - readCloser: readCloser, - } - - if _, ok := readCloser.(io.WriterTo); ok { - return &safeWriteToReadCloser{safeReadCloser: sr} - } - - return sr -} - -// safeWriteToReadCloser wraps a safeReadCloser but exposes a WriteTo interface implementation. This will panic -// if the underlying io.ReadClose does not support WriteTo. Use NewSafeReadCloser to ensure the proper handling of this -// type. -type safeWriteToReadCloser struct { - *safeReadCloser -} - -// WriteTo implements the io.WriteTo interface. -func (r *safeWriteToReadCloser) WriteTo(w io.Writer) (int64, error) { - r.safeReadCloser.mtx.Lock() - defer r.safeReadCloser.mtx.Unlock() - - if r.safeReadCloser.closed { - return 0, io.EOF - } - - return r.safeReadCloser.readCloser.(io.WriterTo).WriteTo(w) -} - -// safeReadCloser wraps a io.ReadCloser and presents an io.ReadCloser interface. When Close is called on safeReadCloser -// the underlying Close method will be executed, and then the reference to the reader will be dropped. This type -// is meant to be used with the net/http library which will retain a reference to the request body for the lifetime -// of a goroutine connection. Wrapping in this manner will ensure that no data race conditions are falsely reported. -// This type is thread-safe. -type safeReadCloser struct { - readCloser io.ReadCloser - closed bool - mtx sync.Mutex -} - -// Read reads up to len(p) bytes into p from the underlying read. If the reader is closed io.EOF will be returned. -func (r *safeReadCloser) Read(p []byte) (n int, err error) { - r.mtx.Lock() - defer r.mtx.Unlock() - if r.closed { - return 0, io.EOF - } - - return r.readCloser.Read(p) -} - -// Close calls the underlying io.ReadCloser's Close method, removes the reference to the reader, and returns any error -// reported from Close. Subsequent calls to Close will always return a nil error. -func (r *safeReadCloser) Close() error { - r.mtx.Lock() - defer r.mtx.Unlock() - if r.closed { - return nil - } - - r.closed = true - rc := r.readCloser - r.readCloser = nil - return rc.Close() -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go b/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go deleted file mode 100644 index 5d6a4b23a2..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/md5_checksum.go +++ /dev/null @@ -1,25 +0,0 @@ -package http - -import ( - "crypto/md5" - "encoding/base64" - "fmt" - "io" -) - -// computeMD5Checksum computes base64 md5 checksum of an io.Reader's contents. -// Returns the byte slice of md5 checksum and an error. -func computeMD5Checksum(r io.Reader) ([]byte, error) { - h := md5.New() - // copy errors may be assumed to be from the body. - _, err := io.Copy(h, r) - if err != nil { - return nil, fmt.Errorf("failed to read body: %w", err) - } - - // encode the md5 checksum in base64. - sum := h.Sum(nil) - sum64 := make([]byte, base64.StdEncoding.EncodedLen(len(sum))) - base64.StdEncoding.Encode(sum64, sum) - return sum64, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/metrics.go b/vendor/github.com/aws/smithy-go/transport/http/metrics.go deleted file mode 100644 index d1beaa595d..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/metrics.go +++ /dev/null @@ -1,198 +0,0 @@ -package http - -import ( - "context" - "crypto/tls" - "net/http" - "net/http/httptrace" - "sync/atomic" - "time" - - "github.com/aws/smithy-go/metrics" -) - -var now = time.Now - -// withMetrics instruments an HTTP client and context to collect HTTP metrics. -func withMetrics(parent context.Context, client ClientDo, meter metrics.Meter) ( - context.Context, ClientDo, error, -) { - hm, err := newHTTPMetrics(meter) - if err != nil { - return nil, nil, err - } - - ctx := httptrace.WithClientTrace(parent, &httptrace.ClientTrace{ - DNSStart: hm.DNSStart, - ConnectStart: hm.ConnectStart, - TLSHandshakeStart: hm.TLSHandshakeStart, - - GotConn: hm.GotConn(parent), - PutIdleConn: hm.PutIdleConn(parent), - ConnectDone: hm.ConnectDone(parent), - DNSDone: hm.DNSDone(parent), - TLSHandshakeDone: hm.TLSHandshakeDone(parent), - GotFirstResponseByte: hm.GotFirstResponseByte(parent), - }) - return ctx, &timedClientDo{client, hm}, nil -} - -type timedClientDo struct { - ClientDo - hm *httpMetrics -} - -func (c *timedClientDo) Do(r *http.Request) (*http.Response, error) { - c.hm.doStart.Store(now()) - resp, err := c.ClientDo.Do(r) - - c.hm.DoRequestDuration.Record(r.Context(), c.hm.doStart.Elapsed()) - return resp, err -} - -type httpMetrics struct { - DNSLookupDuration metrics.Float64Histogram // client.http.connections.dns_lookup_duration - ConnectDuration metrics.Float64Histogram // client.http.connections.acquire_duration - TLSHandshakeDuration metrics.Float64Histogram // client.http.connections.tls_handshake_duration - ConnectionUsage metrics.Int64UpDownCounter // client.http.connections.usage - - DoRequestDuration metrics.Float64Histogram // client.http.do_request_duration - TimeToFirstByte metrics.Float64Histogram // client.http.time_to_first_byte - - doStart safeTime - dnsStart safeTime - connectStart safeTime - tlsStart safeTime -} - -func newHTTPMetrics(meter metrics.Meter) (*httpMetrics, error) { - hm := &httpMetrics{} - - var err error - hm.DNSLookupDuration, err = meter.Float64Histogram("client.http.connections.dns_lookup_duration", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "The time it takes a request to perform DNS lookup." - }) - if err != nil { - return nil, err - } - hm.ConnectDuration, err = meter.Float64Histogram("client.http.connections.acquire_duration", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "The time it takes a request to acquire a connection." - }) - if err != nil { - return nil, err - } - hm.TLSHandshakeDuration, err = meter.Float64Histogram("client.http.connections.tls_handshake_duration", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "The time it takes an HTTP request to perform the TLS handshake." - }) - if err != nil { - return nil, err - } - hm.ConnectionUsage, err = meter.Int64UpDownCounter("client.http.connections.usage", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "{connection}" - o.Description = "Current state of connections pool." - }) - if err != nil { - return nil, err - } - hm.DoRequestDuration, err = meter.Float64Histogram("client.http.do_request_duration", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "Time spent performing an entire HTTP transaction." - }) - if err != nil { - return nil, err - } - hm.TimeToFirstByte, err = meter.Float64Histogram("client.http.time_to_first_byte", func(o *metrics.InstrumentOptions) { - o.UnitLabel = "s" - o.Description = "Time from start of transaction to when the first response byte is available." - }) - if err != nil { - return nil, err - } - - return hm, nil -} - -func (m *httpMetrics) DNSStart(httptrace.DNSStartInfo) { - m.dnsStart.Store(now()) -} - -func (m *httpMetrics) ConnectStart(string, string) { - m.connectStart.Store(now()) -} - -func (m *httpMetrics) TLSHandshakeStart() { - m.tlsStart.Store(now()) -} - -func (m *httpMetrics) GotConn(ctx context.Context) func(httptrace.GotConnInfo) { - return func(httptrace.GotConnInfo) { - m.addConnAcquired(ctx, 1) - } -} - -func (m *httpMetrics) PutIdleConn(ctx context.Context) func(error) { - return func(error) { - m.addConnAcquired(ctx, -1) - } -} - -func (m *httpMetrics) DNSDone(ctx context.Context) func(httptrace.DNSDoneInfo) { - return func(httptrace.DNSDoneInfo) { - m.DNSLookupDuration.Record(ctx, m.dnsStart.Elapsed()) - } -} - -func (m *httpMetrics) ConnectDone(ctx context.Context) func(string, string, error) { - return func(string, string, error) { - m.ConnectDuration.Record(ctx, m.connectStart.Elapsed()) - } -} - -func (m *httpMetrics) TLSHandshakeDone(ctx context.Context) func(tls.ConnectionState, error) { - return func(tls.ConnectionState, error) { - m.TLSHandshakeDuration.Record(ctx, m.tlsStart.Elapsed()) - } -} - -func (m *httpMetrics) GotFirstResponseByte(ctx context.Context) func() { - return func() { - m.TimeToFirstByte.Record(ctx, m.doStart.Elapsed()) - } -} - -func (m *httpMetrics) addConnAcquired(ctx context.Context, incr int64) { - m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("state", "acquired") - }) -} - -// Not used: it is recommended to track acquired vs idle conn, but we can't -// determine when something is truly idle with the current HTTP client hooks -// available to us. -func (m *httpMetrics) addConnIdle(ctx context.Context, incr int64) { - m.ConnectionUsage.Add(ctx, incr, func(o *metrics.RecordMetricOptions) { - o.Properties.Set("state", "idle") - }) -} - -type safeTime struct { - atomic.Value // time.Time -} - -func (st *safeTime) Store(v time.Time) { - st.Value.Store(v) -} - -func (st *safeTime) Load() time.Time { - t, _ := st.Value.Load().(time.Time) - return t -} - -func (st *safeTime) Elapsed() float64 { - end := now() - elapsed := end.Sub(st.Load()) - return float64(elapsed) / 1e9 -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go deleted file mode 100644 index 914338f2e7..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_close_response_body.go +++ /dev/null @@ -1,79 +0,0 @@ -package http - -import ( - "context" - "io" - - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// AddErrorCloseResponseBodyMiddleware adds the middleware to automatically -// close the response body of an operation request if the request response -// failed. -func AddErrorCloseResponseBodyMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&errorCloseResponseBodyMiddleware{}, "OperationDeserializer", middleware.Before) -} - -type errorCloseResponseBodyMiddleware struct{} - -func (*errorCloseResponseBodyMiddleware) ID() string { - return "ErrorCloseResponseBody" -} - -func (m *errorCloseResponseBodyMiddleware) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err := next.HandleDeserialize(ctx, input) - if err != nil { - if resp, ok := out.RawResponse.(*Response); ok && resp != nil && resp.Body != nil { - // Consume the full body to prevent TCP connection resets on some platforms - _, _ = io.Copy(io.Discard, resp.Body) - // Do not validate that the response closes successfully. - resp.Body.Close() - } - } - - return out, metadata, err -} - -// AddCloseResponseBodyMiddleware adds the middleware to automatically close -// the response body of an operation request, after the response had been -// deserialized. -func AddCloseResponseBodyMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&closeResponseBody{}, "OperationDeserializer", middleware.Before) -} - -type closeResponseBody struct{} - -func (*closeResponseBody) ID() string { - return "CloseResponseBody" -} - -func (m *closeResponseBody) HandleDeserialize( - ctx context.Context, input middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - output middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err := next.HandleDeserialize(ctx, input) - if err != nil { - return out, metadata, err - } - - if resp, ok := out.RawResponse.(*Response); ok { - // Consume the full body to prevent TCP connection resets on some platforms - _, copyErr := io.Copy(io.Discard, resp.Body) - if copyErr != nil { - middleware.GetLogger(ctx).Logf(logging.Warn, "failed to discard remaining HTTP response body, this may affect connection reuse") - } - - closeErr := resp.Body.Close() - if closeErr != nil { - middleware.GetLogger(ctx).Logf(logging.Warn, "failed to close HTTP response body, this may affect connection reuse") - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go deleted file mode 100644 index 9969389bb2..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_content_length.go +++ /dev/null @@ -1,84 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -// ComputeContentLength provides a middleware to set the content-length -// header for the length of a serialize request body. -type ComputeContentLength struct { -} - -// AddComputeContentLengthMiddleware adds ComputeContentLength to the middleware -// stack's Build step. -func AddComputeContentLengthMiddleware(stack *middleware.Stack) error { - return stack.Build.Add(&ComputeContentLength{}, middleware.After) -} - -// ID returns the identifier for the ComputeContentLength. -func (m *ComputeContentLength) ID() string { return "ComputeContentLength" } - -// HandleBuild adds the length of the serialized request to the HTTP header -// if the length can be determined. -func (m *ComputeContentLength) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // do nothing if request content-length was set to 0 or above. - if req.ContentLength >= 0 { - return next.HandleBuild(ctx, in) - } - - // attempt to compute stream length - if n, ok, err := req.StreamLength(); err != nil { - return out, metadata, fmt.Errorf( - "failed getting length of request stream, %w", err) - } else if ok { - req.ContentLength = n - } - - return next.HandleBuild(ctx, in) -} - -// validateContentLength provides a middleware to validate the content-length -// is valid (greater than zero), for the serialized request payload. -type validateContentLength struct{} - -// ValidateContentLengthHeader adds middleware that validates request content-length -// is set to value greater than zero. -func ValidateContentLengthHeader(stack *middleware.Stack) error { - return stack.Build.Add(&validateContentLength{}, middleware.After) -} - -// ID returns the identifier for the ComputeContentLength. -func (m *validateContentLength) ID() string { return "ValidateContentLength" } - -// HandleBuild adds the length of the serialized request to the HTTP header -// if the length can be determined. -func (m *validateContentLength) HandleBuild( - ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, -) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown request type %T", req) - } - - // if request content-length was set to less than 0, return an error - if req.ContentLength < 0 { - return out, metadata, fmt.Errorf( - "content length for payload is required and must be at least 0") - } - - return next.HandleBuild(ctx, in) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go deleted file mode 100644 index 855c227203..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_header_comment.go +++ /dev/null @@ -1,81 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http" - - "github.com/aws/smithy-go/middleware" -) - -// WithHeaderComment instruments a middleware stack to append an HTTP field -// comment to the given header as specified in RFC 9110 -// (https://www.rfc-editor.org/rfc/rfc9110#name-comments). -// -// The header is case-insensitive. If the provided header exists when the -// middleware runs, the content will be inserted as-is enclosed in parentheses. -// -// Note that per the HTTP specification, comments are only allowed in fields -// containing "comment" as part of their field value definition, but this API -// will NOT verify whether the provided header is one of them. -// -// WithHeaderComment MAY be applied more than once to a middleware stack and/or -// more than once per header. -func WithHeaderComment(header, content string) func(*middleware.Stack) error { - return func(s *middleware.Stack) error { - m, err := getOrAddHeaderComment(s) - if err != nil { - return fmt.Errorf("get or add header comment: %v", err) - } - - m.values.Add(header, content) - return nil - } -} - -type headerCommentMiddleware struct { - values http.Header // hijack case-insensitive access APIs -} - -func (*headerCommentMiddleware) ID() string { - return "headerComment" -} - -func (m *headerCommentMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( - out middleware.BuildOutput, metadata middleware.Metadata, err error, -) { - r, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - for h, contents := range m.values { - for _, c := range contents { - if existing := r.Header.Get(h); existing != "" { - r.Header.Set(h, fmt.Sprintf("%s (%s)", existing, c)) - } - } - } - - return next.HandleBuild(ctx, in) -} - -func getOrAddHeaderComment(s *middleware.Stack) (*headerCommentMiddleware, error) { - id := (*headerCommentMiddleware)(nil).ID() - m, ok := s.Build.Get(id) - if !ok { - m := &headerCommentMiddleware{values: http.Header{}} - if err := s.Build.Add(m, middleware.After); err != nil { - return nil, fmt.Errorf("add build: %v", err) - } - - return m, nil - } - - hc, ok := m.(*headerCommentMiddleware) - if !ok { - return nil, fmt.Errorf("existing middleware w/ id %s is not *headerCommentMiddleware", id) - } - - return hc, nil -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go deleted file mode 100644 index eac32b4bab..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_headers.go +++ /dev/null @@ -1,167 +0,0 @@ -package http - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/middleware" -) - -type isContentTypeAutoSet struct{} - -// SetIsContentTypeDefaultValue returns a Context specifying if the request's -// content-type header was set to a default value. -func SetIsContentTypeDefaultValue(ctx context.Context, isDefault bool) context.Context { - return context.WithValue(ctx, isContentTypeAutoSet{}, isDefault) -} - -// GetIsContentTypeDefaultValue returns if the content-type HTTP header on the -// request is a default value that was auto assigned by an operation -// serializer. Allows middleware post serialization to know if the content-type -// was auto set to a default value or not. -// -// Also returns false if the Context value was never updated to include if -// content-type was set to a default value. -func GetIsContentTypeDefaultValue(ctx context.Context) bool { - v, _ := ctx.Value(isContentTypeAutoSet{}).(bool) - return v -} - -// AddNoPayloadDefaultContentTypeRemover Adds the DefaultContentTypeRemover -// middleware to the stack after the operation serializer. This middleware will -// remove the content-type header from the request if it was set as a default -// value, and no request payload is present. -// -// Returns error if unable to add the middleware. -func AddNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) { - err = stack.Serialize.Insert(removeDefaultContentType{}, - "OperationSerializer", middleware.After) - if err != nil { - return fmt.Errorf("failed to add %s serialize middleware, %w", - removeDefaultContentType{}.ID(), err) - } - - return nil -} - -// RemoveNoPayloadDefaultContentTypeRemover removes the -// DefaultContentTypeRemover middleware from the stack. Returns an error if -// unable to remove the middleware. -func RemoveNoPayloadDefaultContentTypeRemover(stack *middleware.Stack) (err error) { - _, err = stack.Serialize.Remove(removeDefaultContentType{}.ID()) - if err != nil { - return fmt.Errorf("failed to remove %s serialize middleware, %w", - removeDefaultContentType{}.ID(), err) - - } - return nil -} - -// removeDefaultContentType provides after serialization middleware that will -// remove the content-type header from an HTTP request if the header was set as -// a default value by the operation serializer, and there is no request payload. -type removeDefaultContentType struct{} - -// ID returns the middleware ID -func (removeDefaultContentType) ID() string { return "RemoveDefaultContentType" } - -// HandleSerialize implements the serialization middleware. -func (removeDefaultContentType) HandleSerialize( - ctx context.Context, input middleware.SerializeInput, next middleware.SerializeHandler, -) ( - out middleware.SerializeOutput, meta middleware.Metadata, err error, -) { - req, ok := input.Request.(*Request) - if !ok { - return out, meta, fmt.Errorf( - "unexpected request type %T for removeDefaultContentType middleware", - input.Request) - } - - if GetIsContentTypeDefaultValue(ctx) && req.GetStream() == nil { - req.Header.Del("Content-Type") - input.Request = req - } - - return next.HandleSerialize(ctx, input) -} - -type headerValue struct { - header string - value string - append bool -} - -type headerValueHelper struct { - headerValues []headerValue -} - -func (h *headerValueHelper) addHeaderValue(value headerValue) { - h.headerValues = append(h.headerValues, value) -} - -func (h *headerValueHelper) ID() string { - return "HTTPHeaderHelper" -} - -func (h *headerValueHelper) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) (out middleware.BuildOutput, metadata middleware.Metadata, err error) { - req, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - for _, value := range h.headerValues { - if value.append { - req.Header.Add(value.header, value.value) - } else { - req.Header.Set(value.header, value.value) - } - } - - return next.HandleBuild(ctx, in) -} - -func getOrAddHeaderValueHelper(stack *middleware.Stack) (*headerValueHelper, error) { - id := (*headerValueHelper)(nil).ID() - m, ok := stack.Build.Get(id) - if !ok { - m = &headerValueHelper{} - err := stack.Build.Add(m, middleware.After) - if err != nil { - return nil, err - } - } - - requestUserAgent, ok := m.(*headerValueHelper) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", m, id) - } - - return requestUserAgent, nil -} - -// AddHeaderValue returns a stack mutator that adds the header value pair to header. -// Appends to any existing values if present. -func AddHeaderValue(header string, value string) func(stack *middleware.Stack) error { - return func(stack *middleware.Stack) error { - helper, err := getOrAddHeaderValueHelper(stack) - if err != nil { - return err - } - helper.addHeaderValue(headerValue{header: header, value: value, append: true}) - return nil - } -} - -// SetHeaderValue returns a stack mutator that adds the header value pair to header. -// Replaces any existing values if present. -func SetHeaderValue(header string, value string) func(stack *middleware.Stack) error { - return func(stack *middleware.Stack) error { - helper, err := getOrAddHeaderValueHelper(stack) - if err != nil { - return err - } - helper.addHeaderValue(headerValue{header: header, value: value, append: false}) - return nil - } -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go deleted file mode 100644 index d5909b0a24..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_http_logging.go +++ /dev/null @@ -1,75 +0,0 @@ -package http - -import ( - "context" - "fmt" - "net/http/httputil" - - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// RequestResponseLogger is a deserialize middleware that will log the request and response HTTP messages and optionally -// their respective bodies. Will not perform any logging if none of the options are set. -type RequestResponseLogger struct { - LogRequest bool - LogRequestWithBody bool - - LogResponse bool - LogResponseWithBody bool -} - -// ID is the middleware identifier. -func (r *RequestResponseLogger) ID() string { - return "RequestResponseLogger" -} - -// HandleDeserialize will log the request and response HTTP messages if configured accordingly. -func (r *RequestResponseLogger) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - logger := middleware.GetLogger(ctx) - - if r.LogRequest || r.LogRequestWithBody { - smithyRequest, ok := in.Request.(*Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in) - } - - rc := smithyRequest.Build(ctx) - reqBytes, err := httputil.DumpRequestOut(rc, r.LogRequestWithBody) - if err != nil { - return out, metadata, err - } - - logger.Logf(logging.Debug, "Request\n%v", string(reqBytes)) - - if r.LogRequestWithBody { - smithyRequest, err = smithyRequest.SetStream(rc.Body) - if err != nil { - return out, metadata, err - } - in.Request = smithyRequest - } - } - - out, metadata, err = next.HandleDeserialize(ctx, in) - - if (err == nil) && (r.LogResponse || r.LogResponseWithBody) { - smithyResponse, ok := out.RawResponse.(*Response) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", out.RawResponse) - } - - respBytes, err := httputil.DumpResponse(smithyResponse.Response, r.LogResponseWithBody) - if err != nil { - return out, metadata, fmt.Errorf("failed to dump response %w", err) - } - - logger.Logf(logging.Debug, "Response\n%v", string(respBytes)) - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go deleted file mode 100644 index d6079b2595..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_metadata.go +++ /dev/null @@ -1,51 +0,0 @@ -package http - -import ( - "context" - - "github.com/aws/smithy-go/middleware" -) - -type ( - hostnameImmutableKey struct{} - hostPrefixDisableKey struct{} -) - -// GetHostnameImmutable retrieves whether the endpoint hostname should be considered -// immutable or not. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func GetHostnameImmutable(ctx context.Context) (v bool) { - v, _ = middleware.GetStackValue(ctx, hostnameImmutableKey{}).(bool) - return v -} - -// SetHostnameImmutable sets or modifies whether the request's endpoint hostname -// should be considered immutable or not. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func SetHostnameImmutable(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, hostnameImmutableKey{}, value) -} - -// IsEndpointHostPrefixDisabled retrieves whether the hostname prefixing is -// disabled. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func IsEndpointHostPrefixDisabled(ctx context.Context) (v bool) { - v, _ = middleware.GetStackValue(ctx, hostPrefixDisableKey{}).(bool) - return v -} - -// DisableEndpointHostPrefix sets or modifies whether the request's endpoint host -// prefixing should be disabled. If value is true, endpoint host prefixing -// will be disabled. -// -// Scoped to stack values. Use middleware#ClearStackValues to clear all stack -// values. -func DisableEndpointHostPrefix(ctx context.Context, value bool) context.Context { - return middleware.WithStackValue(ctx, hostPrefixDisableKey{}, value) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go b/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go deleted file mode 100644 index 326cb8a6ca..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/middleware_min_proto.go +++ /dev/null @@ -1,79 +0,0 @@ -package http - -import ( - "context" - "fmt" - "github.com/aws/smithy-go/middleware" - "strings" -) - -// MinimumProtocolError is an error type indicating that the established connection did not meet the expected minimum -// HTTP protocol version. -type MinimumProtocolError struct { - proto string - expectedProtoMajor int - expectedProtoMinor int -} - -// Error returns the error message. -func (m *MinimumProtocolError) Error() string { - return fmt.Sprintf("operation requires minimum HTTP protocol of HTTP/%d.%d, but was %s", - m.expectedProtoMajor, m.expectedProtoMinor, m.proto) -} - -// RequireMinimumProtocol is a deserialization middleware that asserts that the established HTTP connection -// meets the minimum major ad minor version. -type RequireMinimumProtocol struct { - ProtoMajor int - ProtoMinor int -} - -// AddRequireMinimumProtocol adds the RequireMinimumProtocol middleware to the stack using the provided minimum -// protocol major and minor version. -func AddRequireMinimumProtocol(stack *middleware.Stack, major, minor int) error { - return stack.Deserialize.Insert(&RequireMinimumProtocol{ - ProtoMajor: major, - ProtoMinor: minor, - }, "OperationDeserializer", middleware.Before) -} - -// ID returns the middleware identifier string. -func (r *RequireMinimumProtocol) ID() string { - return "RequireMinimumProtocol" -} - -// HandleDeserialize asserts that the established connection is a HTTP connection with the minimum major and minor -// protocol version. -func (r *RequireMinimumProtocol) HandleDeserialize( - ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler, -) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - response, ok := out.RawResponse.(*Response) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type: %T", out.RawResponse) - } - - if !strings.HasPrefix(response.Proto, "HTTP") { - return out, metadata, &MinimumProtocolError{ - proto: response.Proto, - expectedProtoMajor: r.ProtoMajor, - expectedProtoMinor: r.ProtoMinor, - } - } - - if response.ProtoMajor < r.ProtoMajor || response.ProtoMinor < r.ProtoMinor { - return out, metadata, &MinimumProtocolError{ - proto: response.Proto, - expectedProtoMajor: r.ProtoMajor, - expectedProtoMinor: r.ProtoMinor, - } - } - - return out, metadata, err -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/properties.go b/vendor/github.com/aws/smithy-go/transport/http/properties.go deleted file mode 100644 index c65aa39320..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/properties.go +++ /dev/null @@ -1,80 +0,0 @@ -package http - -import smithy "github.com/aws/smithy-go" - -type ( - sigV4SigningNameKey struct{} - sigV4SigningRegionKey struct{} - - sigV4ASigningNameKey struct{} - sigV4ASigningRegionsKey struct{} - - isUnsignedPayloadKey struct{} - disableDoubleEncodingKey struct{} -) - -// GetSigV4SigningName gets the signing name from Properties. -func GetSigV4SigningName(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4SigningNameKey{}).(string) - return v, ok -} - -// SetSigV4SigningName sets the signing name on Properties. -func SetSigV4SigningName(p *smithy.Properties, name string) { - p.Set(sigV4SigningNameKey{}, name) -} - -// GetSigV4SigningRegion gets the signing region from Properties. -func GetSigV4SigningRegion(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4SigningRegionKey{}).(string) - return v, ok -} - -// SetSigV4SigningRegion sets the signing region on Properties. -func SetSigV4SigningRegion(p *smithy.Properties, region string) { - p.Set(sigV4SigningRegionKey{}, region) -} - -// GetSigV4ASigningName gets the v4a signing name from Properties. -func GetSigV4ASigningName(p *smithy.Properties) (string, bool) { - v, ok := p.Get(sigV4ASigningNameKey{}).(string) - return v, ok -} - -// SetSigV4ASigningName sets the signing name on Properties. -func SetSigV4ASigningName(p *smithy.Properties, name string) { - p.Set(sigV4ASigningNameKey{}, name) -} - -// GetSigV4ASigningRegion gets the v4a signing region set from Properties. -func GetSigV4ASigningRegions(p *smithy.Properties) ([]string, bool) { - v, ok := p.Get(sigV4ASigningRegionsKey{}).([]string) - return v, ok -} - -// SetSigV4ASigningRegions sets the v4a signing region set on Properties. -func SetSigV4ASigningRegions(p *smithy.Properties, regions []string) { - p.Set(sigV4ASigningRegionsKey{}, regions) -} - -// GetIsUnsignedPayload gets whether the payload is unsigned from Properties. -func GetIsUnsignedPayload(p *smithy.Properties) (bool, bool) { - v, ok := p.Get(isUnsignedPayloadKey{}).(bool) - return v, ok -} - -// SetIsUnsignedPayload sets whether the payload is unsigned on Properties. -func SetIsUnsignedPayload(p *smithy.Properties, isUnsignedPayload bool) { - p.Set(isUnsignedPayloadKey{}, isUnsignedPayload) -} - -// GetDisableDoubleEncoding gets whether the payload is unsigned from Properties. -func GetDisableDoubleEncoding(p *smithy.Properties) (bool, bool) { - v, ok := p.Get(disableDoubleEncodingKey{}).(bool) - return v, ok -} - -// SetDisableDoubleEncoding sets whether the payload is unsigned on Properties. -func SetDisableDoubleEncoding(p *smithy.Properties, disableDoubleEncoding bool) { - p.Set(disableDoubleEncodingKey{}, disableDoubleEncoding) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/request.go b/vendor/github.com/aws/smithy-go/transport/http/request.go deleted file mode 100644 index 5cbf6f10ac..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/request.go +++ /dev/null @@ -1,188 +0,0 @@ -package http - -import ( - "context" - "fmt" - "io" - "net/http" - "net/url" - "strings" - - iointernal "github.com/aws/smithy-go/transport/http/internal/io" -) - -// Request provides the HTTP specific request structure for HTTP specific -// middleware steps to use to serialize input, and send an operation's request. -type Request struct { - *http.Request - stream io.Reader - isStreamSeekable bool - streamStartPos int64 -} - -// NewStackRequest returns an initialized request ready to be populated with the -// HTTP request details. Returns empty interface so the function can be used as -// a parameter to the Smithy middleware Stack constructor. -func NewStackRequest() interface{} { - return &Request{ - Request: &http.Request{ - URL: &url.URL{}, - Header: http.Header{}, - ContentLength: -1, // default to unknown length - }, - } -} - -// IsHTTPS returns if the request is HTTPS. Returns false if no endpoint URL is set. -func (r *Request) IsHTTPS() bool { - if r.URL == nil { - return false - } - return strings.EqualFold(r.URL.Scheme, "https") -} - -// Clone returns a deep copy of the Request for the new context. A reference to -// the Stream is copied, but the underlying stream is not copied. -func (r *Request) Clone() *Request { - rc := *r - rc.Request = rc.Request.Clone(context.TODO()) - return &rc -} - -// StreamLength returns the number of bytes of the serialized stream attached -// to the request and ok set. If the length cannot be determined, an error will -// be returned. -func (r *Request) StreamLength() (size int64, ok bool, err error) { - return streamLength(r.stream, r.isStreamSeekable, r.streamStartPos) -} - -func streamLength(stream io.Reader, seekable bool, startPos int64) (size int64, ok bool, err error) { - if stream == nil { - return 0, true, nil - } - - if l, ok := stream.(interface{ Len() int }); ok { - return int64(l.Len()), true, nil - } - - if !seekable { - return 0, false, nil - } - - s := stream.(io.Seeker) - endOffset, err := s.Seek(0, io.SeekEnd) - if err != nil { - return 0, false, err - } - - // The reason to seek to streamStartPos instead of 0 is to ensure that the - // SDK only sends the stream from the starting position the user's - // application provided it to the SDK at. For example application opens a - // file, and wants to skip the first N bytes uploading the rest. The - // application would move the file's offset N bytes, then hand it off to - // the SDK to send the remaining. The SDK should respect that initial offset. - _, err = s.Seek(startPos, io.SeekStart) - if err != nil { - return 0, false, err - } - - return endOffset - startPos, true, nil -} - -// RewindStream will rewind the io.Reader to the relative start position if it -// is an io.Seeker. -func (r *Request) RewindStream() error { - // If there is no stream there is nothing to rewind. - if r.stream == nil { - return nil - } - - if !r.isStreamSeekable { - return fmt.Errorf("request stream is not seekable") - } - _, err := r.stream.(io.Seeker).Seek(r.streamStartPos, io.SeekStart) - return err -} - -// GetStream returns the request stream io.Reader if a stream is set. If no -// stream is present nil will be returned. -func (r *Request) GetStream() io.Reader { - return r.stream -} - -// IsStreamSeekable returns whether the stream is seekable. -func (r *Request) IsStreamSeekable() bool { - return r.isStreamSeekable -} - -// SetStream returns a clone of the request with the stream set to the provided -// reader. May return an error if the provided reader is seekable but returns -// an error. -func (r *Request) SetStream(reader io.Reader) (rc *Request, err error) { - rc = r.Clone() - - if reader == http.NoBody { - reader = nil - } - - var isStreamSeekable bool - var streamStartPos int64 - switch v := reader.(type) { - case io.Seeker: - n, err := v.Seek(0, io.SeekCurrent) - if err != nil { - return r, err - } - isStreamSeekable = true - streamStartPos = n - default: - // If the stream length can be determined, and is determined to be empty, - // use a nil stream to prevent confusion between empty vs not-empty - // streams. - length, ok, err := streamLength(reader, false, 0) - if err != nil { - return nil, err - } else if ok && length == 0 { - reader = nil - } - } - - rc.stream = reader - rc.isStreamSeekable = isStreamSeekable - rc.streamStartPos = streamStartPos - - return rc, err -} - -// Build returns a build standard HTTP request value from the Smithy request. -// The request's stream is wrapped in a safe container that allows it to be -// reused for subsequent attempts. -func (r *Request) Build(ctx context.Context) *http.Request { - req := r.Request.Clone(ctx) - - if r.stream == nil && req.ContentLength == -1 { - req.ContentLength = 0 - } - - switch stream := r.stream.(type) { - case *io.PipeReader: - req.Body = io.NopCloser(stream) - req.ContentLength = -1 - default: - // HTTP Client Request must only have a non-nil body if the - // ContentLength is explicitly unknown (-1) or non-zero. The HTTP - // Client will interpret a non-nil body and ContentLength 0 as - // "unknown". This is unwanted behavior. - if req.ContentLength != 0 && r.stream != nil { - req.Body = iointernal.NewSafeReadCloser(io.NopCloser(stream)) - } - } - - return req -} - -// RequestCloner is a function that can take an input request type and clone the request -// for use in a subsequent retry attempt. -func RequestCloner(v interface{}) interface{} { - return v.(*Request).Clone() -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/response.go b/vendor/github.com/aws/smithy-go/transport/http/response.go deleted file mode 100644 index 0c13bfcc8e..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/response.go +++ /dev/null @@ -1,34 +0,0 @@ -package http - -import ( - "fmt" - "net/http" -) - -// Response provides the HTTP specific response structure for HTTP specific -// middleware steps to use to deserialize the response from an operation call. -type Response struct { - *http.Response -} - -// ResponseError provides the HTTP centric error type wrapping the underlying -// error with the HTTP response value. -type ResponseError struct { - Response *Response - Err error -} - -// HTTPStatusCode returns the HTTP response status code received from the service. -func (e *ResponseError) HTTPStatusCode() int { return e.Response.StatusCode } - -// HTTPResponse returns the HTTP response received from the service. -func (e *ResponseError) HTTPResponse() *Response { return e.Response } - -// Unwrap returns the nested error if any, or nil. -func (e *ResponseError) Unwrap() error { return e.Err } - -func (e *ResponseError) Error() string { - return fmt.Sprintf( - "http response error StatusCode: %d, %v", - e.Response.StatusCode, e.Err) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/time.go b/vendor/github.com/aws/smithy-go/transport/http/time.go deleted file mode 100644 index 607b196a8b..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/time.go +++ /dev/null @@ -1,13 +0,0 @@ -package http - -import ( - "time" - - smithytime "github.com/aws/smithy-go/time" -) - -// ParseTime parses a time string like the HTTP Date header. This uses a more -// relaxed rule set for date parsing compared to the standard library. -func ParseTime(text string) (t time.Time, err error) { - return smithytime.ParseHTTPDate(text) -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/url.go b/vendor/github.com/aws/smithy-go/transport/http/url.go deleted file mode 100644 index 60a5fc1002..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/url.go +++ /dev/null @@ -1,44 +0,0 @@ -package http - -import "strings" - -// JoinPath returns an absolute URL path composed of the two paths provided. -// Enforces that the returned path begins with '/'. If added path is empty the -// returned path suffix will match the first parameter suffix. -func JoinPath(a, b string) string { - if len(a) == 0 { - a = "/" - } else if a[0] != '/' { - a = "/" + a - } - - if len(b) != 0 && b[0] == '/' { - b = b[1:] - } - - if len(b) != 0 && len(a) > 1 && a[len(a)-1] != '/' { - a = a + "/" - } - - return a + b -} - -// JoinRawQuery returns an absolute raw query expression. Any duplicate '&' -// will be collapsed to single separator between values. -func JoinRawQuery(a, b string) string { - a = strings.TrimFunc(a, isAmpersand) - b = strings.TrimFunc(b, isAmpersand) - - if len(a) == 0 { - return b - } - if len(b) == 0 { - return a - } - - return a + "&" + b -} - -func isAmpersand(v rune) bool { - return v == '&' -} diff --git a/vendor/github.com/aws/smithy-go/transport/http/user_agent.go b/vendor/github.com/aws/smithy-go/transport/http/user_agent.go deleted file mode 100644 index 71a7e0d8af..0000000000 --- a/vendor/github.com/aws/smithy-go/transport/http/user_agent.go +++ /dev/null @@ -1,37 +0,0 @@ -package http - -import ( - "strings" -) - -// UserAgentBuilder is a builder for a HTTP User-Agent string. -type UserAgentBuilder struct { - sb strings.Builder -} - -// NewUserAgentBuilder returns a new UserAgentBuilder. -func NewUserAgentBuilder() *UserAgentBuilder { - return &UserAgentBuilder{sb: strings.Builder{}} -} - -// AddKey adds the named component/product to the agent string -func (u *UserAgentBuilder) AddKey(key string) { - u.appendTo(key) -} - -// AddKeyValue adds the named key to the agent string with the given value. -func (u *UserAgentBuilder) AddKeyValue(key, value string) { - u.appendTo(key + "/" + value) -} - -// Build returns the constructed User-Agent string. May be called multiple times. -func (u *UserAgentBuilder) Build() string { - return u.sb.String() -} - -func (u *UserAgentBuilder) appendTo(value string) { - if u.sb.Len() > 0 { - u.sb.WriteRune(' ') - } - u.sb.WriteString(value) -} diff --git a/vendor/github.com/aws/smithy-go/validation.go b/vendor/github.com/aws/smithy-go/validation.go deleted file mode 100644 index b5eedc1f90..0000000000 --- a/vendor/github.com/aws/smithy-go/validation.go +++ /dev/null @@ -1,140 +0,0 @@ -package smithy - -import ( - "bytes" - "fmt" - "strings" -) - -// An InvalidParamsError provides wrapping of invalid parameter errors found when -// validating API operation input parameters. -type InvalidParamsError struct { - // Context is the base context of the invalid parameter group. - Context string - errs []InvalidParamError -} - -// Add adds a new invalid parameter error to the collection of invalid -// parameters. The context of the invalid parameter will be updated to reflect -// this collection. -func (e *InvalidParamsError) Add(err InvalidParamError) { - err.SetContext(e.Context) - e.errs = append(e.errs, err) -} - -// AddNested adds the invalid parameter errors from another InvalidParamsError -// value into this collection. The nested errors will have their nested context -// updated and base context to reflect the merging. -// -// Use for nested validations errors. -func (e *InvalidParamsError) AddNested(nestedCtx string, nested InvalidParamsError) { - for _, err := range nested.errs { - err.SetContext(e.Context) - err.AddNestedContext(nestedCtx) - e.errs = append(e.errs, err) - } -} - -// Len returns the number of invalid parameter errors -func (e *InvalidParamsError) Len() int { - return len(e.errs) -} - -// Error returns the string formatted form of the invalid parameters. -func (e InvalidParamsError) Error() string { - w := &bytes.Buffer{} - fmt.Fprintf(w, "%d validation error(s) found.\n", len(e.errs)) - - for _, err := range e.errs { - fmt.Fprintf(w, "- %s\n", err.Error()) - } - - return w.String() -} - -// Errs returns a slice of the invalid parameters -func (e InvalidParamsError) Errs() []error { - errs := make([]error, len(e.errs)) - for i := 0; i < len(errs); i++ { - errs[i] = e.errs[i] - } - - return errs -} - -// An InvalidParamError represents an invalid parameter error type. -type InvalidParamError interface { - error - - // Field name the error occurred on. - Field() string - - // SetContext updates the context of the error. - SetContext(string) - - // AddNestedContext updates the error's context to include a nested level. - AddNestedContext(string) -} - -type invalidParamError struct { - context string - nestedContext string - field string - reason string -} - -// Error returns the string version of the invalid parameter error. -func (e invalidParamError) Error() string { - return fmt.Sprintf("%s, %s.", e.reason, e.Field()) -} - -// Field Returns the field and context the error occurred. -func (e invalidParamError) Field() string { - sb := &strings.Builder{} - sb.WriteString(e.context) - if sb.Len() > 0 { - if len(e.nestedContext) == 0 || (len(e.nestedContext) > 0 && e.nestedContext[:1] != "[") { - sb.WriteRune('.') - } - } - if len(e.nestedContext) > 0 { - sb.WriteString(e.nestedContext) - sb.WriteRune('.') - } - sb.WriteString(e.field) - return sb.String() -} - -// SetContext updates the base context of the error. -func (e *invalidParamError) SetContext(ctx string) { - e.context = ctx -} - -// AddNestedContext prepends a context to the field's path. -func (e *invalidParamError) AddNestedContext(ctx string) { - if len(e.nestedContext) == 0 { - e.nestedContext = ctx - return - } - // Check if our nested context is an index into a slice or map - if e.nestedContext[:1] != "[" { - e.nestedContext = fmt.Sprintf("%s.%s", ctx, e.nestedContext) - return - } - e.nestedContext = ctx + e.nestedContext -} - -// An ParamRequiredError represents an required parameter error. -type ParamRequiredError struct { - invalidParamError -} - -// NewErrParamRequired creates a new required parameter error. -func NewErrParamRequired(field string) *ParamRequiredError { - return &ParamRequiredError{ - invalidParamError{ - field: field, - reason: fmt.Sprintf("missing required field"), - }, - } -} diff --git a/vendor/github.com/aws/smithy-go/waiter/logger.go b/vendor/github.com/aws/smithy-go/waiter/logger.go deleted file mode 100644 index 8d70a03ff2..0000000000 --- a/vendor/github.com/aws/smithy-go/waiter/logger.go +++ /dev/null @@ -1,36 +0,0 @@ -package waiter - -import ( - "context" - "fmt" - - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" -) - -// Logger is the Logger middleware used by the waiter to log an attempt -type Logger struct { - // Attempt is the current attempt to be logged - Attempt int64 -} - -// ID representing the Logger middleware -func (*Logger) ID() string { - return "WaiterLogger" -} - -// HandleInitialize performs handling of request in initialize stack step -func (m *Logger) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - logger := middleware.GetLogger(ctx) - - logger.Logf(logging.Debug, fmt.Sprintf("attempting waiter request, attempt count: %d", m.Attempt)) - - return next.HandleInitialize(ctx, in) -} - -// AddLogger is a helper util to add waiter logger after `SetLogger` middleware in -func (m Logger) AddLogger(stack *middleware.Stack) error { - return stack.Initialize.Insert(&m, "SetLogger", middleware.After) -} diff --git a/vendor/github.com/aws/smithy-go/waiter/waiter.go b/vendor/github.com/aws/smithy-go/waiter/waiter.go deleted file mode 100644 index 03e46e2ee7..0000000000 --- a/vendor/github.com/aws/smithy-go/waiter/waiter.go +++ /dev/null @@ -1,66 +0,0 @@ -package waiter - -import ( - "fmt" - "math" - "time" - - "github.com/aws/smithy-go/rand" -) - -// ComputeDelay computes delay between waiter attempts. The function takes in a current attempt count, -// minimum delay, maximum delay, and remaining wait time for waiter as input. The inputs minDelay and maxDelay -// must always be greater than 0, along with minDelay lesser than or equal to maxDelay. -// -// Returns the computed delay and if next attempt count is possible within the given input time constraints. -// Note that the zeroth attempt results in no delay. -func ComputeDelay(attempt int64, minDelay, maxDelay, remainingTime time.Duration) (delay time.Duration, err error) { - // zeroth attempt, no delay - if attempt <= 0 { - return 0, nil - } - - // remainingTime is zero or less, no delay - if remainingTime <= 0 { - return 0, nil - } - - // validate min delay is greater than 0 - if minDelay == 0 { - return 0, fmt.Errorf("minDelay must be greater than zero when computing Delay") - } - - // validate max delay is greater than 0 - if maxDelay == 0 { - return 0, fmt.Errorf("maxDelay must be greater than zero when computing Delay") - } - - // Get attempt ceiling to prevent integer overflow. - attemptCeiling := (math.Log(float64(maxDelay/minDelay)) / math.Log(2)) + 1 - - if attempt > int64(attemptCeiling) { - delay = maxDelay - } else { - // Compute exponential delay based on attempt. - ri := 1 << uint64(attempt-1) - // compute delay - delay = minDelay * time.Duration(ri) - } - - if delay != minDelay { - // randomize to get jitter between min delay and delay value - d, err := rand.CryptoRandInt63n(int64(delay - minDelay)) - if err != nil { - return 0, fmt.Errorf("error computing retry jitter, %w", err) - } - - delay = time.Duration(d) + minDelay - } - - // check if this is the last attempt possible and compute delay accordingly - if remainingTime-delay <= minDelay { - delay = remainingTime - minDelay - } - - return delay, nil -} diff --git a/vendor/github.com/cihub/seelog/LICENSE.txt b/vendor/github.com/cihub/seelog/LICENSE.txt deleted file mode 100644 index 8c70681414..0000000000 --- a/vendor/github.com/cihub/seelog/LICENSE.txt +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2012, Cloud Instruments Co., Ltd. -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 the Cloud Instruments Co., Ltd. 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 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/cihub/seelog/README.markdown b/vendor/github.com/cihub/seelog/README.markdown deleted file mode 100644 index 7dd1ab3532..0000000000 --- a/vendor/github.com/cihub/seelog/README.markdown +++ /dev/null @@ -1,116 +0,0 @@ -Seelog -======= - -Seelog is a powerful and easy-to-learn logging framework that provides functionality for flexible dispatching, filtering, and formatting log messages. -It is natively written in the [Go](http://golang.org/) programming language. - -[![Build Status](https://drone.io/github.com/cihub/seelog/status.png)](https://drone.io/github.com/cihub/seelog/latest) - -Features ------------------- - -* Xml configuring to be able to change logger parameters without recompilation -* Changing configurations on the fly without app restart -* Possibility to set different log configurations for different project files and functions -* Adjustable message formatting -* Simultaneous log output to multiple streams -* Choosing logger priority strategy to minimize performance hit -* Different output writers - * Console writer - * File writer - * Buffered writer (Chunk writer) - * Rolling log writer (Logging with rotation) - * SMTP writer - * Others... (See [Wiki](https://github.com/cihub/seelog/wiki)) -* Log message wrappers (JSON, XML, etc.) -* Global variables and functions for easy usage in standalone apps -* Functions for flexible usage in libraries - -Quick-start ------------ - -```go -package main - -import log "github.com/cihub/seelog" - -func main() { - defer log.Flush() - log.Info("Hello from Seelog!") -} -``` - -Installation ------------- - -If you don't have the Go development environment installed, visit the -[Getting Started](http://golang.org/doc/install.html) document and follow the instructions. Once you're ready, execute the following command: - -``` -go get -u github.com/cihub/seelog -``` - -*IMPORTANT*: If you are not using the latest release version of Go, check out this [wiki page](https://github.com/cihub/seelog/wiki/Notes-on-'go-get') - -Documentation ---------------- - -Seelog has github wiki pages, which contain detailed how-tos references: https://github.com/cihub/seelog/wiki - -Examples ---------------- - -Seelog examples can be found here: [seelog-examples](https://github.com/cihub/seelog-examples) - -Issues ---------------- - -Feel free to push issues that could make Seelog better: https://github.com/cihub/seelog/issues - -Changelog ---------------- -* **v2.6** : Config using code and custom formatters - * Configuration using code in addition to xml (All internal receiver/dispatcher/logger types are now exported). - * Custom formatters. Check [wiki](https://github.com/cihub/seelog/wiki/Custom-formatters) - * Bugfixes and internal improvements. -* **v2.5** : Interaction with other systems. Part 2: custom receivers - * Finished custom receivers feature. Check [wiki](https://github.com/cihub/seelog/wiki/custom-receivers) - * Added 'LoggerFromCustomReceiver' - * Added 'LoggerFromWriterWithMinLevelAndFormat' - * Added 'LoggerFromCustomReceiver' - * Added 'LoggerFromParamConfigAs...' -* **v2.4** : Interaction with other systems. Part 1: wrapping seelog - * Added configurable caller stack skip logic - * Added 'SetAdditionalStackDepth' to 'LoggerInterface' -* **v2.3** : Rethinking 'rolling' receiver - * Reimplemented 'rolling' receiver - * Added 'Max rolls' feature for 'rolling' receiver with type='date' - * Fixed 'rolling' receiver issue: renaming on Windows -* **v2.2** : go1.0 compatibility point [go1.0 tag] - * Fixed internal bugs - * Added 'ANSI n [;k]' format identifier: %EscN - * Made current release go1 compatible -* **v2.1** : Some new features - * Rolling receiver archiving option. - * Added format identifier: %Line - * Smtp: added paths to PEM files directories - * Added format identifier: %FuncShort - * Warn, Error and Critical methods now return an error -* **v2.0** : Second major release. BREAKING CHANGES. - * Support of binaries with stripped symbols - * Added log strategy: adaptive - * Critical message now forces Flush() - * Added predefined formats: xml-debug, xml-debug-short, xml, xml-short, json-debug, json-debug-short, json, json-short, debug, debug-short, fast - * Added receiver: conn (network connection writer) - * BREAKING CHANGE: added Tracef, Debugf, Infof, etc. to satisfy the print/printf principle - * Bug fixes -* **v1.0** : Initial release. Features: - * Xml config - * Changing configurations on the fly without app restart - * Contraints and exceptions - * Formatting - * Log strategies: sync, async loop, async timer - * Receivers: buffered, console, file, rolling, smtp - - - diff --git a/vendor/github.com/cihub/seelog/archive/archive.go b/vendor/github.com/cihub/seelog/archive/archive.go deleted file mode 100644 index 923036f259..0000000000 --- a/vendor/github.com/cihub/seelog/archive/archive.go +++ /dev/null @@ -1,198 +0,0 @@ -package archive - -import ( - "archive/tar" - "archive/zip" - "fmt" - "io" - "io/ioutil" - "os" - "time" - - "github.com/cihub/seelog/archive/gzip" -) - -// Reader is the interface for reading files from an archive. -type Reader interface { - NextFile() (name string, err error) - io.Reader -} - -// ReadCloser is the interface that groups Reader with the Close method. -type ReadCloser interface { - Reader - io.Closer -} - -// Writer is the interface for writing files to an archived format. -type Writer interface { - NextFile(name string, fi os.FileInfo) error - io.Writer -} - -// WriteCloser is the interface that groups Writer with the Close method. -type WriteCloser interface { - Writer - io.Closer -} - -type nopCloser struct{ Reader } - -func (nopCloser) Close() error { return nil } - -// NopCloser returns a ReadCloser with a no-op Close method wrapping the -// provided Reader r. -func NopCloser(r Reader) ReadCloser { - return nopCloser{r} -} - -// Copy copies from src to dest until either EOF is reached on src or an error -// occurs. -// -// When the archive format of src matches that of dst, Copy streams the files -// directly into dst. Otherwise, copy buffers the contents to disk to compute -// headers before writing to dst. -func Copy(dst Writer, src Reader) error { - switch src := src.(type) { - case tarReader: - if dst, ok := dst.(tarWriter); ok { - return copyTar(dst, src) - } - case zipReader: - if dst, ok := dst.(zipWriter); ok { - return copyZip(dst, src) - } - // Switch on concrete type because gzip has no special methods - case *gzip.Reader: - if dst, ok := dst.(*gzip.Writer); ok { - _, err := io.Copy(dst, src) - return err - } - } - - return copyBuffer(dst, src) -} - -func copyBuffer(dst Writer, src Reader) (err error) { - const defaultFileMode = 0666 - - buf, err := ioutil.TempFile("", "archive_copy_buffer") - if err != nil { - return err - } - defer os.Remove(buf.Name()) // Do not care about failure removing temp - defer buf.Close() // Do not care about failure closing temp - for { - // Handle the next file - name, err := src.NextFile() - switch err { - case io.EOF: // Done copying - return nil - default: // Failed to write: bail out - return err - case nil: // Proceed below - } - - // Buffer the file - if _, err := io.Copy(buf, src); err != nil { - return fmt.Errorf("buffer to disk: %v", err) - } - - // Seek to the start of the file for full file copy - if _, err := buf.Seek(0, os.SEEK_SET); err != nil { - return err - } - - // Set desired file permissions - if err := os.Chmod(buf.Name(), defaultFileMode); err != nil { - return err - } - fi, err := buf.Stat() - if err != nil { - return err - } - - // Write the buffered file - if err := dst.NextFile(name, fi); err != nil { - return err - } - if _, err := io.Copy(dst, buf); err != nil { - return fmt.Errorf("copy to dst: %v", err) - } - if err := buf.Truncate(0); err != nil { - return err - } - if _, err := buf.Seek(0, os.SEEK_SET); err != nil { - return err - } - } -} - -type tarReader interface { - Next() (*tar.Header, error) - io.Reader -} - -type tarWriter interface { - WriteHeader(hdr *tar.Header) error - io.Writer -} - -type zipReader interface { - Files() []*zip.File -} - -type zipWriter interface { - CreateHeader(fh *zip.FileHeader) (io.Writer, error) -} - -func copyTar(w tarWriter, r tarReader) error { - for { - hdr, err := r.Next() - switch err { - case io.EOF: - return nil - default: // Handle error - return err - case nil: // Proceed below - } - - info := hdr.FileInfo() - // Skip directories - if info.IsDir() { - continue - } - if err := w.WriteHeader(hdr); err != nil { - return err - } - if _, err := io.Copy(w, r); err != nil { - return err - } - } -} - -func copyZip(zw zipWriter, r zipReader) error { - for _, f := range r.Files() { - if err := copyZipFile(zw, f); err != nil { - return err - } - } - return nil -} - -func copyZipFile(zw zipWriter, f *zip.File) error { - rc, err := f.Open() - if err != nil { - return err - } - defer rc.Close() // Read-only - - hdr := f.FileHeader - hdr.SetModTime(time.Now()) - w, err := zw.CreateHeader(&hdr) - if err != nil { - return err - } - _, err = io.Copy(w, rc) - return err -} diff --git a/vendor/github.com/cihub/seelog/archive/gzip/gzip.go b/vendor/github.com/cihub/seelog/archive/gzip/gzip.go deleted file mode 100644 index ea121018a9..0000000000 --- a/vendor/github.com/cihub/seelog/archive/gzip/gzip.go +++ /dev/null @@ -1,64 +0,0 @@ -// Package gzip implements reading and writing of gzip format compressed files. -// See the compress/gzip package for more details. -package gzip - -import ( - "compress/gzip" - "fmt" - "io" - "os" -) - -// Reader is an io.Reader that can be read to retrieve uncompressed data from a -// gzip-format compressed file. -type Reader struct { - gzip.Reader - name string - isEOF bool -} - -// NewReader creates a new Reader reading the given reader. -func NewReader(r io.Reader, name string) (*Reader, error) { - gr, err := gzip.NewReader(r) - if err != nil { - return nil, err - } - return &Reader{ - Reader: *gr, - name: name, - }, nil -} - -// NextFile returns the file name. Calls subsequent to the first call will -// return EOF. -func (r *Reader) NextFile() (name string, err error) { - if r.isEOF { - return "", io.EOF - } - - r.isEOF = true - return r.name, nil -} - -// Writer is an io.WriteCloser. Writes to a Writer are compressed and written to w. -type Writer struct { - gzip.Writer - name string - noMoreFiles bool -} - -// NextFile never returns a next file, and should not be called more than once. -func (w *Writer) NextFile(name string, _ os.FileInfo) error { - if w.noMoreFiles { - return fmt.Errorf("gzip: only accepts one file: already received %q and now %q", w.name, name) - } - w.noMoreFiles = true - w.name = name - return nil -} - -// NewWriter returns a new Writer. Writes to the returned writer are compressed -// and written to w. -func NewWriter(w io.Writer) *Writer { - return &Writer{Writer: *gzip.NewWriter(w)} -} diff --git a/vendor/github.com/cihub/seelog/archive/tar/tar.go b/vendor/github.com/cihub/seelog/archive/tar/tar.go deleted file mode 100644 index 8dd87f5734..0000000000 --- a/vendor/github.com/cihub/seelog/archive/tar/tar.go +++ /dev/null @@ -1,72 +0,0 @@ -package tar - -import ( - "archive/tar" - "io" - "os" -) - -// Reader provides sequential access to the contents of a tar archive. -type Reader struct { - tar.Reader -} - -// NewReader creates a new Reader reading from r. -func NewReader(r io.Reader) *Reader { - return &Reader{Reader: *tar.NewReader(r)} -} - -// NextFile advances to the next file in the tar archive. -func (r *Reader) NextFile() (name string, err error) { - hdr, err := r.Next() - if err != nil { - return "", err - } - return hdr.Name, nil -} - -// Writer provides sequential writing of a tar archive in POSIX.1 format. -type Writer struct { - tar.Writer - closers []io.Closer -} - -// NewWriter creates a new Writer writing to w. -func NewWriter(w io.Writer) *Writer { - return &Writer{Writer: *tar.NewWriter(w)} -} - -// NewWriteMultiCloser creates a new Writer writing to w that also closes all -// closers in order on close. -func NewWriteMultiCloser(w io.WriteCloser, closers ...io.Closer) *Writer { - return &Writer{ - Writer: *tar.NewWriter(w), - closers: closers, - } -} - -// NextFile computes and writes a header and prepares to accept the file's -// contents. -func (w *Writer) NextFile(name string, fi os.FileInfo) error { - if name == "" { - name = fi.Name() - } - hdr, err := tar.FileInfoHeader(fi, name) - if err != nil { - return err - } - hdr.Name = name - return w.WriteHeader(hdr) -} - -// Close closes the tar archive and all other closers, flushing any unwritten -// data to the underlying writer. -func (w *Writer) Close() error { - err := w.Writer.Close() - for _, c := range w.closers { - if cerr := c.Close(); cerr != nil && err == nil { - err = cerr - } - } - return err -} diff --git a/vendor/github.com/cihub/seelog/archive/zip/zip.go b/vendor/github.com/cihub/seelog/archive/zip/zip.go deleted file mode 100644 index 4210b03b9f..0000000000 --- a/vendor/github.com/cihub/seelog/archive/zip/zip.go +++ /dev/null @@ -1,89 +0,0 @@ -package zip - -import ( - "archive/zip" - "io" - "os" -) - -// Reader provides sequential access to the contents of a zip archive. -type Reader struct { - zip.Reader - unread []*zip.File - rc io.ReadCloser -} - -// NewReader returns a new Reader reading from r, which is assumed to have the -// given size in bytes. -func NewReader(r io.ReaderAt, size int64) (*Reader, error) { - zr, err := zip.NewReader(r, size) - if err != nil { - return nil, err - } - return &Reader{Reader: *zr}, nil -} - -// NextFile advances to the next file in the zip archive. -func (r *Reader) NextFile() (name string, err error) { - // Initialize unread - if r.unread == nil { - r.unread = r.Files()[:] - } - - // Close previous file - if r.rc != nil { - r.rc.Close() // Read-only - } - - if len(r.unread) == 0 { - return "", io.EOF - } - - // Open and return next unread - f := r.unread[0] - name, r.unread = f.Name, r.unread[1:] - r.rc, err = f.Open() - if err != nil { - return "", err - } - return name, nil -} - -func (r *Reader) Read(p []byte) (n int, err error) { - return r.rc.Read(p) -} - -// Files returns the full list of files in the zip archive. -func (r *Reader) Files() []*zip.File { - return r.File -} - -// Writer provides sequential writing of a zip archive.1 format. -type Writer struct { - zip.Writer - w io.Writer -} - -// NewWriter returns a new Writer writing to w. -func NewWriter(w io.Writer) *Writer { - return &Writer{Writer: *zip.NewWriter(w)} -} - -// NextFile computes and writes a header and prepares to accept the file's -// contents. -func (w *Writer) NextFile(name string, fi os.FileInfo) error { - if name == "" { - name = fi.Name() - } - hdr, err := zip.FileInfoHeader(fi) - if err != nil { - return err - } - hdr.Name = name - w.w, err = w.CreateHeader(hdr) - return err -} - -func (w *Writer) Write(p []byte) (n int, err error) { - return w.w.Write(p) -} diff --git a/vendor/github.com/cihub/seelog/behavior_adaptivelogger.go b/vendor/github.com/cihub/seelog/behavior_adaptivelogger.go deleted file mode 100644 index 0c640caeb4..0000000000 --- a/vendor/github.com/cihub/seelog/behavior_adaptivelogger.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "math" - "time" -) - -var ( - adaptiveLoggerMaxInterval = time.Minute - adaptiveLoggerMaxCriticalMsgCount = uint32(1000) -) - -// asyncAdaptiveLogger represents asynchronous adaptive logger which acts like -// an async timer logger, but its interval depends on the current message count -// in the queue. -// -// Interval = I, minInterval = m, maxInterval = M, criticalMsgCount = C, msgCount = c: -// I = m + (C - Min(c, C)) / C * (M - m) -type asyncAdaptiveLogger struct { - asyncLogger - minInterval time.Duration - criticalMsgCount uint32 - maxInterval time.Duration -} - -// NewAsyncLoopLogger creates a new asynchronous adaptive logger -func NewAsyncAdaptiveLogger( - config *logConfig, - minInterval time.Duration, - maxInterval time.Duration, - criticalMsgCount uint32) (*asyncAdaptiveLogger, error) { - - if minInterval <= 0 { - return nil, errors.New("async adaptive logger min interval should be > 0") - } - - if maxInterval > adaptiveLoggerMaxInterval { - return nil, fmt.Errorf("async adaptive logger max interval should be <= %s", - adaptiveLoggerMaxInterval) - } - - if criticalMsgCount <= 0 { - return nil, errors.New("async adaptive logger critical msg count should be > 0") - } - - if criticalMsgCount > adaptiveLoggerMaxCriticalMsgCount { - return nil, fmt.Errorf("async adaptive logger critical msg count should be <= %s", - adaptiveLoggerMaxInterval) - } - - asnAdaptiveLogger := new(asyncAdaptiveLogger) - - asnAdaptiveLogger.asyncLogger = *newAsyncLogger(config) - asnAdaptiveLogger.minInterval = minInterval - asnAdaptiveLogger.maxInterval = maxInterval - asnAdaptiveLogger.criticalMsgCount = criticalMsgCount - - go asnAdaptiveLogger.processQueue() - - return asnAdaptiveLogger, nil -} - -func (asnAdaptiveLogger *asyncAdaptiveLogger) processItem() (closed bool, itemCount int) { - asnAdaptiveLogger.queueHasElements.L.Lock() - defer asnAdaptiveLogger.queueHasElements.L.Unlock() - - for asnAdaptiveLogger.msgQueue.Len() == 0 && !asnAdaptiveLogger.Closed() { - asnAdaptiveLogger.queueHasElements.Wait() - } - - if asnAdaptiveLogger.Closed() { - return true, asnAdaptiveLogger.msgQueue.Len() - } - - asnAdaptiveLogger.processQueueElement() - return false, asnAdaptiveLogger.msgQueue.Len() - 1 -} - -// I = m + (C - Min(c, C)) / C * (M - m) => -// I = m + cDiff * mDiff, -// cDiff = (C - Min(c, C)) / C) -// mDiff = (M - m) -func (asnAdaptiveLogger *asyncAdaptiveLogger) calcAdaptiveInterval(msgCount int) time.Duration { - critCountF := float64(asnAdaptiveLogger.criticalMsgCount) - cDiff := (critCountF - math.Min(float64(msgCount), critCountF)) / critCountF - mDiff := float64(asnAdaptiveLogger.maxInterval - asnAdaptiveLogger.minInterval) - - return asnAdaptiveLogger.minInterval + time.Duration(cDiff*mDiff) -} - -func (asnAdaptiveLogger *asyncAdaptiveLogger) processQueue() { - for !asnAdaptiveLogger.Closed() { - closed, itemCount := asnAdaptiveLogger.processItem() - - if closed { - break - } - - interval := asnAdaptiveLogger.calcAdaptiveInterval(itemCount) - - <-time.After(interval) - } -} diff --git a/vendor/github.com/cihub/seelog/behavior_asynclogger.go b/vendor/github.com/cihub/seelog/behavior_asynclogger.go deleted file mode 100644 index 75231067b9..0000000000 --- a/vendor/github.com/cihub/seelog/behavior_asynclogger.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "container/list" - "fmt" - "sync" -) - -// MaxQueueSize is the critical number of messages in the queue that result in an immediate flush. -const ( - MaxQueueSize = 10000 -) - -type msgQueueItem struct { - level LogLevel - context LogContextInterface - message fmt.Stringer -} - -// asyncLogger represents common data for all asynchronous loggers -type asyncLogger struct { - commonLogger - msgQueue *list.List - queueHasElements *sync.Cond -} - -// newAsyncLogger creates a new asynchronous logger -func newAsyncLogger(config *logConfig) *asyncLogger { - asnLogger := new(asyncLogger) - - asnLogger.msgQueue = list.New() - asnLogger.queueHasElements = sync.NewCond(new(sync.Mutex)) - - asnLogger.commonLogger = *newCommonLogger(config, asnLogger) - - return asnLogger -} - -func (asnLogger *asyncLogger) innerLog( - level LogLevel, - context LogContextInterface, - message fmt.Stringer) { - - asnLogger.addMsgToQueue(level, context, message) -} - -func (asnLogger *asyncLogger) Close() { - asnLogger.m.Lock() - defer asnLogger.m.Unlock() - - if !asnLogger.Closed() { - asnLogger.flushQueue(true) - asnLogger.config.RootDispatcher.Flush() - - if err := asnLogger.config.RootDispatcher.Close(); err != nil { - reportInternalError(err) - } - - asnLogger.closedM.Lock() - asnLogger.closed = true - asnLogger.closedM.Unlock() - asnLogger.queueHasElements.Broadcast() - } -} - -func (asnLogger *asyncLogger) Flush() { - asnLogger.m.Lock() - defer asnLogger.m.Unlock() - - if !asnLogger.Closed() { - asnLogger.flushQueue(true) - asnLogger.config.RootDispatcher.Flush() - } -} - -func (asnLogger *asyncLogger) flushQueue(lockNeeded bool) { - if lockNeeded { - asnLogger.queueHasElements.L.Lock() - defer asnLogger.queueHasElements.L.Unlock() - } - - for asnLogger.msgQueue.Len() > 0 { - asnLogger.processQueueElement() - } -} - -func (asnLogger *asyncLogger) processQueueElement() { - if asnLogger.msgQueue.Len() > 0 { - backElement := asnLogger.msgQueue.Front() - msg, _ := backElement.Value.(msgQueueItem) - asnLogger.processLogMsg(msg.level, msg.message, msg.context) - asnLogger.msgQueue.Remove(backElement) - } -} - -func (asnLogger *asyncLogger) addMsgToQueue( - level LogLevel, - context LogContextInterface, - message fmt.Stringer) { - - if !asnLogger.Closed() { - asnLogger.queueHasElements.L.Lock() - defer asnLogger.queueHasElements.L.Unlock() - - if asnLogger.msgQueue.Len() >= MaxQueueSize { - fmt.Printf("Seelog queue overflow: more than %v messages in the queue. Flushing.\n", MaxQueueSize) - asnLogger.flushQueue(false) - } - - queueItem := msgQueueItem{level, context, message} - - asnLogger.msgQueue.PushBack(queueItem) - asnLogger.queueHasElements.Broadcast() - } else { - err := fmt.Errorf("queue closed! Cannot process element: %d %#v", level, message) - reportInternalError(err) - } -} diff --git a/vendor/github.com/cihub/seelog/behavior_asynclooplogger.go b/vendor/github.com/cihub/seelog/behavior_asynclooplogger.go deleted file mode 100644 index 972467b3fc..0000000000 --- a/vendor/github.com/cihub/seelog/behavior_asynclooplogger.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -// asyncLoopLogger represents asynchronous logger which processes the log queue in -// a 'for' loop -type asyncLoopLogger struct { - asyncLogger -} - -// NewAsyncLoopLogger creates a new asynchronous loop logger -func NewAsyncLoopLogger(config *logConfig) *asyncLoopLogger { - - asnLoopLogger := new(asyncLoopLogger) - - asnLoopLogger.asyncLogger = *newAsyncLogger(config) - - go asnLoopLogger.processQueue() - - return asnLoopLogger -} - -func (asnLoopLogger *asyncLoopLogger) processItem() (closed bool) { - asnLoopLogger.queueHasElements.L.Lock() - defer asnLoopLogger.queueHasElements.L.Unlock() - - for asnLoopLogger.msgQueue.Len() == 0 && !asnLoopLogger.Closed() { - asnLoopLogger.queueHasElements.Wait() - } - - if asnLoopLogger.Closed() { - return true - } - - asnLoopLogger.processQueueElement() - return false -} - -func (asnLoopLogger *asyncLoopLogger) processQueue() { - for !asnLoopLogger.Closed() { - closed := asnLoopLogger.processItem() - - if closed { - break - } - } -} diff --git a/vendor/github.com/cihub/seelog/behavior_asynctimerlogger.go b/vendor/github.com/cihub/seelog/behavior_asynctimerlogger.go deleted file mode 100644 index 8118f20500..0000000000 --- a/vendor/github.com/cihub/seelog/behavior_asynctimerlogger.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "time" -) - -// asyncTimerLogger represents asynchronous logger which processes the log queue each -// 'duration' nanoseconds -type asyncTimerLogger struct { - asyncLogger - interval time.Duration -} - -// NewAsyncLoopLogger creates a new asynchronous loop logger -func NewAsyncTimerLogger(config *logConfig, interval time.Duration) (*asyncTimerLogger, error) { - - if interval <= 0 { - return nil, errors.New("async logger interval should be > 0") - } - - asnTimerLogger := new(asyncTimerLogger) - - asnTimerLogger.asyncLogger = *newAsyncLogger(config) - asnTimerLogger.interval = interval - - go asnTimerLogger.processQueue() - - return asnTimerLogger, nil -} - -func (asnTimerLogger *asyncTimerLogger) processItem() (closed bool) { - asnTimerLogger.queueHasElements.L.Lock() - defer asnTimerLogger.queueHasElements.L.Unlock() - - for asnTimerLogger.msgQueue.Len() == 0 && !asnTimerLogger.Closed() { - asnTimerLogger.queueHasElements.Wait() - } - - if asnTimerLogger.Closed() { - return true - } - - asnTimerLogger.processQueueElement() - return false -} - -func (asnTimerLogger *asyncTimerLogger) processQueue() { - for !asnTimerLogger.Closed() { - closed := asnTimerLogger.processItem() - - if closed { - break - } - - <-time.After(asnTimerLogger.interval) - } -} diff --git a/vendor/github.com/cihub/seelog/behavior_synclogger.go b/vendor/github.com/cihub/seelog/behavior_synclogger.go deleted file mode 100644 index 5a022ebc62..0000000000 --- a/vendor/github.com/cihub/seelog/behavior_synclogger.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "fmt" -) - -// syncLogger performs logging in the same goroutine where 'Trace/Debug/...' -// func was called -type syncLogger struct { - commonLogger -} - -// NewSyncLogger creates a new synchronous logger -func NewSyncLogger(config *logConfig) *syncLogger { - syncLogger := new(syncLogger) - - syncLogger.commonLogger = *newCommonLogger(config, syncLogger) - - return syncLogger -} - -func (syncLogger *syncLogger) innerLog( - level LogLevel, - context LogContextInterface, - message fmt.Stringer) { - - syncLogger.processLogMsg(level, message, context) -} - -func (syncLogger *syncLogger) Close() { - syncLogger.m.Lock() - defer syncLogger.m.Unlock() - - if !syncLogger.Closed() { - if err := syncLogger.config.RootDispatcher.Close(); err != nil { - reportInternalError(err) - } - syncLogger.closedM.Lock() - syncLogger.closed = true - syncLogger.closedM.Unlock() - } -} - -func (syncLogger *syncLogger) Flush() { - syncLogger.m.Lock() - defer syncLogger.m.Unlock() - - if !syncLogger.Closed() { - syncLogger.config.RootDispatcher.Flush() - } -} diff --git a/vendor/github.com/cihub/seelog/cfg_config.go b/vendor/github.com/cihub/seelog/cfg_config.go deleted file mode 100644 index 76554fca0c..0000000000 --- a/vendor/github.com/cihub/seelog/cfg_config.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "bytes" - "encoding/xml" - "fmt" - "io" - "os" -) - -// LoggerFromConfigAsFile creates logger with config from file. File should contain valid seelog xml. -func LoggerFromConfigAsFile(fileName string) (LoggerInterface, error) { - file, err := os.Open(fileName) - if err != nil { - return nil, err - } - defer file.Close() - - conf, err := configFromReader(file) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromConfigAsBytes creates a logger with config from bytes stream. Bytes should contain valid seelog xml. -func LoggerFromConfigAsBytes(data []byte) (LoggerInterface, error) { - conf, err := configFromReader(bytes.NewBuffer(data)) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromConfigAsString creates a logger with config from a string. String should contain valid seelog xml. -func LoggerFromConfigAsString(data string) (LoggerInterface, error) { - return LoggerFromConfigAsBytes([]byte(data)) -} - -// LoggerFromParamConfigAsFile does the same as LoggerFromConfigAsFile, but includes special parser options. -// See 'CfgParseParams' comments. -func LoggerFromParamConfigAsFile(fileName string, parserParams *CfgParseParams) (LoggerInterface, error) { - file, err := os.Open(fileName) - if err != nil { - return nil, err - } - defer file.Close() - - conf, err := configFromReaderWithConfig(file, parserParams) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromParamConfigAsBytes does the same as LoggerFromConfigAsBytes, but includes special parser options. -// See 'CfgParseParams' comments. -func LoggerFromParamConfigAsBytes(data []byte, parserParams *CfgParseParams) (LoggerInterface, error) { - conf, err := configFromReaderWithConfig(bytes.NewBuffer(data), parserParams) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromParamConfigAsString does the same as LoggerFromConfigAsString, but includes special parser options. -// See 'CfgParseParams' comments. -func LoggerFromParamConfigAsString(data string, parserParams *CfgParseParams) (LoggerInterface, error) { - return LoggerFromParamConfigAsBytes([]byte(data), parserParams) -} - -// LoggerFromWriterWithMinLevel is shortcut for LoggerFromWriterWithMinLevelAndFormat(output, minLevel, DefaultMsgFormat) -func LoggerFromWriterWithMinLevel(output io.Writer, minLevel LogLevel) (LoggerInterface, error) { - return LoggerFromWriterWithMinLevelAndFormat(output, minLevel, DefaultMsgFormat) -} - -// LoggerFromWriterWithMinLevelAndFormat creates a proxy logger that uses io.Writer as the -// receiver with minimal level = minLevel and with specified format. -// -// All messages with level more or equal to minLevel will be written to output and -// formatted using the default seelog format. -// -// Can be called for usage with non-Seelog systems -func LoggerFromWriterWithMinLevelAndFormat(output io.Writer, minLevel LogLevel, format string) (LoggerInterface, error) { - constraints, err := NewMinMaxConstraints(minLevel, CriticalLvl) - if err != nil { - return nil, err - } - formatter, err := NewFormatter(format) - if err != nil { - return nil, err - } - dispatcher, err := NewSplitDispatcher(formatter, []interface{}{output}) - if err != nil { - return nil, err - } - - conf, err := newFullLoggerConfig(constraints, make([]*LogLevelException, 0), dispatcher, syncloggerTypeFromString, nil, nil) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromXMLDecoder creates logger with config from a XML decoder starting from a specific node. -// It should contain valid seelog xml, except for root node name. -func LoggerFromXMLDecoder(xmlParser *xml.Decoder, rootNode xml.Token) (LoggerInterface, error) { - conf, err := configFromXMLDecoder(xmlParser, rootNode) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -// LoggerFromCustomReceiver creates a proxy logger that uses a CustomReceiver as the -// receiver. -// -// All messages will be sent to the specified custom receiver without additional -// formatting ('%Msg' format is used). -// -// Check CustomReceiver, RegisterReceiver for additional info. -// -// NOTE 1: CustomReceiver.AfterParse is only called when a receiver is instantiated -// by the config parser while parsing config. So, if you are not planning to use the -// same CustomReceiver for both proxying (via LoggerFromCustomReceiver call) and -// loading from config, just leave AfterParse implementation empty. -// -// NOTE 2: Unlike RegisterReceiver, LoggerFromCustomReceiver takes an already initialized -// instance that implements CustomReceiver. So, fill it with data and perform any initialization -// logic before calling this func and it won't be lost. -// -// So: -// * RegisterReceiver takes value just to get the reflect.Type from it and then -// instantiate it as many times as config is reloaded. -// -// * LoggerFromCustomReceiver takes value and uses it without modification and -// reinstantiation, directy passing it to the dispatcher tree. -func LoggerFromCustomReceiver(receiver CustomReceiver) (LoggerInterface, error) { - constraints, err := NewMinMaxConstraints(TraceLvl, CriticalLvl) - if err != nil { - return nil, err - } - - output, err := NewCustomReceiverDispatcherByValue(msgonlyformatter, receiver, "user-proxy", CustomReceiverInitArgs{}) - if err != nil { - return nil, err - } - dispatcher, err := NewSplitDispatcher(msgonlyformatter, []interface{}{output}) - if err != nil { - return nil, err - } - - conf, err := newFullLoggerConfig(constraints, make([]*LogLevelException, 0), dispatcher, syncloggerTypeFromString, nil, nil) - if err != nil { - return nil, err - } - - return createLoggerFromFullConfig(conf) -} - -func CloneLogger(logger LoggerInterface) (LoggerInterface, error) { - switch logger := logger.(type) { - default: - return nil, fmt.Errorf("unexpected type %T", logger) - case *asyncAdaptiveLogger: - clone, err := NewAsyncAdaptiveLogger(logger.commonLogger.config, logger.minInterval, logger.maxInterval, logger.criticalMsgCount) - if err != nil { - return nil, err - } - return clone, nil - case *asyncLoopLogger: - return NewAsyncLoopLogger(logger.commonLogger.config), nil - case *asyncTimerLogger: - clone, err := NewAsyncTimerLogger(logger.commonLogger.config, logger.interval) - if err != nil { - return nil, err - } - return clone, nil - case *syncLogger: - return NewSyncLogger(logger.commonLogger.config), nil - } -} diff --git a/vendor/github.com/cihub/seelog/cfg_errors.go b/vendor/github.com/cihub/seelog/cfg_errors.go deleted file mode 100644 index c1fb4d1011..0000000000 --- a/vendor/github.com/cihub/seelog/cfg_errors.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" -) - -var ( - errNodeMustHaveChildren = errors.New("node must have children") - errNodeCannotHaveChildren = errors.New("node cannot have children") -) - -type unexpectedChildElementError struct { - baseError -} - -func newUnexpectedChildElementError(msg string) *unexpectedChildElementError { - custmsg := "Unexpected child element: " + msg - return &unexpectedChildElementError{baseError{message: custmsg}} -} - -type missingArgumentError struct { - baseError -} - -func newMissingArgumentError(nodeName, attrName string) *missingArgumentError { - custmsg := "Output '" + nodeName + "' has no '" + attrName + "' attribute" - return &missingArgumentError{baseError{message: custmsg}} -} - -type unexpectedAttributeError struct { - baseError -} - -func newUnexpectedAttributeError(nodeName, attr string) *unexpectedAttributeError { - custmsg := nodeName + " has unexpected attribute: " + attr - return &unexpectedAttributeError{baseError{message: custmsg}} -} diff --git a/vendor/github.com/cihub/seelog/cfg_logconfig.go b/vendor/github.com/cihub/seelog/cfg_logconfig.go deleted file mode 100644 index 6ba6f9a948..0000000000 --- a/vendor/github.com/cihub/seelog/cfg_logconfig.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" -) - -type loggerTypeFromString uint8 - -const ( - syncloggerTypeFromString = iota - asyncLooploggerTypeFromString - asyncTimerloggerTypeFromString - adaptiveLoggerTypeFromString - defaultloggerTypeFromString = asyncLooploggerTypeFromString -) - -const ( - syncloggerTypeFromStringStr = "sync" - asyncloggerTypeFromStringStr = "asyncloop" - asyncTimerloggerTypeFromStringStr = "asynctimer" - adaptiveLoggerTypeFromStringStr = "adaptive" -) - -// asyncTimerLoggerData represents specific data for async timer logger -type asyncTimerLoggerData struct { - AsyncInterval uint32 -} - -// adaptiveLoggerData represents specific data for adaptive timer logger -type adaptiveLoggerData struct { - MinInterval uint32 - MaxInterval uint32 - CriticalMsgCount uint32 -} - -var loggerTypeToStringRepresentations = map[loggerTypeFromString]string{ - syncloggerTypeFromString: syncloggerTypeFromStringStr, - asyncLooploggerTypeFromString: asyncloggerTypeFromStringStr, - asyncTimerloggerTypeFromString: asyncTimerloggerTypeFromStringStr, - adaptiveLoggerTypeFromString: adaptiveLoggerTypeFromStringStr, -} - -// getLoggerTypeFromString parses a string and returns a corresponding logger type, if successful. -func getLoggerTypeFromString(logTypeString string) (level loggerTypeFromString, found bool) { - for logType, logTypeStr := range loggerTypeToStringRepresentations { - if logTypeStr == logTypeString { - return logType, true - } - } - - return 0, false -} - -// logConfig stores logging configuration. Contains messages dispatcher, allowed log level rules -// (general constraints and exceptions) -type logConfig struct { - Constraints logLevelConstraints // General log level rules (>min and ' element. It takes the 'name' attribute - // of the element and tries to find a match in two places: - // 1) CfgParseParams.CustomReceiverProducers map - // 2) Global type map, filled by RegisterReceiver - // - // If a match is found in the CustomReceiverProducers map, parser calls the corresponding producer func - // passing the init args to it. The func takes exactly the same args as CustomReceiver.AfterParse. - // The producer func must return a correct receiver or an error. If case of error, seelog will behave - // in the same way as with any other config error. - // - // You may use this param to set custom producers in case you need to pass some context when instantiating - // a custom receiver or if you frequently change custom receivers with different parameters or in any other - // situation where package-level registering (RegisterReceiver) is not an option for you. - CustomReceiverProducers map[string]CustomReceiverProducer -} - -func (cfg *CfgParseParams) String() string { - return fmt.Sprintf("CfgParams: {custom_recs=%d}", len(cfg.CustomReceiverProducers)) -} - -type elementMapEntry struct { - constructor func(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) -} - -var elementMap map[string]elementMapEntry -var predefinedFormats map[string]*formatter - -func init() { - elementMap = map[string]elementMapEntry{ - fileWriterID: {createfileWriter}, - splitterDispatcherID: {createSplitter}, - customReceiverID: {createCustomReceiver}, - filterDispatcherID: {createFilter}, - consoleWriterID: {createConsoleWriter}, - rollingfileWriterID: {createRollingFileWriter}, - bufferedWriterID: {createbufferedWriter}, - smtpWriterID: {createSMTPWriter}, - connWriterID: {createconnWriter}, - } - - err := fillPredefinedFormats() - if err != nil { - panic(fmt.Sprintf("Seelog couldn't start: predefined formats creation failed. Error: %s", err.Error())) - } -} - -func fillPredefinedFormats() error { - predefinedFormatsWithoutPrefix := map[string]string{ - "xml-debug": `%Lev%Msg%RelFile%Func%Line`, - "xml-debug-short": `%Ns%l%Msg

    %RelFile

    %Func`, - "xml": `%Lev%Msg`, - "xml-short": `%Ns%l%Msg`, - - "json-debug": `{"time":%Ns,"lev":"%Lev","msg":"%Msg","path":"%RelFile","func":"%Func","line":"%Line"}`, - "json-debug-short": `{"t":%Ns,"l":"%Lev","m":"%Msg","p":"%RelFile","f":"%Func"}`, - "json": `{"time":%Ns,"lev":"%Lev","msg":"%Msg"}`, - "json-short": `{"t":%Ns,"l":"%Lev","m":"%Msg"}`, - - "debug": `[%LEVEL] %RelFile:%Func.%Line %Date %Time %Msg%n`, - "debug-short": `[%LEVEL] %Date %Time %Msg%n`, - "fast": `%Ns %l %Msg%n`, - } - - predefinedFormats = make(map[string]*formatter) - - for formatKey, format := range predefinedFormatsWithoutPrefix { - formatter, err := NewFormatter(format) - if err != nil { - return err - } - - predefinedFormats[predefinedPrefix+formatKey] = formatter - } - - return nil -} - -// configFromXMLDecoder parses data from a given XML decoder. -// Returns parsed config which can be used to create logger in case no errors occured. -// Returns error if format is incorrect or anything happened. -func configFromXMLDecoder(xmlParser *xml.Decoder, rootNode xml.Token) (*configForParsing, error) { - return configFromXMLDecoderWithConfig(xmlParser, rootNode, nil) -} - -// configFromXMLDecoderWithConfig parses data from a given XML decoder. -// Returns parsed config which can be used to create logger in case no errors occured. -// Returns error if format is incorrect or anything happened. -func configFromXMLDecoderWithConfig(xmlParser *xml.Decoder, rootNode xml.Token, cfg *CfgParseParams) (*configForParsing, error) { - _, ok := rootNode.(xml.StartElement) - if !ok { - return nil, errors.New("rootNode must be XML startElement") - } - - config, err := unmarshalNode(xmlParser, rootNode) - if err != nil { - return nil, err - } - if config == nil { - return nil, errors.New("xml has no content") - } - - return configFromXMLNodeWithConfig(config, cfg) -} - -// configFromReader parses data from a given reader. -// Returns parsed config which can be used to create logger in case no errors occured. -// Returns error if format is incorrect or anything happened. -func configFromReader(reader io.Reader) (*configForParsing, error) { - return configFromReaderWithConfig(reader, nil) -} - -// configFromReaderWithConfig parses data from a given reader. -// Returns parsed config which can be used to create logger in case no errors occured. -// Returns error if format is incorrect or anything happened. -func configFromReaderWithConfig(reader io.Reader, cfg *CfgParseParams) (*configForParsing, error) { - config, err := unmarshalConfig(reader) - if err != nil { - return nil, err - } - - if config.name != seelogConfigID { - return nil, errors.New("root xml tag must be '" + seelogConfigID + "'") - } - - return configFromXMLNodeWithConfig(config, cfg) -} - -func configFromXMLNodeWithConfig(config *xmlNode, cfg *CfgParseParams) (*configForParsing, error) { - err := checkUnexpectedAttribute( - config, - minLevelID, - maxLevelID, - levelsID, - loggerTypeFromStringAttr, - asyncLoggerIntervalAttr, - adaptLoggerMinIntervalAttr, - adaptLoggerMaxIntervalAttr, - adaptLoggerCriticalMsgCountAttr, - ) - if err != nil { - return nil, err - } - - err = checkExpectedElements(config, optionalElement(outputsID), optionalElement(formatsID), optionalElement(exceptionsID)) - if err != nil { - return nil, err - } - - constraints, err := getConstraints(config) - if err != nil { - return nil, err - } - - exceptions, err := getExceptions(config) - if err != nil { - return nil, err - } - err = checkDistinctExceptions(exceptions) - if err != nil { - return nil, err - } - - formats, err := getFormats(config) - if err != nil { - return nil, err - } - - dispatcher, err := getOutputsTree(config, formats, cfg) - if err != nil { - // If we open several files, but then fail to parse the config, we should close - // those files before reporting that config is invalid. - if dispatcher != nil { - dispatcher.Close() - } - - return nil, err - } - - loggerType, logData, err := getloggerTypeFromStringData(config) - if err != nil { - return nil, err - } - - return newFullLoggerConfig(constraints, exceptions, dispatcher, loggerType, logData, cfg) -} - -func getConstraints(node *xmlNode) (logLevelConstraints, error) { - minLevelStr, isMinLevel := node.attributes[minLevelID] - maxLevelStr, isMaxLevel := node.attributes[maxLevelID] - levelsStr, isLevels := node.attributes[levelsID] - - if isLevels && (isMinLevel && isMaxLevel) { - return nil, errors.New("for level declaration use '" + levelsID + "'' OR '" + minLevelID + - "', '" + maxLevelID + "'") - } - - offString := LogLevel(Off).String() - - if (isLevels && strings.TrimSpace(levelsStr) == offString) || - (isMinLevel && !isMaxLevel && minLevelStr == offString) { - - return NewOffConstraints() - } - - if isLevels { - levels, err := parseLevels(levelsStr) - if err != nil { - return nil, err - } - return NewListConstraints(levels) - } - - var minLevel = LogLevel(TraceLvl) - if isMinLevel { - found := true - minLevel, found = LogLevelFromString(minLevelStr) - if !found { - return nil, errors.New("declared " + minLevelID + " not found: " + minLevelStr) - } - } - - var maxLevel = LogLevel(CriticalLvl) - if isMaxLevel { - found := true - maxLevel, found = LogLevelFromString(maxLevelStr) - if !found { - return nil, errors.New("declared " + maxLevelID + " not found: " + maxLevelStr) - } - } - - return NewMinMaxConstraints(minLevel, maxLevel) -} - -func parseLevels(str string) ([]LogLevel, error) { - levelsStrArr := strings.Split(strings.Replace(str, " ", "", -1), ",") - var levels []LogLevel - for _, levelStr := range levelsStrArr { - level, found := LogLevelFromString(levelStr) - if !found { - return nil, errors.New("declared level not found: " + levelStr) - } - - levels = append(levels, level) - } - - return levels, nil -} - -func getExceptions(config *xmlNode) ([]*LogLevelException, error) { - var exceptions []*LogLevelException - - var exceptionsNode *xmlNode - for _, child := range config.children { - if child.name == exceptionsID { - exceptionsNode = child - break - } - } - - if exceptionsNode == nil { - return exceptions, nil - } - - err := checkUnexpectedAttribute(exceptionsNode) - if err != nil { - return nil, err - } - - err = checkExpectedElements(exceptionsNode, multipleMandatoryElements("exception")) - if err != nil { - return nil, err - } - - for _, exceptionNode := range exceptionsNode.children { - if exceptionNode.name != exceptionID { - return nil, errors.New("incorrect nested element in exceptions section: " + exceptionNode.name) - } - - err := checkUnexpectedAttribute(exceptionNode, minLevelID, maxLevelID, levelsID, funcPatternID, filePatternID) - if err != nil { - return nil, err - } - - constraints, err := getConstraints(exceptionNode) - if err != nil { - return nil, errors.New("incorrect " + exceptionsID + " node: " + err.Error()) - } - - funcPattern, isFuncPattern := exceptionNode.attributes[funcPatternID] - filePattern, isFilePattern := exceptionNode.attributes[filePatternID] - if !isFuncPattern { - funcPattern = "*" - } - if !isFilePattern { - filePattern = "*" - } - - exception, err := NewLogLevelException(funcPattern, filePattern, constraints) - if err != nil { - return nil, errors.New("incorrect exception node: " + err.Error()) - } - - exceptions = append(exceptions, exception) - } - - return exceptions, nil -} - -func checkDistinctExceptions(exceptions []*LogLevelException) error { - for i, exception := range exceptions { - for j, exception1 := range exceptions { - if i == j { - continue - } - - if exception.FuncPattern() == exception1.FuncPattern() && - exception.FilePattern() == exception1.FilePattern() { - - return fmt.Errorf("there are two or more duplicate exceptions. Func: %v, file %v", - exception.FuncPattern(), exception.FilePattern()) - } - } - } - - return nil -} - -func getFormats(config *xmlNode) (map[string]*formatter, error) { - formats := make(map[string]*formatter, 0) - - var formatsNode *xmlNode - for _, child := range config.children { - if child.name == formatsID { - formatsNode = child - break - } - } - - if formatsNode == nil { - return formats, nil - } - - err := checkUnexpectedAttribute(formatsNode) - if err != nil { - return nil, err - } - - err = checkExpectedElements(formatsNode, multipleMandatoryElements("format")) - if err != nil { - return nil, err - } - - for _, formatNode := range formatsNode.children { - if formatNode.name != formatID { - return nil, errors.New("incorrect nested element in " + formatsID + " section: " + formatNode.name) - } - - err := checkUnexpectedAttribute(formatNode, formatKeyAttrID, formatID) - if err != nil { - return nil, err - } - - id, isID := formatNode.attributes[formatKeyAttrID] - formatStr, isFormat := formatNode.attributes[formatAttrID] - if !isID { - return nil, errors.New("format has no '" + formatKeyAttrID + "' attribute") - } - if !isFormat { - return nil, errors.New("format[" + id + "] has no '" + formatAttrID + "' attribute") - } - - formatter, err := NewFormatter(formatStr) - if err != nil { - return nil, err - } - - formats[id] = formatter - } - - return formats, nil -} - -func getloggerTypeFromStringData(config *xmlNode) (logType loggerTypeFromString, logData interface{}, err error) { - logTypeStr, loggerTypeExists := config.attributes[loggerTypeFromStringAttr] - - if !loggerTypeExists { - return defaultloggerTypeFromString, nil, nil - } - - logType, found := getLoggerTypeFromString(logTypeStr) - - if !found { - return 0, nil, fmt.Errorf("unknown logger type: %s", logTypeStr) - } - - if logType == asyncTimerloggerTypeFromString { - intervalStr, intervalExists := config.attributes[asyncLoggerIntervalAttr] - if !intervalExists { - return 0, nil, newMissingArgumentError(config.name, asyncLoggerIntervalAttr) - } - - interval, err := strconv.ParseUint(intervalStr, 10, 32) - if err != nil { - return 0, nil, err - } - - logData = asyncTimerLoggerData{uint32(interval)} - } else if logType == adaptiveLoggerTypeFromString { - - // Min interval - minIntStr, minIntExists := config.attributes[adaptLoggerMinIntervalAttr] - if !minIntExists { - return 0, nil, newMissingArgumentError(config.name, adaptLoggerMinIntervalAttr) - } - minInterval, err := strconv.ParseUint(minIntStr, 10, 32) - if err != nil { - return 0, nil, err - } - - // Max interval - maxIntStr, maxIntExists := config.attributes[adaptLoggerMaxIntervalAttr] - if !maxIntExists { - return 0, nil, newMissingArgumentError(config.name, adaptLoggerMaxIntervalAttr) - } - maxInterval, err := strconv.ParseUint(maxIntStr, 10, 32) - if err != nil { - return 0, nil, err - } - - // Critical msg count - criticalMsgCountStr, criticalMsgCountExists := config.attributes[adaptLoggerCriticalMsgCountAttr] - if !criticalMsgCountExists { - return 0, nil, newMissingArgumentError(config.name, adaptLoggerCriticalMsgCountAttr) - } - criticalMsgCount, err := strconv.ParseUint(criticalMsgCountStr, 10, 32) - if err != nil { - return 0, nil, err - } - - logData = adaptiveLoggerData{uint32(minInterval), uint32(maxInterval), uint32(criticalMsgCount)} - } - - return logType, logData, nil -} - -func getOutputsTree(config *xmlNode, formats map[string]*formatter, cfg *CfgParseParams) (dispatcherInterface, error) { - var outputsNode *xmlNode - for _, child := range config.children { - if child.name == outputsID { - outputsNode = child - break - } - } - - if outputsNode != nil { - err := checkUnexpectedAttribute(outputsNode, outputFormatID) - if err != nil { - return nil, err - } - - formatter, err := getCurrentFormat(outputsNode, DefaultFormatter, formats) - if err != nil { - return nil, err - } - - output, err := createSplitter(outputsNode, formatter, formats, cfg) - if err != nil { - return nil, err - } - - dispatcher, ok := output.(dispatcherInterface) - if ok { - return dispatcher, nil - } - } - - console, err := NewConsoleWriter() - if err != nil { - return nil, err - } - return NewSplitDispatcher(DefaultFormatter, []interface{}{console}) -} - -func getCurrentFormat(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter) (*formatter, error) { - formatID, isFormatID := node.attributes[outputFormatID] - if !isFormatID { - return formatFromParent, nil - } - - format, ok := formats[formatID] - if ok { - return format, nil - } - - // Test for predefined format match - pdFormat, pdOk := predefinedFormats[formatID] - - if !pdOk { - return nil, errors.New("formatid = '" + formatID + "' doesn't exist") - } - - return pdFormat, nil -} - -func createInnerReceivers(node *xmlNode, format *formatter, formats map[string]*formatter, cfg *CfgParseParams) ([]interface{}, error) { - var outputs []interface{} - for _, childNode := range node.children { - entry, ok := elementMap[childNode.name] - if !ok { - return nil, errors.New("unnknown tag '" + childNode.name + "' in outputs section") - } - - output, err := entry.constructor(childNode, format, formats, cfg) - if err != nil { - return nil, err - } - - outputs = append(outputs, output) - } - - return outputs, nil -} - -func createSplitter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID) - if err != nil { - return nil, err - } - - if !node.hasChildren() { - return nil, errNodeMustHaveChildren - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - receivers, err := createInnerReceivers(node, currentFormat, formats, cfg) - if err != nil { - return nil, err - } - - return NewSplitDispatcher(currentFormat, receivers) -} - -func createCustomReceiver(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - dataCustomPrefixes := make(map[string]string) - // Expecting only 'formatid', 'name' and 'data-' attrs - for attr, attrval := range node.attributes { - isExpected := false - if attr == outputFormatID || - attr == customNameAttrID { - isExpected = true - } - if strings.HasPrefix(attr, customNameDataAttrPrefix) { - dataCustomPrefixes[attr[len(customNameDataAttrPrefix):]] = attrval - isExpected = true - } - if !isExpected { - return nil, newUnexpectedAttributeError(node.name, attr) - } - } - - if node.hasChildren() { - return nil, errNodeCannotHaveChildren - } - customName, hasCustomName := node.attributes[customNameAttrID] - if !hasCustomName { - return nil, newMissingArgumentError(node.name, customNameAttrID) - } - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - args := CustomReceiverInitArgs{ - XmlCustomAttrs: dataCustomPrefixes, - } - - if cfg != nil && cfg.CustomReceiverProducers != nil { - if prod, ok := cfg.CustomReceiverProducers[customName]; ok { - rec, err := prod(args) - if err != nil { - return nil, err - } - creceiver, err := NewCustomReceiverDispatcherByValue(currentFormat, rec, customName, args) - if err != nil { - return nil, err - } - err = rec.AfterParse(args) - if err != nil { - return nil, err - } - return creceiver, nil - } - } - - return NewCustomReceiverDispatcher(currentFormat, customName, args) -} - -func createFilter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID, filterLevelsAttrID) - if err != nil { - return nil, err - } - - if !node.hasChildren() { - return nil, errNodeMustHaveChildren - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - levelsStr, isLevels := node.attributes[filterLevelsAttrID] - if !isLevels { - return nil, newMissingArgumentError(node.name, filterLevelsAttrID) - } - - levels, err := parseLevels(levelsStr) - if err != nil { - return nil, err - } - - receivers, err := createInnerReceivers(node, currentFormat, formats, cfg) - if err != nil { - return nil, err - } - - return NewFilterDispatcher(currentFormat, receivers, levels...) -} - -func createfileWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID, pathID) - if err != nil { - return nil, err - } - - if node.hasChildren() { - return nil, errNodeCannotHaveChildren - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - path, isPath := node.attributes[pathID] - if !isPath { - return nil, newMissingArgumentError(node.name, pathID) - } - - fileWriter, err := NewFileWriter(path) - if err != nil { - return nil, err - } - - return NewFormattedWriter(fileWriter, currentFormat) -} - -// Creates new SMTP writer if encountered in the config file. -func createSMTPWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID, senderaddressID, senderNameID, hostNameID, hostPortID, userNameID, userPassID, subjectID) - if err != nil { - return nil, err - } - // Node must have children. - if !node.hasChildren() { - return nil, errNodeMustHaveChildren - } - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - senderAddress, ok := node.attributes[senderaddressID] - if !ok { - return nil, newMissingArgumentError(node.name, senderaddressID) - } - senderName, ok := node.attributes[senderNameID] - if !ok { - return nil, newMissingArgumentError(node.name, senderNameID) - } - // Process child nodes scanning for recipient email addresses and/or CA certificate paths. - var recipientAddresses []string - var caCertDirPaths []string - var mailHeaders []string - for _, childNode := range node.children { - switch childNode.name { - // Extract recipient address from child nodes. - case recipientID: - address, ok := childNode.attributes[addressID] - if !ok { - return nil, newMissingArgumentError(childNode.name, addressID) - } - recipientAddresses = append(recipientAddresses, address) - // Extract CA certificate file path from child nodes. - case cACertDirpathID: - path, ok := childNode.attributes[pathID] - if !ok { - return nil, newMissingArgumentError(childNode.name, pathID) - } - caCertDirPaths = append(caCertDirPaths, path) - - // Extract email headers from child nodes. - case mailHeaderID: - headerName, ok := childNode.attributes[mailHeaderNameID] - if !ok { - return nil, newMissingArgumentError(childNode.name, mailHeaderNameID) - } - - headerValue, ok := childNode.attributes[mailHeaderValueID] - if !ok { - return nil, newMissingArgumentError(childNode.name, mailHeaderValueID) - } - - // Build header line - mailHeaders = append(mailHeaders, fmt.Sprintf("%s: %s", headerName, headerValue)) - default: - return nil, newUnexpectedChildElementError(childNode.name) - } - } - hostName, ok := node.attributes[hostNameID] - if !ok { - return nil, newMissingArgumentError(node.name, hostNameID) - } - - hostPort, ok := node.attributes[hostPortID] - if !ok { - return nil, newMissingArgumentError(node.name, hostPortID) - } - - // Check if the string can really be converted into int. - if _, err := strconv.Atoi(hostPort); err != nil { - return nil, errors.New("invalid host port number") - } - - userName, ok := node.attributes[userNameID] - if !ok { - return nil, newMissingArgumentError(node.name, userNameID) - } - - userPass, ok := node.attributes[userPassID] - if !ok { - return nil, newMissingArgumentError(node.name, userPassID) - } - - // subject is optionally set by configuration. - // default value is defined by DefaultSubjectPhrase constant in the writers_smtpwriter.go - var subjectPhrase = DefaultSubjectPhrase - - subject, ok := node.attributes[subjectID] - if ok { - subjectPhrase = subject - } - - smtpWriter := NewSMTPWriter( - senderAddress, - senderName, - recipientAddresses, - hostName, - hostPort, - userName, - userPass, - caCertDirPaths, - subjectPhrase, - mailHeaders, - ) - - return NewFormattedWriter(smtpWriter, currentFormat) -} - -func createConsoleWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID) - if err != nil { - return nil, err - } - - if node.hasChildren() { - return nil, errNodeCannotHaveChildren - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - consoleWriter, err := NewConsoleWriter() - if err != nil { - return nil, err - } - - return NewFormattedWriter(consoleWriter, currentFormat) -} - -func createconnWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - if node.hasChildren() { - return nil, errNodeCannotHaveChildren - } - - err := checkUnexpectedAttribute(node, outputFormatID, connWriterAddrAttr, connWriterNetAttr, connWriterReconnectOnMsgAttr, connWriterUseTLSAttr, connWriterInsecureSkipVerifyAttr) - if err != nil { - return nil, err - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - addr, isAddr := node.attributes[connWriterAddrAttr] - if !isAddr { - return nil, newMissingArgumentError(node.name, connWriterAddrAttr) - } - - net, isNet := node.attributes[connWriterNetAttr] - if !isNet { - return nil, newMissingArgumentError(node.name, connWriterNetAttr) - } - - reconnectOnMsg := false - reconnectOnMsgStr, isReconnectOnMsgStr := node.attributes[connWriterReconnectOnMsgAttr] - if isReconnectOnMsgStr { - if reconnectOnMsgStr == "true" { - reconnectOnMsg = true - } else if reconnectOnMsgStr == "false" { - reconnectOnMsg = false - } else { - return nil, errors.New("node '" + node.name + "' has incorrect '" + connWriterReconnectOnMsgAttr + "' attribute value") - } - } - - useTLS := false - useTLSStr, isUseTLSStr := node.attributes[connWriterUseTLSAttr] - if isUseTLSStr { - if useTLSStr == "true" { - useTLS = true - } else if useTLSStr == "false" { - useTLS = false - } else { - return nil, errors.New("node '" + node.name + "' has incorrect '" + connWriterUseTLSAttr + "' attribute value") - } - if useTLS { - insecureSkipVerify := false - insecureSkipVerifyStr, isInsecureSkipVerify := node.attributes[connWriterInsecureSkipVerifyAttr] - if isInsecureSkipVerify { - if insecureSkipVerifyStr == "true" { - insecureSkipVerify = true - } else if insecureSkipVerifyStr == "false" { - insecureSkipVerify = false - } else { - return nil, errors.New("node '" + node.name + "' has incorrect '" + connWriterInsecureSkipVerifyAttr + "' attribute value") - } - } - config := tls.Config{InsecureSkipVerify: insecureSkipVerify} - connWriter := newTLSWriter(net, addr, reconnectOnMsg, &config) - return NewFormattedWriter(connWriter, currentFormat) - } - } - - connWriter := NewConnWriter(net, addr, reconnectOnMsg) - - return NewFormattedWriter(connWriter, currentFormat) -} - -func createRollingFileWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - if node.hasChildren() { - return nil, errNodeCannotHaveChildren - } - - rollingTypeStr, isRollingType := node.attributes[rollingFileTypeAttr] - if !isRollingType { - return nil, newMissingArgumentError(node.name, rollingFileTypeAttr) - } - - rollingType, ok := rollingTypeFromString(rollingTypeStr) - if !ok { - return nil, errors.New("unknown rolling file type: " + rollingTypeStr) - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - path, isPath := node.attributes[rollingFilePathAttr] - if !isPath { - return nil, newMissingArgumentError(node.name, rollingFilePathAttr) - } - - rollingArchiveStr, archiveAttrExists := node.attributes[rollingFileArchiveAttr] - - var rArchiveType rollingArchiveType - var rArchivePath string - var rArchiveExploded bool = false - if !archiveAttrExists { - rArchiveType = rollingArchiveNone - rArchivePath = "" - } else { - rArchiveType, ok = rollingArchiveTypeFromString(rollingArchiveStr) - if !ok { - return nil, errors.New("unknown rolling archive type: " + rollingArchiveStr) - } - - if rArchiveType == rollingArchiveNone { - rArchivePath = "" - } else { - if rArchiveExplodedAttr, ok := node.attributes[rollingFileArchiveExplodedAttr]; ok { - if rArchiveExploded, err = strconv.ParseBool(rArchiveExplodedAttr); err != nil { - return nil, fmt.Errorf("archive exploded should be true or false, but was %v", - rArchiveExploded) - } - } - - rArchivePath, ok = node.attributes[rollingFileArchivePathAttr] - if ok { - if rArchivePath == "" { - return nil, fmt.Errorf("empty archive path is not supported") - } - } else { - if rArchiveExploded { - rArchivePath = rollingArchiveDefaultExplodedName - - } else { - rArchivePath, err = rollingArchiveTypeDefaultName(rArchiveType, false) - if err != nil { - return nil, err - } - } - } - } - } - - nameMode := rollingNameMode(rollingNameModePostfix) - nameModeStr, ok := node.attributes[rollingFileNameModeAttr] - if ok { - mode, found := rollingNameModeFromString(nameModeStr) - if !found { - return nil, errors.New("unknown rolling filename mode: " + nameModeStr) - } else { - nameMode = mode - } - } - - if rollingType == rollingTypeSize { - err := checkUnexpectedAttribute(node, outputFormatID, rollingFileTypeAttr, rollingFilePathAttr, - rollingFileMaxSizeAttr, rollingFileMaxRollsAttr, rollingFileArchiveAttr, - rollingFileArchivePathAttr, rollingFileArchiveExplodedAttr, rollingFileNameModeAttr) - if err != nil { - return nil, err - } - - maxSizeStr, ok := node.attributes[rollingFileMaxSizeAttr] - if !ok { - return nil, newMissingArgumentError(node.name, rollingFileMaxSizeAttr) - } - - maxSize, err := strconv.ParseInt(maxSizeStr, 10, 64) - if err != nil { - return nil, err - } - - maxRolls := 0 - maxRollsStr, ok := node.attributes[rollingFileMaxRollsAttr] - if ok { - maxRolls, err = strconv.Atoi(maxRollsStr) - if err != nil { - return nil, err - } - } - - rollingWriter, err := NewRollingFileWriterSize(path, rArchiveType, rArchivePath, maxSize, maxRolls, nameMode, rArchiveExploded) - if err != nil { - return nil, err - } - - return NewFormattedWriter(rollingWriter, currentFormat) - - } else if rollingType == rollingTypeTime { - err := checkUnexpectedAttribute(node, outputFormatID, rollingFileTypeAttr, rollingFilePathAttr, - rollingFileDataPatternAttr, rollingFileArchiveAttr, rollingFileMaxRollsAttr, - rollingFileArchivePathAttr, rollingFileArchiveExplodedAttr, rollingFileNameModeAttr, - rollingFileFullNameAttr) - if err != nil { - return nil, err - } - - maxRolls := 0 - maxRollsStr, ok := node.attributes[rollingFileMaxRollsAttr] - if ok { - maxRolls, err = strconv.Atoi(maxRollsStr) - if err != nil { - return nil, err - } - } - - fullName := false - fn, ok := node.attributes[rollingFileFullNameAttr] - if ok { - if fn == "true" { - fullName = true - } else if fn == "false" { - fullName = false - } else { - return nil, errors.New("node '" + node.name + "' has incorrect '" + rollingFileFullNameAttr + "' attribute value") - } - } - - dataPattern, ok := node.attributes[rollingFileDataPatternAttr] - if !ok { - return nil, newMissingArgumentError(node.name, rollingFileDataPatternAttr) - } - - rollingWriter, err := NewRollingFileWriterTime(path, rArchiveType, rArchivePath, maxRolls, dataPattern, nameMode, rArchiveExploded, fullName) - if err != nil { - return nil, err - } - - return NewFormattedWriter(rollingWriter, currentFormat) - } - - return nil, errors.New("incorrect rolling writer type " + rollingTypeStr) -} - -func createbufferedWriter(node *xmlNode, formatFromParent *formatter, formats map[string]*formatter, cfg *CfgParseParams) (interface{}, error) { - err := checkUnexpectedAttribute(node, outputFormatID, bufferedSizeAttr, bufferedFlushPeriodAttr) - if err != nil { - return nil, err - } - - if !node.hasChildren() { - return nil, errNodeMustHaveChildren - } - - currentFormat, err := getCurrentFormat(node, formatFromParent, formats) - if err != nil { - return nil, err - } - - sizeStr, isSize := node.attributes[bufferedSizeAttr] - if !isSize { - return nil, newMissingArgumentError(node.name, bufferedSizeAttr) - } - - size, err := strconv.Atoi(sizeStr) - if err != nil { - return nil, err - } - - flushPeriod := 0 - flushPeriodStr, isFlushPeriod := node.attributes[bufferedFlushPeriodAttr] - if isFlushPeriod { - flushPeriod, err = strconv.Atoi(flushPeriodStr) - if err != nil { - return nil, err - } - } - - // Inner writer couldn't have its own format, so we pass 'currentFormat' as its parent format - receivers, err := createInnerReceivers(node, currentFormat, formats, cfg) - if err != nil { - return nil, err - } - - formattedWriter, ok := receivers[0].(*formattedWriter) - if !ok { - return nil, errors.New("buffered writer's child is not writer") - } - - // ... and then we check that it hasn't changed - if formattedWriter.Format() != currentFormat { - return nil, errors.New("inner writer cannot have his own format") - } - - bufferedWriter, err := NewBufferedWriter(formattedWriter.Writer(), size, time.Duration(flushPeriod)) - if err != nil { - return nil, err - } - - return NewFormattedWriter(bufferedWriter, currentFormat) -} - -// Returns an error if node has any attributes not listed in expectedAttrs. -func checkUnexpectedAttribute(node *xmlNode, expectedAttrs ...string) error { - for attr := range node.attributes { - isExpected := false - for _, expected := range expectedAttrs { - if attr == expected { - isExpected = true - break - } - } - if !isExpected { - return newUnexpectedAttributeError(node.name, attr) - } - } - - return nil -} - -type expectedElementInfo struct { - name string - mandatory bool - multiple bool -} - -func optionalElement(name string) expectedElementInfo { - return expectedElementInfo{name, false, false} -} -func mandatoryElement(name string) expectedElementInfo { - return expectedElementInfo{name, true, false} -} -func multipleElements(name string) expectedElementInfo { - return expectedElementInfo{name, false, true} -} -func multipleMandatoryElements(name string) expectedElementInfo { - return expectedElementInfo{name, true, true} -} - -func checkExpectedElements(node *xmlNode, elements ...expectedElementInfo) error { - for _, element := range elements { - count := 0 - for _, child := range node.children { - if child.name == element.name { - count++ - } - } - - if count == 0 && element.mandatory { - return errors.New(node.name + " does not have mandatory subnode - " + element.name) - } - if count > 1 && !element.multiple { - return errors.New(node.name + " has more then one subnode - " + element.name) - } - } - - for _, child := range node.children { - isExpected := false - for _, element := range elements { - if child.name == element.name { - isExpected = true - } - } - - if !isExpected { - return errors.New(node.name + " has unexpected child: " + child.name) - } - } - - return nil -} diff --git a/vendor/github.com/cihub/seelog/common_closer.go b/vendor/github.com/cihub/seelog/common_closer.go deleted file mode 100644 index 1319c22179..0000000000 --- a/vendor/github.com/cihub/seelog/common_closer.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog diff --git a/vendor/github.com/cihub/seelog/common_constraints.go b/vendor/github.com/cihub/seelog/common_constraints.go deleted file mode 100644 index 7ec2fe5b16..0000000000 --- a/vendor/github.com/cihub/seelog/common_constraints.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "strings" -) - -// Represents constraints which form a general rule for log levels selection -type logLevelConstraints interface { - IsAllowed(level LogLevel) bool -} - -// A minMaxConstraints represents constraints which use minimal and maximal allowed log levels. -type minMaxConstraints struct { - min LogLevel - max LogLevel -} - -// NewMinMaxConstraints creates a new minMaxConstraints struct with the specified min and max levels. -func NewMinMaxConstraints(min LogLevel, max LogLevel) (*minMaxConstraints, error) { - if min > max { - return nil, fmt.Errorf("min level can't be greater than max. Got min: %d, max: %d", min, max) - } - if min < TraceLvl || min > CriticalLvl { - return nil, fmt.Errorf("min level can't be less than Trace or greater than Critical. Got min: %d", min) - } - if max < TraceLvl || max > CriticalLvl { - return nil, fmt.Errorf("max level can't be less than Trace or greater than Critical. Got max: %d", max) - } - - return &minMaxConstraints{min, max}, nil -} - -// IsAllowed returns true, if log level is in [min, max] range (inclusive). -func (minMaxConstr *minMaxConstraints) IsAllowed(level LogLevel) bool { - return level >= minMaxConstr.min && level <= minMaxConstr.max -} - -func (minMaxConstr *minMaxConstraints) String() string { - return fmt.Sprintf("Min: %s. Max: %s", minMaxConstr.min, minMaxConstr.max) -} - -//======================================================= - -// A listConstraints represents constraints which use allowed log levels list. -type listConstraints struct { - allowedLevels map[LogLevel]bool -} - -// NewListConstraints creates a new listConstraints struct with the specified allowed levels. -func NewListConstraints(allowList []LogLevel) (*listConstraints, error) { - if allowList == nil { - return nil, errors.New("list can't be nil") - } - - allowLevels, err := createMapFromList(allowList) - if err != nil { - return nil, err - } - err = validateOffLevel(allowLevels) - if err != nil { - return nil, err - } - - return &listConstraints{allowLevels}, nil -} - -func (listConstr *listConstraints) String() string { - allowedList := "List: " - - listLevel := make([]string, len(listConstr.allowedLevels)) - - var logLevel LogLevel - i := 0 - for logLevel = TraceLvl; logLevel <= Off; logLevel++ { - if listConstr.allowedLevels[logLevel] { - listLevel[i] = logLevel.String() - i++ - } - } - - allowedList += strings.Join(listLevel, ",") - - return allowedList -} - -func createMapFromList(allowedList []LogLevel) (map[LogLevel]bool, error) { - allowedLevels := make(map[LogLevel]bool, 0) - for _, level := range allowedList { - if level < TraceLvl || level > Off { - return nil, fmt.Errorf("level can't be less than Trace or greater than Critical. Got level: %d", level) - } - allowedLevels[level] = true - } - return allowedLevels, nil -} -func validateOffLevel(allowedLevels map[LogLevel]bool) error { - if _, ok := allowedLevels[Off]; ok && len(allowedLevels) > 1 { - return errors.New("logLevel Off cant be mixed with other levels") - } - - return nil -} - -// IsAllowed returns true, if log level is in allowed log levels list. -// If the list contains the only item 'common.Off' then IsAllowed will always return false for any input values. -func (listConstr *listConstraints) IsAllowed(level LogLevel) bool { - for l := range listConstr.allowedLevels { - if l == level && level != Off { - return true - } - } - - return false -} - -// AllowedLevels returns allowed levels configuration as a map. -func (listConstr *listConstraints) AllowedLevels() map[LogLevel]bool { - return listConstr.allowedLevels -} - -//======================================================= - -type offConstraints struct { -} - -func NewOffConstraints() (*offConstraints, error) { - return &offConstraints{}, nil -} - -func (offConstr *offConstraints) IsAllowed(level LogLevel) bool { - return false -} - -func (offConstr *offConstraints) String() string { - return "Off constraint" -} diff --git a/vendor/github.com/cihub/seelog/common_context.go b/vendor/github.com/cihub/seelog/common_context.go deleted file mode 100644 index 230a76ca18..0000000000 --- a/vendor/github.com/cihub/seelog/common_context.go +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "os" - "path/filepath" - "runtime" - "strings" - "sync" - "time" -) - -var ( - workingDir = "/" - stackCache map[uintptr]*logContext - stackCacheLock sync.RWMutex -) - -func init() { - wd, err := os.Getwd() - if err == nil { - workingDir = filepath.ToSlash(wd) + "/" - } - stackCache = make(map[uintptr]*logContext) -} - -// Represents runtime caller context. -type LogContextInterface interface { - // Caller's function name. - Func() string - // Caller's line number. - Line() int - // Caller's file short path (in slashed form). - ShortPath() string - // Caller's file full path (in slashed form). - FullPath() string - // Caller's file name (without path). - FileName() string - // True if the context is correct and may be used. - // If false, then an error in context evaluation occurred and - // all its other data may be corrupted. - IsValid() bool - // Time when log function was called. - CallTime() time.Time - // Custom context that can be set by calling logger.SetContext - CustomContext() interface{} -} - -// Returns context of the caller -func currentContext(custom interface{}) (LogContextInterface, error) { - return specifyContext(1, custom) -} - -func extractCallerInfo(skip int) (*logContext, error) { - var stack [1]uintptr - if runtime.Callers(skip+1, stack[:]) != 1 { - return nil, errors.New("error during runtime.Callers") - } - pc := stack[0] - - // do we have a cache entry? - stackCacheLock.RLock() - ctx, ok := stackCache[pc] - stackCacheLock.RUnlock() - if ok { - return ctx, nil - } - - // look up the details of the given caller - funcInfo := runtime.FuncForPC(pc) - if funcInfo == nil { - return nil, errors.New("error during runtime.FuncForPC") - } - - var shortPath string - fullPath, line := funcInfo.FileLine(pc) - if strings.HasPrefix(fullPath, workingDir) { - shortPath = fullPath[len(workingDir):] - } else { - shortPath = fullPath - } - funcName := funcInfo.Name() - if strings.HasPrefix(funcName, workingDir) { - funcName = funcName[len(workingDir):] - } - - ctx = &logContext{ - funcName: funcName, - line: line, - shortPath: shortPath, - fullPath: fullPath, - fileName: filepath.Base(fullPath), - } - - // save the details in the cache; note that it's possible we might - // have written an entry into the map in between the test above and - // this section, but the behaviour is still correct - stackCacheLock.Lock() - stackCache[pc] = ctx - stackCacheLock.Unlock() - return ctx, nil -} - -// Returns context of the function with placed "skip" stack frames of the caller -// If skip == 0 then behaves like currentContext -// Context is returned in any situation, even if error occurs. But, if an error -// occurs, the returned context is an error context, which contains no paths -// or names, but states that they can't be extracted. -func specifyContext(skip int, custom interface{}) (LogContextInterface, error) { - callTime := time.Now() - if skip < 0 { - err := fmt.Errorf("can not skip negative stack frames") - return &errorContext{callTime, err}, err - } - caller, err := extractCallerInfo(skip + 2) - if err != nil { - return &errorContext{callTime, err}, err - } - ctx := new(logContext) - *ctx = *caller - ctx.callTime = callTime - ctx.custom = custom - return ctx, nil -} - -// Represents a normal runtime caller context. -type logContext struct { - funcName string - line int - shortPath string - fullPath string - fileName string - callTime time.Time - custom interface{} -} - -func (context *logContext) IsValid() bool { - return true -} - -func (context *logContext) Func() string { - return context.funcName -} - -func (context *logContext) Line() int { - return context.line -} - -func (context *logContext) ShortPath() string { - return context.shortPath -} - -func (context *logContext) FullPath() string { - return context.fullPath -} - -func (context *logContext) FileName() string { - return context.fileName -} - -func (context *logContext) CallTime() time.Time { - return context.callTime -} - -func (context *logContext) CustomContext() interface{} { - return context.custom -} - -// Represents an error context -type errorContext struct { - errorTime time.Time - err error -} - -func (errContext *errorContext) getErrorText(prefix string) string { - return fmt.Sprintf("%s() error: %s", prefix, errContext.err) -} - -func (errContext *errorContext) IsValid() bool { - return false -} - -func (errContext *errorContext) Line() int { - return -1 -} - -func (errContext *errorContext) Func() string { - return errContext.getErrorText("Func") -} - -func (errContext *errorContext) ShortPath() string { - return errContext.getErrorText("ShortPath") -} - -func (errContext *errorContext) FullPath() string { - return errContext.getErrorText("FullPath") -} - -func (errContext *errorContext) FileName() string { - return errContext.getErrorText("FileName") -} - -func (errContext *errorContext) CallTime() time.Time { - return errContext.errorTime -} - -func (errContext *errorContext) CustomContext() interface{} { - return nil -} diff --git a/vendor/github.com/cihub/seelog/common_exception.go b/vendor/github.com/cihub/seelog/common_exception.go deleted file mode 100644 index 9acc275070..0000000000 --- a/vendor/github.com/cihub/seelog/common_exception.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "regexp" - "strings" -) - -// Used in rules creation to validate input file and func filters -var ( - fileFormatValidator = regexp.MustCompile(`[a-zA-Z0-9\\/ _\*\.]*`) - funcFormatValidator = regexp.MustCompile(`[a-zA-Z0-9_\*\.]*`) -) - -// LogLevelException represents an exceptional case used when you need some specific files or funcs to -// override general constraints and to use their own. -type LogLevelException struct { - funcPatternParts []string - filePatternParts []string - - funcPattern string - filePattern string - - constraints logLevelConstraints -} - -// NewLogLevelException creates a new exception. -func NewLogLevelException(funcPattern string, filePattern string, constraints logLevelConstraints) (*LogLevelException, error) { - if constraints == nil { - return nil, errors.New("constraints can not be nil") - } - - exception := new(LogLevelException) - - err := exception.initFuncPatternParts(funcPattern) - if err != nil { - return nil, err - } - exception.funcPattern = strings.Join(exception.funcPatternParts, "") - - err = exception.initFilePatternParts(filePattern) - if err != nil { - return nil, err - } - exception.filePattern = strings.Join(exception.filePatternParts, "") - - exception.constraints = constraints - - return exception, nil -} - -// MatchesContext returns true if context matches the patterns of this LogLevelException -func (logLevelEx *LogLevelException) MatchesContext(context LogContextInterface) bool { - return logLevelEx.match(context.Func(), context.FullPath()) -} - -// IsAllowed returns true if log level is allowed according to the constraints of this LogLevelException -func (logLevelEx *LogLevelException) IsAllowed(level LogLevel) bool { - return logLevelEx.constraints.IsAllowed(level) -} - -// FuncPattern returns the function pattern of a exception -func (logLevelEx *LogLevelException) FuncPattern() string { - return logLevelEx.funcPattern -} - -// FuncPattern returns the file pattern of a exception -func (logLevelEx *LogLevelException) FilePattern() string { - return logLevelEx.filePattern -} - -// initFuncPatternParts checks whether the func filter has a correct format and splits funcPattern on parts -func (logLevelEx *LogLevelException) initFuncPatternParts(funcPattern string) (err error) { - - if funcFormatValidator.FindString(funcPattern) != funcPattern { - return errors.New("func path \"" + funcPattern + "\" contains incorrect symbols. Only a-z A-Z 0-9 _ * . allowed)") - } - - logLevelEx.funcPatternParts = splitPattern(funcPattern) - return nil -} - -// Checks whether the file filter has a correct format and splits file patterns using splitPattern. -func (logLevelEx *LogLevelException) initFilePatternParts(filePattern string) (err error) { - - if fileFormatValidator.FindString(filePattern) != filePattern { - return errors.New("file path \"" + filePattern + "\" contains incorrect symbols. Only a-z A-Z 0-9 \\ / _ * . allowed)") - } - - logLevelEx.filePatternParts = splitPattern(filePattern) - return err -} - -func (logLevelEx *LogLevelException) match(funcPath string, filePath string) bool { - if !stringMatchesPattern(logLevelEx.funcPatternParts, funcPath) { - return false - } - return stringMatchesPattern(logLevelEx.filePatternParts, filePath) -} - -func (logLevelEx *LogLevelException) String() string { - str := fmt.Sprintf("Func: %s File: %s", logLevelEx.funcPattern, logLevelEx.filePattern) - - if logLevelEx.constraints != nil { - str += fmt.Sprintf("Constr: %s", logLevelEx.constraints) - } else { - str += "nil" - } - - return str -} - -// splitPattern splits pattern into strings and asterisks. Example: "ab*cde**f" -> ["ab", "*", "cde", "*", "f"] -func splitPattern(pattern string) []string { - var patternParts []string - var lastChar rune - for _, char := range pattern { - if char == '*' { - if lastChar != '*' { - patternParts = append(patternParts, "*") - } - } else { - if len(patternParts) != 0 && lastChar != '*' { - patternParts[len(patternParts)-1] += string(char) - } else { - patternParts = append(patternParts, string(char)) - } - } - lastChar = char - } - - return patternParts -} - -// stringMatchesPattern check whether testString matches pattern with asterisks. -// Standard regexp functionality is not used here because of performance issues. -func stringMatchesPattern(patternparts []string, testString string) bool { - if len(patternparts) == 0 { - return len(testString) == 0 - } - - part := patternparts[0] - if part != "*" { - index := strings.Index(testString, part) - if index == 0 { - return stringMatchesPattern(patternparts[1:], testString[len(part):]) - } - } else { - if len(patternparts) == 1 { - return true - } - - newTestString := testString - part = patternparts[1] - for { - index := strings.Index(newTestString, part) - if index == -1 { - break - } - - newTestString = newTestString[index+len(part):] - result := stringMatchesPattern(patternparts[2:], newTestString) - if result { - return true - } - } - } - return false -} diff --git a/vendor/github.com/cihub/seelog/common_flusher.go b/vendor/github.com/cihub/seelog/common_flusher.go deleted file mode 100644 index 0ef077c8da..0000000000 --- a/vendor/github.com/cihub/seelog/common_flusher.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -// flusherInterface represents all objects that have to do cleanup -// at certain moments of time (e.g. before app shutdown to avoid data loss) -type flusherInterface interface { - Flush() -} diff --git a/vendor/github.com/cihub/seelog/common_loglevel.go b/vendor/github.com/cihub/seelog/common_loglevel.go deleted file mode 100644 index d54ecf2709..0000000000 --- a/vendor/github.com/cihub/seelog/common_loglevel.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -// Log level type -type LogLevel uint8 - -// Log levels -const ( - TraceLvl = iota - DebugLvl - InfoLvl - WarnLvl - ErrorLvl - CriticalLvl - Off -) - -// Log level string representations (used in configuration files) -const ( - TraceStr = "trace" - DebugStr = "debug" - InfoStr = "info" - WarnStr = "warn" - ErrorStr = "error" - CriticalStr = "critical" - OffStr = "off" -) - -var levelToStringRepresentations = map[LogLevel]string{ - TraceLvl: TraceStr, - DebugLvl: DebugStr, - InfoLvl: InfoStr, - WarnLvl: WarnStr, - ErrorLvl: ErrorStr, - CriticalLvl: CriticalStr, - Off: OffStr, -} - -// LogLevelFromString parses a string and returns a corresponding log level, if sucessfull. -func LogLevelFromString(levelStr string) (level LogLevel, found bool) { - for lvl, lvlStr := range levelToStringRepresentations { - if lvlStr == levelStr { - return lvl, true - } - } - - return 0, false -} - -// LogLevelToString returns seelog string representation for a specified level. Returns "" for invalid log levels. -func (level LogLevel) String() string { - levelStr, ok := levelToStringRepresentations[level] - if ok { - return levelStr - } - - return "" -} diff --git a/vendor/github.com/cihub/seelog/dispatch_custom.go b/vendor/github.com/cihub/seelog/dispatch_custom.go deleted file mode 100644 index 383a77058c..0000000000 --- a/vendor/github.com/cihub/seelog/dispatch_custom.go +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2013 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "reflect" - "sort" -) - -var registeredReceivers = make(map[string]reflect.Type) - -// RegisterReceiver records a custom receiver type, identified by a value -// of that type (second argument), under the specified name. Registered -// names can be used in the "name" attribute of config items. -// -// RegisterReceiver takes the type of the receiver argument, without taking -// the value into the account. So do NOT enter any data to the second argument -// and only call it like: -// RegisterReceiver("somename", &MyReceiverType{}) -// -// After that, when a '' config tag with this name is used, -// a receiver of the specified type would be instantiated. Check -// CustomReceiver comments for interface details. -// -// NOTE 1: RegisterReceiver fails if you attempt to register different types -// with the same name. -// -// NOTE 2: RegisterReceiver registers those receivers that must be used in -// the configuration files ( items). Basically it is just the way -// you tell seelog config parser what should it do when it meets a -// tag with a specific name and data attributes. -// -// But If you are only using seelog as a proxy to an already instantiated -// CustomReceiver (via LoggerFromCustomReceiver func), you should not call RegisterReceiver. -func RegisterReceiver(name string, receiver CustomReceiver) { - newType := reflect.TypeOf(reflect.ValueOf(receiver).Elem().Interface()) - if t, ok := registeredReceivers[name]; ok && t != newType { - panic(fmt.Sprintf("duplicate types for %s: %s != %s", name, t, newType)) - } - registeredReceivers[name] = newType -} - -func customReceiverByName(name string) (creceiver CustomReceiver, err error) { - rt, ok := registeredReceivers[name] - if !ok { - return nil, fmt.Errorf("custom receiver name not registered: '%s'", name) - } - v, ok := reflect.New(rt).Interface().(CustomReceiver) - if !ok { - return nil, fmt.Errorf("cannot instantiate receiver with name='%s'", name) - } - return v, nil -} - -// CustomReceiverInitArgs represent arguments passed to the CustomReceiver.Init -// func when custom receiver is being initialized. -type CustomReceiverInitArgs struct { - // XmlCustomAttrs represent '' xml config item attributes that - // start with "data-". Map keys will be the attribute names without the "data-". - // Map values will the those attribute values. - // - // E.g. if you have a '' - // you will get map with 2 key-value pairs: "attr1"->"a1", "attr2"->"a2" - // - // Note that in custom items you can only use allowed attributes, like "name" and - // your custom attributes, starting with "data-". Any other will lead to a - // parsing error. - XmlCustomAttrs map[string]string -} - -// CustomReceiver is the interface that external custom seelog message receivers -// must implement in order to be able to process seelog messages. Those receivers -// are set in the xml config file using the tag. Check receivers reference -// wiki section on that. -// -// Use seelog.RegisterReceiver on the receiver type before using it. -type CustomReceiver interface { - // ReceiveMessage is called when the custom receiver gets seelog message from - // a parent dispatcher. - // - // Message, level and context args represent all data that was included in the seelog - // message at the time it was logged. - // - // The formatting is already applied to the message and depends on the config - // like with any other receiver. - // - // If you would like to inform seelog of an error that happened during the handling of - // the message, return a non-nil error. This way you'll end up seeing your error like - // any other internal seelog error. - ReceiveMessage(message string, level LogLevel, context LogContextInterface) error - - // AfterParse is called immediately after your custom receiver is instantiated by - // the xml config parser. So, if you need to do any startup logic after config parsing, - // like opening file or allocating any resources after the receiver is instantiated, do it here. - // - // If this func returns a non-nil error, then the loading procedure will fail. E.g. - // if you are loading a seelog xml config, the parser would not finish the loading - // procedure and inform about an error like with any other config error. - // - // If your custom logger needs some configuration, you can use custom attributes in - // your config. Check CustomReceiverInitArgs.XmlCustomAttrs comments. - // - // IMPORTANT: This func is NOT called when the LoggerFromCustomReceiver func is used - // to create seelog proxy logger using the custom receiver. This func is only called when - // receiver is instantiated from a config. - AfterParse(initArgs CustomReceiverInitArgs) error - - // Flush is called when the custom receiver gets a 'flush' directive from a - // parent receiver. If custom receiver implements some kind of buffering or - // queing, then the appropriate reaction on a flush message is synchronous - // flushing of all those queues/buffers. If custom receiver doesn't have - // such mechanisms, then flush implementation may be left empty. - Flush() - - // Close is called when the custom receiver gets a 'close' directive from a - // parent receiver. This happens when a top-level seelog dispatcher is sending - // 'close' to all child nodes and it means that current seelog logger is being closed. - // If you need to do any cleanup after your custom receiver is done, you should do - // it here. - Close() error -} - -type customReceiverDispatcher struct { - formatter *formatter - innerReceiver CustomReceiver - customReceiverName string - usedArgs CustomReceiverInitArgs -} - -// NewCustomReceiverDispatcher creates a customReceiverDispatcher which dispatches data to a specific receiver created -// using a tag in the config file. -func NewCustomReceiverDispatcher(formatter *formatter, customReceiverName string, cArgs CustomReceiverInitArgs) (*customReceiverDispatcher, error) { - if formatter == nil { - return nil, errors.New("formatter cannot be nil") - } - if len(customReceiverName) == 0 { - return nil, errors.New("custom receiver name cannot be empty") - } - - creceiver, err := customReceiverByName(customReceiverName) - if err != nil { - return nil, err - } - err = creceiver.AfterParse(cArgs) - if err != nil { - return nil, err - } - disp := &customReceiverDispatcher{formatter, creceiver, customReceiverName, cArgs} - - return disp, nil -} - -// NewCustomReceiverDispatcherByValue is basically the same as NewCustomReceiverDispatcher, but using -// a specific CustomReceiver value instead of instantiating a new one by type. -func NewCustomReceiverDispatcherByValue(formatter *formatter, customReceiver CustomReceiver, name string, cArgs CustomReceiverInitArgs) (*customReceiverDispatcher, error) { - if formatter == nil { - return nil, errors.New("formatter cannot be nil") - } - if customReceiver == nil { - return nil, errors.New("customReceiver cannot be nil") - } - disp := &customReceiverDispatcher{formatter, customReceiver, name, cArgs} - - return disp, nil -} - -// CustomReceiver implementation. Check CustomReceiver comments. -func (disp *customReceiverDispatcher) Dispatch( - message string, - level LogLevel, - context LogContextInterface, - errorFunc func(err error)) { - - defer func() { - if err := recover(); err != nil { - errorFunc(fmt.Errorf("panic in custom receiver '%s'.Dispatch: %s", reflect.TypeOf(disp.innerReceiver), err)) - } - }() - - err := disp.innerReceiver.ReceiveMessage(disp.formatter.Format(message, level, context), level, context) - if err != nil { - errorFunc(err) - } -} - -// CustomReceiver implementation. Check CustomReceiver comments. -func (disp *customReceiverDispatcher) Flush() { - disp.innerReceiver.Flush() -} - -// CustomReceiver implementation. Check CustomReceiver comments. -func (disp *customReceiverDispatcher) Close() error { - disp.innerReceiver.Flush() - - err := disp.innerReceiver.Close() - if err != nil { - return err - } - - return nil -} - -func (disp *customReceiverDispatcher) String() string { - datas := "" - skeys := make([]string, 0, len(disp.usedArgs.XmlCustomAttrs)) - for i := range disp.usedArgs.XmlCustomAttrs { - skeys = append(skeys, i) - } - sort.Strings(skeys) - for _, key := range skeys { - datas += fmt.Sprintf("<%s, %s> ", key, disp.usedArgs.XmlCustomAttrs[key]) - } - - str := fmt.Sprintf("Custom receiver %s [fmt='%s'],[data='%s'],[inner='%s']\n", - disp.customReceiverName, disp.formatter.String(), datas, disp.innerReceiver) - - return str -} diff --git a/vendor/github.com/cihub/seelog/dispatch_dispatcher.go b/vendor/github.com/cihub/seelog/dispatch_dispatcher.go deleted file mode 100644 index 2bd3b4a4c9..0000000000 --- a/vendor/github.com/cihub/seelog/dispatch_dispatcher.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "io" -) - -// A dispatcherInterface is used to dispatch message to all underlying receivers. -// Dispatch logic depends on given context and log level. Any errors are reported using errorFunc. -// Also, as underlying receivers may have a state, dispatcher has a ShuttingDown method which performs -// an immediate cleanup of all data that is stored in the receivers -type dispatcherInterface interface { - flusherInterface - io.Closer - Dispatch(message string, level LogLevel, context LogContextInterface, errorFunc func(err error)) -} - -type dispatcher struct { - formatter *formatter - writers []*formattedWriter - dispatchers []dispatcherInterface -} - -// Creates a dispatcher which dispatches data to a list of receivers. -// Each receiver should be either a Dispatcher or io.Writer, otherwise an error will be returned -func createDispatcher(formatter *formatter, receivers []interface{}) (*dispatcher, error) { - if formatter == nil { - return nil, errors.New("formatter cannot be nil") - } - if receivers == nil || len(receivers) == 0 { - return nil, errors.New("receivers cannot be nil or empty") - } - - disp := &dispatcher{formatter, make([]*formattedWriter, 0), make([]dispatcherInterface, 0)} - for _, receiver := range receivers { - writer, ok := receiver.(*formattedWriter) - if ok { - disp.writers = append(disp.writers, writer) - continue - } - - ioWriter, ok := receiver.(io.Writer) - if ok { - writer, err := NewFormattedWriter(ioWriter, disp.formatter) - if err != nil { - return nil, err - } - disp.writers = append(disp.writers, writer) - continue - } - - dispInterface, ok := receiver.(dispatcherInterface) - if ok { - disp.dispatchers = append(disp.dispatchers, dispInterface) - continue - } - - return nil, errors.New("method can receive either io.Writer or dispatcherInterface") - } - - return disp, nil -} - -func (disp *dispatcher) Dispatch( - message string, - level LogLevel, - context LogContextInterface, - errorFunc func(err error)) { - - for _, writer := range disp.writers { - err := writer.Write(message, level, context) - if err != nil { - errorFunc(err) - } - } - - for _, dispInterface := range disp.dispatchers { - dispInterface.Dispatch(message, level, context, errorFunc) - } -} - -// Flush goes through all underlying writers which implement flusherInterface interface -// and closes them. Recursively performs the same action for underlying dispatchers -func (disp *dispatcher) Flush() { - for _, disp := range disp.Dispatchers() { - disp.Flush() - } - - for _, formatWriter := range disp.Writers() { - flusher, ok := formatWriter.Writer().(flusherInterface) - if ok { - flusher.Flush() - } - } -} - -// Close goes through all underlying writers which implement io.Closer interface -// and closes them. Recursively performs the same action for underlying dispatchers -// Before closing, writers are flushed to prevent loss of any buffered data, so -// a call to Flush() func before Close() is not necessary -func (disp *dispatcher) Close() error { - for _, disp := range disp.Dispatchers() { - disp.Flush() - err := disp.Close() - if err != nil { - return err - } - } - - for _, formatWriter := range disp.Writers() { - flusher, ok := formatWriter.Writer().(flusherInterface) - if ok { - flusher.Flush() - } - - closer, ok := formatWriter.Writer().(io.Closer) - if ok { - err := closer.Close() - if err != nil { - return err - } - } - } - - return nil -} - -func (disp *dispatcher) Writers() []*formattedWriter { - return disp.writers -} - -func (disp *dispatcher) Dispatchers() []dispatcherInterface { - return disp.dispatchers -} - -func (disp *dispatcher) String() string { - str := "formatter: " + disp.formatter.String() + "\n" - - str += " ->Dispatchers:" - - if len(disp.dispatchers) == 0 { - str += "none\n" - } else { - str += "\n" - - for _, disp := range disp.dispatchers { - str += fmt.Sprintf(" ->%s", disp) - } - } - - str += " ->Writers:" - - if len(disp.writers) == 0 { - str += "none\n" - } else { - str += "\n" - - for _, writer := range disp.writers { - str += fmt.Sprintf(" ->%s\n", writer) - } - } - - return str -} diff --git a/vendor/github.com/cihub/seelog/dispatch_filterdispatcher.go b/vendor/github.com/cihub/seelog/dispatch_filterdispatcher.go deleted file mode 100644 index 9de8a72258..0000000000 --- a/vendor/github.com/cihub/seelog/dispatch_filterdispatcher.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "fmt" -) - -// A filterDispatcher writes the given message to underlying receivers only if message log level -// is in the allowed list. -type filterDispatcher struct { - *dispatcher - allowList map[LogLevel]bool -} - -// NewFilterDispatcher creates a new filterDispatcher using a list of allowed levels. -func NewFilterDispatcher(formatter *formatter, receivers []interface{}, allowList ...LogLevel) (*filterDispatcher, error) { - disp, err := createDispatcher(formatter, receivers) - if err != nil { - return nil, err - } - - allows := make(map[LogLevel]bool) - for _, allowLevel := range allowList { - allows[allowLevel] = true - } - - return &filterDispatcher{disp, allows}, nil -} - -func (filter *filterDispatcher) Dispatch( - message string, - level LogLevel, - context LogContextInterface, - errorFunc func(err error)) { - isAllowed, ok := filter.allowList[level] - if ok && isAllowed { - filter.dispatcher.Dispatch(message, level, context, errorFunc) - } -} - -func (filter *filterDispatcher) String() string { - return fmt.Sprintf("filterDispatcher ->\n%s", filter.dispatcher) -} diff --git a/vendor/github.com/cihub/seelog/dispatch_splitdispatcher.go b/vendor/github.com/cihub/seelog/dispatch_splitdispatcher.go deleted file mode 100644 index 1d0fe7eacc..0000000000 --- a/vendor/github.com/cihub/seelog/dispatch_splitdispatcher.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "fmt" -) - -// A splitDispatcher just writes the given message to underlying receivers. (Splits the message stream.) -type splitDispatcher struct { - *dispatcher -} - -func NewSplitDispatcher(formatter *formatter, receivers []interface{}) (*splitDispatcher, error) { - disp, err := createDispatcher(formatter, receivers) - if err != nil { - return nil, err - } - - return &splitDispatcher{disp}, nil -} - -func (splitter *splitDispatcher) String() string { - return fmt.Sprintf("splitDispatcher ->\n%s", splitter.dispatcher.String()) -} diff --git a/vendor/github.com/cihub/seelog/doc.go b/vendor/github.com/cihub/seelog/doc.go deleted file mode 100644 index 2734c9cbb3..0000000000 --- a/vendor/github.com/cihub/seelog/doc.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2014 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog implements logging functionality with flexible dispatching, filtering, and formatting. - -Creation - -To create a logger, use one of the following constructors: - func LoggerFromConfigAsBytes - func LoggerFromConfigAsFile - func LoggerFromConfigAsString - func LoggerFromWriterWithMinLevel - func LoggerFromWriterWithMinLevelAndFormat - func LoggerFromCustomReceiver (check https://github.com/cihub/seelog/wiki/Custom-receivers) -Example: - import log "github.com/cihub/seelog" - - func main() { - logger, err := log.LoggerFromConfigAsFile("seelog.xml") - if err != nil { - panic(err) - } - defer logger.Flush() - ... use logger ... - } -The "defer" line is important because if you are using asynchronous logger behavior, without this line you may end up losing some -messages when you close your application because they are processed in another non-blocking goroutine. To avoid that you -explicitly defer flushing all messages before closing. - -Usage - -Logger created using one of the LoggerFrom* funcs can be used directly by calling one of the main log funcs. -Example: - import log "github.com/cihub/seelog" - - func main() { - logger, err := log.LoggerFromConfigAsFile("seelog.xml") - if err != nil { - panic(err) - } - defer logger.Flush() - logger.Trace("test") - logger.Debugf("var = %s", "abc") - } - -Having loggers as variables is convenient if you are writing your own package with internal logging or if you have -several loggers with different options. -But for most standalone apps it is more convenient to use package level funcs and vars. There is a package level -var 'Current' made for it. You can replace it with another logger using 'ReplaceLogger' and then use package level funcs: - import log "github.com/cihub/seelog" - - func main() { - logger, err := log.LoggerFromConfigAsFile("seelog.xml") - if err != nil { - panic(err) - } - log.ReplaceLogger(logger) - defer log.Flush() - log.Trace("test") - log.Debugf("var = %s", "abc") - } -Last lines - log.Trace("test") - log.Debugf("var = %s", "abc") -do the same as - log.Current.Trace("test") - log.Current.Debugf("var = %s", "abc") -In this example the 'Current' logger was replaced using a 'ReplaceLogger' call and became equal to 'logger' variable created from config. -This way you are able to use package level funcs instead of passing the logger variable. - -Configuration - -Main seelog point is to configure logger via config files and not the code. -The configuration is read by LoggerFrom* funcs. These funcs read xml configuration from different sources and try -to create a logger using it. - -All the configuration features are covered in detail in the official wiki: https://github.com/cihub/seelog/wiki. -There are many sections covering different aspects of seelog, but the most important for understanding configs are: - https://github.com/cihub/seelog/wiki/Constraints-and-exceptions - https://github.com/cihub/seelog/wiki/Dispatchers-and-receivers - https://github.com/cihub/seelog/wiki/Formatting - https://github.com/cihub/seelog/wiki/Logger-types -After you understand these concepts, check the 'Reference' section on the main wiki page to get the up-to-date -list of dispatchers, receivers, formats, and logger types. - -Here is an example config with all these features: - - - - - - - - - - - - - - - - - - - - - -This config represents a logger with adaptive timeout between log messages (check logger types reference) which -logs to console, all.log, and errors.log depending on the log level. Its output formats also depend on log level. This logger will only -use log level 'debug' and higher (minlevel is set) for all files with names that don't start with 'test'. For files starting with 'test' -this logger prohibits all levels below 'error'. - -Configuration using code - -Although configuration using code is not recommended, it is sometimes needed and it is possible to do with seelog. Basically, what -you need to do to get started is to create constraints, exceptions and a dispatcher tree (same as with config). Most of the New* -functions in this package are used to provide such capabilities. - -Here is an example of configuration in code, that demonstrates an async loop logger that logs to a simple split dispatcher with -a console receiver using a specified format and is filtered using a top-level min-max constraints and one expection for -the 'main.go' file. So, this is basically a demonstration of configuration of most of the features: - - package main - - import log "github.com/cihub/seelog" - - func main() { - defer log.Flush() - log.Info("Hello from Seelog!") - - consoleWriter, _ := log.NewConsoleWriter() - formatter, _ := log.NewFormatter("%Level %Msg %File%n") - root, _ := log.NewSplitDispatcher(formatter, []interface{}{consoleWriter}) - constraints, _ := log.NewMinMaxConstraints(log.TraceLvl, log.CriticalLvl) - specificConstraints, _ := log.NewListConstraints([]log.LogLevel{log.InfoLvl, log.ErrorLvl}) - ex, _ := log.NewLogLevelException("*", "*main.go", specificConstraints) - exceptions := []*log.LogLevelException{ex} - - logger := log.NewAsyncLoopLogger(log.NewLoggerConfig(constraints, exceptions, root)) - log.ReplaceLogger(logger) - - log.Trace("This should not be seen") - log.Debug("This should not be seen") - log.Info("Test") - log.Error("Test2") - } - -Examples - -To learn seelog features faster you should check the examples package: https://github.com/cihub/seelog-examples -It contains many example configs and usecases. -*/ -package seelog diff --git a/vendor/github.com/cihub/seelog/format.go b/vendor/github.com/cihub/seelog/format.go deleted file mode 100644 index ec47b45704..0000000000 --- a/vendor/github.com/cihub/seelog/format.go +++ /dev/null @@ -1,466 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" - "unicode" - "unicode/utf8" -) - -// FormatterSymbol is a special symbol used in config files to mark special format aliases. -const ( - FormatterSymbol = '%' -) - -const ( - formatterParameterStart = '(' - formatterParameterEnd = ')' -) - -// Time and date formats used for %Date and %Time aliases. -const ( - DateDefaultFormat = "2006-01-02" - TimeFormat = "15:04:05" -) - -var DefaultMsgFormat = "%Ns [%Level] %Msg%n" - -var ( - DefaultFormatter *formatter - msgonlyformatter *formatter -) - -func init() { - var err error - if DefaultFormatter, err = NewFormatter(DefaultMsgFormat); err != nil { - reportInternalError(fmt.Errorf("error during creating DefaultFormatter: %s", err)) - } - if msgonlyformatter, err = NewFormatter("%Msg"); err != nil { - reportInternalError(fmt.Errorf("error during creating msgonlyformatter: %s", err)) - } -} - -// FormatterFunc represents one formatter object that starts with '%' sign in the 'format' attribute -// of the 'format' config item. These special symbols are replaced with context values or special -// strings when message is written to byte receiver. -// -// Check https://github.com/cihub/seelog/wiki/Formatting for details. -// Full list (with descriptions) of formatters: https://github.com/cihub/seelog/wiki/Format-reference -// -// FormatterFunc takes raw log message, level, log context and returns a string, number (of any type) or any object -// that can be evaluated as string. -type FormatterFunc func(message string, level LogLevel, context LogContextInterface) interface{} - -// FormatterFuncCreator is a factory of FormatterFunc objects. It is used to generate parameterized -// formatters (such as %Date or %EscM) and custom user formatters. -type FormatterFuncCreator func(param string) FormatterFunc - -var formatterFuncs = map[string]FormatterFunc{ - "Level": formatterLevel, - "Lev": formatterLev, - "LEVEL": formatterLEVEL, - "LEV": formatterLEV, - "l": formatterl, - "Msg": formatterMsg, - "FullPath": formatterFullPath, - "File": formatterFile, - "RelFile": formatterRelFile, - "Func": FormatterFunction, - "FuncShort": FormatterFunctionShort, - "Line": formatterLine, - "Time": formatterTime, - "UTCTime": formatterUTCTime, - "Ns": formatterNs, - "UTCNs": formatterUTCNs, - "r": formatterr, - "n": formattern, - "t": formattert, -} - -var formatterFuncsParameterized = map[string]FormatterFuncCreator{ - "Date": createDateTimeFormatterFunc, - "UTCDate": createUTCDateTimeFormatterFunc, - "EscM": createANSIEscapeFunc, -} - -func errorAliasReserved(name string) error { - return fmt.Errorf("cannot use '%s' as custom formatter name. Name is reserved", name) -} - -// RegisterCustomFormatter registers a new custom formatter factory with a given name. If returned error is nil, -// then this name (prepended by '%' symbol) can be used in 'format' attributes in configuration and -// it will be treated like the standard parameterized formatter identifiers. -// -// RegisterCustomFormatter needs to be called before creating a logger for it to take effect. The general recommendation -// is to call it once in 'init' func of your application or any initializer func. -// -// For usage examples, check https://github.com/cihub/seelog/wiki/Custom-formatters. -// -// Name must only consist of letters (unicode.IsLetter). -// -// Name must not be one of the already registered standard formatter names -// (https://github.com/cihub/seelog/wiki/Format-reference) and previously registered -// custom format names. To avoid any potential name conflicts (in future releases), it is recommended -// to start your custom formatter name with a namespace (e.g. 'MyCompanySomething') or a 'Custom' keyword. -func RegisterCustomFormatter(name string, creator FormatterFuncCreator) error { - if _, ok := formatterFuncs[name]; ok { - return errorAliasReserved(name) - } - if _, ok := formatterFuncsParameterized[name]; ok { - return errorAliasReserved(name) - } - formatterFuncsParameterized[name] = creator - return nil -} - -// formatter is used to write messages in a specific format, inserting such additional data -// as log level, date/time, etc. -type formatter struct { - fmtStringOriginal string - fmtString string - formatterFuncs []FormatterFunc -} - -// NewFormatter creates a new formatter using a format string -func NewFormatter(formatString string) (*formatter, error) { - fmtr := new(formatter) - fmtr.fmtStringOriginal = formatString - if err := buildFormatterFuncs(fmtr); err != nil { - return nil, err - } - return fmtr, nil -} - -func buildFormatterFuncs(formatter *formatter) error { - var ( - fsbuf = new(bytes.Buffer) - fsolm1 = len(formatter.fmtStringOriginal) - 1 - ) - for i := 0; i <= fsolm1; i++ { - if char := formatter.fmtStringOriginal[i]; char != FormatterSymbol { - fsbuf.WriteByte(char) - continue - } - // Check if the index is at the end of the string. - if i == fsolm1 { - return fmt.Errorf("format error: %c cannot be last symbol", FormatterSymbol) - } - // Check if the formatter symbol is doubled and skip it as nonmatching. - if formatter.fmtStringOriginal[i+1] == FormatterSymbol { - fsbuf.WriteRune(FormatterSymbol) - i++ - continue - } - function, ni, err := formatter.extractFormatterFunc(i + 1) - if err != nil { - return err - } - // Append formatting string "%v". - fsbuf.Write([]byte{37, 118}) - i = ni - formatter.formatterFuncs = append(formatter.formatterFuncs, function) - } - formatter.fmtString = fsbuf.String() - return nil -} - -func (formatter *formatter) extractFormatterFunc(index int) (FormatterFunc, int, error) { - letterSequence := formatter.extractLetterSequence(index) - if len(letterSequence) == 0 { - return nil, 0, fmt.Errorf("format error: lack of formatter after %c at %d", FormatterSymbol, index) - } - - function, formatterLength, ok := formatter.findFormatterFunc(letterSequence) - if ok { - return function, index + formatterLength - 1, nil - } - - function, formatterLength, ok, err := formatter.findFormatterFuncParametrized(letterSequence, index) - if err != nil { - return nil, 0, err - } - if ok { - return function, index + formatterLength - 1, nil - } - - return nil, 0, errors.New("format error: unrecognized formatter at " + strconv.Itoa(index) + ": " + letterSequence) -} - -func (formatter *formatter) extractLetterSequence(index int) string { - letters := "" - - bytesToParse := []byte(formatter.fmtStringOriginal[index:]) - runeCount := utf8.RuneCount(bytesToParse) - for i := 0; i < runeCount; i++ { - rune, runeSize := utf8.DecodeRune(bytesToParse) - bytesToParse = bytesToParse[runeSize:] - - if unicode.IsLetter(rune) { - letters += string(rune) - } else { - break - } - } - return letters -} - -func (formatter *formatter) findFormatterFunc(letters string) (FormatterFunc, int, bool) { - currentVerb := letters - for i := 0; i < len(letters); i++ { - function, ok := formatterFuncs[currentVerb] - if ok { - return function, len(currentVerb), ok - } - currentVerb = currentVerb[:len(currentVerb)-1] - } - - return nil, 0, false -} - -func (formatter *formatter) findFormatterFuncParametrized(letters string, lettersStartIndex int) (FormatterFunc, int, bool, error) { - currentVerb := letters - for i := 0; i < len(letters); i++ { - functionCreator, ok := formatterFuncsParameterized[currentVerb] - if ok { - parameter := "" - parameterLen := 0 - isVerbEqualsLetters := i == 0 // if not, then letter goes after formatter, and formatter is parameterless - if isVerbEqualsLetters { - userParameter := "" - var err error - userParameter, parameterLen, ok, err = formatter.findparameter(lettersStartIndex + len(currentVerb)) - if ok { - parameter = userParameter - } else if err != nil { - return nil, 0, false, err - } - } - - return functionCreator(parameter), len(currentVerb) + parameterLen, true, nil - } - - currentVerb = currentVerb[:len(currentVerb)-1] - } - - return nil, 0, false, nil -} - -func (formatter *formatter) findparameter(startIndex int) (string, int, bool, error) { - if len(formatter.fmtStringOriginal) == startIndex || formatter.fmtStringOriginal[startIndex] != formatterParameterStart { - return "", 0, false, nil - } - - endIndex := strings.Index(formatter.fmtStringOriginal[startIndex:], string(formatterParameterEnd)) - if endIndex == -1 { - return "", 0, false, fmt.Errorf("Unmatched parenthesis or invalid parameter at %d: %s", - startIndex, formatter.fmtStringOriginal[startIndex:]) - } - endIndex += startIndex - - length := endIndex - startIndex + 1 - - return formatter.fmtStringOriginal[startIndex+1 : endIndex], length, true, nil -} - -// Format processes a message with special formatters, log level, and context. Returns formatted string -// with all formatter identifiers changed to appropriate values. -func (formatter *formatter) Format(message string, level LogLevel, context LogContextInterface) string { - if len(formatter.formatterFuncs) == 0 { - return formatter.fmtString - } - - params := make([]interface{}, len(formatter.formatterFuncs)) - for i, function := range formatter.formatterFuncs { - params[i] = function(message, level, context) - } - - return fmt.Sprintf(formatter.fmtString, params...) -} - -func (formatter *formatter) String() string { - return formatter.fmtStringOriginal -} - -//===================================================== - -const ( - wrongLogLevel = "WRONG_LOGLEVEL" - wrongEscapeCode = "WRONG_ESCAPE" -) - -var levelToString = map[LogLevel]string{ - TraceLvl: "Trace", - DebugLvl: "Debug", - InfoLvl: "Info", - WarnLvl: "Warn", - ErrorLvl: "Error", - CriticalLvl: "Critical", - Off: "Off", -} - -var levelToShortString = map[LogLevel]string{ - TraceLvl: "Trc", - DebugLvl: "Dbg", - InfoLvl: "Inf", - WarnLvl: "Wrn", - ErrorLvl: "Err", - CriticalLvl: "Crt", - Off: "Off", -} - -var levelToShortestString = map[LogLevel]string{ - TraceLvl: "t", - DebugLvl: "d", - InfoLvl: "i", - WarnLvl: "w", - ErrorLvl: "e", - CriticalLvl: "c", - Off: "o", -} - -func formatterLevel(message string, level LogLevel, context LogContextInterface) interface{} { - levelStr, ok := levelToString[level] - if !ok { - return wrongLogLevel - } - return levelStr -} - -func formatterLev(message string, level LogLevel, context LogContextInterface) interface{} { - levelStr, ok := levelToShortString[level] - if !ok { - return wrongLogLevel - } - return levelStr -} - -func formatterLEVEL(message string, level LogLevel, context LogContextInterface) interface{} { - return strings.ToTitle(formatterLevel(message, level, context).(string)) -} - -func formatterLEV(message string, level LogLevel, context LogContextInterface) interface{} { - return strings.ToTitle(formatterLev(message, level, context).(string)) -} - -func formatterl(message string, level LogLevel, context LogContextInterface) interface{} { - levelStr, ok := levelToShortestString[level] - if !ok { - return wrongLogLevel - } - return levelStr -} - -func formatterMsg(message string, level LogLevel, context LogContextInterface) interface{} { - return message -} - -func formatterFullPath(message string, level LogLevel, context LogContextInterface) interface{} { - return context.FullPath() -} - -func formatterFile(message string, level LogLevel, context LogContextInterface) interface{} { - return context.FileName() -} - -func formatterRelFile(message string, level LogLevel, context LogContextInterface) interface{} { - return context.ShortPath() -} - -func FormatterFunction(message string, level LogLevel, context LogContextInterface) interface{} { - return context.Func() -} - -func FormatterFunctionShort(message string, level LogLevel, context LogContextInterface) interface{} { - f := context.Func() - spl := strings.Split(f, ".") - return spl[len(spl)-1] -} - -func formatterLine(message string, level LogLevel, context LogContextInterface) interface{} { - return context.Line() -} - -func formatterTime(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().Format(TimeFormat) -} - -func formatterUTCTime(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().UTC().Format(TimeFormat) -} - -func formatterNs(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().UnixNano() -} - -func formatterUTCNs(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().UTC().UnixNano() -} - -func formatterr(message string, level LogLevel, context LogContextInterface) interface{} { - return "\r" -} - -func formattern(message string, level LogLevel, context LogContextInterface) interface{} { - return "\n" -} - -func formattert(message string, level LogLevel, context LogContextInterface) interface{} { - return "\t" -} - -func createDateTimeFormatterFunc(dateTimeFormat string) FormatterFunc { - format := dateTimeFormat - if format == "" { - format = DateDefaultFormat - } - return func(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().Format(format) - } -} - -func createUTCDateTimeFormatterFunc(dateTimeFormat string) FormatterFunc { - format := dateTimeFormat - if format == "" { - format = DateDefaultFormat - } - return func(message string, level LogLevel, context LogContextInterface) interface{} { - return context.CallTime().UTC().Format(format) - } -} - -func createANSIEscapeFunc(escapeCodeString string) FormatterFunc { - return func(message string, level LogLevel, context LogContextInterface) interface{} { - if len(escapeCodeString) == 0 { - return wrongEscapeCode - } - - return fmt.Sprintf("%c[%sm", 0x1B, escapeCodeString) - } -} diff --git a/vendor/github.com/cihub/seelog/internals_baseerror.go b/vendor/github.com/cihub/seelog/internals_baseerror.go deleted file mode 100644 index c0b271d7dd..0000000000 --- a/vendor/github.com/cihub/seelog/internals_baseerror.go +++ /dev/null @@ -1,10 +0,0 @@ -package seelog - -// Base struct for custom errors. -type baseError struct { - message string -} - -func (be baseError) Error() string { - return be.message -} diff --git a/vendor/github.com/cihub/seelog/internals_fsutils.go b/vendor/github.com/cihub/seelog/internals_fsutils.go deleted file mode 100644 index c0a0e0e468..0000000000 --- a/vendor/github.com/cihub/seelog/internals_fsutils.go +++ /dev/null @@ -1,320 +0,0 @@ -package seelog - -import ( - "fmt" - "io" - "os" - "path/filepath" - "sync" -) - -// File and directory permitions. -const ( - defaultFilePermissions = 0666 - defaultDirectoryPermissions = 0767 -) - -const ( - // Max number of directories can be read asynchronously. - maxDirNumberReadAsync = 1000 -) - -type cannotOpenFileError struct { - baseError -} - -func newCannotOpenFileError(fname string) *cannotOpenFileError { - return &cannotOpenFileError{baseError{message: "Cannot open file: " + fname}} -} - -type notDirectoryError struct { - baseError -} - -func newNotDirectoryError(dname string) *notDirectoryError { - return ¬DirectoryError{baseError{message: dname + " is not directory"}} -} - -// fileFilter is a filtering criteria function for '*os.File'. -// Must return 'false' to set aside the given file. -type fileFilter func(os.FileInfo, *os.File) bool - -// filePathFilter is a filtering creteria function for file path. -// Must return 'false' to set aside the given file. -type filePathFilter func(filePath string) bool - -// GetSubdirNames returns a list of directories found in -// the given one with dirPath. -func getSubdirNames(dirPath string) ([]string, error) { - fi, err := os.Stat(dirPath) - if err != nil { - return nil, err - } - if !fi.IsDir() { - return nil, newNotDirectoryError(dirPath) - } - dd, err := os.Open(dirPath) - // Cannot open file. - if err != nil { - if dd != nil { - dd.Close() - } - return nil, err - } - defer dd.Close() - // TODO: Improve performance by buffering reading. - allEntities, err := dd.Readdir(-1) - if err != nil { - return nil, err - } - subDirs := []string{} - for _, entity := range allEntities { - if entity.IsDir() { - subDirs = append(subDirs, entity.Name()) - } - } - return subDirs, nil -} - -// getSubdirAbsPaths recursively visit all the subdirectories -// starting from the given directory and returns absolute paths for them. -func getAllSubdirAbsPaths(dirPath string) (res []string, err error) { - dps, err := getSubdirAbsPaths(dirPath) - if err != nil { - res = []string{} - return - } - res = append(res, dps...) - for _, dp := range dps { - sdps, err := getAllSubdirAbsPaths(dp) - if err != nil { - return []string{}, err - } - res = append(res, sdps...) - } - return -} - -// getSubdirAbsPaths supplies absolute paths for all subdirectiries in a given directory. -// Input: (I1) dirPath - absolute path of a directory in question. -// Out: (O1) - slice of subdir asbolute paths; (O2) - error of the operation. -// Remark: If error (O2) is non-nil then (O1) is nil and vice versa. -func getSubdirAbsPaths(dirPath string) ([]string, error) { - sdns, err := getSubdirNames(dirPath) - if err != nil { - return nil, err - } - rsdns := []string{} - for _, sdn := range sdns { - rsdns = append(rsdns, filepath.Join(dirPath, sdn)) - } - return rsdns, nil -} - -// getOpenFilesInDir supplies a slice of os.File pointers to files located in the directory. -// Remark: Ignores files for which fileFilter returns false -func getOpenFilesInDir(dirPath string, fFilter fileFilter) ([]*os.File, error) { - dfi, err := os.Open(dirPath) - if err != nil { - return nil, newCannotOpenFileError("Cannot open directory " + dirPath) - } - defer dfi.Close() - // Size of read buffer (i.e. chunk of items read at a time). - rbs := 64 - resFiles := []*os.File{} -L: - for { - // Read directory entities by reasonable chuncks - // to prevent overflows on big number of files. - fis, e := dfi.Readdir(rbs) - switch e { - // It's OK. - case nil: - // Do nothing, just continue cycle. - case io.EOF: - break L - // Something went wrong. - default: - return nil, e - } - // THINK: Maybe, use async running. - for _, fi := range fis { - // NB: On Linux this could be a problem as - // there are lots of file types available. - if !fi.IsDir() { - f, e := os.Open(filepath.Join(dirPath, fi.Name())) - if e != nil { - if f != nil { - f.Close() - } - // THINK: Add nil as indicator that a problem occurred. - resFiles = append(resFiles, nil) - continue - } - // Check filter condition. - if fFilter != nil && !fFilter(fi, f) { - continue - } - resFiles = append(resFiles, f) - } - } - } - return resFiles, nil -} - -func isRegular(m os.FileMode) bool { - return m&os.ModeType == 0 -} - -// getDirFilePaths return full paths of the files located in the directory. -// Remark: Ignores files for which fileFilter returns false. -func getDirFilePaths(dirPath string, fpFilter filePathFilter, pathIsName bool) ([]string, error) { - dfi, err := os.Open(dirPath) - if err != nil { - return nil, newCannotOpenFileError("Cannot open directory " + dirPath) - } - defer dfi.Close() - - var absDirPath string - if !filepath.IsAbs(dirPath) { - absDirPath, err = filepath.Abs(dirPath) - if err != nil { - return nil, fmt.Errorf("cannot get absolute path of directory: %s", err.Error()) - } - } else { - absDirPath = dirPath - } - - // TODO: check if dirPath is really directory. - // Size of read buffer (i.e. chunk of items read at a time). - rbs := 2 << 5 - filePaths := []string{} - - var fp string -L: - for { - // Read directory entities by reasonable chuncks - // to prevent overflows on big number of files. - fis, e := dfi.Readdir(rbs) - switch e { - // It's OK. - case nil: - // Do nothing, just continue cycle. - case io.EOF: - break L - // Indicate that something went wrong. - default: - return nil, e - } - // THINK: Maybe, use async running. - for _, fi := range fis { - // NB: Should work on every Windows and non-Windows OS. - if isRegular(fi.Mode()) { - if pathIsName { - fp = fi.Name() - } else { - // Build full path of a file. - fp = filepath.Join(absDirPath, fi.Name()) - } - // Check filter condition. - if fpFilter != nil && !fpFilter(fp) { - continue - } - filePaths = append(filePaths, fp) - } - } - } - return filePaths, nil -} - -// getOpenFilesByDirectoryAsync runs async reading directories 'dirPaths' and inserts pairs -// in map 'filesInDirMap': Key - directory name, value - *os.File slice. -func getOpenFilesByDirectoryAsync( - dirPaths []string, - fFilter fileFilter, - filesInDirMap map[string][]*os.File, -) error { - n := len(dirPaths) - if n > maxDirNumberReadAsync { - return fmt.Errorf("number of input directories to be read exceeded max value %d", maxDirNumberReadAsync) - } - type filesInDirResult struct { - DirName string - Files []*os.File - Error error - } - dirFilesChan := make(chan *filesInDirResult, n) - var wg sync.WaitGroup - // Register n goroutines which are going to do work. - wg.Add(n) - for i := 0; i < n; i++ { - // Launch asynchronously the piece of work. - go func(dirPath string) { - fs, e := getOpenFilesInDir(dirPath, fFilter) - dirFilesChan <- &filesInDirResult{filepath.Base(dirPath), fs, e} - // Mark the current goroutine as finished (work is done). - wg.Done() - }(dirPaths[i]) - } - // Wait for all goroutines to finish their work. - wg.Wait() - // Close the error channel to let for-range clause - // get all the buffered values without blocking and quit in the end. - close(dirFilesChan) - for fidr := range dirFilesChan { - if fidr.Error == nil { - // THINK: What will happen if the key is already present? - filesInDirMap[fidr.DirName] = fidr.Files - } else { - return fidr.Error - } - } - return nil -} - -// fileExists return flag whether a given file exists -// and operation error if an unclassified failure occurs. -func fileExists(path string) (bool, error) { - _, err := os.Stat(path) - if err != nil { - if os.IsNotExist(err) { - return false, nil - } - return false, err - } - return true, nil -} - -// createDirectory makes directory with a given name -// making all parent directories if necessary. -func createDirectory(dirPath string) error { - var dPath string - var err error - if !filepath.IsAbs(dirPath) { - dPath, err = filepath.Abs(dirPath) - if err != nil { - return err - } - } else { - dPath = dirPath - } - exists, err := fileExists(dPath) - if err != nil { - return err - } - if exists { - return nil - } - return os.MkdirAll(dPath, os.ModeDir) -} - -// tryRemoveFile gives a try removing the file -// only ignoring an error when the file does not exist. -func tryRemoveFile(filePath string) (err error) { - err = os.Remove(filePath) - if os.IsNotExist(err) { - err = nil - return - } - return -} diff --git a/vendor/github.com/cihub/seelog/internals_xmlnode.go b/vendor/github.com/cihub/seelog/internals_xmlnode.go deleted file mode 100644 index 9858849335..0000000000 --- a/vendor/github.com/cihub/seelog/internals_xmlnode.go +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "encoding/xml" - "errors" - "fmt" - "io" - "strings" -) - -type xmlNode struct { - name string - attributes map[string]string - children []*xmlNode - value string -} - -func newNode() *xmlNode { - node := new(xmlNode) - node.children = make([]*xmlNode, 0) - node.attributes = make(map[string]string) - return node -} - -func (node *xmlNode) String() string { - str := fmt.Sprintf("<%s", node.name) - - for attrName, attrVal := range node.attributes { - str += fmt.Sprintf(" %s=\"%s\"", attrName, attrVal) - } - - str += ">" - str += node.value - - if len(node.children) != 0 { - for _, child := range node.children { - str += fmt.Sprintf("%s", child) - } - } - - str += fmt.Sprintf("", node.name) - - return str -} - -func (node *xmlNode) unmarshal(startEl xml.StartElement) error { - node.name = startEl.Name.Local - - for _, v := range startEl.Attr { - _, alreadyExists := node.attributes[v.Name.Local] - if alreadyExists { - return errors.New("tag '" + node.name + "' has duplicated attribute: '" + v.Name.Local + "'") - } - node.attributes[v.Name.Local] = v.Value - } - - return nil -} - -func (node *xmlNode) add(child *xmlNode) { - if node.children == nil { - node.children = make([]*xmlNode, 0) - } - - node.children = append(node.children, child) -} - -func (node *xmlNode) hasChildren() bool { - return node.children != nil && len(node.children) > 0 -} - -//============================================= - -func unmarshalConfig(reader io.Reader) (*xmlNode, error) { - xmlParser := xml.NewDecoder(reader) - - config, err := unmarshalNode(xmlParser, nil) - if err != nil { - return nil, err - } - if config == nil { - return nil, errors.New("xml has no content") - } - - nextConfigEntry, err := unmarshalNode(xmlParser, nil) - if nextConfigEntry != nil { - return nil, errors.New("xml contains more than one root element") - } - - return config, nil -} - -func unmarshalNode(xmlParser *xml.Decoder, curToken xml.Token) (node *xmlNode, err error) { - firstLoop := true - for { - var tok xml.Token - if firstLoop && curToken != nil { - tok = curToken - firstLoop = false - } else { - tok, err = getNextToken(xmlParser) - if err != nil || tok == nil { - return - } - } - - switch tt := tok.(type) { - case xml.SyntaxError: - err = errors.New(tt.Error()) - return - case xml.CharData: - value := strings.TrimSpace(string([]byte(tt))) - if node != nil { - node.value += value - } - case xml.StartElement: - if node == nil { - node = newNode() - err := node.unmarshal(tt) - if err != nil { - return nil, err - } - } else { - childNode, childErr := unmarshalNode(xmlParser, tok) - if childErr != nil { - return nil, childErr - } - - if childNode != nil { - node.add(childNode) - } else { - return - } - } - case xml.EndElement: - return - } - } -} - -func getNextToken(xmlParser *xml.Decoder) (tok xml.Token, err error) { - if tok, err = xmlParser.Token(); err != nil { - if err == io.EOF { - err = nil - return - } - return - } - - return -} diff --git a/vendor/github.com/cihub/seelog/log.go b/vendor/github.com/cihub/seelog/log.go deleted file mode 100644 index f775e1fdb3..0000000000 --- a/vendor/github.com/cihub/seelog/log.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "sync" - "time" -) - -const ( - staticFuncCallDepth = 3 // See 'commonLogger.log' method comments - loggerFuncCallDepth = 3 -) - -// Current is the logger used in all package level convenience funcs like 'Trace', 'Debug', 'Flush', etc. -var Current LoggerInterface - -// Default logger that is created from an empty config: "". It is not closed by a ReplaceLogger call. -var Default LoggerInterface - -// Disabled logger that doesn't produce any output in any circumstances. It is neither closed nor flushed by a ReplaceLogger call. -var Disabled LoggerInterface - -var pkgOperationsMutex *sync.Mutex - -func init() { - pkgOperationsMutex = new(sync.Mutex) - var err error - - if Default == nil { - Default, err = LoggerFromConfigAsBytes([]byte("")) - } - - if Disabled == nil { - Disabled, err = LoggerFromConfigAsBytes([]byte("")) - } - - if err != nil { - panic(fmt.Sprintf("Seelog couldn't start. Error: %s", err.Error())) - } - - Current = Default -} - -func createLoggerFromFullConfig(config *configForParsing) (LoggerInterface, error) { - if config.LogType == syncloggerTypeFromString { - return NewSyncLogger(&config.logConfig), nil - } else if config.LogType == asyncLooploggerTypeFromString { - return NewAsyncLoopLogger(&config.logConfig), nil - } else if config.LogType == asyncTimerloggerTypeFromString { - logData := config.LoggerData - if logData == nil { - return nil, errors.New("async timer data not set") - } - - asyncInt, ok := logData.(asyncTimerLoggerData) - if !ok { - return nil, errors.New("invalid async timer data") - } - - logger, err := NewAsyncTimerLogger(&config.logConfig, time.Duration(asyncInt.AsyncInterval)) - if !ok { - return nil, err - } - - return logger, nil - } else if config.LogType == adaptiveLoggerTypeFromString { - logData := config.LoggerData - if logData == nil { - return nil, errors.New("adaptive logger parameters not set") - } - - adaptData, ok := logData.(adaptiveLoggerData) - if !ok { - return nil, errors.New("invalid adaptive logger parameters") - } - - logger, err := NewAsyncAdaptiveLogger( - &config.logConfig, - time.Duration(adaptData.MinInterval), - time.Duration(adaptData.MaxInterval), - adaptData.CriticalMsgCount, - ) - if err != nil { - return nil, err - } - - return logger, nil - } - return nil, errors.New("invalid config log type/data") -} - -// UseLogger sets the 'Current' package level logger variable to the specified value. -// This variable is used in all Trace/Debug/... package level convenience funcs. -// -// Example: -// -// after calling -// seelog.UseLogger(somelogger) -// the following: -// seelog.Debug("abc") -// will be equal to -// somelogger.Debug("abc") -// -// IMPORTANT: UseLogger do NOT close the previous logger (only flushes it). So if -// you constantly use it to replace loggers and don't close them in other code, you'll -// end up having memory leaks. -// -// To safely replace loggers, use ReplaceLogger. -func UseLogger(logger LoggerInterface) error { - if logger == nil { - return errors.New("logger can not be nil") - } - - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - - oldLogger := Current - Current = logger - - if oldLogger != nil { - oldLogger.Flush() - } - - return nil -} - -// ReplaceLogger acts as UseLogger but the logger that was previously -// used is disposed (except Default and Disabled loggers). -// -// Example: -// import log "github.com/cihub/seelog" -// -// func main() { -// logger, err := log.LoggerFromConfigAsFile("seelog.xml") -// -// if err != nil { -// panic(err) -// } -// -// log.ReplaceLogger(logger) -// defer log.Flush() -// -// log.Trace("test") -// log.Debugf("var = %s", "abc") -// } -func ReplaceLogger(logger LoggerInterface) error { - if logger == nil { - return errors.New("logger can not be nil") - } - - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - - defer func() { - if err := recover(); err != nil { - reportInternalError(fmt.Errorf("recovered from panic during ReplaceLogger: %s", err)) - } - }() - - if Current == Default { - Current.Flush() - } else if Current != nil && !Current.Closed() && Current != Disabled { - Current.Flush() - Current.Close() - } - - Current = logger - - return nil -} - -// Tracef formats message according to format specifier -// and writes to default logger with log level = Trace. -func Tracef(format string, params ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.traceWithCallDepth(staticFuncCallDepth, newLogFormattedMessage(format, params)) -} - -// Debugf formats message according to format specifier -// and writes to default logger with log level = Debug. -func Debugf(format string, params ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.debugWithCallDepth(staticFuncCallDepth, newLogFormattedMessage(format, params)) -} - -// Infof formats message according to format specifier -// and writes to default logger with log level = Info. -func Infof(format string, params ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.infoWithCallDepth(staticFuncCallDepth, newLogFormattedMessage(format, params)) -} - -// Warnf formats message according to format specifier and writes to default logger with log level = Warn -func Warnf(format string, params ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogFormattedMessage(format, params) - Current.warnWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Errorf formats message according to format specifier and writes to default logger with log level = Error -func Errorf(format string, params ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogFormattedMessage(format, params) - Current.errorWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Criticalf formats message according to format specifier and writes to default logger with log level = Critical -func Criticalf(format string, params ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogFormattedMessage(format, params) - Current.criticalWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Trace formats message using the default formats for its operands and writes to default logger with log level = Trace -func Trace(v ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.traceWithCallDepth(staticFuncCallDepth, newLogMessage(v)) -} - -// Debug formats message using the default formats for its operands and writes to default logger with log level = Debug -func Debug(v ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.debugWithCallDepth(staticFuncCallDepth, newLogMessage(v)) -} - -// Info formats message using the default formats for its operands and writes to default logger with log level = Info -func Info(v ...interface{}) { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.infoWithCallDepth(staticFuncCallDepth, newLogMessage(v)) -} - -// Warn formats message using the default formats for its operands and writes to default logger with log level = Warn -func Warn(v ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogMessage(v) - Current.warnWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Error formats message using the default formats for its operands and writes to default logger with log level = Error -func Error(v ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogMessage(v) - Current.errorWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Critical formats message using the default formats for its operands and writes to default logger with log level = Critical -func Critical(v ...interface{}) error { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - message := newLogMessage(v) - Current.criticalWithCallDepth(staticFuncCallDepth, message) - return errors.New(message.String()) -} - -// Flush immediately processes all currently queued messages and all currently buffered messages. -// It is a blocking call which returns only after the queue is empty and all the buffers are empty. -// -// If Flush is called for a synchronous logger (type='sync'), it only flushes buffers (e.g. '' receivers) -// , because there is no queue. -// -// Call this method when your app is going to shut down not to lose any log messages. -func Flush() { - pkgOperationsMutex.Lock() - defer pkgOperationsMutex.Unlock() - Current.Flush() -} diff --git a/vendor/github.com/cihub/seelog/logger.go b/vendor/github.com/cihub/seelog/logger.go deleted file mode 100644 index fc96aed492..0000000000 --- a/vendor/github.com/cihub/seelog/logger.go +++ /dev/null @@ -1,370 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "os" - "sync" -) - -func reportInternalError(err error) { - fmt.Fprintf(os.Stderr, "seelog internal error: %s\n", err) -} - -// LoggerInterface represents structs capable of logging Seelog messages -type LoggerInterface interface { - - // Tracef formats message according to format specifier - // and writes to log with level = Trace. - Tracef(format string, params ...interface{}) - - // Debugf formats message according to format specifier - // and writes to log with level = Debug. - Debugf(format string, params ...interface{}) - - // Infof formats message according to format specifier - // and writes to log with level = Info. - Infof(format string, params ...interface{}) - - // Warnf formats message according to format specifier - // and writes to log with level = Warn. - Warnf(format string, params ...interface{}) error - - // Errorf formats message according to format specifier - // and writes to log with level = Error. - Errorf(format string, params ...interface{}) error - - // Criticalf formats message according to format specifier - // and writes to log with level = Critical. - Criticalf(format string, params ...interface{}) error - - // Trace formats message using the default formats for its operands - // and writes to log with level = Trace - Trace(v ...interface{}) - - // Debug formats message using the default formats for its operands - // and writes to log with level = Debug - Debug(v ...interface{}) - - // Info formats message using the default formats for its operands - // and writes to log with level = Info - Info(v ...interface{}) - - // Warn formats message using the default formats for its operands - // and writes to log with level = Warn - Warn(v ...interface{}) error - - // Error formats message using the default formats for its operands - // and writes to log with level = Error - Error(v ...interface{}) error - - // Critical formats message using the default formats for its operands - // and writes to log with level = Critical - Critical(v ...interface{}) error - - traceWithCallDepth(callDepth int, message fmt.Stringer) - debugWithCallDepth(callDepth int, message fmt.Stringer) - infoWithCallDepth(callDepth int, message fmt.Stringer) - warnWithCallDepth(callDepth int, message fmt.Stringer) - errorWithCallDepth(callDepth int, message fmt.Stringer) - criticalWithCallDepth(callDepth int, message fmt.Stringer) - - // Close flushes all the messages in the logger and closes it. It cannot be used after this operation. - Close() - - // Flush flushes all the messages in the logger. - Flush() - - // Closed returns true if the logger was previously closed. - Closed() bool - - // SetAdditionalStackDepth sets the additional number of frames to skip by runtime.Caller - // when getting function information needed to print seelog format identifiers such as %Func or %File. - // - // This func may be used when you wrap seelog funcs and want to print caller info of you own - // wrappers instead of seelog func callers. In this case you should set depth = 1. If you then - // wrap your wrapper, you should set depth = 2, etc. - // - // NOTE: Incorrect depth value may lead to errors in runtime.Caller evaluation or incorrect - // function/file names in log files. Do not use it if you are not going to wrap seelog funcs. - // You may reset the value to default using a SetAdditionalStackDepth(0) call. - SetAdditionalStackDepth(depth int) error - - // Sets logger context that can be used in formatter funcs and custom receivers - SetContext(context interface{}) -} - -// innerLoggerInterface is an internal logging interface -type innerLoggerInterface interface { - innerLog(level LogLevel, context LogContextInterface, message fmt.Stringer) - Flush() -} - -// [file path][func name][level] -> [allowed] -type allowedContextCache map[string]map[string]map[LogLevel]bool - -// commonLogger contains all common data needed for logging and contains methods used to log messages. -type commonLogger struct { - config *logConfig // Config used for logging - contextCache allowedContextCache // Caches whether log is enabled for specific "full path-func name-level" sets - closed bool // 'true' when all writers are closed, all data is flushed, logger is unusable. Must be accessed while holding closedM - closedM sync.RWMutex - m sync.Mutex // Mutex for main operations - unusedLevels []bool - innerLogger innerLoggerInterface - addStackDepth int // Additional stack depth needed for correct seelog caller context detection - customContext interface{} -} - -func newCommonLogger(config *logConfig, internalLogger innerLoggerInterface) *commonLogger { - cLogger := new(commonLogger) - - cLogger.config = config - cLogger.contextCache = make(allowedContextCache) - cLogger.unusedLevels = make([]bool, Off) - cLogger.fillUnusedLevels() - cLogger.innerLogger = internalLogger - - return cLogger -} - -func (cLogger *commonLogger) SetAdditionalStackDepth(depth int) error { - if depth < 0 { - return fmt.Errorf("negative depth: %d", depth) - } - cLogger.m.Lock() - cLogger.addStackDepth = depth - cLogger.m.Unlock() - return nil -} - -func (cLogger *commonLogger) Tracef(format string, params ...interface{}) { - cLogger.traceWithCallDepth(loggerFuncCallDepth, newLogFormattedMessage(format, params)) -} - -func (cLogger *commonLogger) Debugf(format string, params ...interface{}) { - cLogger.debugWithCallDepth(loggerFuncCallDepth, newLogFormattedMessage(format, params)) -} - -func (cLogger *commonLogger) Infof(format string, params ...interface{}) { - cLogger.infoWithCallDepth(loggerFuncCallDepth, newLogFormattedMessage(format, params)) -} - -func (cLogger *commonLogger) Warnf(format string, params ...interface{}) error { - message := newLogFormattedMessage(format, params) - cLogger.warnWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) Errorf(format string, params ...interface{}) error { - message := newLogFormattedMessage(format, params) - cLogger.errorWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) Criticalf(format string, params ...interface{}) error { - message := newLogFormattedMessage(format, params) - cLogger.criticalWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) Trace(v ...interface{}) { - cLogger.traceWithCallDepth(loggerFuncCallDepth, newLogMessage(v)) -} - -func (cLogger *commonLogger) Debug(v ...interface{}) { - cLogger.debugWithCallDepth(loggerFuncCallDepth, newLogMessage(v)) -} - -func (cLogger *commonLogger) Info(v ...interface{}) { - cLogger.infoWithCallDepth(loggerFuncCallDepth, newLogMessage(v)) -} - -func (cLogger *commonLogger) Warn(v ...interface{}) error { - message := newLogMessage(v) - cLogger.warnWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) Error(v ...interface{}) error { - message := newLogMessage(v) - cLogger.errorWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) Critical(v ...interface{}) error { - message := newLogMessage(v) - cLogger.criticalWithCallDepth(loggerFuncCallDepth, message) - return errors.New(message.String()) -} - -func (cLogger *commonLogger) SetContext(c interface{}) { - cLogger.customContext = c -} - -func (cLogger *commonLogger) traceWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(TraceLvl, message, callDepth) -} - -func (cLogger *commonLogger) debugWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(DebugLvl, message, callDepth) -} - -func (cLogger *commonLogger) infoWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(InfoLvl, message, callDepth) -} - -func (cLogger *commonLogger) warnWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(WarnLvl, message, callDepth) -} - -func (cLogger *commonLogger) errorWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(ErrorLvl, message, callDepth) -} - -func (cLogger *commonLogger) criticalWithCallDepth(callDepth int, message fmt.Stringer) { - cLogger.log(CriticalLvl, message, callDepth) - cLogger.innerLogger.Flush() -} - -func (cLogger *commonLogger) Closed() bool { - cLogger.closedM.RLock() - defer cLogger.closedM.RUnlock() - return cLogger.closed -} - -func (cLogger *commonLogger) fillUnusedLevels() { - for i := 0; i < len(cLogger.unusedLevels); i++ { - cLogger.unusedLevels[i] = true - } - - cLogger.fillUnusedLevelsByContraint(cLogger.config.Constraints) - - for _, exception := range cLogger.config.Exceptions { - cLogger.fillUnusedLevelsByContraint(exception) - } -} - -func (cLogger *commonLogger) fillUnusedLevelsByContraint(constraint logLevelConstraints) { - for i := 0; i < len(cLogger.unusedLevels); i++ { - if constraint.IsAllowed(LogLevel(i)) { - cLogger.unusedLevels[i] = false - } - } -} - -// stackCallDepth is used to indicate the call depth of 'log' func. -// This depth level is used in the runtime.Caller(...) call. See -// common_context.go -> specifyContext, extractCallerInfo for details. -func (cLogger *commonLogger) log(level LogLevel, message fmt.Stringer, stackCallDepth int) { - if cLogger.unusedLevels[level] { - return - } - cLogger.m.Lock() - defer cLogger.m.Unlock() - - if cLogger.Closed() { - return - } - context, _ := specifyContext(stackCallDepth+cLogger.addStackDepth, cLogger.customContext) - // Context errors are not reported because there are situations - // in which context errors are normal Seelog usage cases. For - // example in executables with stripped symbols. - // Error contexts are returned instead. See common_context.go. - /*if err != nil { - reportInternalError(err) - return - }*/ - cLogger.innerLogger.innerLog(level, context, message) -} - -func (cLogger *commonLogger) processLogMsg(level LogLevel, message fmt.Stringer, context LogContextInterface) { - defer func() { - if err := recover(); err != nil { - reportInternalError(fmt.Errorf("recovered from panic during message processing: %s", err)) - } - }() - if cLogger.config.IsAllowed(level, context) { - cLogger.config.RootDispatcher.Dispatch(message.String(), level, context, reportInternalError) - } -} - -func (cLogger *commonLogger) isAllowed(level LogLevel, context LogContextInterface) bool { - funcMap, ok := cLogger.contextCache[context.FullPath()] - if !ok { - funcMap = make(map[string]map[LogLevel]bool, 0) - cLogger.contextCache[context.FullPath()] = funcMap - } - - levelMap, ok := funcMap[context.Func()] - if !ok { - levelMap = make(map[LogLevel]bool, 0) - funcMap[context.Func()] = levelMap - } - - isAllowValue, ok := levelMap[level] - if !ok { - isAllowValue = cLogger.config.IsAllowed(level, context) - levelMap[level] = isAllowValue - } - - return isAllowValue -} - -type logMessage struct { - params []interface{} -} - -type logFormattedMessage struct { - format string - params []interface{} -} - -func newLogMessage(params []interface{}) fmt.Stringer { - message := new(logMessage) - - message.params = params - - return message -} - -func newLogFormattedMessage(format string, params []interface{}) *logFormattedMessage { - message := new(logFormattedMessage) - - message.params = params - message.format = format - - return message -} - -func (message *logMessage) String() string { - return fmt.Sprint(message.params...) -} - -func (message *logFormattedMessage) String() string { - return fmt.Sprintf(message.format, message.params...) -} diff --git a/vendor/github.com/cihub/seelog/writers_bufferedwriter.go b/vendor/github.com/cihub/seelog/writers_bufferedwriter.go deleted file mode 100644 index 37d75c82e7..0000000000 --- a/vendor/github.com/cihub/seelog/writers_bufferedwriter.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "bufio" - "errors" - "fmt" - "io" - "sync" - "time" -) - -// bufferedWriter stores data in memory and flushes it every flushPeriod or when buffer is full -type bufferedWriter struct { - flushPeriod time.Duration // data flushes interval (in microseconds) - bufferMutex *sync.Mutex // mutex for buffer operations syncronization - innerWriter io.Writer // inner writer - buffer *bufio.Writer // buffered wrapper for inner writer - bufferSize int // max size of data chunk in bytes -} - -// NewBufferedWriter creates a new buffered writer struct. -// bufferSize -- size of memory buffer in bytes -// flushPeriod -- period in which data flushes from memory buffer in milliseconds. 0 - turn off this functionality -func NewBufferedWriter(innerWriter io.Writer, bufferSize int, flushPeriod time.Duration) (*bufferedWriter, error) { - - if innerWriter == nil { - return nil, errors.New("argument is nil: innerWriter") - } - if flushPeriod < 0 { - return nil, fmt.Errorf("flushPeriod can not be less than 0. Got: %d", flushPeriod) - } - - if bufferSize <= 0 { - return nil, fmt.Errorf("bufferSize can not be less or equal to 0. Got: %d", bufferSize) - } - - buffer := bufio.NewWriterSize(innerWriter, bufferSize) - - /*if err != nil { - return nil, err - }*/ - - newWriter := new(bufferedWriter) - - newWriter.innerWriter = innerWriter - newWriter.buffer = buffer - newWriter.bufferSize = bufferSize - newWriter.flushPeriod = flushPeriod * 1e6 - newWriter.bufferMutex = new(sync.Mutex) - - if flushPeriod != 0 { - go newWriter.flushPeriodically() - } - - return newWriter, nil -} - -func (bufWriter *bufferedWriter) writeBigChunk(bytes []byte) (n int, err error) { - bufferedLen := bufWriter.buffer.Buffered() - - n, err = bufWriter.flushInner() - if err != nil { - return - } - - written, writeErr := bufWriter.innerWriter.Write(bytes) - return bufferedLen + written, writeErr -} - -// Sends data to buffer manager. Waits until all buffers are full. -func (bufWriter *bufferedWriter) Write(bytes []byte) (n int, err error) { - - bufWriter.bufferMutex.Lock() - defer bufWriter.bufferMutex.Unlock() - - bytesLen := len(bytes) - - if bytesLen > bufWriter.bufferSize { - return bufWriter.writeBigChunk(bytes) - } - - if bytesLen > bufWriter.buffer.Available() { - n, err = bufWriter.flushInner() - if err != nil { - return - } - } - - bufWriter.buffer.Write(bytes) - - return len(bytes), nil -} - -func (bufWriter *bufferedWriter) Close() error { - closer, ok := bufWriter.innerWriter.(io.Closer) - if ok { - return closer.Close() - } - - return nil -} - -func (bufWriter *bufferedWriter) Flush() { - - bufWriter.bufferMutex.Lock() - defer bufWriter.bufferMutex.Unlock() - - bufWriter.flushInner() -} - -func (bufWriter *bufferedWriter) flushInner() (n int, err error) { - bufferedLen := bufWriter.buffer.Buffered() - flushErr := bufWriter.buffer.Flush() - - return bufWriter.buffer.Buffered() - bufferedLen, flushErr -} - -func (bufWriter *bufferedWriter) flushBuffer() { - bufWriter.bufferMutex.Lock() - defer bufWriter.bufferMutex.Unlock() - - bufWriter.buffer.Flush() -} - -func (bufWriter *bufferedWriter) flushPeriodically() { - if bufWriter.flushPeriod > 0 { - ticker := time.NewTicker(bufWriter.flushPeriod) - for { - <-ticker.C - bufWriter.flushBuffer() - } - } -} - -func (bufWriter *bufferedWriter) String() string { - return fmt.Sprintf("bufferedWriter size: %d, flushPeriod: %d", bufWriter.bufferSize, bufWriter.flushPeriod) -} diff --git a/vendor/github.com/cihub/seelog/writers_connwriter.go b/vendor/github.com/cihub/seelog/writers_connwriter.go deleted file mode 100644 index d199894e72..0000000000 --- a/vendor/github.com/cihub/seelog/writers_connwriter.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "crypto/tls" - "fmt" - "io" - "net" -) - -// connWriter is used to write to a stream-oriented network connection. -type connWriter struct { - innerWriter io.WriteCloser - reconnectOnMsg bool - reconnect bool - net string - addr string - useTLS bool - configTLS *tls.Config -} - -// Creates writer to the address addr on the network netName. -// Connection will be opened on each write if reconnectOnMsg = true -func NewConnWriter(netName string, addr string, reconnectOnMsg bool) *connWriter { - newWriter := new(connWriter) - - newWriter.net = netName - newWriter.addr = addr - newWriter.reconnectOnMsg = reconnectOnMsg - - return newWriter -} - -// Creates a writer that uses SSL/TLS -func newTLSWriter(netName string, addr string, reconnectOnMsg bool, config *tls.Config) *connWriter { - newWriter := new(connWriter) - - newWriter.net = netName - newWriter.addr = addr - newWriter.reconnectOnMsg = reconnectOnMsg - newWriter.useTLS = true - newWriter.configTLS = config - - return newWriter -} - -func (connWriter *connWriter) Close() error { - if connWriter.innerWriter == nil { - return nil - } - - return connWriter.innerWriter.Close() -} - -func (connWriter *connWriter) Write(bytes []byte) (n int, err error) { - if connWriter.neededConnectOnMsg() { - err = connWriter.connect() - if err != nil { - return 0, err - } - } - - if connWriter.reconnectOnMsg { - defer connWriter.innerWriter.Close() - } - - n, err = connWriter.innerWriter.Write(bytes) - if err != nil { - connWriter.reconnect = true - } - - return -} - -func (connWriter *connWriter) String() string { - return fmt.Sprintf("Conn writer: [%s, %s, %v]", connWriter.net, connWriter.addr, connWriter.reconnectOnMsg) -} - -func (connWriter *connWriter) connect() error { - if connWriter.innerWriter != nil { - connWriter.innerWriter.Close() - connWriter.innerWriter = nil - } - - if connWriter.useTLS { - conn, err := tls.Dial(connWriter.net, connWriter.addr, connWriter.configTLS) - if err != nil { - return err - } - connWriter.innerWriter = conn - - return nil - } - - conn, err := net.Dial(connWriter.net, connWriter.addr) - if err != nil { - return err - } - - tcpConn, ok := conn.(*net.TCPConn) - if ok { - tcpConn.SetKeepAlive(true) - } - - connWriter.innerWriter = conn - - return nil -} - -func (connWriter *connWriter) neededConnectOnMsg() bool { - if connWriter.reconnect { - connWriter.reconnect = false - return true - } - - if connWriter.innerWriter == nil { - return true - } - - return connWriter.reconnectOnMsg -} diff --git a/vendor/github.com/cihub/seelog/writers_consolewriter.go b/vendor/github.com/cihub/seelog/writers_consolewriter.go deleted file mode 100644 index 3eb79afa9d..0000000000 --- a/vendor/github.com/cihub/seelog/writers_consolewriter.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import "fmt" - -// consoleWriter is used to write to console -type consoleWriter struct { -} - -// Creates a new console writer. Returns error, if the console writer couldn't be created. -func NewConsoleWriter() (writer *consoleWriter, err error) { - newWriter := new(consoleWriter) - - return newWriter, nil -} - -// Create folder and file on WriteLog/Write first call -func (console *consoleWriter) Write(bytes []byte) (int, error) { - return fmt.Print(string(bytes)) -} - -func (console *consoleWriter) String() string { - return "Console writer" -} diff --git a/vendor/github.com/cihub/seelog/writers_filewriter.go b/vendor/github.com/cihub/seelog/writers_filewriter.go deleted file mode 100644 index 8d3ae270e8..0000000000 --- a/vendor/github.com/cihub/seelog/writers_filewriter.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "fmt" - "io" - "os" - "path/filepath" -) - -// fileWriter is used to write to a file. -type fileWriter struct { - innerWriter io.WriteCloser - fileName string -} - -// Creates a new file and a corresponding writer. Returns error, if the file couldn't be created. -func NewFileWriter(fileName string) (writer *fileWriter, err error) { - newWriter := new(fileWriter) - newWriter.fileName = fileName - - return newWriter, nil -} - -func (fw *fileWriter) Close() error { - if fw.innerWriter != nil { - err := fw.innerWriter.Close() - if err != nil { - return err - } - fw.innerWriter = nil - } - return nil -} - -// Create folder and file on WriteLog/Write first call -func (fw *fileWriter) Write(bytes []byte) (n int, err error) { - if fw.innerWriter == nil { - if err := fw.createFile(); err != nil { - return 0, err - } - } - return fw.innerWriter.Write(bytes) -} - -func (fw *fileWriter) createFile() error { - folder, _ := filepath.Split(fw.fileName) - var err error - - if 0 != len(folder) { - err = os.MkdirAll(folder, defaultDirectoryPermissions) - if err != nil { - return err - } - } - - // If exists - fw.innerWriter, err = os.OpenFile(fw.fileName, os.O_WRONLY|os.O_APPEND|os.O_CREATE, defaultFilePermissions) - - if err != nil { - return err - } - - return nil -} - -func (fw *fileWriter) String() string { - return fmt.Sprintf("File writer: %s", fw.fileName) -} diff --git a/vendor/github.com/cihub/seelog/writers_formattedwriter.go b/vendor/github.com/cihub/seelog/writers_formattedwriter.go deleted file mode 100644 index bf44a4103e..0000000000 --- a/vendor/github.com/cihub/seelog/writers_formattedwriter.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "errors" - "fmt" - "io" -) - -type formattedWriter struct { - writer io.Writer - formatter *formatter -} - -func NewFormattedWriter(writer io.Writer, formatter *formatter) (*formattedWriter, error) { - if formatter == nil { - return nil, errors.New("formatter can not be nil") - } - - return &formattedWriter{writer, formatter}, nil -} - -func (formattedWriter *formattedWriter) Write(message string, level LogLevel, context LogContextInterface) error { - str := formattedWriter.formatter.Format(message, level, context) - _, err := formattedWriter.writer.Write([]byte(str)) - return err -} - -func (formattedWriter *formattedWriter) String() string { - return fmt.Sprintf("writer: %s, format: %s", formattedWriter.writer, formattedWriter.formatter) -} - -func (formattedWriter *formattedWriter) Writer() io.Writer { - return formattedWriter.writer -} - -func (formattedWriter *formattedWriter) Format() *formatter { - return formattedWriter.formatter -} diff --git a/vendor/github.com/cihub/seelog/writers_rollingfilewriter.go b/vendor/github.com/cihub/seelog/writers_rollingfilewriter.go deleted file mode 100644 index 9535a57981..0000000000 --- a/vendor/github.com/cihub/seelog/writers_rollingfilewriter.go +++ /dev/null @@ -1,763 +0,0 @@ -// Copyright (c) 2013 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "fmt" - "io" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "sync" - "time" - - "github.com/cihub/seelog/archive" - "github.com/cihub/seelog/archive/gzip" - "github.com/cihub/seelog/archive/tar" - "github.com/cihub/seelog/archive/zip" -) - -// Common constants -const ( - rollingLogHistoryDelimiter = "." -) - -// Types of the rolling writer: roll by date, by time, etc. -type rollingType uint8 - -const ( - rollingTypeSize = iota - rollingTypeTime -) - -// Types of the rolled file naming mode: prefix, postfix, etc. -type rollingNameMode uint8 - -const ( - rollingNameModePostfix = iota - rollingNameModePrefix -) - -var rollingNameModesStringRepresentation = map[rollingNameMode]string{ - rollingNameModePostfix: "postfix", - rollingNameModePrefix: "prefix", -} - -func rollingNameModeFromString(rollingNameStr string) (rollingNameMode, bool) { - for tp, tpStr := range rollingNameModesStringRepresentation { - if tpStr == rollingNameStr { - return tp, true - } - } - - return 0, false -} - -var rollingTypesStringRepresentation = map[rollingType]string{ - rollingTypeSize: "size", - rollingTypeTime: "date", -} - -func rollingTypeFromString(rollingTypeStr string) (rollingType, bool) { - for tp, tpStr := range rollingTypesStringRepresentation { - if tpStr == rollingTypeStr { - return tp, true - } - } - - return 0, false -} - -// Old logs archivation type. -type rollingArchiveType uint8 - -const ( - rollingArchiveNone = iota - rollingArchiveZip - rollingArchiveGzip -) - -var rollingArchiveTypesStringRepresentation = map[rollingArchiveType]string{ - rollingArchiveNone: "none", - rollingArchiveZip: "zip", - rollingArchiveGzip: "gzip", -} - -type archiver func(f *os.File, exploded bool) archive.WriteCloser - -type unarchiver func(f *os.File) (archive.ReadCloser, error) - -type compressionType struct { - extension string - handleMultipleEntries bool - archiver archiver - unarchiver unarchiver -} - -var compressionTypes = map[rollingArchiveType]compressionType{ - rollingArchiveZip: { - extension: ".zip", - handleMultipleEntries: true, - archiver: func(f *os.File, _ bool) archive.WriteCloser { - return zip.NewWriter(f) - }, - unarchiver: func(f *os.File) (archive.ReadCloser, error) { - fi, err := f.Stat() - if err != nil { - return nil, err - } - r, err := zip.NewReader(f, fi.Size()) - if err != nil { - return nil, err - } - return archive.NopCloser(r), nil - }, - }, - rollingArchiveGzip: { - extension: ".gz", - handleMultipleEntries: false, - archiver: func(f *os.File, exploded bool) archive.WriteCloser { - gw := gzip.NewWriter(f) - if exploded { - return gw - } - return tar.NewWriteMultiCloser(gw, gw) - }, - unarchiver: func(f *os.File) (archive.ReadCloser, error) { - gr, err := gzip.NewReader(f, f.Name()) - if err != nil { - return nil, err - } - - // Determine if the gzip is a tar - tr := tar.NewReader(gr) - _, err = tr.Next() - isTar := err == nil - - // Reset to beginning of file - if _, err := f.Seek(0, os.SEEK_SET); err != nil { - return nil, err - } - gr.Reset(f) - - if isTar { - return archive.NopCloser(tar.NewReader(gr)), nil - } - return gr, nil - }, - }, -} - -func (compressionType *compressionType) rollingArchiveTypeName(name string, exploded bool) string { - if !compressionType.handleMultipleEntries && !exploded { - return name + ".tar" + compressionType.extension - } else { - return name + compressionType.extension - } - -} - -func rollingArchiveTypeFromString(rollingArchiveTypeStr string) (rollingArchiveType, bool) { - for tp, tpStr := range rollingArchiveTypesStringRepresentation { - if tpStr == rollingArchiveTypeStr { - return tp, true - } - } - - return 0, false -} - -// Default names for different archive types -var rollingArchiveDefaultExplodedName = "old" - -func rollingArchiveTypeDefaultName(archiveType rollingArchiveType, exploded bool) (string, error) { - compressionType, ok := compressionTypes[archiveType] - if !ok { - return "", fmt.Errorf("cannot get default filename for archive type = %v", archiveType) - } - return compressionType.rollingArchiveTypeName("log", exploded), nil -} - -// rollerVirtual is an interface that represents all virtual funcs that are -// called in different rolling writer subtypes. -type rollerVirtual interface { - needsToRoll() bool // Returns true if needs to switch to another file. - isFileRollNameValid(rname string) bool // Returns true if logger roll file name (postfix/prefix/etc.) is ok. - sortFileRollNamesAsc(fs []string) ([]string, error) // Sorts logger roll file names in ascending order of their creation by logger. - - // getNewHistoryRollFileName is called whenever we are about to roll the - // current log file. It returns the name the current log file should be - // rolled to. - getNewHistoryRollFileName(otherHistoryFiles []string) string - - getCurrentFileName() string -} - -// rollingFileWriter writes received messages to a file, until time interval passes -// or file exceeds a specified limit. After that the current log file is renamed -// and writer starts to log into a new file. You can set a limit for such renamed -// files count, if you want, and then the rolling writer would delete older ones when -// the files count exceed the specified limit. -type rollingFileWriter struct { - fileName string // log file name - currentDirPath string - currentFile *os.File - currentName string - currentFileSize int64 - rollingType rollingType // Rolling mode (Files roll by size/date/...) - archiveType rollingArchiveType - archivePath string - archiveExploded bool - fullName bool - maxRolls int - nameMode rollingNameMode - self rollerVirtual // Used for virtual calls - rollLock sync.Mutex -} - -func newRollingFileWriter(fpath string, rtype rollingType, atype rollingArchiveType, apath string, maxr int, namemode rollingNameMode, - archiveExploded bool, fullName bool) (*rollingFileWriter, error) { - rw := new(rollingFileWriter) - rw.currentDirPath, rw.fileName = filepath.Split(fpath) - if len(rw.currentDirPath) == 0 { - rw.currentDirPath = "." - } - - rw.rollingType = rtype - rw.archiveType = atype - rw.archivePath = apath - rw.nameMode = namemode - rw.maxRolls = maxr - rw.archiveExploded = archiveExploded - rw.fullName = fullName - return rw, nil -} - -func (rw *rollingFileWriter) hasRollName(file string) bool { - switch rw.nameMode { - case rollingNameModePostfix: - rname := rw.fileName + rollingLogHistoryDelimiter - return strings.HasPrefix(file, rname) - case rollingNameModePrefix: - rname := rollingLogHistoryDelimiter + rw.fileName - return strings.HasSuffix(file, rname) - } - return false -} - -func (rw *rollingFileWriter) createFullFileName(originalName, rollname string) string { - switch rw.nameMode { - case rollingNameModePostfix: - return originalName + rollingLogHistoryDelimiter + rollname - case rollingNameModePrefix: - return rollname + rollingLogHistoryDelimiter + originalName - } - return "" -} - -func (rw *rollingFileWriter) getSortedLogHistory() ([]string, error) { - files, err := getDirFilePaths(rw.currentDirPath, nil, true) - if err != nil { - return nil, err - } - var validRollNames []string - for _, file := range files { - if rw.hasRollName(file) { - rname := rw.getFileRollName(file) - if rw.self.isFileRollNameValid(rname) { - validRollNames = append(validRollNames, rname) - } - } - } - sortedTails, err := rw.self.sortFileRollNamesAsc(validRollNames) - if err != nil { - return nil, err - } - validSortedFiles := make([]string, len(sortedTails)) - for i, v := range sortedTails { - validSortedFiles[i] = rw.createFullFileName(rw.fileName, v) - } - return validSortedFiles, nil -} - -func (rw *rollingFileWriter) createFileAndFolderIfNeeded(first bool) error { - var err error - - if len(rw.currentDirPath) != 0 { - err = os.MkdirAll(rw.currentDirPath, defaultDirectoryPermissions) - - if err != nil { - return err - } - } - rw.currentName = rw.self.getCurrentFileName() - filePath := filepath.Join(rw.currentDirPath, rw.currentName) - - // This will either open the existing file (without truncating it) or - // create if necessary. Append mode avoids any race conditions. - rw.currentFile, err = os.OpenFile(filePath, os.O_WRONLY|os.O_APPEND|os.O_CREATE, defaultFilePermissions) - if err != nil { - return err - } - - stat, err := rw.currentFile.Stat() - if err != nil { - rw.currentFile.Close() - rw.currentFile = nil - return err - } - - rw.currentFileSize = stat.Size() - return nil -} - -func (rw *rollingFileWriter) archiveExplodedLogs(logFilename string, compressionType compressionType) (err error) { - closeWithError := func(c io.Closer) { - if cerr := c.Close(); cerr != nil && err == nil { - err = cerr - } - } - - rollPath := filepath.Join(rw.currentDirPath, logFilename) - src, err := os.Open(rollPath) - if err != nil { - return err - } - defer src.Close() // Read-only - - // Buffer to a temporary file on the same partition - // Note: archivePath is a path to a directory when handling exploded logs - dst, err := rw.tempArchiveFile(rw.archivePath) - if err != nil { - return err - } - defer func() { - closeWithError(dst) - if err != nil { - os.Remove(dst.Name()) // Can't do anything when we fail to remove temp file - return - } - - // Finalize archive by swapping the buffered archive into place - err = os.Rename(dst.Name(), filepath.Join(rw.archivePath, - compressionType.rollingArchiveTypeName(logFilename, true))) - }() - - // archive entry - w := compressionType.archiver(dst, true) - defer closeWithError(w) - fi, err := src.Stat() - if err != nil { - return err - } - if err := w.NextFile(logFilename, fi); err != nil { - return err - } - _, err = io.Copy(w, src) - return err -} - -func (rw *rollingFileWriter) archiveUnexplodedLogs(compressionType compressionType, rollsToDelete int, history []string) (err error) { - closeWithError := func(c io.Closer) { - if cerr := c.Close(); cerr != nil && err == nil { - err = cerr - } - } - - // Buffer to a temporary file on the same partition - // Note: archivePath is a path to a file when handling unexploded logs - dst, err := rw.tempArchiveFile(filepath.Dir(rw.archivePath)) - if err != nil { - return err - } - defer func() { - closeWithError(dst) - if err != nil { - os.Remove(dst.Name()) // Can't do anything when we fail to remove temp file - return - } - - // Finalize archive by moving the buffered archive into place - err = os.Rename(dst.Name(), rw.archivePath) - }() - - w := compressionType.archiver(dst, false) - defer closeWithError(w) - - src, err := os.Open(rw.archivePath) - switch { - // Archive exists - case err == nil: - defer src.Close() // Read-only - - r, err := compressionType.unarchiver(src) - if err != nil { - return err - } - defer r.Close() // Read-only - - if err := archive.Copy(w, r); err != nil { - return err - } - - // Failed to stat - case !os.IsNotExist(err): - return err - } - - // Add new files to the archive - for i := 0; i < rollsToDelete; i++ { - rollPath := filepath.Join(rw.currentDirPath, history[i]) - src, err := os.Open(rollPath) - if err != nil { - return err - } - defer src.Close() // Read-only - fi, err := src.Stat() - if err != nil { - return err - } - if err := w.NextFile(src.Name(), fi); err != nil { - return err - } - if _, err := io.Copy(w, src); err != nil { - return err - } - } - return nil -} - -func (rw *rollingFileWriter) deleteOldRolls(history []string) error { - if rw.maxRolls <= 0 { - return nil - } - - rollsToDelete := len(history) - rw.maxRolls - if rollsToDelete <= 0 { - return nil - } - - if rw.archiveType != rollingArchiveNone { - if rw.archiveExploded { - os.MkdirAll(rw.archivePath, defaultDirectoryPermissions) - - // Archive logs - for i := 0; i < rollsToDelete; i++ { - rw.archiveExplodedLogs(history[i], compressionTypes[rw.archiveType]) - } - } else { - os.MkdirAll(filepath.Dir(rw.archivePath), defaultDirectoryPermissions) - - rw.archiveUnexplodedLogs(compressionTypes[rw.archiveType], rollsToDelete, history) - } - } - - var err error - // In all cases (archive files or not) the files should be deleted. - for i := 0; i < rollsToDelete; i++ { - // Try best to delete files without breaking the loop. - if err = tryRemoveFile(filepath.Join(rw.currentDirPath, history[i])); err != nil { - reportInternalError(err) - } - } - - return nil -} - -func (rw *rollingFileWriter) getFileRollName(fileName string) string { - switch rw.nameMode { - case rollingNameModePostfix: - return fileName[len(rw.fileName+rollingLogHistoryDelimiter):] - case rollingNameModePrefix: - return fileName[:len(fileName)-len(rw.fileName+rollingLogHistoryDelimiter)] - } - return "" -} - -func (rw *rollingFileWriter) roll() error { - // First, close current file. - err := rw.currentFile.Close() - if err != nil { - return err - } - rw.currentFile = nil - - // Current history of all previous log files. - // For file roller it may be like this: - // * ... - // * file.log.4 - // * file.log.5 - // * file.log.6 - // - // For date roller it may look like this: - // * ... - // * file.log.11.Aug.13 - // * file.log.15.Aug.13 - // * file.log.16.Aug.13 - // Sorted log history does NOT include current file. - history, err := rw.getSortedLogHistory() - if err != nil { - return err - } - // Renames current file to create a new roll history entry - // For file roller it may be like this: - // * ... - // * file.log.4 - // * file.log.5 - // * file.log.6 - // n file.log.7 <---- RENAMED (from file.log) - newHistoryName := rw.createFullFileName(rw.fileName, - rw.self.getNewHistoryRollFileName(history)) - - err = os.Rename(filepath.Join(rw.currentDirPath, rw.currentName), filepath.Join(rw.currentDirPath, newHistoryName)) - if err != nil { - return err - } - - // Finally, add the newly added history file to the history archive - // and, if after that the archive exceeds the allowed max limit, older rolls - // must the removed/archived. - history = append(history, newHistoryName) - if len(history) > rw.maxRolls { - err = rw.deleteOldRolls(history) - if err != nil { - return err - } - } - - return nil -} - -func (rw *rollingFileWriter) Write(bytes []byte) (n int, err error) { - rw.rollLock.Lock() - defer rw.rollLock.Unlock() - - if rw.self.needsToRoll() { - if err := rw.roll(); err != nil { - return 0, err - } - } - - if rw.currentFile == nil { - err := rw.createFileAndFolderIfNeeded(true) - if err != nil { - return 0, err - } - } - - n, err = rw.currentFile.Write(bytes) - rw.currentFileSize += int64(n) - return n, err -} - -func (rw *rollingFileWriter) Close() error { - if rw.currentFile != nil { - e := rw.currentFile.Close() - if e != nil { - return e - } - rw.currentFile = nil - } - return nil -} - -func (rw *rollingFileWriter) tempArchiveFile(archiveDir string) (*os.File, error) { - tmp := filepath.Join(archiveDir, ".seelog_tmp") - if err := os.MkdirAll(tmp, defaultDirectoryPermissions); err != nil { - return nil, err - } - return ioutil.TempFile(tmp, "archived_logs") -} - -// ============================================================================================= -// Different types of rolling writers -// ============================================================================================= - -// -------------------------------------------------- -// Rolling writer by SIZE -// -------------------------------------------------- - -// rollingFileWriterSize performs roll when file exceeds a specified limit. -type rollingFileWriterSize struct { - *rollingFileWriter - maxFileSize int64 -} - -func NewRollingFileWriterSize(fpath string, atype rollingArchiveType, apath string, maxSize int64, maxRolls int, namemode rollingNameMode, archiveExploded bool) (*rollingFileWriterSize, error) { - rw, err := newRollingFileWriter(fpath, rollingTypeSize, atype, apath, maxRolls, namemode, archiveExploded, false) - if err != nil { - return nil, err - } - rws := &rollingFileWriterSize{rw, maxSize} - rws.self = rws - return rws, nil -} - -func (rws *rollingFileWriterSize) needsToRoll() bool { - return rws.currentFileSize >= rws.maxFileSize -} - -func (rws *rollingFileWriterSize) isFileRollNameValid(rname string) bool { - if len(rname) == 0 { - return false - } - _, err := strconv.Atoi(rname) - return err == nil -} - -type rollSizeFileTailsSlice []string - -func (p rollSizeFileTailsSlice) Len() int { - return len(p) -} -func (p rollSizeFileTailsSlice) Less(i, j int) bool { - v1, _ := strconv.Atoi(p[i]) - v2, _ := strconv.Atoi(p[j]) - return v1 < v2 -} -func (p rollSizeFileTailsSlice) Swap(i, j int) { - p[i], p[j] = p[j], p[i] -} - -func (rws *rollingFileWriterSize) sortFileRollNamesAsc(fs []string) ([]string, error) { - ss := rollSizeFileTailsSlice(fs) - sort.Sort(ss) - return ss, nil -} - -func (rws *rollingFileWriterSize) getNewHistoryRollFileName(otherLogFiles []string) string { - v := 0 - if len(otherLogFiles) != 0 { - latest := otherLogFiles[len(otherLogFiles)-1] - v, _ = strconv.Atoi(rws.getFileRollName(latest)) - } - return fmt.Sprintf("%d", v+1) -} - -func (rws *rollingFileWriterSize) getCurrentFileName() string { - return rws.fileName -} - -func (rws *rollingFileWriterSize) String() string { - return fmt.Sprintf("Rolling file writer (By SIZE): filename: %s, archive: %s, archivefile: %s, maxFileSize: %v, maxRolls: %v", - rws.fileName, - rollingArchiveTypesStringRepresentation[rws.archiveType], - rws.archivePath, - rws.maxFileSize, - rws.maxRolls) -} - -// -------------------------------------------------- -// Rolling writer by TIME -// -------------------------------------------------- - -// rollingFileWriterTime performs roll when a specified time interval has passed. -type rollingFileWriterTime struct { - *rollingFileWriter - timePattern string - currentTimeFileName string -} - -func NewRollingFileWriterTime(fpath string, atype rollingArchiveType, apath string, maxr int, - timePattern string, namemode rollingNameMode, archiveExploded bool, fullName bool) (*rollingFileWriterTime, error) { - - rw, err := newRollingFileWriter(fpath, rollingTypeTime, atype, apath, maxr, namemode, archiveExploded, fullName) - if err != nil { - return nil, err - } - rws := &rollingFileWriterTime{rw, timePattern, ""} - rws.self = rws - return rws, nil -} - -func (rwt *rollingFileWriterTime) needsToRoll() bool { - newName := time.Now().Format(rwt.timePattern) - - if rwt.currentTimeFileName == "" { - // first run; capture the current name - rwt.currentTimeFileName = newName - return false - } - - return newName != rwt.currentTimeFileName -} - -func (rwt *rollingFileWriterTime) isFileRollNameValid(rname string) bool { - if len(rname) == 0 { - return false - } - _, err := time.ParseInLocation(rwt.timePattern, rname, time.Local) - return err == nil -} - -type rollTimeFileTailsSlice struct { - data []string - pattern string -} - -func (p rollTimeFileTailsSlice) Len() int { - return len(p.data) -} - -func (p rollTimeFileTailsSlice) Less(i, j int) bool { - t1, _ := time.ParseInLocation(p.pattern, p.data[i], time.Local) - t2, _ := time.ParseInLocation(p.pattern, p.data[j], time.Local) - return t1.Before(t2) -} - -func (p rollTimeFileTailsSlice) Swap(i, j int) { - p.data[i], p.data[j] = p.data[j], p.data[i] -} - -func (rwt *rollingFileWriterTime) sortFileRollNamesAsc(fs []string) ([]string, error) { - ss := rollTimeFileTailsSlice{data: fs, pattern: rwt.timePattern} - sort.Sort(ss) - return ss.data, nil -} - -func (rwt *rollingFileWriterTime) getNewHistoryRollFileName(_ []string) string { - newFileName := rwt.currentTimeFileName - rwt.currentTimeFileName = time.Now().Format(rwt.timePattern) - return newFileName -} - -func (rwt *rollingFileWriterTime) getCurrentFileName() string { - if rwt.fullName { - return rwt.createFullFileName(rwt.fileName, time.Now().Format(rwt.timePattern)) - } - return rwt.fileName -} - -func (rwt *rollingFileWriterTime) String() string { - return fmt.Sprintf("Rolling file writer (By TIME): filename: %s, archive: %s, archivefile: %s, pattern: %s, maxRolls: %v", - rwt.fileName, - rollingArchiveTypesStringRepresentation[rwt.archiveType], - rwt.archivePath, - rwt.timePattern, - rwt.maxRolls) -} diff --git a/vendor/github.com/cihub/seelog/writers_smtpwriter.go b/vendor/github.com/cihub/seelog/writers_smtpwriter.go deleted file mode 100644 index 31b7943833..0000000000 --- a/vendor/github.com/cihub/seelog/writers_smtpwriter.go +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 2012 - Cloud Instruments Co., Ltd. -// -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are met: -// -// 1. Redistributions of source code must retain the above copyright notice, this -// list of conditions and the following disclaimer. -// 2. 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. -// -// 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 seelog - -import ( - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "net/smtp" - "path/filepath" - "strings" -) - -const ( - // Default subject phrase for sending emails. - DefaultSubjectPhrase = "Diagnostic message from server: " - - // Message subject pattern composed according to RFC 5321. - rfc5321SubjectPattern = "From: %s <%s>\nSubject: %s\n\n" -) - -// smtpWriter is used to send emails via given SMTP-server. -type smtpWriter struct { - auth smtp.Auth - hostName string - hostPort string - hostNameWithPort string - senderAddress string - senderName string - recipientAddresses []string - caCertDirPaths []string - mailHeaders []string - subject string -} - -// NewSMTPWriter returns a new SMTP-writer. -func NewSMTPWriter(sa, sn string, ras []string, hn, hp, un, pwd string, cacdps []string, subj string, headers []string) *smtpWriter { - return &smtpWriter{ - auth: smtp.PlainAuth("", un, pwd, hn), - hostName: hn, - hostPort: hp, - hostNameWithPort: fmt.Sprintf("%s:%s", hn, hp), - senderAddress: sa, - senderName: sn, - recipientAddresses: ras, - caCertDirPaths: cacdps, - subject: subj, - mailHeaders: headers, - } -} - -func prepareMessage(senderAddr, senderName, subject string, body []byte, headers []string) []byte { - headerLines := fmt.Sprintf(rfc5321SubjectPattern, senderName, senderAddr, subject) - // Build header lines if configured. - if headers != nil && len(headers) > 0 { - headerLines += strings.Join(headers, "\n") - headerLines += "\n" - } - return append([]byte(headerLines), body...) -} - -// getTLSConfig gets paths of PEM files with certificates, -// host server name and tries to create an appropriate TLS.Config. -func getTLSConfig(pemFileDirPaths []string, hostName string) (config *tls.Config, err error) { - if pemFileDirPaths == nil || len(pemFileDirPaths) == 0 { - err = errors.New("invalid PEM file paths") - return - } - pemEncodedContent := []byte{} - var ( - e error - bytes []byte - ) - // Create a file-filter-by-extension, set aside non-pem files. - pemFilePathFilter := func(fp string) bool { - if filepath.Ext(fp) == ".pem" { - return true - } - return false - } - for _, pemFileDirPath := range pemFileDirPaths { - pemFilePaths, err := getDirFilePaths(pemFileDirPath, pemFilePathFilter, false) - if err != nil { - return nil, err - } - - // Put together all the PEM files to decode them as a whole byte slice. - for _, pfp := range pemFilePaths { - if bytes, e = ioutil.ReadFile(pfp); e == nil { - pemEncodedContent = append(pemEncodedContent, bytes...) - } else { - return nil, fmt.Errorf("cannot read file: %s: %s", pfp, e.Error()) - } - } - } - config = &tls.Config{RootCAs: x509.NewCertPool(), ServerName: hostName} - isAppended := config.RootCAs.AppendCertsFromPEM(pemEncodedContent) - if !isAppended { - // Extract this into a separate error. - err = errors.New("invalid PEM content") - return - } - return -} - -// SendMail accepts TLS configuration, connects to the server at addr, -// switches to TLS if possible, authenticates with mechanism a if possible, -// and then sends an email from address from, to addresses to, with message msg. -func sendMailWithTLSConfig(config *tls.Config, addr string, a smtp.Auth, from string, to []string, msg []byte) error { - c, err := smtp.Dial(addr) - if err != nil { - return err - } - // Check if the server supports STARTTLS extension. - if ok, _ := c.Extension("STARTTLS"); ok { - if err = c.StartTLS(config); err != nil { - return err - } - } - // Check if the server supports AUTH extension and use given smtp.Auth. - if a != nil { - if isSupported, _ := c.Extension("AUTH"); isSupported { - if err = c.Auth(a); err != nil { - return err - } - } - } - // Portion of code from the official smtp.SendMail function, - // see http://golang.org/src/pkg/net/smtp/smtp.go. - if err = c.Mail(from); err != nil { - return err - } - for _, addr := range to { - if err = c.Rcpt(addr); err != nil { - return err - } - } - w, err := c.Data() - if err != nil { - return err - } - _, err = w.Write(msg) - if err != nil { - return err - } - err = w.Close() - if err != nil { - return err - } - return c.Quit() -} - -// Write pushes a text message properly composed according to RFC 5321 -// to a post server, which sends it to the recipients. -func (smtpw *smtpWriter) Write(data []byte) (int, error) { - var err error - - if smtpw.caCertDirPaths == nil { - err = smtp.SendMail( - smtpw.hostNameWithPort, - smtpw.auth, - smtpw.senderAddress, - smtpw.recipientAddresses, - prepareMessage(smtpw.senderAddress, smtpw.senderName, smtpw.subject, data, smtpw.mailHeaders), - ) - } else { - config, e := getTLSConfig(smtpw.caCertDirPaths, smtpw.hostName) - if e != nil { - return 0, e - } - err = sendMailWithTLSConfig( - config, - smtpw.hostNameWithPort, - smtpw.auth, - smtpw.senderAddress, - smtpw.recipientAddresses, - prepareMessage(smtpw.senderAddress, smtpw.senderName, smtpw.subject, data, smtpw.mailHeaders), - ) - } - if err != nil { - return 0, err - } - return len(data), nil -} - -// Close closes down SMTP-connection. -func (smtpw *smtpWriter) Close() error { - // Do nothing as Write method opens and closes connection automatically. - return nil -} diff --git a/vendor/github.com/coredns/caddy/onevent/hook/config.go b/vendor/github.com/coredns/caddy/onevent/hook/config.go deleted file mode 100644 index 6d3cc6997b..0000000000 --- a/vendor/github.com/coredns/caddy/onevent/hook/config.go +++ /dev/null @@ -1,20 +0,0 @@ -package hook - -import ( - "github.com/coredns/caddy" -) - -// Config describes how Hook should be configured and used. -type Config struct { - ID string - Event caddy.EventName - Command string - Args []string -} - -// SupportedEvents is a map of supported events. -var SupportedEvents = map[string]caddy.EventName{ - "startup": caddy.InstanceStartupEvent, - "shutdown": caddy.ShutdownEvent, - "certrenew": caddy.CertRenewEvent, -} diff --git a/vendor/github.com/coredns/caddy/onevent/hook/hook.go b/vendor/github.com/coredns/caddy/onevent/hook/hook.go deleted file mode 100644 index 1c727c3341..0000000000 --- a/vendor/github.com/coredns/caddy/onevent/hook/hook.go +++ /dev/null @@ -1,41 +0,0 @@ -package hook - -import ( - "log" - "os" - "os/exec" - "strings" - - "github.com/coredns/caddy" -) - -// Hook executes a command. -func (cfg *Config) Hook(event caddy.EventName, info interface{}) error { - if event != cfg.Event { - return nil - } - - nonblock := false - if len(cfg.Args) >= 1 && cfg.Args[len(cfg.Args)-1] == "&" { - // Run command in background; non-blocking - nonblock = true - cfg.Args = cfg.Args[:len(cfg.Args)-1] - } - - // Execute command. - cmd := exec.Command(cfg.Command, cfg.Args...) - cmd.Stdin = os.Stdin - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - if nonblock { - log.Printf("[INFO] Nonblocking Command \"%s %s\" with ID %s", cfg.Command, strings.Join(cfg.Args, " "), cfg.ID) - return cmd.Start() - } - log.Printf("[INFO] Blocking Command \"%s %s\" with ID %s", cfg.Command, strings.Join(cfg.Args, " "), cfg.ID) - err := cmd.Run() - if err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/coredns/caddy/onevent/on.go b/vendor/github.com/coredns/caddy/onevent/on.go deleted file mode 100644 index 413771c99f..0000000000 --- a/vendor/github.com/coredns/caddy/onevent/on.go +++ /dev/null @@ -1,71 +0,0 @@ -package onevent - -import ( - "strings" - - "github.com/coredns/caddy" - "github.com/coredns/caddy/onevent/hook" - "github.com/google/uuid" -) - -func init() { - // Register Directive. - caddy.RegisterPlugin("on", caddy.Plugin{Action: setup}) -} - -func setup(c *caddy.Controller) error { - config, err := onParse(c) - if err != nil { - return err - } - - // Register Event Hooks. - err = c.OncePerServerBlock(func() error { - for _, cfg := range config { - caddy.RegisterEventHook("on-"+cfg.ID, cfg.Hook) - } - return nil - }) - if err != nil { - return err - } - - return nil -} - -func onParse(c *caddy.Controller) ([]*hook.Config, error) { - var config []*hook.Config - - for c.Next() { - cfg := new(hook.Config) - - if !c.NextArg() { - return config, c.ArgErr() - } - - // Configure Event. - event, ok := hook.SupportedEvents[strings.ToLower(c.Val())] - if !ok { - return config, c.Errf("Wrong event name or event not supported: '%s'", c.Val()) - } - cfg.Event = event - - // Assign an unique ID. - cfg.ID = uuid.New().String() - - args := c.RemainingArgs() - - // Extract command and arguments. - command, args, err := caddy.SplitCommandAndArgs(strings.Join(args, " ")) - if err != nil { - return config, c.Err(err.Error()) - } - - cfg.Command = command - cfg.Args = args - - config = append(config, cfg) - } - - return config, nil -} diff --git a/vendor/github.com/dimchansky/utfbom/.gitignore b/vendor/github.com/dimchansky/utfbom/.gitignore deleted file mode 100644 index d7ec5cebb9..0000000000 --- a/vendor/github.com/dimchansky/utfbom/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib -*.o -*.a - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.prof - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -# Gogland -.idea/ \ No newline at end of file diff --git a/vendor/github.com/dimchansky/utfbom/.travis.yml b/vendor/github.com/dimchansky/utfbom/.travis.yml deleted file mode 100644 index 19312ee35f..0000000000 --- a/vendor/github.com/dimchansky/utfbom/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: go -sudo: false - -go: - - 1.10.x - - 1.11.x - - 1.12.x - - 1.13.x - - 1.14.x - - 1.15.x - -cache: - directories: - - $HOME/.cache/go-build - - $HOME/gopath/pkg/mod - -env: - global: - - GO111MODULE=on - -before_install: - - go get github.com/mattn/goveralls - - go get golang.org/x/tools/cmd/cover - - go get golang.org/x/tools/cmd/goimports - - go get golang.org/x/lint/golint -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 diff --git a/vendor/github.com/dimchansky/utfbom/LICENSE b/vendor/github.com/dimchansky/utfbom/LICENSE deleted file mode 100644 index 6279cb87f4..0000000000 --- a/vendor/github.com/dimchansky/utfbom/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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 (c) 2018-2020, Dmitrij Koniajev (dimchansky@gmail.com) - - 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/dimchansky/utfbom/README.md b/vendor/github.com/dimchansky/utfbom/README.md deleted file mode 100644 index 8ece280089..0000000000 --- a/vendor/github.com/dimchansky/utfbom/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# utfbom [![Godoc](https://godoc.org/github.com/dimchansky/utfbom?status.png)](https://godoc.org/github.com/dimchansky/utfbom) [![License](https://img.shields.io/:license-apache-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Build Status](https://travis-ci.org/dimchansky/utfbom.svg?branch=master)](https://travis-ci.org/dimchansky/utfbom) [![Go Report Card](https://goreportcard.com/badge/github.com/dimchansky/utfbom)](https://goreportcard.com/report/github.com/dimchansky/utfbom) [![Coverage Status](https://coveralls.io/repos/github/dimchansky/utfbom/badge.svg?branch=master)](https://coveralls.io/github/dimchansky/utfbom?branch=master) - -The package utfbom implements the detection of the BOM (Unicode Byte Order Mark) and removing as necessary. It can also return the encoding detected by the BOM. - -## Installation - - go get -u github.com/dimchansky/utfbom - -## Example - -```go -package main - -import ( - "bytes" - "fmt" - "io/ioutil" - - "github.com/dimchansky/utfbom" -) - -func main() { - trySkip([]byte("\xEF\xBB\xBFhello")) - trySkip([]byte("hello")) -} - -func trySkip(byteData []byte) { - fmt.Println("Input:", byteData) - - // just skip BOM - output, err := ioutil.ReadAll(utfbom.SkipOnly(bytes.NewReader(byteData))) - if err != nil { - fmt.Println(err) - return - } - fmt.Println("ReadAll with BOM skipping", output) - - // skip BOM and detect encoding - sr, enc := utfbom.Skip(bytes.NewReader(byteData)) - fmt.Printf("Detected encoding: %s\n", enc) - output, err = ioutil.ReadAll(sr) - if err != nil { - fmt.Println(err) - return - } - fmt.Println("ReadAll with BOM detection and skipping", output) - fmt.Println() -} -``` - -Output: - -``` -$ go run main.go -Input: [239 187 191 104 101 108 108 111] -ReadAll with BOM skipping [104 101 108 108 111] -Detected encoding: UTF8 -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 -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 deleted file mode 100644 index 77a303e564..0000000000 --- a/vendor/github.com/dimchansky/utfbom/utfbom.go +++ /dev/null @@ -1,192 +0,0 @@ -// Package utfbom implements the detection of the BOM (Unicode Byte Order Mark) and removing as necessary. -// It wraps an io.Reader object, creating another object (Reader) that also implements the io.Reader -// interface but provides automatic BOM checking and removing as necessary. -package utfbom - -import ( - "errors" - "io" -) - -// Encoding is type alias for detected UTF encoding. -type Encoding int - -// Constants to identify detected UTF encodings. -const ( - // Unknown encoding, returned when no BOM was detected - Unknown Encoding = iota - - // UTF8, BOM bytes: EF BB BF - UTF8 - - // UTF-16, big-endian, BOM bytes: FE FF - UTF16BigEndian - - // UTF-16, little-endian, BOM bytes: FF FE - UTF16LittleEndian - - // UTF-32, big-endian, BOM bytes: 00 00 FE FF - UTF32BigEndian - - // UTF-32, little-endian, BOM bytes: FF FE 00 00 - 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. -// It also returns the encoding detected by the BOM. -// If the detected encoding is not needed, you can call the SkipOnly function. -func Skip(rd io.Reader) (*Reader, Encoding) { - // Is it already a Reader? - b, ok := rd.(*Reader) - if ok { - return b, Unknown - } - - enc, left, err := detectUtf(rd) - return &Reader{ - rd: rd, - buf: left, - err: err, - }, enc -} - -// SkipOnly creates Reader which automatically detects BOM (Unicode Byte Order Mark) and removes it as necessary. -func SkipOnly(rd io.Reader) *Reader { - r, _ := Skip(rd) - return r -} - -// Reader implements automatic BOM (Unicode Byte Order Mark) checking and -// removing as necessary for an io.Reader object. -type Reader struct { - rd io.Reader // reader provided by the client - buf []byte // buffered data - err error // last error -} - -// Read is an implementation of io.Reader interface. -// The bytes are taken from the underlying Reader, but it checks for BOMs, removing them as necessary. -func (r *Reader) Read(p []byte) (n int, err error) { - if len(p) == 0 { - return 0, nil - } - - if r.buf == nil { - if r.err != nil { - return 0, r.readErr() - } - - return r.rd.Read(p) - } - - // copy as much as we can - n = copy(p, r.buf) - r.buf = nilIfEmpty(r.buf[n:]) - return n, nil -} - -func (r *Reader) readErr() error { - err := r.err - r.err = nil - return err -} - -var errNegativeRead = errors.New("utfbom: reader returned negative count from Read") - -func detectUtf(rd io.Reader) (enc Encoding, buf []byte, err error) { - buf, err = readBOM(rd) - - if len(buf) >= 4 { - if isUTF32BigEndianBOM4(buf) { - return UTF32BigEndian, nilIfEmpty(buf[4:]), err - } - if isUTF32LittleEndianBOM4(buf) { - return UTF32LittleEndian, nilIfEmpty(buf[4:]), err - } - } - - if len(buf) > 2 && isUTF8BOM3(buf) { - return UTF8, nilIfEmpty(buf[3:]), err - } - - if (err != nil && err != io.EOF) || (len(buf) < 2) { - return Unknown, nilIfEmpty(buf), err - } - - if isUTF16BigEndianBOM2(buf) { - return UTF16BigEndian, nilIfEmpty(buf[2:]), err - } - if isUTF16LittleEndianBOM2(buf) { - return UTF16LittleEndian, nilIfEmpty(buf[2:]), err - } - - return Unknown, nilIfEmpty(buf), err -} - -func readBOM(rd io.Reader) (buf []byte, err error) { - const maxBOMSize = 4 - var bom [maxBOMSize]byte // used to read BOM - - // read as many bytes as possible - for nEmpty, n := 0, 0; err == nil && len(buf) < maxBOMSize; buf = bom[:len(buf)+n] { - if n, err = rd.Read(bom[len(buf):]); n < 0 { - panic(errNegativeRead) - } - if n > 0 { - nEmpty = 0 - } else { - nEmpty++ - if nEmpty >= maxConsecutiveEmptyReads { - err = io.ErrNoProgress - } - } - } - return -} - -func isUTF32BigEndianBOM4(buf []byte) bool { - return buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0xFE && buf[3] == 0xFF -} - -func isUTF32LittleEndianBOM4(buf []byte) bool { - return buf[0] == 0xFF && buf[1] == 0xFE && buf[2] == 0x00 && buf[3] == 0x00 -} - -func isUTF8BOM3(buf []byte) bool { - return buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF -} - -func isUTF16BigEndianBOM2(buf []byte) bool { - return buf[0] == 0xFE && buf[1] == 0xFF -} - -func isUTF16LittleEndianBOM2(buf []byte) bool { - return buf[0] == 0xFF && buf[1] == 0xFE -} - -func nilIfEmpty(buf []byte) (res []byte) { - if len(buf) > 0 { - res = buf - } - return -} diff --git a/vendor/github.com/dustin/go-humanize/.travis.yml b/vendor/github.com/dustin/go-humanize/.travis.yml deleted file mode 100644 index ac12e485a1..0000000000 --- a/vendor/github.com/dustin/go-humanize/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: false -language: go -go_import_path: github.com/dustin/go-humanize -go: - - 1.13.x - - 1.14.x - - 1.15.x - - 1.16.x - - stable - - master -matrix: - allow_failures: - - go: master - fast_finish: true -install: - - # Do nothing. This is needed to prevent default install action "go get -t -v ./..." from happening here (we want it to happen inside script step). -script: - - diff -u <(echo -n) <(gofmt -d -s .) - - go vet . - - go install -v -race ./... - - go test -v -race ./... diff --git a/vendor/github.com/dustin/go-humanize/LICENSE b/vendor/github.com/dustin/go-humanize/LICENSE deleted file mode 100644 index 8d9a94a906..0000000000 --- a/vendor/github.com/dustin/go-humanize/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2005-2008 Dustin Sallings - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - diff --git a/vendor/github.com/dustin/go-humanize/README.markdown b/vendor/github.com/dustin/go-humanize/README.markdown deleted file mode 100644 index 7d0b16b34f..0000000000 --- a/vendor/github.com/dustin/go-humanize/README.markdown +++ /dev/null @@ -1,124 +0,0 @@ -# Humane Units [![Build Status](https://travis-ci.org/dustin/go-humanize.svg?branch=master)](https://travis-ci.org/dustin/go-humanize) [![GoDoc](https://godoc.org/github.com/dustin/go-humanize?status.svg)](https://godoc.org/github.com/dustin/go-humanize) - -Just a few functions for helping humanize times and sizes. - -`go get` it as `github.com/dustin/go-humanize`, import it as -`"github.com/dustin/go-humanize"`, use it as `humanize`. - -See [godoc](https://pkg.go.dev/github.com/dustin/go-humanize) for -complete documentation. - -## Sizes - -This lets you take numbers like `82854982` and convert them to useful -strings like, `83 MB` or `79 MiB` (whichever you prefer). - -Example: - -```go -fmt.Printf("That file is %s.", humanize.Bytes(82854982)) // That file is 83 MB. -``` - -## Times - -This lets you take a `time.Time` and spit it out in relative terms. -For example, `12 seconds ago` or `3 days from now`. - -Example: - -```go -fmt.Printf("This was touched %s.", humanize.Time(someTimeInstance)) // This was touched 7 hours ago. -``` - -Thanks to Kyle Lemons for the time implementation from an IRC -conversation one day. It's pretty neat. - -## Ordinals - -From a [mailing list discussion][odisc] where a user wanted to be able -to label ordinals. - - 0 -> 0th - 1 -> 1st - 2 -> 2nd - 3 -> 3rd - 4 -> 4th - [...] - -Example: - -```go -fmt.Printf("You're my %s best friend.", humanize.Ordinal(193)) // You are my 193rd best friend. -``` - -## Commas - -Want to shove commas into numbers? Be my guest. - - 0 -> 0 - 100 -> 100 - 1000 -> 1,000 - 1000000000 -> 1,000,000,000 - -100000 -> -100,000 - -Example: - -```go -fmt.Printf("You owe $%s.\n", humanize.Comma(6582491)) // You owe $6,582,491. -``` - -## Ftoa - -Nicer float64 formatter that removes trailing zeros. - -```go -fmt.Printf("%f", 2.24) // 2.240000 -fmt.Printf("%s", humanize.Ftoa(2.24)) // 2.24 -fmt.Printf("%f", 2.0) // 2.000000 -fmt.Printf("%s", humanize.Ftoa(2.0)) // 2 -``` - -## SI notation - -Format numbers with [SI notation][sinotation]. - -Example: - -```go -humanize.SI(0.00000000223, "M") // 2.23 nM -``` - -## English-specific functions - -The following functions are in the `humanize/english` subpackage. - -### Plurals - -Simple English pluralization - -```go -english.PluralWord(1, "object", "") // object -english.PluralWord(42, "object", "") // objects -english.PluralWord(2, "bus", "") // buses -english.PluralWord(99, "locus", "loci") // loci - -english.Plural(1, "object", "") // 1 object -english.Plural(42, "object", "") // 42 objects -english.Plural(2, "bus", "") // 2 buses -english.Plural(99, "locus", "loci") // 99 loci -``` - -### Word series - -Format comma-separated words lists with conjuctions: - -```go -english.WordSeries([]string{"foo"}, "and") // foo -english.WordSeries([]string{"foo", "bar"}, "and") // foo and bar -english.WordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar and baz - -english.OxfordWordSeries([]string{"foo", "bar", "baz"}, "and") // foo, bar, and baz -``` - -[odisc]: https://groups.google.com/d/topic/golang-nuts/l8NhI74jl-4/discussion -[sinotation]: http://en.wikipedia.org/wiki/Metric_prefix diff --git a/vendor/github.com/dustin/go-humanize/big.go b/vendor/github.com/dustin/go-humanize/big.go deleted file mode 100644 index f49dc337dc..0000000000 --- a/vendor/github.com/dustin/go-humanize/big.go +++ /dev/null @@ -1,31 +0,0 @@ -package humanize - -import ( - "math/big" -) - -// order of magnitude (to a max order) -func oomm(n, b *big.Int, maxmag int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - if mag == maxmag && maxmag >= 0 { - break - } - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} - -// total order of magnitude -// (same as above, but with no upper limit) -func oom(n, b *big.Int) (float64, int) { - mag := 0 - m := &big.Int{} - for n.Cmp(b) >= 0 { - n.DivMod(n, b, m) - mag++ - } - return float64(n.Int64()) + (float64(m.Int64()) / float64(b.Int64())), mag -} diff --git a/vendor/github.com/dustin/go-humanize/bigbytes.go b/vendor/github.com/dustin/go-humanize/bigbytes.go deleted file mode 100644 index 3b015fd59e..0000000000 --- a/vendor/github.com/dustin/go-humanize/bigbytes.go +++ /dev/null @@ -1,189 +0,0 @@ -package humanize - -import ( - "fmt" - "math/big" - "strings" - "unicode" -) - -var ( - bigIECExp = big.NewInt(1024) - - // BigByte is one byte in bit.Ints - BigByte = big.NewInt(1) - // BigKiByte is 1,024 bytes in bit.Ints - BigKiByte = (&big.Int{}).Mul(BigByte, bigIECExp) - // BigMiByte is 1,024 k bytes in bit.Ints - BigMiByte = (&big.Int{}).Mul(BigKiByte, bigIECExp) - // BigGiByte is 1,024 m bytes in bit.Ints - BigGiByte = (&big.Int{}).Mul(BigMiByte, bigIECExp) - // BigTiByte is 1,024 g bytes in bit.Ints - BigTiByte = (&big.Int{}).Mul(BigGiByte, bigIECExp) - // BigPiByte is 1,024 t bytes in bit.Ints - BigPiByte = (&big.Int{}).Mul(BigTiByte, bigIECExp) - // BigEiByte is 1,024 p bytes in bit.Ints - BigEiByte = (&big.Int{}).Mul(BigPiByte, bigIECExp) - // BigZiByte is 1,024 e bytes in bit.Ints - BigZiByte = (&big.Int{}).Mul(BigEiByte, bigIECExp) - // BigYiByte is 1,024 z bytes in bit.Ints - BigYiByte = (&big.Int{}).Mul(BigZiByte, bigIECExp) - // BigRiByte is 1,024 y bytes in bit.Ints - BigRiByte = (&big.Int{}).Mul(BigYiByte, bigIECExp) - // BigQiByte is 1,024 r bytes in bit.Ints - BigQiByte = (&big.Int{}).Mul(BigRiByte, bigIECExp) -) - -var ( - bigSIExp = big.NewInt(1000) - - // BigSIByte is one SI byte in big.Ints - BigSIByte = big.NewInt(1) - // BigKByte is 1,000 SI bytes in big.Ints - BigKByte = (&big.Int{}).Mul(BigSIByte, bigSIExp) - // BigMByte is 1,000 SI k bytes in big.Ints - BigMByte = (&big.Int{}).Mul(BigKByte, bigSIExp) - // BigGByte is 1,000 SI m bytes in big.Ints - BigGByte = (&big.Int{}).Mul(BigMByte, bigSIExp) - // BigTByte is 1,000 SI g bytes in big.Ints - BigTByte = (&big.Int{}).Mul(BigGByte, bigSIExp) - // BigPByte is 1,000 SI t bytes in big.Ints - BigPByte = (&big.Int{}).Mul(BigTByte, bigSIExp) - // BigEByte is 1,000 SI p bytes in big.Ints - BigEByte = (&big.Int{}).Mul(BigPByte, bigSIExp) - // BigZByte is 1,000 SI e bytes in big.Ints - BigZByte = (&big.Int{}).Mul(BigEByte, bigSIExp) - // BigYByte is 1,000 SI z bytes in big.Ints - BigYByte = (&big.Int{}).Mul(BigZByte, bigSIExp) - // BigRByte is 1,000 SI y bytes in big.Ints - BigRByte = (&big.Int{}).Mul(BigYByte, bigSIExp) - // BigQByte is 1,000 SI r bytes in big.Ints - BigQByte = (&big.Int{}).Mul(BigRByte, bigSIExp) -) - -var bigBytesSizeTable = map[string]*big.Int{ - "b": BigByte, - "kib": BigKiByte, - "kb": BigKByte, - "mib": BigMiByte, - "mb": BigMByte, - "gib": BigGiByte, - "gb": BigGByte, - "tib": BigTiByte, - "tb": BigTByte, - "pib": BigPiByte, - "pb": BigPByte, - "eib": BigEiByte, - "eb": BigEByte, - "zib": BigZiByte, - "zb": BigZByte, - "yib": BigYiByte, - "yb": BigYByte, - "rib": BigRiByte, - "rb": BigRByte, - "qib": BigQiByte, - "qb": BigQByte, - // Without suffix - "": BigByte, - "ki": BigKiByte, - "k": BigKByte, - "mi": BigMiByte, - "m": BigMByte, - "gi": BigGiByte, - "g": BigGByte, - "ti": BigTiByte, - "t": BigTByte, - "pi": BigPiByte, - "p": BigPByte, - "ei": BigEiByte, - "e": BigEByte, - "z": BigZByte, - "zi": BigZiByte, - "y": BigYByte, - "yi": BigYiByte, - "r": BigRByte, - "ri": BigRiByte, - "q": BigQByte, - "qi": BigQiByte, -} - -var ten = big.NewInt(10) - -func humanateBigBytes(s, base *big.Int, sizes []string) string { - if s.Cmp(ten) < 0 { - return fmt.Sprintf("%d B", s) - } - c := (&big.Int{}).Set(s) - val, mag := oomm(c, base, len(sizes)-1) - suffix := sizes[mag] - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) - -} - -// BigBytes produces a human readable representation of an SI size. -// -// See also: ParseBigBytes. -// -// BigBytes(82854982) -> 83 MB -func BigBytes(s *big.Int) string { - sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "RB", "QB"} - return humanateBigBytes(s, bigSIExp, sizes) -} - -// BigIBytes produces a human readable representation of an IEC size. -// -// See also: ParseBigBytes. -// -// BigIBytes(82854982) -> 79 MiB -func BigIBytes(s *big.Int) string { - sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", "RiB", "QiB"} - return humanateBigBytes(s, bigIECExp, sizes) -} - -// ParseBigBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See also: BigBytes, BigIBytes. -// -// ParseBigBytes("42 MB") -> 42000000, nil -// ParseBigBytes("42 mib") -> 44040192, nil -func ParseBigBytes(s string) (*big.Int, error) { - lastDigit := 0 - hasComma := false - for _, r := range s { - if !(unicode.IsDigit(r) || r == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - val := &big.Rat{} - _, err := fmt.Sscanf(num, "%f", val) - if err != nil { - return nil, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bigBytesSizeTable[extra]; ok { - mv := (&big.Rat{}).SetInt(m) - val.Mul(val, mv) - rv := &big.Int{} - rv.Div(val.Num(), val.Denom()) - return rv, nil - } - - return nil, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/bytes.go b/vendor/github.com/dustin/go-humanize/bytes.go deleted file mode 100644 index 0b498f4885..0000000000 --- a/vendor/github.com/dustin/go-humanize/bytes.go +++ /dev/null @@ -1,143 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "strconv" - "strings" - "unicode" -) - -// IEC Sizes. -// kibis of bits -const ( - Byte = 1 << (iota * 10) - KiByte - MiByte - GiByte - TiByte - PiByte - EiByte -) - -// SI Sizes. -const ( - IByte = 1 - KByte = IByte * 1000 - MByte = KByte * 1000 - GByte = MByte * 1000 - TByte = GByte * 1000 - PByte = TByte * 1000 - EByte = PByte * 1000 -) - -var bytesSizeTable = map[string]uint64{ - "b": Byte, - "kib": KiByte, - "kb": KByte, - "mib": MiByte, - "mb": MByte, - "gib": GiByte, - "gb": GByte, - "tib": TiByte, - "tb": TByte, - "pib": PiByte, - "pb": PByte, - "eib": EiByte, - "eb": EByte, - // Without suffix - "": Byte, - "ki": KiByte, - "k": KByte, - "mi": MiByte, - "m": MByte, - "gi": GiByte, - "g": GByte, - "ti": TiByte, - "t": TByte, - "pi": PiByte, - "p": PByte, - "ei": EiByte, - "e": EByte, -} - -func logn(n, b float64) float64 { - return math.Log(n) / math.Log(b) -} - -func humanateBytes(s uint64, base float64, sizes []string) string { - if s < 10 { - return fmt.Sprintf("%d B", s) - } - e := math.Floor(logn(float64(s), base)) - suffix := sizes[int(e)] - val := math.Floor(float64(s)/math.Pow(base, e)*10+0.5) / 10 - f := "%.0f %s" - if val < 10 { - f = "%.1f %s" - } - - return fmt.Sprintf(f, val, suffix) -} - -// Bytes produces a human readable representation of an SI size. -// -// See also: ParseBytes. -// -// Bytes(82854982) -> 83 MB -func Bytes(s uint64) string { - sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"} - return humanateBytes(s, 1000, sizes) -} - -// IBytes produces a human readable representation of an IEC size. -// -// See also: ParseBytes. -// -// IBytes(82854982) -> 79 MiB -func IBytes(s uint64) string { - sizes := []string{"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB"} - return humanateBytes(s, 1024, sizes) -} - -// ParseBytes parses a string representation of bytes into the number -// of bytes it represents. -// -// See Also: Bytes, IBytes. -// -// ParseBytes("42 MB") -> 42000000, nil -// ParseBytes("42 mib") -> 44040192, nil -func ParseBytes(s string) (uint64, error) { - lastDigit := 0 - hasComma := false - for _, r := range s { - if !(unicode.IsDigit(r) || r == '.' || r == ',') { - break - } - if r == ',' { - hasComma = true - } - lastDigit++ - } - - num := s[:lastDigit] - if hasComma { - num = strings.Replace(num, ",", "", -1) - } - - f, err := strconv.ParseFloat(num, 64) - if err != nil { - return 0, err - } - - extra := strings.ToLower(strings.TrimSpace(s[lastDigit:])) - if m, ok := bytesSizeTable[extra]; ok { - f *= float64(m) - if f >= math.MaxUint64 { - return 0, fmt.Errorf("too large: %v", s) - } - return uint64(f), nil - } - - return 0, fmt.Errorf("unhandled size name: %v", extra) -} diff --git a/vendor/github.com/dustin/go-humanize/comma.go b/vendor/github.com/dustin/go-humanize/comma.go deleted file mode 100644 index 520ae3e57d..0000000000 --- a/vendor/github.com/dustin/go-humanize/comma.go +++ /dev/null @@ -1,116 +0,0 @@ -package humanize - -import ( - "bytes" - "math" - "math/big" - "strconv" - "strings" -) - -// Comma produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// e.g. Comma(834142) -> 834,142 -func Comma(v int64) string { - sign := "" - - // Min int64 can't be negated to a usable value, so it has to be special cased. - if v == math.MinInt64 { - return "-9,223,372,036,854,775,808" - } - - if v < 0 { - sign = "-" - v = 0 - v - } - - parts := []string{"", "", "", "", "", "", ""} - j := len(parts) - 1 - - for v > 999 { - parts[j] = strconv.FormatInt(v%1000, 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - v = v / 1000 - j-- - } - parts[j] = strconv.Itoa(int(v)) - return sign + strings.Join(parts[j:], ",") -} - -// Commaf produces a string form of the given number in base 10 with -// commas after every three orders of magnitude. -// -// e.g. Commaf(834142.32) -> 834,142.32 -func Commaf(v float64) string { - buf := &bytes.Buffer{} - if v < 0 { - buf.Write([]byte{'-'}) - v = 0 - v - } - - comma := []byte{','} - - parts := strings.Split(strconv.FormatFloat(v, 'f', -1, 64), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} - -// CommafWithDigits works like the Commaf but limits the resulting -// string to the given number of decimal places. -// -// e.g. CommafWithDigits(834142.32, 1) -> 834,142.3 -func CommafWithDigits(f float64, decimals int) string { - return stripTrailingDigits(Commaf(f), decimals) -} - -// BigComma produces a string form of the given big.Int in base 10 -// with commas after every three orders of magnitude. -func BigComma(b *big.Int) string { - sign := "" - if b.Sign() < 0 { - sign = "-" - b.Abs(b) - } - - athousand := big.NewInt(1000) - c := (&big.Int{}).Set(b) - _, m := oom(c, athousand) - parts := make([]string, m+1) - j := len(parts) - 1 - - mod := &big.Int{} - for b.Cmp(athousand) >= 0 { - b.DivMod(b, athousand, mod) - parts[j] = strconv.FormatInt(mod.Int64(), 10) - switch len(parts[j]) { - case 2: - parts[j] = "0" + parts[j] - case 1: - parts[j] = "00" + parts[j] - } - j-- - } - parts[j] = strconv.Itoa(int(b.Int64())) - return sign + strings.Join(parts[j:], ",") -} diff --git a/vendor/github.com/dustin/go-humanize/commaf.go b/vendor/github.com/dustin/go-humanize/commaf.go deleted file mode 100644 index 2bc83a03cf..0000000000 --- a/vendor/github.com/dustin/go-humanize/commaf.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build go1.6 -// +build go1.6 - -package humanize - -import ( - "bytes" - "math/big" - "strings" -) - -// BigCommaf produces a string form of the given big.Float in base 10 -// with commas after every three orders of magnitude. -func BigCommaf(v *big.Float) string { - buf := &bytes.Buffer{} - if v.Sign() < 0 { - buf.Write([]byte{'-'}) - v.Abs(v) - } - - comma := []byte{','} - - parts := strings.Split(v.Text('f', -1), ".") - pos := 0 - if len(parts[0])%3 != 0 { - pos += len(parts[0]) % 3 - buf.WriteString(parts[0][:pos]) - buf.Write(comma) - } - for ; pos < len(parts[0]); pos += 3 { - buf.WriteString(parts[0][pos : pos+3]) - buf.Write(comma) - } - buf.Truncate(buf.Len() - 1) - - if len(parts) > 1 { - buf.Write([]byte{'.'}) - buf.WriteString(parts[1]) - } - return buf.String() -} diff --git a/vendor/github.com/dustin/go-humanize/ftoa.go b/vendor/github.com/dustin/go-humanize/ftoa.go deleted file mode 100644 index bce923f371..0000000000 --- a/vendor/github.com/dustin/go-humanize/ftoa.go +++ /dev/null @@ -1,49 +0,0 @@ -package humanize - -import ( - "strconv" - "strings" -) - -func stripTrailingZeros(s string) string { - if !strings.ContainsRune(s, '.') { - return s - } - offset := len(s) - 1 - for offset > 0 { - if s[offset] == '.' { - offset-- - break - } - if s[offset] != '0' { - break - } - offset-- - } - return s[:offset+1] -} - -func stripTrailingDigits(s string, digits int) string { - if i := strings.Index(s, "."); i >= 0 { - if digits <= 0 { - return s[:i] - } - i++ - if i+digits >= len(s) { - return s - } - return s[:i+digits] - } - return s -} - -// Ftoa converts a float to a string with no trailing zeros. -func Ftoa(num float64) string { - return stripTrailingZeros(strconv.FormatFloat(num, 'f', 6, 64)) -} - -// FtoaWithDigits converts a float to a string but limits the resulting string -// to the given number of decimal places, and no trailing zeros. -func FtoaWithDigits(num float64, digits int) string { - return stripTrailingZeros(stripTrailingDigits(strconv.FormatFloat(num, 'f', 6, 64), digits)) -} diff --git a/vendor/github.com/dustin/go-humanize/humanize.go b/vendor/github.com/dustin/go-humanize/humanize.go deleted file mode 100644 index a2c2da31ef..0000000000 --- a/vendor/github.com/dustin/go-humanize/humanize.go +++ /dev/null @@ -1,8 +0,0 @@ -/* -Package humanize converts boring ugly numbers to human-friendly strings and back. - -Durations can be turned into strings such as "3 days ago", numbers -representing sizes like 82854982 into useful strings like, "83 MB" or -"79 MiB" (whichever you prefer). -*/ -package humanize diff --git a/vendor/github.com/dustin/go-humanize/number.go b/vendor/github.com/dustin/go-humanize/number.go deleted file mode 100644 index 6470d0d47a..0000000000 --- a/vendor/github.com/dustin/go-humanize/number.go +++ /dev/null @@ -1,192 +0,0 @@ -package humanize - -/* -Slightly adapted from the source to fit go-humanize. - -Author: https://github.com/gorhill -Source: https://gist.github.com/gorhill/5285193 - -*/ - -import ( - "math" - "strconv" -) - -var ( - renderFloatPrecisionMultipliers = [...]float64{ - 1, - 10, - 100, - 1000, - 10000, - 100000, - 1000000, - 10000000, - 100000000, - 1000000000, - } - - renderFloatPrecisionRounders = [...]float64{ - 0.5, - 0.05, - 0.005, - 0.0005, - 0.00005, - 0.000005, - 0.0000005, - 0.00000005, - 0.000000005, - 0.0000000005, - } -) - -// FormatFloat produces a formatted number as string based on the following user-specified criteria: -// * thousands separator -// * decimal separator -// * decimal precision -// -// Usage: s := RenderFloat(format, n) -// The format parameter tells how to render the number n. -// -// See examples: http://play.golang.org/p/LXc1Ddm1lJ -// -// Examples of format strings, given n = 12345.6789: -// "#,###.##" => "12,345.67" -// "#,###." => "12,345" -// "#,###" => "12345,678" -// "#\u202F###,##" => "12 345,68" -// "#.###,###### => 12.345,678900 -// "" (aka default format) => 12,345.67 -// -// The highest precision allowed is 9 digits after the decimal symbol. -// There is also a version for integer number, FormatInteger(), -// which is convenient for calls within template. -func FormatFloat(format string, n float64) string { - // Special cases: - // NaN = "NaN" - // +Inf = "+Infinity" - // -Inf = "-Infinity" - if math.IsNaN(n) { - return "NaN" - } - if n > math.MaxFloat64 { - return "Infinity" - } - if n < (0.0 - math.MaxFloat64) { - return "-Infinity" - } - - // default format - precision := 2 - decimalStr := "." - thousandStr := "," - positiveStr := "" - negativeStr := "-" - - if len(format) > 0 { - format := []rune(format) - - // If there is an explicit format directive, - // then default values are these: - precision = 9 - thousandStr = "" - - // collect indices of meaningful formatting directives - formatIndx := []int{} - for i, char := range format { - if char != '#' && char != '0' { - formatIndx = append(formatIndx, i) - } - } - - if len(formatIndx) > 0 { - // Directive at index 0: - // Must be a '+' - // Raise an error if not the case - // index: 0123456789 - // +0.000,000 - // +000,000.0 - // +0000.00 - // +0000 - if formatIndx[0] == 0 { - if format[formatIndx[0]] != '+' { - panic("RenderFloat(): invalid positive sign directive") - } - positiveStr = "+" - formatIndx = formatIndx[1:] - } - - // Two directives: - // First is thousands separator - // Raise an error if not followed by 3-digit - // 0123456789 - // 0.000,000 - // 000,000.00 - if len(formatIndx) == 2 { - if (formatIndx[1] - formatIndx[0]) != 4 { - panic("RenderFloat(): thousands separator directive must be followed by 3 digit-specifiers") - } - thousandStr = string(format[formatIndx[0]]) - formatIndx = formatIndx[1:] - } - - // One directive: - // Directive is decimal separator - // The number of digit-specifier following the separator indicates wanted precision - // 0123456789 - // 0.00 - // 000,0000 - if len(formatIndx) == 1 { - decimalStr = string(format[formatIndx[0]]) - precision = len(format) - formatIndx[0] - 1 - } - } - } - - // generate sign part - var signStr string - if n >= 0.000000001 { - signStr = positiveStr - } else if n <= -0.000000001 { - signStr = negativeStr - n = -n - } else { - signStr = "" - n = 0.0 - } - - // split number into integer and fractional parts - intf, fracf := math.Modf(n + renderFloatPrecisionRounders[precision]) - - // generate integer part string - intStr := strconv.FormatInt(int64(intf), 10) - - // add thousand separator if required - if len(thousandStr) > 0 { - for i := len(intStr); i > 3; { - i -= 3 - intStr = intStr[:i] + thousandStr + intStr[i:] - } - } - - // no fractional part, we can leave now - if precision == 0 { - return signStr + intStr - } - - // generate fractional part - fracStr := strconv.Itoa(int(fracf * renderFloatPrecisionMultipliers[precision])) - // may need padding - if len(fracStr) < precision { - fracStr = "000000000000000"[:precision-len(fracStr)] + fracStr - } - - return signStr + intStr + decimalStr + fracStr -} - -// FormatInteger produces a formatted number as string. -// See FormatFloat. -func FormatInteger(format string, n int) string { - return FormatFloat(format, float64(n)) -} diff --git a/vendor/github.com/dustin/go-humanize/ordinals.go b/vendor/github.com/dustin/go-humanize/ordinals.go deleted file mode 100644 index 43d88a8619..0000000000 --- a/vendor/github.com/dustin/go-humanize/ordinals.go +++ /dev/null @@ -1,25 +0,0 @@ -package humanize - -import "strconv" - -// Ordinal gives you the input number in a rank/ordinal format. -// -// Ordinal(3) -> 3rd -func Ordinal(x int) string { - suffix := "th" - switch x % 10 { - case 1: - if x%100 != 11 { - suffix = "st" - } - case 2: - if x%100 != 12 { - suffix = "nd" - } - case 3: - if x%100 != 13 { - suffix = "rd" - } - } - return strconv.Itoa(x) + suffix -} diff --git a/vendor/github.com/dustin/go-humanize/si.go b/vendor/github.com/dustin/go-humanize/si.go deleted file mode 100644 index 8b85019849..0000000000 --- a/vendor/github.com/dustin/go-humanize/si.go +++ /dev/null @@ -1,127 +0,0 @@ -package humanize - -import ( - "errors" - "math" - "regexp" - "strconv" -) - -var siPrefixTable = map[float64]string{ - -30: "q", // quecto - -27: "r", // ronto - -24: "y", // yocto - -21: "z", // zepto - -18: "a", // atto - -15: "f", // femto - -12: "p", // pico - -9: "n", // nano - -6: "µ", // micro - -3: "m", // milli - 0: "", - 3: "k", // kilo - 6: "M", // mega - 9: "G", // giga - 12: "T", // tera - 15: "P", // peta - 18: "E", // exa - 21: "Z", // zetta - 24: "Y", // yotta - 27: "R", // ronna - 30: "Q", // quetta -} - -var revSIPrefixTable = revfmap(siPrefixTable) - -// revfmap reverses the map and precomputes the power multiplier -func revfmap(in map[float64]string) map[string]float64 { - rv := map[string]float64{} - for k, v := range in { - rv[v] = math.Pow(10, k) - } - return rv -} - -var riParseRegex *regexp.Regexp - -func init() { - ri := `^([\-0-9.]+)\s?([` - for _, v := range siPrefixTable { - ri += v - } - ri += `]?)(.*)` - - riParseRegex = regexp.MustCompile(ri) -} - -// ComputeSI finds the most appropriate SI prefix for the given number -// and returns the prefix along with the value adjusted to be within -// that prefix. -// -// See also: SI, ParseSI. -// -// e.g. ComputeSI(2.2345e-12) -> (2.2345, "p") -func ComputeSI(input float64) (float64, string) { - if input == 0 { - return 0, "" - } - mag := math.Abs(input) - exponent := math.Floor(logn(mag, 10)) - exponent = math.Floor(exponent/3) * 3 - - value := mag / math.Pow(10, exponent) - - // Handle special case where value is exactly 1000.0 - // Should return 1 M instead of 1000 k - if value == 1000.0 { - exponent += 3 - value = mag / math.Pow(10, exponent) - } - - value = math.Copysign(value, input) - - prefix := siPrefixTable[exponent] - return value, prefix -} - -// SI returns a string with default formatting. -// -// SI uses Ftoa to format float value, removing trailing zeros. -// -// See also: ComputeSI, ParseSI. -// -// e.g. SI(1000000, "B") -> 1 MB -// e.g. SI(2.2345e-12, "F") -> 2.2345 pF -func SI(input float64, unit string) string { - value, prefix := ComputeSI(input) - return Ftoa(value) + " " + prefix + unit -} - -// SIWithDigits works like SI but limits the resulting string to the -// given number of decimal places. -// -// e.g. SIWithDigits(1000000, 0, "B") -> 1 MB -// e.g. SIWithDigits(2.2345e-12, 2, "F") -> 2.23 pF -func SIWithDigits(input float64, decimals int, unit string) string { - value, prefix := ComputeSI(input) - return FtoaWithDigits(value, decimals) + " " + prefix + unit -} - -var errInvalid = errors.New("invalid input") - -// ParseSI parses an SI string back into the number and unit. -// -// See also: SI, ComputeSI. -// -// e.g. ParseSI("2.2345 pF") -> (2.2345e-12, "F", nil) -func ParseSI(input string) (float64, string, error) { - found := riParseRegex.FindStringSubmatch(input) - if len(found) != 4 { - return 0, "", errInvalid - } - mag := revSIPrefixTable[found[2]] - unit := found[3] - - base, err := strconv.ParseFloat(found[1], 64) - return base * mag, unit, err -} diff --git a/vendor/github.com/dustin/go-humanize/times.go b/vendor/github.com/dustin/go-humanize/times.go deleted file mode 100644 index dd3fbf5efc..0000000000 --- a/vendor/github.com/dustin/go-humanize/times.go +++ /dev/null @@ -1,117 +0,0 @@ -package humanize - -import ( - "fmt" - "math" - "sort" - "time" -) - -// Seconds-based time units -const ( - Day = 24 * time.Hour - Week = 7 * Day - Month = 30 * Day - Year = 12 * Month - LongTime = 37 * Year -) - -// Time formats a time into a relative string. -// -// Time(someT) -> "3 weeks ago" -func Time(then time.Time) string { - return RelTime(then, time.Now(), "ago", "from now") -} - -// A RelTimeMagnitude struct contains a relative time point at which -// the relative format of time will switch to a new format string. A -// slice of these in ascending order by their "D" field is passed to -// CustomRelTime to format durations. -// -// The Format field is a string that may contain a "%s" which will be -// replaced with the appropriate signed label (e.g. "ago" or "from -// now") and a "%d" that will be replaced by the quantity. -// -// The DivBy field is the amount of time the time difference must be -// divided by in order to display correctly. -// -// e.g. if D is 2*time.Minute and you want to display "%d minutes %s" -// DivBy should be time.Minute so whatever the duration is will be -// expressed in minutes. -type RelTimeMagnitude struct { - D time.Duration - Format string - DivBy time.Duration -} - -var defaultMagnitudes = []RelTimeMagnitude{ - {time.Second, "now", time.Second}, - {2 * time.Second, "1 second %s", 1}, - {time.Minute, "%d seconds %s", time.Second}, - {2 * time.Minute, "1 minute %s", 1}, - {time.Hour, "%d minutes %s", time.Minute}, - {2 * time.Hour, "1 hour %s", 1}, - {Day, "%d hours %s", time.Hour}, - {2 * Day, "1 day %s", 1}, - {Week, "%d days %s", Day}, - {2 * Week, "1 week %s", 1}, - {Month, "%d weeks %s", Week}, - {2 * Month, "1 month %s", 1}, - {Year, "%d months %s", Month}, - {18 * Month, "1 year %s", 1}, - {2 * Year, "2 years %s", 1}, - {LongTime, "%d years %s", Year}, - {math.MaxInt64, "a long while %s", 1}, -} - -// RelTime formats a time into a relative string. -// -// It takes two times and two labels. In addition to the generic time -// delta string (e.g. 5 minutes), the labels are used applied so that -// the label corresponding to the smaller time is applied. -// -// RelTime(timeInPast, timeInFuture, "earlier", "later") -> "3 weeks earlier" -func RelTime(a, b time.Time, albl, blbl string) string { - return CustomRelTime(a, b, albl, blbl, defaultMagnitudes) -} - -// CustomRelTime formats a time into a relative string. -// -// It takes two times two labels and a table of relative time formats. -// In addition to the generic time delta string (e.g. 5 minutes), the -// labels are used applied so that the label corresponding to the -// smaller time is applied. -func CustomRelTime(a, b time.Time, albl, blbl string, magnitudes []RelTimeMagnitude) string { - lbl := albl - diff := b.Sub(a) - - if a.After(b) { - lbl = blbl - diff = a.Sub(b) - } - - n := sort.Search(len(magnitudes), func(i int) bool { - return magnitudes[i].D > diff - }) - - if n >= len(magnitudes) { - n = len(magnitudes) - 1 - } - mag := magnitudes[n] - args := []interface{}{} - escaped := false - for _, ch := range mag.Format { - if escaped { - switch ch { - case 's': - args = append(args, lbl) - case 'd': - args = append(args, diff/mag.DivBy) - } - escaped = false - } else { - escaped = ch == '%' - } - } - return fmt.Sprintf(mag.Format, args...) -} diff --git a/vendor/github.com/eapache/queue/v2/LICENSE b/vendor/github.com/eapache/queue/v2/LICENSE deleted file mode 100644 index d5f36dbcaa..0000000000 --- a/vendor/github.com/eapache/queue/v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Evan Huus - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/eapache/queue/v2/queue.go b/vendor/github.com/eapache/queue/v2/queue.go deleted file mode 100644 index 8cf74cc3ac..0000000000 --- a/vendor/github.com/eapache/queue/v2/queue.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -Package queue provides a fast, ring-buffer queue based on the version suggested by Dariusz Górecki. -Using this instead of other, simpler, queue implementations (slice+append or linked list) provides -substantial memory and time benefits, and fewer GC pauses. - -The queue implemented here is as fast as it is for an additional reason: it is *not* thread-safe. -*/ -package queue - -// minQueueLen is smallest capacity that queue may have. -// Must be power of 2 for bitwise modulus: x % n == x & (n - 1). -const minQueueLen = 16 - -// Queue represents a single instance of the queue data structure. -type Queue[V any] struct { - buf []*V - head, tail, count int -} - -// New constructs and returns a new Queue. -func New[V any]() *Queue[V] { - return &Queue[V]{ - buf: make([]*V, minQueueLen), - } -} - -// Length returns the number of elements currently stored in the queue. -func (q *Queue[V]) Length() int { - return q.count -} - -// resizes the queue to fit exactly twice its current contents -// this can result in shrinking if the queue is less than half-full -func (q *Queue[V]) resize() { - newBuf := make([]*V, q.count<<1) - - if q.tail > q.head { - copy(newBuf, q.buf[q.head:q.tail]) - } else { - n := copy(newBuf, q.buf[q.head:]) - copy(newBuf[n:], q.buf[:q.tail]) - } - - q.head = 0 - q.tail = q.count - q.buf = newBuf -} - -// Add puts an element on the end of the queue. -func (q *Queue[V]) Add(elem V) { - if q.count == len(q.buf) { - q.resize() - } - - q.buf[q.tail] = &elem - // bitwise modulus - q.tail = (q.tail + 1) & (len(q.buf) - 1) - q.count++ -} - -// Peek returns the element at the head of the queue. This call panics -// if the queue is empty. -func (q *Queue[V]) Peek() V { - if q.count <= 0 { - panic("queue: Peek() called on empty queue") - } - return *(q.buf[q.head]) -} - -// Get returns the element at index i in the queue. If the index is -// invalid, the call will panic. This method accepts both positive and -// negative index values. Index 0 refers to the first element, and -// index -1 refers to the last. -func (q *Queue[V]) Get(i int) V { - // If indexing backwards, convert to positive index. - if i < 0 { - i += q.count - } - if i < 0 || i >= q.count { - panic("queue: Get() called with index out of range") - } - // bitwise modulus - return *(q.buf[(q.head+i)&(len(q.buf)-1)]) -} - -// Remove removes and returns the element from the front of the queue. If the -// queue is empty, the call will panic. -func (q *Queue[V]) Remove() V { - if q.count <= 0 { - panic("queue: Remove() called on empty queue") - } - ret := q.buf[q.head] - q.buf[q.head] = nil - // bitwise modulus - q.head = (q.head + 1) & (len(q.buf) - 1) - q.count-- - // Resize down if buffer 1/4 full. - if len(q.buf) > minQueueLen && (q.count<<2) == len(q.buf) { - q.resize() - } - return *ret -} diff --git a/vendor/github.com/ebitengine/purego/.gitignore b/vendor/github.com/ebitengine/purego/.gitignore deleted file mode 100644 index b25c15b81f..0000000000 --- a/vendor/github.com/ebitengine/purego/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*~ diff --git a/vendor/github.com/ebitengine/purego/LICENSE b/vendor/github.com/ebitengine/purego/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/vendor/github.com/ebitengine/purego/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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} - - 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/ebitengine/purego/README.md b/vendor/github.com/ebitengine/purego/README.md deleted file mode 100644 index f1ff9053ac..0000000000 --- a/vendor/github.com/ebitengine/purego/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# purego -[![Go Reference](https://pkg.go.dev/badge/github.com/ebitengine/purego?GOOS=darwin.svg)](https://pkg.go.dev/github.com/ebitengine/purego?GOOS=darwin) - -A library for calling C functions from Go without Cgo. - -> This is beta software so expect bugs and potentially API breaking changes -> but each release will be tagged to avoid breaking people's code. -> Bug reports are encouraged. - -## Motivation - -The [Ebitengine](https://github.com/hajimehoshi/ebiten) game engine was ported to use only Go on Windows. This enabled -cross-compiling to Windows from any other operating system simply by setting `GOOS=windows`. The purego project was -born to bring that same vision to the other platforms supported by Ebitengine. - -## Benefits - -- **Simple Cross-Compilation**: No C means you can build for other platforms easily without a C compiler. -- **Faster Compilation**: Efficiently cache your entirely Go builds. -- **Smaller Binaries**: Using Cgo generates a C wrapper function for each C function called. Purego doesn't! -- **Dynamic Linking**: Load symbols at runtime and use it as a plugin system. -- **Foreign Function Interface**: Call into other languages that are compiled into shared objects. -- **Cgo Fallback**: Works even with CGO_ENABLED=1 so incremental porting is possible. -This also means unsupported GOARCHs (freebsd/riscv64, linux/mips, etc.) will still work -except for float arguments and return values. - -## Supported Platforms - -- **FreeBSD**: amd64, arm64 -- **Linux**: amd64, arm64 -- **macOS / iOS**: amd64, arm64 -- **Windows**: 386*, amd64, arm*, arm64 - -`*` These architectures only support SyscallN and NewCallback - -## Example - -The example below only showcases purego use for macOS and Linux. The other platforms require special handling which can -be seen in the complete example at [examples/libc](https://github.com/ebitengine/purego/tree/main/examples/libc) which supports Windows and FreeBSD. - -```go -package main - -import ( - "fmt" - "runtime" - - "github.com/ebitengine/purego" -) - -func getSystemLibrary() string { - switch runtime.GOOS { - case "darwin": - return "/usr/lib/libSystem.B.dylib" - case "linux": - return "libc.so.6" - default: - panic(fmt.Errorf("GOOS=%s is not supported", runtime.GOOS)) - } -} - -func main() { - libc, err := purego.Dlopen(getSystemLibrary(), purego.RTLD_NOW|purego.RTLD_GLOBAL) - if err != nil { - panic(err) - } - var puts func(string) - purego.RegisterLibFunc(&puts, libc, "puts") - puts("Calling C from Go without Cgo!") -} -``` - -Then to run: `CGO_ENABLED=0 go run main.go` - -## Questions - -If you have questions about how to incorporate purego in your project or want to discuss -how it works join the [Discord](https://discord.gg/HzGZVD6BkY)! - -### External Code - -Purego uses code that originates from the Go runtime. These files are under the BSD-3 -License that can be found [in the Go Source](https://github.com/golang/go/blob/master/LICENSE). -This is a list of the copied files: - -* `abi_*.h` from package `runtime/cgo` -* `zcallback_darwin_*.s` from package `runtime` -* `internal/fakecgo/abi_*.h` from package `runtime/cgo` -* `internal/fakecgo/asm_GOARCH.s` from package `runtime/cgo` -* `internal/fakecgo/callbacks.go` from package `runtime/cgo` -* `internal/fakecgo/go_GOOS_GOARCH.go` from package `runtime/cgo` -* `internal/fakecgo/iscgo.go` from package `runtime/cgo` -* `internal/fakecgo/setenv.go` from package `runtime/cgo` -* `internal/fakecgo/freebsd.go` from package `runtime/cgo` - -The files `abi_*.h` and `internal/fakecgo/abi_*.h` are the same because Bazel does not support cross-package use of -`#include` so we need each one once per package. (cf. [issue](https://github.com/bazelbuild/rules_go/issues/3636)) diff --git a/vendor/github.com/ebitengine/purego/abi_amd64.h b/vendor/github.com/ebitengine/purego/abi_amd64.h deleted file mode 100644 index 9949435fe9..0000000000 --- a/vendor/github.com/ebitengine/purego/abi_amd64.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2021 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. - -// Macros for transitioning from the host ABI to Go ABI0. -// -// These save the frame pointer, so in general, functions that use -// these should have zero frame size to suppress the automatic frame -// pointer, though it's harmless to not do this. - -#ifdef GOOS_windows - -// REGS_HOST_TO_ABI0_STACK is the stack bytes used by -// PUSH_REGS_HOST_TO_ABI0. -#define REGS_HOST_TO_ABI0_STACK (28*8 + 8) - -// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from -// the host ABI to Go ABI0 code. It saves all registers that are -// callee-save in the host ABI and caller-save in Go ABI0 and prepares -// for entry to Go. -// -// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag. -// Clear the DF flag for the Go ABI. -// MXCSR matches the Go ABI, so we don't have to set that, -// and Go doesn't modify it, so we don't have to save it. -#define PUSH_REGS_HOST_TO_ABI0() \ - PUSHFQ \ - CLD \ - ADJSP $(REGS_HOST_TO_ABI0_STACK - 8) \ - MOVQ DI, (0*0)(SP) \ - MOVQ SI, (1*8)(SP) \ - MOVQ BP, (2*8)(SP) \ - MOVQ BX, (3*8)(SP) \ - MOVQ R12, (4*8)(SP) \ - MOVQ R13, (5*8)(SP) \ - MOVQ R14, (6*8)(SP) \ - MOVQ R15, (7*8)(SP) \ - MOVUPS X6, (8*8)(SP) \ - MOVUPS X7, (10*8)(SP) \ - MOVUPS X8, (12*8)(SP) \ - MOVUPS X9, (14*8)(SP) \ - MOVUPS X10, (16*8)(SP) \ - MOVUPS X11, (18*8)(SP) \ - MOVUPS X12, (20*8)(SP) \ - MOVUPS X13, (22*8)(SP) \ - MOVUPS X14, (24*8)(SP) \ - MOVUPS X15, (26*8)(SP) - -#define POP_REGS_HOST_TO_ABI0() \ - MOVQ (0*0)(SP), DI \ - MOVQ (1*8)(SP), SI \ - MOVQ (2*8)(SP), BP \ - MOVQ (3*8)(SP), BX \ - MOVQ (4*8)(SP), R12 \ - MOVQ (5*8)(SP), R13 \ - MOVQ (6*8)(SP), R14 \ - MOVQ (7*8)(SP), R15 \ - MOVUPS (8*8)(SP), X6 \ - MOVUPS (10*8)(SP), X7 \ - MOVUPS (12*8)(SP), X8 \ - MOVUPS (14*8)(SP), X9 \ - MOVUPS (16*8)(SP), X10 \ - MOVUPS (18*8)(SP), X11 \ - MOVUPS (20*8)(SP), X12 \ - MOVUPS (22*8)(SP), X13 \ - MOVUPS (24*8)(SP), X14 \ - MOVUPS (26*8)(SP), X15 \ - ADJSP $-(REGS_HOST_TO_ABI0_STACK - 8) \ - POPFQ - -#else -// SysV ABI - -#define REGS_HOST_TO_ABI0_STACK (6*8) - -// SysV MXCSR matches the Go ABI, so we don't have to set that, -// and Go doesn't modify it, so we don't have to save it. -// Both SysV and Go require DF to be cleared, so that's already clear. -// The SysV and Go frame pointer conventions are compatible. -#define PUSH_REGS_HOST_TO_ABI0() \ - ADJSP $(REGS_HOST_TO_ABI0_STACK) \ - MOVQ BP, (5*8)(SP) \ - LEAQ (5*8)(SP), BP \ - MOVQ BX, (0*8)(SP) \ - MOVQ R12, (1*8)(SP) \ - MOVQ R13, (2*8)(SP) \ - MOVQ R14, (3*8)(SP) \ - MOVQ R15, (4*8)(SP) - -#define POP_REGS_HOST_TO_ABI0() \ - MOVQ (0*8)(SP), BX \ - MOVQ (1*8)(SP), R12 \ - MOVQ (2*8)(SP), R13 \ - MOVQ (3*8)(SP), R14 \ - MOVQ (4*8)(SP), R15 \ - MOVQ (5*8)(SP), BP \ - ADJSP $-(REGS_HOST_TO_ABI0_STACK) - -#endif diff --git a/vendor/github.com/ebitengine/purego/abi_arm64.h b/vendor/github.com/ebitengine/purego/abi_arm64.h deleted file mode 100644 index 5d5061ec1d..0000000000 --- a/vendor/github.com/ebitengine/purego/abi_arm64.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 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. - -// Macros for transitioning from the host ABI to Go ABI0. -// -// These macros save and restore the callee-saved registers -// from the stack, but they don't adjust stack pointer, so -// the user should prepare stack space in advance. -// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space -// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP). -// -// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space -// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP). -// -// R29 is not saved because Go will save and restore it. - -#define SAVE_R19_TO_R28(offset) \ - STP (R19, R20), ((offset)+0*8)(RSP) \ - STP (R21, R22), ((offset)+2*8)(RSP) \ - STP (R23, R24), ((offset)+4*8)(RSP) \ - STP (R25, R26), ((offset)+6*8)(RSP) \ - STP (R27, g), ((offset)+8*8)(RSP) -#define RESTORE_R19_TO_R28(offset) \ - LDP ((offset)+0*8)(RSP), (R19, R20) \ - LDP ((offset)+2*8)(RSP), (R21, R22) \ - LDP ((offset)+4*8)(RSP), (R23, R24) \ - LDP ((offset)+6*8)(RSP), (R25, R26) \ - LDP ((offset)+8*8)(RSP), (R27, g) /* R28 */ -#define SAVE_F8_TO_F15(offset) \ - FSTPD (F8, F9), ((offset)+0*8)(RSP) \ - FSTPD (F10, F11), ((offset)+2*8)(RSP) \ - FSTPD (F12, F13), ((offset)+4*8)(RSP) \ - FSTPD (F14, F15), ((offset)+6*8)(RSP) -#define RESTORE_F8_TO_F15(offset) \ - FLDPD ((offset)+0*8)(RSP), (F8, F9) \ - FLDPD ((offset)+2*8)(RSP), (F10, F11) \ - FLDPD ((offset)+4*8)(RSP), (F12, F13) \ - FLDPD ((offset)+6*8)(RSP), (F14, F15) diff --git a/vendor/github.com/ebitengine/purego/cgo.go b/vendor/github.com/ebitengine/purego/cgo.go deleted file mode 100644 index 7d5abef349..0000000000 --- a/vendor/github.com/ebitengine/purego/cgo.go +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build cgo && (darwin || freebsd || linux) - -package purego - -// if CGO_ENABLED=1 import the Cgo runtime to ensure that it is set up properly. -// This is required since some frameworks need TLS setup the C way which Go doesn't do. -// We currently don't support ios in fakecgo mode so force Cgo or fail -// Even if CGO_ENABLED=1 the Cgo runtime is not imported unless `import "C"` is used. -// which will import this package automatically. Normally this isn't an issue since it -// usually isn't possible to call into C without using that import. However, with purego -// it is since we don't use `import "C"`! -import ( - _ "runtime/cgo" - - _ "github.com/ebitengine/purego/internal/cgo" -) diff --git a/vendor/github.com/ebitengine/purego/dlerror.go b/vendor/github.com/ebitengine/purego/dlerror.go deleted file mode 100644 index 95cdfe16f2..0000000000 --- a/vendor/github.com/ebitengine/purego/dlerror.go +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2023 The Ebitengine Authors - -//go:build darwin || freebsd || linux - -package purego - -// Dlerror represents an error value returned from Dlopen, Dlsym, or Dlclose. -// -// This type is not available on Windows as there is no counterpart to it on Windows. -type Dlerror struct { - s string -} - -func (e Dlerror) Error() string { - return e.s -} diff --git a/vendor/github.com/ebitengine/purego/dlfcn.go b/vendor/github.com/ebitengine/purego/dlfcn.go deleted file mode 100644 index cd1bf293c7..0000000000 --- a/vendor/github.com/ebitengine/purego/dlfcn.go +++ /dev/null @@ -1,99 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build (darwin || freebsd || linux) && !android && !faketime - -package purego - -import ( - "unsafe" -) - -// Unix Specification for dlfcn.h: https://pubs.opengroup.org/onlinepubs/7908799/xsh/dlfcn.h.html - -var ( - fnDlopen func(path string, mode int) uintptr - fnDlsym func(handle uintptr, name string) uintptr - fnDlerror func() string - fnDlclose func(handle uintptr) bool -) - -func init() { - RegisterFunc(&fnDlopen, dlopenABI0) - RegisterFunc(&fnDlsym, dlsymABI0) - RegisterFunc(&fnDlerror, dlerrorABI0) - RegisterFunc(&fnDlclose, dlcloseABI0) -} - -// Dlopen examines the dynamic library or bundle file specified by path. If the file is compatible -// with the current process and has not already been loaded into the -// current process, it is loaded and linked. After being linked, if it contains -// any initializer functions, they are called, before Dlopen -// returns. It returns a handle that can be used with Dlsym and Dlclose. -// A second call to Dlopen with the same path will return the same handle, but the internal -// reference count for the handle will be incremented. Therefore, all -// Dlopen calls should be balanced with a Dlclose call. -// -// This function is not available on Windows. -// Use [golang.org/x/sys/windows.LoadLibrary], [golang.org/x/sys/windows.LoadLibraryEx], -// [golang.org/x/sys/windows.NewLazyDLL], or [golang.org/x/sys/windows.NewLazySystemDLL] for Windows instead. -func Dlopen(path string, mode int) (uintptr, error) { - u := fnDlopen(path, mode) - if u == 0 { - return 0, Dlerror{fnDlerror()} - } - return u, nil -} - -// Dlsym takes a "handle" of a dynamic library returned by Dlopen and the symbol name. -// It returns the address where that symbol is loaded into memory. If the symbol is not found, -// in the specified library or any of the libraries that were automatically loaded by Dlopen -// when that library was loaded, Dlsym returns zero. -// -// This function is not available on Windows. -// Use [golang.org/x/sys/windows.GetProcAddress] for Windows instead. -func Dlsym(handle uintptr, name string) (uintptr, error) { - u := fnDlsym(handle, name) - if u == 0 { - return 0, Dlerror{fnDlerror()} - } - return u, nil -} - -// Dlclose decrements the reference count on the dynamic library handle. -// If the reference count drops to zero and no other loaded libraries -// use symbols in it, then the dynamic library is unloaded. -// -// This function is not available on Windows. -// Use [golang.org/x/sys/windows.FreeLibrary] for Windows instead. -func Dlclose(handle uintptr) error { - if fnDlclose(handle) { - return Dlerror{fnDlerror()} - } - return nil -} - -func loadSymbol(handle uintptr, name string) (uintptr, error) { - return Dlsym(handle, name) -} - -// these functions exist in dlfcn_stubs.s and are calling C functions linked to in dlfcn_GOOS.go -// the indirection is necessary because a function is actually a pointer to the pointer to the code. -// sadly, I do not know of anyway to remove the assembly stubs entirely because //go:linkname doesn't -// appear to work if you link directly to the C function on darwin arm64. - -//go:linkname dlopen dlopen -var dlopen uint8 -var dlopenABI0 = uintptr(unsafe.Pointer(&dlopen)) - -//go:linkname dlsym dlsym -var dlsym uint8 -var dlsymABI0 = uintptr(unsafe.Pointer(&dlsym)) - -//go:linkname dlclose dlclose -var dlclose uint8 -var dlcloseABI0 = uintptr(unsafe.Pointer(&dlclose)) - -//go:linkname dlerror dlerror -var dlerror uint8 -var dlerrorABI0 = uintptr(unsafe.Pointer(&dlerror)) diff --git a/vendor/github.com/ebitengine/purego/dlfcn_android.go b/vendor/github.com/ebitengine/purego/dlfcn_android.go deleted file mode 100644 index 0d5341764e..0000000000 --- a/vendor/github.com/ebitengine/purego/dlfcn_android.go +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -package purego - -import "github.com/ebitengine/purego/internal/cgo" - -// Source for constants: https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/include/dlfcn.h - -const ( - is64bit = 1 << (^uintptr(0) >> 63) / 2 - is32bit = 1 - is64bit - RTLD_DEFAULT = is32bit * 0xffffffff - RTLD_LAZY = 0x00000001 - RTLD_NOW = is64bit * 0x00000002 - RTLD_LOCAL = 0x00000000 - RTLD_GLOBAL = is64bit*0x00100 | is32bit*0x00000002 -) - -func Dlopen(path string, mode int) (uintptr, error) { - return cgo.Dlopen(path, mode) -} - -func Dlsym(handle uintptr, name string) (uintptr, error) { - return cgo.Dlsym(handle, name) -} - -func Dlclose(handle uintptr) error { - return cgo.Dlclose(handle) -} - -func loadSymbol(handle uintptr, name string) (uintptr, error) { - return Dlsym(handle, name) -} diff --git a/vendor/github.com/ebitengine/purego/dlfcn_darwin.go b/vendor/github.com/ebitengine/purego/dlfcn_darwin.go deleted file mode 100644 index 27f560715a..0000000000 --- a/vendor/github.com/ebitengine/purego/dlfcn_darwin.go +++ /dev/null @@ -1,19 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -package purego - -// Source for constants: https://opensource.apple.com/source/dyld/dyld-360.14/include/dlfcn.h.auto.html - -const ( - RTLD_DEFAULT = 1<<64 - 2 // Pseudo-handle for dlsym so search for any loaded symbol - RTLD_LAZY = 0x1 // Relocations are performed at an implementation-dependent time. - RTLD_NOW = 0x2 // Relocations are performed when the object is loaded. - RTLD_LOCAL = 0x4 // All symbols are not made available for relocation processing by other modules. - RTLD_GLOBAL = 0x8 // All symbols are available for relocation processing of other modules. -) - -//go:cgo_import_dynamic purego_dlopen dlopen "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_dlsym dlsym "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_dlerror dlerror "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_dlclose dlclose "/usr/lib/libSystem.B.dylib" diff --git a/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go b/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go deleted file mode 100644 index 6b371620d9..0000000000 --- a/vendor/github.com/ebitengine/purego/dlfcn_freebsd.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -package purego - -// Constants as defined in https://github.com/freebsd/freebsd-src/blob/main/include/dlfcn.h -const ( - intSize = 32 << (^uint(0) >> 63) // 32 or 64 - RTLD_DEFAULT = 1< C) -// -// string <=> char* -// bool <=> _Bool -// uintptr <=> uintptr_t -// uint <=> uint32_t or uint64_t -// uint8 <=> uint8_t -// uint16 <=> uint16_t -// uint32 <=> uint32_t -// uint64 <=> uint64_t -// int <=> int32_t or int64_t -// int8 <=> int8_t -// int16 <=> int16_t -// int32 <=> int32_t -// int64 <=> int64_t -// float32 <=> float -// float64 <=> double -// struct <=> struct (WIP - darwin only) -// func <=> C function -// unsafe.Pointer, *T <=> void* -// []T => void* -// -// There is a special case when the last argument of fptr is a variadic interface (or []interface} -// it will be expanded into a call to the C function as if it had the arguments in that slice. -// This means that using arg ...interface{} is like a cast to the function with the arguments inside arg. -// This is not the same as C variadic. -// -// # Memory -// -// In general it is not possible for purego to guarantee the lifetimes of objects returned or received from -// calling functions using RegisterFunc. For arguments to a C function it is important that the C function doesn't -// hold onto a reference to Go memory. This is the same as the [Cgo rules]. -// -// However, there are some special cases. When passing a string as an argument if the string does not end in a null -// terminated byte (\x00) then the string will be copied into memory maintained by purego. The memory is only valid for -// that specific call. Therefore, if the C code keeps a reference to that string it may become invalid at some -// undefined time. However, if the string does already contain a null-terminated byte then no copy is done. -// It is then the responsibility of the caller to ensure the string stays alive as long as it's needed in C memory. -// This can be done using runtime.KeepAlive or allocating the string in C memory using malloc. When a C function -// returns a null-terminated pointer to char a Go string can be used. Purego will allocate a new string in Go memory -// and copy the data over. This string will be garbage collected whenever Go decides it's no longer referenced. -// This C created string will not be freed by purego. If the pointer to char is not null-terminated or must continue -// to point to C memory (because it's a buffer for example) then use a pointer to byte and then convert that to a slice -// using unsafe.Slice. Doing this means that it becomes the responsibility of the caller to care about the lifetime -// of the pointer -// -// # Structs -// -// Purego can handle the most common structs that have fields of builtin types like int8, uint16, float32, etc. However, -// it does not support aligning fields properly. It is therefore the responsibility of the caller to ensure -// that all padding is added to the Go struct to match the C one. See `BoolStructFn` in struct_test.go for an example. -// -// # Example -// -// All functions below call this C function: -// -// char *foo(char *str); -// -// // Let purego convert types -// var foo func(s string) string -// goString := foo("copied") -// // Go will garbage collect this string -// -// // Manually, handle allocations -// var foo2 func(b string) *byte -// mustFree := foo2("not copied\x00") -// defer free(mustFree) -// -// [Cgo rules]: https://pkg.go.dev/cmd/cgo#hdr-Go_references_to_C -func RegisterFunc(fptr interface{}, cfn uintptr) { - fn := reflect.ValueOf(fptr).Elem() - ty := fn.Type() - if ty.Kind() != reflect.Func { - panic("purego: fptr must be a function pointer") - } - if ty.NumOut() > 1 { - panic("purego: function can only return zero or one values") - } - if cfn == 0 { - panic("purego: cfn is nil") - } - if ty.NumOut() == 1 && (ty.Out(0).Kind() == reflect.Float32 || ty.Out(0).Kind() == reflect.Float64) && - runtime.GOARCH != "arm64" && runtime.GOARCH != "amd64" { - panic("purego: float returns are not supported") - } - { - // this code checks how many registers and stack this function will use - // to avoid crashing with too many arguments - var ints int - var floats int - var stack int - for i := 0; i < ty.NumIn(); i++ { - arg := ty.In(i) - switch arg.Kind() { - case reflect.Func: - // This only does preliminary testing to ensure the CDecl argument - // is the first argument. Full testing is done when the callback is actually - // created in NewCallback. - for j := 0; j < arg.NumIn(); j++ { - in := arg.In(j) - if !in.AssignableTo(reflect.TypeOf(CDecl{})) { - continue - } - if j != 0 { - panic("purego: CDecl must be the first argument") - } - } - case reflect.String, reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Ptr, reflect.UnsafePointer, - reflect.Slice, reflect.Bool: - if ints < numOfIntegerRegisters() { - ints++ - } else { - stack++ - } - case reflect.Float32, reflect.Float64: - const is32bit = unsafe.Sizeof(uintptr(0)) == 4 - if is32bit { - panic("purego: floats only supported on 64bit platforms") - } - if floats < numOfFloats { - floats++ - } else { - stack++ - } - case reflect.Struct: - if runtime.GOOS != "darwin" || (runtime.GOARCH != "amd64" && runtime.GOARCH != "arm64") { - panic("purego: struct arguments are only supported on darwin amd64 & arm64") - } - if arg.Size() == 0 { - continue - } - addInt := func(u uintptr) { - ints++ - } - addFloat := func(u uintptr) { - floats++ - } - addStack := func(u uintptr) { - stack++ - } - _ = addStruct(reflect.New(arg).Elem(), &ints, &floats, &stack, addInt, addFloat, addStack, nil) - default: - panic("purego: unsupported kind " + arg.Kind().String()) - } - } - if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct { - if runtime.GOOS != "darwin" { - panic("purego: struct return values only supported on darwin arm64 & amd64") - } - outType := ty.Out(0) - checkStructFieldsSupported(outType) - if runtime.GOARCH == "amd64" && outType.Size() > maxRegAllocStructSize { - // on amd64 if struct is bigger than 16 bytes allocate the return struct - // and pass it in as a hidden first argument. - ints++ - } - } - sizeOfStack := maxArgs - numOfIntegerRegisters() - if stack > sizeOfStack { - panic("purego: too many arguments") - } - } - v := reflect.MakeFunc(ty, func(args []reflect.Value) (results []reflect.Value) { - if len(args) > 0 { - if variadic, ok := args[len(args)-1].Interface().([]interface{}); ok { - // subtract one from args bc the last argument in args is []interface{} - // which we are currently expanding - tmp := make([]reflect.Value, len(args)-1+len(variadic)) - n := copy(tmp, args[:len(args)-1]) - for i, v := range variadic { - tmp[n+i] = reflect.ValueOf(v) - } - args = tmp - } - } - var sysargs [maxArgs]uintptr - stack := sysargs[numOfIntegerRegisters():] - var floats [numOfFloats]uintptr - var numInts int - var numFloats int - var numStack int - var addStack, addInt, addFloat func(x uintptr) - if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" { - // Windows arm64 uses the same calling convention as macOS and Linux - addStack = func(x uintptr) { - stack[numStack] = x - numStack++ - } - addInt = func(x uintptr) { - if numInts >= numOfIntegerRegisters() { - addStack(x) - } else { - sysargs[numInts] = x - numInts++ - } - } - addFloat = func(x uintptr) { - if numFloats < len(floats) { - floats[numFloats] = x - numFloats++ - } else { - addStack(x) - } - } - } else { - // On Windows amd64 the arguments are passed in the numbered registered. - // So the first int is in the first integer register and the first float - // is in the second floating register if there is already a first int. - // This is in contrast to how macOS and Linux pass arguments which - // tries to use as many registers as possible in the calling convention. - addStack = func(x uintptr) { - sysargs[numStack] = x - numStack++ - } - addInt = addStack - addFloat = addStack - } - - var keepAlive []interface{} - defer func() { - runtime.KeepAlive(keepAlive) - runtime.KeepAlive(args) - }() - var syscall syscall15Args - if ty.NumOut() == 1 && ty.Out(0).Kind() == reflect.Struct { - outType := ty.Out(0) - if runtime.GOARCH == "amd64" && outType.Size() > maxRegAllocStructSize { - val := reflect.New(outType) - keepAlive = append(keepAlive, val) - addInt(val.Pointer()) - } else if runtime.GOARCH == "arm64" && outType.Size() > maxRegAllocStructSize { - isAllFloats, numFields := isAllSameFloat(outType) - if !isAllFloats || numFields > 4 { - val := reflect.New(outType) - keepAlive = append(keepAlive, val) - syscall.arm64_r8 = val.Pointer() - } - } - } - for _, v := range args { - switch v.Kind() { - case reflect.String: - ptr := strings.CString(v.String()) - keepAlive = append(keepAlive, ptr) - addInt(uintptr(unsafe.Pointer(ptr))) - case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - addInt(uintptr(v.Uint())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - addInt(uintptr(v.Int())) - case reflect.Ptr, reflect.UnsafePointer, reflect.Slice: - // There is no need to keepAlive this pointer separately because it is kept alive in the args variable - addInt(v.Pointer()) - case reflect.Func: - addInt(NewCallback(v.Interface())) - case reflect.Bool: - if v.Bool() { - addInt(1) - } else { - addInt(0) - } - case reflect.Float32: - addFloat(uintptr(math.Float32bits(float32(v.Float())))) - case reflect.Float64: - addFloat(uintptr(math.Float64bits(v.Float()))) - case reflect.Struct: - keepAlive = addStruct(v, &numInts, &numFloats, &numStack, addInt, addFloat, addStack, keepAlive) - default: - panic("purego: unsupported kind: " + v.Kind().String()) - } - } - if runtime.GOARCH == "arm64" || runtime.GOOS != "windows" { - // Use the normal arm64 calling convention even on Windows - syscall = syscall15Args{ - cfn, - sysargs[0], sysargs[1], sysargs[2], sysargs[3], sysargs[4], sysargs[5], - sysargs[6], sysargs[7], sysargs[8], sysargs[9], sysargs[10], sysargs[11], - sysargs[12], sysargs[13], sysargs[14], - floats[0], floats[1], floats[2], floats[3], floats[4], floats[5], floats[6], floats[7], - syscall.arm64_r8, - } - runtime_cgocall(syscall15XABI0, unsafe.Pointer(&syscall)) - } else { - // This is a fallback for Windows amd64, 386, and arm. Note this may not support floats - syscall.a1, syscall.a2, _ = syscall_syscall15X(cfn, sysargs[0], sysargs[1], sysargs[2], sysargs[3], sysargs[4], - sysargs[5], sysargs[6], sysargs[7], sysargs[8], sysargs[9], sysargs[10], sysargs[11], - sysargs[12], sysargs[13], sysargs[14]) - syscall.f1 = syscall.a2 // on amd64 a2 stores the float return. On 32bit platforms floats aren't support - } - if ty.NumOut() == 0 { - return nil - } - outType := ty.Out(0) - v := reflect.New(outType).Elem() - switch outType.Kind() { - case reflect.Uintptr, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - v.SetUint(uint64(syscall.a1)) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - v.SetInt(int64(syscall.a1)) - case reflect.Bool: - v.SetBool(byte(syscall.a1) != 0) - case reflect.UnsafePointer: - // We take the address and then dereference it to trick go vet from creating a possible miss-use of unsafe.Pointer - v.SetPointer(*(*unsafe.Pointer)(unsafe.Pointer(&syscall.a1))) - case reflect.Ptr: - v = reflect.NewAt(outType, unsafe.Pointer(&syscall.a1)).Elem() - case reflect.Func: - // wrap this C function in a nicely typed Go function - v = reflect.New(outType) - RegisterFunc(v.Interface(), syscall.a1) - case reflect.String: - v.SetString(strings.GoString(syscall.a1)) - case reflect.Float32: - // NOTE: syscall.r2 is only the floating return value on 64bit platforms. - // On 32bit platforms syscall.r2 is the upper part of a 64bit return. - v.SetFloat(float64(math.Float32frombits(uint32(syscall.f1)))) - case reflect.Float64: - // NOTE: syscall.r2 is only the floating return value on 64bit platforms. - // On 32bit platforms syscall.r2 is the upper part of a 64bit return. - v.SetFloat(math.Float64frombits(uint64(syscall.f1))) - case reflect.Struct: - v = getStruct(outType, syscall) - default: - panic("purego: unsupported return kind: " + outType.Kind().String()) - } - return []reflect.Value{v} - }) - fn.Set(v) -} - -// maxRegAllocStructSize is the biggest a struct can be while still fitting in registers. -// if it is bigger than this than enough space must be allocated on the heap and then passed into -// the function as the first parameter on amd64 or in R8 on arm64. -// -// If you change this make sure to update it in objc_runtime_darwin.go -const maxRegAllocStructSize = 16 - -func isAllSameFloat(ty reflect.Type) (allFloats bool, numFields int) { - allFloats = true - root := ty.Field(0).Type - for root.Kind() == reflect.Struct { - root = root.Field(0).Type - } - first := root.Kind() - if first != reflect.Float32 && first != reflect.Float64 { - allFloats = false - } - for i := 0; i < ty.NumField(); i++ { - f := ty.Field(i).Type - if f.Kind() == reflect.Struct { - var structNumFields int - allFloats, structNumFields = isAllSameFloat(f) - numFields += structNumFields - continue - } - numFields++ - if f.Kind() != first { - allFloats = false - } - } - return allFloats, numFields -} - -func checkStructFieldsSupported(ty reflect.Type) { - for i := 0; i < ty.NumField(); i++ { - f := ty.Field(i).Type - if f.Kind() == reflect.Array { - f = f.Elem() - } else if f.Kind() == reflect.Struct { - checkStructFieldsSupported(f) - continue - } - switch f.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Uintptr, reflect.Ptr, reflect.UnsafePointer, reflect.Float64, reflect.Float32: - default: - panic(fmt.Sprintf("purego: struct field type %s is not supported", f)) - } - } -} - -func roundUpTo8(val uintptr) uintptr { - return (val + 7) &^ 7 -} - -func numOfIntegerRegisters() int { - switch runtime.GOARCH { - case "arm64": - return 8 - case "amd64": - return 6 - default: - // since this platform isn't supported and can therefore only access - // integer registers it is fine to return the maxArgs - return maxArgs - } -} diff --git a/vendor/github.com/ebitengine/purego/go_runtime.go b/vendor/github.com/ebitengine/purego/go_runtime.go deleted file mode 100644 index 13671ff23f..0000000000 --- a/vendor/github.com/ebitengine/purego/go_runtime.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build darwin || freebsd || linux || windows - -package purego - -import ( - "unsafe" -) - -//go:linkname runtime_cgocall runtime.cgocall -func runtime_cgocall(fn uintptr, arg unsafe.Pointer) int32 // from runtime/sys_libc.go diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go b/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go deleted file mode 100644 index b09ecac1cf..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/cgo/dlfcn_cgo_unix.go +++ /dev/null @@ -1,56 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -//go:build freebsd || linux - -package cgo - -/* - #cgo LDFLAGS: -ldl - -#include -#include -*/ -import "C" - -import ( - "errors" - "unsafe" -) - -func Dlopen(filename string, flag int) (uintptr, error) { - cfilename := C.CString(filename) - defer C.free(unsafe.Pointer(cfilename)) - handle := C.dlopen(cfilename, C.int(flag)) - if handle == nil { - return 0, errors.New(C.GoString(C.dlerror())) - } - return uintptr(handle), nil -} - -func Dlsym(handle uintptr, symbol string) (uintptr, error) { - csymbol := C.CString(symbol) - defer C.free(unsafe.Pointer(csymbol)) - symbolAddr := C.dlsym(*(*unsafe.Pointer)(unsafe.Pointer(&handle)), csymbol) - if symbolAddr == nil { - return 0, errors.New(C.GoString(C.dlerror())) - } - return uintptr(symbolAddr), nil -} - -func Dlclose(handle uintptr) error { - result := C.dlclose(*(*unsafe.Pointer)(unsafe.Pointer(&handle))) - if result != 0 { - return errors.New(C.GoString(C.dlerror())) - } - return nil -} - -// all that is needed is to assign each dl function because then its -// symbol will then be made available to the linker and linked to inside dlfcn.go -var ( - _ = C.dlopen - _ = C.dlsym - _ = C.dlerror - _ = C.dlclose -) diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/empty.go b/vendor/github.com/ebitengine/purego/internal/cgo/empty.go deleted file mode 100644 index 1d7cffe2a7..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/cgo/empty.go +++ /dev/null @@ -1,6 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -package cgo - -// Empty so that importing this package doesn't cause issue for certain platforms. diff --git a/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go b/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go deleted file mode 100644 index 37ff24d5c1..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/cgo/syscall_cgo_unix.go +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build freebsd || (linux && !(arm64 || amd64)) - -package cgo - -// this file is placed inside internal/cgo and not package purego -// because Cgo and assembly files can't be in the same package. - -/* - #cgo LDFLAGS: -ldl - -#include -#include -#include -#include - -typedef struct syscall15Args { - uintptr_t fn; - uintptr_t a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15; - uintptr_t f1, f2, f3, f4, f5, f6, f7, f8; - uintptr_t err; -} syscall15Args; - -void syscall15(struct syscall15Args *args) { - assert((args->f1|args->f2|args->f3|args->f4|args->f5|args->f6|args->f7|args->f8) == 0); - uintptr_t (*func_name)(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, - uintptr_t a7, uintptr_t a8, uintptr_t a9, uintptr_t a10, uintptr_t a11, uintptr_t a12, - uintptr_t a13, uintptr_t a14, uintptr_t a15); - *(void**)(&func_name) = (void*)(args->fn); - uintptr_t r1 = func_name(args->a1,args->a2,args->a3,args->a4,args->a5,args->a6,args->a7,args->a8,args->a9, - args->a10,args->a11,args->a12,args->a13,args->a14,args->a15); - args->a1 = r1; - args->err = errno; -} - -*/ -import "C" -import "unsafe" - -// assign purego.syscall15XABI0 to the C version of this function. -var Syscall15XABI0 = unsafe.Pointer(C.syscall15) - -//go:nosplit -func Syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { - args := C.syscall15Args{ - C.uintptr_t(fn), C.uintptr_t(a1), C.uintptr_t(a2), C.uintptr_t(a3), - C.uintptr_t(a4), C.uintptr_t(a5), C.uintptr_t(a6), - C.uintptr_t(a7), C.uintptr_t(a8), C.uintptr_t(a9), C.uintptr_t(a10), C.uintptr_t(a11), C.uintptr_t(a12), - C.uintptr_t(a13), C.uintptr_t(a14), C.uintptr_t(a15), 0, 0, 0, 0, 0, 0, 0, 0, 0, - } - C.syscall15(&args) - return uintptr(args.a1), 0, uintptr(args.err) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h deleted file mode 100644 index 9949435fe9..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_amd64.h +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2021 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. - -// Macros for transitioning from the host ABI to Go ABI0. -// -// These save the frame pointer, so in general, functions that use -// these should have zero frame size to suppress the automatic frame -// pointer, though it's harmless to not do this. - -#ifdef GOOS_windows - -// REGS_HOST_TO_ABI0_STACK is the stack bytes used by -// PUSH_REGS_HOST_TO_ABI0. -#define REGS_HOST_TO_ABI0_STACK (28*8 + 8) - -// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from -// the host ABI to Go ABI0 code. It saves all registers that are -// callee-save in the host ABI and caller-save in Go ABI0 and prepares -// for entry to Go. -// -// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag. -// Clear the DF flag for the Go ABI. -// MXCSR matches the Go ABI, so we don't have to set that, -// and Go doesn't modify it, so we don't have to save it. -#define PUSH_REGS_HOST_TO_ABI0() \ - PUSHFQ \ - CLD \ - ADJSP $(REGS_HOST_TO_ABI0_STACK - 8) \ - MOVQ DI, (0*0)(SP) \ - MOVQ SI, (1*8)(SP) \ - MOVQ BP, (2*8)(SP) \ - MOVQ BX, (3*8)(SP) \ - MOVQ R12, (4*8)(SP) \ - MOVQ R13, (5*8)(SP) \ - MOVQ R14, (6*8)(SP) \ - MOVQ R15, (7*8)(SP) \ - MOVUPS X6, (8*8)(SP) \ - MOVUPS X7, (10*8)(SP) \ - MOVUPS X8, (12*8)(SP) \ - MOVUPS X9, (14*8)(SP) \ - MOVUPS X10, (16*8)(SP) \ - MOVUPS X11, (18*8)(SP) \ - MOVUPS X12, (20*8)(SP) \ - MOVUPS X13, (22*8)(SP) \ - MOVUPS X14, (24*8)(SP) \ - MOVUPS X15, (26*8)(SP) - -#define POP_REGS_HOST_TO_ABI0() \ - MOVQ (0*0)(SP), DI \ - MOVQ (1*8)(SP), SI \ - MOVQ (2*8)(SP), BP \ - MOVQ (3*8)(SP), BX \ - MOVQ (4*8)(SP), R12 \ - MOVQ (5*8)(SP), R13 \ - MOVQ (6*8)(SP), R14 \ - MOVQ (7*8)(SP), R15 \ - MOVUPS (8*8)(SP), X6 \ - MOVUPS (10*8)(SP), X7 \ - MOVUPS (12*8)(SP), X8 \ - MOVUPS (14*8)(SP), X9 \ - MOVUPS (16*8)(SP), X10 \ - MOVUPS (18*8)(SP), X11 \ - MOVUPS (20*8)(SP), X12 \ - MOVUPS (22*8)(SP), X13 \ - MOVUPS (24*8)(SP), X14 \ - MOVUPS (26*8)(SP), X15 \ - ADJSP $-(REGS_HOST_TO_ABI0_STACK - 8) \ - POPFQ - -#else -// SysV ABI - -#define REGS_HOST_TO_ABI0_STACK (6*8) - -// SysV MXCSR matches the Go ABI, so we don't have to set that, -// and Go doesn't modify it, so we don't have to save it. -// Both SysV and Go require DF to be cleared, so that's already clear. -// The SysV and Go frame pointer conventions are compatible. -#define PUSH_REGS_HOST_TO_ABI0() \ - ADJSP $(REGS_HOST_TO_ABI0_STACK) \ - MOVQ BP, (5*8)(SP) \ - LEAQ (5*8)(SP), BP \ - MOVQ BX, (0*8)(SP) \ - MOVQ R12, (1*8)(SP) \ - MOVQ R13, (2*8)(SP) \ - MOVQ R14, (3*8)(SP) \ - MOVQ R15, (4*8)(SP) - -#define POP_REGS_HOST_TO_ABI0() \ - MOVQ (0*8)(SP), BX \ - MOVQ (1*8)(SP), R12 \ - MOVQ (2*8)(SP), R13 \ - MOVQ (3*8)(SP), R14 \ - MOVQ (4*8)(SP), R15 \ - MOVQ (5*8)(SP), BP \ - ADJSP $-(REGS_HOST_TO_ABI0_STACK) - -#endif diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h b/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h deleted file mode 100644 index 5d5061ec1d..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/abi_arm64.h +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2021 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. - -// Macros for transitioning from the host ABI to Go ABI0. -// -// These macros save and restore the callee-saved registers -// from the stack, but they don't adjust stack pointer, so -// the user should prepare stack space in advance. -// SAVE_R19_TO_R28(offset) saves R19 ~ R28 to the stack space -// of ((offset)+0*8)(RSP) ~ ((offset)+9*8)(RSP). -// -// SAVE_F8_TO_F15(offset) saves F8 ~ F15 to the stack space -// of ((offset)+0*8)(RSP) ~ ((offset)+7*8)(RSP). -// -// R29 is not saved because Go will save and restore it. - -#define SAVE_R19_TO_R28(offset) \ - STP (R19, R20), ((offset)+0*8)(RSP) \ - STP (R21, R22), ((offset)+2*8)(RSP) \ - STP (R23, R24), ((offset)+4*8)(RSP) \ - STP (R25, R26), ((offset)+6*8)(RSP) \ - STP (R27, g), ((offset)+8*8)(RSP) -#define RESTORE_R19_TO_R28(offset) \ - LDP ((offset)+0*8)(RSP), (R19, R20) \ - LDP ((offset)+2*8)(RSP), (R21, R22) \ - LDP ((offset)+4*8)(RSP), (R23, R24) \ - LDP ((offset)+6*8)(RSP), (R25, R26) \ - LDP ((offset)+8*8)(RSP), (R27, g) /* R28 */ -#define SAVE_F8_TO_F15(offset) \ - FSTPD (F8, F9), ((offset)+0*8)(RSP) \ - FSTPD (F10, F11), ((offset)+2*8)(RSP) \ - FSTPD (F12, F13), ((offset)+4*8)(RSP) \ - FSTPD (F14, F15), ((offset)+6*8)(RSP) -#define RESTORE_F8_TO_F15(offset) \ - FLDPD ((offset)+0*8)(RSP), (F8, F9) \ - FLDPD ((offset)+2*8)(RSP), (F10, F11) \ - FLDPD ((offset)+4*8)(RSP), (F12, F13) \ - FLDPD ((offset)+6*8)(RSP), (F14, F15) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s deleted file mode 100644 index 2b7eb57f8a..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_amd64.s +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2009 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. - -#include "textflag.h" -#include "abi_amd64.h" - -// Called by C code generated by cmd/cgo. -// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) -// Saves C callee-saved registers and calls cgocallback with three arguments. -// fn is the PC of a func(a unsafe.Pointer) function. -// This signature is known to SWIG, so we can't change it. -TEXT crosscall2(SB), NOSPLIT, $0-0 - PUSH_REGS_HOST_TO_ABI0() - - // Make room for arguments to cgocallback. - ADJSP $0x18 - -#ifndef GOOS_windows - MOVQ DI, 0x0(SP) // fn - MOVQ SI, 0x8(SP) // arg - - // Skip n in DX. - MOVQ CX, 0x10(SP) // ctxt - -#else - MOVQ CX, 0x0(SP) // fn - MOVQ DX, 0x8(SP) // arg - - // Skip n in R8. - MOVQ R9, 0x10(SP) // ctxt - -#endif - - CALL runtime·cgocallback(SB) - - ADJSP $-0x18 - POP_REGS_HOST_TO_ABI0() - RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s deleted file mode 100644 index 50e5261d92..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/asm_arm64.s +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2015 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. - -#include "textflag.h" -#include "abi_arm64.h" - -// Called by C code generated by cmd/cgo. -// func crosscall2(fn, a unsafe.Pointer, n int32, ctxt uintptr) -// Saves C callee-saved registers and calls cgocallback with three arguments. -// fn is the PC of a func(a unsafe.Pointer) function. -TEXT crosscall2(SB), NOSPLIT|NOFRAME, $0 -/* - * We still need to save all callee save register as before, and then - * push 3 args for fn (R0, R1, R3), skipping R2. - * Also note that at procedure entry in gc world, 8(RSP) will be the - * first arg. - */ - SUB $(8*24), RSP - STP (R0, R1), (8*1)(RSP) - MOVD R3, (8*3)(RSP) - - SAVE_R19_TO_R28(8*4) - SAVE_F8_TO_F15(8*14) - STP (R29, R30), (8*22)(RSP) - - // Initialize Go ABI environment - BL runtime·load_g(SB) - BL runtime·cgocallback(SB) - - RESTORE_R19_TO_R28(8*4) - RESTORE_F8_TO_F15(8*14) - LDP (8*22)(RSP), (R29, R30) - - ADD $(8*24), RSP - RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go deleted file mode 100644 index f29e690cc1..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/callbacks.go +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -import ( - _ "unsafe" -) - -// TODO: decide if we need _runtime_cgo_panic_internal - -//go:linkname x_cgo_init_trampoline x_cgo_init_trampoline -//go:linkname _cgo_init _cgo_init -var x_cgo_init_trampoline byte -var _cgo_init = &x_cgo_init_trampoline - -// Creates a new system thread without updating any Go state. -// -// This method is invoked during shared library loading to create a new OS -// thread to perform the runtime initialization. This method is similar to -// _cgo_sys_thread_start except that it doesn't update any Go state. - -//go:linkname x_cgo_thread_start_trampoline x_cgo_thread_start_trampoline -//go:linkname _cgo_thread_start _cgo_thread_start -var x_cgo_thread_start_trampoline byte -var _cgo_thread_start = &x_cgo_thread_start_trampoline - -// Notifies that the runtime has been initialized. -// -// We currently block at every CGO entry point (via _cgo_wait_runtime_init_done) -// to ensure that the runtime has been initialized before the CGO call is -// executed. This is necessary for shared libraries where we kickoff runtime -// initialization in a separate thread and return without waiting for this -// thread to complete the init. - -//go:linkname x_cgo_notify_runtime_init_done_trampoline x_cgo_notify_runtime_init_done_trampoline -//go:linkname _cgo_notify_runtime_init_done _cgo_notify_runtime_init_done -var x_cgo_notify_runtime_init_done_trampoline byte -var _cgo_notify_runtime_init_done = &x_cgo_notify_runtime_init_done_trampoline - -// Indicates whether a dummy thread key has been created or not. -// -// When calling go exported function from C, we register a destructor -// callback, for a dummy thread key, by using pthread_key_create. - -//go:linkname _cgo_pthread_key_created _cgo_pthread_key_created -var x_cgo_pthread_key_created uintptr -var _cgo_pthread_key_created = &x_cgo_pthread_key_created - -// Set the x_crosscall2_ptr C function pointer variable point to crosscall2. -// It's for the runtime package to call at init time. -func set_crosscall2() { - // nothing needs to be done here for fakecgo - // because it's possible to just call cgocallback directly -} - -//go:linkname _set_crosscall2 runtime.set_crosscall2 -var _set_crosscall2 = set_crosscall2 - -// Store the g into the thread-specific value. -// So that pthread_key_destructor will dropm when the thread is exiting. - -//go:linkname x_cgo_bindm_trampoline x_cgo_bindm_trampoline -//go:linkname _cgo_bindm _cgo_bindm -var x_cgo_bindm_trampoline byte -var _cgo_bindm = &x_cgo_bindm_trampoline - -// TODO: decide if we need x_cgo_set_context_function -// TODO: decide if we need _cgo_yield - -var ( - // In Go 1.20 the race detector was rewritten to pure Go - // on darwin. This means that when CGO_ENABLED=0 is set - // fakecgo is built with race detector code. This is not - // good since this code is pretending to be C. The go:norace - // pragma is not enough, since it only applies to the native - // ABIInternal function. The ABIO wrapper (which is necessary, - // since all references to text symbols from assembly will use it) - // does not inherit the go:norace pragma, so it will still be - // instrumented by the race detector. - // - // To circumvent this issue, using closure calls in the - // assembly, which forces the compiler to use the ABIInternal - // native implementation (which has go:norace) instead. - threadentry_call = threadentry - x_cgo_init_call = x_cgo_init - x_cgo_setenv_call = x_cgo_setenv - x_cgo_unsetenv_call = x_cgo_unsetenv - x_cgo_thread_start_call = x_cgo_thread_start -) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go deleted file mode 100644 index be82f7dfca..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/doc.go +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -// Package fakecgo implements the Cgo runtime (runtime/cgo) entirely in Go. -// This allows code that calls into C to function properly when CGO_ENABLED=0. -// -// # Goals -// -// fakecgo attempts to replicate the same naming structure as in the runtime. -// For example, functions that have the prefix "gcc_*" are named "go_*". -// This makes it easier to port other GOOSs and GOARCHs as well as to keep -// it in sync with runtime/cgo. -// -// # Support -// -// Currently, fakecgo only supports macOS on amd64 & arm64. It also cannot -// be used with -buildmode=c-archive because that requires special initialization -// that fakecgo does not implement at the moment. -// -// # Usage -// -// Using fakecgo is easy just import _ "github.com/ebitengine/purego" and then -// set the environment variable CGO_ENABLED=0. -// The recommended usage for fakecgo is to prefer using runtime/cgo if possible -// but if cross-compiling or fast build times are important fakecgo is available. -// Purego will pick which ever Cgo runtime is available and prefer the one that -// comes with Go (runtime/cgo). -package fakecgo - -//go:generate go run gen.go diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go deleted file mode 100644 index bb73a709e6..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/freebsd.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2010 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. - -//go:build freebsd && !cgo - -package fakecgo - -import _ "unsafe" // for go:linkname - -// Supply environ and __progname, because we don't -// link against the standard FreeBSD crt0.o and the -// libc dynamic library needs them. - -// Note: when building with cross-compiling or CGO_ENABLED=0, add -// the following argument to `go` so that these symbols are defined by -// making fakecgo the Cgo. -// -gcflags="github.com/ebitengine/purego/internal/fakecgo=-std" - -//go:linkname _environ environ -//go:linkname _progname __progname - -//go:cgo_export_dynamic environ -//go:cgo_export_dynamic __progname - -var _environ uintptr -var _progname uintptr diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go deleted file mode 100644 index 39f5ff1f06..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_amd64.go +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -//go:norace -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - size = pthread_get_stacksize_np(pthread_self()) - pthread_attr_init(&attr) - pthread_attr_setstacksize(&attr, size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -//go:norace -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -//go:nosplit -//go:norace -func x_cgo_init(g *G, setg uintptr) { - var size size_t - - setg_func = setg - - size = pthread_get_stacksize_np(pthread_self()) - g.stacklo = uintptr(unsafe.Add(unsafe.Pointer(&size), -size+4096)) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go deleted file mode 100644 index d0868f0f79..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_darwin_arm64.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -//go:norace -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - size = pthread_get_stacksize_np(pthread_self()) - pthread_attr_init(&attr) - pthread_attr_setstacksize(&attr, size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -//go:norace -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - // TODO: support ios - //#if TARGET_OS_IPHONE - // darwin_arm_init_thread_exception_port(); - //#endif - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) -// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us -// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup -// This function can't be go:systemstack since go is not in a state where the systemcheck would work. -// -//go:nosplit -//go:norace -func x_cgo_init(g *G, setg uintptr) { - var size size_t - - setg_func = setg - size = pthread_get_stacksize_np(pthread_self()) - g.stacklo = uintptr(unsafe.Add(unsafe.Pointer(&size), -size+4096)) - - //TODO: support ios - //#if TARGET_OS_IPHONE - // darwin_arm_init_mach_exception_handler(); - // darwin_arm_init_thread_exception_port(); - // init_working_dir(); - //#endif -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go deleted file mode 100644 index c9ff7156a8..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_amd64.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - pthread_attr_init(&attr) - pthread_attr_getstacksize(&attr, &size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -//go:nosplit -func x_cgo_init(g *G, setg uintptr) { - var size size_t - var attr *pthread_attr_t - - /* The memory sanitizer distributed with versions of clang - before 3.8 has a bug: if you call mmap before malloc, mmap - may return an address that is later overwritten by the msan - library. Avoid this problem by forcing a call to malloc - here, before we ever call malloc. - - This is only required for the memory sanitizer, so it's - unfortunate that we always run it. It should be possible - to remove this when we no longer care about versions of - clang before 3.8. The test for this is - misc/cgo/testsanitizers. - - GCC works hard to eliminate a seemingly unnecessary call to - malloc, so we actually use the memory we allocate. */ - - setg_func = setg - attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) - if attr == nil { - println("fakecgo: malloc failed") - abort() - } - pthread_attr_init(attr) - pthread_attr_getstacksize(attr, &size) - // runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))` - // but this should be OK since we are taking the address of the first variable in this function. - g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 - pthread_attr_destroy(attr) - free(unsafe.Pointer(attr)) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go deleted file mode 100644 index e3a060b935..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_freebsd_arm64.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - // fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - pthread_attr_init(&attr) - pthread_attr_getstacksize(&attr, &size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) -// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us -// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup -// This function can't be go:systemstack since go is not in a state where the systemcheck would work. -// -//go:nosplit -func x_cgo_init(g *G, setg uintptr) { - var size size_t - var attr *pthread_attr_t - - /* The memory sanitizer distributed with versions of clang - before 3.8 has a bug: if you call mmap before malloc, mmap - may return an address that is later overwritten by the msan - library. Avoid this problem by forcing a call to malloc - here, before we ever call malloc. - - This is only required for the memory sanitizer, so it's - unfortunate that we always run it. It should be possible - to remove this when we no longer care about versions of - clang before 3.8. The test for this is - misc/cgo/testsanitizers. - - GCC works hard to eliminate a seemingly unnecessary call to - malloc, so we actually use the memory we allocate. */ - - setg_func = setg - attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) - if attr == nil { - println("fakecgo: malloc failed") - abort() - } - pthread_attr_init(attr) - pthread_attr_getstacksize(attr, &size) - g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 - pthread_attr_destroy(attr) - free(unsafe.Pointer(attr)) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go deleted file mode 100644 index d229d842b9..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_libinit.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -import ( - "syscall" - "unsafe" -) - -var ( - pthread_g pthread_key_t - - runtime_init_cond = PTHREAD_COND_INITIALIZER - runtime_init_mu = PTHREAD_MUTEX_INITIALIZER - runtime_init_done int -) - -//go:nosplit -func x_cgo_notify_runtime_init_done() { - pthread_mutex_lock(&runtime_init_mu) - runtime_init_done = 1 - pthread_cond_broadcast(&runtime_init_cond) - pthread_mutex_unlock(&runtime_init_mu) -} - -// Store the g into a thread-specific value associated with the pthread key pthread_g. -// And pthread_key_destructor will dropm when the thread is exiting. -func x_cgo_bindm(g unsafe.Pointer) { - // We assume this will always succeed, otherwise, there might be extra M leaking, - // when a C thread exits after a cgo call. - // We only invoke this function once per thread in runtime.needAndBindM, - // and the next calls just reuse the bound m. - pthread_setspecific(pthread_g, g) -} - -// _cgo_try_pthread_create retries pthread_create if it fails with -// EAGAIN. -// -//go:nosplit -//go:norace -func _cgo_try_pthread_create(thread *pthread_t, attr *pthread_attr_t, pfn unsafe.Pointer, arg *ThreadStart) int { - var ts syscall.Timespec - // tries needs to be the same type as syscall.Timespec.Nsec - // but the fields are int32 on 32bit and int64 on 64bit. - // tries is assigned to syscall.Timespec.Nsec in order to match its type. - tries := ts.Nsec - var err int - - for tries = 0; tries < 20; tries++ { - // inlined this call because it ran out of stack when inlining was disabled - err = int(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(pfn), uintptr(unsafe.Pointer(arg)), 0)) - if err == 0 { - // inlined this call because it ran out of stack when inlining was disabled - call5(pthread_detachABI0, uintptr(*thread), 0, 0, 0, 0) - return 0 - } - if err != int(syscall.EAGAIN) { - return err - } - ts.Sec = 0 - ts.Nsec = (tries + 1) * 1000 * 1000 // Milliseconds. - // inlined this call because it ran out of stack when inlining was disabled - call5(nanosleepABI0, uintptr(unsafe.Pointer(&ts)), 0, 0, 0, 0) - } - return int(syscall.EAGAIN) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go deleted file mode 100644 index c9ff7156a8..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_amd64.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - pthread_attr_init(&attr) - pthread_attr_getstacksize(&attr, &size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -//go:nosplit -func x_cgo_init(g *G, setg uintptr) { - var size size_t - var attr *pthread_attr_t - - /* The memory sanitizer distributed with versions of clang - before 3.8 has a bug: if you call mmap before malloc, mmap - may return an address that is later overwritten by the msan - library. Avoid this problem by forcing a call to malloc - here, before we ever call malloc. - - This is only required for the memory sanitizer, so it's - unfortunate that we always run it. It should be possible - to remove this when we no longer care about versions of - clang before 3.8. The test for this is - misc/cgo/testsanitizers. - - GCC works hard to eliminate a seemingly unnecessary call to - malloc, so we actually use the memory we allocate. */ - - setg_func = setg - attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) - if attr == nil { - println("fakecgo: malloc failed") - abort() - } - pthread_attr_init(attr) - pthread_attr_getstacksize(attr, &size) - // runtime/cgo uses __builtin_frame_address(0) instead of `uintptr(unsafe.Pointer(&size))` - // but this should be OK since we are taking the address of the first variable in this function. - g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 - pthread_attr_destroy(attr) - free(unsafe.Pointer(attr)) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go deleted file mode 100644 index a3b1cca59a..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_linux_arm64.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo - -package fakecgo - -import "unsafe" - -//go:nosplit -func _cgo_sys_thread_start(ts *ThreadStart) { - var attr pthread_attr_t - var ign, oset sigset_t - var p pthread_t - var size size_t - var err int - - //fprintf(stderr, "runtime/cgo: _cgo_sys_thread_start: fn=%p, g=%p\n", ts->fn, ts->g); // debug - sigfillset(&ign) - pthread_sigmask(SIG_SETMASK, &ign, &oset) - - pthread_attr_init(&attr) - pthread_attr_getstacksize(&attr, &size) - // Leave stacklo=0 and set stackhi=size; mstart will do the rest. - ts.g.stackhi = uintptr(size) - - err = _cgo_try_pthread_create(&p, &attr, unsafe.Pointer(threadentry_trampolineABI0), ts) - - pthread_sigmask(SIG_SETMASK, &oset, nil) - - if err != 0 { - print("fakecgo: pthread_create failed: ") - println(err) - abort() - } -} - -// threadentry_trampolineABI0 maps the C ABI to Go ABI then calls the Go function -// -//go:linkname x_threadentry_trampoline threadentry_trampoline -var x_threadentry_trampoline byte -var threadentry_trampolineABI0 = &x_threadentry_trampoline - -//go:nosplit -func threadentry(v unsafe.Pointer) unsafe.Pointer { - ts := *(*ThreadStart)(v) - free(v) - - setg_trampoline(setg_func, uintptr(unsafe.Pointer(ts.g))) - - // faking funcs in go is a bit a... involved - but the following works :) - fn := uintptr(unsafe.Pointer(&ts.fn)) - (*(*func())(unsafe.Pointer(&fn)))() - - return nil -} - -// here we will store a pointer to the provided setg func -var setg_func uintptr - -// x_cgo_init(G *g, void (*setg)(void*)) (runtime/cgo/gcc_linux_amd64.c) -// This get's called during startup, adjusts stacklo, and provides a pointer to setg_gcc for us -// Additionally, if we set _cgo_init to non-null, go won't do it's own TLS setup -// This function can't be go:systemstack since go is not in a state where the systemcheck would work. -// -//go:nosplit -func x_cgo_init(g *G, setg uintptr) { - var size size_t - var attr *pthread_attr_t - - /* The memory sanitizer distributed with versions of clang - before 3.8 has a bug: if you call mmap before malloc, mmap - may return an address that is later overwritten by the msan - library. Avoid this problem by forcing a call to malloc - here, before we ever call malloc. - - This is only required for the memory sanitizer, so it's - unfortunate that we always run it. It should be possible - to remove this when we no longer care about versions of - clang before 3.8. The test for this is - misc/cgo/testsanitizers. - - GCC works hard to eliminate a seemingly unnecessary call to - malloc, so we actually use the memory we allocate. */ - - setg_func = setg - attr = (*pthread_attr_t)(malloc(unsafe.Sizeof(*attr))) - if attr == nil { - println("fakecgo: malloc failed") - abort() - } - pthread_attr_init(attr) - pthread_attr_getstacksize(attr, &size) - g.stacklo = uintptr(unsafe.Pointer(&size)) - uintptr(size) + 4096 - pthread_attr_destroy(attr) - free(unsafe.Pointer(attr)) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go deleted file mode 100644 index e42d84f0b7..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_setenv.go +++ /dev/null @@ -1,18 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -//go:nosplit -//go:norace -func x_cgo_setenv(arg *[2]*byte) { - setenv(arg[0], arg[1], 1) -} - -//go:nosplit -//go:norace -func x_cgo_unsetenv(arg *[1]*byte) { - unsetenv(arg[0]) -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go deleted file mode 100644 index 0ac10d1f15..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/go_util.go +++ /dev/null @@ -1,37 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -import "unsafe" - -// _cgo_thread_start is split into three parts in cgo since only one part is system dependent (keep it here for easier handling) - -// _cgo_thread_start(ThreadStart *arg) (runtime/cgo/gcc_util.c) -// This get's called instead of the go code for creating new threads -// -> pthread_* stuff is used, so threads are setup correctly for C -// If this is missing, TLS is only setup correctly on thread 1! -// This function should be go:systemstack instead of go:nosplit (but that requires runtime) -// -//go:nosplit -//go:norace -func x_cgo_thread_start(arg *ThreadStart) { - var ts *ThreadStart - // Make our own copy that can persist after we return. - // _cgo_tsan_acquire(); - ts = (*ThreadStart)(malloc(unsafe.Sizeof(*ts))) - // _cgo_tsan_release(); - if ts == nil { - println("fakecgo: out of memory in thread_start") - abort() - } - // *ts = *arg would cause a writebarrier so copy using slices - s1 := unsafe.Slice((*uintptr)(unsafe.Pointer(ts)), unsafe.Sizeof(*ts)/8) - s2 := unsafe.Slice((*uintptr)(unsafe.Pointer(arg)), unsafe.Sizeof(*arg)/8) - for i := range s2 { - s1[i] = s2[i] - } - _cgo_sys_thread_start(ts) // OS-dependent half -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go deleted file mode 100644 index 28af41cc64..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/iscgo.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2010 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. - -//go:build !cgo && (darwin || freebsd || linux) - -// The runtime package contains an uninitialized definition -// for runtime·iscgo. Override it to tell the runtime we're here. -// There are various function pointers that should be set too, -// but those depend on dynamic linker magic to get initialized -// correctly, and sometimes they break. This variable is a -// backup: it depends only on old C style static linking rules. - -package fakecgo - -import _ "unsafe" // for go:linkname - -//go:linkname _iscgo runtime.iscgo -var _iscgo bool = true diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go deleted file mode 100644 index 38f9441939..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo.go +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -type ( - size_t uintptr - // Sources: - // Darwin (32 bytes) - https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/_types.h#L74 - // FreeBSD (32 bytes) - https://github.com/DoctorWkt/xv6-freebsd/blob/d2a294c2a984baed27676068b15ed9a29b06ab6f/include/signal.h#L98C9-L98C21 - // Linux (128 bytes) - https://github.com/torvalds/linux/blob/ab75170520d4964f3acf8bb1f91d34cbc650688e/arch/x86/include/asm/signal.h#L25 - sigset_t [128]byte - pthread_attr_t [64]byte - pthread_t int - pthread_key_t uint64 -) - -// for pthread_sigmask: - -type sighow int32 - -const ( - SIG_BLOCK sighow = 0 - SIG_UNBLOCK sighow = 1 - SIG_SETMASK sighow = 2 -) - -type G struct { - stacklo uintptr - stackhi uintptr -} - -type ThreadStart struct { - g *G - tls *uintptr - fn uintptr -} diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go deleted file mode 100644 index af148333f6..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_darwin.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -type ( - pthread_mutex_t struct { - sig int64 - opaque [56]byte - } - pthread_cond_t struct { - sig int64 - opaque [40]byte - } -) - -var ( - PTHREAD_COND_INITIALIZER = pthread_cond_t{sig: 0x3CB0B1BB} - PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{sig: 0x32AAABA7} -) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go deleted file mode 100644 index ca1f722c93..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_freebsd.go +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -type ( - pthread_cond_t uintptr - pthread_mutex_t uintptr -) - -var ( - PTHREAD_COND_INITIALIZER = pthread_cond_t(0) - PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t(0) -) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go deleted file mode 100644 index c4b6e9ea5a..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/libcgo_linux.go +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -type ( - pthread_cond_t [48]byte - pthread_mutex_t [48]byte -) - -var ( - PTHREAD_COND_INITIALIZER = pthread_cond_t{} - PTHREAD_MUTEX_INITIALIZER = pthread_mutex_t{} -) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go deleted file mode 100644 index f30af0e151..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/setenv.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2011 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. - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -import _ "unsafe" // for go:linkname - -//go:linkname x_cgo_setenv_trampoline x_cgo_setenv_trampoline -//go:linkname _cgo_setenv runtime._cgo_setenv -var x_cgo_setenv_trampoline byte -var _cgo_setenv = &x_cgo_setenv_trampoline - -//go:linkname x_cgo_unsetenv_trampoline x_cgo_unsetenv_trampoline -//go:linkname _cgo_unsetenv runtime._cgo_unsetenv -var x_cgo_unsetenv_trampoline byte -var _cgo_unsetenv = &x_cgo_unsetenv_trampoline diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go deleted file mode 100644 index d17942e022..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by 'go generate' with gen.go. DO NOT EDIT. - -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package fakecgo - -import ( - "syscall" - "unsafe" -) - -// setg_trampoline calls setg with the G provided -func setg_trampoline(setg uintptr, G uintptr) - -// call5 takes fn the C function and 5 arguments and calls the function with those arguments -func call5(fn, a1, a2, a3, a4, a5 uintptr) uintptr - -//go:nosplit -func malloc(size uintptr) unsafe.Pointer { - ret := call5(mallocABI0, uintptr(size), 0, 0, 0, 0) - // this indirection is to avoid go vet complaining about possible misuse of unsafe.Pointer - return *(*unsafe.Pointer)(unsafe.Pointer(&ret)) -} - -//go:nosplit -func free(ptr unsafe.Pointer) { - call5(freeABI0, uintptr(ptr), 0, 0, 0, 0) -} - -//go:nosplit -func setenv(name *byte, value *byte, overwrite int32) int32 { - return int32(call5(setenvABI0, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), uintptr(overwrite), 0, 0)) -} - -//go:nosplit -func unsetenv(name *byte) int32 { - return int32(call5(unsetenvABI0, uintptr(unsafe.Pointer(name)), 0, 0, 0, 0)) -} - -//go:nosplit -func sigfillset(set *sigset_t) int32 { - return int32(call5(sigfillsetABI0, uintptr(unsafe.Pointer(set)), 0, 0, 0, 0)) -} - -//go:nosplit -func nanosleep(ts *syscall.Timespec, rem *syscall.Timespec) int32 { - return int32(call5(nanosleepABI0, uintptr(unsafe.Pointer(ts)), uintptr(unsafe.Pointer(rem)), 0, 0, 0)) -} - -//go:nosplit -func abort() { - call5(abortABI0, 0, 0, 0, 0, 0) -} - -//go:nosplit -func pthread_attr_init(attr *pthread_attr_t) int32 { - return int32(call5(pthread_attr_initABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_create(thread *pthread_t, attr *pthread_attr_t, start unsafe.Pointer, arg unsafe.Pointer) int32 { - return int32(call5(pthread_createABI0, uintptr(unsafe.Pointer(thread)), uintptr(unsafe.Pointer(attr)), uintptr(start), uintptr(arg), 0)) -} - -//go:nosplit -func pthread_detach(thread pthread_t) int32 { - return int32(call5(pthread_detachABI0, uintptr(thread), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_sigmask(how sighow, ign *sigset_t, oset *sigset_t) int32 { - return int32(call5(pthread_sigmaskABI0, uintptr(how), uintptr(unsafe.Pointer(ign)), uintptr(unsafe.Pointer(oset)), 0, 0)) -} - -//go:nosplit -func pthread_self() pthread_t { - return pthread_t(call5(pthread_selfABI0, 0, 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_get_stacksize_np(thread pthread_t) size_t { - return size_t(call5(pthread_get_stacksize_npABI0, uintptr(thread), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_attr_getstacksize(attr *pthread_attr_t, stacksize *size_t) int32 { - return int32(call5(pthread_attr_getstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(unsafe.Pointer(stacksize)), 0, 0, 0)) -} - -//go:nosplit -func pthread_attr_setstacksize(attr *pthread_attr_t, size size_t) int32 { - return int32(call5(pthread_attr_setstacksizeABI0, uintptr(unsafe.Pointer(attr)), uintptr(size), 0, 0, 0)) -} - -//go:nosplit -func pthread_attr_destroy(attr *pthread_attr_t) int32 { - return int32(call5(pthread_attr_destroyABI0, uintptr(unsafe.Pointer(attr)), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_mutex_lock(mutex *pthread_mutex_t) int32 { - return int32(call5(pthread_mutex_lockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_mutex_unlock(mutex *pthread_mutex_t) int32 { - return int32(call5(pthread_mutex_unlockABI0, uintptr(unsafe.Pointer(mutex)), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_cond_broadcast(cond *pthread_cond_t) int32 { - return int32(call5(pthread_cond_broadcastABI0, uintptr(unsafe.Pointer(cond)), 0, 0, 0, 0)) -} - -//go:nosplit -func pthread_setspecific(key pthread_key_t, value unsafe.Pointer) int32 { - return int32(call5(pthread_setspecificABI0, uintptr(key), uintptr(value), 0, 0, 0)) -} - -//go:linkname _malloc _malloc -var _malloc uint8 -var mallocABI0 = uintptr(unsafe.Pointer(&_malloc)) - -//go:linkname _free _free -var _free uint8 -var freeABI0 = uintptr(unsafe.Pointer(&_free)) - -//go:linkname _setenv _setenv -var _setenv uint8 -var setenvABI0 = uintptr(unsafe.Pointer(&_setenv)) - -//go:linkname _unsetenv _unsetenv -var _unsetenv uint8 -var unsetenvABI0 = uintptr(unsafe.Pointer(&_unsetenv)) - -//go:linkname _sigfillset _sigfillset -var _sigfillset uint8 -var sigfillsetABI0 = uintptr(unsafe.Pointer(&_sigfillset)) - -//go:linkname _nanosleep _nanosleep -var _nanosleep uint8 -var nanosleepABI0 = uintptr(unsafe.Pointer(&_nanosleep)) - -//go:linkname _abort _abort -var _abort uint8 -var abortABI0 = uintptr(unsafe.Pointer(&_abort)) - -//go:linkname _pthread_attr_init _pthread_attr_init -var _pthread_attr_init uint8 -var pthread_attr_initABI0 = uintptr(unsafe.Pointer(&_pthread_attr_init)) - -//go:linkname _pthread_create _pthread_create -var _pthread_create uint8 -var pthread_createABI0 = uintptr(unsafe.Pointer(&_pthread_create)) - -//go:linkname _pthread_detach _pthread_detach -var _pthread_detach uint8 -var pthread_detachABI0 = uintptr(unsafe.Pointer(&_pthread_detach)) - -//go:linkname _pthread_sigmask _pthread_sigmask -var _pthread_sigmask uint8 -var pthread_sigmaskABI0 = uintptr(unsafe.Pointer(&_pthread_sigmask)) - -//go:linkname _pthread_self _pthread_self -var _pthread_self uint8 -var pthread_selfABI0 = uintptr(unsafe.Pointer(&_pthread_self)) - -//go:linkname _pthread_get_stacksize_np _pthread_get_stacksize_np -var _pthread_get_stacksize_np uint8 -var pthread_get_stacksize_npABI0 = uintptr(unsafe.Pointer(&_pthread_get_stacksize_np)) - -//go:linkname _pthread_attr_getstacksize _pthread_attr_getstacksize -var _pthread_attr_getstacksize uint8 -var pthread_attr_getstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_getstacksize)) - -//go:linkname _pthread_attr_setstacksize _pthread_attr_setstacksize -var _pthread_attr_setstacksize uint8 -var pthread_attr_setstacksizeABI0 = uintptr(unsafe.Pointer(&_pthread_attr_setstacksize)) - -//go:linkname _pthread_attr_destroy _pthread_attr_destroy -var _pthread_attr_destroy uint8 -var pthread_attr_destroyABI0 = uintptr(unsafe.Pointer(&_pthread_attr_destroy)) - -//go:linkname _pthread_mutex_lock _pthread_mutex_lock -var _pthread_mutex_lock uint8 -var pthread_mutex_lockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_lock)) - -//go:linkname _pthread_mutex_unlock _pthread_mutex_unlock -var _pthread_mutex_unlock uint8 -var pthread_mutex_unlockABI0 = uintptr(unsafe.Pointer(&_pthread_mutex_unlock)) - -//go:linkname _pthread_cond_broadcast _pthread_cond_broadcast -var _pthread_cond_broadcast uint8 -var pthread_cond_broadcastABI0 = uintptr(unsafe.Pointer(&_pthread_cond_broadcast)) - -//go:linkname _pthread_setspecific _pthread_setspecific -var _pthread_setspecific uint8 -var pthread_setspecificABI0 = uintptr(unsafe.Pointer(&_pthread_setspecific)) diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go deleted file mode 100644 index 54aaa46285..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_darwin.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by 'go generate' with gen.go. DO NOT EDIT. - -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -//go:cgo_import_dynamic purego_malloc malloc "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_free free "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_setenv setenv "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_unsetenv unsetenv "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_sigfillset sigfillset "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_nanosleep nanosleep "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_abort abort "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_create pthread_create "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_detach pthread_detach "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_self pthread_self "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "/usr/lib/libSystem.B.dylib" -//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "/usr/lib/libSystem.B.dylib" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go deleted file mode 100644 index 8153811979..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_freebsd.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by 'go generate' with gen.go. DO NOT EDIT. - -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -//go:cgo_import_dynamic purego_malloc malloc "libc.so.7" -//go:cgo_import_dynamic purego_free free "libc.so.7" -//go:cgo_import_dynamic purego_setenv setenv "libc.so.7" -//go:cgo_import_dynamic purego_unsetenv unsetenv "libc.so.7" -//go:cgo_import_dynamic purego_sigfillset sigfillset "libc.so.7" -//go:cgo_import_dynamic purego_nanosleep nanosleep "libc.so.7" -//go:cgo_import_dynamic purego_abort abort "libc.so.7" -//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "libpthread.so" -//go:cgo_import_dynamic purego_pthread_create pthread_create "libpthread.so" -//go:cgo_import_dynamic purego_pthread_detach pthread_detach "libpthread.so" -//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "libpthread.so" -//go:cgo_import_dynamic purego_pthread_self pthread_self "libpthread.so" -//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "libpthread.so" -//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "libpthread.so" -//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "libpthread.so" -//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "libpthread.so" -//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "libpthread.so" -//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "libpthread.so" -//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "libpthread.so" -//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "libpthread.so" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go b/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go deleted file mode 100644 index 180057d015..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/symbols_linux.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by 'go generate' with gen.go. DO NOT EDIT. - -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package fakecgo - -//go:cgo_import_dynamic purego_malloc malloc "libc.so.6" -//go:cgo_import_dynamic purego_free free "libc.so.6" -//go:cgo_import_dynamic purego_setenv setenv "libc.so.6" -//go:cgo_import_dynamic purego_unsetenv unsetenv "libc.so.6" -//go:cgo_import_dynamic purego_sigfillset sigfillset "libc.so.6" -//go:cgo_import_dynamic purego_nanosleep nanosleep "libc.so.6" -//go:cgo_import_dynamic purego_abort abort "libc.so.6" -//go:cgo_import_dynamic purego_pthread_attr_init pthread_attr_init "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_create pthread_create "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_detach pthread_detach "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_sigmask pthread_sigmask "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_self pthread_self "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_get_stacksize_np pthread_get_stacksize_np "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_attr_getstacksize pthread_attr_getstacksize "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_attr_setstacksize pthread_attr_setstacksize "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_attr_destroy pthread_attr_destroy "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_mutex_lock pthread_mutex_lock "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_mutex_unlock pthread_mutex_unlock "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_cond_broadcast pthread_cond_broadcast "libpthread.so.0" -//go:cgo_import_dynamic purego_pthread_setspecific pthread_setspecific "libpthread.so.0" diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s deleted file mode 100644 index c9a3cc09eb..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_amd64.s +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || linux || freebsd) - -/* -trampoline for emulating required C functions for cgo in go (see cgo.go) -(we convert cdecl calling convention to go and vice-versa) - -Since we're called from go and call into C we can cheat a bit with the calling conventions: - - in go all the registers are caller saved - - in C we have a couple of callee saved registers - -=> we can use BX, R12, R13, R14, R15 instead of the stack - -C Calling convention cdecl used here (we only need integer args): -1. arg: DI -2. arg: SI -3. arg: DX -4. arg: CX -5. arg: R8 -6. arg: R9 -We don't need floats with these functions -> AX=0 -return value will be in AX -*/ -#include "textflag.h" -#include "go_asm.h" - -// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions. - -TEXT x_cgo_init_trampoline(SB), NOSPLIT, $16 - MOVQ DI, AX - MOVQ SI, BX - MOVQ ·x_cgo_init_call(SB), DX - MOVQ (DX), CX - CALL CX - RET - -TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $8 - MOVQ DI, AX - MOVQ ·x_cgo_thread_start_call(SB), DX - MOVQ (DX), CX - CALL CX - RET - -TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $8 - MOVQ DI, AX - MOVQ ·x_cgo_setenv_call(SB), DX - MOVQ (DX), CX - CALL CX - RET - -TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $8 - MOVQ DI, AX - MOVQ ·x_cgo_unsetenv_call(SB), DX - MOVQ (DX), CX - CALL CX - RET - -TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0 - CALL ·x_cgo_notify_runtime_init_done(SB) - RET - -TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0 - CALL ·x_cgo_bindm(SB) - RET - -// func setg_trampoline(setg uintptr, g uintptr) -TEXT ·setg_trampoline(SB), NOSPLIT, $0-16 - MOVQ G+8(FP), DI - MOVQ setg+0(FP), BX - XORL AX, AX - CALL BX - RET - -TEXT threadentry_trampoline(SB), NOSPLIT, $16 - MOVQ DI, AX - MOVQ ·threadentry_call(SB), DX - MOVQ (DX), CX - CALL CX - RET - -TEXT ·call5(SB), NOSPLIT, $0-56 - MOVQ fn+0(FP), BX - MOVQ a1+8(FP), DI - MOVQ a2+16(FP), SI - MOVQ a3+24(FP), DX - MOVQ a4+32(FP), CX - MOVQ a5+40(FP), R8 - - XORL AX, AX // no floats - - PUSHQ BP // save BP - MOVQ SP, BP // save SP inside BP bc BP is callee-saved - SUBQ $16, SP // allocate space for alignment - ANDQ $-16, SP // align on 16 bytes for SSE - - CALL BX - - MOVQ BP, SP // get SP back - POPQ BP // restore BP - - MOVQ AX, ret+48(FP) - RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s deleted file mode 100644 index 9dbdbc0139..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_arm64.s +++ /dev/null @@ -1,72 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -#include "textflag.h" -#include "go_asm.h" - -// these trampolines map the gcc ABI to Go ABI and then calls into the Go equivalent functions. - -TEXT x_cgo_init_trampoline(SB), NOSPLIT, $0-0 - MOVD R0, 8(RSP) - MOVD R1, 16(RSP) - MOVD ·x_cgo_init_call(SB), R26 - MOVD (R26), R2 - CALL (R2) - RET - -TEXT x_cgo_thread_start_trampoline(SB), NOSPLIT, $0-0 - MOVD R0, 8(RSP) - MOVD ·x_cgo_thread_start_call(SB), R26 - MOVD (R26), R2 - CALL (R2) - RET - -TEXT x_cgo_setenv_trampoline(SB), NOSPLIT, $0-0 - MOVD R0, 8(RSP) - MOVD ·x_cgo_setenv_call(SB), R26 - MOVD (R26), R2 - CALL (R2) - RET - -TEXT x_cgo_unsetenv_trampoline(SB), NOSPLIT, $0-0 - MOVD R0, 8(RSP) - MOVD ·x_cgo_unsetenv_call(SB), R26 - MOVD (R26), R2 - CALL (R2) - RET - -TEXT x_cgo_notify_runtime_init_done_trampoline(SB), NOSPLIT, $0-0 - CALL ·x_cgo_notify_runtime_init_done(SB) - RET - -TEXT x_cgo_bindm_trampoline(SB), NOSPLIT, $0 - CALL ·x_cgo_bindm(SB) - RET - -// func setg_trampoline(setg uintptr, g uintptr) -TEXT ·setg_trampoline(SB), NOSPLIT, $0-16 - MOVD G+8(FP), R0 - MOVD setg+0(FP), R1 - CALL R1 - RET - -TEXT threadentry_trampoline(SB), NOSPLIT, $0-0 - MOVD R0, 8(RSP) - MOVD ·threadentry_call(SB), R26 - MOVD (R26), R2 - CALL (R2) - MOVD $0, R0 // TODO: get the return value from threadentry - RET - -TEXT ·call5(SB), NOSPLIT, $0-0 - MOVD fn+0(FP), R6 - MOVD a1+8(FP), R0 - MOVD a2+16(FP), R1 - MOVD a3+24(FP), R2 - MOVD a4+32(FP), R3 - MOVD a5+40(FP), R4 - CALL R6 - MOVD R0, ret+48(FP) - RET diff --git a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s b/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s deleted file mode 100644 index a65b2012c1..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/fakecgo/trampolines_stubs.s +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by 'go generate' with gen.go. DO NOT EDIT. - -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -#include "textflag.h" - -// these stubs are here because it is not possible to go:linkname directly the C functions on darwin arm64 - -TEXT _malloc(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_malloc(SB) - RET - -TEXT _free(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_free(SB) - RET - -TEXT _setenv(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_setenv(SB) - RET - -TEXT _unsetenv(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_unsetenv(SB) - RET - -TEXT _sigfillset(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_sigfillset(SB) - RET - -TEXT _nanosleep(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_nanosleep(SB) - RET - -TEXT _abort(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_abort(SB) - RET - -TEXT _pthread_attr_init(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_attr_init(SB) - RET - -TEXT _pthread_create(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_create(SB) - RET - -TEXT _pthread_detach(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_detach(SB) - RET - -TEXT _pthread_sigmask(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_sigmask(SB) - RET - -TEXT _pthread_self(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_self(SB) - RET - -TEXT _pthread_get_stacksize_np(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_get_stacksize_np(SB) - RET - -TEXT _pthread_attr_getstacksize(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_attr_getstacksize(SB) - RET - -TEXT _pthread_attr_setstacksize(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_attr_setstacksize(SB) - RET - -TEXT _pthread_attr_destroy(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_attr_destroy(SB) - RET - -TEXT _pthread_mutex_lock(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_mutex_lock(SB) - RET - -TEXT _pthread_mutex_unlock(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_mutex_unlock(SB) - RET - -TEXT _pthread_cond_broadcast(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_cond_broadcast(SB) - RET - -TEXT _pthread_setspecific(SB), NOSPLIT|NOFRAME, $0-0 - JMP purego_pthread_setspecific(SB) - RET diff --git a/vendor/github.com/ebitengine/purego/internal/strings/strings.go b/vendor/github.com/ebitengine/purego/internal/strings/strings.go deleted file mode 100644 index 5b0d252255..0000000000 --- a/vendor/github.com/ebitengine/purego/internal/strings/strings.go +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -package strings - -import ( - "unsafe" -) - -// hasSuffix tests whether the string s ends with suffix. -func hasSuffix(s, suffix string) bool { - return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix -} - -// CString converts a go string to *byte that can be passed to C code. -func CString(name string) *byte { - if hasSuffix(name, "\x00") { - return &(*(*[]byte)(unsafe.Pointer(&name)))[0] - } - b := make([]byte, len(name)+1) - copy(b, name) - return &b[0] -} - -// GoString copies a null-terminated char* to a Go string. -func GoString(c uintptr) string { - // We take the address and then dereference it to trick go vet from creating a possible misuse of unsafe.Pointer - ptr := *(*unsafe.Pointer)(unsafe.Pointer(&c)) - if ptr == nil { - return "" - } - var length int - for { - if *(*byte)(unsafe.Add(ptr, uintptr(length))) == '\x00' { - break - } - length++ - } - return string(unsafe.Slice((*byte)(ptr), length)) -} diff --git a/vendor/github.com/ebitengine/purego/is_ios.go b/vendor/github.com/ebitengine/purego/is_ios.go deleted file mode 100644 index ed31da9782..0000000000 --- a/vendor/github.com/ebitengine/purego/is_ios.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo - -package purego - -// if you are getting this error it means that you have -// CGO_ENABLED=0 while trying to build for ios. -// purego does not support this mode yet. -// the fix is to set CGO_ENABLED=1 which will require -// a C compiler. -var _ = _PUREGO_REQUIRES_CGO_ON_IOS diff --git a/vendor/github.com/ebitengine/purego/nocgo.go b/vendor/github.com/ebitengine/purego/nocgo.go deleted file mode 100644 index 5b989ea814..0000000000 --- a/vendor/github.com/ebitengine/purego/nocgo.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build !cgo && (darwin || freebsd || linux) - -package purego - -// if CGO_ENABLED=0 import fakecgo to setup the Cgo runtime correctly. -// This is required since some frameworks need TLS setup the C way which Go doesn't do. -// We currently don't support ios in fakecgo mode so force Cgo or fail -// -// The way that the Cgo runtime (runtime/cgo) works is by setting some variables found -// in runtime with non-null GCC compiled functions. The variables that are replaced are -// var ( -// iscgo bool // in runtime/cgo.go -// _cgo_init unsafe.Pointer // in runtime/cgo.go -// _cgo_thread_start unsafe.Pointer // in runtime/cgo.go -// _cgo_notify_runtime_init_done unsafe.Pointer // in runtime/cgo.go -// _cgo_setenv unsafe.Pointer // in runtime/env_posix.go -// _cgo_unsetenv unsafe.Pointer // in runtime/env_posix.go -// ) -// importing fakecgo will set these (using //go:linkname) with functions written -// entirely in Go (except for some assembly trampolines to change GCC ABI to Go ABI). -// Doing so makes it possible to build applications that call into C without CGO_ENABLED=1. -import _ "github.com/ebitengine/purego/internal/fakecgo" diff --git a/vendor/github.com/ebitengine/purego/struct_amd64.go b/vendor/github.com/ebitengine/purego/struct_amd64.go deleted file mode 100644 index f3514c984e..0000000000 --- a/vendor/github.com/ebitengine/purego/struct_amd64.go +++ /dev/null @@ -1,260 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -package purego - -import ( - "math" - "reflect" - "unsafe" -) - -func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { - outSize := outType.Size() - switch { - case outSize == 0: - return reflect.New(outType).Elem() - case outSize <= 8: - if isAllFloats(outType) { - // 2 float32s or 1 float64s are return in the float register - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{syscall.f1})).Elem() - } - // up to 8 bytes is returned in RAX - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{syscall.a1})).Elem() - case outSize <= 16: - r1, r2 := syscall.a1, syscall.a2 - if isAllFloats(outType) { - r1 = syscall.f1 - r2 = syscall.f2 - } else { - // check first 8 bytes if it's floats - hasFirstFloat := false - f1 := outType.Field(0).Type - if f1.Kind() == reflect.Float64 || f1.Kind() == reflect.Float32 && outType.Field(1).Type.Kind() == reflect.Float32 { - r1 = syscall.f1 - hasFirstFloat = true - } - - // find index of the field that starts the second 8 bytes - var i int - for i = 0; i < outType.NumField(); i++ { - if outType.Field(i).Offset == 8 { - break - } - } - - // check last 8 bytes if they are floats - f1 = outType.Field(i).Type - if f1.Kind() == reflect.Float64 || f1.Kind() == reflect.Float32 && i+1 == outType.NumField() { - r2 = syscall.f1 - } else if hasFirstFloat { - // if the first field was a float then that means the second integer field - // comes from the first integer register - r2 = syscall.a1 - } - } - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b uintptr }{r1, r2})).Elem() - default: - // create struct from the Go pointer created above - // weird pointer dereference to circumvent go vet - return reflect.NewAt(outType, *(*unsafe.Pointer)(unsafe.Pointer(&syscall.a1))).Elem() - } -} - -func isAllFloats(ty reflect.Type) bool { - for i := 0; i < ty.NumField(); i++ { - f := ty.Field(i) - switch f.Type.Kind() { - case reflect.Float64, reflect.Float32: - default: - return false - } - } - return true -} - -// https://refspecs.linuxbase.org/elf/x86_64-abi-0.99.pdf -// https://gitlab.com/x86-psABIs/x86-64-ABI -// Class determines where the 8 byte value goes. -// Higher value classes win over lower value classes -const ( - _NO_CLASS = 0b0000 - _SSE = 0b0001 - _X87 = 0b0011 // long double not used in Go - _INTEGER = 0b0111 - _MEMORY = 0b1111 -) - -func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { - if v.Type().Size() == 0 { - return keepAlive - } - - // if greater than 64 bytes place on stack - if v.Type().Size() > 8*8 { - placeStack(v, addStack) - return keepAlive - } - var ( - savedNumFloats = *numFloats - savedNumInts = *numInts - savedNumStack = *numStack - ) - placeOnStack := postMerger(v.Type()) || !tryPlaceRegister(v, addFloat, addInt) - if placeOnStack { - // reset any values placed in registers - *numFloats = savedNumFloats - *numInts = savedNumInts - *numStack = savedNumStack - placeStack(v, addStack) - } - return keepAlive -} - -func postMerger(t reflect.Type) (passInMemory bool) { - // (c) If the size of the aggregate exceeds two eightbytes and the first eight- byte isn’t SSE or any other - // eightbyte isn’t SSEUP, the whole argument is passed in memory. - if t.Kind() != reflect.Struct { - return false - } - if t.Size() <= 2*8 { - return false - } - return true // Go does not have an SSE/SEEUP type so this is always true -} - -func tryPlaceRegister(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) (ok bool) { - ok = true - var val uint64 - var shift byte // # of bits to shift - var flushed bool - class := _NO_CLASS - flushIfNeeded := func() { - if flushed { - return - } - flushed = true - if class == _SSE { - addFloat(uintptr(val)) - } else { - addInt(uintptr(val)) - } - val = 0 - shift = 0 - class = _NO_CLASS - } - var place func(v reflect.Value) - place = func(v reflect.Value) { - var numFields int - if v.Kind() == reflect.Struct { - numFields = v.Type().NumField() - } else { - numFields = v.Type().Len() - } - - for i := 0; i < numFields; i++ { - flushed = false - var f reflect.Value - if v.Kind() == reflect.Struct { - f = v.Field(i) - } else { - f = v.Index(i) - } - switch f.Kind() { - case reflect.Struct: - place(f) - case reflect.Bool: - if f.Bool() { - val |= 1 - } - shift += 8 - class |= _INTEGER - case reflect.Pointer: - ok = false - return - case reflect.Int8: - val |= uint64(f.Int()&0xFF) << shift - shift += 8 - class |= _INTEGER - case reflect.Int16: - val |= uint64(f.Int()&0xFFFF) << shift - shift += 16 - class |= _INTEGER - case reflect.Int32: - val |= uint64(f.Int()&0xFFFF_FFFF) << shift - shift += 32 - class |= _INTEGER - case reflect.Int64, reflect.Int: - val = uint64(f.Int()) - shift = 64 - class = _INTEGER - case reflect.Uint8: - val |= f.Uint() << shift - shift += 8 - class |= _INTEGER - case reflect.Uint16: - val |= f.Uint() << shift - shift += 16 - class |= _INTEGER - case reflect.Uint32: - val |= f.Uint() << shift - shift += 32 - class |= _INTEGER - case reflect.Uint64, reflect.Uint: - val = f.Uint() - shift = 64 - class = _INTEGER - case reflect.Float32: - val |= uint64(math.Float32bits(float32(f.Float()))) << shift - shift += 32 - class |= _SSE - case reflect.Float64: - if v.Type().Size() > 16 { - ok = false - return - } - val = uint64(math.Float64bits(f.Float())) - shift = 64 - class = _SSE - case reflect.Array: - place(f) - default: - panic("purego: unsupported kind " + f.Kind().String()) - } - - if shift == 64 { - flushIfNeeded() - } else if shift > 64 { - // Should never happen, but may if we forget to reset shift after flush (or forget to flush), - // better fall apart here, than corrupt arguments. - panic("purego: tryPlaceRegisters shift > 64") - } - } - } - - place(v) - flushIfNeeded() - return ok -} - -func placeStack(v reflect.Value, addStack func(uintptr)) { - for i := 0; i < v.Type().NumField(); i++ { - f := v.Field(i) - switch f.Kind() { - case reflect.Pointer: - addStack(f.Pointer()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - addStack(uintptr(f.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - addStack(uintptr(f.Uint())) - case reflect.Float32: - addStack(uintptr(math.Float32bits(float32(f.Float())))) - case reflect.Float64: - addStack(uintptr(math.Float64bits(f.Float()))) - case reflect.Struct: - placeStack(f, addStack) - default: - panic("purego: unsupported kind " + f.Kind().String()) - } - } -} diff --git a/vendor/github.com/ebitengine/purego/struct_arm64.go b/vendor/github.com/ebitengine/purego/struct_arm64.go deleted file mode 100644 index 11c36bd6e4..0000000000 --- a/vendor/github.com/ebitengine/purego/struct_arm64.go +++ /dev/null @@ -1,274 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -package purego - -import ( - "math" - "reflect" - "unsafe" -) - -func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { - outSize := outType.Size() - switch { - case outSize == 0: - return reflect.New(outType).Elem() - case outSize <= 8: - r1 := syscall.a1 - if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats { - r1 = syscall.f1 - if numFields == 2 { - r1 = syscall.f2<<32 | syscall.f1 - } - } - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a uintptr }{r1})).Elem() - case outSize <= 16: - r1, r2 := syscall.a1, syscall.a2 - if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats { - switch numFields { - case 4: - r1 = syscall.f2<<32 | syscall.f1 - r2 = syscall.f4<<32 | syscall.f3 - case 3: - r1 = syscall.f2<<32 | syscall.f1 - r2 = syscall.f3 - case 2: - r1 = syscall.f1 - r2 = syscall.f2 - default: - panic("unreachable") - } - } - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b uintptr }{r1, r2})).Elem() - default: - if isAllFloats, numFields := isAllSameFloat(outType); isAllFloats && numFields <= 4 { - switch numFields { - case 4: - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b, c, d uintptr }{syscall.f1, syscall.f2, syscall.f3, syscall.f4})).Elem() - case 3: - return reflect.NewAt(outType, unsafe.Pointer(&struct{ a, b, c uintptr }{syscall.f1, syscall.f2, syscall.f3})).Elem() - default: - panic("unreachable") - } - } - // create struct from the Go pointer created in arm64_r8 - // weird pointer dereference to circumvent go vet - return reflect.NewAt(outType, *(*unsafe.Pointer)(unsafe.Pointer(&syscall.arm64_r8))).Elem() - } -} - -// https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst -const ( - _NO_CLASS = 0b00 - _FLOAT = 0b01 - _INT = 0b11 -) - -func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { - if v.Type().Size() == 0 { - return keepAlive - } - - if hva, hfa, size := isHVA(v.Type()), isHFA(v.Type()), v.Type().Size(); hva || hfa || size <= 16 { - // if this doesn't fit entirely in registers then - // each element goes onto the stack - if hfa && *numFloats+v.NumField() > numOfFloats { - *numFloats = numOfFloats - } else if hva && *numInts+v.NumField() > numOfIntegerRegisters() { - *numInts = numOfIntegerRegisters() - } - - placeRegisters(v, addFloat, addInt) - } else { - keepAlive = placeStack(v, keepAlive, addInt) - } - return keepAlive // the struct was allocated so don't panic -} - -func placeRegisters(v reflect.Value, addFloat func(uintptr), addInt func(uintptr)) { - var val uint64 - var shift byte - var flushed bool - class := _NO_CLASS - var place func(v reflect.Value) - place = func(v reflect.Value) { - var numFields int - if v.Kind() == reflect.Struct { - numFields = v.Type().NumField() - } else { - numFields = v.Type().Len() - } - for k := 0; k < numFields; k++ { - flushed = false - var f reflect.Value - if v.Kind() == reflect.Struct { - f = v.Field(k) - } else { - f = v.Index(k) - } - if shift >= 64 { - shift = 0 - flushed = true - if class == _FLOAT { - addFloat(uintptr(val)) - } else { - addInt(uintptr(val)) - } - } - switch f.Type().Kind() { - case reflect.Struct: - place(f) - case reflect.Bool: - if f.Bool() { - val |= 1 - } - shift += 8 - class |= _INT - case reflect.Uint8: - val |= f.Uint() << shift - shift += 8 - class |= _INT - case reflect.Uint16: - val |= f.Uint() << shift - shift += 16 - class |= _INT - case reflect.Uint32: - val |= f.Uint() << shift - shift += 32 - class |= _INT - case reflect.Uint64: - addInt(uintptr(f.Uint())) - shift = 0 - flushed = true - case reflect.Int8: - val |= uint64(f.Int()&0xFF) << shift - shift += 8 - class |= _INT - case reflect.Int16: - val |= uint64(f.Int()&0xFFFF) << shift - shift += 16 - class |= _INT - case reflect.Int32: - val |= uint64(f.Int()&0xFFFF_FFFF) << shift - shift += 32 - class |= _INT - case reflect.Int64: - addInt(uintptr(f.Int())) - shift = 0 - flushed = true - case reflect.Float32: - if class == _FLOAT { - addFloat(uintptr(val)) - val = 0 - shift = 0 - } - val |= uint64(math.Float32bits(float32(f.Float()))) << shift - shift += 32 - class |= _FLOAT - case reflect.Float64: - addFloat(uintptr(math.Float64bits(float64(f.Float())))) - shift = 0 - flushed = true - case reflect.Array: - place(f) - default: - panic("purego: unsupported kind " + f.Kind().String()) - } - } - } - place(v) - if !flushed { - if class == _FLOAT { - addFloat(uintptr(val)) - } else { - addInt(uintptr(val)) - } - } -} - -func placeStack(v reflect.Value, keepAlive []interface{}, addInt func(uintptr)) []interface{} { - // Struct is too big to be placed in registers. - // Copy to heap and place the pointer in register - ptrStruct := reflect.New(v.Type()) - ptrStruct.Elem().Set(v) - ptr := ptrStruct.Elem().Addr().UnsafePointer() - keepAlive = append(keepAlive, ptr) - addInt(uintptr(ptr)) - return keepAlive -} - -// isHFA reports a Homogeneous Floating-point Aggregate (HFA) which is a Fundamental Data Type that is a -// Floating-Point type and at most four uniquely addressable members (5.9.5.1 in [Arm64 Calling Convention]). -// This type of struct will be placed more compactly than the individual fields. -// -// [Arm64 Calling Convention]: https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst -func isHFA(t reflect.Type) bool { - // round up struct size to nearest 8 see section B.4 - structSize := roundUpTo8(t.Size()) - if structSize == 0 || t.NumField() > 4 { - return false - } - first := t.Field(0) - switch first.Type.Kind() { - case reflect.Float32, reflect.Float64: - firstKind := first.Type.Kind() - for i := 0; i < t.NumField(); i++ { - if t.Field(i).Type.Kind() != firstKind { - return false - } - } - return true - case reflect.Array: - switch first.Type.Elem().Kind() { - case reflect.Float32, reflect.Float64: - return true - default: - return false - } - case reflect.Struct: - for i := 0; i < first.Type.NumField(); i++ { - if !isHFA(first.Type) { - return false - } - } - return true - default: - return false - } -} - -// isHVA reports a Homogeneous Aggregate with a Fundamental Data Type that is a Short-Vector type -// and at most four uniquely addressable members (5.9.5.2 in [Arm64 Calling Convention]). -// A short vector is a machine type that is composed of repeated instances of one fundamental integral or -// floating-point type. It may be 8 or 16 bytes in total size (5.4 in [Arm64 Calling Convention]). -// This type of struct will be placed more compactly than the individual fields. -// -// [Arm64 Calling Convention]: https://github.com/ARM-software/abi-aa/blob/main/sysvabi64/sysvabi64.rst -func isHVA(t reflect.Type) bool { - // round up struct size to nearest 8 see section B.4 - structSize := roundUpTo8(t.Size()) - if structSize == 0 || (structSize != 8 && structSize != 16) { - return false - } - first := t.Field(0) - switch first.Type.Kind() { - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Int8, reflect.Int16, reflect.Int32: - firstKind := first.Type.Kind() - for i := 0; i < t.NumField(); i++ { - if t.Field(i).Type.Kind() != firstKind { - return false - } - } - return true - case reflect.Array: - switch first.Type.Elem().Kind() { - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Int8, reflect.Int16, reflect.Int32: - return true - default: - return false - } - default: - return false - } -} diff --git a/vendor/github.com/ebitengine/purego/struct_other.go b/vendor/github.com/ebitengine/purego/struct_other.go deleted file mode 100644 index 9d42adac89..0000000000 --- a/vendor/github.com/ebitengine/purego/struct_other.go +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2024 The Ebitengine Authors - -//go:build !amd64 && !arm64 - -package purego - -import "reflect" - -func addStruct(v reflect.Value, numInts, numFloats, numStack *int, addInt, addFloat, addStack func(uintptr), keepAlive []interface{}) []interface{} { - panic("purego: struct arguments are not supported") -} - -func getStruct(outType reflect.Type, syscall syscall15Args) (v reflect.Value) { - panic("purego: struct returns are not supported") -} diff --git a/vendor/github.com/ebitengine/purego/sys_amd64.s b/vendor/github.com/ebitengine/purego/sys_amd64.s deleted file mode 100644 index cabde1a584..0000000000 --- a/vendor/github.com/ebitengine/purego/sys_amd64.s +++ /dev/null @@ -1,164 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build darwin || freebsd || linux - -#include "textflag.h" -#include "abi_amd64.h" -#include "go_asm.h" -#include "funcdata.h" - -#define STACK_SIZE 80 -#define PTR_ADDRESS (STACK_SIZE - 8) - -// syscall15X calls a function in libc on behalf of the syscall package. -// syscall15X takes a pointer to a struct like: -// struct { -// fn uintptr -// a1 uintptr -// a2 uintptr -// a3 uintptr -// a4 uintptr -// a5 uintptr -// a6 uintptr -// a7 uintptr -// a8 uintptr -// a9 uintptr -// a10 uintptr -// a11 uintptr -// a12 uintptr -// a13 uintptr -// a14 uintptr -// a15 uintptr -// r1 uintptr -// r2 uintptr -// err uintptr -// } -// syscall15X must be called on the g0 stack with the -// C calling convention (use libcCall). -GLOBL ·syscall15XABI0(SB), NOPTR|RODATA, $8 -DATA ·syscall15XABI0(SB)/8, $syscall15X(SB) -TEXT syscall15X(SB), NOSPLIT|NOFRAME, $0 - PUSHQ BP - MOVQ SP, BP - SUBQ $STACK_SIZE, SP - MOVQ DI, PTR_ADDRESS(BP) // save the pointer - MOVQ DI, R11 - - MOVQ syscall15Args_f1(R11), X0 // f1 - MOVQ syscall15Args_f2(R11), X1 // f2 - MOVQ syscall15Args_f3(R11), X2 // f3 - MOVQ syscall15Args_f4(R11), X3 // f4 - MOVQ syscall15Args_f5(R11), X4 // f5 - MOVQ syscall15Args_f6(R11), X5 // f6 - MOVQ syscall15Args_f7(R11), X6 // f7 - MOVQ syscall15Args_f8(R11), X7 // f8 - - MOVQ syscall15Args_a1(R11), DI // a1 - MOVQ syscall15Args_a2(R11), SI // a2 - MOVQ syscall15Args_a3(R11), DX // a3 - MOVQ syscall15Args_a4(R11), CX // a4 - MOVQ syscall15Args_a5(R11), R8 // a5 - MOVQ syscall15Args_a6(R11), R9 // a6 - - // push the remaining paramters onto the stack - MOVQ syscall15Args_a7(R11), R12 - MOVQ R12, 0(SP) // push a7 - MOVQ syscall15Args_a8(R11), R12 - MOVQ R12, 8(SP) // push a8 - MOVQ syscall15Args_a9(R11), R12 - MOVQ R12, 16(SP) // push a9 - MOVQ syscall15Args_a10(R11), R12 - MOVQ R12, 24(SP) // push a10 - MOVQ syscall15Args_a11(R11), R12 - MOVQ R12, 32(SP) // push a11 - MOVQ syscall15Args_a12(R11), R12 - MOVQ R12, 40(SP) // push a12 - MOVQ syscall15Args_a13(R11), R12 - MOVQ R12, 48(SP) // push a13 - MOVQ syscall15Args_a14(R11), R12 - MOVQ R12, 56(SP) // push a14 - MOVQ syscall15Args_a15(R11), R12 - MOVQ R12, 64(SP) // push a15 - XORL AX, AX // vararg: say "no float args" - - MOVQ syscall15Args_fn(R11), R10 // fn - CALL R10 - - MOVQ PTR_ADDRESS(BP), DI // get the pointer back - MOVQ AX, syscall15Args_a1(DI) // r1 - MOVQ DX, syscall15Args_a2(DI) // r3 - MOVQ X0, syscall15Args_f1(DI) // f1 - MOVQ X1, syscall15Args_f2(DI) // f2 - - XORL AX, AX // no error (it's ignored anyway) - ADDQ $STACK_SIZE, SP - MOVQ BP, SP - POPQ BP - RET - -TEXT callbackasm1(SB), NOSPLIT|NOFRAME, $0 - MOVQ 0(SP), AX // save the return address to calculate the cb index - MOVQ 8(SP), R10 // get the return SP so that we can align register args with stack args - ADDQ $8, SP // remove return address from stack, we are not returning to callbackasm, but to its caller. - - // make space for first six int and 8 float arguments below the frame - ADJSP $14*8, SP - MOVSD X0, (1*8)(SP) - MOVSD X1, (2*8)(SP) - MOVSD X2, (3*8)(SP) - MOVSD X3, (4*8)(SP) - MOVSD X4, (5*8)(SP) - MOVSD X5, (6*8)(SP) - MOVSD X6, (7*8)(SP) - MOVSD X7, (8*8)(SP) - MOVQ DI, (9*8)(SP) - MOVQ SI, (10*8)(SP) - MOVQ DX, (11*8)(SP) - MOVQ CX, (12*8)(SP) - MOVQ R8, (13*8)(SP) - MOVQ R9, (14*8)(SP) - LEAQ 8(SP), R8 // R8 = address of args vector - - PUSHQ R10 // push the stack pointer below registers - - // Switch from the host ABI to the Go ABI. - PUSH_REGS_HOST_TO_ABI0() - - // determine index into runtime·cbs table - MOVQ $callbackasm(SB), DX - SUBQ DX, AX - MOVQ $0, DX - MOVQ $5, CX // divide by 5 because each call instruction in ·callbacks is 5 bytes long - DIVL CX - SUBQ $1, AX // subtract 1 because return PC is to the next slot - - // Create a struct callbackArgs on our stack to be passed as - // the "frame" to cgocallback and on to callbackWrap. - // $24 to make enough room for the arguments to runtime.cgocallback - SUBQ $(24+callbackArgs__size), SP - MOVQ AX, (24+callbackArgs_index)(SP) // callback index - MOVQ R8, (24+callbackArgs_args)(SP) // address of args vector - MOVQ $0, (24+callbackArgs_result)(SP) // result - LEAQ 24(SP), AX // take the address of callbackArgs - - // Call cgocallback, which will call callbackWrap(frame). - MOVQ ·callbackWrap_call(SB), DI // Get the ABIInternal function pointer - MOVQ (DI), DI // without by using a closure. - MOVQ AX, SI // frame (address of callbackArgs) - MOVQ $0, CX // context - - CALL crosscall2(SB) // runtime.cgocallback(fn, frame, ctxt uintptr) - - // Get callback result. - MOVQ (24+callbackArgs_result)(SP), AX - ADDQ $(24+callbackArgs__size), SP // remove callbackArgs struct - - POP_REGS_HOST_TO_ABI0() - - POPQ R10 // get the SP back - ADJSP $-14*8, SP // remove arguments - - MOVQ R10, 0(SP) - - RET diff --git a/vendor/github.com/ebitengine/purego/sys_arm64.s b/vendor/github.com/ebitengine/purego/sys_arm64.s deleted file mode 100644 index a68fdb99ba..0000000000 --- a/vendor/github.com/ebitengine/purego/sys_arm64.s +++ /dev/null @@ -1,92 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build darwin || freebsd || linux || windows - -#include "textflag.h" -#include "go_asm.h" -#include "funcdata.h" - -#define STACK_SIZE 64 -#define PTR_ADDRESS (STACK_SIZE - 8) - -// syscall15X calls a function in libc on behalf of the syscall package. -// syscall15X takes a pointer to a struct like: -// struct { -// fn uintptr -// a1 uintptr -// a2 uintptr -// a3 uintptr -// a4 uintptr -// a5 uintptr -// a6 uintptr -// a7 uintptr -// a8 uintptr -// a9 uintptr -// a10 uintptr -// a11 uintptr -// a12 uintptr -// a13 uintptr -// a14 uintptr -// a15 uintptr -// r1 uintptr -// r2 uintptr -// err uintptr -// } -// syscall15X must be called on the g0 stack with the -// C calling convention (use libcCall). -GLOBL ·syscall15XABI0(SB), NOPTR|RODATA, $8 -DATA ·syscall15XABI0(SB)/8, $syscall15X(SB) -TEXT syscall15X(SB), NOSPLIT, $0 - SUB $STACK_SIZE, RSP // push structure pointer - MOVD R0, PTR_ADDRESS(RSP) - MOVD R0, R9 - - FMOVD syscall15Args_f1(R9), F0 // f1 - FMOVD syscall15Args_f2(R9), F1 // f2 - FMOVD syscall15Args_f3(R9), F2 // f3 - FMOVD syscall15Args_f4(R9), F3 // f4 - FMOVD syscall15Args_f5(R9), F4 // f5 - FMOVD syscall15Args_f6(R9), F5 // f6 - FMOVD syscall15Args_f7(R9), F6 // f7 - FMOVD syscall15Args_f8(R9), F7 // f8 - - MOVD syscall15Args_a1(R9), R0 // a1 - MOVD syscall15Args_a2(R9), R1 // a2 - MOVD syscall15Args_a3(R9), R2 // a3 - MOVD syscall15Args_a4(R9), R3 // a4 - MOVD syscall15Args_a5(R9), R4 // a5 - MOVD syscall15Args_a6(R9), R5 // a6 - MOVD syscall15Args_a7(R9), R6 // a7 - MOVD syscall15Args_a8(R9), R7 // a8 - MOVD syscall15Args_arm64_r8(R9), R8 // r8 - - MOVD syscall15Args_a9(R9), R10 - MOVD R10, 0(RSP) // push a9 onto stack - MOVD syscall15Args_a10(R9), R10 - MOVD R10, 8(RSP) // push a10 onto stack - MOVD syscall15Args_a11(R9), R10 - MOVD R10, 16(RSP) // push a11 onto stack - MOVD syscall15Args_a12(R9), R10 - MOVD R10, 24(RSP) // push a12 onto stack - MOVD syscall15Args_a13(R9), R10 - MOVD R10, 32(RSP) // push a13 onto stack - MOVD syscall15Args_a14(R9), R10 - MOVD R10, 40(RSP) // push a14 onto stack - MOVD syscall15Args_a15(R9), R10 - MOVD R10, 48(RSP) // push a15 onto stack - - MOVD syscall15Args_fn(R9), R10 // fn - BL (R10) - - MOVD PTR_ADDRESS(RSP), R2 // pop structure pointer - ADD $STACK_SIZE, RSP - - MOVD R0, syscall15Args_a1(R2) // save r1 - MOVD R1, syscall15Args_a2(R2) // save r3 - FMOVD F0, syscall15Args_f1(R2) // save f0 - FMOVD F1, syscall15Args_f2(R2) // save f1 - FMOVD F2, syscall15Args_f3(R2) // save f2 - FMOVD F3, syscall15Args_f4(R2) // save f3 - - RET diff --git a/vendor/github.com/ebitengine/purego/sys_unix_arm64.s b/vendor/github.com/ebitengine/purego/sys_unix_arm64.s deleted file mode 100644 index 6da06b4d18..0000000000 --- a/vendor/github.com/ebitengine/purego/sys_unix_arm64.s +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2023 The Ebitengine Authors - -//go:build darwin || freebsd || linux - -#include "textflag.h" -#include "go_asm.h" -#include "funcdata.h" -#include "abi_arm64.h" - -TEXT callbackasm1(SB), NOSPLIT|NOFRAME, $0 - NO_LOCAL_POINTERS - - // On entry, the trampoline in zcallback_darwin_arm64.s left - // the callback index in R12 (which is volatile in the C ABI). - - // Save callback register arguments R0-R7 and F0-F7. - // We do this at the top of the frame so they're contiguous with stack arguments. - SUB $(16*8), RSP, R14 - FSTPD (F0, F1), (0*8)(R14) - FSTPD (F2, F3), (2*8)(R14) - FSTPD (F4, F5), (4*8)(R14) - FSTPD (F6, F7), (6*8)(R14) - STP (R0, R1), (8*8)(R14) - STP (R2, R3), (10*8)(R14) - STP (R4, R5), (12*8)(R14) - STP (R6, R7), (14*8)(R14) - - // Adjust SP by frame size. - SUB $(26*8), RSP - - // It is important to save R27 because the go assembler - // uses it for move instructions for a variable. - // This line: - // MOVD ·callbackWrap_call(SB), R0 - // Creates the instructions: - // ADRP 14335(PC), R27 - // MOVD 388(27), R0 - // R27 is a callee saved register so we are responsible - // for ensuring its value doesn't change. So save it and - // restore it at the end of this function. - // R30 is the link register. crosscall2 doesn't save it - // so it's saved here. - STP (R27, R30), 0(RSP) - - // Create a struct callbackArgs on our stack. - MOVD $(callbackArgs__size)(RSP), R13 - MOVD R12, callbackArgs_index(R13) // callback index - MOVD R14, callbackArgs_args(R13) // address of args vector - MOVD ZR, callbackArgs_result(R13) // result - - // Move parameters into registers - // Get the ABIInternal function pointer - // without by using a closure. - MOVD ·callbackWrap_call(SB), R0 - MOVD (R0), R0 // fn unsafe.Pointer - MOVD R13, R1 // frame (&callbackArgs{...}) - MOVD $0, R3 // ctxt uintptr - - BL crosscall2(SB) - - // Get callback result. - MOVD $(callbackArgs__size)(RSP), R13 - MOVD callbackArgs_result(R13), R0 - - // Restore LR and R27 - LDP 0(RSP), (R27, R30) - ADD $(26*8), RSP - - RET diff --git a/vendor/github.com/ebitengine/purego/syscall.go b/vendor/github.com/ebitengine/purego/syscall.go deleted file mode 100644 index c30688dda1..0000000000 --- a/vendor/github.com/ebitengine/purego/syscall.go +++ /dev/null @@ -1,53 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build darwin || freebsd || linux || windows - -package purego - -// CDecl marks a function as being called using the __cdecl calling convention as defined in -// the [MSDocs] when passed to NewCallback. It must be the first argument to the function. -// This is only useful on 386 Windows, but it is safe to use on other platforms. -// -// [MSDocs]: https://learn.microsoft.com/en-us/cpp/cpp/cdecl?view=msvc-170 -type CDecl struct{} - -const ( - maxArgs = 15 - numOfFloats = 8 // arm64 and amd64 both have 8 float registers -) - -type syscall15Args struct { - fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr - f1, f2, f3, f4, f5, f6, f7, f8 uintptr - arm64_r8 uintptr -} - -// SyscallN takes fn, a C function pointer and a list of arguments as uintptr. -// There is an internal maximum number of arguments that SyscallN can take. It panics -// when the maximum is exceeded. It returns the result and the libc error code if there is one. -// -// NOTE: SyscallN does not properly call functions that have both integer and float parameters. -// See discussion comment https://github.com/ebiten/purego/pull/1#issuecomment-1128057607 -// for an explanation of why that is. -// -// On amd64, if there are more than 8 floats the 9th and so on will be placed incorrectly on the -// stack. -// -// The pragma go:nosplit is not needed at this function declaration because it uses go:uintptrescapes -// which forces all the objects that the uintptrs point to onto the heap where a stack split won't affect -// their memory location. -// -//go:uintptrescapes -func SyscallN(fn uintptr, args ...uintptr) (r1, r2, err uintptr) { - if fn == 0 { - panic("purego: fn is nil") - } - if len(args) > maxArgs { - panic("purego: too many arguments to SyscallN") - } - // add padding so there is no out-of-bounds slicing - var tmp [maxArgs]uintptr - copy(tmp[:], args) - return syscall_syscall15X(fn, tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5], tmp[6], tmp[7], tmp[8], tmp[9], tmp[10], tmp[11], tmp[12], tmp[13], tmp[14]) -} diff --git a/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go b/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go deleted file mode 100644 index 36ee14e3b7..0000000000 --- a/vendor/github.com/ebitengine/purego/syscall_cgo_linux.go +++ /dev/null @@ -1,21 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build cgo && !(amd64 || arm64) - -package purego - -import ( - "github.com/ebitengine/purego/internal/cgo" -) - -var syscall15XABI0 = uintptr(cgo.Syscall15XABI0) - -//go:nosplit -func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { - return cgo.Syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) -} - -func NewCallback(_ interface{}) uintptr { - panic("purego: NewCallback on Linux is only supported on amd64/arm64") -} diff --git a/vendor/github.com/ebitengine/purego/syscall_sysv.go b/vendor/github.com/ebitengine/purego/syscall_sysv.go deleted file mode 100644 index cce171c8f6..0000000000 --- a/vendor/github.com/ebitengine/purego/syscall_sysv.go +++ /dev/null @@ -1,223 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -//go:build darwin || freebsd || (linux && (amd64 || arm64)) - -package purego - -import ( - "reflect" - "runtime" - "sync" - "unsafe" -) - -var syscall15XABI0 uintptr - -//go:nosplit -func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { - args := syscall15Args{ - fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, - a1, a2, a3, a4, a5, a6, a7, a8, - 0, - } - runtime_cgocall(syscall15XABI0, unsafe.Pointer(&args)) - return args.a1, args.a2, 0 -} - -// NewCallback converts a Go function to a function pointer conforming to the C calling convention. -// This is useful when interoperating with C code requiring callbacks. The argument is expected to be a -// function with zero or one uintptr-sized result. The function must not have arguments with size larger than the size -// of uintptr. Only a limited number of callbacks may be created in a single Go process, and any memory allocated -// for these callbacks is never released. At least 2000 callbacks can always be created. Although this function -// provides similar functionality to windows.NewCallback it is distinct. -func NewCallback(fn interface{}) uintptr { - ty := reflect.TypeOf(fn) - for i := 0; i < ty.NumIn(); i++ { - in := ty.In(i) - if !in.AssignableTo(reflect.TypeOf(CDecl{})) { - continue - } - if i != 0 { - panic("purego: CDecl must be the first argument") - } - } - return compileCallback(fn) -} - -// maxCb is the maximum number of callbacks -// only increase this if you have added more to the callbackasm function -const maxCB = 2000 - -var cbs struct { - lock sync.Mutex - numFn int // the number of functions currently in cbs.funcs - funcs [maxCB]reflect.Value // the saved callbacks -} - -type callbackArgs struct { - index uintptr - // args points to the argument block. - // - // The structure of the arguments goes - // float registers followed by the - // integer registers followed by the stack. - // - // This variable is treated as a continuous - // block of memory containing all of the arguments - // for this callback. - args unsafe.Pointer - // Below are out-args from callbackWrap - result uintptr -} - -func compileCallback(fn interface{}) uintptr { - val := reflect.ValueOf(fn) - if val.Kind() != reflect.Func { - panic("purego: the type must be a function but was not") - } - if val.IsNil() { - panic("purego: function must not be nil") - } - ty := val.Type() - for i := 0; i < ty.NumIn(); i++ { - in := ty.In(i) - switch in.Kind() { - case reflect.Struct: - if i == 0 && in.AssignableTo(reflect.TypeOf(CDecl{})) { - continue - } - fallthrough - case reflect.Interface, reflect.Func, reflect.Slice, - reflect.Chan, reflect.Complex64, reflect.Complex128, - reflect.String, reflect.Map, reflect.Invalid: - panic("purego: unsupported argument type: " + in.Kind().String()) - } - } -output: - switch { - case ty.NumOut() == 1: - switch ty.Out(0).Kind() { - case reflect.Pointer, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, - reflect.Bool, reflect.UnsafePointer: - break output - } - panic("purego: unsupported return type: " + ty.String()) - case ty.NumOut() > 1: - panic("purego: callbacks can only have one return") - } - cbs.lock.Lock() - defer cbs.lock.Unlock() - if cbs.numFn >= maxCB { - panic("purego: the maximum number of callbacks has been reached") - } - cbs.funcs[cbs.numFn] = val - cbs.numFn++ - return callbackasmAddr(cbs.numFn - 1) -} - -const ptrSize = unsafe.Sizeof((*int)(nil)) - -const callbackMaxFrame = 64 * ptrSize - -// callbackasm is implemented in zcallback_GOOS_GOARCH.s -// -//go:linkname __callbackasm callbackasm -var __callbackasm byte -var callbackasmABI0 = uintptr(unsafe.Pointer(&__callbackasm)) - -// callbackWrap_call allows the calling of the ABIInternal wrapper -// which is required for runtime.cgocallback without the -// tag which is only allowed in the runtime. -// This closure is used inside sys_darwin_GOARCH.s -var callbackWrap_call = callbackWrap - -// callbackWrap is called by assembly code which determines which Go function to call. -// This function takes the arguments and passes them to the Go function and returns the result. -func callbackWrap(a *callbackArgs) { - cbs.lock.Lock() - fn := cbs.funcs[a.index] - cbs.lock.Unlock() - fnType := fn.Type() - args := make([]reflect.Value, fnType.NumIn()) - frame := (*[callbackMaxFrame]uintptr)(a.args) - var floatsN int // floatsN represents the number of float arguments processed - var intsN int // intsN represents the number of integer arguments processed - // stack points to the index into frame of the current stack element. - // The stack begins after the float and integer registers. - stack := numOfIntegerRegisters() + numOfFloats - for i := range args { - var pos int - switch fnType.In(i).Kind() { - case reflect.Float32, reflect.Float64: - if floatsN >= numOfFloats { - pos = stack - stack++ - } else { - pos = floatsN - } - floatsN++ - case reflect.Struct: - // This is the CDecl field - args[i] = reflect.Zero(fnType.In(i)) - continue - default: - - if intsN >= numOfIntegerRegisters() { - pos = stack - stack++ - } else { - // the integers begin after the floats in frame - pos = intsN + numOfFloats - } - intsN++ - } - args[i] = reflect.NewAt(fnType.In(i), unsafe.Pointer(&frame[pos])).Elem() - } - ret := fn.Call(args) - if len(ret) > 0 { - switch k := ret[0].Kind(); k { - case reflect.Uint, reflect.Uint64, reflect.Uint32, reflect.Uint16, reflect.Uint8, reflect.Uintptr: - a.result = uintptr(ret[0].Uint()) - case reflect.Int, reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8: - a.result = uintptr(ret[0].Int()) - case reflect.Bool: - if ret[0].Bool() { - a.result = 1 - } else { - a.result = 0 - } - case reflect.Pointer: - a.result = ret[0].Pointer() - case reflect.UnsafePointer: - a.result = ret[0].Pointer() - default: - panic("purego: unsupported kind: " + k.String()) - } - } -} - -// callbackasmAddr returns address of runtime.callbackasm -// function adjusted by i. -// On x86 and amd64, runtime.callbackasm is a series of CALL instructions, -// and we want callback to arrive at -// correspondent call instruction instead of start of -// runtime.callbackasm. -// On ARM, runtime.callbackasm is a series of mov and branch instructions. -// R12 is loaded with the callback index. Each entry is two instructions, -// hence 8 bytes. -func callbackasmAddr(i int) uintptr { - var entrySize int - switch runtime.GOARCH { - default: - panic("purego: unsupported architecture") - case "386", "amd64": - entrySize = 5 - case "arm", "arm64": - // On ARM and ARM64, each entry is a MOV instruction - // followed by a branch instruction - entrySize = 8 - } - return callbackasmABI0 + uintptr(i*entrySize) -} diff --git a/vendor/github.com/ebitengine/purego/syscall_windows.go b/vendor/github.com/ebitengine/purego/syscall_windows.go deleted file mode 100644 index 5fbfcabfdc..0000000000 --- a/vendor/github.com/ebitengine/purego/syscall_windows.go +++ /dev/null @@ -1,46 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// SPDX-FileCopyrightText: 2022 The Ebitengine Authors - -package purego - -import ( - "reflect" - "syscall" -) - -var syscall15XABI0 uintptr - -func syscall_syscall15X(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15 uintptr) (r1, r2, err uintptr) { - r1, r2, errno := syscall.Syscall15(fn, 15, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15) - return r1, r2, uintptr(errno) -} - -// NewCallback converts a Go function to a function pointer conforming to the stdcall calling convention. -// This is useful when interoperating with Windows code requiring callbacks. The argument is expected to be a -// function with one uintptr-sized result. The function must not have arguments with size larger than the -// size of uintptr. Only a limited number of callbacks may be created in a single Go process, and any memory -// allocated for these callbacks is never released. Between NewCallback and NewCallbackCDecl, at least 1024 -// callbacks can always be created. Although this function is similiar to the darwin version it may act -// differently. -func NewCallback(fn interface{}) uintptr { - isCDecl := false - ty := reflect.TypeOf(fn) - for i := 0; i < ty.NumIn(); i++ { - in := ty.In(i) - if !in.AssignableTo(reflect.TypeOf(CDecl{})) { - continue - } - if i != 0 { - panic("purego: CDecl must be the first argument") - } - isCDecl = true - } - if isCDecl { - return syscall.NewCallbackCDecl(fn) - } - return syscall.NewCallback(fn) -} - -func loadSymbol(handle uintptr, name string) (uintptr, error) { - return syscall.GetProcAddress(syscall.Handle(handle), name) -} diff --git a/vendor/github.com/ebitengine/purego/zcallback_amd64.s b/vendor/github.com/ebitengine/purego/zcallback_amd64.s deleted file mode 100644 index 6a778bfcad..0000000000 --- a/vendor/github.com/ebitengine/purego/zcallback_amd64.s +++ /dev/null @@ -1,2014 +0,0 @@ -// Code generated by wincallback.go using 'go generate'. DO NOT EDIT. - -//go:build darwin || freebsd || linux - -// runtime·callbackasm is called by external code to -// execute Go implemented callback function. It is not -// called from the start, instead runtime·compilecallback -// always returns address into runtime·callbackasm offset -// appropriately so different callbacks start with different -// CALL instruction in runtime·callbackasm. This determines -// which Go callback function is executed later on. -#include "textflag.h" - -TEXT callbackasm(SB), NOSPLIT|NOFRAME, $0 - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) - CALL callbackasm1(SB) diff --git a/vendor/github.com/ebitengine/purego/zcallback_arm64.s b/vendor/github.com/ebitengine/purego/zcallback_arm64.s deleted file mode 100644 index c079b8038e..0000000000 --- a/vendor/github.com/ebitengine/purego/zcallback_arm64.s +++ /dev/null @@ -1,4014 +0,0 @@ -// Code generated by wincallback.go using 'go generate'. DO NOT EDIT. - -//go:build darwin || freebsd || linux - -// External code calls into callbackasm at an offset corresponding -// to the callback index. Callbackasm is a table of MOV and B instructions. -// The MOV instruction loads R12 with the callback index, and the -// B instruction branches to callbackasm1. -// callbackasm1 takes the callback index from R12 and -// indexes into an array that stores information about each callback. -// It then calls the Go implementation for that callback. -#include "textflag.h" - -TEXT callbackasm(SB), NOSPLIT|NOFRAME, $0 - MOVD $0, R12 - B callbackasm1(SB) - MOVD $1, R12 - B callbackasm1(SB) - MOVD $2, R12 - B callbackasm1(SB) - MOVD $3, R12 - B callbackasm1(SB) - MOVD $4, R12 - B callbackasm1(SB) - MOVD $5, R12 - B callbackasm1(SB) - MOVD $6, R12 - B callbackasm1(SB) - MOVD $7, R12 - B callbackasm1(SB) - MOVD $8, R12 - B callbackasm1(SB) - MOVD $9, R12 - B callbackasm1(SB) - MOVD $10, R12 - B callbackasm1(SB) - MOVD $11, R12 - B callbackasm1(SB) - MOVD $12, R12 - B callbackasm1(SB) - MOVD $13, R12 - B callbackasm1(SB) - MOVD $14, R12 - B callbackasm1(SB) - MOVD $15, R12 - B callbackasm1(SB) - MOVD $16, R12 - B callbackasm1(SB) - MOVD $17, R12 - B callbackasm1(SB) - MOVD $18, R12 - B callbackasm1(SB) - MOVD $19, R12 - B callbackasm1(SB) - MOVD $20, R12 - B callbackasm1(SB) - MOVD $21, R12 - B callbackasm1(SB) - MOVD $22, R12 - B callbackasm1(SB) - MOVD $23, R12 - B callbackasm1(SB) - MOVD $24, R12 - B callbackasm1(SB) - MOVD $25, R12 - B callbackasm1(SB) - MOVD $26, R12 - B callbackasm1(SB) - MOVD $27, R12 - B callbackasm1(SB) - MOVD $28, R12 - B callbackasm1(SB) - MOVD $29, R12 - B callbackasm1(SB) - MOVD $30, R12 - B callbackasm1(SB) - MOVD $31, R12 - B callbackasm1(SB) - MOVD $32, R12 - B callbackasm1(SB) - MOVD $33, R12 - B callbackasm1(SB) - MOVD $34, R12 - B callbackasm1(SB) - MOVD $35, R12 - B callbackasm1(SB) - MOVD $36, R12 - B callbackasm1(SB) - MOVD $37, R12 - B callbackasm1(SB) - MOVD $38, R12 - B callbackasm1(SB) - MOVD $39, R12 - B callbackasm1(SB) - MOVD $40, R12 - B callbackasm1(SB) - MOVD $41, R12 - B callbackasm1(SB) - MOVD $42, R12 - B callbackasm1(SB) - MOVD $43, R12 - B callbackasm1(SB) - MOVD $44, R12 - B callbackasm1(SB) - MOVD $45, R12 - B callbackasm1(SB) - MOVD $46, R12 - B callbackasm1(SB) - MOVD $47, R12 - B callbackasm1(SB) - MOVD $48, R12 - B callbackasm1(SB) - MOVD $49, R12 - B callbackasm1(SB) - MOVD $50, R12 - B callbackasm1(SB) - MOVD $51, R12 - B callbackasm1(SB) - MOVD $52, R12 - B callbackasm1(SB) - MOVD $53, R12 - B callbackasm1(SB) - MOVD $54, R12 - B callbackasm1(SB) - MOVD $55, R12 - B callbackasm1(SB) - MOVD $56, R12 - B callbackasm1(SB) - MOVD $57, R12 - B callbackasm1(SB) - MOVD $58, R12 - B callbackasm1(SB) - MOVD $59, R12 - B callbackasm1(SB) - MOVD $60, R12 - B callbackasm1(SB) - MOVD $61, R12 - B callbackasm1(SB) - MOVD $62, R12 - B callbackasm1(SB) - MOVD $63, R12 - B callbackasm1(SB) - MOVD $64, R12 - B callbackasm1(SB) - MOVD $65, R12 - B callbackasm1(SB) - MOVD $66, R12 - B callbackasm1(SB) - MOVD $67, R12 - B callbackasm1(SB) - MOVD $68, R12 - B callbackasm1(SB) - MOVD $69, R12 - B callbackasm1(SB) - MOVD $70, R12 - B callbackasm1(SB) - MOVD $71, R12 - B callbackasm1(SB) - MOVD $72, R12 - B callbackasm1(SB) - MOVD $73, R12 - B callbackasm1(SB) - MOVD $74, R12 - B callbackasm1(SB) - MOVD $75, R12 - B callbackasm1(SB) - MOVD $76, R12 - B callbackasm1(SB) - MOVD $77, R12 - B callbackasm1(SB) - MOVD $78, R12 - B callbackasm1(SB) - MOVD $79, R12 - B callbackasm1(SB) - MOVD $80, R12 - B callbackasm1(SB) - MOVD $81, R12 - B callbackasm1(SB) - MOVD $82, R12 - B callbackasm1(SB) - MOVD $83, R12 - B callbackasm1(SB) - MOVD $84, R12 - B callbackasm1(SB) - MOVD $85, R12 - B callbackasm1(SB) - MOVD $86, R12 - B callbackasm1(SB) - MOVD $87, R12 - B callbackasm1(SB) - MOVD $88, R12 - B callbackasm1(SB) - MOVD $89, R12 - B callbackasm1(SB) - MOVD $90, R12 - B callbackasm1(SB) - MOVD $91, R12 - B callbackasm1(SB) - MOVD $92, R12 - B callbackasm1(SB) - MOVD $93, R12 - B callbackasm1(SB) - MOVD $94, R12 - B callbackasm1(SB) - MOVD $95, R12 - B callbackasm1(SB) - MOVD $96, R12 - B callbackasm1(SB) - MOVD $97, R12 - B callbackasm1(SB) - MOVD $98, R12 - B callbackasm1(SB) - MOVD $99, R12 - B callbackasm1(SB) - MOVD $100, R12 - B callbackasm1(SB) - MOVD $101, R12 - B callbackasm1(SB) - MOVD $102, R12 - B callbackasm1(SB) - MOVD $103, R12 - B callbackasm1(SB) - MOVD $104, R12 - B callbackasm1(SB) - MOVD $105, R12 - B callbackasm1(SB) - MOVD $106, R12 - B callbackasm1(SB) - MOVD $107, R12 - B callbackasm1(SB) - MOVD $108, R12 - B callbackasm1(SB) - MOVD $109, R12 - B callbackasm1(SB) - MOVD $110, R12 - B callbackasm1(SB) - MOVD $111, R12 - B callbackasm1(SB) - MOVD $112, R12 - B callbackasm1(SB) - MOVD $113, R12 - B callbackasm1(SB) - MOVD $114, R12 - B callbackasm1(SB) - MOVD $115, R12 - B callbackasm1(SB) - MOVD $116, R12 - B callbackasm1(SB) - MOVD $117, R12 - B callbackasm1(SB) - MOVD $118, R12 - B callbackasm1(SB) - MOVD $119, R12 - B callbackasm1(SB) - MOVD $120, R12 - B callbackasm1(SB) - MOVD $121, R12 - B callbackasm1(SB) - MOVD $122, R12 - B callbackasm1(SB) - MOVD $123, R12 - B callbackasm1(SB) - MOVD $124, R12 - B callbackasm1(SB) - MOVD $125, R12 - B callbackasm1(SB) - MOVD $126, R12 - B callbackasm1(SB) - MOVD $127, R12 - B callbackasm1(SB) - MOVD $128, R12 - B callbackasm1(SB) - MOVD $129, R12 - B callbackasm1(SB) - MOVD $130, R12 - B callbackasm1(SB) - MOVD $131, R12 - B callbackasm1(SB) - MOVD $132, R12 - B callbackasm1(SB) - MOVD $133, R12 - B callbackasm1(SB) - MOVD $134, R12 - B callbackasm1(SB) - MOVD $135, R12 - B callbackasm1(SB) - MOVD $136, R12 - B callbackasm1(SB) - MOVD $137, R12 - B callbackasm1(SB) - MOVD $138, R12 - B callbackasm1(SB) - MOVD $139, R12 - B callbackasm1(SB) - MOVD $140, R12 - B callbackasm1(SB) - MOVD $141, R12 - B callbackasm1(SB) - MOVD $142, R12 - B callbackasm1(SB) - MOVD $143, R12 - B callbackasm1(SB) - MOVD $144, R12 - B callbackasm1(SB) - MOVD $145, R12 - B callbackasm1(SB) - MOVD $146, R12 - B callbackasm1(SB) - MOVD $147, R12 - B callbackasm1(SB) - MOVD $148, R12 - B callbackasm1(SB) - MOVD $149, R12 - B callbackasm1(SB) - MOVD $150, R12 - B callbackasm1(SB) - MOVD $151, R12 - B callbackasm1(SB) - MOVD $152, R12 - B callbackasm1(SB) - MOVD $153, R12 - B callbackasm1(SB) - MOVD $154, R12 - B callbackasm1(SB) - MOVD $155, R12 - B callbackasm1(SB) - MOVD $156, R12 - B callbackasm1(SB) - MOVD $157, R12 - B callbackasm1(SB) - MOVD $158, R12 - B callbackasm1(SB) - MOVD $159, R12 - B callbackasm1(SB) - MOVD $160, R12 - B callbackasm1(SB) - MOVD $161, R12 - B callbackasm1(SB) - MOVD $162, R12 - B callbackasm1(SB) - MOVD $163, R12 - B callbackasm1(SB) - MOVD $164, R12 - B callbackasm1(SB) - MOVD $165, R12 - B callbackasm1(SB) - MOVD $166, R12 - B callbackasm1(SB) - MOVD $167, R12 - B callbackasm1(SB) - MOVD $168, R12 - B callbackasm1(SB) - MOVD $169, R12 - B callbackasm1(SB) - MOVD $170, R12 - B callbackasm1(SB) - MOVD $171, R12 - B callbackasm1(SB) - MOVD $172, R12 - B callbackasm1(SB) - MOVD $173, R12 - B callbackasm1(SB) - MOVD $174, R12 - B callbackasm1(SB) - MOVD $175, R12 - B callbackasm1(SB) - MOVD $176, R12 - B callbackasm1(SB) - MOVD $177, R12 - B callbackasm1(SB) - MOVD $178, R12 - B callbackasm1(SB) - MOVD $179, R12 - B callbackasm1(SB) - MOVD $180, R12 - B callbackasm1(SB) - MOVD $181, R12 - B callbackasm1(SB) - MOVD $182, R12 - B callbackasm1(SB) - MOVD $183, R12 - B callbackasm1(SB) - MOVD $184, R12 - B callbackasm1(SB) - MOVD $185, R12 - B callbackasm1(SB) - MOVD $186, R12 - B callbackasm1(SB) - MOVD $187, R12 - B callbackasm1(SB) - MOVD $188, R12 - B callbackasm1(SB) - MOVD $189, R12 - B callbackasm1(SB) - MOVD $190, R12 - B callbackasm1(SB) - MOVD $191, R12 - B callbackasm1(SB) - MOVD $192, R12 - B callbackasm1(SB) - MOVD $193, R12 - B callbackasm1(SB) - MOVD $194, R12 - B callbackasm1(SB) - MOVD $195, R12 - B callbackasm1(SB) - MOVD $196, R12 - B callbackasm1(SB) - MOVD $197, R12 - B callbackasm1(SB) - MOVD $198, R12 - B callbackasm1(SB) - MOVD $199, R12 - B callbackasm1(SB) - MOVD $200, R12 - B callbackasm1(SB) - MOVD $201, R12 - B callbackasm1(SB) - MOVD $202, R12 - B callbackasm1(SB) - MOVD $203, R12 - B callbackasm1(SB) - MOVD $204, R12 - B callbackasm1(SB) - MOVD $205, R12 - B callbackasm1(SB) - MOVD $206, R12 - B callbackasm1(SB) - MOVD $207, R12 - B callbackasm1(SB) - MOVD $208, R12 - B callbackasm1(SB) - MOVD $209, R12 - B callbackasm1(SB) - MOVD $210, R12 - B callbackasm1(SB) - MOVD $211, R12 - B callbackasm1(SB) - MOVD $212, R12 - B callbackasm1(SB) - MOVD $213, R12 - B callbackasm1(SB) - MOVD $214, R12 - B callbackasm1(SB) - MOVD $215, R12 - B callbackasm1(SB) - MOVD $216, R12 - B callbackasm1(SB) - MOVD $217, R12 - B callbackasm1(SB) - MOVD $218, R12 - B callbackasm1(SB) - MOVD $219, R12 - B callbackasm1(SB) - MOVD $220, R12 - B callbackasm1(SB) - MOVD $221, R12 - B callbackasm1(SB) - MOVD $222, R12 - B callbackasm1(SB) - MOVD $223, R12 - B callbackasm1(SB) - MOVD $224, R12 - B callbackasm1(SB) - MOVD $225, R12 - B callbackasm1(SB) - MOVD $226, R12 - B callbackasm1(SB) - MOVD $227, R12 - B callbackasm1(SB) - MOVD $228, R12 - B callbackasm1(SB) - MOVD $229, R12 - B callbackasm1(SB) - MOVD $230, R12 - B callbackasm1(SB) - MOVD $231, R12 - B callbackasm1(SB) - MOVD $232, R12 - B callbackasm1(SB) - MOVD $233, R12 - B callbackasm1(SB) - MOVD $234, R12 - B callbackasm1(SB) - MOVD $235, R12 - B callbackasm1(SB) - MOVD $236, R12 - B callbackasm1(SB) - MOVD $237, R12 - B callbackasm1(SB) - MOVD $238, R12 - B callbackasm1(SB) - MOVD $239, R12 - B callbackasm1(SB) - MOVD $240, R12 - B callbackasm1(SB) - MOVD $241, R12 - B callbackasm1(SB) - MOVD $242, R12 - B callbackasm1(SB) - MOVD $243, R12 - B callbackasm1(SB) - MOVD $244, R12 - B callbackasm1(SB) - MOVD $245, R12 - B callbackasm1(SB) - MOVD $246, R12 - B callbackasm1(SB) - MOVD $247, R12 - B callbackasm1(SB) - MOVD $248, R12 - B callbackasm1(SB) - MOVD $249, R12 - B callbackasm1(SB) - MOVD $250, R12 - B callbackasm1(SB) - MOVD $251, R12 - B callbackasm1(SB) - MOVD $252, R12 - B callbackasm1(SB) - MOVD $253, R12 - B callbackasm1(SB) - MOVD $254, R12 - B callbackasm1(SB) - MOVD $255, R12 - B callbackasm1(SB) - MOVD $256, R12 - B callbackasm1(SB) - MOVD $257, R12 - B callbackasm1(SB) - MOVD $258, R12 - B callbackasm1(SB) - MOVD $259, R12 - B callbackasm1(SB) - MOVD $260, R12 - B callbackasm1(SB) - MOVD $261, R12 - B callbackasm1(SB) - MOVD $262, R12 - B callbackasm1(SB) - MOVD $263, R12 - B callbackasm1(SB) - MOVD $264, R12 - B callbackasm1(SB) - MOVD $265, R12 - B callbackasm1(SB) - MOVD $266, R12 - B callbackasm1(SB) - MOVD $267, R12 - B callbackasm1(SB) - MOVD $268, R12 - B callbackasm1(SB) - MOVD $269, R12 - B callbackasm1(SB) - MOVD $270, R12 - B callbackasm1(SB) - MOVD $271, R12 - B callbackasm1(SB) - MOVD $272, R12 - B callbackasm1(SB) - MOVD $273, R12 - B callbackasm1(SB) - MOVD $274, R12 - B callbackasm1(SB) - MOVD $275, R12 - B callbackasm1(SB) - MOVD $276, R12 - B callbackasm1(SB) - MOVD $277, R12 - B callbackasm1(SB) - MOVD $278, R12 - B callbackasm1(SB) - MOVD $279, R12 - B callbackasm1(SB) - MOVD $280, R12 - B callbackasm1(SB) - MOVD $281, R12 - B callbackasm1(SB) - MOVD $282, R12 - B callbackasm1(SB) - MOVD $283, R12 - B callbackasm1(SB) - MOVD $284, R12 - B callbackasm1(SB) - MOVD $285, R12 - B callbackasm1(SB) - MOVD $286, R12 - B callbackasm1(SB) - MOVD $287, R12 - B callbackasm1(SB) - MOVD $288, R12 - B callbackasm1(SB) - MOVD $289, R12 - B callbackasm1(SB) - MOVD $290, R12 - B callbackasm1(SB) - MOVD $291, R12 - B callbackasm1(SB) - MOVD $292, R12 - B callbackasm1(SB) - MOVD $293, R12 - B callbackasm1(SB) - MOVD $294, R12 - B callbackasm1(SB) - MOVD $295, R12 - B callbackasm1(SB) - MOVD $296, R12 - B callbackasm1(SB) - MOVD $297, R12 - B callbackasm1(SB) - MOVD $298, R12 - B callbackasm1(SB) - MOVD $299, R12 - B callbackasm1(SB) - MOVD $300, R12 - B callbackasm1(SB) - MOVD $301, R12 - B callbackasm1(SB) - MOVD $302, R12 - B callbackasm1(SB) - MOVD $303, R12 - B callbackasm1(SB) - MOVD $304, R12 - B callbackasm1(SB) - MOVD $305, R12 - B callbackasm1(SB) - MOVD $306, R12 - B callbackasm1(SB) - MOVD $307, R12 - B callbackasm1(SB) - MOVD $308, R12 - B callbackasm1(SB) - MOVD $309, R12 - B callbackasm1(SB) - MOVD $310, R12 - B callbackasm1(SB) - MOVD $311, R12 - B callbackasm1(SB) - MOVD $312, R12 - B callbackasm1(SB) - MOVD $313, R12 - B callbackasm1(SB) - MOVD $314, R12 - B callbackasm1(SB) - MOVD $315, R12 - B callbackasm1(SB) - MOVD $316, R12 - B callbackasm1(SB) - MOVD $317, R12 - B callbackasm1(SB) - MOVD $318, R12 - B callbackasm1(SB) - MOVD $319, R12 - B callbackasm1(SB) - MOVD $320, R12 - B callbackasm1(SB) - MOVD $321, R12 - B callbackasm1(SB) - MOVD $322, R12 - B callbackasm1(SB) - MOVD $323, R12 - B callbackasm1(SB) - MOVD $324, R12 - B callbackasm1(SB) - MOVD $325, R12 - B callbackasm1(SB) - MOVD $326, R12 - B callbackasm1(SB) - MOVD $327, R12 - B callbackasm1(SB) - MOVD $328, R12 - B callbackasm1(SB) - MOVD $329, R12 - B callbackasm1(SB) - MOVD $330, R12 - B callbackasm1(SB) - MOVD $331, R12 - B callbackasm1(SB) - MOVD $332, R12 - B callbackasm1(SB) - MOVD $333, R12 - B callbackasm1(SB) - MOVD $334, R12 - B callbackasm1(SB) - MOVD $335, R12 - B callbackasm1(SB) - MOVD $336, R12 - B callbackasm1(SB) - MOVD $337, R12 - B callbackasm1(SB) - MOVD $338, R12 - B callbackasm1(SB) - MOVD $339, R12 - B callbackasm1(SB) - MOVD $340, R12 - B callbackasm1(SB) - MOVD $341, R12 - B callbackasm1(SB) - MOVD $342, R12 - B callbackasm1(SB) - MOVD $343, R12 - B callbackasm1(SB) - MOVD $344, R12 - B callbackasm1(SB) - MOVD $345, R12 - B callbackasm1(SB) - MOVD $346, R12 - B callbackasm1(SB) - MOVD $347, R12 - B callbackasm1(SB) - MOVD $348, R12 - B callbackasm1(SB) - MOVD $349, R12 - B callbackasm1(SB) - MOVD $350, R12 - B callbackasm1(SB) - MOVD $351, R12 - B callbackasm1(SB) - MOVD $352, R12 - B callbackasm1(SB) - MOVD $353, R12 - B callbackasm1(SB) - MOVD $354, R12 - B callbackasm1(SB) - MOVD $355, R12 - B callbackasm1(SB) - MOVD $356, R12 - B callbackasm1(SB) - MOVD $357, R12 - B callbackasm1(SB) - MOVD $358, R12 - B callbackasm1(SB) - MOVD $359, R12 - B callbackasm1(SB) - MOVD $360, R12 - B callbackasm1(SB) - MOVD $361, R12 - B callbackasm1(SB) - MOVD $362, R12 - B callbackasm1(SB) - MOVD $363, R12 - B callbackasm1(SB) - MOVD $364, R12 - B callbackasm1(SB) - MOVD $365, R12 - B callbackasm1(SB) - MOVD $366, R12 - B callbackasm1(SB) - MOVD $367, R12 - B callbackasm1(SB) - MOVD $368, R12 - B callbackasm1(SB) - MOVD $369, R12 - B callbackasm1(SB) - MOVD $370, R12 - B callbackasm1(SB) - MOVD $371, R12 - B callbackasm1(SB) - MOVD $372, R12 - B callbackasm1(SB) - MOVD $373, R12 - B callbackasm1(SB) - MOVD $374, R12 - B callbackasm1(SB) - MOVD $375, R12 - B callbackasm1(SB) - MOVD $376, R12 - B callbackasm1(SB) - MOVD $377, R12 - B callbackasm1(SB) - MOVD $378, R12 - B callbackasm1(SB) - MOVD $379, R12 - B callbackasm1(SB) - MOVD $380, R12 - B callbackasm1(SB) - MOVD $381, R12 - B callbackasm1(SB) - MOVD $382, R12 - B callbackasm1(SB) - MOVD $383, R12 - B callbackasm1(SB) - MOVD $384, R12 - B callbackasm1(SB) - MOVD $385, R12 - B callbackasm1(SB) - MOVD $386, R12 - B callbackasm1(SB) - MOVD $387, R12 - B callbackasm1(SB) - MOVD $388, R12 - B callbackasm1(SB) - MOVD $389, R12 - B callbackasm1(SB) - MOVD $390, R12 - B callbackasm1(SB) - MOVD $391, R12 - B callbackasm1(SB) - MOVD $392, R12 - B callbackasm1(SB) - MOVD $393, R12 - B callbackasm1(SB) - MOVD $394, R12 - B callbackasm1(SB) - MOVD $395, R12 - B callbackasm1(SB) - MOVD $396, R12 - B callbackasm1(SB) - MOVD $397, R12 - B callbackasm1(SB) - MOVD $398, R12 - B callbackasm1(SB) - MOVD $399, R12 - B callbackasm1(SB) - MOVD $400, R12 - B callbackasm1(SB) - MOVD $401, R12 - B callbackasm1(SB) - MOVD $402, R12 - B callbackasm1(SB) - MOVD $403, R12 - B callbackasm1(SB) - MOVD $404, R12 - B callbackasm1(SB) - MOVD $405, R12 - B callbackasm1(SB) - MOVD $406, R12 - B callbackasm1(SB) - MOVD $407, R12 - B callbackasm1(SB) - MOVD $408, R12 - B callbackasm1(SB) - MOVD $409, R12 - B callbackasm1(SB) - MOVD $410, R12 - B callbackasm1(SB) - MOVD $411, R12 - B callbackasm1(SB) - MOVD $412, R12 - B callbackasm1(SB) - MOVD $413, R12 - B callbackasm1(SB) - MOVD $414, R12 - B callbackasm1(SB) - MOVD $415, R12 - B callbackasm1(SB) - MOVD $416, R12 - B callbackasm1(SB) - MOVD $417, R12 - B callbackasm1(SB) - MOVD $418, R12 - B callbackasm1(SB) - MOVD $419, R12 - B callbackasm1(SB) - MOVD $420, R12 - B callbackasm1(SB) - MOVD $421, R12 - B callbackasm1(SB) - MOVD $422, R12 - B callbackasm1(SB) - MOVD $423, R12 - B callbackasm1(SB) - MOVD $424, R12 - B callbackasm1(SB) - MOVD $425, R12 - B callbackasm1(SB) - MOVD $426, R12 - B callbackasm1(SB) - MOVD $427, R12 - B callbackasm1(SB) - MOVD $428, R12 - B callbackasm1(SB) - MOVD $429, R12 - B callbackasm1(SB) - MOVD $430, R12 - B callbackasm1(SB) - MOVD $431, R12 - B callbackasm1(SB) - MOVD $432, R12 - B callbackasm1(SB) - MOVD $433, R12 - B callbackasm1(SB) - MOVD $434, R12 - B callbackasm1(SB) - MOVD $435, R12 - B callbackasm1(SB) - MOVD $436, R12 - B callbackasm1(SB) - MOVD $437, R12 - B callbackasm1(SB) - MOVD $438, R12 - B callbackasm1(SB) - MOVD $439, R12 - B callbackasm1(SB) - MOVD $440, R12 - B callbackasm1(SB) - MOVD $441, R12 - B callbackasm1(SB) - MOVD $442, R12 - B callbackasm1(SB) - MOVD $443, R12 - B callbackasm1(SB) - MOVD $444, R12 - B callbackasm1(SB) - MOVD $445, R12 - B callbackasm1(SB) - MOVD $446, R12 - B callbackasm1(SB) - MOVD $447, R12 - B callbackasm1(SB) - MOVD $448, R12 - B callbackasm1(SB) - MOVD $449, R12 - B callbackasm1(SB) - MOVD $450, R12 - B callbackasm1(SB) - MOVD $451, R12 - B callbackasm1(SB) - MOVD $452, R12 - B callbackasm1(SB) - MOVD $453, R12 - B callbackasm1(SB) - MOVD $454, R12 - B callbackasm1(SB) - MOVD $455, R12 - B callbackasm1(SB) - MOVD $456, R12 - B callbackasm1(SB) - MOVD $457, R12 - B callbackasm1(SB) - MOVD $458, R12 - B callbackasm1(SB) - MOVD $459, R12 - B callbackasm1(SB) - MOVD $460, R12 - B callbackasm1(SB) - MOVD $461, R12 - B callbackasm1(SB) - MOVD $462, R12 - B callbackasm1(SB) - MOVD $463, R12 - B callbackasm1(SB) - MOVD $464, R12 - B callbackasm1(SB) - MOVD $465, R12 - B callbackasm1(SB) - MOVD $466, R12 - B callbackasm1(SB) - MOVD $467, R12 - B callbackasm1(SB) - MOVD $468, R12 - B callbackasm1(SB) - MOVD $469, R12 - B callbackasm1(SB) - MOVD $470, R12 - B callbackasm1(SB) - MOVD $471, R12 - B callbackasm1(SB) - MOVD $472, R12 - B callbackasm1(SB) - MOVD $473, R12 - B callbackasm1(SB) - MOVD $474, R12 - B callbackasm1(SB) - MOVD $475, R12 - B callbackasm1(SB) - MOVD $476, R12 - B callbackasm1(SB) - MOVD $477, R12 - B callbackasm1(SB) - MOVD $478, R12 - B callbackasm1(SB) - MOVD $479, R12 - B callbackasm1(SB) - MOVD $480, R12 - B callbackasm1(SB) - MOVD $481, R12 - B callbackasm1(SB) - MOVD $482, R12 - B callbackasm1(SB) - MOVD $483, R12 - B callbackasm1(SB) - MOVD $484, R12 - B callbackasm1(SB) - MOVD $485, R12 - B callbackasm1(SB) - MOVD $486, R12 - B callbackasm1(SB) - MOVD $487, R12 - B callbackasm1(SB) - MOVD $488, R12 - B callbackasm1(SB) - MOVD $489, R12 - B callbackasm1(SB) - MOVD $490, R12 - B callbackasm1(SB) - MOVD $491, R12 - B callbackasm1(SB) - MOVD $492, R12 - B callbackasm1(SB) - MOVD $493, R12 - B callbackasm1(SB) - MOVD $494, R12 - B callbackasm1(SB) - MOVD $495, R12 - B callbackasm1(SB) - MOVD $496, R12 - B callbackasm1(SB) - MOVD $497, R12 - B callbackasm1(SB) - MOVD $498, R12 - B callbackasm1(SB) - MOVD $499, R12 - B callbackasm1(SB) - MOVD $500, R12 - B callbackasm1(SB) - MOVD $501, R12 - B callbackasm1(SB) - MOVD $502, R12 - B callbackasm1(SB) - MOVD $503, R12 - B callbackasm1(SB) - MOVD $504, R12 - B callbackasm1(SB) - MOVD $505, R12 - B callbackasm1(SB) - MOVD $506, R12 - B callbackasm1(SB) - MOVD $507, R12 - B callbackasm1(SB) - MOVD $508, R12 - B callbackasm1(SB) - MOVD $509, R12 - B callbackasm1(SB) - MOVD $510, R12 - B callbackasm1(SB) - MOVD $511, R12 - B callbackasm1(SB) - MOVD $512, R12 - B callbackasm1(SB) - MOVD $513, R12 - B callbackasm1(SB) - MOVD $514, R12 - B callbackasm1(SB) - MOVD $515, R12 - B callbackasm1(SB) - MOVD $516, R12 - B callbackasm1(SB) - MOVD $517, R12 - B callbackasm1(SB) - MOVD $518, R12 - B callbackasm1(SB) - MOVD $519, R12 - B callbackasm1(SB) - MOVD $520, R12 - B callbackasm1(SB) - MOVD $521, R12 - B callbackasm1(SB) - MOVD $522, R12 - B callbackasm1(SB) - MOVD $523, R12 - B callbackasm1(SB) - MOVD $524, R12 - B callbackasm1(SB) - MOVD $525, R12 - B callbackasm1(SB) - MOVD $526, R12 - B callbackasm1(SB) - MOVD $527, R12 - B callbackasm1(SB) - MOVD $528, R12 - B callbackasm1(SB) - MOVD $529, R12 - B callbackasm1(SB) - MOVD $530, R12 - B callbackasm1(SB) - MOVD $531, R12 - B callbackasm1(SB) - MOVD $532, R12 - B callbackasm1(SB) - MOVD $533, R12 - B callbackasm1(SB) - MOVD $534, R12 - B callbackasm1(SB) - MOVD $535, R12 - B callbackasm1(SB) - MOVD $536, R12 - B callbackasm1(SB) - MOVD $537, R12 - B callbackasm1(SB) - MOVD $538, R12 - B callbackasm1(SB) - MOVD $539, R12 - B callbackasm1(SB) - MOVD $540, R12 - B callbackasm1(SB) - MOVD $541, R12 - B callbackasm1(SB) - MOVD $542, R12 - B callbackasm1(SB) - MOVD $543, R12 - B callbackasm1(SB) - MOVD $544, R12 - B callbackasm1(SB) - MOVD $545, R12 - B callbackasm1(SB) - MOVD $546, R12 - B callbackasm1(SB) - MOVD $547, R12 - B callbackasm1(SB) - MOVD $548, R12 - B callbackasm1(SB) - MOVD $549, R12 - B callbackasm1(SB) - MOVD $550, R12 - B callbackasm1(SB) - MOVD $551, R12 - B callbackasm1(SB) - MOVD $552, R12 - B callbackasm1(SB) - MOVD $553, R12 - B callbackasm1(SB) - MOVD $554, R12 - B callbackasm1(SB) - MOVD $555, R12 - B callbackasm1(SB) - MOVD $556, R12 - B callbackasm1(SB) - MOVD $557, R12 - B callbackasm1(SB) - MOVD $558, R12 - B callbackasm1(SB) - MOVD $559, R12 - B callbackasm1(SB) - MOVD $560, R12 - B callbackasm1(SB) - MOVD $561, R12 - B callbackasm1(SB) - MOVD $562, R12 - B callbackasm1(SB) - MOVD $563, R12 - B callbackasm1(SB) - MOVD $564, R12 - B callbackasm1(SB) - MOVD $565, R12 - B callbackasm1(SB) - MOVD $566, R12 - B callbackasm1(SB) - MOVD $567, R12 - B callbackasm1(SB) - MOVD $568, R12 - B callbackasm1(SB) - MOVD $569, R12 - B callbackasm1(SB) - MOVD $570, R12 - B callbackasm1(SB) - MOVD $571, R12 - B callbackasm1(SB) - MOVD $572, R12 - B callbackasm1(SB) - MOVD $573, R12 - B callbackasm1(SB) - MOVD $574, R12 - B callbackasm1(SB) - MOVD $575, R12 - B callbackasm1(SB) - MOVD $576, R12 - B callbackasm1(SB) - MOVD $577, R12 - B callbackasm1(SB) - MOVD $578, R12 - B callbackasm1(SB) - MOVD $579, R12 - B callbackasm1(SB) - MOVD $580, R12 - B callbackasm1(SB) - MOVD $581, R12 - B callbackasm1(SB) - MOVD $582, R12 - B callbackasm1(SB) - MOVD $583, R12 - B callbackasm1(SB) - MOVD $584, R12 - B callbackasm1(SB) - MOVD $585, R12 - B callbackasm1(SB) - MOVD $586, R12 - B callbackasm1(SB) - MOVD $587, R12 - B callbackasm1(SB) - MOVD $588, R12 - B callbackasm1(SB) - MOVD $589, R12 - B callbackasm1(SB) - MOVD $590, R12 - B callbackasm1(SB) - MOVD $591, R12 - B callbackasm1(SB) - MOVD $592, R12 - B callbackasm1(SB) - MOVD $593, R12 - B callbackasm1(SB) - MOVD $594, R12 - B callbackasm1(SB) - MOVD $595, R12 - B callbackasm1(SB) - MOVD $596, R12 - B callbackasm1(SB) - MOVD $597, R12 - B callbackasm1(SB) - MOVD $598, R12 - B callbackasm1(SB) - MOVD $599, R12 - B callbackasm1(SB) - MOVD $600, R12 - B callbackasm1(SB) - MOVD $601, R12 - B callbackasm1(SB) - MOVD $602, R12 - B callbackasm1(SB) - MOVD $603, R12 - B callbackasm1(SB) - MOVD $604, R12 - B callbackasm1(SB) - MOVD $605, R12 - B callbackasm1(SB) - MOVD $606, R12 - B callbackasm1(SB) - MOVD $607, R12 - B callbackasm1(SB) - MOVD $608, R12 - B callbackasm1(SB) - MOVD $609, R12 - B callbackasm1(SB) - MOVD $610, R12 - B callbackasm1(SB) - MOVD $611, R12 - B callbackasm1(SB) - MOVD $612, R12 - B callbackasm1(SB) - MOVD $613, R12 - B callbackasm1(SB) - MOVD $614, R12 - B callbackasm1(SB) - MOVD $615, R12 - B callbackasm1(SB) - MOVD $616, R12 - B callbackasm1(SB) - MOVD $617, R12 - B callbackasm1(SB) - MOVD $618, R12 - B callbackasm1(SB) - MOVD $619, R12 - B callbackasm1(SB) - MOVD $620, R12 - B callbackasm1(SB) - MOVD $621, R12 - B callbackasm1(SB) - MOVD $622, R12 - B callbackasm1(SB) - MOVD $623, R12 - B callbackasm1(SB) - MOVD $624, R12 - B callbackasm1(SB) - MOVD $625, R12 - B callbackasm1(SB) - MOVD $626, R12 - B callbackasm1(SB) - MOVD $627, R12 - B callbackasm1(SB) - MOVD $628, R12 - B callbackasm1(SB) - MOVD $629, R12 - B callbackasm1(SB) - MOVD $630, R12 - B callbackasm1(SB) - MOVD $631, R12 - B callbackasm1(SB) - MOVD $632, R12 - B callbackasm1(SB) - MOVD $633, R12 - B callbackasm1(SB) - MOVD $634, R12 - B callbackasm1(SB) - MOVD $635, R12 - B callbackasm1(SB) - MOVD $636, R12 - B callbackasm1(SB) - MOVD $637, R12 - B callbackasm1(SB) - MOVD $638, R12 - B callbackasm1(SB) - MOVD $639, R12 - B callbackasm1(SB) - MOVD $640, R12 - B callbackasm1(SB) - MOVD $641, R12 - B callbackasm1(SB) - MOVD $642, R12 - B callbackasm1(SB) - MOVD $643, R12 - B callbackasm1(SB) - MOVD $644, R12 - B callbackasm1(SB) - MOVD $645, R12 - B callbackasm1(SB) - MOVD $646, R12 - B callbackasm1(SB) - MOVD $647, R12 - B callbackasm1(SB) - MOVD $648, R12 - B callbackasm1(SB) - MOVD $649, R12 - B callbackasm1(SB) - MOVD $650, R12 - B callbackasm1(SB) - MOVD $651, R12 - B callbackasm1(SB) - MOVD $652, R12 - B callbackasm1(SB) - MOVD $653, R12 - B callbackasm1(SB) - MOVD $654, R12 - B callbackasm1(SB) - MOVD $655, R12 - B callbackasm1(SB) - MOVD $656, R12 - B callbackasm1(SB) - MOVD $657, R12 - B callbackasm1(SB) - MOVD $658, R12 - B callbackasm1(SB) - MOVD $659, R12 - B callbackasm1(SB) - MOVD $660, R12 - B callbackasm1(SB) - MOVD $661, R12 - B callbackasm1(SB) - MOVD $662, R12 - B callbackasm1(SB) - MOVD $663, R12 - B callbackasm1(SB) - MOVD $664, R12 - B callbackasm1(SB) - MOVD $665, R12 - B callbackasm1(SB) - MOVD $666, R12 - B callbackasm1(SB) - MOVD $667, R12 - B callbackasm1(SB) - MOVD $668, R12 - B callbackasm1(SB) - MOVD $669, R12 - B callbackasm1(SB) - MOVD $670, R12 - B callbackasm1(SB) - MOVD $671, R12 - B callbackasm1(SB) - MOVD $672, R12 - B callbackasm1(SB) - MOVD $673, R12 - B callbackasm1(SB) - MOVD $674, R12 - B callbackasm1(SB) - MOVD $675, R12 - B callbackasm1(SB) - MOVD $676, R12 - B callbackasm1(SB) - MOVD $677, R12 - B callbackasm1(SB) - MOVD $678, R12 - B callbackasm1(SB) - MOVD $679, R12 - B callbackasm1(SB) - MOVD $680, R12 - B callbackasm1(SB) - MOVD $681, R12 - B callbackasm1(SB) - MOVD $682, R12 - B callbackasm1(SB) - MOVD $683, R12 - B callbackasm1(SB) - MOVD $684, R12 - B callbackasm1(SB) - MOVD $685, R12 - B callbackasm1(SB) - MOVD $686, R12 - B callbackasm1(SB) - MOVD $687, R12 - B callbackasm1(SB) - MOVD $688, R12 - B callbackasm1(SB) - MOVD $689, R12 - B callbackasm1(SB) - MOVD $690, R12 - B callbackasm1(SB) - MOVD $691, R12 - B callbackasm1(SB) - MOVD $692, R12 - B callbackasm1(SB) - MOVD $693, R12 - B callbackasm1(SB) - MOVD $694, R12 - B callbackasm1(SB) - MOVD $695, R12 - B callbackasm1(SB) - MOVD $696, R12 - B callbackasm1(SB) - MOVD $697, R12 - B callbackasm1(SB) - MOVD $698, R12 - B callbackasm1(SB) - MOVD $699, R12 - B callbackasm1(SB) - MOVD $700, R12 - B callbackasm1(SB) - MOVD $701, R12 - B callbackasm1(SB) - MOVD $702, R12 - B callbackasm1(SB) - MOVD $703, R12 - B callbackasm1(SB) - MOVD $704, R12 - B callbackasm1(SB) - MOVD $705, R12 - B callbackasm1(SB) - MOVD $706, R12 - B callbackasm1(SB) - MOVD $707, R12 - B callbackasm1(SB) - MOVD $708, R12 - B callbackasm1(SB) - MOVD $709, R12 - B callbackasm1(SB) - MOVD $710, R12 - B callbackasm1(SB) - MOVD $711, R12 - B callbackasm1(SB) - MOVD $712, R12 - B callbackasm1(SB) - MOVD $713, R12 - B callbackasm1(SB) - MOVD $714, R12 - B callbackasm1(SB) - MOVD $715, R12 - B callbackasm1(SB) - MOVD $716, R12 - B callbackasm1(SB) - MOVD $717, R12 - B callbackasm1(SB) - MOVD $718, R12 - B callbackasm1(SB) - MOVD $719, R12 - B callbackasm1(SB) - MOVD $720, R12 - B callbackasm1(SB) - MOVD $721, R12 - B callbackasm1(SB) - MOVD $722, R12 - B callbackasm1(SB) - MOVD $723, R12 - B callbackasm1(SB) - MOVD $724, R12 - B callbackasm1(SB) - MOVD $725, R12 - B callbackasm1(SB) - MOVD $726, R12 - B callbackasm1(SB) - MOVD $727, R12 - B callbackasm1(SB) - MOVD $728, R12 - B callbackasm1(SB) - MOVD $729, R12 - B callbackasm1(SB) - MOVD $730, R12 - B callbackasm1(SB) - MOVD $731, R12 - B callbackasm1(SB) - MOVD $732, R12 - B callbackasm1(SB) - MOVD $733, R12 - B callbackasm1(SB) - MOVD $734, R12 - B callbackasm1(SB) - MOVD $735, R12 - B callbackasm1(SB) - MOVD $736, R12 - B callbackasm1(SB) - MOVD $737, R12 - B callbackasm1(SB) - MOVD $738, R12 - B callbackasm1(SB) - MOVD $739, R12 - B callbackasm1(SB) - MOVD $740, R12 - B callbackasm1(SB) - MOVD $741, R12 - B callbackasm1(SB) - MOVD $742, R12 - B callbackasm1(SB) - MOVD $743, R12 - B callbackasm1(SB) - MOVD $744, R12 - B callbackasm1(SB) - MOVD $745, R12 - B callbackasm1(SB) - MOVD $746, R12 - B callbackasm1(SB) - MOVD $747, R12 - B callbackasm1(SB) - MOVD $748, R12 - B callbackasm1(SB) - MOVD $749, R12 - B callbackasm1(SB) - MOVD $750, R12 - B callbackasm1(SB) - MOVD $751, R12 - B callbackasm1(SB) - MOVD $752, R12 - B callbackasm1(SB) - MOVD $753, R12 - B callbackasm1(SB) - MOVD $754, R12 - B callbackasm1(SB) - MOVD $755, R12 - B callbackasm1(SB) - MOVD $756, R12 - B callbackasm1(SB) - MOVD $757, R12 - B callbackasm1(SB) - MOVD $758, R12 - B callbackasm1(SB) - MOVD $759, R12 - B callbackasm1(SB) - MOVD $760, R12 - B callbackasm1(SB) - MOVD $761, R12 - B callbackasm1(SB) - MOVD $762, R12 - B callbackasm1(SB) - MOVD $763, R12 - B callbackasm1(SB) - MOVD $764, R12 - B callbackasm1(SB) - MOVD $765, R12 - B callbackasm1(SB) - MOVD $766, R12 - B callbackasm1(SB) - MOVD $767, R12 - B callbackasm1(SB) - MOVD $768, R12 - B callbackasm1(SB) - MOVD $769, R12 - B callbackasm1(SB) - MOVD $770, R12 - B callbackasm1(SB) - MOVD $771, R12 - B callbackasm1(SB) - MOVD $772, R12 - B callbackasm1(SB) - MOVD $773, R12 - B callbackasm1(SB) - MOVD $774, R12 - B callbackasm1(SB) - MOVD $775, R12 - B callbackasm1(SB) - MOVD $776, R12 - B callbackasm1(SB) - MOVD $777, R12 - B callbackasm1(SB) - MOVD $778, R12 - B callbackasm1(SB) - MOVD $779, R12 - B callbackasm1(SB) - MOVD $780, R12 - B callbackasm1(SB) - MOVD $781, R12 - B callbackasm1(SB) - MOVD $782, R12 - B callbackasm1(SB) - MOVD $783, R12 - B callbackasm1(SB) - MOVD $784, R12 - B callbackasm1(SB) - MOVD $785, R12 - B callbackasm1(SB) - MOVD $786, R12 - B callbackasm1(SB) - MOVD $787, R12 - B callbackasm1(SB) - MOVD $788, R12 - B callbackasm1(SB) - MOVD $789, R12 - B callbackasm1(SB) - MOVD $790, R12 - B callbackasm1(SB) - MOVD $791, R12 - B callbackasm1(SB) - MOVD $792, R12 - B callbackasm1(SB) - MOVD $793, R12 - B callbackasm1(SB) - MOVD $794, R12 - B callbackasm1(SB) - MOVD $795, R12 - B callbackasm1(SB) - MOVD $796, R12 - B callbackasm1(SB) - MOVD $797, R12 - B callbackasm1(SB) - MOVD $798, R12 - B callbackasm1(SB) - MOVD $799, R12 - B callbackasm1(SB) - MOVD $800, R12 - B callbackasm1(SB) - MOVD $801, R12 - B callbackasm1(SB) - MOVD $802, R12 - B callbackasm1(SB) - MOVD $803, R12 - B callbackasm1(SB) - MOVD $804, R12 - B callbackasm1(SB) - MOVD $805, R12 - B callbackasm1(SB) - MOVD $806, R12 - B callbackasm1(SB) - MOVD $807, R12 - B callbackasm1(SB) - MOVD $808, R12 - B callbackasm1(SB) - MOVD $809, R12 - B callbackasm1(SB) - MOVD $810, R12 - B callbackasm1(SB) - MOVD $811, R12 - B callbackasm1(SB) - MOVD $812, R12 - B callbackasm1(SB) - MOVD $813, R12 - B callbackasm1(SB) - MOVD $814, R12 - B callbackasm1(SB) - MOVD $815, R12 - B callbackasm1(SB) - MOVD $816, R12 - B callbackasm1(SB) - MOVD $817, R12 - B callbackasm1(SB) - MOVD $818, R12 - B callbackasm1(SB) - MOVD $819, R12 - B callbackasm1(SB) - MOVD $820, R12 - B callbackasm1(SB) - MOVD $821, R12 - B callbackasm1(SB) - MOVD $822, R12 - B callbackasm1(SB) - MOVD $823, R12 - B callbackasm1(SB) - MOVD $824, R12 - B callbackasm1(SB) - MOVD $825, R12 - B callbackasm1(SB) - MOVD $826, R12 - B callbackasm1(SB) - MOVD $827, R12 - B callbackasm1(SB) - MOVD $828, R12 - B callbackasm1(SB) - MOVD $829, R12 - B callbackasm1(SB) - MOVD $830, R12 - B callbackasm1(SB) - MOVD $831, R12 - B callbackasm1(SB) - MOVD $832, R12 - B callbackasm1(SB) - MOVD $833, R12 - B callbackasm1(SB) - MOVD $834, R12 - B callbackasm1(SB) - MOVD $835, R12 - B callbackasm1(SB) - MOVD $836, R12 - B callbackasm1(SB) - MOVD $837, R12 - B callbackasm1(SB) - MOVD $838, R12 - B callbackasm1(SB) - MOVD $839, R12 - B callbackasm1(SB) - MOVD $840, R12 - B callbackasm1(SB) - MOVD $841, R12 - B callbackasm1(SB) - MOVD $842, R12 - B callbackasm1(SB) - MOVD $843, R12 - B callbackasm1(SB) - MOVD $844, R12 - B callbackasm1(SB) - MOVD $845, R12 - B callbackasm1(SB) - MOVD $846, R12 - B callbackasm1(SB) - MOVD $847, R12 - B callbackasm1(SB) - MOVD $848, R12 - B callbackasm1(SB) - MOVD $849, R12 - B callbackasm1(SB) - MOVD $850, R12 - B callbackasm1(SB) - MOVD $851, R12 - B callbackasm1(SB) - MOVD $852, R12 - B callbackasm1(SB) - MOVD $853, R12 - B callbackasm1(SB) - MOVD $854, R12 - B callbackasm1(SB) - MOVD $855, R12 - B callbackasm1(SB) - MOVD $856, R12 - B callbackasm1(SB) - MOVD $857, R12 - B callbackasm1(SB) - MOVD $858, R12 - B callbackasm1(SB) - MOVD $859, R12 - B callbackasm1(SB) - MOVD $860, R12 - B callbackasm1(SB) - MOVD $861, R12 - B callbackasm1(SB) - MOVD $862, R12 - B callbackasm1(SB) - MOVD $863, R12 - B callbackasm1(SB) - MOVD $864, R12 - B callbackasm1(SB) - MOVD $865, R12 - B callbackasm1(SB) - MOVD $866, R12 - B callbackasm1(SB) - MOVD $867, R12 - B callbackasm1(SB) - MOVD $868, R12 - B callbackasm1(SB) - MOVD $869, R12 - B callbackasm1(SB) - MOVD $870, R12 - B callbackasm1(SB) - MOVD $871, R12 - B callbackasm1(SB) - MOVD $872, R12 - B callbackasm1(SB) - MOVD $873, R12 - B callbackasm1(SB) - MOVD $874, R12 - B callbackasm1(SB) - MOVD $875, R12 - B callbackasm1(SB) - MOVD $876, R12 - B callbackasm1(SB) - MOVD $877, R12 - B callbackasm1(SB) - MOVD $878, R12 - B callbackasm1(SB) - MOVD $879, R12 - B callbackasm1(SB) - MOVD $880, R12 - B callbackasm1(SB) - MOVD $881, R12 - B callbackasm1(SB) - MOVD $882, R12 - B callbackasm1(SB) - MOVD $883, R12 - B callbackasm1(SB) - MOVD $884, R12 - B callbackasm1(SB) - MOVD $885, R12 - B callbackasm1(SB) - MOVD $886, R12 - B callbackasm1(SB) - MOVD $887, R12 - B callbackasm1(SB) - MOVD $888, R12 - B callbackasm1(SB) - MOVD $889, R12 - B callbackasm1(SB) - MOVD $890, R12 - B callbackasm1(SB) - MOVD $891, R12 - B callbackasm1(SB) - MOVD $892, R12 - B callbackasm1(SB) - MOVD $893, R12 - B callbackasm1(SB) - MOVD $894, R12 - B callbackasm1(SB) - MOVD $895, R12 - B callbackasm1(SB) - MOVD $896, R12 - B callbackasm1(SB) - MOVD $897, R12 - B callbackasm1(SB) - MOVD $898, R12 - B callbackasm1(SB) - MOVD $899, R12 - B callbackasm1(SB) - MOVD $900, R12 - B callbackasm1(SB) - MOVD $901, R12 - B callbackasm1(SB) - MOVD $902, R12 - B callbackasm1(SB) - MOVD $903, R12 - B callbackasm1(SB) - MOVD $904, R12 - B callbackasm1(SB) - MOVD $905, R12 - B callbackasm1(SB) - MOVD $906, R12 - B callbackasm1(SB) - MOVD $907, R12 - B callbackasm1(SB) - MOVD $908, R12 - B callbackasm1(SB) - MOVD $909, R12 - B callbackasm1(SB) - MOVD $910, R12 - B callbackasm1(SB) - MOVD $911, R12 - B callbackasm1(SB) - MOVD $912, R12 - B callbackasm1(SB) - MOVD $913, R12 - B callbackasm1(SB) - MOVD $914, R12 - B callbackasm1(SB) - MOVD $915, R12 - B callbackasm1(SB) - MOVD $916, R12 - B callbackasm1(SB) - MOVD $917, R12 - B callbackasm1(SB) - MOVD $918, R12 - B callbackasm1(SB) - MOVD $919, R12 - B callbackasm1(SB) - MOVD $920, R12 - B callbackasm1(SB) - MOVD $921, R12 - B callbackasm1(SB) - MOVD $922, R12 - B callbackasm1(SB) - MOVD $923, R12 - B callbackasm1(SB) - MOVD $924, R12 - B callbackasm1(SB) - MOVD $925, R12 - B callbackasm1(SB) - MOVD $926, R12 - B callbackasm1(SB) - MOVD $927, R12 - B callbackasm1(SB) - MOVD $928, R12 - B callbackasm1(SB) - MOVD $929, R12 - B callbackasm1(SB) - MOVD $930, R12 - B callbackasm1(SB) - MOVD $931, R12 - B callbackasm1(SB) - MOVD $932, R12 - B callbackasm1(SB) - MOVD $933, R12 - B callbackasm1(SB) - MOVD $934, R12 - B callbackasm1(SB) - MOVD $935, R12 - B callbackasm1(SB) - MOVD $936, R12 - B callbackasm1(SB) - MOVD $937, R12 - B callbackasm1(SB) - MOVD $938, R12 - B callbackasm1(SB) - MOVD $939, R12 - B callbackasm1(SB) - MOVD $940, R12 - B callbackasm1(SB) - MOVD $941, R12 - B callbackasm1(SB) - MOVD $942, R12 - B callbackasm1(SB) - MOVD $943, R12 - B callbackasm1(SB) - MOVD $944, R12 - B callbackasm1(SB) - MOVD $945, R12 - B callbackasm1(SB) - MOVD $946, R12 - B callbackasm1(SB) - MOVD $947, R12 - B callbackasm1(SB) - MOVD $948, R12 - B callbackasm1(SB) - MOVD $949, R12 - B callbackasm1(SB) - MOVD $950, R12 - B callbackasm1(SB) - MOVD $951, R12 - B callbackasm1(SB) - MOVD $952, R12 - B callbackasm1(SB) - MOVD $953, R12 - B callbackasm1(SB) - MOVD $954, R12 - B callbackasm1(SB) - MOVD $955, R12 - B callbackasm1(SB) - MOVD $956, R12 - B callbackasm1(SB) - MOVD $957, R12 - B callbackasm1(SB) - MOVD $958, R12 - B callbackasm1(SB) - MOVD $959, R12 - B callbackasm1(SB) - MOVD $960, R12 - B callbackasm1(SB) - MOVD $961, R12 - B callbackasm1(SB) - MOVD $962, R12 - B callbackasm1(SB) - MOVD $963, R12 - B callbackasm1(SB) - MOVD $964, R12 - B callbackasm1(SB) - MOVD $965, R12 - B callbackasm1(SB) - MOVD $966, R12 - B callbackasm1(SB) - MOVD $967, R12 - B callbackasm1(SB) - MOVD $968, R12 - B callbackasm1(SB) - MOVD $969, R12 - B callbackasm1(SB) - MOVD $970, R12 - B callbackasm1(SB) - MOVD $971, R12 - B callbackasm1(SB) - MOVD $972, R12 - B callbackasm1(SB) - MOVD $973, R12 - B callbackasm1(SB) - MOVD $974, R12 - B callbackasm1(SB) - MOVD $975, R12 - B callbackasm1(SB) - MOVD $976, R12 - B callbackasm1(SB) - MOVD $977, R12 - B callbackasm1(SB) - MOVD $978, R12 - B callbackasm1(SB) - MOVD $979, R12 - B callbackasm1(SB) - MOVD $980, R12 - B callbackasm1(SB) - MOVD $981, R12 - B callbackasm1(SB) - MOVD $982, R12 - B callbackasm1(SB) - MOVD $983, R12 - B callbackasm1(SB) - MOVD $984, R12 - B callbackasm1(SB) - MOVD $985, R12 - B callbackasm1(SB) - MOVD $986, R12 - B callbackasm1(SB) - MOVD $987, R12 - B callbackasm1(SB) - MOVD $988, R12 - B callbackasm1(SB) - MOVD $989, R12 - B callbackasm1(SB) - MOVD $990, R12 - B callbackasm1(SB) - MOVD $991, R12 - B callbackasm1(SB) - MOVD $992, R12 - B callbackasm1(SB) - MOVD $993, R12 - B callbackasm1(SB) - MOVD $994, R12 - B callbackasm1(SB) - MOVD $995, R12 - B callbackasm1(SB) - MOVD $996, R12 - B callbackasm1(SB) - MOVD $997, R12 - B callbackasm1(SB) - MOVD $998, R12 - B callbackasm1(SB) - MOVD $999, R12 - B callbackasm1(SB) - MOVD $1000, R12 - B callbackasm1(SB) - MOVD $1001, R12 - B callbackasm1(SB) - MOVD $1002, R12 - B callbackasm1(SB) - MOVD $1003, R12 - B callbackasm1(SB) - MOVD $1004, R12 - B callbackasm1(SB) - MOVD $1005, R12 - B callbackasm1(SB) - MOVD $1006, R12 - B callbackasm1(SB) - MOVD $1007, R12 - B callbackasm1(SB) - MOVD $1008, R12 - B callbackasm1(SB) - MOVD $1009, R12 - B callbackasm1(SB) - MOVD $1010, R12 - B callbackasm1(SB) - MOVD $1011, R12 - B callbackasm1(SB) - MOVD $1012, R12 - B callbackasm1(SB) - MOVD $1013, R12 - B callbackasm1(SB) - MOVD $1014, R12 - B callbackasm1(SB) - MOVD $1015, R12 - B callbackasm1(SB) - MOVD $1016, R12 - B callbackasm1(SB) - MOVD $1017, R12 - B callbackasm1(SB) - MOVD $1018, R12 - B callbackasm1(SB) - MOVD $1019, R12 - B callbackasm1(SB) - MOVD $1020, R12 - B callbackasm1(SB) - MOVD $1021, R12 - B callbackasm1(SB) - MOVD $1022, R12 - B callbackasm1(SB) - MOVD $1023, R12 - B callbackasm1(SB) - MOVD $1024, R12 - B callbackasm1(SB) - MOVD $1025, R12 - B callbackasm1(SB) - MOVD $1026, R12 - B callbackasm1(SB) - MOVD $1027, R12 - B callbackasm1(SB) - MOVD $1028, R12 - B callbackasm1(SB) - MOVD $1029, R12 - B callbackasm1(SB) - MOVD $1030, R12 - B callbackasm1(SB) - MOVD $1031, R12 - B callbackasm1(SB) - MOVD $1032, R12 - B callbackasm1(SB) - MOVD $1033, R12 - B callbackasm1(SB) - MOVD $1034, R12 - B callbackasm1(SB) - MOVD $1035, R12 - B callbackasm1(SB) - MOVD $1036, R12 - B callbackasm1(SB) - MOVD $1037, R12 - B callbackasm1(SB) - MOVD $1038, R12 - B callbackasm1(SB) - MOVD $1039, R12 - B callbackasm1(SB) - MOVD $1040, R12 - B callbackasm1(SB) - MOVD $1041, R12 - B callbackasm1(SB) - MOVD $1042, R12 - B callbackasm1(SB) - MOVD $1043, R12 - B callbackasm1(SB) - MOVD $1044, R12 - B callbackasm1(SB) - MOVD $1045, R12 - B callbackasm1(SB) - MOVD $1046, R12 - B callbackasm1(SB) - MOVD $1047, R12 - B callbackasm1(SB) - MOVD $1048, R12 - B callbackasm1(SB) - MOVD $1049, R12 - B callbackasm1(SB) - MOVD $1050, R12 - B callbackasm1(SB) - MOVD $1051, R12 - B callbackasm1(SB) - MOVD $1052, R12 - B callbackasm1(SB) - MOVD $1053, R12 - B callbackasm1(SB) - MOVD $1054, R12 - B callbackasm1(SB) - MOVD $1055, R12 - B callbackasm1(SB) - MOVD $1056, R12 - B callbackasm1(SB) - MOVD $1057, R12 - B callbackasm1(SB) - MOVD $1058, R12 - B callbackasm1(SB) - MOVD $1059, R12 - B callbackasm1(SB) - MOVD $1060, R12 - B callbackasm1(SB) - MOVD $1061, R12 - B callbackasm1(SB) - MOVD $1062, R12 - B callbackasm1(SB) - MOVD $1063, R12 - B callbackasm1(SB) - MOVD $1064, R12 - B callbackasm1(SB) - MOVD $1065, R12 - B callbackasm1(SB) - MOVD $1066, R12 - B callbackasm1(SB) - MOVD $1067, R12 - B callbackasm1(SB) - MOVD $1068, R12 - B callbackasm1(SB) - MOVD $1069, R12 - B callbackasm1(SB) - MOVD $1070, R12 - B callbackasm1(SB) - MOVD $1071, R12 - B callbackasm1(SB) - MOVD $1072, R12 - B callbackasm1(SB) - MOVD $1073, R12 - B callbackasm1(SB) - MOVD $1074, R12 - B callbackasm1(SB) - MOVD $1075, R12 - B callbackasm1(SB) - MOVD $1076, R12 - B callbackasm1(SB) - MOVD $1077, R12 - B callbackasm1(SB) - MOVD $1078, R12 - B callbackasm1(SB) - MOVD $1079, R12 - B callbackasm1(SB) - MOVD $1080, R12 - B callbackasm1(SB) - MOVD $1081, R12 - B callbackasm1(SB) - MOVD $1082, R12 - B callbackasm1(SB) - MOVD $1083, R12 - B callbackasm1(SB) - MOVD $1084, R12 - B callbackasm1(SB) - MOVD $1085, R12 - B callbackasm1(SB) - MOVD $1086, R12 - B callbackasm1(SB) - MOVD $1087, R12 - B callbackasm1(SB) - MOVD $1088, R12 - B callbackasm1(SB) - MOVD $1089, R12 - B callbackasm1(SB) - MOVD $1090, R12 - B callbackasm1(SB) - MOVD $1091, R12 - B callbackasm1(SB) - MOVD $1092, R12 - B callbackasm1(SB) - MOVD $1093, R12 - B callbackasm1(SB) - MOVD $1094, R12 - B callbackasm1(SB) - MOVD $1095, R12 - B callbackasm1(SB) - MOVD $1096, R12 - B callbackasm1(SB) - MOVD $1097, R12 - B callbackasm1(SB) - MOVD $1098, R12 - B callbackasm1(SB) - MOVD $1099, R12 - B callbackasm1(SB) - MOVD $1100, R12 - B callbackasm1(SB) - MOVD $1101, R12 - B callbackasm1(SB) - MOVD $1102, R12 - B callbackasm1(SB) - MOVD $1103, R12 - B callbackasm1(SB) - MOVD $1104, R12 - B callbackasm1(SB) - MOVD $1105, R12 - B callbackasm1(SB) - MOVD $1106, R12 - B callbackasm1(SB) - MOVD $1107, R12 - B callbackasm1(SB) - MOVD $1108, R12 - B callbackasm1(SB) - MOVD $1109, R12 - B callbackasm1(SB) - MOVD $1110, R12 - B callbackasm1(SB) - MOVD $1111, R12 - B callbackasm1(SB) - MOVD $1112, R12 - B callbackasm1(SB) - MOVD $1113, R12 - B callbackasm1(SB) - MOVD $1114, R12 - B callbackasm1(SB) - MOVD $1115, R12 - B callbackasm1(SB) - MOVD $1116, R12 - B callbackasm1(SB) - MOVD $1117, R12 - B callbackasm1(SB) - MOVD $1118, R12 - B callbackasm1(SB) - MOVD $1119, R12 - B callbackasm1(SB) - MOVD $1120, R12 - B callbackasm1(SB) - MOVD $1121, R12 - B callbackasm1(SB) - MOVD $1122, R12 - B callbackasm1(SB) - MOVD $1123, R12 - B callbackasm1(SB) - MOVD $1124, R12 - B callbackasm1(SB) - MOVD $1125, R12 - B callbackasm1(SB) - MOVD $1126, R12 - B callbackasm1(SB) - MOVD $1127, R12 - B callbackasm1(SB) - MOVD $1128, R12 - B callbackasm1(SB) - MOVD $1129, R12 - B callbackasm1(SB) - MOVD $1130, R12 - B callbackasm1(SB) - MOVD $1131, R12 - B callbackasm1(SB) - MOVD $1132, R12 - B callbackasm1(SB) - MOVD $1133, R12 - B callbackasm1(SB) - MOVD $1134, R12 - B callbackasm1(SB) - MOVD $1135, R12 - B callbackasm1(SB) - MOVD $1136, R12 - B callbackasm1(SB) - MOVD $1137, R12 - B callbackasm1(SB) - MOVD $1138, R12 - B callbackasm1(SB) - MOVD $1139, R12 - B callbackasm1(SB) - MOVD $1140, R12 - B callbackasm1(SB) - MOVD $1141, R12 - B callbackasm1(SB) - MOVD $1142, R12 - B callbackasm1(SB) - MOVD $1143, R12 - B callbackasm1(SB) - MOVD $1144, R12 - B callbackasm1(SB) - MOVD $1145, R12 - B callbackasm1(SB) - MOVD $1146, R12 - B callbackasm1(SB) - MOVD $1147, R12 - B callbackasm1(SB) - MOVD $1148, R12 - B callbackasm1(SB) - MOVD $1149, R12 - B callbackasm1(SB) - MOVD $1150, R12 - B callbackasm1(SB) - MOVD $1151, R12 - B callbackasm1(SB) - MOVD $1152, R12 - B callbackasm1(SB) - MOVD $1153, R12 - B callbackasm1(SB) - MOVD $1154, R12 - B callbackasm1(SB) - MOVD $1155, R12 - B callbackasm1(SB) - MOVD $1156, R12 - B callbackasm1(SB) - MOVD $1157, R12 - B callbackasm1(SB) - MOVD $1158, R12 - B callbackasm1(SB) - MOVD $1159, R12 - B callbackasm1(SB) - MOVD $1160, R12 - B callbackasm1(SB) - MOVD $1161, R12 - B callbackasm1(SB) - MOVD $1162, R12 - B callbackasm1(SB) - MOVD $1163, R12 - B callbackasm1(SB) - MOVD $1164, R12 - B callbackasm1(SB) - MOVD $1165, R12 - B callbackasm1(SB) - MOVD $1166, R12 - B callbackasm1(SB) - MOVD $1167, R12 - B callbackasm1(SB) - MOVD $1168, R12 - B callbackasm1(SB) - MOVD $1169, R12 - B callbackasm1(SB) - MOVD $1170, R12 - B callbackasm1(SB) - MOVD $1171, R12 - B callbackasm1(SB) - MOVD $1172, R12 - B callbackasm1(SB) - MOVD $1173, R12 - B callbackasm1(SB) - MOVD $1174, R12 - B callbackasm1(SB) - MOVD $1175, R12 - B callbackasm1(SB) - MOVD $1176, R12 - B callbackasm1(SB) - MOVD $1177, R12 - B callbackasm1(SB) - MOVD $1178, R12 - B callbackasm1(SB) - MOVD $1179, R12 - B callbackasm1(SB) - MOVD $1180, R12 - B callbackasm1(SB) - MOVD $1181, R12 - B callbackasm1(SB) - MOVD $1182, R12 - B callbackasm1(SB) - MOVD $1183, R12 - B callbackasm1(SB) - MOVD $1184, R12 - B callbackasm1(SB) - MOVD $1185, R12 - B callbackasm1(SB) - MOVD $1186, R12 - B callbackasm1(SB) - MOVD $1187, R12 - B callbackasm1(SB) - MOVD $1188, R12 - B callbackasm1(SB) - MOVD $1189, R12 - B callbackasm1(SB) - MOVD $1190, R12 - B callbackasm1(SB) - MOVD $1191, R12 - B callbackasm1(SB) - MOVD $1192, R12 - B callbackasm1(SB) - MOVD $1193, R12 - B callbackasm1(SB) - MOVD $1194, R12 - B callbackasm1(SB) - MOVD $1195, R12 - B callbackasm1(SB) - MOVD $1196, R12 - B callbackasm1(SB) - MOVD $1197, R12 - B callbackasm1(SB) - MOVD $1198, R12 - B callbackasm1(SB) - MOVD $1199, R12 - B callbackasm1(SB) - MOVD $1200, R12 - B callbackasm1(SB) - MOVD $1201, R12 - B callbackasm1(SB) - MOVD $1202, R12 - B callbackasm1(SB) - MOVD $1203, R12 - B callbackasm1(SB) - MOVD $1204, R12 - B callbackasm1(SB) - MOVD $1205, R12 - B callbackasm1(SB) - MOVD $1206, R12 - B callbackasm1(SB) - MOVD $1207, R12 - B callbackasm1(SB) - MOVD $1208, R12 - B callbackasm1(SB) - MOVD $1209, R12 - B callbackasm1(SB) - MOVD $1210, R12 - B callbackasm1(SB) - MOVD $1211, R12 - B callbackasm1(SB) - MOVD $1212, R12 - B callbackasm1(SB) - MOVD $1213, R12 - B callbackasm1(SB) - MOVD $1214, R12 - B callbackasm1(SB) - MOVD $1215, R12 - B callbackasm1(SB) - MOVD $1216, R12 - B callbackasm1(SB) - MOVD $1217, R12 - B callbackasm1(SB) - MOVD $1218, R12 - B callbackasm1(SB) - MOVD $1219, R12 - B callbackasm1(SB) - MOVD $1220, R12 - B callbackasm1(SB) - MOVD $1221, R12 - B callbackasm1(SB) - MOVD $1222, R12 - B callbackasm1(SB) - MOVD $1223, R12 - B callbackasm1(SB) - MOVD $1224, R12 - B callbackasm1(SB) - MOVD $1225, R12 - B callbackasm1(SB) - MOVD $1226, R12 - B callbackasm1(SB) - MOVD $1227, R12 - B callbackasm1(SB) - MOVD $1228, R12 - B callbackasm1(SB) - MOVD $1229, R12 - B callbackasm1(SB) - MOVD $1230, R12 - B callbackasm1(SB) - MOVD $1231, R12 - B callbackasm1(SB) - MOVD $1232, R12 - B callbackasm1(SB) - MOVD $1233, R12 - B callbackasm1(SB) - MOVD $1234, R12 - B callbackasm1(SB) - MOVD $1235, R12 - B callbackasm1(SB) - MOVD $1236, R12 - B callbackasm1(SB) - MOVD $1237, R12 - B callbackasm1(SB) - MOVD $1238, R12 - B callbackasm1(SB) - MOVD $1239, R12 - B callbackasm1(SB) - MOVD $1240, R12 - B callbackasm1(SB) - MOVD $1241, R12 - B callbackasm1(SB) - MOVD $1242, R12 - B callbackasm1(SB) - MOVD $1243, R12 - B callbackasm1(SB) - MOVD $1244, R12 - B callbackasm1(SB) - MOVD $1245, R12 - B callbackasm1(SB) - MOVD $1246, R12 - B callbackasm1(SB) - MOVD $1247, R12 - B callbackasm1(SB) - MOVD $1248, R12 - B callbackasm1(SB) - MOVD $1249, R12 - B callbackasm1(SB) - MOVD $1250, R12 - B callbackasm1(SB) - MOVD $1251, R12 - B callbackasm1(SB) - MOVD $1252, R12 - B callbackasm1(SB) - MOVD $1253, R12 - B callbackasm1(SB) - MOVD $1254, R12 - B callbackasm1(SB) - MOVD $1255, R12 - B callbackasm1(SB) - MOVD $1256, R12 - B callbackasm1(SB) - MOVD $1257, R12 - B callbackasm1(SB) - MOVD $1258, R12 - B callbackasm1(SB) - MOVD $1259, R12 - B callbackasm1(SB) - MOVD $1260, R12 - B callbackasm1(SB) - MOVD $1261, R12 - B callbackasm1(SB) - MOVD $1262, R12 - B callbackasm1(SB) - MOVD $1263, R12 - B callbackasm1(SB) - MOVD $1264, R12 - B callbackasm1(SB) - MOVD $1265, R12 - B callbackasm1(SB) - MOVD $1266, R12 - B callbackasm1(SB) - MOVD $1267, R12 - B callbackasm1(SB) - MOVD $1268, R12 - B callbackasm1(SB) - MOVD $1269, R12 - B callbackasm1(SB) - MOVD $1270, R12 - B callbackasm1(SB) - MOVD $1271, R12 - B callbackasm1(SB) - MOVD $1272, R12 - B callbackasm1(SB) - MOVD $1273, R12 - B callbackasm1(SB) - MOVD $1274, R12 - B callbackasm1(SB) - MOVD $1275, R12 - B callbackasm1(SB) - MOVD $1276, R12 - B callbackasm1(SB) - MOVD $1277, R12 - B callbackasm1(SB) - MOVD $1278, R12 - B callbackasm1(SB) - MOVD $1279, R12 - B callbackasm1(SB) - MOVD $1280, R12 - B callbackasm1(SB) - MOVD $1281, R12 - B callbackasm1(SB) - MOVD $1282, R12 - B callbackasm1(SB) - MOVD $1283, R12 - B callbackasm1(SB) - MOVD $1284, R12 - B callbackasm1(SB) - MOVD $1285, R12 - B callbackasm1(SB) - MOVD $1286, R12 - B callbackasm1(SB) - MOVD $1287, R12 - B callbackasm1(SB) - MOVD $1288, R12 - B callbackasm1(SB) - MOVD $1289, R12 - B callbackasm1(SB) - MOVD $1290, R12 - B callbackasm1(SB) - MOVD $1291, R12 - B callbackasm1(SB) - MOVD $1292, R12 - B callbackasm1(SB) - MOVD $1293, R12 - B callbackasm1(SB) - MOVD $1294, R12 - B callbackasm1(SB) - MOVD $1295, R12 - B callbackasm1(SB) - MOVD $1296, R12 - B callbackasm1(SB) - MOVD $1297, R12 - B callbackasm1(SB) - MOVD $1298, R12 - B callbackasm1(SB) - MOVD $1299, R12 - B callbackasm1(SB) - MOVD $1300, R12 - B callbackasm1(SB) - MOVD $1301, R12 - B callbackasm1(SB) - MOVD $1302, R12 - B callbackasm1(SB) - MOVD $1303, R12 - B callbackasm1(SB) - MOVD $1304, R12 - B callbackasm1(SB) - MOVD $1305, R12 - B callbackasm1(SB) - MOVD $1306, R12 - B callbackasm1(SB) - MOVD $1307, R12 - B callbackasm1(SB) - MOVD $1308, R12 - B callbackasm1(SB) - MOVD $1309, R12 - B callbackasm1(SB) - MOVD $1310, R12 - B callbackasm1(SB) - MOVD $1311, R12 - B callbackasm1(SB) - MOVD $1312, R12 - B callbackasm1(SB) - MOVD $1313, R12 - B callbackasm1(SB) - MOVD $1314, R12 - B callbackasm1(SB) - MOVD $1315, R12 - B callbackasm1(SB) - MOVD $1316, R12 - B callbackasm1(SB) - MOVD $1317, R12 - B callbackasm1(SB) - MOVD $1318, R12 - B callbackasm1(SB) - MOVD $1319, R12 - B callbackasm1(SB) - MOVD $1320, R12 - B callbackasm1(SB) - MOVD $1321, R12 - B callbackasm1(SB) - MOVD $1322, R12 - B callbackasm1(SB) - MOVD $1323, R12 - B callbackasm1(SB) - MOVD $1324, R12 - B callbackasm1(SB) - MOVD $1325, R12 - B callbackasm1(SB) - MOVD $1326, R12 - B callbackasm1(SB) - MOVD $1327, R12 - B callbackasm1(SB) - MOVD $1328, R12 - B callbackasm1(SB) - MOVD $1329, R12 - B callbackasm1(SB) - MOVD $1330, R12 - B callbackasm1(SB) - MOVD $1331, R12 - B callbackasm1(SB) - MOVD $1332, R12 - B callbackasm1(SB) - MOVD $1333, R12 - B callbackasm1(SB) - MOVD $1334, R12 - B callbackasm1(SB) - MOVD $1335, R12 - B callbackasm1(SB) - MOVD $1336, R12 - B callbackasm1(SB) - MOVD $1337, R12 - B callbackasm1(SB) - MOVD $1338, R12 - B callbackasm1(SB) - MOVD $1339, R12 - B callbackasm1(SB) - MOVD $1340, R12 - B callbackasm1(SB) - MOVD $1341, R12 - B callbackasm1(SB) - MOVD $1342, R12 - B callbackasm1(SB) - MOVD $1343, R12 - B callbackasm1(SB) - MOVD $1344, R12 - B callbackasm1(SB) - MOVD $1345, R12 - B callbackasm1(SB) - MOVD $1346, R12 - B callbackasm1(SB) - MOVD $1347, R12 - B callbackasm1(SB) - MOVD $1348, R12 - B callbackasm1(SB) - MOVD $1349, R12 - B callbackasm1(SB) - MOVD $1350, R12 - B callbackasm1(SB) - MOVD $1351, R12 - B callbackasm1(SB) - MOVD $1352, R12 - B callbackasm1(SB) - MOVD $1353, R12 - B callbackasm1(SB) - MOVD $1354, R12 - B callbackasm1(SB) - MOVD $1355, R12 - B callbackasm1(SB) - MOVD $1356, R12 - B callbackasm1(SB) - MOVD $1357, R12 - B callbackasm1(SB) - MOVD $1358, R12 - B callbackasm1(SB) - MOVD $1359, R12 - B callbackasm1(SB) - MOVD $1360, R12 - B callbackasm1(SB) - MOVD $1361, R12 - B callbackasm1(SB) - MOVD $1362, R12 - B callbackasm1(SB) - MOVD $1363, R12 - B callbackasm1(SB) - MOVD $1364, R12 - B callbackasm1(SB) - MOVD $1365, R12 - B callbackasm1(SB) - MOVD $1366, R12 - B callbackasm1(SB) - MOVD $1367, R12 - B callbackasm1(SB) - MOVD $1368, R12 - B callbackasm1(SB) - MOVD $1369, R12 - B callbackasm1(SB) - MOVD $1370, R12 - B callbackasm1(SB) - MOVD $1371, R12 - B callbackasm1(SB) - MOVD $1372, R12 - B callbackasm1(SB) - MOVD $1373, R12 - B callbackasm1(SB) - MOVD $1374, R12 - B callbackasm1(SB) - MOVD $1375, R12 - B callbackasm1(SB) - MOVD $1376, R12 - B callbackasm1(SB) - MOVD $1377, R12 - B callbackasm1(SB) - MOVD $1378, R12 - B callbackasm1(SB) - MOVD $1379, R12 - B callbackasm1(SB) - MOVD $1380, R12 - B callbackasm1(SB) - MOVD $1381, R12 - B callbackasm1(SB) - MOVD $1382, R12 - B callbackasm1(SB) - MOVD $1383, R12 - B callbackasm1(SB) - MOVD $1384, R12 - B callbackasm1(SB) - MOVD $1385, R12 - B callbackasm1(SB) - MOVD $1386, R12 - B callbackasm1(SB) - MOVD $1387, R12 - B callbackasm1(SB) - MOVD $1388, R12 - B callbackasm1(SB) - MOVD $1389, R12 - B callbackasm1(SB) - MOVD $1390, R12 - B callbackasm1(SB) - MOVD $1391, R12 - B callbackasm1(SB) - MOVD $1392, R12 - B callbackasm1(SB) - MOVD $1393, R12 - B callbackasm1(SB) - MOVD $1394, R12 - B callbackasm1(SB) - MOVD $1395, R12 - B callbackasm1(SB) - MOVD $1396, R12 - B callbackasm1(SB) - MOVD $1397, R12 - B callbackasm1(SB) - MOVD $1398, R12 - B callbackasm1(SB) - MOVD $1399, R12 - B callbackasm1(SB) - MOVD $1400, R12 - B callbackasm1(SB) - MOVD $1401, R12 - B callbackasm1(SB) - MOVD $1402, R12 - B callbackasm1(SB) - MOVD $1403, R12 - B callbackasm1(SB) - MOVD $1404, R12 - B callbackasm1(SB) - MOVD $1405, R12 - B callbackasm1(SB) - MOVD $1406, R12 - B callbackasm1(SB) - MOVD $1407, R12 - B callbackasm1(SB) - MOVD $1408, R12 - B callbackasm1(SB) - MOVD $1409, R12 - B callbackasm1(SB) - MOVD $1410, R12 - B callbackasm1(SB) - MOVD $1411, R12 - B callbackasm1(SB) - MOVD $1412, R12 - B callbackasm1(SB) - MOVD $1413, R12 - B callbackasm1(SB) - MOVD $1414, R12 - B callbackasm1(SB) - MOVD $1415, R12 - B callbackasm1(SB) - MOVD $1416, R12 - B callbackasm1(SB) - MOVD $1417, R12 - B callbackasm1(SB) - MOVD $1418, R12 - B callbackasm1(SB) - MOVD $1419, R12 - B callbackasm1(SB) - MOVD $1420, R12 - B callbackasm1(SB) - MOVD $1421, R12 - B callbackasm1(SB) - MOVD $1422, R12 - B callbackasm1(SB) - MOVD $1423, R12 - B callbackasm1(SB) - MOVD $1424, R12 - B callbackasm1(SB) - MOVD $1425, R12 - B callbackasm1(SB) - MOVD $1426, R12 - B callbackasm1(SB) - MOVD $1427, R12 - B callbackasm1(SB) - MOVD $1428, R12 - B callbackasm1(SB) - MOVD $1429, R12 - B callbackasm1(SB) - MOVD $1430, R12 - B callbackasm1(SB) - MOVD $1431, R12 - B callbackasm1(SB) - MOVD $1432, R12 - B callbackasm1(SB) - MOVD $1433, R12 - B callbackasm1(SB) - MOVD $1434, R12 - B callbackasm1(SB) - MOVD $1435, R12 - B callbackasm1(SB) - MOVD $1436, R12 - B callbackasm1(SB) - MOVD $1437, R12 - B callbackasm1(SB) - MOVD $1438, R12 - B callbackasm1(SB) - MOVD $1439, R12 - B callbackasm1(SB) - MOVD $1440, R12 - B callbackasm1(SB) - MOVD $1441, R12 - B callbackasm1(SB) - MOVD $1442, R12 - B callbackasm1(SB) - MOVD $1443, R12 - B callbackasm1(SB) - MOVD $1444, R12 - B callbackasm1(SB) - MOVD $1445, R12 - B callbackasm1(SB) - MOVD $1446, R12 - B callbackasm1(SB) - MOVD $1447, R12 - B callbackasm1(SB) - MOVD $1448, R12 - B callbackasm1(SB) - MOVD $1449, R12 - B callbackasm1(SB) - MOVD $1450, R12 - B callbackasm1(SB) - MOVD $1451, R12 - B callbackasm1(SB) - MOVD $1452, R12 - B callbackasm1(SB) - MOVD $1453, R12 - B callbackasm1(SB) - MOVD $1454, R12 - B callbackasm1(SB) - MOVD $1455, R12 - B callbackasm1(SB) - MOVD $1456, R12 - B callbackasm1(SB) - MOVD $1457, R12 - B callbackasm1(SB) - MOVD $1458, R12 - B callbackasm1(SB) - MOVD $1459, R12 - B callbackasm1(SB) - MOVD $1460, R12 - B callbackasm1(SB) - MOVD $1461, R12 - B callbackasm1(SB) - MOVD $1462, R12 - B callbackasm1(SB) - MOVD $1463, R12 - B callbackasm1(SB) - MOVD $1464, R12 - B callbackasm1(SB) - MOVD $1465, R12 - B callbackasm1(SB) - MOVD $1466, R12 - B callbackasm1(SB) - MOVD $1467, R12 - B callbackasm1(SB) - MOVD $1468, R12 - B callbackasm1(SB) - MOVD $1469, R12 - B callbackasm1(SB) - MOVD $1470, R12 - B callbackasm1(SB) - MOVD $1471, R12 - B callbackasm1(SB) - MOVD $1472, R12 - B callbackasm1(SB) - MOVD $1473, R12 - B callbackasm1(SB) - MOVD $1474, R12 - B callbackasm1(SB) - MOVD $1475, R12 - B callbackasm1(SB) - MOVD $1476, R12 - B callbackasm1(SB) - MOVD $1477, R12 - B callbackasm1(SB) - MOVD $1478, R12 - B callbackasm1(SB) - MOVD $1479, R12 - B callbackasm1(SB) - MOVD $1480, R12 - B callbackasm1(SB) - MOVD $1481, R12 - B callbackasm1(SB) - MOVD $1482, R12 - B callbackasm1(SB) - MOVD $1483, R12 - B callbackasm1(SB) - MOVD $1484, R12 - B callbackasm1(SB) - MOVD $1485, R12 - B callbackasm1(SB) - MOVD $1486, R12 - B callbackasm1(SB) - MOVD $1487, R12 - B callbackasm1(SB) - MOVD $1488, R12 - B callbackasm1(SB) - MOVD $1489, R12 - B callbackasm1(SB) - MOVD $1490, R12 - B callbackasm1(SB) - MOVD $1491, R12 - B callbackasm1(SB) - MOVD $1492, R12 - B callbackasm1(SB) - MOVD $1493, R12 - B callbackasm1(SB) - MOVD $1494, R12 - B callbackasm1(SB) - MOVD $1495, R12 - B callbackasm1(SB) - MOVD $1496, R12 - B callbackasm1(SB) - MOVD $1497, R12 - B callbackasm1(SB) - MOVD $1498, R12 - B callbackasm1(SB) - MOVD $1499, R12 - B callbackasm1(SB) - MOVD $1500, R12 - B callbackasm1(SB) - MOVD $1501, R12 - B callbackasm1(SB) - MOVD $1502, R12 - B callbackasm1(SB) - MOVD $1503, R12 - B callbackasm1(SB) - MOVD $1504, R12 - B callbackasm1(SB) - MOVD $1505, R12 - B callbackasm1(SB) - MOVD $1506, R12 - B callbackasm1(SB) - MOVD $1507, R12 - B callbackasm1(SB) - MOVD $1508, R12 - B callbackasm1(SB) - MOVD $1509, R12 - B callbackasm1(SB) - MOVD $1510, R12 - B callbackasm1(SB) - MOVD $1511, R12 - B callbackasm1(SB) - MOVD $1512, R12 - B callbackasm1(SB) - MOVD $1513, R12 - B callbackasm1(SB) - MOVD $1514, R12 - B callbackasm1(SB) - MOVD $1515, R12 - B callbackasm1(SB) - MOVD $1516, R12 - B callbackasm1(SB) - MOVD $1517, R12 - B callbackasm1(SB) - MOVD $1518, R12 - B callbackasm1(SB) - MOVD $1519, R12 - B callbackasm1(SB) - MOVD $1520, R12 - B callbackasm1(SB) - MOVD $1521, R12 - B callbackasm1(SB) - MOVD $1522, R12 - B callbackasm1(SB) - MOVD $1523, R12 - B callbackasm1(SB) - MOVD $1524, R12 - B callbackasm1(SB) - MOVD $1525, R12 - B callbackasm1(SB) - MOVD $1526, R12 - B callbackasm1(SB) - MOVD $1527, R12 - B callbackasm1(SB) - MOVD $1528, R12 - B callbackasm1(SB) - MOVD $1529, R12 - B callbackasm1(SB) - MOVD $1530, R12 - B callbackasm1(SB) - MOVD $1531, R12 - B callbackasm1(SB) - MOVD $1532, R12 - B callbackasm1(SB) - MOVD $1533, R12 - B callbackasm1(SB) - MOVD $1534, R12 - B callbackasm1(SB) - MOVD $1535, R12 - B callbackasm1(SB) - MOVD $1536, R12 - B callbackasm1(SB) - MOVD $1537, R12 - B callbackasm1(SB) - MOVD $1538, R12 - B callbackasm1(SB) - MOVD $1539, R12 - B callbackasm1(SB) - MOVD $1540, R12 - B callbackasm1(SB) - MOVD $1541, R12 - B callbackasm1(SB) - MOVD $1542, R12 - B callbackasm1(SB) - MOVD $1543, R12 - B callbackasm1(SB) - MOVD $1544, R12 - B callbackasm1(SB) - MOVD $1545, R12 - B callbackasm1(SB) - MOVD $1546, R12 - B callbackasm1(SB) - MOVD $1547, R12 - B callbackasm1(SB) - MOVD $1548, R12 - B callbackasm1(SB) - MOVD $1549, R12 - B callbackasm1(SB) - MOVD $1550, R12 - B callbackasm1(SB) - MOVD $1551, R12 - B callbackasm1(SB) - MOVD $1552, R12 - B callbackasm1(SB) - MOVD $1553, R12 - B callbackasm1(SB) - MOVD $1554, R12 - B callbackasm1(SB) - MOVD $1555, R12 - B callbackasm1(SB) - MOVD $1556, R12 - B callbackasm1(SB) - MOVD $1557, R12 - B callbackasm1(SB) - MOVD $1558, R12 - B callbackasm1(SB) - MOVD $1559, R12 - B callbackasm1(SB) - MOVD $1560, R12 - B callbackasm1(SB) - MOVD $1561, R12 - B callbackasm1(SB) - MOVD $1562, R12 - B callbackasm1(SB) - MOVD $1563, R12 - B callbackasm1(SB) - MOVD $1564, R12 - B callbackasm1(SB) - MOVD $1565, R12 - B callbackasm1(SB) - MOVD $1566, R12 - B callbackasm1(SB) - MOVD $1567, R12 - B callbackasm1(SB) - MOVD $1568, R12 - B callbackasm1(SB) - MOVD $1569, R12 - B callbackasm1(SB) - MOVD $1570, R12 - B callbackasm1(SB) - MOVD $1571, R12 - B callbackasm1(SB) - MOVD $1572, R12 - B callbackasm1(SB) - MOVD $1573, R12 - B callbackasm1(SB) - MOVD $1574, R12 - B callbackasm1(SB) - MOVD $1575, R12 - B callbackasm1(SB) - MOVD $1576, R12 - B callbackasm1(SB) - MOVD $1577, R12 - B callbackasm1(SB) - MOVD $1578, R12 - B callbackasm1(SB) - MOVD $1579, R12 - B callbackasm1(SB) - MOVD $1580, R12 - B callbackasm1(SB) - MOVD $1581, R12 - B callbackasm1(SB) - MOVD $1582, R12 - B callbackasm1(SB) - MOVD $1583, R12 - B callbackasm1(SB) - MOVD $1584, R12 - B callbackasm1(SB) - MOVD $1585, R12 - B callbackasm1(SB) - MOVD $1586, R12 - B callbackasm1(SB) - MOVD $1587, R12 - B callbackasm1(SB) - MOVD $1588, R12 - B callbackasm1(SB) - MOVD $1589, R12 - B callbackasm1(SB) - MOVD $1590, R12 - B callbackasm1(SB) - MOVD $1591, R12 - B callbackasm1(SB) - MOVD $1592, R12 - B callbackasm1(SB) - MOVD $1593, R12 - B callbackasm1(SB) - MOVD $1594, R12 - B callbackasm1(SB) - MOVD $1595, R12 - B callbackasm1(SB) - MOVD $1596, R12 - B callbackasm1(SB) - MOVD $1597, R12 - B callbackasm1(SB) - MOVD $1598, R12 - B callbackasm1(SB) - MOVD $1599, R12 - B callbackasm1(SB) - MOVD $1600, R12 - B callbackasm1(SB) - MOVD $1601, R12 - B callbackasm1(SB) - MOVD $1602, R12 - B callbackasm1(SB) - MOVD $1603, R12 - B callbackasm1(SB) - MOVD $1604, R12 - B callbackasm1(SB) - MOVD $1605, R12 - B callbackasm1(SB) - MOVD $1606, R12 - B callbackasm1(SB) - MOVD $1607, R12 - B callbackasm1(SB) - MOVD $1608, R12 - B callbackasm1(SB) - MOVD $1609, R12 - B callbackasm1(SB) - MOVD $1610, R12 - B callbackasm1(SB) - MOVD $1611, R12 - B callbackasm1(SB) - MOVD $1612, R12 - B callbackasm1(SB) - MOVD $1613, R12 - B callbackasm1(SB) - MOVD $1614, R12 - B callbackasm1(SB) - MOVD $1615, R12 - B callbackasm1(SB) - MOVD $1616, R12 - B callbackasm1(SB) - MOVD $1617, R12 - B callbackasm1(SB) - MOVD $1618, R12 - B callbackasm1(SB) - MOVD $1619, R12 - B callbackasm1(SB) - MOVD $1620, R12 - B callbackasm1(SB) - MOVD $1621, R12 - B callbackasm1(SB) - MOVD $1622, R12 - B callbackasm1(SB) - MOVD $1623, R12 - B callbackasm1(SB) - MOVD $1624, R12 - B callbackasm1(SB) - MOVD $1625, R12 - B callbackasm1(SB) - MOVD $1626, R12 - B callbackasm1(SB) - MOVD $1627, R12 - B callbackasm1(SB) - MOVD $1628, R12 - B callbackasm1(SB) - MOVD $1629, R12 - B callbackasm1(SB) - MOVD $1630, R12 - B callbackasm1(SB) - MOVD $1631, R12 - B callbackasm1(SB) - MOVD $1632, R12 - B callbackasm1(SB) - MOVD $1633, R12 - B callbackasm1(SB) - MOVD $1634, R12 - B callbackasm1(SB) - MOVD $1635, R12 - B callbackasm1(SB) - MOVD $1636, R12 - B callbackasm1(SB) - MOVD $1637, R12 - B callbackasm1(SB) - MOVD $1638, R12 - B callbackasm1(SB) - MOVD $1639, R12 - B callbackasm1(SB) - MOVD $1640, R12 - B callbackasm1(SB) - MOVD $1641, R12 - B callbackasm1(SB) - MOVD $1642, R12 - B callbackasm1(SB) - MOVD $1643, R12 - B callbackasm1(SB) - MOVD $1644, R12 - B callbackasm1(SB) - MOVD $1645, R12 - B callbackasm1(SB) - MOVD $1646, R12 - B callbackasm1(SB) - MOVD $1647, R12 - B callbackasm1(SB) - MOVD $1648, R12 - B callbackasm1(SB) - MOVD $1649, R12 - B callbackasm1(SB) - MOVD $1650, R12 - B callbackasm1(SB) - MOVD $1651, R12 - B callbackasm1(SB) - MOVD $1652, R12 - B callbackasm1(SB) - MOVD $1653, R12 - B callbackasm1(SB) - MOVD $1654, R12 - B callbackasm1(SB) - MOVD $1655, R12 - B callbackasm1(SB) - MOVD $1656, R12 - B callbackasm1(SB) - MOVD $1657, R12 - B callbackasm1(SB) - MOVD $1658, R12 - B callbackasm1(SB) - MOVD $1659, R12 - B callbackasm1(SB) - MOVD $1660, R12 - B callbackasm1(SB) - MOVD $1661, R12 - B callbackasm1(SB) - MOVD $1662, R12 - B callbackasm1(SB) - MOVD $1663, R12 - B callbackasm1(SB) - MOVD $1664, R12 - B callbackasm1(SB) - MOVD $1665, R12 - B callbackasm1(SB) - MOVD $1666, R12 - B callbackasm1(SB) - MOVD $1667, R12 - B callbackasm1(SB) - MOVD $1668, R12 - B callbackasm1(SB) - MOVD $1669, R12 - B callbackasm1(SB) - MOVD $1670, R12 - B callbackasm1(SB) - MOVD $1671, R12 - B callbackasm1(SB) - MOVD $1672, R12 - B callbackasm1(SB) - MOVD $1673, R12 - B callbackasm1(SB) - MOVD $1674, R12 - B callbackasm1(SB) - MOVD $1675, R12 - B callbackasm1(SB) - MOVD $1676, R12 - B callbackasm1(SB) - MOVD $1677, R12 - B callbackasm1(SB) - MOVD $1678, R12 - B callbackasm1(SB) - MOVD $1679, R12 - B callbackasm1(SB) - MOVD $1680, R12 - B callbackasm1(SB) - MOVD $1681, R12 - B callbackasm1(SB) - MOVD $1682, R12 - B callbackasm1(SB) - MOVD $1683, R12 - B callbackasm1(SB) - MOVD $1684, R12 - B callbackasm1(SB) - MOVD $1685, R12 - B callbackasm1(SB) - MOVD $1686, R12 - B callbackasm1(SB) - MOVD $1687, R12 - B callbackasm1(SB) - MOVD $1688, R12 - B callbackasm1(SB) - MOVD $1689, R12 - B callbackasm1(SB) - MOVD $1690, R12 - B callbackasm1(SB) - MOVD $1691, R12 - B callbackasm1(SB) - MOVD $1692, R12 - B callbackasm1(SB) - MOVD $1693, R12 - B callbackasm1(SB) - MOVD $1694, R12 - B callbackasm1(SB) - MOVD $1695, R12 - B callbackasm1(SB) - MOVD $1696, R12 - B callbackasm1(SB) - MOVD $1697, R12 - B callbackasm1(SB) - MOVD $1698, R12 - B callbackasm1(SB) - MOVD $1699, R12 - B callbackasm1(SB) - MOVD $1700, R12 - B callbackasm1(SB) - MOVD $1701, R12 - B callbackasm1(SB) - MOVD $1702, R12 - B callbackasm1(SB) - MOVD $1703, R12 - B callbackasm1(SB) - MOVD $1704, R12 - B callbackasm1(SB) - MOVD $1705, R12 - B callbackasm1(SB) - MOVD $1706, R12 - B callbackasm1(SB) - MOVD $1707, R12 - B callbackasm1(SB) - MOVD $1708, R12 - B callbackasm1(SB) - MOVD $1709, R12 - B callbackasm1(SB) - MOVD $1710, R12 - B callbackasm1(SB) - MOVD $1711, R12 - B callbackasm1(SB) - MOVD $1712, R12 - B callbackasm1(SB) - MOVD $1713, R12 - B callbackasm1(SB) - MOVD $1714, R12 - B callbackasm1(SB) - MOVD $1715, R12 - B callbackasm1(SB) - MOVD $1716, R12 - B callbackasm1(SB) - MOVD $1717, R12 - B callbackasm1(SB) - MOVD $1718, R12 - B callbackasm1(SB) - MOVD $1719, R12 - B callbackasm1(SB) - MOVD $1720, R12 - B callbackasm1(SB) - MOVD $1721, R12 - B callbackasm1(SB) - MOVD $1722, R12 - B callbackasm1(SB) - MOVD $1723, R12 - B callbackasm1(SB) - MOVD $1724, R12 - B callbackasm1(SB) - MOVD $1725, R12 - B callbackasm1(SB) - MOVD $1726, R12 - B callbackasm1(SB) - MOVD $1727, R12 - B callbackasm1(SB) - MOVD $1728, R12 - B callbackasm1(SB) - MOVD $1729, R12 - B callbackasm1(SB) - MOVD $1730, R12 - B callbackasm1(SB) - MOVD $1731, R12 - B callbackasm1(SB) - MOVD $1732, R12 - B callbackasm1(SB) - MOVD $1733, R12 - B callbackasm1(SB) - MOVD $1734, R12 - B callbackasm1(SB) - MOVD $1735, R12 - B callbackasm1(SB) - MOVD $1736, R12 - B callbackasm1(SB) - MOVD $1737, R12 - B callbackasm1(SB) - MOVD $1738, R12 - B callbackasm1(SB) - MOVD $1739, R12 - B callbackasm1(SB) - MOVD $1740, R12 - B callbackasm1(SB) - MOVD $1741, R12 - B callbackasm1(SB) - MOVD $1742, R12 - B callbackasm1(SB) - MOVD $1743, R12 - B callbackasm1(SB) - MOVD $1744, R12 - B callbackasm1(SB) - MOVD $1745, R12 - B callbackasm1(SB) - MOVD $1746, R12 - B callbackasm1(SB) - MOVD $1747, R12 - B callbackasm1(SB) - MOVD $1748, R12 - B callbackasm1(SB) - MOVD $1749, R12 - B callbackasm1(SB) - MOVD $1750, R12 - B callbackasm1(SB) - MOVD $1751, R12 - B callbackasm1(SB) - MOVD $1752, R12 - B callbackasm1(SB) - MOVD $1753, R12 - B callbackasm1(SB) - MOVD $1754, R12 - B callbackasm1(SB) - MOVD $1755, R12 - B callbackasm1(SB) - MOVD $1756, R12 - B callbackasm1(SB) - MOVD $1757, R12 - B callbackasm1(SB) - MOVD $1758, R12 - B callbackasm1(SB) - MOVD $1759, R12 - B callbackasm1(SB) - MOVD $1760, R12 - B callbackasm1(SB) - MOVD $1761, R12 - B callbackasm1(SB) - MOVD $1762, R12 - B callbackasm1(SB) - MOVD $1763, R12 - B callbackasm1(SB) - MOVD $1764, R12 - B callbackasm1(SB) - MOVD $1765, R12 - B callbackasm1(SB) - MOVD $1766, R12 - B callbackasm1(SB) - MOVD $1767, R12 - B callbackasm1(SB) - MOVD $1768, R12 - B callbackasm1(SB) - MOVD $1769, R12 - B callbackasm1(SB) - MOVD $1770, R12 - B callbackasm1(SB) - MOVD $1771, R12 - B callbackasm1(SB) - MOVD $1772, R12 - B callbackasm1(SB) - MOVD $1773, R12 - B callbackasm1(SB) - MOVD $1774, R12 - B callbackasm1(SB) - MOVD $1775, R12 - B callbackasm1(SB) - MOVD $1776, R12 - B callbackasm1(SB) - MOVD $1777, R12 - B callbackasm1(SB) - MOVD $1778, R12 - B callbackasm1(SB) - MOVD $1779, R12 - B callbackasm1(SB) - MOVD $1780, R12 - B callbackasm1(SB) - MOVD $1781, R12 - B callbackasm1(SB) - MOVD $1782, R12 - B callbackasm1(SB) - MOVD $1783, R12 - B callbackasm1(SB) - MOVD $1784, R12 - B callbackasm1(SB) - MOVD $1785, R12 - B callbackasm1(SB) - MOVD $1786, R12 - B callbackasm1(SB) - MOVD $1787, R12 - B callbackasm1(SB) - MOVD $1788, R12 - B callbackasm1(SB) - MOVD $1789, R12 - B callbackasm1(SB) - MOVD $1790, R12 - B callbackasm1(SB) - MOVD $1791, R12 - B callbackasm1(SB) - MOVD $1792, R12 - B callbackasm1(SB) - MOVD $1793, R12 - B callbackasm1(SB) - MOVD $1794, R12 - B callbackasm1(SB) - MOVD $1795, R12 - B callbackasm1(SB) - MOVD $1796, R12 - B callbackasm1(SB) - MOVD $1797, R12 - B callbackasm1(SB) - MOVD $1798, R12 - B callbackasm1(SB) - MOVD $1799, R12 - B callbackasm1(SB) - MOVD $1800, R12 - B callbackasm1(SB) - MOVD $1801, R12 - B callbackasm1(SB) - MOVD $1802, R12 - B callbackasm1(SB) - MOVD $1803, R12 - B callbackasm1(SB) - MOVD $1804, R12 - B callbackasm1(SB) - MOVD $1805, R12 - B callbackasm1(SB) - MOVD $1806, R12 - B callbackasm1(SB) - MOVD $1807, R12 - B callbackasm1(SB) - MOVD $1808, R12 - B callbackasm1(SB) - MOVD $1809, R12 - B callbackasm1(SB) - MOVD $1810, R12 - B callbackasm1(SB) - MOVD $1811, R12 - B callbackasm1(SB) - MOVD $1812, R12 - B callbackasm1(SB) - MOVD $1813, R12 - B callbackasm1(SB) - MOVD $1814, R12 - B callbackasm1(SB) - MOVD $1815, R12 - B callbackasm1(SB) - MOVD $1816, R12 - B callbackasm1(SB) - MOVD $1817, R12 - B callbackasm1(SB) - MOVD $1818, R12 - B callbackasm1(SB) - MOVD $1819, R12 - B callbackasm1(SB) - MOVD $1820, R12 - B callbackasm1(SB) - MOVD $1821, R12 - B callbackasm1(SB) - MOVD $1822, R12 - B callbackasm1(SB) - MOVD $1823, R12 - B callbackasm1(SB) - MOVD $1824, R12 - B callbackasm1(SB) - MOVD $1825, R12 - B callbackasm1(SB) - MOVD $1826, R12 - B callbackasm1(SB) - MOVD $1827, R12 - B callbackasm1(SB) - MOVD $1828, R12 - B callbackasm1(SB) - MOVD $1829, R12 - B callbackasm1(SB) - MOVD $1830, R12 - B callbackasm1(SB) - MOVD $1831, R12 - B callbackasm1(SB) - MOVD $1832, R12 - B callbackasm1(SB) - MOVD $1833, R12 - B callbackasm1(SB) - MOVD $1834, R12 - B callbackasm1(SB) - MOVD $1835, R12 - B callbackasm1(SB) - MOVD $1836, R12 - B callbackasm1(SB) - MOVD $1837, R12 - B callbackasm1(SB) - MOVD $1838, R12 - B callbackasm1(SB) - MOVD $1839, R12 - B callbackasm1(SB) - MOVD $1840, R12 - B callbackasm1(SB) - MOVD $1841, R12 - B callbackasm1(SB) - MOVD $1842, R12 - B callbackasm1(SB) - MOVD $1843, R12 - B callbackasm1(SB) - MOVD $1844, R12 - B callbackasm1(SB) - MOVD $1845, R12 - B callbackasm1(SB) - MOVD $1846, R12 - B callbackasm1(SB) - MOVD $1847, R12 - B callbackasm1(SB) - MOVD $1848, R12 - B callbackasm1(SB) - MOVD $1849, R12 - B callbackasm1(SB) - MOVD $1850, R12 - B callbackasm1(SB) - MOVD $1851, R12 - B callbackasm1(SB) - MOVD $1852, R12 - B callbackasm1(SB) - MOVD $1853, R12 - B callbackasm1(SB) - MOVD $1854, R12 - B callbackasm1(SB) - MOVD $1855, R12 - B callbackasm1(SB) - MOVD $1856, R12 - B callbackasm1(SB) - MOVD $1857, R12 - B callbackasm1(SB) - MOVD $1858, R12 - B callbackasm1(SB) - MOVD $1859, R12 - B callbackasm1(SB) - MOVD $1860, R12 - B callbackasm1(SB) - MOVD $1861, R12 - B callbackasm1(SB) - MOVD $1862, R12 - B callbackasm1(SB) - MOVD $1863, R12 - B callbackasm1(SB) - MOVD $1864, R12 - B callbackasm1(SB) - MOVD $1865, R12 - B callbackasm1(SB) - MOVD $1866, R12 - B callbackasm1(SB) - MOVD $1867, R12 - B callbackasm1(SB) - MOVD $1868, R12 - B callbackasm1(SB) - MOVD $1869, R12 - B callbackasm1(SB) - MOVD $1870, R12 - B callbackasm1(SB) - MOVD $1871, R12 - B callbackasm1(SB) - MOVD $1872, R12 - B callbackasm1(SB) - MOVD $1873, R12 - B callbackasm1(SB) - MOVD $1874, R12 - B callbackasm1(SB) - MOVD $1875, R12 - B callbackasm1(SB) - MOVD $1876, R12 - B callbackasm1(SB) - MOVD $1877, R12 - B callbackasm1(SB) - MOVD $1878, R12 - B callbackasm1(SB) - MOVD $1879, R12 - B callbackasm1(SB) - MOVD $1880, R12 - B callbackasm1(SB) - MOVD $1881, R12 - B callbackasm1(SB) - MOVD $1882, R12 - B callbackasm1(SB) - MOVD $1883, R12 - B callbackasm1(SB) - MOVD $1884, R12 - B callbackasm1(SB) - MOVD $1885, R12 - B callbackasm1(SB) - MOVD $1886, R12 - B callbackasm1(SB) - MOVD $1887, R12 - B callbackasm1(SB) - MOVD $1888, R12 - B callbackasm1(SB) - MOVD $1889, R12 - B callbackasm1(SB) - MOVD $1890, R12 - B callbackasm1(SB) - MOVD $1891, R12 - B callbackasm1(SB) - MOVD $1892, R12 - B callbackasm1(SB) - MOVD $1893, R12 - B callbackasm1(SB) - MOVD $1894, R12 - B callbackasm1(SB) - MOVD $1895, R12 - B callbackasm1(SB) - MOVD $1896, R12 - B callbackasm1(SB) - MOVD $1897, R12 - B callbackasm1(SB) - MOVD $1898, R12 - B callbackasm1(SB) - MOVD $1899, R12 - B callbackasm1(SB) - MOVD $1900, R12 - B callbackasm1(SB) - MOVD $1901, R12 - B callbackasm1(SB) - MOVD $1902, R12 - B callbackasm1(SB) - MOVD $1903, R12 - B callbackasm1(SB) - MOVD $1904, R12 - B callbackasm1(SB) - MOVD $1905, R12 - B callbackasm1(SB) - MOVD $1906, R12 - B callbackasm1(SB) - MOVD $1907, R12 - B callbackasm1(SB) - MOVD $1908, R12 - B callbackasm1(SB) - MOVD $1909, R12 - B callbackasm1(SB) - MOVD $1910, R12 - B callbackasm1(SB) - MOVD $1911, R12 - B callbackasm1(SB) - MOVD $1912, R12 - B callbackasm1(SB) - MOVD $1913, R12 - B callbackasm1(SB) - MOVD $1914, R12 - B callbackasm1(SB) - MOVD $1915, R12 - B callbackasm1(SB) - MOVD $1916, R12 - B callbackasm1(SB) - MOVD $1917, R12 - B callbackasm1(SB) - MOVD $1918, R12 - B callbackasm1(SB) - MOVD $1919, R12 - B callbackasm1(SB) - MOVD $1920, R12 - B callbackasm1(SB) - MOVD $1921, R12 - B callbackasm1(SB) - MOVD $1922, R12 - B callbackasm1(SB) - MOVD $1923, R12 - B callbackasm1(SB) - MOVD $1924, R12 - B callbackasm1(SB) - MOVD $1925, R12 - B callbackasm1(SB) - MOVD $1926, R12 - B callbackasm1(SB) - MOVD $1927, R12 - B callbackasm1(SB) - MOVD $1928, R12 - B callbackasm1(SB) - MOVD $1929, R12 - B callbackasm1(SB) - MOVD $1930, R12 - B callbackasm1(SB) - MOVD $1931, R12 - B callbackasm1(SB) - MOVD $1932, R12 - B callbackasm1(SB) - MOVD $1933, R12 - B callbackasm1(SB) - MOVD $1934, R12 - B callbackasm1(SB) - MOVD $1935, R12 - B callbackasm1(SB) - MOVD $1936, R12 - B callbackasm1(SB) - MOVD $1937, R12 - B callbackasm1(SB) - MOVD $1938, R12 - B callbackasm1(SB) - MOVD $1939, R12 - B callbackasm1(SB) - MOVD $1940, R12 - B callbackasm1(SB) - MOVD $1941, R12 - B callbackasm1(SB) - MOVD $1942, R12 - B callbackasm1(SB) - MOVD $1943, R12 - B callbackasm1(SB) - MOVD $1944, R12 - B callbackasm1(SB) - MOVD $1945, R12 - B callbackasm1(SB) - MOVD $1946, R12 - B callbackasm1(SB) - MOVD $1947, R12 - B callbackasm1(SB) - MOVD $1948, R12 - B callbackasm1(SB) - MOVD $1949, R12 - B callbackasm1(SB) - MOVD $1950, R12 - B callbackasm1(SB) - MOVD $1951, R12 - B callbackasm1(SB) - MOVD $1952, R12 - B callbackasm1(SB) - MOVD $1953, R12 - B callbackasm1(SB) - MOVD $1954, R12 - B callbackasm1(SB) - MOVD $1955, R12 - B callbackasm1(SB) - MOVD $1956, R12 - B callbackasm1(SB) - MOVD $1957, R12 - B callbackasm1(SB) - MOVD $1958, R12 - B callbackasm1(SB) - MOVD $1959, R12 - B callbackasm1(SB) - MOVD $1960, R12 - B callbackasm1(SB) - MOVD $1961, R12 - B callbackasm1(SB) - MOVD $1962, R12 - B callbackasm1(SB) - MOVD $1963, R12 - B callbackasm1(SB) - MOVD $1964, R12 - B callbackasm1(SB) - MOVD $1965, R12 - B callbackasm1(SB) - MOVD $1966, R12 - B callbackasm1(SB) - MOVD $1967, R12 - B callbackasm1(SB) - MOVD $1968, R12 - B callbackasm1(SB) - MOVD $1969, R12 - B callbackasm1(SB) - MOVD $1970, R12 - B callbackasm1(SB) - MOVD $1971, R12 - B callbackasm1(SB) - MOVD $1972, R12 - B callbackasm1(SB) - MOVD $1973, R12 - B callbackasm1(SB) - MOVD $1974, R12 - B callbackasm1(SB) - MOVD $1975, R12 - B callbackasm1(SB) - MOVD $1976, R12 - B callbackasm1(SB) - MOVD $1977, R12 - B callbackasm1(SB) - MOVD $1978, R12 - B callbackasm1(SB) - MOVD $1979, R12 - B callbackasm1(SB) - MOVD $1980, R12 - B callbackasm1(SB) - MOVD $1981, R12 - B callbackasm1(SB) - MOVD $1982, R12 - B callbackasm1(SB) - MOVD $1983, R12 - B callbackasm1(SB) - MOVD $1984, R12 - B callbackasm1(SB) - MOVD $1985, R12 - B callbackasm1(SB) - MOVD $1986, R12 - B callbackasm1(SB) - MOVD $1987, R12 - B callbackasm1(SB) - MOVD $1988, R12 - B callbackasm1(SB) - MOVD $1989, R12 - B callbackasm1(SB) - MOVD $1990, R12 - B callbackasm1(SB) - MOVD $1991, R12 - B callbackasm1(SB) - MOVD $1992, R12 - B callbackasm1(SB) - MOVD $1993, R12 - B callbackasm1(SB) - MOVD $1994, R12 - B callbackasm1(SB) - MOVD $1995, R12 - B callbackasm1(SB) - MOVD $1996, R12 - B callbackasm1(SB) - MOVD $1997, R12 - B callbackasm1(SB) - MOVD $1998, R12 - B callbackasm1(SB) - MOVD $1999, R12 - B callbackasm1(SB) diff --git a/vendor/github.com/expr-lang/expr/.gitattributes b/vendor/github.com/expr-lang/expr/.gitattributes deleted file mode 100644 index efd30300a1..0000000000 --- a/vendor/github.com/expr-lang/expr/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*\[generated\].go linguist-language=txt diff --git a/vendor/github.com/expr-lang/expr/.gitignore b/vendor/github.com/expr-lang/expr/.gitignore deleted file mode 100644 index 9d3410bdfb..0000000000 --- a/vendor/github.com/expr-lang/expr/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -*.exe -*.exe~ -*.dll -*.so -*.dylib -*.test -*.out -*.html -custom_tests.json -pro/ -test/avs/ diff --git a/vendor/github.com/expr-lang/expr/LICENSE b/vendor/github.com/expr-lang/expr/LICENSE deleted file mode 100644 index ec46ce324e..0000000000 --- a/vendor/github.com/expr-lang/expr/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Anton Medvedev - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/expr-lang/expr/README.md b/vendor/github.com/expr-lang/expr/README.md deleted file mode 100644 index a7ded479cb..0000000000 --- a/vendor/github.com/expr-lang/expr/README.md +++ /dev/null @@ -1,183 +0,0 @@ -

    Zx logo Expr

    - -> [!IMPORTANT] -> The repository [github.com/antonmedv/expr](https://github.com/antonmedv/expr) moved to [github.com/**expr-lang**/expr](https://github.com/expr-lang/expr). - -[![test](https://github.com/expr-lang/expr/actions/workflows/test.yml/badge.svg)](https://github.com/expr-lang/expr/actions/workflows/test.yml) -[![Go Report Card](https://goreportcard.com/badge/github.com/expr-lang/expr)](https://goreportcard.com/report/github.com/expr-lang/expr) -[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/expr.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:expr) -[![GoDoc](https://godoc.org/github.com/expr-lang/expr?status.svg)](https://godoc.org/github.com/expr-lang/expr) - -**Expr** is a Go-centric expression language designed to deliver dynamic configurations with unparalleled accuracy, safety, and speed. -**Expr** combines simple [syntax](https://expr-lang.org/docs/language-definition) with powerful features for ease of use: - -```js -// Allow only admins and moderators to moderate comments. -user.Group in ["admin", "moderator"] || user.Id == comment.UserId -``` - -```js -// Determine whether the request is in the permitted time window. -request.Time - resource.Age < duration("24h") -``` - -```js -// Ensure all tweets are less than 240 characters. -all(tweets, len(.Content) <= 240) -``` - -## Features - -**Expr** is a safe, fast, and intuitive expression evaluator optimized for the Go language. -Here are its standout features: - -### Safety and Isolation -* **Memory-Safe**: Expr is designed with a focus on safety, ensuring that programs do not access unrelated memory or introduce memory vulnerabilities. -* **Side-Effect-Free**: Expressions evaluated in Expr only compute outputs from their inputs, ensuring no side-effects that can change state or produce unintended results. -* **Always Terminating**: Expr is designed to prevent infinite loops, ensuring that every program will conclude in a reasonable amount of time. - -### Go Integration -* **Seamless with Go**: Integrate Expr into your Go projects without the need to redefine types. - -### Static Typing -* Ensures type correctness and prevents runtime type errors. - ```go - out, err := expr.Compile(`name + age`) - // err: invalid operation + (mismatched types string and int) - // | name + age - // | .....^ - ``` - -### User-Friendly -* Provides user-friendly error messages to assist with debugging and development. - -### Flexibility and Utility -* **Rich Operators**: Offers a reasonable set of basic operators for a variety of applications. -* **Built-in Functions**: Functions like `all`, `none`, `any`, `one`, `filter`, and `map` are provided out-of-the-box. - -### Performance -* **Optimized for Speed**: Expr stands out in its performance, utilizing an optimizing compiler and a bytecode virtual machine. Check out these [benchmarks](https://github.com/antonmedv/golang-expression-evaluation-comparison#readme) for more details. - -## Install - -``` -go get github.com/expr-lang/expr -``` - -## Documentation - -* See [Getting Started](https://expr-lang.org/docs/Getting-Started) page for developer documentation. -* See [Language Definition](https://expr-lang.org/docs/language-definition) page to learn the syntax. - -## Examples - -[Play Online](https://go.dev/play/p/XCoNXEjm3TS) - -```go -package main - -import ( - "fmt" - "github.com/expr-lang/expr" -) - -func main() { - env := map[string]interface{}{ - "greet": "Hello, %v!", - "names": []string{"world", "you"}, - "sprintf": fmt.Sprintf, - } - - code := `sprintf(greet, names[0])` - - program, err := expr.Compile(code, expr.Env(env)) - if err != nil { - panic(err) - } - - output, err := expr.Run(program, env) - if err != nil { - panic(err) - } - - fmt.Println(output) -} -``` - -[Play Online](https://go.dev/play/p/tz-ZneBfSuw) - -```go -package main - -import ( - "fmt" - "github.com/expr-lang/expr" -) - -type Tweet struct { - Len int -} - -type Env struct { - Tweets []Tweet -} - -func main() { - code := `all(Tweets, {.Len <= 240})` - - program, err := expr.Compile(code, expr.Env(Env{})) - if err != nil { - panic(err) - } - - env := Env{ - Tweets: []Tweet{{42}, {98}, {69}}, - } - output, err := expr.Run(program, env) - if err != nil { - panic(err) - } - - fmt.Println(output) -} -``` - -## Who uses Expr? - -* [Google](https://google.com) uses Expr as one of its expression languages on the [Google Cloud Platform](https://cloud.google.com). -* [Uber](https://uber.com) uses Expr to allow customization of its Uber Eats marketplace. -* [GoDaddy](https://godaddy.com) employs Expr for the customization of its GoDaddy Pro product. -* [ByteDance](https://bytedance.com) incorporates Expr into its internal business rule engine. -* [Aviasales](https://aviasales.ru) utilizes Expr as a business rule engine for its flight search engine. -* [Alibaba](https://alibaba.com) uses Expr in a web framework for building recommendation services. -* [Argo](https://argoproj.github.io) integrates Expr into Argo Rollouts and Argo Workflows for Kubernetes. -* [Wish.com](https://www.wish.com) employs Expr in its decision-making rule engine for the Wish Assistant. -* [OpenTelemetry](https://opentelemetry.io) integrates Expr into the OpenTelemetry Collector. -* [Philips Labs](https://github.com/philips-labs/tabia) employs Expr in Tabia, a tool designed to collect insights on their code bases. -* [CrowdSec](https://crowdsec.net) incorporates Expr into its security automation tool. -* [CoreDNS](https://coredns.io) uses Expr in CoreDNS, which is a DNS server. -* [qiniu](https://www.qiniu.com) implements Expr in its trade systems. -* [Junglee Games](https://www.jungleegames.com/) uses Expr for its in-house marketing retention tool, Project Audience. -* [Faceit](https://www.faceit.com) uses Expr to enhance customization of its eSports matchmaking algorithm. -* [Chaos Mesh](https://chaos-mesh.org) incorporates Expr into Chaos Mesh, a cloud-native Chaos Engineering platform. -* [Visually.io](https://visually.io) employs Expr as a business rule engine for its personalization targeting algorithm. -* [Akvorado](https://github.com/akvorado/akvorado) utilizes Expr to classify exporters and interfaces in network flows. -* [keda.sh](https://keda.sh) uses Expr to allow customization of its Kubernetes-based event-driven autoscaling. -* [Span Digital](https://spandigital.com/) uses Expr in its Knowledge Management products. -* [Xiaohongshu](https://www.xiaohongshu.com/) combining yaml with Expr for dynamically policies delivery. -* [Melrōse](https://melrōse.org) uses Expr to implement its music programming language. -* [Tork](https://www.tork.run/) integrates Expr into its workflow execution. -* [Critical Moments](https://criticalmoments.io) uses Expr for its mobile realtime conditional targeting system. -* [WoodpeckerCI](https://woodpecker-ci.org) uses Expr for [filtering workflows/steps](https://woodpecker-ci.org/docs/usage/workflow-syntax#evaluate). -* [FastSchema](https://github.com/fastschema/fastschema) - A BaaS leveraging Expr for its customizable and dynamic Access Control system. -* [WunderGraph Cosmo](https://github.com/wundergraph/cosmo) - GraphQL Federeration Router uses Expr to customize Middleware behaviour -* [SOLO](https://solo.one) uses Expr interally to allow dynamic code execution with custom defined functions. -* [Naoma.AI](https://www.naoma.ai) uses Expr as a part of its call scoring engine. - -[Add your company too](https://github.com/expr-lang/expr/edit/master/README.md) - -## License - -[MIT](https://github.com/expr-lang/expr/blob/master/LICENSE) - -

    diff --git a/vendor/github.com/expr-lang/expr/SECURITY.md b/vendor/github.com/expr-lang/expr/SECURITY.md deleted file mode 100644 index e18771f5d2..0000000000 --- a/vendor/github.com/expr-lang/expr/SECURITY.md +++ /dev/null @@ -1,22 +0,0 @@ -# Security Policy - -## Supported Versions - -Expr is generally backwards compatible with very few exceptions, so we -recommend users to always use the latest version to experience stability, -performance and security. - -We generally backport security issues to a single previous minor version, -unless this is not possible or feasible with a reasonable effort. - -| Version | Supported | -|---------|--------------------| -| 1.x | :white_check_mark: | -| 0.x | :x: | - -## Reporting a Vulnerability - -If you believe you've discovered a serious vulnerability, please contact the -Expr core team at anton+security@medv.io. We will evaluate your report and if -necessary issue a fix and an advisory. If the issue was previously undisclosed, -we'll also mention your name in the credits. diff --git a/vendor/github.com/expr-lang/expr/ast/dump.go b/vendor/github.com/expr-lang/expr/ast/dump.go deleted file mode 100644 index 56bc7dbe2e..0000000000 --- a/vendor/github.com/expr-lang/expr/ast/dump.go +++ /dev/null @@ -1,59 +0,0 @@ -package ast - -import ( - "fmt" - "reflect" - "regexp" -) - -func Dump(node Node) string { - return dump(reflect.ValueOf(node), "") -} - -func dump(v reflect.Value, ident string) string { - if !v.IsValid() { - return "nil" - } - t := v.Type() - switch t.Kind() { - case reflect.Struct: - out := t.Name() + "{\n" - for i := 0; i < t.NumField(); i++ { - f := t.Field(i) - if isPrivate(f.Name) { - continue - } - s := v.Field(i) - out += fmt.Sprintf("%v%v: %v,\n", ident+"\t", f.Name, dump(s, ident+"\t")) - } - return out + ident + "}" - case reflect.Slice: - if v.Len() == 0 { - return t.String() + "{}" - } - out := t.String() + "{\n" - for i := 0; i < v.Len(); i++ { - s := v.Index(i) - out += fmt.Sprintf("%v%v,", ident+"\t", dump(s, ident+"\t")) - if i+1 < v.Len() { - out += "\n" - } - } - return out + "\n" + ident + "}" - case reflect.Ptr: - return dump(v.Elem(), ident) - case reflect.Interface: - return dump(reflect.ValueOf(v.Interface()), ident) - - case reflect.String: - return fmt.Sprintf("%q", v) - default: - return fmt.Sprintf("%v", v) - } -} - -var isCapital = regexp.MustCompile("^[A-Z]") - -func isPrivate(s string) bool { - return !isCapital.Match([]byte(s)) -} diff --git a/vendor/github.com/expr-lang/expr/ast/find.go b/vendor/github.com/expr-lang/expr/ast/find.go deleted file mode 100644 index 247ff6c00d..0000000000 --- a/vendor/github.com/expr-lang/expr/ast/find.go +++ /dev/null @@ -1,18 +0,0 @@ -package ast - -func Find(node Node, fn func(node Node) bool) Node { - v := &finder{fn: fn} - Walk(&node, v) - return v.node -} - -type finder struct { - node Node - fn func(node Node) bool -} - -func (f *finder) Visit(node *Node) { - if f.fn(*node) { - f.node = *node - } -} diff --git a/vendor/github.com/expr-lang/expr/ast/node.go b/vendor/github.com/expr-lang/expr/ast/node.go deleted file mode 100644 index f17fd7e524..0000000000 --- a/vendor/github.com/expr-lang/expr/ast/node.go +++ /dev/null @@ -1,244 +0,0 @@ -package ast - -import ( - "reflect" - - "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/file" -) - -var ( - anyType = reflect.TypeOf(new(any)).Elem() -) - -// Node represents items of abstract syntax tree. -type Node interface { - Location() file.Location - SetLocation(file.Location) - Nature() *nature.Nature - SetNature(nature.Nature) - Type() reflect.Type - SetType(reflect.Type) - String() string -} - -// Patch replaces the node with a new one. -// Location information is preserved. -// Type information is lost. -func Patch(node *Node, newNode Node) { - newNode.SetLocation((*node).Location()) - *node = newNode -} - -// base is a base struct for all nodes. -type base struct { - loc file.Location - nature nature.Nature -} - -// Location returns the location of the node in the source code. -func (n *base) Location() file.Location { - return n.loc -} - -// SetLocation sets the location of the node in the source code. -func (n *base) SetLocation(loc file.Location) { - n.loc = loc -} - -// Nature returns the nature of the node. -func (n *base) Nature() *nature.Nature { - return &n.nature -} - -// SetNature sets the nature of the node. -func (n *base) SetNature(nature nature.Nature) { - n.nature = nature -} - -// Type returns the type of the node. -func (n *base) Type() reflect.Type { - if n.nature.Type == nil { - return anyType - } - return n.nature.Type -} - -// SetType sets the type of the node. -func (n *base) SetType(t reflect.Type) { - n.nature = nature.FromType(t) -} - -// NilNode represents nil. -type NilNode struct { - base -} - -// IdentifierNode represents an identifier. -type IdentifierNode struct { - base - Value string // Name of the identifier. Like "foo" in "foo.bar". -} - -// IntegerNode represents an integer. -type IntegerNode struct { - base - Value int // Value of the integer. -} - -// FloatNode represents a float. -type FloatNode struct { - base - Value float64 // Value of the float. -} - -// BoolNode represents a boolean. -type BoolNode struct { - base - Value bool // Value of the boolean. -} - -// StringNode represents a string. -type StringNode struct { - base - Value string // Value of the string. -} - -// ConstantNode represents a constant. -// Constants are predefined values like nil, true, false, array, map, etc. -// The parser.Parse will never generate ConstantNode, it is only generated -// by the optimizer. -type ConstantNode struct { - base - Value any // Value of the constant. -} - -// UnaryNode represents a unary operator. -type UnaryNode struct { - base - Operator string // Operator of the unary operator. Like "!" in "!foo" or "not" in "not foo". - Node Node // Node of the unary operator. Like "foo" in "!foo". -} - -// BinaryNode represents a binary operator. -type BinaryNode struct { - base - Operator string // Operator of the binary operator. Like "+" in "foo + bar" or "matches" in "foo matches bar". - Left Node // Left node of the binary operator. - Right Node // Right node of the binary operator. -} - -// ChainNode represents an optional chaining group. -// A few MemberNode nodes can be chained together, -// and will be wrapped in a ChainNode. Example: -// -// foo.bar?.baz?.qux -// -// The whole chain will be wrapped in a ChainNode. -type ChainNode struct { - base - Node Node // Node of the chain. -} - -// MemberNode represents a member access. -// It can be a field access, a method call, -// or an array element access. -// Example: -// -// foo.bar or foo["bar"] -// foo.bar() -// array[0] -type MemberNode struct { - base - Node Node // Node of the member access. Like "foo" in "foo.bar". - Property Node // Property of the member access. For property access it is a StringNode. - Optional bool // If true then the member access is optional. Like "foo?.bar". - Method bool -} - -// SliceNode represents access to a slice of an array. -// Example: -// -// array[1:4] -type SliceNode struct { - base - Node Node // Node of the slice. Like "array" in "array[1:4]". - From Node // From an index of the array. Like "1" in "array[1:4]". - To Node // To an index of the array. Like "4" in "array[1:4]". -} - -// CallNode represents a function or a method call. -type CallNode struct { - base - Callee Node // Node of the call. Like "foo" in "foo()". - Arguments []Node // Arguments of the call. -} - -// BuiltinNode represents a builtin function call. -type BuiltinNode struct { - base - Name string // Name of the builtin function. Like "len" in "len(foo)". - Arguments []Node // Arguments of the builtin function. - Throws bool // If true then accessing a field or array index can throw an error. Used by optimizer. - Map Node // Used by optimizer to fold filter() and map() builtins. -} - -// PredicateNode represents a predicate. -// Example: -// -// filter(foo, .bar == 1) -// -// The predicate is ".bar == 1". -type PredicateNode struct { - base - Node Node // Node of the predicate body. -} - -// PointerNode represents a pointer to a current value in predicate. -type PointerNode struct { - base - Name string // Name of the pointer. Like "index" in "#index". -} - -// ConditionalNode represents a ternary operator or if/else operator. -type ConditionalNode struct { - base - Ternary bool // Is it ternary or if/else operator? - Cond Node // Condition - Exp1 Node // Expression 1 - Exp2 Node // Expression 2 -} - -// VariableDeclaratorNode represents a variable declaration. -type VariableDeclaratorNode struct { - base - Name string // Name of the variable. Like "foo" in "let foo = 1; foo + 1". - Value Node // Value of the variable. Like "1" in "let foo = 1; foo + 1". - Expr Node // Expression of the variable. Like "foo + 1" in "let foo = 1; foo + 1". -} - -// SequenceNode represents a sequence of nodes separated by semicolons. -// All nodes are executed, only the last node will be returned. -type SequenceNode struct { - base - Nodes []Node -} - -// ArrayNode represents an array. -type ArrayNode struct { - base - Nodes []Node // Nodes of the array. -} - -// MapNode represents a map. -type MapNode struct { - base - Pairs []Node // PairNode nodes. -} - -// PairNode represents a key-value pair of a map. -type PairNode struct { - base - Key Node // Key of the pair. - Value Node // Value of the pair. -} diff --git a/vendor/github.com/expr-lang/expr/ast/print.go b/vendor/github.com/expr-lang/expr/ast/print.go deleted file mode 100644 index 527a5b99b3..0000000000 --- a/vendor/github.com/expr-lang/expr/ast/print.go +++ /dev/null @@ -1,263 +0,0 @@ -package ast - -import ( - "encoding/json" - "fmt" - "strings" - - "github.com/expr-lang/expr/parser/operator" - "github.com/expr-lang/expr/parser/utils" -) - -func (n *NilNode) String() string { - return "nil" -} - -func (n *IdentifierNode) String() string { - return n.Value -} - -func (n *IntegerNode) String() string { - return fmt.Sprintf("%d", n.Value) -} - -func (n *FloatNode) String() string { - return fmt.Sprintf("%v", n.Value) -} - -func (n *BoolNode) String() string { - return fmt.Sprintf("%t", n.Value) -} - -func (n *StringNode) String() string { - return fmt.Sprintf("%q", n.Value) -} - -func (n *ConstantNode) String() string { - if n.Value == nil { - return "nil" - } - b, err := json.Marshal(n.Value) - if err != nil { - panic(err) - } - return string(b) -} - -func (n *UnaryNode) String() string { - op := n.Operator - if n.Operator == "not" { - op = fmt.Sprintf("%s ", n.Operator) - } - wrap := false - switch b := n.Node.(type) { - case *BinaryNode: - if operator.Binary[b.Operator].Precedence < - operator.Unary[n.Operator].Precedence { - wrap = true - } - case *ConditionalNode: - wrap = true - } - if wrap { - return fmt.Sprintf("%s(%s)", op, n.Node.String()) - } - return fmt.Sprintf("%s%s", op, n.Node.String()) -} - -func (n *BinaryNode) String() string { - if n.Operator == ".." { - return fmt.Sprintf("%s..%s", n.Left, n.Right) - } - - var lhs, rhs string - var lwrap, rwrap bool - - if l, ok := n.Left.(*UnaryNode); ok { - if operator.Unary[l.Operator].Precedence < - operator.Binary[n.Operator].Precedence { - lwrap = true - } - } - if lb, ok := n.Left.(*BinaryNode); ok { - if operator.Less(lb.Operator, n.Operator) { - lwrap = true - } - if operator.Binary[lb.Operator].Precedence == - operator.Binary[n.Operator].Precedence && - operator.Binary[n.Operator].Associativity == operator.Right { - lwrap = true - } - if lb.Operator == "??" { - lwrap = true - } - if operator.IsBoolean(lb.Operator) && n.Operator != lb.Operator { - lwrap = true - } - } - if rb, ok := n.Right.(*BinaryNode); ok { - if operator.Less(rb.Operator, n.Operator) { - rwrap = true - } - if operator.Binary[rb.Operator].Precedence == - operator.Binary[n.Operator].Precedence && - operator.Binary[n.Operator].Associativity == operator.Left { - rwrap = true - } - if operator.IsBoolean(rb.Operator) && n.Operator != rb.Operator { - rwrap = true - } - } - - if _, ok := n.Left.(*ConditionalNode); ok { - lwrap = true - } - if _, ok := n.Right.(*ConditionalNode); ok { - rwrap = true - } - - if lwrap { - lhs = fmt.Sprintf("(%s)", n.Left.String()) - } else { - lhs = n.Left.String() - } - - if rwrap { - rhs = fmt.Sprintf("(%s)", n.Right.String()) - } else { - rhs = n.Right.String() - } - - return fmt.Sprintf("%s %s %s", lhs, n.Operator, rhs) -} - -func (n *ChainNode) String() string { - return n.Node.String() -} - -func (n *MemberNode) String() string { - node := n.Node.String() - if _, ok := n.Node.(*BinaryNode); ok { - node = fmt.Sprintf("(%s)", node) - } - - if n.Optional { - if str, ok := n.Property.(*StringNode); ok && utils.IsValidIdentifier(str.Value) { - return fmt.Sprintf("%s?.%s", node, str.Value) - } else { - return fmt.Sprintf("%s?.[%s]", node, n.Property.String()) - } - } - if str, ok := n.Property.(*StringNode); ok && utils.IsValidIdentifier(str.Value) { - if _, ok := n.Node.(*PointerNode); ok { - return fmt.Sprintf(".%s", str.Value) - } - return fmt.Sprintf("%s.%s", node, str.Value) - } - return fmt.Sprintf("%s[%s]", node, n.Property.String()) -} - -func (n *SliceNode) String() string { - if n.From == nil && n.To == nil { - return fmt.Sprintf("%s[:]", n.Node.String()) - } - if n.From == nil { - return fmt.Sprintf("%s[:%s]", n.Node.String(), n.To.String()) - } - if n.To == nil { - return fmt.Sprintf("%s[%s:]", n.Node.String(), n.From.String()) - } - return fmt.Sprintf("%s[%s:%s]", n.Node.String(), n.From.String(), n.To.String()) -} - -func (n *CallNode) String() string { - arguments := make([]string, len(n.Arguments)) - for i, arg := range n.Arguments { - arguments[i] = arg.String() - } - return fmt.Sprintf("%s(%s)", n.Callee.String(), strings.Join(arguments, ", ")) -} - -func (n *BuiltinNode) String() string { - arguments := make([]string, len(n.Arguments)) - for i, arg := range n.Arguments { - arguments[i] = arg.String() - } - return fmt.Sprintf("%s(%s)", n.Name, strings.Join(arguments, ", ")) -} - -func (n *PredicateNode) String() string { - return n.Node.String() -} - -func (n *PointerNode) String() string { - return fmt.Sprintf("#%s", n.Name) -} - -func (n *VariableDeclaratorNode) String() string { - return fmt.Sprintf("let %s = %s; %s", n.Name, n.Value.String(), n.Expr.String()) -} - -func (n *SequenceNode) String() string { - nodes := make([]string, len(n.Nodes)) - for i, node := range n.Nodes { - nodes[i] = node.String() - } - return strings.Join(nodes, "; ") -} - -func (n *ConditionalNode) String() string { - if !n.Ternary { - cond := n.Cond.String() - exp1 := n.Exp1.String() - if c2, ok := n.Exp2.(*ConditionalNode); ok && !c2.Ternary { - return fmt.Sprintf("if %s { %s } else %s", cond, exp1, c2.String()) - } - exp2 := n.Exp2.String() - return fmt.Sprintf("if %s { %s } else { %s }", cond, exp1, exp2) - } - - var cond, exp1, exp2 string - if _, ok := n.Cond.(*ConditionalNode); ok { - cond = fmt.Sprintf("(%s)", n.Cond.String()) - } else { - cond = n.Cond.String() - } - if _, ok := n.Exp1.(*ConditionalNode); ok { - exp1 = fmt.Sprintf("(%s)", n.Exp1.String()) - } else { - exp1 = n.Exp1.String() - } - if _, ok := n.Exp2.(*ConditionalNode); ok { - exp2 = fmt.Sprintf("(%s)", n.Exp2.String()) - } else { - exp2 = n.Exp2.String() - } - return fmt.Sprintf("%s ? %s : %s", cond, exp1, exp2) -} - -func (n *ArrayNode) String() string { - nodes := make([]string, len(n.Nodes)) - for i, node := range n.Nodes { - nodes[i] = node.String() - } - return fmt.Sprintf("[%s]", strings.Join(nodes, ", ")) -} - -func (n *MapNode) String() string { - pairs := make([]string, len(n.Pairs)) - for i, pair := range n.Pairs { - pairs[i] = pair.String() - } - return fmt.Sprintf("{%s}", strings.Join(pairs, ", ")) -} - -func (n *PairNode) String() string { - if str, ok := n.Key.(*StringNode); ok { - if utils.IsValidIdentifier(str.Value) { - return fmt.Sprintf("%s: %s", str.Value, n.Value.String()) - } - return fmt.Sprintf("%s: %s", str.String(), n.Value.String()) - } - return fmt.Sprintf("(%s): %s", n.Key.String(), n.Value.String()) -} diff --git a/vendor/github.com/expr-lang/expr/ast/visitor.go b/vendor/github.com/expr-lang/expr/ast/visitor.go deleted file mode 100644 index 72cd6366b9..0000000000 --- a/vendor/github.com/expr-lang/expr/ast/visitor.go +++ /dev/null @@ -1,78 +0,0 @@ -package ast - -import "fmt" - -type Visitor interface { - Visit(node *Node) -} - -func Walk(node *Node, v Visitor) { - if *node == nil { - return - } - switch n := (*node).(type) { - case *NilNode: - case *IdentifierNode: - case *IntegerNode: - case *FloatNode: - case *BoolNode: - case *StringNode: - case *ConstantNode: - case *UnaryNode: - Walk(&n.Node, v) - case *BinaryNode: - Walk(&n.Left, v) - Walk(&n.Right, v) - case *ChainNode: - Walk(&n.Node, v) - case *MemberNode: - Walk(&n.Node, v) - Walk(&n.Property, v) - case *SliceNode: - Walk(&n.Node, v) - if n.From != nil { - Walk(&n.From, v) - } - if n.To != nil { - Walk(&n.To, v) - } - case *CallNode: - Walk(&n.Callee, v) - for i := range n.Arguments { - Walk(&n.Arguments[i], v) - } - case *BuiltinNode: - for i := range n.Arguments { - Walk(&n.Arguments[i], v) - } - case *PredicateNode: - Walk(&n.Node, v) - case *PointerNode: - case *VariableDeclaratorNode: - Walk(&n.Value, v) - Walk(&n.Expr, v) - case *SequenceNode: - for i := range n.Nodes { - Walk(&n.Nodes[i], v) - } - case *ConditionalNode: - Walk(&n.Cond, v) - Walk(&n.Exp1, v) - Walk(&n.Exp2, v) - case *ArrayNode: - for i := range n.Nodes { - Walk(&n.Nodes[i], v) - } - case *MapNode: - for i := range n.Pairs { - Walk(&n.Pairs[i], v) - } - case *PairNode: - Walk(&n.Key, v) - Walk(&n.Value, v) - default: - panic(fmt.Sprintf("undefined node type (%T)", node)) - } - - v.Visit(node) -} diff --git a/vendor/github.com/expr-lang/expr/builtin/builtin.go b/vendor/github.com/expr-lang/expr/builtin/builtin.go deleted file mode 100644 index 4fe356fbfe..0000000000 --- a/vendor/github.com/expr-lang/expr/builtin/builtin.go +++ /dev/null @@ -1,1077 +0,0 @@ -package builtin - -import ( - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "strings" - "time" - - "github.com/expr-lang/expr/internal/deref" - "github.com/expr-lang/expr/vm/runtime" -) - -var ( - Index map[string]int - Names []string - - // MaxDepth limits the recursion depth for nested structures. - MaxDepth = 10000 - ErrorMaxDepth = errors.New("recursion depth exceeded") -) - -func init() { - Index = make(map[string]int) - Names = make([]string, len(Builtins)) - for i, fn := range Builtins { - Index[fn.Name] = i - Names[i] = fn.Name - } -} - -var Builtins = []*Function{ - { - Name: "all", - Predicate: true, - Types: types(new(func([]any, func(any) bool) bool)), - }, - { - Name: "none", - Predicate: true, - Types: types(new(func([]any, func(any) bool) bool)), - }, - { - Name: "any", - Predicate: true, - Types: types(new(func([]any, func(any) bool) bool)), - }, - { - Name: "one", - Predicate: true, - Types: types(new(func([]any, func(any) bool) bool)), - }, - { - Name: "filter", - Predicate: true, - Types: types(new(func([]any, func(any) bool) []any)), - }, - { - Name: "map", - Predicate: true, - Types: types(new(func([]any, func(any) any) []any)), - }, - { - Name: "find", - Predicate: true, - Types: types(new(func([]any, func(any) bool) any)), - }, - { - Name: "findIndex", - Predicate: true, - Types: types(new(func([]any, func(any) bool) int)), - }, - { - Name: "findLast", - Predicate: true, - Types: types(new(func([]any, func(any) bool) any)), - }, - { - Name: "findLastIndex", - Predicate: true, - Types: types(new(func([]any, func(any) bool) int)), - }, - { - Name: "count", - Predicate: true, - Types: types(new(func([]any, func(any) bool) int)), - }, - { - Name: "sum", - Predicate: true, - Types: types(new(func([]any, func(any) bool) int)), - }, - { - Name: "groupBy", - Predicate: true, - Types: types(new(func([]any, func(any) any) map[any][]any)), - }, - { - Name: "sortBy", - Predicate: true, - Types: types(new(func([]any, func(any) bool, string) []any)), - }, - { - Name: "reduce", - Predicate: true, - Types: types(new(func([]any, func(any, any) any, any) any)), - }, - { - Name: "len", - Fast: Len, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String, reflect.Interface: - return integerType, nil - } - return anyType, fmt.Errorf("invalid argument for len (type %s)", args[0]) - }, - }, - { - Name: "type", - Fast: Type, - Types: types(new(func(any) string)), - }, - { - Name: "abs", - Fast: Abs, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Interface: - return args[0], nil - } - return anyType, fmt.Errorf("invalid argument for abs (type %s)", args[0]) - }, - }, - { - Name: "ceil", - Fast: Ceil, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateRoundFunc("ceil", args) - }, - }, - { - Name: "floor", - Fast: Floor, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateRoundFunc("floor", args) - }, - }, - { - Name: "round", - Fast: Round, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateRoundFunc("round", args) - }, - }, - { - Name: "int", - Fast: Int, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return integerType, nil - case reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return integerType, nil - case reflect.String: - return integerType, nil - } - return anyType, fmt.Errorf("invalid argument for int (type %s)", args[0]) - }, - }, - { - Name: "float", - Fast: Float, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return floatType, nil - case reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return floatType, nil - case reflect.String: - return floatType, nil - } - return anyType, fmt.Errorf("invalid argument for float (type %s)", args[0]) - }, - }, - { - Name: "string", - Fast: String, - Types: types(new(func(any any) string)), - }, - { - Name: "trim", - Func: func(args ...any) (any, error) { - if len(args) == 1 { - return strings.TrimSpace(args[0].(string)), nil - } else if len(args) == 2 { - return strings.Trim(args[0].(string), args[1].(string)), nil - } else { - return nil, fmt.Errorf("invalid number of arguments for trim (expected 1 or 2, got %d)", len(args)) - } - }, - Types: types( - strings.TrimSpace, - strings.Trim, - ), - }, - { - Name: "trimPrefix", - Func: func(args ...any) (any, error) { - s := " " - if len(args) == 2 { - s = args[1].(string) - } - return strings.TrimPrefix(args[0].(string), s), nil - }, - Types: types( - strings.TrimPrefix, - new(func(string) string), - ), - }, - { - Name: "trimSuffix", - Func: func(args ...any) (any, error) { - s := " " - if len(args) == 2 { - s = args[1].(string) - } - return strings.TrimSuffix(args[0].(string), s), nil - }, - Types: types( - strings.TrimSuffix, - new(func(string) string), - ), - }, - { - Name: "upper", - Fast: func(arg any) any { - return strings.ToUpper(arg.(string)) - }, - Types: types(strings.ToUpper), - }, - { - Name: "lower", - Fast: func(arg any) any { - return strings.ToLower(arg.(string)) - }, - Types: types(strings.ToLower), - }, - { - Name: "split", - Func: func(args ...any) (any, error) { - if len(args) == 2 { - return strings.Split(args[0].(string), args[1].(string)), nil - } else if len(args) == 3 { - return strings.SplitN(args[0].(string), args[1].(string), runtime.ToInt(args[2])), nil - } else { - return nil, fmt.Errorf("invalid number of arguments for split (expected 2 or 3, got %d)", len(args)) - } - }, - Types: types( - strings.Split, - strings.SplitN, - ), - }, - { - Name: "splitAfter", - Func: func(args ...any) (any, error) { - if len(args) == 2 { - return strings.SplitAfter(args[0].(string), args[1].(string)), nil - } else if len(args) == 3 { - return strings.SplitAfterN(args[0].(string), args[1].(string), runtime.ToInt(args[2])), nil - } else { - return nil, fmt.Errorf("invalid number of arguments for splitAfter (expected 2 or 3, got %d)", len(args)) - } - }, - Types: types( - strings.SplitAfter, - strings.SplitAfterN, - ), - }, - { - Name: "replace", - Func: func(args ...any) (any, error) { - if len(args) == 4 { - return strings.Replace(args[0].(string), args[1].(string), args[2].(string), runtime.ToInt(args[3])), nil - } else if len(args) == 3 { - return strings.ReplaceAll(args[0].(string), args[1].(string), args[2].(string)), nil - } else { - return nil, fmt.Errorf("invalid number of arguments for replace (expected 3 or 4, got %d)", len(args)) - } - }, - Types: types( - strings.Replace, - strings.ReplaceAll, - ), - }, - { - Name: "repeat", - Safe: func(args ...any) (any, uint, error) { - s := args[0].(string) - n := runtime.ToInt(args[1]) - if n < 0 { - return nil, 0, fmt.Errorf("invalid argument for repeat (expected positive integer, got %d)", n) - } - if n > 1e6 { - return nil, 0, fmt.Errorf("memory budget exceeded") - } - return strings.Repeat(s, n), uint(len(s) * n), nil - }, - Types: types(strings.Repeat), - }, - { - Name: "join", - Func: func(args ...any) (any, error) { - glue := "" - if len(args) == 2 { - glue = args[1].(string) - } - switch args[0].(type) { - case []string: - return strings.Join(args[0].([]string), glue), nil - case []any: - var s []string - for _, arg := range args[0].([]any) { - s = append(s, arg.(string)) - } - return strings.Join(s, glue), nil - } - return nil, fmt.Errorf("invalid argument for join (type %s)", reflect.TypeOf(args[0])) - }, - Types: types( - strings.Join, - new(func([]any, string) string), - new(func([]any) string), - new(func([]string, string) string), - new(func([]string) string), - ), - }, - { - Name: "indexOf", - Func: func(args ...any) (any, error) { - return strings.Index(args[0].(string), args[1].(string)), nil - }, - Types: types(strings.Index), - }, - { - Name: "lastIndexOf", - Func: func(args ...any) (any, error) { - return strings.LastIndex(args[0].(string), args[1].(string)), nil - }, - Types: types(strings.LastIndex), - }, - { - Name: "hasPrefix", - Func: func(args ...any) (any, error) { - return strings.HasPrefix(args[0].(string), args[1].(string)), nil - }, - Types: types(strings.HasPrefix), - }, - { - Name: "hasSuffix", - Func: func(args ...any) (any, error) { - return strings.HasSuffix(args[0].(string), args[1].(string)), nil - }, - Types: types(strings.HasSuffix), - }, - { - Name: "max", - Func: func(args ...any) (any, error) { - return minMax("max", runtime.Less, 0, args...) - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateAggregateFunc("max", args) - }, - }, - { - Name: "min", - Func: func(args ...any) (any, error) { - return minMax("min", runtime.More, 0, args...) - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateAggregateFunc("min", args) - }, - }, - { - Name: "mean", - Func: func(args ...any) (any, error) { - count, sum, err := mean(0, args...) - if err != nil { - return nil, err - } - if count == 0 { - return 0.0, nil - } - return sum / float64(count), nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateAggregateFunc("mean", args) - }, - }, - { - Name: "median", - Func: func(args ...any) (any, error) { - values, err := median(0, args...) - if err != nil { - return nil, err - } - if n := len(values); n > 0 { - sort.Float64s(values) - if n%2 == 1 { - return values[n/2], nil - } - return (values[n/2-1] + values[n/2]) / 2, nil - } - return 0.0, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - return validateAggregateFunc("median", args) - }, - }, - { - Name: "toJSON", - Func: func(args ...any) (any, error) { - b, err := json.MarshalIndent(args[0], "", " ") - if err != nil { - return nil, err - } - return string(b), nil - }, - Types: types(new(func(any) string)), - }, - { - Name: "fromJSON", - Func: func(args ...any) (any, error) { - var v any - err := json.Unmarshal([]byte(args[0].(string)), &v) - if err != nil { - return nil, err - } - return v, nil - }, - Types: types(new(func(string) any)), - }, - { - Name: "toBase64", - Func: func(args ...any) (any, error) { - return base64.StdEncoding.EncodeToString([]byte(args[0].(string))), nil - }, - Types: types(new(func(string) string)), - }, - { - Name: "fromBase64", - Func: func(args ...any) (any, error) { - b, err := base64.StdEncoding.DecodeString(args[0].(string)) - if err != nil { - return nil, err - } - return string(b), nil - }, - Types: types(new(func(string) string)), - }, - { - Name: "now", - Func: func(args ...any) (any, error) { - if len(args) == 0 { - return time.Now(), nil - } - if len(args) == 1 { - if tz, ok := args[0].(*time.Location); ok { - return time.Now().In(tz), nil - } - } - return nil, fmt.Errorf("invalid number of arguments (expected 0, got %d)", len(args)) - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) == 0 { - return timeType, nil - } - if len(args) == 1 { - if args[0] != nil && args[0].AssignableTo(locationType) { - return timeType, nil - } - } - return anyType, fmt.Errorf("invalid number of arguments (expected 0, got %d)", len(args)) - }, - Deref: func(i int, arg reflect.Type) bool { - return false - }, - }, - { - Name: "duration", - Func: func(args ...any) (any, error) { - return time.ParseDuration(args[0].(string)) - }, - Types: types(time.ParseDuration), - }, - { - Name: "date", - Func: func(args ...any) (any, error) { - tz, ok := args[0].(*time.Location) - if ok { - args = args[1:] - } - - date := args[0].(string) - if len(args) == 2 { - layout := args[1].(string) - if tz != nil { - return time.ParseInLocation(layout, date, tz) - } - return time.Parse(layout, date) - } - if len(args) == 3 { - layout := args[1].(string) - timeZone := args[2].(string) - tz, err := time.LoadLocation(timeZone) - if err != nil { - return nil, err - } - t, err := time.ParseInLocation(layout, date, tz) - if err != nil { - return nil, err - } - return t, nil - } - - layouts := []string{ - "2006-01-02", - "15:04:05", - "2006-01-02 15:04:05", - time.RFC3339, - time.RFC822, - time.RFC850, - time.RFC1123, - } - for _, layout := range layouts { - if tz == nil { - t, err := time.Parse(layout, date) - if err == nil { - return t, nil - } - } else { - t, err := time.ParseInLocation(layout, date, tz) - if err == nil { - return t, nil - } - } - } - return nil, fmt.Errorf("invalid date %s", date) - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) < 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected at least 1, got %d)", len(args)) - } - if args[0] != nil && args[0].AssignableTo(locationType) { - args = args[1:] - } - if len(args) > 3 { - return anyType, fmt.Errorf("invalid number of arguments (expected at most 3, got %d)", len(args)) - } - return timeType, nil - }, - Deref: func(i int, arg reflect.Type) bool { - if arg.AssignableTo(locationType) { - return false - } - return true - }, - }, - { - Name: "timezone", - Func: func(args ...any) (any, error) { - tz, err := time.LoadLocation(args[0].(string)) - if err != nil { - return nil, err - } - return tz, nil - }, - Types: types(time.LoadLocation), - }, - { - Name: "first", - Func: func(args ...any) (any, error) { - defer func() { - if r := recover(); r != nil { - return - } - }() - return runtime.Fetch(args[0], 0), nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return anyType, nil - case reflect.Slice, reflect.Array: - return args[0].Elem(), nil - } - return anyType, fmt.Errorf("cannot get first element from %s", args[0]) - }, - }, - { - Name: "last", - Func: func(args ...any) (any, error) { - defer func() { - if r := recover(); r != nil { - return - } - }() - return runtime.Fetch(args[0], -1), nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return anyType, nil - case reflect.Slice, reflect.Array: - return args[0].Elem(), nil - } - return anyType, fmt.Errorf("cannot get last element from %s", args[0]) - }, - }, - { - Name: "get", - Func: get, - }, - { - Name: "take", - Func: func(args ...any) (any, error) { - if len(args) != 2 { - return nil, fmt.Errorf("invalid number of arguments (expected 2, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, fmt.Errorf("cannot take from %s", v.Kind()) - } - n := reflect.ValueOf(args[1]) - if !n.CanInt() { - return nil, fmt.Errorf("cannot take %s elements", n.Kind()) - } - to := 0 - if n.Int() > int64(v.Len()) { - to = v.Len() - } else { - to = int(n.Int()) - } - return v.Slice(0, to).Interface(), nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 2 { - return anyType, fmt.Errorf("invalid number of arguments (expected 2, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface, reflect.Slice, reflect.Array: - default: - return anyType, fmt.Errorf("cannot take from %s", args[0]) - } - switch kind(args[1]) { - case reflect.Interface, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - default: - return anyType, fmt.Errorf("cannot take %s elements", args[1]) - } - return args[0], nil - }, - }, - { - Name: "keys", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Map { - return nil, fmt.Errorf("cannot get keys from %s", v.Kind()) - } - keys := v.MapKeys() - out := make([]any, len(keys)) - for i, key := range keys { - out[i] = key.Interface() - } - return out, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return arrayType, nil - case reflect.Map: - return arrayType, nil - } - return anyType, fmt.Errorf("cannot get keys from %s", args[0]) - }, - }, - { - Name: "values", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Map { - return nil, fmt.Errorf("cannot get values from %s", v.Kind()) - } - keys := v.MapKeys() - out := make([]any, len(keys)) - for i, key := range keys { - out[i] = v.MapIndex(key).Interface() - } - return out, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface: - return arrayType, nil - case reflect.Map: - return arrayType, nil - } - return anyType, fmt.Errorf("cannot get values from %s", args[0]) - }, - }, - { - Name: "toPairs", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Map { - return nil, fmt.Errorf("cannot transform %s to pairs", v.Kind()) - } - keys := v.MapKeys() - out := make([][2]any, len(keys)) - for i, key := range keys { - out[i] = [2]any{key.Interface(), v.MapIndex(key).Interface()} - } - return out, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface, reflect.Map: - return arrayType, nil - } - return anyType, fmt.Errorf("cannot transform %s to pairs", args[0]) - }, - }, - { - Name: "fromPairs", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, fmt.Errorf("cannot transform %s from pairs", v) - } - out := reflect.MakeMap(mapType) - for i := 0; i < v.Len(); i++ { - pair := deref.Value(v.Index(i)) - if pair.Kind() != reflect.Array && pair.Kind() != reflect.Slice { - return nil, fmt.Errorf("invalid pair %v", pair) - } - if pair.Len() != 2 { - return nil, fmt.Errorf("invalid pair length %v", pair) - } - key := pair.Index(0) - value := pair.Index(1) - out.SetMapIndex(key, value) - } - return out.Interface(), nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface, reflect.Slice, reflect.Array: - return mapType, nil - } - return anyType, fmt.Errorf("cannot transform %s from pairs", args[0]) - }, - }, - { - Name: "reverse", - Safe: func(args ...any) (any, uint, error) { - if len(args) != 1 { - return nil, 0, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, 0, fmt.Errorf("cannot reverse %s", v.Kind()) - } - - size := v.Len() - arr := make([]any, size) - - for i := 0; i < size; i++ { - arr[i] = v.Index(size - i - 1).Interface() - } - - return arr, uint(size), nil - - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Interface, reflect.Slice, reflect.Array: - return arrayType, nil - default: - return anyType, fmt.Errorf("cannot reverse %s", args[0]) - } - }, - }, - - { - Name: "uniq", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Array && v.Kind() != reflect.Slice { - return nil, fmt.Errorf("cannot uniq %s", v.Kind()) - } - - size := v.Len() - ret := []any{} - - eq := func(i int) bool { - for _, r := range ret { - if runtime.Equal(v.Index(i).Interface(), r) { - return true - } - } - - return false - } - - for i := 0; i < size; i += 1 { - if eq(i) { - continue - } - - ret = append(ret, v.Index(i).Interface()) - } - - return ret, nil - }, - - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - - switch kind(args[0]) { - case reflect.Interface, reflect.Slice, reflect.Array: - return arrayType, nil - default: - return anyType, fmt.Errorf("cannot uniq %s", args[0]) - } - }, - }, - - { - Name: "concat", - Safe: func(args ...any) (any, uint, error) { - if len(args) == 0 { - return nil, 0, fmt.Errorf("invalid number of arguments (expected at least 1, got 0)") - } - - var size uint - var arr []any - - for _, arg := range args { - v := reflect.ValueOf(arg) - - if v.Kind() != reflect.Slice && v.Kind() != reflect.Array { - return nil, 0, fmt.Errorf("cannot concat %s", v.Kind()) - } - - size += uint(v.Len()) - - for i := 0; i < v.Len(); i++ { - item := v.Index(i) - arr = append(arr, item.Interface()) - } - } - - return arr, size, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) == 0 { - return anyType, fmt.Errorf("invalid number of arguments (expected at least 1, got 0)") - } - - for _, arg := range args { - switch kind(arg) { - case reflect.Interface, reflect.Slice, reflect.Array: - default: - return anyType, fmt.Errorf("cannot concat %s", arg) - } - } - - return arrayType, nil - }, - }, - { - Name: "flatten", - Safe: func(args ...any) (any, uint, error) { - var size uint - if len(args) != 1 { - return nil, 0, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - v := reflect.ValueOf(args[0]) - if v.Kind() != reflect.Array && v.Kind() != reflect.Slice { - return nil, size, fmt.Errorf("cannot flatten %s", v.Kind()) - } - ret, err := flatten(v, 0) - if err != nil { - return nil, 0, err - } - size = uint(len(ret)) - return ret, size, nil - }, - Validate: func(args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - - for _, arg := range args { - switch kind(arg) { - case reflect.Interface, reflect.Slice, reflect.Array: - default: - return anyType, fmt.Errorf("cannot flatten %s", arg) - } - } - - return arrayType, nil - }, - }, - { - Name: "sort", - Safe: func(args ...any) (any, uint, error) { - if len(args) != 1 && len(args) != 2 { - return nil, 0, fmt.Errorf("invalid number of arguments (expected 1 or 2, got %d)", len(args)) - } - - var array []any - - switch in := args[0].(type) { - case []any: - array = make([]any, len(in)) - copy(array, in) - case []int: - array = make([]any, len(in)) - for i, v := range in { - array[i] = v - } - case []float64: - array = make([]any, len(in)) - for i, v := range in { - array[i] = v - } - case []string: - array = make([]any, len(in)) - for i, v := range in { - array[i] = v - } - } - - var desc bool - if len(args) == 2 { - switch args[1].(string) { - case "asc": - desc = false - case "desc": - desc = true - default: - return nil, 0, fmt.Errorf("invalid order %s, expected asc or desc", args[1]) - } - } - - sortable := &runtime.Sort{ - Desc: desc, - Array: array, - } - sort.Sort(sortable) - - return sortable.Array, uint(len(array)), nil - }, - Types: types( - new(func([]any, string) []any), - new(func([]int, string) []any), - new(func([]float64, string) []any), - new(func([]string, string) []any), - - new(func([]any) []any), - new(func([]float64) []any), - new(func([]string) []any), - new(func([]int) []any), - ), - }, - bitFunc("bitand", func(x, y int) (any, error) { - return x & y, nil - }), - bitFunc("bitor", func(x, y int) (any, error) { - return x | y, nil - }), - bitFunc("bitxor", func(x, y int) (any, error) { - return x ^ y, nil - }), - bitFunc("bitnand", func(x, y int) (any, error) { - return x &^ y, nil - }), - bitFunc("bitshl", func(x, y int) (any, error) { - if y < 0 { - return nil, fmt.Errorf("invalid operation: negative shift count %d (type int)", y) - } - return x << y, nil - }), - bitFunc("bitshr", func(x, y int) (any, error) { - if y < 0 { - return nil, fmt.Errorf("invalid operation: negative shift count %d (type int)", y) - } - return x >> y, nil - }), - bitFunc("bitushr", func(x, y int) (any, error) { - if y < 0 { - return nil, fmt.Errorf("invalid operation: negative shift count %d (type int)", y) - } - return int(uint(x) >> y), nil - }), - { - Name: "bitnot", - Func: func(args ...any) (any, error) { - if len(args) != 1 { - return nil, fmt.Errorf("invalid number of arguments for bitnot (expected 1, got %d)", len(args)) - } - x, err := toInt(args[0]) - if err != nil { - return nil, fmt.Errorf("%v to call bitnot", err) - } - return ^x, nil - }, - Types: types(new(func(int) int)), - }, -} diff --git a/vendor/github.com/expr-lang/expr/builtin/function.go b/vendor/github.com/expr-lang/expr/builtin/function.go deleted file mode 100644 index 6634ac3f89..0000000000 --- a/vendor/github.com/expr-lang/expr/builtin/function.go +++ /dev/null @@ -1,23 +0,0 @@ -package builtin - -import ( - "reflect" -) - -type Function struct { - Name string - Fast func(arg any) any - Func func(args ...any) (any, error) - Safe func(args ...any) (any, uint, error) - Types []reflect.Type - Validate func(args []reflect.Type) (reflect.Type, error) - Deref func(i int, arg reflect.Type) bool - Predicate bool -} - -func (f *Function) Type() reflect.Type { - if len(f.Types) > 0 { - return f.Types[0] - } - return reflect.TypeOf(f.Func) -} diff --git a/vendor/github.com/expr-lang/expr/builtin/lib.go b/vendor/github.com/expr-lang/expr/builtin/lib.go deleted file mode 100644 index 07a029b2f5..0000000000 --- a/vendor/github.com/expr-lang/expr/builtin/lib.go +++ /dev/null @@ -1,456 +0,0 @@ -package builtin - -import ( - "fmt" - "math" - "reflect" - "strconv" - "unicode/utf8" - - "github.com/expr-lang/expr/internal/deref" - "github.com/expr-lang/expr/vm/runtime" -) - -func Len(x any) any { - v := reflect.ValueOf(x) - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.Map: - return v.Len() - case reflect.String: - return utf8.RuneCountInString(v.String()) - default: - panic(fmt.Sprintf("invalid argument for len (type %T)", x)) - } -} - -func Type(arg any) any { - if arg == nil { - return "nil" - } - v := reflect.ValueOf(arg) - if v.Type().Name() != "" && v.Type().PkgPath() != "" { - return fmt.Sprintf("%s.%s", v.Type().PkgPath(), v.Type().Name()) - } - switch v.Type().Kind() { - case reflect.Invalid: - return "invalid" - case reflect.Bool: - return "bool" - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return "int" - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - return "uint" - case reflect.Float32, reflect.Float64: - return "float" - case reflect.String: - return "string" - case reflect.Array, reflect.Slice: - return "array" - case reflect.Map: - return "map" - case reflect.Func: - return "func" - case reflect.Struct: - return "struct" - default: - return "unknown" - } -} - -func Abs(x any) any { - switch x := x.(type) { - case float32: - if x < 0 { - return -x - } else { - return x - } - case float64: - if x < 0 { - return -x - } else { - return x - } - case int: - if x < 0 { - return -x - } else { - return x - } - case int8: - if x < 0 { - return -x - } else { - return x - } - case int16: - if x < 0 { - return -x - } else { - return x - } - case int32: - if x < 0 { - return -x - } else { - return x - } - case int64: - if x < 0 { - return -x - } else { - return x - } - case uint: - if x < 0 { - return -x - } else { - return x - } - case uint8: - if x < 0 { - return -x - } else { - return x - } - case uint16: - if x < 0 { - return -x - } else { - return x - } - case uint32: - if x < 0 { - return -x - } else { - return x - } - case uint64: - if x < 0 { - return -x - } else { - return x - } - } - panic(fmt.Sprintf("invalid argument for abs (type %T)", x)) -} - -func Ceil(x any) any { - switch x := x.(type) { - case float32: - return math.Ceil(float64(x)) - case float64: - return math.Ceil(x) - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return Float(x) - } - panic(fmt.Sprintf("invalid argument for ceil (type %T)", x)) -} - -func Floor(x any) any { - switch x := x.(type) { - case float32: - return math.Floor(float64(x)) - case float64: - return math.Floor(x) - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return Float(x) - } - panic(fmt.Sprintf("invalid argument for floor (type %T)", x)) -} - -func Round(x any) any { - switch x := x.(type) { - case float32: - return math.Round(float64(x)) - case float64: - return math.Round(x) - case int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - return Float(x) - } - panic(fmt.Sprintf("invalid argument for round (type %T)", x)) -} - -func Int(x any) any { - switch x := x.(type) { - case float32: - return int(x) - case float64: - return int(x) - case int: - return x - case int8: - return int(x) - case int16: - return int(x) - case int32: - return int(x) - case int64: - return int(x) - case uint: - return int(x) - case uint8: - return int(x) - case uint16: - return int(x) - case uint32: - return int(x) - case uint64: - return int(x) - case string: - i, err := strconv.Atoi(x) - if err != nil { - panic(fmt.Sprintf("invalid operation: int(%s)", x)) - } - return i - default: - val := reflect.ValueOf(x) - if val.CanConvert(integerType) { - return val.Convert(integerType).Interface() - } - panic(fmt.Sprintf("invalid operation: int(%T)", x)) - } -} - -func Float(x any) any { - switch x := x.(type) { - case float32: - return float64(x) - case float64: - return x - case int: - return float64(x) - case int8: - return float64(x) - case int16: - return float64(x) - case int32: - return float64(x) - case int64: - return float64(x) - case uint: - return float64(x) - case uint8: - return float64(x) - case uint16: - return float64(x) - case uint32: - return float64(x) - case uint64: - return float64(x) - case string: - f, err := strconv.ParseFloat(x, 64) - if err != nil { - panic(fmt.Sprintf("invalid operation: float(%s)", x)) - } - return f - default: - panic(fmt.Sprintf("invalid operation: float(%T)", x)) - } -} - -func String(arg any) any { - return fmt.Sprintf("%v", arg) -} - -func minMax(name string, fn func(any, any) bool, depth int, args ...any) (any, error) { - if depth > MaxDepth { - return nil, ErrorMaxDepth - } - var val any - for _, arg := range args { - rv := reflect.ValueOf(arg) - switch rv.Kind() { - case reflect.Array, reflect.Slice: - size := rv.Len() - for i := 0; i < size; i++ { - elemVal, err := minMax(name, fn, depth+1, rv.Index(i).Interface()) - if err != nil { - return nil, err - } - switch elemVal.(type) { - case int, int8, int16, int32, int64, - uint, uint8, uint16, uint32, uint64, - float32, float64: - if elemVal != nil && (val == nil || fn(val, elemVal)) { - val = elemVal - } - default: - return nil, fmt.Errorf("invalid argument for %s (type %T)", name, elemVal) - } - - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Float32, reflect.Float64: - elemVal := rv.Interface() - if val == nil || fn(val, elemVal) { - val = elemVal - } - default: - if len(args) == 1 { - return args[0], nil - } - return nil, fmt.Errorf("invalid argument for %s (type %T)", name, arg) - } - } - return val, nil -} - -func mean(depth int, args ...any) (int, float64, error) { - if depth > MaxDepth { - return 0, 0, ErrorMaxDepth - } - var total float64 - var count int - - for _, arg := range args { - rv := reflect.ValueOf(arg) - switch rv.Kind() { - case reflect.Array, reflect.Slice: - size := rv.Len() - for i := 0; i < size; i++ { - elemCount, elemSum, err := mean(depth+1, rv.Index(i).Interface()) - if err != nil { - return 0, 0, err - } - total += elemSum - count += elemCount - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - total += float64(rv.Int()) - count++ - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - total += float64(rv.Uint()) - count++ - case reflect.Float32, reflect.Float64: - total += rv.Float() - count++ - default: - return 0, 0, fmt.Errorf("invalid argument for mean (type %T)", arg) - } - } - return count, total, nil -} - -func median(depth int, args ...any) ([]float64, error) { - if depth > MaxDepth { - return nil, ErrorMaxDepth - } - var values []float64 - - for _, arg := range args { - rv := reflect.ValueOf(arg) - switch rv.Kind() { - case reflect.Array, reflect.Slice: - size := rv.Len() - for i := 0; i < size; i++ { - elems, err := median(depth+1, rv.Index(i).Interface()) - if err != nil { - return nil, err - } - values = append(values, elems...) - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - values = append(values, float64(rv.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - values = append(values, float64(rv.Uint())) - case reflect.Float32, reflect.Float64: - values = append(values, rv.Float()) - default: - return nil, fmt.Errorf("invalid argument for median (type %T)", arg) - } - } - return values, nil -} - -func flatten(arg reflect.Value, depth int) ([]any, error) { - if depth > MaxDepth { - return nil, ErrorMaxDepth - } - ret := []any{} - for i := 0; i < arg.Len(); i++ { - v := deref.Value(arg.Index(i)) - if v.Kind() == reflect.Array || v.Kind() == reflect.Slice { - x, err := flatten(v, depth+1) - if err != nil { - return nil, err - } - ret = append(ret, x...) - } else { - ret = append(ret, v.Interface()) - } - } - return ret, nil -} - -func get(params ...any) (out any, err error) { - from := params[0] - i := params[1] - v := reflect.ValueOf(from) - - if from == nil { - return nil, nil - } - - if v.Kind() == reflect.Invalid { - panic(fmt.Sprintf("cannot fetch %v from %T", i, from)) - } - - // Methods can be defined on any type. - if v.NumMethod() > 0 { - if methodName, ok := i.(string); ok { - method := v.MethodByName(methodName) - if method.IsValid() { - return method.Interface(), nil - } - } - } - - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.String: - index := runtime.ToInt(i) - l := v.Len() - if index < 0 { - index = l + index - } - if 0 <= index && index < l { - value := v.Index(index) - if value.IsValid() { - return value.Interface(), nil - } - } - - case reflect.Map: - var value reflect.Value - if i == nil { - value = v.MapIndex(reflect.Zero(v.Type().Key())) - } else { - value = v.MapIndex(reflect.ValueOf(i)) - } - if value.IsValid() { - return value.Interface(), nil - } - - case reflect.Struct: - fieldName := i.(string) - value := v.FieldByNameFunc(func(name string) bool { - field, _ := v.Type().FieldByName(name) - switch field.Tag.Get("expr") { - case "-": - return false - case fieldName: - return true - default: - return name == fieldName - } - }) - if value.IsValid() { - return value.Interface(), nil - } - } - - // Main difference from runtime.Fetch - // is that we return `nil` instead of panic. - return nil, nil -} diff --git a/vendor/github.com/expr-lang/expr/builtin/utils.go b/vendor/github.com/expr-lang/expr/builtin/utils.go deleted file mode 100644 index 262bb379d9..0000000000 --- a/vendor/github.com/expr-lang/expr/builtin/utils.go +++ /dev/null @@ -1,90 +0,0 @@ -package builtin - -import ( - "fmt" - "reflect" - "time" - - "github.com/expr-lang/expr/internal/deref" -) - -var ( - anyType = reflect.TypeOf(new(any)).Elem() - integerType = reflect.TypeOf(0) - floatType = reflect.TypeOf(float64(0)) - arrayType = reflect.TypeOf([]any{}) - mapType = reflect.TypeOf(map[any]any{}) - timeType = reflect.TypeOf(new(time.Time)).Elem() - locationType = reflect.TypeOf(new(time.Location)) -) - -func kind(t reflect.Type) reflect.Kind { - if t == nil { - return reflect.Invalid - } - t = deref.Type(t) - return t.Kind() -} - -func types(types ...any) []reflect.Type { - ts := make([]reflect.Type, len(types)) - for i, t := range types { - t := reflect.TypeOf(t) - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - if t.Kind() != reflect.Func { - panic("not a function") - } - ts[i] = t - } - return ts -} - -func toInt(val any) (int, error) { - switch v := val.(type) { - case int: - return v, nil - case int8: - return int(v), nil - case int16: - return int(v), nil - case int32: - return int(v), nil - case int64: - return int(v), nil - case uint: - return int(v), nil - case uint8: - return int(v), nil - case uint16: - return int(v), nil - case uint32: - return int(v), nil - case uint64: - return int(v), nil - default: - return 0, fmt.Errorf("cannot use %T as argument (type int)", val) - } -} - -func bitFunc(name string, fn func(x, y int) (any, error)) *Function { - return &Function{ - Name: name, - Func: func(args ...any) (any, error) { - if len(args) != 2 { - return nil, fmt.Errorf("invalid number of arguments for %s (expected 2, got %d)", name, len(args)) - } - x, err := toInt(args[0]) - if err != nil { - return nil, fmt.Errorf("%v to call %s", err, name) - } - y, err := toInt(args[1]) - if err != nil { - return nil, fmt.Errorf("%v to call %s", err, name) - } - return fn(x, y) - }, - Types: types(new(func(int, int) int)), - } -} diff --git a/vendor/github.com/expr-lang/expr/builtin/validation.go b/vendor/github.com/expr-lang/expr/builtin/validation.go deleted file mode 100644 index 057f247e91..0000000000 --- a/vendor/github.com/expr-lang/expr/builtin/validation.go +++ /dev/null @@ -1,38 +0,0 @@ -package builtin - -import ( - "fmt" - "reflect" - - "github.com/expr-lang/expr/internal/deref" -) - -func validateAggregateFunc(name string, args []reflect.Type) (reflect.Type, error) { - switch len(args) { - case 0: - return anyType, fmt.Errorf("not enough arguments to call %s", name) - default: - for _, arg := range args { - switch kind(deref.Type(arg)) { - case reflect.Interface, reflect.Array, reflect.Slice: - return anyType, nil - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64: - default: - return anyType, fmt.Errorf("invalid argument for %s (type %s)", name, arg) - } - } - return args[0], nil - } -} - -func validateRoundFunc(name string, args []reflect.Type) (reflect.Type, error) { - if len(args) != 1 { - return anyType, fmt.Errorf("invalid number of arguments (expected 1, got %d)", len(args)) - } - switch kind(args[0]) { - case reflect.Float32, reflect.Float64, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Interface: - return floatType, nil - default: - return anyType, fmt.Errorf("invalid argument for %s (type %s)", name, args[0]) - } -} diff --git a/vendor/github.com/expr-lang/expr/checker/checker.go b/vendor/github.com/expr-lang/expr/checker/checker.go deleted file mode 100644 index 0ed0d1e3b4..0000000000 --- a/vendor/github.com/expr-lang/expr/checker/checker.go +++ /dev/null @@ -1,1333 +0,0 @@ -package checker - -import ( - "fmt" - "reflect" - "regexp" - "time" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - . "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/conf" - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/parser" -) - -var ( - anyType = reflect.TypeOf(new(any)).Elem() - boolType = reflect.TypeOf(true) - intType = reflect.TypeOf(0) - floatType = reflect.TypeOf(float64(0)) - stringType = reflect.TypeOf("") - arrayType = reflect.TypeOf([]any{}) - mapType = reflect.TypeOf(map[string]any{}) - timeType = reflect.TypeOf(time.Time{}) - durationType = reflect.TypeOf(time.Duration(0)) - - anyTypeSlice = []reflect.Type{anyType} -) - -// ParseCheck parses input expression and checks its types. Also, it applies -// all provided patchers. In case of error, it returns error with a tree. -func ParseCheck(input string, config *conf.Config) (*parser.Tree, error) { - tree, err := parser.ParseWithConfig(input, config) - if err != nil { - return tree, err - } - - _, err = new(Checker).PatchAndCheck(tree, config) - if err != nil { - return tree, err - } - - return tree, nil -} - -// Check calls Check on a disposable Checker. -func Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error) { - return new(Checker).Check(tree, config) -} - -type Checker struct { - config *conf.Config - predicateScopes []predicateScope - varScopes []varScope - err *file.Error - needsReset bool -} - -type predicateScope struct { - collection Nature - vars []varScope -} - -type varScope struct { - name string - nature Nature -} - -// PatchAndCheck applies all patchers and checks the tree. -func (v *Checker) PatchAndCheck(tree *parser.Tree, config *conf.Config) (reflect.Type, error) { - v.reset(config) - if len(config.Visitors) > 0 { - // Run all patchers that dont support being run repeatedly first - v.runVisitors(tree, false) - - // Run patchers that require multiple passes next (currently only Operator patching) - v.runVisitors(tree, true) - } - return v.Check(tree, config) -} - -// Check checks types of the expression tree. It returns type of the expression -// and error if any. If config is nil, then default configuration will be used. -func (v *Checker) Check(tree *parser.Tree, config *conf.Config) (reflect.Type, error) { - v.reset(config) - return v.check(tree) -} - -// Run visitors in a given config over the given tree -// runRepeatable controls whether to filter for only vistors that require multiple passes or not -func (v *Checker) runVisitors(tree *parser.Tree, runRepeatable bool) { - for { - more := false - for _, visitor := range v.config.Visitors { - // We need to perform types check, because some visitors may rely on - // types information available in the tree. - _, _ = v.Check(tree, v.config) - - r, repeatable := visitor.(interface { - Reset() - ShouldRepeat() bool - }) - - if repeatable { - if runRepeatable { - r.Reset() - ast.Walk(&tree.Node, visitor) - more = more || r.ShouldRepeat() - } - } else { - if !runRepeatable { - ast.Walk(&tree.Node, visitor) - } - } - } - - if !more { - break - } - } -} - -func (v *Checker) check(tree *parser.Tree) (reflect.Type, error) { - nt := v.visit(tree.Node) - - // To keep compatibility with previous versions, we should return any, if nature is unknown. - t := nt.Type - if t == nil { - t = anyType - } - - if v.err != nil { - return t, v.err.Bind(tree.Source) - } - - if v.config.Expect != reflect.Invalid { - if v.config.ExpectAny { - if nt.IsUnknown(&v.config.NtCache) { - return t, nil - } - } - - switch v.config.Expect { - case reflect.Int, reflect.Int64, reflect.Float64: - if !nt.IsNumber() { - return nil, fmt.Errorf("expected %v, but got %s", v.config.Expect, nt.String()) - } - default: - if nt.Kind != v.config.Expect { - return nil, fmt.Errorf("expected %v, but got %s", v.config.Expect, nt.String()) - } - } - } - - return t, nil -} - -func (v *Checker) reset(config *conf.Config) { - if v.needsReset { - clearSlice(v.predicateScopes) - clearSlice(v.varScopes) - v.predicateScopes = v.predicateScopes[:0] - v.varScopes = v.varScopes[:0] - v.err = nil - } - v.needsReset = true - - if config == nil { - config = conf.New(nil) - } - v.config = config -} - -func clearSlice[S ~[]E, E any](s S) { - var zero E - for i := range s { - s[i] = zero - } -} - -func (v *Checker) visit(node ast.Node) Nature { - var nt Nature - switch n := node.(type) { - case *ast.NilNode: - nt = v.config.NtCache.NatureOf(nil) - case *ast.IdentifierNode: - nt = v.identifierNode(n) - case *ast.IntegerNode: - nt = v.config.NtCache.FromType(intType) - case *ast.FloatNode: - nt = v.config.NtCache.FromType(floatType) - case *ast.BoolNode: - nt = v.config.NtCache.FromType(boolType) - case *ast.StringNode: - nt = v.config.NtCache.FromType(stringType) - case *ast.ConstantNode: - nt = v.config.NtCache.FromType(reflect.TypeOf(n.Value)) - case *ast.UnaryNode: - nt = v.unaryNode(n) - case *ast.BinaryNode: - nt = v.binaryNode(n) - case *ast.ChainNode: - nt = v.chainNode(n) - case *ast.MemberNode: - nt = v.memberNode(n) - case *ast.SliceNode: - nt = v.sliceNode(n) - case *ast.CallNode: - nt = v.callNode(n) - case *ast.BuiltinNode: - nt = v.builtinNode(n) - case *ast.PredicateNode: - nt = v.predicateNode(n) - case *ast.PointerNode: - nt = v.pointerNode(n) - case *ast.VariableDeclaratorNode: - nt = v.variableDeclaratorNode(n) - case *ast.SequenceNode: - nt = v.sequenceNode(n) - case *ast.ConditionalNode: - nt = v.conditionalNode(n) - case *ast.ArrayNode: - nt = v.arrayNode(n) - case *ast.MapNode: - nt = v.mapNode(n) - case *ast.PairNode: - nt = v.pairNode(n) - default: - panic(fmt.Sprintf("undefined node type (%T)", node)) - } - node.SetNature(nt) - return nt -} - -func (v *Checker) error(node ast.Node, format string, args ...any) Nature { - if v.err == nil { // show first error - v.err = &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf(format, args...), - } - } - return Nature{} -} - -func (v *Checker) identifierNode(node *ast.IdentifierNode) Nature { - for i := len(v.varScopes) - 1; i >= 0; i-- { - if v.varScopes[i].name == node.Value { - return v.varScopes[i].nature - } - } - if node.Value == "$env" { - return Nature{} - } - - return v.ident(node, node.Value, v.config.Strict, true) -} - -// ident method returns type of environment variable, builtin or function. -func (v *Checker) ident(node ast.Node, name string, strict, builtins bool) Nature { - if nt, ok := v.config.Env.Get(&v.config.NtCache, name); ok { - return nt - } - if builtins { - if fn, ok := v.config.Functions[name]; ok { - nt := v.config.NtCache.FromType(fn.Type()) - if nt.TypeData == nil { - nt.TypeData = new(TypeData) - } - nt.TypeData.Func = fn - return nt - } - if fn, ok := v.config.Builtins[name]; ok { - nt := v.config.NtCache.FromType(fn.Type()) - if nt.TypeData == nil { - nt.TypeData = new(TypeData) - } - nt.TypeData.Func = fn - return nt - } - } - if v.config.Strict && strict { - return v.error(node, "unknown name %s", name) - } - return Nature{} -} - -func (v *Checker) unaryNode(node *ast.UnaryNode) Nature { - nt := v.visit(node.Node) - nt = nt.Deref(&v.config.NtCache) - - switch node.Operator { - - case "!", "not": - if nt.IsBool() { - return v.config.NtCache.FromType(boolType) - } - if nt.IsUnknown(&v.config.NtCache) { - return v.config.NtCache.FromType(boolType) - } - - case "+", "-": - if nt.IsNumber() { - return nt - } - if nt.IsUnknown(&v.config.NtCache) { - return Nature{} - } - - default: - return v.error(node, "unknown operator (%s)", node.Operator) - } - - return v.error(node, `invalid operation: %s (mismatched type %s)`, node.Operator, nt.String()) -} - -func (v *Checker) binaryNode(node *ast.BinaryNode) Nature { - l := v.visit(node.Left) - r := v.visit(node.Right) - - l = l.Deref(&v.config.NtCache) - r = r.Deref(&v.config.NtCache) - - switch node.Operator { - case "==", "!=": - if l.ComparableTo(&v.config.NtCache, r) { - return v.config.NtCache.FromType(boolType) - } - - case "or", "||", "and", "&&": - if l.IsBool() && r.IsBool() { - return v.config.NtCache.FromType(boolType) - } - if l.MaybeCompatible(&v.config.NtCache, r, BoolCheck) { - return v.config.NtCache.FromType(boolType) - } - - case "<", ">", ">=", "<=": - if l.IsNumber() && r.IsNumber() { - return v.config.NtCache.FromType(boolType) - } - if l.IsString() && r.IsString() { - return v.config.NtCache.FromType(boolType) - } - if l.IsTime() && r.IsTime() { - return v.config.NtCache.FromType(boolType) - } - if l.IsDuration() && r.IsDuration() { - return v.config.NtCache.FromType(boolType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck, StringCheck, TimeCheck, DurationCheck) { - return v.config.NtCache.FromType(boolType) - } - - case "-": - if l.IsNumber() && r.IsNumber() { - return l.PromoteNumericNature(&v.config.NtCache, r) - } - if l.IsTime() && r.IsTime() { - return v.config.NtCache.FromType(durationType) - } - if l.IsTime() && r.IsDuration() { - return v.config.NtCache.FromType(timeType) - } - if l.IsDuration() && r.IsDuration() { - return v.config.NtCache.FromType(durationType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck, TimeCheck, DurationCheck) { - return Nature{} - } - - case "*": - if l.IsNumber() && r.IsNumber() { - return l.PromoteNumericNature(&v.config.NtCache, r) - } - if l.IsNumber() && r.IsDuration() { - return v.config.NtCache.FromType(durationType) - } - if l.IsDuration() && r.IsNumber() { - return v.config.NtCache.FromType(durationType) - } - if l.IsDuration() && r.IsDuration() { - return v.config.NtCache.FromType(durationType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck, DurationCheck) { - return Nature{} - } - - case "/": - if l.IsNumber() && r.IsNumber() { - return v.config.NtCache.FromType(floatType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck) { - return v.config.NtCache.FromType(floatType) - } - - case "**", "^": - if l.IsNumber() && r.IsNumber() { - return v.config.NtCache.FromType(floatType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck) { - return v.config.NtCache.FromType(floatType) - } - - case "%": - if l.IsInteger && r.IsInteger { - return v.config.NtCache.FromType(intType) - } - if l.MaybeCompatible(&v.config.NtCache, r, IntegerCheck) { - return v.config.NtCache.FromType(intType) - } - - case "+": - if l.IsNumber() && r.IsNumber() { - return l.PromoteNumericNature(&v.config.NtCache, r) - } - if l.IsString() && r.IsString() { - return v.config.NtCache.FromType(stringType) - } - if l.IsTime() && r.IsDuration() { - return v.config.NtCache.FromType(timeType) - } - if l.IsDuration() && r.IsTime() { - return v.config.NtCache.FromType(timeType) - } - if l.IsDuration() && r.IsDuration() { - return v.config.NtCache.FromType(durationType) - } - if l.MaybeCompatible(&v.config.NtCache, r, NumberCheck, StringCheck, TimeCheck, DurationCheck) { - return Nature{} - } - - case "in": - if (l.IsString() || l.IsUnknown(&v.config.NtCache)) && r.IsStruct() { - return v.config.NtCache.FromType(boolType) - } - if r.IsMap() { - rKey := r.Key(&v.config.NtCache) - if !l.IsUnknown(&v.config.NtCache) && !l.AssignableTo(rKey) { - return v.error(node, "cannot use %s as type %s in map key", l.String(), rKey.String()) - } - return v.config.NtCache.FromType(boolType) - } - if r.IsArray() { - rElem := r.Elem(&v.config.NtCache) - if !l.ComparableTo(&v.config.NtCache, rElem) { - return v.error(node, "cannot use %s as type %s in array", l.String(), rElem.String()) - } - return v.config.NtCache.FromType(boolType) - } - if l.IsUnknown(&v.config.NtCache) && r.IsAnyOf(StringCheck, ArrayCheck, MapCheck) { - return v.config.NtCache.FromType(boolType) - } - if r.IsUnknown(&v.config.NtCache) { - return v.config.NtCache.FromType(boolType) - } - - case "matches": - if s, ok := node.Right.(*ast.StringNode); ok { - _, err := regexp.Compile(s.Value) - if err != nil { - return v.error(node, err.Error()) - } - } - if (l.IsString() || l.IsByteSlice()) && r.IsString() { - return v.config.NtCache.FromType(boolType) - } - if l.MaybeCompatible(&v.config.NtCache, r, StringCheck) { - return v.config.NtCache.FromType(boolType) - } - - case "contains", "startsWith", "endsWith": - if l.IsString() && r.IsString() { - return v.config.NtCache.FromType(boolType) - } - if l.MaybeCompatible(&v.config.NtCache, r, StringCheck) { - return v.config.NtCache.FromType(boolType) - } - - case "..": - if l.IsInteger && r.IsInteger || l.MaybeCompatible(&v.config.NtCache, r, IntegerCheck) { - return ArrayFromType(&v.config.NtCache, intType) - } - - case "??": - if l.Nil && !r.Nil { - return r - } - if !l.Nil && r.Nil { - return l - } - if l.Nil && r.Nil { - return v.config.NtCache.NatureOf(nil) - } - if r.AssignableTo(l) { - return l - } - return Nature{} - - default: - return v.error(node, "unknown operator (%s)", node.Operator) - - } - - return v.error(node, `invalid operation: %s (mismatched types %s and %s)`, node.Operator, l.String(), r.String()) -} - -func (v *Checker) chainNode(node *ast.ChainNode) Nature { - return v.visit(node.Node) -} - -func (v *Checker) memberNode(node *ast.MemberNode) Nature { - // $env variable - if an, ok := node.Node.(*ast.IdentifierNode); ok && an.Value == "$env" { - if name, ok := node.Property.(*ast.StringNode); ok { - strict := v.config.Strict - if node.Optional { - // If user explicitly set optional flag, then we should not - // throw error if field is not found (as user trying to handle - // this case). But if user did not set optional flag, then we - // should throw error if field is not found & v.config.Strict. - strict = false - } - return v.ident(node, name.Value, strict, false /* no builtins and no functions */) - } - return Nature{} - } - - base := v.visit(node.Node) - prop := v.visit(node.Property) - - if base.IsUnknown(&v.config.NtCache) { - return Nature{} - } - - if name, ok := node.Property.(*ast.StringNode); ok { - if base.Nil { - return v.error(node, "type nil has no field %s", name.Value) - } - - // First, check methods defined on base type itself, - // independent of which type it is. Without dereferencing. - if m, ok := base.MethodByName(&v.config.NtCache, name.Value); ok { - return m - } - } - - base = base.Deref(&v.config.NtCache) - - switch base.Kind { - case reflect.Map: - // If the map key is a pointer, we should not dereference the property. - if !prop.AssignableTo(base.Key(&v.config.NtCache)) { - propDeref := prop.Deref(&v.config.NtCache) - if propDeref.AssignableTo(base.Key(&v.config.NtCache)) { - prop = propDeref - } - } - if !prop.AssignableTo(base.Key(&v.config.NtCache)) && !prop.IsUnknown(&v.config.NtCache) { - return v.error(node.Property, "cannot use %s to get an element from %s", prop.String(), base.String()) - } - if prop, ok := node.Property.(*ast.StringNode); ok && base.TypeData != nil { - if field, ok := base.Fields[prop.Value]; ok { - return field - } else if base.Strict { - return v.error(node.Property, "unknown field %s", prop.Value) - } - } - return base.Elem(&v.config.NtCache) - - case reflect.Array, reflect.Slice: - prop = prop.Deref(&v.config.NtCache) - if !prop.IsInteger && !prop.IsUnknown(&v.config.NtCache) { - return v.error(node.Property, "array elements can only be selected using an integer (got %s)", prop.String()) - } - return base.Elem(&v.config.NtCache) - - case reflect.Struct: - if name, ok := node.Property.(*ast.StringNode); ok { - propertyName := name.Value - if field, ok := base.FieldByName(&v.config.NtCache, propertyName); ok { - return v.config.NtCache.FromType(field.Type) - } - if node.Method { - return v.error(node, "type %v has no method %v", base.String(), propertyName) - } - return v.error(node, "type %v has no field %v", base.String(), propertyName) - } - } - - // Not found. - - if name, ok := node.Property.(*ast.StringNode); ok { - if node.Method { - return v.error(node, "type %v has no method %v", base.String(), name.Value) - } - return v.error(node, "type %v has no field %v", base.String(), name.Value) - } - return v.error(node, "type %v[%v] is undefined", base.String(), prop.String()) -} - -func (v *Checker) sliceNode(node *ast.SliceNode) Nature { - nt := v.visit(node.Node) - - if nt.IsUnknown(&v.config.NtCache) { - return Nature{} - } - - switch nt.Kind { - case reflect.String, reflect.Array, reflect.Slice: - // ok - default: - return v.error(node, "cannot slice %s", nt.String()) - } - - if node.From != nil { - from := v.visit(node.From) - from = from.Deref(&v.config.NtCache) - if !from.IsInteger && !from.IsUnknown(&v.config.NtCache) { - return v.error(node.From, "non-integer slice index %v", from.String()) - } - } - - if node.To != nil { - to := v.visit(node.To) - to = to.Deref(&v.config.NtCache) - if !to.IsInteger && !to.IsUnknown(&v.config.NtCache) { - return v.error(node.To, "non-integer slice index %v", to.String()) - } - } - - return nt -} - -func (v *Checker) callNode(node *ast.CallNode) Nature { - // Check if type was set on node (for example, by patcher) - // and use node type instead of function return type. - // - // If node type is anyType, then we should use function - // return type. For example, on error we return anyType - // for a call `errCall().Method()` and method will be - // evaluated on `anyType.Method()`, so return type will - // be anyType `anyType.Method(): anyType`. Patcher can - // fix `errCall()` to return proper type, so on second - // checker pass we should replace anyType on method node - // with new correct function return type. - if typ := node.Type(); typ != nil && typ != anyType { - return *node.Nature() - } - - nt := v.visit(node.Callee) - if nt.IsUnknown(&v.config.NtCache) { - return Nature{} - } - - if nt.TypeData != nil && nt.TypeData.Func != nil { - return v.checkFunction(nt.TypeData.Func, node, node.Arguments) - } - - fnName := "function" - if identifier, ok := node.Callee.(*ast.IdentifierNode); ok { - fnName = identifier.Value - } - if member, ok := node.Callee.(*ast.MemberNode); ok { - if name, ok := member.Property.(*ast.StringNode); ok { - fnName = name.Value - } - } - - if nt.Nil { - return v.error(node, "%v is nil; cannot call nil as function", fnName) - } - - if nt.Kind == reflect.Func { - outType, err := v.checkArguments(fnName, nt, node.Arguments, node) - if err != nil { - if v.err == nil { - v.err = err - } - return Nature{} - } - return outType - } - return v.error(node, "%s is not callable", nt.String()) -} - -func (v *Checker) builtinNode(node *ast.BuiltinNode) Nature { - switch node.Name { - case "all", "none", "any", "one": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - predicateOut := predicate.Out(&v.config.NtCache, 0) - if !predicateOut.IsBool() && !predicateOut.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "predicate should return boolean (got %s)", predicateOut.String()) - } - return v.config.NtCache.FromType(boolType) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "filter": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - predicateOut := predicate.Out(&v.config.NtCache, 0) - if !predicateOut.IsBool() && !predicateOut.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "predicate should return boolean (got %s)", predicateOut.String()) - } - if collection.IsUnknown(&v.config.NtCache) { - return v.config.NtCache.FromType(arrayType) - } - collection = collection.Elem(&v.config.NtCache) - return collection.MakeArrayOf(&v.config.NtCache) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "map": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection, varScope{"index", v.config.NtCache.FromType(intType)}) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - return predicate.Ref.MakeArrayOf(&v.config.NtCache) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "count": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - if len(node.Arguments) == 1 { - return v.config.NtCache.FromType(intType) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - predicateOut := predicate.Out(&v.config.NtCache, 0) - if !predicateOut.IsBool() && !predicateOut.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "predicate should return boolean (got %s)", predicateOut.String()) - } - - return v.config.NtCache.FromType(intType) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "sum": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - if len(node.Arguments) == 2 { - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - return predicate.Out(&v.config.NtCache, 0) - } - } else { - if collection.IsUnknown(&v.config.NtCache) { - return Nature{} - } - return collection.Elem(&v.config.NtCache) - } - - case "find", "findLast": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - predicateOut := predicate.Out(&v.config.NtCache, 0) - if !predicateOut.IsBool() && !predicateOut.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "predicate should return boolean (got %s)", predicateOut.String()) - } - if collection.IsUnknown(&v.config.NtCache) { - return Nature{} - } - return collection.Elem(&v.config.NtCache) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "findIndex", "findLastIndex": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - predicateOut := predicate.Out(&v.config.NtCache, 0) - if !predicateOut.IsBool() && !predicateOut.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "predicate should return boolean (got %s)", predicateOut.String()) - } - return v.config.NtCache.FromType(intType) - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "groupBy": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - collection = collection.Elem(&v.config.NtCache) - collection = collection.MakeArrayOf(&v.config.NtCache) - nt := v.config.NtCache.NatureOf(map[any][]any{}) - nt.Ref = &collection - return nt - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "sortBy": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection) - predicate := v.visit(node.Arguments[1]) - v.end() - - if len(node.Arguments) == 3 { - _ = v.visit(node.Arguments[2]) - } - - if predicate.IsFunc() && - predicate.NumOut() == 1 && - predicate.NumIn() == 1 && predicate.IsFirstArgUnknown(&v.config.NtCache) { - - return collection - } - return v.error(node.Arguments[1], "predicate should has one input and one output param") - - case "reduce": - collection := v.visit(node.Arguments[0]) - collection = collection.Deref(&v.config.NtCache) - if !collection.IsArray() && !collection.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[0], "builtin %v takes only array (got %v)", node.Name, collection.String()) - } - - v.begin(collection, varScope{"index", v.config.NtCache.FromType(intType)}, varScope{"acc", Nature{}}) - predicate := v.visit(node.Arguments[1]) - v.end() - - if len(node.Arguments) == 3 { - _ = v.visit(node.Arguments[2]) - } - - if predicate.IsFunc() && predicate.NumOut() == 1 { - return *predicate.Ref - } - return v.error(node.Arguments[1], "predicate should has two input and one output param") - - } - - if id, ok := builtin.Index[node.Name]; ok { - switch node.Name { - case "get": - return v.checkBuiltinGet(node) - } - return v.checkFunction(builtin.Builtins[id], node, node.Arguments) - } - - return v.error(node, "unknown builtin %v", node.Name) -} - -func (v *Checker) begin(collectionNature Nature, vars ...varScope) { - v.predicateScopes = append(v.predicateScopes, predicateScope{ - collection: collectionNature, - vars: vars, - }) -} - -func (v *Checker) end() { - v.predicateScopes = v.predicateScopes[:len(v.predicateScopes)-1] -} - -func (v *Checker) checkBuiltinGet(node *ast.BuiltinNode) Nature { - if len(node.Arguments) != 2 { - return v.error(node, "invalid number of arguments (expected 2, got %d)", len(node.Arguments)) - } - - base := v.visit(node.Arguments[0]) - prop := v.visit(node.Arguments[1]) - prop = prop.Deref(&v.config.NtCache) - - if id, ok := node.Arguments[0].(*ast.IdentifierNode); ok && id.Value == "$env" { - if s, ok := node.Arguments[1].(*ast.StringNode); ok { - if nt, ok := v.config.Env.Get(&v.config.NtCache, s.Value); ok { - return nt - } - } - return Nature{} - } - - if base.IsUnknown(&v.config.NtCache) { - return Nature{} - } - - switch base.Kind { - case reflect.Slice, reflect.Array: - if !prop.IsInteger && !prop.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "non-integer slice index %s", prop.String()) - } - return base.Elem(&v.config.NtCache) - case reflect.Map: - if !prop.AssignableTo(base.Key(&v.config.NtCache)) && !prop.IsUnknown(&v.config.NtCache) { - return v.error(node.Arguments[1], "cannot use %s to get an element from %s", prop.String(), base.String()) - } - return base.Elem(&v.config.NtCache) - } - return v.error(node.Arguments[0], "type %v does not support indexing", base.String()) -} - -func (v *Checker) checkFunction(f *builtin.Function, node ast.Node, arguments []ast.Node) Nature { - if f.Validate != nil { - args := make([]reflect.Type, len(arguments)) - for i, arg := range arguments { - argNature := v.visit(arg) - if argNature.IsUnknown(&v.config.NtCache) { - args[i] = anyType - } else { - args[i] = argNature.Type - } - } - t, err := f.Validate(args) - if err != nil { - return v.error(node, "%v", err) - } - return v.config.NtCache.FromType(t) - } else if len(f.Types) == 0 { - nt, err := v.checkArguments(f.Name, v.config.NtCache.FromType(f.Type()), arguments, node) - if err != nil { - if v.err == nil { - v.err = err - } - return Nature{} - } - // No type was specified, so we assume the function returns any. - return nt - } - var lastErr *file.Error - for _, t := range f.Types { - outNature, err := v.checkArguments(f.Name, v.config.NtCache.FromType(t), arguments, node) - if err != nil { - lastErr = err - continue - } - - // As we found the correct function overload, we can stop the loop. - // Also, we need to set the correct nature of the callee so compiler, - // can correctly handle OpDeref opcode. - if callNode, ok := node.(*ast.CallNode); ok { - callNode.Callee.SetType(t) - } - - return outNature - } - if lastErr != nil { - if v.err == nil { - v.err = lastErr - } - return Nature{} - } - - return v.error(node, "no matching overload for %v", f.Name) -} - -func (v *Checker) checkArguments( - name string, - fn Nature, - arguments []ast.Node, - node ast.Node, -) (Nature, *file.Error) { - if fn.IsUnknown(&v.config.NtCache) { - return Nature{}, nil - } - - numOut := fn.NumOut() - if numOut == 0 { - return Nature{}, &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf("func %v doesn't return value", name), - } - } - if numOut > 2 { - return Nature{}, &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf("func %v returns more then two values", name), - } - } - - // If func is method on an env, first argument should be a receiver, - // and actual arguments less than fnNumIn by one. - fnNumIn := fn.NumIn() - if fn.Method { // TODO: Move subtraction to the Nature.NumIn() and Nature.In() methods. - fnNumIn-- - } - // Skip first argument in case of the receiver. - fnInOffset := 0 - if fn.Method { - fnInOffset = 1 - } - - var err *file.Error - isVariadic := fn.IsVariadic() - if isVariadic { - if len(arguments) < fnNumIn-1 { - err = &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf("not enough arguments to call %v", name), - } - } - } else { - if len(arguments) > fnNumIn { - err = &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf("too many arguments to call %v", name), - } - } - if len(arguments) < fnNumIn { - err = &file.Error{ - Location: node.Location(), - Message: fmt.Sprintf("not enough arguments to call %v", name), - } - } - } - - if err != nil { - // If we have an error, we should still visit all arguments to - // type check them, as a patch can fix the error later. - for _, arg := range arguments { - _ = v.visit(arg) - } - return fn.Out(&v.config.NtCache, 0), err - } - - for i, arg := range arguments { - argNature := v.visit(arg) - - var in Nature - if isVariadic && i >= fnNumIn-1 { - // For variadic arguments fn(xs ...int), go replaces type of xs (int) with ([]int). - // As we compare arguments one by one, we need underling type. - in = fn.InElem(&v.config.NtCache, fnNumIn-1) - } else { - in = fn.In(&v.config.NtCache, i+fnInOffset) - } - - if in.IsFloat && argNature.IsInteger { - traverseAndReplaceIntegerNodesWithFloatNodes(&arguments[i], in) - continue - } - - if in.IsInteger && argNature.IsInteger && argNature.Kind != in.Kind { - traverseAndReplaceIntegerNodesWithIntegerNodes(&arguments[i], in) - continue - } - - if argNature.Nil { - if in.Kind == reflect.Ptr || in.Kind == reflect.Interface { - continue - } - return Nature{}, &file.Error{ - Location: arg.Location(), - Message: fmt.Sprintf("cannot use nil as argument (type %s) to call %v", in.String(), name), - } - } - - // Check if argument is assignable to the function input type. - // We check original type (like *time.Time), not dereferenced type, - // as function input type can be pointer to a struct. - assignable := argNature.AssignableTo(in) - - // We also need to check if dereference arg type is assignable to the function input type. - // For example, func(int) and argument *int. In this case we will add OpDeref to the argument, - // so we can call the function with *int argument. - if !assignable && argNature.IsPointer() { - nt := argNature.Deref(&v.config.NtCache) - assignable = nt.AssignableTo(in) - } - - if !assignable && !argNature.IsUnknown(&v.config.NtCache) { - return Nature{}, &file.Error{ - Location: arg.Location(), - Message: fmt.Sprintf("cannot use %s as argument (type %s) to call %v ", argNature.String(), in.String(), name), - } - } - } - - return fn.Out(&v.config.NtCache, 0), nil -} - -func traverseAndReplaceIntegerNodesWithFloatNodes(node *ast.Node, newNature Nature) { - switch (*node).(type) { - case *ast.IntegerNode: - *node = &ast.FloatNode{Value: float64((*node).(*ast.IntegerNode).Value)} - (*node).SetType(newNature.Type) - case *ast.UnaryNode: - unaryNode := (*node).(*ast.UnaryNode) - traverseAndReplaceIntegerNodesWithFloatNodes(&unaryNode.Node, newNature) - case *ast.BinaryNode: - binaryNode := (*node).(*ast.BinaryNode) - switch binaryNode.Operator { - case "+", "-", "*": - traverseAndReplaceIntegerNodesWithFloatNodes(&binaryNode.Left, newNature) - traverseAndReplaceIntegerNodesWithFloatNodes(&binaryNode.Right, newNature) - } - } -} - -func traverseAndReplaceIntegerNodesWithIntegerNodes(node *ast.Node, newNature Nature) { - switch (*node).(type) { - case *ast.IntegerNode: - (*node).SetType(newNature.Type) - case *ast.UnaryNode: - (*node).SetType(newNature.Type) - unaryNode := (*node).(*ast.UnaryNode) - traverseAndReplaceIntegerNodesWithIntegerNodes(&unaryNode.Node, newNature) - case *ast.BinaryNode: - // TODO: Binary node return type is dependent on the type of the operands. We can't just change the type of the node. - binaryNode := (*node).(*ast.BinaryNode) - switch binaryNode.Operator { - case "+", "-", "*": - traverseAndReplaceIntegerNodesWithIntegerNodes(&binaryNode.Left, newNature) - traverseAndReplaceIntegerNodesWithIntegerNodes(&binaryNode.Right, newNature) - } - } -} - -func (v *Checker) predicateNode(node *ast.PredicateNode) Nature { - nt := v.visit(node.Node) - var out []reflect.Type - if nt.IsUnknown(&v.config.NtCache) { - out = append(out, anyType) - } else if !nt.Nil { - out = append(out, nt.Type) - } - n := v.config.NtCache.FromType(reflect.FuncOf(anyTypeSlice, out, false)) - n.Ref = &nt - return n -} - -func (v *Checker) pointerNode(node *ast.PointerNode) Nature { - if len(v.predicateScopes) == 0 { - return v.error(node, "cannot use pointer accessor outside predicate") - } - scope := v.predicateScopes[len(v.predicateScopes)-1] - if node.Name == "" { - if scope.collection.IsUnknown(&v.config.NtCache) { - return Nature{} - } - switch scope.collection.Kind { - case reflect.Array, reflect.Slice: - return scope.collection.Elem(&v.config.NtCache) - } - return v.error(node, "cannot use %v as array", scope) - } - if scope.vars != nil { - for i := range scope.vars { - if node.Name == scope.vars[i].name { - return scope.vars[i].nature - } - } - } - return v.error(node, "unknown pointer #%v", node.Name) -} - -func (v *Checker) variableDeclaratorNode(node *ast.VariableDeclaratorNode) Nature { - if _, ok := v.config.Env.Get(&v.config.NtCache, node.Name); ok { - return v.error(node, "cannot redeclare %v", node.Name) - } - if _, ok := v.config.Functions[node.Name]; ok { - return v.error(node, "cannot redeclare function %v", node.Name) - } - if _, ok := v.config.Builtins[node.Name]; ok { - return v.error(node, "cannot redeclare builtin %v", node.Name) - } - for i := len(v.varScopes) - 1; i >= 0; i-- { - if v.varScopes[i].name == node.Name { - return v.error(node, "cannot redeclare variable %v", node.Name) - } - } - varNature := v.visit(node.Value) - v.varScopes = append(v.varScopes, varScope{node.Name, varNature}) - exprNature := v.visit(node.Expr) - v.varScopes = v.varScopes[:len(v.varScopes)-1] - return exprNature -} - -func (v *Checker) sequenceNode(node *ast.SequenceNode) Nature { - if len(node.Nodes) == 0 { - return v.error(node, "empty sequence expression") - } - var last Nature - for _, node := range node.Nodes { - last = v.visit(node) - } - return last -} - -func (v *Checker) conditionalNode(node *ast.ConditionalNode) Nature { - c := v.visit(node.Cond) - c = c.Deref(&v.config.NtCache) - if !c.IsBool() && !c.IsUnknown(&v.config.NtCache) { - return v.error(node.Cond, "non-bool expression (type %v) used as condition", c.String()) - } - - t1 := v.visit(node.Exp1) - t2 := v.visit(node.Exp2) - - if t1.Nil && !t2.Nil { - return t2 - } - if !t1.Nil && t2.Nil { - return t1 - } - if t1.Nil && t2.Nil { - return v.config.NtCache.NatureOf(nil) - } - if t1.AssignableTo(t2) { - if t1.IsArray() && t2.IsArray() { - e1 := t1.Elem(&v.config.NtCache) - e2 := t2.Elem(&v.config.NtCache) - if !e1.AssignableTo(e2) || !e2.AssignableTo(e1) { - return v.config.NtCache.FromType(arrayType) - } - } - return t1 - } - return Nature{} -} - -func (v *Checker) arrayNode(node *ast.ArrayNode) Nature { - var prev Nature - allElementsAreSameType := true - for i, node := range node.Nodes { - curr := v.visit(node) - if i > 0 { - if curr.Kind != prev.Kind { - allElementsAreSameType = false - } - } - prev = curr - } - if allElementsAreSameType { - return prev.MakeArrayOf(&v.config.NtCache) - } - return v.config.NtCache.FromType(arrayType) -} - -func (v *Checker) mapNode(node *ast.MapNode) Nature { - for _, pair := range node.Pairs { - v.visit(pair) - } - return v.config.NtCache.FromType(mapType) -} - -func (v *Checker) pairNode(node *ast.PairNode) Nature { - v.visit(node.Key) - v.visit(node.Value) - return v.config.NtCache.NatureOf(nil) -} diff --git a/vendor/github.com/expr-lang/expr/checker/info.go b/vendor/github.com/expr-lang/expr/checker/info.go deleted file mode 100644 index 57202e9583..0000000000 --- a/vendor/github.com/expr-lang/expr/checker/info.go +++ /dev/null @@ -1,125 +0,0 @@ -package checker - -import ( - "reflect" - - "github.com/expr-lang/expr/ast" - . "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/vm" -) - -func FieldIndex(c *Cache, env Nature, node ast.Node) (bool, []int, string) { - switch n := node.(type) { - case *ast.IdentifierNode: - if idx, ok := env.FieldIndex(c, n.Value); ok { - return true, idx, n.Value - } - case *ast.MemberNode: - base := n.Node.Nature().Deref(c) - if base.Kind == reflect.Struct { - if prop, ok := n.Property.(*ast.StringNode); ok { - if idx, ok := base.FieldIndex(c, prop.Value); ok { - return true, idx, prop.Value - } - } - } - } - return false, nil, "" -} - -func MethodIndex(c *Cache, env Nature, node ast.Node) (bool, int, string) { - switch n := node.(type) { - case *ast.IdentifierNode: - if env.Kind == reflect.Struct { - if m, ok := env.Get(c, n.Value); ok && m.TypeData != nil { - return m.Method, m.MethodIndex, n.Value - } - } - case *ast.MemberNode: - if name, ok := n.Property.(*ast.StringNode); ok { - base := n.Node.Type() - if base != nil && base.Kind() != reflect.Interface { - if m, ok := base.MethodByName(name.Value); ok { - return true, m.Index, name.Value - } - } - } - } - return false, 0, "" -} - -func TypedFuncIndex(fn reflect.Type, method bool) (int, bool) { - if fn == nil { - return 0, false - } - if fn.Kind() != reflect.Func { - return 0, false - } - // OnCallTyped doesn't work for functions with variadic arguments. - if fn.IsVariadic() { - return 0, false - } - // OnCallTyped doesn't work named function, like `type MyFunc func() int`. - if fn.PkgPath() != "" { // If PkgPath() is not empty, it means that function is named. - return 0, false - } - - fnNumIn := fn.NumIn() - fnInOffset := 0 - if method { - fnNumIn-- - fnInOffset = 1 - } - -funcTypes: - for i := range vm.FuncTypes { - if i == 0 { - continue - } - typed := reflect.ValueOf(vm.FuncTypes[i]).Elem().Type() - if typed.Kind() != reflect.Func { - continue - } - if typed.NumOut() != fn.NumOut() { - continue - } - for j := 0; j < typed.NumOut(); j++ { - if typed.Out(j) != fn.Out(j) { - continue funcTypes - } - } - if typed.NumIn() != fnNumIn { - continue - } - for j := 0; j < typed.NumIn(); j++ { - if typed.In(j) != fn.In(j+fnInOffset) { - continue funcTypes - } - } - return i, true - } - return 0, false -} - -func IsFastFunc(fn reflect.Type, method bool) bool { - if fn == nil { - return false - } - if fn.Kind() != reflect.Func { - return false - } - numIn := 1 - if method { - numIn = 2 - } - if fn.IsVariadic() && - fn.NumIn() == numIn && - fn.NumOut() == 1 && - fn.Out(0).Kind() == reflect.Interface { - rest := fn.In(fn.NumIn() - 1) // function has only one param for functions and two for methods - if rest != nil && rest.Kind() == reflect.Slice && rest.Elem().Kind() == reflect.Interface { - return true - } - } - return false -} diff --git a/vendor/github.com/expr-lang/expr/checker/nature/nature.go b/vendor/github.com/expr-lang/expr/checker/nature/nature.go deleted file mode 100644 index c96f28c433..0000000000 --- a/vendor/github.com/expr-lang/expr/checker/nature/nature.go +++ /dev/null @@ -1,579 +0,0 @@ -package nature - -import ( - "fmt" - "reflect" - "time" - - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/internal/deref" -) - -var ( - intType = reflect.TypeOf(0) - floatType = reflect.TypeOf(float64(0)) - arrayType = reflect.TypeOf([]any{}) - byteSliceType = reflect.TypeOf([]byte{}) - timeType = reflect.TypeOf(time.Time{}) - durationType = reflect.TypeOf(time.Duration(0)) - - builtinInt = map[reflect.Type]struct{}{ - reflect.TypeOf(int(0)): {}, - reflect.TypeOf(int8(0)): {}, - reflect.TypeOf(int16(0)): {}, - reflect.TypeOf(int32(0)): {}, - reflect.TypeOf(int64(0)): {}, - reflect.TypeOf(uintptr(0)): {}, - reflect.TypeOf(uint(0)): {}, - reflect.TypeOf(uint8(0)): {}, - reflect.TypeOf(uint16(0)): {}, - reflect.TypeOf(uint32(0)): {}, - reflect.TypeOf(uint64(0)): {}, - } - builtinFloat = map[reflect.Type]struct{}{ - reflect.TypeOf(float32(0)): {}, - reflect.TypeOf(float64(0)): {}, - } -) - -type NatureCheck int - -const ( - _ NatureCheck = iota - BoolCheck - StringCheck - IntegerCheck - NumberCheck - MapCheck - ArrayCheck - TimeCheck - DurationCheck -) - -type Nature struct { - // The order of the fields matter, check alignment before making changes. - - Type reflect.Type // Type of the value. If nil, then value is unknown. - Kind reflect.Kind // Kind of the value. - - *TypeData - - // Ref is a reference used for multiple, disjoint purposes. When the Nature - // is for a: - // - Predicate: then Ref is the nature of the Out of the predicate. - // - Array-like types: then Ref is the Elem nature of array type (usually Type is []any, but ArrayOf can be any nature). - Ref *Nature - - Nil bool // If value is nil. - Strict bool // If map is types.StrictMap. - Method bool // If value retrieved from method. Usually used to determine amount of in arguments. - IsInteger bool // If it's a builtin integer or unsigned integer type. - IsFloat bool // If it's a builtin float type. -} - -type TypeData struct { - methodset *methodset // optional to avoid the map in *Cache - - *structData - - // map-only data - Fields map[string]Nature // Fields of map type. - DefaultMapValue *Nature // Default value of map type. - - // callable-only data - Func *builtin.Function // Used to pass function type from callee to CallNode. - MethodIndex int // Index of method in type. - inElem, outZero *Nature - numIn, numOut int - - isVariadic bool - isVariadicSet bool - numInSet bool - numOutSet bool -} - -// Cache is a shared cache of type information. It is only used in the stages -// where type information becomes relevant, so packages like ast, parser, types, -// and lexer do not need to use the cache because they don't need any service -// from the Nature type, they only describe. However, when receiving a Nature -// from one of those packages, the cache must be set immediately. -type Cache struct { - methods map[reflect.Type]*methodset - structs map[reflect.Type]Nature -} - -// NatureOf returns a Nature describing "i". If "i" is nil then it returns a -// Nature describing the value "nil". -func (c *Cache) NatureOf(i any) Nature { - // reflect.TypeOf(nil) returns nil, but in FromType we want to differentiate - // what nil means for us - if i == nil { - return Nature{Nil: true} - } - return c.FromType(reflect.TypeOf(i)) -} - -// FromType returns a Nature describing a value of type "t". If "t" is nil then -// it returns a Nature describing an unknown value. -func (c *Cache) FromType(t reflect.Type) Nature { - if t == nil { - return Nature{} - } - var td *TypeData - var isInteger, isFloat bool - k := t.Kind() - switch k { - case reflect.Struct: - // c can be nil when we call the package function FromType, which uses a - // nil *Cache to call this method. - if c != nil { - return c.getStruct(t) - } - fallthrough - case reflect.Func: - td = new(TypeData) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - _, isInteger = builtinInt[t] - case reflect.Float32, reflect.Float64: - _, isFloat = builtinFloat[t] - } - return Nature{ - Type: t, - Kind: k, - TypeData: td, - IsInteger: isInteger, - IsFloat: isFloat, - } -} - -func (c *Cache) getStruct(t reflect.Type) Nature { - if c.structs == nil { - c.structs = map[reflect.Type]Nature{} - } else if nt, ok := c.structs[t]; ok { - return nt - } - nt := Nature{ - Type: t, - Kind: reflect.Struct, - TypeData: &TypeData{ - structData: &structData{ - rType: t, - numField: t.NumField(), - anonIdx: -1, // do not lookup embedded fields yet - }, - }, - } - c.structs[t] = nt - return nt -} - -func (c *Cache) getMethodset(t reflect.Type, k reflect.Kind) *methodset { - if t == nil || c == nil { - return nil - } - if c.methods == nil { - c.methods = map[reflect.Type]*methodset{ - t: nil, - } - } else if s, ok := c.methods[t]; ok { - return s - } - numMethod := t.NumMethod() - if numMethod < 1 { - c.methods[t] = nil // negative cache - return nil - } - s := &methodset{ - rType: t, - kind: k, - numMethod: numMethod, - } - c.methods[t] = s - return s -} - -// NatureOf calls NatureOf on a nil *Cache. See the comment on Cache. -func NatureOf(i any) Nature { - var c *Cache - return c.NatureOf(i) -} - -// FromType calls FromType on a nil *Cache. See the comment on Cache. -func FromType(t reflect.Type) Nature { - var c *Cache - return c.FromType(t) -} - -func ArrayFromType(c *Cache, t reflect.Type) Nature { - elem := c.FromType(t) - nt := c.FromType(arrayType) - nt.Ref = &elem - return nt -} - -func (n *Nature) IsAny(c *Cache) bool { - return n.Type != nil && n.Kind == reflect.Interface && n.NumMethods(c) == 0 -} - -func (n *Nature) IsUnknown(c *Cache) bool { - return n.Type == nil && !n.Nil || n.IsAny(c) -} - -func (n *Nature) String() string { - if n.Type != nil { - return n.Type.String() - } - return "unknown" -} - -func (n *Nature) Deref(c *Cache) Nature { - t, _, changed := deref.TypeKind(n.Type, n.Kind) - if !changed { - return *n - } - return c.FromType(t) -} - -func (n *Nature) Key(c *Cache) Nature { - if n.Kind == reflect.Map { - return c.FromType(n.Type.Key()) - } - return Nature{} -} - -func (n *Nature) Elem(c *Cache) Nature { - switch n.Kind { - case reflect.Ptr: - return c.FromType(n.Type.Elem()) - case reflect.Map: - if n.TypeData != nil && n.DefaultMapValue != nil { - return *n.DefaultMapValue - } - return c.FromType(n.Type.Elem()) - case reflect.Slice, reflect.Array: - if n.Ref != nil { - return *n.Ref - } - return c.FromType(n.Type.Elem()) - } - return Nature{} -} - -func (n *Nature) AssignableTo(nt Nature) bool { - if n.Nil { - switch nt.Kind { - case reflect.Pointer, reflect.Interface, reflect.Chan, reflect.Func, - reflect.Map, reflect.Slice: - // nil can be assigned to these kinds - return true - } - } - if n.Type == nil || nt.Type == nil || - n.Kind != nt.Kind && nt.Kind != reflect.Interface { - return false - } - return n.Type.AssignableTo(nt.Type) -} - -func (n *Nature) getMethodset(c *Cache) *methodset { - if n.TypeData != nil && n.TypeData.methodset != nil { - return n.TypeData.methodset - } - s := c.getMethodset(n.Type, n.Kind) - if n.TypeData != nil { - n.TypeData.methodset = s // cache locally if possible - } - return s -} - -func (n *Nature) NumMethods(c *Cache) int { - if s := n.getMethodset(c); s != nil { - return s.numMethod - } - return 0 -} - -func (n *Nature) MethodByName(c *Cache, name string) (Nature, bool) { - if s := n.getMethodset(c); s != nil { - if m := s.method(c, name); m != nil { - return m.nature, true - } - } - return Nature{}, false -} - -func (n *Nature) NumIn() int { - if n.numInSet { - return n.numIn - } - n.numInSet = true - n.numIn = n.Type.NumIn() - return n.numIn -} - -func (n *Nature) InElem(c *Cache, i int) Nature { - if n.inElem == nil { - n2 := c.FromType(n.Type.In(i)) - n2 = n2.Elem(c) - n.inElem = &n2 - } - return *n.inElem -} - -func (n *Nature) In(c *Cache, i int) Nature { - return c.FromType(n.Type.In(i)) -} - -func (n *Nature) IsFirstArgUnknown(c *Cache) bool { - if n.Type != nil { - n2 := c.FromType(n.Type.In(0)) - return n2.IsUnknown(c) - } - return false -} - -func (n *Nature) NumOut() int { - if n.numOutSet { - return n.numOut - } - n.numOutSet = true - n.numOut = n.Type.NumOut() - return n.numOut -} - -func (n *Nature) Out(c *Cache, i int) Nature { - if i != 0 { - return n.out(c, i) - } - if n.outZero != nil { - return *n.outZero - } - nt := n.out(c, 0) - n.outZero = &nt - return nt -} - -func (n *Nature) out(c *Cache, i int) Nature { - if n.Type == nil { - return Nature{} - } - return c.FromType(n.Type.Out(i)) -} - -func (n *Nature) IsVariadic() bool { - if n.isVariadicSet { - return n.isVariadic - } - n.isVariadicSet = true - n.isVariadic = n.Type.IsVariadic() - return n.isVariadic -} - -func (n *Nature) FieldByName(c *Cache, name string) (Nature, bool) { - if n.Kind != reflect.Struct { - return Nature{}, false - } - var sd *structData - if n.TypeData != nil && n.structData != nil { - sd = n.structData - } else { - sd = c.getStruct(n.Type).structData - } - if sf := sd.structField(c, nil, name); sf != nil { - return sf.Nature, true - } - return Nature{}, false -} - -func (n *Nature) IsFastMap() bool { - return n.Type != nil && - n.Type.Kind() == reflect.Map && - n.Type.Key().Kind() == reflect.String && - n.Type.Elem().Kind() == reflect.Interface -} - -func (n *Nature) Get(c *Cache, name string) (Nature, bool) { - if n.Kind == reflect.Map && n.TypeData != nil { - f, ok := n.Fields[name] - return f, ok - } - return n.getSlow(c, name) -} - -func (n *Nature) getSlow(c *Cache, name string) (Nature, bool) { - if nt, ok := n.MethodByName(c, name); ok { - return nt, true - } - t, k, changed := deref.TypeKind(n.Type, n.Kind) - if k == reflect.Struct { - var sd *structData - if changed { - sd = c.getStruct(t).structData - } else { - sd = n.structData - } - if sf := sd.structField(c, nil, name); sf != nil { - return sf.Nature, true - } - } - return Nature{}, false -} - -func (n *Nature) FieldIndex(c *Cache, name string) ([]int, bool) { - if n.Kind != reflect.Struct { - return nil, false - } - if sf := n.structField(c, nil, name); sf != nil { - return sf.Index, true - } - return nil, false -} - -func (n *Nature) All(c *Cache) map[string]Nature { - table := make(map[string]Nature) - - if n.Type == nil { - return table - } - - for i := 0; i < n.NumMethods(c); i++ { - method := n.Type.Method(i) - nt := c.FromType(method.Type) - if nt.TypeData == nil { - nt.TypeData = new(TypeData) - } - nt.Method = true - nt.MethodIndex = method.Index - table[method.Name] = nt - } - - t := deref.Type(n.Type) - - switch t.Kind() { - case reflect.Struct: - for name, nt := range StructFields(c, t) { - if _, ok := table[name]; ok { - continue - } - table[name] = nt - } - - case reflect.Map: - if n.TypeData != nil { - for key, nt := range n.Fields { - if _, ok := table[key]; ok { - continue - } - table[key] = nt - } - } - } - - return table -} - -func (n *Nature) IsNumber() bool { - return n.IsInteger || n.IsFloat -} - -func (n *Nature) PromoteNumericNature(c *Cache, rhs Nature) Nature { - if n.IsUnknown(c) || rhs.IsUnknown(c) { - return Nature{} - } - if n.IsFloat || rhs.IsFloat { - return c.FromType(floatType) - } - return c.FromType(intType) -} - -func (n *Nature) IsTime() bool { - return n.Type == timeType -} - -func (n *Nature) IsDuration() bool { - return n.Type == durationType -} - -func (n *Nature) IsBool() bool { - return n.Kind == reflect.Bool -} - -func (n *Nature) IsString() bool { - return n.Kind == reflect.String -} - -func (n *Nature) IsByteSlice() bool { - return n.Type == byteSliceType -} - -func (n *Nature) IsArray() bool { - return n.Kind == reflect.Slice || n.Kind == reflect.Array -} - -func (n *Nature) IsMap() bool { - return n.Kind == reflect.Map -} - -func (n *Nature) IsStruct() bool { - return n.Kind == reflect.Struct -} - -func (n *Nature) IsFunc() bool { - return n.Kind == reflect.Func -} - -func (n *Nature) IsPointer() bool { - return n.Kind == reflect.Ptr -} - -func (n *Nature) IsAnyOf(cs ...NatureCheck) bool { - var result bool - for i := 0; i < len(cs) && !result; i++ { - switch cs[i] { - case BoolCheck: - result = n.IsBool() - case StringCheck: - result = n.IsString() - case IntegerCheck: - result = n.IsInteger - case NumberCheck: - result = n.IsNumber() - case MapCheck: - result = n.IsMap() - case ArrayCheck: - result = n.IsArray() - case TimeCheck: - result = n.IsTime() - case DurationCheck: - result = n.IsDuration() - default: - panic(fmt.Sprintf("unknown check value %d", cs[i])) - } - } - return result -} - -func (n *Nature) ComparableTo(c *Cache, rhs Nature) bool { - return n.IsUnknown(c) || rhs.IsUnknown(c) || - n.Nil || rhs.Nil || - n.IsNumber() && rhs.IsNumber() || - n.IsDuration() && rhs.IsDuration() || - n.IsTime() && rhs.IsTime() || - n.IsArray() && rhs.IsArray() || - n.AssignableTo(rhs) -} - -func (n *Nature) MaybeCompatible(c *Cache, rhs Nature, cs ...NatureCheck) bool { - nIsUnknown := n.IsUnknown(c) - rshIsUnknown := rhs.IsUnknown(c) - return nIsUnknown && rshIsUnknown || - nIsUnknown && rhs.IsAnyOf(cs...) || - rshIsUnknown && n.IsAnyOf(cs...) -} - -func (n *Nature) MakeArrayOf(c *Cache) Nature { - nt := c.FromType(arrayType) - nt.Ref = n - return nt -} diff --git a/vendor/github.com/expr-lang/expr/checker/nature/utils.go b/vendor/github.com/expr-lang/expr/checker/nature/utils.go deleted file mode 100644 index 2af9460022..0000000000 --- a/vendor/github.com/expr-lang/expr/checker/nature/utils.go +++ /dev/null @@ -1,233 +0,0 @@ -package nature - -import ( - "reflect" - - "github.com/expr-lang/expr/internal/deref" -) - -func fieldName(fieldName string, tag reflect.StructTag) (string, bool) { - switch taggedName := tag.Get("expr"); taggedName { - case "-": - return "", false - case "": - return fieldName, true - default: - return taggedName, true - } -} - -type structData struct { - rType reflect.Type - fields map[string]*structField - numField, ownIdx, anonIdx int - - curParent, curChild *structData - curChildIndex []int -} - -type structField struct { - Nature - Index []int -} - -func (s *structData) finished() bool { - return s.ownIdx >= s.numField && // no own fields left to visit - s.anonIdx >= s.numField && // no embedded fields to visit - s.curChild == nil // no child in process of visiting -} - -func (s *structData) structField(c *Cache, parentEmbed *structData, name string) *structField { - if s.fields == nil { - if s.numField > 0 { - s.fields = make(map[string]*structField, s.numField) - } - } else if f := s.fields[name]; f != nil { - return f - } - if s.finished() { - return nil - } - - // Lookup own fields first. - for ; s.ownIdx < s.numField; s.ownIdx++ { - field := s.rType.Field(s.ownIdx) - if field.Anonymous && s.anonIdx < 0 { - // start iterating anon fields on the first instead of zero - s.anonIdx = s.ownIdx - } - if !field.IsExported() { - continue - } - fName, ok := fieldName(field.Name, field.Tag) - if !ok || fName == "" { - // name can still be empty for a type created at runtime with - // reflect - continue - } - nt := c.FromType(field.Type) - sf := &structField{ - Nature: nt, - Index: field.Index, - } - s.fields[fName] = sf - if parentEmbed != nil { - parentEmbed.trySet(fName, sf) - } - if fName == name { - return sf - } - } - - if s.curChild != nil { - sf := s.findInEmbedded(c, parentEmbed, s.curChild, s.curChildIndex, name) - if sf != nil { - return sf - } - } - - // Lookup embedded fields through anon own fields - for ; s.anonIdx >= 0 && s.anonIdx < s.numField; s.anonIdx++ { - field := s.rType.Field(s.anonIdx) - // we do enter embedded non-exported types because they could contain - // exported fields - if !field.Anonymous { - continue - } - t, k, _ := deref.TypeKind(field.Type, field.Type.Kind()) - if k != reflect.Struct { - continue - } - - childEmbed := c.getStruct(t).structData - sf := s.findInEmbedded(c, parentEmbed, childEmbed, field.Index, name) - if sf != nil { - return sf - } - } - - return nil -} - -func (s *structData) findInEmbedded( - c *Cache, - parentEmbed, childEmbed *structData, - childIndex []int, - name string, -) *structField { - // Set current parent/child data. This allows trySet to handle child fields - // and add them to our struct and to the parent as well if needed - s.curParent = parentEmbed - s.curChild = childEmbed - s.curChildIndex = childIndex - defer func() { - // Ensure to cleanup references - s.curParent = nil - if childEmbed.finished() { - // If the child can still have more fields to explore then keep it - // referened to look it up again if we need to - s.curChild = nil - s.curChildIndex = nil - } - }() - - // See if the child has already cached its fields. This is still important - // to check even if it's the s.unfinishedEmbedded because it may have - // explored new fields since the last time we visited it - for name, sf := range childEmbed.fields { - s.trySet(name, sf) - } - - // Recheck if we have what we needed from the above sync - if sf := s.fields[name]; sf != nil { - return sf - } - - // Try finding in the child again in case it hasn't finished - if !childEmbed.finished() { - if childEmbed.structField(c, s, name) != nil { - return s.fields[name] - } - } - - return nil -} - -func (s *structData) trySet(name string, sf *structField) { - if _, ok := s.fields[name]; ok { - return - } - sf = &structField{ - Nature: sf.Nature, - Index: append(s.curChildIndex, sf.Index...), - } - s.fields[name] = sf - if s.curParent != nil { - s.curParent.trySet(name, sf) - } -} - -func StructFields(c *Cache, t reflect.Type) map[string]Nature { - table := make(map[string]Nature) - if t == nil { - return table - } - t, k, _ := deref.TypeKind(t, t.Kind()) - if k == reflect.Struct { - // lookup for a field with an empty name, which will cause to never find a - // match, meaning everything will have been cached. - sd := c.getStruct(t).structData - sd.structField(c, nil, "") - for name, sf := range sd.fields { - table[name] = sf.Nature - } - } - return table -} - -type methodset struct { - rType reflect.Type - kind reflect.Kind - methods map[string]*method - numMethod, idx int -} - -type method struct { - reflect.Method - nature Nature -} - -func (s *methodset) method(c *Cache, name string) *method { - if s.methods == nil { - s.methods = make(map[string]*method, s.numMethod) - } else if m := s.methods[name]; m != nil { - return m - } - for ; s.idx < s.numMethod; s.idx++ { - rm := s.rType.Method(s.idx) - if !rm.IsExported() { - continue - } - nt := c.FromType(rm.Type) - if s.rType.Kind() != reflect.Interface { - nt.Method = true - nt.MethodIndex = rm.Index - // In case of interface type method will not have a receiver, - // and to prevent checker decreasing numbers of in arguments - // return method type as not method (second argument is false). - - // Also, we can not use m.Index here, because it will be - // different indexes for different types which implement - // the same interface. - } - m := &method{ - Method: rm, - nature: nt, - } - s.methods[rm.Name] = m - if rm.Name == name { - return m - } - } - return nil -} diff --git a/vendor/github.com/expr-lang/expr/compiler/compiler.go b/vendor/github.com/expr-lang/expr/compiler/compiler.go deleted file mode 100644 index 5de89f54cf..0000000000 --- a/vendor/github.com/expr-lang/expr/compiler/compiler.go +++ /dev/null @@ -1,1323 +0,0 @@ -package compiler - -import ( - "fmt" - "math" - "reflect" - "regexp" - "runtime/debug" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/checker" - . "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/conf" - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/parser" - . "github.com/expr-lang/expr/vm" - "github.com/expr-lang/expr/vm/runtime" -) - -const ( - placeholder = 12345 -) - -func Compile(tree *parser.Tree, config *conf.Config) (program *Program, err error) { - defer func() { - if r := recover(); r != nil { - err = fmt.Errorf("%v\n%s", r, debug.Stack()) - } - }() - - c := &compiler{ - config: config, - locations: make([]file.Location, 0), - constantsIndex: make(map[any]int), - functionsIndex: make(map[string]int), - debugInfo: make(map[string]string), - } - - if config != nil { - c.ntCache = &c.config.NtCache - } else { - c.ntCache = new(Cache) - } - - c.compile(tree.Node) - - if c.config != nil { - switch c.config.Expect { - case reflect.Int: - c.emit(OpCast, 0) - case reflect.Int64: - c.emit(OpCast, 1) - case reflect.Float64: - c.emit(OpCast, 2) - case reflect.Bool: - c.emit(OpCast, 3) - } - if c.config.Optimize { - c.optimize() - } - } - - var span *Span - if len(c.spans) > 0 { - span = c.spans[0] - } - - program = NewProgram( - tree.Source, - tree.Node, - c.locations, - c.variables, - c.constants, - c.bytecode, - c.arguments, - c.functions, - c.debugInfo, - span, - ) - return -} - -type compiler struct { - config *conf.Config - ntCache *Cache - locations []file.Location - bytecode []Opcode - variables int - scopes []scope - constants []any - constantsIndex map[any]int - functions []Function - functionsIndex map[string]int - debugInfo map[string]string - nodes []ast.Node - spans []*Span - chains [][]int - arguments []int -} - -type scope struct { - variableName string - index int -} - -func (c *compiler) nodeParent() ast.Node { - if len(c.nodes) > 1 { - return c.nodes[len(c.nodes)-2] - } - return nil -} - -func (c *compiler) emitLocation(loc file.Location, op Opcode, arg int) int { - c.bytecode = append(c.bytecode, op) - current := len(c.bytecode) - c.arguments = append(c.arguments, arg) - c.locations = append(c.locations, loc) - return current -} - -func (c *compiler) emit(op Opcode, args ...int) int { - arg := 0 - if len(args) > 1 { - panic("too many arguments") - } - if len(args) == 1 { - arg = args[0] - } - var loc file.Location - if len(c.nodes) > 0 { - loc = c.nodes[len(c.nodes)-1].Location() - } - return c.emitLocation(loc, op, arg) -} - -func (c *compiler) emitPush(value any) int { - return c.emit(OpPush, c.addConstant(value)) -} - -func (c *compiler) addConstant(constant any) int { - indexable := true - hash := constant - switch reflect.TypeOf(constant).Kind() { - case reflect.Slice, reflect.Map, reflect.Struct, reflect.Func: - indexable = false - } - if field, ok := constant.(*runtime.Field); ok { - indexable = true - hash = fmt.Sprintf("%v", field) - } - if method, ok := constant.(*runtime.Method); ok { - indexable = true - hash = fmt.Sprintf("%v", method) - } - if indexable { - if p, ok := c.constantsIndex[hash]; ok { - return p - } - } - c.constants = append(c.constants, constant) - p := len(c.constants) - 1 - if indexable { - c.constantsIndex[hash] = p - } - return p -} - -func (c *compiler) addVariable(name string) int { - c.variables++ - c.debugInfo[fmt.Sprintf("var_%d", c.variables-1)] = name - return c.variables - 1 -} - -// emitFunction adds builtin.Function.Func to the program.functions and emits call opcode. -func (c *compiler) emitFunction(fn *builtin.Function, argsLen int) { - switch argsLen { - case 0: - c.emit(OpCall0, c.addFunction(fn.Name, fn.Func)) - case 1: - c.emit(OpCall1, c.addFunction(fn.Name, fn.Func)) - case 2: - c.emit(OpCall2, c.addFunction(fn.Name, fn.Func)) - case 3: - c.emit(OpCall3, c.addFunction(fn.Name, fn.Func)) - default: - c.emit(OpLoadFunc, c.addFunction(fn.Name, fn.Func)) - c.emit(OpCallN, argsLen) - } -} - -// addFunction adds builtin.Function.Func to the program.functions and returns its index. -func (c *compiler) addFunction(name string, fn Function) int { - if fn == nil { - panic("function is nil") - } - if p, ok := c.functionsIndex[name]; ok { - return p - } - p := len(c.functions) - c.functions = append(c.functions, fn) - c.functionsIndex[name] = p - c.debugInfo[fmt.Sprintf("func_%d", p)] = name - return p -} - -func (c *compiler) patchJump(placeholder int) { - offset := len(c.bytecode) - placeholder - c.arguments[placeholder-1] = offset -} - -func (c *compiler) calcBackwardJump(to int) int { - return len(c.bytecode) + 1 - to -} - -func (c *compiler) compile(node ast.Node) { - c.nodes = append(c.nodes, node) - defer func() { - c.nodes = c.nodes[:len(c.nodes)-1] - }() - - if c.config != nil && c.config.Profile { - span := &Span{ - Name: reflect.TypeOf(node).String(), - Expression: node.String(), - } - if len(c.spans) > 0 { - prev := c.spans[len(c.spans)-1] - prev.Children = append(prev.Children, span) - } - c.spans = append(c.spans, span) - defer func() { - if len(c.spans) > 1 { - c.spans = c.spans[:len(c.spans)-1] - } - }() - - c.emit(OpProfileStart, c.addConstant(span)) - defer func() { - c.emit(OpProfileEnd, c.addConstant(span)) - }() - } - - switch n := node.(type) { - case *ast.NilNode: - c.NilNode(n) - case *ast.IdentifierNode: - c.IdentifierNode(n) - case *ast.IntegerNode: - c.IntegerNode(n) - case *ast.FloatNode: - c.FloatNode(n) - case *ast.BoolNode: - c.BoolNode(n) - case *ast.StringNode: - c.StringNode(n) - case *ast.ConstantNode: - c.ConstantNode(n) - case *ast.UnaryNode: - c.UnaryNode(n) - case *ast.BinaryNode: - c.BinaryNode(n) - case *ast.ChainNode: - c.ChainNode(n) - case *ast.MemberNode: - c.MemberNode(n) - case *ast.SliceNode: - c.SliceNode(n) - case *ast.CallNode: - c.CallNode(n) - case *ast.BuiltinNode: - c.BuiltinNode(n) - case *ast.PredicateNode: - c.PredicateNode(n) - case *ast.PointerNode: - c.PointerNode(n) - case *ast.VariableDeclaratorNode: - c.VariableDeclaratorNode(n) - case *ast.SequenceNode: - c.SequenceNode(n) - case *ast.ConditionalNode: - c.ConditionalNode(n) - case *ast.ArrayNode: - c.ArrayNode(n) - case *ast.MapNode: - c.MapNode(n) - case *ast.PairNode: - c.PairNode(n) - default: - panic(fmt.Sprintf("undefined node type (%T)", node)) - } -} - -func (c *compiler) NilNode(_ *ast.NilNode) { - c.emit(OpNil) -} - -func (c *compiler) IdentifierNode(node *ast.IdentifierNode) { - if index, ok := c.lookupVariable(node.Value); ok { - c.emit(OpLoadVar, index) - return - } - if node.Value == "$env" { - c.emit(OpLoadEnv) - return - } - - var env Nature - if c.config != nil { - env = c.config.Env - } - - if env.IsFastMap() { - c.emit(OpLoadFast, c.addConstant(node.Value)) - } else if ok, index, name := checker.FieldIndex(c.ntCache, env, node); ok { - c.emit(OpLoadField, c.addConstant(&runtime.Field{ - Index: index, - Path: []string{name}, - })) - } else if ok, index, name := checker.MethodIndex(c.ntCache, env, node); ok { - c.emit(OpLoadMethod, c.addConstant(&runtime.Method{ - Name: name, - Index: index, - })) - } else { - c.emit(OpLoadConst, c.addConstant(node.Value)) - } -} - -func (c *compiler) IntegerNode(node *ast.IntegerNode) { - t := node.Type() - if t == nil { - c.emitPush(node.Value) - return - } - switch t.Kind() { - case reflect.Float32: - c.emitPush(float32(node.Value)) - case reflect.Float64: - c.emitPush(float64(node.Value)) - case reflect.Int: - c.emitPush(node.Value) - case reflect.Int8: - if node.Value > math.MaxInt8 || node.Value < math.MinInt8 { - panic(fmt.Sprintf("constant %d overflows int8", node.Value)) - } - c.emitPush(int8(node.Value)) - case reflect.Int16: - if node.Value > math.MaxInt16 || node.Value < math.MinInt16 { - panic(fmt.Sprintf("constant %d overflows int16", node.Value)) - } - c.emitPush(int16(node.Value)) - case reflect.Int32: - if node.Value > math.MaxInt32 || node.Value < math.MinInt32 { - panic(fmt.Sprintf("constant %d overflows int32", node.Value)) - } - c.emitPush(int32(node.Value)) - case reflect.Int64: - c.emitPush(int64(node.Value)) - case reflect.Uint: - if node.Value < 0 { - panic(fmt.Sprintf("constant %d overflows uint", node.Value)) - } - c.emitPush(uint(node.Value)) - case reflect.Uint8: - if node.Value > math.MaxUint8 || node.Value < 0 { - panic(fmt.Sprintf("constant %d overflows uint8", node.Value)) - } - c.emitPush(uint8(node.Value)) - case reflect.Uint16: - if node.Value > math.MaxUint16 || node.Value < 0 { - panic(fmt.Sprintf("constant %d overflows uint16", node.Value)) - } - c.emitPush(uint16(node.Value)) - case reflect.Uint32: - if node.Value < 0 { - panic(fmt.Sprintf("constant %d overflows uint32", node.Value)) - } - c.emitPush(uint32(node.Value)) - case reflect.Uint64: - if node.Value < 0 { - panic(fmt.Sprintf("constant %d overflows uint64", node.Value)) - } - c.emitPush(uint64(node.Value)) - default: - c.emitPush(node.Value) - } -} - -func (c *compiler) FloatNode(node *ast.FloatNode) { - switch node.Type().Kind() { - case reflect.Float32: - c.emitPush(float32(node.Value)) - case reflect.Float64: - c.emitPush(node.Value) - default: - c.emitPush(node.Value) - } -} - -func (c *compiler) BoolNode(node *ast.BoolNode) { - if node.Value { - c.emit(OpTrue) - } else { - c.emit(OpFalse) - } -} - -func (c *compiler) StringNode(node *ast.StringNode) { - c.emitPush(node.Value) -} - -func (c *compiler) ConstantNode(node *ast.ConstantNode) { - if node.Value == nil { - c.emit(OpNil) - return - } - c.emitPush(node.Value) -} - -func (c *compiler) UnaryNode(node *ast.UnaryNode) { - c.compile(node.Node) - c.derefInNeeded(node.Node) - - switch node.Operator { - - case "!", "not": - c.emit(OpNot) - - case "+": - // Do nothing - - case "-": - c.emit(OpNegate) - - default: - panic(fmt.Sprintf("unknown operator (%v)", node.Operator)) - } -} - -func (c *compiler) BinaryNode(node *ast.BinaryNode) { - switch node.Operator { - case "==": - c.equalBinaryNode(node) - - case "!=": - c.equalBinaryNode(node) - c.emit(OpNot) - - case "or", "||": - if c.config != nil && !c.config.ShortCircuit { - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpOr) - break - } - c.compile(node.Left) - c.derefInNeeded(node.Left) - end := c.emit(OpJumpIfTrue, placeholder) - c.emit(OpPop) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.patchJump(end) - - case "and", "&&": - if c.config != nil && !c.config.ShortCircuit { - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpAnd) - break - } - c.compile(node.Left) - c.derefInNeeded(node.Left) - end := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.patchJump(end) - - case "<": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpLess) - - case ">": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpMore) - - case "<=": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpLessOrEqual) - - case ">=": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpMoreOrEqual) - - case "+": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpAdd) - - case "-": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpSubtract) - - case "*": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpMultiply) - - case "/": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpDivide) - - case "%": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpModulo) - - case "**", "^": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpExponent) - - case "in": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpIn) - - case "matches": - if str, ok := node.Right.(*ast.StringNode); ok { - re, err := regexp.Compile(str.Value) - if err != nil { - panic(err) - } - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.emit(OpMatchesConst, c.addConstant(re)) - } else { - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpMatches) - } - - case "contains": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpContains) - - case "startsWith": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpStartsWith) - - case "endsWith": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpEndsWith) - - case "..": - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.emit(OpRange) - - case "??": - c.compile(node.Left) - c.derefInNeeded(node.Left) - end := c.emit(OpJumpIfNotNil, placeholder) - c.emit(OpPop) - c.compile(node.Right) - c.derefInNeeded(node.Right) - c.patchJump(end) - - default: - panic(fmt.Sprintf("unknown operator (%v)", node.Operator)) - - } -} - -func (c *compiler) equalBinaryNode(node *ast.BinaryNode) { - l := kind(node.Left.Type()) - r := kind(node.Right.Type()) - - leftIsSimple := isSimpleType(node.Left) - rightIsSimple := isSimpleType(node.Right) - leftAndRightAreSimple := leftIsSimple && rightIsSimple - - c.compile(node.Left) - c.derefInNeeded(node.Left) - c.compile(node.Right) - c.derefInNeeded(node.Right) - - if l == r && l == reflect.Int && leftAndRightAreSimple { - c.emit(OpEqualInt) - } else if l == r && l == reflect.String && leftAndRightAreSimple { - c.emit(OpEqualString) - } else { - c.emit(OpEqual) - } -} - -func isSimpleType(node ast.Node) bool { - if node == nil { - return false - } - t := node.Type() - if t == nil { - return false - } - return t.PkgPath() == "" -} - -func (c *compiler) ChainNode(node *ast.ChainNode) { - c.chains = append(c.chains, []int{}) - c.compile(node.Node) - for _, ph := range c.chains[len(c.chains)-1] { - c.patchJump(ph) // If chain activated jump here (got nit somewhere). - } - parent := c.nodeParent() - if binary, ok := parent.(*ast.BinaryNode); ok && binary.Operator == "??" { - // If chain is used in nil coalescing operator, we can omit - // nil push at the end of the chain. The ?? operator will - // handle it. - } else { - // We need to put the nil on the stack, otherwise "typed" - // nil will be used as a result of the chain. - j := c.emit(OpJumpIfNotNil, placeholder) - c.emit(OpPop) - c.emit(OpNil) - c.patchJump(j) - } - c.chains = c.chains[:len(c.chains)-1] -} - -func (c *compiler) MemberNode(node *ast.MemberNode) { - var env Nature - if c.config != nil { - env = c.config.Env - } - - if ok, index, name := checker.MethodIndex(c.ntCache, env, node); ok { - c.compile(node.Node) - c.emit(OpMethod, c.addConstant(&runtime.Method{ - Name: name, - Index: index, - })) - return - } - op := OpFetch - base := node.Node - - ok, index, nodeName := checker.FieldIndex(c.ntCache, env, node) - path := []string{nodeName} - - if ok { - op = OpFetchField - for !node.Optional { - if ident, isIdent := base.(*ast.IdentifierNode); isIdent { - if ok, identIndex, name := checker.FieldIndex(c.ntCache, env, ident); ok { - index = append(identIndex, index...) - path = append([]string{name}, path...) - c.emitLocation(ident.Location(), OpLoadField, c.addConstant( - &runtime.Field{Index: index, Path: path}, - )) - return - } - } - - if member, isMember := base.(*ast.MemberNode); isMember { - if ok, memberIndex, name := checker.FieldIndex(c.ntCache, env, member); ok { - index = append(memberIndex, index...) - path = append([]string{name}, path...) - node = member - base = member.Node - } else { - break - } - } else { - break - } - } - } - - c.compile(base) - // If the field is optional, we need to jump over the fetch operation. - // If no ChainNode (none c.chains) is used, do not compile the optional fetch. - if node.Optional && len(c.chains) > 0 { - ph := c.emit(OpJumpIfNil, placeholder) - c.chains[len(c.chains)-1] = append(c.chains[len(c.chains)-1], ph) - } - - if op == OpFetch { - c.compile(node.Property) - deref := true - // If the map key is a pointer, we should not dereference the property. - if node.Node.Type() != nil && node.Node.Type().Kind() == reflect.Map { - keyType := node.Node.Type().Key() - propType := node.Property.Type() - if propType != nil && propType.AssignableTo(keyType) { - deref = false - } - } - if deref { - c.derefInNeeded(node.Property) - } - c.emit(OpFetch) - } else { - c.emitLocation(node.Location(), op, c.addConstant( - &runtime.Field{Index: index, Path: path}, - )) - } -} - -func (c *compiler) SliceNode(node *ast.SliceNode) { - c.compile(node.Node) - if node.To != nil { - c.compile(node.To) - c.derefInNeeded(node.To) - } else { - c.emit(OpLen) - } - if node.From != nil { - c.compile(node.From) - c.derefInNeeded(node.From) - } else { - c.emitPush(0) - } - c.emit(OpSlice) -} - -func (c *compiler) CallNode(node *ast.CallNode) { - fn := node.Callee.Type() - if fn.Kind() == reflect.Func { - fnInOffset := 0 - fnNumIn := fn.NumIn() - switch callee := node.Callee.(type) { - case *ast.MemberNode: - if prop, ok := callee.Property.(*ast.StringNode); ok { - if _, ok = callee.Node.Type().MethodByName(prop.Value); ok && callee.Node.Type().Kind() != reflect.Interface { - fnInOffset = 1 - fnNumIn-- - } - } - case *ast.IdentifierNode: - if t, ok := c.config.Env.MethodByName(c.ntCache, callee.Value); ok && t.Method { - fnInOffset = 1 - fnNumIn-- - } - } - for i, arg := range node.Arguments { - c.compile(arg) - - var in reflect.Type - if fn.IsVariadic() && i >= fnNumIn-1 { - in = fn.In(fn.NumIn() - 1).Elem() - } else { - in = fn.In(i + fnInOffset) - } - - c.derefParam(in, arg) - } - } else { - for _, arg := range node.Arguments { - c.compile(arg) - } - } - - if ident, ok := node.Callee.(*ast.IdentifierNode); ok { - if c.config != nil { - if fn, ok := c.config.Functions[ident.Value]; ok { - c.emitFunction(fn, len(node.Arguments)) - return - } - } - } - c.compile(node.Callee) - - if c.config != nil { - isMethod, _, _ := checker.MethodIndex(c.ntCache, c.config.Env, node.Callee) - if index, ok := checker.TypedFuncIndex(node.Callee.Type(), isMethod); ok { - c.emit(OpCallTyped, index) - return - } else if checker.IsFastFunc(node.Callee.Type(), isMethod) { - c.emit(OpCallFast, len(node.Arguments)) - } else { - c.emit(OpCall, len(node.Arguments)) - } - } else { - c.emit(OpCall, len(node.Arguments)) - } -} - -func (c *compiler) BuiltinNode(node *ast.BuiltinNode) { - switch node.Name { - case "all": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoop(func() { - c.compile(node.Arguments[1]) - loopBreak = c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - }) - c.emit(OpTrue) - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "none": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emit(OpNot) - loopBreak = c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - }) - c.emit(OpTrue) - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "any": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoop(func() { - c.compile(node.Arguments[1]) - loopBreak = c.emit(OpJumpIfTrue, placeholder) - c.emit(OpPop) - }) - c.emit(OpFalse) - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "one": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emitCond(func() { - c.emit(OpIncrementCount) - }) - }) - c.emit(OpGetCount) - c.emitPush(1) - c.emit(OpEqual) - c.emit(OpEnd) - return - - case "filter": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emitCond(func() { - c.emit(OpIncrementCount) - if node.Map != nil { - c.compile(node.Map) - } else { - c.emit(OpPointer) - } - }) - }) - c.emit(OpGetCount) - c.emit(OpEnd) - c.emit(OpArray) - return - - case "map": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emitLoop(func() { - c.compile(node.Arguments[1]) - }) - c.emit(OpGetLen) - c.emit(OpEnd) - c.emit(OpArray) - return - - case "count": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emitLoop(func() { - if len(node.Arguments) == 2 { - c.compile(node.Arguments[1]) - } else { - c.emit(OpPointer) - } - c.emitCond(func() { - c.emit(OpIncrementCount) - }) - }) - c.emit(OpGetCount) - c.emit(OpEnd) - return - - case "sum": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emit(OpInt, 0) - c.emit(OpSetAcc) - c.emitLoop(func() { - if len(node.Arguments) == 2 { - c.compile(node.Arguments[1]) - } else { - c.emit(OpPointer) - } - c.emit(OpGetAcc) - c.emit(OpAdd) - c.emit(OpSetAcc) - }) - c.emit(OpGetAcc) - c.emit(OpEnd) - return - - case "find": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoop(func() { - c.compile(node.Arguments[1]) - noop := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - if node.Map != nil { - c.compile(node.Map) - } else { - c.emit(OpPointer) - } - loopBreak = c.emit(OpJump, placeholder) - c.patchJump(noop) - c.emit(OpPop) - }) - if node.Throws { - c.emit(OpPush, c.addConstant(fmt.Errorf("reflect: slice index out of range"))) - c.emit(OpThrow) - } else { - c.emit(OpNil) - } - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "findIndex": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoop(func() { - c.compile(node.Arguments[1]) - noop := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - c.emit(OpGetIndex) - loopBreak = c.emit(OpJump, placeholder) - c.patchJump(noop) - c.emit(OpPop) - }) - c.emit(OpNil) - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "findLast": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoopBackwards(func() { - c.compile(node.Arguments[1]) - noop := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - if node.Map != nil { - c.compile(node.Map) - } else { - c.emit(OpPointer) - } - loopBreak = c.emit(OpJump, placeholder) - c.patchJump(noop) - c.emit(OpPop) - }) - if node.Throws { - c.emit(OpPush, c.addConstant(fmt.Errorf("reflect: slice index out of range"))) - c.emit(OpThrow) - } else { - c.emit(OpNil) - } - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "findLastIndex": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - var loopBreak int - c.emitLoopBackwards(func() { - c.compile(node.Arguments[1]) - noop := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - c.emit(OpGetIndex) - loopBreak = c.emit(OpJump, placeholder) - c.patchJump(noop) - c.emit(OpPop) - }) - c.emit(OpNil) - c.patchJump(loopBreak) - c.emit(OpEnd) - return - - case "groupBy": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - c.emit(OpCreate, 1) - c.emit(OpSetAcc) - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emit(OpGroupBy) - }) - c.emit(OpGetAcc) - c.emit(OpEnd) - return - - case "sortBy": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - if len(node.Arguments) == 3 { - c.compile(node.Arguments[2]) - } else { - c.emit(OpPush, c.addConstant("asc")) - } - c.emit(OpCreate, 2) - c.emit(OpSetAcc) - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emit(OpSortBy) - }) - c.emit(OpSort) - c.emit(OpEnd) - return - - case "reduce": - c.compile(node.Arguments[0]) - c.derefInNeeded(node.Arguments[0]) - c.emit(OpBegin) - if len(node.Arguments) == 3 { - c.compile(node.Arguments[2]) - c.derefInNeeded(node.Arguments[2]) - c.emit(OpSetAcc) - } else { - c.emit(OpPointer) - c.emit(OpIncrementIndex) - c.emit(OpSetAcc) - } - c.emitLoop(func() { - c.compile(node.Arguments[1]) - c.emit(OpSetAcc) - }) - c.emit(OpGetAcc) - c.emit(OpEnd) - return - - } - - if id, ok := builtin.Index[node.Name]; ok { - f := builtin.Builtins[id] - for i, arg := range node.Arguments { - c.compile(arg) - argType := arg.Type() - if argType.Kind() == reflect.Ptr || arg.Nature().IsUnknown(c.ntCache) { - if f.Deref == nil { - // By default, builtins expect arguments to be dereferenced. - c.emit(OpDeref) - } else { - if f.Deref(i, argType) { - c.emit(OpDeref) - } - } - } - } - - if f.Fast != nil { - c.emit(OpCallBuiltin1, id) - } else if f.Safe != nil { - id := c.addConstant(f.Safe) - c.emit(OpPush, id) - c.debugInfo[fmt.Sprintf("const_%d", id)] = node.Name - c.emit(OpCallSafe, len(node.Arguments)) - } else if f.Func != nil { - c.emitFunction(f, len(node.Arguments)) - } - return - } - - panic(fmt.Sprintf("unknown builtin %v", node.Name)) -} - -func (c *compiler) emitCond(body func()) { - noop := c.emit(OpJumpIfFalse, placeholder) - c.emit(OpPop) - - body() - - jmp := c.emit(OpJump, placeholder) - c.patchJump(noop) - c.emit(OpPop) - c.patchJump(jmp) -} - -func (c *compiler) emitLoop(body func()) { - begin := len(c.bytecode) - end := c.emit(OpJumpIfEnd, placeholder) - - body() - - c.emit(OpIncrementIndex) - c.emit(OpJumpBackward, c.calcBackwardJump(begin)) - c.patchJump(end) -} - -func (c *compiler) emitLoopBackwards(body func()) { - c.emit(OpGetLen) - c.emit(OpInt, 1) - c.emit(OpSubtract) - c.emit(OpSetIndex) - begin := len(c.bytecode) - c.emit(OpGetIndex) - c.emit(OpInt, 0) - c.emit(OpMoreOrEqual) - end := c.emit(OpJumpIfFalse, placeholder) - - body() - - c.emit(OpDecrementIndex) - c.emit(OpJumpBackward, c.calcBackwardJump(begin)) - c.patchJump(end) -} - -func (c *compiler) PredicateNode(node *ast.PredicateNode) { - c.compile(node.Node) -} - -func (c *compiler) PointerNode(node *ast.PointerNode) { - switch node.Name { - case "index": - c.emit(OpGetIndex) - case "acc": - c.emit(OpGetAcc) - case "": - c.emit(OpPointer) - default: - panic(fmt.Sprintf("unknown pointer %v", node.Name)) - } -} - -func (c *compiler) VariableDeclaratorNode(node *ast.VariableDeclaratorNode) { - c.compile(node.Value) - index := c.addVariable(node.Name) - c.emit(OpStore, index) - c.beginScope(node.Name, index) - c.compile(node.Expr) - c.endScope() -} - -func (c *compiler) SequenceNode(node *ast.SequenceNode) { - for i, n := range node.Nodes { - c.compile(n) - if i < len(node.Nodes)-1 { - c.emit(OpPop) - } - } -} - -func (c *compiler) beginScope(name string, index int) { - c.scopes = append(c.scopes, scope{name, index}) -} - -func (c *compiler) endScope() { - c.scopes = c.scopes[:len(c.scopes)-1] -} - -func (c *compiler) lookupVariable(name string) (int, bool) { - for i := len(c.scopes) - 1; i >= 0; i-- { - if c.scopes[i].variableName == name { - return c.scopes[i].index, true - } - } - return 0, false -} - -func (c *compiler) ConditionalNode(node *ast.ConditionalNode) { - c.compile(node.Cond) - c.derefInNeeded(node.Cond) - otherwise := c.emit(OpJumpIfFalse, placeholder) - - c.emit(OpPop) - c.compile(node.Exp1) - end := c.emit(OpJump, placeholder) - - c.patchJump(otherwise) - c.emit(OpPop) - c.compile(node.Exp2) - - c.patchJump(end) -} - -func (c *compiler) ArrayNode(node *ast.ArrayNode) { - for _, node := range node.Nodes { - c.compile(node) - } - - c.emitPush(len(node.Nodes)) - c.emit(OpArray) -} - -func (c *compiler) MapNode(node *ast.MapNode) { - for _, pair := range node.Pairs { - c.compile(pair) - } - - c.emitPush(len(node.Pairs)) - c.emit(OpMap) -} - -func (c *compiler) PairNode(node *ast.PairNode) { - c.compile(node.Key) - c.compile(node.Value) -} - -func (c *compiler) derefInNeeded(node ast.Node) { - if node.Nature().Nil { - return - } - switch node.Type().Kind() { - case reflect.Ptr, reflect.Interface: - c.emit(OpDeref) - } -} - -func (c *compiler) derefParam(in reflect.Type, param ast.Node) { - if param.Nature().Nil { - return - } - if param.Type().AssignableTo(in) { - return - } - if in.Kind() != reflect.Ptr && param.Type().Kind() == reflect.Ptr { - c.emit(OpDeref) - } -} - -func (c *compiler) optimize() { - for i, op := range c.bytecode { - switch op { - case OpJumpIfTrue, OpJumpIfFalse, OpJumpIfNil, OpJumpIfNotNil: - target := i + c.arguments[i] + 1 - for target < len(c.bytecode) && c.bytecode[target] == op { - target += c.arguments[target] + 1 - } - c.arguments[i] = target - i - 1 - } - } -} - -func kind(t reflect.Type) reflect.Kind { - if t == nil { - return reflect.Invalid - } - return t.Kind() -} diff --git a/vendor/github.com/expr-lang/expr/conf/config.go b/vendor/github.com/expr-lang/expr/conf/config.go deleted file mode 100644 index f7c95d203d..0000000000 --- a/vendor/github.com/expr-lang/expr/conf/config.go +++ /dev/null @@ -1,107 +0,0 @@ -package conf - -import ( - "fmt" - "reflect" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/vm/runtime" -) - -var ( - // DefaultMemoryBudget represents default maximum allowed memory usage by the vm.VM. - DefaultMemoryBudget uint = 1e6 - - // DefaultMaxNodes represents default maximum allowed AST nodes by the compiler. - DefaultMaxNodes uint = 1e4 -) - -type FunctionsTable map[string]*builtin.Function - -type Config struct { - EnvObject any - Env nature.Nature - Expect reflect.Kind - ExpectAny bool - Optimize bool - Strict bool - ShortCircuit bool - Profile bool - MaxNodes uint - ConstFns map[string]reflect.Value - Visitors []ast.Visitor - Functions FunctionsTable - Builtins FunctionsTable - Disabled map[string]bool // disabled builtins - NtCache nature.Cache - // DisableIfOperator disables the built-in `if ... { } else { }` operator syntax - // so that users can use a custom function named `if(...)` without conflicts. - // When enabled, the lexer treats `if`/`else` as identifiers and the parser - // will not parse `if` statements. - DisableIfOperator bool -} - -// CreateNew creates new config with default values. -func CreateNew() *Config { - c := &Config{ - Optimize: true, - ShortCircuit: true, - MaxNodes: DefaultMaxNodes, - ConstFns: make(map[string]reflect.Value), - Functions: make(map[string]*builtin.Function), - Builtins: make(map[string]*builtin.Function), - Disabled: make(map[string]bool), - } - for _, f := range builtin.Builtins { - c.Builtins[f.Name] = f - } - return c -} - -// New creates new config with environment. -func New(env any) *Config { - c := CreateNew() - c.WithEnv(env) - return c -} - -func (c *Config) WithEnv(env any) { - c.EnvObject = env - c.Env = EnvWithCache(&c.NtCache, env) - c.Strict = c.Env.Strict -} - -func (c *Config) ConstExpr(name string) { - if c.EnvObject == nil { - panic("no environment is specified for ConstExpr()") - } - fn := reflect.ValueOf(runtime.Fetch(c.EnvObject, name)) - if fn.Kind() != reflect.Func { - panic(fmt.Errorf("const expression %q must be a function", name)) - } - c.ConstFns[name] = fn -} - -type Checker interface { - Check() -} - -func (c *Config) Check() { - for _, v := range c.Visitors { - if c, ok := v.(Checker); ok { - c.Check() - } - } -} - -func (c *Config) IsOverridden(name string) bool { - if _, ok := c.Functions[name]; ok { - return true - } - if _, ok := c.Env.Get(&c.NtCache, name); ok { - return true - } - return false -} diff --git a/vendor/github.com/expr-lang/expr/conf/env.go b/vendor/github.com/expr-lang/expr/conf/env.go deleted file mode 100644 index 0acd445709..0000000000 --- a/vendor/github.com/expr-lang/expr/conf/env.go +++ /dev/null @@ -1,76 +0,0 @@ -package conf - -import ( - "fmt" - "reflect" - - . "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/internal/deref" - "github.com/expr-lang/expr/types" -) - -// Env returns the Nature of the given environment. -// -// Deprecated: use EnvWithCache instead. -func Env(env any) Nature { - return EnvWithCache(new(Cache), env) -} - -func EnvWithCache(c *Cache, env any) Nature { - if env == nil { - n := c.NatureOf(map[string]any{}) - n.Strict = true - return n - } - - switch env := env.(type) { - case types.Map: - nt := env.Nature() - return nt - } - - v := reflect.ValueOf(env) - t := v.Type() - - switch deref.Value(v).Kind() { - case reflect.Struct: - n := c.FromType(t) - n.Strict = true - return n - - case reflect.Map: - n := c.FromType(v.Type()) - if n.TypeData == nil { - n.TypeData = new(TypeData) - } - n.Strict = true - n.Fields = make(map[string]Nature, v.Len()) - - for _, key := range v.MapKeys() { - elem := v.MapIndex(key) - if !elem.IsValid() || !elem.CanInterface() { - panic(fmt.Sprintf("invalid map value: %s", key)) - } - - face := elem.Interface() - - switch face := face.(type) { - case types.Map: - nt := face.Nature() - n.Fields[key.String()] = nt - - default: - if face == nil { - n.Fields[key.String()] = c.NatureOf(nil) - continue - } - n.Fields[key.String()] = c.NatureOf(face) - } - - } - - return n - } - - panic(fmt.Sprintf("unknown type %T", env)) -} diff --git a/vendor/github.com/expr-lang/expr/expr.go b/vendor/github.com/expr-lang/expr/expr.go deleted file mode 100644 index 280605e676..0000000000 --- a/vendor/github.com/expr-lang/expr/expr.go +++ /dev/null @@ -1,285 +0,0 @@ -package expr - -import ( - "errors" - "fmt" - "reflect" - "time" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/checker" - "github.com/expr-lang/expr/compiler" - "github.com/expr-lang/expr/conf" - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/optimizer" - "github.com/expr-lang/expr/parser" - "github.com/expr-lang/expr/patcher" - "github.com/expr-lang/expr/vm" -) - -// Option for configuring config. -type Option func(c *conf.Config) - -// Env specifies expected input of env for type checks. -// If struct is passed, all fields will be treated as variables, -// as well as all fields of embedded structs and struct itself. -// If map is passed, all items will be treated as variables. -// Methods defined on this type will be available as functions. -func Env(env any) Option { - return func(c *conf.Config) { - c.WithEnv(env) - } -} - -// AllowUndefinedVariables allows to use undefined variables inside expressions. -// This can be used with expr.Env option to partially define a few variables. -func AllowUndefinedVariables() Option { - return func(c *conf.Config) { - c.Strict = false - } -} - -// Operator allows to replace a binary operator with a function. -func Operator(operator string, fn ...string) Option { - return func(c *conf.Config) { - p := &patcher.OperatorOverloading{ - Operator: operator, - Overloads: fn, - Env: &c.Env, - Functions: c.Functions, - NtCache: &c.NtCache, - } - c.Visitors = append(c.Visitors, p) - } -} - -// ConstExpr defines func expression as constant. If all argument to this function is constants, -// then it can be replaced by result of this func call on compile step. -func ConstExpr(fn string) Option { - return func(c *conf.Config) { - c.ConstExpr(fn) - } -} - -// AsAny tells the compiler to expect any result. -func AsAny() Option { - return func(c *conf.Config) { - c.ExpectAny = true - } -} - -// AsKind tells the compiler to expect kind of the result. -func AsKind(kind reflect.Kind) Option { - return func(c *conf.Config) { - c.Expect = kind - c.ExpectAny = true - } -} - -// AsBool tells the compiler to expect a boolean result. -func AsBool() Option { - return func(c *conf.Config) { - c.Expect = reflect.Bool - c.ExpectAny = true - } -} - -// AsInt tells the compiler to expect an int result. -func AsInt() Option { - return func(c *conf.Config) { - c.Expect = reflect.Int - c.ExpectAny = true - } -} - -// AsInt64 tells the compiler to expect an int64 result. -func AsInt64() Option { - return func(c *conf.Config) { - c.Expect = reflect.Int64 - c.ExpectAny = true - } -} - -// AsFloat64 tells the compiler to expect a float64 result. -func AsFloat64() Option { - return func(c *conf.Config) { - c.Expect = reflect.Float64 - c.ExpectAny = true - } -} - -// DisableIfOperator disables the `if ... else ...` operator syntax so a custom -// function named `if(...)` can be used without conflicts. -func DisableIfOperator() Option { - return func(c *conf.Config) { - c.DisableIfOperator = true - } -} - -// WarnOnAny tells the compiler to warn if expression return any type. -func WarnOnAny() Option { - return func(c *conf.Config) { - if c.Expect == reflect.Invalid { - panic("WarnOnAny() works only with combination with AsInt(), AsBool(), etc. options") - } - c.ExpectAny = false - } -} - -// Optimize turns optimizations on or off. -func Optimize(b bool) Option { - return func(c *conf.Config) { - c.Optimize = b - } -} - -// DisableShortCircuit turns short circuit off. -func DisableShortCircuit() Option { - return func(c *conf.Config) { - c.ShortCircuit = false - } -} - -// Patch adds visitor to list of visitors what will be applied before compiling AST to bytecode. -func Patch(visitor ast.Visitor) Option { - return func(c *conf.Config) { - c.Visitors = append(c.Visitors, visitor) - } -} - -// Function adds function to list of functions what will be available in expressions. -func Function(name string, fn func(params ...any) (any, error), types ...any) Option { - return func(c *conf.Config) { - ts := make([]reflect.Type, len(types)) - for i, t := range types { - t := reflect.TypeOf(t) - if t.Kind() == reflect.Ptr { - t = t.Elem() - } - if t.Kind() != reflect.Func { - panic(fmt.Sprintf("expr: type of %s is not a function", name)) - } - ts[i] = t - } - c.Functions[name] = &builtin.Function{ - Name: name, - Func: fn, - Types: ts, - } - } -} - -// DisableAllBuiltins disables all builtins. -func DisableAllBuiltins() Option { - return func(c *conf.Config) { - for name := range c.Builtins { - c.Disabled[name] = true - } - } -} - -// DisableBuiltin disables builtin function. -func DisableBuiltin(name string) Option { - return func(c *conf.Config) { - c.Disabled[name] = true - } -} - -// EnableBuiltin enables builtin function. -func EnableBuiltin(name string) Option { - return func(c *conf.Config) { - delete(c.Disabled, name) - } -} - -// WithContext passes context to all functions calls with a context.Context argument. -func WithContext(name string) Option { - return Patch(patcher.WithContext{ - Name: name, - }) -} - -// Timezone sets default timezone for date() and now() builtin functions. -func Timezone(name string) Option { - tz, err := time.LoadLocation(name) - if err != nil { - panic(err) - } - return Patch(patcher.WithTimezone{ - Location: tz, - }) -} - -// MaxNodes sets the maximum number of nodes allowed in the expression. -// By default, the maximum number of nodes is conf.DefaultMaxNodes. -// If MaxNodes is set to 0, the node budget check is disabled. -func MaxNodes(n uint) Option { - return func(c *conf.Config) { - c.MaxNodes = n - } -} - -// Compile parses and compiles given input expression to bytecode program. -func Compile(input string, ops ...Option) (*vm.Program, error) { - config := conf.CreateNew() - for _, op := range ops { - op(config) - } - for name := range config.Disabled { - delete(config.Builtins, name) - } - config.Check() - - tree, err := checker.ParseCheck(input, config) - if err != nil { - return nil, err - } - - if config.Optimize { - err = optimizer.Optimize(&tree.Node, config) - if err != nil { - var fileError *file.Error - if errors.As(err, &fileError) { - return nil, fileError.Bind(tree.Source) - } - return nil, err - } - } - - program, err := compiler.Compile(tree, config) - if err != nil { - return nil, err - } - - return program, nil -} - -// Run evaluates given bytecode program. -func Run(program *vm.Program, env any) (any, error) { - return vm.Run(program, env) -} - -// Eval parses, compiles and runs given input. -func Eval(input string, env any) (any, error) { - if _, ok := env.(Option); ok { - return nil, fmt.Errorf("misused expr.Eval: second argument (env) should be passed without expr.Env") - } - - tree, err := parser.Parse(input) - if err != nil { - return nil, err - } - - program, err := compiler.Compile(tree, nil) - if err != nil { - return nil, err - } - - output, err := Run(program, env) - if err != nil { - return nil, err - } - - return output, nil -} diff --git a/vendor/github.com/expr-lang/expr/file/error.go b/vendor/github.com/expr-lang/expr/file/error.go deleted file mode 100644 index c398ed59cb..0000000000 --- a/vendor/github.com/expr-lang/expr/file/error.go +++ /dev/null @@ -1,85 +0,0 @@ -package file - -import ( - "fmt" - "strings" -) - -type Error struct { - Location - Line int `json:"line"` - Column int `json:"column"` - Message string `json:"message"` - Snippet string `json:"snippet"` - Prev error `json:"prev"` -} - -func (e *Error) Error() string { - return e.format() -} - -var tabReplacer = strings.NewReplacer("\t", " ") - -func (e *Error) Bind(source Source) *Error { - src := source.String() - - var runeCount, lineStart int - e.Line = 1 - e.Column = 0 - for i, r := range src { - if runeCount == e.From { - break - } - if r == '\n' { - lineStart = i + 1 - e.Line++ - e.Column = 0 - } else { - e.Column++ - } - runeCount++ - } - - lineEnd := lineStart + strings.IndexByte(src[lineStart:], '\n') - if lineEnd < lineStart { - lineEnd = len(src) - } - if lineStart == lineEnd { - return e - } - - const prefix = "\n | " - line := src[lineStart:lineEnd] - snippet := new(strings.Builder) - snippet.Grow(2*len(prefix) + len(line) + e.Column + 1) - snippet.WriteString(prefix) - tabReplacer.WriteString(snippet, line) - snippet.WriteString(prefix) - for i := 0; i < e.Column; i++ { - snippet.WriteByte('.') - } - snippet.WriteByte('^') - e.Snippet = snippet.String() - return e -} - -func (e *Error) Unwrap() error { - return e.Prev -} - -func (e *Error) Wrap(err error) { - e.Prev = err -} - -func (e *Error) format() string { - if e.Snippet == "" { - return e.Message - } - return fmt.Sprintf( - "%s (%d:%d)%s", - e.Message, - e.Line, - e.Column+1, // add one to the 0-based column for display - e.Snippet, - ) -} diff --git a/vendor/github.com/expr-lang/expr/file/location.go b/vendor/github.com/expr-lang/expr/file/location.go deleted file mode 100644 index 6c6bc2427e..0000000000 --- a/vendor/github.com/expr-lang/expr/file/location.go +++ /dev/null @@ -1,6 +0,0 @@ -package file - -type Location struct { - From int `json:"from"` - To int `json:"to"` -} diff --git a/vendor/github.com/expr-lang/expr/file/source.go b/vendor/github.com/expr-lang/expr/file/source.go deleted file mode 100644 index b11bb5f9d6..0000000000 --- a/vendor/github.com/expr-lang/expr/file/source.go +++ /dev/null @@ -1,36 +0,0 @@ -package file - -import "strings" - -type Source struct { - raw string -} - -func NewSource(contents string) Source { - return Source{ - raw: contents, - } -} - -func (s Source) String() string { - return s.raw -} - -func (s Source) Snippet(line int) (string, bool) { - if s.raw == "" { - return "", false - } - var start int - for i := 1; i < line; i++ { - pos := strings.IndexByte(s.raw[start:], '\n') - if pos < 0 { - return "", false - } - start += pos + 1 - } - end := start + strings.IndexByte(s.raw[start:], '\n') - if end < start { - end = len(s.raw) - } - return s.raw[start:end], true -} diff --git a/vendor/github.com/expr-lang/expr/internal/deref/deref.go b/vendor/github.com/expr-lang/expr/internal/deref/deref.go deleted file mode 100644 index 4ad7877f8d..0000000000 --- a/vendor/github.com/expr-lang/expr/internal/deref/deref.go +++ /dev/null @@ -1,56 +0,0 @@ -package deref - -import ( - "fmt" - "reflect" -) - -func Interface(p any) any { - if p == nil { - return nil - } - - v := reflect.ValueOf(p) - - for v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface { - if v.IsNil() { - return nil - } - v = v.Elem() - } - - if v.IsValid() { - return v.Interface() - } - - panic(fmt.Sprintf("cannot dereference %v", p)) -} - -func Type(t reflect.Type) reflect.Type { - if t == nil { - return nil - } - for t.Kind() == reflect.Ptr { - t = t.Elem() - } - return t -} - -func Value(v reflect.Value) reflect.Value { - for v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface { - if v.IsNil() { - return v - } - v = v.Elem() - } - return v -} - -func TypeKind(t reflect.Type, k reflect.Kind) (_ reflect.Type, _ reflect.Kind, changed bool) { - for k == reflect.Pointer { - changed = true - t = t.Elem() - k = t.Kind() - } - return t, k, changed -} diff --git a/vendor/github.com/expr-lang/expr/internal/ring/ring.go b/vendor/github.com/expr-lang/expr/internal/ring/ring.go deleted file mode 100644 index cc9e727b00..0000000000 --- a/vendor/github.com/expr-lang/expr/internal/ring/ring.go +++ /dev/null @@ -1,85 +0,0 @@ -package ring - -// Ring is a very simple ring buffer implementation that uses a slice. The -// internal slice will only grow, never shrink. When it grows, it grows in -// chunks of "chunkSize" (given as argument in the [New] function). Pointer and -// reference types can be safely used because memory is cleared. -type Ring[T any] struct { - data []T - back, len, chunkSize int -} - -func New[T any](chunkSize int) *Ring[T] { - if chunkSize < 1 { - panic("chunkSize must be greater than zero") - } - return &Ring[T]{ - chunkSize: chunkSize, - } -} - -func (r *Ring[T]) Len() int { - return r.len -} - -func (r *Ring[T]) Cap() int { - return len(r.data) -} - -func (r *Ring[T]) Reset() { - var zero T - for i := range r.data { - r.data[i] = zero // clear mem, optimized by the compiler, in Go 1.21 the "clear" builtin can be used - } - r.back = 0 - r.len = 0 -} - -// Nth returns the n-th oldest value (zero-based) in the ring without making -// any change. -func (r *Ring[T]) Nth(n int) (v T, ok bool) { - if n < 0 || n >= r.len || len(r.data) == 0 { - return v, false - } - n = (n + r.back) % len(r.data) - return r.data[n], true -} - -// Dequeue returns the oldest value. -func (r *Ring[T]) Dequeue() (v T, ok bool) { - if r.len == 0 { - return v, false - } - v, r.data[r.back] = r.data[r.back], v // retrieve and clear mem - r.len-- - r.back = (r.back + 1) % len(r.data) - return v, true -} - -// Enqueue adds an item to the ring. -func (r *Ring[T]) Enqueue(v T) { - if r.len == len(r.data) { - r.grow() - } - writePos := (r.back + r.len) % len(r.data) - r.data[writePos] = v - r.len++ -} - -func (r *Ring[T]) grow() { - s := make([]T, len(r.data)+r.chunkSize) - if r.len > 0 { - chunk1 := r.back + r.len - if chunk1 > len(r.data) { - chunk1 = len(r.data) - } - copied := copy(s, r.data[r.back:chunk1]) - - if copied < r.len { // wrapped slice - chunk2 := r.len - copied - copy(s[copied:], r.data[:chunk2]) - } - } - r.back = 0 - r.data = s -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/const_expr.go b/vendor/github.com/expr-lang/expr/optimizer/const_expr.go deleted file mode 100644 index 1b45385f67..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/const_expr.go +++ /dev/null @@ -1,81 +0,0 @@ -package optimizer - -import ( - "fmt" - "reflect" - "strings" - - . "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/file" -) - -var errorType = reflect.TypeOf((*error)(nil)).Elem() - -type constExpr struct { - applied bool - err error - fns map[string]reflect.Value -} - -func (c *constExpr) Visit(node *Node) { - defer func() { - if r := recover(); r != nil { - msg := fmt.Sprintf("%v", r) - // Make message more actual, it's a runtime error, but at compile step. - msg = strings.Replace(msg, "runtime error:", "compile error:", 1) - c.err = &file.Error{ - Location: (*node).Location(), - Message: msg, - } - } - }() - - if call, ok := (*node).(*CallNode); ok { - if name, ok := call.Callee.(*IdentifierNode); ok { - fn, ok := c.fns[name.Value] - if ok { - in := make([]reflect.Value, len(call.Arguments)) - for i := 0; i < len(call.Arguments); i++ { - arg := call.Arguments[i] - var param any - - switch a := arg.(type) { - case *NilNode: - param = nil - case *IntegerNode: - param = a.Value - case *FloatNode: - param = a.Value - case *BoolNode: - param = a.Value - case *StringNode: - param = a.Value - case *ConstantNode: - param = a.Value - - default: - return // Const expr optimization not applicable. - } - - if param == nil && reflect.TypeOf(param) == nil { - // In case of nil value and nil type use this hack, - // otherwise reflect.Call will panic on zero value. - in[i] = reflect.ValueOf(¶m).Elem() - } else { - in[i] = reflect.ValueOf(param) - } - } - - out := fn.Call(in) - value := out[0].Interface() - if len(out) == 2 && out[1].Type() == errorType && !out[1].IsNil() { - c.err = out[1].Interface().(error) - return - } - constNode := &ConstantNode{Value: value} - patchWithType(node, constNode) - c.applied = true - } - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/filter_first.go b/vendor/github.com/expr-lang/expr/optimizer/filter_first.go deleted file mode 100644 index b04a5cb343..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/filter_first.go +++ /dev/null @@ -1,38 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" -) - -type filterFirst struct{} - -func (*filterFirst) Visit(node *Node) { - if member, ok := (*node).(*MemberNode); ok && member.Property != nil && !member.Optional { - if prop, ok := member.Property.(*IntegerNode); ok && prop.Value == 0 { - if filter, ok := member.Node.(*BuiltinNode); ok && - filter.Name == "filter" && - len(filter.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "find", - Arguments: filter.Arguments, - Throws: true, // to match the behavior of filter()[0] - Map: filter.Map, - }) - } - } - } - if first, ok := (*node).(*BuiltinNode); ok && - first.Name == "first" && - len(first.Arguments) == 1 { - if filter, ok := first.Arguments[0].(*BuiltinNode); ok && - filter.Name == "filter" && - len(filter.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "find", - Arguments: filter.Arguments, - Throws: false, // as first() will return nil if not found - Map: filter.Map, - }) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/filter_last.go b/vendor/github.com/expr-lang/expr/optimizer/filter_last.go deleted file mode 100644 index 8c046bf886..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/filter_last.go +++ /dev/null @@ -1,38 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" -) - -type filterLast struct{} - -func (*filterLast) Visit(node *Node) { - if member, ok := (*node).(*MemberNode); ok && member.Property != nil && !member.Optional { - if prop, ok := member.Property.(*IntegerNode); ok && prop.Value == -1 { - if filter, ok := member.Node.(*BuiltinNode); ok && - filter.Name == "filter" && - len(filter.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "findLast", - Arguments: filter.Arguments, - Throws: true, // to match the behavior of filter()[-1] - Map: filter.Map, - }) - } - } - } - if first, ok := (*node).(*BuiltinNode); ok && - first.Name == "last" && - len(first.Arguments) == 1 { - if filter, ok := first.Arguments[0].(*BuiltinNode); ok && - filter.Name == "filter" && - len(filter.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "findLast", - Arguments: filter.Arguments, - Throws: false, // as last() will return nil if not found - Map: filter.Map, - }) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/filter_len.go b/vendor/github.com/expr-lang/expr/optimizer/filter_len.go deleted file mode 100644 index c66fde961d..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/filter_len.go +++ /dev/null @@ -1,22 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" -) - -type filterLen struct{} - -func (*filterLen) Visit(node *Node) { - if ln, ok := (*node).(*BuiltinNode); ok && - ln.Name == "len" && - len(ln.Arguments) == 1 { - if filter, ok := ln.Arguments[0].(*BuiltinNode); ok && - filter.Name == "filter" && - len(filter.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "count", - Arguments: filter.Arguments, - }) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/filter_map.go b/vendor/github.com/expr-lang/expr/optimizer/filter_map.go deleted file mode 100644 index 17659a9147..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/filter_map.go +++ /dev/null @@ -1,33 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" -) - -type filterMap struct{} - -func (*filterMap) Visit(node *Node) { - if mapBuiltin, ok := (*node).(*BuiltinNode); ok && - mapBuiltin.Name == "map" && - len(mapBuiltin.Arguments) == 2 && - Find(mapBuiltin.Arguments[1], isIndexPointer) == nil { - if predicate, ok := mapBuiltin.Arguments[1].(*PredicateNode); ok { - if filter, ok := mapBuiltin.Arguments[0].(*BuiltinNode); ok && - filter.Name == "filter" && - filter.Map == nil /* not already optimized */ { - patchCopyType(node, &BuiltinNode{ - Name: "filter", - Arguments: filter.Arguments, - Map: predicate.Node, - }) - } - } - } -} - -func isIndexPointer(node Node) bool { - if pointer, ok := node.(*PointerNode); ok && pointer.Name == "index" { - return true - } - return false -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/fold.go b/vendor/github.com/expr-lang/expr/optimizer/fold.go deleted file mode 100644 index 2e5498fa50..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/fold.go +++ /dev/null @@ -1,343 +0,0 @@ -package optimizer - -import ( - "math" - - . "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/file" -) - -type fold struct { - applied bool - err *file.Error -} - -func (fold *fold) Visit(node *Node) { - patch := func(newNode Node) { - fold.applied = true - patchWithType(node, newNode) - } - patchCopy := func(newNode Node) { - fold.applied = true - patchCopyType(node, newNode) - } - - switch n := (*node).(type) { - case *UnaryNode: - switch n.Operator { - case "-": - if i, ok := n.Node.(*IntegerNode); ok { - patch(&IntegerNode{Value: -i.Value}) - } - if i, ok := n.Node.(*FloatNode); ok { - patch(&FloatNode{Value: -i.Value}) - } - case "+": - if i, ok := n.Node.(*IntegerNode); ok { - patch(&IntegerNode{Value: i.Value}) - } - if i, ok := n.Node.(*FloatNode); ok { - patch(&FloatNode{Value: i.Value}) - } - case "!", "not": - if a := toBool(n.Node); a != nil { - patch(&BoolNode{Value: !a.Value}) - } - } - - case *BinaryNode: - switch n.Operator { - case "+": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&IntegerNode{Value: a.Value + b.Value}) - } - } - { - a := toInteger(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: float64(a.Value) + b.Value}) - } - } - { - a := toFloat(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value + float64(b.Value)}) - } - } - { - a := toFloat(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value + b.Value}) - } - } - { - a := toString(n.Left) - b := toString(n.Right) - if a != nil && b != nil { - patch(&StringNode{Value: a.Value + b.Value}) - } - } - case "-": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&IntegerNode{Value: a.Value - b.Value}) - } - } - { - a := toInteger(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: float64(a.Value) - b.Value}) - } - } - { - a := toFloat(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value - float64(b.Value)}) - } - } - { - a := toFloat(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value - b.Value}) - } - } - case "*": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&IntegerNode{Value: a.Value * b.Value}) - } - } - { - a := toInteger(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: float64(a.Value) * b.Value}) - } - } - { - a := toFloat(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value * float64(b.Value)}) - } - } - { - a := toFloat(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value * b.Value}) - } - } - case "/": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: float64(a.Value) / float64(b.Value)}) - } - } - { - a := toInteger(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: float64(a.Value) / b.Value}) - } - } - { - a := toFloat(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value / float64(b.Value)}) - } - } - { - a := toFloat(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: a.Value / b.Value}) - } - } - case "%": - if a, ok := n.Left.(*IntegerNode); ok { - if b, ok := n.Right.(*IntegerNode); ok { - if b.Value == 0 { - fold.err = &file.Error{ - Location: (*node).Location(), - Message: "integer divide by zero", - } - return - } - patch(&IntegerNode{Value: a.Value % b.Value}) - } - } - case "**", "^": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: math.Pow(float64(a.Value), float64(b.Value))}) - } - } - { - a := toInteger(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: math.Pow(float64(a.Value), b.Value)}) - } - } - { - a := toFloat(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: math.Pow(a.Value, float64(b.Value))}) - } - } - { - a := toFloat(n.Left) - b := toFloat(n.Right) - if a != nil && b != nil { - patch(&FloatNode{Value: math.Pow(a.Value, b.Value)}) - } - } - case "and", "&&": - a := toBool(n.Left) - b := toBool(n.Right) - - if a != nil && a.Value { // true and x - patchCopy(n.Right) - } else if b != nil && b.Value { // x and true - patchCopy(n.Left) - } else if (a != nil && !a.Value) || (b != nil && !b.Value) { // "x and false" or "false and x" - patch(&BoolNode{Value: false}) - } - case "or", "||": - a := toBool(n.Left) - b := toBool(n.Right) - - if a != nil && !a.Value { // false or x - patchCopy(n.Right) - } else if b != nil && !b.Value { // x or false - patchCopy(n.Left) - } else if (a != nil && a.Value) || (b != nil && b.Value) { // "x or true" or "true or x" - patch(&BoolNode{Value: true}) - } - case "==": - { - a := toInteger(n.Left) - b := toInteger(n.Right) - if a != nil && b != nil { - patch(&BoolNode{Value: a.Value == b.Value}) - } - } - { - a := toString(n.Left) - b := toString(n.Right) - if a != nil && b != nil { - patch(&BoolNode{Value: a.Value == b.Value}) - } - } - { - a := toBool(n.Left) - b := toBool(n.Right) - if a != nil && b != nil { - patch(&BoolNode{Value: a.Value == b.Value}) - } - } - } - - case *ArrayNode: - if len(n.Nodes) > 0 { - for _, a := range n.Nodes { - switch a.(type) { - case *IntegerNode, *FloatNode, *StringNode, *BoolNode: - continue - default: - return - } - } - value := make([]any, len(n.Nodes)) - for i, a := range n.Nodes { - switch b := a.(type) { - case *IntegerNode: - value[i] = b.Value - case *FloatNode: - value[i] = b.Value - case *StringNode: - value[i] = b.Value - case *BoolNode: - value[i] = b.Value - } - } - patch(&ConstantNode{Value: value}) - } - - case *BuiltinNode: - // TODO: Move this to a separate visitor filter_filter.go - switch n.Name { - case "filter": - if len(n.Arguments) != 2 { - return - } - if base, ok := n.Arguments[0].(*BuiltinNode); ok && base.Name == "filter" { - patchCopy(&BuiltinNode{ - Name: "filter", - Arguments: []Node{ - base.Arguments[0], - &PredicateNode{ - Node: &BinaryNode{ - Operator: "&&", - Left: base.Arguments[1].(*PredicateNode).Node, - Right: n.Arguments[1].(*PredicateNode).Node, - }, - }, - }, - }) - } - } - } -} - -func toString(n Node) *StringNode { - switch a := n.(type) { - case *StringNode: - return a - } - return nil -} - -func toInteger(n Node) *IntegerNode { - switch a := n.(type) { - case *IntegerNode: - return a - } - return nil -} - -func toFloat(n Node) *FloatNode { - switch a := n.(type) { - case *FloatNode: - return a - } - return nil -} - -func toBool(n Node) *BoolNode { - switch a := n.(type) { - case *BoolNode: - return a - } - return nil -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/in_array.go b/vendor/github.com/expr-lang/expr/optimizer/in_array.go deleted file mode 100644 index e91320c0f9..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/in_array.go +++ /dev/null @@ -1,68 +0,0 @@ -package optimizer - -import ( - "reflect" - - . "github.com/expr-lang/expr/ast" -) - -type inArray struct{} - -func (*inArray) Visit(node *Node) { - switch n := (*node).(type) { - case *BinaryNode: - if n.Operator == "in" { - if array, ok := n.Right.(*ArrayNode); ok { - if len(array.Nodes) > 0 { - t := n.Left.Type() - if t == nil || t.Kind() != reflect.Int { - // This optimization can be only performed if left side is int type, - // as runtime.in func uses reflect.Map.MapIndex and keys of map must, - // be same as checked value type. - goto string - } - - for _, a := range array.Nodes { - if _, ok := a.(*IntegerNode); !ok { - goto string - } - } - { - value := make(map[int]struct{}) - for _, a := range array.Nodes { - value[a.(*IntegerNode).Value] = struct{}{} - } - m := &ConstantNode{Value: value} - m.SetType(reflect.TypeOf(value)) - patchCopyType(node, &BinaryNode{ - Operator: n.Operator, - Left: n.Left, - Right: m, - }) - } - - string: - for _, a := range array.Nodes { - if _, ok := a.(*StringNode); !ok { - return - } - } - { - value := make(map[string]struct{}) - for _, a := range array.Nodes { - value[a.(*StringNode).Value] = struct{}{} - } - m := &ConstantNode{Value: value} - m.SetType(reflect.TypeOf(value)) - patchCopyType(node, &BinaryNode{ - Operator: n.Operator, - Left: n.Left, - Right: m, - }) - } - - } - } - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/in_range.go b/vendor/github.com/expr-lang/expr/optimizer/in_range.go deleted file mode 100644 index ed2f557ea5..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/in_range.go +++ /dev/null @@ -1,43 +0,0 @@ -package optimizer - -import ( - "reflect" - - . "github.com/expr-lang/expr/ast" -) - -type inRange struct{} - -func (*inRange) Visit(node *Node) { - switch n := (*node).(type) { - case *BinaryNode: - if n.Operator == "in" { - t := n.Left.Type() - if t == nil { - return - } - if t.Kind() != reflect.Int { - return - } - if rangeOp, ok := n.Right.(*BinaryNode); ok && rangeOp.Operator == ".." { - if from, ok := rangeOp.Left.(*IntegerNode); ok { - if to, ok := rangeOp.Right.(*IntegerNode); ok { - patchCopyType(node, &BinaryNode{ - Operator: "and", - Left: &BinaryNode{ - Operator: ">=", - Left: n.Left, - Right: from, - }, - Right: &BinaryNode{ - Operator: "<=", - Left: n.Left, - Right: to, - }, - }) - } - } - } - } - } -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/optimizer.go b/vendor/github.com/expr-lang/expr/optimizer/optimizer.go deleted file mode 100644 index 9a9677c1b4..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/optimizer.go +++ /dev/null @@ -1,79 +0,0 @@ -package optimizer - -import ( - "fmt" - "reflect" - - . "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/conf" -) - -func Optimize(node *Node, config *conf.Config) error { - Walk(node, &inArray{}) - for limit := 1000; limit >= 0; limit-- { - fold := &fold{} - Walk(node, fold) - if fold.err != nil { - return fold.err - } - if !fold.applied { - break - } - } - if config != nil && len(config.ConstFns) > 0 { - for limit := 100; limit >= 0; limit-- { - constExpr := &constExpr{ - fns: config.ConstFns, - } - Walk(node, constExpr) - if constExpr.err != nil { - return constExpr.err - } - if !constExpr.applied { - break - } - } - } - Walk(node, &inRange{}) - Walk(node, &filterMap{}) - Walk(node, &filterLen{}) - Walk(node, &filterLast{}) - Walk(node, &filterFirst{}) - Walk(node, &predicateCombination{}) - Walk(node, &sumArray{}) - Walk(node, &sumMap{}) - return nil -} - -var ( - boolType = reflect.TypeOf(true) - integerType = reflect.TypeOf(0) - floatType = reflect.TypeOf(float64(0)) - stringType = reflect.TypeOf("") -) - -func patchWithType(node *Node, newNode Node) { - switch n := newNode.(type) { - case *BoolNode: - newNode.SetType(boolType) - case *IntegerNode: - newNode.SetType(integerType) - case *FloatNode: - newNode.SetType(floatType) - case *StringNode: - newNode.SetType(stringType) - case *ConstantNode: - newNode.SetType(reflect.TypeOf(n.Value)) - case *BinaryNode: - newNode.SetType(n.Type()) - default: - panic(fmt.Sprintf("unknown type %T", newNode)) - } - Patch(node, newNode) -} - -func patchCopyType(node *Node, newNode Node) { - t := (*node).Type() - newNode.SetType(t) - Patch(node, newNode) -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/predicate_combination.go b/vendor/github.com/expr-lang/expr/optimizer/predicate_combination.go deleted file mode 100644 index 65f88e3485..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/predicate_combination.go +++ /dev/null @@ -1,61 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/parser/operator" -) - -/* -predicateCombination is a visitor that combines multiple predicate calls into a single call. -For example, the following expression: - - all(x, x > 1) && all(x, x < 10) -> all(x, x > 1 && x < 10) - any(x, x > 1) || any(x, x < 10) -> any(x, x > 1 || x < 10) - none(x, x > 1) && none(x, x < 10) -> none(x, x > 1 || x < 10) -*/ -type predicateCombination struct{} - -func (v *predicateCombination) Visit(node *Node) { - if op, ok := (*node).(*BinaryNode); ok && operator.IsBoolean(op.Operator) { - if left, ok := op.Left.(*BuiltinNode); ok { - if combinedOp, ok := combinedOperator(left.Name, op.Operator); ok { - if right, ok := op.Right.(*BuiltinNode); ok && right.Name == left.Name { - if left.Arguments[0].Type() == right.Arguments[0].Type() && left.Arguments[0].String() == right.Arguments[0].String() { - predicate := &PredicateNode{ - Node: &BinaryNode{ - Operator: combinedOp, - Left: left.Arguments[1].(*PredicateNode).Node, - Right: right.Arguments[1].(*PredicateNode).Node, - }, - } - v.Visit(&predicate.Node) - patchCopyType(node, &BuiltinNode{ - Name: left.Name, - Arguments: []Node{ - left.Arguments[0], - predicate, - }, - }) - } - } - } - } - } -} - -func combinedOperator(fn, op string) (string, bool) { - switch { - case fn == "all" && (op == "and" || op == "&&"): - return op, true - case fn == "any" && (op == "or" || op == "||"): - return op, true - case fn == "none" && (op == "and" || op == "&&"): - switch op { - case "and": - return "or", true - case "&&": - return "||", true - } - } - return "", false -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/sum_array.go b/vendor/github.com/expr-lang/expr/optimizer/sum_array.go deleted file mode 100644 index 3c96795efc..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/sum_array.go +++ /dev/null @@ -1,37 +0,0 @@ -package optimizer - -import ( - "fmt" - - . "github.com/expr-lang/expr/ast" -) - -type sumArray struct{} - -func (*sumArray) Visit(node *Node) { - if sumBuiltin, ok := (*node).(*BuiltinNode); ok && - sumBuiltin.Name == "sum" && - len(sumBuiltin.Arguments) == 1 { - if array, ok := sumBuiltin.Arguments[0].(*ArrayNode); ok && - len(array.Nodes) >= 2 { - patchCopyType(node, sumArrayFold(array)) - } - } -} - -func sumArrayFold(array *ArrayNode) *BinaryNode { - if len(array.Nodes) > 2 { - return &BinaryNode{ - Operator: "+", - Left: array.Nodes[0], - Right: sumArrayFold(&ArrayNode{Nodes: array.Nodes[1:]}), - } - } else if len(array.Nodes) == 2 { - return &BinaryNode{ - Operator: "+", - Left: array.Nodes[0], - Right: array.Nodes[1], - } - } - panic(fmt.Errorf("sumArrayFold: invalid array length %d", len(array.Nodes))) -} diff --git a/vendor/github.com/expr-lang/expr/optimizer/sum_map.go b/vendor/github.com/expr-lang/expr/optimizer/sum_map.go deleted file mode 100644 index 6de97d373d..0000000000 --- a/vendor/github.com/expr-lang/expr/optimizer/sum_map.go +++ /dev/null @@ -1,25 +0,0 @@ -package optimizer - -import ( - . "github.com/expr-lang/expr/ast" -) - -type sumMap struct{} - -func (*sumMap) Visit(node *Node) { - if sumBuiltin, ok := (*node).(*BuiltinNode); ok && - sumBuiltin.Name == "sum" && - len(sumBuiltin.Arguments) == 1 { - if mapBuiltin, ok := sumBuiltin.Arguments[0].(*BuiltinNode); ok && - mapBuiltin.Name == "map" && - len(mapBuiltin.Arguments) == 2 { - patchCopyType(node, &BuiltinNode{ - Name: "sum", - Arguments: []Node{ - mapBuiltin.Arguments[0], - mapBuiltin.Arguments[1], - }, - }) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/parser/lexer/lexer.go b/vendor/github.com/expr-lang/expr/parser/lexer/lexer.go deleted file mode 100644 index 0e75942d0d..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/lexer/lexer.go +++ /dev/null @@ -1,315 +0,0 @@ -package lexer - -import ( - "fmt" - "io" - "strings" - "unicode/utf8" - - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/internal/ring" -) - -const ringChunkSize = 10 - -// Lex will buffer and return the tokens of a disposable *[Lexer]. -func Lex(source file.Source) ([]Token, error) { - tokens := make([]Token, 0, ringChunkSize) - l := New() - l.Reset(source) - for { - t, err := l.Next() - switch err { - case nil: - tokens = append(tokens, t) - case io.EOF: - return tokens, nil - default: - return nil, err - } - } -} - -// New returns a reusable lexer. -func New() *Lexer { - return &Lexer{ - tokens: ring.New[Token](ringChunkSize), - } -} - -type Lexer struct { - state stateFn - source file.Source - tokens *ring.Ring[Token] - err *file.Error - start, end struct { - byte, rune int - } - eof bool - // When true, keywords `if`/`else` are not treated as operators and - // will be emitted as identifiers instead (for compatibility with custom if()). - DisableIfOperator bool -} - -func (l *Lexer) Reset(source file.Source) { - l.source = source - l.tokens.Reset() - l.state = root -} - -func (l *Lexer) Next() (Token, error) { - for l.state != nil && l.err == nil && l.tokens.Len() == 0 { - l.state = l.state(l) - } - if l.err != nil { - return Token{}, l.err.Bind(l.source) - } - if t, ok := l.tokens.Dequeue(); ok { - return t, nil - } - return Token{}, io.EOF -} - -const eof rune = -1 - -func (l *Lexer) commit() { - l.start = l.end -} - -func (l *Lexer) next() rune { - if l.end.byte >= len(l.source.String()) { - l.eof = true - return eof - } - r, sz := utf8.DecodeRuneInString(l.source.String()[l.end.byte:]) - l.end.rune++ - l.end.byte += sz - return r -} - -func (l *Lexer) peek() rune { - if l.end.byte < len(l.source.String()) { - r, _ := utf8.DecodeRuneInString(l.source.String()[l.end.byte:]) - return r - } - return eof -} - -func (l *Lexer) backup() { - if l.eof { - l.eof = false - } else if l.end.rune > 0 { - _, sz := utf8.DecodeLastRuneInString(l.source.String()[:l.end.byte]) - l.end.byte -= sz - l.end.rune-- - } -} - -func (l *Lexer) emit(t Kind) { - l.emitValue(t, l.word()) -} - -func (l *Lexer) emitValue(t Kind, value string) { - l.tokens.Enqueue(Token{ - Location: file.Location{From: l.start.rune, To: l.end.rune}, - Kind: t, - Value: value, - }) - l.commit() -} - -func (l *Lexer) emitEOF() { - from := l.end.rune - 1 - if from < 0 { - from = 0 - } - to := l.end.rune - 0 - if to < 0 { - to = 0 - } - l.tokens.Enqueue(Token{ - Location: file.Location{From: from, To: to}, - Kind: EOF, - }) - l.commit() -} - -func (l *Lexer) skip() { - l.commit() -} - -func (l *Lexer) word() string { - return l.source.String()[l.start.byte:l.end.byte] -} - -func (l *Lexer) accept(valid string) bool { - if strings.ContainsRune(valid, l.peek()) { - l.next() - return true - } - return false -} - -func (l *Lexer) acceptRun(valid string) { - for l.accept(valid) { - } -} - -func (l *Lexer) skipSpaces() { - l.acceptRun(" ") - l.skip() -} - -func (l *Lexer) error(format string, args ...any) stateFn { - if l.err == nil { // show first error - end := l.end.rune - if l.eof { - end++ - } - l.err = &file.Error{ - Location: file.Location{ - From: end - 1, - To: end, - }, - Message: fmt.Sprintf(format, args...), - } - } - return nil -} - -func digitVal(ch rune) int { - switch { - case '0' <= ch && ch <= '9': - return int(ch - '0') - case 'a' <= lower(ch) && lower(ch) <= 'f': - return int(lower(ch) - 'a' + 10) - } - return 16 // larger than any legal digit val -} - -func lower(ch rune) rune { return ('a' - 'A') | ch } // returns lower-case ch iff ch is ASCII letter - -func (l *Lexer) scanDigits(ch rune, base, n int) rune { - for n > 0 && digitVal(ch) < base { - ch = l.next() - n-- - } - if n > 0 { - l.error("invalid char escape") - } - return ch -} - -func (l *Lexer) scanEscape(quote rune) rune { - ch := l.next() // read character after '/' - switch ch { - case 'a', 'b', 'f', 'n', 'r', 't', 'v', '\\', quote: - // nothing to do - ch = l.next() - case '0', '1', '2', '3', '4', '5', '6', '7': - ch = l.scanDigits(ch, 8, 3) - case 'x': - ch = l.scanDigits(l.next(), 16, 2) - case 'u': - // Support variable-length form: \u{XXXXXX} - if l.peek() == '{' { - // consume '{' - l.next() - // read 1-6 hex digits - digits := 0 - for { - p := l.peek() - if p == '}' { - break - } - if digitVal(p) >= 16 { - l.error("invalid char escape") - return eof - } - if digits >= 6 { - l.error("invalid char escape") - return eof - } - l.next() - digits++ - } - if l.peek() != '}' || digits == 0 { - l.error("invalid char escape") - return eof - } - // consume '}' and continue - l.next() - ch = l.next() - break - } - ch = l.scanDigits(l.next(), 16, 4) - case 'U': - ch = l.scanDigits(l.next(), 16, 8) - default: - l.error("invalid char escape") - } - return ch -} - -func (l *Lexer) scanString(quote rune) (n int) { - ch := l.next() // read character after quote - for ch != quote { - if ch == '\n' || ch == eof { - l.error("literal not terminated") - return - } - if ch == '\\' { - ch = l.scanEscape(quote) - } else { - ch = l.next() - } - n++ - } - return -} - -func (l *Lexer) scanRawString(quote rune) (n int) { - var escapedQuotes int -loop: - for { - ch := l.next() - for ch == quote && l.peek() == quote { - // skip current and next char which are the quote escape sequence - l.next() - ch = l.next() - escapedQuotes++ - } - switch ch { - case quote: - break loop - case eof: - l.error("literal not terminated") - return - } - n++ - } - str := l.source.String()[l.start.byte+1 : l.end.byte-1] - - // handle simple case where no quoted backtick was found, then no allocation - // is needed for the new string - if escapedQuotes == 0 { - l.emitValue(String, str) - return - } - - var b strings.Builder - var skipped bool - b.Grow(len(str) - escapedQuotes) - for _, r := range str { - if r == quote { - if !skipped { - skipped = true - continue - } - skipped = false - } - b.WriteRune(r) - } - l.emitValue(String, b.String()) - return -} diff --git a/vendor/github.com/expr-lang/expr/parser/lexer/state.go b/vendor/github.com/expr-lang/expr/parser/lexer/state.go deleted file mode 100644 index 91857eade2..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/lexer/state.go +++ /dev/null @@ -1,232 +0,0 @@ -package lexer - -import ( - "strings" - - "github.com/expr-lang/expr/parser/utils" -) - -type stateFn func(*Lexer) stateFn - -func root(l *Lexer) stateFn { - switch r := l.next(); { - case r == eof: - l.emitEOF() - return nil - case utils.IsSpace(r): - l.skip() - return root - case r == '\'' || r == '"': - l.scanString(r) - str, err := unescape(l.word()) - if err != nil { - l.error("%v", err) - } - l.emitValue(String, str) - case r == '`': - l.scanRawString(r) - case '0' <= r && r <= '9': - l.backup() - return number - case r == '?': - return questionMark - case r == '/': - return slash - case r == '#': - return pointer - case r == '|': - l.accept("|") - l.emit(Operator) - case r == ':': - l.accept(":") - l.emit(Operator) - case strings.ContainsRune("([{", r): - l.emit(Bracket) - case strings.ContainsRune(")]}", r): - l.emit(Bracket) - case strings.ContainsRune(",;%+-^", r): // single rune operator - l.emit(Operator) - case strings.ContainsRune("&!=*<>", r): // possible double rune operator - l.accept("&=*") - l.emit(Operator) - case r == '.': - l.backup() - return dot - case utils.IsAlphaNumeric(r): - l.backup() - return identifier - default: - return l.error("unrecognized character: %#U", r) - } - return root -} - -func number(l *Lexer) stateFn { - if !l.scanNumber() { - return l.error("bad number syntax: %q", l.word()) - } - l.emit(Number) - return root -} - -func (l *Lexer) scanNumber() bool { - digits := "0123456789_" - // Is it hex? - if l.accept("0") { - // Note: Leading 0 does not mean octal in floats. - if l.accept("xX") { - digits = "0123456789abcdefABCDEF_" - } else if l.accept("oO") { - digits = "01234567_" - } else if l.accept("bB") { - digits = "01_" - } - } - l.acceptRun(digits) - end := l.end - if l.accept(".") { - // Lookup for .. operator: if after dot there is another dot (1..2), it maybe a range operator. - if l.peek() == '.' { - // We can't backup() here, as it would require two backups, - // and backup() func supports only one for now. So, save and - // restore it here. - l.end = end - return true - } - l.acceptRun(digits) - } - if l.accept("eE") { - l.accept("+-") - l.acceptRun(digits) - } - // Next thing mustn't be alphanumeric. - if utils.IsAlphaNumeric(l.peek()) { - l.next() - return false - } - return true -} - -func dot(l *Lexer) stateFn { - l.next() - if l.accept("0123456789") { - l.backup() - return number - } - l.accept(".") - l.emit(Operator) - return root -} - -func identifier(l *Lexer) stateFn { -loop: - for { - switch r := l.next(); { - case utils.IsAlphaNumeric(r): - // absorb - default: - l.backup() - switch l.word() { - case "not": - return not - case "in", "or", "and", "matches", "contains", "startsWith", "endsWith", "let": - l.emit(Operator) - case "if", "else": - if !l.DisableIfOperator { - l.emit(Operator) - } else { - l.emit(Identifier) - } - default: - l.emit(Identifier) - } - break loop - } - } - return root -} - -func not(l *Lexer) stateFn { - l.emit(Operator) - - l.skipSpaces() - - end := l.end - - // Get the next word. - for { - r := l.next() - if utils.IsAlphaNumeric(r) { - // absorb - } else { - l.backup() - break - } - } - - switch l.word() { - case "in", "matches", "contains", "startsWith", "endsWith": - l.emit(Operator) - default: - l.end = end - } - return root -} - -func questionMark(l *Lexer) stateFn { - l.accept(".?") - l.emit(Operator) - return root -} - -func slash(l *Lexer) stateFn { - if l.accept("/") { - return singleLineComment - } - if l.accept("*") { - return multiLineComment - } - l.emit(Operator) - return root -} - -func singleLineComment(l *Lexer) stateFn { - for { - r := l.next() - if r == eof || r == '\n' { - break - } - } - l.skip() - return root -} - -func multiLineComment(l *Lexer) stateFn { - for { - r := l.next() - if r == eof { - return l.error("unclosed comment") - } - if r == '*' && l.accept("/") { - break - } - } - l.skip() - return root -} - -func pointer(l *Lexer) stateFn { - l.accept("#") - l.emit(Operator) - for { - switch r := l.next(); { - case utils.IsAlphaNumeric(r): // absorb - default: - l.backup() - if l.word() != "" { - l.emit(Identifier) - } - return root - } - } -} diff --git a/vendor/github.com/expr-lang/expr/parser/lexer/token.go b/vendor/github.com/expr-lang/expr/parser/lexer/token.go deleted file mode 100644 index c809c690e7..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/lexer/token.go +++ /dev/null @@ -1,43 +0,0 @@ -package lexer - -import ( - "fmt" - - "github.com/expr-lang/expr/file" -) - -type Kind string - -const ( - Identifier Kind = "Identifier" - Number Kind = "Number" - String Kind = "String" - Operator Kind = "Operator" - Bracket Kind = "Bracket" - EOF Kind = "EOF" -) - -type Token struct { - file.Location - Kind Kind - Value string -} - -func (t Token) String() string { - if t.Value == "" { - return string(t.Kind) - } - return fmt.Sprintf("%s(%#v)", t.Kind, t.Value) -} - -func (t Token) Is(kind Kind, values ...string) bool { - if kind != t.Kind { - return false - } - for _, v := range values { - if v == t.Value { - return true - } - } - return len(values) == 0 -} diff --git a/vendor/github.com/expr-lang/expr/parser/lexer/utils.go b/vendor/github.com/expr-lang/expr/parser/lexer/utils.go deleted file mode 100644 index 6aa088ae37..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/lexer/utils.go +++ /dev/null @@ -1,222 +0,0 @@ -package lexer - -import ( - "fmt" - "math" - "strings" - "unicode/utf8" -) - -var ( - newlineNormalizer = strings.NewReplacer("\r\n", "\n", "\r", "\n") -) - -// Unescape takes a quoted string, unquotes, and unescapes it. -func unescape(value string) (string, error) { - // All strings normalize newlines to the \n representation. - value = newlineNormalizer.Replace(value) - n := len(value) - - // Nothing to unescape / decode. - if n < 2 { - return value, fmt.Errorf("unable to unescape string") - } - - // Quoted string of some form, must have same first and last char. - if value[0] != value[n-1] || (value[0] != '"' && value[0] != '\'') { - return value, fmt.Errorf("unable to unescape string") - } - - value = value[1 : n-1] - - // The string contains escape characters. - // The following logic is adapted from `strconv/quote.go` - var runeTmp [utf8.UTFMax]byte - size := 3 * uint64(n) / 2 - if size >= math.MaxInt { - return "", fmt.Errorf("too large string") - } - buf := new(strings.Builder) - buf.Grow(int(size)) - for len(value) > 0 { - c, multibyte, rest, err := unescapeChar(value) - if err != nil { - return "", err - } - value = rest - if c < utf8.RuneSelf || !multibyte { - buf.WriteByte(byte(c)) - } else { - n := utf8.EncodeRune(runeTmp[:], c) - buf.Write(runeTmp[:n]) - } - } - return buf.String(), nil -} - -// unescapeChar takes a string input and returns the following info: -// -// value - the escaped unicode rune at the front of the string. -// multibyte - whether the rune value might require multiple bytes to represent. -// tail - the remainder of the input string. -// err - error value, if the character could not be unescaped. -// -// When multibyte is true the return value may still fit within a single byte, -// but a multibyte conversion is attempted which is more expensive than when the -// value is known to fit within one byte. -func unescapeChar(s string) (value rune, multibyte bool, tail string, err error) { - // 1. Character is not an escape sequence. - switch c := s[0]; { - case c >= utf8.RuneSelf: - r, size := utf8.DecodeRuneInString(s) - return r, true, s[size:], nil - case c != '\\': - return rune(s[0]), false, s[1:], nil - } - - // 2. Last character is the start of an escape sequence. - if len(s) <= 1 { - err = fmt.Errorf("unable to unescape string, found '\\' as last character") - return - } - - c := s[1] - s = s[2:] - // 3. Common escape sequences shared with Google SQL - switch c { - case 'a': - value = '\a' - case 'b': - value = '\b' - case 'f': - value = '\f' - case 'n': - value = '\n' - case 'r': - value = '\r' - case 't': - value = '\t' - case 'v': - value = '\v' - case '\\': - value = '\\' - case '\'': - value = '\'' - case '"': - value = '"' - case '`': - value = '`' - case '?': - value = '?' - - // 4. Unicode escape sequences, reproduced from `strconv/quote.go` - case 'x', 'X', 'u', 'U': - // Support Go/Rust-style variable-length form: \u{XXXXXX} - if c == 'u' && len(s) > 0 && s[0] == '{' { - // consume '{' - s = s[1:] - var v rune - digits := 0 - for len(s) > 0 && s[0] != '}' { - x, ok := unhex(s[0]) - if !ok { - err = fmt.Errorf("unable to unescape string") - return - } - if digits >= 6 { // at most 6 hex digits - err = fmt.Errorf("unable to unescape string") - return - } - v = v<<4 | x - s = s[1:] - digits++ - } - // require closing '}' and at least 1 digit - if len(s) == 0 || s[0] != '}' || digits == 0 { - err = fmt.Errorf("unable to unescape string") - return - } - // consume '}' - s = s[1:] - if v > utf8.MaxRune { - err = fmt.Errorf("unable to unescape string") - return - } - value = v - multibyte = true - break - } - n := 0 - switch c { - case 'x', 'X': - n = 2 - case 'u': - n = 4 - case 'U': - n = 8 - } - var v rune - if len(s) < n { - err = fmt.Errorf("unable to unescape string") - return - } - for j := 0; j < n; j++ { - x, ok := unhex(s[j]) - if !ok { - err = fmt.Errorf("unable to unescape string") - return - } - v = v<<4 | x - } - s = s[n:] - if v > utf8.MaxRune { - err = fmt.Errorf("unable to unescape string") - return - } - value = v - multibyte = true - - // 5. Octal escape sequences, must be three digits \[0-3][0-7][0-7] - case '0', '1', '2', '3': - if len(s) < 2 { - err = fmt.Errorf("unable to unescape octal sequence in string") - return - } - v := rune(c - '0') - for j := 0; j < 2; j++ { - x := s[j] - if x < '0' || x > '7' { - err = fmt.Errorf("unable to unescape octal sequence in string") - return - } - v = v*8 + rune(x-'0') - } - if v > utf8.MaxRune { - err = fmt.Errorf("unable to unescape string") - return - } - value = v - s = s[2:] - multibyte = true - - // Unknown escape sequence. - default: - err = fmt.Errorf("unable to unescape string") - } - - tail = s - return -} - -func unhex(b byte) (rune, bool) { - c := rune(b) - switch { - case '0' <= c && c <= '9': - return c - '0', true - case 'a' <= c && c <= 'f': - return c - 'a' + 10, true - case 'A' <= c && c <= 'F': - return c - 'A' + 10, true - } - return 0, false -} diff --git a/vendor/github.com/expr-lang/expr/parser/operator/operator.go b/vendor/github.com/expr-lang/expr/parser/operator/operator.go deleted file mode 100644 index 4eeaf80ed8..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/operator/operator.go +++ /dev/null @@ -1,69 +0,0 @@ -package operator - -type Associativity int - -const ( - Left Associativity = iota + 1 - Right -) - -type Operator struct { - Precedence int - Associativity Associativity -} - -func Less(a, b string) bool { - return Binary[a].Precedence < Binary[b].Precedence -} - -func IsBoolean(op string) bool { - return op == "and" || op == "or" || op == "&&" || op == "||" -} - -func AllowedNegateSuffix(op string) bool { - switch op { - case "contains", "matches", "startsWith", "endsWith", "in": - return true - default: - return false - } -} - -var Unary = map[string]Operator{ - "not": {50, Left}, - "!": {50, Left}, - "-": {90, Left}, - "+": {90, Left}, -} - -var Binary = map[string]Operator{ - "|": {0, Left}, - "or": {10, Left}, - "||": {10, Left}, - "and": {15, Left}, - "&&": {15, Left}, - "==": {20, Left}, - "!=": {20, Left}, - "<": {20, Left}, - ">": {20, Left}, - ">=": {20, Left}, - "<=": {20, Left}, - "in": {20, Left}, - "matches": {20, Left}, - "contains": {20, Left}, - "startsWith": {20, Left}, - "endsWith": {20, Left}, - "..": {25, Left}, - "+": {30, Left}, - "-": {30, Left}, - "*": {60, Left}, - "/": {60, Left}, - "%": {60, Left}, - "**": {100, Right}, - "^": {100, Right}, - "??": {500, Left}, -} - -func IsComparison(op string) bool { - return op == "<" || op == ">" || op == ">=" || op == "<=" -} diff --git a/vendor/github.com/expr-lang/expr/parser/parser.go b/vendor/github.com/expr-lang/expr/parser/parser.go deleted file mode 100644 index 9ccf478303..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/parser.go +++ /dev/null @@ -1,939 +0,0 @@ -package parser - -import ( - "errors" - "fmt" - "io" - "math" - "strconv" - "strings" - - . "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/conf" - "github.com/expr-lang/expr/file" - . "github.com/expr-lang/expr/parser/lexer" - "github.com/expr-lang/expr/parser/operator" - "github.com/expr-lang/expr/parser/utils" -) - -type arg byte - -const ( - expr arg = 1 << iota - predicate -) - -const optional arg = 1 << 7 - -var predicates = map[string]struct { - args []arg -}{ - "all": {[]arg{expr, predicate}}, - "none": {[]arg{expr, predicate}}, - "any": {[]arg{expr, predicate}}, - "one": {[]arg{expr, predicate}}, - "filter": {[]arg{expr, predicate}}, - "map": {[]arg{expr, predicate}}, - "count": {[]arg{expr, predicate | optional}}, - "sum": {[]arg{expr, predicate | optional}}, - "find": {[]arg{expr, predicate}}, - "findIndex": {[]arg{expr, predicate}}, - "findLast": {[]arg{expr, predicate}}, - "findLastIndex": {[]arg{expr, predicate}}, - "groupBy": {[]arg{expr, predicate}}, - "sortBy": {[]arg{expr, predicate, expr | optional}}, - "reduce": {[]arg{expr, predicate, expr | optional}}, -} - -// Parser is a reusable parser. The zero value is ready for use. -type Parser struct { - lexer *Lexer - current, stashed Token - hasStash bool - err *file.Error - config *conf.Config - depth int // predicate call depth - nodeCount uint // tracks number of AST nodes created -} - -func (p *Parser) Parse(input string, config *conf.Config) (*Tree, error) { - if p.lexer == nil { - p.lexer = New() - } - p.config = config - // propagate config flags to lexer - if p.lexer != nil { - if config != nil { - p.lexer.DisableIfOperator = config.DisableIfOperator - } else { - p.lexer.DisableIfOperator = false - } - } - source := file.NewSource(input) - p.lexer.Reset(source) - p.next() - node := p.parseSequenceExpression() - - if !p.current.Is(EOF) { - p.error("unexpected token %v", p.current) - } - - tree := &Tree{ - Node: node, - Source: source, - } - err := p.err - - // cleanup non-reusable pointer values and reset state - p.err = nil - p.config = nil - p.lexer.Reset(file.Source{}) - - if err != nil { - return tree, err.Bind(source) - } - - return tree, nil -} - -func (p *Parser) checkNodeLimit() error { - p.nodeCount++ - if p.config == nil { - if p.nodeCount > conf.DefaultMaxNodes { - p.error("compilation failed: expression exceeds maximum allowed nodes") - return nil - } - return nil - } - if p.config.MaxNodes > 0 && p.nodeCount > p.config.MaxNodes { - p.error("compilation failed: expression exceeds maximum allowed nodes") - return nil - } - return nil -} - -func (p *Parser) createNode(n Node, loc file.Location) Node { - if err := p.checkNodeLimit(); err != nil { - return nil - } - if n == nil || p.err != nil { - return nil - } - n.SetLocation(loc) - return n -} - -func (p *Parser) createMemberNode(n *MemberNode, loc file.Location) *MemberNode { - if err := p.checkNodeLimit(); err != nil { - return nil - } - if n == nil || p.err != nil { - return nil - } - n.SetLocation(loc) - return n -} - -type Tree struct { - Node Node - Source file.Source -} - -func Parse(input string) (*Tree, error) { - return ParseWithConfig(input, nil) -} - -func ParseWithConfig(input string, config *conf.Config) (*Tree, error) { - return new(Parser).Parse(input, config) -} - -func (p *Parser) error(format string, args ...any) { - p.errorAt(p.current, format, args...) -} - -func (p *Parser) errorAt(token Token, format string, args ...any) { - if p.err == nil { // show first error - p.err = &file.Error{ - Location: token.Location, - Message: fmt.Sprintf(format, args...), - } - } -} - -func (p *Parser) next() { - if p.hasStash { - p.current = p.stashed - p.hasStash = false - return - } - - token, err := p.lexer.Next() - var e *file.Error - switch { - case err == nil: - p.current = token - case errors.Is(err, io.EOF): - p.error("unexpected end of expression") - case errors.As(err, &e): - p.err = e - default: - p.err = &file.Error{ - Location: p.current.Location, - Message: "unknown lexing error", - Prev: err, - } - } -} - -func (p *Parser) expect(kind Kind, values ...string) { - if p.current.Is(kind, values...) { - p.next() - return - } - p.error("unexpected token %v", p.current) -} - -// parse functions - -func (p *Parser) parseSequenceExpression() Node { - nodes := []Node{p.parseExpression(0)} - - for p.current.Is(Operator, ";") && p.err == nil { - p.next() - // If a trailing semicolon is present, break out. - if p.current.Is(EOF) { - break - } - nodes = append(nodes, p.parseExpression(0)) - } - - if len(nodes) == 1 { - return nodes[0] - } - - return p.createNode(&SequenceNode{ - Nodes: nodes, - }, nodes[0].Location()) -} - -func (p *Parser) parseExpression(precedence int) Node { - if p.err != nil { - return nil - } - - if precedence == 0 && p.current.Is(Operator, "let") { - return p.parseVariableDeclaration() - } - - if precedence == 0 && (p.config == nil || !p.config.DisableIfOperator) && p.current.Is(Operator, "if") { - return p.parseConditionalIf() - } - - nodeLeft := p.parsePrimary() - - prevOperator := "" - opToken := p.current - for opToken.Is(Operator) && p.err == nil { - negate := opToken.Is(Operator, "not") - var notToken Token - - // Handle "not *" operator, like "not in" or "not contains". - if negate { - tokenBackup := p.current - p.next() - if operator.AllowedNegateSuffix(p.current.Value) { - if op, ok := operator.Binary[p.current.Value]; ok && op.Precedence >= precedence { - notToken = p.current - opToken = p.current - } else { - p.hasStash = true - p.stashed = p.current - p.current = tokenBackup - break - } - } else { - p.error("unexpected token %v", p.current) - break - } - } - - if op, ok := operator.Binary[opToken.Value]; ok && op.Precedence >= precedence { - p.next() - - if opToken.Value == "|" { - identToken := p.current - p.expect(Identifier) - nodeLeft = p.parseCall(identToken, []Node{nodeLeft}, true) - goto next - } - - if prevOperator == "??" && opToken.Value != "??" && !opToken.Is(Bracket, "(") { - p.errorAt(opToken, "Operator (%v) and coalesce expressions (??) cannot be mixed. Wrap either by parentheses.", opToken.Value) - break - } - - if operator.IsComparison(opToken.Value) { - nodeLeft = p.parseComparison(nodeLeft, opToken, op.Precedence) - goto next - } - - var nodeRight Node - if op.Associativity == operator.Left { - nodeRight = p.parseExpression(op.Precedence + 1) - } else { - nodeRight = p.parseExpression(op.Precedence) - } - - nodeLeft = p.createNode(&BinaryNode{ - Operator: opToken.Value, - Left: nodeLeft, - Right: nodeRight, - }, opToken.Location) - if nodeLeft == nil { - return nil - } - - if negate { - nodeLeft = p.createNode(&UnaryNode{ - Operator: "not", - Node: nodeLeft, - }, notToken.Location) - if nodeLeft == nil { - return nil - } - } - - goto next - } - break - - next: - prevOperator = opToken.Value - opToken = p.current - } - - if precedence == 0 { - nodeLeft = p.parseConditional(nodeLeft) - } - - return nodeLeft -} - -func (p *Parser) parseVariableDeclaration() Node { - p.expect(Operator, "let") - variableName := p.current - p.expect(Identifier) - p.expect(Operator, "=") - value := p.parseExpression(0) - p.expect(Operator, ";") - node := p.parseSequenceExpression() - return p.createNode(&VariableDeclaratorNode{ - Name: variableName.Value, - Value: value, - Expr: node, - }, variableName.Location) -} - -func (p *Parser) parseConditionalIf() Node { - p.next() - if p.err != nil { - return nil - } - nodeCondition := p.parseExpression(0) - p.expect(Bracket, "{") - expr1 := p.parseSequenceExpression() - p.expect(Bracket, "}") - p.expect(Operator, "else") - - var expr2 Node - if p.current.Is(Operator, "if") { - expr2 = p.parseConditionalIf() - } else { - p.expect(Bracket, "{") - expr2 = p.parseSequenceExpression() - p.expect(Bracket, "}") - } - - return &ConditionalNode{ - Cond: nodeCondition, - Exp1: expr1, - Exp2: expr2, - } - -} - -func (p *Parser) parseConditional(node Node) Node { - var expr1, expr2 Node - for p.current.Is(Operator, "?") && p.err == nil { - p.next() - - if !p.current.Is(Operator, ":") { - expr1 = p.parseExpression(0) - p.expect(Operator, ":") - expr2 = p.parseExpression(0) - } else { - p.next() - expr1 = node - expr2 = p.parseExpression(0) - } - - node = p.createNode(&ConditionalNode{ - Ternary: true, - Cond: node, - Exp1: expr1, - Exp2: expr2, - }, p.current.Location) - if node == nil { - return nil - } - } - return node -} - -func (p *Parser) parsePrimary() Node { - token := p.current - - if token.Is(Operator) { - if op, ok := operator.Unary[token.Value]; ok { - p.next() - expr := p.parseExpression(op.Precedence) - node := p.createNode(&UnaryNode{ - Operator: token.Value, - Node: expr, - }, token.Location) - if node == nil { - return nil - } - return p.parsePostfixExpression(node) - } - } - - if token.Is(Bracket, "(") { - p.next() - expr := p.parseSequenceExpression() - p.expect(Bracket, ")") // "an opened parenthesis is not properly closed" - return p.parsePostfixExpression(expr) - } - - if p.depth > 0 { - if token.Is(Operator, "#") || token.Is(Operator, ".") { - name := "" - if token.Is(Operator, "#") { - p.next() - if p.current.Is(Identifier) { - name = p.current.Value - p.next() - } - } - node := p.createNode(&PointerNode{Name: name}, token.Location) - if node == nil { - return nil - } - return p.parsePostfixExpression(node) - } - } - - if token.Is(Operator, "::") { - p.next() - token = p.current - p.expect(Identifier) - return p.parsePostfixExpression(p.parseCall(token, []Node{}, false)) - } - - return p.parseSecondary() -} - -func (p *Parser) parseSecondary() Node { - var node Node - token := p.current - - switch token.Kind { - - case Identifier: - p.next() - switch token.Value { - case "true": - node = p.createNode(&BoolNode{Value: true}, token.Location) - if node == nil { - return nil - } - return node - case "false": - node = p.createNode(&BoolNode{Value: false}, token.Location) - if node == nil { - return nil - } - return node - case "nil": - node = p.createNode(&NilNode{}, token.Location) - if node == nil { - return nil - } - return node - default: - if p.current.Is(Bracket, "(") { - node = p.parseCall(token, []Node{}, true) - } else { - node = p.createNode(&IdentifierNode{Value: token.Value}, token.Location) - if node == nil { - return nil - } - } - } - - case Number: - p.next() - value := strings.Replace(token.Value, "_", "", -1) - var node Node - valueLower := strings.ToLower(value) - switch { - case strings.HasPrefix(valueLower, "0x"): - number, err := strconv.ParseInt(value, 0, 64) - if err != nil { - p.error("invalid hex literal: %v", err) - } - node = p.toIntegerNode(number) - case strings.ContainsAny(valueLower, ".e"): - number, err := strconv.ParseFloat(value, 64) - if err != nil { - p.error("invalid float literal: %v", err) - } - node = p.toFloatNode(number) - case strings.HasPrefix(valueLower, "0b"): - number, err := strconv.ParseInt(value, 0, 64) - if err != nil { - p.error("invalid binary literal: %v", err) - } - node = p.toIntegerNode(number) - case strings.HasPrefix(valueLower, "0o"): - number, err := strconv.ParseInt(value, 0, 64) - if err != nil { - p.error("invalid octal literal: %v", err) - } - node = p.toIntegerNode(number) - default: - number, err := strconv.ParseInt(value, 10, 64) - if err != nil { - p.error("invalid integer literal: %v", err) - } - node = p.toIntegerNode(number) - } - if node != nil { - node.SetLocation(token.Location) - } - return node - case String: - p.next() - node = p.createNode(&StringNode{Value: token.Value}, token.Location) - if node == nil { - return nil - } - - default: - if token.Is(Bracket, "[") { - node = p.parseArrayExpression(token) - } else if token.Is(Bracket, "{") { - node = p.parseMapExpression(token) - } else { - p.error("unexpected token %v", token) - } - } - - return p.parsePostfixExpression(node) -} - -func (p *Parser) toIntegerNode(number int64) Node { - if number > math.MaxInt { - p.error("integer literal is too large") - return nil - } - return p.createNode(&IntegerNode{Value: int(number)}, p.current.Location) -} - -func (p *Parser) toFloatNode(number float64) Node { - if number > math.MaxFloat64 { - p.error("float literal is too large") - return nil - } - return p.createNode(&FloatNode{Value: number}, p.current.Location) -} - -func (p *Parser) parseCall(token Token, arguments []Node, checkOverrides bool) Node { - var node Node - - isOverridden := false - if p.config != nil { - isOverridden = p.config.IsOverridden(token.Value) - } - isOverridden = isOverridden && checkOverrides - - if _, ok := predicates[token.Value]; ok && p.config != nil && p.config.Disabled[token.Value] && !isOverridden { - // Disabled predicate without replacement - fail immediately - p.error("unknown name %s", token.Value) - } else if b, ok := predicates[token.Value]; ok && !isOverridden { - p.expect(Bracket, "(") - - // In case of the pipe operator, the first argument is the left-hand side - // of the operator, so we do not parse it as an argument inside brackets. - args := b.args[len(arguments):] - - for i, arg := range args { - if arg&optional == optional { - if p.current.Is(Bracket, ")") { - break - } - } else { - if p.current.Is(Bracket, ")") { - p.error("expected at least %d arguments", len(args)) - } - } - - if i > 0 { - p.expect(Operator, ",") - } - var node Node - switch { - case arg&expr == expr: - node = p.parseExpression(0) - case arg&predicate == predicate: - node = p.parsePredicate() - } - arguments = append(arguments, node) - } - - // skip last comma - if p.current.Is(Operator, ",") { - p.next() - } - p.expect(Bracket, ")") - - node = p.createNode(&BuiltinNode{ - Name: token.Value, - Arguments: arguments, - }, token.Location) - if node == nil { - return nil - } - } else if _, ok := builtin.Index[token.Value]; ok && p.config != nil && p.config.Disabled[token.Value] && !isOverridden { - // Disabled builtin without replacement - fail immediately - p.error("unknown name %s", token.Value) - } else if _, ok := builtin.Index[token.Value]; ok && (p.config == nil || !p.config.Disabled[token.Value]) && !isOverridden { - node = p.createNode(&BuiltinNode{ - Name: token.Value, - Arguments: p.parseArguments(arguments), - }, token.Location) - if node == nil { - return nil - } - - } else { - callee := p.createNode(&IdentifierNode{Value: token.Value}, token.Location) - if callee == nil { - return nil - } - node = p.createNode(&CallNode{ - Callee: callee, - Arguments: p.parseArguments(arguments), - }, token.Location) - if node == nil { - return nil - } - } - return node -} - -func (p *Parser) parseArguments(arguments []Node) []Node { - // If pipe operator is used, the first argument is the left-hand side - // of the operator, so we do not parse it as an argument inside brackets. - offset := len(arguments) - - p.expect(Bracket, "(") - for !p.current.Is(Bracket, ")") && p.err == nil { - if len(arguments) > offset { - p.expect(Operator, ",") - } - if p.current.Is(Bracket, ")") { - break - } - node := p.parseExpression(0) - arguments = append(arguments, node) - } - p.expect(Bracket, ")") - - return arguments -} - -func (p *Parser) parsePredicate() Node { - startToken := p.current - withBrackets := false - if p.current.Is(Bracket, "{") { - p.next() - withBrackets = true - } - - p.depth++ - var node Node - if withBrackets { - node = p.parseSequenceExpression() - } else { - node = p.parseExpression(0) - if p.current.Is(Operator, ";") { - p.error("wrap predicate with brackets { and }") - } - } - p.depth-- - - if withBrackets { - p.expect(Bracket, "}") - } - predicateNode := p.createNode(&PredicateNode{ - Node: node, - }, startToken.Location) - if predicateNode == nil { - return nil - } - return predicateNode -} - -func (p *Parser) parseArrayExpression(token Token) Node { - nodes := make([]Node, 0) - - p.expect(Bracket, "[") - for !p.current.Is(Bracket, "]") && p.err == nil { - if len(nodes) > 0 { - p.expect(Operator, ",") - if p.current.Is(Bracket, "]") { - goto end - } - } - node := p.parseExpression(0) - nodes = append(nodes, node) - } -end: - p.expect(Bracket, "]") - - node := p.createNode(&ArrayNode{Nodes: nodes}, token.Location) - if node == nil { - return nil - } - return node -} - -func (p *Parser) parseMapExpression(token Token) Node { - p.expect(Bracket, "{") - - nodes := make([]Node, 0) - for !p.current.Is(Bracket, "}") && p.err == nil { - if len(nodes) > 0 { - p.expect(Operator, ",") - if p.current.Is(Bracket, "}") { - goto end - } - if p.current.Is(Operator, ",") { - p.error("unexpected token %v", p.current) - } - } - - var key Node - // Map key can be one of: - // * number - // * string - // * identifier, which is equivalent to a string - // * expression, which must be enclosed in parentheses -- (1 + 2) - if p.current.Is(Number) || p.current.Is(String) || p.current.Is(Identifier) { - key = p.createNode(&StringNode{Value: p.current.Value}, p.current.Location) - if key == nil { - return nil - } - p.next() - } else if p.current.Is(Bracket, "(") { - key = p.parseExpression(0) - } else { - p.error("a map key must be a quoted string, a number, a identifier, or an expression enclosed in parentheses (unexpected token %v)", p.current) - } - - p.expect(Operator, ":") - - node := p.parseExpression(0) - pair := p.createNode(&PairNode{Key: key, Value: node}, token.Location) - if pair == nil { - return nil - } - nodes = append(nodes, pair) - } - -end: - p.expect(Bracket, "}") - - node := p.createNode(&MapNode{Pairs: nodes}, token.Location) - if node == nil { - return nil - } - return node -} - -func (p *Parser) parsePostfixExpression(node Node) Node { - postfixToken := p.current - for (postfixToken.Is(Operator) || postfixToken.Is(Bracket)) && p.err == nil { - optional := postfixToken.Value == "?." - parseToken: - if postfixToken.Value == "." || postfixToken.Value == "?." { - p.next() - - propertyToken := p.current - if optional && propertyToken.Is(Bracket, "[") { - postfixToken = propertyToken - goto parseToken - } - p.next() - - if propertyToken.Kind != Identifier && - // Operators like "not" and "matches" are valid methods or property names. - (propertyToken.Kind != Operator || !utils.IsValidIdentifier(propertyToken.Value)) { - p.error("expected name") - } - - property := p.createNode(&StringNode{Value: propertyToken.Value}, propertyToken.Location) - if property == nil { - return nil - } - - chainNode, isChain := node.(*ChainNode) - optional := postfixToken.Value == "?." - - if isChain { - node = chainNode.Node - } - - memberNode := p.createMemberNode(&MemberNode{ - Node: node, - Property: property, - Optional: optional, - }, propertyToken.Location) - if memberNode == nil { - return nil - } - - if p.current.Is(Bracket, "(") { - memberNode.Method = true - node = p.createNode(&CallNode{ - Callee: memberNode, - Arguments: p.parseArguments([]Node{}), - }, propertyToken.Location) - if node == nil { - return nil - } - } else { - node = memberNode - } - - if isChain || optional { - node = p.createNode(&ChainNode{Node: node}, propertyToken.Location) - if node == nil { - return nil - } - } - - } else if postfixToken.Value == "[" { - p.next() - var from, to Node - - if p.current.Is(Operator, ":") { // slice without from [:1] - p.next() - - if !p.current.Is(Bracket, "]") { // slice without from and to [:] - to = p.parseExpression(0) - } - - node = p.createNode(&SliceNode{ - Node: node, - To: to, - }, postfixToken.Location) - if node == nil { - return nil - } - p.expect(Bracket, "]") - - } else { - - from = p.parseExpression(0) - - if p.current.Is(Operator, ":") { - p.next() - - if !p.current.Is(Bracket, "]") { // slice without to [1:] - to = p.parseExpression(0) - } - - node = p.createNode(&SliceNode{ - Node: node, - From: from, - To: to, - }, postfixToken.Location) - if node == nil { - return nil - } - p.expect(Bracket, "]") - - } else { - // Slice operator [:] was not found, - // it should be just an index node. - node = p.createNode(&MemberNode{ - Node: node, - Property: from, - Optional: optional, - }, postfixToken.Location) - if node == nil { - return nil - } - if optional { - node = p.createNode(&ChainNode{Node: node}, postfixToken.Location) - if node == nil { - return nil - } - } - p.expect(Bracket, "]") - } - } - } else { - break - } - postfixToken = p.current - } - return node -} -func (p *Parser) parseComparison(left Node, token Token, precedence int) Node { - var rootNode Node - for { - comparator := p.parseExpression(precedence + 1) - cmpNode := p.createNode(&BinaryNode{ - Operator: token.Value, - Left: left, - Right: comparator, - }, token.Location) - if cmpNode == nil { - return nil - } - if rootNode == nil { - rootNode = cmpNode - } else { - rootNode = p.createNode(&BinaryNode{ - Operator: "&&", - Left: rootNode, - Right: cmpNode, - }, token.Location) - if rootNode == nil { - return nil - } - } - - left = comparator - token = p.current - if !(token.Is(Operator) && operator.IsComparison(token.Value) && p.err == nil) { - break - } - p.next() - } - return rootNode -} diff --git a/vendor/github.com/expr-lang/expr/parser/utils/utils.go b/vendor/github.com/expr-lang/expr/parser/utils/utils.go deleted file mode 100644 index 947f9a4008..0000000000 --- a/vendor/github.com/expr-lang/expr/parser/utils/utils.go +++ /dev/null @@ -1,34 +0,0 @@ -package utils - -import ( - "unicode" - "unicode/utf8" -) - -func IsValidIdentifier(str string) bool { - if len(str) == 0 { - return false - } - h, w := utf8.DecodeRuneInString(str) - if !IsAlphabetic(h) { - return false - } - for _, r := range str[w:] { - if !IsAlphaNumeric(r) { - return false - } - } - return true -} - -func IsSpace(r rune) bool { - return unicode.IsSpace(r) -} - -func IsAlphaNumeric(r rune) bool { - return IsAlphabetic(r) || unicode.IsDigit(r) -} - -func IsAlphabetic(r rune) bool { - return r == '_' || r == '$' || unicode.IsLetter(r) -} diff --git a/vendor/github.com/expr-lang/expr/patcher/operator_override.go b/vendor/github.com/expr-lang/expr/patcher/operator_override.go deleted file mode 100644 index cf4287c244..0000000000 --- a/vendor/github.com/expr-lang/expr/patcher/operator_override.go +++ /dev/null @@ -1,148 +0,0 @@ -package patcher - -import ( - "fmt" - "reflect" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/checker/nature" - "github.com/expr-lang/expr/conf" -) - -type OperatorOverloading struct { - Operator string // Operator token to overload. - Overloads []string // List of function names to replace operator with. - Env *nature.Nature // Env type. - Functions conf.FunctionsTable // Env functions. - applied bool // Flag to indicate if any changes were made to the tree. - NtCache *nature.Cache -} - -func (p *OperatorOverloading) Visit(node *ast.Node) { - binaryNode, ok := (*node).(*ast.BinaryNode) - if !ok { - return - } - - if binaryNode.Operator != p.Operator { - return - } - - leftType := binaryNode.Left.Type() - rightType := binaryNode.Right.Type() - - ret, fn, ok := p.FindSuitableOperatorOverload(leftType, rightType) - if ok { - newNode := &ast.CallNode{ - Callee: &ast.IdentifierNode{Value: fn}, - Arguments: []ast.Node{binaryNode.Left, binaryNode.Right}, - } - newNode.SetType(ret) - ast.Patch(node, newNode) - p.applied = true - } -} - -// Tracking must be reset before every walk over the AST tree -func (p *OperatorOverloading) Reset() { - p.applied = false -} - -func (p *OperatorOverloading) ShouldRepeat() bool { - return p.applied -} - -func (p *OperatorOverloading) FindSuitableOperatorOverload(l, r reflect.Type) (reflect.Type, string, bool) { - t, fn, ok := p.findSuitableOperatorOverloadInFunctions(l, r) - if !ok { - t, fn, ok = p.findSuitableOperatorOverloadInTypes(l, r) - } - return t, fn, ok -} - -func (p *OperatorOverloading) findSuitableOperatorOverloadInTypes(l, r reflect.Type) (reflect.Type, string, bool) { - for _, fn := range p.Overloads { - fnType, ok := p.Env.Get(p.NtCache, fn) - if !ok { - continue - } - firstInIndex := 0 - if fnType.Method { - firstInIndex = 1 // As first argument to method is receiver. - } - ret, done := checkTypeSuits(fnType.Type, l, r, firstInIndex) - if done { - return ret, fn, true - } - } - return nil, "", false -} - -func (p *OperatorOverloading) findSuitableOperatorOverloadInFunctions(l, r reflect.Type) (reflect.Type, string, bool) { - for _, fn := range p.Overloads { - fnType, ok := p.Functions[fn] - if !ok { - continue - } - firstInIndex := 0 - for _, overload := range fnType.Types { - ret, done := checkTypeSuits(overload, l, r, firstInIndex) - if done { - return ret, fn, true - } - } - } - return nil, "", false -} - -func checkTypeSuits(t reflect.Type, l reflect.Type, r reflect.Type, firstInIndex int) (reflect.Type, bool) { - firstArgType := t.In(firstInIndex) - secondArgType := t.In(firstInIndex + 1) - - firstArgumentFit := l == firstArgType || (firstArgType.Kind() == reflect.Interface && (l == nil || l.Implements(firstArgType))) - secondArgumentFit := r == secondArgType || (secondArgType.Kind() == reflect.Interface && (r == nil || r.Implements(secondArgType))) - if firstArgumentFit && secondArgumentFit { - return t.Out(0), true - } - return nil, false -} - -func (p *OperatorOverloading) Check() { - for _, fn := range p.Overloads { - fnType, foundType := p.Env.Get(p.NtCache, fn) - fnFunc, foundFunc := p.Functions[fn] - if !foundFunc && (!foundType || fnType.Type.Kind() != reflect.Func) { - panic(fmt.Errorf("function %s for %s operator does not exist in the environment", fn, p.Operator)) - } - - if foundType { - checkType(fnType, fn, p.Operator) - } - - if foundFunc { - checkFunc(fnFunc, fn, p.Operator) - } - } -} - -func checkType(fnType nature.Nature, fn string, operator string) { - requiredNumIn := 2 - if fnType.Method { - requiredNumIn = 3 // As first argument of method is receiver. - } - if fnType.Type.NumIn() != requiredNumIn || fnType.Type.NumOut() != 1 { - panic(fmt.Errorf("function %s for %s operator does not have a correct signature", fn, operator)) - } -} - -func checkFunc(fn *builtin.Function, name string, operator string) { - if len(fn.Types) == 0 { - panic(fmt.Errorf("function %q for %q operator misses types", name, operator)) - } - for _, t := range fn.Types { - if t.NumIn() != 2 || t.NumOut() != 1 { - panic(fmt.Errorf("function %q for %q operator does not have a correct signature", name, operator)) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/patcher/with_context.go b/vendor/github.com/expr-lang/expr/patcher/with_context.go deleted file mode 100644 index f9861a2c2f..0000000000 --- a/vendor/github.com/expr-lang/expr/patcher/with_context.go +++ /dev/null @@ -1,45 +0,0 @@ -package patcher - -import ( - "reflect" - - "github.com/expr-lang/expr/ast" -) - -// WithContext adds WithContext.Name argument to all functions calls with a context.Context argument. -type WithContext struct { - Name string -} - -// Visit adds WithContext.Name argument to all functions calls with a context.Context argument. -func (w WithContext) Visit(node *ast.Node) { - switch call := (*node).(type) { - case *ast.CallNode: - fn := call.Callee.Type() - if fn == nil { - return - } - if fn.Kind() != reflect.Func { - return - } - switch fn.NumIn() { - case 0: - return - case 1: - if fn.In(0).String() != "context.Context" { - return - } - default: - if fn.In(0).String() != "context.Context" && - fn.In(1).String() != "context.Context" { - return - } - } - ast.Patch(node, &ast.CallNode{ - Callee: call.Callee, - Arguments: append([]ast.Node{ - &ast.IdentifierNode{Value: w.Name}, - }, call.Arguments...), - }) - } -} diff --git a/vendor/github.com/expr-lang/expr/patcher/with_timezone.go b/vendor/github.com/expr-lang/expr/patcher/with_timezone.go deleted file mode 100644 index 83eb28e95a..0000000000 --- a/vendor/github.com/expr-lang/expr/patcher/with_timezone.go +++ /dev/null @@ -1,25 +0,0 @@ -package patcher - -import ( - "time" - - "github.com/expr-lang/expr/ast" -) - -// WithTimezone passes Location to date() and now() functions. -type WithTimezone struct { - Location *time.Location -} - -func (t WithTimezone) Visit(node *ast.Node) { - if btin, ok := (*node).(*ast.BuiltinNode); ok { - switch btin.Name { - case "date", "now": - loc := &ast.ConstantNode{Value: t.Location} - ast.Patch(node, &ast.BuiltinNode{ - Name: btin.Name, - Arguments: append([]ast.Node{loc}, btin.Arguments...), - }) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/types/types.go b/vendor/github.com/expr-lang/expr/types/types.go deleted file mode 100644 index 33257c500f..0000000000 --- a/vendor/github.com/expr-lang/expr/types/types.go +++ /dev/null @@ -1,184 +0,0 @@ -package types - -import ( - "fmt" - "reflect" - "strings" - - . "github.com/expr-lang/expr/checker/nature" -) - -// Type is a type that can be used to represent a value. -type Type interface { - Nature() Nature - Equal(Type) bool - String() string -} - -var ( - Int = TypeOf(0) - Int8 = TypeOf(int8(0)) - Int16 = TypeOf(int16(0)) - Int32 = TypeOf(int32(0)) - Int64 = TypeOf(int64(0)) - Uint = TypeOf(uint(0)) - Uint8 = TypeOf(uint8(0)) - Uint16 = TypeOf(uint16(0)) - Uint32 = TypeOf(uint32(0)) - Uint64 = TypeOf(uint64(0)) - Float = TypeOf(float32(0)) - Float64 = TypeOf(float64(0)) - String = TypeOf("") - Bool = TypeOf(true) - Nil = nilType{} - Any = anyType{} -) - -func TypeOf(v any) Type { - if v == nil { - return Nil - } - return rtype{t: reflect.TypeOf(v)} -} - -type anyType struct{} - -func (anyType) Nature() Nature { - return FromType(nil) -} - -func (anyType) Equal(t Type) bool { - return true -} - -func (anyType) String() string { - return "any" -} - -type nilType struct{} - -func (nilType) Nature() Nature { - return NatureOf(nil) -} - -func (nilType) Equal(t Type) bool { - if t == Any { - return true - } - return t == Nil -} - -func (nilType) String() string { - return "nil" -} - -type rtype struct { - t reflect.Type -} - -func (r rtype) Nature() Nature { - return FromType(r.t) -} - -func (r rtype) Equal(t Type) bool { - if t == Any { - return true - } - if rt, ok := t.(rtype); ok { - return r.t.String() == rt.t.String() - } - return false -} - -func (r rtype) String() string { - return r.t.String() -} - -// Map represents a map[string]any type with defined keys. -type Map map[string]Type - -const Extra = "[[__extra_keys__]]" - -func (m Map) Nature() Nature { - nt := NatureOf(map[string]any{}) - if nt.TypeData == nil { - nt.TypeData = new(TypeData) - } - nt.Fields = make(map[string]Nature, len(m)) - nt.Strict = true - for k, v := range m { - if k == Extra { - nt.Strict = false - natureOfDefaultValue := v.Nature() - nt.DefaultMapValue = &natureOfDefaultValue - continue - } - nt.Fields[k] = v.Nature() - } - return nt -} - -func (m Map) Equal(t Type) bool { - if t == Any { - return true - } - mt, ok := t.(Map) - if !ok { - return false - } - if len(m) != len(mt) { - return false - } - for k, v := range m { - if !v.Equal(mt[k]) { - return false - } - } - return true -} - -func (m Map) String() string { - pairs := make([]string, 0, len(m)) - for k, v := range m { - pairs = append(pairs, fmt.Sprintf("%s: %s", k, v.String())) - } - return fmt.Sprintf("Map{%s}", strings.Join(pairs, ", ")) -} - -// Array returns a type that represents an array of the given type. -func Array(of Type) Type { - return array{of} -} - -type array struct { - of Type -} - -func (a array) Nature() Nature { - of := a.of.Nature() - nt := NatureOf([]any{}) - if nt.TypeData == nil { - nt.TypeData = new(TypeData) - } - nt.Fields = make(map[string]Nature, 1) - nt.Ref = &of - return nt -} - -func (a array) Equal(t Type) bool { - if t == Any { - return true - } - at, ok := t.(array) - if !ok { - return false - } - if a.of.Equal(at.of) { - return true - } - return false -} - -func (a array) String() string { - return fmt.Sprintf("Array{%s}", a.of.String()) -} diff --git a/vendor/github.com/expr-lang/expr/vm/debug.go b/vendor/github.com/expr-lang/expr/vm/debug.go deleted file mode 100644 index 470bf90e26..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/debug.go +++ /dev/null @@ -1,6 +0,0 @@ -//go:build expr_debug -// +build expr_debug - -package vm - -const debug = true diff --git a/vendor/github.com/expr-lang/expr/vm/debug_off.go b/vendor/github.com/expr-lang/expr/vm/debug_off.go deleted file mode 100644 index 8a9e965e2a..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/debug_off.go +++ /dev/null @@ -1,6 +0,0 @@ -//go:build !expr_debug -// +build !expr_debug - -package vm - -const debug = false diff --git a/vendor/github.com/expr-lang/expr/vm/func_types[generated].go b/vendor/github.com/expr-lang/expr/vm/func_types[generated].go deleted file mode 100644 index 610b415202..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/func_types[generated].go +++ /dev/null @@ -1,370 +0,0 @@ -// Code generated by vm/func_types/main.go. DO NOT EDIT. - -package vm - -import ( - "fmt" - "time" -) - -var FuncTypes = []any{ - 1: new(func() time.Duration), - 2: new(func() time.Month), - 3: new(func() time.Time), - 4: new(func() time.Weekday), - 5: new(func() []interface{}), - 6: new(func() []uint8), - 7: new(func() interface{}), - 8: new(func() bool), - 9: new(func() uint8), - 10: new(func() float32), - 11: new(func() float64), - 12: new(func() int), - 13: new(func() int16), - 14: new(func() int32), - 15: new(func() int64), - 16: new(func() int8), - 17: new(func() map[string]interface{}), - 18: new(func() int32), - 19: new(func() string), - 20: new(func() uint), - 21: new(func() uint16), - 22: new(func() uint32), - 23: new(func() uint64), - 24: new(func() uint8), - 25: new(func(time.Duration) time.Duration), - 26: new(func(time.Duration) time.Time), - 27: new(func(time.Time) time.Duration), - 28: new(func(time.Time) bool), - 29: new(func([]interface{}) []interface{}), - 30: new(func([]interface{}) interface{}), - 31: new(func([]interface{}) map[string]interface{}), - 32: new(func([]interface{}, string) string), - 33: new(func([]uint8) string), - 34: new(func([]string, string) string), - 35: new(func(interface{}) []interface{}), - 36: new(func(interface{}) interface{}), - 37: new(func(interface{}) bool), - 38: new(func(interface{}) float64), - 39: new(func(interface{}) int), - 40: new(func(interface{}) map[string]interface{}), - 41: new(func(interface{}) string), - 42: new(func(interface{}, interface{}) []interface{}), - 43: new(func(interface{}, interface{}) interface{}), - 44: new(func(interface{}, interface{}) bool), - 45: new(func(interface{}, interface{}) string), - 46: new(func(bool) bool), - 47: new(func(bool) float64), - 48: new(func(bool) int), - 49: new(func(bool) string), - 50: new(func(bool, bool) bool), - 51: new(func(float32) float64), - 52: new(func(float64) bool), - 53: new(func(float64) float32), - 54: new(func(float64) float64), - 55: new(func(float64) int), - 56: new(func(float64) string), - 57: new(func(float64, float64) bool), - 58: new(func(int) bool), - 59: new(func(int) float64), - 60: new(func(int) int), - 61: new(func(int) string), - 62: new(func(int, int) bool), - 63: new(func(int, int) int), - 64: new(func(int, int) string), - 65: new(func(int16) int32), - 66: new(func(int32) float64), - 67: new(func(int32) int), - 68: new(func(int32) int64), - 69: new(func(int64) time.Time), - 70: new(func(int8) int), - 71: new(func(int8) int16), - 72: new(func(string) []uint8), - 73: new(func(string) []string), - 74: new(func(string) bool), - 75: new(func(string) float64), - 76: new(func(string) int), - 77: new(func(string) string), - 78: new(func(string, uint8) int), - 79: new(func(string, int) int), - 80: new(func(string, int32) int), - 81: new(func(string, string) bool), - 82: new(func(string, string) string), - 83: new(func(uint) float64), - 84: new(func(uint) int), - 85: new(func(uint) uint), - 86: new(func(uint16) uint), - 87: new(func(uint32) uint64), - 88: new(func(uint64) float64), - 89: new(func(uint64) int64), - 90: new(func(uint8) uint8), -} - -func (vm *VM) call(fn any, kind int) any { - switch kind { - case 1: - return fn.(func() time.Duration)() - case 2: - return fn.(func() time.Month)() - case 3: - return fn.(func() time.Time)() - case 4: - return fn.(func() time.Weekday)() - case 5: - return fn.(func() []interface{})() - case 6: - return fn.(func() []uint8)() - case 7: - return fn.(func() interface{})() - case 8: - return fn.(func() bool)() - case 9: - return fn.(func() uint8)() - case 10: - return fn.(func() float32)() - case 11: - return fn.(func() float64)() - case 12: - return fn.(func() int)() - case 13: - return fn.(func() int16)() - case 14: - return fn.(func() int32)() - case 15: - return fn.(func() int64)() - case 16: - return fn.(func() int8)() - case 17: - return fn.(func() map[string]interface{})() - case 18: - return fn.(func() int32)() - case 19: - return fn.(func() string)() - case 20: - return fn.(func() uint)() - case 21: - return fn.(func() uint16)() - case 22: - return fn.(func() uint32)() - case 23: - return fn.(func() uint64)() - case 24: - return fn.(func() uint8)() - case 25: - arg1 := vm.pop().(time.Duration) - return fn.(func(time.Duration) time.Duration)(arg1) - case 26: - arg1 := vm.pop().(time.Duration) - return fn.(func(time.Duration) time.Time)(arg1) - case 27: - arg1 := vm.pop().(time.Time) - return fn.(func(time.Time) time.Duration)(arg1) - case 28: - arg1 := vm.pop().(time.Time) - return fn.(func(time.Time) bool)(arg1) - case 29: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) []interface{})(arg1) - case 30: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) interface{})(arg1) - case 31: - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}) map[string]interface{})(arg1) - case 32: - arg2 := vm.pop().(string) - arg1 := vm.pop().([]interface{}) - return fn.(func([]interface{}, string) string)(arg1, arg2) - case 33: - arg1 := vm.pop().([]uint8) - return fn.(func([]uint8) string)(arg1) - case 34: - arg2 := vm.pop().(string) - arg1 := vm.pop().([]string) - return fn.(func([]string, string) string)(arg1, arg2) - case 35: - arg1 := vm.pop() - return fn.(func(interface{}) []interface{})(arg1) - case 36: - arg1 := vm.pop() - return fn.(func(interface{}) interface{})(arg1) - case 37: - arg1 := vm.pop() - return fn.(func(interface{}) bool)(arg1) - case 38: - arg1 := vm.pop() - return fn.(func(interface{}) float64)(arg1) - case 39: - arg1 := vm.pop() - return fn.(func(interface{}) int)(arg1) - case 40: - arg1 := vm.pop() - return fn.(func(interface{}) map[string]interface{})(arg1) - case 41: - arg1 := vm.pop() - return fn.(func(interface{}) string)(arg1) - case 42: - arg2 := vm.pop() - arg1 := vm.pop() - return fn.(func(interface{}, interface{}) []interface{})(arg1, arg2) - case 43: - arg2 := vm.pop() - arg1 := vm.pop() - return fn.(func(interface{}, interface{}) interface{})(arg1, arg2) - case 44: - arg2 := vm.pop() - arg1 := vm.pop() - return fn.(func(interface{}, interface{}) bool)(arg1, arg2) - case 45: - arg2 := vm.pop() - arg1 := vm.pop() - return fn.(func(interface{}, interface{}) string)(arg1, arg2) - case 46: - arg1 := vm.pop().(bool) - return fn.(func(bool) bool)(arg1) - case 47: - arg1 := vm.pop().(bool) - return fn.(func(bool) float64)(arg1) - case 48: - arg1 := vm.pop().(bool) - return fn.(func(bool) int)(arg1) - case 49: - arg1 := vm.pop().(bool) - return fn.(func(bool) string)(arg1) - case 50: - arg2 := vm.pop().(bool) - arg1 := vm.pop().(bool) - return fn.(func(bool, bool) bool)(arg1, arg2) - case 51: - arg1 := vm.pop().(float32) - return fn.(func(float32) float64)(arg1) - case 52: - arg1 := vm.pop().(float64) - return fn.(func(float64) bool)(arg1) - case 53: - arg1 := vm.pop().(float64) - return fn.(func(float64) float32)(arg1) - case 54: - arg1 := vm.pop().(float64) - return fn.(func(float64) float64)(arg1) - case 55: - arg1 := vm.pop().(float64) - return fn.(func(float64) int)(arg1) - case 56: - arg1 := vm.pop().(float64) - return fn.(func(float64) string)(arg1) - case 57: - arg2 := vm.pop().(float64) - arg1 := vm.pop().(float64) - return fn.(func(float64, float64) bool)(arg1, arg2) - case 58: - arg1 := vm.pop().(int) - return fn.(func(int) bool)(arg1) - case 59: - arg1 := vm.pop().(int) - return fn.(func(int) float64)(arg1) - case 60: - arg1 := vm.pop().(int) - return fn.(func(int) int)(arg1) - case 61: - arg1 := vm.pop().(int) - return fn.(func(int) string)(arg1) - case 62: - arg2 := vm.pop().(int) - arg1 := vm.pop().(int) - return fn.(func(int, int) bool)(arg1, arg2) - case 63: - arg2 := vm.pop().(int) - arg1 := vm.pop().(int) - return fn.(func(int, int) int)(arg1, arg2) - case 64: - arg2 := vm.pop().(int) - arg1 := vm.pop().(int) - return fn.(func(int, int) string)(arg1, arg2) - case 65: - arg1 := vm.pop().(int16) - return fn.(func(int16) int32)(arg1) - case 66: - arg1 := vm.pop().(int32) - return fn.(func(int32) float64)(arg1) - case 67: - arg1 := vm.pop().(int32) - return fn.(func(int32) int)(arg1) - case 68: - arg1 := vm.pop().(int32) - return fn.(func(int32) int64)(arg1) - case 69: - arg1 := vm.pop().(int64) - return fn.(func(int64) time.Time)(arg1) - case 70: - arg1 := vm.pop().(int8) - return fn.(func(int8) int)(arg1) - case 71: - arg1 := vm.pop().(int8) - return fn.(func(int8) int16)(arg1) - case 72: - arg1 := vm.pop().(string) - return fn.(func(string) []uint8)(arg1) - case 73: - arg1 := vm.pop().(string) - return fn.(func(string) []string)(arg1) - case 74: - arg1 := vm.pop().(string) - return fn.(func(string) bool)(arg1) - case 75: - arg1 := vm.pop().(string) - return fn.(func(string) float64)(arg1) - case 76: - arg1 := vm.pop().(string) - return fn.(func(string) int)(arg1) - case 77: - arg1 := vm.pop().(string) - return fn.(func(string) string)(arg1) - case 78: - arg2 := vm.pop().(uint8) - arg1 := vm.pop().(string) - return fn.(func(string, uint8) int)(arg1, arg2) - case 79: - arg2 := vm.pop().(int) - arg1 := vm.pop().(string) - return fn.(func(string, int) int)(arg1, arg2) - case 80: - arg2 := vm.pop().(int32) - arg1 := vm.pop().(string) - return fn.(func(string, int32) int)(arg1, arg2) - case 81: - arg2 := vm.pop().(string) - arg1 := vm.pop().(string) - return fn.(func(string, string) bool)(arg1, arg2) - case 82: - arg2 := vm.pop().(string) - arg1 := vm.pop().(string) - return fn.(func(string, string) string)(arg1, arg2) - case 83: - arg1 := vm.pop().(uint) - return fn.(func(uint) float64)(arg1) - case 84: - arg1 := vm.pop().(uint) - return fn.(func(uint) int)(arg1) - case 85: - arg1 := vm.pop().(uint) - return fn.(func(uint) uint)(arg1) - case 86: - arg1 := vm.pop().(uint16) - return fn.(func(uint16) uint)(arg1) - case 87: - arg1 := vm.pop().(uint32) - return fn.(func(uint32) uint64)(arg1) - case 88: - arg1 := vm.pop().(uint64) - return fn.(func(uint64) float64)(arg1) - case 89: - arg1 := vm.pop().(uint64) - return fn.(func(uint64) int64)(arg1) - case 90: - arg1 := vm.pop().(uint8) - return fn.(func(uint8) uint8)(arg1) - - } - panic(fmt.Sprintf("unknown function kind (%v)", kind)) -} diff --git a/vendor/github.com/expr-lang/expr/vm/opcodes.go b/vendor/github.com/expr-lang/expr/vm/opcodes.go deleted file mode 100644 index 5fca0fa29a..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/opcodes.go +++ /dev/null @@ -1,90 +0,0 @@ -package vm - -type Opcode byte - -const ( - OpInvalid Opcode = iota - OpPush - OpInt - OpPop - OpStore - OpLoadVar - OpLoadConst - OpLoadField - OpLoadFast - OpLoadMethod - OpLoadFunc - OpLoadEnv - OpFetch - OpFetchField - OpMethod - OpTrue - OpFalse - OpNil - OpNegate - OpNot - OpEqual - OpEqualInt - OpEqualString - OpJump - OpJumpIfTrue - OpJumpIfFalse - OpJumpIfNil - OpJumpIfNotNil - OpJumpIfEnd - OpJumpBackward - OpIn - OpLess - OpMore - OpLessOrEqual - OpMoreOrEqual - OpAdd - OpSubtract - OpMultiply - OpDivide - OpModulo - OpExponent - OpRange - OpMatches - OpMatchesConst - OpContains - OpStartsWith - OpEndsWith - OpSlice - OpCall - OpCall0 - OpCall1 - OpCall2 - OpCall3 - OpCallN - OpCallFast - OpCallSafe - OpCallTyped - OpCallBuiltin1 - OpArray - OpMap - OpLen - OpCast - OpDeref - OpIncrementIndex - OpDecrementIndex - OpIncrementCount - OpGetIndex - OpGetCount - OpGetLen - OpGetAcc - OpSetAcc - OpSetIndex - OpPointer - OpThrow - OpCreate - OpGroupBy - OpSortBy - OpSort - OpProfileStart - OpProfileEnd - OpBegin - OpAnd - OpOr - OpEnd // This opcode must be at the end of this list. -) diff --git a/vendor/github.com/expr-lang/expr/vm/program.go b/vendor/github.com/expr-lang/expr/vm/program.go deleted file mode 100644 index 7eb96bd3d7..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/program.go +++ /dev/null @@ -1,391 +0,0 @@ -package vm - -import ( - "bytes" - "fmt" - "io" - "reflect" - "regexp" - "strings" - "text/tabwriter" - - "github.com/expr-lang/expr/ast" - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/vm/runtime" -) - -// Program represents a compiled expression. -type Program struct { - Bytecode []Opcode - Arguments []int - Constants []any - - source file.Source - node ast.Node - locations []file.Location - variables int - functions []Function - debugInfo map[string]string - span *Span -} - -// NewProgram returns a new Program. It's used by the compiler. -func NewProgram( - source file.Source, - node ast.Node, - locations []file.Location, - variables int, - constants []any, - bytecode []Opcode, - arguments []int, - functions []Function, - debugInfo map[string]string, - span *Span, -) *Program { - return &Program{ - source: source, - node: node, - locations: locations, - variables: variables, - Constants: constants, - Bytecode: bytecode, - Arguments: arguments, - functions: functions, - debugInfo: debugInfo, - span: span, - } -} - -// Source returns origin file.Source. -func (program *Program) Source() file.Source { - return program.source -} - -// Node returns origin ast.Node. -func (program *Program) Node() ast.Node { - return program.node -} - -// Locations returns a slice of bytecode's locations. -func (program *Program) Locations() []file.Location { - return program.locations -} - -// Disassemble returns opcodes as a string. -func (program *Program) Disassemble() string { - var buf bytes.Buffer - w := tabwriter.NewWriter(&buf, 0, 0, 2, ' ', 0) - program.DisassembleWriter(w) - _ = w.Flush() - return buf.String() -} - -// DisassembleWriter takes a writer and writes opcodes to it. -func (program *Program) DisassembleWriter(w io.Writer) { - ip := 0 - for ip < len(program.Bytecode) { - pp := ip - op := program.Bytecode[ip] - arg := program.Arguments[ip] - ip += 1 - - code := func(label string) { - _, _ = fmt.Fprintf(w, "%v\t%v\n", pp, label) - } - jump := func(label string) { - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t(%v)\n", pp, label, arg, ip+arg) - } - jumpBack := func(label string) { - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t(%v)\n", pp, label, arg, ip-arg) - } - argument := func(label string) { - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\n", pp, label, arg) - } - argumentWithInfo := func(label string, prefix string) { - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, program.debugInfo[fmt.Sprintf("%s_%d", prefix, arg)]) - } - constant := func(label string) { - var c any - if arg < len(program.Constants) { - c = program.Constants[arg] - } else { - c = "out of range" - } - if name, ok := program.debugInfo[fmt.Sprintf("const_%d", arg)]; ok { - c = name - } - if r, ok := c.(*regexp.Regexp); ok { - c = r.String() - } - if field, ok := c.(*runtime.Field); ok { - c = fmt.Sprintf("{%v %v}", strings.Join(field.Path, "."), field.Index) - } - if method, ok := c.(*runtime.Method); ok { - c = fmt.Sprintf("{%v %v}", method.Name, method.Index) - } - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, c) - } - builtinArg := func(label string) { - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, label, arg, builtin.Builtins[arg].Name) - } - - switch op { - case OpInvalid: - code("OpInvalid") - - case OpPush: - constant("OpPush") - - case OpInt: - argument("OpInt") - - case OpPop: - code("OpPop") - - case OpStore: - argumentWithInfo("OpStore", "var") - - case OpLoadVar: - argumentWithInfo("OpLoadVar", "var") - - case OpLoadConst: - constant("OpLoadConst") - - case OpLoadField: - constant("OpLoadField") - - case OpLoadFast: - constant("OpLoadFast") - - case OpLoadMethod: - constant("OpLoadMethod") - - case OpLoadFunc: - argumentWithInfo("OpLoadFunc", "func") - - case OpLoadEnv: - code("OpLoadEnv") - - case OpFetch: - code("OpFetch") - - case OpFetchField: - constant("OpFetchField") - - case OpMethod: - constant("OpMethod") - - case OpTrue: - code("OpTrue") - - case OpFalse: - code("OpFalse") - - case OpNil: - code("OpNil") - - case OpNegate: - code("OpNegate") - - case OpNot: - code("OpNot") - - case OpEqual: - code("OpEqual") - - case OpEqualInt: - code("OpEqualInt") - - case OpEqualString: - code("OpEqualString") - - case OpJump: - jump("OpJump") - - case OpJumpIfTrue: - jump("OpJumpIfTrue") - - case OpJumpIfFalse: - jump("OpJumpIfFalse") - - case OpJumpIfNil: - jump("OpJumpIfNil") - - case OpJumpIfNotNil: - jump("OpJumpIfNotNil") - - case OpJumpIfEnd: - jump("OpJumpIfEnd") - - case OpJumpBackward: - jumpBack("OpJumpBackward") - - case OpIn: - code("OpIn") - - case OpLess: - code("OpLess") - - case OpMore: - code("OpMore") - - case OpLessOrEqual: - code("OpLessOrEqual") - - case OpMoreOrEqual: - code("OpMoreOrEqual") - - case OpAdd: - code("OpAdd") - - case OpSubtract: - code("OpSubtract") - - case OpMultiply: - code("OpMultiply") - - case OpDivide: - code("OpDivide") - - case OpModulo: - code("OpModulo") - - case OpExponent: - code("OpExponent") - - case OpRange: - code("OpRange") - - case OpMatches: - code("OpMatches") - - case OpMatchesConst: - constant("OpMatchesConst") - - case OpContains: - code("OpContains") - - case OpStartsWith: - code("OpStartsWith") - - case OpEndsWith: - code("OpEndsWith") - - case OpSlice: - code("OpSlice") - - case OpCall: - argument("OpCall") - - case OpCall0: - argumentWithInfo("OpCall0", "func") - - case OpCall1: - argumentWithInfo("OpCall1", "func") - - case OpCall2: - argumentWithInfo("OpCall2", "func") - - case OpCall3: - argumentWithInfo("OpCall3", "func") - - case OpCallN: - argument("OpCallN") - - case OpCallFast: - argument("OpCallFast") - - case OpCallSafe: - argument("OpCallSafe") - - case OpCallTyped: - signature := reflect.TypeOf(FuncTypes[arg]).Elem().String() - _, _ = fmt.Fprintf(w, "%v\t%v\t<%v>\t%v\n", pp, "OpCallTyped", arg, signature) - - case OpCallBuiltin1: - builtinArg("OpCallBuiltin1") - - case OpArray: - code("OpArray") - - case OpMap: - code("OpMap") - - case OpLen: - code("OpLen") - - case OpCast: - argument("OpCast") - - case OpDeref: - code("OpDeref") - - case OpIncrementIndex: - code("OpIncrementIndex") - - case OpDecrementIndex: - code("OpDecrementIndex") - - case OpIncrementCount: - code("OpIncrementCount") - - case OpGetIndex: - code("OpGetIndex") - - case OpGetCount: - code("OpGetCount") - - case OpGetLen: - code("OpGetLen") - - case OpGetAcc: - code("OpGetAcc") - - case OpSetAcc: - code("OpSetAcc") - - case OpSetIndex: - code("OpSetIndex") - - case OpPointer: - code("OpPointer") - - case OpThrow: - code("OpThrow") - - case OpCreate: - argument("OpCreate") - - case OpGroupBy: - code("OpGroupBy") - - case OpSortBy: - code("OpSortBy") - - case OpSort: - code("OpSort") - - case OpProfileStart: - code("OpProfileStart") - - case OpProfileEnd: - code("OpProfileEnd") - - case OpBegin: - code("OpBegin") - - case OpAnd: - code("OpAnd") - - case OpOr: - code("OpOr") - - case OpEnd: - code("OpEnd") - - default: - _, _ = fmt.Fprintf(w, "%v\t%#x (unknown)\n", ip, op) - } - } -} diff --git a/vendor/github.com/expr-lang/expr/vm/runtime/helpers[generated].go b/vendor/github.com/expr-lang/expr/vm/runtime/helpers[generated].go deleted file mode 100644 index d950f11114..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/runtime/helpers[generated].go +++ /dev/null @@ -1,3718 +0,0 @@ -// Code generated by vm/runtime/helpers/main.go. DO NOT EDIT. - -package runtime - -import ( - "fmt" - "reflect" - "time" -) - -func Equal(a, b interface{}) bool { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) == int(y) - case uint8: - return int(x) == int(y) - case uint16: - return int(x) == int(y) - case uint32: - return int(x) == int(y) - case uint64: - return int(x) == int(y) - case int: - return int(x) == int(y) - case int8: - return int(x) == int(y) - case int16: - return int(x) == int(y) - case int32: - return int(x) == int(y) - case int64: - return int(x) == int(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) == float64(y) - case uint8: - return float64(x) == float64(y) - case uint16: - return float64(x) == float64(y) - case uint32: - return float64(x) == float64(y) - case uint64: - return float64(x) == float64(y) - case int: - return float64(x) == float64(y) - case int8: - return float64(x) == float64(y) - case int16: - return float64(x) == float64(y) - case int32: - return float64(x) == float64(y) - case int64: - return float64(x) == float64(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) == float64(y) - case uint8: - return float64(x) == float64(y) - case uint16: - return float64(x) == float64(y) - case uint32: - return float64(x) == float64(y) - case uint64: - return float64(x) == float64(y) - case int: - return float64(x) == float64(y) - case int8: - return float64(x) == float64(y) - case int16: - return float64(x) == float64(y) - case int32: - return float64(x) == float64(y) - case int64: - return float64(x) == float64(y) - case float32: - return float64(x) == float64(y) - case float64: - return float64(x) == float64(y) - } - case []any: - switch y := b.(type) { - case []string: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []uint: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []uint8: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []uint16: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []uint32: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []uint64: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []int: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []int8: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []int16: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []int32: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []int64: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []float32: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []float64: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - case []any: - if len(x) != len(y) { - return false - } - for i := range x { - if !Equal(x[i], y[i]) { - return false - } - } - return true - } - case []string: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []string: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []uint: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []uint: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []uint8: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []uint8: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []uint16: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []uint16: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []uint32: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []uint32: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []uint64: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []uint64: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []int: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []int: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []int8: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []int8: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []int16: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []int16: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []int32: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []int32: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []int64: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []int64: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []float32: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []float32: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case []float64: - switch y := b.(type) { - case []any: - return Equal(y, x) - case []float64: - if len(x) != len(y) { - return false - } - for i := range x { - if x[i] != y[i] { - return false - } - } - return true - } - case string: - switch y := b.(type) { - case string: - return x == y - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.Equal(y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x == y - } - case bool: - switch y := b.(type) { - case bool: - return x == y - } - } - if IsNil(a) && IsNil(b) { - return true - } - return reflect.DeepEqual(a, b) -} - -func Less(a, b interface{}) bool { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) < int(y) - case uint8: - return int(x) < int(y) - case uint16: - return int(x) < int(y) - case uint32: - return int(x) < int(y) - case uint64: - return int(x) < int(y) - case int: - return int(x) < int(y) - case int8: - return int(x) < int(y) - case int16: - return int(x) < int(y) - case int32: - return int(x) < int(y) - case int64: - return int(x) < int(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) < float64(y) - case uint8: - return float64(x) < float64(y) - case uint16: - return float64(x) < float64(y) - case uint32: - return float64(x) < float64(y) - case uint64: - return float64(x) < float64(y) - case int: - return float64(x) < float64(y) - case int8: - return float64(x) < float64(y) - case int16: - return float64(x) < float64(y) - case int32: - return float64(x) < float64(y) - case int64: - return float64(x) < float64(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) < float64(y) - case uint8: - return float64(x) < float64(y) - case uint16: - return float64(x) < float64(y) - case uint32: - return float64(x) < float64(y) - case uint64: - return float64(x) < float64(y) - case int: - return float64(x) < float64(y) - case int8: - return float64(x) < float64(y) - case int16: - return float64(x) < float64(y) - case int32: - return float64(x) < float64(y) - case int64: - return float64(x) < float64(y) - case float32: - return float64(x) < float64(y) - case float64: - return float64(x) < float64(y) - } - case string: - switch y := b.(type) { - case string: - return x < y - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.Before(y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x < y - } - } - panic(fmt.Sprintf("invalid operation: %T < %T", a, b)) -} - -func More(a, b interface{}) bool { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) > int(y) - case uint8: - return int(x) > int(y) - case uint16: - return int(x) > int(y) - case uint32: - return int(x) > int(y) - case uint64: - return int(x) > int(y) - case int: - return int(x) > int(y) - case int8: - return int(x) > int(y) - case int16: - return int(x) > int(y) - case int32: - return int(x) > int(y) - case int64: - return int(x) > int(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) > float64(y) - case uint8: - return float64(x) > float64(y) - case uint16: - return float64(x) > float64(y) - case uint32: - return float64(x) > float64(y) - case uint64: - return float64(x) > float64(y) - case int: - return float64(x) > float64(y) - case int8: - return float64(x) > float64(y) - case int16: - return float64(x) > float64(y) - case int32: - return float64(x) > float64(y) - case int64: - return float64(x) > float64(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) > float64(y) - case uint8: - return float64(x) > float64(y) - case uint16: - return float64(x) > float64(y) - case uint32: - return float64(x) > float64(y) - case uint64: - return float64(x) > float64(y) - case int: - return float64(x) > float64(y) - case int8: - return float64(x) > float64(y) - case int16: - return float64(x) > float64(y) - case int32: - return float64(x) > float64(y) - case int64: - return float64(x) > float64(y) - case float32: - return float64(x) > float64(y) - case float64: - return float64(x) > float64(y) - } - case string: - switch y := b.(type) { - case string: - return x > y - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.After(y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x > y - } - } - panic(fmt.Sprintf("invalid operation: %T > %T", a, b)) -} - -func LessOrEqual(a, b interface{}) bool { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) <= int(y) - case uint8: - return int(x) <= int(y) - case uint16: - return int(x) <= int(y) - case uint32: - return int(x) <= int(y) - case uint64: - return int(x) <= int(y) - case int: - return int(x) <= int(y) - case int8: - return int(x) <= int(y) - case int16: - return int(x) <= int(y) - case int32: - return int(x) <= int(y) - case int64: - return int(x) <= int(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) <= float64(y) - case uint8: - return float64(x) <= float64(y) - case uint16: - return float64(x) <= float64(y) - case uint32: - return float64(x) <= float64(y) - case uint64: - return float64(x) <= float64(y) - case int: - return float64(x) <= float64(y) - case int8: - return float64(x) <= float64(y) - case int16: - return float64(x) <= float64(y) - case int32: - return float64(x) <= float64(y) - case int64: - return float64(x) <= float64(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) <= float64(y) - case uint8: - return float64(x) <= float64(y) - case uint16: - return float64(x) <= float64(y) - case uint32: - return float64(x) <= float64(y) - case uint64: - return float64(x) <= float64(y) - case int: - return float64(x) <= float64(y) - case int8: - return float64(x) <= float64(y) - case int16: - return float64(x) <= float64(y) - case int32: - return float64(x) <= float64(y) - case int64: - return float64(x) <= float64(y) - case float32: - return float64(x) <= float64(y) - case float64: - return float64(x) <= float64(y) - } - case string: - switch y := b.(type) { - case string: - return x <= y - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.Before(y) || x.Equal(y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x <= y - } - } - panic(fmt.Sprintf("invalid operation: %T <= %T", a, b)) -} - -func MoreOrEqual(a, b interface{}) bool { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) >= int(y) - case uint8: - return int(x) >= int(y) - case uint16: - return int(x) >= int(y) - case uint32: - return int(x) >= int(y) - case uint64: - return int(x) >= int(y) - case int: - return int(x) >= int(y) - case int8: - return int(x) >= int(y) - case int16: - return int(x) >= int(y) - case int32: - return int(x) >= int(y) - case int64: - return int(x) >= int(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) >= float64(y) - case uint8: - return float64(x) >= float64(y) - case uint16: - return float64(x) >= float64(y) - case uint32: - return float64(x) >= float64(y) - case uint64: - return float64(x) >= float64(y) - case int: - return float64(x) >= float64(y) - case int8: - return float64(x) >= float64(y) - case int16: - return float64(x) >= float64(y) - case int32: - return float64(x) >= float64(y) - case int64: - return float64(x) >= float64(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) >= float64(y) - case uint8: - return float64(x) >= float64(y) - case uint16: - return float64(x) >= float64(y) - case uint32: - return float64(x) >= float64(y) - case uint64: - return float64(x) >= float64(y) - case int: - return float64(x) >= float64(y) - case int8: - return float64(x) >= float64(y) - case int16: - return float64(x) >= float64(y) - case int32: - return float64(x) >= float64(y) - case int64: - return float64(x) >= float64(y) - case float32: - return float64(x) >= float64(y) - case float64: - return float64(x) >= float64(y) - } - case string: - switch y := b.(type) { - case string: - return x >= y - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.After(y) || x.Equal(y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x >= y - } - } - panic(fmt.Sprintf("invalid operation: %T >= %T", a, b)) -} - -func Add(a, b interface{}) interface{} { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) + int(y) - case uint8: - return int(x) + int(y) - case uint16: - return int(x) + int(y) - case uint32: - return int(x) + int(y) - case uint64: - return int(x) + int(y) - case int: - return int(x) + int(y) - case int8: - return int(x) + int(y) - case int16: - return int(x) + int(y) - case int32: - return int(x) + int(y) - case int64: - return int(x) + int(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) + float64(y) - case uint8: - return float64(x) + float64(y) - case uint16: - return float64(x) + float64(y) - case uint32: - return float64(x) + float64(y) - case uint64: - return float64(x) + float64(y) - case int: - return float64(x) + float64(y) - case int8: - return float64(x) + float64(y) - case int16: - return float64(x) + float64(y) - case int32: - return float64(x) + float64(y) - case int64: - return float64(x) + float64(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) + float64(y) - case uint8: - return float64(x) + float64(y) - case uint16: - return float64(x) + float64(y) - case uint32: - return float64(x) + float64(y) - case uint64: - return float64(x) + float64(y) - case int: - return float64(x) + float64(y) - case int8: - return float64(x) + float64(y) - case int16: - return float64(x) + float64(y) - case int32: - return float64(x) + float64(y) - case int64: - return float64(x) + float64(y) - case float32: - return float64(x) + float64(y) - case float64: - return float64(x) + float64(y) - } - case string: - switch y := b.(type) { - case string: - return x + y - } - case time.Time: - switch y := b.(type) { - case time.Duration: - return x.Add(y) - } - case time.Duration: - switch y := b.(type) { - case time.Time: - return y.Add(x) - case time.Duration: - return x + y - } - } - panic(fmt.Sprintf("invalid operation: %T + %T", a, b)) -} - -func Subtract(a, b interface{}) interface{} { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) - int(y) - case uint8: - return int(x) - int(y) - case uint16: - return int(x) - int(y) - case uint32: - return int(x) - int(y) - case uint64: - return int(x) - int(y) - case int: - return int(x) - int(y) - case int8: - return int(x) - int(y) - case int16: - return int(x) - int(y) - case int32: - return int(x) - int(y) - case int64: - return int(x) - int(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) - float64(y) - case uint8: - return float64(x) - float64(y) - case uint16: - return float64(x) - float64(y) - case uint32: - return float64(x) - float64(y) - case uint64: - return float64(x) - float64(y) - case int: - return float64(x) - float64(y) - case int8: - return float64(x) - float64(y) - case int16: - return float64(x) - float64(y) - case int32: - return float64(x) - float64(y) - case int64: - return float64(x) - float64(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) - float64(y) - case uint8: - return float64(x) - float64(y) - case uint16: - return float64(x) - float64(y) - case uint32: - return float64(x) - float64(y) - case uint64: - return float64(x) - float64(y) - case int: - return float64(x) - float64(y) - case int8: - return float64(x) - float64(y) - case int16: - return float64(x) - float64(y) - case int32: - return float64(x) - float64(y) - case int64: - return float64(x) - float64(y) - case float32: - return float64(x) - float64(y) - case float64: - return float64(x) - float64(y) - } - case time.Time: - switch y := b.(type) { - case time.Time: - return x.Sub(y) - case time.Duration: - return x.Add(-y) - } - case time.Duration: - switch y := b.(type) { - case time.Duration: - return x - y - } - } - panic(fmt.Sprintf("invalid operation: %T - %T", a, b)) -} - -func Multiply(a, b interface{}) interface{} { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) * int(y) - case uint8: - return int(x) * int(y) - case uint16: - return int(x) * int(y) - case uint32: - return int(x) * int(y) - case uint64: - return int(x) * int(y) - case int: - return int(x) * int(y) - case int8: - return int(x) * int(y) - case int16: - return int(x) * int(y) - case int32: - return int(x) * int(y) - case int64: - return int(x) * int(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) * float64(y) - case uint8: - return float64(x) * float64(y) - case uint16: - return float64(x) * float64(y) - case uint32: - return float64(x) * float64(y) - case uint64: - return float64(x) * float64(y) - case int: - return float64(x) * float64(y) - case int8: - return float64(x) * float64(y) - case int16: - return float64(x) * float64(y) - case int32: - return float64(x) * float64(y) - case int64: - return float64(x) * float64(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return float64(x) * float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) * float64(y) - case uint8: - return float64(x) * float64(y) - case uint16: - return float64(x) * float64(y) - case uint32: - return float64(x) * float64(y) - case uint64: - return float64(x) * float64(y) - case int: - return float64(x) * float64(y) - case int8: - return float64(x) * float64(y) - case int16: - return float64(x) * float64(y) - case int32: - return float64(x) * float64(y) - case int64: - return float64(x) * float64(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return float64(x) * float64(y) - } - case time.Duration: - switch y := b.(type) { - case uint: - return time.Duration(x) * time.Duration(y) - case uint8: - return time.Duration(x) * time.Duration(y) - case uint16: - return time.Duration(x) * time.Duration(y) - case uint32: - return time.Duration(x) * time.Duration(y) - case uint64: - return time.Duration(x) * time.Duration(y) - case int: - return time.Duration(x) * time.Duration(y) - case int8: - return time.Duration(x) * time.Duration(y) - case int16: - return time.Duration(x) * time.Duration(y) - case int32: - return time.Duration(x) * time.Duration(y) - case int64: - return time.Duration(x) * time.Duration(y) - case float32: - return float64(x) * float64(y) - case float64: - return float64(x) * float64(y) - case time.Duration: - return time.Duration(x) * time.Duration(y) - } - } - panic(fmt.Sprintf("invalid operation: %T * %T", a, b)) -} - -func Divide(a, b interface{}) float64 { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case uint8: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case uint16: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case uint32: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case uint64: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case int: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case int8: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case int16: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case int32: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case int64: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case float32: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - case float64: - switch y := b.(type) { - case uint: - return float64(x) / float64(y) - case uint8: - return float64(x) / float64(y) - case uint16: - return float64(x) / float64(y) - case uint32: - return float64(x) / float64(y) - case uint64: - return float64(x) / float64(y) - case int: - return float64(x) / float64(y) - case int8: - return float64(x) / float64(y) - case int16: - return float64(x) / float64(y) - case int32: - return float64(x) / float64(y) - case int64: - return float64(x) / float64(y) - case float32: - return float64(x) / float64(y) - case float64: - return float64(x) / float64(y) - } - } - panic(fmt.Sprintf("invalid operation: %T / %T", a, b)) -} - -func Modulo(a, b interface{}) int { - switch x := a.(type) { - case uint: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case uint8: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case uint16: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case uint32: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case uint64: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case int: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case int8: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case int16: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case int32: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - case int64: - switch y := b.(type) { - case uint: - return int(x) % int(y) - case uint8: - return int(x) % int(y) - case uint16: - return int(x) % int(y) - case uint32: - return int(x) % int(y) - case uint64: - return int(x) % int(y) - case int: - return int(x) % int(y) - case int8: - return int(x) % int(y) - case int16: - return int(x) % int(y) - case int32: - return int(x) % int(y) - case int64: - return int(x) % int(y) - } - } - panic(fmt.Sprintf("invalid operation: %T %% %T", a, b)) -} diff --git a/vendor/github.com/expr-lang/expr/vm/runtime/runtime.go b/vendor/github.com/expr-lang/expr/vm/runtime/runtime.go deleted file mode 100644 index d24c6af030..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/runtime/runtime.go +++ /dev/null @@ -1,439 +0,0 @@ -package runtime - -//go:generate sh -c "go run ./helpers > ./helpers[generated].go" - -import ( - "fmt" - "math" - "reflect" - "sync" - - "github.com/expr-lang/expr/internal/deref" -) - -var fieldCache sync.Map - -type fieldCacheKey struct { - t reflect.Type - f string -} - -func Fetch(from, i any) any { - v := reflect.ValueOf(from) - if v.Kind() == reflect.Invalid { - panic(fmt.Sprintf("cannot fetch %v from %T", i, from)) - } - - // Methods can be defined on any type. - if v.NumMethod() > 0 { - if methodName, ok := i.(string); ok { - method := v.MethodByName(methodName) - if method.IsValid() { - return method.Interface() - } - } - } - - // Structs, maps, and slices can be access through a pointer or through - // a value, when they are accessed through a pointer we don't want to - // copy them to a value. - // De-reference everything if necessary (interface and pointers) - v = deref.Value(v) - - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.String: - index := ToInt(i) - l := v.Len() - if index < 0 { - index = l + index - } - if index < 0 || index >= l { - panic(fmt.Sprintf("index out of range: %v (array length is %v)", index, l)) - } - value := v.Index(index) - if value.IsValid() { - return value.Interface() - } - - case reflect.Map: - var value reflect.Value - if i == nil { - value = v.MapIndex(reflect.Zero(v.Type().Key())) - } else { - value = v.MapIndex(reflect.ValueOf(i)) - } - if value.IsValid() { - return value.Interface() - } else { - elem := reflect.TypeOf(from).Elem() - return reflect.Zero(elem).Interface() - } - - case reflect.Struct: - fieldName := i.(string) - t := v.Type() - key := fieldCacheKey{ - t: t, - f: fieldName, - } - if cv, ok := fieldCache.Load(key); ok { - return v.FieldByIndex(cv.([]int)).Interface() - } - field, ok := t.FieldByNameFunc(func(name string) bool { - field, _ := t.FieldByName(name) - switch field.Tag.Get("expr") { - case "-": - return false - case fieldName: - return true - default: - return name == fieldName - } - }) - if ok { - value := v.FieldByIndex(field.Index) - if value.IsValid() { - fieldCache.Store(key, field.Index) - return value.Interface() - } - } - } - panic(fmt.Sprintf("cannot fetch %v from %T", i, from)) -} - -type Field struct { - Index []int - Path []string -} - -func FetchField(from any, field *Field) any { - v := reflect.ValueOf(from) - if v.Kind() != reflect.Invalid { - v = reflect.Indirect(v) - - // We can use v.FieldByIndex here, but it will panic if the field - // is not exists. And we need to recover() to generate a more - // user-friendly error message. - // Also, our fieldByIndex() function is slightly faster than the - // v.FieldByIndex() function as we don't need to verify what a field - // is a struct as we already did it on compilation step. - value := fieldByIndex(v, field) - if value.IsValid() { - return value.Interface() - } - } - panic(fmt.Sprintf("cannot get %v from %T", field.Path[0], from)) -} - -func fieldByIndex(v reflect.Value, field *Field) reflect.Value { - if len(field.Index) == 1 { - return v.Field(field.Index[0]) - } - for i, x := range field.Index { - if i > 0 { - if v.Kind() == reflect.Ptr { - if v.IsNil() { - panic(fmt.Sprintf("cannot get %v from %v", field.Path[i], field.Path[i-1])) - } - v = v.Elem() - } - } - v = v.Field(x) - } - return v -} - -type Method struct { - Index int - Name string -} - -func FetchMethod(from any, method *Method) any { - v := reflect.ValueOf(from) - kind := v.Kind() - if kind != reflect.Invalid { - // Methods can be defined on any type, no need to dereference. - method := v.Method(method.Index) - if method.IsValid() { - return method.Interface() - } - } - panic(fmt.Sprintf("cannot fetch %v from %T", method.Name, from)) -} - -func Slice(array, from, to any) any { - v := reflect.ValueOf(array) - - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.String: - length := v.Len() - a, b := ToInt(from), ToInt(to) - if a < 0 { - a = length + a - } - if a < 0 { - a = 0 - } - if b < 0 { - b = length + b - } - if b < 0 { - b = 0 - } - if b > length { - b = length - } - if a > b { - a = b - } - if v.Kind() == reflect.Array && !v.CanAddr() { - newValue := reflect.New(v.Type()).Elem() - newValue.Set(v) - v = newValue - } - value := v.Slice(a, b) - if value.IsValid() { - return value.Interface() - } - - case reflect.Ptr: - value := v.Elem() - if value.IsValid() { - return Slice(value.Interface(), from, to) - } - - } - panic(fmt.Sprintf("cannot slice %v", from)) -} - -func In(needle any, array any) bool { - if array == nil { - return false - } - v := reflect.ValueOf(array) - - switch v.Kind() { - - case reflect.Array, reflect.Slice: - for i := 0; i < v.Len(); i++ { - value := v.Index(i) - if value.IsValid() { - if Equal(value.Interface(), needle) { - return true - } - } - } - return false - - case reflect.Map: - var value reflect.Value - if needle == nil { - value = v.MapIndex(reflect.Zero(v.Type().Key())) - } else { - value = v.MapIndex(reflect.ValueOf(needle)) - } - if value.IsValid() { - return true - } - return false - - case reflect.Struct: - n := reflect.ValueOf(needle) - if !n.IsValid() || n.Kind() != reflect.String { - panic(fmt.Sprintf("cannot use %T as field name of %T", needle, array)) - } - field, ok := v.Type().FieldByName(n.String()) - if !ok || !field.IsExported() || field.Tag.Get("expr") == "-" { - return false - } - value := v.FieldByIndex(field.Index) - if value.IsValid() { - return true - } - return false - - case reflect.Ptr: - value := v.Elem() - if value.IsValid() { - return In(needle, value.Interface()) - } - return false - } - - panic(fmt.Sprintf(`operator "in" not defined on %T`, array)) -} - -func Len(a any) int { - v := reflect.ValueOf(a) - switch v.Kind() { - case reflect.Array, reflect.Slice, reflect.Map, reflect.String: - return v.Len() - default: - panic(fmt.Sprintf("invalid argument for len (type %T)", a)) - } -} - -func Negate(i any) any { - switch v := i.(type) { - case float32: - return -v - case float64: - return -v - case int: - return -v - case int8: - return -v - case int16: - return -v - case int32: - return -v - case int64: - return -v - case uint: - return -v - case uint8: - return -v - case uint16: - return -v - case uint32: - return -v - case uint64: - return -v - default: - panic(fmt.Sprintf("invalid operation: - %T", v)) - } -} - -func Exponent(a, b any) float64 { - return math.Pow(ToFloat64(a), ToFloat64(b)) -} - -func MakeRange(min, max int) []int { - size := max - min + 1 - if size <= 0 { - return []int{} - } - rng := make([]int, size) - for i := range rng { - rng[i] = min + i - } - return rng -} - -func ToInt(a any) int { - switch x := a.(type) { - case float32: - return int(x) - case float64: - return int(x) - case int: - return x - case int8: - return int(x) - case int16: - return int(x) - case int32: - return int(x) - case int64: - return int(x) - case uint: - return int(x) - case uint8: - return int(x) - case uint16: - return int(x) - case uint32: - return int(x) - case uint64: - return int(x) - default: - panic(fmt.Sprintf("invalid operation: int(%T)", x)) - } -} - -func ToInt64(a any) int64 { - switch x := a.(type) { - case float32: - return int64(x) - case float64: - return int64(x) - case int: - return int64(x) - case int8: - return int64(x) - case int16: - return int64(x) - case int32: - return int64(x) - case int64: - return x - case uint: - return int64(x) - case uint8: - return int64(x) - case uint16: - return int64(x) - case uint32: - return int64(x) - case uint64: - return int64(x) - default: - panic(fmt.Sprintf("invalid operation: int64(%T)", x)) - } -} - -func ToFloat64(a any) float64 { - switch x := a.(type) { - case float32: - return float64(x) - case float64: - return x - case int: - return float64(x) - case int8: - return float64(x) - case int16: - return float64(x) - case int32: - return float64(x) - case int64: - return float64(x) - case uint: - return float64(x) - case uint8: - return float64(x) - case uint16: - return float64(x) - case uint32: - return float64(x) - case uint64: - return float64(x) - default: - panic(fmt.Sprintf("invalid operation: float(%T)", x)) - } -} - -func ToBool(a any) bool { - if a == nil { - return false - } - switch x := a.(type) { - case bool: - return x - default: - panic(fmt.Sprintf("invalid operation: bool(%T)", x)) - } -} - -func IsNil(v any) bool { - if v == nil { - return true - } - r := reflect.ValueOf(v) - switch r.Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.Interface, reflect.Slice: - return r.IsNil() - default: - return false - } -} diff --git a/vendor/github.com/expr-lang/expr/vm/runtime/sort.go b/vendor/github.com/expr-lang/expr/vm/runtime/sort.go deleted file mode 100644 index fb1f340d79..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/runtime/sort.go +++ /dev/null @@ -1,45 +0,0 @@ -package runtime - -type SortBy struct { - Desc bool - Array []any - Values []any -} - -func (s *SortBy) Len() int { - return len(s.Array) -} - -func (s *SortBy) Swap(i, j int) { - s.Array[i], s.Array[j] = s.Array[j], s.Array[i] - s.Values[i], s.Values[j] = s.Values[j], s.Values[i] -} - -func (s *SortBy) Less(i, j int) bool { - a, b := s.Values[i], s.Values[j] - if s.Desc { - return Less(b, a) - } - return Less(a, b) -} - -type Sort struct { - Desc bool - Array []any -} - -func (s *Sort) Len() int { - return len(s.Array) -} - -func (s *Sort) Swap(i, j int) { - s.Array[i], s.Array[j] = s.Array[j], s.Array[i] -} - -func (s *Sort) Less(i, j int) bool { - a, b := s.Array[i], s.Array[j] - if s.Desc { - return Less(b, a) - } - return Less(a, b) -} diff --git a/vendor/github.com/expr-lang/expr/vm/utils.go b/vendor/github.com/expr-lang/expr/vm/utils.go deleted file mode 100644 index 11005137cd..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/utils.go +++ /dev/null @@ -1,37 +0,0 @@ -package vm - -import ( - "reflect" - "time" -) - -type ( - Function = func(params ...any) (any, error) - SafeFunction = func(params ...any) (any, uint, error) -) - -var ( - errorType = reflect.TypeOf((*error)(nil)).Elem() -) - -type Scope struct { - Array reflect.Value - Index int - Len int - Count int - Acc any -} - -type groupBy = map[any][]any - -type Span struct { - Name string `json:"name"` - Expression string `json:"expression"` - Duration int64 `json:"duration"` - Children []*Span `json:"children"` - start time.Time -} - -func GetSpan(program *Program) *Span { - return program.span -} diff --git a/vendor/github.com/expr-lang/expr/vm/vm.go b/vendor/github.com/expr-lang/expr/vm/vm.go deleted file mode 100644 index 3c7a2b3f76..0000000000 --- a/vendor/github.com/expr-lang/expr/vm/vm.go +++ /dev/null @@ -1,767 +0,0 @@ -package vm - -//go:generate sh -c "go run ./func_types > ./func_types[generated].go" - -import ( - "fmt" - "reflect" - "regexp" - "sort" - "strings" - "time" - - "github.com/expr-lang/expr/builtin" - "github.com/expr-lang/expr/conf" - "github.com/expr-lang/expr/file" - "github.com/expr-lang/expr/internal/deref" - "github.com/expr-lang/expr/vm/runtime" -) - -const maxFnArgsBuf = 256 - -func Run(program *Program, env any) (any, error) { - if program == nil { - return nil, fmt.Errorf("program is nil") - } - vm := VM{} - return vm.Run(program, env) -} - -func Debug() *VM { - vm := &VM{ - debug: true, - step: make(chan struct{}, 0), - curr: make(chan int, 0), - } - return vm -} - -type VM struct { - Stack []any - Scopes []*Scope - Variables []any - MemoryBudget uint - ip int - memory uint - debug bool - step chan struct{} - curr chan int -} - -func (vm *VM) Run(program *Program, env any) (_ any, err error) { - defer func() { - if r := recover(); r != nil { - var location file.Location - if vm.ip-1 < len(program.locations) { - location = program.locations[vm.ip-1] - } - f := &file.Error{ - Location: location, - Message: fmt.Sprintf("%v", r), - } - if err, ok := r.(error); ok { - f.Wrap(err) - } - err = f.Bind(program.source) - } - }() - - if vm.Stack == nil { - vm.Stack = make([]any, 0, 2) - } else { - clearSlice(vm.Stack) - vm.Stack = vm.Stack[0:0] - } - if vm.Scopes != nil { - clearSlice(vm.Scopes) - vm.Scopes = vm.Scopes[0:0] - } - if len(vm.Variables) < program.variables { - vm.Variables = make([]any, program.variables) - } - if vm.MemoryBudget == 0 { - vm.MemoryBudget = conf.DefaultMemoryBudget - } - vm.memory = 0 - vm.ip = 0 - - var fnArgsBuf []any - - for vm.ip < len(program.Bytecode) { - if debug && vm.debug { - <-vm.step - } - - op := program.Bytecode[vm.ip] - arg := program.Arguments[vm.ip] - vm.ip += 1 - - switch op { - - case OpInvalid: - panic("invalid opcode") - - case OpPush: - vm.push(program.Constants[arg]) - - case OpInt: - vm.push(arg) - - case OpPop: - vm.pop() - - case OpStore: - vm.Variables[arg] = vm.pop() - - case OpLoadVar: - vm.push(vm.Variables[arg]) - - case OpLoadConst: - vm.push(runtime.Fetch(env, program.Constants[arg])) - - case OpLoadField: - vm.push(runtime.FetchField(env, program.Constants[arg].(*runtime.Field))) - - case OpLoadFast: - vm.push(env.(map[string]any)[program.Constants[arg].(string)]) - - case OpLoadMethod: - vm.push(runtime.FetchMethod(env, program.Constants[arg].(*runtime.Method))) - - case OpLoadFunc: - vm.push(program.functions[arg]) - - case OpFetch: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Fetch(a, b)) - - case OpFetchField: - a := vm.pop() - vm.push(runtime.FetchField(a, program.Constants[arg].(*runtime.Field))) - - case OpLoadEnv: - vm.push(env) - - case OpMethod: - a := vm.pop() - vm.push(runtime.FetchMethod(a, program.Constants[arg].(*runtime.Method))) - - case OpTrue: - vm.push(true) - - case OpFalse: - vm.push(false) - - case OpNil: - vm.push(nil) - - case OpNegate: - v := runtime.Negate(vm.pop()) - vm.push(v) - - case OpNot: - v := vm.pop().(bool) - vm.push(!v) - - case OpEqual: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Equal(a, b)) - - case OpEqualInt: - b := vm.pop() - a := vm.pop() - vm.push(a.(int) == b.(int)) - - case OpEqualString: - b := vm.pop() - a := vm.pop() - vm.push(a.(string) == b.(string)) - - case OpJump: - if arg < 0 { - panic("negative jump offset is invalid") - } - vm.ip += arg - - case OpJumpIfTrue: - if arg < 0 { - panic("negative jump offset is invalid") - } - if vm.current().(bool) { - vm.ip += arg - } - - case OpJumpIfFalse: - if arg < 0 { - panic("negative jump offset is invalid") - } - if !vm.current().(bool) { - vm.ip += arg - } - - case OpJumpIfNil: - if arg < 0 { - panic("negative jump offset is invalid") - } - if runtime.IsNil(vm.current()) { - vm.ip += arg - } - - case OpJumpIfNotNil: - if arg < 0 { - panic("negative jump offset is invalid") - } - if !runtime.IsNil(vm.current()) { - vm.ip += arg - } - - case OpJumpIfEnd: - if arg < 0 { - panic("negative jump offset is invalid") - } - scope := vm.scope() - if scope.Index >= scope.Len { - vm.ip += arg - } - - case OpJumpBackward: - vm.ip -= arg - - case OpIn: - b := vm.pop() - a := vm.pop() - vm.push(runtime.In(a, b)) - - case OpLess: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Less(a, b)) - - case OpMore: - b := vm.pop() - a := vm.pop() - vm.push(runtime.More(a, b)) - - case OpLessOrEqual: - b := vm.pop() - a := vm.pop() - vm.push(runtime.LessOrEqual(a, b)) - - case OpMoreOrEqual: - b := vm.pop() - a := vm.pop() - vm.push(runtime.MoreOrEqual(a, b)) - - case OpAdd: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Add(a, b)) - - case OpSubtract: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Subtract(a, b)) - - case OpMultiply: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Multiply(a, b)) - - case OpDivide: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Divide(a, b)) - - case OpModulo: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Modulo(a, b)) - - case OpExponent: - b := vm.pop() - a := vm.pop() - vm.push(runtime.Exponent(a, b)) - - case OpRange: - b := vm.pop() - a := vm.pop() - min := runtime.ToInt(a) - max := runtime.ToInt(b) - size := max - min + 1 - if size <= 0 { - size = 0 - } - vm.memGrow(uint(size)) - vm.push(runtime.MakeRange(min, max)) - - case OpMatches: - b := vm.pop() - a := vm.pop() - if runtime.IsNil(a) || runtime.IsNil(b) { - vm.push(false) - break - } - var match bool - var err error - if s, ok := a.(string); ok { - match, err = regexp.MatchString(b.(string), s) - } else { - match, err = regexp.Match(b.(string), a.([]byte)) - } - if err != nil { - panic(err) - } - vm.push(match) - - case OpMatchesConst: - a := vm.pop() - if runtime.IsNil(a) { - vm.push(false) - break - } - r := program.Constants[arg].(*regexp.Regexp) - if s, ok := a.(string); ok { - vm.push(r.MatchString(s)) - } else { - vm.push(r.Match(a.([]byte))) - } - - case OpContains: - b := vm.pop() - a := vm.pop() - if runtime.IsNil(a) || runtime.IsNil(b) { - vm.push(false) - break - } - vm.push(strings.Contains(a.(string), b.(string))) - - case OpStartsWith: - b := vm.pop() - a := vm.pop() - if runtime.IsNil(a) || runtime.IsNil(b) { - vm.push(false) - break - } - vm.push(strings.HasPrefix(a.(string), b.(string))) - - case OpEndsWith: - b := vm.pop() - a := vm.pop() - if runtime.IsNil(a) || runtime.IsNil(b) { - vm.push(false) - break - } - vm.push(strings.HasSuffix(a.(string), b.(string))) - - case OpSlice: - from := vm.pop() - to := vm.pop() - node := vm.pop() - vm.push(runtime.Slice(node, from, to)) - - case OpCall: - v := vm.pop() - if v == nil { - panic("invalid operation: cannot call nil") - } - fn := reflect.ValueOf(v) - if fn.Kind() != reflect.Func { - panic(fmt.Sprintf("invalid operation: cannot call non-function of type %T", v)) - } - fnType := fn.Type() - size := arg - in := make([]reflect.Value, size) - isVariadic := fnType.IsVariadic() - numIn := fnType.NumIn() - for i := int(size) - 1; i >= 0; i-- { - param := vm.pop() - if param == nil { - var inType reflect.Type - if isVariadic && i >= numIn-1 { - inType = fnType.In(numIn - 1).Elem() - } else { - inType = fnType.In(i) - } - in[i] = reflect.Zero(inType) - } else { - in[i] = reflect.ValueOf(param) - } - } - out := fn.Call(in) - if len(out) == 2 && out[1].Type() == errorType && !out[1].IsNil() { - panic(out[1].Interface().(error)) - } - vm.push(out[0].Interface()) - - case OpCall0: - out, err := program.functions[arg]() - if err != nil { - panic(err) - } - vm.push(out) - - case OpCall1: - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, 1) - out, err := program.functions[arg](args...) - if err != nil { - panic(err) - } - vm.push(out) - - case OpCall2: - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, 2) - out, err := program.functions[arg](args...) - if err != nil { - panic(err) - } - vm.push(out) - - case OpCall3: - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, 3) - out, err := program.functions[arg](args...) - if err != nil { - panic(err) - } - vm.push(out) - - case OpCallN: - fn := vm.pop().(Function) - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, arg) - out, err := fn(args...) - if err != nil { - panic(err) - } - vm.push(out) - - case OpCallFast: - fn := vm.pop().(func(...any) any) - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, arg) - vm.push(fn(args...)) - - case OpCallSafe: - fn := vm.pop().(SafeFunction) - var args []any - args, fnArgsBuf = vm.getArgsForFunc(fnArgsBuf, program, arg) - out, mem, err := fn(args...) - if err != nil { - panic(err) - } - vm.memGrow(mem) - vm.push(out) - - case OpCallTyped: - vm.push(vm.call(vm.pop(), arg)) - - case OpCallBuiltin1: - vm.push(builtin.Builtins[arg].Fast(vm.pop())) - - case OpArray: - size := vm.pop().(int) - vm.memGrow(uint(size)) - array := make([]any, size) - for i := size - 1; i >= 0; i-- { - array[i] = vm.pop() - } - vm.push(array) - - case OpMap: - size := vm.pop().(int) - vm.memGrow(uint(size)) - m := make(map[string]any) - for i := size - 1; i >= 0; i-- { - value := vm.pop() - key := vm.pop() - m[key.(string)] = value - } - vm.push(m) - - case OpLen: - vm.push(runtime.Len(vm.current())) - - case OpCast: - switch arg { - case 0: - vm.push(runtime.ToInt(vm.pop())) - case 1: - vm.push(runtime.ToInt64(vm.pop())) - case 2: - vm.push(runtime.ToFloat64(vm.pop())) - case 3: - vm.push(runtime.ToBool(vm.pop())) - } - - case OpDeref: - a := vm.pop() - vm.push(deref.Interface(a)) - - case OpIncrementIndex: - vm.scope().Index++ - - case OpDecrementIndex: - scope := vm.scope() - scope.Index-- - - case OpIncrementCount: - scope := vm.scope() - scope.Count++ - - case OpGetIndex: - vm.push(vm.scope().Index) - - case OpGetCount: - scope := vm.scope() - vm.push(scope.Count) - - case OpGetLen: - scope := vm.scope() - vm.push(scope.Len) - - case OpGetAcc: - vm.push(vm.scope().Acc) - - case OpSetAcc: - vm.scope().Acc = vm.pop() - - case OpSetIndex: - scope := vm.scope() - scope.Index = vm.pop().(int) - - case OpPointer: - scope := vm.scope() - vm.push(scope.Array.Index(scope.Index).Interface()) - - case OpThrow: - panic(vm.pop().(error)) - - case OpCreate: - switch arg { - case 1: - vm.push(make(groupBy)) - case 2: - scope := vm.scope() - var desc bool - switch vm.pop().(string) { - case "asc": - desc = false - case "desc": - desc = true - default: - panic("unknown order, use asc or desc") - } - vm.push(&runtime.SortBy{ - Desc: desc, - Array: make([]any, 0, scope.Len), - Values: make([]any, 0, scope.Len), - }) - default: - panic(fmt.Sprintf("unknown OpCreate argument %v", arg)) - } - - case OpGroupBy: - scope := vm.scope() - key := vm.pop() - item := scope.Array.Index(scope.Index).Interface() - scope.Acc.(groupBy)[key] = append(scope.Acc.(groupBy)[key], item) - - case OpSortBy: - scope := vm.scope() - value := vm.pop() - item := scope.Array.Index(scope.Index).Interface() - sortable := scope.Acc.(*runtime.SortBy) - sortable.Array = append(sortable.Array, item) - sortable.Values = append(sortable.Values, value) - - case OpSort: - scope := vm.scope() - sortable := scope.Acc.(*runtime.SortBy) - sort.Sort(sortable) - vm.memGrow(uint(scope.Len)) - vm.push(sortable.Array) - - case OpProfileStart: - span := program.Constants[arg].(*Span) - span.start = time.Now() - - case OpProfileEnd: - span := program.Constants[arg].(*Span) - span.Duration += time.Since(span.start).Nanoseconds() - - case OpBegin: - a := vm.pop() - array := reflect.ValueOf(a) - vm.Scopes = append(vm.Scopes, &Scope{ - Array: array, - Len: array.Len(), - }) - - case OpAnd: - a := vm.pop() - b := vm.pop() - vm.push(a.(bool) && b.(bool)) - - case OpOr: - a := vm.pop() - b := vm.pop() - vm.push(a.(bool) || b.(bool)) - - case OpEnd: - vm.Scopes = vm.Scopes[:len(vm.Scopes)-1] - - default: - panic(fmt.Sprintf("unknown bytecode %#x", op)) - } - - if debug && vm.debug { - vm.curr <- vm.ip - } - } - - if debug && vm.debug { - close(vm.curr) - close(vm.step) - } - - if len(vm.Stack) > 0 { - return vm.pop(), nil - } - - return nil, nil -} - -func (vm *VM) push(value any) { - vm.Stack = append(vm.Stack, value) -} - -func (vm *VM) current() any { - if len(vm.Stack) == 0 { - panic("stack underflow") - } - return vm.Stack[len(vm.Stack)-1] -} - -func (vm *VM) pop() any { - if len(vm.Stack) == 0 { - panic("stack underflow") - } - value := vm.Stack[len(vm.Stack)-1] - vm.Stack = vm.Stack[:len(vm.Stack)-1] - return value -} - -func (vm *VM) memGrow(size uint) { - vm.memory += size - if vm.memory >= vm.MemoryBudget { - panic("memory budget exceeded") - } -} - -func (vm *VM) scope() *Scope { - return vm.Scopes[len(vm.Scopes)-1] -} - -// getArgsForFunc lazily initializes the buffer the first time it is called for -// a given program (thus, it also needs "program" to run). It will -// take "needed" elements from the buffer and populate them with vm.pop() in -// reverse order. Because the estimation can fall short, this function can -// occasionally make a new allocation. -func (vm *VM) getArgsForFunc(argsBuf []any, program *Program, needed int) (args []any, argsBufOut []any) { - if needed == 0 || program == nil { - return nil, argsBuf - } - - // Step 1: fix estimations and preallocate - if argsBuf == nil { - estimatedFnArgsCount := estimateFnArgsCount(program) - if estimatedFnArgsCount > maxFnArgsBuf { - // put a practical limit to avoid excessive preallocation - estimatedFnArgsCount = maxFnArgsBuf - } - if estimatedFnArgsCount < needed { - // in the case that the first call is for example OpCallN with a large - // number of arguments, then make sure we will be able to serve them at - // least. - estimatedFnArgsCount = needed - } - - // in the case that we are preparing the arguments for the first - // function call of the program, then argsBuf will be nil, so we - // initialize it. We delay this initial allocation here because a - // program could have many function calls but exit earlier than the - // first call, so in that case we avoid allocating unnecessarily - argsBuf = make([]any, estimatedFnArgsCount) - } - - // Step 2: get the final slice that will be returned - var buf []any - if len(argsBuf) >= needed { - // in this case, we are successfully using the single preallocation. We - // use the full slice expression [low : high : max] because in that way - // a function that receives this slice as variadic arguments will not be - // able to make modifications to contiguous elements with append(). If - // they call append on their variadic arguments they will make a new - // allocation. - buf = (argsBuf)[:needed:needed] - argsBuf = (argsBuf)[needed:] // advance the buffer - } else { - // if we have been making calls to something like OpCallN with many more - // arguments than what we estimated, then we will need to allocate - // separately - buf = make([]any, needed) - } - - // Step 3: populate the final slice bulk copying from the stack. This is the - // exact order and copy() is a highly optimized operation - copy(buf, vm.Stack[len(vm.Stack)-needed:]) - vm.Stack = vm.Stack[:len(vm.Stack)-needed] - - return buf, argsBuf -} - -func (vm *VM) Step() { - vm.step <- struct{}{} -} - -func (vm *VM) Position() chan int { - return vm.curr -} - -func clearSlice[S ~[]E, E any](s S) { - var zero E - for i := range s { - s[i] = zero // clear mem, optimized by the compiler, in Go 1.21 the "clear" builtin can be used - } -} - -// estimateFnArgsCount inspects a *Program and estimates how many function -// arguments will be required to run it. -func estimateFnArgsCount(program *Program) int { - // Implementation note: a program will not necessarily go through all - // operations, but this is just an estimation - var count int - for _, op := range program.Bytecode { - if int(op) < len(opArgLenEstimation) { - count += opArgLenEstimation[op] - } - } - return count -} - -var opArgLenEstimation = [...]int{ - OpCall1: 1, - OpCall2: 2, - OpCall3: 3, - // we don't know exactly but we know at least 4, so be conservative as this - // is only an optimization and we also want to avoid excessive preallocation - OpCallN: 4, - // here we don't know either, but we can guess it could be common to receive - // up to 3 arguments in a function - OpCallFast: 3, - OpCallSafe: 3, -} diff --git a/vendor/github.com/felixge/httpsnoop/.gitignore b/vendor/github.com/felixge/httpsnoop/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/github.com/felixge/httpsnoop/LICENSE.txt b/vendor/github.com/felixge/httpsnoop/LICENSE.txt deleted file mode 100644 index e028b46a9b..0000000000 --- a/vendor/github.com/felixge/httpsnoop/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 Felix Geisendörfer (felix@debuggable.com) - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. diff --git a/vendor/github.com/felixge/httpsnoop/Makefile b/vendor/github.com/felixge/httpsnoop/Makefile deleted file mode 100644 index 4e12afdd90..0000000000 --- a/vendor/github.com/felixge/httpsnoop/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -.PHONY: ci generate clean - -ci: clean generate - go test -race -v ./... - -generate: - go generate . - -clean: - rm -rf *_generated*.go diff --git a/vendor/github.com/felixge/httpsnoop/README.md b/vendor/github.com/felixge/httpsnoop/README.md deleted file mode 100644 index cf6b42f3d7..0000000000 --- a/vendor/github.com/felixge/httpsnoop/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# httpsnoop - -Package httpsnoop provides an easy way to capture http related metrics (i.e. -response time, bytes written, and http status code) from your application's -http.Handlers. - -Doing this requires non-trivial wrapping of the http.ResponseWriter interface, -which is also exposed for users interested in a more low-level API. - -[![Go Reference](https://pkg.go.dev/badge/github.com/felixge/httpsnoop.svg)](https://pkg.go.dev/github.com/felixge/httpsnoop) -[![Build Status](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml/badge.svg)](https://github.com/felixge/httpsnoop/actions/workflows/main.yaml) - -## Usage Example - -```go -// myH is your app's http handler, perhaps a http.ServeMux or similar. -var myH http.Handler -// wrappedH wraps myH in order to log every request. -wrappedH := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - m := httpsnoop.CaptureMetrics(myH, w, r) - log.Printf( - "%s %s (code=%d dt=%s written=%d)", - r.Method, - r.URL, - m.Code, - m.Duration, - m.Written, - ) -}) -http.ListenAndServe(":8080", wrappedH) -``` - -## Why this package exists - -Instrumenting an application's http.Handler is surprisingly difficult. - -However if you google for e.g. "capture ResponseWriter status code" you'll find -lots of advise and code examples that suggest it to be a fairly trivial -undertaking. Unfortunately everything I've seen so far has a high chance of -breaking your application. - -The main problem is that a `http.ResponseWriter` often implements additional -interfaces such as `http.Flusher`, `http.CloseNotifier`, `http.Hijacker`, `http.Pusher`, and -`io.ReaderFrom`. So the naive approach of just wrapping `http.ResponseWriter` -in your own struct that also implements the `http.ResponseWriter` interface -will hide the additional interfaces mentioned above. This has a high change of -introducing subtle bugs into any non-trivial application. - -Another approach I've seen people take is to return a struct that implements -all of the interfaces above. However, that's also problematic, because it's -difficult to fake some of these interfaces behaviors when the underlying -`http.ResponseWriter` doesn't have an implementation. It's also dangerous, -because an application may choose to operate differently, merely because it -detects the presence of these additional interfaces. - -This package solves this problem by checking which additional interfaces a -`http.ResponseWriter` implements, returning a wrapped version implementing the -exact same set of interfaces. - -Additionally this package properly handles edge cases such as `WriteHeader` not -being called, or called more than once, as well as concurrent calls to -`http.ResponseWriter` methods, and even calls happening after the wrapped -`ServeHTTP` has already returned. - -Unfortunately this package is not perfect either. It's possible that it is -still missing some interfaces provided by the go core (let me know if you find -one), and it won't work for applications adding their own interfaces into the -mix. You can however use `httpsnoop.Unwrap(w)` to access the underlying -`http.ResponseWriter` and type-assert the result to its other interfaces. - -However, hopefully the explanation above has sufficiently scared you of rolling -your own solution to this problem. httpsnoop may still break your application, -but at least it tries to avoid it as much as possible. - -Anyway, the real problem here is that smuggling additional interfaces inside -`http.ResponseWriter` is a problematic design choice, but it probably goes as -deep as the Go language specification itself. But that's okay, I still prefer -Go over the alternatives ;). - -## Performance - -``` -BenchmarkBaseline-8 20000 94912 ns/op -BenchmarkCaptureMetrics-8 20000 95461 ns/op -``` - -As you can see, using `CaptureMetrics` on a vanilla http.Handler introduces an -overhead of ~500 ns per http request on my machine. However, the margin of -error appears to be larger than that, therefor it should be reasonable to -assume that the overhead introduced by `CaptureMetrics` is absolutely -negligible. - -## License - -MIT diff --git a/vendor/github.com/felixge/httpsnoop/capture_metrics.go b/vendor/github.com/felixge/httpsnoop/capture_metrics.go deleted file mode 100644 index bec7b71b39..0000000000 --- a/vendor/github.com/felixge/httpsnoop/capture_metrics.go +++ /dev/null @@ -1,86 +0,0 @@ -package httpsnoop - -import ( - "io" - "net/http" - "time" -) - -// Metrics holds metrics captured from CaptureMetrics. -type Metrics struct { - // Code is the first http response code passed to the WriteHeader func of - // the ResponseWriter. If no such call is made, a default code of 200 is - // assumed instead. - Code int - // Duration is the time it took to execute the handler. - Duration time.Duration - // Written is the number of bytes successfully written by the Write or - // ReadFrom function of the ResponseWriter. ResponseWriters may also write - // data to their underlaying connection directly (e.g. headers), but those - // are not tracked. Therefor the number of Written bytes will usually match - // the size of the response body. - Written int64 -} - -// CaptureMetrics wraps the given hnd, executes it with the given w and r, and -// returns the metrics it captured from it. -func CaptureMetrics(hnd http.Handler, w http.ResponseWriter, r *http.Request) Metrics { - return CaptureMetricsFn(w, func(ww http.ResponseWriter) { - hnd.ServeHTTP(ww, r) - }) -} - -// CaptureMetricsFn wraps w and calls fn with the wrapped w and returns the -// resulting metrics. This is very similar to CaptureMetrics (which is just -// sugar on top of this func), but is a more usable interface if your -// application doesn't use the Go http.Handler interface. -func CaptureMetricsFn(w http.ResponseWriter, fn func(http.ResponseWriter)) Metrics { - m := Metrics{Code: http.StatusOK} - m.CaptureMetrics(w, fn) - return m -} - -// CaptureMetrics wraps w and calls fn with the wrapped w and updates -// Metrics m with the resulting metrics. This is similar to CaptureMetricsFn, -// but allows one to customize starting Metrics object. -func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWriter)) { - var ( - start = time.Now() - headerWritten bool - hooks = Hooks{ - WriteHeader: func(next WriteHeaderFunc) WriteHeaderFunc { - return func(code int) { - next(code) - - if !(code >= 100 && code <= 199) && !headerWritten { - m.Code = code - headerWritten = true - } - } - }, - - Write: func(next WriteFunc) WriteFunc { - return func(p []byte) (int, error) { - n, err := next(p) - - m.Written += int64(n) - headerWritten = true - return n, err - } - }, - - ReadFrom: func(next ReadFromFunc) ReadFromFunc { - return func(src io.Reader) (int64, error) { - n, err := next(src) - - headerWritten = true - m.Written += n - return n, err - } - }, - } - ) - - fn(Wrap(w, hooks)) - m.Duration += time.Since(start) -} diff --git a/vendor/github.com/felixge/httpsnoop/docs.go b/vendor/github.com/felixge/httpsnoop/docs.go deleted file mode 100644 index 203c35b3c6..0000000000 --- a/vendor/github.com/felixge/httpsnoop/docs.go +++ /dev/null @@ -1,10 +0,0 @@ -// Package httpsnoop provides an easy way to capture http related metrics (i.e. -// response time, bytes written, and http status code) from your application's -// http.Handlers. -// -// Doing this requires non-trivial wrapping of the http.ResponseWriter -// interface, which is also exposed for users interested in a more low-level -// API. -package httpsnoop - -//go:generate go run codegen/main.go diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go deleted file mode 100644 index 101cedde67..0000000000 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_gteq_1.8.go +++ /dev/null @@ -1,436 +0,0 @@ -// +build go1.8 -// Code generated by "httpsnoop/codegen"; DO NOT EDIT. - -package httpsnoop - -import ( - "bufio" - "io" - "net" - "net/http" -) - -// HeaderFunc is part of the http.ResponseWriter interface. -type HeaderFunc func() http.Header - -// WriteHeaderFunc is part of the http.ResponseWriter interface. -type WriteHeaderFunc func(code int) - -// WriteFunc is part of the http.ResponseWriter interface. -type WriteFunc func(b []byte) (int, error) - -// FlushFunc is part of the http.Flusher interface. -type FlushFunc func() - -// CloseNotifyFunc is part of the http.CloseNotifier interface. -type CloseNotifyFunc func() <-chan bool - -// HijackFunc is part of the http.Hijacker interface. -type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) - -// ReadFromFunc is part of the io.ReaderFrom interface. -type ReadFromFunc func(src io.Reader) (int64, error) - -// PushFunc is part of the http.Pusher interface. -type PushFunc func(target string, opts *http.PushOptions) error - -// Hooks defines a set of method interceptors for methods included in -// http.ResponseWriter as well as some others. You can think of them as -// middleware for the function calls they target. See Wrap for more details. -type Hooks struct { - Header func(HeaderFunc) HeaderFunc - WriteHeader func(WriteHeaderFunc) WriteHeaderFunc - Write func(WriteFunc) WriteFunc - Flush func(FlushFunc) FlushFunc - CloseNotify func(CloseNotifyFunc) CloseNotifyFunc - Hijack func(HijackFunc) HijackFunc - ReadFrom func(ReadFromFunc) ReadFromFunc - Push func(PushFunc) PushFunc -} - -// Wrap returns a wrapped version of w that provides the exact same interface -// as w. Specifically if w implements any combination of: -// -// - http.Flusher -// - http.CloseNotifier -// - http.Hijacker -// - io.ReaderFrom -// - http.Pusher -// -// The wrapped version will implement the exact same combination. If no hooks -// are set, the wrapped version also behaves exactly as w. Hooks targeting -// methods not supported by w are ignored. Any other hooks will intercept the -// method they target and may modify the call's arguments and/or return values. -// The CaptureMetrics implementation serves as a working example for how the -// hooks can be used. -func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { - rw := &rw{w: w, h: hooks} - _, i0 := w.(http.Flusher) - _, i1 := w.(http.CloseNotifier) - _, i2 := w.(http.Hijacker) - _, i3 := w.(io.ReaderFrom) - _, i4 := w.(http.Pusher) - switch { - // combination 1/32 - case !i0 && !i1 && !i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - }{rw, rw} - // combination 2/32 - case !i0 && !i1 && !i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Pusher - }{rw, rw, rw} - // combination 3/32 - case !i0 && !i1 && !i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - io.ReaderFrom - }{rw, rw, rw} - // combination 4/32 - case !i0 && !i1 && !i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw} - // combination 5/32 - case !i0 && !i1 && i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - }{rw, rw, rw} - // combination 6/32 - case !i0 && !i1 && i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - http.Pusher - }{rw, rw, rw, rw} - // combination 7/32 - case !i0 && !i1 && i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 8/32 - case !i0 && !i1 && i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 9/32 - case !i0 && i1 && !i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - }{rw, rw, rw} - // combination 10/32 - case !i0 && i1 && !i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Pusher - }{rw, rw, rw, rw} - // combination 11/32 - case !i0 && i1 && !i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 12/32 - case !i0 && i1 && !i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 13/32 - case !i0 && i1 && i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - }{rw, rw, rw, rw} - // combination 14/32 - case !i0 && i1 && i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 15/32 - case !i0 && i1 && i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 16/32 - case !i0 && i1 && i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 17/32 - case i0 && !i1 && !i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - }{rw, rw, rw} - // combination 18/32 - case i0 && !i1 && !i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Pusher - }{rw, rw, rw, rw} - // combination 19/32 - case i0 && !i1 && !i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 20/32 - case i0 && !i1 && !i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 21/32 - case i0 && !i1 && i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - }{rw, rw, rw, rw} - // combination 22/32 - case i0 && !i1 && i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 23/32 - case i0 && !i1 && i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 24/32 - case i0 && !i1 && i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 25/32 - case i0 && i1 && !i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - }{rw, rw, rw, rw} - // combination 26/32 - case i0 && i1 && !i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Pusher - }{rw, rw, rw, rw, rw} - // combination 27/32 - case i0 && i1 && !i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 28/32 - case i0 && i1 && !i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 29/32 - case i0 && i1 && i2 && !i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - }{rw, rw, rw, rw, rw} - // combination 30/32 - case i0 && i1 && i2 && !i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - http.Pusher - }{rw, rw, rw, rw, rw, rw} - // combination 31/32 - case i0 && i1 && i2 && i3 && !i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw, rw} - // combination 32/32 - case i0 && i1 && i2 && i3 && i4: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - io.ReaderFrom - http.Pusher - }{rw, rw, rw, rw, rw, rw, rw} - } - panic("unreachable") -} - -type rw struct { - w http.ResponseWriter - h Hooks -} - -func (w *rw) Unwrap() http.ResponseWriter { - return w.w -} - -func (w *rw) Header() http.Header { - f := w.w.(http.ResponseWriter).Header - if w.h.Header != nil { - f = w.h.Header(f) - } - return f() -} - -func (w *rw) WriteHeader(code int) { - f := w.w.(http.ResponseWriter).WriteHeader - if w.h.WriteHeader != nil { - f = w.h.WriteHeader(f) - } - f(code) -} - -func (w *rw) Write(b []byte) (int, error) { - f := w.w.(http.ResponseWriter).Write - if w.h.Write != nil { - f = w.h.Write(f) - } - return f(b) -} - -func (w *rw) Flush() { - f := w.w.(http.Flusher).Flush - if w.h.Flush != nil { - f = w.h.Flush(f) - } - f() -} - -func (w *rw) CloseNotify() <-chan bool { - f := w.w.(http.CloseNotifier).CloseNotify - if w.h.CloseNotify != nil { - f = w.h.CloseNotify(f) - } - return f() -} - -func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { - f := w.w.(http.Hijacker).Hijack - if w.h.Hijack != nil { - f = w.h.Hijack(f) - } - return f() -} - -func (w *rw) ReadFrom(src io.Reader) (int64, error) { - f := w.w.(io.ReaderFrom).ReadFrom - if w.h.ReadFrom != nil { - f = w.h.ReadFrom(f) - } - return f(src) -} - -func (w *rw) Push(target string, opts *http.PushOptions) error { - f := w.w.(http.Pusher).Push - if w.h.Push != nil { - f = w.h.Push(f) - } - return f(target, opts) -} - -type Unwrapper interface { - Unwrap() http.ResponseWriter -} - -// Unwrap returns the underlying http.ResponseWriter from within zero or more -// layers of httpsnoop wrappers. -func Unwrap(w http.ResponseWriter) http.ResponseWriter { - if rw, ok := w.(Unwrapper); ok { - // recurse until rw.Unwrap() returns a non-Unwrapper - return Unwrap(rw.Unwrap()) - } else { - return w - } -} diff --git a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go b/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go deleted file mode 100644 index e0951df152..0000000000 --- a/vendor/github.com/felixge/httpsnoop/wrap_generated_lt_1.8.go +++ /dev/null @@ -1,278 +0,0 @@ -// +build !go1.8 -// Code generated by "httpsnoop/codegen"; DO NOT EDIT. - -package httpsnoop - -import ( - "bufio" - "io" - "net" - "net/http" -) - -// HeaderFunc is part of the http.ResponseWriter interface. -type HeaderFunc func() http.Header - -// WriteHeaderFunc is part of the http.ResponseWriter interface. -type WriteHeaderFunc func(code int) - -// WriteFunc is part of the http.ResponseWriter interface. -type WriteFunc func(b []byte) (int, error) - -// FlushFunc is part of the http.Flusher interface. -type FlushFunc func() - -// CloseNotifyFunc is part of the http.CloseNotifier interface. -type CloseNotifyFunc func() <-chan bool - -// HijackFunc is part of the http.Hijacker interface. -type HijackFunc func() (net.Conn, *bufio.ReadWriter, error) - -// ReadFromFunc is part of the io.ReaderFrom interface. -type ReadFromFunc func(src io.Reader) (int64, error) - -// Hooks defines a set of method interceptors for methods included in -// http.ResponseWriter as well as some others. You can think of them as -// middleware for the function calls they target. See Wrap for more details. -type Hooks struct { - Header func(HeaderFunc) HeaderFunc - WriteHeader func(WriteHeaderFunc) WriteHeaderFunc - Write func(WriteFunc) WriteFunc - Flush func(FlushFunc) FlushFunc - CloseNotify func(CloseNotifyFunc) CloseNotifyFunc - Hijack func(HijackFunc) HijackFunc - ReadFrom func(ReadFromFunc) ReadFromFunc -} - -// Wrap returns a wrapped version of w that provides the exact same interface -// as w. Specifically if w implements any combination of: -// -// - http.Flusher -// - http.CloseNotifier -// - http.Hijacker -// - io.ReaderFrom -// -// The wrapped version will implement the exact same combination. If no hooks -// are set, the wrapped version also behaves exactly as w. Hooks targeting -// methods not supported by w are ignored. Any other hooks will intercept the -// method they target and may modify the call's arguments and/or return values. -// The CaptureMetrics implementation serves as a working example for how the -// hooks can be used. -func Wrap(w http.ResponseWriter, hooks Hooks) http.ResponseWriter { - rw := &rw{w: w, h: hooks} - _, i0 := w.(http.Flusher) - _, i1 := w.(http.CloseNotifier) - _, i2 := w.(http.Hijacker) - _, i3 := w.(io.ReaderFrom) - switch { - // combination 1/16 - case !i0 && !i1 && !i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - }{rw, rw} - // combination 2/16 - case !i0 && !i1 && !i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - io.ReaderFrom - }{rw, rw, rw} - // combination 3/16 - case !i0 && !i1 && i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - }{rw, rw, rw} - // combination 4/16 - case !i0 && !i1 && i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 5/16 - case !i0 && i1 && !i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - }{rw, rw, rw} - // combination 6/16 - case !i0 && i1 && !i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 7/16 - case !i0 && i1 && i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - }{rw, rw, rw, rw} - // combination 8/16 - case !i0 && i1 && i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.CloseNotifier - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 9/16 - case i0 && !i1 && !i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - }{rw, rw, rw} - // combination 10/16 - case i0 && !i1 && !i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - io.ReaderFrom - }{rw, rw, rw, rw} - // combination 11/16 - case i0 && !i1 && i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - }{rw, rw, rw, rw} - // combination 12/16 - case i0 && !i1 && i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 13/16 - case i0 && i1 && !i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - }{rw, rw, rw, rw} - // combination 14/16 - case i0 && i1 && !i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - io.ReaderFrom - }{rw, rw, rw, rw, rw} - // combination 15/16 - case i0 && i1 && i2 && !i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - }{rw, rw, rw, rw, rw} - // combination 16/16 - case i0 && i1 && i2 && i3: - return struct { - Unwrapper - http.ResponseWriter - http.Flusher - http.CloseNotifier - http.Hijacker - io.ReaderFrom - }{rw, rw, rw, rw, rw, rw} - } - panic("unreachable") -} - -type rw struct { - w http.ResponseWriter - h Hooks -} - -func (w *rw) Unwrap() http.ResponseWriter { - return w.w -} - -func (w *rw) Header() http.Header { - f := w.w.(http.ResponseWriter).Header - if w.h.Header != nil { - f = w.h.Header(f) - } - return f() -} - -func (w *rw) WriteHeader(code int) { - f := w.w.(http.ResponseWriter).WriteHeader - if w.h.WriteHeader != nil { - f = w.h.WriteHeader(f) - } - f(code) -} - -func (w *rw) Write(b []byte) (int, error) { - f := w.w.(http.ResponseWriter).Write - if w.h.Write != nil { - f = w.h.Write(f) - } - return f(b) -} - -func (w *rw) Flush() { - f := w.w.(http.Flusher).Flush - if w.h.Flush != nil { - f = w.h.Flush(f) - } - f() -} - -func (w *rw) CloseNotify() <-chan bool { - f := w.w.(http.CloseNotifier).CloseNotify - if w.h.CloseNotify != nil { - f = w.h.CloseNotify(f) - } - return f() -} - -func (w *rw) Hijack() (net.Conn, *bufio.ReadWriter, error) { - f := w.w.(http.Hijacker).Hijack - if w.h.Hijack != nil { - f = w.h.Hijack(f) - } - return f() -} - -func (w *rw) ReadFrom(src io.Reader) (int64, error) { - f := w.w.(io.ReaderFrom).ReadFrom - if w.h.ReadFrom != nil { - f = w.h.ReadFrom(f) - } - return f(src) -} - -type Unwrapper interface { - Unwrap() http.ResponseWriter -} - -// Unwrap returns the underlying http.ResponseWriter from within zero or more -// layers of httpsnoop wrappers. -func Unwrap(w http.ResponseWriter) http.ResponseWriter { - if rw, ok := w.(Unwrapper); ok { - // recurse until rw.Unwrap() returns a non-Unwrapper - return Unwrap(rw.Unwrap()) - } else { - return w - } -} diff --git a/vendor/github.com/go-logr/logr/funcr/funcr.go b/vendor/github.com/go-logr/logr/funcr/funcr.go deleted file mode 100644 index b22c57d713..0000000000 --- a/vendor/github.com/go-logr/logr/funcr/funcr.go +++ /dev/null @@ -1,914 +0,0 @@ -/* -Copyright 2021 The logr 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 funcr implements formatting of structured log messages and -// optionally captures the call site and timestamp. -// -// The simplest way to use it is via its implementation of a -// github.com/go-logr/logr.LogSink with output through an arbitrary -// "write" function. See New and NewJSON for details. -// -// # Custom LogSinks -// -// For users who need more control, a funcr.Formatter can be embedded inside -// your own custom LogSink implementation. This is useful when the LogSink -// needs to implement additional methods, for example. -// -// # Formatting -// -// This will respect logr.Marshaler, fmt.Stringer, and error interfaces for -// values which are being logged. When rendering a struct, funcr will use Go's -// standard JSON tags (all except "string"). -package funcr - -import ( - "bytes" - "encoding" - "encoding/json" - "fmt" - "path/filepath" - "reflect" - "runtime" - "strconv" - "strings" - "time" - - "github.com/go-logr/logr" -) - -// New returns a logr.Logger which is implemented by an arbitrary function. -func New(fn func(prefix, args string), opts Options) logr.Logger { - return logr.New(newSink(fn, NewFormatter(opts))) -} - -// NewJSON returns a logr.Logger which is implemented by an arbitrary function -// and produces JSON output. -func NewJSON(fn func(obj string), opts Options) logr.Logger { - fnWrapper := func(_, obj string) { - fn(obj) - } - return logr.New(newSink(fnWrapper, NewFormatterJSON(opts))) -} - -// Underlier exposes access to the underlying logging function. Since -// callers only have a logr.Logger, they have to know which -// implementation is in use, so this interface is less of an -// abstraction and more of a way to test type conversion. -type Underlier interface { - GetUnderlying() func(prefix, args string) -} - -func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink { - l := &fnlogger{ - Formatter: formatter, - write: fn, - } - // For skipping fnlogger.Info and fnlogger.Error. - l.AddCallDepth(1) // via Formatter - return l -} - -// Options carries parameters which influence the way logs are generated. -type Options struct { - // LogCaller tells funcr to add a "caller" key to some or all log lines. - // This has some overhead, so some users might not want it. - LogCaller MessageClass - - // LogCallerFunc tells funcr to also log the calling function name. This - // has no effect if caller logging is not enabled (see Options.LogCaller). - LogCallerFunc bool - - // LogTimestamp tells funcr to add a "ts" key to log lines. This has some - // overhead, so some users might not want it. - LogTimestamp bool - - // TimestampFormat tells funcr how to render timestamps when LogTimestamp - // is enabled. If not specified, a default format will be used. For more - // details, see docs for Go's time.Layout. - TimestampFormat string - - // LogInfoLevel tells funcr what key to use to log the info level. - // If not specified, the info level will be logged as "level". - // If this is set to "", the info level will not be logged at all. - LogInfoLevel *string - - // Verbosity tells funcr which V logs to produce. Higher values enable - // more logs. Info logs at or below this level will be written, while logs - // above this level will be discarded. - Verbosity int - - // RenderBuiltinsHook allows users to mutate the list of key-value pairs - // while a log line is being rendered. The kvList argument follows logr - // conventions - each pair of slice elements is comprised of a string key - // and an arbitrary value (verified and sanitized before calling this - // hook). The value returned must follow the same conventions. This hook - // can be used to audit or modify logged data. For example, you might want - // to prefix all of funcr's built-in keys with some string. This hook is - // only called for built-in (provided by funcr itself) key-value pairs. - // Equivalent hooks are offered for key-value pairs saved via - // logr.Logger.WithValues or Formatter.AddValues (see RenderValuesHook) and - // for user-provided pairs (see RenderArgsHook). - RenderBuiltinsHook func(kvList []any) []any - - // RenderValuesHook is the same as RenderBuiltinsHook, except that it is - // only called for key-value pairs saved via logr.Logger.WithValues. See - // RenderBuiltinsHook for more details. - RenderValuesHook func(kvList []any) []any - - // RenderArgsHook is the same as RenderBuiltinsHook, except that it is only - // called for key-value pairs passed directly to Info and Error. See - // RenderBuiltinsHook for more details. - RenderArgsHook func(kvList []any) []any - - // MaxLogDepth tells funcr how many levels of nested fields (e.g. a struct - // that contains a struct, etc.) it may log. Every time it finds a struct, - // slice, array, or map the depth is increased by one. When the maximum is - // reached, the value will be converted to a string indicating that the max - // depth has been exceeded. If this field is not specified, a default - // value will be used. - MaxLogDepth int -} - -// MessageClass indicates which category or categories of messages to consider. -type MessageClass int - -const ( - // None ignores all message classes. - None MessageClass = iota - // All considers all message classes. - All - // Info only considers info messages. - Info - // Error only considers error messages. - Error -) - -// fnlogger inherits some of its LogSink implementation from Formatter -// and just needs to add some glue code. -type fnlogger struct { - Formatter - write func(prefix, args string) -} - -func (l fnlogger) WithName(name string) logr.LogSink { - l.AddName(name) // via Formatter - return &l -} - -func (l fnlogger) WithValues(kvList ...any) logr.LogSink { - l.AddValues(kvList) // via Formatter - return &l -} - -func (l fnlogger) WithCallDepth(depth int) logr.LogSink { - l.AddCallDepth(depth) // via Formatter - return &l -} - -func (l fnlogger) Info(level int, msg string, kvList ...any) { - prefix, args := l.FormatInfo(level, msg, kvList) - l.write(prefix, args) -} - -func (l fnlogger) Error(err error, msg string, kvList ...any) { - prefix, args := l.FormatError(err, msg, kvList) - l.write(prefix, args) -} - -func (l fnlogger) GetUnderlying() func(prefix, args string) { - return l.write -} - -// Assert conformance to the interfaces. -var _ logr.LogSink = &fnlogger{} -var _ logr.CallDepthLogSink = &fnlogger{} -var _ Underlier = &fnlogger{} - -// NewFormatter constructs a Formatter which emits a JSON-like key=value format. -func NewFormatter(opts Options) Formatter { - return newFormatter(opts, outputKeyValue) -} - -// NewFormatterJSON constructs a Formatter which emits strict JSON. -func NewFormatterJSON(opts Options) Formatter { - return newFormatter(opts, outputJSON) -} - -// Defaults for Options. -const defaultTimestampFormat = "2006-01-02 15:04:05.000000" -const defaultMaxLogDepth = 16 - -func newFormatter(opts Options, outfmt outputFormat) Formatter { - if opts.TimestampFormat == "" { - opts.TimestampFormat = defaultTimestampFormat - } - if opts.MaxLogDepth == 0 { - opts.MaxLogDepth = defaultMaxLogDepth - } - if opts.LogInfoLevel == nil { - opts.LogInfoLevel = new(string) - *opts.LogInfoLevel = "level" - } - f := Formatter{ - outputFormat: outfmt, - prefix: "", - values: nil, - depth: 0, - opts: &opts, - } - return f -} - -// Formatter is an opaque struct which can be embedded in a LogSink -// implementation. It should be constructed with NewFormatter. Some of -// its methods directly implement logr.LogSink. -type Formatter struct { - outputFormat outputFormat - prefix string - values []any - valuesStr string - depth int - opts *Options - groupName string // for slog groups - groups []groupDef -} - -// outputFormat indicates which outputFormat to use. -type outputFormat int - -const ( - // outputKeyValue emits a JSON-like key=value format, but not strict JSON. - outputKeyValue outputFormat = iota - // outputJSON emits strict JSON. - outputJSON -) - -// groupDef represents a saved group. The values may be empty, but we don't -// know if we need to render the group until the final record is rendered. -type groupDef struct { - name string - values string -} - -// PseudoStruct is a list of key-value pairs that gets logged as a struct. -type PseudoStruct []any - -// render produces a log line, ready to use. -func (f Formatter) render(builtins, args []any) string { - // Empirically bytes.Buffer is faster than strings.Builder for this. - buf := bytes.NewBuffer(make([]byte, 0, 1024)) - - if f.outputFormat == outputJSON { - buf.WriteByte('{') // for the whole record - } - - // Render builtins - vals := builtins - if hook := f.opts.RenderBuiltinsHook; hook != nil { - vals = hook(f.sanitize(vals)) - } - f.flatten(buf, vals, false) // keys are ours, no need to escape - continuing := len(builtins) > 0 - - // Turn the inner-most group into a string - argsStr := func() string { - buf := bytes.NewBuffer(make([]byte, 0, 1024)) - - vals = args - if hook := f.opts.RenderArgsHook; hook != nil { - vals = hook(f.sanitize(vals)) - } - f.flatten(buf, vals, true) // escape user-provided keys - - return buf.String() - }() - - // Render the stack of groups from the inside out. - bodyStr := f.renderGroup(f.groupName, f.valuesStr, argsStr) - for i := len(f.groups) - 1; i >= 0; i-- { - grp := &f.groups[i] - if grp.values == "" && bodyStr == "" { - // no contents, so we must elide the whole group - continue - } - bodyStr = f.renderGroup(grp.name, grp.values, bodyStr) - } - - if bodyStr != "" { - if continuing { - buf.WriteByte(f.comma()) - } - buf.WriteString(bodyStr) - } - - if f.outputFormat == outputJSON { - buf.WriteByte('}') // for the whole record - } - - return buf.String() -} - -// renderGroup returns a string representation of the named group with rendered -// values and args. If the name is empty, this will return the values and args, -// joined. If the name is not empty, this will return a single key-value pair, -// where the value is a grouping of the values and args. If the values and -// args are both empty, this will return an empty string, even if the name was -// specified. -func (f Formatter) renderGroup(name string, values string, args string) string { - buf := bytes.NewBuffer(make([]byte, 0, 1024)) - - needClosingBrace := false - if name != "" && (values != "" || args != "") { - buf.WriteString(f.quoted(name, true)) // escape user-provided keys - buf.WriteByte(f.colon()) - buf.WriteByte('{') - needClosingBrace = true - } - - continuing := false - if values != "" { - buf.WriteString(values) - continuing = true - } - - if args != "" { - if continuing { - buf.WriteByte(f.comma()) - } - buf.WriteString(args) - } - - if needClosingBrace { - buf.WriteByte('}') - } - - return buf.String() -} - -// flatten renders a list of key-value pairs into a buffer. If escapeKeys is -// true, the keys are assumed to have non-JSON-compatible characters in them -// and must be evaluated for escapes. -// -// This function returns a potentially modified version of kvList, which -// ensures that there is a value for every key (adding a value if needed) and -// that each key is a string (substituting a key if needed). -func (f Formatter) flatten(buf *bytes.Buffer, kvList []any, escapeKeys bool) []any { - // This logic overlaps with sanitize() but saves one type-cast per key, - // which can be measurable. - if len(kvList)%2 != 0 { - kvList = append(kvList, noValue) - } - copied := false - for i := 0; i < len(kvList); i += 2 { - k, ok := kvList[i].(string) - if !ok { - if !copied { - newList := make([]any, len(kvList)) - copy(newList, kvList) - kvList = newList - copied = true - } - k = f.nonStringKey(kvList[i]) - kvList[i] = k - } - v := kvList[i+1] - - if i > 0 { - if f.outputFormat == outputJSON { - buf.WriteByte(f.comma()) - } else { - // In theory the format could be something we don't understand. In - // practice, we control it, so it won't be. - buf.WriteByte(' ') - } - } - - buf.WriteString(f.quoted(k, escapeKeys)) - buf.WriteByte(f.colon()) - buf.WriteString(f.pretty(v)) - } - return kvList -} - -func (f Formatter) quoted(str string, escape bool) string { - if escape { - return prettyString(str) - } - // this is faster - return `"` + str + `"` -} - -func (f Formatter) comma() byte { - if f.outputFormat == outputJSON { - return ',' - } - return ' ' -} - -func (f Formatter) colon() byte { - if f.outputFormat == outputJSON { - return ':' - } - return '=' -} - -func (f Formatter) pretty(value any) string { - return f.prettyWithFlags(value, 0, 0) -} - -const ( - flagRawStruct = 0x1 // do not print braces on structs -) - -// TODO: This is not fast. Most of the overhead goes here. -func (f Formatter) prettyWithFlags(value any, flags uint32, depth int) string { - if depth > f.opts.MaxLogDepth { - return `""` - } - - // Handle types that take full control of logging. - if v, ok := value.(logr.Marshaler); ok { - // Replace the value with what the type wants to get logged. - // That then gets handled below via reflection. - value = invokeMarshaler(v) - } - - // Handle types that want to format themselves. - switch v := value.(type) { - case fmt.Stringer: - value = invokeStringer(v) - case error: - value = invokeError(v) - } - - // Handling the most common types without reflect is a small perf win. - switch v := value.(type) { - case bool: - return strconv.FormatBool(v) - case string: - return prettyString(v) - case int: - return strconv.FormatInt(int64(v), 10) - case int8: - return strconv.FormatInt(int64(v), 10) - case int16: - return strconv.FormatInt(int64(v), 10) - case int32: - return strconv.FormatInt(int64(v), 10) - case int64: - return strconv.FormatInt(int64(v), 10) - case uint: - return strconv.FormatUint(uint64(v), 10) - case uint8: - return strconv.FormatUint(uint64(v), 10) - case uint16: - return strconv.FormatUint(uint64(v), 10) - case uint32: - return strconv.FormatUint(uint64(v), 10) - case uint64: - return strconv.FormatUint(v, 10) - case uintptr: - return strconv.FormatUint(uint64(v), 10) - case float32: - return strconv.FormatFloat(float64(v), 'f', -1, 32) - case float64: - return strconv.FormatFloat(v, 'f', -1, 64) - case complex64: - return `"` + strconv.FormatComplex(complex128(v), 'f', -1, 64) + `"` - case complex128: - return `"` + strconv.FormatComplex(v, 'f', -1, 128) + `"` - case PseudoStruct: - buf := bytes.NewBuffer(make([]byte, 0, 1024)) - v = f.sanitize(v) - if flags&flagRawStruct == 0 { - buf.WriteByte('{') - } - for i := 0; i < len(v); i += 2 { - if i > 0 { - buf.WriteByte(f.comma()) - } - k, _ := v[i].(string) // sanitize() above means no need to check success - // arbitrary keys might need escaping - buf.WriteString(prettyString(k)) - buf.WriteByte(f.colon()) - buf.WriteString(f.prettyWithFlags(v[i+1], 0, depth+1)) - } - if flags&flagRawStruct == 0 { - buf.WriteByte('}') - } - return buf.String() - } - - buf := bytes.NewBuffer(make([]byte, 0, 256)) - t := reflect.TypeOf(value) - if t == nil { - return "null" - } - v := reflect.ValueOf(value) - switch t.Kind() { - case reflect.Bool: - return strconv.FormatBool(v.Bool()) - case reflect.String: - return prettyString(v.String()) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return strconv.FormatInt(int64(v.Int()), 10) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return strconv.FormatUint(uint64(v.Uint()), 10) - case reflect.Float32: - return strconv.FormatFloat(float64(v.Float()), 'f', -1, 32) - case reflect.Float64: - return strconv.FormatFloat(v.Float(), 'f', -1, 64) - case reflect.Complex64: - return `"` + strconv.FormatComplex(complex128(v.Complex()), 'f', -1, 64) + `"` - case reflect.Complex128: - return `"` + strconv.FormatComplex(v.Complex(), 'f', -1, 128) + `"` - case reflect.Struct: - if flags&flagRawStruct == 0 { - buf.WriteByte('{') - } - printComma := false // testing i>0 is not enough because of JSON omitted fields - for i := 0; i < t.NumField(); i++ { - fld := t.Field(i) - if fld.PkgPath != "" { - // reflect says this field is only defined for non-exported fields. - continue - } - if !v.Field(i).CanInterface() { - // reflect isn't clear exactly what this means, but we can't use it. - continue - } - name := "" - omitempty := false - if tag, found := fld.Tag.Lookup("json"); found { - if tag == "-" { - continue - } - if comma := strings.Index(tag, ","); comma != -1 { - if n := tag[:comma]; n != "" { - name = n - } - rest := tag[comma:] - if strings.Contains(rest, ",omitempty,") || strings.HasSuffix(rest, ",omitempty") { - omitempty = true - } - } else { - name = tag - } - } - if omitempty && isEmpty(v.Field(i)) { - continue - } - if printComma { - buf.WriteByte(f.comma()) - } - printComma = true // if we got here, we are rendering a field - if fld.Anonymous && fld.Type.Kind() == reflect.Struct && name == "" { - buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), flags|flagRawStruct, depth+1)) - continue - } - if name == "" { - name = fld.Name - } - // field names can't contain characters which need escaping - buf.WriteString(f.quoted(name, false)) - buf.WriteByte(f.colon()) - buf.WriteString(f.prettyWithFlags(v.Field(i).Interface(), 0, depth+1)) - } - if flags&flagRawStruct == 0 { - buf.WriteByte('}') - } - return buf.String() - case reflect.Slice, reflect.Array: - // If this is outputing as JSON make sure this isn't really a json.RawMessage. - // If so just emit "as-is" and don't pretty it as that will just print - // it as [X,Y,Z,...] which isn't terribly useful vs the string form you really want. - if f.outputFormat == outputJSON { - if rm, ok := value.(json.RawMessage); ok { - // If it's empty make sure we emit an empty value as the array style would below. - if len(rm) > 0 { - buf.Write(rm) - } else { - buf.WriteString("null") - } - return buf.String() - } - } - buf.WriteByte('[') - for i := 0; i < v.Len(); i++ { - if i > 0 { - buf.WriteByte(f.comma()) - } - e := v.Index(i) - buf.WriteString(f.prettyWithFlags(e.Interface(), 0, depth+1)) - } - buf.WriteByte(']') - return buf.String() - case reflect.Map: - buf.WriteByte('{') - // This does not sort the map keys, for best perf. - it := v.MapRange() - i := 0 - for it.Next() { - if i > 0 { - buf.WriteByte(f.comma()) - } - // If a map key supports TextMarshaler, use it. - keystr := "" - if m, ok := it.Key().Interface().(encoding.TextMarshaler); ok { - txt, err := m.MarshalText() - if err != nil { - keystr = fmt.Sprintf("", err.Error()) - } else { - keystr = string(txt) - } - keystr = prettyString(keystr) - } else { - // prettyWithFlags will produce already-escaped values - keystr = f.prettyWithFlags(it.Key().Interface(), 0, depth+1) - if t.Key().Kind() != reflect.String { - // JSON only does string keys. Unlike Go's standard JSON, we'll - // convert just about anything to a string. - keystr = prettyString(keystr) - } - } - buf.WriteString(keystr) - buf.WriteByte(f.colon()) - buf.WriteString(f.prettyWithFlags(it.Value().Interface(), 0, depth+1)) - i++ - } - buf.WriteByte('}') - return buf.String() - case reflect.Ptr, reflect.Interface: - if v.IsNil() { - return "null" - } - return f.prettyWithFlags(v.Elem().Interface(), 0, depth) - } - return fmt.Sprintf(`""`, t.Kind().String()) -} - -func prettyString(s string) string { - // Avoid escaping (which does allocations) if we can. - if needsEscape(s) { - return strconv.Quote(s) - } - b := bytes.NewBuffer(make([]byte, 0, 1024)) - b.WriteByte('"') - b.WriteString(s) - b.WriteByte('"') - return b.String() -} - -// needsEscape determines whether the input string needs to be escaped or not, -// without doing any allocations. -func needsEscape(s string) bool { - for _, r := range s { - if !strconv.IsPrint(r) || r == '\\' || r == '"' { - return true - } - } - return false -} - -func isEmpty(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Complex64, reflect.Complex128: - return v.Complex() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func invokeMarshaler(m logr.Marshaler) (ret any) { - defer func() { - if r := recover(); r != nil { - ret = fmt.Sprintf("", r) - } - }() - return m.MarshalLog() -} - -func invokeStringer(s fmt.Stringer) (ret string) { - defer func() { - if r := recover(); r != nil { - ret = fmt.Sprintf("", r) - } - }() - return s.String() -} - -func invokeError(e error) (ret string) { - defer func() { - if r := recover(); r != nil { - ret = fmt.Sprintf("", r) - } - }() - return e.Error() -} - -// Caller represents the original call site for a log line, after considering -// logr.Logger.WithCallDepth and logr.Logger.WithCallStackHelper. The File and -// Line fields will always be provided, while the Func field is optional. -// Users can set the render hook fields in Options to examine logged key-value -// pairs, one of which will be {"caller", Caller} if the Options.LogCaller -// field is enabled for the given MessageClass. -type Caller struct { - // File is the basename of the file for this call site. - File string `json:"file"` - // Line is the line number in the file for this call site. - Line int `json:"line"` - // Func is the function name for this call site, or empty if - // Options.LogCallerFunc is not enabled. - Func string `json:"function,omitempty"` -} - -func (f Formatter) caller() Caller { - // +1 for this frame, +1 for Info/Error. - pc, file, line, ok := runtime.Caller(f.depth + 2) - if !ok { - return Caller{"", 0, ""} - } - fn := "" - if f.opts.LogCallerFunc { - if fp := runtime.FuncForPC(pc); fp != nil { - fn = fp.Name() - } - } - - return Caller{filepath.Base(file), line, fn} -} - -const noValue = "" - -func (f Formatter) nonStringKey(v any) string { - return fmt.Sprintf("", f.snippet(v)) -} - -// snippet produces a short snippet string of an arbitrary value. -func (f Formatter) snippet(v any) string { - const snipLen = 16 - - snip := f.pretty(v) - if len(snip) > snipLen { - snip = snip[:snipLen] - } - return snip -} - -// sanitize ensures that a list of key-value pairs has a value for every key -// (adding a value if needed) and that each key is a string (substituting a key -// if needed). -func (f Formatter) sanitize(kvList []any) []any { - if len(kvList)%2 != 0 { - kvList = append(kvList, noValue) - } - for i := 0; i < len(kvList); i += 2 { - _, ok := kvList[i].(string) - if !ok { - kvList[i] = f.nonStringKey(kvList[i]) - } - } - return kvList -} - -// startGroup opens a new group scope (basically a sub-struct), which locks all -// the current saved values and starts them anew. This is needed to satisfy -// slog. -func (f *Formatter) startGroup(name string) { - // Unnamed groups are just inlined. - if name == "" { - return - } - - n := len(f.groups) - f.groups = append(f.groups[:n:n], groupDef{f.groupName, f.valuesStr}) - - // Start collecting new values. - f.groupName = name - f.valuesStr = "" - f.values = nil -} - -// Init configures this Formatter from runtime info, such as the call depth -// imposed by logr itself. -// Note that this receiver is a pointer, so depth can be saved. -func (f *Formatter) Init(info logr.RuntimeInfo) { - f.depth += info.CallDepth -} - -// Enabled checks whether an info message at the given level should be logged. -func (f Formatter) Enabled(level int) bool { - return level <= f.opts.Verbosity -} - -// GetDepth returns the current depth of this Formatter. This is useful for -// implementations which do their own caller attribution. -func (f Formatter) GetDepth() int { - return f.depth -} - -// FormatInfo renders an Info log message into strings. The prefix will be -// empty when no names were set (via AddNames), or when the output is -// configured for JSON. -func (f Formatter) FormatInfo(level int, msg string, kvList []any) (prefix, argsStr string) { - args := make([]any, 0, 64) // using a constant here impacts perf - prefix = f.prefix - if f.outputFormat == outputJSON { - args = append(args, "logger", prefix) - prefix = "" - } - if f.opts.LogTimestamp { - args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) - } - if policy := f.opts.LogCaller; policy == All || policy == Info { - args = append(args, "caller", f.caller()) - } - if key := *f.opts.LogInfoLevel; key != "" { - args = append(args, key, level) - } - args = append(args, "msg", msg) - return prefix, f.render(args, kvList) -} - -// FormatError renders an Error log message into strings. The prefix will be -// empty when no names were set (via AddNames), or when the output is -// configured for JSON. -func (f Formatter) FormatError(err error, msg string, kvList []any) (prefix, argsStr string) { - args := make([]any, 0, 64) // using a constant here impacts perf - prefix = f.prefix - if f.outputFormat == outputJSON { - args = append(args, "logger", prefix) - prefix = "" - } - if f.opts.LogTimestamp { - args = append(args, "ts", time.Now().Format(f.opts.TimestampFormat)) - } - if policy := f.opts.LogCaller; policy == All || policy == Error { - args = append(args, "caller", f.caller()) - } - args = append(args, "msg", msg) - var loggableErr any - if err != nil { - loggableErr = err.Error() - } - args = append(args, "error", loggableErr) - return prefix, f.render(args, kvList) -} - -// AddName appends the specified name. funcr uses '/' characters to separate -// name elements. Callers should not pass '/' in the provided name string, but -// this library does not actually enforce that. -func (f *Formatter) AddName(name string) { - if len(f.prefix) > 0 { - f.prefix += "/" - } - f.prefix += name -} - -// AddValues adds key-value pairs to the set of saved values to be logged with -// each log line. -func (f *Formatter) AddValues(kvList []any) { - // Three slice args forces a copy. - n := len(f.values) - f.values = append(f.values[:n:n], kvList...) - - vals := f.values - if hook := f.opts.RenderValuesHook; hook != nil { - vals = hook(f.sanitize(vals)) - } - - // Pre-render values, so we don't have to do it on each Info/Error call. - buf := bytes.NewBuffer(make([]byte, 0, 1024)) - f.flatten(buf, vals, true) // escape user-provided keys - f.valuesStr = buf.String() -} - -// AddCallDepth increases the number of stack-frames to skip when attributing -// the log line to a file and line. -func (f *Formatter) AddCallDepth(depth int) { - f.depth += depth -} diff --git a/vendor/github.com/go-logr/logr/funcr/slogsink.go b/vendor/github.com/go-logr/logr/funcr/slogsink.go deleted file mode 100644 index 7bd84761e2..0000000000 --- a/vendor/github.com/go-logr/logr/funcr/slogsink.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build go1.21 -// +build go1.21 - -/* -Copyright 2023 The logr 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 funcr - -import ( - "context" - "log/slog" - - "github.com/go-logr/logr" -) - -var _ logr.SlogSink = &fnlogger{} - -const extraSlogSinkDepth = 3 // 2 for slog, 1 for SlogSink - -func (l fnlogger) Handle(_ context.Context, record slog.Record) error { - kvList := make([]any, 0, 2*record.NumAttrs()) - record.Attrs(func(attr slog.Attr) bool { - kvList = attrToKVs(attr, kvList) - return true - }) - - if record.Level >= slog.LevelError { - l.WithCallDepth(extraSlogSinkDepth).Error(nil, record.Message, kvList...) - } else { - level := l.levelFromSlog(record.Level) - l.WithCallDepth(extraSlogSinkDepth).Info(level, record.Message, kvList...) - } - return nil -} - -func (l fnlogger) WithAttrs(attrs []slog.Attr) logr.SlogSink { - kvList := make([]any, 0, 2*len(attrs)) - for _, attr := range attrs { - kvList = attrToKVs(attr, kvList) - } - l.AddValues(kvList) - return &l -} - -func (l fnlogger) WithGroup(name string) logr.SlogSink { - l.startGroup(name) - return &l -} - -// attrToKVs appends a slog.Attr to a logr-style kvList. It handle slog Groups -// and other details of slog. -func attrToKVs(attr slog.Attr, kvList []any) []any { - attrVal := attr.Value.Resolve() - if attrVal.Kind() == slog.KindGroup { - groupVal := attrVal.Group() - grpKVs := make([]any, 0, 2*len(groupVal)) - for _, attr := range groupVal { - grpKVs = attrToKVs(attr, grpKVs) - } - if attr.Key == "" { - // slog says we have to inline these - kvList = append(kvList, grpKVs...) - } else { - kvList = append(kvList, attr.Key, PseudoStruct(grpKVs)) - } - } else if attr.Key != "" { - kvList = append(kvList, attr.Key, attrVal.Any()) - } - - return kvList -} - -// levelFromSlog adjusts the level by the logger's verbosity and negates it. -// It ensures that the result is >= 0. This is necessary because the result is -// passed to a LogSink and that API did not historically document whether -// levels could be negative or what that meant. -// -// Some example usage: -// -// logrV0 := getMyLogger() -// logrV2 := logrV0.V(2) -// slogV2 := slog.New(logr.ToSlogHandler(logrV2)) -// slogV2.Debug("msg") // =~ logrV2.V(4) =~ logrV0.V(6) -// slogV2.Info("msg") // =~ logrV2.V(0) =~ logrV0.V(2) -// slogv2.Warn("msg") // =~ logrV2.V(-4) =~ logrV0.V(0) -func (l fnlogger) levelFromSlog(level slog.Level) int { - result := -level - if result < 0 { - result = 0 // because LogSink doesn't expect negative V levels - } - return int(result) -} diff --git a/vendor/github.com/go-logr/stdr/LICENSE b/vendor/github.com/go-logr/stdr/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/github.com/go-logr/stdr/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/go-logr/stdr/README.md b/vendor/github.com/go-logr/stdr/README.md deleted file mode 100644 index 5158667890..0000000000 --- a/vendor/github.com/go-logr/stdr/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# Minimal Go logging using logr and Go's standard library - -[![Go Reference](https://pkg.go.dev/badge/github.com/go-logr/stdr.svg)](https://pkg.go.dev/github.com/go-logr/stdr) - -This package implements the [logr interface](https://github.com/go-logr/logr) -in terms of Go's standard log package(https://pkg.go.dev/log). diff --git a/vendor/github.com/go-logr/stdr/stdr.go b/vendor/github.com/go-logr/stdr/stdr.go deleted file mode 100644 index 93a8aab51b..0000000000 --- a/vendor/github.com/go-logr/stdr/stdr.go +++ /dev/null @@ -1,170 +0,0 @@ -/* -Copyright 2019 The logr 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 stdr implements github.com/go-logr/logr.Logger in terms of -// Go's standard log package. -package stdr - -import ( - "log" - "os" - - "github.com/go-logr/logr" - "github.com/go-logr/logr/funcr" -) - -// The global verbosity level. See SetVerbosity(). -var globalVerbosity int - -// SetVerbosity sets the global level against which all info logs will be -// compared. If this is greater than or equal to the "V" of the logger, the -// message will be logged. A higher value here means more logs will be written. -// The previous verbosity value is returned. This is not concurrent-safe - -// callers must be sure to call it from only one goroutine. -func SetVerbosity(v int) int { - old := globalVerbosity - globalVerbosity = v - return old -} - -// New returns a logr.Logger which is implemented by Go's standard log package, -// or something like it. If std is nil, this will use a default logger -// instead. -// -// Example: stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile))) -func New(std StdLogger) logr.Logger { - return NewWithOptions(std, Options{}) -} - -// NewWithOptions returns a logr.Logger which is implemented by Go's standard -// log package, or something like it. See New for details. -func NewWithOptions(std StdLogger, opts Options) logr.Logger { - if std == nil { - // Go's log.Default() is only available in 1.16 and higher. - std = log.New(os.Stderr, "", log.LstdFlags) - } - - if opts.Depth < 0 { - opts.Depth = 0 - } - - fopts := funcr.Options{ - LogCaller: funcr.MessageClass(opts.LogCaller), - } - - sl := &logger{ - Formatter: funcr.NewFormatter(fopts), - std: std, - } - - // For skipping our own logger.Info/Error. - sl.Formatter.AddCallDepth(1 + opts.Depth) - - return logr.New(sl) -} - -// Options carries parameters which influence the way logs are generated. -type Options struct { - // Depth biases the assumed number of call frames to the "true" caller. - // This is useful when the calling code calls a function which then calls - // stdr (e.g. a logging shim to another API). Values less than zero will - // be treated as zero. - Depth int - - // LogCaller tells stdr to add a "caller" key to some or all log lines. - // Go's log package has options to log this natively, too. - LogCaller MessageClass - - // TODO: add an option to log the date/time -} - -// MessageClass indicates which category or categories of messages to consider. -type MessageClass int - -const ( - // None ignores all message classes. - None MessageClass = iota - // All considers all message classes. - All - // Info only considers info messages. - Info - // Error only considers error messages. - Error -) - -// StdLogger is the subset of the Go stdlib log.Logger API that is needed for -// this adapter. -type StdLogger interface { - // Output is the same as log.Output and log.Logger.Output. - Output(calldepth int, logline string) error -} - -type logger struct { - funcr.Formatter - std StdLogger -} - -var _ logr.LogSink = &logger{} -var _ logr.CallDepthLogSink = &logger{} - -func (l logger) Enabled(level int) bool { - return globalVerbosity >= level -} - -func (l logger) Info(level int, msg string, kvList ...interface{}) { - prefix, args := l.FormatInfo(level, msg, kvList) - if prefix != "" { - args = prefix + ": " + args - } - _ = l.std.Output(l.Formatter.GetDepth()+1, args) -} - -func (l logger) Error(err error, msg string, kvList ...interface{}) { - prefix, args := l.FormatError(err, msg, kvList) - if prefix != "" { - args = prefix + ": " + args - } - _ = l.std.Output(l.Formatter.GetDepth()+1, args) -} - -func (l logger) WithName(name string) logr.LogSink { - l.Formatter.AddName(name) - return &l -} - -func (l logger) WithValues(kvList ...interface{}) logr.LogSink { - l.Formatter.AddValues(kvList) - return &l -} - -func (l logger) WithCallDepth(depth int) logr.LogSink { - l.Formatter.AddCallDepth(depth) - return &l -} - -// Underlier exposes access to the underlying logging implementation. Since -// callers only have a logr.Logger, they have to know which implementation is -// in use, so this interface is less of an abstraction and more of way to test -// type conversion. -type Underlier interface { - GetUnderlying() StdLogger -} - -// GetUnderlying returns the StdLogger underneath this logger. Since StdLogger -// is itself an interface, the result may or may not be a Go log.Logger. -func (l logger) GetUnderlying() StdLogger { - return l.std -} diff --git a/vendor/github.com/go-ole/go-ole/.travis.yml b/vendor/github.com/go-ole/go-ole/.travis.yml deleted file mode 100644 index 28f740cd5d..0000000000 --- a/vendor/github.com/go-ole/go-ole/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: go -sudo: false - -go: - - 1.9.x - - 1.10.x - - 1.11.x - - tip diff --git a/vendor/github.com/go-ole/go-ole/ChangeLog.md b/vendor/github.com/go-ole/go-ole/ChangeLog.md deleted file mode 100644 index 4ba6a8c64d..0000000000 --- a/vendor/github.com/go-ole/go-ole/ChangeLog.md +++ /dev/null @@ -1,49 +0,0 @@ -# Version 1.x.x - -* **Add more test cases and reference new test COM server project.** (Placeholder for future additions) - -# Version 1.2.0-alphaX - -**Minimum supported version is now Go 1.4. Go 1.1 support is deprecated, but should still build.** - - * Added CI configuration for Travis-CI and AppVeyor. - * Added test InterfaceID and ClassID for the COM Test Server project. - * Added more inline documentation (#83). - * Added IEnumVARIANT implementation (#88). - * Added IEnumVARIANT test cases (#99, #100, #101). - * Added support for retrieving `time.Time` from VARIANT (#92). - * Added test case for IUnknown (#64). - * Added test case for IDispatch (#64). - * Added test cases for scalar variants (#64, #76). - -# Version 1.1.1 - - * Fixes for Linux build. - * Fixes for Windows build. - -# Version 1.1.0 - -The change to provide building on all platforms is a new feature. The increase in minor version reflects that and allows those who wish to stay on 1.0.x to continue to do so. Support for 1.0.x will be limited to bug fixes. - - * Move GUID out of variables.go into its own file to make new documentation available. - * Move OleError out of ole.go into its own file to make new documentation available. - * Add documentation to utility functions. - * Add documentation to variant receiver functions. - * Add documentation to ole structures. - * Make variant available to other systems outside of Windows. - * Make OLE structures available to other systems outside of Windows. - -## New Features - - * Library should now be built on all platforms supported by Go. Library will NOOP on any platform that is not Windows. - * More functions are now documented and available on godoc.org. - -# Version 1.0.1 - - 1. Fix package references from repository location change. - -# Version 1.0.0 - -This version is stable enough for use. The COM API is still incomplete, but provides enough functionality for accessing COM servers using IDispatch interface. - -There is no changelog for this version. Check commits for history. diff --git a/vendor/github.com/go-ole/go-ole/LICENSE b/vendor/github.com/go-ole/go-ole/LICENSE deleted file mode 100644 index 623ec06f91..0000000000 --- a/vendor/github.com/go-ole/go-ole/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright © 2013-2017 Yasuhiro Matsumoto, - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the “Software”), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/go-ole/go-ole/README.md b/vendor/github.com/go-ole/go-ole/README.md deleted file mode 100644 index 7b577558d1..0000000000 --- a/vendor/github.com/go-ole/go-ole/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Go OLE - -[![Build status](https://ci.appveyor.com/api/projects/status/qr0u2sf7q43us9fj?svg=true)](https://ci.appveyor.com/project/jacobsantos/go-ole-jgs28) -[![Build Status](https://travis-ci.org/go-ole/go-ole.svg?branch=master)](https://travis-ci.org/go-ole/go-ole) -[![GoDoc](https://godoc.org/github.com/go-ole/go-ole?status.svg)](https://godoc.org/github.com/go-ole/go-ole) - -Go bindings for Windows COM using shared libraries instead of cgo. - -By Yasuhiro Matsumoto. - -## Install - -To experiment with go-ole, you can just compile and run the example program: - -``` -go get github.com/go-ole/go-ole -cd /path/to/go-ole/ -go test - -cd /path/to/go-ole/example/excel -go run excel.go -``` - -## Continuous Integration - -Continuous integration configuration has been added for both Travis-CI and AppVeyor. You will have to add these to your own account for your fork in order for it to run. - -**Travis-CI** - -Travis-CI was added to check builds on Linux to ensure that `go get` works when cross building. Currently, Travis-CI is not used to test cross-building, but this may be changed in the future. It is also not currently possible to test the library on Linux, since COM API is specific to Windows and it is not currently possible to run a COM server on Linux or even connect to a remote COM server. - -**AppVeyor** - -AppVeyor is used to build on Windows using the (in-development) test COM server. It is currently only used to test the build and ensure that the code works on Windows. It will be used to register a COM server and then run the test cases based on the test COM server. - -The tests currently do run and do pass and this should be maintained with commits. - -## Versioning - -Go OLE uses [semantic versioning](http://semver.org) for version numbers, which is similar to the version contract of the Go language. Which means that the major version will always maintain backwards compatibility with minor versions. Minor versions will only add new additions and changes. Fixes will always be in patch. - -This contract should allow you to upgrade to new minor and patch versions without breakage or modifications to your existing code. Leave a ticket, if there is breakage, so that it could be fixed. - -## LICENSE - -Under the MIT License: http://mattn.mit-license.org/2013 diff --git a/vendor/github.com/go-ole/go-ole/SECURITY.md b/vendor/github.com/go-ole/go-ole/SECURITY.md deleted file mode 100644 index dac281523b..0000000000 --- a/vendor/github.com/go-ole/go-ole/SECURITY.md +++ /dev/null @@ -1,13 +0,0 @@ -# Security Policy - -## Supported Versions - -Security updates are applied only to the latest release. - -## Reporting a Vulnerability - -If you have discovered a security vulnerability in this project, please report it privately. **Do not disclose it as a public issue.** This gives us time to work with you to fix the issue before public exposure, reducing the chance that the exploit will be used before a patch is released. - -Please disclose it at [security advisory](https://github.com/go-ole/go-ole/security/advisories/new). - -This project is maintained by a team of volunteers on a reasonable-effort basis. As such, please give us at least 90 days to work on a fix before public exposure. diff --git a/vendor/github.com/go-ole/go-ole/appveyor.yml b/vendor/github.com/go-ole/go-ole/appveyor.yml deleted file mode 100644 index 8df7fa26e3..0000000000 --- a/vendor/github.com/go-ole/go-ole/appveyor.yml +++ /dev/null @@ -1,68 +0,0 @@ -# Notes: -# - Minimal appveyor.yml file is an empty file. All sections are optional. -# - Indent each level of configuration with 2 spaces. Do not use tabs! -# - All section names are case-sensitive. -# - Section names should be unique on each level. - -version: "1.3.0.{build}-alpha-{branch}" - -os: Visual Studio 2019 - -build: off - -skip_tags: true - -clone_folder: c:\gopath\src\github.com\go-ole\go-ole - -environment: - GOPATH: c:\gopath - GOROOT: c:\go - DOWNLOADPLATFORM: "x64" - -before_test: - # - Download COM Server - - ps: Start-FileDownload "https://github.com/go-ole/test-com-server/releases/download/v1.0.2/test-com-server-${env:DOWNLOADPLATFORM}.zip" - - 7z e test-com-server-%DOWNLOADPLATFORM%.zip -oc:\gopath\src\github.com\go-ole\go-ole > NUL - - c:\gopath\src\github.com\go-ole\go-ole\build\register-assembly.bat - -test_script: - - go test -v -cover ./... - # go vet has false positives on unsafe.Pointer with windows/sys. Disabling since it is recommended to use go test instead. - # - go vet ./... - -branches: - only: - - master - - v1.2 - - v1.1 - - v1.0 - -matrix: - allow_failures: - - environment: - GOROOT: C:\go-x86 - DOWNLOADPLATFORM: "x86" - - environment: - GOROOT: C:\go118 - DOWNLOADPLATFORM: "x64" - - environment: - GOROOT: C:\go118-x86 - DOWNLOADPLATFORM: "x86" - -install: - - go version - - go env - - go get -u golang.org/x/tools/cmd/cover - - go get -u golang.org/x/tools/cmd/godoc - - go get -u golang.org/x/tools/cmd/stringer - -build_script: - - cd c:\gopath\src\github.com\go-ole\go-ole - - go get -v -t ./... - - go build - -# disable automatic tests -test: on - -# disable deployment -deploy: off diff --git a/vendor/github.com/go-ole/go-ole/com.go b/vendor/github.com/go-ole/go-ole/com.go deleted file mode 100644 index cabbac0122..0000000000 --- a/vendor/github.com/go-ole/go-ole/com.go +++ /dev/null @@ -1,386 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unicode/utf16" - "unsafe" -) - -var ( - procCoInitialize = modole32.NewProc("CoInitialize") - procCoInitializeEx = modole32.NewProc("CoInitializeEx") - procCoInitializeSecurity = modole32.NewProc("CoInitializeSecurity") - procCoUninitialize = modole32.NewProc("CoUninitialize") - procCoCreateInstance = modole32.NewProc("CoCreateInstance") - procCoTaskMemFree = modole32.NewProc("CoTaskMemFree") - procCLSIDFromProgID = modole32.NewProc("CLSIDFromProgID") - procCLSIDFromString = modole32.NewProc("CLSIDFromString") - procStringFromCLSID = modole32.NewProc("StringFromCLSID") - procStringFromIID = modole32.NewProc("StringFromIID") - procIIDFromString = modole32.NewProc("IIDFromString") - procCoGetObject = modole32.NewProc("CoGetObject") - procGetUserDefaultLCID = modkernel32.NewProc("GetUserDefaultLCID") - procCopyMemory = modkernel32.NewProc("RtlMoveMemory") - procVariantInit = modoleaut32.NewProc("VariantInit") - procVariantClear = modoleaut32.NewProc("VariantClear") - procVariantTimeToSystemTime = modoleaut32.NewProc("VariantTimeToSystemTime") - procSysAllocString = modoleaut32.NewProc("SysAllocString") - procSysAllocStringLen = modoleaut32.NewProc("SysAllocStringLen") - procSysFreeString = modoleaut32.NewProc("SysFreeString") - procSysStringLen = modoleaut32.NewProc("SysStringLen") - procCreateDispTypeInfo = modoleaut32.NewProc("CreateDispTypeInfo") - procCreateStdDispatch = modoleaut32.NewProc("CreateStdDispatch") - procGetActiveObject = modoleaut32.NewProc("GetActiveObject") - - procGetMessageW = moduser32.NewProc("GetMessageW") - procDispatchMessageW = moduser32.NewProc("DispatchMessageW") -) - -// This is to enable calling COM Security initialization multiple times -var bSecurityInit bool = false - -// coInitialize initializes COM library on current thread. -// -// MSDN documentation suggests that this function should not be called. Call -// CoInitializeEx() instead. The reason has to do with threading and this -// function is only for single-threaded apartments. -// -// That said, most users of the library have gotten away with just this -// function. If you are experiencing threading issues, then use -// CoInitializeEx(). -func coInitialize() (err error) { - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms678543(v=vs.85).aspx - // Suggests that no value should be passed to CoInitialized. - // Could just be Call() since the parameter is optional. <-- Needs testing to be sure. - hr, _, _ := procCoInitialize.Call(uintptr(0)) - if hr != 0 { - err = NewError(hr) - } - return -} - -// coInitializeEx initializes COM library with concurrency model. -func coInitializeEx(coinit uint32) (err error) { - // http://msdn.microsoft.com/en-us/library/windows/desktop/ms695279(v=vs.85).aspx - // Suggests that the first parameter is not only optional but should always be NULL. - hr, _, _ := procCoInitializeEx.Call(uintptr(0), uintptr(coinit)) - if hr != 0 { - err = NewError(hr) - } - return -} - -// coInitializeSecurity: Registers security and sets the default security values -// for the process. -func coInitializeSecurity(cAuthSvc int32, - dwAuthnLevel uint32, - dwImpLevel uint32, - dwCapabilities uint32) (err error) { - // Check COM Security initialization has done previously - if !bSecurityInit { - // https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-coinitializesecurity - hr, _, _ := procCoInitializeSecurity.Call( - uintptr(0), // Allow *all* VSS writers to communicate back! - uintptr(cAuthSvc), // Default COM authentication service - uintptr(0), // Default COM authorization service - uintptr(0), // Reserved parameter - uintptr(dwAuthnLevel), // Strongest COM authentication level - uintptr(dwImpLevel), // Minimal impersonation abilities - uintptr(0), // Default COM authentication settings - uintptr(dwCapabilities), // Cloaking - uintptr(0)) // eserved parameter - if hr != 0 { - err = NewError(hr) - } else { - // COM Security initialization done make global flag true. - bSecurityInit = true - } - } - return -} - -// CoInitialize initializes COM library on current thread. -// -// MSDN documentation suggests that this function should not be called. Call -// CoInitializeEx() instead. The reason has to do with threading and this -// function is only for single-threaded apartments. -// -// That said, most users of the library have gotten away with just this -// function. If you are experiencing threading issues, then use -// CoInitializeEx(). -func CoInitialize(p uintptr) (err error) { - // p is ignored and won't be used. - // Avoid any variable not used errors. - p = uintptr(0) - return coInitialize() -} - -// CoInitializeEx initializes COM library with concurrency model. -func CoInitializeEx(p uintptr, coinit uint32) (err error) { - // Avoid any variable not used errors. - p = uintptr(0) - return coInitializeEx(coinit) -} - -// CoUninitialize uninitializes COM Library. -func CoUninitialize() { - procCoUninitialize.Call() -} - -// CoInitializeSecurity: Registers security and sets the default security values -// for the process. -func CoInitializeSecurity(cAuthSvc int32, - dwAuthnLevel uint32, - dwImpLevel uint32, - dwCapabilities uint32) (err error) { - return coInitializeSecurity(cAuthSvc, dwAuthnLevel, dwImpLevel, dwCapabilities) -} - -// CoTaskMemFree frees memory pointer. -func CoTaskMemFree(memptr uintptr) { - procCoTaskMemFree.Call(memptr) -} - -// CLSIDFromProgID retrieves Class Identifier with the given Program Identifier. -// -// The Programmatic Identifier must be registered, because it will be looked up -// in the Windows Registry. The registry entry has the following keys: CLSID, -// Insertable, Protocol and Shell -// (https://msdn.microsoft.com/en-us/library/dd542719(v=vs.85).aspx). -// -// programID identifies the class id with less precision and is not guaranteed -// to be unique. These are usually found in the registry under -// HKEY_LOCAL_MACHINE\SOFTWARE\Classes, usually with the format of -// "Program.Component.Version" with version being optional. -// -// CLSIDFromProgID in Windows API. -func CLSIDFromProgID(progId string) (clsid *GUID, err error) { - var guid GUID - lpszProgID := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(progId))) - hr, _, _ := procCLSIDFromProgID.Call(lpszProgID, uintptr(unsafe.Pointer(&guid))) - if hr != 0 { - err = NewError(hr) - } - clsid = &guid - return -} - -// CLSIDFromString retrieves Class ID from string representation. -// -// This is technically the string version of the GUID and will convert the -// string to object. -// -// CLSIDFromString in Windows API. -func CLSIDFromString(str string) (clsid *GUID, err error) { - var guid GUID - lpsz := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(str))) - hr, _, _ := procCLSIDFromString.Call(lpsz, uintptr(unsafe.Pointer(&guid))) - if hr != 0 { - err = NewError(hr) - } - clsid = &guid - return -} - -// StringFromCLSID returns GUID formated string from GUID object. -func StringFromCLSID(clsid *GUID) (str string, err error) { - var p *uint16 - hr, _, _ := procStringFromCLSID.Call(uintptr(unsafe.Pointer(clsid)), uintptr(unsafe.Pointer(&p))) - if hr != 0 { - err = NewError(hr) - } - str = LpOleStrToString(p) - return -} - -// IIDFromString returns GUID from program ID. -func IIDFromString(progId string) (clsid *GUID, err error) { - var guid GUID - lpsz := uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(progId))) - hr, _, _ := procIIDFromString.Call(lpsz, uintptr(unsafe.Pointer(&guid))) - if hr != 0 { - err = NewError(hr) - } - clsid = &guid - return -} - -// StringFromIID returns GUID formatted string from GUID object. -func StringFromIID(iid *GUID) (str string, err error) { - var p *uint16 - hr, _, _ := procStringFromIID.Call(uintptr(unsafe.Pointer(iid)), uintptr(unsafe.Pointer(&p))) - if hr != 0 { - err = NewError(hr) - } - str = LpOleStrToString(p) - return -} - -// CreateInstance of single uninitialized object with GUID. -func CreateInstance(clsid *GUID, iid *GUID) (unk *IUnknown, err error) { - if iid == nil { - iid = IID_IUnknown - } - hr, _, _ := procCoCreateInstance.Call( - uintptr(unsafe.Pointer(clsid)), - 0, - CLSCTX_SERVER, - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(&unk))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// GetActiveObject retrieves pointer to active object. -func GetActiveObject(clsid *GUID, iid *GUID) (unk *IUnknown, err error) { - if iid == nil { - iid = IID_IUnknown - } - hr, _, _ := procGetActiveObject.Call( - uintptr(unsafe.Pointer(clsid)), - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(&unk))) - if hr != 0 { - err = NewError(hr) - } - return -} - -type BindOpts struct { - CbStruct uint32 - GrfFlags uint32 - GrfMode uint32 - TickCountDeadline uint32 -} - -// GetObject retrieves pointer to active object. -func GetObject(programID string, bindOpts *BindOpts, iid *GUID) (unk *IUnknown, err error) { - if bindOpts != nil { - bindOpts.CbStruct = uint32(unsafe.Sizeof(BindOpts{})) - } - if iid == nil { - iid = IID_IUnknown - } - hr, _, _ := procCoGetObject.Call( - uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(programID))), - uintptr(unsafe.Pointer(bindOpts)), - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(&unk))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// VariantInit initializes variant. -func VariantInit(v *VARIANT) (err error) { - hr, _, _ := procVariantInit.Call(uintptr(unsafe.Pointer(v))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// VariantClear clears value in Variant settings to VT_EMPTY. -func VariantClear(v *VARIANT) (err error) { - hr, _, _ := procVariantClear.Call(uintptr(unsafe.Pointer(v))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// SysAllocString allocates memory for string and copies string into memory. -func SysAllocString(v string) (ss *int16) { - pss, _, _ := procSysAllocString.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(v)))) - ss = (*int16)(unsafe.Pointer(pss)) - return -} - -// SysAllocStringLen copies up to length of given string returning pointer. -func SysAllocStringLen(v string) (ss *int16) { - utf16 := utf16.Encode([]rune(v + "\x00")) - ptr := &utf16[0] - - pss, _, _ := procSysAllocStringLen.Call(uintptr(unsafe.Pointer(ptr)), uintptr(len(utf16)-1)) - ss = (*int16)(unsafe.Pointer(pss)) - return -} - -// SysFreeString frees string system memory. This must be called with SysAllocString. -func SysFreeString(v *int16) (err error) { - hr, _, _ := procSysFreeString.Call(uintptr(unsafe.Pointer(v))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// SysStringLen is the length of the system allocated string. -func SysStringLen(v *int16) uint32 { - l, _, _ := procSysStringLen.Call(uintptr(unsafe.Pointer(v))) - return uint32(l) -} - -// CreateStdDispatch provides default IDispatch implementation for IUnknown. -// -// This handles default IDispatch implementation for objects. It haves a few -// limitations with only supporting one language. It will also only return -// default exception codes. -func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (disp *IDispatch, err error) { - hr, _, _ := procCreateStdDispatch.Call( - uintptr(unsafe.Pointer(unk)), - v, - uintptr(unsafe.Pointer(ptinfo)), - uintptr(unsafe.Pointer(&disp))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// CreateDispTypeInfo provides default ITypeInfo implementation for IDispatch. -// -// This will not handle the full implementation of the interface. -func CreateDispTypeInfo(idata *INTERFACEDATA) (pptinfo *IUnknown, err error) { - hr, _, _ := procCreateDispTypeInfo.Call( - uintptr(unsafe.Pointer(idata)), - uintptr(GetUserDefaultLCID()), - uintptr(unsafe.Pointer(&pptinfo))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// copyMemory moves location of a block of memory. -func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) { - procCopyMemory.Call(uintptr(dest), uintptr(src), uintptr(length)) -} - -// GetUserDefaultLCID retrieves current user default locale. -func GetUserDefaultLCID() (lcid uint32) { - ret, _, _ := procGetUserDefaultLCID.Call() - lcid = uint32(ret) - return -} - -// GetMessage in message queue from runtime. -// -// This function appears to block. PeekMessage does not block. -func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32) (ret int32, err error) { - r0, _, err := procGetMessageW.Call(uintptr(unsafe.Pointer(msg)), uintptr(hwnd), uintptr(MsgFilterMin), uintptr(MsgFilterMax)) - ret = int32(r0) - return -} - -// DispatchMessage to window procedure. -func DispatchMessage(msg *Msg) (ret int32) { - r0, _, _ := procDispatchMessageW.Call(uintptr(unsafe.Pointer(msg))) - ret = int32(r0) - return -} diff --git a/vendor/github.com/go-ole/go-ole/com_func.go b/vendor/github.com/go-ole/go-ole/com_func.go deleted file mode 100644 index cef539d9dd..0000000000 --- a/vendor/github.com/go-ole/go-ole/com_func.go +++ /dev/null @@ -1,174 +0,0 @@ -// +build !windows - -package ole - -import ( - "time" - "unsafe" -) - -// coInitialize initializes COM library on current thread. -// -// MSDN documentation suggests that this function should not be called. Call -// CoInitializeEx() instead. The reason has to do with threading and this -// function is only for single-threaded apartments. -// -// That said, most users of the library have gotten away with just this -// function. If you are experiencing threading issues, then use -// CoInitializeEx(). -func coInitialize() error { - return NewError(E_NOTIMPL) -} - -// coInitializeEx initializes COM library with concurrency model. -func coInitializeEx(coinit uint32) error { - return NewError(E_NOTIMPL) -} - -// CoInitialize initializes COM library on current thread. -// -// MSDN documentation suggests that this function should not be called. Call -// CoInitializeEx() instead. The reason has to do with threading and this -// function is only for single-threaded apartments. -// -// That said, most users of the library have gotten away with just this -// function. If you are experiencing threading issues, then use -// CoInitializeEx(). -func CoInitialize(p uintptr) error { - return NewError(E_NOTIMPL) -} - -// CoInitializeEx initializes COM library with concurrency model. -func CoInitializeEx(p uintptr, coinit uint32) error { - return NewError(E_NOTIMPL) -} - -// CoUninitialize uninitializes COM Library. -func CoUninitialize() {} - -// CoTaskMemFree frees memory pointer. -func CoTaskMemFree(memptr uintptr) {} - -// CLSIDFromProgID retrieves Class Identifier with the given Program Identifier. -// -// The Programmatic Identifier must be registered, because it will be looked up -// in the Windows Registry. The registry entry has the following keys: CLSID, -// Insertable, Protocol and Shell -// (https://msdn.microsoft.com/en-us/library/dd542719(v=vs.85).aspx). -// -// programID identifies the class id with less precision and is not guaranteed -// to be unique. These are usually found in the registry under -// HKEY_LOCAL_MACHINE\SOFTWARE\Classes, usually with the format of -// "Program.Component.Version" with version being optional. -// -// CLSIDFromProgID in Windows API. -func CLSIDFromProgID(progId string) (*GUID, error) { - return nil, NewError(E_NOTIMPL) -} - -// CLSIDFromString retrieves Class ID from string representation. -// -// This is technically the string version of the GUID and will convert the -// string to object. -// -// CLSIDFromString in Windows API. -func CLSIDFromString(str string) (*GUID, error) { - return nil, NewError(E_NOTIMPL) -} - -// StringFromCLSID returns GUID formated string from GUID object. -func StringFromCLSID(clsid *GUID) (string, error) { - return "", NewError(E_NOTIMPL) -} - -// IIDFromString returns GUID from program ID. -func IIDFromString(progId string) (*GUID, error) { - return nil, NewError(E_NOTIMPL) -} - -// StringFromIID returns GUID formatted string from GUID object. -func StringFromIID(iid *GUID) (string, error) { - return "", NewError(E_NOTIMPL) -} - -// CreateInstance of single uninitialized object with GUID. -func CreateInstance(clsid *GUID, iid *GUID) (*IUnknown, error) { - return nil, NewError(E_NOTIMPL) -} - -// GetActiveObject retrieves pointer to active object. -func GetActiveObject(clsid *GUID, iid *GUID) (*IUnknown, error) { - return nil, NewError(E_NOTIMPL) -} - -// VariantInit initializes variant. -func VariantInit(v *VARIANT) error { - return NewError(E_NOTIMPL) -} - -// VariantClear clears value in Variant settings to VT_EMPTY. -func VariantClear(v *VARIANT) error { - return NewError(E_NOTIMPL) -} - -// SysAllocString allocates memory for string and copies string into memory. -func SysAllocString(v string) *int16 { - u := int16(0) - return &u -} - -// SysAllocStringLen copies up to length of given string returning pointer. -func SysAllocStringLen(v string) *int16 { - u := int16(0) - return &u -} - -// SysFreeString frees string system memory. This must be called with SysAllocString. -func SysFreeString(v *int16) error { - return NewError(E_NOTIMPL) -} - -// SysStringLen is the length of the system allocated string. -func SysStringLen(v *int16) uint32 { - return uint32(0) -} - -// CreateStdDispatch provides default IDispatch implementation for IUnknown. -// -// This handles default IDispatch implementation for objects. It haves a few -// limitations with only supporting one language. It will also only return -// default exception codes. -func CreateStdDispatch(unk *IUnknown, v uintptr, ptinfo *IUnknown) (*IDispatch, error) { - return nil, NewError(E_NOTIMPL) -} - -// CreateDispTypeInfo provides default ITypeInfo implementation for IDispatch. -// -// This will not handle the full implementation of the interface. -func CreateDispTypeInfo(idata *INTERFACEDATA) (*IUnknown, error) { - return nil, NewError(E_NOTIMPL) -} - -// copyMemory moves location of a block of memory. -func copyMemory(dest unsafe.Pointer, src unsafe.Pointer, length uint32) {} - -// GetUserDefaultLCID retrieves current user default locale. -func GetUserDefaultLCID() uint32 { - return uint32(0) -} - -// GetMessage in message queue from runtime. -// -// This function appears to block. PeekMessage does not block. -func GetMessage(msg *Msg, hwnd uint32, MsgFilterMin uint32, MsgFilterMax uint32) (int32, error) { - return int32(0), NewError(E_NOTIMPL) -} - -// DispatchMessage to window procedure. -func DispatchMessage(msg *Msg) int32 { - return int32(0) -} - -func GetVariantDate(value uint64) (time.Time, error) { - return time.Now(), NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/connect.go b/vendor/github.com/go-ole/go-ole/connect.go deleted file mode 100644 index b2ac2ec67a..0000000000 --- a/vendor/github.com/go-ole/go-ole/connect.go +++ /dev/null @@ -1,192 +0,0 @@ -package ole - -// Connection contains IUnknown for fluent interface interaction. -// -// Deprecated. Use oleutil package instead. -type Connection struct { - Object *IUnknown // Access COM -} - -// Initialize COM. -func (*Connection) Initialize() (err error) { - return coInitialize() -} - -// Uninitialize COM. -func (*Connection) Uninitialize() { - CoUninitialize() -} - -// Create IUnknown object based first on ProgId and then from String. -func (c *Connection) Create(progId string) (err error) { - var clsid *GUID - clsid, err = CLSIDFromProgID(progId) - if err != nil { - clsid, err = CLSIDFromString(progId) - if err != nil { - return - } - } - - unknown, err := CreateInstance(clsid, IID_IUnknown) - if err != nil { - return - } - c.Object = unknown - - return -} - -// Release IUnknown object. -func (c *Connection) Release() { - c.Object.Release() -} - -// Load COM object from list of programIDs or strings. -func (c *Connection) Load(names ...string) (errors []error) { - var tempErrors []error = make([]error, len(names)) - var numErrors int = 0 - for _, name := range names { - err := c.Create(name) - if err != nil { - tempErrors = append(tempErrors, err) - numErrors += 1 - continue - } - break - } - - copy(errors, tempErrors[0:numErrors]) - return -} - -// Dispatch returns Dispatch object. -func (c *Connection) Dispatch() (object *Dispatch, err error) { - dispatch, err := c.Object.QueryInterface(IID_IDispatch) - if err != nil { - return - } - object = &Dispatch{dispatch} - return -} - -// Dispatch stores IDispatch object. -type Dispatch struct { - Object *IDispatch // Dispatch object. -} - -// Call method on IDispatch with parameters. -func (d *Dispatch) Call(method string, params ...interface{}) (result *VARIANT, err error) { - id, err := d.GetId(method) - if err != nil { - return - } - - result, err = d.Invoke(id, DISPATCH_METHOD, params) - return -} - -// MustCall method on IDispatch with parameters. -func (d *Dispatch) MustCall(method string, params ...interface{}) (result *VARIANT) { - id, err := d.GetId(method) - if err != nil { - panic(err) - } - - result, err = d.Invoke(id, DISPATCH_METHOD, params) - if err != nil { - panic(err) - } - - return -} - -// Get property on IDispatch with parameters. -func (d *Dispatch) Get(name string, params ...interface{}) (result *VARIANT, err error) { - id, err := d.GetId(name) - if err != nil { - return - } - result, err = d.Invoke(id, DISPATCH_PROPERTYGET, params) - return -} - -// MustGet property on IDispatch with parameters. -func (d *Dispatch) MustGet(name string, params ...interface{}) (result *VARIANT) { - id, err := d.GetId(name) - if err != nil { - panic(err) - } - - result, err = d.Invoke(id, DISPATCH_PROPERTYGET, params) - if err != nil { - panic(err) - } - return -} - -// Set property on IDispatch with parameters. -func (d *Dispatch) Set(name string, params ...interface{}) (result *VARIANT, err error) { - id, err := d.GetId(name) - if err != nil { - return - } - result, err = d.Invoke(id, DISPATCH_PROPERTYPUT, params) - return -} - -// MustSet property on IDispatch with parameters. -func (d *Dispatch) MustSet(name string, params ...interface{}) (result *VARIANT) { - id, err := d.GetId(name) - if err != nil { - panic(err) - } - - result, err = d.Invoke(id, DISPATCH_PROPERTYPUT, params) - if err != nil { - panic(err) - } - return -} - -// GetId retrieves ID of name on IDispatch. -func (d *Dispatch) GetId(name string) (id int32, err error) { - var dispid []int32 - dispid, err = d.Object.GetIDsOfName([]string{name}) - if err != nil { - return - } - id = dispid[0] - return -} - -// GetIds retrieves all IDs of names on IDispatch. -func (d *Dispatch) GetIds(names ...string) (dispid []int32, err error) { - dispid, err = d.Object.GetIDsOfName(names) - return -} - -// Invoke IDispatch on DisplayID of dispatch type with parameters. -// -// There have been problems where if send cascading params..., it would error -// out because the parameters would be empty. -func (d *Dispatch) Invoke(id int32, dispatch int16, params []interface{}) (result *VARIANT, err error) { - if len(params) < 1 { - result, err = d.Object.Invoke(id, dispatch) - } else { - result, err = d.Object.Invoke(id, dispatch, params...) - } - return -} - -// Release IDispatch object. -func (d *Dispatch) Release() { - d.Object.Release() -} - -// Connect initializes COM and attempts to load IUnknown based on given names. -func Connect(names ...string) (connection *Connection) { - connection.Initialize() - connection.Load(names...) - return -} diff --git a/vendor/github.com/go-ole/go-ole/constants.go b/vendor/github.com/go-ole/go-ole/constants.go deleted file mode 100644 index fd0c6d74b0..0000000000 --- a/vendor/github.com/go-ole/go-ole/constants.go +++ /dev/null @@ -1,153 +0,0 @@ -package ole - -const ( - CLSCTX_INPROC_SERVER = 1 - CLSCTX_INPROC_HANDLER = 2 - CLSCTX_LOCAL_SERVER = 4 - CLSCTX_INPROC_SERVER16 = 8 - CLSCTX_REMOTE_SERVER = 16 - CLSCTX_ALL = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER - CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER - CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER -) - -const ( - COINIT_APARTMENTTHREADED = 0x2 - COINIT_MULTITHREADED = 0x0 - COINIT_DISABLE_OLE1DDE = 0x4 - COINIT_SPEED_OVER_MEMORY = 0x8 -) - -const ( - DISPATCH_METHOD = 1 - DISPATCH_PROPERTYGET = 2 - DISPATCH_PROPERTYPUT = 4 - DISPATCH_PROPERTYPUTREF = 8 -) - -const ( - S_OK = 0x00000000 - E_UNEXPECTED = 0x8000FFFF - E_NOTIMPL = 0x80004001 - E_OUTOFMEMORY = 0x8007000E - E_INVALIDARG = 0x80070057 - E_NOINTERFACE = 0x80004002 - E_POINTER = 0x80004003 - E_HANDLE = 0x80070006 - E_ABORT = 0x80004004 - E_FAIL = 0x80004005 - E_ACCESSDENIED = 0x80070005 - E_PENDING = 0x8000000A - - CO_E_CLASSSTRING = 0x800401F3 -) - -const ( - CC_FASTCALL = iota - CC_CDECL - CC_MSCPASCAL - CC_PASCAL = CC_MSCPASCAL - CC_MACPASCAL - CC_STDCALL - CC_FPFASTCALL - CC_SYSCALL - CC_MPWCDECL - CC_MPWPASCAL - CC_MAX = CC_MPWPASCAL -) - -type VT uint16 - -const ( - VT_EMPTY VT = 0x0 - VT_NULL VT = 0x1 - VT_I2 VT = 0x2 - VT_I4 VT = 0x3 - VT_R4 VT = 0x4 - VT_R8 VT = 0x5 - VT_CY VT = 0x6 - VT_DATE VT = 0x7 - VT_BSTR VT = 0x8 - VT_DISPATCH VT = 0x9 - VT_ERROR VT = 0xa - VT_BOOL VT = 0xb - VT_VARIANT VT = 0xc - VT_UNKNOWN VT = 0xd - VT_DECIMAL VT = 0xe - VT_I1 VT = 0x10 - VT_UI1 VT = 0x11 - VT_UI2 VT = 0x12 - VT_UI4 VT = 0x13 - VT_I8 VT = 0x14 - VT_UI8 VT = 0x15 - VT_INT VT = 0x16 - VT_UINT VT = 0x17 - VT_VOID VT = 0x18 - VT_HRESULT VT = 0x19 - VT_PTR VT = 0x1a - VT_SAFEARRAY VT = 0x1b - VT_CARRAY VT = 0x1c - VT_USERDEFINED VT = 0x1d - VT_LPSTR VT = 0x1e - VT_LPWSTR VT = 0x1f - VT_RECORD VT = 0x24 - VT_INT_PTR VT = 0x25 - VT_UINT_PTR VT = 0x26 - VT_FILETIME VT = 0x40 - VT_BLOB VT = 0x41 - VT_STREAM VT = 0x42 - VT_STORAGE VT = 0x43 - VT_STREAMED_OBJECT VT = 0x44 - VT_STORED_OBJECT VT = 0x45 - VT_BLOB_OBJECT VT = 0x46 - VT_CF VT = 0x47 - VT_CLSID VT = 0x48 - VT_BSTR_BLOB VT = 0xfff - VT_VECTOR VT = 0x1000 - VT_ARRAY VT = 0x2000 - VT_BYREF VT = 0x4000 - VT_RESERVED VT = 0x8000 - VT_ILLEGAL VT = 0xffff - VT_ILLEGALMASKED VT = 0xfff - VT_TYPEMASK VT = 0xfff -) - -const ( - DISPID_UNKNOWN = -1 - DISPID_VALUE = 0 - DISPID_PROPERTYPUT = -3 - DISPID_NEWENUM = -4 - DISPID_EVALUATE = -5 - DISPID_CONSTRUCTOR = -6 - DISPID_DESTRUCTOR = -7 - DISPID_COLLECT = -8 -) - -const ( - TKIND_ENUM = 1 - TKIND_RECORD = 2 - TKIND_MODULE = 3 - TKIND_INTERFACE = 4 - TKIND_DISPATCH = 5 - TKIND_COCLASS = 6 - TKIND_ALIAS = 7 - TKIND_UNION = 8 - TKIND_MAX = 9 -) - -// Safe Array Feature Flags - -const ( - FADF_AUTO = 0x0001 - FADF_STATIC = 0x0002 - FADF_EMBEDDED = 0x0004 - FADF_FIXEDSIZE = 0x0010 - FADF_RECORD = 0x0020 - FADF_HAVEIID = 0x0040 - FADF_HAVEVARTYPE = 0x0080 - FADF_BSTR = 0x0100 - FADF_UNKNOWN = 0x0200 - FADF_DISPATCH = 0x0400 - FADF_VARIANT = 0x0800 - FADF_RESERVED = 0xF008 -) diff --git a/vendor/github.com/go-ole/go-ole/error.go b/vendor/github.com/go-ole/go-ole/error.go deleted file mode 100644 index 096b456d3a..0000000000 --- a/vendor/github.com/go-ole/go-ole/error.go +++ /dev/null @@ -1,51 +0,0 @@ -package ole - -// OleError stores COM errors. -type OleError struct { - hr uintptr - description string - subError error -} - -// NewError creates new error with HResult. -func NewError(hr uintptr) *OleError { - return &OleError{hr: hr} -} - -// NewErrorWithDescription creates new COM error with HResult and description. -func NewErrorWithDescription(hr uintptr, description string) *OleError { - return &OleError{hr: hr, description: description} -} - -// NewErrorWithSubError creates new COM error with parent error. -func NewErrorWithSubError(hr uintptr, description string, err error) *OleError { - return &OleError{hr: hr, description: description, subError: err} -} - -// Code is the HResult. -func (v *OleError) Code() uintptr { - return uintptr(v.hr) -} - -// String description, either manually set or format message with error code. -func (v *OleError) String() string { - if v.description != "" { - return errstr(int(v.hr)) + " (" + v.description + ")" - } - return errstr(int(v.hr)) -} - -// Error implements error interface. -func (v *OleError) Error() string { - return v.String() -} - -// Description retrieves error summary, if there is one. -func (v *OleError) Description() string { - return v.description -} - -// SubError returns parent error, if there is one. -func (v *OleError) SubError() error { - return v.subError -} diff --git a/vendor/github.com/go-ole/go-ole/error_func.go b/vendor/github.com/go-ole/go-ole/error_func.go deleted file mode 100644 index 8a2ffaa272..0000000000 --- a/vendor/github.com/go-ole/go-ole/error_func.go +++ /dev/null @@ -1,8 +0,0 @@ -// +build !windows - -package ole - -// errstr converts error code to string. -func errstr(errno int) string { - return "" -} diff --git a/vendor/github.com/go-ole/go-ole/error_windows.go b/vendor/github.com/go-ole/go-ole/error_windows.go deleted file mode 100644 index d0e8e68595..0000000000 --- a/vendor/github.com/go-ole/go-ole/error_windows.go +++ /dev/null @@ -1,24 +0,0 @@ -// +build windows - -package ole - -import ( - "fmt" - "syscall" - "unicode/utf16" -) - -// errstr converts error code to string. -func errstr(errno int) string { - // ask windows for the remaining errors - var flags uint32 = syscall.FORMAT_MESSAGE_FROM_SYSTEM | syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY | syscall.FORMAT_MESSAGE_IGNORE_INSERTS - b := make([]uint16, 300) - n, err := syscall.FormatMessage(flags, 0, uint32(errno), 0, b, nil) - if err != nil { - return fmt.Sprintf("error %d (FormatMessage failed with: %v)", errno, err) - } - // trim terminating \r and \n - for ; n > 0 && (b[n-1] == '\n' || b[n-1] == '\r'); n-- { - } - return string(utf16.Decode(b[:n])) -} diff --git a/vendor/github.com/go-ole/go-ole/guid.go b/vendor/github.com/go-ole/go-ole/guid.go deleted file mode 100644 index 8d20f68fbf..0000000000 --- a/vendor/github.com/go-ole/go-ole/guid.go +++ /dev/null @@ -1,284 +0,0 @@ -package ole - -var ( - // IID_NULL is null Interface ID, used when no other Interface ID is known. - IID_NULL = NewGUID("{00000000-0000-0000-0000-000000000000}") - - // IID_IUnknown is for IUnknown interfaces. - IID_IUnknown = NewGUID("{00000000-0000-0000-C000-000000000046}") - - // IID_IDispatch is for IDispatch interfaces. - IID_IDispatch = NewGUID("{00020400-0000-0000-C000-000000000046}") - - // IID_IEnumVariant is for IEnumVariant interfaces - IID_IEnumVariant = NewGUID("{00020404-0000-0000-C000-000000000046}") - - // IID_IConnectionPointContainer is for IConnectionPointContainer interfaces. - IID_IConnectionPointContainer = NewGUID("{B196B284-BAB4-101A-B69C-00AA00341D07}") - - // IID_IConnectionPoint is for IConnectionPoint interfaces. - IID_IConnectionPoint = NewGUID("{B196B286-BAB4-101A-B69C-00AA00341D07}") - - // IID_IInspectable is for IInspectable interfaces. - IID_IInspectable = NewGUID("{AF86E2E0-B12D-4C6A-9C5A-D7AA65101E90}") - - // IID_IProvideClassInfo is for IProvideClassInfo interfaces. - IID_IProvideClassInfo = NewGUID("{B196B283-BAB4-101A-B69C-00AA00341D07}") -) - -// These are for testing and not part of any library. -var ( - // IID_ICOMTestString is for ICOMTestString interfaces. - // - // {E0133EB4-C36F-469A-9D3D-C66B84BE19ED} - IID_ICOMTestString = NewGUID("{E0133EB4-C36F-469A-9D3D-C66B84BE19ED}") - - // IID_ICOMTestInt8 is for ICOMTestInt8 interfaces. - // - // {BEB06610-EB84-4155-AF58-E2BFF53680B4} - IID_ICOMTestInt8 = NewGUID("{BEB06610-EB84-4155-AF58-E2BFF53680B4}") - - // IID_ICOMTestInt16 is for ICOMTestInt16 interfaces. - // - // {DAA3F9FA-761E-4976-A860-8364CE55F6FC} - IID_ICOMTestInt16 = NewGUID("{DAA3F9FA-761E-4976-A860-8364CE55F6FC}") - - // IID_ICOMTestInt32 is for ICOMTestInt32 interfaces. - // - // {E3DEDEE7-38A2-4540-91D1-2EEF1D8891B0} - IID_ICOMTestInt32 = NewGUID("{E3DEDEE7-38A2-4540-91D1-2EEF1D8891B0}") - - // IID_ICOMTestInt64 is for ICOMTestInt64 interfaces. - // - // {8D437CBC-B3ED-485C-BC32-C336432A1623} - IID_ICOMTestInt64 = NewGUID("{8D437CBC-B3ED-485C-BC32-C336432A1623}") - - // IID_ICOMTestFloat is for ICOMTestFloat interfaces. - // - // {BF1ED004-EA02-456A-AA55-2AC8AC6B054C} - IID_ICOMTestFloat = NewGUID("{BF1ED004-EA02-456A-AA55-2AC8AC6B054C}") - - // IID_ICOMTestDouble is for ICOMTestDouble interfaces. - // - // {BF908A81-8687-4E93-999F-D86FAB284BA0} - IID_ICOMTestDouble = NewGUID("{BF908A81-8687-4E93-999F-D86FAB284BA0}") - - // IID_ICOMTestBoolean is for ICOMTestBoolean interfaces. - // - // {D530E7A6-4EE8-40D1-8931-3D63B8605010} - IID_ICOMTestBoolean = NewGUID("{D530E7A6-4EE8-40D1-8931-3D63B8605010}") - - // IID_ICOMEchoTestObject is for ICOMEchoTestObject interfaces. - // - // {6485B1EF-D780-4834-A4FE-1EBB51746CA3} - IID_ICOMEchoTestObject = NewGUID("{6485B1EF-D780-4834-A4FE-1EBB51746CA3}") - - // IID_ICOMTestTypes is for ICOMTestTypes interfaces. - // - // {CCA8D7AE-91C0-4277-A8B3-FF4EDF28D3C0} - IID_ICOMTestTypes = NewGUID("{CCA8D7AE-91C0-4277-A8B3-FF4EDF28D3C0}") - - // CLSID_COMEchoTestObject is for COMEchoTestObject class. - // - // {3C24506A-AE9E-4D50-9157-EF317281F1B0} - CLSID_COMEchoTestObject = NewGUID("{3C24506A-AE9E-4D50-9157-EF317281F1B0}") - - // CLSID_COMTestScalarClass is for COMTestScalarClass class. - // - // {865B85C5-0334-4AC6-9EF6-AACEC8FC5E86} - CLSID_COMTestScalarClass = NewGUID("{865B85C5-0334-4AC6-9EF6-AACEC8FC5E86}") -) - -const hextable = "0123456789ABCDEF" -const emptyGUID = "{00000000-0000-0000-0000-000000000000}" - -// GUID is Windows API specific GUID type. -// -// This exists to match Windows GUID type for direct passing for COM. -// Format is in xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx. -type GUID struct { - Data1 uint32 - Data2 uint16 - Data3 uint16 - Data4 [8]byte -} - -// NewGUID converts the given string into a globally unique identifier that is -// compliant with the Windows API. -// -// The supplied string may be in any of these formats: -// -// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX -// XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX -// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -// -// The conversion of the supplied string is not case-sensitive. -func NewGUID(guid string) *GUID { - d := []byte(guid) - var d1, d2, d3, d4a, d4b []byte - - switch len(d) { - case 38: - if d[0] != '{' || d[37] != '}' { - return nil - } - d = d[1:37] - fallthrough - case 36: - if d[8] != '-' || d[13] != '-' || d[18] != '-' || d[23] != '-' { - return nil - } - d1 = d[0:8] - d2 = d[9:13] - d3 = d[14:18] - d4a = d[19:23] - d4b = d[24:36] - case 32: - d1 = d[0:8] - d2 = d[8:12] - d3 = d[12:16] - d4a = d[16:20] - d4b = d[20:32] - default: - return nil - } - - var g GUID - var ok1, ok2, ok3, ok4 bool - g.Data1, ok1 = decodeHexUint32(d1) - g.Data2, ok2 = decodeHexUint16(d2) - g.Data3, ok3 = decodeHexUint16(d3) - g.Data4, ok4 = decodeHexByte64(d4a, d4b) - if ok1 && ok2 && ok3 && ok4 { - return &g - } - return nil -} - -func decodeHexUint32(src []byte) (value uint32, ok bool) { - var b1, b2, b3, b4 byte - var ok1, ok2, ok3, ok4 bool - b1, ok1 = decodeHexByte(src[0], src[1]) - b2, ok2 = decodeHexByte(src[2], src[3]) - b3, ok3 = decodeHexByte(src[4], src[5]) - b4, ok4 = decodeHexByte(src[6], src[7]) - value = (uint32(b1) << 24) | (uint32(b2) << 16) | (uint32(b3) << 8) | uint32(b4) - ok = ok1 && ok2 && ok3 && ok4 - return -} - -func decodeHexUint16(src []byte) (value uint16, ok bool) { - var b1, b2 byte - var ok1, ok2 bool - b1, ok1 = decodeHexByte(src[0], src[1]) - b2, ok2 = decodeHexByte(src[2], src[3]) - value = (uint16(b1) << 8) | uint16(b2) - ok = ok1 && ok2 - return -} - -func decodeHexByte64(s1 []byte, s2 []byte) (value [8]byte, ok bool) { - var ok1, ok2, ok3, ok4, ok5, ok6, ok7, ok8 bool - value[0], ok1 = decodeHexByte(s1[0], s1[1]) - value[1], ok2 = decodeHexByte(s1[2], s1[3]) - value[2], ok3 = decodeHexByte(s2[0], s2[1]) - value[3], ok4 = decodeHexByte(s2[2], s2[3]) - value[4], ok5 = decodeHexByte(s2[4], s2[5]) - value[5], ok6 = decodeHexByte(s2[6], s2[7]) - value[6], ok7 = decodeHexByte(s2[8], s2[9]) - value[7], ok8 = decodeHexByte(s2[10], s2[11]) - ok = ok1 && ok2 && ok3 && ok4 && ok5 && ok6 && ok7 && ok8 - return -} - -func decodeHexByte(c1, c2 byte) (value byte, ok bool) { - var n1, n2 byte - var ok1, ok2 bool - n1, ok1 = decodeHexChar(c1) - n2, ok2 = decodeHexChar(c2) - value = (n1 << 4) | n2 - ok = ok1 && ok2 - return -} - -func decodeHexChar(c byte) (byte, bool) { - switch { - case '0' <= c && c <= '9': - return c - '0', true - case 'a' <= c && c <= 'f': - return c - 'a' + 10, true - case 'A' <= c && c <= 'F': - return c - 'A' + 10, true - } - - return 0, false -} - -// String converts the GUID to string form. It will adhere to this pattern: -// -// {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX} -// -// If the GUID is nil, the string representation of an empty GUID is returned: -// -// {00000000-0000-0000-0000-000000000000} -func (guid *GUID) String() string { - if guid == nil { - return emptyGUID - } - - var c [38]byte - c[0] = '{' - putUint32Hex(c[1:9], guid.Data1) - c[9] = '-' - putUint16Hex(c[10:14], guid.Data2) - c[14] = '-' - putUint16Hex(c[15:19], guid.Data3) - c[19] = '-' - putByteHex(c[20:24], guid.Data4[0:2]) - c[24] = '-' - putByteHex(c[25:37], guid.Data4[2:8]) - c[37] = '}' - return string(c[:]) -} - -func putUint32Hex(b []byte, v uint32) { - b[0] = hextable[byte(v>>24)>>4] - b[1] = hextable[byte(v>>24)&0x0f] - b[2] = hextable[byte(v>>16)>>4] - b[3] = hextable[byte(v>>16)&0x0f] - b[4] = hextable[byte(v>>8)>>4] - b[5] = hextable[byte(v>>8)&0x0f] - b[6] = hextable[byte(v)>>4] - b[7] = hextable[byte(v)&0x0f] -} - -func putUint16Hex(b []byte, v uint16) { - b[0] = hextable[byte(v>>8)>>4] - b[1] = hextable[byte(v>>8)&0x0f] - b[2] = hextable[byte(v)>>4] - b[3] = hextable[byte(v)&0x0f] -} - -func putByteHex(dst, src []byte) { - for i := 0; i < len(src); i++ { - dst[i*2] = hextable[src[i]>>4] - dst[i*2+1] = hextable[src[i]&0x0f] - } -} - -// IsEqualGUID compares two GUID. -// -// Not constant time comparison. -func IsEqualGUID(guid1 *GUID, guid2 *GUID) bool { - return guid1.Data1 == guid2.Data1 && - guid1.Data2 == guid2.Data2 && - guid1.Data3 == guid2.Data3 && - guid1.Data4[0] == guid2.Data4[0] && - guid1.Data4[1] == guid2.Data4[1] && - guid1.Data4[2] == guid2.Data4[2] && - guid1.Data4[3] == guid2.Data4[3] && - guid1.Data4[4] == guid2.Data4[4] && - guid1.Data4[5] == guid2.Data4[5] && - guid1.Data4[6] == guid2.Data4[6] && - guid1.Data4[7] == guid2.Data4[7] -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint.go deleted file mode 100644 index 9e6c49f41f..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpoint.go +++ /dev/null @@ -1,20 +0,0 @@ -package ole - -import "unsafe" - -type IConnectionPoint struct { - IUnknown -} - -type IConnectionPointVtbl struct { - IUnknownVtbl - GetConnectionInterface uintptr - GetConnectionPointContainer uintptr - Advise uintptr - Unadvise uintptr - EnumConnections uintptr -} - -func (v *IConnectionPoint) VTable() *IConnectionPointVtbl { - return (*IConnectionPointVtbl)(unsafe.Pointer(v.RawVTable)) -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go deleted file mode 100644 index 5414dc3cd3..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpoint_func.go +++ /dev/null @@ -1,21 +0,0 @@ -// +build !windows - -package ole - -import "unsafe" - -func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { - return int32(0) -} - -func (v *IConnectionPoint) Advise(unknown *IUnknown) (uint32, error) { - return uint32(0), NewError(E_NOTIMPL) -} - -func (v *IConnectionPoint) Unadvise(cookie uint32) error { - return NewError(E_NOTIMPL) -} - -func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) (err error) { - return NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go b/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go deleted file mode 100644 index 32bc183248..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpoint_windows.go +++ /dev/null @@ -1,43 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unsafe" -) - -func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { - // XXX: This doesn't look like it does what it's supposed to - return release((*IUnknown)(unsafe.Pointer(v))) -} - -func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) { - hr, _, _ := syscall.Syscall( - v.VTable().Advise, - 3, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(unknown)), - uintptr(unsafe.Pointer(&cookie))) - if hr != 0 { - err = NewError(hr) - } - return -} - -func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) { - hr, _, _ := syscall.Syscall( - v.VTable().Unadvise, - 2, - uintptr(unsafe.Pointer(v)), - uintptr(cookie), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} - -func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error { - return NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go deleted file mode 100644 index 165860d199..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer.go +++ /dev/null @@ -1,17 +0,0 @@ -package ole - -import "unsafe" - -type IConnectionPointContainer struct { - IUnknown -} - -type IConnectionPointContainerVtbl struct { - IUnknownVtbl - EnumConnectionPoints uintptr - FindConnectionPoint uintptr -} - -func (v *IConnectionPointContainer) VTable() *IConnectionPointContainerVtbl { - return (*IConnectionPointContainerVtbl)(unsafe.Pointer(v.RawVTable)) -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go deleted file mode 100644 index 5dfa42aaeb..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_func.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build !windows - -package ole - -func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { - return NewError(E_NOTIMPL) -} - -func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) error { - return NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go b/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go deleted file mode 100644 index ad30d79efc..0000000000 --- a/vendor/github.com/go-ole/go-ole/iconnectionpointcontainer_windows.go +++ /dev/null @@ -1,25 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unsafe" -) - -func (v *IConnectionPointContainer) EnumConnectionPoints(points interface{}) error { - return NewError(E_NOTIMPL) -} - -func (v *IConnectionPointContainer) FindConnectionPoint(iid *GUID, point **IConnectionPoint) (err error) { - hr, _, _ := syscall.Syscall( - v.VTable().FindConnectionPoint, - 3, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(point))) - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/idispatch.go b/vendor/github.com/go-ole/go-ole/idispatch.go deleted file mode 100644 index d4af124092..0000000000 --- a/vendor/github.com/go-ole/go-ole/idispatch.go +++ /dev/null @@ -1,94 +0,0 @@ -package ole - -import "unsafe" - -type IDispatch struct { - IUnknown -} - -type IDispatchVtbl struct { - IUnknownVtbl - GetTypeInfoCount uintptr - GetTypeInfo uintptr - GetIDsOfNames uintptr - Invoke uintptr -} - -func (v *IDispatch) VTable() *IDispatchVtbl { - return (*IDispatchVtbl)(unsafe.Pointer(v.RawVTable)) -} - -func (v *IDispatch) GetIDsOfName(names []string) (dispid []int32, err error) { - dispid, err = getIDsOfName(v, names) - return -} - -func (v *IDispatch) Invoke(dispid int32, dispatch int16, params ...interface{}) (result *VARIANT, err error) { - result, err = invoke(v, dispid, dispatch, params...) - return -} - -func (v *IDispatch) GetTypeInfoCount() (c uint32, err error) { - c, err = getTypeInfoCount(v) - return -} - -func (v *IDispatch) GetTypeInfo() (tinfo *ITypeInfo, err error) { - tinfo, err = getTypeInfo(v) - return -} - -// GetSingleIDOfName is a helper that returns single display ID for IDispatch name. -// -// This replaces the common pattern of attempting to get a single name from the list of available -// IDs. It gives the first ID, if it is available. -func (v *IDispatch) GetSingleIDOfName(name string) (displayID int32, err error) { - var displayIDs []int32 - displayIDs, err = v.GetIDsOfName([]string{name}) - if err != nil { - return - } - displayID = displayIDs[0] - return -} - -// InvokeWithOptionalArgs accepts arguments as an array, works like Invoke. -// -// Accepts name and will attempt to retrieve Display ID to pass to Invoke. -// -// Passing params as an array is a workaround that could be fixed in later versions of Go that -// prevent passing empty params. During testing it was discovered that this is an acceptable way of -// getting around not being able to pass params normally. -func (v *IDispatch) InvokeWithOptionalArgs(name string, dispatch int16, params []interface{}) (result *VARIANT, err error) { - displayID, err := v.GetSingleIDOfName(name) - if err != nil { - return - } - - if len(params) < 1 { - result, err = v.Invoke(displayID, dispatch) - } else { - result, err = v.Invoke(displayID, dispatch, params...) - } - - return -} - -// CallMethod invokes named function with arguments on object. -func (v *IDispatch) CallMethod(name string, params ...interface{}) (*VARIANT, error) { - return v.InvokeWithOptionalArgs(name, DISPATCH_METHOD, params) -} - -// GetProperty retrieves the property with the name with the ability to pass arguments. -// -// Most of the time you will not need to pass arguments as most objects do not allow for this -// feature. Or at least, should not allow for this feature. Some servers don't follow best practices -// and this is provided for those edge cases. -func (v *IDispatch) GetProperty(name string, params ...interface{}) (*VARIANT, error) { - return v.InvokeWithOptionalArgs(name, DISPATCH_PROPERTYGET, params) -} - -// PutProperty attempts to mutate a property in the object. -func (v *IDispatch) PutProperty(name string, params ...interface{}) (*VARIANT, error) { - return v.InvokeWithOptionalArgs(name, DISPATCH_PROPERTYPUT, params) -} diff --git a/vendor/github.com/go-ole/go-ole/idispatch_func.go b/vendor/github.com/go-ole/go-ole/idispatch_func.go deleted file mode 100644 index b8fbbe319f..0000000000 --- a/vendor/github.com/go-ole/go-ole/idispatch_func.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !windows - -package ole - -func getIDsOfName(disp *IDispatch, names []string) ([]int32, error) { - return []int32{}, NewError(E_NOTIMPL) -} - -func getTypeInfoCount(disp *IDispatch) (uint32, error) { - return uint32(0), NewError(E_NOTIMPL) -} - -func getTypeInfo(disp *IDispatch) (*ITypeInfo, error) { - return nil, NewError(E_NOTIMPL) -} - -func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (*VARIANT, error) { - return nil, NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/idispatch_windows.go b/vendor/github.com/go-ole/go-ole/idispatch_windows.go deleted file mode 100644 index 649c0734ff..0000000000 --- a/vendor/github.com/go-ole/go-ole/idispatch_windows.go +++ /dev/null @@ -1,203 +0,0 @@ -//go:build windows -// +build windows - -package ole - -import ( - "math/big" - "syscall" - "time" - "unsafe" -) - -func getIDsOfName(disp *IDispatch, names []string) (dispid []int32, err error) { - wnames := make([]*uint16, len(names)) - for i := 0; i < len(names); i++ { - wnames[i] = syscall.StringToUTF16Ptr(names[i]) - } - dispid = make([]int32, len(names)) - namelen := uint32(len(names)) - hr, _, _ := syscall.Syscall6( - disp.VTable().GetIDsOfNames, - 6, - uintptr(unsafe.Pointer(disp)), - uintptr(unsafe.Pointer(IID_NULL)), - uintptr(unsafe.Pointer(&wnames[0])), - uintptr(namelen), - uintptr(GetUserDefaultLCID()), - uintptr(unsafe.Pointer(&dispid[0]))) - if hr != 0 { - err = NewError(hr) - } - return -} - -func getTypeInfoCount(disp *IDispatch) (c uint32, err error) { - hr, _, _ := syscall.Syscall( - disp.VTable().GetTypeInfoCount, - 2, - uintptr(unsafe.Pointer(disp)), - uintptr(unsafe.Pointer(&c)), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} - -func getTypeInfo(disp *IDispatch) (tinfo *ITypeInfo, err error) { - hr, _, _ := syscall.Syscall( - disp.VTable().GetTypeInfo, - 3, - uintptr(unsafe.Pointer(disp)), - uintptr(GetUserDefaultLCID()), - uintptr(unsafe.Pointer(&tinfo))) - if hr != 0 { - err = NewError(hr) - } - return -} - -func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{}) (result *VARIANT, err error) { - var dispparams DISPPARAMS - - if dispatch&DISPATCH_PROPERTYPUT != 0 { - dispnames := [1]int32{DISPID_PROPERTYPUT} - dispparams.rgdispidNamedArgs = uintptr(unsafe.Pointer(&dispnames[0])) - dispparams.cNamedArgs = 1 - } else if dispatch&DISPATCH_PROPERTYPUTREF != 0 { - dispnames := [1]int32{DISPID_PROPERTYPUT} - dispparams.rgdispidNamedArgs = uintptr(unsafe.Pointer(&dispnames[0])) - dispparams.cNamedArgs = 1 - } - var vargs []VARIANT - if len(params) > 0 { - vargs = make([]VARIANT, len(params)) - for i, v := range params { - //n := len(params)-i-1 - n := len(params) - i - 1 - VariantInit(&vargs[n]) - switch vv := v.(type) { - case bool: - if vv { - vargs[n] = NewVariant(VT_BOOL, 0xffff) - } else { - vargs[n] = NewVariant(VT_BOOL, 0) - } - case *bool: - vargs[n] = NewVariant(VT_BOOL|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*bool))))) - case uint8: - vargs[n] = NewVariant(VT_I1, int64(v.(uint8))) - case *uint8: - vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint8))))) - case int8: - vargs[n] = NewVariant(VT_I1, int64(v.(int8))) - case *int8: - vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int8))))) - case int16: - vargs[n] = NewVariant(VT_I2, int64(v.(int16))) - case *int16: - vargs[n] = NewVariant(VT_I2|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int16))))) - case uint16: - vargs[n] = NewVariant(VT_UI2, int64(v.(uint16))) - case *uint16: - vargs[n] = NewVariant(VT_UI2|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint16))))) - case int32: - vargs[n] = NewVariant(VT_I4, int64(v.(int32))) - case *int32: - vargs[n] = NewVariant(VT_I4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int32))))) - case uint32: - vargs[n] = NewVariant(VT_UI4, int64(v.(uint32))) - case *uint32: - vargs[n] = NewVariant(VT_UI4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint32))))) - case int64: - vargs[n] = NewVariant(VT_I8, int64(v.(int64))) - case *int64: - vargs[n] = NewVariant(VT_I8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int64))))) - case uint64: - vargs[n] = NewVariant(VT_UI8, int64(uintptr(v.(uint64)))) - case *uint64: - vargs[n] = NewVariant(VT_UI8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint64))))) - case int: - vargs[n] = NewVariant(VT_I4, int64(v.(int))) - case *int: - vargs[n] = NewVariant(VT_I4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int))))) - case uint: - vargs[n] = NewVariant(VT_UI4, int64(v.(uint))) - case *uint: - vargs[n] = NewVariant(VT_UI4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint))))) - case float32: - vargs[n] = NewVariant(VT_R4, *(*int64)(unsafe.Pointer(&vv))) - case *float32: - vargs[n] = NewVariant(VT_R4|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*float32))))) - case float64: - vargs[n] = NewVariant(VT_R8, *(*int64)(unsafe.Pointer(&vv))) - case *float64: - vargs[n] = NewVariant(VT_R8|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*float64))))) - case *big.Int: - vargs[n] = NewVariant(VT_DECIMAL, v.(*big.Int).Int64()) - case string: - vargs[n] = NewVariant(VT_BSTR, int64(uintptr(unsafe.Pointer(SysAllocStringLen(v.(string)))))) - case *string: - vargs[n] = NewVariant(VT_BSTR|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*string))))) - case time.Time: - s := vv.Format("2006-01-02 15:04:05") - vargs[n] = NewVariant(VT_BSTR, int64(uintptr(unsafe.Pointer(SysAllocStringLen(s))))) - case *time.Time: - s := vv.Format("2006-01-02 15:04:05") - vargs[n] = NewVariant(VT_BSTR|VT_BYREF, int64(uintptr(unsafe.Pointer(&s)))) - case *IDispatch: - vargs[n] = NewVariant(VT_DISPATCH, int64(uintptr(unsafe.Pointer(v.(*IDispatch))))) - case **IDispatch: - vargs[n] = NewVariant(VT_DISPATCH|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(**IDispatch))))) - case nil: - vargs[n] = NewVariant(VT_NULL, 0) - case *VARIANT: - vargs[n] = NewVariant(VT_VARIANT|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*VARIANT))))) - case []byte: - safeByteArray := safeArrayFromByteSlice(v.([]byte)) - vargs[n] = NewVariant(VT_ARRAY|VT_UI1, int64(uintptr(unsafe.Pointer(safeByteArray)))) - defer VariantClear(&vargs[n]) - case []string: - safeByteArray := safeArrayFromStringSlice(v.([]string)) - vargs[n] = NewVariant(VT_ARRAY|VT_BSTR, int64(uintptr(unsafe.Pointer(safeByteArray)))) - defer VariantClear(&vargs[n]) - default: - panic("unknown type") - } - } - dispparams.rgvarg = uintptr(unsafe.Pointer(&vargs[0])) - dispparams.cArgs = uint32(len(params)) - } - - result = new(VARIANT) - var excepInfo EXCEPINFO - VariantInit(result) - hr, _, _ := syscall.Syscall9( - disp.VTable().Invoke, - 9, - uintptr(unsafe.Pointer(disp)), - uintptr(dispid), - uintptr(unsafe.Pointer(IID_NULL)), - uintptr(GetUserDefaultLCID()), - uintptr(dispatch), - uintptr(unsafe.Pointer(&dispparams)), - uintptr(unsafe.Pointer(result)), - uintptr(unsafe.Pointer(&excepInfo)), - 0) - if hr != 0 { - excepInfo.renderStrings() - excepInfo.Clear() - err = NewErrorWithSubError(hr, excepInfo.description, excepInfo) - } - for i, varg := range vargs { - n := len(params) - i - 1 - if varg.VT == VT_BSTR && varg.Val != 0 { - SysFreeString(((*int16)(unsafe.Pointer(uintptr(varg.Val))))) - } - if varg.VT == (VT_BSTR|VT_BYREF) && varg.Val != 0 { - *(params[n].(*string)) = LpOleStrToString(*(**uint16)(unsafe.Pointer(uintptr(varg.Val)))) - } - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant.go b/vendor/github.com/go-ole/go-ole/ienumvariant.go deleted file mode 100644 index 2433897544..0000000000 --- a/vendor/github.com/go-ole/go-ole/ienumvariant.go +++ /dev/null @@ -1,19 +0,0 @@ -package ole - -import "unsafe" - -type IEnumVARIANT struct { - IUnknown -} - -type IEnumVARIANTVtbl struct { - IUnknownVtbl - Next uintptr - Skip uintptr - Reset uintptr - Clone uintptr -} - -func (v *IEnumVARIANT) VTable() *IEnumVARIANTVtbl { - return (*IEnumVARIANTVtbl)(unsafe.Pointer(v.RawVTable)) -} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant_func.go b/vendor/github.com/go-ole/go-ole/ienumvariant_func.go deleted file mode 100644 index c14848199c..0000000000 --- a/vendor/github.com/go-ole/go-ole/ienumvariant_func.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !windows - -package ole - -func (enum *IEnumVARIANT) Clone() (*IEnumVARIANT, error) { - return nil, NewError(E_NOTIMPL) -} - -func (enum *IEnumVARIANT) Reset() error { - return NewError(E_NOTIMPL) -} - -func (enum *IEnumVARIANT) Skip(celt uint) error { - return NewError(E_NOTIMPL) -} - -func (enum *IEnumVARIANT) Next(celt uint) (VARIANT, uint, error) { - return NewVariant(VT_NULL, int64(0)), 0, NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go b/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go deleted file mode 100644 index 4781f3b8b0..0000000000 --- a/vendor/github.com/go-ole/go-ole/ienumvariant_windows.go +++ /dev/null @@ -1,63 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unsafe" -) - -func (enum *IEnumVARIANT) Clone() (cloned *IEnumVARIANT, err error) { - hr, _, _ := syscall.Syscall( - enum.VTable().Clone, - 2, - uintptr(unsafe.Pointer(enum)), - uintptr(unsafe.Pointer(&cloned)), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} - -func (enum *IEnumVARIANT) Reset() (err error) { - hr, _, _ := syscall.Syscall( - enum.VTable().Reset, - 1, - uintptr(unsafe.Pointer(enum)), - 0, - 0) - if hr != 0 { - err = NewError(hr) - } - return -} - -func (enum *IEnumVARIANT) Skip(celt uint) (err error) { - hr, _, _ := syscall.Syscall( - enum.VTable().Skip, - 2, - uintptr(unsafe.Pointer(enum)), - uintptr(celt), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} - -func (enum *IEnumVARIANT) Next(celt uint) (array VARIANT, length uint, err error) { - hr, _, _ := syscall.Syscall6( - enum.VTable().Next, - 4, - uintptr(unsafe.Pointer(enum)), - uintptr(celt), - uintptr(unsafe.Pointer(&array)), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable.go b/vendor/github.com/go-ole/go-ole/iinspectable.go deleted file mode 100644 index f4a19e253a..0000000000 --- a/vendor/github.com/go-ole/go-ole/iinspectable.go +++ /dev/null @@ -1,18 +0,0 @@ -package ole - -import "unsafe" - -type IInspectable struct { - IUnknown -} - -type IInspectableVtbl struct { - IUnknownVtbl - GetIIds uintptr - GetRuntimeClassName uintptr - GetTrustLevel uintptr -} - -func (v *IInspectable) VTable() *IInspectableVtbl { - return (*IInspectableVtbl)(unsafe.Pointer(v.RawVTable)) -} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable_func.go b/vendor/github.com/go-ole/go-ole/iinspectable_func.go deleted file mode 100644 index 348829bf06..0000000000 --- a/vendor/github.com/go-ole/go-ole/iinspectable_func.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build !windows - -package ole - -func (v *IInspectable) GetIids() ([]*GUID, error) { - return []*GUID{}, NewError(E_NOTIMPL) -} - -func (v *IInspectable) GetRuntimeClassName() (string, error) { - return "", NewError(E_NOTIMPL) -} - -func (v *IInspectable) GetTrustLevel() (uint32, error) { - return uint32(0), NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/iinspectable_windows.go b/vendor/github.com/go-ole/go-ole/iinspectable_windows.go deleted file mode 100644 index 4519a4aa44..0000000000 --- a/vendor/github.com/go-ole/go-ole/iinspectable_windows.go +++ /dev/null @@ -1,72 +0,0 @@ -// +build windows - -package ole - -import ( - "bytes" - "encoding/binary" - "reflect" - "syscall" - "unsafe" -) - -func (v *IInspectable) GetIids() (iids []*GUID, err error) { - var count uint32 - var array uintptr - hr, _, _ := syscall.Syscall( - v.VTable().GetIIds, - 3, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(&count)), - uintptr(unsafe.Pointer(&array))) - if hr != 0 { - err = NewError(hr) - return - } - defer CoTaskMemFree(array) - - iids = make([]*GUID, count) - byteCount := count * uint32(unsafe.Sizeof(GUID{})) - slicehdr := reflect.SliceHeader{Data: array, Len: int(byteCount), Cap: int(byteCount)} - byteSlice := *(*[]byte)(unsafe.Pointer(&slicehdr)) - reader := bytes.NewReader(byteSlice) - for i := range iids { - guid := GUID{} - err = binary.Read(reader, binary.LittleEndian, &guid) - if err != nil { - return - } - iids[i] = &guid - } - return -} - -func (v *IInspectable) GetRuntimeClassName() (s string, err error) { - var hstring HString - hr, _, _ := syscall.Syscall( - v.VTable().GetRuntimeClassName, - 2, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(&hstring)), - 0) - if hr != 0 { - err = NewError(hr) - return - } - s = hstring.String() - DeleteHString(hstring) - return -} - -func (v *IInspectable) GetTrustLevel() (level uint32, err error) { - hr, _, _ := syscall.Syscall( - v.VTable().GetTrustLevel, - 2, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(&level)), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go deleted file mode 100644 index 25f3a6f24a..0000000000 --- a/vendor/github.com/go-ole/go-ole/iprovideclassinfo.go +++ /dev/null @@ -1,21 +0,0 @@ -package ole - -import "unsafe" - -type IProvideClassInfo struct { - IUnknown -} - -type IProvideClassInfoVtbl struct { - IUnknownVtbl - GetClassInfo uintptr -} - -func (v *IProvideClassInfo) VTable() *IProvideClassInfoVtbl { - return (*IProvideClassInfoVtbl)(unsafe.Pointer(v.RawVTable)) -} - -func (v *IProvideClassInfo) GetClassInfo() (cinfo *ITypeInfo, err error) { - cinfo, err = getClassInfo(v) - return -} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go deleted file mode 100644 index 7e3cb63ea7..0000000000 --- a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_func.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !windows - -package ole - -func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { - return nil, NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go b/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go deleted file mode 100644 index 2ad0163949..0000000000 --- a/vendor/github.com/go-ole/go-ole/iprovideclassinfo_windows.go +++ /dev/null @@ -1,21 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unsafe" -) - -func getClassInfo(disp *IProvideClassInfo) (tinfo *ITypeInfo, err error) { - hr, _, _ := syscall.Syscall( - disp.VTable().GetClassInfo, - 2, - uintptr(unsafe.Pointer(disp)), - uintptr(unsafe.Pointer(&tinfo)), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo.go b/vendor/github.com/go-ole/go-ole/itypeinfo.go deleted file mode 100644 index dd3c5e21bb..0000000000 --- a/vendor/github.com/go-ole/go-ole/itypeinfo.go +++ /dev/null @@ -1,34 +0,0 @@ -package ole - -import "unsafe" - -type ITypeInfo struct { - IUnknown -} - -type ITypeInfoVtbl struct { - IUnknownVtbl - GetTypeAttr uintptr - GetTypeComp uintptr - GetFuncDesc uintptr - GetVarDesc uintptr - GetNames uintptr - GetRefTypeOfImplType uintptr - GetImplTypeFlags uintptr - GetIDsOfNames uintptr - Invoke uintptr - GetDocumentation uintptr - GetDllEntry uintptr - GetRefTypeInfo uintptr - AddressOfMember uintptr - CreateInstance uintptr - GetMops uintptr - GetContainingTypeLib uintptr - ReleaseTypeAttr uintptr - ReleaseFuncDesc uintptr - ReleaseVarDesc uintptr -} - -func (v *ITypeInfo) VTable() *ITypeInfoVtbl { - return (*ITypeInfoVtbl)(unsafe.Pointer(v.RawVTable)) -} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo_func.go b/vendor/github.com/go-ole/go-ole/itypeinfo_func.go deleted file mode 100644 index 8364a659ba..0000000000 --- a/vendor/github.com/go-ole/go-ole/itypeinfo_func.go +++ /dev/null @@ -1,7 +0,0 @@ -// +build !windows - -package ole - -func (v *ITypeInfo) GetTypeAttr() (*TYPEATTR, error) { - return nil, NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go b/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go deleted file mode 100644 index 54782b3da5..0000000000 --- a/vendor/github.com/go-ole/go-ole/itypeinfo_windows.go +++ /dev/null @@ -1,21 +0,0 @@ -// +build windows - -package ole - -import ( - "syscall" - "unsafe" -) - -func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) { - hr, _, _ := syscall.Syscall( - uintptr(v.VTable().GetTypeAttr), - 2, - uintptr(unsafe.Pointer(v)), - uintptr(unsafe.Pointer(&tattr)), - 0) - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/iunknown.go b/vendor/github.com/go-ole/go-ole/iunknown.go deleted file mode 100644 index 108f28ea61..0000000000 --- a/vendor/github.com/go-ole/go-ole/iunknown.go +++ /dev/null @@ -1,57 +0,0 @@ -package ole - -import "unsafe" - -type IUnknown struct { - RawVTable *interface{} -} - -type IUnknownVtbl struct { - QueryInterface uintptr - AddRef uintptr - Release uintptr -} - -type UnknownLike interface { - QueryInterface(iid *GUID) (disp *IDispatch, err error) - AddRef() int32 - Release() int32 -} - -func (v *IUnknown) VTable() *IUnknownVtbl { - return (*IUnknownVtbl)(unsafe.Pointer(v.RawVTable)) -} - -func (v *IUnknown) PutQueryInterface(interfaceID *GUID, obj interface{}) error { - return reflectQueryInterface(v, v.VTable().QueryInterface, interfaceID, obj) -} - -func (v *IUnknown) IDispatch(interfaceID *GUID) (dispatch *IDispatch, err error) { - err = v.PutQueryInterface(interfaceID, &dispatch) - return -} - -func (v *IUnknown) IEnumVARIANT(interfaceID *GUID) (enum *IEnumVARIANT, err error) { - err = v.PutQueryInterface(interfaceID, &enum) - return -} - -func (v *IUnknown) QueryInterface(iid *GUID) (*IDispatch, error) { - return queryInterface(v, iid) -} - -func (v *IUnknown) MustQueryInterface(iid *GUID) (disp *IDispatch) { - unk, err := queryInterface(v, iid) - if err != nil { - panic(err) - } - return unk -} - -func (v *IUnknown) AddRef() int32 { - return addRef(v) -} - -func (v *IUnknown) Release() int32 { - return release(v) -} diff --git a/vendor/github.com/go-ole/go-ole/iunknown_func.go b/vendor/github.com/go-ole/go-ole/iunknown_func.go deleted file mode 100644 index d0a62cfd73..0000000000 --- a/vendor/github.com/go-ole/go-ole/iunknown_func.go +++ /dev/null @@ -1,19 +0,0 @@ -// +build !windows - -package ole - -func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { - return NewError(E_NOTIMPL) -} - -func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { - return nil, NewError(E_NOTIMPL) -} - -func addRef(unk *IUnknown) int32 { - return 0 -} - -func release(unk *IUnknown) int32 { - return 0 -} diff --git a/vendor/github.com/go-ole/go-ole/iunknown_windows.go b/vendor/github.com/go-ole/go-ole/iunknown_windows.go deleted file mode 100644 index ede5bb8c17..0000000000 --- a/vendor/github.com/go-ole/go-ole/iunknown_windows.go +++ /dev/null @@ -1,58 +0,0 @@ -// +build windows - -package ole - -import ( - "reflect" - "syscall" - "unsafe" -) - -func reflectQueryInterface(self interface{}, method uintptr, interfaceID *GUID, obj interface{}) (err error) { - selfValue := reflect.ValueOf(self).Elem() - objValue := reflect.ValueOf(obj).Elem() - - hr, _, _ := syscall.Syscall( - method, - 3, - selfValue.UnsafeAddr(), - uintptr(unsafe.Pointer(interfaceID)), - objValue.Addr().Pointer()) - if hr != 0 { - err = NewError(hr) - } - return -} - -func queryInterface(unk *IUnknown, iid *GUID) (disp *IDispatch, err error) { - hr, _, _ := syscall.Syscall( - unk.VTable().QueryInterface, - 3, - uintptr(unsafe.Pointer(unk)), - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(&disp))) - if hr != 0 { - err = NewError(hr) - } - return -} - -func addRef(unk *IUnknown) int32 { - ret, _, _ := syscall.Syscall( - unk.VTable().AddRef, - 1, - uintptr(unsafe.Pointer(unk)), - 0, - 0) - return int32(ret) -} - -func release(unk *IUnknown) int32 { - ret, _, _ := syscall.Syscall( - unk.VTable().Release, - 1, - uintptr(unsafe.Pointer(unk)), - 0, - 0) - return int32(ret) -} diff --git a/vendor/github.com/go-ole/go-ole/ole.go b/vendor/github.com/go-ole/go-ole/ole.go deleted file mode 100644 index dbd132bbd7..0000000000 --- a/vendor/github.com/go-ole/go-ole/ole.go +++ /dev/null @@ -1,190 +0,0 @@ -package ole - -import ( - "fmt" - "strings" - "unsafe" -) - -// DISPPARAMS are the arguments that passed to methods or property. -type DISPPARAMS struct { - rgvarg uintptr - rgdispidNamedArgs uintptr - cArgs uint32 - cNamedArgs uint32 -} - -// EXCEPINFO defines exception info. -type EXCEPINFO struct { - wCode uint16 - wReserved uint16 - bstrSource *uint16 - bstrDescription *uint16 - bstrHelpFile *uint16 - dwHelpContext uint32 - pvReserved uintptr - pfnDeferredFillIn uintptr - scode uint32 - - // Go-specific part. Don't move upper cos it'll break structure layout for native code. - rendered bool - source string - description string - helpFile string -} - -// renderStrings translates BSTR strings to Go ones so `.Error` and `.String` -// could be safely called after `.Clear`. We need this when we can't rely on -// a caller to call `.Clear`. -func (e *EXCEPINFO) renderStrings() { - e.rendered = true - if e.bstrSource == nil { - e.source = "" - } else { - e.source = BstrToString(e.bstrSource) - } - if e.bstrDescription == nil { - e.description = "" - } else { - e.description = BstrToString(e.bstrDescription) - } - if e.bstrHelpFile == nil { - e.helpFile = "" - } else { - e.helpFile = BstrToString(e.bstrHelpFile) - } -} - -// Clear frees BSTR strings inside an EXCEPINFO and set it to NULL. -func (e *EXCEPINFO) Clear() { - freeBSTR := func(s *uint16) { - // SysFreeString don't return errors and is safe for call's on NULL. - // https://docs.microsoft.com/en-us/windows/win32/api/oleauto/nf-oleauto-sysfreestring - _ = SysFreeString((*int16)(unsafe.Pointer(s))) - } - - if e.bstrSource != nil { - freeBSTR(e.bstrSource) - e.bstrSource = nil - } - if e.bstrDescription != nil { - freeBSTR(e.bstrDescription) - e.bstrDescription = nil - } - if e.bstrHelpFile != nil { - freeBSTR(e.bstrHelpFile) - e.bstrHelpFile = nil - } -} - -// WCode return wCode in EXCEPINFO. -func (e EXCEPINFO) WCode() uint16 { - return e.wCode -} - -// SCODE return scode in EXCEPINFO. -func (e EXCEPINFO) SCODE() uint32 { - return e.scode -} - -// String convert EXCEPINFO to string. -func (e EXCEPINFO) String() string { - if !e.rendered { - e.renderStrings() - } - return fmt.Sprintf( - "wCode: %#x, bstrSource: %v, bstrDescription: %v, bstrHelpFile: %v, dwHelpContext: %#x, scode: %#x", - e.wCode, e.source, e.description, e.helpFile, e.dwHelpContext, e.scode, - ) -} - -// Error implements error interface and returns error string. -func (e EXCEPINFO) Error() string { - if !e.rendered { - e.renderStrings() - } - - if e.description != "" { - return strings.TrimSpace(e.description) - } - - code := e.scode - if e.wCode != 0 { - code = uint32(e.wCode) - } - return fmt.Sprintf("%v: %#x", e.source, code) -} - -// PARAMDATA defines parameter data type. -type PARAMDATA struct { - Name *int16 - Vt uint16 -} - -// METHODDATA defines method info. -type METHODDATA struct { - Name *uint16 - Data *PARAMDATA - Dispid int32 - Meth uint32 - CC int32 - CArgs uint32 - Flags uint16 - VtReturn uint32 -} - -// INTERFACEDATA defines interface info. -type INTERFACEDATA struct { - MethodData *METHODDATA - CMembers uint32 -} - -// Point is 2D vector type. -type Point struct { - X int32 - Y int32 -} - -// Msg is message between processes. -type Msg struct { - Hwnd uint32 - Message uint32 - Wparam int32 - Lparam int32 - Time uint32 - Pt Point -} - -// TYPEDESC defines data type. -type TYPEDESC struct { - Hreftype uint32 - VT uint16 -} - -// IDLDESC defines IDL info. -type IDLDESC struct { - DwReserved uint32 - WIDLFlags uint16 -} - -// TYPEATTR defines type info. -type TYPEATTR struct { - Guid GUID - Lcid uint32 - dwReserved uint32 - MemidConstructor int32 - MemidDestructor int32 - LpstrSchema *uint16 - CbSizeInstance uint32 - Typekind int32 - CFuncs uint16 - CVars uint16 - CImplTypes uint16 - CbSizeVft uint16 - CbAlignment uint16 - WTypeFlags uint16 - WMajorVerNum uint16 - WMinorVerNum uint16 - TdescAlias TYPEDESC - IdldescType IDLDESC -} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection.go b/vendor/github.com/go-ole/go-ole/oleutil/connection.go deleted file mode 100644 index 60df73cda0..0000000000 --- a/vendor/github.com/go-ole/go-ole/oleutil/connection.go +++ /dev/null @@ -1,100 +0,0 @@ -// +build windows - -package oleutil - -import ( - "reflect" - "unsafe" - - ole "github.com/go-ole/go-ole" -) - -type stdDispatch struct { - lpVtbl *stdDispatchVtbl - ref int32 - iid *ole.GUID - iface interface{} - funcMap map[string]int32 -} - -type stdDispatchVtbl struct { - pQueryInterface uintptr - pAddRef uintptr - pRelease uintptr - pGetTypeInfoCount uintptr - pGetTypeInfo uintptr - pGetIDsOfNames uintptr - pInvoke uintptr -} - -func dispQueryInterface(this *ole.IUnknown, iid *ole.GUID, punk **ole.IUnknown) uint32 { - pthis := (*stdDispatch)(unsafe.Pointer(this)) - *punk = nil - if ole.IsEqualGUID(iid, ole.IID_IUnknown) || - ole.IsEqualGUID(iid, ole.IID_IDispatch) { - dispAddRef(this) - *punk = this - return ole.S_OK - } - if ole.IsEqualGUID(iid, pthis.iid) { - dispAddRef(this) - *punk = this - return ole.S_OK - } - return ole.E_NOINTERFACE -} - -func dispAddRef(this *ole.IUnknown) int32 { - pthis := (*stdDispatch)(unsafe.Pointer(this)) - pthis.ref++ - return pthis.ref -} - -func dispRelease(this *ole.IUnknown) int32 { - pthis := (*stdDispatch)(unsafe.Pointer(this)) - pthis.ref-- - return pthis.ref -} - -func dispGetIDsOfNames(this *ole.IUnknown, iid *ole.GUID, wnames []*uint16, namelen int, lcid int, pdisp []int32) uintptr { - pthis := (*stdDispatch)(unsafe.Pointer(this)) - names := make([]string, len(wnames)) - for i := 0; i < len(names); i++ { - names[i] = ole.LpOleStrToString(wnames[i]) - } - for n := 0; n < namelen; n++ { - if id, ok := pthis.funcMap[names[n]]; ok { - pdisp[n] = id - } - } - return ole.S_OK -} - -func dispGetTypeInfoCount(pcount *int) uintptr { - if pcount != nil { - *pcount = 0 - } - return ole.S_OK -} - -func dispGetTypeInfo(ptypeif *uintptr) uintptr { - return ole.E_NOTIMPL -} - -func dispInvoke(this *ole.IDispatch, dispid int32, riid *ole.GUID, lcid int, flags int16, dispparams *ole.DISPPARAMS, result *ole.VARIANT, pexcepinfo *ole.EXCEPINFO, nerr *uint) uintptr { - pthis := (*stdDispatch)(unsafe.Pointer(this)) - found := "" - for name, id := range pthis.funcMap { - if id == dispid { - found = name - } - } - if found != "" { - rv := reflect.ValueOf(pthis.iface).Elem() - rm := rv.MethodByName(found) - rr := rm.Call([]reflect.Value{}) - println(len(rr)) - return ole.S_OK - } - return ole.E_NOTIMPL -} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go b/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go deleted file mode 100644 index 8818fb8275..0000000000 --- a/vendor/github.com/go-ole/go-ole/oleutil/connection_func.go +++ /dev/null @@ -1,10 +0,0 @@ -// +build !windows - -package oleutil - -import ole "github.com/go-ole/go-ole" - -// ConnectObject creates a connection point between two services for communication. -func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (uint32, error) { - return 0, ole.NewError(ole.E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go b/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go deleted file mode 100644 index ab9c0d8dcb..0000000000 --- a/vendor/github.com/go-ole/go-ole/oleutil/connection_windows.go +++ /dev/null @@ -1,58 +0,0 @@ -// +build windows - -package oleutil - -import ( - "reflect" - "syscall" - "unsafe" - - ole "github.com/go-ole/go-ole" -) - -// ConnectObject creates a connection point between two services for communication. -func ConnectObject(disp *ole.IDispatch, iid *ole.GUID, idisp interface{}) (cookie uint32, err error) { - unknown, err := disp.QueryInterface(ole.IID_IConnectionPointContainer) - if err != nil { - return - } - - container := (*ole.IConnectionPointContainer)(unsafe.Pointer(unknown)) - var point *ole.IConnectionPoint - err = container.FindConnectionPoint(iid, &point) - if err != nil { - return - } - if edisp, ok := idisp.(*ole.IUnknown); ok { - cookie, err = point.Advise(edisp) - container.Release() - if err != nil { - return - } - } - rv := reflect.ValueOf(disp).Elem() - if rv.Type().Kind() == reflect.Struct { - dest := &stdDispatch{} - dest.lpVtbl = &stdDispatchVtbl{} - dest.lpVtbl.pQueryInterface = syscall.NewCallback(dispQueryInterface) - dest.lpVtbl.pAddRef = syscall.NewCallback(dispAddRef) - dest.lpVtbl.pRelease = syscall.NewCallback(dispRelease) - dest.lpVtbl.pGetTypeInfoCount = syscall.NewCallback(dispGetTypeInfoCount) - dest.lpVtbl.pGetTypeInfo = syscall.NewCallback(dispGetTypeInfo) - dest.lpVtbl.pGetIDsOfNames = syscall.NewCallback(dispGetIDsOfNames) - dest.lpVtbl.pInvoke = syscall.NewCallback(dispInvoke) - dest.iface = disp - dest.iid = iid - cookie, err = point.Advise((*ole.IUnknown)(unsafe.Pointer(dest))) - container.Release() - if err != nil { - point.Release() - return - } - return - } - - container.Release() - - return 0, ole.NewError(ole.E_INVALIDARG) -} diff --git a/vendor/github.com/go-ole/go-ole/oleutil/go-get.go b/vendor/github.com/go-ole/go-ole/oleutil/go-get.go deleted file mode 100644 index 58347628f2..0000000000 --- a/vendor/github.com/go-ole/go-ole/oleutil/go-get.go +++ /dev/null @@ -1,6 +0,0 @@ -// This file is here so go get succeeds as without it errors with: -// no buildable Go source files in ... -// -// +build !windows - -package oleutil diff --git a/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go b/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go deleted file mode 100644 index f7803c1e30..0000000000 --- a/vendor/github.com/go-ole/go-ole/oleutil/oleutil.go +++ /dev/null @@ -1,127 +0,0 @@ -package oleutil - -import ole "github.com/go-ole/go-ole" - -// ClassIDFrom retrieves class ID whether given is program ID or application string. -func ClassIDFrom(programID string) (classID *ole.GUID, err error) { - return ole.ClassIDFrom(programID) -} - -// CreateObject creates object from programID based on interface type. -// -// Only supports IUnknown. -// -// Program ID can be either program ID or application string. -func CreateObject(programID string) (unknown *ole.IUnknown, err error) { - classID, err := ole.ClassIDFrom(programID) - if err != nil { - return - } - - unknown, err = ole.CreateInstance(classID, ole.IID_IUnknown) - if err != nil { - return - } - - return -} - -// GetActiveObject retrieves active object for program ID and interface ID based -// on interface type. -// -// Only supports IUnknown. -// -// Program ID can be either program ID or application string. -func GetActiveObject(programID string) (unknown *ole.IUnknown, err error) { - classID, err := ole.ClassIDFrom(programID) - if err != nil { - return - } - - unknown, err = ole.GetActiveObject(classID, ole.IID_IUnknown) - if err != nil { - return - } - - return -} - -// CallMethod calls method on IDispatch with parameters. -func CallMethod(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { - return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_METHOD, params) -} - -// MustCallMethod calls method on IDispatch with parameters or panics. -func MustCallMethod(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { - r, err := CallMethod(disp, name, params...) - if err != nil { - panic(err.Error()) - } - return r -} - -// GetProperty retrieves property from IDispatch. -func GetProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { - return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYGET, params) -} - -// MustGetProperty retrieves property from IDispatch or panics. -func MustGetProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { - r, err := GetProperty(disp, name, params...) - if err != nil { - panic(err.Error()) - } - return r -} - -// PutProperty mutates property. -func PutProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { - return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYPUT, params) -} - -// MustPutProperty mutates property or panics. -func MustPutProperty(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { - r, err := PutProperty(disp, name, params...) - if err != nil { - panic(err.Error()) - } - return r -} - -// PutPropertyRef mutates property reference. -func PutPropertyRef(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT, err error) { - return disp.InvokeWithOptionalArgs(name, ole.DISPATCH_PROPERTYPUTREF, params) -} - -// MustPutPropertyRef mutates property reference or panics. -func MustPutPropertyRef(disp *ole.IDispatch, name string, params ...interface{}) (result *ole.VARIANT) { - r, err := PutPropertyRef(disp, name, params...) - if err != nil { - panic(err.Error()) - } - return r -} - -func ForEach(disp *ole.IDispatch, f func(v *ole.VARIANT) error) error { - newEnum, err := disp.GetProperty("_NewEnum") - if err != nil { - return err - } - defer newEnum.Clear() - - enum, err := newEnum.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) - if err != nil { - return err - } - defer enum.Release() - - for item, length, err := enum.Next(1); length > 0; item, length, err = enum.Next(1) { - if err != nil { - return err - } - if ferr := f(&item); ferr != nil { - return ferr - } - } - return nil -} diff --git a/vendor/github.com/go-ole/go-ole/safearray.go b/vendor/github.com/go-ole/go-ole/safearray.go deleted file mode 100644 index a5201b56c3..0000000000 --- a/vendor/github.com/go-ole/go-ole/safearray.go +++ /dev/null @@ -1,27 +0,0 @@ -// Package is meant to retrieve and process safe array data returned from COM. - -package ole - -// SafeArrayBound defines the SafeArray boundaries. -type SafeArrayBound struct { - Elements uint32 - LowerBound int32 -} - -// SafeArray is how COM handles arrays. -type SafeArray struct { - Dimensions uint16 - FeaturesFlag uint16 - ElementsSize uint32 - LocksAmount uint32 - Data uint32 - Bounds [16]byte -} - -// SAFEARRAY is obsolete, exists for backwards compatibility. -// Use SafeArray -type SAFEARRAY SafeArray - -// SAFEARRAYBOUND is obsolete, exists for backwards compatibility. -// Use SafeArrayBound -type SAFEARRAYBOUND SafeArrayBound diff --git a/vendor/github.com/go-ole/go-ole/safearray_func.go b/vendor/github.com/go-ole/go-ole/safearray_func.go deleted file mode 100644 index 0dee670ceb..0000000000 --- a/vendor/github.com/go-ole/go-ole/safearray_func.go +++ /dev/null @@ -1,211 +0,0 @@ -// +build !windows - -package ole - -import ( - "unsafe" -) - -// safeArrayAccessData returns raw array pointer. -// -// AKA: SafeArrayAccessData in Windows API. -func safeArrayAccessData(safearray *SafeArray) (uintptr, error) { - return uintptr(0), NewError(E_NOTIMPL) -} - -// safeArrayUnaccessData releases raw array. -// -// AKA: SafeArrayUnaccessData in Windows API. -func safeArrayUnaccessData(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayAllocData allocates SafeArray. -// -// AKA: SafeArrayAllocData in Windows API. -func safeArrayAllocData(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayAllocDescriptor allocates SafeArray. -// -// AKA: SafeArrayAllocDescriptor in Windows API. -func safeArrayAllocDescriptor(dimensions uint32) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayAllocDescriptorEx allocates SafeArray. -// -// AKA: SafeArrayAllocDescriptorEx in Windows API. -func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayCopy returns copy of SafeArray. -// -// AKA: SafeArrayCopy in Windows API. -func safeArrayCopy(original *SafeArray) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayCopyData duplicates SafeArray into another SafeArray object. -// -// AKA: SafeArrayCopyData in Windows API. -func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayCreate creates SafeArray. -// -// AKA: SafeArrayCreate in Windows API. -func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArrayBound) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayCreateEx creates SafeArray. -// -// AKA: SafeArrayCreateEx in Windows API. -func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeArrayBound, extra uintptr) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayCreateVector creates SafeArray. -// -// AKA: SafeArrayCreateVector in Windows API. -func safeArrayCreateVector(variantType VT, lowerBound int32, length uint32) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayCreateVectorEx creates SafeArray. -// -// AKA: SafeArrayCreateVectorEx in Windows API. -func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length uint32, extra uintptr) (*SafeArray, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayDestroy destroys SafeArray object. -// -// AKA: SafeArrayDestroy in Windows API. -func safeArrayDestroy(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayDestroyData destroys SafeArray object. -// -// AKA: SafeArrayDestroyData in Windows API. -func safeArrayDestroyData(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayDestroyDescriptor destroys SafeArray object. -// -// AKA: SafeArrayDestroyDescriptor in Windows API. -func safeArrayDestroyDescriptor(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayGetDim is the amount of dimensions in the SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetDim in Windows API. -func safeArrayGetDim(safearray *SafeArray) (*uint32, error) { - u := uint32(0) - return &u, NewError(E_NOTIMPL) -} - -// safeArrayGetElementSize is the element size in bytes. -// -// AKA: SafeArrayGetElemsize in Windows API. -func safeArrayGetElementSize(safearray *SafeArray) (*uint32, error) { - u := uint32(0) - return &u, NewError(E_NOTIMPL) -} - -// safeArrayGetElement retrieves element at given index. -func safeArrayGetElement(safearray *SafeArray, index int32, pv unsafe.Pointer) error { - return NewError(E_NOTIMPL) -} - -// safeArrayGetElement retrieves element at given index and converts to string. -func safeArrayGetElementString(safearray *SafeArray, index int32) (string, error) { - return "", NewError(E_NOTIMPL) -} - -// safeArrayGetIID is the InterfaceID of the elements in the SafeArray. -// -// AKA: SafeArrayGetIID in Windows API. -func safeArrayGetIID(safearray *SafeArray) (*GUID, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArrayGetLBound returns lower bounds of SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetLBound in Windows API. -func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (int32, error) { - return int32(0), NewError(E_NOTIMPL) -} - -// safeArrayGetUBound returns upper bounds of SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetUBound in Windows API. -func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (int32, error) { - return int32(0), NewError(E_NOTIMPL) -} - -// safeArrayGetVartype returns data type of SafeArray. -// -// AKA: SafeArrayGetVartype in Windows API. -func safeArrayGetVartype(safearray *SafeArray) (uint16, error) { - return uint16(0), NewError(E_NOTIMPL) -} - -// safeArrayLock locks SafeArray for reading to modify SafeArray. -// -// This must be called during some calls to ensure that another process does not -// read or write to the SafeArray during editing. -// -// AKA: SafeArrayLock in Windows API. -func safeArrayLock(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayUnlock unlocks SafeArray for reading. -// -// AKA: SafeArrayUnlock in Windows API. -func safeArrayUnlock(safearray *SafeArray) error { - return NewError(E_NOTIMPL) -} - -// safeArrayPutElement stores the data element at the specified location in the -// array. -// -// AKA: SafeArrayPutElement in Windows API. -func safeArrayPutElement(safearray *SafeArray, index int64, element uintptr) error { - return NewError(E_NOTIMPL) -} - -// safeArrayGetRecordInfo accesses IRecordInfo info for custom types. -// -// AKA: SafeArrayGetRecordInfo in Windows API. -// -// XXX: Must implement IRecordInfo interface for this to return. -func safeArrayGetRecordInfo(safearray *SafeArray) (interface{}, error) { - return nil, NewError(E_NOTIMPL) -} - -// safeArraySetRecordInfo mutates IRecordInfo info for custom types. -// -// AKA: SafeArraySetRecordInfo in Windows API. -// -// XXX: Must implement IRecordInfo interface for this to return. -func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}) error { - return NewError(E_NOTIMPL) -} diff --git a/vendor/github.com/go-ole/go-ole/safearray_windows.go b/vendor/github.com/go-ole/go-ole/safearray_windows.go deleted file mode 100644 index 0c1b3a10ff..0000000000 --- a/vendor/github.com/go-ole/go-ole/safearray_windows.go +++ /dev/null @@ -1,337 +0,0 @@ -// +build windows - -package ole - -import ( - "unsafe" -) - -var ( - procSafeArrayAccessData = modoleaut32.NewProc("SafeArrayAccessData") - procSafeArrayAllocData = modoleaut32.NewProc("SafeArrayAllocData") - procSafeArrayAllocDescriptor = modoleaut32.NewProc("SafeArrayAllocDescriptor") - procSafeArrayAllocDescriptorEx = modoleaut32.NewProc("SafeArrayAllocDescriptorEx") - procSafeArrayCopy = modoleaut32.NewProc("SafeArrayCopy") - procSafeArrayCopyData = modoleaut32.NewProc("SafeArrayCopyData") - procSafeArrayCreate = modoleaut32.NewProc("SafeArrayCreate") - procSafeArrayCreateEx = modoleaut32.NewProc("SafeArrayCreateEx") - procSafeArrayCreateVector = modoleaut32.NewProc("SafeArrayCreateVector") - procSafeArrayCreateVectorEx = modoleaut32.NewProc("SafeArrayCreateVectorEx") - procSafeArrayDestroy = modoleaut32.NewProc("SafeArrayDestroy") - procSafeArrayDestroyData = modoleaut32.NewProc("SafeArrayDestroyData") - procSafeArrayDestroyDescriptor = modoleaut32.NewProc("SafeArrayDestroyDescriptor") - procSafeArrayGetDim = modoleaut32.NewProc("SafeArrayGetDim") - procSafeArrayGetElement = modoleaut32.NewProc("SafeArrayGetElement") - procSafeArrayGetElemsize = modoleaut32.NewProc("SafeArrayGetElemsize") - procSafeArrayGetIID = modoleaut32.NewProc("SafeArrayGetIID") - procSafeArrayGetLBound = modoleaut32.NewProc("SafeArrayGetLBound") - procSafeArrayGetUBound = modoleaut32.NewProc("SafeArrayGetUBound") - procSafeArrayGetVartype = modoleaut32.NewProc("SafeArrayGetVartype") - procSafeArrayLock = modoleaut32.NewProc("SafeArrayLock") - procSafeArrayPtrOfIndex = modoleaut32.NewProc("SafeArrayPtrOfIndex") - procSafeArrayUnaccessData = modoleaut32.NewProc("SafeArrayUnaccessData") - procSafeArrayUnlock = modoleaut32.NewProc("SafeArrayUnlock") - procSafeArrayPutElement = modoleaut32.NewProc("SafeArrayPutElement") - //procSafeArrayRedim = modoleaut32.NewProc("SafeArrayRedim") // TODO - //procSafeArraySetIID = modoleaut32.NewProc("SafeArraySetIID") // TODO - procSafeArrayGetRecordInfo = modoleaut32.NewProc("SafeArrayGetRecordInfo") - procSafeArraySetRecordInfo = modoleaut32.NewProc("SafeArraySetRecordInfo") -) - -// safeArrayAccessData returns raw array pointer. -// -// AKA: SafeArrayAccessData in Windows API. -// Todo: Test -func safeArrayAccessData(safearray *SafeArray) (element uintptr, err error) { - err = convertHresultToError( - procSafeArrayAccessData.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&element)))) - return -} - -// safeArrayUnaccessData releases raw array. -// -// AKA: SafeArrayUnaccessData in Windows API. -func safeArrayUnaccessData(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayUnaccessData.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayAllocData allocates SafeArray. -// -// AKA: SafeArrayAllocData in Windows API. -func safeArrayAllocData(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayAllocData.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayAllocDescriptor allocates SafeArray. -// -// AKA: SafeArrayAllocDescriptor in Windows API. -func safeArrayAllocDescriptor(dimensions uint32) (safearray *SafeArray, err error) { - err = convertHresultToError( - procSafeArrayAllocDescriptor.Call(uintptr(dimensions), uintptr(unsafe.Pointer(&safearray)))) - return -} - -// safeArrayAllocDescriptorEx allocates SafeArray. -// -// AKA: SafeArrayAllocDescriptorEx in Windows API. -func safeArrayAllocDescriptorEx(variantType VT, dimensions uint32) (safearray *SafeArray, err error) { - err = convertHresultToError( - procSafeArrayAllocDescriptorEx.Call( - uintptr(variantType), - uintptr(dimensions), - uintptr(unsafe.Pointer(&safearray)))) - return -} - -// safeArrayCopy returns copy of SafeArray. -// -// AKA: SafeArrayCopy in Windows API. -func safeArrayCopy(original *SafeArray) (safearray *SafeArray, err error) { - err = convertHresultToError( - procSafeArrayCopy.Call( - uintptr(unsafe.Pointer(original)), - uintptr(unsafe.Pointer(&safearray)))) - return -} - -// safeArrayCopyData duplicates SafeArray into another SafeArray object. -// -// AKA: SafeArrayCopyData in Windows API. -func safeArrayCopyData(original *SafeArray, duplicate *SafeArray) (err error) { - err = convertHresultToError( - procSafeArrayCopyData.Call( - uintptr(unsafe.Pointer(original)), - uintptr(unsafe.Pointer(duplicate)))) - return -} - -// safeArrayCreate creates SafeArray. -// -// AKA: SafeArrayCreate in Windows API. -func safeArrayCreate(variantType VT, dimensions uint32, bounds *SafeArrayBound) (safearray *SafeArray, err error) { - sa, _, err := procSafeArrayCreate.Call( - uintptr(variantType), - uintptr(dimensions), - uintptr(unsafe.Pointer(bounds))) - safearray = (*SafeArray)(unsafe.Pointer(&sa)) - return -} - -// safeArrayCreateEx creates SafeArray. -// -// AKA: SafeArrayCreateEx in Windows API. -func safeArrayCreateEx(variantType VT, dimensions uint32, bounds *SafeArrayBound, extra uintptr) (safearray *SafeArray, err error) { - sa, _, err := procSafeArrayCreateEx.Call( - uintptr(variantType), - uintptr(dimensions), - uintptr(unsafe.Pointer(bounds)), - extra) - safearray = (*SafeArray)(unsafe.Pointer(sa)) - return -} - -// safeArrayCreateVector creates SafeArray. -// -// AKA: SafeArrayCreateVector in Windows API. -func safeArrayCreateVector(variantType VT, lowerBound int32, length uint32) (safearray *SafeArray, err error) { - sa, _, err := procSafeArrayCreateVector.Call( - uintptr(variantType), - uintptr(lowerBound), - uintptr(length)) - safearray = (*SafeArray)(unsafe.Pointer(sa)) - return -} - -// safeArrayCreateVectorEx creates SafeArray. -// -// AKA: SafeArrayCreateVectorEx in Windows API. -func safeArrayCreateVectorEx(variantType VT, lowerBound int32, length uint32, extra uintptr) (safearray *SafeArray, err error) { - sa, _, err := procSafeArrayCreateVectorEx.Call( - uintptr(variantType), - uintptr(lowerBound), - uintptr(length), - extra) - safearray = (*SafeArray)(unsafe.Pointer(sa)) - return -} - -// safeArrayDestroy destroys SafeArray object. -// -// AKA: SafeArrayDestroy in Windows API. -func safeArrayDestroy(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayDestroy.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayDestroyData destroys SafeArray object. -// -// AKA: SafeArrayDestroyData in Windows API. -func safeArrayDestroyData(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayDestroyData.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayDestroyDescriptor destroys SafeArray object. -// -// AKA: SafeArrayDestroyDescriptor in Windows API. -func safeArrayDestroyDescriptor(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayDestroyDescriptor.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayGetDim is the amount of dimensions in the SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetDim in Windows API. -func safeArrayGetDim(safearray *SafeArray) (dimensions *uint32, err error) { - l, _, err := procSafeArrayGetDim.Call(uintptr(unsafe.Pointer(safearray))) - dimensions = (*uint32)(unsafe.Pointer(l)) - return -} - -// safeArrayGetElementSize is the element size in bytes. -// -// AKA: SafeArrayGetElemsize in Windows API. -func safeArrayGetElementSize(safearray *SafeArray) (length *uint32, err error) { - l, _, err := procSafeArrayGetElemsize.Call(uintptr(unsafe.Pointer(safearray))) - length = (*uint32)(unsafe.Pointer(l)) - return -} - -// safeArrayGetElement retrieves element at given index. -func safeArrayGetElement(safearray *SafeArray, index int32, pv unsafe.Pointer) error { - return convertHresultToError( - procSafeArrayGetElement.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&index)), - uintptr(pv))) -} - -// safeArrayGetElementString retrieves element at given index and converts to string. -func safeArrayGetElementString(safearray *SafeArray, index int32) (str string, err error) { - var element *int16 - err = convertHresultToError( - procSafeArrayGetElement.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&index)), - uintptr(unsafe.Pointer(&element)))) - str = BstrToString(*(**uint16)(unsafe.Pointer(&element))) - SysFreeString(element) - return -} - -// safeArrayGetIID is the InterfaceID of the elements in the SafeArray. -// -// AKA: SafeArrayGetIID in Windows API. -func safeArrayGetIID(safearray *SafeArray) (guid *GUID, err error) { - err = convertHresultToError( - procSafeArrayGetIID.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&guid)))) - return -} - -// safeArrayGetLBound returns lower bounds of SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetLBound in Windows API. -func safeArrayGetLBound(safearray *SafeArray, dimension uint32) (lowerBound int32, err error) { - err = convertHresultToError( - procSafeArrayGetLBound.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(dimension), - uintptr(unsafe.Pointer(&lowerBound)))) - return -} - -// safeArrayGetUBound returns upper bounds of SafeArray. -// -// SafeArrays may have multiple dimensions. Meaning, it could be -// multidimensional array. -// -// AKA: SafeArrayGetUBound in Windows API. -func safeArrayGetUBound(safearray *SafeArray, dimension uint32) (upperBound int32, err error) { - err = convertHresultToError( - procSafeArrayGetUBound.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(dimension), - uintptr(unsafe.Pointer(&upperBound)))) - return -} - -// safeArrayGetVartype returns data type of SafeArray. -// -// AKA: SafeArrayGetVartype in Windows API. -func safeArrayGetVartype(safearray *SafeArray) (varType uint16, err error) { - err = convertHresultToError( - procSafeArrayGetVartype.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&varType)))) - return -} - -// safeArrayLock locks SafeArray for reading to modify SafeArray. -// -// This must be called during some calls to ensure that another process does not -// read or write to the SafeArray during editing. -// -// AKA: SafeArrayLock in Windows API. -func safeArrayLock(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayLock.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayUnlock unlocks SafeArray for reading. -// -// AKA: SafeArrayUnlock in Windows API. -func safeArrayUnlock(safearray *SafeArray) (err error) { - err = convertHresultToError(procSafeArrayUnlock.Call(uintptr(unsafe.Pointer(safearray)))) - return -} - -// safeArrayPutElement stores the data element at the specified location in the -// array. -// -// AKA: SafeArrayPutElement in Windows API. -func safeArrayPutElement(safearray *SafeArray, index int64, element uintptr) (err error) { - err = convertHresultToError( - procSafeArrayPutElement.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&index)), - uintptr(unsafe.Pointer(element)))) - return -} - -// safeArrayGetRecordInfo accesses IRecordInfo info for custom types. -// -// AKA: SafeArrayGetRecordInfo in Windows API. -// -// XXX: Must implement IRecordInfo interface for this to return. -func safeArrayGetRecordInfo(safearray *SafeArray) (recordInfo interface{}, err error) { - err = convertHresultToError( - procSafeArrayGetRecordInfo.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&recordInfo)))) - return -} - -// safeArraySetRecordInfo mutates IRecordInfo info for custom types. -// -// AKA: SafeArraySetRecordInfo in Windows API. -// -// XXX: Must implement IRecordInfo interface for this to return. -func safeArraySetRecordInfo(safearray *SafeArray, recordInfo interface{}) (err error) { - err = convertHresultToError( - procSafeArraySetRecordInfo.Call( - uintptr(unsafe.Pointer(safearray)), - uintptr(unsafe.Pointer(&recordInfo)))) - return -} diff --git a/vendor/github.com/go-ole/go-ole/safearrayconversion.go b/vendor/github.com/go-ole/go-ole/safearrayconversion.go deleted file mode 100644 index da737293d7..0000000000 --- a/vendor/github.com/go-ole/go-ole/safearrayconversion.go +++ /dev/null @@ -1,140 +0,0 @@ -// Helper for converting SafeArray to array of objects. - -package ole - -import ( - "unsafe" -) - -type SafeArrayConversion struct { - Array *SafeArray -} - -func (sac *SafeArrayConversion) ToStringArray() (strings []string) { - totalElements, _ := sac.TotalElements(0) - strings = make([]string, totalElements) - - for i := int32(0); i < totalElements; i++ { - strings[int32(i)], _ = safeArrayGetElementString(sac.Array, i) - } - - return -} - -func (sac *SafeArrayConversion) ToByteArray() (bytes []byte) { - totalElements, _ := sac.TotalElements(0) - bytes = make([]byte, totalElements) - - for i := int32(0); i < totalElements; i++ { - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&bytes[int32(i)])) - } - - return -} - -func (sac *SafeArrayConversion) ToValueArray() (values []interface{}) { - totalElements, _ := sac.TotalElements(0) - values = make([]interface{}, totalElements) - vt, _ := safeArrayGetVartype(sac.Array) - - for i := int32(0); i < totalElements; i++ { - switch VT(vt) { - case VT_BOOL: - var v bool - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_I1: - var v int8 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_I2: - var v int16 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_I4: - var v int32 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_I8: - var v int64 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_UI1: - var v uint8 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_UI2: - var v uint16 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_UI4: - var v uint32 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_UI8: - var v uint64 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_R4: - var v float32 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_R8: - var v float64 - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v - case VT_BSTR: - v , _ := safeArrayGetElementString(sac.Array, i) - values[i] = v - case VT_VARIANT: - var v VARIANT - safeArrayGetElement(sac.Array, i, unsafe.Pointer(&v)) - values[i] = v.Value() - v.Clear() - default: - // TODO - } - } - - return -} - -func (sac *SafeArrayConversion) GetType() (varType uint16, err error) { - return safeArrayGetVartype(sac.Array) -} - -func (sac *SafeArrayConversion) GetDimensions() (dimensions *uint32, err error) { - return safeArrayGetDim(sac.Array) -} - -func (sac *SafeArrayConversion) GetSize() (length *uint32, err error) { - return safeArrayGetElementSize(sac.Array) -} - -func (sac *SafeArrayConversion) TotalElements(index uint32) (totalElements int32, err error) { - if index < 1 { - index = 1 - } - - // Get array bounds - var LowerBounds int32 - var UpperBounds int32 - - LowerBounds, err = safeArrayGetLBound(sac.Array, index) - if err != nil { - return - } - - UpperBounds, err = safeArrayGetUBound(sac.Array, index) - if err != nil { - return - } - - totalElements = UpperBounds - LowerBounds + 1 - return -} - -// Release Safe Array memory -func (sac *SafeArrayConversion) Release() { - safeArrayDestroy(sac.Array) -} diff --git a/vendor/github.com/go-ole/go-ole/safearrayslices.go b/vendor/github.com/go-ole/go-ole/safearrayslices.go deleted file mode 100644 index a9fa885f1d..0000000000 --- a/vendor/github.com/go-ole/go-ole/safearrayslices.go +++ /dev/null @@ -1,33 +0,0 @@ -// +build windows - -package ole - -import ( - "unsafe" -) - -func safeArrayFromByteSlice(slice []byte) *SafeArray { - array, _ := safeArrayCreateVector(VT_UI1, 0, uint32(len(slice))) - - if array == nil { - panic("Could not convert []byte to SAFEARRAY") - } - - for i, v := range slice { - safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(&v))) - } - return array -} - -func safeArrayFromStringSlice(slice []string) *SafeArray { - array, _ := safeArrayCreateVector(VT_BSTR, 0, uint32(len(slice))) - - if array == nil { - panic("Could not convert []string to SAFEARRAY") - } - // SysAllocStringLen(s) - for i, v := range slice { - safeArrayPutElement(array, int64(i), uintptr(unsafe.Pointer(SysAllocStringLen(v)))) - } - return array -} diff --git a/vendor/github.com/go-ole/go-ole/utility.go b/vendor/github.com/go-ole/go-ole/utility.go deleted file mode 100644 index 99ee82dc34..0000000000 --- a/vendor/github.com/go-ole/go-ole/utility.go +++ /dev/null @@ -1,101 +0,0 @@ -package ole - -import ( - "unicode/utf16" - "unsafe" -) - -// ClassIDFrom retrieves class ID whether given is program ID or application string. -// -// Helper that provides check against both Class ID from Program ID and Class ID from string. It is -// faster, if you know which you are using, to use the individual functions, but this will check -// against available functions for you. -func ClassIDFrom(programID string) (classID *GUID, err error) { - classID, err = CLSIDFromProgID(programID) - if err != nil { - classID, err = CLSIDFromString(programID) - if err != nil { - return - } - } - return -} - -// BytePtrToString converts byte pointer to a Go string. -func BytePtrToString(p *byte) string { - a := (*[10000]uint8)(unsafe.Pointer(p)) - i := 0 - for a[i] != 0 { - i++ - } - return string(a[:i]) -} - -// UTF16PtrToString is alias for LpOleStrToString. -// -// Kept for compatibility reasons. -func UTF16PtrToString(p *uint16) string { - return LpOleStrToString(p) -} - -// LpOleStrToString converts COM Unicode to Go string. -func LpOleStrToString(p *uint16) string { - if p == nil { - return "" - } - - length := lpOleStrLen(p) - a := make([]uint16, length) - - ptr := unsafe.Pointer(p) - - for i := 0; i < int(length); i++ { - a[i] = *(*uint16)(ptr) - ptr = unsafe.Pointer(uintptr(ptr) + 2) - } - - return string(utf16.Decode(a)) -} - -// BstrToString converts COM binary string to Go string. -func BstrToString(p *uint16) string { - if p == nil { - return "" - } - length := SysStringLen((*int16)(unsafe.Pointer(p))) - a := make([]uint16, length) - - ptr := unsafe.Pointer(p) - - for i := 0; i < int(length); i++ { - a[i] = *(*uint16)(ptr) - ptr = unsafe.Pointer(uintptr(ptr) + 2) - } - return string(utf16.Decode(a)) -} - -// lpOleStrLen returns the length of Unicode string. -func lpOleStrLen(p *uint16) (length int64) { - if p == nil { - return 0 - } - - ptr := unsafe.Pointer(p) - - for i := 0; ; i++ { - if 0 == *(*uint16)(ptr) { - length = int64(i) - break - } - ptr = unsafe.Pointer(uintptr(ptr) + 2) - } - return -} - -// convertHresultToError converts syscall to error, if call is unsuccessful. -func convertHresultToError(hr uintptr, r2 uintptr, ignore error) (err error) { - if hr != 0 { - err = NewError(hr) - } - return -} diff --git a/vendor/github.com/go-ole/go-ole/variables.go b/vendor/github.com/go-ole/go-ole/variables.go deleted file mode 100644 index a6add1b006..0000000000 --- a/vendor/github.com/go-ole/go-ole/variables.go +++ /dev/null @@ -1,15 +0,0 @@ -// +build windows - -package ole - -import ( - "golang.org/x/sys/windows" -) - -var ( - modcombase = windows.NewLazySystemDLL("combase.dll") - modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - modole32 = windows.NewLazySystemDLL("ole32.dll") - modoleaut32 = windows.NewLazySystemDLL("oleaut32.dll") - moduser32 = windows.NewLazySystemDLL("user32.dll") -) diff --git a/vendor/github.com/go-ole/go-ole/variant.go b/vendor/github.com/go-ole/go-ole/variant.go deleted file mode 100644 index a2c8402f7b..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant.go +++ /dev/null @@ -1,105 +0,0 @@ -package ole - -import "unsafe" - -// NewVariant returns new variant based on type and value. -func NewVariant(vt VT, val int64) VARIANT { - return VARIANT{VT: vt, Val: val} -} - -// ToIUnknown converts Variant to Unknown object. -func (v *VARIANT) ToIUnknown() *IUnknown { - if v.VT != VT_UNKNOWN { - return nil - } - return (*IUnknown)(unsafe.Pointer(uintptr(v.Val))) -} - -// ToIDispatch converts variant to dispatch object. -func (v *VARIANT) ToIDispatch() *IDispatch { - if v.VT != VT_DISPATCH { - return nil - } - return (*IDispatch)(unsafe.Pointer(uintptr(v.Val))) -} - -// ToArray converts variant to SafeArray helper. -func (v *VARIANT) ToArray() *SafeArrayConversion { - if v.VT != VT_SAFEARRAY { - if v.VT&VT_ARRAY == 0 { - return nil - } - } - var safeArray *SafeArray = (*SafeArray)(unsafe.Pointer(uintptr(v.Val))) - return &SafeArrayConversion{safeArray} -} - -// ToString converts variant to Go string. -func (v *VARIANT) ToString() string { - if v.VT != VT_BSTR { - return "" - } - return BstrToString(*(**uint16)(unsafe.Pointer(&v.Val))) -} - -// Clear the memory of variant object. -func (v *VARIANT) Clear() error { - return VariantClear(v) -} - -// Value returns variant value based on its type. -// -// Currently supported types: 2- and 4-byte integers, strings, bools. -// Note that 64-bit integers, datetimes, and other types are stored as strings -// and will be returned as strings. -// -// Needs to be further converted, because this returns an interface{}. -func (v *VARIANT) Value() interface{} { - switch v.VT { - case VT_I1: - return int8(v.Val) - case VT_UI1: - return uint8(v.Val) - case VT_I2: - return int16(v.Val) - case VT_UI2: - return uint16(v.Val) - case VT_I4: - return int32(v.Val) - case VT_UI4: - return uint32(v.Val) - case VT_I8: - return int64(v.Val) - case VT_UI8: - return uint64(v.Val) - case VT_INT: - return int(v.Val) - case VT_UINT: - return uint(v.Val) - case VT_INT_PTR: - return uintptr(v.Val) // TODO - case VT_UINT_PTR: - return uintptr(v.Val) - case VT_R4: - return *(*float32)(unsafe.Pointer(&v.Val)) - case VT_R8: - return *(*float64)(unsafe.Pointer(&v.Val)) - case VT_BSTR: - return v.ToString() - case VT_DATE: - // VT_DATE type will either return float64 or time.Time. - d := uint64(v.Val) - date, err := GetVariantDate(d) - if err != nil { - return float64(v.Val) - } - return date - case VT_UNKNOWN: - return v.ToIUnknown() - case VT_DISPATCH: - return v.ToIDispatch() - case VT_BOOL: - return (v.Val & 0xffff) != 0 - } - return nil -} diff --git a/vendor/github.com/go-ole/go-ole/variant_386.go b/vendor/github.com/go-ole/go-ole/variant_386.go deleted file mode 100644 index e73736bf39..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_386.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build 386 - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 -} diff --git a/vendor/github.com/go-ole/go-ole/variant_amd64.go b/vendor/github.com/go-ole/go-ole/variant_amd64.go deleted file mode 100644 index dccdde1323..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_amd64.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build amd64 - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 - _ [8]byte // 24 -} diff --git a/vendor/github.com/go-ole/go-ole/variant_arm.go b/vendor/github.com/go-ole/go-ole/variant_arm.go deleted file mode 100644 index d472454443..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_arm.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build arm - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 -} diff --git a/vendor/github.com/go-ole/go-ole/variant_arm64.go b/vendor/github.com/go-ole/go-ole/variant_arm64.go deleted file mode 100644 index 78473cec4f..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_arm64.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build arm64 -// +build arm64 - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 - _ [8]byte // 24 -} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_386.go b/vendor/github.com/go-ole/go-ole/variant_date_386.go deleted file mode 100644 index 1b970f63f5..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_date_386.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build windows,386 - -package ole - -import ( - "errors" - "syscall" - "time" - "unsafe" -) - -// GetVariantDate converts COM Variant Time value to Go time.Time. -func GetVariantDate(value uint64) (time.Time, error) { - var st syscall.Systemtime - v1 := uint32(value) - v2 := uint32(value >> 32) - r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) - if r != 0 { - return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil - } - return time.Now(), errors.New("Could not convert to time, passing current time.") -} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_amd64.go b/vendor/github.com/go-ole/go-ole/variant_date_amd64.go deleted file mode 100644 index 6952f1f0de..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_date_amd64.go +++ /dev/null @@ -1,20 +0,0 @@ -// +build windows,amd64 - -package ole - -import ( - "errors" - "syscall" - "time" - "unsafe" -) - -// GetVariantDate converts COM Variant Time value to Go time.Time. -func GetVariantDate(value uint64) (time.Time, error) { - var st syscall.Systemtime - r, _, _ := procVariantTimeToSystemTime.Call(uintptr(value), uintptr(unsafe.Pointer(&st))) - if r != 0 { - return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil - } - return time.Now(), errors.New("Could not convert to time, passing current time.") -} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_arm.go b/vendor/github.com/go-ole/go-ole/variant_date_arm.go deleted file mode 100644 index 09ec7b5cfd..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_date_arm.go +++ /dev/null @@ -1,22 +0,0 @@ -// +build windows,arm - -package ole - -import ( - "errors" - "syscall" - "time" - "unsafe" -) - -// GetVariantDate converts COM Variant Time value to Go time.Time. -func GetVariantDate(value uint64) (time.Time, error) { - var st syscall.Systemtime - v1 := uint32(value) - v2 := uint32(value >> 32) - r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) - if r != 0 { - return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil - } - return time.Now(), errors.New("Could not convert to time, passing current time.") -} diff --git a/vendor/github.com/go-ole/go-ole/variant_date_arm64.go b/vendor/github.com/go-ole/go-ole/variant_date_arm64.go deleted file mode 100644 index 02b04a0d4a..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_date_arm64.go +++ /dev/null @@ -1,23 +0,0 @@ -//go:build windows && arm64 -// +build windows,arm64 - -package ole - -import ( - "errors" - "syscall" - "time" - "unsafe" -) - -// GetVariantDate converts COM Variant Time value to Go time.Time. -func GetVariantDate(value uint64) (time.Time, error) { - var st syscall.Systemtime - v1 := uint32(value) - v2 := uint32(value >> 32) - r, _, _ := procVariantTimeToSystemTime.Call(uintptr(v1), uintptr(v2), uintptr(unsafe.Pointer(&st))) - if r != 0 { - return time.Date(int(st.Year), time.Month(st.Month), int(st.Day), int(st.Hour), int(st.Minute), int(st.Second), int(st.Milliseconds/1000), time.UTC), nil - } - return time.Now(), errors.New("Could not convert to time, passing current time.") -} diff --git a/vendor/github.com/go-ole/go-ole/variant_ppc64le.go b/vendor/github.com/go-ole/go-ole/variant_ppc64le.go deleted file mode 100644 index 326427a7d1..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_ppc64le.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build ppc64le - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 - _ [8]byte // 24 -} diff --git a/vendor/github.com/go-ole/go-ole/variant_s390x.go b/vendor/github.com/go-ole/go-ole/variant_s390x.go deleted file mode 100644 index 9874ca66b4..0000000000 --- a/vendor/github.com/go-ole/go-ole/variant_s390x.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build s390x - -package ole - -type VARIANT struct { - VT VT // 2 - wReserved1 uint16 // 4 - wReserved2 uint16 // 6 - wReserved3 uint16 // 8 - Val int64 // 16 - _ [8]byte // 24 -} diff --git a/vendor/github.com/go-ole/go-ole/vt_string.go b/vendor/github.com/go-ole/go-ole/vt_string.go deleted file mode 100644 index 729b4a04dd..0000000000 --- a/vendor/github.com/go-ole/go-ole/vt_string.go +++ /dev/null @@ -1,58 +0,0 @@ -// generated by stringer -output vt_string.go -type VT; DO NOT EDIT - -package ole - -import "fmt" - -const ( - _VT_name_0 = "VT_EMPTYVT_NULLVT_I2VT_I4VT_R4VT_R8VT_CYVT_DATEVT_BSTRVT_DISPATCHVT_ERRORVT_BOOLVT_VARIANTVT_UNKNOWNVT_DECIMAL" - _VT_name_1 = "VT_I1VT_UI1VT_UI2VT_UI4VT_I8VT_UI8VT_INTVT_UINTVT_VOIDVT_HRESULTVT_PTRVT_SAFEARRAYVT_CARRAYVT_USERDEFINEDVT_LPSTRVT_LPWSTR" - _VT_name_2 = "VT_RECORDVT_INT_PTRVT_UINT_PTR" - _VT_name_3 = "VT_FILETIMEVT_BLOBVT_STREAMVT_STORAGEVT_STREAMED_OBJECTVT_STORED_OBJECTVT_BLOB_OBJECTVT_CFVT_CLSID" - _VT_name_4 = "VT_BSTR_BLOBVT_VECTOR" - _VT_name_5 = "VT_ARRAY" - _VT_name_6 = "VT_BYREF" - _VT_name_7 = "VT_RESERVED" - _VT_name_8 = "VT_ILLEGAL" -) - -var ( - _VT_index_0 = [...]uint8{0, 8, 15, 20, 25, 30, 35, 40, 47, 54, 65, 73, 80, 90, 100, 110} - _VT_index_1 = [...]uint8{0, 5, 11, 17, 23, 28, 34, 40, 47, 54, 64, 70, 82, 91, 105, 113, 122} - _VT_index_2 = [...]uint8{0, 9, 19, 30} - _VT_index_3 = [...]uint8{0, 11, 18, 27, 37, 55, 71, 85, 90, 98} - _VT_index_4 = [...]uint8{0, 12, 21} - _VT_index_5 = [...]uint8{0, 8} - _VT_index_6 = [...]uint8{0, 8} - _VT_index_7 = [...]uint8{0, 11} - _VT_index_8 = [...]uint8{0, 10} -) - -func (i VT) String() string { - switch { - case 0 <= i && i <= 14: - return _VT_name_0[_VT_index_0[i]:_VT_index_0[i+1]] - case 16 <= i && i <= 31: - i -= 16 - return _VT_name_1[_VT_index_1[i]:_VT_index_1[i+1]] - case 36 <= i && i <= 38: - i -= 36 - return _VT_name_2[_VT_index_2[i]:_VT_index_2[i+1]] - case 64 <= i && i <= 72: - i -= 64 - return _VT_name_3[_VT_index_3[i]:_VT_index_3[i+1]] - case 4095 <= i && i <= 4096: - i -= 4095 - return _VT_name_4[_VT_index_4[i]:_VT_index_4[i+1]] - case i == 8192: - return _VT_name_5 - case i == 16384: - return _VT_name_6 - case i == 32768: - return _VT_name_7 - case i == 65535: - return _VT_name_8 - default: - return fmt.Sprintf("VT(%d)", i) - } -} diff --git a/vendor/github.com/go-ole/go-ole/winrt.go b/vendor/github.com/go-ole/go-ole/winrt.go deleted file mode 100644 index 4e9eca7324..0000000000 --- a/vendor/github.com/go-ole/go-ole/winrt.go +++ /dev/null @@ -1,99 +0,0 @@ -// +build windows - -package ole - -import ( - "reflect" - "syscall" - "unicode/utf8" - "unsafe" -) - -var ( - procRoInitialize = modcombase.NewProc("RoInitialize") - procRoActivateInstance = modcombase.NewProc("RoActivateInstance") - procRoGetActivationFactory = modcombase.NewProc("RoGetActivationFactory") - procWindowsCreateString = modcombase.NewProc("WindowsCreateString") - procWindowsDeleteString = modcombase.NewProc("WindowsDeleteString") - procWindowsGetStringRawBuffer = modcombase.NewProc("WindowsGetStringRawBuffer") -) - -func RoInitialize(thread_type uint32) (err error) { - hr, _, _ := procRoInitialize.Call(uintptr(thread_type)) - if hr != 0 { - err = NewError(hr) - } - return -} - -func RoActivateInstance(clsid string) (ins *IInspectable, err error) { - hClsid, err := NewHString(clsid) - if err != nil { - return nil, err - } - defer DeleteHString(hClsid) - - hr, _, _ := procRoActivateInstance.Call( - uintptr(unsafe.Pointer(hClsid)), - uintptr(unsafe.Pointer(&ins))) - if hr != 0 { - err = NewError(hr) - } - return -} - -func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { - hClsid, err := NewHString(clsid) - if err != nil { - return nil, err - } - defer DeleteHString(hClsid) - - hr, _, _ := procRoGetActivationFactory.Call( - uintptr(unsafe.Pointer(hClsid)), - uintptr(unsafe.Pointer(iid)), - uintptr(unsafe.Pointer(&ins))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// HString is handle string for pointers. -type HString uintptr - -// NewHString returns a new HString for Go string. -func NewHString(s string) (hstring HString, err error) { - u16 := syscall.StringToUTF16Ptr(s) - len := uint32(utf8.RuneCountInString(s)) - hr, _, _ := procWindowsCreateString.Call( - uintptr(unsafe.Pointer(u16)), - uintptr(len), - uintptr(unsafe.Pointer(&hstring))) - if hr != 0 { - err = NewError(hr) - } - return -} - -// DeleteHString deletes HString. -func DeleteHString(hstring HString) (err error) { - hr, _, _ := procWindowsDeleteString.Call(uintptr(hstring)) - if hr != 0 { - err = NewError(hr) - } - return -} - -// String returns Go string value of HString. -func (h HString) String() string { - var u16buf uintptr - var u16len uint32 - u16buf, _, _ = procWindowsGetStringRawBuffer.Call( - uintptr(h), - uintptr(unsafe.Pointer(&u16len))) - - u16hdr := reflect.SliceHeader{Data: u16buf, Len: int(u16len), Cap: int(u16len)} - u16 := *(*[]uint16)(unsafe.Pointer(&u16hdr)) - return syscall.UTF16ToString(u16) -} diff --git a/vendor/github.com/go-ole/go-ole/winrt_doc.go b/vendor/github.com/go-ole/go-ole/winrt_doc.go deleted file mode 100644 index 52e6d74c9a..0000000000 --- a/vendor/github.com/go-ole/go-ole/winrt_doc.go +++ /dev/null @@ -1,36 +0,0 @@ -// +build !windows - -package ole - -// RoInitialize -func RoInitialize(thread_type uint32) (err error) { - return NewError(E_NOTIMPL) -} - -// RoActivateInstance -func RoActivateInstance(clsid string) (ins *IInspectable, err error) { - return nil, NewError(E_NOTIMPL) -} - -// RoGetActivationFactory -func RoGetActivationFactory(clsid string, iid *GUID) (ins *IInspectable, err error) { - return nil, NewError(E_NOTIMPL) -} - -// HString is handle string for pointers. -type HString uintptr - -// NewHString returns a new HString for Go string. -func NewHString(s string) (hstring HString, err error) { - return HString(uintptr(0)), NewError(E_NOTIMPL) -} - -// DeleteHString deletes HString. -func DeleteHString(hstring HString) (err error) { - return NewError(E_NOTIMPL) -} - -// String returns Go string value of HString. -func (h HString) String() string { - return "" -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/.editorconfig b/vendor/github.com/go-viper/mapstructure/v2/.editorconfig deleted file mode 100644 index faef0c91e7..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/.editorconfig +++ /dev/null @@ -1,21 +0,0 @@ -root = true - -[*] -charset = utf-8 -end_of_line = lf -indent_size = 4 -indent_style = space -insert_final_newline = true -trim_trailing_whitespace = true - -[*.go] -indent_style = tab - -[{Makefile,*.mk}] -indent_style = tab - -[*.nix] -indent_size = 2 - -[.golangci.yaml] -indent_size = 2 diff --git a/vendor/github.com/go-viper/mapstructure/v2/.envrc b/vendor/github.com/go-viper/mapstructure/v2/.envrc deleted file mode 100644 index 2e0f9f5f71..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/.envrc +++ /dev/null @@ -1,4 +0,0 @@ -if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then - source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4=" -fi -use flake . --impure diff --git a/vendor/github.com/go-viper/mapstructure/v2/.gitignore b/vendor/github.com/go-viper/mapstructure/v2/.gitignore deleted file mode 100644 index 470e7ca2bd..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/.devenv/ -/.direnv/ -/.pre-commit-config.yaml -/bin/ -/build/ -/var/ diff --git a/vendor/github.com/go-viper/mapstructure/v2/.golangci.yaml b/vendor/github.com/go-viper/mapstructure/v2/.golangci.yaml deleted file mode 100644 index bda9625668..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/.golangci.yaml +++ /dev/null @@ -1,48 +0,0 @@ -version: "2" - -run: - timeout: 10m - -linters: - enable: - - govet - - ineffassign - # - misspell - - nolintlint - # - revive - - disable: - - errcheck - - staticcheck - - unused - - settings: - misspell: - locale: US - nolintlint: - allow-unused: false # report any unused nolint directives - require-specific: false # don't require nolint directives to be specific about which linter is being skipped - -formatters: - enable: - - gci - - gofmt - - gofumpt - - goimports - # - golines - - settings: - gci: - sections: - - standard - - default - - localmodule - gofmt: - simplify: true - rewrite-rules: - - pattern: interface{} - replacement: any - - exclusions: - paths: - - internal/ diff --git a/vendor/github.com/go-viper/mapstructure/v2/CHANGELOG.md b/vendor/github.com/go-viper/mapstructure/v2/CHANGELOG.md deleted file mode 100644 index afd44e5f5f..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/CHANGELOG.md +++ /dev/null @@ -1,104 +0,0 @@ -> [!WARNING] -> As of v2 of this library, change log can be found in GitHub releases. - -## 1.5.1 - -* Wrap errors so they're compatible with `errors.Is` and `errors.As` [GH-282] -* Fix map of slices not decoding properly in certain cases. [GH-266] - -## 1.5.0 - -* New option `IgnoreUntaggedFields` to ignore decoding to any fields - without `mapstructure` (or the configured tag name) set [GH-277] -* New option `ErrorUnset` which makes it an error if any fields - in a target struct are not set by the decoding process. [GH-225] -* New function `OrComposeDecodeHookFunc` to help compose decode hooks. [GH-240] -* Decoding to slice from array no longer crashes [GH-265] -* Decode nested struct pointers to map [GH-271] -* Fix issue where `,squash` was ignored if `Squash` option was set. [GH-280] -* Fix issue where fields with `,omitempty` would sometimes decode - into a map with an empty string key [GH-281] - -## 1.4.3 - -* Fix cases where `json.Number` didn't decode properly [GH-261] - -## 1.4.2 - -* Custom name matchers to support any sort of casing, formatting, etc. for - field names. [GH-250] -* Fix possible panic in ComposeDecodeHookFunc [GH-251] - -## 1.4.1 - -* Fix regression where `*time.Time` value would be set to empty and not be sent - to decode hooks properly [GH-232] - -## 1.4.0 - -* A new decode hook type `DecodeHookFuncValue` has been added that has - access to the full values. [GH-183] -* Squash is now supported with embedded fields that are struct pointers [GH-205] -* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206] - -## 1.3.3 - -* Decoding maps from maps creates a settable value for decode hooks [GH-203] - -## 1.3.2 - -* Decode into interface type with a struct value is supported [GH-187] - -## 1.3.1 - -* Squash should only squash embedded structs. [GH-194] - -## 1.3.0 - -* Added `",omitempty"` support. This will ignore zero values in the source - structure when encoding. [GH-145] - -## 1.2.3 - -* Fix duplicate entries in Keys list with pointer values. [GH-185] - -## 1.2.2 - -* Do not add unsettable (unexported) values to the unused metadata key - or "remain" value. [GH-150] - -## 1.2.1 - -* Go modules checksum mismatch fix - -## 1.2.0 - -* Added support to capture unused values in a field using the `",remain"` value - in the mapstructure tag. There is an example to showcase usage. -* Added `DecoderConfig` option to always squash embedded structs -* `json.Number` can decode into `uint` types -* Empty slices are preserved and not replaced with nil slices -* Fix panic that can occur in when decoding a map into a nil slice of structs -* Improved package documentation for godoc - -## 1.1.2 - -* Fix error when decode hook decodes interface implementation into interface - type. [GH-140] - -## 1.1.1 - -* Fix panic that can happen in `decodePtr` - -## 1.1.0 - -* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] -* Support struct to struct decoding [GH-137] -* If source map value is nil, then destination map value is nil (instead of empty) -* If source slice value is nil, then destination slice value is nil (instead of empty) -* If source pointer is nil, then destination pointer is set to nil (instead of - allocated zero value of type) - -## 1.0.0 - -* Initial tagged stable release. diff --git a/vendor/github.com/go-viper/mapstructure/v2/LICENSE b/vendor/github.com/go-viper/mapstructure/v2/LICENSE deleted file mode 100644 index f9c841a51e..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/go-viper/mapstructure/v2/README.md b/vendor/github.com/go-viper/mapstructure/v2/README.md deleted file mode 100644 index 45db719755..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# mapstructure - -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/go-viper/mapstructure/ci.yaml?style=flat-square)](https://github.com/go-viper/mapstructure/actions/workflows/ci.yaml) -[![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/mod/github.com/go-viper/mapstructure/v2) -![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/go-viper/mapstructure?style=flat-square&color=61CFDD) -[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/go-viper/mapstructure/badge?style=flat-square)](https://deps.dev/go/github.com%252Fgo-viper%252Fmapstructure%252Fv2) - -mapstructure is a Go library for decoding generic map values to structures -and vice versa, while providing helpful error handling. - -This library is most useful when decoding values from some data stream (JSON, -Gob, etc.) where you don't _quite_ know the structure of the underlying data -until you read a part of it. You can therefore read a `map[string]interface{}` -and use this library to decode it into the proper underlying native Go -structure. - -## Installation - -```shell -go get github.com/go-viper/mapstructure/v2 -``` - -## Migrating from `github.com/mitchellh/mapstructure` - -[@mitchehllh](https://github.com/mitchellh) announced his intent to archive some of his unmaintained projects (see [here](https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc) and [here](https://github.com/mitchellh/mapstructure/issues/349)). This is a repository achieved the "blessed fork" status. - -You can migrate to this package by changing your import paths in your Go files to `github.com/go-viper/mapstructure/v2`. -The API is the same, so you don't need to change anything else. - -Here is a script that can help you with the migration: - -```shell -sed -i 's|github.com/mitchellh/mapstructure|github.com/go-viper/mapstructure/v2|g' $(find . -type f -name '*.go') -``` - -If you need more time to migrate your code, that is absolutely fine. - -Some of the latest fixes are backported to the v1 release branch of this package, so you can use the Go modules `replace` feature until you are ready to migrate: - -```shell -replace github.com/mitchellh/mapstructure => github.com/go-viper/mapstructure v1.6.0 -``` - -## Usage & Example - -For usage and examples see the [documentation](https://pkg.go.dev/mod/github.com/go-viper/mapstructure/v2). - -The `Decode` function has examples associated with it there. - -## But Why?! - -Go offers fantastic standard libraries for decoding formats such as JSON. -The standard method is to have a struct pre-created, and populate that struct -from the bytes of the encoded format. This is great, but the problem is if -you have configuration or an encoding that changes slightly depending on -specific fields. For example, consider this JSON: - -```json -{ - "type": "person", - "name": "Mitchell" -} -``` - -Perhaps we can't populate a specific structure without first reading -the "type" field from the JSON. We could always do two passes over the -decoding of the JSON (reading the "type" first, and the rest later). -However, it is much simpler to just decode this into a `map[string]interface{}` -structure, read the "type" key, then use something like this library -to decode it into the proper structure. - -## Credits - -Mapstructure was originally created by [@mitchellh](https://github.com/mitchellh). -This is a maintained fork of the original library. - -Read more about the reasons for the fork [here](https://github.com/mitchellh/mapstructure/issues/349). - -## License - -The project is licensed under the [MIT License](LICENSE). diff --git a/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go b/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go deleted file mode 100644 index a852a0a04c..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/decode_hooks.go +++ /dev/null @@ -1,714 +0,0 @@ -package mapstructure - -import ( - "encoding" - "errors" - "fmt" - "net" - "net/netip" - "net/url" - "reflect" - "strconv" - "strings" - "time" -) - -// typedDecodeHook takes a raw DecodeHookFunc (an any) and turns -// it into the proper DecodeHookFunc type, such as DecodeHookFuncType. -func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc { - // Create variables here so we can reference them with the reflect pkg - var f1 DecodeHookFuncType - var f2 DecodeHookFuncKind - var f3 DecodeHookFuncValue - - // Fill in the variables into this interface and the rest is done - // automatically using the reflect package. - potential := []any{f1, f2, f3} - - v := reflect.ValueOf(h) - vt := v.Type() - for _, raw := range potential { - pt := reflect.ValueOf(raw).Type() - if vt.ConvertibleTo(pt) { - return v.Convert(pt).Interface() - } - } - - return nil -} - -// cachedDecodeHook takes a raw DecodeHookFunc (an any) and turns -// it into a closure to be used directly -// if the type fails to convert we return a closure always erroring to keep the previous behaviour -func cachedDecodeHook(raw DecodeHookFunc) func(from reflect.Value, to reflect.Value) (any, error) { - switch f := typedDecodeHook(raw).(type) { - case DecodeHookFuncType: - return func(from reflect.Value, to reflect.Value) (any, error) { - return f(from.Type(), to.Type(), from.Interface()) - } - case DecodeHookFuncKind: - return func(from reflect.Value, to reflect.Value) (any, error) { - return f(from.Kind(), to.Kind(), from.Interface()) - } - case DecodeHookFuncValue: - return func(from reflect.Value, to reflect.Value) (any, error) { - return f(from, to) - } - default: - return func(from reflect.Value, to reflect.Value) (any, error) { - return nil, errors.New("invalid decode hook signature") - } - } -} - -// DecodeHookExec executes the given decode hook. This should be used -// since it'll naturally degrade to the older backwards compatible DecodeHookFunc -// that took reflect.Kind instead of reflect.Type. -func DecodeHookExec( - raw DecodeHookFunc, - from reflect.Value, to reflect.Value, -) (any, error) { - switch f := typedDecodeHook(raw).(type) { - case DecodeHookFuncType: - return f(from.Type(), to.Type(), from.Interface()) - case DecodeHookFuncKind: - return f(from.Kind(), to.Kind(), from.Interface()) - case DecodeHookFuncValue: - return f(from, to) - default: - return nil, errors.New("invalid decode hook signature") - } -} - -// ComposeDecodeHookFunc creates a single DecodeHookFunc that -// automatically composes multiple DecodeHookFuncs. -// -// The composed funcs are called in order, with the result of the -// previous transformation. -func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc { - cached := make([]func(from reflect.Value, to reflect.Value) (any, error), 0, len(fs)) - for _, f := range fs { - cached = append(cached, cachedDecodeHook(f)) - } - return func(f reflect.Value, t reflect.Value) (any, error) { - var err error - data := f.Interface() - - newFrom := f - for _, c := range cached { - data, err = c(newFrom, t) - if err != nil { - return nil, err - } - if v, ok := data.(reflect.Value); ok { - newFrom = v - } else { - newFrom = reflect.ValueOf(data) - } - } - - return data, nil - } -} - -// OrComposeDecodeHookFunc executes all input hook functions until one of them returns no error. In that case its value is returned. -// If all hooks return an error, OrComposeDecodeHookFunc returns an error concatenating all error messages. -func OrComposeDecodeHookFunc(ff ...DecodeHookFunc) DecodeHookFunc { - cached := make([]func(from reflect.Value, to reflect.Value) (any, error), 0, len(ff)) - for _, f := range ff { - cached = append(cached, cachedDecodeHook(f)) - } - return func(a, b reflect.Value) (any, error) { - var allErrs string - var out any - var err error - - for _, c := range cached { - out, err = c(a, b) - if err != nil { - allErrs += err.Error() + "\n" - continue - } - - return out, nil - } - - return nil, errors.New(allErrs) - } -} - -// StringToSliceHookFunc returns a DecodeHookFunc that converts -// string to []string by splitting on the given sep. -func StringToSliceHookFunc(sep string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.SliceOf(f) { - return data, nil - } - - raw := data.(string) - if raw == "" { - return []string{}, nil - } - - return strings.Split(raw, sep), nil - } -} - -// StringToWeakSliceHookFunc brings back the old (pre-v2) behavior of [StringToSliceHookFunc]. -// -// As of mapstructure v2.0.0 [StringToSliceHookFunc] checks if the return type is a string slice. -// This function removes that check. -func StringToWeakSliceHookFunc(sep string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Slice { - return data, nil - } - - raw := data.(string) - if raw == "" { - return []string{}, nil - } - - return strings.Split(raw, sep), nil - } -} - -// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts -// strings to time.Duration. -func StringToTimeDurationHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Duration(5)) { - return data, nil - } - - // Convert it by parsing - d, err := time.ParseDuration(data.(string)) - - return d, wrapTimeParseDurationError(err) - } -} - -// StringToTimeLocationHookFunc returns a DecodeHookFunc that converts -// strings to *time.Location. -func StringToTimeLocationHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Local) { - return data, nil - } - d, err := time.LoadLocation(data.(string)) - - return d, wrapTimeParseLocationError(err) - } -} - -// StringToURLHookFunc returns a DecodeHookFunc that converts -// strings to *url.URL. -func StringToURLHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(&url.URL{}) { - return data, nil - } - - // Convert it by parsing - u, err := url.Parse(data.(string)) - - return u, wrapUrlError(err) - } -} - -// StringToIPHookFunc returns a DecodeHookFunc that converts -// strings to net.IP -func StringToIPHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IP{}) { - return data, nil - } - - // Convert it by parsing - ip := net.ParseIP(data.(string)) - if ip == nil { - return net.IP{}, fmt.Errorf("failed parsing ip") - } - - return ip, nil - } -} - -// StringToIPNetHookFunc returns a DecodeHookFunc that converts -// strings to net.IPNet -func StringToIPNetHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IPNet{}) { - return data, nil - } - - // Convert it by parsing - _, net, err := net.ParseCIDR(data.(string)) - return net, wrapNetParseError(err) - } -} - -// StringToTimeHookFunc returns a DecodeHookFunc that converts -// strings to time.Time. -func StringToTimeHookFunc(layout string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Time{}) { - return data, nil - } - - // Convert it by parsing - ti, err := time.Parse(layout, data.(string)) - - return ti, wrapTimeParseError(err) - } -} - -// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to -// the decoder. -// -// Note that this is significantly different from the WeaklyTypedInput option -// of the DecoderConfig. -func WeaklyTypedHook( - f reflect.Kind, - t reflect.Kind, - data any, -) (any, error) { - dataVal := reflect.ValueOf(data) - switch t { - case reflect.String: - switch f { - case reflect.Bool: - if dataVal.Bool() { - return "1", nil - } - return "0", nil - case reflect.Float32: - return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil - case reflect.Int: - return strconv.FormatInt(dataVal.Int(), 10), nil - case reflect.Slice: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - if elemKind == reflect.Uint8 { - return string(dataVal.Interface().([]uint8)), nil - } - case reflect.Uint: - return strconv.FormatUint(dataVal.Uint(), 10), nil - } - } - - return data, nil -} - -func RecursiveStructToMapHookFunc() DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (any, error) { - if f.Kind() != reflect.Struct { - return f.Interface(), nil - } - - var i any = struct{}{} - if t.Type() != reflect.TypeOf(&i).Elem() { - return f.Interface(), nil - } - - m := make(map[string]any) - t.Set(reflect.ValueOf(m)) - - return f.Interface(), nil - } -} - -// TextUnmarshallerHookFunc returns a DecodeHookFunc that applies -// strings to the UnmarshalText function, when the target type -// implements the encoding.TextUnmarshaler interface -func TextUnmarshallerHookFunc() DecodeHookFuncType { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - result := reflect.New(t).Interface() - unmarshaller, ok := result.(encoding.TextUnmarshaler) - if !ok { - return data, nil - } - str, ok := data.(string) - if !ok { - str = reflect.Indirect(reflect.ValueOf(&data)).Elem().String() - } - if err := unmarshaller.UnmarshalText([]byte(str)); err != nil { - return nil, err - } - return result, nil - } -} - -// StringToNetIPAddrHookFunc returns a DecodeHookFunc that converts -// strings to netip.Addr. -func StringToNetIPAddrHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(netip.Addr{}) { - return data, nil - } - - // Convert it by parsing - addr, err := netip.ParseAddr(data.(string)) - - return addr, wrapNetIPParseAddrError(err) - } -} - -// StringToNetIPAddrPortHookFunc returns a DecodeHookFunc that converts -// strings to netip.AddrPort. -func StringToNetIPAddrPortHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(netip.AddrPort{}) { - return data, nil - } - - // Convert it by parsing - addrPort, err := netip.ParseAddrPort(data.(string)) - - return addrPort, wrapNetIPParseAddrPortError(err) - } -} - -// StringToNetIPPrefixHookFunc returns a DecodeHookFunc that converts -// strings to netip.Prefix. -func StringToNetIPPrefixHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data any, - ) (any, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(netip.Prefix{}) { - return data, nil - } - - // Convert it by parsing - prefix, err := netip.ParsePrefix(data.(string)) - - return prefix, wrapNetIPParsePrefixError(err) - } -} - -// StringToBasicTypeHookFunc returns a DecodeHookFunc that converts -// strings to basic types. -// int8, uint8, int16, uint16, int32, uint32, int64, uint64, int, uint, float32, float64, bool, byte, rune, complex64, complex128 -func StringToBasicTypeHookFunc() DecodeHookFunc { - return ComposeDecodeHookFunc( - StringToInt8HookFunc(), - StringToUint8HookFunc(), - StringToInt16HookFunc(), - StringToUint16HookFunc(), - StringToInt32HookFunc(), - StringToUint32HookFunc(), - StringToInt64HookFunc(), - StringToUint64HookFunc(), - StringToIntHookFunc(), - StringToUintHookFunc(), - StringToFloat32HookFunc(), - StringToFloat64HookFunc(), - StringToBoolHookFunc(), - // byte and rune are aliases for uint8 and int32 respectively - // StringToByteHookFunc(), - // StringToRuneHookFunc(), - StringToComplex64HookFunc(), - StringToComplex128HookFunc(), - ) -} - -// StringToInt8HookFunc returns a DecodeHookFunc that converts -// strings to int8. -func StringToInt8HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Int8 { - return data, nil - } - - // Convert it by parsing - i64, err := strconv.ParseInt(data.(string), 0, 8) - return int8(i64), wrapStrconvNumError(err) - } -} - -// StringToUint8HookFunc returns a DecodeHookFunc that converts -// strings to uint8. -func StringToUint8HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Uint8 { - return data, nil - } - - // Convert it by parsing - u64, err := strconv.ParseUint(data.(string), 0, 8) - return uint8(u64), wrapStrconvNumError(err) - } -} - -// StringToInt16HookFunc returns a DecodeHookFunc that converts -// strings to int16. -func StringToInt16HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Int16 { - return data, nil - } - - // Convert it by parsing - i64, err := strconv.ParseInt(data.(string), 0, 16) - return int16(i64), wrapStrconvNumError(err) - } -} - -// StringToUint16HookFunc returns a DecodeHookFunc that converts -// strings to uint16. -func StringToUint16HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Uint16 { - return data, nil - } - - // Convert it by parsing - u64, err := strconv.ParseUint(data.(string), 0, 16) - return uint16(u64), wrapStrconvNumError(err) - } -} - -// StringToInt32HookFunc returns a DecodeHookFunc that converts -// strings to int32. -func StringToInt32HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Int32 { - return data, nil - } - - // Convert it by parsing - i64, err := strconv.ParseInt(data.(string), 0, 32) - return int32(i64), wrapStrconvNumError(err) - } -} - -// StringToUint32HookFunc returns a DecodeHookFunc that converts -// strings to uint32. -func StringToUint32HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Uint32 { - return data, nil - } - - // Convert it by parsing - u64, err := strconv.ParseUint(data.(string), 0, 32) - return uint32(u64), wrapStrconvNumError(err) - } -} - -// StringToInt64HookFunc returns a DecodeHookFunc that converts -// strings to int64. -func StringToInt64HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Int64 { - return data, nil - } - - // Convert it by parsing - i64, err := strconv.ParseInt(data.(string), 0, 64) - return int64(i64), wrapStrconvNumError(err) - } -} - -// StringToUint64HookFunc returns a DecodeHookFunc that converts -// strings to uint64. -func StringToUint64HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Uint64 { - return data, nil - } - - // Convert it by parsing - u64, err := strconv.ParseUint(data.(string), 0, 64) - return uint64(u64), wrapStrconvNumError(err) - } -} - -// StringToIntHookFunc returns a DecodeHookFunc that converts -// strings to int. -func StringToIntHookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Int { - return data, nil - } - - // Convert it by parsing - i64, err := strconv.ParseInt(data.(string), 0, 0) - return int(i64), wrapStrconvNumError(err) - } -} - -// StringToUintHookFunc returns a DecodeHookFunc that converts -// strings to uint. -func StringToUintHookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Uint { - return data, nil - } - - // Convert it by parsing - u64, err := strconv.ParseUint(data.(string), 0, 0) - return uint(u64), wrapStrconvNumError(err) - } -} - -// StringToFloat32HookFunc returns a DecodeHookFunc that converts -// strings to float32. -func StringToFloat32HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Float32 { - return data, nil - } - - // Convert it by parsing - f64, err := strconv.ParseFloat(data.(string), 32) - return float32(f64), wrapStrconvNumError(err) - } -} - -// StringToFloat64HookFunc returns a DecodeHookFunc that converts -// strings to float64. -func StringToFloat64HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Float64 { - return data, nil - } - - // Convert it by parsing - f64, err := strconv.ParseFloat(data.(string), 64) - return f64, wrapStrconvNumError(err) - } -} - -// StringToBoolHookFunc returns a DecodeHookFunc that converts -// strings to bool. -func StringToBoolHookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Bool { - return data, nil - } - - // Convert it by parsing - b, err := strconv.ParseBool(data.(string)) - return b, wrapStrconvNumError(err) - } -} - -// StringToByteHookFunc returns a DecodeHookFunc that converts -// strings to byte. -func StringToByteHookFunc() DecodeHookFunc { - return StringToUint8HookFunc() -} - -// StringToRuneHookFunc returns a DecodeHookFunc that converts -// strings to rune. -func StringToRuneHookFunc() DecodeHookFunc { - return StringToInt32HookFunc() -} - -// StringToComplex64HookFunc returns a DecodeHookFunc that converts -// strings to complex64. -func StringToComplex64HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Complex64 { - return data, nil - } - - // Convert it by parsing - c128, err := strconv.ParseComplex(data.(string), 64) - return complex64(c128), wrapStrconvNumError(err) - } -} - -// StringToComplex128HookFunc returns a DecodeHookFunc that converts -// strings to complex128. -func StringToComplex128HookFunc() DecodeHookFunc { - return func(f reflect.Type, t reflect.Type, data any) (any, error) { - if f.Kind() != reflect.String || t.Kind() != reflect.Complex128 { - return data, nil - } - - // Convert it by parsing - c128, err := strconv.ParseComplex(data.(string), 128) - return c128, wrapStrconvNumError(err) - } -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/errors.go b/vendor/github.com/go-viper/mapstructure/v2/errors.go deleted file mode 100644 index 07d31c22aa..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/errors.go +++ /dev/null @@ -1,244 +0,0 @@ -package mapstructure - -import ( - "errors" - "fmt" - "net" - "net/url" - "reflect" - "strconv" - "strings" - "time" -) - -// Error interface is implemented by all errors emitted by mapstructure. -// -// Use [errors.As] to check if an error implements this interface. -type Error interface { - error - - mapstructure() -} - -// DecodeError is a generic error type that holds information about -// a decoding error together with the name of the field that caused the error. -type DecodeError struct { - name string - err error -} - -func newDecodeError(name string, err error) *DecodeError { - return &DecodeError{ - name: name, - err: err, - } -} - -func (e *DecodeError) Name() string { - return e.name -} - -func (e *DecodeError) Unwrap() error { - return e.err -} - -func (e *DecodeError) Error() string { - return fmt.Sprintf("'%s' %s", e.name, e.err) -} - -func (*DecodeError) mapstructure() {} - -// ParseError is an error type that indicates a value could not be parsed -// into the expected type. -type ParseError struct { - Expected reflect.Value - Value any - Err error -} - -func (e *ParseError) Error() string { - return fmt.Sprintf("cannot parse value as '%s': %s", e.Expected.Type(), e.Err) -} - -func (*ParseError) mapstructure() {} - -// UnconvertibleTypeError is an error type that indicates a value could not be -// converted to the expected type. -type UnconvertibleTypeError struct { - Expected reflect.Value - Value any -} - -func (e *UnconvertibleTypeError) Error() string { - return fmt.Sprintf( - "expected type '%s', got unconvertible type '%s'", - e.Expected.Type(), - reflect.TypeOf(e.Value), - ) -} - -func (*UnconvertibleTypeError) mapstructure() {} - -func wrapStrconvNumError(err error) error { - if err == nil { - return nil - } - - if err, ok := err.(*strconv.NumError); ok { - return &strconvNumError{Err: err} - } - - return err -} - -type strconvNumError struct { - Err *strconv.NumError -} - -func (e *strconvNumError) Error() string { - return "strconv." + e.Err.Func + ": " + e.Err.Err.Error() -} - -func (e *strconvNumError) Unwrap() error { return e.Err } - -func wrapUrlError(err error) error { - if err == nil { - return nil - } - - if err, ok := err.(*url.Error); ok { - return &urlError{Err: err} - } - - return err -} - -type urlError struct { - Err *url.Error -} - -func (e *urlError) Error() string { - return fmt.Sprintf("%s", e.Err.Err) -} - -func (e *urlError) Unwrap() error { return e.Err } - -func wrapNetParseError(err error) error { - if err == nil { - return nil - } - - if err, ok := err.(*net.ParseError); ok { - return &netParseError{Err: err} - } - - return err -} - -type netParseError struct { - Err *net.ParseError -} - -func (e *netParseError) Error() string { - return "invalid " + e.Err.Type -} - -func (e *netParseError) Unwrap() error { return e.Err } - -func wrapTimeParseError(err error) error { - if err == nil { - return nil - } - - if err, ok := err.(*time.ParseError); ok { - return &timeParseError{Err: err} - } - - return err -} - -type timeParseError struct { - Err *time.ParseError -} - -func (e *timeParseError) Error() string { - if e.Err.Message == "" { - return fmt.Sprintf("parsing time as %q: cannot parse as %q", e.Err.Layout, e.Err.LayoutElem) - } - - return "parsing time " + e.Err.Message -} - -func (e *timeParseError) Unwrap() error { return e.Err } - -func wrapNetIPParseAddrError(err error) error { - if err == nil { - return nil - } - - if errMsg := err.Error(); strings.HasPrefix(errMsg, "ParseAddr") { - errPieces := strings.Split(errMsg, ": ") - - return fmt.Errorf("ParseAddr: %s", errPieces[len(errPieces)-1]) - } - - return err -} - -func wrapNetIPParseAddrPortError(err error) error { - if err == nil { - return nil - } - - errMsg := err.Error() - if strings.HasPrefix(errMsg, "invalid port ") { - return errors.New("invalid port") - } else if strings.HasPrefix(errMsg, "invalid ip:port ") { - return errors.New("invalid ip:port") - } - - return err -} - -func wrapNetIPParsePrefixError(err error) error { - if err == nil { - return nil - } - - if errMsg := err.Error(); strings.HasPrefix(errMsg, "netip.ParsePrefix") { - errPieces := strings.Split(errMsg, ": ") - - return fmt.Errorf("netip.ParsePrefix: %s", errPieces[len(errPieces)-1]) - } - - return err -} - -func wrapTimeParseDurationError(err error) error { - if err == nil { - return nil - } - - errMsg := err.Error() - if strings.HasPrefix(errMsg, "time: unknown unit ") { - return errors.New("time: unknown unit") - } else if strings.HasPrefix(errMsg, "time: ") { - idx := strings.LastIndex(errMsg, " ") - - return errors.New(errMsg[:idx]) - } - - return err -} - -func wrapTimeParseLocationError(err error) error { - if err == nil { - return nil - } - errMsg := err.Error() - if strings.Contains(errMsg, "unknown time zone") || strings.HasPrefix(errMsg, "time: unknown format") { - return fmt.Errorf("invalid time zone format: %w", err) - } - - return err -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/flake.lock b/vendor/github.com/go-viper/mapstructure/v2/flake.lock deleted file mode 100644 index 5e67bdd6b4..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/flake.lock +++ /dev/null @@ -1,294 +0,0 @@ -{ - "nodes": { - "cachix": { - "inputs": { - "devenv": [ - "devenv" - ], - "flake-compat": [ - "devenv" - ], - "git-hooks": [ - "devenv" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1742042642, - "narHash": "sha256-D0gP8srrX0qj+wNYNPdtVJsQuFzIng3q43thnHXQ/es=", - "owner": "cachix", - "repo": "cachix", - "rev": "a624d3eaf4b1d225f918de8543ed739f2f574203", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "latest", - "repo": "cachix", - "type": "github" - } - }, - "devenv": { - "inputs": { - "cachix": "cachix", - "flake-compat": "flake-compat", - "git-hooks": "git-hooks", - "nix": "nix", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1744876578, - "narHash": "sha256-8MTBj2REB8t29sIBLpxbR0+AEGJ7f+RkzZPAGsFd40c=", - "owner": "cachix", - "repo": "devenv", - "rev": "7ff7c351bba20d0615be25ecdcbcf79b57b85fe1", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "devenv", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "devenv", - "nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "git-hooks": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "gitignore": "gitignore", - "nixpkgs": [ - "devenv", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1742649964, - "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", - "type": "github" - }, - "original": { - "owner": "cachix", - "repo": "git-hooks.nix", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "devenv", - "git-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1697646580, - "narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5", - "type": "github" - }, - "original": { - "owner": "libgit2", - "repo": "libgit2", - "type": "github" - } - }, - "nix": { - "inputs": { - "flake-compat": [ - "devenv" - ], - "flake-parts": "flake-parts", - "libgit2": "libgit2", - "nixpkgs": "nixpkgs_2", - "nixpkgs-23-11": [ - "devenv" - ], - "nixpkgs-regression": [ - "devenv" - ], - "pre-commit-hooks": [ - "devenv" - ] - }, - "locked": { - "lastModified": 1741798497, - "narHash": "sha256-E3j+3MoY8Y96mG1dUIiLFm2tZmNbRvSiyN7CrSKuAVg=", - "owner": "domenkozar", - "repo": "nix", - "rev": "f3f44b2baaf6c4c6e179de8cbb1cc6db031083cd", - "type": "github" - }, - "original": { - "owner": "domenkozar", - "ref": "devenv-2.24", - "repo": "nix", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1733212471, - "narHash": "sha256-M1+uCoV5igihRfcUKrr1riygbe73/dzNnzPsmaLCmpo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "55d15ad12a74eb7d4646254e13638ad0c4128776", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1743296961, - "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1717432640, - "narHash": "sha256-+f9c4/ZX5MWDOuB1rKoWj+lBNm0z0rs4CK47HBLxy1o=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "88269ab3044128b7c2f4c7d68448b2fb50456870", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-24.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1733477122, - "narHash": "sha256-qamMCz5mNpQmgBwc8SB5tVMlD5sbwVIToVZtSxMph9s=", - "owner": "cachix", - "repo": "devenv-nixpkgs", - "rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857", - "type": "github" - }, - "original": { - "owner": "cachix", - "ref": "rolling", - "repo": "devenv-nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "devenv": "devenv", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/flake.nix b/vendor/github.com/go-viper/mapstructure/v2/flake.nix deleted file mode 100644 index 3b116f426d..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/flake.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - flake-parts.url = "github:hercules-ci/flake-parts"; - devenv.url = "github:cachix/devenv"; - }; - - outputs = - inputs@{ flake-parts, ... }: - flake-parts.lib.mkFlake { inherit inputs; } { - imports = [ - inputs.devenv.flakeModule - ]; - - systems = [ - "x86_64-linux" - "x86_64-darwin" - "aarch64-darwin" - ]; - - perSystem = - { pkgs, ... }: - rec { - devenv.shells = { - default = { - languages = { - go.enable = true; - }; - - pre-commit.hooks = { - nixpkgs-fmt.enable = true; - }; - - packages = with pkgs; [ - golangci-lint - ]; - - # https://github.com/cachix/devenv/issues/528#issuecomment-1556108767 - containers = pkgs.lib.mkForce { }; - }; - - ci = devenv.shells.default; - }; - }; - }; -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/errors.go b/vendor/github.com/go-viper/mapstructure/v2/internal/errors/errors.go deleted file mode 100644 index d1c15e474f..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/errors.go +++ /dev/null @@ -1,11 +0,0 @@ -package errors - -import "errors" - -func New(text string) error { - return errors.New(text) -} - -func As(err error, target interface{}) bool { - return errors.As(err, target) -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join.go b/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join.go deleted file mode 100644 index d74e3a0b5a..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join.go +++ /dev/null @@ -1,9 +0,0 @@ -//go:build go1.20 - -package errors - -import "errors" - -func Join(errs ...error) error { - return errors.Join(errs...) -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join_go1_19.go b/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join_go1_19.go deleted file mode 100644 index 700b40229c..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/internal/errors/join_go1_19.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build !go1.20 - -// Copyright 2022 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 errors - -// Join returns an error that wraps the given errors. -// Any nil error values are discarded. -// Join returns nil if every value in errs is nil. -// The error formats as the concatenation of the strings obtained -// by calling the Error method of each element of errs, with a newline -// between each string. -// -// A non-nil error returned by Join implements the Unwrap() []error method. -func Join(errs ...error) error { - n := 0 - for _, err := range errs { - if err != nil { - n++ - } - } - if n == 0 { - return nil - } - e := &joinError{ - errs: make([]error, 0, n), - } - for _, err := range errs { - if err != nil { - e.errs = append(e.errs, err) - } - } - return e -} - -type joinError struct { - errs []error -} - -func (e *joinError) Error() string { - // Since Join returns nil if every value in errs is nil, - // e.errs cannot be empty. - if len(e.errs) == 1 { - return e.errs[0].Error() - } - - b := []byte(e.errs[0].Error()) - for _, err := range e.errs[1:] { - b = append(b, '\n') - b = append(b, err.Error()...) - } - // At this point, b has at least one byte '\n'. - // return unsafe.String(&b[0], len(b)) - return string(b) -} - -func (e *joinError) Unwrap() []error { - return e.errs -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go b/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go deleted file mode 100644 index 7c35bce020..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/mapstructure.go +++ /dev/null @@ -1,1712 +0,0 @@ -// Package mapstructure exposes functionality to convert one arbitrary -// Go type into another, typically to convert a map[string]any -// into a native Go structure. -// -// The Go structure can be arbitrarily complex, containing slices, -// other structs, etc. and the decoder will properly decode nested -// maps and so on into the proper structures in the native Go struct. -// See the examples to see what the decoder is capable of. -// -// The simplest function to start with is Decode. -// -// # Field Tags -// -// When decoding to a struct, mapstructure will use the field name by -// default to perform the mapping. For example, if a struct has a field -// "Username" then mapstructure will look for a key in the source value -// of "username" (case insensitive). -// -// type User struct { -// Username string -// } -// -// You can change the behavior of mapstructure by using struct tags. -// The default struct tag that mapstructure looks for is "mapstructure" -// but you can customize it using DecoderConfig. -// -// # Renaming Fields -// -// To rename the key that mapstructure looks for, use the "mapstructure" -// tag and set a value directly. For example, to change the "username" example -// above to "user": -// -// type User struct { -// Username string `mapstructure:"user"` -// } -// -// # Embedded Structs and Squashing -// -// Embedded structs are treated as if they're another field with that name. -// By default, the two structs below are equivalent when decoding with -// mapstructure: -// -// type Person struct { -// Name string -// } -// -// type Friend struct { -// Person -// } -// -// type Friend struct { -// Person Person -// } -// -// This would require an input that looks like below: -// -// map[string]any{ -// "person": map[string]any{"name": "alice"}, -// } -// -// If your "person" value is NOT nested, then you can append ",squash" to -// your tag value and mapstructure will treat it as if the embedded struct -// were part of the struct directly. Example: -// -// type Friend struct { -// Person `mapstructure:",squash"` -// } -// -// Now the following input would be accepted: -// -// map[string]any{ -// "name": "alice", -// } -// -// When decoding from a struct to a map, the squash tag squashes the struct -// fields into a single map. Using the example structs from above: -// -// Friend{Person: Person{Name: "alice"}} -// -// Will be decoded into a map: -// -// map[string]any{ -// "name": "alice", -// } -// -// DecoderConfig has a field that changes the behavior of mapstructure -// to always squash embedded structs. -// -// # Remainder Values -// -// If there are any unmapped keys in the source value, mapstructure by -// default will silently ignore them. You can error by setting ErrorUnused -// in DecoderConfig. If you're using Metadata you can also maintain a slice -// of the unused keys. -// -// You can also use the ",remain" suffix on your tag to collect all unused -// values in a map. The field with this tag MUST be a map type and should -// probably be a "map[string]any" or "map[any]any". -// See example below: -// -// type Friend struct { -// Name string -// Other map[string]any `mapstructure:",remain"` -// } -// -// Given the input below, Other would be populated with the other -// values that weren't used (everything but "name"): -// -// map[string]any{ -// "name": "bob", -// "address": "123 Maple St.", -// } -// -// # Omit Empty Values -// -// When decoding from a struct to any other value, you may use the -// ",omitempty" suffix on your tag to omit that value if it equates to -// the zero value, or a zero-length element. The zero value of all types is -// specified in the Go specification. -// -// For example, the zero type of a numeric type is zero ("0"). If the struct -// field value is zero and a numeric type, the field is empty, and it won't -// be encoded into the destination type. And likewise for the URLs field, if the -// slice is nil or empty, it won't be encoded into the destination type. -// -// type Source struct { -// Age int `mapstructure:",omitempty"` -// URLs []string `mapstructure:",omitempty"` -// } -// -// # Omit Zero Values -// -// When decoding from a struct to any other value, you may use the -// ",omitzero" suffix on your tag to omit that value if it equates to the zero -// value. The zero value of all types is specified in the Go specification. -// -// For example, the zero type of a numeric type is zero ("0"). If the struct -// field value is zero and a numeric type, the field is empty, and it won't -// be encoded into the destination type. And likewise for the URLs field, if the -// slice is nil, it won't be encoded into the destination type. -// -// Note that if the field is a slice, and it is empty but not nil, it will -// still be encoded into the destination type. -// -// type Source struct { -// Age int `mapstructure:",omitzero"` -// URLs []string `mapstructure:",omitzero"` -// } -// -// # Unexported fields -// -// Since unexported (private) struct fields cannot be set outside the package -// where they are defined, the decoder will simply skip them. -// -// For this output type definition: -// -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } -// -// Using this map as input: -// -// map[string]any{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } -// -// The following struct will be decoded: -// -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } -// -// # Other Configuration -// -// mapstructure is highly configurable. See the DecoderConfig struct -// for other features and options that are supported. -package mapstructure - -import ( - "encoding/json" - "fmt" - "reflect" - "sort" - "strconv" - "strings" - - "github.com/go-viper/mapstructure/v2/internal/errors" -) - -// DecodeHookFunc is the callback function that can be used for -// data transformations. See "DecodeHook" in the DecoderConfig -// struct. -// -// The type must be one of DecodeHookFuncType, DecodeHookFuncKind, or -// DecodeHookFuncValue. -// Values are a superset of Types (Values can return types), and Types are a -// superset of Kinds (Types can return Kinds) and are generally a richer thing -// to use, but Kinds are simpler if you only need those. -// -// The reason DecodeHookFunc is multi-typed is for backwards compatibility: -// we started with Kinds and then realized Types were the better solution, -// but have a promise to not break backwards compat so we now support -// both. -type DecodeHookFunc any - -// DecodeHookFuncType is a DecodeHookFunc which has complete information about -// the source and target types. -type DecodeHookFuncType func(reflect.Type, reflect.Type, any) (any, error) - -// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the -// source and target types. -type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, any) (any, error) - -// DecodeHookFuncValue is a DecodeHookFunc which has complete access to both the source and target -// values. -type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (any, error) - -// DecoderConfig is the configuration that is used to create a new decoder -// and allows customization of various aspects of decoding. -type DecoderConfig struct { - // DecodeHook, if set, will be called before any decoding and any - // type conversion (if WeaklyTypedInput is on). This lets you modify - // the values before they're set down onto the resulting struct. The - // DecodeHook is called for every map and value in the input. This means - // that if a struct has embedded fields with squash tags the decode hook - // is called only once with all of the input data, not once for each - // embedded struct. - // - // If an error is returned, the entire decode will fail with that error. - DecodeHook DecodeHookFunc - - // If ErrorUnused is true, then it is an error for there to exist - // keys in the original map that were unused in the decoding process - // (extra keys). - ErrorUnused bool - - // If ErrorUnset is true, then it is an error for there to exist - // fields in the result that were not set in the decoding process - // (extra fields). This only applies to decoding to a struct. This - // will affect all nested structs as well. - ErrorUnset bool - - // AllowUnsetPointer, if set to true, will prevent fields with pointer types - // from being reported as unset, even if ErrorUnset is true and the field was - // not present in the input data. This allows pointer fields to be optional - // without triggering an error when they are missing. - AllowUnsetPointer bool - - // ZeroFields, if set to true, will zero fields before writing them. - // For example, a map will be emptied before decoded values are put in - // it. If this is false, a map will be merged. - ZeroFields bool - - // If WeaklyTypedInput is true, the decoder will make the following - // "weak" conversions: - // - // - bools to string (true = "1", false = "0") - // - numbers to string (base 10) - // - bools to int/uint (true = 1, false = 0) - // - strings to int/uint (base implied by prefix) - // - int to bool (true if value != 0) - // - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F, - // FALSE, false, False. Anything else is an error) - // - empty array = empty map and vice versa - // - negative numbers to overflowed uint values (base 10) - // - slice of maps to a merged map - // - single values are converted to slices if required. Each - // element is weakly decoded. For example: "4" can become []int{4} - // if the target type is an int slice. - // - WeaklyTypedInput bool - - // Squash will squash embedded structs. A squash tag may also be - // added to an individual struct field using a tag. For example: - // - // type Parent struct { - // Child `mapstructure:",squash"` - // } - Squash bool - - // Metadata is the struct that will contain extra metadata about - // the decoding. If this is nil, then no metadata will be tracked. - Metadata *Metadata - - // Result is a pointer to the struct that will contain the decoded - // value. - Result any - - // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" - TagName string - - // The option of the value in the tag that indicates a field should - // be squashed. This defaults to "squash". - SquashTagOption string - - // IgnoreUntaggedFields ignores all struct fields without explicit - // TagName, comparable to `mapstructure:"-"` as default behaviour. - IgnoreUntaggedFields bool - - // MatchName is the function used to match the map key to the struct - // field name or tag. Defaults to `strings.EqualFold`. This can be used - // to implement case-sensitive tag values, support snake casing, etc. - MatchName func(mapKey, fieldName string) bool - - // DecodeNil, if set to true, will cause the DecodeHook (if present) to run - // even if the input is nil. This can be used to provide default values. - DecodeNil bool -} - -// A Decoder takes a raw interface value and turns it into structured -// data, keeping track of rich error information along the way in case -// anything goes wrong. Unlike the basic top-level Decode method, you can -// more finely control how the Decoder behaves using the DecoderConfig -// structure. The top-level Decode method is just a convenience that sets -// up the most basic Decoder. -type Decoder struct { - config *DecoderConfig - cachedDecodeHook func(from reflect.Value, to reflect.Value) (any, error) -} - -// Metadata contains information about decoding a structure that -// is tedious or difficult to get otherwise. -type Metadata struct { - // Keys are the keys of the structure which were successfully decoded - Keys []string - - // Unused is a slice of keys that were found in the raw value but - // weren't decoded since there was no matching field in the result interface - Unused []string - - // Unset is a slice of field names that were found in the result interface - // but weren't set in the decoding process since there was no matching value - // in the input - Unset []string -} - -// Decode takes an input structure and uses reflection to translate it to -// the output structure. output must be a pointer to a map or struct. -func Decode(input any, output any) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecode is the same as Decode but is shorthand to enable -// WeaklyTypedInput. See DecoderConfig for more info. -func WeakDecode(input, output any) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// DecodeMetadata is the same as Decode, but is shorthand to -// enable metadata collection. See DecoderConfig for more info. -func DecodeMetadata(input any, output any, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecodeMetadata is the same as Decode, but is shorthand to -// enable both WeaklyTypedInput and metadata collection. See -// DecoderConfig for more info. -func WeakDecodeMetadata(input any, output any, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// NewDecoder returns a new decoder for the given configuration. Once -// a decoder has been returned, the same configuration must not be used -// again. -func NewDecoder(config *DecoderConfig) (*Decoder, error) { - val := reflect.ValueOf(config.Result) - if val.Kind() != reflect.Ptr { - return nil, errors.New("result must be a pointer") - } - - val = val.Elem() - if !val.CanAddr() { - return nil, errors.New("result must be addressable (a pointer)") - } - - if config.Metadata != nil { - if config.Metadata.Keys == nil { - config.Metadata.Keys = make([]string, 0) - } - - if config.Metadata.Unused == nil { - config.Metadata.Unused = make([]string, 0) - } - - if config.Metadata.Unset == nil { - config.Metadata.Unset = make([]string, 0) - } - } - - if config.TagName == "" { - config.TagName = "mapstructure" - } - - if config.SquashTagOption == "" { - config.SquashTagOption = "squash" - } - - if config.MatchName == nil { - config.MatchName = strings.EqualFold - } - - result := &Decoder{ - config: config, - } - if config.DecodeHook != nil { - result.cachedDecodeHook = cachedDecodeHook(config.DecodeHook) - } - - return result, nil -} - -// Decode decodes the given raw interface to the target pointer specified -// by the configuration. -func (d *Decoder) Decode(input any) error { - err := d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) - - // Retain some of the original behavior when multiple errors ocurr - var joinedErr interface{ Unwrap() []error } - if errors.As(err, &joinedErr) { - return fmt.Errorf("decoding failed due to the following error(s):\n\n%w", err) - } - - return err -} - -// isNil returns true if the input is nil or a typed nil pointer. -func isNil(input any) bool { - if input == nil { - return true - } - val := reflect.ValueOf(input) - return val.Kind() == reflect.Ptr && val.IsNil() -} - -// Decodes an unknown data type into a specific reflection value. -func (d *Decoder) decode(name string, input any, outVal reflect.Value) error { - var ( - inputVal = reflect.ValueOf(input) - outputKind = getKind(outVal) - decodeNil = d.config.DecodeNil && d.cachedDecodeHook != nil - ) - if isNil(input) { - // Typed nils won't match the "input == nil" below, so reset input. - input = nil - } - if input == nil { - // If the data is nil, then we don't set anything, unless ZeroFields is set - // to true. - if d.config.ZeroFields { - outVal.Set(reflect.Zero(outVal.Type())) - - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - } - if !decodeNil { - return nil - } - } - if !inputVal.IsValid() { - if !decodeNil { - // If the input value is invalid, then we just set the value - // to be the zero value. - outVal.Set(reflect.Zero(outVal.Type())) - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - return nil - } - // Hooks need a valid inputVal, so reset it to zero value of outVal type. - switch outputKind { - case reflect.Struct, reflect.Map: - var mapVal map[string]any - inputVal = reflect.ValueOf(mapVal) // create nil map pointer - case reflect.Slice, reflect.Array: - var sliceVal []any - inputVal = reflect.ValueOf(sliceVal) // create nil slice pointer - default: - inputVal = reflect.Zero(outVal.Type()) - } - } - - if d.cachedDecodeHook != nil { - // We have a DecodeHook, so let's pre-process the input. - var err error - input, err = d.cachedDecodeHook(inputVal, outVal) - if err != nil { - return newDecodeError(name, err) - } - } - if isNil(input) { - return nil - } - - var err error - addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Complex64: - err = d.decodeComplex(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return newDecodeError(name, fmt.Errorf("unsupported type: %s", outputKind)) - } - - // If we reached here, then we successfully decoded SOMETHING, so - // mark the key as used if we're tracking metainput. - if addMetaKey && d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - - return err -} - -// This decodes a basic type (bool, int, string, etc.) and sets the -// value to "data" of that type. -func (d *Decoder) decodeBasic(name string, data any, val reflect.Value) error { - if val.IsValid() && val.Elem().IsValid() { - elem := val.Elem() - - // If we can't address this element, then its not writable. Instead, - // we make a copy of the value (which is a pointer and therefore - // writable), decode into that, and replace the whole value. - copied := false - if !elem.CanAddr() { - copied = true - - // Make *T - copy := reflect.New(elem.Type()) - - // *T = elem - copy.Elem().Set(elem) - - // Set elem so we decode into it - elem = copy - } - - // Decode. If we have an error then return. We also return right - // away if we're not a copy because that means we decoded directly. - if err := d.decode(name, data, elem); err != nil || !copied { - return err - } - - // If we're a copy, we need to set te final result - val.Set(elem.Elem()) - return nil - } - - dataVal := reflect.ValueOf(data) - - // If the input data is a pointer, and the assigned type is the dereference - // of that exact pointer, then indirect it so that we can assign it. - // Example: *string to string - if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() { - dataVal = reflect.Indirect(dataVal) - } - - if !dataVal.IsValid() { - dataVal = reflect.Zero(val.Type()) - } - - dataValType := dataVal.Type() - if !dataValType.AssignableTo(val.Type()) { - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeString(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - converted := true - switch { - case dataKind == reflect.String: - val.SetString(dataVal.String()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetString("1") - } else { - val.SetString("0") - } - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatInt(dataVal.Int(), 10)) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatUint(dataVal.Uint(), 10)) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64)) - case dataKind == reflect.Slice && d.config.WeaklyTypedInput, - dataKind == reflect.Array && d.config.WeaklyTypedInput: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - switch elemKind { - case reflect.Uint8: - var uints []uint8 - if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) - for i := range uints { - uints[i] = dataVal.Index(i).Interface().(uint8) - } - } else { - uints = dataVal.Interface().([]uint8) - } - val.SetString(string(uints)) - default: - converted = false - } - default: - converted = false - } - - if !converted { - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeInt(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetInt(dataVal.Int()) - case dataKind == reflect.Uint: - val.SetInt(int64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetInt(int64(dataVal.Float())) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetInt(1) - } else { - val.SetInt(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseInt(str, 0, val.Type().Bits()) - if err == nil { - val.SetInt(i) - } else { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: wrapStrconvNumError(err), - }) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Int64() - if err != nil { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: err, - }) - } - val.SetInt(i) - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeUint(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - i := dataVal.Int() - if i < 0 && !d.config.WeaklyTypedInput { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: fmt.Errorf("%d overflows uint", i), - }) - } - val.SetUint(uint64(i)) - case dataKind == reflect.Uint: - val.SetUint(dataVal.Uint()) - case dataKind == reflect.Float32: - f := dataVal.Float() - if f < 0 && !d.config.WeaklyTypedInput { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: fmt.Errorf("%f overflows uint", f), - }) - } - val.SetUint(uint64(f)) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetUint(1) - } else { - val.SetUint(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseUint(str, 0, val.Type().Bits()) - if err == nil { - val.SetUint(i) - } else { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: wrapStrconvNumError(err), - }) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := strconv.ParseUint(string(jn), 0, 64) - if err != nil { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: wrapStrconvNumError(err), - }) - } - val.SetUint(i) - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeBool(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - switch { - case dataKind == reflect.Bool: - val.SetBool(dataVal.Bool()) - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Int() != 0) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Uint() != 0) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Float() != 0) - case dataKind == reflect.String && d.config.WeaklyTypedInput: - b, err := strconv.ParseBool(dataVal.String()) - if err == nil { - val.SetBool(b) - } else if dataVal.String() == "" { - val.SetBool(false) - } else { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: wrapStrconvNumError(err), - }) - } - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeFloat(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetFloat(float64(dataVal.Int())) - case dataKind == reflect.Uint: - val.SetFloat(float64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetFloat(dataVal.Float()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetFloat(1) - } else { - val.SetFloat(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - f, err := strconv.ParseFloat(str, val.Type().Bits()) - if err == nil { - val.SetFloat(f) - } else { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: wrapStrconvNumError(err), - }) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Float64() - if err != nil { - return newDecodeError(name, &ParseError{ - Expected: val, - Value: data, - Err: err, - }) - } - val.SetFloat(i) - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeComplex(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - switch { - case dataKind == reflect.Complex64: - val.SetComplex(dataVal.Complex()) - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - - return nil -} - -func (d *Decoder) decodeMap(name string, data any, val reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // By default we overwrite keys in the current map - valMap := val - - // If the map is nil or we're purposely zeroing fields, make a new map - if valMap.IsNil() || d.config.ZeroFields { - // Make a new map to hold our result - mapType := reflect.MapOf(valKeyType, valElemType) - valMap = reflect.MakeMap(mapType) - } - - dataVal := reflect.ValueOf(data) - - // Resolve any levels of indirection - for dataVal.Kind() == reflect.Pointer { - dataVal = reflect.Indirect(dataVal) - } - - // Check input type and based on the input type jump to the proper func - switch dataVal.Kind() { - case reflect.Map: - return d.decodeMapFromMap(name, dataVal, val, valMap) - - case reflect.Struct: - return d.decodeMapFromStruct(name, dataVal, val, valMap) - - case reflect.Array, reflect.Slice: - if d.config.WeaklyTypedInput { - return d.decodeMapFromSlice(name, dataVal, val, valMap) - } - - fallthrough - - default: - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } -} - -func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - // Special case for BC reasons (covered by tests) - if dataVal.Len() == 0 { - val.Set(valMap) - return nil - } - - for i := 0; i < dataVal.Len(); i++ { - err := d.decode( - name+"["+strconv.Itoa(i)+"]", - dataVal.Index(i).Interface(), val) - if err != nil { - return err - } - } - - return nil -} - -func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // Accumulate errors - var errs []error - - // If the input data is empty, then we just match what the input data is. - if dataVal.Len() == 0 { - if dataVal.IsNil() { - if !val.IsNil() { - val.Set(dataVal) - } - } else { - // Set to empty allocated value - val.Set(valMap) - } - - return nil - } - - for _, k := range dataVal.MapKeys() { - fieldName := name + "[" + k.String() + "]" - - // First decode the key into the proper type - currentKey := reflect.Indirect(reflect.New(valKeyType)) - if err := d.decode(fieldName, k.Interface(), currentKey); err != nil { - errs = append(errs, err) - continue - } - - // Next decode the data into the proper type - v := dataVal.MapIndex(k).Interface() - currentVal := reflect.Indirect(reflect.New(valElemType)) - if err := d.decode(fieldName, v, currentVal); err != nil { - errs = append(errs, err) - continue - } - - valMap.SetMapIndex(currentKey, currentVal) - } - - // Set the built up map to the value - val.Set(valMap) - - return errors.Join(errs...) -} - -func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - typ := dataVal.Type() - for i := 0; i < typ.NumField(); i++ { - // Get the StructField first since this is a cheap operation. If the - // field is unexported, then ignore it. - f := typ.Field(i) - if f.PkgPath != "" { - continue - } - - // Next get the actual value of this field and verify it is assignable - // to the map value. - v := dataVal.Field(i) - if !v.Type().AssignableTo(valMap.Type().Elem()) { - return newDecodeError( - name+"."+f.Name, - fmt.Errorf("cannot assign type %q to map value field of type %q", v.Type(), valMap.Type().Elem()), - ) - } - - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name - - if tagValue == "" && d.config.IgnoreUntaggedFields { - continue - } - - // If Squash is set in the config, we squash the field down. - squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous - - v = dereferencePtrToStructIfNeeded(v, d.config.TagName) - - // Determine the name of the key in the map - if index := strings.Index(tagValue, ","); index != -1 { - if tagValue[:index] == "-" { - continue - } - // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { - continue - } - - // If "omitzero" is specified in the tag, it ignores zero values. - if strings.Index(tagValue[index+1:], "omitzero") != -1 && v.IsZero() { - continue - } - - // If "squash" is specified in the tag, we squash the field down. - squash = squash || strings.Contains(tagValue[index+1:], d.config.SquashTagOption) - if squash { - // When squashing, the embedded type can be a pointer to a struct. - if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct { - v = v.Elem() - } - - // The final type must be a struct - if v.Kind() != reflect.Struct { - return newDecodeError( - name+"."+f.Name, - fmt.Errorf("cannot squash non-struct type %q", v.Type()), - ) - } - } else { - if strings.Index(tagValue[index+1:], "remain") != -1 { - if v.Kind() != reflect.Map { - return newDecodeError( - name+"."+f.Name, - fmt.Errorf("error remain-tag field with invalid type: %q", v.Type()), - ) - } - - ptr := v.MapRange() - for ptr.Next() { - valMap.SetMapIndex(ptr.Key(), ptr.Value()) - } - continue - } - } - if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { - keyName = keyNameTagValue - } - } else if len(tagValue) > 0 { - if tagValue == "-" { - continue - } - keyName = tagValue - } - - switch v.Kind() { - // this is an embedded struct, so handle it differently - case reflect.Struct: - x := reflect.New(v.Type()) - x.Elem().Set(v) - - vType := valMap.Type() - vKeyType := vType.Key() - vElemType := vType.Elem() - mType := reflect.MapOf(vKeyType, vElemType) - vMap := reflect.MakeMap(mType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(vMap.Type()) - reflect.Indirect(addrVal).Set(vMap) - - err := d.decode(keyName, x.Interface(), reflect.Indirect(addrVal)) - if err != nil { - return err - } - - // the underlying map may have been completely overwritten so pull - // it indirectly out of the enclosing value. - vMap = reflect.Indirect(addrVal) - - if squash { - for _, k := range vMap.MapKeys() { - valMap.SetMapIndex(k, vMap.MapIndex(k)) - } - } else { - valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) - } - - default: - valMap.SetMapIndex(reflect.ValueOf(keyName), v) - } - } - - if val.CanAddr() { - val.Set(valMap) - } - - return nil -} - -func (d *Decoder) decodePtr(name string, data any, val reflect.Value) (bool, error) { - // If the input data is nil, then we want to just set the output - // pointer to be nil as well. - isNil := data == nil - if !isNil { - switch v := reflect.Indirect(reflect.ValueOf(data)); v.Kind() { - case reflect.Chan, - reflect.Func, - reflect.Interface, - reflect.Map, - reflect.Ptr, - reflect.Slice: - isNil = v.IsNil() - } - } - if isNil { - if !val.IsNil() && val.CanSet() { - nilValue := reflect.New(val.Type()).Elem() - val.Set(nilValue) - } - - return true, nil - } - - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - valType := val.Type() - valElemType := valType.Elem() - if val.CanSet() { - realVal := val - if realVal.IsNil() || d.config.ZeroFields { - realVal = reflect.New(valElemType) - } - - if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil { - return false, err - } - - val.Set(realVal) - } else { - if err := d.decode(name, data, reflect.Indirect(val)); err != nil { - return false, err - } - } - return false, nil -} - -func (d *Decoder) decodeFunc(name string, data any, val reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - dataVal := reflect.Indirect(reflect.ValueOf(data)) - if val.Type() != dataVal.Type() { - return newDecodeError(name, &UnconvertibleTypeError{ - Expected: val, - Value: data, - }) - } - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeSlice(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - sliceType := reflect.SliceOf(valElemType) - - // If we have a non array/slice type then we first attempt to convert. - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Slice and array we use the normal logic - case dataValKind == reflect.Slice, dataValKind == reflect.Array: - break - - // Empty maps turn into empty slices - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.MakeSlice(sliceType, 0, 0)) - return nil - } - // Create slice of maps of other sizes - return d.decodeSlice(name, []any{data}, val) - - case dataValKind == reflect.String && valElemType.Kind() == reflect.Uint8: - return d.decodeSlice(name, []byte(dataVal.String()), val) - - // All other types we try to convert to the slice type - // and "lift" it into it. i.e. a string becomes a string slice. - default: - // Just re-try this function with data as a slice. - return d.decodeSlice(name, []any{data}, val) - } - } - - return newDecodeError(name, - fmt.Errorf("source data must be an array or slice, got %s", dataValKind)) - } - - // If the input value is nil, then don't allocate since empty != nil - if dataValKind != reflect.Array && dataVal.IsNil() { - return nil - } - - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { - // Make a new slice to hold our result, same size as the original data. - valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) - } else if valSlice.Len() > dataVal.Len() { - valSlice = valSlice.Slice(0, dataVal.Len()) - } - - // Accumulate any errors - var errs []error - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - for valSlice.Len() <= i { - valSlice = reflect.Append(valSlice, reflect.Zero(valElemType)) - } - currentField := valSlice.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errs = append(errs, err) - } - } - - // Finally, set the value to the slice we built up - val.Set(valSlice) - - return errors.Join(errs...) -} - -func (d *Decoder) decodeArray(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - arrayType := reflect.ArrayOf(valType.Len(), valElemType) - - valArray := val - - if isComparable(valArray) && valArray.Interface() == reflect.Zero(valArray.Type()).Interface() || d.config.ZeroFields { - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Empty maps turn into empty arrays - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.Zero(arrayType)) - return nil - } - - // All other types we try to convert to the array type - // and "lift" it into it. i.e. a string becomes a string array. - default: - // Just re-try this function with data as a slice. - return d.decodeArray(name, []any{data}, val) - } - } - - return newDecodeError(name, - fmt.Errorf("source data must be an array or slice, got %s", dataValKind)) - - } - if dataVal.Len() > arrayType.Len() { - return newDecodeError(name, - fmt.Errorf("expected source data to have length less or equal to %d, got %d", arrayType.Len(), dataVal.Len())) - } - - // Make a new array to hold our result, same size as the original data. - valArray = reflect.New(arrayType).Elem() - } - - // Accumulate any errors - var errs []error - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - currentField := valArray.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errs = append(errs, err) - } - } - - // Finally, set the value to the array we built up - val.Set(valArray) - - return errors.Join(errs...) -} - -func (d *Decoder) decodeStruct(name string, data any, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - - // If the type of the value to write to and the data match directly, - // then we just set it directly instead of recursing into the structure. - if dataVal.Type() == val.Type() { - val.Set(dataVal) - return nil - } - - dataValKind := dataVal.Kind() - switch dataValKind { - case reflect.Map: - return d.decodeStructFromMap(name, dataVal, val) - - case reflect.Struct: - // Not the most efficient way to do this but we can optimize later if - // we want to. To convert from struct to struct we go to map first - // as an intermediary. - - // Make a new map to hold our result - mapType := reflect.TypeOf((map[string]any)(nil)) - mval := reflect.MakeMap(mapType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(mval.Type()) - - reflect.Indirect(addrVal).Set(mval) - if err := d.decodeMapFromStruct(name, dataVal, reflect.Indirect(addrVal), mval); err != nil { - return err - } - - result := d.decodeStructFromMap(name, reflect.Indirect(addrVal), val) - return result - - default: - return newDecodeError(name, - fmt.Errorf("expected a map or struct, got %q", dataValKind)) - } -} - -func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) error { - dataValType := dataVal.Type() - if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface { - return newDecodeError(name, - fmt.Errorf("needs a map with string keys, has %q keys", kind)) - } - - dataValKeys := make(map[reflect.Value]struct{}) - dataValKeysUnused := make(map[any]struct{}) - for _, dataValKey := range dataVal.MapKeys() { - dataValKeys[dataValKey] = struct{}{} - dataValKeysUnused[dataValKey.Interface()] = struct{}{} - } - - targetValKeysUnused := make(map[any]struct{}) - - var errs []error - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = val - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - type field struct { - field reflect.StructField - val reflect.Value - } - - // remainField is set to a valid field set with the "remain" tag if - // we are keeping track of remaining values. - var remainField *field - - fields := []field{} - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - fieldVal := structVal.Field(i) - if fieldVal.Kind() == reflect.Ptr && fieldVal.Elem().Kind() == reflect.Struct { - // Handle embedded struct pointers as embedded structs. - fieldVal = fieldVal.Elem() - } - - // If "squash" is specified in the tag, we squash the field down. - squash := d.config.Squash && fieldVal.Kind() == reflect.Struct && fieldType.Anonymous - remain := false - - // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") - for _, tag := range tagParts[1:] { - if tag == d.config.SquashTagOption { - squash = true - break - } - - if tag == "remain" { - remain = true - break - } - } - - if squash { - switch fieldVal.Kind() { - case reflect.Struct: - structs = append(structs, fieldVal) - case reflect.Interface: - if !fieldVal.IsNil() { - structs = append(structs, fieldVal.Elem().Elem()) - } - default: - errs = append(errs, newDecodeError( - name+"."+fieldType.Name, - fmt.Errorf("unsupported type for squash: %s", fieldVal.Kind()), - )) - } - continue - } - - // Build our field - if remain { - remainField = &field{fieldType, fieldVal} - } else { - // Normal struct field, store it away - fields = append(fields, field{fieldType, fieldVal}) - } - } - } - - // for fieldType, field := range fields { - for _, f := range fields { - field, fieldValue := f.field, f.val - fieldName := field.Name - - tagValue := field.Tag.Get(d.config.TagName) - if tagValue == "" && d.config.IgnoreUntaggedFields { - continue - } - tagValue = strings.SplitN(tagValue, ",", 2)[0] - if tagValue != "" { - fieldName = tagValue - } - - rawMapKey := reflect.ValueOf(fieldName) - rawMapVal := dataVal.MapIndex(rawMapKey) - if !rawMapVal.IsValid() { - // Do a slower search by iterating over each key and - // doing case-insensitive search. - for dataValKey := range dataValKeys { - mK, ok := dataValKey.Interface().(string) - if !ok { - // Not a string key - continue - } - - if d.config.MatchName(mK, fieldName) { - rawMapKey = dataValKey - rawMapVal = dataVal.MapIndex(dataValKey) - break - } - } - - if !rawMapVal.IsValid() { - // There was no matching key in the map for the value in - // the struct. Remember it for potential errors and metadata. - if !(d.config.AllowUnsetPointer && fieldValue.Kind() == reflect.Ptr) { - targetValKeysUnused[fieldName] = struct{}{} - } - continue - } - } - - if !fieldValue.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !fieldValue.CanSet() { - continue - } - - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - - // If the name is empty string, then we're at the root, and we - // don't dot-join the fields. - if name != "" { - fieldName = name + "." + fieldName - } - - if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil { - errs = append(errs, err) - } - } - - // If we have a "remain"-tagged field and we have unused keys then - // we put the unused keys directly into the remain field. - if remainField != nil && len(dataValKeysUnused) > 0 { - // Build a map of only the unused values - remain := map[any]any{} - for key := range dataValKeysUnused { - remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() - } - - // Decode it as-if we were just decoding this map onto our map. - if err := d.decodeMap(name, remain, remainField.val); err != nil { - errs = append(errs, err) - } - - // Set the map to nil so we have none so that the next check will - // not error (ErrorUnused) - dataValKeysUnused = nil - } - - if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { - keys := make([]string, 0, len(dataValKeysUnused)) - for rawKey := range dataValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - errs = append(errs, newDecodeError( - name, - fmt.Errorf("has invalid keys: %s", strings.Join(keys, ", ")), - )) - } - - if d.config.ErrorUnset && len(targetValKeysUnused) > 0 { - keys := make([]string, 0, len(targetValKeysUnused)) - for rawKey := range targetValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - errs = append(errs, newDecodeError( - name, - fmt.Errorf("has unset fields: %s", strings.Join(keys, ", ")), - )) - } - - if err := errors.Join(errs...); err != nil { - return err - } - - // Add the unused keys to the list of unused keys if we're tracking metadata - if d.config.Metadata != nil { - for rawKey := range dataValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unused = append(d.config.Metadata.Unused, key) - } - for rawKey := range targetValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unset = append(d.config.Metadata.Unset, key) - } - } - - return nil -} - -func isEmptyValue(v reflect.Value) bool { - switch getKind(v) { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func getKind(val reflect.Value) reflect.Kind { - kind := val.Kind() - - switch { - case kind >= reflect.Int && kind <= reflect.Int64: - return reflect.Int - case kind >= reflect.Uint && kind <= reflect.Uint64: - return reflect.Uint - case kind >= reflect.Float32 && kind <= reflect.Float64: - return reflect.Float32 - case kind >= reflect.Complex64 && kind <= reflect.Complex128: - return reflect.Complex64 - default: - return kind - } -} - -func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, tagName string) bool { - for i := 0; i < typ.NumField(); i++ { - f := typ.Field(i) - if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields - return true - } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside - return true - } - } - return false -} - -func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { - return v - } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref - } - return v -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_19.go b/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_19.go deleted file mode 100644 index d0913fff6c..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_19.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build !go1.20 - -package mapstructure - -import "reflect" - -func isComparable(v reflect.Value) bool { - k := v.Kind() - switch k { - case reflect.Invalid: - return false - - case reflect.Array: - switch v.Type().Elem().Kind() { - case reflect.Interface, reflect.Array, reflect.Struct: - for i := 0; i < v.Type().Len(); i++ { - // if !v.Index(i).Comparable() { - if !isComparable(v.Index(i)) { - return false - } - } - return true - } - return v.Type().Comparable() - - case reflect.Interface: - // return v.Elem().Comparable() - return isComparable(v.Elem()) - - case reflect.Struct: - for i := 0; i < v.NumField(); i++ { - return false - - // if !v.Field(i).Comparable() { - if !isComparable(v.Field(i)) { - return false - } - } - return true - - default: - return v.Type().Comparable() - } -} diff --git a/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_20.go b/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_20.go deleted file mode 100644 index f8255a1b17..0000000000 --- a/vendor/github.com/go-viper/mapstructure/v2/reflect_go1_20.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build go1.20 - -package mapstructure - -import "reflect" - -// TODO: remove once we drop support for Go <1.20 -func isComparable(v reflect.Value) bool { - return v.Comparable() -} diff --git a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go b/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go deleted file mode 100644 index e8134ec8ba..0000000000 --- a/vendor/github.com/gogo/protobuf/jsonpb/jsonpb.go +++ /dev/null @@ -1,1435 +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/gogo/protobuf/proto" - "github.com/gogo/protobuf/types" -) - -const secondInNanos = int64(time.Second / time.Nanosecond) -const maxSecondsInDuration = 315576000000 - -// 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 isWkt interface { - XXX_WellKnownType() string -} - -var ( - wktType = reflect.TypeOf((*isWkt)(nil)).Elem() - messageType = reflect.TypeOf((*proto.Message)(nil)).Elem() -) - -// 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 m.Indent != "" { - b, err = json.MarshalIndent(js, indent, m.Indent) - } else { - b, err = json.Marshal(js) - } - if err != nil { - return err - } - } - - out.write(string(b)) - return out.err - } - - s := reflect.ValueOf(v).Elem() - - // Handle well-known types. - if wkt, ok := v.(isWkt); 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": - s, ns := s.Field(0).Int(), s.Field(1).Int() - if s < -maxSecondsInDuration || s > maxSecondsInDuration { - return fmt.Errorf("seconds out of range %v", s) - } - 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") - } - // Generated output always contains 0, 3, 6, or 9 fractional digits, - // depending on required precision, followed by the suffix "s". - f := "%d.%09d" - if ns < 0 { - ns = -ns - if s == 0 { - f = "-%d.%09d" - } - } - x := fmt.Sprintf(f, 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 - } - - //this is not a protobuf field - if valueField.Tag.Get("protobuf") == "" && valueField.Tag.Get("protobuf_oneof") == "" { - 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 the map value is a cast type, it may not implement proto.Message, therefore - // allow the struct tag to declare the underlying message type. Change the property - // of the child types, use CustomType as a passer. CastType currently property is - // not used in json encoding. - if value.Kind() == reflect.Map { - if tag := valueField.Tag.Get("protobuf"); tag != "" { - for _, v := range strings.Split(tag, ",") { - if !strings.HasPrefix(v, "castvaluetype=") { - continue - } - v = strings.TrimPrefix(v, "castvaluetype=") - prop.MapValProp.CustomType = v - break - } - } - } - 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.(isWkt); 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 { - - 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 v.Type().Implements(wktType) { - wkt := v.Interface().(isWkt) - switch wkt.XXX_WellKnownType() { - case "NullValue": - out.write("null") - return out.err - } - } - - if t, ok := v.Interface().(time.Time); ok { - ts, err := types.TimestampProto(t) - if err != nil { - return err - } - return m.marshalValue(out, prop, reflect.ValueOf(ts), indent) - } - - if d, ok := v.Interface().(time.Duration); ok { - dur := types.DurationProto(d) - return m.marshalValue(out, prop, reflect.ValueOf(dur), indent) - } - - // 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())) - } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - enumStr = string(data) - enumStr, err = strconv.Unquote(enumStr) - if err != nil { - return err - } - } - - 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 { - i := v - if v.CanAddr() { - i = v.Addr() - } else { - i = reflect.New(v.Type()) - i.Elem().Set(v) - } - iface := i.Interface() - if iface == nil { - out.write(`null`) - return out.err - } - - if m, ok := v.Interface().(interface { - MarshalJSON() ([]byte, error) - }); ok { - data, err := m.MarshalJSON() - if err != nil { - return err - } - out.write(string(data)) - return nil - } - - pm, ok := iface.(proto.Message) - if !ok { - if prop.CustomType == "" { - return fmt.Errorf("%v does not implement proto.Message", v.Type()) - } - t := proto.MessageType(prop.CustomType) - if t == nil || !i.Type().ConvertibleTo(t) { - return fmt.Errorf("%v declared custom type %s but it is not convertible to %v", v.Type(), prop.CustomType, t) - } - pm = i.Convert(t).Interface().(proto.Message) - } - return m.marshalObject(out, pm, 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(&types.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().(isWkt); 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.(isWkt); 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, uerr := json.Marshal(jsonFields) - if uerr != nil { - return fmt.Errorf("can't generate JSON for Any's nested proto to be unmarshaled: %v", uerr) - } - - 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]*types.Value{})) - for k, jv := range m { - pv := &types.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([]*types.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(&types.Value_NullValue{})) - } else if v, err := strconv.ParseFloat(ivStr, 0); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_NumberValue{NumberValue: v})) - } else if v, err := unquote(ivStr); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_StringValue{StringValue: v})) - } else if v, err := strconv.ParseBool(ivStr); err == nil { - target.Field(0).Set(reflect.ValueOf(&types.Value_BoolValue{BoolValue: v})) - } else if err := json.Unmarshal(inputValue, &[]json.RawMessage{}); err == nil { - lv := &types.ListValue{} - target.Field(0).Set(reflect.ValueOf(&types.Value_ListValue{ListValue: lv})) - return u.unmarshalValue(reflect.ValueOf(lv).Elem(), inputValue, prop) - } else if err := json.Unmarshal(inputValue, &map[string]json.RawMessage{}); err == nil { - sv := &types.Struct{} - target.Field(0).Set(reflect.ValueOf(&types.Value_StructValue{StructValue: sv})) - return u.unmarshalValue(reflect.ValueOf(sv).Elem(), inputValue, prop) - } else { - return fmt.Errorf("unrecognized type for Value %q", ivStr) - } - return nil - } - } - - if t, ok := target.Addr().Interface().(*time.Time); ok { - ts := &types.Timestamp{} - if err := u.unmarshalValue(reflect.ValueOf(ts).Elem(), inputValue, prop); err != nil { - return err - } - tt, err := types.TimestampFromProto(ts) - if err != nil { - return err - } - *t = tt - return nil - } - - if d, ok := target.Addr().Interface().(*time.Duration); ok { - dur := &types.Duration{} - if err := u.unmarshalValue(reflect.ValueOf(dur).Elem(), inputValue, prop); err != nil { - return err - } - dd, err := types.DurationFromProto(dur) - if err != nil { - return err - } - *d = dd - 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 - } - - if prop != nil && len(prop.CustomType) > 0 && target.CanAddr() { - if m, ok := target.Addr().Interface().(interface { - UnmarshalJSON([]byte) error - }); ok { - return json.Unmarshal(inputValue, m) - } - } - - // 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 - if targetType.Kind() == reflect.Slice { - if targetType.Elem().Kind() == reflect.Uint8 { - outRef := reflect.New(targetType) - outVal := outRef.Interface() - //CustomType with underlying type []byte - if _, ok := outVal.(interface { - UnmarshalJSON([]byte) error - }); ok { - if err := json.Unmarshal(inputValue, outVal); err != nil { - return err - } - target.Set(outRef.Elem()) - return nil - } - // Special case for encoded bytes. Pre-go1.5 doesn't support unmarshalling - // strings into aliased []byte types. - // https://github.com/golang/go/commit/4302fd0409da5e4f1d71471a6770dacdc3301197 - // https://github.com/golang/go/commit/c60707b14d6be26bf4213114d13070bff00d0b0a - var out []byte - if err := json.Unmarshal(inputValue, &out); err != nil { - return err - } - target.SetBytes(out) - return nil - } - - 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 - } - } - - if !k.Type().AssignableTo(targetType.Key()) { - k = k.Convert(targetType.Key()) - } - - // 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.(isWkt); 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 v.Type().Implements(messageType) { - return checkRequiredFields(v.Interface().(proto.Message)) - } - return nil -} diff --git a/vendor/github.com/gogo/protobuf/types/any.go b/vendor/github.com/gogo/protobuf/types/any.go deleted file mode 100644 index df4787de37..0000000000 --- a/vendor/github.com/gogo/protobuf/types/any.go +++ /dev/null @@ -1,140 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -// This file implements functions to marshal proto.Message to/from -// google.protobuf.Any message. - -import ( - "fmt" - "reflect" - "strings" - - "github.com/gogo/protobuf/proto" -) - -const googleApis = "type.googleapis.com/" - -// AnyMessageName returns the name of the message contained in a google.protobuf.Any message. -// -// Note that regular type assertions should be done using the Is -// function. AnyMessageName is provided for less common use cases like filtering a -// sequence of Any messages based on a set of allowed message type names. -func AnyMessageName(any *Any) (string, error) { - if any == nil { - return "", fmt.Errorf("message is nil") - } - slash := strings.LastIndex(any.TypeUrl, "/") - if slash < 0 { - return "", fmt.Errorf("message type url %q is invalid", any.TypeUrl) - } - return any.TypeUrl[slash+1:], nil -} - -// MarshalAny takes the protocol buffer and encodes it into google.protobuf.Any. -func MarshalAny(pb proto.Message) (*Any, error) { - value, err := proto.Marshal(pb) - if err != nil { - return nil, err - } - return &Any{TypeUrl: googleApis + proto.MessageName(pb), Value: value}, nil -} - -// DynamicAny is a value that can be passed to UnmarshalAny to automatically -// allocate a proto.Message for the type specified in a google.protobuf.Any -// message. The allocated message is stored in the embedded proto.Message. -// -// Example: -// -// var x ptypes.DynamicAny -// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... } -// fmt.Printf("unmarshaled message: %v", x.Message) -type DynamicAny struct { - proto.Message -} - -// Empty returns a new proto.Message of the type specified in a -// google.protobuf.Any message. It returns an error if corresponding message -// type isn't linked in. -func EmptyAny(any *Any) (proto.Message, error) { - aname, err := AnyMessageName(any) - if err != nil { - return nil, err - } - - t := proto.MessageType(aname) - if t == nil { - return nil, fmt.Errorf("any: message type %q isn't linked in", aname) - } - return reflect.New(t.Elem()).Interface().(proto.Message), nil -} - -// UnmarshalAny parses the protocol buffer representation in a google.protobuf.Any -// message and places the decoded result in pb. It returns an error if type of -// contents of Any message does not match type of pb message. -// -// pb can be a proto.Message, or a *DynamicAny. -func UnmarshalAny(any *Any, pb proto.Message) error { - if d, ok := pb.(*DynamicAny); ok { - if d.Message == nil { - var err error - d.Message, err = EmptyAny(any) - if err != nil { - return err - } - } - return UnmarshalAny(any, d.Message) - } - - aname, err := AnyMessageName(any) - if err != nil { - return err - } - - mname := proto.MessageName(pb) - if aname != mname { - return fmt.Errorf("mismatched message type: got %q want %q", aname, mname) - } - return proto.Unmarshal(any.Value, pb) -} - -// Is returns true if any value contains a given message type. -func Is(any *Any, pb proto.Message) bool { - // The following is equivalent to AnyMessageName(any) == proto.MessageName(pb), - // but it avoids scanning TypeUrl for the slash. - if any == nil { - return false - } - name := proto.MessageName(pb) - prefix := len(any.TypeUrl) - len(name) - return prefix >= 1 && any.TypeUrl[prefix-1] == '/' && any.TypeUrl[prefix:] == name -} diff --git a/vendor/github.com/gogo/protobuf/types/any.pb.go b/vendor/github.com/gogo/protobuf/types/any.pb.go deleted file mode 100644 index e3d4d9490f..0000000000 --- a/vendor/github.com/gogo/protobuf/types/any.pb.go +++ /dev/null @@ -1,694 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/any.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// `Any` contains an arbitrary serialized protocol buffer message along with a -// URL that describes the type of the serialized message. -// -// Protobuf library provides support to pack/unpack Any values in the form -// of utility functions or additional generated methods of the Any type. -// -// Example 1: Pack and unpack a message in C++. -// -// Foo foo = ...; -// Any any; -// any.PackFrom(foo); -// ... -// if (any.UnpackTo(&foo)) { -// ... -// } -// -// Example 2: Pack and unpack a message in Java. -// -// Foo foo = ...; -// Any any = Any.pack(foo); -// ... -// if (any.is(Foo.class)) { -// foo = any.unpack(Foo.class); -// } -// -// Example 3: Pack and unpack a message in Python. -// -// foo = Foo(...) -// any = Any() -// any.Pack(foo) -// ... -// if any.Is(Foo.DESCRIPTOR): -// any.Unpack(foo) -// ... -// -// Example 4: Pack and unpack a message in Go -// -// foo := &pb.Foo{...} -// any, err := ptypes.MarshalAny(foo) -// ... -// foo := &pb.Foo{} -// if err := ptypes.UnmarshalAny(any, foo); err != nil { -// ... -// } -// -// The pack methods provided by protobuf library will by default use -// 'type.googleapis.com/full.type.name' as the type URL and the unpack -// methods only use the fully qualified type name after the last '/' -// in the type URL, for example "foo.bar.com/x/y.z" will yield type -// name "y.z". -// -// -// JSON -// ==== -// The JSON representation of an `Any` value uses the regular -// representation of the deserialized, embedded message, with an -// additional field `@type` which contains the type URL. Example: -// -// package google.profile; -// message Person { -// string first_name = 1; -// string last_name = 2; -// } -// -// { -// "@type": "type.googleapis.com/google.profile.Person", -// "firstName": , -// "lastName": -// } -// -// If the embedded message type is well-known and has a custom JSON -// representation, that representation will be embedded adding a field -// `value` which holds the custom JSON in addition to the `@type` -// field. Example (for message [google.protobuf.Duration][]): -// -// { -// "@type": "type.googleapis.com/google.protobuf.Duration", -// "value": "1.212s" -// } -// -type Any struct { - // A URL/resource name that uniquely identifies the type of the serialized - // protocol buffer message. This string must contain at least - // one "/" character. The last segment of the URL's path must represent - // the fully qualified name of the type (as in - // `path/google.protobuf.Duration`). The name should be in a canonical form - // (e.g., leading "." is not accepted). - // - // In practice, teams usually precompile into the binary all types that they - // expect it to use in the context of Any. However, for URLs which use the - // scheme `http`, `https`, or no scheme, one can optionally set up a type - // server that maps type URLs to message definitions as follows: - // - // * If no scheme is provided, `https` is assumed. - // * An HTTP GET on the URL must yield a [google.protobuf.Type][] - // value in binary format, or produce an error. - // * Applications are allowed to cache lookup results based on the - // URL, or have them precompiled into a binary to avoid any - // lookup. Therefore, binary compatibility needs to be preserved - // on changes to types. (Use versioned type names to manage - // breaking changes.) - // - // Note: this functionality is not currently available in the official - // protobuf release, and it is not used for type URLs beginning with - // type.googleapis.com. - // - // Schemes other than `http`, `https` (or the empty scheme) might be - // used with implementation specific semantics. - // - TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // Must be a valid serialized protocol buffer of the above specified type. - Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Any) Reset() { *m = Any{} } -func (*Any) ProtoMessage() {} -func (*Any) Descriptor() ([]byte, []int) { - return fileDescriptor_b53526c13ae22eb4, []int{0} -} -func (*Any) XXX_WellKnownType() string { return "Any" } -func (m *Any) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Any.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Any) XXX_Merge(src proto.Message) { - xxx_messageInfo_Any.Merge(m, src) -} -func (m *Any) XXX_Size() int { - return m.Size() -} -func (m *Any) XXX_DiscardUnknown() { - xxx_messageInfo_Any.DiscardUnknown(m) -} - -var xxx_messageInfo_Any proto.InternalMessageInfo - -func (m *Any) GetTypeUrl() string { - if m != nil { - return m.TypeUrl - } - return "" -} - -func (m *Any) GetValue() []byte { - if m != nil { - return m.Value - } - return nil -} - -func (*Any) XXX_MessageName() string { - return "google.protobuf.Any" -} -func init() { - proto.RegisterType((*Any)(nil), "google.protobuf.Any") -} - -func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) } - -var fileDescriptor_b53526c13ae22eb4 = []byte{ - // 211 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4, - 0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a, - 0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46, - 0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7, - 0x34, 0x55, 0x82, 0x49, 0x81, 0x51, 0x83, 0x27, 0x08, 0xc2, 0x71, 0xaa, 0xbf, 0xf1, 0x50, 0x8e, - 0xe1, 0xc3, 0x43, 0x39, 0xc6, 0x1f, 0x0f, 0xe5, 0x18, 0x1b, 0x1e, 0xc9, 0x31, 0xae, 0x78, 0x24, - 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, - 0x24, 0xc7, 0xf0, 0x01, 0x24, 0xfe, 0x58, 0x8e, 0xf1, 0xc4, 0x63, 0x39, 0x46, 0x2e, 0xe1, 0xe4, - 0xfc, 0x5c, 0x3d, 0x34, 0xeb, 0x9d, 0x38, 0x1c, 0xf3, 0x2a, 0x03, 0x40, 0x9c, 0x00, 0xc6, 0x28, - 0x56, 0x90, 0x8d, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, 0x94, - 0x06, 0x40, 0x95, 0xea, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, 0x94, - 0x25, 0xb1, 0x81, 0xcd, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb7, 0x81, 0x82, 0xd3, 0xed, - 0x00, 0x00, 0x00, -} - -func (this *Any) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Any) - if !ok { - that2, ok := that.(Any) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.TypeUrl != that1.TypeUrl { - if this.TypeUrl < that1.TypeUrl { - return -1 - } - return 1 - } - if c := bytes.Compare(this.Value, that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Any) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Any) - if !ok { - that2, ok := that.(Any) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if !bytes.Equal(this.Value, that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Any) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Any{") - s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringAny(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Any) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Any) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Any) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintAny(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.TypeUrl) > 0 { - i -= len(m.TypeUrl) - copy(dAtA[i:], m.TypeUrl) - i = encodeVarintAny(dAtA, i, uint64(len(m.TypeUrl))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintAny(dAtA []byte, offset int, v uint64) int { - offset -= sovAny(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedAny(r randyAny, easy bool) *Any { - this := &Any{} - this.TypeUrl = string(randStringAny(r)) - v1 := r.Intn(100) - this.Value = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Value[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedAny(r, 3) - } - return this -} - -type randyAny interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAny(r randyAny) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAny(r randyAny) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneAny(r) - } - return string(tmps) -} -func randUnrecognizedAny(r randyAny, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAny(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAny(dAtA []byte, r randyAny, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateAny(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAny(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAny(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAny(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Any) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovAny(uint64(l)) - } - l = len(m.Value) - if l > 0 { - n += 1 + l + sovAny(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovAny(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozAny(x uint64) (n int) { - return sovAny(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Any) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Any{`, - `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringAny(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Any) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Any: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Any: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthAny - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthAny - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAny - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthAny - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthAny - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipAny(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAny - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipAny(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowAny - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthAny - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAny - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthAny - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthAny = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAny = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAny = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/api.pb.go b/vendor/github.com/gogo/protobuf/types/api.pb.go deleted file mode 100644 index 83e8869206..0000000000 --- a/vendor/github.com/gogo/protobuf/types/api.pb.go +++ /dev/null @@ -1,2134 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/api.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Api is a light-weight descriptor for an API Interface. -// -// Interfaces are also described as "protocol buffer services" in some contexts, -// such as by the "service" keyword in a .proto file, but they are different -// from API Services, which represent a concrete implementation of an interface -// as opposed to simply a description of methods and bindings. They are also -// sometimes simply referred to as "APIs" in other contexts, such as the name of -// this message itself. See https://cloud.google.com/apis/design/glossary for -// detailed terminology. -type Api struct { - // The fully qualified name of this interface, including package name - // followed by the interface's simple name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The methods of this interface, in unspecified order. - Methods []*Method `protobuf:"bytes,2,rep,name=methods,proto3" json:"methods,omitempty"` - // Any metadata attached to the interface. - Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - // A version string for this interface. If specified, must have the form - // `major-version.minor-version`, as in `1.10`. If the minor version is - // omitted, it defaults to zero. If the entire version field is empty, the - // major version is derived from the package name, as outlined below. If the - // field is not empty, the version in the package name will be verified to be - // consistent with what is provided here. - // - // The versioning schema uses [semantic - // versioning](http://semver.org) where the major version number - // indicates a breaking change and the minor version an additive, - // non-breaking change. Both version numbers are signals to users - // what to expect from different versions, and should be carefully - // chosen based on the product plan. - // - // The major version is also reflected in the package name of the - // interface, which must end in `v`, as in - // `google.feature.v1`. For major versions 0 and 1, the suffix can - // be omitted. Zero major versions must only be used for - // experimental, non-GA interfaces. - // - // - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - // Source context for the protocol buffer service represented by this - // message. - SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // Included interfaces. See [Mixin][]. - Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins,proto3" json:"mixins,omitempty"` - // The source syntax of the service. - Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Api) Reset() { *m = Api{} } -func (*Api) ProtoMessage() {} -func (*Api) Descriptor() ([]byte, []int) { - return fileDescriptor_a2ec32096296c143, []int{0} -} -func (m *Api) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Api) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Api.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Api) XXX_Merge(src proto.Message) { - xxx_messageInfo_Api.Merge(m, src) -} -func (m *Api) XXX_Size() int { - return m.Size() -} -func (m *Api) XXX_DiscardUnknown() { - xxx_messageInfo_Api.DiscardUnknown(m) -} - -var xxx_messageInfo_Api proto.InternalMessageInfo - -func (m *Api) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Api) GetMethods() []*Method { - if m != nil { - return m.Methods - } - return nil -} - -func (m *Api) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (m *Api) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *Api) GetSourceContext() *SourceContext { - if m != nil { - return m.SourceContext - } - return nil -} - -func (m *Api) GetMixins() []*Mixin { - if m != nil { - return m.Mixins - } - return nil -} - -func (m *Api) GetSyntax() Syntax { - if m != nil { - return m.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (*Api) XXX_MessageName() string { - return "google.protobuf.Api" -} - -// Method represents a method of an API interface. -type Method struct { - // The simple name of this method. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // A URL of the input message type. - RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl,proto3" json:"request_type_url,omitempty"` - // If true, the request is streamed. - RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming,proto3" json:"request_streaming,omitempty"` - // The URL of the output message type. - ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl,proto3" json:"response_type_url,omitempty"` - // If true, the response is streamed. - ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming,proto3" json:"response_streaming,omitempty"` - // Any metadata attached to the method. - Options []*Option `protobuf:"bytes,6,rep,name=options,proto3" json:"options,omitempty"` - // The source syntax of this method. - Syntax Syntax `protobuf:"varint,7,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Method) Reset() { *m = Method{} } -func (*Method) ProtoMessage() {} -func (*Method) Descriptor() ([]byte, []int) { - return fileDescriptor_a2ec32096296c143, []int{1} -} -func (m *Method) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Method) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Method.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Method) XXX_Merge(src proto.Message) { - xxx_messageInfo_Method.Merge(m, src) -} -func (m *Method) XXX_Size() int { - return m.Size() -} -func (m *Method) XXX_DiscardUnknown() { - xxx_messageInfo_Method.DiscardUnknown(m) -} - -var xxx_messageInfo_Method proto.InternalMessageInfo - -func (m *Method) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Method) GetRequestTypeUrl() string { - if m != nil { - return m.RequestTypeUrl - } - return "" -} - -func (m *Method) GetRequestStreaming() bool { - if m != nil { - return m.RequestStreaming - } - return false -} - -func (m *Method) GetResponseTypeUrl() string { - if m != nil { - return m.ResponseTypeUrl - } - return "" -} - -func (m *Method) GetResponseStreaming() bool { - if m != nil { - return m.ResponseStreaming - } - return false -} - -func (m *Method) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (m *Method) GetSyntax() Syntax { - if m != nil { - return m.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (*Method) XXX_MessageName() string { - return "google.protobuf.Method" -} - -// Declares an API Interface to be included in this interface. The including -// interface must redeclare all the methods from the included interface, but -// documentation and options are inherited as follows: -// -// - If after comment and whitespace stripping, the documentation -// string of the redeclared method is empty, it will be inherited -// from the original method. -// -// - Each annotation belonging to the service config (http, -// visibility) which is not set in the redeclared method will be -// inherited. -// -// - If an http annotation is inherited, the path pattern will be -// modified as follows. Any version prefix will be replaced by the -// version of the including interface plus the [root][] path if -// specified. -// -// Example of a simple mixin: -// -// package google.acl.v1; -// service AccessControl { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v1/{resource=**}:getAcl"; -// } -// } -// -// package google.storage.v2; -// service Storage { -// rpc GetAcl(GetAclRequest) returns (Acl); -// -// // Get a data record. -// rpc GetData(GetDataRequest) returns (Data) { -// option (google.api.http).get = "/v2/{resource=**}"; -// } -// } -// -// Example of a mixin configuration: -// -// apis: -// - name: google.storage.v2.Storage -// mixins: -// - name: google.acl.v1.AccessControl -// -// The mixin construct implies that all methods in `AccessControl` are -// also declared with same name and request/response types in -// `Storage`. A documentation generator or annotation processor will -// see the effective `Storage.GetAcl` method after inherting -// documentation and annotations as follows: -// -// service Storage { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v2/{resource=**}:getAcl"; -// } -// ... -// } -// -// Note how the version in the path pattern changed from `v1` to `v2`. -// -// If the `root` field in the mixin is specified, it should be a -// relative path under which inherited HTTP paths are placed. Example: -// -// apis: -// - name: google.storage.v2.Storage -// mixins: -// - name: google.acl.v1.AccessControl -// root: acls -// -// This implies the following inherited HTTP annotation: -// -// service Storage { -// // Get the underlying ACL object. -// rpc GetAcl(GetAclRequest) returns (Acl) { -// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl"; -// } -// ... -// } -type Mixin struct { - // The fully qualified name of the interface which is included. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // If non-empty specifies a path under which inherited HTTP paths - // are rooted. - Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Mixin) Reset() { *m = Mixin{} } -func (*Mixin) ProtoMessage() {} -func (*Mixin) Descriptor() ([]byte, []int) { - return fileDescriptor_a2ec32096296c143, []int{2} -} -func (m *Mixin) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mixin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Mixin.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Mixin) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mixin.Merge(m, src) -} -func (m *Mixin) XXX_Size() int { - return m.Size() -} -func (m *Mixin) XXX_DiscardUnknown() { - xxx_messageInfo_Mixin.DiscardUnknown(m) -} - -var xxx_messageInfo_Mixin proto.InternalMessageInfo - -func (m *Mixin) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Mixin) GetRoot() string { - if m != nil { - return m.Root - } - return "" -} - -func (*Mixin) XXX_MessageName() string { - return "google.protobuf.Mixin" -} -func init() { - proto.RegisterType((*Api)(nil), "google.protobuf.Api") - proto.RegisterType((*Method)(nil), "google.protobuf.Method") - proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin") -} - -func init() { proto.RegisterFile("google/protobuf/api.proto", fileDescriptor_a2ec32096296c143) } - -var fileDescriptor_a2ec32096296c143 = []byte{ - // 467 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x91, 0x31, 0x6f, 0x13, 0x31, - 0x14, 0xc7, 0xeb, 0xbb, 0xe4, 0x52, 0x5c, 0x91, 0x82, 0x91, 0xc0, 0x64, 0xb0, 0x4e, 0x15, 0xc3, - 0x09, 0xc4, 0x45, 0x94, 0x4f, 0xd0, 0x20, 0xd4, 0x01, 0x21, 0xa2, 0x0b, 0x08, 0x89, 0x25, 0x4a, - 0x83, 0x09, 0x96, 0xee, 0x6c, 0x63, 0x3b, 0x90, 0x4c, 0xf0, 0x59, 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0x3f, 0x06, 0xe1, 0xe1, 0x70, 0xf0, 0x39, - 0x20, 0x87, 0x15, 0x3a, 0xf4, 0x13, 0x3f, 0xa7, 0x79, 0xfe, 0x88, 0x8b, 0x77, 0xdc, 0xc6, 0xa8, - 0x8f, 0x22, 0xe7, 0x71, 0xff, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2b, 0x64, 0x40, 0x40, 0xa1, - 0x03, 0x00, 0x00, -} - -func (this *Api) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Api) - if !ok { - that2, ok := that.(Api) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if len(this.Methods) != len(that1.Methods) { - if len(this.Methods) < len(that1.Methods) { - return -1 - } - return 1 - } - for i := range this.Methods { - if c := this.Methods[i].Compare(that1.Methods[i]); c != 0 { - return c - } - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if this.Version != that1.Version { - if this.Version < that1.Version { - return -1 - } - return 1 - } - if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { - return c - } - if len(this.Mixins) != len(that1.Mixins) { - if len(this.Mixins) < len(that1.Mixins) { - return -1 - } - return 1 - } - for i := range this.Mixins { - if c := this.Mixins[i].Compare(that1.Mixins[i]); c != 0 { - return c - } - } - if this.Syntax != that1.Syntax { - if this.Syntax < that1.Syntax { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Method) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Method) - if !ok { - that2, ok := that.(Method) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if this.RequestTypeUrl != that1.RequestTypeUrl { - if this.RequestTypeUrl < that1.RequestTypeUrl { - return -1 - } - return 1 - } - if this.RequestStreaming != that1.RequestStreaming { - if !this.RequestStreaming { - return -1 - } - return 1 - } - if this.ResponseTypeUrl != that1.ResponseTypeUrl { - if this.ResponseTypeUrl < that1.ResponseTypeUrl { - return -1 - } - return 1 - } - if this.ResponseStreaming != that1.ResponseStreaming { - if !this.ResponseStreaming { - return -1 - } - return 1 - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if this.Syntax != that1.Syntax { - if this.Syntax < that1.Syntax { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Mixin) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Mixin) - if !ok { - that2, ok := that.(Mixin) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if this.Root != that1.Root { - if this.Root < that1.Root { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Api) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Api) - if !ok { - that2, ok := that.(Api) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Methods) != len(that1.Methods) { - return false - } - for i := range this.Methods { - if !this.Methods[i].Equal(that1.Methods[i]) { - return false - } - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if this.Version != that1.Version { - return false - } - if !this.SourceContext.Equal(that1.SourceContext) { - return false - } - if len(this.Mixins) != len(that1.Mixins) { - return false - } - for i := range this.Mixins { - if !this.Mixins[i].Equal(that1.Mixins[i]) { - return false - } - } - if this.Syntax != that1.Syntax { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Method) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Method) - if !ok { - that2, ok := that.(Method) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.RequestTypeUrl != that1.RequestTypeUrl { - return false - } - if this.RequestStreaming != that1.RequestStreaming { - return false - } - if this.ResponseTypeUrl != that1.ResponseTypeUrl { - return false - } - if this.ResponseStreaming != that1.ResponseStreaming { - return false - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if this.Syntax != that1.Syntax { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Mixin) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Mixin) - if !ok { - that2, ok := that.(Mixin) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Root != that1.Root { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Api) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&types.Api{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - if this.Methods != nil { - s = append(s, "Methods: "+fmt.Sprintf("%#v", this.Methods)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") - if this.SourceContext != nil { - s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") - } - if this.Mixins != nil { - s = append(s, "Mixins: "+fmt.Sprintf("%#v", this.Mixins)+",\n") - } - s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Method) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 11) - s = append(s, "&types.Method{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "RequestTypeUrl: "+fmt.Sprintf("%#v", this.RequestTypeUrl)+",\n") - s = append(s, "RequestStreaming: "+fmt.Sprintf("%#v", this.RequestStreaming)+",\n") - s = append(s, "ResponseTypeUrl: "+fmt.Sprintf("%#v", this.ResponseTypeUrl)+",\n") - s = append(s, "ResponseStreaming: "+fmt.Sprintf("%#v", this.ResponseStreaming)+",\n") - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Mixin) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Mixin{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Root: "+fmt.Sprintf("%#v", this.Root)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringApi(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Api) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Api) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Api) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Syntax != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) - i-- - dAtA[i] = 0x38 - } - if len(m.Mixins) > 0 { - for iNdEx := len(m.Mixins) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Mixins[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.SourceContext != nil { - { - size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintApi(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Methods) > 0 { - for iNdEx := len(m.Methods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Methods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Method) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Method) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Method) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Syntax != 0 { - i = encodeVarintApi(dAtA, i, uint64(m.Syntax)) - i-- - dAtA[i] = 0x38 - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintApi(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.ResponseStreaming { - i-- - if m.ResponseStreaming { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if len(m.ResponseTypeUrl) > 0 { - i -= len(m.ResponseTypeUrl) - copy(dAtA[i:], m.ResponseTypeUrl) - i = encodeVarintApi(dAtA, i, uint64(len(m.ResponseTypeUrl))) - i-- - dAtA[i] = 0x22 - } - if m.RequestStreaming { - i-- - if m.RequestStreaming { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.RequestTypeUrl) > 0 { - i -= len(m.RequestTypeUrl) - copy(dAtA[i:], m.RequestTypeUrl) - i = encodeVarintApi(dAtA, i, uint64(len(m.RequestTypeUrl))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Mixin) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Mixin) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Mixin) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Root) > 0 { - i -= len(m.Root) - copy(dAtA[i:], m.Root) - i = encodeVarintApi(dAtA, i, uint64(len(m.Root))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintApi(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintApi(dAtA []byte, offset int, v uint64) int { - offset -= sovApi(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedApi(r randyApi, easy bool) *Api { - this := &Api{} - this.Name = string(randStringApi(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Methods = make([]*Method, v1) - for i := 0; i < v1; i++ { - this.Methods[i] = NewPopulatedMethod(r, easy) - } - } - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Options = make([]*Option, v2) - for i := 0; i < v2; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - this.Version = string(randStringApi(r)) - if r.Intn(5) != 0 { - this.SourceContext = NewPopulatedSourceContext(r, easy) - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Mixins = make([]*Mixin, v3) - for i := 0; i < v3; i++ { - this.Mixins[i] = NewPopulatedMixin(r, easy) - } - } - this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedApi(r, 8) - } - return this -} - -func NewPopulatedMethod(r randyApi, easy bool) *Method { - this := &Method{} - this.Name = string(randStringApi(r)) - this.RequestTypeUrl = string(randStringApi(r)) - this.RequestStreaming = bool(bool(r.Intn(2) == 0)) - this.ResponseTypeUrl = string(randStringApi(r)) - this.ResponseStreaming = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - v4 := r.Intn(5) - this.Options = make([]*Option, v4) - for i := 0; i < v4; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedApi(r, 8) - } - return this -} - -func NewPopulatedMixin(r randyApi, easy bool) *Mixin { - this := &Mixin{} - this.Name = string(randStringApi(r)) - this.Root = string(randStringApi(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedApi(r, 3) - } - return this -} - -type randyApi interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneApi(r randyApi) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringApi(r randyApi) string { - v5 := r.Intn(100) - tmps := make([]rune, v5) - for i := 0; i < v5; i++ { - tmps[i] = randUTF8RuneApi(r) - } - return string(tmps) -} -func randUnrecognizedApi(r randyApi, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldApi(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldApi(dAtA []byte, r randyApi, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) - v6 := r.Int63() - if r.Intn(2) == 0 { - v6 *= -1 - } - dAtA = encodeVarintPopulateApi(dAtA, uint64(v6)) - case 1: - dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateApi(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateApi(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateApi(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Api) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if len(m.Methods) > 0 { - for _, e := range m.Methods { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.SourceContext != nil { - l = m.SourceContext.Size() - n += 1 + l + sovApi(uint64(l)) - } - if len(m.Mixins) > 0 { - for _, e := range m.Mixins { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } - if m.Syntax != 0 { - n += 1 + sovApi(uint64(m.Syntax)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Method) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.RequestTypeUrl) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.RequestStreaming { - n += 2 - } - l = len(m.ResponseTypeUrl) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.ResponseStreaming { - n += 2 - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovApi(uint64(l)) - } - } - if m.Syntax != 0 { - n += 1 + sovApi(uint64(m.Syntax)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Mixin) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - l = len(m.Root) - if l > 0 { - n += 1 + l + sovApi(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovApi(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozApi(x uint64) (n int) { - return sovApi(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Api) String() string { - if this == nil { - return "nil" - } - repeatedStringForMethods := "[]*Method{" - for _, f := range this.Methods { - repeatedStringForMethods += strings.Replace(f.String(), "Method", "Method", 1) + "," - } - repeatedStringForMethods += "}" - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(fmt.Sprintf("%v", f), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - repeatedStringForMixins := "[]*Mixin{" - for _, f := range this.Mixins { - repeatedStringForMixins += strings.Replace(f.String(), "Mixin", "Mixin", 1) + "," - } - repeatedStringForMixins += "}" - s := strings.Join([]string{`&Api{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Methods:` + repeatedStringForMethods + `,`, - `Options:` + repeatedStringForOptions + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, - `Mixins:` + repeatedStringForMixins + `,`, - `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Method) String() string { - if this == nil { - return "nil" - } - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(fmt.Sprintf("%v", f), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - s := strings.Join([]string{`&Method{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `RequestTypeUrl:` + fmt.Sprintf("%v", this.RequestTypeUrl) + `,`, - `RequestStreaming:` + fmt.Sprintf("%v", this.RequestStreaming) + `,`, - `ResponseTypeUrl:` + fmt.Sprintf("%v", this.ResponseTypeUrl) + `,`, - `ResponseStreaming:` + fmt.Sprintf("%v", this.ResponseStreaming) + `,`, - `Options:` + repeatedStringForOptions + `,`, - `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Mixin) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Mixin{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Root:` + fmt.Sprintf("%v", this.Root) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringApi(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Api) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Api: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Api: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Methods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Methods = append(m.Methods, &Method{}) - if err := m.Methods[len(m.Methods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceContext == nil { - m.SourceContext = &SourceContext{} - } - if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mixins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mixins = append(m.Mixins, &Mixin{}) - if err := m.Mixins[len(m.Mixins)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) - } - m.Syntax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Syntax |= Syntax(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Method) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Method: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Method: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestTypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestStreaming", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RequestStreaming = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResponseTypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseStreaming", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ResponseStreaming = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) - } - m.Syntax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Syntax |= Syntax(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Mixin) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mixin: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mixin: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowApi - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthApi - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthApi - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Root = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipApi(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthApi - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipApi(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowApi - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthApi - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupApi - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthApi - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthApi = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowApi = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupApi = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/doc.go b/vendor/github.com/gogo/protobuf/types/doc.go deleted file mode 100644 index ff2810af1e..0000000000 --- a/vendor/github.com/gogo/protobuf/types/doc.go +++ /dev/null @@ -1,35 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types contains code for interacting with well-known types. -*/ -package types diff --git a/vendor/github.com/gogo/protobuf/types/duration.go b/vendor/github.com/gogo/protobuf/types/duration.go deleted file mode 100644 index 979b8e78a4..0000000000 --- a/vendor/github.com/gogo/protobuf/types/duration.go +++ /dev/null @@ -1,100 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -// This file implements conversions between google.protobuf.Duration -// and time.Duration. - -import ( - "errors" - "fmt" - "time" -) - -const ( - // Range of a Duration in seconds, as specified in - // google/protobuf/duration.proto. This is about 10,000 years in seconds. - maxSeconds = int64(10000 * 365.25 * 24 * 60 * 60) - minSeconds = -maxSeconds -) - -// validateDuration determines whether the Duration is valid according to the -// definition in google/protobuf/duration.proto. A valid Duration -// may still be too large to fit into a time.Duration (the range of Duration -// is about 10,000 years, and the range of time.Duration is about 290). -func validateDuration(d *Duration) error { - if d == nil { - return errors.New("duration: nil Duration") - } - if d.Seconds < minSeconds || d.Seconds > maxSeconds { - return fmt.Errorf("duration: %#v: seconds out of range", d) - } - if d.Nanos <= -1e9 || d.Nanos >= 1e9 { - return fmt.Errorf("duration: %#v: nanos out of range", d) - } - // Seconds and Nanos must have the same sign, unless d.Nanos is zero. - if (d.Seconds < 0 && d.Nanos > 0) || (d.Seconds > 0 && d.Nanos < 0) { - return fmt.Errorf("duration: %#v: seconds and nanos have different signs", d) - } - return nil -} - -// DurationFromProto converts a Duration to a time.Duration. DurationFromProto -// returns an error if the Duration is invalid or is too large to be -// represented in a time.Duration. -func DurationFromProto(p *Duration) (time.Duration, error) { - if err := validateDuration(p); err != nil { - return 0, err - } - d := time.Duration(p.Seconds) * time.Second - if int64(d/time.Second) != p.Seconds { - return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) - } - if p.Nanos != 0 { - d += time.Duration(p.Nanos) * time.Nanosecond - if (d < 0) != (p.Nanos < 0) { - return 0, fmt.Errorf("duration: %#v is out of range for time.Duration", p) - } - } - return d, nil -} - -// DurationProto converts a time.Duration to a Duration. -func DurationProto(d time.Duration) *Duration { - nanos := d.Nanoseconds() - secs := nanos / 1e9 - nanos -= secs * 1e9 - return &Duration{ - Seconds: secs, - Nanos: int32(nanos), - } -} diff --git a/vendor/github.com/gogo/protobuf/types/duration.pb.go b/vendor/github.com/gogo/protobuf/types/duration.pb.go deleted file mode 100644 index 4deafcb1ce..0000000000 --- a/vendor/github.com/gogo/protobuf/types/duration.pb.go +++ /dev/null @@ -1,517 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/duration.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A Duration represents a signed, fixed-length span of time represented -// as a count of seconds and fractions of seconds at nanosecond -// resolution. It is independent of any calendar and concepts like "day" -// or "month". It is related to Timestamp in that the difference between -// two Timestamp values is a Duration and it can be added or subtracted -// from a Timestamp. Range is approximately +-10,000 years. -// -// # Examples -// -// Example 1: Compute Duration from two Timestamps in pseudo code. -// -// Timestamp start = ...; -// Timestamp end = ...; -// Duration duration = ...; -// -// duration.seconds = end.seconds - start.seconds; -// duration.nanos = end.nanos - start.nanos; -// -// if (duration.seconds < 0 && duration.nanos > 0) { -// duration.seconds += 1; -// duration.nanos -= 1000000000; -// } else if (durations.seconds > 0 && duration.nanos < 0) { -// duration.seconds -= 1; -// duration.nanos += 1000000000; -// } -// -// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. -// -// Timestamp start = ...; -// Duration duration = ...; -// Timestamp end = ...; -// -// end.seconds = start.seconds + duration.seconds; -// end.nanos = start.nanos + duration.nanos; -// -// if (end.nanos < 0) { -// end.seconds -= 1; -// end.nanos += 1000000000; -// } else if (end.nanos >= 1000000000) { -// end.seconds += 1; -// end.nanos -= 1000000000; -// } -// -// Example 3: Compute Duration from datetime.timedelta in Python. -// -// td = datetime.timedelta(days=3, minutes=10) -// duration = Duration() -// duration.FromTimedelta(td) -// -// # JSON Mapping -// -// In JSON format, the Duration type is encoded as a string rather than an -// object, where the string ends in the suffix "s" (indicating seconds) and -// is preceded by the number of seconds, with nanoseconds expressed as -// fractional seconds. For example, 3 seconds with 0 nanoseconds should be -// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should -// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 -// microsecond should be expressed in JSON format as "3.000001s". -// -// -type Duration struct { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. Note: these bounds are computed from: - // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years - Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Duration) Reset() { *m = Duration{} } -func (*Duration) ProtoMessage() {} -func (*Duration) Descriptor() ([]byte, []int) { - return fileDescriptor_23597b2ebd7ac6c5, []int{0} -} -func (*Duration) XXX_WellKnownType() string { return "Duration" } -func (m *Duration) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Duration.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Duration) XXX_Merge(src proto.Message) { - xxx_messageInfo_Duration.Merge(m, src) -} -func (m *Duration) XXX_Size() int { - return m.Size() -} -func (m *Duration) XXX_DiscardUnknown() { - xxx_messageInfo_Duration.DiscardUnknown(m) -} - -var xxx_messageInfo_Duration proto.InternalMessageInfo - -func (m *Duration) GetSeconds() int64 { - if m != nil { - return m.Seconds - } - return 0 -} - -func (m *Duration) GetNanos() int32 { - if m != nil { - return m.Nanos - } - return 0 -} - -func (*Duration) XXX_MessageName() string { - return "google.protobuf.Duration" -} -func init() { - proto.RegisterType((*Duration)(nil), "google.protobuf.Duration") -} - -func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) } - -var fileDescriptor_23597b2ebd7ac6c5 = []byte{ - // 209 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, 0x4f, 0x29, 0x2d, 0x4a, - 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56, - 0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5, - 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e, - 0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0x7f, 0xe3, 0xa1, 0x1c, - 0xc3, 0x87, 0x87, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, - 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, 0xc9, 0x31, 0x7c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, - 0xb1, 0x1c, 0xe3, 0x89, 0xc7, 0x72, 0x8c, 0x5c, 0xc2, 0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x56, 0x3b, - 0xf1, 0xc2, 0x2c, 0x0e, 0x00, 0x89, 0x04, 0x30, 0x46, 0xb1, 0x96, 0x54, 0x16, 0xa4, 0x16, 0xff, - 0x60, 0x64, 0x5c, 0xc4, 0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x25, 0x00, - 0xaa, 0x45, 0x2f, 0x3c, 0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0x04, 0xa4, 0x32, 0x89, - 0x0d, 0x6c, 0x96, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8a, 0x1c, 0x64, 0x4e, 0xf6, 0x00, 0x00, - 0x00, -} - -func (this *Duration) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Duration) - if !ok { - that2, ok := that.(Duration) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Seconds != that1.Seconds { - if this.Seconds < that1.Seconds { - return -1 - } - return 1 - } - if this.Nanos != that1.Nanos { - if this.Nanos < that1.Nanos { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Duration) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Duration) - if !ok { - that2, ok := that.(Duration) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Seconds != that1.Seconds { - return false - } - if this.Nanos != that1.Nanos { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Duration) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Duration{") - s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") - s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringDuration(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Duration) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Duration) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Duration) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Nanos != 0 { - i = encodeVarintDuration(dAtA, i, uint64(m.Nanos)) - i-- - dAtA[i] = 0x10 - } - if m.Seconds != 0 { - i = encodeVarintDuration(dAtA, i, uint64(m.Seconds)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintDuration(dAtA []byte, offset int, v uint64) int { - offset -= sovDuration(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Duration) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seconds != 0 { - n += 1 + sovDuration(uint64(m.Seconds)) - } - if m.Nanos != 0 { - n += 1 + sovDuration(uint64(m.Nanos)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovDuration(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozDuration(x uint64) (n int) { - return sovDuration(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Duration) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDuration - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Duration: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Duration: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) - } - m.Seconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDuration - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seconds |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) - } - m.Nanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowDuration - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nanos |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipDuration(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthDuration - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipDuration(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDuration - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDuration - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowDuration - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthDuration - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupDuration - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthDuration - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthDuration = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowDuration = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupDuration = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/duration_gogo.go b/vendor/github.com/gogo/protobuf/types/duration_gogo.go deleted file mode 100644 index 90e7670e21..0000000000 --- a/vendor/github.com/gogo/protobuf/types/duration_gogo.go +++ /dev/null @@ -1,100 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, The GoGo Authors. All rights reserved. -// http://github.com/gogo/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. -// -// 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 types - -import ( - "fmt" - "time" -) - -func NewPopulatedDuration(r interface { - Int63() int64 -}, easy bool) *Duration { - this := &Duration{} - maxSecs := time.Hour.Nanoseconds() / 1e9 - max := 2 * maxSecs - s := int64(r.Int63()) % max - s -= maxSecs - neg := int64(1) - if s < 0 { - neg = -1 - } - this.Seconds = s - this.Nanos = int32(neg * (r.Int63() % 1e9)) - return this -} - -func (d *Duration) String() string { - td, err := DurationFromProto(d) - if err != nil { - return fmt.Sprintf("(%v)", err) - } - return td.String() -} - -func NewPopulatedStdDuration(r interface { - Int63() int64 -}, easy bool) *time.Duration { - dur := NewPopulatedDuration(r, easy) - d, err := DurationFromProto(dur) - if err != nil { - return nil - } - return &d -} - -func SizeOfStdDuration(d time.Duration) int { - dur := DurationProto(d) - return dur.Size() -} - -func StdDurationMarshal(d time.Duration) ([]byte, error) { - size := SizeOfStdDuration(d) - buf := make([]byte, size) - _, err := StdDurationMarshalTo(d, buf) - return buf, err -} - -func StdDurationMarshalTo(d time.Duration, data []byte) (int, error) { - dur := DurationProto(d) - return dur.MarshalTo(data) -} - -func StdDurationUnmarshal(d *time.Duration, data []byte) error { - dur := &Duration{} - if err := dur.Unmarshal(data); err != nil { - return err - } - dd, err := DurationFromProto(dur) - if err != nil { - return err - } - *d = dd - return nil -} diff --git a/vendor/github.com/gogo/protobuf/types/empty.pb.go b/vendor/github.com/gogo/protobuf/types/empty.pb.go deleted file mode 100644 index 9e94748b3a..0000000000 --- a/vendor/github.com/gogo/protobuf/types/empty.pb.go +++ /dev/null @@ -1,462 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/empty.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A generic empty message that you can re-use to avoid defining duplicated -// empty messages in your APIs. A typical example is to use it as the request -// or the response type of an API method. For instance: -// -// service Foo { -// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); -// } -// -// The JSON representation for `Empty` is empty JSON object `{}`. -type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Empty) Reset() { *m = Empty{} } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_900544acb223d5b8, []int{0} -} -func (*Empty) XXX_WellKnownType() string { return "Empty" } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) -} -func (m *Empty) XXX_Size() int { - return m.Size() -} -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) -} - -var xxx_messageInfo_Empty proto.InternalMessageInfo - -func (*Empty) XXX_MessageName() string { - return "google.protobuf.Empty" -} -func init() { - proto.RegisterType((*Empty)(nil), "google.protobuf.Empty") -} - -func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) } - -var fileDescriptor_900544acb223d5b8 = []byte{ - // 176 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28, - 0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57, - 0x90, 0xbc, 0x53, 0x0b, 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, - 0xc7, 0xd8, 0xf0, 0x48, 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, - 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, - 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x19, 0xe8, 0xc4, 0x05, - 0x36, 0x2e, 0x00, 0xc4, 0x0d, 0x60, 0x8c, 0x62, 0x2d, 0xa9, 0x2c, 0x48, 0x2d, 0xfe, 0xc1, 0xc8, - 0xb8, 0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x7d, 0x00, 0x54, 0xbd, - 0x5e, 0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x65, 0x12, 0x1b, 0xd8, - 0x20, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x21, 0xbe, 0xb6, 0x31, 0xc6, 0x00, 0x00, 0x00, -} - -func (this *Empty) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Empty) - if !ok { - that2, ok := that.(Empty) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Empty) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Empty) - if !ok { - that2, ok := that.(Empty) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Empty) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&types.Empty{") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringEmpty(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Empty) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Empty) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Empty) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintEmpty(dAtA []byte, offset int, v uint64) int { - offset -= sovEmpty(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedEmpty(r randyEmpty, easy bool) *Empty { - this := &Empty{} - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedEmpty(r, 1) - } - return this -} - -type randyEmpty interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneEmpty(r randyEmpty) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringEmpty(r randyEmpty) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneEmpty(r) - } - return string(tmps) -} -func randUnrecognizedEmpty(r randyEmpty, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldEmpty(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldEmpty(dAtA []byte, r randyEmpty, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateEmpty(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateEmpty(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Empty) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovEmpty(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozEmpty(x uint64) (n int) { - return sovEmpty(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Empty) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Empty{`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringEmpty(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Empty) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEmpty - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Empty: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Empty: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipEmpty(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthEmpty - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipEmpty(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowEmpty - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthEmpty - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupEmpty - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthEmpty - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthEmpty = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowEmpty = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupEmpty = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go b/vendor/github.com/gogo/protobuf/types/field_mask.pb.go deleted file mode 100644 index 6ae346d925..0000000000 --- a/vendor/github.com/gogo/protobuf/types/field_mask.pb.go +++ /dev/null @@ -1,738 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/field_mask.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// `FieldMask` represents a set of symbolic field paths, for example: -// -// paths: "f.a" -// paths: "f.b.d" -// -// Here `f` represents a field in some root message, `a` and `b` -// fields in the message found in `f`, and `d` a field found in the -// message in `f.b`. -// -// Field masks are used to specify a subset of fields that should be -// returned by a get operation or modified by an update operation. -// Field masks also have a custom JSON encoding (see below). -// -// # Field Masks in Projections -// -// When used in the context of a projection, a response message or -// sub-message is filtered by the API to only contain those fields as -// specified in the mask. For example, if the mask in the previous -// example is applied to a response message as follows: -// -// f { -// a : 22 -// b { -// d : 1 -// x : 2 -// } -// y : 13 -// } -// z: 8 -// -// The result will not contain specific values for fields x,y and z -// (their value will be set to the default, and omitted in proto text -// output): -// -// -// f { -// a : 22 -// b { -// d : 1 -// } -// } -// -// A repeated field is not allowed except at the last position of a -// paths string. -// -// If a FieldMask object is not present in a get operation, the -// operation applies to all fields (as if a FieldMask of all fields -// had been specified). -// -// Note that a field mask does not necessarily apply to the -// top-level response message. In case of a REST get operation, the -// field mask applies directly to the response, but in case of a REST -// list operation, the mask instead applies to each individual message -// in the returned resource list. In case of a REST custom method, -// other definitions may be used. Where the mask applies will be -// clearly documented together with its declaration in the API. In -// any case, the effect on the returned resource/resources is required -// behavior for APIs. -// -// # Field Masks in Update Operations -// -// A field mask in update operations specifies which fields of the -// targeted resource are going to be updated. The API is required -// to only change the values of the fields as specified in the mask -// and leave the others untouched. If a resource is passed in to -// describe the updated values, the API ignores the values of all -// fields not covered by the mask. -// -// If a repeated field is specified for an update operation, new values will -// be appended to the existing repeated field in the target resource. Note that -// a repeated field is only allowed in the last position of a `paths` string. -// -// If a sub-message is specified in the last position of the field mask for an -// update operation, then new value will be merged into the existing sub-message -// in the target resource. -// -// For example, given the target message: -// -// f { -// b { -// d: 1 -// x: 2 -// } -// c: [1] -// } -// -// And an update message: -// -// f { -// b { -// d: 10 -// } -// c: [2] -// } -// -// then if the field mask is: -// -// paths: ["f.b", "f.c"] -// -// then the result will be: -// -// f { -// b { -// d: 10 -// x: 2 -// } -// c: [1, 2] -// } -// -// An implementation may provide options to override this default behavior for -// repeated and message fields. -// -// In order to reset a field's value to the default, the field must -// be in the mask and set to the default value in the provided resource. -// Hence, in order to reset all fields of a resource, provide a default -// instance of the resource and set all fields in the mask, or do -// not provide a mask as described below. -// -// If a field mask is not present on update, the operation applies to -// all fields (as if a field mask of all fields has been specified). -// Note that in the presence of schema evolution, this may mean that -// fields the client does not know and has therefore not filled into -// the request will be reset to their default. If this is unwanted -// behavior, a specific service may require a client to always specify -// a field mask, producing an error if not. -// -// As with get operations, the location of the resource which -// describes the updated values in the request message depends on the -// operation kind. In any case, the effect of the field mask is -// required to be honored by the API. -// -// ## Considerations for HTTP REST -// -// The HTTP kind of an update operation which uses a field mask must -// be set to PATCH instead of PUT in order to satisfy HTTP semantics -// (PUT must only be used for full updates). -// -// # JSON Encoding of Field Masks -// -// In JSON, a field mask is encoded as a single string where paths are -// separated by a comma. Fields name in each path are converted -// to/from lower-camel naming conventions. -// -// As an example, consider the following message declarations: -// -// message Profile { -// User user = 1; -// Photo photo = 2; -// } -// message User { -// string display_name = 1; -// string address = 2; -// } -// -// In proto a field mask for `Profile` may look as such: -// -// mask { -// paths: "user.display_name" -// paths: "photo" -// } -// -// In JSON, the same mask is represented as below: -// -// { -// mask: "user.displayName,photo" -// } -// -// # Field Masks and Oneof Fields -// -// Field masks treat fields in oneofs just as regular fields. Consider the -// following message: -// -// message SampleMessage { -// oneof test_oneof { -// string name = 4; -// SubMessage sub_message = 9; -// } -// } -// -// The field mask can be: -// -// mask { -// paths: "name" -// } -// -// Or: -// -// mask { -// paths: "sub_message" -// } -// -// Note that oneof type names ("test_oneof" in this case) cannot be used in -// paths. -// -// ## Field Mask Verification -// -// The implementation of any API method which has a FieldMask type field in the -// request should verify the included field paths, and return an -// `INVALID_ARGUMENT` error if any path is duplicated or unmappable. -type FieldMask struct { - // The set of field mask paths. - Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FieldMask) Reset() { *m = FieldMask{} } -func (*FieldMask) ProtoMessage() {} -func (*FieldMask) Descriptor() ([]byte, []int) { - return fileDescriptor_5158202634f0da48, []int{0} -} -func (m *FieldMask) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FieldMask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FieldMask.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FieldMask) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldMask.Merge(m, src) -} -func (m *FieldMask) XXX_Size() int { - return m.Size() -} -func (m *FieldMask) XXX_DiscardUnknown() { - xxx_messageInfo_FieldMask.DiscardUnknown(m) -} - -var xxx_messageInfo_FieldMask proto.InternalMessageInfo - -func (m *FieldMask) GetPaths() []string { - if m != nil { - return m.Paths - } - return nil -} - -func (*FieldMask) XXX_MessageName() string { - return "google.protobuf.FieldMask" -} -func init() { - proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask") -} - -func init() { proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor_5158202634f0da48) } - -var fileDescriptor_5158202634f0da48 = []byte{ - // 203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd, - 0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54, - 0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x26, 0x16, 0x67, 0x0b, 0x89, 0x70, 0xb1, 0x16, - 0x24, 0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x1d, 0x8c, - 0x37, 0x1e, 0xca, 0x31, 0x7c, 0x78, 0x28, 0xc7, 0xf8, 0xe3, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, - 0xc6, 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, - 0x39, 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x80, 0xc4, 0x1f, 0xcb, 0x31, 0x9e, 0x78, 0x2c, 0xc7, - 0xc8, 0x25, 0x9c, 0x9c, 0x9f, 0xab, 0x87, 0x66, 0x95, 0x13, 0x1f, 0xdc, 0xa2, 0x00, 0x90, 0x50, - 0x00, 0x63, 0x14, 0x6b, 0x49, 0x65, 0x41, 0x6a, 0xf1, 0x0f, 0x46, 0xc6, 0x45, 0x4c, 0xcc, 0xee, - 0x01, 0x4e, 0xab, 0x98, 0xe4, 0xdc, 0x21, 0x7a, 0x02, 0xa0, 0x7a, 0xf4, 0xc2, 0x53, 0x73, 0x72, - 0xbc, 0xf3, 0xf2, 0xcb, 0xf3, 0x42, 0x40, 0x2a, 0x93, 0xd8, 0xc0, 0x86, 0x19, 0x03, 0x02, 0x00, - 0x00, 0xff, 0xff, 0x43, 0xa0, 0x83, 0xd0, 0xe9, 0x00, 0x00, 0x00, -} - -func (this *FieldMask) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*FieldMask) - if !ok { - that2, ok := that.(FieldMask) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Paths) != len(that1.Paths) { - if len(this.Paths) < len(that1.Paths) { - return -1 - } - return 1 - } - for i := range this.Paths { - if this.Paths[i] != that1.Paths[i] { - if this.Paths[i] < that1.Paths[i] { - return -1 - } - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *FieldMask) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FieldMask) - if !ok { - that2, ok := that.(FieldMask) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Paths) != len(that1.Paths) { - return false - } - for i := range this.Paths { - if this.Paths[i] != that1.Paths[i] { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *FieldMask) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.FieldMask{") - s = append(s, "Paths: "+fmt.Sprintf("%#v", this.Paths)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringFieldMask(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *FieldMask) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FieldMask) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FieldMask) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = encodeVarintFieldMask(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintFieldMask(dAtA []byte, offset int, v uint64) int { - offset -= sovFieldMask(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedFieldMask(r randyFieldMask, easy bool) *FieldMask { - this := &FieldMask{} - v1 := r.Intn(10) - this.Paths = make([]string, v1) - for i := 0; i < v1; i++ { - this.Paths[i] = string(randStringFieldMask(r)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedFieldMask(r, 2) - } - return this -} - -type randyFieldMask interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneFieldMask(r randyFieldMask) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringFieldMask(r randyFieldMask) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneFieldMask(r) - } - return string(tmps) -} -func randUnrecognizedFieldMask(r randyFieldMask, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldFieldMask(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldFieldMask(dAtA []byte, r randyFieldMask, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateFieldMask(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateFieldMask(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *FieldMask) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovFieldMask(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovFieldMask(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFieldMask(x uint64) (n int) { - return sovFieldMask(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *FieldMask) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FieldMask{`, - `Paths:` + fmt.Sprintf("%v", this.Paths) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringFieldMask(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *FieldMask) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFieldMask - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FieldMask: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FieldMask: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFieldMask - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthFieldMask - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthFieldMask - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFieldMask(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFieldMask - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFieldMask(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFieldMask - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFieldMask - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowFieldMask - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthFieldMask - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFieldMask - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFieldMask - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFieldMask = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFieldMask = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFieldMask = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/protosize.go b/vendor/github.com/gogo/protobuf/types/protosize.go deleted file mode 100644 index 3a2d1b7e11..0000000000 --- a/vendor/github.com/gogo/protobuf/types/protosize.go +++ /dev/null @@ -1,34 +0,0 @@ -package types - -func (m *Any) ProtoSize() (n int) { return m.Size() } -func (m *Api) ProtoSize() (n int) { return m.Size() } -func (m *Method) ProtoSize() (n int) { return m.Size() } -func (m *Mixin) ProtoSize() (n int) { return m.Size() } -func (m *Duration) ProtoSize() (n int) { return m.Size() } -func (m *Empty) ProtoSize() (n int) { return m.Size() } -func (m *FieldMask) ProtoSize() (n int) { return m.Size() } -func (m *SourceContext) ProtoSize() (n int) { return m.Size() } -func (m *Struct) ProtoSize() (n int) { return m.Size() } -func (m *Value) ProtoSize() (n int) { return m.Size() } -func (m *Value_NullValue) ProtoSize() (n int) { return m.Size() } -func (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() } -func (m *Value_StringValue) ProtoSize() (n int) { return m.Size() } -func (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() } -func (m *Value_StructValue) ProtoSize() (n int) { return m.Size() } -func (m *Value_ListValue) ProtoSize() (n int) { return m.Size() } -func (m *ListValue) ProtoSize() (n int) { return m.Size() } -func (m *Timestamp) ProtoSize() (n int) { return m.Size() } -func (m *Type) ProtoSize() (n int) { return m.Size() } -func (m *Field) ProtoSize() (n int) { return m.Size() } -func (m *Enum) ProtoSize() (n int) { return m.Size() } -func (m *EnumValue) ProtoSize() (n int) { return m.Size() } -func (m *Option) ProtoSize() (n int) { return m.Size() } -func (m *DoubleValue) ProtoSize() (n int) { return m.Size() } -func (m *FloatValue) ProtoSize() (n int) { return m.Size() } -func (m *Int64Value) ProtoSize() (n int) { return m.Size() } -func (m *UInt64Value) ProtoSize() (n int) { return m.Size() } -func (m *Int32Value) ProtoSize() (n int) { return m.Size() } -func (m *UInt32Value) ProtoSize() (n int) { return m.Size() } -func (m *BoolValue) ProtoSize() (n int) { return m.Size() } -func (m *StringValue) ProtoSize() (n int) { return m.Size() } -func (m *BytesValue) ProtoSize() (n int) { return m.Size() } diff --git a/vendor/github.com/gogo/protobuf/types/source_context.pb.go b/vendor/github.com/gogo/protobuf/types/source_context.pb.go deleted file mode 100644 index 8e6ce71b27..0000000000 --- a/vendor/github.com/gogo/protobuf/types/source_context.pb.go +++ /dev/null @@ -1,524 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/source_context.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// `SourceContext` represents information about the source of a -// protobuf element, like the file in which it is defined. -type SourceContext struct { - // The path-qualified name of the .proto file that contained the associated - // protobuf element. For example: `"google/protobuf/source_context.proto"`. - FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SourceContext) Reset() { *m = SourceContext{} } -func (*SourceContext) ProtoMessage() {} -func (*SourceContext) Descriptor() ([]byte, []int) { - return fileDescriptor_b686cdb126d509db, []int{0} -} -func (m *SourceContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SourceContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SourceContext.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SourceContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_SourceContext.Merge(m, src) -} -func (m *SourceContext) XXX_Size() int { - return m.Size() -} -func (m *SourceContext) XXX_DiscardUnknown() { - xxx_messageInfo_SourceContext.DiscardUnknown(m) -} - -var xxx_messageInfo_SourceContext proto.InternalMessageInfo - -func (m *SourceContext) GetFileName() string { - if m != nil { - return m.FileName - } - return "" -} - -func (*SourceContext) XXX_MessageName() string { - return "google.protobuf.SourceContext" -} -func init() { - proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext") -} - -func init() { - proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor_b686cdb126d509db) -} - -var fileDescriptor_b686cdb126d509db = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d, - 0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43, - 0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49, - 0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, - 0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x12, 0x73, 0x53, 0x9d, 0x3a, 0x19, 0x6f, 0x3c, 0x94, 0x63, - 0xf8, 0xf0, 0x50, 0x8e, 0xf1, 0xc7, 0x43, 0x39, 0xc6, 0x86, 0x47, 0x72, 0x8c, 0x2b, 0x1e, 0xc9, - 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x2f, 0x1e, - 0xc9, 0x31, 0x7c, 0x00, 0x89, 0x3f, 0x96, 0x63, 0x3c, 0xf1, 0x58, 0x8e, 0x91, 0x4b, 0x38, 0x39, - 0x3f, 0x57, 0x0f, 0xcd, 0x56, 0x27, 0x21, 0x14, 0x3b, 0x03, 0x40, 0xc2, 0x01, 0x8c, 0x51, 0xac, - 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x8b, 0x98, 0x98, 0xdd, 0x03, 0x9c, 0x56, 0x31, 0xc9, 0xb9, 0x43, - 0x34, 0x05, 0x40, 0x35, 0xe9, 0x85, 0xa7, 0xe6, 0xe4, 0x78, 0xe7, 0xe5, 0x97, 0xe7, 0x85, 0x80, - 0x94, 0x25, 0xb1, 0x81, 0x4d, 0x33, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x37, 0x2a, 0xa1, - 0xf9, 0x00, 0x00, 0x00, -} - -func (this *SourceContext) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*SourceContext) - if !ok { - that2, ok := that.(SourceContext) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.FileName != that1.FileName { - if this.FileName < that1.FileName { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *SourceContext) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*SourceContext) - if !ok { - that2, ok := that.(SourceContext) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.FileName != that1.FileName { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *SourceContext) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.SourceContext{") - s = append(s, "FileName: "+fmt.Sprintf("%#v", this.FileName)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringSourceContext(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *SourceContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SourceContext) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SourceContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.FileName) > 0 { - i -= len(m.FileName) - copy(dAtA[i:], m.FileName) - i = encodeVarintSourceContext(dAtA, i, uint64(len(m.FileName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintSourceContext(dAtA []byte, offset int, v uint64) int { - offset -= sovSourceContext(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedSourceContext(r randySourceContext, easy bool) *SourceContext { - this := &SourceContext{} - this.FileName = string(randStringSourceContext(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedSourceContext(r, 2) - } - return this -} - -type randySourceContext interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneSourceContext(r randySourceContext) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringSourceContext(r randySourceContext) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneSourceContext(r) - } - return string(tmps) -} -func randUnrecognizedSourceContext(r randySourceContext, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldSourceContext(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldSourceContext(dAtA []byte, r randySourceContext, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateSourceContext(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateSourceContext(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *SourceContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FileName) - if l > 0 { - n += 1 + l + sovSourceContext(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovSourceContext(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSourceContext(x uint64) (n int) { - return sovSourceContext(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *SourceContext) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SourceContext{`, - `FileName:` + fmt.Sprintf("%v", this.FileName) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringSourceContext(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *SourceContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSourceContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSourceContext - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthSourceContext - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthSourceContext - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FileName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSourceContext(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSourceContext - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSourceContext(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSourceContext - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSourceContext - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSourceContext - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSourceContext - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSourceContext - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSourceContext - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSourceContext = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSourceContext = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSourceContext = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/struct.pb.go b/vendor/github.com/gogo/protobuf/types/struct.pb.go deleted file mode 100644 index c0457312e6..0000000000 --- a/vendor/github.com/gogo/protobuf/types/struct.pb.go +++ /dev/null @@ -1,2271 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/struct.proto - -package types - -import ( - bytes "bytes" - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strconv "strconv" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 (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 (*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 m.Unmarshal(b) -} -func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Struct.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Struct) XXX_Merge(src proto.Message) { - xxx_messageInfo_Struct.Merge(m, src) -} -func (m *Struct) XXX_Size() int { - return m.Size() -} -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 -} - -func (*Struct) XXX_MessageName() string { - return "google.protobuf.Struct" -} - -// `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 (*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 m.Unmarshal(b) -} -func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Value.Merge(m, src) -} -func (m *Value) XXX_Size() int { - return m.Size() -} -func (m *Value) XXX_DiscardUnknown() { - xxx_messageInfo_Value.DiscardUnknown(m) -} - -var xxx_messageInfo_Value proto.InternalMessageInfo - -type isValue_Kind interface { - isValue_Kind() - Equal(interface{}) bool - MarshalTo([]byte) (int, error) - Size() int - Compare(interface{}) int -} - -type Value_NullValue struct { - NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue,oneof" json:"null_value,omitempty"` -} -type Value_NumberValue struct { - NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,proto3,oneof" json:"number_value,omitempty"` -} -type Value_StringValue struct { - StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` -} -type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` -} -type Value_StructValue struct { - StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,proto3,oneof" json:"struct_value,omitempty"` -} -type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,proto3,oneof" json:"list_value,omitempty"` -} - -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), - } -} - -func (*Value) XXX_MessageName() string { - return "google.protobuf.Value" -} - -// `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 (*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 m.Unmarshal(b) -} -func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ListValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ListValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListValue.Merge(m, src) -} -func (m *ListValue) XXX_Size() int { - return m.Size() -} -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 (*ListValue) XXX_MessageName() string { - return "google.protobuf.ListValue" -} -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{ - // 443 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x6f, 0xd3, 0x40, - 0x14, 0xc6, 0xfd, 0x9c, 0xc6, 0x22, 0xcf, 0xa8, 0x54, 0x87, 0x04, 0x51, 0x41, 0x47, 0x94, 0x2e, - 0x11, 0x42, 0xae, 0x14, 0x16, 0x44, 0x58, 0x88, 0x54, 0x5a, 0x89, 0xa8, 0x32, 0x86, 0x16, 0x89, - 0x25, 0xc2, 0xae, 0x1b, 0x59, 0xbd, 0xde, 0x55, 0xf6, 0x1d, 0x28, 0x1b, 0x0b, 0xff, 0x03, 0x33, - 0x13, 0x62, 0xe4, 0xaf, 0xe8, 0xc8, 0xc8, 0x48, 0xdc, 0x85, 0xb1, 0x63, 0x47, 0x74, 0x77, 0xb6, - 0x41, 0x8d, 0xb2, 0xf9, 0x7d, 0xf7, 0x7b, 0xdf, 0x7b, 0xdf, 0x33, 0xde, 0x9f, 0x09, 0x31, 0x63, - 0xe9, 0xf6, 0x59, 0x2e, 0xa4, 0x88, 0xd5, 0xf1, 0x76, 0x21, 0x73, 0x95, 0xc8, 0xc0, 0xd4, 0xe4, - 0x96, 0x7d, 0x0d, 0xea, 0xd7, 0xfe, 0x17, 0x40, 0xef, 0xb5, 0x21, 0xc8, 0x08, 0xbd, 0xe3, 0x2c, - 0x65, 0x47, 0x45, 0x17, 0x7a, 0xad, 0x81, 0x3f, 0xdc, 0x0a, 0xae, 0xc1, 0x81, 0x05, 0x83, 0x17, - 0x86, 0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34, 0x47, 0x24, 0xeb, 0x88, 0xfb, 0x07, 0x93, 0xc9, - 0xf4, 0xf0, 0xf9, 0xe4, 0x60, 0x67, 0xc3, 0x19, 0x7f, 0x86, 0x5f, 0x0b, 0xea, 0x5c, 0x2e, 0x28, - 0x5c, 0x2d, 0x28, 0x7c, 0x2a, 0x29, 0x7c, 0x2b, 0x29, 0x9c, 0x97, 0x14, 0x7e, 0x96, 0x14, 0x7e, - 0x97, 0x14, 0xfe, 0x94, 0xd4, 0xb9, 0xd4, 0xfa, 0x05, 0x85, 0xf3, 0x0b, 0x0a, 0x78, 0x3b, 0x11, - 0xa7, 0xd7, 0x47, 0x8e, 0x7d, 0x9b, 0x3e, 0xd4, 0x75, 0x08, 0xef, 0xda, 0x72, 0x7e, 0x96, 0x16, - 0x57, 0x00, 0x5f, 0xdd, 0xd6, 0x6e, 0x38, 0xfe, 0xee, 0xd2, 0x5d, 0xdb, 0x10, 0xd6, 0x3b, 0xbe, - 0x4d, 0x19, 0x7b, 0xc9, 0xc5, 0x47, 0xfe, 0x46, 0x93, 0xb1, 0x67, 0x9c, 0x1e, 0xff, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0x26, 0x30, 0xdb, 0xbe, 0xe9, 0x02, 0x00, 0x00, -} - -func (this *Struct) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Struct) - if !ok { - that2, ok := that.(Struct) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Fields) != len(that1.Fields) { - if len(this.Fields) < len(that1.Fields) { - return -1 - } - return 1 - } - for i := range this.Fields { - if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Value) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value) - if !ok { - that2, ok := that.(Value) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if that1.Kind == nil { - if this.Kind != nil { - return 1 - } - } else if this.Kind == nil { - return -1 - } else { - thisType := -1 - switch this.Kind.(type) { - case *Value_NullValue: - thisType = 0 - case *Value_NumberValue: - thisType = 1 - case *Value_StringValue: - thisType = 2 - case *Value_BoolValue: - thisType = 3 - case *Value_StructValue: - thisType = 4 - case *Value_ListValue: - thisType = 5 - default: - panic(fmt.Sprintf("compare: unexpected type %T in oneof", this.Kind)) - } - that1Type := -1 - switch that1.Kind.(type) { - case *Value_NullValue: - that1Type = 0 - case *Value_NumberValue: - that1Type = 1 - case *Value_StringValue: - that1Type = 2 - case *Value_BoolValue: - that1Type = 3 - case *Value_StructValue: - that1Type = 4 - case *Value_ListValue: - that1Type = 5 - default: - panic(fmt.Sprintf("compare: unexpected type %T in oneof", that1.Kind)) - } - if thisType == that1Type { - if c := this.Kind.Compare(that1.Kind); c != 0 { - return c - } - } else if thisType < that1Type { - return -1 - } else if thisType > that1Type { - return 1 - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Value_NullValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_NullValue) - if !ok { - that2, ok := that.(Value_NullValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NullValue != that1.NullValue { - if this.NullValue < that1.NullValue { - return -1 - } - return 1 - } - return 0 -} -func (this *Value_NumberValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_NumberValue) - if !ok { - that2, ok := that.(Value_NumberValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.NumberValue != that1.NumberValue { - if this.NumberValue < that1.NumberValue { - return -1 - } - return 1 - } - return 0 -} -func (this *Value_StringValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_StringValue) - if !ok { - that2, ok := that.(Value_StringValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.StringValue != that1.StringValue { - if this.StringValue < that1.StringValue { - return -1 - } - return 1 - } - return 0 -} -func (this *Value_BoolValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_BoolValue) - if !ok { - that2, ok := that.(Value_BoolValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.BoolValue != that1.BoolValue { - if !this.BoolValue { - return -1 - } - return 1 - } - return 0 -} -func (this *Value_StructValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_StructValue) - if !ok { - that2, ok := that.(Value_StructValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.StructValue.Compare(that1.StructValue); c != 0 { - return c - } - return 0 -} -func (this *Value_ListValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Value_ListValue) - if !ok { - that2, ok := that.(Value_ListValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := this.ListValue.Compare(that1.ListValue); c != 0 { - return c - } - return 0 -} -func (this *ListValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*ListValue) - if !ok { - that2, ok := that.(ListValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if len(this.Values) != len(that1.Values) { - if len(this.Values) < len(that1.Values) { - return -1 - } - return 1 - } - for i := range this.Values { - if c := this.Values[i].Compare(that1.Values[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (x NullValue) String() string { - s, ok := NullValue_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Struct) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Struct) - if !ok { - that2, ok := that.(Struct) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Fields) != len(that1.Fields) { - return false - } - for i := range this.Fields { - if !this.Fields[i].Equal(that1.Fields[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Value) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value) - if !ok { - that2, ok := that.(Value) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if that1.Kind == nil { - if this.Kind != nil { - return false - } - } else if this.Kind == nil { - return false - } else if !this.Kind.Equal(that1.Kind) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Value_NullValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_NullValue) - if !ok { - that2, ok := that.(Value_NullValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.NullValue != that1.NullValue { - return false - } - return true -} -func (this *Value_NumberValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_NumberValue) - if !ok { - that2, ok := that.(Value_NumberValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.NumberValue != that1.NumberValue { - return false - } - return true -} -func (this *Value_StringValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_StringValue) - if !ok { - that2, ok := that.(Value_StringValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.StringValue != that1.StringValue { - return false - } - return true -} -func (this *Value_BoolValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_BoolValue) - if !ok { - that2, ok := that.(Value_BoolValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.BoolValue != that1.BoolValue { - return false - } - return true -} -func (this *Value_StructValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_StructValue) - if !ok { - that2, ok := that.(Value_StructValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.StructValue.Equal(that1.StructValue) { - return false - } - return true -} -func (this *Value_ListValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Value_ListValue) - if !ok { - that2, ok := that.(Value_ListValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.ListValue.Equal(that1.ListValue) { - return false - } - return true -} -func (this *ListValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ListValue) - if !ok { - that2, ok := that.(ListValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Values) != len(that1.Values) { - return false - } - for i := range this.Values { - if !this.Values[i].Equal(that1.Values[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Struct) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.Struct{") - keysForFields := make([]string, 0, len(this.Fields)) - for k := range this.Fields { - keysForFields = append(keysForFields, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForFields) - mapStringForFields := "map[string]*Value{" - for _, k := range keysForFields { - mapStringForFields += fmt.Sprintf("%#v: %#v,", k, this.Fields[k]) - } - mapStringForFields += "}" - if this.Fields != nil { - s = append(s, "Fields: "+mapStringForFields+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Value) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&types.Value{") - if this.Kind != nil { - s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Value_NullValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_NullValue{` + - `NullValue:` + fmt.Sprintf("%#v", this.NullValue) + `}`}, ", ") - return s -} -func (this *Value_NumberValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_NumberValue{` + - `NumberValue:` + fmt.Sprintf("%#v", this.NumberValue) + `}`}, ", ") - return s -} -func (this *Value_StringValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_StringValue{` + - `StringValue:` + fmt.Sprintf("%#v", this.StringValue) + `}`}, ", ") - return s -} -func (this *Value_BoolValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_BoolValue{` + - `BoolValue:` + fmt.Sprintf("%#v", this.BoolValue) + `}`}, ", ") - return s -} -func (this *Value_StructValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_StructValue{` + - `StructValue:` + fmt.Sprintf("%#v", this.StructValue) + `}`}, ", ") - return s -} -func (this *Value_ListValue) GoString() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&types.Value_ListValue{` + - `ListValue:` + fmt.Sprintf("%#v", this.ListValue) + `}`}, ", ") - return s -} -func (this *ListValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.ListValue{") - if this.Values != nil { - s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringStruct(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Struct) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Struct) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Struct) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Fields) > 0 { - for k := range m.Fields { - v := m.Fields[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintStruct(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintStruct(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Kind != nil { - { - size := m.Kind.Size() - i -= size - if _, err := m.Kind.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Value_NullValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_NullValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintStruct(dAtA, i, uint64(m.NullValue)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *Value_NumberValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_NumberValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.NumberValue)))) - i-- - dAtA[i] = 0x11 - return len(dAtA) - i, nil -} -func (m *Value_StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarintStruct(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0x1a - return len(dAtA) - i, nil -} -func (m *Value_BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - return len(dAtA) - i, nil -} -func (m *Value_StructValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_StructValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.StructValue != nil { - { - size, err := m.StructValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Value_ListValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Value_ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ListValue != nil { - { - size, err := m.ListValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *ListValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ListValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ListValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintStruct(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintStruct(dAtA []byte, offset int, v uint64) int { - offset -= sovStruct(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedStruct(r randyStruct, easy bool) *Struct { - this := &Struct{} - if r.Intn(5) == 0 { - v1 := r.Intn(10) - this.Fields = make(map[string]*Value) - for i := 0; i < v1; i++ { - this.Fields[randStringStruct(r)] = NewPopulatedValue(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedStruct(r, 2) - } - return this -} - -func NewPopulatedValue(r randyStruct, easy bool) *Value { - this := &Value{} - oneofNumber_Kind := []int32{1, 2, 3, 4, 5, 6}[r.Intn(6)] - switch oneofNumber_Kind { - case 1: - this.Kind = NewPopulatedValue_NullValue(r, easy) - case 2: - this.Kind = NewPopulatedValue_NumberValue(r, easy) - case 3: - this.Kind = NewPopulatedValue_StringValue(r, easy) - case 4: - this.Kind = NewPopulatedValue_BoolValue(r, easy) - case 5: - this.Kind = NewPopulatedValue_StructValue(r, easy) - case 6: - this.Kind = NewPopulatedValue_ListValue(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedStruct(r, 7) - } - return this -} - -func NewPopulatedValue_NullValue(r randyStruct, easy bool) *Value_NullValue { - this := &Value_NullValue{} - this.NullValue = NullValue([]int32{0}[r.Intn(1)]) - return this -} -func NewPopulatedValue_NumberValue(r randyStruct, easy bool) *Value_NumberValue { - this := &Value_NumberValue{} - this.NumberValue = float64(r.Float64()) - if r.Intn(2) == 0 { - this.NumberValue *= -1 - } - return this -} -func NewPopulatedValue_StringValue(r randyStruct, easy bool) *Value_StringValue { - this := &Value_StringValue{} - this.StringValue = string(randStringStruct(r)) - return this -} -func NewPopulatedValue_BoolValue(r randyStruct, easy bool) *Value_BoolValue { - this := &Value_BoolValue{} - this.BoolValue = bool(bool(r.Intn(2) == 0)) - return this -} -func NewPopulatedValue_StructValue(r randyStruct, easy bool) *Value_StructValue { - this := &Value_StructValue{} - this.StructValue = NewPopulatedStruct(r, easy) - return this -} -func NewPopulatedValue_ListValue(r randyStruct, easy bool) *Value_ListValue { - this := &Value_ListValue{} - this.ListValue = NewPopulatedListValue(r, easy) - return this -} -func NewPopulatedListValue(r randyStruct, easy bool) *ListValue { - this := &ListValue{} - if r.Intn(5) == 0 { - v2 := r.Intn(5) - this.Values = make([]*Value, v2) - for i := 0; i < v2; i++ { - this.Values[i] = NewPopulatedValue(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedStruct(r, 2) - } - return this -} - -type randyStruct interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneStruct(r randyStruct) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringStruct(r randyStruct) string { - v3 := r.Intn(100) - tmps := make([]rune, v3) - for i := 0; i < v3; i++ { - tmps[i] = randUTF8RuneStruct(r) - } - return string(tmps) -} -func randUnrecognizedStruct(r randyStruct, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldStruct(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldStruct(dAtA []byte, r randyStruct, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) - v4 := r.Int63() - if r.Intn(2) == 0 { - v4 *= -1 - } - dAtA = encodeVarintPopulateStruct(dAtA, uint64(v4)) - case 1: - dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateStruct(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateStruct(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateStruct(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Struct) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Fields) > 0 { - for k, v := range m.Fields { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovStruct(uint64(l)) - } - mapEntrySize := 1 + len(k) + sovStruct(uint64(len(k))) + l - n += mapEntrySize + 1 + sovStruct(uint64(mapEntrySize)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Kind != nil { - n += m.Kind.Size() - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Value_NullValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovStruct(uint64(m.NullValue)) - return n -} -func (m *Value_NumberValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *Value_StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StringValue) - n += 1 + l + sovStruct(uint64(l)) - return n -} -func (m *Value_BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *Value_StructValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StructValue != nil { - l = m.StructValue.Size() - n += 1 + l + sovStruct(uint64(l)) - } - return n -} -func (m *Value_ListValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ListValue != nil { - l = m.ListValue.Size() - n += 1 + l + sovStruct(uint64(l)) - } - return n -} -func (m *ListValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovStruct(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovStruct(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozStruct(x uint64) (n int) { - return sovStruct(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Struct) String() string { - if this == nil { - return "nil" - } - keysForFields := make([]string, 0, len(this.Fields)) - for k := range this.Fields { - keysForFields = append(keysForFields, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForFields) - mapStringForFields := "map[string]*Value{" - for _, k := range keysForFields { - mapStringForFields += fmt.Sprintf("%v: %v,", k, this.Fields[k]) - } - mapStringForFields += "}" - s := strings.Join([]string{`&Struct{`, - `Fields:` + mapStringForFields + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Value_NullValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_NullValue{`, - `NullValue:` + fmt.Sprintf("%v", this.NullValue) + `,`, - `}`, - }, "") - return s -} -func (this *Value_NumberValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_NumberValue{`, - `NumberValue:` + fmt.Sprintf("%v", this.NumberValue) + `,`, - `}`, - }, "") - return s -} -func (this *Value_StringValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_StringValue{`, - `StringValue:` + fmt.Sprintf("%v", this.StringValue) + `,`, - `}`, - }, "") - return s -} -func (this *Value_BoolValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_BoolValue{`, - `BoolValue:` + fmt.Sprintf("%v", this.BoolValue) + `,`, - `}`, - }, "") - return s -} -func (this *Value_StructValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_StructValue{`, - `StructValue:` + strings.Replace(fmt.Sprintf("%v", this.StructValue), "Struct", "Struct", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Value_ListValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Value_ListValue{`, - `ListValue:` + strings.Replace(fmt.Sprintf("%v", this.ListValue), "ListValue", "ListValue", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ListValue) String() string { - if this == nil { - return "nil" - } - repeatedStringForValues := "[]*Value{" - for _, f := range this.Values { - repeatedStringForValues += strings.Replace(f.String(), "Value", "Value", 1) + "," - } - repeatedStringForValues += "}" - s := strings.Join([]string{`&ListValue{`, - `Values:` + repeatedStringForValues + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringStruct(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Struct) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Struct: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Struct: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Fields == nil { - m.Fields = make(map[string]*Value) - } - var mapkey string - var mapvalue *Value - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthStruct - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthStruct - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthStruct - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthStruct - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &Value{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Fields[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NullValue", wireType) - } - var v NullValue - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= NullValue(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Kind = &Value_NullValue{v} - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field NumberValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Kind = &Value_NumberValue{float64(math.Float64frombits(v))} - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = &Value_StringValue{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Kind = &Value_BoolValue{b} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StructValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Struct{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Kind = &Value_StructValue{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ListValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Kind = &Value_ListValue{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ListValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ListValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ListValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowStruct - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthStruct - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthStruct - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, &Value{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipStruct(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthStruct - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipStruct(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowStruct - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthStruct - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupStruct - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthStruct - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthStruct = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowStruct = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupStruct = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.go b/vendor/github.com/gogo/protobuf/types/timestamp.go deleted file mode 100644 index 232ada57ce..0000000000 --- a/vendor/github.com/gogo/protobuf/types/timestamp.go +++ /dev/null @@ -1,130 +0,0 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2016 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 types - -// This file implements operations on google.protobuf.Timestamp. - -import ( - "errors" - "fmt" - "time" -) - -const ( - // Seconds field of the earliest valid Timestamp. - // This is time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). - minValidSeconds = -62135596800 - // Seconds field just after the latest valid Timestamp. - // This is time.Date(10000, 1, 1, 0, 0, 0, 0, time.UTC).Unix(). - maxValidSeconds = 253402300800 -) - -// validateTimestamp determines whether a Timestamp is valid. -// A valid timestamp represents a time in the range -// [0001-01-01, 10000-01-01) and has a Nanos field -// in the range [0, 1e9). -// -// If the Timestamp is valid, validateTimestamp returns nil. -// Otherwise, it returns an error that describes -// the problem. -// -// Every valid Timestamp can be represented by a time.Time, but the converse is not true. -func validateTimestamp(ts *Timestamp) error { - if ts == nil { - return errors.New("timestamp: nil Timestamp") - } - if ts.Seconds < minValidSeconds { - return fmt.Errorf("timestamp: %#v before 0001-01-01", ts) - } - if ts.Seconds >= maxValidSeconds { - return fmt.Errorf("timestamp: %#v after 10000-01-01", ts) - } - if ts.Nanos < 0 || ts.Nanos >= 1e9 { - return fmt.Errorf("timestamp: %#v: nanos not in range [0, 1e9)", ts) - } - return nil -} - -// TimestampFromProto converts a google.protobuf.Timestamp proto to a time.Time. -// It returns an error if the argument is invalid. -// -// Unlike most Go functions, if Timestamp returns an error, the first return value -// is not the zero time.Time. Instead, it is the value obtained from the -// time.Unix function when passed the contents of the Timestamp, in the UTC -// locale. This may or may not be a meaningful time; many invalid Timestamps -// do map to valid time.Times. -// -// A nil Timestamp returns an error. The first return value in that case is -// undefined. -func TimestampFromProto(ts *Timestamp) (time.Time, error) { - // Don't return the zero value on error, because corresponds to a valid - // timestamp. Instead return whatever time.Unix gives us. - var t time.Time - if ts == nil { - t = time.Unix(0, 0).UTC() // treat nil like the empty Timestamp - } else { - t = time.Unix(ts.Seconds, int64(ts.Nanos)).UTC() - } - return t, validateTimestamp(ts) -} - -// TimestampNow returns a google.protobuf.Timestamp for the current time. -func TimestampNow() *Timestamp { - ts, err := TimestampProto(time.Now()) - if err != nil { - panic("ptypes: time.Now() out of Timestamp range") - } - return ts -} - -// TimestampProto converts the time.Time to a google.protobuf.Timestamp proto. -// It returns an error if the resulting Timestamp is invalid. -func TimestampProto(t time.Time) (*Timestamp, error) { - ts := &Timestamp{ - Seconds: t.Unix(), - Nanos: int32(t.Nanosecond()), - } - if err := validateTimestamp(ts); err != nil { - return nil, err - } - return ts, nil -} - -// TimestampString returns the RFC 3339 string for valid Timestamps. For invalid -// Timestamps, it returns an error message in parentheses. -func TimestampString(ts *Timestamp) string { - t, err := TimestampFromProto(ts) - if err != nil { - return fmt.Sprintf("(%v)", err) - } - return t.Format(time.RFC3339Nano) -} diff --git a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go b/vendor/github.com/gogo/protobuf/types/timestamp.pb.go deleted file mode 100644 index 45db7b3bb1..0000000000 --- a/vendor/github.com/gogo/protobuf/types/timestamp.pb.go +++ /dev/null @@ -1,539 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/timestamp.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// A Timestamp represents a point in time independent of any time zone or local -// calendar, encoded as a count of seconds and fractions of seconds at -// nanosecond resolution. The count is relative to an epoch at UTC midnight on -// January 1, 1970, in the proleptic Gregorian calendar which extends the -// Gregorian calendar backwards to year one. -// -// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap -// second table is needed for interpretation, using a [24-hour linear -// smear](https://developers.google.com/time/smear). -// -// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By -// restricting to that range, we ensure that we can convert to and from [RFC -// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. -// -// # Examples -// -// Example 1: Compute Timestamp from POSIX `time()`. -// -// Timestamp timestamp; -// timestamp.set_seconds(time(NULL)); -// timestamp.set_nanos(0); -// -// Example 2: Compute Timestamp from POSIX `gettimeofday()`. -// -// struct timeval tv; -// gettimeofday(&tv, NULL); -// -// Timestamp timestamp; -// timestamp.set_seconds(tv.tv_sec); -// timestamp.set_nanos(tv.tv_usec * 1000); -// -// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. -// -// FILETIME ft; -// GetSystemTimeAsFileTime(&ft); -// UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; -// -// // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z -// // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. -// Timestamp timestamp; -// timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); -// timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); -// -// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. -// -// long millis = System.currentTimeMillis(); -// -// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) -// .setNanos((int) ((millis % 1000) * 1000000)).build(); -// -// -// Example 5: Compute Timestamp from current time in Python. -// -// timestamp = Timestamp() -// timestamp.GetCurrentTime() -// -// # JSON Mapping -// -// In JSON format, the Timestamp type is encoded as a string in the -// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the -// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" -// where {year} is always expressed using four digits while {month}, {day}, -// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional -// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), -// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone -// is required. A proto3 JSON serializer should always use UTC (as indicated by -// "Z") when printing the Timestamp type and a proto3 JSON parser should be -// able to accept both UTC and other timezones (as indicated by an offset). -// -// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past -// 01:30 UTC on January 15, 2017. -// -// In JavaScript, one can convert a Date object to this format using the -// standard -// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) -// method. In Python, a standard `datetime.datetime` object can be converted -// to this format using -// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with -// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use -// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D -// ) to obtain a formatter capable of generating timestamps in this format. -// -// -type Timestamp struct { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"` - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Timestamp) Reset() { *m = Timestamp{} } -func (*Timestamp) ProtoMessage() {} -func (*Timestamp) Descriptor() ([]byte, []int) { - return fileDescriptor_292007bbfe81227e, []int{0} -} -func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" } -func (m *Timestamp) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Timestamp) XXX_Merge(src proto.Message) { - xxx_messageInfo_Timestamp.Merge(m, src) -} -func (m *Timestamp) XXX_Size() int { - return m.Size() -} -func (m *Timestamp) XXX_DiscardUnknown() { - xxx_messageInfo_Timestamp.DiscardUnknown(m) -} - -var xxx_messageInfo_Timestamp proto.InternalMessageInfo - -func (m *Timestamp) GetSeconds() int64 { - if m != nil { - return m.Seconds - } - return 0 -} - -func (m *Timestamp) GetNanos() int32 { - if m != nil { - return m.Nanos - } - return 0 -} - -func (*Timestamp) XXX_MessageName() string { - return "google.protobuf.Timestamp" -} -func init() { - proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp") -} - -func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) } - -var fileDescriptor_292007bbfe81227e = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f, - 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d, - 0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28, - 0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5, - 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89, - 0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x53, 0x03, 0xe3, 0x8d, - 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xae, 0x78, 0x24, 0xc7, 0x78, 0xe2, 0x91, 0x1c, 0xe3, - 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0xbe, 0x78, 0x24, 0xc7, 0xf0, 0xe1, 0x91, 0x1c, - 0xe3, 0x8a, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, - 0x59, 0xee, 0xc4, 0x07, 0xb7, 0x3a, 0x00, 0x24, 0x14, 0xc0, 0x18, 0xc5, 0x5a, 0x52, 0x59, 0x90, - 0x5a, 0xfc, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80, 0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, - 0x9e, 0x00, 0xa8, 0x1e, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef, 0xbc, 0xfc, 0xf2, 0xbc, 0x10, 0x90, - 0xca, 0x24, 0x36, 0xb0, 0x61, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x23, 0x83, 0xdd, - 0xfa, 0x00, 0x00, 0x00, -} - -func (this *Timestamp) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Timestamp) - if !ok { - that2, ok := that.(Timestamp) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Seconds != that1.Seconds { - if this.Seconds < that1.Seconds { - return -1 - } - return 1 - } - if this.Nanos != that1.Nanos { - if this.Nanos < that1.Nanos { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Timestamp) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Timestamp) - if !ok { - that2, ok := that.(Timestamp) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Seconds != that1.Seconds { - return false - } - if this.Nanos != that1.Nanos { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Timestamp) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Timestamp{") - s = append(s, "Seconds: "+fmt.Sprintf("%#v", this.Seconds)+",\n") - s = append(s, "Nanos: "+fmt.Sprintf("%#v", this.Nanos)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringTimestamp(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Timestamp) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Timestamp) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Timestamp) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Nanos != 0 { - i = encodeVarintTimestamp(dAtA, i, uint64(m.Nanos)) - i-- - dAtA[i] = 0x10 - } - if m.Seconds != 0 { - i = encodeVarintTimestamp(dAtA, i, uint64(m.Seconds)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTimestamp(dAtA []byte, offset int, v uint64) int { - offset -= sovTimestamp(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Timestamp) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Seconds != 0 { - n += 1 + sovTimestamp(uint64(m.Seconds)) - } - if m.Nanos != 0 { - n += 1 + sovTimestamp(uint64(m.Nanos)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovTimestamp(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTimestamp(x uint64) (n int) { - return sovTimestamp(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Timestamp) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimestamp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Timestamp: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Timestamp: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Seconds", wireType) - } - m.Seconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimestamp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Seconds |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nanos", wireType) - } - m.Nanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTimestamp - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Nanos |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTimestamp(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTimestamp - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTimestamp(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimestamp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimestamp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTimestamp - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTimestamp - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTimestamp - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTimestamp - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTimestamp = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTimestamp = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTimestamp = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go b/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go deleted file mode 100644 index e03fa13158..0000000000 --- a/vendor/github.com/gogo/protobuf/types/timestamp_gogo.go +++ /dev/null @@ -1,94 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2016, The GoGo Authors. All rights reserved. -// http://github.com/gogo/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. -// -// 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 types - -import ( - "time" -) - -func NewPopulatedTimestamp(r interface { - Int63() int64 -}, easy bool) *Timestamp { - this := &Timestamp{} - ns := int64(r.Int63()) - this.Seconds = ns / 1e9 - this.Nanos = int32(ns % 1e9) - return this -} - -func (ts *Timestamp) String() string { - return TimestampString(ts) -} - -func NewPopulatedStdTime(r interface { - Int63() int64 -}, easy bool) *time.Time { - timestamp := NewPopulatedTimestamp(r, easy) - t, err := TimestampFromProto(timestamp) - if err != nil { - return nil - } - return &t -} - -func SizeOfStdTime(t time.Time) int { - ts, err := TimestampProto(t) - if err != nil { - return 0 - } - return ts.Size() -} - -func StdTimeMarshal(t time.Time) ([]byte, error) { - size := SizeOfStdTime(t) - buf := make([]byte, size) - _, err := StdTimeMarshalTo(t, buf) - return buf, err -} - -func StdTimeMarshalTo(t time.Time, data []byte) (int, error) { - ts, err := TimestampProto(t) - if err != nil { - return 0, err - } - return ts.MarshalTo(data) -} - -func StdTimeUnmarshal(t *time.Time, data []byte) error { - ts := &Timestamp{} - if err := ts.Unmarshal(data); err != nil { - return err - } - tt, err := TimestampFromProto(ts) - if err != nil { - return err - } - *t = tt - return nil -} diff --git a/vendor/github.com/gogo/protobuf/types/type.pb.go b/vendor/github.com/gogo/protobuf/types/type.pb.go deleted file mode 100644 index 791427bb22..0000000000 --- a/vendor/github.com/gogo/protobuf/types/type.pb.go +++ /dev/null @@ -1,3355 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/type.proto - -package types - -import ( - bytes "bytes" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strconv "strconv" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// The syntax in which a protocol buffer element is defined. -type Syntax int32 - -const ( - // Syntax `proto2`. - Syntax_SYNTAX_PROTO2 Syntax = 0 - // Syntax `proto3`. - Syntax_SYNTAX_PROTO3 Syntax = 1 -) - -var Syntax_name = map[int32]string{ - 0: "SYNTAX_PROTO2", - 1: "SYNTAX_PROTO3", -} - -var Syntax_value = map[string]int32{ - "SYNTAX_PROTO2": 0, - "SYNTAX_PROTO3": 1, -} - -func (Syntax) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{0} -} - -// Basic field types. -type Field_Kind int32 - -const ( - // Field type unknown. - Field_TYPE_UNKNOWN Field_Kind = 0 - // Field type double. - Field_TYPE_DOUBLE Field_Kind = 1 - // Field type float. - Field_TYPE_FLOAT Field_Kind = 2 - // Field type int64. - Field_TYPE_INT64 Field_Kind = 3 - // Field type uint64. - Field_TYPE_UINT64 Field_Kind = 4 - // Field type int32. - Field_TYPE_INT32 Field_Kind = 5 - // Field type fixed64. - Field_TYPE_FIXED64 Field_Kind = 6 - // Field type fixed32. - Field_TYPE_FIXED32 Field_Kind = 7 - // Field type bool. - Field_TYPE_BOOL Field_Kind = 8 - // Field type string. - Field_TYPE_STRING Field_Kind = 9 - // Field type group. Proto2 syntax only, and deprecated. - Field_TYPE_GROUP Field_Kind = 10 - // Field type message. - Field_TYPE_MESSAGE Field_Kind = 11 - // Field type bytes. - Field_TYPE_BYTES Field_Kind = 12 - // Field type uint32. - Field_TYPE_UINT32 Field_Kind = 13 - // Field type enum. - Field_TYPE_ENUM Field_Kind = 14 - // Field type sfixed32. - Field_TYPE_SFIXED32 Field_Kind = 15 - // Field type sfixed64. - Field_TYPE_SFIXED64 Field_Kind = 16 - // Field type sint32. - Field_TYPE_SINT32 Field_Kind = 17 - // Field type sint64. - Field_TYPE_SINT64 Field_Kind = 18 -) - -var Field_Kind_name = map[int32]string{ - 0: "TYPE_UNKNOWN", - 1: "TYPE_DOUBLE", - 2: "TYPE_FLOAT", - 3: "TYPE_INT64", - 4: "TYPE_UINT64", - 5: "TYPE_INT32", - 6: "TYPE_FIXED64", - 7: "TYPE_FIXED32", - 8: "TYPE_BOOL", - 9: "TYPE_STRING", - 10: "TYPE_GROUP", - 11: "TYPE_MESSAGE", - 12: "TYPE_BYTES", - 13: "TYPE_UINT32", - 14: "TYPE_ENUM", - 15: "TYPE_SFIXED32", - 16: "TYPE_SFIXED64", - 17: "TYPE_SINT32", - 18: "TYPE_SINT64", -} - -var Field_Kind_value = map[string]int32{ - "TYPE_UNKNOWN": 0, - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18, -} - -func (Field_Kind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{1, 0} -} - -// Whether a field is optional, required, or repeated. -type Field_Cardinality int32 - -const ( - // For fields with unknown cardinality. - Field_CARDINALITY_UNKNOWN Field_Cardinality = 0 - // For optional fields. - Field_CARDINALITY_OPTIONAL Field_Cardinality = 1 - // For required fields. Proto2 syntax only. - Field_CARDINALITY_REQUIRED Field_Cardinality = 2 - // For repeated fields. - Field_CARDINALITY_REPEATED Field_Cardinality = 3 -) - -var Field_Cardinality_name = map[int32]string{ - 0: "CARDINALITY_UNKNOWN", - 1: "CARDINALITY_OPTIONAL", - 2: "CARDINALITY_REQUIRED", - 3: "CARDINALITY_REPEATED", -} - -var Field_Cardinality_value = map[string]int32{ - "CARDINALITY_UNKNOWN": 0, - "CARDINALITY_OPTIONAL": 1, - "CARDINALITY_REQUIRED": 2, - "CARDINALITY_REPEATED": 3, -} - -func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{1, 1} -} - -// A protocol buffer message type. -type Type struct { - // The fully qualified message name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The list of fields. - Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` - // The list of types appearing in `oneof` definitions in this type. - Oneofs []string `protobuf:"bytes,3,rep,name=oneofs,proto3" json:"oneofs,omitempty"` - // The protocol buffer options. - Options []*Option `protobuf:"bytes,4,rep,name=options,proto3" json:"options,omitempty"` - // The source context. - SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // The source syntax. - Syntax Syntax `protobuf:"varint,6,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Type) Reset() { *m = Type{} } -func (*Type) ProtoMessage() {} -func (*Type) Descriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{0} -} -func (m *Type) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Type) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Type.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Type) XXX_Merge(src proto.Message) { - xxx_messageInfo_Type.Merge(m, src) -} -func (m *Type) XXX_Size() int { - return m.Size() -} -func (m *Type) XXX_DiscardUnknown() { - xxx_messageInfo_Type.DiscardUnknown(m) -} - -var xxx_messageInfo_Type proto.InternalMessageInfo - -func (m *Type) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Type) GetFields() []*Field { - if m != nil { - return m.Fields - } - return nil -} - -func (m *Type) GetOneofs() []string { - if m != nil { - return m.Oneofs - } - return nil -} - -func (m *Type) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (m *Type) GetSourceContext() *SourceContext { - if m != nil { - return m.SourceContext - } - return nil -} - -func (m *Type) GetSyntax() Syntax { - if m != nil { - return m.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (*Type) XXX_MessageName() string { - return "google.protobuf.Type" -} - -// A single field of a message type. -type Field struct { - // The field type. - Kind Field_Kind `protobuf:"varint,1,opt,name=kind,proto3,enum=google.protobuf.Field_Kind" json:"kind,omitempty"` - // The field cardinality. - Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,proto3,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"` - // The field number. - Number int32 `protobuf:"varint,3,opt,name=number,proto3" json:"number,omitempty"` - // The field name. - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // The field type URL, without the scheme, for message or enumeration - // types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`. - TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"` - // The index of the field type in `Type.oneofs`, for message or enumeration - // types. The first type has index 1; zero means the type is not in the list. - OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex,proto3" json:"oneof_index,omitempty"` - // Whether to use alternative packed wire representation. - Packed bool `protobuf:"varint,8,opt,name=packed,proto3" json:"packed,omitempty"` - // The protocol buffer options. - Options []*Option `protobuf:"bytes,9,rep,name=options,proto3" json:"options,omitempty"` - // The field JSON name. - JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName,proto3" json:"json_name,omitempty"` - // The string value of the default value of this field. Proto2 syntax only. - DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Field) Reset() { *m = Field{} } -func (*Field) ProtoMessage() {} -func (*Field) Descriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{1} -} -func (m *Field) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Field) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Field.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Field) XXX_Merge(src proto.Message) { - xxx_messageInfo_Field.Merge(m, src) -} -func (m *Field) XXX_Size() int { - return m.Size() -} -func (m *Field) XXX_DiscardUnknown() { - xxx_messageInfo_Field.DiscardUnknown(m) -} - -var xxx_messageInfo_Field proto.InternalMessageInfo - -func (m *Field) GetKind() Field_Kind { - if m != nil { - return m.Kind - } - return Field_TYPE_UNKNOWN -} - -func (m *Field) GetCardinality() Field_Cardinality { - if m != nil { - return m.Cardinality - } - return Field_CARDINALITY_UNKNOWN -} - -func (m *Field) GetNumber() int32 { - if m != nil { - return m.Number - } - return 0 -} - -func (m *Field) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Field) GetTypeUrl() string { - if m != nil { - return m.TypeUrl - } - return "" -} - -func (m *Field) GetOneofIndex() int32 { - if m != nil { - return m.OneofIndex - } - return 0 -} - -func (m *Field) GetPacked() bool { - if m != nil { - return m.Packed - } - return false -} - -func (m *Field) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (m *Field) GetJsonName() string { - if m != nil { - return m.JsonName - } - return "" -} - -func (m *Field) GetDefaultValue() string { - if m != nil { - return m.DefaultValue - } - return "" -} - -func (*Field) XXX_MessageName() string { - return "google.protobuf.Field" -} - -// Enum type definition. -type Enum struct { - // Enum type name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Enum value definitions. - Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue,proto3" json:"enumvalue,omitempty"` - // Protocol buffer options. - Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - // The source context. - SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext,proto3" json:"source_context,omitempty"` - // The source syntax. - Syntax Syntax `protobuf:"varint,5,opt,name=syntax,proto3,enum=google.protobuf.Syntax" json:"syntax,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Enum) Reset() { *m = Enum{} } -func (*Enum) ProtoMessage() {} -func (*Enum) Descriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{2} -} -func (m *Enum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Enum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Enum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Enum) XXX_Merge(src proto.Message) { - xxx_messageInfo_Enum.Merge(m, src) -} -func (m *Enum) XXX_Size() int { - return m.Size() -} -func (m *Enum) XXX_DiscardUnknown() { - xxx_messageInfo_Enum.DiscardUnknown(m) -} - -var xxx_messageInfo_Enum proto.InternalMessageInfo - -func (m *Enum) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Enum) GetEnumvalue() []*EnumValue { - if m != nil { - return m.Enumvalue - } - return nil -} - -func (m *Enum) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (m *Enum) GetSourceContext() *SourceContext { - if m != nil { - return m.SourceContext - } - return nil -} - -func (m *Enum) GetSyntax() Syntax { - if m != nil { - return m.Syntax - } - return Syntax_SYNTAX_PROTO2 -} - -func (*Enum) XXX_MessageName() string { - return "google.protobuf.Enum" -} - -// Enum value definition. -type EnumValue struct { - // Enum value name. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // Enum value number. - Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"` - // Protocol buffer options. - Options []*Option `protobuf:"bytes,3,rep,name=options,proto3" json:"options,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *EnumValue) Reset() { *m = EnumValue{} } -func (*EnumValue) ProtoMessage() {} -func (*EnumValue) Descriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{3} -} -func (m *EnumValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EnumValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EnumValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *EnumValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumValue.Merge(m, src) -} -func (m *EnumValue) XXX_Size() int { - return m.Size() -} -func (m *EnumValue) XXX_DiscardUnknown() { - xxx_messageInfo_EnumValue.DiscardUnknown(m) -} - -var xxx_messageInfo_EnumValue proto.InternalMessageInfo - -func (m *EnumValue) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *EnumValue) GetNumber() int32 { - if m != nil { - return m.Number - } - return 0 -} - -func (m *EnumValue) GetOptions() []*Option { - if m != nil { - return m.Options - } - return nil -} - -func (*EnumValue) XXX_MessageName() string { - return "google.protobuf.EnumValue" -} - -// A protocol buffer option, which can be attached to a message, field, -// enumeration, etc. -type Option struct { - // The option's name. For protobuf built-in options (options defined in - // descriptor.proto), this is the short name. For example, `"map_entry"`. - // For custom options, it should be the fully-qualified name. For example, - // `"google.api.http"`. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // The option's value packed in an Any message. If the value is a primitive, - // the corresponding wrapper type defined in google/protobuf/wrappers.proto - // should be used. If the value is an enum, it should be stored as an int32 - // value using the google.protobuf.Int32Value type. - Value *Any `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Option) Reset() { *m = Option{} } -func (*Option) ProtoMessage() {} -func (*Option) Descriptor() ([]byte, []int) { - return fileDescriptor_dd271cc1e348c538, []int{4} -} -func (m *Option) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Option) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Option.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Option) XXX_Merge(src proto.Message) { - xxx_messageInfo_Option.Merge(m, src) -} -func (m *Option) XXX_Size() int { - return m.Size() -} -func (m *Option) XXX_DiscardUnknown() { - xxx_messageInfo_Option.DiscardUnknown(m) -} - -var xxx_messageInfo_Option proto.InternalMessageInfo - -func (m *Option) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Option) GetValue() *Any { - if m != nil { - return m.Value - } - return nil -} - -func (*Option) XXX_MessageName() string { - return "google.protobuf.Option" -} -func init() { - proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value) - proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value) - proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value) - proto.RegisterType((*Type)(nil), "google.protobuf.Type") - proto.RegisterType((*Field)(nil), "google.protobuf.Field") - proto.RegisterType((*Enum)(nil), "google.protobuf.Enum") - proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue") - proto.RegisterType((*Option)(nil), "google.protobuf.Option") -} - -func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor_dd271cc1e348c538) } - -var fileDescriptor_dd271cc1e348c538 = []byte{ - // 840 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcf, 0x73, 0xda, 0x46, - 0x14, 0xf6, 0x0a, 0x21,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7d, 0xbf, 0xd0, 0xd1, 0xcf, - 0x0b, 0x1d, 0xdd, 0x2e, 0x74, 0xf4, 0xdb, 0x42, 0x47, 0x7f, 0x2c, 0x74, 0xf4, 0xe7, 0x42, 0xdf, - 0x7b, 0xcf, 0xf1, 0x77, 0x3a, 0xba, 0x7d, 0xa7, 0x23, 0x78, 0x38, 0xf0, 0xc7, 0x9b, 0x25, 0xd4, - 0x55, 0xfe, 0x9f, 0x63, 0x73, 0xcb, 0x46, 0xdf, 0xa4, 0xf9, 0xd1, 0x0a, 0x3e, 0x20, 0xf4, 0x93, - 0x94, 0x6a, 0xda, 0xf5, 0x5f, 0x24, 0xbd, 0x19, 0xc9, 0xed, 0x55, 0xc5, 0x2f, 0x5d, 0xcf, 0xbb, - 0x60, 0xfe, 0x77, 0x8c, 0xbb, 0x05, 0x57, 0x8a, 0x88, 0x53, 0xfd, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0xbc, 0x2a, 0x5e, 0x82, 0x2b, 0x07, 0x00, 0x00, -} - -func (this *Type) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Type) - if !ok { - that2, ok := that.(Type) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if len(this.Fields) != len(that1.Fields) { - if len(this.Fields) < len(that1.Fields) { - return -1 - } - return 1 - } - for i := range this.Fields { - if c := this.Fields[i].Compare(that1.Fields[i]); c != 0 { - return c - } - } - if len(this.Oneofs) != len(that1.Oneofs) { - if len(this.Oneofs) < len(that1.Oneofs) { - return -1 - } - return 1 - } - for i := range this.Oneofs { - if this.Oneofs[i] != that1.Oneofs[i] { - if this.Oneofs[i] < that1.Oneofs[i] { - return -1 - } - return 1 - } - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { - return c - } - if this.Syntax != that1.Syntax { - if this.Syntax < that1.Syntax { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Field) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Field) - if !ok { - that2, ok := that.(Field) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Kind != that1.Kind { - if this.Kind < that1.Kind { - return -1 - } - return 1 - } - if this.Cardinality != that1.Cardinality { - if this.Cardinality < that1.Cardinality { - return -1 - } - return 1 - } - if this.Number != that1.Number { - if this.Number < that1.Number { - return -1 - } - return 1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if this.TypeUrl != that1.TypeUrl { - if this.TypeUrl < that1.TypeUrl { - return -1 - } - return 1 - } - if this.OneofIndex != that1.OneofIndex { - if this.OneofIndex < that1.OneofIndex { - return -1 - } - return 1 - } - if this.Packed != that1.Packed { - if !this.Packed { - return -1 - } - return 1 - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if this.JsonName != that1.JsonName { - if this.JsonName < that1.JsonName { - return -1 - } - return 1 - } - if this.DefaultValue != that1.DefaultValue { - if this.DefaultValue < that1.DefaultValue { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Enum) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Enum) - if !ok { - that2, ok := that.(Enum) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if len(this.Enumvalue) != len(that1.Enumvalue) { - if len(this.Enumvalue) < len(that1.Enumvalue) { - return -1 - } - return 1 - } - for i := range this.Enumvalue { - if c := this.Enumvalue[i].Compare(that1.Enumvalue[i]); c != 0 { - return c - } - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if c := this.SourceContext.Compare(that1.SourceContext); c != 0 { - return c - } - if this.Syntax != that1.Syntax { - if this.Syntax < that1.Syntax { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *EnumValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*EnumValue) - if !ok { - that2, ok := that.(EnumValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if this.Number != that1.Number { - if this.Number < that1.Number { - return -1 - } - return 1 - } - if len(this.Options) != len(that1.Options) { - if len(this.Options) < len(that1.Options) { - return -1 - } - return 1 - } - for i := range this.Options { - if c := this.Options[i].Compare(that1.Options[i]); c != 0 { - return c - } - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Option) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Option) - if !ok { - that2, ok := that.(Option) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Name != that1.Name { - if this.Name < that1.Name { - return -1 - } - return 1 - } - if c := this.Value.Compare(that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (x Syntax) String() string { - s, ok := Syntax_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Field_Kind) String() string { - s, ok := Field_Kind_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (x Field_Cardinality) String() string { - s, ok := Field_Cardinality_name[int32(x)] - if ok { - return s - } - return strconv.Itoa(int(x)) -} -func (this *Type) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Type) - if !ok { - that2, ok := that.(Type) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Fields) != len(that1.Fields) { - return false - } - for i := range this.Fields { - if !this.Fields[i].Equal(that1.Fields[i]) { - return false - } - } - if len(this.Oneofs) != len(that1.Oneofs) { - return false - } - for i := range this.Oneofs { - if this.Oneofs[i] != that1.Oneofs[i] { - return false - } - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if !this.SourceContext.Equal(that1.SourceContext) { - return false - } - if this.Syntax != that1.Syntax { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Field) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Field) - if !ok { - that2, ok := that.(Field) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Kind != that1.Kind { - return false - } - if this.Cardinality != that1.Cardinality { - return false - } - if this.Number != that1.Number { - return false - } - if this.Name != that1.Name { - return false - } - if this.TypeUrl != that1.TypeUrl { - return false - } - if this.OneofIndex != that1.OneofIndex { - return false - } - if this.Packed != that1.Packed { - return false - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if this.JsonName != that1.JsonName { - return false - } - if this.DefaultValue != that1.DefaultValue { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Enum) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Enum) - if !ok { - that2, ok := that.(Enum) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if len(this.Enumvalue) != len(that1.Enumvalue) { - return false - } - for i := range this.Enumvalue { - if !this.Enumvalue[i].Equal(that1.Enumvalue[i]) { - return false - } - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if !this.SourceContext.Equal(that1.SourceContext) { - return false - } - if this.Syntax != that1.Syntax { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *EnumValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EnumValue) - if !ok { - that2, ok := that.(EnumValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Number != that1.Number { - return false - } - if len(this.Options) != len(that1.Options) { - return false - } - for i := range this.Options { - if !this.Options[i].Equal(that1.Options[i]) { - return false - } - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Option) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Option) - if !ok { - that2, ok := that.(Option) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !this.Value.Equal(that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Type) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&types.Type{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - if this.Fields != nil { - s = append(s, "Fields: "+fmt.Sprintf("%#v", this.Fields)+",\n") - } - s = append(s, "Oneofs: "+fmt.Sprintf("%#v", this.Oneofs)+",\n") - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.SourceContext != nil { - s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") - } - s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Field) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 14) - s = append(s, "&types.Field{") - s = append(s, "Kind: "+fmt.Sprintf("%#v", this.Kind)+",\n") - s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n") - s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "TypeUrl: "+fmt.Sprintf("%#v", this.TypeUrl)+",\n") - s = append(s, "OneofIndex: "+fmt.Sprintf("%#v", this.OneofIndex)+",\n") - s = append(s, "Packed: "+fmt.Sprintf("%#v", this.Packed)+",\n") - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - s = append(s, "JsonName: "+fmt.Sprintf("%#v", this.JsonName)+",\n") - s = append(s, "DefaultValue: "+fmt.Sprintf("%#v", this.DefaultValue)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Enum) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&types.Enum{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - if this.Enumvalue != nil { - s = append(s, "Enumvalue: "+fmt.Sprintf("%#v", this.Enumvalue)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.SourceContext != nil { - s = append(s, "SourceContext: "+fmt.Sprintf("%#v", this.SourceContext)+",\n") - } - s = append(s, "Syntax: "+fmt.Sprintf("%#v", this.Syntax)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnumValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&types.EnumValue{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Option) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&types.Option{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - if this.Value != nil { - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - } - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringType(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *Type) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Type) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Type) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Syntax != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Syntax)) - i-- - dAtA[i] = 0x30 - } - if m.SourceContext != nil { - { - size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Oneofs) > 0 { - for iNdEx := len(m.Oneofs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Oneofs[iNdEx]) - copy(dAtA[i:], m.Oneofs[iNdEx]) - i = encodeVarintType(dAtA, i, uint64(len(m.Oneofs[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Fields) > 0 { - for iNdEx := len(m.Fields) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Fields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintType(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Field) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Field) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Field) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.DefaultValue) > 0 { - i -= len(m.DefaultValue) - copy(dAtA[i:], m.DefaultValue) - i = encodeVarintType(dAtA, i, uint64(len(m.DefaultValue))) - i-- - dAtA[i] = 0x5a - } - if len(m.JsonName) > 0 { - i -= len(m.JsonName) - copy(dAtA[i:], m.JsonName) - i = encodeVarintType(dAtA, i, uint64(len(m.JsonName))) - i-- - dAtA[i] = 0x52 - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.Packed { - i-- - if m.Packed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.OneofIndex != 0 { - i = encodeVarintType(dAtA, i, uint64(m.OneofIndex)) - i-- - dAtA[i] = 0x38 - } - if len(m.TypeUrl) > 0 { - i -= len(m.TypeUrl) - copy(dAtA[i:], m.TypeUrl) - i = encodeVarintType(dAtA, i, uint64(len(m.TypeUrl))) - i-- - dAtA[i] = 0x32 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintType(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x22 - } - if m.Number != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x18 - } - if m.Cardinality != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Cardinality)) - i-- - dAtA[i] = 0x10 - } - if m.Kind != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Kind)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Enum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Enum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Enum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Syntax != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Syntax)) - i-- - dAtA[i] = 0x28 - } - if m.SourceContext != nil { - { - size, err := m.SourceContext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Enumvalue) > 0 { - for iNdEx := len(m.Enumvalue) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Enumvalue[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintType(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *EnumValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EnumValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EnumValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Options) > 0 { - for iNdEx := len(m.Options) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Options[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Number != 0 { - i = encodeVarintType(dAtA, i, uint64(m.Number)) - i-- - dAtA[i] = 0x10 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintType(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Option) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Option) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Option) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != nil { - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintType(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintType(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintType(dAtA []byte, offset int, v uint64) int { - offset -= sovType(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedType(r randyType, easy bool) *Type { - this := &Type{} - this.Name = string(randStringType(r)) - if r.Intn(5) != 0 { - v1 := r.Intn(5) - this.Fields = make([]*Field, v1) - for i := 0; i < v1; i++ { - this.Fields[i] = NewPopulatedField(r, easy) - } - } - v2 := r.Intn(10) - this.Oneofs = make([]string, v2) - for i := 0; i < v2; i++ { - this.Oneofs[i] = string(randStringType(r)) - } - if r.Intn(5) != 0 { - v3 := r.Intn(5) - this.Options = make([]*Option, v3) - for i := 0; i < v3; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - if r.Intn(5) != 0 { - this.SourceContext = NewPopulatedSourceContext(r, easy) - } - this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedType(r, 7) - } - return this -} - -func NewPopulatedField(r randyType, easy bool) *Field { - this := &Field{} - this.Kind = Field_Kind([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18}[r.Intn(19)]) - this.Cardinality = Field_Cardinality([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.Number = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Number *= -1 - } - this.Name = string(randStringType(r)) - this.TypeUrl = string(randStringType(r)) - this.OneofIndex = int32(r.Int31()) - if r.Intn(2) == 0 { - this.OneofIndex *= -1 - } - this.Packed = bool(bool(r.Intn(2) == 0)) - if r.Intn(5) != 0 { - v4 := r.Intn(5) - this.Options = make([]*Option, v4) - for i := 0; i < v4; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - this.JsonName = string(randStringType(r)) - this.DefaultValue = string(randStringType(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedType(r, 12) - } - return this -} - -func NewPopulatedEnum(r randyType, easy bool) *Enum { - this := &Enum{} - this.Name = string(randStringType(r)) - if r.Intn(5) != 0 { - v5 := r.Intn(5) - this.Enumvalue = make([]*EnumValue, v5) - for i := 0; i < v5; i++ { - this.Enumvalue[i] = NewPopulatedEnumValue(r, easy) - } - } - if r.Intn(5) != 0 { - v6 := r.Intn(5) - this.Options = make([]*Option, v6) - for i := 0; i < v6; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - if r.Intn(5) != 0 { - this.SourceContext = NewPopulatedSourceContext(r, easy) - } - this.Syntax = Syntax([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedType(r, 6) - } - return this -} - -func NewPopulatedEnumValue(r randyType, easy bool) *EnumValue { - this := &EnumValue{} - this.Name = string(randStringType(r)) - this.Number = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Number *= -1 - } - if r.Intn(5) != 0 { - v7 := r.Intn(5) - this.Options = make([]*Option, v7) - for i := 0; i < v7; i++ { - this.Options[i] = NewPopulatedOption(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedType(r, 4) - } - return this -} - -func NewPopulatedOption(r randyType, easy bool) *Option { - this := &Option{} - this.Name = string(randStringType(r)) - if r.Intn(5) != 0 { - this.Value = NewPopulatedAny(r, easy) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedType(r, 3) - } - return this -} - -type randyType interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneType(r randyType) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringType(r randyType) string { - v8 := r.Intn(100) - tmps := make([]rune, v8) - for i := 0; i < v8; i++ { - tmps[i] = randUTF8RuneType(r) - } - return string(tmps) -} -func randUnrecognizedType(r randyType, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldType(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldType(dAtA []byte, r randyType, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateType(dAtA, uint64(key)) - v9 := r.Int63() - if r.Intn(2) == 0 { - v9 *= -1 - } - dAtA = encodeVarintPopulateType(dAtA, uint64(v9)) - case 1: - dAtA = encodeVarintPopulateType(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateType(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateType(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateType(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateType(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *Type) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if len(m.Fields) > 0 { - for _, e := range m.Fields { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - if len(m.Oneofs) > 0 { - for _, s := range m.Oneofs { - l = len(s) - n += 1 + l + sovType(uint64(l)) - } - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - if m.SourceContext != nil { - l = m.SourceContext.Size() - n += 1 + l + sovType(uint64(l)) - } - if m.Syntax != 0 { - n += 1 + sovType(uint64(m.Syntax)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Field) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Kind != 0 { - n += 1 + sovType(uint64(m.Kind)) - } - if m.Cardinality != 0 { - n += 1 + sovType(uint64(m.Cardinality)) - } - if m.Number != 0 { - n += 1 + sovType(uint64(m.Number)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - l = len(m.TypeUrl) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if m.OneofIndex != 0 { - n += 1 + sovType(uint64(m.OneofIndex)) - } - if m.Packed { - n += 2 - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - l = len(m.JsonName) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - l = len(m.DefaultValue) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Enum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if len(m.Enumvalue) > 0 { - for _, e := range m.Enumvalue { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - if m.SourceContext != nil { - l = m.SourceContext.Size() - n += 1 + l + sovType(uint64(l)) - } - if m.Syntax != 0 { - n += 1 + sovType(uint64(m.Syntax)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *EnumValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if m.Number != 0 { - n += 1 + sovType(uint64(m.Number)) - } - if len(m.Options) > 0 { - for _, e := range m.Options { - l = e.Size() - n += 1 + l + sovType(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Option) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovType(uint64(l)) - } - if m.Value != nil { - l = m.Value.Size() - n += 1 + l + sovType(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovType(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozType(x uint64) (n int) { - return sovType(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Type) String() string { - if this == nil { - return "nil" - } - repeatedStringForFields := "[]*Field{" - for _, f := range this.Fields { - repeatedStringForFields += strings.Replace(f.String(), "Field", "Field", 1) + "," - } - repeatedStringForFields += "}" - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - s := strings.Join([]string{`&Type{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Fields:` + repeatedStringForFields + `,`, - `Oneofs:` + fmt.Sprintf("%v", this.Oneofs) + `,`, - `Options:` + repeatedStringForOptions + `,`, - `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, - `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Field) String() string { - if this == nil { - return "nil" - } - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - s := strings.Join([]string{`&Field{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `TypeUrl:` + fmt.Sprintf("%v", this.TypeUrl) + `,`, - `OneofIndex:` + fmt.Sprintf("%v", this.OneofIndex) + `,`, - `Packed:` + fmt.Sprintf("%v", this.Packed) + `,`, - `Options:` + repeatedStringForOptions + `,`, - `JsonName:` + fmt.Sprintf("%v", this.JsonName) + `,`, - `DefaultValue:` + fmt.Sprintf("%v", this.DefaultValue) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Enum) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnumvalue := "[]*EnumValue{" - for _, f := range this.Enumvalue { - repeatedStringForEnumvalue += strings.Replace(f.String(), "EnumValue", "EnumValue", 1) + "," - } - repeatedStringForEnumvalue += "}" - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - s := strings.Join([]string{`&Enum{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Enumvalue:` + repeatedStringForEnumvalue + `,`, - `Options:` + repeatedStringForOptions + `,`, - `SourceContext:` + strings.Replace(fmt.Sprintf("%v", this.SourceContext), "SourceContext", "SourceContext", 1) + `,`, - `Syntax:` + fmt.Sprintf("%v", this.Syntax) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *EnumValue) String() string { - if this == nil { - return "nil" - } - repeatedStringForOptions := "[]*Option{" - for _, f := range this.Options { - repeatedStringForOptions += strings.Replace(f.String(), "Option", "Option", 1) + "," - } - repeatedStringForOptions += "}" - s := strings.Join([]string{`&EnumValue{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Number:` + fmt.Sprintf("%v", this.Number) + `,`, - `Options:` + repeatedStringForOptions + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Option) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Option{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Any", "Any", 1) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringType(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Type) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Type: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Type: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fields = append(m.Fields, &Field{}) - if err := m.Fields[len(m.Fields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Oneofs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Oneofs = append(m.Oneofs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceContext == nil { - m.SourceContext = &SourceContext{} - } - if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) - } - m.Syntax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Syntax |= Syntax(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipType(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Field) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Field: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Field: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - m.Kind = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Kind |= Field_Kind(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType) - } - m.Cardinality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Cardinality |= Field_Cardinality(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TypeUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OneofIndex", wireType) - } - m.OneofIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.OneofIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Packed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Packed = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JsonName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JsonName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultValue = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipType(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Enum) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Enum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Enum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enumvalue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Enumvalue = append(m.Enumvalue, &EnumValue{}) - if err := m.Enumvalue[len(m.Enumvalue)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceContext == nil { - m.SourceContext = &SourceContext{} - } - if err := m.SourceContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syntax", wireType) - } - m.Syntax = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Syntax |= Syntax(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipType(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EnumValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EnumValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EnumValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) - } - m.Number = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Number |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Options = append(m.Options, &Option{}) - if err := m.Options[len(m.Options)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipType(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Option) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Option: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Option: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowType - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthType - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthType - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Value == nil { - m.Value = &Any{} - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipType(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthType - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipType(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowType - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowType - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowType - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthType - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupType - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthType - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthType = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowType = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupType = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go b/vendor/github.com/gogo/protobuf/types/wrappers.pb.go deleted file mode 100644 index 8d415420a7..0000000000 --- a/vendor/github.com/gogo/protobuf/types/wrappers.pb.go +++ /dev/null @@ -1,2703 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: google/protobuf/wrappers.proto - -package types - -import ( - bytes "bytes" - encoding_binary "encoding/binary" - fmt "fmt" - proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -// 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.GoGoProtoPackageIsVersion3 // 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 (*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 m.Unmarshal(b) -} -func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *DoubleValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleValue.Merge(m, src) -} -func (m *DoubleValue) XXX_Size() int { - return m.Size() -} -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 -} - -func (*DoubleValue) XXX_MessageName() string { - return "google.protobuf.DoubleValue" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FloatValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_FloatValue.Merge(m, src) -} -func (m *FloatValue) XXX_Size() int { - return m.Size() -} -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 -} - -func (*FloatValue) XXX_MessageName() string { - return "google.protobuf.FloatValue" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Int64Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int64Value.Merge(m, src) -} -func (m *Int64Value) XXX_Size() int { - return m.Size() -} -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 -} - -func (*Int64Value) XXX_MessageName() string { - return "google.protobuf.Int64Value" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UInt64Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_UInt64Value.Merge(m, src) -} -func (m *UInt64Value) XXX_Size() int { - return m.Size() -} -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 -} - -func (*UInt64Value) XXX_MessageName() string { - return "google.protobuf.UInt64Value" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Int32Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int32Value.Merge(m, src) -} -func (m *Int32Value) XXX_Size() int { - return m.Size() -} -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 -} - -func (*Int32Value) XXX_MessageName() string { - return "google.protobuf.Int32Value" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *UInt32Value) XXX_Merge(src proto.Message) { - xxx_messageInfo_UInt32Value.Merge(m, src) -} -func (m *UInt32Value) XXX_Size() int { - return m.Size() -} -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 -} - -func (*UInt32Value) XXX_MessageName() string { - return "google.protobuf.UInt32Value" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BoolValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoolValue.Merge(m, src) -} -func (m *BoolValue) XXX_Size() int { - return m.Size() -} -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 -} - -func (*BoolValue) XXX_MessageName() string { - return "google.protobuf.BoolValue" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_StringValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *StringValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringValue.Merge(m, src) -} -func (m *StringValue) XXX_Size() int { - return m.Size() -} -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 "" -} - -func (*StringValue) XXX_MessageName() string { - return "google.protobuf.StringValue" -} - -// 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 (*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 m.Unmarshal(b) -} -func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *BytesValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesValue.Merge(m, src) -} -func (m *BytesValue) XXX_Size() int { - return m.Size() -} -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 (*BytesValue) XXX_MessageName() string { - return "google.protobuf.BytesValue" -} -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{ - // 285 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, 0x3b, - 0xe3, 0x8d, 0x87, 0x72, 0x0c, 0x1f, 0x1e, 0xca, 0x31, 0xfe, 0x78, 0x28, 0xc7, 0xd8, 0xf0, 0x48, - 0x8e, 0x71, 0xc5, 0x23, 0x39, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, - 0x48, 0x8e, 0xf1, 0xc5, 0x23, 0x39, 0x86, 0x0f, 0x20, 0xf1, 0xc7, 0x72, 0x8c, 0x27, 0x1e, 0xcb, - 0x31, 0x72, 0x09, 0x27, 0xe7, 0xe7, 0xea, 0xa1, 0x45, 0x87, 0x13, 0x6f, 0x38, 0x34, 0xbe, 0x02, - 0x40, 0x22, 0x01, 0x8c, 0x51, 0xac, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x3f, 0x18, 0x19, 0x17, 0x31, - 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x68, 0x09, 0x80, 0x6a, 0xd1, 0x0b, 0x4f, - 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0x01, 0xa9, 0x4c, 0x62, 0x03, 0x9b, 0x65, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0x31, 0x55, 0x64, 0x90, 0x0a, 0x02, 0x00, 0x00, -} - -func (this *DoubleValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*DoubleValue) - if !ok { - that2, ok := that.(DoubleValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *FloatValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*FloatValue) - if !ok { - that2, ok := that.(FloatValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Int64Value) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Int64Value) - if !ok { - that2, ok := that.(Int64Value) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UInt64Value) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UInt64Value) - if !ok { - that2, ok := that.(UInt64Value) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *Int32Value) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*Int32Value) - if !ok { - that2, ok := that.(Int32Value) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *UInt32Value) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*UInt32Value) - if !ok { - that2, ok := that.(UInt32Value) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *BoolValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*BoolValue) - if !ok { - that2, ok := that.(BoolValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if !this.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *StringValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*StringValue) - if !ok { - that2, ok := that.(StringValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if this.Value != that1.Value { - if this.Value < that1.Value { - return -1 - } - return 1 - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *BytesValue) Compare(that interface{}) int { - if that == nil { - if this == nil { - return 0 - } - return 1 - } - - that1, ok := that.(*BytesValue) - if !ok { - that2, ok := that.(BytesValue) - if ok { - that1 = &that2 - } else { - return 1 - } - } - if that1 == nil { - if this == nil { - return 0 - } - return 1 - } else if this == nil { - return -1 - } - if c := bytes.Compare(this.Value, that1.Value); c != 0 { - return c - } - if c := bytes.Compare(this.XXX_unrecognized, that1.XXX_unrecognized); c != 0 { - return c - } - return 0 -} -func (this *DoubleValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DoubleValue) - if !ok { - that2, ok := that.(DoubleValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *FloatValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*FloatValue) - if !ok { - that2, ok := that.(FloatValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Int64Value) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Int64Value) - if !ok { - that2, ok := that.(Int64Value) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UInt64Value) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UInt64Value) - if !ok { - that2, ok := that.(UInt64Value) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *Int32Value) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Int32Value) - if !ok { - that2, ok := that.(Int32Value) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *UInt32Value) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UInt32Value) - if !ok { - that2, ok := that.(UInt32Value) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BoolValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BoolValue) - if !ok { - that2, ok := that.(BoolValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *StringValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StringValue) - if !ok { - that2, ok := that.(StringValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Value != that1.Value { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *BytesValue) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BytesValue) - if !ok { - that2, ok := that.(BytesValue) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Value, that1.Value) { - return false - } - if !bytes.Equal(this.XXX_unrecognized, that1.XXX_unrecognized) { - return false - } - return true -} -func (this *DoubleValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.DoubleValue{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *FloatValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.FloatValue{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Int64Value) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.Int64Value{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UInt64Value) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.UInt64Value{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Int32Value) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.Int32Value{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UInt32Value) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.UInt32Value{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BoolValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.BoolValue{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *StringValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.StringValue{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BytesValue) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&types.BytesValue{") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - if this.XXX_unrecognized != nil { - s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringWrappers(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} -func (m *DoubleValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DoubleValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *FloatValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FloatValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FloatValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Value)))) - i-- - dAtA[i] = 0xd - } - return len(dAtA) - i, nil -} - -func (m *Int64Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Int64Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Int64Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *UInt64Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UInt64Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UInt64Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Int32Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Int32Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Int32Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *UInt32Value) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UInt32Value) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UInt32Value) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value != 0 { - i = encodeVarintWrappers(dAtA, i, uint64(m.Value)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *BoolValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Value { - i-- - if m.Value { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StringValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BytesValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BytesValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintWrappers(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintWrappers(dAtA []byte, offset int, v uint64) int { - offset -= sovWrappers(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func NewPopulatedDoubleValue(r randyWrappers, easy bool) *DoubleValue { - this := &DoubleValue{} - this.Value = float64(r.Float64()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedFloatValue(r randyWrappers, easy bool) *FloatValue { - this := &FloatValue{} - this.Value = float32(r.Float32()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedInt64Value(r randyWrappers, easy bool) *Int64Value { - this := &Int64Value{} - this.Value = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedUInt64Value(r randyWrappers, easy bool) *UInt64Value { - this := &UInt64Value{} - this.Value = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedInt32Value(r randyWrappers, easy bool) *Int32Value { - this := &Int32Value{} - this.Value = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Value *= -1 - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedUInt32Value(r randyWrappers, easy bool) *UInt32Value { - this := &UInt32Value{} - this.Value = uint32(r.Uint32()) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedBoolValue(r randyWrappers, easy bool) *BoolValue { - this := &BoolValue{} - this.Value = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedStringValue(r randyWrappers, easy bool) *StringValue { - this := &StringValue{} - this.Value = string(randStringWrappers(r)) - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -func NewPopulatedBytesValue(r randyWrappers, easy bool) *BytesValue { - this := &BytesValue{} - v1 := r.Intn(100) - this.Value = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Value[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedWrappers(r, 2) - } - return this -} - -type randyWrappers interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneWrappers(r randyWrappers) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringWrappers(r randyWrappers) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneWrappers(r) - } - return string(tmps) -} -func randUnrecognizedWrappers(r randyWrappers, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldWrappers(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldWrappers(dAtA []byte, r randyWrappers, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateWrappers(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateWrappers(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} -func (m *DoubleValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 9 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FloatValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 5 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Int64Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 1 + sovWrappers(uint64(m.Value)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UInt64Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 1 + sovWrappers(uint64(m.Value)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *Int32Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 1 + sovWrappers(uint64(m.Value)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *UInt32Value) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != 0 { - n += 1 + sovWrappers(uint64(m.Value)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value { - n += 2 - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovWrappers(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *BytesValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - if l > 0 { - n += 1 + l + sovWrappers(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovWrappers(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozWrappers(x uint64) (n int) { - return sovWrappers(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *DoubleValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DoubleValue{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *FloatValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FloatValue{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Int64Value) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Int64Value{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UInt64Value) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UInt64Value{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *Int32Value) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Int32Value{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *UInt32Value) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UInt32Value{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BoolValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BoolValue{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *StringValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StringValue{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func (this *BytesValue) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BytesValue{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `XXX_unrecognized:` + fmt.Sprintf("%v", this.XXX_unrecognized) + `,`, - `}`, - }, "") - return s -} -func valueToStringWrappers(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *DoubleValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DoubleValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DoubleValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FloatValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FloatValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FloatValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Value = float32(math.Float32frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Int64Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Int64Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Int64Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Value |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UInt64Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UInt64Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UInt64Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Value |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Int32Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Int32Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Int32Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Value |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UInt32Value) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UInt32Value: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UInt32Value: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - m.Value = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Value |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BoolValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BoolValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BoolValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StringValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StringValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StringValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthWrappers - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthWrappers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BytesValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BytesValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BytesValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowWrappers - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthWrappers - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthWrappers - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) - if m.Value == nil { - m.Value = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipWrappers(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthWrappers - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipWrappers(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWrappers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWrappers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowWrappers - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthWrappers - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupWrappers - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthWrappers - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthWrappers = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowWrappers = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupWrappers = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go b/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go deleted file mode 100644 index d905df3605..0000000000 --- a/vendor/github.com/gogo/protobuf/types/wrappers_gogo.go +++ /dev/null @@ -1,300 +0,0 @@ -// Protocol Buffers for Go with Gadgets -// -// Copyright (c) 2018, The GoGo Authors. All rights reserved. -// http://github.com/gogo/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. -// -// 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 types - -func NewPopulatedStdDouble(r randyWrappers, easy bool) *float64 { - v := NewPopulatedDoubleValue(r, easy) - return &v.Value -} - -func SizeOfStdDouble(v float64) int { - pv := &DoubleValue{Value: v} - return pv.Size() -} - -func StdDoubleMarshal(v float64) ([]byte, error) { - size := SizeOfStdDouble(v) - buf := make([]byte, size) - _, err := StdDoubleMarshalTo(v, buf) - return buf, err -} - -func StdDoubleMarshalTo(v float64, data []byte) (int, error) { - pv := &DoubleValue{Value: v} - return pv.MarshalTo(data) -} - -func StdDoubleUnmarshal(v *float64, data []byte) error { - pv := &DoubleValue{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdFloat(r randyWrappers, easy bool) *float32 { - v := NewPopulatedFloatValue(r, easy) - return &v.Value -} - -func SizeOfStdFloat(v float32) int { - pv := &FloatValue{Value: v} - return pv.Size() -} - -func StdFloatMarshal(v float32) ([]byte, error) { - size := SizeOfStdFloat(v) - buf := make([]byte, size) - _, err := StdFloatMarshalTo(v, buf) - return buf, err -} - -func StdFloatMarshalTo(v float32, data []byte) (int, error) { - pv := &FloatValue{Value: v} - return pv.MarshalTo(data) -} - -func StdFloatUnmarshal(v *float32, data []byte) error { - pv := &FloatValue{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdInt64(r randyWrappers, easy bool) *int64 { - v := NewPopulatedInt64Value(r, easy) - return &v.Value -} - -func SizeOfStdInt64(v int64) int { - pv := &Int64Value{Value: v} - return pv.Size() -} - -func StdInt64Marshal(v int64) ([]byte, error) { - size := SizeOfStdInt64(v) - buf := make([]byte, size) - _, err := StdInt64MarshalTo(v, buf) - return buf, err -} - -func StdInt64MarshalTo(v int64, data []byte) (int, error) { - pv := &Int64Value{Value: v} - return pv.MarshalTo(data) -} - -func StdInt64Unmarshal(v *int64, data []byte) error { - pv := &Int64Value{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdUInt64(r randyWrappers, easy bool) *uint64 { - v := NewPopulatedUInt64Value(r, easy) - return &v.Value -} - -func SizeOfStdUInt64(v uint64) int { - pv := &UInt64Value{Value: v} - return pv.Size() -} - -func StdUInt64Marshal(v uint64) ([]byte, error) { - size := SizeOfStdUInt64(v) - buf := make([]byte, size) - _, err := StdUInt64MarshalTo(v, buf) - return buf, err -} - -func StdUInt64MarshalTo(v uint64, data []byte) (int, error) { - pv := &UInt64Value{Value: v} - return pv.MarshalTo(data) -} - -func StdUInt64Unmarshal(v *uint64, data []byte) error { - pv := &UInt64Value{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdInt32(r randyWrappers, easy bool) *int32 { - v := NewPopulatedInt32Value(r, easy) - return &v.Value -} - -func SizeOfStdInt32(v int32) int { - pv := &Int32Value{Value: v} - return pv.Size() -} - -func StdInt32Marshal(v int32) ([]byte, error) { - size := SizeOfStdInt32(v) - buf := make([]byte, size) - _, err := StdInt32MarshalTo(v, buf) - return buf, err -} - -func StdInt32MarshalTo(v int32, data []byte) (int, error) { - pv := &Int32Value{Value: v} - return pv.MarshalTo(data) -} - -func StdInt32Unmarshal(v *int32, data []byte) error { - pv := &Int32Value{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdUInt32(r randyWrappers, easy bool) *uint32 { - v := NewPopulatedUInt32Value(r, easy) - return &v.Value -} - -func SizeOfStdUInt32(v uint32) int { - pv := &UInt32Value{Value: v} - return pv.Size() -} - -func StdUInt32Marshal(v uint32) ([]byte, error) { - size := SizeOfStdUInt32(v) - buf := make([]byte, size) - _, err := StdUInt32MarshalTo(v, buf) - return buf, err -} - -func StdUInt32MarshalTo(v uint32, data []byte) (int, error) { - pv := &UInt32Value{Value: v} - return pv.MarshalTo(data) -} - -func StdUInt32Unmarshal(v *uint32, data []byte) error { - pv := &UInt32Value{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdBool(r randyWrappers, easy bool) *bool { - v := NewPopulatedBoolValue(r, easy) - return &v.Value -} - -func SizeOfStdBool(v bool) int { - pv := &BoolValue{Value: v} - return pv.Size() -} - -func StdBoolMarshal(v bool) ([]byte, error) { - size := SizeOfStdBool(v) - buf := make([]byte, size) - _, err := StdBoolMarshalTo(v, buf) - return buf, err -} - -func StdBoolMarshalTo(v bool, data []byte) (int, error) { - pv := &BoolValue{Value: v} - return pv.MarshalTo(data) -} - -func StdBoolUnmarshal(v *bool, data []byte) error { - pv := &BoolValue{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdString(r randyWrappers, easy bool) *string { - v := NewPopulatedStringValue(r, easy) - return &v.Value -} - -func SizeOfStdString(v string) int { - pv := &StringValue{Value: v} - return pv.Size() -} - -func StdStringMarshal(v string) ([]byte, error) { - size := SizeOfStdString(v) - buf := make([]byte, size) - _, err := StdStringMarshalTo(v, buf) - return buf, err -} - -func StdStringMarshalTo(v string, data []byte) (int, error) { - pv := &StringValue{Value: v} - return pv.MarshalTo(data) -} - -func StdStringUnmarshal(v *string, data []byte) error { - pv := &StringValue{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} -func NewPopulatedStdBytes(r randyWrappers, easy bool) *[]byte { - v := NewPopulatedBytesValue(r, easy) - return &v.Value -} - -func SizeOfStdBytes(v []byte) int { - pv := &BytesValue{Value: v} - return pv.Size() -} - -func StdBytesMarshal(v []byte) ([]byte, error) { - size := SizeOfStdBytes(v) - buf := make([]byte, size) - _, err := StdBytesMarshalTo(v, buf) - return buf, err -} - -func StdBytesMarshalTo(v []byte, data []byte) (int, error) { - pv := &BytesValue{Value: v} - return pv.MarshalTo(data) -} - -func StdBytesUnmarshal(v *[]byte, data []byte) error { - pv := &BytesValue{} - if err := pv.Unmarshal(data); err != nil { - return err - } - *v = pv.Value - return nil -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/.gitignore b/vendor/github.com/golang-jwt/jwt/v4/.gitignore deleted file mode 100644 index 09573e0169..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -bin -.idea/ - diff --git a/vendor/github.com/golang-jwt/jwt/v4/LICENSE b/vendor/github.com/golang-jwt/jwt/v4/LICENSE deleted file mode 100644 index 35dbc25204..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -Copyright (c) 2012 Dave Grijalva -Copyright (c) 2021 golang-jwt maintainers - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md b/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md deleted file mode 100644 index 32966f5981..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/MIGRATION_GUIDE.md +++ /dev/null @@ -1,22 +0,0 @@ -## Migration Guide (v4.0.0) - -Starting from [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0), the import path will be: - - "github.com/golang-jwt/jwt/v4" - -The `/v4` version will be backwards compatible with existing `v3.x.y` tags in this repo, as well as -`github.com/dgrijalva/jwt-go`. For most users this should be a drop-in replacement, if you're having -troubles migrating, please open an issue. - -You can replace all occurrences of `github.com/dgrijalva/jwt-go` or `github.com/golang-jwt/jwt` with `github.com/golang-jwt/jwt/v4`, either manually or by using tools such as `sed` or `gofmt`. - -And then you'd typically run: - -``` -go get github.com/golang-jwt/jwt/v4 -go mod tidy -``` - -## Older releases (before v3.2.0) - -The original migration guide for older releases can be found at https://github.com/dgrijalva/jwt-go/blob/master/MIGRATION_GUIDE.md. diff --git a/vendor/github.com/golang-jwt/jwt/v4/README.md b/vendor/github.com/golang-jwt/jwt/v4/README.md deleted file mode 100644 index 30f2f2a6f7..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# jwt-go - -[![build](https://github.com/golang-jwt/jwt/actions/workflows/build.yml/badge.svg)](https://github.com/golang-jwt/jwt/actions/workflows/build.yml) -[![Go Reference](https://pkg.go.dev/badge/github.com/golang-jwt/jwt/v4.svg)](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) - -A [go](http://www.golang.org) (or 'golang' for search engine friendliness) implementation of [JSON Web Tokens](https://datatracker.ietf.org/doc/html/rfc7519). - -Starting with [v4.0.0](https://github.com/golang-jwt/jwt/releases/tag/v4.0.0) this project adds Go module support, but maintains backwards compatibility with older `v3.x.y` tags and upstream `github.com/dgrijalva/jwt-go`. -See the [`MIGRATION_GUIDE.md`](./MIGRATION_GUIDE.md) for more information. - -> After the original author of the library suggested migrating the maintenance of `jwt-go`, a dedicated team of open source maintainers decided to clone the existing library into this repository. See [dgrijalva/jwt-go#462](https://github.com/dgrijalva/jwt-go/issues/462) for a detailed discussion on this topic. - - -**SECURITY NOTICE:** Some older versions of Go have a security issue in the crypto/elliptic. Recommendation is to upgrade to at least 1.15 See issue [dgrijalva/jwt-go#216](https://github.com/dgrijalva/jwt-go/issues/216) for more detail. - -**SECURITY NOTICE:** It's important that you [validate the `alg` presented is what you expect](https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/). This library attempts to make it easy to do the right thing by requiring key types match the expected alg, but you should take the extra step to verify it in your usage. See the examples provided. - -### Supported Go versions - -Our support of Go versions is aligned with Go's [version release policy](https://golang.org/doc/devel/release#policy). -So we will support a major version of Go until there are two newer major releases. -We no longer support building jwt-go with unsupported Go versions, as these contain security vulnerabilities -which will not be fixed. - -## What the heck is a JWT? - -JWT.io has [a great introduction](https://jwt.io/introduction) to JSON Web Tokens. - -In short, it's a signed JSON object that does something useful (for example, authentication). It's commonly used for `Bearer` tokens in Oauth 2. A token is made of three parts, separated by `.`'s. The first two parts are JSON objects, that have been [base64url](https://datatracker.ietf.org/doc/html/rfc4648) encoded. The last part is the signature, encoded the same way. - -The first part is called the header. It contains the necessary information for verifying the last part, the signature. For example, which encryption method was used for signing and what key was used. - -The part in the middle is the interesting bit. It's called the Claims and contains the actual stuff you care about. Refer to [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) for information about reserved keys and the proper way to add your own. - -## What's in the box? - -This library supports the parsing and verification as well as the generation and signing of JWTs. Current supported signing algorithms are HMAC SHA, RSA, RSA-PSS, and ECDSA, though hooks are present for adding your own. - -## Installation Guidelines - -1. To install the jwt package, you first need to have [Go](https://go.dev/doc/install) installed, then you can use the command below to add `jwt-go` as a dependency in your Go program. - -```sh -go get -u github.com/golang-jwt/jwt/v4 -``` - -2. Import it in your code: - -```go -import "github.com/golang-jwt/jwt/v4" -``` - -## Examples - -See [the project documentation](https://pkg.go.dev/github.com/golang-jwt/jwt/v4) for examples of usage: - -* [Simple example of parsing and validating a token](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#example-Parse-Hmac) -* [Simple example of building and signing a token](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#example-New-Hmac) -* [Directory of Examples](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#pkg-examples) - -## Extensions - -This library publishes all the necessary components for adding your own signing methods or key functions. Simply implement the `SigningMethod` interface and register a factory method using `RegisterSigningMethod` or provide a `jwt.Keyfunc`. - -A common use case would be integrating with different 3rd party signature providers, like key management services from various cloud providers or Hardware Security Modules (HSMs) or to implement additional standards. - -| Extension | Purpose | Repo | -| --------- | -------------------------------------------------------------------------------------------------------- | ------------------------------------------ | -| GCP | Integrates with multiple Google Cloud Platform signing tools (AppEngine, IAM API, Cloud KMS) | https://github.com/someone1/gcp-jwt-go | -| AWS | Integrates with AWS Key Management Service, KMS | https://github.com/matelang/jwt-go-aws-kms | -| JWKS | Provides support for JWKS ([RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517)) as a `jwt.Keyfunc` | https://github.com/MicahParks/keyfunc | - -*Disclaimer*: Unless otherwise specified, these integrations are maintained by third parties and should not be considered as a primary offer by any of the mentioned cloud providers - -## Compliance - -This library was last reviewed to comply with [RFC 7519](https://datatracker.ietf.org/doc/html/rfc7519) dated May 2015 with a few notable differences: - -* In order to protect against accidental use of [Unsecured JWTs](https://datatracker.ietf.org/doc/html/rfc7519#section-6), tokens using `alg=none` will only be accepted if the constant `jwt.UnsafeAllowNoneSignatureType` is provided as the key. - -## Project Status & Versioning - -This library is considered production ready. Feedback and feature requests are appreciated. The API should be considered stable. There should be very few backwards-incompatible changes outside of major version updates (and only with good reason). - -This project uses [Semantic Versioning 2.0.0](http://semver.org). Accepted pull requests will land on `main`. Periodically, versions will be tagged from `main`. You can find all the releases on [the project releases page](https://github.com/golang-jwt/jwt/releases). - -**BREAKING CHANGES:*** -A full list of breaking changes is available in `VERSION_HISTORY.md`. See `MIGRATION_GUIDE.md` for more information on updating your code. - -## Usage Tips - -### Signing vs Encryption - -A token is simply a JSON object that is signed by its author. this tells you exactly two things about the data: - -* The author of the token was in the possession of the signing secret -* The data has not been modified since it was signed - -It's important to know that JWT does not provide encryption, which means anyone who has access to the token can read its contents. If you need to protect (encrypt) the data, there is a companion spec, `JWE`, that provides this functionality. The companion project https://github.com/golang-jwt/jwe aims at a (very) experimental implementation of the JWE standard. - -### Choosing a Signing Method - -There are several signing methods available, and you should probably take the time to learn about the various options before choosing one. The principal design decision is most likely going to be symmetric vs asymmetric. - -Symmetric signing methods, such as HSA, use only a single secret. This is probably the simplest signing method to use since any `[]byte` can be used as a valid secret. They are also slightly computationally faster to use, though this rarely is enough to matter. Symmetric signing methods work the best when both producers and consumers of tokens are trusted, or even the same system. Since the same secret is used to both sign and validate tokens, you can't easily distribute the key for validation. - -Asymmetric signing methods, such as RSA, use different keys for signing and verifying tokens. This makes it possible to produce tokens with a private key, and allow any consumer to access the public key for verification. - -### Signing Methods and Key Types - -Each signing method expects a different object type for its signing keys. See the package documentation for details. Here are the most common ones: - -* The [HMAC signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodHMAC) (`HS256`,`HS384`,`HS512`) expect `[]byte` values for signing and validation -* The [RSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodRSA) (`RS256`,`RS384`,`RS512`) expect `*rsa.PrivateKey` for signing and `*rsa.PublicKey` for validation -* The [ECDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodECDSA) (`ES256`,`ES384`,`ES512`) expect `*ecdsa.PrivateKey` for signing and `*ecdsa.PublicKey` for validation -* The [EdDSA signing method](https://pkg.go.dev/github.com/golang-jwt/jwt/v4#SigningMethodEd25519) (`Ed25519`) expect `ed25519.PrivateKey` for signing and `ed25519.PublicKey` for validation - -### JWT and OAuth - -It's worth mentioning that OAuth and JWT are not the same thing. A JWT token is simply a signed JSON object. It can be used anywhere such a thing is useful. There is some confusion, though, as JWT is the most common type of bearer token used in OAuth2 authentication. - -Without going too far down the rabbit hole, here's a description of the interaction of these technologies: - -* OAuth is a protocol for allowing an identity provider to be separate from the service a user is logging in to. For example, whenever you use Facebook to log into a different service (Yelp, Spotify, etc), you are using OAuth. -* OAuth defines several options for passing around authentication data. One popular method is called a "bearer token". A bearer token is simply a string that _should_ only be held by an authenticated user. Thus, simply presenting this token proves your identity. You can probably derive from here why a JWT might make a good bearer token. -* Because bearer tokens are used for authentication, it's important they're kept secret. This is why transactions that use bearer tokens typically happen over SSL. - -### Troubleshooting - -This library uses descriptive error messages whenever possible. If you are not getting the expected result, have a look at the errors. The most common place people get stuck is providing the correct type of key to the parser. See the above section on signing methods and key types. - -## More - -Documentation can be found [on pkg.go.dev](https://pkg.go.dev/github.com/golang-jwt/jwt/v4). - -The command line utility included in this project (cmd/jwt) provides a straightforward example of token creation and parsing as well as a useful tool for debugging your own integration. You'll also find several implementation examples in the documentation. - -[golang-jwt](https://github.com/orgs/golang-jwt) incorporates a modified version of the JWT logo, which is distributed under the terms of the [MIT License](https://github.com/jsonwebtoken/jsonwebtoken.github.io/blob/master/LICENSE.txt). diff --git a/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md b/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md deleted file mode 100644 index b08402c342..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/SECURITY.md +++ /dev/null @@ -1,19 +0,0 @@ -# Security Policy - -## Supported Versions - -As of February 2022 (and until this document is updated), the latest version `v4` is supported. - -## Reporting a Vulnerability - -If you think you found a vulnerability, and even if you are not sure, please report it to jwt-go-security@googlegroups.com or one of the other [golang-jwt maintainers](https://github.com/orgs/golang-jwt/people). Please try be explicit, describe steps to reproduce the security issue with code example(s). - -You will receive a response within a timely manner. If the issue is confirmed, we will do our best to release a patch as soon as possible given the complexity of the problem. - -## Public Discussions - -Please avoid publicly discussing a potential security vulnerability. - -Let's take this offline and find a solution first, this limits the potential impact as much as possible. - -We appreciate your help! diff --git a/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md b/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md deleted file mode 100644 index afbfc4e408..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/VERSION_HISTORY.md +++ /dev/null @@ -1,135 +0,0 @@ -## `jwt-go` Version History - -#### 4.0.0 - -* Introduces support for Go modules. The `v4` version will be backwards compatible with `v3.x.y`. - -#### 3.2.2 - -* Starting from this release, we are adopting the policy to support the most 2 recent versions of Go currently available. By the time of this release, this is Go 1.15 and 1.16 ([#28](https://github.com/golang-jwt/jwt/pull/28)). -* Fixed a potential issue that could occur when the verification of `exp`, `iat` or `nbf` was not required and contained invalid contents, i.e. non-numeric/date. Thanks for @thaJeztah for making us aware of that and @giorgos-f3 for originally reporting it to the formtech fork ([#40](https://github.com/golang-jwt/jwt/pull/40)). -* Added support for EdDSA / ED25519 ([#36](https://github.com/golang-jwt/jwt/pull/36)). -* Optimized allocations ([#33](https://github.com/golang-jwt/jwt/pull/33)). - -#### 3.2.1 - -* **Import Path Change**: See MIGRATION_GUIDE.md for tips on updating your code - * Changed the import path from `github.com/dgrijalva/jwt-go` to `github.com/golang-jwt/jwt` -* Fixed type confusing issue between `string` and `[]string` in `VerifyAudience` ([#12](https://github.com/golang-jwt/jwt/pull/12)). This fixes CVE-2020-26160 - -#### 3.2.0 - -* Added method `ParseUnverified` to allow users to split up the tasks of parsing and validation -* HMAC signing method returns `ErrInvalidKeyType` instead of `ErrInvalidKey` where appropriate -* Added options to `request.ParseFromRequest`, which allows for an arbitrary list of modifiers to parsing behavior. Initial set include `WithClaims` and `WithParser`. Existing usage of this function will continue to work as before. -* Deprecated `ParseFromRequestWithClaims` to simplify API in the future. - -#### 3.1.0 - -* Improvements to `jwt` command line tool -* Added `SkipClaimsValidation` option to `Parser` -* Documentation updates - -#### 3.0.0 - -* **Compatibility Breaking Changes**: See MIGRATION_GUIDE.md for tips on updating your code - * Dropped support for `[]byte` keys when using RSA signing methods. This convenience feature could contribute to security vulnerabilities involving mismatched key types with signing methods. - * `ParseFromRequest` has been moved to `request` subpackage and usage has changed - * The `Claims` property on `Token` is now type `Claims` instead of `map[string]interface{}`. The default value is type `MapClaims`, which is an alias to `map[string]interface{}`. This makes it possible to use a custom type when decoding claims. -* Other Additions and Changes - * Added `Claims` interface type to allow users to decode the claims into a custom type - * Added `ParseWithClaims`, which takes a third argument of type `Claims`. Use this function instead of `Parse` if you have a custom type you'd like to decode into. - * Dramatically improved the functionality and flexibility of `ParseFromRequest`, which is now in the `request` subpackage - * Added `ParseFromRequestWithClaims` which is the `FromRequest` equivalent of `ParseWithClaims` - * Added new interface type `Extractor`, which is used for extracting JWT strings from http requests. Used with `ParseFromRequest` and `ParseFromRequestWithClaims`. - * Added several new, more specific, validation errors to error type bitmask - * Moved examples from README to executable example files - * Signing method registry is now thread safe - * Added new property to `ValidationError`, which contains the raw error returned by calls made by parse/verify (such as those returned by keyfunc or json parser) - -#### 2.7.0 - -This will likely be the last backwards compatible release before 3.0.0, excluding essential bug fixes. - -* Added new option `-show` to the `jwt` command that will just output the decoded token without verifying -* Error text for expired tokens includes how long it's been expired -* Fixed incorrect error returned from `ParseRSAPublicKeyFromPEM` -* Documentation updates - -#### 2.6.0 - -* Exposed inner error within ValidationError -* Fixed validation errors when using UseJSONNumber flag -* Added several unit tests - -#### 2.5.0 - -* Added support for signing method none. You shouldn't use this. The API tries to make this clear. -* Updated/fixed some documentation -* Added more helpful error message when trying to parse tokens that begin with `BEARER ` - -#### 2.4.0 - -* Added new type, Parser, to allow for configuration of various parsing parameters - * You can now specify a list of valid signing methods. Anything outside this set will be rejected. - * You can now opt to use the `json.Number` type instead of `float64` when parsing token JSON -* Added support for [Travis CI](https://travis-ci.org/dgrijalva/jwt-go) -* Fixed some bugs with ECDSA parsing - -#### 2.3.0 - -* Added support for ECDSA signing methods -* Added support for RSA PSS signing methods (requires go v1.4) - -#### 2.2.0 - -* Gracefully handle a `nil` `Keyfunc` being passed to `Parse`. Result will now be the parsed token and an error, instead of a panic. - -#### 2.1.0 - -Backwards compatible API change that was missed in 2.0.0. - -* The `SignedString` method on `Token` now takes `interface{}` instead of `[]byte` - -#### 2.0.0 - -There were two major reasons for breaking backwards compatibility with this update. The first was a refactor required to expand the width of the RSA and HMAC-SHA signing implementations. There will likely be no required code changes to support this change. - -The second update, while unfortunately requiring a small change in integration, is required to open up this library to other signing methods. Not all keys used for all signing methods have a single standard on-disk representation. Requiring `[]byte` as the type for all keys proved too limiting. Additionally, this implementation allows for pre-parsed tokens to be reused, which might matter in an application that parses a high volume of tokens with a small set of keys. Backwards compatibilty has been maintained for passing `[]byte` to the RSA signing methods, but they will also accept `*rsa.PublicKey` and `*rsa.PrivateKey`. - -It is likely the only integration change required here will be to change `func(t *jwt.Token) ([]byte, error)` to `func(t *jwt.Token) (interface{}, error)` when calling `Parse`. - -* **Compatibility Breaking Changes** - * `SigningMethodHS256` is now `*SigningMethodHMAC` instead of `type struct` - * `SigningMethodRS256` is now `*SigningMethodRSA` instead of `type struct` - * `KeyFunc` now returns `interface{}` instead of `[]byte` - * `SigningMethod.Sign` now takes `interface{}` instead of `[]byte` for the key - * `SigningMethod.Verify` now takes `interface{}` instead of `[]byte` for the key -* Renamed type `SigningMethodHS256` to `SigningMethodHMAC`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodHS256` - * Added public package global `SigningMethodHS384` - * Added public package global `SigningMethodHS512` -* Renamed type `SigningMethodRS256` to `SigningMethodRSA`. Specific sizes are now just instances of this type. - * Added public package global `SigningMethodRS256` - * Added public package global `SigningMethodRS384` - * Added public package global `SigningMethodRS512` -* Moved sample private key for HMAC tests from an inline value to a file on disk. Value is unchanged. -* Refactored the RSA implementation to be easier to read -* Exposed helper methods `ParseRSAPrivateKeyFromPEM` and `ParseRSAPublicKeyFromPEM` - -#### 1.0.2 - -* Fixed bug in parsing public keys from certificates -* Added more tests around the parsing of keys for RS256 -* Code refactoring in RS256 implementation. No functional changes - -#### 1.0.1 - -* Fixed panic if RS256 signing method was passed an invalid key - -#### 1.0.0 - -* First versioned release -* API stabilized -* Supports creating, signing, parsing, and validating JWT tokens -* Supports RS256 and HS256 signing methods diff --git a/vendor/github.com/golang-jwt/jwt/v4/claims.go b/vendor/github.com/golang-jwt/jwt/v4/claims.go deleted file mode 100644 index 364cec8773..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/claims.go +++ /dev/null @@ -1,269 +0,0 @@ -package jwt - -import ( - "crypto/subtle" - "fmt" - "time" -) - -// Claims must just have a Valid method that determines -// if the token is invalid for any supported reason -type Claims interface { - Valid() error -} - -// RegisteredClaims are a structured version of the JWT Claims Set, -// restricted to Registered Claim Names, as referenced at -// https://datatracker.ietf.org/doc/html/rfc7519#section-4.1 -// -// This type can be used on its own, but then additional private and -// public claims embedded in the JWT will not be parsed. The typical usecase -// therefore is to embedded this in a user-defined claim type. -// -// See examples for how to use this with your own claim types. -type RegisteredClaims struct { - // the `iss` (Issuer) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1 - Issuer string `json:"iss,omitempty"` - - // the `sub` (Subject) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2 - Subject string `json:"sub,omitempty"` - - // the `aud` (Audience) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3 - Audience ClaimStrings `json:"aud,omitempty"` - - // the `exp` (Expiration Time) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4 - ExpiresAt *NumericDate `json:"exp,omitempty"` - - // the `nbf` (Not Before) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5 - NotBefore *NumericDate `json:"nbf,omitempty"` - - // the `iat` (Issued At) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6 - IssuedAt *NumericDate `json:"iat,omitempty"` - - // the `jti` (JWT ID) claim. See https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7 - ID string `json:"jti,omitempty"` -} - -// Valid validates time based claims "exp, iat, nbf". -// There is no accounting for clock skew. -// As well, if any of the above claims are not in the token, it will still -// be considered a valid claim. -func (c RegisteredClaims) Valid() error { - vErr := new(ValidationError) - now := TimeFunc() - - // The claims below are optional, by default, so if they are set to the - // default value in Go, let's not fail the verification for them. - if !c.VerifyExpiresAt(now, false) { - delta := now.Sub(c.ExpiresAt.Time) - vErr.Inner = fmt.Errorf("%s by %s", ErrTokenExpired, delta) - vErr.Errors |= ValidationErrorExpired - } - - if !c.VerifyIssuedAt(now, false) { - vErr.Inner = ErrTokenUsedBeforeIssued - vErr.Errors |= ValidationErrorIssuedAt - } - - if !c.VerifyNotBefore(now, false) { - vErr.Inner = ErrTokenNotValidYet - vErr.Errors |= ValidationErrorNotValidYet - } - - if vErr.valid() { - return nil - } - - return vErr -} - -// VerifyAudience compares the aud claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *RegisteredClaims) VerifyAudience(cmp string, req bool) bool { - return verifyAud(c.Audience, cmp, req) -} - -// VerifyExpiresAt compares the exp claim against cmp (cmp < exp). -// If req is false, it will return true, if exp is unset. -func (c *RegisteredClaims) VerifyExpiresAt(cmp time.Time, req bool) bool { - if c.ExpiresAt == nil { - return verifyExp(nil, cmp, req) - } - - return verifyExp(&c.ExpiresAt.Time, cmp, req) -} - -// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat). -// If req is false, it will return true, if iat is unset. -func (c *RegisteredClaims) VerifyIssuedAt(cmp time.Time, req bool) bool { - if c.IssuedAt == nil { - return verifyIat(nil, cmp, req) - } - - return verifyIat(&c.IssuedAt.Time, cmp, req) -} - -// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). -// If req is false, it will return true, if nbf is unset. -func (c *RegisteredClaims) VerifyNotBefore(cmp time.Time, req bool) bool { - if c.NotBefore == nil { - return verifyNbf(nil, cmp, req) - } - - return verifyNbf(&c.NotBefore.Time, cmp, req) -} - -// VerifyIssuer compares the iss claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *RegisteredClaims) VerifyIssuer(cmp string, req bool) bool { - return verifyIss(c.Issuer, cmp, req) -} - -// StandardClaims are a structured version of the JWT Claims Set, as referenced at -// https://datatracker.ietf.org/doc/html/rfc7519#section-4. They do not follow the -// specification exactly, since they were based on an earlier draft of the -// specification and not updated. The main difference is that they only -// support integer-based date fields and singular audiences. This might lead to -// incompatibilities with other JWT implementations. The use of this is discouraged, instead -// the newer RegisteredClaims struct should be used. -// -// Deprecated: Use RegisteredClaims instead for a forward-compatible way to access registered claims in a struct. -type StandardClaims struct { - Audience string `json:"aud,omitempty"` - ExpiresAt int64 `json:"exp,omitempty"` - Id string `json:"jti,omitempty"` - IssuedAt int64 `json:"iat,omitempty"` - Issuer string `json:"iss,omitempty"` - NotBefore int64 `json:"nbf,omitempty"` - Subject string `json:"sub,omitempty"` -} - -// Valid validates time based claims "exp, iat, nbf". There is no accounting for clock skew. -// As well, if any of the above claims are not in the token, it will still -// be considered a valid claim. -func (c StandardClaims) Valid() error { - vErr := new(ValidationError) - now := TimeFunc().Unix() - - // The claims below are optional, by default, so if they are set to the - // default value in Go, let's not fail the verification for them. - if !c.VerifyExpiresAt(now, false) { - delta := time.Unix(now, 0).Sub(time.Unix(c.ExpiresAt, 0)) - vErr.Inner = fmt.Errorf("%s by %s", ErrTokenExpired, delta) - vErr.Errors |= ValidationErrorExpired - } - - if !c.VerifyIssuedAt(now, false) { - vErr.Inner = ErrTokenUsedBeforeIssued - vErr.Errors |= ValidationErrorIssuedAt - } - - if !c.VerifyNotBefore(now, false) { - vErr.Inner = ErrTokenNotValidYet - vErr.Errors |= ValidationErrorNotValidYet - } - - if vErr.valid() { - return nil - } - - return vErr -} - -// VerifyAudience compares the aud claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyAudience(cmp string, req bool) bool { - return verifyAud([]string{c.Audience}, cmp, req) -} - -// VerifyExpiresAt compares the exp claim against cmp (cmp < exp). -// If req is false, it will return true, if exp is unset. -func (c *StandardClaims) VerifyExpiresAt(cmp int64, req bool) bool { - if c.ExpiresAt == 0 { - return verifyExp(nil, time.Unix(cmp, 0), req) - } - - t := time.Unix(c.ExpiresAt, 0) - return verifyExp(&t, time.Unix(cmp, 0), req) -} - -// VerifyIssuedAt compares the iat claim against cmp (cmp >= iat). -// If req is false, it will return true, if iat is unset. -func (c *StandardClaims) VerifyIssuedAt(cmp int64, req bool) bool { - if c.IssuedAt == 0 { - return verifyIat(nil, time.Unix(cmp, 0), req) - } - - t := time.Unix(c.IssuedAt, 0) - return verifyIat(&t, time.Unix(cmp, 0), req) -} - -// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). -// If req is false, it will return true, if nbf is unset. -func (c *StandardClaims) VerifyNotBefore(cmp int64, req bool) bool { - if c.NotBefore == 0 { - return verifyNbf(nil, time.Unix(cmp, 0), req) - } - - t := time.Unix(c.NotBefore, 0) - return verifyNbf(&t, time.Unix(cmp, 0), req) -} - -// VerifyIssuer compares the iss claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (c *StandardClaims) VerifyIssuer(cmp string, req bool) bool { - return verifyIss(c.Issuer, cmp, req) -} - -// ----- helpers - -func verifyAud(aud []string, cmp string, required bool) bool { - if len(aud) == 0 { - return !required - } - // use a var here to keep constant time compare when looping over a number of claims - result := false - - var stringClaims string - for _, a := range aud { - if subtle.ConstantTimeCompare([]byte(a), []byte(cmp)) != 0 { - result = true - } - stringClaims = stringClaims + a - } - - // case where "" is sent in one or many aud claims - if len(stringClaims) == 0 { - return !required - } - - return result -} - -func verifyExp(exp *time.Time, now time.Time, required bool) bool { - if exp == nil { - return !required - } - return now.Before(*exp) -} - -func verifyIat(iat *time.Time, now time.Time, required bool) bool { - if iat == nil { - return !required - } - return now.After(*iat) || now.Equal(*iat) -} - -func verifyNbf(nbf *time.Time, now time.Time, required bool) bool { - if nbf == nil { - return !required - } - return now.After(*nbf) || now.Equal(*nbf) -} - -func verifyIss(iss string, cmp string, required bool) bool { - if iss == "" { - return !required - } - return subtle.ConstantTimeCompare([]byte(iss), []byte(cmp)) != 0 -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/doc.go b/vendor/github.com/golang-jwt/jwt/v4/doc.go deleted file mode 100644 index a86dc1a3b3..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html -// -// See README.md for more info. -package jwt diff --git a/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go b/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go deleted file mode 100644 index eac023fc6c..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/ecdsa.go +++ /dev/null @@ -1,142 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/ecdsa" - "crypto/rand" - "errors" - "math/big" -) - -var ( - // Sadly this is missing from crypto/ecdsa compared to crypto/rsa - ErrECDSAVerification = errors.New("crypto/ecdsa: verification error") -) - -// SigningMethodECDSA implements the ECDSA family of signing methods. -// Expects *ecdsa.PrivateKey for signing and *ecdsa.PublicKey for verification -type SigningMethodECDSA struct { - Name string - Hash crypto.Hash - KeySize int - CurveBits int -} - -// Specific instances for EC256 and company -var ( - SigningMethodES256 *SigningMethodECDSA - SigningMethodES384 *SigningMethodECDSA - SigningMethodES512 *SigningMethodECDSA -) - -func init() { - // ES256 - SigningMethodES256 = &SigningMethodECDSA{"ES256", crypto.SHA256, 32, 256} - RegisterSigningMethod(SigningMethodES256.Alg(), func() SigningMethod { - return SigningMethodES256 - }) - - // ES384 - SigningMethodES384 = &SigningMethodECDSA{"ES384", crypto.SHA384, 48, 384} - RegisterSigningMethod(SigningMethodES384.Alg(), func() SigningMethod { - return SigningMethodES384 - }) - - // ES512 - SigningMethodES512 = &SigningMethodECDSA{"ES512", crypto.SHA512, 66, 521} - RegisterSigningMethod(SigningMethodES512.Alg(), func() SigningMethod { - return SigningMethodES512 - }) -} - -func (m *SigningMethodECDSA) Alg() string { - return m.Name -} - -// Verify implements token verification for the SigningMethod. -// For this verify method, key must be an ecdsa.PublicKey struct -func (m *SigningMethodECDSA) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - // Get the key - var ecdsaKey *ecdsa.PublicKey - switch k := key.(type) { - case *ecdsa.PublicKey: - ecdsaKey = k - default: - return ErrInvalidKeyType - } - - if len(sig) != 2*m.KeySize { - return ErrECDSAVerification - } - - r := big.NewInt(0).SetBytes(sig[:m.KeySize]) - s := big.NewInt(0).SetBytes(sig[m.KeySize:]) - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Verify the signature - if verifystatus := ecdsa.Verify(ecdsaKey, hasher.Sum(nil), r, s); verifystatus { - return nil - } - - return ErrECDSAVerification -} - -// Sign implements token signing for the SigningMethod. -// For this signing method, key must be an ecdsa.PrivateKey struct -func (m *SigningMethodECDSA) Sign(signingString string, key interface{}) (string, error) { - // Get the key - var ecdsaKey *ecdsa.PrivateKey - switch k := key.(type) { - case *ecdsa.PrivateKey: - ecdsaKey = k - default: - return "", ErrInvalidKeyType - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return r, s - if r, s, err := ecdsa.Sign(rand.Reader, ecdsaKey, hasher.Sum(nil)); err == nil { - curveBits := ecdsaKey.Curve.Params().BitSize - - if m.CurveBits != curveBits { - return "", ErrInvalidKey - } - - keyBytes := curveBits / 8 - if curveBits%8 > 0 { - keyBytes += 1 - } - - // We serialize the outputs (r and s) into big-endian byte arrays - // padded with zeros on the left to make sure the sizes work out. - // Output must be 2*keyBytes long. - out := make([]byte, 2*keyBytes) - r.FillBytes(out[0:keyBytes]) // r is assigned to the first half of output. - s.FillBytes(out[keyBytes:]) // s is assigned to the second half of output. - - return EncodeSegment(out), nil - } else { - return "", err - } -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go b/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go deleted file mode 100644 index 5700636d35..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/ecdsa_utils.go +++ /dev/null @@ -1,69 +0,0 @@ -package jwt - -import ( - "crypto/ecdsa" - "crypto/x509" - "encoding/pem" - "errors" -) - -var ( - ErrNotECPublicKey = errors.New("key is not a valid ECDSA public key") - ErrNotECPrivateKey = errors.New("key is not a valid ECDSA private key") -) - -// ParseECPrivateKeyFromPEM parses a PEM encoded Elliptic Curve Private Key Structure -func ParseECPrivateKeyFromPEM(key []byte) (*ecdsa.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParseECPrivateKey(block.Bytes); err != nil { - if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { - return nil, err - } - } - - var pkey *ecdsa.PrivateKey - var ok bool - if pkey, ok = parsedKey.(*ecdsa.PrivateKey); !ok { - return nil, ErrNotECPrivateKey - } - - return pkey, nil -} - -// ParseECPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key -func ParseECPublicKeyFromPEM(key []byte) (*ecdsa.PublicKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { - if cert, err := x509.ParseCertificate(block.Bytes); err == nil { - parsedKey = cert.PublicKey - } else { - return nil, err - } - } - - var pkey *ecdsa.PublicKey - var ok bool - if pkey, ok = parsedKey.(*ecdsa.PublicKey); !ok { - return nil, ErrNotECPublicKey - } - - return pkey, nil -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ed25519.go b/vendor/github.com/golang-jwt/jwt/v4/ed25519.go deleted file mode 100644 index 07d3aacd63..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/ed25519.go +++ /dev/null @@ -1,85 +0,0 @@ -package jwt - -import ( - "errors" - - "crypto" - "crypto/ed25519" - "crypto/rand" -) - -var ( - ErrEd25519Verification = errors.New("ed25519: verification error") -) - -// SigningMethodEd25519 implements the EdDSA family. -// Expects ed25519.PrivateKey for signing and ed25519.PublicKey for verification -type SigningMethodEd25519 struct{} - -// Specific instance for EdDSA -var ( - SigningMethodEdDSA *SigningMethodEd25519 -) - -func init() { - SigningMethodEdDSA = &SigningMethodEd25519{} - RegisterSigningMethod(SigningMethodEdDSA.Alg(), func() SigningMethod { - return SigningMethodEdDSA - }) -} - -func (m *SigningMethodEd25519) Alg() string { - return "EdDSA" -} - -// Verify implements token verification for the SigningMethod. -// For this verify method, key must be an ed25519.PublicKey -func (m *SigningMethodEd25519) Verify(signingString, signature string, key interface{}) error { - var err error - var ed25519Key ed25519.PublicKey - var ok bool - - if ed25519Key, ok = key.(ed25519.PublicKey); !ok { - return ErrInvalidKeyType - } - - if len(ed25519Key) != ed25519.PublicKeySize { - return ErrInvalidKey - } - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - // Verify the signature - if !ed25519.Verify(ed25519Key, []byte(signingString), sig) { - return ErrEd25519Verification - } - - return nil -} - -// Sign implements token signing for the SigningMethod. -// For this signing method, key must be an ed25519.PrivateKey -func (m *SigningMethodEd25519) Sign(signingString string, key interface{}) (string, error) { - var ed25519Key crypto.Signer - var ok bool - - if ed25519Key, ok = key.(crypto.Signer); !ok { - return "", ErrInvalidKeyType - } - - if _, ok := ed25519Key.Public().(ed25519.PublicKey); !ok { - return "", ErrInvalidKey - } - - // Sign the string and return the encoded result - // ed25519 performs a two-pass hash as part of its algorithm. Therefore, we need to pass a non-prehashed message into the Sign function, as indicated by crypto.Hash(0) - sig, err := ed25519Key.Sign(rand.Reader, []byte(signingString), crypto.Hash(0)) - if err != nil { - return "", err - } - return EncodeSegment(sig), nil -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go b/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go deleted file mode 100644 index cdb5e68e87..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/ed25519_utils.go +++ /dev/null @@ -1,64 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/ed25519" - "crypto/x509" - "encoding/pem" - "errors" -) - -var ( - ErrNotEdPrivateKey = errors.New("key is not a valid Ed25519 private key") - ErrNotEdPublicKey = errors.New("key is not a valid Ed25519 public key") -) - -// ParseEdPrivateKeyFromPEM parses a PEM-encoded Edwards curve private key -func ParseEdPrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { - return nil, err - } - - var pkey ed25519.PrivateKey - var ok bool - if pkey, ok = parsedKey.(ed25519.PrivateKey); !ok { - return nil, ErrNotEdPrivateKey - } - - return pkey, nil -} - -// ParseEdPublicKeyFromPEM parses a PEM-encoded Edwards curve public key -func ParseEdPublicKeyFromPEM(key []byte) (crypto.PublicKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { - return nil, err - } - - var pkey ed25519.PublicKey - var ok bool - if pkey, ok = parsedKey.(ed25519.PublicKey); !ok { - return nil, ErrNotEdPublicKey - } - - return pkey, nil -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/errors.go b/vendor/github.com/golang-jwt/jwt/v4/errors.go deleted file mode 100644 index 10ac8835cc..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/errors.go +++ /dev/null @@ -1,112 +0,0 @@ -package jwt - -import ( - "errors" -) - -// Error constants -var ( - ErrInvalidKey = errors.New("key is invalid") - ErrInvalidKeyType = errors.New("key is of invalid type") - ErrHashUnavailable = errors.New("the requested hash function is unavailable") - - ErrTokenMalformed = errors.New("token is malformed") - ErrTokenUnverifiable = errors.New("token is unverifiable") - ErrTokenSignatureInvalid = errors.New("token signature is invalid") - - ErrTokenInvalidAudience = errors.New("token has invalid audience") - ErrTokenExpired = errors.New("token is expired") - ErrTokenUsedBeforeIssued = errors.New("token used before issued") - ErrTokenInvalidIssuer = errors.New("token has invalid issuer") - ErrTokenNotValidYet = errors.New("token is not valid yet") - ErrTokenInvalidId = errors.New("token has invalid id") - ErrTokenInvalidClaims = errors.New("token has invalid claims") -) - -// The errors that might occur when parsing and validating a token -const ( - ValidationErrorMalformed uint32 = 1 << iota // Token is malformed - ValidationErrorUnverifiable // Token could not be verified because of signing problems - ValidationErrorSignatureInvalid // Signature validation failed - - // Standard Claim validation errors - ValidationErrorAudience // AUD validation failed - ValidationErrorExpired // EXP validation failed - ValidationErrorIssuedAt // IAT validation failed - ValidationErrorIssuer // ISS validation failed - ValidationErrorNotValidYet // NBF validation failed - ValidationErrorId // JTI validation failed - ValidationErrorClaimsInvalid // Generic claims validation error -) - -// NewValidationError is a helper for constructing a ValidationError with a string error message -func NewValidationError(errorText string, errorFlags uint32) *ValidationError { - return &ValidationError{ - text: errorText, - Errors: errorFlags, - } -} - -// ValidationError represents an error from Parse if token is not valid -type ValidationError struct { - Inner error // stores the error returned by external dependencies, i.e.: KeyFunc - Errors uint32 // bitfield. see ValidationError... constants - text string // errors that do not have a valid error just have text -} - -// Error is the implementation of the err interface. -func (e ValidationError) Error() string { - if e.Inner != nil { - return e.Inner.Error() - } else if e.text != "" { - return e.text - } else { - return "token is invalid" - } -} - -// Unwrap gives errors.Is and errors.As access to the inner error. -func (e *ValidationError) Unwrap() error { - return e.Inner -} - -// No errors -func (e *ValidationError) valid() bool { - return e.Errors == 0 -} - -// Is checks if this ValidationError is of the supplied error. We are first checking for the exact error message -// by comparing the inner error message. If that fails, we compare using the error flags. This way we can use -// custom error messages (mainly for backwards compatability) and still leverage errors.Is using the global error variables. -func (e *ValidationError) Is(err error) bool { - // Check, if our inner error is a direct match - if errors.Is(errors.Unwrap(e), err) { - return true - } - - // Otherwise, we need to match using our error flags - switch err { - case ErrTokenMalformed: - return e.Errors&ValidationErrorMalformed != 0 - case ErrTokenUnverifiable: - return e.Errors&ValidationErrorUnverifiable != 0 - case ErrTokenSignatureInvalid: - return e.Errors&ValidationErrorSignatureInvalid != 0 - case ErrTokenInvalidAudience: - return e.Errors&ValidationErrorAudience != 0 - case ErrTokenExpired: - return e.Errors&ValidationErrorExpired != 0 - case ErrTokenUsedBeforeIssued: - return e.Errors&ValidationErrorIssuedAt != 0 - case ErrTokenInvalidIssuer: - return e.Errors&ValidationErrorIssuer != 0 - case ErrTokenNotValidYet: - return e.Errors&ValidationErrorNotValidYet != 0 - case ErrTokenInvalidId: - return e.Errors&ValidationErrorId != 0 - case ErrTokenInvalidClaims: - return e.Errors&ValidationErrorClaimsInvalid != 0 - } - - return false -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/hmac.go b/vendor/github.com/golang-jwt/jwt/v4/hmac.go deleted file mode 100644 index 011f68a274..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/hmac.go +++ /dev/null @@ -1,95 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/hmac" - "errors" -) - -// SigningMethodHMAC implements the HMAC-SHA family of signing methods. -// Expects key type of []byte for both signing and validation -type SigningMethodHMAC struct { - Name string - Hash crypto.Hash -} - -// Specific instances for HS256 and company -var ( - SigningMethodHS256 *SigningMethodHMAC - SigningMethodHS384 *SigningMethodHMAC - SigningMethodHS512 *SigningMethodHMAC - ErrSignatureInvalid = errors.New("signature is invalid") -) - -func init() { - // HS256 - SigningMethodHS256 = &SigningMethodHMAC{"HS256", crypto.SHA256} - RegisterSigningMethod(SigningMethodHS256.Alg(), func() SigningMethod { - return SigningMethodHS256 - }) - - // HS384 - SigningMethodHS384 = &SigningMethodHMAC{"HS384", crypto.SHA384} - RegisterSigningMethod(SigningMethodHS384.Alg(), func() SigningMethod { - return SigningMethodHS384 - }) - - // HS512 - SigningMethodHS512 = &SigningMethodHMAC{"HS512", crypto.SHA512} - RegisterSigningMethod(SigningMethodHS512.Alg(), func() SigningMethod { - return SigningMethodHS512 - }) -} - -func (m *SigningMethodHMAC) Alg() string { - return m.Name -} - -// Verify implements token verification for the SigningMethod. Returns nil if the signature is valid. -func (m *SigningMethodHMAC) Verify(signingString, signature string, key interface{}) error { - // Verify the key is the right type - keyBytes, ok := key.([]byte) - if !ok { - return ErrInvalidKeyType - } - - // Decode signature, for comparison - sig, err := DecodeSegment(signature) - if err != nil { - return err - } - - // Can we use the specified hashing method? - if !m.Hash.Available() { - return ErrHashUnavailable - } - - // This signing method is symmetric, so we validate the signature - // by reproducing the signature from the signing string and key, then - // comparing that against the provided signature. - hasher := hmac.New(m.Hash.New, keyBytes) - hasher.Write([]byte(signingString)) - if !hmac.Equal(sig, hasher.Sum(nil)) { - return ErrSignatureInvalid - } - - // No validation errors. Signature is good. - return nil -} - -// Sign implements token signing for the SigningMethod. -// Key must be []byte -func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, error) { - if keyBytes, ok := key.([]byte); ok { - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := hmac.New(m.Hash.New, keyBytes) - hasher.Write([]byte(signingString)) - - return EncodeSegment(hasher.Sum(nil)), nil - } - - return "", ErrInvalidKeyType -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/map_claims.go b/vendor/github.com/golang-jwt/jwt/v4/map_claims.go deleted file mode 100644 index 2700d64a0d..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/map_claims.go +++ /dev/null @@ -1,151 +0,0 @@ -package jwt - -import ( - "encoding/json" - "errors" - "time" - // "fmt" -) - -// MapClaims is a claims type that uses the map[string]interface{} for JSON decoding. -// This is the default claims type if you don't supply one -type MapClaims map[string]interface{} - -// VerifyAudience Compares the aud claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyAudience(cmp string, req bool) bool { - var aud []string - switch v := m["aud"].(type) { - case string: - aud = append(aud, v) - case []string: - aud = v - case []interface{}: - for _, a := range v { - vs, ok := a.(string) - if !ok { - return false - } - aud = append(aud, vs) - } - } - return verifyAud(aud, cmp, req) -} - -// VerifyExpiresAt compares the exp claim against cmp (cmp <= exp). -// If req is false, it will return true, if exp is unset. -func (m MapClaims) VerifyExpiresAt(cmp int64, req bool) bool { - cmpTime := time.Unix(cmp, 0) - - v, ok := m["exp"] - if !ok { - return !req - } - - switch exp := v.(type) { - case float64: - if exp == 0 { - return verifyExp(nil, cmpTime, req) - } - - return verifyExp(&newNumericDateFromSeconds(exp).Time, cmpTime, req) - case json.Number: - v, _ := exp.Float64() - - return verifyExp(&newNumericDateFromSeconds(v).Time, cmpTime, req) - } - - return false -} - -// VerifyIssuedAt compares the exp claim against cmp (cmp >= iat). -// If req is false, it will return true, if iat is unset. -func (m MapClaims) VerifyIssuedAt(cmp int64, req bool) bool { - cmpTime := time.Unix(cmp, 0) - - v, ok := m["iat"] - if !ok { - return !req - } - - switch iat := v.(type) { - case float64: - if iat == 0 { - return verifyIat(nil, cmpTime, req) - } - - return verifyIat(&newNumericDateFromSeconds(iat).Time, cmpTime, req) - case json.Number: - v, _ := iat.Float64() - - return verifyIat(&newNumericDateFromSeconds(v).Time, cmpTime, req) - } - - return false -} - -// VerifyNotBefore compares the nbf claim against cmp (cmp >= nbf). -// If req is false, it will return true, if nbf is unset. -func (m MapClaims) VerifyNotBefore(cmp int64, req bool) bool { - cmpTime := time.Unix(cmp, 0) - - v, ok := m["nbf"] - if !ok { - return !req - } - - switch nbf := v.(type) { - case float64: - if nbf == 0 { - return verifyNbf(nil, cmpTime, req) - } - - return verifyNbf(&newNumericDateFromSeconds(nbf).Time, cmpTime, req) - case json.Number: - v, _ := nbf.Float64() - - return verifyNbf(&newNumericDateFromSeconds(v).Time, cmpTime, req) - } - - return false -} - -// VerifyIssuer compares the iss claim against cmp. -// If required is false, this method will return true if the value matches or is unset -func (m MapClaims) VerifyIssuer(cmp string, req bool) bool { - iss, _ := m["iss"].(string) - return verifyIss(iss, cmp, req) -} - -// Valid validates time based claims "exp, iat, nbf". -// There is no accounting for clock skew. -// As well, if any of the above claims are not in the token, it will still -// be considered a valid claim. -func (m MapClaims) Valid() error { - vErr := new(ValidationError) - now := TimeFunc().Unix() - - if !m.VerifyExpiresAt(now, false) { - // TODO(oxisto): this should be replaced with ErrTokenExpired - vErr.Inner = errors.New("Token is expired") - vErr.Errors |= ValidationErrorExpired - } - - if !m.VerifyIssuedAt(now, false) { - // TODO(oxisto): this should be replaced with ErrTokenUsedBeforeIssued - vErr.Inner = errors.New("Token used before issued") - vErr.Errors |= ValidationErrorIssuedAt - } - - if !m.VerifyNotBefore(now, false) { - // TODO(oxisto): this should be replaced with ErrTokenNotValidYet - vErr.Inner = errors.New("Token is not valid yet") - vErr.Errors |= ValidationErrorNotValidYet - } - - if vErr.valid() { - return nil - } - - return vErr -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/none.go b/vendor/github.com/golang-jwt/jwt/v4/none.go deleted file mode 100644 index f19835d207..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/none.go +++ /dev/null @@ -1,52 +0,0 @@ -package jwt - -// SigningMethodNone implements the none signing method. This is required by the spec -// but you probably should never use it. -var SigningMethodNone *signingMethodNone - -const UnsafeAllowNoneSignatureType unsafeNoneMagicConstant = "none signing method allowed" - -var NoneSignatureTypeDisallowedError error - -type signingMethodNone struct{} -type unsafeNoneMagicConstant string - -func init() { - SigningMethodNone = &signingMethodNone{} - NoneSignatureTypeDisallowedError = NewValidationError("'none' signature type is not allowed", ValidationErrorSignatureInvalid) - - RegisterSigningMethod(SigningMethodNone.Alg(), func() SigningMethod { - return SigningMethodNone - }) -} - -func (m *signingMethodNone) Alg() string { - return "none" -} - -// Only allow 'none' alg type if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Verify(signingString, signature string, key interface{}) (err error) { - // Key must be UnsafeAllowNoneSignatureType to prevent accidentally - // accepting 'none' signing method - if _, ok := key.(unsafeNoneMagicConstant); !ok { - return NoneSignatureTypeDisallowedError - } - // If signing method is none, signature must be an empty string - if signature != "" { - return NewValidationError( - "'none' signing method with non-empty signature", - ValidationErrorSignatureInvalid, - ) - } - - // Accept 'none' signing method. - return nil -} - -// Only allow 'none' signing if UnsafeAllowNoneSignatureType is specified as the key -func (m *signingMethodNone) Sign(signingString string, key interface{}) (string, error) { - if _, ok := key.(unsafeNoneMagicConstant); ok { - return "", nil - } - return "", NoneSignatureTypeDisallowedError -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser.go b/vendor/github.com/golang-jwt/jwt/v4/parser.go deleted file mode 100644 index 0fc510a0aa..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/parser.go +++ /dev/null @@ -1,206 +0,0 @@ -package jwt - -import ( - "bytes" - "encoding/json" - "fmt" - "strings" -) - -const tokenDelimiter = "." - -type Parser struct { - // If populated, only these methods will be considered valid. - // - // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. - ValidMethods []string - - // Use JSON Number format in JSON decoder. - // - // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. - UseJSONNumber bool - - // Skip claims validation during token parsing. - // - // Deprecated: In future releases, this field will not be exported anymore and should be set with an option to NewParser instead. - SkipClaimsValidation bool -} - -// NewParser creates a new Parser with the specified options -func NewParser(options ...ParserOption) *Parser { - p := &Parser{} - - // loop through our parsing options and apply them - for _, option := range options { - option(p) - } - - return p -} - -// Parse parses, validates, verifies the signature and returns the parsed token. keyFunc will -// receive the parsed token and should return the key for validating. -func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { - return p.ParseWithClaims(tokenString, MapClaims{}, keyFunc) -} - -// ParseWithClaims parses, validates, and verifies like Parse, but supplies a default object -// implementing the Claims interface. This provides default values which can be overridden and -// allows a caller to use their own type, rather than the default MapClaims implementation of -// Claims. -// -// Note: If you provide a custom claim implementation that embeds one of the standard claims (such -// as RegisteredClaims), make sure that a) you either embed a non-pointer version of the claims or -// b) if you are using a pointer, allocate the proper memory for it before passing in the overall -// claims, otherwise you might run into a panic. -func (p *Parser) ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc) (*Token, error) { - token, parts, err := p.ParseUnverified(tokenString, claims) - if err != nil { - return token, err - } - - // Verify signing method is in the required set - if p.ValidMethods != nil { - var signingMethodValid = false - var alg = token.Method.Alg() - for _, m := range p.ValidMethods { - if m == alg { - signingMethodValid = true - break - } - } - if !signingMethodValid { - // signing method is not in the listed set - return token, NewValidationError(fmt.Sprintf("signing method %v is invalid", alg), ValidationErrorSignatureInvalid) - } - } - - // Lookup key - var key interface{} - if keyFunc == nil { - // keyFunc was not provided. short circuiting validation - return token, NewValidationError("no Keyfunc was provided.", ValidationErrorUnverifiable) - } - if key, err = keyFunc(token); err != nil { - // keyFunc returned an error - if ve, ok := err.(*ValidationError); ok { - return token, ve - } - return token, &ValidationError{Inner: err, Errors: ValidationErrorUnverifiable} - } - - // Perform validation - token.Signature = parts[2] - if err := token.Method.Verify(strings.Join(parts[0:2], "."), token.Signature, key); err != nil { - return token, &ValidationError{Inner: err, Errors: ValidationErrorSignatureInvalid} - } - - vErr := &ValidationError{} - - // Validate Claims - if !p.SkipClaimsValidation { - if err := token.Claims.Valid(); err != nil { - // If the Claims Valid returned an error, check if it is a validation error, - // If it was another error type, create a ValidationError with a generic ClaimsInvalid flag set - if e, ok := err.(*ValidationError); !ok { - vErr = &ValidationError{Inner: err, Errors: ValidationErrorClaimsInvalid} - } else { - vErr = e - } - return token, vErr - } - } - - // No errors so far, token is valid. - token.Valid = true - - return token, nil -} - -// ParseUnverified parses the token but doesn't validate the signature. -// -// WARNING: Don't use this method unless you know what you're doing. -// -// It's only ever useful in cases where you know the signature is valid (because it has -// been checked previously in the stack) and you want to extract values from it. -func (p *Parser) ParseUnverified(tokenString string, claims Claims) (token *Token, parts []string, err error) { - var ok bool - parts, ok = splitToken(tokenString) - if !ok { - return nil, nil, NewValidationError("token contains an invalid number of segments", ValidationErrorMalformed) - } - - token = &Token{Raw: tokenString} - - // parse Header - var headerBytes []byte - if headerBytes, err = DecodeSegment(parts[0]); err != nil { - if strings.HasPrefix(strings.ToLower(tokenString), "bearer ") { - return token, parts, NewValidationError("tokenstring should not contain 'bearer '", ValidationErrorMalformed) - } - return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - if err = json.Unmarshal(headerBytes, &token.Header); err != nil { - return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // parse Claims - var claimBytes []byte - token.Claims = claims - - if claimBytes, err = DecodeSegment(parts[1]); err != nil { - return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - dec := json.NewDecoder(bytes.NewBuffer(claimBytes)) - if p.UseJSONNumber { - dec.UseNumber() - } - // JSON Decode. Special case for map type to avoid weird pointer behavior - if c, ok := token.Claims.(MapClaims); ok { - err = dec.Decode(&c) - } else { - err = dec.Decode(&claims) - } - // Handle decode error - if err != nil { - return token, parts, &ValidationError{Inner: err, Errors: ValidationErrorMalformed} - } - - // Lookup signature method - if method, ok := token.Header["alg"].(string); ok { - if token.Method = GetSigningMethod(method); token.Method == nil { - return token, parts, NewValidationError("signing method (alg) is unavailable.", ValidationErrorUnverifiable) - } - } else { - return token, parts, NewValidationError("signing method (alg) is unspecified.", ValidationErrorUnverifiable) - } - - return token, parts, nil -} - -// splitToken splits a token string into three parts: header, claims, and signature. It will only -// return true if the token contains exactly two delimiters and three parts. In all other cases, it -// will return nil parts and false. -func splitToken(token string) ([]string, bool) { - parts := make([]string, 3) - header, remain, ok := strings.Cut(token, tokenDelimiter) - if !ok { - return nil, false - } - parts[0] = header - claims, remain, ok := strings.Cut(remain, tokenDelimiter) - if !ok { - return nil, false - } - parts[1] = claims - // One more cut to ensure the signature is the last part of the token and there are no more - // delimiters. This avoids an issue where malicious input could contain additional delimiters - // causing unecessary overhead parsing tokens. - signature, _, unexpected := strings.Cut(remain, tokenDelimiter) - if unexpected { - return nil, false - } - parts[2] = signature - - return parts, true -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/parser_option.go b/vendor/github.com/golang-jwt/jwt/v4/parser_option.go deleted file mode 100644 index 6ea6f9527d..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/parser_option.go +++ /dev/null @@ -1,29 +0,0 @@ -package jwt - -// ParserOption is used to implement functional-style options that modify the behavior of the parser. To add -// new options, just create a function (ideally beginning with With or Without) that returns an anonymous function that -// takes a *Parser type as input and manipulates its configuration accordingly. -type ParserOption func(*Parser) - -// WithValidMethods is an option to supply algorithm methods that the parser will check. Only those methods will be considered valid. -// It is heavily encouraged to use this option in order to prevent attacks such as https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/. -func WithValidMethods(methods []string) ParserOption { - return func(p *Parser) { - p.ValidMethods = methods - } -} - -// WithJSONNumber is an option to configure the underlying JSON parser with UseNumber -func WithJSONNumber() ParserOption { - return func(p *Parser) { - p.UseJSONNumber = true - } -} - -// WithoutClaimsValidation is an option to disable claims validation. This option should only be used if you exactly know -// what you are doing. -func WithoutClaimsValidation() ParserOption { - return func(p *Parser) { - p.SkipClaimsValidation = true - } -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa.go b/vendor/github.com/golang-jwt/jwt/v4/rsa.go deleted file mode 100644 index b910b19c0b..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/rsa.go +++ /dev/null @@ -1,101 +0,0 @@ -package jwt - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" -) - -// SigningMethodRSA implements the RSA family of signing methods. -// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation -type SigningMethodRSA struct { - Name string - Hash crypto.Hash -} - -// Specific instances for RS256 and company -var ( - SigningMethodRS256 *SigningMethodRSA - SigningMethodRS384 *SigningMethodRSA - SigningMethodRS512 *SigningMethodRSA -) - -func init() { - // RS256 - SigningMethodRS256 = &SigningMethodRSA{"RS256", crypto.SHA256} - RegisterSigningMethod(SigningMethodRS256.Alg(), func() SigningMethod { - return SigningMethodRS256 - }) - - // RS384 - SigningMethodRS384 = &SigningMethodRSA{"RS384", crypto.SHA384} - RegisterSigningMethod(SigningMethodRS384.Alg(), func() SigningMethod { - return SigningMethodRS384 - }) - - // RS512 - SigningMethodRS512 = &SigningMethodRSA{"RS512", crypto.SHA512} - RegisterSigningMethod(SigningMethodRS512.Alg(), func() SigningMethod { - return SigningMethodRS512 - }) -} - -func (m *SigningMethodRSA) Alg() string { - return m.Name -} - -// Verify implements token verification for the SigningMethod -// For this signing method, must be an *rsa.PublicKey structure. -func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - var rsaKey *rsa.PublicKey - var ok bool - - if rsaKey, ok = key.(*rsa.PublicKey); !ok { - return ErrInvalidKeyType - } - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Verify the signature - return rsa.VerifyPKCS1v15(rsaKey, m.Hash, hasher.Sum(nil), sig) -} - -// Sign implements token signing for the SigningMethod -// For this signing method, must be an *rsa.PrivateKey structure. -func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) { - var rsaKey *rsa.PrivateKey - var ok bool - - // Validate type of key - if rsaKey, ok = key.(*rsa.PrivateKey); !ok { - return "", ErrInvalidKey - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return the encoded bytes - if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil { - return EncodeSegment(sigBytes), nil - } else { - return "", err - } -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go b/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go deleted file mode 100644 index 4fd6f9e610..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/rsa_pss.go +++ /dev/null @@ -1,143 +0,0 @@ -//go:build go1.4 -// +build go1.4 - -package jwt - -import ( - "crypto" - "crypto/rand" - "crypto/rsa" -) - -// SigningMethodRSAPSS implements the RSAPSS family of signing methods signing methods -type SigningMethodRSAPSS struct { - *SigningMethodRSA - Options *rsa.PSSOptions - // VerifyOptions is optional. If set overrides Options for rsa.VerifyPPS. - // Used to accept tokens signed with rsa.PSSSaltLengthAuto, what doesn't follow - // https://tools.ietf.org/html/rfc7518#section-3.5 but was used previously. - // See https://github.com/dgrijalva/jwt-go/issues/285#issuecomment-437451244 for details. - VerifyOptions *rsa.PSSOptions -} - -// Specific instances for RS/PS and company. -var ( - SigningMethodPS256 *SigningMethodRSAPSS - SigningMethodPS384 *SigningMethodRSAPSS - SigningMethodPS512 *SigningMethodRSAPSS -) - -func init() { - // PS256 - SigningMethodPS256 = &SigningMethodRSAPSS{ - SigningMethodRSA: &SigningMethodRSA{ - Name: "PS256", - Hash: crypto.SHA256, - }, - Options: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthEqualsHash, - }, - VerifyOptions: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - }, - } - RegisterSigningMethod(SigningMethodPS256.Alg(), func() SigningMethod { - return SigningMethodPS256 - }) - - // PS384 - SigningMethodPS384 = &SigningMethodRSAPSS{ - SigningMethodRSA: &SigningMethodRSA{ - Name: "PS384", - Hash: crypto.SHA384, - }, - Options: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthEqualsHash, - }, - VerifyOptions: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - }, - } - RegisterSigningMethod(SigningMethodPS384.Alg(), func() SigningMethod { - return SigningMethodPS384 - }) - - // PS512 - SigningMethodPS512 = &SigningMethodRSAPSS{ - SigningMethodRSA: &SigningMethodRSA{ - Name: "PS512", - Hash: crypto.SHA512, - }, - Options: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthEqualsHash, - }, - VerifyOptions: &rsa.PSSOptions{ - SaltLength: rsa.PSSSaltLengthAuto, - }, - } - RegisterSigningMethod(SigningMethodPS512.Alg(), func() SigningMethod { - return SigningMethodPS512 - }) -} - -// Verify implements token verification for the SigningMethod. -// For this verify method, key must be an rsa.PublicKey struct -func (m *SigningMethodRSAPSS) Verify(signingString, signature string, key interface{}) error { - var err error - - // Decode the signature - var sig []byte - if sig, err = DecodeSegment(signature); err != nil { - return err - } - - var rsaKey *rsa.PublicKey - switch k := key.(type) { - case *rsa.PublicKey: - rsaKey = k - default: - return ErrInvalidKey - } - - // Create hasher - if !m.Hash.Available() { - return ErrHashUnavailable - } - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - opts := m.Options - if m.VerifyOptions != nil { - opts = m.VerifyOptions - } - - return rsa.VerifyPSS(rsaKey, m.Hash, hasher.Sum(nil), sig, opts) -} - -// Sign implements token signing for the SigningMethod. -// For this signing method, key must be an rsa.PrivateKey struct -func (m *SigningMethodRSAPSS) Sign(signingString string, key interface{}) (string, error) { - var rsaKey *rsa.PrivateKey - - switch k := key.(type) { - case *rsa.PrivateKey: - rsaKey = k - default: - return "", ErrInvalidKeyType - } - - // Create the hasher - if !m.Hash.Available() { - return "", ErrHashUnavailable - } - - hasher := m.Hash.New() - hasher.Write([]byte(signingString)) - - // Sign the string and return the encoded bytes - if sigBytes, err := rsa.SignPSS(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil), m.Options); err == nil { - return EncodeSegment(sigBytes), nil - } else { - return "", err - } -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go b/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go deleted file mode 100644 index 1966c450bf..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/rsa_utils.go +++ /dev/null @@ -1,105 +0,0 @@ -package jwt - -import ( - "crypto/rsa" - "crypto/x509" - "encoding/pem" - "errors" -) - -var ( - ErrKeyMustBePEMEncoded = errors.New("invalid key: Key must be a PEM encoded PKCS1 or PKCS8 key") - ErrNotRSAPrivateKey = errors.New("key is not a valid RSA private key") - ErrNotRSAPublicKey = errors.New("key is not a valid RSA public key") -) - -// ParseRSAPrivateKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 private key -func ParseRSAPrivateKeyFromPEM(key []byte) (*rsa.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - var parsedKey interface{} - if parsedKey, err = x509.ParsePKCS1PrivateKey(block.Bytes); err != nil { - if parsedKey, err = x509.ParsePKCS8PrivateKey(block.Bytes); err != nil { - return nil, err - } - } - - var pkey *rsa.PrivateKey - var ok bool - if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { - return nil, ErrNotRSAPrivateKey - } - - return pkey, nil -} - -// ParseRSAPrivateKeyFromPEMWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password -// -// Deprecated: This function is deprecated and should not be used anymore. It uses the deprecated x509.DecryptPEMBlock -// function, which was deprecated since RFC 1423 is regarded insecure by design. Unfortunately, there is no alternative -// in the Go standard library for now. See https://github.com/golang/go/issues/8860. -func ParseRSAPrivateKeyFromPEMWithPassword(key []byte, password string) (*rsa.PrivateKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - var parsedKey interface{} - - var blockDecrypted []byte - if blockDecrypted, err = x509.DecryptPEMBlock(block, []byte(password)); err != nil { - return nil, err - } - - if parsedKey, err = x509.ParsePKCS1PrivateKey(blockDecrypted); err != nil { - if parsedKey, err = x509.ParsePKCS8PrivateKey(blockDecrypted); err != nil { - return nil, err - } - } - - var pkey *rsa.PrivateKey - var ok bool - if pkey, ok = parsedKey.(*rsa.PrivateKey); !ok { - return nil, ErrNotRSAPrivateKey - } - - return pkey, nil -} - -// ParseRSAPublicKeyFromPEM parses a PEM encoded PKCS1 or PKCS8 public key -func ParseRSAPublicKeyFromPEM(key []byte) (*rsa.PublicKey, error) { - var err error - - // Parse PEM block - var block *pem.Block - if block, _ = pem.Decode(key); block == nil { - return nil, ErrKeyMustBePEMEncoded - } - - // Parse the key - var parsedKey interface{} - if parsedKey, err = x509.ParsePKIXPublicKey(block.Bytes); err != nil { - if cert, err := x509.ParseCertificate(block.Bytes); err == nil { - parsedKey = cert.PublicKey - } else { - return nil, err - } - } - - var pkey *rsa.PublicKey - var ok bool - if pkey, ok = parsedKey.(*rsa.PublicKey); !ok { - return nil, ErrNotRSAPublicKey - } - - return pkey, nil -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/signing_method.go b/vendor/github.com/golang-jwt/jwt/v4/signing_method.go deleted file mode 100644 index 241ae9c60d..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/signing_method.go +++ /dev/null @@ -1,46 +0,0 @@ -package jwt - -import ( - "sync" -) - -var signingMethods = map[string]func() SigningMethod{} -var signingMethodLock = new(sync.RWMutex) - -// SigningMethod can be used add new methods for signing or verifying tokens. -type SigningMethod interface { - Verify(signingString, signature string, key interface{}) error // Returns nil if signature is valid - Sign(signingString string, key interface{}) (string, error) // Returns encoded signature or error - Alg() string // returns the alg identifier for this method (example: 'HS256') -} - -// RegisterSigningMethod registers the "alg" name and a factory function for signing method. -// This is typically done during init() in the method's implementation -func RegisterSigningMethod(alg string, f func() SigningMethod) { - signingMethodLock.Lock() - defer signingMethodLock.Unlock() - - signingMethods[alg] = f -} - -// GetSigningMethod retrieves a signing method from an "alg" string -func GetSigningMethod(alg string) (method SigningMethod) { - signingMethodLock.RLock() - defer signingMethodLock.RUnlock() - - if methodF, ok := signingMethods[alg]; ok { - method = methodF() - } - return -} - -// GetAlgorithms returns a list of registered "alg" names -func GetAlgorithms() (algs []string) { - signingMethodLock.RLock() - defer signingMethodLock.RUnlock() - - for alg := range signingMethods { - algs = append(algs, alg) - } - return -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf b/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf deleted file mode 100644 index 53745d51d7..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/staticcheck.conf +++ /dev/null @@ -1 +0,0 @@ -checks = ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1023"] diff --git a/vendor/github.com/golang-jwt/jwt/v4/token.go b/vendor/github.com/golang-jwt/jwt/v4/token.go deleted file mode 100644 index 786b275ce0..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/token.go +++ /dev/null @@ -1,143 +0,0 @@ -package jwt - -import ( - "encoding/base64" - "encoding/json" - "strings" - "time" -) - -// DecodePaddingAllowed will switch the codec used for decoding JWTs respectively. Note that the JWS RFC7515 -// states that the tokens will utilize a Base64url encoding with no padding. Unfortunately, some implementations -// of JWT are producing non-standard tokens, and thus require support for decoding. Note that this is a global -// variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe. -// To use the non-recommended decoding, set this boolean to `true` prior to using this package. -var DecodePaddingAllowed bool - -// DecodeStrict will switch the codec used for decoding JWTs into strict mode. -// In this mode, the decoder requires that trailing padding bits are zero, as described in RFC 4648 section 3.5. -// Note that this is a global variable, and updating it will change the behavior on a package level, and is also NOT go-routine safe. -// To use strict decoding, set this boolean to `true` prior to using this package. -var DecodeStrict bool - -// TimeFunc provides the current time when parsing token to validate "exp" claim (expiration time). -// You can override it to use another time value. This is useful for testing or if your -// server uses a different time zone than your tokens. -var TimeFunc = time.Now - -// Keyfunc will be used by the Parse methods as a callback function to supply -// the key for verification. The function receives the parsed, -// but unverified Token. This allows you to use properties in the -// Header of the token (such as `kid`) to identify which key to use. -type Keyfunc func(*Token) (interface{}, error) - -// Token represents a JWT Token. Different fields will be used depending on whether you're -// creating or parsing/verifying a token. -type Token struct { - Raw string // The raw token. Populated when you Parse a token - Method SigningMethod // The signing method used or to be used - Header map[string]interface{} // The first segment of the token - Claims Claims // The second segment of the token - Signature string // The third segment of the token. Populated when you Parse a token - Valid bool // Is the token valid? Populated when you Parse/Verify a token -} - -// New creates a new Token with the specified signing method and an empty map of claims. -func New(method SigningMethod) *Token { - return NewWithClaims(method, MapClaims{}) -} - -// NewWithClaims creates a new Token with the specified signing method and claims. -func NewWithClaims(method SigningMethod, claims Claims) *Token { - return &Token{ - Header: map[string]interface{}{ - "typ": "JWT", - "alg": method.Alg(), - }, - Claims: claims, - Method: method, - } -} - -// SignedString creates and returns a complete, signed JWT. -// The token is signed using the SigningMethod specified in the token. -func (t *Token) SignedString(key interface{}) (string, error) { - var sig, sstr string - var err error - if sstr, err = t.SigningString(); err != nil { - return "", err - } - if sig, err = t.Method.Sign(sstr, key); err != nil { - return "", err - } - return strings.Join([]string{sstr, sig}, "."), nil -} - -// SigningString generates the signing string. This is the -// most expensive part of the whole deal. Unless you -// need this for something special, just go straight for -// the SignedString. -func (t *Token) SigningString() (string, error) { - var err error - var jsonValue []byte - - if jsonValue, err = json.Marshal(t.Header); err != nil { - return "", err - } - header := EncodeSegment(jsonValue) - - if jsonValue, err = json.Marshal(t.Claims); err != nil { - return "", err - } - claim := EncodeSegment(jsonValue) - - return strings.Join([]string{header, claim}, "."), nil -} - -// Parse parses, validates, verifies the signature and returns the parsed token. -// keyFunc will receive the parsed token and should return the cryptographic key -// for verifying the signature. -// The caller is strongly encouraged to set the WithValidMethods option to -// validate the 'alg' claim in the token matches the expected algorithm. -// For more details about the importance of validating the 'alg' claim, -// see https://auth0.com/blog/critical-vulnerabilities-in-json-web-token-libraries/ -func Parse(tokenString string, keyFunc Keyfunc, options ...ParserOption) (*Token, error) { - return NewParser(options...).Parse(tokenString, keyFunc) -} - -// ParseWithClaims is a shortcut for NewParser().ParseWithClaims(). -// -// Note: If you provide a custom claim implementation that embeds one of the standard claims (such as RegisteredClaims), -// make sure that a) you either embed a non-pointer version of the claims or b) if you are using a pointer, allocate the -// proper memory for it before passing in the overall claims, otherwise you might run into a panic. -func ParseWithClaims(tokenString string, claims Claims, keyFunc Keyfunc, options ...ParserOption) (*Token, error) { - return NewParser(options...).ParseWithClaims(tokenString, claims, keyFunc) -} - -// EncodeSegment encodes a JWT specific base64url encoding with padding stripped -// -// Deprecated: In a future release, we will demote this function to a non-exported function, since it -// should only be used internally -func EncodeSegment(seg []byte) string { - return base64.RawURLEncoding.EncodeToString(seg) -} - -// DecodeSegment decodes a JWT specific base64url encoding with padding stripped -// -// Deprecated: In a future release, we will demote this function to a non-exported function, since it -// should only be used internally -func DecodeSegment(seg string) ([]byte, error) { - encoding := base64.RawURLEncoding - - if DecodePaddingAllowed { - if l := len(seg) % 4; l > 0 { - seg += strings.Repeat("=", 4-l) - } - encoding = base64.URLEncoding - } - - if DecodeStrict { - encoding = encoding.Strict() - } - return encoding.DecodeString(seg) -} diff --git a/vendor/github.com/golang-jwt/jwt/v4/types.go b/vendor/github.com/golang-jwt/jwt/v4/types.go deleted file mode 100644 index ac8e140eb1..0000000000 --- a/vendor/github.com/golang-jwt/jwt/v4/types.go +++ /dev/null @@ -1,145 +0,0 @@ -package jwt - -import ( - "encoding/json" - "fmt" - "math" - "reflect" - "strconv" - "time" -) - -// TimePrecision sets the precision of times and dates within this library. -// This has an influence on the precision of times when comparing expiry or -// other related time fields. Furthermore, it is also the precision of times -// when serializing. -// -// For backwards compatibility the default precision is set to seconds, so that -// no fractional timestamps are generated. -var TimePrecision = time.Second - -// MarshalSingleStringAsArray modifies the behaviour of the ClaimStrings type, especially -// its MarshalJSON function. -// -// If it is set to true (the default), it will always serialize the type as an -// array of strings, even if it just contains one element, defaulting to the behaviour -// of the underlying []string. If it is set to false, it will serialize to a single -// string, if it contains one element. Otherwise, it will serialize to an array of strings. -var MarshalSingleStringAsArray = true - -// NumericDate represents a JSON numeric date value, as referenced at -// https://datatracker.ietf.org/doc/html/rfc7519#section-2. -type NumericDate struct { - time.Time -} - -// NewNumericDate constructs a new *NumericDate from a standard library time.Time struct. -// It will truncate the timestamp according to the precision specified in TimePrecision. -func NewNumericDate(t time.Time) *NumericDate { - return &NumericDate{t.Truncate(TimePrecision)} -} - -// newNumericDateFromSeconds creates a new *NumericDate out of a float64 representing a -// UNIX epoch with the float fraction representing non-integer seconds. -func newNumericDateFromSeconds(f float64) *NumericDate { - round, frac := math.Modf(f) - return NewNumericDate(time.Unix(int64(round), int64(frac*1e9))) -} - -// MarshalJSON is an implementation of the json.RawMessage interface and serializes the UNIX epoch -// represented in NumericDate to a byte array, using the precision specified in TimePrecision. -func (date NumericDate) MarshalJSON() (b []byte, err error) { - var prec int - if TimePrecision < time.Second { - prec = int(math.Log10(float64(time.Second) / float64(TimePrecision))) - } - truncatedDate := date.Truncate(TimePrecision) - - // For very large timestamps, UnixNano would overflow an int64, but this - // function requires nanosecond level precision, so we have to use the - // following technique to get round the issue: - // 1. Take the normal unix timestamp to form the whole number part of the - // output, - // 2. Take the result of the Nanosecond function, which retuns the offset - // within the second of the particular unix time instance, to form the - // decimal part of the output - // 3. Concatenate them to produce the final result - seconds := strconv.FormatInt(truncatedDate.Unix(), 10) - nanosecondsOffset := strconv.FormatFloat(float64(truncatedDate.Nanosecond())/float64(time.Second), 'f', prec, 64) - - output := append([]byte(seconds), []byte(nanosecondsOffset)[1:]...) - - return output, nil -} - -// UnmarshalJSON is an implementation of the json.RawMessage interface and deserializses a -// NumericDate from a JSON representation, i.e. a json.Number. This number represents an UNIX epoch -// with either integer or non-integer seconds. -func (date *NumericDate) UnmarshalJSON(b []byte) (err error) { - var ( - number json.Number - f float64 - ) - - if err = json.Unmarshal(b, &number); err != nil { - return fmt.Errorf("could not parse NumericData: %w", err) - } - - if f, err = number.Float64(); err != nil { - return fmt.Errorf("could not convert json number value to float: %w", err) - } - - n := newNumericDateFromSeconds(f) - *date = *n - - return nil -} - -// ClaimStrings is basically just a slice of strings, but it can be either serialized from a string array or just a string. -// This type is necessary, since the "aud" claim can either be a single string or an array. -type ClaimStrings []string - -func (s *ClaimStrings) UnmarshalJSON(data []byte) (err error) { - var value interface{} - - if err = json.Unmarshal(data, &value); err != nil { - return err - } - - var aud []string - - switch v := value.(type) { - case string: - aud = append(aud, v) - case []string: - aud = ClaimStrings(v) - case []interface{}: - for _, vv := range v { - vs, ok := vv.(string) - if !ok { - return &json.UnsupportedTypeError{Type: reflect.TypeOf(vv)} - } - aud = append(aud, vs) - } - case nil: - return nil - default: - return &json.UnsupportedTypeError{Type: reflect.TypeOf(v)} - } - - *s = aud - - return -} - -func (s ClaimStrings) MarshalJSON() (b []byte, err error) { - // This handles a special case in the JWT RFC. If the string array, e.g. used by the "aud" field, - // only contains one element, it MAY be serialized as a single string. This may or may not be - // desired based on the ecosystem of other JWT library used, so we make it configurable by the - // variable MarshalSingleStringAsArray. - if len(s) == 1 && !MarshalSingleStringAsArray { - return json.Marshal(s[0]) - } - - return json.Marshal([]string(s)) -} diff --git a/vendor/github.com/google/s2a-go/.gitignore b/vendor/github.com/google/s2a-go/.gitignore deleted file mode 100644 index 01764d1cdf..0000000000 --- a/vendor/github.com/google/s2a-go/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore binaries without extension -//example/client/client -//example/server/server -//internal/v2/fakes2av2_server/fakes2av2_server - -.idea/ \ No newline at end of file diff --git a/vendor/github.com/google/s2a-go/CODE_OF_CONDUCT.md b/vendor/github.com/google/s2a-go/CODE_OF_CONDUCT.md deleted file mode 100644 index dc079b4d66..0000000000 --- a/vendor/github.com/google/s2a-go/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,93 +0,0 @@ -# Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and maintainers pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment -include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or - advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, or to ban temporarily or permanently any -contributor for other behaviors that they deem inappropriate, threatening, -offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. Examples of -representing a project or community include using an official project e-mail -address, posting via an official social media account, or acting as an appointed -representative at an online or offline event. Representation of a project may be -further defined and clarified by project maintainers. - -This Code of Conduct also applies outside the project spaces when the Project -Steward has a reasonable belief that an individual's behavior may have a -negative impact on the project or its community. - -## Conflict Resolution - -We do not believe that all conflict is bad; healthy debate and disagreement -often yield positive results. However, it is never okay to be disrespectful or -to engage in behavior that violates the project’s code of conduct. - -If you see someone violating the code of conduct, you are encouraged to address -the behavior directly with those involved. Many issues can be resolved quickly -and easily, and this gives people more control over the outcome of their -dispute. If you are unable to resolve the matter for any reason, or if the -behavior is threatening or harassing, report it. We are dedicated to providing -an environment where participants feel welcome and safe. - -Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the -Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to -receive and address reported violations of the code of conduct. They will then -work with a committee consisting of representatives from the Open Source -Programs Office and the Google Open Source Strategy team. If for any reason you -are uncomfortable reaching out to the Project Steward, please email -opensource@google.com. - -We will investigate every complaint, but you may not receive a direct response. -We will use our discretion in determining when and how to follow up on reported -incidents, which may range from not taking action to permanent expulsion from -the project and project-sponsored spaces. We will notify the accused of the -report and provide them an opportunity to discuss it before any action is taken. -The identity of the reporter will be omitted from the details of the report -supplied to the accused. In potentially harmful situations, such as ongoing -harassment or threats to anyone's safety, we may take action without notice. - -## Attribution - -This Code of Conduct is adapted from the Contributor Covenant, version 1.4, -available at -https://www.contributor-covenant.org/version/1/4/code-of-conduct.html diff --git a/vendor/github.com/google/s2a-go/CONTRIBUTING.md b/vendor/github.com/google/s2a-go/CONTRIBUTING.md deleted file mode 100644 index 22b241cb73..0000000000 --- a/vendor/github.com/google/s2a-go/CONTRIBUTING.md +++ /dev/null @@ -1,29 +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 (CLA). 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](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## Community Guidelines - -This project follows -[Google's Open Source Community Guidelines](https://opensource.google/conduct/). diff --git a/vendor/github.com/google/s2a-go/LICENSE.md b/vendor/github.com/google/s2a-go/LICENSE.md deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/google/s2a-go/LICENSE.md +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/google/s2a-go/README.md b/vendor/github.com/google/s2a-go/README.md deleted file mode 100644 index fe0f5c1da8..0000000000 --- a/vendor/github.com/google/s2a-go/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# Secure Session Agent Client Libraries - -The Secure Session Agent is a service that enables a workload to offload select -operations from the mTLS handshake and protects a workload's private key -material from exfiltration. Specifically, the workload asks the Secure Session -Agent for the TLS configuration to use during the handshake, to perform private -key operations, and to validate the peer certificate chain. The Secure Session -Agent's client libraries enable applications to communicate with the Secure -Session Agent during the TLS handshake, and to encrypt traffic to the peer -after the TLS handshake is complete. - -This repository contains the source code for the Secure Session Agent's Go -client libraries, which allow gRPC and HTTP Go applications to use the Secure Session -Agent. diff --git a/vendor/github.com/google/s2a-go/fallback/s2a_fallback.go b/vendor/github.com/google/s2a-go/fallback/s2a_fallback.go deleted file mode 100644 index 034d1b912c..0000000000 --- a/vendor/github.com/google/s2a-go/fallback/s2a_fallback.go +++ /dev/null @@ -1,167 +0,0 @@ -/* - * - * Copyright 2023 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 - * - * https://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 fallback provides default implementations of fallback options when S2A fails. -package fallback - -import ( - "context" - "crypto/tls" - "fmt" - "net" - - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/grpclog" -) - -const ( - alpnProtoStrH2 = "h2" - alpnProtoStrHTTP = "http/1.1" - defaultHTTPSPort = "443" -) - -// FallbackTLSConfigGRPC is a tls.Config used by the DefaultFallbackClientHandshakeFunc function. -// It supports GRPC use case, thus the alpn is set to 'h2'. -var FallbackTLSConfigGRPC = tls.Config{ - MinVersion: tls.VersionTLS13, - ClientSessionCache: nil, - NextProtos: []string{alpnProtoStrH2}, -} - -// FallbackTLSConfigHTTP is a tls.Config used by the DefaultFallbackDialerAndAddress func. -// It supports the HTTP use case and the alpn is set to both 'http/1.1' and 'h2'. -var FallbackTLSConfigHTTP = tls.Config{ - MinVersion: tls.VersionTLS13, - ClientSessionCache: nil, - NextProtos: []string{alpnProtoStrH2, alpnProtoStrHTTP}, -} - -// ClientHandshake establishes a TLS connection and returns it, plus its auth info. -// Inputs: -// -// targetServer: the server attempted with S2A. -// conn: the tcp connection to the server at address targetServer that was passed into S2A's ClientHandshake func. -// If fallback is successful, the `conn` should be closed. -// err: the error encountered when performing the client-side TLS handshake with S2A. -type ClientHandshake func(ctx context.Context, targetServer string, conn net.Conn, err error) (net.Conn, credentials.AuthInfo, error) - -// DefaultFallbackClientHandshakeFunc returns a ClientHandshake function, -// which establishes a TLS connection to the provided fallbackAddr, returns the new connection and its auth info. -// Example use: -// -// transportCreds, _ = s2a.NewClientCreds(&s2a.ClientOptions{ -// S2AAddress: s2aAddress, -// FallbackOpts: &s2a.FallbackOptions{ // optional -// FallbackClientHandshakeFunc: fallback.DefaultFallbackClientHandshakeFunc(fallbackAddr), -// }, -// }) -// -// The fallback server's certificate must be verifiable using OS root store. -// The fallbackAddr is expected to be a network address, e.g. example.com:port. If port is not specified, -// it uses default port 443. -// In the returned function's TLS config, ClientSessionCache is explicitly set to nil to disable TLS resumption, -// and min TLS version is set to 1.3. -func DefaultFallbackClientHandshakeFunc(fallbackAddr string) (ClientHandshake, error) { - var fallbackDialer = tls.Dialer{Config: &FallbackTLSConfigGRPC} - return defaultFallbackClientHandshakeFuncInternal(fallbackAddr, fallbackDialer.DialContext) -} - -func defaultFallbackClientHandshakeFuncInternal(fallbackAddr string, dialContextFunc func(context.Context, string, string) (net.Conn, error)) (ClientHandshake, error) { - fallbackServerAddr, err := processFallbackAddr(fallbackAddr) - if err != nil { - if grpclog.V(1) { - grpclog.Infof("error processing fallback address [%s]: %v", fallbackAddr, err) - } - return nil, err - } - return func(ctx context.Context, targetServer string, conn net.Conn, s2aErr error) (net.Conn, credentials.AuthInfo, error) { - fbConn, fbErr := dialContextFunc(ctx, "tcp", fallbackServerAddr) - if fbErr != nil { - grpclog.Infof("dialing to fallback server %s failed: %v", fallbackServerAddr, fbErr) - return nil, nil, fmt.Errorf("dialing to fallback server %s failed: %v; S2A client handshake with %s error: %w", fallbackServerAddr, fbErr, targetServer, s2aErr) - } - - tc, success := fbConn.(*tls.Conn) - if !success { - grpclog.Infof("the connection with fallback server is expected to be tls but isn't") - return nil, nil, fmt.Errorf("the connection with fallback server is expected to be tls but isn't; S2A client handshake with %s error: %w", targetServer, s2aErr) - } - - tlsInfo := credentials.TLSInfo{ - State: tc.ConnectionState(), - CommonAuthInfo: credentials.CommonAuthInfo{ - SecurityLevel: credentials.PrivacyAndIntegrity, - }, - } - if grpclog.V(1) { - grpclog.Infof("ConnectionState.NegotiatedProtocol: %v", tc.ConnectionState().NegotiatedProtocol) - grpclog.Infof("ConnectionState.HandshakeComplete: %v", tc.ConnectionState().HandshakeComplete) - grpclog.Infof("ConnectionState.ServerName: %v", tc.ConnectionState().ServerName) - } - conn.Close() - return fbConn, tlsInfo, nil - }, nil -} - -// DefaultFallbackDialerAndAddress returns a TLS dialer and the network address to dial. -// Example use: -// -// fallbackDialer, fallbackServerAddr := fallback.DefaultFallbackDialerAndAddress(fallbackAddr) -// dialTLSContext := s2a.NewS2aDialTLSContextFunc(&s2a.ClientOptions{ -// S2AAddress: s2aAddress, // required -// FallbackOpts: &s2a.FallbackOptions{ -// FallbackDialer: &s2a.FallbackDialer{ -// Dialer: fallbackDialer, -// ServerAddr: fallbackServerAddr, -// }, -// }, -// }) -// -// The fallback server's certificate should be verifiable using OS root store. -// The fallbackAddr is expected to be a network address, e.g. example.com:port. If port is not specified, -// it uses default port 443. -// In the returned function's TLS config, ClientSessionCache is explicitly set to nil to disable TLS resumption, -// and min TLS version is set to 1.3. -func DefaultFallbackDialerAndAddress(fallbackAddr string) (*tls.Dialer, string, error) { - fallbackServerAddr, err := processFallbackAddr(fallbackAddr) - if err != nil { - if grpclog.V(1) { - grpclog.Infof("error processing fallback address [%s]: %v", fallbackAddr, err) - } - return nil, "", err - } - return &tls.Dialer{Config: &FallbackTLSConfigHTTP}, fallbackServerAddr, nil -} - -func processFallbackAddr(fallbackAddr string) (string, error) { - var fallbackServerAddr string - var err error - - if fallbackAddr == "" { - return "", fmt.Errorf("empty fallback address") - } - _, _, err = net.SplitHostPort(fallbackAddr) - if err != nil { - // fallbackAddr does not have port suffix - fallbackServerAddr = net.JoinHostPort(fallbackAddr, defaultHTTPSPort) - } else { - // FallbackServerAddr already has port suffix - fallbackServerAddr = fallbackAddr - } - return fallbackServerAddr, nil -} diff --git a/vendor/github.com/google/s2a-go/internal/authinfo/authinfo.go b/vendor/github.com/google/s2a-go/internal/authinfo/authinfo.go deleted file mode 100644 index aa3967f9d1..0000000000 --- a/vendor/github.com/google/s2a-go/internal/authinfo/authinfo.go +++ /dev/null @@ -1,119 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 authinfo provides authentication and authorization information that -// results from the TLS handshake. -package authinfo - -import ( - "errors" - - commonpb "github.com/google/s2a-go/internal/proto/common_go_proto" - contextpb "github.com/google/s2a-go/internal/proto/s2a_context_go_proto" - grpcpb "github.com/google/s2a-go/internal/proto/s2a_go_proto" - "google.golang.org/grpc/credentials" -) - -var _ credentials.AuthInfo = (*S2AAuthInfo)(nil) - -const s2aAuthType = "s2a" - -// S2AAuthInfo exposes authentication and authorization information from the -// S2A session result to the gRPC stack. -type S2AAuthInfo struct { - s2aContext *contextpb.S2AContext - commonAuthInfo credentials.CommonAuthInfo -} - -// NewS2AAuthInfo returns a new S2AAuthInfo object from the S2A session result. -func NewS2AAuthInfo(result *grpcpb.SessionResult) (credentials.AuthInfo, error) { - return newS2AAuthInfo(result) -} - -func newS2AAuthInfo(result *grpcpb.SessionResult) (*S2AAuthInfo, error) { - if result == nil { - return nil, errors.New("NewS2aAuthInfo given nil session result") - } - return &S2AAuthInfo{ - s2aContext: &contextpb.S2AContext{ - ApplicationProtocol: result.GetApplicationProtocol(), - TlsVersion: result.GetState().GetTlsVersion(), - Ciphersuite: result.GetState().GetTlsCiphersuite(), - PeerIdentity: result.GetPeerIdentity(), - LocalIdentity: result.GetLocalIdentity(), - PeerCertFingerprint: result.GetPeerCertFingerprint(), - LocalCertFingerprint: result.GetLocalCertFingerprint(), - IsHandshakeResumed: result.GetState().GetIsHandshakeResumed(), - }, - commonAuthInfo: credentials.CommonAuthInfo{SecurityLevel: credentials.PrivacyAndIntegrity}, - }, nil -} - -// AuthType returns the authentication type. -func (s *S2AAuthInfo) AuthType() string { - return s2aAuthType -} - -// ApplicationProtocol returns the application protocol, e.g. "grpc". -func (s *S2AAuthInfo) ApplicationProtocol() string { - return s.s2aContext.GetApplicationProtocol() -} - -// TLSVersion returns the TLS version negotiated during the handshake. -func (s *S2AAuthInfo) TLSVersion() commonpb.TLSVersion { - return s.s2aContext.GetTlsVersion() -} - -// Ciphersuite returns the ciphersuite negotiated during the handshake. -func (s *S2AAuthInfo) Ciphersuite() commonpb.Ciphersuite { - return s.s2aContext.GetCiphersuite() -} - -// PeerIdentity returns the authenticated identity of the peer. -func (s *S2AAuthInfo) PeerIdentity() *commonpb.Identity { - return s.s2aContext.GetPeerIdentity() -} - -// LocalIdentity returns the local identity of the application used during -// session setup. -func (s *S2AAuthInfo) LocalIdentity() *commonpb.Identity { - return s.s2aContext.GetLocalIdentity() -} - -// PeerCertFingerprint returns the SHA256 hash of the peer certificate used in -// the S2A handshake. -func (s *S2AAuthInfo) PeerCertFingerprint() []byte { - return s.s2aContext.GetPeerCertFingerprint() -} - -// LocalCertFingerprint returns the SHA256 hash of the local certificate used -// in the S2A handshake. -func (s *S2AAuthInfo) LocalCertFingerprint() []byte { - return s.s2aContext.GetLocalCertFingerprint() -} - -// IsHandshakeResumed returns true if a cached session was used to resume -// the handshake. -func (s *S2AAuthInfo) IsHandshakeResumed() bool { - return s.s2aContext.GetIsHandshakeResumed() -} - -// SecurityLevel returns the security level of the connection. -func (s *S2AAuthInfo) SecurityLevel() credentials.SecurityLevel { - return s.commonAuthInfo.SecurityLevel -} diff --git a/vendor/github.com/google/s2a-go/internal/handshaker/handshaker.go b/vendor/github.com/google/s2a-go/internal/handshaker/handshaker.go deleted file mode 100644 index 8297c9a974..0000000000 --- a/vendor/github.com/google/s2a-go/internal/handshaker/handshaker.go +++ /dev/null @@ -1,438 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 handshaker communicates with the S2A handshaker service. -package handshaker - -import ( - "context" - "errors" - "fmt" - "io" - "net" - "sync" - - "github.com/google/s2a-go/internal/authinfo" - commonpb "github.com/google/s2a-go/internal/proto/common_go_proto" - s2apb "github.com/google/s2a-go/internal/proto/s2a_go_proto" - "github.com/google/s2a-go/internal/record" - "github.com/google/s2a-go/internal/tokenmanager" - grpc "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/grpclog" -) - -var ( - // appProtocol contains the application protocol accepted by the handshaker. - appProtocol = "grpc" - // frameLimit is the maximum size of a frame in bytes. - frameLimit = 1024 * 64 - // peerNotRespondingError is the error thrown when the peer doesn't respond. - errPeerNotResponding = errors.New("peer is not responding and re-connection should be attempted") -) - -// Handshaker defines a handshaker interface. -type Handshaker interface { - // ClientHandshake starts and completes a TLS handshake from the client side, - // and returns a secure connection along with additional auth information. - ClientHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) - // ServerHandshake starts and completes a TLS handshake from the server side, - // and returns a secure connection along with additional auth information. - ServerHandshake(ctx context.Context) (net.Conn, credentials.AuthInfo, error) - // Close terminates the Handshaker. It should be called when the handshake - // is complete. - Close() error -} - -// ClientHandshakerOptions contains the options needed to configure the S2A -// handshaker service on the client-side. -type ClientHandshakerOptions struct { - // MinTLSVersion specifies the min TLS version supported by the client. - MinTLSVersion commonpb.TLSVersion - // MaxTLSVersion specifies the max TLS version supported by the client. - MaxTLSVersion commonpb.TLSVersion - // TLSCiphersuites is the ordered list of ciphersuites supported by the - // client. - TLSCiphersuites []commonpb.Ciphersuite - // TargetIdentities contains a list of allowed server identities. One of the - // target identities should match the peer identity in the handshake - // result; otherwise, the handshake fails. - TargetIdentities []*commonpb.Identity - // LocalIdentity is the local identity of the client application. If none is - // provided, then the S2A will choose the default identity. - LocalIdentity *commonpb.Identity - // TargetName is the allowed server name, which may be used for server - // authorization check by the S2A if it is provided. - TargetName string - // EnsureProcessSessionTickets allows users to wait and ensure that all - // available session tickets are sent to S2A before a process completes. - EnsureProcessSessionTickets *sync.WaitGroup -} - -// ServerHandshakerOptions contains the options needed to configure the S2A -// handshaker service on the server-side. -type ServerHandshakerOptions struct { - // MinTLSVersion specifies the min TLS version supported by the server. - MinTLSVersion commonpb.TLSVersion - // MaxTLSVersion specifies the max TLS version supported by the server. - MaxTLSVersion commonpb.TLSVersion - // TLSCiphersuites is the ordered list of ciphersuites supported by the - // server. - TLSCiphersuites []commonpb.Ciphersuite - // LocalIdentities is the list of local identities that may be assumed by - // the server. If no local identity is specified, then the S2A chooses a - // default local identity. - LocalIdentities []*commonpb.Identity -} - -// s2aHandshaker performs a TLS handshake using the S2A handshaker service. -type s2aHandshaker struct { - // stream is used to communicate with the S2A handshaker service. - stream s2apb.S2AService_SetUpSessionClient - // conn is the connection to the peer. - conn net.Conn - // clientOpts should be non-nil iff the handshaker is client-side. - clientOpts *ClientHandshakerOptions - // serverOpts should be non-nil iff the handshaker is server-side. - serverOpts *ServerHandshakerOptions - // isClient determines if the handshaker is client or server side. - isClient bool - // hsAddr stores the address of the S2A handshaker service. - hsAddr string - // tokenManager manages access tokens for authenticating to S2A. - tokenManager tokenmanager.AccessTokenManager - // localIdentities is the set of local identities for whom the - // tokenManager should fetch a token when preparing a request to be - // sent to S2A. - localIdentities []*commonpb.Identity -} - -// NewClientHandshaker creates an s2aHandshaker instance that performs a -// client-side TLS handshake using the S2A handshaker service. -func NewClientHandshaker(ctx context.Context, conn *grpc.ClientConn, c net.Conn, hsAddr string, opts *ClientHandshakerOptions) (Handshaker, error) { - stream, err := s2apb.NewS2AServiceClient(conn).SetUpSession(ctx, grpc.WaitForReady(true)) - if err != nil { - return nil, err - } - tokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - if err != nil { - grpclog.Infof("failed to create single token access token manager: %v", err) - } - return newClientHandshaker(stream, c, hsAddr, opts, tokenManager), nil -} - -func newClientHandshaker(stream s2apb.S2AService_SetUpSessionClient, c net.Conn, hsAddr string, opts *ClientHandshakerOptions, tokenManager tokenmanager.AccessTokenManager) *s2aHandshaker { - var localIdentities []*commonpb.Identity - if opts != nil { - localIdentities = []*commonpb.Identity{opts.LocalIdentity} - } - return &s2aHandshaker{ - stream: stream, - conn: c, - clientOpts: opts, - isClient: true, - hsAddr: hsAddr, - tokenManager: tokenManager, - localIdentities: localIdentities, - } -} - -// NewServerHandshaker creates an s2aHandshaker instance that performs a -// server-side TLS handshake using the S2A handshaker service. -func NewServerHandshaker(ctx context.Context, conn *grpc.ClientConn, c net.Conn, hsAddr string, opts *ServerHandshakerOptions) (Handshaker, error) { - stream, err := s2apb.NewS2AServiceClient(conn).SetUpSession(ctx, grpc.WaitForReady(true)) - if err != nil { - return nil, err - } - tokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - if err != nil { - grpclog.Infof("failed to create single token access token manager: %v", err) - } - return newServerHandshaker(stream, c, hsAddr, opts, tokenManager), nil -} - -func newServerHandshaker(stream s2apb.S2AService_SetUpSessionClient, c net.Conn, hsAddr string, opts *ServerHandshakerOptions, tokenManager tokenmanager.AccessTokenManager) *s2aHandshaker { - var localIdentities []*commonpb.Identity - if opts != nil { - localIdentities = opts.LocalIdentities - } - return &s2aHandshaker{ - stream: stream, - conn: c, - serverOpts: opts, - isClient: false, - hsAddr: hsAddr, - tokenManager: tokenManager, - localIdentities: localIdentities, - } -} - -// ClientHandshake performs a client-side TLS handshake using the S2A handshaker -// service. When complete, returns a TLS connection. -func (h *s2aHandshaker) ClientHandshake(_ context.Context) (net.Conn, credentials.AuthInfo, error) { - if !h.isClient { - return nil, nil, errors.New("only handshakers created using NewClientHandshaker can perform a client-side handshake") - } - // Extract the hostname from the target name. The target name is assumed to be an authority. - hostname, _, err := net.SplitHostPort(h.clientOpts.TargetName) - if err != nil { - // If the target name had no host port or could not be parsed, use it as is. - hostname = h.clientOpts.TargetName - } - - // Prepare a client start message to send to the S2A handshaker service. - req := &s2apb.SessionReq{ - ReqOneof: &s2apb.SessionReq_ClientStart{ - ClientStart: &s2apb.ClientSessionStartReq{ - ApplicationProtocols: []string{appProtocol}, - MinTlsVersion: h.clientOpts.MinTLSVersion, - MaxTlsVersion: h.clientOpts.MaxTLSVersion, - TlsCiphersuites: h.clientOpts.TLSCiphersuites, - TargetIdentities: h.clientOpts.TargetIdentities, - LocalIdentity: h.clientOpts.LocalIdentity, - TargetName: hostname, - }, - }, - AuthMechanisms: h.getAuthMechanisms(), - } - conn, result, err := h.setUpSession(req) - if err != nil { - return nil, nil, err - } - authInfo, err := authinfo.NewS2AAuthInfo(result) - if err != nil { - return nil, nil, err - } - return conn, authInfo, nil -} - -// ServerHandshake performs a server-side TLS handshake using the S2A handshaker -// service. When complete, returns a TLS connection. -func (h *s2aHandshaker) ServerHandshake(_ context.Context) (net.Conn, credentials.AuthInfo, error) { - if h.isClient { - return nil, nil, errors.New("only handshakers created using NewServerHandshaker can perform a server-side handshake") - } - p := make([]byte, frameLimit) - n, err := h.conn.Read(p) - if err != nil { - return nil, nil, err - } - // Prepare a server start message to send to the S2A handshaker service. - req := &s2apb.SessionReq{ - ReqOneof: &s2apb.SessionReq_ServerStart{ - ServerStart: &s2apb.ServerSessionStartReq{ - ApplicationProtocols: []string{appProtocol}, - MinTlsVersion: h.serverOpts.MinTLSVersion, - MaxTlsVersion: h.serverOpts.MaxTLSVersion, - TlsCiphersuites: h.serverOpts.TLSCiphersuites, - LocalIdentities: h.serverOpts.LocalIdentities, - InBytes: p[:n], - }, - }, - AuthMechanisms: h.getAuthMechanisms(), - } - conn, result, err := h.setUpSession(req) - if err != nil { - return nil, nil, err - } - authInfo, err := authinfo.NewS2AAuthInfo(result) - if err != nil { - return nil, nil, err - } - return conn, authInfo, nil -} - -// setUpSession proxies messages between the peer and the S2A handshaker -// service. -func (h *s2aHandshaker) setUpSession(req *s2apb.SessionReq) (net.Conn, *s2apb.SessionResult, error) { - resp, err := h.accessHandshakerService(req) - if err != nil { - return nil, nil, err - } - // Check if the returned status is an error. - if resp.GetStatus() != nil { - if got, want := resp.GetStatus().Code, uint32(codes.OK); got != want { - return nil, nil, fmt.Errorf("%v", resp.GetStatus().Details) - } - } - // Calculate the extra unread bytes from the Session. Attempting to consume - // more than the bytes sent will throw an error. - var extra []byte - if req.GetServerStart() != nil { - if resp.GetBytesConsumed() > uint32(len(req.GetServerStart().GetInBytes())) { - return nil, nil, errors.New("handshaker service consumed bytes value is out-of-bounds") - } - extra = req.GetServerStart().GetInBytes()[resp.GetBytesConsumed():] - } - result, extra, err := h.processUntilDone(resp, extra) - if err != nil { - return nil, nil, err - } - if result.GetLocalIdentity() == nil { - return nil, nil, errors.New("local identity must be populated in session result") - } - - // Create a new TLS record protocol using the Session Result. - newConn, err := record.NewConn(&record.ConnParameters{ - NetConn: h.conn, - Ciphersuite: result.GetState().GetTlsCiphersuite(), - TLSVersion: result.GetState().GetTlsVersion(), - InTrafficSecret: result.GetState().GetInKey(), - OutTrafficSecret: result.GetState().GetOutKey(), - UnusedBuf: extra, - InSequence: result.GetState().GetInSequence(), - OutSequence: result.GetState().GetOutSequence(), - HSAddr: h.hsAddr, - ConnectionID: result.GetState().GetConnectionId(), - LocalIdentity: result.GetLocalIdentity(), - EnsureProcessSessionTickets: h.ensureProcessSessionTickets(), - }) - if err != nil { - return nil, nil, err - } - return newConn, result, nil -} - -func (h *s2aHandshaker) ensureProcessSessionTickets() *sync.WaitGroup { - if h.clientOpts == nil { - return nil - } - return h.clientOpts.EnsureProcessSessionTickets -} - -// accessHandshakerService sends the session request to the S2A handshaker -// service and returns the session response. -func (h *s2aHandshaker) accessHandshakerService(req *s2apb.SessionReq) (*s2apb.SessionResp, error) { - if err := h.stream.Send(req); err != nil { - return nil, err - } - resp, err := h.stream.Recv() - if err != nil { - return nil, err - } - return resp, nil -} - -// processUntilDone continues proxying messages between the peer and the S2A -// handshaker service until the handshaker service returns the SessionResult at -// the end of the handshake or an error occurs. -func (h *s2aHandshaker) processUntilDone(resp *s2apb.SessionResp, unusedBytes []byte) (*s2apb.SessionResult, []byte, error) { - for { - if len(resp.OutFrames) > 0 { - if _, err := h.conn.Write(resp.OutFrames); err != nil { - return nil, nil, err - } - } - if resp.Result != nil { - return resp.Result, unusedBytes, nil - } - buf := make([]byte, frameLimit) - n, err := h.conn.Read(buf) - if err != nil && err != io.EOF { - return nil, nil, err - } - // If there is nothing to send to the handshaker service and nothing is - // received from the peer, then we are stuck. This covers the case when - // the peer is not responding. Note that handshaker service connection - // issues are caught in accessHandshakerService before we even get - // here. - if len(resp.OutFrames) == 0 && n == 0 { - return nil, nil, errPeerNotResponding - } - // Append extra bytes from the previous interaction with the handshaker - // service with the current buffer read from conn. - p := append(unusedBytes, buf[:n]...) - // From here on, p and unusedBytes point to the same slice. - resp, err = h.accessHandshakerService(&s2apb.SessionReq{ - ReqOneof: &s2apb.SessionReq_Next{ - Next: &s2apb.SessionNextReq{ - InBytes: p, - }, - }, - AuthMechanisms: h.getAuthMechanisms(), - }) - if err != nil { - return nil, nil, err - } - - // Cache the local identity returned by S2A, if it is populated. This - // overwrites any existing local identities. This is done because, once the - // S2A has selected a local identity, then only that local identity should - // be asserted in future requests until the end of the current handshake. - if resp.GetLocalIdentity() != nil { - h.localIdentities = []*commonpb.Identity{resp.GetLocalIdentity()} - } - - // Set unusedBytes based on the handshaker service response. - if resp.GetBytesConsumed() > uint32(len(p)) { - return nil, nil, errors.New("handshaker service consumed bytes value is out-of-bounds") - } - unusedBytes = p[resp.GetBytesConsumed():] - } -} - -// Close shuts down the handshaker and the stream to the S2A handshaker service -// when the handshake is complete. It should be called when the caller obtains -// the secure connection at the end of the handshake. -func (h *s2aHandshaker) Close() error { - return h.stream.CloseSend() -} - -func (h *s2aHandshaker) getAuthMechanisms() []*s2apb.AuthenticationMechanism { - if h.tokenManager == nil { - return nil - } - // First handle the special case when no local identities have been provided - // by the application. In this case, an AuthenticationMechanism with no local - // identity will be sent. - if len(h.localIdentities) == 0 { - token, err := h.tokenManager.DefaultToken() - if err != nil { - grpclog.Infof("unable to get token for empty local identity: %v", err) - return nil - } - return []*s2apb.AuthenticationMechanism{ - { - MechanismOneof: &s2apb.AuthenticationMechanism_Token{ - Token: token, - }, - }, - } - } - - // Next, handle the case where the application (or the S2A) has provided - // one or more local identities. - var authMechanisms []*s2apb.AuthenticationMechanism - for _, localIdentity := range h.localIdentities { - token, err := h.tokenManager.Token(localIdentity) - if err != nil { - grpclog.Infof("unable to get token for local identity %v: %v", localIdentity, err) - continue - } - - authMechanism := &s2apb.AuthenticationMechanism{ - Identity: localIdentity, - MechanismOneof: &s2apb.AuthenticationMechanism_Token{ - Token: token, - }, - } - authMechanisms = append(authMechanisms, authMechanism) - } - return authMechanisms -} diff --git a/vendor/github.com/google/s2a-go/internal/handshaker/service/service.go b/vendor/github.com/google/s2a-go/internal/handshaker/service/service.go deleted file mode 100644 index ed44965370..0000000000 --- a/vendor/github.com/google/s2a-go/internal/handshaker/service/service.go +++ /dev/null @@ -1,66 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 service is a utility for calling the S2A handshaker service. -package service - -import ( - "context" - "sync" - - grpc "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/credentials/insecure" -) - -var ( - // mu guards hsConnMap and hsDialer. - mu sync.Mutex - // hsConnMap represents a mapping from an S2A handshaker service address - // to a corresponding connection to an S2A handshaker service instance. - hsConnMap = make(map[string]*grpc.ClientConn) - // hsDialer will be reassigned in tests. - hsDialer = grpc.DialContext -) - -// Dial dials the S2A handshaker service. If a connection has already been -// established, this function returns it. Otherwise, a new connection is -// created. -func Dial(ctx context.Context, handshakerServiceAddress string, transportCreds credentials.TransportCredentials) (*grpc.ClientConn, error) { - mu.Lock() - defer mu.Unlock() - - hsConn, ok := hsConnMap[handshakerServiceAddress] - if !ok { - // Create a new connection to the S2A handshaker service. Note that - // this connection stays open until the application is closed. - var grpcOpts []grpc.DialOption - if transportCreds != nil { - grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(transportCreds)) - } else { - grpcOpts = append(grpcOpts, grpc.WithTransportCredentials(insecure.NewCredentials())) - } - var err error - hsConn, err = hsDialer(ctx, handshakerServiceAddress, grpcOpts...) - if err != nil { - return nil, err - } - hsConnMap[handshakerServiceAddress] = hsConn - } - return hsConn, nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/common_go_proto/common.pb.go b/vendor/github.com/google/s2a-go/internal/proto/common_go_proto/common.pb.go deleted file mode 100644 index fcd049de92..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/common_go_proto/common.pb.go +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright 2021 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/common/common.proto - -package common_go_proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The ciphersuites supported by S2A. The name determines the confidentiality, -// and authentication ciphers as well as the hash algorithm used for PRF in -// TLS 1.2 or HKDF in TLS 1.3. Thus, the components of the name are: -// - AEAD -- for encryption and authentication, e.g., AES_128_GCM. -// - Hash algorithm -- used in PRF or HKDF, e.g., SHA256. -type Ciphersuite int32 - -const ( - Ciphersuite_AES_128_GCM_SHA256 Ciphersuite = 0 - Ciphersuite_AES_256_GCM_SHA384 Ciphersuite = 1 - Ciphersuite_CHACHA20_POLY1305_SHA256 Ciphersuite = 2 -) - -// Enum value maps for Ciphersuite. -var ( - Ciphersuite_name = map[int32]string{ - 0: "AES_128_GCM_SHA256", - 1: "AES_256_GCM_SHA384", - 2: "CHACHA20_POLY1305_SHA256", - } - Ciphersuite_value = map[string]int32{ - "AES_128_GCM_SHA256": 0, - "AES_256_GCM_SHA384": 1, - "CHACHA20_POLY1305_SHA256": 2, - } -) - -func (x Ciphersuite) Enum() *Ciphersuite { - p := new(Ciphersuite) - *p = x - return p -} - -func (x Ciphersuite) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Ciphersuite) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_common_common_proto_enumTypes[0].Descriptor() -} - -func (Ciphersuite) Type() protoreflect.EnumType { - return &file_internal_proto_common_common_proto_enumTypes[0] -} - -func (x Ciphersuite) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Ciphersuite.Descriptor instead. -func (Ciphersuite) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_common_common_proto_rawDescGZIP(), []int{0} -} - -// The TLS versions supported by S2A's handshaker module. -type TLSVersion int32 - -const ( - TLSVersion_TLS1_2 TLSVersion = 0 - TLSVersion_TLS1_3 TLSVersion = 1 -) - -// Enum value maps for TLSVersion. -var ( - TLSVersion_name = map[int32]string{ - 0: "TLS1_2", - 1: "TLS1_3", - } - TLSVersion_value = map[string]int32{ - "TLS1_2": 0, - "TLS1_3": 1, - } -) - -func (x TLSVersion) Enum() *TLSVersion { - p := new(TLSVersion) - *p = x - return p -} - -func (x TLSVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TLSVersion) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_common_common_proto_enumTypes[1].Descriptor() -} - -func (TLSVersion) Type() protoreflect.EnumType { - return &file_internal_proto_common_common_proto_enumTypes[1] -} - -func (x TLSVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TLSVersion.Descriptor instead. -func (TLSVersion) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_common_common_proto_rawDescGZIP(), []int{1} -} - -type Identity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdentityOneof: - // - // *Identity_SpiffeId - // *Identity_Hostname - // *Identity_Uid - // *Identity_Username - // *Identity_GcpId - IdentityOneof isIdentity_IdentityOneof `protobuf_oneof:"identity_oneof"` - // Additional identity-specific attributes. - Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Identity) Reset() { - *x = Identity{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_common_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identity) ProtoMessage() {} - -func (x *Identity) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_common_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Identity.ProtoReflect.Descriptor instead. -func (*Identity) Descriptor() ([]byte, []int) { - return file_internal_proto_common_common_proto_rawDescGZIP(), []int{0} -} - -func (m *Identity) GetIdentityOneof() isIdentity_IdentityOneof { - if m != nil { - return m.IdentityOneof - } - return nil -} - -func (x *Identity) GetSpiffeId() string { - if x, ok := x.GetIdentityOneof().(*Identity_SpiffeId); ok { - return x.SpiffeId - } - return "" -} - -func (x *Identity) GetHostname() string { - if x, ok := x.GetIdentityOneof().(*Identity_Hostname); ok { - return x.Hostname - } - return "" -} - -func (x *Identity) GetUid() string { - if x, ok := x.GetIdentityOneof().(*Identity_Uid); ok { - return x.Uid - } - return "" -} - -func (x *Identity) GetUsername() string { - if x, ok := x.GetIdentityOneof().(*Identity_Username); ok { - return x.Username - } - return "" -} - -func (x *Identity) GetGcpId() string { - if x, ok := x.GetIdentityOneof().(*Identity_GcpId); ok { - return x.GcpId - } - return "" -} - -func (x *Identity) GetAttributes() map[string]string { - if x != nil { - return x.Attributes - } - return nil -} - -type isIdentity_IdentityOneof interface { - isIdentity_IdentityOneof() -} - -type Identity_SpiffeId struct { - // The SPIFFE ID of a connection endpoint. - SpiffeId string `protobuf:"bytes,1,opt,name=spiffe_id,json=spiffeId,proto3,oneof"` -} - -type Identity_Hostname struct { - // The hostname of a connection endpoint. - Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof"` -} - -type Identity_Uid struct { - // The UID of a connection endpoint. - Uid string `protobuf:"bytes,4,opt,name=uid,proto3,oneof"` -} - -type Identity_Username struct { - // The username of a connection endpoint. - Username string `protobuf:"bytes,5,opt,name=username,proto3,oneof"` -} - -type Identity_GcpId struct { - // The GCP ID of a connection endpoint. - GcpId string `protobuf:"bytes,6,opt,name=gcp_id,json=gcpId,proto3,oneof"` -} - -func (*Identity_SpiffeId) isIdentity_IdentityOneof() {} - -func (*Identity_Hostname) isIdentity_IdentityOneof() {} - -func (*Identity_Uid) isIdentity_IdentityOneof() {} - -func (*Identity_Username) isIdentity_IdentityOneof() {} - -func (*Identity_GcpId) isIdentity_IdentityOneof() {} - -var File_internal_proto_common_common_proto protoreflect.FileDescriptor - -var file_internal_proto_common_common_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xa8, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x09, - 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x08, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x08, 0x68, - 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x03, 0x75, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x06, 0x67, - 0x63, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x67, - 0x63, 0x70, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2a, 0x5b, 0x0a, 0x0b, 0x43, 0x69, - 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x45, 0x53, - 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, - 0x00, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, - 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x43, 0x48, 0x41, - 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x5f, 0x53, - 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x02, 0x2a, 0x24, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x4c, 0x53, 0x31, 0x5f, 0x32, 0x10, - 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x54, 0x4c, 0x53, 0x31, 0x5f, 0x33, 0x10, 0x01, 0x42, 0x36, 0x5a, - 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x67, 0x6f, 0x5f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_internal_proto_common_common_proto_rawDescOnce sync.Once - file_internal_proto_common_common_proto_rawDescData = file_internal_proto_common_common_proto_rawDesc -) - -func file_internal_proto_common_common_proto_rawDescGZIP() []byte { - file_internal_proto_common_common_proto_rawDescOnce.Do(func() { - file_internal_proto_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_common_common_proto_rawDescData) - }) - return file_internal_proto_common_common_proto_rawDescData -} - -var file_internal_proto_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_internal_proto_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_internal_proto_common_common_proto_goTypes = []any{ - (Ciphersuite)(0), // 0: s2a.proto.Ciphersuite - (TLSVersion)(0), // 1: s2a.proto.TLSVersion - (*Identity)(nil), // 2: s2a.proto.Identity - nil, // 3: s2a.proto.Identity.AttributesEntry -} -var file_internal_proto_common_common_proto_depIdxs = []int32{ - 3, // 0: s2a.proto.Identity.attributes:type_name -> s2a.proto.Identity.AttributesEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_internal_proto_common_common_proto_init() } -func file_internal_proto_common_common_proto_init() { - if File_internal_proto_common_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Identity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_internal_proto_common_common_proto_msgTypes[0].OneofWrappers = []any{ - (*Identity_SpiffeId)(nil), - (*Identity_Hostname)(nil), - (*Identity_Uid)(nil), - (*Identity_Username)(nil), - (*Identity_GcpId)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_common_common_proto_rawDesc, - NumEnums: 2, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_internal_proto_common_common_proto_goTypes, - DependencyIndexes: file_internal_proto_common_common_proto_depIdxs, - EnumInfos: file_internal_proto_common_common_proto_enumTypes, - MessageInfos: file_internal_proto_common_common_proto_msgTypes, - }.Build() - File_internal_proto_common_common_proto = out.File - file_internal_proto_common_common_proto_rawDesc = nil - file_internal_proto_common_common_proto_goTypes = nil - file_internal_proto_common_common_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/s2a_context_go_proto/s2a_context.pb.go b/vendor/github.com/google/s2a-go/internal/proto/s2a_context_go_proto/s2a_context.pb.go deleted file mode 100644 index 2af3ee3dc1..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/s2a_context_go_proto/s2a_context.pb.go +++ /dev/null @@ -1,267 +0,0 @@ -// Copyright 2021 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/s2a_context/s2a_context.proto - -package s2a_context_go_proto - -import ( - common_go_proto "github.com/google/s2a-go/internal/proto/common_go_proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type S2AContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The application protocol negotiated for this connection, e.g., 'grpc'. - ApplicationProtocol string `protobuf:"bytes,1,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` - // The TLS version number that the S2A's handshaker module used to set up the - // session. - TlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=tls_version,json=tlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"tls_version,omitempty"` - // The TLS ciphersuite negotiated by the S2A's handshaker module. - Ciphersuite common_go_proto.Ciphersuite `protobuf:"varint,3,opt,name=ciphersuite,proto3,enum=s2a.proto.Ciphersuite" json:"ciphersuite,omitempty"` - // The authenticated identity of the peer. - PeerIdentity *common_go_proto.Identity `protobuf:"bytes,4,opt,name=peer_identity,json=peerIdentity,proto3" json:"peer_identity,omitempty"` - // The local identity used during session setup. This could be: - // - The local identity that the client specifies in ClientSessionStartReq. - // - One of the local identities that the server specifies in - // ServerSessionStartReq. - // - If neither client or server specifies local identities, the S2A picks the - // default one. In this case, this field will contain that identity. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,5,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The SHA256 hash of the peer certificate used in the handshake. - PeerCertFingerprint []byte `protobuf:"bytes,6,opt,name=peer_cert_fingerprint,json=peerCertFingerprint,proto3" json:"peer_cert_fingerprint,omitempty"` - // The SHA256 hash of the local certificate used in the handshake. - LocalCertFingerprint []byte `protobuf:"bytes,7,opt,name=local_cert_fingerprint,json=localCertFingerprint,proto3" json:"local_cert_fingerprint,omitempty"` - // Set to true if a cached session was reused to resume the handshake. - IsHandshakeResumed bool `protobuf:"varint,8,opt,name=is_handshake_resumed,json=isHandshakeResumed,proto3" json:"is_handshake_resumed,omitempty"` -} - -func (x *S2AContext) Reset() { - *x = S2AContext{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *S2AContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*S2AContext) ProtoMessage() {} - -func (x *S2AContext) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use S2AContext.ProtoReflect.Descriptor instead. -func (*S2AContext) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_context_s2a_context_proto_rawDescGZIP(), []int{0} -} - -func (x *S2AContext) GetApplicationProtocol() string { - if x != nil { - return x.ApplicationProtocol - } - return "" -} - -func (x *S2AContext) GetTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.TlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *S2AContext) GetCiphersuite() common_go_proto.Ciphersuite { - if x != nil { - return x.Ciphersuite - } - return common_go_proto.Ciphersuite(0) -} - -func (x *S2AContext) GetPeerIdentity() *common_go_proto.Identity { - if x != nil { - return x.PeerIdentity - } - return nil -} - -func (x *S2AContext) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *S2AContext) GetPeerCertFingerprint() []byte { - if x != nil { - return x.PeerCertFingerprint - } - return nil -} - -func (x *S2AContext) GetLocalCertFingerprint() []byte { - if x != nil { - return x.LocalCertFingerprint - } - return nil -} - -func (x *S2AContext) GetIsHandshakeResumed() bool { - if x != nil { - return x.IsHandshakeResumed - } - return false -} - -var File_internal_proto_s2a_context_s2a_context_proto protoreflect.FileDescriptor - -var file_internal_proto_s2a_context_s2a_context_proto_rawDesc = []byte{ - 0x0a, 0x2c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x73, 0x32, 0x61, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc3, 0x03, - 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x31, 0x0a, 0x14, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, - 0x36, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x6c, 0x73, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x0b, 0x63, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, - 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, - 0x75, 0x69, 0x74, 0x65, 0x52, 0x0b, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, - 0x65, 0x12, 0x38, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x70, - 0x65, 0x65, 0x72, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x65, 0x65, 0x72, 0x5f, - 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, - 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x6c, - 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, - 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x12, 0x69, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x75, - 0x6d, 0x65, 0x64, 0x42, 0x3b, 0x5a, 0x39, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x32, 0x61, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_internal_proto_s2a_context_s2a_context_proto_rawDescOnce sync.Once - file_internal_proto_s2a_context_s2a_context_proto_rawDescData = file_internal_proto_s2a_context_s2a_context_proto_rawDesc -) - -func file_internal_proto_s2a_context_s2a_context_proto_rawDescGZIP() []byte { - file_internal_proto_s2a_context_s2a_context_proto_rawDescOnce.Do(func() { - file_internal_proto_s2a_context_s2a_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_s2a_context_s2a_context_proto_rawDescData) - }) - return file_internal_proto_s2a_context_s2a_context_proto_rawDescData -} - -var file_internal_proto_s2a_context_s2a_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_proto_s2a_context_s2a_context_proto_goTypes = []any{ - (*S2AContext)(nil), // 0: s2a.proto.S2AContext - (common_go_proto.TLSVersion)(0), // 1: s2a.proto.TLSVersion - (common_go_proto.Ciphersuite)(0), // 2: s2a.proto.Ciphersuite - (*common_go_proto.Identity)(nil), // 3: s2a.proto.Identity -} -var file_internal_proto_s2a_context_s2a_context_proto_depIdxs = []int32{ - 1, // 0: s2a.proto.S2AContext.tls_version:type_name -> s2a.proto.TLSVersion - 2, // 1: s2a.proto.S2AContext.ciphersuite:type_name -> s2a.proto.Ciphersuite - 3, // 2: s2a.proto.S2AContext.peer_identity:type_name -> s2a.proto.Identity - 3, // 3: s2a.proto.S2AContext.local_identity:type_name -> s2a.proto.Identity - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name -} - -func init() { file_internal_proto_s2a_context_s2a_context_proto_init() } -func file_internal_proto_s2a_context_s2a_context_proto_init() { - if File_internal_proto_s2a_context_s2a_context_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_s2a_context_s2a_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*S2AContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_s2a_context_s2a_context_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_internal_proto_s2a_context_s2a_context_proto_goTypes, - DependencyIndexes: file_internal_proto_s2a_context_s2a_context_proto_depIdxs, - MessageInfos: file_internal_proto_s2a_context_s2a_context_proto_msgTypes, - }.Build() - File_internal_proto_s2a_context_s2a_context_proto = out.File - file_internal_proto_s2a_context_s2a_context_proto_rawDesc = nil - file_internal_proto_s2a_context_s2a_context_proto_goTypes = nil - file_internal_proto_s2a_context_s2a_context_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a.pb.go b/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a.pb.go deleted file mode 100644 index 8919232fd8..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a.pb.go +++ /dev/null @@ -1,1377 +0,0 @@ -// Copyright 2021 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/s2a/s2a.proto - -package s2a_go_proto - -import ( - common_go_proto "github.com/google/s2a-go/internal/proto/common_go_proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type AuthenticationMechanism struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // (Optional) Application may specify an identity associated to an - // authentication mechanism. Otherwise, S2A assumes that the authentication - // mechanism is associated with the default identity. If the default identity - // cannot be determined, session setup fails. - Identity *common_go_proto.Identity `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"` - // Types that are assignable to MechanismOneof: - // - // *AuthenticationMechanism_Token - MechanismOneof isAuthenticationMechanism_MechanismOneof `protobuf_oneof:"mechanism_oneof"` -} - -func (x *AuthenticationMechanism) Reset() { - *x = AuthenticationMechanism{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthenticationMechanism) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthenticationMechanism) ProtoMessage() {} - -func (x *AuthenticationMechanism) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthenticationMechanism.ProtoReflect.Descriptor instead. -func (*AuthenticationMechanism) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{0} -} - -func (x *AuthenticationMechanism) GetIdentity() *common_go_proto.Identity { - if x != nil { - return x.Identity - } - return nil -} - -func (m *AuthenticationMechanism) GetMechanismOneof() isAuthenticationMechanism_MechanismOneof { - if m != nil { - return m.MechanismOneof - } - return nil -} - -func (x *AuthenticationMechanism) GetToken() string { - if x, ok := x.GetMechanismOneof().(*AuthenticationMechanism_Token); ok { - return x.Token - } - return "" -} - -type isAuthenticationMechanism_MechanismOneof interface { - isAuthenticationMechanism_MechanismOneof() -} - -type AuthenticationMechanism_Token struct { - // A token that the application uses to authenticate itself to the S2A. - Token string `protobuf:"bytes,2,opt,name=token,proto3,oneof"` -} - -func (*AuthenticationMechanism_Token) isAuthenticationMechanism_MechanismOneof() {} - -type ClientSessionStartReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The application protocols supported by the client, e.g., "grpc". - ApplicationProtocols []string `protobuf:"bytes,1,rep,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` - // (Optional) The minimum TLS version number that the S2A's handshaker module - // will use to set up the session. If this field is not provided, S2A will use - // the minimum version it supports. - MinTlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=min_tls_version,json=minTlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"min_tls_version,omitempty"` - // (Optional) The maximum TLS version number that the S2A's handshaker module - // will use to set up the session. If this field is not provided, S2A will use - // the maximum version it supports. - MaxTlsVersion common_go_proto.TLSVersion `protobuf:"varint,3,opt,name=max_tls_version,json=maxTlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"max_tls_version,omitempty"` - // The TLS ciphersuites that the client is willing to support. - TlsCiphersuites []common_go_proto.Ciphersuite `protobuf:"varint,4,rep,packed,name=tls_ciphersuites,json=tlsCiphersuites,proto3,enum=s2a.proto.Ciphersuite" json:"tls_ciphersuites,omitempty"` - // (Optional) Describes which server identities are acceptable by the client. - // If target identities are provided and none of them matches the peer - // identity of the server, session setup fails. - TargetIdentities []*common_go_proto.Identity `protobuf:"bytes,5,rep,name=target_identities,json=targetIdentities,proto3" json:"target_identities,omitempty"` - // (Optional) Application may specify a local identity. Otherwise, S2A chooses - // the default local identity. If the default identity cannot be determined, - // session setup fails. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,6,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The target name that is used by S2A to configure SNI in the TLS handshake. - // It is also used to perform server authorization check if avaiable. This - // check is intended to verify that the peer authenticated identity is - // authorized to run a service with the target name. - // This field MUST only contain the host portion of the server address. It - // MUST not contain the scheme or the port number. For example, if the server - // address is dns://www.example.com:443, the value of this field should be - // set to www.example.com. - TargetName string `protobuf:"bytes,7,opt,name=target_name,json=targetName,proto3" json:"target_name,omitempty"` -} - -func (x *ClientSessionStartReq) Reset() { - *x = ClientSessionStartReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientSessionStartReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientSessionStartReq) ProtoMessage() {} - -func (x *ClientSessionStartReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientSessionStartReq.ProtoReflect.Descriptor instead. -func (*ClientSessionStartReq) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{1} -} - -func (x *ClientSessionStartReq) GetApplicationProtocols() []string { - if x != nil { - return x.ApplicationProtocols - } - return nil -} - -func (x *ClientSessionStartReq) GetMinTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MinTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *ClientSessionStartReq) GetMaxTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MaxTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *ClientSessionStartReq) GetTlsCiphersuites() []common_go_proto.Ciphersuite { - if x != nil { - return x.TlsCiphersuites - } - return nil -} - -func (x *ClientSessionStartReq) GetTargetIdentities() []*common_go_proto.Identity { - if x != nil { - return x.TargetIdentities - } - return nil -} - -func (x *ClientSessionStartReq) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *ClientSessionStartReq) GetTargetName() string { - if x != nil { - return x.TargetName - } - return "" -} - -type ServerSessionStartReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The application protocols supported by the server, e.g., "grpc". - ApplicationProtocols []string `protobuf:"bytes,1,rep,name=application_protocols,json=applicationProtocols,proto3" json:"application_protocols,omitempty"` - // (Optional) The minimum TLS version number that the S2A's handshaker module - // will use to set up the session. If this field is not provided, S2A will use - // the minimum version it supports. - MinTlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=min_tls_version,json=minTlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"min_tls_version,omitempty"` - // (Optional) The maximum TLS version number that the S2A's handshaker module - // will use to set up the session. If this field is not provided, S2A will use - // the maximum version it supports. - MaxTlsVersion common_go_proto.TLSVersion `protobuf:"varint,3,opt,name=max_tls_version,json=maxTlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"max_tls_version,omitempty"` - // The TLS ciphersuites that the server is willing to support. - TlsCiphersuites []common_go_proto.Ciphersuite `protobuf:"varint,4,rep,packed,name=tls_ciphersuites,json=tlsCiphersuites,proto3,enum=s2a.proto.Ciphersuite" json:"tls_ciphersuites,omitempty"` - // (Optional) A list of local identities supported by the server, if - // specified. Otherwise, S2A chooses the default local identity. If the - // default identity cannot be determined, session setup fails. - LocalIdentities []*common_go_proto.Identity `protobuf:"bytes,5,rep,name=local_identities,json=localIdentities,proto3" json:"local_identities,omitempty"` - // The byte representation of the first handshake message received from the - // client peer. It is possible that this first message is split into multiple - // chunks. In this case, the first chunk is sent using this field and the - // following chunks are sent using the in_bytes field of SessionNextReq - // Specifically, if the client peer is using S2A, this field contains the - // bytes in the out_frames field of SessionResp message that the client peer - // received from its S2A after initiating the handshake. - InBytes []byte `protobuf:"bytes,6,opt,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` -} - -func (x *ServerSessionStartReq) Reset() { - *x = ServerSessionStartReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerSessionStartReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerSessionStartReq) ProtoMessage() {} - -func (x *ServerSessionStartReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerSessionStartReq.ProtoReflect.Descriptor instead. -func (*ServerSessionStartReq) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{2} -} - -func (x *ServerSessionStartReq) GetApplicationProtocols() []string { - if x != nil { - return x.ApplicationProtocols - } - return nil -} - -func (x *ServerSessionStartReq) GetMinTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MinTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *ServerSessionStartReq) GetMaxTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MaxTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *ServerSessionStartReq) GetTlsCiphersuites() []common_go_proto.Ciphersuite { - if x != nil { - return x.TlsCiphersuites - } - return nil -} - -func (x *ServerSessionStartReq) GetLocalIdentities() []*common_go_proto.Identity { - if x != nil { - return x.LocalIdentities - } - return nil -} - -func (x *ServerSessionStartReq) GetInBytes() []byte { - if x != nil { - return x.InBytes - } - return nil -} - -type SessionNextReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The byte representation of session setup, i.e., handshake messages. - // Specifically: - // - All handshake messages sent from the server to the client. - // - All, except for the first, handshake messages sent from the client to - // the server. Note that the first message is communicated to S2A using the - // in_bytes field of ServerSessionStartReq. - // - // If the peer is using S2A, this field contains the bytes in the out_frames - // field of SessionResp message that the peer received from its S2A. - InBytes []byte `protobuf:"bytes,1,opt,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` -} - -func (x *SessionNextReq) Reset() { - *x = SessionNextReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionNextReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionNextReq) ProtoMessage() {} - -func (x *SessionNextReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionNextReq.ProtoReflect.Descriptor instead. -func (*SessionNextReq) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{3} -} - -func (x *SessionNextReq) GetInBytes() []byte { - if x != nil { - return x.InBytes - } - return nil -} - -type ResumptionTicketReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The byte representation of a NewSessionTicket message received from the - // server. - InBytes [][]byte `protobuf:"bytes,1,rep,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` - // A connection identifier that was created and sent by S2A at the end of a - // handshake. - ConnectionId uint64 `protobuf:"varint,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - // The local identity that was used by S2A during session setup and included - // in |SessionResult|. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,3,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` -} - -func (x *ResumptionTicketReq) Reset() { - *x = ResumptionTicketReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResumptionTicketReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResumptionTicketReq) ProtoMessage() {} - -func (x *ResumptionTicketReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResumptionTicketReq.ProtoReflect.Descriptor instead. -func (*ResumptionTicketReq) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{4} -} - -func (x *ResumptionTicketReq) GetInBytes() [][]byte { - if x != nil { - return x.InBytes - } - return nil -} - -func (x *ResumptionTicketReq) GetConnectionId() uint64 { - if x != nil { - return x.ConnectionId - } - return 0 -} - -func (x *ResumptionTicketReq) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -type SessionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ReqOneof: - // - // *SessionReq_ClientStart - // *SessionReq_ServerStart - // *SessionReq_Next - // *SessionReq_ResumptionTicket - ReqOneof isSessionReq_ReqOneof `protobuf_oneof:"req_oneof"` - // (Optional) The authentication mechanisms that the client wishes to use to - // authenticate to the S2A, ordered by preference. The S2A will always use the - // first authentication mechanism that appears in the list and is supported by - // the S2A. - AuthMechanisms []*AuthenticationMechanism `protobuf:"bytes,5,rep,name=auth_mechanisms,json=authMechanisms,proto3" json:"auth_mechanisms,omitempty"` -} - -func (x *SessionReq) Reset() { - *x = SessionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionReq) ProtoMessage() {} - -func (x *SessionReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionReq.ProtoReflect.Descriptor instead. -func (*SessionReq) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{5} -} - -func (m *SessionReq) GetReqOneof() isSessionReq_ReqOneof { - if m != nil { - return m.ReqOneof - } - return nil -} - -func (x *SessionReq) GetClientStart() *ClientSessionStartReq { - if x, ok := x.GetReqOneof().(*SessionReq_ClientStart); ok { - return x.ClientStart - } - return nil -} - -func (x *SessionReq) GetServerStart() *ServerSessionStartReq { - if x, ok := x.GetReqOneof().(*SessionReq_ServerStart); ok { - return x.ServerStart - } - return nil -} - -func (x *SessionReq) GetNext() *SessionNextReq { - if x, ok := x.GetReqOneof().(*SessionReq_Next); ok { - return x.Next - } - return nil -} - -func (x *SessionReq) GetResumptionTicket() *ResumptionTicketReq { - if x, ok := x.GetReqOneof().(*SessionReq_ResumptionTicket); ok { - return x.ResumptionTicket - } - return nil -} - -func (x *SessionReq) GetAuthMechanisms() []*AuthenticationMechanism { - if x != nil { - return x.AuthMechanisms - } - return nil -} - -type isSessionReq_ReqOneof interface { - isSessionReq_ReqOneof() -} - -type SessionReq_ClientStart struct { - // The client session setup request message. - ClientStart *ClientSessionStartReq `protobuf:"bytes,1,opt,name=client_start,json=clientStart,proto3,oneof"` -} - -type SessionReq_ServerStart struct { - // The server session setup request message. - ServerStart *ServerSessionStartReq `protobuf:"bytes,2,opt,name=server_start,json=serverStart,proto3,oneof"` -} - -type SessionReq_Next struct { - // The next session setup message request message. - Next *SessionNextReq `protobuf:"bytes,3,opt,name=next,proto3,oneof"` -} - -type SessionReq_ResumptionTicket struct { - // The resumption ticket that is received from the server. This message is - // only accepted by S2A if it is running as a client and if it is received - // after session setup is complete. If S2A is running as a server and it - // receives this message, the session is terminated. - ResumptionTicket *ResumptionTicketReq `protobuf:"bytes,4,opt,name=resumption_ticket,json=resumptionTicket,proto3,oneof"` -} - -func (*SessionReq_ClientStart) isSessionReq_ReqOneof() {} - -func (*SessionReq_ServerStart) isSessionReq_ReqOneof() {} - -func (*SessionReq_Next) isSessionReq_ReqOneof() {} - -func (*SessionReq_ResumptionTicket) isSessionReq_ReqOneof() {} - -type SessionState struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The TLS version number that the S2A's handshaker module used to set up the - // session. - TlsVersion common_go_proto.TLSVersion `protobuf:"varint,1,opt,name=tls_version,json=tlsVersion,proto3,enum=s2a.proto.TLSVersion" json:"tls_version,omitempty"` - // The TLS ciphersuite negotiated by the S2A's handshaker module. - TlsCiphersuite common_go_proto.Ciphersuite `protobuf:"varint,2,opt,name=tls_ciphersuite,json=tlsCiphersuite,proto3,enum=s2a.proto.Ciphersuite" json:"tls_ciphersuite,omitempty"` - // The sequence number of the next, incoming, TLS record. - InSequence uint64 `protobuf:"varint,3,opt,name=in_sequence,json=inSequence,proto3" json:"in_sequence,omitempty"` - // The sequence number of the next, outgoing, TLS record. - OutSequence uint64 `protobuf:"varint,4,opt,name=out_sequence,json=outSequence,proto3" json:"out_sequence,omitempty"` - // The key for the inbound direction. - InKey []byte `protobuf:"bytes,5,opt,name=in_key,json=inKey,proto3" json:"in_key,omitempty"` - // The key for the outbound direction. - OutKey []byte `protobuf:"bytes,6,opt,name=out_key,json=outKey,proto3" json:"out_key,omitempty"` - // The constant part of the record nonce for the outbound direction. - InFixedNonce []byte `protobuf:"bytes,7,opt,name=in_fixed_nonce,json=inFixedNonce,proto3" json:"in_fixed_nonce,omitempty"` - // The constant part of the record nonce for the inbound direction. - OutFixedNonce []byte `protobuf:"bytes,8,opt,name=out_fixed_nonce,json=outFixedNonce,proto3" json:"out_fixed_nonce,omitempty"` - // A connection identifier that can be provided to S2A to perform operations - // related to this connection. This identifier will be stored by the record - // protocol, and included in the |ResumptionTicketReq| message that is later - // sent back to S2A. This field is set only for client-side connections. - ConnectionId uint64 `protobuf:"varint,9,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"` - // Set to true if a cached session was reused to do an abbreviated handshake. - IsHandshakeResumed bool `protobuf:"varint,10,opt,name=is_handshake_resumed,json=isHandshakeResumed,proto3" json:"is_handshake_resumed,omitempty"` -} - -func (x *SessionState) Reset() { - *x = SessionState{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionState) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionState) ProtoMessage() {} - -func (x *SessionState) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionState.ProtoReflect.Descriptor instead. -func (*SessionState) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{6} -} - -func (x *SessionState) GetTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.TlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *SessionState) GetTlsCiphersuite() common_go_proto.Ciphersuite { - if x != nil { - return x.TlsCiphersuite - } - return common_go_proto.Ciphersuite(0) -} - -func (x *SessionState) GetInSequence() uint64 { - if x != nil { - return x.InSequence - } - return 0 -} - -func (x *SessionState) GetOutSequence() uint64 { - if x != nil { - return x.OutSequence - } - return 0 -} - -func (x *SessionState) GetInKey() []byte { - if x != nil { - return x.InKey - } - return nil -} - -func (x *SessionState) GetOutKey() []byte { - if x != nil { - return x.OutKey - } - return nil -} - -func (x *SessionState) GetInFixedNonce() []byte { - if x != nil { - return x.InFixedNonce - } - return nil -} - -func (x *SessionState) GetOutFixedNonce() []byte { - if x != nil { - return x.OutFixedNonce - } - return nil -} - -func (x *SessionState) GetConnectionId() uint64 { - if x != nil { - return x.ConnectionId - } - return 0 -} - -func (x *SessionState) GetIsHandshakeResumed() bool { - if x != nil { - return x.IsHandshakeResumed - } - return false -} - -type SessionResult struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The application protocol negotiated for this session. - ApplicationProtocol string `protobuf:"bytes,1,opt,name=application_protocol,json=applicationProtocol,proto3" json:"application_protocol,omitempty"` - // The session state at the end. This state contains all cryptographic - // material required to initialize the record protocol object. - State *SessionState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` - // The authenticated identity of the peer. - PeerIdentity *common_go_proto.Identity `protobuf:"bytes,4,opt,name=peer_identity,json=peerIdentity,proto3" json:"peer_identity,omitempty"` - // The local identity used during session setup. This could be: - // - The local identity that the client specifies in ClientSessionStartReq. - // - One of the local identities that the server specifies in - // ServerSessionStartReq. - // - If neither client or server specifies local identities, the S2A picks the - // default one. In this case, this field will contain that identity. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,5,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The SHA256 hash of the local certificate used in the handshake. - LocalCertFingerprint []byte `protobuf:"bytes,6,opt,name=local_cert_fingerprint,json=localCertFingerprint,proto3" json:"local_cert_fingerprint,omitempty"` - // The SHA256 hash of the peer certificate used in the handshake. - PeerCertFingerprint []byte `protobuf:"bytes,7,opt,name=peer_cert_fingerprint,json=peerCertFingerprint,proto3" json:"peer_cert_fingerprint,omitempty"` -} - -func (x *SessionResult) Reset() { - *x = SessionResult{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionResult) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionResult) ProtoMessage() {} - -func (x *SessionResult) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionResult.ProtoReflect.Descriptor instead. -func (*SessionResult) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{7} -} - -func (x *SessionResult) GetApplicationProtocol() string { - if x != nil { - return x.ApplicationProtocol - } - return "" -} - -func (x *SessionResult) GetState() *SessionState { - if x != nil { - return x.State - } - return nil -} - -func (x *SessionResult) GetPeerIdentity() *common_go_proto.Identity { - if x != nil { - return x.PeerIdentity - } - return nil -} - -func (x *SessionResult) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *SessionResult) GetLocalCertFingerprint() []byte { - if x != nil { - return x.LocalCertFingerprint - } - return nil -} - -func (x *SessionResult) GetPeerCertFingerprint() []byte { - if x != nil { - return x.PeerCertFingerprint - } - return nil -} - -type SessionStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The status code that is specific to the application and the implementation - // of S2A, e.g., gRPC status code. - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // The status details. - Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` -} - -func (x *SessionStatus) Reset() { - *x = SessionStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionStatus) ProtoMessage() {} - -func (x *SessionStatus) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionStatus.ProtoReflect.Descriptor instead. -func (*SessionStatus) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{8} -} - -func (x *SessionStatus) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *SessionStatus) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -type SessionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The local identity used during session setup. This could be: - // - The local identity that the client specifies in ClientSessionStartReq. - // - One of the local identities that the server specifies in - // ServerSessionStartReq. - // - If neither client or server specifies local identities, the S2A picks the - // default one. In this case, this field will contain that identity. - // - // If the SessionResult is populated, then this must coincide with the local - // identity specified in the SessionResult; otherwise, the handshake must - // fail. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,1,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The byte representation of the frames that should be sent to the peer. May - // be empty if nothing needs to be sent to the peer or if in_bytes in the - // SessionReq is incomplete. All bytes in a non-empty out_frames must be sent - // to the peer even if the session setup status is not OK as these frames may - // contain appropriate alerts. - OutFrames []byte `protobuf:"bytes,2,opt,name=out_frames,json=outFrames,proto3" json:"out_frames,omitempty"` - // Number of bytes in the in_bytes field that are consumed by S2A. It is - // possible that part of in_bytes is unrelated to the session setup process. - BytesConsumed uint32 `protobuf:"varint,3,opt,name=bytes_consumed,json=bytesConsumed,proto3" json:"bytes_consumed,omitempty"` - // This is set if the session is successfully set up. out_frames may - // still be set to frames that needs to be forwarded to the peer. - Result *SessionResult `protobuf:"bytes,4,opt,name=result,proto3" json:"result,omitempty"` - // Status of session setup at the current stage. - Status *SessionStatus `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` -} - -func (x *SessionResp) Reset() { - *x = SessionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionResp) ProtoMessage() {} - -func (x *SessionResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_s2a_s2a_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionResp.ProtoReflect.Descriptor instead. -func (*SessionResp) Descriptor() ([]byte, []int) { - return file_internal_proto_s2a_s2a_proto_rawDescGZIP(), []int{9} -} - -func (x *SessionResp) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *SessionResp) GetOutFrames() []byte { - if x != nil { - return x.OutFrames - } - return nil -} - -func (x *SessionResp) GetBytesConsumed() uint32 { - if x != nil { - return x.BytesConsumed - } - return 0 -} - -func (x *SessionResp) GetResult() *SessionResult { - if x != nil { - return x.Result - } - return nil -} - -func (x *SessionResp) GetStatus() *SessionStatus { - if x != nil { - return x.Status - } - return nil -} - -var File_internal_proto_s2a_s2a_proto protoreflect.FileDescriptor - -var file_internal_proto_s2a_s2a_proto_rawDesc = []byte{ - 0x0a, 0x1c, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, - 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x75, 0x0a, - 0x17, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, - 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x5f, 0x6f, - 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xac, 0x03, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, - 0x0a, 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, - 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x41, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, - 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, - 0x69, 0x74, 0x65, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, - 0x69, 0x74, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x11, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x52, 0x10, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0xe8, 0x02, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x12, 0x33, 0x0a, - 0x15, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x73, 0x12, 0x3d, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x3d, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x41, 0x0a, 0x10, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, - 0x69, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x52, 0x0f, 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x73, 0x12, 0x3e, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x52, 0x0f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x2b, - 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, - 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x91, 0x01, 0x0a, 0x13, - 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x23, - 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, - 0xf4, 0x02, 0x0a, 0x0a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x45, - 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, - 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2f, 0x0a, 0x04, - 0x6e, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4e, 0x65, - 0x78, 0x74, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x12, 0x4d, 0x0a, - 0x11, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x65, 0x71, 0x48, 0x00, 0x52, 0x10, 0x72, 0x65, 0x73, 0x75, - 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x4b, 0x0a, 0x0f, - 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x73, 0x18, - 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x4d, - 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x73, 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65, 0x71, - 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xa0, 0x03, 0x0a, 0x0c, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x0b, 0x74, 0x6c, 0x73, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, - 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x74, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x3f, 0x0a, 0x0f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, - 0x52, 0x0e, 0x74, 0x6c, 0x73, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, - 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x69, 0x6e, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x71, 0x75, - 0x65, 0x6e, 0x63, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x69, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x17, 0x0a, 0x07, 0x6f, - 0x75, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, - 0x74, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, - 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x69, 0x6e, - 0x46, 0x69, 0x78, 0x65, 0x64, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x6f, 0x75, - 0x74, 0x5f, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x46, 0x69, 0x78, 0x65, 0x64, 0x4e, 0x6f, 0x6e, - 0x63, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x68, 0x61, - 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x12, 0x69, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, - 0x6b, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x22, 0xd1, 0x02, 0x0a, 0x0d, 0x53, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x31, 0x0a, 0x14, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x2d, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x38, 0x0a, - 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0c, 0x70, 0x65, 0x65, 0x72, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x16, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x14, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, - 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x70, 0x65, 0x65, - 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, - 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x13, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, - 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x22, 0x3d, 0x0a, - 0x0d, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0xf3, 0x01, 0x0a, - 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3a, 0x0a, 0x0e, - 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x5f, - 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x75, - 0x74, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x0d, 0x62, 0x79, 0x74, 0x65, 0x73, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x12, 0x30, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x30, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x32, 0x51, 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x43, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x55, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x15, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x33, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x32, - 0x61, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_internal_proto_s2a_s2a_proto_rawDescOnce sync.Once - file_internal_proto_s2a_s2a_proto_rawDescData = file_internal_proto_s2a_s2a_proto_rawDesc -) - -func file_internal_proto_s2a_s2a_proto_rawDescGZIP() []byte { - file_internal_proto_s2a_s2a_proto_rawDescOnce.Do(func() { - file_internal_proto_s2a_s2a_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_s2a_s2a_proto_rawDescData) - }) - return file_internal_proto_s2a_s2a_proto_rawDescData -} - -var file_internal_proto_s2a_s2a_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_internal_proto_s2a_s2a_proto_goTypes = []any{ - (*AuthenticationMechanism)(nil), // 0: s2a.proto.AuthenticationMechanism - (*ClientSessionStartReq)(nil), // 1: s2a.proto.ClientSessionStartReq - (*ServerSessionStartReq)(nil), // 2: s2a.proto.ServerSessionStartReq - (*SessionNextReq)(nil), // 3: s2a.proto.SessionNextReq - (*ResumptionTicketReq)(nil), // 4: s2a.proto.ResumptionTicketReq - (*SessionReq)(nil), // 5: s2a.proto.SessionReq - (*SessionState)(nil), // 6: s2a.proto.SessionState - (*SessionResult)(nil), // 7: s2a.proto.SessionResult - (*SessionStatus)(nil), // 8: s2a.proto.SessionStatus - (*SessionResp)(nil), // 9: s2a.proto.SessionResp - (*common_go_proto.Identity)(nil), // 10: s2a.proto.Identity - (common_go_proto.TLSVersion)(0), // 11: s2a.proto.TLSVersion - (common_go_proto.Ciphersuite)(0), // 12: s2a.proto.Ciphersuite -} -var file_internal_proto_s2a_s2a_proto_depIdxs = []int32{ - 10, // 0: s2a.proto.AuthenticationMechanism.identity:type_name -> s2a.proto.Identity - 11, // 1: s2a.proto.ClientSessionStartReq.min_tls_version:type_name -> s2a.proto.TLSVersion - 11, // 2: s2a.proto.ClientSessionStartReq.max_tls_version:type_name -> s2a.proto.TLSVersion - 12, // 3: s2a.proto.ClientSessionStartReq.tls_ciphersuites:type_name -> s2a.proto.Ciphersuite - 10, // 4: s2a.proto.ClientSessionStartReq.target_identities:type_name -> s2a.proto.Identity - 10, // 5: s2a.proto.ClientSessionStartReq.local_identity:type_name -> s2a.proto.Identity - 11, // 6: s2a.proto.ServerSessionStartReq.min_tls_version:type_name -> s2a.proto.TLSVersion - 11, // 7: s2a.proto.ServerSessionStartReq.max_tls_version:type_name -> s2a.proto.TLSVersion - 12, // 8: s2a.proto.ServerSessionStartReq.tls_ciphersuites:type_name -> s2a.proto.Ciphersuite - 10, // 9: s2a.proto.ServerSessionStartReq.local_identities:type_name -> s2a.proto.Identity - 10, // 10: s2a.proto.ResumptionTicketReq.local_identity:type_name -> s2a.proto.Identity - 1, // 11: s2a.proto.SessionReq.client_start:type_name -> s2a.proto.ClientSessionStartReq - 2, // 12: s2a.proto.SessionReq.server_start:type_name -> s2a.proto.ServerSessionStartReq - 3, // 13: s2a.proto.SessionReq.next:type_name -> s2a.proto.SessionNextReq - 4, // 14: s2a.proto.SessionReq.resumption_ticket:type_name -> s2a.proto.ResumptionTicketReq - 0, // 15: s2a.proto.SessionReq.auth_mechanisms:type_name -> s2a.proto.AuthenticationMechanism - 11, // 16: s2a.proto.SessionState.tls_version:type_name -> s2a.proto.TLSVersion - 12, // 17: s2a.proto.SessionState.tls_ciphersuite:type_name -> s2a.proto.Ciphersuite - 6, // 18: s2a.proto.SessionResult.state:type_name -> s2a.proto.SessionState - 10, // 19: s2a.proto.SessionResult.peer_identity:type_name -> s2a.proto.Identity - 10, // 20: s2a.proto.SessionResult.local_identity:type_name -> s2a.proto.Identity - 10, // 21: s2a.proto.SessionResp.local_identity:type_name -> s2a.proto.Identity - 7, // 22: s2a.proto.SessionResp.result:type_name -> s2a.proto.SessionResult - 8, // 23: s2a.proto.SessionResp.status:type_name -> s2a.proto.SessionStatus - 5, // 24: s2a.proto.S2AService.SetUpSession:input_type -> s2a.proto.SessionReq - 9, // 25: s2a.proto.S2AService.SetUpSession:output_type -> s2a.proto.SessionResp - 25, // [25:26] is the sub-list for method output_type - 24, // [24:25] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_internal_proto_s2a_s2a_proto_init() } -func file_internal_proto_s2a_s2a_proto_init() { - if File_internal_proto_s2a_s2a_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_s2a_s2a_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AuthenticationMechanism); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ClientSessionStartReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*ServerSessionStartReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*SessionNextReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ResumptionTicketReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*SessionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*SessionState); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*SessionResult); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*SessionStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*SessionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_internal_proto_s2a_s2a_proto_msgTypes[0].OneofWrappers = []any{ - (*AuthenticationMechanism_Token)(nil), - } - file_internal_proto_s2a_s2a_proto_msgTypes[5].OneofWrappers = []any{ - (*SessionReq_ClientStart)(nil), - (*SessionReq_ServerStart)(nil), - (*SessionReq_Next)(nil), - (*SessionReq_ResumptionTicket)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_s2a_s2a_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_internal_proto_s2a_s2a_proto_goTypes, - DependencyIndexes: file_internal_proto_s2a_s2a_proto_depIdxs, - MessageInfos: file_internal_proto_s2a_s2a_proto_msgTypes, - }.Build() - File_internal_proto_s2a_s2a_proto = out.File - file_internal_proto_s2a_s2a_proto_rawDesc = nil - file_internal_proto_s2a_s2a_proto_goTypes = nil - file_internal_proto_s2a_s2a_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a_grpc.pb.go b/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a_grpc.pb.go deleted file mode 100644 index 8fac3841be..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/s2a_go_proto/s2a_grpc.pb.go +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2021 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 -// -// https://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. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.21.12 -// source: internal/proto/s2a/s2a.proto - -package s2a_go_proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - S2AService_SetUpSession_FullMethodName = "/s2a.proto.S2AService/SetUpSession" -) - -// S2AServiceClient is the client API for S2AService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type S2AServiceClient interface { - // S2A service accepts a stream of session setup requests and returns a stream - // of session setup responses. The client of this service is expected to send - // exactly one client_start or server_start message followed by at least one - // next message. Applications running TLS clients can send requests with - // resumption_ticket messages only after the session is successfully set up. - // - // Every time S2A client sends a request, this service sends a response. - // However, clients do not have to wait for service response before sending - // the next request. - SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error) -} - -type s2AServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewS2AServiceClient(cc grpc.ClientConnInterface) S2AServiceClient { - return &s2AServiceClient{cc} -} - -func (c *s2AServiceClient) SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &S2AService_ServiceDesc.Streams[0], S2AService_SetUpSession_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &s2AServiceSetUpSessionClient{ClientStream: stream} - return x, nil -} - -type S2AService_SetUpSessionClient interface { - Send(*SessionReq) error - Recv() (*SessionResp, error) - grpc.ClientStream -} - -type s2AServiceSetUpSessionClient struct { - grpc.ClientStream -} - -func (x *s2AServiceSetUpSessionClient) Send(m *SessionReq) error { - return x.ClientStream.SendMsg(m) -} - -func (x *s2AServiceSetUpSessionClient) Recv() (*SessionResp, error) { - m := new(SessionResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// S2AServiceServer is the server API for S2AService service. -// All implementations must embed UnimplementedS2AServiceServer -// for forward compatibility -type S2AServiceServer interface { - // S2A service accepts a stream of session setup requests and returns a stream - // of session setup responses. The client of this service is expected to send - // exactly one client_start or server_start message followed by at least one - // next message. Applications running TLS clients can send requests with - // resumption_ticket messages only after the session is successfully set up. - // - // Every time S2A client sends a request, this service sends a response. - // However, clients do not have to wait for service response before sending - // the next request. - SetUpSession(S2AService_SetUpSessionServer) error - mustEmbedUnimplementedS2AServiceServer() -} - -// UnimplementedS2AServiceServer must be embedded to have forward compatible implementations. -type UnimplementedS2AServiceServer struct { -} - -func (UnimplementedS2AServiceServer) SetUpSession(S2AService_SetUpSessionServer) error { - return status.Errorf(codes.Unimplemented, "method SetUpSession not implemented") -} -func (UnimplementedS2AServiceServer) mustEmbedUnimplementedS2AServiceServer() {} - -// UnsafeS2AServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to S2AServiceServer will -// result in compilation errors. -type UnsafeS2AServiceServer interface { - mustEmbedUnimplementedS2AServiceServer() -} - -func RegisterS2AServiceServer(s grpc.ServiceRegistrar, srv S2AServiceServer) { - s.RegisterService(&S2AService_ServiceDesc, srv) -} - -func _S2AService_SetUpSession_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(S2AServiceServer).SetUpSession(&s2AServiceSetUpSessionServer{ServerStream: stream}) -} - -type S2AService_SetUpSessionServer interface { - Send(*SessionResp) error - Recv() (*SessionReq, error) - grpc.ServerStream -} - -type s2AServiceSetUpSessionServer struct { - grpc.ServerStream -} - -func (x *s2AServiceSetUpSessionServer) Send(m *SessionResp) error { - return x.ServerStream.SendMsg(m) -} - -func (x *s2AServiceSetUpSessionServer) Recv() (*SessionReq, error) { - m := new(SessionReq) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// S2AService_ServiceDesc is the grpc.ServiceDesc for S2AService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var S2AService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "s2a.proto.S2AService", - HandlerType: (*S2AServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "SetUpSession", - Handler: _S2AService_SetUpSession_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "internal/proto/s2a/s2a.proto", -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/v2/common_go_proto/common.pb.go b/vendor/github.com/google/s2a-go/internal/proto/v2/common_go_proto/common.pb.go deleted file mode 100644 index e9aa5d14c0..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/v2/common_go_proto/common.pb.go +++ /dev/null @@ -1,549 +0,0 @@ -// Copyright 2022 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/v2/common/common.proto - -package common_go_proto - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The TLS 1.0-1.2 ciphersuites that the application can negotiate when using -// S2A. -type Ciphersuite int32 - -const ( - Ciphersuite_CIPHERSUITE_UNSPECIFIED Ciphersuite = 0 - Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 Ciphersuite = 1 - Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 Ciphersuite = 2 - Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 Ciphersuite = 3 - Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256 Ciphersuite = 4 - Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_AES_256_GCM_SHA384 Ciphersuite = 5 - Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 Ciphersuite = 6 -) - -// Enum value maps for Ciphersuite. -var ( - Ciphersuite_name = map[int32]string{ - 0: "CIPHERSUITE_UNSPECIFIED", - 1: "CIPHERSUITE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", - 2: "CIPHERSUITE_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", - 3: "CIPHERSUITE_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", - 4: "CIPHERSUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256", - 5: "CIPHERSUITE_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - 6: "CIPHERSUITE_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", - } - Ciphersuite_value = map[string]int32{ - "CIPHERSUITE_UNSPECIFIED": 0, - "CIPHERSUITE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": 1, - "CIPHERSUITE_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": 2, - "CIPHERSUITE_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": 3, - "CIPHERSUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256": 4, - "CIPHERSUITE_ECDHE_RSA_WITH_AES_256_GCM_SHA384": 5, - "CIPHERSUITE_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": 6, - } -) - -func (x Ciphersuite) Enum() *Ciphersuite { - p := new(Ciphersuite) - *p = x - return p -} - -func (x Ciphersuite) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Ciphersuite) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_common_common_proto_enumTypes[0].Descriptor() -} - -func (Ciphersuite) Type() protoreflect.EnumType { - return &file_internal_proto_v2_common_common_proto_enumTypes[0] -} - -func (x Ciphersuite) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Ciphersuite.Descriptor instead. -func (Ciphersuite) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_common_common_proto_rawDescGZIP(), []int{0} -} - -// The TLS versions supported by S2A's handshaker module. -type TLSVersion int32 - -const ( - TLSVersion_TLS_VERSION_UNSPECIFIED TLSVersion = 0 - TLSVersion_TLS_VERSION_1_0 TLSVersion = 1 - TLSVersion_TLS_VERSION_1_1 TLSVersion = 2 - TLSVersion_TLS_VERSION_1_2 TLSVersion = 3 - TLSVersion_TLS_VERSION_1_3 TLSVersion = 4 -) - -// Enum value maps for TLSVersion. -var ( - TLSVersion_name = map[int32]string{ - 0: "TLS_VERSION_UNSPECIFIED", - 1: "TLS_VERSION_1_0", - 2: "TLS_VERSION_1_1", - 3: "TLS_VERSION_1_2", - 4: "TLS_VERSION_1_3", - } - TLSVersion_value = map[string]int32{ - "TLS_VERSION_UNSPECIFIED": 0, - "TLS_VERSION_1_0": 1, - "TLS_VERSION_1_1": 2, - "TLS_VERSION_1_2": 3, - "TLS_VERSION_1_3": 4, - } -) - -func (x TLSVersion) Enum() *TLSVersion { - p := new(TLSVersion) - *p = x - return p -} - -func (x TLSVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TLSVersion) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_common_common_proto_enumTypes[1].Descriptor() -} - -func (TLSVersion) Type() protoreflect.EnumType { - return &file_internal_proto_v2_common_common_proto_enumTypes[1] -} - -func (x TLSVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TLSVersion.Descriptor instead. -func (TLSVersion) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_common_common_proto_rawDescGZIP(), []int{1} -} - -// The side in the TLS connection. -type ConnectionSide int32 - -const ( - ConnectionSide_CONNECTION_SIDE_UNSPECIFIED ConnectionSide = 0 - ConnectionSide_CONNECTION_SIDE_CLIENT ConnectionSide = 1 - ConnectionSide_CONNECTION_SIDE_SERVER ConnectionSide = 2 -) - -// Enum value maps for ConnectionSide. -var ( - ConnectionSide_name = map[int32]string{ - 0: "CONNECTION_SIDE_UNSPECIFIED", - 1: "CONNECTION_SIDE_CLIENT", - 2: "CONNECTION_SIDE_SERVER", - } - ConnectionSide_value = map[string]int32{ - "CONNECTION_SIDE_UNSPECIFIED": 0, - "CONNECTION_SIDE_CLIENT": 1, - "CONNECTION_SIDE_SERVER": 2, - } -) - -func (x ConnectionSide) Enum() *ConnectionSide { - p := new(ConnectionSide) - *p = x - return p -} - -func (x ConnectionSide) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ConnectionSide) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_common_common_proto_enumTypes[2].Descriptor() -} - -func (ConnectionSide) Type() protoreflect.EnumType { - return &file_internal_proto_v2_common_common_proto_enumTypes[2] -} - -func (x ConnectionSide) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ConnectionSide.Descriptor instead. -func (ConnectionSide) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_common_common_proto_rawDescGZIP(), []int{2} -} - -// The ALPN protocols that the application can negotiate during a TLS handshake. -type AlpnProtocol int32 - -const ( - AlpnProtocol_ALPN_PROTOCOL_UNSPECIFIED AlpnProtocol = 0 - AlpnProtocol_ALPN_PROTOCOL_GRPC AlpnProtocol = 1 - AlpnProtocol_ALPN_PROTOCOL_HTTP2 AlpnProtocol = 2 - AlpnProtocol_ALPN_PROTOCOL_HTTP1_1 AlpnProtocol = 3 -) - -// Enum value maps for AlpnProtocol. -var ( - AlpnProtocol_name = map[int32]string{ - 0: "ALPN_PROTOCOL_UNSPECIFIED", - 1: "ALPN_PROTOCOL_GRPC", - 2: "ALPN_PROTOCOL_HTTP2", - 3: "ALPN_PROTOCOL_HTTP1_1", - } - AlpnProtocol_value = map[string]int32{ - "ALPN_PROTOCOL_UNSPECIFIED": 0, - "ALPN_PROTOCOL_GRPC": 1, - "ALPN_PROTOCOL_HTTP2": 2, - "ALPN_PROTOCOL_HTTP1_1": 3, - } -) - -func (x AlpnProtocol) Enum() *AlpnProtocol { - p := new(AlpnProtocol) - *p = x - return p -} - -func (x AlpnProtocol) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (AlpnProtocol) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_common_common_proto_enumTypes[3].Descriptor() -} - -func (AlpnProtocol) Type() protoreflect.EnumType { - return &file_internal_proto_v2_common_common_proto_enumTypes[3] -} - -func (x AlpnProtocol) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use AlpnProtocol.Descriptor instead. -func (AlpnProtocol) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_common_common_proto_rawDescGZIP(), []int{3} -} - -type Identity struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to IdentityOneof: - // - // *Identity_SpiffeId - // *Identity_Hostname - // *Identity_Uid - // *Identity_Username - // *Identity_GcpId - IdentityOneof isIdentity_IdentityOneof `protobuf_oneof:"identity_oneof"` - // Additional identity-specific attributes. - Attributes map[string]string `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Identity) Reset() { - *x = Identity{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_common_common_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identity) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identity) ProtoMessage() {} - -func (x *Identity) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_common_common_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Identity.ProtoReflect.Descriptor instead. -func (*Identity) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_common_common_proto_rawDescGZIP(), []int{0} -} - -func (m *Identity) GetIdentityOneof() isIdentity_IdentityOneof { - if m != nil { - return m.IdentityOneof - } - return nil -} - -func (x *Identity) GetSpiffeId() string { - if x, ok := x.GetIdentityOneof().(*Identity_SpiffeId); ok { - return x.SpiffeId - } - return "" -} - -func (x *Identity) GetHostname() string { - if x, ok := x.GetIdentityOneof().(*Identity_Hostname); ok { - return x.Hostname - } - return "" -} - -func (x *Identity) GetUid() string { - if x, ok := x.GetIdentityOneof().(*Identity_Uid); ok { - return x.Uid - } - return "" -} - -func (x *Identity) GetUsername() string { - if x, ok := x.GetIdentityOneof().(*Identity_Username); ok { - return x.Username - } - return "" -} - -func (x *Identity) GetGcpId() string { - if x, ok := x.GetIdentityOneof().(*Identity_GcpId); ok { - return x.GcpId - } - return "" -} - -func (x *Identity) GetAttributes() map[string]string { - if x != nil { - return x.Attributes - } - return nil -} - -type isIdentity_IdentityOneof interface { - isIdentity_IdentityOneof() -} - -type Identity_SpiffeId struct { - // The SPIFFE ID of a connection endpoint. - SpiffeId string `protobuf:"bytes,1,opt,name=spiffe_id,json=spiffeId,proto3,oneof"` -} - -type Identity_Hostname struct { - // The hostname of a connection endpoint. - Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3,oneof"` -} - -type Identity_Uid struct { - // The UID of a connection endpoint. - Uid string `protobuf:"bytes,4,opt,name=uid,proto3,oneof"` -} - -type Identity_Username struct { - // The username of a connection endpoint. - Username string `protobuf:"bytes,5,opt,name=username,proto3,oneof"` -} - -type Identity_GcpId struct { - // The GCP ID of a connection endpoint. - GcpId string `protobuf:"bytes,6,opt,name=gcp_id,json=gcpId,proto3,oneof"` -} - -func (*Identity_SpiffeId) isIdentity_IdentityOneof() {} - -func (*Identity_Hostname) isIdentity_IdentityOneof() {} - -func (*Identity_Uid) isIdentity_IdentityOneof() {} - -func (*Identity_Username) isIdentity_IdentityOneof() {} - -func (*Identity_GcpId) isIdentity_IdentityOneof() {} - -var File_internal_proto_v2_common_common_proto protoreflect.FileDescriptor - -var file_internal_proto_v2_common_common_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x22, 0xab, 0x02, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x09, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x49, - 0x64, 0x12, 0x1c, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x12, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x1c, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x17, 0x0a, 0x06, 0x67, 0x63, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x05, 0x67, 0x63, 0x70, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x0a, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x1a, 0x3d, 0x0a, 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x42, 0x10, 0x0a, 0x0e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x6f, 0x6e, - 0x65, 0x6f, 0x66, 0x2a, 0xee, 0x02, 0x0a, 0x0b, 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, - 0x69, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x53, 0x55, 0x49, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, - 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, - 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x33, 0x0a, 0x2f, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x53, - 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, - 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, - 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x39, 0x0a, 0x35, 0x43, 0x49, - 0x50, 0x48, 0x45, 0x52, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, - 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x48, 0x41, 0x43, 0x48, - 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x03, 0x12, 0x31, 0x0a, 0x2d, 0x43, 0x49, 0x50, 0x48, 0x45, 0x52, 0x53, - 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x5f, - 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x04, 0x12, 0x31, 0x0a, 0x2d, 0x43, 0x49, 0x50, 0x48, - 0x45, 0x52, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, 0x5f, 0x52, 0x53, - 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, - 0x43, 0x4d, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x05, 0x12, 0x37, 0x0a, 0x33, 0x43, - 0x49, 0x50, 0x48, 0x45, 0x52, 0x53, 0x55, 0x49, 0x54, 0x45, 0x5f, 0x45, 0x43, 0x44, 0x48, 0x45, - 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, - 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x5f, 0x53, 0x48, 0x41, 0x32, - 0x35, 0x36, 0x10, 0x06, 0x2a, 0x7d, 0x0a, 0x0a, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, - 0x5f, 0x30, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x31, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x4c, 0x53, - 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, 0x32, 0x10, 0x03, 0x12, 0x13, - 0x0a, 0x0f, 0x54, 0x4c, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x31, 0x5f, - 0x33, 0x10, 0x04, 0x2a, 0x69, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x10, 0x02, 0x2a, 0x79, - 0x0a, 0x0c, 0x41, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1d, - 0x0a, 0x19, 0x41, 0x4c, 0x50, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, - 0x12, 0x41, 0x4c, 0x50, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x47, - 0x52, 0x50, 0x43, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x4c, 0x50, 0x4e, 0x5f, 0x50, 0x52, - 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x48, 0x54, 0x54, 0x50, 0x32, 0x10, 0x02, 0x12, 0x19, - 0x0a, 0x15, 0x41, 0x4c, 0x50, 0x4e, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, - 0x48, 0x54, 0x54, 0x50, 0x31, 0x5f, 0x31, 0x10, 0x03, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, - 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x67, 0x6f, 0x5f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_internal_proto_v2_common_common_proto_rawDescOnce sync.Once - file_internal_proto_v2_common_common_proto_rawDescData = file_internal_proto_v2_common_common_proto_rawDesc -) - -func file_internal_proto_v2_common_common_proto_rawDescGZIP() []byte { - file_internal_proto_v2_common_common_proto_rawDescOnce.Do(func() { - file_internal_proto_v2_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_v2_common_common_proto_rawDescData) - }) - return file_internal_proto_v2_common_common_proto_rawDescData -} - -var file_internal_proto_v2_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_internal_proto_v2_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_internal_proto_v2_common_common_proto_goTypes = []any{ - (Ciphersuite)(0), // 0: s2a.proto.v2.Ciphersuite - (TLSVersion)(0), // 1: s2a.proto.v2.TLSVersion - (ConnectionSide)(0), // 2: s2a.proto.v2.ConnectionSide - (AlpnProtocol)(0), // 3: s2a.proto.v2.AlpnProtocol - (*Identity)(nil), // 4: s2a.proto.v2.Identity - nil, // 5: s2a.proto.v2.Identity.AttributesEntry -} -var file_internal_proto_v2_common_common_proto_depIdxs = []int32{ - 5, // 0: s2a.proto.v2.Identity.attributes:type_name -> s2a.proto.v2.Identity.AttributesEntry - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_internal_proto_v2_common_common_proto_init() } -func file_internal_proto_v2_common_common_proto_init() { - if File_internal_proto_v2_common_common_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_v2_common_common_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*Identity); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_internal_proto_v2_common_common_proto_msgTypes[0].OneofWrappers = []any{ - (*Identity_SpiffeId)(nil), - (*Identity_Hostname)(nil), - (*Identity_Uid)(nil), - (*Identity_Username)(nil), - (*Identity_GcpId)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_v2_common_common_proto_rawDesc, - NumEnums: 4, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_internal_proto_v2_common_common_proto_goTypes, - DependencyIndexes: file_internal_proto_v2_common_common_proto_depIdxs, - EnumInfos: file_internal_proto_v2_common_common_proto_enumTypes, - MessageInfos: file_internal_proto_v2_common_common_proto_msgTypes, - }.Build() - File_internal_proto_v2_common_common_proto = out.File - file_internal_proto_v2_common_common_proto_rawDesc = nil - file_internal_proto_v2_common_common_proto_goTypes = nil - file_internal_proto_v2_common_common_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto/s2a_context.pb.go b/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto/s2a_context.pb.go deleted file mode 100644 index 418331a4bd..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto/s2a_context.pb.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2022 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/v2/s2a_context/s2a_context.proto - -package s2a_context_go_proto - -import ( - common_go_proto "github.com/google/s2a-go/internal/proto/v2/common_go_proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type S2AContext struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The SPIFFE ID from the peer leaf certificate, if present. - // - // This field is only populated if the leaf certificate is a valid SPIFFE - // SVID; in particular, there is a unique URI SAN and this URI SAN is a valid - // SPIFFE ID. - LeafCertSpiffeId string `protobuf:"bytes,1,opt,name=leaf_cert_spiffe_id,json=leafCertSpiffeId,proto3" json:"leaf_cert_spiffe_id,omitempty"` - // The URIs that are present in the SubjectAltName extension of the peer leaf - // certificate. - // - // Note that the extracted URIs are not validated and may not be properly - // formatted. - LeafCertUris []string `protobuf:"bytes,2,rep,name=leaf_cert_uris,json=leafCertUris,proto3" json:"leaf_cert_uris,omitempty"` - // The DNSNames that are present in the SubjectAltName extension of the peer - // leaf certificate. - LeafCertDnsnames []string `protobuf:"bytes,3,rep,name=leaf_cert_dnsnames,json=leafCertDnsnames,proto3" json:"leaf_cert_dnsnames,omitempty"` - // The (ordered) list of fingerprints in the certificate chain used to verify - // the given leaf certificate. The order MUST be from leaf certificate - // fingerprint to root certificate fingerprint. - // - // A fingerprint is the base-64 encoding of the SHA256 hash of the - // DER-encoding of a certificate. The list MAY be populated even if the peer - // certificate chain was NOT validated successfully. - PeerCertificateChainFingerprints []string `protobuf:"bytes,4,rep,name=peer_certificate_chain_fingerprints,json=peerCertificateChainFingerprints,proto3" json:"peer_certificate_chain_fingerprints,omitempty"` - // The local identity used during session setup. - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,9,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The SHA256 hash of the DER-encoding of the local leaf certificate used in - // the handshake. - LocalLeafCertFingerprint []byte `protobuf:"bytes,6,opt,name=local_leaf_cert_fingerprint,json=localLeafCertFingerprint,proto3" json:"local_leaf_cert_fingerprint,omitempty"` -} - -func (x *S2AContext) Reset() { - *x = S2AContext{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *S2AContext) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*S2AContext) ProtoMessage() {} - -func (x *S2AContext) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use S2AContext.ProtoReflect.Descriptor instead. -func (*S2AContext) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP(), []int{0} -} - -func (x *S2AContext) GetLeafCertSpiffeId() string { - if x != nil { - return x.LeafCertSpiffeId - } - return "" -} - -func (x *S2AContext) GetLeafCertUris() []string { - if x != nil { - return x.LeafCertUris - } - return nil -} - -func (x *S2AContext) GetLeafCertDnsnames() []string { - if x != nil { - return x.LeafCertDnsnames - } - return nil -} - -func (x *S2AContext) GetPeerCertificateChainFingerprints() []string { - if x != nil { - return x.PeerCertificateChainFingerprints - } - return nil -} - -func (x *S2AContext) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *S2AContext) GetLocalLeafCertFingerprint() []byte { - if x != nil { - return x.LocalLeafCertFingerprint - } - return nil -} - -var File_internal_proto_v2_s2a_context_s2a_context_proto protoreflect.FileDescriptor - -var file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = []byte{ - 0x0a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, - 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0c, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x1a, - 0x25, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xee, 0x02, 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x43, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x5f, 0x73, 0x70, 0x69, 0x66, 0x66, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x53, 0x70, 0x69, 0x66, - 0x66, 0x65, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x5f, 0x75, 0x72, 0x69, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x65, - 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x55, 0x72, 0x69, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6c, 0x65, - 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x64, 0x6e, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, - 0x44, 0x6e, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x4d, 0x0a, 0x23, 0x70, 0x65, 0x65, 0x72, - 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x20, 0x70, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x46, 0x69, 0x6e, 0x67, 0x65, - 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3d, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x5f, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x16, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x1b, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, - 0x6c, 0x65, 0x61, 0x66, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x18, 0x6c, 0x6f, 0x63, - 0x61, 0x6c, 0x4c, 0x65, 0x61, 0x66, 0x43, 0x65, 0x72, 0x74, 0x46, 0x69, 0x6e, 0x67, 0x65, 0x72, - 0x70, 0x72, 0x69, 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x4a, 0x04, 0x08, 0x07, 0x10, - 0x08, 0x4a, 0x04, 0x08, 0x08, 0x10, 0x09, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x32, 0x61, - 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x67, - 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce sync.Once - file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc -) - -func file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescGZIP() []byte { - file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescOnce.Do(func() { - file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData) - }) - return file_internal_proto_v2_s2a_context_s2a_context_proto_rawDescData -} - -var file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = []any{ - (*S2AContext)(nil), // 0: s2a.proto.v2.S2AContext - (*common_go_proto.Identity)(nil), // 1: s2a.proto.v2.Identity -} -var file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = []int32{ - 1, // 0: s2a.proto.v2.S2AContext.local_identity:type_name -> s2a.proto.v2.Identity - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_internal_proto_v2_s2a_context_s2a_context_proto_init() } -func file_internal_proto_v2_s2a_context_s2a_context_proto_init() { - if File_internal_proto_v2_s2a_context_s2a_context_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*S2AContext); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes, - DependencyIndexes: file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs, - MessageInfos: file_internal_proto_v2_s2a_context_s2a_context_proto_msgTypes, - }.Build() - File_internal_proto_v2_s2a_context_s2a_context_proto = out.File - file_internal_proto_v2_s2a_context_s2a_context_proto_rawDesc = nil - file_internal_proto_v2_s2a_context_s2a_context_proto_goTypes = nil - file_internal_proto_v2_s2a_context_s2a_context_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a.pb.go b/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a.pb.go deleted file mode 100644 index f47c77a2ba..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a.pb.go +++ /dev/null @@ -1,2518 +0,0 @@ -// Copyright 2022 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 -// -// https://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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.34.2 -// protoc v3.21.12 -// source: internal/proto/v2/s2a/s2a.proto - -package s2a_go_proto - -import ( - common_go_proto "github.com/google/s2a-go/internal/proto/v2/common_go_proto" - s2a_context_go_proto "github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SignatureAlgorithm int32 - -const ( - SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED SignatureAlgorithm = 0 - // RSA Public-Key Cryptography Standards #1. - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA256 SignatureAlgorithm = 1 - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA384 SignatureAlgorithm = 2 - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA512 SignatureAlgorithm = 3 - // ECDSA. - SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP256R1_SHA256 SignatureAlgorithm = 4 - SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP384R1_SHA384 SignatureAlgorithm = 5 - SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP521R1_SHA512 SignatureAlgorithm = 6 - // RSA Probabilistic Signature Scheme. - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA256 SignatureAlgorithm = 7 - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA384 SignatureAlgorithm = 8 - SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA512 SignatureAlgorithm = 9 - // ED25519. - SignatureAlgorithm_S2A_SSL_SIGN_ED25519 SignatureAlgorithm = 10 -) - -// Enum value maps for SignatureAlgorithm. -var ( - SignatureAlgorithm_name = map[int32]string{ - 0: "S2A_SSL_SIGN_UNSPECIFIED", - 1: "S2A_SSL_SIGN_RSA_PKCS1_SHA256", - 2: "S2A_SSL_SIGN_RSA_PKCS1_SHA384", - 3: "S2A_SSL_SIGN_RSA_PKCS1_SHA512", - 4: "S2A_SSL_SIGN_ECDSA_SECP256R1_SHA256", - 5: "S2A_SSL_SIGN_ECDSA_SECP384R1_SHA384", - 6: "S2A_SSL_SIGN_ECDSA_SECP521R1_SHA512", - 7: "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA256", - 8: "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA384", - 9: "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA512", - 10: "S2A_SSL_SIGN_ED25519", - } - SignatureAlgorithm_value = map[string]int32{ - "S2A_SSL_SIGN_UNSPECIFIED": 0, - "S2A_SSL_SIGN_RSA_PKCS1_SHA256": 1, - "S2A_SSL_SIGN_RSA_PKCS1_SHA384": 2, - "S2A_SSL_SIGN_RSA_PKCS1_SHA512": 3, - "S2A_SSL_SIGN_ECDSA_SECP256R1_SHA256": 4, - "S2A_SSL_SIGN_ECDSA_SECP384R1_SHA384": 5, - "S2A_SSL_SIGN_ECDSA_SECP521R1_SHA512": 6, - "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA256": 7, - "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA384": 8, - "S2A_SSL_SIGN_RSA_PSS_RSAE_SHA512": 9, - "S2A_SSL_SIGN_ED25519": 10, - } -) - -func (x SignatureAlgorithm) Enum() *SignatureAlgorithm { - p := new(SignatureAlgorithm) - *p = x - return p -} - -func (x SignatureAlgorithm) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SignatureAlgorithm) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[0].Descriptor() -} - -func (SignatureAlgorithm) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[0] -} - -func (x SignatureAlgorithm) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SignatureAlgorithm.Descriptor instead. -func (SignatureAlgorithm) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{0} -} - -type GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate int32 - -const ( - GetTlsConfigurationResp_ServerTlsConfiguration_UNSPECIFIED GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 0 - GetTlsConfigurationResp_ServerTlsConfiguration_DONT_REQUEST_CLIENT_CERTIFICATE GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 1 - GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 2 - GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 3 - GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 4 - GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate = 5 -) - -// Enum value maps for GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate. -var ( - GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "DONT_REQUEST_CLIENT_CERTIFICATE", - 2: "REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY", - 3: "REQUEST_CLIENT_CERTIFICATE_AND_VERIFY", - 4: "REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY", - 5: "REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY", - } - GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate_value = map[string]int32{ - "UNSPECIFIED": 0, - "DONT_REQUEST_CLIENT_CERTIFICATE": 1, - "REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY": 2, - "REQUEST_CLIENT_CERTIFICATE_AND_VERIFY": 3, - "REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY": 4, - "REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY": 5, - } -) - -func (x GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) Enum() *GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate { - p := new(GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) - *p = x - return p -} - -func (x GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[1].Descriptor() -} - -func (GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[1] -} - -func (x GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate.Descriptor instead. -func (GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{4, 1, 0} -} - -type OffloadPrivateKeyOperationReq_PrivateKeyOperation int32 - -const ( - OffloadPrivateKeyOperationReq_UNSPECIFIED OffloadPrivateKeyOperationReq_PrivateKeyOperation = 0 - // When performing a TLS 1.2 or 1.3 handshake, the (partial) transcript of - // the TLS handshake must be signed to prove possession of the private key. - // - // See https://www.rfc-editor.org/rfc/rfc8446.html#section-4.4.3. - OffloadPrivateKeyOperationReq_SIGN OffloadPrivateKeyOperationReq_PrivateKeyOperation = 1 - // When performing a TLS 1.2 handshake using an RSA algorithm, the key - // exchange algorithm involves the client generating a premaster secret, - // encrypting it using the server's public key, and sending this encrypted - // blob to the server in a ClientKeyExchange message. - // - // See https://www.rfc-editor.org/rfc/rfc4346#section-7.4.7.1. - OffloadPrivateKeyOperationReq_DECRYPT OffloadPrivateKeyOperationReq_PrivateKeyOperation = 2 -) - -// Enum value maps for OffloadPrivateKeyOperationReq_PrivateKeyOperation. -var ( - OffloadPrivateKeyOperationReq_PrivateKeyOperation_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "SIGN", - 2: "DECRYPT", - } - OffloadPrivateKeyOperationReq_PrivateKeyOperation_value = map[string]int32{ - "UNSPECIFIED": 0, - "SIGN": 1, - "DECRYPT": 2, - } -) - -func (x OffloadPrivateKeyOperationReq_PrivateKeyOperation) Enum() *OffloadPrivateKeyOperationReq_PrivateKeyOperation { - p := new(OffloadPrivateKeyOperationReq_PrivateKeyOperation) - *p = x - return p -} - -func (x OffloadPrivateKeyOperationReq_PrivateKeyOperation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OffloadPrivateKeyOperationReq_PrivateKeyOperation) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[2].Descriptor() -} - -func (OffloadPrivateKeyOperationReq_PrivateKeyOperation) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[2] -} - -func (x OffloadPrivateKeyOperationReq_PrivateKeyOperation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OffloadPrivateKeyOperationReq_PrivateKeyOperation.Descriptor instead. -func (OffloadPrivateKeyOperationReq_PrivateKeyOperation) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{5, 0} -} - -type OffloadResumptionKeyOperationReq_ResumptionKeyOperation int32 - -const ( - OffloadResumptionKeyOperationReq_UNSPECIFIED OffloadResumptionKeyOperationReq_ResumptionKeyOperation = 0 - OffloadResumptionKeyOperationReq_ENCRYPT OffloadResumptionKeyOperationReq_ResumptionKeyOperation = 1 - OffloadResumptionKeyOperationReq_DECRYPT OffloadResumptionKeyOperationReq_ResumptionKeyOperation = 2 -) - -// Enum value maps for OffloadResumptionKeyOperationReq_ResumptionKeyOperation. -var ( - OffloadResumptionKeyOperationReq_ResumptionKeyOperation_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "ENCRYPT", - 2: "DECRYPT", - } - OffloadResumptionKeyOperationReq_ResumptionKeyOperation_value = map[string]int32{ - "UNSPECIFIED": 0, - "ENCRYPT": 1, - "DECRYPT": 2, - } -) - -func (x OffloadResumptionKeyOperationReq_ResumptionKeyOperation) Enum() *OffloadResumptionKeyOperationReq_ResumptionKeyOperation { - p := new(OffloadResumptionKeyOperationReq_ResumptionKeyOperation) - *p = x - return p -} - -func (x OffloadResumptionKeyOperationReq_ResumptionKeyOperation) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (OffloadResumptionKeyOperationReq_ResumptionKeyOperation) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[3].Descriptor() -} - -func (OffloadResumptionKeyOperationReq_ResumptionKeyOperation) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[3] -} - -func (x OffloadResumptionKeyOperationReq_ResumptionKeyOperation) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use OffloadResumptionKeyOperationReq_ResumptionKeyOperation.Descriptor instead. -func (OffloadResumptionKeyOperationReq_ResumptionKeyOperation) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{7, 0} -} - -type ValidatePeerCertificateChainReq_VerificationMode int32 - -const ( - // The default verification mode supported by S2A. - ValidatePeerCertificateChainReq_UNSPECIFIED ValidatePeerCertificateChainReq_VerificationMode = 0 - // The SPIFFE verification mode selects the set of trusted certificates to - // use for path building based on the SPIFFE trust domain in the peer's leaf - // certificate. - ValidatePeerCertificateChainReq_SPIFFE ValidatePeerCertificateChainReq_VerificationMode = 1 - // The connect-to-Google verification mode uses the trust bundle for - // connecting to Google, e.g. *.mtls.googleapis.com endpoints. - ValidatePeerCertificateChainReq_CONNECT_TO_GOOGLE ValidatePeerCertificateChainReq_VerificationMode = 2 - // Internal use only. - ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_3 ValidatePeerCertificateChainReq_VerificationMode = 3 - // Internal use only. - ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_4 ValidatePeerCertificateChainReq_VerificationMode = 4 - // Internal use only. - ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_5 ValidatePeerCertificateChainReq_VerificationMode = 5 - // Internal use only. - ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_6 ValidatePeerCertificateChainReq_VerificationMode = 6 -) - -// Enum value maps for ValidatePeerCertificateChainReq_VerificationMode. -var ( - ValidatePeerCertificateChainReq_VerificationMode_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "SPIFFE", - 2: "CONNECT_TO_GOOGLE", - 3: "RESERVED_CUSTOM_VERIFICATION_MODE_3", - 4: "RESERVED_CUSTOM_VERIFICATION_MODE_4", - 5: "RESERVED_CUSTOM_VERIFICATION_MODE_5", - 6: "RESERVED_CUSTOM_VERIFICATION_MODE_6", - } - ValidatePeerCertificateChainReq_VerificationMode_value = map[string]int32{ - "UNSPECIFIED": 0, - "SPIFFE": 1, - "CONNECT_TO_GOOGLE": 2, - "RESERVED_CUSTOM_VERIFICATION_MODE_3": 3, - "RESERVED_CUSTOM_VERIFICATION_MODE_4": 4, - "RESERVED_CUSTOM_VERIFICATION_MODE_5": 5, - "RESERVED_CUSTOM_VERIFICATION_MODE_6": 6, - } -) - -func (x ValidatePeerCertificateChainReq_VerificationMode) Enum() *ValidatePeerCertificateChainReq_VerificationMode { - p := new(ValidatePeerCertificateChainReq_VerificationMode) - *p = x - return p -} - -func (x ValidatePeerCertificateChainReq_VerificationMode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ValidatePeerCertificateChainReq_VerificationMode) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[4].Descriptor() -} - -func (ValidatePeerCertificateChainReq_VerificationMode) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[4] -} - -func (x ValidatePeerCertificateChainReq_VerificationMode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ValidatePeerCertificateChainReq_VerificationMode.Descriptor instead. -func (ValidatePeerCertificateChainReq_VerificationMode) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{9, 0} -} - -type ValidatePeerCertificateChainResp_ValidationResult int32 - -const ( - ValidatePeerCertificateChainResp_UNSPECIFIED ValidatePeerCertificateChainResp_ValidationResult = 0 - ValidatePeerCertificateChainResp_SUCCESS ValidatePeerCertificateChainResp_ValidationResult = 1 - ValidatePeerCertificateChainResp_FAILURE ValidatePeerCertificateChainResp_ValidationResult = 2 -) - -// Enum value maps for ValidatePeerCertificateChainResp_ValidationResult. -var ( - ValidatePeerCertificateChainResp_ValidationResult_name = map[int32]string{ - 0: "UNSPECIFIED", - 1: "SUCCESS", - 2: "FAILURE", - } - ValidatePeerCertificateChainResp_ValidationResult_value = map[string]int32{ - "UNSPECIFIED": 0, - "SUCCESS": 1, - "FAILURE": 2, - } -) - -func (x ValidatePeerCertificateChainResp_ValidationResult) Enum() *ValidatePeerCertificateChainResp_ValidationResult { - p := new(ValidatePeerCertificateChainResp_ValidationResult) - *p = x - return p -} - -func (x ValidatePeerCertificateChainResp_ValidationResult) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (ValidatePeerCertificateChainResp_ValidationResult) Descriptor() protoreflect.EnumDescriptor { - return file_internal_proto_v2_s2a_s2a_proto_enumTypes[5].Descriptor() -} - -func (ValidatePeerCertificateChainResp_ValidationResult) Type() protoreflect.EnumType { - return &file_internal_proto_v2_s2a_s2a_proto_enumTypes[5] -} - -func (x ValidatePeerCertificateChainResp_ValidationResult) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use ValidatePeerCertificateChainResp_ValidationResult.Descriptor instead. -func (ValidatePeerCertificateChainResp_ValidationResult) EnumDescriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{10, 0} -} - -type AlpnPolicy struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // If true, the application MUST perform ALPN negotiation. - EnableAlpnNegotiation bool `protobuf:"varint,1,opt,name=enable_alpn_negotiation,json=enableAlpnNegotiation,proto3" json:"enable_alpn_negotiation,omitempty"` - // The ordered list of ALPN protocols that specify how the application SHOULD - // negotiate ALPN during the TLS handshake. - // - // The application MAY ignore any ALPN protocols in this list that are not - // supported by the application. - AlpnProtocols []common_go_proto.AlpnProtocol `protobuf:"varint,2,rep,packed,name=alpn_protocols,json=alpnProtocols,proto3,enum=s2a.proto.v2.AlpnProtocol" json:"alpn_protocols,omitempty"` -} - -func (x *AlpnPolicy) Reset() { - *x = AlpnPolicy{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AlpnPolicy) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AlpnPolicy) ProtoMessage() {} - -func (x *AlpnPolicy) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AlpnPolicy.ProtoReflect.Descriptor instead. -func (*AlpnPolicy) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{0} -} - -func (x *AlpnPolicy) GetEnableAlpnNegotiation() bool { - if x != nil { - return x.EnableAlpnNegotiation - } - return false -} - -func (x *AlpnPolicy) GetAlpnProtocols() []common_go_proto.AlpnProtocol { - if x != nil { - return x.AlpnProtocols - } - return nil -} - -type AuthenticationMechanism struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Applications may specify an identity associated to an authentication - // mechanism. Otherwise, S2A assumes that the authentication mechanism is - // associated with the default identity. If the default identity cannot be - // determined, the request is rejected. - Identity *common_go_proto.Identity `protobuf:"bytes,3,opt,name=identity,proto3" json:"identity,omitempty"` - // Types that are assignable to MechanismOneof: - // - // *AuthenticationMechanism_Token - MechanismOneof isAuthenticationMechanism_MechanismOneof `protobuf_oneof:"mechanism_oneof"` -} - -func (x *AuthenticationMechanism) Reset() { - *x = AuthenticationMechanism{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AuthenticationMechanism) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AuthenticationMechanism) ProtoMessage() {} - -func (x *AuthenticationMechanism) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AuthenticationMechanism.ProtoReflect.Descriptor instead. -func (*AuthenticationMechanism) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{1} -} - -func (x *AuthenticationMechanism) GetIdentity() *common_go_proto.Identity { - if x != nil { - return x.Identity - } - return nil -} - -func (m *AuthenticationMechanism) GetMechanismOneof() isAuthenticationMechanism_MechanismOneof { - if m != nil { - return m.MechanismOneof - } - return nil -} - -func (x *AuthenticationMechanism) GetToken() string { - if x, ok := x.GetMechanismOneof().(*AuthenticationMechanism_Token); ok { - return x.Token - } - return "" -} - -type isAuthenticationMechanism_MechanismOneof interface { - isAuthenticationMechanism_MechanismOneof() -} - -type AuthenticationMechanism_Token struct { - // A token that the application uses to authenticate itself to S2A. - Token string `protobuf:"bytes,2,opt,name=token,proto3,oneof"` -} - -func (*AuthenticationMechanism_Token) isAuthenticationMechanism_MechanismOneof() {} - -type Status struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The status code that is specific to the application and the implementation - // of S2A, e.g., gRPC status code. - Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // The status details. - Details string `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"` -} - -func (x *Status) Reset() { - *x = Status{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Status) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Status) ProtoMessage() {} - -func (x *Status) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Status.ProtoReflect.Descriptor instead. -func (*Status) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{2} -} - -func (x *Status) GetCode() uint32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *Status) GetDetails() string { - if x != nil { - return x.Details - } - return "" -} - -type GetTlsConfigurationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The role of the application in the TLS connection. - ConnectionSide common_go_proto.ConnectionSide `protobuf:"varint,1,opt,name=connection_side,json=connectionSide,proto3,enum=s2a.proto.v2.ConnectionSide" json:"connection_side,omitempty"` - // The server name indication (SNI) extension, which MAY be populated when a - // server is offloading to S2A. The SNI is used to determine the server - // identity if the local identity in the request is empty. - Sni string `protobuf:"bytes,2,opt,name=sni,proto3" json:"sni,omitempty"` -} - -func (x *GetTlsConfigurationReq) Reset() { - *x = GetTlsConfigurationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTlsConfigurationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTlsConfigurationReq) ProtoMessage() {} - -func (x *GetTlsConfigurationReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTlsConfigurationReq.ProtoReflect.Descriptor instead. -func (*GetTlsConfigurationReq) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{3} -} - -func (x *GetTlsConfigurationReq) GetConnectionSide() common_go_proto.ConnectionSide { - if x != nil { - return x.ConnectionSide - } - return common_go_proto.ConnectionSide(0) -} - -func (x *GetTlsConfigurationReq) GetSni() string { - if x != nil { - return x.Sni - } - return "" -} - -type GetTlsConfigurationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to TlsConfiguration: - // - // *GetTlsConfigurationResp_ClientTlsConfiguration_ - // *GetTlsConfigurationResp_ServerTlsConfiguration_ - TlsConfiguration isGetTlsConfigurationResp_TlsConfiguration `protobuf_oneof:"tls_configuration"` -} - -func (x *GetTlsConfigurationResp) Reset() { - *x = GetTlsConfigurationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTlsConfigurationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTlsConfigurationResp) ProtoMessage() {} - -func (x *GetTlsConfigurationResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTlsConfigurationResp.ProtoReflect.Descriptor instead. -func (*GetTlsConfigurationResp) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{4} -} - -func (m *GetTlsConfigurationResp) GetTlsConfiguration() isGetTlsConfigurationResp_TlsConfiguration { - if m != nil { - return m.TlsConfiguration - } - return nil -} - -func (x *GetTlsConfigurationResp) GetClientTlsConfiguration() *GetTlsConfigurationResp_ClientTlsConfiguration { - if x, ok := x.GetTlsConfiguration().(*GetTlsConfigurationResp_ClientTlsConfiguration_); ok { - return x.ClientTlsConfiguration - } - return nil -} - -func (x *GetTlsConfigurationResp) GetServerTlsConfiguration() *GetTlsConfigurationResp_ServerTlsConfiguration { - if x, ok := x.GetTlsConfiguration().(*GetTlsConfigurationResp_ServerTlsConfiguration_); ok { - return x.ServerTlsConfiguration - } - return nil -} - -type isGetTlsConfigurationResp_TlsConfiguration interface { - isGetTlsConfigurationResp_TlsConfiguration() -} - -type GetTlsConfigurationResp_ClientTlsConfiguration_ struct { - ClientTlsConfiguration *GetTlsConfigurationResp_ClientTlsConfiguration `protobuf:"bytes,1,opt,name=client_tls_configuration,json=clientTlsConfiguration,proto3,oneof"` -} - -type GetTlsConfigurationResp_ServerTlsConfiguration_ struct { - ServerTlsConfiguration *GetTlsConfigurationResp_ServerTlsConfiguration `protobuf:"bytes,2,opt,name=server_tls_configuration,json=serverTlsConfiguration,proto3,oneof"` -} - -func (*GetTlsConfigurationResp_ClientTlsConfiguration_) isGetTlsConfigurationResp_TlsConfiguration() { -} - -func (*GetTlsConfigurationResp_ServerTlsConfiguration_) isGetTlsConfigurationResp_TlsConfiguration() { -} - -type OffloadPrivateKeyOperationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The operation the private key is used for. - Operation OffloadPrivateKeyOperationReq_PrivateKeyOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=s2a.proto.v2.OffloadPrivateKeyOperationReq_PrivateKeyOperation" json:"operation,omitempty"` - // The signature algorithm to be used for signing operations. - SignatureAlgorithm SignatureAlgorithm `protobuf:"varint,2,opt,name=signature_algorithm,json=signatureAlgorithm,proto3,enum=s2a.proto.v2.SignatureAlgorithm" json:"signature_algorithm,omitempty"` - // The input bytes to be signed or decrypted. - // - // Types that are assignable to InBytes: - // - // *OffloadPrivateKeyOperationReq_RawBytes - // *OffloadPrivateKeyOperationReq_Sha256Digest - // *OffloadPrivateKeyOperationReq_Sha384Digest - // *OffloadPrivateKeyOperationReq_Sha512Digest - InBytes isOffloadPrivateKeyOperationReq_InBytes `protobuf_oneof:"in_bytes"` -} - -func (x *OffloadPrivateKeyOperationReq) Reset() { - *x = OffloadPrivateKeyOperationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OffloadPrivateKeyOperationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OffloadPrivateKeyOperationReq) ProtoMessage() {} - -func (x *OffloadPrivateKeyOperationReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OffloadPrivateKeyOperationReq.ProtoReflect.Descriptor instead. -func (*OffloadPrivateKeyOperationReq) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{5} -} - -func (x *OffloadPrivateKeyOperationReq) GetOperation() OffloadPrivateKeyOperationReq_PrivateKeyOperation { - if x != nil { - return x.Operation - } - return OffloadPrivateKeyOperationReq_UNSPECIFIED -} - -func (x *OffloadPrivateKeyOperationReq) GetSignatureAlgorithm() SignatureAlgorithm { - if x != nil { - return x.SignatureAlgorithm - } - return SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED -} - -func (m *OffloadPrivateKeyOperationReq) GetInBytes() isOffloadPrivateKeyOperationReq_InBytes { - if m != nil { - return m.InBytes - } - return nil -} - -func (x *OffloadPrivateKeyOperationReq) GetRawBytes() []byte { - if x, ok := x.GetInBytes().(*OffloadPrivateKeyOperationReq_RawBytes); ok { - return x.RawBytes - } - return nil -} - -func (x *OffloadPrivateKeyOperationReq) GetSha256Digest() []byte { - if x, ok := x.GetInBytes().(*OffloadPrivateKeyOperationReq_Sha256Digest); ok { - return x.Sha256Digest - } - return nil -} - -func (x *OffloadPrivateKeyOperationReq) GetSha384Digest() []byte { - if x, ok := x.GetInBytes().(*OffloadPrivateKeyOperationReq_Sha384Digest); ok { - return x.Sha384Digest - } - return nil -} - -func (x *OffloadPrivateKeyOperationReq) GetSha512Digest() []byte { - if x, ok := x.GetInBytes().(*OffloadPrivateKeyOperationReq_Sha512Digest); ok { - return x.Sha512Digest - } - return nil -} - -type isOffloadPrivateKeyOperationReq_InBytes interface { - isOffloadPrivateKeyOperationReq_InBytes() -} - -type OffloadPrivateKeyOperationReq_RawBytes struct { - // Raw bytes to be hashed and signed, or decrypted. - RawBytes []byte `protobuf:"bytes,4,opt,name=raw_bytes,json=rawBytes,proto3,oneof"` -} - -type OffloadPrivateKeyOperationReq_Sha256Digest struct { - // A SHA256 hash to be signed. Must be 32 bytes. - Sha256Digest []byte `protobuf:"bytes,5,opt,name=sha256_digest,json=sha256Digest,proto3,oneof"` -} - -type OffloadPrivateKeyOperationReq_Sha384Digest struct { - // A SHA384 hash to be signed. Must be 48 bytes. - Sha384Digest []byte `protobuf:"bytes,6,opt,name=sha384_digest,json=sha384Digest,proto3,oneof"` -} - -type OffloadPrivateKeyOperationReq_Sha512Digest struct { - // A SHA512 hash to be signed. Must be 64 bytes. - Sha512Digest []byte `protobuf:"bytes,7,opt,name=sha512_digest,json=sha512Digest,proto3,oneof"` -} - -func (*OffloadPrivateKeyOperationReq_RawBytes) isOffloadPrivateKeyOperationReq_InBytes() {} - -func (*OffloadPrivateKeyOperationReq_Sha256Digest) isOffloadPrivateKeyOperationReq_InBytes() {} - -func (*OffloadPrivateKeyOperationReq_Sha384Digest) isOffloadPrivateKeyOperationReq_InBytes() {} - -func (*OffloadPrivateKeyOperationReq_Sha512Digest) isOffloadPrivateKeyOperationReq_InBytes() {} - -type OffloadPrivateKeyOperationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The signed or decrypted output bytes. - OutBytes []byte `protobuf:"bytes,1,opt,name=out_bytes,json=outBytes,proto3" json:"out_bytes,omitempty"` -} - -func (x *OffloadPrivateKeyOperationResp) Reset() { - *x = OffloadPrivateKeyOperationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OffloadPrivateKeyOperationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OffloadPrivateKeyOperationResp) ProtoMessage() {} - -func (x *OffloadPrivateKeyOperationResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OffloadPrivateKeyOperationResp.ProtoReflect.Descriptor instead. -func (*OffloadPrivateKeyOperationResp) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{6} -} - -func (x *OffloadPrivateKeyOperationResp) GetOutBytes() []byte { - if x != nil { - return x.OutBytes - } - return nil -} - -type OffloadResumptionKeyOperationReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The operation the resumption key is used for. - Operation OffloadResumptionKeyOperationReq_ResumptionKeyOperation `protobuf:"varint,1,opt,name=operation,proto3,enum=s2a.proto.v2.OffloadResumptionKeyOperationReq_ResumptionKeyOperation" json:"operation,omitempty"` - // The bytes to be encrypted or decrypted. - InBytes []byte `protobuf:"bytes,2,opt,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` -} - -func (x *OffloadResumptionKeyOperationReq) Reset() { - *x = OffloadResumptionKeyOperationReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OffloadResumptionKeyOperationReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OffloadResumptionKeyOperationReq) ProtoMessage() {} - -func (x *OffloadResumptionKeyOperationReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OffloadResumptionKeyOperationReq.ProtoReflect.Descriptor instead. -func (*OffloadResumptionKeyOperationReq) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{7} -} - -func (x *OffloadResumptionKeyOperationReq) GetOperation() OffloadResumptionKeyOperationReq_ResumptionKeyOperation { - if x != nil { - return x.Operation - } - return OffloadResumptionKeyOperationReq_UNSPECIFIED -} - -func (x *OffloadResumptionKeyOperationReq) GetInBytes() []byte { - if x != nil { - return x.InBytes - } - return nil -} - -type OffloadResumptionKeyOperationResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The encrypted or decrypted bytes. - OutBytes []byte `protobuf:"bytes,1,opt,name=out_bytes,json=outBytes,proto3" json:"out_bytes,omitempty"` -} - -func (x *OffloadResumptionKeyOperationResp) Reset() { - *x = OffloadResumptionKeyOperationResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OffloadResumptionKeyOperationResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OffloadResumptionKeyOperationResp) ProtoMessage() {} - -func (x *OffloadResumptionKeyOperationResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OffloadResumptionKeyOperationResp.ProtoReflect.Descriptor instead. -func (*OffloadResumptionKeyOperationResp) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{8} -} - -func (x *OffloadResumptionKeyOperationResp) GetOutBytes() []byte { - if x != nil { - return x.OutBytes - } - return nil -} - -type ValidatePeerCertificateChainReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The verification mode that S2A MUST use to validate the peer certificate - // chain. - Mode ValidatePeerCertificateChainReq_VerificationMode `protobuf:"varint,1,opt,name=mode,proto3,enum=s2a.proto.v2.ValidatePeerCertificateChainReq_VerificationMode" json:"mode,omitempty"` - // Types that are assignable to PeerOneof: - // - // *ValidatePeerCertificateChainReq_ClientPeer_ - // *ValidatePeerCertificateChainReq_ServerPeer_ - PeerOneof isValidatePeerCertificateChainReq_PeerOneof `protobuf_oneof:"peer_oneof"` -} - -func (x *ValidatePeerCertificateChainReq) Reset() { - *x = ValidatePeerCertificateChainReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatePeerCertificateChainReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatePeerCertificateChainReq) ProtoMessage() {} - -func (x *ValidatePeerCertificateChainReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidatePeerCertificateChainReq.ProtoReflect.Descriptor instead. -func (*ValidatePeerCertificateChainReq) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{9} -} - -func (x *ValidatePeerCertificateChainReq) GetMode() ValidatePeerCertificateChainReq_VerificationMode { - if x != nil { - return x.Mode - } - return ValidatePeerCertificateChainReq_UNSPECIFIED -} - -func (m *ValidatePeerCertificateChainReq) GetPeerOneof() isValidatePeerCertificateChainReq_PeerOneof { - if m != nil { - return m.PeerOneof - } - return nil -} - -func (x *ValidatePeerCertificateChainReq) GetClientPeer() *ValidatePeerCertificateChainReq_ClientPeer { - if x, ok := x.GetPeerOneof().(*ValidatePeerCertificateChainReq_ClientPeer_); ok { - return x.ClientPeer - } - return nil -} - -func (x *ValidatePeerCertificateChainReq) GetServerPeer() *ValidatePeerCertificateChainReq_ServerPeer { - if x, ok := x.GetPeerOneof().(*ValidatePeerCertificateChainReq_ServerPeer_); ok { - return x.ServerPeer - } - return nil -} - -type isValidatePeerCertificateChainReq_PeerOneof interface { - isValidatePeerCertificateChainReq_PeerOneof() -} - -type ValidatePeerCertificateChainReq_ClientPeer_ struct { - ClientPeer *ValidatePeerCertificateChainReq_ClientPeer `protobuf:"bytes,2,opt,name=client_peer,json=clientPeer,proto3,oneof"` -} - -type ValidatePeerCertificateChainReq_ServerPeer_ struct { - ServerPeer *ValidatePeerCertificateChainReq_ServerPeer `protobuf:"bytes,3,opt,name=server_peer,json=serverPeer,proto3,oneof"` -} - -func (*ValidatePeerCertificateChainReq_ClientPeer_) isValidatePeerCertificateChainReq_PeerOneof() {} - -func (*ValidatePeerCertificateChainReq_ServerPeer_) isValidatePeerCertificateChainReq_PeerOneof() {} - -type ValidatePeerCertificateChainResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The result of validating the peer certificate chain. - ValidationResult ValidatePeerCertificateChainResp_ValidationResult `protobuf:"varint,1,opt,name=validation_result,json=validationResult,proto3,enum=s2a.proto.v2.ValidatePeerCertificateChainResp_ValidationResult" json:"validation_result,omitempty"` - // The validation details. This field is only populated when the validation - // result is NOT SUCCESS. - ValidationDetails string `protobuf:"bytes,2,opt,name=validation_details,json=validationDetails,proto3" json:"validation_details,omitempty"` - // The S2A context contains information from the peer certificate chain. - // - // The S2A context MAY be populated even if validation of the peer certificate - // chain fails. - Context *s2a_context_go_proto.S2AContext `protobuf:"bytes,3,opt,name=context,proto3" json:"context,omitempty"` -} - -func (x *ValidatePeerCertificateChainResp) Reset() { - *x = ValidatePeerCertificateChainResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatePeerCertificateChainResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatePeerCertificateChainResp) ProtoMessage() {} - -func (x *ValidatePeerCertificateChainResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidatePeerCertificateChainResp.ProtoReflect.Descriptor instead. -func (*ValidatePeerCertificateChainResp) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{10} -} - -func (x *ValidatePeerCertificateChainResp) GetValidationResult() ValidatePeerCertificateChainResp_ValidationResult { - if x != nil { - return x.ValidationResult - } - return ValidatePeerCertificateChainResp_UNSPECIFIED -} - -func (x *ValidatePeerCertificateChainResp) GetValidationDetails() string { - if x != nil { - return x.ValidationDetails - } - return "" -} - -func (x *ValidatePeerCertificateChainResp) GetContext() *s2a_context_go_proto.S2AContext { - if x != nil { - return x.Context - } - return nil -} - -type SessionReq struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The identity corresponding to the TLS configurations that MUST be used for - // the TLS handshake. - // - // If a managed identity already exists, the local identity and authentication - // mechanisms are ignored. If a managed identity doesn't exist and the local - // identity is not populated, S2A will try to deduce the managed identity to - // use from the SNI extension. If that also fails, S2A uses the default - // identity (if one exists). - LocalIdentity *common_go_proto.Identity `protobuf:"bytes,7,opt,name=local_identity,json=localIdentity,proto3" json:"local_identity,omitempty"` - // The authentication mechanisms that the application wishes to use to - // authenticate to S2A, ordered by preference. S2A will always use the first - // authentication mechanism that matches the managed identity. - AuthenticationMechanisms []*AuthenticationMechanism `protobuf:"bytes,2,rep,name=authentication_mechanisms,json=authenticationMechanisms,proto3" json:"authentication_mechanisms,omitempty"` - // Types that are assignable to ReqOneof: - // - // *SessionReq_GetTlsConfigurationReq - // *SessionReq_OffloadPrivateKeyOperationReq - // *SessionReq_OffloadResumptionKeyOperationReq - // *SessionReq_ValidatePeerCertificateChainReq - ReqOneof isSessionReq_ReqOneof `protobuf_oneof:"req_oneof"` -} - -func (x *SessionReq) Reset() { - *x = SessionReq{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionReq) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionReq) ProtoMessage() {} - -func (x *SessionReq) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionReq.ProtoReflect.Descriptor instead. -func (*SessionReq) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{11} -} - -func (x *SessionReq) GetLocalIdentity() *common_go_proto.Identity { - if x != nil { - return x.LocalIdentity - } - return nil -} - -func (x *SessionReq) GetAuthenticationMechanisms() []*AuthenticationMechanism { - if x != nil { - return x.AuthenticationMechanisms - } - return nil -} - -func (m *SessionReq) GetReqOneof() isSessionReq_ReqOneof { - if m != nil { - return m.ReqOneof - } - return nil -} - -func (x *SessionReq) GetGetTlsConfigurationReq() *GetTlsConfigurationReq { - if x, ok := x.GetReqOneof().(*SessionReq_GetTlsConfigurationReq); ok { - return x.GetTlsConfigurationReq - } - return nil -} - -func (x *SessionReq) GetOffloadPrivateKeyOperationReq() *OffloadPrivateKeyOperationReq { - if x, ok := x.GetReqOneof().(*SessionReq_OffloadPrivateKeyOperationReq); ok { - return x.OffloadPrivateKeyOperationReq - } - return nil -} - -func (x *SessionReq) GetOffloadResumptionKeyOperationReq() *OffloadResumptionKeyOperationReq { - if x, ok := x.GetReqOneof().(*SessionReq_OffloadResumptionKeyOperationReq); ok { - return x.OffloadResumptionKeyOperationReq - } - return nil -} - -func (x *SessionReq) GetValidatePeerCertificateChainReq() *ValidatePeerCertificateChainReq { - if x, ok := x.GetReqOneof().(*SessionReq_ValidatePeerCertificateChainReq); ok { - return x.ValidatePeerCertificateChainReq - } - return nil -} - -type isSessionReq_ReqOneof interface { - isSessionReq_ReqOneof() -} - -type SessionReq_GetTlsConfigurationReq struct { - // Requests the certificate chain and TLS configuration corresponding to the - // local identity, which the application MUST use to negotiate the TLS - // handshake. - GetTlsConfigurationReq *GetTlsConfigurationReq `protobuf:"bytes,3,opt,name=get_tls_configuration_req,json=getTlsConfigurationReq,proto3,oneof"` -} - -type SessionReq_OffloadPrivateKeyOperationReq struct { - // Signs or decrypts the input bytes using a private key corresponding to - // the local identity in the request. - // - // WARNING: More than one OffloadPrivateKeyOperationReq may be sent to the - // S2Av2 by a server during a TLS 1.2 handshake. - OffloadPrivateKeyOperationReq *OffloadPrivateKeyOperationReq `protobuf:"bytes,4,opt,name=offload_private_key_operation_req,json=offloadPrivateKeyOperationReq,proto3,oneof"` -} - -type SessionReq_OffloadResumptionKeyOperationReq struct { - // Encrypts or decrypts the input bytes using a resumption key corresponding - // to the local identity in the request. - OffloadResumptionKeyOperationReq *OffloadResumptionKeyOperationReq `protobuf:"bytes,5,opt,name=offload_resumption_key_operation_req,json=offloadResumptionKeyOperationReq,proto3,oneof"` -} - -type SessionReq_ValidatePeerCertificateChainReq struct { - // Verifies the peer's certificate chain using - // (a) trust bundles corresponding to the local identity in the request, and - // (b) the verification mode in the request. - ValidatePeerCertificateChainReq *ValidatePeerCertificateChainReq `protobuf:"bytes,6,opt,name=validate_peer_certificate_chain_req,json=validatePeerCertificateChainReq,proto3,oneof"` -} - -func (*SessionReq_GetTlsConfigurationReq) isSessionReq_ReqOneof() {} - -func (*SessionReq_OffloadPrivateKeyOperationReq) isSessionReq_ReqOneof() {} - -func (*SessionReq_OffloadResumptionKeyOperationReq) isSessionReq_ReqOneof() {} - -func (*SessionReq_ValidatePeerCertificateChainReq) isSessionReq_ReqOneof() {} - -type SessionResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Status of the session response. - // - // The status field is populated so that if an error occurs when making an - // individual request, then communication with the S2A may continue. If an - // error is returned directly (e.g. at the gRPC layer), then it may result - // that the bidirectional stream being closed. - Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` - // Types that are assignable to RespOneof: - // - // *SessionResp_GetTlsConfigurationResp - // *SessionResp_OffloadPrivateKeyOperationResp - // *SessionResp_OffloadResumptionKeyOperationResp - // *SessionResp_ValidatePeerCertificateChainResp - RespOneof isSessionResp_RespOneof `protobuf_oneof:"resp_oneof"` -} - -func (x *SessionResp) Reset() { - *x = SessionResp{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SessionResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SessionResp) ProtoMessage() {} - -func (x *SessionResp) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SessionResp.ProtoReflect.Descriptor instead. -func (*SessionResp) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{12} -} - -func (x *SessionResp) GetStatus() *Status { - if x != nil { - return x.Status - } - return nil -} - -func (m *SessionResp) GetRespOneof() isSessionResp_RespOneof { - if m != nil { - return m.RespOneof - } - return nil -} - -func (x *SessionResp) GetGetTlsConfigurationResp() *GetTlsConfigurationResp { - if x, ok := x.GetRespOneof().(*SessionResp_GetTlsConfigurationResp); ok { - return x.GetTlsConfigurationResp - } - return nil -} - -func (x *SessionResp) GetOffloadPrivateKeyOperationResp() *OffloadPrivateKeyOperationResp { - if x, ok := x.GetRespOneof().(*SessionResp_OffloadPrivateKeyOperationResp); ok { - return x.OffloadPrivateKeyOperationResp - } - return nil -} - -func (x *SessionResp) GetOffloadResumptionKeyOperationResp() *OffloadResumptionKeyOperationResp { - if x, ok := x.GetRespOneof().(*SessionResp_OffloadResumptionKeyOperationResp); ok { - return x.OffloadResumptionKeyOperationResp - } - return nil -} - -func (x *SessionResp) GetValidatePeerCertificateChainResp() *ValidatePeerCertificateChainResp { - if x, ok := x.GetRespOneof().(*SessionResp_ValidatePeerCertificateChainResp); ok { - return x.ValidatePeerCertificateChainResp - } - return nil -} - -type isSessionResp_RespOneof interface { - isSessionResp_RespOneof() -} - -type SessionResp_GetTlsConfigurationResp struct { - // Contains the certificate chain and TLS configurations corresponding to - // the local identity. - GetTlsConfigurationResp *GetTlsConfigurationResp `protobuf:"bytes,2,opt,name=get_tls_configuration_resp,json=getTlsConfigurationResp,proto3,oneof"` -} - -type SessionResp_OffloadPrivateKeyOperationResp struct { - // Contains the signed or encrypted output bytes using the private key - // corresponding to the local identity. - OffloadPrivateKeyOperationResp *OffloadPrivateKeyOperationResp `protobuf:"bytes,3,opt,name=offload_private_key_operation_resp,json=offloadPrivateKeyOperationResp,proto3,oneof"` -} - -type SessionResp_OffloadResumptionKeyOperationResp struct { - // Contains the encrypted or decrypted output bytes using the resumption key - // corresponding to the local identity. - OffloadResumptionKeyOperationResp *OffloadResumptionKeyOperationResp `protobuf:"bytes,4,opt,name=offload_resumption_key_operation_resp,json=offloadResumptionKeyOperationResp,proto3,oneof"` -} - -type SessionResp_ValidatePeerCertificateChainResp struct { - // Contains the validation result, peer identity and fingerprints of peer - // certificates. - ValidatePeerCertificateChainResp *ValidatePeerCertificateChainResp `protobuf:"bytes,5,opt,name=validate_peer_certificate_chain_resp,json=validatePeerCertificateChainResp,proto3,oneof"` -} - -func (*SessionResp_GetTlsConfigurationResp) isSessionResp_RespOneof() {} - -func (*SessionResp_OffloadPrivateKeyOperationResp) isSessionResp_RespOneof() {} - -func (*SessionResp_OffloadResumptionKeyOperationResp) isSessionResp_RespOneof() {} - -func (*SessionResp_ValidatePeerCertificateChainResp) isSessionResp_RespOneof() {} - -// Next ID: 8 -type GetTlsConfigurationResp_ClientTlsConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The certificate chain that the client MUST use for the TLS handshake. - // It's a list of PEM-encoded certificates, ordered from leaf to root, - // excluding the root. - CertificateChain []string `protobuf:"bytes,1,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The minimum TLS version number that the client MUST use for the TLS - // handshake. If this field is not provided, the client MUST use the default - // minimum version of the client's TLS library. - MinTlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=min_tls_version,json=minTlsVersion,proto3,enum=s2a.proto.v2.TLSVersion" json:"min_tls_version,omitempty"` - // The maximum TLS version number that the client MUST use for the TLS - // handshake. If this field is not provided, the client MUST use the default - // maximum version of the client's TLS library. - MaxTlsVersion common_go_proto.TLSVersion `protobuf:"varint,3,opt,name=max_tls_version,json=maxTlsVersion,proto3,enum=s2a.proto.v2.TLSVersion" json:"max_tls_version,omitempty"` - // The ordered list of TLS 1.0-1.2 ciphersuites that the client MAY offer to - // negotiate in the TLS handshake. - Ciphersuites []common_go_proto.Ciphersuite `protobuf:"varint,6,rep,packed,name=ciphersuites,proto3,enum=s2a.proto.v2.Ciphersuite" json:"ciphersuites,omitempty"` - // The policy that dictates how the client negotiates ALPN during the TLS - // handshake. - AlpnPolicy *AlpnPolicy `protobuf:"bytes,7,opt,name=alpn_policy,json=alpnPolicy,proto3" json:"alpn_policy,omitempty"` -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) Reset() { - *x = GetTlsConfigurationResp_ClientTlsConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTlsConfigurationResp_ClientTlsConfiguration) ProtoMessage() {} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTlsConfigurationResp_ClientTlsConfiguration.ProtoReflect.Descriptor instead. -func (*GetTlsConfigurationResp_ClientTlsConfiguration) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) GetCertificateChain() []string { - if x != nil { - return x.CertificateChain - } - return nil -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) GetMinTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MinTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) GetMaxTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MaxTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) GetCiphersuites() []common_go_proto.Ciphersuite { - if x != nil { - return x.Ciphersuites - } - return nil -} - -func (x *GetTlsConfigurationResp_ClientTlsConfiguration) GetAlpnPolicy() *AlpnPolicy { - if x != nil { - return x.AlpnPolicy - } - return nil -} - -// Next ID: 12 -type GetTlsConfigurationResp_ServerTlsConfiguration struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The certificate chain that the server MUST use for the TLS handshake. - // It's a list of PEM-encoded certificates, ordered from leaf to root, - // excluding the root. - CertificateChain []string `protobuf:"bytes,1,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The minimum TLS version number that the server MUST use for the TLS - // handshake. If this field is not provided, the server MUST use the default - // minimum version of the server's TLS library. - MinTlsVersion common_go_proto.TLSVersion `protobuf:"varint,2,opt,name=min_tls_version,json=minTlsVersion,proto3,enum=s2a.proto.v2.TLSVersion" json:"min_tls_version,omitempty"` - // The maximum TLS version number that the server MUST use for the TLS - // handshake. If this field is not provided, the server MUST use the default - // maximum version of the server's TLS library. - MaxTlsVersion common_go_proto.TLSVersion `protobuf:"varint,3,opt,name=max_tls_version,json=maxTlsVersion,proto3,enum=s2a.proto.v2.TLSVersion" json:"max_tls_version,omitempty"` - // The ordered list of TLS 1.0-1.2 ciphersuites that the server MAY offer to - // negotiate in the TLS handshake. - Ciphersuites []common_go_proto.Ciphersuite `protobuf:"varint,10,rep,packed,name=ciphersuites,proto3,enum=s2a.proto.v2.Ciphersuite" json:"ciphersuites,omitempty"` - // Whether to enable TLS resumption. - TlsResumptionEnabled bool `protobuf:"varint,6,opt,name=tls_resumption_enabled,json=tlsResumptionEnabled,proto3" json:"tls_resumption_enabled,omitempty"` - // Whether the server MUST request a client certificate (i.e. to negotiate - // TLS vs. mTLS). - RequestClientCertificate GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate `protobuf:"varint,7,opt,name=request_client_certificate,json=requestClientCertificate,proto3,enum=s2a.proto.v2.GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate" json:"request_client_certificate,omitempty"` - // Returns the maximum number of extra bytes that - // |OffloadResumptionKeyOperation| can add to the number of unencrypted - // bytes to form the encrypted bytes. - MaxOverheadOfTicketAead uint32 `protobuf:"varint,9,opt,name=max_overhead_of_ticket_aead,json=maxOverheadOfTicketAead,proto3" json:"max_overhead_of_ticket_aead,omitempty"` - // The policy that dictates how the server negotiates ALPN during the TLS - // handshake. - AlpnPolicy *AlpnPolicy `protobuf:"bytes,11,opt,name=alpn_policy,json=alpnPolicy,proto3" json:"alpn_policy,omitempty"` -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) Reset() { - *x = GetTlsConfigurationResp_ServerTlsConfiguration{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetTlsConfigurationResp_ServerTlsConfiguration) ProtoMessage() {} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetTlsConfigurationResp_ServerTlsConfiguration.ProtoReflect.Descriptor instead. -func (*GetTlsConfigurationResp_ServerTlsConfiguration) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{4, 1} -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetCertificateChain() []string { - if x != nil { - return x.CertificateChain - } - return nil -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetMinTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MinTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetMaxTlsVersion() common_go_proto.TLSVersion { - if x != nil { - return x.MaxTlsVersion - } - return common_go_proto.TLSVersion(0) -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetCiphersuites() []common_go_proto.Ciphersuite { - if x != nil { - return x.Ciphersuites - } - return nil -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetTlsResumptionEnabled() bool { - if x != nil { - return x.TlsResumptionEnabled - } - return false -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetRequestClientCertificate() GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate { - if x != nil { - return x.RequestClientCertificate - } - return GetTlsConfigurationResp_ServerTlsConfiguration_UNSPECIFIED -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetMaxOverheadOfTicketAead() uint32 { - if x != nil { - return x.MaxOverheadOfTicketAead - } - return 0 -} - -func (x *GetTlsConfigurationResp_ServerTlsConfiguration) GetAlpnPolicy() *AlpnPolicy { - if x != nil { - return x.AlpnPolicy - } - return nil -} - -type ValidatePeerCertificateChainReq_ClientPeer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The certificate chain to be verified. The chain MUST be a list of - // DER-encoded certificates, ordered from leaf to root, excluding the root. - CertificateChain [][]byte `protobuf:"bytes,1,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` -} - -func (x *ValidatePeerCertificateChainReq_ClientPeer) Reset() { - *x = ValidatePeerCertificateChainReq_ClientPeer{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatePeerCertificateChainReq_ClientPeer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatePeerCertificateChainReq_ClientPeer) ProtoMessage() {} - -func (x *ValidatePeerCertificateChainReq_ClientPeer) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidatePeerCertificateChainReq_ClientPeer.ProtoReflect.Descriptor instead. -func (*ValidatePeerCertificateChainReq_ClientPeer) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{9, 0} -} - -func (x *ValidatePeerCertificateChainReq_ClientPeer) GetCertificateChain() [][]byte { - if x != nil { - return x.CertificateChain - } - return nil -} - -type ValidatePeerCertificateChainReq_ServerPeer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The certificate chain to be verified. The chain MUST be a list of - // DER-encoded certificates, ordered from leaf to root, excluding the root. - CertificateChain [][]byte `protobuf:"bytes,1,rep,name=certificate_chain,json=certificateChain,proto3" json:"certificate_chain,omitempty"` - // The expected hostname of the server. - ServerHostname string `protobuf:"bytes,2,opt,name=server_hostname,json=serverHostname,proto3" json:"server_hostname,omitempty"` - // The UnrestrictedClientPolicy specified by the user. - SerializedUnrestrictedClientPolicy []byte `protobuf:"bytes,3,opt,name=serialized_unrestricted_client_policy,json=serializedUnrestrictedClientPolicy,proto3" json:"serialized_unrestricted_client_policy,omitempty"` -} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) Reset() { - *x = ValidatePeerCertificateChainReq_ServerPeer{} - if protoimpl.UnsafeEnabled { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ValidatePeerCertificateChainReq_ServerPeer) ProtoMessage() {} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) ProtoReflect() protoreflect.Message { - mi := &file_internal_proto_v2_s2a_s2a_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ValidatePeerCertificateChainReq_ServerPeer.ProtoReflect.Descriptor instead. -func (*ValidatePeerCertificateChainReq_ServerPeer) Descriptor() ([]byte, []int) { - return file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP(), []int{9, 1} -} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) GetCertificateChain() [][]byte { - if x != nil { - return x.CertificateChain - } - return nil -} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) GetServerHostname() string { - if x != nil { - return x.ServerHostname - } - return "" -} - -func (x *ValidatePeerCertificateChainReq_ServerPeer) GetSerializedUnrestrictedClientPolicy() []byte { - if x != nil { - return x.SerializedUnrestrictedClientPolicy - } - return nil -} - -var File_internal_proto_v2_s2a_s2a_proto protoreflect.FileDescriptor - -var file_internal_proto_v2_s2a_s2a_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x0c, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x1a, - 0x25, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x76, 0x32, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0a, 0x41, 0x6c, 0x70, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x36, 0x0a, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, - 0x6c, 0x70, 0x6e, 0x4e, 0x65, 0x67, 0x6f, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, - 0x0a, 0x0e, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x52, 0x0d, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, - 0x73, 0x22, 0x7e, 0x0a, 0x17, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x32, 0x0a, 0x08, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x12, 0x16, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, - 0x00, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x42, 0x11, 0x0a, 0x0f, 0x6d, 0x65, 0x63, 0x68, - 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x4a, 0x04, 0x08, 0x01, 0x10, - 0x02, 0x22, 0x36, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x22, 0x71, 0x0a, 0x16, 0x47, 0x65, 0x74, - 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x71, 0x12, 0x45, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x69, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1c, 0x2e, 0x73, - 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x69, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x6e, - 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x73, 0x6e, 0x69, 0x22, 0xf1, 0x0b, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x78, 0x0a, 0x18, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x78, 0x0a, 0x18, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x6c, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x16, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6c, 0x73, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0xcf, 0x02, 0x0a, - 0x16, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x6c, 0x73, 0x5f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, - 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x54, 0x4c, 0x53, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x54, 0x6c, 0x73, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x74, 0x6c, - 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x54, - 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x54, 0x6c, - 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x69, 0x70, 0x68, - 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x19, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x69, - 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x69, 0x70, 0x68, 0x65, - 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x6c, 0x70, 0x6e, 0x5f, - 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, - 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6c, 0x70, 0x6e, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0a, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x1a, 0xfa, - 0x06, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x74, 0x6c, - 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x54, - 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x54, 0x6c, - 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, - 0x74, 0x6c, 0x73, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, - 0x2e, 0x54, 0x4c, 0x53, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6d, 0x61, 0x78, - 0x54, 0x6c, 0x73, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x0c, 0x63, 0x69, - 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, - 0x43, 0x69, 0x70, 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x52, 0x0c, 0x63, 0x69, 0x70, - 0x68, 0x65, 0x72, 0x73, 0x75, 0x69, 0x74, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x74, 0x6c, 0x73, - 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x74, 0x6c, 0x73, 0x52, 0x65, - 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, - 0x93, 0x01, 0x0a, 0x1a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x55, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x18, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x3c, 0x0a, 0x1b, 0x6d, 0x61, 0x78, 0x5f, 0x6f, 0x76, 0x65, - 0x72, 0x68, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x66, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x5f, - 0x61, 0x65, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x17, 0x6d, 0x61, 0x78, 0x4f, - 0x76, 0x65, 0x72, 0x68, 0x65, 0x61, 0x64, 0x4f, 0x66, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x41, - 0x65, 0x61, 0x64, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x6c, 0x70, 0x6e, 0x5f, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x6c, 0x70, 0x6e, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 0x52, 0x0a, 0x61, 0x6c, 0x70, 0x6e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x9e, - 0x02, 0x0a, 0x18, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, - 0x44, 0x4f, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, - 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, - 0x01, 0x12, 0x2e, 0x0a, 0x2a, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, - 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, - 0x42, 0x55, 0x54, 0x5f, 0x44, 0x4f, 0x4e, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, - 0x02, 0x12, 0x29, 0x0a, 0x25, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x43, 0x4c, 0x49, - 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, - 0x41, 0x4e, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x03, 0x12, 0x3a, 0x0a, 0x36, - 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, - 0x49, 0x52, 0x45, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, - 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x55, 0x54, 0x5f, 0x44, 0x4f, 0x4e, 0x54, 0x5f, - 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x04, 0x12, 0x35, 0x0a, 0x31, 0x52, 0x45, 0x51, 0x55, - 0x45, 0x53, 0x54, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x5f, - 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, - 0x54, 0x45, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x05, 0x4a, - 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x42, 0x13, 0x0a, 0x11, 0x74, - 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0xb0, 0x03, 0x0a, 0x1d, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x5d, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x2e, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x51, 0x0a, 0x13, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x61, - 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, - 0x52, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1d, 0x0a, 0x09, 0x72, 0x61, 0x77, 0x5f, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x08, 0x72, 0x61, 0x77, 0x42, 0x79, - 0x74, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x32, 0x35, 0x36, 0x5f, 0x64, 0x69, - 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x68, - 0x61, 0x32, 0x35, 0x36, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x68, - 0x61, 0x33, 0x38, 0x34, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x33, 0x38, 0x34, 0x44, 0x69, 0x67, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x0d, 0x73, 0x68, 0x61, 0x35, 0x31, 0x32, 0x5f, 0x64, 0x69, 0x67, 0x65, - 0x73, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x68, 0x61, 0x35, - 0x31, 0x32, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x50, 0x72, 0x69, 0x76, - 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x08, 0x0a, 0x04, 0x53, 0x49, 0x47, 0x4e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, - 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x02, 0x42, 0x0a, 0x0a, 0x08, 0x69, 0x6e, 0x5f, 0x62, 0x79, - 0x74, 0x65, 0x73, 0x22, 0x3d, 0x0a, 0x1e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, - 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x42, 0x79, 0x74, - 0x65, 0x73, 0x22, 0xe7, 0x01, 0x0a, 0x20, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, - 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x63, 0x0a, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, - 0x64, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x09, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, - 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x4e, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x01, 0x12, - 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x02, 0x22, 0x40, 0x0a, 0x21, - 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x9d, - 0x06, 0x0a, 0x1f, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x52, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x3e, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x2e, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, - 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x5b, 0x0a, 0x0b, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x5f, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x50, 0x65, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, - 0x65, 0x65, 0x72, 0x12, 0x5b, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x65, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x38, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x65, - 0x65, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, - 0x1a, 0x39, 0x0a, 0x0a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2b, - 0x0a, 0x11, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x1a, 0xb5, 0x01, 0x0a, 0x0a, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x65, - 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x10, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x51, 0x0a, 0x25, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x75, - 0x6e, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x22, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x55, 0x6e, 0x72, 0x65, 0x73, - 0x74, 0x72, 0x69, 0x63, 0x74, 0x65, 0x64, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x22, 0xea, 0x01, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x50, 0x49, - 0x46, 0x46, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, - 0x5f, 0x54, 0x4f, 0x5f, 0x47, 0x4f, 0x4f, 0x47, 0x4c, 0x45, 0x10, 0x02, 0x12, 0x27, 0x0a, 0x23, - 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, - 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, - 0x45, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x44, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, - 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x34, 0x10, 0x04, 0x12, 0x27, - 0x0a, 0x23, 0x52, 0x45, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, - 0x4d, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, - 0x4f, 0x44, 0x45, 0x5f, 0x35, 0x10, 0x05, 0x12, 0x27, 0x0a, 0x23, 0x52, 0x45, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x44, 0x5f, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, - 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x36, 0x10, 0x06, - 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0xb2, - 0x02, 0x0a, 0x20, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x12, 0x6c, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3f, - 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x61, - 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x2e, 0x56, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, - 0x12, 0x32, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, - 0x2e, 0x53, 0x32, 0x41, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x22, 0x3d, 0x0a, 0x10, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x10, 0x02, 0x22, 0xa0, 0x05, 0x0a, 0x0a, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x12, 0x3d, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x79, 0x12, 0x62, 0x0a, 0x19, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x76, 0x32, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x52, 0x18, 0x61, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, - 0x6e, 0x69, 0x73, 0x6d, 0x73, 0x12, 0x61, 0x0a, 0x19, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x6c, 0x73, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, - 0x65, 0x71, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x48, 0x00, - 0x52, 0x16, 0x67, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x77, 0x0a, 0x21, 0x6f, 0x66, 0x66, 0x6c, - 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x76, 0x32, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x48, 0x00, 0x52, 0x1d, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x12, 0x80, 0x01, 0x0a, 0x24, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x72, 0x65, - 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2e, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, - 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x48, 0x00, 0x52, 0x20, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6d, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x71, 0x12, 0x7d, 0x0a, 0x23, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x72, 0x65, 0x71, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2d, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, - 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x71, - 0x48, 0x00, 0x52, 0x1f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, - 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x52, 0x65, 0x71, 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65, 0x71, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x22, 0xb4, 0x04, 0x0a, 0x0b, 0x53, 0x65, 0x73, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x64, 0x0a, 0x1a, 0x67, 0x65, 0x74, 0x5f, 0x74, 0x6c, 0x73, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x73, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x48, - 0x00, 0x52, 0x17, 0x67, 0x65, 0x74, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x7a, 0x0a, 0x22, 0x6f, 0x66, - 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x48, 0x00, 0x52, 0x1e, 0x6f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x50, - 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x83, 0x01, 0x0a, 0x25, 0x6f, 0x66, 0x66, 0x6c, 0x6f, - 0x61, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, - 0x79, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x4f, 0x66, 0x66, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, - 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x48, 0x00, 0x52, 0x21, 0x6f, 0x66, 0x66, 0x6c, 0x6f, - 0x61, 0x64, 0x52, 0x65, 0x73, 0x75, 0x6d, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x4f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x80, 0x01, 0x0a, - 0x24, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x63, - 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x72, 0x65, 0x73, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x73, 0x32, - 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x48, 0x00, 0x52, 0x20, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x50, 0x65, 0x65, 0x72, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x42, - 0x0c, 0x0a, 0x0a, 0x72, 0x65, 0x73, 0x70, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2a, 0xa2, 0x03, - 0x0a, 0x12, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, - 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, - 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, - 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, 0x53, 0x48, 0x41, - 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, - 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, 0x53, 0x31, 0x5f, - 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x32, 0x41, 0x5f, - 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x4b, 0x43, - 0x53, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x03, 0x12, 0x27, 0x0a, 0x23, 0x53, - 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x43, 0x44, 0x53, - 0x41, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x52, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x32, - 0x35, 0x36, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, - 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x43, 0x44, 0x53, 0x41, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x33, - 0x38, 0x34, 0x52, 0x31, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, 0x10, 0x05, 0x12, 0x27, 0x0a, - 0x23, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x43, - 0x44, 0x53, 0x41, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x35, 0x32, 0x31, 0x52, 0x31, 0x5f, 0x53, 0x48, - 0x41, 0x35, 0x31, 0x32, 0x10, 0x06, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, - 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x52, - 0x53, 0x41, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x32, 0x35, 0x36, 0x10, 0x07, 0x12, 0x24, 0x0a, 0x20, - 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, - 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x52, 0x53, 0x41, 0x45, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34, - 0x10, 0x08, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x32, 0x41, 0x5f, 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, - 0x47, 0x4e, 0x5f, 0x52, 0x53, 0x41, 0x5f, 0x50, 0x53, 0x53, 0x5f, 0x52, 0x53, 0x41, 0x45, 0x5f, - 0x53, 0x48, 0x41, 0x35, 0x31, 0x32, 0x10, 0x09, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x32, 0x41, 0x5f, - 0x53, 0x53, 0x4c, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, - 0x10, 0x0a, 0x32, 0x57, 0x0a, 0x0a, 0x53, 0x32, 0x41, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x12, 0x49, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x55, 0x70, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x18, 0x2e, 0x73, 0x32, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, - 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x73, 0x32, 0x61, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x42, 0x36, 0x5a, 0x34, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x73, 0x32, 0x61, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x73, 0x32, 0x61, 0x5f, 0x67, 0x6f, 0x5f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_internal_proto_v2_s2a_s2a_proto_rawDescOnce sync.Once - file_internal_proto_v2_s2a_s2a_proto_rawDescData = file_internal_proto_v2_s2a_s2a_proto_rawDesc -) - -func file_internal_proto_v2_s2a_s2a_proto_rawDescGZIP() []byte { - file_internal_proto_v2_s2a_s2a_proto_rawDescOnce.Do(func() { - file_internal_proto_v2_s2a_s2a_proto_rawDescData = protoimpl.X.CompressGZIP(file_internal_proto_v2_s2a_s2a_proto_rawDescData) - }) - return file_internal_proto_v2_s2a_s2a_proto_rawDescData -} - -var file_internal_proto_v2_s2a_s2a_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_internal_proto_v2_s2a_s2a_proto_msgTypes = make([]protoimpl.MessageInfo, 17) -var file_internal_proto_v2_s2a_s2a_proto_goTypes = []any{ - (SignatureAlgorithm)(0), // 0: s2a.proto.v2.SignatureAlgorithm - (GetTlsConfigurationResp_ServerTlsConfiguration_RequestClientCertificate)(0), // 1: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.RequestClientCertificate - (OffloadPrivateKeyOperationReq_PrivateKeyOperation)(0), // 2: s2a.proto.v2.OffloadPrivateKeyOperationReq.PrivateKeyOperation - (OffloadResumptionKeyOperationReq_ResumptionKeyOperation)(0), // 3: s2a.proto.v2.OffloadResumptionKeyOperationReq.ResumptionKeyOperation - (ValidatePeerCertificateChainReq_VerificationMode)(0), // 4: s2a.proto.v2.ValidatePeerCertificateChainReq.VerificationMode - (ValidatePeerCertificateChainResp_ValidationResult)(0), // 5: s2a.proto.v2.ValidatePeerCertificateChainResp.ValidationResult - (*AlpnPolicy)(nil), // 6: s2a.proto.v2.AlpnPolicy - (*AuthenticationMechanism)(nil), // 7: s2a.proto.v2.AuthenticationMechanism - (*Status)(nil), // 8: s2a.proto.v2.Status - (*GetTlsConfigurationReq)(nil), // 9: s2a.proto.v2.GetTlsConfigurationReq - (*GetTlsConfigurationResp)(nil), // 10: s2a.proto.v2.GetTlsConfigurationResp - (*OffloadPrivateKeyOperationReq)(nil), // 11: s2a.proto.v2.OffloadPrivateKeyOperationReq - (*OffloadPrivateKeyOperationResp)(nil), // 12: s2a.proto.v2.OffloadPrivateKeyOperationResp - (*OffloadResumptionKeyOperationReq)(nil), // 13: s2a.proto.v2.OffloadResumptionKeyOperationReq - (*OffloadResumptionKeyOperationResp)(nil), // 14: s2a.proto.v2.OffloadResumptionKeyOperationResp - (*ValidatePeerCertificateChainReq)(nil), // 15: s2a.proto.v2.ValidatePeerCertificateChainReq - (*ValidatePeerCertificateChainResp)(nil), // 16: s2a.proto.v2.ValidatePeerCertificateChainResp - (*SessionReq)(nil), // 17: s2a.proto.v2.SessionReq - (*SessionResp)(nil), // 18: s2a.proto.v2.SessionResp - (*GetTlsConfigurationResp_ClientTlsConfiguration)(nil), // 19: s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration - (*GetTlsConfigurationResp_ServerTlsConfiguration)(nil), // 20: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration - (*ValidatePeerCertificateChainReq_ClientPeer)(nil), // 21: s2a.proto.v2.ValidatePeerCertificateChainReq.ClientPeer - (*ValidatePeerCertificateChainReq_ServerPeer)(nil), // 22: s2a.proto.v2.ValidatePeerCertificateChainReq.ServerPeer - (common_go_proto.AlpnProtocol)(0), // 23: s2a.proto.v2.AlpnProtocol - (*common_go_proto.Identity)(nil), // 24: s2a.proto.v2.Identity - (common_go_proto.ConnectionSide)(0), // 25: s2a.proto.v2.ConnectionSide - (*s2a_context_go_proto.S2AContext)(nil), // 26: s2a.proto.v2.S2AContext - (common_go_proto.TLSVersion)(0), // 27: s2a.proto.v2.TLSVersion - (common_go_proto.Ciphersuite)(0), // 28: s2a.proto.v2.Ciphersuite -} -var file_internal_proto_v2_s2a_s2a_proto_depIdxs = []int32{ - 23, // 0: s2a.proto.v2.AlpnPolicy.alpn_protocols:type_name -> s2a.proto.v2.AlpnProtocol - 24, // 1: s2a.proto.v2.AuthenticationMechanism.identity:type_name -> s2a.proto.v2.Identity - 25, // 2: s2a.proto.v2.GetTlsConfigurationReq.connection_side:type_name -> s2a.proto.v2.ConnectionSide - 19, // 3: s2a.proto.v2.GetTlsConfigurationResp.client_tls_configuration:type_name -> s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration - 20, // 4: s2a.proto.v2.GetTlsConfigurationResp.server_tls_configuration:type_name -> s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration - 2, // 5: s2a.proto.v2.OffloadPrivateKeyOperationReq.operation:type_name -> s2a.proto.v2.OffloadPrivateKeyOperationReq.PrivateKeyOperation - 0, // 6: s2a.proto.v2.OffloadPrivateKeyOperationReq.signature_algorithm:type_name -> s2a.proto.v2.SignatureAlgorithm - 3, // 7: s2a.proto.v2.OffloadResumptionKeyOperationReq.operation:type_name -> s2a.proto.v2.OffloadResumptionKeyOperationReq.ResumptionKeyOperation - 4, // 8: s2a.proto.v2.ValidatePeerCertificateChainReq.mode:type_name -> s2a.proto.v2.ValidatePeerCertificateChainReq.VerificationMode - 21, // 9: s2a.proto.v2.ValidatePeerCertificateChainReq.client_peer:type_name -> s2a.proto.v2.ValidatePeerCertificateChainReq.ClientPeer - 22, // 10: s2a.proto.v2.ValidatePeerCertificateChainReq.server_peer:type_name -> s2a.proto.v2.ValidatePeerCertificateChainReq.ServerPeer - 5, // 11: s2a.proto.v2.ValidatePeerCertificateChainResp.validation_result:type_name -> s2a.proto.v2.ValidatePeerCertificateChainResp.ValidationResult - 26, // 12: s2a.proto.v2.ValidatePeerCertificateChainResp.context:type_name -> s2a.proto.v2.S2AContext - 24, // 13: s2a.proto.v2.SessionReq.local_identity:type_name -> s2a.proto.v2.Identity - 7, // 14: s2a.proto.v2.SessionReq.authentication_mechanisms:type_name -> s2a.proto.v2.AuthenticationMechanism - 9, // 15: s2a.proto.v2.SessionReq.get_tls_configuration_req:type_name -> s2a.proto.v2.GetTlsConfigurationReq - 11, // 16: s2a.proto.v2.SessionReq.offload_private_key_operation_req:type_name -> s2a.proto.v2.OffloadPrivateKeyOperationReq - 13, // 17: s2a.proto.v2.SessionReq.offload_resumption_key_operation_req:type_name -> s2a.proto.v2.OffloadResumptionKeyOperationReq - 15, // 18: s2a.proto.v2.SessionReq.validate_peer_certificate_chain_req:type_name -> s2a.proto.v2.ValidatePeerCertificateChainReq - 8, // 19: s2a.proto.v2.SessionResp.status:type_name -> s2a.proto.v2.Status - 10, // 20: s2a.proto.v2.SessionResp.get_tls_configuration_resp:type_name -> s2a.proto.v2.GetTlsConfigurationResp - 12, // 21: s2a.proto.v2.SessionResp.offload_private_key_operation_resp:type_name -> s2a.proto.v2.OffloadPrivateKeyOperationResp - 14, // 22: s2a.proto.v2.SessionResp.offload_resumption_key_operation_resp:type_name -> s2a.proto.v2.OffloadResumptionKeyOperationResp - 16, // 23: s2a.proto.v2.SessionResp.validate_peer_certificate_chain_resp:type_name -> s2a.proto.v2.ValidatePeerCertificateChainResp - 27, // 24: s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration.min_tls_version:type_name -> s2a.proto.v2.TLSVersion - 27, // 25: s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration.max_tls_version:type_name -> s2a.proto.v2.TLSVersion - 28, // 26: s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration.ciphersuites:type_name -> s2a.proto.v2.Ciphersuite - 6, // 27: s2a.proto.v2.GetTlsConfigurationResp.ClientTlsConfiguration.alpn_policy:type_name -> s2a.proto.v2.AlpnPolicy - 27, // 28: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.min_tls_version:type_name -> s2a.proto.v2.TLSVersion - 27, // 29: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.max_tls_version:type_name -> s2a.proto.v2.TLSVersion - 28, // 30: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.ciphersuites:type_name -> s2a.proto.v2.Ciphersuite - 1, // 31: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.request_client_certificate:type_name -> s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.RequestClientCertificate - 6, // 32: s2a.proto.v2.GetTlsConfigurationResp.ServerTlsConfiguration.alpn_policy:type_name -> s2a.proto.v2.AlpnPolicy - 17, // 33: s2a.proto.v2.S2AService.SetUpSession:input_type -> s2a.proto.v2.SessionReq - 18, // 34: s2a.proto.v2.S2AService.SetUpSession:output_type -> s2a.proto.v2.SessionResp - 34, // [34:35] is the sub-list for method output_type - 33, // [33:34] is the sub-list for method input_type - 33, // [33:33] is the sub-list for extension type_name - 33, // [33:33] is the sub-list for extension extendee - 0, // [0:33] is the sub-list for field type_name -} - -func init() { file_internal_proto_v2_s2a_s2a_proto_init() } -func file_internal_proto_v2_s2a_s2a_proto_init() { - if File_internal_proto_v2_s2a_s2a_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_internal_proto_v2_s2a_s2a_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*AlpnPolicy); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*AuthenticationMechanism); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*GetTlsConfigurationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*GetTlsConfigurationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*OffloadPrivateKeyOperationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*OffloadPrivateKeyOperationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*OffloadResumptionKeyOperationReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*OffloadResumptionKeyOperationResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ValidatePeerCertificateChainReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[10].Exporter = func(v any, i int) any { - switch v := v.(*ValidatePeerCertificateChainResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[11].Exporter = func(v any, i int) any { - switch v := v.(*SessionReq); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[12].Exporter = func(v any, i int) any { - switch v := v.(*SessionResp); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[13].Exporter = func(v any, i int) any { - switch v := v.(*GetTlsConfigurationResp_ClientTlsConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[14].Exporter = func(v any, i int) any { - switch v := v.(*GetTlsConfigurationResp_ServerTlsConfiguration); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[15].Exporter = func(v any, i int) any { - switch v := v.(*ValidatePeerCertificateChainReq_ClientPeer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[16].Exporter = func(v any, i int) any { - switch v := v.(*ValidatePeerCertificateChainReq_ServerPeer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[1].OneofWrappers = []any{ - (*AuthenticationMechanism_Token)(nil), - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[4].OneofWrappers = []any{ - (*GetTlsConfigurationResp_ClientTlsConfiguration_)(nil), - (*GetTlsConfigurationResp_ServerTlsConfiguration_)(nil), - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[5].OneofWrappers = []any{ - (*OffloadPrivateKeyOperationReq_RawBytes)(nil), - (*OffloadPrivateKeyOperationReq_Sha256Digest)(nil), - (*OffloadPrivateKeyOperationReq_Sha384Digest)(nil), - (*OffloadPrivateKeyOperationReq_Sha512Digest)(nil), - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[9].OneofWrappers = []any{ - (*ValidatePeerCertificateChainReq_ClientPeer_)(nil), - (*ValidatePeerCertificateChainReq_ServerPeer_)(nil), - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[11].OneofWrappers = []any{ - (*SessionReq_GetTlsConfigurationReq)(nil), - (*SessionReq_OffloadPrivateKeyOperationReq)(nil), - (*SessionReq_OffloadResumptionKeyOperationReq)(nil), - (*SessionReq_ValidatePeerCertificateChainReq)(nil), - } - file_internal_proto_v2_s2a_s2a_proto_msgTypes[12].OneofWrappers = []any{ - (*SessionResp_GetTlsConfigurationResp)(nil), - (*SessionResp_OffloadPrivateKeyOperationResp)(nil), - (*SessionResp_OffloadResumptionKeyOperationResp)(nil), - (*SessionResp_ValidatePeerCertificateChainResp)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_internal_proto_v2_s2a_s2a_proto_rawDesc, - NumEnums: 6, - NumMessages: 17, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_internal_proto_v2_s2a_s2a_proto_goTypes, - DependencyIndexes: file_internal_proto_v2_s2a_s2a_proto_depIdxs, - EnumInfos: file_internal_proto_v2_s2a_s2a_proto_enumTypes, - MessageInfos: file_internal_proto_v2_s2a_s2a_proto_msgTypes, - }.Build() - File_internal_proto_v2_s2a_s2a_proto = out.File - file_internal_proto_v2_s2a_s2a_proto_rawDesc = nil - file_internal_proto_v2_s2a_s2a_proto_goTypes = nil - file_internal_proto_v2_s2a_s2a_proto_depIdxs = nil -} diff --git a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a_grpc.pb.go b/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a_grpc.pb.go deleted file mode 100644 index c93f75a78b..0000000000 --- a/vendor/github.com/google/s2a-go/internal/proto/v2/s2a_go_proto/s2a_grpc.pb.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright 2022 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 -// -// https://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. - -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.4.0 -// - protoc v3.21.12 -// source: internal/proto/v2/s2a/s2a.proto - -package s2a_go_proto - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.62.0 or later. -const _ = grpc.SupportPackageIsVersion8 - -const ( - S2AService_SetUpSession_FullMethodName = "/s2a.proto.v2.S2AService/SetUpSession" -) - -// S2AServiceClient is the client API for S2AService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type S2AServiceClient interface { - // SetUpSession is a bidirectional stream used by applications to offload - // operations from the TLS handshake. - SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error) -} - -type s2AServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewS2AServiceClient(cc grpc.ClientConnInterface) S2AServiceClient { - return &s2AServiceClient{cc} -} - -func (c *s2AServiceClient) SetUpSession(ctx context.Context, opts ...grpc.CallOption) (S2AService_SetUpSessionClient, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &S2AService_ServiceDesc.Streams[0], S2AService_SetUpSession_FullMethodName, cOpts...) - if err != nil { - return nil, err - } - x := &s2AServiceSetUpSessionClient{ClientStream: stream} - return x, nil -} - -type S2AService_SetUpSessionClient interface { - Send(*SessionReq) error - Recv() (*SessionResp, error) - grpc.ClientStream -} - -type s2AServiceSetUpSessionClient struct { - grpc.ClientStream -} - -func (x *s2AServiceSetUpSessionClient) Send(m *SessionReq) error { - return x.ClientStream.SendMsg(m) -} - -func (x *s2AServiceSetUpSessionClient) Recv() (*SessionResp, error) { - m := new(SessionResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// S2AServiceServer is the server API for S2AService service. -// All implementations must embed UnimplementedS2AServiceServer -// for forward compatibility -type S2AServiceServer interface { - // SetUpSession is a bidirectional stream used by applications to offload - // operations from the TLS handshake. - SetUpSession(S2AService_SetUpSessionServer) error - mustEmbedUnimplementedS2AServiceServer() -} - -// UnimplementedS2AServiceServer must be embedded to have forward compatible implementations. -type UnimplementedS2AServiceServer struct { -} - -func (UnimplementedS2AServiceServer) SetUpSession(S2AService_SetUpSessionServer) error { - return status.Errorf(codes.Unimplemented, "method SetUpSession not implemented") -} -func (UnimplementedS2AServiceServer) mustEmbedUnimplementedS2AServiceServer() {} - -// UnsafeS2AServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to S2AServiceServer will -// result in compilation errors. -type UnsafeS2AServiceServer interface { - mustEmbedUnimplementedS2AServiceServer() -} - -func RegisterS2AServiceServer(s grpc.ServiceRegistrar, srv S2AServiceServer) { - s.RegisterService(&S2AService_ServiceDesc, srv) -} - -func _S2AService_SetUpSession_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(S2AServiceServer).SetUpSession(&s2AServiceSetUpSessionServer{ServerStream: stream}) -} - -type S2AService_SetUpSessionServer interface { - Send(*SessionResp) error - Recv() (*SessionReq, error) - grpc.ServerStream -} - -type s2AServiceSetUpSessionServer struct { - grpc.ServerStream -} - -func (x *s2AServiceSetUpSessionServer) Send(m *SessionResp) error { - return x.ServerStream.SendMsg(m) -} - -func (x *s2AServiceSetUpSessionServer) Recv() (*SessionReq, error) { - m := new(SessionReq) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// S2AService_ServiceDesc is the grpc.ServiceDesc for S2AService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var S2AService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "s2a.proto.v2.S2AService", - HandlerType: (*S2AServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "SetUpSession", - Handler: _S2AService_SetUpSession_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "internal/proto/v2/s2a/s2a.proto", -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aeadcrypter.go b/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aeadcrypter.go deleted file mode 100644 index 486f4ec4f2..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aeadcrypter.go +++ /dev/null @@ -1,34 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 aeadcrypter provides the interface for AEAD cipher implementations -// used by S2A's record protocol. -package aeadcrypter - -// S2AAEADCrypter is the interface for an AEAD cipher used by the S2A record -// protocol. -type S2AAEADCrypter interface { - // Encrypt encrypts the plaintext and computes the tag of dst and plaintext. - // dst and plaintext may fully overlap or not at all. - Encrypt(dst, plaintext, nonce, aad []byte) ([]byte, error) - // Decrypt decrypts ciphertext and verifies the tag. dst and ciphertext may - // fully overlap or not at all. - Decrypt(dst, ciphertext, nonce, aad []byte) ([]byte, error) - // TagSize returns the tag size in bytes. - TagSize() int -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aesgcm.go b/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aesgcm.go deleted file mode 100644 index 85c4e595d7..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/aesgcm.go +++ /dev/null @@ -1,70 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 aeadcrypter - -import ( - "crypto/aes" - "crypto/cipher" - "fmt" -) - -// Supported key sizes in bytes. -const ( - AES128GCMKeySize = 16 - AES256GCMKeySize = 32 -) - -// aesgcm is the struct that holds an AES-GCM cipher for the S2A AEAD crypter. -type aesgcm struct { - aead cipher.AEAD -} - -// NewAESGCM creates an AES-GCM crypter instance. Note that the key must be -// either 128 bits or 256 bits. -func NewAESGCM(key []byte) (S2AAEADCrypter, error) { - if len(key) != AES128GCMKeySize && len(key) != AES256GCMKeySize { - return nil, fmt.Errorf("%d or %d bytes, given: %d", AES128GCMKeySize, AES256GCMKeySize, len(key)) - } - c, err := aes.NewCipher(key) - if err != nil { - return nil, err - } - a, err := cipher.NewGCM(c) - if err != nil { - return nil, err - } - return &aesgcm{aead: a}, nil -} - -// Encrypt is the encryption function. dst can contain bytes at the beginning of -// the ciphertext that will not be encrypted but will be authenticated. If dst -// has enough capacity to hold these bytes, the ciphertext and the tag, no -// allocation and copy operations will be performed. dst and plaintext may -// fully overlap or not at all. -func (s *aesgcm) Encrypt(dst, plaintext, nonce, aad []byte) ([]byte, error) { - return encrypt(s.aead, dst, plaintext, nonce, aad) -} - -func (s *aesgcm) Decrypt(dst, ciphertext, nonce, aad []byte) ([]byte, error) { - return decrypt(s.aead, dst, ciphertext, nonce, aad) -} - -func (s *aesgcm) TagSize() int { - return TagSize -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/chachapoly.go b/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/chachapoly.go deleted file mode 100644 index 214df4ca41..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/chachapoly.go +++ /dev/null @@ -1,67 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 aeadcrypter - -import ( - "crypto/cipher" - "fmt" - - "golang.org/x/crypto/chacha20poly1305" -) - -// Supported key size in bytes. -const ( - Chacha20Poly1305KeySize = 32 -) - -// chachapoly is the struct that holds a CHACHA-POLY cipher for the S2A AEAD -// crypter. -type chachapoly struct { - aead cipher.AEAD -} - -// NewChachaPoly creates a Chacha-Poly crypter instance. Note that the key must -// be Chacha20Poly1305KeySize bytes in length. -func NewChachaPoly(key []byte) (S2AAEADCrypter, error) { - if len(key) != Chacha20Poly1305KeySize { - return nil, fmt.Errorf("%d bytes, given: %d", Chacha20Poly1305KeySize, len(key)) - } - c, err := chacha20poly1305.New(key) - if err != nil { - return nil, err - } - return &chachapoly{aead: c}, nil -} - -// Encrypt is the encryption function. dst can contain bytes at the beginning of -// the ciphertext that will not be encrypted but will be authenticated. If dst -// has enough capacity to hold these bytes, the ciphertext and the tag, no -// allocation and copy operations will be performed. dst and plaintext may -// fully overlap or not at all. -func (s *chachapoly) Encrypt(dst, plaintext, nonce, aad []byte) ([]byte, error) { - return encrypt(s.aead, dst, plaintext, nonce, aad) -} - -func (s *chachapoly) Decrypt(dst, ciphertext, nonce, aad []byte) ([]byte, error) { - return decrypt(s.aead, dst, ciphertext, nonce, aad) -} - -func (s *chachapoly) TagSize() int { - return TagSize -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/common.go b/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/common.go deleted file mode 100644 index b3c36ad95d..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/aeadcrypter/common.go +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 aeadcrypter - -import ( - "crypto/cipher" - "fmt" -) - -const ( - // TagSize is the tag size in bytes for AES-128-GCM-SHA256, - // AES-256-GCM-SHA384, and CHACHA20-POLY1305-SHA256. - TagSize = 16 - // NonceSize is the size of the nonce in number of bytes for - // AES-128-GCM-SHA256, AES-256-GCM-SHA384, and CHACHA20-POLY1305-SHA256. - NonceSize = 12 - // SHA256DigestSize is the digest size of sha256 in bytes. - SHA256DigestSize = 32 - // SHA384DigestSize is the digest size of sha384 in bytes. - SHA384DigestSize = 48 -) - -// sliceForAppend takes a slice and a requested number of bytes. It returns a -// slice with the contents of the given slice followed by that many bytes and a -// second slice that aliases into it and contains only the extra bytes. If the -// original slice has sufficient capacity then no allocation is performed. -func sliceForAppend(in []byte, n int) (head, tail []byte) { - if total := len(in) + n; cap(in) >= total { - head = in[:total] - } else { - head = make([]byte, total) - copy(head, in) - } - tail = head[len(in):] - return head, tail -} - -// encrypt is the encryption function for an AEAD crypter. aead determines -// the type of AEAD crypter. dst can contain bytes at the beginning of the -// ciphertext that will not be encrypted but will be authenticated. If dst has -// enough capacity to hold these bytes, the ciphertext and the tag, no -// allocation and copy operations will be performed. dst and plaintext may -// fully overlap or not at all. -func encrypt(aead cipher.AEAD, dst, plaintext, nonce, aad []byte) ([]byte, error) { - if len(nonce) != NonceSize { - return nil, fmt.Errorf("nonce size must be %d bytes. received: %d", NonceSize, len(nonce)) - } - // If we need to allocate an output buffer, we want to include space for - // the tag to avoid forcing the caller to reallocate as well. - dlen := len(dst) - dst, out := sliceForAppend(dst, len(plaintext)+TagSize) - data := out[:len(plaintext)] - copy(data, plaintext) // data may fully overlap plaintext - - // Seal appends the ciphertext and the tag to its first argument and - // returns the updated slice. However, sliceForAppend above ensures that - // dst has enough capacity to avoid a reallocation and copy due to the - // append. - dst = aead.Seal(dst[:dlen], nonce, data, aad) - return dst, nil -} - -// decrypt is the decryption function for an AEAD crypter, where aead determines -// the type of AEAD crypter, and dst the destination bytes for the decrypted -// ciphertext. The dst buffer may fully overlap with plaintext or not at all. -func decrypt(aead cipher.AEAD, dst, ciphertext, nonce, aad []byte) ([]byte, error) { - if len(nonce) != NonceSize { - return nil, fmt.Errorf("nonce size must be %d bytes. received: %d", NonceSize, len(nonce)) - } - // If dst is equal to ciphertext[:0], ciphertext storage is reused. - plaintext, err := aead.Open(dst, nonce, ciphertext, aad) - if err != nil { - return nil, fmt.Errorf("message auth failed: %v", err) - } - return plaintext, nil -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/ciphersuite.go b/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/ciphersuite.go deleted file mode 100644 index ddeaa6d77d..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/ciphersuite.go +++ /dev/null @@ -1,98 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 halfconn - -import ( - "crypto/sha256" - "crypto/sha512" - "fmt" - "hash" - - s2apb "github.com/google/s2a-go/internal/proto/common_go_proto" - "github.com/google/s2a-go/internal/record/internal/aeadcrypter" -) - -// ciphersuite is the interface for retrieving ciphersuite-specific information -// and utilities. -type ciphersuite interface { - // keySize returns the key size in bytes. This refers to the key used by - // the AEAD crypter. This is derived by calling HKDF expand on the traffic - // secret. - keySize() int - // nonceSize returns the nonce size in bytes. - nonceSize() int - // trafficSecretSize returns the traffic secret size in bytes. This refers - // to the secret used to derive the traffic key and nonce, as specified in - // https://tools.ietf.org/html/rfc8446#section-7. - trafficSecretSize() int - // hashFunction returns the hash function for the ciphersuite. - hashFunction() func() hash.Hash - // aeadCrypter takes a key and creates an AEAD crypter for the ciphersuite - // using that key. - aeadCrypter(key []byte) (aeadcrypter.S2AAEADCrypter, error) -} - -func newCiphersuite(ciphersuite s2apb.Ciphersuite) (ciphersuite, error) { - switch ciphersuite { - case s2apb.Ciphersuite_AES_128_GCM_SHA256: - return &aesgcm128sha256{}, nil - case s2apb.Ciphersuite_AES_256_GCM_SHA384: - return &aesgcm256sha384{}, nil - case s2apb.Ciphersuite_CHACHA20_POLY1305_SHA256: - return &chachapolysha256{}, nil - default: - return nil, fmt.Errorf("unrecognized ciphersuite: %v", ciphersuite) - } -} - -// aesgcm128sha256 is the AES-128-GCM-SHA256 implementation of the ciphersuite -// interface. -type aesgcm128sha256 struct{} - -func (aesgcm128sha256) keySize() int { return aeadcrypter.AES128GCMKeySize } -func (aesgcm128sha256) nonceSize() int { return aeadcrypter.NonceSize } -func (aesgcm128sha256) trafficSecretSize() int { return aeadcrypter.SHA256DigestSize } -func (aesgcm128sha256) hashFunction() func() hash.Hash { return sha256.New } -func (aesgcm128sha256) aeadCrypter(key []byte) (aeadcrypter.S2AAEADCrypter, error) { - return aeadcrypter.NewAESGCM(key) -} - -// aesgcm256sha384 is the AES-256-GCM-SHA384 implementation of the ciphersuite -// interface. -type aesgcm256sha384 struct{} - -func (aesgcm256sha384) keySize() int { return aeadcrypter.AES256GCMKeySize } -func (aesgcm256sha384) nonceSize() int { return aeadcrypter.NonceSize } -func (aesgcm256sha384) trafficSecretSize() int { return aeadcrypter.SHA384DigestSize } -func (aesgcm256sha384) hashFunction() func() hash.Hash { return sha512.New384 } -func (aesgcm256sha384) aeadCrypter(key []byte) (aeadcrypter.S2AAEADCrypter, error) { - return aeadcrypter.NewAESGCM(key) -} - -// chachapolysha256 is the ChaChaPoly-SHA256 implementation of the ciphersuite -// interface. -type chachapolysha256 struct{} - -func (chachapolysha256) keySize() int { return aeadcrypter.Chacha20Poly1305KeySize } -func (chachapolysha256) nonceSize() int { return aeadcrypter.NonceSize } -func (chachapolysha256) trafficSecretSize() int { return aeadcrypter.SHA256DigestSize } -func (chachapolysha256) hashFunction() func() hash.Hash { return sha256.New } -func (chachapolysha256) aeadCrypter(key []byte) (aeadcrypter.S2AAEADCrypter, error) { - return aeadcrypter.NewChachaPoly(key) -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/counter.go b/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/counter.go deleted file mode 100644 index 9499cdca75..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/counter.go +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 halfconn - -import "errors" - -// counter is a 64-bit counter. -type counter struct { - val uint64 - hasOverflowed bool -} - -// newCounter creates a new counter with the initial value set to val. -func newCounter(val uint64) counter { - return counter{val: val} -} - -// value returns the current value of the counter. -func (c *counter) value() (uint64, error) { - if c.hasOverflowed { - return 0, errors.New("counter has overflowed") - } - return c.val, nil -} - -// increment increments the counter and checks for overflow. -func (c *counter) increment() { - // If the counter is already invalid due to overflow, there is no need to - // increase it. We check for the hasOverflowed flag in the call to value(). - if c.hasOverflowed { - return - } - c.val++ - if c.val == 0 { - c.hasOverflowed = true - } -} - -// reset sets the counter value to zero and sets the hasOverflowed flag to -// false. -func (c *counter) reset() { - c.val = 0 - c.hasOverflowed = false -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/expander.go b/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/expander.go deleted file mode 100644 index e05f2c36a6..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/expander.go +++ /dev/null @@ -1,59 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 halfconn - -import ( - "fmt" - "hash" - - "golang.org/x/crypto/hkdf" -) - -// hkdfExpander is the interface for the HKDF expansion function; see -// https://tools.ietf.org/html/rfc5869 for details. its use in TLS 1.3 is -// specified in https://tools.ietf.org/html/rfc8446#section-7.2 -type hkdfExpander interface { - // expand takes a secret, a label, and the output length in bytes, and - // returns the resulting expanded key. - expand(secret, label []byte, length int) ([]byte, error) -} - -// defaultHKDFExpander is the default HKDF expander which uses Go's crypto/hkdf -// for HKDF expansion. -type defaultHKDFExpander struct { - h func() hash.Hash -} - -// newDefaultHKDFExpander creates an instance of the default HKDF expander -// using the given hash function. -func newDefaultHKDFExpander(h func() hash.Hash) hkdfExpander { - return &defaultHKDFExpander{h: h} -} - -func (d *defaultHKDFExpander) expand(secret, label []byte, length int) ([]byte, error) { - outBuf := make([]byte, length) - n, err := hkdf.Expand(d.h, secret, label).Read(outBuf) - if err != nil { - return nil, fmt.Errorf("hkdf.Expand.Read failed with error: %v", err) - } - if n < length { - return nil, fmt.Errorf("hkdf.Expand.Read returned unexpected length, got %d, want %d", n, length) - } - return outBuf, nil -} diff --git a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/halfconn.go b/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/halfconn.go deleted file mode 100644 index dff99ff594..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/internal/halfconn/halfconn.go +++ /dev/null @@ -1,193 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 halfconn manages the inbound or outbound traffic of a TLS 1.3 -// connection. -package halfconn - -import ( - "fmt" - "sync" - - s2apb "github.com/google/s2a-go/internal/proto/common_go_proto" - "github.com/google/s2a-go/internal/record/internal/aeadcrypter" - "golang.org/x/crypto/cryptobyte" -) - -// The constants below were taken from Section 7.2 and 7.3 in -// https://tools.ietf.org/html/rfc8446#section-7. They are used as the label -// in HKDF-Expand-Label. -const ( - tls13Key = "tls13 key" - tls13Nonce = "tls13 iv" - tls13Update = "tls13 traffic upd" -) - -// S2AHalfConnection stores the state of the TLS 1.3 connection in the -// inbound or outbound direction. -type S2AHalfConnection struct { - cs ciphersuite - expander hkdfExpander - // mutex guards sequence, aeadCrypter, trafficSecret, and nonce. - mutex sync.Mutex - aeadCrypter aeadcrypter.S2AAEADCrypter - sequence counter - trafficSecret []byte - nonce []byte -} - -// New creates a new instance of S2AHalfConnection given a ciphersuite and a -// traffic secret. -func New(ciphersuite s2apb.Ciphersuite, trafficSecret []byte, sequence uint64) (*S2AHalfConnection, error) { - cs, err := newCiphersuite(ciphersuite) - if err != nil { - return nil, fmt.Errorf("failed to create new ciphersuite: %v", ciphersuite) - } - if cs.trafficSecretSize() != len(trafficSecret) { - return nil, fmt.Errorf("supplied traffic secret must be %v bytes, given: %v bytes", cs.trafficSecretSize(), len(trafficSecret)) - } - - hc := &S2AHalfConnection{cs: cs, expander: newDefaultHKDFExpander(cs.hashFunction()), sequence: newCounter(sequence), trafficSecret: trafficSecret} - if err = hc.updateCrypterAndNonce(hc.trafficSecret); err != nil { - return nil, fmt.Errorf("failed to create half connection using traffic secret: %v", err) - } - - return hc, nil -} - -// Encrypt encrypts the plaintext and computes the tag of dst and plaintext. -// dst and plaintext may fully overlap or not at all. Note that the sequence -// number will still be incremented on failure, unless the sequence has -// overflowed. -func (hc *S2AHalfConnection) Encrypt(dst, plaintext, aad []byte) ([]byte, error) { - hc.mutex.Lock() - sequence, err := hc.getAndIncrementSequence() - if err != nil { - hc.mutex.Unlock() - return nil, err - } - nonce := hc.maskedNonce(sequence) - crypter := hc.aeadCrypter - hc.mutex.Unlock() - return crypter.Encrypt(dst, plaintext, nonce, aad) -} - -// Decrypt decrypts ciphertext and verifies the tag. dst and ciphertext may -// fully overlap or not at all. Note that the sequence number will still be -// incremented on failure, unless the sequence has overflowed. -func (hc *S2AHalfConnection) Decrypt(dst, ciphertext, aad []byte) ([]byte, error) { - hc.mutex.Lock() - sequence, err := hc.getAndIncrementSequence() - if err != nil { - hc.mutex.Unlock() - return nil, err - } - nonce := hc.maskedNonce(sequence) - crypter := hc.aeadCrypter - hc.mutex.Unlock() - return crypter.Decrypt(dst, ciphertext, nonce, aad) -} - -// UpdateKey advances the traffic secret key, as specified in -// https://tools.ietf.org/html/rfc8446#section-7.2. In addition, it derives -// a new key and nonce, and resets the sequence number. -func (hc *S2AHalfConnection) UpdateKey() error { - hc.mutex.Lock() - defer hc.mutex.Unlock() - - var err error - hc.trafficSecret, err = hc.deriveSecret(hc.trafficSecret, []byte(tls13Update), hc.cs.trafficSecretSize()) - if err != nil { - return fmt.Errorf("failed to derive traffic secret: %v", err) - } - - if err = hc.updateCrypterAndNonce(hc.trafficSecret); err != nil { - return fmt.Errorf("failed to update half connection: %v", err) - } - - hc.sequence.reset() - return nil -} - -// TagSize returns the tag size in bytes of the underlying AEAD crypter. -func (hc *S2AHalfConnection) TagSize() int { - return hc.aeadCrypter.TagSize() -} - -// updateCrypterAndNonce takes a new traffic secret and updates the crypter -// and nonce. Note that the mutex must be held while calling this function. -func (hc *S2AHalfConnection) updateCrypterAndNonce(newTrafficSecret []byte) error { - key, err := hc.deriveSecret(newTrafficSecret, []byte(tls13Key), hc.cs.keySize()) - if err != nil { - return fmt.Errorf("failed to update key: %v", err) - } - - hc.nonce, err = hc.deriveSecret(newTrafficSecret, []byte(tls13Nonce), hc.cs.nonceSize()) - if err != nil { - return fmt.Errorf("failed to update nonce: %v", err) - } - - hc.aeadCrypter, err = hc.cs.aeadCrypter(key) - if err != nil { - return fmt.Errorf("failed to update AEAD crypter: %v", err) - } - return nil -} - -// getAndIncrement returns the current sequence number and increments it. Note -// that the mutex must be held while calling this function. -func (hc *S2AHalfConnection) getAndIncrementSequence() (uint64, error) { - sequence, err := hc.sequence.value() - if err != nil { - return 0, err - } - hc.sequence.increment() - return sequence, nil -} - -// maskedNonce creates a copy of the nonce that is masked with the sequence -// number. Note that the mutex must be held while calling this function. -func (hc *S2AHalfConnection) maskedNonce(sequence uint64) []byte { - const uint64Size = 8 - nonce := make([]byte, len(hc.nonce)) - copy(nonce, hc.nonce) - for i := 0; i < uint64Size; i++ { - nonce[aeadcrypter.NonceSize-uint64Size+i] ^= byte(sequence >> uint64(56-uint64Size*i)) - } - return nonce -} - -// deriveSecret implements the Derive-Secret function, as specified in -// https://tools.ietf.org/html/rfc8446#section-7.1. -func (hc *S2AHalfConnection) deriveSecret(secret, label []byte, length int) ([]byte, error) { - var hkdfLabel cryptobyte.Builder - hkdfLabel.AddUint16(uint16(length)) - hkdfLabel.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) { - b.AddBytes(label) - }) - // Append an empty `Context` field to the label, as specified in the RFC. - // The half connection does not use the `Context` field. - hkdfLabel.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) { - b.AddBytes([]byte("")) - }) - hkdfLabelBytes, err := hkdfLabel.Bytes() - if err != nil { - return nil, fmt.Errorf("deriveSecret failed: %v", err) - } - return hc.expander.expand(secret, hkdfLabelBytes, length) -} diff --git a/vendor/github.com/google/s2a-go/internal/record/record.go b/vendor/github.com/google/s2a-go/internal/record/record.go deleted file mode 100644 index e76509ef01..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/record.go +++ /dev/null @@ -1,729 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 record implements the TLS 1.3 record protocol used by the S2A -// transport credentials. -package record - -import ( - "encoding/binary" - "errors" - "fmt" - "math" - "net" - "sync" - - commonpb "github.com/google/s2a-go/internal/proto/common_go_proto" - "github.com/google/s2a-go/internal/record/internal/halfconn" - "github.com/google/s2a-go/internal/tokenmanager" - "google.golang.org/grpc/grpclog" -) - -// recordType is the `ContentType` as described in -// https://tools.ietf.org/html/rfc8446#section-5.1. -type recordType byte - -const ( - alert recordType = 21 - handshake recordType = 22 - applicationData recordType = 23 -) - -// keyUpdateRequest is the `KeyUpdateRequest` as described in -// https://tools.ietf.org/html/rfc8446#section-4.6.3. -type keyUpdateRequest byte - -const ( - updateNotRequested keyUpdateRequest = 0 - updateRequested keyUpdateRequest = 1 -) - -// alertDescription is the `AlertDescription` as described in -// https://tools.ietf.org/html/rfc8446#section-6. -type alertDescription byte - -const ( - closeNotify alertDescription = 0 -) - -// sessionTicketState is used to determine whether session tickets have not yet -// been received, are in the process of being received, or have finished -// receiving. -type sessionTicketState byte - -const ( - ticketsNotYetReceived sessionTicketState = 0 - receivingTickets sessionTicketState = 1 - notReceivingTickets sessionTicketState = 2 -) - -const ( - // The TLS 1.3-specific constants below (tlsRecordMaxPlaintextSize, - // tlsRecordHeaderSize, tlsRecordTypeSize) were taken from - // https://tools.ietf.org/html/rfc8446#section-5.1. - - // tlsRecordMaxPlaintextSize is the maximum size in bytes of the plaintext - // in a single TLS 1.3 record. - tlsRecordMaxPlaintextSize = 16384 // 2^14 - // tlsRecordTypeSize is the size in bytes of the TLS 1.3 record type. - tlsRecordTypeSize = 1 - // tlsTagSize is the size in bytes of the tag of the following three - // ciphersuites: AES-128-GCM-SHA256, AES-256-GCM-SHA384, - // CHACHA20-POLY1305-SHA256. - tlsTagSize = 16 - // tlsRecordMaxPayloadSize is the maximum size in bytes of the payload in a - // single TLS 1.3 record. This is the maximum size of the plaintext plus the - // record type byte and 16 bytes of the tag. - tlsRecordMaxPayloadSize = tlsRecordMaxPlaintextSize + tlsRecordTypeSize + tlsTagSize - // tlsRecordHeaderTypeSize is the size in bytes of the TLS 1.3 record - // header type. - tlsRecordHeaderTypeSize = 1 - // tlsRecordHeaderLegacyRecordVersionSize is the size in bytes of the TLS - // 1.3 record header legacy record version. - tlsRecordHeaderLegacyRecordVersionSize = 2 - // tlsRecordHeaderPayloadLengthSize is the size in bytes of the TLS 1.3 - // record header payload length. - tlsRecordHeaderPayloadLengthSize = 2 - // tlsRecordHeaderSize is the size in bytes of the TLS 1.3 record header. - tlsRecordHeaderSize = tlsRecordHeaderTypeSize + tlsRecordHeaderLegacyRecordVersionSize + tlsRecordHeaderPayloadLengthSize - // tlsRecordMaxSize - tlsRecordMaxSize = tlsRecordMaxPayloadSize + tlsRecordHeaderSize - // tlsApplicationData is the application data type of the TLS 1.3 record - // header. - tlsApplicationData = 23 - // tlsLegacyRecordVersion is the legacy record version of the TLS record. - tlsLegacyRecordVersion = 3 - // tlsAlertSize is the size in bytes of an alert of TLS 1.3. - tlsAlertSize = 2 -) - -const ( - // These are TLS 1.3 handshake-specific constants. - - // tlsHandshakeNewSessionTicketType is the prefix of a handshake new session - // ticket message of TLS 1.3. - tlsHandshakeNewSessionTicketType = 4 - // tlsHandshakeKeyUpdateType is the prefix of a handshake key update message - // of TLS 1.3. - tlsHandshakeKeyUpdateType = 24 - // tlsHandshakeMsgTypeSize is the size in bytes of the TLS 1.3 handshake - // message type field. - tlsHandshakeMsgTypeSize = 1 - // tlsHandshakeLengthSize is the size in bytes of the TLS 1.3 handshake - // message length field. - tlsHandshakeLengthSize = 3 - // tlsHandshakeKeyUpdateMsgSize is the size in bytes of the TLS 1.3 - // handshake key update message. - tlsHandshakeKeyUpdateMsgSize = 1 - // tlsHandshakePrefixSize is the size in bytes of the prefix of the TLS 1.3 - // handshake message. - tlsHandshakePrefixSize = 4 - // tlsMaxSessionTicketSize is the maximum size of a NewSessionTicket message - // in TLS 1.3. This is the sum of the max sizes of all the fields in the - // NewSessionTicket struct specified in - // https://tools.ietf.org/html/rfc8446#section-4.6.1. - tlsMaxSessionTicketSize = 131338 -) - -const ( - // outBufMaxRecords is the maximum number of records that can fit in the - // ourRecordsBuf buffer. - outBufMaxRecords = 16 - // outBufMaxSize is the maximum size (in bytes) of the outRecordsBuf buffer. - outBufMaxSize = outBufMaxRecords * tlsRecordMaxSize - // maxAllowedTickets is the maximum number of session tickets that are - // allowed. The number of tickets are limited to ensure that the size of the - // ticket queue does not grow indefinitely. S2A also keeps a limit on the - // number of tickets that it caches. - maxAllowedTickets = 5 -) - -// preConstructedKeyUpdateMsg holds the key update message. This is needed as an -// optimization so that the same message does not need to be constructed every -// time a key update message is sent. -var preConstructedKeyUpdateMsg = buildKeyUpdateRequest() - -// conn represents a secured TLS connection. It implements the net.Conn -// interface. -type conn struct { - net.Conn - // inConn is the half connection responsible for decrypting incoming bytes. - inConn *halfconn.S2AHalfConnection - // outConn is the half connection responsible for encrypting outgoing bytes. - outConn *halfconn.S2AHalfConnection - // pendingApplicationData holds data that has been read from the connection - // and decrypted, but has not yet been returned by Read. - pendingApplicationData []byte - // unusedBuf holds data read from the network that has not yet been - // decrypted. This data might not consist of a complete record. It may - // consist of several records, the last of which could be incomplete. - unusedBuf []byte - // outRecordsBuf is a buffer used to store outgoing TLS records before - // they are written to the network. - outRecordsBuf []byte - // nextRecord stores the next record info in the unusedBuf buffer. - nextRecord []byte - // overheadSize is the overhead size in bytes of each TLS 1.3 record, which - // is computed as overheadSize = header size + record type byte + tag size. - // Note that there is no padding by zeros in the overhead calculation. - overheadSize int - // readMutex guards against concurrent calls to Read. This is required since - // Close may be called during a Read. - readMutex sync.Mutex - // writeMutex guards against concurrent calls to Write. This is required - // since Close may be called during a Write, and also because a key update - // message may be written during a Read. - writeMutex sync.Mutex - // handshakeBuf holds handshake messages while they are being processed. - handshakeBuf []byte - // ticketState is the current processing state of the session tickets. - ticketState sessionTicketState - // sessionTickets holds the completed session tickets until they are sent to - // the handshaker service for processing. - sessionTickets [][]byte - // ticketSender sends session tickets to the S2A handshaker service. - ticketSender s2aTicketSender - // callComplete is a channel that blocks closing the record protocol until a - // pending call to the S2A completes. - callComplete chan bool -} - -// ConnParameters holds the parameters used for creating a new conn object. -type ConnParameters struct { - // NetConn is the TCP connection to the peer. This parameter is required. - NetConn net.Conn - // Ciphersuite is the TLS ciphersuite negotiated by the S2A handshaker - // service. This parameter is required. - Ciphersuite commonpb.Ciphersuite - // TLSVersion is the TLS version number negotiated by the S2A handshaker - // service. This parameter is required. - TLSVersion commonpb.TLSVersion - // InTrafficSecret is the traffic secret used to derive the session key for - // the inbound direction. This parameter is required. - InTrafficSecret []byte - // OutTrafficSecret is the traffic secret used to derive the session key - // for the outbound direction. This parameter is required. - OutTrafficSecret []byte - // UnusedBuf is the data read from the network that has not yet been - // decrypted. This parameter is optional. If not provided, then no - // application data was sent in the same flight of messages as the final - // handshake message. - UnusedBuf []byte - // InSequence is the sequence number of the next, incoming, TLS record. - // This parameter is required. - InSequence uint64 - // OutSequence is the sequence number of the next, outgoing, TLS record. - // This parameter is required. - OutSequence uint64 - // HSAddr stores the address of the S2A handshaker service. This parameter - // is optional. If not provided, then TLS resumption is disabled. - HSAddr string - // ConnectionId is the connection identifier that was created and sent by - // S2A at the end of a handshake. - ConnectionID uint64 - // LocalIdentity is the local identity that was used by S2A during session - // setup and included in the session result. - LocalIdentity *commonpb.Identity - // EnsureProcessSessionTickets allows users to wait and ensure that all - // available session tickets are sent to S2A before a process completes. - EnsureProcessSessionTickets *sync.WaitGroup -} - -// NewConn creates a TLS record protocol that wraps the TCP connection. -func NewConn(o *ConnParameters) (net.Conn, error) { - if o == nil { - return nil, errors.New("conn options must not be nil") - } - if o.TLSVersion != commonpb.TLSVersion_TLS1_3 { - return nil, errors.New("TLS version must be TLS 1.3") - } - - inConn, err := halfconn.New(o.Ciphersuite, o.InTrafficSecret, o.InSequence) - if err != nil { - return nil, fmt.Errorf("failed to create inbound half connection: %v", err) - } - outConn, err := halfconn.New(o.Ciphersuite, o.OutTrafficSecret, o.OutSequence) - if err != nil { - return nil, fmt.Errorf("failed to create outbound half connection: %v", err) - } - - // The tag size for the in/out connections should be the same. - overheadSize := tlsRecordHeaderSize + tlsRecordTypeSize + inConn.TagSize() - var unusedBuf []byte - if o.UnusedBuf == nil { - // We pre-allocate unusedBuf to be of size - // 2*tlsRecordMaxSize-1 during initialization. We only read from the - // network into unusedBuf when unusedBuf does not contain a complete - // record and the incomplete record is at most tlsRecordMaxSize-1 - // (bytes). And we read at most tlsRecordMaxSize bytes of data from the - // network into unusedBuf at one time. Therefore, 2*tlsRecordMaxSize-1 - // is large enough to buffer data read from the network. - unusedBuf = make([]byte, 0, 2*tlsRecordMaxSize-1) - } else { - unusedBuf = make([]byte, len(o.UnusedBuf)) - copy(unusedBuf, o.UnusedBuf) - } - - tokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - if err != nil { - grpclog.Infof("failed to create single token access token manager: %v", err) - } - - s2aConn := &conn{ - Conn: o.NetConn, - inConn: inConn, - outConn: outConn, - unusedBuf: unusedBuf, - outRecordsBuf: make([]byte, tlsRecordMaxSize), - nextRecord: unusedBuf, - overheadSize: overheadSize, - ticketState: ticketsNotYetReceived, - // Pre-allocate the buffer for one session ticket message and the max - // plaintext size. This is the largest size that handshakeBuf will need - // to hold. The largest incomplete handshake message is the - // [handshake header size] + [max session ticket size] - 1. - // Then, tlsRecordMaxPlaintextSize is the maximum size that will be - // appended to the handshakeBuf before the handshake message is - // completed. Therefore, the buffer size below should be large enough to - // buffer any handshake messages. - handshakeBuf: make([]byte, 0, tlsHandshakePrefixSize+tlsMaxSessionTicketSize+tlsRecordMaxPlaintextSize-1), - ticketSender: &ticketSender{ - hsAddr: o.HSAddr, - connectionID: o.ConnectionID, - localIdentity: o.LocalIdentity, - tokenManager: tokenManager, - ensureProcessSessionTickets: o.EnsureProcessSessionTickets, - }, - callComplete: make(chan bool), - } - return s2aConn, nil -} - -// Read reads and decrypts a TLS 1.3 record from the underlying connection, and -// copies any application data received from the peer into b. If the size of the -// payload is greater than len(b), Read retains the remaining bytes in an -// internal buffer, and subsequent calls to Read will read from this buffer -// until it is exhausted. At most 1 TLS record worth of application data is -// written to b for each call to Read. -// -// Note that for the user to efficiently call this method, the user should -// ensure that the buffer b is allocated such that the buffer does not have any -// unused segments. This can be done by calling Read via io.ReadFull, which -// continually calls Read until the specified buffer has been filled. Also note -// that the user should close the connection via Close() if an error is thrown -// by a call to Read. -func (p *conn) Read(b []byte) (n int, err error) { - p.readMutex.Lock() - defer p.readMutex.Unlock() - // Check if p.pendingApplication data has leftover application data from - // the previous call to Read. - if len(p.pendingApplicationData) == 0 { - // Read a full record from the wire. - record, err := p.readFullRecord() - if err != nil { - return 0, err - } - // Now we have a complete record, so split the header and validate it - // The TLS record is split into 2 pieces: the record header and the - // payload. The payload has the following form: - // [payload] = [ciphertext of application data] - // + [ciphertext of record type byte] - // + [(optionally) ciphertext of padding by zeros] - // + [tag] - header, payload, err := splitAndValidateHeader(record) - if err != nil { - return 0, err - } - // Decrypt the ciphertext. - p.pendingApplicationData, err = p.inConn.Decrypt(payload[:0], payload, header) - if err != nil { - return 0, err - } - // Remove the padding by zeros and the record type byte from the - // p.pendingApplicationData buffer. - msgType, err := p.stripPaddingAndType() - if err != nil { - return 0, err - } - // Check that the length of the plaintext after stripping the padding - // and record type byte is under the maximum plaintext size. - if len(p.pendingApplicationData) > tlsRecordMaxPlaintextSize { - return 0, errors.New("plaintext size larger than maximum") - } - // The expected message types are application data, alert, and - // handshake. For application data, the bytes are directly copied into - // b. For an alert, the type of the alert is checked and the connection - // is closed on a close notify alert. For a handshake message, the - // handshake message type is checked. The handshake message type can be - // a key update type, for which we advance the traffic secret, and a - // new session ticket type, for which we send the received ticket to S2A - // for processing. - switch msgType { - case applicationData: - if len(p.handshakeBuf) > 0 { - return 0, errors.New("application data received while processing fragmented handshake messages") - } - case alert: - return 0, p.handleAlertMessage() - case handshake: - if err = p.handleHandshakeMessage(); err != nil { - return 0, err - } - return 0, nil - default: - return 0, errors.New("unknown record type") - } - } - // Write as much application data as possible to b, the output buffer. - n = copy(b, p.pendingApplicationData) - p.pendingApplicationData = p.pendingApplicationData[n:] - return n, nil -} - -// Write divides b into segments of size tlsRecordMaxPlaintextSize, builds a -// TLS 1.3 record (of type "application data") from each segment, and sends -// the record to the peer. It returns the number of plaintext bytes that were -// successfully sent to the peer. -func (p *conn) Write(b []byte) (n int, err error) { - p.writeMutex.Lock() - defer p.writeMutex.Unlock() - return p.writeTLSRecord(b, tlsApplicationData) -} - -// writeTLSRecord divides b into segments of size maxPlaintextBytesPerRecord, -// builds a TLS 1.3 record (of type recordType) from each segment, and sends -// the record to the peer. It returns the number of plaintext bytes that were -// successfully sent to the peer. -func (p *conn) writeTLSRecord(b []byte, recordType byte) (n int, err error) { - // Create a record of only header, record type, and tag if given empty - // byte array. - if len(b) == 0 { - recordEndIndex, _, err := p.buildRecord(b, recordType, 0) - if err != nil { - return 0, err - } - - // Write the bytes stored in outRecordsBuf to p.Conn. Since we return - // the number of plaintext bytes written without overhead, we will - // always return 0 while p.Conn.Write returns the entire record length. - _, err = p.Conn.Write(p.outRecordsBuf[:recordEndIndex]) - return 0, err - } - - numRecords := int(math.Ceil(float64(len(b)) / float64(tlsRecordMaxPlaintextSize))) - totalRecordsSize := len(b) + numRecords*p.overheadSize - partialBSize := len(b) - if totalRecordsSize > outBufMaxSize { - totalRecordsSize = outBufMaxSize - partialBSize = outBufMaxRecords * tlsRecordMaxPlaintextSize - } - if len(p.outRecordsBuf) < totalRecordsSize { - p.outRecordsBuf = make([]byte, totalRecordsSize) - } - for bStart := 0; bStart < len(b); bStart += partialBSize { - bEnd := bStart + partialBSize - if bEnd > len(b) { - bEnd = len(b) - } - partialB := b[bStart:bEnd] - recordEndIndex := 0 - for len(partialB) > 0 { - recordEndIndex, partialB, err = p.buildRecord(partialB, recordType, recordEndIndex) - if err != nil { - // Return the amount of bytes written prior to the error. - return bStart, err - } - } - // Write the bytes stored in outRecordsBuf to p.Conn. If there is an - // error, calculate the total number of plaintext bytes of complete - // records successfully written to the peer and return it. - nn, err := p.Conn.Write(p.outRecordsBuf[:recordEndIndex]) - if err != nil { - numberOfCompletedRecords := int(math.Floor(float64(nn) / float64(tlsRecordMaxSize))) - return bStart + numberOfCompletedRecords*tlsRecordMaxPlaintextSize, err - } - } - return len(b), nil -} - -// buildRecord builds a TLS 1.3 record of type recordType from plaintext, -// and writes the record to outRecordsBuf at recordStartIndex. The record will -// have at most tlsRecordMaxPlaintextSize bytes of payload. It returns the -// index of outRecordsBuf where the current record ends, as well as any -// remaining plaintext bytes. -func (p *conn) buildRecord(plaintext []byte, recordType byte, recordStartIndex int) (n int, remainingPlaintext []byte, err error) { - // Construct the payload, which consists of application data and record type. - dataLen := len(plaintext) - if dataLen > tlsRecordMaxPlaintextSize { - dataLen = tlsRecordMaxPlaintextSize - } - remainingPlaintext = plaintext[dataLen:] - newRecordBuf := p.outRecordsBuf[recordStartIndex:] - - copy(newRecordBuf[tlsRecordHeaderSize:], plaintext[:dataLen]) - newRecordBuf[tlsRecordHeaderSize+dataLen] = recordType - payload := newRecordBuf[tlsRecordHeaderSize : tlsRecordHeaderSize+dataLen+1] // 1 is for the recordType. - // Construct the header. - newRecordBuf[0] = tlsApplicationData - newRecordBuf[1] = tlsLegacyRecordVersion - newRecordBuf[2] = tlsLegacyRecordVersion - binary.BigEndian.PutUint16(newRecordBuf[3:], uint16(len(payload)+tlsTagSize)) - header := newRecordBuf[:tlsRecordHeaderSize] - - // Encrypt the payload using header as aad. - encryptedPayload, err := p.outConn.Encrypt(newRecordBuf[tlsRecordHeaderSize:][:0], payload, header) - if err != nil { - return 0, plaintext, err - } - recordStartIndex += len(header) + len(encryptedPayload) - return recordStartIndex, remainingPlaintext, nil -} - -func (p *conn) Close() error { - // Close the connection immediately. - return p.Conn.Close() -} - -// stripPaddingAndType strips the padding by zeros and record type from -// p.pendingApplicationData and returns the record type. Note that -// p.pendingApplicationData should be of the form: -// [application data] + [record type byte] + [trailing zeros] -func (p *conn) stripPaddingAndType() (recordType, error) { - if len(p.pendingApplicationData) == 0 { - return 0, errors.New("application data had length 0") - } - i := len(p.pendingApplicationData) - 1 - // Search for the index of the record type byte. - for i > 0 { - if p.pendingApplicationData[i] != 0 { - break - } - i-- - } - rt := recordType(p.pendingApplicationData[i]) - p.pendingApplicationData = p.pendingApplicationData[:i] - return rt, nil -} - -// readFullRecord reads from the wire until a record is completed and returns -// the full record. -func (p *conn) readFullRecord() (fullRecord []byte, err error) { - fullRecord, p.nextRecord, err = parseReadBuffer(p.nextRecord, tlsRecordMaxPayloadSize) - if err != nil { - return nil, err - } - // Check whether the next record to be decrypted has been completely - // received. - if len(fullRecord) == 0 { - copy(p.unusedBuf, p.nextRecord) - p.unusedBuf = p.unusedBuf[:len(p.nextRecord)] - // Always copy next incomplete record to the beginning of the - // unusedBuf buffer and reset nextRecord to it. - p.nextRecord = p.unusedBuf - } - // Keep reading from the wire until we have a complete record. - for len(fullRecord) == 0 { - if len(p.unusedBuf) == cap(p.unusedBuf) { - tmp := make([]byte, len(p.unusedBuf), cap(p.unusedBuf)+tlsRecordMaxSize) - copy(tmp, p.unusedBuf) - p.unusedBuf = tmp - } - n, err := p.Conn.Read(p.unusedBuf[len(p.unusedBuf):min(cap(p.unusedBuf), len(p.unusedBuf)+tlsRecordMaxSize)]) - if err != nil { - return nil, err - } - p.unusedBuf = p.unusedBuf[:len(p.unusedBuf)+n] - fullRecord, p.nextRecord, err = parseReadBuffer(p.unusedBuf, tlsRecordMaxPayloadSize) - if err != nil { - return nil, err - } - } - return fullRecord, nil -} - -// parseReadBuffer parses the provided buffer and returns a full record and any -// remaining bytes in that buffer. If the record is incomplete, nil is returned -// for the first return value and the given byte buffer is returned for the -// second return value. The length of the payload specified by the header should -// not be greater than maxLen, otherwise an error is returned. Note that this -// function does not allocate or copy any buffers. -func parseReadBuffer(b []byte, maxLen uint16) (fullRecord, remaining []byte, err error) { - // If the header is not complete, return the provided buffer as remaining - // buffer. - if len(b) < tlsRecordHeaderSize { - return nil, b, nil - } - msgLenField := b[tlsRecordHeaderTypeSize+tlsRecordHeaderLegacyRecordVersionSize : tlsRecordHeaderSize] - length := binary.BigEndian.Uint16(msgLenField) - if length > maxLen { - return nil, nil, fmt.Errorf("record length larger than the limit %d", maxLen) - } - if len(b) < int(length)+tlsRecordHeaderSize { - // Record is not complete yet. - return nil, b, nil - } - return b[:tlsRecordHeaderSize+length], b[tlsRecordHeaderSize+length:], nil -} - -// splitAndValidateHeader splits the header from the payload in the TLS 1.3 -// record and returns them. Note that the header is checked for validity, and an -// error is returned when an invalid header is parsed. Also note that this -// function does not allocate or copy any buffers. -func splitAndValidateHeader(record []byte) (header, payload []byte, err error) { - if len(record) < tlsRecordHeaderSize { - return nil, nil, fmt.Errorf("record was smaller than the header size") - } - header = record[:tlsRecordHeaderSize] - payload = record[tlsRecordHeaderSize:] - if header[0] != tlsApplicationData { - return nil, nil, fmt.Errorf("incorrect type in the header") - } - // Check the legacy record version, which should be 0x03, 0x03. - if header[1] != 0x03 || header[2] != 0x03 { - return nil, nil, fmt.Errorf("incorrect legacy record version in the header") - } - return header, payload, nil -} - -// handleAlertMessage handles an alert message. -func (p *conn) handleAlertMessage() error { - if len(p.pendingApplicationData) != tlsAlertSize { - return errors.New("invalid alert message size") - } - alertType := p.pendingApplicationData[1] - // Clear the body of the alert message. - p.pendingApplicationData = p.pendingApplicationData[:0] - if alertType == byte(closeNotify) { - return errors.New("received a close notify alert") - } - // TODO(matthewstevenson88): Add support for more alert types. - return fmt.Errorf("received an unrecognized alert type: %v", alertType) -} - -// parseHandshakeHeader parses a handshake message from the handshake buffer. -// It returns the message type, the message length, the message, the raw message -// that includes the type and length bytes and a flag indicating whether the -// handshake message has been fully parsed. i.e. whether the entire handshake -// message was in the handshake buffer. -func (p *conn) parseHandshakeMsg() (msgType byte, msgLen uint32, msg []byte, rawMsg []byte, ok bool) { - // Handle the case where the 4 byte handshake header is fragmented. - if len(p.handshakeBuf) < tlsHandshakePrefixSize { - return 0, 0, nil, nil, false - } - msgType = p.handshakeBuf[0] - msgLen = bigEndianInt24(p.handshakeBuf[tlsHandshakeMsgTypeSize : tlsHandshakeMsgTypeSize+tlsHandshakeLengthSize]) - if msgLen > uint32(len(p.handshakeBuf)-tlsHandshakePrefixSize) { - return 0, 0, nil, nil, false - } - msg = p.handshakeBuf[tlsHandshakePrefixSize : tlsHandshakePrefixSize+msgLen] - rawMsg = p.handshakeBuf[:tlsHandshakeMsgTypeSize+tlsHandshakeLengthSize+msgLen] - p.handshakeBuf = p.handshakeBuf[tlsHandshakePrefixSize+msgLen:] - return msgType, msgLen, msg, rawMsg, true -} - -// handleHandshakeMessage handles a handshake message. Note that the first -// complete handshake message from the handshake buffer is removed, if it -// exists. -func (p *conn) handleHandshakeMessage() error { - // Copy the pending application data to the handshake buffer. At this point, - // we are guaranteed that the pending application data contains only parts - // of a handshake message. - p.handshakeBuf = append(p.handshakeBuf, p.pendingApplicationData...) - p.pendingApplicationData = p.pendingApplicationData[:0] - // Several handshake messages may be coalesced into a single record. - // Continue reading them until the handshake buffer is empty. - for len(p.handshakeBuf) > 0 { - handshakeMsgType, msgLen, msg, _, ok := p.parseHandshakeMsg() - if !ok { - // The handshake could not be fully parsed, so read in another - // record and try again later. - break - } - switch handshakeMsgType { - case tlsHandshakeKeyUpdateType: - if msgLen != tlsHandshakeKeyUpdateMsgSize { - return errors.New("invalid handshake key update message length") - } - if len(p.handshakeBuf) != 0 { - return errors.New("key update message must be the last message of a handshake record") - } - if err := p.handleKeyUpdateMsg(msg); err != nil { - return err - } - case tlsHandshakeNewSessionTicketType: - // Do nothing for session ticket. - default: - return errors.New("unknown handshake message type") - } - } - return nil -} - -func buildKeyUpdateRequest() []byte { - b := make([]byte, tlsHandshakePrefixSize+tlsHandshakeKeyUpdateMsgSize) - b[0] = tlsHandshakeKeyUpdateType - b[1] = 0 - b[2] = 0 - b[3] = tlsHandshakeKeyUpdateMsgSize - b[4] = byte(updateNotRequested) - return b -} - -// handleKeyUpdateMsg handles a key update message. -func (p *conn) handleKeyUpdateMsg(msg []byte) error { - keyUpdateRequest := msg[0] - if keyUpdateRequest != byte(updateNotRequested) && - keyUpdateRequest != byte(updateRequested) { - return errors.New("invalid handshake key update message") - } - if err := p.inConn.UpdateKey(); err != nil { - return err - } - // Send a key update message back to the peer if requested. - if keyUpdateRequest == byte(updateRequested) { - p.writeMutex.Lock() - defer p.writeMutex.Unlock() - n, err := p.writeTLSRecord(preConstructedKeyUpdateMsg, byte(handshake)) - if err != nil { - return err - } - if n != tlsHandshakePrefixSize+tlsHandshakeKeyUpdateMsgSize { - return errors.New("key update request message wrote less bytes than expected") - } - if err = p.outConn.UpdateKey(); err != nil { - return err - } - } - return nil -} - -// bidEndianInt24 converts the given byte buffer of at least size 3 and -// outputs the resulting 24 bit integer as a uint32. This is needed because -// TLS 1.3 requires 3 byte integers, and the binary.BigEndian package does -// not provide a way to transform a byte buffer into a 3 byte integer. -func bigEndianInt24(b []byte) uint32 { - _ = b[2] // bounds check hint to compiler; see golang.org/issue/14808 - return uint32(b[2]) | uint32(b[1])<<8 | uint32(b[0])<<16 -} - -func min(a, b int) int { - if a < b { - return a - } - return b -} diff --git a/vendor/github.com/google/s2a-go/internal/record/ticketsender.go b/vendor/github.com/google/s2a-go/internal/record/ticketsender.go deleted file mode 100644 index e51199ab3a..0000000000 --- a/vendor/github.com/google/s2a-go/internal/record/ticketsender.go +++ /dev/null @@ -1,178 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 record - -import ( - "context" - "fmt" - "sync" - "time" - - "github.com/google/s2a-go/internal/handshaker/service" - commonpb "github.com/google/s2a-go/internal/proto/common_go_proto" - s2apb "github.com/google/s2a-go/internal/proto/s2a_go_proto" - "github.com/google/s2a-go/internal/tokenmanager" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" -) - -// sessionTimeout is the timeout for creating a session with the S2A handshaker -// service. -const sessionTimeout = time.Second * 5 - -// s2aTicketSender sends session tickets to the S2A handshaker service. -type s2aTicketSender interface { - // sendTicketsToS2A sends the given session tickets to the S2A handshaker - // service. - sendTicketsToS2A(sessionTickets [][]byte, callComplete chan bool) -} - -// ticketStream is the stream used to send and receive session information. -type ticketStream interface { - Send(*s2apb.SessionReq) error - Recv() (*s2apb.SessionResp, error) -} - -type ticketSender struct { - // hsAddr stores the address of the S2A handshaker service. - hsAddr string - // connectionID is the connection identifier that was created and sent by - // S2A at the end of a handshake. - connectionID uint64 - // localIdentity is the local identity that was used by S2A during session - // setup and included in the session result. - localIdentity *commonpb.Identity - // tokenManager manages access tokens for authenticating to S2A. - tokenManager tokenmanager.AccessTokenManager - // ensureProcessSessionTickets allows users to wait and ensure that all - // available session tickets are sent to S2A before a process completes. - ensureProcessSessionTickets *sync.WaitGroup -} - -// sendTicketsToS2A sends the given sessionTickets to the S2A handshaker -// service. This is done asynchronously and writes to the error logs if an error -// occurs. -func (t *ticketSender) sendTicketsToS2A(sessionTickets [][]byte, callComplete chan bool) { - // Note that the goroutine is in the function rather than at the caller - // because the fake ticket sender used for testing must run synchronously - // so that the session tickets can be accessed from it after the tests have - // been run. - if t.ensureProcessSessionTickets != nil { - t.ensureProcessSessionTickets.Add(1) - } - go func() { - if err := func() error { - defer func() { - if t.ensureProcessSessionTickets != nil { - t.ensureProcessSessionTickets.Done() - } - }() - ctx, cancel := context.WithTimeout(context.Background(), sessionTimeout) - defer cancel() - // The transportCreds only needs to be set when talking to S2AV2 and also - // if mTLS is required. - hsConn, err := service.Dial(ctx, t.hsAddr, nil) - if err != nil { - return err - } - client := s2apb.NewS2AServiceClient(hsConn) - session, err := client.SetUpSession(ctx) - if err != nil { - return err - } - defer func() { - if err := session.CloseSend(); err != nil { - grpclog.Error(err) - } - }() - return t.writeTicketsToStream(session, sessionTickets) - }(); err != nil { - grpclog.Errorf("failed to send resumption tickets to S2A with identity: %v, %v", - t.localIdentity, err) - } - callComplete <- true - close(callComplete) - }() -} - -// writeTicketsToStream writes the given session tickets to the given stream. -func (t *ticketSender) writeTicketsToStream(stream ticketStream, sessionTickets [][]byte) error { - if err := stream.Send( - &s2apb.SessionReq{ - ReqOneof: &s2apb.SessionReq_ResumptionTicket{ - ResumptionTicket: &s2apb.ResumptionTicketReq{ - InBytes: sessionTickets, - ConnectionId: t.connectionID, - LocalIdentity: t.localIdentity, - }, - }, - AuthMechanisms: t.getAuthMechanisms(), - }, - ); err != nil { - return err - } - sessionResp, err := stream.Recv() - if err != nil { - return err - } - if sessionResp.GetStatus().GetCode() != uint32(codes.OK) { - return fmt.Errorf("s2a session ticket response had error status: %v, %v", - sessionResp.GetStatus().GetCode(), sessionResp.GetStatus().GetDetails()) - } - return nil -} - -func (t *ticketSender) getAuthMechanisms() []*s2apb.AuthenticationMechanism { - if t.tokenManager == nil { - return nil - } - // First handle the special case when no local identity has been provided - // by the application. In this case, an AuthenticationMechanism with no local - // identity will be sent. - if t.localIdentity == nil { - token, err := t.tokenManager.DefaultToken() - if err != nil { - grpclog.Infof("unable to get token for empty local identity: %v", err) - return nil - } - return []*s2apb.AuthenticationMechanism{ - { - MechanismOneof: &s2apb.AuthenticationMechanism_Token{ - Token: token, - }, - }, - } - } - - // Next, handle the case where the application (or the S2A) has specified - // a local identity. - token, err := t.tokenManager.Token(t.localIdentity) - if err != nil { - grpclog.Infof("unable to get token for local identity %v: %v", t.localIdentity, err) - return nil - } - return []*s2apb.AuthenticationMechanism{ - { - Identity: t.localIdentity, - MechanismOneof: &s2apb.AuthenticationMechanism_Token{ - Token: token, - }, - }, - } -} diff --git a/vendor/github.com/google/s2a-go/internal/tokenmanager/tokenmanager.go b/vendor/github.com/google/s2a-go/internal/tokenmanager/tokenmanager.go deleted file mode 100644 index 4057e70c8a..0000000000 --- a/vendor/github.com/google/s2a-go/internal/tokenmanager/tokenmanager.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 tokenmanager provides tokens for authenticating to S2A. -package tokenmanager - -import ( - "fmt" - "os" - - commonpbv1 "github.com/google/s2a-go/internal/proto/common_go_proto" - commonpb "github.com/google/s2a-go/internal/proto/v2/common_go_proto" -) - -const ( - s2aAccessTokenEnvironmentVariable = "S2A_ACCESS_TOKEN" -) - -// AccessTokenManager manages tokens for authenticating to S2A. -type AccessTokenManager interface { - // DefaultToken returns a token that an application with no specified local - // identity must use to authenticate to S2A. - DefaultToken() (token string, err error) - // Token returns a token that an application with local identity equal to - // identity must use to authenticate to S2A. - Token(identity interface{}) (token string, err error) -} - -type singleTokenAccessTokenManager struct { - token string -} - -// NewSingleTokenAccessTokenManager returns a new AccessTokenManager instance -// that will always manage the same token. -// -// The token to be managed is read from the s2aAccessTokenEnvironmentVariable -// environment variable. If this environment variable is not set, then this -// function returns an error. -func NewSingleTokenAccessTokenManager() (AccessTokenManager, error) { - token, variableExists := os.LookupEnv(s2aAccessTokenEnvironmentVariable) - if !variableExists { - return nil, fmt.Errorf("%s environment variable is not set", s2aAccessTokenEnvironmentVariable) - } - return &singleTokenAccessTokenManager{token: token}, nil -} - -// DefaultToken always returns the token managed by the -// singleTokenAccessTokenManager. -func (m *singleTokenAccessTokenManager) DefaultToken() (string, error) { - return m.token, nil -} - -// Token always returns the token managed by the singleTokenAccessTokenManager. -func (m *singleTokenAccessTokenManager) Token(identity interface{}) (string, error) { - switch v := identity.(type) { - case *commonpbv1.Identity: - // valid type. - case *commonpb.Identity: - // valid type. - default: - return "", fmt.Errorf("Incorrect identity type: %v", v) - } - return m.token, nil -} diff --git a/vendor/github.com/google/s2a-go/internal/v2/README.md b/vendor/github.com/google/s2a-go/internal/v2/README.md deleted file mode 100644 index 3806d1e9cc..0000000000 --- a/vendor/github.com/google/s2a-go/internal/v2/README.md +++ /dev/null @@ -1 +0,0 @@ -**This directory has the implementation of the S2Av2's gRPC-Go client libraries** diff --git a/vendor/github.com/google/s2a-go/internal/v2/certverifier/certverifier.go b/vendor/github.com/google/s2a-go/internal/v2/certverifier/certverifier.go deleted file mode 100644 index cc811879b5..0000000000 --- a/vendor/github.com/google/s2a-go/internal/v2/certverifier/certverifier.go +++ /dev/null @@ -1,122 +0,0 @@ -/* - * - * Copyright 2022 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 - * - * https://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 certverifier offloads verifications to S2Av2. -package certverifier - -import ( - "crypto/x509" - "fmt" - - "github.com/google/s2a-go/stream" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -// VerifyClientCertificateChain builds a SessionReq, sends it to S2Av2 and -// receives a SessionResp. -func VerifyClientCertificateChain(verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, s2AStream stream.S2AStream) func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { - return func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { - // Offload verification to S2Av2. - if grpclog.V(1) { - grpclog.Infof("Sending request to S2Av2 for client peer cert chain validation.") - } - if err := s2AStream.Send(&s2av2pb.SessionReq{ - ReqOneof: &s2av2pb.SessionReq_ValidatePeerCertificateChainReq{ - ValidatePeerCertificateChainReq: &s2av2pb.ValidatePeerCertificateChainReq{ - Mode: verificationMode, - PeerOneof: &s2av2pb.ValidatePeerCertificateChainReq_ClientPeer_{ - ClientPeer: &s2av2pb.ValidatePeerCertificateChainReq_ClientPeer{ - CertificateChain: rawCerts, - }, - }, - }, - }, - }); err != nil { - grpclog.Infof("Failed to send request to S2Av2 for client peer cert chain validation.") - return err - } - - // Get the response from S2Av2. - resp, err := s2AStream.Recv() - if err != nil { - grpclog.Infof("Failed to receive client peer cert chain validation response from S2Av2.") - return err - } - - // Parse the response. - if (resp.GetStatus() != nil) && (resp.GetStatus().Code != uint32(codes.OK)) { - return fmt.Errorf("failed to offload client cert verification to S2A: %d, %v", resp.GetStatus().Code, resp.GetStatus().Details) - - } - - if resp.GetValidatePeerCertificateChainResp().ValidationResult != s2av2pb.ValidatePeerCertificateChainResp_SUCCESS { - return fmt.Errorf("client cert verification failed: %v", resp.GetValidatePeerCertificateChainResp().ValidationDetails) - } - - return nil - } -} - -// VerifyServerCertificateChain builds a SessionReq, sends it to S2Av2 and -// receives a SessionResp. -func VerifyServerCertificateChain(hostname string, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, s2AStream stream.S2AStream, serverAuthorizationPolicy []byte) func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { - return func(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error { - // Offload verification to S2Av2. - if grpclog.V(1) { - grpclog.Infof("Sending request to S2Av2 for server peer cert chain validation.") - } - if err := s2AStream.Send(&s2av2pb.SessionReq{ - ReqOneof: &s2av2pb.SessionReq_ValidatePeerCertificateChainReq{ - ValidatePeerCertificateChainReq: &s2av2pb.ValidatePeerCertificateChainReq{ - Mode: verificationMode, - PeerOneof: &s2av2pb.ValidatePeerCertificateChainReq_ServerPeer_{ - ServerPeer: &s2av2pb.ValidatePeerCertificateChainReq_ServerPeer{ - CertificateChain: rawCerts, - ServerHostname: hostname, - SerializedUnrestrictedClientPolicy: serverAuthorizationPolicy, - }, - }, - }, - }, - }); err != nil { - grpclog.Infof("Failed to send request to S2Av2 for server peer cert chain validation.") - return err - } - - // Get the response from S2Av2. - resp, err := s2AStream.Recv() - if err != nil { - grpclog.Infof("Failed to receive server peer cert chain validation response from S2Av2.") - return err - } - - // Parse the response. - if (resp.GetStatus() != nil) && (resp.GetStatus().Code != uint32(codes.OK)) { - return fmt.Errorf("failed to offload server cert verification to S2A: %d, %v", resp.GetStatus().Code, resp.GetStatus().Details) - } - - if resp.GetValidatePeerCertificateChainResp().ValidationResult != s2av2pb.ValidatePeerCertificateChainResp_SUCCESS { - return fmt.Errorf("server cert verification failed: %v", resp.GetValidatePeerCertificateChainResp().ValidationDetails) - } - - return nil - } -} diff --git a/vendor/github.com/google/s2a-go/internal/v2/remotesigner/remotesigner.go b/vendor/github.com/google/s2a-go/internal/v2/remotesigner/remotesigner.go deleted file mode 100644 index e7478d43fb..0000000000 --- a/vendor/github.com/google/s2a-go/internal/v2/remotesigner/remotesigner.go +++ /dev/null @@ -1,186 +0,0 @@ -/* - * - * Copyright 2022 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 - * - * https://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 remotesigner offloads private key operations to S2Av2. -package remotesigner - -import ( - "crypto" - "crypto/rsa" - "crypto/x509" - "fmt" - "io" - - "github.com/google/s2a-go/stream" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -// remoteSigner implementes the crypto.Signer interface. -type remoteSigner struct { - leafCert *x509.Certificate - s2AStream stream.S2AStream -} - -// New returns an instance of RemoteSigner, an implementation of the -// crypto.Signer interface. -func New(leafCert *x509.Certificate, s2AStream stream.S2AStream) crypto.Signer { - return &remoteSigner{leafCert, s2AStream} -} - -func (s *remoteSigner) Public() crypto.PublicKey { - return s.leafCert.PublicKey -} - -func (s *remoteSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) (signature []byte, err error) { - signatureAlgorithm, err := getSignatureAlgorithm(opts, s.leafCert) - if err != nil { - return nil, err - } - - req, err := getSignReq(signatureAlgorithm, digest) - if err != nil { - return nil, err - } - if grpclog.V(1) { - grpclog.Infof("Sending request to S2Av2 for signing operation.") - } - if err := s.s2AStream.Send(&s2av2pb.SessionReq{ - ReqOneof: &s2av2pb.SessionReq_OffloadPrivateKeyOperationReq{ - OffloadPrivateKeyOperationReq: req, - }, - }); err != nil { - grpclog.Infof("Failed to send request to S2Av2 for signing operation.") - return nil, err - } - - resp, err := s.s2AStream.Recv() - if err != nil { - grpclog.Infof("Failed to receive signing operation response from S2Av2.") - return nil, err - } - - if (resp.GetStatus() != nil) && (resp.GetStatus().Code != uint32(codes.OK)) { - return nil, fmt.Errorf("failed to offload signing with private key to S2A: %d, %v", resp.GetStatus().Code, resp.GetStatus().Details) - } - - return resp.GetOffloadPrivateKeyOperationResp().GetOutBytes(), nil -} - -// getCert returns the leafCert field in s. -func (s *remoteSigner) getCert() *x509.Certificate { - return s.leafCert -} - -// getStream returns the s2AStream field in s. -func (s *remoteSigner) getStream() stream.S2AStream { - return s.s2AStream -} - -func getSignReq(signatureAlgorithm s2av2pb.SignatureAlgorithm, digest []byte) (*s2av2pb.OffloadPrivateKeyOperationReq, error) { - if (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA256) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP256R1_SHA256) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA256) { - return &s2av2pb.OffloadPrivateKeyOperationReq{ - Operation: s2av2pb.OffloadPrivateKeyOperationReq_SIGN, - SignatureAlgorithm: signatureAlgorithm, - InBytes: &s2av2pb.OffloadPrivateKeyOperationReq_Sha256Digest{ - Sha256Digest: digest, - }, - }, nil - } else if (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA384) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP384R1_SHA384) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA384) { - return &s2av2pb.OffloadPrivateKeyOperationReq{ - Operation: s2av2pb.OffloadPrivateKeyOperationReq_SIGN, - SignatureAlgorithm: signatureAlgorithm, - InBytes: &s2av2pb.OffloadPrivateKeyOperationReq_Sha384Digest{ - Sha384Digest: digest, - }, - }, nil - } else if (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA512) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP521R1_SHA512) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA512) || (signatureAlgorithm == s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ED25519) { - return &s2av2pb.OffloadPrivateKeyOperationReq{ - Operation: s2av2pb.OffloadPrivateKeyOperationReq_SIGN, - SignatureAlgorithm: signatureAlgorithm, - InBytes: &s2av2pb.OffloadPrivateKeyOperationReq_Sha512Digest{ - Sha512Digest: digest, - }, - }, nil - } else { - return nil, fmt.Errorf("unknown signature algorithm: %v", signatureAlgorithm) - } -} - -// getSignatureAlgorithm returns the signature algorithm that S2A must use when -// performing a signing operation that has been offloaded by an application -// using the crypto/tls libraries. -func getSignatureAlgorithm(opts crypto.SignerOpts, leafCert *x509.Certificate) (s2av2pb.SignatureAlgorithm, error) { - if opts == nil || leafCert == nil { - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED, fmt.Errorf("unknown signature algorithm") - } - switch leafCert.PublicKeyAlgorithm { - case x509.RSA: - if rsaPSSOpts, ok := opts.(*rsa.PSSOptions); ok { - return rsaPSSAlgorithm(rsaPSSOpts) - } - return rsaPPKCS1Algorithm(opts) - case x509.ECDSA: - return ecdsaAlgorithm(opts) - case x509.Ed25519: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ED25519, nil - default: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED, fmt.Errorf("unknown signature algorithm: %q", leafCert.PublicKeyAlgorithm) - } -} - -func rsaPSSAlgorithm(opts *rsa.PSSOptions) (s2av2pb.SignatureAlgorithm, error) { - switch opts.HashFunc() { - case crypto.SHA256: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA256, nil - case crypto.SHA384: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA384, nil - case crypto.SHA512: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PSS_RSAE_SHA512, nil - default: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED, fmt.Errorf("unknown signature algorithm") - } -} - -func rsaPPKCS1Algorithm(opts crypto.SignerOpts) (s2av2pb.SignatureAlgorithm, error) { - switch opts.HashFunc() { - case crypto.SHA256: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA256, nil - case crypto.SHA384: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA384, nil - case crypto.SHA512: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_RSA_PKCS1_SHA512, nil - default: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED, fmt.Errorf("unknown signature algorithm") - } -} - -func ecdsaAlgorithm(opts crypto.SignerOpts) (s2av2pb.SignatureAlgorithm, error) { - switch opts.HashFunc() { - case crypto.SHA256: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP256R1_SHA256, nil - case crypto.SHA384: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP384R1_SHA384, nil - case crypto.SHA512: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_ECDSA_SECP521R1_SHA512, nil - default: - return s2av2pb.SignatureAlgorithm_S2A_SSL_SIGN_UNSPECIFIED, fmt.Errorf("unknown signature algorithm") - } -} diff --git a/vendor/github.com/google/s2a-go/internal/v2/s2av2.go b/vendor/github.com/google/s2a-go/internal/v2/s2av2.go deleted file mode 100644 index 0cc78547e9..0000000000 --- a/vendor/github.com/google/s2a-go/internal/v2/s2av2.go +++ /dev/null @@ -1,380 +0,0 @@ -/* - * - * Copyright 2022 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 - * - * https://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 v2 provides the S2Av2 transport credentials used by a gRPC -// application. -package v2 - -import ( - "context" - "crypto/tls" - "errors" - "net" - "os" - "time" - - "github.com/google/s2a-go/fallback" - "github.com/google/s2a-go/internal/handshaker/service" - "github.com/google/s2a-go/internal/tokenmanager" - "github.com/google/s2a-go/internal/v2/tlsconfigstore" - "github.com/google/s2a-go/retry" - "github.com/google/s2a-go/stream" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/grpclog" - "google.golang.org/protobuf/proto" - - commonpb "github.com/google/s2a-go/internal/proto/v2/common_go_proto" - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -const ( - s2aSecurityProtocol = "tls" - defaultS2ATimeout = 6 * time.Second -) - -// An environment variable, which sets the timeout enforced on the connection to the S2A service for handshake. -const s2aTimeoutEnv = "S2A_TIMEOUT" - -type s2av2TransportCreds struct { - info *credentials.ProtocolInfo - isClient bool - serverName string - s2av2Address string - transportCreds credentials.TransportCredentials - tokenManager *tokenmanager.AccessTokenManager - // localIdentity should only be used by the client. - localIdentity *commonpb.Identity - // localIdentities should only be used by the server. - localIdentities []*commonpb.Identity - verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode - fallbackClientHandshake fallback.ClientHandshake - getS2AStream stream.GetS2AStream - serverAuthorizationPolicy []byte -} - -// NewClientCreds returns a client-side transport credentials object that uses -// the S2Av2 to establish a secure connection with a server. -func NewClientCreds(s2av2Address string, transportCreds credentials.TransportCredentials, localIdentity *commonpb.Identity, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, fallbackClientHandshakeFunc fallback.ClientHandshake, getS2AStream stream.GetS2AStream, serverAuthorizationPolicy []byte) (credentials.TransportCredentials, error) { - // Create an AccessTokenManager instance to use to authenticate to S2Av2. - accessTokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - - creds := &s2av2TransportCreds{ - info: &credentials.ProtocolInfo{ - SecurityProtocol: s2aSecurityProtocol, - }, - isClient: true, - serverName: "", - s2av2Address: s2av2Address, - transportCreds: transportCreds, - localIdentity: localIdentity, - verificationMode: verificationMode, - fallbackClientHandshake: fallbackClientHandshakeFunc, - getS2AStream: getS2AStream, - serverAuthorizationPolicy: serverAuthorizationPolicy, - } - if err != nil { - creds.tokenManager = nil - } else { - creds.tokenManager = &accessTokenManager - } - if grpclog.V(1) { - grpclog.Info("Created client S2Av2 transport credentials.") - } - return creds, nil -} - -// NewServerCreds returns a server-side transport credentials object that uses -// the S2Av2 to establish a secure connection with a client. -func NewServerCreds(s2av2Address string, transportCreds credentials.TransportCredentials, localIdentities []*commonpb.Identity, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, getS2AStream stream.GetS2AStream) (credentials.TransportCredentials, error) { - // Create an AccessTokenManager instance to use to authenticate to S2Av2. - accessTokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - creds := &s2av2TransportCreds{ - info: &credentials.ProtocolInfo{ - SecurityProtocol: s2aSecurityProtocol, - }, - isClient: false, - s2av2Address: s2av2Address, - transportCreds: transportCreds, - localIdentities: localIdentities, - verificationMode: verificationMode, - getS2AStream: getS2AStream, - } - if err != nil { - creds.tokenManager = nil - } else { - creds.tokenManager = &accessTokenManager - } - if grpclog.V(1) { - grpclog.Info("Created server S2Av2 transport credentials.") - } - return creds, nil -} - -// ClientHandshake performs a client-side mTLS handshake using the S2Av2. -func (c *s2av2TransportCreds) ClientHandshake(ctx context.Context, serverAuthority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { - if !c.isClient { - return nil, nil, errors.New("client handshake called using server transport credentials") - } - // Remove the port from serverAuthority. - serverName := removeServerNamePort(serverAuthority) - timeoutCtx, cancel := context.WithTimeout(ctx, GetS2ATimeout()) - defer cancel() - var s2AStream stream.S2AStream - var err error - retry.Run(timeoutCtx, - func() error { - s2AStream, err = createStream(timeoutCtx, c.s2av2Address, c.transportCreds, c.getS2AStream) - return err - }) - if err != nil { - grpclog.Infof("Failed to connect to S2Av2: %v", err) - if c.fallbackClientHandshake != nil { - return c.fallbackClientHandshake(ctx, serverAuthority, rawConn, err) - } - return nil, nil, err - } - defer s2AStream.CloseSend() - if grpclog.V(1) { - grpclog.Infof("Connected to S2Av2.") - } - var config *tls.Config - - var tokenManager tokenmanager.AccessTokenManager - if c.tokenManager == nil { - tokenManager = nil - } else { - tokenManager = *c.tokenManager - } - - sn := serverName - if c.serverName != "" { - sn = c.serverName - } - retry.Run(timeoutCtx, - func() error { - config, err = tlsconfigstore.GetTLSConfigurationForClient(sn, s2AStream, tokenManager, c.localIdentity, c.verificationMode, c.serverAuthorizationPolicy) - return err - }) - if err != nil { - grpclog.Info("Failed to get client TLS config from S2Av2: %v", err) - if c.fallbackClientHandshake != nil { - return c.fallbackClientHandshake(ctx, serverAuthority, rawConn, err) - } - return nil, nil, err - } - if grpclog.V(1) { - grpclog.Infof("Got client TLS config from S2Av2.") - } - - creds := credentials.NewTLS(config) - conn, authInfo, err := creds.ClientHandshake(timeoutCtx, serverName, rawConn) - if err != nil { - grpclog.Infof("Failed to do client handshake using S2Av2: %v", err) - if c.fallbackClientHandshake != nil { - return c.fallbackClientHandshake(ctx, serverAuthority, rawConn, err) - } - return nil, nil, err - } - grpclog.Infof("client-side handshake is done using S2Av2 to: %s", serverName) - - return conn, authInfo, err -} - -// ServerHandshake performs a server-side mTLS handshake using the S2Av2. -func (c *s2av2TransportCreds) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { - if c.isClient { - return nil, nil, errors.New("server handshake called using client transport credentials") - } - ctx, cancel := context.WithTimeout(context.Background(), GetS2ATimeout()) - defer cancel() - var s2AStream stream.S2AStream - var err error - retry.Run(ctx, - func() error { - s2AStream, err = createStream(ctx, c.s2av2Address, c.transportCreds, c.getS2AStream) - return err - }) - if err != nil { - grpclog.Infof("Failed to connect to S2Av2: %v", err) - return nil, nil, err - } - defer s2AStream.CloseSend() - if grpclog.V(1) { - grpclog.Infof("Connected to S2Av2.") - } - - var tokenManager tokenmanager.AccessTokenManager - if c.tokenManager == nil { - tokenManager = nil - } else { - tokenManager = *c.tokenManager - } - - var config *tls.Config - retry.Run(ctx, - func() error { - config, err = tlsconfigstore.GetTLSConfigurationForServer(s2AStream, tokenManager, c.localIdentities, c.verificationMode) - return err - }) - if err != nil { - grpclog.Infof("Failed to get server TLS config from S2Av2: %v", err) - return nil, nil, err - } - if grpclog.V(1) { - grpclog.Infof("Got server TLS config from S2Av2.") - } - - creds := credentials.NewTLS(config) - conn, authInfo, err := creds.ServerHandshake(rawConn) - if err != nil { - grpclog.Infof("Failed to do server handshake using S2Av2: %v", err) - return nil, nil, err - } - return conn, authInfo, err -} - -// Info returns protocol info of s2av2TransportCreds. -func (c *s2av2TransportCreds) Info() credentials.ProtocolInfo { - return *c.info -} - -// Clone makes a deep copy of s2av2TransportCreds. -func (c *s2av2TransportCreds) Clone() credentials.TransportCredentials { - info := *c.info - serverName := c.serverName - fallbackClientHandshake := c.fallbackClientHandshake - - s2av2Address := c.s2av2Address - var tokenManager tokenmanager.AccessTokenManager - if c.tokenManager == nil { - tokenManager = nil - } else { - tokenManager = *c.tokenManager - } - verificationMode := c.verificationMode - var localIdentity *commonpb.Identity - if c.localIdentity != nil { - localIdentity = proto.Clone(c.localIdentity).(*commonpb.Identity) - } - var localIdentities []*commonpb.Identity - if c.localIdentities != nil { - localIdentities = make([]*commonpb.Identity, len(c.localIdentities)) - for i, localIdentity := range c.localIdentities { - localIdentities[i] = proto.Clone(localIdentity).(*commonpb.Identity) - } - } - creds := &s2av2TransportCreds{ - info: &info, - isClient: c.isClient, - serverName: serverName, - fallbackClientHandshake: fallbackClientHandshake, - s2av2Address: s2av2Address, - localIdentity: localIdentity, - localIdentities: localIdentities, - verificationMode: verificationMode, - } - if c.tokenManager == nil { - creds.tokenManager = nil - } else { - creds.tokenManager = &tokenManager - } - return creds -} - -// NewClientTLSConfig returns a tls.Config instance that uses S2Av2 to establish a TLS connection as -// a client. The tls.Config MUST only be used to establish a single TLS connection. -func NewClientTLSConfig( - ctx context.Context, - s2av2Address string, - transportCreds credentials.TransportCredentials, - tokenManager tokenmanager.AccessTokenManager, - verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, - serverName string, - serverAuthorizationPolicy []byte, - getStream stream.GetS2AStream) (*tls.Config, error) { - s2AStream, err := createStream(ctx, s2av2Address, transportCreds, getStream) - if err != nil { - grpclog.Infof("Failed to connect to S2Av2: %v", err) - return nil, err - } - - return tlsconfigstore.GetTLSConfigurationForClient(removeServerNamePort(serverName), s2AStream, tokenManager, nil, verificationMode, serverAuthorizationPolicy) -} - -// OverrideServerName sets the ServerName in the s2av2TransportCreds protocol -// info. The ServerName MUST be a hostname. -func (c *s2av2TransportCreds) OverrideServerName(serverNameOverride string) error { - serverName := removeServerNamePort(serverNameOverride) - c.info.ServerName = serverName - c.serverName = serverName - return nil -} - -// Remove the trailing port from server name. -func removeServerNamePort(serverName string) string { - name, _, err := net.SplitHostPort(serverName) - if err != nil { - name = serverName - } - return name -} - -type s2AGrpcStream struct { - stream s2av2pb.S2AService_SetUpSessionClient -} - -func (x s2AGrpcStream) Send(m *s2av2pb.SessionReq) error { - return x.stream.Send(m) -} - -func (x s2AGrpcStream) Recv() (*s2av2pb.SessionResp, error) { - return x.stream.Recv() -} - -func (x s2AGrpcStream) CloseSend() error { - return x.stream.CloseSend() -} - -func createStream(ctx context.Context, s2av2Address string, transportCreds credentials.TransportCredentials, getS2AStream stream.GetS2AStream) (stream.S2AStream, error) { - if getS2AStream != nil { - return getS2AStream(ctx, s2av2Address) - } - // TODO(rmehta19): Consider whether to close the connection to S2Av2. - conn, err := service.Dial(ctx, s2av2Address, transportCreds) - if err != nil { - return nil, err - } - client := s2av2pb.NewS2AServiceClient(conn) - gRPCStream, err := client.SetUpSession(ctx, []grpc.CallOption{}...) - if err != nil { - return nil, err - } - return &s2AGrpcStream{ - stream: gRPCStream, - }, nil -} - -// GetS2ATimeout returns the timeout enforced on the connection to the S2A service for handshake. -func GetS2ATimeout() time.Duration { - timeout, err := time.ParseDuration(os.Getenv(s2aTimeoutEnv)) - if err != nil { - return defaultS2ATimeout - } - return timeout -} diff --git a/vendor/github.com/google/s2a-go/internal/v2/tlsconfigstore/tlsconfigstore.go b/vendor/github.com/google/s2a-go/internal/v2/tlsconfigstore/tlsconfigstore.go deleted file mode 100644 index 6ca75f5608..0000000000 --- a/vendor/github.com/google/s2a-go/internal/v2/tlsconfigstore/tlsconfigstore.go +++ /dev/null @@ -1,403 +0,0 @@ -/* - * - * Copyright 2022 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 - * - * https://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 tlsconfigstore offloads operations to S2Av2. -package tlsconfigstore - -import ( - "crypto/tls" - "crypto/x509" - "encoding/pem" - "errors" - "fmt" - - "github.com/google/s2a-go/internal/tokenmanager" - "github.com/google/s2a-go/internal/v2/certverifier" - "github.com/google/s2a-go/internal/v2/remotesigner" - "github.com/google/s2a-go/stream" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - - commonpb "github.com/google/s2a-go/internal/proto/v2/common_go_proto" - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -const ( - // HTTP/2 - h2 = "h2" -) - -// GetTLSConfigurationForClient returns a tls.Config instance for use by a client application. -func GetTLSConfigurationForClient(serverHostname string, s2AStream stream.S2AStream, tokenManager tokenmanager.AccessTokenManager, localIdentity *commonpb.Identity, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, serverAuthorizationPolicy []byte) (*tls.Config, error) { - authMechanisms := getAuthMechanisms(tokenManager, []*commonpb.Identity{localIdentity}) - - if grpclog.V(1) { - grpclog.Infof("Sending request to S2Av2 for client TLS config.") - } - // Send request to S2Av2 for config. - if err := s2AStream.Send(&s2av2pb.SessionReq{ - LocalIdentity: localIdentity, - AuthenticationMechanisms: authMechanisms, - ReqOneof: &s2av2pb.SessionReq_GetTlsConfigurationReq{ - GetTlsConfigurationReq: &s2av2pb.GetTlsConfigurationReq{ - ConnectionSide: commonpb.ConnectionSide_CONNECTION_SIDE_CLIENT, - }, - }, - }); err != nil { - grpclog.Infof("Failed to send request to S2Av2 for client TLS config") - return nil, err - } - - // Get the response containing config from S2Av2. - resp, err := s2AStream.Recv() - if err != nil { - grpclog.Infof("Failed to receive client TLS config response from S2Av2.") - return nil, err - } - - // TODO(rmehta19): Add unit test for this if statement. - if (resp.GetStatus() != nil) && (resp.GetStatus().Code != uint32(codes.OK)) { - return nil, fmt.Errorf("failed to get TLS configuration from S2A: %d, %v", resp.GetStatus().Code, resp.GetStatus().Details) - } - - // Extract TLS configuration from SessionResp. - tlsConfig := resp.GetGetTlsConfigurationResp().GetClientTlsConfiguration() - - var cert tls.Certificate - for i, v := range tlsConfig.CertificateChain { - // Populate Certificates field. - block, _ := pem.Decode([]byte(v)) - if block == nil { - return nil, errors.New("certificate in CertificateChain obtained from S2Av2 is empty") - } - x509Cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, err - } - cert.Certificate = append(cert.Certificate, x509Cert.Raw) - if i == 0 { - cert.Leaf = x509Cert - } - } - - if len(tlsConfig.CertificateChain) > 0 { - cert.PrivateKey = remotesigner.New(cert.Leaf, s2AStream) - if cert.PrivateKey == nil { - return nil, errors.New("failed to retrieve Private Key from Remote Signer Library") - } - } - - minVersion, maxVersion, err := getTLSMinMaxVersionsClient(tlsConfig) - if err != nil { - return nil, err - } - - // Create mTLS credentials for client. - config := &tls.Config{ - VerifyPeerCertificate: certverifier.VerifyServerCertificateChain(serverHostname, verificationMode, s2AStream, serverAuthorizationPolicy), - ServerName: serverHostname, - InsecureSkipVerify: true, // NOLINT - ClientSessionCache: nil, - SessionTicketsDisabled: true, - MinVersion: minVersion, - MaxVersion: maxVersion, - NextProtos: []string{h2}, - } - if len(tlsConfig.CertificateChain) > 0 { - config.Certificates = []tls.Certificate{cert} - } - return config, nil -} - -// GetTLSConfigurationForServer returns a tls.Config instance for use by a server application. -func GetTLSConfigurationForServer(s2AStream stream.S2AStream, tokenManager tokenmanager.AccessTokenManager, localIdentities []*commonpb.Identity, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode) (*tls.Config, error) { - return &tls.Config{ - GetConfigForClient: ClientConfig(tokenManager, localIdentities, verificationMode, s2AStream), - }, nil -} - -// ClientConfig builds a TLS config for a server to establish a secure -// connection with a client, based on SNI communicated during ClientHello. -// Ensures that server presents the correct certificate to establish a TLS -// connection. -func ClientConfig(tokenManager tokenmanager.AccessTokenManager, localIdentities []*commonpb.Identity, verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode, s2AStream stream.S2AStream) func(chi *tls.ClientHelloInfo) (*tls.Config, error) { - return func(chi *tls.ClientHelloInfo) (*tls.Config, error) { - tlsConfig, err := getServerConfigFromS2Av2(tokenManager, localIdentities, chi.ServerName, s2AStream) - if err != nil { - return nil, err - } - - var cert tls.Certificate - for i, v := range tlsConfig.CertificateChain { - // Populate Certificates field. - block, _ := pem.Decode([]byte(v)) - if block == nil { - return nil, errors.New("certificate in CertificateChain obtained from S2Av2 is empty") - } - x509Cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return nil, err - } - cert.Certificate = append(cert.Certificate, x509Cert.Raw) - if i == 0 { - cert.Leaf = x509Cert - } - } - - cert.PrivateKey = remotesigner.New(cert.Leaf, s2AStream) - if cert.PrivateKey == nil { - return nil, errors.New("failed to retrieve Private Key from Remote Signer Library") - } - - minVersion, maxVersion, err := getTLSMinMaxVersionsServer(tlsConfig) - if err != nil { - return nil, err - } - - clientAuth := getTLSClientAuthType(tlsConfig) - - var cipherSuites []uint16 - cipherSuites = getCipherSuites(tlsConfig.Ciphersuites) - - // Create mTLS credentials for server. - return &tls.Config{ - Certificates: []tls.Certificate{cert}, - VerifyPeerCertificate: certverifier.VerifyClientCertificateChain(verificationMode, s2AStream), - ClientAuth: clientAuth, - CipherSuites: cipherSuites, - SessionTicketsDisabled: true, - MinVersion: minVersion, - MaxVersion: maxVersion, - NextProtos: []string{h2}, - }, nil - } -} - -func getCipherSuites(tlsConfigCipherSuites []commonpb.Ciphersuite) []uint16 { - var tlsGoCipherSuites []uint16 - for _, v := range tlsConfigCipherSuites { - s := getTLSCipherSuite(v) - if s != 0xffff { - tlsGoCipherSuites = append(tlsGoCipherSuites, s) - } - } - return tlsGoCipherSuites -} - -func getTLSCipherSuite(tlsCipherSuite commonpb.Ciphersuite) uint16 { - switch tlsCipherSuite { - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: - return tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: - return tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: - return tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_AES_128_GCM_SHA256: - return tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_AES_256_GCM_SHA384: - return tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 - case commonpb.Ciphersuite_CIPHERSUITE_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: - return tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 - default: - return 0xffff - } -} - -func getServerConfigFromS2Av2(tokenManager tokenmanager.AccessTokenManager, localIdentities []*commonpb.Identity, sni string, s2AStream stream.S2AStream) (*s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration, error) { - authMechanisms := getAuthMechanisms(tokenManager, localIdentities) - var locID *commonpb.Identity - if localIdentities != nil { - locID = localIdentities[0] - } - - if err := s2AStream.Send(&s2av2pb.SessionReq{ - LocalIdentity: locID, - AuthenticationMechanisms: authMechanisms, - ReqOneof: &s2av2pb.SessionReq_GetTlsConfigurationReq{ - GetTlsConfigurationReq: &s2av2pb.GetTlsConfigurationReq{ - ConnectionSide: commonpb.ConnectionSide_CONNECTION_SIDE_SERVER, - Sni: sni, - }, - }, - }); err != nil { - return nil, err - } - - resp, err := s2AStream.Recv() - if err != nil { - return nil, err - } - - // TODO(rmehta19): Add unit test for this if statement. - if (resp.GetStatus() != nil) && (resp.GetStatus().Code != uint32(codes.OK)) { - return nil, fmt.Errorf("failed to get TLS configuration from S2A: %d, %v", resp.GetStatus().Code, resp.GetStatus().Details) - } - - return resp.GetGetTlsConfigurationResp().GetServerTlsConfiguration(), nil -} - -func getTLSClientAuthType(tlsConfig *s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration) tls.ClientAuthType { - var clientAuth tls.ClientAuthType - switch x := tlsConfig.RequestClientCertificate; x { - case s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration_DONT_REQUEST_CLIENT_CERTIFICATE: - clientAuth = tls.NoClientCert - case s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - clientAuth = tls.RequestClientCert - case s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY: - // This case actually maps to tls.VerifyClientCertIfGiven. However this - // mapping triggers normal verification, followed by custom verification, - // specified in VerifyPeerCertificate. To bypass normal verification, and - // only do custom verification we set clientAuth to RequireAnyClientCert or - // RequestClientCert. See https://github.com/google/s2a-go/pull/43 for full - // discussion. - clientAuth = tls.RequireAnyClientCert - case s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY: - clientAuth = tls.RequireAnyClientCert - case s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY: - // This case actually maps to tls.RequireAndVerifyClientCert. However this - // mapping triggers normal verification, followed by custom verification, - // specified in VerifyPeerCertificate. To bypass normal verification, and - // only do custom verification we set clientAuth to RequireAnyClientCert or - // RequestClientCert. See https://github.com/google/s2a-go/pull/43 for full - // discussion. - clientAuth = tls.RequireAnyClientCert - default: - clientAuth = tls.RequireAnyClientCert - } - return clientAuth -} - -func getAuthMechanisms(tokenManager tokenmanager.AccessTokenManager, localIdentities []*commonpb.Identity) []*s2av2pb.AuthenticationMechanism { - if tokenManager == nil { - return nil - } - if len(localIdentities) == 0 { - token, err := tokenManager.DefaultToken() - if err != nil { - grpclog.Infof("Unable to get token for empty local identity: %v", err) - return nil - } - return []*s2av2pb.AuthenticationMechanism{ - { - MechanismOneof: &s2av2pb.AuthenticationMechanism_Token{ - Token: token, - }, - }, - } - } - var authMechanisms []*s2av2pb.AuthenticationMechanism - for _, localIdentity := range localIdentities { - if localIdentity == nil { - token, err := tokenManager.DefaultToken() - if err != nil { - grpclog.Infof("Unable to get default token for local identity %v: %v", localIdentity, err) - continue - } - authMechanisms = append(authMechanisms, &s2av2pb.AuthenticationMechanism{ - Identity: localIdentity, - MechanismOneof: &s2av2pb.AuthenticationMechanism_Token{ - Token: token, - }, - }) - } else { - token, err := tokenManager.Token(localIdentity) - if err != nil { - grpclog.Infof("Unable to get token for local identity %v: %v", localIdentity, err) - continue - } - authMechanisms = append(authMechanisms, &s2av2pb.AuthenticationMechanism{ - Identity: localIdentity, - MechanismOneof: &s2av2pb.AuthenticationMechanism_Token{ - Token: token, - }, - }) - } - } - return authMechanisms -} - -// TODO(rmehta19): refactor switch statements into a helper function. -func getTLSMinMaxVersionsClient(tlsConfig *s2av2pb.GetTlsConfigurationResp_ClientTlsConfiguration) (uint16, uint16, error) { - // Map S2Av2 TLSVersion to consts defined in tls package. - var minVersion uint16 - var maxVersion uint16 - switch x := tlsConfig.MinTlsVersion; x { - case commonpb.TLSVersion_TLS_VERSION_1_0: - minVersion = tls.VersionTLS10 - case commonpb.TLSVersion_TLS_VERSION_1_1: - minVersion = tls.VersionTLS11 - case commonpb.TLSVersion_TLS_VERSION_1_2: - minVersion = tls.VersionTLS12 - case commonpb.TLSVersion_TLS_VERSION_1_3: - minVersion = tls.VersionTLS13 - default: - return minVersion, maxVersion, fmt.Errorf("S2Av2 provided invalid MinTlsVersion: %v", x) - } - - switch x := tlsConfig.MaxTlsVersion; x { - case commonpb.TLSVersion_TLS_VERSION_1_0: - maxVersion = tls.VersionTLS10 - case commonpb.TLSVersion_TLS_VERSION_1_1: - maxVersion = tls.VersionTLS11 - case commonpb.TLSVersion_TLS_VERSION_1_2: - maxVersion = tls.VersionTLS12 - case commonpb.TLSVersion_TLS_VERSION_1_3: - maxVersion = tls.VersionTLS13 - default: - return minVersion, maxVersion, fmt.Errorf("S2Av2 provided invalid MaxTlsVersion: %v", x) - } - if minVersion > maxVersion { - return minVersion, maxVersion, errors.New("S2Av2 provided minVersion > maxVersion") - } - return minVersion, maxVersion, nil -} - -func getTLSMinMaxVersionsServer(tlsConfig *s2av2pb.GetTlsConfigurationResp_ServerTlsConfiguration) (uint16, uint16, error) { - // Map S2Av2 TLSVersion to consts defined in tls package. - var minVersion uint16 - var maxVersion uint16 - switch x := tlsConfig.MinTlsVersion; x { - case commonpb.TLSVersion_TLS_VERSION_1_0: - minVersion = tls.VersionTLS10 - case commonpb.TLSVersion_TLS_VERSION_1_1: - minVersion = tls.VersionTLS11 - case commonpb.TLSVersion_TLS_VERSION_1_2: - minVersion = tls.VersionTLS12 - case commonpb.TLSVersion_TLS_VERSION_1_3: - minVersion = tls.VersionTLS13 - default: - return minVersion, maxVersion, fmt.Errorf("S2Av2 provided invalid MinTlsVersion: %v", x) - } - - switch x := tlsConfig.MaxTlsVersion; x { - case commonpb.TLSVersion_TLS_VERSION_1_0: - maxVersion = tls.VersionTLS10 - case commonpb.TLSVersion_TLS_VERSION_1_1: - maxVersion = tls.VersionTLS11 - case commonpb.TLSVersion_TLS_VERSION_1_2: - maxVersion = tls.VersionTLS12 - case commonpb.TLSVersion_TLS_VERSION_1_3: - maxVersion = tls.VersionTLS13 - default: - return minVersion, maxVersion, fmt.Errorf("S2Av2 provided invalid MaxTlsVersion: %v", x) - } - if minVersion > maxVersion { - return minVersion, maxVersion, errors.New("S2Av2 provided minVersion > maxVersion") - } - return minVersion, maxVersion, nil -} diff --git a/vendor/github.com/google/s2a-go/retry/retry.go b/vendor/github.com/google/s2a-go/retry/retry.go deleted file mode 100644 index f7e0a23779..0000000000 --- a/vendor/github.com/google/s2a-go/retry/retry.go +++ /dev/null @@ -1,144 +0,0 @@ -/* - * - * Copyright 2023 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 - * - * https://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 retry provides a retry helper for talking to S2A gRPC server. -// The implementation is modeled after -// https://github.com/googleapis/google-cloud-go/blob/main/compute/metadata/retry.go -package retry - -import ( - "context" - "math/rand" - "time" - - "google.golang.org/grpc/grpclog" -) - -const ( - maxRetryAttempts = 5 - maxRetryForLoops = 10 -) - -type defaultBackoff struct { - max time.Duration - mul float64 - cur time.Duration -} - -// Pause returns a duration, which is used as the backoff wait time -// before the next retry. -func (b *defaultBackoff) Pause() time.Duration { - d := time.Duration(1 + rand.Int63n(int64(b.cur))) - b.cur = time.Duration(float64(b.cur) * b.mul) - if b.cur > b.max { - b.cur = b.max - } - return d -} - -// Sleep will wait for the specified duration or return on context -// expiration. -func Sleep(ctx context.Context, d time.Duration) error { - t := time.NewTimer(d) - select { - case <-ctx.Done(): - t.Stop() - return ctx.Err() - case <-t.C: - return nil - } -} - -// NewRetryer creates an instance of S2ARetryer using the defaultBackoff -// implementation. -var NewRetryer = func() *S2ARetryer { - return &S2ARetryer{bo: &defaultBackoff{ - cur: 100 * time.Millisecond, - max: 30 * time.Second, - mul: 2, - }} -} - -type backoff interface { - Pause() time.Duration -} - -// S2ARetryer implements a retry helper for talking to S2A gRPC server. -type S2ARetryer struct { - bo backoff - attempts int -} - -// Attempts return the number of retries attempted. -func (r *S2ARetryer) Attempts() int { - return r.attempts -} - -// Retry returns a boolean indicating whether retry should be performed -// and the backoff duration. -func (r *S2ARetryer) Retry(err error) (time.Duration, bool) { - if err == nil { - return 0, false - } - if r.attempts >= maxRetryAttempts { - return 0, false - } - r.attempts++ - return r.bo.Pause(), true -} - -// Run uses S2ARetryer to execute the function passed in, until success or reaching -// max number of retry attempts. -func Run(ctx context.Context, f func() error) { - retryer := NewRetryer() - forLoopCnt := 0 - var err error - for { - err = f() - if bo, shouldRetry := retryer.Retry(err); shouldRetry { - if grpclog.V(1) { - grpclog.Infof("will attempt retry: %v", err) - } - if ctx.Err() != nil { - if grpclog.V(1) { - grpclog.Infof("exit retry loop due to context error: %v", ctx.Err()) - } - break - } - if errSleep := Sleep(ctx, bo); errSleep != nil { - if grpclog.V(1) { - grpclog.Infof("exit retry loop due to sleep error: %v", errSleep) - } - break - } - // This shouldn't happen, just make sure we are not stuck in the for loops. - forLoopCnt++ - if forLoopCnt > maxRetryForLoops { - if grpclog.V(1) { - grpclog.Infof("exit the for loop after too many retries") - } - break - } - continue - } - if grpclog.V(1) { - grpclog.Infof("retry conditions not met, exit the loop") - } - break - } -} diff --git a/vendor/github.com/google/s2a-go/s2a.go b/vendor/github.com/google/s2a-go/s2a.go deleted file mode 100644 index c52fccddf8..0000000000 --- a/vendor/github.com/google/s2a-go/s2a.go +++ /dev/null @@ -1,448 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 s2a provides the S2A transport credentials used by a gRPC -// application. -package s2a - -import ( - "context" - "crypto/tls" - "errors" - "fmt" - "net" - "sync" - "time" - - "github.com/google/s2a-go/fallback" - "github.com/google/s2a-go/internal/handshaker" - "github.com/google/s2a-go/internal/handshaker/service" - "github.com/google/s2a-go/internal/tokenmanager" - "github.com/google/s2a-go/internal/v2" - "github.com/google/s2a-go/retry" - "github.com/google/s2a-go/stream" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/grpclog" - "google.golang.org/protobuf/proto" - - commonpbv1 "github.com/google/s2a-go/internal/proto/common_go_proto" - commonpb "github.com/google/s2a-go/internal/proto/v2/common_go_proto" - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -const ( - s2aSecurityProtocol = "tls" - // defaultTimeout specifies the default server handshake timeout. - defaultTimeout = 30.0 * time.Second -) - -// s2aTransportCreds are the transport credentials required for establishing -// a secure connection using the S2A. They implement the -// credentials.TransportCredentials interface. -type s2aTransportCreds struct { - info *credentials.ProtocolInfo - minTLSVersion commonpbv1.TLSVersion - maxTLSVersion commonpbv1.TLSVersion - // tlsCiphersuites contains the ciphersuites used in the S2A connection. - // Note that these are currently unconfigurable. - tlsCiphersuites []commonpbv1.Ciphersuite - // localIdentity should only be used by the client. - localIdentity *commonpbv1.Identity - // localIdentities should only be used by the server. - localIdentities []*commonpbv1.Identity - // targetIdentities should only be used by the client. - targetIdentities []*commonpbv1.Identity - isClient bool - s2aAddr string - ensureProcessSessionTickets *sync.WaitGroup -} - -// NewClientCreds returns a client-side transport credentials object that uses -// the S2A to establish a secure connection with a server. -func NewClientCreds(opts *ClientOptions) (credentials.TransportCredentials, error) { - if opts == nil { - return nil, errors.New("nil client options") - } - var targetIdentities []*commonpbv1.Identity - for _, targetIdentity := range opts.TargetIdentities { - protoTargetIdentity, err := toProtoIdentity(targetIdentity) - if err != nil { - return nil, err - } - targetIdentities = append(targetIdentities, protoTargetIdentity) - } - localIdentity, err := toProtoIdentity(opts.LocalIdentity) - if err != nil { - return nil, err - } - if opts.EnableLegacyMode { - return &s2aTransportCreds{ - info: &credentials.ProtocolInfo{ - SecurityProtocol: s2aSecurityProtocol, - }, - minTLSVersion: commonpbv1.TLSVersion_TLS1_3, - maxTLSVersion: commonpbv1.TLSVersion_TLS1_3, - tlsCiphersuites: []commonpbv1.Ciphersuite{ - commonpbv1.Ciphersuite_AES_128_GCM_SHA256, - commonpbv1.Ciphersuite_AES_256_GCM_SHA384, - commonpbv1.Ciphersuite_CHACHA20_POLY1305_SHA256, - }, - localIdentity: localIdentity, - targetIdentities: targetIdentities, - isClient: true, - s2aAddr: opts.S2AAddress, - ensureProcessSessionTickets: opts.EnsureProcessSessionTickets, - }, nil - } - verificationMode := getVerificationMode(opts.VerificationMode) - var fallbackFunc fallback.ClientHandshake - if opts.FallbackOpts != nil && opts.FallbackOpts.FallbackClientHandshakeFunc != nil { - fallbackFunc = opts.FallbackOpts.FallbackClientHandshakeFunc - } - v2LocalIdentity, err := toV2ProtoIdentity(opts.LocalIdentity) - if err != nil { - return nil, err - } - return v2.NewClientCreds(opts.S2AAddress, opts.TransportCreds, v2LocalIdentity, verificationMode, fallbackFunc, opts.getS2AStream, opts.serverAuthorizationPolicy) -} - -// NewServerCreds returns a server-side transport credentials object that uses -// the S2A to establish a secure connection with a client. -func NewServerCreds(opts *ServerOptions) (credentials.TransportCredentials, error) { - if opts == nil { - return nil, errors.New("nil server options") - } - var localIdentities []*commonpbv1.Identity - for _, localIdentity := range opts.LocalIdentities { - protoLocalIdentity, err := toProtoIdentity(localIdentity) - if err != nil { - return nil, err - } - localIdentities = append(localIdentities, protoLocalIdentity) - } - if opts.EnableLegacyMode { - return &s2aTransportCreds{ - info: &credentials.ProtocolInfo{ - SecurityProtocol: s2aSecurityProtocol, - }, - minTLSVersion: commonpbv1.TLSVersion_TLS1_3, - maxTLSVersion: commonpbv1.TLSVersion_TLS1_3, - tlsCiphersuites: []commonpbv1.Ciphersuite{ - commonpbv1.Ciphersuite_AES_128_GCM_SHA256, - commonpbv1.Ciphersuite_AES_256_GCM_SHA384, - commonpbv1.Ciphersuite_CHACHA20_POLY1305_SHA256, - }, - localIdentities: localIdentities, - isClient: false, - s2aAddr: opts.S2AAddress, - }, nil - } - verificationMode := getVerificationMode(opts.VerificationMode) - var v2LocalIdentities []*commonpb.Identity - for _, localIdentity := range opts.LocalIdentities { - protoLocalIdentity, err := toV2ProtoIdentity(localIdentity) - if err != nil { - return nil, err - } - v2LocalIdentities = append(v2LocalIdentities, protoLocalIdentity) - } - return v2.NewServerCreds(opts.S2AAddress, opts.TransportCreds, v2LocalIdentities, verificationMode, opts.getS2AStream) -} - -// ClientHandshake initiates a client-side TLS handshake using the S2A. -func (c *s2aTransportCreds) ClientHandshake(ctx context.Context, serverAuthority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { - if !c.isClient { - return nil, nil, errors.New("client handshake called using server transport credentials") - } - - var cancel context.CancelFunc - ctx, cancel = context.WithCancel(ctx) - defer cancel() - - // Connect to the S2A. - hsConn, err := service.Dial(ctx, c.s2aAddr, nil) - if err != nil { - grpclog.Infof("Failed to connect to S2A: %v", err) - return nil, nil, err - } - - opts := &handshaker.ClientHandshakerOptions{ - MinTLSVersion: c.minTLSVersion, - MaxTLSVersion: c.maxTLSVersion, - TLSCiphersuites: c.tlsCiphersuites, - TargetIdentities: c.targetIdentities, - LocalIdentity: c.localIdentity, - TargetName: serverAuthority, - EnsureProcessSessionTickets: c.ensureProcessSessionTickets, - } - chs, err := handshaker.NewClientHandshaker(ctx, hsConn, rawConn, c.s2aAddr, opts) - if err != nil { - grpclog.Infof("Call to handshaker.NewClientHandshaker failed: %v", err) - return nil, nil, err - } - defer func() { - if err != nil { - if closeErr := chs.Close(); closeErr != nil { - grpclog.Infof("Close failed unexpectedly: %v", err) - err = fmt.Errorf("%v: close unexpectedly failed: %v", err, closeErr) - } - } - }() - - secConn, authInfo, err := chs.ClientHandshake(context.Background()) - if err != nil { - grpclog.Infof("Handshake failed: %v", err) - return nil, nil, err - } - return secConn, authInfo, nil -} - -// ServerHandshake initiates a server-side TLS handshake using the S2A. -func (c *s2aTransportCreds) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) { - if c.isClient { - return nil, nil, errors.New("server handshake called using client transport credentials") - } - - ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout) - defer cancel() - - // Connect to the S2A. - hsConn, err := service.Dial(ctx, c.s2aAddr, nil) - if err != nil { - grpclog.Infof("Failed to connect to S2A: %v", err) - return nil, nil, err - } - - opts := &handshaker.ServerHandshakerOptions{ - MinTLSVersion: c.minTLSVersion, - MaxTLSVersion: c.maxTLSVersion, - TLSCiphersuites: c.tlsCiphersuites, - LocalIdentities: c.localIdentities, - } - shs, err := handshaker.NewServerHandshaker(ctx, hsConn, rawConn, c.s2aAddr, opts) - if err != nil { - grpclog.Infof("Call to handshaker.NewServerHandshaker failed: %v", err) - return nil, nil, err - } - defer func() { - if err != nil { - if closeErr := shs.Close(); closeErr != nil { - grpclog.Infof("Close failed unexpectedly: %v", err) - err = fmt.Errorf("%v: close unexpectedly failed: %v", err, closeErr) - } - } - }() - - secConn, authInfo, err := shs.ServerHandshake(context.Background()) - if err != nil { - grpclog.Infof("Handshake failed: %v", err) - return nil, nil, err - } - return secConn, authInfo, nil -} - -func (c *s2aTransportCreds) Info() credentials.ProtocolInfo { - return *c.info -} - -func (c *s2aTransportCreds) Clone() credentials.TransportCredentials { - info := *c.info - var localIdentity *commonpbv1.Identity - if c.localIdentity != nil { - localIdentity = proto.Clone(c.localIdentity).(*commonpbv1.Identity) - } - var localIdentities []*commonpbv1.Identity - if c.localIdentities != nil { - localIdentities = make([]*commonpbv1.Identity, len(c.localIdentities)) - for i, localIdentity := range c.localIdentities { - localIdentities[i] = proto.Clone(localIdentity).(*commonpbv1.Identity) - } - } - var targetIdentities []*commonpbv1.Identity - if c.targetIdentities != nil { - targetIdentities = make([]*commonpbv1.Identity, len(c.targetIdentities)) - for i, targetIdentity := range c.targetIdentities { - targetIdentities[i] = proto.Clone(targetIdentity).(*commonpbv1.Identity) - } - } - return &s2aTransportCreds{ - info: &info, - minTLSVersion: c.minTLSVersion, - maxTLSVersion: c.maxTLSVersion, - tlsCiphersuites: c.tlsCiphersuites, - localIdentity: localIdentity, - localIdentities: localIdentities, - targetIdentities: targetIdentities, - isClient: c.isClient, - s2aAddr: c.s2aAddr, - } -} - -func (c *s2aTransportCreds) OverrideServerName(serverNameOverride string) error { - c.info.ServerName = serverNameOverride - return nil -} - -// TLSClientConfigOptions specifies parameters for creating client TLS config. -type TLSClientConfigOptions struct { - // ServerName is required by s2a as the expected name when verifying the hostname found in server's certificate. - // tlsConfig, _ := factory.Build(ctx, &s2a.TLSClientConfigOptions{ - // ServerName: "example.com", - // }) - ServerName string -} - -// TLSClientConfigFactory defines the interface for a client TLS config factory. -type TLSClientConfigFactory interface { - Build(ctx context.Context, opts *TLSClientConfigOptions) (*tls.Config, error) -} - -// NewTLSClientConfigFactory returns an instance of s2aTLSClientConfigFactory. -func NewTLSClientConfigFactory(opts *ClientOptions) (TLSClientConfigFactory, error) { - if opts == nil { - return nil, fmt.Errorf("opts must be non-nil") - } - if opts.EnableLegacyMode { - return nil, fmt.Errorf("NewTLSClientConfigFactory only supports S2Av2") - } - tokenManager, err := tokenmanager.NewSingleTokenAccessTokenManager() - if err != nil { - // The only possible error is: access token not set in the environment, - // which is okay in environments other than serverless. - grpclog.Infof("Access token manager not initialized: %v", err) - return &s2aTLSClientConfigFactory{ - s2av2Address: opts.S2AAddress, - transportCreds: opts.TransportCreds, - tokenManager: nil, - verificationMode: getVerificationMode(opts.VerificationMode), - serverAuthorizationPolicy: opts.serverAuthorizationPolicy, - getStream: opts.getS2AStream, - }, nil - } - return &s2aTLSClientConfigFactory{ - s2av2Address: opts.S2AAddress, - transportCreds: opts.TransportCreds, - tokenManager: tokenManager, - verificationMode: getVerificationMode(opts.VerificationMode), - serverAuthorizationPolicy: opts.serverAuthorizationPolicy, - getStream: opts.getS2AStream, - }, nil -} - -type s2aTLSClientConfigFactory struct { - s2av2Address string - transportCreds credentials.TransportCredentials - tokenManager tokenmanager.AccessTokenManager - verificationMode s2av2pb.ValidatePeerCertificateChainReq_VerificationMode - serverAuthorizationPolicy []byte - getStream stream.GetS2AStream -} - -func (f *s2aTLSClientConfigFactory) Build( - ctx context.Context, opts *TLSClientConfigOptions) (*tls.Config, error) { - serverName := "" - if opts != nil && opts.ServerName != "" { - serverName = opts.ServerName - } - return v2.NewClientTLSConfig(ctx, f.s2av2Address, f.transportCreds, f.tokenManager, f.verificationMode, serverName, f.serverAuthorizationPolicy, f.getStream) -} - -func getVerificationMode(verificationMode VerificationModeType) s2av2pb.ValidatePeerCertificateChainReq_VerificationMode { - switch verificationMode { - case ConnectToGoogle: - return s2av2pb.ValidatePeerCertificateChainReq_CONNECT_TO_GOOGLE - case Spiffe: - return s2av2pb.ValidatePeerCertificateChainReq_SPIFFE - case ReservedCustomVerificationMode3: - return s2av2pb.ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_3 - case ReservedCustomVerificationMode4: - return s2av2pb.ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_4 - case ReservedCustomVerificationMode5: - return s2av2pb.ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_5 - case ReservedCustomVerificationMode6: - return s2av2pb.ValidatePeerCertificateChainReq_RESERVED_CUSTOM_VERIFICATION_MODE_6 - default: - return s2av2pb.ValidatePeerCertificateChainReq_UNSPECIFIED - } -} - -// NewS2ADialTLSContextFunc returns a dialer which establishes an MTLS connection using S2A. -// Example use with http.RoundTripper: -// -// dialTLSContext := s2a.NewS2aDialTLSContextFunc(&s2a.ClientOptions{ -// S2AAddress: s2aAddress, // required -// }) -// transport := http.DefaultTransport -// transport.DialTLSContext = dialTLSContext -func NewS2ADialTLSContextFunc(opts *ClientOptions) func(ctx context.Context, network, addr string) (net.Conn, error) { - - return func(ctx context.Context, network, addr string) (net.Conn, error) { - - fallback := func(err error) (net.Conn, error) { - if opts.FallbackOpts != nil && opts.FallbackOpts.FallbackDialer != nil && - opts.FallbackOpts.FallbackDialer.Dialer != nil && opts.FallbackOpts.FallbackDialer.ServerAddr != "" { - fbDialer := opts.FallbackOpts.FallbackDialer - grpclog.Infof("fall back to dial: %s", fbDialer.ServerAddr) - fbConn, fbErr := fbDialer.Dialer.DialContext(ctx, network, fbDialer.ServerAddr) - if fbErr != nil { - return nil, fmt.Errorf("error fallback to %s: %v; S2A error: %w", fbDialer.ServerAddr, fbErr, err) - } - return fbConn, nil - } - return nil, err - } - - factory, err := NewTLSClientConfigFactory(opts) - if err != nil { - grpclog.Infof("error creating S2A client config factory: %v", err) - return fallback(err) - } - - serverName, _, err := net.SplitHostPort(addr) - if err != nil { - serverName = addr - } - timeoutCtx, cancel := context.WithTimeout(ctx, v2.GetS2ATimeout()) - defer cancel() - - var s2aTLSConfig *tls.Config - var c net.Conn - retry.Run(timeoutCtx, - func() error { - s2aTLSConfig, err = factory.Build(timeoutCtx, &TLSClientConfigOptions{ - ServerName: serverName, - }) - if err != nil { - grpclog.Infof("error building S2A TLS config: %v", err) - return err - } - - s2aDialer := &tls.Dialer{ - Config: s2aTLSConfig, - } - c, err = s2aDialer.DialContext(timeoutCtx, network, addr) - return err - }) - if err != nil { - grpclog.Infof("error dialing with S2A to %s: %v", addr, err) - return fallback(err) - } - grpclog.Infof("success dialing MTLS to %s with S2A", addr) - return c, nil - } -} diff --git a/vendor/github.com/google/s2a-go/s2a_options.go b/vendor/github.com/google/s2a-go/s2a_options.go deleted file mode 100644 index b7a277f9e3..0000000000 --- a/vendor/github.com/google/s2a-go/s2a_options.go +++ /dev/null @@ -1,272 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 s2a - -import ( - "crypto/tls" - "errors" - "sync" - - "github.com/google/s2a-go/fallback" - "github.com/google/s2a-go/stream" - "google.golang.org/grpc/credentials" - - s2av1pb "github.com/google/s2a-go/internal/proto/common_go_proto" - s2apb "github.com/google/s2a-go/internal/proto/v2/common_go_proto" -) - -// Identity is the interface for S2A identities. -type Identity interface { - // Name returns the name of the identity. - Name() string - Attributes() map[string]string -} - -type UnspecifiedID struct { - Attr map[string]string -} - -func (u *UnspecifiedID) Name() string { return "" } - -func (u *UnspecifiedID) Attributes() map[string]string { - return u.Attr -} - -type spiffeID struct { - spiffeID string -} - -func (s *spiffeID) Name() string { return s.spiffeID } - -func (spiffeID) Attributes() map[string]string { return nil } - -// NewSpiffeID creates a SPIFFE ID from id. -func NewSpiffeID(id string) Identity { return &spiffeID{spiffeID: id} } - -type hostname struct { - hostname string -} - -func (h *hostname) Name() string { return h.hostname } - -func (hostname) Attributes() map[string]string { return nil } - -// NewHostname creates a hostname from name. -func NewHostname(name string) Identity { return &hostname{hostname: name} } - -type uid struct { - uid string -} - -func (h *uid) Name() string { return h.uid } - -func (uid) Attributes() map[string]string { return nil } - -// NewUID creates a UID from name. -func NewUID(name string) Identity { return &uid{uid: name} } - -// VerificationModeType specifies the mode that S2A must use to verify the peer -// certificate chain. -type VerificationModeType int - -// Three types of verification modes. -const ( - Unspecified VerificationModeType = iota - Spiffe - ConnectToGoogle - ReservedCustomVerificationMode3 - ReservedCustomVerificationMode4 - ReservedCustomVerificationMode5 - ReservedCustomVerificationMode6 -) - -// ClientOptions contains the client-side options used to establish a secure -// channel using the S2A handshaker service. -type ClientOptions struct { - // TargetIdentities contains a list of allowed server identities. One of the - // target identities should match the peer identity in the handshake - // result; otherwise, the handshake fails. - TargetIdentities []Identity - // LocalIdentity is the local identity of the client application. If none is - // provided, then the S2A will choose the default identity, if one exists. - LocalIdentity Identity - // S2AAddress is the address of the S2A. - S2AAddress string - // Optional transport credentials. - // If set, this will be used for the gRPC connection to the S2A server. - TransportCreds credentials.TransportCredentials - // EnsureProcessSessionTickets waits for all session tickets to be sent to - // S2A before a process completes. - // - // This functionality is crucial for processes that complete very soon after - // using S2A to establish a TLS connection, but it can be ignored for longer - // lived processes. - // - // Usage example: - // func main() { - // var ensureProcessSessionTickets sync.WaitGroup - // clientOpts := &s2a.ClientOptions{ - // EnsureProcessSessionTickets: &ensureProcessSessionTickets, - // // Set other members. - // } - // creds, _ := s2a.NewClientCreds(clientOpts) - // conn, _ := grpc.Dial(serverAddr, grpc.WithTransportCredentials(creds)) - // defer conn.Close() - // - // // Make RPC call. - // - // // The process terminates right after the RPC call ends. - // // ensureProcessSessionTickets can be used to ensure resumption - // // tickets are fully processed. If the process is long-lived, using - // // ensureProcessSessionTickets is not necessary. - // ensureProcessSessionTickets.Wait() - // } - EnsureProcessSessionTickets *sync.WaitGroup - // If true, enables the use of legacy S2Av1. - EnableLegacyMode bool - // VerificationMode specifies the mode that S2A must use to verify the - // peer certificate chain. - VerificationMode VerificationModeType - - // Optional fallback after dialing with S2A fails. - FallbackOpts *FallbackOptions - - // Generates an S2AStream interface for talking to the S2A server. - getS2AStream stream.GetS2AStream - - // Serialized user specified policy for server authorization. - serverAuthorizationPolicy []byte -} - -// FallbackOptions prescribes the fallback logic that should be taken if the application fails to connect with S2A. -type FallbackOptions struct { - // FallbackClientHandshakeFunc is used to specify fallback behavior when calling s2a.NewClientCreds(). - // It will be called by ClientHandshake function, after handshake with S2A fails. - // s2a.NewClientCreds() ignores the other FallbackDialer field. - FallbackClientHandshakeFunc fallback.ClientHandshake - - // FallbackDialer is used to specify fallback behavior when calling s2a.NewS2aDialTLSContextFunc(). - // It passes in a custom fallback dialer and server address to use after dialing with S2A fails. - // s2a.NewS2aDialTLSContextFunc() ignores the other FallbackClientHandshakeFunc field. - FallbackDialer *FallbackDialer -} - -// FallbackDialer contains a fallback tls.Dialer and a server address to connect to. -type FallbackDialer struct { - // Dialer specifies a fallback tls.Dialer. - Dialer *tls.Dialer - // ServerAddr is used by Dialer to establish fallback connection. - ServerAddr string -} - -// DefaultClientOptions returns the default client options. -func DefaultClientOptions(s2aAddress string) *ClientOptions { - return &ClientOptions{ - S2AAddress: s2aAddress, - VerificationMode: ConnectToGoogle, - } -} - -// ServerOptions contains the server-side options used to establish a secure -// channel using the S2A handshaker service. -type ServerOptions struct { - // LocalIdentities is the list of local identities that may be assumed by - // the server. If no local identity is specified, then the S2A chooses a - // default local identity, if one exists. - LocalIdentities []Identity - // S2AAddress is the address of the S2A. - S2AAddress string - // Optional transport credentials. - // If set, this will be used for the gRPC connection to the S2A server. - TransportCreds credentials.TransportCredentials - // If true, enables the use of legacy S2Av1. - EnableLegacyMode bool - // VerificationMode specifies the mode that S2A must use to verify the - // peer certificate chain. - VerificationMode VerificationModeType - - // Generates an S2AStream interface for talking to the S2A server. - getS2AStream stream.GetS2AStream -} - -// DefaultServerOptions returns the default server options. -func DefaultServerOptions(s2aAddress string) *ServerOptions { - return &ServerOptions{ - S2AAddress: s2aAddress, - VerificationMode: ConnectToGoogle, - } -} - -func toProtoIdentity(identity Identity) (*s2av1pb.Identity, error) { - if identity == nil { - return nil, nil - } - switch id := identity.(type) { - case *spiffeID: - return &s2av1pb.Identity{ - IdentityOneof: &s2av1pb.Identity_SpiffeId{SpiffeId: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *hostname: - return &s2av1pb.Identity{ - IdentityOneof: &s2av1pb.Identity_Hostname{Hostname: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *uid: - return &s2av1pb.Identity{ - IdentityOneof: &s2av1pb.Identity_Uid{Uid: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *UnspecifiedID: - return &s2av1pb.Identity{ - Attributes: id.Attributes(), - }, nil - default: - return nil, errors.New("unrecognized identity type") - } -} - -func toV2ProtoIdentity(identity Identity) (*s2apb.Identity, error) { - if identity == nil { - return nil, nil - } - switch id := identity.(type) { - case *spiffeID: - return &s2apb.Identity{ - IdentityOneof: &s2apb.Identity_SpiffeId{SpiffeId: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *hostname: - return &s2apb.Identity{ - IdentityOneof: &s2apb.Identity_Hostname{Hostname: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *uid: - return &s2apb.Identity{ - IdentityOneof: &s2apb.Identity_Uid{Uid: id.Name()}, - Attributes: id.Attributes(), - }, nil - case *UnspecifiedID: - return &s2apb.Identity{ - Attributes: id.Attributes(), - }, nil - default: - return nil, errors.New("unrecognized identity type") - } -} diff --git a/vendor/github.com/google/s2a-go/s2a_utils.go b/vendor/github.com/google/s2a-go/s2a_utils.go deleted file mode 100644 index d649cc4614..0000000000 --- a/vendor/github.com/google/s2a-go/s2a_utils.go +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Copyright 2021 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 - * - * https://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 s2a - -import ( - "context" - "errors" - - commonpb "github.com/google/s2a-go/internal/proto/common_go_proto" - "google.golang.org/grpc/credentials" - "google.golang.org/grpc/peer" -) - -// AuthInfo exposes security information from the S2A to the application. -type AuthInfo interface { - // AuthType returns the authentication type. - AuthType() string - // ApplicationProtocol returns the application protocol, e.g. "grpc". - ApplicationProtocol() string - // TLSVersion returns the TLS version negotiated during the handshake. - TLSVersion() commonpb.TLSVersion - // Ciphersuite returns the ciphersuite negotiated during the handshake. - Ciphersuite() commonpb.Ciphersuite - // PeerIdentity returns the authenticated identity of the peer. - PeerIdentity() *commonpb.Identity - // LocalIdentity returns the local identity of the application used during - // session setup. - LocalIdentity() *commonpb.Identity - // PeerCertFingerprint returns the SHA256 hash of the peer certificate used in - // the S2A handshake. - PeerCertFingerprint() []byte - // LocalCertFingerprint returns the SHA256 hash of the local certificate used - // in the S2A handshake. - LocalCertFingerprint() []byte - // IsHandshakeResumed returns true if a cached session was used to resume - // the handshake. - IsHandshakeResumed() bool - // SecurityLevel returns the security level of the connection. - SecurityLevel() credentials.SecurityLevel -} - -// AuthInfoFromPeer extracts the authinfo.S2AAuthInfo object from the given -// peer, if it exists. This API should be used by gRPC clients after -// obtaining a peer object using the grpc.Peer() CallOption. -func AuthInfoFromPeer(p *peer.Peer) (AuthInfo, error) { - s2aAuthInfo, ok := p.AuthInfo.(AuthInfo) - if !ok { - return nil, errors.New("no S2AAuthInfo found in Peer") - } - return s2aAuthInfo, nil -} - -// AuthInfoFromContext extracts the authinfo.S2AAuthInfo object from the given -// context, if it exists. This API should be used by gRPC server RPC handlers -// to get information about the peer. On the client-side, use the grpc.Peer() -// CallOption and the AuthInfoFromPeer function. -func AuthInfoFromContext(ctx context.Context) (AuthInfo, error) { - p, ok := peer.FromContext(ctx) - if !ok { - return nil, errors.New("no Peer found in Context") - } - return AuthInfoFromPeer(p) -} diff --git a/vendor/github.com/google/s2a-go/stream/s2a_stream.go b/vendor/github.com/google/s2a-go/stream/s2a_stream.go deleted file mode 100644 index ae2d5eb4c1..0000000000 --- a/vendor/github.com/google/s2a-go/stream/s2a_stream.go +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright 2023 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 - * - * https://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 stream provides an interface for bidirectional streaming to the S2A server. -package stream - -import ( - "context" - - s2av2pb "github.com/google/s2a-go/internal/proto/v2/s2a_go_proto" -) - -// S2AStream defines the operation for communicating with the S2A server over a bidirectional stream. -type S2AStream interface { - // Send sends the message to the S2A server. - Send(*s2av2pb.SessionReq) error - // Recv receives the message from the S2A server. - Recv() (*s2av2pb.SessionResp, error) - // Closes the channel to the S2A server. - CloseSend() error -} - -// GetS2AStream type is for generating an S2AStream interface for talking to the S2A server. -type GetS2AStream func(ctx context.Context, s2av2Address string, opts ...string) (S2AStream, error) diff --git a/vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE b/vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/googleapis/enterprise-certificate-proxy/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/googleapis/enterprise-certificate-proxy/client/client.go b/vendor/github.com/googleapis/enterprise-certificate-proxy/client/client.go deleted file mode 100644 index ea5beb5aa7..0000000000 --- a/vendor/github.com/googleapis/enterprise-certificate-proxy/client/client.go +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright 2022 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 -// -// https://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 client is a cross-platform client for the signer binary (a.k.a."EnterpriseCertSigner"). -// -// The signer binary is OS-specific, but exposes a standard set of APIs for the client to use. -package client - -import ( - "crypto" - "crypto/ecdsa" - "crypto/rsa" - "crypto/x509" - "encoding/gob" - "errors" - "fmt" - "io" - "net/rpc" - "os" - "os/exec" - - "github.com/googleapis/enterprise-certificate-proxy/client/util" -) - -const signAPI = "EnterpriseCertSigner.Sign" -const certificateChainAPI = "EnterpriseCertSigner.CertificateChain" -const publicKeyAPI = "EnterpriseCertSigner.Public" -const encryptAPI = "EnterpriseCertSigner.Encrypt" -const decryptAPI = "EnterpriseCertSigner.Decrypt" - -// A Connection wraps a pair of unidirectional streams as an io.ReadWriteCloser. -type Connection struct { - io.ReadCloser - io.WriteCloser -} - -// Close closes c's underlying ReadCloser and WriteCloser. -func (c *Connection) Close() error { - rerr := c.ReadCloser.Close() - werr := c.WriteCloser.Close() - if rerr != nil { - return rerr - } - return werr -} - -func init() { - gob.Register(crypto.SHA256) - gob.Register(crypto.SHA384) - gob.Register(crypto.SHA512) - gob.Register(&rsa.PSSOptions{}) - gob.Register(&rsa.OAEPOptions{}) -} - -// SignArgs contains arguments for a Sign API call. -type SignArgs struct { - Digest []byte // The content to sign. - Opts crypto.SignerOpts // Options for signing. Must implement HashFunc(). -} - -// EncryptArgs contains arguments for an Encrypt API call. -type EncryptArgs struct { - Plaintext []byte // The plaintext to encrypt. - Opts any // Options for encryption. Ex: an instance of crypto.Hash. -} - -// DecryptArgs contains arguments to for a Decrypt API call. -type DecryptArgs struct { - Ciphertext []byte // The ciphertext to decrypt. - Opts crypto.DecrypterOpts // Options for decryption. Ex: an instance of *rsa.OAEPOptions. -} - -// Key implements credential.Credential by holding the executed signer subprocess. -type Key struct { - cmd *exec.Cmd // Pointer to the signer subprocess. - client *rpc.Client // Pointer to the rpc client that communicates with the signer subprocess. - publicKey crypto.PublicKey // Public key of loaded certificate. - chain [][]byte // Certificate chain of loaded certificate. -} - -// CertificateChain returns the credential as a raw X509 cert chain. This contains the public key. -func (k *Key) CertificateChain() [][]byte { - return k.chain -} - -// Close closes the RPC connection and kills the signer subprocess. -// Call this to free up resources when the Key object is no longer needed. -func (k *Key) Close() error { - if err := k.cmd.Process.Kill(); err != nil { - return fmt.Errorf("failed to kill signer process: %w", err) - } - // Wait for cmd to exit and release resources. Since the process is forcefully killed, this - // will return a non-nil error (varies by OS), which we will ignore. - _ = k.cmd.Wait() - // The Pipes connecting the RPC client should have been closed when the signer subprocess was killed. - // Calling `k.client.Close()` before `k.cmd.Process.Kill()` or `k.cmd.Wait()` _will_ cause a segfault. - if err := k.client.Close(); err.Error() != "close |0: file already closed" { - return fmt.Errorf("failed to close RPC connection: %w", err) - } - return nil -} - -// Public returns the public key for this Key. -func (k *Key) Public() crypto.PublicKey { - return k.publicKey -} - -// Sign signs a message digest, using the specified signer opts. Implements crypto.Signer interface. -func (k *Key) Sign(_ io.Reader, digest []byte, opts crypto.SignerOpts) (signed []byte, err error) { - if opts != nil && opts.HashFunc() != 0 && len(digest) != opts.HashFunc().Size() { - return nil, fmt.Errorf("Digest length of %v bytes does not match Hash function size of %v bytes", len(digest), opts.HashFunc().Size()) - } - err = k.client.Call(signAPI, SignArgs{Digest: digest, Opts: opts}, &signed) - return -} - -// Encrypt encrypts a plaintext msg into ciphertext, using the specified encrypt opts. -func (k *Key) Encrypt(_ io.Reader, msg []byte, opts any) (ciphertext []byte, err error) { - err = k.client.Call(encryptAPI, EncryptArgs{Plaintext: msg, Opts: opts}, &ciphertext) - return -} - -// Decrypt decrypts a ciphertext msg into plaintext, using the specified decrypter opts. Implements crypto.Decrypter interface. -func (k *Key) Decrypt(_ io.Reader, msg []byte, opts crypto.DecrypterOpts) (plaintext []byte, err error) { - err = k.client.Call(decryptAPI, DecryptArgs{Ciphertext: msg, Opts: opts}, &plaintext) - return -} - -// ErrCredUnavailable is a sentinel error that indicates ECP Cred is unavailable, -// possibly due to missing config or missing binary path. -var ErrCredUnavailable = errors.New("Cred is unavailable") - -// Cred spawns a signer subprocess that listens on stdin/stdout to perform certificate -// related operations, including signing messages with the private key. -// -// The signer binary path is read from the specified configFilePath, if provided. -// Otherwise, use the default config file path. -// -// The config file also specifies which certificate the signer should use. -func Cred(configFilePath string) (*Key, error) { - if configFilePath == "" { - envFilePath := util.GetConfigFilePathFromEnv() - if envFilePath != "" { - configFilePath = envFilePath - } else { - configFilePath = util.GetDefaultConfigFilePath() - } - } - enterpriseCertSignerPath, err := util.LoadSignerBinaryPath(configFilePath) - if err != nil { - if errors.Is(err, util.ErrConfigUnavailable) { - return nil, ErrCredUnavailable - } - return nil, err - } - k := &Key{ - cmd: exec.Command(enterpriseCertSignerPath, configFilePath), - } - - // Redirect errors from subprocess to parent process. - k.cmd.Stderr = os.Stderr - - // RPC client will communicate with subprocess over stdin/stdout. - kin, err := k.cmd.StdinPipe() - if err != nil { - return nil, err - } - kout, err := k.cmd.StdoutPipe() - if err != nil { - return nil, err - } - k.client = rpc.NewClient(&Connection{kout, kin}) - - if err := k.cmd.Start(); err != nil { - return nil, fmt.Errorf("starting enterprise cert signer subprocess: %w", err) - } - - if err := k.client.Call(certificateChainAPI, struct{}{}, &k.chain); err != nil { - return nil, fmt.Errorf("failed to retrieve certificate chain: %w", err) - } - - var publicKeyBytes []byte - if err := k.client.Call(publicKeyAPI, struct{}{}, &publicKeyBytes); err != nil { - return nil, fmt.Errorf("failed to retrieve public key: %w", err) - } - - publicKey, err := x509.ParsePKIXPublicKey(publicKeyBytes) - if err != nil { - return nil, fmt.Errorf("failed to parse public key: %w", err) - } - - var ok bool - k.publicKey, ok = publicKey.(crypto.PublicKey) - if !ok { - return nil, fmt.Errorf("invalid public key type: %T", publicKey) - } - - switch pub := k.publicKey.(type) { - case *rsa.PublicKey: - if pub.Size() < 256 { - return nil, fmt.Errorf("RSA modulus size is less than 2048 bits: %v", pub.Size()*8) - } - case *ecdsa.PublicKey: - default: - return nil, fmt.Errorf("unsupported public key type: %v", pub) - } - - return k, nil -} diff --git a/vendor/github.com/googleapis/enterprise-certificate-proxy/client/util/util.go b/vendor/github.com/googleapis/enterprise-certificate-proxy/client/util/util.go deleted file mode 100644 index f374a7f55f..0000000000 --- a/vendor/github.com/googleapis/enterprise-certificate-proxy/client/util/util.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2022 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 -// -// https://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 util provides helper functions for the client. -package util - -import ( - "encoding/json" - "errors" - "io" - "os" - "os/user" - "path/filepath" - "runtime" - "strings" -) - -const configFileName = "certificate_config.json" - -// EnterpriseCertificateConfig contains parameters for initializing signer. -type EnterpriseCertificateConfig struct { - Libs Libs `json:"libs"` -} - -// Libs specifies the locations of helper libraries. -type Libs struct { - ECP string `json:"ecp"` -} - -// ErrConfigUnavailable is a sentinel error that indicates ECP config is unavailable, -// possibly due to entire config missing or missing binary path. -var ErrConfigUnavailable = errors.New("Config is unavailable") - -// LoadSignerBinaryPath retrieves the path of the signer binary from the config file. -func LoadSignerBinaryPath(configFilePath string) (path string, err error) { - jsonFile, err := os.Open(configFilePath) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - return "", ErrConfigUnavailable - } - return "", err - } - - byteValue, err := io.ReadAll(jsonFile) - if err != nil { - return "", err - } - var config EnterpriseCertificateConfig - err = json.Unmarshal(byteValue, &config) - if err != nil { - return "", err - } - signerBinaryPath := config.Libs.ECP - if signerBinaryPath == "" { - return "", ErrConfigUnavailable - } - - signerBinaryPath = strings.ReplaceAll(signerBinaryPath, "~", guessHomeDir()) - signerBinaryPath = strings.ReplaceAll(signerBinaryPath, "$HOME", guessHomeDir()) - return signerBinaryPath, nil -} - -func guessHomeDir() string { - // Prefer $HOME over user.Current due to glibc bug: golang.org/issue/13470 - if v := os.Getenv("HOME"); v != "" { - return v - } - // Else, fall back to user.Current: - if u, err := user.Current(); err == nil { - return u.HomeDir - } - return "" -} - -func getDefaultConfigFileDirectory() (directory string) { - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud") - } - return filepath.Join(guessHomeDir(), ".config/gcloud") -} - -// GetDefaultConfigFilePath returns the default path of the enterprise certificate config file created by gCloud. -func GetDefaultConfigFilePath() (path string) { - return filepath.Join(getDefaultConfigFileDirectory(), configFileName) -} - -// GetConfigFilePathFromEnv returns the path associated with environment variable GOOGLE_API_CERTIFICATE_CONFIG -func GetConfigFilePathFromEnv() (path string) { - return os.Getenv("GOOGLE_API_CERTIFICATE_CONFIG") -} diff --git a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json b/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json deleted file mode 100644 index 2fcff6e273..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/.release-please-manifest.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "v2": "2.15.0" -} diff --git a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md b/vendor/github.com/googleapis/gax-go/v2/CHANGES.md deleted file mode 100644 index fec6b1da9e..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/CHANGES.md +++ /dev/null @@ -1,182 +0,0 @@ -# Changelog - -## [2.15.0](https://github.com/googleapis/gax-go/compare/v2.14.2...v2.15.0) (2025-07-09) - - -### Features - -* **apierror:** improve gRPC status code mapping for HTTP errors ([#431](https://github.com/googleapis/gax-go/issues/431)) ([c207f2a](https://github.com/googleapis/gax-go/commit/c207f2a19ab91d3baee458b57d4aa992519025c7)) - -## [2.14.2](https://github.com/googleapis/gax-go/compare/v2.14.1...v2.14.2) (2025-05-12) - - -### Documentation - -* **v2:** Fix Backoff doc to accurately explain Multiplier ([#423](https://github.com/googleapis/gax-go/issues/423)) ([16d1791](https://github.com/googleapis/gax-go/commit/16d17917121ea9f5d84ba52b5c7c7f2ec0f9e784)), refs [#422](https://github.com/googleapis/gax-go/issues/422) - -## [2.14.1](https://github.com/googleapis/gax-go/compare/v2.14.0...v2.14.1) (2024-12-19) - - -### Bug Fixes - -* update golang.org/x/net to v0.33.0 ([#391](https://github.com/googleapis/gax-go/issues/391)) ([547a5b4](https://github.com/googleapis/gax-go/commit/547a5b43aa6f376f71242da9f18e65fbdfb342f6)) - - -### Documentation - -* fix godoc to refer to the proper envvar ([#387](https://github.com/googleapis/gax-go/issues/387)) ([dc6baf7](https://github.com/googleapis/gax-go/commit/dc6baf75c1a737233739630b5af6c9759f08abcd)) - -## [2.14.0](https://github.com/googleapis/gax-go/compare/v2.13.0...v2.14.0) (2024-11-13) - - -### Features - -* **internallog:** add a logging support package ([#380](https://github.com/googleapis/gax-go/issues/380)) ([c877470](https://github.com/googleapis/gax-go/commit/c87747098135631a3de5865ed03aaf2c79fd9319)) - -## [2.13.0](https://github.com/googleapis/gax-go/compare/v2.12.5...v2.13.0) (2024-07-22) - - -### Features - -* **iterator:** add package to help work with new iter.Seq types ([#358](https://github.com/googleapis/gax-go/issues/358)) ([6bccdaa](https://github.com/googleapis/gax-go/commit/6bccdaac011fe6fd147e4eb533a8e6520b7d4acc)) - -## [2.12.5](https://github.com/googleapis/gax-go/compare/v2.12.4...v2.12.5) (2024-06-18) - - -### Bug Fixes - -* **v2/apierror:** fix (*APIError).Error() for unwrapped Status ([#351](https://github.com/googleapis/gax-go/issues/351)) ([22c16e7](https://github.com/googleapis/gax-go/commit/22c16e7bff5402bdc4c25063771cdd01c650b500)), refs [#350](https://github.com/googleapis/gax-go/issues/350) - -## [2.12.4](https://github.com/googleapis/gax-go/compare/v2.12.3...v2.12.4) (2024-05-03) - - -### Bug Fixes - -* provide unmarshal options for streams ([#343](https://github.com/googleapis/gax-go/issues/343)) ([ddf9a90](https://github.com/googleapis/gax-go/commit/ddf9a90bf180295d49875e15cb80b2136a49dbaf)) - -## [2.12.3](https://github.com/googleapis/gax-go/compare/v2.12.2...v2.12.3) (2024-03-14) - - -### Bug Fixes - -* bump protobuf dep to v1.33 ([#333](https://github.com/googleapis/gax-go/issues/333)) ([2892b22](https://github.com/googleapis/gax-go/commit/2892b22c1ae8a70dec3448d82e634643fe6c1be2)) - -## [2.12.2](https://github.com/googleapis/gax-go/compare/v2.12.1...v2.12.2) (2024-02-23) - - -### Bug Fixes - -* **v2/callctx:** fix SetHeader race by cloning header map ([#326](https://github.com/googleapis/gax-go/issues/326)) ([534311f](https://github.com/googleapis/gax-go/commit/534311f0f163d101f30657736c0e6f860e9c39dc)) - -## [2.12.1](https://github.com/googleapis/gax-go/compare/v2.12.0...v2.12.1) (2024-02-13) - - -### Bug Fixes - -* add XGoogFieldMaskHeader constant ([#321](https://github.com/googleapis/gax-go/issues/321)) ([666ee08](https://github.com/googleapis/gax-go/commit/666ee08931041b7fed56bed7132649785b2d3dfe)) - -## [2.12.0](https://github.com/googleapis/gax-go/compare/v2.11.0...v2.12.0) (2023-06-26) - - -### Features - -* **v2/callctx:** add new callctx package ([#291](https://github.com/googleapis/gax-go/issues/291)) ([11503ed](https://github.com/googleapis/gax-go/commit/11503ed98df4ae1bbdedf91ff64d47e63f187d68)) -* **v2:** add BuildHeaders and InsertMetadataIntoOutgoingContext to header ([#290](https://github.com/googleapis/gax-go/issues/290)) ([6a4b89f](https://github.com/googleapis/gax-go/commit/6a4b89f5551a40262e7c3caf2e1bdc7321b76ea1)) - -## [2.11.0](https://github.com/googleapis/gax-go/compare/v2.10.0...v2.11.0) (2023-06-13) - - -### Features - -* **v2:** add GoVersion package variable ([#283](https://github.com/googleapis/gax-go/issues/283)) ([26553cc](https://github.com/googleapis/gax-go/commit/26553ccadb4016b189881f52e6c253b68bb3e3d5)) - - -### Bug Fixes - -* **v2:** handle space in non-devel go version ([#288](https://github.com/googleapis/gax-go/issues/288)) ([fd7bca0](https://github.com/googleapis/gax-go/commit/fd7bca029a1c5e63def8f0a5fd1ec3f725d92f75)) - -## [2.10.0](https://github.com/googleapis/gax-go/compare/v2.9.1...v2.10.0) (2023-05-30) - - -### Features - -* update dependencies ([#280](https://github.com/googleapis/gax-go/issues/280)) ([4514281](https://github.com/googleapis/gax-go/commit/4514281058590f3637c36bfd49baa65c4d3cfb21)) - -## [2.9.1](https://github.com/googleapis/gax-go/compare/v2.9.0...v2.9.1) (2023-05-23) - - -### Bug Fixes - -* **v2:** drop cloud lro test dep ([#276](https://github.com/googleapis/gax-go/issues/276)) ([c67eeba](https://github.com/googleapis/gax-go/commit/c67eeba0f10a3294b1d93c1b8fbe40211a55ae5f)), refs [#270](https://github.com/googleapis/gax-go/issues/270) - -## [2.9.0](https://github.com/googleapis/gax-go/compare/v2.8.0...v2.9.0) (2023-05-22) - - -### Features - -* **apierror:** add method to return HTTP status code conditionally ([#274](https://github.com/googleapis/gax-go/issues/274)) ([5874431](https://github.com/googleapis/gax-go/commit/587443169acd10f7f86d1989dc8aaf189e645e98)), refs [#229](https://github.com/googleapis/gax-go/issues/229) - - -### Documentation - -* add ref to usage with clients ([#272](https://github.com/googleapis/gax-go/issues/272)) ([ea4d72d](https://github.com/googleapis/gax-go/commit/ea4d72d514beba4de450868b5fb028601a29164e)), refs [#228](https://github.com/googleapis/gax-go/issues/228) - -## [2.8.0](https://github.com/googleapis/gax-go/compare/v2.7.1...v2.8.0) (2023-03-15) - - -### Features - -* **v2:** add WithTimeout option ([#259](https://github.com/googleapis/gax-go/issues/259)) ([9a8da43](https://github.com/googleapis/gax-go/commit/9a8da43693002448b1e8758023699387481866d1)) - -## [2.7.1](https://github.com/googleapis/gax-go/compare/v2.7.0...v2.7.1) (2023-03-06) - - -### Bug Fixes - -* **v2/apierror:** return Unknown GRPCStatus when err source is HTTP ([#260](https://github.com/googleapis/gax-go/issues/260)) ([043b734](https://github.com/googleapis/gax-go/commit/043b73437a240a91229207fb3ee52a9935a36f23)), refs [#254](https://github.com/googleapis/gax-go/issues/254) - -## [2.7.0](https://github.com/googleapis/gax-go/compare/v2.6.0...v2.7.0) (2022-11-02) - - -### Features - -* update google.golang.org/api to latest ([#240](https://github.com/googleapis/gax-go/issues/240)) ([f690a02](https://github.com/googleapis/gax-go/commit/f690a02c806a2903bdee943ede3a58e3a331ebd6)) -* **v2/apierror:** add apierror.FromWrappingError ([#238](https://github.com/googleapis/gax-go/issues/238)) ([9dbd96d](https://github.com/googleapis/gax-go/commit/9dbd96d59b9d54ceb7c025513aa8c1a9d727382f)) - -## [2.6.0](https://github.com/googleapis/gax-go/compare/v2.5.1...v2.6.0) (2022-10-13) - - -### Features - -* **v2:** copy DetermineContentType functionality ([#230](https://github.com/googleapis/gax-go/issues/230)) ([2c52a70](https://github.com/googleapis/gax-go/commit/2c52a70bae965397f740ed27d46aabe89ff249b3)) - -## [2.5.1](https://github.com/googleapis/gax-go/compare/v2.5.0...v2.5.1) (2022-08-04) - - -### Bug Fixes - -* **v2:** resolve bad genproto pseudoversion in go.mod ([#218](https://github.com/googleapis/gax-go/issues/218)) ([1379b27](https://github.com/googleapis/gax-go/commit/1379b27e9846d959f7e1163b9ef298b3c92c8d23)) - -## [2.5.0](https://github.com/googleapis/gax-go/compare/v2.4.0...v2.5.0) (2022-08-04) - - -### Features - -* add ExtractProtoMessage to apierror ([#213](https://github.com/googleapis/gax-go/issues/213)) ([a6ce70c](https://github.com/googleapis/gax-go/commit/a6ce70c725c890533a9de6272d3b5ba2e336d6bb)) - -## [2.4.0](https://github.com/googleapis/gax-go/compare/v2.3.0...v2.4.0) (2022-05-09) - - -### Features - -* **v2:** add OnHTTPCodes CallOption ([#188](https://github.com/googleapis/gax-go/issues/188)) ([ba7c534](https://github.com/googleapis/gax-go/commit/ba7c5348363ab6c33e1cee3c03c0be68a46ca07c)) - - -### Bug Fixes - -* **v2/apierror:** use errors.As in FromError ([#189](https://github.com/googleapis/gax-go/issues/189)) ([f30f05b](https://github.com/googleapis/gax-go/commit/f30f05be583828f4c09cca4091333ea88ff8d79e)) - - -### Miscellaneous Chores - -* **v2:** bump release-please processing ([#192](https://github.com/googleapis/gax-go/issues/192)) ([56172f9](https://github.com/googleapis/gax-go/commit/56172f971d1141d7687edaac053ad3470af76719)) diff --git a/vendor/github.com/googleapis/gax-go/v2/LICENSE b/vendor/github.com/googleapis/gax-go/v2/LICENSE deleted file mode 100644 index 6d16b6578a..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2016, Google 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 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/github.com/googleapis/gax-go/v2/apierror/apierror.go b/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go deleted file mode 100644 index 90a40d29c1..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/apierror.go +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright 2021, Google 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 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 apierror implements a wrapper error for parsing error details from -// API calls. Both HTTP & gRPC status errors are supported. -// -// For examples of how to use [APIError] with client libraries please reference -// [Inspecting errors](https://pkg.go.dev/cloud.google.com/go#hdr-Inspecting_errors) -// in the client library documentation. -package apierror - -import ( - "errors" - "fmt" - "net/http" - "strings" - - jsonerror "github.com/googleapis/gax-go/v2/apierror/internal/proto" - "google.golang.org/api/googleapi" - "google.golang.org/genproto/googleapis/rpc/errdetails" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" -) - -// canonicalMap maps HTTP codes to gRPC status code equivalents. -var canonicalMap = map[int]codes.Code{ - http.StatusOK: codes.OK, - http.StatusBadRequest: codes.InvalidArgument, - http.StatusForbidden: codes.PermissionDenied, - http.StatusNotFound: codes.NotFound, - http.StatusConflict: codes.Aborted, - http.StatusRequestedRangeNotSatisfiable: codes.OutOfRange, - http.StatusTooManyRequests: codes.ResourceExhausted, - http.StatusGatewayTimeout: codes.DeadlineExceeded, - http.StatusNotImplemented: codes.Unimplemented, - http.StatusServiceUnavailable: codes.Unavailable, - http.StatusUnauthorized: codes.Unauthenticated, -} - -// toCode maps an http code to the most correct equivalent. -func toCode(httpCode int) codes.Code { - if sCode, ok := canonicalMap[httpCode]; ok { - return sCode - } - switch { - case httpCode >= 200 && httpCode < 300: - return codes.OK - - case httpCode >= 400 && httpCode < 500: - return codes.FailedPrecondition - - case httpCode >= 500 && httpCode < 600: - return codes.Internal - } - return codes.Unknown -} - -// ErrDetails holds the google/rpc/error_details.proto messages. -type ErrDetails struct { - ErrorInfo *errdetails.ErrorInfo - BadRequest *errdetails.BadRequest - PreconditionFailure *errdetails.PreconditionFailure - QuotaFailure *errdetails.QuotaFailure - RetryInfo *errdetails.RetryInfo - ResourceInfo *errdetails.ResourceInfo - RequestInfo *errdetails.RequestInfo - DebugInfo *errdetails.DebugInfo - Help *errdetails.Help - LocalizedMessage *errdetails.LocalizedMessage - - // Unknown stores unidentifiable error details. - Unknown []interface{} -} - -// ErrMessageNotFound is used to signal ExtractProtoMessage found no matching messages. -var ErrMessageNotFound = errors.New("message not found") - -// ExtractProtoMessage provides a mechanism for extracting protobuf messages from the -// Unknown error details. If ExtractProtoMessage finds an unknown message of the same type, -// the content of the message is copied to the provided message. -// -// ExtractProtoMessage will return ErrMessageNotFound if there are no message matching the -// protocol buffer type of the provided message. -func (e ErrDetails) ExtractProtoMessage(v proto.Message) error { - if v == nil { - return ErrMessageNotFound - } - for _, elem := range e.Unknown { - if elemProto, ok := elem.(proto.Message); ok { - if v.ProtoReflect().Type() == elemProto.ProtoReflect().Type() { - proto.Merge(v, elemProto) - return nil - } - } - } - return ErrMessageNotFound -} - -func (e ErrDetails) String() string { - var d strings.Builder - if e.ErrorInfo != nil { - d.WriteString(fmt.Sprintf("error details: name = ErrorInfo reason = %s domain = %s metadata = %s\n", - e.ErrorInfo.GetReason(), e.ErrorInfo.GetDomain(), e.ErrorInfo.GetMetadata())) - } - - if e.BadRequest != nil { - v := e.BadRequest.GetFieldViolations() - var f []string - var desc []string - for _, x := range v { - f = append(f, x.GetField()) - desc = append(desc, x.GetDescription()) - } - d.WriteString(fmt.Sprintf("error details: name = BadRequest field = %s desc = %s\n", - strings.Join(f, " "), strings.Join(desc, " "))) - } - - if e.PreconditionFailure != nil { - v := e.PreconditionFailure.GetViolations() - var t []string - var s []string - var desc []string - for _, x := range v { - t = append(t, x.GetType()) - s = append(s, x.GetSubject()) - desc = append(desc, x.GetDescription()) - } - d.WriteString(fmt.Sprintf("error details: name = PreconditionFailure type = %s subj = %s desc = %s\n", strings.Join(t, " "), - strings.Join(s, " "), strings.Join(desc, " "))) - } - - if e.QuotaFailure != nil { - v := e.QuotaFailure.GetViolations() - var s []string - var desc []string - for _, x := range v { - s = append(s, x.GetSubject()) - desc = append(desc, x.GetDescription()) - } - d.WriteString(fmt.Sprintf("error details: name = QuotaFailure subj = %s desc = %s\n", - strings.Join(s, " "), strings.Join(desc, " "))) - } - - if e.RequestInfo != nil { - d.WriteString(fmt.Sprintf("error details: name = RequestInfo id = %s data = %s\n", - e.RequestInfo.GetRequestId(), e.RequestInfo.GetServingData())) - } - - if e.ResourceInfo != nil { - d.WriteString(fmt.Sprintf("error details: name = ResourceInfo type = %s resourcename = %s owner = %s desc = %s\n", - e.ResourceInfo.GetResourceType(), e.ResourceInfo.GetResourceName(), - e.ResourceInfo.GetOwner(), e.ResourceInfo.GetDescription())) - - } - if e.RetryInfo != nil { - d.WriteString(fmt.Sprintf("error details: retry in %s\n", e.RetryInfo.GetRetryDelay().AsDuration())) - - } - if e.Unknown != nil { - var s []string - for _, x := range e.Unknown { - s = append(s, fmt.Sprintf("%v", x)) - } - d.WriteString(fmt.Sprintf("error details: name = Unknown desc = %s\n", strings.Join(s, " "))) - } - - if e.DebugInfo != nil { - d.WriteString(fmt.Sprintf("error details: name = DebugInfo detail = %s stack = %s\n", e.DebugInfo.GetDetail(), - strings.Join(e.DebugInfo.GetStackEntries(), " "))) - } - if e.Help != nil { - var desc []string - var url []string - for _, x := range e.Help.Links { - desc = append(desc, x.GetDescription()) - url = append(url, x.GetUrl()) - } - d.WriteString(fmt.Sprintf("error details: name = Help desc = %s url = %s\n", - strings.Join(desc, " "), strings.Join(url, " "))) - } - if e.LocalizedMessage != nil { - d.WriteString(fmt.Sprintf("error details: name = LocalizedMessage locale = %s msg = %s\n", - e.LocalizedMessage.GetLocale(), e.LocalizedMessage.GetMessage())) - } - - return d.String() -} - -// APIError wraps either a gRPC Status error or a HTTP googleapi.Error. It -// implements error and Status interfaces. -type APIError struct { - err error - status *status.Status - httpErr *googleapi.Error - details ErrDetails -} - -// Details presents the error details of the APIError. -func (a *APIError) Details() ErrDetails { - return a.details -} - -// Unwrap extracts the original error. -func (a *APIError) Unwrap() error { - return a.err -} - -// Error returns a readable representation of the APIError. -func (a *APIError) Error() string { - var msg string - if a.httpErr != nil { - // Truncate the googleapi.Error message because it dumps the Details in - // an ugly way. - msg = fmt.Sprintf("googleapi: Error %d: %s", a.httpErr.Code, a.httpErr.Message) - } else if a.status != nil && a.err != nil { - msg = a.err.Error() - } else if a.status != nil { - msg = a.status.Message() - } - return strings.TrimSpace(fmt.Sprintf("%s\n%s", msg, a.details)) -} - -// GRPCStatus extracts the underlying gRPC Status error. -// This method is necessary to fulfill the interface -// described in https://pkg.go.dev/google.golang.org/grpc/status#FromError. -// -// For errors that originated as an HTTP-based googleapi.Error, GRPCStatus() -// returns a status that attempts to map from the original HTTP code to an -// equivalent gRPC status code. For use cases where you want to avoid this -// behavior, error unwrapping can be used. -func (a *APIError) GRPCStatus() *status.Status { - return a.status -} - -// Reason returns the reason in an ErrorInfo. -// If ErrorInfo is nil, it returns an empty string. -func (a *APIError) Reason() string { - return a.details.ErrorInfo.GetReason() -} - -// Domain returns the domain in an ErrorInfo. -// If ErrorInfo is nil, it returns an empty string. -func (a *APIError) Domain() string { - return a.details.ErrorInfo.GetDomain() -} - -// Metadata returns the metadata in an ErrorInfo. -// If ErrorInfo is nil, it returns nil. -func (a *APIError) Metadata() map[string]string { - return a.details.ErrorInfo.GetMetadata() - -} - -// setDetailsFromError parses a Status error or a googleapi.Error -// and sets status and details or httpErr and details, respectively. -// It returns false if neither Status nor googleapi.Error can be parsed. -// -// When err is a googleapi.Error, the status of the returned error will be -// mapped to the closest equivalent gGRPC status code. -func (a *APIError) setDetailsFromError(err error) bool { - st, isStatus := status.FromError(err) - var herr *googleapi.Error - isHTTPErr := errors.As(err, &herr) - - switch { - case isStatus: - a.status = st - a.details = parseDetails(st.Details()) - case isHTTPErr: - a.httpErr = herr - a.details = parseHTTPDetails(herr) - a.status = status.New(toCode(a.httpErr.Code), herr.Message) - default: - return false - } - return true -} - -// FromError parses a Status error or a googleapi.Error and builds an -// APIError, wrapping the provided error in the new APIError. It -// returns false if neither Status nor googleapi.Error can be parsed. -func FromError(err error) (*APIError, bool) { - return ParseError(err, true) -} - -// ParseError parses a Status error or a googleapi.Error and builds an -// APIError. If wrap is true, it wraps the error in the new APIError. -// It returns false if neither Status nor googleapi.Error can be parsed. -func ParseError(err error, wrap bool) (*APIError, bool) { - if err == nil { - return nil, false - } - ae := APIError{} - if wrap { - ae = APIError{err: err} - } - if !ae.setDetailsFromError(err) { - return nil, false - } - return &ae, true -} - -// parseDetails accepts a slice of interface{} that should be backed by some -// sort of proto.Message that can be cast to the google/rpc/error_details.proto -// types. -// -// This is for internal use only. -func parseDetails(details []interface{}) ErrDetails { - var ed ErrDetails - for _, d := range details { - switch d := d.(type) { - case *errdetails.ErrorInfo: - ed.ErrorInfo = d - case *errdetails.BadRequest: - ed.BadRequest = d - case *errdetails.PreconditionFailure: - ed.PreconditionFailure = d - case *errdetails.QuotaFailure: - ed.QuotaFailure = d - case *errdetails.RetryInfo: - ed.RetryInfo = d - case *errdetails.ResourceInfo: - ed.ResourceInfo = d - case *errdetails.RequestInfo: - ed.RequestInfo = d - case *errdetails.DebugInfo: - ed.DebugInfo = d - case *errdetails.Help: - ed.Help = d - case *errdetails.LocalizedMessage: - ed.LocalizedMessage = d - default: - ed.Unknown = append(ed.Unknown, d) - } - } - - return ed -} - -// parseHTTPDetails will convert the given googleapi.Error into the protobuf -// representation then parse the Any values that contain the error details. -// -// This is for internal use only. -func parseHTTPDetails(gae *googleapi.Error) ErrDetails { - e := &jsonerror.Error{} - if err := protojson.Unmarshal([]byte(gae.Body), e); err != nil { - // If the error body does not conform to the error schema, ignore it - // altogther. See https://cloud.google.com/apis/design/errors#http_mapping. - return ErrDetails{} - } - - // Coerce the Any messages into proto.Message then parse the details. - details := []interface{}{} - for _, any := range e.GetError().GetDetails() { - m, err := any.UnmarshalNew() - if err != nil { - // Ignore malformed Any values. - continue - } - details = append(details, m) - } - - return parseDetails(details) -} - -// HTTPCode returns the underlying HTTP response status code. This method returns -// `-1` if the underlying error is a [google.golang.org/grpc/status.Status]. To -// check gRPC error codes use [google.golang.org/grpc/status.Code]. -func (a *APIError) HTTPCode() int { - if a.httpErr == nil { - return -1 - } - return a.httpErr.Code -} diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/README.md b/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/README.md deleted file mode 100644 index 9ff0caea94..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# HTTP JSON Error Schema - -The `error.proto` represents the HTTP-JSON schema used by Google APIs to convey -error payloads as described by https://cloud.google.com/apis/design/errors#http_mapping. -This package is for internal parsing logic only and should not be used in any -other context. - -## Regeneration - -To regenerate the protobuf Go code you will need the following: - -* A local copy of [googleapis], the absolute path to which should be exported to -the environment variable `GOOGLEAPIS` -* The protobuf compiler [protoc] -* The Go [protobuf plugin] -* The [goimports] tool - -From this directory run the following command: -```sh -protoc -I $GOOGLEAPIS -I. --go_out=. --go_opt=module=github.com/googleapis/gax-go/v2/apierror/internal/proto error.proto -goimports -w . -``` - -Note: the `module` plugin option ensures the generated code is placed in this -directory, and not in several nested directories defined by `go_package` option. - -[googleapis]: https://github.com/googleapis/googleapis -[protoc]: https://github.com/protocolbuffers/protobuf#protocol-compiler-installation -[protobuf plugin]: https://developers.google.com/protocol-buffers/docs/reference/go-generated -[goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports \ No newline at end of file diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.pb.go b/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.pb.go deleted file mode 100644 index e4b03f161d..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.pb.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2022 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.17.3 -// source: custom_error.proto - -package jsonerror - -import ( - reflect "reflect" - sync "sync" - - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Error code for `CustomError`. -type CustomError_CustomErrorCode int32 - -const ( - // Default error. - CustomError_CUSTOM_ERROR_CODE_UNSPECIFIED CustomError_CustomErrorCode = 0 - // Too many foo. - CustomError_TOO_MANY_FOO CustomError_CustomErrorCode = 1 - // Not enough foo. - CustomError_NOT_ENOUGH_FOO CustomError_CustomErrorCode = 2 - // Catastrophic error. - CustomError_UNIVERSE_WAS_DESTROYED CustomError_CustomErrorCode = 3 -) - -// Enum value maps for CustomError_CustomErrorCode. -var ( - CustomError_CustomErrorCode_name = map[int32]string{ - 0: "CUSTOM_ERROR_CODE_UNSPECIFIED", - 1: "TOO_MANY_FOO", - 2: "NOT_ENOUGH_FOO", - 3: "UNIVERSE_WAS_DESTROYED", - } - CustomError_CustomErrorCode_value = map[string]int32{ - "CUSTOM_ERROR_CODE_UNSPECIFIED": 0, - "TOO_MANY_FOO": 1, - "NOT_ENOUGH_FOO": 2, - "UNIVERSE_WAS_DESTROYED": 3, - } -) - -func (x CustomError_CustomErrorCode) Enum() *CustomError_CustomErrorCode { - p := new(CustomError_CustomErrorCode) - *p = x - return p -} - -func (x CustomError_CustomErrorCode) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (CustomError_CustomErrorCode) Descriptor() protoreflect.EnumDescriptor { - return file_custom_error_proto_enumTypes[0].Descriptor() -} - -func (CustomError_CustomErrorCode) Type() protoreflect.EnumType { - return &file_custom_error_proto_enumTypes[0] -} - -func (x CustomError_CustomErrorCode) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use CustomError_CustomErrorCode.Descriptor instead. -func (CustomError_CustomErrorCode) EnumDescriptor() ([]byte, []int) { - return file_custom_error_proto_rawDescGZIP(), []int{0, 0} -} - -// CustomError is an example of a custom error message which may be included -// in an rpc status. It is not meant to reflect a standard error. -type CustomError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Error code specific to the custom API being invoked. - Code CustomError_CustomErrorCode `protobuf:"varint,1,opt,name=code,proto3,enum=error.CustomError_CustomErrorCode" json:"code,omitempty"` - // Name of the failed entity. - Entity string `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` - // Message that describes the error. - ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (x *CustomError) Reset() { - *x = CustomError{} - if protoimpl.UnsafeEnabled { - mi := &file_custom_error_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CustomError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CustomError) ProtoMessage() {} - -func (x *CustomError) ProtoReflect() protoreflect.Message { - mi := &file_custom_error_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CustomError.ProtoReflect.Descriptor instead. -func (*CustomError) Descriptor() ([]byte, []int) { - return file_custom_error_proto_rawDescGZIP(), []int{0} -} - -func (x *CustomError) GetCode() CustomError_CustomErrorCode { - if x != nil { - return x.Code - } - return CustomError_CUSTOM_ERROR_CODE_UNSPECIFIED -} - -func (x *CustomError) GetEntity() string { - if x != nil { - return x.Entity - } - return "" -} - -func (x *CustomError) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -var File_custom_error_proto protoreflect.FileDescriptor - -var file_custom_error_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xfa, 0x01, 0x0a, 0x0b, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x76, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, - 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x55, 0x53, 0x54, 0x4f, 0x4d, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x54, 0x4f, 0x4f, 0x5f, 0x4d, 0x41, - 0x4e, 0x59, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x54, 0x5f, - 0x45, 0x4e, 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x46, 0x4f, 0x4f, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, - 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x45, 0x5f, 0x57, 0x41, 0x53, 0x5f, 0x44, 0x45, 0x53, - 0x54, 0x52, 0x4f, 0x59, 0x45, 0x44, 0x10, 0x03, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x67, 0x61, 0x78, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x3b, 0x6a, 0x73, 0x6f, 0x6e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_custom_error_proto_rawDescOnce sync.Once - file_custom_error_proto_rawDescData = file_custom_error_proto_rawDesc -) - -func file_custom_error_proto_rawDescGZIP() []byte { - file_custom_error_proto_rawDescOnce.Do(func() { - file_custom_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_custom_error_proto_rawDescData) - }) - return file_custom_error_proto_rawDescData -} - -var file_custom_error_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_custom_error_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_custom_error_proto_goTypes = []interface{}{ - (CustomError_CustomErrorCode)(0), // 0: error.CustomError.CustomErrorCode - (*CustomError)(nil), // 1: error.CustomError -} -var file_custom_error_proto_depIdxs = []int32{ - 0, // 0: error.CustomError.code:type_name -> error.CustomError.CustomErrorCode - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name -} - -func init() { file_custom_error_proto_init() } -func file_custom_error_proto_init() { - if File_custom_error_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_custom_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_custom_error_proto_rawDesc, - NumEnums: 1, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_custom_error_proto_goTypes, - DependencyIndexes: file_custom_error_proto_depIdxs, - EnumInfos: file_custom_error_proto_enumTypes, - MessageInfos: file_custom_error_proto_msgTypes, - }.Build() - File_custom_error_proto = out.File - file_custom_error_proto_rawDesc = nil - file_custom_error_proto_goTypes = nil - file_custom_error_proto_depIdxs = nil -} diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.proto b/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.proto deleted file mode 100644 index 21678ae65c..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/custom_error.proto +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 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. - -syntax = "proto3"; - -package error; - -option go_package = "github.com/googleapis/gax-go/v2/apierror/internal/proto;jsonerror"; - - -// CustomError is an example of a custom error message which may be included -// in an rpc status. It is not meant to reflect a standard error. -message CustomError { - - // Error code for `CustomError`. - enum CustomErrorCode { - // Default error. - CUSTOM_ERROR_CODE_UNSPECIFIED = 0; - - // Too many foo. - TOO_MANY_FOO = 1; - - // Not enough foo. - NOT_ENOUGH_FOO = 2; - - // Catastrophic error. - UNIVERSE_WAS_DESTROYED = 3; - - } - - // Error code specific to the custom API being invoked. - CustomErrorCode code = 1; - - // Name of the failed entity. - string entity = 2; - - // Message that describes the error. - string error_message = 3; -} diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.pb.go b/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.pb.go deleted file mode 100644 index 7dd9b83739..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.pb.go +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright 2021 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc v3.15.8 -// source: apierror/internal/proto/error.proto - -package jsonerror - -import ( - reflect "reflect" - sync "sync" - - code "google.golang.org/genproto/googleapis/rpc/code" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// The error format v2 for Google JSON REST APIs. -// Copied from https://cloud.google.com/apis/design/errors#http_mapping. -// -// NOTE: This schema is not used for other wire protocols. -type Error struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The actual error payload. The nested message structure is for backward - // compatibility with Google API client libraries. It also makes the error - // more readable to developers. - Error *Error_Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` -} - -func (x *Error) Reset() { - *x = Error{} - if protoimpl.UnsafeEnabled { - mi := &file_apierror_internal_proto_error_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Error) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Error) ProtoMessage() {} - -func (x *Error) ProtoReflect() protoreflect.Message { - mi := &file_apierror_internal_proto_error_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Error.ProtoReflect.Descriptor instead. -func (*Error) Descriptor() ([]byte, []int) { - return file_apierror_internal_proto_error_proto_rawDescGZIP(), []int{0} -} - -func (x *Error) GetError() *Error_Status { - if x != nil { - return x.Error - } - return nil -} - -// This message has the same semantics as `google.rpc.Status`. It uses HTTP -// status code instead of gRPC status code. It has an extra field `status` -// for backward compatibility with Google API Client Libraries. -type Error_Status struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The HTTP status code that corresponds to `google.rpc.Status.code`. - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - // This corresponds to `google.rpc.Status.message`. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // This is the enum version for `google.rpc.Status.code`. - Status code.Code `protobuf:"varint,4,opt,name=status,proto3,enum=google.rpc.Code" json:"status,omitempty"` - // This corresponds to `google.rpc.Status.details`. - Details []*anypb.Any `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"` -} - -func (x *Error_Status) Reset() { - *x = Error_Status{} - if protoimpl.UnsafeEnabled { - mi := &file_apierror_internal_proto_error_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Error_Status) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Error_Status) ProtoMessage() {} - -func (x *Error_Status) ProtoReflect() protoreflect.Message { - mi := &file_apierror_internal_proto_error_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Error_Status.ProtoReflect.Descriptor instead. -func (*Error_Status) Descriptor() ([]byte, []int) { - return file_apierror_internal_proto_error_proto_rawDescGZIP(), []int{0, 0} -} - -func (x *Error_Status) GetCode() int32 { - if x != nil { - return x.Code - } - return 0 -} - -func (x *Error_Status) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -func (x *Error_Status) GetStatus() code.Code { - if x != nil { - return x.Status - } - return code.Code(0) -} - -func (x *Error_Status) GetDetails() []*anypb.Any { - if x != nil { - return x.Details - } - return nil -} - -var File_apierror_internal_proto_error_proto protoreflect.FileDescriptor - -var file_apierror_internal_proto_error_proto_rawDesc = []byte{ - 0x0a, 0x23, 0x61, 0x70, 0x69, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x19, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, - 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, - 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x1a, 0x90, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, - 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x67, 0x61, 0x78, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x3b, 0x6a, 0x73, 0x6f, 0x6e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_apierror_internal_proto_error_proto_rawDescOnce sync.Once - file_apierror_internal_proto_error_proto_rawDescData = file_apierror_internal_proto_error_proto_rawDesc -) - -func file_apierror_internal_proto_error_proto_rawDescGZIP() []byte { - file_apierror_internal_proto_error_proto_rawDescOnce.Do(func() { - file_apierror_internal_proto_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_apierror_internal_proto_error_proto_rawDescData) - }) - return file_apierror_internal_proto_error_proto_rawDescData -} - -var file_apierror_internal_proto_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_apierror_internal_proto_error_proto_goTypes = []interface{}{ - (*Error)(nil), // 0: error.Error - (*Error_Status)(nil), // 1: error.Error.Status - (code.Code)(0), // 2: google.rpc.Code - (*anypb.Any)(nil), // 3: google.protobuf.Any -} -var file_apierror_internal_proto_error_proto_depIdxs = []int32{ - 1, // 0: error.Error.error:type_name -> error.Error.Status - 2, // 1: error.Error.Status.status:type_name -> google.rpc.Code - 3, // 2: error.Error.Status.details:type_name -> google.protobuf.Any - 3, // [3:3] is the sub-list for method output_type - 3, // [3:3] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name -} - -func init() { file_apierror_internal_proto_error_proto_init() } -func file_apierror_internal_proto_error_proto_init() { - if File_apierror_internal_proto_error_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_apierror_internal_proto_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Error); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_apierror_internal_proto_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Error_Status); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_apierror_internal_proto_error_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_apierror_internal_proto_error_proto_goTypes, - DependencyIndexes: file_apierror_internal_proto_error_proto_depIdxs, - MessageInfos: file_apierror_internal_proto_error_proto_msgTypes, - }.Build() - File_apierror_internal_proto_error_proto = out.File - file_apierror_internal_proto_error_proto_rawDesc = nil - file_apierror_internal_proto_error_proto_goTypes = nil - file_apierror_internal_proto_error_proto_depIdxs = nil -} diff --git a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.proto b/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.proto deleted file mode 100644 index 4b9b13ce11..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/apierror/internal/proto/error.proto +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2021 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. - -syntax = "proto3"; - -package error; - -import "google/protobuf/any.proto"; -import "google/rpc/code.proto"; - -option go_package = "github.com/googleapis/gax-go/v2/apierror/internal/proto;jsonerror"; - -// The error format v2 for Google JSON REST APIs. -// Copied from https://cloud.google.com/apis/design/errors#http_mapping. -// -// NOTE: This schema is not used for other wire protocols. -message Error { - // This message has the same semantics as `google.rpc.Status`. It uses HTTP - // status code instead of gRPC status code. It has an extra field `status` - // for backward compatibility with Google API Client Libraries. - message Status { - // The HTTP status code that corresponds to `google.rpc.Status.code`. - int32 code = 1; - // This corresponds to `google.rpc.Status.message`. - string message = 2; - // This is the enum version for `google.rpc.Status.code`. - google.rpc.Code status = 4; - // This corresponds to `google.rpc.Status.details`. - repeated google.protobuf.Any details = 5; - } - // The actual error payload. The nested message structure is for backward - // compatibility with Google API client libraries. It also makes the error - // more readable to developers. - Status error = 1; -} diff --git a/vendor/github.com/googleapis/gax-go/v2/call_option.go b/vendor/github.com/googleapis/gax-go/v2/call_option.go deleted file mode 100644 index ac1f2b11c9..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/call_option.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2016, Google 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 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 gax - -import ( - "errors" - "math/rand" - "time" - - "google.golang.org/api/googleapi" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" -) - -// CallOption is an option used by Invoke to control behaviors of RPC calls. -// CallOption works by modifying relevant fields of CallSettings. -type CallOption interface { - // Resolve applies the option by modifying cs. - Resolve(cs *CallSettings) -} - -// Retryer is used by Invoke to determine retry behavior. -type Retryer interface { - // Retry reports whether a request should be retried and how long to pause before retrying - // if the previous attempt returned with err. Invoke never calls Retry with nil error. - Retry(err error) (pause time.Duration, shouldRetry bool) -} - -type retryerOption func() Retryer - -func (o retryerOption) Resolve(s *CallSettings) { - s.Retry = o -} - -// WithRetry sets CallSettings.Retry to fn. -func WithRetry(fn func() Retryer) CallOption { - return retryerOption(fn) -} - -// OnErrorFunc returns a Retryer that retries if and only if the previous attempt -// returns an error that satisfies shouldRetry. -// -// Pause times between retries are specified by bo. bo is only used for its -// parameters; each Retryer has its own copy. -func OnErrorFunc(bo Backoff, shouldRetry func(err error) bool) Retryer { - return &errorRetryer{ - shouldRetry: shouldRetry, - backoff: bo, - } -} - -type errorRetryer struct { - backoff Backoff - shouldRetry func(err error) bool -} - -func (r *errorRetryer) Retry(err error) (time.Duration, bool) { - if r.shouldRetry(err) { - return r.backoff.Pause(), true - } - - return 0, false -} - -// OnCodes returns a Retryer that retries if and only if -// the previous attempt returns a GRPC error whose error code is stored in cc. -// Pause times between retries are specified by bo. -// -// bo is only used for its parameters; each Retryer has its own copy. -func OnCodes(cc []codes.Code, bo Backoff) Retryer { - return &boRetryer{ - backoff: bo, - codes: append([]codes.Code(nil), cc...), - } -} - -type boRetryer struct { - backoff Backoff - codes []codes.Code -} - -func (r *boRetryer) Retry(err error) (time.Duration, bool) { - st, ok := status.FromError(err) - if !ok { - return 0, false - } - c := st.Code() - for _, rc := range r.codes { - if c == rc { - return r.backoff.Pause(), true - } - } - return 0, false -} - -// OnHTTPCodes returns a Retryer that retries if and only if -// the previous attempt returns a googleapi.Error whose status code is stored in -// cc. Pause times between retries are specified by bo. -// -// bo is only used for its parameters; each Retryer has its own copy. -func OnHTTPCodes(bo Backoff, cc ...int) Retryer { - codes := make(map[int]bool, len(cc)) - for _, c := range cc { - codes[c] = true - } - - return &httpRetryer{ - backoff: bo, - codes: codes, - } -} - -type httpRetryer struct { - backoff Backoff - codes map[int]bool -} - -func (r *httpRetryer) Retry(err error) (time.Duration, bool) { - var gerr *googleapi.Error - if !errors.As(err, &gerr) { - return 0, false - } - - if r.codes[gerr.Code] { - return r.backoff.Pause(), true - } - - return 0, false -} - -// Backoff implements backoff logic for retries. The configuration for retries -// is described in https://google.aip.dev/client-libraries/4221. The current -// retry limit starts at Initial and increases by a factor of Multiplier every -// retry, but is capped at Max. The actual wait time between retries is a -// random value between 1ns and the current retry limit. The purpose of this -// random jitter is explained in -// https://www.awsarchitectureblog.com/2015/03/backoff.html. -// -// Note: MaxNumRetries / RPCDeadline is specifically not provided. These should -// be built on top of Backoff. -type Backoff struct { - // Initial is the initial value of the retry period, defaults to 1 second. - Initial time.Duration - - // Max is the maximum value of the retry period, defaults to 30 seconds. - Max time.Duration - - // Multiplier is the factor by which the retry period increases. - // It should be greater than 1 and defaults to 2. - Multiplier float64 - - // cur is the current retry period. - cur time.Duration -} - -// Pause returns the next time.Duration that the caller should use to backoff. -func (bo *Backoff) Pause() time.Duration { - if bo.Initial == 0 { - bo.Initial = time.Second - } - if bo.cur == 0 { - bo.cur = bo.Initial - } - if bo.Max == 0 { - bo.Max = 30 * time.Second - } - if bo.Multiplier < 1 { - bo.Multiplier = 2 - } - // Select a duration between 1ns and the current max. It might seem - // counterintuitive to have so much jitter, but - // https://www.awsarchitectureblog.com/2015/03/backoff.html argues that - // that is the best strategy. - d := time.Duration(1 + rand.Int63n(int64(bo.cur))) - bo.cur = time.Duration(float64(bo.cur) * bo.Multiplier) - if bo.cur > bo.Max { - bo.cur = bo.Max - } - return d -} - -type grpcOpt []grpc.CallOption - -func (o grpcOpt) Resolve(s *CallSettings) { - s.GRPC = o -} - -type pathOpt struct { - p string -} - -func (p pathOpt) Resolve(s *CallSettings) { - s.Path = p.p -} - -type timeoutOpt struct { - t time.Duration -} - -func (t timeoutOpt) Resolve(s *CallSettings) { - s.timeout = t.t -} - -// WithPath applies a Path override to the HTTP-based APICall. -// -// This is for internal use only. -func WithPath(p string) CallOption { - return &pathOpt{p: p} -} - -// WithGRPCOptions allows passing gRPC call options during client creation. -func WithGRPCOptions(opt ...grpc.CallOption) CallOption { - return grpcOpt(append([]grpc.CallOption(nil), opt...)) -} - -// WithTimeout is a convenience option for setting a context.WithTimeout on the -// singular context.Context used for **all** APICall attempts. Calculated from -// the start of the first APICall attempt. -// If the context.Context provided to Invoke already has a Deadline set, that -// will always be respected over the deadline calculated using this option. -func WithTimeout(t time.Duration) CallOption { - return &timeoutOpt{t: t} -} - -// CallSettings allow fine-grained control over how calls are made. -type CallSettings struct { - // Retry returns a Retryer to be used to control retry logic of a method call. - // If Retry is nil or the returned Retryer is nil, the call will not be retried. - Retry func() Retryer - - // CallOptions to be forwarded to GRPC. - GRPC []grpc.CallOption - - // Path is an HTTP override for an APICall. - Path string - - // Timeout defines the amount of time that Invoke has to complete. - // Unexported so it cannot be changed by the code in an APICall. - timeout time.Duration -} diff --git a/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go b/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go deleted file mode 100644 index f5af5c990f..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/callctx/callctx.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2023, Google 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 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 callctx provides helpers for storing and retrieving values out of -// [context.Context]. These values are used by our client libraries in various -// ways across the stack. -package callctx - -import ( - "context" - "fmt" -) - -const ( - // XGoogFieldMaskHeader is the canonical header key for the [System Parameter] - // that specifies the response read mask. The value(s) for this header - // must adhere to format described in [fieldmaskpb]. - // - // [System Parameter]: https://cloud.google.com/apis/docs/system-parameters - // [fieldmaskpb]: https://google.golang.org/protobuf/types/known/fieldmaskpb - XGoogFieldMaskHeader = "x-goog-fieldmask" - - headerKey = contextKey("header") -) - -// contextKey is a private type used to store/retrieve context values. -type contextKey string - -// HeadersFromContext retrieves headers set from [SetHeaders]. These headers -// can then be cast to http.Header or metadata.MD to send along on requests. -func HeadersFromContext(ctx context.Context) map[string][]string { - m, ok := ctx.Value(headerKey).(map[string][]string) - if !ok { - return nil - } - return m -} - -// SetHeaders stores key value pairs in the returned context that can later -// be retrieved by [HeadersFromContext]. Values stored in this manner will -// automatically be retrieved by client libraries and sent as outgoing headers -// on all requests. keyvals should have a corresponding value for every key -// provided. If there is an odd number of keyvals this method will panic. -func SetHeaders(ctx context.Context, keyvals ...string) context.Context { - if len(keyvals)%2 != 0 { - panic(fmt.Sprintf("callctx: an even number of key value pairs must be provided, got %d", len(keyvals))) - } - h, ok := ctx.Value(headerKey).(map[string][]string) - if !ok { - h = make(map[string][]string) - } else { - h = cloneHeaders(h) - } - - for i := 0; i < len(keyvals); i = i + 2 { - h[keyvals[i]] = append(h[keyvals[i]], keyvals[i+1]) - } - return context.WithValue(ctx, headerKey, h) -} - -// cloneHeaders makes a new key-value map while reusing the value slices. -// As such, new values should be appended to the value slice, and modifying -// indexed values is not thread safe. -// -// TODO: Replace this with maps.Clone when Go 1.21 is the minimum version. -func cloneHeaders(h map[string][]string) map[string][]string { - c := make(map[string][]string, len(h)) - for k, v := range h { - vc := make([]string, len(v)) - copy(vc, v) - c[k] = vc - } - return c -} diff --git a/vendor/github.com/googleapis/gax-go/v2/content_type.go b/vendor/github.com/googleapis/gax-go/v2/content_type.go deleted file mode 100644 index 1b53d0a3ac..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/content_type.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2022, Google 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 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 gax - -import ( - "io" - "io/ioutil" - "net/http" -) - -const sniffBuffSize = 512 - -func newContentSniffer(r io.Reader) *contentSniffer { - return &contentSniffer{r: r} -} - -// contentSniffer wraps a Reader, and reports the content type determined by sniffing up to 512 bytes from the Reader. -type contentSniffer struct { - r io.Reader - start []byte // buffer for the sniffed bytes. - err error // set to any error encountered while reading bytes to be sniffed. - - ctype string // set on first sniff. - sniffed bool // set to true on first sniff. -} - -func (cs *contentSniffer) Read(p []byte) (n int, err error) { - // Ensure that the content type is sniffed before any data is consumed from Reader. - _, _ = cs.ContentType() - - if len(cs.start) > 0 { - n := copy(p, cs.start) - cs.start = cs.start[n:] - return n, nil - } - - // We may have read some bytes into start while sniffing, even if the read ended in an error. - // We should first return those bytes, then the error. - if cs.err != nil { - return 0, cs.err - } - - // Now we have handled all bytes that were buffered while sniffing. Now just delegate to the underlying reader. - return cs.r.Read(p) -} - -// ContentType returns the sniffed content type, and whether the content type was successfully sniffed. -func (cs *contentSniffer) ContentType() (string, bool) { - if cs.sniffed { - return cs.ctype, cs.ctype != "" - } - cs.sniffed = true - // If ReadAll hits EOF, it returns err==nil. - cs.start, cs.err = ioutil.ReadAll(io.LimitReader(cs.r, sniffBuffSize)) - - // Don't try to detect the content type based on possibly incomplete data. - if cs.err != nil { - return "", false - } - - cs.ctype = http.DetectContentType(cs.start) - return cs.ctype, true -} - -// DetermineContentType determines the content type of the supplied reader. -// The content of media will be sniffed to determine the content type. -// After calling DetectContentType the caller must not perform further reads on -// media, but rather read from the Reader that is returned. -func DetermineContentType(media io.Reader) (io.Reader, string) { - // For backwards compatibility, allow clients to set content - // type by providing a ContentTyper for media. - // Note: This is an anonymous interface definition copied from googleapi.ContentTyper. - if typer, ok := media.(interface { - ContentType() string - }); ok { - return media, typer.ContentType() - } - - sniffer := newContentSniffer(media) - if ctype, ok := sniffer.ContentType(); ok { - return sniffer, ctype - } - // If content type could not be sniffed, reads from sniffer will eventually fail with an error. - return sniffer, "" -} diff --git a/vendor/github.com/googleapis/gax-go/v2/gax.go b/vendor/github.com/googleapis/gax-go/v2/gax.go deleted file mode 100644 index 36cdfa33e3..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/gax.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2016, Google 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 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 gax contains a set of modules which aid the development of APIs -// for clients and servers based on gRPC and Google API conventions. -// -// Application code will rarely need to use this library directly. -// However, code generated automatically from API definition files can use it -// to simplify code generation and to provide more convenient and idiomatic API surfaces. -package gax - -import "github.com/googleapis/gax-go/v2/internal" - -// Version specifies the gax-go version being used. -const Version = internal.Version diff --git a/vendor/github.com/googleapis/gax-go/v2/header.go b/vendor/github.com/googleapis/gax-go/v2/header.go deleted file mode 100644 index f5273985af..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/header.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2018, Google 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 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 gax - -import ( - "bytes" - "context" - "fmt" - "net/http" - "runtime" - "strings" - "unicode" - - "github.com/googleapis/gax-go/v2/callctx" - "google.golang.org/grpc/metadata" -) - -var ( - // GoVersion is a header-safe representation of the current runtime - // environment's Go version. This is for GAX consumers that need to - // report the Go runtime version in API calls. - GoVersion string - // version is a package internal global variable for testing purposes. - version = runtime.Version -) - -// versionUnknown is only used when the runtime version cannot be determined. -const versionUnknown = "UNKNOWN" - -func init() { - GoVersion = goVersion() -} - -// goVersion returns a Go runtime version derived from the runtime environment -// that is modified to be suitable for reporting in a header, meaning it has no -// whitespace. If it is unable to determine the Go runtime version, it returns -// versionUnknown. -func goVersion() string { - const develPrefix = "devel +" - - s := version() - if strings.HasPrefix(s, develPrefix) { - s = s[len(develPrefix):] - if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - return s - } else if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - - notSemverRune := func(r rune) bool { - return !strings.ContainsRune("0123456789.", r) - } - - if strings.HasPrefix(s, "go1") { - s = s[2:] - var prerelease string - if p := strings.IndexFunc(s, notSemverRune); p >= 0 { - s, prerelease = s[:p], s[p:] - } - if strings.HasSuffix(s, ".") { - s += "0" - } else if strings.Count(s, ".") < 2 { - s += ".0" - } - if prerelease != "" { - // Some release candidates already have a dash in them. - if !strings.HasPrefix(prerelease, "-") { - prerelease = "-" + prerelease - } - s += prerelease - } - return s - } - return "UNKNOWN" -} - -// XGoogHeader is for use by the Google Cloud Libraries only. See package -// [github.com/googleapis/gax-go/v2/callctx] for help setting/retrieving -// request/response headers. -// -// XGoogHeader formats key-value pairs. -// The resulting string is suitable for x-goog-api-client header. -func XGoogHeader(keyval ...string) string { - if len(keyval) == 0 { - return "" - } - if len(keyval)%2 != 0 { - panic("gax.Header: odd argument count") - } - var buf bytes.Buffer - for i := 0; i < len(keyval); i += 2 { - buf.WriteByte(' ') - buf.WriteString(keyval[i]) - buf.WriteByte('/') - buf.WriteString(keyval[i+1]) - } - return buf.String()[1:] -} - -// InsertMetadataIntoOutgoingContext is for use by the Google Cloud Libraries -// only. See package [github.com/googleapis/gax-go/v2/callctx] for help -// setting/retrieving request/response headers. -// -// InsertMetadataIntoOutgoingContext returns a new context that merges the -// provided keyvals metadata pairs with any existing metadata/headers in the -// provided context. keyvals should have a corresponding value for every key -// provided. If there is an odd number of keyvals this method will panic. -// Existing values for keys will not be overwritten, instead provided values -// will be appended to the list of existing values. -func InsertMetadataIntoOutgoingContext(ctx context.Context, keyvals ...string) context.Context { - return metadata.NewOutgoingContext(ctx, insertMetadata(ctx, keyvals...)) -} - -// BuildHeaders is for use by the Google Cloud Libraries only. See package -// [github.com/googleapis/gax-go/v2/callctx] for help setting/retrieving -// request/response headers. -// -// BuildHeaders returns a new http.Header that merges the provided -// keyvals header pairs with any existing metadata/headers in the provided -// context. keyvals should have a corresponding value for every key provided. -// If there is an odd number of keyvals this method will panic. -// Existing values for keys will not be overwritten, instead provided values -// will be appended to the list of existing values. -func BuildHeaders(ctx context.Context, keyvals ...string) http.Header { - return http.Header(insertMetadata(ctx, keyvals...)) -} - -func insertMetadata(ctx context.Context, keyvals ...string) metadata.MD { - if len(keyvals)%2 != 0 { - panic(fmt.Sprintf("gax: an even number of key value pairs must be provided, got %d", len(keyvals))) - } - out, ok := metadata.FromOutgoingContext(ctx) - if !ok { - out = metadata.MD(make(map[string][]string)) - } - headers := callctx.HeadersFromContext(ctx) - - // x-goog-api-client is a special case that we want to make sure gets merged - // into a single header. - const xGoogHeader = "x-goog-api-client" - var mergedXgoogHeader strings.Builder - - for k, vals := range headers { - if k == xGoogHeader { - // Merge all values for the x-goog-api-client header set on the ctx. - for _, v := range vals { - mergedXgoogHeader.WriteString(v) - mergedXgoogHeader.WriteRune(' ') - } - continue - } - out[k] = append(out[k], vals...) - } - for i := 0; i < len(keyvals); i = i + 2 { - out[keyvals[i]] = append(out[keyvals[i]], keyvals[i+1]) - - if keyvals[i] == xGoogHeader { - // Merge the x-goog-api-client header values set on the ctx with any - // values passed in for it from the client. - mergedXgoogHeader.WriteString(keyvals[i+1]) - mergedXgoogHeader.WriteRune(' ') - } - } - - // Add the x goog header back in, replacing the separate values that were set. - if mergedXgoogHeader.Len() > 0 { - out[xGoogHeader] = []string{mergedXgoogHeader.String()[:mergedXgoogHeader.Len()-1]} - } - - return out -} diff --git a/vendor/github.com/googleapis/gax-go/v2/internal/version.go b/vendor/github.com/googleapis/gax-go/v2/internal/version.go deleted file mode 100644 index 0ab1bce59c..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/internal/version.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022, Google 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 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 internal - -// Version is the current tagged release of the library. -const Version = "2.15.0" diff --git a/vendor/github.com/googleapis/gax-go/v2/internallog/internal/internal.go b/vendor/github.com/googleapis/gax-go/v2/internallog/internal/internal.go deleted file mode 100644 index 19f4be35c2..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/internallog/internal/internal.go +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright 2024, Google 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 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 internal provides some common logic and types to other logging -// sub-packages. -package internal - -import ( - "context" - "io" - "log/slog" - "os" - "strings" - "time" -) - -const ( - // LoggingLevelEnvVar is the environment variable used to enable logging - // at a particular level. - LoggingLevelEnvVar = "GOOGLE_SDK_GO_LOGGING_LEVEL" - - googLvlKey = "severity" - googMsgKey = "message" - googSourceKey = "sourceLocation" - googTimeKey = "timestamp" -) - -// NewLoggerWithWriter is exposed for testing. -func NewLoggerWithWriter(w io.Writer) *slog.Logger { - lvl, loggingEnabled := checkLoggingLevel() - if !loggingEnabled { - return slog.New(noOpHandler{}) - } - return slog.New(newGCPSlogHandler(lvl, w)) -} - -// checkLoggingLevel returned the configured logging level and whether or not -// logging is enabled. -func checkLoggingLevel() (slog.Leveler, bool) { - sLevel := strings.ToLower(os.Getenv(LoggingLevelEnvVar)) - var level slog.Level - switch sLevel { - case "debug": - level = slog.LevelDebug - case "info": - level = slog.LevelInfo - case "warn": - level = slog.LevelWarn - case "error": - level = slog.LevelError - default: - return nil, false - } - return level, true -} - -// newGCPSlogHandler returns a Handler that is configured to output in a JSON -// format with well-known keys. For more information on this format see -// https://cloud.google.com/logging/docs/agent/logging/configuration#special-fields. -func newGCPSlogHandler(lvl slog.Leveler, w io.Writer) slog.Handler { - return slog.NewJSONHandler(w, &slog.HandlerOptions{ - Level: lvl, - ReplaceAttr: replaceAttr, - }) -} - -// replaceAttr remaps default Go logging keys to match what is expected in -// cloud logging. -func replaceAttr(groups []string, a slog.Attr) slog.Attr { - if groups == nil { - if a.Key == slog.LevelKey { - a.Key = googLvlKey - return a - } else if a.Key == slog.MessageKey { - a.Key = googMsgKey - return a - } else if a.Key == slog.SourceKey { - a.Key = googSourceKey - return a - } else if a.Key == slog.TimeKey { - a.Key = googTimeKey - if a.Value.Kind() == slog.KindTime { - a.Value = slog.StringValue(a.Value.Time().Format(time.RFC3339)) - } - return a - } - } - return a -} - -// The handler returned if logging is not enabled. -type noOpHandler struct{} - -func (h noOpHandler) Enabled(_ context.Context, _ slog.Level) bool { - return false -} - -func (h noOpHandler) Handle(_ context.Context, _ slog.Record) error { - return nil -} - -func (h noOpHandler) WithAttrs(_ []slog.Attr) slog.Handler { - return h -} - -func (h noOpHandler) WithGroup(_ string) slog.Handler { - return h -} diff --git a/vendor/github.com/googleapis/gax-go/v2/internallog/internallog.go b/vendor/github.com/googleapis/gax-go/v2/internallog/internallog.go deleted file mode 100644 index e47ab32acc..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/internallog/internallog.go +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2024, Google 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 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 internallog in intended for internal use by generated clients only. -package internallog - -import ( - "bytes" - "encoding/json" - "fmt" - "log/slog" - "net/http" - "os" - "strings" - - "github.com/googleapis/gax-go/v2/internallog/internal" -) - -// New returns a new [slog.Logger] default logger, or the provided logger if -// non-nil. The returned logger will be a no-op logger unless the environment -// variable GOOGLE_SDK_GO_LOGGING_LEVEL is set. -func New(l *slog.Logger) *slog.Logger { - if l != nil { - return l - } - return internal.NewLoggerWithWriter(os.Stderr) -} - -// HTTPRequest returns a lazily evaluated [slog.LogValuer] for a -// [http.Request] and the associated body. -func HTTPRequest(req *http.Request, body []byte) slog.LogValuer { - return &request{ - req: req, - payload: body, - } -} - -type request struct { - req *http.Request - payload []byte -} - -func (r *request) LogValue() slog.Value { - if r == nil || r.req == nil { - return slog.Value{} - } - var groupValueAttrs []slog.Attr - groupValueAttrs = append(groupValueAttrs, slog.String("method", r.req.Method)) - groupValueAttrs = append(groupValueAttrs, slog.String("url", r.req.URL.String())) - - var headerAttr []slog.Attr - for k, val := range r.req.Header { - headerAttr = append(headerAttr, slog.String(k, strings.Join(val, ","))) - } - if len(headerAttr) > 0 { - groupValueAttrs = append(groupValueAttrs, slog.Any("headers", headerAttr)) - } - - if len(r.payload) > 0 { - if attr, ok := processPayload(r.payload); ok { - groupValueAttrs = append(groupValueAttrs, attr) - } - } - return slog.GroupValue(groupValueAttrs...) -} - -// HTTPResponse returns a lazily evaluated [slog.LogValuer] for a -// [http.Response] and the associated body. -func HTTPResponse(resp *http.Response, body []byte) slog.LogValuer { - return &response{ - resp: resp, - payload: body, - } -} - -type response struct { - resp *http.Response - payload []byte -} - -func (r *response) LogValue() slog.Value { - if r == nil { - return slog.Value{} - } - var groupValueAttrs []slog.Attr - groupValueAttrs = append(groupValueAttrs, slog.String("status", fmt.Sprint(r.resp.StatusCode))) - - var headerAttr []slog.Attr - for k, val := range r.resp.Header { - headerAttr = append(headerAttr, slog.String(k, strings.Join(val, ","))) - } - if len(headerAttr) > 0 { - groupValueAttrs = append(groupValueAttrs, slog.Any("headers", headerAttr)) - } - - if len(r.payload) > 0 { - if attr, ok := processPayload(r.payload); ok { - groupValueAttrs = append(groupValueAttrs, attr) - } - } - return slog.GroupValue(groupValueAttrs...) -} - -func processPayload(payload []byte) (slog.Attr, bool) { - peekChar := payload[0] - if peekChar == '{' { - // JSON object - var m map[string]any - if err := json.Unmarshal(payload, &m); err == nil { - return slog.Any("payload", m), true - } - } else if peekChar == '[' { - // JSON array - var m []any - if err := json.Unmarshal(payload, &m); err == nil { - return slog.Any("payload", m), true - } - } else { - // Everything else - buf := &bytes.Buffer{} - if err := json.Compact(buf, payload); err != nil { - // Write raw payload incase of error - buf.Write(payload) - } - return slog.String("payload", buf.String()), true - } - return slog.Attr{}, false -} diff --git a/vendor/github.com/googleapis/gax-go/v2/invoke.go b/vendor/github.com/googleapis/gax-go/v2/invoke.go deleted file mode 100644 index 721d1af551..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/invoke.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2016, Google 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 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 gax - -import ( - "context" - "strings" - "time" - - "github.com/googleapis/gax-go/v2/apierror" -) - -// APICall is a user defined call stub. -type APICall func(context.Context, CallSettings) error - -// Invoke calls the given APICall, performing retries as specified by opts, if -// any. -func Invoke(ctx context.Context, call APICall, opts ...CallOption) error { - var settings CallSettings - for _, opt := range opts { - opt.Resolve(&settings) - } - return invoke(ctx, call, settings, Sleep) -} - -// Sleep is similar to time.Sleep, but it can be interrupted by ctx.Done() closing. -// If interrupted, Sleep returns ctx.Err(). -func Sleep(ctx context.Context, d time.Duration) error { - t := time.NewTimer(d) - select { - case <-ctx.Done(): - t.Stop() - return ctx.Err() - case <-t.C: - return nil - } -} - -type sleeper func(ctx context.Context, d time.Duration) error - -// invoke implements Invoke, taking an additional sleeper argument for testing. -func invoke(ctx context.Context, call APICall, settings CallSettings, sp sleeper) error { - var retryer Retryer - - // Only use the value provided via WithTimeout if the context doesn't - // already have a deadline. This is important for backwards compatibility if - // the user already set a deadline on the context given to Invoke. - if _, ok := ctx.Deadline(); !ok && settings.timeout != 0 { - c, cc := context.WithTimeout(ctx, settings.timeout) - defer cc() - ctx = c - } - - for { - err := call(ctx, settings) - if err == nil { - return nil - } - // Never retry permanent certificate errors. (e.x. if ca-certificates - // are not installed). We should only make very few, targeted - // exceptions: many (other) status=Unavailable should be retried, such - // as if there's a network hiccup, or the internet goes out for a - // minute. This is also why here we are doing string parsing instead of - // simply making Unavailable a non-retried code elsewhere. - if strings.Contains(err.Error(), "x509: certificate signed by unknown authority") { - return err - } - if apierr, ok := apierror.FromError(err); ok { - err = apierr - } - if settings.Retry == nil { - return err - } - if retryer == nil { - if r := settings.Retry(); r != nil { - retryer = r - } else { - return err - } - } - if d, ok := retryer.Retry(err); !ok { - return err - } else if err = sp(ctx, d); err != nil { - return err - } - } -} diff --git a/vendor/github.com/googleapis/gax-go/v2/proto_json_stream.go b/vendor/github.com/googleapis/gax-go/v2/proto_json_stream.go deleted file mode 100644 index 9b690d40c4..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/proto_json_stream.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2022, Google 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 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 gax - -import ( - "encoding/json" - "errors" - "io" - - "google.golang.org/protobuf/encoding/protojson" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" -) - -var ( - arrayOpen = json.Delim('[') - arrayClose = json.Delim(']') - errBadOpening = errors.New("unexpected opening token, expected '['") -) - -// ProtoJSONStream represents a wrapper for consuming a stream of protobuf -// messages encoded using protobuf-JSON format. More information on this format -// can be found at https://developers.google.com/protocol-buffers/docs/proto3#json. -// The stream must appear as a comma-delimited, JSON array of obbjects with -// opening and closing square braces. -// -// This is for internal use only. -type ProtoJSONStream struct { - first, closed bool - reader io.ReadCloser - stream *json.Decoder - typ protoreflect.MessageType -} - -// NewProtoJSONStreamReader accepts a stream of bytes via an io.ReadCloser that are -// protobuf-JSON encoded protobuf messages of the given type. The ProtoJSONStream -// must be closed when done. -// -// This is for internal use only. -func NewProtoJSONStreamReader(rc io.ReadCloser, typ protoreflect.MessageType) *ProtoJSONStream { - return &ProtoJSONStream{ - first: true, - reader: rc, - stream: json.NewDecoder(rc), - typ: typ, - } -} - -// Recv decodes the next protobuf message in the stream or returns io.EOF if -// the stream is done. It is not safe to call Recv on the same stream from -// different goroutines, just like it is not safe to do so with a single gRPC -// stream. Type-cast the protobuf message returned to the type provided at -// ProtoJSONStream creation. -// Calls to Recv after calling Close will produce io.EOF. -func (s *ProtoJSONStream) Recv() (proto.Message, error) { - if s.closed { - return nil, io.EOF - } - if s.first { - s.first = false - - // Consume the opening '[' so Decode gets one object at a time. - if t, err := s.stream.Token(); err != nil { - return nil, err - } else if t != arrayOpen { - return nil, errBadOpening - } - } - - // Capture the next block of data for the item (a JSON object) in the stream. - var raw json.RawMessage - if err := s.stream.Decode(&raw); err != nil { - e := err - // To avoid checking the first token of each stream, just attempt to - // Decode the next blob and if that fails, double check if it is just - // the closing token ']'. If it is the closing, return io.EOF. If it - // isn't, return the original error. - if t, _ := s.stream.Token(); t == arrayClose { - e = io.EOF - } - return nil, e - } - - // Initialize a new instance of the protobuf message to unmarshal the - // raw data into. - m := s.typ.New().Interface() - unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true} - err := unm.Unmarshal(raw, m) - - return m, err -} - -// Close closes the stream so that resources are cleaned up. -func (s *ProtoJSONStream) Close() error { - // Dereference the *json.Decoder so that the memory is gc'd. - s.stream = nil - s.closed = true - - return s.reader.Close() -} diff --git a/vendor/github.com/googleapis/gax-go/v2/release-please-config.json b/vendor/github.com/googleapis/gax-go/v2/release-please-config.json deleted file mode 100644 index 61ee266a15..0000000000 --- a/vendor/github.com/googleapis/gax-go/v2/release-please-config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "release-type": "go-yoshi", - "separate-pull-requests": true, - "include-component-in-tag": false, - "packages": { - "v2": { - "component": "v2" - } - } -} diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/gorilla/websocket/.gitignore deleted file mode 100644 index cd3fcd1ef7..0000000000 --- a/vendor/github.com/gorilla/websocket/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe - -.idea/ -*.iml diff --git a/vendor/github.com/gorilla/websocket/AUTHORS b/vendor/github.com/gorilla/websocket/AUTHORS deleted file mode 100644 index 1931f40068..0000000000 --- a/vendor/github.com/gorilla/websocket/AUTHORS +++ /dev/null @@ -1,9 +0,0 @@ -# This is the official list of Gorilla WebSocket authors for copyright -# purposes. -# -# Please keep the list sorted. - -Gary Burd -Google LLC (https://opensource.google.com/) -Joachim Bauch - diff --git a/vendor/github.com/gorilla/websocket/LICENSE b/vendor/github.com/gorilla/websocket/LICENSE deleted file mode 100644 index 9171c97225..0000000000 --- a/vendor/github.com/gorilla/websocket/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 The Gorilla WebSocket 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. - -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 HOLDER 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/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md deleted file mode 100644 index ff8bfab0b2..0000000000 --- a/vendor/github.com/gorilla/websocket/README.md +++ /dev/null @@ -1,32 +0,0 @@ -# Gorilla WebSocket - -[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket) -[![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket) - -Gorilla WebSocket is a [Go](http://golang.org/) implementation of the -[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. - - -### Documentation - -* [API Reference](https://pkg.go.dev/github.com/gorilla/websocket?tab=doc) -* [Chat example](https://github.com/gorilla/websocket/tree/main/examples/chat) -* [Command example](https://github.com/gorilla/websocket/tree/main/examples/command) -* [Client and server example](https://github.com/gorilla/websocket/tree/main/examples/echo) -* [File watch example](https://github.com/gorilla/websocket/tree/main/examples/filewatch) - -### Status - -The Gorilla WebSocket package provides a complete and tested implementation of -the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The -package API is stable. - -### Installation - - go get github.com/gorilla/websocket - -### Protocol Compliance - -The Gorilla WebSocket package passes the server tests in the [Autobahn Test -Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn -subdirectory](https://github.com/gorilla/websocket/tree/main/examples/autobahn). diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go deleted file mode 100644 index 00917ea341..0000000000 --- a/vendor/github.com/gorilla/websocket/client.go +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "bytes" - "context" - "crypto/tls" - "errors" - "fmt" - "io" - "net" - "net/http" - "net/http/httptrace" - "net/url" - "strings" - "time" -) - -// ErrBadHandshake is returned when the server response to opening handshake is -// invalid. -var ErrBadHandshake = errors.New("websocket: bad handshake") - -var errInvalidCompression = errors.New("websocket: invalid compression negotiation") - -// NewClient creates a new client connection using the given net connection. -// The URL u specifies the host and request URI. Use requestHeader to specify -// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies -// (Cookie). Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etc. -// -// Deprecated: Use Dialer instead. -func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufSize, writeBufSize int) (c *Conn, response *http.Response, err error) { - d := Dialer{ - ReadBufferSize: readBufSize, - WriteBufferSize: writeBufSize, - NetDial: func(net, addr string) (net.Conn, error) { - return netConn, nil - }, - } - return d.Dial(u.String(), requestHeader) -} - -// A Dialer contains options for connecting to WebSocket server. -// -// It is safe to call Dialer's methods concurrently. -type Dialer struct { - // The following custom dial functions can be set to establish - // connections to either the backend server or the proxy (if it - // exists). The scheme of the dialed entity (either backend or - // proxy) determines which custom dial function is selected: - // either NetDialTLSContext for HTTPS or NetDialContext/NetDial - // for HTTP. Since the "Proxy" function can determine the scheme - // dynamically, it can make sense to set multiple custom dial - // functions simultaneously. - // - // NetDial specifies the dial function for creating TCP connections. If - // NetDial is nil, net.Dialer DialContext is used. - // If "Proxy" field is also set, this function dials the proxy--not - // the backend server. - NetDial func(network, addr string) (net.Conn, error) - - // NetDialContext specifies the dial function for creating TCP connections. If - // NetDialContext is nil, NetDial is used. - // If "Proxy" field is also set, this function dials the proxy--not - // the backend server. - NetDialContext func(ctx context.Context, network, addr string) (net.Conn, error) - - // NetDialTLSContext specifies the dial function for creating TLS/TCP connections. If - // NetDialTLSContext is nil, NetDialContext is used. - // If NetDialTLSContext is set, Dial assumes the TLS handshake is done there and - // TLSClientConfig is ignored. - // If "Proxy" field is also set, this function dials the proxy (and performs - // the TLS handshake with the proxy, ignoring TLSClientConfig). In this TLS proxy - // dialing case the TLSClientConfig could still be necessary for TLS to the backend server. - NetDialTLSContext func(ctx context.Context, network, addr string) (net.Conn, error) - - // Proxy specifies a function to return a proxy for a given - // Request. If the function returns a non-nil error, the - // request is aborted with the provided error. - // If Proxy is nil or returns a nil *URL, no proxy is used. - Proxy func(*http.Request) (*url.URL, error) - - // TLSClientConfig specifies the TLS configuration to use with tls.Client. - // If nil, the default configuration is used. - // If NetDialTLSContext is set, Dial assumes the TLS handshake - // is done there and TLSClientConfig is ignored. - TLSClientConfig *tls.Config - - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. If a buffer - // size is zero, then a useful default size is used. The I/O buffer sizes - // do not limit the size of the messages that can be sent or received. - ReadBufferSize, WriteBufferSize int - - // WriteBufferPool is a pool of buffers for write operations. If the value - // is not set, then write buffers are allocated to the connection for the - // lifetime of the connection. - // - // A pool is most useful when the application has a modest volume of writes - // across a large number of connections. - // - // Applications should use a single pool for each unique value of - // WriteBufferSize. - WriteBufferPool BufferPool - - // Subprotocols specifies the client's requested subprotocols. - Subprotocols []string - - // EnableCompression specifies if the client should attempt to negotiate - // per message compression (RFC 7692). Setting this value to true does not - // guarantee that compression will be supported. Currently only "no context - // takeover" modes are supported. - EnableCompression bool - - // Jar specifies the cookie jar. - // If Jar is nil, cookies are not sent in requests and ignored - // in responses. - Jar http.CookieJar -} - -// Dial creates a new client connection by calling DialContext with a background context. -func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) { - return d.DialContext(context.Background(), urlStr, requestHeader) -} - -var errMalformedURL = errors.New("malformed ws or wss URL") - -func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) { - hostPort = u.Host - hostNoPort = u.Host - if i := strings.LastIndex(u.Host, ":"); i > strings.LastIndex(u.Host, "]") { - hostNoPort = hostNoPort[:i] - } else { - switch u.Scheme { - case "wss": - hostPort += ":443" - case "https": - hostPort += ":443" - default: - hostPort += ":80" - } - } - return hostPort, hostNoPort -} - -// DefaultDialer is a dialer with all fields set to the default values. -var DefaultDialer = &Dialer{ - Proxy: http.ProxyFromEnvironment, - HandshakeTimeout: 45 * time.Second, -} - -// nilDialer is dialer to use when receiver is nil. -var nilDialer = *DefaultDialer - -// DialContext creates a new client connection. Use requestHeader to specify the -// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). -// Use the response.Header to get the selected subprotocol -// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). -// -// The context will be used in the request and in the Dialer. -// -// If the WebSocket handshake fails, ErrBadHandshake is returned along with a -// non-nil *http.Response so that callers can handle redirects, authentication, -// etcetera. The response body may not contain the entire response and does not -// need to be closed by the application. -func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) { - if d == nil { - d = &nilDialer - } - - challengeKey, err := generateChallengeKey() - if err != nil { - return nil, nil, err - } - - u, err := url.Parse(urlStr) - if err != nil { - return nil, nil, err - } - - switch u.Scheme { - case "ws": - u.Scheme = "http" - case "wss": - u.Scheme = "https" - default: - return nil, nil, errMalformedURL - } - - if u.User != nil { - // User name and password are not allowed in websocket URIs. - return nil, nil, errMalformedURL - } - - req := &http.Request{ - Method: http.MethodGet, - URL: u, - Proto: "HTTP/1.1", - ProtoMajor: 1, - ProtoMinor: 1, - Header: make(http.Header), - Host: u.Host, - } - req = req.WithContext(ctx) - - // Set the cookies present in the cookie jar of the dialer - if d.Jar != nil { - for _, cookie := range d.Jar.Cookies(u) { - req.AddCookie(cookie) - } - } - - // Set the request headers using the capitalization for names and values in - // RFC examples. Although the capitalization shouldn't matter, there are - // servers that depend on it. The Header.Set method is not used because the - // method canonicalizes the header names. - req.Header["Upgrade"] = []string{"websocket"} - req.Header["Connection"] = []string{"Upgrade"} - req.Header["Sec-WebSocket-Key"] = []string{challengeKey} - req.Header["Sec-WebSocket-Version"] = []string{"13"} - if len(d.Subprotocols) > 0 { - req.Header["Sec-WebSocket-Protocol"] = []string{strings.Join(d.Subprotocols, ", ")} - } - for k, vs := range requestHeader { - switch { - case k == "Host": - if len(vs) > 0 { - req.Host = vs[0] - } - case k == "Upgrade" || - k == "Connection" || - k == "Sec-Websocket-Key" || - k == "Sec-Websocket-Version" || - k == "Sec-Websocket-Extensions" || - (k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0): - return nil, nil, errors.New("websocket: duplicate header not allowed: " + k) - case k == "Sec-Websocket-Protocol": - req.Header["Sec-WebSocket-Protocol"] = vs - default: - req.Header[k] = vs - } - } - - if d.EnableCompression { - req.Header["Sec-WebSocket-Extensions"] = []string{"permessage-deflate; server_no_context_takeover; client_no_context_takeover"} - } - - if d.HandshakeTimeout != 0 { - var cancel func() - ctx, cancel = context.WithTimeout(ctx, d.HandshakeTimeout) - defer cancel() - } - - var proxyURL *url.URL - if d.Proxy != nil { - proxyURL, err = d.Proxy(req) - if err != nil { - return nil, nil, err - } - } - netDial, err := d.netDialFn(ctx, proxyURL, u) - if err != nil { - return nil, nil, err - } - - hostPort, hostNoPort := hostPortNoPort(u) - trace := httptrace.ContextClientTrace(ctx) - if trace != nil && trace.GetConn != nil { - trace.GetConn(hostPort) - } - - netConn, err := netDial(ctx, "tcp", hostPort) - if err != nil { - return nil, nil, err - } - if trace != nil && trace.GotConn != nil { - trace.GotConn(httptrace.GotConnInfo{ - Conn: netConn, - }) - } - - // Close the network connection when returning an error. The variable - // netConn is set to nil before the success return at the end of the - // function. - defer func() { - if netConn != nil { - // It's safe to ignore the error from Close() because this code is - // only executed when returning a more important error to the - // application. - _ = netConn.Close() - } - }() - - // Do TLS handshake over established connection if a proxy exists. - if proxyURL != nil && u.Scheme == "https" { - - cfg := cloneTLSConfig(d.TLSClientConfig) - if cfg.ServerName == "" { - cfg.ServerName = hostNoPort - } - tlsConn := tls.Client(netConn, cfg) - netConn = tlsConn - - if trace != nil && trace.TLSHandshakeStart != nil { - trace.TLSHandshakeStart() - } - err := doHandshake(ctx, tlsConn, cfg) - if trace != nil && trace.TLSHandshakeDone != nil { - trace.TLSHandshakeDone(tlsConn.ConnectionState(), err) - } - - if err != nil { - return nil, nil, err - } - } - - conn := newConn(netConn, false, d.ReadBufferSize, d.WriteBufferSize, d.WriteBufferPool, nil, nil) - - if err := req.Write(netConn); err != nil { - return nil, nil, err - } - - if trace != nil && trace.GotFirstResponseByte != nil { - if peek, err := conn.br.Peek(1); err == nil && len(peek) == 1 { - trace.GotFirstResponseByte() - } - } - - resp, err := http.ReadResponse(conn.br, req) - if err != nil { - if d.TLSClientConfig != nil { - for _, proto := range d.TLSClientConfig.NextProtos { - if proto != "http/1.1" { - return nil, nil, fmt.Errorf( - "websocket: protocol %q was given but is not supported;"+ - "sharing tls.Config with net/http Transport can cause this error: %w", - proto, err, - ) - } - } - } - return nil, nil, err - } - - if d.Jar != nil { - if rc := resp.Cookies(); len(rc) > 0 { - d.Jar.SetCookies(u, rc) - } - } - - if resp.StatusCode != 101 || - !tokenListContainsValue(resp.Header, "Upgrade", "websocket") || - !tokenListContainsValue(resp.Header, "Connection", "upgrade") || - resp.Header.Get("Sec-Websocket-Accept") != computeAcceptKey(challengeKey) { - // Before closing the network connection on return from this - // function, slurp up some of the response to aid application - // debugging. - buf := make([]byte, 1024) - n, _ := io.ReadFull(resp.Body, buf) - resp.Body = io.NopCloser(bytes.NewReader(buf[:n])) - return nil, resp, ErrBadHandshake - } - - for _, ext := range parseExtensions(resp.Header) { - if ext[""] != "permessage-deflate" { - continue - } - _, snct := ext["server_no_context_takeover"] - _, cnct := ext["client_no_context_takeover"] - if !snct || !cnct { - return nil, resp, errInvalidCompression - } - conn.newCompressionWriter = compressNoContextTakeover - conn.newDecompressionReader = decompressNoContextTakeover - break - } - - resp.Body = io.NopCloser(bytes.NewReader([]byte{})) - conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") - - if err := netConn.SetDeadline(time.Time{}); err != nil { - return nil, resp, err - } - - // Success! Set netConn to nil to stop the deferred function above from - // closing the network connection. - netConn = nil - - return conn, resp, nil -} - -// Returns the dial function to establish the connection to either the backend -// server or the proxy (if it exists). If the dialed entity is HTTPS, then the -// returned dial function *also* performs the TLS handshake to the dialed entity. -// NOTE: If a proxy exists, it is possible for a second TLS handshake to be -// necessary over the established connection. -func (d *Dialer) netDialFn(ctx context.Context, proxyURL *url.URL, backendURL *url.URL) (netDialerFunc, error) { - var netDial netDialerFunc - if proxyURL != nil { - netDial = d.netDialFromURL(proxyURL) - } else { - netDial = d.netDialFromURL(backendURL) - } - // If needed, wrap the dial function to set the connection deadline. - if deadline, ok := ctx.Deadline(); ok { - netDial = netDialWithDeadline(netDial, deadline) - } - // Proxy dialing is wrapped to implement CONNECT method and possibly proxy auth. - if proxyURL != nil { - return proxyFromURL(proxyURL, netDial) - } - return netDial, nil -} - -// Returns function to create the connection depending on the Dialer's -// custom dialing functions and the passed URL of entity connecting to. -func (d *Dialer) netDialFromURL(u *url.URL) netDialerFunc { - var netDial netDialerFunc - switch { - case d.NetDialContext != nil: - netDial = d.NetDialContext - case d.NetDial != nil: - netDial = func(ctx context.Context, net, addr string) (net.Conn, error) { - return d.NetDial(net, addr) - } - default: - netDial = (&net.Dialer{}).DialContext - } - // If dialed entity is HTTPS, then either use custom TLS dialing function (if exists) - // or wrap the previously computed "netDial" to use TLS config for handshake. - if u.Scheme == "https" { - if d.NetDialTLSContext != nil { - netDial = d.NetDialTLSContext - } else { - netDial = netDialWithTLSHandshake(netDial, d.TLSClientConfig, u) - } - } - return netDial -} - -// Returns wrapped "netDial" function, performing TLS handshake after connecting. -func netDialWithTLSHandshake(netDial netDialerFunc, tlsConfig *tls.Config, u *url.URL) netDialerFunc { - return func(ctx context.Context, unused, addr string) (net.Conn, error) { - hostPort, hostNoPort := hostPortNoPort(u) - trace := httptrace.ContextClientTrace(ctx) - if trace != nil && trace.GetConn != nil { - trace.GetConn(hostPort) - } - // Creates TCP connection to addr using passed "netDial" function. - conn, err := netDial(ctx, "tcp", addr) - if err != nil { - return nil, err - } - cfg := cloneTLSConfig(tlsConfig) - if cfg.ServerName == "" { - cfg.ServerName = hostNoPort - } - tlsConn := tls.Client(conn, cfg) - // Do the TLS handshake using TLSConfig over the wrapped connection. - if trace != nil && trace.TLSHandshakeStart != nil { - trace.TLSHandshakeStart() - } - err = doHandshake(ctx, tlsConn, cfg) - if trace != nil && trace.TLSHandshakeDone != nil { - trace.TLSHandshakeDone(tlsConn.ConnectionState(), err) - } - if err != nil { - tlsConn.Close() - return nil, err - } - return tlsConn, nil - } -} - -// Returns wrapped "netDial" function, setting passed deadline. -func netDialWithDeadline(netDial netDialerFunc, deadline time.Time) netDialerFunc { - return func(ctx context.Context, network, addr string) (net.Conn, error) { - c, err := netDial(ctx, network, addr) - if err != nil { - return nil, err - } - err = c.SetDeadline(deadline) - if err != nil { - c.Close() - return nil, err - } - return c, nil - } -} - -func cloneTLSConfig(cfg *tls.Config) *tls.Config { - if cfg == nil { - return &tls.Config{} - } - return cfg.Clone() -} - -func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error { - if err := tlsConn.HandshakeContext(ctx); err != nil { - return err - } - if !cfg.InsecureSkipVerify { - if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go deleted file mode 100644 index fe1079edbc..0000000000 --- a/vendor/github.com/gorilla/websocket/compression.go +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright 2017 The Gorilla WebSocket 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 websocket - -import ( - "compress/flate" - "errors" - "io" - "strings" - "sync" -) - -const ( - minCompressionLevel = -2 // flate.HuffmanOnly not defined in Go < 1.6 - maxCompressionLevel = flate.BestCompression - defaultCompressionLevel = 1 -) - -var ( - flateWriterPools [maxCompressionLevel - minCompressionLevel + 1]sync.Pool - flateReaderPool = sync.Pool{New: func() interface{} { - return flate.NewReader(nil) - }} -) - -func decompressNoContextTakeover(r io.Reader) io.ReadCloser { - const tail = - // Add four bytes as specified in RFC - "\x00\x00\xff\xff" + - // Add final block to squelch unexpected EOF error from flate reader. - "\x01\x00\x00\xff\xff" - - fr, _ := flateReaderPool.Get().(io.ReadCloser) - mr := io.MultiReader(r, strings.NewReader(tail)) - if err := fr.(flate.Resetter).Reset(mr, nil); err != nil { - // Reset never fails, but handle error in case that changes. - fr = flate.NewReader(mr) - } - return &flateReadWrapper{fr} -} - -func isValidCompressionLevel(level int) bool { - return minCompressionLevel <= level && level <= maxCompressionLevel -} - -func compressNoContextTakeover(w io.WriteCloser, level int) io.WriteCloser { - p := &flateWriterPools[level-minCompressionLevel] - tw := &truncWriter{w: w} - fw, _ := p.Get().(*flate.Writer) - if fw == nil { - fw, _ = flate.NewWriter(tw, level) - } else { - fw.Reset(tw) - } - return &flateWriteWrapper{fw: fw, tw: tw, p: p} -} - -// truncWriter is an io.Writer that writes all but the last four bytes of the -// stream to another io.Writer. -type truncWriter struct { - w io.WriteCloser - n int - p [4]byte -} - -func (w *truncWriter) Write(p []byte) (int, error) { - n := 0 - - // fill buffer first for simplicity. - if w.n < len(w.p) { - n = copy(w.p[w.n:], p) - p = p[n:] - w.n += n - if len(p) == 0 { - return n, nil - } - } - - m := len(p) - if m > len(w.p) { - m = len(w.p) - } - - if nn, err := w.w.Write(w.p[:m]); err != nil { - return n + nn, err - } - - copy(w.p[:], w.p[m:]) - copy(w.p[len(w.p)-m:], p[len(p)-m:]) - nn, err := w.w.Write(p[:len(p)-m]) - return n + nn, err -} - -type flateWriteWrapper struct { - fw *flate.Writer - tw *truncWriter - p *sync.Pool -} - -func (w *flateWriteWrapper) Write(p []byte) (int, error) { - if w.fw == nil { - return 0, errWriteClosed - } - return w.fw.Write(p) -} - -func (w *flateWriteWrapper) Close() error { - if w.fw == nil { - return errWriteClosed - } - err1 := w.fw.Flush() - w.p.Put(w.fw) - w.fw = nil - if w.tw.p != [4]byte{0, 0, 0xff, 0xff} { - return errors.New("websocket: internal error, unexpected bytes at end of flate stream") - } - err2 := w.tw.w.Close() - if err1 != nil { - return err1 - } - return err2 -} - -type flateReadWrapper struct { - fr io.ReadCloser -} - -func (r *flateReadWrapper) Read(p []byte) (int, error) { - if r.fr == nil { - return 0, io.ErrClosedPipe - } - n, err := r.fr.Read(p) - if err == io.EOF { - // Preemptively place the reader back in the pool. This helps with - // scenarios where the application does not call NextReader() soon after - // this final read. - r.Close() - } - return n, err -} - -func (r *flateReadWrapper) Close() error { - if r.fr == nil { - return io.ErrClosedPipe - } - err := r.fr.Close() - flateReaderPool.Put(r.fr) - r.fr = nil - return err -} diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go deleted file mode 100644 index 9562ffd497..0000000000 --- a/vendor/github.com/gorilla/websocket/conn.go +++ /dev/null @@ -1,1246 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "bufio" - "crypto/rand" - "encoding/binary" - "errors" - "io" - "net" - "strconv" - "strings" - "sync" - "time" - "unicode/utf8" -) - -const ( - // Frame header byte 0 bits from Section 5.2 of RFC 6455 - finalBit = 1 << 7 - rsv1Bit = 1 << 6 - rsv2Bit = 1 << 5 - rsv3Bit = 1 << 4 - - // Frame header byte 1 bits from Section 5.2 of RFC 6455 - maskBit = 1 << 7 - - maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask - maxControlFramePayloadSize = 125 - - writeWait = time.Second - - defaultReadBufferSize = 4096 - defaultWriteBufferSize = 4096 - - continuationFrame = 0 - noFrame = -1 -) - -// Close codes defined in RFC 6455, section 11.7. -const ( - CloseNormalClosure = 1000 - CloseGoingAway = 1001 - CloseProtocolError = 1002 - CloseUnsupportedData = 1003 - CloseNoStatusReceived = 1005 - CloseAbnormalClosure = 1006 - CloseInvalidFramePayloadData = 1007 - ClosePolicyViolation = 1008 - CloseMessageTooBig = 1009 - CloseMandatoryExtension = 1010 - CloseInternalServerErr = 1011 - CloseServiceRestart = 1012 - CloseTryAgainLater = 1013 - CloseTLSHandshake = 1015 -) - -// The message types are defined in RFC 6455, section 11.8. -const ( - // TextMessage denotes a text data message. The text message payload is - // interpreted as UTF-8 encoded text data. - TextMessage = 1 - - // BinaryMessage denotes a binary data message. - BinaryMessage = 2 - - // CloseMessage denotes a close control message. The optional message - // payload contains a numeric code and text. Use the FormatCloseMessage - // function to format a close message payload. - CloseMessage = 8 - - // PingMessage denotes a ping control message. The optional message payload - // is UTF-8 encoded text. - PingMessage = 9 - - // PongMessage denotes a pong control message. The optional message payload - // is UTF-8 encoded text. - PongMessage = 10 -) - -// ErrCloseSent is returned when the application writes a message to the -// connection after sending a close message. -var ErrCloseSent = errors.New("websocket: close sent") - -// ErrReadLimit is returned when reading a message that is larger than the -// read limit set for the connection. -var ErrReadLimit = errors.New("websocket: read limit exceeded") - -// netError satisfies the net Error interface. -type netError struct { - msg string - temporary bool - timeout bool -} - -func (e *netError) Error() string { return e.msg } -func (e *netError) Temporary() bool { return e.temporary } -func (e *netError) Timeout() bool { return e.timeout } - -// CloseError represents a close message. -type CloseError struct { - // Code is defined in RFC 6455, section 11.7. - Code int - - // Text is the optional text payload. - Text string -} - -func (e *CloseError) Error() string { - s := []byte("websocket: close ") - s = strconv.AppendInt(s, int64(e.Code), 10) - switch e.Code { - case CloseNormalClosure: - s = append(s, " (normal)"...) - case CloseGoingAway: - s = append(s, " (going away)"...) - case CloseProtocolError: - s = append(s, " (protocol error)"...) - case CloseUnsupportedData: - s = append(s, " (unsupported data)"...) - case CloseNoStatusReceived: - s = append(s, " (no status)"...) - case CloseAbnormalClosure: - s = append(s, " (abnormal closure)"...) - case CloseInvalidFramePayloadData: - s = append(s, " (invalid payload data)"...) - case ClosePolicyViolation: - s = append(s, " (policy violation)"...) - case CloseMessageTooBig: - s = append(s, " (message too big)"...) - case CloseMandatoryExtension: - s = append(s, " (mandatory extension missing)"...) - case CloseInternalServerErr: - s = append(s, " (internal server error)"...) - case CloseTLSHandshake: - s = append(s, " (TLS handshake error)"...) - } - if e.Text != "" { - s = append(s, ": "...) - s = append(s, e.Text...) - } - return string(s) -} - -// IsCloseError returns boolean indicating whether the error is a *CloseError -// with one of the specified codes. -func IsCloseError(err error, codes ...int) bool { - if e, ok := err.(*CloseError); ok { - for _, code := range codes { - if e.Code == code { - return true - } - } - } - return false -} - -// IsUnexpectedCloseError returns boolean indicating whether the error is a -// *CloseError with a code not in the list of expected codes. -func IsUnexpectedCloseError(err error, expectedCodes ...int) bool { - if e, ok := err.(*CloseError); ok { - for _, code := range expectedCodes { - if e.Code == code { - return false - } - } - return true - } - return false -} - -var ( - errWriteTimeout = &netError{msg: "websocket: write timeout", timeout: true, temporary: true} - errUnexpectedEOF = &CloseError{Code: CloseAbnormalClosure, Text: io.ErrUnexpectedEOF.Error()} - errBadWriteOpCode = errors.New("websocket: bad write message type") - errWriteClosed = errors.New("websocket: write closed") - errInvalidControlFrame = errors.New("websocket: invalid control frame") -) - -// maskRand is an io.Reader for generating mask bytes. The reader is initialized -// to crypto/rand Reader. Tests swap the reader to a math/rand reader for -// reproducible results. -var maskRand = rand.Reader - -// newMaskKey returns a new 32 bit value for masking client frames. -func newMaskKey() [4]byte { - var k [4]byte - _, _ = io.ReadFull(maskRand, k[:]) - return k -} - -func isControl(frameType int) bool { - return frameType == CloseMessage || frameType == PingMessage || frameType == PongMessage -} - -func isData(frameType int) bool { - return frameType == TextMessage || frameType == BinaryMessage -} - -var validReceivedCloseCodes = map[int]bool{ - // see http://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number - - CloseNormalClosure: true, - CloseGoingAway: true, - CloseProtocolError: true, - CloseUnsupportedData: true, - CloseNoStatusReceived: false, - CloseAbnormalClosure: false, - CloseInvalidFramePayloadData: true, - ClosePolicyViolation: true, - CloseMessageTooBig: true, - CloseMandatoryExtension: true, - CloseInternalServerErr: true, - CloseServiceRestart: true, - CloseTryAgainLater: true, - CloseTLSHandshake: false, -} - -func isValidReceivedCloseCode(code int) bool { - return validReceivedCloseCodes[code] || (code >= 3000 && code <= 4999) -} - -// BufferPool represents a pool of buffers. The *sync.Pool type satisfies this -// interface. The type of the value stored in a pool is not specified. -type BufferPool interface { - // Get gets a value from the pool or returns nil if the pool is empty. - Get() interface{} - // Put adds a value to the pool. - Put(interface{}) -} - -// writePoolData is the type added to the write buffer pool. This wrapper is -// used to prevent applications from peeking at and depending on the values -// added to the pool. -type writePoolData struct{ buf []byte } - -// The Conn type represents a WebSocket connection. -type Conn struct { - conn net.Conn - isServer bool - subprotocol string - - // Write fields - mu chan struct{} // used as mutex to protect write to conn - writeBuf []byte // frame is constructed in this buffer. - writePool BufferPool - writeBufSize int - writeDeadline time.Time - writer io.WriteCloser // the current writer returned to the application - isWriting bool // for best-effort concurrent write detection - - writeErrMu sync.Mutex - writeErr error - - enableWriteCompression bool - compressionLevel int - newCompressionWriter func(io.WriteCloser, int) io.WriteCloser - - // Read fields - reader io.ReadCloser // the current reader returned to the application - readErr error - br *bufio.Reader - // bytes remaining in current frame. - // set setReadRemaining to safely update this value and prevent overflow - readRemaining int64 - readFinal bool // true the current message has more frames. - readLength int64 // Message size. - readLimit int64 // Maximum message size. - readMaskPos int - readMaskKey [4]byte - handlePong func(string) error - handlePing func(string) error - handleClose func(int, string) error - readErrCount int - messageReader *messageReader // the current low-level reader - - readDecompress bool // whether last read frame had RSV1 set - newDecompressionReader func(io.Reader) io.ReadCloser -} - -func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int, writeBufferPool BufferPool, br *bufio.Reader, writeBuf []byte) *Conn { - - if br == nil { - if readBufferSize == 0 { - readBufferSize = defaultReadBufferSize - } else if readBufferSize < maxControlFramePayloadSize { - // must be large enough for control frame - readBufferSize = maxControlFramePayloadSize - } - br = bufio.NewReaderSize(conn, readBufferSize) - } - - if writeBufferSize <= 0 { - writeBufferSize = defaultWriteBufferSize - } - writeBufferSize += maxFrameHeaderSize - - if writeBuf == nil && writeBufferPool == nil { - writeBuf = make([]byte, writeBufferSize) - } - - mu := make(chan struct{}, 1) - mu <- struct{}{} - c := &Conn{ - isServer: isServer, - br: br, - conn: conn, - mu: mu, - readFinal: true, - writeBuf: writeBuf, - writePool: writeBufferPool, - writeBufSize: writeBufferSize, - enableWriteCompression: true, - compressionLevel: defaultCompressionLevel, - } - c.SetCloseHandler(nil) - c.SetPingHandler(nil) - c.SetPongHandler(nil) - return c -} - -// setReadRemaining tracks the number of bytes remaining on the connection. If n -// overflows, an ErrReadLimit is returned. -func (c *Conn) setReadRemaining(n int64) error { - if n < 0 { - return ErrReadLimit - } - - c.readRemaining = n - return nil -} - -// Subprotocol returns the negotiated protocol for the connection. -func (c *Conn) Subprotocol() string { - return c.subprotocol -} - -// Close closes the underlying network connection without sending or waiting -// for a close message. -func (c *Conn) Close() error { - return c.conn.Close() -} - -// LocalAddr returns the local network address. -func (c *Conn) LocalAddr() net.Addr { - return c.conn.LocalAddr() -} - -// RemoteAddr returns the remote network address. -func (c *Conn) RemoteAddr() net.Addr { - return c.conn.RemoteAddr() -} - -// Write methods - -func (c *Conn) writeFatal(err error) error { - c.writeErrMu.Lock() - if c.writeErr == nil { - c.writeErr = err - } - c.writeErrMu.Unlock() - return err -} - -func (c *Conn) read(n int) ([]byte, error) { - p, err := c.br.Peek(n) - if err == io.EOF { - err = errUnexpectedEOF - } - // Discard is guaranteed to succeed because the number of bytes to discard - // is less than or equal to the number of bytes buffered. - _, _ = c.br.Discard(len(p)) - return p, err -} - -func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error { - <-c.mu - defer func() { c.mu <- struct{}{} }() - - c.writeErrMu.Lock() - err := c.writeErr - c.writeErrMu.Unlock() - if err != nil { - return err - } - - if err := c.conn.SetWriteDeadline(deadline); err != nil { - return c.writeFatal(err) - } - if len(buf1) == 0 { - _, err = c.conn.Write(buf0) - } else { - err = c.writeBufs(buf0, buf1) - } - if err != nil { - return c.writeFatal(err) - } - if frameType == CloseMessage { - _ = c.writeFatal(ErrCloseSent) - } - return nil -} - -func (c *Conn) writeBufs(bufs ...[]byte) error { - b := net.Buffers(bufs) - _, err := b.WriteTo(c.conn) - return err -} - -// WriteControl writes a control message with the given deadline. The allowed -// message types are CloseMessage, PingMessage and PongMessage. -func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error { - if !isControl(messageType) { - return errBadWriteOpCode - } - if len(data) > maxControlFramePayloadSize { - return errInvalidControlFrame - } - - b0 := byte(messageType) | finalBit - b1 := byte(len(data)) - if !c.isServer { - b1 |= maskBit - } - - buf := make([]byte, 0, maxFrameHeaderSize+maxControlFramePayloadSize) - buf = append(buf, b0, b1) - - if c.isServer { - buf = append(buf, data...) - } else { - key := newMaskKey() - buf = append(buf, key[:]...) - buf = append(buf, data...) - maskBytes(key, 0, buf[6:]) - } - - if deadline.IsZero() { - // No timeout for zero time. - <-c.mu - } else { - d := time.Until(deadline) - if d < 0 { - return errWriteTimeout - } - select { - case <-c.mu: - default: - timer := time.NewTimer(d) - select { - case <-c.mu: - timer.Stop() - case <-timer.C: - return errWriteTimeout - } - } - } - - defer func() { c.mu <- struct{}{} }() - - c.writeErrMu.Lock() - err := c.writeErr - c.writeErrMu.Unlock() - if err != nil { - return err - } - - if err := c.conn.SetWriteDeadline(deadline); err != nil { - return c.writeFatal(err) - } - if _, err = c.conn.Write(buf); err != nil { - return c.writeFatal(err) - } - if messageType == CloseMessage { - _ = c.writeFatal(ErrCloseSent) - } - return err -} - -// beginMessage prepares a connection and message writer for a new message. -func (c *Conn) beginMessage(mw *messageWriter, messageType int) error { - // Close previous writer if not already closed by the application. It's - // probably better to return an error in this situation, but we cannot - // change this without breaking existing applications. - if c.writer != nil { - c.writer.Close() - c.writer = nil - } - - if !isControl(messageType) && !isData(messageType) { - return errBadWriteOpCode - } - - c.writeErrMu.Lock() - err := c.writeErr - c.writeErrMu.Unlock() - if err != nil { - return err - } - - mw.c = c - mw.frameType = messageType - mw.pos = maxFrameHeaderSize - - if c.writeBuf == nil { - wpd, ok := c.writePool.Get().(writePoolData) - if ok { - c.writeBuf = wpd.buf - } else { - c.writeBuf = make([]byte, c.writeBufSize) - } - } - return nil -} - -// NextWriter returns a writer for the next message to send. The writer's Close -// method flushes the complete message to the network. -// -// There can be at most one open writer on a connection. NextWriter closes the -// previous writer if the application has not already done so. -// -// All message types (TextMessage, BinaryMessage, CloseMessage, PingMessage and -// PongMessage) are supported. -func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) { - var mw messageWriter - if err := c.beginMessage(&mw, messageType); err != nil { - return nil, err - } - c.writer = &mw - if c.newCompressionWriter != nil && c.enableWriteCompression && isData(messageType) { - w := c.newCompressionWriter(c.writer, c.compressionLevel) - mw.compress = true - c.writer = w - } - return c.writer, nil -} - -type messageWriter struct { - c *Conn - compress bool // whether next call to flushFrame should set RSV1 - pos int // end of data in writeBuf. - frameType int // type of the current frame. - err error -} - -func (w *messageWriter) endMessage(err error) error { - if w.err != nil { - return err - } - c := w.c - w.err = err - c.writer = nil - if c.writePool != nil { - c.writePool.Put(writePoolData{buf: c.writeBuf}) - c.writeBuf = nil - } - return err -} - -// flushFrame writes buffered data and extra as a frame to the network. The -// final argument indicates that this is the last frame in the message. -func (w *messageWriter) flushFrame(final bool, extra []byte) error { - c := w.c - length := w.pos - maxFrameHeaderSize + len(extra) - - // Check for invalid control frames. - if isControl(w.frameType) && - (!final || length > maxControlFramePayloadSize) { - return w.endMessage(errInvalidControlFrame) - } - - b0 := byte(w.frameType) - if final { - b0 |= finalBit - } - if w.compress { - b0 |= rsv1Bit - } - w.compress = false - - b1 := byte(0) - if !c.isServer { - b1 |= maskBit - } - - // Assume that the frame starts at beginning of c.writeBuf. - framePos := 0 - if c.isServer { - // Adjust up if mask not included in the header. - framePos = 4 - } - - switch { - case length >= 65536: - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 127 - binary.BigEndian.PutUint64(c.writeBuf[framePos+2:], uint64(length)) - case length > 125: - framePos += 6 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | 126 - binary.BigEndian.PutUint16(c.writeBuf[framePos+2:], uint16(length)) - default: - framePos += 8 - c.writeBuf[framePos] = b0 - c.writeBuf[framePos+1] = b1 | byte(length) - } - - if !c.isServer { - key := newMaskKey() - copy(c.writeBuf[maxFrameHeaderSize-4:], key[:]) - maskBytes(key, 0, c.writeBuf[maxFrameHeaderSize:w.pos]) - if len(extra) > 0 { - return w.endMessage(c.writeFatal(errors.New("websocket: internal error, extra used in client mode"))) - } - } - - // Write the buffers to the connection with best-effort detection of - // concurrent writes. See the concurrency section in the package - // documentation for more info. - - if c.isWriting { - panic("concurrent write to websocket connection") - } - c.isWriting = true - - err := c.write(w.frameType, c.writeDeadline, c.writeBuf[framePos:w.pos], extra) - - if !c.isWriting { - panic("concurrent write to websocket connection") - } - c.isWriting = false - - if err != nil { - return w.endMessage(err) - } - - if final { - _ = w.endMessage(errWriteClosed) - return nil - } - - // Setup for next frame. - w.pos = maxFrameHeaderSize - w.frameType = continuationFrame - return nil -} - -func (w *messageWriter) ncopy(max int) (int, error) { - n := len(w.c.writeBuf) - w.pos - if n <= 0 { - if err := w.flushFrame(false, nil); err != nil { - return 0, err - } - n = len(w.c.writeBuf) - w.pos - } - if n > max { - n = max - } - return n, nil -} - -func (w *messageWriter) Write(p []byte) (int, error) { - if w.err != nil { - return 0, w.err - } - - if len(p) > 2*len(w.c.writeBuf) && w.c.isServer { - // Don't buffer large messages. - err := w.flushFrame(false, p) - if err != nil { - return 0, err - } - return len(p), nil - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.pos:], p[:n]) - w.pos += n - p = p[n:] - } - return nn, nil -} - -func (w *messageWriter) WriteString(p string) (int, error) { - if w.err != nil { - return 0, w.err - } - - nn := len(p) - for len(p) > 0 { - n, err := w.ncopy(len(p)) - if err != nil { - return 0, err - } - copy(w.c.writeBuf[w.pos:], p[:n]) - w.pos += n - p = p[n:] - } - return nn, nil -} - -func (w *messageWriter) ReadFrom(r io.Reader) (nn int64, err error) { - if w.err != nil { - return 0, w.err - } - for { - if w.pos == len(w.c.writeBuf) { - err = w.flushFrame(false, nil) - if err != nil { - break - } - } - var n int - n, err = r.Read(w.c.writeBuf[w.pos:]) - w.pos += n - nn += int64(n) - if err != nil { - if err == io.EOF { - err = nil - } - break - } - } - return nn, err -} - -func (w *messageWriter) Close() error { - if w.err != nil { - return w.err - } - return w.flushFrame(true, nil) -} - -// WritePreparedMessage writes prepared message into connection. -func (c *Conn) WritePreparedMessage(pm *PreparedMessage) error { - frameType, frameData, err := pm.frame(prepareKey{ - isServer: c.isServer, - compress: c.newCompressionWriter != nil && c.enableWriteCompression && isData(pm.messageType), - compressionLevel: c.compressionLevel, - }) - if err != nil { - return err - } - if c.isWriting { - panic("concurrent write to websocket connection") - } - c.isWriting = true - err = c.write(frameType, c.writeDeadline, frameData, nil) - if !c.isWriting { - panic("concurrent write to websocket connection") - } - c.isWriting = false - return err -} - -// WriteMessage is a helper method for getting a writer using NextWriter, -// writing the message and closing the writer. -func (c *Conn) WriteMessage(messageType int, data []byte) error { - - if c.isServer && (c.newCompressionWriter == nil || !c.enableWriteCompression) { - // Fast path with no allocations and single frame. - - var mw messageWriter - if err := c.beginMessage(&mw, messageType); err != nil { - return err - } - n := copy(c.writeBuf[mw.pos:], data) - mw.pos += n - data = data[n:] - return mw.flushFrame(true, data) - } - - w, err := c.NextWriter(messageType) - if err != nil { - return err - } - if _, err = w.Write(data); err != nil { - return err - } - return w.Close() -} - -// SetWriteDeadline sets the write deadline on the underlying network -// connection. After a write has timed out, the websocket state is corrupt and -// all future writes will return an error. A zero value for t means writes will -// not time out. -func (c *Conn) SetWriteDeadline(t time.Time) error { - c.writeDeadline = t - return nil -} - -// Read methods - -func (c *Conn) advanceFrame() (int, error) { - // 1. Skip remainder of previous frame. - - if c.readRemaining > 0 { - if _, err := io.CopyN(io.Discard, c.br, c.readRemaining); err != nil { - return noFrame, err - } - } - - // 2. Read and parse first two bytes of frame header. - // To aid debugging, collect and report all errors in the first two bytes - // of the header. - - var errors []string - - p, err := c.read(2) - if err != nil { - return noFrame, err - } - - frameType := int(p[0] & 0xf) - final := p[0]&finalBit != 0 - rsv1 := p[0]&rsv1Bit != 0 - rsv2 := p[0]&rsv2Bit != 0 - rsv3 := p[0]&rsv3Bit != 0 - mask := p[1]&maskBit != 0 - _ = c.setReadRemaining(int64(p[1] & 0x7f)) // will not fail because argument is >= 0 - - c.readDecompress = false - if rsv1 { - if c.newDecompressionReader != nil { - c.readDecompress = true - } else { - errors = append(errors, "RSV1 set") - } - } - - if rsv2 { - errors = append(errors, "RSV2 set") - } - - if rsv3 { - errors = append(errors, "RSV3 set") - } - - switch frameType { - case CloseMessage, PingMessage, PongMessage: - if c.readRemaining > maxControlFramePayloadSize { - errors = append(errors, "len > 125 for control") - } - if !final { - errors = append(errors, "FIN not set on control") - } - case TextMessage, BinaryMessage: - if !c.readFinal { - errors = append(errors, "data before FIN") - } - c.readFinal = final - case continuationFrame: - if c.readFinal { - errors = append(errors, "continuation after FIN") - } - c.readFinal = final - default: - errors = append(errors, "bad opcode "+strconv.Itoa(frameType)) - } - - if mask != c.isServer { - errors = append(errors, "bad MASK") - } - - if len(errors) > 0 { - return noFrame, c.handleProtocolError(strings.Join(errors, ", ")) - } - - // 3. Read and parse frame length as per - // https://tools.ietf.org/html/rfc6455#section-5.2 - // - // The length of the "Payload data", in bytes: if 0-125, that is the payload - // length. - // - If 126, the following 2 bytes interpreted as a 16-bit unsigned - // integer are the payload length. - // - If 127, the following 8 bytes interpreted as - // a 64-bit unsigned integer (the most significant bit MUST be 0) are the - // payload length. Multibyte length quantities are expressed in network byte - // order. - - switch c.readRemaining { - case 126: - p, err := c.read(2) - if err != nil { - return noFrame, err - } - - if err := c.setReadRemaining(int64(binary.BigEndian.Uint16(p))); err != nil { - return noFrame, err - } - case 127: - p, err := c.read(8) - if err != nil { - return noFrame, err - } - - if err := c.setReadRemaining(int64(binary.BigEndian.Uint64(p))); err != nil { - return noFrame, err - } - } - - // 4. Handle frame masking. - - if mask { - c.readMaskPos = 0 - p, err := c.read(len(c.readMaskKey)) - if err != nil { - return noFrame, err - } - copy(c.readMaskKey[:], p) - } - - // 5. For text and binary messages, enforce read limit and return. - - if frameType == continuationFrame || frameType == TextMessage || frameType == BinaryMessage { - - c.readLength += c.readRemaining - // Don't allow readLength to overflow in the presence of a large readRemaining - // counter. - if c.readLength < 0 { - return noFrame, ErrReadLimit - } - - if c.readLimit > 0 && c.readLength > c.readLimit { - // Make a best effort to send a close message describing the problem. - _ = c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) - return noFrame, ErrReadLimit - } - - return frameType, nil - } - - // 6. Read control frame payload. - - var payload []byte - if c.readRemaining > 0 { - payload, err = c.read(int(c.readRemaining)) - _ = c.setReadRemaining(0) // will not fail because argument is >= 0 - if err != nil { - return noFrame, err - } - if c.isServer { - maskBytes(c.readMaskKey, 0, payload) - } - } - - // 7. Process control frame payload. - - switch frameType { - case PongMessage: - if err := c.handlePong(string(payload)); err != nil { - return noFrame, err - } - case PingMessage: - if err := c.handlePing(string(payload)); err != nil { - return noFrame, err - } - case CloseMessage: - closeCode := CloseNoStatusReceived - closeText := "" - if len(payload) >= 2 { - closeCode = int(binary.BigEndian.Uint16(payload)) - if !isValidReceivedCloseCode(closeCode) { - return noFrame, c.handleProtocolError("bad close code " + strconv.Itoa(closeCode)) - } - closeText = string(payload[2:]) - if !utf8.ValidString(closeText) { - return noFrame, c.handleProtocolError("invalid utf8 payload in close frame") - } - } - if err := c.handleClose(closeCode, closeText); err != nil { - return noFrame, err - } - return noFrame, &CloseError{Code: closeCode, Text: closeText} - } - - return frameType, nil -} - -func (c *Conn) handleProtocolError(message string) error { - data := FormatCloseMessage(CloseProtocolError, message) - if len(data) > maxControlFramePayloadSize { - data = data[:maxControlFramePayloadSize] - } - // Make a best effor to send a close message describing the problem. - _ = c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)) - return errors.New("websocket: " + message) -} - -// NextReader returns the next data message received from the peer. The -// returned messageType is either TextMessage or BinaryMessage. -// -// There can be at most one open reader on a connection. NextReader discards -// the previous message if the application has not already consumed it. -// -// Applications must break out of the application's read loop when this method -// returns a non-nil error value. Errors returned from this method are -// permanent. Once this method returns a non-nil error, all subsequent calls to -// this method return the same error. -func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { - // Close previous reader, only relevant for decompression. - if c.reader != nil { - c.reader.Close() - c.reader = nil - } - - c.messageReader = nil - c.readLength = 0 - - for c.readErr == nil { - frameType, err := c.advanceFrame() - if err != nil { - c.readErr = err - break - } - - if frameType == TextMessage || frameType == BinaryMessage { - c.messageReader = &messageReader{c} - c.reader = c.messageReader - if c.readDecompress { - c.reader = c.newDecompressionReader(c.reader) - } - return frameType, c.reader, nil - } - } - - // Applications that do handle the error returned from this method spin in - // tight loop on connection failure. To help application developers detect - // this error, panic on repeated reads to the failed connection. - c.readErrCount++ - if c.readErrCount >= 1000 { - panic("repeated read on failed websocket connection") - } - - return noFrame, nil, c.readErr -} - -type messageReader struct{ c *Conn } - -func (r *messageReader) Read(b []byte) (int, error) { - c := r.c - if c.messageReader != r { - return 0, io.EOF - } - - for c.readErr == nil { - - if c.readRemaining > 0 { - if int64(len(b)) > c.readRemaining { - b = b[:c.readRemaining] - } - n, err := c.br.Read(b) - c.readErr = err - if c.isServer { - c.readMaskPos = maskBytes(c.readMaskKey, c.readMaskPos, b[:n]) - } - rem := c.readRemaining - rem -= int64(n) - _ = c.setReadRemaining(rem) // rem is guaranteed to be >= 0 - if c.readRemaining > 0 && c.readErr == io.EOF { - c.readErr = errUnexpectedEOF - } - return n, c.readErr - } - - if c.readFinal { - c.messageReader = nil - return 0, io.EOF - } - - frameType, err := c.advanceFrame() - switch { - case err != nil: - c.readErr = err - case frameType == TextMessage || frameType == BinaryMessage: - c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader") - } - } - - err := c.readErr - if err == io.EOF && c.messageReader == r { - err = errUnexpectedEOF - } - return 0, err -} - -func (r *messageReader) Close() error { - return nil -} - -// ReadMessage is a helper method for getting a reader using NextReader and -// reading from that reader to a buffer. -func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { - var r io.Reader - messageType, r, err = c.NextReader() - if err != nil { - return messageType, nil, err - } - p, err = io.ReadAll(r) - return messageType, p, err -} - -// SetReadDeadline sets the read deadline on the underlying network connection. -// After a read has timed out, the websocket connection state is corrupt and -// all future reads will return an error. A zero value for t means reads will -// not time out. -func (c *Conn) SetReadDeadline(t time.Time) error { - return c.conn.SetReadDeadline(t) -} - -// SetReadLimit sets the maximum size in bytes for a message read from the peer. If a -// message exceeds the limit, the connection sends a close message to the peer -// and returns ErrReadLimit to the application. -func (c *Conn) SetReadLimit(limit int64) { - c.readLimit = limit -} - -// CloseHandler returns the current close handler -func (c *Conn) CloseHandler() func(code int, text string) error { - return c.handleClose -} - -// SetCloseHandler sets the handler for close messages received from the peer. -// The code argument to h is the received close code or CloseNoStatusReceived -// if the close message is empty. The default close handler sends a close -// message back to the peer. -// -// The handler function is called from the NextReader, ReadMessage and message -// reader Read methods. The application must read the connection to process -// close messages as described in the section on Control Messages above. -// -// The connection read methods return a CloseError when a close message is -// received. Most applications should handle close messages as part of their -// normal error handling. Applications should only set a close handler when the -// application must perform some action before sending a close message back to -// the peer. -func (c *Conn) SetCloseHandler(h func(code int, text string) error) { - if h == nil { - h = func(code int, text string) error { - message := FormatCloseMessage(code, "") - // Make a best effor to send the close message. - _ = c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)) - return nil - } - } - c.handleClose = h -} - -// PingHandler returns the current ping handler -func (c *Conn) PingHandler() func(appData string) error { - return c.handlePing -} - -// SetPingHandler sets the handler for ping messages received from the peer. -// The appData argument to h is the PING message application data. The default -// ping handler sends a pong to the peer. -// -// The handler function is called from the NextReader, ReadMessage and message -// reader Read methods. The application must read the connection to process -// ping messages as described in the section on Control Messages above. -func (c *Conn) SetPingHandler(h func(appData string) error) { - if h == nil { - h = func(message string) error { - // Make a best effort to send the pong message. - _ = c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) - return nil - } - } - c.handlePing = h -} - -// PongHandler returns the current pong handler -func (c *Conn) PongHandler() func(appData string) error { - return c.handlePong -} - -// SetPongHandler sets the handler for pong messages received from the peer. -// The appData argument to h is the PONG message application data. The default -// pong handler does nothing. -// -// The handler function is called from the NextReader, ReadMessage and message -// reader Read methods. The application must read the connection to process -// pong messages as described in the section on Control Messages above. -func (c *Conn) SetPongHandler(h func(appData string) error) { - if h == nil { - h = func(string) error { return nil } - } - c.handlePong = h -} - -// NetConn returns the underlying connection that is wrapped by c. -// Note that writing to or reading from this connection directly will corrupt the -// WebSocket connection. -func (c *Conn) NetConn() net.Conn { - return c.conn -} - -// UnderlyingConn returns the internal net.Conn. This can be used to further -// modifications to connection specific flags. -// Deprecated: Use the NetConn method. -func (c *Conn) UnderlyingConn() net.Conn { - return c.conn -} - -// EnableWriteCompression enables and disables write compression of -// subsequent text and binary messages. This function is a noop if -// compression was not negotiated with the peer. -func (c *Conn) EnableWriteCompression(enable bool) { - c.enableWriteCompression = enable -} - -// SetCompressionLevel sets the flate compression level for subsequent text and -// binary messages. This function is a noop if compression was not negotiated -// with the peer. See the compress/flate package for a description of -// compression levels. -func (c *Conn) SetCompressionLevel(level int) error { - if !isValidCompressionLevel(level) { - return errors.New("websocket: invalid compression level") - } - c.compressionLevel = level - return nil -} - -// FormatCloseMessage formats closeCode and text as a WebSocket close message. -// An empty message is returned for code CloseNoStatusReceived. -func FormatCloseMessage(closeCode int, text string) []byte { - if closeCode == CloseNoStatusReceived { - // Return empty message because it's illegal to send - // CloseNoStatusReceived. Return non-nil value in case application - // checks for nil. - return []byte{} - } - buf := make([]byte, 2+len(text)) - binary.BigEndian.PutUint16(buf, uint16(closeCode)) - copy(buf[2:], text) - return buf -} diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go deleted file mode 100644 index 8db0cef95a..0000000000 --- a/vendor/github.com/gorilla/websocket/doc.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket implements the WebSocket protocol defined in RFC 6455. -// -// Overview -// -// The Conn type represents a WebSocket connection. A server application calls -// the Upgrader.Upgrade method from an HTTP request handler to get a *Conn: -// -// var upgrader = websocket.Upgrader{ -// ReadBufferSize: 1024, -// WriteBufferSize: 1024, -// } -// -// func handler(w http.ResponseWriter, r *http.Request) { -// conn, err := upgrader.Upgrade(w, r, nil) -// if err != nil { -// log.Println(err) -// return -// } -// ... Use conn to send and receive messages. -// } -// -// Call the connection's WriteMessage and ReadMessage methods to send and -// receive messages as a slice of bytes. This snippet of code shows how to echo -// messages using these methods: -// -// for { -// messageType, p, err := conn.ReadMessage() -// if err != nil { -// log.Println(err) -// return -// } -// if err := conn.WriteMessage(messageType, p); err != nil { -// log.Println(err) -// return -// } -// } -// -// In above snippet of code, p is a []byte and messageType is an int with value -// websocket.BinaryMessage or websocket.TextMessage. -// -// An application can also send and receive messages using the io.WriteCloser -// and io.Reader interfaces. To send a message, call the connection NextWriter -// method to get an io.WriteCloser, write the message to the writer and close -// the writer when done. To receive a message, call the connection NextReader -// method to get an io.Reader and read until io.EOF is returned. This snippet -// shows how to echo messages using the NextWriter and NextReader methods: -// -// for { -// messageType, r, err := conn.NextReader() -// if err != nil { -// return -// } -// w, err := conn.NextWriter(messageType) -// if err != nil { -// return err -// } -// if _, err := io.Copy(w, r); err != nil { -// return err -// } -// if err := w.Close(); err != nil { -// return err -// } -// } -// -// Data Messages -// -// The WebSocket protocol distinguishes between text and binary data messages. -// Text messages are interpreted as UTF-8 encoded text. The interpretation of -// binary messages is left to the application. -// -// This package uses the TextMessage and BinaryMessage integer constants to -// identify the two data message types. The ReadMessage and NextReader methods -// return the type of the received message. The messageType argument to the -// WriteMessage and NextWriter methods specifies the type of a sent message. -// -// It is the application's responsibility to ensure that text messages are -// valid UTF-8 encoded text. -// -// Control Messages -// -// The WebSocket protocol defines three types of control messages: close, ping -// and pong. Call the connection WriteControl, WriteMessage or NextWriter -// methods to send a control message to the peer. -// -// Connections handle received close messages by calling the handler function -// set with the SetCloseHandler method and by returning a *CloseError from the -// NextReader, ReadMessage or the message Read method. The default close -// handler sends a close message to the peer. -// -// Connections handle received ping messages by calling the handler function -// set with the SetPingHandler method. The default ping handler sends a pong -// message to the peer. -// -// Connections handle received pong messages by calling the handler function -// set with the SetPongHandler method. The default pong handler does nothing. -// If an application sends ping messages, then the application should set a -// pong handler to receive the corresponding pong. -// -// The control message handler functions are called from the NextReader, -// ReadMessage and message reader Read methods. The default close and ping -// handlers can block these methods for a short time when the handler writes to -// the connection. -// -// The application must read the connection to process close, ping and pong -// messages sent from the peer. If the application is not otherwise interested -// in messages from the peer, then the application should start a goroutine to -// read and discard messages from the peer. A simple example is: -// -// func readLoop(c *websocket.Conn) { -// for { -// if _, _, err := c.NextReader(); err != nil { -// c.Close() -// break -// } -// } -// } -// -// Concurrency -// -// Connections support one concurrent reader and one concurrent writer. -// -// Applications are responsible for ensuring that no more than one goroutine -// calls the write methods (NextWriter, SetWriteDeadline, WriteMessage, -// WriteJSON, EnableWriteCompression, SetCompressionLevel) concurrently and -// that no more than one goroutine calls the read methods (NextReader, -// SetReadDeadline, ReadMessage, ReadJSON, SetPongHandler, SetPingHandler) -// concurrently. -// -// The Close and WriteControl methods can be called concurrently with all other -// methods. -// -// Origin Considerations -// -// Web browsers allow Javascript applications to open a WebSocket connection to -// any host. It's up to the server to enforce an origin policy using the Origin -// request header sent by the browser. -// -// The Upgrader calls the function specified in the CheckOrigin field to check -// the origin. If the CheckOrigin function returns false, then the Upgrade -// method fails the WebSocket handshake with HTTP status 403. -// -// If the CheckOrigin field is nil, then the Upgrader uses a safe default: fail -// the handshake if the Origin request header is present and the Origin host is -// not equal to the Host request header. -// -// The deprecated package-level Upgrade function does not perform origin -// checking. The application is responsible for checking the Origin header -// before calling the Upgrade function. -// -// Buffers -// -// Connections buffer network input and output to reduce the number -// of system calls when reading or writing messages. -// -// Write buffers are also used for constructing WebSocket frames. See RFC 6455, -// Section 5 for a discussion of message framing. A WebSocket frame header is -// written to the network each time a write buffer is flushed to the network. -// Decreasing the size of the write buffer can increase the amount of framing -// overhead on the connection. -// -// The buffer sizes in bytes are specified by the ReadBufferSize and -// WriteBufferSize fields in the Dialer and Upgrader. The Dialer uses a default -// size of 4096 when a buffer size field is set to zero. The Upgrader reuses -// buffers created by the HTTP server when a buffer size field is set to zero. -// The HTTP server buffers have a size of 4096 at the time of this writing. -// -// The buffer sizes do not limit the size of a message that can be read or -// written by a connection. -// -// Buffers are held for the lifetime of the connection by default. If the -// Dialer or Upgrader WriteBufferPool field is set, then a connection holds the -// write buffer only when writing a message. -// -// Applications should tune the buffer sizes to balance memory use and -// performance. Increasing the buffer size uses more memory, but can reduce the -// number of system calls to read or write the network. In the case of writing, -// increasing the buffer size can reduce the number of frame headers written to -// the network. -// -// Some guidelines for setting buffer parameters are: -// -// Limit the buffer sizes to the maximum expected message size. Buffers larger -// than the largest message do not provide any benefit. -// -// Depending on the distribution of message sizes, setting the buffer size to -// a value less than the maximum expected message size can greatly reduce memory -// use with a small impact on performance. Here's an example: If 99% of the -// messages are smaller than 256 bytes and the maximum message size is 512 -// bytes, then a buffer size of 256 bytes will result in 1.01 more system calls -// than a buffer size of 512 bytes. The memory savings is 50%. -// -// A write buffer pool is useful when the application has a modest number -// writes over a large number of connections. when buffers are pooled, a larger -// buffer size has a reduced impact on total memory use and has the benefit of -// reducing system calls and frame overhead. -// -// Compression EXPERIMENTAL -// -// Per message compression extensions (RFC 7692) are experimentally supported -// by this package in a limited capacity. Setting the EnableCompression option -// to true in Dialer or Upgrader will attempt to negotiate per message deflate -// support. -// -// var upgrader = websocket.Upgrader{ -// EnableCompression: true, -// } -// -// If compression was successfully negotiated with the connection's peer, any -// message received in compressed form will be automatically decompressed. -// All Read methods will return uncompressed bytes. -// -// Per message compression of messages written to a connection can be enabled -// or disabled by calling the corresponding Conn method: -// -// conn.EnableWriteCompression(false) -// -// Currently this package does not support compression with "context takeover". -// This means that messages must be compressed and decompressed in isolation, -// without retaining sliding window or dictionary state across messages. For -// more details refer to RFC 7692. -// -// Use of compression is experimental and may result in decreased performance. -package websocket diff --git a/vendor/github.com/gorilla/websocket/join.go b/vendor/github.com/gorilla/websocket/join.go deleted file mode 100644 index c64f8c8290..0000000000 --- a/vendor/github.com/gorilla/websocket/join.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2019 The Gorilla WebSocket 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 websocket - -import ( - "io" - "strings" -) - -// JoinMessages concatenates received messages to create a single io.Reader. -// The string term is appended to each message. The returned reader does not -// support concurrent calls to the Read method. -func JoinMessages(c *Conn, term string) io.Reader { - return &joinReader{c: c, term: term} -} - -type joinReader struct { - c *Conn - term string - r io.Reader -} - -func (r *joinReader) Read(p []byte) (int, error) { - if r.r == nil { - var err error - _, r.r, err = r.c.NextReader() - if err != nil { - return 0, err - } - if r.term != "" { - r.r = io.MultiReader(r.r, strings.NewReader(r.term)) - } - } - n, err := r.r.Read(p) - if err == io.EOF { - err = nil - r.r = nil - } - return n, err -} diff --git a/vendor/github.com/gorilla/websocket/json.go b/vendor/github.com/gorilla/websocket/json.go deleted file mode 100644 index dc2c1f6415..0000000000 --- a/vendor/github.com/gorilla/websocket/json.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "encoding/json" - "io" -) - -// WriteJSON writes the JSON encoding of v as a message. -// -// Deprecated: Use c.WriteJSON instead. -func WriteJSON(c *Conn, v interface{}) error { - return c.WriteJSON(v) -} - -// WriteJSON writes the JSON encoding of v as a message. -// -// See the documentation for encoding/json Marshal for details about the -// conversion of Go values to JSON. -func (c *Conn) WriteJSON(v interface{}) error { - w, err := c.NextWriter(TextMessage) - if err != nil { - return err - } - err1 := json.NewEncoder(w).Encode(v) - err2 := w.Close() - if err1 != nil { - return err1 - } - return err2 -} - -// ReadJSON reads the next JSON-encoded message from the connection and stores -// it in the value pointed to by v. -// -// Deprecated: Use c.ReadJSON instead. -func ReadJSON(c *Conn, v interface{}) error { - return c.ReadJSON(v) -} - -// ReadJSON reads the next JSON-encoded message from the connection and stores -// it in the value pointed to by v. -// -// See the documentation for the encoding/json Unmarshal function for details -// about the conversion of JSON to a Go value. -func (c *Conn) ReadJSON(v interface{}) error { - _, r, err := c.NextReader() - if err != nil { - return err - } - err = json.NewDecoder(r).Decode(v) - if err == io.EOF { - // One value is expected in the message. - err = io.ErrUnexpectedEOF - } - return err -} diff --git a/vendor/github.com/gorilla/websocket/mask.go b/vendor/github.com/gorilla/websocket/mask.go deleted file mode 100644 index d0742bf2a5..0000000000 --- a/vendor/github.com/gorilla/websocket/mask.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of -// this source code is governed by a BSD-style license that can be found in the -// LICENSE file. - -//go:build !appengine -// +build !appengine - -package websocket - -import "unsafe" - -const wordSize = int(unsafe.Sizeof(uintptr(0))) - -func maskBytes(key [4]byte, pos int, b []byte) int { - // Mask one byte at a time for small buffers. - if len(b) < 2*wordSize { - for i := range b { - b[i] ^= key[pos&3] - pos++ - } - return pos & 3 - } - - // Mask one byte at a time to word boundary. - if n := int(uintptr(unsafe.Pointer(&b[0]))) % wordSize; n != 0 { - n = wordSize - n - for i := range b[:n] { - b[i] ^= key[pos&3] - pos++ - } - b = b[n:] - } - - // Create aligned word size key. - var k [wordSize]byte - for i := range k { - k[i] = key[(pos+i)&3] - } - kw := *(*uintptr)(unsafe.Pointer(&k)) - - // Mask one word at a time. - n := (len(b) / wordSize) * wordSize - for i := 0; i < n; i += wordSize { - *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&b[0])) + uintptr(i))) ^= kw - } - - // Mask one byte at a time for remaining bytes. - b = b[n:] - for i := range b { - b[i] ^= key[pos&3] - pos++ - } - - return pos & 3 -} diff --git a/vendor/github.com/gorilla/websocket/mask_safe.go b/vendor/github.com/gorilla/websocket/mask_safe.go deleted file mode 100644 index 36250ca7c4..0000000000 --- a/vendor/github.com/gorilla/websocket/mask_safe.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of -// this source code is governed by a BSD-style license that can be found in the -// LICENSE file. - -//go:build appengine -// +build appengine - -package websocket - -func maskBytes(key [4]byte, pos int, b []byte) int { - for i := range b { - b[i] ^= key[pos&3] - pos++ - } - return pos & 3 -} diff --git a/vendor/github.com/gorilla/websocket/prepared.go b/vendor/github.com/gorilla/websocket/prepared.go deleted file mode 100644 index c854225e96..0000000000 --- a/vendor/github.com/gorilla/websocket/prepared.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2017 The Gorilla WebSocket 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 websocket - -import ( - "bytes" - "net" - "sync" - "time" -) - -// PreparedMessage caches on the wire representations of a message payload. -// Use PreparedMessage to efficiently send a message payload to multiple -// connections. PreparedMessage is especially useful when compression is used -// because the CPU and memory expensive compression operation can be executed -// once for a given set of compression options. -type PreparedMessage struct { - messageType int - data []byte - mu sync.Mutex - frames map[prepareKey]*preparedFrame -} - -// prepareKey defines a unique set of options to cache prepared frames in PreparedMessage. -type prepareKey struct { - isServer bool - compress bool - compressionLevel int -} - -// preparedFrame contains data in wire representation. -type preparedFrame struct { - once sync.Once - data []byte -} - -// NewPreparedMessage returns an initialized PreparedMessage. You can then send -// it to connection using WritePreparedMessage method. Valid wire -// representation will be calculated lazily only once for a set of current -// connection options. -func NewPreparedMessage(messageType int, data []byte) (*PreparedMessage, error) { - pm := &PreparedMessage{ - messageType: messageType, - frames: make(map[prepareKey]*preparedFrame), - data: data, - } - - // Prepare a plain server frame. - _, frameData, err := pm.frame(prepareKey{isServer: true, compress: false}) - if err != nil { - return nil, err - } - - // To protect against caller modifying the data argument, remember the data - // copied to the plain server frame. - pm.data = frameData[len(frameData)-len(data):] - return pm, nil -} - -func (pm *PreparedMessage) frame(key prepareKey) (int, []byte, error) { - pm.mu.Lock() - frame, ok := pm.frames[key] - if !ok { - frame = &preparedFrame{} - pm.frames[key] = frame - } - pm.mu.Unlock() - - var err error - frame.once.Do(func() { - // Prepare a frame using a 'fake' connection. - // TODO: Refactor code in conn.go to allow more direct construction of - // the frame. - mu := make(chan struct{}, 1) - mu <- struct{}{} - var nc prepareConn - c := &Conn{ - conn: &nc, - mu: mu, - isServer: key.isServer, - compressionLevel: key.compressionLevel, - enableWriteCompression: true, - writeBuf: make([]byte, defaultWriteBufferSize+maxFrameHeaderSize), - } - if key.compress { - c.newCompressionWriter = compressNoContextTakeover - } - err = c.WriteMessage(pm.messageType, pm.data) - frame.data = nc.buf.Bytes() - }) - return pm.messageType, frame.data, err -} - -type prepareConn struct { - buf bytes.Buffer - net.Conn -} - -func (pc *prepareConn) Write(p []byte) (int, error) { return pc.buf.Write(p) } -func (pc *prepareConn) SetWriteDeadline(t time.Time) error { return nil } diff --git a/vendor/github.com/gorilla/websocket/proxy.go b/vendor/github.com/gorilla/websocket/proxy.go deleted file mode 100644 index d716a05884..0000000000 --- a/vendor/github.com/gorilla/websocket/proxy.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2017 The Gorilla WebSocket 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 websocket - -import ( - "bufio" - "bytes" - "context" - "encoding/base64" - "errors" - "net" - "net/http" - "net/url" - "strings" - - "golang.org/x/net/proxy" -) - -type netDialerFunc func(ctx context.Context, network, addr string) (net.Conn, error) - -func (fn netDialerFunc) Dial(network, addr string) (net.Conn, error) { - return fn(context.Background(), network, addr) -} - -func (fn netDialerFunc) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { - return fn(ctx, network, addr) -} - -func proxyFromURL(proxyURL *url.URL, forwardDial netDialerFunc) (netDialerFunc, error) { - if proxyURL.Scheme == "http" || proxyURL.Scheme == "https" { - return (&httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDial}).DialContext, nil - } - dialer, err := proxy.FromURL(proxyURL, forwardDial) - if err != nil { - return nil, err - } - if d, ok := dialer.(proxy.ContextDialer); ok { - return d.DialContext, nil - } - return func(ctx context.Context, net, addr string) (net.Conn, error) { - return dialer.Dial(net, addr) - }, nil -} - -type httpProxyDialer struct { - proxyURL *url.URL - forwardDial netDialerFunc -} - -func (hpd *httpProxyDialer) DialContext(ctx context.Context, network string, addr string) (net.Conn, error) { - hostPort, _ := hostPortNoPort(hpd.proxyURL) - conn, err := hpd.forwardDial(ctx, network, hostPort) - if err != nil { - return nil, err - } - - connectHeader := make(http.Header) - if user := hpd.proxyURL.User; user != nil { - proxyUser := user.Username() - if proxyPassword, passwordSet := user.Password(); passwordSet { - credential := base64.StdEncoding.EncodeToString([]byte(proxyUser + ":" + proxyPassword)) - connectHeader.Set("Proxy-Authorization", "Basic "+credential) - } - } - connectReq := &http.Request{ - Method: http.MethodConnect, - URL: &url.URL{Opaque: addr}, - Host: addr, - Header: connectHeader, - } - - if err := connectReq.Write(conn); err != nil { - conn.Close() - return nil, err - } - - // Read response. It's OK to use and discard buffered reader here because - // the remote server does not speak until spoken to. - br := bufio.NewReader(conn) - resp, err := http.ReadResponse(br, connectReq) - if err != nil { - conn.Close() - return nil, err - } - - // Close the response body to silence false positives from linters. Reset - // the buffered reader first to ensure that Close() does not read from - // conn. - // Note: Applications must call resp.Body.Close() on a response returned - // http.ReadResponse to inspect trailers or read another response from the - // buffered reader. The call to resp.Body.Close() does not release - // resources. - br.Reset(bytes.NewReader(nil)) - _ = resp.Body.Close() - - if resp.StatusCode != http.StatusOK { - _ = conn.Close() - f := strings.SplitN(resp.Status, " ", 2) - return nil, errors.New(f[1]) - } - return conn, nil -} diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go deleted file mode 100644 index 02ea01fdcd..0000000000 --- a/vendor/github.com/gorilla/websocket/server.go +++ /dev/null @@ -1,373 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "bufio" - "net" - "net/http" - "net/url" - "strings" - "time" -) - -// HandshakeError describes an error with the handshake from the peer. -type HandshakeError struct { - message string -} - -func (e HandshakeError) Error() string { return e.message } - -// Upgrader specifies parameters for upgrading an HTTP connection to a -// WebSocket connection. -// -// It is safe to call Upgrader's methods concurrently. -type Upgrader struct { - // HandshakeTimeout specifies the duration for the handshake to complete. - HandshakeTimeout time.Duration - - // ReadBufferSize and WriteBufferSize specify I/O buffer sizes in bytes. If a buffer - // size is zero, then buffers allocated by the HTTP server are used. The - // I/O buffer sizes do not limit the size of the messages that can be sent - // or received. - ReadBufferSize, WriteBufferSize int - - // WriteBufferPool is a pool of buffers for write operations. If the value - // is not set, then write buffers are allocated to the connection for the - // lifetime of the connection. - // - // A pool is most useful when the application has a modest volume of writes - // across a large number of connections. - // - // Applications should use a single pool for each unique value of - // WriteBufferSize. - WriteBufferPool BufferPool - - // Subprotocols specifies the server's supported protocols in order of - // preference. If this field is not nil, then the Upgrade method negotiates a - // subprotocol by selecting the first match in this list with a protocol - // requested by the client. If there's no match, then no protocol is - // negotiated (the Sec-Websocket-Protocol header is not included in the - // handshake response). - Subprotocols []string - - // Error specifies the function for generating HTTP error responses. If Error - // is nil, then http.Error is used to generate the HTTP response. - Error func(w http.ResponseWriter, r *http.Request, status int, reason error) - - // CheckOrigin returns true if the request Origin header is acceptable. If - // CheckOrigin is nil, then a safe default is used: return false if the - // Origin request header is present and the origin host is not equal to - // request Host header. - // - // A CheckOrigin function should carefully validate the request origin to - // prevent cross-site request forgery. - CheckOrigin func(r *http.Request) bool - - // EnableCompression specify if the server should attempt to negotiate per - // message compression (RFC 7692). Setting this value to true does not - // guarantee that compression will be supported. Currently only "no context - // takeover" modes are supported. - EnableCompression bool -} - -func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status int, reason string) (*Conn, error) { - err := HandshakeError{reason} - if u.Error != nil { - u.Error(w, r, status, err) - } else { - w.Header().Set("Sec-Websocket-Version", "13") - http.Error(w, http.StatusText(status), status) - } - return nil, err -} - -// checkSameOrigin returns true if the origin is not set or is equal to the request host. -func checkSameOrigin(r *http.Request) bool { - origin := r.Header["Origin"] - if len(origin) == 0 { - return true - } - u, err := url.Parse(origin[0]) - if err != nil { - return false - } - return equalASCIIFold(u.Host, r.Host) -} - -func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string { - if u.Subprotocols != nil { - clientProtocols := Subprotocols(r) - for _, clientProtocol := range clientProtocols { - for _, serverProtocol := range u.Subprotocols { - if clientProtocol == serverProtocol { - return clientProtocol - } - } - } - } else if responseHeader != nil { - return responseHeader.Get("Sec-Websocket-Protocol") - } - return "" -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie). To specify -// subprotocols supported by the server, set Upgrader.Subprotocols directly. -// -// If the upgrade fails, then Upgrade replies to the client with an HTTP error -// response. -func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) { - const badHandshake = "websocket: the client is not using the websocket protocol: " - - if !tokenListContainsValue(r.Header, "Connection", "upgrade") { - return u.returnError(w, r, http.StatusBadRequest, badHandshake+"'upgrade' token not found in 'Connection' header") - } - - if !tokenListContainsValue(r.Header, "Upgrade", "websocket") { - w.Header().Set("Upgrade", "websocket") - return u.returnError(w, r, http.StatusUpgradeRequired, badHandshake+"'websocket' token not found in 'Upgrade' header") - } - - if r.Method != http.MethodGet { - return u.returnError(w, r, http.StatusMethodNotAllowed, badHandshake+"request method is not GET") - } - - if !tokenListContainsValue(r.Header, "Sec-Websocket-Version", "13") { - return u.returnError(w, r, http.StatusBadRequest, "websocket: unsupported version: 13 not found in 'Sec-Websocket-Version' header") - } - - if _, ok := responseHeader["Sec-Websocket-Extensions"]; ok { - return u.returnError(w, r, http.StatusInternalServerError, "websocket: application specific 'Sec-WebSocket-Extensions' headers are unsupported") - } - - checkOrigin := u.CheckOrigin - if checkOrigin == nil { - checkOrigin = checkSameOrigin - } - if !checkOrigin(r) { - return u.returnError(w, r, http.StatusForbidden, "websocket: request origin not allowed by Upgrader.CheckOrigin") - } - - challengeKey := r.Header.Get("Sec-Websocket-Key") - if !isValidChallengeKey(challengeKey) { - return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'Sec-WebSocket-Key' header must be Base64 encoded value of 16-byte in length") - } - - subprotocol := u.selectSubprotocol(r, responseHeader) - - // Negotiate PMCE - var compress bool - if u.EnableCompression { - for _, ext := range parseExtensions(r.Header) { - if ext[""] != "permessage-deflate" { - continue - } - compress = true - break - } - } - - netConn, brw, err := http.NewResponseController(w).Hijack() - if err != nil { - return u.returnError(w, r, http.StatusInternalServerError, - "websocket: hijack: "+err.Error()) - } - - // Close the network connection when returning an error. The variable - // netConn is set to nil before the success return at the end of the - // function. - defer func() { - if netConn != nil { - // It's safe to ignore the error from Close() because this code is - // only executed when returning a more important error to the - // application. - _ = netConn.Close() - } - }() - - var br *bufio.Reader - if u.ReadBufferSize == 0 && brw.Reader.Size() > 256 { - // Use hijacked buffered reader as the connection reader. - br = brw.Reader - } else if brw.Reader.Buffered() > 0 { - // Wrap the network connection to read buffered data in brw.Reader - // before reading from the network connection. This should be rare - // because a client must not send message data before receiving the - // handshake response. - netConn = &brNetConn{br: brw.Reader, Conn: netConn} - } - - buf := brw.Writer.AvailableBuffer() - - var writeBuf []byte - if u.WriteBufferPool == nil && u.WriteBufferSize == 0 && len(buf) >= maxFrameHeaderSize+256 { - // Reuse hijacked write buffer as connection buffer. - writeBuf = buf - } - - c := newConn(netConn, true, u.ReadBufferSize, u.WriteBufferSize, u.WriteBufferPool, br, writeBuf) - c.subprotocol = subprotocol - - if compress { - c.newCompressionWriter = compressNoContextTakeover - c.newDecompressionReader = decompressNoContextTakeover - } - - // Use larger of hijacked buffer and connection write buffer for header. - p := buf - if len(c.writeBuf) > len(p) { - p = c.writeBuf - } - p = p[:0] - - p = append(p, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "...) - p = append(p, computeAcceptKey(challengeKey)...) - p = append(p, "\r\n"...) - if c.subprotocol != "" { - p = append(p, "Sec-WebSocket-Protocol: "...) - p = append(p, c.subprotocol...) - p = append(p, "\r\n"...) - } - if compress { - p = append(p, "Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover\r\n"...) - } - for k, vs := range responseHeader { - if k == "Sec-Websocket-Protocol" { - continue - } - for _, v := range vs { - p = append(p, k...) - p = append(p, ": "...) - for i := 0; i < len(v); i++ { - b := v[i] - if b <= 31 { - // prevent response splitting. - b = ' ' - } - p = append(p, b) - } - p = append(p, "\r\n"...) - } - } - p = append(p, "\r\n"...) - - if u.HandshakeTimeout > 0 { - if err := netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)); err != nil { - return nil, err - } - } else { - // Clear deadlines set by HTTP server. - if err := netConn.SetDeadline(time.Time{}); err != nil { - return nil, err - } - } - - if _, err = netConn.Write(p); err != nil { - return nil, err - } - if u.HandshakeTimeout > 0 { - if err := netConn.SetWriteDeadline(time.Time{}); err != nil { - return nil, err - } - } - - // Success! Set netConn to nil to stop the deferred function above from - // closing the network connection. - netConn = nil - - return c, nil -} - -// Upgrade upgrades the HTTP server connection to the WebSocket protocol. -// -// Deprecated: Use websocket.Upgrader instead. -// -// Upgrade does not perform origin checking. The application is responsible for -// checking the Origin header before calling Upgrade. An example implementation -// of the same origin policy check is: -// -// if req.Header.Get("Origin") != "http://"+req.Host { -// http.Error(w, "Origin not allowed", http.StatusForbidden) -// return -// } -// -// If the endpoint supports subprotocols, then the application is responsible -// for negotiating the protocol used on the connection. Use the Subprotocols() -// function to get the subprotocols requested by the client. Use the -// Sec-Websocket-Protocol response header to specify the subprotocol selected -// by the application. -// -// The responseHeader is included in the response to the client's upgrade -// request. Use the responseHeader to specify cookies (Set-Cookie) and the -// negotiated subprotocol (Sec-Websocket-Protocol). -// -// The connection buffers IO to the underlying network connection. The -// readBufSize and writeBufSize parameters specify the size of the buffers to -// use. Messages can be larger than the buffers. -// -// If the request is not a valid WebSocket handshake, then Upgrade returns an -// error of type HandshakeError. Applications should handle this error by -// replying to the client with an HTTP error response. -func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header, readBufSize, writeBufSize int) (*Conn, error) { - u := Upgrader{ReadBufferSize: readBufSize, WriteBufferSize: writeBufSize} - u.Error = func(w http.ResponseWriter, r *http.Request, status int, reason error) { - // don't return errors to maintain backwards compatibility - } - u.CheckOrigin = func(r *http.Request) bool { - // allow all connections by default - return true - } - return u.Upgrade(w, r, responseHeader) -} - -// Subprotocols returns the subprotocols requested by the client in the -// Sec-Websocket-Protocol header. -func Subprotocols(r *http.Request) []string { - h := strings.TrimSpace(r.Header.Get("Sec-Websocket-Protocol")) - if h == "" { - return nil - } - protocols := strings.Split(h, ",") - for i := range protocols { - protocols[i] = strings.TrimSpace(protocols[i]) - } - return protocols -} - -// IsWebSocketUpgrade returns true if the client requested upgrade to the -// WebSocket protocol. -func IsWebSocketUpgrade(r *http.Request) bool { - return tokenListContainsValue(r.Header, "Connection", "upgrade") && - tokenListContainsValue(r.Header, "Upgrade", "websocket") -} - -type brNetConn struct { - br *bufio.Reader - net.Conn -} - -func (b *brNetConn) Read(p []byte) (n int, err error) { - if b.br != nil { - // Limit read to buferred data. - if n := b.br.Buffered(); len(p) > n { - p = p[:n] - } - n, err = b.br.Read(p) - if b.br.Buffered() == 0 { - b.br = nil - } - return n, err - } - return b.Conn.Read(p) -} - -// NetConn returns the underlying connection that is wrapped by b. -func (b *brNetConn) NetConn() net.Conn { - return b.Conn -} - diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go deleted file mode 100644 index 31a5dee646..0000000000 --- a/vendor/github.com/gorilla/websocket/util.go +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2013 The Gorilla WebSocket 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 websocket - -import ( - "crypto/rand" - "crypto/sha1" - "encoding/base64" - "io" - "net/http" - "strings" - "unicode/utf8" -) - -var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") - -func computeAcceptKey(challengeKey string) string { - h := sha1.New() - h.Write([]byte(challengeKey)) - h.Write(keyGUID) - return base64.StdEncoding.EncodeToString(h.Sum(nil)) -} - -func generateChallengeKey() (string, error) { - p := make([]byte, 16) - if _, err := io.ReadFull(rand.Reader, p); err != nil { - return "", err - } - return base64.StdEncoding.EncodeToString(p), nil -} - -// Token octets per RFC 2616. -var isTokenOctet = [256]bool{ - '!': true, - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - '*': true, - '+': true, - '-': true, - '.': true, - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - 'A': true, - 'B': true, - 'C': true, - 'D': true, - 'E': true, - 'F': true, - 'G': true, - 'H': true, - 'I': true, - 'J': true, - 'K': true, - 'L': true, - 'M': true, - 'N': true, - 'O': true, - 'P': true, - 'Q': true, - 'R': true, - 'S': true, - 'T': true, - 'U': true, - 'W': true, - 'V': true, - 'X': true, - 'Y': true, - 'Z': true, - '^': true, - '_': true, - '`': true, - 'a': true, - 'b': true, - 'c': true, - 'd': true, - 'e': true, - 'f': true, - 'g': true, - 'h': true, - 'i': true, - 'j': true, - 'k': true, - 'l': true, - 'm': true, - 'n': true, - 'o': true, - 'p': true, - 'q': true, - 'r': true, - 's': true, - 't': true, - 'u': true, - 'v': true, - 'w': true, - 'x': true, - 'y': true, - 'z': true, - '|': true, - '~': true, -} - -// skipSpace returns a slice of the string s with all leading RFC 2616 linear -// whitespace removed. -func skipSpace(s string) (rest string) { - i := 0 - for ; i < len(s); i++ { - if b := s[i]; b != ' ' && b != '\t' { - break - } - } - return s[i:] -} - -// nextToken returns the leading RFC 2616 token of s and the string following -// the token. -func nextToken(s string) (token, rest string) { - i := 0 - for ; i < len(s); i++ { - if !isTokenOctet[s[i]] { - break - } - } - return s[:i], s[i:] -} - -// nextTokenOrQuoted returns the leading token or quoted string per RFC 2616 -// and the string following the token or quoted string. -func nextTokenOrQuoted(s string) (value string, rest string) { - if !strings.HasPrefix(s, "\"") { - return nextToken(s) - } - s = s[1:] - for i := 0; i < len(s); i++ { - switch s[i] { - case '"': - return s[:i], s[i+1:] - case '\\': - p := make([]byte, len(s)-1) - j := copy(p, s[:i]) - escape := true - for i = i + 1; i < len(s); i++ { - b := s[i] - switch { - case escape: - escape = false - p[j] = b - j++ - case b == '\\': - escape = true - case b == '"': - return string(p[:j]), s[i+1:] - default: - p[j] = b - j++ - } - } - return "", "" - } - } - return "", "" -} - -// equalASCIIFold returns true if s is equal to t with ASCII case folding as -// defined in RFC 4790. -func equalASCIIFold(s, t string) bool { - for s != "" && t != "" { - sr, size := utf8.DecodeRuneInString(s) - s = s[size:] - tr, size := utf8.DecodeRuneInString(t) - t = t[size:] - if sr == tr { - continue - } - if 'A' <= sr && sr <= 'Z' { - sr = sr + 'a' - 'A' - } - if 'A' <= tr && tr <= 'Z' { - tr = tr + 'a' - 'A' - } - if sr != tr { - return false - } - } - return s == t -} - -// tokenListContainsValue returns true if the 1#token header with the given -// name contains a token equal to value with ASCII case folding. -func tokenListContainsValue(header http.Header, name string, value string) bool { -headers: - for _, s := range header[name] { - for { - var t string - t, s = nextToken(skipSpace(s)) - if t == "" { - continue headers - } - s = skipSpace(s) - if s != "" && s[0] != ',' { - continue headers - } - if equalASCIIFold(t, value) { - return true - } - if s == "" { - continue headers - } - s = s[1:] - } - } - return false -} - -// parseExtensions parses WebSocket extensions from a header. -func parseExtensions(header http.Header) []map[string]string { - // From RFC 6455: - // - // Sec-WebSocket-Extensions = extension-list - // extension-list = 1#extension - // extension = extension-token *( ";" extension-param ) - // extension-token = registered-token - // registered-token = token - // extension-param = token [ "=" (token | quoted-string) ] - // ;When using the quoted-string syntax variant, the value - // ;after quoted-string unescaping MUST conform to the - // ;'token' ABNF. - - var result []map[string]string -headers: - for _, s := range header["Sec-Websocket-Extensions"] { - for { - var t string - t, s = nextToken(skipSpace(s)) - if t == "" { - continue headers - } - ext := map[string]string{"": t} - for { - s = skipSpace(s) - if !strings.HasPrefix(s, ";") { - break - } - var k string - k, s = nextToken(skipSpace(s[1:])) - if k == "" { - continue headers - } - s = skipSpace(s) - var v string - if strings.HasPrefix(s, "=") { - v, s = nextTokenOrQuoted(skipSpace(s[1:])) - s = skipSpace(s) - } - if s != "" && s[0] != ',' && s[0] != ';' { - continue headers - } - ext[k] = v - } - if s != "" && s[0] != ',' { - continue headers - } - result = append(result, ext) - if s == "" { - continue headers - } - s = s[1:] - } - } - return result -} - -// isValidChallengeKey checks if the argument meets RFC6455 specification. -func isValidChallengeKey(s string) bool { - // From RFC6455: - // - // A |Sec-WebSocket-Key| header field with a base64-encoded (see - // Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in - // length. - - if s == "" { - return false - } - decoded, err := base64.StdEncoding.DecodeString(s) - return err == nil && len(decoded) == 16 -} diff --git a/vendor/github.com/hashicorp/cronexpr/APLv2 b/vendor/github.com/hashicorp/cronexpr/APLv2 deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/APLv2 +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/hashicorp/cronexpr/CODEOWNERS b/vendor/github.com/hashicorp/cronexpr/CODEOWNERS deleted file mode 100644 index ef481ec7f1..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @hashicorp/nomad-eng diff --git a/vendor/github.com/hashicorp/cronexpr/GPLv3 b/vendor/github.com/hashicorp/cronexpr/GPLv3 deleted file mode 100644 index c13fcfaf1d..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/GPLv3 +++ /dev/null @@ -1,674 +0,0 @@ -GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. {http://fsf.org/} - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see {http://www.gnu.org/licenses/}. - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - cronexpr Copyright (C) 2013 Raymond Hill - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -{http://www.gnu.org/licenses/}. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -{http://www.gnu.org/philosophy/why-not-lgpl.html}. diff --git a/vendor/github.com/hashicorp/cronexpr/LICENSE b/vendor/github.com/hashicorp/cronexpr/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/hashicorp/cronexpr/README.md b/vendor/github.com/hashicorp/cronexpr/README.md deleted file mode 100644 index e8c56d29d2..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/README.md +++ /dev/null @@ -1,134 +0,0 @@ -Golang Cron expression parser -============================= -Given a cron expression and a time stamp, you can get the next time stamp which satisfies the cron expression. - -In another project, I decided to use cron expression syntax to encode scheduling information. Thus this standalone library to parse and apply time stamps to cron expressions. - -The time-matching algorithm in this implementation is efficient, it avoids as much as possible to guess the next matching time stamp, a common technique seen in a number of implementations out there. - -There is also a companion command-line utility to evaluate cron time expressions: (which of course uses this library). - -Implementation --------------- -The reference documentation for this implementation is found at -, which I copy/pasted here (laziness!) with modifications where this implementation differs: - - Field name Mandatory? Allowed values Allowed special characters - ---------- ---------- -------------- -------------------------- - Seconds No 0-59 * / , - - Minutes Yes 0-59 * / , - - Hours Yes 0-23 * / , - - Day of month Yes 1-31 * / , - L W - Month Yes 1-12 or JAN-DEC * / , - - Day of week Yes 0-6 or SUN-SAT * / , - L # - Year No 1970–2099 * / , - - -#### Asterisk ( * ) -The asterisk indicates that the cron expression matches for all values of the field. E.g., using an asterisk in the 4th field (month) indicates every month. - -#### Slash ( / ) -Slashes describe increments of ranges. For example `3-59/15` in the minute field indicate the third minute of the hour and every 15 minutes thereafter. The form `*/...` is equivalent to the form "first-last/...", that is, an increment over the largest possible range of the field. - -#### Comma ( , ) -Commas are used to separate items of a list. For example, using `MON,WED,FRI` in the 5th field (day of week) means Mondays, Wednesdays and Fridays. - -#### Hyphen ( - ) -Hyphens define ranges. For example, 2000-2010 indicates every year between 2000 and 2010 AD, inclusive. - -#### L -`L` stands for "last". When used in the day-of-week field, it allows you to specify constructs such as "the last Friday" (`5L`) of a given month. In the day-of-month field, it specifies the last day of the month. - -#### W -The `W` character is allowed for the day-of-month field. This character is used to specify the business day (Monday-Friday) nearest the given day. As an example, if you were to specify `15W` as the value for the day-of-month field, the meaning is: "the nearest business day to the 15th of the month." - -So, if the 15th is a Saturday, the trigger fires on Friday the 14th. If the 15th is a Sunday, the trigger fires on Monday the 16th. If the 15th is a Tuesday, then it fires on Tuesday the 15th. However if you specify `1W` as the value for day-of-month, and the 1st is a Saturday, the trigger fires on Monday the 3rd, as it does not 'jump' over the boundary of a month's days. - -The `W` character can be specified only when the day-of-month is a single day, not a range or list of days. - -The `W` character can also be combined with `L`, i.e. `LW` to mean "the last business day of the month." - -#### Hash ( # ) -`#` is allowed for the day-of-week field, and must be followed by a number between one and five. It allows you to specify constructs such as "the second Friday" of a given month. - -Predefined cron expressions ---------------------------- -(Copied from , with text modified according to this implementation) - - Entry Description Equivalent to - @annually Run once a year at midnight in the morning of January 1 0 0 0 1 1 * * - @yearly Run once a year at midnight in the morning of January 1 0 0 0 1 1 * * - @monthly Run once a month at midnight in the morning of the first of the month 0 0 0 1 * * * - @weekly Run once a week at midnight in the morning of Sunday 0 0 0 * * 0 * - @daily Run once a day at midnight 0 0 0 * * * * - @hourly Run once an hour at the beginning of the hour 0 0 * * * * * - @reboot Not supported - -Other details -------------- -* If only six fields are present, a `0` second field is prepended, that is, `* * * * * 2013` internally become `0 * * * * * 2013`. -* If only five fields are present, a `0` second field is prepended and a wildcard year field is appended, that is, `* * * * Mon` internally become `0 * * * * Mon *`. -* Domain for day-of-week field is [0-7] instead of [0-6], 7 being Sunday (like 0). This to comply with http://linux.die.net/man/5/crontab#. -* As of now, the behavior of the code is undetermined if a malformed cron expression is supplied - -Install -------- - go get github.com/gorhill/cronexpr - -Usage ------ -Import the library: - - import "github.com/gorhill/cronexpr" - import "time" - -Simplest way: - - nextTime := cronexpr.MustParse("0 0 29 2 *").Next(time.Now()) - -Assuming `time.Now()` is "2013-08-29 09:28:00", then `nextTime` will be "2016-02-29 00:00:00". - -You can keep the returned Expression pointer around if you want to reuse it: - - expr := cronexpr.MustParse("0 0 29 2 *") - nextTime := expr.Next(time.Now()) - ... - nextTime = expr.Next(nextTime) - -Use `time.IsZero()` to find out whether a valid time was returned. For example, - - cronexpr.MustParse("* * * * * 1980").Next(time.Now()).IsZero() - -will return `true`, whereas - - cronexpr.MustParse("* * * * * 2050").Next(time.Now()).IsZero() - -will return `false` (as of 2013-08-29...) - -You may also query for `n` next time stamps: - - cronexpr.MustParse("0 0 29 2 *").NextN(time.Now(), 5) - -which returns a slice of time.Time objects, containing the following time stamps (as of 2013-08-30): - - 2016-02-29 00:00:00 - 2020-02-29 00:00:00 - 2024-02-29 00:00:00 - 2028-02-29 00:00:00 - 2032-02-29 00:00:00 - -The time zone of time values returned by `Next` and `NextN` is always the -time zone of the time value passed as argument, unless a zero time value is -returned. - -API ---- - - -License -------- - -License: pick the one which suits you best: - -- GPL v3 see -- APL v2 see - diff --git a/vendor/github.com/hashicorp/cronexpr/cronexpr.go b/vendor/github.com/hashicorp/cronexpr/cronexpr.go deleted file mode 100644 index 79be5f82db..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/cronexpr.go +++ /dev/null @@ -1,312 +0,0 @@ -/*! - * Copyright 2013 Raymond Hill - * - * Modifications 2020 - HashiCorp - * - * Project: github.com/gorhill/cronexpr - * File: cronexpr.go - * Version: 1.0 - * License: pick the one which suits you : - * GPL v3 see - * APL v2 see - * - */ - -// Package cronexpr parses cron time expressions. -package cronexpr - -/******************************************************************************/ - -import ( - "fmt" - "sort" - "time" -) - -/******************************************************************************/ - -// A Expression represents a specific cron time expression as defined at -// -type Expression struct { - expression string - secondList []int - minuteList []int - hourList []int - daysOfMonth map[int]bool - workdaysOfMonth map[int]bool - lastDayOfMonth bool - lastWorkdayOfMonth bool - daysOfMonthRestricted bool - actualDaysOfMonthList []int - monthList []int - daysOfWeek map[int]bool - specificWeekDaysOfWeek map[int]bool - lastWeekDaysOfWeek map[int]bool - daysOfWeekRestricted bool - yearList []int -} - -/******************************************************************************/ - -// MustParse returns a new Expression pointer. It expects a well-formed cron -// expression. If a malformed cron expression is supplied, it will `panic`. -// See for documentation -// about what is a well-formed cron expression from this library's point of -// view. -func MustParse(cronLine string) *Expression { - expr, err := Parse(cronLine) - if err != nil { - panic(err) - } - return expr -} - -/******************************************************************************/ - -// Parse returns a new Expression pointer. An error is returned if a malformed -// cron expression is supplied. -// See for documentation -// about what is a well-formed cron expression from this library's point of -// view. -func Parse(cronLine string) (*Expression, error) { - - // Maybe one of the built-in aliases is being used - cron := cronNormalizer.Replace(cronLine) - - indices := fieldFinder.FindAllStringIndex(cron, -1) - fieldCount := len(indices) - if fieldCount < 5 { - return nil, fmt.Errorf("missing field(s)") - } - // ignore fields beyond 7th - if fieldCount > 7 { - fieldCount = 7 - } - - var expr = Expression{} - var field = 0 - var err error - - // second field (optional) - if fieldCount == 7 { - err = expr.secondFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - } else { - expr.secondList = []int{0} - } - - // minute field - err = expr.minuteFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - - // hour field - err = expr.hourFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - - // day of month field - err = expr.domFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - - // month field - err = expr.monthFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - - // day of week field - err = expr.dowFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - field += 1 - - // year field - if field < fieldCount { - err = expr.yearFieldHandler(cron[indices[field][0]:indices[field][1]]) - if err != nil { - return nil, err - } - } else { - expr.yearList = yearDescriptor.defaultList - } - - return &expr, nil -} - -/******************************************************************************/ - -// Next returns the closest time instant immediately following `fromTime` which -// matches the cron expression `expr`. -// -// The `time.Location` of the returned time instant is the same as that of -// `fromTime`. -// -// The zero value of time.Time is returned if no matching time instant exists -// or if a `fromTime` is itself a zero value. -func (expr *Expression) Next(fromTime time.Time) time.Time { - // Special case - if fromTime.IsZero() { - return fromTime - } - - loc := fromTime.Location() - t := fromTime.Add(time.Second - time.Duration(fromTime.Nanosecond())*time.Nanosecond) - -WRAP: - - // let's find the next date that satisfies condition - v := t.Year() - if i := sort.SearchInts(expr.yearList, v); i == len(expr.yearList) { - return time.Time{} - } else if v != expr.yearList[i] { - t = time.Date(expr.yearList[i], time.Month(expr.monthList[0]), 1, 0, 0, 0, 0, loc) - } - - v = int(t.Month()) - if i := sort.SearchInts(expr.monthList, v); i == len(expr.monthList) { - // try again with a new year - t = time.Date(t.Year()+1, time.Month(expr.monthList[0]), 1, 0, 0, 0, 0, loc) - goto WRAP - } else if v != expr.monthList[i] { - t = time.Date(t.Year(), time.Month(expr.monthList[i]), 1, 0, 0, 0, 0, loc) - } - - expr.actualDaysOfMonthList = expr.calculateActualDaysOfMonth(t.Year(), int(t.Month())) - if len(expr.actualDaysOfMonthList) == 0 { - t = time.Date(t.Year(), t.Month()+1, 1, 0, 0, 0, 0, loc) - goto WRAP - } - - v = t.Day() - if i := sort.SearchInts(expr.actualDaysOfMonthList, v); i == len(expr.actualDaysOfMonthList) { - t = time.Date(t.Year(), t.Month()+1, 1, 0, 0, 0, 0, loc) - goto WRAP - } else if v != expr.actualDaysOfMonthList[i] { - t = time.Date(t.Year(), t.Month(), expr.actualDaysOfMonthList[i], 0, 0, 0, 0, loc) - - // in San Palo, before 2019, there may be no midnight (or multiple midnights) - // due to DST - if t.Hour() != 0 { - if t.Hour() > 12 { - t = t.Add(time.Duration(24-t.Hour()) * time.Hour) - } else { - t = t.Add(time.Duration(-t.Hour()) * time.Hour) - } - } - } - - if timeZoneInDay(t) { - goto SLOW_CLOCK - } - - // Fast path where hours/minutes behave as expected trivially - v = t.Hour() - if i := sort.SearchInts(expr.hourList, v); i == len(expr.hourList) { - t = time.Date(t.Year(), t.Month(), t.Day()+1, 0, 0, 0, 0, loc) - goto WRAP - } else if v != expr.hourList[i] { - t = time.Date(t.Year(), t.Month(), t.Day(), expr.hourList[i], expr.minuteList[0], expr.secondList[0], 0, loc) - } - - v = t.Minute() - if i := sort.SearchInts(expr.minuteList, v); i == len(expr.minuteList) { - t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour()+1, 0, 0, 0, loc) - goto WRAP - } else if v != expr.minuteList[i] { - t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), expr.minuteList[i], expr.secondList[0], 0, loc) - } - - v = t.Second() - if i := sort.SearchInts(expr.secondList, v); i == len(expr.secondList) { - t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute()+1, 0, 0, loc) - goto WRAP - } else if v != expr.secondList[i] { - t = time.Date(t.Year(), t.Month(), t.Day(), t.Hour(), t.Minute(), expr.secondList[i], 0, loc) - } - - return t - -SLOW_CLOCK: - // daylight saving effect is here, where odd things happen: - // An hour may have 60 minutes, 30 minutes or 90 minutes; - // partial hours may "repeat"! - for !sortContains(expr.hourList, t.Hour()) { - hourBefore := t.Hour() - t = t.Add(time.Hour) - if hourBefore == t.Hour() { - t = t.Add(time.Hour) - } - t = t.Truncate(time.Minute) - if t.Minute() != 0 { - t = t.Add(-1 * time.Minute * time.Duration(t.Minute())) - } - - if t.Hour() == 0 { - t = time.Date(t.Year(), t.Month(), t.Day(), 0, 0, 0, 0, loc) - goto WRAP - } - } - - for !sortContains(expr.minuteList, t.Minute()) { - hoursBefore := t.Hour() - t = t.Truncate(time.Minute).Add(time.Minute) - if hoursBefore != t.Hour() { - goto WRAP - } - } - - v = t.Second() - t = t.Truncate(time.Minute) - if i := sort.SearchInts(expr.secondList, v); i == len(expr.secondList) { - t = t.Add(time.Minute) - goto WRAP - } else { - t = t.Add(time.Duration(expr.secondList[i]) * time.Second) - } - - return t -} - -/******************************************************************************/ - -// NextN returns a slice of `n` closest time instants immediately following -// `fromTime` which match the cron expression `expr`. -// -// The time instants in the returned slice are in chronological ascending order. -// The `time.Location` of the returned time instants is the same as that of -// `fromTime`. -// -// A slice with len between [0-`n`] is returned, that is, if not enough existing -// matching time instants exist, the number of returned entries will be less -// than `n`. -func (expr *Expression) NextN(fromTime time.Time, n uint) []time.Time { - nextTimes := make([]time.Time, 0, n) - if n > 0 { - fromTime = expr.Next(fromTime) - for { - if fromTime.IsZero() { - break - } - nextTimes = append(nextTimes, fromTime) - n -= 1 - if n == 0 { - break - } - fromTime = expr.Next(fromTime) - } - } - return nextTimes -} diff --git a/vendor/github.com/hashicorp/cronexpr/cronexpr_next.go b/vendor/github.com/hashicorp/cronexpr/cronexpr_next.go deleted file mode 100644 index 157dc93b23..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/cronexpr_next.go +++ /dev/null @@ -1,155 +0,0 @@ -/*! - * Copyright 2013 Raymond Hill - * - * Modifications 2020 - HashiCorp - * - * Project: github.com/gorhill/cronexpr - * File: cronexpr_next.go - * Version: 1.0 - * License: pick the one which suits you : - * GPL v3 see - * APL v2 see - * - */ - -package cronexpr - -/******************************************************************************/ - -import ( - "sort" - "time" -) - -/******************************************************************************/ - -var dowNormalizedOffsets = [][]int{ - {1, 8, 15, 22, 29}, - {2, 9, 16, 23, 30}, - {3, 10, 17, 24, 31}, - {4, 11, 18, 25}, - {5, 12, 19, 26}, - {6, 13, 20, 27}, - {7, 14, 21, 28}, -} - -/******************************************************************************/ - -func (expr *Expression) calculateActualDaysOfMonth(year, month int) []int { - actualDaysOfMonthMap := make(map[int]bool) - firstDayOfMonth := time.Date(year, time.Month(month), 1, 0, 0, 0, 0, time.UTC) - lastDayOfMonth := firstDayOfMonth.AddDate(0, 1, -1) - - // As per crontab man page (http://linux.die.net/man/5/crontab#): - // "The day of a command's execution can be specified by two - // "fields - day of month, and day of week. If both fields are - // "restricted (ie, aren't *), the command will be run when - // "either field matches the current time" - - // If both fields are not restricted, all days of the month are a hit - if expr.daysOfMonthRestricted == false && expr.daysOfWeekRestricted == false { - return genericDefaultList[1 : lastDayOfMonth.Day()+1] - } - - // day-of-month != `*` - if expr.daysOfMonthRestricted { - // Last day of month - if expr.lastDayOfMonth { - actualDaysOfMonthMap[lastDayOfMonth.Day()] = true - } - // Last work day of month - if expr.lastWorkdayOfMonth { - actualDaysOfMonthMap[workdayOfMonth(lastDayOfMonth, lastDayOfMonth)] = true - } - // Days of month - for v := range expr.daysOfMonth { - // Ignore days beyond end of month - if v <= lastDayOfMonth.Day() { - actualDaysOfMonthMap[v] = true - } - } - // Work days of month - // As per Wikipedia: month boundaries are not crossed. - for v := range expr.workdaysOfMonth { - // Ignore days beyond end of month - if v <= lastDayOfMonth.Day() { - actualDaysOfMonthMap[workdayOfMonth(firstDayOfMonth.AddDate(0, 0, v-1), lastDayOfMonth)] = true - } - } - } - - // day-of-week != `*` - if expr.daysOfWeekRestricted { - // How far first sunday is from first day of month - offset := 7 - int(firstDayOfMonth.Weekday()) - // days of week - // offset : (7 - day_of_week_of_1st_day_of_month) - // target : 1 + (7 * week_of_month) + (offset + day_of_week) % 7 - for v := range expr.daysOfWeek { - w := dowNormalizedOffsets[(offset+v)%7] - actualDaysOfMonthMap[w[0]] = true - actualDaysOfMonthMap[w[1]] = true - actualDaysOfMonthMap[w[2]] = true - actualDaysOfMonthMap[w[3]] = true - if len(w) > 4 && w[4] <= lastDayOfMonth.Day() { - actualDaysOfMonthMap[w[4]] = true - } - } - // days of week of specific week in the month - // offset : (7 - day_of_week_of_1st_day_of_month) - // target : 1 + (7 * week_of_month) + (offset + day_of_week) % 7 - for v := range expr.specificWeekDaysOfWeek { - v = 1 + 7*(v/7) + (offset+v)%7 - if v <= lastDayOfMonth.Day() { - actualDaysOfMonthMap[v] = true - } - } - // Last days of week of the month - lastWeekOrigin := firstDayOfMonth.AddDate(0, 1, -7) - offset = 7 - int(lastWeekOrigin.Weekday()) - for v := range expr.lastWeekDaysOfWeek { - v = lastWeekOrigin.Day() + (offset+v)%7 - if v <= lastDayOfMonth.Day() { - actualDaysOfMonthMap[v] = true - } - } - } - - return toList(actualDaysOfMonthMap) -} - -func workdayOfMonth(targetDom, lastDom time.Time) int { - // If saturday, then friday - // If sunday, then monday - dom := targetDom.Day() - dow := targetDom.Weekday() - if dow == time.Saturday { - if dom > 1 { - dom -= 1 - } else { - dom += 2 - } - } else if dow == time.Sunday { - if dom < lastDom.Day() { - dom += 1 - } else { - dom -= 2 - } - } - return dom -} - -func sortContains(a []int, x int) bool { - i := sort.SearchInts(a, x) - return i < len(a) && a[i] == x -} - -func timeZoneInDay(t time.Time) bool { - if t.Location() == time.UTC { - return false - } - - _, off := t.AddDate(0, 0, -1).Zone() - _, ndoff := t.AddDate(0, 0, 1).Zone() - return off != ndoff -} diff --git a/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go b/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go deleted file mode 100644 index e32f870930..0000000000 --- a/vendor/github.com/hashicorp/cronexpr/cronexpr_parse.go +++ /dev/null @@ -1,509 +0,0 @@ -/*! - * Copyright 2013 Raymond Hill - * - * Modifications 2020 - HashiCorp - * - * Project: github.com/gorhill/cronexpr - * File: cronexpr_parse.go - * Version: 1.0 - * License: pick the one which suits you best: - * GPL v3 see - * APL v2 see - * - */ - -package cronexpr - -/******************************************************************************/ - -import ( - "fmt" - "regexp" - "sort" - "strings" - "sync" -) - -/******************************************************************************/ - -var ( - genericDefaultList = []int{ - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - } - yearDefaultList = []int{ - 1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979, - 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, - 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, - 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, - 2020, 2021, 2022, 2023, 2024, 2025, 2026, 2027, 2028, 2029, - 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, - 2040, 2041, 2042, 2043, 2044, 2045, 2046, 2047, 2048, 2049, - 2050, 2051, 2052, 2053, 2054, 2055, 2056, 2057, 2058, 2059, - 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, - 2070, 2071, 2072, 2073, 2074, 2075, 2076, 2077, 2078, 2079, - 2080, 2081, 2082, 2083, 2084, 2085, 2086, 2087, 2088, 2089, - 2090, 2091, 2092, 2093, 2094, 2095, 2096, 2097, 2098, 2099, - } -) - -/******************************************************************************/ - -var ( - numberTokens = map[string]int{ - "0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, - "00": 0, "01": 1, "02": 2, "03": 3, "04": 4, "05": 5, "06": 6, "07": 7, "08": 8, "09": 9, - "10": 10, "11": 11, "12": 12, "13": 13, "14": 14, "15": 15, "16": 16, "17": 17, "18": 18, "19": 19, - "20": 20, "21": 21, "22": 22, "23": 23, "24": 24, "25": 25, "26": 26, "27": 27, "28": 28, "29": 29, - "30": 30, "31": 31, "32": 32, "33": 33, "34": 34, "35": 35, "36": 36, "37": 37, "38": 38, "39": 39, - "40": 40, "41": 41, "42": 42, "43": 43, "44": 44, "45": 45, "46": 46, "47": 47, "48": 48, "49": 49, - "50": 50, "51": 51, "52": 52, "53": 53, "54": 54, "55": 55, "56": 56, "57": 57, "58": 58, "59": 59, - "1970": 1970, "1971": 1971, "1972": 1972, "1973": 1973, "1974": 1974, "1975": 1975, "1976": 1976, "1977": 1977, "1978": 1978, "1979": 1979, - "1980": 1980, "1981": 1981, "1982": 1982, "1983": 1983, "1984": 1984, "1985": 1985, "1986": 1986, "1987": 1987, "1988": 1988, "1989": 1989, - "1990": 1990, "1991": 1991, "1992": 1992, "1993": 1993, "1994": 1994, "1995": 1995, "1996": 1996, "1997": 1997, "1998": 1998, "1999": 1999, - "2000": 2000, "2001": 2001, "2002": 2002, "2003": 2003, "2004": 2004, "2005": 2005, "2006": 2006, "2007": 2007, "2008": 2008, "2009": 2009, - "2010": 2010, "2011": 2011, "2012": 2012, "2013": 2013, "2014": 2014, "2015": 2015, "2016": 2016, "2017": 2017, "2018": 2018, "2019": 2019, - "2020": 2020, "2021": 2021, "2022": 2022, "2023": 2023, "2024": 2024, "2025": 2025, "2026": 2026, "2027": 2027, "2028": 2028, "2029": 2029, - "2030": 2030, "2031": 2031, "2032": 2032, "2033": 2033, "2034": 2034, "2035": 2035, "2036": 2036, "2037": 2037, "2038": 2038, "2039": 2039, - "2040": 2040, "2041": 2041, "2042": 2042, "2043": 2043, "2044": 2044, "2045": 2045, "2046": 2046, "2047": 2047, "2048": 2048, "2049": 2049, - "2050": 2050, "2051": 2051, "2052": 2052, "2053": 2053, "2054": 2054, "2055": 2055, "2056": 2056, "2057": 2057, "2058": 2058, "2059": 2059, - "2060": 2060, "2061": 2061, "2062": 2062, "2063": 2063, "2064": 2064, "2065": 2065, "2066": 2066, "2067": 2067, "2068": 2068, "2069": 2069, - "2070": 2070, "2071": 2071, "2072": 2072, "2073": 2073, "2074": 2074, "2075": 2075, "2076": 2076, "2077": 2077, "2078": 2078, "2079": 2079, - "2080": 2080, "2081": 2081, "2082": 2082, "2083": 2083, "2084": 2084, "2085": 2085, "2086": 2086, "2087": 2087, "2088": 2088, "2089": 2089, - "2090": 2090, "2091": 2091, "2092": 2092, "2093": 2093, "2094": 2094, "2095": 2095, "2096": 2096, "2097": 2097, "2098": 2098, "2099": 2099, - } - monthTokens = map[string]int{ - `1`: 1, `01`: 1, `jan`: 1, `january`: 1, - `2`: 2, `02`: 2, `feb`: 2, `february`: 2, - `3`: 3, `03`: 3, `mar`: 3, `march`: 3, - `4`: 4, `04`: 4, `apr`: 4, `april`: 4, - `5`: 5, `05`: 5, `may`: 5, - `6`: 6, `06`: 6, `jun`: 6, `june`: 6, - `7`: 7, `07`: 7, `jul`: 7, `july`: 7, - `8`: 8, `08`: 8, `aug`: 8, `august`: 8, - `9`: 9, `09`: 9, `sep`: 9, `september`: 9, - `10`: 10, `oct`: 10, `october`: 10, - `11`: 11, `nov`: 11, `november`: 11, - `12`: 12, `dec`: 12, `december`: 12, - } - dowTokens = map[string]int{ - `0`: 0, `sun`: 0, `sunday`: 0, - `1`: 1, `mon`: 1, `monday`: 1, - `2`: 2, `tue`: 2, `tuesday`: 2, - `3`: 3, `wed`: 3, `wednesday`: 3, - `4`: 4, `thu`: 4, `thursday`: 4, - `5`: 5, `fri`: 5, `friday`: 5, - `6`: 6, `sat`: 6, `saturday`: 6, - `7`: 0, - } -) - -/******************************************************************************/ - -func atoi(s string) int { - return numberTokens[s] -} - -type fieldDescriptor struct { - name string - min, max int - defaultList []int - valuePattern string - atoi func(string) int -} - -var ( - secondDescriptor = fieldDescriptor{ - name: "second", - min: 0, - max: 59, - defaultList: genericDefaultList[0:60], - valuePattern: `0?[0-9]|[1-5][0-9]`, - atoi: atoi, - } - minuteDescriptor = fieldDescriptor{ - name: "minute", - min: 0, - max: 59, - defaultList: genericDefaultList[0:60], - valuePattern: `0?[0-9]|[1-5][0-9]`, - atoi: atoi, - } - hourDescriptor = fieldDescriptor{ - name: "hour", - min: 0, - max: 23, - defaultList: genericDefaultList[0:24], - valuePattern: `0?[0-9]|1[0-9]|2[0-3]`, - atoi: atoi, - } - domDescriptor = fieldDescriptor{ - name: "day-of-month", - min: 1, - max: 31, - defaultList: genericDefaultList[1:32], - valuePattern: `0?[1-9]|[12][0-9]|3[01]`, - atoi: atoi, - } - monthDescriptor = fieldDescriptor{ - name: "month", - min: 1, - max: 12, - defaultList: genericDefaultList[1:13], - valuePattern: `0?[1-9]|1[012]|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec|january|february|march|april|march|april|june|july|august|september|october|november|december`, - atoi: func(s string) int { - return monthTokens[s] - }, - } - dowDescriptor = fieldDescriptor{ - name: "day-of-week", - min: 0, - max: 6, - defaultList: genericDefaultList[0:7], - valuePattern: `0?[0-7]|sun|mon|tue|wed|thu|fri|sat|sunday|monday|tuesday|wednesday|thursday|friday|saturday`, - atoi: func(s string) int { - return dowTokens[s] - }, - } - yearDescriptor = fieldDescriptor{ - name: "year", - min: 1970, - max: 2099, - defaultList: yearDefaultList[:], - valuePattern: `19[789][0-9]|20[0-9]{2}`, - atoi: atoi, - } -) - -/******************************************************************************/ - -var ( - layoutWildcard = `^\*$|^\?$` - layoutValue = `^(%value%)$` - layoutRange = `^(%value%)-(%value%)$` - layoutWildcardAndInterval = `^\*/(\d+)$` - layoutValueAndInterval = `^(%value%)/(\d+)$` - layoutRangeAndInterval = `^(%value%)-(%value%)/(\d+)$` - layoutLastDom = `^l$` - layoutWorkdom = `^(%value%)w$` - layoutLastWorkdom = `^lw$` - layoutDowOfLastWeek = `^(%value%)l$` - layoutDowOfSpecificWeek = `^(%value%)#([1-5])$` - fieldFinder = regexp.MustCompile(`\S+`) - entryFinder = regexp.MustCompile(`[^,]+`) - layoutRegexp = make(map[string]*regexp.Regexp) - layoutRegexpLock sync.Mutex -) - -/******************************************************************************/ - -var cronNormalizer = strings.NewReplacer( - "@yearly", "0 0 0 1 1 * *", - "@annually", "0 0 0 1 1 * *", - "@monthly", "0 0 0 1 * * *", - "@weekly", "0 0 0 * * 0 *", - "@daily", "0 0 0 * * * *", - "@hourly", "0 0 * * * * *") - -/******************************************************************************/ - -func (expr *Expression) secondFieldHandler(s string) error { - var err error - expr.secondList, err = genericFieldHandler(s, secondDescriptor) - return err -} - -/******************************************************************************/ - -func (expr *Expression) minuteFieldHandler(s string) error { - var err error - expr.minuteList, err = genericFieldHandler(s, minuteDescriptor) - return err -} - -/******************************************************************************/ - -func (expr *Expression) hourFieldHandler(s string) error { - var err error - expr.hourList, err = genericFieldHandler(s, hourDescriptor) - return err -} - -/******************************************************************************/ - -func (expr *Expression) monthFieldHandler(s string) error { - var err error - expr.monthList, err = genericFieldHandler(s, monthDescriptor) - return err -} - -/******************************************************************************/ - -func (expr *Expression) yearFieldHandler(s string) error { - var err error - expr.yearList, err = genericFieldHandler(s, yearDescriptor) - return err -} - -/******************************************************************************/ - -const ( - none = 0 - one = 1 - span = 2 - all = 3 -) - -type cronDirective struct { - kind int - first int - last int - step int - sbeg int - send int -} - -func genericFieldHandler(s string, desc fieldDescriptor) ([]int, error) { - directives, err := genericFieldParse(s, desc) - if err != nil { - return nil, err - } - values := make(map[int]bool) - for _, directive := range directives { - switch directive.kind { - case none: - return nil, fmt.Errorf("syntax error in %s field: '%s'", desc.name, s[directive.sbeg:directive.send]) - case one: - populateOne(values, directive.first) - case span: - populateMany(values, directive.first, directive.last, directive.step) - case all: - return desc.defaultList, nil - } - } - return toList(values), nil -} - -func (expr *Expression) dowFieldHandler(s string) error { - expr.daysOfWeekRestricted = true - expr.daysOfWeek = make(map[int]bool) - expr.lastWeekDaysOfWeek = make(map[int]bool) - expr.specificWeekDaysOfWeek = make(map[int]bool) - - directives, err := genericFieldParse(s, dowDescriptor) - if err != nil { - return err - } - - for _, directive := range directives { - switch directive.kind { - case none: - sdirective := s[directive.sbeg:directive.send] - snormal := strings.ToLower(sdirective) - // `5L` - pairs := makeLayoutRegexp(layoutDowOfLastWeek, dowDescriptor.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - populateOne(expr.lastWeekDaysOfWeek, dowDescriptor.atoi(snormal[pairs[2]:pairs[3]])) - } else { - // `5#3` - pairs := makeLayoutRegexp(layoutDowOfSpecificWeek, dowDescriptor.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - populateOne(expr.specificWeekDaysOfWeek, (dowDescriptor.atoi(snormal[pairs[4]:pairs[5]])-1)*7+(dowDescriptor.atoi(snormal[pairs[2]:pairs[3]])%7)) - } else { - return fmt.Errorf("syntax error in day-of-week field: '%s'", sdirective) - } - } - case one: - populateOne(expr.daysOfWeek, directive.first) - case span: - // To properly handle spans that end in 7 (Sunday) - if directive.last == 0 { - directive.last = 6 - } - populateMany(expr.daysOfWeek, directive.first, directive.last, directive.step) - case all: - populateMany(expr.daysOfWeek, directive.first, directive.last, directive.step) - expr.daysOfWeekRestricted = false - } - } - return nil -} - -func (expr *Expression) domFieldHandler(s string) error { - expr.daysOfMonthRestricted = true - expr.lastDayOfMonth = false - expr.lastWorkdayOfMonth = false - expr.daysOfMonth = make(map[int]bool) // days of month map - expr.workdaysOfMonth = make(map[int]bool) // work days of month map - - directives, err := genericFieldParse(s, domDescriptor) - if err != nil { - return err - } - - for _, directive := range directives { - switch directive.kind { - case none: - sdirective := s[directive.sbeg:directive.send] - snormal := strings.ToLower(sdirective) - // `L` - if makeLayoutRegexp(layoutLastDom, domDescriptor.valuePattern).MatchString(snormal) { - expr.lastDayOfMonth = true - } else { - // `LW` - if makeLayoutRegexp(layoutLastWorkdom, domDescriptor.valuePattern).MatchString(snormal) { - expr.lastWorkdayOfMonth = true - } else { - // `15W` - pairs := makeLayoutRegexp(layoutWorkdom, domDescriptor.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - populateOne(expr.workdaysOfMonth, domDescriptor.atoi(snormal[pairs[2]:pairs[3]])) - } else { - return fmt.Errorf("syntax error in day-of-month field: '%s'", sdirective) - } - } - } - case one: - populateOne(expr.daysOfMonth, directive.first) - case span: - populateMany(expr.daysOfMonth, directive.first, directive.last, directive.step) - case all: - populateMany(expr.daysOfMonth, directive.first, directive.last, directive.step) - expr.daysOfMonthRestricted = false - } - } - return nil -} - -/******************************************************************************/ - -func populateOne(values map[int]bool, v int) { - values[v] = true -} - -func populateMany(values map[int]bool, min, max, step int) { - for i := min; i <= max; i += step { - values[i] = true - } -} - -func toList(set map[int]bool) []int { - list := make([]int, len(set)) - i := 0 - for k := range set { - list[i] = k - i += 1 - } - sort.Ints(list) - return list -} - -/******************************************************************************/ - -func genericFieldParse(s string, desc fieldDescriptor) ([]*cronDirective, error) { - // At least one entry must be present - indices := entryFinder.FindAllStringIndex(s, -1) - if len(indices) == 0 { - return nil, fmt.Errorf("%s field: missing directive", desc.name) - } - - directives := make([]*cronDirective, 0, len(indices)) - - for i := range indices { - directive := cronDirective{ - sbeg: indices[i][0], - send: indices[i][1], - } - snormal := strings.ToLower(s[indices[i][0]:indices[i][1]]) - - // `*` - if makeLayoutRegexp(layoutWildcard, desc.valuePattern).MatchString(snormal) { - directive.kind = all - directive.first = desc.min - directive.last = desc.max - directive.step = 1 - directives = append(directives, &directive) - continue - } - // `5` - if makeLayoutRegexp(layoutValue, desc.valuePattern).MatchString(snormal) { - directive.kind = one - directive.first = desc.atoi(snormal) - directives = append(directives, &directive) - continue - } - // `5-20` - pairs := makeLayoutRegexp(layoutRange, desc.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - directive.kind = span - directive.first = desc.atoi(snormal[pairs[2]:pairs[3]]) - directive.last = desc.atoi(snormal[pairs[4]:pairs[5]]) - directive.step = 1 - directives = append(directives, &directive) - continue - } - // `*/2` - pairs = makeLayoutRegexp(layoutWildcardAndInterval, desc.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - directive.kind = span - directive.first = desc.min - directive.last = desc.max - directive.step = atoi(snormal[pairs[2]:pairs[3]]) - if directive.step < 1 || directive.step > desc.max { - return nil, fmt.Errorf("invalid interval %s", snormal) - } - directives = append(directives, &directive) - continue - } - // `5/2` - pairs = makeLayoutRegexp(layoutValueAndInterval, desc.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - directive.kind = span - directive.first = desc.atoi(snormal[pairs[2]:pairs[3]]) - directive.last = desc.max - directive.step = atoi(snormal[pairs[4]:pairs[5]]) - if directive.step < 1 || directive.step > desc.max { - return nil, fmt.Errorf("invalid interval %s", snormal) - } - directives = append(directives, &directive) - continue - } - // `5-20/2` - pairs = makeLayoutRegexp(layoutRangeAndInterval, desc.valuePattern).FindStringSubmatchIndex(snormal) - if len(pairs) > 0 { - directive.kind = span - directive.first = desc.atoi(snormal[pairs[2]:pairs[3]]) - directive.last = desc.atoi(snormal[pairs[4]:pairs[5]]) - directive.step = atoi(snormal[pairs[6]:pairs[7]]) - if directive.step < 1 || directive.step > desc.max { - return nil, fmt.Errorf("invalid interval %s", snormal) - } - directives = append(directives, &directive) - continue - } - // No behavior for this one, let caller deal with it - directive.kind = none - directives = append(directives, &directive) - } - return directives, nil -} - -/******************************************************************************/ - -func makeLayoutRegexp(layout, value string) *regexp.Regexp { - layoutRegexpLock.Lock() - defer layoutRegexpLock.Unlock() - - layout = strings.Replace(layout, `%value%`, value, -1) - re := layoutRegexp[layout] - if re == nil { - re = regexp.MustCompile(layout) - layoutRegexp[layout] = re - } - return re -} diff --git a/vendor/github.com/hashicorp/errwrap/LICENSE b/vendor/github.com/hashicorp/errwrap/LICENSE deleted file mode 100644 index c33dcc7c92..0000000000 --- a/vendor/github.com/hashicorp/errwrap/LICENSE +++ /dev/null @@ -1,354 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/errwrap/README.md b/vendor/github.com/hashicorp/errwrap/README.md deleted file mode 100644 index 444df08f8e..0000000000 --- a/vendor/github.com/hashicorp/errwrap/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# errwrap - -`errwrap` is a package for Go that formalizes the pattern of wrapping errors -and checking if an error contains another error. - -There is a common pattern in Go of taking a returned `error` value and -then wrapping it (such as with `fmt.Errorf`) before returning it. The problem -with this pattern is that you completely lose the original `error` structure. - -Arguably the _correct_ approach is that you should make a custom structure -implementing the `error` interface, and have the original error as a field -on that structure, such [as this example](http://golang.org/pkg/os/#PathError). -This is a good approach, but you have to know the entire chain of possible -rewrapping that happens, when you might just care about one. - -`errwrap` formalizes this pattern (it doesn't matter what approach you use -above) by giving a single interface for wrapping errors, checking if a specific -error is wrapped, and extracting that error. - -## Installation and Docs - -Install using `go get github.com/hashicorp/errwrap`. - -Full documentation is available at -http://godoc.org/github.com/hashicorp/errwrap - -## Usage - -#### Basic Usage - -Below is a very basic example of its usage: - -```go -// A function that always returns an error, but wraps it, like a real -// function might. -func tryOpen() error { - _, err := os.Open("/i/dont/exist") - if err != nil { - return errwrap.Wrapf("Doesn't exist: {{err}}", err) - } - - return nil -} - -func main() { - err := tryOpen() - - // We can use the Contains helpers to check if an error contains - // another error. It is safe to do this with a nil error, or with - // an error that doesn't even use the errwrap package. - if errwrap.Contains(err, "does not exist") { - // Do something - } - if errwrap.ContainsType(err, new(os.PathError)) { - // Do something - } - - // Or we can use the associated `Get` functions to just extract - // a specific error. This would return nil if that specific error doesn't - // exist. - perr := errwrap.GetType(err, new(os.PathError)) -} -``` - -#### Custom Types - -If you're already making custom types that properly wrap errors, then -you can get all the functionality of `errwraps.Contains` and such by -implementing the `Wrapper` interface with just one function. Example: - -```go -type AppError { - Code ErrorCode - Err error -} - -func (e *AppError) WrappedErrors() []error { - return []error{e.Err} -} -``` - -Now this works: - -```go -err := &AppError{Err: fmt.Errorf("an error")} -if errwrap.ContainsType(err, fmt.Errorf("")) { - // This will work! -} -``` diff --git a/vendor/github.com/hashicorp/errwrap/errwrap.go b/vendor/github.com/hashicorp/errwrap/errwrap.go deleted file mode 100644 index 44e368e569..0000000000 --- a/vendor/github.com/hashicorp/errwrap/errwrap.go +++ /dev/null @@ -1,178 +0,0 @@ -// Package errwrap implements methods to formalize error wrapping in Go. -// -// All of the top-level functions that take an `error` are built to be able -// to take any error, not just wrapped errors. This allows you to use errwrap -// without having to type-check and type-cast everywhere. -package errwrap - -import ( - "errors" - "reflect" - "strings" -) - -// WalkFunc is the callback called for Walk. -type WalkFunc func(error) - -// Wrapper is an interface that can be implemented by custom types to -// have all the Contains, Get, etc. functions in errwrap work. -// -// When Walk reaches a Wrapper, it will call the callback for every -// wrapped error in addition to the wrapper itself. Since all the top-level -// functions in errwrap use Walk, this means that all those functions work -// with your custom type. -type Wrapper interface { - WrappedErrors() []error -} - -// Wrap defines that outer wraps inner, returning an error type that -// can be cleanly used with the other methods in this package, such as -// Contains, GetAll, etc. -// -// This function won't modify the error message at all (the outer message -// will be used). -func Wrap(outer, inner error) error { - return &wrappedError{ - Outer: outer, - Inner: inner, - } -} - -// Wrapf wraps an error with a formatting message. This is similar to using -// `fmt.Errorf` to wrap an error. If you're using `fmt.Errorf` to wrap -// errors, you should replace it with this. -// -// format is the format of the error message. The string '{{err}}' will -// be replaced with the original error message. -// -// Deprecated: Use fmt.Errorf() -func Wrapf(format string, err error) error { - outerMsg := "" - if err != nil { - outerMsg = err.Error() - } - - outer := errors.New(strings.Replace( - format, "{{err}}", outerMsg, -1)) - - return Wrap(outer, err) -} - -// Contains checks if the given error contains an error with the -// message msg. If err is not a wrapped error, this will always return -// false unless the error itself happens to match this msg. -func Contains(err error, msg string) bool { - return len(GetAll(err, msg)) > 0 -} - -// ContainsType checks if the given error contains an error with -// the same concrete type as v. If err is not a wrapped error, this will -// check the err itself. -func ContainsType(err error, v interface{}) bool { - return len(GetAllType(err, v)) > 0 -} - -// Get is the same as GetAll but returns the deepest matching error. -func Get(err error, msg string) error { - es := GetAll(err, msg) - if len(es) > 0 { - return es[len(es)-1] - } - - return nil -} - -// GetType is the same as GetAllType but returns the deepest matching error. -func GetType(err error, v interface{}) error { - es := GetAllType(err, v) - if len(es) > 0 { - return es[len(es)-1] - } - - return nil -} - -// GetAll gets all the errors that might be wrapped in err with the -// given message. The order of the errors is such that the outermost -// matching error (the most recent wrap) is index zero, and so on. -func GetAll(err error, msg string) []error { - var result []error - - Walk(err, func(err error) { - if err.Error() == msg { - result = append(result, err) - } - }) - - return result -} - -// GetAllType gets all the errors that are the same type as v. -// -// The order of the return value is the same as described in GetAll. -func GetAllType(err error, v interface{}) []error { - var result []error - - var search string - if v != nil { - search = reflect.TypeOf(v).String() - } - Walk(err, func(err error) { - var needle string - if err != nil { - needle = reflect.TypeOf(err).String() - } - - if needle == search { - result = append(result, err) - } - }) - - return result -} - -// Walk walks all the wrapped errors in err and calls the callback. If -// err isn't a wrapped error, this will be called once for err. If err -// is a wrapped error, the callback will be called for both the wrapper -// that implements error as well as the wrapped error itself. -func Walk(err error, cb WalkFunc) { - if err == nil { - return - } - - switch e := err.(type) { - case *wrappedError: - cb(e.Outer) - Walk(e.Inner, cb) - case Wrapper: - cb(err) - - for _, err := range e.WrappedErrors() { - Walk(err, cb) - } - case interface{ Unwrap() error }: - cb(err) - Walk(e.Unwrap(), cb) - default: - cb(err) - } -} - -// wrappedError is an implementation of error that has both the -// outer and inner errors. -type wrappedError struct { - Outer error - Inner error -} - -func (w *wrappedError) Error() string { - return w.Outer.Error() -} - -func (w *wrappedError) WrappedErrors() []error { - return []error{w.Outer, w.Inner} -} - -func (w *wrappedError) Unwrap() error { - return w.Inner -} diff --git a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE b/vendor/github.com/hashicorp/go-cleanhttp/LICENSE deleted file mode 100644 index e87a115e46..0000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/LICENSE +++ /dev/null @@ -1,363 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/go-cleanhttp/README.md b/vendor/github.com/hashicorp/go-cleanhttp/README.md deleted file mode 100644 index 036e5313fc..0000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# cleanhttp - -Functions for accessing "clean" Go http.Client values - -------------- - -The Go standard library contains a default `http.Client` called -`http.DefaultClient`. It is a common idiom in Go code to start with -`http.DefaultClient` and tweak it as necessary, and in fact, this is -encouraged; from the `http` package documentation: - -> The Client's Transport typically has internal state (cached TCP connections), -so Clients should be reused instead of created as needed. Clients are safe for -concurrent use by multiple goroutines. - -Unfortunately, this is a shared value, and it is not uncommon for libraries to -assume that they are free to modify it at will. With enough dependencies, it -can be very easy to encounter strange problems and race conditions due to -manipulation of this shared value across libraries and goroutines (clients are -safe for concurrent use, but writing values to the client struct itself is not -protected). - -Making things worse is the fact that a bare `http.Client` will use a default -`http.Transport` called `http.DefaultTransport`, which is another global value -that behaves the same way. So it is not simply enough to replace -`http.DefaultClient` with `&http.Client{}`. - -This repository provides some simple functions to get a "clean" `http.Client` --- one that uses the same default values as the Go standard library, but -returns a client that does not share any state with other clients. diff --git a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go b/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go deleted file mode 100644 index fe28d15b6f..0000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/cleanhttp.go +++ /dev/null @@ -1,58 +0,0 @@ -package cleanhttp - -import ( - "net" - "net/http" - "runtime" - "time" -) - -// DefaultTransport returns a new http.Transport with similar default values to -// http.DefaultTransport, but with idle connections and keepalives disabled. -func DefaultTransport() *http.Transport { - transport := DefaultPooledTransport() - transport.DisableKeepAlives = true - transport.MaxIdleConnsPerHost = -1 - return transport -} - -// DefaultPooledTransport returns a new http.Transport with similar default -// values to http.DefaultTransport. Do not use this for transient transports as -// it can leak file descriptors over time. Only use this for transports that -// will be re-used for the same host(s). -func DefaultPooledTransport() *http.Transport { - transport := &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - ForceAttemptHTTP2: true, - MaxIdleConnsPerHost: runtime.GOMAXPROCS(0) + 1, - } - return transport -} - -// DefaultClient returns a new http.Client with similar default values to -// http.Client, but with a non-shared Transport, idle connections disabled, and -// keepalives disabled. -func DefaultClient() *http.Client { - return &http.Client{ - Transport: DefaultTransport(), - } -} - -// DefaultPooledClient returns a new http.Client with similar default values to -// http.Client, but with a shared Transport. Do not use this function for -// transient clients as it can leak file descriptors over time. Only use this -// for clients that will be re-used for the same host(s). -func DefaultPooledClient() *http.Client { - return &http.Client{ - Transport: DefaultPooledTransport(), - } -} diff --git a/vendor/github.com/hashicorp/go-cleanhttp/doc.go b/vendor/github.com/hashicorp/go-cleanhttp/doc.go deleted file mode 100644 index 05841092a7..0000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Package cleanhttp offers convenience utilities for acquiring "clean" -// http.Transport and http.Client structs. -// -// Values set on http.DefaultClient and http.DefaultTransport affect all -// callers. This can have detrimental effects, esepcially in TLS contexts, -// where client or root certificates set to talk to multiple endpoints can end -// up displacing each other, leading to hard-to-debug issues. This package -// provides non-shared http.Client and http.Transport structs to ensure that -// the configuration will not be overwritten by other parts of the application -// or dependencies. -// -// The DefaultClient and DefaultTransport functions disable idle connections -// and keepalives. Without ensuring that idle connections are closed before -// garbage collection, short-term clients/transports can leak file descriptors, -// eventually leading to "too many open files" errors. If you will be -// connecting to the same hosts repeatedly from the same client, you can use -// DefaultPooledClient to receive a client that has connection pooling -// semantics similar to http.DefaultClient. -// -package cleanhttp diff --git a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go b/vendor/github.com/hashicorp/go-cleanhttp/handlers.go deleted file mode 100644 index 3c845dc0dc..0000000000 --- a/vendor/github.com/hashicorp/go-cleanhttp/handlers.go +++ /dev/null @@ -1,48 +0,0 @@ -package cleanhttp - -import ( - "net/http" - "strings" - "unicode" -) - -// HandlerInput provides input options to cleanhttp's handlers -type HandlerInput struct { - ErrStatus int -} - -// PrintablePathCheckHandler is a middleware that ensures the request path -// contains only printable runes. -func PrintablePathCheckHandler(next http.Handler, input *HandlerInput) http.Handler { - // Nil-check on input to make it optional - if input == nil { - input = &HandlerInput{ - ErrStatus: http.StatusBadRequest, - } - } - - // Default to http.StatusBadRequest on error - if input.ErrStatus == 0 { - input.ErrStatus = http.StatusBadRequest - } - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r != nil { - // Check URL path for non-printable characters - idx := strings.IndexFunc(r.URL.Path, func(c rune) bool { - return !unicode.IsPrint(c) - }) - - if idx != -1 { - w.WriteHeader(input.ErrStatus) - return - } - - if next != nil { - next.ServeHTTP(w, r) - } - } - - return - }) -} diff --git a/vendor/github.com/hashicorp/go-multierror/LICENSE b/vendor/github.com/hashicorp/go-multierror/LICENSE deleted file mode 100644 index 82b4de97c7..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/LICENSE +++ /dev/null @@ -1,353 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. diff --git a/vendor/github.com/hashicorp/go-multierror/Makefile b/vendor/github.com/hashicorp/go-multierror/Makefile deleted file mode 100644 index b97cd6ed02..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -TEST?=./... - -default: test - -# test runs the test suite and vets the code. -test: generate - @echo "==> Running tests..." - @go list $(TEST) \ - | grep -v "/vendor/" \ - | xargs -n1 go test -timeout=60s -parallel=10 ${TESTARGS} - -# testrace runs the race checker -testrace: generate - @echo "==> Running tests (race)..." - @go list $(TEST) \ - | grep -v "/vendor/" \ - | xargs -n1 go test -timeout=60s -race ${TESTARGS} - -# updatedeps installs all the dependencies needed to run and build. -updatedeps: - @sh -c "'${CURDIR}/scripts/deps.sh' '${NAME}'" - -# generate runs `go generate` to build the dynamically generated source files. -generate: - @echo "==> Generating..." - @find . -type f -name '.DS_Store' -delete - @go list ./... \ - | grep -v "/vendor/" \ - | xargs -n1 go generate - -.PHONY: default test testrace updatedeps generate diff --git a/vendor/github.com/hashicorp/go-multierror/README.md b/vendor/github.com/hashicorp/go-multierror/README.md deleted file mode 100644 index 71dd308ed8..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/README.md +++ /dev/null @@ -1,150 +0,0 @@ -# go-multierror - -[![CircleCI](https://img.shields.io/circleci/build/github/hashicorp/go-multierror/master)](https://circleci.com/gh/hashicorp/go-multierror) -[![Go Reference](https://pkg.go.dev/badge/github.com/hashicorp/go-multierror.svg)](https://pkg.go.dev/github.com/hashicorp/go-multierror) -![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/hashicorp/go-multierror) - -[circleci]: https://app.circleci.com/pipelines/github/hashicorp/go-multierror -[godocs]: https://pkg.go.dev/github.com/hashicorp/go-multierror - -`go-multierror` is a package for Go that provides a mechanism for -representing a list of `error` values as a single `error`. - -This allows a function in Go to return an `error` that might actually -be a list of errors. If the caller knows this, they can unwrap the -list and access the errors. If the caller doesn't know, the error -formats to a nice human-readable format. - -`go-multierror` is fully compatible with the Go standard library -[errors](https://golang.org/pkg/errors/) package, including the -functions `As`, `Is`, and `Unwrap`. This provides a standardized approach -for introspecting on error values. - -## Installation and Docs - -Install using `go get github.com/hashicorp/go-multierror`. - -Full documentation is available at -https://pkg.go.dev/github.com/hashicorp/go-multierror - -### Requires go version 1.13 or newer - -`go-multierror` requires go version 1.13 or newer. Go 1.13 introduced -[error wrapping](https://golang.org/doc/go1.13#error_wrapping), which -this library takes advantage of. - -If you need to use an earlier version of go, you can use the -[v1.0.0](https://github.com/hashicorp/go-multierror/tree/v1.0.0) -tag, which doesn't rely on features in go 1.13. - -If you see compile errors that look like the below, it's likely that -you're on an older version of go: - -``` -/go/src/github.com/hashicorp/go-multierror/multierror.go:112:9: undefined: errors.As -/go/src/github.com/hashicorp/go-multierror/multierror.go:117:9: undefined: errors.Is -``` - -## Usage - -go-multierror is easy to use and purposely built to be unobtrusive in -existing Go applications/libraries that may not be aware of it. - -**Building a list of errors** - -The `Append` function is used to create a list of errors. This function -behaves a lot like the Go built-in `append` function: it doesn't matter -if the first argument is nil, a `multierror.Error`, or any other `error`, -the function behaves as you would expect. - -```go -var result error - -if err := step1(); err != nil { - result = multierror.Append(result, err) -} -if err := step2(); err != nil { - result = multierror.Append(result, err) -} - -return result -``` - -**Customizing the formatting of the errors** - -By specifying a custom `ErrorFormat`, you can customize the format -of the `Error() string` function: - -```go -var result *multierror.Error - -// ... accumulate errors here, maybe using Append - -if result != nil { - result.ErrorFormat = func([]error) string { - return "errors!" - } -} -``` - -**Accessing the list of errors** - -`multierror.Error` implements `error` so if the caller doesn't know about -multierror, it will work just fine. But if you're aware a multierror might -be returned, you can use type switches to access the list of errors: - -```go -if err := something(); err != nil { - if merr, ok := err.(*multierror.Error); ok { - // Use merr.Errors - } -} -``` - -You can also use the standard [`errors.Unwrap`](https://golang.org/pkg/errors/#Unwrap) -function. This will continue to unwrap into subsequent errors until none exist. - -**Extracting an error** - -The standard library [`errors.As`](https://golang.org/pkg/errors/#As) -function can be used directly with a multierror to extract a specific error: - -```go -// Assume err is a multierror value -err := somefunc() - -// We want to know if "err" has a "RichErrorType" in it and extract it. -var errRich RichErrorType -if errors.As(err, &errRich) { - // It has it, and now errRich is populated. -} -``` - -**Checking for an exact error value** - -Some errors are returned as exact errors such as the [`ErrNotExist`](https://golang.org/pkg/os/#pkg-variables) -error in the `os` package. You can check if this error is present by using -the standard [`errors.Is`](https://golang.org/pkg/errors/#Is) function. - -```go -// Assume err is a multierror value -err := somefunc() -if errors.Is(err, os.ErrNotExist) { - // err contains os.ErrNotExist -} -``` - -**Returning a multierror only if there are errors** - -If you build a `multierror.Error`, you can use the `ErrorOrNil` function -to return an `error` implementation only if there are errors to return: - -```go -var result *multierror.Error - -// ... accumulate errors here - -// Return the `error` only if errors were added to the multierror, otherwise -// return nil since there are no errors. -return result.ErrorOrNil() -``` diff --git a/vendor/github.com/hashicorp/go-multierror/append.go b/vendor/github.com/hashicorp/go-multierror/append.go deleted file mode 100644 index 3e2589bfde..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/append.go +++ /dev/null @@ -1,43 +0,0 @@ -package multierror - -// Append is a helper function that will append more errors -// onto an Error in order to create a larger multi-error. -// -// If err is not a multierror.Error, then it will be turned into -// one. If any of the errs are multierr.Error, they will be flattened -// one level into err. -// Any nil errors within errs will be ignored. If err is nil, a new -// *Error will be returned. -func Append(err error, errs ...error) *Error { - switch err := err.(type) { - case *Error: - // Typed nils can reach here, so initialize if we are nil - if err == nil { - err = new(Error) - } - - // Go through each error and flatten - for _, e := range errs { - switch e := e.(type) { - case *Error: - if e != nil { - err.Errors = append(err.Errors, e.Errors...) - } - default: - if e != nil { - err.Errors = append(err.Errors, e) - } - } - } - - return err - default: - newErrs := make([]error, 0, len(errs)+1) - if err != nil { - newErrs = append(newErrs, err) - } - newErrs = append(newErrs, errs...) - - return Append(&Error{}, newErrs...) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/flatten.go b/vendor/github.com/hashicorp/go-multierror/flatten.go deleted file mode 100644 index aab8e9abec..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/flatten.go +++ /dev/null @@ -1,26 +0,0 @@ -package multierror - -// Flatten flattens the given error, merging any *Errors together into -// a single *Error. -func Flatten(err error) error { - // If it isn't an *Error, just return the error as-is - if _, ok := err.(*Error); !ok { - return err - } - - // Otherwise, make the result and flatten away! - flatErr := new(Error) - flatten(err, flatErr) - return flatErr -} - -func flatten(err error, flatErr *Error) { - switch err := err.(type) { - case *Error: - for _, e := range err.Errors { - flatten(e, flatErr) - } - default: - flatErr.Errors = append(flatErr.Errors, err) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/format.go b/vendor/github.com/hashicorp/go-multierror/format.go deleted file mode 100644 index 47f13c49a6..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/format.go +++ /dev/null @@ -1,27 +0,0 @@ -package multierror - -import ( - "fmt" - "strings" -) - -// ErrorFormatFunc is a function callback that is called by Error to -// turn the list of errors into a string. -type ErrorFormatFunc func([]error) string - -// ListFormatFunc is a basic formatter that outputs the number of errors -// that occurred along with a bullet point list of the errors. -func ListFormatFunc(es []error) string { - if len(es) == 1 { - return fmt.Sprintf("1 error occurred:\n\t* %s\n\n", es[0]) - } - - points := make([]string, len(es)) - for i, err := range es { - points[i] = fmt.Sprintf("* %s", err) - } - - return fmt.Sprintf( - "%d errors occurred:\n\t%s\n\n", - len(es), strings.Join(points, "\n\t")) -} diff --git a/vendor/github.com/hashicorp/go-multierror/group.go b/vendor/github.com/hashicorp/go-multierror/group.go deleted file mode 100644 index 9c29efb7f8..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/group.go +++ /dev/null @@ -1,38 +0,0 @@ -package multierror - -import "sync" - -// Group is a collection of goroutines which return errors that need to be -// coalesced. -type Group struct { - mutex sync.Mutex - err *Error - wg sync.WaitGroup -} - -// Go calls the given function in a new goroutine. -// -// If the function returns an error it is added to the group multierror which -// is returned by Wait. -func (g *Group) Go(f func() error) { - g.wg.Add(1) - - go func() { - defer g.wg.Done() - - if err := f(); err != nil { - g.mutex.Lock() - g.err = Append(g.err, err) - g.mutex.Unlock() - } - }() -} - -// Wait blocks until all function calls from the Go method have returned, then -// returns the multierror. -func (g *Group) Wait() *Error { - g.wg.Wait() - g.mutex.Lock() - defer g.mutex.Unlock() - return g.err -} diff --git a/vendor/github.com/hashicorp/go-multierror/multierror.go b/vendor/github.com/hashicorp/go-multierror/multierror.go deleted file mode 100644 index f545743264..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/multierror.go +++ /dev/null @@ -1,121 +0,0 @@ -package multierror - -import ( - "errors" - "fmt" -) - -// Error is an error type to track multiple errors. This is used to -// accumulate errors in cases and return them as a single "error". -type Error struct { - Errors []error - ErrorFormat ErrorFormatFunc -} - -func (e *Error) Error() string { - fn := e.ErrorFormat - if fn == nil { - fn = ListFormatFunc - } - - return fn(e.Errors) -} - -// ErrorOrNil returns an error interface if this Error represents -// a list of errors, or returns nil if the list of errors is empty. This -// function is useful at the end of accumulation to make sure that the value -// returned represents the existence of errors. -func (e *Error) ErrorOrNil() error { - if e == nil { - return nil - } - if len(e.Errors) == 0 { - return nil - } - - return e -} - -func (e *Error) GoString() string { - return fmt.Sprintf("*%#v", *e) -} - -// WrappedErrors returns the list of errors that this Error is wrapping. It is -// an implementation of the errwrap.Wrapper interface so that multierror.Error -// can be used with that library. -// -// This method is not safe to be called concurrently. Unlike accessing the -// Errors field directly, this function also checks if the multierror is nil to -// prevent a null-pointer panic. It satisfies the errwrap.Wrapper interface. -func (e *Error) WrappedErrors() []error { - if e == nil { - return nil - } - return e.Errors -} - -// Unwrap returns an error from Error (or nil if there are no errors). -// This error returned will further support Unwrap to get the next error, -// etc. The order will match the order of Errors in the multierror.Error -// at the time of calling. -// -// The resulting error supports errors.As/Is/Unwrap so you can continue -// to use the stdlib errors package to introspect further. -// -// This will perform a shallow copy of the errors slice. Any errors appended -// to this error after calling Unwrap will not be available until a new -// Unwrap is called on the multierror.Error. -func (e *Error) Unwrap() error { - // If we have no errors then we do nothing - if e == nil || len(e.Errors) == 0 { - return nil - } - - // If we have exactly one error, we can just return that directly. - if len(e.Errors) == 1 { - return e.Errors[0] - } - - // Shallow copy the slice - errs := make([]error, len(e.Errors)) - copy(errs, e.Errors) - return chain(errs) -} - -// chain implements the interfaces necessary for errors.Is/As/Unwrap to -// work in a deterministic way with multierror. A chain tracks a list of -// errors while accounting for the current represented error. This lets -// Is/As be meaningful. -// -// Unwrap returns the next error. In the cleanest form, Unwrap would return -// the wrapped error here but we can't do that if we want to properly -// get access to all the errors. Instead, users are recommended to use -// Is/As to get the correct error type out. -// -// Precondition: []error is non-empty (len > 0) -type chain []error - -// Error implements the error interface -func (e chain) Error() string { - return e[0].Error() -} - -// Unwrap implements errors.Unwrap by returning the next error in the -// chain or nil if there are no more errors. -func (e chain) Unwrap() error { - if len(e) == 1 { - return nil - } - - return e[1:] -} - -// As implements errors.As by attempting to map to the current value. -func (e chain) As(target interface{}) bool { - return errors.As(e[0], target) -} - -// Is implements errors.Is by comparing the current value directly. -func (e chain) Is(target error) bool { - return errors.Is(e[0], target) -} diff --git a/vendor/github.com/hashicorp/go-multierror/prefix.go b/vendor/github.com/hashicorp/go-multierror/prefix.go deleted file mode 100644 index 5c477abe44..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/prefix.go +++ /dev/null @@ -1,37 +0,0 @@ -package multierror - -import ( - "fmt" - - "github.com/hashicorp/errwrap" -) - -// Prefix is a helper function that will prefix some text -// to the given error. If the error is a multierror.Error, then -// it will be prefixed to each wrapped error. -// -// This is useful to use when appending multiple multierrors -// together in order to give better scoping. -func Prefix(err error, prefix string) error { - if err == nil { - return nil - } - - format := fmt.Sprintf("%s {{err}}", prefix) - switch err := err.(type) { - case *Error: - // Typed nils can reach here, so initialize if we are nil - if err == nil { - err = new(Error) - } - - // Wrap each of the errors - for i, e := range err.Errors { - err.Errors[i] = errwrap.Wrapf(format, e) - } - - return err - default: - return errwrap.Wrapf(format, err) - } -} diff --git a/vendor/github.com/hashicorp/go-multierror/sort.go b/vendor/github.com/hashicorp/go-multierror/sort.go deleted file mode 100644 index fecb14e81c..0000000000 --- a/vendor/github.com/hashicorp/go-multierror/sort.go +++ /dev/null @@ -1,16 +0,0 @@ -package multierror - -// Len implements sort.Interface function for length -func (err Error) Len() int { - return len(err.Errors) -} - -// Swap implements sort.Interface function for swapping elements -func (err Error) Swap(i, j int) { - err.Errors[i], err.Errors[j] = err.Errors[j], err.Errors[i] -} - -// Less implements sort.Interface function for determining order -func (err Error) Less(i, j int) bool { - return err.Errors[i].Error() < err.Errors[j].Error() -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml b/vendor/github.com/hashicorp/go-rootcerts/.travis.yml deleted file mode 100644 index 80e1de44e9..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -sudo: false - -language: go - -go: - - 1.6 - -branches: - only: - - master - -script: make test diff --git a/vendor/github.com/hashicorp/go-rootcerts/LICENSE b/vendor/github.com/hashicorp/go-rootcerts/LICENSE deleted file mode 100644 index e87a115e46..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/LICENSE +++ /dev/null @@ -1,363 +0,0 @@ -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/go-rootcerts/Makefile b/vendor/github.com/hashicorp/go-rootcerts/Makefile deleted file mode 100644 index c3989e789f..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -TEST?=./... - -test: - go test $(TEST) $(TESTARGS) -timeout=3s -parallel=4 - go vet $(TEST) - go test $(TEST) -race - -.PHONY: test diff --git a/vendor/github.com/hashicorp/go-rootcerts/README.md b/vendor/github.com/hashicorp/go-rootcerts/README.md deleted file mode 100644 index 6a128e1e14..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# rootcerts - -Functions for loading root certificates for TLS connections. - ------ - -Go's standard library `crypto/tls` provides a common mechanism for configuring -TLS connections in `tls.Config`. The `RootCAs` field on this struct is a pool -of certificates for the client to use as a trust store when verifying server -certificates. - -This library contains utility functions for loading certificates destined for -that field, as well as one other important thing: - -When the `RootCAs` field is `nil`, the standard library attempts to load the -host's root CA set. This behavior is OS-specific, and the Darwin -implementation contains [a bug that prevents trusted certificates from the -System and Login keychains from being loaded][1]. This library contains -Darwin-specific behavior that works around that bug. - -[1]: https://github.com/golang/go/issues/14514 - -## Example Usage - -Here's a snippet demonstrating how this library is meant to be used: - -```go -func httpClient() (*http.Client, error) - tlsConfig := &tls.Config{} - err := rootcerts.ConfigureTLS(tlsConfig, &rootcerts.Config{ - CAFile: os.Getenv("MYAPP_CAFILE"), - CAPath: os.Getenv("MYAPP_CAPATH"), - Certificate: os.Getenv("MYAPP_CERTIFICATE"), - }) - if err != nil { - return nil, err - } - c := cleanhttp.DefaultClient() - t := cleanhttp.DefaultTransport() - t.TLSClientConfig = tlsConfig - c.Transport = t - return c, nil -} -``` diff --git a/vendor/github.com/hashicorp/go-rootcerts/doc.go b/vendor/github.com/hashicorp/go-rootcerts/doc.go deleted file mode 100644 index b55cc62848..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Package rootcerts contains functions to aid in loading CA certificates for -// TLS connections. -// -// In addition, its default behavior on Darwin works around an open issue [1] -// in Go's crypto/x509 that prevents certicates from being loaded from the -// System or Login keychains. -// -// [1] https://github.com/golang/go/issues/14514 -package rootcerts diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go deleted file mode 100644 index 69aabd6bc7..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts.go +++ /dev/null @@ -1,123 +0,0 @@ -package rootcerts - -import ( - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" -) - -// Config determines where LoadCACerts will load certificates from. When CAFile, -// CACertificate and CAPath are blank, this library's functions will either load -// system roots explicitly and return them, or set the CertPool to nil to allow -// Go's standard library to load system certs. -type Config struct { - // CAFile is a path to a PEM-encoded certificate file or bundle. Takes - // precedence over CACertificate and CAPath. - CAFile string - - // CACertificate is a PEM-encoded certificate or bundle. Takes precedence - // over CAPath. - CACertificate []byte - - // CAPath is a path to a directory populated with PEM-encoded certificates. - CAPath string -} - -// ConfigureTLS sets up the RootCAs on the provided tls.Config based on the -// Config specified. -func ConfigureTLS(t *tls.Config, c *Config) error { - if t == nil { - return nil - } - pool, err := LoadCACerts(c) - if err != nil { - return err - } - t.RootCAs = pool - return nil -} - -// LoadCACerts loads a CertPool based on the Config specified. -func LoadCACerts(c *Config) (*x509.CertPool, error) { - if c == nil { - c = &Config{} - } - if c.CAFile != "" { - return LoadCAFile(c.CAFile) - } - if len(c.CACertificate) != 0 { - return AppendCertificate(c.CACertificate) - } - if c.CAPath != "" { - return LoadCAPath(c.CAPath) - } - - return LoadSystemCAs() -} - -// LoadCAFile loads a single PEM-encoded file from the path specified. -func LoadCAFile(caFile string) (*x509.CertPool, error) { - pool := x509.NewCertPool() - - pem, err := ioutil.ReadFile(caFile) - if err != nil { - return nil, fmt.Errorf("Error loading CA File: %s", err) - } - - ok := pool.AppendCertsFromPEM(pem) - if !ok { - return nil, fmt.Errorf("Error loading CA File: Couldn't parse PEM in: %s", caFile) - } - - return pool, nil -} - -// AppendCertificate appends an in-memory PEM-encoded certificate or bundle and returns a pool. -func AppendCertificate(ca []byte) (*x509.CertPool, error) { - pool := x509.NewCertPool() - - ok := pool.AppendCertsFromPEM(ca) - if !ok { - return nil, errors.New("Error appending CA: Couldn't parse PEM") - } - - return pool, nil -} - -// LoadCAPath walks the provided path and loads all certificates encounted into -// a pool. -func LoadCAPath(caPath string) (*x509.CertPool, error) { - pool := x509.NewCertPool() - walkFn := func(path string, info os.FileInfo, err error) error { - if err != nil { - return err - } - - if info.IsDir() { - return nil - } - - pem, err := ioutil.ReadFile(path) - if err != nil { - return fmt.Errorf("Error loading file from CAPath: %s", err) - } - - ok := pool.AppendCertsFromPEM(pem) - if !ok { - return fmt.Errorf("Error loading CA Path: Couldn't parse PEM in: %s", path) - } - - return nil - } - - err := filepath.Walk(caPath, walkFn) - if err != nil { - return nil, err - } - - return pool, nil -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go deleted file mode 100644 index 66b1472c4a..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_base.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build !darwin - -package rootcerts - -import "crypto/x509" - -// LoadSystemCAs does nothing on non-Darwin systems. We return nil so that -// default behavior of standard TLS config libraries is triggered, which is to -// load system certs. -func LoadSystemCAs() (*x509.CertPool, error) { - return nil, nil -} diff --git a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go b/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go deleted file mode 100644 index a9a040657f..0000000000 --- a/vendor/github.com/hashicorp/go-rootcerts/rootcerts_darwin.go +++ /dev/null @@ -1,48 +0,0 @@ -package rootcerts - -import ( - "crypto/x509" - "os/exec" - "path" - - "github.com/mitchellh/go-homedir" -) - -// LoadSystemCAs has special behavior on Darwin systems to work around -func LoadSystemCAs() (*x509.CertPool, error) { - pool := x509.NewCertPool() - - for _, keychain := range certKeychains() { - err := addCertsFromKeychain(pool, keychain) - if err != nil { - return nil, err - } - } - - return pool, nil -} - -func addCertsFromKeychain(pool *x509.CertPool, keychain string) error { - cmd := exec.Command("/usr/bin/security", "find-certificate", "-a", "-p", keychain) - data, err := cmd.Output() - if err != nil { - return err - } - - pool.AppendCertsFromPEM(data) - - return nil -} - -func certKeychains() []string { - keychains := []string{ - "/System/Library/Keychains/SystemRootCertificates.keychain", - "/Library/Keychains/System.keychain", - } - home, err := homedir.Dir() - if err == nil { - loginKeychain := path.Join(home, "Library", "Keychains", "login.keychain") - keychains = append(keychains, loginKeychain) - } - return keychains -} diff --git a/vendor/github.com/hashicorp/go-version/CHANGELOG.md b/vendor/github.com/hashicorp/go-version/CHANGELOG.md deleted file mode 100644 index 6d48174bfb..0000000000 --- a/vendor/github.com/hashicorp/go-version/CHANGELOG.md +++ /dev/null @@ -1,64 +0,0 @@ -# 1.7.0 (May 24, 2024) - -ENHANCEMENTS: - -- Remove `reflect` dependency ([#91](https://github.com/hashicorp/go-version/pull/91)) -- Implement the `database/sql.Scanner` and `database/sql/driver.Value` interfaces for `Version` ([#133](https://github.com/hashicorp/go-version/pull/133)) - -INTERNAL: - -- [COMPLIANCE] Add Copyright and License Headers ([#115](https://github.com/hashicorp/go-version/pull/115)) -- [COMPLIANCE] Update MPL-2.0 LICENSE ([#105](https://github.com/hashicorp/go-version/pull/105)) -- Bump actions/cache from 3.0.11 to 3.2.5 ([#116](https://github.com/hashicorp/go-version/pull/116)) -- Bump actions/checkout from 3.2.0 to 3.3.0 ([#111](https://github.com/hashicorp/go-version/pull/111)) -- Bump actions/upload-artifact from 3.1.1 to 3.1.2 ([#112](https://github.com/hashicorp/go-version/pull/112)) -- GHA Migration ([#103](https://github.com/hashicorp/go-version/pull/103)) -- github: Pin external GitHub Actions to hashes ([#107](https://github.com/hashicorp/go-version/pull/107)) -- SEC-090: Automated trusted workflow pinning (2023-04-05) ([#124](https://github.com/hashicorp/go-version/pull/124)) -- update readme ([#104](https://github.com/hashicorp/go-version/pull/104)) - -# 1.6.0 (June 28, 2022) - -FEATURES: - -- Add `Prerelease` function to `Constraint` to return true if the version includes a prerelease field ([#100](https://github.com/hashicorp/go-version/pull/100)) - -# 1.5.0 (May 18, 2022) - -FEATURES: - -- Use `encoding` `TextMarshaler` & `TextUnmarshaler` instead of JSON equivalents ([#95](https://github.com/hashicorp/go-version/pull/95)) -- Add JSON handlers to allow parsing from/to JSON ([#93](https://github.com/hashicorp/go-version/pull/93)) - -# 1.4.0 (January 5, 2022) - -FEATURES: - - - Introduce `MustConstraints()` ([#87](https://github.com/hashicorp/go-version/pull/87)) - - `Constraints`: Introduce `Equals()` and `sort.Interface` methods ([#88](https://github.com/hashicorp/go-version/pull/88)) - -# 1.3.0 (March 31, 2021) - -Please note that CHANGELOG.md does not exist in the source code prior to this release. - -FEATURES: - - Add `Core` function to return a version without prerelease or metadata ([#85](https://github.com/hashicorp/go-version/pull/85)) - -# 1.2.1 (June 17, 2020) - -BUG FIXES: - - Prevent `Version.Equal` method from panicking on `nil` encounter ([#73](https://github.com/hashicorp/go-version/pull/73)) - -# 1.2.0 (April 23, 2019) - -FEATURES: - - Add `GreaterThanOrEqual` and `LessThanOrEqual` helper methods ([#53](https://github.com/hashicorp/go-version/pull/53)) - -# 1.1.0 (Jan 07, 2019) - -FEATURES: - - Add `NewSemver` constructor ([#45](https://github.com/hashicorp/go-version/pull/45)) - -# 1.0.0 (August 24, 2018) - -Initial release. diff --git a/vendor/github.com/hashicorp/go-version/LICENSE b/vendor/github.com/hashicorp/go-version/LICENSE deleted file mode 100644 index 1409d6ab92..0000000000 --- a/vendor/github.com/hashicorp/go-version/LICENSE +++ /dev/null @@ -1,356 +0,0 @@ -Copyright (c) 2014 HashiCorp, Inc. - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. “Contributor” - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. “Contributor Version” - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor’s Contribution. - -1.3. “Contribution” - - means Covered Software of a particular Contributor. - -1.4. “Covered Software” - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. “Incompatible With Secondary Licenses” - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of version - 1.1 or earlier of the License, but not also under the terms of a - Secondary License. - -1.6. “Executable Form” - - means any form of the work other than Source Code Form. - -1.7. “Larger Work” - - means a work that combines Covered Software with other material, in a separate - file or files, that is not Covered Software. - -1.8. “License” - - means this document. - -1.9. “Licensable” - - means having the right to grant, to the maximum extent possible, whether at the - time of the initial grant or subsequently, any and all of the rights conveyed by - this License. - -1.10. “Modifications” - - means any of the following: - - a. any file in Source Code Form that results from an addition to, deletion - from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. “Patent Claims” of a Contributor - - means any patent claim(s), including without limitation, method, process, - and apparatus claims, in any patent Licensable by such Contributor that - would be infringed, but for the grant of the License, by the making, - using, selling, offering for sale, having made, import, or transfer of - either its Contributions or its Contributor Version. - -1.12. “Secondary License” - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. “Source Code Form” - - means the form of the work preferred for making modifications. - -1.14. “You” (or “Your”) - - means an individual or a legal entity exercising rights under this - License. For legal entities, “You” includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, “control” means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or as - part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its Contributions - or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution become - effective for each Contribution on the date the Contributor first distributes - such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under this - License. No additional rights or licenses will be implied from the distribution - or licensing of Covered Software under this License. Notwithstanding Section - 2.1(b) above, no patent license is granted by a Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party’s - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of its - Contributions. - - This License does not grant any rights in the trademarks, service marks, or - logos of any Contributor (except as may be necessary to comply with the - notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this License - (see Section 10.2) or under the terms of a Secondary License (if permitted - under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its Contributions - are its original creation(s) or it has sufficient rights to grant the - rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under applicable - copyright doctrines of fair use, fair dealing, or other equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under the - terms of this License. You must inform recipients that the Source Code Form - of the Covered Software is governed by the terms of this License, and how - they can obtain a copy of this License. You may not attempt to alter or - restrict the recipients’ rights in the Source Code Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this License, - or sublicense it under different terms, provided that the license for - the Executable Form does not attempt to limit or alter the recipients’ - rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for the - Covered Software. If the Larger Work is a combination of Covered Software - with a work governed by one or more Secondary Licenses, and the Covered - Software is not Incompatible With Secondary Licenses, this License permits - You to additionally distribute such Covered Software under the terms of - such Secondary License(s), so that the recipient of the Larger Work may, at - their option, further distribute the Covered Software under the terms of - either this License or such Secondary License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices (including - copyright notices, patent notices, disclaimers of warranty, or limitations - of liability) contained within the Source Code Form of the Covered - Software, except that You may alter any license notices to the extent - required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on behalf - of any Contributor. You must make it absolutely clear that any such - warranty, support, indemnity, or liability obligation is offered by You - alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, judicial - order, or regulation then You must: (a) comply with the terms of this License - to the maximum extent possible; and (b) describe the limitations and the code - they affect. Such description must be placed in a text file included with all - distributions of the Covered Software under this License. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing basis, - if such Contributor fails to notify You of the non-compliance by some - reasonable means prior to 60 days after You have come back into compliance. - Moreover, Your grants from a particular Contributor are reinstated on an - ongoing basis if such Contributor notifies You of the non-compliance by - some reasonable means, this is the first time You have received notice of - non-compliance with this License from such Contributor, and You become - compliant prior to 30 days after Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, counter-claims, - and cross-claims) alleging that a Contributor Version directly or - indirectly infringes any patent, then the rights granted to You by any and - all Contributors for the Covered Software under Section 2.1 of this License - shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an “as is” basis, without - warranty of any kind, either expressed, implied, or statutory, including, - without limitation, warranties that the Covered Software is free of defects, - merchantable, fit for a particular purpose or non-infringing. The entire - risk as to the quality and performance of the Covered Software is with You. - Should any Covered Software prove defective in any respect, You (not any - Contributor) assume the cost of any necessary servicing, repair, or - correction. This disclaimer of warranty constitutes an essential part of this - License. No use of any Covered Software is authorized under this License - except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from such - party’s negligence to the extent applicable law prohibits such limitation. - Some jurisdictions do not allow the exclusion or limitation of incidental or - consequential damages, so this exclusion and limitation may not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts of - a jurisdiction where the defendant maintains its principal place of business - and such litigation shall be governed by laws of that jurisdiction, without - reference to its conflict-of-law provisions. Nothing in this Section shall - prevent a party’s ability to bring cross-claims or counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject matter - hereof. If any provision of this License is held to be unenforceable, such - provision shall be reformed only to the extent necessary to make it - enforceable. Any law or regulation which provides that the language of a - contract shall be construed against the drafter shall not be used to construe - this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version of - the License under which You originally received the Covered Software, or - under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a modified - version of this License if you rename the license and remove any - references to the name of the license steward (except to note that such - modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - If You choose to distribute Source Code Form that is Incompatible With - Secondary Licenses under the terms of this version of the License, the - notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, then -You may include the notice in a location (such as a LICENSE file in a relevant -directory) where a recipient would be likely to look for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - “Incompatible With Secondary Licenses” Notice - - This Source Code Form is “Incompatible - With Secondary Licenses”, as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/go-version/README.md b/vendor/github.com/hashicorp/go-version/README.md deleted file mode 100644 index 4b7806cd96..0000000000 --- a/vendor/github.com/hashicorp/go-version/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# Versioning Library for Go -![Build Status](https://github.com/hashicorp/go-version/actions/workflows/go-tests.yml/badge.svg) -[![GoDoc](https://godoc.org/github.com/hashicorp/go-version?status.svg)](https://godoc.org/github.com/hashicorp/go-version) - -go-version is a library for parsing versions and version constraints, -and verifying versions against a set of constraints. go-version -can sort a collection of versions properly, handles prerelease/beta -versions, can increment versions, etc. - -Versions used with go-version must follow [SemVer](http://semver.org/). - -## Installation and Usage - -Package documentation can be found on -[GoDoc](http://godoc.org/github.com/hashicorp/go-version). - -Installation can be done with a normal `go get`: - -``` -$ go get github.com/hashicorp/go-version -``` - -#### Version Parsing and Comparison - -```go -v1, err := version.NewVersion("1.2") -v2, err := version.NewVersion("1.5+metadata") - -// Comparison example. There is also GreaterThan, Equal, and just -// a simple Compare that returns an int allowing easy >=, <=, etc. -if v1.LessThan(v2) { - fmt.Printf("%s is less than %s", v1, v2) -} -``` - -#### Version Constraints - -```go -v1, err := version.NewVersion("1.2") - -// Constraints example. -constraints, err := version.NewConstraint(">= 1.0, < 1.4") -if constraints.Check(v1) { - fmt.Printf("%s satisfies constraints %s", v1, constraints) -} -``` - -#### Version Sorting - -```go -versionsRaw := []string{"1.1", "0.7.1", "1.4-beta", "1.4", "2"} -versions := make([]*version.Version, len(versionsRaw)) -for i, raw := range versionsRaw { - v, _ := version.NewVersion(raw) - versions[i] = v -} - -// After this, the versions are properly sorted -sort.Sort(version.Collection(versions)) -``` - -## Issues and Contributing - -If you find an issue with this library, please report an issue. If you'd -like, we welcome any contributions. Fork this library and submit a pull -request. diff --git a/vendor/github.com/hashicorp/go-version/constraint.go b/vendor/github.com/hashicorp/go-version/constraint.go deleted file mode 100644 index 29bdc4d2b5..0000000000 --- a/vendor/github.com/hashicorp/go-version/constraint.go +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package version - -import ( - "fmt" - "regexp" - "sort" - "strings" -) - -// Constraint represents a single constraint for a version, such as -// ">= 1.0". -type Constraint struct { - f constraintFunc - op operator - check *Version - original string -} - -func (c *Constraint) Equals(con *Constraint) bool { - return c.op == con.op && c.check.Equal(con.check) -} - -// Constraints is a slice of constraints. We make a custom type so that -// we can add methods to it. -type Constraints []*Constraint - -type constraintFunc func(v, c *Version) bool - -var constraintOperators map[string]constraintOperation - -type constraintOperation struct { - op operator - f constraintFunc -} - -var constraintRegexp *regexp.Regexp - -func init() { - constraintOperators = map[string]constraintOperation{ - "": {op: equal, f: constraintEqual}, - "=": {op: equal, f: constraintEqual}, - "!=": {op: notEqual, f: constraintNotEqual}, - ">": {op: greaterThan, f: constraintGreaterThan}, - "<": {op: lessThan, f: constraintLessThan}, - ">=": {op: greaterThanEqual, f: constraintGreaterThanEqual}, - "<=": {op: lessThanEqual, f: constraintLessThanEqual}, - "~>": {op: pessimistic, f: constraintPessimistic}, - } - - ops := make([]string, 0, len(constraintOperators)) - for k := range constraintOperators { - ops = append(ops, regexp.QuoteMeta(k)) - } - - constraintRegexp = regexp.MustCompile(fmt.Sprintf( - `^\s*(%s)\s*(%s)\s*$`, - strings.Join(ops, "|"), - VersionRegexpRaw)) -} - -// NewConstraint will parse one or more constraints from the given -// constraint string. The string must be a comma-separated list of -// constraints. -func NewConstraint(v string) (Constraints, error) { - vs := strings.Split(v, ",") - result := make([]*Constraint, len(vs)) - for i, single := range vs { - c, err := parseSingle(single) - if err != nil { - return nil, err - } - - result[i] = c - } - - return Constraints(result), nil -} - -// MustConstraints is a helper that wraps a call to a function -// returning (Constraints, error) and panics if error is non-nil. -func MustConstraints(c Constraints, err error) Constraints { - if err != nil { - panic(err) - } - - return c -} - -// Check tests if a version satisfies all the constraints. -func (cs Constraints) Check(v *Version) bool { - for _, c := range cs { - if !c.Check(v) { - return false - } - } - - return true -} - -// Equals compares Constraints with other Constraints -// for equality. This may not represent logical equivalence -// of compared constraints. -// e.g. even though '>0.1,>0.2' is logically equivalent -// to '>0.2' it is *NOT* treated as equal. -// -// Missing operator is treated as equal to '=', whitespaces -// are ignored and constraints are sorted before comaparison. -func (cs Constraints) Equals(c Constraints) bool { - if len(cs) != len(c) { - return false - } - - // make copies to retain order of the original slices - left := make(Constraints, len(cs)) - copy(left, cs) - sort.Stable(left) - right := make(Constraints, len(c)) - copy(right, c) - sort.Stable(right) - - // compare sorted slices - for i, con := range left { - if !con.Equals(right[i]) { - return false - } - } - - return true -} - -func (cs Constraints) Len() int { - return len(cs) -} - -func (cs Constraints) Less(i, j int) bool { - if cs[i].op < cs[j].op { - return true - } - if cs[i].op > cs[j].op { - return false - } - - return cs[i].check.LessThan(cs[j].check) -} - -func (cs Constraints) Swap(i, j int) { - cs[i], cs[j] = cs[j], cs[i] -} - -// Returns the string format of the constraints -func (cs Constraints) String() string { - csStr := make([]string, len(cs)) - for i, c := range cs { - csStr[i] = c.String() - } - - return strings.Join(csStr, ",") -} - -// Check tests if a constraint is validated by the given version. -func (c *Constraint) Check(v *Version) bool { - return c.f(v, c.check) -} - -// Prerelease returns true if the version underlying this constraint -// contains a prerelease field. -func (c *Constraint) Prerelease() bool { - return len(c.check.Prerelease()) > 0 -} - -func (c *Constraint) String() string { - return c.original -} - -func parseSingle(v string) (*Constraint, error) { - matches := constraintRegexp.FindStringSubmatch(v) - if matches == nil { - return nil, fmt.Errorf("Malformed constraint: %s", v) - } - - check, err := NewVersion(matches[2]) - if err != nil { - return nil, err - } - - cop := constraintOperators[matches[1]] - - return &Constraint{ - f: cop.f, - op: cop.op, - check: check, - original: v, - }, nil -} - -func prereleaseCheck(v, c *Version) bool { - switch vPre, cPre := v.Prerelease() != "", c.Prerelease() != ""; { - case cPre && vPre: - // A constraint with a pre-release can only match a pre-release version - // with the same base segments. - return v.equalSegments(c) - - case !cPre && vPre: - // A constraint without a pre-release can only match a version without a - // pre-release. - return false - - case cPre && !vPre: - // OK, except with the pessimistic operator - case !cPre && !vPre: - // OK - } - return true -} - -//------------------------------------------------------------------- -// Constraint functions -//------------------------------------------------------------------- - -type operator rune - -const ( - equal operator = '=' - notEqual operator = '≠' - greaterThan operator = '>' - lessThan operator = '<' - greaterThanEqual operator = '≥' - lessThanEqual operator = '≤' - pessimistic operator = '~' -) - -func constraintEqual(v, c *Version) bool { - return v.Equal(c) -} - -func constraintNotEqual(v, c *Version) bool { - return !v.Equal(c) -} - -func constraintGreaterThan(v, c *Version) bool { - return prereleaseCheck(v, c) && v.Compare(c) == 1 -} - -func constraintLessThan(v, c *Version) bool { - return prereleaseCheck(v, c) && v.Compare(c) == -1 -} - -func constraintGreaterThanEqual(v, c *Version) bool { - return prereleaseCheck(v, c) && v.Compare(c) >= 0 -} - -func constraintLessThanEqual(v, c *Version) bool { - return prereleaseCheck(v, c) && v.Compare(c) <= 0 -} - -func constraintPessimistic(v, c *Version) bool { - // Using a pessimistic constraint with a pre-release, restricts versions to pre-releases - if !prereleaseCheck(v, c) || (c.Prerelease() != "" && v.Prerelease() == "") { - return false - } - - // If the version being checked is naturally less than the constraint, then there - // is no way for the version to be valid against the constraint - if v.LessThan(c) { - return false - } - // We'll use this more than once, so grab the length now so it's a little cleaner - // to write the later checks - cs := len(c.segments) - - // If the version being checked has less specificity than the constraint, then there - // is no way for the version to be valid against the constraint - if cs > len(v.segments) { - return false - } - - // Check the segments in the constraint against those in the version. If the version - // being checked, at any point, does not have the same values in each index of the - // constraints segments, then it cannot be valid against the constraint. - for i := 0; i < c.si-1; i++ { - if v.segments[i] != c.segments[i] { - return false - } - } - - // Check the last part of the segment in the constraint. If the version segment at - // this index is less than the constraints segment at this index, then it cannot - // be valid against the constraint - if c.segments[cs-1] > v.segments[cs-1] { - return false - } - - // If nothing has rejected the version by now, it's valid - return true -} diff --git a/vendor/github.com/hashicorp/go-version/version.go b/vendor/github.com/hashicorp/go-version/version.go deleted file mode 100644 index 7c683c2813..0000000000 --- a/vendor/github.com/hashicorp/go-version/version.go +++ /dev/null @@ -1,441 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package version - -import ( - "bytes" - "database/sql/driver" - "fmt" - "regexp" - "strconv" - "strings" -) - -// The compiled regular expression used to test the validity of a version. -var ( - versionRegexp *regexp.Regexp - semverRegexp *regexp.Regexp -) - -// The raw regular expression string used for testing the validity -// of a version. -const ( - VersionRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` + - `(-([0-9]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)|(-?([A-Za-z\-~]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)))?` + - `(\+([0-9A-Za-z\-~]+(\.[0-9A-Za-z\-~]+)*))?` + - `?` - - // SemverRegexpRaw requires a separator between version and prerelease - SemverRegexpRaw string = `v?([0-9]+(\.[0-9]+)*?)` + - `(-([0-9]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)|(-([A-Za-z\-~]+[0-9A-Za-z\-~]*(\.[0-9A-Za-z\-~]+)*)))?` + - `(\+([0-9A-Za-z\-~]+(\.[0-9A-Za-z\-~]+)*))?` + - `?` -) - -// Version represents a single version. -type Version struct { - metadata string - pre string - segments []int64 - si int - original string -} - -func init() { - versionRegexp = regexp.MustCompile("^" + VersionRegexpRaw + "$") - semverRegexp = regexp.MustCompile("^" + SemverRegexpRaw + "$") -} - -// NewVersion parses the given version and returns a new -// Version. -func NewVersion(v string) (*Version, error) { - return newVersion(v, versionRegexp) -} - -// NewSemver parses the given version and returns a new -// Version that adheres strictly to SemVer specs -// https://semver.org/ -func NewSemver(v string) (*Version, error) { - return newVersion(v, semverRegexp) -} - -func newVersion(v string, pattern *regexp.Regexp) (*Version, error) { - matches := pattern.FindStringSubmatch(v) - if matches == nil { - return nil, fmt.Errorf("Malformed version: %s", v) - } - segmentsStr := strings.Split(matches[1], ".") - segments := make([]int64, len(segmentsStr)) - for i, str := range segmentsStr { - val, err := strconv.ParseInt(str, 10, 64) - if err != nil { - return nil, fmt.Errorf( - "Error parsing version: %s", err) - } - - segments[i] = val - } - - // Even though we could support more than three segments, if we - // got less than three, pad it with 0s. This is to cover the basic - // default usecase of semver, which is MAJOR.MINOR.PATCH at the minimum - for i := len(segments); i < 3; i++ { - segments = append(segments, 0) - } - - pre := matches[7] - if pre == "" { - pre = matches[4] - } - - return &Version{ - metadata: matches[10], - pre: pre, - segments: segments, - si: len(segmentsStr), - original: v, - }, nil -} - -// Must is a helper that wraps a call to a function returning (*Version, error) -// and panics if error is non-nil. -func Must(v *Version, err error) *Version { - if err != nil { - panic(err) - } - - return v -} - -// Compare compares this version to another version. This -// returns -1, 0, or 1 if this version is smaller, equal, -// or larger than the other version, respectively. -// -// If you want boolean results, use the LessThan, Equal, -// GreaterThan, GreaterThanOrEqual or LessThanOrEqual methods. -func (v *Version) Compare(other *Version) int { - // A quick, efficient equality check - if v.String() == other.String() { - return 0 - } - - // If the segments are the same, we must compare on prerelease info - if v.equalSegments(other) { - preSelf := v.Prerelease() - preOther := other.Prerelease() - if preSelf == "" && preOther == "" { - return 0 - } - if preSelf == "" { - return 1 - } - if preOther == "" { - return -1 - } - - return comparePrereleases(preSelf, preOther) - } - - segmentsSelf := v.Segments64() - segmentsOther := other.Segments64() - // Get the highest specificity (hS), or if they're equal, just use segmentSelf length - lenSelf := len(segmentsSelf) - lenOther := len(segmentsOther) - hS := lenSelf - if lenSelf < lenOther { - hS = lenOther - } - // Compare the segments - // Because a constraint could have more/less specificity than the version it's - // checking, we need to account for a lopsided or jagged comparison - for i := 0; i < hS; i++ { - if i > lenSelf-1 { - // This means Self had the lower specificity - // Check to see if the remaining segments in Other are all zeros - if !allZero(segmentsOther[i:]) { - // if not, it means that Other has to be greater than Self - return -1 - } - break - } else if i > lenOther-1 { - // this means Other had the lower specificity - // Check to see if the remaining segments in Self are all zeros - - if !allZero(segmentsSelf[i:]) { - // if not, it means that Self has to be greater than Other - return 1 - } - break - } - lhs := segmentsSelf[i] - rhs := segmentsOther[i] - if lhs == rhs { - continue - } else if lhs < rhs { - return -1 - } - // Otherwis, rhs was > lhs, they're not equal - return 1 - } - - // if we got this far, they're equal - return 0 -} - -func (v *Version) equalSegments(other *Version) bool { - segmentsSelf := v.Segments64() - segmentsOther := other.Segments64() - - if len(segmentsSelf) != len(segmentsOther) { - return false - } - for i, v := range segmentsSelf { - if v != segmentsOther[i] { - return false - } - } - return true -} - -func allZero(segs []int64) bool { - for _, s := range segs { - if s != 0 { - return false - } - } - return true -} - -func comparePart(preSelf string, preOther string) int { - if preSelf == preOther { - return 0 - } - - var selfInt int64 - selfNumeric := true - selfInt, err := strconv.ParseInt(preSelf, 10, 64) - if err != nil { - selfNumeric = false - } - - var otherInt int64 - otherNumeric := true - otherInt, err = strconv.ParseInt(preOther, 10, 64) - if err != nil { - otherNumeric = false - } - - // if a part is empty, we use the other to decide - if preSelf == "" { - if otherNumeric { - return -1 - } - return 1 - } - - if preOther == "" { - if selfNumeric { - return 1 - } - return -1 - } - - if selfNumeric && !otherNumeric { - return -1 - } else if !selfNumeric && otherNumeric { - return 1 - } else if !selfNumeric && !otherNumeric && preSelf > preOther { - return 1 - } else if selfInt > otherInt { - return 1 - } - - return -1 -} - -func comparePrereleases(v string, other string) int { - // the same pre release! - if v == other { - return 0 - } - - // split both pre releases for analyse their parts - selfPreReleaseMeta := strings.Split(v, ".") - otherPreReleaseMeta := strings.Split(other, ".") - - selfPreReleaseLen := len(selfPreReleaseMeta) - otherPreReleaseLen := len(otherPreReleaseMeta) - - biggestLen := otherPreReleaseLen - if selfPreReleaseLen > otherPreReleaseLen { - biggestLen = selfPreReleaseLen - } - - // loop for parts to find the first difference - for i := 0; i < biggestLen; i = i + 1 { - partSelfPre := "" - if i < selfPreReleaseLen { - partSelfPre = selfPreReleaseMeta[i] - } - - partOtherPre := "" - if i < otherPreReleaseLen { - partOtherPre = otherPreReleaseMeta[i] - } - - compare := comparePart(partSelfPre, partOtherPre) - // if parts are equals, continue the loop - if compare != 0 { - return compare - } - } - - return 0 -} - -// Core returns a new version constructed from only the MAJOR.MINOR.PATCH -// segments of the version, without prerelease or metadata. -func (v *Version) Core() *Version { - segments := v.Segments64() - segmentsOnly := fmt.Sprintf("%d.%d.%d", segments[0], segments[1], segments[2]) - return Must(NewVersion(segmentsOnly)) -} - -// Equal tests if two versions are equal. -func (v *Version) Equal(o *Version) bool { - if v == nil || o == nil { - return v == o - } - - return v.Compare(o) == 0 -} - -// GreaterThan tests if this version is greater than another version. -func (v *Version) GreaterThan(o *Version) bool { - return v.Compare(o) > 0 -} - -// GreaterThanOrEqual tests if this version is greater than or equal to another version. -func (v *Version) GreaterThanOrEqual(o *Version) bool { - return v.Compare(o) >= 0 -} - -// LessThan tests if this version is less than another version. -func (v *Version) LessThan(o *Version) bool { - return v.Compare(o) < 0 -} - -// LessThanOrEqual tests if this version is less than or equal to another version. -func (v *Version) LessThanOrEqual(o *Version) bool { - return v.Compare(o) <= 0 -} - -// Metadata returns any metadata that was part of the version -// string. -// -// Metadata is anything that comes after the "+" in the version. -// For example, with "1.2.3+beta", the metadata is "beta". -func (v *Version) Metadata() string { - return v.metadata -} - -// Prerelease returns any prerelease data that is part of the version, -// or blank if there is no prerelease data. -// -// Prerelease information is anything that comes after the "-" in the -// version (but before any metadata). For example, with "1.2.3-beta", -// the prerelease information is "beta". -func (v *Version) Prerelease() string { - return v.pre -} - -// Segments returns the numeric segments of the version as a slice of ints. -// -// This excludes any metadata or pre-release information. For example, -// for a version "1.2.3-beta", segments will return a slice of -// 1, 2, 3. -func (v *Version) Segments() []int { - segmentSlice := make([]int, len(v.segments)) - for i, v := range v.segments { - segmentSlice[i] = int(v) - } - return segmentSlice -} - -// Segments64 returns the numeric segments of the version as a slice of int64s. -// -// This excludes any metadata or pre-release information. For example, -// for a version "1.2.3-beta", segments will return a slice of -// 1, 2, 3. -func (v *Version) Segments64() []int64 { - result := make([]int64, len(v.segments)) - copy(result, v.segments) - return result -} - -// String returns the full version string included pre-release -// and metadata information. -// -// This value is rebuilt according to the parsed segments and other -// information. Therefore, ambiguities in the version string such as -// prefixed zeroes (1.04.0 => 1.4.0), `v` prefix (v1.0.0 => 1.0.0), and -// missing parts (1.0 => 1.0.0) will be made into a canonicalized form -// as shown in the parenthesized examples. -func (v *Version) String() string { - var buf bytes.Buffer - fmtParts := make([]string, len(v.segments)) - for i, s := range v.segments { - // We can ignore err here since we've pre-parsed the values in segments - str := strconv.FormatInt(s, 10) - fmtParts[i] = str - } - fmt.Fprintf(&buf, strings.Join(fmtParts, ".")) - if v.pre != "" { - fmt.Fprintf(&buf, "-%s", v.pre) - } - if v.metadata != "" { - fmt.Fprintf(&buf, "+%s", v.metadata) - } - - return buf.String() -} - -// Original returns the original parsed version as-is, including any -// potential whitespace, `v` prefix, etc. -func (v *Version) Original() string { - return v.original -} - -// UnmarshalText implements encoding.TextUnmarshaler interface. -func (v *Version) UnmarshalText(b []byte) error { - temp, err := NewVersion(string(b)) - if err != nil { - return err - } - - *v = *temp - - return nil -} - -// MarshalText implements encoding.TextMarshaler interface. -func (v *Version) MarshalText() ([]byte, error) { - return []byte(v.String()), nil -} - -// Scan implements the sql.Scanner interface. -func (v *Version) Scan(src interface{}) error { - switch src := src.(type) { - case string: - return v.UnmarshalText([]byte(src)) - case nil: - return nil - default: - return fmt.Errorf("cannot scan %T as Version", src) - } -} - -// Value implements the driver.Valuer interface. -func (v *Version) Value() (driver.Value, error) { - return v.String(), nil -} diff --git a/vendor/github.com/hashicorp/go-version/version_collection.go b/vendor/github.com/hashicorp/go-version/version_collection.go deleted file mode 100644 index 83547fe13d..0000000000 --- a/vendor/github.com/hashicorp/go-version/version_collection.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package version - -// Collection is a type that implements the sort.Interface interface -// so that versions can be sorted. -type Collection []*Version - -func (v Collection) Len() int { - return len(v) -} - -func (v Collection) Less(i, j int) bool { - return v[i].LessThan(v[j]) -} - -func (v Collection) Swap(i, j int) { - v[i], v[j] = v[j], v[i] -} diff --git a/vendor/github.com/hashicorp/nomad/api/.copywrite.hcl b/vendor/github.com/hashicorp/nomad/api/.copywrite.hcl deleted file mode 100644 index 61b20a2c89..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/.copywrite.hcl +++ /dev/null @@ -1,12 +0,0 @@ -schema_version = 1 - -project { - license = "MPL-2.0" - copyright_year = 2024 - - header_ignore = [ - // Enterprise files do not fall under the open source licensing. CE-ENT - // merge conflicts might happen here, please be sure to put new CE - // exceptions above this comment. - ] -} diff --git a/vendor/github.com/hashicorp/nomad/api/LICENSE b/vendor/github.com/hashicorp/nomad/api/LICENSE deleted file mode 100644 index f4f97ee585..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/LICENSE +++ /dev/null @@ -1,365 +0,0 @@ -Copyright (c) 2015 HashiCorp, Inc. - -Mozilla Public License, version 2.0 - -1. Definitions - -1.1. "Contributor" - - means each individual or legal entity that creates, contributes to the - creation of, or owns Covered Software. - -1.2. "Contributor Version" - - means the combination of the Contributions of others (if any) used by a - Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - - means Source Code Form to which the initial Contributor has attached the - notice in Exhibit A, the Executable Form of such Source Code Form, and - Modifications of such Source Code Form, in each case including portions - thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - a. that the initial Contributor has attached the notice described in - Exhibit B to the Covered Software; or - - b. that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the terms of - a Secondary License. - -1.6. "Executable Form" - - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - - means a work that combines Covered Software with other material, in a - separate file or files, that is not Covered Software. - -1.8. "License" - - means this document. - -1.9. "Licensable" - - means having the right to grant, to the maximum extent possible, whether - at the time of the initial grant or subsequently, any and all of the - rights conveyed by this License. - -1.10. "Modifications" - - means any of the following: - - a. any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered Software; or - - b. any new file in Source Code Form that contains any Covered Software. - -1.11. "Patent Claims" of a Contributor - - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the License, - by the making, using, selling, offering for sale, having made, import, - or transfer of either its Contributions or its Contributor Version. - -1.12. "Secondary License" - - means either the GNU General Public License, Version 2.0, the GNU Lesser - General Public License, Version 2.1, the GNU Affero General Public - License, Version 3.0, or any later versions of those licenses. - -1.13. "Source Code Form" - - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that controls, is - controlled by, or is under common control with You. For purposes of this - definition, "control" means (a) the power, direct or indirect, to cause - the direction or management of such entity, whether by contract or - otherwise, or (b) ownership of more than fifty percent (50%) of the - outstanding shares or beneficial ownership of such entity. - - -2. License Grants and Conditions - -2.1. Grants - - Each Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license: - - a. under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - - b. under Patent Claims of such Contributor to make, use, sell, offer for - sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - - The licenses granted in Section 2.1 with respect to any Contribution - become effective for each Contribution on the date the Contributor first - distributes such Contribution. - -2.3. Limitations on Grant Scope - - The licenses granted in this Section 2 are the only rights granted under - this License. No additional rights or licenses will be implied from the - distribution or licensing of Covered Software under this License. - Notwithstanding Section 2.1(b) above, no patent license is granted by a - Contributor: - - a. for any code that a Contributor has removed from Covered Software; or - - b. for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - - c. under Patent Claims infringed by Covered Software in the absence of - its Contributions. - - This License does not grant any rights in the trademarks, service marks, - or logos of any Contributor (except as may be necessary to comply with - the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - - No Contributor makes additional grants as a result of Your choice to - distribute the Covered Software under a subsequent version of this - License (see Section 10.2) or under the terms of a Secondary License (if - permitted under the terms of Section 3.3). - -2.5. Representation - - Each Contributor represents that the Contributor believes its - Contributions are its original creation(s) or it has sufficient rights to - grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - - This License is not intended to limit any rights You have under - applicable copyright doctrines of fair use, fair dealing, or other - equivalents. - -2.7. Conditions - - Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in - Section 2.1. - - -3. Responsibilities - -3.1. Distribution of Source Form - - All distribution of Covered Software in Source Code Form, including any - Modifications that You create or to which You contribute, must be under - the terms of this License. You must inform recipients that the Source - Code Form of the Covered Software is governed by the terms of this - License, and how they can obtain a copy of this License. You may not - attempt to alter or restrict the recipients' rights in the Source Code - Form. - -3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - - a. such Covered Software must also be made available in Source Code Form, - as described in Section 3.1, and You must inform recipients of the - Executable Form how they can obtain a copy of such Source Code Form by - reasonable means in a timely manner, at a charge no more than the cost - of distribution to the recipient; and - - b. You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter the - recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - - You may create and distribute a Larger Work under terms of Your choice, - provided that You also comply with the requirements of this License for - the Covered Software. If the Larger Work is a combination of Covered - Software with a work governed by one or more Secondary Licenses, and the - Covered Software is not Incompatible With Secondary Licenses, this - License permits You to additionally distribute such Covered Software - under the terms of such Secondary License(s), so that the recipient of - the Larger Work may, at their option, further distribute the Covered - Software under the terms of either this License or such Secondary - License(s). - -3.4. Notices - - You may not remove or alter the substance of any license notices - (including copyright notices, patent notices, disclaimers of warranty, or - limitations of liability) contained within the Source Code Form of the - Covered Software, except that You may alter any license notices to the - extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - - You may choose to offer, and to charge a fee for, warranty, support, - indemnity or liability obligations to one or more recipients of Covered - Software. However, You may do so only on Your own behalf, and not on - behalf of any Contributor. You must make it absolutely clear that any - such warranty, support, indemnity, or liability obligation is offered by - You alone, and You hereby agree to indemnify every Contributor for any - liability incurred by such Contributor as a result of warranty, support, - indemnity or liability terms You offer. You may include additional - disclaimers of warranty and limitations of liability specific to any - jurisdiction. - -4. Inability to Comply Due to Statute or Regulation - - If it is impossible for You to comply with any of the terms of this License - with respect to some or all of the Covered Software due to statute, - judicial order, or regulation then You must: (a) comply with the terms of - this License to the maximum extent possible; and (b) describe the - limitations and the code they affect. Such description must be placed in a - text file included with all distributions of the Covered Software under - this License. Except to the extent prohibited by statute or regulation, - such description must be sufficiently detailed for a recipient of ordinary - skill to be able to understand it. - -5. Termination - -5.1. The rights granted under this License will terminate automatically if You - fail to comply with any of its terms. However, if You become compliant, - then the rights granted under this License from a particular Contributor - are reinstated (a) provisionally, unless and until such Contributor - explicitly and finally terminates Your grants, and (b) on an ongoing - basis, if such Contributor fails to notify You of the non-compliance by - some reasonable means prior to 60 days after You have come back into - compliance. Moreover, Your grants from a particular Contributor are - reinstated on an ongoing basis if such Contributor notifies You of the - non-compliance by some reasonable means, this is the first time You have - received notice of non-compliance with this License from such - Contributor, and You become compliant prior to 30 days after Your receipt - of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent - infringement claim (excluding declaratory judgment actions, - counter-claims, and cross-claims) alleging that a Contributor Version - directly or indirectly infringes any patent, then the rights granted to - You by any and all Contributors for the Covered Software under Section - 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user - license agreements (excluding distributors and resellers) which have been - validly granted by You or Your distributors under this License prior to - termination shall survive termination. - -6. Disclaimer of Warranty - - Covered Software is provided under this License on an "as is" basis, - without warranty of any kind, either expressed, implied, or statutory, - including, without limitation, warranties that the Covered Software is free - of defects, merchantable, fit for a particular purpose or non-infringing. - The entire risk as to the quality and performance of the Covered Software - is with You. Should any Covered Software prove defective in any respect, - You (not any Contributor) assume the cost of any necessary servicing, - repair, or correction. This disclaimer of warranty constitutes an essential - part of this License. No use of any Covered Software is authorized under - this License except under this disclaimer. - -7. Limitation of Liability - - Under no circumstances and under no legal theory, whether tort (including - negligence), contract, or otherwise, shall any Contributor, or anyone who - distributes Covered Software as permitted above, be liable to You for any - direct, indirect, special, incidental, or consequential damages of any - character including, without limitation, damages for lost profits, loss of - goodwill, work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses, even if such party shall have been - informed of the possibility of such damages. This limitation of liability - shall not apply to liability for death or personal injury resulting from - such party's negligence to the extent applicable law prohibits such - limitation. Some jurisdictions do not allow the exclusion or limitation of - incidental or consequential damages, so this exclusion and limitation may - not apply to You. - -8. Litigation - - Any litigation relating to this License may be brought only in the courts - of a jurisdiction where the defendant maintains its principal place of - business and such litigation shall be governed by laws of that - jurisdiction, without reference to its conflict-of-law provisions. Nothing - in this Section shall prevent a party's ability to bring cross-claims or - counter-claims. - -9. Miscellaneous - - This License represents the complete agreement concerning the subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. Any law or regulation which provides that - the language of a contract shall be construed against the drafter shall not - be used to construe this License against a Contributor. - - -10. Versions of the License - -10.1. New Versions - - Mozilla Foundation is the license steward. Except as provided in Section - 10.3, no one other than the license steward has the right to modify or - publish new versions of this License. Each version will be given a - distinguishing version number. - -10.2. Effect of New Versions - - You may distribute the Covered Software under the terms of the version - of the License under which You originally received the Covered Software, - or under the terms of any subsequent version published by the license - steward. - -10.3. Modified Versions - - If you create software not governed by this License, and you want to - create a new license for such software, you may create and use a - modified version of this License if you rename the license and remove - any references to the name of the license steward (except to note that - such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary - Licenses If You choose to distribute Source Code Form that is - Incompatible With Secondary Licenses under the terms of this version of - the License, the notice described in Exhibit B of this License must be - attached. - -Exhibit A - Source Code Form License Notice - - This Source Code Form is subject to the - terms of the Mozilla Public License, v. - 2.0. If a copy of the MPL was not - distributed with this file, You can - obtain one at - http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a -notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice - - This Source Code Form is "Incompatible - With Secondary Licenses", as defined by - the Mozilla Public License, v. 2.0. - diff --git a/vendor/github.com/hashicorp/nomad/api/acl.go b/vendor/github.com/hashicorp/nomad/api/acl.go deleted file mode 100644 index 74f71f605f..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/acl.go +++ /dev/null @@ -1,1248 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "errors" - "fmt" - "time" -) - -// ACLPolicies is used to query the ACL Policy endpoints. -type ACLPolicies struct { - client *Client -} - -// ACLPolicies returns a new handle on the ACL policies. -func (c *Client) ACLPolicies() *ACLPolicies { - return &ACLPolicies{client: c} -} - -// List is used to dump all of the policies. -func (a *ACLPolicies) List(q *QueryOptions) ([]*ACLPolicyListStub, *QueryMeta, error) { - var resp []*ACLPolicyListStub - qm, err := a.client.query("/v1/acl/policies", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Upsert is used to create or update a policy -func (a *ACLPolicies) Upsert(policy *ACLPolicy, q *WriteOptions) (*WriteMeta, error) { - if policy == nil || policy.Name == "" { - return nil, errors.New("missing policy name") - } - wm, err := a.client.put("/v1/acl/policy/"+policy.Name, policy, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Delete is used to delete a policy -func (a *ACLPolicies) Delete(policyName string, q *WriteOptions) (*WriteMeta, error) { - if policyName == "" { - return nil, errors.New("missing policy name") - } - wm, err := a.client.delete("/v1/acl/policy/"+policyName, nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Info is used to query a specific policy -func (a *ACLPolicies) Info(policyName string, q *QueryOptions) (*ACLPolicy, *QueryMeta, error) { - if policyName == "" { - return nil, nil, errors.New("missing policy name") - } - var resp ACLPolicy - wm, err := a.client.query("/v1/acl/policy/"+policyName, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Self is used to query policies attached to a workload identity -func (a *ACLPolicies) Self(q *QueryOptions) ([]*ACLPolicyListStub, *QueryMeta, error) { - var resp []*ACLPolicyListStub - wm, err := a.client.query("/v1/acl/policy/self", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, wm, nil -} - -// ACLTokens is used to query the ACL token endpoints. -type ACLTokens struct { - client *Client -} - -// ACLTokens returns a new handle on the ACL tokens. -func (c *Client) ACLTokens() *ACLTokens { - return &ACLTokens{client: c} -} - -// Bootstrap is used to get the initial bootstrap token -// -// See BootstrapOpts to set ACL bootstrapping options. -func (a *ACLTokens) Bootstrap(q *WriteOptions) (*ACLToken, *WriteMeta, error) { - var resp ACLToken - wm, err := a.client.put("/v1/acl/bootstrap", nil, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// BootstrapOpts is used to get the initial bootstrap token or pass in the one that was provided in the API -func (a *ACLTokens) BootstrapOpts(btoken string, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if q == nil { - q = &WriteOptions{} - } - req := &BootstrapRequest{ - BootstrapSecret: btoken, - } - - var resp ACLToken - wm, err := a.client.put("/v1/acl/bootstrap", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// List is used to dump all of the tokens. -func (a *ACLTokens) List(q *QueryOptions) ([]*ACLTokenListStub, *QueryMeta, error) { - var resp []*ACLTokenListStub - qm, err := a.client.query("/v1/acl/tokens", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Create is used to create a token -func (a *ACLTokens) Create(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if token.AccessorID != "" { - return nil, nil, errors.New("cannot specify Accessor ID") - } - var resp ACLToken - wm, err := a.client.put("/v1/acl/token", token, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Update is used to update an existing token -func (a *ACLTokens) Update(token *ACLToken, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if token.AccessorID == "" { - return nil, nil, errors.New("missing accessor ID") - } - var resp ACLToken - wm, err := a.client.put("/v1/acl/token/"+token.AccessorID, - token, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Delete is used to delete a token -func (a *ACLTokens) Delete(accessorID string, q *WriteOptions) (*WriteMeta, error) { - if accessorID == "" { - return nil, errors.New("missing accessor ID") - } - wm, err := a.client.delete("/v1/acl/token/"+accessorID, nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Info is used to query a token -func (a *ACLTokens) Info(accessorID string, q *QueryOptions) (*ACLToken, *QueryMeta, error) { - if accessorID == "" { - return nil, nil, errors.New("missing accessor ID") - } - var resp ACLToken - wm, err := a.client.query("/v1/acl/token/"+accessorID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Self is used to query our own token -func (a *ACLTokens) Self(q *QueryOptions) (*ACLToken, *QueryMeta, error) { - var resp ACLToken - wm, err := a.client.query("/v1/acl/token/self", &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// UpsertOneTimeToken is used to create a one-time token -func (a *ACLTokens) UpsertOneTimeToken(q *WriteOptions) (*OneTimeToken, *WriteMeta, error) { - var resp *OneTimeTokenUpsertResponse - wm, err := a.client.put("/v1/acl/token/onetime", nil, &resp, q) - if err != nil { - return nil, nil, err - } - if resp == nil { - return nil, nil, errors.New("no one-time token returned") - } - return resp.OneTimeToken, wm, nil -} - -// ExchangeOneTimeToken is used to create a one-time token -func (a *ACLTokens) ExchangeOneTimeToken(secret string, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - if secret == "" { - return nil, nil, errors.New("missing secret ID") - } - req := &OneTimeTokenExchangeRequest{OneTimeSecretID: secret} - var resp *OneTimeTokenExchangeResponse - wm, err := a.client.put("/v1/acl/token/onetime/exchange", req, &resp, q) - if err != nil { - return nil, nil, err - } - if resp == nil { - return nil, nil, errors.New("no ACL token returned") - } - return resp.Token, wm, nil -} - -var ( - // errMissingACLRoleID is the generic errors to use when a call is missing - // the required ACL Role ID parameter. - errMissingACLRoleID = errors.New("missing ACL role ID") - - // errMissingACLAuthMethodName is the generic error to use when a call is - // missing the required ACL auth-method name parameter. - errMissingACLAuthMethodName = errors.New("missing ACL auth-method name") - - // errMissingACLBindingRuleID is the generic error to use when a call is - // missing the required ACL binding rule ID parameter. - errMissingACLBindingRuleID = errors.New("missing ACL binding rule ID") -) - -// ACLRoles is used to query the ACL Role endpoints. -type ACLRoles struct { - client *Client -} - -// ACLRoles returns a new handle on the ACL roles API client. -func (c *Client) ACLRoles() *ACLRoles { - return &ACLRoles{client: c} -} - -// List is used to detail all the ACL roles currently stored within state. -func (a *ACLRoles) List(q *QueryOptions) ([]*ACLRoleListStub, *QueryMeta, error) { - var resp []*ACLRoleListStub - qm, err := a.client.query("/v1/acl/roles", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Create is used to create an ACL role. -func (a *ACLRoles) Create(role *ACLRole, w *WriteOptions) (*ACLRole, *WriteMeta, error) { - if role.ID != "" { - return nil, nil, errors.New("cannot specify ACL role ID") - } - var resp ACLRole - wm, err := a.client.put("/v1/acl/role", role, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Update is used to update an existing ACL role. -func (a *ACLRoles) Update(role *ACLRole, w *WriteOptions) (*ACLRole, *WriteMeta, error) { - if role.ID == "" { - return nil, nil, errMissingACLRoleID - } - var resp ACLRole - wm, err := a.client.put("/v1/acl/role/"+role.ID, role, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Delete is used to delete an ACL role. -func (a *ACLRoles) Delete(roleID string, w *WriteOptions) (*WriteMeta, error) { - if roleID == "" { - return nil, errMissingACLRoleID - } - wm, err := a.client.delete("/v1/acl/role/"+roleID, nil, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// Get is used to look up an ACL role. -func (a *ACLRoles) Get(roleID string, q *QueryOptions) (*ACLRole, *QueryMeta, error) { - if roleID == "" { - return nil, nil, errMissingACLRoleID - } - var resp ACLRole - qm, err := a.client.query("/v1/acl/role/"+roleID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// GetByName is used to look up an ACL role using its name. -func (a *ACLRoles) GetByName(roleName string, q *QueryOptions) (*ACLRole, *QueryMeta, error) { - if roleName == "" { - return nil, nil, errors.New("missing ACL role name") - } - var resp ACLRole - qm, err := a.client.query("/v1/acl/role/name/"+roleName, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ACLAuthMethods is used to query the ACL auth-methods endpoints. -type ACLAuthMethods struct { - client *Client -} - -// ACLAuthMethods returns a new handle on the ACL auth-methods API client. -func (c *Client) ACLAuthMethods() *ACLAuthMethods { - return &ACLAuthMethods{client: c} -} - -// List is used to detail all the ACL auth-methods currently stored within -// state. -func (a *ACLAuthMethods) List(q *QueryOptions) ([]*ACLAuthMethodListStub, *QueryMeta, error) { - var resp []*ACLAuthMethodListStub - qm, err := a.client.query("/v1/acl/auth-methods", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Create is used to create an ACL auth-method. -func (a *ACLAuthMethods) Create(authMethod *ACLAuthMethod, w *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) { - if authMethod.Name == "" { - return nil, nil, errMissingACLAuthMethodName - } - var resp ACLAuthMethod - wm, err := a.client.put("/v1/acl/auth-method", authMethod, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Update is used to update an existing ACL auth-method. -func (a *ACLAuthMethods) Update(authMethod *ACLAuthMethod, w *WriteOptions) (*ACLAuthMethod, *WriteMeta, error) { - if authMethod.Name == "" { - return nil, nil, errMissingACLAuthMethodName - } - var resp ACLAuthMethod - wm, err := a.client.put("/v1/acl/auth-method/"+authMethod.Name, authMethod, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Delete is used to delete an ACL auth-method. -func (a *ACLAuthMethods) Delete(authMethodName string, w *WriteOptions) (*WriteMeta, error) { - if authMethodName == "" { - return nil, errMissingACLAuthMethodName - } - wm, err := a.client.delete("/v1/acl/auth-method/"+authMethodName, nil, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// Get is used to look up an ACL auth-method. -func (a *ACLAuthMethods) Get(authMethodName string, q *QueryOptions) (*ACLAuthMethod, *QueryMeta, error) { - if authMethodName == "" { - return nil, nil, errMissingACLAuthMethodName - } - var resp ACLAuthMethod - qm, err := a.client.query("/v1/acl/auth-method/"+authMethodName, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ACLBindingRules is used to query the ACL auth-methods endpoints. -type ACLBindingRules struct { - client *Client -} - -// ACLBindingRules returns a new handle on the ACL auth-methods API client. -func (c *Client) ACLBindingRules() *ACLBindingRules { - return &ACLBindingRules{client: c} -} - -// List is used to detail all the ACL binding rules currently stored within -// state. -func (a *ACLBindingRules) List(q *QueryOptions) ([]*ACLBindingRuleListStub, *QueryMeta, error) { - var resp []*ACLBindingRuleListStub - qm, err := a.client.query("/v1/acl/binding-rules", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Create is used to create an ACL binding rule. -func (a *ACLBindingRules) Create(bindingRule *ACLBindingRule, w *WriteOptions) (*ACLBindingRule, *WriteMeta, error) { - var resp ACLBindingRule - wm, err := a.client.put("/v1/acl/binding-rule", bindingRule, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Update is used to update an existing ACL binding rule. -func (a *ACLBindingRules) Update(bindingRule *ACLBindingRule, w *WriteOptions) (*ACLBindingRule, *WriteMeta, error) { - if bindingRule.ID == "" { - return nil, nil, errMissingACLBindingRuleID - } - var resp ACLBindingRule - wm, err := a.client.put("/v1/acl/binding-rule/"+bindingRule.ID, bindingRule, &resp, w) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Delete is used to delete an ACL binding rule. -func (a *ACLBindingRules) Delete(bindingRuleID string, w *WriteOptions) (*WriteMeta, error) { - if bindingRuleID == "" { - return nil, errMissingACLBindingRuleID - } - wm, err := a.client.delete("/v1/acl/binding-rule/"+bindingRuleID, nil, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// Get is used to look up an ACL binding rule. -func (a *ACLBindingRules) Get(bindingRuleID string, q *QueryOptions) (*ACLBindingRule, *QueryMeta, error) { - if bindingRuleID == "" { - return nil, nil, errMissingACLBindingRuleID - } - var resp ACLBindingRule - qm, err := a.client.query("/v1/acl/binding-rule/"+bindingRuleID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ACLOIDC is used to query the ACL OIDC endpoints. -// -// Deprecated: ACLOIDC is deprecated, use ACLAuth instead. -type ACLOIDC struct { - client *Client - ACLAuth -} - -// ACLOIDC returns a new handle on the ACL auth-methods API client. -// -// Deprecated: c.ACLOIDC() is deprecated, use c.ACLAuth() instead. -func (c *Client) ACLOIDC() *ACLOIDC { - return &ACLOIDC{client: c} -} - -// ACLAuth is used to query the ACL auth endpoints. -type ACLAuth struct { - client *Client -} - -// ACLAuth returns a new handle on the ACL auth-methods API client. -func (c *Client) ACLAuth() *ACLAuth { - return &ACLAuth{client: c} -} - -// GetAuthURL generates the OIDC provider authentication URL. This URL should -// be visited in order to sign in to the provider. -func (a *ACLAuth) GetAuthURL(req *ACLOIDCAuthURLRequest, q *WriteOptions) (*ACLOIDCAuthURLResponse, *WriteMeta, error) { - var resp ACLOIDCAuthURLResponse - wm, err := a.client.put("/v1/acl/oidc/auth-url", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// CompleteAuth exchanges the OIDC provider token for a Nomad token with the -// appropriate claims attached. -func (a *ACLAuth) CompleteAuth(req *ACLOIDCCompleteAuthRequest, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - var resp ACLToken - wm, err := a.client.put("/v1/acl/oidc/complete-auth", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Login exchanges the third party token for a Nomad token with the appropriate -// claims attached. -func (a *ACLAuth) Login(req *ACLLoginRequest, q *WriteOptions) (*ACLToken, *WriteMeta, error) { - var resp ACLToken - wm, err := a.client.put("/v1/acl/login", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// ACLPolicyListStub is used to for listing ACL policies -type ACLPolicyListStub struct { - Name string - Description string - JobACL *JobACL - CreateIndex uint64 - ModifyIndex uint64 -} - -// ACLPolicy is used to represent an ACL policy -type ACLPolicy struct { - Name string - Description string - Rules string - JobACL *JobACL - - CreateIndex uint64 - ModifyIndex uint64 -} - -// JobACL represents an ACL policy's attachment to a job, group, or task. -type JobACL struct { - Namespace string - JobID string - Group string - Task string -} - -// ACLToken represents a client token which is used to Authenticate -type ACLToken struct { - AccessorID string - SecretID string - Name string - Type string - Policies []string - - // Roles represents the ACL roles that this token is tied to. The token - // will inherit the permissions of all policies detailed within the role. - Roles []*ACLTokenRoleLink - - Global bool - CreateTime time.Time - - // ExpirationTime represents the point after which a token should be - // considered revoked and is eligible for destruction. The zero value of - // time.Time does not respect json omitempty directives, so we must use a - // pointer. - ExpirationTime *time.Time `json:",omitempty"` - - // ExpirationTTL is a convenience field for helping set ExpirationTime to a - // value of CreateTime+ExpirationTTL. This can only be set during token - // creation. This is a string version of a time.Duration like "2m". - ExpirationTTL time.Duration `json:",omitempty"` - - CreateIndex uint64 - ModifyIndex uint64 -} - -// ACLTokenRoleLink is used to link an ACL token to an ACL role. The ACL token -// can therefore inherit all the ACL policy permissions that the ACL role -// contains. -type ACLTokenRoleLink struct { - - // ID is the ACLRole.ID UUID. This field is immutable and represents the - // absolute truth for the link. - ID string - - // Name is the human friendly identifier for the ACL role and is a - // convenience field for operators. - Name string -} - -// MarshalJSON implements the json.Marshaler interface and allows -// ACLToken.ExpirationTTL to be marshaled correctly. -func (a *ACLToken) MarshalJSON() ([]byte, error) { - type Alias ACLToken - exported := &struct { - ExpirationTTL string - *Alias - }{ - ExpirationTTL: a.ExpirationTTL.String(), - Alias: (*Alias)(a), - } - if a.ExpirationTTL == 0 { - exported.ExpirationTTL = "" - } - return json.Marshal(exported) -} - -// UnmarshalJSON implements the json.Unmarshaler interface and allows -// ACLToken.ExpirationTTL to be unmarshalled correctly. -func (a *ACLToken) UnmarshalJSON(data []byte) (err error) { - type Alias ACLToken - aux := &struct { - ExpirationTTL any - *Alias - }{ - Alias: (*Alias)(a), - } - - if err = json.Unmarshal(data, &aux); err != nil { - return err - } - if aux.ExpirationTTL != nil { - switch v := aux.ExpirationTTL.(type) { - case string: - if v != "" { - if a.ExpirationTTL, err = time.ParseDuration(v); err != nil { - return err - } - } - case float64: - a.ExpirationTTL = time.Duration(v) - } - - } - return nil -} - -type ACLTokenListStub struct { - AccessorID string - Name string - Type string - Policies []string - Roles []*ACLTokenRoleLink - Global bool - CreateTime time.Time - - // ExpirationTime represents the point after which a token should be - // considered revoked and is eligible for destruction. A nil value - // indicates no expiration has been set on the token. - ExpirationTime *time.Time `json:",omitempty"` - - CreateIndex uint64 - ModifyIndex uint64 -} - -type OneTimeToken struct { - OneTimeSecretID string - AccessorID string - ExpiresAt time.Time - CreateIndex uint64 - ModifyIndex uint64 -} - -type OneTimeTokenUpsertResponse struct { - OneTimeToken *OneTimeToken -} - -type OneTimeTokenExchangeRequest struct { - OneTimeSecretID string -} - -type OneTimeTokenExchangeResponse struct { - Token *ACLToken -} - -// BootstrapRequest is used for when operators provide an ACL Bootstrap Token -type BootstrapRequest struct { - BootstrapSecret string -} - -// ACLRole is an abstraction for the ACL system which allows the grouping of -// ACL policies into a single object. ACL tokens can be created and linked to -// a role; the token then inherits all the permissions granted by the policies. -type ACLRole struct { - - // ID is an internally generated UUID for this role and is controlled by - // Nomad. It can be used after role creation to update the existing role. - ID string - - // Name is unique across the entire set of federated clusters and is - // supplied by the operator on role creation. The name can be modified by - // updating the role and including the Nomad generated ID. This update will - // not affect tokens created and linked to this role. This is a required - // field. - Name string - - // Description is a human-readable, operator set description that can - // provide additional context about the role. This is an optional field. - Description string - - // Policies is an array of ACL policy links. Although currently policies - // can only be linked using their name, in the future we will want to add - // IDs also and thus allow operators to specify either a name, an ID, or - // both. At least one entry is required. - Policies []*ACLRolePolicyLink - - CreateIndex uint64 - ModifyIndex uint64 -} - -// ACLRolePolicyLink is used to link a policy to an ACL role. We use a struct -// rather than a list of strings as in the future we will want to add IDs to -// policies and then link via these. -type ACLRolePolicyLink struct { - - // Name is the ACLPolicy.Name value which will be linked to the ACL role. - Name string -} - -// ACLRoleListStub is the stub object returned when performing a listing of ACL -// roles. While it might not currently be different to the full response -// object, it allows us to future-proof the RPC in the event the ACLRole object -// grows over time. -type ACLRoleListStub struct { - - // ID is an internally generated UUID for this role and is controlled by - // Nomad. - ID string - - // Name is unique across the entire set of federated clusters and is - // supplied by the operator on role creation. The name can be modified by - // updating the role and including the Nomad generated ID. This update will - // not affect tokens created and linked to this role. This is a required - // field. - Name string - - // Description is a human-readable, operator set description that can - // provide additional context about the role. This is an operational field. - Description string - - // Policies is an array of ACL policy links. Although currently policies - // can only be linked using their name, in the future we will want to add - // IDs also and thus allow operators to specify either a name, an ID, or - // both. - Policies []*ACLRolePolicyLink - - CreateIndex uint64 - ModifyIndex uint64 -} - -// ACLAuthMethod is used to capture the properties of an authentication method -// used for single sing-on. -type ACLAuthMethod struct { - - // Name is the identifier for this auth-method and is a required parameter. - Name string - - // Type is the SSO identifier this auth-method is. Nomad currently only - // supports "oidc" and the API contains ACLAuthMethodTypeOIDC for - // convenience. - Type string - - // Defines whether the auth-method creates a local or global token when - // performing SSO login. This should be set to either "local" or "global" - // and the API contains ACLAuthMethodTokenLocalityLocal and - // ACLAuthMethodTokenLocalityGlobal for convenience. - TokenLocality string - - // TokenNameFormat defines the HIL template to use when building the token name - TokenNameFormat string - - // MaxTokenTTL is the maximum life of a token created by this method. - MaxTokenTTL time.Duration - - // Default identifies whether this is the default auth-method to use when - // attempting to login without specifying an auth-method name to use. - Default bool - - // Config contains the detailed configuration which is specific to the - // auth-method. - Config *ACLAuthMethodConfig - - CreateTime time.Time - ModifyTime time.Time - CreateIndex uint64 - ModifyIndex uint64 -} - -// MarshalJSON implements the json.Marshaler interface and allows -// ACLAuthMethod.MaxTokenTTL to be marshaled correctly. -func (m *ACLAuthMethod) MarshalJSON() ([]byte, error) { - type Alias ACLAuthMethod - exported := &struct { - MaxTokenTTL string - *Alias - }{ - MaxTokenTTL: m.MaxTokenTTL.String(), - Alias: (*Alias)(m), - } - if m.MaxTokenTTL == 0 { - exported.MaxTokenTTL = "" - } - return json.Marshal(exported) -} - -// UnmarshalJSON implements the json.Unmarshaler interface and allows -// ACLAuthMethod.MaxTokenTTL to be unmarshalled correctly. -func (m *ACLAuthMethod) UnmarshalJSON(data []byte) error { - type Alias ACLAuthMethod - aux := &struct { - MaxTokenTTL string - *Alias - }{ - Alias: (*Alias)(m), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.MaxTokenTTL != "" { - if m.MaxTokenTTL, err = time.ParseDuration(aux.MaxTokenTTL); err != nil { - return err - } - } - return nil -} - -// ACLAuthMethodConfig is used to store configuration of an auth method. -type ACLAuthMethodConfig struct { - // A list of PEM-encoded public keys to use to authenticate signatures - // locally - JWTValidationPubKeys []string - // JSON Web Key Sets url for authenticating signatures - JWKSURL string - // The OIDC Discovery URL, without any .well-known component (base path) - OIDCDiscoveryURL string - // The OAuth Client ID configured with the OIDC provider - OIDCClientID string - // The OAuth Client Secret configured with the OIDC provider - OIDCClientSecret string - // Optionally send a signed JWT ("private key jwt") as a client assertion - // to the OIDC provider - OIDCClientAssertion *OIDCClientAssertion - // Enable S256 PKCE challenge verification. - OIDCEnablePKCE bool - // Disable claims from the OIDC UserInfo endpoint - OIDCDisableUserInfo bool - // List of OIDC scopes - OIDCScopes []string - // List of auth claims that are valid for login - BoundAudiences []string - // The value against which to match the iss claim in a JWT - BoundIssuer []string - // A list of allowed values for redirect_uri - AllowedRedirectURIs []string - // PEM encoded CA certs for use by the TLS client used to talk with the - // OIDC Discovery URL. - DiscoveryCaPem []string - // PEM encoded CA cert for use by the TLS client used to talk with the JWKS - // URL - JWKSCACert string - // A list of supported signing algorithms - SigningAlgs []string - // Duration in seconds of leeway when validating expiration of a token to - // account for clock skew - ExpirationLeeway time.Duration - // Duration in seconds of leeway when validating not before values of a - // token to account for clock skew. - NotBeforeLeeway time.Duration - // Duration in seconds of leeway when validating all claims to account for - // clock skew. - ClockSkewLeeway time.Duration - // Mappings of claims (key) that will be copied to a metadata field - // (value). - ClaimMappings map[string]string - ListClaimMappings map[string]string - // Enables logging of claims and binding-rule evaluations when - // debug level logging is enabled. - VerboseLogging bool -} - -// MarshalJSON implements the json.Marshaler interface and allows -// time.Duration fields to be marshaled correctly. -func (c *ACLAuthMethodConfig) MarshalJSON() ([]byte, error) { - type Alias ACLAuthMethodConfig - exported := &struct { - ExpirationLeeway string - NotBeforeLeeway string - ClockSkewLeeway string - *Alias - }{ - ExpirationLeeway: c.ExpirationLeeway.String(), - NotBeforeLeeway: c.NotBeforeLeeway.String(), - ClockSkewLeeway: c.ClockSkewLeeway.String(), - Alias: (*Alias)(c), - } - if c.ExpirationLeeway == 0 { - exported.ExpirationLeeway = "" - } - if c.NotBeforeLeeway == 0 { - exported.NotBeforeLeeway = "" - } - if c.ClockSkewLeeway == 0 { - exported.ClockSkewLeeway = "" - } - return json.Marshal(exported) -} - -// UnmarshalJSON implements the json.Unmarshaler interface and allows -// time.Duration fields to be unmarshalled correctly. -func (c *ACLAuthMethodConfig) UnmarshalJSON(data []byte) error { - type Alias ACLAuthMethodConfig - aux := &struct { - ExpirationLeeway any - NotBeforeLeeway any - ClockSkewLeeway any - *Alias - }{ - Alias: (*Alias)(c), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.ExpirationLeeway != nil { - switch v := aux.ExpirationLeeway.(type) { - case string: - if v != "" { - if c.ExpirationLeeway, err = time.ParseDuration(v); err != nil { - return err - } - } - case float64: - c.ExpirationLeeway = time.Duration(v) - default: - return fmt.Errorf("unexpected ExpirationLeeway type: %v", v) - } - } - if aux.NotBeforeLeeway != nil { - switch v := aux.NotBeforeLeeway.(type) { - case string: - if v != "" { - if c.NotBeforeLeeway, err = time.ParseDuration(v); err != nil { - return err - } - } - case float64: - c.NotBeforeLeeway = time.Duration(v) - default: - return fmt.Errorf("unexpected NotBeforeLeeway type: %v", v) - } - } - if aux.ClockSkewLeeway != nil { - switch v := aux.ClockSkewLeeway.(type) { - case string: - if v != "" { - if c.ClockSkewLeeway, err = time.ParseDuration(v); err != nil { - return err - } - } - case float64: - c.ClockSkewLeeway = time.Duration(v) - default: - return fmt.Errorf("unexpected ClockSkewLeeway type: %v", v) - } - } - return nil -} - -// OIDCClientAssertionKeySource specifies what key material should be used -// to sign an OIDCClientAssertion. -type OIDCClientAssertionKeySource string - -const ( - // OIDCKeySourceNomad signs the OIDCClientAssertion JWT with Nomad's - // internal private key. Its public key is exposed at /.well-known/jwks.json - OIDCKeySourceNomad OIDCClientAssertionKeySource = "nomad" - // OIDCKeySourcePrivateKey signs the OIDCClientAssertion JWT with - // key material defined in OIDCClientAssertion.PrivateKey - OIDCKeySourcePrivateKey OIDCClientAssertionKeySource = "private_key" - // OIDCKeySourceClientSecret signs the OIDCClientAssertion JWT with - // ACLAuthMethod.ClientSecret - OIDCKeySourceClientSecret OIDCClientAssertionKeySource = "client_secret" -) - -// OIDCClientAssertion (a.k.a private_key_jwt) is used to send -// a client_assertion along with an OIDC token request. -// Reference: https://oauth.net/private-key-jwt/ -// See also: structs.OIDCClientAssertion -type OIDCClientAssertion struct { - // Audience is/are who will be processing the assertion. - // Defaults to the parent `ACLAuthMethodConfig`'s `OIDCDiscoveryURL` - Audience []string - - // KeySource is where to get the private key to sign the JWT. - // It is the one field that *must* be set to enable client assertions. - // Available sources: - // - "nomad": Use current active key in Nomad's keyring - // - "private_key": Use key material in the `PrivateKey` field - // - "client_secret": Use the `OIDCClientSecret` inherited from the parent - // `ACLAuthMethodConfig` as an HMAC key - KeySource OIDCClientAssertionKeySource - - // KeyAlgorithm is the key's algorithm. - // Its default values are based on the `KeySource`: - // - "nomad": "RS256" (from Nomad's keyring, must not be changed) - // - "private_key": "RS256" (must be RS256, RS384, or RS512) - // - "client_secret": "HS256" (must be HS256, HS384, or HS512) - KeyAlgorithm string - - // PrivateKey contains external key material provided by users. - // `KeySource` must be "private_key" to enable this. - PrivateKey *OIDCClientAssertionKey - - // ExtraHeaders are added to the JWT headers, alongside "kid" and "type" - // Setting the "kid" header here is not allowed; use `PrivateKey.KeyID`. - ExtraHeaders map[string]string -} - -// OIDCClientAssertionKeyIDHeader is the header that the OIDC provider will use -// to look up the certificate or public key that it needs to verify the -// private key JWT signature. -type OIDCClientAssertionKeyIDHeader string - -const ( - OIDCClientAssertionHeaderKid OIDCClientAssertionKeyIDHeader = "kid" - OIDCClientAssertionHeaderX5t OIDCClientAssertionKeyIDHeader = "x5t" - OIDCClientAssertionHeaderX5tS256 OIDCClientAssertionKeyIDHeader = "x5t#S256" -) - -// OIDCClientAssertionKey contains key material provided by users for Nomad -// to use to sign the private key JWT. -// -// PemKey or PemKeyFile must contain an RSA private key in PEM format. -// -// PemCert, PemCertFile may contain an x509 certificate created with -// the Key, used to derive the KeyID. Alternatively, KeyID may be set manually. -// -// PemKeyFile and PemCertFile, if set, must be an absolute path to a file -// present on disk on any Nomad servers that may become cluster leaders. -type OIDCClientAssertionKey struct { - // PemKey is an RSA private key, in pem format. It is used to sign the JWT. - // Mutually exclusive with `PemKeyFile`. - PemKey string - // PemKeyFile is an absolute path to a private key on Nomad servers' disk, - // in pem format. It is used to sign the JWT. - // Mutually exclusive with `PemKey`. - PemKeyFile string - - // KeyIDHeader is which header the provider will use to find the - // public key to verify the signed JWT. Its default values vary - // based on which of the other required fields is set: - // - KeyID: "kid" - // - PemCert: "x5t#S256" - // - PemCertFile: "x5t#S256" - // - // Refer to the JWS RFC for information on these headers: - // - "kid": https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.4 - // - "x5t": https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.7 - // - "x5t#S256": https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.8 - // - // If you need to set some other header not supported here, - // you may use OIDCClientAssertion.ExtraHeaders. - KeyIDHeader OIDCClientAssertionKeyIDHeader - // KeyID may be set manually and becomes the "kid" header. - // Mutually exclusive with `PemCert` and `PemCertFile`. - // Allowed `KeyIDHeader` values: "kid" (the default) - KeyID string - // PemCert is an x509 certificate, signed by the private key or a CA, - // in pem format. It is used to derive an x5t#S256 (or x5t) header. - // Mutually exclusive with `PemCertFile` and `KeyID`. - // Allowed `KeyIDHeader` values: "x5t", "x5t#S256" (default "x5t#S256") - PemCert string - // PemCertFile is an absolute path to an x509 certificate on Nomad servers' - // disk, signed by the private key or a CA, in pem format. - // It is used to derive an x5t#S256 (or x5t) header. - // Mutually exclusive with `PemCert` and `KeyID`. - // Allowed `KeyIDHeader` values: "x5t", "x5t#S256" (default "x5t#S256") - PemCertFile string -} - -// ACLAuthMethodListStub is the stub object returned when performing a listing -// of ACL auth-methods. It is intentionally minimal due to the unauthenticated -// nature of the list endpoint. -type ACLAuthMethodListStub struct { - Name string - Type string - Default bool - - CreateIndex uint64 - ModifyIndex uint64 -} - -const ( - // ACLAuthMethodTokenLocalityLocal is the ACLAuthMethod.TokenLocality that - // will generate ACL tokens which can only be used on the local cluster the - // request was made. - ACLAuthMethodTokenLocalityLocal = "local" - - // ACLAuthMethodTokenLocalityGlobal is the ACLAuthMethod.TokenLocality that - // will generate ACL tokens which can be used on all federated clusters. - ACLAuthMethodTokenLocalityGlobal = "global" - - // ACLAuthMethodTypeOIDC the ACLAuthMethod.Type and represents an - // auth-method which uses the OIDC protocol. - ACLAuthMethodTypeOIDC = "OIDC" - - // ACLAuthMethodTypeJWT the ACLAuthMethod.Type and represents an auth-method - // which uses the JWT type. - ACLAuthMethodTypeJWT = "JWT" -) - -// ACLBindingRule contains a direct relation to an ACLAuthMethod and represents -// a rule to apply when logging in via the named AuthMethod. This allows the -// transformation of OIDC provider claims, to Nomad based ACL concepts such as -// ACL Roles and Policies. -type ACLBindingRule struct { - - // ID is an internally generated UUID for this rule and is controlled by - // Nomad. - ID string - - // Description is a human-readable, operator set description that can - // provide additional context about the binding rule. This is an - // operational field. - Description string - - // AuthMethod is the name of the auth method for which this rule applies - // to. This is required and the method must exist within state before the - // cluster administrator can create the rule. - AuthMethod string - - // Selector is an expression that matches against verified identity - // attributes returned from the auth method during login. This is optional - // and when not set, provides a catch-all rule. - Selector string - - // BindType adjusts how this binding rule is applied at login time. The - // valid values are ACLBindingRuleBindTypeRole, - // ACLBindingRuleBindTypePolicy, and ACLBindingRuleBindTypeManagement. - BindType string - - // BindName is the target of the binding. Can be lightly templated using - // HIL ${foo} syntax from available field names. How it is used depends - // upon the BindType. - BindName string - - CreateTime time.Time - ModifyTime time.Time - CreateIndex uint64 - ModifyIndex uint64 -} - -const ( - // ACLBindingRuleBindTypeRole is the ACL binding rule bind type that only - // allows the binding rule to function if a role exists at login-time. The - // role will be specified within the ACLBindingRule.BindName parameter, and - // will identify whether this is an ID or Name. - ACLBindingRuleBindTypeRole = "role" - - // ACLBindingRuleBindTypePolicy is the ACL binding rule bind type that - // assigns a policy to the generate ACL token. The role will be specified - // within the ACLBindingRule.BindName parameter, and will be the policy - // name. - ACLBindingRuleBindTypePolicy = "policy" - - // ACLBindingRuleBindTypeManagement is the ACL binding rule bind type that - // will generate management ACL tokens when matched. - ACLBindingRuleBindTypeManagement = "management" -) - -// ACLBindingRuleListStub is the stub object returned when performing a listing -// of ACL binding rules. -type ACLBindingRuleListStub struct { - - // ID is an internally generated UUID for this role and is controlled by - // Nomad. - ID string - - // Description is a human-readable, operator set description that can - // provide additional context about the binding role. This is an - // operational field. - Description string - - // AuthMethod is the name of the auth method for which this rule applies - // to. This is required and the method must exist within state before the - // cluster administrator can create the rule. - AuthMethod string - - CreateIndex uint64 - ModifyIndex uint64 -} - -// ACLOIDCAuthURLRequest is the request to make when starting the OIDC -// authentication login flow. -type ACLOIDCAuthURLRequest struct { - - // AuthMethodName is the OIDC auth-method to use. This is a required - // parameter. - AuthMethodName string - - // RedirectURI is the URL that authorization should redirect to. This is a - // required parameter. - RedirectURI string - - // ClientNonce is a randomly generated string to prevent replay attacks. It - // is up to the client to generate this and Go integrations should use the - // oidc.NewID function within the hashicorp/cap library. - ClientNonce string -} - -// ACLOIDCAuthURLResponse is the response when starting the OIDC authentication -// login flow. -type ACLOIDCAuthURLResponse struct { - - // AuthURL is URL to begin authorization and is where the user logging in - // should go. - AuthURL string -} - -// ACLOIDCCompleteAuthRequest is the request object to begin completing the -// OIDC auth cycle after receiving the callback from the OIDC provider. -type ACLOIDCCompleteAuthRequest struct { - - // AuthMethodName is the name of the auth method being used to login via - // OIDC. This will match AuthUrlArgs.AuthMethodName. This is a required - // parameter. - AuthMethodName string - - // ClientNonce, State, and Code are provided from the parameters given to - // the redirect URL. These are all required parameters. - ClientNonce string - State string - Code string - - // RedirectURI is the URL that authorization should redirect to. This is a - // required parameter. - RedirectURI string -} - -// ACLLoginRequest is the request object to begin auth with an external bearer -// token provider. -type ACLLoginRequest struct { - // AuthMethodName is the name of the auth method being used to login. This - // is a required parameter. - AuthMethodName string - // LoginToken is the token used to login. This is a required parameter. - LoginToken string -} diff --git a/vendor/github.com/hashicorp/nomad/api/agent.go b/vendor/github.com/hashicorp/nomad/api/agent.go deleted file mode 100644 index ee8ff65fd7..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/agent.go +++ /dev/null @@ -1,606 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "io" - "net/url" - "strconv" -) - -// Agent encapsulates an API client which talks to Nomad's -// agent endpoints for a specific node. -type Agent struct { - client *Client - - // Cache static agent info - nodeName string - datacenter string - region string -} - -// KeyringResponse is a unified key response and can be used for install, -// remove, use, as well as listing key queries. -type KeyringResponse struct { - Messages map[string]string - Keys map[string]int - NumNodes int -} - -// KeyringRequest is request objects for serf key operations. -type KeyringRequest struct { - Key string -} - -// ForceLeaveOpts are used to configure the ForceLeave method. -type ForceLeaveOpts struct { - // Prune indicates whether to remove a node from the list of members - Prune bool -} - -// Agent returns a new agent which can be used to query -// the agent-specific endpoints. -func (c *Client) Agent() *Agent { - return &Agent{client: c} -} - -// Self is used to query the /v1/agent/self endpoint and -// returns information specific to the running agent. -func (a *Agent) Self() (*AgentSelf, error) { - var out *AgentSelf - - // Query the self endpoint on the agent - _, err := a.client.query("/v1/agent/self", &out, nil) - if err != nil { - return nil, fmt.Errorf("failed querying self endpoint: %s", err) - } - - // Populate the cache for faster queries - a.populateCache(out) - - return out, nil -} - -// populateCache is used to insert various pieces of static -// data into the agent handle. This is used during subsequent -// lookups for the same data later on to save the round trip. -func (a *Agent) populateCache(self *AgentSelf) { - if a.nodeName == "" { - a.nodeName = self.Member.Name - } - if a.datacenter == "" { - if val, ok := self.Config["Datacenter"]; ok { - a.datacenter, _ = val.(string) - } - } - if a.region == "" { - if val, ok := self.Config["Region"]; ok { - a.region, _ = val.(string) - } - } -} - -// NodeName is used to query the Nomad agent for its node name. -func (a *Agent) NodeName() (string, error) { - // Return from cache if we have it - if a.nodeName != "" { - return a.nodeName, nil - } - - // Query the node name - _, err := a.Self() - return a.nodeName, err -} - -// Datacenter is used to return the name of the datacenter which -// the agent is a member of. -func (a *Agent) Datacenter() (string, error) { - // Return from cache if we have it - if a.datacenter != "" { - return a.datacenter, nil - } - - // Query the agent for the DC - _, err := a.Self() - return a.datacenter, err -} - -// Region is used to look up the region the agent is in. -func (a *Agent) Region() (string, error) { - // Return from cache if we have it - if a.region != "" { - return a.region, nil - } - - // Query the agent for the region - _, err := a.Self() - return a.region, err -} - -// Join is used to instruct a server node to join another server -// via the gossip protocol. Multiple addresses may be specified. -// We attempt to join all the hosts in the list. Returns the -// number of nodes successfully joined and any error. If one or -// more nodes have a successful result, no error is returned. -func (a *Agent) Join(addrs ...string) (int, error) { - // Accumulate the addresses - v := url.Values{} - for _, addr := range addrs { - v.Add("address", addr) - } - - // Send the join request - var resp joinResponse - _, err := a.client.put("/v1/agent/join?"+v.Encode(), nil, &resp, nil) - if err != nil { - return 0, fmt.Errorf("failed joining: %s", err) - } - if resp.Error != "" { - return 0, fmt.Errorf("failed joining: %s", resp.Error) - } - return resp.NumJoined, nil -} - -// Members is used to query all of the known server members -func (a *Agent) Members() (*ServerMembers, error) { - var resp *ServerMembers - - // Query the known members - _, err := a.client.query("/v1/agent/members", &resp, nil) - if err != nil { - return nil, err - } - return resp, nil -} - -// MembersOpts is used to query all of the known server members -// with the ability to set QueryOptions -func (a *Agent) MembersOpts(opts *QueryOptions) (*ServerMembers, error) { - var resp *ServerMembers - _, err := a.client.query("/v1/agent/members", &resp, opts) - if err != nil { - return nil, err - } - return resp, nil -} - -// ForceLeave is used to eject an existing node from the cluster. -func (a *Agent) ForceLeave(node string) error { - v := url.Values{} - v.Add("node", node) - _, err := a.client.put("/v1/agent/force-leave?"+v.Encode(), nil, nil, nil) - return err -} - -// ForceLeaveWithOptions is used to eject an existing node from the cluster -// with additional options such as prune. -func (a *Agent) ForceLeaveWithOptions(node string, opts ForceLeaveOpts) error { - v := url.Values{} - v.Add("node", node) - if opts.Prune { - v.Add("prune", "1") - } - _, err := a.client.put("/v1/agent/force-leave?"+v.Encode(), nil, nil, nil) - return err -} - -// Servers is used to query the list of servers on a client node. -func (a *Agent) Servers() ([]string, error) { - var resp []string - _, err := a.client.query("/v1/agent/servers", &resp, nil) - if err != nil { - return nil, err - } - return resp, nil -} - -// SetServers is used to update the list of servers on a client node. -func (a *Agent) SetServers(addrs []string) error { - // Accumulate the addresses - v := url.Values{} - for _, addr := range addrs { - v.Add("address", addr) - } - - _, err := a.client.put("/v1/agent/servers?"+v.Encode(), nil, nil, nil) - return err -} - -// ListKeys returns the list of installed keys -func (a *Agent) ListKeys() (*KeyringResponse, error) { - var resp KeyringResponse - _, err := a.client.query("/v1/agent/keyring/list", &resp, nil) - if err != nil { - return nil, err - } - return &resp, nil -} - -// InstallKey installs a key in the keyrings of all the serf members -func (a *Agent) InstallKey(key string) (*KeyringResponse, error) { - args := KeyringRequest{ - Key: key, - } - var resp KeyringResponse - _, err := a.client.put("/v1/agent/keyring/install", &args, &resp, nil) - return &resp, err -} - -// UseKey uses a key from the keyring of serf members -func (a *Agent) UseKey(key string) (*KeyringResponse, error) { - args := KeyringRequest{ - Key: key, - } - var resp KeyringResponse - _, err := a.client.put("/v1/agent/keyring/use", &args, &resp, nil) - return &resp, err -} - -// RemoveKey removes a particular key from keyrings of serf members -func (a *Agent) RemoveKey(key string) (*KeyringResponse, error) { - args := KeyringRequest{ - Key: key, - } - var resp KeyringResponse - _, err := a.client.put("/v1/agent/keyring/remove", &args, &resp, nil) - return &resp, err -} - -// Health queries the agent's health -func (a *Agent) Health() (*AgentHealthResponse, error) { - req, err := a.client.newRequest("GET", "/v1/agent/health") - if err != nil { - return nil, err - } - - var health AgentHealthResponse - _, resp, err := a.client.doRequest(req) - if err != nil { - return nil, err - } - defer resp.Body.Close() - - // Always try to decode the response as JSON - err = json.NewDecoder(resp.Body).Decode(&health) - if err == nil { - return &health, nil - } - - // Return custom error when response is not expected JSON format - return nil, fmt.Errorf("unable to unmarshal response with status %d: %v", resp.StatusCode, err) -} - -// Host returns debugging context about the agent's host operating system -func (a *Agent) Host(serverID, nodeID string, q *QueryOptions) (*HostDataResponse, error) { - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - - if serverID != "" { - q.Params["server_id"] = serverID - } - - if nodeID != "" { - q.Params["node_id"] = nodeID - } - - var resp HostDataResponse - _, err := a.client.query("/v1/agent/host", &resp, q) - if err != nil { - return nil, err - } - - return &resp, nil -} - -// Monitor returns a channel which will receive streaming logs from the agent -// Providing a non-nil stopCh can be used to close the connection and stop log streaming -func (a *Agent) Monitor(stopCh <-chan struct{}, q *QueryOptions) (<-chan *StreamFrame, <-chan error) { - frames, errCh := a.monitorHelper(stopCh, q, "/v1/agent/monitor") - return frames, errCh -} - -// MonitorExport returns a channel which will receive streaming logs from the agent -// Providing a non-nil stopCh can be used to close the connection and stop log streaming -func (a *Agent) MonitorExport(stopCh <-chan struct{}, q *QueryOptions) (<-chan *StreamFrame, <-chan error) { - frames, errCh := a.monitorHelper(stopCh, q, "/v1/agent/monitor/export") - return frames, errCh -} - -func (a *Agent) monitorHelper(stopCh <-chan struct{}, q *QueryOptions, path string) (chan *StreamFrame, chan error) { - errCh := make(chan error, 1) - r, err := a.client.newRequest("GET", path) - if err != nil { - errCh <- err - return nil, errCh - } - - r.setQueryOptions(q) - _, resp, err := requireOK(a.client.doRequest(r)) //nolint:bodyclose - if err != nil { - errCh <- err - return nil, errCh - } - - frames := make(chan *StreamFrame, 10) - go func() { - defer resp.Body.Close() - - dec := json.NewDecoder(resp.Body) - - for { - select { - case <-stopCh: - close(frames) - return - default: - } - - // Decode the next frame - var frame StreamFrame - if err := dec.Decode(&frame); err != nil { - close(frames) - errCh <- err - return - } - - // Discard heartbeat frame - if frame.IsHeartbeat() { - continue - } - - frames <- &frame - } - }() - - return frames, errCh -} - -// PprofOptions contain a set of parameters for profiling a node or server. -type PprofOptions struct { - // ServerID is the server ID, name, or special value "leader" to - // specify the server that a given profile should be run on. - ServerID string - - // NodeID is the node ID that a given profile should be run on. - NodeID string - - // Seconds specifies the amount of time a profile should be run for. - // Seconds only applies for certain runtime profiles like CPU and Trace. - Seconds int - - // GC determines if a runtime.GC() should be called before a heap - // profile. - GC int - - // Debug specifies if the output of a lookup profile should be returned - // in human readable format instead of binary. - Debug int -} - -// CPUProfile returns a runtime/pprof cpu profile for a given server or node. -// The profile will run for the amount of seconds passed in or default to 1. -// If no serverID or nodeID are provided the current Agents server will be -// used. -// -// The call blocks until the profile finishes, and returns the raw bytes of the -// profile. -func (a *Agent) CPUProfile(opts PprofOptions, q *QueryOptions) ([]byte, error) { - return a.pprofRequest("profile", opts, q) -} - -// Trace returns a runtime/pprof trace for a given server or node. -// The trace will run for the amount of seconds passed in or default to 1. -// If no serverID or nodeID are provided the current Agents server will be -// used. -// -// The call blocks until the profile finishes, and returns the raw bytes of the -// profile. -func (a *Agent) Trace(opts PprofOptions, q *QueryOptions) ([]byte, error) { - return a.pprofRequest("trace", opts, q) -} - -// Lookup returns a runtime/pprof profile using pprof.Lookup to determine -// which profile to run. Accepts a client or server ID but not both simultaneously. -// -// The call blocks until the profile finishes, and returns the raw bytes of the -// profile unless debug is set. -func (a *Agent) Lookup(profile string, opts PprofOptions, q *QueryOptions) ([]byte, error) { - return a.pprofRequest(profile, opts, q) -} - -func (a *Agent) pprofRequest(req string, opts PprofOptions, q *QueryOptions) ([]byte, error) { - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - - q.Params["seconds"] = strconv.Itoa(opts.Seconds) - q.Params["debug"] = strconv.Itoa(opts.Debug) - q.Params["gc"] = strconv.Itoa(opts.GC) - q.Params["node_id"] = opts.NodeID - q.Params["server_id"] = opts.ServerID - - body, err := a.client.rawQuery(fmt.Sprintf("/v1/agent/pprof/%s", req), q) - if err != nil { - return nil, err - } - - resp, err := io.ReadAll(body) - if err != nil { - return nil, err - } - return resp, nil -} - -// joinResponse is used to decode the response we get while -// sending a member join request. -type joinResponse struct { - NumJoined int `json:"num_joined"` - Error string `json:"error"` -} - -type ServerMembers struct { - ServerName string - ServerRegion string - ServerDC string - Members []*AgentMember -} - -type AgentSelf struct { - Config map[string]interface{} `json:"config"` - Member AgentMember `json:"member"` - Stats map[string]map[string]string `json:"stats"` -} - -// AgentMember represents a cluster member known to the agent -type AgentMember struct { - Name string - Addr string - Port uint16 - Tags map[string]string - Status string - ProtocolMin uint8 - ProtocolMax uint8 - ProtocolCur uint8 - DelegateMin uint8 - DelegateMax uint8 - DelegateCur uint8 -} - -// AgentMembersNameSort implements sort.Interface for []*AgentMembersNameSort -// based on the Name, DC and Region -type AgentMembersNameSort []*AgentMember - -func (a AgentMembersNameSort) Len() int { return len(a) } -func (a AgentMembersNameSort) Swap(i, j int) { a[i], a[j] = a[j], a[i] } -func (a AgentMembersNameSort) Less(i, j int) bool { - if a[i].Tags["region"] != a[j].Tags["region"] { - return a[i].Tags["region"] < a[j].Tags["region"] - } - - if a[i].Tags["dc"] != a[j].Tags["dc"] { - return a[i].Tags["dc"] < a[j].Tags["dc"] - } - - return a[i].Name < a[j].Name - -} - -// AgentHealthResponse is the response from the Health endpoint describing an -// agent's health. -type AgentHealthResponse struct { - Client *AgentHealth `json:"client,omitempty"` - Server *AgentHealth `json:"server,omitempty"` -} - -// AgentHealth describes the Client or Server's health in a Health request. -type AgentHealth struct { - // Ok is false if the agent is unhealthy - Ok bool `json:"ok"` - - // Message describes why the agent is unhealthy - Message string `json:"message"` -} - -type HostData struct { - OS string - Network []map[string]string - ResolvConf string - Hosts string - Environment map[string]string - Disk map[string]DiskUsage -} - -type DiskUsage struct { - DiskMB int64 - UsedMB int64 -} - -type HostDataResponse struct { - AgentID string - HostData *HostData `json:",omitempty"` -} - -// GetSchedulerWorkerConfig returns the targeted agent's worker pool configuration -func (a *Agent) GetSchedulerWorkerConfig(q *QueryOptions) (*SchedulerWorkerPoolArgs, error) { - var resp AgentSchedulerWorkerConfigResponse - _, err := a.client.query("/v1/agent/schedulers/config", &resp, q) - if err != nil { - return nil, err - } - - return &SchedulerWorkerPoolArgs{NumSchedulers: resp.NumSchedulers, EnabledSchedulers: resp.EnabledSchedulers}, nil -} - -// SetSchedulerWorkerConfig attempts to update the targeted agent's worker pool configuration -func (a *Agent) SetSchedulerWorkerConfig(args SchedulerWorkerPoolArgs, q *WriteOptions) (*SchedulerWorkerPoolArgs, error) { - req := AgentSchedulerWorkerConfigRequest(args) - var resp AgentSchedulerWorkerConfigResponse - - _, err := a.client.put("/v1/agent/schedulers/config", &req, &resp, q) - if err != nil { - return nil, err - } - - return &SchedulerWorkerPoolArgs{NumSchedulers: resp.NumSchedulers, EnabledSchedulers: resp.EnabledSchedulers}, nil -} - -type SchedulerWorkerPoolArgs struct { - NumSchedulers int - EnabledSchedulers []string -} - -// AgentSchedulerWorkerConfigRequest is used to provide new scheduler worker configuration -// to a specific Nomad server. EnabledSchedulers must contain at least the `_core` scheduler -// to be valid. -type AgentSchedulerWorkerConfigRequest struct { - NumSchedulers int `json:"num_schedulers"` - EnabledSchedulers []string `json:"enabled_schedulers"` -} - -// AgentSchedulerWorkerConfigResponse contains the Nomad server's current running configuration -// as well as the server's id as a convenience. This can be used to provide starting values for -// creating an AgentSchedulerWorkerConfigRequest to make changes to the running configuration. -type AgentSchedulerWorkerConfigResponse struct { - ServerID string `json:"server_id"` - NumSchedulers int `json:"num_schedulers"` - EnabledSchedulers []string `json:"enabled_schedulers"` -} - -// GetSchedulerWorkersInfo returns the current status of all of the scheduler workers on -// a Nomad server. -func (a *Agent) GetSchedulerWorkersInfo(q *QueryOptions) (*AgentSchedulerWorkersInfo, error) { - var out *AgentSchedulerWorkersInfo - - _, err := a.client.query("/v1/agent/schedulers", &out, q) - if err != nil { - return nil, err - } - - return out, nil -} - -// AgentSchedulerWorkersInfo is the response from the scheduler information endpoint containing -// a detailed status of each scheduler worker running on the server. -type AgentSchedulerWorkersInfo struct { - ServerID string `json:"server_id"` - Schedulers []AgentSchedulerWorkerInfo `json:"schedulers"` -} - -// AgentSchedulerWorkerInfo holds the detailed status information for a single scheduler worker. -type AgentSchedulerWorkerInfo struct { - ID string `json:"id"` - EnabledSchedulers []string `json:"enabled_schedulers"` - Started string `json:"started"` - Status string `json:"status"` - WorkloadStatus string `json:"workload_status"` -} diff --git a/vendor/github.com/hashicorp/nomad/api/allocations.go b/vendor/github.com/hashicorp/nomad/api/allocations.go deleted file mode 100644 index e4c95d6d90..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/allocations.go +++ /dev/null @@ -1,646 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "errors" - "io" - "sort" - "strings" - "time" -) - -var ( - // NodeDownErr marks an operation as not able to complete since the node is - // down. - NodeDownErr = errors.New("node down") -) - -const ( - AllocDesiredStatusRun = "run" // Allocation should run - AllocDesiredStatusStop = "stop" // Allocation should stop - AllocDesiredStatusEvict = "evict" // Allocation should stop, and was evicted -) - -const ( - AllocClientStatusPending = "pending" - AllocClientStatusRunning = "running" - AllocClientStatusComplete = "complete" - AllocClientStatusFailed = "failed" - AllocClientStatusLost = "lost" - AllocClientStatusUnknown = "unknown" -) - -const ( - AllocRestartReasonWithinPolicy = "Restart within policy" -) - -// Allocations is used to query the alloc-related endpoints. -type Allocations struct { - client *Client -} - -// Allocations returns a handle on the allocs endpoints. -func (c *Client) Allocations() *Allocations { - return &Allocations{client: c} -} - -// List returns a list of all of the allocations. -func (a *Allocations) List(q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) { - var resp []*AllocationListStub - qm, err := a.client.query("/v1/allocations", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(AllocIndexSort(resp)) - return resp, qm, nil -} - -func (a *Allocations) PrefixList(prefix string) ([]*AllocationListStub, *QueryMeta, error) { - return a.List(&QueryOptions{Prefix: prefix}) -} - -// Info is used to retrieve a single allocation. -func (a *Allocations) Info(allocID string, q *QueryOptions) (*Allocation, *QueryMeta, error) { - var resp Allocation - qm, err := a.client.query("/v1/allocation/"+allocID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Exec is used to execute a command inside a running task. The command is to run inside -// the task environment. -// -// The parameters are: -// - ctx: context to set deadlines or timeout -// - allocation: the allocation to execute command inside -// - task: the task's name to execute command in -// - tty: indicates whether to start a pseudo-tty for the command -// - stdin, stdout, stderr: the std io to pass to command. -// If tty is true, then streams need to point to a tty that's alive for the whole process -// - terminalSizeCh: A channel to send new tty terminal sizes -// -// The call blocks until command terminates (or an error occurs), and returns the exit code. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) Exec(ctx context.Context, - alloc *Allocation, task string, tty bool, command []string, - stdin io.Reader, stdout, stderr io.Writer, - terminalSizeCh <-chan TerminalSize, q *QueryOptions) (exitCode int, err error) { - - s := &execSession{ - client: a.client, - alloc: alloc, - task: task, - tty: tty, - command: command, - - stdin: stdin, - stdout: stdout, - stderr: stderr, - - terminalSizeCh: terminalSizeCh, - q: q, - } - - return s.run(ctx) -} - -// Stats gets allocation resource usage statistics about an allocation. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) Stats(alloc *Allocation, q *QueryOptions) (*AllocResourceUsage, error) { - var resp AllocResourceUsage - _, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/stats", &resp, q) - return &resp, err -} - -// Checks gets status information for nomad service checks that exist in the allocation. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) Checks(allocID string, q *QueryOptions) (AllocCheckStatuses, error) { - var resp AllocCheckStatuses - _, err := a.client.query("/v1/client/allocation/"+allocID+"/checks", &resp, q) - return resp, err -} - -// GC forces a garbage collection of client state for an allocation. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) GC(alloc *Allocation, q *QueryOptions) error { - var resp struct{} - _, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/gc", &resp, nil) - return err -} - -// Restart restarts the tasks that are currently running or a specific task if -// taskName is provided. An error is returned if the task to be restarted is -// not running. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) Restart(alloc *Allocation, taskName string, q *QueryOptions) error { - req := AllocationRestartRequest{ - TaskName: taskName, - } - - var resp struct{} - _, err := a.client.putQuery("/v1/client/allocation/"+alloc.ID+"/restart", &req, &resp, q) - return err -} - -// RestartAllTasks restarts all tasks in the allocation, regardless of -// lifecycle type or state. Tasks will restart following their lifecycle order. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -// -// DEPRECATED: This method will be removed in 1.6.0 -func (a *Allocations) RestartAllTasks(alloc *Allocation, q *QueryOptions) error { - req := AllocationRestartRequest{ - AllTasks: true, - } - - var resp struct{} - _, err := a.client.putQuery("/v1/client/allocation/"+alloc.ID+"/restart", &req, &resp, q) - return err -} - -// Stop stops an allocation. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -// -// BREAKING: This method will have the following signature in 1.6.0 -// func (a *Allocations) Stop(allocID string, w *WriteOptions) (*AllocStopResponse, error) { -func (a *Allocations) Stop(alloc *Allocation, q *QueryOptions) (*AllocStopResponse, error) { - // COMPAT: Remove in 1.6.0 - var w *WriteOptions - if q != nil { - w = &WriteOptions{ - Region: q.Region, - Namespace: q.Namespace, - AuthToken: q.AuthToken, - Headers: q.Headers, - ctx: q.ctx, - } - } - - var resp AllocStopResponse - wm, err := a.client.put("/v1/allocation/"+alloc.ID+"/stop", nil, &resp, w) - if wm != nil { - resp.LastIndex = wm.LastIndex - resp.RequestTime = wm.RequestTime - } - - return &resp, err -} - -// AllocStopResponse is the response to an `AllocStopRequest` -type AllocStopResponse struct { - // EvalID is the id of the follow up evalution for the rescheduled alloc. - EvalID string - - WriteMeta -} - -// Signal sends a signal to the allocation. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *Allocations) Signal(alloc *Allocation, q *QueryOptions, task, signal string) error { - req := AllocSignalRequest{ - Signal: signal, - Task: task, - } - - var resp GenericResponse - _, err := a.client.putQuery("/v1/client/allocation/"+alloc.ID+"/signal", &req, &resp, q) - return err -} - -// SetPauseState sets the schedule behavior of one task in the allocation. -func (a *Allocations) SetPauseState(alloc *Allocation, q *QueryOptions, task, state string) error { - req := AllocPauseRequest{ - ScheduleState: state, - Task: task, - } - var resp GenericResponse - _, err := a.client.putQuery("/v1/client/allocation/"+alloc.ID+"/pause", &req, &resp, q) - return err -} - -// GetPauseState gets the schedule behavior of one task in the allocation. -// -// The ?task= query parameter must be set. -func (a *Allocations) GetPauseState(alloc *Allocation, q *QueryOptions, task string) (string, *QueryMeta, error) { - var resp AllocGetPauseResponse - qm, err := a.client.query("/v1/client/allocation/"+alloc.ID+"/pause?task="+task, &resp, q) - state := resp.ScheduleState - return state, qm, err -} - -// Services is used to return a list of service registrations associated to the -// specified allocID. -func (a *Allocations) Services(allocID string, q *QueryOptions) ([]*ServiceRegistration, *QueryMeta, error) { - var resp []*ServiceRegistration - qm, err := a.client.query("/v1/allocation/"+allocID+"/services", &resp, q) - return resp, qm, err -} - -// Allocation is used for serialization of allocations. -type Allocation struct { - ID string - Namespace string - EvalID string - Name string - NodeID string - NodeName string - JobID string - Job *Job - TaskGroup string - Resources *Resources - TaskResources map[string]*Resources - AllocatedResources *AllocatedResources - Services map[string]string - Metrics *AllocationMetric - DesiredStatus string - DesiredDescription string - DesiredTransition DesiredTransition - ClientStatus string - ClientDescription string - TaskStates map[string]*TaskState - DeploymentID string - DeploymentStatus *AllocDeploymentStatus - FollowupEvalID string - PreviousAllocation string - NextAllocation string - RescheduleTracker *RescheduleTracker - NetworkStatus *AllocNetworkStatus - PreemptedAllocations []string - PreemptedByAllocation string - CreateIndex uint64 - ModifyIndex uint64 - AllocModifyIndex uint64 - CreateTime int64 - ModifyTime int64 -} - -// AllocationMetric is used to deserialize allocation metrics. -type AllocationMetric struct { - NodesEvaluated int - NodesFiltered int - NodesInPool int - NodePool string - NodesAvailable map[string]int - ClassFiltered map[string]int - ConstraintFiltered map[string]int - NodesExhausted int - ClassExhausted map[string]int - DimensionExhausted map[string]int - QuotaExhausted []string - ResourcesExhausted map[string]*Resources - // Deprecated, replaced with ScoreMetaData - Scores map[string]float64 - AllocationTime time.Duration - CoalescedFailures int - ScoreMetaData []*NodeScoreMeta -} - -// NodeScoreMeta is used to serialize node scoring metadata -// displayed in the CLI during verbose mode -type NodeScoreMeta struct { - NodeID string - Scores map[string]float64 - NormScore float64 -} - -// Stub returns a list stub for the allocation -func (a *Allocation) Stub() *AllocationListStub { - stub := &AllocationListStub{ - ID: a.ID, - EvalID: a.EvalID, - Name: a.Name, - Namespace: a.Namespace, - NodeID: a.NodeID, - NodeName: a.NodeName, - JobID: a.JobID, - TaskGroup: a.TaskGroup, - DesiredStatus: a.DesiredStatus, - DesiredDescription: a.DesiredDescription, - ClientStatus: a.ClientStatus, - ClientDescription: a.ClientDescription, - TaskStates: a.TaskStates, - DeploymentStatus: a.DeploymentStatus, - FollowupEvalID: a.FollowupEvalID, - NextAllocation: a.NextAllocation, - RescheduleTracker: a.RescheduleTracker, - PreemptedAllocations: a.PreemptedAllocations, - PreemptedByAllocation: a.PreemptedByAllocation, - CreateIndex: a.CreateIndex, - ModifyIndex: a.ModifyIndex, - CreateTime: a.CreateTime, - ModifyTime: a.ModifyTime, - } - - if a.Job != nil { - stub.JobType = *a.Job.Type - stub.JobVersion = *a.Job.Version - } - - return stub -} - -// ServerTerminalStatus returns true if the desired state of the allocation is -// terminal. -func (a *Allocation) ServerTerminalStatus() bool { - switch a.DesiredStatus { - case AllocDesiredStatusStop, AllocDesiredStatusEvict: - return true - default: - return false - } -} - -// ClientTerminalStatus returns true if the client status is terminal and will -// therefore no longer transition. -func (a *Allocation) ClientTerminalStatus() bool { - switch a.ClientStatus { - case AllocClientStatusComplete, AllocClientStatusFailed, AllocClientStatusLost: - return true - default: - return false - } -} - -// AllocationListStub is used to return a subset of an allocation -// during list operations. -type AllocationListStub struct { - ID string - EvalID string - Name string - Namespace string - NodeID string - NodeName string - JobID string - JobType string - JobVersion uint64 - TaskGroup string - AllocatedResources *AllocatedResources `json:",omitempty"` - DesiredStatus string - DesiredDescription string - ClientStatus string - ClientDescription string - TaskStates map[string]*TaskState - DeploymentStatus *AllocDeploymentStatus - FollowupEvalID string - NextAllocation string - RescheduleTracker *RescheduleTracker - PreemptedAllocations []string - PreemptedByAllocation string - CreateIndex uint64 - ModifyIndex uint64 - CreateTime int64 - ModifyTime int64 -} - -// AllocDeploymentStatus captures the status of the allocation as part of the -// deployment. This can include things like if the allocation has been marked as -// healthy. -type AllocDeploymentStatus struct { - Healthy *bool - Timestamp time.Time - Canary bool - ModifyIndex uint64 -} - -// AllocNetworkStatus captures the status of an allocation's network during runtime. -// Depending on the network mode, an allocation's address may need to be known to other -// systems in Nomad such as service registration. -type AllocNetworkStatus struct { - InterfaceName string - Address string - AddressIPv6 string - DNS *DNSConfig -} - -type AllocatedResources struct { - Tasks map[string]*AllocatedTaskResources - Shared AllocatedSharedResources -} - -type AllocatedTaskResources struct { - Cpu AllocatedCpuResources - Memory AllocatedMemoryResources - Networks []*NetworkResource - Devices []*AllocatedDeviceResource -} - -type AllocatedSharedResources struct { - DiskMB int64 - Networks []*NetworkResource - Ports []PortMapping -} - -type PortMapping struct { - Label string - Value int - To int - HostIP string -} - -type AllocatedCpuResources struct { - CpuShares int64 -} - -type AllocatedMemoryResources struct { - MemoryMB int64 - MemoryMaxMB int64 -} - -type AllocatedDeviceResource struct { - Vendor string - Type string - Name string - DeviceIDs []string -} - -// AllocIndexSort reverse sorts allocs by CreateIndex. -type AllocIndexSort []*AllocationListStub - -func (a AllocIndexSort) Len() int { - return len(a) -} - -func (a AllocIndexSort) Less(i, j int) bool { - return a[i].CreateIndex > a[j].CreateIndex -} - -func (a AllocIndexSort) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} - -func (a Allocation) GetTaskGroup() *TaskGroup { - for _, tg := range a.Job.TaskGroups { - if *tg.Name == a.TaskGroup { - return tg - } - } - return nil -} - -// RescheduleInfo is used to calculate remaining reschedule attempts -// according to the given time and the task groups reschedule policy -func (a Allocation) RescheduleInfo(t time.Time) (int, int) { - tg := a.GetTaskGroup() - if tg == nil || tg.ReschedulePolicy == nil { - return 0, 0 - } - reschedulePolicy := tg.ReschedulePolicy - availableAttempts := *reschedulePolicy.Attempts - interval := *reschedulePolicy.Interval - attempted := 0 - - // Loop over reschedule tracker to find attempts within the restart policy's interval - if a.RescheduleTracker != nil && availableAttempts > 0 && interval > 0 { - for j := len(a.RescheduleTracker.Events) - 1; j >= 0; j-- { - lastAttempt := a.RescheduleTracker.Events[j].RescheduleTime - timeDiff := t.UTC().UnixNano() - lastAttempt - if timeDiff < interval.Nanoseconds() { - attempted += 1 - } - } - } - return attempted, availableAttempts -} - -type AllocationRestartRequest struct { - TaskName string - AllTasks bool -} - -type AllocSignalRequest struct { - Task string - Signal string -} - -type AllocPauseRequest struct { - Task string - - // ScheduleState must be one of "pause", "run", "scheduled". - ScheduleState string -} - -type AllocGetPauseResponse struct { - // ScheduleState will be one of "" (run), "force_run", "scheduled_pause", - // "force_pause", or "schedule_resume". - // - // See nomad/structs/task_sched.go for details. - ScheduleState string -} - -// GenericResponse is used to respond to a request where no -// specific response information is needed. -type GenericResponse struct { - WriteMeta -} - -// RescheduleTracker encapsulates previous reschedule events -type RescheduleTracker struct { - Events []*RescheduleEvent - LastReschedule string -} - -// RescheduleEvent is used to keep track of previous attempts at rescheduling an allocation -type RescheduleEvent struct { - // RescheduleTime is the timestamp of a reschedule attempt - RescheduleTime int64 - - // PrevAllocID is the ID of the previous allocation being restarted - PrevAllocID string - - // PrevNodeID is the node ID of the previous allocation - PrevNodeID string -} - -// DesiredTransition is used to mark an allocation as having a desired state -// transition. This information can be used by the scheduler to make the -// correct decision. -type DesiredTransition struct { - // Migrate is used to indicate that this allocation should be stopped and - // migrated to another node. - Migrate *bool - - // Reschedule is used to indicate that this allocation is eligible to be - // rescheduled. - Reschedule *bool -} - -// ShouldMigrate returns whether the transition object dictates a migration. -func (d DesiredTransition) ShouldMigrate() bool { - return d.Migrate != nil && *d.Migrate -} - -// ExecStreamingIOOperation represents a stream write operation: either appending data or close (exclusively) -type ExecStreamingIOOperation struct { - Data []byte `json:"data,omitempty"` - Close bool `json:"close,omitempty"` -} - -// TerminalSize represents the size of the terminal -type TerminalSize struct { - Height int `json:"height,omitempty"` - Width int `json:"width,omitempty"` -} - -var execStreamingInputHeartbeat = ExecStreamingInput{} - -// ExecStreamingInput represents user input to be sent to nomad exec handler. -// -// At most one field should be set. -type ExecStreamingInput struct { - Stdin *ExecStreamingIOOperation `json:"stdin,omitempty"` - TTYSize *TerminalSize `json:"tty_size,omitempty"` -} - -// ExecStreamingExitResult captures the exit code of just completed nomad exec command -type ExecStreamingExitResult struct { - ExitCode int `json:"exit_code"` -} - -// ExecStreamingOutput represents an output streaming entity, e.g. stdout/stderr update or termination -// -// At most one of these fields should be set: `Stdout`, `Stderr`, or `Result`. -// If `Exited` is true, then `Result` is non-nil, and other fields are nil. -type ExecStreamingOutput struct { - Stdout *ExecStreamingIOOperation `json:"stdout,omitempty"` - Stderr *ExecStreamingIOOperation `json:"stderr,omitempty"` - - Exited bool `json:"exited,omitempty"` - Result *ExecStreamingExitResult `json:"result,omitempty"` -} - -func AllocSuffix(name string) string { - idx := strings.LastIndex(name, "[") - if idx == -1 { - return "" - } - suffix := name[idx:] - return suffix -} diff --git a/vendor/github.com/hashicorp/nomad/api/allocations_exec.go b/vendor/github.com/hashicorp/nomad/api/allocations_exec.go deleted file mode 100644 index 44c8e17884..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/allocations_exec.go +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/url" - "strconv" - "sync" - "time" - - "github.com/gorilla/websocket" -) - -const ( - // heartbeatInterval is the amount of time to wait between sending heartbeats - // during an exec streaming operation - heartbeatInterval = 10 * time.Second -) - -type execSession struct { - client *Client - alloc *Allocation - job string - task string - tty bool - command []string - action string - - stdin io.Reader - stdout io.Writer - stderr io.Writer - - terminalSizeCh <-chan TerminalSize - - q *QueryOptions -} - -func (s *execSession) run(ctx context.Context) (exitCode int, err error) { - ctx, cancelFn := context.WithCancel(ctx) - defer cancelFn() - - conn, err := s.startConnection() - if err != nil { - return -2, err - } - defer conn.Close() - - sendErrCh := s.startTransmit(ctx, conn) - exitCh, recvErrCh := s.startReceiving(ctx, conn) - - for { - select { - case <-ctx.Done(): - return -2, ctx.Err() - case exitCode := <-exitCh: - return exitCode, nil - case recvErr := <-recvErrCh: - // drop websocket code, not relevant to user - if wsErr, ok := recvErr.(*websocket.CloseError); ok && wsErr.Text != "" { - return -2, errors.New(wsErr.Text) - } - - return -2, recvErr - case sendErr := <-sendErrCh: - return -2, fmt.Errorf("failed to send input: %w", sendErr) - } - } -} - -func (s *execSession) startConnection() (*websocket.Conn, error) { - // First, attempt to connect to the node directly, but may fail due to network isolation - // and network errors. Fallback to using server-side forwarding instead. - nodeClient, err := s.client.GetNodeClientWithTimeout(s.alloc.NodeID, ClientConnTimeout, s.q) - if err == NodeDownErr { - return nil, NodeDownErr - } - - q := s.q - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - - commandBytes, err := json.Marshal(s.command) - if err != nil { - return nil, fmt.Errorf("failed to marshal command: %W", err) - } - - q.Params["tty"] = strconv.FormatBool(s.tty) - q.Params["task"] = s.task - q.Params["command"] = string(commandBytes) - reqPath := fmt.Sprintf("/v1/client/allocation/%s/exec", s.alloc.ID) - - if s.action != "" { - q.Params["action"] = s.action - q.Params["allocID"] = s.alloc.ID - q.Params["group"] = s.alloc.TaskGroup - reqPath = fmt.Sprintf("/v1/job/%s/action", url.PathEscape(s.job)) - } - - var conn *websocket.Conn - - if nodeClient != nil { - conn, _, _ = nodeClient.websocket(reqPath, q) //nolint:bodyclose // gorilla/websocket Dialer.DialContext() does not require the body to be closed. - } - - if conn == nil { - conn, _, err = s.client.websocket(reqPath, q) //nolint:bodyclose // gorilla/websocket Dialer.DialContext() does not require the body to be closed. - if err != nil { - return nil, err - } - } - - return conn, nil -} - -func (s *execSession) startTransmit(ctx context.Context, conn *websocket.Conn) <-chan error { - - // FIXME: Handle websocket send errors. - // Currently, websocket write failures are dropped. As sending and - // receiving are running concurrently, it's expected that some send - // requests may fail with connection errors when connection closes. - // Connection errors should surface in the receive paths already, - // but I'm unsure about one-sided communication errors. - var sendLock sync.Mutex - send := func(v *ExecStreamingInput) { - sendLock.Lock() - defer sendLock.Unlock() - - conn.WriteJSON(v) - } - - errCh := make(chan error, 4) - - // propagate stdin - go func() { - - bytes := make([]byte, 2048) - for { - if ctx.Err() != nil { - return - } - - input := ExecStreamingInput{Stdin: &ExecStreamingIOOperation{}} - - n, err := s.stdin.Read(bytes) - - // always send data if we read some - if n != 0 { - input.Stdin.Data = bytes[:n] - send(&input) - } - - // then handle error - if err == io.EOF { - // if n != 0, send data and we'll get n = 0 on next read - if n == 0 { - input.Stdin.Close = true - send(&input) - return - } - } else if err != nil { - errCh <- err - return - } - } - }() - - // propagate terminal sizing updates - go func() { - for { - resizeInput := ExecStreamingInput{} - - select { - case <-ctx.Done(): - return - case size, ok := <-s.terminalSizeCh: - if !ok { - return - } - resizeInput.TTYSize = &size - send(&resizeInput) - } - - } - }() - - // send a heartbeat every 10 seconds - go func() { - t := time.NewTimer(heartbeatInterval) - defer t.Stop() - - for { - t.Reset(heartbeatInterval) - - select { - case <-ctx.Done(): - return - case <-t.C: - // heartbeat message - send(&execStreamingInputHeartbeat) - } - } - }() - - return errCh -} - -func (s *execSession) startReceiving(ctx context.Context, conn *websocket.Conn) (<-chan int, <-chan error) { - exitCodeCh := make(chan int, 1) - errCh := make(chan error, 1) - - go func() { - for ctx.Err() == nil { - - // Decode the next frame - var frame ExecStreamingOutput - err := conn.ReadJSON(&frame) - if websocket.IsCloseError(err, websocket.CloseNormalClosure) { - errCh <- fmt.Errorf("websocket closed before receiving exit code: %w", err) - return - } else if err != nil { - errCh <- err - return - } - - switch { - case frame.Stdout != nil: - if len(frame.Stdout.Data) != 0 { - s.stdout.Write(frame.Stdout.Data) - } - // don't really do anything if stdout is closing - case frame.Stderr != nil: - if len(frame.Stderr.Data) != 0 { - s.stderr.Write(frame.Stderr.Data) - } - // don't really do anything if stderr is closing - case frame.Exited && frame.Result != nil: - exitCodeCh <- frame.Result.ExitCode - return - default: - // noop - heartbeat - } - - } - - }() - - return exitCodeCh, errCh -} diff --git a/vendor/github.com/hashicorp/nomad/api/api.go b/vendor/github.com/hashicorp/nomad/api/api.go deleted file mode 100644 index 07cc4d9f23..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/api.go +++ /dev/null @@ -1,1297 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "compress/gzip" - "context" - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "net" - "net/http" - "net/url" - "os" - "strconv" - "strings" - "time" - - "github.com/gorilla/websocket" - "github.com/hashicorp/go-cleanhttp" - "github.com/hashicorp/go-rootcerts" -) - -var ( - // ClientConnTimeout is the timeout applied when attempting to contact a - // client directly before switching to a connection through the Nomad - // server. For cluster topologies where API consumers don't have network - // access to Nomad clients, set this to a small value (ex 1ms) to avoid - // pausing on client APIs such as AllocFS. - ClientConnTimeout = 1 * time.Second -) - -const ( - // AllNamespacesNamespace is a sentinel Namespace value to indicate that api should search for - // jobs and allocations in all the namespaces the requester can access. - AllNamespacesNamespace = "*" - - // PermissionDeniedErrorContent is the string content of an error returned - // by the API which indicates the caller does not have permission to - // perform the action. - PermissionDeniedErrorContent = "Permission denied" -) - -// QueryOptions are used to parametrize a query -type QueryOptions struct { - // Providing a datacenter overwrites the region provided - // by the Config - Region string - - // Namespace is the target namespace for the query. - Namespace string - - // AllowStale allows any Nomad server (non-leader) to service - // a read. This allows for lower latency and higher throughput - AllowStale bool - - // WaitIndex is used to enable a blocking query. Waits - // until the timeout or the next index is reached - WaitIndex uint64 - - // WaitTime is used to bound the duration of a wait. - // Defaults to that of the Config, but can be overridden. - WaitTime time.Duration - - // If set, used as prefix for resource list searches - Prefix string - - // Set HTTP parameters on the query. - Params map[string]string - - // Set HTTP headers on the query. - Headers map[string]string - - // AuthToken is the secret ID of an ACL token - AuthToken string - - // Filter specifies the go-bexpr filter expression to be used for - // filtering the data prior to returning a response - Filter string - - // PerPage is the number of entries to be returned in queries that support - // paginated lists. - PerPage int32 - - // NextToken is the token used to indicate where to start paging - // for queries that support paginated lists. This token should be - // the ID of the next object after the last one seen in the - // previous response. - NextToken string - - // Reverse is used to reverse the default order of list results. - // - // Currently only supported by specific endpoints. - Reverse bool - - // ctx is an optional context pass through to the underlying HTTP - // request layer. Use Context() and WithContext() to manage this. - ctx context.Context -} - -// WriteOptions are used to parametrize a write -type WriteOptions struct { - // Providing a datacenter overwrites the region provided - // by the Config - Region string - - // Namespace is the target namespace for the write. - Namespace string - - // AuthToken is the secret ID of an ACL token - AuthToken string - - // Set HTTP headers on the query. - Headers map[string]string - - // ctx is an optional context pass through to the underlying HTTP - // request layer. Use Context() and WithContext() to manage this. - ctx context.Context - - // IdempotencyToken can be used to ensure the write is idempotent. - IdempotencyToken string -} - -// QueryMeta is used to return meta data about a query -type QueryMeta struct { - // LastIndex. This can be used as a WaitIndex to perform - // a blocking query - LastIndex uint64 - - // Time of last contact from the leader for the - // server servicing the request - LastContact time.Duration - - // Is there a known leader - KnownLeader bool - - // How long did the request take - RequestTime time.Duration - - // NextToken is the token used to indicate where to start paging - // for queries that support paginated lists. To resume paging from - // this point, pass this token in the next request's QueryOptions - NextToken string -} - -// WriteMeta is used to return meta data about a write -type WriteMeta struct { - // LastIndex. This can be used as a WaitIndex to perform - // a blocking query - LastIndex uint64 - - // How long did the request take - RequestTime time.Duration -} - -// HttpBasicAuth is used to authenticate http client with HTTP Basic Authentication -type HttpBasicAuth struct { - // Username to use for HTTP Basic Authentication - Username string - - // Password to use for HTTP Basic Authentication - Password string -} - -// Config is used to configure the creation of a client -type Config struct { - // Address is the address of the Nomad agent - Address string - - // Region to use. If not provided, the default agent region is used. - Region string - - // SecretID to use. This can be overwritten per request. - SecretID string - - // Namespace to use. If not provided the default namespace is used. - Namespace string - - // HttpClient is the client to use. Default will be used if not provided. - // - // If set, it expected to be configured for tls already, and TLSConfig is ignored. - // You may use ConfigureTLS() function to aid with initialization. - HttpClient *http.Client - - // HttpAuth is the auth info to use for http access. - HttpAuth *HttpBasicAuth - - // WaitTime limits how long a Watch will block. If not provided, - // the agent default values will be used. - WaitTime time.Duration - - // TLSConfig provides the various TLS related configurations for the http - // client. - // - // TLSConfig is ignored if HttpClient is set. - TLSConfig *TLSConfig - - Headers http.Header - - // retryOptions holds the configuration necessary to perform retries - // on put calls. - retryOptions *retryOptions - - // url is populated with the initial parsed address and is not modified in the - // case of a unix:// URL, as opposed to Address. - url *url.URL -} - -// URL returns a copy of the initial parsed address and is not modified in the -// case of a `unix://` URL, as opposed to Address. -func (c *Config) URL() *url.URL { - return c.url -} - -// ClientConfig copies the configuration with a new client address, region, and -// whether the client has TLS enabled. -func (c *Config) ClientConfig(region, address string, tlsEnabled bool) *Config { - scheme := "http" - if tlsEnabled { - scheme = "https" - } - - config := &Config{ - Address: fmt.Sprintf("%s://%s", scheme, address), - Region: region, - Namespace: c.Namespace, - HttpClient: c.HttpClient, - SecretID: c.SecretID, - HttpAuth: c.HttpAuth, - WaitTime: c.WaitTime, - TLSConfig: c.TLSConfig.Copy(), - } - - // Update the tls server name for connecting to a client - if tlsEnabled && config.TLSConfig != nil { - config.TLSConfig.TLSServerName = fmt.Sprintf("client.%s.nomad", region) - } - - return config -} - -// TLSConfig contains the parameters needed to configure TLS on the HTTP client -// used to communicate with Nomad. -type TLSConfig struct { - // CACert is the path to a PEM-encoded CA cert file to use to verify the - // Nomad server SSL certificate. - CACert string - - // CAPath is the path to a directory of PEM-encoded CA cert files to verify - // the Nomad server SSL certificate. - CAPath string - - // CACertPem is the PEM-encoded CA cert to use to verify the Nomad server - // SSL certificate. - CACertPEM []byte - - // ClientCert is the path to the certificate for Nomad communication - ClientCert string - - // ClientCertPEM is the PEM-encoded certificate for Nomad communication - ClientCertPEM []byte - - // ClientKey is the path to the private key for Nomad communication - ClientKey string - - // ClientKeyPEM is the PEM-encoded private key for Nomad communication - ClientKeyPEM []byte - - // TLSServerName, if set, is used to set the SNI host when connecting via - // TLS. - TLSServerName string - - // Insecure enables or disables SSL verification - Insecure bool -} - -func (t *TLSConfig) Copy() *TLSConfig { - if t == nil { - return nil - } - - nt := new(TLSConfig) - *nt = *t - return nt -} - -// defaultUDSClient creates a unix domain socket client. Errors return a nil -// http.Client, which is tested for in ConfigureTLS. This function expects that -// the Address has already been parsed into the config.url value. -func defaultUDSClient(config *Config) *http.Client { - - config.Address = "http://127.0.0.1" - - httpClient := &http.Client{ - Transport: &http.Transport{ - DialContext: func(_ context.Context, _, _ string) (net.Conn, error) { - return net.Dial("unix", config.url.EscapedPath()) - }, - }, - } - return defaultClient(httpClient) -} - -func defaultHttpClient() *http.Client { - httpClient := cleanhttp.DefaultPooledClient() - return defaultClient(httpClient) -} - -func defaultClient(c *http.Client) *http.Client { - transport := c.Transport.(*http.Transport) - transport.TLSHandshakeTimeout = 10 * time.Second - transport.TLSClientConfig = &tls.Config{ - MinVersion: tls.VersionTLS12, - } - - // Default to http/1: alloc exec/websocket aren't supported in http/2 - // well yet: https://github.com/gorilla/websocket/issues/417 - transport.ForceAttemptHTTP2 = false - - return c -} - -// DefaultConfig returns a default configuration for the client -func DefaultConfig() *Config { - config := &Config{ - Address: "http://127.0.0.1:4646", - TLSConfig: &TLSConfig{}, - } - if addr := os.Getenv("NOMAD_ADDR"); addr != "" { - config.Address = addr - } - if v := os.Getenv("NOMAD_REGION"); v != "" { - config.Region = v - } - if v := os.Getenv("NOMAD_NAMESPACE"); v != "" { - config.Namespace = v - } - if auth := os.Getenv("NOMAD_HTTP_AUTH"); auth != "" { - var username, password string - if strings.Contains(auth, ":") { - split := strings.SplitN(auth, ":", 2) - username = split[0] - password = split[1] - } else { - username = auth - } - - config.HttpAuth = &HttpBasicAuth{ - Username: username, - Password: password, - } - } - - // Read TLS specific env vars - if v := os.Getenv("NOMAD_CACERT"); v != "" { - config.TLSConfig.CACert = v - } - if v := os.Getenv("NOMAD_CAPATH"); v != "" { - config.TLSConfig.CAPath = v - } - if v := os.Getenv("NOMAD_CLIENT_CERT"); v != "" { - config.TLSConfig.ClientCert = v - } - if v := os.Getenv("NOMAD_CLIENT_KEY"); v != "" { - config.TLSConfig.ClientKey = v - } - if v := os.Getenv("NOMAD_TLS_SERVER_NAME"); v != "" { - config.TLSConfig.TLSServerName = v - } - if v := os.Getenv("NOMAD_SKIP_VERIFY"); v != "" { - if insecure, err := strconv.ParseBool(v); err == nil { - config.TLSConfig.Insecure = insecure - } - } - if v := os.Getenv("NOMAD_TOKEN"); v != "" { - config.SecretID = v - } - return config -} - -// cloneWithTimeout returns a cloned httpClient with set timeout if positive; -// otherwise, returns the same client -func cloneWithTimeout(httpClient *http.Client, t time.Duration) (*http.Client, error) { - if httpClient == nil { - return nil, errors.New("nil HTTP client") - } else if httpClient.Transport == nil { - return nil, errors.New("nil HTTP client transport") - } - - if t.Nanoseconds() < 0 { - return httpClient, nil - } - - tr, ok := httpClient.Transport.(*http.Transport) - if !ok { - return nil, fmt.Errorf("unexpected HTTP transport: %T", httpClient.Transport) - } - - // copy all public fields, to avoid copying transient state and locks - ntr := &http.Transport{ - Proxy: tr.Proxy, - DialContext: tr.DialContext, - Dial: tr.Dial, - DialTLS: tr.DialTLS, - TLSClientConfig: tr.TLSClientConfig, - TLSHandshakeTimeout: tr.TLSHandshakeTimeout, - DisableKeepAlives: tr.DisableKeepAlives, - DisableCompression: tr.DisableCompression, - MaxIdleConns: tr.MaxIdleConns, - MaxIdleConnsPerHost: tr.MaxIdleConnsPerHost, - MaxConnsPerHost: tr.MaxConnsPerHost, - IdleConnTimeout: tr.IdleConnTimeout, - ResponseHeaderTimeout: tr.ResponseHeaderTimeout, - ExpectContinueTimeout: tr.ExpectContinueTimeout, - TLSNextProto: tr.TLSNextProto, - ProxyConnectHeader: tr.ProxyConnectHeader, - MaxResponseHeaderBytes: tr.MaxResponseHeaderBytes, - } - - // apply timeout - ntr.DialContext = (&net.Dialer{ - Timeout: t, - KeepAlive: 30 * time.Second, - }).DialContext - - // clone http client with new transport - nc := *httpClient - nc.Transport = ntr - return &nc, nil -} - -// ConfigureTLS applies a set of TLS configurations to the HTTP client. -func ConfigureTLS(httpClient *http.Client, tlsConfig *TLSConfig) error { - if tlsConfig == nil { - return nil - } - if httpClient == nil { - return errors.New("config HTTP Client must be set") - } - - var clientCert tls.Certificate - foundClientCert := false - if tlsConfig.ClientCert != "" || tlsConfig.ClientKey != "" { - if tlsConfig.ClientCert != "" && tlsConfig.ClientKey != "" { - var err error - clientCert, err = tls.LoadX509KeyPair(tlsConfig.ClientCert, tlsConfig.ClientKey) - if err != nil { - return err - } - foundClientCert = true - } else { - return errors.New("Both client cert and client key must be provided") - } - } else if len(tlsConfig.ClientCertPEM) != 0 || len(tlsConfig.ClientKeyPEM) != 0 { - if len(tlsConfig.ClientCertPEM) != 0 && len(tlsConfig.ClientKeyPEM) != 0 { - var err error - clientCert, err = tls.X509KeyPair(tlsConfig.ClientCertPEM, tlsConfig.ClientKeyPEM) - if err != nil { - return err - } - foundClientCert = true - } else { - return errors.New("Both client cert and client key must be provided") - } - } - - clientTLSConfig := httpClient.Transport.(*http.Transport).TLSClientConfig - rootConfig := &rootcerts.Config{ - CAFile: tlsConfig.CACert, - CAPath: tlsConfig.CAPath, - CACertificate: tlsConfig.CACertPEM, - } - if err := rootcerts.ConfigureTLS(clientTLSConfig, rootConfig); err != nil { - return err - } - - clientTLSConfig.InsecureSkipVerify = tlsConfig.Insecure - - if foundClientCert { - clientTLSConfig.Certificates = []tls.Certificate{clientCert} - } - if tlsConfig.TLSServerName != "" { - clientTLSConfig.ServerName = tlsConfig.TLSServerName - } - - return nil -} - -// Client provides a client to the Nomad API -type Client struct { - httpClient *http.Client - config Config -} - -// NewClient returns a new client -func NewClient(config *Config) (*Client, error) { - var err error - // bootstrap the config - defConfig := DefaultConfig() - - if config.Address == "" { - config.Address = defConfig.Address - } - - // we have to test the address that comes from DefaultConfig, because it - // could be the value of NOMAD_ADDR which is applied without testing. But - // only on the first use of this Config, otherwise we'll have mutated the - // address - if config.url == nil { - if config.url, err = url.Parse(config.Address); err != nil { - return nil, fmt.Errorf("invalid address '%s': %v", config.Address, err) - } - } - - httpClient := config.HttpClient - if httpClient == nil { - switch { - case config.url.Scheme == "unix": - httpClient = defaultUDSClient(config) // mutates config - default: - httpClient = defaultHttpClient() - } - - if err := ConfigureTLS(httpClient, config.TLSConfig); err != nil { - return nil, err - } - } - - client := &Client{ - config: *config, - httpClient: httpClient, - } - return client, nil -} - -// Close closes the client's idle keep-alived connections. The default -// client configuration uses keep-alive to maintain connections and -// you should instantiate a single Client and reuse it for all -// requests from the same host. Connections will be closed -// automatically once the client is garbage collected. If you are -// creating multiple clients on the same host (for example, for -// testing), it may be useful to call Close() to avoid hitting -// connection limits. -func (c *Client) Close() { - c.httpClient.CloseIdleConnections() -} - -// Address return the address of the Nomad agent -func (c *Client) Address() string { - return c.config.Address -} - -// SetRegion sets the region to forward API requests to. -func (c *Client) SetRegion(region string) { - c.config.Region = region -} - -// SetNamespace sets the namespace to forward API requests to. -func (c *Client) SetNamespace(namespace string) { - c.config.Namespace = namespace -} - -// GetNodeClient returns a new Client that will dial the specified node. If the -// QueryOptions is set, its region will be used. -func (c *Client) GetNodeClient(nodeID string, q *QueryOptions) (*Client, error) { - return c.getNodeClientImpl(nodeID, -1, q, c.Nodes().Info) -} - -// GetNodeClientWithTimeout returns a new Client that will dial the specified -// node using the specified timeout. If the QueryOptions is set, its region will -// be used. -func (c *Client) GetNodeClientWithTimeout( - nodeID string, timeout time.Duration, q *QueryOptions) (*Client, error) { - return c.getNodeClientImpl(nodeID, timeout, q, c.Nodes().Info) -} - -// nodeLookup is the definition of a function used to lookup a node. This is -// largely used to mock the lookup in tests. -type nodeLookup func(nodeID string, q *QueryOptions) (*Node, *QueryMeta, error) - -// getNodeClientImpl is the implementation of creating a API client for -// contacting a node. It takes a function to lookup the node such that it can be -// mocked during tests. -func (c *Client) getNodeClientImpl(nodeID string, timeout time.Duration, q *QueryOptions, lookup nodeLookup) (*Client, error) { - node, _, err := lookup(nodeID, q) - if err != nil { - return nil, err - } - if node.Status == "down" { - return nil, NodeDownErr - } - if node.HTTPAddr == "" { - return nil, fmt.Errorf("http addr of node %q (%s) is not advertised", node.Name, nodeID) - } - - var region string - switch { - case q != nil && q.Region != "": - // Prefer the region set in the query parameter - region = q.Region - case c.config.Region != "": - // If the client is configured for a particular region use that - region = c.config.Region - default: - // No region information is given so use GlobalRegion as the default. - region = GlobalRegion - } - - // Get an API client for the node - conf := c.config.ClientConfig(region, node.HTTPAddr, node.TLSEnabled) - - // set timeout - preserve old behavior where errors are ignored and use untimed one - httpClient, err := cloneWithTimeout(c.httpClient, timeout) - // on error, fallback to using current http client - if err != nil { - httpClient = c.httpClient - } - conf.HttpClient = httpClient - - return NewClient(conf) -} - -// SetSecretID sets the ACL token secret for API requests. -func (c *Client) SetSecretID(secretID string) { - c.config.SecretID = secretID -} - -func (c *Client) configureRetries(ro *retryOptions) { - - c.config.retryOptions = &retryOptions{ - maxRetries: defaultNumberOfRetries, - maxBackoffDelay: defaultMaxBackoffDelay, - delayBase: defaultDelayTimeBase, - } - - if ro.delayBase != 0 { - c.config.retryOptions.delayBase = ro.delayBase - } - - if ro.maxRetries != defaultNumberOfRetries { - c.config.retryOptions.maxRetries = ro.maxRetries - } - - if ro.maxBackoffDelay != 0 { - c.config.retryOptions.maxBackoffDelay = ro.maxBackoffDelay - } - - if ro.maxToLastCall != 0 { - c.config.retryOptions.maxToLastCall = ro.maxToLastCall - } - - if ro.fixedDelay != 0 { - c.config.retryOptions.fixedDelay = ro.fixedDelay - } - - // Ensure that a big attempt number or a big delayBase number will not cause - // a negative delay by overflowing the delay increase. - c.config.retryOptions.maxValidAttempt = int64(math.Log2(float64(math.MaxInt64 / - c.config.retryOptions.delayBase.Nanoseconds()))) -} - -// request is used to help build up a request -type request struct { - config *Config - method string - url *url.URL - params url.Values - token string - body io.Reader - obj interface{} - ctx context.Context - header http.Header -} - -// setQueryOptions is used to annotate the request with -// additional query options -func (r *request) setQueryOptions(q *QueryOptions) { - if q == nil { - return - } - if q.Region != "" { - r.params.Set("region", q.Region) - } - if q.Namespace != "" { - r.params.Set("namespace", q.Namespace) - } - if q.AuthToken != "" { - r.token = q.AuthToken - } - if q.AllowStale { - r.params.Set("stale", "") - } - if q.WaitIndex != 0 { - r.params.Set("index", strconv.FormatUint(q.WaitIndex, 10)) - } - if q.WaitTime != 0 { - r.params.Set("wait", durToMsec(q.WaitTime)) - } - if q.Prefix != "" { - r.params.Set("prefix", q.Prefix) - } - if q.Filter != "" { - r.params.Set("filter", q.Filter) - } - if q.PerPage != 0 { - r.params.Set("per_page", fmt.Sprint(q.PerPage)) - } - if q.NextToken != "" { - r.params.Set("next_token", q.NextToken) - } - if q.Reverse { - r.params.Set("reverse", "true") - } - for k, v := range q.Params { - r.params.Set(k, v) - } - r.ctx = q.Context() - - for k, v := range q.Headers { - r.header.Set(k, v) - } -} - -// durToMsec converts a duration to a millisecond specified string -func durToMsec(dur time.Duration) string { - return fmt.Sprintf("%dms", dur/time.Millisecond) -} - -// setWriteOptions is used to annotate the request with -// additional write options -func (r *request) setWriteOptions(q *WriteOptions) { - if q == nil { - return - } - if q.Region != "" { - r.params.Set("region", q.Region) - } - if q.Namespace != "" { - r.params.Set("namespace", q.Namespace) - } - if q.AuthToken != "" { - r.token = q.AuthToken - } - if q.IdempotencyToken != "" { - r.params.Set("idempotency_token", q.IdempotencyToken) - } - r.ctx = q.Context() - - for k, v := range q.Headers { - r.header.Set(k, v) - } -} - -// toHTTP converts the request to an HTTP request -func (r *request) toHTTP() (*http.Request, error) { - // Encode the query parameters - r.url.RawQuery = r.params.Encode() - - // Check if we should encode the body - if r.body == nil && r.obj != nil { - if b, err := encodeBody(r.obj); err != nil { - return nil, err - } else { - r.body = b - } - } - - ctx := func() context.Context { - if r.ctx != nil { - return r.ctx - } - return context.Background() - }() - - // Create the HTTP request - req, err := http.NewRequestWithContext(ctx, r.method, r.url.RequestURI(), r.body) - if err != nil { - return nil, err - } - - req.Header = r.header - - // Optionally configure HTTP basic authentication - if r.url.User != nil { - username := r.url.User.Username() - password, _ := r.url.User.Password() - req.SetBasicAuth(username, password) - } else if r.config.HttpAuth != nil { - req.SetBasicAuth(r.config.HttpAuth.Username, r.config.HttpAuth.Password) - } - - req.Header.Add("Accept-Encoding", "gzip") - if r.token != "" { - req.Header.Set("X-Nomad-Token", r.token) - } - - req.URL.Host = r.url.Host - req.URL.Scheme = r.url.Scheme - req.Host = r.url.Host - return req, nil -} - -// newRequest is used to create a new request -func (c *Client) newRequest(method, path string) (*request, error) { - - u, err := url.Parse(path) - if err != nil { - return nil, err - } - - r := &request{ - config: &c.config, - method: method, - url: &url.URL{ - Scheme: c.config.url.Scheme, - User: c.config.url.User, - Host: c.config.url.Host, - Path: u.Path, - RawPath: u.RawPath, - }, - header: make(http.Header), - params: make(map[string][]string), - } - - // fixup socket paths - if r.url.Scheme == "unix" { - r.url.Scheme = "http" - r.url.Host = "127.0.0.1" - } - - if c.config.Region != "" { - r.params.Set("region", c.config.Region) - } - if c.config.Namespace != "" { - r.params.Set("namespace", c.config.Namespace) - } - if c.config.WaitTime != 0 { - r.params.Set("wait", durToMsec(r.config.WaitTime)) - } - if c.config.SecretID != "" { - r.token = r.config.SecretID - } - - // Add in the query parameters, if any - for key, values := range u.Query() { - for _, value := range values { - r.params.Add(key, value) - } - } - - for key, values := range c.config.Headers { - r.header[key] = values - } - - return r, nil -} - -// multiCloser is to wrap a ReadCloser such that when close is called, multiple -// Closes occur. -type multiCloser struct { - reader io.Reader - inorderClose []io.Closer -} - -func (m *multiCloser) Close() error { - for _, c := range m.inorderClose { - if err := c.Close(); err != nil { - return err - } - } - return nil -} - -func (m *multiCloser) Read(p []byte) (int, error) { - return m.reader.Read(p) -} - -// doRequest runs a request with our client -func (c *Client) doRequest(r *request) (time.Duration, *http.Response, error) { - req, err := r.toHTTP() - if err != nil { - return 0, nil, err - } - - start := time.Now() - resp, err := c.httpClient.Do(req) - diff := time.Since(start) - - // If the response is compressed, we swap the body's reader. - if zipErr := c.autoUnzip(resp); zipErr != nil { - return 0, nil, zipErr - } - - return diff, resp, err -} - -// autoUnzip modifies resp in-place, wrapping the response body with a gzip -// reader if the Content-Encoding of the response is "gzip". -func (*Client) autoUnzip(resp *http.Response) error { - if resp == nil || resp.Header == nil { - return nil - } - - if resp.Header.Get("Content-Encoding") == "gzip" { - zReader, err := gzip.NewReader(resp.Body) - if err == io.EOF { - // zero length response, do not wrap - return nil - } else if err != nil { - // some other error (e.g. corrupt) - return err - } - - // The gzip reader does not close an underlying reader, so use a - // multiCloser to make sure response body does get closed. - resp.Body = &multiCloser{ - reader: zReader, - inorderClose: []io.Closer{zReader, resp.Body}, - } - } - - return nil -} - -// rawQuery makes a GET request to the specified endpoint but returns just the -// response body. -func (c *Client) rawQuery(endpoint string, q *QueryOptions) (io.ReadCloser, error) { - r, err := c.newRequest("GET", endpoint) - if err != nil { - return nil, err - } - r.setQueryOptions(q) - _, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - - return resp.Body, nil -} - -// websocket makes a websocket request to the specific endpoint -func (c *Client) websocket(endpoint string, q *QueryOptions) (*websocket.Conn, *http.Response, error) { - - transport, ok := c.httpClient.Transport.(*http.Transport) - if !ok { - return nil, nil, errors.New("unsupported transport") - } - dialer := websocket.Dialer{ - ReadBufferSize: 4096, - WriteBufferSize: 4096, - HandshakeTimeout: c.httpClient.Timeout, - - // values to inherit from http client configuration - NetDial: transport.Dial, - NetDialContext: transport.DialContext, - Proxy: transport.Proxy, - TLSClientConfig: transport.TLSClientConfig, - } - - // build request object for header and parameters - r, err := c.newRequest("GET", endpoint) - if err != nil { - return nil, nil, err - } - r.setQueryOptions(q) - - rhttp, err := r.toHTTP() - if err != nil { - return nil, nil, err - } - - // convert scheme - wsScheme := "" - switch rhttp.URL.Scheme { - case "http": - wsScheme = "ws" - case "https": - wsScheme = "wss" - default: - return nil, nil, fmt.Errorf("unsupported scheme: %v", rhttp.URL.Scheme) - } - rhttp.URL.Scheme = wsScheme - - conn, resp, err := dialer.Dial(rhttp.URL.String(), rhttp.Header) - - // check resp status code, as it's more informative than handshake error we get from ws library - if resp != nil { - switch resp.StatusCode { - case http.StatusSwitchingProtocols: - // Connection upgrade was successful. - - case http.StatusPermanentRedirect, http.StatusTemporaryRedirect, http.StatusMovedPermanently: - loc := resp.Header.Get("Location") - u, err := url.Parse(loc) - if err != nil { - return nil, nil, fmt.Errorf("invalid redirect location %q: %w", loc, err) - } - return c.websocket(u.Path, q) - - default: - var buf bytes.Buffer - - if resp.Header.Get("Content-Encoding") == "gzip" { - greader, err := gzip.NewReader(resp.Body) - if err != nil { - return nil, nil, newUnexpectedResponseError( - fromStatusCode(resp.StatusCode), - withExpectedStatuses([]int{http.StatusSwitchingProtocols}), - withError(err)) - } - _, _ = io.Copy(&buf, greader) - } else { - _, _ = io.Copy(&buf, resp.Body) - } - _ = resp.Body.Close() - - return nil, nil, newUnexpectedResponseError( - fromStatusCode(resp.StatusCode), - withExpectedStatuses([]int{http.StatusSwitchingProtocols}), - withBody(buf.String()), - ) - } - } - - return conn, resp, err -} - -// query is used to do a GET request against an endpoint -// and deserialize the response into an interface using -// standard Nomad conventions. -func (c *Client) query(endpoint string, out any, q *QueryOptions) (*QueryMeta, error) { - r, err := c.newRequest("GET", endpoint) - if err != nil { - return nil, err - } - r.setQueryOptions(q) - rtt, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - defer resp.Body.Close() - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, out); err != nil { - return nil, err - } - return qm, nil -} - -// putQuery is used to do a PUT request when doing a "write" to a Client RPC. -// Client RPCs must use QueryOptions to allow setting AllowStale=true. -func (c *Client) putQuery(endpoint string, in, out any, q *QueryOptions) (*QueryMeta, error) { - r, err := c.newRequest("PUT", endpoint) - if err != nil { - return nil, err - } - r.setQueryOptions(q) - r.obj = in - rtt, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - defer resp.Body.Close() - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, out); err != nil { - return nil, err - } - return qm, nil -} - -// put is used to do a PUT request against an endpoint and -// serialize/deserialized using the standard Nomad conventions. -func (c *Client) put(endpoint string, in, out any, q *WriteOptions) (*WriteMeta, error) { - return c.write(http.MethodPut, endpoint, in, out, q) -} - -// postQuery is used to do a POST request when doing a "write" to a Client RPC. -// Client RPCs must use QueryOptions to allow setting AllowStale=true. -func (c *Client) postQuery(endpoint string, in, out any, q *QueryOptions) (*QueryMeta, error) { - r, err := c.newRequest("POST", endpoint) - if err != nil { - return nil, err - } - r.setQueryOptions(q) - r.obj = in - rtt, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - defer resp.Body.Close() - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if err := decodeBody(resp, out); err != nil { - return nil, err - } - return qm, nil -} - -// post is used to do a POST request against an endpoint and -// serialize/deserialized using the standard Nomad conventions. -func (c *Client) post(endpoint string, in, out any, q *WriteOptions) (*WriteMeta, error) { - return c.write(http.MethodPost, endpoint, in, out, q) -} - -// write is used to do a write request against an endpoint and -// serialize/deserialized using the standard Nomad conventions. -// -// You probably want the delete, post, or put methods. -func (c *Client) write(verb, endpoint string, in, out any, q *WriteOptions) (*WriteMeta, error) { - r, err := c.newRequest(verb, endpoint) - if err != nil { - return nil, err - } - r.setWriteOptions(q) - r.obj = in - rtt, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - defer resp.Body.Close() - - wm := &WriteMeta{RequestTime: rtt} - parseWriteMeta(resp, wm) - - if out != nil { - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - } - return wm, nil -} - -// delete is used to do a DELETE request against an endpoint and -// serialize/deserialized using the standard Nomad conventions. -func (c *Client) delete(endpoint string, in, out any, q *WriteOptions) (*WriteMeta, error) { - r, err := c.newRequest("DELETE", endpoint) - if err != nil { - return nil, err - } - r.setWriteOptions(q) - r.obj = in - rtt, resp, err := requireOK(c.doRequest(r)) //nolint:bodyclose // Closing the body is the caller's responsibility. - if err != nil { - return nil, err - } - defer resp.Body.Close() - - wm := &WriteMeta{RequestTime: rtt} - parseWriteMeta(resp, wm) - - if out != nil { - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - } - return wm, nil -} - -// parseQueryMeta is used to help parse query meta-data -func parseQueryMeta(resp *http.Response, q *QueryMeta) error { - header := resp.Header - - // Parse the X-Nomad-Index - index, err := strconv.ParseUint(header.Get("X-Nomad-Index"), 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse X-Nomad-Index: %v", err) - } - q.LastIndex = index - - // Parse the X-Nomad-LastContact - last, err := strconv.ParseUint(header.Get("X-Nomad-LastContact"), 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse X-Nomad-LastContact: %v", err) - } - if last > math.MaxInt64 { - return fmt.Errorf("Last contact duration is out of range: %d", last) - } - q.LastContact = time.Duration(last) * time.Millisecond - q.NextToken = header.Get("X-Nomad-NextToken") - - // Parse the X-Nomad-KnownLeader - switch header.Get("X-Nomad-KnownLeader") { - case "true": - q.KnownLeader = true - default: - q.KnownLeader = false - } - return nil -} - -// parseWriteMeta is used to help parse write meta-data -func parseWriteMeta(resp *http.Response, q *WriteMeta) error { - header := resp.Header - - // Parse the X-Nomad-Index - index, err := strconv.ParseUint(header.Get("X-Nomad-Index"), 10, 64) - if err != nil { - return fmt.Errorf("Failed to parse X-Nomad-Index: %v", err) - } - q.LastIndex = index - return nil -} - -// decodeBody is used to JSON decode a body -func decodeBody(resp *http.Response, out interface{}) error { - switch resp.ContentLength { - case 0: - if out == nil { - return nil - } - return errors.New("Got 0 byte response with non-nil decode object") - default: - dec := json.NewDecoder(resp.Body) - return dec.Decode(out) - } -} - -// encodeBody prepares the reader to serve as the request body. -// -// Returns the `obj` input if it is a raw io.Reader object; otherwise -// returns a reader of the json format of the passed argument. -func encodeBody(obj interface{}) (io.Reader, error) { - if reader, ok := obj.(io.Reader); ok { - return reader, nil - } - - buf := bytes.NewBuffer(nil) - enc := json.NewEncoder(buf) - if err := enc.Encode(obj); err != nil { - return nil, err - } - return buf, nil -} - -// Context returns the context used for canceling HTTP requests related to this query -func (o *QueryOptions) Context() context.Context { - if o != nil && o.ctx != nil { - return o.ctx - } - return context.Background() -} - -// WithContext creates a copy of the query options using the provided context to cancel related HTTP requests -func (o *QueryOptions) WithContext(ctx context.Context) *QueryOptions { - o2 := new(QueryOptions) - if o != nil { - *o2 = *o - } - o2.ctx = ctx - return o2 -} - -// Context returns the context used for canceling HTTP requests related to this write -func (o *WriteOptions) Context() context.Context { - if o != nil && o.ctx != nil { - return o.ctx - } - return context.Background() -} - -// WithContext creates a copy of the write options using the provided context to cancel related HTTP requests -func (o *WriteOptions) WithContext(ctx context.Context) *WriteOptions { - o2 := new(WriteOptions) - if o != nil { - *o2 = *o - } - o2.ctx = ctx - return o2 -} - -// copyURL makes a deep copy of a net/url.URL -func copyURL(u1 *url.URL) *url.URL { - if u1 == nil { - return nil - } - o := *u1 - if o.User != nil { - ou := *u1.User - o.User = &ou - } - return &o -} diff --git a/vendor/github.com/hashicorp/nomad/api/constraint.go b/vendor/github.com/hashicorp/nomad/api/constraint.go deleted file mode 100644 index 9628c7cbca..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/constraint.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -const ( - ConstraintDistinctProperty = "distinct_property" - ConstraintDistinctHosts = "distinct_hosts" - ConstraintRegex = "regexp" - ConstraintVersion = "version" - ConstraintSemver = "semver" - ConstraintSetContains = "set_contains" - ConstraintSetContainsAll = "set_contains_all" - ConstraintSetContainsAny = "set_contains_any" - ConstraintAttributeIsSet = "is_set" - ConstraintAttributeIsNotSet = "is_not_set" -) - -// Constraint is used to serialize a job placement constraint. -type Constraint struct { - LTarget string `hcl:"attribute,optional"` - RTarget string `hcl:"value,optional"` - Operand string `hcl:"operator,optional"` -} - -// NewConstraint generates a new job placement constraint. -func NewConstraint(left, operand, right string) *Constraint { - return &Constraint{ - LTarget: left, - RTarget: right, - Operand: operand, - } -} diff --git a/vendor/github.com/hashicorp/nomad/api/consul.go b/vendor/github.com/hashicorp/nomad/api/consul.go deleted file mode 100644 index b20738b4b8..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/consul.go +++ /dev/null @@ -1,835 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "maps" - "slices" - "time" -) - -// Consul represents configuration related to consul. -type Consul struct { - // (Enterprise-only) Namespace represents a Consul namespace. - Namespace string `mapstructure:"namespace" hcl:"namespace,optional"` - - // (Enterprise-only) Cluster represents a specific Consul cluster. - Cluster string `mapstructure:"cluster" hcl:"cluster,optional"` - - // Partition is the Consul admin partition where the workload should - // run. This is available in Nomad CE but only works with Consul ENT - Partition string `mapstructure:"partition" hcl:"partition,optional"` -} - -// Canonicalize Consul into a canonical form. The Canonicalize structs containing -// a Consul should ensure it is not nil. -func (c *Consul) Canonicalize() { - if c.Cluster == "" { - c.Cluster = "default" - } - - // If Namespace is nil, that is a choice of the job submitter that - // we should inherit from higher up (i.e. job<-group). Likewise, if - // Namespace is set but empty, that is a choice to use the default consul - // namespace. - - // Partition should never be defaulted to "default" because non-ENT Consul - // clusters don't have admin partitions -} - -// Copy creates a deep copy of c. -func (c *Consul) Copy() *Consul { - return &Consul{ - Namespace: c.Namespace, - Cluster: c.Cluster, - Partition: c.Partition, - } -} - -// MergeNamespace sets Namespace to namespace if not already configured. -// This is used to inherit the job-level consul_namespace if the group-level -// namespace is not explicitly configured. -func (c *Consul) MergeNamespace(namespace *string) { - // only inherit namespace from above if not already set - if c.Namespace == "" && namespace != nil { - c.Namespace = *namespace - } -} - -// ConsulConnect represents a Consul Connect jobspec block. -type ConsulConnect struct { - Native bool `hcl:"native,optional"` - Gateway *ConsulGateway `hcl:"gateway,block"` - SidecarService *ConsulSidecarService `mapstructure:"sidecar_service" hcl:"sidecar_service,block"` - SidecarTask *SidecarTask `mapstructure:"sidecar_task" hcl:"sidecar_task,block"` -} - -func (cc *ConsulConnect) Canonicalize() { - if cc == nil { - return - } - - cc.SidecarService.Canonicalize() - cc.SidecarTask.Canonicalize() - cc.Gateway.Canonicalize() -} - -// ConsulSidecarService represents a Consul Connect SidecarService jobspec -// block. -type ConsulSidecarService struct { - Tags []string `hcl:"tags,optional"` - Port string `hcl:"port,optional"` - Proxy *ConsulProxy `hcl:"proxy,block"` - DisableDefaultTCPCheck bool `mapstructure:"disable_default_tcp_check" hcl:"disable_default_tcp_check,optional"` - Meta map[string]string `hcl:"meta,block"` -} - -func (css *ConsulSidecarService) Canonicalize() { - if css == nil { - return - } - - if len(css.Tags) == 0 { - css.Tags = nil - } - - if len(css.Meta) == 0 { - css.Meta = nil - } - - css.Proxy.Canonicalize() -} - -// SidecarTask represents a subset of Task fields that can be set to override -// the fields of the Task generated for the sidecar -type SidecarTask struct { - Name string `hcl:"name,optional"` - Driver string `hcl:"driver,optional"` - User string `hcl:"user,optional"` - Config map[string]interface{} `hcl:"config,block"` - Env map[string]string `hcl:"env,block"` - Resources *Resources `hcl:"resources,block"` - Meta map[string]string `hcl:"meta,block"` - KillTimeout *time.Duration `mapstructure:"kill_timeout" hcl:"kill_timeout,optional"` - LogConfig *LogConfig `mapstructure:"logs" hcl:"logs,block"` - ShutdownDelay *time.Duration `mapstructure:"shutdown_delay" hcl:"shutdown_delay,optional"` - KillSignal string `mapstructure:"kill_signal" hcl:"kill_signal,optional"` - VolumeMounts []*VolumeMount `hcl:"volume_mount,block"` -} - -func (st *SidecarTask) Canonicalize() { - if st == nil { - return - } - - if len(st.Config) == 0 { - st.Config = nil - } - - if len(st.Env) == 0 { - st.Env = nil - } - - if st.Resources == nil { - st.Resources = DefaultResources() - } else { - st.Resources.Canonicalize() - } - - if st.LogConfig == nil { - st.LogConfig = DefaultLogConfig() - } else { - st.LogConfig.Canonicalize() - } - - if len(st.Meta) == 0 { - st.Meta = nil - } - - if st.KillTimeout == nil { - st.KillTimeout = pointerOf(5 * time.Second) - } - - if st.ShutdownDelay == nil { - st.ShutdownDelay = pointerOf(time.Duration(0)) - } - - for _, vm := range st.VolumeMounts { - vm.Canonicalize() - } -} - -// ConsulProxy represents a Consul Connect sidecar proxy jobspec block. -type ConsulProxy struct { - LocalServiceAddress string `mapstructure:"local_service_address" hcl:"local_service_address,optional"` - LocalServicePort int `mapstructure:"local_service_port" hcl:"local_service_port,optional"` - Expose *ConsulExposeConfig `mapstructure:"expose" hcl:"expose,block"` - ExposeConfig *ConsulExposeConfig // Deprecated: only to maintain backwards compatibility. Use Expose instead. - Upstreams []*ConsulUpstream `hcl:"upstreams,block"` - - // TransparentProxy configures the Envoy sidecar to use "transparent - // proxying", which creates IP tables rules inside the network namespace to - // ensure traffic flows thru the Envoy proxy - TransparentProxy *ConsulTransparentProxy `mapstructure:"transparent_proxy" hcl:"transparent_proxy,block"` - Config map[string]interface{} `hcl:"config,block"` -} - -func (cp *ConsulProxy) Canonicalize() { - if cp == nil { - return - } - - cp.Expose.Canonicalize() - - if len(cp.Upstreams) == 0 { - cp.Upstreams = nil - } - - cp.TransparentProxy.Canonicalize() - - for _, upstream := range cp.Upstreams { - upstream.Canonicalize() - } - - if len(cp.Config) == 0 { - cp.Config = nil - } -} - -// ConsulMeshGateway is used to configure mesh gateway usage when connecting to -// a connect upstream in another datacenter. -type ConsulMeshGateway struct { - // Mode configures how an upstream should be accessed with regard to using - // mesh gateways. - // - // local - the connect proxy makes outbound connections through mesh gateway - // originating in the same datacenter. - // - // remote - the connect proxy makes outbound connections to a mesh gateway - // in the destination datacenter. - // - // none (default) - no mesh gateway is used, the proxy makes outbound connections - // directly to destination services. - // - // https://www.consul.io/docs/connect/gateways/mesh-gateway#modes-of-operation - Mode string `mapstructure:"mode" hcl:"mode,optional"` -} - -func (c *ConsulMeshGateway) Canonicalize() { - // Mode may be empty string, indicating behavior will defer to Consul - // service-defaults config entry. -} - -func (c *ConsulMeshGateway) Copy() *ConsulMeshGateway { - if c == nil { - return nil - } - - return &ConsulMeshGateway{ - Mode: c.Mode, - } -} - -// ConsulUpstream represents a Consul Connect upstream jobspec block. -type ConsulUpstream struct { - DestinationName string `mapstructure:"destination_name" hcl:"destination_name,optional"` - DestinationNamespace string `mapstructure:"destination_namespace" hcl:"destination_namespace,optional"` - DestinationPeer string `mapstructure:"destination_peer" hcl:"destination_peer,optional"` - DestinationPartition string `mapstructure:"destination_partition" hcl:"destination_partition,optional"` - DestinationType string `mapstructure:"destination_type" hcl:"destination_type,optional"` - LocalBindPort int `mapstructure:"local_bind_port" hcl:"local_bind_port,optional"` - Datacenter string `mapstructure:"datacenter" hcl:"datacenter,optional"` - LocalBindAddress string `mapstructure:"local_bind_address" hcl:"local_bind_address,optional"` - LocalBindSocketPath string `mapstructure:"local_bind_socket_path" hcl:"local_bind_socket_path,optional"` - LocalBindSocketMode string `mapstructure:"local_bind_socket_mode" hcl:"local_bind_socket_mode,optional"` - MeshGateway *ConsulMeshGateway `mapstructure:"mesh_gateway" hcl:"mesh_gateway,block"` - Config map[string]any `mapstructure:"config" hcl:"config,block"` -} - -func (cu *ConsulUpstream) Copy() *ConsulUpstream { - if cu == nil { - return nil - } - up := new(ConsulUpstream) - *up = *cu - up.MeshGateway = cu.MeshGateway.Copy() - up.Config = maps.Clone(cu.Config) - return up -} - -func (cu *ConsulUpstream) Canonicalize() { - if cu == nil { - return - } - cu.MeshGateway.Canonicalize() - if len(cu.Config) == 0 { - cu.Config = nil - } -} - -// ConsulTransparentProxy is used to configure the Envoy sidecar for -// "transparent proxying", which creates IP tables rules inside the network -// namespace to ensure traffic flows thru the Envoy proxy -type ConsulTransparentProxy struct { - // UID of the Envoy proxy. Defaults to the default Envoy proxy container - // image user. - UID string `mapstructure:"uid" hcl:"uid,optional"` - - // OutboundPort is the Envoy proxy's outbound listener port. Inbound TCP - // traffic hitting the PROXY_IN_REDIRECT chain will be redirected here. - // Defaults to 15001. - OutboundPort uint16 `mapstructure:"outbound_port" hcl:"outbound_port,optional"` - - // ExcludeInboundPorts is an additional set of ports will be excluded from - // redirection to the Envoy proxy. Can be Port.Label or Port.Value. This set - // will be added to the ports automatically excluded for the Expose.Port and - // Check.Expose fields. - ExcludeInboundPorts []string `mapstructure:"exclude_inbound_ports" hcl:"exclude_inbound_ports,optional"` - - // ExcludeOutboundPorts is a set of outbound ports that will not be - // redirected to the Envoy proxy, specified as port numbers. - ExcludeOutboundPorts []uint16 `mapstructure:"exclude_outbound_ports" hcl:"exclude_outbound_ports,optional"` - - // ExcludeOutboundCIDRs is a set of outbound CIDR blocks that will not be - // redirected to the Envoy proxy. - ExcludeOutboundCIDRs []string `mapstructure:"exclude_outbound_cidrs" hcl:"exclude_outbound_cidrs,optional"` - - // ExcludeUIDs is a set of user IDs whose network traffic will not be - // redirected through the Envoy proxy. - ExcludeUIDs []string `mapstructure:"exclude_uids" hcl:"exclude_uids,optional"` - - // NoDNS disables redirection of DNS traffic to Consul DNS. By default NoDNS - // is false and transparent proxy will direct DNS traffic to Consul DNS if - // available on the client. - NoDNS bool `mapstructure:"no_dns" hcl:"no_dns,optional"` -} - -func (tp *ConsulTransparentProxy) Canonicalize() { - if tp == nil { - return - } - if len(tp.ExcludeInboundPorts) == 0 { - tp.ExcludeInboundPorts = nil - } - if len(tp.ExcludeOutboundCIDRs) == 0 { - tp.ExcludeOutboundCIDRs = nil - } - if len(tp.ExcludeOutboundPorts) == 0 { - tp.ExcludeOutboundPorts = nil - } - if len(tp.ExcludeUIDs) == 0 { - tp.ExcludeUIDs = nil - } -} - -type ConsulExposeConfig struct { - Paths []*ConsulExposePath `mapstructure:"path" hcl:"path,block"` - Path []*ConsulExposePath // Deprecated: only to maintain backwards compatibility. Use Paths instead. -} - -func (cec *ConsulExposeConfig) Canonicalize() { - if cec == nil { - return - } - - if len(cec.Paths) == 0 { - cec.Paths = nil - } - - if len(cec.Path) == 0 { - cec.Path = nil - } -} - -type ConsulExposePath struct { - Path string `hcl:"path,optional"` - Protocol string `hcl:"protocol,optional"` - LocalPathPort int `mapstructure:"local_path_port" hcl:"local_path_port,optional"` - ListenerPort string `mapstructure:"listener_port" hcl:"listener_port,optional"` -} - -// ConsulGateway is used to configure one of the Consul Connect Gateway types. -type ConsulGateway struct { - // Proxy is used to configure the Envoy instance acting as the gateway. - Proxy *ConsulGatewayProxy `hcl:"proxy,block"` - - // Ingress represents the Consul Configuration Entry for an Ingress Gateway. - Ingress *ConsulIngressConfigEntry `hcl:"ingress,block"` - - // Terminating represents the Consul Configuration Entry for a Terminating Gateway. - Terminating *ConsulTerminatingConfigEntry `hcl:"terminating,block"` - - // Mesh indicates the Consul service should be a Mesh Gateway. - Mesh *ConsulMeshConfigEntry `hcl:"mesh,block"` -} - -func (g *ConsulGateway) Canonicalize() { - if g == nil { - return - } - g.Proxy.Canonicalize() - g.Ingress.Canonicalize() - g.Terminating.Canonicalize() -} - -func (g *ConsulGateway) Copy() *ConsulGateway { - if g == nil { - return nil - } - - return &ConsulGateway{ - Proxy: g.Proxy.Copy(), - Ingress: g.Ingress.Copy(), - Terminating: g.Terminating.Copy(), - } -} - -type ConsulGatewayBindAddress struct { - Name string `hcl:",label"` - Address string `mapstructure:"address" hcl:"address,optional"` - Port int `mapstructure:"port" hcl:"port,optional"` -} - -var ( - // defaultGatewayConnectTimeout is the default amount of time connections to - // upstreams are allowed before timing out. - defaultGatewayConnectTimeout = 5 * time.Second -) - -// ConsulGatewayProxy is used to tune parameters of the proxy instance acting as -// one of the forms of Connect gateways that Consul supports. -// -// https://www.consul.io/docs/connect/proxies/envoy#gateway-options -type ConsulGatewayProxy struct { - ConnectTimeout *time.Duration `mapstructure:"connect_timeout" hcl:"connect_timeout,optional"` - EnvoyGatewayBindTaggedAddresses bool `mapstructure:"envoy_gateway_bind_tagged_addresses" hcl:"envoy_gateway_bind_tagged_addresses,optional"` - EnvoyGatewayBindAddresses map[string]*ConsulGatewayBindAddress `mapstructure:"envoy_gateway_bind_addresses" hcl:"envoy_gateway_bind_addresses,block"` - EnvoyGatewayNoDefaultBind bool `mapstructure:"envoy_gateway_no_default_bind" hcl:"envoy_gateway_no_default_bind,optional"` - EnvoyDNSDiscoveryType string `mapstructure:"envoy_dns_discovery_type" hcl:"envoy_dns_discovery_type,optional"` - Config map[string]interface{} `hcl:"config,block"` // escape hatch envoy config -} - -func (p *ConsulGatewayProxy) Canonicalize() { - if p == nil { - return - } - - if p.ConnectTimeout == nil { - // same as the default from consul - p.ConnectTimeout = pointerOf(defaultGatewayConnectTimeout) - } - - if len(p.EnvoyGatewayBindAddresses) == 0 { - p.EnvoyGatewayBindAddresses = nil - } - - if len(p.Config) == 0 { - p.Config = nil - } -} - -func (p *ConsulGatewayProxy) Copy() *ConsulGatewayProxy { - if p == nil { - return nil - } - - var binds map[string]*ConsulGatewayBindAddress = nil - if p.EnvoyGatewayBindAddresses != nil { - binds = make(map[string]*ConsulGatewayBindAddress, len(p.EnvoyGatewayBindAddresses)) - for k, v := range p.EnvoyGatewayBindAddresses { - binds[k] = v - } - } - - var config map[string]interface{} = nil - if p.Config != nil { - config = make(map[string]interface{}, len(p.Config)) - for k, v := range p.Config { - config[k] = v - } - } - - return &ConsulGatewayProxy{ - ConnectTimeout: pointerOf(*p.ConnectTimeout), - EnvoyGatewayBindTaggedAddresses: p.EnvoyGatewayBindTaggedAddresses, - EnvoyGatewayBindAddresses: binds, - EnvoyGatewayNoDefaultBind: p.EnvoyGatewayNoDefaultBind, - EnvoyDNSDiscoveryType: p.EnvoyDNSDiscoveryType, - Config: config, - } -} - -// ConsulGatewayTLSSDSConfig is used to configure the gateway's TLS listener to -// load certificates from an external Secret Discovery Service (SDS) -type ConsulGatewayTLSSDSConfig struct { - // ClusterName specifies the name of the SDS cluster where Consul should - // retrieve certificates. - ClusterName string `hcl:"cluster_name,optional" mapstructure:"cluster_name"` - - // CertResource specifies an SDS resource name - CertResource string `hcl:"cert_resource,optional" mapstructure:"cert_resource"` -} - -func (c *ConsulGatewayTLSSDSConfig) Copy() *ConsulGatewayTLSSDSConfig { - if c == nil { - return nil - } - - return &ConsulGatewayTLSSDSConfig{ - ClusterName: c.ClusterName, - CertResource: c.CertResource, - } -} - -// ConsulGatewayTLSConfig is used to configure TLS for a gateway. Both -// ConsulIngressConfigEntry and ConsulIngressService use this struct. For more -// details, consult the Consul documentation: -// https://developer.hashicorp.com/consul/docs/connect/config-entries/ingress-gateway#listeners-services-tls -type ConsulGatewayTLSConfig struct { - - // Enabled indicates whether TLS is enabled for the configuration entry - Enabled bool `hcl:"enabled,optional"` - - // TLSMinVersion specifies the minimum TLS version supported for gateway - // listeners. - TLSMinVersion string `hcl:"tls_min_version,optional" mapstructure:"tls_min_version"` - - // TLSMaxVersion specifies the maxmimum TLS version supported for gateway - // listeners. - TLSMaxVersion string `hcl:"tls_max_version,optional" mapstructure:"tls_max_version"` - - // CipherSuites specifies a list of cipher suites that gateway listeners - // support when negotiating connections using TLS 1.2 or older. - CipherSuites []string `hcl:"cipher_suites,optional" mapstructure:"cipher_suites"` - - // SDS specifies parameters that configure the listener to load TLS - // certificates from an external Secrets Discovery Service (SDS). - SDS *ConsulGatewayTLSSDSConfig `hcl:"sds,block" mapstructure:"sds"` -} - -func (tc *ConsulGatewayTLSConfig) Canonicalize() { -} - -func (tc *ConsulGatewayTLSConfig) Copy() *ConsulGatewayTLSConfig { - if tc == nil { - return nil - } - - result := &ConsulGatewayTLSConfig{ - Enabled: tc.Enabled, - TLSMinVersion: tc.TLSMinVersion, - TLSMaxVersion: tc.TLSMaxVersion, - SDS: tc.SDS.Copy(), - } - if len(tc.CipherSuites) != 0 { - cipherSuites := make([]string, len(tc.CipherSuites)) - copy(cipherSuites, tc.CipherSuites) - result.CipherSuites = cipherSuites - } - - return result -} - -// ConsulHTTPHeaderModifiers is a set of rules for HTTP header modification that -// should be performed by proxies as the request passes through them. It can -// operate on either request or response headers depending on the context in -// which it is used. -type ConsulHTTPHeaderModifiers struct { - // Add is a set of name -> value pairs that should be appended to the - // request or response (i.e. allowing duplicates if the same header already - // exists). - Add map[string]string `hcl:"add,block" mapstructure:"add"` - - // Set is a set of name -> value pairs that should be added to the request - // or response, overwriting any existing header values of the same name. - Set map[string]string `hcl:"set,block" mapstructure:"set"` - - // Remove is the set of header names that should be stripped from the - // request or response. - Remove []string `hcl:"remove,optional" mapstructure:"remove"` -} - -func (h *ConsulHTTPHeaderModifiers) Copy() *ConsulHTTPHeaderModifiers { - if h == nil { - return nil - } - - return &ConsulHTTPHeaderModifiers{ - Add: maps.Clone(h.Add), - Set: maps.Clone(h.Set), - Remove: slices.Clone(h.Remove), - } -} - -func (h *ConsulHTTPHeaderModifiers) Canonicalize() { - if h == nil { - return - } - - if len(h.Add) == 0 { - h.Add = nil - } - if len(h.Set) == 0 { - h.Set = nil - } - if len(h.Remove) == 0 { - h.Remove = nil - } -} - -// ConsulIngressService is used to configure a service fronted by the ingress -// gateway. For more details, consult the Consul documentation: -// https://developer.hashicorp.com/consul/docs/connect/config-entries/ingress-gateway -type ConsulIngressService struct { - // Namespace is not yet supported. - // Namespace string - - // Name of the service exposed through this listener. - Name string `hcl:"name,optional"` - - // Hosts specifies one or more hosts that the listening services can receive - // requests on. - Hosts []string `hcl:"hosts,optional"` - - // TLS specifies a TLS configuration override for a specific service. If - // unset this will fallback to the ConsulIngressConfigEntry's own TLS field. - TLS *ConsulGatewayTLSConfig `hcl:"tls,block" mapstructure:"tls"` - - // RequestHeaders specifies a set of HTTP-specific header modification rules - // applied to requests routed through the gateway - RequestHeaders *ConsulHTTPHeaderModifiers `hcl:"request_headers,block" mapstructure:"request_headers"` - - // ResponseHeader specifies a set of HTTP-specific header modification rules - // applied to responses routed through the gateway - ResponseHeaders *ConsulHTTPHeaderModifiers `hcl:"response_headers,block" mapstructure:"response_headers"` - - // MaxConnections specifies the maximum number of HTTP/1.1 connections a - // service instance is allowed to establish against the upstream - MaxConnections *uint32 `hcl:"max_connections,optional" mapstructure:"max_connections"` - - // MaxPendingRequests specifies the maximum number of requests that are - // allowed to queue while waiting to establish a connection - MaxPendingRequests *uint32 `hcl:"max_pending_requests,optional" mapstructure:"max_pending_requests"` - - // MaxConcurrentRequests specifies the maximum number of concurrent HTTP/2 - // traffic requests that are allowed at a single point in time - MaxConcurrentRequests *uint32 `hcl:"max_concurrent_requests,optional" mapstructure:"max_concurrent_requests"` -} - -func (s *ConsulIngressService) Canonicalize() { - if s == nil { - return - } - - if len(s.Hosts) == 0 { - s.Hosts = nil - } - - s.RequestHeaders.Canonicalize() - s.ResponseHeaders.Canonicalize() -} - -func (s *ConsulIngressService) Copy() *ConsulIngressService { - if s == nil { - return nil - } - - ns := new(ConsulIngressService) - *ns = *s - - ns.Hosts = slices.Clone(s.Hosts) - ns.RequestHeaders = s.RequestHeaders.Copy() - ns.ResponseHeaders = s.ResponseHeaders.Copy() - ns.TLS = s.TLS.Copy() - - ns.MaxConnections = pointerCopy(s.MaxConnections) - ns.MaxPendingRequests = pointerCopy(s.MaxPendingRequests) - ns.MaxConcurrentRequests = pointerCopy(s.MaxConcurrentRequests) - - return ns -} - -const ( - defaultIngressListenerProtocol = "tcp" -) - -// ConsulIngressListener is used to configure a listener on a Consul Ingress -// Gateway. -type ConsulIngressListener struct { - Port int `hcl:"port,optional"` - Protocol string `hcl:"protocol,optional"` - Services []*ConsulIngressService `hcl:"service,block"` -} - -func (l *ConsulIngressListener) Canonicalize() { - if l == nil { - return - } - - if l.Protocol == "" { - // same as default from consul - l.Protocol = defaultIngressListenerProtocol - } - - if len(l.Services) == 0 { - l.Services = nil - } -} - -func (l *ConsulIngressListener) Copy() *ConsulIngressListener { - if l == nil { - return nil - } - - var services []*ConsulIngressService = nil - if n := len(l.Services); n > 0 { - services = make([]*ConsulIngressService, n) - for i := 0; i < n; i++ { - services[i] = l.Services[i].Copy() - } - } - - return &ConsulIngressListener{ - Port: l.Port, - Protocol: l.Protocol, - Services: services, - } -} - -// ConsulIngressConfigEntry represents the Consul Configuration Entry type for -// an Ingress Gateway. -// -// https://www.consul.io/docs/agent/config-entries/ingress-gateway#available-fields -type ConsulIngressConfigEntry struct { - // Namespace is not yet supported. - // Namespace string - - // TLS specifies a TLS configuration for the gateway. - TLS *ConsulGatewayTLSConfig `hcl:"tls,block"` - - // Listeners specifies a list of listeners in the mesh for the - // gateway. Listeners are uniquely identified by their port number. - Listeners []*ConsulIngressListener `hcl:"listener,block"` -} - -func (e *ConsulIngressConfigEntry) Canonicalize() { - if e == nil { - return - } - - e.TLS.Canonicalize() - - if len(e.Listeners) == 0 { - e.Listeners = nil - } - - for _, listener := range e.Listeners { - listener.Canonicalize() - } -} - -func (e *ConsulIngressConfigEntry) Copy() *ConsulIngressConfigEntry { - if e == nil { - return nil - } - - var listeners []*ConsulIngressListener = nil - if n := len(e.Listeners); n > 0 { - listeners = make([]*ConsulIngressListener, n) - for i := 0; i < n; i++ { - listeners[i] = e.Listeners[i].Copy() - } - } - - return &ConsulIngressConfigEntry{ - TLS: e.TLS.Copy(), - Listeners: listeners, - } -} - -type ConsulLinkedService struct { - Name string `hcl:"name,optional"` - CAFile string `hcl:"ca_file,optional" mapstructure:"ca_file"` - CertFile string `hcl:"cert_file,optional" mapstructure:"cert_file"` - KeyFile string `hcl:"key_file,optional" mapstructure:"key_file"` - SNI string `hcl:"sni,optional"` -} - -func (s *ConsulLinkedService) Canonicalize() { - // nothing to do for now -} - -func (s *ConsulLinkedService) Copy() *ConsulLinkedService { - if s == nil { - return nil - } - - return &ConsulLinkedService{ - Name: s.Name, - CAFile: s.CAFile, - CertFile: s.CertFile, - KeyFile: s.KeyFile, - SNI: s.SNI, - } -} - -// ConsulTerminatingConfigEntry represents the Consul Configuration Entry type -// for a Terminating Gateway. -// -// https://www.consul.io/docs/agent/config-entries/terminating-gateway#available-fields -type ConsulTerminatingConfigEntry struct { - // Namespace is not yet supported. - // Namespace string - - Services []*ConsulLinkedService `hcl:"service,block"` -} - -func (e *ConsulTerminatingConfigEntry) Canonicalize() { - if e == nil { - return - } - - if len(e.Services) == 0 { - e.Services = nil - } - - for _, service := range e.Services { - service.Canonicalize() - } -} - -func (e *ConsulTerminatingConfigEntry) Copy() *ConsulTerminatingConfigEntry { - if e == nil { - return nil - } - - var services []*ConsulLinkedService = nil - if n := len(e.Services); n > 0 { - services = make([]*ConsulLinkedService, n) - for i := 0; i < n; i++ { - services[i] = e.Services[i].Copy() - } - } - - return &ConsulTerminatingConfigEntry{ - Services: services, - } -} - -// ConsulMeshConfigEntry is a stub used to represent that the gateway service type -// should be for a Mesh Gateway. Unlike Ingress and Terminating, there is no -// actual Consul Config Entry type for mesh-gateway, at least for now. We still -// create a type for future proofing, instead just using a bool for example. -type ConsulMeshConfigEntry struct { - // nothing in here -} - -func (e *ConsulMeshConfigEntry) Canonicalize() {} - -func (e *ConsulMeshConfigEntry) Copy() *ConsulMeshConfigEntry { - if e == nil { - return nil - } - return new(ConsulMeshConfigEntry) -} diff --git a/vendor/github.com/hashicorp/nomad/api/contexts/contexts.go b/vendor/github.com/hashicorp/nomad/api/contexts/contexts.go deleted file mode 100644 index 20f099a38e..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/contexts/contexts.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -// Package contexts provides constants used with the Nomad Search API. -package contexts - -// Context defines the scope in which a search for Nomad object operates. -type Context string - -const ( - // These Context types are used to reference the high level Nomad object - // types than can be searched. - Allocs Context = "allocs" - Deployments Context = "deployment" - Evals Context = "evals" - Jobs Context = "jobs" - Nodes Context = "nodes" - NodePools Context = "node_pools" - Namespaces Context = "namespaces" - Quotas Context = "quotas" - Recommendations Context = "recommendations" - ScalingPolicies Context = "scaling_policy" - Plugins Context = "plugins" - Variables Context = "vars" - Volumes Context = "volumes" - HostVolumes Context = "host_volumes" - - // These Context types are used to associate a search result from a lower - // level Nomad object with one of the higher level Context types above. - Groups Context = "groups" - Services Context = "services" - Tasks Context = "tasks" - Images Context = "images" - Commands Context = "commands" - Classes Context = "classes" - - // Context used to represent the set of all the higher level Context types. - All Context = "all" -) diff --git a/vendor/github.com/hashicorp/nomad/api/csi.go b/vendor/github.com/hashicorp/nomad/api/csi.go deleted file mode 100644 index 7177edaab0..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/csi.go +++ /dev/null @@ -1,658 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "net/url" - "sort" - "strings" - "time" -) - -// CSIVolumes is used to access Container Storage Interface (CSI) endpoints. -type CSIVolumes struct { - client *Client -} - -// CSIVolumes returns a handle on the CSIVolumes endpoint. -func (c *Client) CSIVolumes() *CSIVolumes { - return &CSIVolumes{client: c} -} - -// List returns all CSI volumes. -func (v *CSIVolumes) List(q *QueryOptions) ([]*CSIVolumeListStub, *QueryMeta, error) { - var resp []*CSIVolumeListStub - qm, err := v.client.query("/v1/volumes?type=csi", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(CSIVolumeIndexSort(resp)) - return resp, qm, nil -} - -// ListExternal returns all CSI volumes, as understood by the external storage -// provider. These volumes may or may not be currently registered with Nomad. -// The response is paginated by the plugin and accepts the -// QueryOptions.PerPage and QueryOptions.NextToken fields. -func (v *CSIVolumes) ListExternal(pluginID string, q *QueryOptions) (*CSIVolumeListExternalResponse, *QueryMeta, error) { - var resp *CSIVolumeListExternalResponse - - qp := url.Values{} - qp.Set("plugin_id", pluginID) - if q.NextToken != "" { - qp.Set("next_token", q.NextToken) - } - if q.PerPage != 0 { - qp.Set("per_page", fmt.Sprint(q.PerPage)) - } - - qm, err := v.client.query("/v1/volumes/external?"+qp.Encode(), &resp, q) - if err != nil { - return nil, nil, err - } - - sort.Sort(CSIVolumeExternalStubSort(resp.Volumes)) - return resp, qm, nil -} - -// PluginList returns all CSI volumes for the specified plugin id -func (v *CSIVolumes) PluginList(pluginID string) ([]*CSIVolumeListStub, *QueryMeta, error) { - return v.List(&QueryOptions{Prefix: pluginID}) -} - -// Info is used to retrieve a single CSIVolume -func (v *CSIVolumes) Info(id string, q *QueryOptions) (*CSIVolume, *QueryMeta, error) { - var resp CSIVolume - qm, err := v.client.query("/v1/volume/csi/"+id, &resp, q) - if err != nil { - return nil, nil, err - } - - return &resp, qm, nil -} - -// Register registers a single CSIVolume with Nomad. The volume must already -// exist in the external storage provider. -func (v *CSIVolumes) Register(vol *CSIVolume, w *WriteOptions) (*WriteMeta, error) { - req := &CSIVolumeRegisterRequest{ - Volumes: []*CSIVolume{vol}, - } - _, meta, err := v.RegisterOpts(req, w) - return meta, err -} - -// RegisterOpts registers a single CSIVolume with Nomad. The volume must already -// exist in the external storage provider. It expects a single volume in the -// request. -func (v *CSIVolumes) RegisterOpts(req *CSIVolumeRegisterRequest, w *WriteOptions) (*CSIVolumeRegisterResponse, *WriteMeta, error) { - if w == nil { - w = &WriteOptions{} - } - vol := req.Volumes[0] - resp := &CSIVolumeRegisterResponse{} - meta, err := v.client.put("/v1/volume/csi/"+vol.ID, req, resp, w) - - return resp, meta, err -} - -// Deregister deregisters a single CSIVolume from Nomad. The volume will not be deleted from the external storage provider. -func (v *CSIVolumes) Deregister(id string, force bool, w *WriteOptions) error { - _, err := v.client.delete(fmt.Sprintf("/v1/volume/csi/%v?force=%t", url.PathEscape(id), force), nil, nil, w) - return err -} - -// Create creates a single CSIVolume in an external storage provider and -// registers it with Nomad. You do not need to call Register if this call is -// successful. -func (v *CSIVolumes) Create(vol *CSIVolume, w *WriteOptions) ([]*CSIVolume, *WriteMeta, error) { - req := CSIVolumeCreateRequest{ - Volumes: []*CSIVolume{vol}, - } - - resp, meta, err := v.CreateOpts(&req, w) - return resp.Volumes, meta, err -} - -// CreateOpts creates a single CSIVolume in an external storage provider and -// registers it with Nomad. You do not need to call Register if this call is -// successful. It expects a single volume in the request. -func (v *CSIVolumes) CreateOpts(req *CSIVolumeCreateRequest, w *WriteOptions) (*CSIVolumeCreateResponse, *WriteMeta, error) { - if w == nil { - w = &WriteOptions{} - } - vol := req.Volumes[0] - resp := &CSIVolumeCreateResponse{} - meta, err := v.client.put(fmt.Sprintf("/v1/volume/csi/%v/create", vol.ID), req, resp, w) - return resp, meta, err -} - -// Delete deletes a CSI volume from an external storage provider. The ID -// passed as an argument here is for the storage provider's ID, so a volume -// that's already been deregistered can be deleted. -// -// Deprecated: will be removed in Nomad 1.4.0 -func (v *CSIVolumes) Delete(externalVolID string, w *WriteOptions) error { - _, err := v.client.delete(fmt.Sprintf("/v1/volume/csi/%v/delete", url.PathEscape(externalVolID)), nil, nil, w) - return err -} - -// DeleteOpts deletes a CSI volume from an external storage -// provider. The ID passed in the request is for the storage -// provider's ID, so a volume that's already been deregistered can be -// deleted. -func (v *CSIVolumes) DeleteOpts(req *CSIVolumeDeleteRequest, w *WriteOptions) error { - if w == nil { - w = &WriteOptions{} - } - w.SetHeadersFromCSISecrets(req.Secrets) - _, err := v.client.delete(fmt.Sprintf("/v1/volume/csi/%v/delete", url.PathEscape(req.ExternalVolumeID)), nil, nil, w) - return err -} - -// Detach causes Nomad to attempt to detach a CSI volume from a client -// node. This is used in the case that the node is temporarily lost and the -// allocations are unable to drop their claims automatically. -func (v *CSIVolumes) Detach(volID, nodeID string, w *WriteOptions) error { - _, err := v.client.delete(fmt.Sprintf("/v1/volume/csi/%v/detach?node=%v", url.PathEscape(volID), nodeID), nil, nil, w) - return err -} - -// CreateSnapshot snapshots an external storage volume. -func (v *CSIVolumes) CreateSnapshot(snap *CSISnapshot, w *WriteOptions) (*CSISnapshotCreateResponse, *WriteMeta, error) { - req := &CSISnapshotCreateRequest{ - Snapshots: []*CSISnapshot{snap}, - } - if w == nil { - w = &WriteOptions{} - } - w.SetHeadersFromCSISecrets(snap.Secrets) - resp := &CSISnapshotCreateResponse{} - meta, err := v.client.put("/v1/volumes/snapshot", req, resp, w) - return resp, meta, err -} - -// DeleteSnapshot deletes an external storage volume snapshot. -func (v *CSIVolumes) DeleteSnapshot(snap *CSISnapshot, w *WriteOptions) error { - qp := url.Values{} - qp.Set("snapshot_id", snap.ID) - qp.Set("plugin_id", snap.PluginID) - if w == nil { - w = &WriteOptions{} - } - w.SetHeadersFromCSISecrets(snap.Secrets) - _, err := v.client.delete("/v1/volumes/snapshot?"+qp.Encode(), nil, nil, w) - return err -} - -// ListSnapshotsOpts lists external storage volume snapshots. -func (v *CSIVolumes) ListSnapshotsOpts(req *CSISnapshotListRequest) (*CSISnapshotListResponse, *QueryMeta, error) { - var resp *CSISnapshotListResponse - - qp := url.Values{} - if req.PluginID != "" { - qp.Set("plugin_id", req.PluginID) - } - if req.NextToken != "" { - qp.Set("next_token", req.NextToken) - } - if req.PerPage != 0 { - qp.Set("per_page", fmt.Sprint(req.PerPage)) - } - req.QueryOptions.SetHeadersFromCSISecrets(req.Secrets) - - qm, err := v.client.query("/v1/volumes/snapshot?"+qp.Encode(), &resp, &req.QueryOptions) - if err != nil { - return nil, nil, err - } - - sort.Sort(CSISnapshotSort(resp.Snapshots)) - return resp, qm, nil -} - -// ListSnapshots lists external storage volume snapshots. -// -// Deprecated: will be removed in Nomad 1.4.0 -func (v *CSIVolumes) ListSnapshots(pluginID string, secrets string, q *QueryOptions) (*CSISnapshotListResponse, *QueryMeta, error) { - var resp *CSISnapshotListResponse - - qp := url.Values{} - if pluginID != "" { - qp.Set("plugin_id", pluginID) - } - if q.NextToken != "" { - qp.Set("next_token", q.NextToken) - } - if q.PerPage != 0 { - qp.Set("per_page", fmt.Sprint(q.PerPage)) - } - - qm, err := v.client.query("/v1/volumes/snapshot?"+qp.Encode(), &resp, q) - if err != nil { - return nil, nil, err - } - - sort.Sort(CSISnapshotSort(resp.Snapshots)) - return resp, qm, nil -} - -// CSIVolumeAttachmentMode chooses the type of storage api that will be used to -// interact with the device. (Duplicated in nomad/structs/csi.go) -type CSIVolumeAttachmentMode string - -const ( - CSIVolumeAttachmentModeUnknown CSIVolumeAttachmentMode = "" - CSIVolumeAttachmentModeBlockDevice CSIVolumeAttachmentMode = "block-device" - CSIVolumeAttachmentModeFilesystem CSIVolumeAttachmentMode = "file-system" -) - -// CSIVolumeAccessMode indicates how a volume should be used in a storage topology -// e.g whether the provider should make the volume available concurrently. (Duplicated in nomad/structs/csi.go) -type CSIVolumeAccessMode string - -const ( - CSIVolumeAccessModeUnknown CSIVolumeAccessMode = "" - CSIVolumeAccessModeSingleNodeReader CSIVolumeAccessMode = "single-node-reader-only" - CSIVolumeAccessModeSingleNodeWriter CSIVolumeAccessMode = "single-node-writer" - CSIVolumeAccessModeMultiNodeReader CSIVolumeAccessMode = "multi-node-reader-only" - CSIVolumeAccessModeMultiNodeSingleWriter CSIVolumeAccessMode = "multi-node-single-writer" - CSIVolumeAccessModeMultiNodeMultiWriter CSIVolumeAccessMode = "multi-node-multi-writer" -) - -const ( - CSIVolumeTypeHost = "host" - CSIVolumeTypeCSI = "csi" -) - -// CSIMountOptions contain optional additional configuration that can be used -// when specifying that a Volume should be used with VolumeAccessTypeMount. -type CSIMountOptions struct { - // FSType is an optional field that allows an operator to specify the type - // of the filesystem. - FSType string `hcl:"fs_type,optional"` - - // MountFlags contains additional options that may be used when mounting the - // volume by the plugin. This may contain sensitive data and should not be - // leaked. - MountFlags []string `hcl:"mount_flags,optional"` - - ExtraKeysHCL []string `hcl1:",unusedKeys" json:"-"` // report unexpected keys -} - -func (o *CSIMountOptions) Merge(p *CSIMountOptions) { - if p == nil { - return - } - if p.FSType != "" { - o.FSType = p.FSType - } - if p.MountFlags != nil { - o.MountFlags = p.MountFlags - } -} - -// CSISecrets contain optional additional credentials that may be needed by -// the storage provider. These values will be redacted when reported in the -// API or in Nomad's logs. -type CSISecrets map[string]string - -func (o *QueryOptions) SetHeadersFromCSISecrets(secrets CSISecrets) { - pairs := []string{} - for k, v := range secrets { - pairs = append(pairs, fmt.Sprintf("%v=%v", k, v)) - } - if o.Headers == nil { - o.Headers = map[string]string{} - } - o.Headers["X-Nomad-CSI-Secrets"] = strings.Join(pairs, ",") -} - -func (o *WriteOptions) SetHeadersFromCSISecrets(secrets CSISecrets) { - pairs := []string{} - for k, v := range secrets { - pairs = append(pairs, fmt.Sprintf("%v=%v", k, v)) - } - if o.Headers == nil { - o.Headers = map[string]string{} - } - o.Headers["X-Nomad-CSI-Secrets"] = strings.Join(pairs, ",") -} - -// CSIVolume is used for serialization, see also nomad/structs/csi.go -type CSIVolume struct { - ID string - Name string - ExternalID string `mapstructure:"external_id" hcl:"external_id"` - Namespace string - - // RequestedTopologies are the topologies submitted as options to - // the storage provider at the time the volume was created. After - // volumes are created, this field is ignored. - RequestedTopologies *CSITopologyRequest `hcl:"topology_request"` - - // Topologies are the topologies returned by the storage provider, - // based on the RequestedTopologies and what the storage provider - // could support. This value cannot be set by the user. - Topologies []*CSITopology - - AccessMode CSIVolumeAccessMode `hcl:"access_mode"` - AttachmentMode CSIVolumeAttachmentMode `hcl:"attachment_mode"` - MountOptions *CSIMountOptions `hcl:"mount_options"` - Secrets CSISecrets `mapstructure:"secrets" hcl:"secrets"` - Parameters map[string]string `mapstructure:"parameters" hcl:"parameters"` - Context map[string]string `mapstructure:"context" hcl:"context"` - Capacity int64 `hcl:"-"` - - // These fields are used as part of the volume creation request - RequestedCapacityMin int64 `hcl:"capacity_min"` - RequestedCapacityMax int64 `hcl:"capacity_max"` - RequestedCapabilities []*CSIVolumeCapability `hcl:"capability"` - CloneID string `mapstructure:"clone_id" hcl:"clone_id"` - SnapshotID string `mapstructure:"snapshot_id" hcl:"snapshot_id"` - - // ReadAllocs is a map of allocation IDs for tracking reader claim status. - // The Allocation value will always be nil; clients can populate this data - // by iterating over the Allocations field. - ReadAllocs map[string]*Allocation - - // WriteAllocs is a map of allocation IDs for tracking writer claim - // status. The Allocation value will always be nil; clients can populate - // this data by iterating over the Allocations field. - WriteAllocs map[string]*Allocation - - // Allocations is a combined list of readers and writers - Allocations []*AllocationListStub - - // Schedulable is true if all the denormalized plugin health fields are true - Schedulable bool - PluginID string `mapstructure:"plugin_id" hcl:"plugin_id"` - Provider string - ProviderVersion string - ControllerRequired bool - ControllersHealthy int - ControllersExpected int - NodesHealthy int - NodesExpected int - ResourceExhausted time.Time - - CreateIndex uint64 - ModifyIndex uint64 - - // CreateTime stored as UnixNano - CreateTime int64 - // ModifyTime stored as UnixNano - ModifyTime int64 - - // ExtraKeysHCL is used by the hcl parser to report unexpected keys - ExtraKeysHCL []string `hcl1:",unusedKeys" json:"-"` -} - -// CSIVolumeCapability is a requested attachment and access mode for a -// volume -type CSIVolumeCapability struct { - AccessMode CSIVolumeAccessMode `mapstructure:"access_mode" hcl:"access_mode"` - AttachmentMode CSIVolumeAttachmentMode `mapstructure:"attachment_mode" hcl:"attachment_mode"` -} - -// CSIVolumeIndexSort is a helper used for sorting volume stubs by creation -// time. -type CSIVolumeIndexSort []*CSIVolumeListStub - -func (v CSIVolumeIndexSort) Len() int { - return len(v) -} - -func (v CSIVolumeIndexSort) Less(i, j int) bool { - return v[i].CreateIndex > v[j].CreateIndex -} - -func (v CSIVolumeIndexSort) Swap(i, j int) { - v[i], v[j] = v[j], v[i] -} - -// CSIVolumeListStub omits allocations. See also nomad/structs/csi.go -type CSIVolumeListStub struct { - ID string - Namespace string - Name string - ExternalID string - Topologies []*CSITopology - AccessMode CSIVolumeAccessMode - AttachmentMode CSIVolumeAttachmentMode - CurrentReaders int - CurrentWriters int - Schedulable bool - PluginID string - Provider string - ControllerRequired bool - ControllersHealthy int - ControllersExpected int - NodesHealthy int - NodesExpected int - ResourceExhausted time.Time - - CreateIndex uint64 - ModifyIndex uint64 - - // CreateTime stored as UnixNano - CreateTime int64 - // ModifyTime stored as UnixNano - ModifyTime int64 -} - -type CSIVolumeListExternalResponse struct { - Volumes []*CSIVolumeExternalStub - NextToken string -} - -// CSIVolumeExternalStub is the storage provider's view of a volume, as -// returned from the controller plugin; all IDs are for external resources -type CSIVolumeExternalStub struct { - ExternalID string - CapacityBytes int64 - VolumeContext map[string]string - CloneID string - SnapshotID string - PublishedExternalNodeIDs []string - IsAbnormal bool - Status string -} - -// CSIVolumeExternalStubSort is a sorting helper for external volumes. We -// can't sort these by creation time because we don't get that data back from -// the storage provider. Sort by External ID within this page. -type CSIVolumeExternalStubSort []*CSIVolumeExternalStub - -func (v CSIVolumeExternalStubSort) Len() int { - return len(v) -} - -func (v CSIVolumeExternalStubSort) Less(i, j int) bool { - return v[i].ExternalID > v[j].ExternalID -} - -func (v CSIVolumeExternalStubSort) Swap(i, j int) { - v[i], v[j] = v[j], v[i] -} - -type CSIVolumeCreateRequest struct { - Volumes []*CSIVolume - - // PolicyOverride overrides Sentinel soft-mandatory policy enforcement - PolicyOverride bool - - WriteRequest -} - -type CSIVolumeCreateResponse struct { - Volumes []*CSIVolume - Warnings string - QueryMeta -} - -type CSIVolumeRegisterRequest struct { - Volumes []*CSIVolume - - // PolicyOverride overrides Sentinel soft-mandatory policy enforcement - PolicyOverride bool - - WriteRequest -} - -type CSIVolumeRegisterResponse struct { - Volumes []*CSIVolume - Warnings string - QueryMeta -} - -type CSIVolumeDeregisterRequest struct { - VolumeIDs []string - WriteRequest -} - -type CSIVolumeDeleteRequest struct { - ExternalVolumeID string - Secrets CSISecrets - WriteRequest -} - -// CSISnapshot is the storage provider's view of a volume snapshot -type CSISnapshot struct { - ID string // storage provider's ID - ExternalSourceVolumeID string // storage provider's ID for volume - SizeBytes int64 // value from storage provider - CreateTime int64 // value from storage provider - IsReady bool // value from storage provider - SourceVolumeID string // Nomad volume ID - PluginID string // CSI plugin ID - - // These field are only used during snapshot creation and will not be - // populated when the snapshot is returned - Name string // suggested name of the snapshot, used for creation - Secrets CSISecrets // secrets needed to create snapshot - Parameters map[string]string // secrets needed to create snapshot -} - -// CSISnapshotSort is a helper used for sorting snapshots by creation time. -type CSISnapshotSort []*CSISnapshot - -func (v CSISnapshotSort) Len() int { - return len(v) -} - -func (v CSISnapshotSort) Less(i, j int) bool { - return v[i].CreateTime > v[j].CreateTime -} - -func (v CSISnapshotSort) Swap(i, j int) { - v[i], v[j] = v[j], v[i] -} - -type CSISnapshotCreateRequest struct { - Snapshots []*CSISnapshot - WriteRequest -} - -type CSISnapshotCreateResponse struct { - Snapshots []*CSISnapshot - QueryMeta -} - -// CSISnapshotListRequest is a request to a controller plugin to list all the -// snapshot known to the storage provider. This request is paginated by -// the plugin and accepts the QueryOptions.PerPage and QueryOptions.NextToken -// fields -type CSISnapshotListRequest struct { - PluginID string - Secrets CSISecrets - QueryOptions -} - -type CSISnapshotListResponse struct { - Snapshots []*CSISnapshot - NextToken string - QueryMeta -} - -// CSI Plugins are jobs with plugin specific data -type CSIPlugins struct { - client *Client -} - -// CSIPlugin is used for serialization, see also nomad/structs/csi.go -type CSIPlugin struct { - ID string - Provider string - Version string - ControllerRequired bool - // Map Node.ID to CSIInfo fingerprint results - Controllers map[string]*CSIInfo - Nodes map[string]*CSIInfo - Allocations []*AllocationListStub - ControllersHealthy int - ControllersExpected int - NodesHealthy int - NodesExpected int - CreateIndex uint64 - ModifyIndex uint64 - - // CreateTime stored as UnixNano - CreateTime int64 - // ModifyTime stored as UnixNano - ModifyTime int64 -} - -type CSIPluginListStub struct { - ID string - Provider string - ControllerRequired bool - ControllersHealthy int - ControllersExpected int - NodesHealthy int - NodesExpected int - CreateIndex uint64 - ModifyIndex uint64 -} - -// CSIPluginIndexSort is a helper used for sorting plugin stubs by creation -// time. -type CSIPluginIndexSort []*CSIPluginListStub - -func (v CSIPluginIndexSort) Len() int { - return len(v) -} - -func (v CSIPluginIndexSort) Less(i, j int) bool { - return v[i].CreateIndex > v[j].CreateIndex -} - -func (v CSIPluginIndexSort) Swap(i, j int) { - v[i], v[j] = v[j], v[i] -} - -// CSIPlugins returns a handle on the CSIPlugins endpoint -func (c *Client) CSIPlugins() *CSIPlugins { - return &CSIPlugins{client: c} -} - -// List returns all CSI plugins -func (v *CSIPlugins) List(q *QueryOptions) ([]*CSIPluginListStub, *QueryMeta, error) { - var resp []*CSIPluginListStub - qm, err := v.client.query("/v1/plugins?type=csi", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(CSIPluginIndexSort(resp)) - return resp, qm, nil -} - -// Info is used to retrieve a single CSI Plugin Job -func (v *CSIPlugins) Info(id string, q *QueryOptions) (*CSIPlugin, *QueryMeta, error) { - var resp *CSIPlugin - qm, err := v.client.query("/v1/plugin/csi/"+id, &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/deployments.go b/vendor/github.com/hashicorp/nomad/api/deployments.go deleted file mode 100644 index 94e2e97323..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/deployments.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "sort" - "time" -) - -// Deployments is used to query the deployments endpoints. -type Deployments struct { - client *Client -} - -// Deployments returns a new handle on the deployments. -func (c *Client) Deployments() *Deployments { - return &Deployments{client: c} -} - -// List is used to dump all the deployments. -func (d *Deployments) List(q *QueryOptions) ([]*Deployment, *QueryMeta, error) { - var resp []*Deployment - qm, err := d.client.query("/v1/deployments", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(DeploymentIndexSort(resp)) - return resp, qm, nil -} - -func (d *Deployments) PrefixList(prefix string) ([]*Deployment, *QueryMeta, error) { - return d.List(&QueryOptions{Prefix: prefix}) -} - -// Info is used to query a single deployment by its ID. -func (d *Deployments) Info(deploymentID string, q *QueryOptions) (*Deployment, *QueryMeta, error) { - var resp Deployment - qm, err := d.client.query("/v1/deployment/"+deploymentID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Allocations is used to retrieve a set of allocations that are part of the -// deployment -func (d *Deployments) Allocations(deploymentID string, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) { - var resp []*AllocationListStub - qm, err := d.client.query("/v1/deployment/allocations/"+deploymentID, &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(AllocIndexSort(resp)) - return resp, qm, nil -} - -// Fail is used to fail the given deployment. -func (d *Deployments) Fail(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentFailRequest{ - DeploymentID: deploymentID, - } - wm, err := d.client.put("/v1/deployment/fail/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Pause is used to pause or unpause the given deployment. -func (d *Deployments) Pause(deploymentID string, pause bool, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentPauseRequest{ - DeploymentID: deploymentID, - Pause: pause, - } - wm, err := d.client.put("/v1/deployment/pause/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// PromoteAll is used to promote all canaries in the given deployment -func (d *Deployments) PromoteAll(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentPromoteRequest{ - DeploymentID: deploymentID, - All: true, - } - wm, err := d.client.put("/v1/deployment/promote/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// PromoteGroups is used to promote canaries in the passed groups in the given deployment -func (d *Deployments) PromoteGroups(deploymentID string, groups []string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentPromoteRequest{ - DeploymentID: deploymentID, - Groups: groups, - } - wm, err := d.client.put("/v1/deployment/promote/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Unblock is used to unblock the given deployment. -func (d *Deployments) Unblock(deploymentID string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentUnblockRequest{ - DeploymentID: deploymentID, - } - wm, err := d.client.put("/v1/deployment/unblock/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// SetAllocHealth is used to set allocation health for allocs that are part of -// the given deployment -func (d *Deployments) SetAllocHealth(deploymentID string, healthy, unhealthy []string, q *WriteOptions) (*DeploymentUpdateResponse, *WriteMeta, error) { - var resp DeploymentUpdateResponse - req := &DeploymentAllocHealthRequest{ - DeploymentID: deploymentID, - HealthyAllocationIDs: healthy, - UnhealthyAllocationIDs: unhealthy, - } - wm, err := d.client.put("/v1/deployment/allocation-health/"+deploymentID, req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -const ( - DeploymentStatusRunning = "running" - DeploymentStatusPaused = "paused" - DeploymentStatusFailed = "failed" - DeploymentStatusSuccessful = "successful" - DeploymentStatusCancelled = "cancelled" - DeploymentStatusPending = "pending" - DeploymentStatusBlocked = "blocked" - DeploymentStatusUnblocking = "unblocking" -) - -// Deployment is used to serialize an deployment. -type Deployment struct { - // ID is a generated UUID for the deployment - ID string - - // Namespace is the namespace the deployment is created in - Namespace string - - // JobID is the job the deployment is created for - JobID string - - // JobVersion is the version of the job at which the deployment is tracking - JobVersion uint64 - - // JobModifyIndex is the ModifyIndex of the job which the deployment is - // tracking. - JobModifyIndex uint64 - - // JobSpecModifyIndex is the JobModifyIndex of the job which the - // deployment is tracking. - JobSpecModifyIndex uint64 - - // JobCreateIndex is the create index of the job which the deployment is - // tracking. It is needed so that if the job gets stopped and reran we can - // present the correct list of deployments for the job and not old ones. - JobCreateIndex uint64 - - // IsMultiregion specifies if this deployment is part of a multi-region deployment - IsMultiregion bool - - // TaskGroups is the set of task groups effected by the deployment and their - // current deployment status. - TaskGroups map[string]*DeploymentState - - // The status of the deployment - Status string - - // StatusDescription allows a human readable description of the deployment - // status. - StatusDescription string - - CreateIndex uint64 - ModifyIndex uint64 - - // Creation and modification times, stored as UnixNano - CreateTime int64 - ModifyTime int64 -} - -// DeploymentState tracks the state of a deployment for a given task group. -type DeploymentState struct { - PlacedCanaries []string - AutoRevert bool - ProgressDeadline time.Duration - RequireProgressBy time.Time - Promoted bool - DesiredCanaries int - DesiredTotal int - PlacedAllocs int - HealthyAllocs int - UnhealthyAllocs int -} - -// DeploymentIndexSort is a wrapper to sort deployments by CreateIndex. We -// reverse the test so that we get the highest index first. -type DeploymentIndexSort []*Deployment - -func (d DeploymentIndexSort) Len() int { - return len(d) -} - -func (d DeploymentIndexSort) Less(i, j int) bool { - return d[i].CreateIndex > d[j].CreateIndex -} - -func (d DeploymentIndexSort) Swap(i, j int) { - d[i], d[j] = d[j], d[i] -} - -// DeploymentUpdateResponse is used to respond to a deployment change. The -// response will include the modify index of the deployment as well as details -// of any triggered evaluation. -type DeploymentUpdateResponse struct { - EvalID string - EvalCreateIndex uint64 - DeploymentModifyIndex uint64 - RevertedJobVersion *uint64 - WriteMeta -} - -// DeploymentAllocHealthRequest is used to set the health of a set of -// allocations as part of a deployment. -type DeploymentAllocHealthRequest struct { - DeploymentID string - - // Marks these allocations as healthy, allow further allocations - // to be rolled. - HealthyAllocationIDs []string - - // Any unhealthy allocations fail the deployment - UnhealthyAllocationIDs []string - - WriteRequest -} - -// DeploymentPromoteRequest is used to promote task groups in a deployment -type DeploymentPromoteRequest struct { - DeploymentID string - - // All is to promote all task groups - All bool - - // Groups is used to set the promotion status per task group - Groups []string - - // PromotedAt is the timestamp stored as Unix nano - PromotedAt int64 - - WriteRequest -} - -// DeploymentPauseRequest is used to pause a deployment -type DeploymentPauseRequest struct { - DeploymentID string - - // Pause sets the pause status - Pause bool - - WriteRequest -} - -// DeploymentSpecificRequest is used to make a request specific to a particular -// deployment -type DeploymentSpecificRequest struct { - DeploymentID string - QueryOptions -} - -// DeploymentFailRequest is used to fail a particular deployment -type DeploymentFailRequest struct { - DeploymentID string - WriteRequest -} - -// DeploymentUnblockRequest is used to unblock a particular deployment -type DeploymentUnblockRequest struct { - DeploymentID string - WriteRequest -} - -// SingleDeploymentResponse is used to respond with a single deployment -type SingleDeploymentResponse struct { - Deployment *Deployment - QueryMeta -} diff --git a/vendor/github.com/hashicorp/nomad/api/error_unexpected_response.go b/vendor/github.com/hashicorp/nomad/api/error_unexpected_response.go deleted file mode 100644 index 611ca33a4e..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/error_unexpected_response.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "bytes" - "fmt" - "io" - "net/http" - "slices" - "strings" - "time" -) - -// UnexpectedResponseError tracks the components for API errors encountered when -// requireOK and requireStatusIn's conditions are not met. -type UnexpectedResponseError struct { - expected []int - statusCode int - statusText string - body string - err error - additional error -} - -func (e UnexpectedResponseError) HasExpectedStatuses() bool { return len(e.expected) > 0 } -func (e UnexpectedResponseError) ExpectedStatuses() []int { return e.expected } -func (e UnexpectedResponseError) HasStatusCode() bool { return e.statusCode != 0 } -func (e UnexpectedResponseError) StatusCode() int { return e.statusCode } -func (e UnexpectedResponseError) HasStatusText() bool { return e.statusText != "" } -func (e UnexpectedResponseError) StatusText() string { return e.statusText } -func (e UnexpectedResponseError) HasBody() bool { return e.body != "" } -func (e UnexpectedResponseError) Body() string { return e.body } -func (e UnexpectedResponseError) HasError() bool { return e.err != nil } -func (e UnexpectedResponseError) Unwrap() error { return e.err } -func (e UnexpectedResponseError) HasAdditional() bool { return e.additional != nil } -func (e UnexpectedResponseError) Additional() error { return e.additional } -func newUnexpectedResponseError(src unexpectedResponseErrorSource, opts ...unexpectedResponseErrorOption) UnexpectedResponseError { - nErr := src() - for _, opt := range opts { - opt(nErr) - } - if nErr.statusText == "" { - // the stdlib's http.StatusText function is a good place to start - nErr.statusFromCode(http.StatusText) - } - - return *nErr -} - -// Use textual representation of the given integer code. Called when status text -// is not set using the WithStatusText option. -func (e UnexpectedResponseError) statusFromCode(f func(int) string) { - e.statusText = f(e.statusCode) - if !e.HasStatusText() { - e.statusText = "unknown status code" - } -} - -func (e UnexpectedResponseError) Error() string { - var eTxt strings.Builder - eTxt.WriteString("Unexpected response code") - if e.HasBody() || e.HasStatusCode() { - eTxt.WriteString(": ") - } - if e.HasStatusCode() { - eTxt.WriteString(fmt.Sprint(e.statusCode)) - if e.HasBody() { - eTxt.WriteRune(' ') - } - } - if e.HasBody() { - eTxt.WriteString(fmt.Sprintf("(%s)", e.body)) - } - - if e.HasAdditional() { - eTxt.WriteString(fmt.Sprintf(". Additionally, an error occurred while constructing this error (%s); the body might be truncated or missing.", e.additional.Error())) - } - - return eTxt.String() -} - -// UnexpectedResponseErrorOptions are functions passed to NewUnexpectedResponseError -// to customize the created error. -type unexpectedResponseErrorOption func(*UnexpectedResponseError) - -// withError allows the addition of a Go error that may have been encountered -// while processing the response. For example, if there is an error constructing -// the gzip reader to process a gzip-encoded response body. -func withError(e error) unexpectedResponseErrorOption { - return func(u *UnexpectedResponseError) { u.err = e } -} - -// withBody overwrites the Body value with the provided custom value -func withBody(b string) unexpectedResponseErrorOption { - return func(u *UnexpectedResponseError) { u.body = b } -} - -// withStatusText overwrites the StatusText value the provided custom value -func withStatusText(st string) unexpectedResponseErrorOption { - return func(u *UnexpectedResponseError) { u.statusText = st } -} - -// withExpectedStatuses provides a list of statuses that the receiving function -// expected to receive. This can be used by API callers to provide more feedback -// to end-users. -func withExpectedStatuses(s []int) unexpectedResponseErrorOption { - return func(u *UnexpectedResponseError) { u.expected = slices.Clone(s) } -} - -// unexpectedResponseErrorSource provides the basis for a NewUnexpectedResponseError. -type unexpectedResponseErrorSource func() *UnexpectedResponseError - -// fromHTTPResponse read an open HTTP response, drains and closes its body as -// the data for the UnexpectedResponseError. -func fromHTTPResponse(resp *http.Response) unexpectedResponseErrorSource { - return func() *UnexpectedResponseError { - u := new(UnexpectedResponseError) - - if resp != nil { - // collect and close the body - var buf bytes.Buffer - if _, e := io.Copy(&buf, resp.Body); e != nil { - u.additional = e - } - - // Body has been tested as safe to close more than once - _ = resp.Body.Close() - body := strings.TrimSpace(buf.String()) - - // make and return the error - u.statusCode = resp.StatusCode - u.statusText = strings.TrimSpace(strings.TrimPrefix(resp.Status, fmt.Sprint(resp.StatusCode))) - u.body = body - } - return u - } -} - -// fromStatusCode attempts to resolve the status code to status text using -// the resolving function provided inside of the NewUnexpectedResponseError -// implementation. -func fromStatusCode(sc int) unexpectedResponseErrorSource { - return func() *UnexpectedResponseError { return &UnexpectedResponseError{statusCode: sc} } -} - -// doRequestWrapper is a function that wraps the client's doRequest method -// and can be used to provide error and response handling -type doRequestWrapper = func(time.Duration, *http.Response, error) (time.Duration, *http.Response, error) - -// requireOK is used to wrap doRequest and check for a 200 -func requireOK(d time.Duration, resp *http.Response, e error) (time.Duration, *http.Response, error) { - f := requireStatusIn(http.StatusOK) - return f(d, resp, e) -} - -// requireStatusIn is a doRequestWrapper generator that takes expected HTTP -// response codes and validates that the received response code is among them -func requireStatusIn(statuses ...int) doRequestWrapper { - return func(d time.Duration, resp *http.Response, e error) (time.Duration, *http.Response, error) { - if e != nil { - if resp != nil { - _ = resp.Body.Close() - } - return d, nil, e - } - - for _, status := range statuses { - if resp.StatusCode == status { - return d, resp, nil - } - } - - return d, nil, newUnexpectedResponseError(fromHTTPResponse(resp), withExpectedStatuses(statuses)) - } -} diff --git a/vendor/github.com/hashicorp/nomad/api/evaluations.go b/vendor/github.com/hashicorp/nomad/api/evaluations.go deleted file mode 100644 index feac278cac..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/evaluations.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "sort" - "time" -) - -// Evaluations is used to query the evaluation endpoints. -type Evaluations struct { - client *Client -} - -// Evaluations returns a new handle on the evaluations. -func (c *Client) Evaluations() *Evaluations { - return &Evaluations{client: c} -} - -// List is used to dump all of the evaluations. -func (e *Evaluations) List(q *QueryOptions) ([]*Evaluation, *QueryMeta, error) { - var resp []*Evaluation - qm, err := e.client.query("/v1/evaluations", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(EvalIndexSort(resp)) - return resp, qm, nil -} - -func (e *Evaluations) PrefixList(prefix string) ([]*Evaluation, *QueryMeta, error) { - return e.List(&QueryOptions{Prefix: prefix}) -} - -// Count is used to get a count of evaluations. -func (e *Evaluations) Count(q *QueryOptions) (*EvalCountResponse, *QueryMeta, error) { - var resp *EvalCountResponse - qm, err := e.client.query("/v1/evaluations/count", &resp, q) - if err != nil { - return resp, nil, err - } - return resp, qm, nil -} - -// Info is used to query a single evaluation by its ID. -func (e *Evaluations) Info(evalID string, q *QueryOptions) (*Evaluation, *QueryMeta, error) { - var resp Evaluation - qm, err := e.client.query("/v1/evaluation/"+evalID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Delete is used to batch delete evaluations using their IDs. -func (e *Evaluations) Delete(evalIDs []string, w *WriteOptions) (*WriteMeta, error) { - req := EvalDeleteRequest{ - EvalIDs: evalIDs, - } - wm, err := e.client.delete("/v1/evaluations", &req, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// DeleteOpts is used to batch delete evaluations using a filter. -func (e *Evaluations) DeleteOpts(req *EvalDeleteRequest, w *WriteOptions) (*EvalDeleteResponse, *WriteMeta, error) { - resp := &EvalDeleteResponse{} - wm, err := e.client.delete("/v1/evaluations", &req, resp, w) - if err != nil { - return nil, nil, err - } - return resp, wm, nil -} - -// Allocations is used to retrieve a set of allocations given -// an evaluation ID. -func (e *Evaluations) Allocations(evalID string, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) { - var resp []*AllocationListStub - qm, err := e.client.query("/v1/evaluation/"+evalID+"/allocations", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(AllocIndexSort(resp)) - return resp, qm, nil -} - -const ( - EvalStatusBlocked = "blocked" - EvalStatusPending = "pending" - EvalStatusComplete = "complete" - EvalStatusFailed = "failed" - EvalStatusCancelled = "canceled" -) - -// Evaluation is used to serialize an evaluation. -type Evaluation struct { - ID string - Priority int - Type string - TriggeredBy string - Namespace string - JobID string - JobModifyIndex uint64 - NodeID string - NodeModifyIndex uint64 - DeploymentID string - Status string - StatusDescription string - Wait time.Duration - WaitUntil time.Time - NextEval string - PreviousEval string - BlockedEval string - RelatedEvals []*EvaluationStub - FailedTGAllocs map[string]*AllocationMetric - ClassEligibility map[string]bool - EscapedComputedClass bool - QuotaLimitReached string - AnnotatePlan bool - QueuedAllocations map[string]int - SnapshotIndex uint64 - CreateIndex uint64 - ModifyIndex uint64 - CreateTime int64 - ModifyTime int64 -} - -// EvaluationStub is used to serialize parts of an evaluation returned in the -// RelatedEvals field of an Evaluation. -type EvaluationStub struct { - ID string - Priority int - Type string - TriggeredBy string - Namespace string - JobID string - NodeID string - DeploymentID string - Status string - StatusDescription string - WaitUntil time.Time - NextEval string - PreviousEval string - BlockedEval string - CreateIndex uint64 - ModifyIndex uint64 - CreateTime int64 - ModifyTime int64 -} - -type EvalDeleteRequest struct { - EvalIDs []string - Filter string - WriteRequest -} - -type EvalDeleteResponse struct { - Count int -} - -type EvalCountResponse struct { - Count int - QueryMeta -} - -// EvalIndexSort is a wrapper to sort evaluations by CreateIndex. -// We reverse the test so that we get the highest index first. -type EvalIndexSort []*Evaluation - -func (e EvalIndexSort) Len() int { - return len(e) -} - -func (e EvalIndexSort) Less(i, j int) bool { - return e[i].CreateIndex > e[j].CreateIndex -} - -func (e EvalIndexSort) Swap(i, j int) { - e[i], e[j] = e[j], e[i] -} diff --git a/vendor/github.com/hashicorp/nomad/api/event_stream.go b/vendor/github.com/hashicorp/nomad/api/event_stream.go deleted file mode 100644 index 47523b125e..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/event_stream.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "encoding/json" - "fmt" - "strconv" - "time" - - "github.com/mitchellh/mapstructure" -) - -const ( - TopicDeployment Topic = "Deployment" - TopicEvaluation Topic = "Evaluation" - TopicAllocation Topic = "Allocation" - TopicJob Topic = "Job" - TopicNode Topic = "Node" - TopicNodePool Topic = "NodePool" - TopicService Topic = "Service" - TopicAll Topic = "*" -) - -// Events is a set of events for a corresponding index. Events returned for the -// index depend on which topics are subscribed to when a request is made. -type Events struct { - Index uint64 - Events []Event - Err error -} - -// Topic is an event Topic -type Topic string - -// String is a convenience function which returns the topic as a string type -// representation. -func (t Topic) String() string { return string(t) } - -// Event holds information related to an event that occurred in Nomad. -// The Payload is a hydrated object related to the Topic -type Event struct { - Topic Topic - Type string - Key string - FilterKeys []string - Index uint64 - Payload map[string]interface{} -} - -// Deployment returns a Deployment struct from a given event payload. If the -// Event Topic is Deployment this will return a valid Deployment -func (e *Event) Deployment() (*Deployment, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Deployment, nil -} - -// Evaluation returns a Evaluation struct from a given event payload. If the -// Event Topic is Evaluation this will return a valid Evaluation -func (e *Event) Evaluation() (*Evaluation, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Evaluation, nil -} - -// Allocation returns a Allocation struct from a given event payload. If the -// Event Topic is Allocation this will return a valid Allocation. -func (e *Event) Allocation() (*Allocation, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Allocation, nil -} - -// Job returns a Job struct from a given event payload. If the -// Event Topic is Job this will return a valid Job. -func (e *Event) Job() (*Job, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Job, nil -} - -// Node returns a Node struct from a given event payload. If the -// Event Topic is Node this will return a valid Node. -func (e *Event) Node() (*Node, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Node, nil -} - -// NodePool returns a NodePool struct from a given event payload. If the Event -// Topic is NodePool this will return a valid NodePool. -func (e *Event) NodePool() (*NodePool, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.NodePool, nil -} - -// Service returns a ServiceRegistration struct from a given event payload. If -// the Event Topic is Service this will return a valid ServiceRegistration. -func (e *Event) Service() (*ServiceRegistration, error) { - out, err := e.decodePayload() - if err != nil { - return nil, err - } - return out.Service, nil -} - -type eventPayload struct { - Allocation *Allocation `mapstructure:"Allocation"` - Deployment *Deployment `mapstructure:"Deployment"` - Evaluation *Evaluation `mapstructure:"Evaluation"` - Job *Job `mapstructure:"Job"` - Node *Node `mapstructure:"Node"` - NodePool *NodePool `mapstructure:"NodePool"` - Service *ServiceRegistration `mapstructure:"Service"` -} - -func (e *Event) decodePayload() (*eventPayload, error) { - var out eventPayload - cfg := &mapstructure.DecoderConfig{ - Result: &out, - DecodeHook: mapstructure.StringToTimeHookFunc(time.RFC3339), - } - - dec, err := mapstructure.NewDecoder(cfg) - if err != nil { - return nil, err - } - - if err := dec.Decode(e.Payload); err != nil { - return nil, err - } - - return &out, nil -} - -// IsHeartbeat specifies if the event is an empty heartbeat used to -// keep a connection alive. -func (e *Events) IsHeartbeat() bool { - return e.Index == 0 && len(e.Events) == 0 -} - -// EventStream is used to stream events from Nomad -type EventStream struct { - client *Client -} - -// EventStream returns a handle to the Events endpoint -func (c *Client) EventStream() *EventStream { - return &EventStream{client: c} -} - -// Stream establishes a new subscription to Nomad's event stream and streams -// results back to the returned channel. -func (e *EventStream) Stream(ctx context.Context, topics map[Topic][]string, index uint64, q *QueryOptions) (<-chan *Events, error) { - r, err := e.client.newRequest("GET", "/v1/event/stream") - if err != nil { - return nil, err - } - q = q.WithContext(ctx) - if q.Params == nil { - q.Params = map[string]string{} - } - q.Params["index"] = strconv.FormatUint(index, 10) - r.setQueryOptions(q) - - // Build topic query params - for topic, keys := range topics { - for _, k := range keys { - r.params.Add("topic", fmt.Sprintf("%s:%s", topic, k)) - } - } - - _, resp, err := requireOK(e.client.doRequest(r)) //nolint:bodyclose - - if err != nil { - return nil, err - } - - eventsCh := make(chan *Events, 10) - go func() { - defer resp.Body.Close() - defer close(eventsCh) - - dec := json.NewDecoder(resp.Body) - - for ctx.Err() == nil { - // Decode next newline delimited json of events - var events Events - if err := dec.Decode(&events); err != nil { - // set error and fallthrough to - // select eventsCh - events = Events{Err: err} - } - if events.Err == nil && events.IsHeartbeat() { - continue - } - - select { - case <-ctx.Done(): - return - case eventsCh <- &events: - } - } - }() - - return eventsCh, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/fs.go b/vendor/github.com/hashicorp/nomad/api/fs.go deleted file mode 100644 index 8e65f60ab1..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/fs.go +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "fmt" - "io" - "net" - "strconv" - "sync" - "time" - - "github.com/hashicorp/go-multierror" -) - -const ( - // OriginStart and OriginEnd are the available parameters for the origin - // argument when streaming a file. They respectively offset from the start - // and end of a file. - OriginStart = "start" - OriginEnd = "end" - - // FSLogNameStdout is the name given to the stdout log stream of a task. It - // can be used when calling AllocFS.Logs as the logType parameter. - FSLogNameStdout = "stdout" - - // FSLogNameStderr is the name given to the stderr log stream of a task. It - // can be used when calling AllocFS.Logs as the logType parameter. - FSLogNameStderr = "stderr" -) - -// AllocFileInfo holds information about a file inside the AllocDir -type AllocFileInfo struct { - Name string - IsDir bool - Size int64 - FileMode string - ModTime time.Time - ContentType string -} - -// StreamFrame is used to frame data of a file when streaming -type StreamFrame struct { - Offset int64 `json:",omitempty"` - Data []byte `json:",omitempty"` - File string `json:",omitempty"` - FileEvent string `json:",omitempty"` -} - -// IsHeartbeat returns if the frame is a heartbeat frame -func (s *StreamFrame) IsHeartbeat() bool { - return len(s.Data) == 0 && s.FileEvent == "" && s.File == "" && s.Offset == 0 -} - -// AllocFS is used to introspect an allocation directory on a Nomad client -type AllocFS struct { - client *Client -} - -// AllocFS returns an handle to the AllocFS endpoints -func (c *Client) AllocFS() *AllocFS { - return &AllocFS{client: c} -} - -// List is used to list the files at a given path of an allocation directory. -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) List(alloc *Allocation, path string, q *QueryOptions) ([]*AllocFileInfo, *QueryMeta, error) { - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - q.Params["path"] = path - - var resp []*AllocFileInfo - qm, err := a.client.query(fmt.Sprintf("/v1/client/fs/ls/%s", alloc.ID), &resp, q) - if err != nil { - return nil, nil, err - } - - return resp, qm, nil -} - -// Stat is used to stat a file at a given path of an allocation directory. -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) Stat(alloc *Allocation, path string, q *QueryOptions) (*AllocFileInfo, *QueryMeta, error) { - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - - q.Params["path"] = path - - var resp AllocFileInfo - qm, err := a.client.query(fmt.Sprintf("/v1/client/fs/stat/%s", alloc.ID), &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ReadAt is used to read bytes at a given offset until limit at the given path -// in an allocation directory. If limit is <= 0, there is no limit. -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) ReadAt(alloc *Allocation, path string, offset int64, limit int64, q *QueryOptions) (io.ReadCloser, error) { - reqPath := fmt.Sprintf("/v1/client/fs/readat/%s", alloc.ID) - - return queryClientNode(a.client, alloc, reqPath, q, - func(q *QueryOptions) { - q.Params["path"] = path - q.Params["offset"] = strconv.FormatInt(offset, 10) - q.Params["limit"] = strconv.FormatInt(limit, 10) - }) -} - -// Cat is used to read contents of a file at the given path in an allocation -// directory. -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) Cat(alloc *Allocation, path string, q *QueryOptions) (io.ReadCloser, error) { - reqPath := fmt.Sprintf("/v1/client/fs/cat/%s", alloc.ID) - return queryClientNode(a.client, alloc, reqPath, q, - func(q *QueryOptions) { - q.Params["path"] = path - }) -} - -// Stream streams the content of a file blocking on EOF. -// The parameters are: -// * path: path to file to stream. -// * offset: The offset to start streaming data at. -// * origin: Either "start" or "end" and defines from where the offset is applied. -// * cancel: A channel that when closed, streaming will end. -// -// The return value is a channel that will emit StreamFrames as they are read. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) Stream(alloc *Allocation, path, origin string, offset int64, - cancel <-chan struct{}, q *QueryOptions) (<-chan *StreamFrame, <-chan error) { - - errCh := make(chan error, 1) - - reqPath := fmt.Sprintf("/v1/client/fs/stream/%s", alloc.ID) - r, err := queryClientNode(a.client, alloc, reqPath, q, - func(q *QueryOptions) { - q.Params["path"] = path - q.Params["offset"] = strconv.FormatInt(offset, 10) - q.Params["origin"] = origin - }) - if err != nil { - errCh <- err - return nil, errCh - } - - // Create the output channel - frames := make(chan *StreamFrame, 10) - - go func() { - // Close the body - defer r.Close() - - // Create a decoder - dec := json.NewDecoder(r) - - for { - // Check if we have been cancelled - select { - case <-cancel: - return - default: - } - - // Decode the next frame - var frame StreamFrame - if err := dec.Decode(&frame); err != nil { - errCh <- err - close(frames) - return - } - - // Discard heartbeat frames - if frame.IsHeartbeat() { - continue - } - - frames <- &frame - } - }() - - return frames, errCh -} - -func queryClientNode(c *Client, alloc *Allocation, reqPath string, q *QueryOptions, customizeQ func(*QueryOptions)) (io.ReadCloser, error) { - nodeClient, _ := c.GetNodeClientWithTimeout(alloc.NodeID, ClientConnTimeout, q) - - if q == nil { - q = &QueryOptions{} - } - if q.Params == nil { - q.Params = make(map[string]string) - } - if customizeQ != nil { - customizeQ(q) - } - - var r io.ReadCloser - var err error - - if nodeClient != nil { - r, err = nodeClient.rawQuery(reqPath, q) - if _, ok := err.(net.Error); err != nil && !ok { - // found a non networking error talking to client directly - return nil, err - } - - } - - // failed to query node, access through server directly - // or network error when talking to the client directly - if r == nil { - return c.rawQuery(reqPath, q) - } - - return r, err -} - -// Logs streams the content of a tasks logs blocking on EOF. -// The parameters are: -// * allocation: the allocation to stream from. -// * follow: Whether the logs should be followed. -// * task: the tasks name to stream logs for. -// * logType: Either "stdout" or "stderr" -// * origin: Either "start" or "end" and defines from where the offset is applied. -// * offset: The offset to start streaming data at. -// * cancel: A channel that when closed, streaming will end. -// -// The return value is a channel that will emit StreamFrames as they are read. -// The chan will be closed when follow=false and the end of the file is -// reached. -// -// Unexpected (non-EOF) errors will be sent on the error chan. -// -// Note: for cluster topologies where API consumers don't have network access to -// Nomad clients, set api.ClientConnTimeout to a small value (ex 1ms) to avoid -// long pauses on this API call. -func (a *AllocFS) Logs(alloc *Allocation, follow bool, task, logType, origin string, - offset int64, cancel <-chan struct{}, q *QueryOptions) (<-chan *StreamFrame, <-chan error) { - - errCh := make(chan error, 1) - - reqPath := fmt.Sprintf("/v1/client/fs/logs/%s", alloc.ID) - r, err := queryClientNode(a.client, alloc, reqPath, q, - func(q *QueryOptions) { - q.Params["follow"] = strconv.FormatBool(follow) - q.Params["task"] = task - q.Params["type"] = logType - q.Params["origin"] = origin - q.Params["offset"] = strconv.FormatInt(offset, 10) - }) - if err != nil { - errCh <- err - return nil, errCh - } - - // Create the output channel - frames := make(chan *StreamFrame, 10) - - go func() { - // Close the body - defer r.Close() - - // Create a decoder - dec := json.NewDecoder(r) - - for { - // Check if we have been cancelled - select { - case <-cancel: - close(frames) - return - default: - } - - // Decode the next frame - var frame StreamFrame - if err := dec.Decode(&frame); err != nil { - if err == io.EOF || err == io.ErrClosedPipe { - close(frames) - } else { - buf, err2 := io.ReadAll(dec.Buffered()) - if err2 != nil { - errCh <- fmt.Errorf("failed to decode and failed to read buffered data: %w", multierror.Append(err, err2)) - } else { - errCh <- fmt.Errorf("failed to decode log endpoint response as JSON: %q", buf) - } - } - return - } - - // Discard heartbeat frames - if frame.IsHeartbeat() { - continue - } - - frames <- &frame - } - }() - - return frames, errCh -} - -// FrameReader is used to convert a stream of frames into a read closer. -type FrameReader struct { - frames <-chan *StreamFrame - errCh <-chan error - cancelCh chan struct{} - - closedLock sync.Mutex - closed bool - - unblockTime time.Duration - - frame *StreamFrame - frameOffset int - - byteOffset int -} - -// NewFrameReader takes a channel of frames and returns a FrameReader which -// implements io.ReadCloser -func NewFrameReader(frames <-chan *StreamFrame, errCh <-chan error, cancelCh chan struct{}) *FrameReader { - return &FrameReader{ - frames: frames, - errCh: errCh, - cancelCh: cancelCh, - } -} - -// SetUnblockTime sets the time to unblock and return zero bytes read. If the -// duration is unset or is zero or less, the read will block until data is read. -func (f *FrameReader) SetUnblockTime(d time.Duration) { - f.unblockTime = d -} - -// Offset returns the offset into the stream. -func (f *FrameReader) Offset() int { - return f.byteOffset -} - -// Read reads the data of the incoming frames into the bytes buffer. Returns EOF -// when there are no more frames. -func (f *FrameReader) Read(p []byte) (n int, err error) { - f.closedLock.Lock() - closed := f.closed - f.closedLock.Unlock() - if closed { - return 0, io.EOF - } - - if f.frame == nil { - var unblock <-chan time.Time - if f.unblockTime.Nanoseconds() > 0 { - unblock = time.After(f.unblockTime) - } - - select { - case frame, ok := <-f.frames: - if !ok { - return 0, io.EOF - } - f.frame = frame - - // Store the total offset into the file - f.byteOffset = int(f.frame.Offset) - case <-unblock: - return 0, nil - case err := <-f.errCh: - // check for race with f.frames before returning error - select { - case frame, ok := <-f.frames: - if !ok { - return 0, io.EOF - } - f.frame = frame - - // Store the total offset into the file - f.byteOffset = int(f.frame.Offset) - default: - return 0, err - } - case <-f.cancelCh: - return 0, io.EOF - } - } - // Copy the data out of the frame and update our offset - n = copy(p, f.frame.Data[f.frameOffset:]) - f.frameOffset += n - - // Clear the frame and its offset once we have read everything - if len(f.frame.Data) == f.frameOffset { - f.frame = nil - f.frameOffset = 0 - } - - return n, nil -} - -// Close cancels the stream of frames -func (f *FrameReader) Close() error { - f.closedLock.Lock() - defer f.closedLock.Unlock() - if f.closed { - return nil - } - - close(f.cancelCh) - f.closed = true - return nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/host_volume_claims.go b/vendor/github.com/hashicorp/nomad/api/host_volume_claims.go deleted file mode 100644 index 1b7bf82f31..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/host_volume_claims.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "net/url" - -// TaskGroupHostVolumeClaim associates a task group with a host volume ID. It's -// used for stateful deployments, i.e., volume requests with "sticky" set to -// true. -type TaskGroupHostVolumeClaim struct { - ID string `mapstructure:"id"` - Namespace string `mapstructure:"namespace"` - JobID string `mapstructure:"job_id"` - TaskGroupName string `mapstructure:"task_group_name"` - AllocID string `mapstructure:"alloc_id"` - VolumeID string `mapstructure:"volume_id"` - VolumeName string `mapstructure:"volume_name"` - - CreateIndex uint64 - ModifyIndex uint64 -} - -// TaskGroupHostVolumeClaims is used to access the API. -type TaskGroupHostVolumeClaims struct { - client *Client -} - -// TaskGroupHostVolumeClaims returns a new handle on the API. -func (c *Client) TaskGroupHostVolumeClaims() *TaskGroupHostVolumeClaims { - return &TaskGroupHostVolumeClaims{client: c} -} - -type TaskGroupHostVolumeClaimsListRequest struct { - JobID string - TaskGroup string - VolumeName string -} - -func (tgvc *TaskGroupHostVolumeClaims) List(req *TaskGroupHostVolumeClaimsListRequest, opts *QueryOptions) ([]*TaskGroupHostVolumeClaim, *QueryMeta, error) { - - qv := url.Values{} - if req != nil { - if req.JobID != "" { - qv.Set("job_id", req.JobID) - } - if req.TaskGroup != "" { - qv.Set("task_group", req.TaskGroup) - } - if req.VolumeName != "" { - qv.Set("volume_name", req.VolumeName) - } - } - - var out []*TaskGroupHostVolumeClaim - qm, err := tgvc.client.query("/v1/volumes/claims?"+qv.Encode(), &out, opts) - if err != nil { - return nil, qm, err - } - return out, qm, nil -} - -func (tgvc *TaskGroupHostVolumeClaims) Delete(claimID string, opts *WriteOptions) (*WriteMeta, error) { - path, err := url.JoinPath("/v1/volumes/claim", url.PathEscape(claimID)) - if err != nil { - return nil, err - } - wm, err := tgvc.client.delete(path, nil, nil, opts) - return wm, err -} diff --git a/vendor/github.com/hashicorp/nomad/api/host_volumes.go b/vendor/github.com/hashicorp/nomad/api/host_volumes.go deleted file mode 100644 index f43b6eaa46..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/host_volumes.go +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "net/url" - -// HostVolume represents a Dynamic Host Volume: a volume associated with a -// specific Nomad client agent but created via API. -type HostVolume struct { - // Namespace is the Nomad namespace for the host volume, which constrains - // which jobs can mount it. - Namespace string `mapstructure:"namespace" hcl:"namespace"` - - // ID is a UUID-like string generated by the server. - ID string `mapstructure:"id" hcl:"id"` - - // Name is the name that group.volume will use to identify the volume - // source. Not expected to be unique. - Name string `mapstructure:"name" hcl:"name"` - - // PluginID is the name of the host volume plugin on the client that will be - // used for creating the volume. If omitted, the client will use its default - // built-in plugin. - PluginID string `mapstructure:"plugin_id" hcl:"plugin_id"` - - // NodePool is the node pool of the node where the volume is placed. If the - // user doesn't provide a node ID, a node will be selected using the - // NodePool and Constraints. If the user provides both NodePool and NodeID, - // NodePool will be used to validate the request. If omitted, the server - // will populate this value in before writing the volume to Raft. - NodePool string `mapstructure:"node_pool" hcl:"node_pool"` - - // NodeID is the node where the volume is placed. If the user doesn't - // provide a NodeID, one will be selected using the NodePool and - // Constraints. If omitted, this field will then be populated by the server - // before writing the volume to Raft. - NodeID string `mapstructure:"node_id" hcl:"node_id"` - - // Constraints are optional. If the NodeID is not provided, the NodePool and - // Constraints are used to select a node. If the NodeID is provided, - // Constraints are used to validate that the node meets those constraints at - // the time of volume creation. - Constraints []*Constraint `json:",omitempty" hcl:"constraint"` - - // Because storage may allow only specific intervals of size, we accept a - // min and max and return the actual capacity when the volume is created or - // updated on the client - RequestedCapacityMinBytes int64 `mapstructure:"capacity_min" hcl:"capacity_min"` - RequestedCapacityMaxBytes int64 `mapstructure:"capacity_max" hcl:"capacity_max"` - CapacityBytes int64 `mapstructure:"capacity" hcl:"capacity"` - - // RequestedCapabilities defines the options available to group.volume - // blocks. The scheduler checks against the listed capability blocks and - // selects a node for placement if *any* capability block works. - RequestedCapabilities []*HostVolumeCapability `hcl:"capability"` - - // Parameters are an opaque map of parameters for the host volume plugin. - Parameters map[string]string `json:",omitempty"` - - // HostPath is the path on disk where the volume's mount point was - // created. We record this to make debugging easier. - HostPath string `mapstructure:"host_path" hcl:"host_path"` - - // State represents the overall state of the volume. One of pending, ready, - // deleted. - State HostVolumeState - - CreateIndex uint64 - CreateTime int64 - - ModifyIndex uint64 - ModifyTime int64 - - // Allocations is the list of non-client-terminal allocations with claims on - // this host volume. They are denormalized on read and this field will be - // never written to Raft - Allocations []*AllocationListStub `json:",omitempty" mapstructure:"-" hcl:"-"` -} - -// HostVolume state reports the current status of the host volume -type HostVolumeState string - -const ( - HostVolumeStatePending HostVolumeState = "pending" - HostVolumeStateReady HostVolumeState = "ready" - HostVolumeStateUnavailable HostVolumeState = "unavailable" -) - -// HostVolumeCapability is the requested attachment and access mode for a volume -type HostVolumeCapability struct { - AttachmentMode HostVolumeAttachmentMode `mapstructure:"attachment_mode" hcl:"attachment_mode"` - AccessMode HostVolumeAccessMode `mapstructure:"access_mode" hcl:"access_mode"` -} - -// HostVolumeAttachmentMode chooses the type of storage API that will be used to -// interact with the device. -type HostVolumeAttachmentMode string - -const ( - HostVolumeAttachmentModeUnknown HostVolumeAttachmentMode = "" - HostVolumeAttachmentModeBlockDevice HostVolumeAttachmentMode = "block-device" - HostVolumeAttachmentModeFilesystem HostVolumeAttachmentMode = "file-system" -) - -// HostVolumeAccessMode indicates how Nomad should make the volume available to -// concurrent allocations. -type HostVolumeAccessMode string - -const ( - HostVolumeAccessModeUnknown HostVolumeAccessMode = "" - - HostVolumeAccessModeSingleNodeReader HostVolumeAccessMode = "single-node-reader-only" - HostVolumeAccessModeSingleNodeWriter HostVolumeAccessMode = "single-node-writer" - HostVolumeAccessModeSingleNodeSingleWriter HostVolumeAccessMode = "single-node-single-writer" - HostVolumeAccessModeSingleNodeMultiWriter HostVolumeAccessMode = "single-node-multi-writer" -) - -// HostVolumeStub is used for responses for the List Volumes endpoint -type HostVolumeStub struct { - Namespace string - ID string - Name string - PluginID string - NodePool string - NodeID string - CapacityBytes int64 - State HostVolumeState - - CreateIndex uint64 - CreateTime int64 - - ModifyIndex uint64 - ModifyTime int64 -} - -// HostVolumes is used to access the host volumes API. -type HostVolumes struct { - client *Client -} - -// HostVolumes returns a new handle on the host volumes API. -func (c *Client) HostVolumes() *HostVolumes { - return &HostVolumes{client: c} -} - -type HostVolumeCreateRequest struct { - Volume *HostVolume - - // PolicyOverride overrides Sentinel soft-mandatory policy enforcement - PolicyOverride bool -} - -type HostVolumeRegisterRequest struct { - Volume *HostVolume - - // PolicyOverride overrides Sentinel soft-mandatory policy enforcement - PolicyOverride bool -} - -type HostVolumeCreateResponse struct { - Volume *HostVolume - Warnings string -} - -type HostVolumeRegisterResponse struct { - Volume *HostVolume - Warnings string -} - -type HostVolumeListRequest struct { - NodeID string - NodePool string -} - -type HostVolumeDeleteRequest struct { - ID string - Force bool -} - -type HostVolumeDeleteResponse struct{} - -// Create forwards to client agents so a host volume can be created on those -// hosts, and registers the volume with Nomad servers. -func (hv *HostVolumes) Create(req *HostVolumeCreateRequest, opts *WriteOptions) (*HostVolumeCreateResponse, *WriteMeta, error) { - var out *HostVolumeCreateResponse - wm, err := hv.client.put("/v1/volume/host/create", req, &out, opts) - if err != nil { - return nil, wm, err - } - return out, wm, nil -} - -// Register registers a host volume that was created out-of-band with the Nomad -// servers. -func (hv *HostVolumes) Register(req *HostVolumeRegisterRequest, opts *WriteOptions) (*HostVolumeRegisterResponse, *WriteMeta, error) { - var out *HostVolumeRegisterResponse - wm, err := hv.client.put("/v1/volume/host/register", req, &out, opts) - if err != nil { - return nil, wm, err - } - return out, wm, nil -} - -// Get queries for a single host volume, by ID -func (hv *HostVolumes) Get(id string, opts *QueryOptions) (*HostVolume, *QueryMeta, error) { - var out *HostVolume - path, err := url.JoinPath("/v1/volume/host/", url.PathEscape(id)) - if err != nil { - return nil, nil, err - } - qm, err := hv.client.query(path, &out, opts) - if err != nil { - return nil, qm, err - } - return out, qm, nil -} - -// List queries for a set of host volumes, by namespace, node, node pool, or -// name prefix. -func (hv *HostVolumes) List(req *HostVolumeListRequest, opts *QueryOptions) ([]*HostVolumeStub, *QueryMeta, error) { - var out []*HostVolumeStub - qv := url.Values{} - qv.Set("type", "host") - if req != nil { - if req.NodeID != "" { - qv.Set("node_id", req.NodeID) - } - if req.NodePool != "" { - qv.Set("node_pool", req.NodePool) - } - } - - qm, err := hv.client.query("/v1/volumes?"+qv.Encode(), &out, opts) - if err != nil { - return nil, qm, err - } - return out, qm, nil -} - -// Delete deletes a host volume -func (hv *HostVolumes) Delete(req *HostVolumeDeleteRequest, opts *WriteOptions) (*HostVolumeDeleteResponse, *WriteMeta, error) { - var resp *HostVolumeDeleteResponse - path, err := url.JoinPath("/v1/volume/host/", url.PathEscape(req.ID)) - if err != nil { - return nil, nil, err - } - if req.Force { - path = path + "?force=true" - } - wm, err := hv.client.delete(path, nil, resp, opts) - return resp, wm, err -} diff --git a/vendor/github.com/hashicorp/nomad/api/ioutil.go b/vendor/github.com/hashicorp/nomad/api/ioutil.go deleted file mode 100644 index 6e75981532..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/ioutil.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "crypto/md5" - "crypto/sha256" - "crypto/sha512" - "encoding/base64" - "errors" - "hash" - "io" - "strings" -) - -var errMismatchChecksum = errors.New("mismatch checksum") - -// checksumValidatingReader is a wrapper reader that validates -// the checksum of the underlying reader. -type checksumValidatingReader struct { - r io.ReadCloser - - // algo is the hash algorithm (e.g. `sha-256`) - algo string - - // checksum is the base64 component of checksum - checksum string - - // hash is the hashing function used to compute the checksum - hash hash.Hash -} - -// newChecksumValidatingReader returns a checksum-validating wrapper reader, according -// to a digest received in HTTP header -// -// The digest must be in the format "=" (e.g. "sha-256=gPelGB7..."). -// -// When the reader is fully consumed (i.e. EOT is encountered), if the checksum don't match, -// `Read` returns a checksum mismatch error. -func newChecksumValidatingReader(r io.ReadCloser, digest string) (io.ReadCloser, error) { - parts := strings.SplitN(digest, "=", 2) - if len(parts) != 2 { - return nil, errors.New("invalid digest format") - } - - algo := parts[0] - var hash hash.Hash - switch algo { - case "sha-256": - hash = sha256.New() - case "sha-512": - hash = sha512.New() - case "md5": - hash = md5.New() - } - - return &checksumValidatingReader{ - r: r, - algo: algo, - checksum: parts[1], - hash: hash, - }, nil -} - -func (r *checksumValidatingReader) Read(b []byte) (int, error) { - n, err := r.r.Read(b) - if n != 0 { - r.hash.Write(b[:n]) - } - - if err == io.EOF || err == io.ErrClosedPipe { - found := base64.StdEncoding.EncodeToString(r.hash.Sum(nil)) - if found != r.checksum { - return n, errMismatchChecksum - } - } - - return n, err -} - -func (r *checksumValidatingReader) Close() error { - return r.r.Close() -} diff --git a/vendor/github.com/hashicorp/nomad/api/jobs.go b/vendor/github.com/hashicorp/nomad/api/jobs.go deleted file mode 100644 index fce39ac464..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/jobs.go +++ /dev/null @@ -1,1713 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "errors" - "fmt" - "io" - "maps" - "net/url" - "sort" - "strconv" - "time" - - "github.com/hashicorp/cronexpr" -) - -const ( - // JobTypeService indicates a long-running processes - JobTypeService = "service" - - // JobTypeBatch indicates a short-lived process - JobTypeBatch = "batch" - - // JobTypeSystem indicates a system process that should run on all clients - JobTypeSystem = "system" - - // JobTypeSysbatch indicates a short-lived system process that should run - // on all clients. - JobTypeSysbatch = "sysbatch" - - // JobDefaultPriority is the default priority if not specified. - JobDefaultPriority = 50 - - // PeriodicSpecCron is used for a cron spec. - PeriodicSpecCron = "cron" - - // DefaultNamespace is the default namespace. - DefaultNamespace = "default" - - // For Job configuration, GlobalRegion is a sentinel region value - // that users may specify to indicate the job should be run on - // the region of the node that the job was submitted to. - // For Client configuration, if no region information is given, - // the client node will default to be part of the GlobalRegion. - GlobalRegion = "global" -) - -const ( - // RegisterEnforceIndexErrPrefix is the prefix to use in errors caused by - // enforcing the job modify index during registers. - RegisterEnforceIndexErrPrefix = "Enforcing job modify index" -) - -const ( - // JobPeriodicLaunchSuffix is the string appended to the periodic jobs ID - // when launching derived instances of it. - JobPeriodicLaunchSuffix = "/periodic-" - - // JobDispatchLaunchSuffix is the string appended to the parameterized job's ID - // when dispatching instances of it. - JobDispatchLaunchSuffix = "/dispatch-" -) - -// Jobs is used to access the job-specific endpoints. -type Jobs struct { - client *Client -} - -// JobsParseRequest is used for arguments of the /v1/jobs/parse endpoint -type JobsParseRequest struct { - // JobHCL is an hcl jobspec - JobHCL string - - // Variables are HCL2 variables associated with the job. Only works with hcl2. - // - // Interpreted as if it were the content of a variables file. - Variables string - - // Canonicalize is a flag as to if the server should return default values - // for unset fields - Canonicalize bool -} - -// Jobs returns a handle on the jobs endpoints. -func (c *Client) Jobs() *Jobs { - return &Jobs{client: c} -} - -// ParseHCL is used to convert the HCL representation of a Job to JSON server side. -// To parse the HCL client side see package github.com/hashicorp/nomad/jobspec -// Use ParseHCLOpts if you need to customize JobsParseRequest. -func (j *Jobs) ParseHCL(jobHCL string, canonicalize bool) (*Job, error) { - req := &JobsParseRequest{ - JobHCL: jobHCL, - Canonicalize: canonicalize, - } - return j.ParseHCLOpts(req) -} - -// ParseHCLOpts is used to request the server convert the HCL representation of a -// Job to JSON on our behalf. Only accepts HCL2 jobs as input. -func (j *Jobs) ParseHCLOpts(req *JobsParseRequest) (*Job, error) { - var job Job - _, err := j.client.put("/v1/jobs/parse", req, &job, nil) - return &job, err -} - -func (j *Jobs) Validate(job *Job, q *WriteOptions) (*JobValidateResponse, *WriteMeta, error) { - var resp JobValidateResponse - req := &JobValidateRequest{Job: job} - if q != nil { - req.WriteRequest = WriteRequest{Region: q.Region} - } - wm, err := j.client.put("/v1/validate/job", req, &resp, q) - return &resp, wm, err -} - -// RegisterOptions is used to pass through job registration parameters -type RegisterOptions struct { - EnforceIndex bool - ModifyIndex uint64 - PolicyOverride bool - PreserveCounts bool - EvalPriority int - Submission *JobSubmission -} - -// Register is used to register a new job. It returns the ID -// of the evaluation, along with any errors encountered. -func (j *Jobs) Register(job *Job, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) { - return j.RegisterOpts(job, nil, q) -} - -// EnforceRegister is used to register a job enforcing its job modify index. -func (j *Jobs) EnforceRegister(job *Job, modifyIndex uint64, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) { - opts := RegisterOptions{EnforceIndex: true, ModifyIndex: modifyIndex} - return j.RegisterOpts(job, &opts, q) -} - -// RegisterOpts is used to register a new job with the passed RegisterOpts. It -// returns the ID of the evaluation, along with any errors encountered. -func (j *Jobs) RegisterOpts(job *Job, opts *RegisterOptions, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) { - // Format the request - req := &JobRegisterRequest{Job: job} - if opts != nil { - if opts.EnforceIndex { - req.EnforceIndex = true - req.JobModifyIndex = opts.ModifyIndex - } - req.PolicyOverride = opts.PolicyOverride - req.PreserveCounts = opts.PreserveCounts - req.EvalPriority = opts.EvalPriority - req.Submission = opts.Submission - } - - var resp JobRegisterResponse - wm, err := j.client.put("/v1/jobs", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -type JobListFields struct { - Meta bool -} -type JobListOptions struct { - Fields *JobListFields -} - -// List is used to list all of the existing jobs. -func (j *Jobs) List(q *QueryOptions) ([]*JobListStub, *QueryMeta, error) { - return j.ListOptions(nil, q) -} - -// ListOptions is used to list all of the existing jobs. -func (j *Jobs) ListOptions(opts *JobListOptions, q *QueryOptions) ([]*JobListStub, *QueryMeta, error) { - var resp []*JobListStub - - destinationURL := "/v1/jobs" - - if opts != nil && opts.Fields != nil { - qp := url.Values{} - qp.Add("meta", fmt.Sprint(opts.Fields.Meta)) - destinationURL = destinationURL + "?" + qp.Encode() - } - - qm, err := j.client.query(destinationURL, &resp, q) - if err != nil { - return nil, qm, err - } - sort.Sort(JobIDSort(resp)) - return resp, qm, nil -} - -// PrefixList is used to list all existing jobs that match the prefix. -func (j *Jobs) PrefixList(prefix string) ([]*JobListStub, *QueryMeta, error) { - return j.List(&QueryOptions{Prefix: prefix}) -} - -// Info is used to retrieve information about a particular -// job given its unique ID. -func (j *Jobs) Info(jobID string, q *QueryOptions) (*Job, *QueryMeta, error) { - var resp Job - qm, err := j.client.query("/v1/job/"+url.PathEscape(jobID), &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Scale is used to scale a job. -func (j *Jobs) Scale(jobID, group string, count *int, message string, error bool, meta map[string]interface{}, - q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) { - - var count64 *int64 - if count != nil { - count64 = pointerOf(int64(*count)) - } - req := &ScalingRequest{ - Count: count64, - Target: map[string]string{ - "Job": jobID, - "Group": group, - }, - Error: error, - Message: message, - Meta: meta, - } - var resp JobRegisterResponse - qm, err := j.client.put(fmt.Sprintf("/v1/job/%s/scale", url.PathEscape(jobID)), req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ScaleWithRequest is used to scale a job, giving the caller complete control -// over the ScalingRequest -func (j *Jobs) ScaleWithRequest(jobID string, req *ScalingRequest, q *WriteOptions) (*JobRegisterResponse, *WriteMeta, error) { - var resp JobRegisterResponse - qm, err := j.client.put(fmt.Sprintf("/v1/job/%s/scale", url.PathEscape(jobID)), req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// ScaleStatus is used to retrieve information about a particular -// job given its unique ID. -func (j *Jobs) ScaleStatus(jobID string, q *QueryOptions) (*JobScaleStatusResponse, *QueryMeta, error) { - var resp JobScaleStatusResponse - qm, err := j.client.query(fmt.Sprintf("/v1/job/%s/scale", url.PathEscape(jobID)), &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Versions is used to retrieve all versions of a particular job given its -// unique ID. -func (j *Jobs) Versions(jobID string, diffs bool, q *QueryOptions) ([]*Job, []*JobDiff, *QueryMeta, error) { - opts := &VersionsOptions{ - Diffs: diffs, - } - return j.VersionsOpts(jobID, opts, q) -} - -// VersionByTag is used to retrieve a job version by its VersionTag name. -func (j *Jobs) VersionByTag(jobID, tag string, q *QueryOptions) (*Job, *QueryMeta, error) { - versions, _, qm, err := j.Versions(jobID, false, q) - if err != nil { - return nil, nil, err - } - - // Find the version with the matching tag - for _, version := range versions { - if version.VersionTag != nil && version.VersionTag.Name == tag { - return version, qm, nil - } - } - - return nil, nil, fmt.Errorf("version tag %s not found for job %s", tag, jobID) -} - -type VersionsOptions struct { - Diffs bool - DiffTag string - DiffVersion *uint64 -} - -func (j *Jobs) VersionsOpts(jobID string, opts *VersionsOptions, q *QueryOptions) ([]*Job, []*JobDiff, *QueryMeta, error) { - var resp JobVersionsResponse - - qp := url.Values{} - if opts != nil { - qp.Add("diffs", strconv.FormatBool(opts.Diffs)) - if opts.DiffTag != "" { - qp.Add("diff_tag", opts.DiffTag) - } - if opts.DiffVersion != nil { - qp.Add("diff_version", strconv.FormatUint(*opts.DiffVersion, 10)) - } - } - - qm, err := j.client.query(fmt.Sprintf("/v1/job/%s/versions?%s", url.PathEscape(jobID), qp.Encode()), &resp, q) - if err != nil { - return nil, nil, nil, err - } - return resp.Versions, resp.Diffs, qm, nil -} - -// Submission is used to retrieve the original submitted source of a job given its -// namespace, jobID, and version number. The original source might not be available, -// which case nil is returned with no error. -func (j *Jobs) Submission(jobID string, version int, q *QueryOptions) (*JobSubmission, *QueryMeta, error) { - var sub JobSubmission - s := fmt.Sprintf("/v1/job/%s/submission?version=%d", url.PathEscape(jobID), version) - qm, err := j.client.query(s, &sub, q) - if err != nil { - return nil, nil, err - } - - return &sub, qm, nil -} - -// Allocations is used to return the allocs for a given job ID. -func (j *Jobs) Allocations(jobID string, allAllocs bool, q *QueryOptions) ([]*AllocationListStub, *QueryMeta, error) { - var resp []*AllocationListStub - u, err := url.Parse("/v1/job/" + url.PathEscape(jobID) + "/allocations") - if err != nil { - return nil, nil, err - } - - v := u.Query() - v.Add("all", strconv.FormatBool(allAllocs)) - u.RawQuery = v.Encode() - - qm, err := j.client.query(u.String(), &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(AllocIndexSort(resp)) - return resp, qm, nil -} - -// Deployments is used to query the deployments associated with the given job -// ID. -func (j *Jobs) Deployments(jobID string, all bool, q *QueryOptions) ([]*Deployment, *QueryMeta, error) { - var resp []*Deployment - u, err := url.Parse("/v1/job/" + url.PathEscape(jobID) + "/deployments") - if err != nil { - return nil, nil, err - } - - v := u.Query() - v.Add("all", strconv.FormatBool(all)) - u.RawQuery = v.Encode() - qm, err := j.client.query(u.String(), &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(DeploymentIndexSort(resp)) - return resp, qm, nil -} - -// LatestDeployment is used to query for the latest deployment associated with -// the given job ID. -func (j *Jobs) LatestDeployment(jobID string, q *QueryOptions) (*Deployment, *QueryMeta, error) { - var resp *Deployment - qm, err := j.client.query("/v1/job/"+url.PathEscape(jobID)+"/deployment", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Evaluations is used to query the evaluations associated with the given job -// ID. -func (j *Jobs) Evaluations(jobID string, q *QueryOptions) ([]*Evaluation, *QueryMeta, error) { - var resp []*Evaluation - qm, err := j.client.query("/v1/job/"+url.PathEscape(jobID)+"/evaluations", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(EvalIndexSort(resp)) - return resp, qm, nil -} - -// Deregister is used to remove an existing job. If purge is set to true, the job -// is deregistered and purged from the system versus still being queryable and -// eventually GC'ed from the system. Most callers should not specify purge. -func (j *Jobs) Deregister(jobID string, purge bool, q *WriteOptions) (string, *WriteMeta, error) { - var resp JobDeregisterResponse - wm, err := j.client.delete(fmt.Sprintf("/v1/job/%v?purge=%t", url.PathEscape(jobID), purge), nil, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -// DeregisterOptions is used to pass through job deregistration parameters -type DeregisterOptions struct { - // If Purge is set to true, the job is deregistered and purged from the - // system versus still being queryable and eventually GC'ed from the - // system. Most callers should not specify purge. - Purge bool - - // If Global is set to true, all regions of a multiregion job will be - // stopped. - Global bool - - // EvalPriority is an optional priority to use on any evaluation created as - // a result on this job deregistration. This value must be between 1-100 - // inclusively, where a larger value corresponds to a higher priority. This - // is useful when an operator wishes to push through a job deregistration - // in busy clusters with a large evaluation backlog. - EvalPriority int - - // NoShutdownDelay, if set to true, will override the group and - // task shutdown_delay configuration and ignore the delay for any - // allocations stopped as a result of this Deregister call. - NoShutdownDelay bool -} - -// DeregisterOpts is used to remove an existing job. See DeregisterOptions -// for parameters. -func (j *Jobs) DeregisterOpts(jobID string, opts *DeregisterOptions, q *WriteOptions) (string, *WriteMeta, error) { - var resp JobDeregisterResponse - - // The base endpoint to add query params to. - endpoint := "/v1/job/" + url.PathEscape(jobID) - - // Protect against nil opts. url.Values expects a string, and so using - // fmt.Sprintf is the best way to do this. - if opts != nil { - endpoint += fmt.Sprintf("?purge=%t&global=%t&eval_priority=%v&no_shutdown_delay=%t", - opts.Purge, opts.Global, opts.EvalPriority, opts.NoShutdownDelay) - } - - wm, err := j.client.delete(endpoint, nil, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -// ForceEvaluate is used to force-evaluate an existing job. -func (j *Jobs) ForceEvaluate(jobID string, q *WriteOptions) (string, *WriteMeta, error) { - var resp JobRegisterResponse - wm, err := j.client.put("/v1/job/"+url.PathEscape(jobID)+"/evaluate", nil, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -// EvaluateWithOpts is used to force-evaluate an existing job and takes additional options -// for whether to force reschedule failed allocations -func (j *Jobs) EvaluateWithOpts(jobID string, opts EvalOptions, q *WriteOptions) (string, *WriteMeta, error) { - req := &JobEvaluateRequest{ - JobID: jobID, - EvalOptions: opts, - } - - var resp JobRegisterResponse - wm, err := j.client.put("/v1/job/"+url.PathEscape(jobID)+"/evaluate", req, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -// PeriodicForce spawns a new instance of the periodic job and returns the eval ID -func (j *Jobs) PeriodicForce(jobID string, q *WriteOptions) (string, *WriteMeta, error) { - var resp periodicForceResponse - wm, err := j.client.put("/v1/job/"+url.PathEscape(jobID)+"/periodic/force", nil, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -// PlanOptions is used to pass through job planning parameters -type PlanOptions struct { - Diff bool - PolicyOverride bool -} - -func (j *Jobs) Plan(job *Job, diff bool, q *WriteOptions) (*JobPlanResponse, *WriteMeta, error) { - opts := PlanOptions{Diff: diff} - return j.PlanOpts(job, &opts, q) -} - -func (j *Jobs) PlanOpts(job *Job, opts *PlanOptions, q *WriteOptions) (*JobPlanResponse, *WriteMeta, error) { - if job == nil { - return nil, nil, errors.New("must pass non-nil job") - } - if job.ID == nil { - return nil, nil, errors.New("job is missing ID") - } - - // Setup the request - req := &JobPlanRequest{ - Job: job, - } - if opts != nil { - req.Diff = opts.Diff - req.PolicyOverride = opts.PolicyOverride - } - - var resp JobPlanResponse - wm, err := j.client.put("/v1/job/"+url.PathEscape(*job.ID)+"/plan", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -func (j *Jobs) Summary(jobID string, q *QueryOptions) (*JobSummary, *QueryMeta, error) { - var resp JobSummary - qm, err := j.client.query("/v1/job/"+url.PathEscape(jobID)+"/summary", &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// DispatchOptions is used to pass through job dispatch parameters -type DispatchOptions struct { - JobID string - Meta map[string]string - Payload []byte - IdPrefixTemplate string - Priority int -} - -func (j *Jobs) Dispatch(jobID string, meta map[string]string, - payload []byte, idPrefixTemplate string, q *WriteOptions) (*JobDispatchResponse, *WriteMeta, error) { - - return j.DispatchOpts(&DispatchOptions{ - JobID: jobID, - Meta: meta, - Payload: payload, - IdPrefixTemplate: idPrefixTemplate}, - q, - ) -} - -// DispatchOpts is used to dispatch a new job with the passed DispatchOpts. It -// returns the ID of the evaluation, along with any errors encountered. -func (j *Jobs) DispatchOpts(opts *DispatchOptions, q *WriteOptions) (*JobDispatchResponse, *WriteMeta, error) { - var resp JobDispatchResponse - req := &JobDispatchRequest{ - JobID: opts.JobID, - Meta: opts.Meta, - Payload: opts.Payload, - IdPrefixTemplate: opts.IdPrefixTemplate, - Priority: opts.Priority, - } - wm, err := j.client.put("/v1/job/"+url.PathEscape(opts.JobID)+"/dispatch", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Revert is used to revert the given job to the passed version. If -// enforceVersion is set, the job is only reverted if the current version is at -// the passed version. -func (j *Jobs) Revert(jobID string, version uint64, enforcePriorVersion *uint64, - q *WriteOptions, _ string, _ string) (*JobRegisterResponse, *WriteMeta, error) { - - var resp JobRegisterResponse - req := &JobRevertRequest{ - JobID: jobID, - JobVersion: version, - EnforcePriorVersion: enforcePriorVersion, - } - wm, err := j.client.put("/v1/job/"+url.PathEscape(jobID)+"/revert", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Stable is used to mark a job version's stability. -func (j *Jobs) Stable(jobID string, version uint64, stable bool, - q *WriteOptions) (*JobStabilityResponse, *WriteMeta, error) { - - var resp JobStabilityResponse - req := &JobStabilityRequest{ - JobID: jobID, - JobVersion: version, - Stable: stable, - } - wm, err := j.client.put("/v1/job/"+url.PathEscape(jobID)+"/stable", req, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Services is used to return a list of service registrations associated to the -// specified jobID. -func (j *Jobs) Services(jobID string, q *QueryOptions) ([]*ServiceRegistration, *QueryMeta, error) { - var resp []*ServiceRegistration - qm, err := j.client.query("/v1/job/"+jobID+"/services", &resp, q) - return resp, qm, err -} - -// periodicForceResponse is used to deserialize a force response -type periodicForceResponse struct { - EvalID string -} - -// UpdateStrategy defines a task groups update strategy. -type UpdateStrategy struct { - Stagger *time.Duration `mapstructure:"stagger" hcl:"stagger,optional"` - MaxParallel *int `mapstructure:"max_parallel" hcl:"max_parallel,optional"` - HealthCheck *string `mapstructure:"health_check" hcl:"health_check,optional"` - MinHealthyTime *time.Duration `mapstructure:"min_healthy_time" hcl:"min_healthy_time,optional"` - HealthyDeadline *time.Duration `mapstructure:"healthy_deadline" hcl:"healthy_deadline,optional"` - ProgressDeadline *time.Duration `mapstructure:"progress_deadline" hcl:"progress_deadline,optional"` - Canary *int `mapstructure:"canary" hcl:"canary,optional"` - AutoRevert *bool `mapstructure:"auto_revert" hcl:"auto_revert,optional"` - AutoPromote *bool `mapstructure:"auto_promote" hcl:"auto_promote,optional"` -} - -// DefaultUpdateStrategy provides a baseline that can be used to upgrade -// jobs with the old policy or for populating field defaults. -func DefaultUpdateStrategy() *UpdateStrategy { - return &UpdateStrategy{ - Stagger: pointerOf(30 * time.Second), - MaxParallel: pointerOf(1), - HealthCheck: pointerOf("checks"), - MinHealthyTime: pointerOf(10 * time.Second), - HealthyDeadline: pointerOf(5 * time.Minute), - ProgressDeadline: pointerOf(10 * time.Minute), - AutoRevert: pointerOf(false), - Canary: pointerOf(0), - AutoPromote: pointerOf(false), - } -} - -func (u *UpdateStrategy) Copy() *UpdateStrategy { - if u == nil { - return nil - } - - copy := new(UpdateStrategy) - - if u.Stagger != nil { - copy.Stagger = pointerOf(*u.Stagger) - } - - if u.MaxParallel != nil { - copy.MaxParallel = pointerOf(*u.MaxParallel) - } - - if u.HealthCheck != nil { - copy.HealthCheck = pointerOf(*u.HealthCheck) - } - - if u.MinHealthyTime != nil { - copy.MinHealthyTime = pointerOf(*u.MinHealthyTime) - } - - if u.HealthyDeadline != nil { - copy.HealthyDeadline = pointerOf(*u.HealthyDeadline) - } - - if u.ProgressDeadline != nil { - copy.ProgressDeadline = pointerOf(*u.ProgressDeadline) - } - - if u.AutoRevert != nil { - copy.AutoRevert = pointerOf(*u.AutoRevert) - } - - if u.Canary != nil { - copy.Canary = pointerOf(*u.Canary) - } - - if u.AutoPromote != nil { - copy.AutoPromote = pointerOf(*u.AutoPromote) - } - - return copy -} - -func (u *UpdateStrategy) Merge(o *UpdateStrategy) { - if o == nil { - return - } - - if o.Stagger != nil { - u.Stagger = pointerOf(*o.Stagger) - } - - if o.MaxParallel != nil { - u.MaxParallel = pointerOf(*o.MaxParallel) - } - - if o.HealthCheck != nil { - u.HealthCheck = pointerOf(*o.HealthCheck) - } - - if o.MinHealthyTime != nil { - u.MinHealthyTime = pointerOf(*o.MinHealthyTime) - } - - if o.HealthyDeadline != nil { - u.HealthyDeadline = pointerOf(*o.HealthyDeadline) - } - - if o.ProgressDeadline != nil { - u.ProgressDeadline = pointerOf(*o.ProgressDeadline) - } - - if o.AutoRevert != nil { - u.AutoRevert = pointerOf(*o.AutoRevert) - } - - if o.Canary != nil { - u.Canary = pointerOf(*o.Canary) - } - - if o.AutoPromote != nil { - u.AutoPromote = pointerOf(*o.AutoPromote) - } -} - -func (u *UpdateStrategy) Canonicalize() { - d := DefaultUpdateStrategy() - - if u.MaxParallel == nil { - u.MaxParallel = d.MaxParallel - } - - if u.Stagger == nil { - u.Stagger = d.Stagger - } - - if u.HealthCheck == nil { - u.HealthCheck = d.HealthCheck - } - - if u.HealthyDeadline == nil { - u.HealthyDeadline = d.HealthyDeadline - } - - if u.ProgressDeadline == nil { - u.ProgressDeadline = d.ProgressDeadline - } - - if u.MinHealthyTime == nil { - u.MinHealthyTime = d.MinHealthyTime - } - - if u.AutoRevert == nil { - u.AutoRevert = d.AutoRevert - } - - if u.Canary == nil { - u.Canary = d.Canary - } - - if u.AutoPromote == nil { - u.AutoPromote = d.AutoPromote - } -} - -// Empty returns whether the UpdateStrategy is empty or has user defined values. -func (u *UpdateStrategy) Empty() bool { - if u == nil { - return true - } - - if u.Stagger != nil && *u.Stagger != 0 { - return false - } - - if u.MaxParallel != nil && *u.MaxParallel != 0 { - return false - } - - if u.HealthCheck != nil && *u.HealthCheck != "" { - return false - } - - if u.MinHealthyTime != nil && *u.MinHealthyTime != 0 { - return false - } - - if u.HealthyDeadline != nil && *u.HealthyDeadline != 0 { - return false - } - - if u.ProgressDeadline != nil && *u.ProgressDeadline != 0 { - return false - } - - if u.AutoRevert != nil && *u.AutoRevert { - return false - } - - if u.AutoPromote != nil && *u.AutoPromote { - return false - } - - if u.Canary != nil && *u.Canary != 0 { - return false - } - - return true -} - -type Multiregion struct { - Strategy *MultiregionStrategy `hcl:"strategy,block"` - Regions []*MultiregionRegion `hcl:"region,block"` -} - -func (m *Multiregion) Canonicalize() { - if m.Strategy == nil { - m.Strategy = &MultiregionStrategy{ - MaxParallel: pointerOf(0), - OnFailure: pointerOf(""), - } - } else { - if m.Strategy.MaxParallel == nil { - m.Strategy.MaxParallel = pointerOf(0) - } - if m.Strategy.OnFailure == nil { - m.Strategy.OnFailure = pointerOf("") - } - } - if m.Regions == nil { - m.Regions = []*MultiregionRegion{} - } - for _, region := range m.Regions { - if region.Count == nil { - region.Count = pointerOf(1) - } - if region.Datacenters == nil { - region.Datacenters = []string{} - } - if region.Meta == nil { - region.Meta = map[string]string{} - } - } -} - -func (m *Multiregion) Copy() *Multiregion { - if m == nil { - return nil - } - copy := new(Multiregion) - if m.Strategy != nil { - copy.Strategy = new(MultiregionStrategy) - copy.Strategy.MaxParallel = pointerOf(*m.Strategy.MaxParallel) - copy.Strategy.OnFailure = pointerOf(*m.Strategy.OnFailure) - } - for _, region := range m.Regions { - copyRegion := new(MultiregionRegion) - copyRegion.Name = region.Name - copyRegion.Count = pointerOf(*region.Count) - copyRegion.Datacenters = append(copyRegion.Datacenters, region.Datacenters...) - copyRegion.NodePool = region.NodePool - for k, v := range region.Meta { - copyRegion.Meta[k] = v - } - - copy.Regions = append(copy.Regions, copyRegion) - } - return copy -} - -type MultiregionStrategy struct { - MaxParallel *int `mapstructure:"max_parallel" hcl:"max_parallel,optional"` - OnFailure *string `mapstructure:"on_failure" hcl:"on_failure,optional"` -} - -type MultiregionRegion struct { - Name string `hcl:",label"` - Count *int `hcl:"count,optional"` - Datacenters []string `hcl:"datacenters,optional"` - NodePool string `hcl:"node_pool,optional"` - Meta map[string]string `hcl:"meta,block"` -} - -// PeriodicConfig is for serializing periodic config for a job. -type PeriodicConfig struct { - Enabled *bool `hcl:"enabled,optional"` - Spec *string `hcl:"cron,optional"` - Specs []string `hcl:"crons,optional"` - SpecType *string - ProhibitOverlap *bool `mapstructure:"prohibit_overlap" hcl:"prohibit_overlap,optional"` - TimeZone *string `mapstructure:"time_zone" hcl:"time_zone,optional"` -} - -func (p *PeriodicConfig) Canonicalize() { - if p.Enabled == nil { - p.Enabled = pointerOf(true) - } - if p.Spec == nil { - p.Spec = pointerOf("") - } - if p.Specs == nil { - p.Specs = []string{} - } - if p.SpecType == nil { - p.SpecType = pointerOf(PeriodicSpecCron) - } - if p.ProhibitOverlap == nil { - p.ProhibitOverlap = pointerOf(false) - } - if p.TimeZone == nil || *p.TimeZone == "" { - p.TimeZone = pointerOf("UTC") - } -} - -// Next returns the closest time instant matching the spec that is after the -// passed time. If no matching instance exists, the zero value of time.Time is -// returned. The `time.Location` of the returned value matches that of the -// passed time. -func (p *PeriodicConfig) Next(fromTime time.Time) (time.Time, error) { - // Single spec parsing - if p != nil && *p.SpecType == PeriodicSpecCron { - if p.Spec != nil && *p.Spec != "" { - return cronParseNext(fromTime, *p.Spec) - } - } - - // multiple specs parsing - var nextTime time.Time - for _, spec := range p.Specs { - t, err := cronParseNext(fromTime, spec) - if err != nil { - return time.Time{}, fmt.Errorf("failed parsing cron expression %s: %v", spec, err) - } - if nextTime.IsZero() || t.Before(nextTime) { - nextTime = t - } - } - return nextTime, nil -} - -// cronParseNext is a helper that parses the next time for the given expression -// but captures any panic that may occur in the underlying library. -// --- THIS FUNCTION IS REPLICATED IN nomad/structs/structs.go -// and should be kept in sync. -func cronParseNext(fromTime time.Time, spec string) (t time.Time, err error) { - defer func() { - if recover() != nil { - t = time.Time{} - err = fmt.Errorf("failed parsing cron expression: %q", spec) - } - }() - exp, err := cronexpr.Parse(spec) - if err != nil { - return time.Time{}, fmt.Errorf("failed parsing cron expression: %s: %v", spec, err) - } - return exp.Next(fromTime), nil -} - -func (p *PeriodicConfig) GetLocation() (*time.Location, error) { - if p.TimeZone == nil || *p.TimeZone == "" { - return time.UTC, nil - } - - return time.LoadLocation(*p.TimeZone) -} - -// ParameterizedJobConfig is used to configure the parameterized job. -type ParameterizedJobConfig struct { - Payload string `hcl:"payload,optional"` - MetaRequired []string `mapstructure:"meta_required" hcl:"meta_required,optional"` - MetaOptional []string `mapstructure:"meta_optional" hcl:"meta_optional,optional"` -} - -// JobSubmission is used to hold information about the original content of a job -// specification being submitted to Nomad. -// -// At any time a JobSubmission may be nil, indicating no information is known about -// the job submission. -type JobSubmission struct { - // Source contains the original job definition (may be in the format of - // hcl1, hcl2, or json). HCL1 jobs can no longer be parsed. - Source string - - // Format indicates what the Source content was (hcl1, hcl2, or json). HCL1 - // jobs can no longer be parsed. - Format string - - // VariableFlags contains the CLI "-var" flag arguments as submitted with the - // job (hcl2 only). - VariableFlags map[string]string - - // Variables contains the opaque variables configuration as coming from - // a var-file or the WebUI variables input (hcl2 only). - Variables string -} - -type JobUIConfig struct { - Description string `hcl:"description,optional"` - Links []*JobUILink `hcl:"link,block"` -} - -type JobUILink struct { - Label string `hcl:"label,optional"` - URL string `hcl:"url,optional"` -} - -func (j *JobUIConfig) Canonicalize() { - if j == nil { - return - } - - if len(j.Links) == 0 { - j.Links = nil - } -} - -func (j *JobUIConfig) Copy() *JobUIConfig { - if j == nil { - return nil - } - - copy := new(JobUIConfig) - copy.Description = j.Description - - for _, link := range j.Links { - copy.Links = append(copy.Links, link.Copy()) - } - - return copy -} - -func (j *JobUILink) Copy() *JobUILink { - if j == nil { - return nil - } - - return &JobUILink{ - Label: j.Label, - URL: j.URL, - } -} - -type JobVersionTag struct { - Name string - Description string - TaggedTime int64 -} - -func (j *JobVersionTag) Copy() *JobVersionTag { - if j == nil { - return nil - } - - return &JobVersionTag{ - Name: j.Name, - Description: j.Description, - TaggedTime: j.TaggedTime, - } -} - -func (js *JobSubmission) Canonicalize() { - if js == nil { - return - } - - if len(js.VariableFlags) == 0 { - js.VariableFlags = nil - } - - // if there are multiline variables, make sure we escape the newline - // characters to preserve them. This way, when the job gets stopped and - // restarted in the UI, variable values will be parsed correctly. - for k, v := range js.VariableFlags { - js.VariableFlags[k] = url.QueryEscape(v) - } -} - -func (js *JobSubmission) Copy() *JobSubmission { - if js == nil { - return nil - } - - return &JobSubmission{ - Source: js.Source, - Format: js.Format, - VariableFlags: maps.Clone(js.VariableFlags), - Variables: js.Variables, - } -} - -// Job is used to serialize a job. -type Job struct { - /* Fields parsed from HCL config */ - - Region *string `hcl:"region,optional"` - Namespace *string `hcl:"namespace,optional"` - ID *string `hcl:"id,optional"` - Name *string `hcl:"name,optional"` - Type *string `hcl:"type,optional"` - Priority *int `hcl:"priority,optional"` - AllAtOnce *bool `mapstructure:"all_at_once" hcl:"all_at_once,optional"` - Datacenters []string `hcl:"datacenters,optional"` - NodePool *string `mapstructure:"node_pool" hcl:"node_pool,optional"` - Constraints []*Constraint `hcl:"constraint,block"` - Affinities []*Affinity `hcl:"affinity,block"` - TaskGroups []*TaskGroup `hcl:"group,block"` - Update *UpdateStrategy `hcl:"update,block"` - Multiregion *Multiregion `hcl:"multiregion,block"` - Spreads []*Spread `hcl:"spread,block"` - Periodic *PeriodicConfig `hcl:"periodic,block"` - ParameterizedJob *ParameterizedJobConfig `hcl:"parameterized,block"` - Reschedule *ReschedulePolicy `hcl:"reschedule,block"` - Migrate *MigrateStrategy `hcl:"migrate,block"` - Meta map[string]string `hcl:"meta,block"` - UI *JobUIConfig `hcl:"ui,block"` - - /* Fields set by server, not sourced from job config file */ - - Stop *bool - ParentID *string - Dispatched bool - DispatchIdempotencyToken *string - Payload []byte - ConsulNamespace *string `mapstructure:"consul_namespace"` - VaultNamespace *string `mapstructure:"vault_namespace"` - NomadTokenID *string `mapstructure:"nomad_token_id"` - Status *string - StatusDescription *string - Stable *bool - Version *uint64 - SubmitTime *int64 - CreateIndex *uint64 - ModifyIndex *uint64 - JobModifyIndex *uint64 - VersionTag *JobVersionTag -} - -// IsPeriodic returns whether a job is periodic. -func (j *Job) IsPeriodic() bool { - return j.Periodic != nil -} - -// IsParameterized returns whether a job is parameterized job. -func (j *Job) IsParameterized() bool { - return j.ParameterizedJob != nil && !j.Dispatched -} - -// IsMultiregion returns whether a job is a multiregion job -func (j *Job) IsMultiregion() bool { - return j.Multiregion != nil && j.Multiregion.Regions != nil && len(j.Multiregion.Regions) > 0 -} - -func (j *Job) Canonicalize() { - if j.ID == nil { - j.ID = pointerOf("") - } - if j.Name == nil { - j.Name = pointerOf(*j.ID) - } - if j.ParentID == nil { - j.ParentID = pointerOf("") - } - if j.Namespace == nil { - j.Namespace = pointerOf(DefaultNamespace) - } - if j.Priority == nil { - j.Priority = pointerOf(JobDefaultPriority) - } - if j.Stop == nil { - j.Stop = pointerOf(false) - } - if j.Region == nil { - j.Region = pointerOf(GlobalRegion) - } - if j.NodePool == nil { - j.NodePool = pointerOf("") - } - if j.Type == nil { - j.Type = pointerOf("service") - } - if j.AllAtOnce == nil { - j.AllAtOnce = pointerOf(false) - } - if j.ConsulNamespace == nil { - j.ConsulNamespace = pointerOf("") - } - if j.VaultNamespace == nil { - j.VaultNamespace = pointerOf("") - } - if j.NomadTokenID == nil { - j.NomadTokenID = pointerOf("") - } - if j.Status == nil { - j.Status = pointerOf("") - } - if j.StatusDescription == nil { - j.StatusDescription = pointerOf("") - } - if j.Stable == nil { - j.Stable = pointerOf(false) - } - if j.Version == nil { - j.Version = pointerOf(uint64(0)) - } - if j.CreateIndex == nil { - j.CreateIndex = pointerOf(uint64(0)) - } - if j.ModifyIndex == nil { - j.ModifyIndex = pointerOf(uint64(0)) - } - if j.JobModifyIndex == nil { - j.JobModifyIndex = pointerOf(uint64(0)) - } - if j.Periodic != nil { - j.Periodic.Canonicalize() - } - if j.Update != nil { - j.Update.Canonicalize() - } else if *j.Type == JobTypeService { - j.Update = DefaultUpdateStrategy() - } - if j.Multiregion != nil { - j.Multiregion.Canonicalize() - } - - for _, tg := range j.TaskGroups { - tg.Canonicalize(j) - } - - for _, spread := range j.Spreads { - spread.Canonicalize() - } - for _, a := range j.Affinities { - a.Canonicalize() - } - - if j.UI != nil { - j.UI.Canonicalize() - } -} - -// LookupTaskGroup finds a task group by name -func (j *Job) LookupTaskGroup(name string) *TaskGroup { - for _, tg := range j.TaskGroups { - if *tg.Name == name { - return tg - } - } - return nil -} - -// JobSummary summarizes the state of the allocations of a job -type JobSummary struct { - JobID string - Namespace string - Summary map[string]TaskGroupSummary - Children *JobChildrenSummary - - // Raft Indexes - CreateIndex uint64 - ModifyIndex uint64 -} - -// JobChildrenSummary contains the summary of children job status -type JobChildrenSummary struct { - Pending int64 - Running int64 - Dead int64 -} - -func (jc *JobChildrenSummary) Sum() int { - if jc == nil { - return 0 - } - - return int(jc.Pending + jc.Running + jc.Dead) -} - -// TaskGroup summarizes the state of all the allocations of a particular -// TaskGroup -type TaskGroupSummary struct { - Queued int - Complete int - Failed int - Running int - Starting int - Lost int - Unknown int -} - -// JobListStub is used to return a subset of information about -// jobs during list operations. -type JobListStub struct { - ID string - ParentID string - Name string - Namespace string `json:",omitempty"` - Datacenters []string - Type string - Priority int - Periodic bool - ParameterizedJob bool - Stop bool - Status string - StatusDescription string - JobSummary *JobSummary - CreateIndex uint64 - ModifyIndex uint64 - JobModifyIndex uint64 - SubmitTime int64 - Meta map[string]string `json:",omitempty"` -} - -// JobIDSort is used to sort jobs by their job ID's. -type JobIDSort []*JobListStub - -func (j JobIDSort) Len() int { - return len(j) -} - -func (j JobIDSort) Less(a, b int) bool { - return j[a].ID < j[b].ID -} - -func (j JobIDSort) Swap(a, b int) { - j[a], j[b] = j[b], j[a] -} - -// NewServiceJob creates and returns a new service-style job -// for long-lived processes using the provided name, ID, and -// relative job priority. -func NewServiceJob(id, name, region string, pri int) *Job { - return newJob(id, name, region, JobTypeService, pri) -} - -// NewBatchJob creates and returns a new batch-style job for -// short-lived processes using the provided name and ID along -// with the relative job priority. -func NewBatchJob(id, name, region string, pri int) *Job { - return newJob(id, name, region, JobTypeBatch, pri) -} - -// NewSystemJob creates and returns a new system-style job for processes -// designed to run on all clients, using the provided name and ID along with -// the relative job priority. -func NewSystemJob(id, name, region string, pri int) *Job { - return newJob(id, name, region, JobTypeSystem, pri) -} - -// NewSysbatchJob creates and returns a new sysbatch-style job for short-lived -// processes designed to run on all clients, using the provided name and ID -// along with the relative job priority. -func NewSysbatchJob(id, name, region string, pri int) *Job { - return newJob(id, name, region, JobTypeSysbatch, pri) -} - -// newJob is used to create a new Job struct. -func newJob(id, name, region, typ string, pri int) *Job { - return &Job{ - Region: ®ion, - ID: &id, - Name: &name, - Type: &typ, - Priority: &pri, - } -} - -// SetMeta is used to set arbitrary k/v pairs of metadata on a job. -func (j *Job) SetMeta(key, val string) *Job { - if j.Meta == nil { - j.Meta = make(map[string]string) - } - j.Meta[key] = val - return j -} - -// AddDatacenter is used to add a datacenter to a job. -func (j *Job) AddDatacenter(dc string) *Job { - j.Datacenters = append(j.Datacenters, dc) - return j -} - -// Constrain is used to add a constraint to a job. -func (j *Job) Constrain(c *Constraint) *Job { - j.Constraints = append(j.Constraints, c) - return j -} - -// AddAffinity is used to add an affinity to a job. -func (j *Job) AddAffinity(a *Affinity) *Job { - j.Affinities = append(j.Affinities, a) - return j -} - -// AddTaskGroup adds a task group to an existing job. -func (j *Job) AddTaskGroup(grp *TaskGroup) *Job { - j.TaskGroups = append(j.TaskGroups, grp) - return j -} - -// AddPeriodicConfig adds a periodic config to an existing job. -func (j *Job) AddPeriodicConfig(cfg *PeriodicConfig) *Job { - j.Periodic = cfg - return j -} - -func (j *Job) AddSpread(s *Spread) *Job { - j.Spreads = append(j.Spreads, s) - return j -} - -func (j *Job) GetScalingPoliciesPerTaskGroup() map[string]*ScalingPolicy { - ret := map[string]*ScalingPolicy{} - for _, tg := range j.TaskGroups { - ret[*tg.Name] = tg.Scaling - } - - return ret -} - -type WriteRequest struct { - // The target region for this write - Region string - - // Namespace is the target namespace for this write - Namespace string - - // SecretID is the secret ID of an ACL token - SecretID string -} - -// JobValidateRequest is used to validate a job -type JobValidateRequest struct { - Job *Job - WriteRequest -} - -// JobValidateResponse is the response from validate request -type JobValidateResponse struct { - // DriverConfigValidated indicates whether the agent validated the driver - // config - DriverConfigValidated bool - - // ValidationErrors is a list of validation errors - ValidationErrors []string - - // Error is a string version of any error that may have occurred - Error string - - // Warnings contains any warnings about the given job. These may include - // deprecation warnings. - Warnings string -} - -// JobRevertRequest is used to revert a job to a prior version. -type JobRevertRequest struct { - // JobID is the ID of the job being reverted - JobID string - - // JobVersion the version to revert to. - JobVersion uint64 - - // EnforcePriorVersion if set will enforce that the job is at the given - // version before reverting. - EnforcePriorVersion *uint64 - - WriteRequest -} - -// JobRegisterRequest is used to update a job -type JobRegisterRequest struct { - Submission *JobSubmission - Job *Job - - // If EnforceIndex is set then the job will only be registered if the passed - // JobModifyIndex matches the current Jobs index. If the index is zero, the - // register only occurs if the job is new. - EnforceIndex bool `json:",omitempty"` - JobModifyIndex uint64 `json:",omitempty"` - PolicyOverride bool `json:",omitempty"` - PreserveCounts bool `json:",omitempty"` - - // EvalPriority is an optional priority to use on any evaluation created as - // a result on this job registration. This value must be between 1-100 - // inclusively, where a larger value corresponds to a higher priority. This - // is useful when an operator wishes to push through a job registration in - // busy clusters with a large evaluation backlog. This avoids needing to - // change the job priority which also impacts preemption. - EvalPriority int `json:",omitempty"` - - WriteRequest -} - -// JobRegisterResponse is used to respond to a job registration -type JobRegisterResponse struct { - EvalID string - EvalCreateIndex uint64 - JobModifyIndex uint64 - - // Warnings contains any warnings about the given job. These may include - // deprecation warnings. - Warnings string - - QueryMeta -} - -// JobDeregisterResponse is used to respond to a job deregistration -type JobDeregisterResponse struct { - EvalID string - EvalCreateIndex uint64 - JobModifyIndex uint64 - QueryMeta -} - -type JobPlanRequest struct { - Job *Job - Diff bool - PolicyOverride bool - WriteRequest -} - -type JobPlanResponse struct { - JobModifyIndex uint64 - CreatedEvals []*Evaluation - Diff *JobDiff - Annotations *PlanAnnotations - FailedTGAllocs map[string]*AllocationMetric - NextPeriodicLaunch time.Time - - // Warnings contains any warnings about the given job. These may include - // deprecation warnings. - Warnings string -} - -type JobDiff struct { - Type string - ID string - Fields []*FieldDiff - Objects []*ObjectDiff - TaskGroups []*TaskGroupDiff -} - -type TaskGroupDiff struct { - Type string - Name string - Fields []*FieldDiff - Objects []*ObjectDiff - Tasks []*TaskDiff - Updates map[string]uint64 -} - -type TaskDiff struct { - Type string - Name string - Fields []*FieldDiff - Objects []*ObjectDiff - Annotations []string -} - -type FieldDiff struct { - Type string - Name string - Old, New string - Annotations []string -} - -type ObjectDiff struct { - Type string - Name string - Fields []*FieldDiff - Objects []*ObjectDiff -} - -type PlanAnnotations struct { - DesiredTGUpdates map[string]*DesiredUpdates - PreemptedAllocs []*AllocationListStub -} - -type DesiredUpdates struct { - Ignore uint64 - Place uint64 - Migrate uint64 - Stop uint64 - InPlaceUpdate uint64 - DestructiveUpdate uint64 - Canary uint64 - Preemptions uint64 -} - -type JobDispatchRequest struct { - JobID string - Payload []byte - Meta map[string]string - IdPrefixTemplate string - Priority int -} - -type JobDispatchResponse struct { - DispatchedJobID string - EvalID string - EvalCreateIndex uint64 - JobCreateIndex uint64 - WriteMeta -} - -// JobVersionsResponse is used for a job get versions request -type JobVersionsResponse struct { - Versions []*Job - Diffs []*JobDiff - QueryMeta -} - -// JobSubmissionResponse is used for a job get submission request -type JobSubmissionResponse struct { - Submission *JobSubmission - QueryMeta -} - -// JobStabilityRequest is used to marked a job as stable. -type JobStabilityRequest struct { - // Job to set the stability on - JobID string - JobVersion uint64 - - // Set the stability - Stable bool - WriteRequest -} - -// JobStabilityResponse is the response when marking a job as stable. -type JobStabilityResponse struct { - JobModifyIndex uint64 - WriteMeta -} - -// JobEvaluateRequest is used when we just need to re-evaluate a target job -type JobEvaluateRequest struct { - JobID string - EvalOptions EvalOptions - WriteRequest -} - -// EvalOptions is used to encapsulate options when forcing a job evaluation -type EvalOptions struct { - ForceReschedule bool -} - -// ActionExec is used to run a pre-defined command inside a running task. -// The call blocks until command terminates (or an error occurs), and returns the exit code. -func (j *Jobs) ActionExec(ctx context.Context, - alloc *Allocation, job string, task string, tty bool, command []string, - action string, - stdin io.Reader, stdout, stderr io.Writer, - terminalSizeCh <-chan TerminalSize, q *QueryOptions) (exitCode int, err error) { - - s := &execSession{ - client: j.client, - alloc: alloc, - job: job, - task: task, - tty: tty, - command: command, - action: action, - - stdin: stdin, - stdout: stdout, - stderr: stderr, - - terminalSizeCh: terminalSizeCh, - q: q, - } - - return s.run(ctx) -} - -// JobStatusesRequest is used to get statuses for jobs, -// their allocations and deployments. -type JobStatusesRequest struct { - // Jobs may be optionally provided to request a subset of specific jobs. - Jobs []NamespacedID - // IncludeChildren will include child (batch) jobs in the response. - IncludeChildren bool -} - -type TagVersionRequest struct { - Version uint64 - Description string - WriteRequest -} - -func (j *Jobs) TagVersion(jobID string, version uint64, name string, description string, q *WriteOptions) (*WriteMeta, error) { - var tagRequest = &TagVersionRequest{ - Version: version, - Description: description, - } - - return j.client.put("/v1/job/"+url.PathEscape(jobID)+"/versions/"+name+"/tag", tagRequest, nil, q) -} - -func (j *Jobs) UntagVersion(jobID string, name string, q *WriteOptions) (*WriteMeta, error) { - return j.client.delete("/v1/job/"+url.PathEscape(jobID)+"/versions/"+name+"/tag", nil, nil, q) -} diff --git a/vendor/github.com/hashicorp/nomad/api/keyring.go b/vendor/github.com/hashicorp/nomad/api/keyring.go deleted file mode 100644 index 7a6656843c..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/keyring.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "net/url" - "strconv" -) - -// Keyring is used to access the Variables keyring. -type Keyring struct { - client *Client -} - -// Keyring returns a handle to the Keyring endpoint -func (c *Client) Keyring() *Keyring { - return &Keyring{client: c} -} - -// EncryptionAlgorithm chooses which algorithm is used for -// encrypting / decrypting entries with this key -type EncryptionAlgorithm string - -const ( - EncryptionAlgorithmAES256GCM EncryptionAlgorithm = "aes256-gcm" -) - -// RootKeyMeta is the metadata used to refer to a RootKey. -type RootKeyMeta struct { - KeyID string // UUID - Algorithm EncryptionAlgorithm - CreateTime int64 - CreateIndex uint64 - ModifyIndex uint64 - State RootKeyState - PublishTime int64 -} - -// RootKeyState enum describes the lifecycle of a root key. -type RootKeyState string - -const ( - RootKeyStateInactive RootKeyState = "inactive" - RootKeyStateActive RootKeyState = "active" - RootKeyStateRekeying RootKeyState = "rekeying" - RootKeyStateDeprecated RootKeyState = "deprecated" - RootKeyStatePrepublished RootKeyState = "prepublished" -) - -// List lists all the keyring metadata -func (k *Keyring) List(q *QueryOptions) ([]*RootKeyMeta, *QueryMeta, error) { - var resp []*RootKeyMeta - qm, err := k.client.query("/v1/operator/keyring/keys", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Delete deletes a specific inactive key from the keyring -func (k *Keyring) Delete(opts *KeyringDeleteOptions, w *WriteOptions) (*WriteMeta, error) { - wm, err := k.client.delete(fmt.Sprintf("/v1/operator/keyring/key/%v?force=%v", - url.PathEscape(opts.KeyID), strconv.FormatBool(opts.Force)), nil, nil, w) - return wm, err -} - -// KeyringDeleteOptions are parameters for the Delete API -type KeyringDeleteOptions struct { - KeyID string // UUID - // Force can be used to force deletion of a root keyring that was used to encrypt - // an existing variable or to sign a workload identity - Force bool -} - -// Rotate requests a key rotation -func (k *Keyring) Rotate(opts *KeyringRotateOptions, w *WriteOptions) (*RootKeyMeta, *WriteMeta, error) { - qp := url.Values{} - if opts != nil { - if opts.Algorithm != "" { - qp.Set("algo", string(opts.Algorithm)) - } - if opts.Full { - qp.Set("full", "true") - } - if opts.PublishTime > 0 { - qp.Set("publish_time", fmt.Sprintf("%d", opts.PublishTime)) - } - } - resp := &struct{ Key *RootKeyMeta }{} - wm, err := k.client.put("/v1/operator/keyring/rotate?"+qp.Encode(), nil, resp, w) - return resp.Key, wm, err -} - -// KeyringRotateOptions are parameters for the Rotate API -type KeyringRotateOptions struct { - Full bool - Algorithm EncryptionAlgorithm - PublishTime int64 -} diff --git a/vendor/github.com/hashicorp/nomad/api/locks.go b/vendor/github.com/hashicorp/nomad/api/locks.go deleted file mode 100644 index e26e68a9ca..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/locks.go +++ /dev/null @@ -1,377 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "errors" - "fmt" - "math/rand" - "net/http" - "time" - - "github.com/hashicorp/go-multierror" -) - -const ( - lockLeaseRenewalFactor = 0.7 - lockRetryBackoffFactor = 1.1 - - // DefaultLockTTL is the default value used to maintain a lock before it needs to - // be renewed. The actual value comes from the experience with Consul. - DefaultLockTTL = 15 * time.Second - - // DefaultLockDelay is the default a lock will be blocked after the TTL - // went by without any renews. It is intended to prevent split brain situations. - // The actual value comes from the experience with Consul. - DefaultLockDelay = 15 * time.Second -) - -var ( - // ErrLockConflict is returned in case a lock operation can't be performed - // because the caller is not the current holder of the lock. - ErrLockConflict = errors.New("conflicting operation over lock") - - //LockNoPathErr is returned when no path is provided in the variable to be - // used for the lease mechanism - LockNoPathErr = errors.New("variable's path can't be empty") -) - -// Locks returns a new handle on a lock for the given variable. -func (c *Client) Locks(wo WriteOptions, v Variable, opts ...LocksOption) (*Locks, error) { - - if v.Path == "" { - return nil, LockNoPathErr - } - - ttl, err := time.ParseDuration(v.Lock.TTL) - if err != nil { - return nil, err - } - - l := &Locks{ - c: c, - WriteOptions: wo, - variable: v, - ttl: ttl, - ro: retryOptions{ - maxToLastCall: ttl, - maxRetries: defaultNumberOfRetries, - }, - } - - for _, opt := range opts { - opt(l) - } - - l.c.configureRetries(&l.ro) - - return l, nil -} - -// Locks is used to maintain all the resources necessary to operate over a lock. -// It makes the calls to the http using an exponential retry mechanism that will -// try until it either reaches 5 attempts or the ttl of the lock expires. -// The variable doesn't need to exist, one will be created internally -// but a path most be provided. -// -// Important: It will be on the user to remove the variable created for the lock. -type Locks struct { - c *Client - variable Variable - ttl time.Duration - ro retryOptions - - WriteOptions -} - -type LocksOption = func(l *Locks) - -// LocksOptionWithMaxRetries allows access to configure the number of max retries the lock -// handler will perform in case of an expected response while interacting with the -// locks endpoint. -func LocksOptionWithMaxRetries(maxRetries int64) LocksOption { - return func(l *Locks) { - l.ro.maxRetries = maxRetries - } -} - -// Acquire will make the actual call to acquire the lock over the variable using -// the ttl in the Locks to create the VariableLock. It will return the -// path of the variable holding the lock. -// -// Acquire returns the path to the variable holding the lock. -func (l *Locks) Acquire(ctx context.Context) (string, error) { - - var out Variable - - _, err := l.c.retryPut(ctx, "/v1/var/"+l.variable.Path+"?lock-acquire", l.variable, &out, &l.WriteOptions) - if err != nil { - callErr, ok := err.(UnexpectedResponseError) - - // http.StatusConflict means the lock is already held. This will happen - // under the normal execution if multiple instances are fighting for the same lock and - // doesn't disrupt the flow. - if ok && callErr.statusCode == http.StatusConflict { - return "", fmt.Errorf("acquire conflict %w", ErrLockConflict) - } - - return "", err - } - - l.variable.Lock = out.Lock - - return l.variable.Path, nil -} - -// Release makes the call to release the lock over a variable, even if the ttl -// has not yet passed. -// In case of a call to release a non held lock, Release returns ErrLockConflict. -func (l *Locks) Release(ctx context.Context) error { - var out Variable - - rv := &Variable{ - Lock: &VariableLock{ - ID: l.variable.LockID(), - }, - } - - _, err := l.c.retryPut(ctx, "/v1/var/"+l.variable.Path+"?lock-release", rv, - &out, &l.WriteOptions) - if err != nil { - callErr, ok := err.(UnexpectedResponseError) - - if ok && callErr.statusCode == http.StatusConflict { - return fmt.Errorf("release conflict %w", ErrLockConflict) - } - return err - } - - return nil -} - -// Renew is used to extend the ttl of a lock. It can be used as a heartbeat or a -// lease to maintain the hold over the lock for longer periods or as a sync -// mechanism among multiple instances looking to acquire the same lock. -// Renew will return true if the renewal was successful. -// -// In case of a call to renew a non held lock, Renew returns ErrLockConflict. -func (l *Locks) Renew(ctx context.Context) error { - var out VariableMetadata - - _, err := l.c.retryPut(ctx, "/v1/var/"+l.variable.Path+"?lock-renew", l.variable, &out, &l.WriteOptions) - if err != nil { - callErr, ok := err.(UnexpectedResponseError) - - if ok && callErr.statusCode == http.StatusConflict { - return fmt.Errorf("renew conflict %w", ErrLockConflict) - } - - return err - } - return nil -} - -func (l *Locks) LockTTL() time.Duration { - return l.ttl -} - -// Locker is the interface that wraps the lock handler. It is used by the lock -// leaser to handle all lock operations. -type Locker interface { - // Acquire will make the actual call to acquire the lock over the variable using - // the ttl in the Locks to create the VariableLock. - // - // Acquire returns the path to the variable holding the lock. - Acquire(ctx context.Context) (string, error) - // Release makes the call to release the lock over a variable, even if the ttl - // has not yet passed. - Release(ctx context.Context) error - // Renew is used to extend the ttl of a lock. It can be used as a heartbeat or a - // lease to maintain the hold over the lock for longer periods or as a sync - // mechanism among multiple instances looking to acquire the same lock. - Renew(ctx context.Context) error - - // LockTTL returns the expiration time of the underlying lock. - LockTTL() time.Duration -} - -// LockLeaser is a helper used to run a protected function that should only be -// active if the instance that runs it is currently holding the lock. -// Can be used to provide synchrony among multiple independent instances. -// -// It includes the lease renewal mechanism and tracking in case the protected -// function returns an error. Internally it uses an exponential retry mechanism -// for the api calls. -type LockLeaser struct { - Name string - renewalPeriod time.Duration - waitPeriod time.Duration - randomDelay time.Duration - earlyReturn bool - locked bool - - locker Locker -} - -type LockLeaserOption = func(l *LockLeaser) - -// LockLeaserOptionWithEarlyReturn informs the leaser to return after the lock -// acquire fails and to not wait to attempt again. -func LockLeaserOptionWithEarlyReturn(er bool) LockLeaserOption { - return func(l *LockLeaser) { - l.earlyReturn = er - } -} - -// LockLeaserOptionWithWaitPeriod is used to set a back off period between -// calls to attempt to acquire the lock. By default it is set to 1.1 * TTLs. -func LockLeaserOptionWithWaitPeriod(wp time.Duration) LockLeaserOption { - return func(l *LockLeaser) { - l.waitPeriod = wp - } -} - -// NewLockLeaser returns an instance of LockLeaser. callerID -// is optional, in case they it is not provided, internal one will be created. -func (c *Client) NewLockLeaser(l Locker, opts ...LockLeaserOption) *LockLeaser { - - rn := rand.New(rand.NewSource(time.Now().Unix())).Intn(100) - - ll := &LockLeaser{ - renewalPeriod: time.Duration(float64(l.LockTTL()) * lockLeaseRenewalFactor), - waitPeriod: time.Duration(float64(l.LockTTL()) * lockRetryBackoffFactor), - randomDelay: time.Duration(rn) * time.Millisecond, - locker: l, - earlyReturn: false, - } - - for _, opt := range opts { - opt(ll) - } - - return ll -} - -// Start wraps the start function in charge of executing the protected -// function and maintain the lease but is in charge of releasing the -// lock before exiting. It is a blocking function. -func (ll *LockLeaser) Start(ctx context.Context, protectedFuncs ...func(ctx context.Context) error) error { - var mErr multierror.Error - - err := ll.start(ctx, protectedFuncs...) - if err != nil { - mErr.Errors = append(mErr.Errors, err) - } - - if ll.locked { - err = ll.locker.Release(ctx) - if err != nil { - mErr.Errors = append(mErr.Errors, fmt.Errorf("lock release: %w", err)) - } - } - - return mErr.ErrorOrNil() -} - -// start starts the process of maintaining the lease and executes the protected -// function on an independent go routine. It is a blocking function, it -// will return once the protected function is done or an execution error -// arises. -func (ll *LockLeaser) start(ctx context.Context, protectedFuncs ...func(ctx context.Context) error) error { - ctx, cancel := context.WithCancel(ctx) - defer cancel() - - // errChannel is used track execution errors - errChannel := make(chan error, 1) - defer close(errChannel) - - // To avoid collisions if all the instances start at the same time, wait - // a random time before making the first call. - waitWithContext(ctx, ll.randomDelay) - - waitTicker := time.NewTicker(ll.waitPeriod) - defer waitTicker.Stop() - - for { - lockID, err := ll.locker.Acquire(ctx) - if err != nil { - - if errors.Is(err, ErrLockConflict) && ll.earlyReturn { - - return nil - } - - if !errors.Is(err, ErrLockConflict) { - errChannel <- err - } - } - - if lockID != "" { - ll.locked = true - - funcCtx, funcCancel := context.WithCancel(ctx) - defer funcCancel() - - // Execute the lock protected function. - go func() { - defer funcCancel() - for _, f := range protectedFuncs { - err := f(funcCtx) - if err != nil { - errChannel <- fmt.Errorf("error executing protected function %w", err) - return - } - cancel() - } - }() - - // Maintain lease is a blocking function, it will return if there is - // an error maintaining the lease or the protected function returned. - err = ll.maintainLease(funcCtx) - if err != nil && !errors.Is(err, ErrLockConflict) { - errChannel <- fmt.Errorf("error renewing the lease: %w", err) - } - } - - waitTicker.Stop() - waitTicker = time.NewTicker(ll.waitPeriod) - select { - case <-ctx.Done(): - return nil - - case err := <-errChannel: - return fmt.Errorf("locks: %w", err) - - case <-waitTicker.C: - } - } -} - -func (ll *LockLeaser) maintainLease(ctx context.Context) error { - renewTicker := time.NewTicker(ll.renewalPeriod) - defer renewTicker.Stop() - for { - select { - case <-ctx.Done(): - return nil - - case <-renewTicker.C: - err := ll.locker.Renew(ctx) - if err != nil { - return err - } - } - } -} - -func waitWithContext(ctx context.Context, d time.Duration) { - t := time.NewTimer(d) - defer t.Stop() - - select { - case <-ctx.Done(): - case <-t.C: - } -} diff --git a/vendor/github.com/hashicorp/nomad/api/namespace.go b/vendor/github.com/hashicorp/nomad/api/namespace.go deleted file mode 100644 index 6cde45346d..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/namespace.go +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "sort" -) - -// Namespaces is used to query the namespace endpoints. -type Namespaces struct { - client *Client -} - -// Namespaces returns a new handle on the namespaces. -func (c *Client) Namespaces() *Namespaces { - return &Namespaces{client: c} -} - -// List is used to dump all of the namespaces. -func (n *Namespaces) List(q *QueryOptions) ([]*Namespace, *QueryMeta, error) { - var resp []*Namespace - qm, err := n.client.query("/v1/namespaces", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(NamespaceIndexSort(resp)) - return resp, qm, nil -} - -// PrefixList is used to do a PrefixList search over namespaces -func (n *Namespaces) PrefixList(prefix string, q *QueryOptions) ([]*Namespace, *QueryMeta, error) { - if q == nil { - q = &QueryOptions{Prefix: prefix} - } else { - q.Prefix = prefix - } - - return n.List(q) -} - -// Info is used to query a single namespace by its name. -func (n *Namespaces) Info(name string, q *QueryOptions) (*Namespace, *QueryMeta, error) { - var resp Namespace - qm, err := n.client.query("/v1/namespace/"+name, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Register is used to register a namespace. -func (n *Namespaces) Register(namespace *Namespace, q *WriteOptions) (*WriteMeta, error) { - wm, err := n.client.put("/v1/namespace", namespace, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Delete is used to delete a namespace -func (n *Namespaces) Delete(namespace string, q *WriteOptions) (*WriteMeta, error) { - wm, err := n.client.delete(fmt.Sprintf("/v1/namespace/%s", namespace), nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Namespace is used to serialize a namespace. -type Namespace struct { - Name string - Description string - Quota string - Capabilities *NamespaceCapabilities `hcl:"capabilities,block"` - NodePoolConfiguration *NamespaceNodePoolConfiguration `hcl:"node_pool_config,block"` - VaultConfiguration *NamespaceVaultConfiguration `hcl:"vault,block"` - ConsulConfiguration *NamespaceConsulConfiguration `hcl:"consul,block"` - Meta map[string]string - CreateIndex uint64 - ModifyIndex uint64 -} - -// NamespaceCapabilities represents a set of capabilities allowed for this -// namespace, to be checked at job submission time. -type NamespaceCapabilities struct { - EnabledTaskDrivers []string `hcl:"enabled_task_drivers"` - DisabledTaskDrivers []string `hcl:"disabled_task_drivers"` - EnabledNetworkModes []string `hcl:"enabled_network_modes"` - DisabledNetworkModes []string `hcl:"disabled_network_modes"` -} - -// NamespaceNodePoolConfiguration stores configuration about node pools for a -// namespace. -type NamespaceNodePoolConfiguration struct { - Default string - Allowed []string - Denied []string -} - -// NamespaceVaultConfiguration stores configuration about permissions to Vault -// clusters for a namespace, for use with Nomad Enterprise. -type NamespaceVaultConfiguration struct { - // Default is the Vault cluster used by jobs in this namespace that don't - // specify a cluster of their own. - Default string - - // Allowed specifies the Vault clusters that are allowed to be used by jobs - // in this namespace. By default, all clusters are allowed. If an empty list - // is provided only the namespace's default cluster is allowed. This field - // supports wildcard globbing through the use of `*` for multi-character - // matching. This field cannot be used with Denied. - Allowed []string - - // Denied specifies the Vault clusters that are not allowed to be used by - // jobs in this namespace. This field supports wildcard globbing through the - // use of `*` for multi-character matching. If specified, any cluster is - // allowed to be used, except for those that match any of these patterns. - // This field cannot be used with Allowed. - Denied []string -} - -// NamespaceConsulConfiguration stores configuration about permissions to Consul -// clusters for a namespace, for use with Nomad Enterprise. -type NamespaceConsulConfiguration struct { - // Default is the Consul cluster used by jobs in this namespace that don't - // specify a cluster of their own. - Default string - - // Allowed specifies the Consul clusters that are allowed to be used by jobs - // in this namespace. By default, all clusters are allowed. If an empty list - // is provided only the namespace's default cluster is allowed. This field - // supports wildcard globbing through the use of `*` for multi-character - // matching. This field cannot be used with Denied. - Allowed []string - - // Denied specifies the Consul clusters that are not allowed to be used by - // jobs in this namespace. This field supports wildcard globbing through the - // use of `*` for multi-character matching. If specified, any cluster is - // allowed to be used, except for those that match any of these patterns. - // This field cannot be used with Allowed. - Denied []string -} - -// NamespaceIndexSort is a wrapper to sort Namespaces by CreateIndex. We -// reverse the test so that we get the highest index first. -type NamespaceIndexSort []*Namespace - -func (n NamespaceIndexSort) Len() int { - return len(n) -} - -func (n NamespaceIndexSort) Less(i, j int) bool { - return n[i].CreateIndex > n[j].CreateIndex -} - -func (n NamespaceIndexSort) Swap(i, j int) { - n[i], n[j] = n[j], n[i] -} - -// NamespacedID is used for things that are unique only per-namespace, -// such as jobs. -type NamespacedID struct { - // Namespace is the Name of the Namespace - Namespace string - // ID is the ID of the namespaced object (e.g. Job ID) - ID string -} diff --git a/vendor/github.com/hashicorp/nomad/api/node_meta.go b/vendor/github.com/hashicorp/nomad/api/node_meta.go deleted file mode 100644 index fac17f090f..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/node_meta.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// NodeMetaApplyRequest contains the Node meta update. -type NodeMetaApplyRequest struct { - NodeID string - Meta map[string]*string -} - -// NodeMetaResponse contains the merged Node metadata. -type NodeMetaResponse struct { - // Meta is the merged static + dynamic Node metadata - Meta map[string]string - - // Dynamic is the dynamic Node metadata (set via API) - Dynamic map[string]*string - - // Static is the static Node metadata (set via agent configuration) - Static map[string]string -} - -// NodeMeta is a client for manipulating dynamic Node metadata. -type NodeMeta struct { - client *Client -} - -// Meta returns a NodeMeta client. -func (n *Nodes) Meta() *NodeMeta { - return &NodeMeta{client: n.client} -} - -// Apply dynamic Node metadata updates to a Node. If NodeID is unset then Node -// receiving the request is modified. -func (n *NodeMeta) Apply(meta *NodeMetaApplyRequest, qo *QueryOptions) (*NodeMetaResponse, error) { - var out NodeMetaResponse - _, err := n.client.postQuery("/v1/client/metadata", meta, &out, qo) - if err != nil { - return nil, err - } - return &out, nil -} - -// Read Node metadata (dynamic and static merged) from a Node directly. May -// differ from Node.Info as dynamic Node metadata updates are batched and may -// be delayed up to 10 seconds. -// -// If nodeID is empty then the metadata for the Node receiving the request is -// returned. -func (n *NodeMeta) Read(nodeID string, qo *QueryOptions) (*NodeMetaResponse, error) { - if qo == nil { - qo = &QueryOptions{} - } - - if qo.Params == nil { - qo.Params = make(map[string]string) - } - - if nodeID != "" { - qo.Params["node_id"] = nodeID - } - - var out NodeMetaResponse - _, err := n.client.query("/v1/client/metadata", &out, qo) - if err != nil { - return nil, err - } - - return &out, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/node_pools.go b/vendor/github.com/hashicorp/nomad/api/node_pools.go deleted file mode 100644 index d3f18bd875..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/node_pools.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "errors" - "fmt" - "net/url" -) - -const ( - // NodePoolAll is the node pool that always includes all nodes. - NodePoolAll = "all" - - // NodePoolDefault is the default node pool. - NodePoolDefault = "default" -) - -// NodePools is used to access node pools endpoints. -type NodePools struct { - client *Client -} - -// NodePools returns a handle on the node pools endpoints. -func (c *Client) NodePools() *NodePools { - return &NodePools{client: c} -} - -// List is used to list all node pools. -func (n *NodePools) List(q *QueryOptions) ([]*NodePool, *QueryMeta, error) { - var resp []*NodePool - qm, err := n.client.query("/v1/node/pools", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// PrefixList is used to list node pools that match a given prefix. -func (n *NodePools) PrefixList(prefix string, q *QueryOptions) ([]*NodePool, *QueryMeta, error) { - if q == nil { - q = &QueryOptions{} - } - q.Prefix = prefix - return n.List(q) -} - -// Info is used to fetch details of a specific node pool. -func (n *NodePools) Info(name string, q *QueryOptions) (*NodePool, *QueryMeta, error) { - if name == "" { - return nil, nil, errors.New("missing node pool name") - } - - var resp NodePool - qm, err := n.client.query("/v1/node/pool/"+url.PathEscape(name), &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Register is used to create or update a node pool. -func (n *NodePools) Register(pool *NodePool, w *WriteOptions) (*WriteMeta, error) { - if pool == nil { - return nil, errors.New("missing node pool") - } - if pool.Name == "" { - return nil, errors.New("missing node pool name") - } - - wm, err := n.client.put("/v1/node/pools", pool, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// Delete is used to delete a node pool. -func (n *NodePools) Delete(name string, w *WriteOptions) (*WriteMeta, error) { - if name == "" { - return nil, errors.New("missing node pool name") - } - - wm, err := n.client.delete("/v1/node/pool/"+url.PathEscape(name), nil, nil, w) - if err != nil { - return nil, err - } - return wm, nil -} - -// ListJobs is used to list all the jobs in a node pool. -func (n *NodePools) ListJobs(poolName string, q *QueryOptions) ([]*JobListStub, *QueryMeta, error) { - var resp []*JobListStub - qm, err := n.client.query( - fmt.Sprintf("/v1/node/pool/%s/jobs", url.PathEscape(poolName)), - &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// ListNodes is used to list all the nodes in a node pool. -func (n *NodePools) ListNodes(poolName string, q *QueryOptions) ([]*NodeListStub, *QueryMeta, error) { - var resp []*NodeListStub - qm, err := n.client.query( - fmt.Sprintf("/v1/node/pool/%s/nodes", url.PathEscape(poolName)), - &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// NodePool is used to serialize a node pool. -type NodePool struct { - Name string `hcl:"name,label"` - Description string `hcl:"description,optional"` - Meta map[string]string `hcl:"meta,block"` - SchedulerConfiguration *NodePoolSchedulerConfiguration `hcl:"scheduler_config,block"` - CreateIndex uint64 - ModifyIndex uint64 -} - -// NodePoolSchedulerConfiguration is used to serialize the scheduler -// configuration of a node pool. -type NodePoolSchedulerConfiguration struct { - SchedulerAlgorithm SchedulerAlgorithm `hcl:"scheduler_algorithm,optional"` - MemoryOversubscriptionEnabled *bool `hcl:"memory_oversubscription_enabled,optional"` -} diff --git a/vendor/github.com/hashicorp/nomad/api/nodes.go b/vendor/github.com/hashicorp/nomad/api/nodes.go deleted file mode 100644 index a779ee4961..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/nodes.go +++ /dev/null @@ -1,970 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "fmt" - "sort" - "strconv" - "time" -) - -const ( - NodeStatusInit = "initializing" - NodeStatusReady = "ready" - NodeStatusDown = "down" - NodeStatusDisconnected = "disconnected" - - // NodeSchedulingEligible and Ineligible marks the node as eligible or not, - // respectively, for receiving allocations. This is orthogonal to the node - // status being ready. - NodeSchedulingEligible = "eligible" - NodeSchedulingIneligible = "ineligible" - - DrainStatusDraining DrainStatus = "draining" - DrainStatusComplete DrainStatus = "complete" - DrainStatusCanceled DrainStatus = "canceled" -) - -// Nodes is used to query node-related API endpoints -type Nodes struct { - client *Client -} - -// Nodes returns a handle on the node endpoints. -func (c *Client) Nodes() *Nodes { - return &Nodes{client: c} -} - -// List is used to list out all the nodes -func (n *Nodes) List(q *QueryOptions) ([]*NodeListStub, *QueryMeta, error) { - var resp NodeIndexSort - qm, err := n.client.query("/v1/nodes", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(resp) - return resp, qm, nil -} - -func (n *Nodes) PrefixList(prefix string) ([]*NodeListStub, *QueryMeta, error) { - return n.List(&QueryOptions{Prefix: prefix}) -} - -func (n *Nodes) PrefixListOpts(prefix string, opts *QueryOptions) ([]*NodeListStub, *QueryMeta, error) { - if opts == nil { - opts = &QueryOptions{Prefix: prefix} - } else { - opts.Prefix = prefix - } - return n.List(opts) -} - -// Info is used to query a specific node by its ID. -func (n *Nodes) Info(nodeID string, q *QueryOptions) (*Node, *QueryMeta, error) { - var resp Node - qm, err := n.client.query("/v1/node/"+nodeID, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// NodeUpdateDrainRequest is used to update the drain specification for a node. -type NodeUpdateDrainRequest struct { - // NodeID is the node to update the drain specification for. - NodeID string - - // DrainSpec is the drain specification to set for the node. A nil DrainSpec - // will disable draining. - DrainSpec *DrainSpec - - // MarkEligible marks the node as eligible for scheduling if removing - // the drain strategy. - MarkEligible bool - - // Meta allows operators to specify metadata related to the drain operation - Meta map[string]string -} - -// NodeDrainUpdateResponse is used to respond to a node drain update -type NodeDrainUpdateResponse struct { - NodeModifyIndex uint64 - EvalIDs []string - EvalCreateIndex uint64 - WriteMeta -} - -// DrainOptions is used to pass through node drain parameters -type DrainOptions struct { - // DrainSpec contains the drain specification for the node. If non-nil, - // the node will be marked ineligible and begin/continue draining according - // to the provided drain spec. - // If nil, any existing drain operation will be canceled. - DrainSpec *DrainSpec - - // MarkEligible indicates whether the node should be marked as eligible when - // canceling a drain operation. - MarkEligible bool - - // Meta is metadata that is persisted in Node.LastDrain about this - // drain update. - Meta map[string]string -} - -// UpdateDrain is used to update the drain strategy for a given node. If -// markEligible is true and the drain is being removed, the node will be marked -// as having its scheduling being eligible -func (n *Nodes) UpdateDrain(nodeID string, spec *DrainSpec, markEligible bool, q *WriteOptions) (*NodeDrainUpdateResponse, error) { - resp, err := n.UpdateDrainOpts(nodeID, &DrainOptions{ - DrainSpec: spec, - MarkEligible: markEligible, - Meta: nil, - }, q) - return resp, err -} - -// UpdateDrainOpts is used to update the drain strategy for a given node. If -// markEligible is true and the drain is being removed, the node will be marked -// as having its scheduling being eligible -func (n *Nodes) UpdateDrainOpts(nodeID string, opts *DrainOptions, q *WriteOptions) (*NodeDrainUpdateResponse, - error) { - req := &NodeUpdateDrainRequest{ - NodeID: nodeID, - DrainSpec: opts.DrainSpec, - MarkEligible: opts.MarkEligible, - Meta: opts.Meta, - } - - var resp NodeDrainUpdateResponse - wm, err := n.client.put("/v1/node/"+nodeID+"/drain", req, &resp, q) - if err != nil { - return nil, err - } - resp.WriteMeta = *wm - return &resp, nil -} - -// MonitorMsgLevels represents the severity log level of a MonitorMessage. -type MonitorMsgLevel int - -const ( - MonitorMsgLevelNormal MonitorMsgLevel = 0 - MonitorMsgLevelInfo MonitorMsgLevel = 1 - MonitorMsgLevelWarn MonitorMsgLevel = 2 - MonitorMsgLevelError MonitorMsgLevel = 3 -) - -// MonitorMessage contains a message and log level. -type MonitorMessage struct { - Level MonitorMsgLevel - Message string -} - -// Messagef formats a new MonitorMessage. -func Messagef(lvl MonitorMsgLevel, msg string, args ...interface{}) *MonitorMessage { - return &MonitorMessage{ - Level: lvl, - Message: fmt.Sprintf(msg, args...), - } -} - -func (m *MonitorMessage) String() string { - return m.Message -} - -// MonitorDrain emits drain related events on the returned string channel. The -// channel will be closed when all allocations on the draining node have -// stopped, when an error occurs, or if the context is canceled. -func (n *Nodes) MonitorDrain(ctx context.Context, nodeID string, index uint64, ignoreSys bool) <-chan *MonitorMessage { - outCh := make(chan *MonitorMessage, 8) - nodeCh := make(chan *MonitorMessage, 1) - allocCh := make(chan *MonitorMessage, 8) - - // Multiplex node and alloc chans onto outCh. This goroutine closes - // outCh when other chans have been closed. - multiplexCtx, cancel := context.WithCancel(ctx) - go n.monitorDrainMultiplex(multiplexCtx, cancel, outCh, nodeCh, allocCh) - - // Monitor node for updates - go n.monitorDrainNode(multiplexCtx, nodeID, index, nodeCh) - - // Monitor allocs on node for updates - go n.monitorDrainAllocs(multiplexCtx, nodeID, ignoreSys, allocCh) - - return outCh -} - -// monitorDrainMultiplex multiplexes node and alloc updates onto the out chan. -// Closes out chan when either the context is canceled, both update chans are -// closed, or an error occurs. -func (n *Nodes) monitorDrainMultiplex(ctx context.Context, cancel func(), - outCh chan<- *MonitorMessage, nodeCh, allocCh <-chan *MonitorMessage) { - - defer cancel() - defer close(outCh) - - nodeOk := true - allocOk := true - var msg *MonitorMessage - for { - // If both chans have been closed, close the output chan - if !nodeOk && !allocOk { - return - } - - select { - case msg, nodeOk = <-nodeCh: - if !nodeOk { - // nil chan to prevent further recvs - nodeCh = nil - continue - } - - case msg, allocOk = <-allocCh: - if !allocOk { - // nil chan to prevent further recvs - allocCh = nil - continue - } - - case <-ctx.Done(): - return - } - - if msg == nil { - continue - } - - select { - case outCh <- msg: - case <-ctx.Done(): - return - } - - // Abort on error messages - if msg.Level == MonitorMsgLevelError { - return - } - } -} - -// monitorDrainNode emits node updates on nodeCh and closes the channel when -// the node has finished draining. -func (n *Nodes) monitorDrainNode(ctx context.Context, nodeID string, - index uint64, nodeCh chan<- *MonitorMessage) { - - defer close(nodeCh) - - var lastStrategy *DrainStrategy - q := QueryOptions{ - AllowStale: true, - WaitIndex: index, - } - for { - node, meta, err := n.Info(nodeID, &q) - if err != nil { - msg := Messagef(MonitorMsgLevelError, "Error monitoring node: %v", err) - select { - case nodeCh <- msg: - case <-ctx.Done(): - } - return - } - - if node.DrainStrategy == nil { - msg := Messagef(MonitorMsgLevelInfo, "Drain complete for node %s", nodeID) - select { - case nodeCh <- msg: - case <-ctx.Done(): - } - return - } - - if node.Status == NodeStatusDown { - msg := Messagef(MonitorMsgLevelWarn, "Node %q down", nodeID) - select { - case nodeCh <- msg: - case <-ctx.Done(): - } - } - - // DrainStrategy changed - if lastStrategy != nil && !node.DrainStrategy.Equal(lastStrategy) { - msg := Messagef(MonitorMsgLevelInfo, "Node %q drain updated: %s", nodeID, node.DrainStrategy) - select { - case nodeCh <- msg: - case <-ctx.Done(): - return - } - } - - lastStrategy = node.DrainStrategy - - // Drain still ongoing, update index and block for updates - q.WaitIndex = meta.LastIndex - } -} - -// monitorDrainAllocs emits alloc updates on allocCh and closes the channel -// when the node has finished draining. -func (n *Nodes) monitorDrainAllocs(ctx context.Context, nodeID string, ignoreSys bool, allocCh chan<- *MonitorMessage) { - defer close(allocCh) - - q := QueryOptions{AllowStale: true} - initial := make(map[string]*Allocation, 4) - - for { - allocs, meta, err := n.Allocations(nodeID, &q) - if err != nil { - msg := Messagef(MonitorMsgLevelError, "Error monitoring allocations: %v", err) - select { - case allocCh <- msg: - case <-ctx.Done(): - } - return - } - - q.WaitIndex = meta.LastIndex - - runningAllocs := 0 - for _, a := range allocs { - // Get previous version of alloc - orig, existing := initial[a.ID] - - // Update local alloc state - initial[a.ID] = a - - migrating := a.DesiredTransition.ShouldMigrate() - - var msg string - switch { - case !existing: - // Should only be possible if response - // from initial Allocations call was - // stale. No need to output - - case orig.ClientStatus != a.ClientStatus: - // Alloc status has changed; output - msg = fmt.Sprintf("status %s -> %s", orig.ClientStatus, a.ClientStatus) - - case migrating && !orig.DesiredTransition.ShouldMigrate(): - // Alloc was marked for migration - msg = "marked for migration" - - case migrating && (orig.DesiredStatus != a.DesiredStatus) && a.DesiredStatus == AllocDesiredStatusStop: - // Alloc has already been marked for migration and is now being stopped - msg = "draining" - } - - if msg != "" { - select { - case allocCh <- Messagef(MonitorMsgLevelNormal, "Alloc %q %s", a.ID, msg): - case <-ctx.Done(): - return - } - } - - // Ignore malformed allocs - if a.Job == nil || a.Job.Type == nil { - continue - } - - // Track how many allocs are still running - if ignoreSys && a.Job.Type != nil && *a.Job.Type == JobTypeSystem { - continue - } - - switch a.ClientStatus { - case AllocClientStatusPending, AllocClientStatusRunning: - runningAllocs++ - } - } - - // Exit if all allocs are terminal - if runningAllocs == 0 { - msg := Messagef(MonitorMsgLevelInfo, "All allocations on node %q have stopped", nodeID) - select { - case allocCh <- msg: - case <-ctx.Done(): - } - return - } - } -} - -// NodeUpdateEligibilityRequest is used to update the drain specification for a node. -type NodeUpdateEligibilityRequest struct { - // NodeID is the node to update the drain specification for. - NodeID string - Eligibility string -} - -// NodeEligibilityUpdateResponse is used to respond to a node eligibility update -type NodeEligibilityUpdateResponse struct { - NodeModifyIndex uint64 - EvalIDs []string - EvalCreateIndex uint64 - WriteMeta -} - -// ToggleEligibility is used to update the scheduling eligibility of the node -func (n *Nodes) ToggleEligibility(nodeID string, eligible bool, q *WriteOptions) (*NodeEligibilityUpdateResponse, error) { - e := NodeSchedulingEligible - if !eligible { - e = NodeSchedulingIneligible - } - - req := &NodeUpdateEligibilityRequest{ - NodeID: nodeID, - Eligibility: e, - } - - var resp NodeEligibilityUpdateResponse - wm, err := n.client.put("/v1/node/"+nodeID+"/eligibility", req, &resp, q) - if err != nil { - return nil, err - } - resp.WriteMeta = *wm - return &resp, nil -} - -// Allocations is used to return the allocations associated with a node. -func (n *Nodes) Allocations(nodeID string, q *QueryOptions) ([]*Allocation, *QueryMeta, error) { - var resp []*Allocation - qm, err := n.client.query("/v1/node/"+nodeID+"/allocations", &resp, q) - if err != nil { - return nil, nil, err - } - sort.Sort(AllocationSort(resp)) - return resp, qm, nil -} - -func (n *Nodes) CSIVolumes(nodeID string, q *QueryOptions) ([]*CSIVolumeListStub, error) { - var resp []*CSIVolumeListStub - path := fmt.Sprintf("/v1/volumes?type=csi&node_id=%s", nodeID) - if _, err := n.client.query(path, &resp, q); err != nil { - return nil, err - } - - return resp, nil -} - -// ForceEvaluate is used to force-evaluate an existing node. -func (n *Nodes) ForceEvaluate(nodeID string, q *WriteOptions) (string, *WriteMeta, error) { - var resp nodeEvalResponse - wm, err := n.client.put("/v1/node/"+nodeID+"/evaluate", nil, &resp, q) - if err != nil { - return "", nil, err - } - return resp.EvalID, wm, nil -} - -func (n *Nodes) Stats(nodeID string, q *QueryOptions) (*HostStats, error) { - var resp HostStats - path := fmt.Sprintf("/v1/client/stats?node_id=%s", nodeID) - if _, err := n.client.query(path, &resp, q); err != nil { - return nil, err - } - - return &resp, nil -} - -func (n *Nodes) GC(nodeID string, q *QueryOptions) error { - path := fmt.Sprintf("/v1/client/gc?node_id=%s", nodeID) - _, err := n.client.query(path, nil, q) - return err -} - -// GcAlloc - TODO Add tests -func (n *Nodes) GcAlloc(allocID string, q *QueryOptions) error { - path := fmt.Sprintf("/v1/client/allocation/%s/gc", allocID) - _, err := n.client.query(path, nil, q) - return err -} - -// Purge removes a node from the system. Nodes can still re-join the cluster if -// they are alive. -func (n *Nodes) Purge(nodeID string, q *QueryOptions) (*NodePurgeResponse, *QueryMeta, error) { - var resp NodePurgeResponse - path := fmt.Sprintf("/v1/node/%s/purge", nodeID) - qm, err := n.client.putQuery(path, nil, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// NodePurgeResponse is used to deserialize a Purge response. -type NodePurgeResponse struct { - EvalIDs []string - EvalCreateIndex uint64 - NodeModifyIndex uint64 -} - -// DriverInfo is used to deserialize a DriverInfo entry -type DriverInfo struct { - Attributes map[string]string - Detected bool - Healthy bool - HealthDescription string - UpdateTime time.Time -} - -// HostVolumeInfo is used to return metadata about a given HostVolume. -type HostVolumeInfo struct { - Path string - ReadOnly bool - // ID is set for dynamic host volumes only. - ID string -} - -// HostNetworkInfo is used to return metadata about a given HostNetwork -type HostNetworkInfo struct { - Name string - CIDR string - Interface string - ReservedPorts string -} - -type DrainStatus string - -// DrainMetadata contains information about the most recent drain operation for a given Node. -type DrainMetadata struct { - StartedAt time.Time - UpdatedAt time.Time - Status DrainStatus - AccessorID string - Meta map[string]string -} - -// Node is used to deserialize a node entry. -type Node struct { - ID string - Datacenter string - Name string - HTTPAddr string - TLSEnabled bool - Attributes map[string]string - Resources *Resources - Reserved *Resources - NodeResources *NodeResources - ReservedResources *NodeReservedResources - Links map[string]string - Meta map[string]string - NodeClass string - NodePool string - CgroupParent string - Drain bool - DrainStrategy *DrainStrategy - SchedulingEligibility string - Status string - StatusDescription string - StatusUpdatedAt int64 - Events []*NodeEvent - Drivers map[string]*DriverInfo - HostVolumes map[string]*HostVolumeInfo - GCVolumesOnNodeGC bool - HostNetworks map[string]*HostNetworkInfo - CSIControllerPlugins map[string]*CSIInfo - CSINodePlugins map[string]*CSIInfo - LastDrain *DrainMetadata - CreateIndex uint64 - ModifyIndex uint64 - NodeMaxAllocs int -} - -type NodeResources struct { - Cpu NodeCpuResources - Memory NodeMemoryResources - Disk NodeDiskResources - Networks []*NetworkResource - Devices []*NodeDeviceResource - - MinDynamicPort int - MaxDynamicPort int -} - -type NodeCpuResources struct { - CpuShares int64 - TotalCpuCores uint16 - ReservableCpuCores []uint16 -} - -type NodeMemoryResources struct { - MemoryMB int64 -} - -type NodeDiskResources struct { - DiskMB int64 -} - -type NodeReservedResources struct { - Cpu NodeReservedCpuResources - Memory NodeReservedMemoryResources - Disk NodeReservedDiskResources - Networks NodeReservedNetworkResources -} - -type NodeReservedCpuResources struct { - CpuShares uint64 -} - -type NodeReservedMemoryResources struct { - MemoryMB uint64 -} - -type NodeReservedDiskResources struct { - DiskMB uint64 -} - -type NodeReservedNetworkResources struct { - ReservedHostPorts string -} - -type CSITopologyRequest struct { - Required []*CSITopology `hcl:"required"` - Preferred []*CSITopology `hcl:"preferred"` -} - -type CSITopology struct { - Segments map[string]string `hcl:"segments"` -} - -// CSINodeInfo is the fingerprinted data from a CSI Plugin that is specific to -// the Node API. -type CSINodeInfo struct { - ID string - MaxVolumes int64 - AccessibleTopology *CSITopology - - // RequiresNodeStageVolume indicates whether the client should Stage/Unstage - // volumes on this node. - RequiresNodeStageVolume bool - - // SupportsStats indicates plugin support for GET_VOLUME_STATS - SupportsStats bool - - // SupportsExpand indicates plugin support for EXPAND_VOLUME - SupportsExpand bool - - // SupportsCondition indicates plugin support for VOLUME_CONDITION - SupportsCondition bool -} - -// CSIControllerInfo is the fingerprinted data from a CSI Plugin that is specific to -// the Controller API. -type CSIControllerInfo struct { - // SupportsCreateDelete indicates plugin support for CREATE_DELETE_VOLUME - SupportsCreateDelete bool - - // SupportsPublishVolume is true when the controller implements the - // methods required to attach and detach volumes. If this is false Nomad - // should skip the controller attachment flow. - SupportsAttachDetach bool - - // SupportsListVolumes is true when the controller implements the - // ListVolumes RPC. NOTE: This does not guarantee that attached nodes will - // be returned unless SupportsListVolumesAttachedNodes is also true. - SupportsListVolumes bool - - // SupportsGetCapacity indicates plugin support for GET_CAPACITY - SupportsGetCapacity bool - - // SupportsCreateDeleteSnapshot indicates plugin support for - // CREATE_DELETE_SNAPSHOT - SupportsCreateDeleteSnapshot bool - - // SupportsListSnapshots indicates plugin support for LIST_SNAPSHOTS - SupportsListSnapshots bool - - // SupportsClone indicates plugin support for CLONE_VOLUME - SupportsClone bool - - // SupportsReadOnlyAttach is set to true when the controller returns the - // ATTACH_READONLY capability. - SupportsReadOnlyAttach bool - - // SupportsExpand indicates plugin support for EXPAND_VOLUME - SupportsExpand bool - - // SupportsListVolumesAttachedNodes indicates whether the plugin will - // return attached nodes data when making ListVolume RPCs (plugin support - // for LIST_VOLUMES_PUBLISHED_NODES) - SupportsListVolumesAttachedNodes bool - - // SupportsCondition indicates plugin support for VOLUME_CONDITION - SupportsCondition bool - - // SupportsGet indicates plugin support for GET_VOLUME - SupportsGet bool -} - -// CSIInfo is the current state of a single CSI Plugin. This is updated regularly -// as plugin health changes on the node. -type CSIInfo struct { - PluginID string - AllocID string - Healthy bool - HealthDescription string - UpdateTime time.Time - RequiresControllerPlugin bool - RequiresTopologies bool - ControllerInfo *CSIControllerInfo `json:",omitempty"` - NodeInfo *CSINodeInfo `json:",omitempty"` -} - -// DrainStrategy describes a Node's drain behavior. -type DrainStrategy struct { - // DrainSpec is the user declared drain specification - DrainSpec - - // ForceDeadline is the deadline time for the drain after which drains will - // be forced - ForceDeadline time.Time - - // StartedAt is the time the drain process started - StartedAt time.Time -} - -// DrainSpec describes a Node's drain behavior. -type DrainSpec struct { - // Deadline is the duration after StartTime when the remaining - // allocations on a draining Node should be told to stop. - Deadline time.Duration - - // IgnoreSystemJobs allows systems jobs to remain on the node even though it - // has been marked for draining. - IgnoreSystemJobs bool -} - -func (d *DrainStrategy) Equal(o *DrainStrategy) bool { - if d == nil || o == nil { - return d == o - } - - if d.ForceDeadline != o.ForceDeadline { - return false - } - if d.Deadline != o.Deadline { - return false - } - if d.IgnoreSystemJobs != o.IgnoreSystemJobs { - return false - } - - return true -} - -// String returns a human readable version of the drain strategy. -func (d *DrainStrategy) String() string { - if d.IgnoreSystemJobs { - return fmt.Sprintf("drain ignoring system jobs and deadline at %s", d.ForceDeadline) - } - return fmt.Sprintf("drain with deadline at %s", d.ForceDeadline) -} - -const ( - NodeEventSubsystemDrain = "Drain" - NodeEventSubsystemDriver = "Driver" - NodeEventSubsystemHeartbeat = "Heartbeat" - NodeEventSubsystemCluster = "Cluster" -) - -// NodeEvent is a single unit representing a node’s state change -type NodeEvent struct { - Message string - Subsystem string - Details map[string]string - Timestamp time.Time - CreateIndex uint64 -} - -// HostStats represents resource usage stats of the host running a Nomad client -type HostStats struct { - Memory *HostMemoryStats - CPU []*HostCPUStats - DiskStats []*HostDiskStats - AllocDirStats *HostDiskStats - DeviceStats []*DeviceGroupStats - Uptime uint64 - CPUTicksConsumed float64 -} - -type HostMemoryStats struct { - Total uint64 - Available uint64 - Used uint64 - Free uint64 -} - -type HostCPUStats struct { - CPU string - User float64 - System float64 - Idle float64 -} - -type HostDiskStats struct { - Device string - Mountpoint string - Size uint64 - Used uint64 - Available uint64 - UsedPercent float64 - InodesUsedPercent float64 -} - -// DeviceGroupStats contains statistics for each device of a particular -// device group, identified by the vendor, type and name of the device. -type DeviceGroupStats struct { - Vendor string - Type string - Name string - - // InstanceStats is a mapping of each device ID to its statistics. - InstanceStats map[string]*DeviceStats -} - -// DeviceStats is the statistics for an individual device -type DeviceStats struct { - // Summary exposes a single summary metric that should be the most - // informative to users. - Summary *StatValue - - // Stats contains the verbose statistics for the device. - Stats *StatObject - - // Timestamp is the time the statistics were collected. - Timestamp time.Time -} - -// StatObject is a collection of statistics either exposed at the top -// level or via nested StatObjects. -type StatObject struct { - // Nested is a mapping of object name to a nested stats object. - Nested map[string]*StatObject - - // Attributes is a mapping of statistic name to its value. - Attributes map[string]*StatValue -} - -// StatValue exposes the values of a particular statistic. The value may be of -// type float, integer, string or boolean. Numeric types can be exposed as a -// single value or as a fraction. -type StatValue struct { - // FloatNumeratorVal exposes a floating point value. If denominator is set - // it is assumed to be a fractional value, otherwise it is a scalar. - FloatNumeratorVal *float64 `json:",omitempty"` - FloatDenominatorVal *float64 `json:",omitempty"` - - // IntNumeratorVal exposes a int value. If denominator is set it is assumed - // to be a fractional value, otherwise it is a scalar. - IntNumeratorVal *int64 `json:",omitempty"` - IntDenominatorVal *int64 `json:",omitempty"` - - // StringVal exposes a string value. These are likely annotations. - StringVal *string `json:",omitempty"` - - // BoolVal exposes a boolean statistic. - BoolVal *bool `json:",omitempty"` - - // Unit gives the unit type: °F, %, MHz, MB, etc. - Unit string `json:",omitempty"` - - // Desc provides a human readable description of the statistic. - Desc string `json:",omitempty"` -} - -func (v *StatValue) String() string { - switch { - case v == nil: - return "" - case v.BoolVal != nil: - return strconv.FormatBool(*v.BoolVal) - case v.StringVal != nil: - return *v.StringVal - case v.FloatNumeratorVal != nil: - str := formatFloat(*v.FloatNumeratorVal, 3) - if v.FloatDenominatorVal != nil { - str += " / " + formatFloat(*v.FloatDenominatorVal, 3) - } - - if v.Unit != "" { - str += " " + v.Unit - } - return str - case v.IntNumeratorVal != nil: - str := strconv.FormatInt(*v.IntNumeratorVal, 10) - if v.IntDenominatorVal != nil { - str += " / " + strconv.FormatInt(*v.IntDenominatorVal, 10) - } - - if v.Unit != "" { - str += " " + v.Unit - } - return str - default: - return "" - } -} - -// NodeListStub is a subset of information returned during -// node list operations. -type NodeListStub struct { - Address string - ID string - Attributes map[string]string `json:",omitempty"` - Datacenter string - Name string - NodeClass string - NodePool string - Version string - Drain bool - SchedulingEligibility string - Status string - StatusDescription string - Drivers map[string]*DriverInfo - NodeResources *NodeResources `json:",omitempty"` - ReservedResources *NodeReservedResources `json:",omitempty"` - LastDrain *DrainMetadata - CreateIndex uint64 - ModifyIndex uint64 -} - -// NodeIndexSort reverse sorts nodes by CreateIndex -type NodeIndexSort []*NodeListStub - -func (n NodeIndexSort) Len() int { - return len(n) -} - -func (n NodeIndexSort) Less(i, j int) bool { - return n[i].CreateIndex > n[j].CreateIndex -} - -func (n NodeIndexSort) Swap(i, j int) { - n[i], n[j] = n[j], n[i] -} - -// nodeEvalResponse is used to decode a force-eval. -type nodeEvalResponse struct { - EvalID string -} - -// AllocationSort reverse sorts allocs by CreateIndex. -type AllocationSort []*Allocation - -func (a AllocationSort) Len() int { - return len(a) -} - -func (a AllocationSort) Less(i, j int) bool { - return a[i].CreateIndex > a[j].CreateIndex -} - -func (a AllocationSort) Swap(i, j int) { - a[i], a[j] = a[j], a[i] -} diff --git a/vendor/github.com/hashicorp/nomad/api/operator.go b/vendor/github.com/hashicorp/nomad/api/operator.go deleted file mode 100644 index ec5e7d4152..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/operator.go +++ /dev/null @@ -1,503 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "errors" - "io" - "net/http" - "net/url" - "strconv" - "strings" - "time" -) - -// Operator can be used to perform low-level operator tasks for Nomad. -type Operator struct { - c *Client -} - -// Operator returns a handle to the operator endpoints. -func (c *Client) Operator() *Operator { - return &Operator{c} -} - -// RaftServer has information about a server in the Raft configuration. -type RaftServer struct { - // ID is the unique ID for the server. These are currently the same - // as the address, but they will be changed to a real GUID in a future - // release of Nomad. - ID string - - // Node is the node name of the server, as known by Nomad, or this - // will be set to "(unknown)" otherwise. - Node string - - // Address is the IP:port of the server, used for Raft communications. - Address string - - // Leader is true if this server is the current cluster leader. - Leader bool - - // Voter is true if this server has a vote in the cluster. This might - // be false if the server is staging and still coming online, or if - // it's a non-voting server, which will be added in a future release of - // Nomad. - Voter bool - - // RaftProtocol is the version of the Raft protocol spoken by this server. - RaftProtocol string -} - -// RaftConfiguration is returned when querying for the current Raft configuration. -type RaftConfiguration struct { - // Servers has the list of servers in the Raft configuration. - Servers []*RaftServer - - // Index has the Raft index of this configuration. - Index uint64 -} - -// RaftGetConfiguration is used to query the current Raft peer set. -func (op *Operator) RaftGetConfiguration(q *QueryOptions) (*RaftConfiguration, error) { - r, err := op.c.newRequest("GET", "/v1/operator/raft/configuration") - if err != nil { - return nil, err - } - r.setQueryOptions(q) - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - defer resp.Body.Close() - - var out RaftConfiguration - if err := decodeBody(resp, &out); err != nil { - return nil, err - } - return &out, nil -} - -// RaftRemovePeerByAddress is used to kick a stale peer (one that it in the Raft -// quorum but no longer known to Serf or the catalog) by address in the form of -// "IP:port". -// -// DEPRECATED: this method supported Raft Protocol v2, which was removed from -// Nomad in 1.4.0. The address parameter of the HTTP endpoint has been made -// non-function in Nomad 1.10.x and will be removed in Nomad 1.12.0. -func (op *Operator) RaftRemovePeerByAddress(address string, q *WriteOptions) error { - r, err := op.c.newRequest("DELETE", "/v1/operator/raft/peer") - if err != nil { - return err - } - r.setWriteOptions(q) - - r.params.Set("address", address) - - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return err - } - - resp.Body.Close() - return nil -} - -// RaftRemovePeerByID is used to kick a stale peer (one that is in the Raft -// quorum but no longer known to Serf or the catalog) by ID. -func (op *Operator) RaftRemovePeerByID(id string, q *WriteOptions) error { - r, err := op.c.newRequest("DELETE", "/v1/operator/raft/peer") - if err != nil { - return err - } - r.setWriteOptions(q) - - r.params.Set("id", id) - - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return err - } - - resp.Body.Close() - return nil -} - -// RaftTransferLeadershipByAddress is used to transfer leadership to a -// different peer using its address in the form of "IP:port". -func (op *Operator) RaftTransferLeadershipByAddress(address string, q *WriteOptions) error { - r, err := op.c.newRequest("PUT", "/v1/operator/raft/transfer-leadership") - if err != nil { - return err - } - r.setWriteOptions(q) - - r.params.Set("address", address) - - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return err - } - - resp.Body.Close() - return nil -} - -// RaftTransferLeadershipByID is used to transfer leadership to a -// different peer using its Raft ID. -func (op *Operator) RaftTransferLeadershipByID(id string, q *WriteOptions) error { - r, err := op.c.newRequest("PUT", "/v1/operator/raft/transfer-leadership") - if err != nil { - return err - } - r.setWriteOptions(q) - - r.params.Set("id", id) - - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return err - } - - resp.Body.Close() - return nil -} - -// SchedulerConfiguration is the config for controlling scheduler behavior -type SchedulerConfiguration struct { - // SchedulerAlgorithm lets you select between available scheduling algorithms. - SchedulerAlgorithm SchedulerAlgorithm - - // PreemptionConfig specifies whether to enable eviction of lower - // priority jobs to place higher priority jobs. - PreemptionConfig PreemptionConfig - - // MemoryOversubscriptionEnabled specifies whether memory oversubscription is enabled - MemoryOversubscriptionEnabled bool - - // RejectJobRegistration disables new job registrations except with a - // management ACL token - RejectJobRegistration bool - - // PauseEvalBroker stops the leader evaluation broker process from running - // until the configuration is updated and written to the Nomad servers. - PauseEvalBroker bool - - // CreateIndex/ModifyIndex store the create/modify indexes of this configuration. - CreateIndex uint64 - ModifyIndex uint64 -} - -// SchedulerConfigurationResponse is the response object that wraps SchedulerConfiguration -type SchedulerConfigurationResponse struct { - // SchedulerConfig contains scheduler config options - SchedulerConfig *SchedulerConfiguration - - QueryMeta -} - -// SchedulerSetConfigurationResponse is the response object used -// when updating scheduler configuration -type SchedulerSetConfigurationResponse struct { - // Updated returns whether the config was actually updated - // Only set when the request uses CAS - Updated bool - - WriteMeta -} - -// SchedulerAlgorithm is an enum string that encapsulates the valid options for a -// SchedulerConfiguration block's SchedulerAlgorithm. These modes will allow the -// scheduler to be user-selectable. -type SchedulerAlgorithm string - -const ( - SchedulerAlgorithmBinpack SchedulerAlgorithm = "binpack" - SchedulerAlgorithmSpread SchedulerAlgorithm = "spread" -) - -// PreemptionConfig specifies whether preemption is enabled based on scheduler type -type PreemptionConfig struct { - SystemSchedulerEnabled bool - SysBatchSchedulerEnabled bool - BatchSchedulerEnabled bool - ServiceSchedulerEnabled bool -} - -// SchedulerGetConfiguration is used to query the current Scheduler configuration. -func (op *Operator) SchedulerGetConfiguration(q *QueryOptions) (*SchedulerConfigurationResponse, *QueryMeta, error) { - var resp SchedulerConfigurationResponse - qm, err := op.c.query("/v1/operator/scheduler/configuration", &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// SchedulerSetConfiguration is used to set the current Scheduler configuration. -func (op *Operator) SchedulerSetConfiguration(conf *SchedulerConfiguration, q *WriteOptions) (*SchedulerSetConfigurationResponse, *WriteMeta, error) { - var out SchedulerSetConfigurationResponse - wm, err := op.c.put("/v1/operator/scheduler/configuration", conf, &out, q) - if err != nil { - return nil, nil, err - } - return &out, wm, nil -} - -// SchedulerCASConfiguration is used to perform a Check-And-Set update on the -// Scheduler configuration. The ModifyIndex value will be respected. Returns -// true on success or false on failures. -func (op *Operator) SchedulerCASConfiguration(conf *SchedulerConfiguration, q *WriteOptions) (*SchedulerSetConfigurationResponse, *WriteMeta, error) { - var out SchedulerSetConfigurationResponse - wm, err := op.c.put("/v1/operator/scheduler/configuration?cas="+strconv.FormatUint(conf.ModifyIndex, 10), conf, &out, q) - if err != nil { - return nil, nil, err - } - - return &out, wm, nil -} - -// Snapshot is used to capture a snapshot state of a running cluster. -// The returned reader that must be consumed fully -func (op *Operator) Snapshot(q *QueryOptions) (io.ReadCloser, error) { - r, err := op.c.newRequest("GET", "/v1/operator/snapshot") - if err != nil { - return nil, err - } - r.setQueryOptions(q) - _, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - - digest := resp.Header.Get("Digest") - - cr, err := newChecksumValidatingReader(resp.Body, digest) - if err != nil { - io.Copy(io.Discard, resp.Body) - resp.Body.Close() - return nil, err - } - - return cr, nil -} - -// SnapshotRestore is used to restore a running nomad cluster to an original -// state. -func (op *Operator) SnapshotRestore(in io.Reader, q *WriteOptions) (*WriteMeta, error) { - wm, err := op.c.put("/v1/operator/snapshot", in, nil, q) - if err != nil { - return nil, err - } - - return wm, nil -} - -type License struct { - // The unique identifier of the license - LicenseID string - - // The customer ID associated with the license - CustomerID string - - // If set, an identifier that should be used to lock the license to a - // particular site, cluster, etc. - InstallationID string - - // The time at which the license was issued - IssueTime time.Time - - // The time at which the license starts being valid - StartTime time.Time - - // The time after which the license expires - ExpirationTime time.Time - - // The time at which the license ceases to function and can - // no longer be used in any capacity - TerminationTime time.Time - - // The product the license is valid for - Product string - - // License Specific Flags - Flags map[string]interface{} - - // Modules is a list of the licensed enterprise modules - Modules []string - - // List of features enabled by the license - Features []string -} - -type LicenseReply struct { - License *License - ConfigOutdated bool - QueryMeta -} - -type ApplyLicenseOptions struct { - Force bool -} - -func (op *Operator) LicensePut(license string, q *WriteOptions) (*WriteMeta, error) { - return op.ApplyLicense(license, nil, q) -} - -func (op *Operator) ApplyLicense(license string, opts *ApplyLicenseOptions, q *WriteOptions) (*WriteMeta, error) { - r, err := op.c.newRequest("PUT", "/v1/operator/license") - if err != nil { - return nil, err - } - - if opts != nil && opts.Force { - r.params.Add("force", "true") - } - - r.setWriteOptions(q) - r.body = strings.NewReader(license) - - rtt, resp, err := requireOK(op.c.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - defer resp.Body.Close() - - wm := &WriteMeta{RequestTime: rtt} - parseWriteMeta(resp, wm) - - return wm, nil -} - -func (op *Operator) LicenseGet(q *QueryOptions) (*LicenseReply, *QueryMeta, error) { - req, err := op.c.newRequest("GET", "/v1/operator/license") - if err != nil { - return nil, nil, err - } - req.setQueryOptions(q) - - var reply LicenseReply - rtt, resp, err := op.c.doRequest(req) //nolint:bodyclose - if err != nil { - return nil, nil, err - } - defer resp.Body.Close() - - if resp.StatusCode == http.StatusNoContent { - return nil, nil, errors.New("Nomad Enterprise only endpoint") - } - - if resp.StatusCode != http.StatusOK { - return nil, nil, newUnexpectedResponseError( - fromHTTPResponse(resp), - withExpectedStatuses([]int{http.StatusOK, http.StatusNoContent}), - ) - } - - err = json.NewDecoder(resp.Body).Decode(&reply) - if err != nil { - return nil, nil, err - } - - qm := &QueryMeta{} - parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - return &reply, qm, nil -} - -type LeadershipTransferResponse struct { - From RaftServer - To RaftServer - Noop bool - Err error - - WriteMeta -} - -// VaultWorkloadIdentityUpgradeCheck is the result of verifying if the cluster -// is ready to switch to workload identities for Vault. -type VaultWorkloadIdentityUpgradeCheck struct { - // JobsWithoutVaultIdentity is the list of jobs that have a `vault` block - // but do not have an `identity` for Vault. - JobsWithoutVaultIdentity []*JobListStub - - // OutdatedNodes is the list of nodes running a version of Nomad that does - // not support workload identities for Vault. - OutdatedNodes []*NodeListStub - - // VaultTokens is the list of Vault ACL token accessors that Nomad created - // and will no longer manage after the cluster is migrated to workload - // identities. - VaultTokens []*VaultAccessor -} - -// Ready returns true if the cluster is ready to migrate to workload identities -// with Vault. -func (v *VaultWorkloadIdentityUpgradeCheck) Ready() bool { - return v != nil && - len(v.VaultTokens) == 0 && - len(v.OutdatedNodes) == 0 && - len(v.JobsWithoutVaultIdentity) == 0 -} - -// VaultAccessor is a Vault ACL token created by Nomad for a task to access -// Vault using the legacy authentication flow. -type VaultAccessor struct { - // AllocID is the ID of the allocation that requested this token. - AllocID string - - // Task is the name of the task that requested this token. - Task string - - // NodeID is the ID of the node running the allocation that requested this - // token. - NodeID string - - // Accessor is the Vault ACL token accessor ID. - Accessor string - - // CreationTTL is the TTL set when the token was created. - CreationTTL int - - // CreateIndex is the Raft index when the token was created. - CreateIndex uint64 -} - -// UpgradeCheckVaultWorkloadIdentity retrieves the cluster status for migrating -// to workload identities with Vault. -func (op *Operator) UpgradeCheckVaultWorkloadIdentity(q *QueryOptions) (*VaultWorkloadIdentityUpgradeCheck, *QueryMeta, error) { - var resp VaultWorkloadIdentityUpgradeCheck - qm, err := op.c.query("/v1/operator/upgrade-check/vault-workload-identity", &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -type OperatorUtilizationOptions struct { - TodayOnly bool -} - -type OperatorUtilizationSnapshotResponse struct { - // Bundle is the JSON serialized utilization reporting bundle. - Bundle []byte - WriteMeta -} - -// Utilization retrieves a utilization reporting bundle (Nomad Enterprise only). -func (op *Operator) Utilization(opts *OperatorUtilizationOptions, w *WriteOptions) (*OperatorUtilizationSnapshotResponse, *WriteMeta, error) { - resp := &OperatorUtilizationSnapshotResponse{} - v := url.Values{} - if opts.TodayOnly { - v.Add("today", "true") - } - - wm, err := op.c.post("/v1/operator/utilization?"+v.Encode(), nil, resp, w) - if err != nil { - return nil, nil, err - } - return resp, wm, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/operator_autopilot.go b/vendor/github.com/hashicorp/nomad/api/operator_autopilot.go deleted file mode 100644 index 05eaac1eb2..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/operator_autopilot.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "strconv" - "time" -) - -// AutopilotConfiguration is used for querying/setting the Autopilot configuration. -// Autopilot helps manage operator tasks related to Nomad servers like removing -// failed servers from the Raft quorum. -type AutopilotConfiguration struct { - // CleanupDeadServers controls whether to remove dead servers from the Raft - // peer list when a new server joins - CleanupDeadServers bool - - // LastContactThreshold is the limit on the amount of time a server can go - // without leader contact before being considered unhealthy. - LastContactThreshold time.Duration - - // MaxTrailingLogs is the amount of entries in the Raft Log that a server can - // be behind before being considered unhealthy. - MaxTrailingLogs uint64 - - // MinQuorum sets the minimum number of servers allowed in a cluster before - // autopilot can prune dead servers. - MinQuorum uint - - // ServerStabilizationTime is the minimum amount of time a server must be - // in a stable, healthy state before it can be added to the cluster. Only - // applicable with Raft protocol version 3 or higher. - ServerStabilizationTime time.Duration - - // (Enterprise-only) EnableRedundancyZones specifies whether to enable redundancy zones. - EnableRedundancyZones bool - - // (Enterprise-only) DisableUpgradeMigration will disable Autopilot's upgrade migration - // strategy of waiting until enough newer-versioned servers have been added to the - // cluster before promoting them to voters. - DisableUpgradeMigration bool - - // (Enterprise-only) EnableCustomUpgrades specifies whether to enable using custom - // upgrade versions when performing migrations. - EnableCustomUpgrades bool - - // CreateIndex holds the index corresponding the creation of this configuration. - // This is a read-only field. - CreateIndex uint64 - - // ModifyIndex will be set to the index of the last update when retrieving the - // Autopilot configuration. Resubmitting a configuration with - // AutopilotCASConfiguration will perform a check-and-set operation which ensures - // there hasn't been a subsequent update since the configuration was retrieved. - ModifyIndex uint64 -} - -func (u *AutopilotConfiguration) MarshalJSON() ([]byte, error) { - type Alias AutopilotConfiguration - return json.Marshal(&struct { - LastContactThreshold string - ServerStabilizationTime string - *Alias - }{ - LastContactThreshold: u.LastContactThreshold.String(), - ServerStabilizationTime: u.ServerStabilizationTime.String(), - Alias: (*Alias)(u), - }) -} - -func (u *AutopilotConfiguration) UnmarshalJSON(data []byte) error { - type Alias AutopilotConfiguration - aux := &struct { - LastContactThreshold string - ServerStabilizationTime string - *Alias - }{ - Alias: (*Alias)(u), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.LastContactThreshold != "" { - if u.LastContactThreshold, err = time.ParseDuration(aux.LastContactThreshold); err != nil { - return err - } - } - if aux.ServerStabilizationTime != "" { - if u.ServerStabilizationTime, err = time.ParseDuration(aux.ServerStabilizationTime); err != nil { - return err - } - } - return nil -} - -// ServerHealth is the health (from the leader's point of view) of a server. -type ServerHealth struct { - // ID is the raft ID of the server. - ID string - - // Name is the node name of the server. - Name string - - // Address is the address of the server. - Address string - - // The status of the SerfHealth check for the server. - SerfStatus string - - // Version is the Nomad version of the server. - Version string - - // Leader is whether this server is currently the leader. - Leader bool - - // LastContact is the time since this node's last contact with the leader. - LastContact time.Duration - - // LastTerm is the highest leader term this server has a record of in its Raft log. - LastTerm uint64 - - // LastIndex is the last log index this server has a record of in its Raft log. - LastIndex uint64 - - // Healthy is whether or not the server is healthy according to the current - // Autopilot config. - Healthy bool - - // Voter is whether this is a voting server. - Voter bool - - // StableSince is the last time this server's Healthy value changed. - StableSince time.Time -} - -func (u *ServerHealth) MarshalJSON() ([]byte, error) { - type Alias ServerHealth - return json.Marshal(&struct { - LastContact string - *Alias - }{ - LastContact: u.LastContact.String(), - Alias: (*Alias)(u), - }) -} - -func (u *ServerHealth) UnmarshalJSON(data []byte) error { - type Alias ServerHealth - aux := &struct { - LastContact string - *Alias - }{ - Alias: (*Alias)(u), - } - if err := json.Unmarshal(data, &aux); err != nil { - return err - } - var err error - if aux.LastContact != "" { - if u.LastContact, err = time.ParseDuration(aux.LastContact); err != nil { - return err - } - } - return nil -} - -// OperatorHealthReply is a representation of the overall health of the cluster -type OperatorHealthReply struct { - // Healthy is true if all the servers in the cluster are healthy. - Healthy bool - - // FailureTolerance is the number of healthy servers that could be lost without - // an outage occurring. - FailureTolerance int - - // Servers holds the health of each server. - Servers []ServerHealth - - // The ID of the current leader. - Leader string - - // List of servers that are voters in the Raft configuration. - Voters []string - - // ReadReplicas holds the list of servers that are - // read replicas in the Raft configuration. (Enterprise only) - ReadReplicas []string `json:",omitempty"` - - // RedundancyZones holds the list of servers in each redundancy zone. - // (Enterprise only) - RedundancyZones map[string]AutopilotZone `json:",omitempty"` - - // Upgrade holds the current upgrade status. - Upgrade *AutopilotUpgrade `json:",omitempty"` - - // The number of servers that could be lost without an outage - // occurring if all the voters don't fail at once. (Enterprise only) - OptimisticFailureTolerance int `json:",omitempty"` -} - -// AutopilotZone holds the list of servers in a redundancy zone. (Enterprise only) -type AutopilotZone struct { - // Servers holds the list of servers in the redundancy zone. - Servers []string - - // Voters holds the list of servers that are voters in the redundancy zone. - Voters []string - - // FailureTolerance is the number of servers that could be lost without an - // outage occurring. - FailureTolerance int -} - -// AutopilotUpgrade holds the current upgrade status. (Enterprise only) -type AutopilotUpgrade struct { - // Status of the upgrade. - Status string - - // TargetVersion is the version that the cluster is upgrading to. - TargetVersion string - - // TargetVersionVoters holds the list of servers that are voters in the Raft - // configuration of the TargetVersion. - TargetVersionVoters []string - - // TargetVersionNonVoters holds the list of servers that are non-voters in - // the Raft configuration of the TargetVersion. - TargetVersionNonVoters []string - - // TargetVersionReadReplicas holds the list of servers that are read - // replicas in the Raft configuration of the TargetVersion. - TargetVersionReadReplicas []string - - // OtherVersionVoters holds the list of servers that are voters in the Raft - // configuration of a version other than the TargetVersion. - OtherVersionVoters []string - - // OtherVersionNonVoters holds the list of servers that are non-voters in - // the Raft configuration of a version other than the TargetVersion. - OtherVersionNonVoters []string - - // OtherVersionReadReplicas holds the list of servers that are read replicas - // in the Raft configuration of a version other than the TargetVersion. - OtherVersionReadReplicas []string - - // RedundancyZones holds the list of servers in each redundancy zone for the - // TargetVersion. - RedundancyZones map[string]AutopilotZoneUpgradeVersions -} - -// AutopilotZoneUpgradeVersions holds the list of servers -// in a redundancy zone for a specific version. (Enterprise only) -type AutopilotZoneUpgradeVersions struct { - TargetVersionVoters []string - TargetVersionNonVoters []string - OtherVersionVoters []string - OtherVersionNonVoters []string -} - -// AutopilotGetConfiguration is used to query the current Autopilot configuration. -func (op *Operator) AutopilotGetConfiguration(q *QueryOptions) (*AutopilotConfiguration, *QueryMeta, error) { - var resp AutopilotConfiguration - qm, err := op.c.query("/v1/operator/autopilot/configuration", &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// AutopilotSetConfiguration is used to set the current Autopilot configuration. -func (op *Operator) AutopilotSetConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (*WriteMeta, error) { - var out bool - wm, err := op.c.put("/v1/operator/autopilot/configuration", conf, &out, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// AutopilotCASConfiguration is used to perform a Check-And-Set update on the -// Autopilot configuration. The ModifyIndex value will be respected. Returns -// true on success or false on failures. -func (op *Operator) AutopilotCASConfiguration(conf *AutopilotConfiguration, q *WriteOptions) (bool, *WriteMeta, error) { - var out bool - wm, err := op.c.put("/v1/operator/autopilot/configuration?cas="+strconv.FormatUint(conf.ModifyIndex, 10), conf, &out, q) - if err != nil { - return false, nil, err - } - - return out, wm, nil -} - -// AutopilotServerHealth is used to query Autopilot's top-level view of the health -// of each Nomad server. -func (op *Operator) AutopilotServerHealth(q *QueryOptions) (*OperatorHealthReply, *QueryMeta, error) { - var out OperatorHealthReply - qm, err := op.c.query("/v1/operator/autopilot/health", &out, q) - if err != nil { - return nil, nil, err - } - return &out, qm, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/operator_metrics.go b/vendor/github.com/hashicorp/nomad/api/operator_metrics.go deleted file mode 100644 index ba0de567ae..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/operator_metrics.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "io" - "time" -) - -// MetricsSummary holds a roll-up of metrics info for a given interval -type MetricsSummary struct { - Timestamp string - Gauges []GaugeValue - Points []PointValue - Counters []SampledValue - Samples []SampledValue -} - -type GaugeValue struct { - Name string - Hash string `json:"-"` - Value float32 - - Labels []Label `json:"-"` - DisplayLabels map[string]string `json:"Labels"` -} - -type PointValue struct { - Name string - Points []float32 -} - -type SampledValue struct { - Name string - Hash string `json:"-"` - *AggregateSample - Mean float64 - Stddev float64 - - Labels []Label `json:"-"` - DisplayLabels map[string]string `json:"Labels"` -} - -// AggregateSample is used to hold aggregate metrics -// about a sample -type AggregateSample struct { - Count int // The count of emitted pairs - Rate float64 // The values rate per time unit (usually 1 second) - Sum float64 // The sum of values - SumSq float64 `json:"-"` // The sum of squared values - Min float64 // Minimum value - Max float64 // Maximum value - LastUpdated time.Time `json:"-"` // When value was last updated -} - -type Label struct { - Name string - Value string -} - -// Metrics returns a slice of bytes containing metrics, optionally formatted as either json or prometheus -func (op *Operator) Metrics(q *QueryOptions) ([]byte, error) { - if q == nil { - q = &QueryOptions{} - } - - metricsReader, err := op.c.rawQuery("/v1/metrics", q) - if err != nil { - return nil, err - } - - metricsBytes, err := io.ReadAll(metricsReader) - if err != nil { - return nil, err - } - - return metricsBytes, nil -} - -// MetricsSummary returns a MetricsSummary struct and query metadata -func (op *Operator) MetricsSummary(q *QueryOptions) (*MetricsSummary, *QueryMeta, error) { - var resp *MetricsSummary - qm, err := op.c.query("/v1/metrics", &resp, q) - if err != nil { - return nil, nil, err - } - - return resp, qm, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/quota.go b/vendor/github.com/hashicorp/nomad/api/quota.go deleted file mode 100644 index b761b4eb26..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/quota.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "sort" -) - -// Quotas is used to query the quotas endpoints. -type Quotas struct { - client *Client -} - -// Quotas returns a new handle on the quotas. -func (c *Client) Quotas() *Quotas { - return &Quotas{client: c} -} - -// List is used to dump all of the quota specs -func (q *Quotas) List(qo *QueryOptions) ([]*QuotaSpec, *QueryMeta, error) { - var resp []*QuotaSpec - qm, err := q.client.query("/v1/quotas", &resp, qo) - if err != nil { - return nil, nil, err - } - sort.Sort(QuotaSpecIndexSort(resp)) - return resp, qm, nil -} - -// PrefixList is used to do a PrefixList search over quota specs -func (q *Quotas) PrefixList(prefix string, qo *QueryOptions) ([]*QuotaSpec, *QueryMeta, error) { - if qo == nil { - qo = &QueryOptions{Prefix: prefix} - } else { - qo.Prefix = prefix - } - - return q.List(qo) -} - -// ListUsage is used to dump all of the quota usages -func (q *Quotas) ListUsage(qo *QueryOptions) ([]*QuotaUsage, *QueryMeta, error) { - var resp []*QuotaUsage - qm, err := q.client.query("/v1/quota-usages", &resp, qo) - if err != nil { - return nil, nil, err - } - sort.Sort(QuotaUsageIndexSort(resp)) - return resp, qm, nil -} - -// PrefixListUsage is used to do a PrefixList search over quota usages -func (q *Quotas) PrefixListUsage(prefix string, qo *QueryOptions) ([]*QuotaUsage, *QueryMeta, error) { - if qo == nil { - qo = &QueryOptions{Prefix: prefix} - } else { - qo.Prefix = prefix - } - - return q.ListUsage(qo) -} - -// Info is used to query a single quota spec by its name. -func (q *Quotas) Info(name string, qo *QueryOptions) (*QuotaSpec, *QueryMeta, error) { - var resp QuotaSpec - qm, err := q.client.query("/v1/quota/"+name, &resp, qo) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Usage is used to query a single quota usage by its name. -func (q *Quotas) Usage(name string, qo *QueryOptions) (*QuotaUsage, *QueryMeta, error) { - var resp QuotaUsage - qm, err := q.client.query("/v1/quota/usage/"+name, &resp, qo) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Register is used to register a quota spec. -func (q *Quotas) Register(spec *QuotaSpec, qo *WriteOptions) (*WriteMeta, error) { - wm, err := q.client.put("/v1/quota", spec, nil, qo) - if err != nil { - return nil, err - } - return wm, nil -} - -// Delete is used to delete a quota spec -func (q *Quotas) Delete(quota string, qo *WriteOptions) (*WriteMeta, error) { - wm, err := q.client.delete(fmt.Sprintf("/v1/quota/%s", quota), nil, nil, qo) - if err != nil { - return nil, err - } - return wm, nil -} - -// QuotaSpec specifies the allowed resource usage across regions. -type QuotaSpec struct { - // Name is the name for the quota object - Name string - - // Description is an optional description for the quota object - Description string - - // Limits is the set of quota limits encapsulated by this quota object. Each - // limit applies quota in a particular region and in the future over a - // particular priority range and datacenter set. - Limits []*QuotaLimit - - // Raft indexes to track creation and modification - CreateIndex uint64 - ModifyIndex uint64 -} - -// QuotaLimit describes the resource limit in a particular region. -type QuotaLimit struct { - // Region is the region in which this limit has affect - Region string - - // RegionLimit is the quota limit that applies to any allocation within a - // referencing namespace in the region. A value of zero is treated as - // unlimited and a negative value is treated as fully disallowed. This is - // useful for once we support GPUs - RegionLimit *QuotaResources - - // VariablesLimit is the maximum total size of all variables - // Variable.EncryptedData. A value of zero is treated as unlimited and a - // negative value is treated as fully disallowed. - // - // DEPRECATED: use RegionLimit.Storage.VariablesMB instead. This field will - // be removed in Nomad 1.12.0. - VariablesLimit *int `mapstructure:"variables_limit" hcl:"variables_limit,optional"` - - // Hash is the hash of the object and is used to make replication efficient. - Hash []byte -} - -type QuotaResources struct { - CPU *int `hcl:"cpu,optional"` - Cores *int `hcl:"cores,optional"` - MemoryMB *int `mapstructure:"memory" hcl:"memory,optional"` - MemoryMaxMB *int `mapstructure:"memory_max" hcl:"memory_max,optional"` - Devices []*RequestedDevice `hcl:"device,block"` - NUMA *NUMAResource `hcl:"numa,block"` - SecretsMB *int `mapstructure:"secrets" hcl:"secrets,optional"` - Storage *QuotaStorageResources `mapstructure:"storage" hcl:"storage,block"` -} - -type QuotaStorageResources struct { - // VariablesMB is the maximum total size of all variables - // Variable.EncryptedData, in megabytes (2^20 bytes). A value of zero is - // treated as unlimited and a negative value is treated as fully disallowed. - VariablesMB int `hcl:"variables"` - - // HostVolumesMB is the maximum provisioned size of all dynamic host - // volumes, in megabytes (2^20 bytes). A value of zero is treated as - // unlimited and a negative value is treated as fully disallowed. - HostVolumesMB int `hcl:"host_volumes"` -} - -// QuotaUsage is the resource usage of a Quota -type QuotaUsage struct { - Name string - Used map[string]*QuotaLimit - CreateIndex uint64 - ModifyIndex uint64 -} - -// QuotaSpecIndexSort is a wrapper to sort QuotaSpecs by CreateIndex. We -// reverse the test so that we get the highest index first. -type QuotaSpecIndexSort []*QuotaSpec - -func (q QuotaSpecIndexSort) Len() int { - return len(q) -} - -func (q QuotaSpecIndexSort) Less(i, j int) bool { - return q[i].CreateIndex > q[j].CreateIndex -} - -func (q QuotaSpecIndexSort) Swap(i, j int) { - q[i], q[j] = q[j], q[i] -} - -// QuotaUsageIndexSort is a wrapper to sort QuotaUsages by CreateIndex. We -// reverse the test so that we get the highest index first. -type QuotaUsageIndexSort []*QuotaUsage - -func (q QuotaUsageIndexSort) Len() int { - return len(q) -} - -func (q QuotaUsageIndexSort) Less(i, j int) bool { - return q[i].CreateIndex > q[j].CreateIndex -} - -func (q QuotaUsageIndexSort) Swap(i, j int) { - q[i], q[j] = q[j], q[i] -} - -// QuotaLimitSort is a wrapper to sort QuotaLimits -type QuotaLimitSort []*QuotaLimit - -func (q QuotaLimitSort) Len() int { - return len(q) -} - -func (q QuotaLimitSort) Less(i, j int) bool { - return q[i].Region < q[j].Region -} - -func (q QuotaLimitSort) Swap(i, j int) { - q[i], q[j] = q[j], q[i] -} diff --git a/vendor/github.com/hashicorp/nomad/api/raw.go b/vendor/github.com/hashicorp/nomad/api/raw.go deleted file mode 100644 index 73e2a52999..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/raw.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "io" - "net/http" -) - -// Raw can be used to do raw queries against custom endpoints -type Raw struct { - c *Client -} - -// Raw returns a handle to query endpoints -func (c *Client) Raw() *Raw { - return &Raw{c} -} - -// Query is used to do a GET request against an endpoint -// and deserialize the response into an interface using -// standard Nomad conventions. -func (raw *Raw) Query(endpoint string, out interface{}, q *QueryOptions) (*QueryMeta, error) { - return raw.c.query(endpoint, out, q) -} - -// Response is used to make a GET request against an endpoint and returns the -// response body -func (raw *Raw) Response(endpoint string, q *QueryOptions) (io.ReadCloser, error) { - return raw.c.rawQuery(endpoint, q) -} - -// Write is used to do a PUT request against an endpoint -// and serialize/deserialized using the standard Nomad conventions. -func (raw *Raw) Write(endpoint string, in, out interface{}, q *WriteOptions) (*WriteMeta, error) { - return raw.c.put(endpoint, in, out, q) -} - -// Delete is used to do a DELETE request against an endpoint -// and serialize/deserialized using the standard Nomad conventions. -func (raw *Raw) Delete(endpoint string, out interface{}, q *WriteOptions) (*WriteMeta, error) { - return raw.c.delete(endpoint, nil, out, q) -} - -// Do uses the raw client's internal httpClient to process the request -func (raw *Raw) Do(req *http.Request) (*http.Response, error) { - return raw.c.httpClient.Do(req) -} diff --git a/vendor/github.com/hashicorp/nomad/api/recommendations.go b/vendor/github.com/hashicorp/nomad/api/recommendations.go deleted file mode 100644 index 065fc9f959..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/recommendations.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Recommendations is used to query the recommendations endpoints. -type Recommendations struct { - client *Client -} - -// Recommendations returns a new handle on the recommendations endpoints. -func (c *Client) Recommendations() *Recommendations { - return &Recommendations{client: c} -} - -// List is used to dump all of the recommendations in the cluster -func (r *Recommendations) List(q *QueryOptions) ([]*Recommendation, *QueryMeta, error) { - var resp []*Recommendation - qm, err := r.client.query("/v1/recommendations", &resp, q) - if err != nil { - return nil, qm, err - } - return resp, qm, nil -} - -// Info is used to return information on a single recommendation -func (r *Recommendations) Info(id string, q *QueryOptions) (*Recommendation, *QueryMeta, error) { - var resp Recommendation - qm, err := r.client.query("/v1/recommendation/"+id, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, qm, nil -} - -// Upsert is used to create or update a recommendation -func (r *Recommendations) Upsert(rec *Recommendation, q *WriteOptions) (*Recommendation, *WriteMeta, error) { - var resp Recommendation - wm, err := r.client.put("/v1/recommendation", rec, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -// Delete is used to delete a list of recommendations -func (r *Recommendations) Delete(ids []string, q *WriteOptions) (*WriteMeta, error) { - req := &RecommendationApplyRequest{ - Apply: []string{}, - Dismiss: ids, - } - wm, err := r.client.put("/v1/recommendations/apply", req, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Apply is used to apply a set of recommendations -func (r *Recommendations) Apply(ids []string, policyOverride bool) ( - *RecommendationApplyResponse, *WriteMeta, error) { - req := &RecommendationApplyRequest{ - Apply: ids, - PolicyOverride: policyOverride, - } - var resp RecommendationApplyResponse - wm, err := r.client.put("/v1/recommendations/apply", req, &resp, nil) - if err != nil { - return nil, nil, err - } - resp.WriteMeta = *wm - return &resp, wm, nil -} - -// Recommendation is used to serialize a recommendation. -type Recommendation struct { - ID string - Region string - Namespace string - JobID string - JobVersion uint64 - Group string - Task string - Resource string - Value int - Current int - Meta map[string]interface{} - Stats map[string]float64 - EnforceVersion bool - - SubmitTime int64 - - CreateIndex uint64 - ModifyIndex uint64 -} - -// RecommendationApplyRequest is used to apply and/or dismiss a set of recommendations -type RecommendationApplyRequest struct { - Apply []string - Dismiss []string - PolicyOverride bool -} - -// RecommendationApplyResponse is used to apply a set of recommendations -type RecommendationApplyResponse struct { - UpdatedJobs []*SingleRecommendationApplyResult - Errors []*SingleRecommendationApplyError - WriteMeta -} - -type SingleRecommendationApplyResult struct { - Namespace string - JobID string - JobModifyIndex uint64 - EvalID string - EvalCreateIndex uint64 - Warnings string - Recommendations []string -} - -type SingleRecommendationApplyError struct { - Namespace string - JobID string - Recommendations []string - Error string -} diff --git a/vendor/github.com/hashicorp/nomad/api/regions.go b/vendor/github.com/hashicorp/nomad/api/regions.go deleted file mode 100644 index 76b73c3d2c..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/regions.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import "sort" - -// Regions is used to query the regions in the cluster. -type Regions struct { - client *Client -} - -// Regions returns a handle on the regions endpoints. -func (c *Client) Regions() *Regions { - return &Regions{client: c} -} - -// List returns a list of all of the regions from the server -// that serves the request. It is never forwarded to a leader. -func (r *Regions) List() ([]string, error) { - var resp []string - if _, err := r.client.query("/v1/regions", &resp, nil); err != nil { - return nil, err - } - sort.Strings(resp) - return resp, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/resources.go b/vendor/github.com/hashicorp/nomad/api/resources.go deleted file mode 100644 index f45a461514..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/resources.go +++ /dev/null @@ -1,332 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "slices" - "strconv" -) - -// Resources encapsulates the required resources of -// a given task or task group. -type Resources struct { - CPU *int `hcl:"cpu,optional"` - Cores *int `hcl:"cores,optional"` - MemoryMB *int `mapstructure:"memory" hcl:"memory,optional"` - MemoryMaxMB *int `mapstructure:"memory_max" hcl:"memory_max,optional"` - DiskMB *int `mapstructure:"disk" hcl:"disk,optional"` - Networks []*NetworkResource `hcl:"network,block"` - Devices []*RequestedDevice `hcl:"device,block"` - NUMA *NUMAResource `hcl:"numa,block"` - SecretsMB *int `mapstructure:"secrets" hcl:"secrets,optional"` - - // COMPAT(0.10) - // XXX Deprecated. Please do not use. The field will be removed in Nomad - // 0.10 and is only being kept to allow any references to be removed before - // then. - IOPS *int `hcl:"iops,optional"` -} - -// Canonicalize will supply missing values in the cases -// where they are not provided. -func (r *Resources) Canonicalize() { - defaultResources := DefaultResources() - if r.Cores == nil { - r.Cores = defaultResources.Cores - - // only set cpu to the default value if it and cores is not defined - if r.CPU == nil { - r.CPU = defaultResources.CPU - } - } - - // CPU will be set to the default if cores is nil above. - // If cpu is nil here then cores has been set and cpu should be 0 - if r.CPU == nil { - r.CPU = pointerOf(0) - } - - if r.MemoryMB == nil { - r.MemoryMB = defaultResources.MemoryMB - } - for _, d := range r.Devices { - d.Canonicalize() - } - - r.NUMA.Canonicalize() -} - -// DefaultResources is a small resources object that contains the -// default resources requests that we will provide to an object. -// --- THIS FUNCTION IS REPLICATED IN nomad/structs/structs.go -// and should be kept in sync. -func DefaultResources() *Resources { - return &Resources{ - CPU: pointerOf(100), - Cores: pointerOf(0), - MemoryMB: pointerOf(300), - } -} - -// MinResources is a small resources object that contains the -// absolute minimum resources that we will provide to an object. -// This should not be confused with the defaults which are -// provided in DefaultResources() --- THIS LOGIC IS REPLICATED -// IN nomad/structs/structs.go and should be kept in sync. -func MinResources() *Resources { - return &Resources{ - CPU: pointerOf(1), - Cores: pointerOf(0), - MemoryMB: pointerOf(10), - } -} - -// Merge merges this resource with another resource. -func (r *Resources) Merge(other *Resources) { - if other == nil { - return - } - if other.CPU != nil { - r.CPU = other.CPU - } - if other.MemoryMB != nil { - r.MemoryMB = other.MemoryMB - } - if other.DiskMB != nil { - r.DiskMB = other.DiskMB - } - if len(other.Networks) != 0 { - r.Networks = other.Networks - } - if len(other.Devices) != 0 { - r.Devices = other.Devices - } - if other.NUMA != nil { - r.NUMA = other.NUMA.Copy() - } - if other.SecretsMB != nil { - r.SecretsMB = other.SecretsMB - } -} - -// NUMAResource contains the NUMA affinity request for scheduling purposes. -// -// Applies only to Nomad Enterprise. -type NUMAResource struct { - // Affinity must be one of "none", "prefer", "require". - Affinity string `hcl:"affinity,optional"` - - // Devices is the subset of devices requested by the task that must share - // the same numa node, along with the tasks reserved cpu cores. - Devices []string `hcl:"devices,optional"` -} - -func (n *NUMAResource) Copy() *NUMAResource { - if n == nil { - return nil - } - return &NUMAResource{ - Affinity: n.Affinity, - Devices: slices.Clone(n.Devices), - } -} - -func (n *NUMAResource) Canonicalize() { - if n == nil { - return - } - if n.Affinity == "" { - n.Affinity = "none" - } - if len(n.Devices) == 0 { - n.Devices = nil - } -} - -type Port struct { - Label string `hcl:",label"` - Value int `hcl:"static,optional"` - To int `hcl:"to,optional"` - HostNetwork string `hcl:"host_network,optional"` - IgnoreCollision bool `hcl:"ignore_collision,optional"` -} - -type DNSConfig struct { - Servers []string `mapstructure:"servers" hcl:"servers,optional"` - Searches []string `mapstructure:"searches" hcl:"searches,optional"` - Options []string `mapstructure:"options" hcl:"options,optional"` -} -type CNIConfig struct { - Args map[string]string `hcl:"args,optional"` -} - -// NetworkResource is used to describe required network -// resources of a given task. -type NetworkResource struct { - Mode string `hcl:"mode,optional"` - Device string `hcl:"device,optional"` - CIDR string `hcl:"cidr,optional"` - IP string `hcl:"ip,optional"` - DNS *DNSConfig `hcl:"dns,block"` - ReservedPorts []Port `hcl:"reserved_ports,block"` - DynamicPorts []Port `hcl:"port,block"` - Hostname string `hcl:"hostname,optional"` - - // COMPAT(0.13) - // XXX Deprecated. Please do not use. The field will be removed in Nomad - // 0.13 and is only being kept to allow any references to be removed before - // then. - MBits *int `hcl:"mbits,optional"` - CNI *CNIConfig `hcl:"cni,block"` -} - -// Megabits should not be used. -// -// COMPAT(0.13) -// Deprecated. Please do not use. The method will be removed in Nomad -// 0.13 and is only being kept to allow any references to be removed before -// then. -func (n *NetworkResource) Megabits() int { - if n == nil || n.MBits == nil { - return 0 - } - return *n.MBits -} - -func (n *NetworkResource) Canonicalize() { - // COMPAT(0.13) - // Noop to maintain backwards compatibility -} - -func (n *NetworkResource) HasPorts() bool { - if n == nil { - return false - } - - return len(n.ReservedPorts)+len(n.DynamicPorts) > 0 -} - -// NodeDeviceResource captures a set of devices sharing a common -// vendor/type/device_name tuple. -type NodeDeviceResource struct { - - // Vendor specifies the vendor of device - Vendor string - - // Type specifies the type of the device - Type string - - // Name specifies the specific model of the device - Name string - - // Instances are list of the devices matching the vendor/type/name - Instances []*NodeDevice - - Attributes map[string]*Attribute -} - -func (r NodeDeviceResource) ID() string { - return r.Vendor + "/" + r.Type + "/" + r.Name -} - -// NodeDevice is an instance of a particular device. -type NodeDevice struct { - // ID is the ID of the device. - ID string - - // Healthy captures whether the device is healthy. - Healthy bool - - // HealthDescription is used to provide a human readable description of why - // the device may be unhealthy. - HealthDescription string - - // Locality stores HW locality information for the node to optionally be - // used when making placement decisions. - Locality *NodeDeviceLocality -} - -// Attribute is used to describe the value of an attribute, optionally -// specifying units -type Attribute struct { - // Float is the float value for the attribute - FloatVal *float64 `json:"Float,omitempty"` - - // Int is the int value for the attribute - IntVal *int64 `json:"Int,omitempty"` - - // String is the string value for the attribute - StringVal *string `json:"String,omitempty"` - - // Bool is the bool value for the attribute - BoolVal *bool `json:"Bool,omitempty"` - - // Unit is the optional unit for the set int or float value - Unit string -} - -func (a Attribute) String() string { - switch { - case a.FloatVal != nil: - str := formatFloat(*a.FloatVal, 3) - if a.Unit != "" { - str += " " + a.Unit - } - return str - case a.IntVal != nil: - str := strconv.FormatInt(*a.IntVal, 10) - if a.Unit != "" { - str += " " + a.Unit - } - return str - case a.StringVal != nil: - return *a.StringVal - case a.BoolVal != nil: - return strconv.FormatBool(*a.BoolVal) - default: - return "" - } -} - -// NodeDeviceLocality stores information about the devices hardware locality on -// the node. -type NodeDeviceLocality struct { - // PciBusID is the PCI Bus ID for the device. - PciBusID string -} - -// RequestedDevice is used to request a device for a task. -type RequestedDevice struct { - // Name is the request name. The possible values are as follows: - // * : A single value only specifies the type of request. - // * /: A single slash delimiter assumes the vendor and type of device is specified. - // * //: Two slash delimiters assume vendor, type and specific model are specified. - // - // Examples are as follows: - // * "gpu" - // * "nvidia/gpu" - // * "nvidia/gpu/GTX2080Ti" - Name string `hcl:",label"` - - // Count is the number of requested devices - Count *uint64 `hcl:"count,optional"` - - // Constraints are a set of constraints to apply when selecting the device - // to use. - Constraints []*Constraint `hcl:"constraint,block"` - - // Affinities are a set of affinites to apply when selecting the device - // to use. - Affinities []*Affinity `hcl:"affinity,block"` -} - -func (d *RequestedDevice) Canonicalize() { - if d.Count == nil { - d.Count = pointerOf(uint64(1)) - } - - for _, a := range d.Affinities { - a.Canonicalize() - } -} diff --git a/vendor/github.com/hashicorp/nomad/api/retry.go b/vendor/github.com/hashicorp/nomad/api/retry.go deleted file mode 100644 index c32dbff5e5..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/retry.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "context" - "errors" - "net/http" - "time" -) - -const ( - defaultNumberOfRetries = 5 - defaultDelayTimeBase = time.Second - defaultMaxBackoffDelay = 5 * time.Minute -) - -type retryOptions struct { - maxRetries int64 // Optional, defaults to 5 - // maxBackoffDelay sets a capping value for the delay between calls, to avoid it growing infinitely - maxBackoffDelay time.Duration // Optional, defaults to 5 min - // maxToLastCall sets a capping value for all the retry process, in case there is a deadline to make the call. - maxToLastCall time.Duration // Optional, defaults to 0, meaning no time cap - // fixedDelay is used in case an uniform distribution of the calls is preferred. - fixedDelay time.Duration // Optional, defaults to 0, meaning Delay is exponential, starting at 1sec - // delayBase is used to calculate the starting value at which the delay starts to grow, - // When left empty, a value of 1 sec will be used as base and then the delays will - // grow exponentially with every attempt: starting at 1s, then 2s, 4s, 8s... - delayBase time.Duration // Optional, defaults to 1sec - - // maxValidAttempt is used to ensure that a big attempts number or a big delayBase number will not cause - // a negative delay by overflowing the delay increase. Every attempt after the - // maxValid will use the maxBackoffDelay if configured, or the defaultMaxBackoffDelay if not. - maxValidAttempt int64 -} - -func (c *Client) retryPut(ctx context.Context, endpoint string, in, out any, q *WriteOptions) (*WriteMeta, error) { - var err error - var wm *WriteMeta - - attemptDelay := 100 * time.Second // Avoid a tick before starting - startTime := time.Now() - - t := time.NewTimer(attemptDelay) - defer t.Stop() - - for attempt := int64(0); attempt < c.config.retryOptions.maxRetries+1; attempt++ { - attemptDelay = c.calculateDelay(attempt) - - t.Reset(attemptDelay) - - select { - case <-ctx.Done(): - return nil, ctx.Err() - case <-t.C: - - } - - wm, err = c.put(endpoint, in, out, q) - - // Maximum retry period is up, don't retry - if c.config.retryOptions.maxToLastCall != 0 && time.Since(startTime) > c.config.retryOptions.maxToLastCall { - break - } - - // The put function only returns WriteMetadata if the call was successful - // don't retry - if wm != nil { - break - } - - // If WriteMetadata is nil, we need to process the error to decide if a retry is - // necessary or not - var callErr UnexpectedResponseError - ok := errors.As(err, &callErr) - - // If is not UnexpectedResponseError, it is an error while performing the call - // don't retry - if !ok { - break - } - - // Only 500+ or 429 status calls may be retried, otherwise - // don't retry - if !isCallRetriable(callErr.StatusCode()) { - break - } - } - - return wm, err -} - -// According to the HTTP protocol, it only makes sense to retry calls -// when the error is caused by a temporary situation, like a server being down -// (500s+) or the call being rate limited (429), this function checks if the -// statusCode is between the errors worth retrying. -func isCallRetriable(statusCode int) bool { - return statusCode > http.StatusInternalServerError && - statusCode < http.StatusNetworkAuthenticationRequired || - statusCode == http.StatusTooManyRequests -} - -func (c *Client) calculateDelay(attempt int64) time.Duration { - if c.config.retryOptions.fixedDelay != 0 { - return c.config.retryOptions.fixedDelay - } - - if attempt == 0 { - return 0 - } - - if attempt > c.config.retryOptions.maxValidAttempt { - return c.config.retryOptions.maxBackoffDelay - } - - newDelay := c.config.retryOptions.delayBase << (attempt - 1) - if c.config.retryOptions.maxBackoffDelay != defaultMaxBackoffDelay && - newDelay > c.config.retryOptions.maxBackoffDelay { - return c.config.retryOptions.maxBackoffDelay - } - - return newDelay -} diff --git a/vendor/github.com/hashicorp/nomad/api/scaling.go b/vendor/github.com/hashicorp/nomad/api/scaling.go deleted file mode 100644 index cad20bd3fb..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/scaling.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -const ( - // ScalingPolicyTypeHorizontal indicates a policy that does horizontal scaling. - ScalingPolicyTypeHorizontal = "horizontal" -) - -// Scaling is used to query scaling-related API endpoints -type Scaling struct { - client *Client -} - -// Scaling returns a handle on the scaling endpoints. -func (c *Client) Scaling() *Scaling { - return &Scaling{client: c} -} - -func (s *Scaling) ListPolicies(q *QueryOptions) ([]*ScalingPolicyListStub, *QueryMeta, error) { - var resp []*ScalingPolicyListStub - qm, err := s.client.query("/v1/scaling/policies", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -func (s *Scaling) GetPolicy(id string, q *QueryOptions) (*ScalingPolicy, *QueryMeta, error) { - var policy ScalingPolicy - qm, err := s.client.query("/v1/scaling/policy/"+id, &policy, q) - if err != nil { - return nil, nil, err - } - return &policy, qm, nil -} - -func (p *ScalingPolicy) Canonicalize(taskGroupCount int) { - if p.Enabled == nil { - p.Enabled = pointerOf(true) - } - if p.Min == nil { - var m int64 = int64(taskGroupCount) - p.Min = &m - } - if p.Type == "" { - p.Type = ScalingPolicyTypeHorizontal - } -} - -// ScalingRequest is the payload for a generic scaling action -type ScalingRequest struct { - Count *int64 - Target map[string]string - Message string - Error bool - Meta map[string]interface{} - WriteRequest - - // this is effectively a job update, so we need the ability to override policy. - PolicyOverride bool - - // If JobModifyIndex is set then the job will only be scaled if it matches - // the current Jobs index. The JobModifyIndex is ignored if 0. - JobModifyIndex uint64 -} - -// ScalingPolicy is the user-specified API object for an autoscaling policy -type ScalingPolicy struct { - /* fields set by user in HCL config */ - - Min *int64 `hcl:"min,optional"` - Max *int64 `hcl:"max,optional"` - Policy map[string]interface{} `hcl:"policy,block"` - Enabled *bool `hcl:"enabled,optional"` - Type string `hcl:"type,optional"` - - /* fields set by server */ - - ID string - Namespace string - Target map[string]string - CreateIndex uint64 - ModifyIndex uint64 -} - -// ScalingPolicyListStub is used to return a subset of scaling policy information -// for the scaling policy list -type ScalingPolicyListStub struct { - ID string - Enabled bool - Type string - Target map[string]string - CreateIndex uint64 - ModifyIndex uint64 -} - -// JobScaleStatusResponse is used to return information about job scaling status -type JobScaleStatusResponse struct { - JobID string - Namespace string - JobCreateIndex uint64 - JobModifyIndex uint64 - JobStopped bool - TaskGroups map[string]TaskGroupScaleStatus -} - -type TaskGroupScaleStatus struct { - Desired int - Placed int - Running int - Healthy int - Unhealthy int - Events []ScalingEvent -} - -type ScalingEvent struct { - Count *int64 - PreviousCount int64 - Error bool - Message string - Meta map[string]interface{} - EvalID *string - Time uint64 - CreateIndex uint64 -} diff --git a/vendor/github.com/hashicorp/nomad/api/search.go b/vendor/github.com/hashicorp/nomad/api/search.go deleted file mode 100644 index 3983fe1486..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/search.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "github.com/hashicorp/nomad/api/contexts" -) - -type Search struct { - client *Client -} - -// Search returns a handle on the Search endpoints -func (c *Client) Search() *Search { - return &Search{client: c} -} - -// PrefixSearch returns a set of matches for a particular context and prefix. -func (s *Search) PrefixSearch(prefix string, context contexts.Context, q *QueryOptions) (*SearchResponse, *QueryMeta, error) { - var resp SearchResponse - req := &SearchRequest{Prefix: prefix, Context: context} - - qm, err := s.client.putQuery("/v1/search", req, &resp, q) - if err != nil { - return nil, nil, err - } - - return &resp, qm, nil -} - -type SearchResponse struct { - Matches map[contexts.Context][]string - Truncations map[contexts.Context]bool - QueryMeta -} - -type SearchRequest struct { - Prefix string - Context contexts.Context - QueryOptions -} - -// FuzzySearch returns a set of matches for a given context and string. -func (s *Search) FuzzySearch(text string, context contexts.Context, q *QueryOptions) (*FuzzySearchResponse, *QueryMeta, error) { - var resp FuzzySearchResponse - - req := &FuzzySearchRequest{ - Context: context, - Text: text, - } - - qm, err := s.client.putQuery("/v1/search/fuzzy", req, &resp, q) - if err != nil { - return nil, nil, err - } - - return &resp, qm, nil -} - -// FuzzyMatch is used to describe the ID of an object which may be a machine -// readable UUID or a human readable Name. If the object is a component of a Job, -// the Scope is a list of IDs starting from Namespace down to the parent object of -// ID. -// -// e.g. A Task-level service would have scope like, -// -// ["", "", "", ""] -type FuzzyMatch struct { - ID string // ID is UUID or Name of object - Scope []string `json:",omitempty"` // IDs of parent objects -} - -// FuzzySearchResponse is used to return fuzzy matches and information about -// whether the match list is truncated specific to each type of searchable Context. -type FuzzySearchResponse struct { - // Matches is a map of Context types to IDs which fuzzy match a specified query. - Matches map[contexts.Context][]FuzzyMatch - - // Truncations indicates whether the matches for a particular Context have - // been truncated. - Truncations map[contexts.Context]bool - - QueryMeta -} - -// FuzzySearchRequest is used to parameterize a fuzzy search request, and returns -// a list of matches made up of jobs, allocations, evaluations, and/or nodes, -// along with whether or not the information returned is truncated. -type FuzzySearchRequest struct { - // Text is what names are fuzzy-matched to. E.g. if the given text were - // "py", potential matches might be "python", "mypy", etc. of jobs, nodes, - // allocs, groups, services, commands, images, classes. - Text string - - // Context is the type that can be matched against. A Context of "all" indicates - // all Contexts types are queried for matching. - Context contexts.Context - - QueryOptions -} diff --git a/vendor/github.com/hashicorp/nomad/api/sentinel.go b/vendor/github.com/hashicorp/nomad/api/sentinel.go deleted file mode 100644 index e32b6fc536..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/sentinel.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "errors" -) - -// SentinelPolicies is used to query the Sentinel Policy endpoints. -type SentinelPolicies struct { - client *Client -} - -// SentinelPolicies returns a new handle on the Sentinel policies. -func (c *Client) SentinelPolicies() *SentinelPolicies { - return &SentinelPolicies{client: c} -} - -// List is used to dump all of the policies. -func (a *SentinelPolicies) List(q *QueryOptions) ([]*SentinelPolicyListStub, *QueryMeta, error) { - var resp []*SentinelPolicyListStub - qm, err := a.client.query("/v1/sentinel/policies", &resp, q) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// Upsert is used to create or update a policy -func (a *SentinelPolicies) Upsert(policy *SentinelPolicy, q *WriteOptions) (*WriteMeta, error) { - if policy == nil || policy.Name == "" { - return nil, errors.New("missing policy name") - } - wm, err := a.client.put("/v1/sentinel/policy/"+policy.Name, policy, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Delete is used to delete a policy -func (a *SentinelPolicies) Delete(policyName string, q *WriteOptions) (*WriteMeta, error) { - if policyName == "" { - return nil, errors.New("missing policy name") - } - wm, err := a.client.delete("/v1/sentinel/policy/"+policyName, nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// Info is used to query a specific policy -func (a *SentinelPolicies) Info(policyName string, q *QueryOptions) (*SentinelPolicy, *QueryMeta, error) { - if policyName == "" { - return nil, nil, errors.New("missing policy name") - } - var resp SentinelPolicy - wm, err := a.client.query("/v1/sentinel/policy/"+policyName, &resp, q) - if err != nil { - return nil, nil, err - } - return &resp, wm, nil -} - -type SentinelPolicy struct { - Name string - Description string - Scope string - EnforcementLevel string - Policy string - CreateIndex uint64 - ModifyIndex uint64 -} - -type SentinelPolicyListStub struct { - Name string - Description string - Scope string - EnforcementLevel string - CreateIndex uint64 - ModifyIndex uint64 -} - -// Possible Sentinel scopes -const ( - SentinelScopeSubmitJob = "submit-job" - SentinelScopeSubmitHostVolume = "submit-host-volume" - SentinelScopeSubmitCSIVolume = "submit-csi-volume" -) diff --git a/vendor/github.com/hashicorp/nomad/api/services.go b/vendor/github.com/hashicorp/nomad/api/services.go deleted file mode 100644 index 98c59b80fc..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/services.go +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "net/url" - "time" -) - -// ServiceRegistration is an instance of a single allocation advertising itself -// as a named service with a specific address. Each registration is constructed -// from the job specification Service block. Whether the service is registered -// within Nomad, and therefore generates a ServiceRegistration is controlled by -// the Service.Provider parameter. -type ServiceRegistration struct { - - // ID is the unique identifier for this registration. It currently follows - // the Consul service registration format to provide consistency between - // the two solutions. - ID string - - // ServiceName is the human friendly identifier for this service - // registration. - ServiceName string - - // Namespace represents the namespace within which this service is - // registered. - Namespace string - - // NodeID is Node.ID on which this service registration is currently - // running. - NodeID string - - // Datacenter is the DC identifier of the node as identified by - // Node.Datacenter. - Datacenter string - - // JobID is Job.ID and represents the job which contained the service block - // which resulted in this service registration. - JobID string - - // AllocID is Allocation.ID and represents the allocation within which this - // service is running. - AllocID string - - // Tags are determined from either Service.Tags or Service.CanaryTags and - // help identify this service. Tags can also be used to perform lookups of - // services depending on their state and role. - Tags []string - - // Address is the IP address of this service registration. This information - // comes from the client and is not guaranteed to be routable; this depends - // on cluster network topology. - Address string - - // Port is the port number on which this service registration is bound. It - // is determined by a combination of factors on the client. - Port int - - CreateIndex uint64 - ModifyIndex uint64 -} - -// ServiceRegistrationListStub represents all service registrations held within a -// single namespace. -type ServiceRegistrationListStub struct { - - // Namespace details the namespace in which these services have been - // registered. - Namespace string - - // Services is a list of services found within the namespace. - Services []*ServiceRegistrationStub -} - -// ServiceRegistrationStub is the stub object describing an individual -// namespaced service. The object is built in a manner which would allow us to -// add additional fields in the future, if we wanted. -type ServiceRegistrationStub struct { - - // ServiceName is the human friendly name for this service as specified - // within Service.Name. - ServiceName string - - // Tags is a list of unique tags found for this service. The list is - // de-duplicated automatically by Nomad. - Tags []string -} - -// Services is used to query the service endpoints. -type Services struct { - client *Client -} - -// Services returns a new handle on the services endpoints. -func (c *Client) Services() *Services { - return &Services{client: c} -} - -// List can be used to list all service registrations currently stored within -// the target namespace. It returns a stub response object. -func (s *Services) List(q *QueryOptions) ([]*ServiceRegistrationListStub, *QueryMeta, error) { - var resp []*ServiceRegistrationListStub - qm, err := s.client.query("/v1/services", &resp, q) - if err != nil { - return nil, qm, err - } - return resp, qm, nil -} - -// Get is used to return a list of service registrations whose name matches the -// specified parameter. -func (s *Services) Get(serviceName string, q *QueryOptions) ([]*ServiceRegistration, *QueryMeta, error) { - var resp []*ServiceRegistration - qm, err := s.client.query("/v1/service/"+url.PathEscape(serviceName), &resp, q) - if err != nil { - return nil, qm, err - } - return resp, qm, nil -} - -// Delete can be used to delete an individual service registration as defined -// by its service name and service ID. -func (s *Services) Delete(serviceName, serviceID string, q *WriteOptions) (*WriteMeta, error) { - path := fmt.Sprintf("/v1/service/%s/%s", url.PathEscape(serviceName), url.PathEscape(serviceID)) - wm, err := s.client.delete(path, nil, nil, q) - if err != nil { - return nil, err - } - return wm, nil -} - -// CheckRestart describes if and when a task should be restarted based on -// failing health checks. -type CheckRestart struct { - Limit int `mapstructure:"limit" hcl:"limit,optional"` - Grace *time.Duration `mapstructure:"grace" hcl:"grace,optional"` - IgnoreWarnings bool `mapstructure:"ignore_warnings" hcl:"ignore_warnings,optional"` -} - -// Canonicalize CheckRestart fields if not nil. -func (c *CheckRestart) Canonicalize() { - if c == nil { - return - } - - if c.Grace == nil { - c.Grace = pointerOf(1 * time.Second) - } -} - -// Copy returns a copy of CheckRestart or nil if unset. -func (c *CheckRestart) Copy() *CheckRestart { - if c == nil { - return nil - } - - nc := new(CheckRestart) - nc.Limit = c.Limit - if c.Grace != nil { - g := *c.Grace - nc.Grace = &g - } - nc.IgnoreWarnings = c.IgnoreWarnings - return nc -} - -// Merge values from other CheckRestart over default values on this -// CheckRestart and return merged copy. -func (c *CheckRestart) Merge(o *CheckRestart) *CheckRestart { - if c == nil { - // Just return other - return o - } - - nc := c.Copy() - - if o == nil { - // Nothing to merge - return nc - } - - if o.Limit > 0 { - nc.Limit = o.Limit - } - - if o.Grace != nil { - nc.Grace = o.Grace - } - - if o.IgnoreWarnings { - nc.IgnoreWarnings = o.IgnoreWarnings - } - - return nc -} - -// ServiceCheck represents a Nomad job-submitters view of a Consul service health check. -type ServiceCheck struct { - Name string `hcl:"name,optional"` - Type string `hcl:"type,optional"` - Command string `hcl:"command,optional"` - Args []string `hcl:"args,optional"` - Path string `hcl:"path,optional"` - Protocol string `hcl:"protocol,optional"` - PortLabel string `mapstructure:"port" hcl:"port,optional"` - Expose bool `hcl:"expose,optional"` - AddressMode string `mapstructure:"address_mode" hcl:"address_mode,optional"` - Advertise string `hcl:"advertise,optional"` - Interval time.Duration `hcl:"interval,optional"` - Timeout time.Duration `hcl:"timeout,optional"` - InitialStatus string `mapstructure:"initial_status" hcl:"initial_status,optional"` - Notes string `hcl:"notes,optional"` - TLSServerName string `mapstructure:"tls_server_name" hcl:"tls_server_name,optional"` - TLSSkipVerify bool `mapstructure:"tls_skip_verify" hcl:"tls_skip_verify,optional"` - Header map[string][]string `hcl:"header,block"` - Method string `hcl:"method,optional"` - CheckRestart *CheckRestart `mapstructure:"check_restart" hcl:"check_restart,block"` - GRPCService string `mapstructure:"grpc_service" hcl:"grpc_service,optional"` - GRPCUseTLS bool `mapstructure:"grpc_use_tls" hcl:"grpc_use_tls,optional"` - TaskName string `mapstructure:"task" hcl:"task,optional"` - SuccessBeforePassing int `mapstructure:"success_before_passing" hcl:"success_before_passing,optional"` - FailuresBeforeCritical int `mapstructure:"failures_before_critical" hcl:"failures_before_critical,optional"` - FailuresBeforeWarning int `mapstructure:"failures_before_warning" hcl:"failures_before_warning,optional"` - Body string `hcl:"body,optional"` - OnUpdate string `mapstructure:"on_update" hcl:"on_update,optional"` -} - -// Service represents a Nomad job-submitters view of a Consul or Nomad service. -type Service struct { - Name string `hcl:"name,optional"` - Tags []string `hcl:"tags,optional"` - CanaryTags []string `mapstructure:"canary_tags" hcl:"canary_tags,optional"` - EnableTagOverride bool `mapstructure:"enable_tag_override" hcl:"enable_tag_override,optional"` - PortLabel string `mapstructure:"port" hcl:"port,optional"` - AddressMode string `mapstructure:"address_mode" hcl:"address_mode,optional"` - Address string `hcl:"address,optional"` - Checks []ServiceCheck `hcl:"check,block"` - CheckRestart *CheckRestart `mapstructure:"check_restart" hcl:"check_restart,block"` - Connect *ConsulConnect `hcl:"connect,block"` - Meta map[string]string `hcl:"meta,block"` - CanaryMeta map[string]string `hcl:"canary_meta,block"` - TaggedAddresses map[string]string `hcl:"tagged_addresses,block"` - TaskName string `mapstructure:"task" hcl:"task,optional"` - OnUpdate string `mapstructure:"on_update" hcl:"on_update,optional"` - Identity *WorkloadIdentity `hcl:"identity,block"` - Weights *ServiceWeights `mapstructure:"weights" hcl:"weights,block"` - - // Provider defines which backend system provides the service registration, - // either "consul" (default) or "nomad". - Provider string `hcl:"provider,optional"` - - // Cluster is valid only for Nomad Enterprise with provider: consul - Cluster string `hcl:"cluster,optional"` - - // Kind defines the consul service kind, valid only when provider: consul - Kind string `hcl:"kind,optional"` -} - -const ( - OnUpdateRequireHealthy = "require_healthy" - OnUpdateIgnoreWarn = "ignore_warnings" - OnUpdateIgnore = "ignore" - - // ServiceProviderConsul is the default provider for services when no - // parameter is set. - ServiceProviderConsul = "consul" -) - -// Canonicalize the Service by ensuring its name and address mode are set. Task -// will be nil for group services. -func (s *Service) Canonicalize(t *Task, tg *TaskGroup, job *Job) { - if s.Name == "" { - if t != nil { - s.Name = fmt.Sprintf("%s-%s-%s", *job.Name, *tg.Name, t.Name) - } else { - s.Name = fmt.Sprintf("%s-%s", *job.Name, *tg.Name) - } - } - - // Default to AddressModeAuto - if s.AddressMode == "" { - s.AddressMode = "auto" - } - - // Default to OnUpdateRequireHealthy - if s.OnUpdate == "" { - s.OnUpdate = OnUpdateRequireHealthy - } - - // Default the service provider. - if s.Provider == "" { - s.Provider = ServiceProviderConsul - } - if s.Cluster == "" { - s.Cluster = "default" - } - - if len(s.Meta) == 0 { - s.Meta = nil - } - - if len(s.CanaryMeta) == 0 { - s.CanaryMeta = nil - } - - if len(s.TaggedAddresses) == 0 { - s.TaggedAddresses = nil - } - - s.Connect.Canonicalize() - s.Weights.Canonicalize() - - // Canonicalize CheckRestart on Checks and merge Service.CheckRestart - // into each check. - for i, check := range s.Checks { - s.Checks[i].CheckRestart = s.CheckRestart.Merge(check.CheckRestart) - s.Checks[i].CheckRestart.Canonicalize() - - if s.Checks[i].SuccessBeforePassing < 0 { - s.Checks[i].SuccessBeforePassing = 0 - } - - if s.Checks[i].FailuresBeforeCritical < 0 { - s.Checks[i].FailuresBeforeCritical = 0 - } - - if s.Checks[i].FailuresBeforeWarning < 0 { - s.Checks[i].FailuresBeforeWarning = 0 - } - - // Inhert Service - if s.Checks[i].OnUpdate == "" { - s.Checks[i].OnUpdate = s.OnUpdate - } - } -} - -// ServiceWeights is the jobspec block which configures how a service instance -// is weighted in a DNS SRV request based on the service's health status. -type ServiceWeights struct { - Passing int `hcl:"passing,optional"` - Warning int `hcl:"warning,optional"` -} - -func (weights *ServiceWeights) Canonicalize() { - if weights == nil { - return - } - - if weights.Passing <= 0 { - weights.Passing = 1 - } - if weights.Warning <= 0 { - weights.Warning = 1 - } -} diff --git a/vendor/github.com/hashicorp/nomad/api/status.go b/vendor/github.com/hashicorp/nomad/api/status.go deleted file mode 100644 index 7a04715b98..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/status.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Status is used to query the status-related endpoints. -type Status struct { - client *Client -} - -// Status returns a handle on the status endpoints. -func (c *Client) Status() *Status { - return &Status{client: c} -} - -// Leader is used to query for the current cluster leader. -func (s *Status) Leader() (string, error) { - var resp string - _, err := s.client.query("/v1/status/leader", &resp, nil) - if err != nil { - return "", err - } - return resp, nil -} - -// RegionLeader is used to query for the leader in the passed region. -func (s *Status) RegionLeader(region string) (string, error) { - var resp string - q := QueryOptions{Region: region} - _, err := s.client.query("/v1/status/leader", &resp, &q) - if err != nil { - return "", err - } - return resp, nil -} - -// Peers is used to query the addresses of the server peers -// in the cluster. -func (s *Status) Peers() ([]string, error) { - var resp []string - _, err := s.client.query("/v1/status/peers", &resp, nil) - if err != nil { - return nil, err - } - return resp, nil -} diff --git a/vendor/github.com/hashicorp/nomad/api/system.go b/vendor/github.com/hashicorp/nomad/api/system.go deleted file mode 100644 index b19eaf8b1e..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/system.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -// Status is used to query the status-related endpoints. -type System struct { - client *Client -} - -// System returns a handle on the system endpoints. -func (c *Client) System() *System { - return &System{client: c} -} - -func (s *System) GarbageCollect() error { - var req struct{} - _, err := s.client.put("/v1/system/gc", &req, nil, nil) - return err -} - -func (s *System) ReconcileSummaries() error { - var req struct{} - _, err := s.client.put("/v1/system/reconcile/summaries", &req, nil, nil) - return err -} diff --git a/vendor/github.com/hashicorp/nomad/api/task_sched.go b/vendor/github.com/hashicorp/nomad/api/task_sched.go deleted file mode 100644 index 42af2a9d93..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/task_sched.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -type TaskSchedule struct { - Cron *TaskScheduleCron `hcl:"cron,block"` -} - -type TaskScheduleCron struct { - Start string `hcl:"start,optional"` - End string `hcl:"end,optional"` - Timezone string `hcl:"timezone,optional"` -} diff --git a/vendor/github.com/hashicorp/nomad/api/tasks.go b/vendor/github.com/hashicorp/nomad/api/tasks.go deleted file mode 100644 index cddf6c9c4a..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/tasks.go +++ /dev/null @@ -1,1254 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "fmt" - "path" - "path/filepath" - "strings" - "time" -) - -type ReconcileOption = string - -const ( - // RestartPolicyModeDelay causes an artificial delay till the next interval is - // reached when the specified attempts have been reached in the interval. - RestartPolicyModeDelay = "delay" - - // RestartPolicyModeFail causes a job to fail if the specified number of - // attempts are reached within an interval. - RestartPolicyModeFail = "fail" - - // ReconcileOption is used to specify the behavior of the reconciliation process - // between the original allocations and the replacements when a previously - // disconnected client comes back online. - ReconcileOptionKeepOriginal = "keep_original" - ReconcileOptionKeepReplacement = "keep_replacement" - ReconcileOptionBestScore = "best_score" - ReconcileOptionLongestRunning = "longest_running" -) - -// MemoryStats holds memory usage related stats -type MemoryStats struct { - RSS uint64 - Cache uint64 - Swap uint64 - Usage uint64 - MaxUsage uint64 - KernelUsage uint64 - KernelMaxUsage uint64 - Measured []string -} - -// CpuStats holds cpu usage related stats -type CpuStats struct { - SystemMode float64 - UserMode float64 - TotalTicks float64 - ThrottledPeriods uint64 - ThrottledTime uint64 - Percent float64 - Measured []string -} - -// ResourceUsage holds information related to cpu and memory stats -type ResourceUsage struct { - MemoryStats *MemoryStats - CpuStats *CpuStats - DeviceStats []*DeviceGroupStats -} - -// TaskResourceUsage holds aggregated resource usage of all processes in a Task -// and the resource usage of the individual pids -type TaskResourceUsage struct { - ResourceUsage *ResourceUsage - Timestamp int64 - Pids map[string]*ResourceUsage -} - -// AllocResourceUsage holds the aggregated task resource usage of the -// allocation. -type AllocResourceUsage struct { - ResourceUsage *ResourceUsage - Tasks map[string]*TaskResourceUsage - Timestamp int64 -} - -// AllocCheckStatus contains the current status of a nomad service discovery check. -type AllocCheckStatus struct { - ID string - Check string - Group string - Mode string - Output string - Service string - Task string - Status string - StatusCode int - Timestamp int64 -} - -// AllocCheckStatuses holds the set of nomad service discovery checks within -// the allocation (including group and task level service checks). -type AllocCheckStatuses map[string]AllocCheckStatus - -// RestartPolicy defines how the Nomad client restarts -// tasks in a taskgroup when they fail -type RestartPolicy struct { - Interval *time.Duration `hcl:"interval,optional"` - Attempts *int `hcl:"attempts,optional"` - Delay *time.Duration `hcl:"delay,optional"` - Mode *string `hcl:"mode,optional"` - RenderTemplates *bool `mapstructure:"render_templates" hcl:"render_templates,optional"` -} - -func (r *RestartPolicy) Merge(rp *RestartPolicy) { - if rp.Interval != nil { - r.Interval = rp.Interval - } - if rp.Attempts != nil { - r.Attempts = rp.Attempts - } - if rp.Delay != nil { - r.Delay = rp.Delay - } - if rp.Mode != nil { - r.Mode = rp.Mode - } - if rp.RenderTemplates != nil { - r.RenderTemplates = rp.RenderTemplates - } -} - -// Disconnect strategy defines how both clients and server should behave in case of -// disconnection between them. -type DisconnectStrategy struct { - // Defines for how long the server will consider the unresponsive node as - // disconnected but alive instead of lost. - LostAfter *time.Duration `mapstructure:"lost_after" hcl:"lost_after,optional"` - - // Defines for how long a disconnected client will keep its allocations running. - StopOnClientAfter *time.Duration `mapstructure:"stop_on_client_after" hcl:"stop_on_client_after,optional"` - - // A boolean field used to define if the allocations should be replaced while - // it's considered disconnected. - Replace *bool `mapstructure:"replace" hcl:"replace,optional"` - - // Once the disconnected node starts reporting again, it will define which - // instances to keep: the original allocations, the replacement, the one - // running on the node with the best score as it is currently implemented, - // or the allocation that has been running continuously the longest. - Reconcile *ReconcileOption `mapstructure:"reconcile" hcl:"reconcile,optional"` -} - -func (ds *DisconnectStrategy) Canonicalize() { - if ds.Replace == nil { - ds.Replace = pointerOf(true) - } - - if ds.Reconcile == nil { - ds.Reconcile = pointerOf(ReconcileOptionBestScore) - } -} - -// Reschedule configures how Tasks are rescheduled when they crash or fail. -type ReschedulePolicy struct { - // Attempts limits the number of rescheduling attempts that can occur in an interval. - Attempts *int `mapstructure:"attempts" hcl:"attempts,optional"` - - // Interval is a duration in which we can limit the number of reschedule attempts. - Interval *time.Duration `mapstructure:"interval" hcl:"interval,optional"` - - // Delay is a minimum duration to wait between reschedule attempts. - // The delay function determines how much subsequent reschedule attempts are delayed by. - Delay *time.Duration `mapstructure:"delay" hcl:"delay,optional"` - - // DelayFunction determines how the delay progressively changes on subsequent reschedule - // attempts. Valid values are "exponential", "constant", and "fibonacci". - DelayFunction *string `mapstructure:"delay_function" hcl:"delay_function,optional"` - - // MaxDelay is an upper bound on the delay. - MaxDelay *time.Duration `mapstructure:"max_delay" hcl:"max_delay,optional"` - - // Unlimited allows rescheduling attempts until they succeed - Unlimited *bool `mapstructure:"unlimited" hcl:"unlimited,optional"` -} - -func (r *ReschedulePolicy) Merge(rp *ReschedulePolicy) { - if rp == nil { - return - } - if rp.Interval != nil { - r.Interval = rp.Interval - } - if rp.Attempts != nil { - r.Attempts = rp.Attempts - } - if rp.Delay != nil { - r.Delay = rp.Delay - } - if rp.DelayFunction != nil { - r.DelayFunction = rp.DelayFunction - } - if rp.MaxDelay != nil { - r.MaxDelay = rp.MaxDelay - } - if rp.Unlimited != nil { - r.Unlimited = rp.Unlimited - } -} - -func (r *ReschedulePolicy) Canonicalize(jobType string) { - dp := NewDefaultReschedulePolicy(jobType) - if r.Interval == nil { - r.Interval = dp.Interval - } - if r.Attempts == nil { - r.Attempts = dp.Attempts - } - if r.Delay == nil { - r.Delay = dp.Delay - } - if r.DelayFunction == nil { - r.DelayFunction = dp.DelayFunction - } - if r.MaxDelay == nil { - r.MaxDelay = dp.MaxDelay - } - if r.Unlimited == nil { - r.Unlimited = dp.Unlimited - } -} - -// Affinity is used to serialize task group affinities -type Affinity struct { - LTarget string `hcl:"attribute,optional"` // Left-hand target - RTarget string `hcl:"value,optional"` // Right-hand target - Operand string `hcl:"operator,optional"` // Constraint operand (<=, <, =, !=, >, >=), set_contains_all, set_contains_any - Weight *int8 `hcl:"weight,optional"` // Weight applied to nodes that match the affinity. Can be negative -} - -func NewAffinity(lTarget string, operand string, rTarget string, weight int8) *Affinity { - return &Affinity{ - LTarget: lTarget, - RTarget: rTarget, - Operand: operand, - Weight: pointerOf(weight), - } -} - -func (a *Affinity) Canonicalize() { - if a.Weight == nil { - a.Weight = pointerOf(int8(50)) - } -} - -func NewDefaultDisconnectStrategy() *DisconnectStrategy { - return &DisconnectStrategy{ - LostAfter: pointerOf(0 * time.Minute), - Replace: pointerOf(true), - Reconcile: pointerOf(ReconcileOptionBestScore), - } -} - -func NewDefaultReschedulePolicy(jobType string) *ReschedulePolicy { - var dp *ReschedulePolicy - switch jobType { - case "service": - // This needs to be in sync with DefaultServiceJobReschedulePolicy - // in nomad/structs/structs.go - dp = &ReschedulePolicy{ - Delay: pointerOf(30 * time.Second), - DelayFunction: pointerOf("exponential"), - MaxDelay: pointerOf(1 * time.Hour), - Unlimited: pointerOf(true), - - Attempts: pointerOf(0), - Interval: pointerOf(time.Duration(0)), - } - case "batch": - // This needs to be in sync with DefaultBatchJobReschedulePolicy - // in nomad/structs/structs.go - dp = &ReschedulePolicy{ - Attempts: pointerOf(1), - Interval: pointerOf(24 * time.Hour), - Delay: pointerOf(5 * time.Second), - DelayFunction: pointerOf("constant"), - - MaxDelay: pointerOf(time.Duration(0)), - Unlimited: pointerOf(false), - } - - case "system": - dp = &ReschedulePolicy{ - Attempts: pointerOf(0), - Interval: pointerOf(time.Duration(0)), - Delay: pointerOf(time.Duration(0)), - DelayFunction: pointerOf(""), - MaxDelay: pointerOf(time.Duration(0)), - Unlimited: pointerOf(false), - } - - default: - // GH-7203: it is possible an unknown job type is passed to this - // function and we need to ensure a non-nil object is returned so that - // the canonicalization runs without panicking. - dp = &ReschedulePolicy{ - Attempts: pointerOf(0), - Interval: pointerOf(time.Duration(0)), - Delay: pointerOf(time.Duration(0)), - DelayFunction: pointerOf(""), - MaxDelay: pointerOf(time.Duration(0)), - Unlimited: pointerOf(false), - } - } - return dp -} - -func (r *ReschedulePolicy) Copy() *ReschedulePolicy { - if r == nil { - return nil - } - nrp := new(ReschedulePolicy) - *nrp = *r - return nrp -} - -func (r *ReschedulePolicy) String() string { - if r == nil { - return "" - } - if *r.Unlimited { - return fmt.Sprintf("unlimited with %v delay, max_delay = %v", *r.DelayFunction, *r.MaxDelay) - } - return fmt.Sprintf("%v in %v with %v delay, max_delay = %v", *r.Attempts, *r.Interval, *r.DelayFunction, *r.MaxDelay) -} - -// Spread is used to serialize task group allocation spread preferences -type Spread struct { - Attribute string `hcl:"attribute,optional"` - Weight *int8 `hcl:"weight,optional"` - SpreadTarget []*SpreadTarget `hcl:"target,block"` -} - -// SpreadTarget is used to serialize target allocation spread percentages -type SpreadTarget struct { - Value string `hcl:",label"` - Percent uint8 `hcl:"percent,optional"` -} - -func NewSpreadTarget(value string, percent uint8) *SpreadTarget { - return &SpreadTarget{ - Value: value, - Percent: percent, - } -} - -func NewSpread(attribute string, weight int8, spreadTargets []*SpreadTarget) *Spread { - return &Spread{ - Attribute: attribute, - Weight: pointerOf(weight), - SpreadTarget: spreadTargets, - } -} - -func (s *Spread) Canonicalize() { - if s.Weight == nil { - s.Weight = pointerOf(int8(50)) - } -} - -// EphemeralDisk is an ephemeral disk object -type EphemeralDisk struct { - Sticky *bool `hcl:"sticky,optional"` - Migrate *bool `hcl:"migrate,optional"` - SizeMB *int `mapstructure:"size" hcl:"size,optional"` -} - -func DefaultEphemeralDisk() *EphemeralDisk { - return &EphemeralDisk{ - Sticky: pointerOf(false), - Migrate: pointerOf(false), - SizeMB: pointerOf(300), - } -} - -func (e *EphemeralDisk) Canonicalize() { - if e.Sticky == nil { - e.Sticky = pointerOf(false) - } - if e.Migrate == nil { - e.Migrate = pointerOf(false) - } - if e.SizeMB == nil { - e.SizeMB = pointerOf(300) - } -} - -// MigrateStrategy describes how allocations for a task group should be -// migrated between nodes (eg when draining). -type MigrateStrategy struct { - MaxParallel *int `mapstructure:"max_parallel" hcl:"max_parallel,optional"` - HealthCheck *string `mapstructure:"health_check" hcl:"health_check,optional"` - MinHealthyTime *time.Duration `mapstructure:"min_healthy_time" hcl:"min_healthy_time,optional"` - HealthyDeadline *time.Duration `mapstructure:"healthy_deadline" hcl:"healthy_deadline,optional"` -} - -func DefaultMigrateStrategy() *MigrateStrategy { - return &MigrateStrategy{ - MaxParallel: pointerOf(1), - HealthCheck: pointerOf("checks"), - MinHealthyTime: pointerOf(10 * time.Second), - HealthyDeadline: pointerOf(5 * time.Minute), - } -} - -func (m *MigrateStrategy) Canonicalize() { - if m == nil { - return - } - defaults := DefaultMigrateStrategy() - if m.MaxParallel == nil { - m.MaxParallel = defaults.MaxParallel - } - if m.HealthCheck == nil { - m.HealthCheck = defaults.HealthCheck - } - if m.MinHealthyTime == nil { - m.MinHealthyTime = defaults.MinHealthyTime - } - if m.HealthyDeadline == nil { - m.HealthyDeadline = defaults.HealthyDeadline - } -} - -func (m *MigrateStrategy) Merge(o *MigrateStrategy) { - if o.MaxParallel != nil { - m.MaxParallel = o.MaxParallel - } - if o.HealthCheck != nil { - m.HealthCheck = o.HealthCheck - } - if o.MinHealthyTime != nil { - m.MinHealthyTime = o.MinHealthyTime - } - if o.HealthyDeadline != nil { - m.HealthyDeadline = o.HealthyDeadline - } -} - -func (m *MigrateStrategy) Copy() *MigrateStrategy { - if m == nil { - return nil - } - nm := new(MigrateStrategy) - *nm = *m - return nm -} - -// VolumeRequest is a representation of a storage volume that a TaskGroup wishes to use. -type VolumeRequest struct { - Name string `hcl:"name,label"` - Type string `hcl:"type,optional"` - Source string `hcl:"source,optional"` - ReadOnly bool `hcl:"read_only,optional"` - Sticky bool `hcl:"sticky,optional"` - AccessMode string `hcl:"access_mode,optional"` - AttachmentMode string `hcl:"attachment_mode,optional"` - MountOptions *CSIMountOptions `hcl:"mount_options,block"` - PerAlloc bool `hcl:"per_alloc,optional"` - ExtraKeysHCL []string `hcl1:",unusedKeys,optional" json:"-"` -} - -const ( - VolumeMountPropagationPrivate = "private" - VolumeMountPropagationHostToTask = "host-to-task" - VolumeMountPropagationBidirectional = "bidirectional" -) - -// VolumeMount represents the relationship between a destination path in a task -// and the task group volume that should be mounted there. -type VolumeMount struct { - Volume *string `hcl:"volume,optional"` - Destination *string `hcl:"destination,optional"` - ReadOnly *bool `mapstructure:"read_only" hcl:"read_only,optional"` - PropagationMode *string `mapstructure:"propagation_mode" hcl:"propagation_mode,optional"` - SELinuxLabel *string `mapstructure:"selinux_label" hcl:"selinux_label,optional"` -} - -func (vm *VolumeMount) Canonicalize() { - if vm.PropagationMode == nil { - vm.PropagationMode = pointerOf(VolumeMountPropagationPrivate) - } - - if vm.ReadOnly == nil { - vm.ReadOnly = pointerOf(false) - } - - if vm.SELinuxLabel == nil { - vm.SELinuxLabel = pointerOf("") - } -} - -// TaskGroup is the unit of scheduling. -type TaskGroup struct { - Name *string `hcl:"name,label"` - Count *int `hcl:"count,optional"` - Constraints []*Constraint `hcl:"constraint,block"` - Affinities []*Affinity `hcl:"affinity,block"` - Tasks []*Task `hcl:"task,block"` - Spreads []*Spread `hcl:"spread,block"` - Volumes map[string]*VolumeRequest `hcl:"volume,block"` - RestartPolicy *RestartPolicy `hcl:"restart,block"` - Disconnect *DisconnectStrategy `hcl:"disconnect,block"` - ReschedulePolicy *ReschedulePolicy `hcl:"reschedule,block"` - EphemeralDisk *EphemeralDisk `hcl:"ephemeral_disk,block"` - Update *UpdateStrategy `hcl:"update,block"` - Migrate *MigrateStrategy `hcl:"migrate,block"` - Networks []*NetworkResource `hcl:"network,block"` - Meta map[string]string `hcl:"meta,block"` - Services []*Service `hcl:"service,block"` - ShutdownDelay *time.Duration `mapstructure:"shutdown_delay" hcl:"shutdown_delay,optional"` - // Deprecated: StopAfterClientDisconnect is deprecated in Nomad 1.8 and ignored in Nomad 1.10. Use Disconnect.StopOnClientAfter. - StopAfterClientDisconnect *time.Duration `mapstructure:"stop_after_client_disconnect" hcl:"stop_after_client_disconnect,optional"` - // Deprecated: MaxClientDisconnect is deprecated in Nomad 1.8.0 and ignored in Nomad 1.10. Use Disconnect.LostAfter. - MaxClientDisconnect *time.Duration `mapstructure:"max_client_disconnect" hcl:"max_client_disconnect,optional"` - Scaling *ScalingPolicy `hcl:"scaling,block"` - Consul *Consul `hcl:"consul,block"` - // Deprecated: PreventRescheduleOnLost is deprecated in Nomad 1.8.0 and ignored in Nomad 1.10. Use Disconnect.Replace. - PreventRescheduleOnLost *bool `hcl:"prevent_reschedule_on_lost,optional"` -} - -// NewTaskGroup creates a new TaskGroup. -func NewTaskGroup(name string, count int) *TaskGroup { - return &TaskGroup{ - Name: pointerOf(name), - Count: pointerOf(count), - } -} - -// Canonicalize sets defaults and merges settings that should be inherited from the job -func (g *TaskGroup) Canonicalize(job *Job) { - if g.Name == nil { - g.Name = pointerOf("") - } - - if g.Count == nil { - if g.Scaling != nil && g.Scaling.Min != nil { - g.Count = pointerOf(int(*g.Scaling.Min)) - } else { - g.Count = pointerOf(1) - } - } - if g.Scaling != nil { - g.Scaling.Canonicalize(*g.Count) - } - if g.EphemeralDisk == nil { - g.EphemeralDisk = DefaultEphemeralDisk() - } else { - g.EphemeralDisk.Canonicalize() - } - - // Merge job.consul onto group.consul - if g.Consul != nil { - g.Consul.MergeNamespace(job.ConsulNamespace) - g.Consul.Canonicalize() - } - - // Merge the update policy from the job - if ju, tu := job.Update != nil, g.Update != nil; ju && tu { - // Merge the jobs and task groups definition of the update strategy - jc := job.Update.Copy() - jc.Merge(g.Update) - g.Update = jc - } else if ju && !job.Update.Empty() { - // Inherit the jobs as long as it is non-empty. - jc := job.Update.Copy() - g.Update = jc - } - - if g.Update != nil { - g.Update.Canonicalize() - } - - // Merge the reschedule policy from the job - if jr, tr := job.Reschedule != nil, g.ReschedulePolicy != nil; jr && tr { - jobReschedule := job.Reschedule.Copy() - jobReschedule.Merge(g.ReschedulePolicy) - g.ReschedulePolicy = jobReschedule - } else if jr { - jobReschedule := job.Reschedule.Copy() - g.ReschedulePolicy = jobReschedule - } - // Only use default reschedule policy for non system jobs - if g.ReschedulePolicy == nil && *job.Type != "system" { - g.ReschedulePolicy = NewDefaultReschedulePolicy(*job.Type) - } - if g.ReschedulePolicy != nil { - g.ReschedulePolicy.Canonicalize(*job.Type) - } - - // Merge the migrate strategy from the job - if jm, tm := job.Migrate != nil, g.Migrate != nil; jm && tm { - jobMigrate := job.Migrate.Copy() - jobMigrate.Merge(g.Migrate) - g.Migrate = jobMigrate - } else if jm { - jobMigrate := job.Migrate.Copy() - g.Migrate = jobMigrate - } - - // Merge with default reschedule policy - if g.Migrate == nil && *job.Type == "service" { - g.Migrate = &MigrateStrategy{} - } - if g.Migrate != nil { - g.Migrate.Canonicalize() - } - - var defaultRestartPolicy *RestartPolicy - switch *job.Type { - case "service", "system": - defaultRestartPolicy = defaultServiceJobRestartPolicy() - default: - defaultRestartPolicy = defaultBatchJobRestartPolicy() - } - - if g.RestartPolicy != nil { - defaultRestartPolicy.Merge(g.RestartPolicy) - } - g.RestartPolicy = defaultRestartPolicy - - for _, t := range g.Tasks { - t.Canonicalize(g, job) - } - - for _, spread := range g.Spreads { - spread.Canonicalize() - } - for _, a := range g.Affinities { - a.Canonicalize() - } - for _, n := range g.Networks { - n.Canonicalize() - } - for _, s := range g.Services { - s.Canonicalize(nil, g, job) - } - - if g.Disconnect != nil { - g.Disconnect.Canonicalize() - } -} - -// These needs to be in sync with DefaultServiceJobRestartPolicy in -// in nomad/structs/structs.go -func defaultServiceJobRestartPolicy() *RestartPolicy { - return &RestartPolicy{ - Delay: pointerOf(15 * time.Second), - Attempts: pointerOf(2), - Interval: pointerOf(30 * time.Minute), - Mode: pointerOf(RestartPolicyModeFail), - RenderTemplates: pointerOf(false), - } -} - -// These needs to be in sync with DefaultBatchJobRestartPolicy in -// in nomad/structs/structs.go -func defaultBatchJobRestartPolicy() *RestartPolicy { - return &RestartPolicy{ - Delay: pointerOf(15 * time.Second), - Attempts: pointerOf(3), - Interval: pointerOf(24 * time.Hour), - Mode: pointerOf(RestartPolicyModeFail), - RenderTemplates: pointerOf(false), - } -} - -// Constrain is used to add a constraint to a task group. -func (g *TaskGroup) Constrain(c *Constraint) *TaskGroup { - g.Constraints = append(g.Constraints, c) - return g -} - -// SetMeta is used to add a meta k/v pair to a task group -func (g *TaskGroup) SetMeta(key, val string) *TaskGroup { - if g.Meta == nil { - g.Meta = make(map[string]string) - } - g.Meta[key] = val - return g -} - -// AddTask is used to add a new task to a task group. -func (g *TaskGroup) AddTask(t *Task) *TaskGroup { - g.Tasks = append(g.Tasks, t) - return g -} - -// AddAffinity is used to add a new affinity to a task group. -func (g *TaskGroup) AddAffinity(a *Affinity) *TaskGroup { - g.Affinities = append(g.Affinities, a) - return g -} - -// RequireDisk adds a ephemeral disk to the task group -func (g *TaskGroup) RequireDisk(disk *EphemeralDisk) *TaskGroup { - g.EphemeralDisk = disk - return g -} - -// AddSpread is used to add a new spread preference to a task group. -func (g *TaskGroup) AddSpread(s *Spread) *TaskGroup { - g.Spreads = append(g.Spreads, s) - return g -} - -// ScalingPolicy is used to add a new scaling policy to a task group. -func (g *TaskGroup) ScalingPolicy(sp *ScalingPolicy) *TaskGroup { - g.Scaling = sp - return g -} - -// LogConfig provides configuration for log rotation -type LogConfig struct { - MaxFiles *int `mapstructure:"max_files" hcl:"max_files,optional"` - MaxFileSizeMB *int `mapstructure:"max_file_size" hcl:"max_file_size,optional"` - - // COMPAT(1.6.0): Enabled had to be swapped for Disabled to fix a backwards - // compatibility bug when restoring pre-1.5.4 jobs. Remove in 1.6.0 - Enabled *bool `mapstructure:"enabled" hcl:"enabled,optional"` - - Disabled *bool `mapstructure:"disabled" hcl:"disabled,optional"` -} - -func DefaultLogConfig() *LogConfig { - return &LogConfig{ - MaxFiles: pointerOf(10), - MaxFileSizeMB: pointerOf(10), - Disabled: pointerOf(false), - } -} - -func (l *LogConfig) Canonicalize() { - if l.MaxFiles == nil { - l.MaxFiles = pointerOf(10) - } - if l.MaxFileSizeMB == nil { - l.MaxFileSizeMB = pointerOf(10) - } - if l.Disabled == nil { - l.Disabled = pointerOf(false) - } -} - -// DispatchPayloadConfig configures how a task gets its input from a job dispatch -type DispatchPayloadConfig struct { - File string `hcl:"file,optional"` -} - -const ( - TaskLifecycleHookPrestart = "prestart" - TaskLifecycleHookPoststart = "poststart" - TaskLifecycleHookPoststop = "poststop" -) - -type TaskLifecycle struct { - Hook string `mapstructure:"hook" hcl:"hook"` - Sidecar bool `mapstructure:"sidecar" hcl:"sidecar,optional"` -} - -// Empty determines if lifecycle has user-input values -func (l *TaskLifecycle) Empty() bool { - return l == nil -} - -// Task is a single process in a task group. -type Task struct { - Name string `hcl:"name,label"` - Driver string `hcl:"driver,optional"` - User string `hcl:"user,optional"` - Lifecycle *TaskLifecycle `hcl:"lifecycle,block"` - Config map[string]interface{} `hcl:"config,block"` - Constraints []*Constraint `hcl:"constraint,block"` - Affinities []*Affinity `hcl:"affinity,block"` - Env map[string]string `hcl:"env,block"` - Services []*Service `hcl:"service,block"` - Resources *Resources `hcl:"resources,block"` - RestartPolicy *RestartPolicy `hcl:"restart,block"` - Meta map[string]string `hcl:"meta,block"` - KillTimeout *time.Duration `mapstructure:"kill_timeout" hcl:"kill_timeout,optional"` - LogConfig *LogConfig `mapstructure:"logs" hcl:"logs,block"` - Artifacts []*TaskArtifact `hcl:"artifact,block"` - Vault *Vault `hcl:"vault,block"` - Consul *Consul `hcl:"consul,block"` - Templates []*Template `hcl:"template,block"` - DispatchPayload *DispatchPayloadConfig `hcl:"dispatch_payload,block"` - VolumeMounts []*VolumeMount `hcl:"volume_mount,block"` - CSIPluginConfig *TaskCSIPluginConfig `mapstructure:"csi_plugin" json:",omitempty" hcl:"csi_plugin,block"` - Leader bool `hcl:"leader,optional"` - ShutdownDelay time.Duration `mapstructure:"shutdown_delay" hcl:"shutdown_delay,optional"` - KillSignal string `mapstructure:"kill_signal" hcl:"kill_signal,optional"` - Kind string `hcl:"kind,optional"` - ScalingPolicies []*ScalingPolicy `hcl:"scaling,block"` - - // Identity is the default Nomad Workload Identity and will be added to - // Identities with the name "default" - Identity *WorkloadIdentity - - // Workload Identities - Identities []*WorkloadIdentity `hcl:"identity,block"` - - Actions []*Action `hcl:"action,block"` - - Schedule *TaskSchedule `hcl:"schedule,block"` -} - -func (t *Task) Canonicalize(tg *TaskGroup, job *Job) { - if t.Resources == nil { - t.Resources = &Resources{} - } - t.Resources.Canonicalize() - - if t.KillTimeout == nil { - t.KillTimeout = pointerOf(5 * time.Second) - } - if t.LogConfig == nil { - t.LogConfig = DefaultLogConfig() - } else { - t.LogConfig.Canonicalize() - } - for _, artifact := range t.Artifacts { - artifact.Canonicalize() - } - if t.Vault != nil { - t.Vault.Canonicalize() - } - if t.Consul != nil { - t.Consul.Canonicalize() - } - for _, tmpl := range t.Templates { - tmpl.Canonicalize() - } - for _, s := range t.Services { - s.Canonicalize(t, tg, job) - } - for _, a := range t.Affinities { - a.Canonicalize() - } - for _, vm := range t.VolumeMounts { - vm.Canonicalize() - } - if t.Lifecycle.Empty() { - t.Lifecycle = nil - } - if t.CSIPluginConfig != nil { - t.CSIPluginConfig.Canonicalize() - } - if t.RestartPolicy == nil { - t.RestartPolicy = tg.RestartPolicy - } else { - tgrp := &RestartPolicy{} - *tgrp = *tg.RestartPolicy - tgrp.Merge(t.RestartPolicy) - t.RestartPolicy = tgrp - } -} - -// TaskArtifact is used to download artifacts before running a task. -type TaskArtifact struct { - GetterSource *string `mapstructure:"source" hcl:"source,optional"` - GetterOptions map[string]string `mapstructure:"options" hcl:"options,block"` - GetterHeaders map[string]string `mapstructure:"headers" hcl:"headers,block"` - GetterMode *string `mapstructure:"mode" hcl:"mode,optional"` - GetterInsecure *bool `mapstructure:"insecure" hcl:"insecure,optional"` - RelativeDest *string `mapstructure:"destination" hcl:"destination,optional"` - Chown bool `mapstructure:"chown" hcl:"chown,optional"` -} - -func (a *TaskArtifact) Canonicalize() { - if a.GetterMode == nil { - a.GetterMode = pointerOf("any") - } - if a.GetterInsecure == nil { - a.GetterInsecure = pointerOf(false) - } - if a.GetterSource == nil { - // Shouldn't be possible, but we don't want to panic - a.GetterSource = pointerOf("") - } - if len(a.GetterOptions) == 0 { - a.GetterOptions = nil - } - if len(a.GetterHeaders) == 0 { - a.GetterHeaders = nil - } - if a.RelativeDest == nil { - switch *a.GetterMode { - case "file": - // File mode should default to local/filename - dest := *a.GetterSource - dest = path.Base(dest) - dest = filepath.Join("local", dest) - a.RelativeDest = &dest - default: - // Default to a directory - a.RelativeDest = pointerOf("local/") - } - } -} - -// WaitConfig is the Min/Max duration to wait for the Consul cluster to reach a -// consistent state before attempting to render Templates. -type WaitConfig struct { - Min *time.Duration `mapstructure:"min" hcl:"min"` - Max *time.Duration `mapstructure:"max" hcl:"max"` -} - -func (wc *WaitConfig) Copy() *WaitConfig { - if wc == nil { - return nil - } - - nwc := new(WaitConfig) - *nwc = *wc - - return nwc -} - -type ChangeScript struct { - Command *string `mapstructure:"command" hcl:"command"` - Args []string `mapstructure:"args" hcl:"args,optional"` - Timeout *time.Duration `mapstructure:"timeout" hcl:"timeout,optional"` - FailOnError *bool `mapstructure:"fail_on_error" hcl:"fail_on_error"` -} - -func (ch *ChangeScript) Canonicalize() { - if ch.Command == nil { - ch.Command = pointerOf("") - } - if ch.Args == nil { - ch.Args = []string{} - } - if ch.Timeout == nil { - ch.Timeout = pointerOf(5 * time.Second) - } - if ch.FailOnError == nil { - ch.FailOnError = pointerOf(false) - } -} - -type Template struct { - SourcePath *string `mapstructure:"source" hcl:"source,optional"` - DestPath *string `mapstructure:"destination" hcl:"destination,optional"` - EmbeddedTmpl *string `mapstructure:"data" hcl:"data,optional"` - ChangeMode *string `mapstructure:"change_mode" hcl:"change_mode,optional"` - ChangeScript *ChangeScript `mapstructure:"change_script" hcl:"change_script,block"` - ChangeSignal *string `mapstructure:"change_signal" hcl:"change_signal,optional"` - Once *bool `mapstructure:"once" hcl:"once,optional"` - Splay *time.Duration `mapstructure:"splay" hcl:"splay,optional"` - Perms *string `mapstructure:"perms" hcl:"perms,optional"` - Uid *int `mapstructure:"uid" hcl:"uid,optional"` - Gid *int `mapstructure:"gid" hcl:"gid,optional"` - LeftDelim *string `mapstructure:"left_delimiter" hcl:"left_delimiter,optional"` - RightDelim *string `mapstructure:"right_delimiter" hcl:"right_delimiter,optional"` - Envvars *bool `mapstructure:"env" hcl:"env,optional"` - VaultGrace *time.Duration `mapstructure:"vault_grace" hcl:"vault_grace,optional"` - Wait *WaitConfig `mapstructure:"wait" hcl:"wait,block"` - ErrMissingKey *bool `mapstructure:"error_on_missing_key" hcl:"error_on_missing_key,optional"` -} - -func (tmpl *Template) Canonicalize() { - if tmpl.SourcePath == nil { - tmpl.SourcePath = pointerOf("") - } - if tmpl.DestPath == nil { - tmpl.DestPath = pointerOf("") - } - if tmpl.EmbeddedTmpl == nil { - tmpl.EmbeddedTmpl = pointerOf("") - } - if tmpl.ChangeMode == nil { - tmpl.ChangeMode = pointerOf("restart") - } - if tmpl.ChangeSignal == nil { - if *tmpl.ChangeMode == "signal" { - tmpl.ChangeSignal = pointerOf("SIGHUP") - } else { - tmpl.ChangeSignal = pointerOf("") - } - } else { - sig := *tmpl.ChangeSignal - tmpl.ChangeSignal = pointerOf(strings.ToUpper(sig)) - } - if tmpl.ChangeScript != nil { - tmpl.ChangeScript.Canonicalize() - } - if tmpl.Once == nil { - tmpl.Once = pointerOf(false) - } - if tmpl.Splay == nil { - tmpl.Splay = pointerOf(5 * time.Second) - } - if tmpl.Perms == nil { - tmpl.Perms = pointerOf("0644") - } - if tmpl.LeftDelim == nil { - tmpl.LeftDelim = pointerOf("{{") - } - if tmpl.RightDelim == nil { - tmpl.RightDelim = pointerOf("}}") - } - if tmpl.Envvars == nil { - tmpl.Envvars = pointerOf(false) - } - if tmpl.ErrMissingKey == nil { - tmpl.ErrMissingKey = pointerOf(false) - } - //COMPAT(0.12) VaultGrace is deprecated and unused as of Vault 0.5 - if tmpl.VaultGrace == nil { - tmpl.VaultGrace = pointerOf(time.Duration(0)) - } -} - -type Vault struct { - Policies []string `hcl:"policies,optional"` - Role string `hcl:"role,optional"` - Namespace *string `mapstructure:"namespace" hcl:"namespace,optional"` - Cluster string `hcl:"cluster,optional"` - Env *bool `hcl:"env,optional"` - DisableFile *bool `mapstructure:"disable_file" hcl:"disable_file,optional"` - ChangeMode *string `mapstructure:"change_mode" hcl:"change_mode,optional"` - ChangeSignal *string `mapstructure:"change_signal" hcl:"change_signal,optional"` - AllowTokenExpiration *bool `mapstructure:"allow_token_expiration" hcl:"allow_token_expiration,optional"` -} - -func (v *Vault) Canonicalize() { - if v.Env == nil { - v.Env = pointerOf(true) - } - if v.DisableFile == nil { - v.DisableFile = pointerOf(false) - } - if v.Namespace == nil { - v.Namespace = pointerOf("") - } - if v.Cluster == "" { - v.Cluster = "default" - } - if v.ChangeMode == nil { - v.ChangeMode = pointerOf("restart") - } - if v.ChangeSignal == nil { - v.ChangeSignal = pointerOf("SIGHUP") - } - if v.AllowTokenExpiration == nil { - v.AllowTokenExpiration = pointerOf(false) - } -} - -// NewTask creates and initializes a new Task. -func NewTask(name, driver string) *Task { - return &Task{ - Name: name, - Driver: driver, - } -} - -// SetConfig is used to configure a single k/v pair on -// the task. -func (t *Task) SetConfig(key string, val interface{}) *Task { - if t.Config == nil { - t.Config = make(map[string]interface{}) - } - t.Config[key] = val - return t -} - -// SetMeta is used to add metadata k/v pairs to the task. -func (t *Task) SetMeta(key, val string) *Task { - if t.Meta == nil { - t.Meta = make(map[string]string) - } - t.Meta[key] = val - return t -} - -// Require is used to add resource requirements to a task. -func (t *Task) Require(r *Resources) *Task { - t.Resources = r - return t -} - -// Constrain adds a new constraints to a single task. -func (t *Task) Constrain(c *Constraint) *Task { - t.Constraints = append(t.Constraints, c) - return t -} - -// AddAffinity adds a new affinity to a single task. -func (t *Task) AddAffinity(a *Affinity) *Task { - t.Affinities = append(t.Affinities, a) - return t -} - -// SetLogConfig sets a log config to a task -func (t *Task) SetLogConfig(l *LogConfig) *Task { - t.LogConfig = l - return t -} - -// SetLifecycle is used to set lifecycle config to a task. -func (t *Task) SetLifecycle(l *TaskLifecycle) *Task { - t.Lifecycle = l - return t -} - -// TaskState tracks the current state of a task and events that caused state -// transitions. -type TaskState struct { - State string - Failed bool - Restarts uint64 - LastRestart time.Time - StartedAt time.Time - FinishedAt time.Time - Events []*TaskEvent -} - -const ( - TaskSetup = "Task Setup" - TaskSetupFailure = "Setup Failure" - TaskDriverFailure = "Driver Failure" - TaskDriverMessage = "Driver" - TaskReceived = "Received" - TaskFailedValidation = "Failed Validation" - TaskStarted = "Started" - TaskTerminated = "Terminated" - TaskKilling = "Killing" - TaskKilled = "Killed" - TaskRestarting = "Restarting" - TaskNotRestarting = "Not Restarting" - TaskDownloadingArtifacts = "Downloading Artifacts" - TaskArtifactDownloadFailed = "Failed Artifact Download" - TaskSiblingFailed = "Sibling Task Failed" - TaskSignaling = "Signaling" - TaskRestartSignal = "Restart Signaled" - TaskLeaderDead = "Leader Task Dead" - TaskBuildingTaskDir = "Building Task Directory" - TaskClientReconnected = "Reconnected" -) - -// TaskEvent is an event that effects the state of a task and contains meta-data -// appropriate to the events type. -type TaskEvent struct { - Type string - Time int64 - DisplayMessage string - Details map[string]string - Message string - // DEPRECATION NOTICE: The following fields are all deprecated. see TaskEvent struct in structs.go for details. - FailsTask bool - RestartReason string - SetupError string - DriverError string - DriverMessage string - ExitCode int - Signal int - KillReason string - KillTimeout time.Duration - KillError string - StartDelay int64 - DownloadError string - ValidationError string - DiskLimit int64 - DiskSize int64 - FailedSibling string - VaultError string - TaskSignalReason string - TaskSignal string - GenericSource string -} - -// CSIPluginType is an enum string that encapsulates the valid options for a -// CSIPlugin block's Type. These modes will allow the plugin to be used in -// different ways by the client. -type CSIPluginType string - -const ( - // CSIPluginTypeNode indicates that Nomad should only use the plugin for - // performing Node RPCs against the provided plugin. - CSIPluginTypeNode CSIPluginType = "node" - - // CSIPluginTypeController indicates that Nomad should only use the plugin for - // performing Controller RPCs against the provided plugin. - CSIPluginTypeController CSIPluginType = "controller" - - // CSIPluginTypeMonolith indicates that Nomad can use the provided plugin for - // both controller and node rpcs. - CSIPluginTypeMonolith CSIPluginType = "monolith" -) - -// TaskCSIPluginConfig contains the data that is required to setup a task as a -// CSI plugin. This will be used by the csi_plugin_supervisor_hook to configure -// mounts for the plugin and initiate the connection to the plugin catalog. -type TaskCSIPluginConfig struct { - // ID is the identifier of the plugin. - // Ideally this should be the FQDN of the plugin. - ID string `mapstructure:"id" hcl:"id,optional"` - - // CSIPluginType instructs Nomad on how to handle processing a plugin - Type CSIPluginType `mapstructure:"type" hcl:"type,optional"` - - // MountDir is the directory (within its container) in which the plugin creates a - // socket (called CSISocketName) for communication with Nomad. Default is /csi. - MountDir string `mapstructure:"mount_dir" hcl:"mount_dir,optional"` - - // StagePublishBaseDir is the base directory (within its container) in which the plugin - // mounts volumes being staged and bind mounts volumes being published. - // e.g. staging_target_path = {StagePublishBaseDir}/staging/{volume-id}/{usage-mode} - // e.g. target_path = {StagePublishBaseDir}/per-alloc/{alloc-id}/{volume-id}/{usage-mode} - // Default is /local/csi. - StagePublishBaseDir string `mapstructure:"stage_publish_base_dir" hcl:"stage_publish_base_dir,optional"` - - // HealthTimeout is the time after which the CSI plugin tasks will be killed - // if the CSI Plugin is not healthy. - HealthTimeout time.Duration `mapstructure:"health_timeout" hcl:"health_timeout,optional"` -} - -func (t *TaskCSIPluginConfig) Canonicalize() { - if t.MountDir == "" { - t.MountDir = "/csi" - } - - if t.StagePublishBaseDir == "" { - t.StagePublishBaseDir = filepath.Join("/local", "csi") - } - - if t.HealthTimeout == 0 { - t.HealthTimeout = 30 * time.Second - } -} - -// WorkloadIdentity is the jobspec block which determines if and how a workload -// identity is exposed to tasks. -type WorkloadIdentity struct { - Name string `hcl:"name,optional"` - Audience []string `mapstructure:"aud" hcl:"aud,optional"` - ChangeMode string `mapstructure:"change_mode" hcl:"change_mode,optional"` - ChangeSignal string `mapstructure:"change_signal" hcl:"change_signal,optional"` - Env bool `hcl:"env,optional"` - File bool `hcl:"file,optional"` - Filepath string `hcl:"filepath,optional"` - ServiceName string `hcl:"service_name,optional"` - TTL time.Duration `mapstructure:"ttl" hcl:"ttl,optional"` -} - -type Action struct { - Name string `hcl:"name,label"` - Command string `mapstructure:"command" hcl:"command"` - Args []string `mapstructure:"args" hcl:"args,optional"` -} diff --git a/vendor/github.com/hashicorp/nomad/api/utils.go b/vendor/github.com/hashicorp/nomad/api/utils.go deleted file mode 100644 index be48c98ff9..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/utils.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "strconv" - "strings" -) - -// formatFloat converts the floating-point number f to a string, -// after rounding it to the passed unit. -// -// Uses 'f' format (-ddd.dddddd, no exponent), and uses at most -// maxPrec digits after the decimal point. -func formatFloat(f float64, maxPrec int) string { - v := strconv.FormatFloat(f, 'f', -1, 64) - - idx := strings.LastIndex(v, ".") - if idx == -1 { - return v - } - - sublen := idx + maxPrec + 1 - if sublen > len(v) { - sublen = len(v) - } - - return v[:sublen] -} - -// pointerOf returns a pointer to a. -func pointerOf[A any](a A) *A { - return &a -} - -// pointerCopy returns a new pointer to a. -func pointerCopy[A any](a *A) *A { - if a == nil { - return nil - } - na := *a - return &na -} diff --git a/vendor/github.com/hashicorp/nomad/api/variables.go b/vendor/github.com/hashicorp/nomad/api/variables.go deleted file mode 100644 index 0c35d30d2a..0000000000 --- a/vendor/github.com/hashicorp/nomad/api/variables.go +++ /dev/null @@ -1,526 +0,0 @@ -// Copyright (c) HashiCorp, Inc. -// SPDX-License-Identifier: MPL-2.0 - -package api - -import ( - "encoding/json" - "errors" - "fmt" - "net/http" - "strings" -) - -const ( - // ErrVariableNotFound was used as the content of an error string. - // - // Deprecated: use ErrVariablePathNotFound instead. - ErrVariableNotFound = "variable not found" -) - -var ( - // ErrVariablePathNotFound is returned when trying to read a variable that - // does not exist. - ErrVariablePathNotFound = errors.New("variable not found") -) - -// Variables is used to access variables. -type Variables struct { - client *Client -} - -// Variables returns a new handle on the variables. -func (c *Client) Variables() *Variables { - return &Variables{client: c} -} - -// Create is used to create a variable. -func (vars *Variables) Create(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out Variable - wm, err := vars.client.put("/v1/var/"+v.Path, v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// CheckedCreate is used to create a variable if it doesn't exist -// already. If it does, it will return a ErrCASConflict that can be unwrapped -// for more details. -func (vars *Variables) CheckedCreate(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out Variable - wm, err := vars.writeChecked("/v1/var/"+v.Path+"?cas=0", v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// Read is used to query a single variable by path. This will error -// if the variable is not found. -func (vars *Variables) Read(path string, qo *QueryOptions) (*Variable, *QueryMeta, error) { - path = cleanPathString(path) - var v = new(Variable) - qm, err := vars.readInternal("/v1/var/"+path, &v, qo) - if err != nil { - return nil, nil, err - } - if v == nil { - return nil, qm, ErrVariablePathNotFound - } - return v, qm, nil -} - -// Peek is used to query a single variable by path, but does not error -// when the variable is not found -func (vars *Variables) Peek(path string, qo *QueryOptions) (*Variable, *QueryMeta, error) { - path = cleanPathString(path) - var v = new(Variable) - qm, err := vars.readInternal("/v1/var/"+path, &v, qo) - if err != nil { - return nil, nil, err - } - return v, qm, nil -} - -// Update is used to update a variable. -func (vars *Variables) Update(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out Variable - - wm, err := vars.client.put("/v1/var/"+v.Path, v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// CheckedUpdate is used to updated a variable if the modify index -// matches the one on the server. If it does not, it will return an -// ErrCASConflict that can be unwrapped for more details. -func (vars *Variables) CheckedUpdate(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out Variable - - wm, err := vars.writeChecked("/v1/var/"+v.Path+"?cas="+fmt.Sprint(v.ModifyIndex), v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// Delete is used to delete a variable -func (vars *Variables) Delete(path string, qo *WriteOptions) (*WriteMeta, error) { - path = cleanPathString(path) - wm, err := vars.deleteInternal(path, qo) - if err != nil { - return nil, err - } - return wm, nil -} - -// CheckedDelete is used to conditionally delete a variable. If the -// existing variable does not match the provided checkIndex, it will return an -// ErrCASConflict that can be unwrapped for more details. -func (vars *Variables) CheckedDelete(path string, checkIndex uint64, qo *WriteOptions) (*WriteMeta, error) { - path = cleanPathString(path) - wm, err := vars.deleteChecked(path, checkIndex, qo) - if err != nil { - return nil, err - } - return wm, nil -} - -// List is used to dump all of the variables, can be used to pass prefix -// via QueryOptions rather than as a parameter -func (vars *Variables) List(qo *QueryOptions) ([]*VariableMetadata, *QueryMeta, error) { - var resp []*VariableMetadata - qm, err := vars.client.query("/v1/vars", &resp, qo) - if err != nil { - return nil, nil, err - } - return resp, qm, nil -} - -// PrefixList is used to do a prefix List search over variables. -func (vars *Variables) PrefixList(prefix string, qo *QueryOptions) ([]*VariableMetadata, *QueryMeta, error) { - if qo == nil { - qo = &QueryOptions{Prefix: prefix} - } else { - qo.Prefix = prefix - } - return vars.List(qo) -} - -// GetItems returns the inner Items collection from a variable at a given path. -// -// Deprecated: Use GetVariableItems instead. -func (vars *Variables) GetItems(path string, qo *QueryOptions) (*VariableItems, *QueryMeta, error) { - vi, qm, err := vars.GetVariableItems(path, qo) - if err != nil { - return nil, nil, err - } - return &vi, qm, nil -} - -// GetVariableItems returns the inner Items collection from a variable at a given path. -func (vars *Variables) GetVariableItems(path string, qo *QueryOptions) (VariableItems, *QueryMeta, error) { - path = cleanPathString(path) - v := new(Variable) - - qm, err := vars.readInternal("/v1/var/"+path, &v, qo) - if err != nil { - return nil, nil, err - } - - // note: readInternal will in fact turn our v into a nil if not found - if v == nil { - return nil, nil, ErrVariablePathNotFound - } - - return v.Items, qm, nil -} - -// RenewLock renews the lease for the lock on the given variable. It has to be called -// before the lock's TTL expires or the lock will be automatically released after the -// delay period. -func (vars *Variables) RenewLock(v *Variable, qo *WriteOptions) (*VariableMetadata, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out VariableMetadata - - wm, err := vars.client.put("/v1/var/"+v.Path+"?lock-renew", v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// ReleaseLock removes the lock on the given variable. -func (vars *Variables) ReleaseLock(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - return vars.lockOperation(v, qo, "lock-release") -} - -// AcquireLock adds a lock on the given variable and starts a lease on it. In order -// to make any update on the locked variable, the lock ID has to be included in the -// request. In order to maintain ownership of the lock, the lease needs to be -// periodically renewed before the lock's TTL expires. -func (vars *Variables) AcquireLock(v *Variable, qo *WriteOptions) (*Variable, *WriteMeta, error) { - return vars.lockOperation(v, qo, "lock-acquire") -} - -func (vars *Variables) lockOperation(v *Variable, qo *WriteOptions, operation string) (*Variable, *WriteMeta, error) { - v.Path = cleanPathString(v.Path) - var out Variable - - wm, err := vars.client.put("/v1/var/"+v.Path+"?"+operation, v, &out, qo) - if err != nil { - return nil, wm, err - } - return &out, wm, nil -} - -// readInternal exists because the API's higher-level read method requires -// the status code to be 200 (OK). For Peek(), we do not consider 403 (Permission -// Denied or 404 (Not Found) an error, this function just returns a nil in those -// cases. -func (vars *Variables) readInternal(endpoint string, out **Variable, q *QueryOptions) (*QueryMeta, error) { - // todo(shoenig): seems like this could just return a *Variable instead of taking - // in a **Variable and modifying it? - - r, err := vars.client.newRequest("GET", endpoint) - if err != nil { - return nil, err - } - r.setQueryOptions(q) - - checkFn := requireStatusIn(http.StatusOK, http.StatusNotFound, http.StatusForbidden) //nolint:bodyclose - rtt, resp, err := checkFn(vars.client.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - - qm := &QueryMeta{} - _ = parseQueryMeta(resp, qm) - qm.RequestTime = rtt - - if resp.StatusCode == http.StatusNotFound { - *out = nil - _ = resp.Body.Close() - return qm, nil - } - - if resp.StatusCode == http.StatusForbidden { - *out = nil - _ = resp.Body.Close() - // On a 403, there is no QueryMeta to parse, but consul-template--the - // main consumer of the Peek() func that calls this method needs the - // value to be non-zero; so set them to a reasonable but artificial - // value. Index 1 doesn't say anything about the cluster, and there - // has to be a KnownLeader to get a 403. - qm.LastIndex = 1 - qm.KnownLeader = true - return qm, nil - } - - defer func() { - _ = resp.Body.Close() - }() - if err = decodeBody(resp, out); err != nil { - return nil, err - } - - return qm, nil -} - -// deleteInternal exists because the API's higher-level delete method requires -// the status code to be 200 (OK). The SV HTTP API returns a 204 (No Content) -// on success. -func (vars *Variables) deleteInternal(path string, q *WriteOptions) (*WriteMeta, error) { - r, err := vars.client.newRequest("DELETE", fmt.Sprintf("/v1/var/%s", path)) - if err != nil { - return nil, err - } - r.setWriteOptions(q) - - checkFn := requireStatusIn(http.StatusOK, http.StatusNoContent) //nolint:bodyclose - rtt, resp, err := checkFn(vars.client.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - defer resp.Body.Close() - - wm := &WriteMeta{RequestTime: rtt} - _ = parseWriteMeta(resp, wm) - return wm, nil -} - -// deleteChecked exists because the API's higher-level delete method requires -// the status code to be OK. The SV HTTP API returns a 204 (No Content) on -// success and a 409 (Conflict) on a CAS error. -func (vars *Variables) deleteChecked(path string, checkIndex uint64, q *WriteOptions) (*WriteMeta, error) { - r, err := vars.client.newRequest("DELETE", fmt.Sprintf("/v1/var/%s?cas=%v", path, checkIndex)) - if err != nil { - return nil, err - } - r.setWriteOptions(q) - checkFn := requireStatusIn(http.StatusOK, http.StatusNoContent, http.StatusConflict) //nolint:bodyclose - rtt, resp, err := checkFn(vars.client.doRequest(r)) //nolint:bodyclose - if err != nil { - return nil, err - } - defer resp.Body.Close() - - wm := &WriteMeta{RequestTime: rtt} - _ = parseWriteMeta(resp, wm) - - // The only reason we should decode the response body is if - // it is a conflict response. Otherwise, there won't be one. - if resp.StatusCode == http.StatusConflict { - - conflict := new(Variable) - if err = decodeBody(resp, &conflict); err != nil { - return nil, err - } - return nil, ErrCASConflict{ - Conflict: conflict, - CheckIndex: checkIndex, - } - } - return wm, nil -} - -// writeChecked exists because the API's higher-level write method requires -// the status code to be OK. The SV HTTP API returns a 200 (OK) on -// success and a 409 (Conflict) on a CAS error. -func (vars *Variables) writeChecked(endpoint string, in *Variable, out *Variable, q *WriteOptions) (*WriteMeta, error) { - r, err := vars.client.newRequest("PUT", endpoint) - if err != nil { - return nil, err - } - r.setWriteOptions(q) - r.obj = in - - checkFn := requireStatusIn(http.StatusOK, http.StatusNoContent, http.StatusConflict) //nolint:bodyclose - rtt, resp, err := checkFn(vars.client.doRequest(r)) //nolint:bodyclose - - if err != nil { - return nil, err - } - defer func() { - _ = resp.Body.Close() - }() - - wm := &WriteMeta{RequestTime: rtt} - _ = parseWriteMeta(resp, wm) - - if resp.StatusCode == http.StatusConflict { - - conflict := new(Variable) - if err = decodeBody(resp, &conflict); err != nil { - return nil, err - } - return nil, ErrCASConflict{ - Conflict: conflict, - CheckIndex: in.ModifyIndex, - } - } - if out != nil { - if err = decodeBody(resp, &out); err != nil { - return nil, err - } - } - return wm, nil -} - -// Variable specifies the metadata and contents to be stored in the -// encrypted Nomad backend. -type Variable struct { - // Namespace is the Nomad namespace associated with the variable - Namespace string `hcl:"namespace"` - - // Path is the path to the variable - Path string `hcl:"path"` - - // CreateIndex tracks the index of creation time - CreateIndex uint64 `hcl:"create_index"` - - // ModifyTime is the unix nano of the last modified time - ModifyIndex uint64 `hcl:"modify_index"` - - // CreateTime is the unix nano of the creation time - CreateTime int64 `hcl:"create_time"` - - // ModifyTime is the unix nano of the last modified time - ModifyTime int64 `hcl:"modify_time"` - - // Items contains the k/v variable component - Items VariableItems `hcl:"items"` - - // Lock holds the information about the variable lock if its being used. - Lock *VariableLock `hcl:",lock,optional" json:",omitempty"` -} - -// VariableMetadata specifies the metadata for a variable and -// is used as the list object -type VariableMetadata struct { - // Namespace is the Nomad namespace associated with the variable - Namespace string `hcl:"namespace"` - - // Path is the path to the variable - Path string `hcl:"path"` - - // CreateIndex tracks the index of creation time - CreateIndex uint64 `hcl:"create_index"` - - // ModifyTime is the unix nano of the last modified time - ModifyIndex uint64 `hcl:"modify_index"` - - // CreateTime is the unix nano of the creation time - CreateTime int64 `hcl:"create_time"` - - // ModifyTime is the unix nano of the last modified time - ModifyTime int64 `hcl:"modify_time"` - - // Lock holds the information about the variable lock if its being used. - Lock *VariableLock `hcl:",lock,optional" json:",omitempty"` -} - -type VariableLock struct { - // ID is generated by Nomad to provide a unique caller ID which can be used - // for renewals and unlocking. - ID string - - // TTL describes the time-to-live of the current lock holder. - // This is a string version of a time.Duration like "2m". - TTL string - - // LockDelay describes a grace period that exists after a lock is lost, - // before another client may acquire the lock. This helps protect against - // split-brains. This is a string version of a time.Duration like "2m". - LockDelay string -} - -// VariableItems are the key/value pairs of a Variable. -type VariableItems map[string]string - -// NewVariable is a convenience method to more easily create a -// ready-to-use variable -func NewVariable(path string) *Variable { - return &Variable{ - Path: path, - Items: make(VariableItems), - } -} - -// Copy returns a new deep copy of this Variable -func (v *Variable) Copy() *Variable { - var out = *v - out.Items = make(VariableItems) - for key, value := range v.Items { - out.Items[key] = value - } - return &out -} - -// Metadata returns the VariableMetadata component of -// a Variable. This can be useful for comparing against -// a List result. -func (v *Variable) Metadata() *VariableMetadata { - return &VariableMetadata{ - Namespace: v.Namespace, - Path: v.Path, - CreateIndex: v.CreateIndex, - ModifyIndex: v.ModifyIndex, - CreateTime: v.CreateTime, - ModifyTime: v.ModifyTime, - } -} - -// IsZeroValue can be used to test if a Variable has been changed -// from the default values it gets at creation -func (v *Variable) IsZeroValue() bool { - return *v.Metadata() == VariableMetadata{} && v.Items == nil -} - -// cleanPathString removes leading and trailing slashes since they -// would trigger go's path cleaning/redirection behavior in the -// standard HTTP router -func cleanPathString(path string) string { - return strings.Trim(path, " /") -} - -// AsJSON returns the Variable as a JSON-formatted string -func (v *Variable) AsJSON() string { - var b []byte - b, _ = json.Marshal(v) - return string(b) -} - -// AsPrettyJSON returns the Variable as a JSON-formatted string with -// indentation -func (v *Variable) AsPrettyJSON() string { - var b []byte - b, _ = json.MarshalIndent(v, "", " ") - return string(b) -} - -// LockID returns the ID of the lock. In the event this is not held, or the -// variable is not a lock, this string will be empty. -func (v *Variable) LockID() string { - if v.Lock == nil { - return "" - } - - return v.Lock.ID -} - -type ErrCASConflict struct { - CheckIndex uint64 - Conflict *Variable -} - -func (e ErrCASConflict) Error() string { - return fmt.Sprintf("cas conflict: expected ModifyIndex %v; found %v", e.CheckIndex, e.Conflict.ModifyIndex) -} diff --git a/vendor/github.com/infobloxopen/go-trees/LICENSE b/vendor/github.com/infobloxopen/go-trees/LICENSE deleted file mode 100644 index 8dada3edaf..0000000000 --- a/vendor/github.com/infobloxopen/go-trees/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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} - - 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/infobloxopen/go-trees/iptree/iptree.go b/vendor/github.com/infobloxopen/go-trees/iptree/iptree.go deleted file mode 100644 index 6b06920cb7..0000000000 --- a/vendor/github.com/infobloxopen/go-trees/iptree/iptree.go +++ /dev/null @@ -1,341 +0,0 @@ -// Package iptree implements radix tree data structure for IPv4 and IPv6 networks. -package iptree - -import ( - "fmt" - "net" - - "github.com/infobloxopen/go-trees/numtree" -) - -const ( - iPv4Bits = net.IPv4len * 8 - iPv6Bits = net.IPv6len * 8 -) - -var ( - iPv4MaxMask = net.CIDRMask(iPv4Bits, iPv4Bits) - iPv6MaxMask = net.CIDRMask(iPv6Bits, iPv6Bits) -) - -// Tree is a radix tree for IPv4 and IPv6 networks. -type Tree struct { - root32 *numtree.Node32 - root64 *numtree.Node64 -} - -// Pair represents a key-value pair returned by Enumerate method. -type Pair struct { - Key *net.IPNet - Value interface{} -} - -type subTree64 *numtree.Node64 - -// NewTree creates empty tree. -func NewTree() *Tree { - return &Tree{} -} - -// InsertNet inserts value using given network as a key. The method returns new tree (old one remains unaffected). -func (t *Tree) InsertNet(n *net.IPNet, value interface{}) *Tree { - if n == nil { - return t - } - - if key, bits := iPv4NetToUint32(n); bits >= 0 { - var ( - r32 *numtree.Node32 - r64 *numtree.Node64 - ) - - if t != nil { - r32 = t.root32 - r64 = t.root64 - } - - return &Tree{root32: r32.Insert(key, bits, value), root64: r64} - } - - if MSKey, MSBits, LSKey, LSBits := iPv6NetToUint64Pair(n); MSBits >= 0 { - var ( - r32 *numtree.Node32 - r64 *numtree.Node64 - ) - - if t != nil { - r32 = t.root32 - r64 = t.root64 - } - - if MSBits < numtree.Key64BitSize { - return &Tree{root32: r32, root64: r64.Insert(MSKey, MSBits, value)} - } - - var r *numtree.Node64 - if v, ok := r64.ExactMatch(MSKey, MSBits); ok { - s, ok := v.(subTree64) - if !ok { - err := fmt.Errorf("invalid IPv6 tree: expected subTree64 value at 0x%016x, %d but got %T (%#v)", - MSKey, MSBits, v, v) - panic(err) - } - - r = (*numtree.Node64)(s) - } - - r = r.Insert(LSKey, LSBits, value) - return &Tree{root32: r32, root64: r64.Insert(MSKey, MSBits, subTree64(r))} - } - - return t -} - -// InplaceInsertNet inserts (or replaces) value using given network as a key in current tree. -func (t *Tree) InplaceInsertNet(n *net.IPNet, value interface{}) { - if n == nil { - return - } - - if key, bits := iPv4NetToUint32(n); bits >= 0 { - t.root32 = t.root32.InplaceInsert(key, bits, value) - } else if MSKey, MSBits, LSKey, LSBits := iPv6NetToUint64Pair(n); MSBits >= 0 { - if MSBits < numtree.Key64BitSize { - t.root64 = t.root64.InplaceInsert(MSKey, MSBits, value) - } else { - if v, ok := t.root64.ExactMatch(MSKey, MSBits); ok { - s, ok := v.(subTree64) - if !ok { - err := fmt.Errorf("invalid IPv6 tree: expected subTree64 value at 0x%016x, %d but got %T (%#v)", - MSKey, MSBits, v, v) - panic(err) - } - - r := (*numtree.Node64)(s) - newR := r.InplaceInsert(LSKey, LSBits, value) - if newR != r { - t.root64 = t.root64.InplaceInsert(MSKey, MSBits, subTree64(newR)) - } - } else { - var r *numtree.Node64 - r = r.InplaceInsert(LSKey, LSBits, value) - t.root64 = t.root64.InplaceInsert(MSKey, MSBits, subTree64(r)) - } - } - } -} - -// InsertIP inserts value using given IP address as a key. The method returns new tree (old one remains unaffected). -func (t *Tree) InsertIP(ip net.IP, value interface{}) *Tree { - return t.InsertNet(newIPNetFromIP(ip), value) -} - -// InplaceInsertIP inserts (or replaces) value using given IP address as a key in current tree. -func (t *Tree) InplaceInsertIP(ip net.IP, value interface{}) { - t.InplaceInsertNet(newIPNetFromIP(ip), value) -} - -// Enumerate returns channel which is populated by key-value pairs of tree content. -func (t *Tree) Enumerate() chan Pair { - ch := make(chan Pair) - - go func() { - defer close(ch) - - if t == nil { - return - } - - t.enumerate(ch) - }() - - return ch -} - -// GetByNet gets value for network which is equal to or contains given network. -func (t *Tree) GetByNet(n *net.IPNet) (interface{}, bool) { - if t == nil || n == nil { - return nil, false - } - - if key, bits := iPv4NetToUint32(n); bits >= 0 { - return t.root32.Match(key, bits) - } - - if MSKey, MSBits, LSKey, LSBits := iPv6NetToUint64Pair(n); MSBits >= 0 { - v, ok := t.root64.Match(MSKey, MSBits) - if !ok || MSBits < numtree.Key64BitSize { - return v, ok - } - - s, ok := v.(subTree64) - if !ok { - return v, true - } - - v, ok = (*numtree.Node64)(s).Match(LSKey, LSBits) - if ok { - return v, ok - } - - return t.root64.Match(MSKey, numtree.Key64BitSize-1) - } - - return nil, false -} - -// GetByIP gets value for network which is equal to or contains given IP address. -func (t *Tree) GetByIP(ip net.IP) (interface{}, bool) { - return t.GetByNet(newIPNetFromIP(ip)) -} - -// DeleteByNet removes subtree which is contained by given network. The method returns new tree (old one remains unaffected) and flag indicating if deletion happens indeed. -func (t *Tree) DeleteByNet(n *net.IPNet) (*Tree, bool) { - if t == nil || n == nil { - return t, false - } - - if key, bits := iPv4NetToUint32(n); bits >= 0 { - r, ok := t.root32.Delete(key, bits) - if ok { - return &Tree{root32: r, root64: t.root64}, true - } - } else if MSKey, MSBits, LSKey, LSBits := iPv6NetToUint64Pair(n); MSBits >= 0 { - r64 := t.root64 - if MSBits < numtree.Key64BitSize { - r64, ok := r64.Delete(MSKey, MSBits) - if ok { - return &Tree{root32: t.root32, root64: r64}, true - } - } else if v, ok := r64.ExactMatch(MSKey, MSBits); ok { - s, ok := v.(subTree64) - if !ok { - err := fmt.Errorf("invalid IPv6 tree: expected subTree64 value at 0x%016x, %d but got %T (%#v)", - MSKey, MSBits, v, v) - panic(err) - } - - r, ok := (*numtree.Node64)(s).Delete(LSKey, LSBits) - if ok { - if r == nil { - r64, _ = r64.Delete(MSKey, MSBits) - } else { - r64 = r64.Insert(MSKey, MSBits, subTree64(r)) - } - - return &Tree{root32: t.root32, root64: r64}, true - } - } - } - - return t, false -} - -// DeleteByIP removes node by given IP address. The method returns new tree (old one remains unaffected) and flag indicating if deletion happens indeed. -func (t *Tree) DeleteByIP(ip net.IP) (*Tree, bool) { - return t.DeleteByNet(newIPNetFromIP(ip)) -} - -func (t *Tree) enumerate(ch chan Pair) { - for n := range t.root32.Enumerate() { - mask := net.CIDRMask(int(n.Bits), iPv4Bits) - ch <- Pair{ - Key: &net.IPNet{ - IP: unpackUint32ToIP(n.Key).Mask(mask), - Mask: mask}, - Value: n.Value} - } - - for n := range t.root64.Enumerate() { - MSIP := append(unpackUint64ToIP(n.Key), make(net.IP, 8)...) - if s, ok := n.Value.(subTree64); ok { - for n := range (*numtree.Node64)(s).Enumerate() { - LSIP := unpackUint64ToIP(n.Key) - mask := net.CIDRMask(numtree.Key64BitSize+int(n.Bits), iPv6Bits) - ch <- Pair{ - Key: &net.IPNet{ - IP: append(MSIP[0:8], LSIP...).Mask(mask), - Mask: mask}, - Value: n.Value} - } - } else { - mask := net.CIDRMask(int(n.Bits), iPv6Bits) - ch <- Pair{ - Key: &net.IPNet{ - IP: MSIP.Mask(mask), - Mask: mask}, - Value: n.Value} - } - } -} - -func iPv4NetToUint32(n *net.IPNet) (uint32, int) { - if len(n.IP) != net.IPv4len { - return 0, -1 - } - - ones, bits := n.Mask.Size() - if bits != iPv4Bits { - return 0, -1 - } - - return packIPToUint32(n.IP), ones -} - -func packIPToUint32(x net.IP) uint32 { - return (uint32(x[0]) << 24) | (uint32(x[1]) << 16) | (uint32(x[2]) << 8) | uint32(x[3]) -} - -func unpackUint32ToIP(x uint32) net.IP { - return net.IP{byte(x >> 24 & 0xff), byte(x >> 16 & 0xff), byte(x >> 8 & 0xff), byte(x & 0xff)} -} - -func iPv6NetToUint64Pair(n *net.IPNet) (uint64, int, uint64, int) { - if len(n.IP) != net.IPv6len { - return 0, -1, 0, -1 - } - - ones, bits := n.Mask.Size() - if bits != iPv6Bits { - return 0, -1, 0, -1 - } - - MSBits := numtree.Key64BitSize - LSBits := 0 - if ones > numtree.Key64BitSize { - LSBits = ones - numtree.Key64BitSize - } else { - MSBits = ones - } - - return packIPToUint64(n.IP), MSBits, packIPToUint64(n.IP[8:]), LSBits -} - -func packIPToUint64(x net.IP) uint64 { - return (uint64(x[0]) << 56) | (uint64(x[1]) << 48) | (uint64(x[2]) << 40) | (uint64(x[3]) << 32) | - (uint64(x[4]) << 24) | (uint64(x[5]) << 16) | (uint64(x[6]) << 8) | uint64(x[7]) -} - -func unpackUint64ToIP(x uint64) net.IP { - return net.IP{ - byte(x >> 56 & 0xff), - byte(x >> 48 & 0xff), - byte(x >> 40 & 0xff), - byte(x >> 32 & 0xff), - byte(x >> 24 & 0xff), - byte(x >> 16 & 0xff), - byte(x >> 8 & 0xff), - byte(x & 0xff)} -} - -func newIPNetFromIP(ip net.IP) *net.IPNet { - if ip4 := ip.To4(); ip4 != nil { - return &net.IPNet{IP: ip4, Mask: iPv4MaxMask} - } - - if ip6 := ip.To16(); ip6 != nil { - return &net.IPNet{IP: ip6, Mask: iPv6MaxMask} - } - - return nil -} diff --git a/vendor/github.com/infobloxopen/go-trees/numtree/node32.go b/vendor/github.com/infobloxopen/go-trees/numtree/node32.go deleted file mode 100644 index ee36b642f6..0000000000 --- a/vendor/github.com/infobloxopen/go-trees/numtree/node32.go +++ /dev/null @@ -1,438 +0,0 @@ -// Package numtree implements radix tree data structure for 32 and 64-bit unsigned integets. Copy-on-write is used for any tree modification so old root doesn't see any change happens with tree. -package numtree - -import ( - "fmt" - "math/bits" -) - -// Key32BitSize is an alias for bitsize of 32-bit radix tree's key. -const Key32BitSize = 32 - -var ( - masks32 = []uint32{ - 0x00000000, 0x80000000, 0xc0000000, 0xe0000000, - 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, - 0xff000000, 0xff800000, 0xffc00000, 0xffe00000, - 0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000, - 0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000, - 0xfffff000, 0xfffff800, 0xfffffc00, 0xfffffe00, - 0xffffff00, 0xffffff80, 0xffffffc0, 0xffffffe0, - 0xfffffff0, 0xfffffff8, 0xfffffffc, 0xfffffffe, - 0xffffffff} -) - -// Node32 is an element of radix tree with 32-bit unsigned integer as a key. -type Node32 struct { - // Key stores key for current node. - Key uint32 - // Bits is a number of significant bits in Key. - Bits uint8 - // Leaf indicates if the node is leaf node and contains any data in Value. - Leaf bool - // Value contains data associated with key. - Value interface{} - - chld [2]*Node32 -} - -// Dot dumps tree to Graphviz .dot format -func (n *Node32) Dot() string { - body := "" - - // Iterate all nodes using breadth-first search algorithm. - i := 0 - queue := []*Node32{n} - for len(queue) > 0 { - c := queue[0] - body += fmt.Sprintf("N%d %s\n", i, c.dotString()) - if c != nil && (c.chld[0] != nil || c.chld[1] != nil) { - // Children for current node if any always go to the end of the queue - // so we can know their indices using current queue length. - body += fmt.Sprintf("N%d -> { N%d N%d }\n", i, i+len(queue), i+len(queue)+1) - queue = append(append(queue, c.chld[0]), c.chld[1]) - } - - queue = queue[1:] - i++ - } - - return "digraph d {\n" + body + "}\n" -} - -// Insert puts new leaf to radix tree and returns pointer to new root. The method uses copy on write strategy so old root doesn't see the change. -func (n *Node32) Insert(key uint32, bits int, value interface{}) *Node32 { - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key32BitSize { - bits = Key32BitSize - } - - return n.insert(newNode32(key, uint8(bits), true, value)) -} - -// InplaceInsert puts new leaf to radix tree (or replaces value in existing one). The method inserts data directly to current tree so make sure you have exclusive access to it. -func (n *Node32) InplaceInsert(key uint32, bits int, value interface{}) *Node32 { - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key32BitSize { - bits = Key32BitSize - } - - return n.inplaceInsert(key, uint8(bits), value) -} - -// Enumerate returns channel which is populated by nodes with data in order of their keys. -func (n *Node32) Enumerate() chan *Node32 { - ch := make(chan *Node32) - - go func() { - defer close(ch) - - // If tree is empty - - if n == nil { - // return nothing. - return - } - - n.enumerate(ch) - }() - - return ch -} - -// Match locates node which key is equal to or "contains" the key passed as argument. -func (n *Node32) Match(key uint32, bits int) (interface{}, bool) { - // If tree is empty - - if n == nil { - // report nothing. - return n, false - } - - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key32BitSize { - bits = Key32BitSize - } - - r := n.match(key, uint8(bits)) - if r == nil { - return nil, false - } - - return r.Value, true -} - -// ExactMatch locates node which exactly matches given key. -func (n *Node32) ExactMatch(key uint32, bits int) (interface{}, bool) { - // If tree is empty - - if n == nil { - // report nothing. - return n, false - } - - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key32BitSize { - bits = Key32BitSize - } - - r := n.exactMatch(key, uint8(bits)) - if r == nil { - return nil, false - } - - return r.Value, true -} - -// Delete removes subtree which is contained by given key. The method uses copy on write strategy. -func (n *Node32) Delete(key uint32, bits int) (*Node32, bool) { - // If tree is empty - - if n == nil { - // report nothing. - return n, false - } - - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key32BitSize { - bits = Key32BitSize - } - - return n.del(key, uint8(bits)) -} - -func (n *Node32) dotString() string { - if n == nil { - return "[label=\"nil\"]" - } - - if n.Leaf { - v := fmt.Sprintf("%q", fmt.Sprintf("%#v", n.Value)) - return fmt.Sprintf("[label=\"k: %08x, b: %d, v: \\\"%s\\\"\"]", n.Key, n.Bits, v[1:len(v)-1]) - } - - return fmt.Sprintf("[label=\"k: %08x, b: %d\"]", n.Key, n.Bits) -} - -func (n *Node32) insert(c *Node32) *Node32 { - if n == nil { - return c - } - - // Find number of common most significant bits (NCSB): - // 1. xor operation puts zeroes at common bits; - // 2. or masks put ones so that zeroes can't go after smaller number of significant bits (NSB) - // 3. count of leading zeroes gives number of common bits - bits := uint8(bits.LeadingZeros32((n.Key ^ c.Key) | ^masks32[n.Bits] | ^masks32[c.Bits])) - - // There are three cases possible: - // - NCSB less than number of significant bits (NSB) of current tree node: - if bits < n.Bits { - // (branch for current tree node is determined by a bit right after the last common bit) - branch := (n.Key >> (Key32BitSize - 1 - bits)) & 1 - - // - NCSB equals to NSB of candidate node: - if bits == c.Bits { - // make new root from the candidate and put current node to one of its branch; - c.chld[branch] = n - return c - } - - // - NCSB less than NSB of candidate node (it can't be greater because bits after NSB don't count): - // make new root (non-leaf node) - m := newNode32(c.Key&masks32[bits], bits, false, nil) - // with current tree node at one of branches - m.chld[branch] = n - // and the candidate at the other. - m.chld[1-branch] = c - - return m - } - - // - keys are equal (NCSB not less than NSB of current tree node and both numbers are equal): - if c.Bits == n.Bits { - // replace current node with the candidate. - c.chld = n.chld - return c - } - - // - current tree node contains candidate node: - // make new root as a copy of current tree node; - m := newNode32(n.Key, n.Bits, n.Leaf, n.Value) - m.chld = n.chld - - // (branch for the candidate is determined by a bit right after the last common bit) - branch := (c.Key >> (Key32BitSize - 1 - bits)) & 1 - // insert it to correct branch. - m.chld[branch] = m.chld[branch].insert(c) - - return m -} - -func (n *Node32) inplaceInsert(key uint32, sbits uint8, value interface{}) *Node32 { - var ( - p *Node32 - branch uint32 - ) - - r := n - - for n != nil { - cbits := uint8(bits.LeadingZeros32((n.Key ^ key) | ^masks32[n.Bits] | ^masks32[sbits])) - if cbits < n.Bits { - pBranch := branch - branch = (n.Key >> (Key32BitSize - 1 - cbits)) & 1 - - var m *Node32 - - if cbits == sbits { - m = newNode32(key, sbits, true, value) - m.chld[branch] = n - } else { - m = newNode32(key&masks32[cbits], cbits, false, nil) - m.chld[1-branch] = newNode32(key, sbits, true, value) - } - - m.chld[branch] = n - if p == nil { - r = m - } else { - p.chld[pBranch] = m - } - - return r - } - - if sbits == n.Bits { - n.Key = key - n.Leaf = true - n.Value = value - return r - } - - p = n - branch = (key >> (Key32BitSize - 1 - cbits)) & 1 - n = n.chld[branch] - } - - n = newNode32(key, sbits, true, value) - if p == nil { - return n - } - - p.chld[branch] = n - return r -} - -func (n *Node32) enumerate(ch chan *Node32) { - // Implemented by depth-first search. - if n.Leaf { - ch <- n - } - - if n.chld[0] != nil { - n.chld[0].enumerate(ch) - } - - if n.chld[1] != nil { - n.chld[1].enumerate(ch) - } -} - -func (n *Node32) match(key uint32, bits uint8) *Node32 { - // If can't be contained in current root node - - if n.Bits > bits { - // report nothing. - return nil - } - - // If NSB of current tree node is the same as key has - - if n.Bits == bits { - // return current node only if it contains data (leaf node) and masked keys are equal. - if n.Leaf && (n.Key^key)&masks32[n.Bits] == 0 { - return n - } - - return nil - } - - // If key can be contained by current tree node - - if (n.Key^key)&masks32[n.Bits] != 0 { - // but it isn't report nothing. - return nil - } - - // Otherwise jump to branch by key bit right after NSB of current tree node - c := n.chld[(key>>(Key32BitSize-1-n.Bits))&1] - if c != nil { - // and check if child on the branch has anything. - r := c.match(key, bits) - if r != nil { - return r - } - } - - // If nothing matches check if current node contains any data. - if n.Leaf { - return n - } - - return nil -} - -func (n *Node32) exactMatch(key uint32, bits uint8) *Node32 { - // If can't be contained in current root node - - if n.Bits > bits { - // report nothing. - return nil - } - - // If NSB of current tree node is the same as key has - - if n.Bits == bits { - // return current node only if it contains data (leaf node) and masked keys are equal. - if n.Leaf && (n.Key^key)&masks32[n.Bits] == 0 { - return n - } - - return nil - } - - // If key can be contained by current tree node - - if (n.Key^key)&masks32[n.Bits] != 0 { - // but it isn't report nothing. - return nil - } - - // Otherwise jump to branch by key bit right after NSB of current tree node - c := n.chld[(key>>(Key32BitSize-1-n.Bits))&1] - if c != nil { - // and check if child on the branch has anything. - r := c.exactMatch(key, bits) - if r != nil { - return r - } - } - - return nil -} - -func (n *Node32) del(key uint32, bits uint8) (*Node32, bool) { - // If key can contain current tree node - - if bits <= n.Bits { - // report empty new tree and put deletion mark if it contains indeed. - if (n.Key^key)&masks32[bits] == 0 { - return nil, true - } - - return n, false - } - - // If key can be contained by current tree node - - if (n.Key^key)&masks32[n.Bits] != 0 { - // but it isn't report nothing. - return n, false - } - - // Otherwise jump to branch by key bit right after NSB of current tree node - branch := (key >> (Key32BitSize - 1 - n.Bits)) & 1 - c := n.chld[branch] - if c == nil { - // report nothing if the branch is empty. - return n, false - } - - // Try to remove from subtree - c, ok := c.del(key, bits) - if !ok { - // and report nothing if nothing has been deleted. - return n, false - } - - // If child of non-leaf node has been completely deleted - - if c == nil && !n.Leaf { - // drop the node. - return n.chld[1-branch], true - } - - // If deletion happens inside the branch then copy current node. - m := newNode32(n.Key, n.Bits, n.Leaf, n.Value) - m.chld = n.chld - - // Replace changed child with new one and return new root with deletion mark set. - m.chld[branch] = c - return m, true -} - -func newNode32(key uint32, bits uint8, leaf bool, value interface{}) *Node32 { - return &Node32{ - Key: key, - Bits: bits, - Leaf: leaf, - Value: value} -} diff --git a/vendor/github.com/infobloxopen/go-trees/numtree/node64.go b/vendor/github.com/infobloxopen/go-trees/numtree/node64.go deleted file mode 100644 index fed46be373..0000000000 --- a/vendor/github.com/infobloxopen/go-trees/numtree/node64.go +++ /dev/null @@ -1,380 +0,0 @@ -package numtree - -import ( - "fmt" - "math/bits" -) - -// Key64BitSize is an alias for bitsize of 64-bit radix tree's key. -const Key64BitSize = 64 - -var ( - masks64 = []uint64{ - 0x0000000000000000, 0x8000000000000000, 0xc000000000000000, 0xe000000000000000, - 0xf000000000000000, 0xf800000000000000, 0xfc00000000000000, 0xfe00000000000000, - 0xff00000000000000, 0xff80000000000000, 0xffc0000000000000, 0xffe0000000000000, - 0xfff0000000000000, 0xfff8000000000000, 0xfffc000000000000, 0xfffe000000000000, - 0xffff000000000000, 0xffff800000000000, 0xffffc00000000000, 0xffffe00000000000, - 0xfffff00000000000, 0xfffff80000000000, 0xfffffc0000000000, 0xfffffe0000000000, - 0xffffff0000000000, 0xffffff8000000000, 0xffffffc000000000, 0xffffffe000000000, - 0xfffffff000000000, 0xfffffff800000000, 0xfffffffc00000000, 0xfffffffe00000000, - 0xffffffff00000000, 0xffffffff80000000, 0xffffffffc0000000, 0xffffffffe0000000, - 0xfffffffff0000000, 0xfffffffff8000000, 0xfffffffffc000000, 0xfffffffffe000000, - 0xffffffffff000000, 0xffffffffff800000, 0xffffffffffc00000, 0xffffffffffe00000, - 0xfffffffffff00000, 0xfffffffffff80000, 0xfffffffffffc0000, 0xfffffffffffe0000, - 0xffffffffffff0000, 0xffffffffffff8000, 0xffffffffffffc000, 0xffffffffffffe000, - 0xfffffffffffff000, 0xfffffffffffff800, 0xfffffffffffffc00, 0xfffffffffffffe00, - 0xffffffffffffff00, 0xffffffffffffff80, 0xffffffffffffffc0, 0xffffffffffffffe0, - 0xfffffffffffffff0, 0xfffffffffffffff8, 0xfffffffffffffffc, 0xfffffffffffffffe, - 0xffffffffffffffff} -) - -// Node64 is an element of radix tree with 64-bit unsigned integer as a key. -type Node64 struct { - // Key stores key for current node. - Key uint64 - // Bits is a number of significant bits in Key. - Bits uint8 - // Leaf indicates if the node is leaf node and contains any data in Value. - Leaf bool - // Value contains data associated with key. - Value interface{} - - chld [2]*Node64 -} - -// Dot dumps tree to Graphviz .dot format -func (n *Node64) Dot() string { - body := "" - - i := 0 - queue := []*Node64{n} - for len(queue) > 0 { - c := queue[0] - body += fmt.Sprintf("N%d %s\n", i, c.dotString()) - - if c != nil && (c.chld[0] != nil || c.chld[1] != nil) { - body += fmt.Sprintf("N%d -> { N%d N%d }\n", i, i+len(queue), i+len(queue)+1) - queue = append(append(queue, c.chld[0]), c.chld[1]) - } - - queue = queue[1:] - i++ - } - - return "digraph d {\n" + body + "}\n" -} - -// Insert puts new leaf to radix tree and returns pointer to new root. The method uses copy on write strategy so old root doesn't see the change. -func (n *Node64) Insert(key uint64, bits int, value interface{}) *Node64 { - if bits < 0 { - bits = 0 - } else if bits > Key64BitSize { - bits = Key64BitSize - } - - return n.insert(newNode64(key, uint8(bits), true, value)) -} - -// InplaceInsert puts new leaf to radix tree (or replaces value in existing one). The method inserts data directly to current tree so make sure you have exclusive access to it. -func (n *Node64) InplaceInsert(key uint64, bits int, value interface{}) *Node64 { - // Adjust bits. - if bits < 0 { - bits = 0 - } else if bits > Key64BitSize { - bits = Key64BitSize - } - - return n.inplaceInsert(key, uint8(bits), value) -} - -// Enumerate returns channel which is populated by nodes in order of their keys. -func (n *Node64) Enumerate() chan *Node64 { - ch := make(chan *Node64) - - go func() { - defer close(ch) - - if n == nil { - return - } - - n.enumerate(ch) - }() - - return ch -} - -// Match locates node which key is equal to or "contains" the key passed as argument. -func (n *Node64) Match(key uint64, bits int) (interface{}, bool) { - if n == nil { - return n, false - } - - if bits < 0 { - bits = 0 - } else if bits > Key64BitSize { - bits = Key64BitSize - } - - r := n.match(key, uint8(bits)) - if r == nil { - return nil, false - } - - return r.Value, true -} - -// ExactMatch locates node which exactly matches given key. -func (n *Node64) ExactMatch(key uint64, bits int) (interface{}, bool) { - if n == nil { - return n, false - } - - if bits < 0 { - bits = 0 - } else if bits > Key64BitSize { - bits = Key64BitSize - } - - r := n.exactMatch(key, uint8(bits)) - if r == nil { - return nil, false - } - - return r.Value, true -} - -// Delete removes subtree which is contained by given key. The method uses copy on write strategy. -func (n *Node64) Delete(key uint64, bits int) (*Node64, bool) { - if n == nil { - return n, false - } - - if bits < 0 { - bits = 0 - } else if bits > Key64BitSize { - bits = Key64BitSize - } - - return n.del(key, uint8(bits)) -} - -func (n *Node64) dotString() string { - if n == nil { - return "[label=\"nil\"]" - } - - if n.Leaf { - v := fmt.Sprintf("%q", fmt.Sprintf("%#v", n.Value)) - return fmt.Sprintf("[label=\"k: %016x, b: %d, v: \\\"%s\\\"\"]", n.Key, n.Bits, v[1:len(v)-1]) - } - - return fmt.Sprintf("[label=\"k: %016x, b: %d\"]", n.Key, n.Bits) -} - -func (n *Node64) insert(c *Node64) *Node64 { - if n == nil { - return c - } - - bits := uint8(bits.LeadingZeros64((n.Key ^ c.Key) | ^masks64[n.Bits] | ^masks64[c.Bits])) - if bits < n.Bits { - branch := (n.Key >> (Key64BitSize - 1 - bits)) & 1 - if bits == c.Bits { - c.chld[branch] = n - return c - } - - m := newNode64(c.Key&masks64[bits], bits, false, nil) - m.chld[branch] = n - m.chld[1-branch] = c - - return m - } - - if c.Bits == n.Bits { - c.chld = n.chld - return c - } - - m := newNode64(n.Key, n.Bits, n.Leaf, n.Value) - m.chld = n.chld - - branch := (c.Key >> (Key64BitSize - 1 - bits)) & 1 - m.chld[branch] = m.chld[branch].insert(c) - - return m -} - -func (n *Node64) inplaceInsert(key uint64, sbits uint8, value interface{}) *Node64 { - var ( - p *Node64 - branch uint64 - ) - - r := n - - for n != nil { - cbits := uint8(bits.LeadingZeros64((n.Key ^ key) | ^masks64[n.Bits] | ^masks64[sbits])) - if cbits < n.Bits { - pBranch := branch - branch = (n.Key >> (Key64BitSize - 1 - cbits)) & 1 - - var m *Node64 - - if cbits == sbits { - m = newNode64(key, sbits, true, value) - m.chld[branch] = n - } else { - m = newNode64(key&masks64[cbits], cbits, false, nil) - m.chld[1-branch] = newNode64(key, sbits, true, value) - } - - m.chld[branch] = n - if p == nil { - r = m - } else { - p.chld[pBranch] = m - } - - return r - } - - if sbits == n.Bits { - n.Key = key - n.Leaf = true - n.Value = value - return r - } - - p = n - branch = (key >> (Key64BitSize - 1 - cbits)) & 1 - n = n.chld[branch] - } - - n = newNode64(key, sbits, true, value) - if p == nil { - return n - } - - p.chld[branch] = n - return r -} - -func (n *Node64) enumerate(ch chan *Node64) { - if n.Leaf { - ch <- n - } - - if n.chld[0] != nil { - n.chld[0].enumerate(ch) - } - - if n.chld[1] != nil { - n.chld[1].enumerate(ch) - } -} - -func (n *Node64) match(key uint64, bits uint8) *Node64 { - if n.Bits > bits { - return nil - } - - if n.Bits == bits { - if n.Leaf && (n.Key^key)&masks64[n.Bits] == 0 { - return n - } - - return nil - } - - if (n.Key^key)&masks64[n.Bits] != 0 { - return nil - } - - c := n.chld[(key>>(Key64BitSize-1-n.Bits))&1] - if c != nil { - r := c.match(key, bits) - if r != nil { - return r - } - } - - if n.Leaf { - return n - } - - return nil -} - -func (n *Node64) exactMatch(key uint64, bits uint8) *Node64 { - if n.Bits > bits { - return nil - } - - if n.Bits == bits { - if n.Leaf && (n.Key^key)&masks64[n.Bits] == 0 { - return n - } - - return nil - } - - if (n.Key^key)&masks64[n.Bits] != 0 { - return nil - } - - c := n.chld[(key>>(Key64BitSize-1-n.Bits))&1] - if c != nil { - r := c.exactMatch(key, bits) - if r != nil { - return r - } - } - - return nil -} - -func (n *Node64) del(key uint64, bits uint8) (*Node64, bool) { - if bits <= n.Bits { - if (n.Key^key)&masks64[bits] == 0 { - return nil, true - } - - return n, false - } - - if (n.Key^key)&masks64[n.Bits] != 0 { - return n, false - } - - branch := (key >> (Key64BitSize - 1 - n.Bits)) & 1 - c := n.chld[branch] - if c == nil { - return n, false - } - - c, ok := c.del(key, bits) - if !ok { - return n, false - } - - if c == nil && !n.Leaf { - return n.chld[1-branch], true - } - - m := newNode64(n.Key, n.Bits, n.Leaf, n.Value) - m.chld = n.chld - - m.chld[branch] = c - return m, true -} - -func newNode64(key uint64, bits uint8, leaf bool, value interface{}) *Node64 { - return &Node64{ - Key: key, - Bits: bits, - Leaf: leaf, - Value: value} -} diff --git a/vendor/github.com/lufia/plan9stats/.gitignore b/vendor/github.com/lufia/plan9stats/.gitignore deleted file mode 100644 index f1c181ec9c..0000000000 --- a/vendor/github.com/lufia/plan9stats/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out diff --git a/vendor/github.com/lufia/plan9stats/LICENSE b/vendor/github.com/lufia/plan9stats/LICENSE deleted file mode 100644 index a6d47e8071..0000000000 --- a/vendor/github.com/lufia/plan9stats/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2019, KADOTA, Kyohei -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -2. 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. - -3. Neither the name of the copyright holder 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 HOLDER 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/lufia/plan9stats/README.md b/vendor/github.com/lufia/plan9stats/README.md deleted file mode 100644 index 70e5386c87..0000000000 --- a/vendor/github.com/lufia/plan9stats/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# plan9stats -A module for retrieving statistics of Plan 9 - -[![GoDev][godev-image]][godev-url] -[![Actions Status][actions-image]][actions-url] - -[godev-image]: https://pkg.go.dev/badge/github.com/lufia/plan9stats -[godev-url]: https://pkg.go.dev/github.com/lufia/plan9stats -[actions-image]: https://github.com/lufia/plan9stats/workflows/Test/badge.svg?branch=main -[actions-url]: https://github.com/lufia/plan9stats/actions?workflow=Test diff --git a/vendor/github.com/lufia/plan9stats/cpu.go b/vendor/github.com/lufia/plan9stats/cpu.go deleted file mode 100644 index eaff362c34..0000000000 --- a/vendor/github.com/lufia/plan9stats/cpu.go +++ /dev/null @@ -1,291 +0,0 @@ -package stats - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - "time" -) - -// CPUType represents /dev/cputype. -type CPUType struct { - Name string - Clock int // clock rate in MHz -} - -func ReadCPUType(ctx context.Context, opts ...Option) (*CPUType, error) { - cfg := newConfig(opts...) - var c CPUType - if err := readCPUType(cfg.rootdir, &c); err != nil { - return nil, err - } - return &c, nil -} - -type SysStats struct { - ID int - NumCtxSwitch int64 - NumInterrupt int64 - NumSyscall int64 - NumFault int64 - NumTLBFault int64 - NumTLBPurge int64 - LoadAvg int64 // in units of milli-CPUs and is decayed over time - Idle int // percentage - Interrupt int // percentage -} - -// ReadSysStats reads system statistics from /dev/sysstat. -func ReadSysStats(ctx context.Context, opts ...Option) ([]*SysStats, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "/dev/sysstat") - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - scanner := bufio.NewScanner(f) - var stats []*SysStats - for scanner.Scan() { - a := strings.Fields(scanner.Text()) - if len(a) != 10 { - continue - } - var ( - p intParser - stat SysStats - ) - stat.ID = p.ParseInt(a[0], 10) - stat.NumCtxSwitch = p.ParseInt64(a[1], 10) - stat.NumInterrupt = p.ParseInt64(a[2], 10) - stat.NumSyscall = p.ParseInt64(a[3], 10) - stat.NumFault = p.ParseInt64(a[4], 10) - stat.NumTLBFault = p.ParseInt64(a[5], 10) - stat.NumTLBPurge = p.ParseInt64(a[6], 10) - stat.LoadAvg = p.ParseInt64(a[7], 10) - stat.Idle = p.ParseInt(a[8], 10) - stat.Interrupt = p.ParseInt(a[9], 10) - if err := p.Err(); err != nil { - return nil, err - } - stats = append(stats, &stat) - } - if err := scanner.Err(); err != nil { - return nil, err - } - return stats, nil -} - -func readCPUType(rootdir string, c *CPUType) error { - file := filepath.Join(rootdir, "/dev/cputype") - b, err := ioutil.ReadFile(file) - if err != nil { - return err - } - b = bytes.TrimSpace(b) - i := bytes.LastIndexByte(b, ' ') - if i < 0 { - return fmt.Errorf("%s: invalid format", file) - } - clock, err := strconv.Atoi(string(b[i+1:])) - if err != nil { - return err - } - c.Name = string(b[:i]) - c.Clock = clock - return nil -} - -// Time represents /dev/time. -type Time struct { - Unix time.Duration - UnixNano time.Duration - Ticks int64 // clock ticks - Freq int64 //cloc frequency -} - -// Uptime returns uptime. -func (t *Time) Uptime() time.Duration { - v := float64(t.Ticks) / float64(t.Freq) - return time.Duration(v*1000_000_000) * time.Nanosecond -} - -func ReadTime(ctx context.Context, opts ...Option) (*Time, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "/dev/time") - var t Time - if err := readTime(file, &t); err != nil { - return nil, err - } - return &t, nil -} - -// ProcStatus represents a /proc/n/status. -type ProcStatus struct { - Name string - User string - State string - Times CPUTime - MemUsed int64 // in units of 1024 bytes - BasePriority uint32 // 0(low) to 19(high) - Priority uint32 // 0(low) to 19(high) -} - -// CPUTime represents /dev/cputime or a part of /proc/n/status. -type CPUTime struct { - User time.Duration // the time in user mode (millisecconds) - Sys time.Duration - Real time.Duration - ChildUser time.Duration // exited children and descendants time in user mode - ChildSys time.Duration - ChildReal time.Duration -} - -// CPUStats emulates Linux's /proc/stat. -type CPUStats struct { - User time.Duration - Sys time.Duration - Idle time.Duration -} - -func ReadCPUStats(ctx context.Context, opts ...Option) (*CPUStats, error) { - cfg := newConfig(opts...) - a, err := ReadSysStats(ctx, opts...) - if err != nil { - return nil, err - } - - dir := filepath.Join(cfg.rootdir, "/proc") - d, err := os.Open(dir) - if err != nil { - return nil, err - } - defer d.Close() - - names, err := d.Readdirnames(0) - if err != nil { - return nil, err - } - var up uint32parser - pids := make([]uint32, len(names)) - for i, s := range names { - if s == "trace" { - continue - } - pids[i] = up.Parse(s) - } - if err := up.err; err != nil { - return nil, err - } - sort.Slice(pids, func(i, j int) bool { - return pids[i] < pids[j] - }) - - var stat CPUStats - for _, pid := range pids { - s := strconv.FormatUint(uint64(pid), 10) - file := filepath.Join(dir, s, "status") - var p ProcStatus - if err := readProcStatus(file, &p); err != nil { - return nil, err - } - stat.User += p.Times.User - stat.Sys += p.Times.Sys - } - - var t Time - file := filepath.Join(cfg.rootdir, "/dev/time") - if err := readTime(file, &t); err != nil { - return nil, err - } - // In multi-processor host, Idle should multiple by number of cores. - u := t.Uptime() * time.Duration(len(a)) - stat.Idle = u - stat.User - stat.Sys - return &stat, nil -} - -func readProcStatus(file string, p *ProcStatus) error { - b, err := ioutil.ReadFile(file) - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - fields := strings.Fields(string(b)) - if len(fields) != 12 { - return errors.New("invalid format") - } - p.Name = string(fields[0]) - p.User = string(fields[1]) - p.State = string(fields[2]) - var up uint32parser - p.Times.User = time.Duration(up.Parse(fields[3])) * time.Millisecond - p.Times.Sys = time.Duration(up.Parse(fields[4])) * time.Millisecond - p.Times.Real = time.Duration(up.Parse(fields[5])) * time.Millisecond - p.Times.ChildUser = time.Duration(up.Parse(fields[6])) * time.Millisecond - p.Times.ChildSys = time.Duration(up.Parse(fields[7])) * time.Millisecond - p.Times.ChildReal = time.Duration(up.Parse(fields[8])) * time.Millisecond - p.MemUsed, err = strconv.ParseInt(fields[9], 10, 64) - if err != nil { - return err - } - p.BasePriority = up.Parse(fields[10]) - p.Priority = up.Parse(fields[11]) - return up.err -} - -func readTime(file string, t *Time) error { - b, err := ioutil.ReadFile(file) - if err != nil { - return err - } - fields := strings.Fields(string(b)) - if len(fields) != 4 { - return errors.New("invalid format") - } - n, err := strconv.ParseInt(fields[0], 10, 32) - if err != nil { - return err - } - t.Unix = time.Duration(n) * time.Second - v, err := strconv.ParseInt(fields[1], 10, 64) - if err != nil { - return err - } - t.UnixNano = time.Duration(v) * time.Nanosecond - t.Ticks, err = strconv.ParseInt(fields[2], 10, 64) - if err != nil { - return err - } - t.Freq, err = strconv.ParseInt(fields[3], 10, 64) - if err != nil { - return err - } - return nil -} - -type uint32parser struct { - err error -} - -func (p *uint32parser) Parse(s string) uint32 { - if p.err != nil { - return 0 - } - n, err := strconv.ParseUint(s, 10, 32) - if err != nil { - p.err = err - return 0 - } - return uint32(n) -} diff --git a/vendor/github.com/lufia/plan9stats/disk.go b/vendor/github.com/lufia/plan9stats/disk.go deleted file mode 100644 index 4a4fa0cd9d..0000000000 --- a/vendor/github.com/lufia/plan9stats/disk.go +++ /dev/null @@ -1,116 +0,0 @@ -package stats - -import ( - "bufio" - "bytes" - "context" - "os" - "path/filepath" - "strings" -) - -// Storage represents /dev/sdXX/ctl. -type Storage struct { - Name string - Model string - Capacity int64 - Partitions []*Partition -} - -// Partition represents a part of /dev/sdXX/ctl. -type Partition struct { - Name string - Start uint64 - End uint64 -} - -func ReadStorages(ctx context.Context, opts ...Option) ([]*Storage, error) { - cfg := newConfig(opts...) - sdctl := filepath.Join(cfg.rootdir, "/dev/sdctl") - f, err := os.Open(sdctl) - if err != nil { - return nil, err - } - defer f.Close() - - var a []*Storage - scanner := bufio.NewScanner(f) - for scanner.Scan() { - fields := bytes.Split(scanner.Bytes(), delim) - if len(fields) == 0 { - continue - } - exp := string(fields[0]) + "*" - if !strings.HasPrefix(exp, "sd") { - continue - } - dir := filepath.Join(cfg.rootdir, "/dev", exp) - m, err := filepath.Glob(dir) - if err != nil { - return nil, err - } - for _, dir := range m { - s, err := readStorage(dir) - if err != nil { - return nil, err - } - a = append(a, s) - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return a, nil -} - -func readStorage(dir string) (*Storage, error) { - ctl := filepath.Join(dir, "ctl") - f, err := os.Open(ctl) - if err != nil { - return nil, err - } - defer f.Close() - - var s Storage - s.Name = filepath.Base(dir) - scanner := bufio.NewScanner(f) - for scanner.Scan() { - line := scanner.Bytes() - switch { - case bytes.HasPrefix(line, []byte("inquiry ")): - s.Model = string(bytes.TrimSpace(line[7:])) - case bytes.HasPrefix(line, []byte("geometry ")): - fields := bytes.Split(line, delim) - if len(fields) < 3 { - continue - } - var p intParser - sec := p.ParseInt64(string(fields[1]), 10) - size := p.ParseInt64(string(fields[2]), 10) - if err := p.Err(); err != nil { - return nil, err - } - s.Capacity = sec * size - case bytes.HasPrefix(line, []byte("part ")): - fields := bytes.Split(line, delim) - if len(fields) < 4 { - continue - } - var p intParser - start := p.ParseUint64(string(fields[2]), 10) - end := p.ParseUint64(string(fields[3]), 10) - if err := p.Err(); err != nil { - return nil, err - } - s.Partitions = append(s.Partitions, &Partition{ - Name: string(fields[1]), - Start: start, - End: end, - }) - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &s, nil -} diff --git a/vendor/github.com/lufia/plan9stats/doc.go b/vendor/github.com/lufia/plan9stats/doc.go deleted file mode 100644 index 10e398e7a8..0000000000 --- a/vendor/github.com/lufia/plan9stats/doc.go +++ /dev/null @@ -1,2 +0,0 @@ -// Package stats provides statistic utilities for Plan 9. -package stats diff --git a/vendor/github.com/lufia/plan9stats/host.go b/vendor/github.com/lufia/plan9stats/host.go deleted file mode 100644 index a3921c0e36..0000000000 --- a/vendor/github.com/lufia/plan9stats/host.go +++ /dev/null @@ -1,223 +0,0 @@ -package stats - -import ( - "bufio" - "bytes" - "context" - "fmt" - "io/ioutil" - "net" - "os" - "path/filepath" - "strconv" - "strings" -) - -var ( - delim = []byte{' '} -) - -// Host represents host status. -type Host struct { - Sysname string - Storages []*Storage - Interfaces []*Interface -} - -// MemStats represents the memory statistics. -type MemStats struct { - Total int64 // total memory in byte - PageSize int64 // a page size in byte - KernelPages int64 - UserPages Gauge - SwapPages Gauge - - Malloced Gauge // kernel malloced data in byte - Graphics Gauge // kernel graphics data in byte -} - -// Gauge is used/available gauge. -type Gauge struct { - Used int64 - Avail int64 -} - -func (g Gauge) Free() int64 { - return g.Avail - g.Used -} - -// ReadMemStats reads memory statistics from /dev/swap. -func ReadMemStats(ctx context.Context, opts ...Option) (*MemStats, error) { - cfg := newConfig(opts...) - swap := filepath.Join(cfg.rootdir, "/dev/swap") - f, err := os.Open(swap) - if err != nil { - return nil, err - } - defer f.Close() - - var stat MemStats - m := map[string]interface{}{ - "memory": &stat.Total, - "pagesize": &stat.PageSize, - "kernel": &stat.KernelPages, - "user": &stat.UserPages, - "swap": &stat.SwapPages, - "kernel malloc": &stat.Malloced, - "kernel draw": &stat.Graphics, - } - scanner := bufio.NewScanner(f) - for scanner.Scan() { - fields := bytes.SplitN(scanner.Bytes(), delim, 2) - if len(fields) < 2 { - continue - } - switch key := string(fields[1]); key { - case "memory", "pagesize", "kernel": - v := m[key].(*int64) - n, err := strconv.ParseInt(string(fields[0]), 10, 64) - if err != nil { - return nil, err - } - *v = n - case "user", "swap", "kernel malloc", "kernel draw": - v := m[key].(*Gauge) - if err := parseGauge(string(fields[0]), v); err != nil { - return nil, err - } - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &stat, nil -} - -func parseGauge(s string, r *Gauge) error { - a := strings.SplitN(s, "/", 2) - if len(a) != 2 { - return fmt.Errorf("can't parse ratio: %s", s) - } - var p intParser - u := p.ParseInt64(a[0], 10) - n := p.ParseInt64(a[1], 10) - if err := p.Err(); err != nil { - return err - } - r.Used = u - r.Avail = n - return nil -} - -type Interface struct { - Name string - Addr string -} - -const ( - numEther = 8 // see ether(3) - numIpifc = 16 // see ip(3) -) - -// ReadInterfaces reads network interfaces from etherN. -func ReadInterfaces(ctx context.Context, opts ...Option) ([]*Interface, error) { - cfg := newConfig(opts...) - var a []*Interface - for i := 0; i < numEther; i++ { - p, err := readInterface(cfg.rootdir, i) - if os.IsNotExist(err) { - continue - } - if err != nil { - return nil, err - } - a = append(a, p) - } - return a, nil -} - -func readInterface(netroot string, i int) (*Interface, error) { - ether := fmt.Sprintf("ether%d", i) - dir := filepath.Join(netroot, ether) - info, err := os.Stat(dir) - if err != nil { - return nil, err - } - if !info.IsDir() { - return nil, fmt.Errorf("%s: is not directory", dir) - } - - addr, err := ioutil.ReadFile(filepath.Join(dir, "addr")) - if err != nil { - return nil, err - } - return &Interface{ - Name: ether, - Addr: string(addr), - }, nil -} - -var ( - netdirs = []string{"/net", "/net.alt"} -) - -// ReadHost reads host status. -func ReadHost(ctx context.Context, opts ...Option) (*Host, error) { - cfg := newConfig(opts...) - var h Host - name, err := readSysname(cfg.rootdir) - if err != nil { - return nil, err - } - h.Sysname = name - - a, err := ReadStorages(ctx, opts...) - if err != nil { - return nil, err - } - h.Storages = a - - for _, s := range netdirs { - netroot := filepath.Join(cfg.rootdir, s) - ifaces, err := ReadInterfaces(ctx, WithRootDir(netroot)) - if err != nil { - return nil, err - } - h.Interfaces = append(h.Interfaces, ifaces...) - } - return &h, nil -} - -func readSysname(rootdir string) (string, error) { - file := filepath.Join(rootdir, "/dev/sysname") - b, err := ioutil.ReadFile(file) - if err != nil { - return "", err - } - return string(bytes.TrimSpace(b)), nil -} - -type IPStats struct { - ID int // number of interface in ipifc dir - Device string // associated physical device - MTU int // max transfer unit - Sendra6 uint8 // on == send router adv - Recvra6 uint8 // on == recv router adv - - Pktin int64 // packets read - Pktout int64 // packets written - Errin int64 // read errors - Errout int64 // write errors -} - -type Iplifc struct { - IP net.IP - Mask net.IPMask - Net net.IP // ip & mask - PerfLifetime int64 // preferred lifetime - ValidLifetime int64 // valid lifetime -} - -type Ipv6rp struct { - // TODO(lufia): see ip(2) -} diff --git a/vendor/github.com/lufia/plan9stats/int.go b/vendor/github.com/lufia/plan9stats/int.go deleted file mode 100644 index e3c9dc834c..0000000000 --- a/vendor/github.com/lufia/plan9stats/int.go +++ /dev/null @@ -1,40 +0,0 @@ -package stats - -import ( - "strconv" -) - -type intParser struct { - err error -} - -func (p *intParser) ParseInt(s string, base int) int { - if p.err != nil { - return 0 - } - var n int64 - n, p.err = strconv.ParseInt(s, base, 0) - return int(n) -} - -func (p *intParser) ParseInt64(s string, base int) int64 { - if p.err != nil { - return 0 - } - var n int64 - n, p.err = strconv.ParseInt(s, base, 64) - return n -} - -func (p *intParser) ParseUint64(s string, base int) uint64 { - if p.err != nil { - return 0 - } - var n uint64 - n, p.err = strconv.ParseUint(s, base, 64) - return n -} - -func (p *intParser) Err() error { - return p.err -} diff --git a/vendor/github.com/lufia/plan9stats/opts.go b/vendor/github.com/lufia/plan9stats/opts.go deleted file mode 100644 index 05b7d036a2..0000000000 --- a/vendor/github.com/lufia/plan9stats/opts.go +++ /dev/null @@ -1,21 +0,0 @@ -package stats - -type Config struct { - rootdir string -} - -type Option func(*Config) - -func newConfig(opts ...Option) *Config { - var cfg Config - for _, opt := range opts { - opt(&cfg) - } - return &cfg -} - -func WithRootDir(dir string) Option { - return func(cfg *Config) { - cfg.rootdir = dir - } -} diff --git a/vendor/github.com/lufia/plan9stats/stats.go b/vendor/github.com/lufia/plan9stats/stats.go deleted file mode 100644 index d4ecdcfa07..0000000000 --- a/vendor/github.com/lufia/plan9stats/stats.go +++ /dev/null @@ -1,88 +0,0 @@ -package stats - -import ( - "bufio" - "context" - "os" - "path/filepath" - "strings" -) - -type InterfaceStats struct { - PacketsReceived int64 // in packets - Link int // link status - PacketsSent int64 // out packets - NumCRCErr int // input CRC errors - NumOverflows int // packet overflows - NumSoftOverflows int // software overflow - NumFramingErr int // framing errors - NumBufferingErr int // buffering errors - NumOutputErr int // output errors - Promiscuous int // number of promiscuous opens - Mbps int // megabits per sec - Addr string -} - -func ReadInterfaceStats(ctx context.Context, opts ...Option) (*InterfaceStats, error) { - cfg := newConfig(opts...) - file := filepath.Join(cfg.rootdir, "stats") - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - var stats InterfaceStats - scanner := bufio.NewScanner(f) - for scanner.Scan() { - s := strings.TrimSpace(scanner.Text()) - a := strings.SplitN(s, ":", 2) - if len(a) != 2 { - continue - } - var p intParser - v := strings.TrimSpace(a[1]) - switch a[0] { - case "in": - stats.PacketsReceived = p.ParseInt64(v, 10) - case "link": - stats.Link = p.ParseInt(v, 10) - case "out": - stats.PacketsSent = p.ParseInt64(v, 10) - case "crc": - stats.NumCRCErr = p.ParseInt(v, 10) - case "overflows": - stats.NumOverflows = p.ParseInt(v, 10) - case "soft overflows": - stats.NumSoftOverflows = p.ParseInt(v, 10) - case "framing errs": - stats.NumFramingErr = p.ParseInt(v, 10) - case "buffer errs": - stats.NumBufferingErr = p.ParseInt(v, 10) - case "output errs": - stats.NumOutputErr = p.ParseInt(v, 10) - case "prom": - stats.Promiscuous = p.ParseInt(v, 10) - case "mbps": - stats.Mbps = p.ParseInt(v, 10) - case "addr": - stats.Addr = v - } - if err := p.Err(); err != nil { - return nil, err - } - } - if err := scanner.Err(); err != nil { - return nil, err - } - return &stats, nil -} - -type TCPStats struct { - MaxConn int - MaxSegment int - ActiveOpens int - PassiveOpens int - EstablishedResets int - CurrentEstablished int -} diff --git a/vendor/github.com/mitchellh/go-homedir/LICENSE b/vendor/github.com/mitchellh/go-homedir/LICENSE deleted file mode 100644 index f9c841a51e..0000000000 --- a/vendor/github.com/mitchellh/go-homedir/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/go-homedir/README.md b/vendor/github.com/mitchellh/go-homedir/README.md deleted file mode 100644 index d70706d5b3..0000000000 --- a/vendor/github.com/mitchellh/go-homedir/README.md +++ /dev/null @@ -1,14 +0,0 @@ -# go-homedir - -This is a Go library for detecting the user's home directory without -the use of cgo, so the library can be used in cross-compilation environments. - -Usage is incredibly simple, just call `homedir.Dir()` to get the home directory -for a user, and `homedir.Expand()` to expand the `~` in a path to the home -directory. - -**Why not just use `os/user`?** The built-in `os/user` package requires -cgo on Darwin systems. This means that any Go code that uses that package -cannot cross compile. But 99% of the time the use for `os/user` is just to -retrieve the home directory, which we can do for the current user without -cgo. This library does that, enabling cross-compilation. diff --git a/vendor/github.com/mitchellh/go-homedir/homedir.go b/vendor/github.com/mitchellh/go-homedir/homedir.go deleted file mode 100644 index 25378537ea..0000000000 --- a/vendor/github.com/mitchellh/go-homedir/homedir.go +++ /dev/null @@ -1,167 +0,0 @@ -package homedir - -import ( - "bytes" - "errors" - "os" - "os/exec" - "path/filepath" - "runtime" - "strconv" - "strings" - "sync" -) - -// DisableCache will disable caching of the home directory. Caching is enabled -// by default. -var DisableCache bool - -var homedirCache string -var cacheLock sync.RWMutex - -// Dir returns the home directory for the executing user. -// -// This uses an OS-specific method for discovering the home directory. -// An error is returned if a home directory cannot be detected. -func Dir() (string, error) { - if !DisableCache { - cacheLock.RLock() - cached := homedirCache - cacheLock.RUnlock() - if cached != "" { - return cached, nil - } - } - - cacheLock.Lock() - defer cacheLock.Unlock() - - var result string - var err error - if runtime.GOOS == "windows" { - result, err = dirWindows() - } else { - // Unix-like system, so just assume Unix - result, err = dirUnix() - } - - if err != nil { - return "", err - } - homedirCache = result - return result, nil -} - -// Expand expands the path to include the home directory if the path -// is prefixed with `~`. If it isn't prefixed with `~`, the path is -// returned as-is. -func Expand(path string) (string, error) { - if len(path) == 0 { - return path, nil - } - - if path[0] != '~' { - return path, nil - } - - if len(path) > 1 && path[1] != '/' && path[1] != '\\' { - return "", errors.New("cannot expand user-specific home dir") - } - - dir, err := Dir() - if err != nil { - return "", err - } - - 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" { - // On plan9, env vars are lowercase. - homeEnv = "home" - } - - // First prefer the HOME environmental variable - if home := os.Getenv(homeEnv); home != "" { - return home, nil - } - - var stdout bytes.Buffer - - // If that fails, try OS specific commands - if runtime.GOOS == "darwin" { - cmd := exec.Command("sh", "-c", `dscl -q . -read /Users/"$(whoami)" NFSHomeDirectory | sed 's/^[^ ]*: //'`) - cmd.Stdout = &stdout - if err := cmd.Run(); err == nil { - result := strings.TrimSpace(stdout.String()) - if result != "" { - return result, nil - } - } - } else { - cmd := exec.Command("getent", "passwd", strconv.Itoa(os.Getuid())) - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - // If the error is ErrNotFound, we ignore it. Otherwise, return it. - if err != exec.ErrNotFound { - return "", err - } - } else { - if passwd := strings.TrimSpace(stdout.String()); passwd != "" { - // username:password:uid:gid:gecos:home:shell - passwdParts := strings.SplitN(passwd, ":", 7) - if len(passwdParts) > 5 { - return passwdParts[5], nil - } - } - } - } - - // If all else fails, try the shell - stdout.Reset() - cmd := exec.Command("sh", "-c", "cd && pwd") - cmd.Stdout = &stdout - if err := cmd.Run(); err != nil { - return "", err - } - - result := strings.TrimSpace(stdout.String()) - if result == "" { - return "", errors.New("blank output when reading home directory") - } - - return result, nil -} - -func dirWindows() (string, error) { - // First prefer the HOME environmental variable - if home := os.Getenv("HOME"); home != "" { - return home, nil - } - - // Prefer standard environment variable USERPROFILE - if home := os.Getenv("USERPROFILE"); home != "" { - return home, nil - } - - drive := os.Getenv("HOMEDRIVE") - path := os.Getenv("HOMEPATH") - home := drive + path - if drive == "" || path == "" { - return "", errors.New("HOMEDRIVE, HOMEPATH, or USERPROFILE are blank") - } - - return home, nil -} diff --git a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md b/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md deleted file mode 100644 index ae634d1cc0..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/CHANGELOG.md +++ /dev/null @@ -1,101 +0,0 @@ -## 1.5.1 - -* Wrap errors so they're compatible with `errors.Is` and `errors.As` [GH-282] -* Fix map of slices not decoding properly in certain cases. [GH-266] - -## 1.5.0 - -* New option `IgnoreUntaggedFields` to ignore decoding to any fields - without `mapstructure` (or the configured tag name) set [GH-277] -* New option `ErrorUnset` which makes it an error if any fields - in a target struct are not set by the decoding process. [GH-225] -* New function `OrComposeDecodeHookFunc` to help compose decode hooks. [GH-240] -* Decoding to slice from array no longer crashes [GH-265] -* Decode nested struct pointers to map [GH-271] -* Fix issue where `,squash` was ignored if `Squash` option was set. [GH-280] -* Fix issue where fields with `,omitempty` would sometimes decode - into a map with an empty string key [GH-281] - -## 1.4.3 - -* Fix cases where `json.Number` didn't decode properly [GH-261] - -## 1.4.2 - -* Custom name matchers to support any sort of casing, formatting, etc. for - field names. [GH-250] -* Fix possible panic in ComposeDecodeHookFunc [GH-251] - -## 1.4.1 - -* Fix regression where `*time.Time` value would be set to empty and not be sent - to decode hooks properly [GH-232] - -## 1.4.0 - -* A new decode hook type `DecodeHookFuncValue` has been added that has - access to the full values. [GH-183] -* Squash is now supported with embedded fields that are struct pointers [GH-205] -* Empty strings will convert to 0 for all numeric types when weakly decoding [GH-206] - -## 1.3.3 - -* Decoding maps from maps creates a settable value for decode hooks [GH-203] - -## 1.3.2 - -* Decode into interface type with a struct value is supported [GH-187] - -## 1.3.1 - -* Squash should only squash embedded structs. [GH-194] - -## 1.3.0 - -* Added `",omitempty"` support. This will ignore zero values in the source - structure when encoding. [GH-145] - -## 1.2.3 - -* Fix duplicate entries in Keys list with pointer values. [GH-185] - -## 1.2.2 - -* Do not add unsettable (unexported) values to the unused metadata key - or "remain" value. [GH-150] - -## 1.2.1 - -* Go modules checksum mismatch fix - -## 1.2.0 - -* Added support to capture unused values in a field using the `",remain"` value - in the mapstructure tag. There is an example to showcase usage. -* Added `DecoderConfig` option to always squash embedded structs -* `json.Number` can decode into `uint` types -* Empty slices are preserved and not replaced with nil slices -* Fix panic that can occur in when decoding a map into a nil slice of structs -* Improved package documentation for godoc - -## 1.1.2 - -* Fix error when decode hook decodes interface implementation into interface - type. [GH-140] - -## 1.1.1 - -* Fix panic that can happen in `decodePtr` - -## 1.1.0 - -* Added `StringToIPHookFunc` to convert `string` to `net.IP` and `net.IPNet` [GH-133] -* Support struct to struct decoding [GH-137] -* If source map value is nil, then destination map value is nil (instead of empty) -* If source slice value is nil, then destination slice value is nil (instead of empty) -* If source pointer is nil, then destination pointer is set to nil (instead of - allocated zero value of type) - -## 1.0.0 - -* Initial tagged stable release. diff --git a/vendor/github.com/mitchellh/mapstructure/LICENSE b/vendor/github.com/mitchellh/mapstructure/LICENSE deleted file mode 100644 index f9c841a51e..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/github.com/mitchellh/mapstructure/README.md b/vendor/github.com/mitchellh/mapstructure/README.md deleted file mode 100644 index 0018dc7d9f..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# mapstructure [![Godoc](https://godoc.org/github.com/mitchellh/mapstructure?status.svg)](https://godoc.org/github.com/mitchellh/mapstructure) - -mapstructure is a Go library for decoding generic map values to structures -and vice versa, while providing helpful error handling. - -This library is most useful when decoding values from some data stream (JSON, -Gob, etc.) where you don't _quite_ know the structure of the underlying data -until you read a part of it. You can therefore read a `map[string]interface{}` -and use this library to decode it into the proper underlying native Go -structure. - -## Installation - -Standard `go get`: - -``` -$ go get github.com/mitchellh/mapstructure -``` - -## Usage & Example - -For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/mapstructure). - -The `Decode` function has examples associated with it there. - -## But Why?! - -Go offers fantastic standard libraries for decoding formats such as JSON. -The standard method is to have a struct pre-created, and populate that struct -from the bytes of the encoded format. This is great, but the problem is if -you have configuration or an encoding that changes slightly depending on -specific fields. For example, consider this JSON: - -```json -{ - "type": "person", - "name": "Mitchell" -} -``` - -Perhaps we can't populate a specific structure without first reading -the "type" field from the JSON. We could always do two passes over the -decoding of the JSON (reading the "type" first, and the rest later). -However, it is much simpler to just decode this into a `map[string]interface{}` -structure, read the "type" key, then use something like this library -to decode it into the proper structure. diff --git a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go b/vendor/github.com/mitchellh/mapstructure/decode_hooks.go deleted file mode 100644 index c1f99da032..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/decode_hooks.go +++ /dev/null @@ -1,283 +0,0 @@ -package mapstructure - -import ( - "encoding" - "errors" - "fmt" - "net" - "reflect" - "strconv" - "strings" - "time" -) - -// typedDecodeHook takes a raw DecodeHookFunc (an interface{}) and turns -// it into the proper DecodeHookFunc type, such as DecodeHookFuncType. -func typedDecodeHook(h DecodeHookFunc) DecodeHookFunc { - // Create variables here so we can reference them with the reflect pkg - var f1 DecodeHookFuncType - var f2 DecodeHookFuncKind - var f3 DecodeHookFuncValue - - // Fill in the variables into this interface and the rest is done - // automatically using the reflect package. - potential := []interface{}{f1, f2, f3} - - v := reflect.ValueOf(h) - vt := v.Type() - for _, raw := range potential { - pt := reflect.ValueOf(raw).Type() - if vt.ConvertibleTo(pt) { - return v.Convert(pt).Interface() - } - } - - return nil -} - -// DecodeHookExec executes the given decode hook. This should be used -// since it'll naturally degrade to the older backwards compatible DecodeHookFunc -// that took reflect.Kind instead of reflect.Type. -func DecodeHookExec( - raw DecodeHookFunc, - from reflect.Value, to reflect.Value) (interface{}, error) { - - switch f := typedDecodeHook(raw).(type) { - case DecodeHookFuncType: - return f(from.Type(), to.Type(), from.Interface()) - case DecodeHookFuncKind: - return f(from.Kind(), to.Kind(), from.Interface()) - case DecodeHookFuncValue: - return f(from, to) - default: - return nil, errors.New("invalid decode hook signature") - } -} - -// ComposeDecodeHookFunc creates a single DecodeHookFunc that -// automatically composes multiple DecodeHookFuncs. -// -// The composed funcs are called in order, with the result of the -// previous transformation. -func ComposeDecodeHookFunc(fs ...DecodeHookFunc) DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - var err error - data := f.Interface() - - newFrom := f - for _, f1 := range fs { - data, err = DecodeHookExec(f1, newFrom, t) - if err != nil { - return nil, err - } - newFrom = reflect.ValueOf(data) - } - - return data, nil - } -} - -// OrComposeDecodeHookFunc executes all input hook functions until one of them returns no error. In that case its value is returned. -// If all hooks return an error, OrComposeDecodeHookFunc returns an error concatenating all error messages. -func OrComposeDecodeHookFunc(ff ...DecodeHookFunc) DecodeHookFunc { - return func(a, b reflect.Value) (interface{}, error) { - var allErrs string - var out interface{} - var err error - - for _, f := range ff { - out, err = DecodeHookExec(f, a, b) - if err != nil { - allErrs += err.Error() + "\n" - continue - } - - return out, nil - } - - return nil, errors.New(allErrs) - } -} - -// StringToSliceHookFunc returns a DecodeHookFunc that converts -// string to []string by splitting on the given sep. -func StringToSliceHookFunc(sep string) DecodeHookFunc { - return func( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - if f != reflect.String || t != reflect.Slice { - return data, nil - } - - raw := data.(string) - if raw == "" { - return []string{}, nil - } - - return strings.Split(raw, sep), nil - } -} - -// StringToTimeDurationHookFunc returns a DecodeHookFunc that converts -// strings to time.Duration. -func StringToTimeDurationHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Duration(5)) { - return data, nil - } - - // Convert it by parsing - return time.ParseDuration(data.(string)) - } -} - -// StringToIPHookFunc returns a DecodeHookFunc that converts -// strings to net.IP -func StringToIPHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IP{}) { - return data, nil - } - - // Convert it by parsing - ip := net.ParseIP(data.(string)) - if ip == nil { - return net.IP{}, fmt.Errorf("failed parsing ip %v", data) - } - - return ip, nil - } -} - -// StringToIPNetHookFunc returns a DecodeHookFunc that converts -// strings to net.IPNet -func StringToIPNetHookFunc() DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(net.IPNet{}) { - return data, nil - } - - // Convert it by parsing - _, net, err := net.ParseCIDR(data.(string)) - return net, err - } -} - -// StringToTimeHookFunc returns a DecodeHookFunc that converts -// strings to time.Time. -func StringToTimeHookFunc(layout string) DecodeHookFunc { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - if t != reflect.TypeOf(time.Time{}) { - return data, nil - } - - // Convert it by parsing - return time.Parse(layout, data.(string)) - } -} - -// WeaklyTypedHook is a DecodeHookFunc which adds support for weak typing to -// the decoder. -// -// Note that this is significantly different from the WeaklyTypedInput option -// of the DecoderConfig. -func WeaklyTypedHook( - f reflect.Kind, - t reflect.Kind, - data interface{}) (interface{}, error) { - dataVal := reflect.ValueOf(data) - switch t { - case reflect.String: - switch f { - case reflect.Bool: - if dataVal.Bool() { - return "1", nil - } - return "0", nil - case reflect.Float32: - return strconv.FormatFloat(dataVal.Float(), 'f', -1, 64), nil - case reflect.Int: - return strconv.FormatInt(dataVal.Int(), 10), nil - case reflect.Slice: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - if elemKind == reflect.Uint8 { - return string(dataVal.Interface().([]uint8)), nil - } - case reflect.Uint: - return strconv.FormatUint(dataVal.Uint(), 10), nil - } - } - - return data, nil -} - -func RecursiveStructToMapHookFunc() DecodeHookFunc { - return func(f reflect.Value, t reflect.Value) (interface{}, error) { - if f.Kind() != reflect.Struct { - return f.Interface(), nil - } - - var i interface{} = struct{}{} - if t.Type() != reflect.TypeOf(&i).Elem() { - return f.Interface(), nil - } - - m := make(map[string]interface{}) - t.Set(reflect.ValueOf(m)) - - return f.Interface(), nil - } -} - -// TextUnmarshallerHookFunc returns a DecodeHookFunc that applies -// strings to the UnmarshalText function, when the target type -// implements the encoding.TextUnmarshaler interface -func TextUnmarshallerHookFunc() DecodeHookFuncType { - return func( - f reflect.Type, - t reflect.Type, - data interface{}) (interface{}, error) { - if f.Kind() != reflect.String { - return data, nil - } - result := reflect.New(t).Interface() - unmarshaller, ok := result.(encoding.TextUnmarshaler) - if !ok { - return data, nil - } - str, ok := data.(string) - if !ok { - str = reflect.Indirect(reflect.ValueOf(&data)).Elem().String() - } - if err := unmarshaller.UnmarshalText([]byte(str)); err != nil { - return nil, err - } - return result, nil - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/error.go b/vendor/github.com/mitchellh/mapstructure/error.go deleted file mode 100644 index 47a99e5af3..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/error.go +++ /dev/null @@ -1,50 +0,0 @@ -package mapstructure - -import ( - "errors" - "fmt" - "sort" - "strings" -) - -// Error implements the error interface and can represents multiple -// errors that occur in the course of a single decode. -type Error struct { - Errors []string -} - -func (e *Error) Error() string { - points := make([]string, len(e.Errors)) - for i, err := range e.Errors { - points[i] = fmt.Sprintf("* %s", err) - } - - sort.Strings(points) - return fmt.Sprintf( - "%d error(s) decoding:\n\n%s", - len(e.Errors), strings.Join(points, "\n")) -} - -// WrappedErrors implements the errwrap.Wrapper interface to make this -// return value more useful with the errwrap and go-multierror libraries. -func (e *Error) WrappedErrors() []error { - if e == nil { - return nil - } - - result := make([]error, len(e.Errors)) - for i, e := range e.Errors { - result[i] = errors.New(e) - } - - return result -} - -func appendErrors(errors []string, err error) []string { - switch e := err.(type) { - case *Error: - return append(errors, e.Errors...) - default: - return append(errors, e.Error()) - } -} diff --git a/vendor/github.com/mitchellh/mapstructure/mapstructure.go b/vendor/github.com/mitchellh/mapstructure/mapstructure.go deleted file mode 100644 index 7581806a79..0000000000 --- a/vendor/github.com/mitchellh/mapstructure/mapstructure.go +++ /dev/null @@ -1,1542 +0,0 @@ -// Package mapstructure exposes functionality to convert one arbitrary -// Go type into another, typically to convert a map[string]interface{} -// into a native Go structure. -// -// The Go structure can be arbitrarily complex, containing slices, -// other structs, etc. and the decoder will properly decode nested -// maps and so on into the proper structures in the native Go struct. -// See the examples to see what the decoder is capable of. -// -// The simplest function to start with is Decode. -// -// Field Tags -// -// When decoding to a struct, mapstructure will use the field name by -// default to perform the mapping. For example, if a struct has a field -// "Username" then mapstructure will look for a key in the source value -// of "username" (case insensitive). -// -// type User struct { -// Username string -// } -// -// You can change the behavior of mapstructure by using struct tags. -// The default struct tag that mapstructure looks for is "mapstructure" -// but you can customize it using DecoderConfig. -// -// Renaming Fields -// -// To rename the key that mapstructure looks for, use the "mapstructure" -// tag and set a value directly. For example, to change the "username" example -// above to "user": -// -// type User struct { -// Username string `mapstructure:"user"` -// } -// -// Embedded Structs and Squashing -// -// Embedded structs are treated as if they're another field with that name. -// By default, the two structs below are equivalent when decoding with -// mapstructure: -// -// type Person struct { -// Name string -// } -// -// type Friend struct { -// Person -// } -// -// type Friend struct { -// Person Person -// } -// -// This would require an input that looks like below: -// -// map[string]interface{}{ -// "person": map[string]interface{}{"name": "alice"}, -// } -// -// If your "person" value is NOT nested, then you can append ",squash" to -// your tag value and mapstructure will treat it as if the embedded struct -// were part of the struct directly. Example: -// -// type Friend struct { -// Person `mapstructure:",squash"` -// } -// -// Now the following input would be accepted: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// When decoding from a struct to a map, the squash tag squashes the struct -// fields into a single map. Using the example structs from above: -// -// Friend{Person: Person{Name: "alice"}} -// -// Will be decoded into a map: -// -// map[string]interface{}{ -// "name": "alice", -// } -// -// DecoderConfig has a field that changes the behavior of mapstructure -// to always squash embedded structs. -// -// Remainder Values -// -// If there are any unmapped keys in the source value, mapstructure by -// default will silently ignore them. You can error by setting ErrorUnused -// in DecoderConfig. If you're using Metadata you can also maintain a slice -// of the unused keys. -// -// You can also use the ",remain" suffix on your tag to collect all unused -// values in a map. The field with this tag MUST be a map type and should -// probably be a "map[string]interface{}" or "map[interface{}]interface{}". -// See example below: -// -// type Friend struct { -// Name string -// Other map[string]interface{} `mapstructure:",remain"` -// } -// -// Given the input below, Other would be populated with the other -// values that weren't used (everything but "name"): -// -// map[string]interface{}{ -// "name": "bob", -// "address": "123 Maple St.", -// } -// -// Omit Empty Values -// -// When decoding from a struct to any other value, you may use the -// ",omitempty" suffix on your tag to omit that value if it equates to -// the zero value. The zero value of all types is specified in the Go -// specification. -// -// For example, the zero type of a numeric type is zero ("0"). If the struct -// field value is zero and a numeric type, the field is empty, and it won't -// be encoded into the destination type. -// -// type Source struct { -// Age int `mapstructure:",omitempty"` -// } -// -// Unexported fields -// -// Since unexported (private) struct fields cannot be set outside the package -// where they are defined, the decoder will simply skip them. -// -// For this output type definition: -// -// type Exported struct { -// private string // this unexported field will be skipped -// Public string -// } -// -// Using this map as input: -// -// map[string]interface{}{ -// "private": "I will be ignored", -// "Public": "I made it through!", -// } -// -// The following struct will be decoded: -// -// type Exported struct { -// private: "" // field is left with an empty string (zero value) -// Public: "I made it through!" -// } -// -// Other Configuration -// -// mapstructure is highly configurable. See the DecoderConfig struct -// for other features and options that are supported. -package mapstructure - -import ( - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "strconv" - "strings" -) - -// DecodeHookFunc is the callback function that can be used for -// data transformations. See "DecodeHook" in the DecoderConfig -// struct. -// -// The type must be one of DecodeHookFuncType, DecodeHookFuncKind, or -// DecodeHookFuncValue. -// Values are a superset of Types (Values can return types), and Types are a -// superset of Kinds (Types can return Kinds) and are generally a richer thing -// to use, but Kinds are simpler if you only need those. -// -// The reason DecodeHookFunc is multi-typed is for backwards compatibility: -// we started with Kinds and then realized Types were the better solution, -// but have a promise to not break backwards compat so we now support -// both. -type DecodeHookFunc interface{} - -// DecodeHookFuncType is a DecodeHookFunc which has complete information about -// the source and target types. -type DecodeHookFuncType func(reflect.Type, reflect.Type, interface{}) (interface{}, error) - -// DecodeHookFuncKind is a DecodeHookFunc which knows only the Kinds of the -// source and target types. -type DecodeHookFuncKind func(reflect.Kind, reflect.Kind, interface{}) (interface{}, error) - -// DecodeHookFuncValue is a DecodeHookFunc which has complete access to both the source and target -// values. -type DecodeHookFuncValue func(from reflect.Value, to reflect.Value) (interface{}, error) - -// DecoderConfig is the configuration that is used to create a new decoder -// and allows customization of various aspects of decoding. -type DecoderConfig struct { - // DecodeHook, if set, will be called before any decoding and any - // type conversion (if WeaklyTypedInput is on). This lets you modify - // the values before they're set down onto the resulting struct. The - // DecodeHook is called for every map and value in the input. This means - // that if a struct has embedded fields with squash tags the decode hook - // is called only once with all of the input data, not once for each - // embedded struct. - // - // If an error is returned, the entire decode will fail with that error. - DecodeHook DecodeHookFunc - - // If ErrorUnused is true, then it is an error for there to exist - // keys in the original map that were unused in the decoding process - // (extra keys). - ErrorUnused bool - - // If ErrorUnset is true, then it is an error for there to exist - // fields in the result that were not set in the decoding process - // (extra fields). This only applies to decoding to a struct. This - // will affect all nested structs as well. - ErrorUnset bool - - // ZeroFields, if set to true, will zero fields before writing them. - // For example, a map will be emptied before decoded values are put in - // it. If this is false, a map will be merged. - ZeroFields bool - - // If WeaklyTypedInput is true, the decoder will make the following - // "weak" conversions: - // - // - bools to string (true = "1", false = "0") - // - numbers to string (base 10) - // - bools to int/uint (true = 1, false = 0) - // - strings to int/uint (base implied by prefix) - // - int to bool (true if value != 0) - // - string to bool (accepts: 1, t, T, TRUE, true, True, 0, f, F, - // FALSE, false, False. Anything else is an error) - // - empty array = empty map and vice versa - // - negative numbers to overflowed uint values (base 10) - // - slice of maps to a merged map - // - single values are converted to slices if required. Each - // element is weakly decoded. For example: "4" can become []int{4} - // if the target type is an int slice. - // - WeaklyTypedInput bool - - // Squash will squash embedded structs. A squash tag may also be - // added to an individual struct field using a tag. For example: - // - // type Parent struct { - // Child `mapstructure:",squash"` - // } - Squash bool - - // Metadata is the struct that will contain extra metadata about - // the decoding. If this is nil, then no metadata will be tracked. - Metadata *Metadata - - // Result is a pointer to the struct that will contain the decoded - // value. - Result interface{} - - // The tag name that mapstructure reads for field names. This - // defaults to "mapstructure" - TagName string - - // IgnoreUntaggedFields ignores all struct fields without explicit - // TagName, comparable to `mapstructure:"-"` as default behaviour. - IgnoreUntaggedFields bool - - // MatchName is the function used to match the map key to the struct - // field name or tag. Defaults to `strings.EqualFold`. This can be used - // to implement case-sensitive tag values, support snake casing, etc. - MatchName func(mapKey, fieldName string) bool -} - -// A Decoder takes a raw interface value and turns it into structured -// data, keeping track of rich error information along the way in case -// anything goes wrong. Unlike the basic top-level Decode method, you can -// more finely control how the Decoder behaves using the DecoderConfig -// structure. The top-level Decode method is just a convenience that sets -// up the most basic Decoder. -type Decoder struct { - config *DecoderConfig -} - -// Metadata contains information about decoding a structure that -// is tedious or difficult to get otherwise. -type Metadata struct { - // Keys are the keys of the structure which were successfully decoded - Keys []string - - // Unused is a slice of keys that were found in the raw value but - // weren't decoded since there was no matching field in the result interface - Unused []string - - // Unset is a slice of field names that were found in the result interface - // but weren't set in the decoding process since there was no matching value - // in the input - Unset []string -} - -// Decode takes an input structure and uses reflection to translate it to -// the output structure. output must be a pointer to a map or struct. -func Decode(input interface{}, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecode is the same as Decode but is shorthand to enable -// WeaklyTypedInput. See DecoderConfig for more info. -func WeakDecode(input, output interface{}) error { - config := &DecoderConfig{ - Metadata: nil, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// DecodeMetadata is the same as Decode, but is shorthand to -// enable metadata collection. See DecoderConfig for more info. -func DecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// WeakDecodeMetadata is the same as Decode, but is shorthand to -// enable both WeaklyTypedInput and metadata collection. See -// DecoderConfig for more info. -func WeakDecodeMetadata(input interface{}, output interface{}, metadata *Metadata) error { - config := &DecoderConfig{ - Metadata: metadata, - Result: output, - WeaklyTypedInput: true, - } - - decoder, err := NewDecoder(config) - if err != nil { - return err - } - - return decoder.Decode(input) -} - -// NewDecoder returns a new decoder for the given configuration. Once -// a decoder has been returned, the same configuration must not be used -// again. -func NewDecoder(config *DecoderConfig) (*Decoder, error) { - val := reflect.ValueOf(config.Result) - if val.Kind() != reflect.Ptr { - return nil, errors.New("result must be a pointer") - } - - val = val.Elem() - if !val.CanAddr() { - return nil, errors.New("result must be addressable (a pointer)") - } - - if config.Metadata != nil { - if config.Metadata.Keys == nil { - config.Metadata.Keys = make([]string, 0) - } - - if config.Metadata.Unused == nil { - config.Metadata.Unused = make([]string, 0) - } - - if config.Metadata.Unset == nil { - config.Metadata.Unset = make([]string, 0) - } - } - - if config.TagName == "" { - config.TagName = "mapstructure" - } - - if config.MatchName == nil { - config.MatchName = strings.EqualFold - } - - result := &Decoder{ - config: config, - } - - return result, nil -} - -// Decode decodes the given raw interface to the target pointer specified -// by the configuration. -func (d *Decoder) Decode(input interface{}) error { - return d.decode("", input, reflect.ValueOf(d.config.Result).Elem()) -} - -// Decodes an unknown data type into a specific reflection value. -func (d *Decoder) decode(name string, input interface{}, outVal reflect.Value) error { - var inputVal reflect.Value - if input != nil { - inputVal = reflect.ValueOf(input) - - // We need to check here if input is a typed nil. Typed nils won't - // match the "input == nil" below so we check that here. - if inputVal.Kind() == reflect.Ptr && inputVal.IsNil() { - input = nil - } - } - - if input == nil { - // If the data is nil, then we don't set anything, unless ZeroFields is set - // to true. - if d.config.ZeroFields { - outVal.Set(reflect.Zero(outVal.Type())) - - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - } - return nil - } - - if !inputVal.IsValid() { - // If the input value is invalid, then we just set the value - // to be the zero value. - outVal.Set(reflect.Zero(outVal.Type())) - if d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - return nil - } - - if d.config.DecodeHook != nil { - // We have a DecodeHook, so let's pre-process the input. - var err error - input, err = DecodeHookExec(d.config.DecodeHook, inputVal, outVal) - if err != nil { - return fmt.Errorf("error decoding '%s': %w", name, err) - } - } - - var err error - outputKind := getKind(outVal) - addMetaKey := true - switch outputKind { - case reflect.Bool: - err = d.decodeBool(name, input, outVal) - case reflect.Interface: - err = d.decodeBasic(name, input, outVal) - case reflect.String: - err = d.decodeString(name, input, outVal) - case reflect.Int: - err = d.decodeInt(name, input, outVal) - case reflect.Uint: - err = d.decodeUint(name, input, outVal) - case reflect.Float32: - err = d.decodeFloat(name, input, outVal) - case reflect.Struct: - err = d.decodeStruct(name, input, outVal) - case reflect.Map: - err = d.decodeMap(name, input, outVal) - case reflect.Ptr: - addMetaKey, err = d.decodePtr(name, input, outVal) - case reflect.Slice: - err = d.decodeSlice(name, input, outVal) - case reflect.Array: - err = d.decodeArray(name, input, outVal) - case reflect.Func: - err = d.decodeFunc(name, input, outVal) - default: - // If we reached this point then we weren't able to decode it - return fmt.Errorf("%s: unsupported type: %s", name, outputKind) - } - - // If we reached here, then we successfully decoded SOMETHING, so - // mark the key as used if we're tracking metainput. - if addMetaKey && d.config.Metadata != nil && name != "" { - d.config.Metadata.Keys = append(d.config.Metadata.Keys, name) - } - - return err -} - -// This decodes a basic type (bool, int, string, etc.) and sets the -// value to "data" of that type. -func (d *Decoder) decodeBasic(name string, data interface{}, val reflect.Value) error { - if val.IsValid() && val.Elem().IsValid() { - elem := val.Elem() - - // If we can't address this element, then its not writable. Instead, - // we make a copy of the value (which is a pointer and therefore - // writable), decode into that, and replace the whole value. - copied := false - if !elem.CanAddr() { - copied = true - - // Make *T - copy := reflect.New(elem.Type()) - - // *T = elem - copy.Elem().Set(elem) - - // Set elem so we decode into it - elem = copy - } - - // Decode. If we have an error then return. We also return right - // away if we're not a copy because that means we decoded directly. - if err := d.decode(name, data, elem); err != nil || !copied { - return err - } - - // If we're a copy, we need to set te final result - val.Set(elem.Elem()) - return nil - } - - dataVal := reflect.ValueOf(data) - - // If the input data is a pointer, and the assigned type is the dereference - // of that exact pointer, then indirect it so that we can assign it. - // Example: *string to string - if dataVal.Kind() == reflect.Ptr && dataVal.Type().Elem() == val.Type() { - dataVal = reflect.Indirect(dataVal) - } - - if !dataVal.IsValid() { - dataVal = reflect.Zero(val.Type()) - } - - dataValType := dataVal.Type() - if !dataValType.AssignableTo(val.Type()) { - return fmt.Errorf( - "'%s' expected type '%s', got '%s'", - name, val.Type(), dataValType) - } - - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeString(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - converted := true - switch { - case dataKind == reflect.String: - val.SetString(dataVal.String()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetString("1") - } else { - val.SetString("0") - } - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatInt(dataVal.Int(), 10)) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatUint(dataVal.Uint(), 10)) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetString(strconv.FormatFloat(dataVal.Float(), 'f', -1, 64)) - case dataKind == reflect.Slice && d.config.WeaklyTypedInput, - dataKind == reflect.Array && d.config.WeaklyTypedInput: - dataType := dataVal.Type() - elemKind := dataType.Elem().Kind() - switch elemKind { - case reflect.Uint8: - var uints []uint8 - if dataKind == reflect.Array { - uints = make([]uint8, dataVal.Len(), dataVal.Len()) - for i := range uints { - uints[i] = dataVal.Index(i).Interface().(uint8) - } - } else { - uints = dataVal.Interface().([]uint8) - } - val.SetString(string(uints)) - default: - converted = false - } - default: - converted = false - } - - if !converted { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeInt(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetInt(dataVal.Int()) - case dataKind == reflect.Uint: - val.SetInt(int64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetInt(int64(dataVal.Float())) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetInt(1) - } else { - val.SetInt(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseInt(str, 0, val.Type().Bits()) - if err == nil { - val.SetInt(i) - } else { - return fmt.Errorf("cannot parse '%s' as int: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Int64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetInt(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeUint(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - i := dataVal.Int() - if i < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %d overflows uint", - name, i) - } - val.SetUint(uint64(i)) - case dataKind == reflect.Uint: - val.SetUint(dataVal.Uint()) - case dataKind == reflect.Float32: - f := dataVal.Float() - if f < 0 && !d.config.WeaklyTypedInput { - return fmt.Errorf("cannot parse '%s', %f overflows uint", - name, f) - } - val.SetUint(uint64(f)) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetUint(1) - } else { - val.SetUint(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - i, err := strconv.ParseUint(str, 0, val.Type().Bits()) - if err == nil { - val.SetUint(i) - } else { - return fmt.Errorf("cannot parse '%s' as uint: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := strconv.ParseUint(string(jn), 0, 64) - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetUint(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeBool(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - - switch { - case dataKind == reflect.Bool: - val.SetBool(dataVal.Bool()) - case dataKind == reflect.Int && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Int() != 0) - case dataKind == reflect.Uint && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Uint() != 0) - case dataKind == reflect.Float32 && d.config.WeaklyTypedInput: - val.SetBool(dataVal.Float() != 0) - case dataKind == reflect.String && d.config.WeaklyTypedInput: - b, err := strconv.ParseBool(dataVal.String()) - if err == nil { - val.SetBool(b) - } else if dataVal.String() == "" { - val.SetBool(false) - } else { - return fmt.Errorf("cannot parse '%s' as bool: %s", name, err) - } - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeFloat(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataKind := getKind(dataVal) - dataType := dataVal.Type() - - switch { - case dataKind == reflect.Int: - val.SetFloat(float64(dataVal.Int())) - case dataKind == reflect.Uint: - val.SetFloat(float64(dataVal.Uint())) - case dataKind == reflect.Float32: - val.SetFloat(dataVal.Float()) - case dataKind == reflect.Bool && d.config.WeaklyTypedInput: - if dataVal.Bool() { - val.SetFloat(1) - } else { - val.SetFloat(0) - } - case dataKind == reflect.String && d.config.WeaklyTypedInput: - str := dataVal.String() - if str == "" { - str = "0" - } - - f, err := strconv.ParseFloat(str, val.Type().Bits()) - if err == nil { - val.SetFloat(f) - } else { - return fmt.Errorf("cannot parse '%s' as float: %s", name, err) - } - case dataType.PkgPath() == "encoding/json" && dataType.Name() == "Number": - jn := data.(json.Number) - i, err := jn.Float64() - if err != nil { - return fmt.Errorf( - "error decoding json.Number into %s: %s", name, err) - } - val.SetFloat(i) - default: - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - - return nil -} - -func (d *Decoder) decodeMap(name string, data interface{}, val reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // By default we overwrite keys in the current map - valMap := val - - // If the map is nil or we're purposely zeroing fields, make a new map - if valMap.IsNil() || d.config.ZeroFields { - // Make a new map to hold our result - mapType := reflect.MapOf(valKeyType, valElemType) - valMap = reflect.MakeMap(mapType) - } - - // Check input type and based on the input type jump to the proper func - dataVal := reflect.Indirect(reflect.ValueOf(data)) - switch dataVal.Kind() { - case reflect.Map: - return d.decodeMapFromMap(name, dataVal, val, valMap) - - case reflect.Struct: - return d.decodeMapFromStruct(name, dataVal, val, valMap) - - case reflect.Array, reflect.Slice: - if d.config.WeaklyTypedInput { - return d.decodeMapFromSlice(name, dataVal, val, valMap) - } - - fallthrough - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeMapFromSlice(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - // Special case for BC reasons (covered by tests) - if dataVal.Len() == 0 { - val.Set(valMap) - return nil - } - - for i := 0; i < dataVal.Len(); i++ { - err := d.decode( - name+"["+strconv.Itoa(i)+"]", - dataVal.Index(i).Interface(), val) - if err != nil { - return err - } - } - - return nil -} - -func (d *Decoder) decodeMapFromMap(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - valType := val.Type() - valKeyType := valType.Key() - valElemType := valType.Elem() - - // Accumulate errors - errors := make([]string, 0) - - // If the input data is empty, then we just match what the input data is. - if dataVal.Len() == 0 { - if dataVal.IsNil() { - if !val.IsNil() { - val.Set(dataVal) - } - } else { - // Set to empty allocated value - val.Set(valMap) - } - - return nil - } - - for _, k := range dataVal.MapKeys() { - fieldName := name + "[" + k.String() + "]" - - // First decode the key into the proper type - currentKey := reflect.Indirect(reflect.New(valKeyType)) - if err := d.decode(fieldName, k.Interface(), currentKey); err != nil { - errors = appendErrors(errors, err) - continue - } - - // Next decode the data into the proper type - v := dataVal.MapIndex(k).Interface() - currentVal := reflect.Indirect(reflect.New(valElemType)) - if err := d.decode(fieldName, v, currentVal); err != nil { - errors = appendErrors(errors, err) - continue - } - - valMap.SetMapIndex(currentKey, currentVal) - } - - // Set the built up map to the value - val.Set(valMap) - - // If we had errors, return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeMapFromStruct(name string, dataVal reflect.Value, val reflect.Value, valMap reflect.Value) error { - typ := dataVal.Type() - for i := 0; i < typ.NumField(); i++ { - // Get the StructField first since this is a cheap operation. If the - // field is unexported, then ignore it. - f := typ.Field(i) - if f.PkgPath != "" { - continue - } - - // Next get the actual value of this field and verify it is assignable - // to the map value. - v := dataVal.Field(i) - if !v.Type().AssignableTo(valMap.Type().Elem()) { - return fmt.Errorf("cannot assign type '%s' to map value field of type '%s'", v.Type(), valMap.Type().Elem()) - } - - tagValue := f.Tag.Get(d.config.TagName) - keyName := f.Name - - if tagValue == "" && d.config.IgnoreUntaggedFields { - continue - } - - // If Squash is set in the config, we squash the field down. - squash := d.config.Squash && v.Kind() == reflect.Struct && f.Anonymous - - v = dereferencePtrToStructIfNeeded(v, d.config.TagName) - - // Determine the name of the key in the map - if index := strings.Index(tagValue, ","); index != -1 { - if tagValue[:index] == "-" { - continue - } - // If "omitempty" is specified in the tag, it ignores empty values. - if strings.Index(tagValue[index+1:], "omitempty") != -1 && isEmptyValue(v) { - continue - } - - // If "squash" is specified in the tag, we squash the field down. - squash = squash || strings.Index(tagValue[index+1:], "squash") != -1 - if squash { - // When squashing, the embedded type can be a pointer to a struct. - if v.Kind() == reflect.Ptr && v.Elem().Kind() == reflect.Struct { - v = v.Elem() - } - - // The final type must be a struct - if v.Kind() != reflect.Struct { - return fmt.Errorf("cannot squash non-struct type '%s'", v.Type()) - } - } - if keyNameTagValue := tagValue[:index]; keyNameTagValue != "" { - keyName = keyNameTagValue - } - } else if len(tagValue) > 0 { - if tagValue == "-" { - continue - } - keyName = tagValue - } - - switch v.Kind() { - // this is an embedded struct, so handle it differently - case reflect.Struct: - x := reflect.New(v.Type()) - x.Elem().Set(v) - - vType := valMap.Type() - vKeyType := vType.Key() - vElemType := vType.Elem() - mType := reflect.MapOf(vKeyType, vElemType) - vMap := reflect.MakeMap(mType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(vMap.Type()) - reflect.Indirect(addrVal).Set(vMap) - - err := d.decode(keyName, x.Interface(), reflect.Indirect(addrVal)) - if err != nil { - return err - } - - // the underlying map may have been completely overwritten so pull - // it indirectly out of the enclosing value. - vMap = reflect.Indirect(addrVal) - - if squash { - for _, k := range vMap.MapKeys() { - valMap.SetMapIndex(k, vMap.MapIndex(k)) - } - } else { - valMap.SetMapIndex(reflect.ValueOf(keyName), vMap) - } - - default: - valMap.SetMapIndex(reflect.ValueOf(keyName), v) - } - } - - if val.CanAddr() { - val.Set(valMap) - } - - return nil -} - -func (d *Decoder) decodePtr(name string, data interface{}, val reflect.Value) (bool, error) { - // If the input data is nil, then we want to just set the output - // pointer to be nil as well. - isNil := data == nil - if !isNil { - switch v := reflect.Indirect(reflect.ValueOf(data)); v.Kind() { - case reflect.Chan, - reflect.Func, - reflect.Interface, - reflect.Map, - reflect.Ptr, - reflect.Slice: - isNil = v.IsNil() - } - } - if isNil { - if !val.IsNil() && val.CanSet() { - nilValue := reflect.New(val.Type()).Elem() - val.Set(nilValue) - } - - return true, nil - } - - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - valType := val.Type() - valElemType := valType.Elem() - if val.CanSet() { - realVal := val - if realVal.IsNil() || d.config.ZeroFields { - realVal = reflect.New(valElemType) - } - - if err := d.decode(name, data, reflect.Indirect(realVal)); err != nil { - return false, err - } - - val.Set(realVal) - } else { - if err := d.decode(name, data, reflect.Indirect(val)); err != nil { - return false, err - } - } - return false, nil -} - -func (d *Decoder) decodeFunc(name string, data interface{}, val reflect.Value) error { - // Create an element of the concrete (non pointer) type and decode - // into that. Then set the value of the pointer to this type. - dataVal := reflect.Indirect(reflect.ValueOf(data)) - if val.Type() != dataVal.Type() { - return fmt.Errorf( - "'%s' expected type '%s', got unconvertible type '%s', value: '%v'", - name, val.Type(), dataVal.Type(), data) - } - val.Set(dataVal) - return nil -} - -func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - sliceType := reflect.SliceOf(valElemType) - - // If we have a non array/slice type then we first attempt to convert. - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Slice and array we use the normal logic - case dataValKind == reflect.Slice, dataValKind == reflect.Array: - break - - // Empty maps turn into empty slices - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.MakeSlice(sliceType, 0, 0)) - return nil - } - // Create slice of maps of other sizes - return d.decodeSlice(name, []interface{}{data}, val) - - case dataValKind == reflect.String && valElemType.Kind() == reflect.Uint8: - return d.decodeSlice(name, []byte(dataVal.String()), val) - - // All other types we try to convert to the slice type - // and "lift" it into it. i.e. a string becomes a string slice. - default: - // Just re-try this function with data as a slice. - return d.decodeSlice(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - } - - // If the input value is nil, then don't allocate since empty != nil - if dataValKind != reflect.Array && dataVal.IsNil() { - return nil - } - - valSlice := val - if valSlice.IsNil() || d.config.ZeroFields { - // Make a new slice to hold our result, same size as the original data. - valSlice = reflect.MakeSlice(sliceType, dataVal.Len(), dataVal.Len()) - } else if valSlice.Len() > dataVal.Len() { - valSlice = valSlice.Slice(0, dataVal.Len()) - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - for valSlice.Len() <= i { - valSlice = reflect.Append(valSlice, reflect.Zero(valElemType)) - } - currentField := valSlice.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the slice we built up - val.Set(valSlice) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeArray(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - dataValKind := dataVal.Kind() - valType := val.Type() - valElemType := valType.Elem() - arrayType := reflect.ArrayOf(valType.Len(), valElemType) - - valArray := val - - if valArray.Interface() == reflect.Zero(valArray.Type()).Interface() || d.config.ZeroFields { - // Check input type - if dataValKind != reflect.Array && dataValKind != reflect.Slice { - if d.config.WeaklyTypedInput { - switch { - // Empty maps turn into empty arrays - case dataValKind == reflect.Map: - if dataVal.Len() == 0 { - val.Set(reflect.Zero(arrayType)) - return nil - } - - // All other types we try to convert to the array type - // and "lift" it into it. i.e. a string becomes a string array. - default: - // Just re-try this function with data as a slice. - return d.decodeArray(name, []interface{}{data}, val) - } - } - - return fmt.Errorf( - "'%s': source data must be an array or slice, got %s", name, dataValKind) - - } - if dataVal.Len() > arrayType.Len() { - return fmt.Errorf( - "'%s': expected source data to have length less or equal to %d, got %d", name, arrayType.Len(), dataVal.Len()) - - } - - // Make a new array to hold our result, same size as the original data. - valArray = reflect.New(arrayType).Elem() - } - - // Accumulate any errors - errors := make([]string, 0) - - for i := 0; i < dataVal.Len(); i++ { - currentData := dataVal.Index(i).Interface() - currentField := valArray.Index(i) - - fieldName := name + "[" + strconv.Itoa(i) + "]" - if err := d.decode(fieldName, currentData, currentField); err != nil { - errors = appendErrors(errors, err) - } - } - - // Finally, set the value to the array we built up - val.Set(valArray) - - // If there were errors, we return those - if len(errors) > 0 { - return &Error{errors} - } - - return nil -} - -func (d *Decoder) decodeStruct(name string, data interface{}, val reflect.Value) error { - dataVal := reflect.Indirect(reflect.ValueOf(data)) - - // If the type of the value to write to and the data match directly, - // then we just set it directly instead of recursing into the structure. - if dataVal.Type() == val.Type() { - val.Set(dataVal) - return nil - } - - dataValKind := dataVal.Kind() - switch dataValKind { - case reflect.Map: - return d.decodeStructFromMap(name, dataVal, val) - - case reflect.Struct: - // Not the most efficient way to do this but we can optimize later if - // we want to. To convert from struct to struct we go to map first - // as an intermediary. - - // Make a new map to hold our result - mapType := reflect.TypeOf((map[string]interface{})(nil)) - mval := reflect.MakeMap(mapType) - - // Creating a pointer to a map so that other methods can completely - // overwrite the map if need be (looking at you decodeMapFromMap). The - // indirection allows the underlying map to be settable (CanSet() == true) - // where as reflect.MakeMap returns an unsettable map. - addrVal := reflect.New(mval.Type()) - - reflect.Indirect(addrVal).Set(mval) - if err := d.decodeMapFromStruct(name, dataVal, reflect.Indirect(addrVal), mval); err != nil { - return err - } - - result := d.decodeStructFromMap(name, reflect.Indirect(addrVal), val) - return result - - default: - return fmt.Errorf("'%s' expected a map, got '%s'", name, dataVal.Kind()) - } -} - -func (d *Decoder) decodeStructFromMap(name string, dataVal, val reflect.Value) error { - dataValType := dataVal.Type() - if kind := dataValType.Key().Kind(); kind != reflect.String && kind != reflect.Interface { - return fmt.Errorf( - "'%s' needs a map with string keys, has '%s' keys", - name, dataValType.Key().Kind()) - } - - dataValKeys := make(map[reflect.Value]struct{}) - dataValKeysUnused := make(map[interface{}]struct{}) - for _, dataValKey := range dataVal.MapKeys() { - dataValKeys[dataValKey] = struct{}{} - dataValKeysUnused[dataValKey.Interface()] = struct{}{} - } - - targetValKeysUnused := make(map[interface{}]struct{}) - errors := make([]string, 0) - - // This slice will keep track of all the structs we'll be decoding. - // There can be more than one struct if there are embedded structs - // that are squashed. - structs := make([]reflect.Value, 1, 5) - structs[0] = val - - // Compile the list of all the fields that we're going to be decoding - // from all the structs. - type field struct { - field reflect.StructField - val reflect.Value - } - - // remainField is set to a valid field set with the "remain" tag if - // we are keeping track of remaining values. - var remainField *field - - fields := []field{} - for len(structs) > 0 { - structVal := structs[0] - structs = structs[1:] - - structType := structVal.Type() - - for i := 0; i < structType.NumField(); i++ { - fieldType := structType.Field(i) - fieldVal := structVal.Field(i) - if fieldVal.Kind() == reflect.Ptr && fieldVal.Elem().Kind() == reflect.Struct { - // Handle embedded struct pointers as embedded structs. - fieldVal = fieldVal.Elem() - } - - // If "squash" is specified in the tag, we squash the field down. - squash := d.config.Squash && fieldVal.Kind() == reflect.Struct && fieldType.Anonymous - remain := false - - // We always parse the tags cause we're looking for other tags too - tagParts := strings.Split(fieldType.Tag.Get(d.config.TagName), ",") - for _, tag := range tagParts[1:] { - if tag == "squash" { - squash = true - break - } - - if tag == "remain" { - remain = true - break - } - } - - if squash { - if fieldVal.Kind() != reflect.Struct { - errors = appendErrors(errors, - fmt.Errorf("%s: unsupported type for squash: %s", fieldType.Name, fieldVal.Kind())) - } else { - structs = append(structs, fieldVal) - } - continue - } - - // Build our field - if remain { - remainField = &field{fieldType, fieldVal} - } else { - // Normal struct field, store it away - fields = append(fields, field{fieldType, fieldVal}) - } - } - } - - // for fieldType, field := range fields { - for _, f := range fields { - field, fieldValue := f.field, f.val - fieldName := field.Name - - tagValue := field.Tag.Get(d.config.TagName) - tagValue = strings.SplitN(tagValue, ",", 2)[0] - if tagValue != "" { - fieldName = tagValue - } - - rawMapKey := reflect.ValueOf(fieldName) - rawMapVal := dataVal.MapIndex(rawMapKey) - if !rawMapVal.IsValid() { - // Do a slower search by iterating over each key and - // doing case-insensitive search. - for dataValKey := range dataValKeys { - mK, ok := dataValKey.Interface().(string) - if !ok { - // Not a string key - continue - } - - if d.config.MatchName(mK, fieldName) { - rawMapKey = dataValKey - rawMapVal = dataVal.MapIndex(dataValKey) - break - } - } - - if !rawMapVal.IsValid() { - // There was no matching key in the map for the value in - // the struct. Remember it for potential errors and metadata. - targetValKeysUnused[fieldName] = struct{}{} - continue - } - } - - if !fieldValue.IsValid() { - // This should never happen - panic("field is not valid") - } - - // If we can't set the field, then it is unexported or something, - // and we just continue onwards. - if !fieldValue.CanSet() { - continue - } - - // Delete the key we're using from the unused map so we stop tracking - delete(dataValKeysUnused, rawMapKey.Interface()) - - // If the name is empty string, then we're at the root, and we - // don't dot-join the fields. - if name != "" { - fieldName = name + "." + fieldName - } - - if err := d.decode(fieldName, rawMapVal.Interface(), fieldValue); err != nil { - errors = appendErrors(errors, err) - } - } - - // If we have a "remain"-tagged field and we have unused keys then - // we put the unused keys directly into the remain field. - if remainField != nil && len(dataValKeysUnused) > 0 { - // Build a map of only the unused values - remain := map[interface{}]interface{}{} - for key := range dataValKeysUnused { - remain[key] = dataVal.MapIndex(reflect.ValueOf(key)).Interface() - } - - // Decode it as-if we were just decoding this map onto our map. - if err := d.decodeMap(name, remain, remainField.val); err != nil { - errors = appendErrors(errors, err) - } - - // Set the map to nil so we have none so that the next check will - // not error (ErrorUnused) - dataValKeysUnused = nil - } - - if d.config.ErrorUnused && len(dataValKeysUnused) > 0 { - keys := make([]string, 0, len(dataValKeysUnused)) - for rawKey := range dataValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has invalid keys: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if d.config.ErrorUnset && len(targetValKeysUnused) > 0 { - keys := make([]string, 0, len(targetValKeysUnused)) - for rawKey := range targetValKeysUnused { - keys = append(keys, rawKey.(string)) - } - sort.Strings(keys) - - err := fmt.Errorf("'%s' has unset fields: %s", name, strings.Join(keys, ", ")) - errors = appendErrors(errors, err) - } - - if len(errors) > 0 { - return &Error{errors} - } - - // Add the unused keys to the list of unused keys if we're tracking metadata - if d.config.Metadata != nil { - for rawKey := range dataValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unused = append(d.config.Metadata.Unused, key) - } - for rawKey := range targetValKeysUnused { - key := rawKey.(string) - if name != "" { - key = name + "." + key - } - - d.config.Metadata.Unset = append(d.config.Metadata.Unset, key) - } - } - - return nil -} - -func isEmptyValue(v reflect.Value) bool { - switch getKind(v) { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} - -func getKind(val reflect.Value) reflect.Kind { - kind := val.Kind() - - switch { - case kind >= reflect.Int && kind <= reflect.Int64: - return reflect.Int - case kind >= reflect.Uint && kind <= reflect.Uint64: - return reflect.Uint - case kind >= reflect.Float32 && kind <= reflect.Float64: - return reflect.Float32 - default: - return kind - } -} - -func isStructTypeConvertibleToMap(typ reflect.Type, checkMapstructureTags bool, tagName string) bool { - for i := 0; i < typ.NumField(); i++ { - f := typ.Field(i) - if f.PkgPath == "" && !checkMapstructureTags { // check for unexported fields - return true - } - if checkMapstructureTags && f.Tag.Get(tagName) != "" { // check for mapstructure tags inside - return true - } - } - return false -} - -func dereferencePtrToStructIfNeeded(v reflect.Value, tagName string) reflect.Value { - if v.Kind() != reflect.Ptr || v.Elem().Kind() != reflect.Struct { - return v - } - deref := v.Elem() - derefT := deref.Type() - if isStructTypeConvertibleToMap(derefT, true, tagName) { - return deref - } - return v -} diff --git a/vendor/github.com/opentracing-contrib/go-observer/.gitignore b/vendor/github.com/opentracing-contrib/go-observer/.gitignore deleted file mode 100644 index a1338d6851..0000000000 --- a/vendor/github.com/opentracing-contrib/go-observer/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ diff --git a/vendor/github.com/opentracing-contrib/go-observer/LICENSE b/vendor/github.com/opentracing-contrib/go-observer/LICENSE deleted file mode 100644 index 044f3dfd47..0000000000 --- a/vendor/github.com/opentracing-contrib/go-observer/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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 (c) 2017 opentracing-contrib - - 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/opentracing-contrib/go-observer/README.md b/vendor/github.com/opentracing-contrib/go-observer/README.md deleted file mode 100644 index 334a9aa6b6..0000000000 --- a/vendor/github.com/opentracing-contrib/go-observer/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# An Observer API for OpenTracing-go Tracers - -OTObserver can be used to watch the span events like StartSpan(), -SetOperationName(), SetTag() and Finish(). A need for observers -arose when information (metrics) more than just the latency information was -required for the spans, in the distributed tracers. But, there can be a lot -of metrics in different domains and adding such metrics to any one (client) -tracer breaks cross-platform compatibility. There are various ways to -avoid such issues, however, an observer pattern is cleaner and provides loose -coupling between the packages exporting metrics (on span events) and the -tracer. - -This information can be in the form of hardware metrics, RPC metrics, -useful metrics exported out of the kernel or other metrics, profiled for a -span. These additional metrics can help us in getting better Root-cause -analysis. With that being said, its not just for calculation of metrics, -it can be used for anything which needs watching the span events. - -## Installation and Usage - -The `otobserver` package provides an API to watch span's events and define -callbacks for these events. This API would be a functional option to a -tracer constructor that passes an Observer. 3rd party packages (who want to -watch the span events) should actually implement this observer API. -To do that, first fetch the package using go get : - -``` - go get -v github.com/opentracing-contrib/go-observer -``` - -and say : - -```go - import "github.com/opentracing-contrib/go-observer" -``` - -and then, define the required span event callbacks. These registered -callbacks would then be called on span events if an observer is created. -Tracer may allow registering multiple observers. Have a look at the [jaeger's observer](https://github.com/uber/jaeger-client-go/blob/master/observer.go). - -With the required setup implemented in the backend tracers, packages -watching the span events need to implement the observer api defining what -they need to do for the observed span events. - -## Span events - -An observer registered with this api, can observe for the following four -span events : - -```go - StartSpan() - SetOperationName() - SetTag() - Finish() -``` - -### Tradeoffs - -As noble as our thoughts might be in fetching additional metrics (other than -latency) for a span using an observer, there are some overhead costs. Not all -observers need to observe all the span events, in which case, we may have -to keep some callback functions empty. In effect, we will still call these -functions, and that will incur unnecessary overhead. To know more about this -and other tradeoffs, see this [discussion](https://github.com/opentracing/opentracing-go/pull/135#discussion_r105497329). diff --git a/vendor/github.com/opentracing-contrib/go-observer/observer.go b/vendor/github.com/opentracing-contrib/go-observer/observer.go deleted file mode 100644 index c8cbf61bd5..0000000000 --- a/vendor/github.com/opentracing-contrib/go-observer/observer.go +++ /dev/null @@ -1,39 +0,0 @@ -// This project is licensed under the Apache License 2.0, see LICENSE. - -package otobserver - -import opentracing "github.com/opentracing/opentracing-go" - -// Observer can be registered with a Tracer to recieve notifications -// about new Spans. Tracers are not required to support the Observer API. -// The actual registration depends on the implementation, which might look -// like the below e.g : -// observer := myobserver.NewObserver() -// tracer := client.NewTracer(..., client.WithObserver(observer)) -// -type Observer interface { - // Create and return a span observer. Called when a span starts. - // If the Observer is not interested in the given span, it must return (nil, false). - // E.g : - // func StartSpan(opName string, opts ...opentracing.StartSpanOption) { - // var sp opentracing.Span - // sso := opentracing.StartSpanOptions{} - // spanObserver, ok := observer.OnStartSpan(span, opName, sso); - // if ok { - // // we have a valid SpanObserver - // } - // ... - // } - OnStartSpan(sp opentracing.Span, operationName string, options opentracing.StartSpanOptions) (SpanObserver, bool) -} - -// SpanObserver is created by the Observer and receives notifications about -// other Span events. -type SpanObserver interface { - // Callback called from opentracing.Span.SetOperationName() - OnSetOperationName(operationName string) - // Callback called from opentracing.Span.SetTag() - OnSetTag(key string, value interface{}) - // Callback called from opentracing.Span.Finish() - OnFinish(options opentracing.FinishOptions) -} diff --git a/vendor/github.com/opentracing/opentracing-go/mocktracer/mocklogrecord.go b/vendor/github.com/opentracing/opentracing-go/mocktracer/mocklogrecord.go deleted file mode 100644 index 2ce96d9d38..0000000000 --- a/vendor/github.com/opentracing/opentracing-go/mocktracer/mocklogrecord.go +++ /dev/null @@ -1,105 +0,0 @@ -package mocktracer - -import ( - "fmt" - "reflect" - "time" - - "github.com/opentracing/opentracing-go/log" -) - -// MockLogRecord represents data logged to a Span via Span.LogFields or -// Span.LogKV. -type MockLogRecord struct { - Timestamp time.Time - Fields []MockKeyValue -} - -// MockKeyValue represents a single key:value pair. -type MockKeyValue struct { - Key string - - // All MockLogRecord values are coerced to strings via fmt.Sprint(), though - // we retain their type separately. - ValueKind reflect.Kind - ValueString string -} - -// EmitString belongs to the log.Encoder interface -func (m *MockKeyValue) EmitString(key, value string) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitBool belongs to the log.Encoder interface -func (m *MockKeyValue) EmitBool(key string, value bool) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitInt belongs to the log.Encoder interface -func (m *MockKeyValue) EmitInt(key string, value int) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitInt32 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitInt32(key string, value int32) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitInt64 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitInt64(key string, value int64) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitUint32 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitUint32(key string, value uint32) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitUint64 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitUint64(key string, value uint64) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitFloat32 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitFloat32(key string, value float32) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitFloat64 belongs to the log.Encoder interface -func (m *MockKeyValue) EmitFloat64(key string, value float64) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitObject belongs to the log.Encoder interface -func (m *MockKeyValue) EmitObject(key string, value interface{}) { - m.Key = key - m.ValueKind = reflect.TypeOf(value).Kind() - m.ValueString = fmt.Sprint(value) -} - -// EmitLazyLogger belongs to the log.Encoder interface -func (m *MockKeyValue) EmitLazyLogger(value log.LazyLogger) { - var meta MockKeyValue - value(&meta) - m.Key = meta.Key - m.ValueKind = meta.ValueKind - m.ValueString = meta.ValueString -} diff --git a/vendor/github.com/opentracing/opentracing-go/mocktracer/mockspan.go b/vendor/github.com/opentracing/opentracing-go/mocktracer/mockspan.go deleted file mode 100644 index 8c7932ce65..0000000000 --- a/vendor/github.com/opentracing/opentracing-go/mocktracer/mockspan.go +++ /dev/null @@ -1,284 +0,0 @@ -package mocktracer - -import ( - "fmt" - "sync" - "sync/atomic" - "time" - - "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/ext" - "github.com/opentracing/opentracing-go/log" -) - -// MockSpanContext is an opentracing.SpanContext implementation. -// -// It is entirely unsuitable for production use, but appropriate for tests -// that want to verify tracing behavior in other frameworks/applications. -// -// By default all spans have Sampled=true flag, unless {"sampling.priority": 0} -// tag is set. -type MockSpanContext struct { - TraceID int - SpanID int - Sampled bool - Baggage map[string]string -} - -var mockIDSource = uint32(42) - -func nextMockID() int { - return int(atomic.AddUint32(&mockIDSource, 1)) -} - -// ForeachBaggageItem belongs to the SpanContext interface -func (c MockSpanContext) ForeachBaggageItem(handler func(k, v string) bool) { - for k, v := range c.Baggage { - if !handler(k, v) { - break - } - } -} - -// WithBaggageItem creates a new context with an extra baggage item. -func (c MockSpanContext) WithBaggageItem(key, value string) MockSpanContext { - var newBaggage map[string]string - if c.Baggage == nil { - newBaggage = map[string]string{key: value} - } else { - newBaggage = make(map[string]string, len(c.Baggage)+1) - for k, v := range c.Baggage { - newBaggage[k] = v - } - newBaggage[key] = value - } - // Use positional parameters so the compiler will help catch new fields. - return MockSpanContext{c.TraceID, c.SpanID, c.Sampled, newBaggage} -} - -// MockSpan is an opentracing.Span implementation that exports its internal -// state for testing purposes. -type MockSpan struct { - sync.RWMutex - - ParentID int - - OperationName string - StartTime time.Time - FinishTime time.Time - - // All of the below are protected by the embedded RWMutex. - SpanContext MockSpanContext - tags map[string]interface{} - logs []MockLogRecord - tracer *MockTracer -} - -func newMockSpan(t *MockTracer, name string, opts opentracing.StartSpanOptions) *MockSpan { - tags := opts.Tags - if tags == nil { - tags = map[string]interface{}{} - } - traceID := nextMockID() - parentID := int(0) - var baggage map[string]string - sampled := true - if len(opts.References) > 0 { - traceID = opts.References[0].ReferencedContext.(MockSpanContext).TraceID - parentID = opts.References[0].ReferencedContext.(MockSpanContext).SpanID - sampled = opts.References[0].ReferencedContext.(MockSpanContext).Sampled - baggage = opts.References[0].ReferencedContext.(MockSpanContext).Baggage - } - spanContext := MockSpanContext{traceID, nextMockID(), sampled, baggage} - startTime := opts.StartTime - if startTime.IsZero() { - startTime = time.Now() - } - return &MockSpan{ - ParentID: parentID, - OperationName: name, - StartTime: startTime, - tags: tags, - logs: []MockLogRecord{}, - SpanContext: spanContext, - - tracer: t, - } -} - -// Tags returns a copy of tags accumulated by the span so far -func (s *MockSpan) Tags() map[string]interface{} { - s.RLock() - defer s.RUnlock() - tags := make(map[string]interface{}) - for k, v := range s.tags { - tags[k] = v - } - return tags -} - -// Tag returns a single tag -func (s *MockSpan) Tag(k string) interface{} { - s.RLock() - defer s.RUnlock() - return s.tags[k] -} - -// Logs returns a copy of logs accumulated in the span so far -func (s *MockSpan) Logs() []MockLogRecord { - s.RLock() - defer s.RUnlock() - logs := make([]MockLogRecord, len(s.logs)) - copy(logs, s.logs) - return logs -} - -// Context belongs to the Span interface -func (s *MockSpan) Context() opentracing.SpanContext { - s.Lock() - defer s.Unlock() - return s.SpanContext -} - -// SetTag belongs to the Span interface -func (s *MockSpan) SetTag(key string, value interface{}) opentracing.Span { - s.Lock() - defer s.Unlock() - if key == string(ext.SamplingPriority) { - if v, ok := value.(uint16); ok { - s.SpanContext.Sampled = v > 0 - return s - } - if v, ok := value.(int); ok { - s.SpanContext.Sampled = v > 0 - return s - } - } - s.tags[key] = value - return s -} - -// SetBaggageItem belongs to the Span interface -func (s *MockSpan) SetBaggageItem(key, val string) opentracing.Span { - s.Lock() - defer s.Unlock() - s.SpanContext = s.SpanContext.WithBaggageItem(key, val) - return s -} - -// BaggageItem belongs to the Span interface -func (s *MockSpan) BaggageItem(key string) string { - s.RLock() - defer s.RUnlock() - return s.SpanContext.Baggage[key] -} - -// Finish belongs to the Span interface -func (s *MockSpan) Finish() { - s.Lock() - s.FinishTime = time.Now() - s.Unlock() - s.tracer.recordSpan(s) -} - -// FinishWithOptions belongs to the Span interface -func (s *MockSpan) FinishWithOptions(opts opentracing.FinishOptions) { - s.Lock() - s.FinishTime = opts.FinishTime - s.Unlock() - - // Handle any late-bound LogRecords. - for _, lr := range opts.LogRecords { - s.logFieldsWithTimestamp(lr.Timestamp, lr.Fields...) - } - // Handle (deprecated) BulkLogData. - for _, ld := range opts.BulkLogData { - if ld.Payload != nil { - s.logFieldsWithTimestamp( - ld.Timestamp, - log.String("event", ld.Event), - log.Object("payload", ld.Payload)) - } else { - s.logFieldsWithTimestamp( - ld.Timestamp, - log.String("event", ld.Event)) - } - } - - s.tracer.recordSpan(s) -} - -// String allows printing span for debugging -func (s *MockSpan) String() string { - return fmt.Sprintf( - "traceId=%d, spanId=%d, parentId=%d, sampled=%t, name=%s", - s.SpanContext.TraceID, s.SpanContext.SpanID, s.ParentID, - s.SpanContext.Sampled, s.OperationName) -} - -// LogFields belongs to the Span interface -func (s *MockSpan) LogFields(fields ...log.Field) { - s.logFieldsWithTimestamp(time.Now(), fields...) -} - -// The caller MUST NOT hold s.Lock -func (s *MockSpan) logFieldsWithTimestamp(ts time.Time, fields ...log.Field) { - lr := MockLogRecord{ - Timestamp: ts, - Fields: make([]MockKeyValue, len(fields)), - } - for i, f := range fields { - outField := &(lr.Fields[i]) - f.Marshal(outField) - } - - s.Lock() - defer s.Unlock() - s.logs = append(s.logs, lr) -} - -// LogKV belongs to the Span interface. -// -// This implementations coerces all "values" to strings, though that is not -// something all implementations need to do. Indeed, a motivated person can and -// probably should have this do a typed switch on the values. -func (s *MockSpan) LogKV(keyValues ...interface{}) { - if len(keyValues)%2 != 0 { - s.LogFields(log.Error(fmt.Errorf("Non-even keyValues len: %v", len(keyValues)))) - return - } - fields, err := log.InterleavedKVToFields(keyValues...) - if err != nil { - s.LogFields(log.Error(err), log.String("function", "LogKV")) - return - } - s.LogFields(fields...) -} - -// LogEvent belongs to the Span interface -func (s *MockSpan) LogEvent(event string) { - s.LogFields(log.String("event", event)) -} - -// LogEventWithPayload belongs to the Span interface -func (s *MockSpan) LogEventWithPayload(event string, payload interface{}) { - s.LogFields(log.String("event", event), log.Object("payload", payload)) -} - -// Log belongs to the Span interface -func (s *MockSpan) Log(data opentracing.LogData) { - panic("MockSpan.Log() no longer supported") -} - -// SetOperationName belongs to the Span interface -func (s *MockSpan) SetOperationName(operationName string) opentracing.Span { - s.Lock() - defer s.Unlock() - s.OperationName = operationName - return s -} - -// Tracer belongs to the Span interface -func (s *MockSpan) Tracer() opentracing.Tracer { - return s.tracer -} diff --git a/vendor/github.com/opentracing/opentracing-go/mocktracer/mocktracer.go b/vendor/github.com/opentracing/opentracing-go/mocktracer/mocktracer.go deleted file mode 100644 index 4533da7b1f..0000000000 --- a/vendor/github.com/opentracing/opentracing-go/mocktracer/mocktracer.go +++ /dev/null @@ -1,105 +0,0 @@ -package mocktracer - -import ( - "sync" - - "github.com/opentracing/opentracing-go" -) - -// New returns a MockTracer opentracing.Tracer implementation that's intended -// to facilitate tests of OpenTracing instrumentation. -func New() *MockTracer { - t := &MockTracer{ - finishedSpans: []*MockSpan{}, - injectors: make(map[interface{}]Injector), - extractors: make(map[interface{}]Extractor), - } - - // register default injectors/extractors - textPropagator := new(TextMapPropagator) - t.RegisterInjector(opentracing.TextMap, textPropagator) - t.RegisterExtractor(opentracing.TextMap, textPropagator) - - httpPropagator := &TextMapPropagator{HTTPHeaders: true} - t.RegisterInjector(opentracing.HTTPHeaders, httpPropagator) - t.RegisterExtractor(opentracing.HTTPHeaders, httpPropagator) - - return t -} - -// MockTracer is only intended for testing OpenTracing instrumentation. -// -// It is entirely unsuitable for production use, but appropriate for tests -// that want to verify tracing behavior in other frameworks/applications. -type MockTracer struct { - sync.RWMutex - finishedSpans []*MockSpan - injectors map[interface{}]Injector - extractors map[interface{}]Extractor -} - -// FinishedSpans returns all spans that have been Finish()'ed since the -// MockTracer was constructed or since the last call to its Reset() method. -func (t *MockTracer) FinishedSpans() []*MockSpan { - t.RLock() - defer t.RUnlock() - spans := make([]*MockSpan, len(t.finishedSpans)) - copy(spans, t.finishedSpans) - return spans -} - -// Reset clears the internally accumulated finished spans. Note that any -// extant MockSpans will still append to finishedSpans when they Finish(), -// even after a call to Reset(). -func (t *MockTracer) Reset() { - t.Lock() - defer t.Unlock() - t.finishedSpans = []*MockSpan{} -} - -// StartSpan belongs to the Tracer interface. -func (t *MockTracer) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span { - sso := opentracing.StartSpanOptions{} - for _, o := range opts { - o.Apply(&sso) - } - return newMockSpan(t, operationName, sso) -} - -// RegisterInjector registers injector for given format -func (t *MockTracer) RegisterInjector(format interface{}, injector Injector) { - t.injectors[format] = injector -} - -// RegisterExtractor registers extractor for given format -func (t *MockTracer) RegisterExtractor(format interface{}, extractor Extractor) { - t.extractors[format] = extractor -} - -// Inject belongs to the Tracer interface. -func (t *MockTracer) Inject(sm opentracing.SpanContext, format interface{}, carrier interface{}) error { - spanContext, ok := sm.(MockSpanContext) - if !ok { - return opentracing.ErrInvalidSpanContext - } - injector, ok := t.injectors[format] - if !ok { - return opentracing.ErrUnsupportedFormat - } - return injector.Inject(spanContext, carrier) -} - -// Extract belongs to the Tracer interface. -func (t *MockTracer) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error) { - extractor, ok := t.extractors[format] - if !ok { - return nil, opentracing.ErrUnsupportedFormat - } - return extractor.Extract(carrier) -} - -func (t *MockTracer) recordSpan(span *MockSpan) { - t.Lock() - defer t.Unlock() - t.finishedSpans = append(t.finishedSpans, span) -} diff --git a/vendor/github.com/opentracing/opentracing-go/mocktracer/propagation.go b/vendor/github.com/opentracing/opentracing-go/mocktracer/propagation.go deleted file mode 100644 index 8364f1d182..0000000000 --- a/vendor/github.com/opentracing/opentracing-go/mocktracer/propagation.go +++ /dev/null @@ -1,120 +0,0 @@ -package mocktracer - -import ( - "fmt" - "net/url" - "strconv" - "strings" - - "github.com/opentracing/opentracing-go" -) - -const mockTextMapIdsPrefix = "mockpfx-ids-" -const mockTextMapBaggagePrefix = "mockpfx-baggage-" - -var emptyContext = MockSpanContext{} - -// Injector is responsible for injecting SpanContext instances in a manner suitable -// for propagation via a format-specific "carrier" object. Typically the -// injection will take place across an RPC boundary, but message queues and -// other IPC mechanisms are also reasonable places to use an Injector. -type Injector interface { - // Inject takes `SpanContext` and injects it into `carrier`. The actual type - // of `carrier` depends on the `format` passed to `Tracer.Inject()`. - // - // Implementations may return opentracing.ErrInvalidCarrier or any other - // implementation-specific error if injection fails. - Inject(ctx MockSpanContext, carrier interface{}) error -} - -// Extractor is responsible for extracting SpanContext instances from a -// format-specific "carrier" object. Typically the extraction will take place -// on the server side of an RPC boundary, but message queues and other IPC -// mechanisms are also reasonable places to use an Extractor. -type Extractor interface { - // Extract decodes a SpanContext instance from the given `carrier`, - // or (nil, opentracing.ErrSpanContextNotFound) if no context could - // be found in the `carrier`. - Extract(carrier interface{}) (MockSpanContext, error) -} - -// TextMapPropagator implements Injector/Extractor for TextMap and HTTPHeaders formats. -type TextMapPropagator struct { - HTTPHeaders bool -} - -// Inject implements the Injector interface -func (t *TextMapPropagator) Inject(spanContext MockSpanContext, carrier interface{}) error { - writer, ok := carrier.(opentracing.TextMapWriter) - if !ok { - return opentracing.ErrInvalidCarrier - } - // Ids: - writer.Set(mockTextMapIdsPrefix+"traceid", strconv.Itoa(spanContext.TraceID)) - writer.Set(mockTextMapIdsPrefix+"spanid", strconv.Itoa(spanContext.SpanID)) - writer.Set(mockTextMapIdsPrefix+"sampled", fmt.Sprint(spanContext.Sampled)) - // Baggage: - for baggageKey, baggageVal := range spanContext.Baggage { - safeVal := baggageVal - if t.HTTPHeaders { - safeVal = url.QueryEscape(baggageVal) - } - writer.Set(mockTextMapBaggagePrefix+baggageKey, safeVal) - } - return nil -} - -// Extract implements the Extractor interface -func (t *TextMapPropagator) Extract(carrier interface{}) (MockSpanContext, error) { - reader, ok := carrier.(opentracing.TextMapReader) - if !ok { - return emptyContext, opentracing.ErrInvalidCarrier - } - rval := MockSpanContext{0, 0, true, nil} - err := reader.ForeachKey(func(key, val string) error { - lowerKey := strings.ToLower(key) - switch { - case lowerKey == mockTextMapIdsPrefix+"traceid": - // Ids: - i, err := strconv.Atoi(val) - if err != nil { - return err - } - rval.TraceID = i - case lowerKey == mockTextMapIdsPrefix+"spanid": - // Ids: - i, err := strconv.Atoi(val) - if err != nil { - return err - } - rval.SpanID = i - case lowerKey == mockTextMapIdsPrefix+"sampled": - b, err := strconv.ParseBool(val) - if err != nil { - return err - } - rval.Sampled = b - case strings.HasPrefix(lowerKey, mockTextMapBaggagePrefix): - // Baggage: - if rval.Baggage == nil { - rval.Baggage = make(map[string]string) - } - safeVal := val - if t.HTTPHeaders { - // unescape errors are ignored, nothing can be done - if rawVal, err := url.QueryUnescape(val); err == nil { - safeVal = rawVal - } - } - rval.Baggage[lowerKey[len(mockTextMapBaggagePrefix):]] = safeVal - } - return nil - }) - if rval.TraceID == 0 || rval.SpanID == 0 { - return emptyContext, opentracing.ErrSpanContextNotFound - } - if err != nil { - return emptyContext, err - } - return rval, nil -} diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.golangci.yml b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.golangci.yml deleted file mode 100644 index 8b1cfd0e18..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.golangci.yml +++ /dev/null @@ -1,30 +0,0 @@ -run: - deadline: 5m - -linters: - disable-all: true - enable: - - dupl - - goconst - - gocyclo - - gofmt - - golint - - govet - - ineffassign - - interfacer - - lll - - misspell - - nakedret - - structcheck - - unparam - - varcheck - -linters-settings: - dupl: - threshold: 400 - lll: - line-length: 170 - gocyclo: - min-complexity: 15 - golint: - min-confidence: 0.85 \ No newline at end of file diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.travis.yml b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.travis.yml deleted file mode 100644 index 4502e06326..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: go - -sudo: false - -matrix: - include: - - go: "1.17.x" - - go: "1.18.x" - - go: "1.19.x" - -install: - - go get -d -t ./... - -script: - - make test vet bench - -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/ead3c37d57527214e9f2 - - https://webhooks.gitter.im/e/e57478303f87ecd7bffc - on_success: change - on_failure: always diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/LICENSE b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/LICENSE deleted file mode 100644 index 2ff7224635..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -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 - -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 2017 The OpenZipkin 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. diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/Makefile b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/Makefile deleted file mode 100644 index fa36c8b21c..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -.DEFAULT_GOAL := test - -.PHONY: test -test: - go test -v -race -cover ./... - -.PHONY: bench -bench: - go test -v -run - -bench . -benchmem ./... - -.PHONY: lint -lint: - # Ignore grep's exit code since no match returns 1. - echo 'linting...' ; golint ./... - -.PHONY: vet -vet: - go vet ./... - -.PHONY: all -all: vet lint test bench - -.PHONY: example diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/README.md b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/README.md deleted file mode 100644 index b189a747ef..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# zipkin-go-opentracing - -[![Travis CI](https://travis-ci.org/openzipkin-contrib/zipkin-go-opentracing.svg?branch=master)](https://travis-ci.org/openzipkin-contrib/zipkin-go-opentracing) -[![GoDoc](https://godoc.org/github.com/openzipkin-contrib/zipkin-go-opentracing?status.svg)](https://godoc.org/github.com/openzipkin-contrib/zipkin-go-opentracing) -[![Go Report Card](https://goreportcard.com/badge/github.com/openzipkin-contrib/zipkin-go-opentracing)](https://goreportcard.com/report/github.com/openzipkin-contrib/zipkin-go-opentracing) -[![Sourcegraph](https://sourcegraph.com/github.com/openzipkin-contrib/zipkin-go-opentracing/-/badge.svg)](https://sourcegraph.com/github.com/openzipkin-contrib/zipkin-go-opentracing?badge) - -[OpenTracing](http://opentracing.io) bridge for the native [Zipkin](https://zipkin.io) tracing implementation [Zipkin Go](https://github.com/openzipkin/zipkin-go). - -### Notes - -This package is a simple bridge to allow OpenTracing API consumers -to use Zipkin as their tracing backend. For details on how to work with spans -and traces we suggest looking at the documentation and README from the -[OpenTracing API](https://github.com/opentracing/opentracing-go). - -For developers interested in adding Zipkin tracing to their Go services we -suggest looking at [Go kit](https://gokit.io) which is an excellent toolkit to -instrument your distributed system with Zipkin and much more with clean -separation of domains like transport, middleware / instrumentation and -business logic. - -### Examples - -Please check the [zipkin-go](https://github.com/openzipkin/zipkin-go) package for information how to set-up the Zipkin Go native tracer. Once set-up you can simple call the `Wrap` function to create the OpenTracing compatible bridge. - -```go -import ( - "github.com/opentracing/opentracing-go" - "github.com/openzipkin/zipkin-go" - zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http" - zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing" -) - -func main() { - // bootstrap your app... - - // zipkin / opentracing specific stuff - { - // set up a span reporter - reporter := zipkinhttp.NewReporter("http://zipkinhost:9411/api/v2/spans") - defer reporter.Close() - - // create our local service endpoint - endpoint, err := zipkin.NewEndpoint("myService", "myservice.mydomain.com:80") - if err != nil { - log.Fatalf("unable to create local endpoint: %+v\n", err) - } - - // initialize our tracer - nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint)) - if err != nil { - log.Fatalf("unable to create tracer: %+v\n", err) - } - - // use zipkin-go-opentracing to wrap our tracer - tracer := zipkinot.Wrap(nativeTracer) - - // optionally set as Global OpenTracing tracer instance - opentracing.SetGlobalTracer(tracer) - } - - // do other bootstrapping stuff... -} -``` - -For more information on zipkin-go-opentracing, please see the documentation at -[go doc](https://godoc.org/github.com/openzipkin-contrib/zipkin-go-opentracing). diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/appveyor.yml b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/appveyor.yml deleted file mode 100644 index c6c29a7960..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: v1.0.0.{build} - -platform: x64 - -clone_folder: c:\gopath\src\github.com\openzipkin-contrib\zipkin-go-opentracing - -environment: - GOPATH: c:\gopath - GO111MODULE: on - GOFLAGS: -mod=readonly - -install: - - set PATH=%GOPATH%\bin;c:\go\bin;%PATH% - - go version - - go env - -build_script: - - go vet ./... - - go test -v -race -cover ./... - - go test -v -run - -bench . -benchmem ./... diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/circle.yml b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/circle.yml deleted file mode 100644 index 5d2f57a25d..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/circle.yml +++ /dev/null @@ -1,11 +0,0 @@ -version: 2 -jobs: - build: - working_directory: /go/src/github.com/openzipkin-contrib/zipkin-go-opentracing - parallelism: 1 - docker: - - image: circleci/golang - steps: - - checkout - - run: go get -t -v -d ./... - - run: make vet test bench diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/context.go b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/context.go deleted file mode 100644 index b5ef74b695..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/context.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkintracer - -import ( - "github.com/openzipkin/zipkin-go/model" -) - -// SpanContext holds the basic Span metadata. -type SpanContext model.SpanContext - -// ForeachBaggageItem belongs to the opentracing.SpanContext interface -func (c SpanContext) ForeachBaggageItem(handler func(k, v string) bool) {} diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/propagation.go b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/propagation.go deleted file mode 100644 index 3dc7dbaae7..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/propagation.go +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkintracer - -import ( - "net/http" - "strings" - - opentracing "github.com/opentracing/opentracing-go" - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/propagation" - "github.com/openzipkin/zipkin-go/propagation/b3" -) - -// DelegatingCarrier is a flexible carrier interface which can be implemented -// by types which have a means of storing the trace metadata and already know -// how to serialize themselves -type DelegatingCarrier interface { - State() (model.SpanContext, error) - SetState(model.SpanContext) error -} - -type textMapPropagator struct { - tracer *tracerImpl -} - -func (p *textMapPropagator) Inject( - spanContext opentracing.SpanContext, - opaqueCarrier interface{}, -) error { - sc, ok := spanContext.(SpanContext) - if !ok { - return opentracing.ErrInvalidSpanContext - } - // native zipkin-go injector - if injector, ok := opaqueCarrier.(propagation.Injector); ok { - return injector(model.SpanContext(sc)) - } - // fallback to support native opentracing http carrier - if httpCarrier, ok := opaqueCarrier.(opentracing.HTTPHeadersCarrier); ok { - req := &http.Request{Header: http.Header(httpCarrier)} - switch p.tracer.opts.b3InjectOpt { - case B3InjectSingle: - return b3.InjectHTTP(req, b3.WithSingleHeaderOnly())(model.SpanContext(sc)) - case B3InjectBoth: - return b3.InjectHTTP(req, b3.WithSingleAndMultiHeader())(model.SpanContext(sc)) - default: - return b3.InjectHTTP(req)(model.SpanContext(sc)) - } - } - // fallback to support native opentracing textmap writer - if carrier, ok := opaqueCarrier.(opentracing.TextMapWriter); ok { - var ( - err error - m = make(b3.Map) - ) - switch p.tracer.opts.b3InjectOpt { - case B3InjectSingle: - err = m.Inject(b3.WithSingleHeaderOnly())(model.SpanContext(sc)) - case B3InjectBoth: - err = m.Inject(b3.WithSingleAndMultiHeader())(model.SpanContext(sc)) - default: - err = m.Inject()(model.SpanContext(sc)) - } - - if err != nil { - return err - } - - for k, v := range m { - carrier.Set(k, v) - } - return nil - } - - return opentracing.ErrInvalidCarrier -} - -func (p *textMapPropagator) Extract( - opaqueCarrier interface{}, -) (opentracing.SpanContext, error) { - if extractor, ok := opaqueCarrier.(propagation.Extractor); ok { - sc, err := extractor() - if sc != nil { - return SpanContext(*sc), err - } - return SpanContext{}, err - } - if httpCarrier, ok := opaqueCarrier.(opentracing.HTTPHeadersCarrier); ok { - req := &http.Request{Header: http.Header(httpCarrier)} - sc, err := b3.ExtractHTTP(req)() - if sc != nil { - return SpanContext(*sc), err - } - return SpanContext{}, err - } - if carrier, ok := opaqueCarrier.(opentracing.TextMapReader); ok { - m := make(b3.Map) - carrier.ForeachKey(func(key string, val string) error { - // no matter the format of the B3 headers, they will be retrieved - // using the standard lowercase format e.g. x-b3-traceid. See - // https://github.com/openzipkin/zipkin-go/blob/master/propagation/b3/shared.go - m[strings.ToLower(key)] = val - return nil - }) - sc, err := m.Extract() - if sc != nil { - return SpanContext(*sc), err - } - return SpanContext{}, err - } - - return nil, opentracing.ErrUnsupportedFormat -} - -type accessorPropagator struct { - tracer *tracerImpl -} - -func (p *accessorPropagator) Inject( - spanContext opentracing.SpanContext, - opaqueCarrier interface{}, -) error { - dc, ok := opaqueCarrier.(DelegatingCarrier) - if !ok || dc == nil { - return opentracing.ErrInvalidCarrier - } - sc, ok := spanContext.(SpanContext) - if !ok { - return opentracing.ErrInvalidSpanContext - } - return dc.SetState(model.SpanContext(sc)) -} - -func (p *accessorPropagator) Extract( - opaqueCarrier interface{}, -) (opentracing.SpanContext, error) { - dc, ok := opaqueCarrier.(DelegatingCarrier) - if !ok || dc == nil { - return nil, opentracing.ErrInvalidCarrier - } - - sc, err := dc.State() - return SpanContext(sc), err -} diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/span.go b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/span.go deleted file mode 100644 index 3d202483be..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/span.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkintracer - -import ( - "fmt" - "time" - - otobserver "github.com/opentracing-contrib/go-observer" - opentracing "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/ext" - "github.com/opentracing/opentracing-go/log" - "github.com/openzipkin/zipkin-go" -) - -// FinisherWithDuration allows to finish span with given duration -type FinisherWithDuration interface { - FinishedWithDuration(d time.Duration) -} - -type spanImpl struct { - tracer *tracerImpl - zipkinSpan zipkin.Span - startTime time.Time - observer otobserver.SpanObserver -} - -func (s *spanImpl) SetOperationName(operationName string) opentracing.Span { - if s.observer != nil { - s.observer.OnSetOperationName(operationName) - } - - s.zipkinSpan.SetName(operationName) - return s -} - -func (s *spanImpl) SetTag(key string, value interface{}) opentracing.Span { - if s.observer != nil { - s.observer.OnSetTag(key, value) - } - - if key == string(ext.SamplingPriority) { - // there are no means for now to change the sampling decision - // but when finishedSpanHandler is in place we could change this. - return s - } - - if key == string(ext.SpanKind) || - key == string(ext.PeerService) || - key == string(ext.PeerHostIPv4) || - key == string(ext.PeerHostIPv6) || - key == string(ext.PeerPort) { - // this tags are translated into kind and remoteEndpoint which can - // only be set on span creation - return s - } - - s.zipkinSpan.Tag(key, fmt.Sprint(value)) - return s -} - -func (s *spanImpl) LogKV(keyValues ...interface{}) { - fields, err := log.InterleavedKVToFields(keyValues...) - if err != nil { - return - } - - for _, field := range fields { - s.zipkinSpan.Annotate(time.Now(), field.String()) - } -} - -func (s *spanImpl) LogFields(fields ...log.Field) { - s.logFields(time.Now(), fields...) -} - -func (s *spanImpl) logFields(t time.Time, fields ...log.Field) { - for _, field := range fields { - s.zipkinSpan.Annotate(t, field.String()) - } -} - -func (s *spanImpl) LogEvent(event string) { - s.Log(opentracing.LogData{ - Event: event, - }) -} - -func (s *spanImpl) LogEventWithPayload(event string, payload interface{}) { - s.Log(opentracing.LogData{ - Event: event, - Payload: payload, - }) -} - -func (s *spanImpl) Log(ld opentracing.LogData) { - if ld.Timestamp.IsZero() { - ld.Timestamp = time.Now() - } - - s.zipkinSpan.Annotate(ld.Timestamp, fmt.Sprintf("%s:%s", ld.Event, ld.Payload)) -} - -func (s *spanImpl) Finish() { - if s.observer != nil { - s.observer.OnFinish(opentracing.FinishOptions{}) - } - - s.zipkinSpan.Finish() -} - -func (s *spanImpl) FinishWithOptions(opts opentracing.FinishOptions) { - if s.observer != nil { - s.observer.OnFinish(opts) - } - - for _, lr := range opts.LogRecords { - s.logFields(lr.Timestamp, lr.Fields...) - } - - if !opts.FinishTime.IsZero() { - f, ok := s.zipkinSpan.(FinisherWithDuration) - if !ok { - return - } - f.FinishedWithDuration(opts.FinishTime.Sub(s.startTime)) - return - } - - s.Finish() -} - -func (s *spanImpl) Tracer() opentracing.Tracer { - return s.tracer -} - -func (s *spanImpl) Context() opentracing.SpanContext { - return SpanContext(s.zipkinSpan.Context()) -} - -func (s *spanImpl) SetBaggageItem(key, val string) opentracing.Span { - return s -} - -func (s *spanImpl) BaggageItem(key string) string { - return "" -} diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer.go b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer.go deleted file mode 100644 index 748135396d..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer.go +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkintracer - -import ( - "fmt" - "net" - "strings" - "time" - - opentracing "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/ext" - "github.com/openzipkin/zipkin-go" - "github.com/openzipkin/zipkin-go/model" -) - -type tracerImpl struct { - zipkinTracer *zipkin.Tracer - textPropagator *textMapPropagator - accessorPropagator *accessorPropagator - opts *TracerOptions -} - -// Wrap receives a zipkin tracer and returns an opentracing -// tracer -func Wrap(tr *zipkin.Tracer, opts ...TracerOption) opentracing.Tracer { - t := &tracerImpl{ - zipkinTracer: tr, - opts: &TracerOptions{}, - } - t.textPropagator = &textMapPropagator{t} - t.accessorPropagator = &accessorPropagator{t} - - for _, o := range opts { - o(t.opts) - } - - return t -} - -func (t *tracerImpl) StartSpan(operationName string, opts ...opentracing.StartSpanOption) opentracing.Span { - var startSpanOptions opentracing.StartSpanOptions - for _, opt := range opts { - opt.Apply(&startSpanOptions) - } - - zopts := make([]zipkin.SpanOption, 0) - - // Parent - if len(startSpanOptions.References) > 0 { - parent, ok := (startSpanOptions.References[0].ReferencedContext).(SpanContext) - if ok { - zopts = append(zopts, zipkin.Parent(model.SpanContext(parent))) - } - } - - startTime := time.Now() - // Time - if !startSpanOptions.StartTime.IsZero() { - zopts = append(zopts, zipkin.StartTime(startSpanOptions.StartTime)) - startTime = startSpanOptions.StartTime - } - - zopts = append(zopts, parseTagsAsZipkinOptions(startSpanOptions.Tags)...) - - newSpan := t.zipkinTracer.StartSpan(operationName, zopts...) - - sp := &spanImpl{ - zipkinSpan: newSpan, - tracer: t, - startTime: startTime, - } - if t.opts.observer != nil { - observer, _ := t.opts.observer.OnStartSpan(sp, operationName, startSpanOptions) - sp.observer = observer - } - - return sp -} - -func parseTagsAsZipkinOptions(t map[string]interface{}) []zipkin.SpanOption { - zopts := make([]zipkin.SpanOption, 0) - - tags := map[string]string{} - remoteEndpoint := &model.Endpoint{} - - var kind string - if val, ok := t[string(ext.SpanKind)]; ok { - switch kindVal := val.(type) { - case ext.SpanKindEnum: - kind = string(kindVal) - case string: - kind = kindVal - default: - kind = fmt.Sprintf("%v", kindVal) - } - mKind := model.Kind(strings.ToUpper(kind)) - if mKind == model.Client || - mKind == model.Server || - mKind == model.Producer || - mKind == model.Consumer { - zopts = append(zopts, zipkin.Kind(mKind)) - } else { - tags["span.kind"] = kind - } - } - - if val, ok := t[string(ext.PeerService)]; ok { - serviceName, _ := val.(string) - remoteEndpoint.ServiceName = serviceName - } - - if val, ok := t[string(ext.PeerHostIPv4)]; ok { - ipv4, _ := val.(string) - remoteEndpoint.IPv4 = net.ParseIP(ipv4) - } - - if val, ok := t[string(ext.PeerHostIPv6)]; ok { - ipv6, _ := val.(string) - remoteEndpoint.IPv6 = net.ParseIP(ipv6) - } - - if val, ok := t[string(ext.PeerPort)]; ok { - port, _ := val.(uint16) - remoteEndpoint.Port = port - } - - for key, val := range t { - if key == string(ext.SpanKind) || - key == string(ext.PeerService) || - key == string(ext.PeerHostIPv4) || - key == string(ext.PeerHostIPv6) || - key == string(ext.PeerPort) { - continue - } - - tags[key] = fmt.Sprint(val) - } - - if len(tags) > 0 { - zopts = append(zopts, zipkin.Tags(tags)) - } - - if !remoteEndpoint.Empty() { - zopts = append(zopts, zipkin.RemoteEndpoint(remoteEndpoint)) - } - - return zopts -} - -type delegatorType struct{} - -// Delegator is the format to use for DelegatingCarrier. -var Delegator delegatorType - -func (t *tracerImpl) Inject(sc opentracing.SpanContext, format interface{}, carrier interface{}) error { - switch format { - case opentracing.TextMap, opentracing.HTTPHeaders: - return t.textPropagator.Inject(sc, carrier) - case opentracing.Binary: - // try with textMapPropagator - return t.textPropagator.Inject(sc, carrier) - } - if _, ok := format.(delegatorType); ok { - return t.accessorPropagator.Inject(sc, carrier) - } - return opentracing.ErrUnsupportedFormat -} - -func (t *tracerImpl) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error) { - switch format { - case opentracing.TextMap, opentracing.HTTPHeaders: - return t.textPropagator.Extract(carrier) - case opentracing.Binary: - // try with textMapPropagator - return t.textPropagator.Extract(carrier) - } - if _, ok := format.(delegatorType); ok { - return t.accessorPropagator.Extract(carrier) - } - return nil, opentracing.ErrUnsupportedFormat -} diff --git a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer_options.go b/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer_options.go deleted file mode 100644 index 260235ae79..0000000000 --- a/vendor/github.com/openzipkin-contrib/zipkin-go-opentracing/tracer_options.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkintracer - -import ( - otobserver "github.com/opentracing-contrib/go-observer" -) - -// B3InjectOption type holds information on B3 injection style when using -// native OpenTracing HTTPHeadersCarrier. -type B3InjectOption int - -// Available B3InjectOption values -const ( - B3InjectStandard B3InjectOption = iota - B3InjectSingle - B3InjectBoth -) - -// TracerOptions allows creating a customized Tracer. -type TracerOptions struct { - observer otobserver.Observer - b3InjectOpt B3InjectOption -} - -// TracerOption allows for functional options. -// See: http://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis -type TracerOption func(opts *TracerOptions) - -// WithObserver assigns an initialized observer to opts.observer -func WithObserver(observer otobserver.Observer) TracerOption { - return func(opts *TracerOptions) { - opts.observer = observer - } -} - -// WithB3InjectOption sets the B3 injection style if using the native OpenTracing HTTPHeadersCarrier -func WithB3InjectOption(b3InjectOption B3InjectOption) TracerOption { - return func(opts *TracerOptions) { - opts.b3InjectOpt = b3InjectOption - } -} diff --git a/vendor/github.com/openzipkin/zipkin-go/.gitattributes b/vendor/github.com/openzipkin/zipkin-go/.gitattributes deleted file mode 100644 index fcadb2cf97..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -* text eol=lf diff --git a/vendor/github.com/openzipkin/zipkin-go/.gitignore b/vendor/github.com/openzipkin/zipkin-go/.gitignore deleted file mode 100644 index 11b90db8d9..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/.gitignore +++ /dev/null @@ -1,26 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe -*.test -*.prof - -.idea diff --git a/vendor/github.com/openzipkin/zipkin-go/.golangci.yml b/vendor/github.com/openzipkin/zipkin-go/.golangci.yml deleted file mode 100644 index 0c797fbf22..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/.golangci.yml +++ /dev/null @@ -1,33 +0,0 @@ -run: - timeout: 5m - -issues: - exclude-dirs: - - zipkin_proto3 - -linters: - disable-all: true - enable: - - dupl - - goconst - - gocyclo - - gofmt - - revive - - govet - - ineffassign - - lll - - misspell - - nakedret - - revive - - unparam - - unused - -linters-settings: - dupl: - threshold: 400 - lll: - line-length: 170 - gocyclo: - min-complexity: 20 - revive: - confidence: 0.85 diff --git a/vendor/github.com/openzipkin/zipkin-go/LICENSE b/vendor/github.com/openzipkin/zipkin-go/LICENSE deleted file mode 100644 index 2ff7224635..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -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 - -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 2017 The OpenZipkin 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. diff --git a/vendor/github.com/openzipkin/zipkin-go/Makefile b/vendor/github.com/openzipkin/zipkin-go/Makefile deleted file mode 100644 index a1e5914724..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2022 The OpenZipkin 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. - -.DEFAULT_GOAL := test - -.PHONY: test -test: - # MallocNanoZone env var avoids problems in macOS Monterey: golang/go#49138 - MallocNanoZone=0 go test -v -race -cover ./... - -.PHONY: bench -bench: - go test -v -run - -bench . -benchmem ./... - -.PHONY: protoc -protoc: - protoc --go_out=module=github.com/openzipkin/zipkin-go:. proto/zipkin_proto3/zipkin.proto - protoc --go_out=module=github.com/openzipkin/zipkin-go:. proto/testing/*.proto - protoc --go-grpc_out=module=github.com/openzipkin/zipkin-go:. proto/testing/*.proto - -.PHONY: lint -lint: - # Ignore grep's exit code since no match returns 1. - echo 'linting...' ; golint ./... - -.PHONY: vet -vet: - go vet ./... - -.PHONY: all -all: vet lint test bench - -.PHONY: example diff --git a/vendor/github.com/openzipkin/zipkin-go/README.md b/vendor/github.com/openzipkin/zipkin-go/README.md deleted file mode 100644 index 646bf2242a..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/README.md +++ /dev/null @@ -1,128 +0,0 @@ - - -# Zipkin Library for Go - -[![GHA](https://github.com/openzipkin/zipkin-go/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/openzipkin/zipkin-go/actions/workflows/ci.yml) -[![codecov](https://codecov.io/gh/openzipkin/zipkin-go/branch/master/graph/badge.svg?token=gXdWofFlsq)](https://codecov.io/gh/openzipkin/zipkin-go) -[![Go Report Card](https://goreportcard.com/badge/github.com/openzipkin/zipkin-go)](https://goreportcard.com/report/github.com/openzipkin/zipkin-go) -[![GoDoc](https://godoc.org/github.com/openzipkin/zipkin-go?status.svg)](https://godoc.org/github.com/openzipkin/zipkin-go) -[![Gitter chat](https://badges.gitter.im/openzipkin/zipkin.svg)](https://gitter.im/openzipkin/zipkin?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Sourcegraph](https://sourcegraph.com/github.com/openzipkin/zipkin-go/-/badge.svg)](https://sourcegraph.com/github.com/openzipkin/zipkin-go?badge) - -Zipkin Go is the official Go Tracer / Tracing implementation for Zipkin, -supported by the OpenZipkin community. - -## package organization -`zipkin-go` is built with interoperability in mind within the OpenZipkin -community and even 3rd parties, the library consists of several packages. - -The main tracing implementation can be found in the root folder of this -repository. Reusable parts not considered core implementation or deemed -beneficiary for usage by others are placed in their own packages within this -repository. - -### model -This library implements the Zipkin V2 Span Model which is available in the model -package. It contains a Go data model compatible with the Zipkin V2 API and can -automatically sanitize, parse and (de)serialize to and from the required JSON -representation as used by the official Zipkin V2 Collectors. - -### propagation -The propagation package and B3 subpackage hold the logic for propagating -SpanContext (span identifiers and sampling flags) between services participating -in traces. Currently Zipkin B3 Propagation is supported for HTTP and GRPC. - -### middleware -The middleware subpackages contain officially supported middleware handlers and -tracing wrappers. - -#### http -An easy to use http.Handler middleware for tracing server side requests is -provided. This allows one to use this middleware in applications using -standard library servers as well as most available higher level frameworks. Some -frameworks will have their own instrumentation and middleware that maps better -for their ecosystem. - -For HTTP client operations `NewTransport` can return a `http.RoundTripper` -implementation that can either wrap the standard http.Client's Transport or a -custom provided one and add per request tracing. Since HTTP Requests can have -one or multiple redirects it is advisable to always enclose HTTP Client calls -with a `Span` either around the `*http.Client` call level or parent function -level. - -For convenience `NewClient` is provided which returns a HTTP Client which embeds -`*http.Client` and provides an `application span` around the HTTP calls when -calling the `DoWithAppSpan()` method. - -#### grpc -Easy to use grpc.StatsHandler middleware are provided for tracing gRPC server -and client requests. - -For a server, pass `NewServerHandler` when calling `NewServer`, e.g., - -```go -import ( - "google.golang.org/grpc" - zipkingrpc "github.com/openzipkin/zipkin-go/middleware/grpc" -) - -server = grpc.NewServer(grpc.StatsHandler(zipkingrpc.NewServerHandler(tracer))) -``` - -For a client, pass `NewClientHandler` when calling `Dial`, e.g., - -```go -import ( - "google.golang.org/grpc" - zipkingrpc "github.com/openzipkin/zipkin-go/middleware/grpc" -) - -conn, err = grpc.Dial(addr, grpc.WithStatsHandler(zipkingrpc.NewClientHandler(tracer))) -``` - -### reporter -The reporter package holds the interface which the various Reporter -implementations use. It is exported into its own package as it can be used by -3rd parties to use these Reporter packages in their own libraries for exporting -to the Zipkin ecosystem. The `zipkin-go` tracer also uses the interface to -accept 3rd party Reporter implementations. - -#### HTTP Reporter -Most common Reporter type used by Zipkin users transporting Spans to the Zipkin -server using JSON over HTTP. The reporter holds a buffer and reports to the -backend asynchronously. - -#### Kafka Reporter -High performance Reporter transporting Spans to the Zipkin server using a Kafka -Producer digesting JSON V2 Spans. The reporter uses the -[Sarama async producer](https://pkg.go.dev/github.com/IBM/sarama#AsyncProducer) -underneath. - -## Usage and Examples -[HTTP Server Example](examples/httpserver_test.go) - -## Go Support Policy - -zipkin-go follows the same version policy as Go's [Release Policy](https://go.dev/doc/devel/release): -two versions. zipkin-go will ensure these versions work and bugs are valid if -there's an issue with a current Go version. - -Additionally, zipkin-go intentionally delays usage of language or standard -library features one additional version. For example, when Go 1.29 is released, -zipkin-go can use language features or standard libraries added in 1.27. This -is a convenience for embedders who have a slower version policy than Go. -However, only supported Go versions may be used to raise support issues. diff --git a/vendor/github.com/openzipkin/zipkin-go/SECURITY.md b/vendor/github.com/openzipkin/zipkin-go/SECURITY.md deleted file mode 100644 index bba9ddbdfe..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/SECURITY.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenZipkin Security Process - -This document outlines the process for handling security concerns in OpenZipkin projects. - -Any vulnerability or misconfiguration detected in our [security workflow](.github/workflows/security.yml) -should be addressed as a normal pull request. - -OpenZipkin is a volunteer community and does not have a dedicated security team. There may be -periods where no volunteer is able to address a security concern. There is no SLA or warranty -offered by volunteers. If you are a security researcher, please consider this before escalating. - -For security concerns that are sensitive or otherwise outside the scope of public issues, please -contact zipkin-admin@googlegroups.com. diff --git a/vendor/github.com/openzipkin/zipkin-go/context.go b/vendor/github.com/openzipkin/zipkin-go/context.go deleted file mode 100644 index 557dcb3078..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/context.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "context" - - "github.com/openzipkin/zipkin-go/model" -) - -var defaultNoopSpan = &noopSpan{} - -// SpanFromContext retrieves a Zipkin Span from Go's context propagation -// mechanism if found. If not found, returns nil. -func SpanFromContext(ctx context.Context) Span { - if s, ok := ctx.Value(spanKey).(Span); ok { - return s - } - return nil -} - -// SpanOrNoopFromContext retrieves a Zipkin Span from Go's context propagation -// mechanism if found. If not found, returns a noopSpan. -// This function typically is used for modules that want to provide existing -// Zipkin spans with additional data, but can't guarantee that spans are -// properly propagated. It is preferred to use SpanFromContext() and test for -// Nil instead of using this function. -func SpanOrNoopFromContext(ctx context.Context) Span { - if s, ok := ctx.Value(spanKey).(Span); ok { - return s - } - return defaultNoopSpan -} - -// NewContext stores a Zipkin Span into Go's context propagation mechanism. -func NewContext(ctx context.Context, s Span) context.Context { - return context.WithValue(ctx, spanKey, s) -} - -// BaggageFromContext takes a context and returns access to BaggageFields if -// available. Returns nil if there are no BaggageFields found in context. -func BaggageFromContext(ctx context.Context) model.BaggageFields { - if span := SpanFromContext(ctx); span != nil { - return span.Context().Baggage - } - return nil -} - -type ctxKey struct{} - -var spanKey = ctxKey{} diff --git a/vendor/github.com/openzipkin/zipkin-go/doc.go b/vendor/github.com/openzipkin/zipkin-go/doc.go deleted file mode 100644 index 23af86962e..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin implements a native Zipkin instrumentation library for Go. - -See https://zipkin.io for more information about Zipkin. -*/ -package zipkin diff --git a/vendor/github.com/openzipkin/zipkin-go/endpoint.go b/vendor/github.com/openzipkin/zipkin-go/endpoint.go deleted file mode 100644 index cb538e6c53..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/endpoint.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "fmt" - "net" - "strconv" - "strings" - - "github.com/openzipkin/zipkin-go/model" -) - -// NewEndpoint creates a new endpoint given the provided serviceName and -// hostPort. -func NewEndpoint(serviceName string, hostPort string) (*model.Endpoint, error) { - e := &model.Endpoint{ - ServiceName: serviceName, - } - - if hostPort == "" || hostPort == ":0" { - if serviceName == "" { - // if all properties are empty we should not have an Endpoint object. - return nil, nil - } - return e, nil - } - - if strings.IndexByte(hostPort, ':') < 0 { - hostPort += ":0" - } - - host, port, err := net.SplitHostPort(hostPort) - if err != nil { - return nil, err - } - - p, err := strconv.ParseUint(port, 10, 16) - if err != nil { - return nil, err - } - e.Port = uint16(p) - - addrs, err := net.LookupIP(host) - if err != nil { - return nil, fmt.Errorf("host lookup failure: %w", err) - } - - for i := range addrs { - addr := addrs[i].To4() - if addr == nil { - // IPv6 - 16 bytes - if e.IPv6 == nil { - e.IPv6 = addrs[i].To16() - } - } else { - // IPv4 - 4 bytes - if e.IPv4 == nil { - e.IPv4 = addr - } - } - if e.IPv4 != nil && e.IPv6 != nil { - // Both IPv4 & IPv6 have been set, done... - break - } - } - - return e, nil -} diff --git a/vendor/github.com/openzipkin/zipkin-go/idgenerator/idgenerator.go b/vendor/github.com/openzipkin/zipkin-go/idgenerator/idgenerator.go deleted file mode 100644 index 0cb5a96ff7..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/idgenerator/idgenerator.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 idgenerator contains several Span and Trace ID generators which can be -used by the Zipkin tracer. Additional third party generators can be plugged in -if they adhere to the IDGenerator interface. -*/ -package idgenerator - -import ( - "math/rand" - "sync" - "time" - - "github.com/openzipkin/zipkin-go/model" -) - -var ( - seededIDGen = rand.New(rand.NewSource(time.Now().UnixNano())) - // NewSource returns a new pseudo-random Source seeded with the given value. - // Unlike the default Source used by top-level functions, this source is not - // safe for concurrent use by multiple goroutines. Hence the need for a mutex. - seededIDLock sync.Mutex -) - -// IDGenerator interface can be used to provide the Zipkin Tracer with custom -// implementations to generate Span and Trace IDs. -type IDGenerator interface { - SpanID(traceID model.TraceID) model.ID // Generates a new Span ID - TraceID() model.TraceID // Generates a new Trace ID -} - -// NewRandom64 returns an ID Generator which can generate 64 bit trace and span -// id's -func NewRandom64() IDGenerator { - return &randomID64{} -} - -// NewRandom128 returns an ID Generator which can generate 128 bit trace and 64 -// bit span id's -func NewRandom128() IDGenerator { - return &randomID128{} -} - -// NewRandomTimestamped generates 128 bit time sortable traceid's and 64 bit -// spanid's. -func NewRandomTimestamped() IDGenerator { - return &randomTimestamped{} -} - -// randomID64 can generate 64 bit traceid's and 64 bit spanid's. -type randomID64 struct{} - -func (r *randomID64) TraceID() (id model.TraceID) { - seededIDLock.Lock() - id = model.TraceID{ - Low: uint64(seededIDGen.Int63()), - } - seededIDLock.Unlock() - return -} - -func (r *randomID64) SpanID(traceID model.TraceID) (id model.ID) { - if !traceID.Empty() { - return model.ID(traceID.Low) - } - seededIDLock.Lock() - id = model.ID(seededIDGen.Int63()) - seededIDLock.Unlock() - return -} - -// randomID128 can generate 128 bit traceid's and 64 bit spanid's. -type randomID128 struct{} - -func (r *randomID128) TraceID() (id model.TraceID) { - seededIDLock.Lock() - id = model.TraceID{ - High: uint64(seededIDGen.Int63()), - Low: uint64(seededIDGen.Int63()), - } - seededIDLock.Unlock() - return -} - -func (r *randomID128) SpanID(traceID model.TraceID) (id model.ID) { - if !traceID.Empty() { - return model.ID(traceID.Low) - } - seededIDLock.Lock() - id = model.ID(seededIDGen.Int63()) - seededIDLock.Unlock() - return -} - -// randomTimestamped can generate 128 bit time sortable traceid's compatible -// with AWS X-Ray and 64 bit spanid's. -type randomTimestamped struct{} - -func (t *randomTimestamped) TraceID() (id model.TraceID) { - seededIDLock.Lock() - id = model.TraceID{ - High: uint64(time.Now().Unix()<<32) + uint64(seededIDGen.Int31()), - Low: uint64(seededIDGen.Int63()), - } - seededIDLock.Unlock() - return -} - -func (t *randomTimestamped) SpanID(traceID model.TraceID) (id model.ID) { - if !traceID.Empty() { - return model.ID(traceID.Low) - } - seededIDLock.Lock() - id = model.ID(seededIDGen.Int63()) - seededIDLock.Unlock() - return -} diff --git a/vendor/github.com/openzipkin/zipkin-go/model/annotation.go b/vendor/github.com/openzipkin/zipkin-go/model/annotation.go deleted file mode 100644 index 02d09fb15a..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/annotation.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -import ( - "encoding/json" - "errors" - "time" -) - -// ErrValidTimestampRequired error -var ErrValidTimestampRequired = errors.New("valid annotation timestamp required") - -// Annotation associates an event that explains latency with a timestamp. -type Annotation struct { - Timestamp time.Time - Value string -} - -// MarshalJSON implements custom JSON encoding -func (a *Annotation) MarshalJSON() ([]byte, error) { - return json.Marshal(&struct { - Timestamp int64 `json:"timestamp"` - Value string `json:"value"` - }{ - Timestamp: a.Timestamp.Round(time.Microsecond).UnixNano() / 1e3, - Value: a.Value, - }) -} - -// UnmarshalJSON implements custom JSON decoding -func (a *Annotation) UnmarshalJSON(b []byte) error { - type Alias Annotation - annotation := &struct { - TimeStamp uint64 `json:"timestamp"` - *Alias - }{ - Alias: (*Alias)(a), - } - if err := json.Unmarshal(b, &annotation); err != nil { - return err - } - if annotation.TimeStamp < 1 { - return ErrValidTimestampRequired - } - a.Timestamp = time.Unix(0, int64(annotation.TimeStamp)*1e3) - return nil -} diff --git a/vendor/github.com/openzipkin/zipkin-go/model/doc.go b/vendor/github.com/openzipkin/zipkin-go/model/doc.go deleted file mode 100644 index 4cae4e07a5..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model contains the Zipkin V2 model which is used by the Zipkin Go -tracer implementation. - -Third party instrumentation libraries can use the model and transport packages -found in this Zipkin Go library to directly interface with the Zipkin Server or -Zipkin Collectors without the need to use the tracer implementation itself. -*/ -package model diff --git a/vendor/github.com/openzipkin/zipkin-go/model/endpoint.go b/vendor/github.com/openzipkin/zipkin-go/model/endpoint.go deleted file mode 100644 index 48e2afd624..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/endpoint.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -import ( - "encoding/json" - "net" - "strings" -) - -// Endpoint holds the network context of a node in the service graph. -type Endpoint struct { - ServiceName string - IPv4 net.IP - IPv6 net.IP - Port uint16 -} - -// MarshalJSON exports our Endpoint into the correct format for the Zipkin V2 API. -func (e Endpoint) MarshalJSON() ([]byte, error) { - return json.Marshal(&struct { - ServiceName string `json:"serviceName,omitempty"` - IPv4 net.IP `json:"ipv4,omitempty"` - IPv6 net.IP `json:"ipv6,omitempty"` - Port uint16 `json:"port,omitempty"` - }{ - strings.ToLower(e.ServiceName), - e.IPv4, - e.IPv6, - e.Port, - }) -} - -// Empty returns if all Endpoint properties are empty / unspecified. -func (e *Endpoint) Empty() bool { - return e == nil || - (e.ServiceName == "" && e.Port == 0 && len(e.IPv4) == 0 && len(e.IPv6) == 0) -} diff --git a/vendor/github.com/openzipkin/zipkin-go/model/kind.go b/vendor/github.com/openzipkin/zipkin-go/model/kind.go deleted file mode 100644 index d247c02000..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/kind.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -// Kind clarifies context of timestamp, duration and remoteEndpoint in a span. -type Kind string - -// Available Kind values -const ( - Undetermined Kind = "" - Client Kind = "CLIENT" - Server Kind = "SERVER" - Producer Kind = "PRODUCER" - Consumer Kind = "CONSUMER" -) diff --git a/vendor/github.com/openzipkin/zipkin-go/model/span.go b/vendor/github.com/openzipkin/zipkin-go/model/span.go deleted file mode 100644 index cf30bfac84..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/span.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -import ( - "encoding/json" - "errors" - "strings" - "time" -) - -// unmarshal errors -var ( - ErrValidTraceIDRequired = errors.New("valid traceId required") - ErrValidIDRequired = errors.New("valid span id required") - ErrValidDurationRequired = errors.New("valid duration required") -) - -// BaggageFields holds the interface for consumers needing to interact with -// the fields in application logic. -type BaggageFields interface { - // Get returns the values for a field identified by its key. - Get(key string) []string - // Add adds the provided values to a header designated by key. If not - // accepted by the baggage implementation, it will return false. - Add(key string, value ...string) bool - // Set sets the provided values to a header designated by key. If not - // accepted by the baggage implementation, it will return false. - Set(key string, value ...string) bool - // Delete removes the field data designated by key. If not accepted by the - // baggage implementation, it will return false. - Delete(key string) bool - // Iterate will iterate over the available fields and for each one it will - // trigger the callback function. - Iterate(f func(key string, values []string)) -} - -// SpanContext holds the context of a Span. -type SpanContext struct { - TraceID TraceID `json:"traceId"` - ID ID `json:"id"` - ParentID *ID `json:"parentId,omitempty"` - Debug bool `json:"debug,omitempty"` - Sampled *bool `json:"-"` - Err error `json:"-"` - Baggage BaggageFields `json:"-"` -} - -// SpanModel structure. -// -// If using this library to instrument your application you will not need to -// directly access or modify this representation. The SpanModel is exported for -// use cases involving 3rd party Go instrumentation libraries desiring to -// export data to a Zipkin server using the Zipkin V2 Span model. -type SpanModel struct { - SpanContext - Name string `json:"name,omitempty"` - Kind Kind `json:"kind,omitempty"` - Timestamp time.Time `json:"-"` - Duration time.Duration `json:"-"` - Shared bool `json:"shared,omitempty"` - LocalEndpoint *Endpoint `json:"localEndpoint,omitempty"` - RemoteEndpoint *Endpoint `json:"remoteEndpoint,omitempty"` - Annotations []Annotation `json:"annotations,omitempty"` - Tags map[string]string `json:"tags,omitempty"` -} - -// MarshalJSON exports our Model into the correct format for the Zipkin V2 API. -func (s SpanModel) MarshalJSON() ([]byte, error) { - type Alias SpanModel - - var timestamp int64 - if !s.Timestamp.IsZero() { - if s.Timestamp.Unix() < 1 { - // Zipkin does not allow Timestamps before Unix epoch - return nil, ErrValidTimestampRequired - } - timestamp = s.Timestamp.Round(time.Microsecond).UnixNano() / 1e3 - } - - if s.Duration < time.Microsecond { - if s.Duration < 0 { - // negative duration is not allowed and signals a timing logic error - return nil, ErrValidDurationRequired - } else if s.Duration > 0 { - // sub microsecond durations are reported as 1 microsecond - s.Duration = 1 * time.Microsecond - } - } else { - // Duration will be rounded to nearest microsecond representation. - // - // NOTE: Duration.Round() is not available in Go 1.8 which we still support. - // To handle microsecond resolution rounding we'll add 500 nanoseconds to - // the duration. When truncated to microseconds in the call to marshal, it - // will be naturally rounded. See TestSpanDurationRounding in span_test.go - s.Duration += 500 * time.Nanosecond - } - - s.Name = strings.ToLower(s.Name) - - if s.LocalEndpoint.Empty() { - s.LocalEndpoint = nil - } - - if s.RemoteEndpoint.Empty() { - s.RemoteEndpoint = nil - } - - return json.Marshal(&struct { - T int64 `json:"timestamp,omitempty"` - D int64 `json:"duration,omitempty"` - Alias - }{ - T: timestamp, - D: s.Duration.Nanoseconds() / 1e3, - Alias: (Alias)(s), - }) -} - -// UnmarshalJSON imports our Model from a Zipkin V2 API compatible span -// representation. -func (s *SpanModel) UnmarshalJSON(b []byte) error { - type Alias SpanModel - span := &struct { - T uint64 `json:"timestamp,omitempty"` - D uint64 `json:"duration,omitempty"` - *Alias - }{ - Alias: (*Alias)(s), - } - if err := json.Unmarshal(b, &span); err != nil { - return err - } - if s.ID < 1 { - return ErrValidIDRequired - } - if span.T > 0 { - s.Timestamp = time.Unix(0, int64(span.T)*1e3) - } - s.Duration = time.Duration(span.D*1e3) * time.Nanosecond - if s.LocalEndpoint.Empty() { - s.LocalEndpoint = nil - } - - if s.RemoteEndpoint.Empty() { - s.RemoteEndpoint = nil - } - return nil -} diff --git a/vendor/github.com/openzipkin/zipkin-go/model/span_id.go b/vendor/github.com/openzipkin/zipkin-go/model/span_id.go deleted file mode 100644 index acd72ea7b7..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/span_id.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -import ( - "fmt" - "strconv" -) - -// ID type -type ID uint64 - -// String outputs the 64-bit ID as hex string. -func (i ID) String() string { - return fmt.Sprintf("%016x", uint64(i)) -} - -// MarshalJSON serializes an ID type (SpanID, ParentSpanID) to HEX. -func (i ID) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf("%q", i.String())), nil -} - -// UnmarshalJSON deserializes an ID type (SpanID, ParentSpanID) from HEX. -func (i *ID) UnmarshalJSON(b []byte) (err error) { - var id uint64 - if len(b) < 3 { - return nil - } - id, err = strconv.ParseUint(string(b[1:len(b)-1]), 16, 64) - *i = ID(id) - return err -} diff --git a/vendor/github.com/openzipkin/zipkin-go/model/traceid.go b/vendor/github.com/openzipkin/zipkin-go/model/traceid.go deleted file mode 100644 index dca6553506..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/model/traceid.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 model - -import ( - "fmt" - "strconv" -) - -// TraceID is a 128 bit number internally stored as 2x uint64 (high & low). -// In case of 64 bit traceIDs, the value can be found in Low. -type TraceID struct { - High uint64 - Low uint64 -} - -// Empty returns if TraceID has zero value. -func (t TraceID) Empty() bool { - return t.Low == 0 && t.High == 0 -} - -// String outputs the 128-bit traceID as hex string. -func (t TraceID) String() string { - if t.High == 0 { - return fmt.Sprintf("%016x", t.Low) - } - return fmt.Sprintf("%016x%016x", t.High, t.Low) -} - -// TraceIDFromHex returns the TraceID from a hex string. -func TraceIDFromHex(h string) (t TraceID, err error) { - if len(h) > 16 { - if t.High, err = strconv.ParseUint(h[0:len(h)-16], 16, 64); err != nil { - return - } - t.Low, err = strconv.ParseUint(h[len(h)-16:], 16, 64) - return - } - t.Low, err = strconv.ParseUint(h, 16, 64) - return -} - -// MarshalJSON custom JSON serializer to export the TraceID in the required -// zero padded hex representation. -func (t TraceID) MarshalJSON() ([]byte, error) { - return []byte(fmt.Sprintf("%q", t.String())), nil -} - -// UnmarshalJSON custom JSON deserializer to retrieve the traceID from the hex -// encoded representation. -func (t *TraceID) UnmarshalJSON(traceID []byte) error { - if len(traceID) < 3 { - return ErrValidTraceIDRequired - } - // A valid JSON string is encoded wrapped in double quotes. We need to trim - // these before converting the hex payload. - tID, err := TraceIDFromHex(string(traceID[1 : len(traceID)-1])) - if err != nil { - return err - } - *t = tID - return nil -} diff --git a/vendor/github.com/openzipkin/zipkin-go/noop.go b/vendor/github.com/openzipkin/zipkin-go/noop.go deleted file mode 100644 index b6ed424dab..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/noop.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "time" - - "github.com/openzipkin/zipkin-go/model" -) - -type noopSpan struct { - model.SpanContext -} - -func (n *noopSpan) Context() model.SpanContext { return n.SpanContext } - -func (n *noopSpan) SetName(string) {} - -func (*noopSpan) SetRemoteEndpoint(*model.Endpoint) {} - -func (*noopSpan) Annotate(time.Time, string) {} - -func (*noopSpan) Tag(string, string) {} - -func (*noopSpan) Finish() {} - -func (*noopSpan) FinishedWithDuration(_ time.Duration) {} - -func (*noopSpan) Flush() {} - -// IsNoop tells whether the span is noop or not. Usually used to avoid resource misusage -// when customizing a span as data won't be recorded -func IsNoop(s Span) bool { - _, ok := s.(*noopSpan) - return ok -} diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/doc.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/doc.go deleted file mode 100644 index 0b4f9b5bd8..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 implements serialization and deserialization logic for Zipkin -B3 Headers. -*/ -package b3 diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/grpc.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/grpc.go deleted file mode 100644 index e6761d3147..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/grpc.go +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 - -import ( - "google.golang.org/grpc/metadata" - - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/propagation" -) - -// ExtractGRPC will extract a span.Context from the gRPC Request metadata if -// found in B3 header format. -func ExtractGRPC(md *metadata.MD) propagation.Extractor { - return func() (*model.SpanContext, error) { - var ( - traceIDHeader = GetGRPCHeader(md, TraceID) - spanIDHeader = GetGRPCHeader(md, SpanID) - parentSpanIDHeader = GetGRPCHeader(md, ParentSpanID) - sampledHeader = GetGRPCHeader(md, Sampled) - flagsHeader = GetGRPCHeader(md, Flags) - ) - - return ParseHeaders( - traceIDHeader, spanIDHeader, parentSpanIDHeader, sampledHeader, - flagsHeader, - ) - } -} - -// InjectGRPC will inject a span.Context into gRPC metadata. -func InjectGRPC(md *metadata.MD) propagation.Injector { - return func(sc model.SpanContext) error { - if (model.SpanContext{}) == sc { - return ErrEmptyContext - } - - if sc.Debug { - setGRPCHeader(md, Flags, "1") - } else if sc.Sampled != nil { - // Debug is encoded as X-B3-Flags: 1. Since Debug implies Sampled, - // we don't send "X-B3-Sampled" if Debug is set. - if *sc.Sampled { - setGRPCHeader(md, Sampled, "1") - } else { - setGRPCHeader(md, Sampled, "0") - } - } - - if !sc.TraceID.Empty() && sc.ID > 0 { - // set identifiers - setGRPCHeader(md, TraceID, sc.TraceID.String()) - setGRPCHeader(md, SpanID, sc.ID.String()) - if sc.ParentID != nil { - setGRPCHeader(md, ParentSpanID, sc.ParentID.String()) - } - } - - return nil - } -} - -// GetGRPCHeader retrieves the last value found for a particular key. If key is -// not found it returns an empty string. -func GetGRPCHeader(md *metadata.MD, key string) string { - v := (*md)[key] - if len(v) < 1 { - return "" - } - return v[len(v)-1] -} - -func setGRPCHeader(md *metadata.MD, key, value string) { - (*md)[key] = append((*md)[key], value) -} diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/http.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/http.go deleted file mode 100644 index ac0e28dfa7..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/http.go +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 - -import ( - "net/http" - - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/propagation" -) - -// InjectOption provides functional option handler type. -type InjectOption func(opts *InjectOptions) - -// InjectOptions provides the available functional options. -type InjectOptions struct { - shouldInjectSingleHeader bool - shouldInjectMultiHeader bool -} - -// WithSingleAndMultiHeader allows to include both single and multiple -// headers in the context injection -func WithSingleAndMultiHeader() InjectOption { - return func(opts *InjectOptions) { - opts.shouldInjectSingleHeader = true - opts.shouldInjectMultiHeader = true - } -} - -// WithSingleHeaderOnly allows to include only single header in the context -// injection -func WithSingleHeaderOnly() InjectOption { - return func(opts *InjectOptions) { - opts.shouldInjectSingleHeader = true - opts.shouldInjectMultiHeader = false - } -} - -// ExtractHTTP will extract a span.Context from the HTTP Request if found in -// B3 header format. -func ExtractHTTP(r *http.Request) propagation.Extractor { - return func() (*model.SpanContext, error) { - var ( - traceIDHeader = r.Header.Get(TraceID) - spanIDHeader = r.Header.Get(SpanID) - parentSpanIDHeader = r.Header.Get(ParentSpanID) - sampledHeader = r.Header.Get(Sampled) - flagsHeader = r.Header.Get(Flags) - singleHeader = r.Header.Get(Context) - ) - - var ( - sc *model.SpanContext - sErr error - mErr error - ) - if singleHeader != "" { - sc, sErr = ParseSingleHeader(singleHeader) - if sErr == nil { - return sc, nil - } - } - - sc, mErr = ParseHeaders( - traceIDHeader, spanIDHeader, parentSpanIDHeader, - sampledHeader, flagsHeader, - ) - - if mErr != nil && sErr != nil { - return nil, sErr - } - - return sc, mErr - } -} - -// InjectHTTP will inject a span.Context into a HTTP Request -func InjectHTTP(r *http.Request, opts ...InjectOption) propagation.Injector { - options := InjectOptions{shouldInjectMultiHeader: true} - for _, opt := range opts { - opt(&options) - } - - return func(sc model.SpanContext) error { - if (model.SpanContext{}) == sc { - return ErrEmptyContext - } - - if options.shouldInjectMultiHeader { - if sc.Debug { - r.Header.Set(Flags, "1") - } else if sc.Sampled != nil { - // Debug is encoded as X-B3-Flags: 1. Since Debug implies Sampled, - // so don't also send "X-B3-Sampled: 1". - if *sc.Sampled { - r.Header.Set(Sampled, "1") - } else { - r.Header.Set(Sampled, "0") - } - } - - if !sc.TraceID.Empty() && sc.ID > 0 { - r.Header.Set(TraceID, sc.TraceID.String()) - r.Header.Set(SpanID, sc.ID.String()) - if sc.ParentID != nil { - r.Header.Set(ParentSpanID, sc.ParentID.String()) - } - } - } - - if options.shouldInjectSingleHeader { - r.Header.Set(Context, BuildSingleHeader(sc)) - } - - return nil - } -} diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/map.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/map.go deleted file mode 100644 index e166ee2702..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/map.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 - -import ( - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/propagation" -) - -// Map allows serialization and deserialization of SpanContext into a standard Go map. -type Map map[string]string - -// Extract implements Extractor -func (m *Map) Extract() (*model.SpanContext, error) { - var ( - traceIDHeader = (*m)[TraceID] - spanIDHeader = (*m)[SpanID] - parentSpanIDHeader = (*m)[ParentSpanID] - sampledHeader = (*m)[Sampled] - flagsHeader = (*m)[Flags] - singleHeader = (*m)[Context] - ) - - var ( - sc *model.SpanContext - sErr error - mErr error - ) - if singleHeader != "" { - sc, sErr = ParseSingleHeader(singleHeader) - if sErr == nil { - return sc, nil - } - } - - sc, mErr = ParseHeaders( - traceIDHeader, spanIDHeader, parentSpanIDHeader, - sampledHeader, flagsHeader, - ) - - if mErr != nil && sErr != nil { - return nil, sErr - } - - return sc, mErr - -} - -// Inject implements Injector -func (m *Map) Inject(opts ...InjectOption) propagation.Injector { - options := InjectOptions{shouldInjectMultiHeader: true} - for _, opt := range opts { - opt(&options) - } - - return func(sc model.SpanContext) error { - if (model.SpanContext{}) == sc { - return ErrEmptyContext - } - - if options.shouldInjectMultiHeader { - if sc.Debug { - (*m)[Flags] = "1" - } else if sc.Sampled != nil { - // Debug is encoded as X-B3-Flags: 1. Since Debug implies Sampled, - // so don't also send "X-B3-Sampled: 1". - if *sc.Sampled { - (*m)[Sampled] = "1" - } else { - (*m)[Sampled] = "0" - } - } - - if !sc.TraceID.Empty() && sc.ID > 0 { - (*m)[TraceID] = sc.TraceID.String() - (*m)[SpanID] = sc.ID.String() - if sc.ParentID != nil { - (*m)[ParentSpanID] = sc.ParentID.String() - } - } - } - - if options.shouldInjectSingleHeader { - (*m)[Context] = BuildSingleHeader(sc) - } - - return nil - } -} diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/shared.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/shared.go deleted file mode 100644 index a01a1cfe97..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/shared.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 - -import "errors" - -// Common Header Extraction / Injection errors -var ( - ErrInvalidSampledByte = errors.New("invalid B3 Sampled found") - ErrInvalidSampledHeader = errors.New("invalid B3 Sampled header found") - ErrInvalidFlagsHeader = errors.New("invalid B3 Flags header found") - ErrInvalidTraceIDHeader = errors.New("invalid B3 TraceID header found") - ErrInvalidSpanIDHeader = errors.New("invalid B3 SpanID header found") - ErrInvalidParentSpanIDHeader = errors.New("invalid B3 ParentSpanID header found") - ErrInvalidScope = errors.New("require either both TraceID and SpanID or none") - ErrInvalidScopeParent = errors.New("ParentSpanID requires both TraceID and SpanID to be available") - ErrInvalidScopeParentSingle = errors.New("ParentSpanID requires TraceID, SpanID and Sampled to be available") - ErrEmptyContext = errors.New("empty request context") - ErrInvalidTraceIDValue = errors.New("invalid B3 TraceID value found") - ErrInvalidSpanIDValue = errors.New("invalid B3 SpanID value found") - ErrInvalidParentSpanIDValue = errors.New("invalid B3 ParentSpanID value found") -) - -// Default B3 Header keys -const ( - TraceID = "x-b3-traceid" - SpanID = "x-b3-spanid" - ParentSpanID = "x-b3-parentspanid" - Sampled = "x-b3-sampled" - Flags = "x-b3-flags" - Context = "b3" -) diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/spancontext.go b/vendor/github.com/openzipkin/zipkin-go/propagation/b3/spancontext.go deleted file mode 100644 index e2af9d4c97..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/b3/spancontext.go +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 b3 - -import ( - "strconv" - "strings" - - "github.com/openzipkin/zipkin-go/model" -) - -// ParseHeaders takes values found from B3 Headers and tries to reconstruct a -// SpanContext. -func ParseHeaders( - hdrTraceID, hdrSpanID, hdrParentSpanID, hdrSampled, hdrFlags string, -) (*model.SpanContext, error) { - var ( - err error - spanID uint64 - requiredCount int - sc = &model.SpanContext{} - ) - - // correct values for an existing sampled header are "0" and "1". - // For legacy support and being lenient to other tracing implementations we - // allow "true" and "false" as inputs for interop purposes. - switch strings.ToLower(hdrSampled) { - case "0", "false": - sampled := false - sc.Sampled = &sampled - case "1", "true": - sampled := true - sc.Sampled = &sampled - case "": - // sc.Sampled = nil - default: - return nil, ErrInvalidSampledHeader - } - - // The only accepted value for Flags is "1". This will set Debug to true. All - // other values and omission of header will be ignored. - if hdrFlags == "1" { - sc.Debug = true - sc.Sampled = nil - } - - if hdrTraceID != "" { - requiredCount++ - if sc.TraceID, err = model.TraceIDFromHex(hdrTraceID); err != nil { - return nil, ErrInvalidTraceIDHeader - } - } - - if hdrSpanID != "" { - requiredCount++ - if spanID, err = strconv.ParseUint(hdrSpanID, 16, 64); err != nil { - return nil, ErrInvalidSpanIDHeader - } - sc.ID = model.ID(spanID) - } - - if requiredCount != 0 && requiredCount != 2 { - return nil, ErrInvalidScope - } - - if hdrParentSpanID != "" { - if requiredCount == 0 { - return nil, ErrInvalidScopeParent - } - if spanID, err = strconv.ParseUint(hdrParentSpanID, 16, 64); err != nil { - return nil, ErrInvalidParentSpanIDHeader - } - parentSpanID := model.ID(spanID) - sc.ParentID = &parentSpanID - } - - return sc, nil -} - -// ParseSingleHeader takes values found from B3 Single Header and tries to reconstruct a -// SpanContext. -func ParseSingleHeader(contextHeader string) (*model.SpanContext, error) { - if contextHeader == "" { - return nil, ErrEmptyContext - } - - var ( - sc = model.SpanContext{} - sampling string - ) - - headerLen := len(contextHeader) - - if headerLen == 1 { - sampling = contextHeader - } else if headerLen == 16 || headerLen == 32 { - return nil, ErrInvalidScope - } else if headerLen >= 16+16+1 { - var high, low uint64 - pos := 0 - if string(contextHeader[16]) != "-" { - // traceID must be 128 bits - var err error - high, err = strconv.ParseUint(contextHeader[0:16], 16, 64) - if err != nil { - return nil, ErrInvalidTraceIDValue - } - pos = 16 - } - - low, err := strconv.ParseUint(contextHeader[pos:pos+16], 16, 64) - if err != nil { - return nil, ErrInvalidTraceIDValue - } - - sc.TraceID = model.TraceID{High: high, Low: low} - - rawID, err := strconv.ParseUint(contextHeader[pos+16+1:pos+16+1+16], 16, 64) - if err != nil { - return nil, ErrInvalidSpanIDValue - } - - sc.ID = model.ID(rawID) - - if headerLen > pos+16+1+16 { - if headerLen == pos+16+1+16+1 { - return nil, ErrInvalidSampledByte - } - - if headerLen == pos+16+1+16+1+1 { - sampling = string(contextHeader[pos+16+1+16+1]) - } else if headerLen == pos+16+1+16+1+16 { - return nil, ErrInvalidScopeParentSingle - } else if headerLen == pos+16+1+16+1+1+1+16 { - sampling = string(contextHeader[pos+16+1+16+1]) - - var rawParentID uint64 - rawParentID, err = strconv.ParseUint(contextHeader[pos+16+1+16+1+1+1:], 16, 64) - if err != nil { - return nil, ErrInvalidParentSpanIDValue - } - - parentID := model.ID(rawParentID) - sc.ParentID = &parentID - } else { - return nil, ErrInvalidParentSpanIDValue - } - } - } else { - return nil, ErrInvalidTraceIDValue - } - switch sampling { - case "d": - sc.Debug = true - case "1": - trueVal := true - sc.Sampled = &trueVal - case "0": - falseVal := false - sc.Sampled = &falseVal - case "": - default: - return nil, ErrInvalidSampledByte - } - - return &sc, nil -} - -// BuildSingleHeader takes the values from the SpanContext and builds the B3 header -func BuildSingleHeader(sc model.SpanContext) string { - var header []string - if !sc.TraceID.Empty() && sc.ID > 0 { - header = append(header, sc.TraceID.String(), sc.ID.String()) - } - - if sc.Debug { - header = append(header, "d") - } else if sc.Sampled != nil { - if *sc.Sampled { - header = append(header, "1") - } else { - header = append(header, "0") - } - } - - if sc.ParentID != nil { - header = append(header, sc.ParentID.String()) - } - - return strings.Join(header, "-") -} diff --git a/vendor/github.com/openzipkin/zipkin-go/propagation/propagation.go b/vendor/github.com/openzipkin/zipkin-go/propagation/propagation.go deleted file mode 100644 index c76d91d8eb..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/propagation/propagation.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 propagation holds the required function signatures for Injection and -Extraction as used by the Zipkin Tracer. - -Subpackages of this package contain officially supported standard propagation -implementations. -*/ -package propagation - -import "github.com/openzipkin/zipkin-go/model" - -// Extractor function signature -type Extractor func() (*model.SpanContext, error) - -// Injector function signature -type Injector func(model.SpanContext) error diff --git a/vendor/github.com/openzipkin/zipkin-go/reporter/http/http.go b/vendor/github.com/openzipkin/zipkin-go/reporter/http/http.go deleted file mode 100644 index 25d84c8594..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/reporter/http/http.go +++ /dev/null @@ -1,275 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 http implements a HTTP reporter to send spans to Zipkin V2 collectors. -*/ -package http - -import ( - "bytes" - "context" - "log" - "net/http" - "os" - "sync" - "time" - - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/reporter" -) - -// defaults -const ( - defaultTimeout = 5 * time.Second // timeout for http request in seconds - defaultBatchInterval = 1 * time.Second // BatchInterval in seconds - defaultBatchSize = 100 - defaultMaxBacklog = 1000 -) - -// HTTPDoer will do a request to the Zipkin HTTP Collector -type HTTPDoer interface { // nolint: revive // keep as is, we don't want to break dependendants - Do(req *http.Request) (*http.Response, error) -} - -// httpReporter will send spans to a Zipkin HTTP Collector using Zipkin V2 API. -type httpReporter struct { - url string - client HTTPDoer - logger *log.Logger - batchInterval time.Duration - batchSize int - maxBacklog int - batchMtx *sync.Mutex - batch []*model.SpanModel - spanC chan *model.SpanModel - sendC chan struct{} - quit chan struct{} - shutdown chan error - reqCallback RequestCallbackFn - reqTimeout time.Duration - serializer reporter.SpanSerializer -} - -// Send implements reporter -func (r *httpReporter) Send(s model.SpanModel) { - r.spanC <- &s -} - -// Close implements reporter -func (r *httpReporter) Close() error { - close(r.quit) - return <-r.shutdown -} - -func (r *httpReporter) loop() { - var ( - nextSend = time.Now().Add(r.batchInterval) - ticker = time.NewTicker(r.batchInterval / 10) - tickerChan = ticker.C - ) - defer ticker.Stop() - - for { - select { - case span := <-r.spanC: - currentBatchSize := r.append(span) - if currentBatchSize >= r.batchSize { - nextSend = time.Now().Add(r.batchInterval) - r.enqueueSend() - } - case <-tickerChan: - if time.Now().After(nextSend) { - nextSend = time.Now().Add(r.batchInterval) - r.enqueueSend() - } - case <-r.quit: - close(r.sendC) - return - } - } -} - -func (r *httpReporter) sendLoop() { - for range r.sendC { - _ = r.sendBatch() - } - r.shutdown <- r.sendBatch() -} - -func (r *httpReporter) enqueueSend() { - select { - case r.sendC <- struct{}{}: - default: - // Do nothing if there's a pending send request already - } -} - -func (r *httpReporter) append(span *model.SpanModel) (newBatchSize int) { - r.batchMtx.Lock() - - r.batch = append(r.batch, span) - if len(r.batch) > r.maxBacklog { - dispose := len(r.batch) - r.maxBacklog - r.logger.Printf("backlog too long, disposing %d spans", dispose) - r.batch = r.batch[dispose:] - } - newBatchSize = len(r.batch) - - r.batchMtx.Unlock() - return -} - -func (r *httpReporter) sendBatch() error { - // Select all current spans in the batch to be sent - r.batchMtx.Lock() - sendBatch := r.batch[:] - r.batchMtx.Unlock() - - if len(sendBatch) == 0 { - return nil - } - - body, err := r.serializer.Serialize(sendBatch) - if err != nil { - r.logger.Printf("failed when marshalling the spans batch: %s\n", err.Error()) - return err - } - - req, err := http.NewRequest("POST", r.url, bytes.NewReader(body)) - if err != nil { - r.logger.Printf("failed when creating the request: %s\n", err.Error()) - return err - } - - // By default we send b3:0 header to mitigate trace reporting amplification in - // service mesh environments where the sidecar proxies might trace the call - // we do here towards the Zipkin collector. - req.Header.Set("b3", "0") - - req.Header.Set("Content-Type", r.serializer.ContentType()) - if r.reqCallback != nil { - r.reqCallback(req) - } - - ctx, cancel := context.WithTimeout(req.Context(), r.reqTimeout) - defer cancel() - - resp, err := r.client.Do(req.WithContext(ctx)) - if err != nil { - r.logger.Printf("failed to send the request: %s\n", err.Error()) - return err - } - _ = resp.Body.Close() - if resp.StatusCode < 200 || resp.StatusCode > 299 { - r.logger.Printf("failed the request with status code %d\n", resp.StatusCode) - } - - // Remove sent spans from the batch even if they were not saved - r.batchMtx.Lock() - r.batch = r.batch[len(sendBatch):] - r.batchMtx.Unlock() - - return nil -} - -// RequestCallbackFn receives the initialized request from the Collector before -// sending it over the wire. This allows one to plug in additional headers or -// do other customization. -type RequestCallbackFn func(*http.Request) - -// ReporterOption sets a parameter for the HTTP Reporter -type ReporterOption func(r *httpReporter) - -// Timeout sets maximum timeout for the http request through its context. -func Timeout(duration time.Duration) ReporterOption { - return func(r *httpReporter) { r.reqTimeout = duration } -} - -// BatchSize sets the maximum batch size, after which a collect will be -// triggered. The default batch size is 100 traces. -func BatchSize(n int) ReporterOption { - return func(r *httpReporter) { r.batchSize = n } -} - -// MaxBacklog sets the maximum backlog size. When batch size reaches this -// threshold, spans from the beginning of the batch will be disposed. -func MaxBacklog(n int) ReporterOption { - return func(r *httpReporter) { r.maxBacklog = n } -} - -// BatchInterval sets the maximum duration we will buffer traces before -// emitting them to the collector. The default batch interval is 1 second. -func BatchInterval(d time.Duration) ReporterOption { - return func(r *httpReporter) { r.batchInterval = d } -} - -// Client sets a custom http client to use under the interface HTTPDoer -// which includes a `Do` method with same signature as the *http.Client -func Client(client HTTPDoer) ReporterOption { - return func(r *httpReporter) { r.client = client } -} - -// RequestCallback registers a callback function to adjust the reporter -// *http.Request before it sends the request to Zipkin. -func RequestCallback(rc RequestCallbackFn) ReporterOption { - return func(r *httpReporter) { r.reqCallback = rc } -} - -// Logger sets the logger used to report errors in the collection -// process. -func Logger(l *log.Logger) ReporterOption { - return func(r *httpReporter) { r.logger = l } -} - -// Serializer sets the serialization function to use for sending span data to -// Zipkin. -func Serializer(serializer reporter.SpanSerializer) ReporterOption { - return func(r *httpReporter) { - if serializer != nil { - r.serializer = serializer - } - } -} - -// NewReporter returns a new HTTP Reporter. -// url should be the endpoint to send the spans to, e.g. -// http://localhost:9411/api/v2/spans -func NewReporter(url string, opts ...ReporterOption) reporter.Reporter { - r := httpReporter{ - url: url, - logger: log.New(os.Stderr, "", log.LstdFlags), - client: &http.Client{}, - batchInterval: defaultBatchInterval, - batchSize: defaultBatchSize, - maxBacklog: defaultMaxBacklog, - batch: []*model.SpanModel{}, - spanC: make(chan *model.SpanModel), - sendC: make(chan struct{}, 1), - quit: make(chan struct{}, 1), - shutdown: make(chan error, 1), - batchMtx: &sync.Mutex{}, - serializer: reporter.JSONSerializer{}, - reqTimeout: defaultTimeout, - } - - for _, opt := range opts { - opt(&r) - } - - go r.loop() - go r.sendLoop() - - return &r -} diff --git a/vendor/github.com/openzipkin/zipkin-go/reporter/reporter.go b/vendor/github.com/openzipkin/zipkin-go/reporter/reporter.go deleted file mode 100644 index 9ef8872f2c..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/reporter/reporter.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 reporter holds the Reporter interface which is used by the Zipkin -Tracer to send finished spans. - -Subpackages of package reporter contain officially supported standard -reporter implementations. -*/ -package reporter - -import "github.com/openzipkin/zipkin-go/model" - -// Reporter interface can be used to provide the Zipkin Tracer with custom -// implementations to publish Zipkin Span data. -type Reporter interface { - Send(model.SpanModel) // Send Span data to the reporter - Close() error // Close the reporter -} - -type noopReporter struct{} - -func (r *noopReporter) Send(model.SpanModel) {} -func (r *noopReporter) Close() error { return nil } - -// NewNoopReporter returns a no-op Reporter implementation. -func NewNoopReporter() Reporter { - return &noopReporter{} -} diff --git a/vendor/github.com/openzipkin/zipkin-go/reporter/serializer.go b/vendor/github.com/openzipkin/zipkin-go/reporter/serializer.go deleted file mode 100644 index 6dce2de1b3..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/reporter/serializer.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 reporter - -import ( - "encoding/json" - - "github.com/openzipkin/zipkin-go/model" -) - -// SpanSerializer describes the methods needed for allowing to set Span encoding -// type for the various Zipkin transports. -type SpanSerializer interface { - Serialize([]*model.SpanModel) ([]byte, error) - ContentType() string -} - -// JSONSerializer implements the default JSON encoding SpanSerializer. -type JSONSerializer struct{} - -// Serialize takes an array of Zipkin SpanModel objects and returns a JSON -// encoding of it. -func (JSONSerializer) Serialize(spans []*model.SpanModel) ([]byte, error) { - return json.Marshal(spans) -} - -// ContentType returns the ContentType needed for this encoding. -func (JSONSerializer) ContentType() string { - return "application/json" -} diff --git a/vendor/github.com/openzipkin/zipkin-go/sample.go b/vendor/github.com/openzipkin/zipkin-go/sample.go deleted file mode 100644 index 7ba2f23210..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/sample.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "fmt" - "math" - "math/rand" - "sync" - "time" -) - -// Sampler functions return if a Zipkin span should be sampled, based on its -// traceID. -type Sampler func(id uint64) bool - -// NeverSample will always return false. If used by a service it will not allow -// the service to start traces but will still allow the service to participate -// in traces started upstream. -func NeverSample(_ uint64) bool { return false } - -// AlwaysSample will always return true. If used by a service it will always start -// traces if no upstream trace has been propagated. If an incoming upstream trace -// is not sampled the service will adhere to this and only propagate the context. -func AlwaysSample(_ uint64) bool { return true } - -// NewModuloSampler provides a generic type Sampler. -func NewModuloSampler(mod uint64) Sampler { - if mod < 2 { - return AlwaysSample - } - return func(id uint64) bool { - return (id % mod) == 0 - } -} - -// NewBoundarySampler is appropriate for high-traffic instrumentation who -// provision random trace ids, and make the sampling decision only once. -// It defends against nodes in the cluster selecting exactly the same ids. -func NewBoundarySampler(rate float64, salt int64) (Sampler, error) { - if rate == 0.0 { - return NeverSample, nil - } - if rate == 1.0 { - return AlwaysSample, nil - } - if rate < 0.0001 || rate > 1 { - return nil, fmt.Errorf("rate should be 0.0 or between 0.0001 and 1: was %f", rate) - } - - var ( - boundary = int64(rate * 10000) - usalt = uint64(salt) - ) - return func(id uint64) bool { - return int64(math.Abs(float64(id^usalt)))%10000 < boundary - }, nil -} - -// NewCountingSampler is appropriate for low-traffic instrumentation or -// those who do not provision random trace ids. It is not appropriate for -// collectors as the sampling decision isn't idempotent (consistent based -// on trace id). -func NewCountingSampler(rate float64) (Sampler, error) { - if rate == 0.0 { - return NeverSample, nil - } - if rate == 1.0 { - return AlwaysSample, nil - } - if rate < 0.01 || rate > 1 { - return nil, fmt.Errorf("rate should be 0.0 or between 0.01 and 1: was %f", rate) - } - var ( - i = 0 - outOf100 = int(rate*100 + math.Copysign(0.5, rate*100)) // for rounding float to int conversion instead of truncation - decisions = randomBitSet(100, outOf100, rand.New(rand.NewSource(time.Now().UnixNano()))) - mtx = &sync.Mutex{} - ) - - return func(_ uint64) bool { - mtx.Lock() - result := decisions[i] - i++ - if i == 100 { - i = 0 - } - mtx.Unlock() - return result - }, nil -} - -/** - * Reservoir sampling algorithm borrowed from Stack Overflow. - * - * http://stackoverflow.com/questions/12817946/generate-a-random-bitset-with-n-1s - */ -func randomBitSet(size int, cardinality int, rnd *rand.Rand) []bool { - result := make([]bool, size) - chosen := make([]int, cardinality) - var i int - for i = 0; i < cardinality; i++ { - chosen[i] = i - result[i] = true - } - for ; i < size; i++ { - j := rnd.Intn(i + 1) - if j < cardinality { - result[chosen[j]] = false - result[i] = true - chosen[j] = i - } - } - return result -} diff --git a/vendor/github.com/openzipkin/zipkin-go/span.go b/vendor/github.com/openzipkin/zipkin-go/span.go deleted file mode 100644 index 4f9322d989..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/span.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "time" - - "github.com/openzipkin/zipkin-go/model" -) - -// Span interface as returned by Tracer.StartSpan() -type Span interface { - // Context returns the Span's SpanContext. - Context() model.SpanContext - - // SetName updates the Span's name. - SetName(string) - - // SetRemoteEndpoint updates the Span's Remote Endpoint. - SetRemoteEndpoint(*model.Endpoint) - - // Annotate adds a timed event to the Span. - Annotate(time.Time, string) - - // Tag sets Tag with given key and value to the Span. If key already exists in - // the Span the value will be overridden except for error tags where the first - // value is persisted. - Tag(string, string) - - // Finish the Span and send to Reporter. If DelaySend option was used at - // Span creation time, Finish will not send the Span to the Reporter. It then - // becomes the user's responsibility to get the Span reported (by using - // span.Flush). - Finish() - - // Finish the Span with duration and send to Reporter. If DelaySend option was used at - // Span creation time, FinishedWithDuration will not send the Span to the Reporter. It then - // becomes the user's responsibility to get the Span reported (by using - // span.Flush). - FinishedWithDuration(duration time.Duration) - - // Flush the Span to the Reporter (regardless of being finished or not). - // This can be used if the DelaySend SpanOption was set or when dealing with - // one-way RPC tracing where duration might not be measured. - Flush() -} diff --git a/vendor/github.com/openzipkin/zipkin-go/span_implementation.go b/vendor/github.com/openzipkin/zipkin-go/span_implementation.go deleted file mode 100644 index 5b9c692316..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/span_implementation.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "sync" - "sync/atomic" - "time" - - "github.com/openzipkin/zipkin-go/model" -) - -type spanImpl struct { - mtx sync.RWMutex - model.SpanModel - tracer *Tracer - mustCollect int32 // used as atomic bool (1 = true, 0 = false) - flushOnFinish bool -} - -func (s *spanImpl) Context() model.SpanContext { - return s.SpanContext -} - -func (s *spanImpl) SetName(name string) { - s.mtx.Lock() - s.Name = name - s.mtx.Unlock() -} - -func (s *spanImpl) SetRemoteEndpoint(e *model.Endpoint) { - s.mtx.Lock() - if e == nil { - s.RemoteEndpoint = nil - } else { - s.RemoteEndpoint = &model.Endpoint{} - *s.RemoteEndpoint = *e - } - s.mtx.Unlock() -} - -func (s *spanImpl) Annotate(t time.Time, value string) { - a := model.Annotation{ - Timestamp: t, - Value: value, - } - - s.mtx.Lock() - s.Annotations = append(s.Annotations, a) - s.mtx.Unlock() -} - -func (s *spanImpl) Tag(key, value string) { - s.mtx.Lock() - - if key == string(TagError) { - if _, found := s.Tags[key]; found { - s.mtx.Unlock() - return - } - } - - s.Tags[key] = value - s.mtx.Unlock() -} - -func (s *spanImpl) Finish() { - if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) { - s.Duration = time.Since(s.Timestamp) - if s.flushOnFinish { - s.mtx.RLock() - s.tracer.reporter.Send(s.SpanModel) - s.mtx.RUnlock() - } - } -} - -func (s *spanImpl) FinishedWithDuration(d time.Duration) { - if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) { - s.Duration = d - if s.flushOnFinish { - s.mtx.RLock() - s.tracer.reporter.Send(s.SpanModel) - s.mtx.RUnlock() - } - } -} - -func (s *spanImpl) Flush() { - if s.SpanModel.Debug || (s.SpanModel.Sampled != nil && *s.SpanModel.Sampled) { - s.mtx.RLock() - s.tracer.reporter.Send(s.SpanModel) - s.mtx.RUnlock() - } -} diff --git a/vendor/github.com/openzipkin/zipkin-go/span_options.go b/vendor/github.com/openzipkin/zipkin-go/span_options.go deleted file mode 100644 index ad9f5c29fc..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/span_options.go +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "time" - - "github.com/openzipkin/zipkin-go/model" -) - -// SpanOption allows for functional options to adjust behavior and payload of -// the Span to be created with tracer.StartSpan(). -type SpanOption func(t *Tracer, s *spanImpl) - -// Kind sets the kind of the span being created. -func Kind(kind model.Kind) SpanOption { - return func(_ *Tracer, s *spanImpl) { - s.Kind = kind - } -} - -// Parent will use provided SpanContext as parent to the span being created. -func Parent(sc model.SpanContext) SpanOption { - return func(t *Tracer, s *spanImpl) { - if sc.Err != nil { - // encountered an extraction error - switch t.extractFailurePolicy { - case ExtractFailurePolicyRestart: - case ExtractFailurePolicyError: - panic(s.SpanContext.Err) - case ExtractFailurePolicyTagAndRestart: - s.Tags["error.extract"] = sc.Err.Error() - default: - panic(ErrInvalidExtractFailurePolicy) - } - /* don't use provided SpanContext, but restart trace */ - return - } - s.SpanContext = sc - } -} - -// StartTime uses a given start time for the span being created. -func StartTime(start time.Time) SpanOption { - return func(_ *Tracer, s *spanImpl) { - s.Timestamp = start - } -} - -// RemoteEndpoint sets the remote endpoint of the span being created. -func RemoteEndpoint(e *model.Endpoint) SpanOption { - return func(_ *Tracer, s *spanImpl) { - s.RemoteEndpoint = e - } -} - -// Tags sets initial tags for the span being created. If default tracer tags -// are present they will be overwritten on key collisions. -func Tags(tags map[string]string) SpanOption { - return func(_ *Tracer, s *spanImpl) { - for k, v := range tags { - s.Tags[k] = v - } - } -} - -// FlushOnFinish when set to false will disable span.Finish() to send the Span -// to the Reporter automatically (which is the default behavior). If set to -// false, having the Span be reported becomes the responsibility of the user. -// This is available if late tag data is expected to be only available after the -// required finish time of the Span. -func FlushOnFinish(b bool) SpanOption { - return func(_ *Tracer, s *spanImpl) { - s.flushOnFinish = b - } -} diff --git a/vendor/github.com/openzipkin/zipkin-go/tags.go b/vendor/github.com/openzipkin/zipkin-go/tags.go deleted file mode 100644 index 0d99273172..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/tags.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -// Tag holds available types -type Tag string - -// Common Tag values -const ( - TagHTTPMethod Tag = "http.method" - TagHTTPPath Tag = "http.path" - TagHTTPUrl Tag = "http.url" - TagHTTPRoute Tag = "http.route" - TagHTTPStatusCode Tag = "http.status_code" - TagHTTPRequestSize Tag = "http.request.size" - TagHTTPResponseSize Tag = "http.response.size" - TagGRPCStatusCode Tag = "grpc.status_code" - TagSQLQuery Tag = "sql.query" - TagError Tag = "error" -) - -// Set a standard Tag with a payload on provided Span. -func (t Tag) Set(s Span, value string) { - s.Tag(string(t), value) -} diff --git a/vendor/github.com/openzipkin/zipkin-go/tracer.go b/vendor/github.com/openzipkin/zipkin-go/tracer.go deleted file mode 100644 index d1c20d0f5f..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/tracer.go +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "context" - "sync/atomic" - "time" - - "github.com/openzipkin/zipkin-go/idgenerator" - "github.com/openzipkin/zipkin-go/model" - "github.com/openzipkin/zipkin-go/propagation" - "github.com/openzipkin/zipkin-go/reporter" -) - -// Tracer is our Zipkin tracer implementation. It should be initialized using -// the NewTracer method. -type Tracer struct { - defaultTags map[string]string - extractFailurePolicy ExtractFailurePolicy - sampler Sampler - generate idgenerator.IDGenerator - reporter reporter.Reporter - localEndpoint *model.Endpoint - noop int32 // used as atomic bool (1 = true, 0 = false) - sharedSpans bool - unsampledNoop bool -} - -// NewTracer returns a new Zipkin Tracer. -func NewTracer(rep reporter.Reporter, opts ...TracerOption) (*Tracer, error) { - // set default tracer options - t := &Tracer{ - defaultTags: make(map[string]string), - extractFailurePolicy: ExtractFailurePolicyRestart, - sampler: AlwaysSample, - generate: idgenerator.NewRandom64(), - reporter: rep, - localEndpoint: nil, - noop: 0, - sharedSpans: true, - unsampledNoop: false, - } - - // if no reporter was provided we default to noop implementation. - if t.reporter == nil { - t.reporter = reporter.NewNoopReporter() - t.noop = 1 - } - - // process functional options - for _, opt := range opts { - if err := opt(t); err != nil { - return nil, err - } - } - - return t, nil -} - -// StartSpanFromContext creates and starts a span using the span found in -// context as parent. If no parent span is found a root span is created. -func (t *Tracer) StartSpanFromContext(ctx context.Context, name string, options ...SpanOption) (Span, context.Context) { - if parentSpan := SpanFromContext(ctx); parentSpan != nil { - options = append(options, Parent(parentSpan.Context())) - } - span := t.StartSpan(name, options...) - return span, NewContext(ctx, span) -} - -// StartSpan creates and starts a span. -func (t *Tracer) StartSpan(name string, options ...SpanOption) Span { - if atomic.LoadInt32(&t.noop) == 1 { - // even though we're going to return a noopSpan, we need to initialize - // a spanImpl to fetch the parent context that might be provided as a - // SpanOption - s := &spanImpl{ - SpanModel: model.SpanModel{ - Tags: make(map[string]string), - }, - } - for _, option := range options { - option(t, s) - } - // return noopSpan with the extracted SpanContext from spanImpl. - return &noopSpan{SpanContext: s.SpanContext} - } - - s := &spanImpl{ - SpanModel: model.SpanModel{ - Kind: model.Undetermined, - Name: name, - LocalEndpoint: t.localEndpoint, - Annotations: make([]model.Annotation, 0), - Tags: make(map[string]string), - }, - flushOnFinish: true, - tracer: t, - } - - // add default tracer tags to span - for k, v := range t.defaultTags { - s.Tag(k, v) - } - - // handle provided functional options - for _, option := range options { - option(t, s) - } - - if s.TraceID.Empty() { - // create root span - s.SpanContext.TraceID = t.generate.TraceID() - s.SpanContext.ID = t.generate.SpanID(s.SpanContext.TraceID) - } else { - // valid parent context found - if t.sharedSpans && s.Kind == model.Server { - // join span - s.Shared = true - } else { - // regular child span - parentID := s.SpanContext.ID - s.SpanContext.ParentID = &parentID - s.SpanContext.ID = t.generate.SpanID(model.TraceID{}) - } - } - - if !s.SpanContext.Debug && s.Sampled == nil { - // deferred sampled context found, invoke sampler - sampled := t.sampler(s.SpanContext.TraceID.Low) - s.SpanContext.Sampled = &sampled - if sampled { - s.mustCollect = 1 - } - } else { - if s.SpanContext.Debug || *s.Sampled { - s.mustCollect = 1 - } - } - - if t.unsampledNoop && s.mustCollect == 0 { - // trace not being sampled and noop requested - return &noopSpan{ - SpanContext: s.SpanContext, - } - } - - // add start time - if s.Timestamp.IsZero() { - s.Timestamp = time.Now() - } - - return s -} - -// Extract extracts a SpanContext using the provided Extractor function. -func (t *Tracer) Extract(extractor propagation.Extractor) (sc model.SpanContext) { - if atomic.LoadInt32(&t.noop) == 1 { - return - } - psc, err := extractor() - if psc != nil { - sc = *psc - } - sc.Err = err - return -} - -// SetNoop allows for killswitch behavior. If set to true the tracer will return -// noopSpans and all data is dropped. This allows operators to stop tracing in -// risk scenarios. Set back to false to resume tracing. -func (t *Tracer) SetNoop(noop bool) { - if noop { - atomic.CompareAndSwapInt32(&t.noop, 0, 1) - } else { - atomic.CompareAndSwapInt32(&t.noop, 1, 0) - } -} - -// LocalEndpoint returns a copy of the currently set local endpoint of the -// tracer instance. -func (t *Tracer) LocalEndpoint() *model.Endpoint { - if t.localEndpoint == nil { - return nil - } - ep := *t.localEndpoint - return &ep -} diff --git a/vendor/github.com/openzipkin/zipkin-go/tracer_options.go b/vendor/github.com/openzipkin/zipkin-go/tracer_options.go deleted file mode 100644 index 4a7eef931f..0000000000 --- a/vendor/github.com/openzipkin/zipkin-go/tracer_options.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2022 The OpenZipkin 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 zipkin - -import ( - "errors" - - "github.com/openzipkin/zipkin-go/idgenerator" - "github.com/openzipkin/zipkin-go/model" -) - -// Tracer Option Errors -var ( - ErrInvalidEndpoint = errors.New("requires valid local endpoint") - ErrInvalidExtractFailurePolicy = errors.New("invalid extract failure policy provided") -) - -// ExtractFailurePolicy deals with Extraction errors -type ExtractFailurePolicy int - -// ExtractFailurePolicyOptions -const ( - ExtractFailurePolicyRestart ExtractFailurePolicy = iota - ExtractFailurePolicyError - ExtractFailurePolicyTagAndRestart -) - -// TracerOption allows for functional options to adjust behavior of the Tracer -// to be created with NewTracer(). -type TracerOption func(o *Tracer) error - -// WithLocalEndpoint sets the local endpoint of the tracer. -func WithLocalEndpoint(e *model.Endpoint) TracerOption { - return func(o *Tracer) error { - if e == nil { - o.localEndpoint = nil - return nil - } - ep := *e - o.localEndpoint = &ep - return nil - } -} - -// WithExtractFailurePolicy allows one to set the ExtractFailurePolicy. -func WithExtractFailurePolicy(p ExtractFailurePolicy) TracerOption { - return func(o *Tracer) error { - if p < 0 || p > ExtractFailurePolicyTagAndRestart { - return ErrInvalidExtractFailurePolicy - } - o.extractFailurePolicy = p - return nil - } -} - -// WithNoopSpan if set to true will switch to a NoopSpan implementation -// if the trace is not sampled. -func WithNoopSpan(unsampledNoop bool) TracerOption { - return func(o *Tracer) error { - o.unsampledNoop = unsampledNoop - return nil - } -} - -// WithSharedSpans allows to place client-side and server-side annotations -// for a RPC call in the same span (Zipkin V1 behavior) or different spans -// (more in line with other tracing solutions). By default this Tracer -// uses shared host spans (so client-side and server-side in the same span). -func WithSharedSpans(val bool) TracerOption { - return func(o *Tracer) error { - o.sharedSpans = val - return nil - } -} - -// WithSampler allows one to set a Sampler function -func WithSampler(sampler Sampler) TracerOption { - return func(o *Tracer) error { - o.sampler = sampler - return nil - } -} - -// WithTraceID128Bit if set to true will instruct the Tracer to start traces -// with 128 bit TraceID's. If set to false the Tracer will start traces with -// 64 bits. -func WithTraceID128Bit(val bool) TracerOption { - return func(o *Tracer) error { - if val { - o.generate = idgenerator.NewRandom128() - } else { - o.generate = idgenerator.NewRandom64() - } - return nil - } -} - -// WithIDGenerator allows one to set a custom ID Generator -func WithIDGenerator(generator idgenerator.IDGenerator) TracerOption { - return func(o *Tracer) error { - o.generate = generator - return nil - } -} - -// WithTags allows one to set default tags to be added to each created span -func WithTags(tags map[string]string) TracerOption { - return func(o *Tracer) error { - for k, v := range tags { - o.defaultTags[k] = v - } - return nil - } -} - -// WithNoopTracer allows one to start the Tracer as Noop implementation. -func WithNoopTracer(tracerNoop bool) TracerOption { - return func(o *Tracer) error { - if tracerNoop { - o.noop = 1 - } else { - o.noop = 0 - } - return nil - } -} diff --git a/vendor/github.com/oschwald/geoip2-golang/.gitignore b/vendor/github.com/oschwald/geoip2-golang/.gitignore deleted file mode 100644 index dca06949ca..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.vscode -*.out -*.test diff --git a/vendor/github.com/oschwald/geoip2-golang/.gitmodules b/vendor/github.com/oschwald/geoip2-golang/.gitmodules deleted file mode 100644 index 400b2ab62c..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "test-data"] - path = test-data - url = https://github.com/maxmind/MaxMind-DB.git diff --git a/vendor/github.com/oschwald/geoip2-golang/.golangci.yml b/vendor/github.com/oschwald/geoip2-golang/.golangci.yml deleted file mode 100644 index eacb7dfed9..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/.golangci.yml +++ /dev/null @@ -1,177 +0,0 @@ -version: "2" -run: - go: "1.24" - tests: true - allow-parallel-runners: true -linters: - default: all - disable: - - cyclop - - depguard - - err113 - - exhaustive - - exhaustruct - - forcetypeassert - - funlen - - gochecknoglobals - - gocognit - - godox - - gosmopolitan - - inamedparam - - interfacebloat - - mnd - - nlreturn - - nonamedreturns - - paralleltest - # Seems to conflict with golines or one of the formatters. - - tagalign - - testpackage - - thelper - - varnamelen - - wrapcheck - - wsl - - wsl_v5 - settings: - errorlint: - errorf: true - asserts: true - comparison: true - exhaustive: - default-signifies-exhaustive: true - forbidigo: - forbid: - - pattern: Geoip - msg: you should use `GeoIP` - - pattern: geoIP - msg: you should use `geoip` - - pattern: Maxmind - msg: you should use `MaxMind` - - pattern: ^maxMind - msg: you should use `maxmind` - - pattern: Minfraud - msg: you should use `MinFraud` - - pattern: ^minFraud - msg: you should use `minfraud` - - pattern: ^math.Max$ - msg: you should use the max built-in instead. - - pattern: ^math.Min$ - msg: you should use the min built-in instead. - - pattern: ^os.IsNotExist - msg: As per their docs, new code should use errors.Is(err, fs.ErrNotExist). - - pattern: ^os.IsExist - msg: As per their docs, new code should use errors.Is(err, fs.ErrExist) - gosec: - excludes: - - G115 - govet: - disable: - - shadow - enable-all: true - lll: - line-length: 120 - tab-width: 4 - misspell: - locale: US - extra-words: - - typo: marshall - correction: marshal - - typo: marshalling - correction: marshaling - - typo: marshalls - correction: marshals - - typo: unmarshall - correction: unmarshal - - typo: unmarshalling - correction: unmarshaling - - typo: unmarshalls - correction: unmarshals - nolintlint: - require-explanation: true - require-specific: true - allow-no-explanation: - - lll - - misspell - allow-unused: false - revive: - severity: warning - enable-all-rules: true - rules: - - name: add-constant - disabled: true - - name: cognitive-complexity - disabled: true - - name: confusing-naming - disabled: true - - name: confusing-results - disabled: true - - name: cyclomatic - disabled: true - - name: deep-exit - disabled: true - - name: flag-parameter - disabled: true - - name: function-length - disabled: true - - name: function-result-limit - disabled: true - - name: line-length-limit - disabled: true - - name: max-public-structs - disabled: true - - name: nested-structs - disabled: true - - name: unchecked-type-assertion - disabled: true - - name: unhandled-error - disabled: true - tagliatelle: - case: - rules: - avro: snake - bson: snake - env: upperSnake - envconfig: upperSnake - json: snake - mapstructure: snake - xml: snake - yaml: snake - unparam: - check-exported: true - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - rules: - - linters: - - govet - - revive - path: _test.go - text: 'fieldalignment:' - paths: - - third_party$ - - builtin$ - - examples$ -formatters: - enable: - - gci - - gofmt - - gofumpt - - goimports - - golines - settings: - gci: - sections: - - standard - - default - - prefix(github.com/oschwald/geoip2-golang) - gofumpt: - extra-rules: true - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ diff --git a/vendor/github.com/oschwald/geoip2-golang/LICENSE b/vendor/github.com/oschwald/geoip2-golang/LICENSE deleted file mode 100644 index 2969677f15..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2015, Gregory J. Oschwald - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/vendor/github.com/oschwald/geoip2-golang/README.md b/vendor/github.com/oschwald/geoip2-golang/README.md deleted file mode 100644 index 72378f066d..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# GeoIP2 Reader for Go # - -[![PkgGoDev](https://pkg.go.dev/badge/github.com/oschwald/geoip2-golang)](https://pkg.go.dev/github.com/oschwald/geoip2-golang) - -This library reads MaxMind [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) -and [GeoIP2](http://www.maxmind.com/en/geolocation_landing) databases. - -This library is built using -[the Go maxminddb reader](https://github.com/oschwald/maxminddb-golang). -All data for the database record is decoded using this library. If you only -need several fields, you may get superior performance by using maxminddb's -`Lookup` directly with a result struct that only contains the required fields. -(See [example_test.go](https://github.com/oschwald/maxminddb-golang/blob/main/example_test.go) -in the maxminddb repository for an example of this.) - -## Installation ## - -``` -go get github.com/oschwald/geoip2-golang -``` - -## Usage ## - -[See GoDoc](http://godoc.org/github.com/oschwald/geoip2-golang) for -documentation and examples. - -## Example ## - -```go -package main - -import ( - "fmt" - "log" - "net" - - "github.com/oschwald/geoip2-golang" -) - -func main() { - db, err := geoip2.Open("GeoIP2-City.mmdb") - if err != nil { - log.Fatal(err) - } - defer db.Close() - // If you are using strings that may be invalid, check that ip is not nil - ip := net.ParseIP("81.2.69.142") - record, err := db.City(ip) - if err != nil { - log.Fatal(err) - } - fmt.Printf("Portuguese (BR) city name: %v\n", record.City.Names["pt-BR"]) - if len(record.Subdivisions) > 0 { - fmt.Printf("English subdivision name: %v\n", record.Subdivisions[0].Names["en"]) - } - fmt.Printf("Russian country name: %v\n", record.Country.Names["ru"]) - fmt.Printf("ISO country code: %v\n", record.Country.IsoCode) - fmt.Printf("Time zone: %v\n", record.Location.TimeZone) - fmt.Printf("Coordinates: %v, %v\n", record.Location.Latitude, record.Location.Longitude) - // Output: - // Portuguese (BR) city name: Londres - // English subdivision name: England - // Russian country name: Великобритания - // ISO country code: GB - // Time zone: Europe/London - // Coordinates: 51.5142, -0.0931 -} - -``` - -## Testing ## - -Make sure you checked out test data submodule: - -``` -git submodule init -git submodule update -``` - -Execute test suite: - -``` -go test -``` - -## Contributing ## - -Contributions welcome! Please fork the repository and open a pull request -with your changes. - -## License ## - -This is free software, licensed under the ISC license. diff --git a/vendor/github.com/oschwald/geoip2-golang/reader.go b/vendor/github.com/oschwald/geoip2-golang/reader.go deleted file mode 100644 index 28e1695593..0000000000 --- a/vendor/github.com/oschwald/geoip2-golang/reader.go +++ /dev/null @@ -1,422 +0,0 @@ -// Package geoip2 provides an easy-to-use API for the MaxMind GeoIP2 and -// GeoLite2 databases; this package does not support GeoIP Legacy databases. -// -// The structs provided by this package match the internal structure of -// the data in the MaxMind databases. -// -// See github.com/oschwald/maxminddb-golang for more advanced used cases. -package geoip2 - -import ( - "fmt" - "net" - - "github.com/oschwald/maxminddb-golang" -) - -// The Enterprise struct corresponds to the data in the GeoIP2 Enterprise -// database. -type Enterprise struct { - Continent struct { - Names map[string]string `maxminddb:"names"` - Code string `maxminddb:"code"` - GeoNameID uint `maxminddb:"geoname_id"` - } `maxminddb:"continent"` - City struct { - Names map[string]string `maxminddb:"names"` - GeoNameID uint `maxminddb:"geoname_id"` - Confidence uint8 `maxminddb:"confidence"` - } `maxminddb:"city"` - Postal struct { - Code string `maxminddb:"code"` - Confidence uint8 `maxminddb:"confidence"` - } `maxminddb:"postal"` - Subdivisions []struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - Confidence uint8 `maxminddb:"confidence"` - } `maxminddb:"subdivisions"` - RepresentedCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - Type string `maxminddb:"type"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"represented_country"` - Country struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - Confidence uint8 `maxminddb:"confidence"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"country"` - RegisteredCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - Confidence uint8 `maxminddb:"confidence"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"registered_country"` - Traits struct { - AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"` - ConnectionType string `maxminddb:"connection_type"` - Domain string `maxminddb:"domain"` - ISP string `maxminddb:"isp"` - MobileCountryCode string `maxminddb:"mobile_country_code"` - MobileNetworkCode string `maxminddb:"mobile_network_code"` - Organization string `maxminddb:"organization"` - UserType string `maxminddb:"user_type"` - AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"` - StaticIPScore float64 `maxminddb:"static_ip_score"` - IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"` - IsAnycast bool `maxminddb:"is_anycast"` - IsLegitimateProxy bool `maxminddb:"is_legitimate_proxy"` - IsSatelliteProvider bool `maxminddb:"is_satellite_provider"` - } `maxminddb:"traits"` - Location struct { - TimeZone string `maxminddb:"time_zone"` - Latitude float64 `maxminddb:"latitude"` - Longitude float64 `maxminddb:"longitude"` - MetroCode uint `maxminddb:"metro_code"` - AccuracyRadius uint16 `maxminddb:"accuracy_radius"` - } `maxminddb:"location"` -} - -// The City struct corresponds to the data in the GeoIP2/GeoLite2 City -// databases. -type City struct { - City struct { - Names map[string]string `maxminddb:"names"` - GeoNameID uint `maxminddb:"geoname_id"` - } `maxminddb:"city"` - Postal struct { - Code string `maxminddb:"code"` - } `maxminddb:"postal"` - Continent struct { - Names map[string]string `maxminddb:"names"` - Code string `maxminddb:"code"` - GeoNameID uint `maxminddb:"geoname_id"` - } `maxminddb:"continent"` - Subdivisions []struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - } `maxminddb:"subdivisions"` - RepresentedCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - Type string `maxminddb:"type"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"represented_country"` - Country struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"country"` - RegisteredCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"registered_country"` - Location struct { - TimeZone string `maxminddb:"time_zone"` - Latitude float64 `maxminddb:"latitude"` - Longitude float64 `maxminddb:"longitude"` - MetroCode uint `maxminddb:"metro_code"` - AccuracyRadius uint16 `maxminddb:"accuracy_radius"` - } `maxminddb:"location"` - Traits struct { - IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"` - IsAnycast bool `maxminddb:"is_anycast"` - IsSatelliteProvider bool `maxminddb:"is_satellite_provider"` - } `maxminddb:"traits"` -} - -// The Country struct corresponds to the data in the GeoIP2/GeoLite2 -// Country databases. -type Country struct { - Continent struct { - Names map[string]string `maxminddb:"names"` - Code string `maxminddb:"code"` - GeoNameID uint `maxminddb:"geoname_id"` - } `maxminddb:"continent"` - Country struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"country"` - RegisteredCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"registered_country"` - RepresentedCountry struct { - Names map[string]string `maxminddb:"names"` - IsoCode string `maxminddb:"iso_code"` - Type string `maxminddb:"type"` - GeoNameID uint `maxminddb:"geoname_id"` - IsInEuropeanUnion bool `maxminddb:"is_in_european_union"` - } `maxminddb:"represented_country"` - Traits struct { - IsAnonymousProxy bool `maxminddb:"is_anonymous_proxy"` - IsAnycast bool `maxminddb:"is_anycast"` - IsSatelliteProvider bool `maxminddb:"is_satellite_provider"` - } `maxminddb:"traits"` -} - -// The AnonymousIP struct corresponds to the data in the GeoIP2 -// Anonymous IP database. -type AnonymousIP struct { - IsAnonymous bool `maxminddb:"is_anonymous"` - IsAnonymousVPN bool `maxminddb:"is_anonymous_vpn"` - IsHostingProvider bool `maxminddb:"is_hosting_provider"` - IsPublicProxy bool `maxminddb:"is_public_proxy"` - IsResidentialProxy bool `maxminddb:"is_residential_proxy"` - IsTorExitNode bool `maxminddb:"is_tor_exit_node"` -} - -// The ASN struct corresponds to the data in the GeoLite2 ASN database. -type ASN struct { - AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"` - AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"` -} - -// The ConnectionType struct corresponds to the data in the GeoIP2 -// Connection-Type database. -type ConnectionType struct { - ConnectionType string `maxminddb:"connection_type"` -} - -// The Domain struct corresponds to the data in the GeoIP2 Domain database. -type Domain struct { - Domain string `maxminddb:"domain"` -} - -// The ISP struct corresponds to the data in the GeoIP2 ISP database. -type ISP struct { - AutonomousSystemOrganization string `maxminddb:"autonomous_system_organization"` - ISP string `maxminddb:"isp"` - MobileCountryCode string `maxminddb:"mobile_country_code"` - MobileNetworkCode string `maxminddb:"mobile_network_code"` - Organization string `maxminddb:"organization"` - AutonomousSystemNumber uint `maxminddb:"autonomous_system_number"` -} - -type databaseType int - -const ( - isAnonymousIP = 1 << iota - isASN - isCity - isConnectionType - isCountry - isDomain - isEnterprise - isISP -) - -// Reader holds the maxminddb.Reader struct. It can be created using the -// Open and FromBytes functions. -type Reader struct { - mmdbReader *maxminddb.Reader - databaseType databaseType -} - -// InvalidMethodError is returned when a lookup method is called on a -// database that it does not support. For instance, calling the ISP method -// on a City database. -type InvalidMethodError struct { - Method string - DatabaseType string -} - -func (e InvalidMethodError) Error() string { - return fmt.Sprintf(`geoip2: the %s method does not support the %s database`, - e.Method, e.DatabaseType) -} - -// UnknownDatabaseTypeError is returned when an unknown database type is -// opened. -type UnknownDatabaseTypeError struct { - DatabaseType string -} - -func (e UnknownDatabaseTypeError) Error() string { - return fmt.Sprintf(`geoip2: reader does not support the %q database type`, - e.DatabaseType) -} - -// Open takes a string path to a file and returns a Reader struct or an error. -// The database file is opened using a memory map. Use the Close method on the -// Reader object to return the resources to the system. -func Open(file string) (*Reader, error) { - reader, err := maxminddb.Open(file) - if err != nil { - return nil, err - } - dbType, err := getDBType(reader) - return &Reader{reader, dbType}, err -} - -// FromBytes takes a byte slice corresponding to a GeoIP2/GeoLite2 database -// file and returns a Reader struct or an error. Note that the byte slice is -// used directly; any modification of it after opening the database will result -// in errors while reading from the database. -func FromBytes(bytes []byte) (*Reader, error) { - reader, err := maxminddb.FromBytes(bytes) - if err != nil { - return nil, err - } - dbType, err := getDBType(reader) - return &Reader{reader, dbType}, err -} - -func getDBType(reader *maxminddb.Reader) (databaseType, error) { - switch reader.Metadata.DatabaseType { - case "GeoIP2-Anonymous-IP": - return isAnonymousIP, nil - case "DBIP-ASN-Lite (compat=GeoLite2-ASN)", - "GeoLite2-ASN": - return isASN, nil - // We allow City lookups on Country for back compat - case "DBIP-City-Lite", - "DBIP-Country-Lite", - "DBIP-Country", - "DBIP-Location (compat=City)", - "GeoLite2-City", - "GeoIP-City-Redacted-US", - "GeoIP2-City", - "GeoIP2-City-Africa", - "GeoIP2-City-Asia-Pacific", - "GeoIP2-City-Europe", - "GeoIP2-City-North-America", - "GeoIP2-City-South-America", - "GeoIP2-Precision-City", - "GeoLite2-Country", - "GeoIP2-Country": - return isCity | isCountry, nil - case "GeoIP2-Connection-Type": - return isConnectionType, nil - case "GeoIP2-Domain": - return isDomain, nil - case "DBIP-ISP (compat=Enterprise)", - "DBIP-Location-ISP (compat=Enterprise)", - "GeoIP-Enterprise-Redacted-US", - "GeoIP2-Enterprise": - return isEnterprise | isCity | isCountry, nil - case "GeoIP2-ISP", "GeoIP2-Precision-ISP": - return isISP | isASN, nil - default: - return 0, UnknownDatabaseTypeError{reader.Metadata.DatabaseType} - } -} - -// Enterprise takes an IP address as a net.IP struct and returns an Enterprise -// struct and/or an error. This is intended to be used with the GeoIP2 -// Enterprise database. -func (r *Reader) Enterprise(ipAddress net.IP) (*Enterprise, error) { - if isEnterprise&r.databaseType == 0 { - return nil, InvalidMethodError{"Enterprise", r.Metadata().DatabaseType} - } - var enterprise Enterprise - err := r.mmdbReader.Lookup(ipAddress, &enterprise) - return &enterprise, err -} - -// City takes an IP address as a net.IP struct and returns a City struct -// and/or an error. Although this can be used with other databases, this -// method generally should be used with the GeoIP2 or GeoLite2 City databases. -func (r *Reader) City(ipAddress net.IP) (*City, error) { - if isCity&r.databaseType == 0 { - return nil, InvalidMethodError{"City", r.Metadata().DatabaseType} - } - var city City - err := r.mmdbReader.Lookup(ipAddress, &city) - return &city, err -} - -// Country takes an IP address as a net.IP struct and returns a Country struct -// and/or an error. Although this can be used with other databases, this -// method generally should be used with the GeoIP2 or GeoLite2 Country -// databases. -func (r *Reader) Country(ipAddress net.IP) (*Country, error) { - if isCountry&r.databaseType == 0 { - return nil, InvalidMethodError{"Country", r.Metadata().DatabaseType} - } - var country Country - err := r.mmdbReader.Lookup(ipAddress, &country) - return &country, err -} - -// AnonymousIP takes an IP address as a net.IP struct and returns a -// AnonymousIP struct and/or an error. -func (r *Reader) AnonymousIP(ipAddress net.IP) (*AnonymousIP, error) { - if isAnonymousIP&r.databaseType == 0 { - return nil, InvalidMethodError{"AnonymousIP", r.Metadata().DatabaseType} - } - var anonIP AnonymousIP - err := r.mmdbReader.Lookup(ipAddress, &anonIP) - return &anonIP, err -} - -// ASN takes an IP address as a net.IP struct and returns a ASN struct and/or -// an error. -func (r *Reader) ASN(ipAddress net.IP) (*ASN, error) { - if isASN&r.databaseType == 0 { - return nil, InvalidMethodError{"ASN", r.Metadata().DatabaseType} - } - var val ASN - err := r.mmdbReader.Lookup(ipAddress, &val) - return &val, err -} - -// ConnectionType takes an IP address as a net.IP struct and returns a -// ConnectionType struct and/or an error. -func (r *Reader) ConnectionType(ipAddress net.IP) (*ConnectionType, error) { - if isConnectionType&r.databaseType == 0 { - return nil, InvalidMethodError{"ConnectionType", r.Metadata().DatabaseType} - } - var val ConnectionType - err := r.mmdbReader.Lookup(ipAddress, &val) - return &val, err -} - -// Domain takes an IP address as a net.IP struct and returns a -// Domain struct and/or an error. -func (r *Reader) Domain(ipAddress net.IP) (*Domain, error) { - if isDomain&r.databaseType == 0 { - return nil, InvalidMethodError{"Domain", r.Metadata().DatabaseType} - } - var val Domain - err := r.mmdbReader.Lookup(ipAddress, &val) - return &val, err -} - -// ISP takes an IP address as a net.IP struct and returns a ISP struct and/or -// an error. -func (r *Reader) ISP(ipAddress net.IP) (*ISP, error) { - if isISP&r.databaseType == 0 { - return nil, InvalidMethodError{"ISP", r.Metadata().DatabaseType} - } - var val ISP - err := r.mmdbReader.Lookup(ipAddress, &val) - return &val, err -} - -// Metadata takes no arguments and returns a struct containing metadata about -// the MaxMind database in use by the Reader. -func (r *Reader) Metadata() maxminddb.Metadata { - return r.mmdbReader.Metadata -} - -// Close unmaps the database file from virtual memory and returns the -// resources to the system. -func (r *Reader) Close() error { - return r.mmdbReader.Close() -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/.gitignore b/vendor/github.com/oschwald/maxminddb-golang/.gitignore deleted file mode 100644 index fe3fa4ab9b..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -.vscode -*.out -*.sw? -*.test diff --git a/vendor/github.com/oschwald/maxminddb-golang/.gitmodules b/vendor/github.com/oschwald/maxminddb-golang/.gitmodules deleted file mode 100644 index 400b2ab62c..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "test-data"] - path = test-data - url = https://github.com/maxmind/MaxMind-DB.git diff --git a/vendor/github.com/oschwald/maxminddb-golang/.golangci.toml b/vendor/github.com/oschwald/maxminddb-golang/.golangci.toml deleted file mode 100644 index 799416c53a..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/.golangci.toml +++ /dev/null @@ -1,192 +0,0 @@ -[run] -# This is needed for precious, which may run multiple instances -# in parallel -allow-parallel-runners = true -go = "1.21" -tests = true -timeout = "10m" - -[linters] -enable-all = true -disable = [ - "cyclop", - "depguard", - "err113", - "execinquery", - "exhaustive", - "exhaustruct", - "forcetypeassert", - "funlen", - "gochecknoglobals", - "godox", - "gomnd", - "inamedparam", - "interfacebloat", - "mnd", - "nlreturn", - "nonamedreturns", - "paralleltest", - "thelper", - "testpackage", - - "varnamelen", - "wrapcheck", - "wsl", - - # Require Go 1.22 - "copyloopvar", - "intrange", -] - -[linters-settings.errorlint] -errorf = true -asserts = true -comparison = true - -[linters-settings.exhaustive] -default-signifies-exhaustive = true - -[linters-settings.forbidigo] -# Forbid the following identifiers -forbid = [ - { p = "Geoip", msg = "you should use `GeoIP`" }, - { p = "geoIP", msg = "you should use `geoip`" }, - { p = "Maxmind", msg = "you should use `MaxMind`" }, - { p = "^maxMind", msg = "you should use `maxmind`" }, - { p = "Minfraud", msg = "you should use `MinFraud`" }, - { p = "^minFraud", msg = "you should use `minfraud`" }, - { p = "^math.Max$", msg = "you should use the max built-in instead." }, - { p = "^math.Min$", msg = "you should use the min built-in instead." }, - { p = "^os.IsNotExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrNotExist)." }, - { p = "^os.IsExist", msg = "As per their docs, new code should use errors.Is(err, fs.ErrExist)" }, -] - -[linters-settings.gci] -sections = ["standard", "default", "prefix(github.com/oschwald/maxminddb-golang)"] - -[linters-settings.gofumpt] -extra-rules = true - -[linters-settings.govet] -enable-all = true -disable = "shadow" - -[linters-settings.lll] -line-length = 120 -tab-width = 4 - -[linters-settings.misspell] -locale = "US" - -[[linters-settings.misspell.extra-words]] -typo = "marshall" -correction = "marshal" - -[[linters-settings.misspell.extra-words]] -typo = "marshalling" -correction = "marshaling" - -[[linters-settings.misspell.extra-words]] -typo = "marshalls" -correction = "marshals" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshall" -correction = "unmarshal" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshalling" -correction = "unmarshaling" - -[[linters-settings.misspell.extra-words]] -typo = "unmarshalls" -correction = "unmarshals" - -[linters-settings.nolintlint] -allow-unused = false -allow-no-explanation = ["lll", "misspell"] -require-explanation = true -require-specific = true - -[linters-settings.revive] -enable-all-rules = true -ignore-generated-header = true -severity = "warning" - -[[linters-settings.revive.rules]] -name = "add-constant" -disabled = true - -[[linters-settings.revive.rules]] -name = "cognitive-complexity" -disabled = true - -[[linters-settings.revive.rules]] -name = "confusing-naming" -disabled = true - -[[linters-settings.revive.rules]] -name = "confusing-results" -disabled = true - -[[linters-settings.revive.rules]] -name = "cyclomatic" -disabled = true - -[[linters-settings.revive.rules]] -name = "deep-exit" -disabled = true - -[[linters-settings.revive.rules]] -name = "flag-parameter" -disabled = true - -[[linters-settings.revive.rules]] -name = "function-length" -disabled = true - -[[linters-settings.revive.rules]] -name = "function-result-limit" -disabled = true - -[[linters-settings.revive.rules]] -name = "line-length-limit" -disabled = true - -[[linters-settings.revive.rules]] -name = "max-public-structs" -disabled = true - -[[linters-settings.revive.rules]] -name = "nested-structs" -disabled = true - -[[linters-settings.revive.rules]] -name = "unchecked-type-assertion" -disabled = true - -[[linters-settings.revive.rules]] -name = "unhandled-error" -disabled = true - -[linters-settings.tagliatelle.case.rules] -avro = "snake" -bson = "snake" -env = "upperSnake" -envconfig = "upperSnake" -json = "snake" -mapstructure = "snake" -xml = "snake" -yaml = "snake" - -[linters-settings.unparam] -check-exported = true - - -[[issues.exclude-rules]] -linters = [ - "govet", - "revive", -] -path = "_test.go" -text = "fieldalignment:" diff --git a/vendor/github.com/oschwald/maxminddb-golang/LICENSE b/vendor/github.com/oschwald/maxminddb-golang/LICENSE deleted file mode 100644 index 2969677f15..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2015, Gregory J. Oschwald - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. diff --git a/vendor/github.com/oschwald/maxminddb-golang/README.md b/vendor/github.com/oschwald/maxminddb-golang/README.md deleted file mode 100644 index 9662888bdf..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# MaxMind DB Reader for Go # - -[![GoDoc](https://godoc.org/github.com/oschwald/maxminddb-golang?status.svg)](https://godoc.org/github.com/oschwald/maxminddb-golang) - -This is a Go reader for the MaxMind DB format. Although this can be used to -read [GeoLite2](http://dev.maxmind.com/geoip/geoip2/geolite2/) and -[GeoIP2](https://www.maxmind.com/en/geoip2-databases) databases, -[geoip2](https://github.com/oschwald/geoip2-golang) provides a higher-level -API for doing so. - -This is not an official MaxMind API. - -## Installation ## - -``` -go get github.com/oschwald/maxminddb-golang -``` - -## Usage ## - -[See GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) for -documentation and examples. - -## Examples ## - -See [GoDoc](http://godoc.org/github.com/oschwald/maxminddb-golang) or -`example_test.go` for examples. - -## Contributing ## - -Contributions welcome! Please fork the repository and open a pull request -with your changes. - -## License ## - -This is free software, licensed under the ISC License. diff --git a/vendor/github.com/oschwald/maxminddb-golang/decoder.go b/vendor/github.com/oschwald/maxminddb-golang/decoder.go deleted file mode 100644 index 435591ebc5..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/decoder.go +++ /dev/null @@ -1,900 +0,0 @@ -package maxminddb - -import ( - "encoding/binary" - "fmt" - "math" - "math/big" - "reflect" - "sync" -) - -type decoder struct { - buffer []byte -} - -type dataType int - -const ( - _Extended dataType = iota - _Pointer - _String - _Float64 - _Bytes - _Uint16 - _Uint32 - _Map - _Int32 - _Uint64 - _Uint128 - _Slice - // We don't use the next two. They are placeholders. See the spec - // for more details. - _Container //nolint: deadcode, varcheck // above - _Marker //nolint: deadcode, varcheck // above - _Bool - _Float32 -) - -const ( - // This is the value used in libmaxminddb. - maximumDataStructureDepth = 512 -) - -func (d *decoder) decode(offset uint, result reflect.Value, depth int) (uint, error) { - if depth > maximumDataStructureDepth { - return 0, newInvalidDatabaseError( - "exceeded maximum data structure depth; database is likely corrupt", - ) - } - typeNum, size, newOffset, err := d.decodeCtrlData(offset) - if err != nil { - return 0, err - } - - if typeNum != _Pointer && result.Kind() == reflect.Uintptr { - result.Set(reflect.ValueOf(uintptr(offset))) - return d.nextValueOffset(offset, 1) - } - return d.decodeFromType(typeNum, size, newOffset, result, depth+1) -} - -func (d *decoder) decodeToDeserializer( - offset uint, - dser deserializer, - depth int, - getNext bool, -) (uint, error) { - if depth > maximumDataStructureDepth { - return 0, newInvalidDatabaseError( - "exceeded maximum data structure depth; database is likely corrupt", - ) - } - skip, err := dser.ShouldSkip(uintptr(offset)) - if err != nil { - return 0, err - } - if skip { - if getNext { - return d.nextValueOffset(offset, 1) - } - return 0, nil - } - - typeNum, size, newOffset, err := d.decodeCtrlData(offset) - if err != nil { - return 0, err - } - - return d.decodeFromTypeToDeserializer(typeNum, size, newOffset, dser, depth+1) -} - -func (d *decoder) decodeCtrlData(offset uint) (dataType, uint, uint, error) { - newOffset := offset + 1 - if offset >= uint(len(d.buffer)) { - return 0, 0, 0, newOffsetError() - } - ctrlByte := d.buffer[offset] - - typeNum := dataType(ctrlByte >> 5) - if typeNum == _Extended { - if newOffset >= uint(len(d.buffer)) { - return 0, 0, 0, newOffsetError() - } - typeNum = dataType(d.buffer[newOffset] + 7) - newOffset++ - } - - var size uint - size, newOffset, err := d.sizeFromCtrlByte(ctrlByte, newOffset, typeNum) - return typeNum, size, newOffset, err -} - -func (d *decoder) sizeFromCtrlByte( - ctrlByte byte, - offset uint, - typeNum dataType, -) (uint, uint, error) { - size := uint(ctrlByte & 0x1f) - if typeNum == _Extended { - return size, offset, nil - } - - var bytesToRead uint - if size < 29 { - return size, offset, nil - } - - bytesToRead = size - 28 - newOffset := offset + bytesToRead - if newOffset > uint(len(d.buffer)) { - return 0, 0, newOffsetError() - } - if size == 29 { - return 29 + uint(d.buffer[offset]), offset + 1, nil - } - - sizeBytes := d.buffer[offset:newOffset] - - switch { - case size == 30: - size = 285 + uintFromBytes(0, sizeBytes) - case size > 30: - size = uintFromBytes(0, sizeBytes) + 65821 - } - return size, newOffset, nil -} - -func (d *decoder) decodeFromType( - dtype dataType, - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - result = indirect(result) - - // For these types, size has a special meaning - switch dtype { - case _Bool: - return unmarshalBool(size, offset, result) - case _Map: - return d.unmarshalMap(size, offset, result, depth) - case _Pointer: - return d.unmarshalPointer(size, offset, result, depth) - case _Slice: - return d.unmarshalSlice(size, offset, result, depth) - } - - // For the remaining types, size is the byte size - if offset+size > uint(len(d.buffer)) { - return 0, newOffsetError() - } - switch dtype { - case _Bytes: - return d.unmarshalBytes(size, offset, result) - case _Float32: - return d.unmarshalFloat32(size, offset, result) - case _Float64: - return d.unmarshalFloat64(size, offset, result) - case _Int32: - return d.unmarshalInt32(size, offset, result) - case _String: - return d.unmarshalString(size, offset, result) - case _Uint16: - return d.unmarshalUint(size, offset, result, 16) - case _Uint32: - return d.unmarshalUint(size, offset, result, 32) - case _Uint64: - return d.unmarshalUint(size, offset, result, 64) - case _Uint128: - return d.unmarshalUint128(size, offset, result) - default: - return 0, newInvalidDatabaseError("unknown type: %d", dtype) - } -} - -func (d *decoder) decodeFromTypeToDeserializer( - dtype dataType, - size uint, - offset uint, - dser deserializer, - depth int, -) (uint, error) { - // For these types, size has a special meaning - switch dtype { - case _Bool: - v, offset := decodeBool(size, offset) - return offset, dser.Bool(v) - case _Map: - return d.decodeMapToDeserializer(size, offset, dser, depth) - case _Pointer: - pointer, newOffset, err := d.decodePointer(size, offset) - if err != nil { - return 0, err - } - _, err = d.decodeToDeserializer(pointer, dser, depth, false) - return newOffset, err - case _Slice: - return d.decodeSliceToDeserializer(size, offset, dser, depth) - } - - // For the remaining types, size is the byte size - if offset+size > uint(len(d.buffer)) { - return 0, newOffsetError() - } - switch dtype { - case _Bytes: - v, offset := d.decodeBytes(size, offset) - return offset, dser.Bytes(v) - case _Float32: - v, offset := d.decodeFloat32(size, offset) - return offset, dser.Float32(v) - case _Float64: - v, offset := d.decodeFloat64(size, offset) - return offset, dser.Float64(v) - case _Int32: - v, offset := d.decodeInt(size, offset) - return offset, dser.Int32(int32(v)) - case _String: - v, offset := d.decodeString(size, offset) - return offset, dser.String(v) - case _Uint16: - v, offset := d.decodeUint(size, offset) - return offset, dser.Uint16(uint16(v)) - case _Uint32: - v, offset := d.decodeUint(size, offset) - return offset, dser.Uint32(uint32(v)) - case _Uint64: - v, offset := d.decodeUint(size, offset) - return offset, dser.Uint64(v) - case _Uint128: - v, offset := d.decodeUint128(size, offset) - return offset, dser.Uint128(v) - default: - return 0, newInvalidDatabaseError("unknown type: %d", dtype) - } -} - -func unmarshalBool(size, offset uint, result reflect.Value) (uint, error) { - if size > 1 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (bool size of %v)", - size, - ) - } - value, newOffset := decodeBool(size, offset) - - switch result.Kind() { - case reflect.Bool: - result.SetBool(value) - return newOffset, nil - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -// indirect follows pointers and create values as necessary. This is -// heavily based on encoding/json as my original version had a subtle -// bug. This method should be considered to be licensed under -// https://golang.org/LICENSE -func indirect(result reflect.Value) reflect.Value { - for { - // Load value from interface, but only if the result will be - // usefully addressable. - if result.Kind() == reflect.Interface && !result.IsNil() { - e := result.Elem() - if e.Kind() == reflect.Ptr && !e.IsNil() { - result = e - continue - } - } - - if result.Kind() != reflect.Ptr { - break - } - - if result.IsNil() { - result.Set(reflect.New(result.Type().Elem())) - } - - result = result.Elem() - } - return result -} - -var sliceType = reflect.TypeOf([]byte{}) - -func (d *decoder) unmarshalBytes(size, offset uint, result reflect.Value) (uint, error) { - value, newOffset := d.decodeBytes(size, offset) - - switch result.Kind() { - case reflect.Slice: - if result.Type() == sliceType { - result.SetBytes(value) - return newOffset, nil - } - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func (d *decoder) unmarshalFloat32(size, offset uint, result reflect.Value) (uint, error) { - if size != 4 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (float32 size of %v)", - size, - ) - } - value, newOffset := d.decodeFloat32(size, offset) - - switch result.Kind() { - case reflect.Float32, reflect.Float64: - result.SetFloat(float64(value)) - return newOffset, nil - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func (d *decoder) unmarshalFloat64(size, offset uint, result reflect.Value) (uint, error) { - if size != 8 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (float 64 size of %v)", - size, - ) - } - value, newOffset := d.decodeFloat64(size, offset) - - switch result.Kind() { - case reflect.Float32, reflect.Float64: - if result.OverflowFloat(value) { - return 0, newUnmarshalTypeError(value, result.Type()) - } - result.SetFloat(value) - return newOffset, nil - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func (d *decoder) unmarshalInt32(size, offset uint, result reflect.Value) (uint, error) { - if size > 4 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (int32 size of %v)", - size, - ) - } - value, newOffset := d.decodeInt(size, offset) - - switch result.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - n := int64(value) - if !result.OverflowInt(n) { - result.SetInt(n) - return newOffset, nil - } - case reflect.Uint, - reflect.Uint8, - reflect.Uint16, - reflect.Uint32, - reflect.Uint64, - reflect.Uintptr: - n := uint64(value) - if !result.OverflowUint(n) { - result.SetUint(n) - return newOffset, nil - } - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func (d *decoder) unmarshalMap( - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - result = indirect(result) - switch result.Kind() { - default: - return 0, newUnmarshalTypeStrError("map", result.Type()) - case reflect.Struct: - return d.decodeStruct(size, offset, result, depth) - case reflect.Map: - return d.decodeMap(size, offset, result, depth) - case reflect.Interface: - if result.NumMethod() == 0 { - rv := reflect.ValueOf(make(map[string]any, size)) - newOffset, err := d.decodeMap(size, offset, rv, depth) - result.Set(rv) - return newOffset, err - } - return 0, newUnmarshalTypeStrError("map", result.Type()) - } -} - -func (d *decoder) unmarshalPointer( - size, offset uint, - result reflect.Value, - depth int, -) (uint, error) { - pointer, newOffset, err := d.decodePointer(size, offset) - if err != nil { - return 0, err - } - _, err = d.decode(pointer, result, depth) - return newOffset, err -} - -func (d *decoder) unmarshalSlice( - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - switch result.Kind() { - case reflect.Slice: - return d.decodeSlice(size, offset, result, depth) - case reflect.Interface: - if result.NumMethod() == 0 { - a := []any{} - rv := reflect.ValueOf(&a).Elem() - newOffset, err := d.decodeSlice(size, offset, rv, depth) - result.Set(rv) - return newOffset, err - } - } - return 0, newUnmarshalTypeStrError("array", result.Type()) -} - -func (d *decoder) unmarshalString(size, offset uint, result reflect.Value) (uint, error) { - value, newOffset := d.decodeString(size, offset) - - switch result.Kind() { - case reflect.String: - result.SetString(value) - return newOffset, nil - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func (d *decoder) unmarshalUint( - size, offset uint, - result reflect.Value, - uintType uint, -) (uint, error) { - if size > uintType/8 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (uint%v size of %v)", - uintType, - size, - ) - } - - value, newOffset := d.decodeUint(size, offset) - - switch result.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - n := int64(value) - if !result.OverflowInt(n) { - result.SetInt(n) - return newOffset, nil - } - case reflect.Uint, - reflect.Uint8, - reflect.Uint16, - reflect.Uint32, - reflect.Uint64, - reflect.Uintptr: - if !result.OverflowUint(value) { - result.SetUint(value) - return newOffset, nil - } - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -var bigIntType = reflect.TypeOf(big.Int{}) - -func (d *decoder) unmarshalUint128(size, offset uint, result reflect.Value) (uint, error) { - if size > 16 { - return 0, newInvalidDatabaseError( - "the MaxMind DB file's data section contains bad data (uint128 size of %v)", - size, - ) - } - value, newOffset := d.decodeUint128(size, offset) - - switch result.Kind() { - case reflect.Struct: - if result.Type() == bigIntType { - result.Set(reflect.ValueOf(*value)) - return newOffset, nil - } - case reflect.Interface: - if result.NumMethod() == 0 { - result.Set(reflect.ValueOf(value)) - return newOffset, nil - } - } - return newOffset, newUnmarshalTypeError(value, result.Type()) -} - -func decodeBool(size, offset uint) (bool, uint) { - return size != 0, offset -} - -func (d *decoder) decodeBytes(size, offset uint) ([]byte, uint) { - newOffset := offset + size - bytes := make([]byte, size) - copy(bytes, d.buffer[offset:newOffset]) - return bytes, newOffset -} - -func (d *decoder) decodeFloat64(size, offset uint) (float64, uint) { - newOffset := offset + size - bits := binary.BigEndian.Uint64(d.buffer[offset:newOffset]) - return math.Float64frombits(bits), newOffset -} - -func (d *decoder) decodeFloat32(size, offset uint) (float32, uint) { - newOffset := offset + size - bits := binary.BigEndian.Uint32(d.buffer[offset:newOffset]) - return math.Float32frombits(bits), newOffset -} - -func (d *decoder) decodeInt(size, offset uint) (int, uint) { - newOffset := offset + size - var val int32 - for _, b := range d.buffer[offset:newOffset] { - val = (val << 8) | int32(b) - } - return int(val), newOffset -} - -func (d *decoder) decodeMap( - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - if result.IsNil() { - result.Set(reflect.MakeMapWithSize(result.Type(), int(size))) - } - - mapType := result.Type() - keyValue := reflect.New(mapType.Key()).Elem() - elemType := mapType.Elem() - var elemValue reflect.Value - for i := uint(0); i < size; i++ { - var key []byte - var err error - key, offset, err = d.decodeKey(offset) - if err != nil { - return 0, err - } - - if elemValue.IsValid() { - // After 1.20 is the minimum supported version, this can just be - // elemValue.SetZero() - reflectSetZero(elemValue) - } else { - elemValue = reflect.New(elemType).Elem() - } - - offset, err = d.decode(offset, elemValue, depth) - if err != nil { - return 0, fmt.Errorf("decoding value for %s: %w", key, err) - } - - keyValue.SetString(string(key)) - result.SetMapIndex(keyValue, elemValue) - } - return offset, nil -} - -func (d *decoder) decodeMapToDeserializer( - size uint, - offset uint, - dser deserializer, - depth int, -) (uint, error) { - err := dser.StartMap(size) - if err != nil { - return 0, err - } - for i := uint(0); i < size; i++ { - // TODO - implement key/value skipping? - offset, err = d.decodeToDeserializer(offset, dser, depth, true) - if err != nil { - return 0, err - } - - offset, err = d.decodeToDeserializer(offset, dser, depth, true) - if err != nil { - return 0, err - } - } - err = dser.End() - if err != nil { - return 0, err - } - return offset, nil -} - -func (d *decoder) decodePointer( - size uint, - offset uint, -) (uint, uint, error) { - pointerSize := ((size >> 3) & 0x3) + 1 - newOffset := offset + pointerSize - if newOffset > uint(len(d.buffer)) { - return 0, 0, newOffsetError() - } - pointerBytes := d.buffer[offset:newOffset] - var prefix uint - if pointerSize == 4 { - prefix = 0 - } else { - prefix = size & 0x7 - } - unpacked := uintFromBytes(prefix, pointerBytes) - - var pointerValueOffset uint - switch pointerSize { - case 1: - pointerValueOffset = 0 - case 2: - pointerValueOffset = 2048 - case 3: - pointerValueOffset = 526336 - case 4: - pointerValueOffset = 0 - } - - pointer := unpacked + pointerValueOffset - - return pointer, newOffset, nil -} - -func (d *decoder) decodeSlice( - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - result.Set(reflect.MakeSlice(result.Type(), int(size), int(size))) - for i := 0; i < int(size); i++ { - var err error - offset, err = d.decode(offset, result.Index(i), depth) - if err != nil { - return 0, err - } - } - return offset, nil -} - -func (d *decoder) decodeSliceToDeserializer( - size uint, - offset uint, - dser deserializer, - depth int, -) (uint, error) { - err := dser.StartSlice(size) - if err != nil { - return 0, err - } - for i := uint(0); i < size; i++ { - offset, err = d.decodeToDeserializer(offset, dser, depth, true) - if err != nil { - return 0, err - } - } - err = dser.End() - if err != nil { - return 0, err - } - return offset, nil -} - -func (d *decoder) decodeString(size, offset uint) (string, uint) { - newOffset := offset + size - return string(d.buffer[offset:newOffset]), newOffset -} - -func (d *decoder) decodeStruct( - size uint, - offset uint, - result reflect.Value, - depth int, -) (uint, error) { - fields := cachedFields(result) - - // This fills in embedded structs - for _, i := range fields.anonymousFields { - _, err := d.unmarshalMap(size, offset, result.Field(i), depth) - if err != nil { - return 0, err - } - } - - // This handles named fields - for i := uint(0); i < size; i++ { - var ( - err error - key []byte - ) - key, offset, err = d.decodeKey(offset) - if err != nil { - return 0, err - } - // The string() does not create a copy due to this compiler - // optimization: https://github.com/golang/go/issues/3512 - j, ok := fields.namedFields[string(key)] - if !ok { - offset, err = d.nextValueOffset(offset, 1) - if err != nil { - return 0, err - } - continue - } - - offset, err = d.decode(offset, result.Field(j), depth) - if err != nil { - return 0, fmt.Errorf("decoding value for %s: %w", key, err) - } - } - return offset, nil -} - -type fieldsType struct { - namedFields map[string]int - anonymousFields []int -} - -var fieldsMap sync.Map - -func cachedFields(result reflect.Value) *fieldsType { - resultType := result.Type() - - if fields, ok := fieldsMap.Load(resultType); ok { - return fields.(*fieldsType) - } - numFields := resultType.NumField() - namedFields := make(map[string]int, numFields) - var anonymous []int - for i := 0; i < numFields; i++ { - field := resultType.Field(i) - - fieldName := field.Name - if tag := field.Tag.Get("maxminddb"); tag != "" { - if tag == "-" { - continue - } - fieldName = tag - } - if field.Anonymous { - anonymous = append(anonymous, i) - continue - } - namedFields[fieldName] = i - } - fields := &fieldsType{namedFields, anonymous} - fieldsMap.Store(resultType, fields) - - return fields -} - -func (d *decoder) decodeUint(size, offset uint) (uint64, uint) { - newOffset := offset + size - bytes := d.buffer[offset:newOffset] - - var val uint64 - for _, b := range bytes { - val = (val << 8) | uint64(b) - } - return val, newOffset -} - -func (d *decoder) decodeUint128(size, offset uint) (*big.Int, uint) { - newOffset := offset + size - val := new(big.Int) - val.SetBytes(d.buffer[offset:newOffset]) - - return val, newOffset -} - -func uintFromBytes(prefix uint, uintBytes []byte) uint { - val := prefix - for _, b := range uintBytes { - val = (val << 8) | uint(b) - } - return val -} - -// decodeKey decodes a map key into []byte slice. We use a []byte so that we -// can take advantage of https://github.com/golang/go/issues/3512 to avoid -// copying the bytes when decoding a struct. Previously, we achieved this by -// using unsafe. -func (d *decoder) decodeKey(offset uint) ([]byte, uint, error) { - typeNum, size, dataOffset, err := d.decodeCtrlData(offset) - if err != nil { - return nil, 0, err - } - if typeNum == _Pointer { - pointer, ptrOffset, err := d.decodePointer(size, dataOffset) - if err != nil { - return nil, 0, err - } - key, _, err := d.decodeKey(pointer) - return key, ptrOffset, err - } - if typeNum != _String { - return nil, 0, newInvalidDatabaseError("unexpected type when decoding string: %v", typeNum) - } - newOffset := dataOffset + size - if newOffset > uint(len(d.buffer)) { - return nil, 0, newOffsetError() - } - return d.buffer[dataOffset:newOffset], newOffset, nil -} - -// This function is used to skip ahead to the next value without decoding -// the one at the offset passed in. The size bits have different meanings for -// different data types. -func (d *decoder) nextValueOffset(offset, numberToSkip uint) (uint, error) { - if numberToSkip == 0 { - return offset, nil - } - typeNum, size, offset, err := d.decodeCtrlData(offset) - if err != nil { - return 0, err - } - switch typeNum { - case _Pointer: - _, offset, err = d.decodePointer(size, offset) - if err != nil { - return 0, err - } - case _Map: - numberToSkip += 2 * size - case _Slice: - numberToSkip += size - case _Bool: - default: - offset += size - } - return d.nextValueOffset(offset, numberToSkip-1) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/deserializer.go b/vendor/github.com/oschwald/maxminddb-golang/deserializer.go deleted file mode 100644 index c6dd68d14c..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/deserializer.go +++ /dev/null @@ -1,31 +0,0 @@ -package maxminddb - -import "math/big" - -// deserializer is an interface for a type that deserializes an MaxMind DB -// data record to some other type. This exists as an alternative to the -// standard reflection API. -// -// This is fundamentally different than the Unmarshaler interface that -// several packages provide. A Deserializer will generally create the -// final struct or value rather than unmarshaling to itself. -// -// This interface and the associated unmarshaling code is EXPERIMENTAL! -// It is not currently covered by any Semantic Versioning guarantees. -// Use at your own risk. -type deserializer interface { - ShouldSkip(offset uintptr) (bool, error) - StartSlice(size uint) error - StartMap(size uint) error - End() error - String(string) error - Float64(float64) error - Bytes([]byte) error - Uint16(uint16) error - Uint32(uint32) error - Int32(int32) error - Uint64(uint64) error - Uint128(*big.Int) error - Bool(bool) error - Float32(float32) error -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/errors.go b/vendor/github.com/oschwald/maxminddb-golang/errors.go deleted file mode 100644 index f141f618d8..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/errors.go +++ /dev/null @@ -1,46 +0,0 @@ -package maxminddb - -import ( - "fmt" - "reflect" -) - -// InvalidDatabaseError is returned when the database contains invalid data -// and cannot be parsed. -type InvalidDatabaseError struct { - message string -} - -func newOffsetError() InvalidDatabaseError { - return InvalidDatabaseError{"unexpected end of database"} -} - -func newInvalidDatabaseError(format string, args ...any) InvalidDatabaseError { - return InvalidDatabaseError{fmt.Sprintf(format, args...)} -} - -func (e InvalidDatabaseError) Error() string { - return e.message -} - -// UnmarshalTypeError is returned when the value in the database cannot be -// assigned to the specified data type. -type UnmarshalTypeError struct { - Type reflect.Type - Value string -} - -func newUnmarshalTypeStrError(value string, rType reflect.Type) UnmarshalTypeError { - return UnmarshalTypeError{ - Type: rType, - Value: value, - } -} - -func newUnmarshalTypeError(value any, rType reflect.Type) UnmarshalTypeError { - return newUnmarshalTypeStrError(fmt.Sprintf("%v (%T)", value, value), rType) -} - -func (e UnmarshalTypeError) Error() string { - return fmt.Sprintf("maxminddb: cannot unmarshal %s into type %s", e.Value, e.Type) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go b/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go deleted file mode 100644 index 48b2e403ce..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/mmap_unix.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build !windows && !appengine && !plan9 && !js && !wasip1 && !wasi -// +build !windows,!appengine,!plan9,!js,!wasip1,!wasi - -package maxminddb - -import ( - "golang.org/x/sys/unix" -) - -func mmap(fd, length int) (data []byte, err error) { - return unix.Mmap(fd, 0, length, unix.PROT_READ, unix.MAP_SHARED) -} - -func munmap(b []byte) (err error) { - return unix.Munmap(b) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/mmap_windows.go b/vendor/github.com/oschwald/maxminddb-golang/mmap_windows.go deleted file mode 100644 index 79133a7fb5..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/mmap_windows.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build windows && !appengine -// +build windows,!appengine - -package maxminddb - -// Windows support largely borrowed from mmap-go. -// -// Copyright 2011 Evan Shaw. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -import ( - "errors" - "os" - "reflect" - "sync" - "unsafe" - - "golang.org/x/sys/windows" -) - -type memoryMap []byte - -// Windows -var handleLock sync.Mutex -var handleMap = map[uintptr]windows.Handle{} - -func mmap(fd int, length int) (data []byte, err error) { - h, errno := windows.CreateFileMapping(windows.Handle(fd), nil, - uint32(windows.PAGE_READONLY), 0, uint32(length), nil) - if h == 0 { - return nil, os.NewSyscallError("CreateFileMapping", errno) - } - - addr, errno := windows.MapViewOfFile(h, uint32(windows.FILE_MAP_READ), 0, - 0, uintptr(length)) - if addr == 0 { - return nil, os.NewSyscallError("MapViewOfFile", errno) - } - handleLock.Lock() - handleMap[addr] = h - handleLock.Unlock() - - m := memoryMap{} - dh := m.header() - dh.Data = addr - dh.Len = length - dh.Cap = dh.Len - - return m, nil -} - -func (m *memoryMap) header() *reflect.SliceHeader { - return (*reflect.SliceHeader)(unsafe.Pointer(m)) -} - -func flush(addr, len uintptr) error { - errno := windows.FlushViewOfFile(addr, len) - return os.NewSyscallError("FlushViewOfFile", errno) -} - -func munmap(b []byte) (err error) { - m := memoryMap(b) - dh := m.header() - - addr := dh.Data - length := uintptr(dh.Len) - - flush(addr, length) - err = windows.UnmapViewOfFile(addr) - if err != nil { - return err - } - - handleLock.Lock() - defer handleLock.Unlock() - handle, ok := handleMap[addr] - if !ok { - // should be impossible; we would've errored above - return errors.New("unknown base address") - } - delete(handleMap, addr) - - e := windows.CloseHandle(windows.Handle(handle)) - return os.NewSyscallError("CloseHandle", e) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/node.go b/vendor/github.com/oschwald/maxminddb-golang/node.go deleted file mode 100644 index 16e8b5f6a0..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/node.go +++ /dev/null @@ -1,58 +0,0 @@ -package maxminddb - -type nodeReader interface { - readLeft(uint) uint - readRight(uint) uint -} - -type nodeReader24 struct { - buffer []byte -} - -func (n nodeReader24) readLeft(nodeNumber uint) uint { - return (uint(n.buffer[nodeNumber]) << 16) | - (uint(n.buffer[nodeNumber+1]) << 8) | - uint(n.buffer[nodeNumber+2]) -} - -func (n nodeReader24) readRight(nodeNumber uint) uint { - return (uint(n.buffer[nodeNumber+3]) << 16) | - (uint(n.buffer[nodeNumber+4]) << 8) | - uint(n.buffer[nodeNumber+5]) -} - -type nodeReader28 struct { - buffer []byte -} - -func (n nodeReader28) readLeft(nodeNumber uint) uint { - return ((uint(n.buffer[nodeNumber+3]) & 0xF0) << 20) | - (uint(n.buffer[nodeNumber]) << 16) | - (uint(n.buffer[nodeNumber+1]) << 8) | - uint(n.buffer[nodeNumber+2]) -} - -func (n nodeReader28) readRight(nodeNumber uint) uint { - return ((uint(n.buffer[nodeNumber+3]) & 0x0F) << 24) | - (uint(n.buffer[nodeNumber+4]) << 16) | - (uint(n.buffer[nodeNumber+5]) << 8) | - uint(n.buffer[nodeNumber+6]) -} - -type nodeReader32 struct { - buffer []byte -} - -func (n nodeReader32) readLeft(nodeNumber uint) uint { - return (uint(n.buffer[nodeNumber]) << 24) | - (uint(n.buffer[nodeNumber+1]) << 16) | - (uint(n.buffer[nodeNumber+2]) << 8) | - uint(n.buffer[nodeNumber+3]) -} - -func (n nodeReader32) readRight(nodeNumber uint) uint { - return (uint(n.buffer[nodeNumber+4]) << 24) | - (uint(n.buffer[nodeNumber+5]) << 16) | - (uint(n.buffer[nodeNumber+6]) << 8) | - uint(n.buffer[nodeNumber+7]) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/reader.go b/vendor/github.com/oschwald/maxminddb-golang/reader.go deleted file mode 100644 index 2dc712fbc7..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/reader.go +++ /dev/null @@ -1,310 +0,0 @@ -// Package maxminddb provides a reader for the MaxMind DB file format. -package maxminddb - -import ( - "bytes" - "errors" - "fmt" - "net" - "reflect" -) - -const ( - // NotFound is returned by LookupOffset when a matched root record offset - // cannot be found. - NotFound = ^uintptr(0) - - dataSectionSeparatorSize = 16 -) - -var metadataStartMarker = []byte("\xAB\xCD\xEFMaxMind.com") - -// Reader holds the data corresponding to the MaxMind DB file. Its only public -// field is Metadata, which contains the metadata from the MaxMind DB file. -// -// All of the methods on Reader are thread-safe. The struct may be safely -// shared across goroutines. -type Reader struct { - nodeReader nodeReader - buffer []byte - decoder decoder - Metadata Metadata - ipv4Start uint - ipv4StartBitDepth int - nodeOffsetMult uint - hasMappedFile bool -} - -// Metadata holds the metadata decoded from the MaxMind DB file. In particular -// it has the format version, the build time as Unix epoch time, the database -// type and description, the IP version supported, and a slice of the natural -// languages included. -type Metadata struct { - Description map[string]string `maxminddb:"description"` - DatabaseType string `maxminddb:"database_type"` - Languages []string `maxminddb:"languages"` - BinaryFormatMajorVersion uint `maxminddb:"binary_format_major_version"` - BinaryFormatMinorVersion uint `maxminddb:"binary_format_minor_version"` - BuildEpoch uint `maxminddb:"build_epoch"` - IPVersion uint `maxminddb:"ip_version"` - NodeCount uint `maxminddb:"node_count"` - RecordSize uint `maxminddb:"record_size"` -} - -// FromBytes takes a byte slice corresponding to a MaxMind DB file and returns -// a Reader structure or an error. -func FromBytes(buffer []byte) (*Reader, error) { - metadataStart := bytes.LastIndex(buffer, metadataStartMarker) - - if metadataStart == -1 { - return nil, newInvalidDatabaseError("error opening database: invalid MaxMind DB file") - } - - metadataStart += len(metadataStartMarker) - metadataDecoder := decoder{buffer[metadataStart:]} - - var metadata Metadata - - rvMetadata := reflect.ValueOf(&metadata) - _, err := metadataDecoder.decode(0, rvMetadata, 0) - if err != nil { - return nil, err - } - - searchTreeSize := metadata.NodeCount * metadata.RecordSize / 4 - dataSectionStart := searchTreeSize + dataSectionSeparatorSize - dataSectionEnd := uint(metadataStart - len(metadataStartMarker)) - if dataSectionStart > dataSectionEnd { - return nil, newInvalidDatabaseError("the MaxMind DB contains invalid metadata") - } - d := decoder{ - buffer[searchTreeSize+dataSectionSeparatorSize : metadataStart-len(metadataStartMarker)], - } - - nodeBuffer := buffer[:searchTreeSize] - var nodeReader nodeReader - switch metadata.RecordSize { - case 24: - nodeReader = nodeReader24{buffer: nodeBuffer} - case 28: - nodeReader = nodeReader28{buffer: nodeBuffer} - case 32: - nodeReader = nodeReader32{buffer: nodeBuffer} - default: - return nil, newInvalidDatabaseError("unknown record size: %d", metadata.RecordSize) - } - - reader := &Reader{ - buffer: buffer, - nodeReader: nodeReader, - decoder: d, - Metadata: metadata, - ipv4Start: 0, - nodeOffsetMult: metadata.RecordSize / 4, - } - - reader.setIPv4Start() - - return reader, err -} - -func (r *Reader) setIPv4Start() { - if r.Metadata.IPVersion != 6 { - return - } - - nodeCount := r.Metadata.NodeCount - - node := uint(0) - i := 0 - for ; i < 96 && node < nodeCount; i++ { - node = r.nodeReader.readLeft(node * r.nodeOffsetMult) - } - r.ipv4Start = node - r.ipv4StartBitDepth = i -} - -// Lookup retrieves the database record for ip and stores it in the value -// pointed to by result. If result is nil or not a pointer, an error is -// returned. If the data in the database record cannot be stored in result -// because of type differences, an UnmarshalTypeError is returned. If the -// database is invalid or otherwise cannot be read, an InvalidDatabaseError -// is returned. -func (r *Reader) Lookup(ip net.IP, result any) error { - if r.buffer == nil { - return errors.New("cannot call Lookup on a closed database") - } - pointer, _, _, err := r.lookupPointer(ip) - if pointer == 0 || err != nil { - return err - } - return r.retrieveData(pointer, result) -} - -// LookupNetwork retrieves the database record for ip and stores it in the -// value pointed to by result. The network returned is the network associated -// with the data record in the database. The ok return value indicates whether -// the database contained a record for the ip. -// -// If result is nil or not a pointer, an error is returned. If the data in the -// database record cannot be stored in result because of type differences, an -// UnmarshalTypeError is returned. If the database is invalid or otherwise -// cannot be read, an InvalidDatabaseError is returned. -func (r *Reader) LookupNetwork( - ip net.IP, - result any, -) (network *net.IPNet, ok bool, err error) { - if r.buffer == nil { - return nil, false, errors.New("cannot call Lookup on a closed database") - } - pointer, prefixLength, ip, err := r.lookupPointer(ip) - - network = r.cidr(ip, prefixLength) - if pointer == 0 || err != nil { - return network, false, err - } - - return network, true, r.retrieveData(pointer, result) -} - -// LookupOffset maps an argument net.IP to a corresponding record offset in the -// database. NotFound is returned if no such record is found, and a record may -// otherwise be extracted by passing the returned offset to Decode. LookupOffset -// is an advanced API, which exists to provide clients with a means to cache -// previously-decoded records. -func (r *Reader) LookupOffset(ip net.IP) (uintptr, error) { - if r.buffer == nil { - return 0, errors.New("cannot call LookupOffset on a closed database") - } - pointer, _, _, err := r.lookupPointer(ip) - if pointer == 0 || err != nil { - return NotFound, err - } - return r.resolveDataPointer(pointer) -} - -func (r *Reader) cidr(ip net.IP, prefixLength int) *net.IPNet { - // This is necessary as the node that the IPv4 start is at may - // be at a bit depth that is less that 96, i.e., ipv4Start points - // to a leaf node. For instance, if a record was inserted at ::/8, - // the ipv4Start would point directly at the leaf node for the - // record and would have a bit depth of 8. This would not happen - // with databases currently distributed by MaxMind as all of them - // have an IPv4 subtree that is greater than a single node. - if r.Metadata.IPVersion == 6 && - len(ip) == net.IPv4len && - r.ipv4StartBitDepth != 96 { - return &net.IPNet{IP: net.ParseIP("::"), Mask: net.CIDRMask(r.ipv4StartBitDepth, 128)} - } - - mask := net.CIDRMask(prefixLength, len(ip)*8) - return &net.IPNet{IP: ip.Mask(mask), Mask: mask} -} - -// Decode the record at |offset| into |result|. The result value pointed to -// must be a data value that corresponds to a record in the database. This may -// include a struct representation of the data, a map capable of holding the -// data or an empty any value. -// -// If result is a pointer to a struct, the struct need not include a field -// for every value that may be in the database. If a field is not present in -// the structure, the decoder will not decode that field, reducing the time -// required to decode the record. -// -// As a special case, a struct field of type uintptr will be used to capture -// the offset of the value. Decode may later be used to extract the stored -// value from the offset. MaxMind DBs are highly normalized: for example in -// the City database, all records of the same country will reference a -// single representative record for that country. This uintptr behavior allows -// clients to leverage this normalization in their own sub-record caching. -func (r *Reader) Decode(offset uintptr, result any) error { - if r.buffer == nil { - return errors.New("cannot call Decode on a closed database") - } - return r.decode(offset, result) -} - -func (r *Reader) decode(offset uintptr, result any) error { - rv := reflect.ValueOf(result) - if rv.Kind() != reflect.Ptr || rv.IsNil() { - return errors.New("result param must be a pointer") - } - - if dser, ok := result.(deserializer); ok { - _, err := r.decoder.decodeToDeserializer(uint(offset), dser, 0, false) - return err - } - - _, err := r.decoder.decode(uint(offset), rv, 0) - return err -} - -func (r *Reader) lookupPointer(ip net.IP) (uint, int, net.IP, error) { - if ip == nil { - return 0, 0, nil, errors.New("IP passed to Lookup cannot be nil") - } - - ipV4Address := ip.To4() - if ipV4Address != nil { - ip = ipV4Address - } - if len(ip) == 16 && r.Metadata.IPVersion == 4 { - return 0, 0, ip, fmt.Errorf( - "error looking up '%s': you attempted to look up an IPv6 address in an IPv4-only database", - ip.String(), - ) - } - - bitCount := uint(len(ip) * 8) - - var node uint - if bitCount == 32 { - node = r.ipv4Start - } - node, prefixLength := r.traverseTree(ip, node, bitCount) - - nodeCount := r.Metadata.NodeCount - if node == nodeCount { - // Record is empty - return 0, prefixLength, ip, nil - } else if node > nodeCount { - return node, prefixLength, ip, nil - } - - return 0, prefixLength, ip, newInvalidDatabaseError("invalid node in search tree") -} - -func (r *Reader) traverseTree(ip net.IP, node, bitCount uint) (uint, int) { - nodeCount := r.Metadata.NodeCount - - i := uint(0) - for ; i < bitCount && node < nodeCount; i++ { - bit := uint(1) & (uint(ip[i>>3]) >> (7 - (i % 8))) - - offset := node * r.nodeOffsetMult - if bit == 0 { - node = r.nodeReader.readLeft(offset) - } else { - node = r.nodeReader.readRight(offset) - } - } - - return node, int(i) -} - -func (r *Reader) retrieveData(pointer uint, result any) error { - offset, err := r.resolveDataPointer(pointer) - if err != nil { - return err - } - return r.decode(offset, result) -} - -func (r *Reader) resolveDataPointer(pointer uint) (uintptr, error) { - resolved := uintptr(pointer - r.Metadata.NodeCount - dataSectionSeparatorSize) - - if resolved >= uintptr(len(r.buffer)) { - return 0, newInvalidDatabaseError("the MaxMind DB file's search tree is corrupt") - } - return resolved, nil -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/reader_memory.go b/vendor/github.com/oschwald/maxminddb-golang/reader_memory.go deleted file mode 100644 index 4ebb3473d2..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/reader_memory.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build appengine || plan9 || js || wasip1 || wasi -// +build appengine plan9 js wasip1 wasi - -package maxminddb - -import "io/ioutil" - -// Open takes a string path to a MaxMind DB file and returns a Reader -// structure or an error. The database file is opened using a memory map -// on supported platforms. On platforms without memory map support, such -// as WebAssembly or Google App Engine, the database is loaded into memory. -// Use the Close method on the Reader object to return the resources to the system. -func Open(file string) (*Reader, error) { - bytes, err := ioutil.ReadFile(file) - if err != nil { - return nil, err - } - - return FromBytes(bytes) -} - -// Close returns the resources used by the database to the system. -func (r *Reader) Close() error { - r.buffer = nil - return nil -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/reader_mmap.go b/vendor/github.com/oschwald/maxminddb-golang/reader_mmap.go deleted file mode 100644 index 1d083019ee..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/reader_mmap.go +++ /dev/null @@ -1,64 +0,0 @@ -//go:build !appengine && !plan9 && !js && !wasip1 && !wasi -// +build !appengine,!plan9,!js,!wasip1,!wasi - -package maxminddb - -import ( - "os" - "runtime" -) - -// Open takes a string path to a MaxMind DB file and returns a Reader -// structure or an error. The database file is opened using a memory map -// on supported platforms. On platforms without memory map support, such -// as WebAssembly or Google App Engine, the database is loaded into memory. -// Use the Close method on the Reader object to return the resources to the system. -func Open(file string) (*Reader, error) { - mapFile, err := os.Open(file) - if err != nil { - _ = mapFile.Close() - return nil, err - } - - stats, err := mapFile.Stat() - if err != nil { - _ = mapFile.Close() - return nil, err - } - - fileSize := int(stats.Size()) - mmap, err := mmap(int(mapFile.Fd()), fileSize) - if err != nil { - _ = mapFile.Close() - return nil, err - } - - if err := mapFile.Close(); err != nil { - //nolint:errcheck // we prefer to return the original error - munmap(mmap) - return nil, err - } - - reader, err := FromBytes(mmap) - if err != nil { - //nolint:errcheck // we prefer to return the original error - munmap(mmap) - return nil, err - } - - reader.hasMappedFile = true - runtime.SetFinalizer(reader, (*Reader).Close) - return reader, nil -} - -// Close returns the resources used by the database to the system. -func (r *Reader) Close() error { - var err error - if r.hasMappedFile { - runtime.SetFinalizer(r, nil) - r.hasMappedFile = false - err = munmap(r.buffer) - } - r.buffer = nil - return err -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/set_zero_120.go b/vendor/github.com/oschwald/maxminddb-golang/set_zero_120.go deleted file mode 100644 index 33b9dff9d9..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/set_zero_120.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build go1.20 -// +build go1.20 - -package maxminddb - -import "reflect" - -func reflectSetZero(v reflect.Value) { - v.SetZero() -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/set_zero_pre120.go b/vendor/github.com/oschwald/maxminddb-golang/set_zero_pre120.go deleted file mode 100644 index 6639de73e6..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/set_zero_pre120.go +++ /dev/null @@ -1,10 +0,0 @@ -//go:build !go1.20 -// +build !go1.20 - -package maxminddb - -import "reflect" - -func reflectSetZero(v reflect.Value) { - v.Set(reflect.Zero(v.Type())) -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/traverse.go b/vendor/github.com/oschwald/maxminddb-golang/traverse.go deleted file mode 100644 index 657e2c40c6..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/traverse.go +++ /dev/null @@ -1,204 +0,0 @@ -package maxminddb - -import ( - "fmt" - "net" -) - -// Internal structure used to keep track of nodes we still need to visit. -type netNode struct { - ip net.IP - bit uint - pointer uint -} - -// Networks represents a set of subnets that we are iterating over. -type Networks struct { - err error - reader *Reader - nodes []netNode - lastNode netNode - skipAliasedNetworks bool -} - -var ( - allIPv4 = &net.IPNet{IP: make(net.IP, 4), Mask: net.CIDRMask(0, 32)} - allIPv6 = &net.IPNet{IP: make(net.IP, 16), Mask: net.CIDRMask(0, 128)} -) - -// NetworksOption are options for Networks and NetworksWithin. -type NetworksOption func(*Networks) - -// SkipAliasedNetworks is an option for Networks and NetworksWithin that -// makes them not iterate over aliases of the IPv4 subtree in an IPv6 -// database, e.g., ::ffff:0:0/96, 2001::/32, and 2002::/16. -// -// You most likely want to set this. The only reason it isn't the default -// behavior is to provide backwards compatibility to existing users. -func SkipAliasedNetworks(networks *Networks) { - networks.skipAliasedNetworks = true -} - -// Networks returns an iterator that can be used to traverse all networks in -// the database. -// -// Please note that a MaxMind DB may map IPv4 networks into several locations -// in an IPv6 database. This iterator will iterate over all of these locations -// separately. To only iterate over the IPv4 networks once, use the -// SkipAliasedNetworks option. -func (r *Reader) Networks(options ...NetworksOption) *Networks { - var networks *Networks - if r.Metadata.IPVersion == 6 { - networks = r.NetworksWithin(allIPv6, options...) - } else { - networks = r.NetworksWithin(allIPv4, options...) - } - - return networks -} - -// NetworksWithin returns an iterator that can be used to traverse all networks -// in the database which are contained in a given network. -// -// Please note that a MaxMind DB may map IPv4 networks into several locations -// in an IPv6 database. This iterator will iterate over all of these locations -// separately. To only iterate over the IPv4 networks once, use the -// SkipAliasedNetworks option. -// -// If the provided network is contained within a network in the database, the -// iterator will iterate over exactly one network, the containing network. -func (r *Reader) NetworksWithin(network *net.IPNet, options ...NetworksOption) *Networks { - if r.Metadata.IPVersion == 4 && network.IP.To4() == nil { - return &Networks{ - err: fmt.Errorf( - "error getting networks with '%s': you attempted to use an IPv6 network in an IPv4-only database", - network.String(), - ), - } - } - - networks := &Networks{reader: r} - for _, option := range options { - option(networks) - } - - ip := network.IP - prefixLength, _ := network.Mask.Size() - - if r.Metadata.IPVersion == 6 && len(ip) == net.IPv4len { - if networks.skipAliasedNetworks { - ip = net.IP{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ip[0], ip[1], ip[2], ip[3]} - } else { - ip = ip.To16() - } - prefixLength += 96 - } - - pointer, bit := r.traverseTree(ip, 0, uint(prefixLength)) - networks.nodes = []netNode{ - { - ip: ip, - bit: uint(bit), - pointer: pointer, - }, - } - - return networks -} - -// Next prepares the next network for reading with the Network method. It -// returns true if there is another network to be processed and false if there -// are no more networks or if there is an error. -func (n *Networks) Next() bool { - if n.err != nil { - return false - } - for len(n.nodes) > 0 { - node := n.nodes[len(n.nodes)-1] - n.nodes = n.nodes[:len(n.nodes)-1] - - for node.pointer != n.reader.Metadata.NodeCount { - // This skips IPv4 aliases without hardcoding the networks that the writer - // currently aliases. - if n.skipAliasedNetworks && n.reader.ipv4Start != 0 && - node.pointer == n.reader.ipv4Start && !isInIPv4Subtree(node.ip) { - break - } - - if node.pointer > n.reader.Metadata.NodeCount { - n.lastNode = node - return true - } - ipRight := make(net.IP, len(node.ip)) - copy(ipRight, node.ip) - if len(ipRight) <= int(node.bit>>3) { - n.err = newInvalidDatabaseError( - "invalid search tree at %v/%v", ipRight, node.bit) - return false - } - ipRight[node.bit>>3] |= 1 << (7 - (node.bit % 8)) - - offset := node.pointer * n.reader.nodeOffsetMult - rightPointer := n.reader.nodeReader.readRight(offset) - - node.bit++ - n.nodes = append(n.nodes, netNode{ - pointer: rightPointer, - ip: ipRight, - bit: node.bit, - }) - - node.pointer = n.reader.nodeReader.readLeft(offset) - } - } - - return false -} - -// Network returns the current network or an error if there is a problem -// decoding the data for the network. It takes a pointer to a result value to -// decode the network's data into. -func (n *Networks) Network(result any) (*net.IPNet, error) { - if n.err != nil { - return nil, n.err - } - if err := n.reader.retrieveData(n.lastNode.pointer, result); err != nil { - return nil, err - } - - ip := n.lastNode.ip - prefixLength := int(n.lastNode.bit) - - // We do this because uses of SkipAliasedNetworks expect the IPv4 networks - // to be returned as IPv4 networks. If we are not skipping aliased - // networks, then the user will get IPv4 networks from the ::FFFF:0:0/96 - // network as Go automatically converts those. - if n.skipAliasedNetworks && isInIPv4Subtree(ip) { - ip = ip[12:] - prefixLength -= 96 - } - - return &net.IPNet{ - IP: ip, - Mask: net.CIDRMask(prefixLength, len(ip)*8), - }, nil -} - -// Err returns an error, if any, that was encountered during iteration. -func (n *Networks) Err() error { - return n.err -} - -// isInIPv4Subtree returns true if the IP is an IPv6 address in the database's -// IPv4 subtree. -func isInIPv4Subtree(ip net.IP) bool { - if len(ip) != 16 { - return false - } - for i := 0; i < 12; i++ { - if ip[i] != 0 { - return false - } - } - return true -} diff --git a/vendor/github.com/oschwald/maxminddb-golang/verifier.go b/vendor/github.com/oschwald/maxminddb-golang/verifier.go deleted file mode 100644 index b14b3e4879..0000000000 --- a/vendor/github.com/oschwald/maxminddb-golang/verifier.go +++ /dev/null @@ -1,201 +0,0 @@ -package maxminddb - -import ( - "reflect" - "runtime" -) - -type verifier struct { - reader *Reader -} - -// Verify checks that the database is valid. It validates the search tree, -// the data section, and the metadata section. This verifier is stricter than -// the specification and may return errors on databases that are readable. -func (r *Reader) Verify() error { - v := verifier{r} - if err := v.verifyMetadata(); err != nil { - return err - } - - err := v.verifyDatabase() - runtime.KeepAlive(v.reader) - return err -} - -func (v *verifier) verifyMetadata() error { - metadata := v.reader.Metadata - - if metadata.BinaryFormatMajorVersion != 2 { - return testError( - "binary_format_major_version", - 2, - metadata.BinaryFormatMajorVersion, - ) - } - - if metadata.BinaryFormatMinorVersion != 0 { - return testError( - "binary_format_minor_version", - 0, - metadata.BinaryFormatMinorVersion, - ) - } - - if metadata.DatabaseType == "" { - return testError( - "database_type", - "non-empty string", - metadata.DatabaseType, - ) - } - - if len(metadata.Description) == 0 { - return testError( - "description", - "non-empty slice", - metadata.Description, - ) - } - - if metadata.IPVersion != 4 && metadata.IPVersion != 6 { - return testError( - "ip_version", - "4 or 6", - metadata.IPVersion, - ) - } - - if metadata.RecordSize != 24 && - metadata.RecordSize != 28 && - metadata.RecordSize != 32 { - return testError( - "record_size", - "24, 28, or 32", - metadata.RecordSize, - ) - } - - if metadata.NodeCount == 0 { - return testError( - "node_count", - "positive integer", - metadata.NodeCount, - ) - } - return nil -} - -func (v *verifier) verifyDatabase() error { - offsets, err := v.verifySearchTree() - if err != nil { - return err - } - - if err := v.verifyDataSectionSeparator(); err != nil { - return err - } - - return v.verifyDataSection(offsets) -} - -func (v *verifier) verifySearchTree() (map[uint]bool, error) { - offsets := make(map[uint]bool) - - it := v.reader.Networks() - for it.Next() { - offset, err := v.reader.resolveDataPointer(it.lastNode.pointer) - if err != nil { - return nil, err - } - offsets[uint(offset)] = true - } - if err := it.Err(); err != nil { - return nil, err - } - return offsets, nil -} - -func (v *verifier) verifyDataSectionSeparator() error { - separatorStart := v.reader.Metadata.NodeCount * v.reader.Metadata.RecordSize / 4 - - separator := v.reader.buffer[separatorStart : separatorStart+dataSectionSeparatorSize] - - for _, b := range separator { - if b != 0 { - return newInvalidDatabaseError("unexpected byte in data separator: %v", separator) - } - } - return nil -} - -func (v *verifier) verifyDataSection(offsets map[uint]bool) error { - pointerCount := len(offsets) - - decoder := v.reader.decoder - - var offset uint - bufferLen := uint(len(decoder.buffer)) - for offset < bufferLen { - var data any - rv := reflect.ValueOf(&data) - newOffset, err := decoder.decode(offset, rv, 0) - if err != nil { - return newInvalidDatabaseError( - "received decoding error (%v) at offset of %v", - err, - offset, - ) - } - if newOffset <= offset { - return newInvalidDatabaseError( - "data section offset unexpectedly went from %v to %v", - offset, - newOffset, - ) - } - - pointer := offset - - if _, ok := offsets[pointer]; !ok { - return newInvalidDatabaseError( - "found data (%v) at %v that the search tree does not point to", - data, - pointer, - ) - } - delete(offsets, pointer) - - offset = newOffset - } - - if offset != bufferLen { - return newInvalidDatabaseError( - "unexpected data at the end of the data section (last offset: %v, end: %v)", - offset, - bufferLen, - ) - } - - if len(offsets) != 0 { - return newInvalidDatabaseError( - "found %v pointers (of %v) in the search tree that we did not see in the data section", - len(offsets), - pointerCount, - ) - } - return nil -} - -func testError( - field string, - expected any, - actual any, -) error { - return newInvalidDatabaseError( - "%v - Expected: %v Actual: %v", - field, - expected, - actual, - ) -} diff --git a/vendor/github.com/outcaste-io/ristretto/.deepsource.toml b/vendor/github.com/outcaste-io/ristretto/.deepsource.toml deleted file mode 100644 index 40609eff3f..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/.deepsource.toml +++ /dev/null @@ -1,17 +0,0 @@ -version = 1 - -test_patterns = [ - '**/*_test.go' -] - -exclude_patterns = [ - -] - -[[analyzers]] -name = 'go' -enabled = true - - - [analyzers.meta] - import_path = 'github.com/dgraph-io/ristretto' diff --git a/vendor/github.com/outcaste-io/ristretto/.mailmap b/vendor/github.com/outcaste-io/ristretto/.mailmap deleted file mode 100644 index 8ea0986d41..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/.mailmap +++ /dev/null @@ -1 +0,0 @@ -Manish R Jain diff --git a/vendor/github.com/outcaste-io/ristretto/CHANGELOG.md b/vendor/github.com/outcaste-io/ristretto/CHANGELOG.md deleted file mode 100644 index da964bc0c8..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/CHANGELOG.md +++ /dev/null @@ -1,172 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project will adhere to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) starting v1.0.0. - -## Unreleased - -## [0.1.0] - 2021-06-03 - -[0.1.0]: https://github.com/dgraph-io/ristretto/compare/v0.1.0..v0.0.3 -This release contains bug fixes and improvements to Ristretto. It also contains -major updates to the z package. The z package contains types such as Tree (B+ -tree), Buffer, Mmap file, etc. All these types are used in Badger and Dgraph to -improve performance and reduce memory requirements. - -### Changed -- Make item public. Add a new onReject call for rejected items. (#180) - -### Added -- Use z.Buffer backing for B+ tree (#268) -- expose GetTTL function (#270) -- docs(README): Ristretto is production-ready. (#267) -- Add IterateKV (#265) -- feat(super-flags): Add GetPath method in superflags (#258) -- add GetDuration to SuperFlag (#248) -- add Has, GetFloat64, and GetInt64 to SuperFlag (#247) -- move SuperFlag to Ristretto (#246) -- add SuperFlagHelp tool to generate flag help text (#251) -- allow empty defaults in SuperFlag (#254) -- add mmaped b+ tree (#207) -- Add API to allow the MaxCost of an existing cache to be updated. (#200) -- Add OnExit handler which can be used for manual memory management (#183) -- Add life expectancy histogram (#182) -- Add mechanism to wait for items to be processed. (#184) - -### Fixed -- change expiration type from int64 to time.Time (#277) -- fix(buffer): make buffer capacity atleast defaultCapacity (#273) -- Fixes for z.PersistentTree (#272) -- Initialize persistent tree correctly (#271) -- use xxhash v2 (#266) -- update comments to correctly reflect counter space usage (#189) -- enable riscv64 builds (#264) -- Switch from log to glog (#263) -- Use Fibonacci for latency numbers -- cache: fix race when clearning a cache (#261) -- Check for keys without values in superflags (#259) -- chore(perf): using tags instead of runtime callers to improve the performance of leak detection (#255) -- fix(Flags): panic on user errors (#256) -- fix SuperFlagHelp newline (#252) -- fix(arm): Fix crashing under ARMv6 due to memory mis-alignment (#239) -- Fix incorrect unit test coverage depiction (#245) -- chore(histogram): adding percentile in histogram (#241) -- fix(windows): use filepath instead of path (#244) -- fix(MmapFile): Close the fd before deleting the file (#242) -- Fixes CGO_ENABLED=0 compilation error (#240) -- fix(build): fix build on non-amd64 architectures (#238) -- fix(b+tree): Do not double the size of btree (#237) -- fix(jemalloc): Fix the stats of jemalloc (#236) -- Don't print stuff, only return strings. -- Bring memclrNoHeapPointers to z (#235) -- increase number of buffers from 32 to 64 in allocator (#234) -- Set minSize to 1MB. -- Opt(btree): Use Go memory instead of mmap files -- Opt(btree): Lightweight stats calculation -- Put padding internally to z.Buffer -- Chore(z): Add SetTmpDir API to set the temp directory (#233) -- Add a BufferFrom -- Bring z.Allocator and z.AllocatorPool back -- Fix(z.Allocator): Make Allocator use Go memory -- Updated ZeroOut to use a simple for loop. (#231) -- Add concurrency back -- Add a test to check concurrency of Allocator. -- Fix(buffer): Expose padding by z.Buffer's APIs and fix test (#222) -- AllocateSlice should Truncate if the file is not big enough (#226) -- Zero out allocations for structs now that we're reusing Allocators. -- Fix the ristretto substring -- Deal with nil z.AllocatorPool -- Create an AllocatorPool class. -- chore(btree): clean NewTree API (#225) -- fix(MmapFile): Don't error out if fileSize > sz (#224) -- feat(btree): allow option to reset btree and mmaping it to specified file. (#223) -- Use mremap on Linux instead of munmap+mmap (#221) -- Reuse pages in B+ tree (#220) -- fix(allocator): make nil allocator return go byte slice (#217) -- fix(buffer): Make padding internal to z.buffer (#216) -- chore(buffer): add a parent directory field in z.Buffer (#215) -- Make Allocator concurrent -- Fix infinite loop in allocator (#214) -- Add trim func -- Use allocator pool. Turn off freelist. -- Add freelists to Allocator to reuse. -- make DeleteBelow delete values that are less than lo (#211) -- Avoid an unnecessary Load procedure in IncrementOffset. -- Add Stats method in Btree. -- chore(script): fix local test script (#210) -- fix(btree): Increase buffer size if needed. (#209) -- chore(btree): add occupancy ratio, search benchmark and compact bug fix (#208) -- Add licenses, remove prints, and fix a bug in compact -- Add IncrementOffset API for z.buffers (#206) -- Show count when printing histogram (#201) -- Zbuffer: Add LenNoPadding and make padding 8 bytes (#204) -- Allocate Go memory in case allocator is nil. -- Add leak detection via leak build flag and fix a leak during cache.Close. -- Add some APIs for allocator and buffer -- Sync before truncation or close. -- Handle nil MmapFile for Sync. -- Public methods must not panic after Close() (#202) -- Check for RD_ONLY correctly. -- Modify MmapFile APIs -- Add a bunch of APIs around MmapFile -- Move APIs for mmapfile creation over to z package. -- Add ZeroOut func -- Add SliceOffsets -- z: Add TotalSize method on bloom filter (#197) -- Add Msync func -- Buffer: Use 256 GB mmap size instead of MaxInt64 (#198) -- Add a simple test to check next2Pow -- Improve memory performance (#195) -- Have a way to automatically mmap a growing buffer (#196) -- Introduce Mmapped buffers and Merge Sort (#194) -- Add a way to access an allocator via reference. -- Use jemalloc.a to ensure compilation with the Go binary -- Fix up a build issue with ReadMemStats -- Add ReadMemStats function (#193) -- Allocator helps allocate memory to be used by unsafe structs (#192) -- Improve histogram output -- Move Closer from y to z (#191) -- Add histogram.Mean() method (#188) -- Introduce Calloc: Manual Memory Management via jemalloc (#186) - -## [0.0.3] - 2020-07-06 - -[0.0.3]: https://github.com/dgraph-io/ristretto/compare/v0.0.2..v0.0.3 - -### Changed - -### Added - -### Fixed - -- z: use MemHashString and xxhash.Sum64String ([#153][]) -- Check conflict key before updating expiration map. ([#154][]) -- Fix race condition in Cache.Clear ([#133][]) -- Improve handling of updated items ([#168][]) -- Fix droppedSets count while updating the item ([#171][]) - -## [0.0.2] - 2020-02-24 - -[0.0.2]: https://github.com/dgraph-io/ristretto/compare/v0.0.1..v0.0.2 - -### Added - -- Sets with TTL. ([#122][]) - -### Fixed - -- Fix the way metrics are handled for deletions. ([#111][]) -- Support nil `*Cache` values in `Clear` and `Close`. ([#119][]) -- Delete item immediately. ([#113][]) -- Remove key from policy after TTL eviction. ([#130][]) - -[#111]: https://github.com/dgraph-io/ristretto/issues/111 -[#113]: https://github.com/dgraph-io/ristretto/issues/113 -[#119]: https://github.com/dgraph-io/ristretto/issues/119 -[#122]: https://github.com/dgraph-io/ristretto/issues/122 -[#130]: https://github.com/dgraph-io/ristretto/issues/130 - -## 0.0.1 - -First release. Basic cache functionality based on a LFU policy. diff --git a/vendor/github.com/outcaste-io/ristretto/LICENSE b/vendor/github.com/outcaste-io/ristretto/LICENSE deleted file mode 100644 index d9a10c0d8e..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - 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 diff --git a/vendor/github.com/outcaste-io/ristretto/README.md b/vendor/github.com/outcaste-io/ristretto/README.md deleted file mode 100644 index 80a43ec147..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/README.md +++ /dev/null @@ -1,237 +0,0 @@ -# Ristretto -[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg)](http://godoc.org/github.com/outcaste-io/ristretto) -[![Go Report Card](https://img.shields.io/badge/go%20report-A%2B-brightgreen)](https://goreportcard.com/report/github.com/outcaste-io/ristretto) -[![Coverage](https://gocover.io/_badge/github.com/outcaste-io/ristretto)](https://gocover.io/github.com/outcaste-io/ristretto) -![Tests](https://github.com/outcaste-io/ristretto/workflows/tests/badge.svg) - -**This is a fork of dgraph-io/ristretto, maintained by @manishrjain.** - -Ristretto is a fast, concurrent cache library built with a focus on performance and correctness. - -The motivation to build Ristretto comes from the need for a contention-free -cache. - -[issues]: https://github.com/outcaste-io/issues - -## Features - -* **High Hit Ratios** - with our unique admission/eviction policy pairing, Ristretto's performance is best in class. - * **Eviction: SampledLFU** - on par with exact LRU and better performance on Search and Database traces. - * **Admission: TinyLFU** - extra performance with little memory overhead (12 bits per counter). -* **Fast Throughput** - we use a variety of techniques for managing contention and the result is excellent throughput. -* **Cost-Based Eviction** - any large new item deemed valuable can evict multiple smaller items (cost could be anything). -* **Fully Concurrent** - you can use as many goroutines as you want with little throughput degradation. -* **Metrics** - optional performance metrics for throughput, hit ratios, and other stats. -* **Simple API** - just figure out your ideal `Config` values and you're off and running. - -## Note on jemalloc - -We have been using jemalloc v5.2.1. -To use jemalloc, please configure jemalloc with these flags: - -``` -./configure --with-install-suffix='_outcaste' --with-jemalloc-prefix='je_' --with-malloc-conf='background_thread:true,metadata_thp:auto'; \ -make -make install_lib install_include # Use sudo if needed in this step. -``` - -outserv/outserv Makefile has these build steps already present. You can run -`make jemalloc` to install it. This jemalloc would not interfere with any other -jemalloc installation that might already be present on the system. - - -## Status - -Ristretto is production-ready. See [Projects using Ristretto](#projects-using-ristretto). - -## Table of Contents - -* [Usage](#Usage) - * [Example](#Example) - * [Config](#Config) - * [NumCounters](#Config) - * [MaxCost](#Config) - * [BufferItems](#Config) - * [Metrics](#Config) - * [OnEvict](#Config) - * [KeyToHash](#Config) - * [Cost](#Config) -* [Benchmarks](#Benchmarks) - * [Hit Ratios](#Hit-Ratios) - * [Search](#Search) - * [Database](#Database) - * [Looping](#Looping) - * [CODASYL](#CODASYL) - * [Throughput](#Throughput) - * [Mixed](#Mixed) - * [Read](#Read) - * [Write](#Write) -* [Projects using Ristretto](#projects-using-ristretto) -* [FAQ](#FAQ) - -## Usage - -### Example - -```go -func main() { - cache, err := ristretto.NewCache(&ristretto.Config{ - NumCounters: 1e7, // number of keys to track frequency of (10M). - MaxCost: 1 << 30, // maximum cost of cache (1GB). - BufferItems: 64, // number of keys per Get buffer. - }) - if err != nil { - panic(err) - } - - // set a value with a cost of 1 - cache.Set("key", "value", 1) - - // wait for value to pass through buffers - cache.Wait() - - value, found := cache.Get("key") - if !found { - panic("missing value") - } - fmt.Println(value) - cache.Del("key") -} -``` - -### Config - -The `Config` struct is passed to `NewCache` when creating Ristretto instances (see the example above). - -**NumCounters** `int64` - -NumCounters is the number of 4-bit access counters to keep for admission and eviction. We've seen good performance in setting this to 10x the number of items you expect to keep in the cache when full. - -For example, if you expect each item to have a cost of 1 and MaxCost is 100, set NumCounters to 1,000. Or, if you use variable cost values but expect the cache to hold around 10,000 items when full, set NumCounters to 100,000. The important thing is the *number of unique items* in the full cache, not necessarily the MaxCost value. - -**MaxCost** `int64` - -MaxCost is how eviction decisions are made. For example, if MaxCost is 100 and a new item with a cost of 1 increases total cache cost to 101, 1 item will be evicted. - -MaxCost can also be used to denote the max size in bytes. For example, if MaxCost is 1,000,000 (1MB) and the cache is full with 1,000 1KB items, a new item (that's accepted) would cause 5 1KB items to be evicted. - -MaxCost could be anything as long as it matches how you're using the cost values when calling Set. - -**BufferItems** `int64` - -BufferItems is the size of the Get buffers. The best value we've found for this is 64. - -If for some reason you see Get performance decreasing with lots of contention (you shouldn't), try increasing this value in increments of 64. This is a fine-tuning mechanism and you probably won't have to touch this. - -**Metrics** `bool` - -Metrics is true when you want real-time logging of a variety of stats. The reason this is a Config flag is because there's a 10% throughput performance overhead. - -**OnEvict** `func(hashes [2]uint64, value interface{}, cost int64)` - -OnEvict is called for every eviction. - -**KeyToHash** `func(key interface{}) [2]uint64` - -KeyToHash is the hashing algorithm used for every key. If this is nil, Ristretto has a variety of [defaults depending on the underlying interface type](https://github.com/outcaste-io/ristretto/blob/master/z/z.go#L19-L41). - -Note that if you want 128bit hashes you should use the full `[2]uint64`, -otherwise just fill the `uint64` at the `0` position and it will behave like -any 64bit hash. - -**Cost** `func(value interface{}) int64` - -Cost is an optional function you can pass to the Config in order to evaluate -item cost at runtime, and only for the Set calls that aren't dropped (this is -useful if calculating item cost is particularly expensive and you don't want to -waste time on items that will be dropped anyways). - -To signal to Ristretto that you'd like to use this Cost function: - -1. Set the Cost field to a non-nil function. -2. When calling Set for new items or item updates, use a `cost` of 0. - -## Benchmarks - -The benchmarks can be found in https://github.com/dgraph-io/benchmarks/tree/master/cachebench/ristretto. - -### Hit Ratios - -#### Search - -This trace is described as "disk read accesses initiated by a large commercial -search engine in response to various web search requests." - -

    - -

    - -#### Database - -This trace is described as "a database server running at a commercial site -running an ERP application on top of a commercial database." - -

    - -

    - -#### Looping - -This trace demonstrates a looping access pattern. - -

    - -

    - -#### CODASYL - -This trace is described as "references to a CODASYL database for a one hour -period." - -

    - -

    - -### Throughput - -All throughput benchmarks were ran on an Intel Core i7-8700K (3.7GHz) with 16gb -of RAM. - -#### Mixed - -

    - -

    - -#### Read - -

    - -

    - -#### Write - -

    - -

    - -## Projects Using Ristretto - -Below is a list of known projects that use Ristretto: - -- [Badger](https://github.com/dgraph-io/badger) - Embeddable key-value DB in Go -- [Dgraph](https://github.com/dgraph-io/dgraph) - Horizontally scalable and distributed GraphQL database with a graph backend -- [Vitess](https://github.com/vitessio/vitess) - Database clustering system for horizontal scaling of MySQL -- [SpiceDB](https://github.com/authzed/spicedb) - Horizontally scalable permissions database - -## FAQ - -### How are you achieving this performance? What shortcuts are you taking? - -We go into detail in the [Ristretto blog post](https://blog.dgraph.io/post/introducing-ristretto-high-perf-go-cache/), but in short: our throughput performance can be attributed to a mix of batching and eventual consistency. Our hit ratio performance is mostly due to an excellent [admission policy](https://arxiv.org/abs/1512.00727) and SampledLFU eviction policy. - -As for "shortcuts," the only thing Ristretto does that could be construed as one is dropping some Set calls. That means a Set call for a new item (updates are guaranteed) isn't guaranteed to make it into the cache. The new item could be dropped at two points: when passing through the Set buffer or when passing through the admission policy. However, this doesn't affect hit ratios much at all as we expect the most popular items to be Set multiple times and eventually make it in the cache. - -### Is Ristretto distributed? - -No, it's just like any other Go library that you can import into your project and use in a single process. diff --git a/vendor/github.com/outcaste-io/ristretto/cache.go b/vendor/github.com/outcaste-io/ristretto/cache.go deleted file mode 100644 index 18e3647e8c..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/cache.go +++ /dev/null @@ -1,520 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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. - */ - -// Ristretto is a fast, fixed size, in-memory cache with a dual focus on -// throughput and hit ratio performance. You can easily add Ristretto to an -// existing system and keep the most valuable data where you need it. -package ristretto - -import ( - "errors" - "sync" - "time" - "unsafe" - - "github.com/outcaste-io/ristretto/z" - "go.uber.org/atomic" -) - -var ( - // TODO: find the optimal value for this or make it configurable - setBufSize = 32 * 1024 -) - -type itemCallback func(*Item) - -const itemSize = int64(unsafe.Sizeof(storeItem{})) - -// Cache is a thread-safe implementation of a hashmap with a TinyLFU admission -// policy and a Sampled LFU eviction policy. You can use the same Cache instance -// from as many goroutines as you want. -type Cache struct { - // store is the central concurrent hashmap where key-value items are stored. - store *shardedMap - // policy determines what gets let in to the cache and what gets kicked out. - policy *lfuPolicy - // getBuf is a custom ring buffer implementation that gets pushed to when - // keys are read. - getBuf *ringBuffer - // setBuf is a buffer allowing us to batch/drop Sets during times of high - // contention. - setBuf chan *Item - // onEvict is called for item evictions. - onEvict itemCallback - // onReject is called when an item is rejected via admission policy. - onReject itemCallback - // onExit is called whenever a value goes out of scope from the cache. - onExit (func(interface{})) - // KeyToHash function is used to customize the key hashing algorithm. - // Each key will be hashed using the provided function. If keyToHash value - // is not set, the default keyToHash function is used. - keyToHash func(interface{}) (uint64, uint64) - // stop is used to stop the processItems goroutine. - stop chan struct{} - // indicates whether cache is closed. - isClosed atomic.Bool - // cost calculates cost from a value. - cost func(value interface{}) int64 - // ignoreInternalCost dictates whether to ignore the cost of internally storing - // the item in the cost calculation. - ignoreInternalCost bool - // cleanupTicker is used to periodically check for entries whose TTL has passed. - cleanupTicker *time.Ticker - // Metrics contains a running log of important statistics like hits, misses, - // and dropped items. - Metrics *Metrics -} - -// Config is passed to NewCache for creating new Cache instances. -type Config struct { - // NumCounters determines the number of counters (keys) to keep that hold - // access frequency information. It's generally a good idea to have more - // counters than the max cache capacity, as this will improve eviction - // accuracy and subsequent hit ratios. - // - // For example, if you expect your cache to hold 1,000,000 items when full, - // NumCounters should be 10,000,000 (10x). Each counter takes up roughly - // 3 bytes (4 bits for each counter * 4 copies plus about a byte per - // counter for the bloom filter). Note that the number of counters is - // internally rounded up to the nearest power of 2, so the space usage - // may be a little larger than 3 bytes * NumCounters. - NumCounters int64 - // MaxCost can be considered as the cache capacity, in whatever units you - // choose to use. - // - // For example, if you want the cache to have a max capacity of 100MB, you - // would set MaxCost to 100,000,000 and pass an item's number of bytes as - // the `cost` parameter for calls to Set. If new items are accepted, the - // eviction process will take care of making room for the new item and not - // overflowing the MaxCost value. - MaxCost int64 - // BufferItems determines the size of Get buffers. - // - // Unless you have a rare use case, using `64` as the BufferItems value - // results in good performance. - BufferItems int64 - // Metrics determines whether cache statistics are kept during the cache's - // lifetime. There *is* some overhead to keeping statistics, so you should - // only set this flag to true when testing or throughput performance isn't a - // major factor. - Metrics bool - // OnEvict is called for every eviction and passes the hashed key, value, - // and cost to the function. - OnEvict func(item *Item) - // OnReject is called for every rejection done via the policy. - OnReject func(item *Item) - // OnExit is called whenever a value is removed from cache. This can be - // used to do manual memory deallocation. Would also be called on eviction - // and rejection of the value. - OnExit func(val interface{}) - // KeyToHash function is used to customize the key hashing algorithm. - // Each key will be hashed using the provided function. If keyToHash value - // is not set, the default keyToHash function is used. - KeyToHash func(key interface{}) (uint64, uint64) - // shouldUpdate is called when a value already exists in cache and is being updated. - ShouldUpdate func(prev, cur interface{}) bool - // Cost evaluates a value and outputs a corresponding cost. This function - // is ran after Set is called for a new item or an item update with a cost - // param of 0. - Cost func(value interface{}) int64 - // IgnoreInternalCost set to true indicates to the cache that the cost of - // internally storing the value should be ignored. This is useful when the - // cost passed to set is not using bytes as units. Keep in mind that setting - // this to true will increase the memory usage. - IgnoreInternalCost bool -} - -type itemFlag byte - -const ( - itemNew itemFlag = iota - itemDelete - itemUpdate -) - -// Item is passed to setBuf so items can eventually be added to the cache. -type Item struct { - flag itemFlag - Key uint64 - Conflict uint64 - Value interface{} - Cost int64 - Expiration time.Time - wg *sync.WaitGroup -} - -// NewCache returns a new Cache instance and any configuration errors, if any. -func NewCache(config *Config) (*Cache, error) { - switch { - case config.NumCounters == 0: - return nil, errors.New("NumCounters can't be zero") - case config.MaxCost == 0: - return nil, errors.New("MaxCost can't be zero") - case config.BufferItems == 0: - return nil, errors.New("BufferItems can't be zero") - } - policy := newPolicy(config.NumCounters, config.MaxCost) - cache := &Cache{ - store: newShardedMap(config.ShouldUpdate), - policy: policy, - getBuf: newRingBuffer(policy, config.BufferItems), - setBuf: make(chan *Item, setBufSize), - keyToHash: config.KeyToHash, - stop: make(chan struct{}), - cost: config.Cost, - ignoreInternalCost: config.IgnoreInternalCost, - cleanupTicker: time.NewTicker(time.Duration(bucketDurationSecs) * time.Second / 2), - } - cache.onExit = func(val interface{}) { - if config.OnExit != nil && val != nil { - config.OnExit(val) - } - } - cache.onEvict = func(item *Item) { - if config.OnEvict != nil { - config.OnEvict(item) - } - cache.onExit(item.Value) - } - cache.onReject = func(item *Item) { - if config.OnReject != nil { - config.OnReject(item) - } - cache.onExit(item.Value) - } - cache.store.shouldUpdate = func(prev, cur interface{}) bool { - if config.ShouldUpdate != nil { - return config.ShouldUpdate(prev, cur) - } - return true - } - if cache.keyToHash == nil { - cache.keyToHash = z.KeyToHash - } - if config.Metrics { - cache.collectMetrics() - } - // NOTE: benchmarks seem to show that performance decreases the more - // goroutines we have running cache.processItems(), so 1 should - // usually be sufficient - go cache.processItems() - return cache, nil -} - -func (c *Cache) Wait() { - if c == nil || c.isClosed.Load() { - return - } - wg := &sync.WaitGroup{} - wg.Add(1) - c.setBuf <- &Item{wg: wg} - wg.Wait() -} - -// Get returns the value (if any) and a boolean representing whether the -// value was found or not. The value can be nil and the boolean can be true at -// the same time. -func (c *Cache) Get(key interface{}) (interface{}, bool) { - if c == nil || c.isClosed.Load() || key == nil { - return nil, false - } - keyHash, conflictHash := c.keyToHash(key) - c.getBuf.Push(keyHash) - value, ok := c.store.Get(keyHash, conflictHash) - if ok { - c.Metrics.add(hit, keyHash, 1) - } else { - c.Metrics.add(miss, keyHash, 1) - } - return value, ok -} - -// Set attempts to add the key-value item to the cache. If it returns false, -// then the Set was dropped and the key-value item isn't added to the cache. If -// it returns true, there's still a chance it could be dropped by the policy if -// its determined that the key-value item isn't worth keeping, but otherwise the -// item will be added and other items will be evicted in order to make room. -// -// To dynamically evaluate the items cost using the Config.Coster function, set -// the cost parameter to 0 and Coster will be ran when needed in order to find -// the items true cost. -func (c *Cache) Set(key, value interface{}, cost int64) bool { - return c.SetWithTTL(key, value, cost, 0*time.Second) -} - -// SetWithTTL works like Set but adds a key-value pair to the cache that will expire -// after the specified TTL (time to live) has passed. A zero value means the value never -// expires, which is identical to calling Set. A negative value is a no-op and the value -// is discarded. -func (c *Cache) SetWithTTL(key, value interface{}, cost int64, ttl time.Duration) bool { - return c.setInternal(key, value, cost, ttl, false) -} - -// SetIfPresent is like Set, but only updates the value of an existing key. It -// does NOT add the key to cache if it's absent. -func (c *Cache) SetIfPresent(key, value interface{}, cost int64) bool { - return c.setInternal(key, value, cost, 0*time.Second, true) -} - -func (c *Cache) setInternal(key, value interface{}, - cost int64, ttl time.Duration, onlyUpdate bool) bool { - if c == nil || c.isClosed.Load() || key == nil { - return false - } - - var expiration time.Time - switch { - case ttl == 0: - // No expiration. - break - case ttl < 0: - // Treat this a a no-op. - return false - default: - expiration = time.Now().Add(ttl) - } - - keyHash, conflictHash := c.keyToHash(key) - i := &Item{ - flag: itemNew, - Key: keyHash, - Conflict: conflictHash, - Value: value, - Cost: cost, - Expiration: expiration, - } - if onlyUpdate { - i.flag = itemUpdate - } - // cost is eventually updated. The expiration must also be immediately updated - // to prevent items from being prematurely removed from the map. - if prev, ok := c.store.Update(i); ok { - c.onExit(prev) - i.flag = itemUpdate - } else if onlyUpdate { - // The instruction was to update the key, but store.Update failed. So, - // this is a NOOP. - return false - } - // Attempt to send item to policy. - select { - case c.setBuf <- i: - return true - default: - if i.flag == itemUpdate { - // Return true if this was an update operation since we've already - // updated the store. For all the other operations (set/delete), we - // return false which means the item was not inserted. - return true - } - c.Metrics.add(dropSets, keyHash, 1) - return false - } -} - -// Del deletes the key-value item from the cache if it exists. -func (c *Cache) Del(key interface{}) { - if c == nil || c.isClosed.Load() || key == nil { - return - } - keyHash, conflictHash := c.keyToHash(key) - // Delete immediately. - _, prev := c.store.Del(keyHash, conflictHash) - c.onExit(prev) - // If we've set an item, it would be applied slightly later. - // So we must push the same item to `setBuf` with the deletion flag. - // This ensures that if a set is followed by a delete, it will be - // applied in the correct order. - c.setBuf <- &Item{ - flag: itemDelete, - Key: keyHash, - Conflict: conflictHash, - } -} - -// GetTTL returns the TTL for the specified key and a bool that is true if the -// item was found and is not expired. -func (c *Cache) GetTTL(key interface{}) (time.Duration, bool) { - if c == nil || key == nil { - return 0, false - } - - keyHash, conflictHash := c.keyToHash(key) - if _, ok := c.store.Get(keyHash, conflictHash); !ok { - // not found - return 0, false - } - - expiration := c.store.Expiration(keyHash) - if expiration.IsZero() { - // found but no expiration - return 0, true - } - - if time.Now().After(expiration) { - // found but expired - return 0, false - } - - return time.Until(expiration), true -} - -// Close stops all goroutines and closes all channels. -func (c *Cache) Close() { - if c == nil || c.isClosed.Load() { - return - } - c.Clear() - - // Block until processItems goroutine is returned. - c.stop <- struct{}{} - close(c.stop) - close(c.setBuf) - c.policy.Close() - c.isClosed.Store(true) -} - -// Clear empties the hashmap and zeroes all policy counters. Note that this is -// not an atomic operation (but that shouldn't be a problem as it's assumed that -// Set/Get calls won't be occurring until after this). -func (c *Cache) Clear() { - if c == nil || c.isClosed.Load() { - return - } - // Block until processItems goroutine is returned. - c.stop <- struct{}{} - - // Clear out the setBuf channel. -loop: - for { - select { - case i := <-c.setBuf: - if i.wg != nil { - i.wg.Done() - continue - } - if i.flag != itemUpdate { - // In itemUpdate, the value is already set in the store. So, no need to call - // onEvict here. - c.onEvict(i) - } - default: - break loop - } - } - - // Clear value hashmap and policy data. - c.policy.Clear() - c.store.Clear(c.onEvict) - // Only reset metrics if they're enabled. - if c.Metrics != nil { - c.Metrics.Clear() - } - // Restart processItems goroutine. - go c.processItems() -} - -// MaxCost returns the max cost of the cache. -func (c *Cache) MaxCost() int64 { - if c == nil { - return 0 - } - return c.policy.MaxCost() -} - -// UpdateMaxCost updates the maxCost of an existing cache. -func (c *Cache) UpdateMaxCost(maxCost int64) { - if c == nil { - return - } - c.policy.UpdateMaxCost(maxCost) -} - -// processItems is ran by goroutines processing the Set buffer. -func (c *Cache) processItems() { - startTs := make(map[uint64]time.Time) - numToKeep := 100000 // TODO: Make this configurable via options. - - trackAdmission := func(key uint64) { - if c.Metrics == nil { - return - } - startTs[key] = time.Now() - if len(startTs) > numToKeep { - for k := range startTs { - if len(startTs) <= numToKeep { - break - } - delete(startTs, k) - } - } - } - onEvict := func(i *Item) { - if ts, has := startTs[i.Key]; has { - c.Metrics.trackEviction(int64(time.Since(ts) / time.Second)) - delete(startTs, i.Key) - } - if c.onEvict != nil { - c.onEvict(i) - } - } - - for { - select { - case i := <-c.setBuf: - if i.wg != nil { - i.wg.Done() - continue - } - // Calculate item cost value if new or update. - if i.Cost == 0 && c.cost != nil && i.flag != itemDelete { - i.Cost = c.cost(i.Value) - } - if !c.ignoreInternalCost { - // Add the cost of internally storing the object. - i.Cost += itemSize - } - - switch i.flag { - case itemNew: - victims, added := c.policy.Add(i.Key, i.Cost) - if added { - c.store.Set(i) - c.Metrics.add(keyAdd, i.Key, 1) - trackAdmission(i.Key) - } else { - c.onReject(i) - } - for _, victim := range victims { - victim.Conflict, victim.Value = c.store.Del(victim.Key, 0) - onEvict(victim) - } - - case itemUpdate: - c.policy.Update(i.Key, i.Cost) - - case itemDelete: - c.policy.Del(i.Key) // Deals with metrics updates. - _, val := c.store.Del(i.Key, i.Conflict) - c.onExit(val) - } - case <-c.cleanupTicker.C: - c.store.Cleanup(c.policy, onEvict) - case <-c.stop: - return - } - } -} diff --git a/vendor/github.com/outcaste-io/ristretto/metrics.go b/vendor/github.com/outcaste-io/ristretto/metrics.go deleted file mode 100644 index c2db77fad4..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/metrics.go +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright 2021 Dgraph Labs, Inc. and Contributors - * - * 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 ristretto - -import ( - "bytes" - "fmt" - "sync" - "sync/atomic" - - "github.com/outcaste-io/ristretto/z" -) - -type metricType int - -const ( - // The following 2 keep track of hits and misses. - hit = iota - miss - // The following 3 keep track of number of keys added, updated and evicted. - keyAdd - keyUpdate - keyEvict - // The following 2 keep track of cost of keys added and evicted. - costAdd - costEvict - // The following keep track of how many sets were dropped or rejected later. - dropSets - rejectSets - // The following 2 keep track of how many gets were kept and dropped on the - // floor. - dropGets - keepGets - // This should be the final enum. Other enums should be set before this. - doNotUse -) - -func stringFor(t metricType) string { - switch t { - case hit: - return "hit" - case miss: - return "miss" - case keyAdd: - return "keys-added" - case keyUpdate: - return "keys-updated" - case keyEvict: - return "keys-evicted" - case costAdd: - return "cost-added" - case costEvict: - return "cost-evicted" - case dropSets: - return "sets-dropped" - case rejectSets: - return "sets-rejected" // by policy. - case dropGets: - return "gets-dropped" - case keepGets: - return "gets-kept" - default: - return "unidentified" - } -} - -// Metrics is a snapshot of performance statistics for the lifetime of a cache instance. -type Metrics struct { - all [doNotUse][]*uint64 - - mu sync.RWMutex - life *z.HistogramData // Tracks the life expectancy of a key. -} - -// collectMetrics just creates a new *Metrics instance and adds the pointers -// to the cache and policy instances. -func (c *Cache) collectMetrics() { - c.Metrics = newMetrics() - c.policy.CollectMetrics(c.Metrics) -} - -func newMetrics() *Metrics { - s := &Metrics{ - life: z.NewHistogramData(z.HistogramBounds(1, 16)), - } - for i := 0; i < doNotUse; i++ { - s.all[i] = make([]*uint64, 256) - slice := s.all[i] - for j := range slice { - slice[j] = new(uint64) - } - } - return s -} - -func (p *Metrics) add(t metricType, hash, delta uint64) { - if p == nil { - return - } - valp := p.all[t] - // Avoid false sharing by padding at least 64 bytes of space between two - // atomic counters which would be incremented. - idx := (hash % 25) * 10 - atomic.AddUint64(valp[idx], delta) -} - -func (p *Metrics) get(t metricType) uint64 { - if p == nil { - return 0 - } - valp := p.all[t] - var total uint64 - for i := range valp { - total += atomic.LoadUint64(valp[i]) - } - return total -} - -// Hits is the number of Get calls where a value was found for the corresponding key. -func (p *Metrics) Hits() uint64 { - return p.get(hit) -} - -// Misses is the number of Get calls where a value was not found for the corresponding key. -func (p *Metrics) Misses() uint64 { - return p.get(miss) -} - -// KeysAdded is the total number of Set calls where a new key-value item was added. -func (p *Metrics) KeysAdded() uint64 { - return p.get(keyAdd) -} - -// KeysUpdated is the total number of Set calls where the value was updated. -func (p *Metrics) KeysUpdated() uint64 { - return p.get(keyUpdate) -} - -// KeysEvicted is the total number of keys evicted. -func (p *Metrics) KeysEvicted() uint64 { - return p.get(keyEvict) -} - -// CostAdded is the sum of costs that have been added (successful Set calls). -func (p *Metrics) CostAdded() uint64 { - return p.get(costAdd) -} - -// CostEvicted is the sum of all costs that have been evicted. -func (p *Metrics) CostEvicted() uint64 { - return p.get(costEvict) -} - -// SetsDropped is the number of Set calls that don't make it into internal -// buffers (due to contention or some other reason). -func (p *Metrics) SetsDropped() uint64 { - return p.get(dropSets) -} - -// SetsRejected is the number of Set calls rejected by the policy (TinyLFU). -func (p *Metrics) SetsRejected() uint64 { - return p.get(rejectSets) -} - -// GetsDropped is the number of Get counter increments that are dropped -// internally. -func (p *Metrics) GetsDropped() uint64 { - return p.get(dropGets) -} - -// GetsKept is the number of Get counter increments that are kept. -func (p *Metrics) GetsKept() uint64 { - return p.get(keepGets) -} - -// Ratio is the number of Hits over all accesses (Hits + Misses). This is the -// percentage of successful Get calls. -func (p *Metrics) Ratio() float64 { - if p == nil { - return 0.0 - } - hits, misses := p.get(hit), p.get(miss) - if hits == 0 && misses == 0 { - return 0.0 - } - return float64(hits) / float64(hits+misses) -} - -func (p *Metrics) trackEviction(numSeconds int64) { - if p == nil { - return - } - p.mu.Lock() - defer p.mu.Unlock() - p.life.Update(numSeconds) -} - -func (p *Metrics) LifeExpectancySeconds() *z.HistogramData { - if p == nil { - return nil - } - p.mu.RLock() - defer p.mu.RUnlock() - return p.life.Copy() -} - -// Clear resets all the metrics. -func (p *Metrics) Clear() { - if p == nil { - return - } - for i := 0; i < doNotUse; i++ { - for j := range p.all[i] { - atomic.StoreUint64(p.all[i][j], 0) - } - } - p.mu.Lock() - p.life = z.NewHistogramData(z.HistogramBounds(1, 16)) - p.mu.Unlock() -} - -// String returns a string representation of the metrics. -func (p *Metrics) String() string { - if p == nil { - return "" - } - var buf bytes.Buffer - for i := 0; i < doNotUse; i++ { - t := metricType(i) - fmt.Fprintf(&buf, "%s: %d ", stringFor(t), p.get(t)) - } - fmt.Fprintf(&buf, "gets-total: %d ", p.get(hit)+p.get(miss)) - fmt.Fprintf(&buf, "hit-ratio: %.2f", p.Ratio()) - return buf.String() -} diff --git a/vendor/github.com/outcaste-io/ristretto/policy.go b/vendor/github.com/outcaste-io/ristretto/policy.go deleted file mode 100644 index 58a65f9931..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/policy.go +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 ristretto - -import ( - "math" - "sync" - "sync/atomic" - - "github.com/outcaste-io/ristretto/z" -) - -const ( - // lfuSample is the number of items to sample when looking at eviction - // candidates. 5 seems to be the most optimal number [citation needed]. - lfuSample = 5 -) - -// lfuPolicy encapsulates eviction/admission behavior. -type lfuPolicy struct { - sync.Mutex - admit *tinyLFU - costs *keyCosts - itemsCh chan []uint64 - stop chan struct{} - isClosed bool - metrics *Metrics -} - -func newPolicy(numCounters, maxCost int64) *lfuPolicy { - p := &lfuPolicy{ - admit: newTinyLFU(numCounters), - costs: newSampledLFU(maxCost), - itemsCh: make(chan []uint64, 3), - stop: make(chan struct{}), - } - go p.processItems() - return p -} - -func (p *lfuPolicy) CollectMetrics(metrics *Metrics) { - p.metrics = metrics - p.costs.metrics = metrics -} - -type policyPair struct { - key uint64 - cost int64 -} - -func (p *lfuPolicy) processItems() { - for { - select { - case items := <-p.itemsCh: - p.Lock() - p.admit.Push(items) - p.Unlock() - case <-p.stop: - return - } - } -} - -func (p *lfuPolicy) Push(keys []uint64) bool { - if p.isClosed { - return false - } - - if len(keys) == 0 { - return true - } - - select { - case p.itemsCh <- keys: - p.metrics.add(keepGets, keys[0], uint64(len(keys))) - return true - default: - p.metrics.add(dropGets, keys[0], uint64(len(keys))) - return false - } -} - -// Add decides whether the item with the given key and cost should be accepted by -// the policy. It returns the list of victims that have been evicted and a boolean -// indicating whether the incoming item should be accepted. -func (p *lfuPolicy) Add(key uint64, cost int64) ([]*Item, bool) { - p.Lock() - defer p.Unlock() - - // Cannot add an item bigger than entire cache. - if cost > p.costs.getMaxCost() { - return nil, false - } - - // No need to go any further if the item is already in the cache. - if has := p.costs.updateIfHas(key, cost); has { - // An update does not count as an addition, so return false. - return nil, false - } - - // If the execution reaches this point, the key doesn't exist in the cache. - // Calculate the remaining room in the cache (usually bytes). - room := p.costs.roomLeft(cost) - if room >= 0 { - // There's enough room in the cache to store the new item without - // overflowing. Do that now and stop here. - p.costs.add(key, cost) - p.metrics.add(costAdd, key, uint64(cost)) - return nil, true - } - - // incHits is the hit count for the incoming item. - incHits := p.admit.Estimate(key) - // sample is the eviction candidate pool to be filled via random sampling. - // TODO: perhaps we should use a min heap here. Right now our time - // complexity is N for finding the min. Min heap should bring it down to - // O(lg N). - sample := make([]*policyPair, 0, lfuSample) - // As items are evicted they will be appended to victims. - victims := make([]*Item, 0) - - // Delete victims until there's enough space or a minKey is found that has - // more hits than incoming item. - for ; room < 0; room = p.costs.roomLeft(cost) { - // Fill up empty slots in sample. - sample = p.costs.fillSample(sample) - - // Find minimally used item in sample. - minKey, minHits, minId, minCost := uint64(0), int64(math.MaxInt64), 0, int64(0) - for i, pair := range sample { - // Look up hit count for sample key. - if hits := p.admit.Estimate(pair.key); hits < minHits { - minKey, minHits, minId, minCost = pair.key, hits, i, pair.cost - } - } - - // If the incoming item isn't worth keeping in the policy, reject. - if incHits < minHits { - p.metrics.add(rejectSets, key, 1) - return victims, false - } - - // Delete the victim from metadata. - p.costs.del(minKey) - - // Delete the victim from sample. - sample[minId] = sample[len(sample)-1] - sample = sample[:len(sample)-1] - // Store victim in evicted victims slice. - victims = append(victims, &Item{ - Key: minKey, - Conflict: 0, - Cost: minCost, - }) - } - - p.costs.add(key, cost) - p.metrics.add(costAdd, key, uint64(cost)) - return victims, true -} - -func (p *lfuPolicy) Has(key uint64) bool { - p.Lock() - _, exists := p.costs.keyCosts[key] - p.Unlock() - return exists -} - -func (p *lfuPolicy) Del(key uint64) { - p.Lock() - p.costs.del(key) - p.Unlock() -} - -func (p *lfuPolicy) Cap() int64 { - p.Lock() - capacity := int64(p.costs.getMaxCost() - p.costs.used) - p.Unlock() - return capacity -} - -func (p *lfuPolicy) Update(key uint64, cost int64) { - p.Lock() - p.costs.updateIfHas(key, cost) - p.Unlock() -} - -func (p *lfuPolicy) Cost(key uint64) int64 { - p.Lock() - if cost, found := p.costs.keyCosts[key]; found { - p.Unlock() - return cost - } - p.Unlock() - return -1 -} - -func (p *lfuPolicy) Clear() { - p.Lock() - p.admit.clear() - p.costs.clear() - p.Unlock() -} - -func (p *lfuPolicy) Close() { - if p.isClosed { - return - } - - // Block until the p.processItems goroutine returns. - p.stop <- struct{}{} - close(p.stop) - close(p.itemsCh) - p.isClosed = true -} - -func (p *lfuPolicy) MaxCost() int64 { - if p == nil || p.costs == nil { - return 0 - } - return p.costs.getMaxCost() -} - -func (p *lfuPolicy) UpdateMaxCost(maxCost int64) { - if p == nil || p.costs == nil { - return - } - p.costs.updateMaxCost(maxCost) -} - -// keyCosts stores key-cost pairs. -type keyCosts struct { - // NOTE: align maxCost to 64-bit boundary for use with atomic. - // As per https://golang.org/pkg/sync/atomic/: "On ARM, x86-32, - // and 32-bit MIPS, it is the caller’s responsibility to arrange - // for 64-bit alignment of 64-bit words accessed atomically. - // The first word in a variable or in an allocated struct, array, - // or slice can be relied upon to be 64-bit aligned." - maxCost int64 - used int64 - metrics *Metrics - keyCosts map[uint64]int64 -} - -func newSampledLFU(maxCost int64) *keyCosts { - return &keyCosts{ - keyCosts: make(map[uint64]int64), - maxCost: maxCost, - } -} - -func (p *keyCosts) getMaxCost() int64 { - return atomic.LoadInt64(&p.maxCost) -} - -func (p *keyCosts) updateMaxCost(maxCost int64) { - atomic.StoreInt64(&p.maxCost, maxCost) -} - -func (p *keyCosts) roomLeft(cost int64) int64 { - return p.getMaxCost() - (p.used + cost) -} - -func (p *keyCosts) fillSample(in []*policyPair) []*policyPair { - if len(in) >= lfuSample { - return in - } - for key, cost := range p.keyCosts { - in = append(in, &policyPair{key, cost}) - if len(in) >= lfuSample { - return in - } - } - return in -} - -func (p *keyCosts) del(key uint64) { - cost, ok := p.keyCosts[key] - if !ok { - return - } - p.used -= cost - delete(p.keyCosts, key) - p.metrics.add(costEvict, key, uint64(cost)) - p.metrics.add(keyEvict, key, 1) -} - -func (p *keyCosts) add(key uint64, cost int64) { - p.keyCosts[key] = cost - p.used += cost -} - -func (p *keyCosts) updateIfHas(key uint64, cost int64) bool { - if prev, found := p.keyCosts[key]; found { - // Update the cost of an existing key, but don't worry about evicting. - // Evictions will be handled the next time a new item is added. - p.metrics.add(keyUpdate, key, 1) - if prev > cost { - diff := prev - cost - p.metrics.add(costAdd, key, ^uint64(uint64(diff)-1)) - } else if cost > prev { - diff := cost - prev - p.metrics.add(costAdd, key, uint64(diff)) - } - p.used += cost - prev - p.keyCosts[key] = cost - return true - } - return false -} - -func (p *keyCosts) clear() { - p.used = 0 - p.keyCosts = make(map[uint64]int64) -} - -// tinyLFU is an admission helper that keeps track of access frequency using -// tiny (4-bit) counters in the form of a count-min sketch. -// tinyLFU is NOT thread safe. -type tinyLFU struct { - freq *cmSketch - door *z.Bloom - incrs int64 - resetAt int64 -} - -func newTinyLFU(numCounters int64) *tinyLFU { - return &tinyLFU{ - freq: newCmSketch(numCounters), - door: z.NewBloomFilter(float64(numCounters), 0.01), - resetAt: numCounters, - } -} - -func (p *tinyLFU) Push(keys []uint64) { - for _, key := range keys { - p.Increment(key) - } -} - -func (p *tinyLFU) Estimate(key uint64) int64 { - hits := p.freq.Estimate(key) - if p.door.Has(key) { - hits++ - } - return hits -} - -func (p *tinyLFU) Increment(key uint64) { - // Flip doorkeeper bit if not already done. - if added := p.door.AddIfNotHas(key); !added { - // Increment count-min counter if doorkeeper bit is already set. - p.freq.Increment(key) - } - p.incrs++ - if p.incrs >= p.resetAt { - p.reset() - } -} - -func (p *tinyLFU) reset() { - // Zero out incrs. - p.incrs = 0 - // clears doorkeeper bits - p.door.Clear() - // halves count-min counters - p.freq.Reset() -} - -func (p *tinyLFU) clear() { - p.incrs = 0 - p.door.Clear() - p.freq.Clear() -} diff --git a/vendor/github.com/outcaste-io/ristretto/ring.go b/vendor/github.com/outcaste-io/ristretto/ring.go deleted file mode 100644 index 5dbed4cc59..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/ring.go +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 ristretto - -import ( - "sync" -) - -// ringConsumer is the user-defined object responsible for receiving and -// processing items in batches when buffers are drained. -type ringConsumer interface { - Push([]uint64) bool -} - -// ringStripe is a singular ring buffer that is not concurrent safe. -type ringStripe struct { - cons ringConsumer - data []uint64 - capa int -} - -func newRingStripe(cons ringConsumer, capa int64) *ringStripe { - return &ringStripe{ - cons: cons, - data: make([]uint64, 0, capa), - capa: int(capa), - } -} - -// Push appends an item in the ring buffer and drains (copies items and -// sends to Consumer) if full. -func (s *ringStripe) Push(item uint64) { - s.data = append(s.data, item) - // Decide if the ring buffer should be drained. - if len(s.data) >= s.capa { - // Send elements to consumer and create a new ring stripe. - if s.cons.Push(s.data) { - s.data = make([]uint64, 0, s.capa) - } else { - s.data = s.data[:0] - } - } -} - -// ringBuffer stores multiple buffers (stripes) and distributes Pushed items -// between them to lower contention. -// -// This implements the "batching" process described in the BP-Wrapper paper -// (section III part A). -type ringBuffer struct { - pool *sync.Pool -} - -// newRingBuffer returns a striped ring buffer. The Consumer in ringConfig will -// be called when individual stripes are full and need to drain their elements. -func newRingBuffer(cons ringConsumer, capa int64) *ringBuffer { - // LOSSY buffers use a very simple sync.Pool for concurrently reusing - // stripes. We do lose some stripes due to GC (unheld items in sync.Pool - // are cleared), but the performance gains generally outweigh the small - // percentage of elements lost. The performance primarily comes from - // low-level runtime functions used in the standard library that aren't - // available to us (such as runtime_procPin()). - return &ringBuffer{ - pool: &sync.Pool{ - New: func() interface{} { return newRingStripe(cons, capa) }, - }, - } -} - -// Push adds an element to one of the internal stripes and possibly drains if -// the stripe becomes full. -func (b *ringBuffer) Push(item uint64) { - // Reuse or create a new stripe. - stripe := b.pool.Get().(*ringStripe) - stripe.Push(item) - b.pool.Put(stripe) -} diff --git a/vendor/github.com/outcaste-io/ristretto/sketch.go b/vendor/github.com/outcaste-io/ristretto/sketch.go deleted file mode 100644 index 10f414689a..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/sketch.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 package includes multiple probabalistic data structures needed for -// admission/eviction metadata. Most are Counting Bloom Filter variations, but -// a caching-specific feature that is also required is a "freshness" mechanism, -// which basically serves as a "lifetime" process. This freshness mechanism -// was described in the original TinyLFU paper [1], but other mechanisms may -// be better suited for certain data distributions. -// -// [1]: https://arxiv.org/abs/1512.00727 -package ristretto - -import ( - "fmt" - "math/rand" - "time" -) - -// cmSketch is a Count-Min sketch implementation with 4-bit counters, heavily -// based on Damian Gryski's CM4 [1]. -// -// [1]: https://github.com/dgryski/go-tinylfu/blob/master/cm4.go -type cmSketch struct { - rows [cmDepth]cmRow - seed [cmDepth]uint64 - mask uint64 -} - -const ( - // cmDepth is the number of counter copies to store (think of it as rows). - cmDepth = 4 -) - -func newCmSketch(numCounters int64) *cmSketch { - if numCounters == 0 { - panic("cmSketch: bad numCounters") - } - // Get the next power of 2 for better cache performance. - numCounters = next2Power(numCounters) - sketch := &cmSketch{mask: uint64(numCounters - 1)} - // Initialize rows of counters and seeds. - source := rand.New(rand.NewSource(time.Now().UnixNano())) - for i := 0; i < cmDepth; i++ { - sketch.seed[i] = source.Uint64() - sketch.rows[i] = newCmRow(numCounters) - } - return sketch -} - -// Increment increments the count(ers) for the specified key. -func (s *cmSketch) Increment(hashed uint64) { - for i := range s.rows { - s.rows[i].increment((hashed ^ s.seed[i]) & s.mask) - } -} - -// Estimate returns the value of the specified key. -func (s *cmSketch) Estimate(hashed uint64) int64 { - min := byte(255) - for i := range s.rows { - val := s.rows[i].get((hashed ^ s.seed[i]) & s.mask) - if val < min { - min = val - } - } - return int64(min) -} - -// Reset halves all counter values. -func (s *cmSketch) Reset() { - for _, r := range s.rows { - r.reset() - } -} - -// Clear zeroes all counters. -func (s *cmSketch) Clear() { - for _, r := range s.rows { - r.clear() - } -} - -// cmRow is a row of bytes, with each byte holding two counters. -type cmRow []byte - -func newCmRow(numCounters int64) cmRow { - return make(cmRow, numCounters/2) -} - -func (r cmRow) get(n uint64) byte { - return byte(r[n/2]>>((n&1)*4)) & 0x0f -} - -func (r cmRow) increment(n uint64) { - // Index of the counter. - i := n / 2 - // Shift distance (even 0, odd 4). - s := (n & 1) * 4 - // Counter value. - v := (r[i] >> s) & 0x0f - // Only increment if not max value (overflow wrap is bad for LFU). - if v < 15 { - r[i] += 1 << s - } -} - -func (r cmRow) reset() { - // Halve each counter. - for i := range r { - r[i] = (r[i] >> 1) & 0x77 - } -} - -func (r cmRow) clear() { - // Zero each counter. - for i := range r { - r[i] = 0 - } -} - -func (r cmRow) string() string { - s := "" - for i := uint64(0); i < uint64(len(r)*2); i++ { - s += fmt.Sprintf("%02d ", (r[(i/2)]>>((i&1)*4))&0x0f) - } - s = s[:len(s)-1] - return s -} - -// next2Power rounds x up to the next power of 2, if it's not already one. -func next2Power(x int64) int64 { - x-- - x |= x >> 1 - x |= x >> 2 - x |= x >> 4 - x |= x >> 8 - x |= x >> 16 - x |= x >> 32 - x++ - return x -} diff --git a/vendor/github.com/outcaste-io/ristretto/store.go b/vendor/github.com/outcaste-io/ristretto/store.go deleted file mode 100644 index 5d5395c8d0..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/store.go +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 ristretto - -import ( - "sync" - "time" -) - -// TODO: Do we need this to be a separate struct from Item? -type storeItem struct { - key uint64 - conflict uint64 - value interface{} - expiration time.Time -} - -const numShards uint64 = 256 - -type updateFn func(prev, cur interface{}) bool -type shardedMap struct { - shards []*lockedMap - expiryMap *expirationMap - shouldUpdate func(prev, cur interface{}) bool -} - -// newShardedMap is safe for concurrent usage. -func newShardedMap(fn updateFn) *shardedMap { - sm := &shardedMap{ - shards: make([]*lockedMap, int(numShards)), - expiryMap: newExpirationMap(), - } - if fn == nil { - fn = func(prev, cur interface{}) bool { - return true - } - } - for i := range sm.shards { - sm.shards[i] = newLockedMap(fn, sm.expiryMap) - } - return sm -} - -func (sm *shardedMap) Get(key, conflict uint64) (interface{}, bool) { - return sm.shards[key%numShards].get(key, conflict) -} - -func (sm *shardedMap) Expiration(key uint64) time.Time { - return sm.shards[key%numShards].Expiration(key) -} - -func (sm *shardedMap) Set(i *Item) { - if i == nil { - // If item is nil make this Set a no-op. - return - } - - sm.shards[i.Key%numShards].Set(i) -} - -func (sm *shardedMap) Del(key, conflict uint64) (uint64, interface{}) { - return sm.shards[key%numShards].Del(key, conflict) -} - -func (sm *shardedMap) Update(newItem *Item) (interface{}, bool) { - return sm.shards[newItem.Key%numShards].Update(newItem) -} - -func (sm *shardedMap) Cleanup(policy *lfuPolicy, onEvict itemCallback) { - sm.expiryMap.cleanup(sm, policy, onEvict) -} - -func (sm *shardedMap) Clear(onEvict itemCallback) { - for i := uint64(0); i < numShards; i++ { - sm.shards[i].Clear(onEvict) - } -} - -type lockedMap struct { - sync.RWMutex - data map[uint64]storeItem - em *expirationMap - shouldUpdate updateFn -} - -func newLockedMap(fn updateFn, em *expirationMap) *lockedMap { - return &lockedMap{ - data: make(map[uint64]storeItem), - em: em, - shouldUpdate: fn, - } -} - -func (m *lockedMap) get(key, conflict uint64) (interface{}, bool) { - m.RLock() - item, ok := m.data[key] - m.RUnlock() - if !ok { - return nil, false - } - if conflict != 0 && (conflict != item.conflict) { - return nil, false - } - - // Handle expired items. - if !item.expiration.IsZero() && time.Now().After(item.expiration) { - return nil, false - } - return item.value, true -} - -func (m *lockedMap) Expiration(key uint64) time.Time { - m.RLock() - defer m.RUnlock() - return m.data[key].expiration -} - -func (m *lockedMap) Set(i *Item) { - if i == nil { - // If the item is nil make this Set a no-op. - return - } - - m.Lock() - defer m.Unlock() - item, ok := m.data[i.Key] - - if ok { - // The item existed already. We need to check the conflict key and reject the - // update if they do not match. Only after that the expiration map is updated. - if i.Conflict != 0 && (i.Conflict != item.conflict) { - return - } - if !m.shouldUpdate(item.value, i.Value) { - return - } - m.em.update(i.Key, i.Conflict, item.expiration, i.Expiration) - } else { - // The value is not in the map already. There's no need to return anything. - // Simply add the expiration map. - m.em.add(i.Key, i.Conflict, i.Expiration) - } - - m.data[i.Key] = storeItem{ - key: i.Key, - conflict: i.Conflict, - value: i.Value, - expiration: i.Expiration, - } -} - -func (m *lockedMap) Del(key, conflict uint64) (uint64, interface{}) { - m.Lock() - item, ok := m.data[key] - if !ok { - m.Unlock() - return 0, nil - } - if conflict != 0 && (conflict != item.conflict) { - m.Unlock() - return 0, nil - } - - if !item.expiration.IsZero() { - m.em.del(key, item.expiration) - } - - delete(m.data, key) - m.Unlock() - return item.conflict, item.value -} - -func (m *lockedMap) Update(newItem *Item) (interface{}, bool) { - m.Lock() - defer m.Unlock() - - item, ok := m.data[newItem.Key] - if !ok { - return nil, false - } - if newItem.Conflict != 0 && (newItem.Conflict != item.conflict) { - return nil, false - } - if !m.shouldUpdate(item.value, newItem.Value) { - return item.value, false - } - - m.em.update(newItem.Key, newItem.Conflict, item.expiration, newItem.Expiration) - m.data[newItem.Key] = storeItem{ - key: newItem.Key, - conflict: newItem.Conflict, - value: newItem.Value, - expiration: newItem.Expiration, - } - return item.value, true -} - -func (m *lockedMap) Clear(onEvict itemCallback) { - m.Lock() - i := &Item{} - if onEvict != nil { - for _, si := range m.data { - i.Key = si.key - i.Conflict = si.conflict - i.Value = si.value - onEvict(i) - } - } - m.data = make(map[uint64]storeItem) - m.Unlock() -} diff --git a/vendor/github.com/outcaste-io/ristretto/test.sh b/vendor/github.com/outcaste-io/ristretto/test.sh deleted file mode 100644 index 99fdc99a38..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/test.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/sh - -starttest() { - set -e - GO111MODULE=on go test -race ./... -} - -if [ -z "${TEAMCITY_VERSION}" ]; then - # running locally, so start test in a container - # TEAMCITY_VERSION=local will avoid recursive calls, when it would be running in container - docker run --rm --name ristretto-test -ti \ - -v `pwd`:/go/src/github.com/outcaste-io/ristretto \ - --workdir /go/src/github.com/outcaste-io/ristretto \ - --env TEAMCITY_VERSION=local \ - golang:1.16 \ - sh test.sh -else - # running in teamcity, since teamcity itself run this in container, let's simply run this - starttest -fi diff --git a/vendor/github.com/outcaste-io/ristretto/ttl.go b/vendor/github.com/outcaste-io/ristretto/ttl.go deleted file mode 100644 index 6e4bf38bfe..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/ttl.go +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 ristretto - -import ( - "sync" - "time" -) - -var ( - // TODO: find the optimal value or make it configurable. - bucketDurationSecs = int64(5) -) - -func storageBucket(t time.Time) int64 { - return (t.Unix() / bucketDurationSecs) + 1 -} - -func cleanupBucket(t time.Time) int64 { - // The bucket to cleanup is always behind the storage bucket by one so that - // no elements in that bucket (which might not have expired yet) are deleted. - return storageBucket(t) - 1 -} - -// bucket type is a map of key to conflict. -type bucket map[uint64]uint64 - -// expirationMap is a map of bucket number to the corresponding bucket. -type expirationMap struct { - sync.RWMutex - buckets map[int64]bucket -} - -func newExpirationMap() *expirationMap { - return &expirationMap{ - buckets: make(map[int64]bucket), - } -} - -func (m *expirationMap) add(key, conflict uint64, expiration time.Time) { - if m == nil { - return - } - - // Items that don't expire don't need to be in the expiration map. - if expiration.IsZero() { - return - } - - bucketNum := storageBucket(expiration) - m.Lock() - defer m.Unlock() - - b, ok := m.buckets[bucketNum] - if !ok { - b = make(bucket) - m.buckets[bucketNum] = b - } - b[key] = conflict -} - -func (m *expirationMap) update(key, conflict uint64, oldExpTime, newExpTime time.Time) { - if m == nil { - return - } - if oldExpTime.IsZero() && newExpTime.IsZero() { - return - } - - m.Lock() - defer m.Unlock() - - oldBucketNum := storageBucket(oldExpTime) - newBucketNum := storageBucket(newExpTime) - if oldBucketNum == newBucketNum { - // No change. - return - } - - oldBucket, ok := m.buckets[oldBucketNum] - if ok { - delete(oldBucket, key) - } - - newBucket, ok := m.buckets[newBucketNum] - if !ok { - newBucket = make(bucket) - m.buckets[newBucketNum] = newBucket - } - newBucket[key] = conflict -} - -func (m *expirationMap) del(key uint64, expiration time.Time) { - if m == nil { - return - } - - bucketNum := storageBucket(expiration) - m.Lock() - defer m.Unlock() - _, ok := m.buckets[bucketNum] - if !ok { - return - } - delete(m.buckets[bucketNum], key) -} - -// cleanup removes all the items in the bucket that was just completed. It deletes -// those items from the store, and calls the onEvict function on those items. -// This function is meant to be called periodically. -func (m *expirationMap) cleanup(store *shardedMap, policy *lfuPolicy, onEvict itemCallback) { - if m == nil { - return - } - - m.Lock() - now := time.Now() - bucketNum := cleanupBucket(now) - keys := m.buckets[bucketNum] - delete(m.buckets, bucketNum) - m.Unlock() - - for key, conflict := range keys { - // Sanity check. Verify that the store agrees that this key is expired. - if store.Expiration(key).After(now) { - continue - } - - cost := policy.Cost(key) - policy.Del(key) - _, value := store.Del(key, conflict) - - if onEvict != nil { - onEvict(&Item{Key: key, - Conflict: conflict, - Value: value, - Cost: cost, - }) - } - } -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/LICENSE b/vendor/github.com/outcaste-io/ristretto/z/LICENSE deleted file mode 100644 index 0860cbfe85..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/LICENSE +++ /dev/null @@ -1,64 +0,0 @@ -bbloom.go - -// The MIT License (MIT) -// Copyright (c) 2014 Andreas Briese, eduToolbox@Bri-C GmbH, Sarstedt - -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -rtutil.go - -// MIT License - -// Copyright (c) 2019 Ewan Chou - -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -Modifications: - -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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/outcaste-io/ristretto/z/README.md b/vendor/github.com/outcaste-io/ristretto/z/README.md deleted file mode 100644 index 6d77e146eb..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/README.md +++ /dev/null @@ -1,129 +0,0 @@ -## bbloom: a bitset Bloom filter for go/golang -=== - -package implements a fast bloom filter with real 'bitset' and JSONMarshal/JSONUnmarshal to store/reload the Bloom filter. - -NOTE: the package uses unsafe.Pointer to set and read the bits from the bitset. If you're uncomfortable with using the unsafe package, please consider using my bloom filter package at github.com/AndreasBriese/bloom - -=== - -changelog 11/2015: new thread safe methods AddTS(), HasTS(), AddIfNotHasTS() following a suggestion from Srdjan Marinovic (github @a-little-srdjan), who used this to code a bloomfilter cache. - -This bloom filter was developed to strengthen a website-log database and was tested and optimized for this log-entry mask: "2014/%02i/%02i %02i:%02i:%02i /info.html". -Nonetheless bbloom should work with any other form of entries. - -~~Hash function is a modified Berkeley DB sdbm hash (to optimize for smaller strings). sdbm http://www.cse.yorku.ca/~oz/hash.html~~ - -Found sipHash (SipHash-2-4, a fast short-input PRF created by Jean-Philippe Aumasson and Daniel J. Bernstein.) to be about as fast. sipHash had been ported by Dimtry Chestnyk to Go (github.com/dchest/siphash ) - -Minimum hashset size is: 512 ([4]uint64; will be set automatically). - -###install - -```sh -go get github.com/AndreasBriese/bbloom -``` - -###test -+ change to folder ../bbloom -+ create wordlist in file "words.txt" (you might use `python permut.py`) -+ run 'go test -bench=.' within the folder - -```go -go test -bench=. -``` - -~~If you've installed the GOCONVEY TDD-framework http://goconvey.co/ you can run the tests automatically.~~ - -using go's testing framework now (have in mind that the op timing is related to 65536 operations of Add, Has, AddIfNotHas respectively) - -### usage - -after installation add - -```go -import ( - ... - "github.com/AndreasBriese/bbloom" - ... - ) -``` - -at your header. In the program use - -```go -// create a bloom filter for 65536 items and 1 % wrong-positive ratio -bf := bbloom.New(float64(1<<16), float64(0.01)) - -// or -// create a bloom filter with 650000 for 65536 items and 7 locs per hash explicitly -// bf = bbloom.New(float64(650000), float64(7)) -// or -bf = bbloom.New(650000.0, 7.0) - -// add one item -bf.Add([]byte("butter")) - -// Number of elements added is exposed now -// Note: ElemNum will not be included in JSON export (for compatability to older version) -nOfElementsInFilter := bf.ElemNum - -// check if item is in the filter -isIn := bf.Has([]byte("butter")) // should be true -isNotIn := bf.Has([]byte("Butter")) // should be false - -// 'add only if item is new' to the bloomfilter -added := bf.AddIfNotHas([]byte("butter")) // should be false because 'butter' is already in the set -added = bf.AddIfNotHas([]byte("buTTer")) // should be true because 'buTTer' is new - -// thread safe versions for concurrent use: AddTS, HasTS, AddIfNotHasTS -// add one item -bf.AddTS([]byte("peanutbutter")) -// check if item is in the filter -isIn = bf.HasTS([]byte("peanutbutter")) // should be true -isNotIn = bf.HasTS([]byte("peanutButter")) // should be false -// 'add only if item is new' to the bloomfilter -added = bf.AddIfNotHasTS([]byte("butter")) // should be false because 'peanutbutter' is already in the set -added = bf.AddIfNotHasTS([]byte("peanutbuTTer")) // should be true because 'penutbuTTer' is new - -// convert to JSON ([]byte) -Json := bf.JSONMarshal() - -// bloomfilters Mutex is exposed for external un-/locking -// i.e. mutex lock while doing JSON conversion -bf.Mtx.Lock() -Json = bf.JSONMarshal() -bf.Mtx.Unlock() - -// restore a bloom filter from storage -bfNew := bbloom.JSONUnmarshal(Json) - -isInNew := bfNew.Has([]byte("butter")) // should be true -isNotInNew := bfNew.Has([]byte("Butter")) // should be false - -``` - -to work with the bloom filter. - -### why 'fast'? - -It's about 3 times faster than William Fitzgeralds bitset bloom filter https://github.com/willf/bloom . And it is about so fast as my []bool set variant for Boom filters (see https://github.com/AndreasBriese/bloom ) but having a 8times smaller memory footprint: - - - Bloom filter (filter size 524288, 7 hashlocs) - github.com/AndreasBriese/bbloom 'Add' 65536 items (10 repetitions): 6595800 ns (100 ns/op) - github.com/AndreasBriese/bbloom 'Has' 65536 items (10 repetitions): 5986600 ns (91 ns/op) - github.com/AndreasBriese/bloom 'Add' 65536 items (10 repetitions): 6304684 ns (96 ns/op) - github.com/AndreasBriese/bloom 'Has' 65536 items (10 repetitions): 6568663 ns (100 ns/op) - - github.com/willf/bloom 'Add' 65536 items (10 repetitions): 24367224 ns (371 ns/op) - github.com/willf/bloom 'Test' 65536 items (10 repetitions): 21881142 ns (333 ns/op) - github.com/dataence/bloom/standard 'Add' 65536 items (10 repetitions): 23041644 ns (351 ns/op) - github.com/dataence/bloom/standard 'Check' 65536 items (10 repetitions): 19153133 ns (292 ns/op) - github.com/cabello/bloom 'Add' 65536 items (10 repetitions): 131921507 ns (2012 ns/op) - github.com/cabello/bloom 'Contains' 65536 items (10 repetitions): 131108962 ns (2000 ns/op) - -(on MBPro15 OSX10.8.5 i7 4Core 2.4Ghz) - - -With 32bit bloom filters (bloom32) using modified sdbm, bloom32 does hashing with only 2 bit shifts, one xor and one substraction per byte. smdb is about as fast as fnv64a but gives less collisions with the dataset (see mask above). bloom.New(float64(10 * 1<<16),float64(7)) populated with 1<<16 random items from the dataset (see above) and tested against the rest results in less than 0.05% collisions. diff --git a/vendor/github.com/outcaste-io/ristretto/z/allocator.go b/vendor/github.com/outcaste-io/ristretto/z/allocator.go deleted file mode 100644 index db00ff5eca..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/allocator.go +++ /dev/null @@ -1,403 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "bytes" - "fmt" - "math" - "math/bits" - "math/rand" - "strings" - "sync" - "sync/atomic" - "time" - "unsafe" - - "github.com/dustin/go-humanize" -) - -// Allocator amortizes the cost of small allocations by allocating memory in -// bigger chunks. Internally it uses z.Calloc to allocate memory. Once -// allocated, the memory is not moved, so it is safe to use the allocated bytes -// to unsafe cast them to Go struct pointers. Maintaining a freelist is slow. -// Instead, Allocator only allocates memory, with the idea that finally we -// would just release the entire Allocator. -type Allocator struct { - sync.Mutex - compIdx uint64 // Stores bufIdx in 32 MSBs and posIdx in 32 LSBs. - buffers [][]byte - Ref uint64 - Tag string -} - -// allocs keeps references to all Allocators, so we can safely discard them later. -var allocsMu *sync.Mutex -var allocRef uint64 -var allocs map[uint64]*Allocator -var calculatedLog2 []int - -func init() { - allocsMu = new(sync.Mutex) - allocs = make(map[uint64]*Allocator) - - // Set up a unique Ref per process. - rand.Seed(time.Now().UnixNano()) - allocRef = uint64(rand.Int63n(1<<16)) << 48 - - calculatedLog2 = make([]int, 1025) - for i := 1; i <= 1024; i++ { - calculatedLog2[i] = int(math.Log2(float64(i))) - } -} - -// NewAllocator creates an allocator starting with the given size. -func NewAllocator(sz int, tag string) *Allocator { - ref := atomic.AddUint64(&allocRef, 1) - // We should not allow a zero sized page because addBufferWithMinSize - // will run into an infinite loop trying to double the pagesize. - if sz < 512 { - sz = 512 - } - a := &Allocator{ - Ref: ref, - buffers: make([][]byte, 64), - Tag: tag, - } - l2 := uint64(log2(sz)) - if bits.OnesCount64(uint64(sz)) > 1 { - l2 += 1 - } - a.buffers[0] = Calloc(1<> 32), int(pos & 0xFFFFFFFF) -} - -// Size returns the size of the allocations so far. -func (a *Allocator) Size() int { - pos := atomic.LoadUint64(&a.compIdx) - bi, pi := parse(pos) - var sz int - for i, b := range a.buffers { - if i < bi { - sz += len(b) - continue - } - sz += pi - return sz - } - panic("Size should not reach here") -} - -func log2(sz int) int { - if sz < len(calculatedLog2) { - return calculatedLog2[sz] - } - pow := 10 - sz >>= 10 - for sz > 1 { - sz >>= 1 - pow++ - } - return pow -} - -func (a *Allocator) Allocated() uint64 { - var alloc int - for _, b := range a.buffers { - alloc += cap(b) - } - return uint64(alloc) -} - -func (a *Allocator) TrimTo(max int) { - var alloc int - for i, b := range a.buffers { - if len(b) == 0 { - break - } - alloc += len(b) - if alloc < max { - continue - } - Free(b) - a.buffers[i] = nil - } -} - -// Release would release the memory back. Remember to make this call to avoid memory leaks. -func (a *Allocator) Release() { - if a == nil { - return - } - - var alloc int - for _, b := range a.buffers { - if len(b) == 0 { - break - } - alloc += len(b) - Free(b) - } - - allocsMu.Lock() - delete(allocs, a.Ref) - allocsMu.Unlock() -} - -const maxAlloc = 1 << 30 - -func (a *Allocator) MaxAlloc() int { - return maxAlloc -} - -const nodeAlign = unsafe.Sizeof(uint64(0)) - 1 - -func (a *Allocator) AllocateAligned(sz int) []byte { - tsz := sz + int(nodeAlign) - out := a.Allocate(tsz) - // We are reusing allocators. In that case, it's important to zero out the memory allocated - // here. We don't always zero it out (in Allocate), because other functions would be immediately - // overwriting the allocated slices anyway (see Copy). - ZeroOut(out, 0, len(out)) - - addr := uintptr(unsafe.Pointer(&out[0])) - aligned := (addr + nodeAlign) & ^nodeAlign - start := int(aligned - addr) - - return out[start : start+sz] -} - -func (a *Allocator) Copy(buf []byte) []byte { - if a == nil { - return append([]byte{}, buf...) - } - out := a.Allocate(len(buf)) - copy(out, buf) - return out -} - -func (a *Allocator) addBufferAt(bufIdx, minSz int) { - for { - if bufIdx >= len(a.buffers) { - panic(fmt.Sprintf("Allocator can not allocate more than %d buffers", len(a.buffers))) - } - if len(a.buffers[bufIdx]) == 0 { - break - } - if minSz <= len(a.buffers[bufIdx]) { - // No need to do anything. We already have a buffer which can satisfy minSz. - return - } - bufIdx++ - } - assert(bufIdx > 0) - // We need to allocate a new buffer. - // Make pageSize double of the last allocation. - pageSize := 2 * len(a.buffers[bufIdx-1]) - // Ensure pageSize is bigger than sz. - for pageSize < minSz { - pageSize *= 2 - } - // If bigger than maxAlloc, trim to maxAlloc. - if pageSize > maxAlloc { - pageSize = maxAlloc - } - - buf := Calloc(pageSize, a.Tag) - assert(len(a.buffers[bufIdx]) == 0) - a.buffers[bufIdx] = buf -} - -func (a *Allocator) Allocate(sz int) []byte { - if a == nil { - return make([]byte, sz) - } - if sz > maxAlloc { - panic(fmt.Sprintf("Unable to allocate more than %d\n", maxAlloc)) - } - if sz == 0 { - return nil - } - for { - pos := atomic.AddUint64(&a.compIdx, uint64(sz)) - bufIdx, posIdx := parse(pos) - buf := a.buffers[bufIdx] - if posIdx > len(buf) { - a.Lock() - newPos := atomic.LoadUint64(&a.compIdx) - newBufIdx, _ := parse(newPos) - if newBufIdx != bufIdx { - a.Unlock() - continue - } - a.addBufferAt(bufIdx+1, sz) - atomic.StoreUint64(&a.compIdx, uint64((bufIdx+1)<<32)) - a.Unlock() - // We added a new buffer. Let's acquire slice the right way by going back to the top. - continue - } - data := buf[posIdx-sz : posIdx] - return data - } -} - -type AllocatorPool struct { - numGets int64 - allocCh chan *Allocator - closer *Closer -} - -func NewAllocatorPool(sz int) *AllocatorPool { - a := &AllocatorPool{ - allocCh: make(chan *Allocator, sz), - closer: NewCloser(1), - } - go a.freeupAllocators() - return a -} - -func (p *AllocatorPool) Get(sz int, tag string) *Allocator { - if p == nil { - return NewAllocator(sz, tag) - } - atomic.AddInt64(&p.numGets, 1) - select { - case alloc := <-p.allocCh: - alloc.Reset() - alloc.Tag = tag - return alloc - default: - return NewAllocator(sz, tag) - } -} -func (p *AllocatorPool) Return(a *Allocator) { - if a == nil { - return - } - if p == nil { - a.Release() - return - } - a.TrimTo(400 << 20) - - select { - case p.allocCh <- a: - return - default: - a.Release() - } -} - -func (p *AllocatorPool) Release() { - if p == nil { - return - } - p.closer.SignalAndWait() -} - -func (p *AllocatorPool) freeupAllocators() { - defer p.closer.Done() - - ticker := time.NewTicker(2 * time.Second) - defer ticker.Stop() - - releaseOne := func() bool { - select { - case alloc := <-p.allocCh: - alloc.Release() - return true - default: - return false - } - } - - var last int64 - for { - select { - case <-p.closer.HasBeenClosed(): - close(p.allocCh) - for alloc := range p.allocCh { - alloc.Release() - } - return - - case <-ticker.C: - gets := atomic.LoadInt64(&p.numGets) - if gets != last { - // Some retrievals were made since the last time. So, let's avoid doing a release. - last = gets - continue - } - releaseOne() - } - } -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/bbloom.go b/vendor/github.com/outcaste-io/ristretto/z/bbloom.go deleted file mode 100644 index 4d657e4e1e..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/bbloom.go +++ /dev/null @@ -1,209 +0,0 @@ -// The MIT License (MIT) -// Copyright (c) 2014 Andreas Briese, eduToolbox@Bri-C GmbH, Sarstedt - -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -package z - -import ( - "bytes" - "encoding/json" - "math" - "unsafe" -) - -// helper -var mask = []uint8{1, 2, 4, 8, 16, 32, 64, 128} - -func getSize(ui64 uint64) (size uint64, exponent uint64) { - if ui64 < uint64(512) { - ui64 = uint64(512) - } - size = uint64(1) - for size < ui64 { - size <<= 1 - exponent++ - } - return size, exponent -} - -func calcSizeByWrongPositives(numEntries, wrongs float64) (uint64, uint64) { - size := -1 * numEntries * math.Log(wrongs) / math.Pow(float64(0.69314718056), 2) - locs := math.Ceil(float64(0.69314718056) * size / numEntries) - return uint64(size), uint64(locs) -} - -// NewBloomFilter returns a new bloomfilter. -func NewBloomFilter(params ...float64) (bloomfilter *Bloom) { - var entries, locs uint64 - if len(params) == 2 { - if params[1] < 1 { - entries, locs = calcSizeByWrongPositives(params[0], params[1]) - } else { - entries, locs = uint64(params[0]), uint64(params[1]) - } - } else { - fatal("usage: New(float64(number_of_entries), float64(number_of_hashlocations))" + - " i.e. New(float64(1000), float64(3)) or New(float64(number_of_entries)," + - " float64(number_of_hashlocations)) i.e. New(float64(1000), float64(0.03))") - } - size, exponent := getSize(entries) - bloomfilter = &Bloom{ - sizeExp: exponent, - size: size - 1, - setLocs: locs, - shift: 64 - exponent, - } - bloomfilter.Size(size) - return bloomfilter -} - -// Bloom filter -type Bloom struct { - bitset []uint64 - ElemNum uint64 - sizeExp uint64 - size uint64 - setLocs uint64 - shift uint64 -} - -// <--- http://www.cse.yorku.ca/~oz/hash.html -// modified Berkeley DB Hash (32bit) -// hash is casted to l, h = 16bit fragments -// func (bl Bloom) absdbm(b *[]byte) (l, h uint64) { -// hash := uint64(len(*b)) -// for _, c := range *b { -// hash = uint64(c) + (hash << 6) + (hash << bl.sizeExp) - hash -// } -// h = hash >> bl.shift -// l = hash << bl.shift >> bl.shift -// return l, h -// } - -// Add adds hash of a key to the bloomfilter. -func (bl *Bloom) Add(hash uint64) { - h := hash >> bl.shift - l := hash << bl.shift >> bl.shift - for i := uint64(0); i < bl.setLocs; i++ { - bl.Set((h + i*l) & bl.size) - bl.ElemNum++ - } -} - -// Has checks if bit(s) for entry hash is/are set, -// returns true if the hash was added to the Bloom Filter. -func (bl Bloom) Has(hash uint64) bool { - h := hash >> bl.shift - l := hash << bl.shift >> bl.shift - for i := uint64(0); i < bl.setLocs; i++ { - if !bl.IsSet((h + i*l) & bl.size) { - return false - } - } - return true -} - -// AddIfNotHas only Adds hash, if it's not present in the bloomfilter. -// Returns true if hash was added. -// Returns false if hash was already registered in the bloomfilter. -func (bl *Bloom) AddIfNotHas(hash uint64) bool { - if bl.Has(hash) { - return false - } - bl.Add(hash) - return true -} - -// TotalSize returns the total size of the bloom filter. -func (bl *Bloom) TotalSize() int { - // The bl struct has 5 members and each one is 8 byte. The bitset is a - // uint64 byte slice. - return len(bl.bitset)*8 + 5*8 -} - -// Size makes Bloom filter with as bitset of size sz. -func (bl *Bloom) Size(sz uint64) { - bl.bitset = make([]uint64, sz>>6) -} - -// Clear resets the Bloom filter. -func (bl *Bloom) Clear() { - for i := range bl.bitset { - bl.bitset[i] = 0 - } -} - -// Set sets the bit[idx] of bitset. -func (bl *Bloom) Set(idx uint64) { - ptr := unsafe.Pointer(uintptr(unsafe.Pointer(&bl.bitset[idx>>6])) + uintptr((idx%64)>>3)) - *(*uint8)(ptr) |= mask[idx%8] -} - -// IsSet checks if bit[idx] of bitset is set, returns true/false. -func (bl *Bloom) IsSet(idx uint64) bool { - ptr := unsafe.Pointer(uintptr(unsafe.Pointer(&bl.bitset[idx>>6])) + uintptr((idx%64)>>3)) - r := ((*(*uint8)(ptr)) >> (idx % 8)) & 1 - return r == 1 -} - -// bloomJSONImExport -// Im/Export structure used by JSONMarshal / JSONUnmarshal -type bloomJSONImExport struct { - FilterSet []byte - SetLocs uint64 -} - -// NewWithBoolset takes a []byte slice and number of locs per entry, -// returns the bloomfilter with a bitset populated according to the input []byte. -func newWithBoolset(bs *[]byte, locs uint64) *Bloom { - bloomfilter := NewBloomFilter(float64(len(*bs)<<3), float64(locs)) - for i, b := range *bs { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(&bloomfilter.bitset[0])) + uintptr(i))) = b - } - return bloomfilter -} - -// JSONUnmarshal takes JSON-Object (type bloomJSONImExport) as []bytes -// returns bloom32 / bloom64 object. -func JSONUnmarshal(dbData []byte) (*Bloom, error) { - bloomImEx := bloomJSONImExport{} - if err := json.Unmarshal(dbData, &bloomImEx); err != nil { - return nil, err - } - buf := bytes.NewBuffer(bloomImEx.FilterSet) - bs := buf.Bytes() - bf := newWithBoolset(&bs, bloomImEx.SetLocs) - return bf, nil -} - -// JSONMarshal returns JSON-object (type bloomJSONImExport) as []byte. -func (bl Bloom) JSONMarshal() []byte { - bloomImEx := bloomJSONImExport{} - bloomImEx.SetLocs = bl.setLocs - bloomImEx.FilterSet = make([]byte, len(bl.bitset)<<3) - for i := range bloomImEx.FilterSet { - bloomImEx.FilterSet[i] = *(*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&bl.bitset[0])) + - uintptr(i))) - } - data, err := json.Marshal(bloomImEx) - if err != nil { - fatal("json.Marshal failed: ", err) - } - return data -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/btree.go b/vendor/github.com/outcaste-io/ristretto/z/btree.go deleted file mode 100644 index 0b28ae5b8d..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/btree.go +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "fmt" - "math" - "os" - "reflect" - "strings" - "unsafe" - - "github.com/outcaste-io/ristretto/z/simd" -) - -var ( - pageSize = os.Getpagesize() - maxKeys = (pageSize / 16) - 1 - oneThird = int(float64(maxKeys) / 3) -) - -const ( - absoluteMax = uint64(math.MaxUint64 - 1) - minSize = 1 << 20 -) - -// Tree represents the structure for custom mmaped B+ tree. -// It supports keys in range [1, math.MaxUint64-1] and values [1, math.Uint64]. -type Tree struct { - buffer *Buffer - data []byte - nextPage uint64 - freePage uint64 - stats TreeStats -} - -func (t *Tree) initRootNode() { - // This is the root node. - t.newNode(0) - // This acts as the rightmost pointer (all the keys are <= this key). - t.Set(absoluteMax, 0) -} - -// NewTree returns an in-memory B+ tree. -func NewTree(tag string) *Tree { - const defaultTag = "tree" - if tag == "" { - tag = defaultTag - } - t := &Tree{buffer: NewBuffer(minSize, tag)} - t.Reset() - return t -} - -// NewTree returns a persistent on-disk B+ tree. -func NewTreePersistent(path string) (*Tree, error) { - t := &Tree{} - var err error - - // Open the buffer from disk and set it to the maximum allocated size. - t.buffer, err = NewBufferPersistent(path, minSize) - if err != nil { - return nil, err - } - t.buffer.offset = uint64(len(t.buffer.buf)) - t.data = t.buffer.Bytes() - - // pageID can never be 0 if the tree has been initialized. - root := t.node(1) - isInitialized := root.pageID() != 0 - - if !isInitialized { - t.nextPage = 1 - t.freePage = 0 - t.initRootNode() - } else { - t.reinit() - } - - return t, nil -} - -// reinit sets the internal variables of a Tree, which are normally stored -// in-memory, but are lost when loading from disk. -func (t *Tree) reinit() { - // Calculate t.nextPage by finding the first node whose pageID is not set. - t.nextPage = 1 - for int(t.nextPage)*pageSize < len(t.data) { - n := t.node(t.nextPage) - if n.pageID() == 0 { - break - } - t.nextPage++ - } - maxPageId := t.nextPage - 1 - - // Calculate t.freePage by finding the page to which no other page points. - // This would be the head of the page linked list. - // tailPages[i] is true if pageId i+1 is not the head of the list. - tailPages := make([]bool, maxPageId) - // Mark all pages containing nodes as tail pages. - t.Iterate(func(n node) { - i := n.pageID() - 1 - tailPages[i] = true - // If this is a leaf node, increment the stats. - if n.isLeaf() { - t.stats.NumLeafKeys += n.numKeys() - } - }) - // pointedPages is a list of page IDs that the tail pages point to. - pointedPages := make([]uint64, 0) - for i, isTail := range tailPages { - if !isTail { - pageId := uint64(i) + 1 - // Skip if nextPageId = 0, as that is equivalent to null page. - if nextPageId := t.node(pageId).uint64(0); nextPageId != 0 { - pointedPages = append(pointedPages, nextPageId) - } - t.stats.NumPagesFree++ - } - } - - // Mark all pages being pointed to as tail pages. - for _, pageId := range pointedPages { - i := pageId - 1 - tailPages[i] = true - } - // There should only be one head page left. - for i, isTail := range tailPages { - if !isTail { - pageId := uint64(i) + 1 - t.freePage = pageId - break - } - } -} - -// Reset resets the tree and truncates it to maxSz. -func (t *Tree) Reset() { - // Tree relies on uninitialized data being zeroed out, so we need to Memclr - // the data before using it again. - Memclr(t.buffer.buf) - t.buffer.Reset() - t.buffer.AllocateOffset(minSize) - t.data = t.buffer.Bytes() - t.stats = TreeStats{} - t.nextPage = 1 - t.freePage = 0 - t.initRootNode() -} - -// Close releases the memory used by the tree. -func (t *Tree) Close() error { - if t == nil { - return nil - } - return t.buffer.Release() -} - -type TreeStats struct { - Allocated int // Derived. - Bytes int // Derived. - NumLeafKeys int // Calculated. - NumPages int // Derived. - NumPagesFree int // Calculated. - Occupancy float64 // Derived. - PageSize int // Derived. -} - -// Stats returns stats about the tree. -func (t *Tree) Stats() TreeStats { - numPages := int(t.nextPage - 1) - out := TreeStats{ - Bytes: numPages * pageSize, - Allocated: len(t.data), - NumLeafKeys: t.stats.NumLeafKeys, - NumPages: numPages, - NumPagesFree: t.stats.NumPagesFree, - PageSize: pageSize, - } - out.Occupancy = 100.0 * float64(out.NumLeafKeys) / float64(maxKeys*numPages) - return out -} - -// BytesToUint64Slice converts a byte slice to a uint64 slice. -func BytesToUint64Slice(b []byte) []uint64 { - if len(b) == 0 { - return nil - } - var u64s []uint64 - hdr := (*reflect.SliceHeader)(unsafe.Pointer(&u64s)) - hdr.Len = len(b) / 8 - hdr.Cap = hdr.Len - hdr.Data = uintptr(unsafe.Pointer(&b[0])) - return u64s -} - -func (t *Tree) newNode(bit uint64) node { - var pageId uint64 - if t.freePage > 0 { - pageId = t.freePage - t.stats.NumPagesFree-- - } else { - pageId = t.nextPage - t.nextPage++ - offset := int(pageId) * pageSize - reqSize := offset + pageSize - if reqSize > len(t.data) { - t.buffer.AllocateOffset(reqSize - len(t.data)) - t.data = t.buffer.Bytes() - } - } - n := t.node(pageId) - if t.freePage > 0 { - t.freePage = n.uint64(0) - } - zeroOut(n) - n.setBit(bit) - n.setAt(keyOffset(maxKeys), pageId) - return n -} - -func getNode(data []byte) node { - return node(BytesToUint64Slice(data)) -} - -func zeroOut(data []uint64) { - for i := 0; i < len(data); i++ { - data[i] = 0 - } -} - -func (t *Tree) node(pid uint64) node { - // page does not exist - if pid == 0 { - return nil - } - start := pageSize * int(pid) - return getNode(t.data[start : start+pageSize]) -} - -// Set sets the key-value pair in the tree. -func (t *Tree) Set(k, v uint64) { - if k == math.MaxUint64 || k == 0 { - panic("Error setting zero or MaxUint64") - } - root := t.set(1, k, v) - if root.isFull() { - right := t.split(1) - left := t.newNode(root.bits()) - // Re-read the root as the underlying buffer for tree might have changed during split. - root = t.node(1) - copy(left[:keyOffset(maxKeys)], root) - left.setNumKeys(root.numKeys()) - - // reset the root node. - zeroOut(root[:keyOffset(maxKeys)]) - root.setNumKeys(0) - - // set the pointers for left and right child in the root node. - root.set(left.maxKey(), left.pageID()) - root.set(right.maxKey(), right.pageID()) - } -} - -// For internal nodes, they contain . -// where all entries <= key are stored in the corresponding ptr. -func (t *Tree) set(pid, k, v uint64) node { - n := t.node(pid) - if n.isLeaf() { - t.stats.NumLeafKeys += n.set(k, v) - return n - } - - // This is an internal node. - idx := n.search(k) - if idx >= maxKeys { - panic("search returned index >= maxKeys") - } - // If no key at idx. - if n.key(idx) == 0 { - n.setAt(keyOffset(idx), k) - n.setNumKeys(n.numKeys() + 1) - } - child := t.node(n.val(idx)) - if child == nil { - child = t.newNode(bitLeaf) - n = t.node(pid) - n.setAt(valOffset(idx), child.pageID()) - } - child = t.set(child.pageID(), k, v) - // Re-read n as the underlying buffer for tree might have changed during set. - n = t.node(pid) - if child.isFull() { - // Just consider the left sibling for simplicity. - // if t.shareWithSibling(n, idx) { - // return n - // } - - nn := t.split(child.pageID()) - // Re-read n and child as the underlying buffer for tree might have changed during split. - n = t.node(pid) - child = t.node(n.uint64(valOffset(idx))) - // Set child pointers in the node n. - // Note that key for right node (nn) already exist in node n, but the - // pointer is updated. - n.set(child.maxKey(), child.pageID()) - n.set(nn.maxKey(), nn.pageID()) - } - return n -} - -// Get looks for key and returns the corresponding value. -// If key is not found, 0 is returned. -func (t *Tree) Get(k uint64) uint64 { - if k == math.MaxUint64 || k == 0 { - panic("Does not support getting MaxUint64/Zero") - } - root := t.node(1) - return t.get(root, k) -} - -func (t *Tree) get(n node, k uint64) uint64 { - if n.isLeaf() { - return n.get(k) - } - // This is internal node - idx := n.search(k) - if idx == n.numKeys() || n.key(idx) == 0 { - return 0 - } - child := t.node(n.uint64(valOffset(idx))) - assert(child != nil) - return t.get(child, k) -} - -// DeleteBelow deletes all keys with value under ts. -func (t *Tree) DeleteBelow(ts uint64) { - root := t.node(1) - t.stats.NumLeafKeys = 0 - t.compact(root, ts) - assert(root.numKeys() >= 1) -} - -func (t *Tree) compact(n node, ts uint64) int { - if n.isLeaf() { - numKeys := n.compact(ts) - t.stats.NumLeafKeys += n.numKeys() - return numKeys - } - // Not leaf. - N := n.numKeys() - for i := 0; i < N; i++ { - assert(n.key(i) > 0) - childID := n.uint64(valOffset(i)) - child := t.node(childID) - if rem := t.compact(child, ts); rem == 0 && i < N-1 { - // If no valid key is remaining we can drop this child. However, don't do that if this - // is the max key. - t.stats.NumLeafKeys -= child.numKeys() - child.setAt(0, t.freePage) - t.freePage = childID - n.setAt(valOffset(i), 0) - t.stats.NumPagesFree++ - } - } - // We use ts=1 here because we want to delete all the keys whose value is 0, which means they no - // longer have a valid page for that key. - return n.compact(1) -} - -func (t *Tree) iterate(n node, fn func(node)) { - fn(n) - if n.isLeaf() { - return - } - // Explore children. - for i := 0; i < maxKeys; i++ { - if n.key(i) == 0 { - return - } - childID := n.uint64(valOffset(i)) - assert(childID > 0) - - child := t.node(childID) - t.iterate(child, fn) - } -} - -// Iterate iterates over the tree and executes the fn on each node. -func (t *Tree) Iterate(fn func(node)) { - root := t.node(1) - t.iterate(root, fn) -} - -// IterateKV iterates through all keys and values in the tree. -// If newVal is non-zero, it will be set in the tree. -func (t *Tree) IterateKV(f func(key, val uint64) (newVal uint64)) { - t.Iterate(func(n node) { - // Only leaf nodes contain keys. - if !n.isLeaf() { - return - } - - for i := 0; i < n.numKeys(); i++ { - key := n.key(i) - val := n.val(i) - - // A zero value here means that this is a bogus entry. - if val == 0 { - continue - } - - newVal := f(key, val) - if newVal != 0 { - n.setAt(valOffset(i), newVal) - } - } - }) -} - -func (t *Tree) print(n node, parentID uint64) { - n.print(parentID) - if n.isLeaf() { - return - } - pid := n.pageID() - for i := 0; i < maxKeys; i++ { - if n.key(i) == 0 { - return - } - childID := n.uint64(valOffset(i)) - child := t.node(childID) - t.print(child, pid) - } -} - -// Print iterates over the tree and prints all valid KVs. -func (t *Tree) Print() { - root := t.node(1) - t.print(root, 0) -} - -// Splits the node into two. It moves right half of the keys from the original node to a newly -// created right node. It returns the right node. -func (t *Tree) split(pid uint64) node { - n := t.node(pid) - if !n.isFull() { - panic("This should be called only when n is full") - } - - // Create a new node nn, copy over half the keys from n, and set the parent to n's parent. - nn := t.newNode(n.bits()) - // Re-read n as the underlying buffer for tree might have changed during newNode. - n = t.node(pid) - rightHalf := n[keyOffset(maxKeys/2):keyOffset(maxKeys)] - copy(nn, rightHalf) - nn.setNumKeys(maxKeys - maxKeys/2) - - // Remove entries from node n. - zeroOut(rightHalf) - n.setNumKeys(maxKeys / 2) - return nn -} - -// shareWithSiblingXXX is unused for now. The idea is to move some keys to -// sibling when a node is full. But, I don't see any special benefits in our -// access pattern. It doesn't result in better occupancy ratios. -func (t *Tree) shareWithSiblingXXX(n node, idx int) bool { - if idx == 0 { - return false - } - left := t.node(n.val(idx - 1)) - ns := left.numKeys() - if ns >= maxKeys/2 { - // Sibling is already getting full. - return false - } - - right := t.node(n.val(idx)) - // Copy over keys from right child to left child. - copied := copy(left[keyOffset(ns):], right[:keyOffset(oneThird)]) - copied /= 2 // Considering that key-val constitute one key. - left.setNumKeys(ns + copied) - - // Update the max key in parent node n for the left sibling. - n.setAt(keyOffset(idx-1), left.maxKey()) - - // Now move keys to left for the right sibling. - until := copy(right, right[keyOffset(oneThird):keyOffset(maxKeys)]) - right.setNumKeys(until / 2) - zeroOut(right[until:keyOffset(maxKeys)]) - return true -} - -// Each node in the node is of size pageSize. Two kinds of nodes. Leaf nodes and internal nodes. -// Leaf nodes only contain the data. Internal nodes would contain the key and the offset to the -// child node. -// Internal node would have first entry as -// <0 offset to child>, <1000 offset>, <5000 offset>, and so on... -// Leaf nodes would just have: , , and so on... -// Last 16 bytes of the node are off limits. -// | pageID (8 bytes) | metaBits (1 byte) | 3 free bytes | numKeys (4 bytes) | -type node []uint64 - -func (n node) uint64(start int) uint64 { return n[start] } - -// func (n node) uint32(start int) uint32 { return *(*uint32)(unsafe.Pointer(&n[start])) } - -func keyOffset(i int) int { return 2 * i } -func valOffset(i int) int { return 2*i + 1 } -func (n node) numKeys() int { return int(n.uint64(valOffset(maxKeys)) & 0xFFFFFFFF) } -func (n node) pageID() uint64 { return n.uint64(keyOffset(maxKeys)) } -func (n node) key(i int) uint64 { return n.uint64(keyOffset(i)) } -func (n node) val(i int) uint64 { return n.uint64(valOffset(i)) } -func (n node) data(i int) []uint64 { return n[keyOffset(i):keyOffset(i+1)] } - -func (n node) setAt(start int, k uint64) { - n[start] = k -} - -func (n node) setNumKeys(num int) { - idx := valOffset(maxKeys) - val := n[idx] - val &= 0xFFFFFFFF00000000 - val |= uint64(num) - n[idx] = val -} - -func (n node) moveRight(lo int) { - hi := n.numKeys() - assert(hi != maxKeys) - // copy works despite of overlap in src and dst. - // See https://golang.org/pkg/builtin/#copy - copy(n[keyOffset(lo+1):keyOffset(hi+1)], n[keyOffset(lo):keyOffset(hi)]) -} - -const ( - bitLeaf = uint64(1 << 63) -) - -func (n node) setBit(b uint64) { - vo := valOffset(maxKeys) - val := n[vo] - val &= 0xFFFFFFFF - val |= b - n[vo] = val -} -func (n node) bits() uint64 { - return n.val(maxKeys) & 0xFF00000000000000 -} -func (n node) isLeaf() bool { - return n.bits()&bitLeaf > 0 -} - -// isFull checks that the node is already full. -func (n node) isFull() bool { - return n.numKeys() == maxKeys -} - -// Search returns the index of a smallest key >= k in a node. -func (n node) search(k uint64) int { - N := n.numKeys() - if N < 4 { - for i := 0; i < N; i++ { - if ki := n.key(i); ki >= k { - return i - } - } - return N - } - return int(simd.Search(n[:2*N], k)) - // lo, hi := 0, N - // // Reduce the search space using binary seach and then do linear search. - // for hi-lo > 32 { - // mid := (hi + lo) / 2 - // km := n.key(mid) - // if k == km { - // return mid - // } - // if k > km { - // // key is greater than the key at mid, so move right. - // lo = mid + 1 - // } else { - // // else move left. - // hi = mid - // } - // } - // for i := lo; i <= hi; i++ { - // if ki := n.key(i); ki >= k { - // return i - // } - // } - // return N -} -func (n node) maxKey() uint64 { - idx := n.numKeys() - // idx points to the first key which is zero. - if idx > 0 { - idx-- - } - return n.key(idx) -} - -// compacts the node i.e., remove all the kvs with value < lo. It returns the remaining number of -// keys. -func (n node) compact(lo uint64) int { - N := n.numKeys() - mk := n.maxKey() - var left, right int - for right = 0; right < N; right++ { - if n.val(right) < lo && n.key(right) < mk { - // Skip over this key. Don't copy it. - continue - } - // Valid data. Copy it from right to left. Advance left. - if left != right { - copy(n.data(left), n.data(right)) - } - left++ - } - // zero out rest of the kv pairs. - zeroOut(n[keyOffset(left):keyOffset(right)]) - n.setNumKeys(left) - - // If the only key we have is the max key, and its value is less than lo, then we can indicate - // to the caller by returning a zero that it's OK to drop the node. - if left == 1 && n.key(0) == mk && n.val(0) < lo { - return 0 - } - return left -} - -func (n node) get(k uint64) uint64 { - idx := n.search(k) - // key is not found - if idx == n.numKeys() { - return 0 - } - if ki := n.key(idx); ki == k { - return n.val(idx) - } - return 0 -} - -// set returns true if it added a new key. -func (n node) set(k, v uint64) (numAdded int) { - idx := n.search(k) - ki := n.key(idx) - if n.numKeys() == maxKeys { - // This happens during split of non-root node, when we are updating the child pointer of - // right node. Hence, the key should already exist. - assert(ki == k) - } - if ki > k { - // Found the first entry which is greater than k. So, we need to fit k - // just before it. For that, we should move the rest of the data in the - // node to the right to make space for k. - n.moveRight(idx) - } - // If the k does not exist already, increment the number of keys. - if ki != k { - n.setNumKeys(n.numKeys() + 1) - numAdded = 1 - } - if ki == 0 || ki >= k { - n.setAt(keyOffset(idx), k) - n.setAt(valOffset(idx), v) - return - } - panic("shouldn't reach here") -} - -func (n node) iterate(fn func(node, int)) { - for i := 0; i < maxKeys; i++ { - if k := n.key(i); k > 0 { - fn(n, i) - } else { - break - } - } -} - -func (n node) print(parentID uint64) { - var keys []string - n.iterate(func(n node, i int) { - keys = append(keys, fmt.Sprintf("%d", n.key(i))) - }) - if len(keys) > 8 { - copy(keys[4:], keys[len(keys)-4:]) - keys[3] = "..." - keys = keys[:8] - } - fmt.Printf("%d Child of: %d num keys: %d keys: %s\n", - n.pageID(), parentID, n.numKeys(), strings.Join(keys, " ")) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/buffer.go b/vendor/github.com/outcaste-io/ristretto/z/buffer.go deleted file mode 100644 index 8f760c7d3c..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/buffer.go +++ /dev/null @@ -1,543 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "encoding/binary" - "fmt" - "io/ioutil" - "os" - "sort" - "sync/atomic" - - "github.com/pkg/errors" -) - -const ( - defaultCapacity = 64 - defaultTag = "buffer" -) - -// Buffer is equivalent of bytes.Buffer without the ability to read. It is NOT thread-safe. -// -// In UseCalloc mode, z.Calloc is used to allocate memory, which depending upon how the code is -// compiled could use jemalloc for allocations. -// -// In UseMmap mode, Buffer uses file mmap to allocate memory. This allows us to store big data -// structures without using physical memory. -// -// MaxSize can be set to limit the memory usage. -type Buffer struct { - padding uint64 // number of starting bytes used for padding - offset uint64 // used length of the buffer - buf []byte // backing slice for the buffer - bufType BufferType // type of the underlying buffer - curSz int // capacity of the buffer - maxSz int // causes a panic if the buffer grows beyond this size - mmapFile *MmapFile // optional mmap backing for the buffer - autoMmapAfter int // Calloc falls back to an mmaped tmpfile after crossing this size - autoMmapDir string // directory for autoMmap to create a tempfile in - persistent bool // when enabled, Release will not delete the underlying mmap file - tag string // used for jemalloc stats -} - -func NewBuffer(capacity int, tag string) *Buffer { - if capacity < defaultCapacity { - capacity = defaultCapacity - } - if tag == "" { - tag = defaultTag - } - return &Buffer{ - buf: Calloc(capacity, tag), - bufType: UseCalloc, - curSz: capacity, - offset: 8, - padding: 8, - tag: tag, - } -} - -// It is the caller's responsibility to set offset after this, because Buffer -// doesn't remember what it was. -func NewBufferPersistent(path string, capacity int) (*Buffer, error) { - file, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0666) - if err != nil { - return nil, err - } - buffer, err := newBufferFile(file, capacity) - if err != nil { - return nil, err - } - buffer.persistent = true - return buffer, nil -} - -func NewBufferTmp(dir string, capacity int) (*Buffer, error) { - if dir == "" { - dir = tmpDir - } - file, err := ioutil.TempFile(dir, "buffer") - if err != nil { - return nil, err - } - return newBufferFile(file, capacity) -} - -func newBufferFile(file *os.File, capacity int) (*Buffer, error) { - if capacity < defaultCapacity { - capacity = defaultCapacity - } - mmapFile, err := OpenMmapFileUsing(file, capacity, true) - if err != nil && err != NewFile { - return nil, err - } - buf := &Buffer{ - buf: mmapFile.Data, - bufType: UseMmap, - curSz: len(mmapFile.Data), - mmapFile: mmapFile, - offset: 8, - padding: 8, - } - return buf, nil -} - -func NewBufferSlice(slice []byte) *Buffer { - return &Buffer{ - offset: uint64(len(slice)), - buf: slice, - bufType: UseInvalid, - } -} - -func (b *Buffer) WithAutoMmap(threshold int, path string) *Buffer { - if b.bufType != UseCalloc { - panic("can only autoMmap with UseCalloc") - } - b.autoMmapAfter = threshold - if path == "" { - b.autoMmapDir = tmpDir - } else { - b.autoMmapDir = path - } - return b -} - -func (b *Buffer) WithMaxSize(size int) *Buffer { - b.maxSz = size - return b -} - -func (b *Buffer) IsEmpty() bool { - return int(b.offset) == b.StartOffset() -} - -// LenWithPadding would return the number of bytes written to the buffer so far -// plus the padding at the start of the buffer. -func (b *Buffer) LenWithPadding() int { - return int(atomic.LoadUint64(&b.offset)) -} - -// LenNoPadding would return the number of bytes written to the buffer so far -// (without the padding). -func (b *Buffer) LenNoPadding() int { - return int(atomic.LoadUint64(&b.offset) - b.padding) -} - -// Bytes would return all the written bytes as a slice. -func (b *Buffer) Bytes() []byte { - off := atomic.LoadUint64(&b.offset) - return b.buf[b.padding:off] -} - -// Grow would grow the buffer to have at least n more bytes. In case the buffer is at capacity, it -// would reallocate twice the size of current capacity + n, to ensure n bytes can be written to the -// buffer without further allocation. In UseMmap mode, this might result in underlying file -// expansion. -func (b *Buffer) Grow(n int) { - if b.buf == nil { - panic("z.Buffer needs to be initialized before using") - } - if b.maxSz > 0 && int(b.offset)+n > b.maxSz { - err := fmt.Errorf( - "z.Buffer max size exceeded: %d offset: %d grow: %d", b.maxSz, b.offset, n) - panic(err) - } - if int(b.offset)+n < b.curSz { - return - } - - // Calculate new capacity. - growBy := b.curSz + n - // Don't allocate more than 1GB at a time. - if growBy > 1<<30 { - growBy = 1 << 30 - } - // Allocate at least n, even if it exceeds the 1GB limit above. - if n > growBy { - growBy = n - } - b.curSz += growBy - - switch b.bufType { - case UseCalloc: - // If autoMmap gets triggered, copy the slice over to an mmaped file. - if b.autoMmapAfter > 0 && b.curSz > b.autoMmapAfter { - b.bufType = UseMmap - file, err := ioutil.TempFile(b.autoMmapDir, "") - if err != nil { - panic(err) - } - mmapFile, err := OpenMmapFileUsing(file, b.curSz, true) - if err != nil && err != NewFile { - panic(err) - } - assert(int(b.offset) == copy(mmapFile.Data, b.buf[:b.offset])) - Free(b.buf) - b.mmapFile = mmapFile - b.buf = mmapFile.Data - break - } - - // Else, reallocate the slice. - newBuf := Calloc(b.curSz, b.tag) - assert(int(b.offset) == copy(newBuf, b.buf[:b.offset])) - Free(b.buf) - b.buf = newBuf - - case UseMmap: - // Truncate and remap the underlying file. - if err := b.mmapFile.Truncate(int64(b.curSz)); err != nil { - err = errors.Wrapf(err, - "while trying to truncate file: %s to size: %d", b.mmapFile.Fd.Name(), b.curSz) - panic(err) - } - b.buf = b.mmapFile.Data - - default: - panic("can only use Grow on UseCalloc and UseMmap buffers") - } -} - -// Allocate is a way to get a slice of size n back from the buffer. This slice can be directly -// written to. Warning: Allocate is not thread-safe. The byte slice returned MUST be used before -// further calls to Buffer. -func (b *Buffer) Allocate(n int) []byte { - b.Grow(n) - off := b.offset - b.offset += uint64(n) - return b.buf[off:int(b.offset)] -} - -// AllocateOffset works the same way as allocate, but instead of returning a byte slice, it returns -// the offset of the allocation. -func (b *Buffer) AllocateOffset(n int) int { - b.Grow(n) - b.offset += uint64(n) - return int(b.offset) - n -} - -func (b *Buffer) writeLen(sz int) { - buf := b.Allocate(4) - binary.BigEndian.PutUint32(buf, uint32(sz)) -} - -// SliceAllocate would encode the size provided into the buffer, followed by a call to Allocate, -// hence returning the slice of size sz. This can be used to allocate a lot of small buffers into -// this big buffer. -// Note that SliceAllocate should NOT be mixed with normal calls to Write. -func (b *Buffer) SliceAllocate(sz int) []byte { - b.Grow(4 + sz) - b.writeLen(sz) - return b.Allocate(sz) -} - -func (b *Buffer) StartOffset() int { - return int(b.padding) -} - -func (b *Buffer) WriteSlice(slice []byte) { - dst := b.SliceAllocate(len(slice)) - assert(len(slice) == copy(dst, slice)) -} - -func (b *Buffer) SliceIterate(f func(slice []byte) error) error { - if b.IsEmpty() { - return nil - } - slice, next := []byte{}, b.StartOffset() - for next >= 0 { - slice, next = b.Slice(next) - if len(slice) == 0 { - continue - } - if err := f(slice); err != nil { - return err - } - } - return nil -} - -const ( - UseCalloc BufferType = iota - UseMmap - UseInvalid -) - -type BufferType int - -func (t BufferType) String() string { - switch t { - case UseCalloc: - return "UseCalloc" - case UseMmap: - return "UseMmap" - default: - return "UseInvalid" - } -} - -type LessFunc func(a, b []byte) bool -type sortHelper struct { - offsets []int - b *Buffer - tmp *Buffer - less LessFunc - small []int -} - -func (s *sortHelper) sortSmall(start, end int) { - s.tmp.Reset() - s.small = s.small[:0] - next := start - for next >= 0 && next < end { - s.small = append(s.small, next) - _, next = s.b.Slice(next) - } - - // We are sorting the slices pointed to by s.small offsets, but only moving the offsets around. - sort.Slice(s.small, func(i, j int) bool { - left, _ := s.b.Slice(s.small[i]) - right, _ := s.b.Slice(s.small[j]) - return s.less(left, right) - }) - // Now we iterate over the s.small offsets and copy over the slices. The result is now in order. - for _, off := range s.small { - s.tmp.Write(rawSlice(s.b.buf[off:])) - } - assert(end-start == copy(s.b.buf[start:end], s.tmp.Bytes())) -} - -func assert(b bool) { - if !b { - fatalf("%+v", errors.Errorf("Assertion failure")) - } -} -func check(err error) { - if err != nil { - fatalf("%+v", err) - } -} -func check2(_ interface{}, err error) { - check(err) -} - -func (s *sortHelper) merge(left, right []byte, start, end int) { - if len(left) == 0 || len(right) == 0 { - return - } - s.tmp.Reset() - check2(s.tmp.Write(left)) - left = s.tmp.Bytes() - - var ls, rs []byte - - copyLeft := func() { - assert(len(ls) == copy(s.b.buf[start:], ls)) - left = left[len(ls):] - start += len(ls) - } - copyRight := func() { - assert(len(rs) == copy(s.b.buf[start:], rs)) - right = right[len(rs):] - start += len(rs) - } - - for start < end { - if len(left) == 0 { - assert(len(right) == copy(s.b.buf[start:end], right)) - return - } - if len(right) == 0 { - assert(len(left) == copy(s.b.buf[start:end], left)) - return - } - ls = rawSlice(left) - rs = rawSlice(right) - - // We skip the first 4 bytes in the rawSlice, because that stores the length. - if s.less(ls[4:], rs[4:]) { - copyLeft() - } else { - copyRight() - } - } -} - -func (s *sortHelper) sort(lo, hi int) []byte { - assert(lo <= hi) - - mid := lo + (hi-lo)/2 - loff, hoff := s.offsets[lo], s.offsets[hi] - if lo == mid { - // No need to sort, just return the buffer. - return s.b.buf[loff:hoff] - } - - // lo, mid would sort from [offset[lo], offset[mid]) . - left := s.sort(lo, mid) - // Typically we'd use mid+1, but here mid represents an offset in the buffer. Each offset - // contains a thousand entries. So, if we do mid+1, we'd skip over those entries. - right := s.sort(mid, hi) - - s.merge(left, right, loff, hoff) - return s.b.buf[loff:hoff] -} - -// SortSlice is like SortSliceBetween but sorting over the entire buffer. -func (b *Buffer) SortSlice(less func(left, right []byte) bool) { - b.SortSliceBetween(b.StartOffset(), int(b.offset), less) -} -func (b *Buffer) SortSliceBetween(start, end int, less LessFunc) { - if start >= end { - return - } - if start == 0 { - panic("start can never be zero") - } - - var offsets []int - next, count := start, 0 - for next >= 0 && next < end { - if count%1024 == 0 { - offsets = append(offsets, next) - } - _, next = b.Slice(next) - count++ - } - assert(len(offsets) > 0) - if offsets[len(offsets)-1] != end { - offsets = append(offsets, end) - } - - szTmp := int(float64((end-start)/2) * 1.1) - s := &sortHelper{ - offsets: offsets, - b: b, - less: less, - small: make([]int, 0, 1024), - tmp: NewBuffer(szTmp, b.tag), - } - defer s.tmp.Release() - - left := offsets[0] - for _, off := range offsets[1:] { - s.sortSmall(left, off) - left = off - } - s.sort(0, len(offsets)-1) -} - -func rawSlice(buf []byte) []byte { - sz := binary.BigEndian.Uint32(buf) - return buf[:4+int(sz)] -} - -// Slice would return the slice written at offset. -func (b *Buffer) Slice(offset int) ([]byte, int) { - if offset >= int(b.offset) { - return nil, -1 - } - - sz := binary.BigEndian.Uint32(b.buf[offset:]) - start := offset + 4 - next := start + int(sz) - res := b.buf[start:next] - if next >= int(b.offset) { - next = -1 - } - return res, next -} - -// SliceOffsets is an expensive function. Use sparingly. -func (b *Buffer) SliceOffsets() []int { - next := b.StartOffset() - var offsets []int - for next >= 0 { - offsets = append(offsets, next) - _, next = b.Slice(next) - } - return offsets -} - -func (b *Buffer) Data(offset int) []byte { - if offset > b.curSz { - panic("offset beyond current size") - } - return b.buf[offset:b.curSz] -} - -// Write would write p bytes to the buffer. -func (b *Buffer) Write(p []byte) (n int, err error) { - n = len(p) - b.Grow(n) - assert(n == copy(b.buf[b.offset:], p)) - b.offset += uint64(n) - return n, nil -} - -// Reset would reset the buffer to be reused. -func (b *Buffer) Reset() { - b.offset = uint64(b.StartOffset()) -} - -// Release would free up the memory allocated by the buffer. Once the usage of buffer is done, it is -// important to call Release, otherwise a memory leak can happen. -func (b *Buffer) Release() error { - if b == nil { - return nil - } - switch b.bufType { - case UseCalloc: - Free(b.buf) - case UseMmap: - if b.mmapFile == nil { - return nil - } - path := b.mmapFile.Fd.Name() - if err := b.mmapFile.Close(-1); err != nil { - return errors.Wrapf(err, "while closing file: %s", path) - } - if !b.persistent { - if err := os.Remove(path); err != nil { - return errors.Wrapf(err, "while deleting file %s", path) - } - } - } - return nil -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/calloc.go b/vendor/github.com/outcaste-io/ristretto/z/calloc.go deleted file mode 100644 index 2e5d613813..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/calloc.go +++ /dev/null @@ -1,42 +0,0 @@ -package z - -import "sync/atomic" - -var numBytes int64 - -// NumAllocBytes returns the number of bytes allocated using calls to z.Calloc. The allocations -// could be happening via either Go or jemalloc, depending upon the build flags. -func NumAllocBytes() int64 { - return atomic.LoadInt64(&numBytes) -} - -// MemStats is used to fetch JE Malloc Stats. The stats are fetched from -// the mallctl namespace http://jemalloc.net/jemalloc.3.html#mallctl_namespace. -type MemStats struct { - // Total number of bytes allocated by the application. - // http://jemalloc.net/jemalloc.3.html#stats.allocated - Allocated uint64 - // Total number of bytes in active pages allocated by the application. This - // is a multiple of the page size, and greater than or equal to - // Allocated. - // http://jemalloc.net/jemalloc.3.html#stats.active - Active uint64 - // Maximum number of bytes in physically resident data pages mapped by the - // allocator, comprising all pages dedicated to allocator metadata, pages - // backing active allocations, and unused dirty pages. This is a maximum - // rather than precise because pages may not actually be physically - // resident if they correspond to demand-zeroed virtual memory that has not - // yet been touched. This is a multiple of the page size, and is larger - // than stats.active. - // http://jemalloc.net/jemalloc.3.html#stats.resident - Resident uint64 - // Total number of bytes in virtual memory mappings that were retained - // rather than being returned to the operating system via e.g. munmap(2) or - // similar. Retained virtual memory is typically untouched, decommitted, or - // purged, so it has no strongly associated physical memory (see extent - // hooks http://jemalloc.net/jemalloc.3.html#arena.i.extent_hooks for - // details). Retained memory is excluded from mapped memory statistics, - // e.g. stats.mapped (http://jemalloc.net/jemalloc.3.html#stats.mapped). - // http://jemalloc.net/jemalloc.3.html#stats.retained - Retained uint64 -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/calloc_32bit.go b/vendor/github.com/outcaste-io/ristretto/z/calloc_32bit.go deleted file mode 100644 index 3a0442614f..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/calloc_32bit.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use -// of this source code is governed by a BSD-style license that can be found in -// the LICENSE file. - -// +build 386 amd64p32 arm armbe mips mipsle mips64p32 mips64p32le ppc sparc - -package z - -const ( - // MaxArrayLen is a safe maximum length for slices on this architecture. - MaxArrayLen = 1<<31 - 1 - // MaxBufferSize is the size of virtually unlimited buffer on this architecture. - MaxBufferSize = 1 << 30 -) diff --git a/vendor/github.com/outcaste-io/ristretto/z/calloc_64bit.go b/vendor/github.com/outcaste-io/ristretto/z/calloc_64bit.go deleted file mode 100644 index b898248bba..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/calloc_64bit.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use -// of this source code is governed by a BSD-style license that can be found in -// the LICENSE file. - -// +build amd64 arm64 arm64be ppc64 ppc64le mips64 mips64le riscv64 s390x sparc64 - -package z - -const ( - // MaxArrayLen is a safe maximum length for slices on this architecture. - MaxArrayLen = 1<<50 - 1 - // MaxBufferSize is the size of virtually unlimited buffer on this architecture. - MaxBufferSize = 256 << 30 -) diff --git a/vendor/github.com/outcaste-io/ristretto/z/calloc_jemalloc.go b/vendor/github.com/outcaste-io/ristretto/z/calloc_jemalloc.go deleted file mode 100644 index 88a5acedba..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/calloc_jemalloc.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use -// of this source code is governed by a BSD-style license that can be found in -// the LICENSE file. - -//go:build jemalloc -// +build jemalloc - -package z - -/* -#cgo LDFLAGS: /usr/local/lib/libjemalloc_outcaste.a -L/usr/local/lib -Wl,-rpath,/usr/local/lib -ljemalloc_outcaste -lm -lstdc++ -pthread -ldl -#include -#include -*/ -import "C" -import ( - "bytes" - "fmt" - "sync" - "sync/atomic" - "unsafe" - - "github.com/dustin/go-humanize" -) - -// The go:linkname directives provides backdoor access to private functions in -// the runtime. Below we're accessing the throw function. - -//go:linkname throw runtime.throw -func throw(s string) - -// New allocates a slice of size n. The returned slice is from manually managed -// memory and MUST be released by calling Free. Failure to do so will result in -// a memory leak. -// -// Compile jemalloc with ./configure --with-jemalloc-prefix="je_" -// https://android.googlesource.com/platform/external/jemalloc_new/+/6840b22e8e11cb68b493297a5cd757d6eaa0b406/TUNING.md -// These two config options seems useful for frequent allocations and deallocations in -// multi-threaded programs (like we have). -// JE_MALLOC_CONF="background_thread:true,metadata_thp:auto" -// -// Compile Go program with `go build -tags=jemalloc` to enable this. - -type dalloc struct { - t string - sz int -} - -var dallocsMu sync.Mutex -var dallocs map[unsafe.Pointer]*dalloc - -func init() { - // By initializing dallocs, we can start tracking allocations and deallocations via z.Calloc. - dallocs = make(map[unsafe.Pointer]*dalloc) -} - -func Calloc(n int, tag string) []byte { - if n == 0 { - return make([]byte, 0) - } - // We need to be conscious of the Cgo pointer passing rules: - // - // https://golang.org/cmd/cgo/#hdr-Passing_pointers - // - // ... - // Note: the current implementation has a bug. While Go code is permitted - // to write nil or a C pointer (but not a Go pointer) to C memory, the - // current implementation may sometimes cause a runtime error if the - // contents of the C memory appear to be a Go pointer. Therefore, avoid - // passing uninitialized C memory to Go code if the Go code is going to - // store pointer values in it. Zero out the memory in C before passing it - // to Go. - - ptr := C.je_calloc(C.size_t(n), 1) - if ptr == nil { - // NB: throw is like panic, except it guarantees the process will be - // terminated. The call below is exactly what the Go runtime invokes when - // it cannot allocate memory. - throw("out of memory") - } - - uptr := unsafe.Pointer(ptr) - dallocsMu.Lock() - dallocs[uptr] = &dalloc{ - t: tag, - sz: n, - } - dallocsMu.Unlock() - atomic.AddInt64(&numBytes, int64(n)) - // Interpret the C pointer as a pointer to a Go array, then slice. - return (*[MaxArrayLen]byte)(uptr)[:n:n] -} - -// CallocNoRef does the exact same thing as Calloc with jemalloc enabled. -func CallocNoRef(n int, tag string) []byte { - return Calloc(n, tag) -} - -// Free frees the specified slice. -func Free(b []byte) { - if sz := cap(b); sz != 0 { - b = b[:cap(b)] - ptr := unsafe.Pointer(&b[0]) - C.je_free(ptr) - atomic.AddInt64(&numBytes, -int64(sz)) - dallocsMu.Lock() - delete(dallocs, ptr) - dallocsMu.Unlock() - } -} - -func Leaks() string { - if dallocs == nil { - return "Leak detection disabled. Enable with 'leak' build flag." - } - dallocsMu.Lock() - defer dallocsMu.Unlock() - if len(dallocs) == 0 { - return "NO leaks found." - } - m := make(map[string]int) - for _, da := range dallocs { - m[da.t] += da.sz - } - var buf bytes.Buffer - fmt.Fprintf(&buf, "Allocations:\n") - for f, sz := range m { - fmt.Fprintf(&buf, "%s at file: %s\n", humanize.IBytes(uint64(sz)), f) - } - return buf.String() -} - -// ReadMemStats populates stats with JE Malloc statistics. -func ReadMemStats(stats *MemStats) { - if stats == nil { - return - } - // Call an epoch mallclt to refresh the stats data as mentioned in the docs. - // http://jemalloc.net/jemalloc.3.html#epoch - // Note: This epoch mallctl is as expensive as a malloc call. It takes up the - // malloc_mutex_lock. - epoch := 1 - sz := unsafe.Sizeof(&epoch) - C.je_mallctl( - (C.CString)("epoch"), - unsafe.Pointer(&epoch), - (*C.size_t)(unsafe.Pointer(&sz)), - unsafe.Pointer(&epoch), - (C.size_t)(unsafe.Sizeof(epoch))) - stats.Allocated = fetchStat("stats.allocated") - stats.Active = fetchStat("stats.active") - stats.Resident = fetchStat("stats.resident") - stats.Retained = fetchStat("stats.retained") -} - -// fetchStat is used to read a specific attribute from je malloc stats using mallctl. -func fetchStat(s string) uint64 { - var out uint64 - sz := unsafe.Sizeof(&out) - C.je_mallctl( - (C.CString)(s), // Query: eg: stats.allocated, stats.resident, etc. - unsafe.Pointer(&out), // Variable to store the output. - (*C.size_t)(unsafe.Pointer(&sz)), // Size of the output variable. - nil, // Input variable used to set a value. - 0) // Size of the input variable. - return out -} - -func StatsPrint() { - opts := C.CString("mdablxe") - C.je_malloc_stats_print(nil, nil, opts) - C.free(unsafe.Pointer(opts)) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/calloc_nojemalloc.go b/vendor/github.com/outcaste-io/ristretto/z/calloc_nojemalloc.go deleted file mode 100644 index 93ceedf906..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/calloc_nojemalloc.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2020 The LevelDB-Go and Pebble Authors. All rights reserved. Use -// of this source code is governed by a BSD-style license that can be found in -// the LICENSE file. - -// +build !jemalloc !cgo - -package z - -import ( - "fmt" -) - -// Provides versions of Calloc, CallocNoRef, etc when jemalloc is not available -// (eg: build without jemalloc tag). - -// Calloc allocates a slice of size n. -func Calloc(n int, tag string) []byte { - return make([]byte, n) -} - -// CallocNoRef will not give you memory back without jemalloc. -func CallocNoRef(n int, tag string) []byte { - // We do the add here just to stay compatible with a corresponding Free call. - return nil -} - -// Free does not do anything in this mode. -func Free(b []byte) {} - -func Leaks() string { return "Leaks: Using Go memory" } -func StatsPrint() { - fmt.Println("Using Go memory") -} - -// ReadMemStats doesn't do anything since all the memory is being managed -// by the Go runtime. -func ReadMemStats(_ *MemStats) { return } diff --git a/vendor/github.com/outcaste-io/ristretto/z/file.go b/vendor/github.com/outcaste-io/ristretto/z/file.go deleted file mode 100644 index 880caf0ad9..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/file.go +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "encoding/binary" - "fmt" - "io" - "os" - "path/filepath" - - "github.com/pkg/errors" -) - -// MmapFile represents an mmapd file and includes both the buffer to the data -// and the file descriptor. -type MmapFile struct { - Data []byte - Fd *os.File -} - -var NewFile = errors.New("Create a new file") - -func OpenMmapFileUsing(fd *os.File, sz int, writable bool) (*MmapFile, error) { - filename := fd.Name() - fi, err := fd.Stat() - if err != nil { - return nil, errors.Wrapf(err, "cannot stat file: %s", filename) - } - - var rerr error - fileSize := fi.Size() - if sz > 0 && fileSize == 0 { - // If file is empty, truncate it to sz. - if err := fd.Truncate(int64(sz)); err != nil { - return nil, errors.Wrapf(err, "error while truncation") - } - fileSize = int64(sz) - rerr = NewFile - } - - // fmt.Printf("Mmaping file: %s with writable: %v filesize: %d\n", fd.Name(), writable, fileSize) - buf, err := Mmap(fd, writable, fileSize) // Mmap up to file size. - if err != nil { - return nil, errors.Wrapf(err, "while mmapping %s with size: %d", fd.Name(), fileSize) - } - - if fileSize == 0 { - dir, _ := filepath.Split(filename) - go SyncDir(dir) - } - return &MmapFile{ - Data: buf, - Fd: fd, - }, rerr -} - -// OpenMmapFile opens an existing file or creates a new file. If the file is -// created, it would truncate the file to maxSz. In both cases, it would mmap -// the file to maxSz and returned it. In case the file is created, z.NewFile is -// returned. -func OpenMmapFile(filename string, flag int, maxSz int) (*MmapFile, error) { - // fmt.Printf("opening file %s with flag: %v\n", filename, flag) - fd, err := os.OpenFile(filename, flag, 0666) - if err != nil { - return nil, errors.Wrapf(err, "unable to open: %s", filename) - } - writable := true - if flag == os.O_RDONLY { - writable = false - } - return OpenMmapFileUsing(fd, maxSz, writable) -} - -type mmapReader struct { - Data []byte - offset int -} - -func (mr *mmapReader) Read(buf []byte) (int, error) { - if mr.offset > len(mr.Data) { - return 0, io.EOF - } - n := copy(buf, mr.Data[mr.offset:]) - mr.offset += n - if n < len(buf) { - return n, io.EOF - } - return n, nil -} - -func (m *MmapFile) NewReader(offset int) io.Reader { - return &mmapReader{ - Data: m.Data, - offset: offset, - } -} - -// Bytes returns data starting from offset off of size sz. If there's not enough data, it would -// return nil slice and io.EOF. -func (m *MmapFile) Bytes(off, sz int) ([]byte, error) { - if len(m.Data[off:]) < sz { - return nil, io.EOF - } - return m.Data[off : off+sz], nil -} - -// Slice returns the slice at the given offset. -func (m *MmapFile) Slice(offset int) []byte { - sz := binary.BigEndian.Uint32(m.Data[offset:]) - start := offset + 4 - next := start + int(sz) - if next > len(m.Data) { - return []byte{} - } - res := m.Data[start:next] - return res -} - -// AllocateSlice allocates a slice of the given size at the given offset. -func (m *MmapFile) AllocateSlice(sz, offset int) ([]byte, int, error) { - start := offset + 4 - - // If the file is too small, double its size or increase it by 1GB, whichever is smaller. - if start+sz > len(m.Data) { - const oneGB = 1 << 30 - growBy := len(m.Data) - if growBy > oneGB { - growBy = oneGB - } - if growBy < sz+4 { - growBy = sz + 4 - } - if err := m.Truncate(int64(len(m.Data) + growBy)); err != nil { - return nil, 0, err - } - } - - binary.BigEndian.PutUint32(m.Data[offset:], uint32(sz)) - return m.Data[start : start+sz], start + sz, nil -} - -func (m *MmapFile) Sync() error { - if m == nil { - return nil - } - return Msync(m.Data) -} - -func (m *MmapFile) Delete() error { - // Badger can set the m.Data directly, without setting any Fd. In that case, this should be a - // NOOP. - if m.Fd == nil { - return nil - } - - if err := Munmap(m.Data); err != nil { - return fmt.Errorf("while munmap file: %s, error: %v\n", m.Fd.Name(), err) - } - m.Data = nil - if err := m.Fd.Truncate(0); err != nil { - return fmt.Errorf("while truncate file: %s, error: %v\n", m.Fd.Name(), err) - } - if err := m.Fd.Close(); err != nil { - return fmt.Errorf("while close file: %s, error: %v\n", m.Fd.Name(), err) - } - return os.Remove(m.Fd.Name()) -} - -// Close would close the file. It would also truncate the file if maxSz >= 0. -func (m *MmapFile) Close(maxSz int64) error { - // Badger can set the m.Data directly, without setting any Fd. In that case, this should be a - // NOOP. - if m.Fd == nil { - return nil - } - if err := m.Sync(); err != nil { - return fmt.Errorf("while sync file: %s, error: %v\n", m.Fd.Name(), err) - } - if err := Munmap(m.Data); err != nil { - return fmt.Errorf("while munmap file: %s, error: %v\n", m.Fd.Name(), err) - } - if maxSz >= 0 { - if err := m.Fd.Truncate(maxSz); err != nil { - return fmt.Errorf("while truncate file: %s, error: %v\n", m.Fd.Name(), err) - } - } - return m.Fd.Close() -} - -func SyncDir(dir string) error { - df, err := os.Open(dir) - if err != nil { - return errors.Wrapf(err, "while opening %s", dir) - } - if err := df.Sync(); err != nil { - return errors.Wrapf(err, "while syncing %s", dir) - } - if err := df.Close(); err != nil { - return errors.Wrapf(err, "while closing %s", dir) - } - return nil -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/file_default.go b/vendor/github.com/outcaste-io/ristretto/z/file_default.go deleted file mode 100644 index d9c0db43e7..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/file_default.go +++ /dev/null @@ -1,39 +0,0 @@ -// +build !linux - -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import "fmt" - -// Truncate would truncate the mmapped file to the given size. On Linux, we truncate -// the underlying file and then call mremap, but on other systems, we unmap first, -// then truncate, then re-map. -func (m *MmapFile) Truncate(maxSz int64) error { - if err := m.Sync(); err != nil { - return fmt.Errorf("while sync file: %s, error: %v\n", m.Fd.Name(), err) - } - if err := Munmap(m.Data); err != nil { - return fmt.Errorf("while munmap file: %s, error: %v\n", m.Fd.Name(), err) - } - if err := m.Fd.Truncate(maxSz); err != nil { - return fmt.Errorf("while truncate file: %s, error: %v\n", m.Fd.Name(), err) - } - var err error - m.Data, err = Mmap(m.Fd, true, maxSz) // Mmap up to max size. - return err -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/file_linux.go b/vendor/github.com/outcaste-io/ristretto/z/file_linux.go deleted file mode 100644 index 7f670bd2cc..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/file_linux.go +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "fmt" -) - -// Truncate would truncate the mmapped file to the given size. On Linux, we truncate -// the underlying file and then call mremap, but on other systems, we unmap first, -// then truncate, then re-map. -func (m *MmapFile) Truncate(maxSz int64) error { - if err := m.Sync(); err != nil { - return fmt.Errorf("while sync file: %s, error: %v\n", m.Fd.Name(), err) - } - if err := m.Fd.Truncate(maxSz); err != nil { - return fmt.Errorf("while truncate file: %s, error: %v\n", m.Fd.Name(), err) - } - - var err error - m.Data, err = mremap(m.Data, int(maxSz)) // Mmap up to max size. - return err -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/flags.go b/vendor/github.com/outcaste-io/ristretto/z/flags.go deleted file mode 100644 index 4aca58f305..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/flags.go +++ /dev/null @@ -1,324 +0,0 @@ -package z - -import ( - "fmt" - "os" - "os/user" - "path/filepath" - "sort" - "strconv" - "strings" - "time" - - "github.com/pkg/errors" -) - -// SuperFlagHelp makes it really easy to generate command line `--help` output for a SuperFlag. For -// example: -// -// const flagDefaults = `enabled=true; path=some/path;` -// -// var help string = z.NewSuperFlagHelp(flagDefaults). -// Flag("enabled", "Turns on ."). -// Flag("path", "The path to ."). -// Flag("another", "Not present in defaults, but still included."). -// String() -// -// The `help` string would then contain: -// -// enabled=true; Turns on . -// path=some/path; The path to . -// another=; Not present in defaults, but still included. -// -// All flags are sorted alphabetically for consistent `--help` output. Flags with default values are -// placed at the top, and everything else goes under. -type SuperFlagHelp struct { - head string - defaults *SuperFlag - flags map[string]string -} - -func NewSuperFlagHelp(defaults string) *SuperFlagHelp { - return &SuperFlagHelp{ - defaults: NewSuperFlag(defaults), - flags: make(map[string]string, 0), - } -} - -func (h *SuperFlagHelp) Head(head string) *SuperFlagHelp { - h.head = head - return h -} - -func (h *SuperFlagHelp) Flag(name, description string) *SuperFlagHelp { - h.flags[name] = description - return h -} - -func (h *SuperFlagHelp) String() string { - defaultLines := make([]string, 0) - otherLines := make([]string, 0) - for name, help := range h.flags { - val, found := h.defaults.m[name] - line := fmt.Sprintf(" %s=%s; %s\n", name, val, help) - if found { - defaultLines = append(defaultLines, line) - } else { - otherLines = append(otherLines, line) - } - } - sort.Strings(defaultLines) - sort.Strings(otherLines) - dls := strings.Join(defaultLines, "") - ols := strings.Join(otherLines, "") - if len(h.defaults.m) == 0 && len(ols) == 0 { - // remove last newline - dls = dls[:len(dls)-1] - } - // remove last newline - if len(h.defaults.m) == 0 && len(ols) > 1 { - ols = ols[:len(ols)-1] - } - return h.head + "\n" + dls + ols -} - -func parseFlag(flag string) (map[string]string, error) { - kvm := make(map[string]string) - for _, kv := range strings.Split(flag, ";") { - if strings.TrimSpace(kv) == "" { - continue - } - // For a non-empty separator, 0 < len(splits) ≤ 2. - splits := strings.SplitN(kv, "=", 2) - k := strings.TrimSpace(splits[0]) - if len(splits) < 2 { - return nil, fmt.Errorf("superflag: missing value for '%s' in flag: %s", k, flag) - } - k = strings.ToLower(k) - k = strings.ReplaceAll(k, "_", "-") - kvm[k] = strings.TrimSpace(splits[1]) - } - return kvm, nil -} - -type SuperFlag struct { - m map[string]string -} - -func NewSuperFlag(flag string) *SuperFlag { - sf, err := newSuperFlagImpl(flag) - if err != nil { - fatal(err) - } - return sf -} - -func newSuperFlagImpl(flag string) (*SuperFlag, error) { - m, err := parseFlag(flag) - if err != nil { - return nil, err - } - return &SuperFlag{m}, nil -} - -func (sf *SuperFlag) String() string { - if sf == nil { - return "" - } - kvs := make([]string, 0, len(sf.m)) - for k, v := range sf.m { - kvs = append(kvs, fmt.Sprintf("%s=%s", k, v)) - } - return strings.Join(kvs, "; ") -} - -func (sf *SuperFlag) MergeAndCheckDefault(flag string) *SuperFlag { - sf, err := sf.MergeWithDefault(flag) - if err != nil { - fatal(err) - } - return sf -} - -func (sf *SuperFlag) Merge(flag string) *SuperFlag { - src, err := parseFlag(flag) - if err != nil { - fatal(err) - } - for k, v := range src { - if _, ok := sf.m[k]; !ok { - fatal("Unable to find the flag in SuperFlag") - } - sf.m[k] = v - } - return sf -} - -func (sf *SuperFlag) MergeWithDefault(flag string) (*SuperFlag, error) { - if sf == nil { - m, err := parseFlag(flag) - if err != nil { - return nil, err - } - return &SuperFlag{m}, nil - } - - src, err := parseFlag(flag) - if err != nil { - return nil, err - } - - numKeys := len(sf.m) - for k := range src { - if _, ok := sf.m[k]; ok { - numKeys-- - } - } - if numKeys != 0 { - return nil, fmt.Errorf("superflag: found invalid options in flag: %s.\nvalid options: %v", sf, flag) - } - for k, v := range src { - if _, ok := sf.m[k]; !ok { - sf.m[k] = v - } - } - return sf, nil -} - -func (sf *SuperFlag) Has(opt string) bool { - val := sf.GetString(opt) - return val != "" -} - -func (sf *SuperFlag) GetDuration(opt string) time.Duration { - val := sf.GetString(opt) - if val == "" { - return time.Duration(0) - } - if strings.Contains(val, "d") { - val = strings.Replace(val, "d", "", 1) - days, err := strconv.ParseUint(val, 0, 64) - if err != nil { - return time.Duration(0) - } - return time.Hour * 24 * time.Duration(days) - } - d, err := time.ParseDuration(val) - if err != nil { - return time.Duration(0) - } - return d -} - -func (sf *SuperFlag) GetBool(opt string) bool { - val := sf.GetString(opt) - if val == "" { - return false - } - b, err := strconv.ParseBool(val) - if err != nil { - err = errors.Wrapf(err, - "Unable to parse %s as bool for key: %s. Options: %s\n", - val, opt, sf) - fatalf("%+v", err) - } - return b -} - -func (sf *SuperFlag) GetFloat64(opt string) float64 { - val := sf.GetString(opt) - if val == "" { - return 0 - } - f, err := strconv.ParseFloat(val, 64) - if err != nil { - err = errors.Wrapf(err, - "Unable to parse %s as float64 for key: %s. Options: %s\n", - val, opt, sf) - fatalf("%+v", err) - } - return f -} - -func (sf *SuperFlag) GetInt64(opt string) int64 { - val := sf.GetString(opt) - if val == "" { - return 0 - } - i, err := strconv.ParseInt(val, 0, 64) - if err != nil { - err = errors.Wrapf(err, - "Unable to parse %s as int64 for key: %s. Options: %s\n", - val, opt, sf) - fatalf("%+v", err) - } - return i -} - -func (sf *SuperFlag) GetUint64(opt string) uint64 { - val := sf.GetString(opt) - if val == "" { - return 0 - } - u, err := strconv.ParseUint(val, 0, 64) - if err != nil { - err = errors.Wrapf(err, - "Unable to parse %s as uint64 for key: %s. Options: %s\n", - val, opt, sf) - fatalf("%+v", err) - } - return u -} - -func (sf *SuperFlag) GetUint32(opt string) uint32 { - val := sf.GetString(opt) - if val == "" { - return 0 - } - u, err := strconv.ParseUint(val, 0, 32) - if err != nil { - err = errors.Wrapf(err, - "Unable to parse %s as uint32 for key: %s. Options: %s\n", - val, opt, sf) - fatalf("%+v", err) - } - return uint32(u) -} - -func (sf *SuperFlag) GetString(opt string) string { - if sf == nil { - return "" - } - return sf.m[opt] -} - -func (sf *SuperFlag) GetPath(opt string) string { - p := sf.GetString(opt) - path, err := expandPath(p) - if err != nil { - fatalf("Failed to get path: %+v", err) - } - return path -} - -// expandPath expands the paths containing ~ to /home/user. It also computes the absolute path -// from the relative paths. For example: ~/abc/../cef will be transformed to /home/user/cef. -func expandPath(path string) (string, error) { - if len(path) == 0 { - return "", nil - } - if path[0] == '~' && (len(path) == 1 || os.IsPathSeparator(path[1])) { - usr, err := user.Current() - if err != nil { - return "", errors.Wrap(err, "Failed to get the home directory of the user") - } - path = filepath.Join(usr.HomeDir, path[1:]) - } - - var err error - path, err = filepath.Abs(path) - if err != nil { - return "", errors.Wrap(err, "Failed to generate absolute path") - } - return path, nil -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/histogram.go b/vendor/github.com/outcaste-io/ristretto/z/histogram.go deleted file mode 100644 index 4eb0c4f6c9..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/histogram.go +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "fmt" - "math" - "strings" - - "github.com/dustin/go-humanize" -) - -// Creates bounds for an histogram. The bounds are powers of two of the form -// [2^min_exponent, ..., 2^max_exponent]. -func HistogramBounds(minExponent, maxExponent uint32) []float64 { - var bounds []float64 - for i := minExponent; i <= maxExponent; i++ { - bounds = append(bounds, float64(int(1)< 4) - bounds := make([]float64, num) - bounds[0] = 1 - bounds[1] = 2 - for i := 2; i < num; i++ { - bounds[i] = bounds[i-1] + bounds[i-2] - } - return bounds -} - -// HistogramData stores the information needed to represent the sizes of the keys and values -// as a histogram. -type HistogramData struct { - Bounds []float64 - Count int64 - CountPerBucket []int64 - Min int64 - Max int64 - Sum int64 -} - -// NewHistogramData returns a new instance of HistogramData with properly initialized fields. -func NewHistogramData(bounds []float64) *HistogramData { - return &HistogramData{ - Bounds: bounds, - CountPerBucket: make([]int64, len(bounds)+1), - Max: 0, - Min: math.MaxInt64, - } -} - -func (histogram *HistogramData) Copy() *HistogramData { - if histogram == nil { - return nil - } - return &HistogramData{ - Bounds: append([]float64{}, histogram.Bounds...), - CountPerBucket: append([]int64{}, histogram.CountPerBucket...), - Count: histogram.Count, - Min: histogram.Min, - Max: histogram.Max, - Sum: histogram.Sum, - } -} - -// Update changes the Min and Max fields if value is less than or greater than the current values. -func (histogram *HistogramData) Update(value int64) { - if histogram == nil { - return - } - if value > histogram.Max { - histogram.Max = value - } - if value < histogram.Min { - histogram.Min = value - } - - histogram.Sum += value - histogram.Count++ - - for index := 0; index <= len(histogram.Bounds); index++ { - // Allocate value in the last buckets if we reached the end of the Bounds array. - if index == len(histogram.Bounds) { - histogram.CountPerBucket[index]++ - break - } - - if value < int64(histogram.Bounds[index]) { - histogram.CountPerBucket[index]++ - break - } - } -} - -// Mean returns the mean value for the histogram. -func (histogram *HistogramData) Mean() float64 { - if histogram.Count == 0 { - return 0 - } - return float64(histogram.Sum) / float64(histogram.Count) -} - -// String converts the histogram data into human-readable string. -func (histogram *HistogramData) String() string { - if histogram == nil { - return "" - } - var b strings.Builder - - b.WriteString("\n -- Histogram: \n") - b.WriteString(fmt.Sprintf("Min value: %d \n", histogram.Min)) - b.WriteString(fmt.Sprintf("Max value: %d \n", histogram.Max)) - b.WriteString(fmt.Sprintf("Count: %d \n", histogram.Count)) - b.WriteString(fmt.Sprintf("50p: %.2f \n", histogram.Percentile(0.5))) - b.WriteString(fmt.Sprintf("75p: %.2f \n", histogram.Percentile(0.75))) - b.WriteString(fmt.Sprintf("90p: %.2f \n", histogram.Percentile(0.90))) - - numBounds := len(histogram.Bounds) - var cum float64 - for index, count := range histogram.CountPerBucket { - if count == 0 { - continue - } - - // The last bucket represents the bucket that contains the range from - // the last bound up to infinity so it's processed differently than the - // other buckets. - if index == len(histogram.CountPerBucket)-1 { - lowerBound := uint64(histogram.Bounds[numBounds-1]) - page := float64(count*100) / float64(histogram.Count) - cum += page - b.WriteString(fmt.Sprintf("[%s, %s) %d %.2f%% %.2f%%\n", - humanize.IBytes(lowerBound), "infinity", count, page, cum)) - continue - } - - upperBound := uint64(histogram.Bounds[index]) - lowerBound := uint64(0) - if index > 0 { - lowerBound = uint64(histogram.Bounds[index-1]) - } - - page := float64(count*100) / float64(histogram.Count) - cum += page - b.WriteString(fmt.Sprintf("[%d, %d) %d %.2f%% %.2f%%\n", - lowerBound, upperBound, count, page, cum)) - } - b.WriteString(" --\n") - return b.String() -} - -// Percentile returns the percentile value for the histogram. -// value of p should be between [0.0-1.0] -func (histogram *HistogramData) Percentile(p float64) float64 { - if histogram == nil { - return 0 - } - - if histogram.Count == 0 { - // if no data return the minimum range - return histogram.Bounds[0] - } - pval := int64(float64(histogram.Count) * p) - for i, v := range histogram.CountPerBucket { - pval = pval - v - if pval <= 0 { - if i == len(histogram.Bounds) { - break - } - return histogram.Bounds[i] - } - } - // default return should be the max range - return histogram.Bounds[len(histogram.Bounds)-1] -} - -// Clear reset the histogram. Helpful in situations where we need to reset the metrics -func (histogram *HistogramData) Clear() { - if histogram == nil { - return - } - - histogram.Count = 0 - histogram.CountPerBucket = make([]int64, len(histogram.Bounds)+1) - histogram.Sum = 0 - histogram.Max = 0 - histogram.Min = math.MaxInt64 -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap.go b/vendor/github.com/outcaste-io/ristretto/z/mmap.go deleted file mode 100644 index 9b02510003..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap.go +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" -) - -// Mmap uses the mmap system call to memory-map a file. If writable is true, -// memory protection of the pages is set so that they may be written to as well. -func Mmap(fd *os.File, writable bool, size int64) ([]byte, error) { - return mmap(fd, writable, size) -} - -// Munmap unmaps a previously mapped slice. -func Munmap(b []byte) error { - return munmap(b) -} - -// Madvise uses the madvise system call to give advise about the use of memory -// when using a slice that is memory-mapped to a file. Set the readahead flag to -// false if page references are expected in random order. -func Madvise(b []byte, readahead bool) error { - return madvise(b, readahead) -} - -// Msync would call sync on the mmapped data. -func Msync(b []byte) error { - return msync(b) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_darwin.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_darwin.go deleted file mode 100644 index 4d6d74f193..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_darwin.go +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" - "syscall" - "unsafe" - - "golang.org/x/sys/unix" -) - -// Mmap uses the mmap system call to memory-map a file. If writable is true, -// memory protection of the pages is set so that they may be written to as well. -func mmap(fd *os.File, writable bool, size int64) ([]byte, error) { - mtype := unix.PROT_READ - if writable { - mtype |= unix.PROT_WRITE - } - return unix.Mmap(int(fd.Fd()), 0, int(size), mtype, unix.MAP_SHARED) -} - -// Munmap unmaps a previously mapped slice. -func munmap(b []byte) error { - return unix.Munmap(b) -} - -// This is required because the unix package does not support the madvise system call on OS X. -func madvise(b []byte, readahead bool) error { - advice := unix.MADV_NORMAL - if !readahead { - advice = unix.MADV_RANDOM - } - - _, _, e1 := syscall.Syscall(syscall.SYS_MADVISE, uintptr(unsafe.Pointer(&b[0])), - uintptr(len(b)), uintptr(advice)) - if e1 != 0 { - return e1 - } - return nil -} - -func msync(b []byte) error { - return unix.Msync(b, unix.MS_SYNC) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_linux.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_linux.go deleted file mode 100644 index 8843e4243b..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_linux.go +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" - "reflect" - "unsafe" - - "golang.org/x/sys/unix" -) - -// mmap uses the mmap system call to memory-map a file. If writable is true, -// memory protection of the pages is set so that they may be written to as well. -func mmap(fd *os.File, writable bool, size int64) ([]byte, error) { - mtype := unix.PROT_READ - if writable { - mtype |= unix.PROT_WRITE - } - return unix.Mmap(int(fd.Fd()), 0, int(size), mtype, unix.MAP_SHARED) -} - -// mremap is a Linux-specific system call to remap pages in memory. This can be used in place of munmap + mmap. -func mremap(data []byte, size int) ([]byte, error) { - // taken from - const MREMAP_MAYMOVE = 0x1 - - header := (*reflect.SliceHeader)(unsafe.Pointer(&data)) - mmapAddr, _, errno := unix.Syscall6( - unix.SYS_MREMAP, - header.Data, - uintptr(header.Len), - uintptr(size), - uintptr(MREMAP_MAYMOVE), - 0, - 0, - ) - if errno != 0 { - return nil, errno - } - - header.Data = mmapAddr - header.Cap = size - header.Len = size - return data, nil -} - -// munmap unmaps a previously mapped slice. -// -// unix.Munmap maintains an internal list of mmapped addresses, and only calls munmap -// if the address is present in that list. If we use mremap, this list is not updated. -// To bypass this, we call munmap ourselves. -func munmap(data []byte) error { - if len(data) == 0 || len(data) != cap(data) { - return unix.EINVAL - } - _, _, errno := unix.Syscall( - unix.SYS_MUNMAP, - uintptr(unsafe.Pointer(&data[0])), - uintptr(len(data)), - 0, - ) - if errno != 0 { - return errno - } - return nil -} - -// madvise uses the madvise system call to give advise about the use of memory -// when using a slice that is memory-mapped to a file. Set the readahead flag to -// false if page references are expected in random order. -func madvise(b []byte, readahead bool) error { - flags := unix.MADV_NORMAL - if !readahead { - flags = unix.MADV_RANDOM - } - return unix.Madvise(b, flags) -} - -// msync writes any modified data to persistent storage. -func msync(b []byte) error { - return unix.Msync(b, unix.MS_SYNC) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_plan9.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_plan9.go deleted file mode 100644 index f30729654f..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_plan9.go +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" - "syscall" -) - -// Mmap uses the mmap system call to memory-map a file. If writable is true, -// memory protection of the pages is set so that they may be written to as well. -func mmap(fd *os.File, writable bool, size int64) ([]byte, error) { - return nil, syscall.EPLAN9 -} - -// Munmap unmaps a previously mapped slice. -func munmap(b []byte) error { - return syscall.EPLAN9 -} - -// Madvise uses the madvise system call to give advise about the use of memory -// when using a slice that is memory-mapped to a file. Set the readahead flag to -// false if page references are expected in random order. -func madvise(b []byte, readahead bool) error { - return syscall.EPLAN9 -} - -func msync(b []byte) error { - return syscall.EPLAN9 -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_unix.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_unix.go deleted file mode 100644 index 629449f9d3..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_unix.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !windows && !darwin && !plan9 && !linux && !wasip1 -// +build !windows,!darwin,!plan9,!linux,!wasip1 - -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" - - "golang.org/x/sys/unix" -) - -// Mmap uses the mmap system call to memory-map a file. If writable is true, -// memory protection of the pages is set so that they may be written to as well. -func mmap(fd *os.File, writable bool, size int64) ([]byte, error) { - mtype := unix.PROT_READ - if writable { - mtype |= unix.PROT_WRITE - } - return unix.Mmap(int(fd.Fd()), 0, int(size), mtype, unix.MAP_SHARED) -} - -// Munmap unmaps a previously mapped slice. -func munmap(b []byte) error { - return unix.Munmap(b) -} - -// Madvise uses the madvise system call to give advise about the use of memory -// when using a slice that is memory-mapped to a file. Set the readahead flag to -// false if page references are expected in random order. -func madvise(b []byte, readahead bool) error { - flags := unix.MADV_NORMAL - if !readahead { - flags = unix.MADV_RANDOM - } - return unix.Madvise(b, flags) -} - -func msync(b []byte) error { - return unix.Msync(b, unix.MS_SYNC) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_wasip1.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_wasip1.go deleted file mode 100644 index 94f7148451..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_wasip1.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build wasip1 - -/* - * Copyright 2023 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "os" - "syscall" -) - -func mmap(fd *os.File, writeable bool, size int64) ([]byte, error) { - return nil, syscall.ENOSYS -} - -func munmap(b []byte) error { - return syscall.ENOSYS -} - -func madvise(b []byte, readahead bool) error { - return syscall.ENOSYS -} - -func msync(b []byte) error { - return syscall.ENOSYS -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/mmap_windows.go b/vendor/github.com/outcaste-io/ristretto/z/mmap_windows.go deleted file mode 100644 index 0ea6e9448e..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/mmap_windows.go +++ /dev/null @@ -1,95 +0,0 @@ -// +build windows - -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "fmt" - "os" - "syscall" - "unsafe" -) - -func mmap(fd *os.File, write bool, size int64) ([]byte, error) { - protect := syscall.PAGE_READONLY - access := syscall.FILE_MAP_READ - - if write { - protect = syscall.PAGE_READWRITE - access = syscall.FILE_MAP_WRITE - } - fi, err := fd.Stat() - if err != nil { - return nil, err - } - - // In windows, we cannot mmap a file more than it's actual size. - // So truncate the file to the size of the mmap. - if fi.Size() < size { - if err := fd.Truncate(size); err != nil { - return nil, fmt.Errorf("truncate: %s", err) - } - } - - // Open a file mapping handle. - sizelo := uint32(size >> 32) - sizehi := uint32(size) & 0xffffffff - - handler, err := syscall.CreateFileMapping(syscall.Handle(fd.Fd()), nil, - uint32(protect), sizelo, sizehi, nil) - if err != nil { - return nil, os.NewSyscallError("CreateFileMapping", err) - } - - // Create the memory map. - addr, err := syscall.MapViewOfFile(handler, uint32(access), 0, 0, uintptr(size)) - if addr == 0 { - return nil, os.NewSyscallError("MapViewOfFile", err) - } - - // Close mapping handle. - if err := syscall.CloseHandle(syscall.Handle(handler)); err != nil { - return nil, os.NewSyscallError("CloseHandle", err) - } - - // Slice memory layout - // Copied this snippet from golang/sys package - var sl = struct { - addr uintptr - len int - cap int - }{addr, int(size), int(size)} - - // Use unsafe to turn sl into a []byte. - data := *(*[]byte)(unsafe.Pointer(&sl)) - - return data, nil -} - -func munmap(b []byte) error { - return syscall.UnmapViewOfFile(uintptr(unsafe.Pointer(&b[0]))) -} - -func madvise(b []byte, readahead bool) error { - // Do Nothing. We don’t care about this setting on Windows - return nil -} - -func msync(b []byte) error { - return syscall.FlushViewOfFile(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/rtutil.go b/vendor/github.com/outcaste-io/ristretto/z/rtutil.go deleted file mode 100644 index 8f317c80d3..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/rtutil.go +++ /dev/null @@ -1,75 +0,0 @@ -// MIT License - -// Copyright (c) 2019 Ewan Chou - -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. - -package z - -import ( - "unsafe" -) - -// NanoTime returns the current time in nanoseconds from a monotonic clock. -//go:linkname NanoTime runtime.nanotime -func NanoTime() int64 - -// CPUTicks is a faster alternative to NanoTime to measure time duration. -//go:linkname CPUTicks runtime.cputicks -func CPUTicks() int64 - -type stringStruct struct { - str unsafe.Pointer - len int -} - -//go:noescape -//go:linkname memhash runtime.memhash -func memhash(p unsafe.Pointer, h, s uintptr) uintptr - -// MemHash is the hash function used by go map, it utilizes available hardware instructions(behaves -// as aeshash if aes instruction is available). -// NOTE: The hash seed changes for every process. So, this cannot be used as a persistent hash. -func MemHash(data []byte) uint64 { - ss := (*stringStruct)(unsafe.Pointer(&data)) - return uint64(memhash(ss.str, 0, uintptr(ss.len))) -} - -// MemHashString is the hash function used by go map, it utilizes available hardware instructions -// (behaves as aeshash if aes instruction is available). -// NOTE: The hash seed changes for every process. So, this cannot be used as a persistent hash. -func MemHashString(str string) uint64 { - ss := (*stringStruct)(unsafe.Pointer(&str)) - return uint64(memhash(ss.str, 0, uintptr(ss.len))) -} - -// FastRand is a fast thread local random function. -//go:linkname FastRand runtime.fastrand -func FastRand() uint32 - -//go:linkname memclrNoHeapPointers runtime.memclrNoHeapPointers -func memclrNoHeapPointers(p unsafe.Pointer, n uintptr) - -func Memclr(b []byte) { - if len(b) == 0 { - return - } - p := unsafe.Pointer(&b[0]) - memclrNoHeapPointers(p, uintptr(len(b))) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/rtutil.s b/vendor/github.com/outcaste-io/ristretto/z/rtutil.s deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/vendor/github.com/outcaste-io/ristretto/z/simd/baseline.go b/vendor/github.com/outcaste-io/ristretto/z/simd/baseline.go deleted file mode 100644 index 967e3a307e..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/simd/baseline.go +++ /dev/null @@ -1,127 +0,0 @@ -package simd - -import ( - "fmt" - "runtime" - "sort" - "sync" -) - -// Search finds the key using the naive way -func Naive(xs []uint64, k uint64) int16 { - var i int - for i = 0; i < len(xs); i += 2 { - x := xs[i] - if x >= k { - return int16(i / 2) - } - } - return int16(i / 2) -} - -func Clever(xs []uint64, k uint64) int16 { - if len(xs) < 8 { - return Naive(xs, k) - } - var twos, pk [4]uint64 - pk[0] = k - pk[1] = k - pk[2] = k - pk[3] = k - for i := 0; i < len(xs); i += 8 { - twos[0] = xs[i] - twos[1] = xs[i+2] - twos[2] = xs[i+4] - twos[3] = xs[i+6] - if twos[0] >= pk[0] { - return int16(i / 2) - } - if twos[1] >= pk[1] { - return int16((i + 2) / 2) - } - if twos[2] >= pk[2] { - return int16((i + 4) / 2) - } - if twos[3] >= pk[3] { - return int16((i + 6) / 2) - } - - } - return int16(len(xs) / 2) -} - -func Parallel(xs []uint64, k uint64) int16 { - cpus := runtime.NumCPU() - if cpus%2 != 0 { - panic(fmt.Sprintf("odd number of CPUs %v", cpus)) - } - sz := len(xs)/cpus + 1 - var wg sync.WaitGroup - retChan := make(chan int16, cpus) - for i := 0; i < len(xs); i += sz { - end := i + sz - if end >= len(xs) { - end = len(xs) - } - chunk := xs[i:end] - wg.Add(1) - go func(hd int16, xs []uint64, k uint64, wg *sync.WaitGroup, ch chan int16) { - for i := 0; i < len(xs); i += 2 { - if xs[i] >= k { - ch <- (int16(i) + hd) / 2 - break - } - } - wg.Done() - }(int16(i), chunk, k, &wg, retChan) - } - wg.Wait() - close(retChan) - var min int16 = (1 << 15) - 1 - for i := range retChan { - if i < min { - min = i - } - } - if min == (1<<15)-1 { - return int16(len(xs) / 2) - } - return min -} - -func Binary(keys []uint64, key uint64) int16 { - return int16(sort.Search(len(keys), func(i int) bool { - if i*2 >= len(keys) { - return true - } - return keys[i*2] >= key - })) -} - -func cmp2_native(twos, pk [2]uint64) int16 { - if twos[0] == pk[0] { - return 0 - } - if twos[1] == pk[1] { - return 1 - } - return 2 -} - -func cmp4_native(fours, pk [4]uint64) int16 { - for i := range fours { - if fours[i] >= pk[i] { - return int16(i) - } - } - return 4 -} - -func cmp8_native(a [8]uint64, pk [4]uint64) int16 { - for i := range a { - if a[i] >= pk[0] { - return int16(i) - } - } - return 8 -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/simd/search.go b/vendor/github.com/outcaste-io/ristretto/z/simd/search.go deleted file mode 100644 index b1e639225a..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/simd/search.go +++ /dev/null @@ -1,51 +0,0 @@ -// +build !amd64 - -/* - * Copyright 2020 Dgraph Labs, Inc. and Contributors - * - * 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 simd - -// Search uses the Clever search to find the correct key. -func Search(xs []uint64, k uint64) int16 { - if len(xs) < 8 || (len(xs) % 8 != 0) { - return Naive(xs, k) - } - var twos, pk [4]uint64 - pk[0] = k - pk[1] = k - pk[2] = k - pk[3] = k - for i := 0; i < len(xs); i += 8 { - twos[0] = xs[i] - twos[1] = xs[i+2] - twos[2] = xs[i+4] - twos[3] = xs[i+6] - if twos[0] >= pk[0] { - return int16(i / 2) - } - if twos[1] >= pk[1] { - return int16((i + 2) / 2) - } - if twos[2] >= pk[2] { - return int16((i + 4) / 2) - } - if twos[3] >= pk[3] { - return int16((i + 6) / 2) - } - - } - return int16(len(xs) / 2) -} diff --git a/vendor/github.com/outcaste-io/ristretto/z/simd/search_amd64.s b/vendor/github.com/outcaste-io/ristretto/z/simd/search_amd64.s deleted file mode 100644 index 150c846647..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/simd/search_amd64.s +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by command: go run asm2.go -out search_amd64.s -stubs stub_search_amd64.go. DO NOT EDIT. - -#include "textflag.h" - -// func Search(xs []uint64, k uint64) int16 -TEXT ·Search(SB), NOSPLIT, $0-34 - MOVQ xs_base+0(FP), AX - MOVQ xs_len+8(FP), CX - MOVQ k+24(FP), DX - - // Save n - MOVQ CX, BX - - // Initialize idx register to zero. - XORL BP, BP - -loop: - // Unroll1 - CMPQ (AX)(BP*8), DX - JAE Found - - // Unroll2 - CMPQ 16(AX)(BP*8), DX - JAE Found2 - - // Unroll3 - CMPQ 32(AX)(BP*8), DX - JAE Found3 - - // Unroll4 - CMPQ 48(AX)(BP*8), DX - JAE Found4 - - // plus8 - ADDQ $0x08, BP - CMPQ BP, CX - JB loop - JMP NotFound - -Found2: - ADDL $0x02, BP - JMP Found - -Found3: - ADDL $0x04, BP - JMP Found - -Found4: - ADDL $0x06, BP - -Found: - MOVL BP, BX - -NotFound: - MOVL BX, BP - SHRL $0x1f, BP - ADDL BX, BP - SHRL $0x01, BP - MOVL BP, ret+32(FP) - RET diff --git a/vendor/github.com/outcaste-io/ristretto/z/simd/stub_search_amd64.go b/vendor/github.com/outcaste-io/ristretto/z/simd/stub_search_amd64.go deleted file mode 100644 index 0821d38a77..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/simd/stub_search_amd64.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by command: go run asm2.go -out search_amd64.s -stubs stub_search_amd64.go. DO NOT EDIT. - -package simd - -// Search finds the first idx for which xs[idx] >= k in xs. -func Search(xs []uint64, k uint64) int16 diff --git a/vendor/github.com/outcaste-io/ristretto/z/z.go b/vendor/github.com/outcaste-io/ristretto/z/z.go deleted file mode 100644 index 45c15cdcd8..0000000000 --- a/vendor/github.com/outcaste-io/ristretto/z/z.go +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright 2019 Dgraph Labs, Inc. and Contributors - * - * 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 z - -import ( - "context" - "fmt" - "os" - "sync" - - "github.com/cespare/xxhash/v2" -) - -// TODO: Figure out a way to re-use memhash for the second uint64 hash, we -// already know that appending bytes isn't reliable for generating a -// second hash (see Ristretto PR #88). -// -// We also know that while the Go runtime has a runtime memhash128 -// function, it's not possible to use it to generate [2]uint64 or -// anything resembling a 128bit hash, even though that's exactly what -// we need in this situation. -func KeyToHash(key interface{}) (uint64, uint64) { - if key == nil { - return 0, 0 - } - switch k := key.(type) { - case uint64: - return k, 0 - case string: - return MemHashString(k), xxhash.Sum64String(k) - case []byte: - return MemHash(k), xxhash.Sum64(k) - case byte: - return uint64(k), 0 - case int: - return uint64(k), 0 - case int32: - return uint64(k), 0 - case uint32: - return uint64(k), 0 - case int64: - return uint64(k), 0 - default: - panic("Key type not supported") - } -} - -var ( - dummyCloserChan <-chan struct{} - tmpDir string -) - -// Closer holds the two things we need to close a goroutine and wait for it to -// finish: a chan to tell the goroutine to shut down, and a WaitGroup with -// which to wait for it to finish shutting down. -type Closer struct { - waiting sync.WaitGroup - - ctx context.Context - cancel context.CancelFunc -} - -// SetTmpDir sets the temporary directory for the temporary buffers. -func SetTmpDir(dir string) { - tmpDir = dir -} - -// NewCloser constructs a new Closer, with an initial count on the WaitGroup. -func NewCloser(initial int) *Closer { - ret := &Closer{} - ret.ctx, ret.cancel = context.WithCancel(context.Background()) - ret.waiting.Add(initial) - return ret -} - -// AddRunning Add()'s delta to the WaitGroup. -func (lc *Closer) AddRunning(delta int) { - lc.waiting.Add(delta) -} - -// Ctx can be used to get a context, which would automatically get cancelled when Signal is called. -func (lc *Closer) Ctx() context.Context { - if lc == nil { - return context.Background() - } - return lc.ctx -} - -// Signal signals the HasBeenClosed signal. -func (lc *Closer) Signal() { - // Todo(ibrahim): Change Signal to return error on next badger breaking change. - lc.cancel() -} - -// HasBeenClosed gets signaled when Signal() is called. -func (lc *Closer) HasBeenClosed() <-chan struct{} { - if lc == nil { - return dummyCloserChan - } - return lc.ctx.Done() -} - -// Done calls Done() on the WaitGroup. -func (lc *Closer) Done() { - if lc == nil { - return - } - lc.waiting.Done() -} - -// Wait waits on the WaitGroup. (It waits for NewCloser's initial value, AddRunning, and Done -// calls to balance out.) -func (lc *Closer) Wait() { - lc.waiting.Wait() -} - -// SignalAndWait calls Signal(), then Wait(). -func (lc *Closer) SignalAndWait() { - lc.Signal() - lc.Wait() -} - -// ZeroOut zeroes out all the bytes in the range [start, end). -func ZeroOut(dst []byte, start, end int) { - if start < 0 || start >= len(dst) { - return // BAD - } - if end >= len(dst) { - end = len(dst) - } - if end-start <= 0 { - return - } - Memclr(dst[start:end]) - // b := dst[start:end] - // for i := range b { - // b[i] = 0x0 - // } -} - -func fatal(args ...interface{}) { - defer os.Exit(1) - panic(fmt.Sprint(args...)) -} - -func fatalf(format string, args ...interface{}) { - defer os.Exit(1) - panic(fmt.Sprintf(format, args...)) -} diff --git a/vendor/github.com/philhofer/fwd/LICENSE.md b/vendor/github.com/philhofer/fwd/LICENSE.md deleted file mode 100644 index 1ac6a81f6a..0000000000 --- a/vendor/github.com/philhofer/fwd/LICENSE.md +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (c) 2014-2015, Philip Hofer - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/philhofer/fwd/README.md b/vendor/github.com/philhofer/fwd/README.md deleted file mode 100644 index 4e99523426..0000000000 --- a/vendor/github.com/philhofer/fwd/README.md +++ /dev/null @@ -1,368 +0,0 @@ - -# fwd - -[![Go Reference](https://pkg.go.dev/badge/github.com/philhofer/fwd.svg)](https://pkg.go.dev/github.com/philhofer/fwd) - - -`import "github.com/philhofer/fwd"` - -* [Overview](#pkg-overview) -* [Index](#pkg-index) - -## Overview -Package fwd provides a buffered reader -and writer. Each has methods that help improve -the encoding/decoding performance of some binary -protocols. - -The `Writer` and `Reader` type provide similar -functionality to their counterparts in `bufio`, plus -a few extra utility methods that simplify read-ahead -and write-ahead. I wrote this package to improve serialization -performance for [github.com/tinylib/msgp](https://github.com/tinylib/msgp), -where it provided about a 2x speedup over `bufio` for certain -workloads. However, care must be taken to understand the semantics of the -extra methods provided by this package, as they allow -the user to access and manipulate the buffer memory -directly. - -The extra methods for `fwd.Reader` are `Peek`, `Skip` -and `Next`. `(*fwd.Reader).Peek`, unlike `(*bufio.Reader).Peek`, -will re-allocate the read buffer in order to accommodate arbitrarily -large read-ahead. `(*fwd.Reader).Skip` skips the next `n` bytes -in the stream, and uses the `io.Seeker` interface if the underlying -stream implements it. `(*fwd.Reader).Next` returns a slice pointing -to the next `n` bytes in the read buffer (like `Peek`), but also -increments the read position. This allows users to process streams -in arbitrary block sizes without having to manage appropriately-sized -slices. Additionally, obviating the need to copy the data from the -buffer to another location in memory can improve performance dramatically -in CPU-bound applications. - -`fwd.Writer` only has one extra method, which is `(*fwd.Writer).Next`, which -returns a slice pointing to the next `n` bytes of the writer, and increments -the write position by the length of the returned slice. This allows users -to write directly to the end of the buffer. - - -## Portability - -Because it uses the unsafe package, there are theoretically -no promises about forward or backward portability. - -To stay compatible with tinygo 0.32, unsafestr() has been updated -to use unsafe.Slice() as suggested by -https://tinygo.org/docs/guides/compatibility, which also required -bumping go.mod to require at least go 1.20. - - -## Index -* [Constants](#pkg-constants) -* [type Reader](#Reader) - * [func NewReader(r io.Reader) *Reader](#NewReader) - * [func NewReaderBuf(r io.Reader, buf []byte) *Reader](#NewReaderBuf) - * [func NewReaderSize(r io.Reader, n int) *Reader](#NewReaderSize) - * [func (r *Reader) BufferSize() int](#Reader.BufferSize) - * [func (r *Reader) Buffered() int](#Reader.Buffered) - * [func (r *Reader) Next(n int) ([]byte, error)](#Reader.Next) - * [func (r *Reader) Peek(n int) ([]byte, error)](#Reader.Peek) - * [func (r *Reader) Read(b []byte) (int, error)](#Reader.Read) - * [func (r *Reader) ReadByte() (byte, error)](#Reader.ReadByte) - * [func (r *Reader) ReadFull(b []byte) (int, error)](#Reader.ReadFull) - * [func (r *Reader) Reset(rd io.Reader)](#Reader.Reset) - * [func (r *Reader) Skip(n int) (int, error)](#Reader.Skip) - * [func (r *Reader) WriteTo(w io.Writer) (int64, error)](#Reader.WriteTo) -* [type Writer](#Writer) - * [func NewWriter(w io.Writer) *Writer](#NewWriter) - * [func NewWriterBuf(w io.Writer, buf []byte) *Writer](#NewWriterBuf) - * [func NewWriterSize(w io.Writer, n int) *Writer](#NewWriterSize) - * [func (w *Writer) BufferSize() int](#Writer.BufferSize) - * [func (w *Writer) Buffered() int](#Writer.Buffered) - * [func (w *Writer) Flush() error](#Writer.Flush) - * [func (w *Writer) Next(n int) ([]byte, error)](#Writer.Next) - * [func (w *Writer) ReadFrom(r io.Reader) (int64, error)](#Writer.ReadFrom) - * [func (w *Writer) Write(p []byte) (int, error)](#Writer.Write) - * [func (w *Writer) WriteByte(b byte) error](#Writer.WriteByte) - * [func (w *Writer) WriteString(s string) (int, error)](#Writer.WriteString) - - -## Constants -``` go -const ( - // DefaultReaderSize is the default size of the read buffer - DefaultReaderSize = 2048 -) -``` -``` go -const ( - // DefaultWriterSize is the - // default write buffer size. - DefaultWriterSize = 2048 -) -``` - - - -## type Reader -``` go -type Reader struct { - // contains filtered or unexported fields -} -``` -Reader is a buffered look-ahead reader - - - - - - - - - -### func NewReader -``` go -func NewReader(r io.Reader) *Reader -``` -NewReader returns a new *Reader that reads from 'r' - - -### func NewReaderSize -``` go -func NewReaderSize(r io.Reader, n int) *Reader -``` -NewReaderSize returns a new *Reader that -reads from 'r' and has a buffer size 'n' - - - - -### func (\*Reader) BufferSize -``` go -func (r *Reader) BufferSize() int -``` -BufferSize returns the total size of the buffer - - - -### func (\*Reader) Buffered -``` go -func (r *Reader) Buffered() int -``` -Buffered returns the number of bytes currently in the buffer - - - -### func (\*Reader) Next -``` go -func (r *Reader) Next(n int) ([]byte, error) -``` -Next returns the next 'n' bytes in the stream. -Unlike Peek, Next advances the reader position. -The returned bytes point to the same -data as the buffer, so the slice is -only valid until the next reader method call. -An EOF is considered an unexpected error. -If an the returned slice is less than the -length asked for, an error will be returned, -and the reader position will not be incremented. - - - -### func (\*Reader) Peek -``` go -func (r *Reader) Peek(n int) ([]byte, error) -``` -Peek returns the next 'n' buffered bytes, -reading from the underlying reader if necessary. -It will only return a slice shorter than 'n' bytes -if it also returns an error. Peek does not advance -the reader. EOF errors are *not* returned as -io.ErrUnexpectedEOF. - - - -### func (\*Reader) Read -``` go -func (r *Reader) Read(b []byte) (int, error) -``` -Read implements `io.Reader`. - - - -### func (\*Reader) ReadByte -``` go -func (r *Reader) ReadByte() (byte, error) -``` -ReadByte implements `io.ByteReader`. - - - -### func (\*Reader) ReadFull -``` go -func (r *Reader) ReadFull(b []byte) (int, error) -``` -ReadFull attempts to read len(b) bytes into -'b'. It returns the number of bytes read into -'b', and an error if it does not return len(b). -EOF is considered an unexpected error. - - - -### func (\*Reader) Reset -``` go -func (r *Reader) Reset(rd io.Reader) -``` -Reset resets the underlying reader -and the read buffer. - - - -### func (\*Reader) Skip -``` go -func (r *Reader) Skip(n int) (int, error) -``` -Skip moves the reader forward 'n' bytes. -Returns the number of bytes skipped and any -errors encountered. It is analogous to Seek(n, 1). -If the underlying reader implements io.Seeker, then -that method will be used to skip forward. - -If the reader encounters -an EOF before skipping 'n' bytes, it -returns `io.ErrUnexpectedEOF`. If the -underlying reader implements `io.Seeker`, then -those rules apply instead. (Many implementations -will not return `io.EOF` until the next call -to Read). - - - - -### func (\*Reader) WriteTo -``` go -func (r *Reader) WriteTo(w io.Writer) (int64, error) -``` -WriteTo implements `io.WriterTo`. - - - - -## type Writer -``` go -type Writer struct { - // contains filtered or unexported fields -} - -``` -Writer is a buffered writer - - - - - - - -### func NewWriter -``` go -func NewWriter(w io.Writer) *Writer -``` -NewWriter returns a new writer -that writes to 'w' and has a buffer -that is `DefaultWriterSize` bytes. - - -### func NewWriterBuf -``` go -func NewWriterBuf(w io.Writer, buf []byte) *Writer -``` -NewWriterBuf returns a new writer -that writes to 'w' and has 'buf' as a buffer. -'buf' is not used when has smaller capacity than 18, -custom buffer is allocated instead. - - -### func NewWriterSize -``` go -func NewWriterSize(w io.Writer, n int) *Writer -``` -NewWriterSize returns a new writer that -writes to 'w' and has a buffer size 'n'. - -### func (\*Writer) BufferSize -``` go -func (w *Writer) BufferSize() int -``` -BufferSize returns the maximum size of the buffer. - - - -### func (\*Writer) Buffered -``` go -func (w *Writer) Buffered() int -``` -Buffered returns the number of buffered bytes -in the reader. - - - -### func (\*Writer) Flush -``` go -func (w *Writer) Flush() error -``` -Flush flushes any buffered bytes -to the underlying writer. - - - -### func (\*Writer) Next -``` go -func (w *Writer) Next(n int) ([]byte, error) -``` -Next returns the next 'n' free bytes -in the write buffer, flushing the writer -as necessary. Next will return `io.ErrShortBuffer` -if 'n' is greater than the size of the write buffer. -Calls to 'next' increment the write position by -the size of the returned buffer. - - - -### func (\*Writer) ReadFrom -``` go -func (w *Writer) ReadFrom(r io.Reader) (int64, error) -``` -ReadFrom implements `io.ReaderFrom` - - - -### func (\*Writer) Write -``` go -func (w *Writer) Write(p []byte) (int, error) -``` -Write implements `io.Writer` - - - -### func (\*Writer) WriteByte -``` go -func (w *Writer) WriteByte(b byte) error -``` -WriteByte implements `io.ByteWriter` - - - -### func (\*Writer) WriteString -``` go -func (w *Writer) WriteString(s string) (int, error) -``` -WriteString is analogous to Write, but it takes a string. - - - - - - - - -- - - -Generated by [godoc2md](https://github.com/davecheney/godoc2md) diff --git a/vendor/github.com/philhofer/fwd/reader.go b/vendor/github.com/philhofer/fwd/reader.go deleted file mode 100644 index a24a896e2b..0000000000 --- a/vendor/github.com/philhofer/fwd/reader.go +++ /dev/null @@ -1,445 +0,0 @@ -// Package fwd provides a buffered reader -// and writer. Each has methods that help improve -// the encoding/decoding performance of some binary -// protocols. -// -// The [Writer] and [Reader] type provide similar -// functionality to their counterparts in [bufio], plus -// a few extra utility methods that simplify read-ahead -// and write-ahead. I wrote this package to improve serialization -// performance for http://github.com/tinylib/msgp, -// where it provided about a 2x speedup over `bufio` for certain -// workloads. However, care must be taken to understand the semantics of the -// extra methods provided by this package, as they allow -// the user to access and manipulate the buffer memory -// directly. -// -// The extra methods for [Reader] are [Reader.Peek], [Reader.Skip] -// and [Reader.Next]. (*fwd.Reader).Peek, unlike (*bufio.Reader).Peek, -// will re-allocate the read buffer in order to accommodate arbitrarily -// large read-ahead. (*fwd.Reader).Skip skips the next 'n' bytes -// in the stream, and uses the [io.Seeker] interface if the underlying -// stream implements it. (*fwd.Reader).Next returns a slice pointing -// to the next 'n' bytes in the read buffer (like Reader.Peek), but also -// increments the read position. This allows users to process streams -// in arbitrary block sizes without having to manage appropriately-sized -// slices. Additionally, obviating the need to copy the data from the -// buffer to another location in memory can improve performance dramatically -// in CPU-bound applications. -// -// [Writer] only has one extra method, which is (*fwd.Writer).Next, which -// returns a slice pointing to the next 'n' bytes of the writer, and increments -// the write position by the length of the returned slice. This allows users -// to write directly to the end of the buffer. -package fwd - -import ( - "io" - "os" -) - -const ( - // DefaultReaderSize is the default size of the read buffer - DefaultReaderSize = 2048 - - // minimum read buffer; straight from bufio - minReaderSize = 16 -) - -// NewReader returns a new *Reader that reads from 'r' -func NewReader(r io.Reader) *Reader { - return NewReaderSize(r, DefaultReaderSize) -} - -// NewReaderSize returns a new *Reader that -// reads from 'r' and has a buffer size 'n'. -func NewReaderSize(r io.Reader, n int) *Reader { - buf := make([]byte, 0, max(n, minReaderSize)) - return NewReaderBuf(r, buf) -} - -// NewReaderBuf returns a new *Reader that -// reads from 'r' and uses 'buf' as a buffer. -// 'buf' is not used when has smaller capacity than 16, -// custom buffer is allocated instead. -func NewReaderBuf(r io.Reader, buf []byte) *Reader { - if cap(buf) < minReaderSize { - buf = make([]byte, 0, minReaderSize) - } - buf = buf[:0] - rd := &Reader{ - r: r, - data: buf, - } - if s, ok := r.(io.Seeker); ok { - rd.rs = s - } - return rd -} - -// Reader is a buffered look-ahead reader -type Reader struct { - r io.Reader // underlying reader - - // data[n:len(data)] is buffered data; data[len(data):cap(data)] is free buffer space - data []byte // data - n int // read offset - inputOffset int64 // offset in the input stream - state error // last read error - - // if the reader past to NewReader was - // also an io.Seeker, this is non-nil - rs io.Seeker -} - -// Reset resets the underlying reader -// and the read buffer. -func (r *Reader) Reset(rd io.Reader) { - r.r = rd - r.data = r.data[0:0] - r.n = 0 - r.inputOffset = 0 - r.state = nil - if s, ok := rd.(io.Seeker); ok { - r.rs = s - } else { - r.rs = nil - } -} - -// more() does one read on the underlying reader -func (r *Reader) more() { - // move data backwards so that - // the read offset is 0; this way - // we can supply the maximum number of - // bytes to the reader - if r.n != 0 { - if r.n < len(r.data) { - r.data = r.data[:copy(r.data[0:], r.data[r.n:])] - } else { - r.data = r.data[:0] - } - r.n = 0 - } - var a int - a, r.state = r.r.Read(r.data[len(r.data):cap(r.data)]) - if a == 0 && r.state == nil { - r.state = io.ErrNoProgress - return - } else if a > 0 && r.state == io.EOF { - // discard the io.EOF if we read more than 0 bytes. - // the next call to Read should return io.EOF again. - r.state = nil - } else if r.state != nil { - return - } - r.data = r.data[:len(r.data)+a] -} - -// pop error -func (r *Reader) err() (e error) { - e, r.state = r.state, nil - return -} - -// pop error; EOF -> io.ErrUnexpectedEOF -func (r *Reader) noEOF() (e error) { - e, r.state = r.state, nil - if e == io.EOF { - e = io.ErrUnexpectedEOF - } - return -} - -// buffered bytes -func (r *Reader) buffered() int { return len(r.data) - r.n } - -// Buffered returns the number of bytes currently in the buffer -func (r *Reader) Buffered() int { return len(r.data) - r.n } - -// BufferSize returns the total size of the buffer -func (r *Reader) BufferSize() int { return cap(r.data) } - -// InputOffset returns the input stream byte offset of the current reader position -func (r *Reader) InputOffset() int64 { return r.inputOffset } - -// Peek returns the next 'n' buffered bytes, -// reading from the underlying reader if necessary. -// It will only return a slice shorter than 'n' bytes -// if it also returns an error. Peek does not advance -// the reader. EOF errors are *not* returned as -// io.ErrUnexpectedEOF. -func (r *Reader) Peek(n int) ([]byte, error) { - // in the degenerate case, - // we may need to realloc - // (the caller asked for more - // bytes than the size of the buffer) - if cap(r.data) < n { - old := r.data[r.n:] - r.data = make([]byte, n+r.buffered()) - r.data = r.data[:copy(r.data, old)] - r.n = 0 - } - - // keep filling until - // we hit an error or - // read enough bytes - for r.buffered() < n && r.state == nil { - r.more() - } - - // we must have hit an error - if r.buffered() < n { - return r.data[r.n:], r.err() - } - - return r.data[r.n : r.n+n], nil -} - -func (r *Reader) PeekByte() (b byte, err error) { - if len(r.data)-r.n >= 1 { - b = r.data[r.n] - } else { - b, err = r.peekByte() - } - return -} - -func (r *Reader) peekByte() (byte, error) { - const n = 1 - if cap(r.data) < n { - old := r.data[r.n:] - r.data = make([]byte, n+r.buffered()) - r.data = r.data[:copy(r.data, old)] - r.n = 0 - } - - // keep filling until - // we hit an error or - // read enough bytes - for r.buffered() < n && r.state == nil { - r.more() - } - - // we must have hit an error - if r.buffered() < n { - return 0, r.err() - } - return r.data[r.n], nil -} - -// discard(n) discards up to 'n' buffered bytes, and -// and returns the number of bytes discarded -func (r *Reader) discard(n int) int { - inbuf := r.buffered() - if inbuf <= n { - r.n = 0 - r.inputOffset += int64(inbuf) - r.data = r.data[:0] - return inbuf - } - r.n += n - r.inputOffset += int64(n) - return n -} - -// Skip moves the reader forward 'n' bytes. -// Returns the number of bytes skipped and any -// errors encountered. It is analogous to Seek(n, 1). -// If the underlying reader implements io.Seeker, then -// that method will be used to skip forward. -// -// If the reader encounters -// an EOF before skipping 'n' bytes, it -// returns [io.ErrUnexpectedEOF]. If the -// underlying reader implements [io.Seeker], then -// those rules apply instead. (Many implementations -// will not return [io.EOF] until the next call -// to Read). -func (r *Reader) Skip(n int) (int, error) { - if n < 0 { - return 0, os.ErrInvalid - } - - // discard some or all of the current buffer - skipped := r.discard(n) - - // if we can Seek() through the remaining bytes, do that - if n > skipped && r.rs != nil { - nn, err := r.rs.Seek(int64(n-skipped), 1) - r.inputOffset += nn - return int(nn) + skipped, err - } - // otherwise, keep filling the buffer - // and discarding it up to 'n' - for skipped < n && r.state == nil { - r.more() - skipped += r.discard(n - skipped) - } - return skipped, r.noEOF() -} - -// Next returns the next 'n' bytes in the stream. -// Unlike Peek, Next advances the reader position. -// The returned bytes point to the same -// data as the buffer, so the slice is -// only valid until the next reader method call. -// An EOF is considered an unexpected error. -// If an the returned slice is less than the -// length asked for, an error will be returned, -// and the reader position will not be incremented. -func (r *Reader) Next(n int) (b []byte, err error) { - if r.state == nil && len(r.data)-r.n >= n { - b = r.data[r.n : r.n+n] - r.n += n - r.inputOffset += int64(n) - } else { - b, err = r.next(n) - } - return -} - -func (r *Reader) next(n int) ([]byte, error) { - // in case the buffer is too small - if cap(r.data) < n { - old := r.data[r.n:] - r.data = make([]byte, n+r.buffered()) - r.data = r.data[:copy(r.data, old)] - r.n = 0 - } - - // fill at least 'n' bytes - for r.buffered() < n && r.state == nil { - r.more() - } - - if r.buffered() < n { - return r.data[r.n:], r.noEOF() - } - out := r.data[r.n : r.n+n] - r.n += n - r.inputOffset += int64(n) - return out, nil -} - -// Read implements [io.Reader]. -func (r *Reader) Read(b []byte) (int, error) { - // if we have data in the buffer, just - // return that. - if r.buffered() != 0 { - x := copy(b, r.data[r.n:]) - r.n += x - r.inputOffset += int64(x) - return x, nil - } - var n int - // we have no buffered data; determine - // whether or not to buffer or call - // the underlying reader directly - if len(b) >= cap(r.data) { - n, r.state = r.r.Read(b) - } else { - r.more() - n = copy(b, r.data) - r.n = n - } - if n == 0 { - return 0, r.err() - } - - r.inputOffset += int64(n) - - return n, nil -} - -// ReadFull attempts to read len(b) bytes into -// 'b'. It returns the number of bytes read into -// 'b', and an error if it does not return len(b). -// EOF is considered an unexpected error. -func (r *Reader) ReadFull(b []byte) (int, error) { - var n int // read into b - var nn int // scratch - l := len(b) - // either read buffered data, - // or read directly for the underlying - // buffer, or fetch more buffered data. - for n < l && r.state == nil { - if r.buffered() != 0 { - nn = copy(b[n:], r.data[r.n:]) - n += nn - r.n += nn - r.inputOffset += int64(nn) - } else if l-n > cap(r.data) { - nn, r.state = r.r.Read(b[n:]) - n += nn - r.inputOffset += int64(nn) - } else { - r.more() - } - } - if n < l { - return n, r.noEOF() - } - return n, nil -} - -// ReadByte implements [io.ByteReader]. -func (r *Reader) ReadByte() (byte, error) { - for r.buffered() < 1 && r.state == nil { - r.more() - } - if r.buffered() < 1 { - return 0, r.err() - } - b := r.data[r.n] - r.n++ - r.inputOffset++ - - return b, nil -} - -// WriteTo implements [io.WriterTo]. -func (r *Reader) WriteTo(w io.Writer) (int64, error) { - var ( - i int64 - ii int - err error - ) - // first, clear buffer - if r.buffered() > 0 { - ii, err = w.Write(r.data[r.n:]) - i += int64(ii) - if err != nil { - return i, err - } - r.data = r.data[0:0] - r.n = 0 - r.inputOffset += int64(ii) - } - for r.state == nil { - // here we just do - // 1:1 reads and writes - r.more() - if r.buffered() > 0 { - ii, err = w.Write(r.data) - i += int64(ii) - if err != nil { - return i, err - } - r.data = r.data[0:0] - r.n = 0 - r.inputOffset += int64(ii) - } - } - if r.state != io.EOF { - return i, r.err() - } - return i, nil -} - -func max(a int, b int) int { - if a < b { - return b - } - return a -} diff --git a/vendor/github.com/philhofer/fwd/writer.go b/vendor/github.com/philhofer/fwd/writer.go deleted file mode 100644 index 4d6ea15b33..0000000000 --- a/vendor/github.com/philhofer/fwd/writer.go +++ /dev/null @@ -1,236 +0,0 @@ -package fwd - -import "io" - -const ( - // DefaultWriterSize is the - // default write buffer size. - DefaultWriterSize = 2048 - - minWriterSize = minReaderSize -) - -// Writer is a buffered writer -type Writer struct { - w io.Writer // writer - buf []byte // 0:len(buf) is bufered data -} - -// NewWriter returns a new writer -// that writes to 'w' and has a buffer -// that is `DefaultWriterSize` bytes. -func NewWriter(w io.Writer) *Writer { - if wr, ok := w.(*Writer); ok { - return wr - } - return &Writer{ - w: w, - buf: make([]byte, 0, DefaultWriterSize), - } -} - -// NewWriterSize returns a new writer that -// writes to 'w' and has a buffer size 'n'. -func NewWriterSize(w io.Writer, n int) *Writer { - if wr, ok := w.(*Writer); ok && cap(wr.buf) >= n { - return wr - } - buf := make([]byte, 0, max(n, minWriterSize)) - return NewWriterBuf(w, buf) -} - -// NewWriterBuf returns a new writer -// that writes to 'w' and has 'buf' as a buffer. -// 'buf' is not used when has smaller capacity than 18, -// custom buffer is allocated instead. -func NewWriterBuf(w io.Writer, buf []byte) *Writer { - if cap(buf) < minWriterSize { - buf = make([]byte, 0, minWriterSize) - } - buf = buf[:0] - return &Writer{ - w: w, - buf: buf, - } -} - -// Buffered returns the number of buffered bytes -// in the reader. -func (w *Writer) Buffered() int { return len(w.buf) } - -// BufferSize returns the maximum size of the buffer. -func (w *Writer) BufferSize() int { return cap(w.buf) } - -// Flush flushes any buffered bytes -// to the underlying writer. -func (w *Writer) Flush() error { - l := len(w.buf) - if l > 0 { - n, err := w.w.Write(w.buf) - - // if we didn't write the whole - // thing, copy the unwritten - // bytes to the beginnning of the - // buffer. - if n < l && n > 0 { - w.pushback(n) - if err == nil { - err = io.ErrShortWrite - } - } - if err != nil { - return err - } - w.buf = w.buf[:0] - return nil - } - return nil -} - -// Write implements `io.Writer` -func (w *Writer) Write(p []byte) (int, error) { - c, l, ln := cap(w.buf), len(w.buf), len(p) - avail := c - l - - // requires flush - if avail < ln { - if err := w.Flush(); err != nil { - return 0, err - } - l = len(w.buf) - } - // too big to fit in buffer; - // write directly to w.w - if c < ln { - return w.w.Write(p) - } - - // grow buf slice; copy; return - w.buf = w.buf[:l+ln] - return copy(w.buf[l:], p), nil -} - -// WriteString is analogous to Write, but it takes a string. -func (w *Writer) WriteString(s string) (int, error) { - c, l, ln := cap(w.buf), len(w.buf), len(s) - avail := c - l - - // requires flush - if avail < ln { - if err := w.Flush(); err != nil { - return 0, err - } - l = len(w.buf) - } - // too big to fit in buffer; - // write directly to w.w - // - // yes, this is unsafe. *but* - // io.Writer is not allowed - // to mutate its input or - // maintain a reference to it, - // per the spec in package io. - // - // plus, if the string is really - // too big to fit in the buffer, then - // creating a copy to write it is - // expensive (and, strictly speaking, - // unnecessary) - if c < ln { - return w.w.Write(unsafestr(s)) - } - - // grow buf slice; copy; return - w.buf = w.buf[:l+ln] - return copy(w.buf[l:], s), nil -} - -// WriteByte implements `io.ByteWriter` -func (w *Writer) WriteByte(b byte) error { - if len(w.buf) == cap(w.buf) { - if err := w.Flush(); err != nil { - return err - } - } - w.buf = append(w.buf, b) - return nil -} - -// Next returns the next 'n' free bytes -// in the write buffer, flushing the writer -// as necessary. Next will return `io.ErrShortBuffer` -// if 'n' is greater than the size of the write buffer. -// Calls to 'next' increment the write position by -// the size of the returned buffer. -func (w *Writer) Next(n int) ([]byte, error) { - c, l := cap(w.buf), len(w.buf) - if n > c { - return nil, io.ErrShortBuffer - } - avail := c - l - if avail < n { - if err := w.Flush(); err != nil { - return nil, err - } - l = len(w.buf) - } - w.buf = w.buf[:l+n] - return w.buf[l:], nil -} - -// take the bytes from w.buf[n:len(w.buf)] -// and put them at the beginning of w.buf, -// and resize to the length of the copied segment. -func (w *Writer) pushback(n int) { - w.buf = w.buf[:copy(w.buf, w.buf[n:])] -} - -// ReadFrom implements `io.ReaderFrom` -func (w *Writer) ReadFrom(r io.Reader) (int64, error) { - // anticipatory flush - if err := w.Flush(); err != nil { - return 0, err - } - - w.buf = w.buf[0:cap(w.buf)] // expand buffer - - var nn int64 // written - var err error // error - var x int // read - - // 1:1 reads and writes - for err == nil { - x, err = r.Read(w.buf) - if x > 0 { - n, werr := w.w.Write(w.buf[:x]) - nn += int64(n) - - if err != nil { - if n < x && n > 0 { - w.pushback(n - x) - } - return nn, werr - } - if n < x { - w.pushback(n - x) - return nn, io.ErrShortWrite - } - } else if err == nil { - err = io.ErrNoProgress - break - } - } - if err != io.EOF { - return nn, err - } - - // we only clear here - // because we are sure - // the writes have - // succeeded. otherwise, - // we retain the data in case - // future writes succeed. - w.buf = w.buf[0:0] - - return nn, nil -} diff --git a/vendor/github.com/philhofer/fwd/writer_appengine.go b/vendor/github.com/philhofer/fwd/writer_appengine.go deleted file mode 100644 index a978e3b6a0..0000000000 --- a/vendor/github.com/philhofer/fwd/writer_appengine.go +++ /dev/null @@ -1,6 +0,0 @@ -//go:build appengine -// +build appengine - -package fwd - -func unsafestr(s string) []byte { return []byte(s) } diff --git a/vendor/github.com/philhofer/fwd/writer_tinygo.go b/vendor/github.com/philhofer/fwd/writer_tinygo.go deleted file mode 100644 index c98cd57f3c..0000000000 --- a/vendor/github.com/philhofer/fwd/writer_tinygo.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build tinygo -// +build tinygo - -package fwd - -import ( - "unsafe" -) - -// unsafe cast string as []byte -func unsafestr(b string) []byte { - return unsafe.Slice(unsafe.StringData(b), len(b)) -} diff --git a/vendor/github.com/philhofer/fwd/writer_unsafe.go b/vendor/github.com/philhofer/fwd/writer_unsafe.go deleted file mode 100644 index e4cb4a830d..0000000000 --- a/vendor/github.com/philhofer/fwd/writer_unsafe.go +++ /dev/null @@ -1,20 +0,0 @@ -//go:build !appengine && !tinygo -// +build !appengine,!tinygo - -package fwd - -import ( - "reflect" - "unsafe" -) - -// unsafe cast string as []byte -func unsafestr(s string) []byte { - var b []byte - sHdr := (*reflect.StringHeader)(unsafe.Pointer(&s)) - bHdr := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - bHdr.Data = sHdr.Data - bHdr.Len = sHdr.Len - bHdr.Cap = sHdr.Len - return b -} diff --git a/vendor/github.com/planetscale/vtprotobuf/LICENSE b/vendor/github.com/planetscale/vtprotobuf/LICENSE deleted file mode 100644 index dc61de8465..0000000000 --- a/vendor/github.com/planetscale/vtprotobuf/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -Copyright (c) 2021, PlanetScale Inc. All rights reserved. -Copyright (c) 2013, The GoGo Authors. All rights reserved. -Copyright (c) 2018 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/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go b/vendor/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go deleted file mode 100644 index 64bde83ed0..0000000000 --- a/vendor/github.com/planetscale/vtprotobuf/protohelpers/protohelpers.go +++ /dev/null @@ -1,122 +0,0 @@ -// Package protohelpers provides helper functions for encoding and decoding protobuf messages. -// The spec can be found at https://protobuf.dev/programming-guides/encoding/. -package protohelpers - -import ( - "fmt" - "io" - "math/bits" -) - -var ( - // ErrInvalidLength is returned when decoding a negative length. - ErrInvalidLength = fmt.Errorf("proto: negative length found during unmarshaling") - // ErrIntOverflow is returned when decoding a varint representation of an integer that overflows 64 bits. - ErrIntOverflow = fmt.Errorf("proto: integer overflow") - // ErrUnexpectedEndOfGroup is returned when decoding a group end without a corresponding group start. - ErrUnexpectedEndOfGroup = fmt.Errorf("proto: unexpected end of group") -) - -// EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value. -// The provided offset is the offset after the last byte of the encoded value. -func EncodeVarint(dAtA []byte, offset int, v uint64) int { - offset -= SizeOfVarint(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} - -// SizeOfVarint returns the size of the varint-encoded value. -func SizeOfVarint(x uint64) (n int) { - return (bits.Len64(x|1) + 6) / 7 -} - -// SizeOfZigzag returns the size of the zigzag-encoded value. -func SizeOfZigzag(x uint64) (n int) { - return SizeOfVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} - -// Skip the first record of the byte slice and return the offset of the next record. -func Skip(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflow - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLength - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroup - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLength - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} diff --git a/vendor/github.com/power-devops/perfstat/LICENSE b/vendor/github.com/power-devops/perfstat/LICENSE deleted file mode 100644 index ec4e5d39d8..0000000000 --- a/vendor/github.com/power-devops/perfstat/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -MIT License - -Copyright (c) 2020 Power DevOps - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - diff --git a/vendor/github.com/power-devops/perfstat/c_helpers.c b/vendor/github.com/power-devops/perfstat/c_helpers.c deleted file mode 100644 index 49ba1ad7eb..0000000000 --- a/vendor/github.com/power-devops/perfstat/c_helpers.c +++ /dev/null @@ -1,159 +0,0 @@ -#include "c_helpers.h" - -GETFUNC(cpu) -GETFUNC(disk) -GETFUNC(diskadapter) -GETFUNC(diskpath) -GETFUNC(fcstat) -GETFUNC(logicalvolume) -GETFUNC(memory_page) -GETFUNC(netadapter) -GETFUNC(netbuffer) -GETFUNC(netinterface) -GETFUNC(pagingspace) -GETFUNC(process) -GETFUNC(thread) -GETFUNC(volumegroup) - -double get_partition_mhz(perfstat_partition_config_t pinfo) { - return pinfo.processorMHz; -} - -char *get_ps_hostname(perfstat_pagingspace_t *ps) { - return ps->u.nfs_paging.hostname; -} - -char *get_ps_filename(perfstat_pagingspace_t *ps) { - return ps->u.nfs_paging.filename; -} - -char *get_ps_vgname(perfstat_pagingspace_t *ps) { - return ps->u.lv_paging.vgname; -} - -time_t boottime() -{ - register struct utmpx *utmp; - - setutxent(); - while ( (utmp = getutxent()) != NULL ) { - if (utmp->ut_type == BOOT_TIME) { - return utmp->ut_tv.tv_sec; - } - } - endutxent(); - return -1; -} - -struct fsinfo *get_filesystem_stat(struct fsinfo *fs_all, int n) { - if (!fs_all) return NULL; - return &(fs_all[n]); -} - -int get_mounts(struct vmount **vmountpp) { - int size; - struct vmount *vm; - int nmounts; - - size = BUFSIZ; - - while (1) { - if ((vm = (struct vmount *)malloc((size_t)size)) == NULL) { - perror("malloc failed"); - exit(-1); - } - if ((nmounts = mntctl(MCTL_QUERY, size, (caddr_t)vm)) > 0) { - *vmountpp = vm; - return nmounts; - } else if (nmounts == 0) { - size = *(int *)vm; - free((void *)vm); - } else { - free((void *)vm); - return -1; - } - } -} - -void fill_fsinfo(struct statfs statbuf, struct fsinfo *fs) { - fsblkcnt_t freeblks, totblks, usedblks; - fsblkcnt_t tinodes, ninodes, ifree; - uint cfactor; - - if (statbuf.f_blocks == -1) { - fs->totalblks = 0; - fs->freeblks = 0; - fs->totalinodes = 0; - fs->freeinodes = 0; - return; - } - - cfactor = statbuf.f_bsize / 512; - fs->freeblks = statbuf.f_bavail * cfactor; - fs->totalblks = statbuf.f_blocks * cfactor; - - fs->freeinodes = statbuf.f_ffree; - fs->totalinodes = statbuf.f_files; - - if (fs->freeblks < 0) - fs->freeblks = 0; -} - -int getfsinfo(char *fsname, char *devname, char *host, char *options, int flags, int fstype, struct fsinfo *fs) { - struct statfs statbuf; - int devname_size = strlen(devname); - int fsname_size = strlen(fsname); - char buf[BUFSIZ]; - char *p; - - if (fs == NULL) { - return 1; - } - - for (p = strtok(options, ","); p != NULL; p = strtok(NULL, ",")) - if (strcmp(p, "ignore") == 0) - return 0; - - if (*host != 0 && strcmp(host, "-") != 0) { - sprintf(buf, "%s:%s", host, devname); - devname = buf; - } - fs->devname = (char *)calloc(devname_size+1, 1); - fs->fsname = (char *)calloc(fsname_size+1, 1); - strncpy(fs->devname, devname, devname_size); - strncpy(fs->fsname, fsname, fsname_size); - fs->flags = flags; - fs->fstype = fstype; - - if (statfs(fsname,&statbuf) < 0) { - return 1; - } - - fill_fsinfo(statbuf, fs); - return 0; -} - -struct fsinfo *get_all_fs(int *rc) { - struct vmount *mnt; - struct fsinfo *fs_all; - int nmounts; - - *rc = -1; - if ((nmounts = get_mounts(&mnt)) <= 0) { - perror("Can't get mount table info"); - return NULL; - } - - fs_all = (struct fsinfo *)calloc(sizeof(struct fsinfo), nmounts); - while ((*rc)++, nmounts--) { - getfsinfo(vmt2dataptr(mnt, VMT_STUB), - vmt2dataptr(mnt, VMT_OBJECT), - vmt2dataptr(mnt, VMT_HOST), - vmt2dataptr(mnt, VMT_ARGS), - mnt->vmt_flags, - mnt->vmt_gfstype, - &fs_all[*rc]); - mnt = (struct vmount *)((char *)mnt + mnt->vmt_length); - } - return fs_all; -} diff --git a/vendor/github.com/power-devops/perfstat/c_helpers.h b/vendor/github.com/power-devops/perfstat/c_helpers.h deleted file mode 100644 index b66bc53c3c..0000000000 --- a/vendor/github.com/power-devops/perfstat/c_helpers.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef C_HELPERS_H -#define C_HELPERS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define GETFUNC(TYPE) perfstat_##TYPE##_t *get_##TYPE##_stat(perfstat_##TYPE##_t *b, int n) { \ - if (!b) return NULL; \ - return &(b[n]); \ -} - -#define GETFUNC_EXT(TYPE) extern perfstat_##TYPE##_t *get_##TYPE##_stat(perfstat_##TYPE##_t *, int); - -GETFUNC_EXT(cpu) -GETFUNC_EXT(disk) -GETFUNC_EXT(diskadapter) -GETFUNC_EXT(diskpath) -GETFUNC_EXT(fcstat) -GETFUNC_EXT(logicalvolume) -GETFUNC_EXT(memory_page) -GETFUNC_EXT(netadapter) -GETFUNC_EXT(netbuffer) -GETFUNC_EXT(netinterface) -GETFUNC_EXT(pagingspace) -GETFUNC_EXT(process) -GETFUNC_EXT(thread) -GETFUNC_EXT(volumegroup) - -struct fsinfo { - char *devname; - char *fsname; - int flags; - int fstype; - unsigned long totalblks; - unsigned long freeblks; - unsigned long totalinodes; - unsigned long freeinodes; -}; - -extern double get_partition_mhz(perfstat_partition_config_t); -extern char *get_ps_hostname(perfstat_pagingspace_t *); -extern char *get_ps_filename(perfstat_pagingspace_t *); -extern char *get_ps_vgname(perfstat_pagingspace_t *); -extern time_t boottime(); -struct fsinfo *get_filesystem_stat(struct fsinfo *, int); -int get_mounts(struct vmount **); -void fill_statfs(struct statfs, struct fsinfo *); -int getfsinfo(char *, char *, char *, char *, int, int, struct fsinfo *); -struct fsinfo *get_all_fs(int *); - -#endif diff --git a/vendor/github.com/power-devops/perfstat/config.go b/vendor/github.com/power-devops/perfstat/config.go deleted file mode 100644 index a6df39c672..0000000000 --- a/vendor/github.com/power-devops/perfstat/config.go +++ /dev/null @@ -1,19 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -*/ -import "C" - -func EnableLVMStat() { - C.perfstat_config(C.PERFSTAT_ENABLE|C.PERFSTAT_LV|C.PERFSTAT_VG, nil) -} - -func DisableLVMStat() { - C.perfstat_config(C.PERFSTAT_DISABLE|C.PERFSTAT_LV|C.PERFSTAT_VG, nil) -} diff --git a/vendor/github.com/power-devops/perfstat/cpustat.go b/vendor/github.com/power-devops/perfstat/cpustat.go deleted file mode 100644 index 10f543fa4d..0000000000 --- a/vendor/github.com/power-devops/perfstat/cpustat.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "runtime" - "time" - "unsafe" -) - -var old_cpu_total_stat *C.perfstat_cpu_total_t - -func init() { - old_cpu_total_stat = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - C.perfstat_cpu_total(nil, old_cpu_total_stat, C.sizeof_perfstat_cpu_total_t, 1) -} - -func CpuStat() ([]CPU, error) { - var cpustat *C.perfstat_cpu_t - var cpu C.perfstat_id_t - - ncpu := runtime.NumCPU() - - cpustat_len := C.sizeof_perfstat_cpu_t * C.ulong(ncpu) - cpustat = (*C.perfstat_cpu_t)(C.malloc(cpustat_len)) - defer C.free(unsafe.Pointer(cpustat)) - C.strcpy(&cpu.name[0], C.CString(C.FIRST_CPU)) - r := C.perfstat_cpu(&cpu, cpustat, C.sizeof_perfstat_cpu_t, C.int(ncpu)) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu()") - } - c := make([]CPU, r) - for i := 0; i < int(r); i++ { - n := C.get_cpu_stat(cpustat, C.int(i)) - if n != nil { - c[i] = perfstatcpu2cpu(n) - } - } - return c, nil -} - -func CpuTotalStat() (*CPUTotal, error) { - var cpustat *C.perfstat_cpu_total_t - - cpustat = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - defer C.free(unsafe.Pointer(cpustat)) - r := C.perfstat_cpu_total(nil, cpustat, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - c := perfstatcputotal2cputotal(cpustat) - return &c, nil -} - -func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) { - var cpuutil *C.perfstat_cpu_util_t - var newt *C.perfstat_cpu_total_t - var oldt *C.perfstat_cpu_total_t - var data C.perfstat_rawdata_t - - oldt = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - newt = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - cpuutil = (*C.perfstat_cpu_util_t)(C.malloc(C.sizeof_perfstat_cpu_util_t)) - defer C.free(unsafe.Pointer(oldt)) - defer C.free(unsafe.Pointer(newt)) - defer C.free(unsafe.Pointer(cpuutil)) - - r := C.perfstat_cpu_total(nil, oldt, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - - time.Sleep(intvl) - - r = C.perfstat_cpu_total(nil, newt, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - - data._type = C.UTIL_CPU_TOTAL - data.curstat = unsafe.Pointer(newt) - data.prevstat = unsafe.Pointer(oldt) - data.sizeof_data = C.sizeof_perfstat_cpu_total_t - data.cur_elems = 1 - data.prev_elems = 1 - - r = C.perfstat_cpu_util(&data, cpuutil, C.sizeof_perfstat_cpu_util_t, 1) - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_util()") - } - u := perfstatcpuutil2cpuutil(cpuutil) - return &u, nil -} - -func CpuUtilTotalStat() (*CPUUtil, error) { - var cpuutil *C.perfstat_cpu_util_t - var new_cpu_total_stat *C.perfstat_cpu_total_t - var data C.perfstat_rawdata_t - - new_cpu_total_stat = (*C.perfstat_cpu_total_t)(C.malloc(C.sizeof_perfstat_cpu_total_t)) - cpuutil = (*C.perfstat_cpu_util_t)(C.malloc(C.sizeof_perfstat_cpu_util_t)) - defer C.free(unsafe.Pointer(cpuutil)) - - r := C.perfstat_cpu_total(nil, new_cpu_total_stat, C.sizeof_perfstat_cpu_total_t, 1) - if r <= 0 { - C.free(unsafe.Pointer(new_cpu_total_stat)) - return nil, fmt.Errorf("error perfstat_cpu_total()") - } - - data._type = C.UTIL_CPU_TOTAL - data.curstat = unsafe.Pointer(new_cpu_total_stat) - data.prevstat = unsafe.Pointer(old_cpu_total_stat) - data.sizeof_data = C.sizeof_perfstat_cpu_total_t - data.cur_elems = 1 - data.prev_elems = 1 - - r = C.perfstat_cpu_util(&data, cpuutil, C.sizeof_perfstat_cpu_util_t, 1) - C.free(unsafe.Pointer(old_cpu_total_stat)) - old_cpu_total_stat = new_cpu_total_stat - if r <= 0 { - return nil, fmt.Errorf("error perfstat_cpu_util()") - } - u := perfstatcpuutil2cpuutil(cpuutil) - return &u, nil -} diff --git a/vendor/github.com/power-devops/perfstat/diskstat.go b/vendor/github.com/power-devops/perfstat/diskstat.go deleted file mode 100644 index 06763b4bc9..0000000000 --- a/vendor/github.com/power-devops/perfstat/diskstat.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func DiskTotalStat() (*DiskTotal, error) { - var disk C.perfstat_disk_total_t - - rc := C.perfstat_disk_total(nil, &disk, C.sizeof_perfstat_disk_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_disk_total() error") - } - d := perfstatdisktotal2disktotal(disk) - return &d, nil -} - -func DiskAdapterStat() ([]DiskAdapter, error) { - var adapter *C.perfstat_diskadapter_t - var adptname C.perfstat_id_t - - numadpt := C.perfstat_diskadapter(nil, nil, C.sizeof_perfstat_diskadapter_t, 0) - if numadpt <= 0 { - return nil, fmt.Errorf("perfstat_diskadapter() error") - } - - adapter_len := C.sizeof_perfstat_diskadapter_t * C.ulong(numadpt) - adapter = (*C.perfstat_diskadapter_t)(C.malloc(adapter_len)) - defer C.free(unsafe.Pointer(adapter)) - C.strcpy(&adptname.name[0], C.CString(C.FIRST_DISKADAPTER)) - r := C.perfstat_diskadapter(&adptname, adapter, C.sizeof_perfstat_diskadapter_t, numadpt) - if r < 0 { - return nil, fmt.Errorf("perfstat_diskadapter() error") - } - da := make([]DiskAdapter, r) - for i := 0; i < int(r); i++ { - d := C.get_diskadapter_stat(adapter, C.int(i)) - if d != nil { - da[i] = perfstatdiskadapter2diskadapter(d) - } - } - return da, nil -} - -func DiskStat() ([]Disk, error) { - var disk *C.perfstat_disk_t - var diskname C.perfstat_id_t - - numdisk := C.perfstat_disk(nil, nil, C.sizeof_perfstat_disk_t, 0) - if numdisk <= 0 { - return nil, fmt.Errorf("perfstat_disk() error") - } - - disk_len := C.sizeof_perfstat_disk_t * C.ulong(numdisk) - disk = (*C.perfstat_disk_t)(C.malloc(disk_len)) - defer C.free(unsafe.Pointer(disk)) - C.strcpy(&diskname.name[0], C.CString(C.FIRST_DISK)) - r := C.perfstat_disk(&diskname, disk, C.sizeof_perfstat_disk_t, numdisk) - if r < 0 { - return nil, fmt.Errorf("perfstat_disk() error") - } - d := make([]Disk, r) - for i := 0; i < int(r); i++ { - ds := C.get_disk_stat(disk, C.int(i)) - if ds != nil { - d[i] = perfstatdisk2disk(ds) - } - } - return d, nil -} - -func DiskPathStat() ([]DiskPath, error) { - var diskpath *C.perfstat_diskpath_t - var pathname C.perfstat_id_t - - numpaths := C.perfstat_diskpath(nil, nil, C.sizeof_perfstat_diskpath_t, 0) - if numpaths <= 0 { - return nil, fmt.Errorf("perfstat_diskpath() error") - } - - path_len := C.sizeof_perfstat_diskpath_t * C.ulong(numpaths) - diskpath = (*C.perfstat_diskpath_t)(C.malloc(path_len)) - defer C.free(unsafe.Pointer(diskpath)) - C.strcpy(&pathname.name[0], C.CString(C.FIRST_DISKPATH)) - r := C.perfstat_diskpath(&pathname, diskpath, C.sizeof_perfstat_diskpath_t, numpaths) - if r < 0 { - return nil, fmt.Errorf("perfstat_diskpath() error") - } - d := make([]DiskPath, r) - for i := 0; i < int(r); i++ { - p := C.get_diskpath_stat(diskpath, C.int(i)) - if p != nil { - d[i] = perfstatdiskpath2diskpath(p) - } - } - return d, nil -} - -func FCAdapterStat() ([]FCAdapter, error) { - var fcstat *C.perfstat_fcstat_t - var fcname C.perfstat_id_t - - numadpt := C.perfstat_fcstat(nil, nil, C.sizeof_perfstat_fcstat_t, 0) - if numadpt <= 0 { - return nil, fmt.Errorf("perfstat_fcstat() error") - } - - fcstat_len := C.sizeof_perfstat_fcstat_t * C.ulong(numadpt) - fcstat = (*C.perfstat_fcstat_t)(C.malloc(fcstat_len)) - defer C.free(unsafe.Pointer(fcstat)) - C.strcpy(&fcname.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_fcstat(&fcname, fcstat, C.sizeof_perfstat_fcstat_t, numadpt) - if r < 0 { - return nil, fmt.Errorf("perfstat_fcstat() error") - } - fca := make([]FCAdapter, r) - for i := 0; i < int(r); i++ { - f := C.get_fcstat_stat(fcstat, C.int(i)) - if f != nil { - fca[i] = perfstatfcstat2fcadapter(f) - } - } - return fca, nil -} diff --git a/vendor/github.com/power-devops/perfstat/doc.go b/vendor/github.com/power-devops/perfstat/doc.go deleted file mode 100644 index 9730a61c2c..0000000000 --- a/vendor/github.com/power-devops/perfstat/doc.go +++ /dev/null @@ -1,316 +0,0 @@ -//go:build !aix -// +build !aix - -// Copyright 2020 Power-Devops.com. All rights reserved. -// Use of this source code is governed by the license -// that can be found in the LICENSE file. -/* -Package perfstat is Go interface to IBM AIX libperfstat. -To use it you need AIX with installed bos.perf.libperfstat. You can check, if is installed using the following command: - - $ lslpp -L bos.perf.perfstat - -The package is written using Go 1.14.7 and AIX 7.2 TL5. It should work with earlier TLs of AIX 7.2, but I -can't guarantee that perfstat structures in the TLs have all the same fields as the structures in AIX 7.2 TL5. - -For documentation of perfstat on AIX and using it in programs refer to the official IBM documentation: -https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat.html -*/ -package perfstat - -import ( - "fmt" - "time" -) - -// EnableLVMStat() switches on LVM (logical volumes and volume groups) performance statistics. -// With this enabled you can use fields KBReads, KBWrites, and IOCnt -// in LogicalVolume and VolumeGroup data types. -func EnableLVMStat() {} - -// DisableLVMStat() switchess of LVM (logical volumes and volume groups) performance statistics. -// This is the default state. In this case LogicalVolume and VolumeGroup data types are -// populated with informations about LVM structures, but performance statistics fields -// (KBReads, KBWrites, IOCnt) are empty. -func DisableLVMStat() {} - -// CpuStat() returns array of CPU structures with information about -// logical CPUs on the system. -// IBM documentation: -// - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_int_cpu.html -// - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu.html -func CpuStat() ([]CPU, error) { - return nil, fmt.Errorf("not implemented") -} - -// CpuTotalStat() returns general information about CPUs on the system. -// IBM documentation: -// - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_glob_cpu.html -// - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cputot.html -func CpuTotalStat() (*CPUTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -// CpuUtilStat() calculates CPU utilization. -// IBM documentation: -// - https://www.ibm.com/support/knowledgecenter/ssw_aix_72/performancetools/idprftools_perfstat_cpu_util.html -// - https://www.ibm.com/support/knowledgecenter/en/ssw_aix_72/p_bostechref/perfstat_cpu_util.html -func CpuUtilStat(intvl time.Duration) (*CPUUtil, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskTotalStat() (*DiskTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskAdapterStat() ([]DiskAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskStat() ([]Disk, error) { - return nil, fmt.Errorf("not implemented") -} - -func DiskPathStat() ([]DiskPath, error) { - return nil, fmt.Errorf("not implemented") -} - -func FCAdapterStat() ([]FCAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func PartitionStat() (*PartitionConfig, error) { - return nil, fmt.Errorf("not implemented") -} - -func LogicalVolumeStat() ([]LogicalVolume, error) { - return nil, fmt.Errorf("not implemented") -} - -func VolumeGroupStat() ([]VolumeGroup, error) { - return nil, fmt.Errorf("not implemented") -} - -func MemoryTotalStat() (*MemoryTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func MemoryPageStat() ([]MemoryPage, error) { - return nil, fmt.Errorf("not implemented") -} - -func PagingSpaceStat() ([]PagingSpace, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetIfaceTotalStat() (*NetIfaceTotal, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetBufferStat() ([]NetBuffer, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetIfaceStat() ([]NetIface, error) { - return nil, fmt.Errorf("not implemented") -} - -func NetAdapterStat() ([]NetAdapter, error) { - return nil, fmt.Errorf("not implemented") -} - -func ProcessStat() ([]Process, error) { - return nil, fmt.Errorf("not implemented") -} - -func ThreadStat() ([]Thread, error) { - return nil, fmt.Errorf("not implemented") -} - -func Sysconf(name int32) (int64, error) { - return 0, fmt.Errorf("not implemented") -} - -func GetCPUImplementation() string { - return "" -} - -func POWER9OrNewer() bool { - return false -} - -func POWER9() bool { - return false -} - -func POWER8OrNewer() bool { - return false -} - -func POWER8() bool { - return false -} - -func POWER7OrNewer() bool { - return false -} - -func POWER7() bool { - return false -} - -func HasTransactionalMemory() bool { - return false -} - -func Is64Bit() bool { - return false -} - -func IsSMP() bool { - return false -} - -func HasVMX() bool { - return false -} - -func HasVSX() bool { - return false -} - -func HasDFP() bool { - return false -} - -func HasNxGzip() bool { - return false -} - -func PksCapable() bool { - return false -} - -func PksEnabled() bool { - return false -} - -func CPUMode() string { - return "" -} - -func KernelBits() int { - return 0 -} - -func IsLPAR() bool { - return false -} - -func CpuAddCapable() bool { - return false -} - -func CpuRemoveCapable() bool { - return false -} - -func MemoryAddCapable() bool { - return false -} - -func MemoryRemoveCapable() bool { - return false -} - -func DLparCapable() bool { - return false -} - -func IsNUMA() bool { - return false -} - -func KernelKeys() bool { - return false -} - -func RecoveryMode() bool { - return false -} - -func EnhancedAffinity() bool { - return false -} - -func VTpmEnabled() bool { - return false -} - -func IsVIOS() bool { - return false -} - -func MLSEnabled() bool { - return false -} - -func SPLparCapable() bool { - return false -} - -func SPLparEnabled() bool { - return false -} - -func DedicatedLpar() bool { - return false -} - -func SPLparCapped() bool { - return false -} - -func SPLparDonating() bool { - return false -} - -func SmtCapable() bool { - return false -} - -func SmtEnabled() bool { - return false -} - -func VrmCapable() bool { - return false -} - -func VrmEnabled() bool { - return false -} - -func AmeEnabled() bool { - return false -} - -func EcoCapable() bool { - return false -} - -func EcoEnabled() bool { - return false -} - -func BootTime() (uint64, error) { - return 0, fmt.Errorf("Not implemented") -} - -func UptimeSeconds() (uint64, error) { - return 0, fmt.Errorf("Not implemented") -} - -func FileSystemStat() ([]FileSystem, error) { - return nil, fmt.Errorf("Not implemented") -} diff --git a/vendor/github.com/power-devops/perfstat/fsstat.go b/vendor/github.com/power-devops/perfstat/fsstat.go deleted file mode 100644 index d3913197ac..0000000000 --- a/vendor/github.com/power-devops/perfstat/fsstat.go +++ /dev/null @@ -1,32 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" -) - -func FileSystemStat() ([]FileSystem, error) { - var fsinfo *C.struct_fsinfo - var nmounts C.int - - fsinfo = C.get_all_fs(&nmounts) - if nmounts <= 0 { - return nil, fmt.Errorf("No mounts found") - } - - fs := make([]FileSystem, nmounts) - for i := 0; i < int(nmounts); i++ { - f := C.get_filesystem_stat(fsinfo, C.int(i)) - if f != nil { - fs[i] = fsinfo2filesystem(f) - } - } - return fs, nil -} diff --git a/vendor/github.com/power-devops/perfstat/helpers.go b/vendor/github.com/power-devops/perfstat/helpers.go deleted file mode 100644 index d5268ab53a..0000000000 --- a/vendor/github.com/power-devops/perfstat/helpers.go +++ /dev/null @@ -1,819 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -func perfstatcpu2cpu(n *C.perfstat_cpu_t) CPU { - var c CPU - c.Name = C.GoString(&n.name[0]) - c.User = int64(n.user) - c.Sys = int64(n.sys) - c.Idle = int64(n.idle) - c.Wait = int64(n.wait) - c.PSwitch = int64(n.pswitch) - c.Syscall = int64(n.syscall) - c.Sysread = int64(n.sysread) - c.Syswrite = int64(n.syswrite) - c.Sysfork = int64(n.sysfork) - c.Sysexec = int64(n.sysexec) - c.Readch = int64(n.readch) - c.Writech = int64(n.writech) - c.Bread = int64(n.bread) - c.Bwrite = int64(n.bwrite) - c.Lread = int64(n.lread) - c.Lwrite = int64(n.lwrite) - c.Phread = int64(n.phread) - c.Phwrite = int64(n.phwrite) - c.Iget = int64(n.iget) - c.Namei = int64(n.namei) - c.Dirblk = int64(n.dirblk) - c.Msg = int64(n.msg) - c.Sema = int64(n.sema) - c.MinFaults = int64(n.minfaults) - c.MajFaults = int64(n.majfaults) - c.PUser = int64(n.puser) - c.PSys = int64(n.psys) - c.PIdle = int64(n.pidle) - c.PWait = int64(n.pwait) - c.RedispSD0 = int64(n.redisp_sd0) - c.RedispSD1 = int64(n.redisp_sd1) - c.RedispSD2 = int64(n.redisp_sd2) - c.RedispSD3 = int64(n.redisp_sd3) - c.RedispSD4 = int64(n.redisp_sd4) - c.RedispSD5 = int64(n.redisp_sd5) - c.MigrationPush = int64(n.migration_push) - c.MigrationS3grq = int64(n.migration_S3grq) - c.MigrationS3pul = int64(n.migration_S3pul) - c.InvolCSwitch = int64(n.invol_cswitch) - c.VolCSwitch = int64(n.vol_cswitch) - c.RunQueue = int64(n.runque) - c.Bound = int64(n.bound) - c.DecrIntrs = int64(n.decrintrs) - c.MpcRIntrs = int64(n.mpcrintrs) - c.MpcSIntrs = int64(n.mpcsintrs) - c.SoftIntrs = int64(n.softintrs) - c.DevIntrs = int64(n.devintrs) - c.PhantIntrs = int64(n.phantintrs) - c.IdleDonatedPurr = int64(n.idle_donated_purr) - c.IdleDonatedSpurr = int64(n.idle_donated_spurr) - c.BusyDonatedPurr = int64(n.busy_donated_purr) - c.BusyDonatedSpurr = int64(n.busy_donated_spurr) - c.IdleStolenPurr = int64(n.idle_stolen_purr) - c.IdleStolenSpurr = int64(n.idle_stolen_spurr) - c.BusyStolenPurr = int64(n.busy_stolen_purr) - c.BusyStolenSpurr = int64(n.busy_stolen_spurr) - c.Hpi = int64(n.hpi) - c.Hpit = int64(n.hpit) - c.PUserSpurr = int64(n.puser_spurr) - c.PSysSpurr = int64(n.psys_spurr) - c.PIdleSpurr = int64(n.pidle_spurr) - c.PWaitSpurr = int64(n.pwait_spurr) - c.SpurrFlag = int32(n.spurrflag) - c.LocalDispatch = int64(n.localdispatch) - c.NearDispatch = int64(n.neardispatch) - c.FarDispatch = int64(n.fardispatch) - c.CSwitches = int64(n.cswitches) - c.Version = int64(n.version) - c.TbLast = int64(n.tb_last) - c.State = int(n.state) - c.VtbLast = int64(n.vtb_last) - c.ICountLast = int64(n.icount_last) - return c -} - -func perfstatcputotal2cputotal(n *C.perfstat_cpu_total_t) CPUTotal { - var c CPUTotal - c.NCpus = int(n.ncpus) - c.NCpusCfg = int(n.ncpus_cfg) - c.Description = C.GoString(&n.description[0]) - c.ProcessorHz = int64(n.processorHZ) - c.User = int64(n.user) - c.Sys = int64(n.sys) - c.Idle = int64(n.idle) - c.Wait = int64(n.wait) - c.PSwitch = int64(n.pswitch) - c.Syscall = int64(n.syscall) - c.Sysread = int64(n.sysread) - c.Syswrite = int64(n.syswrite) - c.Sysfork = int64(n.sysfork) - c.Sysexec = int64(n.sysexec) - c.Readch = int64(n.readch) - c.Writech = int64(n.writech) - c.DevIntrs = int64(n.devintrs) - c.SoftIntrs = int64(n.softintrs) - c.Lbolt = int64(n.lbolt) - c.LoadAvg1 = (float32(n.loadavg[0]) / (1 << C.SBITS)) - c.LoadAvg5 = (float32(n.loadavg[1]) / (1 << C.SBITS)) - c.LoadAvg15 = (float32(n.loadavg[2]) / (1 << C.SBITS)) - c.RunQueue = int64(n.runque) - c.SwpQueue = int64(n.swpque) - c.Bread = int64(n.bread) - c.Bwrite = int64(n.bwrite) - c.Lread = int64(n.lread) - c.Lwrite = int64(n.lwrite) - c.Phread = int64(n.phread) - c.Phwrite = int64(n.phwrite) - c.RunOcc = int64(n.runocc) - c.SwpOcc = int64(n.swpocc) - c.Iget = int64(n.iget) - c.Namei = int64(n.namei) - c.Dirblk = int64(n.dirblk) - c.Msg = int64(n.msg) - c.Sema = int64(n.sema) - c.RcvInt = int64(n.rcvint) - c.XmtInt = int64(n.xmtint) - c.MdmInt = int64(n.mdmint) - c.TtyRawInch = int64(n.tty_rawinch) - c.TtyCanInch = int64(n.tty_caninch) - c.TtyRawOutch = int64(n.tty_rawoutch) - c.Ksched = int64(n.ksched) - c.Koverf = int64(n.koverf) - c.Kexit = int64(n.kexit) - c.Rbread = int64(n.rbread) - c.Rcread = int64(n.rcread) - c.Rbwrt = int64(n.rbwrt) - c.Rcwrt = int64(n.rcwrt) - c.Traps = int64(n.traps) - c.NCpusHigh = int64(n.ncpus_high) - c.PUser = int64(n.puser) - c.PSys = int64(n.psys) - c.PIdle = int64(n.pidle) - c.PWait = int64(n.pwait) - c.DecrIntrs = int64(n.decrintrs) - c.MpcRIntrs = int64(n.mpcrintrs) - c.MpcSIntrs = int64(n.mpcsintrs) - c.PhantIntrs = int64(n.phantintrs) - c.IdleDonatedPurr = int64(n.idle_donated_purr) - c.IdleDonatedSpurr = int64(n.idle_donated_spurr) - c.BusyDonatedPurr = int64(n.busy_donated_purr) - c.BusyDonatedSpurr = int64(n.busy_donated_spurr) - c.IdleStolenPurr = int64(n.idle_stolen_purr) - c.IdleStolenSpurr = int64(n.idle_stolen_spurr) - c.BusyStolenPurr = int64(n.busy_stolen_purr) - c.BusyStolenSpurr = int64(n.busy_stolen_spurr) - c.IOWait = int32(n.iowait) - c.PhysIO = int32(n.physio) - c.TWait = int64(n.twait) - c.Hpi = int64(n.hpi) - c.Hpit = int64(n.hpit) - c.PUserSpurr = int64(n.puser_spurr) - c.PSysSpurr = int64(n.psys_spurr) - c.PIdleSpurr = int64(n.pidle_spurr) - c.PWaitSpurr = int64(n.pwait_spurr) - c.SpurrFlag = int(n.spurrflag) - c.Version = int64(n.version) - c.TbLast = int64(n.tb_last) - c.PurrCoalescing = int64(n.purr_coalescing) - c.SpurrCoalescing = int64(n.spurr_coalescing) - return c -} - -func perfstatcpuutil2cpuutil(n *C.perfstat_cpu_util_t) CPUUtil { - var c CPUUtil - - c.Version = int64(n.version) - c.CpuID = C.GoString(&n.cpu_id[0]) - c.Entitlement = float32(n.entitlement) - c.UserPct = float32(n.user_pct) - c.KernPct = float32(n.kern_pct) - c.IdlePct = float32(n.idle_pct) - c.WaitPct = float32(n.wait_pct) - c.PhysicalBusy = float32(n.physical_busy) - c.PhysicalConsumed = float32(n.physical_consumed) - c.FreqPct = float32(n.freq_pct) - c.EntitlementPct = float32(n.entitlement_pct) - c.BusyPct = float32(n.busy_pct) - c.IdleDonatedPct = float32(n.idle_donated_pct) - c.BusyDonatedPct = float32(n.busy_donated_pct) - c.IdleStolenPct = float32(n.idle_stolen_pct) - c.BusyStolenPct = float32(n.busy_stolen_pct) - c.LUserPct = float32(n.l_user_pct) - c.LKernPct = float32(n.l_kern_pct) - c.LIdlePct = float32(n.l_idle_pct) - c.LWaitPct = float32(n.l_wait_pct) - c.DeltaTime = int64(n.delta_time) - - return c -} - -func perfstatdisktotal2disktotal(n C.perfstat_disk_total_t) DiskTotal { - var d DiskTotal - - d.Number = int32(n.number) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Wblks = int64(n.wblks) - d.Rblks = int64(n.rblks) - d.Time = int64(n.time) - d.Version = int64(n.version) - d.Rserv = int64(n.rserv) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.RTimeOut = int64(n.rtimeout) - d.RFailed = int64(n.rfailed) - d.Wserv = int64(n.wserv) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WTimeOut = int64(n.wtimeout) - d.WFailed = int64(n.wfailed) - d.WqDepth = int64(n.wq_depth) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - - return d -} - -func perfstatdiskadapter2diskadapter(n *C.perfstat_diskadapter_t) DiskAdapter { - var d DiskAdapter - - d.Name = C.GoString(&n.name[0]) - d.Description = C.GoString(&n.description[0]) - d.Number = int32(n.number) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Rblks = int64(n.rblks) - d.Wblks = int64(n.wblks) - d.Time = int64(n.time) - d.Version = int64(n.version) - d.AdapterType = int64(n.adapter_type) - d.DkBSize = int64(n.dk_bsize) - d.DkRserv = int64(n.dk_rserv) - d.DkWserv = int64(n.dk_wserv) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QFull = int64(n.q_full) - d.QSampled = int64(n.q_sampled) - - return d -} - -func perfstatpartitionconfig2partitionconfig(n C.perfstat_partition_config_t) PartitionConfig { - var p PartitionConfig - p.Version = int64(n.version) - p.Name = C.GoString(&n.partitionname[0]) - p.Node = C.GoString(&n.nodename[0]) - p.Conf.SmtCapable = (n.conf[0] & (1 << 7)) > 0 - p.Conf.SmtEnabled = (n.conf[0] & (1 << 6)) > 0 - p.Conf.LparCapable = (n.conf[0] & (1 << 5)) > 0 - p.Conf.LparEnabled = (n.conf[0] & (1 << 4)) > 0 - p.Conf.SharedCapable = (n.conf[0] & (1 << 3)) > 0 - p.Conf.SharedEnabled = (n.conf[0] & (1 << 2)) > 0 - p.Conf.DLparCapable = (n.conf[0] & (1 << 1)) > 0 - p.Conf.Capped = (n.conf[0] & (1 << 0)) > 0 - p.Conf.Kernel64bit = (n.conf[1] & (1 << 7)) > 0 - p.Conf.PoolUtilAuthority = (n.conf[1] & (1 << 6)) > 0 - p.Conf.DonateCapable = (n.conf[1] & (1 << 5)) > 0 - p.Conf.DonateEnabled = (n.conf[1] & (1 << 4)) > 0 - p.Conf.AmsCapable = (n.conf[1] & (1 << 3)) > 0 - p.Conf.AmsEnabled = (n.conf[1] & (1 << 2)) > 0 - p.Conf.PowerSave = (n.conf[1] & (1 << 1)) > 0 - p.Conf.AmeEnabled = (n.conf[1] & (1 << 0)) > 0 - p.Conf.SharedExtended = (n.conf[2] & (1 << 7)) > 0 - p.Number = int32(n.partitionnum) - p.GroupID = int32(n.groupid) - p.ProcessorFamily = C.GoString(&n.processorFamily[0]) - p.ProcessorModel = C.GoString(&n.processorModel[0]) - p.MachineID = C.GoString(&n.machineID[0]) - p.ProcessorMhz = float64(C.get_partition_mhz(n)) - p.NumProcessors.Online = int64(n.numProcessors.online) - p.NumProcessors.Max = int64(n.numProcessors.max) - p.NumProcessors.Min = int64(n.numProcessors.min) - p.NumProcessors.Desired = int64(n.numProcessors.desired) - p.OSName = C.GoString(&n.OSName[0]) - p.OSVersion = C.GoString(&n.OSVersion[0]) - p.OSBuild = C.GoString(&n.OSBuild[0]) - p.LCpus = int32(n.lcpus) - p.SmtThreads = int32(n.smtthreads) - p.Drives = int32(n.drives) - p.NetworkAdapters = int32(n.nw_adapters) - p.CpuCap.Online = int64(n.cpucap.online) - p.CpuCap.Max = int64(n.cpucap.max) - p.CpuCap.Min = int64(n.cpucap.min) - p.CpuCap.Desired = int64(n.cpucap.desired) - p.Weightage = int32(n.cpucap_weightage) - p.EntCapacity = int32(n.entitled_proc_capacity) - p.VCpus.Online = int64(n.vcpus.online) - p.VCpus.Max = int64(n.vcpus.max) - p.VCpus.Min = int64(n.vcpus.min) - p.VCpus.Desired = int64(n.vcpus.desired) - p.PoolID = int32(n.processor_poolid) - p.ActiveCpusInPool = int32(n.activecpusinpool) - p.PoolWeightage = int32(n.cpupool_weightage) - p.SharedPCpu = int32(n.sharedpcpu) - p.MaxPoolCap = int32(n.maxpoolcap) - p.EntPoolCap = int32(n.entpoolcap) - p.Mem.Online = int64(n.mem.online) - p.Mem.Max = int64(n.mem.max) - p.Mem.Min = int64(n.mem.min) - p.Mem.Desired = int64(n.mem.desired) - p.MemWeightage = int32(n.mem_weightage) - p.TotalIOMemoryEntitlement = int64(n.totiomement) - p.MemPoolID = int32(n.mempoolid) - p.HyperPgSize = int64(n.hyperpgsize) - p.ExpMem.Online = int64(n.exp_mem.online) - p.ExpMem.Max = int64(n.exp_mem.max) - p.ExpMem.Min = int64(n.exp_mem.min) - p.ExpMem.Desired = int64(n.exp_mem.desired) - p.TargetMemExpFactor = int64(n.targetmemexpfactor) - p.TargetMemExpSize = int64(n.targetmemexpsize) - p.SubProcessorMode = int32(n.subprocessor_mode) - return p -} - -func perfstatmemorytotal2memorytotal(n C.perfstat_memory_total_t) MemoryTotal { - var m MemoryTotal - m.VirtualTotal = int64(n.virt_total) - m.RealTotal = int64(n.real_total) - m.RealFree = int64(n.real_free) - m.RealPinned = int64(n.real_pinned) - m.RealInUse = int64(n.real_inuse) - m.BadPages = int64(n.pgbad) - m.PageFaults = int64(n.pgexct) - m.PageIn = int64(n.pgins) - m.PageOut = int64(n.pgouts) - m.PgSpIn = int64(n.pgspins) - m.PgSpOut = int64(n.pgspouts) - m.Scans = int64(n.scans) - m.Cycles = int64(n.cycles) - m.PgSteals = int64(n.pgsteals) - m.NumPerm = int64(n.numperm) - m.PgSpTotal = int64(n.pgsp_total) - m.PgSpFree = int64(n.pgsp_free) - m.PgSpRsvd = int64(n.pgsp_rsvd) - m.RealSystem = int64(n.real_system) - m.RealUser = int64(n.real_user) - m.RealProcess = int64(n.real_process) - m.VirtualActive = int64(n.virt_active) - m.IOME = int64(n.iome) - m.IOMU = int64(n.iomu) - m.IOHWM = int64(n.iohwm) - m.PMem = int64(n.pmem) - m.CompressedTotal = int64(n.comprsd_total) - m.CompressedWSegPg = int64(n.comprsd_wseg_pgs) - m.CPgIn = int64(n.cpgins) - m.CPgOut = int64(n.cpgouts) - m.TrueSize = int64(n.true_size) - m.ExpandedMemory = int64(n.expanded_memory) - m.CompressedWSegSize = int64(n.comprsd_wseg_size) - m.TargetCPoolSize = int64(n.target_cpool_size) - m.MaxCPoolSize = int64(n.max_cpool_size) - m.MinUCPoolSize = int64(n.min_ucpool_size) - m.CPoolSize = int64(n.cpool_size) - m.UCPoolSize = int64(n.ucpool_size) - m.CPoolInUse = int64(n.cpool_inuse) - m.UCPoolInUse = int64(n.ucpool_inuse) - m.Version = int64(n.version) - m.RealAvailable = int64(n.real_avail) - m.BytesCoalesced = int64(n.bytes_coalesced) - m.BytesCoalescedMemPool = int64(n.bytes_coalesced_mempool) - - return m -} - -func perfstatnetinterfacetotal2netifacetotal(n C.perfstat_netinterface_total_t) NetIfaceTotal { - var i NetIfaceTotal - - i.Number = int32(n.number) - i.IPackets = int64(n.ipackets) - i.IBytes = int64(n.ibytes) - i.IErrors = int64(n.ierrors) - i.OPackets = int64(n.opackets) - i.OBytes = int64(n.obytes) - i.OErrors = int64(n.oerrors) - i.Collisions = int64(n.collisions) - i.XmitDrops = int64(n.xmitdrops) - i.Version = int64(n.version) - - return i -} - -func perfstatdisk2disk(n *C.perfstat_disk_t) Disk { - var d Disk - - d.Name = C.GoString(&n.name[0]) - d.Description = C.GoString(&n.description[0]) - d.VGName = C.GoString(&n.vgname[0]) - d.Size = int64(n.size) - d.Free = int64(n.free) - d.BSize = int64(n.bsize) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Wblks = int64(n.wblks) - d.Rblks = int64(n.rblks) - d.QDepth = int64(n.qdepth) - d.Time = int64(n.time) - d.Adapter = C.GoString(&n.adapter[0]) - d.PathsCount = int32(n.paths_count) - d.QFull = int64(n.q_full) - d.Rserv = int64(n.rserv) - d.RTimeOut = int64(n.rtimeout) - d.Rfailed = int64(n.rfailed) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.Wserv = int64(n.wserv) - d.WTimeOut = int64(n.wtimeout) - d.Wfailed = int64(n.wfailed) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QSampled = int64(n.q_sampled) - d.Version = int64(n.version) - d.PseudoDisk = (n.dk_type[0] & (1 << 7)) > 0 - d.VTDisk = (n.dk_type[0] & (1 << 6)) > 0 - - return d -} - -func perfstatdiskpath2diskpath(n *C.perfstat_diskpath_t) DiskPath { - var d DiskPath - - d.Name = C.GoString(&n.name[0]) - d.XRate = int64(n.xrate) - d.Xfers = int64(n.xfers) - d.Rblks = int64(n.rblks) - d.Wblks = int64(n.wblks) - d.Time = int64(n.time) - d.Adapter = C.GoString(&n.adapter[0]) - d.QFull = int64(n.q_full) - d.Rserv = int64(n.rserv) - d.RTimeOut = int64(n.rtimeout) - d.Rfailed = int64(n.rfailed) - d.MinRserv = int64(n.min_rserv) - d.MaxRserv = int64(n.max_rserv) - d.Wserv = int64(n.wserv) - d.WTimeOut = int64(n.wtimeout) - d.Wfailed = int64(n.wfailed) - d.MinWserv = int64(n.min_wserv) - d.MaxWserv = int64(n.max_wserv) - d.WqDepth = int64(n.wq_depth) - d.WqSampled = int64(n.wq_sampled) - d.WqTime = int64(n.wq_time) - d.WqMinTime = int64(n.wq_min_time) - d.WqMaxTime = int64(n.wq_max_time) - d.QSampled = int64(n.q_sampled) - d.Version = int64(n.version) - - return d -} - -func perfstatfcstat2fcadapter(n *C.perfstat_fcstat_t) FCAdapter { - var f FCAdapter - - f.Version = int64(n.version) - f.Name = C.GoString(&n.name[0]) - f.State = int32(n.state) - f.InputRequests = int64(n.InputRequests) - f.OutputRequests = int64(n.OutputRequests) - f.InputBytes = int64(n.InputBytes) - f.OutputBytes = int64(n.OutputBytes) - f.EffMaxTransfer = int64(n.EffMaxTransfer) - f.NoDMAResourceCnt = int64(n.NoDMAResourceCnt) - f.NoCmdResourceCnt = int64(n.NoCmdResourceCnt) - f.AttentionType = int32(n.AttentionType) - f.SecondsSinceLastReset = int64(n.SecondsSinceLastReset) - f.TxFrames = int64(n.TxFrames) - f.TxWords = int64(n.TxWords) - f.RxFrames = int64(n.RxFrames) - f.RxWords = int64(n.RxWords) - f.LIPCount = int64(n.LIPCount) - f.NOSCount = int64(n.NOSCount) - f.ErrorFrames = int64(n.ErrorFrames) - f.DumpedFrames = int64(n.DumpedFrames) - f.LinkFailureCount = int64(n.LinkFailureCount) - f.LossofSyncCount = int64(n.LossofSyncCount) - f.LossofSignal = int64(n.LossofSignal) - f.PrimitiveSeqProtocolErrCount = int64(n.PrimitiveSeqProtocolErrCount) - f.InvalidTxWordCount = int64(n.InvalidTxWordCount) - f.InvalidCRCCount = int64(n.InvalidCRCCount) - f.PortFcId = int64(n.PortFcId) - f.PortSpeed = int64(n.PortSpeed) - f.PortType = C.GoString(&n.PortType[0]) - f.PortWWN = int64(n.PortWWN) - f.PortSupportedSpeed = int64(n.PortSupportedSpeed) - f.AdapterType = int(n.adapter_type) - f.VfcName = C.GoString(&n.vfc_name[0]) - f.ClientPartName = C.GoString(&n.client_part_name[0]) - - return f -} - -func perfstatlogicalvolume2logicalvolume(n *C.perfstat_logicalvolume_t) LogicalVolume { - var l LogicalVolume - - l.Name = C.GoString(&n.name[0]) - l.VGName = C.GoString(&n.vgname[0]) - l.OpenClose = int64(n.open_close) - l.State = int64(n.state) - l.MirrorPolicy = int64(n.mirror_policy) - l.MirrorWriteConsistency = int64(n.mirror_write_consistency) - l.WriteVerify = int64(n.write_verify) - l.PPsize = int64(n.ppsize) - l.LogicalPartitions = int64(n.logical_partitions) - l.Mirrors = int32(n.mirrors) - l.IOCnt = int64(n.iocnt) - l.KBReads = int64(n.kbreads) - l.KBWrites = int64(n.kbwrites) - l.Version = int64(n.version) - - return l -} - -func perfstatvolumegroup2volumegroup(n *C.perfstat_volumegroup_t) VolumeGroup { - var v VolumeGroup - - v.Name = C.GoString(&n.name[0]) - v.TotalDisks = int64(n.total_disks) - v.ActiveDisks = int64(n.active_disks) - v.TotalLogicalVolumes = int64(n.total_logical_volumes) - v.OpenedLogicalVolumes = int64(n.opened_logical_volumes) - v.IOCnt = int64(n.iocnt) - v.KBReads = int64(n.kbreads) - v.KBWrites = int64(n.kbwrites) - v.Version = int64(n.version) - v.VariedState = int(n.variedState) - - return v -} - -func perfstatmemorypage2memorypage(n *C.perfstat_memory_page_t) MemoryPage { - var m MemoryPage - - m.PSize = int64(n.psize) - m.RealTotal = int64(n.real_total) - m.RealFree = int64(n.real_free) - m.RealPinned = int64(n.real_pinned) - m.RealInUse = int64(n.real_inuse) - m.PgExct = int64(n.pgexct) - m.PgIns = int64(n.pgins) - m.PgOuts = int64(n.pgouts) - m.PgSpIns = int64(n.pgspins) - m.PgSpOuts = int64(n.pgspouts) - m.Scans = int64(n.scans) - m.Cycles = int64(n.cycles) - m.PgSteals = int64(n.pgsteals) - m.NumPerm = int64(n.numperm) - m.NumPgSp = int64(n.numpgsp) - m.RealSystem = int64(n.real_system) - m.RealUser = int64(n.real_user) - m.RealProcess = int64(n.real_process) - m.VirtActive = int64(n.virt_active) - m.ComprsdTotal = int64(n.comprsd_total) - m.ComprsdWsegPgs = int64(n.comprsd_wseg_pgs) - m.CPgIns = int64(n.cpgins) - m.CPgOuts = int64(n.cpgouts) - m.CPoolInUse = int64(n.cpool_inuse) - m.UCPoolSize = int64(n.ucpool_size) - m.ComprsdWsegSize = int64(n.comprsd_wseg_size) - m.Version = int64(n.version) - m.RealAvail = int64(n.real_avail) - - return m -} - -func perfstatnetbuffer2netbuffer(n *C.perfstat_netbuffer_t) NetBuffer { - var b NetBuffer - - b.Name = C.GoString(&n.name[0]) - b.InUse = int64(n.inuse) - b.Calls = int64(n.calls) - b.Delayed = int64(n.delayed) - b.Free = int64(n.free) - b.Failed = int64(n.failed) - b.HighWatermark = int64(n.highwatermark) - b.Freed = int64(n.freed) - b.Version = int64(n.version) - - return b -} - -func perfstatnetinterface2netiface(n *C.perfstat_netinterface_t) NetIface { - var i NetIface - - i.Name = C.GoString(&n.name[0]) - i.Description = C.GoString(&n.description[0]) - i.Type = uint8(n._type) - i.MTU = int64(n.mtu) - i.IPackets = int64(n.ipackets) - i.IBytes = int64(n.ibytes) - i.IErrors = int64(n.ierrors) - i.OPackets = int64(n.opackets) - i.OBytes = int64(n.obytes) - i.OErrors = int64(n.oerrors) - i.Collisions = int64(n.collisions) - i.Bitrate = int64(n.bitrate) - i.XmitDrops = int64(n.xmitdrops) - i.Version = int64(n.version) - i.IfIqDrops = int64(n.if_iqdrops) - i.IfArpDrops = int64(n.if_arpdrops) - - return i -} - -func perfstatnetadapter2netadapter(n *C.perfstat_netadapter_t) NetAdapter { - var i NetAdapter - - i.Version = int64(n.version) - i.Name = C.GoString(&n.name[0]) - i.TxPackets = int64(n.tx_packets) - i.TxBytes = int64(n.tx_bytes) - i.TxInterrupts = int64(n.tx_interrupts) - i.TxErrors = int64(n.tx_errors) - i.TxPacketsDropped = int64(n.tx_packets_dropped) - i.TxQueueSize = int64(n.tx_queue_size) - i.TxQueueLen = int64(n.tx_queue_len) - i.TxQueueOverflow = int64(n.tx_queue_overflow) - i.TxBroadcastPackets = int64(n.tx_broadcast_packets) - i.TxMulticastPackets = int64(n.tx_multicast_packets) - i.TxCarrierSense = int64(n.tx_carrier_sense) - i.TxDMAUnderrun = int64(n.tx_DMA_underrun) - i.TxLostCTSErrors = int64(n.tx_lost_CTS_errors) - i.TxMaxCollisionErrors = int64(n.tx_max_collision_errors) - i.TxLateCollisionErrors = int64(n.tx_late_collision_errors) - i.TxDeferred = int64(n.tx_deferred) - i.TxTimeoutErrors = int64(n.tx_timeout_errors) - i.TxSingleCollisionCount = int64(n.tx_single_collision_count) - i.TxMultipleCollisionCount = int64(n.tx_multiple_collision_count) - i.RxPackets = int64(n.rx_packets) - i.RxBytes = int64(n.rx_bytes) - i.RxInterrupts = int64(n.rx_interrupts) - i.RxErrors = int64(n.rx_errors) - i.RxPacketsDropped = int64(n.rx_packets_dropped) - i.RxBadPackets = int64(n.rx_bad_packets) - i.RxMulticastPackets = int64(n.rx_multicast_packets) - i.RxBroadcastPackets = int64(n.rx_broadcast_packets) - i.RxCRCErrors = int64(n.rx_CRC_errors) - i.RxDMAOverrun = int64(n.rx_DMA_overrun) - i.RxAlignmentErrors = int64(n.rx_alignment_errors) - i.RxNoResourceErrors = int64(n.rx_noresource_errors) - i.RxCollisionErrors = int64(n.rx_collision_errors) - i.RxPacketTooShortErrors = int64(n.rx_packet_tooshort_errors) - i.RxPacketTooLongErrors = int64(n.rx_packet_toolong_errors) - i.RxPacketDiscardedByAdapter = int64(n.rx_packets_discardedbyadapter) - i.AdapterType = int32(n.adapter_type) - - return i -} - -func perfstatpagingspace2pagingspace(n *C.perfstat_pagingspace_t) PagingSpace { - var i PagingSpace - - i.Name = C.GoString(&n.name[0]) - i.Type = uint8(n._type) - i.VGName = C.GoString(C.get_ps_vgname(n)) - i.Hostname = C.GoString(C.get_ps_hostname(n)) - i.Filename = C.GoString(C.get_ps_filename(n)) - i.LPSize = int64(n.lp_size) - i.MBSize = int64(n.mb_size) - i.MBUsed = int64(n.mb_used) - i.IOPending = int64(n.io_pending) - i.Active = uint8(n.active) - i.Automatic = uint8(n.automatic) - i.Version = int64(n.version) - - return i -} - -func perfstatprocess2process(n *C.perfstat_process_t) Process { - var i Process - - i.Version = int64(n.version) - i.PID = int64(n.pid) - i.ProcessName = C.GoString(&n.proc_name[0]) - i.Priority = int32(n.proc_priority) - i.NumThreads = int64(n.num_threads) - i.UID = int64(n.proc_uid) - i.ClassID = int64(n.proc_classid) - i.Size = int64(n.proc_size) - i.RealMemData = int64(n.proc_real_mem_data) - i.RealMemText = int64(n.proc_real_mem_text) - i.VirtMemData = int64(n.proc_virt_mem_data) - i.VirtMemText = int64(n.proc_virt_mem_text) - i.SharedLibDataSize = int64(n.shared_lib_data_size) - i.HeapSize = int64(n.heap_size) - i.RealInUse = int64(n.real_inuse) - i.VirtInUse = int64(n.virt_inuse) - i.Pinned = int64(n.pinned) - i.PgSpInUse = int64(n.pgsp_inuse) - i.FilePages = int64(n.filepages) - i.RealInUseMap = int64(n.real_inuse_map) - i.VirtInUseMap = int64(n.virt_inuse_map) - i.PinnedInUseMap = int64(n.pinned_inuse_map) - i.UCpuTime = float64(n.ucpu_time) - i.SCpuTime = float64(n.scpu_time) - i.LastTimeBase = int64(n.last_timebase) - i.InBytes = int64(n.inBytes) - i.OutBytes = int64(n.outBytes) - i.InOps = int64(n.inOps) - i.OutOps = int64(n.outOps) - - return i -} - -func perfstatthread2thread(n *C.perfstat_thread_t) Thread { - var i Thread - - i.TID = int64(n.tid) - i.PID = int64(n.pid) - i.CpuID = int64(n.cpuid) - i.UCpuTime = float64(n.ucpu_time) - i.SCpuTime = float64(n.scpu_time) - i.LastTimeBase = int64(n.last_timebase) - i.Version = int64(n.version) - - return i -} - -func fsinfo2filesystem(n *C.struct_fsinfo) FileSystem { - var i FileSystem - - i.Device = C.GoString(n.devname) - i.MountPoint = C.GoString(n.fsname) - i.FSType = int(n.fstype) - i.Flags = uint(n.flags) - i.TotalBlocks = int64(n.totalblks) - i.FreeBlocks = int64(n.freeblks) - i.TotalInodes = int64(n.totalinodes) - i.FreeInodes = int64(n.freeinodes) - - return i -} - -func lparinfo2partinfo(n C.lpar_info_format2_t) PartitionInfo { - var i PartitionInfo - - i.Version = int(n.version) - i.OnlineMemory = uint64(n.online_memory) - i.TotalDispatchTime = uint64(n.tot_dispatch_time) - i.PoolIdleTime = uint64(n.pool_idle_time) - i.DispatchLatency = uint64(n.dispatch_latency) - i.LparFlags = uint(n.lpar_flags) - i.PCpusInSys = uint(n.pcpus_in_sys) - i.OnlineVCpus = uint(n.online_vcpus) - i.OnlineLCpus = uint(n.online_lcpus) - i.PCpusInPool = uint(n.pcpus_in_pool) - i.UnallocCapacity = uint(n.unalloc_capacity) - i.EntitledCapacity = uint(n.entitled_capacity) - i.VariableWeight = uint(n.variable_weight) - i.UnallocWeight = uint(n.unalloc_weight) - i.MinReqVCpuCapacity = uint(n.min_req_vcpu_capacity) - i.GroupId = uint8(n.group_id) - i.PoolId = uint8(n.pool_id) - i.ShCpusInSys = uint(n.shcpus_in_sys) - i.MaxPoolCapacity = uint(n.max_pool_capacity) - i.EntitledPoolCapacity = uint(n.entitled_pool_capacity) - i.PoolMaxTime = uint64(n.pool_max_time) - i.PoolBusyTime = uint64(n.pool_busy_time) - i.PoolScaledBusyTime = uint64(n.pool_scaled_busy_time) - i.ShCpuTotalTime = uint64(n.shcpu_tot_time) - i.ShCpuBusyTime = uint64(n.shcpu_busy_time) - i.ShCpuScaledBusyTime = uint64(n.shcpu_scaled_busy_time) - i.EntMemCapacity = uint64(n.ent_mem_capacity) - i.PhysMem = uint64(n.phys_mem) - i.VrmPoolPhysMem = uint64(n.vrm_pool_physmem) - i.HypPageSize = uint(n.hyp_pagesize) - i.VrmPoolId = int(n.vrm_pool_id) - i.VrmGroupId = int(n.vrm_group_id) - i.VarMemWeight = int(n.var_mem_weight) - i.UnallocVarMemWeight = int(n.unalloc_var_mem_weight) - i.UnallocEntMemCapacity = uint64(n.unalloc_ent_mem_capacity) - i.TrueOnlineMemory = uint64(n.true_online_memory) - i.AmeOnlineMemory = uint64(n.ame_online_memory) - i.AmeType = uint8(n.ame_type) - i.SpecExecMode = uint8(n.spec_exec_mode) - i.AmeFactor = uint(n.ame_factor) - i.EmPartMajorCode = uint(n.em_part_major_code) - i.EmPartMinorCode = uint(n.em_part_minor_code) - i.BytesCoalesced = uint64(n.bytes_coalesced) - i.BytesCoalescedMemPool = uint64(n.bytes_coalesced_mempool) - i.PurrCoalescing = uint64(n.purr_coalescing) - i.SpurrCoalescing = uint64(n.spurr_coalescing) - - return i -} diff --git a/vendor/github.com/power-devops/perfstat/lparstat.go b/vendor/github.com/power-devops/perfstat/lparstat.go deleted file mode 100644 index 470a1af2f9..0000000000 --- a/vendor/github.com/power-devops/perfstat/lparstat.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func PartitionStat() (*PartitionConfig, error) { - var part C.perfstat_partition_config_t - - rc := C.perfstat_partition_config(nil, &part, C.sizeof_perfstat_partition_config_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_partition_config() error") - } - p := perfstatpartitionconfig2partitionconfig(part) - return &p, nil - -} - -func LparInfo() (*PartitionInfo, error) { - var pinfo C.lpar_info_format2_t - - rc := C.lpar_get_info(C.LPAR_INFO_FORMAT2, unsafe.Pointer(&pinfo), C.sizeof_lpar_info_format2_t) - if rc != 0 { - return nil, fmt.Errorf("lpar_get_info() error") - } - p := lparinfo2partinfo(pinfo) - return &p, nil -} diff --git a/vendor/github.com/power-devops/perfstat/lvmstat.go b/vendor/github.com/power-devops/perfstat/lvmstat.go deleted file mode 100644 index 2ce99086ad..0000000000 --- a/vendor/github.com/power-devops/perfstat/lvmstat.go +++ /dev/null @@ -1,73 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func LogicalVolumeStat() ([]LogicalVolume, error) { - var lv *C.perfstat_logicalvolume_t - var lvname C.perfstat_id_t - - numlvs := C.perfstat_logicalvolume(nil, nil, C.sizeof_perfstat_logicalvolume_t, 0) - if numlvs <= 0 { - return nil, fmt.Errorf("perfstat_logicalvolume() error") - } - - lv_len := C.sizeof_perfstat_logicalvolume_t * C.ulong(numlvs) - lv = (*C.perfstat_logicalvolume_t)(C.malloc(lv_len)) - defer C.free(unsafe.Pointer(lv)) - C.strcpy(&lvname.name[0], C.CString("")) - r := C.perfstat_logicalvolume(&lvname, lv, C.sizeof_perfstat_logicalvolume_t, numlvs) - if r < 0 { - return nil, fmt.Errorf("perfstat_logicalvolume() error") - } - lvs := make([]LogicalVolume, r) - for i := 0; i < int(r); i++ { - l := C.get_logicalvolume_stat(lv, C.int(i)) - if l != nil { - lvs[i] = perfstatlogicalvolume2logicalvolume(l) - } - } - return lvs, nil -} - -func VolumeGroupStat() ([]VolumeGroup, error) { - var vg *C.perfstat_volumegroup_t - var vgname C.perfstat_id_t - - numvgs := C.perfstat_volumegroup(nil, nil, C.sizeof_perfstat_volumegroup_t, 0) - if numvgs <= 0 { - return nil, fmt.Errorf("perfstat_volumegroup() error") - } - - vg_len := C.sizeof_perfstat_volumegroup_t * C.ulong(numvgs) - vg = (*C.perfstat_volumegroup_t)(C.malloc(vg_len)) - defer C.free(unsafe.Pointer(vg)) - C.strcpy(&vgname.name[0], C.CString("")) - r := C.perfstat_volumegroup(&vgname, vg, C.sizeof_perfstat_volumegroup_t, numvgs) - if r < 0 { - return nil, fmt.Errorf("perfstat_volumegroup() error") - } - vgs := make([]VolumeGroup, r) - for i := 0; i < int(r); i++ { - v := C.get_volumegroup_stat(vg, C.int(i)) - if v != nil { - vgs[i] = perfstatvolumegroup2volumegroup(v) - } - } - return vgs, nil -} diff --git a/vendor/github.com/power-devops/perfstat/memstat.go b/vendor/github.com/power-devops/perfstat/memstat.go deleted file mode 100644 index 52133f0a84..0000000000 --- a/vendor/github.com/power-devops/perfstat/memstat.go +++ /dev/null @@ -1,85 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func MemoryTotalStat() (*MemoryTotal, error) { - var memory C.perfstat_memory_total_t - - rc := C.perfstat_memory_total(nil, &memory, C.sizeof_perfstat_memory_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_memory_total() error") - } - m := perfstatmemorytotal2memorytotal(memory) - return &m, nil -} - -func MemoryPageStat() ([]MemoryPage, error) { - var mempage *C.perfstat_memory_page_t - var fps C.perfstat_psize_t - - numps := C.perfstat_memory_page(nil, nil, C.sizeof_perfstat_memory_page_t, 0) - if numps < 1 { - return nil, fmt.Errorf("perfstat_memory_page() error") - } - - mp_len := C.sizeof_perfstat_memory_page_t * C.ulong(numps) - mempage = (*C.perfstat_memory_page_t)(C.malloc(mp_len)) - defer C.free(unsafe.Pointer(mempage)) - fps.psize = C.FIRST_PSIZE - r := C.perfstat_memory_page(&fps, mempage, C.sizeof_perfstat_memory_page_t, numps) - if r < 1 { - return nil, fmt.Errorf("perfstat_memory_page() error") - } - ps := make([]MemoryPage, r) - for i := 0; i < int(r); i++ { - p := C.get_memory_page_stat(mempage, C.int(i)) - if p != nil { - ps[i] = perfstatmemorypage2memorypage(p) - } - } - return ps, nil -} - -func PagingSpaceStat() ([]PagingSpace, error) { - var pspace *C.perfstat_pagingspace_t - var fps C.perfstat_id_t - - numps := C.perfstat_pagingspace(nil, nil, C.sizeof_perfstat_pagingspace_t, 0) - if numps <= 0 { - return nil, fmt.Errorf("perfstat_pagingspace() error") - } - - ps_len := C.sizeof_perfstat_pagingspace_t * C.ulong(numps) - pspace = (*C.perfstat_pagingspace_t)(C.malloc(ps_len)) - defer C.free(unsafe.Pointer(pspace)) - C.strcpy(&fps.name[0], C.CString(C.FIRST_PAGINGSPACE)) - r := C.perfstat_pagingspace(&fps, pspace, C.sizeof_perfstat_pagingspace_t, numps) - if r < 1 { - return nil, fmt.Errorf("perfstat_pagingspace() error") - } - ps := make([]PagingSpace, r) - for i := 0; i < int(r); i++ { - p := C.get_pagingspace_stat(pspace, C.int(i)) - if p != nil { - ps[i] = perfstatpagingspace2pagingspace(p) - } - } - return ps, nil -} diff --git a/vendor/github.com/power-devops/perfstat/netstat.go b/vendor/github.com/power-devops/perfstat/netstat.go deleted file mode 100644 index 847d2946ee..0000000000 --- a/vendor/github.com/power-devops/perfstat/netstat.go +++ /dev/null @@ -1,118 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func NetIfaceTotalStat() (*NetIfaceTotal, error) { - var nif C.perfstat_netinterface_total_t - - rc := C.perfstat_netinterface_total(nil, &nif, C.sizeof_perfstat_netinterface_total_t, 1) - if rc != 1 { - return nil, fmt.Errorf("perfstat_netinterface_total() error") - } - n := perfstatnetinterfacetotal2netifacetotal(nif) - return &n, nil -} - -func NetBufferStat() ([]NetBuffer, error) { - var nbuf *C.perfstat_netbuffer_t - var first C.perfstat_id_t - - numbuf := C.perfstat_netbuffer(nil, nil, C.sizeof_perfstat_netbuffer_t, 0) - if numbuf < 1 { - return nil, fmt.Errorf("perfstat_netbuffer() error") - } - - nblen := C.sizeof_perfstat_netbuffer_t * C.ulong(numbuf) - nbuf = (*C.perfstat_netbuffer_t)(C.malloc(nblen)) - defer C.free(unsafe.Pointer(nbuf)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETBUFFER)) - r := C.perfstat_netbuffer(&first, nbuf, C.sizeof_perfstat_netbuffer_t, numbuf) - if r < 0 { - return nil, fmt.Errorf("perfstat_netbuffer() error") - } - nb := make([]NetBuffer, r) - for i := 0; i < int(r); i++ { - b := C.get_netbuffer_stat(nbuf, C.int(i)) - if b != nil { - nb[i] = perfstatnetbuffer2netbuffer(b) - } - } - return nb, nil -} - -func NetIfaceStat() ([]NetIface, error) { - var nif *C.perfstat_netinterface_t - var first C.perfstat_id_t - - numif := C.perfstat_netinterface(nil, nil, C.sizeof_perfstat_netinterface_t, 0) - if numif < 0 { - return nil, fmt.Errorf("perfstat_netinterface() error") - } - if numif == 0 { - return []NetIface{}, fmt.Errorf("no network interfaces found") - } - - iflen := C.sizeof_perfstat_netinterface_t * C.ulong(numif) - nif = (*C.perfstat_netinterface_t)(C.malloc(iflen)) - defer C.free(unsafe.Pointer(nif)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_netinterface(&first, nif, C.sizeof_perfstat_netinterface_t, numif) - if r < 0 { - return nil, fmt.Errorf("perfstat_netinterface() error") - } - ifs := make([]NetIface, r) - for i := 0; i < int(r); i++ { - b := C.get_netinterface_stat(nif, C.int(i)) - if b != nil { - ifs[i] = perfstatnetinterface2netiface(b) - } - } - return ifs, nil -} - -func NetAdapterStat() ([]NetAdapter, error) { - var adapters *C.perfstat_netadapter_t - var first C.perfstat_id_t - - numad := C.perfstat_netadapter(nil, nil, C.sizeof_perfstat_netadapter_t, 0) - if numad < 0 { - return nil, fmt.Errorf("perfstat_netadater() error") - } - if numad == 0 { - return []NetAdapter{}, fmt.Errorf("no network adapters found") - } - - adplen := C.sizeof_perfstat_netadapter_t * C.ulong(numad) - adapters = (*C.perfstat_netadapter_t)(C.malloc(adplen)) - defer C.free(unsafe.Pointer(adapters)) - C.strcpy(&first.name[0], C.CString(C.FIRST_NETINTERFACE)) - r := C.perfstat_netadapter(&first, adapters, C.sizeof_perfstat_netadapter_t, numad) - if r < 0 { - return nil, fmt.Errorf("perfstat_netadapter() error") - } - ads := make([]NetAdapter, r) - for i := 0; i < int(r); i++ { - b := C.get_netadapter_stat(adapters, C.int(i)) - if b != nil { - ads[i] = perfstatnetadapter2netadapter(b) - } - } - return ads, nil -} diff --git a/vendor/github.com/power-devops/perfstat/procstat.go b/vendor/github.com/power-devops/perfstat/procstat.go deleted file mode 100644 index 957ec2b33a..0000000000 --- a/vendor/github.com/power-devops/perfstat/procstat.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#cgo LDFLAGS: -lperfstat - -#include -#include -#include - -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "unsafe" -) - -func ProcessStat() ([]Process, error) { - var proc *C.perfstat_process_t - var first C.perfstat_id_t - - numproc := C.perfstat_process(nil, nil, C.sizeof_perfstat_process_t, 0) - if numproc < 1 { - return nil, fmt.Errorf("perfstat_process() error") - } - - plen := C.sizeof_perfstat_process_t * C.ulong(numproc) - proc = (*C.perfstat_process_t)(C.malloc(plen)) - defer C.free(unsafe.Pointer(proc)) - C.strcpy(&first.name[0], C.CString("")) - r := C.perfstat_process(&first, proc, C.sizeof_perfstat_process_t, numproc) - if r < 0 { - return nil, fmt.Errorf("perfstat_process() error") - } - - ps := make([]Process, r) - for i := 0; i < int(r); i++ { - p := C.get_process_stat(proc, C.int(i)) - if p != nil { - ps[i] = perfstatprocess2process(p) - } - } - return ps, nil -} - -func ThreadStat() ([]Thread, error) { - var thread *C.perfstat_thread_t - var first C.perfstat_id_t - - numthr := C.perfstat_thread(nil, nil, C.sizeof_perfstat_thread_t, 0) - if numthr < 1 { - return nil, fmt.Errorf("perfstat_thread() error") - } - - thlen := C.sizeof_perfstat_thread_t * C.ulong(numthr) - thread = (*C.perfstat_thread_t)(C.malloc(thlen)) - defer C.free(unsafe.Pointer(thread)) - C.strcpy(&first.name[0], C.CString("")) - r := C.perfstat_thread(&first, thread, C.sizeof_perfstat_thread_t, numthr) - if r < 0 { - return nil, fmt.Errorf("perfstat_thread() error") - } - - th := make([]Thread, r) - for i := 0; i < int(r); i++ { - t := C.get_thread_stat(thread, C.int(i)) - if t != nil { - th[i] = perfstatthread2thread(t) - } - } - return th, nil -} diff --git a/vendor/github.com/power-devops/perfstat/sysconf.go b/vendor/github.com/power-devops/perfstat/sysconf.go deleted file mode 100644 index b557da0dea..0000000000 --- a/vendor/github.com/power-devops/perfstat/sysconf.go +++ /dev/null @@ -1,196 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#include -*/ -import "C" - -import "fmt" - -const ( - SC_ARG_MAX = 0 - SC_CHILD_MAX = 1 - SC_CLK_TCK = 2 - SC_NGROUPS_MAX = 3 - SC_OPEN_MAX = 4 - SC_STREAM_MAX = 5 - SC_TZNAME_MAX = 6 - SC_JOB_CONTROL = 7 - SC_SAVED_IDS = 8 - SC_VERSION = 9 - SC_POSIX_ARG_MAX = 10 - SC_POSIX_CHILD_MAX = 11 - SC_POSIX_LINK_MAX = 12 - SC_POSIX_MAX_CANON = 13 - SC_POSIX_MAX_INPUT = 14 - SC_POSIX_NAME_MAX = 15 - SC_POSIX_NGROUPS_MAX = 16 - SC_POSIX_OPEN_MAX = 17 - SC_POSIX_PATH_MAX = 18 - SC_POSIX_PIPE_BUF = 19 - SC_POSIX_SSIZE_MAX = 20 - SC_POSIX_STREAM_MAX = 21 - SC_POSIX_TZNAME_MAX = 22 - SC_BC_BASE_MAX = 23 - SC_BC_DIM_MAX = 24 - SC_BC_SCALE_MAX = 25 - SC_BC_STRING_MAX = 26 - SC_EQUIV_CLASS_MAX = 27 - SC_EXPR_NEST_MAX = 28 - SC_LINE_MAX = 29 - SC_RE_DUP_MAX = 30 - SC_2_VERSION = 31 - SC_2_C_DEV = 32 - SC_2_FORT_DEV = 33 - SC_2_FORT_RUN = 34 - SC_2_LOCALEDEF = 35 - SC_2_SW_DEV = 36 - SC_POSIX2_BC_BASE_MAX = 37 - SC_POSIX2_BC_DIM_MAX = 38 - SC_POSIX2_BC_SCALE_MAX = 39 - SC_POSIX2_BC_STRING_MAX = 40 - SC_POSIX2_BC_EQUIV_CLASS_MAX = 41 - SC_POSIX2_BC_EXPR_NEST_MAX = 42 - SC_POSIX2_BC_LINE_MAX = 43 - SC_POSIX2_BC_RE_DUP_MAX = 44 - SC_PASS_MAX = 45 - SC_XOPEN_VERSION = 46 - SC_ATEXIT_MAX = 47 - SC_PAGE_SIZE = 48 - SC_PAGESIZE = SC_PAGE_SIZE - SC_AES_OS_VERSION = 49 - SC_COLL_WEIGHTS_MAX = 50 - SC_2_C_WIND = 51 - SC_2_C_VERSION = 52 - SC_2_UPE = 53 - SC_2_CHAR_TERM = 54 - SC_XOPEN_SHM = 55 - SC_XOPEN_CRYPT = 56 - SC_XOPEN_ENH_I18N = 57 - SC_IOV_MAX = 58 - SC_THREAD_SAFE_FUNCTIONS = 59 - SC_THREADS = 60 - SC_THREAD_ATTR_STACKADDR = 61 - SC_THREAD_ATTR_STACKSIZE = 62 - SC_THREAD_FORKALL = 63 - SC_THREAD_PRIORITY_SCHEDULING = 64 - SC_THREAD_PRIO_INHERIT = 65 - SC_THREAD_PRIO_PROTECT = 66 - SC_THREAD_PROCESS_SHARED = 67 - SC_THREAD_KEYS_MAX = 68 - SC_THREAD_DATAKEYS_MAX = SC_THREAD_KEYS_MAX - SC_THREAD_STACK_MIN = 69 - SC_THREAD_THREADS_MAX = 70 - SC_NPROCESSORS_CONF = 71 - SC_NPROCESSORS_ONLN = 72 - SC_XOPEN_UNIX = 73 - SC_AIO_LISTIO_MAX = 75 - SC_AIO_MAX = 76 - SC_AIO_PRIO_DELTA_MAX = 77 - SC_ASYNCHRONOUS_IO = 78 - SC_DELAYTIMER_MAX = 79 - SC_FSYNC = 80 - SC_GETGR_R_SIZE_MAX = 81 - SC_GETPW_R_SIZE_MAX = 82 - SC_LOGIN_NAME_MAX = 83 - SC_MAPPED_FILES = 84 - SC_MEMLOCK = 85 - SC_MEMLOCK_RANGE = 86 - SC_MEMORY_PROTECTION = 87 - SC_MESSAGE_PASSING = 88 - SC_MQ_OPEN_MAX = 89 - SC_MQ_PRIO_MAX = 90 - SC_PRIORITIZED_IO = 91 - SC_PRIORITY_SCHEDULING = 92 - SC_REALTIME_SIGNALS = 93 - SC_RTSIG_MAX = 94 - SC_SEMAPHORES = 95 - SC_SEM_NSEMS_MAX = 96 - SC_SEM_VALUE_MAX = 97 - SC_SHARED_MEMORY_OBJECTS = 98 - SC_SIGQUEUE_MAX = 99 - SC_SYNCHRONIZED_IO = 100 - SC_THREAD_DESTRUCTOR_ITERATIONS = 101 - SC_TIMERS = 102 - SC_TIMER_MAX = 103 - SC_TTY_NAME_MAX = 104 - SC_XBS5_ILP32_OFF32 = 105 - SC_XBS5_ILP32_OFFBIG = 106 - SC_XBS5_LP64_OFF64 = 107 - SC_XBS5_LPBIG_OFFBIG = 108 - SC_XOPEN_XCU_VERSION = 109 - SC_XOPEN_REALTIME = 110 - SC_XOPEN_REALTIME_THREADS = 111 - SC_XOPEN_LEGACY = 112 - SC_REENTRANT_FUNCTIONS = SC_THREAD_SAFE_FUNCTIONS - SC_PHYS_PAGES = 113 - SC_AVPHYS_PAGES = 114 - SC_LPAR_ENABLED = 115 - SC_LARGE_PAGESIZE = 116 - SC_AIX_KERNEL_BITMODE = 117 - SC_AIX_REALMEM = 118 - SC_AIX_HARDWARE_BITMODE = 119 - SC_AIX_MP_CAPABLE = 120 - SC_V6_ILP32_OFF32 = 121 - SC_V6_ILP32_OFFBIG = 122 - SC_V6_LP64_OFF64 = 123 - SC_V6_LPBIG_OFFBIG = 124 - SC_XOPEN_STREAMS = 125 - SC_HOST_NAME_MAX = 126 - SC_REGEXP = 127 - SC_SHELL = 128 - SC_SYMLOOP_MAX = 129 - SC_ADVISORY_INFO = 130 - SC_FILE_LOCKING = 131 - SC_2_PBS = 132 - SC_2_PBS_ACCOUNTING = 133 - SC_2_PBS_CHECKPOINT = 134 - SC_2_PBS_LOCATE = 135 - SC_2_PBS_MESSAGE = 136 - SC_2_PBS_TRACK = 137 - SC_BARRIERS = 138 - SC_CLOCK_SELECTION = 139 - SC_CPUTIME = 140 - SC_MONOTONIC_CLOCK = 141 - SC_READER_WRITER_LOCKS = 142 - SC_SPAWN = 143 - SC_SPIN_LOCKS = 144 - SC_SPORADIC_SERVER = 145 - SC_THREAD_CPUTIME = 146 - SC_THREAD_SPORADIC_SERVER = 147 - SC_TIMEOUTS = 148 - SC_TRACE = 149 - SC_TRACE_EVENT_FILTER = 150 - SC_TRACE_INHERIT = 151 - SC_TRACE_LOG = 152 - SC_TYPED_MEMORY_OBJECTS = 153 - SC_IPV6 = 154 - SC_RAW_SOCKETS = 155 - SC_SS_REPL_MAX = 156 - SC_TRACE_EVENT_NAME_MAX = 157 - SC_TRACE_NAME_MAX = 158 - SC_TRACE_SYS_MAX = 159 - SC_TRACE_USER_EVENT_MAX = 160 - SC_AIX_UKEYS = 161 - SC_AIX_ENHANCED_AFFINITY = 162 - SC_V7_ILP32_OFF32 = 163 - SC_V7_ILP32_OFFBIG = 164 - SC_V7_LP64_OFF64 = 165 - SC_V7_LPBIG_OFFBIG = 166 - SC_THREAD_ROBUST_PRIO_INHERIT = 167 - SC_THREAD_ROBUST_PRIO_PROTECT = 168 - SC_XOPEN_UUCP = 169 - SC_XOPEN_ARMOR = 170 -) - -func Sysconf(name int32) (int64, error) { - r := C.sysconf(C.int(name)) - if r == -1 { - return 0, fmt.Errorf("sysconf error") - } else { - return int64(r), nil - } -} diff --git a/vendor/github.com/power-devops/perfstat/systemcfg.go b/vendor/github.com/power-devops/perfstat/systemcfg.go deleted file mode 100644 index b7c7b72592..0000000000 --- a/vendor/github.com/power-devops/perfstat/systemcfg.go +++ /dev/null @@ -1,662 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -import "golang.org/x/sys/unix" - -// function Getsystemcfg() is defined in golang.org/x/sys/unix -// we define here just missing constants for the function and some helpers - -// Calls to getsystemcfg() -const ( - SC_ARCH = 1 /* processor architecture */ - SC_IMPL = 2 /* processor implementation */ - SC_VERS = 3 /* processor version */ - SC_WIDTH = 4 /* width (32 || 64) */ - SC_NCPUS = 5 /* 1 = UP, n = n-way MP */ - SC_L1C_ATTR = 6 /* L1 cache attributes (bit flags) */ - SC_L1C_ISZ = 7 /* size of L1 instruction cache */ - SC_L1C_DSZ = 8 /* size of L1 data cache */ - SC_L1C_ICA = 9 /* L1 instruction cache associativity */ - SC_L1C_DCA = 10 /* L1 data cache associativity */ - SC_L1C_IBS = 11 /* L1 instruction cache block size */ - SC_L1C_DBS = 12 /* L1 data cache block size */ - SC_L1C_ILS = 13 /* L1 instruction cache line size */ - SC_L1C_DLS = 14 /* L1 data cache line size */ - SC_L2C_SZ = 15 /* size of L2 cache, 0 = No L2 cache */ - SC_L2C_AS = 16 /* L2 cache associativity */ - SC_TLB_ATTR = 17 /* TLB attributes (bit flags) */ - SC_ITLB_SZ = 18 /* entries in instruction TLB */ - SC_DTLB_SZ = 19 /* entries in data TLB */ - SC_ITLB_ATT = 20 /* instruction tlb associativity */ - SC_DTLB_ATT = 21 /* data tlb associativity */ - SC_RESRV_SZ = 22 /* size of reservation */ - SC_PRI_LC = 23 /* spin lock count in supevisor mode */ - SC_PRO_LC = 24 /* spin lock count in problem state */ - SC_RTC_TYPE = 25 /* RTC type */ - SC_VIRT_AL = 26 /* 1 if hardware aliasing is supported */ - SC_CAC_CONG = 27 /* number of page bits for cache synonym */ - SC_MOD_ARCH = 28 /* used by system for model determination */ - SC_MOD_IMPL = 29 /* used by system for model determination */ - SC_XINT = 30 /* used by system for time base conversion */ - SC_XFRAC = 31 /* used by system for time base conversion */ - SC_KRN_ATTR = 32 /* kernel attributes, see below */ - SC_PHYSMEM = 33 /* bytes of OS available memory */ - SC_SLB_ATTR = 34 /* SLB attributes */ - SC_SLB_SZ = 35 /* size of slb (0 = no slb) */ - SC_ORIG_NCPUS = 36 /* original number of CPUs */ - SC_MAX_NCPUS = 37 /* max cpus supported by this AIX image */ - SC_MAX_REALADDR = 38 /* max supported real memory address +1 */ - SC_ORIG_ENT_CAP = 39 /* configured entitled processor capacity at boot required by cross-partition LPAR tools. */ - SC_ENT_CAP = 40 /* entitled processor capacity */ - SC_DISP_WHE = 41 /* Dispatch wheel time period (TB units) */ - SC_CAPINC = 42 /* delta by which capacity can change */ - SC_VCAPW = 43 /* priority weight for idle capacity distribution */ - SC_SPLP_STAT = 44 /* State of SPLPAR enablement: 0x1 => 1=SPLPAR capable; 0=not, 0x2 => SPLPAR enabled 0=dedicated, 1=shared */ - SC_SMT_STAT = 45 /* State of SMT enablement: 0x1 = SMT Capable 0=no/1=yes, 0x2 = SMT Enabled 0=no/1=yes, 0x4 = SMT threads bound true 0=no/1=yes */ - SC_SMT_TC = 46 /* Number of SMT Threads per Physical CPU */ - SC_VMX_VER = 47 /* RPA defined VMX version: 0 = VMX not available or disabled, 1 = VMX capable, 2 = VMX and VSX capable */ - SC_LMB_SZ = 48 /* Size of an LMB on this system. */ - SC_MAX_XCPU = 49 /* Number of exclusive cpus on line */ - SC_EC_LVL = 50 /* Kernel error checking level */ - SC_AME_STAT = 51 /* AME status */ - SC_ECO_STAT = 52 /* extended cache options */ - SC_DFP_STAT = 53 /* RPA defined DFP version, 0=none/disabled */ - SC_VRM_STAT = 54 /* VRM Capable/enabled */ - SC_PHYS_IMP = 55 /* physical processor implementation */ - SC_PHYS_VER = 56 /* physical processor version */ - SC_SPCM_STATUS = 57 - SC_SPCM_MAX = 58 - SC_TM_VER = 59 /* Transaction Memory version, 0 - not capable */ - SC_NX_CAP = 60 /* NX GZIP capable */ - SC_PKS_STATE = 61 /* Platform KeyStore */ - SC_MMA_VER = 62 -) - -/* kernel attributes */ -/* bit 0/1 meaning */ -/* -----------------------------------------*/ -/* 31 32-bit kernel / 64-bit kernel */ -/* 30 non-LPAR / LPAR */ -/* 29 old 64bit ABI / 64bit Large ABI */ -/* 28 non-NUMA / NUMA */ -/* 27 UP / MP */ -/* 26 no DR CPU add / DR CPU add support */ -/* 25 no DR CPU rm / DR CPU rm support */ -/* 24 no DR MEM add / DR MEM add support */ -/* 23 no DR MEM rm / DR MEM rm support */ -/* 22 kernel keys disabled / enabled */ -/* 21 no recovery / recovery enabled */ -/* 20 non-MLS / MLS enabled */ -/* 19 enhanced affinity indicator */ -/* 18 non-vTPM / vTPM enabled */ -/* 17 non-VIOS / VIOS */ - -// Values for architecture field -const ( - ARCH_POWER_RS = 0x0001 /* Power Classic architecture */ - ARCH_POWER_PC = 0x0002 /* Power PC architecture */ - ARCH_IA64 = 0x0003 /* Intel IA64 architecture */ -) - -// Values for implementation field for POWER_PC Architectures -const ( - IMPL_POWER_RS1 = 0x00001 /* RS1 class CPU */ - IMPL_POWER_RSC = 0x00002 /* RSC class CPU */ - IMPL_POWER_RS2 = 0x00004 /* RS2 class CPU */ - IMPL_POWER_601 = 0x00008 /* 601 class CPU */ - IMPL_POWER_603 = 0x00020 /* 603 class CPU */ - IMPL_POWER_604 = 0x00010 /* 604 class CPU */ - IMPL_POWER_620 = 0x00040 /* 620 class CPU */ - IMPL_POWER_630 = 0x00080 /* 630 class CPU */ - IMPL_POWER_A35 = 0x00100 /* A35 class CPU */ - IMPL_POWER_RS64II = 0x0200 /* RS64-II class CPU */ - IMPL_POWER_RS64III = 0x0400 /* RS64-III class CPU */ - IMPL_POWER4 = 0x0800 /* 4 class CPU */ - IMPL_POWER_RS64IV = IMPL_POWER4 /* 4 class CPU */ - IMPL_POWER_MPC7450 = 0x1000 /* MPC7450 class CPU */ - IMPL_POWER5 = 0x2000 /* 5 class CPU */ - IMPL_POWER6 = 0x4000 /* 6 class CPU */ - IMPL_POWER7 = 0x8000 /* 7 class CPU */ - IMPL_POWER8 = 0x10000 /* 8 class CPU */ - IMPL_POWER9 = 0x20000 /* 9 class CPU */ - IMPL_POWER10 = 0x20000 /* 10 class CPU */ -) - -// Values for implementation field for IA64 Architectures -const ( - IMPL_IA64_M1 = 0x0001 /* IA64 M1 class CPU (Itanium) */ - IMPL_IA64_M2 = 0x0002 /* IA64 M2 class CPU */ -) - -// Values for the version field -const ( - PV_601 = 0x010001 /* Power PC 601 */ - PV_601A = 0x010002 /* Power PC 601 */ - PV_603 = 0x060000 /* Power PC 603 */ - PV_604 = 0x050000 /* Power PC 604 */ - PV_620 = 0x070000 /* Power PC 620 */ - PV_630 = 0x080000 /* Power PC 630 */ - PV_A35 = 0x090000 /* Power PC A35 */ - PV_RS64II = 0x0A0000 /* Power PC RS64II */ - PV_RS64III = 0x0B0000 /* Power PC RS64III */ - PV_4 = 0x0C0000 /* Power PC 4 */ - PV_RS64IV = PV_4 /* Power PC 4 */ - PV_MPC7450 = 0x0D0000 /* Power PC MPC7450 */ - PV_4_2 = 0x0E0000 /* Power PC 4 */ - PV_4_3 = 0x0E0001 /* Power PC 4 */ - PV_5 = 0x0F0000 /* Power PC 5 */ - PV_5_2 = 0x0F0001 /* Power PC 5 */ - PV_5_3 = 0x0F0002 /* Power PC 5 */ - PV_6 = 0x100000 /* Power PC 6 */ - PV_6_1 = 0x100001 /* Power PC 6 DD1.x */ - PV_7 = 0x200000 /* Power PC 7 */ - PV_8 = 0x300000 /* Power PC 8 */ - PV_9 = 0x400000 /* Power PC 9 */ - PV_10 = 0x500000 /* Power PC 10 */ - PV_5_Compat = 0x0F8000 /* Power PC 5 */ - PV_6_Compat = 0x108000 /* Power PC 6 */ - PV_7_Compat = 0x208000 /* Power PC 7 */ - PV_8_Compat = 0x308000 /* Power PC 8 */ - PV_9_Compat = 0x408000 /* Power PC 9 */ - PV_10_Compat = 0x508000 /* Power PC 10 */ - PV_RESERVED_2 = 0x0A0000 /* source compatability */ - PV_RESERVED_3 = 0x0B0000 /* source compatability */ - PV_RS2 = 0x040000 /* Power RS2 */ - PV_RS1 = 0x020000 /* Power RS1 */ - PV_RSC = 0x030000 /* Power RSC */ - PV_M1 = 0x008000 /* Intel IA64 M1 */ - PV_M2 = 0x008001 /* Intel IA64 M2 */ -) - -// Values for rtc_type -const ( - RTC_POWER = 1 /* rtc as defined by Power Arch. */ - RTC_POWER_PC = 2 /* rtc as defined by Power PC Arch. */ - RTC_IA64 = 3 /* rtc as defined by IA64 Arch. */ -) - -const NX_GZIP_PRESENT = 0x00000001 - -const ( - PKS_STATE_CAPABLE = 1 - PKS_STATE_ENABLED = 2 -) - -// Macros for identifying physical processor -const ( - PPI4_1 = 0x35 - PPI4_2 = 0x38 - PPI4_3 = 0x39 - PPI4_4 = 0x3C - PPI4_5 = 0x44 - PPI5_1 = 0x3A - PPI5_2 = 0x3B - PPI6_1 = 0x3E - PPI7_1 = 0x3F - PPI7_2 = 0x4A - PPI8_1 = 0x4B - PPI8_2 = 0x4D - PPI9 = 0x4E - PPI9_1 = 0x4E - PPI10_1 = 0x80 -) - -// Macros for kernel attributes -const ( - KERN_TYPE = 0x1 - KERN_LPAR = 0x2 - KERN_64BIT_LARGE_ABI = 0x4 - KERN_NUMA = 0x8 - KERN_UPMP = 0x10 - KERN_DR_CPU_ADD = 0x20 - KERN_DR_CPU_RM = 0x40 - KERN_DR_MEM_ADD = 0x80 - KERN_DR_MEM_RM = 0x100 - KERN_KKEY_ENABLED = 0x200 - KERN_RECOVERY = 0x400 - KERN_MLS = 0x800 - KERN_ENH_AFFINITY = 0x1000 - KERN_VTPM = 0x2000 - KERN_VIOS = 0x4000 -) - -// macros for SPLPAR environment. -const ( - SPLPAR_CAPABLE = 0x1 - SPLPAR_ENABLED = 0x2 - SPLPAR_DONATE_CAPABLE = 0x4 -) - -// Macros for SMT status determination -const ( - SMT_CAPABLE = 0x1 - SMT_ENABLE = 0x2 - SMT_BOUND = 0x4 - SMT_ORDER = 0x8 -) - -// Macros for VRM status determination -const ( - VRM_CAPABLE = 0x1 - VRM_ENABLE = 0x2 - CMOX_CAPABLE = 0x4 -) - -// Macros for AME status determination -const AME_ENABLE = 0x1 - -// Macros for extended cache options -const ( - ECO_CAPABLE = 0x1 - ECO_ENABLE = 0x2 -) - -// These define blocks of values for model_arch and model_impl that are reserved for OEM use. -const ( - MODEL_ARCH_RSPC = 2 - MODEL_ARCH_CHRP = 3 - MODEL_ARCH_IA64 = 4 - MODEL_ARCH_OEM_START = 1024 - MODEL_ARCH_OEM_END = 2047 - MODEL_IMPL_RS6K_UP_MCA = 1 - MODEL_IMPL_RS6K_SMP_MCA = 2 - MODEL_IMPL_RSPC_UP_PCI = 3 - MODEL_IMPL_RSPC_SMP_PCI = 4 - MODEL_IMPL_CHRP_UP_PCI = 5 - MODEL_IMPL_CHRP_SMP_PCI = 6 - MODEL_IMPL_IA64_COM = 7 - MODEL_IMPL_IA64_SOFTSDV = 8 - MODEL_IMPL_MAMBO_SIM = 9 - MODEL_IMPL_POWER_KVM = 10 - MODEL_IMPL_OEM_START = 1024 - MODEL_IMPL_OEM_END = 2047 -) - -// example determining processor compatibilty mode on AIX: -// impl := unix.Getsystemcfg(SC_IMPL) -// if impl&IMPL_POWER8 != 0 { -// // we are running on POWER8 -// } -// if impl&IMPL_POWER9 != 0 { -// // we are running on POWER9 -// } - -func GetCPUImplementation() string { - impl := unix.Getsystemcfg(SC_IMPL) - switch { - case impl&IMPL_POWER4 != 0: - return "POWER4" - case impl&IMPL_POWER5 != 0: - return "POWER5" - case impl&IMPL_POWER6 != 0: - return "POWER6" - case impl&IMPL_POWER7 != 0: - return "POWER7" - case impl&IMPL_POWER8 != 0: - return "POWER8" - case impl&IMPL_POWER9 != 0: - return "POWER9" - case impl&IMPL_POWER10 != 0: - return "Power10" - default: - return "Unknown" - } -} - -func POWER10OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER10 != 0 { - return true - } - return false -} - -func POWER10() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER10 != 0 { - return true - } - return false -} - -func POWER9OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER10 != 0 || impl&IMPL_POWER9 != 0 { - return true - } - return false -} - -func POWER9() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER9 != 0 { - return true - } - return false -} - -func POWER8OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER10 != 0 || impl&IMPL_POWER9 != 0 || impl&IMPL_POWER8 != 0 { - return true - } - return false -} - -func POWER8() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER8 != 0 { - return true - } - return false -} - -func POWER7OrNewer() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER10 != 0 || impl&IMPL_POWER9 != 0 || impl&IMPL_POWER8 != 0 || impl&IMPL_POWER7 != 0 { - return true - } - return false -} - -func POWER7() bool { - impl := unix.Getsystemcfg(SC_IMPL) - if impl&IMPL_POWER7 != 0 { - return true - } - return false -} - -func HasTransactionalMemory() bool { - impl := unix.Getsystemcfg(SC_TM_VER) - if impl > 0 { - return true - } - return false -} - -func Is64Bit() bool { - impl := unix.Getsystemcfg(SC_WIDTH) - if impl == 64 { - return true - } - return false -} - -func IsSMP() bool { - impl := unix.Getsystemcfg(SC_NCPUS) - if impl > 1 { - return true - } - return false -} - -func HasVMX() bool { - impl := unix.Getsystemcfg(SC_VMX_VER) - if impl > 0 { - return true - } - return false -} - -func HasVSX() bool { - impl := unix.Getsystemcfg(SC_VMX_VER) - if impl > 1 { - return true - } - return false -} - -func HasDFP() bool { - impl := unix.Getsystemcfg(SC_DFP_STAT) - if impl > 1 { - return true - } - return false -} - -func HasNxGzip() bool { - impl := unix.Getsystemcfg(SC_NX_CAP) - if impl&NX_GZIP_PRESENT > 0 { - return true - } - return false -} - -func PksCapable() bool { - impl := unix.Getsystemcfg(SC_PKS_STATE) - if impl&PKS_STATE_CAPABLE > 0 { - return true - } - return false -} - -func PksEnabled() bool { - impl := unix.Getsystemcfg(SC_PKS_STATE) - if impl&PKS_STATE_ENABLED > 0 { - return true - } - return false -} - -func CPUMode() string { - impl := unix.Getsystemcfg(SC_VERS) - switch impl { - case PV_10, PV_10_Compat: - return "Power10" - case PV_9, PV_9_Compat: - return "POWER9" - case PV_8, PV_8_Compat: - return "POWER8" - case PV_7, PV_7_Compat: - return "POWER7" - default: - return "Unknown" - } -} - -func KernelBits() int { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_TYPE == KERN_TYPE { - return 64 - } - return 32 -} - -func IsLPAR() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_LPAR == KERN_LPAR { - return true - } - return false -} - -func CpuAddCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_CPU_ADD == KERN_DR_CPU_ADD { - return true - } - return false -} - -func CpuRemoveCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_CPU_RM == KERN_DR_CPU_RM { - return true - } - return false -} - -func MemoryAddCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_MEM_ADD == KERN_DR_MEM_ADD { - return true - } - return false -} - -func MemoryRemoveCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_DR_MEM_RM == KERN_DR_MEM_RM { - return true - } - return false -} - -func DLparCapable() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&(KERN_DR_CPU_ADD|KERN_DR_CPU_RM|KERN_DR_MEM_ADD|KERN_DR_MEM_RM) > 0 { - return true - } - return false -} - -func IsNUMA() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_NUMA > 0 { - return true - } - return false -} - -func KernelKeys() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_KKEY_ENABLED > 0 { - return true - } - return false -} - -func RecoveryMode() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_RECOVERY > 0 { - return true - } - return false -} - -func EnhancedAffinity() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_ENH_AFFINITY > 0 { - return true - } - return false -} - -func VTpmEnabled() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_VTPM > 0 { - return true - } - return false -} - -func IsVIOS() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_VIOS > 0 { - return true - } - return false -} - -func MLSEnabled() bool { - impl := unix.Getsystemcfg(SC_KRN_ATTR) - if impl&KERN_MLS > 0 { - return true - } - return false -} - -func SPLparCapable() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_CAPABLE > 0 { - return true - } - return false -} - -func SPLparEnabled() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_ENABLED > 0 { - return true - } - return false -} - -func DedicatedLpar() bool { - return !SPLparEnabled() -} - -func SPLparCapped() bool { - impl := unix.Getsystemcfg(SC_VCAPW) - if impl == 0 { - return true - } - return false -} - -func SPLparDonating() bool { - impl := unix.Getsystemcfg(SC_SPLP_STAT) - if impl&SPLPAR_DONATE_CAPABLE > 0 { - return true - } - return false -} - -func SmtCapable() bool { - impl := unix.Getsystemcfg(SC_SMT_STAT) - if impl&SMT_CAPABLE > 0 { - return true - } - return false -} - -func SmtEnabled() bool { - impl := unix.Getsystemcfg(SC_SMT_STAT) - if impl&SMT_ENABLE > 0 { - return true - } - return false -} - -func VrmCapable() bool { - impl := unix.Getsystemcfg(SC_VRM_STAT) - if impl&VRM_CAPABLE > 0 { - return true - } - return false -} - -func VrmEnabled() bool { - impl := unix.Getsystemcfg(SC_VRM_STAT) - if impl&VRM_ENABLE > 0 { - return true - } - return false -} - -func AmeEnabled() bool { - impl := unix.Getsystemcfg(SC_AME_STAT) - if impl&AME_ENABLE > 0 { - return true - } - return false -} - -func EcoCapable() bool { - impl := unix.Getsystemcfg(SC_ECO_STAT) - if impl&ECO_CAPABLE > 0 { - return true - } - return false -} - -func EcoEnabled() bool { - impl := unix.Getsystemcfg(SC_ECO_STAT) - if impl&ECO_ENABLE > 0 { - return true - } - return false -} diff --git a/vendor/github.com/power-devops/perfstat/types_cpu.go b/vendor/github.com/power-devops/perfstat/types_cpu.go deleted file mode 100644 index 84425e92f5..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_cpu.go +++ /dev/null @@ -1,186 +0,0 @@ -package perfstat - -type CPU struct { - Name string /* logical processor name (cpu0, cpu1, ..) */ - User int64 /* raw number of clock ticks spent in user mode */ - Sys int64 /* raw number of clock ticks spent in system mode */ - Idle int64 /* raw number of clock ticks spent idle */ - Wait int64 /* raw number of clock ticks spent waiting for I/O */ - PSwitch int64 /* number of context switches (changes of currently running process) */ - Syscall int64 /* number of system calls executed */ - Sysread int64 /* number of read system calls executed */ - Syswrite int64 /* number of write system calls executed */ - Sysfork int64 /* number of fork system call executed */ - Sysexec int64 /* number of exec system call executed */ - Readch int64 /* number of characters tranferred with read system call */ - Writech int64 /* number of characters tranferred with write system call */ - Bread int64 /* number of block reads */ - Bwrite int64 /* number of block writes */ - Lread int64 /* number of logical read requests */ - Lwrite int64 /* number of logical write requests */ - Phread int64 /* number of physical reads (reads on raw device) */ - Phwrite int64 /* number of physical writes (writes on raw device) */ - Iget int64 /* number of inode lookups */ - Namei int64 /* number of vnode lookup from a path name */ - Dirblk int64 /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ - Msg int64 /* number of IPC message operations */ - Sema int64 /* number of IPC semaphore operations */ - MinFaults int64 /* number of page faults with no I/O */ - MajFaults int64 /* number of page faults with disk I/O */ - PUser int64 /* raw number of physical processor tics in user mode */ - PSys int64 /* raw number of physical processor tics in system mode */ - PIdle int64 /* raw number of physical processor tics idle */ - PWait int64 /* raw number of physical processor tics waiting for I/O */ - RedispSD0 int64 /* number of thread redispatches within the scheduler affinity domain 0 */ - RedispSD1 int64 /* number of thread redispatches within the scheduler affinity domain 1 */ - RedispSD2 int64 /* number of thread redispatches within the scheduler affinity domain 2 */ - RedispSD3 int64 /* number of thread redispatches within the scheduler affinity domain 3 */ - RedispSD4 int64 /* number of thread redispatches within the scheduler affinity domain 4 */ - RedispSD5 int64 /* number of thread redispatches within the scheduler affinity domain 5 */ - MigrationPush int64 /* number of thread migrations from the local runque to another queue due to starvation load balancing */ - MigrationS3grq int64 /* number of thread migrations from the global runque to the local runque resulting in a move accross scheduling domain 3 */ - MigrationS3pul int64 /* number of thread migrations from another processor's runque resulting in a move accross scheduling domain 3 */ - InvolCSwitch int64 /* number of involuntary thread context switches */ - VolCSwitch int64 /* number of voluntary thread context switches */ - RunQueue int64 /* number of threads on the runque */ - Bound int64 /* number of bound threads */ - DecrIntrs int64 /* number of decrementer tics interrupts */ - MpcRIntrs int64 /* number of mpc's received interrupts */ - MpcSIntrs int64 /* number of mpc's sent interrupts */ - DevIntrs int64 /* number of device interrupts */ - SoftIntrs int64 /* number of offlevel handlers called */ - PhantIntrs int64 /* number of phantom interrupts */ - IdleDonatedPurr int64 /* number of idle cycles donated by a dedicated partition enabled for donation */ - IdleDonatedSpurr int64 /* number of idle spurr cycles donated by a dedicated partition enabled for donation */ - BusyDonatedPurr int64 /* number of busy cycles donated by a dedicated partition enabled for donation */ - BusyDonatedSpurr int64 /* number of busy spurr cycles donated by a dedicated partition enabled for donation */ - IdleStolenPurr int64 /* number of idle cycles stolen by the hypervisor from a dedicated partition */ - IdleStolenSpurr int64 /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenPurr int64 /* number of busy cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenSpurr int64 /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ - Hpi int64 /* number of hypervisor page-ins */ - Hpit int64 /* Time spent in hypervisor page-ins (in nanoseconds)*/ - PUserSpurr int64 /* number of spurr cycles spent in user mode */ - PSysSpurr int64 /* number of spurr cycles spent in kernel mode */ - PIdleSpurr int64 /* number of spurr cycles spent in idle mode */ - PWaitSpurr int64 /* number of spurr cycles spent in wait mode */ - SpurrFlag int32 /* set if running in spurr mode */ - LocalDispatch int64 /* number of local thread dispatches on this logical CPU */ - NearDispatch int64 /* number of near thread dispatches on this logical CPU */ - FarDispatch int64 /* number of far thread dispatches on this logical CPU */ - CSwitches int64 /* Context switches */ - Version int64 /* version number (1, 2, etc.,) */ - TbLast int64 /* timebase counter */ - State int /* Show whether the CPU is offline or online */ - VtbLast int64 /* Last virtual timebase read */ - ICountLast int64 /* Last instruction count read */ -} - -type CPUTotal struct { - NCpus int /* number of active logical processors */ - NCpusCfg int /* number of configured processors */ - Description string /* processor description (type/official name) */ - ProcessorHz int64 /* processor speed in Hz */ - User int64 /* raw total number of clock ticks spent in user mode */ - Sys int64 /* raw total number of clock ticks spent in system mode */ - Idle int64 /* raw total number of clock ticks spent idle */ - Wait int64 /* raw total number of clock ticks spent waiting for I/O */ - PSwitch int64 /* number of process switches (change in currently running process) */ - Syscall int64 /* number of system calls executed */ - Sysread int64 /* number of read system calls executed */ - Syswrite int64 /* number of write system calls executed */ - Sysfork int64 /* number of forks system calls executed */ - Sysexec int64 /* number of execs system calls executed */ - Readch int64 /* number of characters tranferred with read system call */ - Writech int64 /* number of characters tranferred with write system call */ - DevIntrs int64 /* number of device interrupts */ - SoftIntrs int64 /* number of software interrupts */ - Lbolt int64 /* number of ticks since last reboot */ - LoadAvg1 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - LoadAvg5 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - LoadAvg15 float32 /* times the average number of runnables processes during the last 1, 5 and 15 minutes. */ - RunQueue int64 /* length of the run queue (processes ready) */ - SwpQueue int64 /* length of the swap queue (processes waiting to be paged in) */ - Bread int64 /* number of blocks read */ - Bwrite int64 /* number of blocks written */ - Lread int64 /* number of logical read requests */ - Lwrite int64 /* number of logical write requests */ - Phread int64 /* number of physical reads (reads on raw devices) */ - Phwrite int64 /* number of physical writes (writes on raw devices) */ - RunOcc int64 /* updated whenever runque is updated, i.e. the runqueue is occupied. This can be used to compute the simple average of ready processes */ - SwpOcc int64 /* updated whenever swpque is updated. i.e. the swpqueue is occupied. This can be used to compute the simple average processes waiting to be paged in */ - Iget int64 /* number of inode lookups */ - Namei int64 /* number of vnode lookup from a path name */ - Dirblk int64 /* number of 512-byte block reads by the directory search routine to locate an entry for a file */ - Msg int64 /* number of IPC message operations */ - Sema int64 /* number of IPC semaphore operations */ - RcvInt int64 /* number of tty receive interrupts */ - XmtInt int64 /* number of tyy transmit interrupts */ - MdmInt int64 /* number of modem interrupts */ - TtyRawInch int64 /* number of raw input characters */ - TtyCanInch int64 /* number of canonical input characters (always zero) */ - TtyRawOutch int64 /* number of raw output characters */ - Ksched int64 /* number of kernel processes created */ - Koverf int64 /* kernel process creation attempts where: -the user has forked to their maximum limit -the configuration limit of processes has been reached */ - Kexit int64 /* number of kernel processes that became zombies */ - Rbread int64 /* number of remote read requests */ - Rcread int64 /* number of cached remote reads */ - Rbwrt int64 /* number of remote writes */ - Rcwrt int64 /* number of cached remote writes */ - Traps int64 /* number of traps */ - NCpusHigh int64 /* index of highest processor online */ - PUser int64 /* raw number of physical processor tics in user mode */ - PSys int64 /* raw number of physical processor tics in system mode */ - PIdle int64 /* raw number of physical processor tics idle */ - PWait int64 /* raw number of physical processor tics waiting for I/O */ - DecrIntrs int64 /* number of decrementer tics interrupts */ - MpcRIntrs int64 /* number of mpc's received interrupts */ - MpcSIntrs int64 /* number of mpc's sent interrupts */ - PhantIntrs int64 /* number of phantom interrupts */ - IdleDonatedPurr int64 /* number of idle cycles donated by a dedicated partition enabled for donation */ - IdleDonatedSpurr int64 /* number of idle spurr cycles donated by a dedicated partition enabled for donation */ - BusyDonatedPurr int64 /* number of busy cycles donated by a dedicated partition enabled for donation */ - BusyDonatedSpurr int64 /* number of busy spurr cycles donated by a dedicated partition enabled for donation */ - IdleStolenPurr int64 /* number of idle cycles stolen by the hypervisor from a dedicated partition */ - IdleStolenSpurr int64 /* number of idle spurr cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenPurr int64 /* number of busy cycles stolen by the hypervisor from a dedicated partition */ - BusyStolenSpurr int64 /* number of busy spurr cycles stolen by the hypervisor from a dedicated partition */ - IOWait int32 /* number of processes that are asleep waiting for buffered I/O */ - PhysIO int32 /* number of processes waiting for raw I/O */ - TWait int64 /* number of threads that are waiting for filesystem direct(cio) */ - Hpi int64 /* number of hypervisor page-ins */ - Hpit int64 /* Time spent in hypervisor page-ins (in nanoseconds) */ - PUserSpurr int64 /* number of spurr cycles spent in user mode */ - PSysSpurr int64 /* number of spurr cycles spent in kernel mode */ - PIdleSpurr int64 /* number of spurr cycles spent in idle mode */ - PWaitSpurr int64 /* number of spurr cycles spent in wait mode */ - SpurrFlag int /* set if running in spurr mode */ - Version int64 /* version number (1, 2, etc.,) */ - TbLast int64 /*time base counter */ - PurrCoalescing int64 /* If the calling partition is authorized to see pool wide statistics then PURR cycles consumed to coalesce data else set to zero.*/ - SpurrCoalescing int64 /* If the calling partition is authorized to see pool wide statistics then SPURR cycles consumed to coalesce data else set to zero. */ -} - -type CPUUtil struct { - Version int64 - CpuID string /* holds the id of the cpu */ - Entitlement float32 /* Partition's entitlement */ - UserPct float32 /* % of utilization in user mode */ - KernPct float32 /* % of utilization in kernel mode */ - IdlePct float32 /* % of utilization in idle mode */ - WaitPct float32 /* % of utilization in wait mode */ - PhysicalBusy float32 /* physical cpus busy */ - PhysicalConsumed float32 /* total cpus consumed by the partition */ - FreqPct float32 /* Average freq% over the last interval */ - EntitlementPct float32 /* % of entitlement used */ - BusyPct float32 /* % of entitlement busy */ - IdleDonatedPct float32 /* % idle cycles donated */ - BusyDonatedPct float32 /* % of busy cycles donated */ - IdleStolenPct float32 /* % idle cycles stolen */ - BusyStolenPct float32 /* % busy cycles stolen */ - LUserPct float32 /* % of utilization in user mode, in terms of logical processor ticks */ - LKernPct float32 /* % of utilization in kernel mode, in terms of logical processor ticks*/ - LIdlePct float32 /* % of utilization in idle mode, in terms of logical processor ticks */ - LWaitPct float32 /* % of utilization in wait mode, in terms of logical processor ticks */ - DeltaTime int64 /* delta time in milliseconds, for which utilization is evaluated */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_disk.go b/vendor/github.com/power-devops/perfstat/types_disk.go deleted file mode 100644 index 50e323dbe0..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_disk.go +++ /dev/null @@ -1,176 +0,0 @@ -package perfstat - -type DiskTotal struct { - Number int32 /* total number of disks */ - Size int64 /* total size of all disks (in MB) */ - Free int64 /* free portion of all disks (in MB) */ - XRate int64 /* __rxfers: total number of transfers from disk */ - Xfers int64 /* total number of transfers to/from disk */ - Wblks int64 /* 512 bytes blocks written to all disks */ - Rblks int64 /* 512 bytes blocks read from all disks */ - Time int64 /* amount of time disks are active */ - Version int64 /* version number (1, 2, etc.,) */ - Rserv int64 /* Average read or receive service time */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - RFailed int64 /* number of failed read requests */ - Wserv int64 /* Average write or send service time */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - WFailed int64 /* number of failed write requests */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ -} - -// Disk Adapter Types -const ( - DA_SCSI = 0 /* 0 ==> SCSI, SAS, other legacy adapter types */ - DA_VSCSI = 1 /* 1 ==> Virtual SCSI/SAS Adapter */ - DA_FCA = 2 /* 2 ==> Fiber Channel Adapter */ -) - -type DiskAdapter struct { - Name string /* name of the adapter (from ODM) */ - Description string /* adapter description (from ODM) */ - Number int32 /* number of disks connected to adapter */ - Size int64 /* total size of all disks (in MB) */ - Free int64 /* free portion of all disks (in MB) */ - XRate int64 /* __rxfers: total number of reads via adapter */ - Xfers int64 /* total number of transfers via adapter */ - Rblks int64 /* 512 bytes blocks written via adapter */ - Wblks int64 /* 512 bytes blocks read via adapter */ - Time int64 /* amount of time disks are active */ - Version int64 /* version number (1, 2, etc.,) */ - AdapterType int64 /* 0 ==> SCSI, SAS, other legacy adapter types, 1 ==> Virtual SCSI/SAS Adapter, 2 ==> Fiber Channel Adapter */ - DkBSize int64 /* Number of Bytes in a block for this disk*/ - DkRxfers int64 /* Number of transfers from disk */ - DkRserv int64 /* read or receive service time */ - DkWserv int64 /* write or send service time */ - MinRserv int64 /* Minimum read service time */ - MaxRserv int64 /* Maximum read service time */ - MinWserv int64 /* Minimum Write service time */ - MaxWserv int64 /* Maximum write service time */ - WqDepth int64 /* driver wait queue depth */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* minimum wait queueing time */ - WqMaxTime int64 /* maximum wait queueing time */ - QFull int64 /* "Service" queue full occurrence count (number of times the adapter/devices connected to the adapter is not accepting any more request) */ - QSampled int64 /* accumulated sampled */ -} - -type Disk struct { - Name string /* name of the disk */ - Description string /* disk description (from ODM) */ - VGName string /* volume group name (from ODM) */ - Size int64 /* size of the disk (in MB) */ - Free int64 /* free portion of the disk (in MB) */ - BSize int64 /* disk block size (in bytes) */ - XRate int64 /* number of transfers from disk */ - Xfers int64 /* number of transfers to/from disk */ - Wblks int64 /* number of blocks written to disk */ - Rblks int64 /* number of blocks read from disk */ - QDepth int64 /* instantaneous "service" queue depth (number of requests sent to disk and not completed yet) */ - Time int64 /* amount of time disk is active */ - Adapter string /* disk adapter name */ - PathsCount int32 /* number of paths to this disk */ - QFull int64 /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ - Rserv int64 /* read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - Rfailed int64 /* number of failed read requests */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - Wserv int64 /* write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - Wfailed int64 /* number of failed write requests */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ - QSampled int64 /* accumulated sampled dk_q_depth */ - Version int64 /* version number (1, 2, etc.,) */ - PseudoDisk bool /*Indicates whether pseudo or physical disk */ - VTDisk bool /* 1- Virtual Target Disk, 0 - Others */ -} - -type DiskPath struct { - Name string /* name of the path */ - XRate int64 /* __rxfers: number of reads via the path */ - Xfers int64 /* number of transfers via the path */ - Rblks int64 /* 512 bytes blocks written via the path */ - Wblks int64 /* 512 bytes blocks read via the path */ - Time int64 /* amount of time disks are active */ - Adapter string /* disk adapter name (from ODM) */ - QFull int64 /* "service" queue full occurrence count (number of times the disk is not accepting any more request) */ - Rserv int64 /* read or receive service time */ - RTimeOut int64 /* number of read request timeouts */ - Rfailed int64 /* number of failed read requests */ - MinRserv int64 /* min read or receive service time */ - MaxRserv int64 /* max read or receive service time */ - Wserv int64 /* write or send service time */ - WTimeOut int64 /* number of write request timeouts */ - Wfailed int64 /* number of failed write requests */ - MinWserv int64 /* min write or send service time */ - MaxWserv int64 /* max write or send service time */ - WqDepth int64 /* instantaneous wait queue depth (number of requests waiting to be sent to disk) */ - WqSampled int64 /* accumulated sampled dk_wq_depth */ - WqTime int64 /* accumulated wait queueing time */ - WqMinTime int64 /* min wait queueing time */ - WqMaxTime int64 /* max wait queueing time */ - QSampled int64 /* accumulated sampled dk_q_depth */ - Version int64 /* version number (1, 2, etc.,) */ -} - -const ( - FC_DOWN = 0 // FC Adapter state is DOWN - FC_UP = 1 // FC Adapter state is UP -) - -const ( - FCT_FCHBA = 0 // FC type - real Fiber Channel Adapter - FCT_VFC = 1 // FC type - virtual Fiber Channel -) - -type FCAdapter struct { - Version int64 /* version number (1, 2, etc.,) */ - Name string /* name of the adapter */ - State int32 /* FC Adapter state UP or DOWN */ - InputRequests int64 /* Number of Input Requests*/ - OutputRequests int64 /* Number of Output Requests */ - InputBytes int64 /* Number of Input Bytes */ - OutputBytes int64 /* Number of Output Bytes */ - EffMaxTransfer int64 /* Adapter's Effective Maximum Transfer Value */ - NoDMAResourceCnt int64 /* Count of DMA failures due to no DMA Resource available */ - NoCmdResourceCnt int64 /* Count of failures to allocate a command due to no command resource available */ - AttentionType int32 /* Link up or down Indicator */ - SecondsSinceLastReset int64 /* Displays the seconds since last reset of the statistics on the adapter */ - TxFrames int64 /* Number of frames transmitted */ - TxWords int64 /* Fiber Channel Kbytes transmitted */ - RxFrames int64 /* Number of Frames Received */ - RxWords int64 /* Fiber Channel Kbytes Received */ - LIPCount int64 /* Count of LIP (Loop Initialization Protocol) Events received in case we have FC-AL */ - NOSCount int64 /* Count of NOS (Not_Operational) Events. This indicates a link failure state. */ - ErrorFrames int64 /* Number of frames received with the CRC Error */ - DumpedFrames int64 /* Number of lost frames */ - LinkFailureCount int64 /* Count of Link failures */ - LossofSyncCount int64 /* Count of loss of sync */ - LossofSignal int64 /* Count of loss of Signal */ - PrimitiveSeqProtocolErrCount int64 /* number of times a primitive sequence was in error */ - InvalidTxWordCount int64 /* Count of Invalid Transmission words received */ - InvalidCRCCount int64 /* Count of CRC Errors in a Received Frame */ - PortFcId int64 /* SCSI Id of the adapter */ - PortSpeed int64 /* Speed of Adapter in GBIT */ - PortType string /* Type of connection. The Possible Values are Fabric, Private Loop, Point-to-Point, unknown */ - PortWWN int64 /* World Wide Port name */ - PortSupportedSpeed int64 /* Supported Port Speed in GBIT */ - AdapterType int /* 0 - Fiber Chanel, 1 - Virtual Fiber Chanel Adapter */ - VfcName string /* name of the Virtual Fiber Chanel(VFC) adapter */ - ClientPartName string /* name of the client partition */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_fs.go b/vendor/github.com/power-devops/perfstat/types_fs.go deleted file mode 100644 index b4b43ac61a..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_fs.go +++ /dev/null @@ -1,195 +0,0 @@ -package perfstat - -import ( - "strings" -) - -type FileSystem struct { - Device string /* name of the mounted device */ - MountPoint string /* where the device is mounted */ - FSType int /* File system type, see the constants below */ - Flags uint /* Flags of the file system */ - TotalBlocks int64 /* number of 512 bytes blocks in the filesystem */ - FreeBlocks int64 /* number of free 512 bytes block in the filesystem */ - TotalInodes int64 /* total number of inodes in the filesystem */ - FreeInodes int64 /* number of free inodes in the filesystem */ -} - -func (f *FileSystem) TypeString() string { - switch f.FSType { - case FS_JFS2: - return "jfs2" - case FS_NAMEFS: - return "namefs" - case FS_NFS: - return "nfs" - case FS_JFS: - return "jfs" - case FS_CDROM: - return "cdrfs" - case FS_PROCFS: - return "procfs" - case FS_SFS: - return "sfs" - case FS_CACHEFS: - return "cachefs" - case FS_NFS3: - return "nfs3" - case FS_AUTOFS: - return "autofs" - case FS_POOLFS: - return "poolfs" - case FS_VXFS: - return "vxfs" - case FS_VXODM: - return "vxodm" - case FS_UDF: - return "udfs" - case FS_NFS4: - return "nfs4" - case FS_RFS4: - return "rfs4" - case FS_CIFS: - return "cifs" - case FS_PMEMFS: - return "pmemfs" - case FS_AHAFS: - return "ahafs" - case FS_STNFS: - return "stnfs" - case FS_ASMFS: - return "asmfs" - } - return "unknown" -} - -func (f *FileSystem) FlagsString() string { - var flags []string - - switch { - case f.Flags&VFS_READONLY != 0: - flags = append(flags, "ro") - case f.Flags&VFS_REMOVABLE != 0: - flags = append(flags, "removable") - case f.Flags&VFS_DEVMOUNT != 0: - flags = append(flags, "local") - case f.Flags&VFS_REMOTE != 0: - flags = append(flags, "remote") - case f.Flags&VFS_SYSV_MOUNT != 0: - flags = append(flags, "sysv") - case f.Flags&VFS_UNMOUNTING != 0: - flags = append(flags, "unmounting") - case f.Flags&VFS_NOSUID != 0: - flags = append(flags, "nosuid") - case f.Flags&VFS_NODEV != 0: - flags = append(flags, "nodev") - case f.Flags&VFS_NOINTEG != 0: - flags = append(flags, "nointeg") - case f.Flags&VFS_NOMANAGER != 0: - flags = append(flags, "nomanager") - case f.Flags&VFS_NOCASE != 0: - flags = append(flags, "nocase") - case f.Flags&VFS_UPCASE != 0: - flags = append(flags, "upcase") - case f.Flags&VFS_NBC != 0: - flags = append(flags, "nbc") - case f.Flags&VFS_MIND != 0: - flags = append(flags, "mind") - case f.Flags&VFS_RBR != 0: - flags = append(flags, "rbr") - case f.Flags&VFS_RBW != 0: - flags = append(flags, "rbw") - case f.Flags&VFS_DISCONNECTED != 0: - flags = append(flags, "disconnected") - case f.Flags&VFS_SHUTDOWN != 0: - flags = append(flags, "shutdown") - case f.Flags&VFS_VMOUNTOK != 0: - flags = append(flags, "vmountok") - case f.Flags&VFS_SUSER != 0: - flags = append(flags, "suser") - case f.Flags&VFS_SOFT_MOUNT != 0: - flags = append(flags, "soft") - case f.Flags&VFS_UNMOUNTED != 0: - flags = append(flags, "unmounted") - case f.Flags&VFS_DEADMOUNT != 0: - flags = append(flags, "deadmount") - case f.Flags&VFS_SNAPSHOT != 0: - flags = append(flags, "snapshot") - case f.Flags&VFS_VCM_ON != 0: - flags = append(flags, "vcm_on") - case f.Flags&VFS_VCM_MONITOR != 0: - flags = append(flags, "vcm_monitor") - case f.Flags&VFS_ATIMEOFF != 0: - flags = append(flags, "noatime") - case f.Flags&VFS_READMOSTLY != 0: - flags = append(flags, "readmostly") - case f.Flags&VFS_CIOR != 0: - flags = append(flags, "cior") - case f.Flags&VFS_CIO != 0: - flags = append(flags, "cio") - case f.Flags&VFS_DIO != 0: - flags = append(flags, "dio") - } - - return strings.Join(flags, ",") -} - -// Filesystem types -const ( - FS_JFS2 = 0 /* AIX physical fs "jfs2" */ - FS_NAMEFS = 1 /* AIX pseudo fs "namefs" */ - FS_NFS = 2 /* SUN Network File System "nfs" */ - FS_JFS = 3 /* AIX R3 physical fs "jfs" */ - FS_CDROM = 5 /* CDROM File System "cdrom" */ - FS_PROCFS = 6 /* PROCFS File System "proc" */ - FS_SFS = 16 /* AIX Special FS (STREAM mounts) */ - FS_CACHEFS = 17 /* Cachefs file system */ - FS_NFS3 = 18 /* NFSv3 file system */ - FS_AUTOFS = 19 /* Automount file system */ - FS_POOLFS = 20 /* Pool file system */ - FS_VXFS = 32 /* THRPGIO File System "vxfs" */ - FS_VXODM = 33 /* For Veritas File System */ - FS_UDF = 34 /* UDFS file system */ - FS_NFS4 = 35 /* NFSv4 file system */ - FS_RFS4 = 36 /* NFSv4 Pseudo file system */ - FS_CIFS = 37 /* AIX SMBFS (CIFS client) */ - FS_PMEMFS = 38 /* MCR Async Mobility pseudo file system */ - FS_AHAFS = 39 /* AHAFS File System "aha" */ - FS_STNFS = 40 /* Short-Term NFS */ - FS_ASMFS = 41 /* Oracle ASM FS */ -) - -// Filesystem flags -const ( - VFS_READONLY = 0x00000001 /* rdonly access to vfs */ - VFS_REMOVABLE = 0x00000002 /* removable (diskette) media */ - VFS_DEVMOUNT = 0x00000004 /* physical device mount */ - VFS_REMOTE = 0x00000008 /* file system is on network */ - VFS_SYSV_MOUNT = 0x00000010 /* System V style mount */ - VFS_UNMOUNTING = 0x00000020 /* originated by unmount() */ - VFS_NOSUID = 0x00000040 /* don't maintain suid-ness across this mount */ - VFS_NODEV = 0x00000080 /* don't allow device access across this mount */ - VFS_NOINTEG = 0x00000100 /* no integrity mount option */ - VFS_NOMANAGER = 0x00000200 /* mount managed fs w/o manager */ - VFS_NOCASE = 0x00000400 /* do not map dir names */ - VFS_UPCASE = 0x00000800 /* map dir names to uppercase */ - VFS_NBC = 0x00001000 /* NBC cached file in this vfs */ - VFS_MIND = 0x00002000 /* multi-segment .indirect */ - VFS_RBR = 0x00004000 /* Release-behind when reading */ - VFS_RBW = 0x00008000 /* Release-behind when writing */ - VFS_DISCONNECTED = 0x00010000 /* file mount not in use */ - VFS_SHUTDOWN = 0x00020000 /* forced unmount for shutdown */ - VFS_VMOUNTOK = 0x00040000 /* dir/file mnt permission flag */ - VFS_SUSER = 0x00080000 /* client-side suser perm. flag */ - VFS_SOFT_MOUNT = 0x00100000 /* file-over-file or directory over directory "soft" mount */ - VFS_UNMOUNTED = 0x00200000 /* unmount completed, stale vnodes are left in the vfs */ - VFS_DEADMOUNT = 0x00400000 /* softmount vfs should be disconnected at last vnode free */ - VFS_SNAPSHOT = 0x00800000 /* snapshot mount */ - VFS_VCM_ON = 0x01000000 /* VCM is currently active */ - VFS_VCM_MONITOR = 0x02000000 /* VCM monitoring is active */ - VFS_ATIMEOFF = 0x04000000 /* no atime updates during i/o */ - VFS_READMOSTLY = 0x10000000 /* ROFS allows open for write */ - VFS_CIOR = 0x20000000 /* O_CIOR mount */ - VFS_CIO = 0x40000000 /* O_CIO mount */ - VFS_DIO = 0x80000000 /* O_DIRECT mount */ -) diff --git a/vendor/github.com/power-devops/perfstat/types_lpar.go b/vendor/github.com/power-devops/perfstat/types_lpar.go deleted file mode 100644 index f95f8c300c..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_lpar.go +++ /dev/null @@ -1,129 +0,0 @@ -package perfstat - -type PartitionType struct { - SmtCapable bool /* OS supports SMT mode */ - SmtEnabled bool /* SMT mode is on */ - LparCapable bool /* OS supports logical partitioning */ - LparEnabled bool /* logical partitioning is on */ - SharedCapable bool /* OS supports shared processor LPAR */ - SharedEnabled bool /* partition runs in shared mode */ - DLparCapable bool /* OS supports dynamic LPAR */ - Capped bool /* partition is capped */ - Kernel64bit bool /* kernel is 64 bit */ - PoolUtilAuthority bool /* pool utilization available */ - DonateCapable bool /* capable of donating cycles */ - DonateEnabled bool /* enabled for donating cycles */ - AmsCapable bool /* 1 = AMS(Active Memory Sharing) capable, 0 = Not AMS capable */ - AmsEnabled bool /* 1 = AMS(Active Memory Sharing) enabled, 0 = Not AMS enabled */ - PowerSave bool /*1= Power saving mode is enabled*/ - AmeEnabled bool /* Active Memory Expansion is enabled */ - SharedExtended bool -} - -type PartitionValue struct { - Online int64 - Max int64 - Min int64 - Desired int64 -} - -type PartitionConfig struct { - Version int64 /* Version number */ - Name string /* Partition Name */ - Node string /* Node Name */ - Conf PartitionType /* Partition Properties */ - Number int32 /* Partition Number */ - GroupID int32 /* Group ID */ - ProcessorFamily string /* Processor Type */ - ProcessorModel string /* Processor Model */ - MachineID string /* Machine ID */ - ProcessorMhz float64 /* Processor Clock Speed in MHz */ - NumProcessors PartitionValue /* Number of Configured Physical Processors in frame*/ - OSName string /* Name of Operating System */ - OSVersion string /* Version of operating System */ - OSBuild string /* Build of Operating System */ - LCpus int32 /* Number of Logical CPUs */ - SmtThreads int32 /* Number of SMT Threads */ - Drives int32 /* Total Number of Drives */ - NetworkAdapters int32 /* Total Number of Network Adapters */ - CpuCap PartitionValue /* Min, Max and Online CPU Capacity */ - Weightage int32 /* Variable Processor Capacity Weightage */ - EntCapacity int32 /* number of processor units this partition is entitled to receive */ - VCpus PartitionValue /* Min, Max and Online Virtual CPUs */ - PoolID int32 /* Shared Pool ID of physical processors, to which this partition belongs*/ - ActiveCpusInPool int32 /* Count of physical CPUs in the shared processor pool, to which this partition belongs */ - PoolWeightage int32 /* Pool Weightage */ - SharedPCpu int32 /* Number of physical processors allocated for shared processor use */ - MaxPoolCap int32 /* Maximum processor capacity of partition's pool */ - EntPoolCap int32 /* Entitled processor capacity of partition's pool */ - Mem PartitionValue /* Min, Max and Online Memory */ - MemWeightage int32 /* Variable Memory Capacity Weightage */ - TotalIOMemoryEntitlement int64 /* I/O Memory Entitlement of the partition in bytes */ - MemPoolID int32 /* AMS pool id of the pool the LPAR belongs to */ - HyperPgSize int64 /* Hypervisor page size in KB*/ - ExpMem PartitionValue /* Min, Max and Online Expanded Memory */ - TargetMemExpFactor int64 /* Target Memory Expansion Factor scaled by 100 */ - TargetMemExpSize int64 /* Expanded Memory Size in MB */ - SubProcessorMode int32 /* Split core mode, its value can be 0,1,2 or 4. 0 for unsupported, 1 for capable but not enabled, 2 or 4 for enabled*/ -} - -const ( - AME_TYPE_V1 = 0x1 - AME_TYPE_V2 = 0x2 - LPAR_INFO_CAPPED = 0x01 /* Parition Capped */ - LPAR_INFO_AUTH_PIC = 0x02 /* Authority granted for poolidle*/ - LPAR_INFO_SMT_ENABLED = 0x04 /* SMT Enabled */ - LPAR_INFO_WPAR_ACTIVE = 0x08 /* Process Running Within a WPAR */ - LPAR_INFO_EXTENDED = 0x10 /* Extended shared processor pool information */ - LPAR_INFO_AME_ENABLED = 0x20 /* Active Mem. Expansion (AME) enabled*/ - LPAR_INFO_SEM_ENABLED = 0x40 /* Speculative Execution Mode enabled */ -) - -type PartitionInfo struct { - Version int /* version for this structure */ - OnlineMemory uint64 /* MB of currently online memory */ - TotalDispatchTime uint64 /* Total lpar dispatch time in nsecs */ - PoolIdleTime uint64 /* Idle time of shared CPU pool nsecs*/ - DispatchLatency uint64 /* Max latency inbetween dispatches of this LPAR on physCPUS in nsecs */ - LparFlags uint /* LPAR flags */ - PCpusInSys uint /* # of active licensed physical CPUs in system */ - OnlineVCpus uint /* # of current online virtual CPUs */ - OnlineLCpus uint /* # of current online logical CPUs */ - PCpusInPool uint /* # physical CPUs in shared pool */ - UnallocCapacity uint /* Unallocated Capacity available in shared pool */ - EntitledCapacity uint /* Entitled Processor Capacity for this partition */ - VariableWeight uint /* Variable Processor Capacity Weight */ - UnallocWeight uint /* Unallocated Variable Weight available for this partition */ - MinReqVCpuCapacity uint /* OS minimum required virtual processor capacity. */ - GroupId uint8 /* ID of a LPAR group/aggregation */ - PoolId uint8 /* ID of a shared pool */ - ShCpusInSys uint /* # of physical processors allocated for shared processor use */ - MaxPoolCapacity uint /* Maximum processor capacity of partition's pool */ - EntitledPoolCapacity uint /* Entitled processor capacity of partition's pool */ - PoolMaxTime uint64 /* Summation of maximum time that could be consumed by the pool, in nanoseconds */ - PoolBusyTime uint64 /* Summation of busy time accumulated across all partitions in the pool, in nanoseconds */ - PoolScaledBusyTime uint64 /* Scaled summation of busy time accumulated across all partitions in the pool, in nanoseconds */ - ShCpuTotalTime uint64 /* Summation of total time across all physical processors allocated for shared processor use, in nanoseconds */ - ShCpuBusyTime uint64 /* Summation of busy time accumulated across all shared processor partitions, in nanoseconds */ - ShCpuScaledBusyTime uint64 /* Scaled summation of busy time accumulated across all shared processor partitions, in nanoseconds */ - EntMemCapacity uint64 /* Partition's current entitlement memory capacity setting */ - PhysMem uint64 /* Amount of physical memory, in bytes, currently backing the partition's logical memory */ - VrmPoolPhysMem uint64 /* Total amount of physical memory in the VRM pool */ - HypPageSize uint /* Page size hypervisor is using to virtualize partition's memory */ - VrmPoolId int /* ID of VRM pool */ - VrmGroupId int /* eWLM VRM group to which partition belongs */ - VarMemWeight int /* Partition's current variable memory capacity weighting setting */ - UnallocVarMemWeight int /* Amount of unallocated variable memory capacity weight available to LPAR's group */ - UnallocEntMemCapacity uint64 /* Amount of unallocated I/O memory entitlement available to LPAR's group */ - TrueOnlineMemory uint64 /* true MB of currently online memory */ - AmeOnlineMemory uint64 /* AME MB of currently online memory */ - AmeType uint8 - SpecExecMode uint8 /* Speculative Execution Mode */ - AmeFactor uint /* memory expansion factor for LPAR */ - EmPartMajorCode uint /* Major and minor codes for our */ - EmPartMinorCode uint /* current energy management mode */ - BytesCoalesced uint64 /* The number of bytes of the calling partition.s logical real memory coalesced because they contained duplicated data */ - BytesCoalescedMemPool uint64 /* If the calling partition is authorized to see pool wide statistics then the number of bytes of logical real memory coalesced because they contained duplicated data in the calling partition.s memory pool else set to zero.*/ - PurrCoalescing uint64 /* If the calling partition is authorized to see pool wide statistics then PURR cycles consumed to coalesce data else set to zero.*/ - SpurrCoalescing uint64 /* If the calling partition is authorized to see pool wide statistics then SPURR cycles consumed to coalesce data else set to zero.*/ -} diff --git a/vendor/github.com/power-devops/perfstat/types_lvm.go b/vendor/github.com/power-devops/perfstat/types_lvm.go deleted file mode 100644 index 8f7176a613..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_lvm.go +++ /dev/null @@ -1,31 +0,0 @@ -package perfstat - -type LogicalVolume struct { - Name string /* logical volume name */ - VGName string /* volume group name */ - OpenClose int64 /* LVM_QLVOPEN, etc. (see lvm.h) */ - State int64 /* LVM_UNDEF, etc. (see lvm.h) */ - MirrorPolicy int64 /* LVM_PARALLEL, etc. (see lvm.h) */ - MirrorWriteConsistency int64 /* LVM_CONSIST, etc. (see lvm.h) */ - WriteVerify int64 /* LVM_VERIFY, etc. (see lvm.h) */ - PPsize int64 /* physical partition size in MB */ - LogicalPartitions int64 /* total number of logical paritions configured for this logical volume */ - Mirrors int32 /* number of physical mirrors for each logical partition */ - IOCnt int64 /* Number of read and write requests */ - KBReads int64 /* Number of Kilobytes read */ - KBWrites int64 /* Number of Kilobytes written */ - Version int64 /* version number (1, 2, etc.,) */ -} - -type VolumeGroup struct { - Name string /* volume group name */ - TotalDisks int64 /* number of physical volumes in the volume group */ - ActiveDisks int64 /* number of active physical volumes in the volume group */ - TotalLogicalVolumes int64 /* number of logical volumes in the volume group */ - OpenedLogicalVolumes int64 /* number of logical volumes opened in the volume group */ - IOCnt int64 /* Number of read and write requests */ - KBReads int64 /* Number of Kilobytes read */ - KBWrites int64 /* Number of Kilobytes written */ - Version int64 /* version number (1, 2, etc.,) */ - VariedState int /* Indicates volume group available or not */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_memory.go b/vendor/github.com/power-devops/perfstat/types_memory.go deleted file mode 100644 index 096d29ad2e..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_memory.go +++ /dev/null @@ -1,101 +0,0 @@ -package perfstat - -type MemoryTotal struct { - VirtualTotal int64 /* total virtual memory (in 4KB pages) */ - RealTotal int64 /* total real memory (in 4KB pages) */ - RealFree int64 /* free real memory (in 4KB pages) */ - RealPinned int64 /* real memory which is pinned (in 4KB pages) */ - RealInUse int64 /* real memory which is in use (in 4KB pages) */ - BadPages int64 /* number of bad pages */ - PageFaults int64 /* number of page faults */ - PageIn int64 /* number of pages paged in */ - PageOut int64 /* number of pages paged out */ - PgSpIn int64 /* number of page ins from paging space */ - PgSpOut int64 /* number of page outs from paging space */ - Scans int64 /* number of page scans by clock */ - Cycles int64 /* number of page replacement cycles */ - PgSteals int64 /* number of page steals */ - NumPerm int64 /* number of frames used for files (in 4KB pages) */ - PgSpTotal int64 /* total paging space (in 4KB pages) */ - PgSpFree int64 /* free paging space (in 4KB pages) */ - PgSpRsvd int64 /* reserved paging space (in 4KB pages) */ - RealSystem int64 /* real memory used by system segments (in 4KB pages). */ - RealUser int64 /* real memory used by non-system segments (in 4KB pages). */ - RealProcess int64 /* real memory used by process segments (in 4KB pages). */ - VirtualActive int64 /* Active virtual pages. Virtual pages are considered active if they have been accessed */ - IOME int64 /* I/O memory entitlement of the partition in bytes*/ - IOMU int64 /* I/O memory entitlement of the partition in use in bytes*/ - IOHWM int64 /* High water mark of I/O memory entitlement used in bytes*/ - PMem int64 /* Amount of physical mmeory currently backing partition's logical memory in bytes*/ - CompressedTotal int64 /* Total numbers of pages in compressed pool (in 4KB pages) */ - CompressedWSegPg int64 /* Number of compressed working storage pages */ - CPgIn int64 /* number of page ins to compressed pool */ - CPgOut int64 /* number of page outs from compressed pool */ - TrueSize int64 /* True Memory Size in 4KB pages */ - ExpandedMemory int64 /* Expanded Memory Size in 4KB pages */ - CompressedWSegSize int64 /* Total size of the compressed working storage pages in the pool */ - TargetCPoolSize int64 /* Target Compressed Pool Size in bytes */ - MaxCPoolSize int64 /* Max Size of Compressed Pool in bytes */ - MinUCPoolSize int64 /* Min Size of Uncompressed Pool in bytes */ - CPoolSize int64 /* Compressed Pool size in bytes */ - UCPoolSize int64 /* Uncompressed Pool size in bytes */ - CPoolInUse int64 /* Compressed Pool Used in bytes */ - UCPoolInUse int64 /* Uncompressed Pool Used in bytes */ - Version int64 /* version number (1, 2, etc.,) */ - RealAvailable int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */ - BytesCoalesced int64 /* The number of bytes of the calling partition.s logical real memory coalesced because they contained duplicated data */ - BytesCoalescedMemPool int64 /* number of bytes of logical real memory coalesced because they contained duplicated data in the calling partition.s memory */ -} - -type MemoryPage struct { - PSize int64 /* page size in bytes */ - RealTotal int64 /* number of real memory frames of this page size */ - RealFree int64 /* number of pages on free list */ - RealPinned int64 /* number of pages pinned */ - RealInUse int64 /* number of pages in use */ - PgExct int64 /* number of page faults */ - PgIns int64 /* number of pages paged in */ - PgOuts int64 /* number of pages paged out */ - PgSpIns int64 /* number of page ins from paging space */ - PgSpOuts int64 /* number of page outs from paging space */ - Scans int64 /* number of page scans by clock */ - Cycles int64 /* number of page replacement cycles */ - PgSteals int64 /* number of page steals */ - NumPerm int64 /* number of frames used for files */ - NumPgSp int64 /* number of pages with allocated paging space */ - RealSystem int64 /* number of pages used by system segments. */ - RealUser int64 /* number of pages used by non-system segments. */ - RealProcess int64 /* number of pages used by process segments. */ - VirtActive int64 /* Active virtual pages. */ - ComprsdTotal int64 /* Number of pages of this size compressed */ - ComprsdWsegPgs int64 /* Number of compressed working storage pages */ - CPgIns int64 /* number of page ins of this page size to compressed pool */ - CPgOuts int64 /* number of page outs of this page size from compressed pool */ - CPoolInUse int64 /* Compressed Size of this page size in Compressed Pool */ - UCPoolSize int64 /* Uncompressed Pool size in bytes of this page size */ - ComprsdWsegSize int64 /* Total size of the compressed working storage pages in the pool */ - Version int64 /* version number (1, 2, etc.,) */ - RealAvail int64 /* number of pages (in 4KB pages) of memory available without paging out working segments */ -} - -// paging space types -const ( - LV_PAGING = 1 - NFS_PAGING = 2 - UNKNOWN_PAGING = 3 -) - -type PagingSpace struct { - Name string /* Paging space name */ - Type uint8 /* type of paging device (LV_PAGING or NFS_PAGING) */ - VGName string /* volume group name */ - Hostname string /* host name of paging server */ - Filename string /* swap file name on server */ - LPSize int64 /* size in number of logical partitions */ - MBSize int64 /* size in megabytes */ - MBUsed int64 /* portion used in megabytes */ - IOPending int64 /* number of pending I/O */ - Active uint8 /* indicates if active (1 if so, 0 if not) */ - Automatic uint8 /* indicates if automatic (1 if so, 0 if not) */ - Version int64 /* version number (1, 2, etc.,) */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_network.go b/vendor/github.com/power-devops/perfstat/types_network.go deleted file mode 100644 index e69d0041d3..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_network.go +++ /dev/null @@ -1,163 +0,0 @@ -package perfstat - -// Network Interface types -const ( - IFT_OTHER = 0x1 - IFT_1822 = 0x2 /* old-style arpanet imp */ - IFT_HDH1822 = 0x3 /* HDH arpanet imp */ - IFT_X25DDN = 0x4 /* x25 to imp */ - IFT_X25 = 0x5 /* PDN X25 interface (RFC877) */ - IFT_ETHER = 0x6 /* Ethernet CSMACD */ - IFT_ISO88023 = 0x7 /* CMSA CD */ - IFT_ISO88024 = 0x8 /* Token Bus */ - IFT_ISO88025 = 0x9 /* Token Ring */ - IFT_ISO88026 = 0xa /* MAN */ - IFT_STARLAN = 0xb - IFT_P10 = 0xc /* Proteon 10MBit ring */ - IFT_P80 = 0xd /* Proteon 10MBit ring */ - IFT_HY = 0xe /* Hyperchannel */ - IFT_FDDI = 0xf - IFT_LAPB = 0x10 - IFT_SDLC = 0x11 - IFT_T1 = 0x12 - IFT_CEPT = 0x13 /* E1 - european T1 */ - IFT_ISDNBASIC = 0x14 - IFT_ISDNPRIMARY = 0x15 - IFT_PTPSERIAL = 0x16 /* Proprietary PTP serial */ - IFT_PPP = 0x17 /* RFC 1331 */ - IFT_LOOP = 0x18 /* loopback */ - IFT_EON = 0x19 /* ISO over IP */ - IFT_XETHER = 0x1a /* obsolete 3MB experimental ethernet */ - IFT_NSIP = 0x1b /* XNS over IP */ - IFT_SLIP = 0x1c /* IP over generic TTY */ - IFT_ULTRA = 0x1d /* Ultra Technologies */ - IFT_DS3 = 0x1e /* Generic T3 */ - IFT_SIP = 0x1f /* SMDS */ - IFT_FRELAY = 0x20 /* Frame Relay DTE only */ - IFT_RS232 = 0x21 - IFT_PARA = 0x22 /* parallel-port */ - IFT_ARCNET = 0x23 - IFT_ARCNETPLUS = 0x24 - IFT_ATM = 0x25 /* ATM cells */ - IFT_MIOX25 = 0x26 - IFT_SONET = 0x27 /* SONET or SDH */ - IFT_X25PLE = 0x28 - IFT_ISO88022LLC = 0x29 - IFT_LOCALTALK = 0x2a - IFT_SMDSDXI = 0x2b - IFT_FRELAYDCE = 0x2c /* Frame Relay DCE */ - IFT_V35 = 0x2d - IFT_HSSI = 0x2e - IFT_HIPPI = 0x2f - IFT_MODEM = 0x30 /* Generic Modem */ - IFT_AAL5 = 0x31 /* AAL5 over ATM */ - IFT_SONETPATH = 0x32 - IFT_SONETVT = 0x33 - IFT_SMDSICIP = 0x34 /* SMDS InterCarrier Interface */ - IFT_PROPVIRTUAL = 0x35 /* Proprietary Virtual/internal */ - IFT_PROPMUX = 0x36 /* Proprietary Multiplexing */ - IFT_VIPA = 0x37 /* Virtual Interface */ - IFT_SN = 0x38 /* Federation Switch */ - IFT_SP = 0x39 /* SP switch */ - IFT_FCS = 0x3a /* IP over Fiber Channel */ - IFT_TUNNEL = 0x3b - IFT_GIFTUNNEL = 0x3c /* IPv4 over IPv6 tunnel */ - IFT_HF = 0x3d /* Support for PERCS HFI*/ - IFT_CLUSTER = 0x3e /* cluster pseudo network interface */ - IFT_FB = 0xc7 /* IP over Infiniband. Number by IANA */ -) - -type NetIfaceTotal struct { - Number int32 /* number of network interfaces */ - IPackets int64 /* number of packets received on interface */ - IBytes int64 /* number of bytes received on interface */ - IErrors int64 /* number of input errors on interface */ - OPackets int64 /* number of packets sent on interface */ - OBytes int64 /* number of bytes sent on interface */ - OErrors int64 /* number of output errors on interface */ - Collisions int64 /* number of collisions on csma interface */ - XmitDrops int64 /* number of packets not transmitted */ - Version int64 /* version number (1, 2, etc.,) */ -} - -type NetIface struct { - Name string /* name of the interface */ - Description string /* interface description (from ODM, similar to lscfg output) */ - Type uint8 /* ethernet, tokenring, etc. interpretation can be done using /usr/include/net/if_types.h */ - MTU int64 /* network frame size */ - IPackets int64 /* number of packets received on interface */ - IBytes int64 /* number of bytes received on interface */ - IErrors int64 /* number of input errors on interface */ - OPackets int64 /* number of packets sent on interface */ - OBytes int64 /* number of bytes sent on interface */ - OErrors int64 /* number of output errors on interface */ - Collisions int64 /* number of collisions on csma interface */ - Bitrate int64 /* adapter rating in bit per second */ - XmitDrops int64 /* number of packets not transmitted */ - Version int64 /* version number (1, 2, etc.,) */ - IfIqDrops int64 /* Dropped on input, this interface */ - IfArpDrops int64 /* Dropped because no arp response */ -} - -type NetBuffer struct { - Name string /* size in ascii, always power of 2 (ex: "32", "64", "128") */ - InUse int64 /* number of buffer currently allocated */ - Calls int64 /* number of buffer allocations since last reset */ - Delayed int64 /* number of delayed allocations */ - Free int64 /* number of free calls */ - Failed int64 /* number of failed allocations */ - HighWatermark int64 /* high threshold for number of buffer allocated */ - Freed int64 /* number of buffers freed */ - Version int64 /* version number (1, 2, etc.,) */ -} - -// Network adapter types -const ( - NET_PHY = 0 /* physical device */ - NET_SEA = 1 /* shared ethernet adapter */ - NET_VIR = 2 /* virtual device */ - NET_HEA = 3 /* host ethernet adapter */ - NET_EC = 4 /* etherchannel */ - NET_VLAN = 5 /* vlan pseudo device */ -) - -type NetAdapter struct { - Version int64 /* version number (1,2, etc) */ - Name string /* name of the adapter */ - TxPackets int64 /* Transmit Packets on interface */ - TxBytes int64 /* Transmit Bytes on interface */ - TxInterrupts int64 /* Transfer Interrupts */ - TxErrors int64 /* Transmit Errors */ - TxPacketsDropped int64 /* Packets Dropped at the time of Data Transmission */ - TxQueueSize int64 /* Maximum Packets on Software Transmit Queue */ - TxQueueLen int64 /* Transmission Queue Length */ - TxQueueOverflow int64 /* Transmission Queue Overflow */ - TxBroadcastPackets int64 /* Number of Broadcast Packets Transmitted */ - TxMulticastPackets int64 /* Number of Multicast packets Transmitted */ - TxCarrierSense int64 /* Lost Carrier Sense signal count */ - TxDMAUnderrun int64 /* Count of DMA Under-runs for Transmission */ - TxLostCTSErrors int64 /* The number of unsuccessful transmissions due to the loss of the Clear-to-Send signal error */ - TxMaxCollisionErrors int64 /* Maximum Collision Errors at Transmission */ - TxLateCollisionErrors int64 /* Late Collision Errors at Transmission */ - TxDeferred int64 /* The number of packets deferred for Transmission. */ - TxTimeoutErrors int64 /* Time Out Errors for Transmission */ - TxSingleCollisionCount int64 /* Count of Single Collision error at Transmission */ - TxMultipleCollisionCount int64 /* Count of Multiple Collision error at Transmission */ - RxPackets int64 /* Receive Packets on interface */ - RxBytes int64 /* Receive Bytes on interface */ - RxInterrupts int64 /* Receive Interrupts */ - RxErrors int64 /* Input errors on interface */ - RxPacketsDropped int64 /* The number of packets accepted by the device driver for transmission which were not (for any reason) given to the device. */ - RxBadPackets int64 /* Count of Bad Packets Received. */ - RxMulticastPackets int64 /* Number of MultiCast Packets Received */ - RxBroadcastPackets int64 /* Number of Broadcast Packets Received */ - RxCRCErrors int64 /* Count of Packets Received with CRC errors */ - RxDMAOverrun int64 /* Count of DMA over-runs for Data Receival. */ - RxAlignmentErrors int64 /* Packets Received with Alignment Error */ - RxNoResourceErrors int64 /* Packets Received with No Resource Errors */ - RxCollisionErrors int64 /* Packets Received with Collision errors */ - RxPacketTooShortErrors int64 /* Count of Short Packets Received. */ - RxPacketTooLongErrors int64 /* Count of Too Long Packets Received. */ - RxPacketDiscardedByAdapter int64 /* Count of Received Packets discarded by Adapter. */ - AdapterType int32 /* 0 - Physical, 1 - SEA, 2 - Virtual, 3 -HEA */ -} diff --git a/vendor/github.com/power-devops/perfstat/types_process.go b/vendor/github.com/power-devops/perfstat/types_process.go deleted file mode 100644 index 325c70b077..0000000000 --- a/vendor/github.com/power-devops/perfstat/types_process.go +++ /dev/null @@ -1,43 +0,0 @@ -package perfstat - -type Process struct { - Version int64 /* version number (1, 2, etc.,) */ - PID int64 /* Process ID */ - ProcessName string /* Name of The Process */ - Priority int32 /* Process Priority */ - NumThreads int64 /* Thread Count */ - UID int64 /* Owner Info */ - ClassID int64 /* WLM Class Name */ - Size int64 /* Virtual Size of the Process in KB(Exclusive Usage, Leaving all Shared Library Text & Shared File Pages, Shared Memory, Memory Mapped) */ - RealMemData int64 /* Real Memory used for Data in KB */ - RealMemText int64 /* Real Memory used for Text in KB */ - VirtMemData int64 /* Virtual Memory used to Data in KB */ - VirtMemText int64 /* Virtual Memory used for Text in KB */ - SharedLibDataSize int64 /* Data Size from Shared Library in KB */ - HeapSize int64 /* Heap Size in KB */ - RealInUse int64 /* The Real memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */ - VirtInUse int64 /* The Virtual memory in use(in KB) by the process including all kind of segments (excluding system segments). This includes Text, Data, Shared Library Text, Shared Library Data, File Pages, Shared Memory & Memory Mapped */ - Pinned int64 /* Pinned Memory(in KB) for this process inclusive of all segments */ - PgSpInUse int64 /* Paging Space used(in KB) inclusive of all segments */ - FilePages int64 /* File Pages used(in KB) including shared pages */ - RealInUseMap int64 /* Real memory used(in KB) for Shared Memory and Memory Mapped regions */ - VirtInUseMap int64 /* Virtual Memory used(in KB) for Shared Memory and Memory Mapped regions */ - PinnedInUseMap int64 /* Pinned memory(in KB) for Shared Memory and Memory Mapped regions */ - UCpuTime float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */ - SCpuTime float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_process_util or perfstat_process respectively. */ - LastTimeBase int64 /* Timebase Counter */ - InBytes int64 /* Bytes Read from Disk */ - OutBytes int64 /* Bytes Written to Disk */ - InOps int64 /* In Operations from Disk */ - OutOps int64 /* Out Operations from Disk */ -} - -type Thread struct { - TID int64 /* thread identifier */ - PID int64 /* process identifier */ - CpuID int64 /* processor on which I'm bound */ - UCpuTime float64 /* User Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ - SCpuTime float64 /* System Mode CPU time will be in percentage or milliseconds based on, whether it is filled by perfstat_thread_util or perfstat_thread respectively. */ - LastTimeBase int64 /* Timebase Counter */ - Version int64 -} diff --git a/vendor/github.com/power-devops/perfstat/uptime.go b/vendor/github.com/power-devops/perfstat/uptime.go deleted file mode 100644 index 8608787479..0000000000 --- a/vendor/github.com/power-devops/perfstat/uptime.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build aix -// +build aix - -package perfstat - -/* -#include "c_helpers.h" -*/ -import "C" - -import ( - "fmt" - "time" -) - -func timeSince(ts uint64) uint64 { - return uint64(time.Now().Unix()) - ts -} - -// BootTime() returns the time of the last boot in UNIX seconds -func BootTime() (uint64, error) { - sec := C.boottime() - if sec == -1 { - return 0, fmt.Errorf("Can't determine boot time") - } - return uint64(sec), nil -} - -// UptimeSeconds() calculates uptime in seconds -func UptimeSeconds() (uint64, error) { - boot, err := BootTime() - if err != nil { - return 0, err - } - return timeSince(boot), nil -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/.gitignore b/vendor/github.com/puzpuzpuz/xsync/v3/.gitignore deleted file mode 100644 index 66fd13c903..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/BENCHMARKS.md b/vendor/github.com/puzpuzpuz/xsync/v3/BENCHMARKS.md deleted file mode 100644 index aaa72fa863..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/BENCHMARKS.md +++ /dev/null @@ -1,133 +0,0 @@ -# xsync benchmarks - -If you're interested in `MapOf` comparison with some of the popular concurrent hash maps written in Go, check [this](https://github.com/cornelk/hashmap/pull/70) and [this](https://github.com/alphadose/haxmap/pull/22) PRs. - -The below results were obtained for xsync v2.3.1 on a c6g.metal EC2 instance (64 CPU, 128GB RAM) running Linux and Go 1.19.3. I'd like to thank [@felixge](https://github.com/felixge) who kindly ran the benchmarks. - -The following commands were used to run the benchmarks: -```bash -$ go test -run='^$' -cpu=1,2,4,8,16,32,64 -bench . -count=30 -timeout=0 | tee bench.txt -$ benchstat bench.txt | tee benchstat.txt -``` - -The below sections contain some of the results. Refer to [this gist](https://gist.github.com/puzpuzpuz/e62e38e06feadecfdc823c0f941ece0b) for the complete output. - -Please note that `MapOf` got a number of optimizations since v2.3.1, so the current result is likely to be different. - -### Counter vs. atomic int64 - -``` -name time/op -Counter 27.3ns ± 1% -Counter-2 27.2ns ±11% -Counter-4 15.3ns ± 8% -Counter-8 7.43ns ± 7% -Counter-16 3.70ns ±10% -Counter-32 1.77ns ± 3% -Counter-64 0.96ns ±10% -AtomicInt64 7.60ns ± 0% -AtomicInt64-2 12.6ns ±13% -AtomicInt64-4 13.5ns ±14% -AtomicInt64-8 12.7ns ± 9% -AtomicInt64-16 12.8ns ± 8% -AtomicInt64-32 13.0ns ± 6% -AtomicInt64-64 12.9ns ± 7% -``` - -Here `time/op` stands for average time spent on operation. If you divide `10^9` by the result in nanoseconds per operation, you'd get the throughput in operations per second. Thus, the ideal theoretical scalability of a concurrent data structure implies that the reported `time/op` decreases proportionally with the increased number of CPU cores. On the contrary, if the measured time per operation increases when run on more cores, it means performance degradation. - -### MapOf vs. sync.Map - -1,000 `[int, int]` entries with a warm-up, 100% Loads: -``` -IntegerMapOf_WarmUp/reads=100% 24.0ns ± 0% -IntegerMapOf_WarmUp/reads=100%-2 12.0ns ± 0% -IntegerMapOf_WarmUp/reads=100%-4 6.02ns ± 0% -IntegerMapOf_WarmUp/reads=100%-8 3.01ns ± 0% -IntegerMapOf_WarmUp/reads=100%-16 1.50ns ± 0% -IntegerMapOf_WarmUp/reads=100%-32 0.75ns ± 0% -IntegerMapOf_WarmUp/reads=100%-64 0.38ns ± 0% -IntegerMapStandard_WarmUp/reads=100% 55.3ns ± 0% -IntegerMapStandard_WarmUp/reads=100%-2 27.6ns ± 0% -IntegerMapStandard_WarmUp/reads=100%-4 16.1ns ± 3% -IntegerMapStandard_WarmUp/reads=100%-8 8.35ns ± 7% -IntegerMapStandard_WarmUp/reads=100%-16 4.24ns ± 7% -IntegerMapStandard_WarmUp/reads=100%-32 2.18ns ± 6% -IntegerMapStandard_WarmUp/reads=100%-64 1.11ns ± 3% -``` - -1,000 `[int, int]` entries with a warm-up, 99% Loads, 0.5% Stores, 0.5% Deletes: -``` -IntegerMapOf_WarmUp/reads=99% 31.0ns ± 0% -IntegerMapOf_WarmUp/reads=99%-2 16.4ns ± 1% -IntegerMapOf_WarmUp/reads=99%-4 8.42ns ± 0% -IntegerMapOf_WarmUp/reads=99%-8 4.41ns ± 0% -IntegerMapOf_WarmUp/reads=99%-16 2.38ns ± 2% -IntegerMapOf_WarmUp/reads=99%-32 1.37ns ± 4% -IntegerMapOf_WarmUp/reads=99%-64 0.85ns ± 2% -IntegerMapStandard_WarmUp/reads=99% 121ns ± 1% -IntegerMapStandard_WarmUp/reads=99%-2 109ns ± 3% -IntegerMapStandard_WarmUp/reads=99%-4 115ns ± 4% -IntegerMapStandard_WarmUp/reads=99%-8 114ns ± 2% -IntegerMapStandard_WarmUp/reads=99%-16 105ns ± 2% -IntegerMapStandard_WarmUp/reads=99%-32 97.0ns ± 3% -IntegerMapStandard_WarmUp/reads=99%-64 98.0ns ± 2% -``` - -1,000 `[int, int]` entries with a warm-up, 75% Loads, 12.5% Stores, 12.5% Deletes: -``` -IntegerMapOf_WarmUp/reads=75%-reads 46.2ns ± 1% -IntegerMapOf_WarmUp/reads=75%-reads-2 36.7ns ± 2% -IntegerMapOf_WarmUp/reads=75%-reads-4 22.0ns ± 1% -IntegerMapOf_WarmUp/reads=75%-reads-8 12.8ns ± 2% -IntegerMapOf_WarmUp/reads=75%-reads-16 7.69ns ± 1% -IntegerMapOf_WarmUp/reads=75%-reads-32 5.16ns ± 1% -IntegerMapOf_WarmUp/reads=75%-reads-64 4.91ns ± 1% -IntegerMapStandard_WarmUp/reads=75%-reads 156ns ± 0% -IntegerMapStandard_WarmUp/reads=75%-reads-2 177ns ± 1% -IntegerMapStandard_WarmUp/reads=75%-reads-4 197ns ± 1% -IntegerMapStandard_WarmUp/reads=75%-reads-8 221ns ± 2% -IntegerMapStandard_WarmUp/reads=75%-reads-16 242ns ± 1% -IntegerMapStandard_WarmUp/reads=75%-reads-32 258ns ± 1% -IntegerMapStandard_WarmUp/reads=75%-reads-64 264ns ± 1% -``` - -### MPMCQueue vs. Go channels - -Concurrent producers and consumers (1:1), queue/channel size 1,000, some work done by both producers and consumers: -``` -QueueProdConsWork100 252ns ± 0% -QueueProdConsWork100-2 206ns ± 5% -QueueProdConsWork100-4 136ns ±12% -QueueProdConsWork100-8 110ns ± 6% -QueueProdConsWork100-16 108ns ± 2% -QueueProdConsWork100-32 102ns ± 2% -QueueProdConsWork100-64 101ns ± 0% -ChanProdConsWork100 283ns ± 0% -ChanProdConsWork100-2 406ns ±21% -ChanProdConsWork100-4 549ns ± 7% -ChanProdConsWork100-8 754ns ± 7% -ChanProdConsWork100-16 828ns ± 7% -ChanProdConsWork100-32 810ns ± 8% -ChanProdConsWork100-64 832ns ± 4% -``` - -### RBMutex vs. sync.RWMutex - -The writer locks on each 100,000 iteration with some work in the critical section for both readers and the writer: -``` -RBMutexWorkWrite100000 146ns ± 0% -RBMutexWorkWrite100000-2 73.3ns ± 0% -RBMutexWorkWrite100000-4 36.7ns ± 0% -RBMutexWorkWrite100000-8 18.6ns ± 0% -RBMutexWorkWrite100000-16 9.83ns ± 3% -RBMutexWorkWrite100000-32 5.53ns ± 0% -RBMutexWorkWrite100000-64 4.04ns ± 3% -RWMutexWorkWrite100000 121ns ± 0% -RWMutexWorkWrite100000-2 128ns ± 1% -RWMutexWorkWrite100000-4 124ns ± 2% -RWMutexWorkWrite100000-8 101ns ± 1% -RWMutexWorkWrite100000-16 92.9ns ± 1% -RWMutexWorkWrite100000-32 89.9ns ± 1% -RWMutexWorkWrite100000-64 88.4ns ± 1% -``` diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/LICENSE b/vendor/github.com/puzpuzpuz/xsync/v3/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/puzpuzpuz/xsync/v3/README.md b/vendor/github.com/puzpuzpuz/xsync/v3/README.md deleted file mode 100644 index 3971553ae7..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/README.md +++ /dev/null @@ -1,195 +0,0 @@ -[![GoDoc reference](https://img.shields.io/badge/godoc-reference-blue.svg)](https://pkg.go.dev/github.com/puzpuzpuz/xsync/v3) -[![GoReport](https://goreportcard.com/badge/github.com/puzpuzpuz/xsync/v3)](https://goreportcard.com/report/github.com/puzpuzpuz/xsync/v3) -[![codecov](https://codecov.io/gh/puzpuzpuz/xsync/branch/main/graph/badge.svg)](https://codecov.io/gh/puzpuzpuz/xsync) - -# xsync - -Concurrent data structures for Go. Aims to provide more scalable alternatives for some of the data structures from the standard `sync` package, but not only. - -Covered with tests following the approach described [here](https://puzpuzpuz.dev/testing-concurrent-code-for-fun-and-profit). - -## Benchmarks - -Benchmark results may be found [here](BENCHMARKS.md). I'd like to thank [@felixge](https://github.com/felixge) who kindly ran the benchmarks on a beefy multicore machine. - -Also, a non-scientific, unfair benchmark comparing Java's [j.u.c.ConcurrentHashMap](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/concurrent/ConcurrentHashMap.html) and `xsync.MapOf` is available [here](https://puzpuzpuz.dev/concurrent-map-in-go-vs-java-yet-another-meaningless-benchmark). - -## Usage - -The latest xsync major version is v3, so `/v3` suffix should be used when importing the library: - -```go -import ( - "github.com/puzpuzpuz/xsync/v3" -) -``` - -*Note for pre-v3 users*: v1 and v2 support is discontinued, so please upgrade to v3. While the API has some breaking changes, the migration should be trivial. - -### Counter - -A `Counter` is a striped `int64` counter inspired by the `j.u.c.a.LongAdder` class from the Java standard library. - -```go -c := xsync.NewCounter() -// increment and decrement the counter -c.Inc() -c.Dec() -// read the current value -v := c.Value() -``` - -Works better in comparison with a single atomically updated `int64` counter in high contention scenarios. - -### Map - -A `Map` is like a concurrent hash table-based map. It follows the interface of `sync.Map` with a number of valuable extensions like `Compute` or `Size`. - -```go -m := xsync.NewMap() -m.Store("foo", "bar") -v, ok := m.Load("foo") -s := m.Size() -``` - -`Map` uses a modified version of Cache-Line Hash Table (CLHT) data structure: https://github.com/LPD-EPFL/CLHT - -CLHT is built around the idea of organizing the hash table in cache-line-sized buckets, so that on all modern CPUs update operations complete with minimal cache-line transfer. Also, `Get` operations are obstruction-free and involve no writes to shared memory, hence no mutexes or any other sort of locks. Due to this design, in all considered scenarios `Map` outperforms `sync.Map`. - -One important difference with `sync.Map` is that only string keys are supported. That's because Golang standard library does not expose the built-in hash functions for `interface{}` values. - -`MapOf[K, V]` is an implementation with parametrized key and value types. While it's still a CLHT-inspired hash map, `MapOf`'s design is quite different from `Map`. As a result, less GC pressure and fewer atomic operations on reads. - -```go -m := xsync.NewMapOf[string, string]() -m.Store("foo", "bar") -v, ok := m.Load("foo") -``` - -Apart from CLHT, `MapOf` borrows ideas from Java's `j.u.c.ConcurrentHashMap` (immutable K/V pair structs instead of atomic snapshots) and C++'s `absl::flat_hash_map` (meta memory and SWAR-based lookups). It also has more dense memory layout when compared with `Map`. Long story short, `MapOf` should be preferred over `Map` when possible. - -An important difference with `Map` is that `MapOf` supports arbitrary `comparable` key types: - -```go -type Point struct { - x int32 - y int32 -} -m := NewMapOf[Point, int]() -m.Store(Point{42, 42}, 42) -v, ok := m.Load(point{42, 42}) -``` - -Apart from `Range` method available for map iteration, there are also `ToPlainMap`/`ToPlainMapOf` utility functions to convert a `Map`/`MapOf` to a built-in Go's `map`: -```go -m := xsync.NewMapOf[int, int]() -m.Store(42, 42) -pm := xsync.ToPlainMapOf(m) -``` - -Both `Map` and `MapOf` use the built-in Golang's hash function which has DDOS protection. This means that each map instance gets its own seed number and the hash function uses that seed for hash code calculation. However, for smaller keys this hash function has some overhead. So, if you don't need DDOS protection, you may provide a custom hash function when creating a `MapOf`. For instance, Murmur3 finalizer does a decent job when it comes to integers: - -```go -m := NewMapOfWithHasher[int, int](func(i int, _ uint64) uint64 { - h := uint64(i) - h = (h ^ (h >> 33)) * 0xff51afd7ed558ccd - h = (h ^ (h >> 33)) * 0xc4ceb9fe1a85ec53 - return h ^ (h >> 33) -}) -``` - -When benchmarking concurrent maps, make sure to configure all of the competitors with the same hash function or, at least, take hash function performance into the consideration. - -### SPSCQueue - -A `SPSCQueue` is a bounded single-producer single-consumer concurrent queue. This means that not more than a single goroutine must be publishing items to the queue while not more than a single goroutine must be consuming those items. - -```go -q := xsync.NewSPSCQueue(1024) -// producer inserts an item into the queue -// optimistic insertion attempt; doesn't block -inserted := q.TryEnqueue("bar") -// consumer obtains an item from the queue -// optimistic obtain attempt; doesn't block -item, ok := q.TryDequeue() // interface{} pointing to a string -``` - -`SPSCQueueOf[I]` is an implementation with parametrized item type. It is available for Go 1.19 or later. - -```go -q := xsync.NewSPSCQueueOf[string](1024) -inserted := q.TryEnqueue("foo") -item, ok := q.TryDequeue() // string -``` - -The queue is based on the data structure from this [article](https://rigtorp.se/ringbuffer). The idea is to reduce the CPU cache coherency traffic by keeping cached copies of read and write indexes used by producer and consumer respectively. - -### MPMCQueue - -A `MPMCQueue` is a bounded multi-producer multi-consumer concurrent queue. - -```go -q := xsync.NewMPMCQueue(1024) -// producer optimistically inserts an item into the queue -// optimistic insertion attempt; doesn't block -inserted := q.TryEnqueue("bar") -// consumer obtains an item from the queue -// optimistic obtain attempt; doesn't block -item, ok := q.TryDequeue() // interface{} pointing to a string -``` - -`MPMCQueueOf[I]` is an implementation with parametrized item type. It is available for Go 1.19 or later. - -```go -q := xsync.NewMPMCQueueOf[string](1024) -inserted := q.TryEnqueue("foo") -item, ok := q.TryDequeue() // string -``` - -The queue is based on the algorithm from the [MPMCQueue](https://github.com/rigtorp/MPMCQueue) C++ library which in its turn references D.Vyukov's [MPMC queue](https://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue). According to the following [classification](https://www.1024cores.net/home/lock-free-algorithms/queues), the queue is array-based, fails on overflow, provides causal FIFO, has blocking producers and consumers. - -The idea of the algorithm is to allow parallelism for concurrent producers and consumers by introducing the notion of tickets, i.e. values of two counters, one per producers/consumers. An atomic increment of one of those counters is the only noticeable contention point in queue operations. The rest of the operation avoids contention on writes thanks to the turn-based read/write access for each of the queue items. - -In essence, `MPMCQueue` is a specialized queue for scenarios where there are multiple concurrent producers and consumers of a single queue running on a large multicore machine. - -To get the optimal performance, you may want to set the queue size to be large enough, say, an order of magnitude greater than the number of producers/consumers, to allow producers and consumers to progress with their queue operations in parallel most of the time. - -### RBMutex - -A `RBMutex` is a reader-biased reader/writer mutual exclusion lock. The lock can be held by many readers or a single writer. - -```go -mu := xsync.NewRBMutex() -// reader lock calls return a token -t := mu.RLock() -// the token must be later used to unlock the mutex -mu.RUnlock(t) -// writer locks are the same as in sync.RWMutex -mu.Lock() -mu.Unlock() -``` - -`RBMutex` is based on a modified version of BRAVO (Biased Locking for Reader-Writer Locks) algorithm: https://arxiv.org/pdf/1810.01553.pdf - -The idea of the algorithm is to build on top of an existing reader-writer mutex and introduce a fast path for readers. On the fast path, reader lock attempts are sharded over an internal array based on the reader identity (a token in the case of Golang). This means that readers do not contend over a single atomic counter like it's done in, say, `sync.RWMutex` allowing for better scalability in terms of cores. - -Hence, by the design `RBMutex` is a specialized mutex for scenarios, such as caches, where the vast majority of locks are acquired by readers and write lock acquire attempts are infrequent. In such scenarios, `RBMutex` should perform better than the `sync.RWMutex` on large multicore machines. - -`RBMutex` extends `sync.RWMutex` internally and uses it as the "reader bias disabled" fallback, so the same semantics apply. The only noticeable difference is in the reader tokens returned from the `RLock`/`RUnlock` methods. - -Apart from blocking methods, `RBMutex` also has methods for optimistic locking: -```go -mu := xsync.NewRBMutex() -if locked, t := mu.TryRLock(); locked { - // critical reader section... - mu.RUnlock(t) -} -if mu.TryLock() { - // critical writer section... - mu.Unlock() -} -``` - -## License - -Licensed under MIT. diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/counter.go b/vendor/github.com/puzpuzpuz/xsync/v3/counter.go deleted file mode 100644 index 4d4dc87d21..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/counter.go +++ /dev/null @@ -1,99 +0,0 @@ -package xsync - -import ( - "sync" - "sync/atomic" -) - -// pool for P tokens -var ptokenPool sync.Pool - -// a P token is used to point at the current OS thread (P) -// on which the goroutine is run; exact identity of the thread, -// as well as P migration tolerance, is not important since -// it's used to as a best effort mechanism for assigning -// concurrent operations (goroutines) to different stripes of -// the counter -type ptoken struct { - idx uint32 - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - 4]byte -} - -// A Counter is a striped int64 counter. -// -// Should be preferred over a single atomically updated int64 -// counter in high contention scenarios. -// -// A Counter must not be copied after first use. -type Counter struct { - stripes []cstripe - mask uint32 -} - -type cstripe struct { - c int64 - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - 8]byte -} - -// NewCounter creates a new Counter instance. -func NewCounter() *Counter { - nstripes := nextPowOf2(parallelism()) - c := Counter{ - stripes: make([]cstripe, nstripes), - mask: nstripes - 1, - } - return &c -} - -// Inc increments the counter by 1. -func (c *Counter) Inc() { - c.Add(1) -} - -// Dec decrements the counter by 1. -func (c *Counter) Dec() { - c.Add(-1) -} - -// Add adds the delta to the counter. -func (c *Counter) Add(delta int64) { - t, ok := ptokenPool.Get().(*ptoken) - if !ok { - t = new(ptoken) - t.idx = runtime_fastrand() - } - for { - stripe := &c.stripes[t.idx&c.mask] - cnt := atomic.LoadInt64(&stripe.c) - if atomic.CompareAndSwapInt64(&stripe.c, cnt, cnt+delta) { - break - } - // Give a try with another randomly selected stripe. - t.idx = runtime_fastrand() - } - ptokenPool.Put(t) -} - -// Value returns the current counter value. -// The returned value may not include all of the latest operations in -// presence of concurrent modifications of the counter. -func (c *Counter) Value() int64 { - v := int64(0) - for i := 0; i < len(c.stripes); i++ { - stripe := &c.stripes[i] - v += atomic.LoadInt64(&stripe.c) - } - return v -} - -// Reset resets the counter to zero. -// This method should only be used when it is known that there are -// no concurrent modifications of the counter. -func (c *Counter) Reset() { - for i := 0; i < len(c.stripes); i++ { - stripe := &c.stripes[i] - atomic.StoreInt64(&stripe.c, 0) - } -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/map.go b/vendor/github.com/puzpuzpuz/xsync/v3/map.go deleted file mode 100644 index c7837e90b9..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/map.go +++ /dev/null @@ -1,917 +0,0 @@ -package xsync - -import ( - "fmt" - "math" - "runtime" - "strings" - "sync" - "sync/atomic" - "unsafe" -) - -type mapResizeHint int - -const ( - mapGrowHint mapResizeHint = 0 - mapShrinkHint mapResizeHint = 1 - mapClearHint mapResizeHint = 2 -) - -const ( - // number of Map entries per bucket; 3 entries lead to size of 64B - // (one cache line) on 64-bit machines - entriesPerMapBucket = 3 - // threshold fraction of table occupation to start a table shrinking - // when deleting the last entry in a bucket chain - mapShrinkFraction = 128 - // map load factor to trigger a table resize during insertion; - // a map holds up to mapLoadFactor*entriesPerMapBucket*mapTableLen - // key-value pairs (this is a soft limit) - mapLoadFactor = 0.75 - // minimal table size, i.e. number of buckets; thus, minimal map - // capacity can be calculated as entriesPerMapBucket*defaultMinMapTableLen - defaultMinMapTableLen = 32 - // minimum counter stripes to use - minMapCounterLen = 8 - // maximum counter stripes to use; stands for around 4KB of memory - maxMapCounterLen = 32 -) - -var ( - topHashMask = uint64((1<<20)-1) << 44 - topHashEntryMasks = [3]uint64{ - topHashMask, - topHashMask >> 20, - topHashMask >> 40, - } -) - -// Map is like a Go map[string]interface{} but is safe for concurrent -// use by multiple goroutines without additional locking or -// coordination. It follows the interface of sync.Map with -// a number of valuable extensions like Compute or Size. -// -// A Map must not be copied after first use. -// -// Map uses a modified version of Cache-Line Hash Table (CLHT) -// data structure: https://github.com/LPD-EPFL/CLHT -// -// CLHT is built around idea to organize the hash table in -// cache-line-sized buckets, so that on all modern CPUs update -// operations complete with at most one cache-line transfer. -// Also, Get operations involve no write to memory, as well as no -// mutexes or any other sort of locks. Due to this design, in all -// considered scenarios Map outperforms sync.Map. -// -// One important difference with sync.Map is that only string keys -// are supported. That's because Golang standard library does not -// expose the built-in hash functions for interface{} values. -type Map struct { - totalGrowths int64 - totalShrinks int64 - resizing int64 // resize in progress flag; updated atomically - resizeMu sync.Mutex // only used along with resizeCond - resizeCond sync.Cond // used to wake up resize waiters (concurrent modifications) - table unsafe.Pointer // *mapTable - minTableLen int - growOnly bool -} - -type mapTable struct { - buckets []bucketPadded - // striped counter for number of table entries; - // used to determine if a table shrinking is needed - // occupies min(buckets_memory/1024, 64KB) of memory - size []counterStripe - seed uint64 -} - -type counterStripe struct { - c int64 - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - 8]byte -} - -type bucketPadded struct { - //lint:ignore U1000 ensure each bucket takes two cache lines on both 32 and 64-bit archs - pad [cacheLineSize - unsafe.Sizeof(bucket{})]byte - bucket -} - -type bucket struct { - next unsafe.Pointer // *bucketPadded - keys [entriesPerMapBucket]unsafe.Pointer - values [entriesPerMapBucket]unsafe.Pointer - // topHashMutex is a 2-in-1 value. - // - // It contains packed top 20 bits (20 MSBs) of hash codes for keys - // stored in the bucket: - // | key 0's top hash | key 1's top hash | key 2's top hash | bitmap for keys | mutex | - // | 20 bits | 20 bits | 20 bits | 3 bits | 1 bit | - // - // The least significant bit is used for the mutex (TTAS spinlock). - topHashMutex uint64 -} - -type rangeEntry struct { - key unsafe.Pointer - value unsafe.Pointer -} - -// MapConfig defines configurable Map/MapOf options. -type MapConfig struct { - sizeHint int - growOnly bool -} - -// WithPresize configures new Map/MapOf instance with capacity enough -// to hold sizeHint entries. The capacity is treated as the minimal -// capacity meaning that the underlying hash table will never shrink -// to a smaller capacity. If sizeHint is zero or negative, the value -// is ignored. -func WithPresize(sizeHint int) func(*MapConfig) { - return func(c *MapConfig) { - c.sizeHint = sizeHint - } -} - -// WithGrowOnly configures new Map/MapOf instance to be grow-only. -// This means that the underlying hash table grows in capacity when -// new keys are added, but does not shrink when keys are deleted. -// The only exception to this rule is the Clear method which -// shrinks the hash table back to the initial capacity. -func WithGrowOnly() func(*MapConfig) { - return func(c *MapConfig) { - c.growOnly = true - } -} - -// NewMap creates a new Map instance configured with the given -// options. -func NewMap(options ...func(*MapConfig)) *Map { - c := &MapConfig{ - sizeHint: defaultMinMapTableLen * entriesPerMapBucket, - } - for _, o := range options { - o(c) - } - - m := &Map{} - m.resizeCond = *sync.NewCond(&m.resizeMu) - var table *mapTable - if c.sizeHint <= defaultMinMapTableLen*entriesPerMapBucket { - table = newMapTable(defaultMinMapTableLen) - } else { - tableLen := nextPowOf2(uint32((float64(c.sizeHint) / entriesPerMapBucket) / mapLoadFactor)) - table = newMapTable(int(tableLen)) - } - m.minTableLen = len(table.buckets) - m.growOnly = c.growOnly - atomic.StorePointer(&m.table, unsafe.Pointer(table)) - return m -} - -// NewMapPresized creates a new Map instance with capacity enough to hold -// sizeHint entries. The capacity is treated as the minimal capacity -// meaning that the underlying hash table will never shrink to -// a smaller capacity. If sizeHint is zero or negative, the value -// is ignored. -// -// Deprecated: use NewMap in combination with WithPresize. -func NewMapPresized(sizeHint int) *Map { - return NewMap(WithPresize(sizeHint)) -} - -func newMapTable(minTableLen int) *mapTable { - buckets := make([]bucketPadded, minTableLen) - counterLen := minTableLen >> 10 - if counterLen < minMapCounterLen { - counterLen = minMapCounterLen - } else if counterLen > maxMapCounterLen { - counterLen = maxMapCounterLen - } - counter := make([]counterStripe, counterLen) - t := &mapTable{ - buckets: buckets, - size: counter, - seed: makeSeed(), - } - return t -} - -// ToPlainMap returns a native map with a copy of xsync Map's -// contents. The copied xsync Map should not be modified while -// this call is made. If the copied Map is modified, the copying -// behavior is the same as in the Range method. -func ToPlainMap(m *Map) map[string]interface{} { - pm := make(map[string]interface{}) - if m != nil { - m.Range(func(key string, value interface{}) bool { - pm[key] = value - return true - }) - } - return pm -} - -// Load returns the value stored in the map for a key, or nil if no -// value is present. -// The ok result indicates whether value was found in the map. -func (m *Map) Load(key string) (value interface{}, ok bool) { - table := (*mapTable)(atomic.LoadPointer(&m.table)) - hash := hashString(key, table.seed) - bidx := uint64(len(table.buckets)-1) & hash - b := &table.buckets[bidx] - for { - topHashes := atomic.LoadUint64(&b.topHashMutex) - for i := 0; i < entriesPerMapBucket; i++ { - if !topHashMatch(hash, topHashes, i) { - continue - } - atomic_snapshot: - // Start atomic snapshot. - vp := atomic.LoadPointer(&b.values[i]) - kp := atomic.LoadPointer(&b.keys[i]) - if kp != nil && vp != nil { - if key == derefKey(kp) { - if uintptr(vp) == uintptr(atomic.LoadPointer(&b.values[i])) { - // Atomic snapshot succeeded. - return derefValue(vp), true - } - // Concurrent update/remove. Go for another spin. - goto atomic_snapshot - } - } - } - bptr := atomic.LoadPointer(&b.next) - if bptr == nil { - return - } - b = (*bucketPadded)(bptr) - } -} - -// Store sets the value for a key. -func (m *Map) Store(key string, value interface{}) { - m.doCompute( - key, - func(interface{}, bool) (interface{}, bool) { - return value, false - }, - false, - false, - ) -} - -// LoadOrStore returns the existing value for the key if present. -// Otherwise, it stores and returns the given value. -// The loaded result is true if the value was loaded, false if stored. -func (m *Map) LoadOrStore(key string, value interface{}) (actual interface{}, loaded bool) { - return m.doCompute( - key, - func(interface{}, bool) (interface{}, bool) { - return value, false - }, - true, - false, - ) -} - -// LoadAndStore returns the existing value for the key if present, -// while setting the new value for the key. -// It stores the new value and returns the existing one, if present. -// The loaded result is true if the existing value was loaded, -// false otherwise. -func (m *Map) LoadAndStore(key string, value interface{}) (actual interface{}, loaded bool) { - return m.doCompute( - key, - func(interface{}, bool) (interface{}, bool) { - return value, false - }, - false, - false, - ) -} - -// LoadOrCompute returns the existing value for the key if present. -// Otherwise, it computes the value using the provided function, and -// then stores and returns the computed value. The loaded result is -// true if the value was loaded, false if computed. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *Map) LoadOrCompute(key string, valueFn func() interface{}) (actual interface{}, loaded bool) { - return m.doCompute( - key, - func(interface{}, bool) (interface{}, bool) { - return valueFn(), false - }, - true, - false, - ) -} - -// LoadOrTryCompute returns the existing value for the key if present. -// Otherwise, it tries to compute the value using the provided function -// and, if successful, stores and returns the computed value. The loaded -// result is true if the value was loaded, or false if computed (whether -// successfully or not). If the compute attempt was cancelled (due to an -// error, for example), a nil value will be returned. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *Map) LoadOrTryCompute( - key string, - valueFn func() (newValue interface{}, cancel bool), -) (value interface{}, loaded bool) { - return m.doCompute( - key, - func(interface{}, bool) (interface{}, bool) { - nv, c := valueFn() - if !c { - return nv, false - } - return nil, true - }, - true, - false, - ) -} - -// Compute either sets the computed new value for the key or deletes -// the value for the key. When the delete result of the valueFn function -// is set to true, the value will be deleted, if it exists. When delete -// is set to false, the value is updated to the newValue. -// The ok result indicates whether value was computed and stored, thus, is -// present in the map. The actual result contains the new value in cases where -// the value was computed and stored. See the example for a few use cases. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *Map) Compute( - key string, - valueFn func(oldValue interface{}, loaded bool) (newValue interface{}, delete bool), -) (actual interface{}, ok bool) { - return m.doCompute(key, valueFn, false, true) -} - -// LoadAndDelete deletes the value for a key, returning the previous -// value if any. The loaded result reports whether the key was -// present. -func (m *Map) LoadAndDelete(key string) (value interface{}, loaded bool) { - return m.doCompute( - key, - func(value interface{}, loaded bool) (interface{}, bool) { - return value, true - }, - false, - false, - ) -} - -// Delete deletes the value for a key. -func (m *Map) Delete(key string) { - m.doCompute( - key, - func(value interface{}, loaded bool) (interface{}, bool) { - return value, true - }, - false, - false, - ) -} - -func (m *Map) doCompute( - key string, - valueFn func(oldValue interface{}, loaded bool) (interface{}, bool), - loadIfExists, computeOnly bool, -) (interface{}, bool) { - // Read-only path. - if loadIfExists { - if v, ok := m.Load(key); ok { - return v, !computeOnly - } - } - // Write path. - for { - compute_attempt: - var ( - emptyb *bucketPadded - emptyidx int - hintNonEmpty int - ) - table := (*mapTable)(atomic.LoadPointer(&m.table)) - tableLen := len(table.buckets) - hash := hashString(key, table.seed) - bidx := uint64(len(table.buckets)-1) & hash - rootb := &table.buckets[bidx] - lockBucket(&rootb.topHashMutex) - // The following two checks must go in reverse to what's - // in the resize method. - if m.resizeInProgress() { - // Resize is in progress. Wait, then go for another attempt. - unlockBucket(&rootb.topHashMutex) - m.waitForResize() - goto compute_attempt - } - if m.newerTableExists(table) { - // Someone resized the table. Go for another attempt. - unlockBucket(&rootb.topHashMutex) - goto compute_attempt - } - b := rootb - for { - topHashes := atomic.LoadUint64(&b.topHashMutex) - for i := 0; i < entriesPerMapBucket; i++ { - if b.keys[i] == nil { - if emptyb == nil { - emptyb = b - emptyidx = i - } - continue - } - if !topHashMatch(hash, topHashes, i) { - hintNonEmpty++ - continue - } - if key == derefKey(b.keys[i]) { - vp := b.values[i] - if loadIfExists { - unlockBucket(&rootb.topHashMutex) - return derefValue(vp), !computeOnly - } - // In-place update/delete. - // We get a copy of the value via an interface{} on each call, - // thus the live value pointers are unique. Otherwise atomic - // snapshot won't be correct in case of multiple Store calls - // using the same value. - oldValue := derefValue(vp) - newValue, del := valueFn(oldValue, true) - if del { - // Deletion. - // First we update the value, then the key. - // This is important for atomic snapshot states. - atomic.StoreUint64(&b.topHashMutex, eraseTopHash(topHashes, i)) - atomic.StorePointer(&b.values[i], nil) - atomic.StorePointer(&b.keys[i], nil) - leftEmpty := false - if hintNonEmpty == 0 { - leftEmpty = isEmptyBucket(b) - } - unlockBucket(&rootb.topHashMutex) - table.addSize(bidx, -1) - // Might need to shrink the table. - if leftEmpty { - m.resize(table, mapShrinkHint) - } - return oldValue, !computeOnly - } - nvp := unsafe.Pointer(&newValue) - if assertionsEnabled && vp == nvp { - panic("non-unique value pointer") - } - atomic.StorePointer(&b.values[i], nvp) - unlockBucket(&rootb.topHashMutex) - if computeOnly { - // Compute expects the new value to be returned. - return newValue, true - } - // LoadAndStore expects the old value to be returned. - return oldValue, true - } - hintNonEmpty++ - } - if b.next == nil { - if emptyb != nil { - // Insertion into an existing bucket. - var zeroV interface{} - newValue, del := valueFn(zeroV, false) - if del { - unlockBucket(&rootb.topHashMutex) - return zeroV, false - } - // First we update the value, then the key. - // This is important for atomic snapshot states. - topHashes = atomic.LoadUint64(&emptyb.topHashMutex) - atomic.StoreUint64(&emptyb.topHashMutex, storeTopHash(hash, topHashes, emptyidx)) - atomic.StorePointer(&emptyb.values[emptyidx], unsafe.Pointer(&newValue)) - atomic.StorePointer(&emptyb.keys[emptyidx], unsafe.Pointer(&key)) - unlockBucket(&rootb.topHashMutex) - table.addSize(bidx, 1) - return newValue, computeOnly - } - growThreshold := float64(tableLen) * entriesPerMapBucket * mapLoadFactor - if table.sumSize() > int64(growThreshold) { - // Need to grow the table. Then go for another attempt. - unlockBucket(&rootb.topHashMutex) - m.resize(table, mapGrowHint) - goto compute_attempt - } - // Insertion into a new bucket. - var zeroV interface{} - newValue, del := valueFn(zeroV, false) - if del { - unlockBucket(&rootb.topHashMutex) - return newValue, false - } - // Create and append a bucket. - newb := new(bucketPadded) - newb.keys[0] = unsafe.Pointer(&key) - newb.values[0] = unsafe.Pointer(&newValue) - newb.topHashMutex = storeTopHash(hash, newb.topHashMutex, 0) - atomic.StorePointer(&b.next, unsafe.Pointer(newb)) - unlockBucket(&rootb.topHashMutex) - table.addSize(bidx, 1) - return newValue, computeOnly - } - b = (*bucketPadded)(b.next) - } - } -} - -func (m *Map) newerTableExists(table *mapTable) bool { - curTablePtr := atomic.LoadPointer(&m.table) - return uintptr(curTablePtr) != uintptr(unsafe.Pointer(table)) -} - -func (m *Map) resizeInProgress() bool { - return atomic.LoadInt64(&m.resizing) == 1 -} - -func (m *Map) waitForResize() { - m.resizeMu.Lock() - for m.resizeInProgress() { - m.resizeCond.Wait() - } - m.resizeMu.Unlock() -} - -func (m *Map) resize(knownTable *mapTable, hint mapResizeHint) { - knownTableLen := len(knownTable.buckets) - // Fast path for shrink attempts. - if hint == mapShrinkHint { - if m.growOnly || - m.minTableLen == knownTableLen || - knownTable.sumSize() > int64((knownTableLen*entriesPerMapBucket)/mapShrinkFraction) { - return - } - } - // Slow path. - if !atomic.CompareAndSwapInt64(&m.resizing, 0, 1) { - // Someone else started resize. Wait for it to finish. - m.waitForResize() - return - } - var newTable *mapTable - table := (*mapTable)(atomic.LoadPointer(&m.table)) - tableLen := len(table.buckets) - switch hint { - case mapGrowHint: - // Grow the table with factor of 2. - atomic.AddInt64(&m.totalGrowths, 1) - newTable = newMapTable(tableLen << 1) - case mapShrinkHint: - shrinkThreshold := int64((tableLen * entriesPerMapBucket) / mapShrinkFraction) - if tableLen > m.minTableLen && table.sumSize() <= shrinkThreshold { - // Shrink the table with factor of 2. - atomic.AddInt64(&m.totalShrinks, 1) - newTable = newMapTable(tableLen >> 1) - } else { - // No need to shrink. Wake up all waiters and give up. - m.resizeMu.Lock() - atomic.StoreInt64(&m.resizing, 0) - m.resizeCond.Broadcast() - m.resizeMu.Unlock() - return - } - case mapClearHint: - newTable = newMapTable(m.minTableLen) - default: - panic(fmt.Sprintf("unexpected resize hint: %d", hint)) - } - // Copy the data only if we're not clearing the map. - if hint != mapClearHint { - for i := 0; i < tableLen; i++ { - copied := copyBucket(&table.buckets[i], newTable) - newTable.addSizePlain(uint64(i), copied) - } - } - // Publish the new table and wake up all waiters. - atomic.StorePointer(&m.table, unsafe.Pointer(newTable)) - m.resizeMu.Lock() - atomic.StoreInt64(&m.resizing, 0) - m.resizeCond.Broadcast() - m.resizeMu.Unlock() -} - -func copyBucket(b *bucketPadded, destTable *mapTable) (copied int) { - rootb := b - lockBucket(&rootb.topHashMutex) - for { - for i := 0; i < entriesPerMapBucket; i++ { - if b.keys[i] != nil { - k := derefKey(b.keys[i]) - hash := hashString(k, destTable.seed) - bidx := uint64(len(destTable.buckets)-1) & hash - destb := &destTable.buckets[bidx] - appendToBucket(hash, b.keys[i], b.values[i], destb) - copied++ - } - } - if b.next == nil { - unlockBucket(&rootb.topHashMutex) - return - } - b = (*bucketPadded)(b.next) - } -} - -func appendToBucket(hash uint64, keyPtr, valPtr unsafe.Pointer, b *bucketPadded) { - for { - for i := 0; i < entriesPerMapBucket; i++ { - if b.keys[i] == nil { - b.keys[i] = keyPtr - b.values[i] = valPtr - b.topHashMutex = storeTopHash(hash, b.topHashMutex, i) - return - } - } - if b.next == nil { - newb := new(bucketPadded) - newb.keys[0] = keyPtr - newb.values[0] = valPtr - newb.topHashMutex = storeTopHash(hash, newb.topHashMutex, 0) - b.next = unsafe.Pointer(newb) - return - } - b = (*bucketPadded)(b.next) - } -} - -func isEmptyBucket(rootb *bucketPadded) bool { - b := rootb - for { - for i := 0; i < entriesPerMapBucket; i++ { - if b.keys[i] != nil { - return false - } - } - if b.next == nil { - return true - } - b = (*bucketPadded)(b.next) - } -} - -// Range calls f sequentially for each key and value present in the -// map. If f returns false, range stops the iteration. -// -// Range does not necessarily correspond to any consistent snapshot -// of the Map's contents: no key will be visited more than once, but -// if the value for any key is stored or deleted concurrently, Range -// may reflect any mapping for that key from any point during the -// Range call. -// -// It is safe to modify the map while iterating it, including entry -// creation, modification and deletion. However, the concurrent -// modification rule apply, i.e. the changes may be not reflected -// in the subsequently iterated entries. -func (m *Map) Range(f func(key string, value interface{}) bool) { - var zeroEntry rangeEntry - // Pre-allocate array big enough to fit entries for most hash tables. - bentries := make([]rangeEntry, 0, 16*entriesPerMapBucket) - tablep := atomic.LoadPointer(&m.table) - table := *(*mapTable)(tablep) - for i := range table.buckets { - rootb := &table.buckets[i] - b := rootb - // Prevent concurrent modifications and copy all entries into - // the intermediate slice. - lockBucket(&rootb.topHashMutex) - for { - for i := 0; i < entriesPerMapBucket; i++ { - if b.keys[i] != nil { - bentries = append(bentries, rangeEntry{ - key: b.keys[i], - value: b.values[i], - }) - } - } - if b.next == nil { - unlockBucket(&rootb.topHashMutex) - break - } - b = (*bucketPadded)(b.next) - } - // Call the function for all copied entries. - for j := range bentries { - k := derefKey(bentries[j].key) - v := derefValue(bentries[j].value) - if !f(k, v) { - return - } - // Remove the reference to avoid preventing the copied - // entries from being GCed until this method finishes. - bentries[j] = zeroEntry - } - bentries = bentries[:0] - } -} - -// Clear deletes all keys and values currently stored in the map. -func (m *Map) Clear() { - table := (*mapTable)(atomic.LoadPointer(&m.table)) - m.resize(table, mapClearHint) -} - -// Size returns current size of the map. -func (m *Map) Size() int { - table := (*mapTable)(atomic.LoadPointer(&m.table)) - return int(table.sumSize()) -} - -func derefKey(keyPtr unsafe.Pointer) string { - return *(*string)(keyPtr) -} - -func derefValue(valuePtr unsafe.Pointer) interface{} { - return *(*interface{})(valuePtr) -} - -func lockBucket(mu *uint64) { - for { - var v uint64 - for { - v = atomic.LoadUint64(mu) - if v&1 != 1 { - break - } - runtime.Gosched() - } - if atomic.CompareAndSwapUint64(mu, v, v|1) { - return - } - runtime.Gosched() - } -} - -func unlockBucket(mu *uint64) { - v := atomic.LoadUint64(mu) - atomic.StoreUint64(mu, v&^1) -} - -func topHashMatch(hash, topHashes uint64, idx int) bool { - if topHashes&(1<<(idx+1)) == 0 { - // Entry is not present. - return false - } - hash = hash & topHashMask - topHashes = (topHashes & topHashEntryMasks[idx]) << (20 * idx) - return hash == topHashes -} - -func storeTopHash(hash, topHashes uint64, idx int) uint64 { - // Zero out top hash at idx. - topHashes = topHashes &^ topHashEntryMasks[idx] - // Chop top 20 MSBs of the given hash and position them at idx. - hash = (hash & topHashMask) >> (20 * idx) - // Store the MSBs. - topHashes = topHashes | hash - // Mark the entry as present. - return topHashes | (1 << (idx + 1)) -} - -func eraseTopHash(topHashes uint64, idx int) uint64 { - return topHashes &^ (1 << (idx + 1)) -} - -func (table *mapTable) addSize(bucketIdx uint64, delta int) { - cidx := uint64(len(table.size)-1) & bucketIdx - atomic.AddInt64(&table.size[cidx].c, int64(delta)) -} - -func (table *mapTable) addSizePlain(bucketIdx uint64, delta int) { - cidx := uint64(len(table.size)-1) & bucketIdx - table.size[cidx].c += int64(delta) -} - -func (table *mapTable) sumSize() int64 { - sum := int64(0) - for i := range table.size { - sum += atomic.LoadInt64(&table.size[i].c) - } - return sum -} - -// MapStats is Map/MapOf statistics. -// -// Warning: map statistics are intented to be used for diagnostic -// purposes, not for production code. This means that breaking changes -// may be introduced into this struct even between minor releases. -type MapStats struct { - // RootBuckets is the number of root buckets in the hash table. - // Each bucket holds a few entries. - RootBuckets int - // TotalBuckets is the total number of buckets in the hash table, - // including root and their chained buckets. Each bucket holds - // a few entries. - TotalBuckets int - // EmptyBuckets is the number of buckets that hold no entries. - EmptyBuckets int - // Capacity is the Map/MapOf capacity, i.e. the total number of - // entries that all buckets can physically hold. This number - // does not consider the load factor. - Capacity int - // Size is the exact number of entries stored in the map. - Size int - // Counter is the number of entries stored in the map according - // to the internal atomic counter. In case of concurrent map - // modifications this number may be different from Size. - Counter int - // CounterLen is the number of internal atomic counter stripes. - // This number may grow with the map capacity to improve - // multithreaded scalability. - CounterLen int - // MinEntries is the minimum number of entries per a chain of - // buckets, i.e. a root bucket and its chained buckets. - MinEntries int - // MinEntries is the maximum number of entries per a chain of - // buckets, i.e. a root bucket and its chained buckets. - MaxEntries int - // TotalGrowths is the number of times the hash table grew. - TotalGrowths int64 - // TotalGrowths is the number of times the hash table shrinked. - TotalShrinks int64 -} - -// ToString returns string representation of map stats. -func (s *MapStats) ToString() string { - var sb strings.Builder - sb.WriteString("MapStats{\n") - sb.WriteString(fmt.Sprintf("RootBuckets: %d\n", s.RootBuckets)) - sb.WriteString(fmt.Sprintf("TotalBuckets: %d\n", s.TotalBuckets)) - sb.WriteString(fmt.Sprintf("EmptyBuckets: %d\n", s.EmptyBuckets)) - sb.WriteString(fmt.Sprintf("Capacity: %d\n", s.Capacity)) - sb.WriteString(fmt.Sprintf("Size: %d\n", s.Size)) - sb.WriteString(fmt.Sprintf("Counter: %d\n", s.Counter)) - sb.WriteString(fmt.Sprintf("CounterLen: %d\n", s.CounterLen)) - sb.WriteString(fmt.Sprintf("MinEntries: %d\n", s.MinEntries)) - sb.WriteString(fmt.Sprintf("MaxEntries: %d\n", s.MaxEntries)) - sb.WriteString(fmt.Sprintf("TotalGrowths: %d\n", s.TotalGrowths)) - sb.WriteString(fmt.Sprintf("TotalShrinks: %d\n", s.TotalShrinks)) - sb.WriteString("}\n") - return sb.String() -} - -// Stats returns statistics for the Map. Just like other map -// methods, this one is thread-safe. Yet it's an O(N) operation, -// so it should be used only for diagnostics or debugging purposes. -func (m *Map) Stats() MapStats { - stats := MapStats{ - TotalGrowths: atomic.LoadInt64(&m.totalGrowths), - TotalShrinks: atomic.LoadInt64(&m.totalShrinks), - MinEntries: math.MaxInt32, - } - table := (*mapTable)(atomic.LoadPointer(&m.table)) - stats.RootBuckets = len(table.buckets) - stats.Counter = int(table.sumSize()) - stats.CounterLen = len(table.size) - for i := range table.buckets { - nentries := 0 - b := &table.buckets[i] - stats.TotalBuckets++ - for { - nentriesLocal := 0 - stats.Capacity += entriesPerMapBucket - for i := 0; i < entriesPerMapBucket; i++ { - if atomic.LoadPointer(&b.keys[i]) != nil { - stats.Size++ - nentriesLocal++ - } - } - nentries += nentriesLocal - if nentriesLocal == 0 { - stats.EmptyBuckets++ - } - if b.next == nil { - break - } - b = (*bucketPadded)(atomic.LoadPointer(&b.next)) - stats.TotalBuckets++ - } - if nentries < stats.MinEntries { - stats.MinEntries = nentries - } - if nentries > stats.MaxEntries { - stats.MaxEntries = nentries - } - } - return stats -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/mapof.go b/vendor/github.com/puzpuzpuz/xsync/v3/mapof.go deleted file mode 100644 index d1ce9b2e2d..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/mapof.go +++ /dev/null @@ -1,738 +0,0 @@ -package xsync - -import ( - "fmt" - "math" - "sync" - "sync/atomic" - "unsafe" -) - -const ( - // number of MapOf entries per bucket; 5 entries lead to size of 64B - // (one cache line) on 64-bit machines - entriesPerMapOfBucket = 5 - defaultMeta uint64 = 0x8080808080808080 - metaMask uint64 = 0xffffffffff - defaultMetaMasked uint64 = defaultMeta & metaMask - emptyMetaSlot uint8 = 0x80 -) - -// MapOf is like a Go map[K]V but is safe for concurrent -// use by multiple goroutines without additional locking or -// coordination. It follows the interface of sync.Map with -// a number of valuable extensions like Compute or Size. -// -// A MapOf must not be copied after first use. -// -// MapOf uses a modified version of Cache-Line Hash Table (CLHT) -// data structure: https://github.com/LPD-EPFL/CLHT -// -// CLHT is built around idea to organize the hash table in -// cache-line-sized buckets, so that on all modern CPUs update -// operations complete with at most one cache-line transfer. -// Also, Get operations involve no write to memory, as well as no -// mutexes or any other sort of locks. Due to this design, in all -// considered scenarios MapOf outperforms sync.Map. -// -// MapOf also borrows ideas from Java's j.u.c.ConcurrentHashMap -// (immutable K/V pair structs instead of atomic snapshots) -// and C++'s absl::flat_hash_map (meta memory and SWAR-based -// lookups). -type MapOf[K comparable, V any] struct { - totalGrowths int64 - totalShrinks int64 - resizing int64 // resize in progress flag; updated atomically - resizeMu sync.Mutex // only used along with resizeCond - resizeCond sync.Cond // used to wake up resize waiters (concurrent modifications) - table unsafe.Pointer // *mapOfTable - hasher func(K, uint64) uint64 - minTableLen int - growOnly bool -} - -type mapOfTable[K comparable, V any] struct { - buckets []bucketOfPadded - // striped counter for number of table entries; - // used to determine if a table shrinking is needed - // occupies min(buckets_memory/1024, 64KB) of memory - size []counterStripe - seed uint64 -} - -// bucketOfPadded is a CL-sized map bucket holding up to -// entriesPerMapOfBucket entries. -type bucketOfPadded struct { - //lint:ignore U1000 ensure each bucket takes two cache lines on both 32 and 64-bit archs - pad [cacheLineSize - unsafe.Sizeof(bucketOf{})]byte - bucketOf -} - -type bucketOf struct { - meta uint64 - entries [entriesPerMapOfBucket]unsafe.Pointer // *entryOf - next unsafe.Pointer // *bucketOfPadded - mu sync.Mutex -} - -// entryOf is an immutable map entry. -type entryOf[K comparable, V any] struct { - key K - value V -} - -// NewMapOf creates a new MapOf instance configured with the given -// options. -func NewMapOf[K comparable, V any](options ...func(*MapConfig)) *MapOf[K, V] { - return NewMapOfWithHasher[K, V](defaultHasher[K](), options...) -} - -// NewMapOfWithHasher creates a new MapOf instance configured with -// the given hasher and options. The hash function is used instead -// of the built-in hash function configured when a map is created -// with the NewMapOf function. -func NewMapOfWithHasher[K comparable, V any]( - hasher func(K, uint64) uint64, - options ...func(*MapConfig), -) *MapOf[K, V] { - c := &MapConfig{ - sizeHint: defaultMinMapTableLen * entriesPerMapOfBucket, - } - for _, o := range options { - o(c) - } - - m := &MapOf[K, V]{} - m.resizeCond = *sync.NewCond(&m.resizeMu) - m.hasher = hasher - var table *mapOfTable[K, V] - if c.sizeHint <= defaultMinMapTableLen*entriesPerMapOfBucket { - table = newMapOfTable[K, V](defaultMinMapTableLen) - } else { - tableLen := nextPowOf2(uint32((float64(c.sizeHint) / entriesPerMapOfBucket) / mapLoadFactor)) - table = newMapOfTable[K, V](int(tableLen)) - } - m.minTableLen = len(table.buckets) - m.growOnly = c.growOnly - atomic.StorePointer(&m.table, unsafe.Pointer(table)) - return m -} - -// NewMapOfPresized creates a new MapOf instance with capacity enough -// to hold sizeHint entries. The capacity is treated as the minimal capacity -// meaning that the underlying hash table will never shrink to -// a smaller capacity. If sizeHint is zero or negative, the value -// is ignored. -// -// Deprecated: use NewMapOf in combination with WithPresize. -func NewMapOfPresized[K comparable, V any](sizeHint int) *MapOf[K, V] { - return NewMapOf[K, V](WithPresize(sizeHint)) -} - -func newMapOfTable[K comparable, V any](minTableLen int) *mapOfTable[K, V] { - buckets := make([]bucketOfPadded, minTableLen) - for i := range buckets { - buckets[i].meta = defaultMeta - } - counterLen := minTableLen >> 10 - if counterLen < minMapCounterLen { - counterLen = minMapCounterLen - } else if counterLen > maxMapCounterLen { - counterLen = maxMapCounterLen - } - counter := make([]counterStripe, counterLen) - t := &mapOfTable[K, V]{ - buckets: buckets, - size: counter, - seed: makeSeed(), - } - return t -} - -// ToPlainMapOf returns a native map with a copy of xsync Map's -// contents. The copied xsync Map should not be modified while -// this call is made. If the copied Map is modified, the copying -// behavior is the same as in the Range method. -func ToPlainMapOf[K comparable, V any](m *MapOf[K, V]) map[K]V { - pm := make(map[K]V) - if m != nil { - m.Range(func(key K, value V) bool { - pm[key] = value - return true - }) - } - return pm -} - -// Load returns the value stored in the map for a key, or zero value -// of type V if no value is present. -// The ok result indicates whether value was found in the map. -func (m *MapOf[K, V]) Load(key K) (value V, ok bool) { - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - hash := m.hasher(key, table.seed) - h1 := h1(hash) - h2w := broadcast(h2(hash)) - bidx := uint64(len(table.buckets)-1) & h1 - b := &table.buckets[bidx] - for { - metaw := atomic.LoadUint64(&b.meta) - markedw := markZeroBytes(metaw^h2w) & metaMask - for markedw != 0 { - idx := firstMarkedByteIndex(markedw) - eptr := atomic.LoadPointer(&b.entries[idx]) - if eptr != nil { - e := (*entryOf[K, V])(eptr) - if e.key == key { - return e.value, true - } - } - markedw &= markedw - 1 - } - bptr := atomic.LoadPointer(&b.next) - if bptr == nil { - return - } - b = (*bucketOfPadded)(bptr) - } -} - -// Store sets the value for a key. -func (m *MapOf[K, V]) Store(key K, value V) { - m.doCompute( - key, - func(V, bool) (V, bool) { - return value, false - }, - false, - false, - ) -} - -// LoadOrStore returns the existing value for the key if present. -// Otherwise, it stores and returns the given value. -// The loaded result is true if the value was loaded, false if stored. -func (m *MapOf[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool) { - return m.doCompute( - key, - func(V, bool) (V, bool) { - return value, false - }, - true, - false, - ) -} - -// LoadAndStore returns the existing value for the key if present, -// while setting the new value for the key. -// It stores the new value and returns the existing one, if present. -// The loaded result is true if the existing value was loaded, -// false otherwise. -func (m *MapOf[K, V]) LoadAndStore(key K, value V) (actual V, loaded bool) { - return m.doCompute( - key, - func(V, bool) (V, bool) { - return value, false - }, - false, - false, - ) -} - -// LoadOrCompute returns the existing value for the key if present. -// Otherwise, it computes the value using the provided function, and -// then stores and returns the computed value. The loaded result is -// true if the value was loaded, false if computed. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *MapOf[K, V]) LoadOrCompute(key K, valueFn func() V) (actual V, loaded bool) { - return m.doCompute( - key, - func(V, bool) (V, bool) { - return valueFn(), false - }, - true, - false, - ) -} - -// LoadOrTryCompute returns the existing value for the key if present. -// Otherwise, it tries to compute the value using the provided function -// and, if successful, stores and returns the computed value. The loaded -// result is true if the value was loaded, or false if computed (whether -// successfully or not). If the compute attempt was cancelled (due to an -// error, for example), a zero value of type V will be returned. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *MapOf[K, V]) LoadOrTryCompute( - key K, - valueFn func() (newValue V, cancel bool), -) (value V, loaded bool) { - return m.doCompute( - key, - func(V, bool) (V, bool) { - nv, c := valueFn() - if !c { - return nv, false - } - return nv, true // nv is ignored - }, - true, - false, - ) -} - -// Compute either sets the computed new value for the key or deletes -// the value for the key. When the delete result of the valueFn function -// is set to true, the value will be deleted, if it exists. When delete -// is set to false, the value is updated to the newValue. -// The ok result indicates whether value was computed and stored, thus, is -// present in the map. The actual result contains the new value in cases where -// the value was computed and stored. See the example for a few use cases. -// -// This call locks a hash table bucket while the compute function -// is executed. It means that modifications on other entries in -// the bucket will be blocked until the valueFn executes. Consider -// this when the function includes long-running operations. -func (m *MapOf[K, V]) Compute( - key K, - valueFn func(oldValue V, loaded bool) (newValue V, delete bool), -) (actual V, ok bool) { - return m.doCompute(key, valueFn, false, true) -} - -// LoadAndDelete deletes the value for a key, returning the previous -// value if any. The loaded result reports whether the key was -// present. -func (m *MapOf[K, V]) LoadAndDelete(key K) (value V, loaded bool) { - return m.doCompute( - key, - func(value V, loaded bool) (V, bool) { - return value, true - }, - false, - false, - ) -} - -// Delete deletes the value for a key. -func (m *MapOf[K, V]) Delete(key K) { - m.doCompute( - key, - func(value V, loaded bool) (V, bool) { - return value, true - }, - false, - false, - ) -} - -func (m *MapOf[K, V]) doCompute( - key K, - valueFn func(oldValue V, loaded bool) (V, bool), - loadIfExists, computeOnly bool, -) (V, bool) { - // Read-only path. - if loadIfExists { - if v, ok := m.Load(key); ok { - return v, !computeOnly - } - } - // Write path. - for { - compute_attempt: - var ( - emptyb *bucketOfPadded - emptyidx int - ) - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - tableLen := len(table.buckets) - hash := m.hasher(key, table.seed) - h1 := h1(hash) - h2 := h2(hash) - h2w := broadcast(h2) - bidx := uint64(len(table.buckets)-1) & h1 - rootb := &table.buckets[bidx] - rootb.mu.Lock() - // The following two checks must go in reverse to what's - // in the resize method. - if m.resizeInProgress() { - // Resize is in progress. Wait, then go for another attempt. - rootb.mu.Unlock() - m.waitForResize() - goto compute_attempt - } - if m.newerTableExists(table) { - // Someone resized the table. Go for another attempt. - rootb.mu.Unlock() - goto compute_attempt - } - b := rootb - for { - metaw := b.meta - markedw := markZeroBytes(metaw^h2w) & metaMask - for markedw != 0 { - idx := firstMarkedByteIndex(markedw) - eptr := b.entries[idx] - if eptr != nil { - e := (*entryOf[K, V])(eptr) - if e.key == key { - if loadIfExists { - rootb.mu.Unlock() - return e.value, !computeOnly - } - // In-place update/delete. - // We get a copy of the value via an interface{} on each call, - // thus the live value pointers are unique. Otherwise atomic - // snapshot won't be correct in case of multiple Store calls - // using the same value. - oldv := e.value - newv, del := valueFn(oldv, true) - if del { - // Deletion. - // First we update the hash, then the entry. - newmetaw := setByte(metaw, emptyMetaSlot, idx) - atomic.StoreUint64(&b.meta, newmetaw) - atomic.StorePointer(&b.entries[idx], nil) - rootb.mu.Unlock() - table.addSize(bidx, -1) - // Might need to shrink the table if we left bucket empty. - if newmetaw == defaultMeta { - m.resize(table, mapShrinkHint) - } - return oldv, !computeOnly - } - newe := new(entryOf[K, V]) - newe.key = key - newe.value = newv - atomic.StorePointer(&b.entries[idx], unsafe.Pointer(newe)) - rootb.mu.Unlock() - if computeOnly { - // Compute expects the new value to be returned. - return newv, true - } - // LoadAndStore expects the old value to be returned. - return oldv, true - } - } - markedw &= markedw - 1 - } - if emptyb == nil { - // Search for empty entries (up to 5 per bucket). - emptyw := metaw & defaultMetaMasked - if emptyw != 0 { - idx := firstMarkedByteIndex(emptyw) - emptyb = b - emptyidx = idx - } - } - if b.next == nil { - if emptyb != nil { - // Insertion into an existing bucket. - var zeroV V - newValue, del := valueFn(zeroV, false) - if del { - rootb.mu.Unlock() - return zeroV, false - } - newe := new(entryOf[K, V]) - newe.key = key - newe.value = newValue - // First we update meta, then the entry. - atomic.StoreUint64(&emptyb.meta, setByte(emptyb.meta, h2, emptyidx)) - atomic.StorePointer(&emptyb.entries[emptyidx], unsafe.Pointer(newe)) - rootb.mu.Unlock() - table.addSize(bidx, 1) - return newValue, computeOnly - } - growThreshold := float64(tableLen) * entriesPerMapOfBucket * mapLoadFactor - if table.sumSize() > int64(growThreshold) { - // Need to grow the table. Then go for another attempt. - rootb.mu.Unlock() - m.resize(table, mapGrowHint) - goto compute_attempt - } - // Insertion into a new bucket. - var zeroV V - newValue, del := valueFn(zeroV, false) - if del { - rootb.mu.Unlock() - return newValue, false - } - // Create and append a bucket. - newb := new(bucketOfPadded) - newb.meta = setByte(defaultMeta, h2, 0) - newe := new(entryOf[K, V]) - newe.key = key - newe.value = newValue - newb.entries[0] = unsafe.Pointer(newe) - atomic.StorePointer(&b.next, unsafe.Pointer(newb)) - rootb.mu.Unlock() - table.addSize(bidx, 1) - return newValue, computeOnly - } - b = (*bucketOfPadded)(b.next) - } - } -} - -func (m *MapOf[K, V]) newerTableExists(table *mapOfTable[K, V]) bool { - curTablePtr := atomic.LoadPointer(&m.table) - return uintptr(curTablePtr) != uintptr(unsafe.Pointer(table)) -} - -func (m *MapOf[K, V]) resizeInProgress() bool { - return atomic.LoadInt64(&m.resizing) == 1 -} - -func (m *MapOf[K, V]) waitForResize() { - m.resizeMu.Lock() - for m.resizeInProgress() { - m.resizeCond.Wait() - } - m.resizeMu.Unlock() -} - -func (m *MapOf[K, V]) resize(knownTable *mapOfTable[K, V], hint mapResizeHint) { - knownTableLen := len(knownTable.buckets) - // Fast path for shrink attempts. - if hint == mapShrinkHint { - if m.growOnly || - m.minTableLen == knownTableLen || - knownTable.sumSize() > int64((knownTableLen*entriesPerMapOfBucket)/mapShrinkFraction) { - return - } - } - // Slow path. - if !atomic.CompareAndSwapInt64(&m.resizing, 0, 1) { - // Someone else started resize. Wait for it to finish. - m.waitForResize() - return - } - var newTable *mapOfTable[K, V] - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - tableLen := len(table.buckets) - switch hint { - case mapGrowHint: - // Grow the table with factor of 2. - atomic.AddInt64(&m.totalGrowths, 1) - newTable = newMapOfTable[K, V](tableLen << 1) - case mapShrinkHint: - shrinkThreshold := int64((tableLen * entriesPerMapOfBucket) / mapShrinkFraction) - if tableLen > m.minTableLen && table.sumSize() <= shrinkThreshold { - // Shrink the table with factor of 2. - atomic.AddInt64(&m.totalShrinks, 1) - newTable = newMapOfTable[K, V](tableLen >> 1) - } else { - // No need to shrink. Wake up all waiters and give up. - m.resizeMu.Lock() - atomic.StoreInt64(&m.resizing, 0) - m.resizeCond.Broadcast() - m.resizeMu.Unlock() - return - } - case mapClearHint: - newTable = newMapOfTable[K, V](m.minTableLen) - default: - panic(fmt.Sprintf("unexpected resize hint: %d", hint)) - } - // Copy the data only if we're not clearing the map. - if hint != mapClearHint { - for i := 0; i < tableLen; i++ { - copied := copyBucketOf(&table.buckets[i], newTable, m.hasher) - newTable.addSizePlain(uint64(i), copied) - } - } - // Publish the new table and wake up all waiters. - atomic.StorePointer(&m.table, unsafe.Pointer(newTable)) - m.resizeMu.Lock() - atomic.StoreInt64(&m.resizing, 0) - m.resizeCond.Broadcast() - m.resizeMu.Unlock() -} - -func copyBucketOf[K comparable, V any]( - b *bucketOfPadded, - destTable *mapOfTable[K, V], - hasher func(K, uint64) uint64, -) (copied int) { - rootb := b - rootb.mu.Lock() - for { - for i := 0; i < entriesPerMapOfBucket; i++ { - if b.entries[i] != nil { - e := (*entryOf[K, V])(b.entries[i]) - hash := hasher(e.key, destTable.seed) - bidx := uint64(len(destTable.buckets)-1) & h1(hash) - destb := &destTable.buckets[bidx] - appendToBucketOf(h2(hash), b.entries[i], destb) - copied++ - } - } - if b.next == nil { - rootb.mu.Unlock() - return - } - b = (*bucketOfPadded)(b.next) - } -} - -// Range calls f sequentially for each key and value present in the -// map. If f returns false, range stops the iteration. -// -// Range does not necessarily correspond to any consistent snapshot -// of the Map's contents: no key will be visited more than once, but -// if the value for any key is stored or deleted concurrently, Range -// may reflect any mapping for that key from any point during the -// Range call. -// -// It is safe to modify the map while iterating it, including entry -// creation, modification and deletion. However, the concurrent -// modification rule apply, i.e. the changes may be not reflected -// in the subsequently iterated entries. -func (m *MapOf[K, V]) Range(f func(key K, value V) bool) { - var zeroPtr unsafe.Pointer - // Pre-allocate array big enough to fit entries for most hash tables. - bentries := make([]unsafe.Pointer, 0, 16*entriesPerMapOfBucket) - tablep := atomic.LoadPointer(&m.table) - table := *(*mapOfTable[K, V])(tablep) - for i := range table.buckets { - rootb := &table.buckets[i] - b := rootb - // Prevent concurrent modifications and copy all entries into - // the intermediate slice. - rootb.mu.Lock() - for { - for i := 0; i < entriesPerMapOfBucket; i++ { - if b.entries[i] != nil { - bentries = append(bentries, b.entries[i]) - } - } - if b.next == nil { - rootb.mu.Unlock() - break - } - b = (*bucketOfPadded)(b.next) - } - // Call the function for all copied entries. - for j := range bentries { - entry := (*entryOf[K, V])(bentries[j]) - if !f(entry.key, entry.value) { - return - } - // Remove the reference to avoid preventing the copied - // entries from being GCed until this method finishes. - bentries[j] = zeroPtr - } - bentries = bentries[:0] - } -} - -// Clear deletes all keys and values currently stored in the map. -func (m *MapOf[K, V]) Clear() { - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - m.resize(table, mapClearHint) -} - -// Size returns current size of the map. -func (m *MapOf[K, V]) Size() int { - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - return int(table.sumSize()) -} - -func appendToBucketOf(h2 uint8, entryPtr unsafe.Pointer, b *bucketOfPadded) { - for { - for i := 0; i < entriesPerMapOfBucket; i++ { - if b.entries[i] == nil { - b.meta = setByte(b.meta, h2, i) - b.entries[i] = entryPtr - return - } - } - if b.next == nil { - newb := new(bucketOfPadded) - newb.meta = setByte(defaultMeta, h2, 0) - newb.entries[0] = entryPtr - b.next = unsafe.Pointer(newb) - return - } - b = (*bucketOfPadded)(b.next) - } -} - -func (table *mapOfTable[K, V]) addSize(bucketIdx uint64, delta int) { - cidx := uint64(len(table.size)-1) & bucketIdx - atomic.AddInt64(&table.size[cidx].c, int64(delta)) -} - -func (table *mapOfTable[K, V]) addSizePlain(bucketIdx uint64, delta int) { - cidx := uint64(len(table.size)-1) & bucketIdx - table.size[cidx].c += int64(delta) -} - -func (table *mapOfTable[K, V]) sumSize() int64 { - sum := int64(0) - for i := range table.size { - sum += atomic.LoadInt64(&table.size[i].c) - } - return sum -} - -func h1(h uint64) uint64 { - return h >> 7 -} - -func h2(h uint64) uint8 { - return uint8(h & 0x7f) -} - -// Stats returns statistics for the MapOf. Just like other map -// methods, this one is thread-safe. Yet it's an O(N) operation, -// so it should be used only for diagnostics or debugging purposes. -func (m *MapOf[K, V]) Stats() MapStats { - stats := MapStats{ - TotalGrowths: atomic.LoadInt64(&m.totalGrowths), - TotalShrinks: atomic.LoadInt64(&m.totalShrinks), - MinEntries: math.MaxInt32, - } - table := (*mapOfTable[K, V])(atomic.LoadPointer(&m.table)) - stats.RootBuckets = len(table.buckets) - stats.Counter = int(table.sumSize()) - stats.CounterLen = len(table.size) - for i := range table.buckets { - nentries := 0 - b := &table.buckets[i] - stats.TotalBuckets++ - for { - nentriesLocal := 0 - stats.Capacity += entriesPerMapOfBucket - for i := 0; i < entriesPerMapOfBucket; i++ { - if atomic.LoadPointer(&b.entries[i]) != nil { - stats.Size++ - nentriesLocal++ - } - } - nentries += nentriesLocal - if nentriesLocal == 0 { - stats.EmptyBuckets++ - } - if b.next == nil { - break - } - b = (*bucketOfPadded)(atomic.LoadPointer(&b.next)) - stats.TotalBuckets++ - } - if nentries < stats.MinEntries { - stats.MinEntries = nentries - } - if nentries > stats.MaxEntries { - stats.MaxEntries = nentries - } - } - return stats -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueue.go b/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueue.go deleted file mode 100644 index c5fd262379..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueue.go +++ /dev/null @@ -1,125 +0,0 @@ -package xsync - -import ( - "runtime" - "sync/atomic" - "unsafe" -) - -// A MPMCQueue is a bounded multi-producer multi-consumer concurrent -// queue. -// -// MPMCQueue instances must be created with NewMPMCQueue function. -// A MPMCQueue must not be copied after first use. -// -// Based on the data structure from the following C++ library: -// https://github.com/rigtorp/MPMCQueue -type MPMCQueue struct { - cap uint64 - head uint64 - //lint:ignore U1000 prevents false sharing - hpad [cacheLineSize - 8]byte - tail uint64 - //lint:ignore U1000 prevents false sharing - tpad [cacheLineSize - 8]byte - slots []slotPadded -} - -type slotPadded struct { - slot - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - unsafe.Sizeof(slot{})]byte -} - -type slot struct { - turn uint64 - item interface{} -} - -// NewMPMCQueue creates a new MPMCQueue instance with the given -// capacity. -func NewMPMCQueue(capacity int) *MPMCQueue { - if capacity < 1 { - panic("capacity must be positive number") - } - return &MPMCQueue{ - cap: uint64(capacity), - slots: make([]slotPadded, capacity), - } -} - -// Enqueue inserts the given item into the queue. -// Blocks, if the queue is full. -// -// Deprecated: use TryEnqueue in combination with runtime.Gosched(). -func (q *MPMCQueue) Enqueue(item interface{}) { - head := atomic.AddUint64(&q.head, 1) - 1 - slot := &q.slots[q.idx(head)] - turn := q.turn(head) * 2 - for atomic.LoadUint64(&slot.turn) != turn { - runtime.Gosched() - } - slot.item = item - atomic.StoreUint64(&slot.turn, turn+1) -} - -// Dequeue retrieves and removes the item from the head of the queue. -// Blocks, if the queue is empty. -// -// Deprecated: use TryDequeue in combination with runtime.Gosched(). -func (q *MPMCQueue) Dequeue() interface{} { - tail := atomic.AddUint64(&q.tail, 1) - 1 - slot := &q.slots[q.idx(tail)] - turn := q.turn(tail)*2 + 1 - for atomic.LoadUint64(&slot.turn) != turn { - runtime.Gosched() - } - item := slot.item - slot.item = nil - atomic.StoreUint64(&slot.turn, turn+1) - return item -} - -// TryEnqueue inserts the given item into the queue. Does not block -// and returns immediately. The result indicates that the queue isn't -// full and the item was inserted. -func (q *MPMCQueue) TryEnqueue(item interface{}) bool { - head := atomic.LoadUint64(&q.head) - slot := &q.slots[q.idx(head)] - turn := q.turn(head) * 2 - if atomic.LoadUint64(&slot.turn) == turn { - if atomic.CompareAndSwapUint64(&q.head, head, head+1) { - slot.item = item - atomic.StoreUint64(&slot.turn, turn+1) - return true - } - } - return false -} - -// TryDequeue retrieves and removes the item from the head of the -// queue. Does not block and returns immediately. The ok result -// indicates that the queue isn't empty and an item was retrieved. -func (q *MPMCQueue) TryDequeue() (item interface{}, ok bool) { - tail := atomic.LoadUint64(&q.tail) - slot := &q.slots[q.idx(tail)] - turn := q.turn(tail)*2 + 1 - if atomic.LoadUint64(&slot.turn) == turn { - if atomic.CompareAndSwapUint64(&q.tail, tail, tail+1) { - item = slot.item - ok = true - slot.item = nil - atomic.StoreUint64(&slot.turn, turn+1) - return - } - } - return -} - -func (q *MPMCQueue) idx(i uint64) uint64 { - return i % q.cap -} - -func (q *MPMCQueue) turn(i uint64) uint64 { - return i / q.cap -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueueof.go b/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueueof.go deleted file mode 100644 index 3f7e4ccc11..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/mpmcqueueof.go +++ /dev/null @@ -1,138 +0,0 @@ -//go:build go1.19 -// +build go1.19 - -package xsync - -import ( - "runtime" - "sync/atomic" - "unsafe" -) - -// A MPMCQueueOf is a bounded multi-producer multi-consumer concurrent -// queue. It's a generic version of MPMCQueue. -// -// MPMCQueueOf instances must be created with NewMPMCQueueOf function. -// A MPMCQueueOf must not be copied after first use. -// -// Based on the data structure from the following C++ library: -// https://github.com/rigtorp/MPMCQueue -type MPMCQueueOf[I any] struct { - cap uint64 - head uint64 - //lint:ignore U1000 prevents false sharing - hpad [cacheLineSize - 8]byte - tail uint64 - //lint:ignore U1000 prevents false sharing - tpad [cacheLineSize - 8]byte - slots []slotOfPadded[I] -} - -type slotOfPadded[I any] struct { - slotOf[I] - // Unfortunately, proper padding like the below one: - // - // pad [cacheLineSize - (unsafe.Sizeof(slotOf[I]{}) % cacheLineSize)]byte - // - // won't compile, so here we add a best-effort padding for items up to - // 56 bytes size. - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - unsafe.Sizeof(atomic.Uint64{})]byte -} - -type slotOf[I any] struct { - // atomic.Uint64 is used here to get proper 8 byte alignment on - // 32-bit archs. - turn atomic.Uint64 - item I -} - -// NewMPMCQueueOf creates a new MPMCQueueOf instance with the given -// capacity. -func NewMPMCQueueOf[I any](capacity int) *MPMCQueueOf[I] { - if capacity < 1 { - panic("capacity must be positive number") - } - return &MPMCQueueOf[I]{ - cap: uint64(capacity), - slots: make([]slotOfPadded[I], capacity), - } -} - -// Enqueue inserts the given item into the queue. -// Blocks, if the queue is full. -// -// Deprecated: use TryEnqueue in combination with runtime.Gosched(). -func (q *MPMCQueueOf[I]) Enqueue(item I) { - head := atomic.AddUint64(&q.head, 1) - 1 - slot := &q.slots[q.idx(head)] - turn := q.turn(head) * 2 - for slot.turn.Load() != turn { - runtime.Gosched() - } - slot.item = item - slot.turn.Store(turn + 1) -} - -// Dequeue retrieves and removes the item from the head of the queue. -// Blocks, if the queue is empty. -// -// Deprecated: use TryDequeue in combination with runtime.Gosched(). -func (q *MPMCQueueOf[I]) Dequeue() I { - var zeroI I - tail := atomic.AddUint64(&q.tail, 1) - 1 - slot := &q.slots[q.idx(tail)] - turn := q.turn(tail)*2 + 1 - for slot.turn.Load() != turn { - runtime.Gosched() - } - item := slot.item - slot.item = zeroI - slot.turn.Store(turn + 1) - return item -} - -// TryEnqueue inserts the given item into the queue. Does not block -// and returns immediately. The result indicates that the queue isn't -// full and the item was inserted. -func (q *MPMCQueueOf[I]) TryEnqueue(item I) bool { - head := atomic.LoadUint64(&q.head) - slot := &q.slots[q.idx(head)] - turn := q.turn(head) * 2 - if slot.turn.Load() == turn { - if atomic.CompareAndSwapUint64(&q.head, head, head+1) { - slot.item = item - slot.turn.Store(turn + 1) - return true - } - } - return false -} - -// TryDequeue retrieves and removes the item from the head of the -// queue. Does not block and returns immediately. The ok result -// indicates that the queue isn't empty and an item was retrieved. -func (q *MPMCQueueOf[I]) TryDequeue() (item I, ok bool) { - tail := atomic.LoadUint64(&q.tail) - slot := &q.slots[q.idx(tail)] - turn := q.turn(tail)*2 + 1 - if slot.turn.Load() == turn { - if atomic.CompareAndSwapUint64(&q.tail, tail, tail+1) { - var zeroI I - item = slot.item - ok = true - slot.item = zeroI - slot.turn.Store(turn + 1) - return - } - } - return -} - -func (q *MPMCQueueOf[I]) idx(i uint64) uint64 { - return i % q.cap -} - -func (q *MPMCQueueOf[I]) turn(i uint64) uint64 { - return i / q.cap -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/rbmutex.go b/vendor/github.com/puzpuzpuz/xsync/v3/rbmutex.go deleted file mode 100644 index 4cbd9c41d9..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/rbmutex.go +++ /dev/null @@ -1,188 +0,0 @@ -package xsync - -import ( - "runtime" - "sync" - "sync/atomic" - "time" -) - -// slow-down guard -const nslowdown = 7 - -// pool for reader tokens -var rtokenPool sync.Pool - -// RToken is a reader lock token. -type RToken struct { - slot uint32 - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - 4]byte -} - -// A RBMutex is a reader biased reader/writer mutual exclusion lock. -// The lock can be held by an many readers or a single writer. -// The zero value for a RBMutex is an unlocked mutex. -// -// A RBMutex must not be copied after first use. -// -// RBMutex is based on a modified version of BRAVO -// (Biased Locking for Reader-Writer Locks) algorithm: -// https://arxiv.org/pdf/1810.01553.pdf -// -// RBMutex is a specialized mutex for scenarios, such as caches, -// where the vast majority of locks are acquired by readers and write -// lock acquire attempts are infrequent. In such scenarios, RBMutex -// performs better than sync.RWMutex on large multicore machines. -// -// RBMutex extends sync.RWMutex internally and uses it as the "reader -// bias disabled" fallback, so the same semantics apply. The only -// noticeable difference is in reader tokens returned from the -// RLock/RUnlock methods. -type RBMutex struct { - rslots []rslot - rmask uint32 - rbias int32 - inhibitUntil time.Time - rw sync.RWMutex -} - -type rslot struct { - mu int32 - //lint:ignore U1000 prevents false sharing - pad [cacheLineSize - 4]byte -} - -// NewRBMutex creates a new RBMutex instance. -func NewRBMutex() *RBMutex { - nslots := nextPowOf2(parallelism()) - mu := RBMutex{ - rslots: make([]rslot, nslots), - rmask: nslots - 1, - rbias: 1, - } - return &mu -} - -// TryRLock tries to lock m for reading without blocking. -// When TryRLock succeeds, it returns true and a reader token. -// In case of a failure, a false is returned. -func (mu *RBMutex) TryRLock() (bool, *RToken) { - if t := mu.fastRlock(); t != nil { - return true, t - } - // Optimistic slow path. - if mu.rw.TryRLock() { - if atomic.LoadInt32(&mu.rbias) == 0 && time.Now().After(mu.inhibitUntil) { - atomic.StoreInt32(&mu.rbias, 1) - } - return true, nil - } - return false, nil -} - -// RLock locks m for reading and returns a reader token. The -// token must be used in the later RUnlock call. -// -// Should not be used for recursive read locking; a blocked Lock -// call excludes new readers from acquiring the lock. -func (mu *RBMutex) RLock() *RToken { - if t := mu.fastRlock(); t != nil { - return t - } - // Slow path. - mu.rw.RLock() - if atomic.LoadInt32(&mu.rbias) == 0 && time.Now().After(mu.inhibitUntil) { - atomic.StoreInt32(&mu.rbias, 1) - } - return nil -} - -func (mu *RBMutex) fastRlock() *RToken { - if atomic.LoadInt32(&mu.rbias) == 1 { - t, ok := rtokenPool.Get().(*RToken) - if !ok { - t = new(RToken) - t.slot = runtime_fastrand() - } - // Try all available slots to distribute reader threads to slots. - for i := 0; i < len(mu.rslots); i++ { - slot := t.slot + uint32(i) - rslot := &mu.rslots[slot&mu.rmask] - rslotmu := atomic.LoadInt32(&rslot.mu) - if atomic.CompareAndSwapInt32(&rslot.mu, rslotmu, rslotmu+1) { - if atomic.LoadInt32(&mu.rbias) == 1 { - // Hot path succeeded. - t.slot = slot - return t - } - // The mutex is no longer reader biased. Roll back. - atomic.AddInt32(&rslot.mu, -1) - rtokenPool.Put(t) - return nil - } - // Contention detected. Give a try with the next slot. - } - } - return nil -} - -// RUnlock undoes a single RLock call. A reader token obtained from -// the RLock call must be provided. RUnlock does not affect other -// simultaneous readers. A panic is raised if m is not locked for -// reading on entry to RUnlock. -func (mu *RBMutex) RUnlock(t *RToken) { - if t == nil { - mu.rw.RUnlock() - return - } - if atomic.AddInt32(&mu.rslots[t.slot&mu.rmask].mu, -1) < 0 { - panic("invalid reader state detected") - } - rtokenPool.Put(t) -} - -// TryLock tries to lock m for writing without blocking. -func (mu *RBMutex) TryLock() bool { - if mu.rw.TryLock() { - if atomic.LoadInt32(&mu.rbias) == 1 { - atomic.StoreInt32(&mu.rbias, 0) - for i := 0; i < len(mu.rslots); i++ { - if atomic.LoadInt32(&mu.rslots[i].mu) > 0 { - // There is a reader. Roll back. - atomic.StoreInt32(&mu.rbias, 1) - mu.rw.Unlock() - return false - } - } - } - return true - } - return false -} - -// Lock locks m for writing. If the lock is already locked for -// reading or writing, Lock blocks until the lock is available. -func (mu *RBMutex) Lock() { - mu.rw.Lock() - if atomic.LoadInt32(&mu.rbias) == 1 { - atomic.StoreInt32(&mu.rbias, 0) - start := time.Now() - for i := 0; i < len(mu.rslots); i++ { - for atomic.LoadInt32(&mu.rslots[i].mu) > 0 { - runtime.Gosched() - } - } - mu.inhibitUntil = time.Now().Add(time.Since(start) * nslowdown) - } -} - -// Unlock unlocks m for writing. A panic is raised if m is not locked -// for writing on entry to Unlock. -// -// As with RWMutex, a locked RBMutex is not associated with a -// particular goroutine. One goroutine may RLock (Lock) a RBMutex and -// then arrange for another goroutine to RUnlock (Unlock) it. -func (mu *RBMutex) Unlock() { - mu.rw.Unlock() -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/spscqueue.go b/vendor/github.com/puzpuzpuz/xsync/v3/spscqueue.go deleted file mode 100644 index 6e4f84bc0c..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/spscqueue.go +++ /dev/null @@ -1,92 +0,0 @@ -package xsync - -import ( - "sync/atomic" -) - -// A SPSCQueue is a bounded single-producer single-consumer concurrent -// queue. This means that not more than a single goroutine must be -// publishing items to the queue while not more than a single goroutine -// must be consuming those items. -// -// SPSCQueue instances must be created with NewSPSCQueue function. -// A SPSCQueue must not be copied after first use. -// -// Based on the data structure from the following article: -// https://rigtorp.se/ringbuffer/ -type SPSCQueue struct { - cap uint64 - pidx uint64 - //lint:ignore U1000 prevents false sharing - pad0 [cacheLineSize - 8]byte - pcachedIdx uint64 - //lint:ignore U1000 prevents false sharing - pad1 [cacheLineSize - 8]byte - cidx uint64 - //lint:ignore U1000 prevents false sharing - pad2 [cacheLineSize - 8]byte - ccachedIdx uint64 - //lint:ignore U1000 prevents false sharing - pad3 [cacheLineSize - 8]byte - items []interface{} -} - -// NewSPSCQueue creates a new SPSCQueue instance with the given -// capacity. -func NewSPSCQueue(capacity int) *SPSCQueue { - if capacity < 1 { - panic("capacity must be positive number") - } - return &SPSCQueue{ - cap: uint64(capacity + 1), - items: make([]interface{}, capacity+1), - } -} - -// TryEnqueue inserts the given item into the queue. Does not block -// and returns immediately. The result indicates that the queue isn't -// full and the item was inserted. -func (q *SPSCQueue) TryEnqueue(item interface{}) bool { - // relaxed memory order would be enough here - idx := atomic.LoadUint64(&q.pidx) - nextIdx := idx + 1 - if nextIdx == q.cap { - nextIdx = 0 - } - cachedIdx := q.ccachedIdx - if nextIdx == cachedIdx { - cachedIdx = atomic.LoadUint64(&q.cidx) - q.ccachedIdx = cachedIdx - if nextIdx == cachedIdx { - return false - } - } - q.items[idx] = item - atomic.StoreUint64(&q.pidx, nextIdx) - return true -} - -// TryDequeue retrieves and removes the item from the head of the -// queue. Does not block and returns immediately. The ok result -// indicates that the queue isn't empty and an item was retrieved. -func (q *SPSCQueue) TryDequeue() (item interface{}, ok bool) { - // relaxed memory order would be enough here - idx := atomic.LoadUint64(&q.cidx) - cachedIdx := q.pcachedIdx - if idx == cachedIdx { - cachedIdx = atomic.LoadUint64(&q.pidx) - q.pcachedIdx = cachedIdx - if idx == cachedIdx { - return - } - } - item = q.items[idx] - q.items[idx] = nil - ok = true - nextIdx := idx + 1 - if nextIdx == q.cap { - nextIdx = 0 - } - atomic.StoreUint64(&q.cidx, nextIdx) - return -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/spscqueueof.go b/vendor/github.com/puzpuzpuz/xsync/v3/spscqueueof.go deleted file mode 100644 index 3ae132e503..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/spscqueueof.go +++ /dev/null @@ -1,96 +0,0 @@ -//go:build go1.19 -// +build go1.19 - -package xsync - -import ( - "sync/atomic" -) - -// A SPSCQueueOf is a bounded single-producer single-consumer concurrent -// queue. This means that not more than a single goroutine must be -// publishing items to the queue while not more than a single goroutine -// must be consuming those items. -// -// SPSCQueueOf instances must be created with NewSPSCQueueOf function. -// A SPSCQueueOf must not be copied after first use. -// -// Based on the data structure from the following article: -// https://rigtorp.se/ringbuffer/ -type SPSCQueueOf[I any] struct { - cap uint64 - pidx uint64 - //lint:ignore U1000 prevents false sharing - pad0 [cacheLineSize - 8]byte - pcachedIdx uint64 - //lint:ignore U1000 prevents false sharing - pad1 [cacheLineSize - 8]byte - cidx uint64 - //lint:ignore U1000 prevents false sharing - pad2 [cacheLineSize - 8]byte - ccachedIdx uint64 - //lint:ignore U1000 prevents false sharing - pad3 [cacheLineSize - 8]byte - items []I -} - -// NewSPSCQueueOf creates a new SPSCQueueOf instance with the given -// capacity. -func NewSPSCQueueOf[I any](capacity int) *SPSCQueueOf[I] { - if capacity < 1 { - panic("capacity must be positive number") - } - return &SPSCQueueOf[I]{ - cap: uint64(capacity + 1), - items: make([]I, capacity+1), - } -} - -// TryEnqueue inserts the given item into the queue. Does not block -// and returns immediately. The result indicates that the queue isn't -// full and the item was inserted. -func (q *SPSCQueueOf[I]) TryEnqueue(item I) bool { - // relaxed memory order would be enough here - idx := atomic.LoadUint64(&q.pidx) - next_idx := idx + 1 - if next_idx == q.cap { - next_idx = 0 - } - cached_idx := q.ccachedIdx - if next_idx == cached_idx { - cached_idx = atomic.LoadUint64(&q.cidx) - q.ccachedIdx = cached_idx - if next_idx == cached_idx { - return false - } - } - q.items[idx] = item - atomic.StoreUint64(&q.pidx, next_idx) - return true -} - -// TryDequeue retrieves and removes the item from the head of the -// queue. Does not block and returns immediately. The ok result -// indicates that the queue isn't empty and an item was retrieved. -func (q *SPSCQueueOf[I]) TryDequeue() (item I, ok bool) { - // relaxed memory order would be enough here - idx := atomic.LoadUint64(&q.cidx) - cached_idx := q.pcachedIdx - if idx == cached_idx { - cached_idx = atomic.LoadUint64(&q.pidx) - q.pcachedIdx = cached_idx - if idx == cached_idx { - return - } - } - var zeroI I - item = q.items[idx] - q.items[idx] = zeroI - ok = true - next_idx := idx + 1 - if next_idx == q.cap { - next_idx = 0 - } - atomic.StoreUint64(&q.cidx, next_idx) - return -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/util.go b/vendor/github.com/puzpuzpuz/xsync/v3/util.go deleted file mode 100644 index 769270895d..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/util.go +++ /dev/null @@ -1,66 +0,0 @@ -package xsync - -import ( - "math/bits" - "runtime" - _ "unsafe" -) - -// test-only assert()-like flag -var assertionsEnabled = false - -const ( - // cacheLineSize is used in paddings to prevent false sharing; - // 64B are used instead of 128B as a compromise between - // memory footprint and performance; 128B usage may give ~30% - // improvement on NUMA machines. - cacheLineSize = 64 -) - -// nextPowOf2 computes the next highest power of 2 of 32-bit v. -// Source: https://graphics.stanford.edu/~seander/bithacks.html#RoundUpPowerOf2 -func nextPowOf2(v uint32) uint32 { - if v == 0 { - return 1 - } - v-- - v |= v >> 1 - v |= v >> 2 - v |= v >> 4 - v |= v >> 8 - v |= v >> 16 - v++ - return v -} - -func parallelism() uint32 { - maxProcs := uint32(runtime.GOMAXPROCS(0)) - numCores := uint32(runtime.NumCPU()) - if maxProcs < numCores { - return maxProcs - } - return numCores -} - -//go:noescape -//go:linkname runtime_fastrand runtime.fastrand -func runtime_fastrand() uint32 - -func broadcast(b uint8) uint64 { - return 0x101010101010101 * uint64(b) -} - -func firstMarkedByteIndex(w uint64) int { - return bits.TrailingZeros64(w) >> 3 -} - -// SWAR byte search: may produce false positives, e.g. for 0x0100, -// so make sure to double-check bytes found by this function. -func markZeroBytes(w uint64) uint64 { - return ((w - 0x0101010101010101) & (^w) & 0x8080808080808080) -} - -func setByte(w uint64, b uint8, idx int) uint64 { - shift := idx << 3 - return (w &^ (0xff << shift)) | (uint64(b) << shift) -} diff --git a/vendor/github.com/puzpuzpuz/xsync/v3/util_hash.go b/vendor/github.com/puzpuzpuz/xsync/v3/util_hash.go deleted file mode 100644 index 9aa65972df..0000000000 --- a/vendor/github.com/puzpuzpuz/xsync/v3/util_hash.go +++ /dev/null @@ -1,77 +0,0 @@ -package xsync - -import ( - "reflect" - "unsafe" -) - -// makeSeed creates a random seed. -func makeSeed() uint64 { - var s1 uint32 - for { - s1 = runtime_fastrand() - // We use seed 0 to indicate an uninitialized seed/hash, - // so keep trying until we get a non-zero seed. - if s1 != 0 { - break - } - } - s2 := runtime_fastrand() - return uint64(s1)<<32 | uint64(s2) -} - -// hashString calculates a hash of s with the given seed. -func hashString(s string, seed uint64) uint64 { - if s == "" { - return seed - } - strh := (*reflect.StringHeader)(unsafe.Pointer(&s)) - return uint64(runtime_memhash(unsafe.Pointer(strh.Data), uintptr(seed), uintptr(strh.Len))) -} - -//go:noescape -//go:linkname runtime_memhash runtime.memhash -func runtime_memhash(p unsafe.Pointer, h, s uintptr) uintptr - -// defaultHasher creates a fast hash function for the given comparable type. -// The only limitation is that the type should not contain interfaces inside -// based on runtime.typehash. -func defaultHasher[T comparable]() func(T, uint64) uint64 { - var zero T - - if reflect.TypeOf(&zero).Elem().Kind() == reflect.Interface { - return func(value T, seed uint64) uint64 { - iValue := any(value) - i := (*iface)(unsafe.Pointer(&iValue)) - return runtime_typehash64(i.typ, i.word, seed) - } - } else { - var iZero any = zero - i := (*iface)(unsafe.Pointer(&iZero)) - return func(value T, seed uint64) uint64 { - return runtime_typehash64(i.typ, unsafe.Pointer(&value), seed) - } - } -} - -// how interface is represented in memory -type iface struct { - typ uintptr - word unsafe.Pointer -} - -// same as runtime_typehash, but always returns a uint64 -// see: maphash.rthash function for details -func runtime_typehash64(t uintptr, p unsafe.Pointer, seed uint64) uint64 { - if unsafe.Sizeof(uintptr(0)) == 8 { - return uint64(runtime_typehash(t, p, uintptr(seed))) - } - - lo := runtime_typehash(t, p, uintptr(seed)) - hi := runtime_typehash(t, p, uintptr(seed>>32)) - return uint64(hi)<<32 | uint64(lo) -} - -//go:noescape -//go:linkname runtime_typehash runtime.typehash -func runtime_typehash(t uintptr, p unsafe.Pointer, h uintptr) uintptr diff --git a/vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE b/vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE deleted file mode 100644 index e51324f9b5..0000000000 --- a/vendor/github.com/secure-systems-lab/go-securesystemslib/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2021 NYU Secure Systems Lab - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/secure-systems-lab/go-securesystemslib/cjson/canonicaljson.go b/vendor/github.com/secure-systems-lab/go-securesystemslib/cjson/canonicaljson.go deleted file mode 100644 index abc860a491..0000000000 --- a/vendor/github.com/secure-systems-lab/go-securesystemslib/cjson/canonicaljson.go +++ /dev/null @@ -1,151 +0,0 @@ -package cjson - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "reflect" - "sort" - "strings" -) - -/* -encodeCanonicalString is a helper function to canonicalize the passed string -according to the OLPC canonical JSON specification for strings (see -http://wiki.laptop.org/go/Canonical_JSON). String canonicalization consists of -escaping backslashes ("\") and double quotes (") and wrapping the resulting -string in double quotes ("). -*/ -func encodeCanonicalString(s string) string { - // Escape backslashes - s = strings.ReplaceAll(s, "\\", "\\\\") - // Escape double quotes - s = strings.ReplaceAll(s, "\"", "\\\"") - // Wrap with double quotes - return fmt.Sprintf("\"%s\"", s) -} - -/* -encodeCanonical is a helper function to recursively canonicalize the passed -object according to the OLPC canonical JSON specification (see -http://wiki.laptop.org/go/Canonical_JSON) and write it to the passed -*bytes.Buffer. If canonicalization fails it returns an error. -*/ -func encodeCanonical(obj interface{}, result *strings.Builder) (err error) { - switch objAsserted := obj.(type) { - case string: - result.WriteString(encodeCanonicalString(objAsserted)) - - case bool: - if objAsserted { - result.WriteString("true") - } else { - result.WriteString("false") - } - - // The wrapping `EncodeCanonical` function decodes the passed json data with - // `decoder.UseNumber` so that any numeric value is stored as `json.Number` - // (instead of the default `float64`). This allows us to assert that it is a - // non-floating point number, which are the only numbers allowed by the used - // canonicalization specification. - case json.Number: - if _, err := objAsserted.Int64(); err != nil { - panic(fmt.Sprintf("Can't canonicalize floating point number '%s'", - objAsserted)) - } - result.WriteString(objAsserted.String()) - - case nil: - result.WriteString("null") - - // Canonicalize slice - case []interface{}: - result.WriteString("[") - for i, val := range objAsserted { - if err := encodeCanonical(val, result); err != nil { - return err - } - if i < (len(objAsserted) - 1) { - result.WriteString(",") - } - } - result.WriteString("]") - - case map[string]interface{}: - result.WriteString("{") - - // Make a list of keys - var mapKeys []string - for key := range objAsserted { - mapKeys = append(mapKeys, key) - } - // Sort keys - sort.Strings(mapKeys) - - // Canonicalize map - for i, key := range mapKeys { - if err := encodeCanonical(key, result); err != nil { - return err - } - - result.WriteString(":") - if err := encodeCanonical(objAsserted[key], result); err != nil { - return err - } - if i < (len(mapKeys) - 1) { - result.WriteString(",") - } - i++ - } - result.WriteString("}") - - default: - // We recover in a deferred function defined above - panic(fmt.Sprintf("Can't canonicalize '%s' of type '%s'", - objAsserted, reflect.TypeOf(objAsserted))) - } - return nil -} - -/* -EncodeCanonical JSON canonicalizes the passed object and returns it as a byte -slice. It uses the OLPC canonical JSON specification (see -http://wiki.laptop.org/go/Canonical_JSON). If canonicalization fails the byte -slice is nil and the second return value contains the error. -*/ -func EncodeCanonical(obj interface{}) (out []byte, err error) { - // We use panic if an error occurs and recover in a deferred function, - // which is always called before returning. - // There we set the error that is returned eventually. - defer func() { - if r := recover(); r != nil { - err = errors.New(r.(string)) - } - }() - - // FIXME: Terrible hack to turn the passed struct into a map, converting - // the struct's variable names to the json key names defined in the struct - data, err := json.Marshal(obj) - if err != nil { - return nil, err - } - var jsonMap interface{} - - dec := json.NewDecoder(bytes.NewReader(data)) - dec.UseNumber() - if err := dec.Decode(&jsonMap); err != nil { - return nil, err - } - - // Create a buffer and write the canonicalized JSON bytes to it - var result strings.Builder - // Allocate output result buffer with the input size. - result.Grow(len(data)) - // Recursively encode the jsonmap - if err := encodeCanonical(jsonMap, &result); err != nil { - return nil, err - } - - return []byte(result.String()), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/LICENSE b/vendor/github.com/shirou/gopsutil/v4/LICENSE deleted file mode 100644 index 6f06adcbff..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/LICENSE +++ /dev/null @@ -1,61 +0,0 @@ -gopsutil is distributed under BSD license reproduced below. - -Copyright (c) 2014, WAKAYAMA Shirou -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 the gopsutil authors 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. - - -------- -internal/common/binary.go in the gopsutil is copied and modified from golang/encoding/binary.go. - - - -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. \ No newline at end of file diff --git a/vendor/github.com/shirou/gopsutil/v4/common/env.go b/vendor/github.com/shirou/gopsutil/v4/common/env.go deleted file mode 100644 index 47e471c402..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/common/env.go +++ /dev/null @@ -1,25 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -type EnvKeyType string - -// EnvKey is a context key that can be used to set programmatically the environment -// gopsutil relies on to perform calls against the OS. -// Example of use: -// -// ctx := context.WithValue(context.Background(), common.EnvKey, EnvMap{common.HostProcEnvKey: "/myproc"}) -// avg, err := load.AvgWithContext(ctx) -var EnvKey = EnvKeyType("env") - -const ( - HostProcEnvKey EnvKeyType = "HOST_PROC" - HostSysEnvKey EnvKeyType = "HOST_SYS" - HostEtcEnvKey EnvKeyType = "HOST_ETC" - HostVarEnvKey EnvKeyType = "HOST_VAR" - HostRunEnvKey EnvKeyType = "HOST_RUN" - HostDevEnvKey EnvKeyType = "HOST_DEV" - HostRootEnvKey EnvKeyType = "HOST_ROOT" - HostProcMountinfo EnvKeyType = "HOST_PROC_MOUNTINFO" -) - -type EnvMap map[EnvKeyType]string diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu.go deleted file mode 100644 index 9bc3dfb51a..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu.go +++ /dev/null @@ -1,202 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "math" - "runtime" - "strconv" - "strings" - "sync" - "time" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// TimesStat contains the amounts of time the CPU has spent performing different -// kinds of work. Time units are in seconds. It is based on linux /proc/stat file. -type TimesStat struct { - CPU string `json:"cpu"` - User float64 `json:"user"` - System float64 `json:"system"` - Idle float64 `json:"idle"` - Nice float64 `json:"nice"` - Iowait float64 `json:"iowait"` - Irq float64 `json:"irq"` - Softirq float64 `json:"softirq"` - Steal float64 `json:"steal"` - Guest float64 `json:"guest"` - GuestNice float64 `json:"guestNice"` -} - -type InfoStat struct { - CPU int32 `json:"cpu"` - VendorID string `json:"vendorId"` - Family string `json:"family"` - Model string `json:"model"` - Stepping int32 `json:"stepping"` - PhysicalID string `json:"physicalId"` - CoreID string `json:"coreId"` - Cores int32 `json:"cores"` - ModelName string `json:"modelName"` - Mhz float64 `json:"mhz"` - CacheSize int32 `json:"cacheSize"` - Flags []string `json:"flags"` - Microcode string `json:"microcode"` -} - -type lastPercent struct { - sync.Mutex - lastCPUTimes []TimesStat - lastPerCPUTimes []TimesStat -} - -var ( - lastCPUPercent lastPercent - invoke common.Invoker = common.Invoke{} -) - -func init() { - lastCPUPercent.Lock() - lastCPUPercent.lastCPUTimes, _ = Times(false) - lastCPUPercent.lastPerCPUTimes, _ = Times(true) - lastCPUPercent.Unlock() -} - -// Counts returns the number of physical or logical cores in the system -func Counts(logical bool) (int, error) { - return CountsWithContext(context.Background(), logical) -} - -func (c TimesStat) String() string { - v := []string{ - `"cpu":"` + c.CPU + `"`, - `"user":` + strconv.FormatFloat(c.User, 'f', 1, 64), - `"system":` + strconv.FormatFloat(c.System, 'f', 1, 64), - `"idle":` + strconv.FormatFloat(c.Idle, 'f', 1, 64), - `"nice":` + strconv.FormatFloat(c.Nice, 'f', 1, 64), - `"iowait":` + strconv.FormatFloat(c.Iowait, 'f', 1, 64), - `"irq":` + strconv.FormatFloat(c.Irq, 'f', 1, 64), - `"softirq":` + strconv.FormatFloat(c.Softirq, 'f', 1, 64), - `"steal":` + strconv.FormatFloat(c.Steal, 'f', 1, 64), - `"guest":` + strconv.FormatFloat(c.Guest, 'f', 1, 64), - `"guestNice":` + strconv.FormatFloat(c.GuestNice, 'f', 1, 64), - } - - return `{` + strings.Join(v, ",") + `}` -} - -// Deprecated: Total returns the total number of seconds in a CPUTimesStat -// Please do not use this internal function. -func (c TimesStat) Total() float64 { - total := c.User + c.System + c.Idle + c.Nice + c.Iowait + c.Irq + - c.Softirq + c.Steal + c.Guest + c.GuestNice - - return total -} - -func (c InfoStat) String() string { - s, _ := json.Marshal(c) - return string(s) -} - -func getAllBusy(t TimesStat) (float64, float64) { - tot := t.Total() - if runtime.GOOS == "linux" { - tot -= t.Guest // Linux 2.6.24+ - tot -= t.GuestNice // Linux 3.2.0+ - } - - busy := tot - t.Idle - t.Iowait - - return tot, busy -} - -func calculateBusy(t1, t2 TimesStat) float64 { - t1All, t1Busy := getAllBusy(t1) - t2All, t2Busy := getAllBusy(t2) - - if t2Busy <= t1Busy { - return 0 - } - if t2All <= t1All { - return 100 - } - return math.Min(100, math.Max(0, (t2Busy-t1Busy)/(t2All-t1All)*100)) -} - -func calculateAllBusy(t1, t2 []TimesStat) ([]float64, error) { - // Make sure the CPU measurements have the same length. - if len(t1) != len(t2) { - return nil, fmt.Errorf( - "received two CPU counts: %d != %d", - len(t1), len(t2), - ) - } - - ret := make([]float64, len(t1)) - for i, t := range t2 { - ret[i] = calculateBusy(t1[i], t) - } - return ret, nil -} - -// Percent calculates the percentage of cpu used either per CPU or combined. -// If an interval of 0 is given it will compare the current cpu times against the last call. -// Returns one value per cpu, or a single value if percpu is set to false. -func Percent(interval time.Duration, percpu bool) ([]float64, error) { - return PercentWithContext(context.Background(), interval, percpu) -} - -func PercentWithContext(ctx context.Context, interval time.Duration, percpu bool) ([]float64, error) { - if interval <= 0 { - return percentUsedFromLastCallWithContext(ctx, percpu) - } - - // Get CPU usage at the start of the interval. - cpuTimes1, err := TimesWithContext(ctx, percpu) - if err != nil { - return nil, err - } - - if err := common.Sleep(ctx, interval); err != nil { - return nil, err - } - - // And at the end of the interval. - cpuTimes2, err := TimesWithContext(ctx, percpu) - if err != nil { - return nil, err - } - - return calculateAllBusy(cpuTimes1, cpuTimes2) -} - -func percentUsedFromLastCall(percpu bool) ([]float64, error) { - return percentUsedFromLastCallWithContext(context.Background(), percpu) -} - -func percentUsedFromLastCallWithContext(ctx context.Context, percpu bool) ([]float64, error) { - cpuTimes, err := TimesWithContext(ctx, percpu) - if err != nil { - return nil, err - } - lastCPUPercent.Lock() - defer lastCPUPercent.Unlock() - var lastTimes []TimesStat - if percpu { - lastTimes = lastCPUPercent.lastPerCPUTimes - lastCPUPercent.lastPerCPUTimes = cpuTimes - } else { - lastTimes = lastCPUPercent.lastCPUTimes - lastCPUPercent.lastCPUTimes = cpuTimes - } - - if lastTimes == nil { - return nil, errors.New("error getting times for cpu percent. lastTimes was nil") - } - return calculateAllBusy(lastTimes, cpuTimes) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix.go deleted file mode 100644 index bc766bd4fe..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix.go +++ /dev/null @@ -1,16 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix - -package cpu - -import ( - "context" -) - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_cgo.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_cgo.go deleted file mode 100644 index 559dc5feaf..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_cgo.go +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && cgo - -package cpu - -import ( - "context" - - "github.com/power-devops/perfstat" -) - -func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { - var ret []TimesStat - if percpu { - cpus, err := perfstat.CpuStat() - if err != nil { - return nil, err - } - for _, c := range cpus { - ct := &TimesStat{ - CPU: c.Name, - Idle: float64(c.Idle), - User: float64(c.User), - System: float64(c.Sys), - Iowait: float64(c.Wait), - } - ret = append(ret, *ct) - } - } else { - c, err := perfstat.CpuUtilTotalStat() - if err != nil { - return nil, err - } - ct := &TimesStat{ - CPU: "cpu-total", - Idle: float64(c.IdlePct), - User: float64(c.UserPct), - System: float64(c.KernPct), - Iowait: float64(c.WaitPct), - } - ret = append(ret, *ct) - } - return ret, nil -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - c, err := perfstat.CpuTotalStat() - if err != nil { - return nil, err - } - info := InfoStat{ - CPU: 0, - Mhz: float64(c.ProcessorHz / 1000000), - Cores: int32(c.NCpusCfg), - } - result := []InfoStat{info} - return result, nil -} - -func CountsWithContext(ctx context.Context, logical bool) (int, error) { - c, err := perfstat.CpuTotalStat() - if err != nil { - return 0, err - } - return c.NCpusCfg, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_nocgo.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_nocgo.go deleted file mode 100644 index 981e32e512..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_aix_nocgo.go +++ /dev/null @@ -1,157 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && !cgo - -package cpu - -import ( - "context" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { - var ret []TimesStat - if percpu { - perOut, err := invoke.CommandWithContext(ctx, "sar", "-u", "-P", "ALL", "10", "1") - if err != nil { - return nil, err - } - lines := strings.Split(string(perOut), "\n") - if len(lines) < 6 { - return []TimesStat{}, common.ErrNotImplementedError - } - - hp := strings.Fields(lines[5]) // headers - for l := 6; l < len(lines)-1; l++ { - ct := &TimesStat{} - v := strings.Fields(lines[l]) // values - for i, header := range hp { - // We're done in any of these use cases - if i >= len(v) || v[0] == "-" { - break - } - - // Position variable for v - pos := i - // There is a missing field at the beginning of all but the first line - // so adjust the position - if l > 6 { - pos = i - 1 - } - // We don't want invalid positions - if pos < 0 { - continue - } - - if t, err := strconv.ParseFloat(v[pos], 64); err == nil { - switch header { - case `cpu`: - ct.CPU = strconv.FormatFloat(t, 'f', -1, 64) - case `%usr`: - ct.User = t - case `%sys`: - ct.System = t - case `%wio`: - ct.Iowait = t - case `%idle`: - ct.Idle = t - } - } - } - // Valid CPU data, so append it - ret = append(ret, *ct) - } - } else { - out, err := invoke.CommandWithContext(ctx, "sar", "-u", "10", "1") - if err != nil { - return nil, err - } - lines := strings.Split(string(out), "\n") - if len(lines) < 5 { - return []TimesStat{}, common.ErrNotImplementedError - } - - ct := &TimesStat{CPU: "cpu-total"} - h := strings.Fields(lines[len(lines)-3]) // headers - v := strings.Fields(lines[len(lines)-2]) // values - for i, header := range h { - if t, err := strconv.ParseFloat(v[i], 64); err == nil { - switch header { - case `%usr`: - ct.User = t - case `%sys`: - ct.System = t - case `%wio`: - ct.Iowait = t - case `%idle`: - ct.Idle = t - } - } - } - - ret = append(ret, *ct) - } - - return ret, nil -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - out, err := invoke.CommandWithContext(ctx, "prtconf") - if err != nil { - return nil, err - } - - ret := InfoStat{} - for _, line := range strings.Split(string(out), "\n") { - switch { - case strings.HasPrefix(line, "Number Of Processors:"): - p := strings.Fields(line) - if len(p) > 3 { - if t, err := strconv.ParseUint(p[3], 10, 64); err == nil { - ret.Cores = int32(t) - } - } - case strings.HasPrefix(line, "Processor Clock Speed:"): - p := strings.Fields(line) - if len(p) > 4 { - if t, err := strconv.ParseFloat(p[3], 64); err == nil { - switch strings.ToUpper(p[4]) { - case "MHZ": - ret.Mhz = t - case "GHZ": - ret.Mhz = t * 1000.0 - case "KHZ": - ret.Mhz = t / 1000.0 - default: - ret.Mhz = t - } - } - } - case strings.HasPrefix(line, "System Model:"): - p := strings.Split(string(line), ":") - if p != nil { - ret.VendorID = strings.TrimSpace(p[1]) - } - case strings.HasPrefix(line, "Processor Type:"): - p := strings.Split(string(line), ":") - if p != nil { - c := strings.Split(string(p[1]), "_") - if c != nil { - ret.Family = strings.TrimSpace(c[0]) - ret.Model = strings.TrimSpace(c[1]) - } - } - } - } - return []InfoStat{ret}, nil -} - -func CountsWithContext(ctx context.Context, _ bool) (int, error) { - info, err := InfoWithContext(ctx) - if err == nil { - return int(info[0].Cores), nil - } - return 0, err -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin.go deleted file mode 100644 index 3ffca8d05d..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin.go +++ /dev/null @@ -1,198 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin - -package cpu - -import ( - "context" - "fmt" - "strconv" - "strings" - "unsafe" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// sys/resource.h -const ( - CPUser = 0 - cpNice = 1 - cpSys = 2 - cpIntr = 3 - cpIdle = 4 - cpUStates = 5 -) - -// mach/machine.h -const ( - cpuStateUser = 0 - cpuStateSystem = 1 - cpuStateIdle = 2 - cpuStateNice = 3 - cpuStateMax = 4 -) - -// mach/processor_info.h -const ( - processorCpuLoadInfo = 2 //nolint:revive //FIXME -) - -type hostCpuLoadInfoData struct { //nolint:revive //FIXME - cpuTicks [cpuStateMax]uint32 -} - -// default value. from time.h -var ClocksPerSec = float64(128) - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { - lib, err := common.NewLibrary(common.System) - if err != nil { - return nil, err - } - defer lib.Close() - - if percpu { - return perCPUTimes(lib) - } - - return allCPUTimes(lib) -} - -// Returns only one CPUInfoStat on FreeBSD -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - var ret []InfoStat - - c := InfoStat{} - c.ModelName, _ = unix.Sysctl("machdep.cpu.brand_string") - family, _ := unix.SysctlUint32("machdep.cpu.family") - c.Family = strconv.FormatUint(uint64(family), 10) - model, _ := unix.SysctlUint32("machdep.cpu.model") - c.Model = strconv.FormatUint(uint64(model), 10) - stepping, _ := unix.SysctlUint32("machdep.cpu.stepping") - c.Stepping = int32(stepping) - features, err := unix.Sysctl("machdep.cpu.features") - if err == nil { - for _, v := range strings.Fields(features) { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } - leaf7Features, err := unix.Sysctl("machdep.cpu.leaf7_features") - if err == nil { - for _, v := range strings.Fields(leaf7Features) { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } - extfeatures, err := unix.Sysctl("machdep.cpu.extfeatures") - if err == nil { - for _, v := range strings.Fields(extfeatures) { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } - cores, _ := unix.SysctlUint32("machdep.cpu.core_count") - c.Cores = int32(cores) - cacheSize, _ := unix.SysctlUint32("machdep.cpu.cache.size") - c.CacheSize = int32(cacheSize) - c.VendorID, _ = unix.Sysctl("machdep.cpu.vendor") - - v, err := getFrequency() - if err == nil { - c.Mhz = v - } - - return append(ret, c), nil -} - -func CountsWithContext(_ context.Context, logical bool) (int, error) { - var cpuArgument string - if logical { - cpuArgument = "hw.logicalcpu" - } else { - cpuArgument = "hw.physicalcpu" - } - - count, err := unix.SysctlUint32(cpuArgument) - if err != nil { - return 0, err - } - - return int(count), nil -} - -func perCPUTimes(machLib *common.Library) ([]TimesStat, error) { - machHostSelf := common.GetFunc[common.MachHostSelfFunc](machLib, common.MachHostSelfSym) - machTaskSelf := common.GetFunc[common.MachTaskSelfFunc](machLib, common.MachTaskSelfSym) - hostProcessorInfo := common.GetFunc[common.HostProcessorInfoFunc](machLib, common.HostProcessorInfoSym) - vmDeallocate := common.GetFunc[common.VMDeallocateFunc](machLib, common.VMDeallocateSym) - - var count, ncpu uint32 - var cpuload *hostCpuLoadInfoData - - status := hostProcessorInfo(machHostSelf(), processorCpuLoadInfo, &ncpu, uintptr(unsafe.Pointer(&cpuload)), &count) - - if status != common.KERN_SUCCESS { - return nil, fmt.Errorf("host_processor_info error=%d", status) - } - - defer vmDeallocate(machTaskSelf(), uintptr(unsafe.Pointer(cpuload)), uintptr(ncpu)) - - ret := []TimesStat{} - loads := unsafe.Slice(cpuload, ncpu) - - for i := 0; i < int(ncpu); i++ { - c := TimesStat{ - CPU: fmt.Sprintf("cpu%d", i), - User: float64(loads[i].cpuTicks[cpuStateUser]) / ClocksPerSec, - System: float64(loads[i].cpuTicks[cpuStateSystem]) / ClocksPerSec, - Nice: float64(loads[i].cpuTicks[cpuStateNice]) / ClocksPerSec, - Idle: float64(loads[i].cpuTicks[cpuStateIdle]) / ClocksPerSec, - } - - ret = append(ret, c) - } - - return ret, nil -} - -func allCPUTimes(machLib *common.Library) ([]TimesStat, error) { - machHostSelf := common.GetFunc[common.MachHostSelfFunc](machLib, common.MachHostSelfSym) - hostStatistics := common.GetFunc[common.HostStatisticsFunc](machLib, common.HostStatisticsSym) - - var cpuload hostCpuLoadInfoData - count := uint32(cpuStateMax) - - status := hostStatistics(machHostSelf(), common.HOST_CPU_LOAD_INFO, - uintptr(unsafe.Pointer(&cpuload)), &count) - - if status != common.KERN_SUCCESS { - return nil, fmt.Errorf("host_statistics error=%d", status) - } - - c := TimesStat{ - CPU: "cpu-total", - User: float64(cpuload.cpuTicks[cpuStateUser]) / ClocksPerSec, - System: float64(cpuload.cpuTicks[cpuStateSystem]) / ClocksPerSec, - Nice: float64(cpuload.cpuTicks[cpuStateNice]) / ClocksPerSec, - Idle: float64(cpuload.cpuTicks[cpuStateIdle]) / ClocksPerSec, - } - - return []TimesStat{c}, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go deleted file mode 100644 index 0942700340..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_arm64.go +++ /dev/null @@ -1,80 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin && arm64 - -package cpu - -import ( - "encoding/binary" - "fmt" - "unsafe" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// https://github.com/shoenig/go-m1cpu/blob/v0.1.6/cpu.go -func getFrequency() (float64, error) { - ioKit, err := common.NewLibrary(common.IOKit) - if err != nil { - return 0, err - } - defer ioKit.Close() - - coreFoundation, err := common.NewLibrary(common.CoreFoundation) - if err != nil { - return 0, err - } - defer coreFoundation.Close() - - ioServiceMatching := common.GetFunc[common.IOServiceMatchingFunc](ioKit, common.IOServiceMatchingSym) - ioServiceGetMatchingServices := common.GetFunc[common.IOServiceGetMatchingServicesFunc](ioKit, common.IOServiceGetMatchingServicesSym) - ioIteratorNext := common.GetFunc[common.IOIteratorNextFunc](ioKit, common.IOIteratorNextSym) - ioRegistryEntryGetName := common.GetFunc[common.IORegistryEntryGetNameFunc](ioKit, common.IORegistryEntryGetNameSym) - ioRegistryEntryCreateCFProperty := common.GetFunc[common.IORegistryEntryCreateCFPropertyFunc](ioKit, common.IORegistryEntryCreateCFPropertySym) - ioObjectRelease := common.GetFunc[common.IOObjectReleaseFunc](ioKit, common.IOObjectReleaseSym) - - cfStringCreateWithCString := common.GetFunc[common.CFStringCreateWithCStringFunc](coreFoundation, common.CFStringCreateWithCStringSym) - cfDataGetLength := common.GetFunc[common.CFDataGetLengthFunc](coreFoundation, common.CFDataGetLengthSym) - cfDataGetBytePtr := common.GetFunc[common.CFDataGetBytePtrFunc](coreFoundation, common.CFDataGetBytePtrSym) - cfRelease := common.GetFunc[common.CFReleaseFunc](coreFoundation, common.CFReleaseSym) - - matching := ioServiceMatching("AppleARMIODevice") - - var iterator uint32 - if status := ioServiceGetMatchingServices(common.KIOMainPortDefault, uintptr(matching), &iterator); status != common.KERN_SUCCESS { - return 0.0, fmt.Errorf("IOServiceGetMatchingServices error=%d", status) - } - defer ioObjectRelease(iterator) - - pCorekey := cfStringCreateWithCString(common.KCFAllocatorDefault, "voltage-states5-sram", common.KCFStringEncodingUTF8) - defer cfRelease(uintptr(pCorekey)) - - var pCoreHz uint32 - for { - service := ioIteratorNext(iterator) - if !(service > 0) { - break - } - - buf := common.NewCStr(512) - ioRegistryEntryGetName(service, buf) - - if buf.GoString() == "pmgr" { - pCoreRef := ioRegistryEntryCreateCFProperty(service, uintptr(pCorekey), common.KCFAllocatorDefault, common.KNilOptions) - length := cfDataGetLength(uintptr(pCoreRef)) - data := cfDataGetBytePtr(uintptr(pCoreRef)) - - // composite uint32 from the byte array - buf := unsafe.Slice((*byte)(data), length) - - // combine the bytes into a uint32 value - b := buf[length-8 : length-4] - pCoreHz = binary.LittleEndian.Uint32(b) - ioObjectRelease(service) - break - } - - ioObjectRelease(service) - } - - return float64(pCoreHz / 1_000_000), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_fallback.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_fallback.go deleted file mode 100644 index b9e52aba17..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_darwin_fallback.go +++ /dev/null @@ -1,13 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin && !arm64 - -package cpu - -import "golang.org/x/sys/unix" - -func getFrequency() (float64, error) { - // Use the rated frequency of the CPU. This is a static value and does not - // account for low power or Turbo Boost modes. - cpuFrequency, err := unix.SysctlUint64("hw.cpufrequency") - return float64(cpuFrequency) / 1000000.0, err -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly.go deleted file mode 100644 index 8232c483cc..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly.go +++ /dev/null @@ -1,158 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -import ( - "context" - "fmt" - "reflect" - "regexp" - "runtime" - "strconv" - "strings" - "unsafe" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ( - ClocksPerSec = float64(128) - cpuMatch = regexp.MustCompile(`^CPU:`) - originMatch = regexp.MustCompile(`Origin\s*=\s*"(.+)"\s+Id\s*=\s*(.+)\s+Stepping\s*=\s*(.+)`) - featuresMatch = regexp.MustCompile(`Features=.+<(.+)>`) - featuresMatch2 = regexp.MustCompile(`Features2=[a-f\dx]+<(.+)>`) - cpuEnd = regexp.MustCompile(`^Trying to mount root`) - cpuTimesSize int - emptyTimes cpuTimes -) - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func timeStat(name string, t *cpuTimes) *TimesStat { - return &TimesStat{ - User: float64(t.User) / ClocksPerSec, - Nice: float64(t.Nice) / ClocksPerSec, - System: float64(t.Sys) / ClocksPerSec, - Idle: float64(t.Idle) / ClocksPerSec, - Irq: float64(t.Intr) / ClocksPerSec, - CPU: name, - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { - if percpu { - buf, err := unix.SysctlRaw("kern.cp_times") - if err != nil { - return nil, err - } - - // We can't do this in init due to the conflict with cpu.init() - if cpuTimesSize == 0 { - cpuTimesSize = int(reflect.TypeOf(cpuTimes{}).Size()) - } - - ncpus := len(buf) / cpuTimesSize - ret := make([]TimesStat, 0, ncpus) - for i := 0; i < ncpus; i++ { - times := (*cpuTimes)(unsafe.Pointer(&buf[i*cpuTimesSize])) - if *times == emptyTimes { - // CPU not present - continue - } - ret = append(ret, *timeStat(fmt.Sprintf("cpu%d", len(ret)), times)) - } - return ret, nil - } - - buf, err := unix.SysctlRaw("kern.cp_time") - if err != nil { - return nil, err - } - - times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - return []TimesStat{*timeStat("cpu-total", times)}, nil -} - -// Returns only one InfoStat on DragonflyBSD. The information regarding core -// count, however is accurate and it is assumed that all InfoStat attributes -// are the same across CPUs. -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - const dmesgBoot = "/var/run/dmesg.boot" - - c, err := parseDmesgBoot(dmesgBoot) - if err != nil { - return nil, err - } - - var u32 uint32 - if u32, err = unix.SysctlUint32("hw.clockrate"); err != nil { - return nil, err - } - c.Mhz = float64(u32) - - var num int - var buf string - if buf, err = unix.Sysctl("hw.cpu_topology.tree"); err != nil { - return nil, err - } - num = strings.Count(buf, "CHIP") - c.Cores = int32(strings.Count(string(buf), "CORE") / num) - - if c.ModelName, err = unix.Sysctl("hw.model"); err != nil { - return nil, err - } - - ret := make([]InfoStat, num) - for i := 0; i < num; i++ { - ret[i] = c - } - - return ret, nil -} - -func parseDmesgBoot(fileName string) (InfoStat, error) { - c := InfoStat{} - lines, _ := common.ReadLines(fileName) - for _, line := range lines { - if matches := cpuEnd.FindStringSubmatch(line); matches != nil { - break - } else if matches := originMatch.FindStringSubmatch(line); matches != nil { - c.VendorID = matches[1] - t, err := strconv.ParseInt(matches[2], 10, 32) - if err != nil { - return c, fmt.Errorf("unable to parse DragonflyBSD CPU stepping information from %q: %w", line, err) - } - c.Stepping = int32(t) - } else if matches := featuresMatch.FindStringSubmatch(line); matches != nil { - for _, v := range strings.Split(matches[1], ",") { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } else if matches := featuresMatch2.FindStringSubmatch(line); matches != nil { - for _, v := range strings.Split(matches[1], ",") { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } - } - - return c, nil -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly_amd64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly_amd64.go deleted file mode 100644 index 25ececa680..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_dragonfly_amd64.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go deleted file mode 100644 index 245c1ec98b..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_fallback.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build !darwin && !linux && !freebsd && !openbsd && !netbsd && !solaris && !windows && !dragonfly && !plan9 && !aix - -package cpu - -import ( - "context" - "runtime" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { - return []TimesStat{}, common.ErrNotImplementedError -} - -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - return []InfoStat{}, common.ErrNotImplementedError -} - -func CountsWithContext(ctx context.Context, logical bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd.go deleted file mode 100644 index 107b574f88..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd.go +++ /dev/null @@ -1,170 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -import ( - "context" - "fmt" - "reflect" - "regexp" - "runtime" - "strconv" - "strings" - "unsafe" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ( - ClocksPerSec = float64(128) - cpuMatch = regexp.MustCompile(`^CPU:`) - originMatch = regexp.MustCompile(`Origin\s*=\s*"(.+)"\s+Id\s*=\s*(.+)\s+Family\s*=\s*(.+)\s+Model\s*=\s*(.+)\s+Stepping\s*=\s*(.+)`) - featuresMatch = regexp.MustCompile(`Features=.+<(.+)>`) - featuresMatch2 = regexp.MustCompile(`Features2=[a-f\dx]+<(.+)>`) - cpuEnd = regexp.MustCompile(`^Trying to mount root`) - cpuCores = regexp.MustCompile(`FreeBSD/SMP: (\d*) package\(s\) x (\d*) core\(s\)`) - cpuTimesSize int - emptyTimes cpuTimes -) - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func timeStat(name string, t *cpuTimes) *TimesStat { - return &TimesStat{ - User: float64(t.User) / ClocksPerSec, - Nice: float64(t.Nice) / ClocksPerSec, - System: float64(t.Sys) / ClocksPerSec, - Idle: float64(t.Idle) / ClocksPerSec, - Irq: float64(t.Intr) / ClocksPerSec, - CPU: name, - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { - if percpu { - buf, err := unix.SysctlRaw("kern.cp_times") - if err != nil { - return nil, err - } - - // We can't do this in init due to the conflict with cpu.init() - if cpuTimesSize == 0 { - cpuTimesSize = int(reflect.TypeOf(cpuTimes{}).Size()) - } - - ncpus := len(buf) / cpuTimesSize - ret := make([]TimesStat, 0, ncpus) - for i := 0; i < ncpus; i++ { - times := (*cpuTimes)(unsafe.Pointer(&buf[i*cpuTimesSize])) - if *times == emptyTimes { - // CPU not present - continue - } - ret = append(ret, *timeStat(fmt.Sprintf("cpu%d", len(ret)), times)) - } - return ret, nil - } - - buf, err := unix.SysctlRaw("kern.cp_time") - if err != nil { - return nil, err - } - - times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - return []TimesStat{*timeStat("cpu-total", times)}, nil -} - -// Returns only one InfoStat on FreeBSD. The information regarding core -// count, however is accurate and it is assumed that all InfoStat attributes -// are the same across CPUs. -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - const dmesgBoot = "/var/run/dmesg.boot" - - c, num, err := parseDmesgBoot(dmesgBoot) - if err != nil { - return nil, err - } - - var u32 uint32 - if u32, err = unix.SysctlUint32("hw.clockrate"); err != nil { - return nil, err - } - c.Mhz = float64(u32) - - if u32, err = unix.SysctlUint32("hw.ncpu"); err != nil { - return nil, err - } - c.Cores = int32(u32) - - if c.ModelName, err = unix.Sysctl("hw.model"); err != nil { - return nil, err - } - - ret := make([]InfoStat, num) - for i := 0; i < num; i++ { - ret[i] = c - } - - return ret, nil -} - -func parseDmesgBoot(fileName string) (InfoStat, int, error) { - c := InfoStat{} - lines, _ := common.ReadLines(fileName) - cpuNum := 1 // default cpu num is 1 - for _, line := range lines { - if matches := cpuEnd.FindStringSubmatch(line); matches != nil { - break - } else if matches := originMatch.FindStringSubmatch(line); matches != nil { - c.VendorID = matches[1] - c.Family = matches[3] - c.Model = matches[4] - t, err := strconv.ParseInt(matches[5], 10, 32) - if err != nil { - return c, 0, fmt.Errorf("unable to parse FreeBSD CPU stepping information from %q: %w", line, err) - } - c.Stepping = int32(t) - } else if matches := featuresMatch.FindStringSubmatch(line); matches != nil { - for _, v := range strings.Split(matches[1], ",") { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } else if matches := featuresMatch2.FindStringSubmatch(line); matches != nil { - for _, v := range strings.Split(matches[1], ",") { - c.Flags = append(c.Flags, strings.ToLower(v)) - } - } else if matches := cpuCores.FindStringSubmatch(line); matches != nil { - t, err := strconv.ParseInt(matches[1], 10, 32) - if err != nil { - return c, 0, fmt.Errorf("unable to parse FreeBSD CPU Nums from %q: %w", line, err) - } - cpuNum = int(t) - t2, err := strconv.ParseInt(matches[2], 10, 32) - if err != nil { - return c, 0, fmt.Errorf("unable to parse FreeBSD CPU cores from %q: %w", line, err) - } - c.Cores = int32(t2) - } - } - - return c, cpuNum, nil -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_386.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_386.go deleted file mode 100644 index e4799bcf5c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_386.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint32 - Nice uint32 - Sys uint32 - Intr uint32 - Idle uint32 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_amd64.go deleted file mode 100644 index 25ececa680..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_amd64.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm.go deleted file mode 100644 index e4799bcf5c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint32 - Nice uint32 - Sys uint32 - Intr uint32 - Idle uint32 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm64.go deleted file mode 100644 index 25ececa680..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_freebsd_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go deleted file mode 100644 index a3c60ff06c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_linux.go +++ /dev/null @@ -1,479 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package cpu - -import ( - "context" - "errors" - "fmt" - "path/filepath" - "strconv" - "strings" - - "github.com/tklauser/go-sysconf" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ClocksPerSec = float64(100) - -var armModelToModelName = map[uint64]string{ - 0x810: "ARM810", - 0x920: "ARM920", - 0x922: "ARM922", - 0x926: "ARM926", - 0x940: "ARM940", - 0x946: "ARM946", - 0x966: "ARM966", - 0xa20: "ARM1020", - 0xa22: "ARM1022", - 0xa26: "ARM1026", - 0xb02: "ARM11 MPCore", - 0xb36: "ARM1136", - 0xb56: "ARM1156", - 0xb76: "ARM1176", - 0xc05: "Cortex-A5", - 0xc07: "Cortex-A7", - 0xc08: "Cortex-A8", - 0xc09: "Cortex-A9", - 0xc0d: "Cortex-A17", - 0xc0f: "Cortex-A15", - 0xc0e: "Cortex-A17", - 0xc14: "Cortex-R4", - 0xc15: "Cortex-R5", - 0xc17: "Cortex-R7", - 0xc18: "Cortex-R8", - 0xc20: "Cortex-M0", - 0xc21: "Cortex-M1", - 0xc23: "Cortex-M3", - 0xc24: "Cortex-M4", - 0xc27: "Cortex-M7", - 0xc60: "Cortex-M0+", - 0xd01: "Cortex-A32", - 0xd02: "Cortex-A34", - 0xd03: "Cortex-A53", - 0xd04: "Cortex-A35", - 0xd05: "Cortex-A55", - 0xd06: "Cortex-A65", - 0xd07: "Cortex-A57", - 0xd08: "Cortex-A72", - 0xd09: "Cortex-A73", - 0xd0a: "Cortex-A75", - 0xd0b: "Cortex-A76", - 0xd0c: "Neoverse-N1", - 0xd0d: "Cortex-A77", - 0xd0e: "Cortex-A76AE", - 0xd13: "Cortex-R52", - 0xd20: "Cortex-M23", - 0xd21: "Cortex-M33", - 0xd40: "Neoverse-V1", - 0xd41: "Cortex-A78", - 0xd42: "Cortex-A78AE", - 0xd43: "Cortex-A65AE", - 0xd44: "Cortex-X1", - 0xd46: "Cortex-A510", - 0xd47: "Cortex-A710", - 0xd48: "Cortex-X2", - 0xd49: "Neoverse-N2", - 0xd4a: "Neoverse-E1", - 0xd4b: "Cortex-A78C", - 0xd4c: "Cortex-X1C", - 0xd4d: "Cortex-A715", - 0xd4e: "Cortex-X3", -} - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { - filename := common.HostProcWithContext(ctx, "stat") - lines := []string{} - if percpu { - statlines, err := common.ReadLines(filename) - if err != nil || len(statlines) < 2 { - return []TimesStat{}, nil - } - for _, line := range statlines[1:] { - if !strings.HasPrefix(line, "cpu") { - break - } - lines = append(lines, line) - } - } else { - lines, _ = common.ReadLinesOffsetN(filename, 0, 1) - } - - ret := make([]TimesStat, 0, len(lines)) - - for _, line := range lines { - ct, err := parseStatLine(line) - if err != nil { - continue - } - ret = append(ret, *ct) - - } - return ret, nil -} - -func sysCPUPath(ctx context.Context, cpu int32, relPath string) string { - return common.HostSysWithContext(ctx, fmt.Sprintf("devices/system/cpu/cpu%d", cpu), relPath) -} - -func finishCPUInfo(ctx context.Context, c *InfoStat) { - var lines []string - var err error - var value float64 - - if len(c.CoreID) == 0 { - lines, err = common.ReadLines(sysCPUPath(ctx, c.CPU, "topology/core_id")) - if err == nil { - c.CoreID = lines[0] - } - } - - // override the value of c.Mhz with cpufreq/cpuinfo_max_freq regardless - // of the value from /proc/cpuinfo because we want to report the maximum - // clock-speed of the CPU for c.Mhz, matching the behaviour of Windows - lines, err = common.ReadLines(sysCPUPath(ctx, c.CPU, "cpufreq/cpuinfo_max_freq")) - // if we encounter errors below such as there are no cpuinfo_max_freq file, - // we just ignore. so let Mhz is 0. - if err != nil || len(lines) == 0 { - return - } - value, err = strconv.ParseFloat(lines[0], 64) - if err != nil { - return - } - c.Mhz = value / 1000.0 // value is in kHz - if c.Mhz > 9999 { - c.Mhz /= 1000.0 // value in Hz - } -} - -// CPUInfo on linux will return 1 item per physical thread. -// -// CPUs have three levels of counting: sockets, cores, threads. -// Cores with HyperThreading count as having 2 threads per core. -// Sockets often come with many physical CPU cores. -// For example a single socket board with two cores each with HT will -// return 4 CPUInfoStat structs on Linux and the "Cores" field set to 1. -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - filename := common.HostProcWithContext(ctx, "cpuinfo") - lines, _ := common.ReadLines(filename) - - var ret []InfoStat - var processorName string - - c := InfoStat{CPU: -1, Cores: 1} - for _, line := range lines { - fields := strings.Split(line, ":") - if len(fields) < 2 { - continue - } - key := strings.TrimSpace(fields[0]) - value := strings.TrimSpace(fields[1]) - - switch key { - case "Processor": - processorName = value - case "processor", "cpu number": - if c.CPU >= 0 { - finishCPUInfo(ctx, &c) - ret = append(ret, c) - } - c = InfoStat{Cores: 1, ModelName: processorName} - t, err := strconv.ParseInt(value, 10, 64) - if err != nil { - return ret, err - } - c.CPU = int32(t) - case "vendorId", "vendor_id": - c.VendorID = value - if strings.Contains(value, "S390") { - processorName = "S390" - } - case "CPU implementer": - if v, err := strconv.ParseUint(value, 0, 8); err == nil { - switch v { - case 0x41: - c.VendorID = "ARM" - case 0x42: - c.VendorID = "Broadcom" - case 0x43: - c.VendorID = "Cavium" - case 0x44: - c.VendorID = "DEC" - case 0x46: - c.VendorID = "Fujitsu" - case 0x48: - c.VendorID = "HiSilicon" - case 0x49: - c.VendorID = "Infineon" - case 0x4d: - c.VendorID = "Motorola/Freescale" - case 0x4e: - c.VendorID = "NVIDIA" - case 0x50: - c.VendorID = "APM" - case 0x51: - c.VendorID = "Qualcomm" - case 0x56: - c.VendorID = "Marvell" - case 0x61: - c.VendorID = "Apple" - case 0x69: - c.VendorID = "Intel" - case 0xc0: - c.VendorID = "Ampere" - } - } - case "cpu family": - c.Family = value - case "model", "CPU part": - c.Model = value - // if CPU is arm based, model name is found via model number. refer to: arch/arm64/kernel/cpuinfo.c - if c.VendorID == "ARM" { - if v, err := strconv.ParseUint(c.Model, 0, 16); err == nil { - modelName, exist := armModelToModelName[v] - if exist { - c.ModelName = modelName - } else { - c.ModelName = "Undefined" - } - } - } - case "Model Name", "model name", "cpu": - c.ModelName = value - if strings.Contains(value, "POWER") { - c.Model = strings.Split(value, " ")[0] - c.Family = "POWER" - c.VendorID = "IBM" - } - case "stepping", "revision", "CPU revision": - val := value - - if key == "revision" { - val = strings.Split(value, ".")[0] - } - - t, err := strconv.ParseInt(val, 10, 64) - if err != nil { - return ret, err - } - c.Stepping = int32(t) - case "cpu MHz", "clock", "cpu MHz dynamic": - // treat this as the fallback value, thus we ignore error - if t, err := strconv.ParseFloat(strings.Replace(value, "MHz", "", 1), 64); err == nil { - c.Mhz = t - } - case "cache size": - t, err := strconv.ParseInt(strings.Replace(value, " KB", "", 1), 10, 64) - if err != nil { - return ret, err - } - c.CacheSize = int32(t) - case "physical id": - c.PhysicalID = value - case "core id": - c.CoreID = value - case "flags", "Features": - c.Flags = strings.FieldsFunc(value, func(r rune) bool { - return r == ',' || r == ' ' - }) - case "microcode": - c.Microcode = value - } - } - if c.CPU >= 0 { - finishCPUInfo(ctx, &c) - ret = append(ret, c) - } - return ret, nil -} - -func parseStatLine(line string) (*TimesStat, error) { - fields := strings.Fields(line) - - if len(fields) < 8 { - return nil, errors.New("stat does not contain cpu info") - } - - if !strings.HasPrefix(fields[0], "cpu") { - return nil, errors.New("not contain cpu") - } - - cpu := fields[0] - if cpu == "cpu" { - cpu = "cpu-total" - } - user, err := strconv.ParseFloat(fields[1], 64) - if err != nil { - return nil, err - } - nice, err := strconv.ParseFloat(fields[2], 64) - if err != nil { - return nil, err - } - system, err := strconv.ParseFloat(fields[3], 64) - if err != nil { - return nil, err - } - idle, err := strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, err - } - iowait, err := strconv.ParseFloat(fields[5], 64) - if err != nil { - return nil, err - } - irq, err := strconv.ParseFloat(fields[6], 64) - if err != nil { - return nil, err - } - softirq, err := strconv.ParseFloat(fields[7], 64) - if err != nil { - return nil, err - } - - ct := &TimesStat{ - CPU: cpu, - User: user / ClocksPerSec, - Nice: nice / ClocksPerSec, - System: system / ClocksPerSec, - Idle: idle / ClocksPerSec, - Iowait: iowait / ClocksPerSec, - Irq: irq / ClocksPerSec, - Softirq: softirq / ClocksPerSec, - } - if len(fields) > 8 { // Linux >= 2.6.11 - steal, err := strconv.ParseFloat(fields[8], 64) - if err != nil { - return nil, err - } - ct.Steal = steal / ClocksPerSec - } - if len(fields) > 9 { // Linux >= 2.6.24 - guest, err := strconv.ParseFloat(fields[9], 64) - if err != nil { - return nil, err - } - ct.Guest = guest / ClocksPerSec - } - if len(fields) > 10 { // Linux >= 3.2.0 - guestNice, err := strconv.ParseFloat(fields[10], 64) - if err != nil { - return nil, err - } - ct.GuestNice = guestNice / ClocksPerSec - } - - return ct, nil -} - -func CountsWithContext(ctx context.Context, logical bool) (int, error) { - if logical { - ret := 0 - // https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_pslinux.py#L599 - procCpuinfo := common.HostProcWithContext(ctx, "cpuinfo") - lines, err := common.ReadLines(procCpuinfo) - if err == nil { - for _, line := range lines { - line = strings.ToLower(line) - if strings.HasPrefix(line, "processor") { - _, err = strconv.ParseInt(strings.TrimSpace(line[strings.IndexByte(line, ':')+1:]), 10, 32) - if err == nil { - ret++ - } - } - } - } - if ret == 0 { - procStat := common.HostProcWithContext(ctx, "stat") - lines, err = common.ReadLines(procStat) - if err != nil { - return 0, err - } - for _, line := range lines { - if len(line) >= 4 && strings.HasPrefix(line, "cpu") && '0' <= line[3] && line[3] <= '9' { // `^cpu\d` regexp matching - ret++ - } - } - } - return ret, nil - } - // physical cores - // https://github.com/giampaolo/psutil/blob/8415355c8badc9c94418b19bdf26e622f06f0cce/psutil/_pslinux.py#L615-L628 - threadSiblingsLists := make(map[string]bool) - // These 2 files are the same but */core_cpus_list is newer while */thread_siblings_list is deprecated and may disappear in the future. - // https://www.kernel.org/doc/Documentation/admin-guide/cputopology.rst - // https://github.com/giampaolo/psutil/pull/1727#issuecomment-707624964 - // https://lkml.org/lkml/2019/2/26/41 - for _, glob := range []string{"devices/system/cpu/cpu[0-9]*/topology/core_cpus_list", "devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list"} { - if files, err := filepath.Glob(common.HostSysWithContext(ctx, glob)); err == nil { - for _, file := range files { - lines, err := common.ReadLines(file) - if err != nil || len(lines) != 1 { - continue - } - threadSiblingsLists[lines[0]] = true - } - ret := len(threadSiblingsLists) - if ret != 0 { - return ret, nil - } - } - } - // https://github.com/giampaolo/psutil/blob/122174a10b75c9beebe15f6c07dcf3afbe3b120d/psutil/_pslinux.py#L631-L652 - filename := common.HostProcWithContext(ctx, "cpuinfo") - lines, err := common.ReadLines(filename) - if err != nil { - return 0, err - } - mapping := make(map[int]int) - currentInfo := make(map[string]int) - for _, line := range lines { - line = strings.ToLower(strings.TrimSpace(line)) - if line == "" { - // new section - id, okID := currentInfo["physical id"] - cores, okCores := currentInfo["cpu cores"] - if okID && okCores { - mapping[id] = cores - } - currentInfo = make(map[string]int) - continue - } - fields := strings.Split(line, ":") - if len(fields) < 2 { - continue - } - fields[0] = strings.TrimSpace(fields[0]) - if fields[0] == "physical id" || fields[0] == "cpu cores" { - val, err := strconv.ParseInt(strings.TrimSpace(fields[1]), 10, 32) - if err != nil { - continue - } - currentInfo[fields[0]] = int(val) - } - } - ret := 0 - for _, v := range mapping { - ret += v - } - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go deleted file mode 100644 index cc7698598f..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd.go +++ /dev/null @@ -1,120 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build netbsd - -package cpu - -import ( - "context" - "fmt" - "runtime" - "unsafe" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -const ( - // sys/sysctl.h - ctlKern = 1 // "high kernel": proc, limits - ctlHw = 6 // CTL_HW - kernCpTime = 51 // KERN_CPTIME -) - -var ClocksPerSec = float64(100) - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err error) { - if !percpu { - mib := []int32{ctlKern, kernCpTime} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return ret, err - } - times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - stat := TimesStat{ - CPU: "cpu-total", - User: float64(times.User), - Nice: float64(times.Nice), - System: float64(times.Sys), - Idle: float64(times.Idle), - Irq: float64(times.Intr), - } - return []TimesStat{stat}, nil - } - - ncpu, err := unix.SysctlUint32("hw.ncpu") - if err != nil { - return //nolint:nakedret //FIXME - } - - var i uint32 - for i = 0; i < ncpu; i++ { - mib := []int32{ctlKern, kernCpTime, int32(i)} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return ret, err - } - - stats := (*cpuTimes)(unsafe.Pointer(&buf[0])) - ret = append(ret, TimesStat{ - CPU: fmt.Sprintf("cpu%d", i), - User: float64(stats.User), - Nice: float64(stats.Nice), - System: float64(stats.Sys), - Idle: float64(stats.Idle), - Irq: float64(stats.Intr), - }) - } - - return ret, nil -} - -// Returns only one (minimal) CPUInfoStat on NetBSD -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - var ret []InfoStat - var err error - - c := InfoStat{} - - mhz, err := unix.Sysctl("machdep.dmi.processor-frequency") - if err != nil { - return nil, err - } - _, err = fmt.Sscanf(mhz, "%f", &c.Mhz) - if err != nil { - return nil, err - } - - ncpu, err := unix.SysctlUint32("hw.ncpuonline") - if err != nil { - return nil, err - } - c.Cores = int32(ncpu) - - if c.ModelName, err = unix.Sysctl("machdep.dmi.processor-version"); err != nil { - return nil, err - } - - return append(ret, c), nil -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_amd64.go deleted file mode 100644 index 25ececa680..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_amd64.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go deleted file mode 100644 index e4799bcf5c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint32 - Nice uint32 - Sys uint32 - Intr uint32 - Idle uint32 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm64.go deleted file mode 100644 index 25ececa680..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_netbsd_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go deleted file mode 100644 index 9038a4d33c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd.go +++ /dev/null @@ -1,138 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd - -package cpu - -import ( - "context" - "fmt" - "runtime" - "unsafe" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -const ( - // sys/sched.h - cpuOnline = 0x0001 // CPUSTATS_ONLINE - - // sys/sysctl.h - ctlKern = 1 // "high kernel": proc, limits - ctlHw = 6 // CTL_HW - smt = 24 // HW_SMT - kernCpTime = 40 // KERN_CPTIME - kernCPUStats = 85 // KERN_CPUSTATS -) - -var ClocksPerSec = float64(128) - -type cpuStats struct { - // cs_time[CPUSTATES] - User uint64 - Nice uint64 - Sys uint64 - Spin uint64 - Intr uint64 - Idle uint64 - - // cs_flags - Flags uint64 -} - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) (ret []TimesStat, err error) { - if !percpu { - mib := []int32{ctlKern, kernCpTime} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return ret, err - } - times := (*cpuTimes)(unsafe.Pointer(&buf[0])) - stat := TimesStat{ - CPU: "cpu-total", - User: float64(times.User) / ClocksPerSec, - Nice: float64(times.Nice) / ClocksPerSec, - System: float64(times.Sys) / ClocksPerSec, - Idle: float64(times.Idle) / ClocksPerSec, - Irq: float64(times.Intr) / ClocksPerSec, - } - return []TimesStat{stat}, nil - } - - ncpu, err := unix.SysctlUint32("hw.ncpu") - if err != nil { - return //nolint:nakedret //FIXME - } - - var i uint32 - for i = 0; i < ncpu; i++ { - mib := []int32{ctlKern, kernCPUStats, int32(i)} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return ret, err - } - - stats := (*cpuStats)(unsafe.Pointer(&buf[0])) - if (stats.Flags & cpuOnline) == 0 { - continue - } - ret = append(ret, TimesStat{ - CPU: fmt.Sprintf("cpu%d", i), - User: float64(stats.User) / ClocksPerSec, - Nice: float64(stats.Nice) / ClocksPerSec, - System: float64(stats.Sys) / ClocksPerSec, - Idle: float64(stats.Idle) / ClocksPerSec, - Irq: float64(stats.Intr) / ClocksPerSec, - }) - } - - return ret, nil -} - -// Returns only one (minimal) CPUInfoStat on OpenBSD -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - var ret []InfoStat - var err error - - c := InfoStat{} - - mhz, err := unix.SysctlUint32("hw.cpuspeed") - if err != nil { - return nil, err - } - c.Mhz = float64(mhz) - - ncpu, err := unix.SysctlUint32("hw.ncpuonline") - if err != nil { - return nil, err - } - c.Cores = int32(ncpu) - - if c.ModelName, err = unix.Sysctl("hw.model"); err != nil { - return nil, err - } - - return append(ret, c), nil -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_386.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_386.go deleted file mode 100644 index 40a6f43e49..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_386.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint32 - Nice uint32 - Sys uint32 - Spin uint32 - Intr uint32 - Idle uint32 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_amd64.go deleted file mode 100644 index 464156d540..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_amd64.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Spin uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm.go deleted file mode 100644 index 40a6f43e49..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint32 - Nice uint32 - Sys uint32 - Spin uint32 - Intr uint32 - Idle uint32 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm64.go deleted file mode 100644 index 464156d540..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Spin uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_riscv64.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_riscv64.go deleted file mode 100644 index 464156d540..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_openbsd_riscv64.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -type cpuTimes struct { - User uint64 - Nice uint64 - Sys uint64 - Spin uint64 - Intr uint64 - Idle uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_plan9.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_plan9.go deleted file mode 100644 index 02ad3f747c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_plan9.go +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build plan9 - -package cpu - -import ( - "context" - "os" - "runtime" - - stats "github.com/lufia/plan9stats" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(ctx context.Context, _ bool) ([]TimesStat, error) { - // BUG: percpu flag is not supported yet. - root := os.Getenv("HOST_ROOT") - c, err := stats.ReadCPUType(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - s, err := stats.ReadCPUStats(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - return []TimesStat{ - { - CPU: c.Name, - User: s.User.Seconds(), - System: s.Sys.Seconds(), - Idle: s.Idle.Seconds(), - }, - }, nil -} - -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(_ context.Context) ([]InfoStat, error) { - return []InfoStat{}, common.ErrNotImplementedError -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go deleted file mode 100644 index 1911c0fc8a..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_solaris.go +++ /dev/null @@ -1,270 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package cpu - -import ( - "context" - "errors" - "fmt" - "regexp" - "runtime" - "sort" - "strconv" - "strings" - - "github.com/tklauser/go-sysconf" -) - -var ClocksPerSec = float64(128) - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - ClocksPerSec = float64(clkTck) - } -} - -// sum all values in a float64 map with float64 keys -func msum(x map[float64]float64) float64 { - total := 0.0 - for _, y := range x { - total += y - } - return total -} - -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -var kstatSplit = regexp.MustCompile(`[:\s]+`) - -func TimesWithContext(ctx context.Context, percpu bool) ([]TimesStat, error) { - kstatSysOut, err := invoke.CommandWithContext(ctx, "kstat", "-p", "cpu_stat:*:*:/^idle$|^user$|^kernel$|^iowait$|^swap$/") - if err != nil { - return nil, fmt.Errorf("cannot execute kstat: %w", err) - } - cpu := make(map[float64]float64) - idle := make(map[float64]float64) - user := make(map[float64]float64) - kern := make(map[float64]float64) - iowt := make(map[float64]float64) - // swap := make(map[float64]float64) - for _, line := range strings.Split(string(kstatSysOut), "\n") { - fields := kstatSplit.Split(line, -1) - if fields[0] != "cpu_stat" { - continue - } - cpuNumber, err := strconv.ParseFloat(fields[1], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse cpu number: %w", err) - } - cpu[cpuNumber] = cpuNumber - switch fields[3] { - case "idle": - idle[cpuNumber], err = strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse idle: %w", err) - } - case "user": - user[cpuNumber], err = strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse user: %w", err) - } - case "kernel": - kern[cpuNumber], err = strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse kernel: %w", err) - } - case "iowait": - iowt[cpuNumber], err = strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse iowait: %w", err) - } - // not sure how this translates, don't report, add to kernel, something else? - /*case "swap": - swap[cpuNumber], err = strconv.ParseFloat(fields[4], 64) - if err != nil { - return nil, fmt.Errorf("cannot parse swap: %s", err) - } */ - } - } - ret := make([]TimesStat, 0, len(cpu)) - if percpu { - for _, c := range cpu { - ct := &TimesStat{ - CPU: fmt.Sprintf("cpu%d", int(cpu[c])), - Idle: idle[c] / ClocksPerSec, - User: user[c] / ClocksPerSec, - System: kern[c] / ClocksPerSec, - Iowait: iowt[c] / ClocksPerSec, - } - ret = append(ret, *ct) - } - } else { - ct := &TimesStat{ - CPU: "cpu-total", - Idle: msum(idle) / ClocksPerSec, - User: msum(user) / ClocksPerSec, - System: msum(kern) / ClocksPerSec, - Iowait: msum(iowt) / ClocksPerSec, - } - ret = append(ret, *ct) - } - return ret, nil -} - -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - psrInfoOut, err := invoke.CommandWithContext(ctx, "psrinfo", "-p", "-v") - if err != nil { - return nil, fmt.Errorf("cannot execute psrinfo: %w", err) - } - - procs, err := parseProcessorInfo(string(psrInfoOut)) - if err != nil { - return nil, fmt.Errorf("error parsing psrinfo output: %w", err) - } - - isaInfoOut, err := invoke.CommandWithContext(ctx, "isainfo", "-b", "-v") - if err != nil { - return nil, fmt.Errorf("cannot execute isainfo: %w", err) - } - - flags, err := parseISAInfo(string(isaInfoOut)) - if err != nil { - return nil, fmt.Errorf("error parsing isainfo output: %w", err) - } - - result := make([]InfoStat, 0, len(flags)) - for _, proc := range procs { - procWithFlags := proc - procWithFlags.Flags = flags - result = append(result, procWithFlags) - } - - return result, nil -} - -var flagsMatch = regexp.MustCompile(`[\w\.]+`) - -func parseISAInfo(cmdOutput string) ([]string, error) { - words := flagsMatch.FindAllString(cmdOutput, -1) - - // Sanity check the output - if len(words) < 4 || words[1] != "bit" || words[3] != "applications" { - return nil, errors.New("attempted to parse invalid isainfo output") - } - - flags := make([]string, len(words)-4) - for i, val := range words[4:] { //nolint:gosimple //FIXME - flags[i] = val - } - sort.Strings(flags) - - return flags, nil -} - -var psrInfoMatch = regexp.MustCompile(`The physical processor has (?:([\d]+) virtual processors? \(([\d-]+)\)|([\d]+) cores and ([\d]+) virtual processors[^\n]+)\n(?:\s+ The core has.+\n)*\s+.+ \((\w+) ([\S]+) family (.+) model (.+) step (.+) clock (.+) MHz\)\n[\s]*(.*)`) - -const ( - psrNumCoresOffset = 1 - psrNumCoresHTOffset = 3 - psrNumHTOffset = 4 - psrVendorIDOffset = 5 - psrFamilyOffset = 7 - psrModelOffset = 8 - psrStepOffset = 9 - psrClockOffset = 10 - psrModelNameOffset = 11 -) - -func parseProcessorInfo(cmdOutput string) ([]InfoStat, error) { - matches := psrInfoMatch.FindAllStringSubmatch(cmdOutput, -1) - - var infoStatCount int32 - result := make([]InfoStat, 0, len(matches)) - for physicalIndex, physicalCPU := range matches { - var step int32 - var clock float64 - - if physicalCPU[psrStepOffset] != "" { - stepParsed, err := strconv.ParseInt(physicalCPU[psrStepOffset], 10, 32) - if err != nil { - return nil, fmt.Errorf("cannot parse value %q for step as 32-bit integer: %w", physicalCPU[9], err) - } - step = int32(stepParsed) - } - - if physicalCPU[psrClockOffset] != "" { - clockParsed, err := strconv.ParseInt(physicalCPU[psrClockOffset], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse value %q for clock as 32-bit integer: %w", physicalCPU[10], err) - } - clock = float64(clockParsed) - } - - var err error - var numCores int64 - var numHT int64 - switch { - case physicalCPU[psrNumCoresOffset] != "": - numCores, err = strconv.ParseInt(physicalCPU[psrNumCoresOffset], 10, 32) - if err != nil { - return nil, fmt.Errorf("cannot parse value %q for core count as 32-bit integer: %w", physicalCPU[1], err) - } - - for i := 0; i < int(numCores); i++ { - result = append(result, InfoStat{ - CPU: infoStatCount, - PhysicalID: strconv.Itoa(physicalIndex), - CoreID: strconv.Itoa(i), - Cores: 1, - VendorID: physicalCPU[psrVendorIDOffset], - ModelName: physicalCPU[psrModelNameOffset], - Family: physicalCPU[psrFamilyOffset], - Model: physicalCPU[psrModelOffset], - Stepping: step, - Mhz: clock, - }) - infoStatCount++ - } - case physicalCPU[psrNumCoresHTOffset] != "": - numCores, err = strconv.ParseInt(physicalCPU[psrNumCoresHTOffset], 10, 32) - if err != nil { - return nil, fmt.Errorf("cannot parse value %q for core count as 32-bit integer: %w", physicalCPU[3], err) - } - - numHT, err = strconv.ParseInt(physicalCPU[psrNumHTOffset], 10, 32) - if err != nil { - return nil, fmt.Errorf("cannot parse value %q for hyperthread count as 32-bit integer: %w", physicalCPU[4], err) - } - - for i := 0; i < int(numCores); i++ { - result = append(result, InfoStat{ - CPU: infoStatCount, - PhysicalID: strconv.Itoa(physicalIndex), - CoreID: strconv.Itoa(i), - Cores: int32(numHT) / int32(numCores), - VendorID: physicalCPU[psrVendorIDOffset], - ModelName: physicalCPU[psrModelNameOffset], - Family: physicalCPU[psrFamilyOffset], - Model: physicalCPU[psrModelOffset], - Stepping: step, - Mhz: clock, - }) - infoStatCount++ - } - default: - return nil, errors.New("values for cores with and without hyperthreading are both set") - } - } - return result, nil -} - -func CountsWithContext(_ context.Context, _ bool) (int, error) { - return runtime.NumCPU(), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go b/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go deleted file mode 100644 index 3ca828126e..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/cpu/cpu_windows.go +++ /dev/null @@ -1,229 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package cpu - -import ( - "context" - "fmt" - "strconv" - "unsafe" - - "github.com/yusufpapurcu/wmi" - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo") - -type win32_Processor struct { //nolint:revive //FIXME - Family uint16 - Manufacturer string - Name string - NumberOfLogicalProcessors uint32 - NumberOfCores uint32 - ProcessorID *string - Stepping *string - MaxClockSpeed uint32 -} - -// SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION -// defined in windows api doc with the following -// https://docs.microsoft.com/en-us/windows/desktop/api/winternl/nf-winternl-ntquerysysteminformation#system_processor_performance_information -// additional fields documented here -// https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/processor_performance.htm -type win32_SystemProcessorPerformanceInformation struct { //nolint:revive //FIXME - IdleTime int64 // idle time in 100ns (this is not a filetime). - KernelTime int64 // kernel time in 100ns. kernel time includes idle time. (this is not a filetime). - UserTime int64 // usertime in 100ns (this is not a filetime). - DpcTime int64 // dpc time in 100ns (this is not a filetime). - InterruptTime int64 // interrupt time in 100ns - InterruptCount uint32 -} - -const ( - ClocksPerSec = 10000000.0 - - // systemProcessorPerformanceInformationClass information class to query with NTQuerySystemInformation - // https://processhacker.sourceforge.io/doc/ntexapi_8h.html#ad5d815b48e8f4da1ef2eb7a2f18a54e0 - win32_SystemProcessorPerformanceInformationClass = 8 //nolint:revive //FIXME - - // size of systemProcessorPerformanceInfoSize in memory - win32_SystemProcessorPerformanceInfoSize = uint32(unsafe.Sizeof(win32_SystemProcessorPerformanceInformation{})) //nolint:revive //FIXME -) - -// Times returns times stat per cpu and combined for all CPUs -func Times(percpu bool) ([]TimesStat, error) { - return TimesWithContext(context.Background(), percpu) -} - -func TimesWithContext(_ context.Context, percpu bool) ([]TimesStat, error) { - if percpu { - return perCPUTimes() - } - - var ret []TimesStat - var lpIdleTime common.FILETIME - var lpKernelTime common.FILETIME - var lpUserTime common.FILETIME - r, _, _ := common.ProcGetSystemTimes.Call( - uintptr(unsafe.Pointer(&lpIdleTime)), - uintptr(unsafe.Pointer(&lpKernelTime)), - uintptr(unsafe.Pointer(&lpUserTime))) - if r == 0 { - return ret, windows.GetLastError() - } - - LOT := float64(0.0000001) - HIT := (LOT * 4294967296.0) - idle := ((HIT * float64(lpIdleTime.DwHighDateTime)) + (LOT * float64(lpIdleTime.DwLowDateTime))) - user := ((HIT * float64(lpUserTime.DwHighDateTime)) + (LOT * float64(lpUserTime.DwLowDateTime))) - kernel := ((HIT * float64(lpKernelTime.DwHighDateTime)) + (LOT * float64(lpKernelTime.DwLowDateTime))) - system := (kernel - idle) - - ret = append(ret, TimesStat{ - CPU: "cpu-total", - Idle: float64(idle), - User: float64(user), - System: float64(system), - }) - return ret, nil -} - -func Info() ([]InfoStat, error) { - return InfoWithContext(context.Background()) -} - -func InfoWithContext(ctx context.Context) ([]InfoStat, error) { - var ret []InfoStat - var dst []win32_Processor - q := wmi.CreateQuery(&dst, "") - if err := common.WMIQueryWithContext(ctx, q, &dst); err != nil { - return ret, err - } - - var procID string - for i, l := range dst { - procID = "" - if l.ProcessorID != nil { - procID = *l.ProcessorID - } - - cpu := InfoStat{ - CPU: int32(i), - Family: strconv.FormatUint(uint64(l.Family), 10), - VendorID: l.Manufacturer, - ModelName: l.Name, - Cores: int32(l.NumberOfLogicalProcessors), - PhysicalID: procID, - Mhz: float64(l.MaxClockSpeed), - Flags: []string{}, - } - ret = append(ret, cpu) - } - - return ret, nil -} - -// perCPUTimes returns times stat per cpu, per core and overall for all CPUs -func perCPUTimes() ([]TimesStat, error) { - var ret []TimesStat - stats, err := perfInfo() - if err != nil { - return nil, err - } - for core, v := range stats { - c := TimesStat{ - CPU: fmt.Sprintf("cpu%d", core), - User: float64(v.UserTime) / ClocksPerSec, - System: float64(v.KernelTime-v.IdleTime) / ClocksPerSec, - Idle: float64(v.IdleTime) / ClocksPerSec, - Irq: float64(v.InterruptTime) / ClocksPerSec, - } - ret = append(ret, c) - } - return ret, nil -} - -// makes call to Windows API function to retrieve performance information for each core -func perfInfo() ([]win32_SystemProcessorPerformanceInformation, error) { - // Make maxResults large for safety. - // We can't invoke the api call with a results array that's too small. - // If we have more than 2056 cores on a single host, then it's probably the future. - maxBuffer := 2056 - // buffer for results from the windows proc - resultBuffer := make([]win32_SystemProcessorPerformanceInformation, maxBuffer) - // size of the buffer in memory - bufferSize := uintptr(win32_SystemProcessorPerformanceInfoSize) * uintptr(maxBuffer) - // size of the returned response - var retSize uint32 - - // Invoke windows api proc. - // The returned err from the windows dll proc will always be non-nil even when successful. - // See https://godoc.org/golang.org/x/sys/windows#LazyProc.Call for more information - retCode, _, err := common.ProcNtQuerySystemInformation.Call( - win32_SystemProcessorPerformanceInformationClass, // System Information Class -> SystemProcessorPerformanceInformation - uintptr(unsafe.Pointer(&resultBuffer[0])), // pointer to first element in result buffer - bufferSize, // size of the buffer in memory - uintptr(unsafe.Pointer(&retSize)), // pointer to the size of the returned results the windows proc will set this - ) - - // check return code for errors - if retCode != 0 { - return nil, fmt.Errorf("call to NtQuerySystemInformation returned %d. err: %s", retCode, err.Error()) - } - - // calculate the number of returned elements based on the returned size - numReturnedElements := retSize / win32_SystemProcessorPerformanceInfoSize - - // trim results to the number of returned elements - resultBuffer = resultBuffer[:numReturnedElements] - - return resultBuffer, nil -} - -// SystemInfo is an equivalent representation of SYSTEM_INFO in the Windows API. -// https://msdn.microsoft.com/en-us/library/ms724958%28VS.85%29.aspx?f=255&MSPPError=-2147217396 -// https://github.com/elastic/go-windows/blob/bb1581babc04d5cb29a2bfa7a9ac6781c730c8dd/kernel32.go#L43 -type systemInfo struct { - wProcessorArchitecture uint16 - wReserved uint16 - dwPageSize uint32 - lpMinimumApplicationAddress uintptr - lpMaximumApplicationAddress uintptr - dwActiveProcessorMask uintptr - dwNumberOfProcessors uint32 - dwProcessorType uint32 - dwAllocationGranularity uint32 - wProcessorLevel uint16 - wProcessorRevision uint16 -} - -func CountsWithContext(ctx context.Context, logical bool) (int, error) { - if logical { - // https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L97 - ret := windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS) - if ret != 0 { - return int(ret), nil - } - var systemInfo systemInfo - _, _, err := procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&systemInfo))) - if systemInfo.dwNumberOfProcessors == 0 { - return 0, err - } - return int(systemInfo.dwNumberOfProcessors), nil - } - // physical cores https://github.com/giampaolo/psutil/blob/d01a9eaa35a8aadf6c519839e987a49d8be2d891/psutil/_psutil_windows.c#L499 - // for the time being, try with unreliable and slow WMI call… - var dst []win32_Processor - q := wmi.CreateQuery(&dst, "") - if err := common.WMIQueryWithContext(ctx, q, &dst); err != nil { - return 0, err - } - var count uint32 - for _, d := range dst { - count += d.NumberOfCores - } - return int(count), nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go deleted file mode 100644 index 11a4fd410f..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/binary.go +++ /dev/null @@ -1,638 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -// Copyright 2009 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 binary implements simple translation between numbers and byte -// sequences and encoding and decoding of varints. -// -// Numbers are translated by reading and writing fixed-size values. -// A fixed-size value is either a fixed-size arithmetic -// type (int8, uint8, int16, float32, complex64, ...) -// or an array or struct containing only fixed-size values. -// -// The varint functions encode and decode single integer values using -// a variable-length encoding; smaller values require fewer bytes. -// For a specification, see -// http://code.google.com/apis/protocolbuffers/docs/encoding.html. -// -// This package favors simplicity over efficiency. Clients that require -// high-performance serialization, especially for large data structures, -// should look at more advanced solutions such as the encoding/gob -// package or protocol buffers. - -import ( - "errors" - "io" - "math" - "reflect" -) - -// A ByteOrder specifies how to convert byte sequences into -// 16-, 32-, or 64-bit unsigned integers. -type ByteOrder interface { - Uint16([]byte) uint16 - Uint32([]byte) uint32 - Uint64([]byte) uint64 - PutUint16([]byte, uint16) - PutUint32([]byte, uint32) - PutUint64([]byte, uint64) - String() string -} - -// LittleEndian is the little-endian implementation of ByteOrder. -var LittleEndian littleEndian - -// BigEndian is the big-endian implementation of ByteOrder. -var BigEndian bigEndian - -type littleEndian struct{} - -func (littleEndian) Uint16(b []byte) uint16 { return uint16(b[0]) | uint16(b[1])<<8 } - -func (littleEndian) PutUint16(b []byte, v uint16) { - b[0] = byte(v) - b[1] = byte(v >> 8) -} - -func (littleEndian) Uint32(b []byte) uint32 { - return uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 -} - -func (littleEndian) PutUint32(b []byte, v uint32) { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) -} - -func (littleEndian) Uint64(b []byte) uint64 { - return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 | - uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56 -} - -func (littleEndian) PutUint64(b []byte, v uint64) { - b[0] = byte(v) - b[1] = byte(v >> 8) - b[2] = byte(v >> 16) - b[3] = byte(v >> 24) - b[4] = byte(v >> 32) - b[5] = byte(v >> 40) - b[6] = byte(v >> 48) - b[7] = byte(v >> 56) -} - -func (littleEndian) String() string { return "LittleEndian" } - -func (littleEndian) GoString() string { return "binary.LittleEndian" } - -type bigEndian struct{} - -func (bigEndian) Uint16(b []byte) uint16 { return uint16(b[1]) | uint16(b[0])<<8 } - -func (bigEndian) PutUint16(b []byte, v uint16) { - b[0] = byte(v >> 8) - b[1] = byte(v) -} - -func (bigEndian) Uint32(b []byte) uint32 { - return uint32(b[3]) | uint32(b[2])<<8 | uint32(b[1])<<16 | uint32(b[0])<<24 -} - -func (bigEndian) PutUint32(b []byte, v uint32) { - b[0] = byte(v >> 24) - b[1] = byte(v >> 16) - b[2] = byte(v >> 8) - b[3] = byte(v) -} - -func (bigEndian) Uint64(b []byte) uint64 { - return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 | - uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56 -} - -func (bigEndian) PutUint64(b []byte, v uint64) { - b[0] = byte(v >> 56) - b[1] = byte(v >> 48) - b[2] = byte(v >> 40) - b[3] = byte(v >> 32) - b[4] = byte(v >> 24) - b[5] = byte(v >> 16) - b[6] = byte(v >> 8) - b[7] = byte(v) -} - -func (bigEndian) String() string { return "BigEndian" } - -func (bigEndian) GoString() string { return "binary.BigEndian" } - -// Read reads structured binary data from r into data. -// Data must be a pointer to a fixed-size value or a slice -// of fixed-size values. -// Bytes read from r are decoded using the specified byte order -// and written to successive fields of the data. -// When reading into structs, the field data for fields with -// blank (_) field names is skipped; i.e., blank field names -// may be used for padding. -// When reading into a struct, all non-blank fields must be exported. -func Read(r io.Reader, order ByteOrder, data any) error { - // Fast path for basic types and slices. - if n := intDataSize(data); n != 0 { - var b [8]byte - var bs []byte - if n > len(b) { - bs = make([]byte, n) - } else { - bs = b[:n] - } - if _, err := io.ReadFull(r, bs); err != nil { - return err - } - switch data := data.(type) { - case *int8: - *data = int8(b[0]) - case *uint8: - *data = b[0] - case *int16: - *data = int16(order.Uint16(bs)) - case *uint16: - *data = order.Uint16(bs) - case *int32: - *data = int32(order.Uint32(bs)) - case *uint32: - *data = order.Uint32(bs) - case *int64: - *data = int64(order.Uint64(bs)) - case *uint64: - *data = order.Uint64(bs) - case []int8: - for i, x := range bs { // Easier to loop over the input for 8-bit values. - data[i] = int8(x) - } - case []uint8: - copy(data, bs) - case []int16: - for i := range data { - data[i] = int16(order.Uint16(bs[2*i:])) - } - case []uint16: - for i := range data { - data[i] = order.Uint16(bs[2*i:]) - } - case []int32: - for i := range data { - data[i] = int32(order.Uint32(bs[4*i:])) - } - case []uint32: - for i := range data { - data[i] = order.Uint32(bs[4*i:]) - } - case []int64: - for i := range data { - data[i] = int64(order.Uint64(bs[8*i:])) - } - case []uint64: - for i := range data { - data[i] = order.Uint64(bs[8*i:]) - } - } - return nil - } - - // Fallback to reflect-based decoding. - v := reflect.ValueOf(data) - size := -1 - switch v.Kind() { - case reflect.Ptr: - v = v.Elem() - size = dataSize(v) - case reflect.Slice: - size = dataSize(v) - } - if size < 0 { - return errors.New("binary.Read: invalid type " + reflect.TypeOf(data).String()) - } - d := &decoder{order: order, buf: make([]byte, size)} - if _, err := io.ReadFull(r, d.buf); err != nil { - return err - } - d.value(v) - return nil -} - -// Write writes the binary representation of data into w. -// Data must be a fixed-size value or a slice of fixed-size -// values, or a pointer to such data. -// Bytes written to w are encoded using the specified byte order -// and read from successive fields of the data. -// When writing structs, zero values are written for fields -// with blank (_) field names. -func Write(w io.Writer, order ByteOrder, data any) error { - // Fast path for basic types and slices. - if n := intDataSize(data); n != 0 { - var b [8]byte - var bs []byte - if n > len(b) { - bs = make([]byte, n) - } else { - bs = b[:n] - } - switch v := data.(type) { - case *int8: - bs = b[:1] - b[0] = byte(*v) - case int8: - bs = b[:1] - b[0] = byte(v) - case []int8: - for i, x := range v { - bs[i] = byte(x) - } - case *uint8: - bs = b[:1] - b[0] = *v - case uint8: - bs = b[:1] - b[0] = byte(v) - case []uint8: - bs = v - case *int16: - bs = b[:2] - order.PutUint16(bs, uint16(*v)) - case int16: - bs = b[:2] - order.PutUint16(bs, uint16(v)) - case []int16: - for i, x := range v { - order.PutUint16(bs[2*i:], uint16(x)) - } - case *uint16: - bs = b[:2] - order.PutUint16(bs, *v) - case uint16: - bs = b[:2] - order.PutUint16(bs, v) - case []uint16: - for i, x := range v { - order.PutUint16(bs[2*i:], x) - } - case *int32: - bs = b[:4] - order.PutUint32(bs, uint32(*v)) - case int32: - bs = b[:4] - order.PutUint32(bs, uint32(v)) - case []int32: - for i, x := range v { - order.PutUint32(bs[4*i:], uint32(x)) - } - case *uint32: - bs = b[:4] - order.PutUint32(bs, *v) - case uint32: - bs = b[:4] - order.PutUint32(bs, v) - case []uint32: - for i, x := range v { - order.PutUint32(bs[4*i:], x) - } - case *int64: - bs = b[:8] - order.PutUint64(bs, uint64(*v)) - case int64: - bs = b[:8] - order.PutUint64(bs, uint64(v)) - case []int64: - for i, x := range v { - order.PutUint64(bs[8*i:], uint64(x)) - } - case *uint64: - bs = b[:8] - order.PutUint64(bs, *v) - case uint64: - bs = b[:8] - order.PutUint64(bs, v) - case []uint64: - for i, x := range v { - order.PutUint64(bs[8*i:], x) - } - } - _, err := w.Write(bs) - return err - } - - // Fallback to reflect-based encoding. - v := reflect.Indirect(reflect.ValueOf(data)) - size := dataSize(v) - if size < 0 { - return errors.New("binary.Write: invalid type " + reflect.TypeOf(data).String()) - } - buf := make([]byte, size) - e := &encoder{order: order, buf: buf} - e.value(v) - _, err := w.Write(buf) - return err -} - -// Size returns how many bytes Write would generate to encode the value v, which -// must be a fixed-size value or a slice of fixed-size values, or a pointer to such data. -// If v is neither of these, Size returns -1. -func Size(v any) int { - return dataSize(reflect.Indirect(reflect.ValueOf(v))) -} - -// dataSize returns the number of bytes the actual data represented by v occupies in memory. -// For compound structures, it sums the sizes of the elements. Thus, for instance, for a slice -// it returns the length of the slice times the element size and does not count the memory -// occupied by the header. If the type of v is not acceptable, dataSize returns -1. -func dataSize(v reflect.Value) int { - if v.Kind() == reflect.Slice { - if s := sizeof(v.Type().Elem()); s >= 0 { - return s * v.Len() - } - return -1 - } - return sizeof(v.Type()) -} - -// sizeof returns the size >= 0 of variables for the given type or -1 if the type is not acceptable. -func sizeof(t reflect.Type) int { - switch t.Kind() { - case reflect.Array: - if s := sizeof(t.Elem()); s >= 0 { - return s * t.Len() - } - - case reflect.Struct: - sum := 0 - for i, n := 0, t.NumField(); i < n; i++ { - s := sizeof(t.Field(i).Type) - if s < 0 { - return -1 - } - sum += s - } - return sum - - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, - reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, - reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128, reflect.Ptr: - return int(t.Size()) - } - - return -1 -} - -type coder struct { - order ByteOrder - buf []byte -} - -type ( - decoder coder - encoder coder -) - -func (d *decoder) uint8() uint8 { - x := d.buf[0] - d.buf = d.buf[1:] - return x -} - -func (e *encoder) uint8(x uint8) { - e.buf[0] = x - e.buf = e.buf[1:] -} - -func (d *decoder) uint16() uint16 { - x := d.order.Uint16(d.buf[0:2]) - d.buf = d.buf[2:] - return x -} - -func (e *encoder) uint16(x uint16) { - e.order.PutUint16(e.buf[0:2], x) - e.buf = e.buf[2:] -} - -func (d *decoder) uint32() uint32 { - x := d.order.Uint32(d.buf[0:4]) - d.buf = d.buf[4:] - return x -} - -func (e *encoder) uint32(x uint32) { - e.order.PutUint32(e.buf[0:4], x) - e.buf = e.buf[4:] -} - -func (d *decoder) uint64() uint64 { - x := d.order.Uint64(d.buf[0:8]) - d.buf = d.buf[8:] - return x -} - -func (e *encoder) uint64(x uint64) { - e.order.PutUint64(e.buf[0:8], x) - e.buf = e.buf[8:] -} - -func (d *decoder) int8() int8 { return int8(d.uint8()) } - -func (e *encoder) int8(x int8) { e.uint8(uint8(x)) } - -func (d *decoder) int16() int16 { return int16(d.uint16()) } - -func (e *encoder) int16(x int16) { e.uint16(uint16(x)) } - -func (d *decoder) int32() int32 { return int32(d.uint32()) } - -func (e *encoder) int32(x int32) { e.uint32(uint32(x)) } - -func (d *decoder) int64() int64 { return int64(d.uint64()) } - -func (e *encoder) int64(x int64) { e.uint64(uint64(x)) } - -func (d *decoder) value(v reflect.Value) { - switch v.Kind() { - case reflect.Array: - l := v.Len() - for i := 0; i < l; i++ { - d.value(v.Index(i)) - } - - case reflect.Struct: - t := v.Type() - l := v.NumField() - for i := 0; i < l; i++ { - // Note: Calling v.CanSet() below is an optimization. - // It would be sufficient to check the field name, - // but creating the StructField info for each field is - // costly (run "go test -bench=ReadStruct" and compare - // results when making changes to this code). - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { - d.value(v) - } else { - d.skip(v) - } - } - - case reflect.Slice: - l := v.Len() - for i := 0; i < l; i++ { - d.value(v.Index(i)) - } - - case reflect.Int8: - v.SetInt(int64(d.int8())) - case reflect.Int16: - v.SetInt(int64(d.int16())) - case reflect.Int32: - v.SetInt(int64(d.int32())) - case reflect.Int64: - v.SetInt(d.int64()) - - case reflect.Uint8: - v.SetUint(uint64(d.uint8())) - case reflect.Uint16: - v.SetUint(uint64(d.uint16())) - case reflect.Uint32: - v.SetUint(uint64(d.uint32())) - case reflect.Uint64: - v.SetUint(d.uint64()) - - case reflect.Float32: - v.SetFloat(float64(math.Float32frombits(d.uint32()))) - case reflect.Float64: - v.SetFloat(math.Float64frombits(d.uint64())) - - case reflect.Complex64: - v.SetComplex(complex( - float64(math.Float32frombits(d.uint32())), - float64(math.Float32frombits(d.uint32())), - )) - case reflect.Complex128: - v.SetComplex(complex( - math.Float64frombits(d.uint64()), - math.Float64frombits(d.uint64()), - )) - } -} - -func (e *encoder) value(v reflect.Value) { - switch v.Kind() { - case reflect.Array: - l := v.Len() - for i := 0; i < l; i++ { - e.value(v.Index(i)) - } - - case reflect.Struct: - t := v.Type() - l := v.NumField() - for i := 0; i < l; i++ { - // see comment for corresponding code in decoder.value() - if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { - e.value(v) - } else { - e.skip(v) - } - } - - case reflect.Slice: - l := v.Len() - for i := 0; i < l; i++ { - e.value(v.Index(i)) - } - - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - switch v.Type().Kind() { - case reflect.Int8: - e.int8(int8(v.Int())) - case reflect.Int16: - e.int16(int16(v.Int())) - case reflect.Int32: - e.int32(int32(v.Int())) - case reflect.Int64: - e.int64(v.Int()) - } - - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - switch v.Type().Kind() { - case reflect.Uint8: - e.uint8(uint8(v.Uint())) - case reflect.Uint16: - e.uint16(uint16(v.Uint())) - case reflect.Uint32: - e.uint32(uint32(v.Uint())) - case reflect.Uint64: - e.uint64(v.Uint()) - } - - case reflect.Float32, reflect.Float64: - switch v.Type().Kind() { - case reflect.Float32: - e.uint32(math.Float32bits(float32(v.Float()))) - case reflect.Float64: - e.uint64(math.Float64bits(v.Float())) - } - - case reflect.Complex64, reflect.Complex128: - switch v.Type().Kind() { - case reflect.Complex64: - x := v.Complex() - e.uint32(math.Float32bits(float32(real(x)))) - e.uint32(math.Float32bits(float32(imag(x)))) - case reflect.Complex128: - x := v.Complex() - e.uint64(math.Float64bits(real(x))) - e.uint64(math.Float64bits(imag(x))) - } - } -} - -func (d *decoder) skip(v reflect.Value) { - d.buf = d.buf[dataSize(v):] -} - -func (e *encoder) skip(v reflect.Value) { - n := dataSize(v) - for i := range e.buf[0:n] { - e.buf[i] = 0 - } - e.buf = e.buf[n:] -} - -// intDataSize returns the size of the data required to represent the data when encoded. -// It returns zero if the type cannot be implemented by the fast path in Read or Write. -func intDataSize(data any) int { - switch data := data.(type) { - case int8, *int8, *uint8: - return 1 - case []int8: - return len(data) - case []uint8: - return len(data) - case int16, *int16, *uint16: - return 2 - case []int16: - return 2 * len(data) - case []uint16: - return 2 * len(data) - case int32, *int32, *uint32: - return 4 - case []int32: - return 4 * len(data) - case []uint32: - return 4 * len(data) - case int64, *int64, *uint64: - return 8 - case []int64: - return 8 * len(data) - case []uint64: - return 8 * len(data) - } - return 0 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go deleted file mode 100644 index 4f9b2f7b96..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common.go +++ /dev/null @@ -1,473 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -// -// gopsutil is a port of psutil(http://pythonhosted.org/psutil/). -// This covers these architectures. -// - linux (amd64, arm) -// - freebsd (amd64) -// - windows (amd64) - -import ( - "bufio" - "bytes" - "context" - "errors" - "fmt" - "io" - "math" - "net/url" - "os" - "os/exec" - "path" - "path/filepath" - "reflect" - "runtime" - "strconv" - "strings" - "time" - - "github.com/shirou/gopsutil/v4/common" -) - -var ( - Timeout = 3 * time.Second - ErrNotImplementedError = errors.New("not implemented yet") - ErrTimeout = errors.New("command timed out") -) - -type Invoker interface { - Command(string, ...string) ([]byte, error) - CommandWithContext(context.Context, string, ...string) ([]byte, error) -} - -type Invoke struct{} - -func (i Invoke) Command(name string, arg ...string) ([]byte, error) { - ctx, cancel := context.WithTimeout(context.Background(), Timeout) - defer cancel() - return i.CommandWithContext(ctx, name, arg...) -} - -func (i Invoke) CommandWithContext(ctx context.Context, name string, arg ...string) ([]byte, error) { - cmd := exec.CommandContext(ctx, name, arg...) - - var buf bytes.Buffer - cmd.Stdout = &buf - cmd.Stderr = &buf - - if err := cmd.Start(); err != nil { - return buf.Bytes(), err - } - - if err := cmd.Wait(); err != nil { - return buf.Bytes(), err - } - - return buf.Bytes(), nil -} - -type FakeInvoke struct { - Suffix string // Suffix species expected file name suffix such as "fail" - Error error // If Error specified, return the error. -} - -// Command in FakeInvoke returns from expected file if exists. -func (i FakeInvoke) Command(name string, arg ...string) ([]byte, error) { - if i.Error != nil { - return []byte{}, i.Error - } - - arch := runtime.GOOS - - commandName := filepath.Base(name) - - fname := strings.Join(append([]string{commandName}, arg...), "") - fname = url.QueryEscape(fname) - fpath := path.Join("testdata", arch, fname) - if i.Suffix != "" { - fpath += "_" + i.Suffix - } - if PathExists(fpath) { - return os.ReadFile(fpath) - } - return []byte{}, fmt.Errorf("could not find testdata: %s", fpath) -} - -func (i FakeInvoke) CommandWithContext(_ context.Context, name string, arg ...string) ([]byte, error) { - return i.Command(name, arg...) -} - -// ReadFile reads contents from a file -func ReadFile(filename string) (string, error) { - content, err := os.ReadFile(filename) - if err != nil { - return "", err - } - - return string(content), nil -} - -// ReadLines reads contents from a file and splits them by new lines. -// A convenience wrapper to ReadLinesOffsetN(filename, 0, -1). -func ReadLines(filename string) ([]string, error) { - return ReadLinesOffsetN(filename, 0, -1) -} - -// ReadLine reads a file and returns the first occurrence of a line that is prefixed with prefix. -func ReadLine(filename string, prefix string) (string, error) { - f, err := os.Open(filename) - if err != nil { - return "", err - } - defer f.Close() - r := bufio.NewReader(f) - for { - line, err := r.ReadString('\n') - if err != nil { - if err == io.EOF { - break - } - return "", err - } - if strings.HasPrefix(line, prefix) { - return line, nil - } - } - - return "", nil -} - -// ReadLinesOffsetN reads contents from file and splits them by new line. -// The offset tells at which line number to start. -// The count determines the number of lines to read (starting from offset): -// n >= 0: at most n lines -// n < 0: whole file -func ReadLinesOffsetN(filename string, offset uint, n int) ([]string, error) { - f, err := os.Open(filename) - if err != nil { - return []string{""}, err - } - defer f.Close() - - var ret []string - - r := bufio.NewReader(f) - for i := uint(0); i < uint(n)+offset || n < 0; i++ { - line, err := r.ReadString('\n') - if err != nil { - if err == io.EOF && len(line) > 0 { - ret = append(ret, strings.Trim(line, "\n")) - } - break - } - if i < offset { - continue - } - ret = append(ret, strings.Trim(line, "\n")) - } - - return ret, nil -} - -func IntToString(orig []int8) string { - ret := make([]byte, len(orig)) - size := -1 - for i, o := range orig { - if o == 0 { - size = i - break - } - ret[i] = byte(o) - } - if size == -1 { - size = len(orig) - } - - return string(ret[0:size]) -} - -func UintToString(orig []uint8) string { - ret := make([]byte, len(orig)) - size := -1 - for i, o := range orig { - if o == 0 { - size = i - break - } - ret[i] = byte(o) - } - if size == -1 { - size = len(orig) - } - - return string(ret[0:size]) -} - -func ByteToString(orig []byte) string { - n := -1 - l := -1 - for i, b := range orig { - // skip left side null - if l == -1 && b == 0 { - continue - } - if l == -1 { - l = i - } - - if b == 0 { - break - } - n = i + 1 - } - if n == -1 { - return string(orig) - } - return string(orig[l:n]) -} - -// ReadInts reads contents from single line file and returns them as []int32. -func ReadInts(filename string) ([]int64, error) { - f, err := os.Open(filename) - if err != nil { - return []int64{}, err - } - defer f.Close() - - var ret []int64 - - r := bufio.NewReader(f) - - // The int files that this is concerned with should only be one liners. - line, err := r.ReadString('\n') - if err != nil { - return []int64{}, err - } - - i, err := strconv.ParseInt(strings.Trim(line, "\n"), 10, 32) - if err != nil { - return []int64{}, err - } - ret = append(ret, i) - - return ret, nil -} - -// Parse Hex to uint32 without error -func HexToUint32(hex string) uint32 { - vv, _ := strconv.ParseUint(hex, 16, 32) - return uint32(vv) -} - -// Parse to int32 without error -func mustParseInt32(val string) int32 { - vv, _ := strconv.ParseInt(val, 10, 32) - return int32(vv) -} - -// Parse to uint64 without error -func mustParseUint64(val string) uint64 { - vv, _ := strconv.ParseInt(val, 10, 64) - return uint64(vv) -} - -// Parse to Float64 without error -func mustParseFloat64(val string) float64 { - vv, _ := strconv.ParseFloat(val, 64) - return vv -} - -// StringsHas checks the target string slice contains src or not -func StringsHas(target []string, src string) bool { - for _, t := range target { - if strings.TrimSpace(t) == src { - return true - } - } - return false -} - -// StringsContains checks the src in any string of the target string slice -func StringsContains(target []string, src string) bool { - for _, t := range target { - if strings.Contains(t, src) { - return true - } - } - return false -} - -// IntContains checks the src in any int of the target int slice. -func IntContains(target []int, src int) bool { - for _, t := range target { - if src == t { - return true - } - } - return false -} - -// get struct attributes. -// This method is used only for debugging platform dependent code. -func attributes(m any) map[string]reflect.Type { - typ := reflect.TypeOf(m) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - } - - attrs := make(map[string]reflect.Type) - if typ.Kind() != reflect.Struct { - return nil - } - - for i := 0; i < typ.NumField(); i++ { - p := typ.Field(i) - if !p.Anonymous { - attrs[p.Name] = p.Type - } - } - - return attrs -} - -func PathExists(filename string) bool { - if _, err := os.Stat(filename); err == nil { - return true - } - return false -} - -// PathExistsWithContents returns the filename exists and it is not empty -func PathExistsWithContents(filename string) bool { - info, err := os.Stat(filename) - if err != nil { - return false - } - return info.Size() > 4 && !info.IsDir() // at least 4 bytes -} - -// GetEnvWithContext retrieves the environment variable key. If it does not exist it returns the default. -// The context may optionally contain a map superseding os.EnvKey. -func GetEnvWithContext(ctx context.Context, key string, dfault string, combineWith ...string) string { - var value string - if env, ok := ctx.Value(common.EnvKey).(common.EnvMap); ok { - value = env[common.EnvKeyType(key)] - } - if value == "" { - value = os.Getenv(key) - } - if value == "" { - value = dfault - } - - return combine(value, combineWith) -} - -// GetEnv retrieves the environment variable key. If it does not exist it returns the default. -func GetEnv(key string, dfault string, combineWith ...string) string { - value := os.Getenv(key) - if value == "" { - value = dfault - } - - return combine(value, combineWith) -} - -func combine(value string, combineWith []string) string { - switch len(combineWith) { - case 0: - return value - case 1: - return filepath.Join(value, combineWith[0]) - default: - all := make([]string, len(combineWith)+1) - all[0] = value - copy(all[1:], combineWith) - return filepath.Join(all...) - } -} - -func HostProc(combineWith ...string) string { - return GetEnv("HOST_PROC", "/proc", combineWith...) -} - -func HostSys(combineWith ...string) string { - return GetEnv("HOST_SYS", "/sys", combineWith...) -} - -func HostEtc(combineWith ...string) string { - return GetEnv("HOST_ETC", "/etc", combineWith...) -} - -func HostVar(combineWith ...string) string { - return GetEnv("HOST_VAR", "/var", combineWith...) -} - -func HostRun(combineWith ...string) string { - return GetEnv("HOST_RUN", "/run", combineWith...) -} - -func HostDev(combineWith ...string) string { - return GetEnv("HOST_DEV", "/dev", combineWith...) -} - -func HostRoot(combineWith ...string) string { - return GetEnv("HOST_ROOT", "/", combineWith...) -} - -func HostProcWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_PROC", "/proc", combineWith...) -} - -func HostProcMountInfoWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_PROC_MOUNTINFO", "", combineWith...) -} - -func HostSysWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_SYS", "/sys", combineWith...) -} - -func HostEtcWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_ETC", "/etc", combineWith...) -} - -func HostVarWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_VAR", "/var", combineWith...) -} - -func HostRunWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_RUN", "/run", combineWith...) -} - -func HostDevWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_DEV", "/dev", combineWith...) -} - -func HostRootWithContext(ctx context.Context, combineWith ...string) string { - return GetEnvWithContext(ctx, "HOST_ROOT", "/", combineWith...) -} - -// getSysctrlEnv sets LC_ALL=C in a list of env vars for use when running -// sysctl commands (see DoSysctrl). -func getSysctrlEnv(env []string) []string { - foundLC := false - for i, line := range env { - if strings.HasPrefix(line, "LC_ALL") { - env[i] = "LC_ALL=C" - foundLC = true - } - } - if !foundLC { - env = append(env, "LC_ALL=C") - } - return env -} - -// Round places rounds the number 'val' to 'n' decimal places -func Round(val float64, n int) float64 { - // Calculate the power of 10 to the n - pow10 := math.Pow(10, float64(n)) - // Multiply the value by pow10, round it, then divide it by pow10 - return math.Round(val*pow10) / pow10 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go deleted file mode 100644 index afa780d34e..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_darwin.go +++ /dev/null @@ -1,403 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin - -package common - -import ( - "context" - "errors" - "fmt" - "os" - "os/exec" - "strings" - "unsafe" - - "github.com/ebitengine/purego" - "golang.org/x/sys/unix" -) - -func DoSysctrlWithContext(ctx context.Context, mib string) ([]string, error) { - cmd := exec.CommandContext(ctx, "sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - 202, // unix.SYS___SYSCTL https://github.com/golang/sys/blob/76b94024e4b621e672466e8db3d7f084e7ddcad2/unix/zsysnum_darwin_amd64.go#L146 - uintptr(unsafe.Pointer(&mib[0])), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - 202, // unix.SYS___SYSCTL https://github.com/golang/sys/blob/76b94024e4b621e672466e8db3d7f084e7ddcad2/unix/zsysnum_darwin_amd64.go#L146 - uintptr(unsafe.Pointer(&mib[0])), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} - -// Library represents a dynamic library loaded by purego. -type Library struct { - addr uintptr - path string - close func() -} - -// library paths -const ( - IOKit = "/System/Library/Frameworks/IOKit.framework/IOKit" - CoreFoundation = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation" - System = "/usr/lib/libSystem.B.dylib" -) - -func NewLibrary(path string) (*Library, error) { - lib, err := purego.Dlopen(path, purego.RTLD_LAZY|purego.RTLD_GLOBAL) - if err != nil { - return nil, err - } - - closeFunc := func() { - purego.Dlclose(lib) - } - - return &Library{ - addr: lib, - path: path, - close: closeFunc, - }, nil -} - -func (lib *Library) Dlsym(symbol string) (uintptr, error) { - return purego.Dlsym(lib.addr, symbol) -} - -func GetFunc[T any](lib *Library, symbol string) T { - var fptr T - purego.RegisterLibFunc(&fptr, lib.addr, symbol) - return fptr -} - -func (lib *Library) Close() { - lib.close() -} - -// status codes -const ( - KERN_SUCCESS = 0 -) - -// IOKit functions and symbols. -type ( - IOServiceGetMatchingServiceFunc func(mainPort uint32, matching uintptr) uint32 - IOServiceGetMatchingServicesFunc func(mainPort uint32, matching uintptr, existing *uint32) int - IOServiceMatchingFunc func(name string) unsafe.Pointer - IOServiceOpenFunc func(service, owningTask, connType uint32, connect *uint32) int - IOServiceCloseFunc func(connect uint32) int - IOIteratorNextFunc func(iterator uint32) uint32 - IORegistryEntryGetNameFunc func(entry uint32, name CStr) int - IORegistryEntryGetParentEntryFunc func(entry uint32, plane string, parent *uint32) int - IORegistryEntryCreateCFPropertyFunc func(entry uint32, key, allocator uintptr, options uint32) unsafe.Pointer - IORegistryEntryCreateCFPropertiesFunc func(entry uint32, properties unsafe.Pointer, allocator uintptr, options uint32) int - IOObjectConformsToFunc func(object uint32, className string) bool - IOObjectReleaseFunc func(object uint32) int - IOConnectCallStructMethodFunc func(connection, selector uint32, inputStruct, inputStructCnt, outputStruct uintptr, outputStructCnt *uintptr) int - - IOHIDEventSystemClientCreateFunc func(allocator uintptr) unsafe.Pointer - IOHIDEventSystemClientSetMatchingFunc func(client, match uintptr) int - IOHIDServiceClientCopyEventFunc func(service uintptr, eventType int64, - options int32, timeout int64) unsafe.Pointer - IOHIDServiceClientCopyPropertyFunc func(service, property uintptr) unsafe.Pointer - IOHIDEventGetFloatValueFunc func(event uintptr, field int32) float64 - IOHIDEventSystemClientCopyServicesFunc func(client uintptr) unsafe.Pointer -) - -const ( - IOServiceGetMatchingServiceSym = "IOServiceGetMatchingService" - IOServiceGetMatchingServicesSym = "IOServiceGetMatchingServices" - IOServiceMatchingSym = "IOServiceMatching" - IOServiceOpenSym = "IOServiceOpen" - IOServiceCloseSym = "IOServiceClose" - IOIteratorNextSym = "IOIteratorNext" - IORegistryEntryGetNameSym = "IORegistryEntryGetName" - IORegistryEntryGetParentEntrySym = "IORegistryEntryGetParentEntry" - IORegistryEntryCreateCFPropertySym = "IORegistryEntryCreateCFProperty" - IORegistryEntryCreateCFPropertiesSym = "IORegistryEntryCreateCFProperties" - IOObjectConformsToSym = "IOObjectConformsTo" - IOObjectReleaseSym = "IOObjectRelease" - IOConnectCallStructMethodSym = "IOConnectCallStructMethod" - - IOHIDEventSystemClientCreateSym = "IOHIDEventSystemClientCreate" - IOHIDEventSystemClientSetMatchingSym = "IOHIDEventSystemClientSetMatching" - IOHIDServiceClientCopyEventSym = "IOHIDServiceClientCopyEvent" - IOHIDServiceClientCopyPropertySym = "IOHIDServiceClientCopyProperty" - IOHIDEventGetFloatValueSym = "IOHIDEventGetFloatValue" - IOHIDEventSystemClientCopyServicesSym = "IOHIDEventSystemClientCopyServices" -) - -const ( - KIOMainPortDefault = 0 - - KIOHIDEventTypeTemperature = 15 - - KNilOptions = 0 -) - -const ( - KIOMediaWholeKey = "Media" - KIOServicePlane = "IOService" -) - -// CoreFoundation functions and symbols. -type ( - CFGetTypeIDFunc func(cf uintptr) int32 - CFNumberCreateFunc func(allocator uintptr, theType int32, valuePtr uintptr) unsafe.Pointer - CFNumberGetValueFunc func(num uintptr, theType int32, valuePtr uintptr) bool - CFDictionaryCreateFunc func(allocator uintptr, keys, values *unsafe.Pointer, numValues int32, - keyCallBacks, valueCallBacks uintptr) unsafe.Pointer - CFDictionaryAddValueFunc func(theDict, key, value uintptr) - CFDictionaryGetValueFunc func(theDict, key uintptr) unsafe.Pointer - CFArrayGetCountFunc func(theArray uintptr) int32 - CFArrayGetValueAtIndexFunc func(theArray uintptr, index int32) unsafe.Pointer - CFStringCreateMutableFunc func(alloc uintptr, maxLength int32) unsafe.Pointer - CFStringGetLengthFunc func(theString uintptr) int32 - CFStringGetCStringFunc func(theString uintptr, buffer CStr, bufferSize int32, encoding uint32) - CFStringCreateWithCStringFunc func(alloc uintptr, cStr string, encoding uint32) unsafe.Pointer - CFDataGetLengthFunc func(theData uintptr) int32 - CFDataGetBytePtrFunc func(theData uintptr) unsafe.Pointer - CFReleaseFunc func(cf uintptr) -) - -const ( - CFGetTypeIDSym = "CFGetTypeID" - CFNumberCreateSym = "CFNumberCreate" - CFNumberGetValueSym = "CFNumberGetValue" - CFDictionaryCreateSym = "CFDictionaryCreate" - CFDictionaryAddValueSym = "CFDictionaryAddValue" - CFDictionaryGetValueSym = "CFDictionaryGetValue" - CFArrayGetCountSym = "CFArrayGetCount" - CFArrayGetValueAtIndexSym = "CFArrayGetValueAtIndex" - CFStringCreateMutableSym = "CFStringCreateMutable" - CFStringGetLengthSym = "CFStringGetLength" - CFStringGetCStringSym = "CFStringGetCString" - CFStringCreateWithCStringSym = "CFStringCreateWithCString" - CFDataGetLengthSym = "CFDataGetLength" - CFDataGetBytePtrSym = "CFDataGetBytePtr" - CFReleaseSym = "CFRelease" -) - -const ( - KCFStringEncodingUTF8 = 0x08000100 - KCFNumberSInt64Type = 4 - KCFNumberIntType = 9 - KCFAllocatorDefault = 0 -) - -// Kernel functions and symbols. -type MachTimeBaseInfo struct { - Numer uint32 - Denom uint32 -} - -type ( - HostProcessorInfoFunc func(host uint32, flavor int32, outProcessorCount *uint32, outProcessorInfo uintptr, - outProcessorInfoCnt *uint32) int - HostStatisticsFunc func(host uint32, flavor int32, hostInfoOut uintptr, hostInfoOutCnt *uint32) int - MachHostSelfFunc func() uint32 - MachTaskSelfFunc func() uint32 - MachTimeBaseInfoFunc func(info uintptr) int - VMDeallocateFunc func(targetTask uint32, vmAddress, vmSize uintptr) int -) - -const ( - HostProcessorInfoSym = "host_processor_info" - HostStatisticsSym = "host_statistics" - MachHostSelfSym = "mach_host_self" - MachTaskSelfSym = "mach_task_self" - MachTimeBaseInfoSym = "mach_timebase_info" - VMDeallocateSym = "vm_deallocate" -) - -const ( - CTL_KERN = 1 - KERN_ARGMAX = 8 - KERN_PROCARGS2 = 49 - - HOST_VM_INFO = 2 - HOST_CPU_LOAD_INFO = 3 - - HOST_VM_INFO_COUNT = 0xf -) - -// System functions and symbols. -type ( - ProcPidPathFunc func(pid int32, buffer uintptr, bufferSize uint32) int32 - ProcPidInfoFunc func(pid, flavor int32, arg uint64, buffer uintptr, bufferSize int32) int32 -) - -const ( - SysctlSym = "sysctl" - ProcPidPathSym = "proc_pidpath" - ProcPidInfoSym = "proc_pidinfo" -) - -const ( - MAXPATHLEN = 1024 - PROC_PIDPATHINFO_MAXSIZE = 4 * MAXPATHLEN - PROC_PIDTASKINFO = 4 - PROC_PIDVNODEPATHINFO = 9 -) - -// SMC represents a SMC instance. -type SMC struct { - lib *Library - conn uint32 - callStruct IOConnectCallStructMethodFunc -} - -const ioServiceSMC = "AppleSMC" - -const ( - KSMCUserClientOpen = 0 - KSMCUserClientClose = 1 - KSMCHandleYPCEvent = 2 - KSMCReadKey = 5 - KSMCWriteKey = 6 - KSMCGetKeyCount = 7 - KSMCGetKeyFromIndex = 8 - KSMCGetKeyInfo = 9 -) - -const ( - KSMCSuccess = 0 - KSMCError = 1 - KSMCKeyNotFound = 132 -) - -func NewSMC(ioKit *Library) (*SMC, error) { - if ioKit.path != IOKit { - return nil, errors.New("library is not IOKit") - } - - ioServiceGetMatchingService := GetFunc[IOServiceGetMatchingServiceFunc](ioKit, IOServiceGetMatchingServiceSym) - ioServiceMatching := GetFunc[IOServiceMatchingFunc](ioKit, IOServiceMatchingSym) - ioServiceOpen := GetFunc[IOServiceOpenFunc](ioKit, IOServiceOpenSym) - ioObjectRelease := GetFunc[IOObjectReleaseFunc](ioKit, IOObjectReleaseSym) - machTaskSelf := GetFunc[MachTaskSelfFunc](ioKit, MachTaskSelfSym) - - ioConnectCallStructMethod := GetFunc[IOConnectCallStructMethodFunc](ioKit, IOConnectCallStructMethodSym) - - service := ioServiceGetMatchingService(0, uintptr(ioServiceMatching(ioServiceSMC))) - if service == 0 { - return nil, fmt.Errorf("ERROR: %s NOT FOUND", ioServiceSMC) - } - - var conn uint32 - if result := ioServiceOpen(service, machTaskSelf(), 0, &conn); result != 0 { - return nil, errors.New("ERROR: IOServiceOpen failed") - } - - ioObjectRelease(service) - return &SMC{ - lib: ioKit, - conn: conn, - callStruct: ioConnectCallStructMethod, - }, nil -} - -func (s *SMC) CallStruct(selector uint32, inputStruct, inputStructCnt, outputStruct uintptr, outputStructCnt *uintptr) int { - return s.callStruct(s.conn, selector, inputStruct, inputStructCnt, outputStruct, outputStructCnt) -} - -func (s *SMC) Close() error { - ioServiceClose := GetFunc[IOServiceCloseFunc](s.lib, IOServiceCloseSym) - - if result := ioServiceClose(s.conn); result != 0 { - return errors.New("ERROR: IOServiceClose failed") - } - return nil -} - -type CStr []byte - -func NewCStr(length int32) CStr { - return make(CStr, length) -} - -func (s CStr) Length() int32 { - // Include null terminator to make CFStringGetCString properly functions - return int32(len(s)) + 1 -} - -func (s CStr) Ptr() *byte { - if len(s) < 1 { - return nil - } - - return &s[0] -} - -func (s CStr) Addr() uintptr { - return uintptr(unsafe.Pointer(s.Ptr())) -} - -func (s CStr) GoString() string { - if s == nil { - return "" - } - - var length int - for _, char := range s { - if char == '\x00' { - break - } - length++ - } - return string(s[:length]) -} - -// https://github.com/ebitengine/purego/blob/main/internal/strings/strings.go#L26 -func GoString(cStr *byte) string { - if cStr == nil { - return "" - } - var length int - for { - if *(*byte)(unsafe.Add(unsafe.Pointer(cStr), uintptr(length))) == '\x00' { - break - } - length++ - } - return string(unsafe.Slice(cStr, length)) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_freebsd.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_freebsd.go deleted file mode 100644 index 53cdceeb6d..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_freebsd.go +++ /dev/null @@ -1,82 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd || openbsd - -package common - -import ( - "fmt" - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func SysctlUint(mib string) (uint64, error) { - buf, err := unix.SysctlRaw(mib) - if err != nil { - return 0, err - } - if len(buf) == 8 { // 64 bit - return *(*uint64)(unsafe.Pointer(&buf[0])), nil - } - if len(buf) == 4 { // 32bit - t := *(*uint32)(unsafe.Pointer(&buf[0])) - return uint64(t), nil - } - return 0, fmt.Errorf("unexpected size: %s, %d", mib, len(buf)) -} - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go deleted file mode 100644 index 04ec171583..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_linux.go +++ /dev/null @@ -1,358 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package common - -import ( - "context" - "errors" - "os" - "os/exec" - "path/filepath" - "strconv" - "strings" - "sync" - "sync/atomic" - "syscall" - "time" -) - -// cachedBootTime must be accessed via atomic.Load/StoreUint64 -var cachedBootTime uint64 - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func NumProcs() (uint64, error) { - return NumProcsWithContext(context.Background()) -} - -func NumProcsWithContext(ctx context.Context) (uint64, error) { - f, err := os.Open(HostProcWithContext(ctx)) - if err != nil { - return 0, err - } - defer f.Close() - - list, err := f.Readdirnames(-1) - if err != nil { - return 0, err - } - var cnt uint64 - - for _, v := range list { - if _, err = strconv.ParseUint(v, 10, 64); err == nil { - cnt++ - } - } - - return cnt, nil -} - -func BootTimeWithContext(ctx context.Context, enableCache bool) (uint64, error) { - if enableCache { - t := atomic.LoadUint64(&cachedBootTime) - if t != 0 { - return t, nil - } - } - - system, role, err := VirtualizationWithContext(ctx) - if err != nil { - return 0, err - } - - useStatFile := true - if system == "lxc" && role == "guest" { - // if lxc, /proc/uptime is used. - useStatFile = false - } else if system == "docker" && role == "guest" { - // also docker, guest - useStatFile = false - } - - if useStatFile { - t, err := readBootTimeStat(ctx) - if err != nil { - return 0, err - } - if enableCache { - atomic.StoreUint64(&cachedBootTime, t) - } - - return t, nil - } - - filename := HostProcWithContext(ctx, "uptime") - lines, err := ReadLines(filename) - if err != nil { - return handleBootTimeFileReadErr(err) - } - currentTime := float64(time.Now().UnixNano()) / float64(time.Second) - - if len(lines) != 1 { - return 0, errors.New("wrong uptime format") - } - f := strings.Fields(lines[0]) - b, err := strconv.ParseFloat(f[0], 64) - if err != nil { - return 0, err - } - t := currentTime - b - - if enableCache { - atomic.StoreUint64(&cachedBootTime, uint64(t)) - } - - return uint64(t), nil -} - -func handleBootTimeFileReadErr(err error) (uint64, error) { - if os.IsPermission(err) { - var info syscall.Sysinfo_t - err := syscall.Sysinfo(&info) - if err != nil { - return 0, err - } - - currentTime := time.Now().UnixNano() / int64(time.Second) - t := currentTime - int64(info.Uptime) - return uint64(t), nil - } - return 0, err -} - -func readBootTimeStat(ctx context.Context) (uint64, error) { - filename := HostProcWithContext(ctx, "stat") - line, err := ReadLine(filename, "btime") - if err != nil { - return handleBootTimeFileReadErr(err) - } - if strings.HasPrefix(line, "btime") { - f := strings.Fields(line) - if len(f) != 2 { - return 0, errors.New("wrong btime format") - } - b, err := strconv.ParseInt(f[1], 10, 64) - if err != nil { - return 0, err - } - t := uint64(b) - return t, nil - } - return 0, errors.New("could not find btime") -} - -func Virtualization() (string, string, error) { - return VirtualizationWithContext(context.Background()) -} - -// required variables for concurrency safe virtualization caching -var ( - cachedVirtMap map[string]string - cachedVirtMutex sync.RWMutex - cachedVirtOnce sync.Once -) - -func VirtualizationWithContext(ctx context.Context) (string, string, error) { - var system, role string - - // if cached already, return from cache - cachedVirtMutex.RLock() // unlock won't be deferred so concurrent reads don't wait for long - if cachedVirtMap != nil { - cachedSystem, cachedRole := cachedVirtMap["system"], cachedVirtMap["role"] - cachedVirtMutex.RUnlock() - return cachedSystem, cachedRole, nil - } - cachedVirtMutex.RUnlock() - - filename := HostProcWithContext(ctx, "xen") - if PathExists(filename) { - system = "xen" - role = "guest" // assume guest - - if PathExists(filepath.Join(filename, "capabilities")) { - contents, err := ReadLines(filepath.Join(filename, "capabilities")) - if err == nil { - if StringsContains(contents, "control_d") { - role = "host" - } - } - } - } - - filename = HostProcWithContext(ctx, "modules") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - switch { - case StringsContains(contents, "kvm"): - system = "kvm" - role = "host" - case StringsContains(contents, "hv_util"): - system = "hyperv" - role = "guest" - case StringsContains(contents, "vboxdrv"): - system = "vbox" - role = "host" - case StringsContains(contents, "vboxguest"): - system = "vbox" - role = "guest" - case StringsContains(contents, "vmware"): - system = "vmware" - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx, "cpuinfo") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - if StringsContains(contents, "QEMU Virtual CPU") || - StringsContains(contents, "Common KVM processor") || - StringsContains(contents, "Common 32-bit KVM processor") { - system = "kvm" - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx, "bus/pci/devices") - if PathExists(filename) { - contents, err := ReadLines(filename) - if err == nil { - if StringsContains(contents, "virtio-pci") { - role = "guest" - } - } - } - - filename = HostProcWithContext(ctx) - if PathExists(filepath.Join(filename, "bc", "0")) { - system = "openvz" - role = "host" - } else if PathExists(filepath.Join(filename, "vz")) { - system = "openvz" - role = "guest" - } - - // not use dmidecode because it requires root - if PathExists(filepath.Join(filename, "self", "status")) { - contents, err := ReadLines(filepath.Join(filename, "self", "status")) - if err == nil { - if StringsContains(contents, "s_context:") || - StringsContains(contents, "VxID:") { - system = "linux-vserver" - } - // TODO: guest or host - } - } - - if PathExists(filepath.Join(filename, "1", "environ")) { - contents, err := ReadFile(filepath.Join(filename, "1", "environ")) - - if err == nil { - if strings.Contains(contents, "container=lxc") { - system = "lxc" - role = "guest" - } - } - } - - if PathExists(filepath.Join(filename, "self", "cgroup")) { - contents, err := ReadLines(filepath.Join(filename, "self", "cgroup")) - if err == nil { - switch { - case StringsContains(contents, "lxc"): - system = "lxc" - role = "guest" - case StringsContains(contents, "docker"): - system = "docker" - role = "guest" - case StringsContains(contents, "machine-rkt"): - system = "rkt" - role = "guest" - case PathExists("/usr/bin/lxc-version"): - system = "lxc" - role = "host" - } - } - } - - if PathExists(HostEtcWithContext(ctx, "os-release")) { - p, _, err := GetOSReleaseWithContext(ctx) - if err == nil && p == "coreos" { - system = "rkt" // Is it true? - role = "host" - } - } - - if PathExists(HostRootWithContext(ctx, ".dockerenv")) { - system = "docker" - role = "guest" - } - - // before returning for the first time, cache the system and role - cachedVirtOnce.Do(func() { - cachedVirtMutex.Lock() - defer cachedVirtMutex.Unlock() - cachedVirtMap = map[string]string{ - "system": system, - "role": role, - } - }) - - return system, role, nil -} - -func GetOSRelease() (platform string, version string, err error) { - return GetOSReleaseWithContext(context.Background()) -} - -func GetOSReleaseWithContext(ctx context.Context) (platform string, version string, err error) { - contents, err := ReadLines(HostEtcWithContext(ctx, "os-release")) - if err != nil { - return "", "", nil // return empty - } - for _, line := range contents { - field := strings.Split(line, "=") - if len(field) < 2 { - continue - } - switch field[0] { - case "ID": // use ID for lowercase - platform = trimQuotes(field[1]) - case "VERSION_ID": - version = trimQuotes(field[1]) - } - } - - // cleanup amazon ID - if platform == "amzn" { - platform = "amazon" - } - - return platform, version, nil -} - -// Remove quotes of the source string -func trimQuotes(s string) string { - if len(s) >= 2 { - if s[0] == '"' && s[len(s)-1] == '"' { - return s[1 : len(s)-1] - } - } - return s -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_netbsd.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_netbsd.go deleted file mode 100644 index 206532126c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_netbsd.go +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build netbsd - -package common - -import ( - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_openbsd.go deleted file mode 100644 index 00fa19a2fb..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_openbsd.go +++ /dev/null @@ -1,66 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd - -package common - -import ( - "os" - "os/exec" - "strings" - "unsafe" - - "golang.org/x/sys/unix" -) - -func DoSysctrl(mib string) ([]string, error) { - cmd := exec.Command("sysctl", "-n", mib) - cmd.Env = getSysctrlEnv(os.Environ()) - out, err := cmd.Output() - if err != nil { - return []string{}, err - } - v := strings.Replace(string(out), "{ ", "", 1) - v = strings.Replace(string(v), " }", "", 1) - values := strings.Fields(string(v)) - - return values, nil -} - -func CallSyscall(mib []int32) ([]byte, uint64, error) { - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - - // get required buffer size - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - var b []byte - return b, length, err - } - if length == 0 { - var b []byte - return b, length, err - } - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_testing.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_testing.go deleted file mode 100644 index 55f36f1f38..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_testing.go +++ /dev/null @@ -1,14 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -import ( - "errors" - "testing" -) - -func SkipIfNotImplementedErr(tb testing.TB, err error) { - tb.Helper() - if errors.Is(err, ErrNotImplementedError) { - tb.Skip("not implemented") - } -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go deleted file mode 100644 index c9f91b1698..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_unix.go +++ /dev/null @@ -1,42 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux || freebsd || darwin || openbsd - -package common - -import ( - "context" - "errors" - "os/exec" - "strconv" - "strings" -) - -func CallLsofWithContext(ctx context.Context, invoke Invoker, pid int32, args ...string) ([]string, error) { - var cmd []string - if pid == 0 { // will get from all processes. - cmd = []string{"-a", "-n", "-P"} - } else { - cmd = []string{"-a", "-n", "-P", "-p", strconv.Itoa(int(pid))} - } - cmd = append(cmd, args...) - out, err := invoke.CommandWithContext(ctx, "lsof", cmd...) - if err != nil { - if errors.Is(err, exec.ErrNotFound) { - return []string{}, err - } - // if no pid found, lsof returns code 1. - if err.Error() == "exit status 1" && len(out) == 0 { - return []string{}, nil - } - } - lines := strings.Split(string(out), "\n") - - var ret []string - for _, l := range lines[1:] { - if len(l) == 0 { - continue - } - ret = append(ret, l) - } - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_windows.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/common_windows.go deleted file mode 100644 index f3ec5a9864..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/common_windows.go +++ /dev/null @@ -1,304 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package common - -import ( - "context" - "fmt" - "path/filepath" - "reflect" - "strings" - "syscall" - "unsafe" - - "github.com/yusufpapurcu/wmi" - "golang.org/x/sys/windows" -) - -// for double values -type PDH_FMT_COUNTERVALUE_DOUBLE struct { //nolint:revive //FIXME - CStatus uint32 - DoubleValue float64 -} - -// for 64 bit integer values -type PDH_FMT_COUNTERVALUE_LARGE struct { //nolint:revive //FIXME - CStatus uint32 - LargeValue int64 -} - -// for long values -type PDH_FMT_COUNTERVALUE_LONG struct { //nolint:revive //FIXME - CStatus uint32 - LongValue int32 - padding [4]byte -} - -// windows system const -const ( - ERROR_SUCCESS = 0 - ERROR_FILE_NOT_FOUND = 2 - DRIVE_REMOVABLE = 2 - DRIVE_FIXED = 3 - HKEY_LOCAL_MACHINE = 0x80000002 - RRF_RT_REG_SZ = 0x00000002 - RRF_RT_REG_DWORD = 0x00000010 - PDH_FMT_LONG = 0x00000100 - PDH_FMT_DOUBLE = 0x00000200 - PDH_FMT_LARGE = 0x00000400 - PDH_INVALID_DATA = 0xc0000bc6 - PDH_INVALID_HANDLE = 0xC0000bbc - PDH_NO_DATA = 0x800007d5 - - STATUS_BUFFER_OVERFLOW = 0x80000005 - STATUS_BUFFER_TOO_SMALL = 0xC0000023 - STATUS_INFO_LENGTH_MISMATCH = 0xC0000004 -) - -const ( - ProcessBasicInformation = 0 - ProcessWow64Information = 26 - ProcessQueryInformation = windows.PROCESS_DUP_HANDLE | windows.PROCESS_QUERY_INFORMATION - - SystemExtendedHandleInformationClass = 64 -) - -var ( - Modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - ModNt = windows.NewLazySystemDLL("ntdll.dll") - ModPdh = windows.NewLazySystemDLL("pdh.dll") - ModPsapi = windows.NewLazySystemDLL("psapi.dll") - - ProcGetSystemTimes = Modkernel32.NewProc("GetSystemTimes") - ProcNtQuerySystemInformation = ModNt.NewProc("NtQuerySystemInformation") - ProcRtlGetNativeSystemInformation = ModNt.NewProc("RtlGetNativeSystemInformation") - ProcRtlNtStatusToDosError = ModNt.NewProc("RtlNtStatusToDosError") - ProcNtQueryInformationProcess = ModNt.NewProc("NtQueryInformationProcess") - ProcNtReadVirtualMemory = ModNt.NewProc("NtReadVirtualMemory") - ProcNtWow64QueryInformationProcess64 = ModNt.NewProc("NtWow64QueryInformationProcess64") - ProcNtWow64ReadVirtualMemory64 = ModNt.NewProc("NtWow64ReadVirtualMemory64") - - PdhOpenQuery = ModPdh.NewProc("PdhOpenQuery") - PdhAddEnglishCounterW = ModPdh.NewProc("PdhAddEnglishCounterW") - PdhCollectQueryData = ModPdh.NewProc("PdhCollectQueryData") - PdhGetFormattedCounterValue = ModPdh.NewProc("PdhGetFormattedCounterValue") - PdhCloseQuery = ModPdh.NewProc("PdhCloseQuery") - - procQueryDosDeviceW = Modkernel32.NewProc("QueryDosDeviceW") -) - -type FILETIME struct { - DwLowDateTime uint32 - DwHighDateTime uint32 -} - -// borrowed from net/interface_windows.go -func BytePtrToString(p *uint8) string { - a := (*[10000]uint8)(unsafe.Pointer(p)) - i := 0 - for a[i] != 0 { - i++ - } - return string(a[:i]) -} - -// CounterInfo struct is used to track a windows performance counter -// copied from https://github.com/mackerelio/mackerel-agent/ -type CounterInfo struct { - PostName string - CounterName string - Counter windows.Handle -} - -// CreateQuery with a PdhOpenQuery call -// copied from https://github.com/mackerelio/mackerel-agent/ -func CreateQuery() (windows.Handle, error) { - var query windows.Handle - r, _, err := PdhOpenQuery.Call(0, 0, uintptr(unsafe.Pointer(&query))) - if r != 0 { - return 0, err - } - return query, nil -} - -// CreateCounter with a PdhAddEnglishCounterW call -func CreateCounter(query windows.Handle, pname, cname string) (*CounterInfo, error) { - var counter windows.Handle - r, _, err := PdhAddEnglishCounterW.Call( - uintptr(query), - uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(cname))), - 0, - uintptr(unsafe.Pointer(&counter))) - if r != 0 { - return nil, err - } - return &CounterInfo{ - PostName: pname, - CounterName: cname, - Counter: counter, - }, nil -} - -// GetCounterValue get counter value from handle -// adapted from https://github.com/mackerelio/mackerel-agent/ -func GetCounterValue(counter windows.Handle) (float64, error) { - var value PDH_FMT_COUNTERVALUE_DOUBLE - r, _, err := PdhGetFormattedCounterValue.Call(uintptr(counter), PDH_FMT_DOUBLE, uintptr(0), uintptr(unsafe.Pointer(&value))) - if r != 0 && r != PDH_INVALID_DATA { - return 0.0, err - } - return value.DoubleValue, nil -} - -type Win32PerformanceCounter struct { - PostName string - CounterName string - Query windows.Handle - Counter windows.Handle -} - -func NewWin32PerformanceCounter(postName, counterName string) (*Win32PerformanceCounter, error) { - query, err := CreateQuery() - if err != nil { - return nil, err - } - counter := Win32PerformanceCounter{ - Query: query, - PostName: postName, - CounterName: counterName, - } - r, _, err := PdhAddEnglishCounterW.Call( - uintptr(counter.Query), - uintptr(unsafe.Pointer(windows.StringToUTF16Ptr(counter.CounterName))), - 0, - uintptr(unsafe.Pointer(&counter.Counter)), - ) - if r != 0 { - return nil, err - } - return &counter, nil -} - -func (w *Win32PerformanceCounter) GetValue() (float64, error) { - r, _, err := PdhCollectQueryData.Call(uintptr(w.Query)) - if r != 0 && err != nil { - if r == PDH_NO_DATA { - return 0.0, fmt.Errorf("%w: this counter has not data", err) - } - return 0.0, err - } - - return GetCounterValue(w.Counter) -} - -func ProcessorQueueLengthCounter() (*Win32PerformanceCounter, error) { - return NewWin32PerformanceCounter("processor_queue_length", `\System\Processor Queue Length`) -} - -// WMIQueryWithContext - wraps wmi.Query with a timed-out context to avoid hanging -func WMIQueryWithContext(ctx context.Context, query string, dst any, connectServerArgs ...any) error { - if _, ok := ctx.Deadline(); !ok { - ctxTimeout, cancel := context.WithTimeout(ctx, Timeout) - defer cancel() - ctx = ctxTimeout - } - - errChan := make(chan error, 1) - go func() { - errChan <- wmi.Query(query, dst, connectServerArgs...) - }() - - select { - case <-ctx.Done(): - return ctx.Err() - case err := <-errChan: - return err - } -} - -// Convert paths using native DOS format like: -// -// "\Device\HarddiskVolume1\Windows\systemew\file.txt" -// -// into: -// -// "C:\Windows\systemew\file.txt" -func ConvertDOSPath(p string) string { - rawDrive := strings.Join(strings.Split(p, `\`)[:3], `\`) - - for d := 'A'; d <= 'Z'; d++ { - szDeviceName := string(d) + ":" - szTarget := make([]uint16, 512) - ret, _, _ := procQueryDosDeviceW.Call(uintptr(unsafe.Pointer(syscall.StringToUTF16Ptr(szDeviceName))), - uintptr(unsafe.Pointer(&szTarget[0])), - uintptr(len(szTarget))) - if ret != 0 && windows.UTF16ToString(szTarget) == rawDrive { - return filepath.Join(szDeviceName, p[len(rawDrive):]) - } - } - return p -} - -type NtStatus uint32 - -func (s NtStatus) Error() error { - if s == 0 { - return nil - } - return fmt.Errorf("NtStatus 0x%08x", uint32(s)) -} - -func (s NtStatus) IsError() bool { - return s>>30 == 3 -} - -type SystemExtendedHandleTableEntryInformation struct { - Object uintptr - UniqueProcessId uintptr - HandleValue uintptr - GrantedAccess uint32 - CreatorBackTraceIndex uint16 - ObjectTypeIndex uint16 - HandleAttributes uint32 - Reserved uint32 -} - -type SystemExtendedHandleInformation struct { - NumberOfHandles uintptr - Reserved uintptr - Handles [1]SystemExtendedHandleTableEntryInformation -} - -// CallWithExpandingBuffer https://github.com/hillu/go-ntdll -func CallWithExpandingBuffer(fn func() NtStatus, buf *[]byte, resultLength *uint32) NtStatus { - for { - st := fn() - if st == STATUS_BUFFER_OVERFLOW || st == STATUS_BUFFER_TOO_SMALL || st == STATUS_INFO_LENGTH_MISMATCH { - if int(*resultLength) <= cap(*buf) { - (*reflect.SliceHeader)(unsafe.Pointer(buf)).Len = int(*resultLength) - } else { - *buf = make([]byte, int(*resultLength)) - } - continue - } - if !st.IsError() { - *buf = (*buf)[:int(*resultLength)] - } - return st - } -} - -func NtQuerySystemInformation( - SystemInformationClass uint32, - SystemInformation *byte, - SystemInformationLength uint32, - ReturnLength *uint32, -) NtStatus { - r0, _, _ := ProcNtQuerySystemInformation.Call( - uintptr(SystemInformationClass), - uintptr(unsafe.Pointer(SystemInformation)), - uintptr(SystemInformationLength), - uintptr(unsafe.Pointer(ReturnLength))) - return NtStatus(r0) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/endian.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/endian.go deleted file mode 100644 index 113ff2e9f4..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/endian.go +++ /dev/null @@ -1,11 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -import "unsafe" - -// IsLittleEndian checks if the current platform uses little-endian. -// copied from https://github.com/ntrrg/ntgo/blob/v0.8.0/runtime/infrastructure.go#L16 (MIT License) -func IsLittleEndian() bool { - var x int16 = 0x0011 - return *(*byte)(unsafe.Pointer(&x)) == 0x11 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/sleep.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/sleep.go deleted file mode 100644 index 504f13ffd9..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/sleep.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -import ( - "context" - "time" -) - -// Sleep awaits for provided interval. -// Can be interrupted by context cancellation. -func Sleep(ctx context.Context, interval time.Duration) error { - timer := time.NewTimer(interval) - select { - case <-ctx.Done(): - if !timer.Stop() { - <-timer.C - } - return ctx.Err() - case <-timer.C: - return nil - } -} diff --git a/vendor/github.com/shirou/gopsutil/v4/internal/common/warnings.go b/vendor/github.com/shirou/gopsutil/v4/internal/common/warnings.go deleted file mode 100644 index 888cc57fae..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/internal/common/warnings.go +++ /dev/null @@ -1,31 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package common - -import "fmt" - -type Warnings struct { - List []error - Verbose bool -} - -func (w *Warnings) Add(err error) { - w.List = append(w.List, err) -} - -func (w *Warnings) Reference() error { - if len(w.List) > 0 { - return w - } - return nil -} - -func (w *Warnings) Error() string { - if w.Verbose { - str := "" - for i, e := range w.List { - str += fmt.Sprintf("\tError %d: %s\n", i, e.Error()) - } - return str - } - return fmt.Sprintf("Number of warnings: %v", len(w.List)) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go b/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go deleted file mode 100644 index 0a12fe2fe3..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_linux.go +++ /dev/null @@ -1,40 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package mem - -import ( - "context" - "encoding/json" -) - -type ExVirtualMemory struct { - ActiveFile uint64 `json:"activefile"` - InactiveFile uint64 `json:"inactivefile"` - ActiveAnon uint64 `json:"activeanon"` - InactiveAnon uint64 `json:"inactiveanon"` - Unevictable uint64 `json:"unevictable"` -} - -func (v ExVirtualMemory) String() string { - s, _ := json.Marshal(v) - return string(s) -} - -type ExLinux struct{} - -func NewExLinux() *ExLinux { - return &ExLinux{} -} - -func (ex *ExLinux) VirtualMemory() (*ExVirtualMemory, error) { - return ex.VirtualMemoryWithContext(context.Background()) -} - -func (ex *ExLinux) VirtualMemoryWithContext(ctx context.Context) (*ExVirtualMemory, error) { - _, vmEx, err := fillFromMeminfoWithContext(ctx) - if err != nil { - return nil, err - } - return vmEx, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go b/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go deleted file mode 100644 index 5c49a478ce..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/ex_windows.go +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package mem - -import ( - "unsafe" - - "golang.org/x/sys/windows" -) - -// ExVirtualMemory represents Windows specific information -// https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex -// https://learn.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-performance_information -type ExVirtualMemory struct { - CommitLimit uint64 `json:"commitLimit"` - CommitTotal uint64 `json:"commitTotal"` - VirtualTotal uint64 `json:"virtualTotal"` - VirtualAvail uint64 `json:"virtualAvail"` -} - -type ExWindows struct{} - -func NewExWindows() *ExWindows { - return &ExWindows{} -} - -func (e *ExWindows) VirtualMemory() (*ExVirtualMemory, error) { - var memInfo memoryStatusEx - memInfo.cbSize = uint32(unsafe.Sizeof(memInfo)) - mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo))) - if mem == 0 { - return nil, windows.GetLastError() - } - - var perfInfo performanceInformation - perfInfo.cb = uint32(unsafe.Sizeof(perfInfo)) - perf, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb)) - if perf == 0 { - return nil, windows.GetLastError() - } - - ret := &ExVirtualMemory{ - CommitLimit: perfInfo.commitLimit * perfInfo.pageSize, - CommitTotal: perfInfo.commitTotal * perfInfo.pageSize, - VirtualTotal: memInfo.ullTotalVirtual, - VirtualAvail: memInfo.ullAvailVirtual, - } - - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem.go deleted file mode 100644 index 0da71a9886..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem.go +++ /dev/null @@ -1,121 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package mem - -import ( - "encoding/json" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var invoke common.Invoker = common.Invoke{} - -// Memory usage statistics. Total, Available and Used contain numbers of bytes -// for human consumption. -// -// The other fields in this struct contain kernel specific values. -type VirtualMemoryStat struct { - // Total amount of RAM on this system - Total uint64 `json:"total"` - - // RAM available for programs to allocate - // - // This value is computed from the kernel specific values. - Available uint64 `json:"available"` - - // RAM used by programs - // - // This value is computed from the kernel specific values. - Used uint64 `json:"used"` - - // Percentage of RAM used by programs - // - // This value is computed from the kernel specific values. - UsedPercent float64 `json:"usedPercent"` - - // This is the kernel's notion of free memory; RAM chips whose bits nobody - // cares about the value of right now. For a human consumable number, - // Available is what you really want. - Free uint64 `json:"free"` - - // OS X / BSD specific numbers: - // http://www.macyourself.com/2010/02/17/what-is-free-wired-active-and-inactive-system-memory-ram/ - Active uint64 `json:"active"` - Inactive uint64 `json:"inactive"` - Wired uint64 `json:"wired"` - - // FreeBSD specific numbers: - // https://reviews.freebsd.org/D8467 - Laundry uint64 `json:"laundry"` - - // Linux specific numbers - // https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s2-proc-meminfo.html - // https://www.kernel.org/doc/Documentation/filesystems/proc.txt - // https://www.kernel.org/doc/Documentation/vm/overcommit-accounting - // https://www.kernel.org/doc/Documentation/vm/transhuge.txt - Buffers uint64 `json:"buffers"` - Cached uint64 `json:"cached"` - WriteBack uint64 `json:"writeBack"` - Dirty uint64 `json:"dirty"` - WriteBackTmp uint64 `json:"writeBackTmp"` - Shared uint64 `json:"shared"` - Slab uint64 `json:"slab"` - Sreclaimable uint64 `json:"sreclaimable"` - Sunreclaim uint64 `json:"sunreclaim"` - PageTables uint64 `json:"pageTables"` - SwapCached uint64 `json:"swapCached"` - CommitLimit uint64 `json:"commitLimit"` - CommittedAS uint64 `json:"committedAS"` - HighTotal uint64 `json:"highTotal"` - HighFree uint64 `json:"highFree"` - LowTotal uint64 `json:"lowTotal"` - LowFree uint64 `json:"lowFree"` - SwapTotal uint64 `json:"swapTotal"` - SwapFree uint64 `json:"swapFree"` - Mapped uint64 `json:"mapped"` - VmallocTotal uint64 `json:"vmallocTotal"` - VmallocUsed uint64 `json:"vmallocUsed"` - VmallocChunk uint64 `json:"vmallocChunk"` - HugePagesTotal uint64 `json:"hugePagesTotal"` - HugePagesFree uint64 `json:"hugePagesFree"` - HugePagesRsvd uint64 `json:"hugePagesRsvd"` - HugePagesSurp uint64 `json:"hugePagesSurp"` - HugePageSize uint64 `json:"hugePageSize"` - AnonHugePages uint64 `json:"anonHugePages"` -} - -type SwapMemoryStat struct { - Total uint64 `json:"total"` - Used uint64 `json:"used"` - Free uint64 `json:"free"` - UsedPercent float64 `json:"usedPercent"` - Sin uint64 `json:"sin"` - Sout uint64 `json:"sout"` - PgIn uint64 `json:"pgIn"` - PgOut uint64 `json:"pgOut"` - PgFault uint64 `json:"pgFault"` - - // Linux specific numbers - // https://www.kernel.org/doc/Documentation/cgroup-v2.txt - PgMajFault uint64 `json:"pgMajFault"` -} - -func (m VirtualMemoryStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -func (m SwapMemoryStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -type SwapDevice struct { - Name string `json:"name"` - UsedBytes uint64 `json:"usedBytes"` - FreeBytes uint64 `json:"freeBytes"` -} - -func (m SwapDevice) String() string { - s, _ := json.Marshal(m) - return string(s) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix.go deleted file mode 100644 index ac2c39dd38..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix.go +++ /dev/null @@ -1,22 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix - -package mem - -import ( - "context" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapDevices() ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_cgo.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_cgo.go deleted file mode 100644 index 2d03dd0c3f..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_cgo.go +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && cgo - -package mem - -import ( - "context" - - "github.com/power-devops/perfstat" -) - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - m, err := perfstat.MemoryTotalStat() - if err != nil { - return nil, err - } - pagesize := uint64(4096) - ret := VirtualMemoryStat{ - Total: uint64(m.RealTotal) * pagesize, - Available: uint64(m.RealAvailable) * pagesize, - Free: uint64(m.RealFree) * pagesize, - Used: uint64(m.RealInUse) * pagesize, - UsedPercent: 100 * float64(m.RealInUse) / float64(m.RealTotal), - Active: uint64(m.VirtualActive) * pagesize, - SwapTotal: uint64(m.PgSpTotal) * pagesize, - SwapFree: uint64(m.PgSpFree) * pagesize, - } - return &ret, nil -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - m, err := perfstat.MemoryTotalStat() - if err != nil { - return nil, err - } - pagesize := uint64(4096) - swapUsed := uint64(m.PgSpTotal-m.PgSpFree-m.PgSpRsvd) * pagesize - swapTotal := uint64(m.PgSpTotal) * pagesize - ret := SwapMemoryStat{ - Total: swapTotal, - Free: uint64(m.PgSpFree) * pagesize, - Used: swapUsed, - UsedPercent: float64(100*swapUsed) / float64(swapTotal), - Sin: uint64(m.PgSpIn), - Sout: uint64(m.PgSpOut), - PgIn: uint64(m.PageIn), - PgOut: uint64(m.PageOut), - PgFault: uint64(m.PageFaults), - } - return &ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_nocgo.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_nocgo.go deleted file mode 100644 index bc3c0ed3b4..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_aix_nocgo.go +++ /dev/null @@ -1,78 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && !cgo - -package mem - -import ( - "context" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - vmem, swap, err := callSVMon(ctx, true) - if err != nil { - return nil, err - } - if vmem.Total == 0 { - return nil, common.ErrNotImplementedError - } - vmem.SwapTotal = swap.Total - vmem.SwapFree = swap.Free - return vmem, nil -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - _, swap, err := callSVMon(ctx, false) - if err != nil { - return nil, err - } - if swap.Total == 0 { - return nil, common.ErrNotImplementedError - } - return swap, nil -} - -func callSVMon(ctx context.Context, virt bool) (*VirtualMemoryStat, *SwapMemoryStat, error) { - out, err := invoke.CommandWithContext(ctx, "svmon", "-G") - if err != nil { - return nil, nil, err - } - - pagesize := uint64(4096) - vmem := &VirtualMemoryStat{} - swap := &SwapMemoryStat{} - for _, line := range strings.Split(string(out), "\n") { - if virt && strings.HasPrefix(line, "memory") { - p := strings.Fields(line) - if len(p) > 2 { - if t, err := strconv.ParseUint(p[1], 10, 64); err == nil { - vmem.Total = t * pagesize - } - if t, err := strconv.ParseUint(p[2], 10, 64); err == nil { - vmem.Used = t * pagesize - if vmem.Total > 0 { - vmem.UsedPercent = 100 * float64(vmem.Used) / float64(vmem.Total) - } - } - if t, err := strconv.ParseUint(p[3], 10, 64); err == nil { - vmem.Free = t * pagesize - } - } - } else if strings.HasPrefix(line, "pg space") { - p := strings.Fields(line) - if len(p) > 3 { - if t, err := strconv.ParseUint(p[2], 10, 64); err == nil { - swap.Total = t * pagesize - } - if t, err := strconv.ParseUint(p[3], 10, 64); err == nil { - swap.Free = swap.Total - t*pagesize - } - } - break - } - } - return vmem, swap, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_bsd.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_bsd.go deleted file mode 100644 index 4f3e57c038..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_bsd.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd || openbsd || netbsd - -package mem - -import ( - "context" - "fmt" - "strconv" - "strings" -) - -const swapCommand = "swapctl" - -// swapctl column indexes -const ( - nameCol = 0 - totalKiBCol = 1 - usedKiBCol = 2 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - output, err := invoke.CommandWithContext(ctx, swapCommand, "-lk") - if err != nil { - return nil, fmt.Errorf("could not execute %q: %w", swapCommand, err) - } - - return parseSwapctlOutput(string(output)) -} - -func parseSwapctlOutput(output string) ([]*SwapDevice, error) { - lines := strings.Split(output, "\n") - if len(lines) == 0 { - return nil, fmt.Errorf("could not parse output of %q: no lines in %q", swapCommand, output) - } - - // Check header headerFields are as expected. - header := lines[0] - header = strings.ToLower(header) - header = strings.ReplaceAll(header, ":", "") - headerFields := strings.Fields(header) - if len(headerFields) < usedKiBCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header %q", swapCommand, header) - } - if headerFields[nameCol] != "device" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[nameCol], "device") - } - if headerFields[totalKiBCol] != "1kb-blocks" && headerFields[totalKiBCol] != "1k-blocks" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[totalKiBCol], "1kb-blocks") - } - if headerFields[usedKiBCol] != "used" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[usedKiBCol], "used") - } - - var swapDevices []*SwapDevice - for _, line := range lines[1:] { - if line == "" { - continue // the terminal line is typically empty - } - fields := strings.Fields(line) - if len(fields) < usedKiBCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapCommand) - } - - totalKiB, err := strconv.ParseUint(fields[totalKiBCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapCommand, err) - } - - usedKiB, err := strconv.ParseUint(fields[usedKiBCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapCommand, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: usedKiB * 1024, - FreeBytes: (totalKiB - usedKiB) * 1024, - }) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin.go deleted file mode 100644 index 7d96a3bb09..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_darwin.go +++ /dev/null @@ -1,130 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin - -package mem - -import ( - "context" - "fmt" - "unsafe" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func getHwMemsize() (uint64, error) { - total, err := unix.SysctlUint64("hw.memsize") - if err != nil { - return 0, err - } - return total, nil -} - -// xsw_usage in sys/sysctl.h -type swapUsage struct { - Total uint64 - Avail uint64 - Used uint64 - Pagesize int32 - Encrypted bool -} - -// SwapMemory returns swapinfo. -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) { - // https://github.com/yanllearnn/go-osstat/blob/ae8a279d26f52ec946a03698c7f50a26cfb427e3/memory/memory_darwin.go - var ret *SwapMemoryStat - - value, err := unix.SysctlRaw("vm.swapusage") - if err != nil { - return ret, err - } - if len(value) != 32 { - return ret, fmt.Errorf("unexpected output of sysctl vm.swapusage: %v (len: %d)", value, len(value)) - } - swap := (*swapUsage)(unsafe.Pointer(&value[0])) - - u := float64(0) - if swap.Total != 0 { - u = ((float64(swap.Total) - float64(swap.Avail)) / float64(swap.Total)) * 100.0 - } - - ret = &SwapMemoryStat{ - Total: swap.Total, - Used: swap.Used, - Free: swap.Avail, - UsedPercent: u, - } - - return ret, nil -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(_ context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} - -type vmStatisticsData struct { - freeCount uint32 - activeCount uint32 - inactiveCount uint32 - wireCount uint32 - _ [44]byte // Not used here -} - -// VirtualMemory returns VirtualmemoryStat. -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - machLib, err := common.NewLibrary(common.System) - if err != nil { - return nil, err - } - defer machLib.Close() - - hostStatistics := common.GetFunc[common.HostStatisticsFunc](machLib, common.HostStatisticsSym) - machHostSelf := common.GetFunc[common.MachHostSelfFunc](machLib, common.MachHostSelfSym) - - count := uint32(common.HOST_VM_INFO_COUNT) - var vmstat vmStatisticsData - - status := hostStatistics(machHostSelf(), common.HOST_VM_INFO, - uintptr(unsafe.Pointer(&vmstat)), &count) - - if status != common.KERN_SUCCESS { - return nil, fmt.Errorf("host_statistics error=%d", status) - } - - pageSizeAddr, _ := machLib.Dlsym("vm_kernel_page_size") - pageSize := **(**uint64)(unsafe.Pointer(&pageSizeAddr)) - total, err := getHwMemsize() - if err != nil { - return nil, err - } - totalCount := uint32(total / pageSize) - - availableCount := vmstat.inactiveCount + vmstat.freeCount - usedPercent := 100 * float64(totalCount-availableCount) / float64(totalCount) - - usedCount := totalCount - availableCount - - return &VirtualMemoryStat{ - Total: total, - Available: pageSize * uint64(availableCount), - Used: pageSize * uint64(usedCount), - UsedPercent: usedPercent, - Free: pageSize * uint64(vmstat.freeCount), - Active: pageSize * uint64(vmstat.activeCount), - Inactive: pageSize * uint64(vmstat.inactiveCount), - Wired: pageSize * uint64(vmstat.wireCount), - }, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_fallback.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_fallback.go deleted file mode 100644 index 74283a2b5c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_fallback.go +++ /dev/null @@ -1,34 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build !darwin && !linux && !freebsd && !openbsd && !solaris && !windows && !plan9 && !aix && !netbsd - -package mem - -import ( - "context" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(_ context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_freebsd.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_freebsd.go deleted file mode 100644 index dbe6d91999..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_freebsd.go +++ /dev/null @@ -1,168 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd - -package mem - -import ( - "context" - "errors" - "unsafe" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - pageSize, err := common.SysctlUint("vm.stats.vm.v_page_size") - if err != nil { - return nil, err - } - physmem, err := common.SysctlUint("hw.physmem") - if err != nil { - return nil, err - } - - free, err := common.SysctlUint("vm.stats.vm.v_free_count") - if err != nil { - return nil, err - } - active, err := common.SysctlUint("vm.stats.vm.v_active_count") - if err != nil { - return nil, err - } - inactive, err := common.SysctlUint("vm.stats.vm.v_inactive_count") - if err != nil { - return nil, err - } - buffers, err := common.SysctlUint("vfs.bufspace") - if err != nil { - return nil, err - } - wired, err := common.SysctlUint("vm.stats.vm.v_wire_count") - if err != nil { - return nil, err - } - var cached, laundry uint64 - osreldate, _ := common.SysctlUint("kern.osreldate") - if osreldate < 1102000 { - cached, err = common.SysctlUint("vm.stats.vm.v_cache_count") - if err != nil { - return nil, err - } - } else { - laundry, err = common.SysctlUint("vm.stats.vm.v_laundry_count") - if err != nil { - return nil, err - } - } - - p := pageSize - ret := &VirtualMemoryStat{ - Total: physmem, - Free: free * p, - Active: active * p, - Inactive: inactive * p, - Cached: cached * p, - Buffers: buffers, - Wired: wired * p, - Laundry: laundry * p, - } - - ret.Available = ret.Inactive + ret.Cached + ret.Free + ret.Laundry - ret.Used = ret.Total - ret.Available - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - return ret, nil -} - -// Return swapinfo -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -// Constants from vm/vm_param.h -const ( - XSWDEV_VERSION11 = 1 - XSWDEV_VERSION = 2 -) - -// Types from vm/vm_param.h -type xswdev struct { - Version uint32 // Version is the version - Dev uint64 // Dev is the device identifier - Flags int32 // Flags is the swap flags applied to the device - NBlks int32 // NBlks is the total number of blocks - Used int32 // Used is the number of blocks used -} - -// xswdev11 is a compatibility for under FreeBSD 11 -// sys/vm/swap_pager.c -type xswdev11 struct { - Version uint32 // Version is the version - Dev uint32 // Dev is the device identifier - Flags int32 // Flags is the swap flags applied to the device - NBlks int32 // NBlks is the total number of blocks - Used int32 // Used is the number of blocks used -} - -func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) { - // FreeBSD can have multiple swap devices so we total them up - i, err := common.SysctlUint("vm.nswapdev") - if err != nil { - return nil, err - } - - if i == 0 { - return nil, errors.New("no swap devices found") - } - - c := int(i) - - i, err = common.SysctlUint("vm.stats.vm.v_page_size") - if err != nil { - return nil, err - } - pageSize := i - - var buf []byte - s := &SwapMemoryStat{} - for n := 0; n < c; n++ { - buf, err = unix.SysctlRaw("vm.swap_info", n) - if err != nil { - return nil, err - } - - // first, try to parse with version 2 - xsw := (*xswdev)(unsafe.Pointer(&buf[0])) - switch { - case xsw.Version == XSWDEV_VERSION11: - // this is version 1, so try to parse again - xsw := (*xswdev11)(unsafe.Pointer(&buf[0])) - if xsw.Version != XSWDEV_VERSION11 { - return nil, errors.New("xswdev version mismatch(11)") - } - s.Total += uint64(xsw.NBlks) - s.Used += uint64(xsw.Used) - case xsw.Version != XSWDEV_VERSION: - return nil, errors.New("xswdev version mismatch") - default: - s.Total += uint64(xsw.NBlks) - s.Used += uint64(xsw.Used) - } - - } - - if s.Total != 0 { - s.UsedPercent = float64(s.Used) / float64(s.Total) * 100 - } - s.Total *= pageSize - s.Used *= pageSize - s.Free = s.Total - s.Used - - return s, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_linux.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_linux.go deleted file mode 100644 index 3e6e4e3e4d..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_linux.go +++ /dev/null @@ -1,506 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package mem - -import ( - "bufio" - "context" - "fmt" - "io" - "math" - "os" - "strconv" - "strings" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - vm, _, err := fillFromMeminfoWithContext(ctx) - if err != nil { - return nil, err - } - return vm, nil -} - -func fillFromMeminfoWithContext(ctx context.Context) (*VirtualMemoryStat, *ExVirtualMemory, error) { - filename := common.HostProcWithContext(ctx, "meminfo") - lines, _ := common.ReadLines(filename) - - // flag if MemAvailable is in /proc/meminfo (kernel 3.14+) - memavail := false - activeFile := false // "Active(file)" not available: 2.6.28 / Dec 2008 - inactiveFile := false // "Inactive(file)" not available: 2.6.28 / Dec 2008 - sReclaimable := false // "Sreclaimable:" not available: 2.6.19 / Nov 2006 - - ret := &VirtualMemoryStat{} - retEx := &ExVirtualMemory{} - - for _, line := range lines { - fields := strings.Split(line, ":") - if len(fields) != 2 { - continue - } - key := strings.TrimSpace(fields[0]) - value := strings.TrimSpace(fields[1]) - value = strings.ReplaceAll(value, " kB", "") - - switch key { - case "MemTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Total = t * 1024 - case "MemFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Free = t * 1024 - case "MemAvailable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - memavail = true - ret.Available = t * 1024 - case "Buffers": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Buffers = t * 1024 - case "Cached": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Cached = t * 1024 - case "Active": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Active = t * 1024 - case "Inactive": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Inactive = t * 1024 - case "Active(anon)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.ActiveAnon = t * 1024 - case "Inactive(anon)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.InactiveAnon = t * 1024 - case "Active(file)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - activeFile = true - retEx.ActiveFile = t * 1024 - case "Inactive(file)": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - inactiveFile = true - retEx.InactiveFile = t * 1024 - case "Unevictable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - retEx.Unevictable = t * 1024 - case "Writeback": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.WriteBack = t * 1024 - case "WritebackTmp": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.WriteBackTmp = t * 1024 - case "Dirty": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Dirty = t * 1024 - case "Shmem": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Shared = t * 1024 - case "Slab": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Slab = t * 1024 - case "SReclaimable": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - sReclaimable = true - ret.Sreclaimable = t * 1024 - case "SUnreclaim": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Sunreclaim = t * 1024 - case "PageTables": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.PageTables = t * 1024 - case "SwapCached": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapCached = t * 1024 - case "CommitLimit": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.CommitLimit = t * 1024 - case "Committed_AS": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.CommittedAS = t * 1024 - case "HighTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HighTotal = t * 1024 - case "HighFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HighFree = t * 1024 - case "LowTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.LowTotal = t * 1024 - case "LowFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.LowFree = t * 1024 - case "SwapTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapTotal = t * 1024 - case "SwapFree": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.SwapFree = t * 1024 - case "Mapped": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.Mapped = t * 1024 - case "VmallocTotal": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocTotal = t * 1024 - case "VmallocUsed": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocUsed = t * 1024 - case "VmallocChunk": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.VmallocChunk = t * 1024 - case "HugePages_Total": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesTotal = t - case "HugePages_Free": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesFree = t - case "HugePages_Rsvd": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesRsvd = t - case "HugePages_Surp": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePagesSurp = t - case "Hugepagesize": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.HugePageSize = t * 1024 - case "AnonHugePages": - t, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return ret, retEx, err - } - ret.AnonHugePages = t * 1024 - } - } - - ret.Cached += ret.Sreclaimable - - if !memavail { - if activeFile && inactiveFile && sReclaimable { - ret.Available = calculateAvailVmem(ctx, ret, retEx) - } else { - ret.Available = ret.Cached + ret.Free - } - } - - ret.Used = ret.Total - ret.Free - ret.Buffers - ret.Cached - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - return ret, retEx, nil -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - sysinfo := &unix.Sysinfo_t{} - - if err := unix.Sysinfo(sysinfo); err != nil { - return nil, err - } - ret := &SwapMemoryStat{ - Total: uint64(sysinfo.Totalswap) * uint64(sysinfo.Unit), - Free: uint64(sysinfo.Freeswap) * uint64(sysinfo.Unit), - } - ret.Used = ret.Total - ret.Free - // check Infinity - if ret.Total != 0 { - ret.UsedPercent = float64(ret.Total-ret.Free) / float64(ret.Total) * 100.0 - } else { - ret.UsedPercent = 0 - } - filename := common.HostProcWithContext(ctx, "vmstat") - lines, _ := common.ReadLines(filename) - for _, l := range lines { - fields := strings.Fields(l) - if len(fields) < 2 { - continue - } - switch fields[0] { - case "pswpin": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.Sin = value * 4 * 1024 - case "pswpout": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.Sout = value * 4 * 1024 - case "pgpgin": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgIn = value * 4 * 1024 - case "pgpgout": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgOut = value * 4 * 1024 - case "pgfault": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgFault = value * 4 * 1024 - case "pgmajfault": - value, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - continue - } - ret.PgMajFault = value * 4 * 1024 - } - } - return ret, nil -} - -// calculateAvailVmem is a fallback under kernel 3.14 where /proc/meminfo does not provide -// "MemAvailable:" column. It reimplements an algorithm from the link below -// https://github.com/giampaolo/psutil/pull/890 -func calculateAvailVmem(ctx context.Context, ret *VirtualMemoryStat, retEx *ExVirtualMemory) uint64 { - var watermarkLow uint64 - - fn := common.HostProcWithContext(ctx, "zoneinfo") - lines, err := common.ReadLines(fn) - if err != nil { - return ret.Free + ret.Cached // fallback under kernel 2.6.13 - } - - pagesize := uint64(os.Getpagesize()) - watermarkLow = 0 - - for _, line := range lines { - fields := strings.Fields(line) - - if strings.HasPrefix(fields[0], "low") { - lowValue, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - lowValue = 0 - } - watermarkLow += lowValue - } - } - - watermarkLow *= pagesize - - availMemory := ret.Free - watermarkLow - pageCache := retEx.ActiveFile + retEx.InactiveFile - pageCache -= uint64(math.Min(float64(pageCache/2), float64(watermarkLow))) - availMemory += pageCache - availMemory += ret.Sreclaimable - uint64(math.Min(float64(ret.Sreclaimable/2.0), float64(watermarkLow))) - - if availMemory < 0 { - availMemory = 0 - } - - return availMemory -} - -const swapsFilename = "swaps" - -// swaps file column indexes -const ( - nameCol = 0 - // typeCol = 1 - totalCol = 2 - usedCol = 3 - // priorityCol = 4 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - swapsFilePath := common.HostProcWithContext(ctx, swapsFilename) - f, err := os.Open(swapsFilePath) - if err != nil { - return nil, err - } - defer f.Close() - - return parseSwapsFile(ctx, f) -} - -func parseSwapsFile(ctx context.Context, r io.Reader) ([]*SwapDevice, error) { - swapsFilePath := common.HostProcWithContext(ctx, swapsFilename) - scanner := bufio.NewScanner(r) - if !scanner.Scan() { - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("couldn't read file %q: %w", swapsFilePath, err) - } - return nil, fmt.Errorf("unexpected end-of-file in %q", swapsFilePath) - - } - - // Check header headerFields are as expected - headerFields := strings.Fields(scanner.Text()) - if len(headerFields) < usedCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header", swapsFilePath) - } - if headerFields[nameCol] != "Filename" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[nameCol], "Filename") - } - if headerFields[totalCol] != "Size" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[totalCol], "Size") - } - if headerFields[usedCol] != "Used" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapsFilePath, headerFields[usedCol], "Used") - } - - var swapDevices []*SwapDevice - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - if len(fields) < usedCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapsFilePath) - } - - totalKiB, err := strconv.ParseUint(fields[totalCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapsFilePath, err) - } - - usedKiB, err := strconv.ParseUint(fields[usedCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapsFilePath, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: usedKiB * 1024, - FreeBytes: (totalKiB - usedKiB) * 1024, - }) - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("couldn't read file %q: %w", swapsFilePath, err) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_netbsd.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_netbsd.go deleted file mode 100644 index 8ef539ca32..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_netbsd.go +++ /dev/null @@ -1,87 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build netbsd - -package mem - -import ( - "context" - "errors" - "fmt" - - "golang.org/x/sys/unix" -) - -func GetPageSize() (uint64, error) { - return GetPageSizeWithContext(context.Background()) -} - -func GetPageSizeWithContext(_ context.Context) (uint64, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp2") - if err != nil { - return 0, err - } - return uint64(uvmexp.Pagesize), nil -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp2") - if err != nil { - return nil, err - } - p := uint64(uvmexp.Pagesize) - - ret := &VirtualMemoryStat{ - Total: uint64(uvmexp.Npages) * p, - Free: uint64(uvmexp.Free) * p, - Active: uint64(uvmexp.Active) * p, - Inactive: uint64(uvmexp.Inactive) * p, - Cached: 0, // not available - Wired: uint64(uvmexp.Wired) * p, - } - - ret.Available = ret.Inactive + ret.Cached + ret.Free - ret.Used = ret.Total - ret.Available - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - // Get buffers from vm.bufmem sysctl - ret.Buffers, err = unix.SysctlUint64("vm.bufmem") - if err != nil { - return nil, err - } - - return ret, nil -} - -// Return swapctl summary info -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - out, err := invoke.CommandWithContext(ctx, "swapctl", "-sk") - if err != nil { - return &SwapMemoryStat{}, nil - } - - line := string(out) - var total, used, free uint64 - - _, err = fmt.Sscanf(line, - "total: %d 1K-blocks allocated, %d used, %d available", - &total, &used, &free) - if err != nil { - return nil, errors.New("failed to parse swapctl output") - } - - percent := float64(used) / float64(total) * 100 - return &SwapMemoryStat{ - Total: total * 1024, - Used: used * 1024, - Free: free * 1024, - UsedPercent: percent, - }, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go deleted file mode 100644 index 680cad12b3..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd.go +++ /dev/null @@ -1,101 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd - -package mem - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "fmt" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func GetPageSize() (uint64, error) { - return GetPageSizeWithContext(context.Background()) -} - -func GetPageSizeWithContext(_ context.Context) (uint64, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp") - if err != nil { - return 0, err - } - return uint64(uvmexp.Pagesize), nil -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - uvmexp, err := unix.SysctlUvmexp("vm.uvmexp") - if err != nil { - return nil, err - } - p := uint64(uvmexp.Pagesize) - - ret := &VirtualMemoryStat{ - Total: uint64(uvmexp.Npages) * p, - Free: uint64(uvmexp.Free) * p, - Active: uint64(uvmexp.Active) * p, - Inactive: uint64(uvmexp.Inactive) * p, - Cached: 0, // not available - Wired: uint64(uvmexp.Wired) * p, - } - - ret.Available = ret.Inactive + ret.Cached + ret.Free - ret.Used = ret.Total - ret.Available - ret.UsedPercent = float64(ret.Used) / float64(ret.Total) * 100.0 - - mib := []int32{CTLVfs, VfsGeneric, VfsBcacheStat} - buf, length, err := common.CallSyscall(mib) - if err != nil { - return nil, err - } - if length < sizeOfBcachestats { - return nil, fmt.Errorf("short syscall ret %d bytes", length) - } - var bcs Bcachestats - br := bytes.NewReader(buf) - err = common.Read(br, binary.LittleEndian, &bcs) - if err != nil { - return nil, err - } - ret.Buffers = uint64(bcs.Numbufpages) * p - - return ret, nil -} - -// Return swapctl summary info -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - out, err := invoke.CommandWithContext(ctx, "swapctl", "-sk") - if err != nil { - return &SwapMemoryStat{}, nil - } - - line := string(out) - var total, used, free uint64 - - _, err = fmt.Sscanf(line, - "total: %d 1K-blocks allocated, %d used, %d available", - &total, &used, &free) - if err != nil { - return nil, errors.New("failed to parse swapctl output") - } - - percent := float64(used) / float64(total) * 100 - return &SwapMemoryStat{ - Total: total * 1024, - Used: used * 1024, - Free: free * 1024, - UsedPercent: percent, - }, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_386.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_386.go deleted file mode 100644 index 552e93f4a2..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_386.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && 386 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_amd64.go deleted file mode 100644 index 73e5b72aa6..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_amd64.go +++ /dev/null @@ -1,33 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x78 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm.go deleted file mode 100644 index 57b5861de5..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && arm - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm64.go deleted file mode 100644 index f39a6456b7..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_arm64.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_riscv64.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_riscv64.go deleted file mode 100644 index f9f838f54e..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_openbsd_riscv64.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && riscv64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs mem/types_openbsd.go - -package mem - -const ( - CTLVfs = 10 - VfsGeneric = 0 - VfsBcacheStat = 3 -) - -const ( - sizeOfBcachestats = 0x90 -) - -type Bcachestats struct { - Numbufs int64 - Numbufpages int64 - Numdirtypages int64 - Numcleanpages int64 - Pendingwrites int64 - Pendingreads int64 - Numwrites int64 - Numreads int64 - Cachehits int64 - Busymapped int64 - Dmapages int64 - Highpages int64 - Delwribufs int64 - Kvaslots int64 - Avail int64 - Highflips int64 - Highflops int64 - Dmaflips int64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_plan9.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_plan9.go deleted file mode 100644 index 0df0745c79..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_plan9.go +++ /dev/null @@ -1,69 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build plan9 - -package mem - -import ( - "context" - "os" - - stats "github.com/lufia/plan9stats" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(ctx context.Context) (*SwapMemoryStat, error) { - root := os.Getenv("HOST_ROOT") - m, err := stats.ReadMemStats(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - u := 0.0 - if m.SwapPages.Avail != 0 { - u = float64(m.SwapPages.Used) / float64(m.SwapPages.Avail) * 100.0 - } - return &SwapMemoryStat{ - Total: uint64(m.SwapPages.Avail * m.PageSize), - Used: uint64(m.SwapPages.Used * m.PageSize), - Free: uint64(m.SwapPages.Free() * m.PageSize), - UsedPercent: u, - }, nil -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - root := os.Getenv("HOST_ROOT") - m, err := stats.ReadMemStats(ctx, stats.WithRootDir(root)) - if err != nil { - return nil, err - } - u := 0.0 - if m.UserPages.Avail != 0 { - u = float64(m.UserPages.Used) / float64(m.UserPages.Avail) * 100.0 - } - return &VirtualMemoryStat{ - Total: uint64(m.Total), - Available: uint64(m.UserPages.Free() * m.PageSize), - Used: uint64(m.UserPages.Used * m.PageSize), - UsedPercent: u, - Free: uint64(m.UserPages.Free() * m.PageSize), - - SwapTotal: uint64(m.SwapPages.Avail * m.PageSize), - SwapFree: uint64(m.SwapPages.Free() * m.PageSize), - }, nil -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(_ context.Context) ([]*SwapDevice, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_solaris.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_solaris.go deleted file mode 100644 index 1a391dc4be..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_solaris.go +++ /dev/null @@ -1,211 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build solaris - -package mem - -import ( - "context" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/tklauser/go-sysconf" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// VirtualMemory for Solaris is a minimal implementation which only returns -// what Nomad needs. It does take into account global vs zone, however. -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(ctx context.Context) (*VirtualMemoryStat, error) { - result := &VirtualMemoryStat{} - - zoneName, err := zoneName(ctx) - if err != nil { - return nil, err - } - - if zoneName == "global" { - capacity, err := globalZoneMemoryCapacity(ctx) - if err != nil { - return nil, err - } - result.Total = capacity - freemem, err := globalZoneFreeMemory(ctx) - if err != nil { - return nil, err - } - result.Available = freemem - result.Free = freemem - result.Used = result.Total - result.Free - } else { - capacity, err := nonGlobalZoneMemoryCapacity(ctx) - if err != nil { - return nil, err - } - result.Total = capacity - } - - return result, nil -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) { - return nil, common.ErrNotImplementedError -} - -func zoneName(ctx context.Context) (string, error) { - out, err := invoke.CommandWithContext(ctx, "zonename") - if err != nil { - return "", err - } - - return strings.TrimSpace(string(out)), nil -} - -var globalZoneMemoryCapacityMatch = regexp.MustCompile(`[Mm]emory size: (\d+) Megabytes`) - -func globalZoneMemoryCapacity(ctx context.Context) (uint64, error) { - out, err := invoke.CommandWithContext(ctx, "prtconf") - if err != nil { - return 0, err - } - - match := globalZoneMemoryCapacityMatch.FindAllStringSubmatch(string(out), -1) - if len(match) != 1 { - return 0, errors.New("memory size not contained in output of prtconf") - } - - totalMB, err := strconv.ParseUint(match[0][1], 10, 64) - if err != nil { - return 0, err - } - - return totalMB * 1024 * 1024, nil -} - -func globalZoneFreeMemory(ctx context.Context) (uint64, error) { - output, err := invoke.CommandWithContext(ctx, "pagesize") - if err != nil { - return 0, err - } - - pagesize, err := strconv.ParseUint(strings.TrimSpace(string(output)), 10, 64) - if err != nil { - return 0, err - } - - free, err := sysconf.Sysconf(sysconf.SC_AVPHYS_PAGES) - if err != nil { - return 0, err - } - - return uint64(free) * pagesize, nil -} - -var kstatMatch = regexp.MustCompile(`(\S+)\s+(\S*)`) - -func nonGlobalZoneMemoryCapacity(ctx context.Context) (uint64, error) { - out, err := invoke.CommandWithContext(ctx, "kstat", "-p", "-c", "zone_memory_cap", "memory_cap:*:*:physcap") - if err != nil { - return 0, err - } - - kstats := kstatMatch.FindAllStringSubmatch(string(out), -1) - if len(kstats) != 1 { - return 0, fmt.Errorf("expected 1 kstat, found %d", len(kstats)) - } - - memSizeBytes, err := strconv.ParseUint(kstats[0][2], 10, 64) - if err != nil { - return 0, err - } - - return memSizeBytes, nil -} - -const swapCommand = "swap" - -// The blockSize as reported by `swap -l`. See https://docs.oracle.com/cd/E23824_01/html/821-1459/fsswap-52195.html -const blockSize = 512 - -// swapctl column indexes -const ( - nameCol = 0 - // devCol = 1 - // swaploCol = 2 - totalBlocksCol = 3 - freeBlocksCol = 4 -) - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(ctx context.Context) ([]*SwapDevice, error) { - output, err := invoke.CommandWithContext(ctx, swapCommand, "-l") - if err != nil { - return nil, fmt.Errorf("could not execute %q: %w", swapCommand, err) - } - - return parseSwapsCommandOutput(string(output)) -} - -func parseSwapsCommandOutput(output string) ([]*SwapDevice, error) { - lines := strings.Split(output, "\n") - if len(lines) == 0 { - return nil, fmt.Errorf("could not parse output of %q: no lines in %q", swapCommand, output) - } - - // Check header headerFields are as expected. - headerFields := strings.Fields(lines[0]) - if len(headerFields) < freeBlocksCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields in header %q", swapCommand, lines[0]) - } - if headerFields[nameCol] != "swapfile" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[nameCol], "swapfile") - } - if headerFields[totalBlocksCol] != "blocks" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[totalBlocksCol], "blocks") - } - if headerFields[freeBlocksCol] != "free" { - return nil, fmt.Errorf("couldn't parse %q: expected %q to be %q", swapCommand, headerFields[freeBlocksCol], "free") - } - - var swapDevices []*SwapDevice - for _, line := range lines[1:] { - if line == "" { - continue // the terminal line is typically empty - } - fields := strings.Fields(line) - if len(fields) < freeBlocksCol { - return nil, fmt.Errorf("couldn't parse %q: too few fields", swapCommand) - } - - totalBlocks, err := strconv.ParseUint(fields[totalBlocksCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Size' column in %q: %w", swapCommand, err) - } - - freeBlocks, err := strconv.ParseUint(fields[freeBlocksCol], 10, 64) - if err != nil { - return nil, fmt.Errorf("couldn't parse 'Used' column in %q: %w", swapCommand, err) - } - - swapDevices = append(swapDevices, &SwapDevice{ - Name: fields[nameCol], - UsedBytes: (totalBlocks - freeBlocks) * blockSize, - FreeBytes: freeBlocks * blockSize, - }) - } - - return swapDevices, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go b/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go deleted file mode 100644 index 015c1a19c6..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/mem/mem_windows.go +++ /dev/null @@ -1,183 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package mem - -import ( - "context" - "sync" - "syscall" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ( - procEnumPageFilesW = common.ModPsapi.NewProc("EnumPageFilesW") - procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo") - procGetPerformanceInfo = common.ModPsapi.NewProc("GetPerformanceInfo") - procGlobalMemoryStatusEx = common.Modkernel32.NewProc("GlobalMemoryStatusEx") -) - -type memoryStatusEx struct { - cbSize uint32 - dwMemoryLoad uint32 - ullTotalPhys uint64 // in bytes - ullAvailPhys uint64 - ullTotalPageFile uint64 - ullAvailPageFile uint64 - ullTotalVirtual uint64 - ullAvailVirtual uint64 - ullAvailExtendedVirtual uint64 -} - -func VirtualMemory() (*VirtualMemoryStat, error) { - return VirtualMemoryWithContext(context.Background()) -} - -func VirtualMemoryWithContext(_ context.Context) (*VirtualMemoryStat, error) { - var memInfo memoryStatusEx - memInfo.cbSize = uint32(unsafe.Sizeof(memInfo)) - mem, _, _ := procGlobalMemoryStatusEx.Call(uintptr(unsafe.Pointer(&memInfo))) - if mem == 0 { - return nil, windows.GetLastError() - } - - ret := &VirtualMemoryStat{ - Total: memInfo.ullTotalPhys, - Available: memInfo.ullAvailPhys, - Free: memInfo.ullAvailPhys, - UsedPercent: float64(memInfo.dwMemoryLoad), - } - - ret.Used = ret.Total - ret.Available - return ret, nil -} - -type performanceInformation struct { - cb uint32 - commitTotal uint64 - commitLimit uint64 - commitPeak uint64 - physicalTotal uint64 - physicalAvailable uint64 - systemCache uint64 - kernelTotal uint64 - kernelPaged uint64 - kernelNonpaged uint64 - pageSize uint64 - handleCount uint32 - processCount uint32 - threadCount uint32 -} - -func SwapMemory() (*SwapMemoryStat, error) { - return SwapMemoryWithContext(context.Background()) -} - -func SwapMemoryWithContext(_ context.Context) (*SwapMemoryStat, error) { - // Use the performance counter to get the swap usage percentage - counter, err := common.NewWin32PerformanceCounter("swap_percentage", `\Paging File(_Total)\% Usage`) - if err != nil { - return nil, err - } - defer common.PdhCloseQuery.Call(uintptr(counter.Query)) - - usedPercent, err := counter.GetValue() - if err != nil { - return nil, err - } - - // Get total memory from performance information - var perfInfo performanceInformation - perfInfo.cb = uint32(unsafe.Sizeof(perfInfo)) - mem, _, _ := procGetPerformanceInfo.Call(uintptr(unsafe.Pointer(&perfInfo)), uintptr(perfInfo.cb)) - if mem == 0 { - return nil, windows.GetLastError() - } - totalPhys := perfInfo.physicalTotal * perfInfo.pageSize - totalSys := perfInfo.commitLimit * perfInfo.pageSize - total := totalSys - totalPhys - - var used uint64 - if total > 0 { - used = uint64(0.01 * usedPercent * float64(total)) - } else { - usedPercent = 0.0 - used = 0 - } - - ret := &SwapMemoryStat{ - Total: total, - Used: used, - Free: total - used, - UsedPercent: common.Round(usedPercent, 1), - } - - return ret, nil -} - -var ( - pageSize uint64 - pageSizeOnce sync.Once -) - -type systemInfo struct { - wProcessorArchitecture uint16 - wReserved uint16 - dwPageSize uint32 - lpMinimumApplicationAddress uintptr - lpMaximumApplicationAddress uintptr - dwActiveProcessorMask uintptr - dwNumberOfProcessors uint32 - dwProcessorType uint32 - dwAllocationGranularity uint32 - wProcessorLevel uint16 - wProcessorRevision uint16 -} - -// system type as defined in https://docs.microsoft.com/en-us/windows/win32/api/psapi/ns-psapi-enum_page_file_information -type enumPageFileInformation struct { - cb uint32 - reserved uint32 - totalSize uint64 - totalInUse uint64 - peakUsage uint64 -} - -func SwapDevices() ([]*SwapDevice, error) { - return SwapDevicesWithContext(context.Background()) -} - -func SwapDevicesWithContext(_ context.Context) ([]*SwapDevice, error) { - pageSizeOnce.Do(func() { - var sysInfo systemInfo - procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&sysInfo))) - pageSize = uint64(sysInfo.dwPageSize) - }) - - // the following system call invokes the supplied callback function once for each page file before returning - // see https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-enumpagefilesw - var swapDevices []*SwapDevice - result, _, _ := procEnumPageFilesW.Call(windows.NewCallback(pEnumPageFileCallbackW), uintptr(unsafe.Pointer(&swapDevices))) - if result == 0 { - return nil, windows.GetLastError() - } - - return swapDevices, nil -} - -// system callback as defined in https://docs.microsoft.com/en-us/windows/win32/api/psapi/nc-psapi-penum_page_file_callbackw -func pEnumPageFileCallbackW(swapDevices *[]*SwapDevice, enumPageFileInfo *enumPageFileInformation, lpFilenamePtr *[syscall.MAX_LONG_PATH]uint16) *bool { - *swapDevices = append(*swapDevices, &SwapDevice{ - Name: syscall.UTF16ToString((*lpFilenamePtr)[:]), - UsedBytes: enumPageFileInfo.totalInUse * pageSize, - FreeBytes: (enumPageFileInfo.totalSize - enumPageFileInfo.totalInUse) * pageSize, - }) - - // return true to continue enumerating page files - ret := true - return &ret -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net.go b/vendor/github.com/shirou/gopsutil/v4/net/net.go deleted file mode 100644 index 78798c5a30..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net.go +++ /dev/null @@ -1,356 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package net - -import ( - "context" - "encoding/json" - "net" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var invoke common.Invoker = common.Invoke{} - -type IOCountersStat struct { - Name string `json:"name"` // interface name - BytesSent uint64 `json:"bytesSent"` // number of bytes sent - BytesRecv uint64 `json:"bytesRecv"` // number of bytes received - PacketsSent uint64 `json:"packetsSent"` // number of packets sent - PacketsRecv uint64 `json:"packetsRecv"` // number of packets received - Errin uint64 `json:"errin"` // total number of errors while receiving - Errout uint64 `json:"errout"` // total number of errors while sending - Dropin uint64 `json:"dropin"` // total number of incoming packets which were dropped - Dropout uint64 `json:"dropout"` // total number of outgoing packets which were dropped (always 0 on OSX and BSD) - Fifoin uint64 `json:"fifoin"` // total number of FIFO buffers errors while receiving - Fifoout uint64 `json:"fifoout"` // total number of FIFO buffers errors while sending -} - -// Addr is implemented compatibility to psutil -type Addr struct { - IP string `json:"ip"` - Port uint32 `json:"port"` -} - -type ConnectionStat struct { - Fd uint32 `json:"fd"` - Family uint32 `json:"family"` - Type uint32 `json:"type"` - Laddr Addr `json:"localaddr"` - Raddr Addr `json:"remoteaddr"` - Status string `json:"status"` - Uids []int32 `json:"uids"` - Pid int32 `json:"pid"` -} - -// System wide stats about different network protocols -type ProtoCountersStat struct { - Protocol string `json:"protocol"` - Stats map[string]int64 `json:"stats"` -} - -// NetInterfaceAddr is designed for represent interface addresses -type InterfaceAddr struct { - Addr string `json:"addr"` -} - -// InterfaceAddrList is a list of InterfaceAddr -type InterfaceAddrList []InterfaceAddr - -type InterfaceStat struct { - Index int `json:"index"` - MTU int `json:"mtu"` // maximum transmission unit - Name string `json:"name"` // e.g., "en0", "lo0", "eth0.100" - HardwareAddr string `json:"hardwareAddr"` // IEEE MAC-48, EUI-48 and EUI-64 form - Flags []string `json:"flags"` // e.g., FlagUp, FlagLoopback, FlagMulticast - Addrs InterfaceAddrList `json:"addrs"` -} - -// InterfaceStatList is a list of InterfaceStat -type InterfaceStatList []InterfaceStat - -type FilterStat struct { - ConnTrackCount int64 `json:"connTrackCount"` - ConnTrackMax int64 `json:"connTrackMax"` -} - -// ConntrackStat has conntrack summary info -type ConntrackStat struct { - Entries uint32 `json:"entries"` // Number of entries in the conntrack table - Searched uint32 `json:"searched"` // Number of conntrack table lookups performed - Found uint32 `json:"found"` // Number of searched entries which were successful - New uint32 `json:"new"` // Number of entries added which were not expected before - Invalid uint32 `json:"invalid"` // Number of packets seen which can not be tracked - Ignore uint32 `json:"ignore"` // Packets seen which are already connected to an entry - Delete uint32 `json:"delete"` // Number of entries which were removed - DeleteList uint32 `json:"deleteList"` // Number of entries which were put to dying list - Insert uint32 `json:"insert"` // Number of entries inserted into the list - InsertFailed uint32 `json:"insertFailed"` // # insertion attempted but failed (same entry exists) - Drop uint32 `json:"drop"` // Number of packets dropped due to conntrack failure. - EarlyDrop uint32 `json:"earlyDrop"` // Dropped entries to make room for new ones, if maxsize reached - IcmpError uint32 `json:"icmpError"` // Subset of invalid. Packets that can't be tracked d/t error - ExpectNew uint32 `json:"expectNew"` // Entries added after an expectation was already present - ExpectCreate uint32 `json:"expectCreate"` // Expectations added - ExpectDelete uint32 `json:"expectDelete"` // Expectations deleted - SearchRestart uint32 `json:"searchRestart"` // Conntrack table lookups restarted due to hashtable resizes -} - -func NewConntrackStat(e uint32, s uint32, f uint32, n uint32, inv uint32, ign uint32, del uint32, dlst uint32, ins uint32, insfail uint32, drop uint32, edrop uint32, ie uint32, en uint32, ec uint32, ed uint32, sr uint32) *ConntrackStat { - return &ConntrackStat{ - Entries: e, - Searched: s, - Found: f, - New: n, - Invalid: inv, - Ignore: ign, - Delete: del, - DeleteList: dlst, - Insert: ins, - InsertFailed: insfail, - Drop: drop, - EarlyDrop: edrop, - IcmpError: ie, - ExpectNew: en, - ExpectCreate: ec, - ExpectDelete: ed, - SearchRestart: sr, - } -} - -type ConntrackStatList struct { - items []*ConntrackStat -} - -func NewConntrackStatList() *ConntrackStatList { - return &ConntrackStatList{ - items: []*ConntrackStat{}, - } -} - -func (l *ConntrackStatList) Append(c *ConntrackStat) { - l.items = append(l.items, c) -} - -func (l *ConntrackStatList) Items() []ConntrackStat { - items := make([]ConntrackStat, len(l.items)) - for i, el := range l.items { - items[i] = *el - } - return items -} - -// Summary returns a single-element list with totals from all list items. -func (l *ConntrackStatList) Summary() []ConntrackStat { - summary := NewConntrackStat(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - for _, cs := range l.items { - summary.Entries += cs.Entries - summary.Searched += cs.Searched - summary.Found += cs.Found - summary.New += cs.New - summary.Invalid += cs.Invalid - summary.Ignore += cs.Ignore - summary.Delete += cs.Delete - summary.DeleteList += cs.DeleteList - summary.Insert += cs.Insert - summary.InsertFailed += cs.InsertFailed - summary.Drop += cs.Drop - summary.EarlyDrop += cs.EarlyDrop - summary.IcmpError += cs.IcmpError - summary.ExpectNew += cs.ExpectNew - summary.ExpectCreate += cs.ExpectCreate - summary.ExpectDelete += cs.ExpectDelete - summary.SearchRestart += cs.SearchRestart - } - return []ConntrackStat{*summary} -} - -func (n IOCountersStat) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func (n ConnectionStat) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func (n ProtoCountersStat) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func (a Addr) String() string { - s, _ := json.Marshal(a) - return string(s) -} - -func (n InterfaceStat) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func (l InterfaceStatList) String() string { - s, _ := json.Marshal(l) - return string(s) -} - -func (n InterfaceAddr) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func (n ConntrackStat) String() string { - s, _ := json.Marshal(n) - return string(s) -} - -func Interfaces() (InterfaceStatList, error) { - return InterfacesWithContext(context.Background()) -} - -func InterfacesWithContext(_ context.Context) (InterfaceStatList, error) { - is, err := net.Interfaces() - if err != nil { - return nil, err - } - ret := make(InterfaceStatList, 0, len(is)) - for _, ifi := range is { - - var flags []string - if ifi.Flags&net.FlagUp != 0 { - flags = append(flags, "up") - } - if ifi.Flags&net.FlagBroadcast != 0 { - flags = append(flags, "broadcast") - } - if ifi.Flags&net.FlagLoopback != 0 { - flags = append(flags, "loopback") - } - if ifi.Flags&net.FlagPointToPoint != 0 { - flags = append(flags, "pointtopoint") - } - if ifi.Flags&net.FlagMulticast != 0 { - flags = append(flags, "multicast") - } - - r := InterfaceStat{ - Index: ifi.Index, - Name: ifi.Name, - MTU: ifi.MTU, - HardwareAddr: ifi.HardwareAddr.String(), - Flags: flags, - } - addrs, err := ifi.Addrs() - if err == nil { - r.Addrs = make(InterfaceAddrList, 0, len(addrs)) - for _, addr := range addrs { - r.Addrs = append(r.Addrs, InterfaceAddr{ - Addr: addr.String(), - }) - } - - } - ret = append(ret, r) - } - - return ret, nil -} - -func getIOCountersAll(n []IOCountersStat) []IOCountersStat { - r := IOCountersStat{ - Name: "all", - } - for _, nic := range n { - r.BytesRecv += nic.BytesRecv - r.PacketsRecv += nic.PacketsRecv - r.Errin += nic.Errin - r.Dropin += nic.Dropin - r.BytesSent += nic.BytesSent - r.PacketsSent += nic.PacketsSent - r.Errout += nic.Errout - r.Dropout += nic.Dropout - } - - return []IOCountersStat{r} -} - -// NetIOCounters returns network I/O statistics for every network -// interface installed on the system. If pernic argument is false, -// return only sum of all information (which name is 'all'). If true, -// every network interface installed on the system is returned -// separately. -func IOCounters(pernic bool) ([]IOCountersStat, error) { - return IOCountersWithContext(context.Background(), pernic) -} - -func IOCountersByFile(pernic bool, filename string) ([]IOCountersStat, error) { - return IOCountersByFileWithContext(context.Background(), pernic, filename) -} - -// ProtoCounters returns network statistics for the entire system -// If protocols is empty then all protocols are returned, otherwise -// just the protocols in the list are returned. -// Available protocols: -// [ip,icmp,icmpmsg,tcp,udp,udplite] -// Not Implemented for FreeBSD, Windows, OpenBSD, Darwin -func ProtoCounters(protocols []string) ([]ProtoCountersStat, error) { - return ProtoCountersWithContext(context.Background(), protocols) -} - -// NetFilterCounters returns iptables conntrack statistics -// the currently in use conntrack count and the max. -// If the file does not exist or is invalid it will return nil. -func FilterCounters() ([]FilterStat, error) { - return FilterCountersWithContext(context.Background()) -} - -// ConntrackStats returns more detailed info about the conntrack table -func ConntrackStats(percpu bool) ([]ConntrackStat, error) { - return ConntrackStatsWithContext(context.Background(), percpu) -} - -// Return a list of network connections opened. -func Connections(kind string) ([]ConnectionStat, error) { - return ConnectionsWithContext(context.Background(), kind) -} - -// Return a list of network connections opened returning at most `max` -// connections for each running process. -func ConnectionsMax(kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsMaxWithContext(context.Background(), kind, maxConn) -} - -// Return a list of network connections opened, omitting `Uids`. -// WithoutUids functions are reliant on implementation details. They may be altered to be an alias for Connections or be -// removed from the API in the future. -func ConnectionsWithoutUids(kind string) ([]ConnectionStat, error) { - return ConnectionsWithoutUidsWithContext(context.Background(), kind) -} - -// Return a list of network connections opened by a process. -func ConnectionsPid(kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidWithContext(context.Background(), kind, pid) -} - -// Return a list of network connections opened, omitting `Uids`. -// WithoutUids functions are reliant on implementation details. They may be altered to be an alias for Connections or be -// removed from the API in the future. -func ConnectionsPidWithoutUids(kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidWithoutUidsWithContext(context.Background(), kind, pid) -} - -func ConnectionsPidMaxWithoutUids(kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(context.Background(), kind, pid, maxConn) -} - -// Return up to `max` network connections opened by a process. -func ConnectionsPidMax(kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(context.Background(), kind, pid, maxConn) -} - -// Pids retunres all pids. -// Note: this is a copy of process_linux.Pids() -// FIXME: Import process occures import cycle. -// move to common made other platform breaking. Need consider. -func Pids() ([]int32, error) { - return PidsWithContext(context.Background()) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go deleted file mode 100644 index a5fa8811f9..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_aix.go +++ /dev/null @@ -1,300 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix - -package net - -import ( - "context" - "fmt" - "regexp" - "strconv" - "strings" - "syscall" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func parseNetstatNetLine(line string) (ConnectionStat, error) { - f := strings.Fields(line) - if len(f) < 5 { - return ConnectionStat{}, fmt.Errorf("wrong line,%s", line) - } - - var netType, netFamily uint32 - switch f[0] { - case "tcp", "tcp4": - netType = syscall.SOCK_STREAM - netFamily = syscall.AF_INET - case "udp", "udp4": - netType = syscall.SOCK_DGRAM - netFamily = syscall.AF_INET - case "tcp6": - netType = syscall.SOCK_STREAM - netFamily = syscall.AF_INET6 - case "udp6": - netType = syscall.SOCK_DGRAM - netFamily = syscall.AF_INET6 - default: - return ConnectionStat{}, fmt.Errorf("unknown type, %s", f[0]) - } - - laddr, raddr, err := parseNetstatAddr(f[3], f[4], netFamily) - if err != nil { - return ConnectionStat{}, fmt.Errorf("failed to parse netaddr, %s %s", f[3], f[4]) - } - - n := ConnectionStat{ - Fd: uint32(0), // not supported - Family: uint32(netFamily), - Type: uint32(netType), - Laddr: laddr, - Raddr: raddr, - Pid: int32(0), // not supported - } - if len(f) == 6 { - n.Status = f[5] - } - - return n, nil -} - -var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`) - -// This function only works for netstat returning addresses with a "." -// before the port (0.0.0.0.22 instead of 0.0.0.0:22). -func parseNetstatAddr(local string, remote string, family uint32) (laddr Addr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - matches := portMatch.FindStringSubmatch(l) - if matches == nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - host := matches[1] - port := matches[2] - if host == "*" { - switch family { - case syscall.AF_INET: - host = "0.0.0.0" - case syscall.AF_INET6: - host = "::" - default: - return Addr{}, fmt.Errorf("unknown family, %d", family) - } - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil - } - - laddr, err = parse(local) - if remote != "*.*" { // remote addr exists - raddr, err = parse(remote) - if err != nil { - return laddr, raddr, err - } - } - - return laddr, raddr, err -} - -func parseNetstatUnixLine(f []string) (ConnectionStat, error) { - if len(f) < 8 { - return ConnectionStat{}, fmt.Errorf("wrong number of fields: expected >=8 got %d", len(f)) - } - - var netType uint32 - - switch f[1] { - case "dgram": - netType = syscall.SOCK_DGRAM - case "stream": - netType = syscall.SOCK_STREAM - default: - return ConnectionStat{}, fmt.Errorf("unknown type: %s", f[1]) - } - - // Some Unix Socket don't have any address associated - addr := "" - if len(f) == 9 { - addr = f[8] - } - - c := ConnectionStat{ - Fd: uint32(0), // not supported - Family: uint32(syscall.AF_UNIX), - Type: uint32(netType), - Laddr: Addr{ - IP: addr, - }, - Status: "NONE", - Pid: int32(0), // not supported - } - - return c, nil -} - -// Return true if proto is the corresponding to the kind parameter -// Only for Inet lines -func hasCorrectInetProto(kind, proto string) bool { - switch kind { - case "all", "inet": - return true - case "unix": - return false - case "inet4": - return !strings.HasSuffix(proto, "6") - case "inet6": - return strings.HasSuffix(proto, "6") - case "tcp": - return proto == "tcp" || proto == "tcp4" || proto == "tcp6" - case "tcp4": - return proto == "tcp" || proto == "tcp4" - case "tcp6": - return proto == "tcp6" - case "udp": - return proto == "udp" || proto == "udp4" || proto == "udp6" - case "udp4": - return proto == "udp" || proto == "udp4" - case "udp6": - return proto == "udp6" - } - return false -} - -func parseNetstatA(output string, kind string) ([]ConnectionStat, error) { - var ret []ConnectionStat - lines := strings.Split(string(output), "\n") - - for _, line := range lines { - fields := strings.Fields(line) - if len(fields) < 1 { - continue - } - - switch { - case strings.HasPrefix(fields[0], "f1"): - // Unix lines - if len(fields) < 2 { - // every unix connections have two lines - continue - } - - c, err := parseNetstatUnixLine(fields) - if err != nil { - return nil, fmt.Errorf("failed to parse Unix Address (%s): %w", line, err) - } - - ret = append(ret, c) - - case strings.HasPrefix(fields[0], "tcp") || strings.HasPrefix(fields[0], "udp"): - // Inet lines - if !hasCorrectInetProto(kind, fields[0]) { - continue - } - - // On AIX, netstat display some connections with "*.*" as local addresses - // Skip them as they aren't real connections. - if fields[3] == "*.*" { - continue - } - - c, err := parseNetstatNetLine(line) - if err != nil { - return nil, fmt.Errorf("failed to parse Inet Address (%s): %w", line, err) - } - - ret = append(ret, c) - default: - // Header lines - continue - } - } - - return ret, nil -} - -func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - args := []string{"-na"} - switch strings.ToLower(kind) { - default: - fallthrough - case "": - kind = "all" - case "all": - // nothing to add - case "inet", "inet4", "inet6": - args = append(args, "-finet") - case "tcp", "tcp4", "tcp6": - args = append(args, "-finet") - case "udp", "udp4", "udp6": - args = append(args, "-finet") - case "unix": - args = append(args, "-funix") - } - - out, err := invoke.CommandWithContext(ctx, "netstat", args...) - if err != nil { - return nil, err - } - - ret, err := parseNetstatA(string(out), kind) - if err != nil { - return nil, err - } - - return ret, nil -} - -func ConnectionsMaxWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, false) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, true) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int, _ bool) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_aix_cgo.go b/vendor/github.com/shirou/gopsutil/v4/net/net_aix_cgo.go deleted file mode 100644 index f7da4ce139..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_aix_cgo.go +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && cgo - -package net - -import ( - "context" - - "github.com/power-devops/perfstat" -) - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - ifs, err := perfstat.NetIfaceStat() - if err != nil { - return nil, err - } - - iocounters := make([]IOCountersStat, 0, len(ifs)) - for _, netif := range ifs { - n := IOCountersStat{ - Name: netif.Name, - BytesSent: uint64(netif.OBytes), - BytesRecv: uint64(netif.IBytes), - PacketsSent: uint64(netif.OPackets), - PacketsRecv: uint64(netif.IPackets), - Errin: uint64(netif.OErrors), - Errout: uint64(netif.IErrors), - Dropout: uint64(netif.XmitDrops), - } - iocounters = append(iocounters, n) - } - if !pernic { - return getIOCountersAll(iocounters), nil - } - return iocounters, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_aix_nocgo.go b/vendor/github.com/shirou/gopsutil/v4/net/net_aix_nocgo.go deleted file mode 100644 index 834534d34c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_aix_nocgo.go +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build aix && !cgo - -package net - -import ( - "context" - "errors" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func parseNetstatI(output string) ([]IOCountersStat, error) { - lines := strings.Split(string(output), "\n") - ret := make([]IOCountersStat, 0, len(lines)-1) - exists := make([]string, 0, len(ret)) - - // Check first line is header - if len(lines) > 0 && strings.Fields(lines[0])[0] != "Name" { - return nil, errors.New("not a 'netstat -i' output") - } - - for _, line := range lines[1:] { - values := strings.Fields(line) - if len(values) < 1 || values[0] == "Name" { - continue - } - if common.StringsHas(exists, values[0]) { - // skip if already get - continue - } - exists = append(exists, values[0]) - - if len(values) < 9 { - continue - } - - base := 1 - // sometimes Address is omitted - if len(values) < 10 { - base = 0 - } - - parsed := make([]uint64, 0, 5) - vv := []string{ - values[base+3], // Ipkts == PacketsRecv - values[base+4], // Ierrs == Errin - values[base+5], // Opkts == PacketsSent - values[base+6], // Oerrs == Errout - values[base+8], // Drops == Dropout - } - - for _, target := range vv { - if target == "-" { - parsed = append(parsed, 0) - continue - } - - t, err := strconv.ParseUint(target, 10, 64) - if err != nil { - return nil, err - } - parsed = append(parsed, t) - } - - n := IOCountersStat{ - Name: values[0], - PacketsRecv: parsed[0], - Errin: parsed[1], - PacketsSent: parsed[2], - Errout: parsed[3], - Dropout: parsed[4], - } - ret = append(ret, n) - } - return ret, nil -} - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - out, err := invoke.CommandWithContext(ctx, "netstat", "-idn") - if err != nil { - return nil, err - } - - iocounters, err := parseNetstatI(string(out)) - if err != nil { - return nil, err - } - if !pernic { - return getIOCountersAll(iocounters), nil - } - return iocounters, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go b/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go deleted file mode 100644 index 5814a54841..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_darwin.go +++ /dev/null @@ -1,271 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin - -package net - -import ( - "context" - "errors" - "fmt" - "os/exec" - "regexp" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ( - errNetstatHeader = errors.New("Can't parse header of netstat output") - netstatLinkRegexp = regexp.MustCompile(`^$`) -) - -const endOfLine = "\n" - -func parseNetstatLine(line string) (stat *IOCountersStat, linkID *uint, err error) { - var ( - numericValue uint64 - columns = strings.Fields(line) - ) - - if columns[0] == "Name" { - err = errNetstatHeader - return //nolint:nakedret //FIXME - } - - // try to extract the numeric value from - if subMatch := netstatLinkRegexp.FindStringSubmatch(columns[2]); len(subMatch) == 2 { - numericValue, err = strconv.ParseUint(subMatch[1], 10, 64) - if err != nil { - return //nolint:nakedret //FIXME - } - linkIDUint := uint(numericValue) - linkID = &linkIDUint - } - - base := 1 - numberColumns := len(columns) - // sometimes Address is omitted - if numberColumns < 12 { - base = 0 - } - if numberColumns < 11 || numberColumns > 13 { - err = fmt.Errorf("Line %q do have an invalid number of columns %d", line, numberColumns) - return //nolint:nakedret //FIXME - } - - parsed := make([]uint64, 0, 7) - vv := []string{ - columns[base+3], // Ipkts == PacketsRecv - columns[base+4], // Ierrs == Errin - columns[base+5], // Ibytes == BytesRecv - columns[base+6], // Opkts == PacketsSent - columns[base+7], // Oerrs == Errout - columns[base+8], // Obytes == BytesSent - } - if len(columns) == 12 { - vv = append(vv, columns[base+10]) - } - - for _, target := range vv { - if target == "-" { - parsed = append(parsed, 0) - continue - } - - if numericValue, err = strconv.ParseUint(target, 10, 64); err != nil { - return //nolint:nakedret //FIXME - } - parsed = append(parsed, numericValue) - } - - stat = &IOCountersStat{ - Name: strings.Trim(columns[0], "*"), // remove the * that sometimes is on right on interface - PacketsRecv: parsed[0], - Errin: parsed[1], - BytesRecv: parsed[2], - PacketsSent: parsed[3], - Errout: parsed[4], - BytesSent: parsed[5], - } - if len(parsed) == 7 { - stat.Dropout = parsed[6] - } - return //nolint:nakedret //FIXME -} - -type netstatInterface struct { - linkID *uint - stat *IOCountersStat -} - -func parseNetstatOutput(output string) ([]netstatInterface, error) { - var ( - err error - lines = strings.Split(strings.Trim(output, endOfLine), endOfLine) - ) - - // number of interfaces is number of lines less one for the header - numberInterfaces := len(lines) - 1 - - interfaces := make([]netstatInterface, numberInterfaces) - // no output beside header - if numberInterfaces == 0 { - return interfaces, nil - } - - for index := 0; index < numberInterfaces; index++ { - nsIface := netstatInterface{} - if nsIface.stat, nsIface.linkID, err = parseNetstatLine(lines[index+1]); err != nil { - return nil, err - } - interfaces[index] = nsIface - } - return interfaces, nil -} - -// map that hold the name of a network interface and the number of usage -type mapInterfaceNameUsage map[string]uint - -func newMapInterfaceNameUsage(ifaces []netstatInterface) mapInterfaceNameUsage { - output := make(mapInterfaceNameUsage) - for index := range ifaces { - if ifaces[index].linkID != nil { - ifaceName := ifaces[index].stat.Name - usage, ok := output[ifaceName] - if ok { - output[ifaceName] = usage + 1 - } else { - output[ifaceName] = 1 - } - } - } - return output -} - -func (mapi mapInterfaceNameUsage) isTruncated() bool { - for _, usage := range mapi { - if usage > 1 { - return true - } - } - return false -} - -func (mapi mapInterfaceNameUsage) notTruncated() []string { - output := make([]string, 0) - for ifaceName, usage := range mapi { - if usage == 1 { - output = append(output, ifaceName) - } - } - return output -} - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -// example of `netstat -ibdnW` output on yosemite -// Name Mtu Network Address Ipkts Ierrs Ibytes Opkts Oerrs Obytes Coll Drop -// lo0 16384 869107 0 169411755 869107 0 169411755 0 0 -// lo0 16384 ::1/128 ::1 869107 - 169411755 869107 - 169411755 - - -// lo0 16384 127 127.0.0.1 869107 - 169411755 869107 - 169411755 - - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - var ( - ret []IOCountersStat - retIndex int - ) - - netstat, err := exec.LookPath("netstat") - if err != nil { - return nil, err - } - - // try to get all interface metrics, and hope there won't be any truncated - out, err := invoke.CommandWithContext(ctx, netstat, "-ibdnW") - if err != nil { - return nil, err - } - - nsInterfaces, err := parseNetstatOutput(string(out)) - if err != nil { - return nil, err - } - - ifaceUsage := newMapInterfaceNameUsage(nsInterfaces) - notTruncated := ifaceUsage.notTruncated() - ret = make([]IOCountersStat, len(notTruncated)) - - if !ifaceUsage.isTruncated() { - // no truncated interface name, return stats of all interface with - for index := range nsInterfaces { - if nsInterfaces[index].linkID != nil { - ret[retIndex] = *nsInterfaces[index].stat - retIndex++ - } - } - } else { - // duplicated interface, list all interfaces - if out, err = invoke.CommandWithContext(ctx, "ifconfig", "-l"); err != nil { - return nil, err - } - interfaceNames := strings.Fields(strings.TrimRight(string(out), endOfLine)) - - // for each of the interface name, run netstat if we don't have any stats yet - for _, interfaceName := range interfaceNames { - truncated := true - for index := range nsInterfaces { - if nsInterfaces[index].linkID != nil && nsInterfaces[index].stat.Name == interfaceName { - // handle the non truncated name to avoid execute netstat for them again - ret[retIndex] = *nsInterfaces[index].stat - retIndex++ - truncated = false - break - } - } - if truncated { - // run netstat with -I$ifacename - if out, err = invoke.CommandWithContext(ctx, netstat, "-ibdnWI"+interfaceName); err != nil { - return nil, err - } - parsedIfaces, err := parseNetstatOutput(string(out)) - if err != nil { - return nil, err - } - if len(parsedIfaces) == 0 { - // interface had been removed since `ifconfig -l` had been executed - continue - } - for index := range parsedIfaces { - if parsedIfaces[index].linkID != nil { - ret = append(ret, *parsedIfaces[index].stat) - break - } - } - } - } - } - - if !pernic { - return getIOCountersAll(ret), nil - } - return ret, nil -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_fallback.go b/vendor/github.com/shirou/gopsutil/v4/net/net_fallback.go deleted file mode 100644 index 29c2a148ef..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_fallback.go +++ /dev/null @@ -1,71 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build !aix && !darwin && !linux && !freebsd && !openbsd && !windows && !solaris - -package net - -import ( - "context" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func IOCountersWithContext(_ context.Context, _ bool) ([]IOCountersStat, error) { - return []IOCountersStat{}, common.ErrNotImplementedError -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsWithContext(_ context.Context, _ string) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} - -func ConnectionsMaxWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, false) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, true) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int, _ bool) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_freebsd.go b/vendor/github.com/shirou/gopsutil/v4/net/net_freebsd.go deleted file mode 100644 index a72aa00a60..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_freebsd.go +++ /dev/null @@ -1,108 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd - -package net - -import ( - "context" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - out, err := invoke.CommandWithContext(ctx, "netstat", "-ibdnW") - if err != nil { - return nil, err - } - - lines := strings.Split(string(out), "\n") - ret := make([]IOCountersStat, 0, len(lines)-1) - exists := make([]string, 0, len(ret)) - - for _, line := range lines { - values := strings.Fields(line) - if len(values) < 1 || values[0] == "Name" { - continue - } - if common.StringsHas(exists, values[0]) { - // skip if already get - continue - } - exists = append(exists, values[0]) - - if len(values) < 12 { - continue - } - base := 1 - // sometimes Address is omitted - if len(values) < 13 { - base = 0 - } - - parsed := make([]uint64, 0, 8) - vv := []string{ - values[base+3], // PacketsRecv - values[base+4], // Errin - values[base+5], // Dropin - values[base+6], // BytesRecvn - values[base+7], // PacketSent - values[base+8], // Errout - values[base+9], // BytesSent - values[base+11], // Dropout - } - for _, target := range vv { - if target == "-" { - parsed = append(parsed, 0) - continue - } - - t, err := strconv.ParseUint(target, 10, 64) - if err != nil { - return nil, err - } - parsed = append(parsed, t) - } - - n := IOCountersStat{ - Name: values[0], - PacketsRecv: parsed[0], - Errin: parsed[1], - Dropin: parsed[2], - BytesRecv: parsed[3], - PacketsSent: parsed[4], - Errout: parsed[5], - BytesSent: parsed[6], - Dropout: parsed[7], - } - ret = append(ret, n) - } - - if !pernic { - return getIOCountersAll(ret), nil - } - - return ret, nil -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go b/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go deleted file mode 100644 index 969752625f..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_linux.go +++ /dev/null @@ -1,806 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package net - -import ( - "bytes" - "context" - "encoding/hex" - "errors" - "fmt" - "io" - "net" - "os" - "strconv" - "strings" - "syscall" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -const ( // Conntrack Column numbers - ctENTRIES = iota - ctSEARCHED - ctFOUND - ctNEW - ctINVALID - ctIGNORE - ctDELETE - ctDELETE_LIST //nolint:revive //FIXME - ctINSERT - ctINSERT_FAILED //nolint:revive //FIXME - ctDROP - ctEARLY_DROP //nolint:revive //FIXME - ctICMP_ERROR //nolint:revive //FIXME - CT_EXPEctNEW //nolint:revive //FIXME - ctEXPECT_CREATE //nolint:revive //FIXME - CT_EXPEctDELETE //nolint:revive //FIXME - ctSEARCH_RESTART //nolint:revive //FIXME -) - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - filename := common.HostProcWithContext(ctx, "net/dev") - return IOCountersByFileWithContext(ctx, pernic, filename) -} - -func IOCountersByFileWithContext(_ context.Context, pernic bool, filename string) ([]IOCountersStat, error) { - lines, err := common.ReadLines(filename) - if err != nil { - return nil, err - } - - parts := make([]string, 2) - - statlen := len(lines) - 1 - - ret := make([]IOCountersStat, 0, statlen) - - for _, line := range lines[2:] { - separatorPos := strings.LastIndex(line, ":") - if separatorPos == -1 { - continue - } - parts[0] = line[0:separatorPos] - parts[1] = line[separatorPos+1:] - - interfaceName := strings.TrimSpace(parts[0]) - if interfaceName == "" { - continue - } - - fields := strings.Fields(strings.TrimSpace(parts[1])) - bytesRecv, err := strconv.ParseUint(fields[0], 10, 64) - if err != nil { - return ret, err - } - packetsRecv, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - return ret, err - } - errIn, err := strconv.ParseUint(fields[2], 10, 64) - if err != nil { - return ret, err - } - dropIn, err := strconv.ParseUint(fields[3], 10, 64) - if err != nil { - return ret, err - } - fifoIn, err := strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return ret, err - } - bytesSent, err := strconv.ParseUint(fields[8], 10, 64) - if err != nil { - return ret, err - } - packetsSent, err := strconv.ParseUint(fields[9], 10, 64) - if err != nil { - return ret, err - } - errOut, err := strconv.ParseUint(fields[10], 10, 64) - if err != nil { - return ret, err - } - dropOut, err := strconv.ParseUint(fields[11], 10, 64) - if err != nil { - return ret, err - } - fifoOut, err := strconv.ParseUint(fields[12], 10, 64) - if err != nil { - return ret, err - } - - nic := IOCountersStat{ - Name: interfaceName, - BytesRecv: bytesRecv, - PacketsRecv: packetsRecv, - Errin: errIn, - Dropin: dropIn, - Fifoin: fifoIn, - BytesSent: bytesSent, - PacketsSent: packetsSent, - Errout: errOut, - Dropout: dropOut, - Fifoout: fifoOut, - } - ret = append(ret, nic) - } - - if !pernic { - return getIOCountersAll(ret), nil - } - - return ret, nil -} - -var netProtocols = []string{ - "ip", - "icmp", - "icmpmsg", - "tcp", - "udp", - "udplite", -} - -func ProtoCountersWithContext(ctx context.Context, protocols []string) ([]ProtoCountersStat, error) { - if len(protocols) == 0 { - protocols = netProtocols - } - - stats := make([]ProtoCountersStat, 0, len(protocols)) - protos := make(map[string]bool, len(protocols)) - for _, p := range protocols { - protos[p] = true - } - - filename := common.HostProcWithContext(ctx, "net/snmp") - lines, err := common.ReadLines(filename) - if err != nil { - return nil, err - } - - linecount := len(lines) - for i := 0; i < linecount; i++ { - line := lines[i] - r := strings.IndexRune(line, ':') - if r == -1 { - return nil, errors.New(filename + " is not formatted correctly, expected ':'.") - } - proto := strings.ToLower(line[:r]) - if !protos[proto] { - // skip protocol and data line - i++ - continue - } - - // Read header line - statNames := strings.Split(line[r+2:], " ") - - // Read data line - i++ - statValues := strings.Split(lines[i][r+2:], " ") - if len(statNames) != len(statValues) { - return nil, errors.New(filename + " is not formatted correctly, expected same number of columns.") - } - stat := ProtoCountersStat{ - Protocol: proto, - Stats: make(map[string]int64, len(statNames)), - } - for j := range statNames { - value, err := strconv.ParseInt(statValues[j], 10, 64) - if err != nil { - return nil, err - } - stat.Stats[statNames[j]] = value - } - stats = append(stats, stat) - } - return stats, nil -} - -func FilterCountersWithContext(ctx context.Context) ([]FilterStat, error) { - countfile := common.HostProcWithContext(ctx, "sys/net/netfilter/nf_conntrack_count") - maxfile := common.HostProcWithContext(ctx, "sys/net/netfilter/nf_conntrack_max") - - count, err := common.ReadInts(countfile) - if err != nil { - return nil, err - } - stats := make([]FilterStat, 0, 1) - - maxConn, err := common.ReadInts(maxfile) - if err != nil { - return nil, err - } - - payload := FilterStat{ - ConnTrackCount: count[0], - ConnTrackMax: maxConn[0], - } - - stats = append(stats, payload) - return stats, nil -} - -// ConntrackStatsWithContext returns more detailed info about the conntrack table -func ConntrackStatsWithContext(ctx context.Context, percpu bool) ([]ConntrackStat, error) { - return conntrackStatsFromFile(common.HostProcWithContext(ctx, "net/stat/nf_conntrack"), percpu) -} - -// conntrackStatsFromFile returns more detailed info about the conntrack table -// from `filename` -// If 'percpu' is false, the result will contain exactly one item with totals/summary -func conntrackStatsFromFile(filename string, percpu bool) ([]ConntrackStat, error) { - lines, err := common.ReadLines(filename) - if err != nil { - return nil, err - } - - statlist := NewConntrackStatList() - - for _, line := range lines { - fields := strings.Fields(line) - if len(fields) == 17 && fields[0] != "entries" { - statlist.Append(NewConntrackStat( - common.HexToUint32(fields[ctENTRIES]), - common.HexToUint32(fields[ctSEARCHED]), - common.HexToUint32(fields[ctFOUND]), - common.HexToUint32(fields[ctNEW]), - common.HexToUint32(fields[ctINVALID]), - common.HexToUint32(fields[ctIGNORE]), - common.HexToUint32(fields[ctDELETE]), - common.HexToUint32(fields[ctDELETE_LIST]), - common.HexToUint32(fields[ctINSERT]), - common.HexToUint32(fields[ctINSERT_FAILED]), - common.HexToUint32(fields[ctDROP]), - common.HexToUint32(fields[ctEARLY_DROP]), - common.HexToUint32(fields[ctICMP_ERROR]), - common.HexToUint32(fields[CT_EXPEctNEW]), - common.HexToUint32(fields[ctEXPECT_CREATE]), - common.HexToUint32(fields[CT_EXPEctDELETE]), - common.HexToUint32(fields[ctSEARCH_RESTART]), - )) - } - } - - if percpu { - return statlist.Items(), nil - } - return statlist.Summary(), nil -} - -// http://students.mimuw.edu.pl/lxr/source/include/net/tcp_states.h -var tcpStatuses = map[string]string{ - "01": "ESTABLISHED", - "02": "SYN_SENT", - "03": "SYN_RECV", - "04": "FIN_WAIT1", - "05": "FIN_WAIT2", - "06": "TIME_WAIT", - "07": "CLOSE", - "08": "CLOSE_WAIT", - "09": "LAST_ACK", - "0A": "LISTEN", - "0B": "CLOSING", -} - -type netConnectionKindType struct { - family uint32 - sockType uint32 - filename string -} - -var kindTCP4 = netConnectionKindType{ - family: syscall.AF_INET, - sockType: syscall.SOCK_STREAM, - filename: "tcp", -} - -var kindTCP6 = netConnectionKindType{ - family: syscall.AF_INET6, - sockType: syscall.SOCK_STREAM, - filename: "tcp6", -} - -var kindUDP4 = netConnectionKindType{ - family: syscall.AF_INET, - sockType: syscall.SOCK_DGRAM, - filename: "udp", -} - -var kindUDP6 = netConnectionKindType{ - family: syscall.AF_INET6, - sockType: syscall.SOCK_DGRAM, - filename: "udp6", -} - -var kindUNIX = netConnectionKindType{ - family: syscall.AF_UNIX, - filename: "unix", -} - -var netConnectionKindMap = map[string][]netConnectionKindType{ - "all": {kindTCP4, kindTCP6, kindUDP4, kindUDP6, kindUNIX}, - "tcp": {kindTCP4, kindTCP6}, - "tcp4": {kindTCP4}, - "tcp6": {kindTCP6}, - "udp": {kindUDP4, kindUDP6}, - "udp4": {kindUDP4}, - "udp6": {kindUDP6}, - "unix": {kindUNIX}, - "inet": {kindTCP4, kindTCP6, kindUDP4, kindUDP6}, - "inet4": {kindTCP4, kindUDP4}, - "inet6": {kindTCP6, kindUDP6}, -} - -type inodeMap struct { - pid int32 - fd uint32 -} - -type connTmp struct { - fd uint32 - family uint32 - sockType uint32 - laddr Addr - raddr Addr - status string - pid int32 - boundPid int32 - path string -} - -func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsPidWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, false) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, true) -} - -func connectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int, skipUids bool) ([]ConnectionStat, error) { - tmap, ok := netConnectionKindMap[kind] - if !ok { - return nil, fmt.Errorf("invalid kind, %s", kind) - } - root := common.HostProcWithContext(ctx) - var err error - var inodes map[string][]inodeMap - if pid == 0 { - inodes, err = getProcInodesAllWithContext(ctx, root, maxConn) - } else { - inodes, err = getProcInodes(root, pid, maxConn) - if len(inodes) == 0 { - // no connection for the pid - return []ConnectionStat{}, nil - } - } - if err != nil { - return nil, fmt.Errorf("could not get pid(s), %d: %w", pid, err) - } - return statsFromInodesWithContext(ctx, root, pid, tmap, inodes, skipUids) -} - -func statsFromInodesWithContext(ctx context.Context, root string, pid int32, tmap []netConnectionKindType, inodes map[string][]inodeMap, skipUids bool) ([]ConnectionStat, error) { - dupCheckMap := make(map[string]struct{}) - var ret []ConnectionStat - - var err error - for _, t := range tmap { - var path string - var connKey string - var ls []connTmp - if pid == 0 { - path = fmt.Sprintf("%s/net/%s", root, t.filename) - } else { - path = fmt.Sprintf("%s/%d/net/%s", root, pid, t.filename) - } - switch t.family { - case syscall.AF_INET, syscall.AF_INET6: - ls, err = processInet(path, t, inodes, pid) - case syscall.AF_UNIX: - ls, err = processUnix(path, t, inodes, pid) - } - if err != nil { - return nil, err - } - for _, c := range ls { - // Build TCP key to id the connection uniquely - // socket type, src ip, src port, dst ip, dst port and state should be enough - // to prevent duplications. - connKey = fmt.Sprintf("%d-%s:%d-%s:%d-%s", c.sockType, c.laddr.IP, c.laddr.Port, c.raddr.IP, c.raddr.Port, c.status) - if _, ok := dupCheckMap[connKey]; ok { - continue - } - - conn := ConnectionStat{ - Fd: c.fd, - Family: c.family, - Type: c.sockType, - Laddr: c.laddr, - Raddr: c.raddr, - Status: c.status, - Pid: c.pid, - } - if c.pid == 0 { - conn.Pid = c.boundPid - } else { - conn.Pid = c.pid - } - - if !skipUids { - // fetch process owner Real, effective, saved set, and filesystem UIDs - proc := process{Pid: conn.Pid} - conn.Uids, _ = proc.getUids(ctx) - } - - ret = append(ret, conn) - dupCheckMap[connKey] = struct{}{} - } - - } - - return ret, nil -} - -// getProcInodes returns fd of the pid. -func getProcInodes(root string, pid int32, maxConn int) (map[string][]inodeMap, error) { - ret := make(map[string][]inodeMap) - - dir := fmt.Sprintf("%s/%d/fd", root, pid) - f, err := os.Open(dir) - if err != nil { - return ret, err - } - defer f.Close() - dirEntries, err := f.ReadDir(maxConn) - if err != nil { - return ret, err - } - for _, dirEntry := range dirEntries { - inodePath := fmt.Sprintf("%s/%d/fd/%s", root, pid, dirEntry.Name()) - - inode, err := os.Readlink(inodePath) - if err != nil { - continue - } - if !strings.HasPrefix(inode, "socket:[") { - continue - } - // the process is using a socket - l := len(inode) - inode = inode[8 : l-1] - _, ok := ret[inode] - if !ok { - ret[inode] = make([]inodeMap, 0) - } - fd, err := strconv.ParseInt(dirEntry.Name(), 10, 32) - if err != nil { - continue - } - - i := inodeMap{ - pid: pid, - fd: uint32(fd), - } - ret[inode] = append(ret[inode], i) - } - return ret, nil -} - -func PidsWithContext(ctx context.Context) ([]int32, error) { - var ret []int32 - - d, err := os.Open(common.HostProcWithContext(ctx)) - if err != nil { - return nil, err - } - defer d.Close() - - fnames, err := d.Readdirnames(-1) - if err != nil { - return nil, err - } - for _, fname := range fnames { - pid, err := strconv.ParseInt(fname, 10, 32) - if err != nil { - // if not numeric name, just skip - continue - } - ret = append(ret, int32(pid)) - } - - return ret, nil -} - -// Note: the following is based off process_linux structs and methods -// we need these to fetch the owner of a process ID -// FIXME: Import process occures import cycle. -// see remarks on pids() -type process struct { - Pid int32 `json:"pid"` - uids []int32 -} - -// Uids returns user ids of the process as a slice of the int -func (p *process) getUids(ctx context.Context) ([]int32, error) { - err := p.fillFromStatus(ctx) - if err != nil { - return []int32{}, err - } - return p.uids, nil -} - -// Get status from /proc/(pid)/status -func (p *process) fillFromStatus(ctx context.Context) error { - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "status") - contents, err := os.ReadFile(statPath) - if err != nil { - return err - } - lines := strings.Split(string(contents), "\n") - for _, line := range lines { - tabParts := strings.SplitN(line, "\t", 2) - if len(tabParts) < 2 { - continue - } - value := tabParts[1] - if strings.TrimRight(tabParts[0], ":") == "Uid" { - p.uids = make([]int32, 0, 4) - for _, i := range strings.Split(value, "\t") { - v, err := strconv.ParseInt(i, 10, 32) - if err != nil { - return err - } - p.uids = append(p.uids, int32(v)) - } - } - } - return nil -} - -func getProcInodesAllWithContext(ctx context.Context, root string, maxConn int) (map[string][]inodeMap, error) { - pids, err := PidsWithContext(ctx) - if err != nil { - return nil, err - } - ret := make(map[string][]inodeMap) - - for _, pid := range pids { - t, err := getProcInodes(root, pid, maxConn) - if err != nil { - // skip if permission error or no longer exists - if os.IsPermission(err) || os.IsNotExist(err) || errors.Is(err, io.EOF) { - continue - } - return ret, err - } - if len(t) == 0 { - continue - } - // TODO: update ret. - ret = updateMap(ret, t) - } - return ret, nil -} - -// decodeAddress decode addresse represents addr in proc/net/* -// ex: -// "0500000A:0016" -> "10.0.0.5", 22 -// "0085002452100113070057A13F025401:0035" -> "2400:8500:1301:1052:a157:7:154:23f", 53 -func decodeAddress(family uint32, src string) (Addr, error) { - t := strings.Split(src, ":") - if len(t) != 2 { - return Addr{}, fmt.Errorf("does not contain port, %s", src) - } - addr := t[0] - port, err := strconv.ParseUint(t[1], 16, 16) - if err != nil { - return Addr{}, fmt.Errorf("invalid port, %s", src) - } - decoded, err := hex.DecodeString(addr) - if err != nil { - return Addr{}, fmt.Errorf("decode error, %w", err) - } - var ip net.IP - - if family == syscall.AF_INET { - if common.IsLittleEndian() { - ip = net.IP(Reverse(decoded)) - } else { - ip = net.IP(decoded) - } - } else { // IPv6 - ip, err = parseIPv6HexString(decoded) - if err != nil { - return Addr{}, err - } - } - return Addr{ - IP: ip.String(), - Port: uint32(port), - }, nil -} - -func Reverse(s []byte) []byte { - for i, j := 0, len(s)-1; i < j; i, j = i+1, j-1 { - s[i], s[j] = s[j], s[i] - } - return s -} - -// parseIPv6HexString parse array of bytes to IPv6 string -func parseIPv6HexString(src []byte) (net.IP, error) { - if len(src) != 16 { - return nil, errors.New("invalid IPv6 string") - } - - buf := make([]byte, 0, 16) - for i := 0; i < len(src); i += 4 { - r := Reverse(src[i : i+4]) - buf = append(buf, r...) - } - return net.IP(buf), nil -} - -func processInet(file string, kind netConnectionKindType, inodes map[string][]inodeMap, filterPid int32) ([]connTmp, error) { - if strings.HasSuffix(file, "6") && !common.PathExists(file) { - // IPv6 not supported, return empty. - return []connTmp{}, nil - } - - // Read the contents of the /proc file with a single read sys call. - // This minimizes duplicates in the returned connections - // For more info: - // https://github.com/shirou/gopsutil/pull/361 - contents, err := os.ReadFile(file) - if err != nil { - return nil, err - } - - lines := bytes.Split(contents, []byte("\n")) - - var ret []connTmp - // skip first line - for _, line := range lines[1:] { - l := strings.Fields(string(line)) - if len(l) < 10 { - continue - } - laddr := l[1] - raddr := l[2] - status := l[3] - inode := l[9] - pid := int32(0) - fd := uint32(0) - i, exists := inodes[inode] - if exists { - pid = i[0].pid - fd = i[0].fd - } - if filterPid > 0 && filterPid != pid { - continue - } - if kind.sockType == syscall.SOCK_STREAM { - status = tcpStatuses[status] - } else { - status = "NONE" - } - la, err := decodeAddress(kind.family, laddr) - if err != nil { - continue - } - ra, err := decodeAddress(kind.family, raddr) - if err != nil { - continue - } - - ret = append(ret, connTmp{ - fd: fd, - family: kind.family, - sockType: kind.sockType, - laddr: la, - raddr: ra, - status: status, - pid: pid, - }) - } - - return ret, nil -} - -func processUnix(file string, kind netConnectionKindType, inodes map[string][]inodeMap, filterPid int32) ([]connTmp, error) { - // Read the contents of the /proc file with a single read sys call. - // This minimizes duplicates in the returned connections - // For more info: - // https://github.com/shirou/gopsutil/pull/361 - contents, err := os.ReadFile(file) - if err != nil { - return nil, err - } - - lines := bytes.Split(contents, []byte("\n")) - - var ret []connTmp - // skip first line - for _, line := range lines[1:] { - tokens := strings.Fields(string(line)) - if len(tokens) < 6 { - continue - } - st, err := strconv.ParseInt(tokens[4], 10, 32) - if err != nil { - return nil, err - } - - inode := tokens[6] - - var pairs []inodeMap - pairs, exists := inodes[inode] - if !exists { - pairs = []inodeMap{ - {}, - } - } - for _, pair := range pairs { - if filterPid > 0 && filterPid != pair.pid { - continue - } - var path string - if len(tokens) == 8 { - path = tokens[len(tokens)-1] - } - ret = append(ret, connTmp{ - fd: pair.fd, - family: kind.family, - sockType: uint32(st), - laddr: Addr{ - IP: path, - }, - pid: pair.pid, - status: "NONE", - path: path, - }) - } - } - - return ret, nil -} - -func updateMap(src map[string][]inodeMap, add map[string][]inodeMap) map[string][]inodeMap { - for key, value := range add { - a, exists := src[key] - if !exists { - src[key] = value - continue - } - src[key] = append(a, value...) - } - return src -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go deleted file mode 100644 index 41f0f46c43..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_openbsd.go +++ /dev/null @@ -1,343 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd - -package net - -import ( - "context" - "fmt" - "os/exec" - "regexp" - "strconv" - "strings" - "syscall" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var portMatch = regexp.MustCompile(`(.*)\.(\d+)$`) - -func ParseNetstat(output string, mode string, - iocs map[string]IOCountersStat, -) error { - lines := strings.Split(output, "\n") - - exists := make([]string, 0, len(lines)-1) - - columns := 9 - if mode == "inb" { - columns = 6 - } - for _, line := range lines { - values := strings.Fields(line) - if len(values) < 1 || values[0] == "Name" { - continue - } - if common.StringsHas(exists, values[0]) { - // skip if already get - continue - } - - if len(values) < columns { - continue - } - base := 1 - // sometimes Address is omitted - if len(values) < columns { - base = 0 - } - - parsed := make([]uint64, 0, 8) - var vv []string - switch mode { - case "inb": - vv = []string{ - values[base+3], // BytesRecv - values[base+4], // BytesSent - } - case "ind": - vv = []string{ - values[base+3], // Ipkts - values[base+4], // Idrop - values[base+5], // Opkts - values[base+6], // Odrops - } - case "ine": - vv = []string{ - values[base+4], // Ierrs - values[base+6], // Oerrs - } - } - for _, target := range vv { - if target == "-" { - parsed = append(parsed, 0) - continue - } - - t, err := strconv.ParseUint(target, 10, 64) - if err != nil { - return err - } - parsed = append(parsed, t) - } - exists = append(exists, values[0]) - - n, present := iocs[values[0]] - if !present { - n = IOCountersStat{Name: values[0]} - } - - switch mode { - case "inb": - n.BytesRecv = parsed[0] - n.BytesSent = parsed[1] - case "ind": - n.PacketsRecv = parsed[0] - n.Dropin = parsed[1] - n.PacketsSent = parsed[2] - n.Dropout = parsed[3] - case "ine": - n.Errin = parsed[0] - n.Errout = parsed[1] - } - - iocs[n.Name] = n - } - return nil -} - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - netstat, err := exec.LookPath("netstat") - if err != nil { - return nil, err - } - out, err := invoke.CommandWithContext(ctx, netstat, "-inb") - if err != nil { - return nil, err - } - out2, err := invoke.CommandWithContext(ctx, netstat, "-ind") - if err != nil { - return nil, err - } - out3, err := invoke.CommandWithContext(ctx, netstat, "-ine") - if err != nil { - return nil, err - } - iocs := make(map[string]IOCountersStat) - - lines := strings.Split(string(out), "\n") - ret := make([]IOCountersStat, 0, len(lines)-1) - - err = ParseNetstat(string(out), "inb", iocs) - if err != nil { - return nil, err - } - err = ParseNetstat(string(out2), "ind", iocs) - if err != nil { - return nil, err - } - err = ParseNetstat(string(out3), "ine", iocs) - if err != nil { - return nil, err - } - - for _, ioc := range iocs { - ret = append(ret, ioc) - } - - if !pernic { - return getIOCountersAll(ret), nil - } - - return ret, nil -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func parseNetstatLine(line string) (ConnectionStat, error) { - f := strings.Fields(line) - if len(f) < 5 { - return ConnectionStat{}, fmt.Errorf("wrong line,%s", line) - } - - var netType, netFamily uint32 - switch f[0] { - case "tcp": - netType = syscall.SOCK_STREAM - netFamily = syscall.AF_INET - case "udp": - netType = syscall.SOCK_DGRAM - netFamily = syscall.AF_INET - case "tcp6": - netType = syscall.SOCK_STREAM - netFamily = syscall.AF_INET6 - case "udp6": - netType = syscall.SOCK_DGRAM - netFamily = syscall.AF_INET6 - default: - return ConnectionStat{}, fmt.Errorf("unknown type, %s", f[0]) - } - - laddr, raddr, err := parseNetstatAddr(f[3], f[4], netFamily) - if err != nil { - return ConnectionStat{}, fmt.Errorf("failed to parse netaddr, %s %s", f[3], f[4]) - } - - n := ConnectionStat{ - Fd: uint32(0), // not supported - Family: uint32(netFamily), - Type: uint32(netType), - Laddr: laddr, - Raddr: raddr, - Pid: int32(0), // not supported - } - if len(f) == 6 { - n.Status = f[5] - } - - return n, nil -} - -func parseNetstatAddr(local string, remote string, family uint32) (laddr Addr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - matches := portMatch.FindStringSubmatch(l) - if matches == nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - host := matches[1] - port := matches[2] - if host == "*" { - switch family { - case syscall.AF_INET: - host = "0.0.0.0" - case syscall.AF_INET6: - host = "::" - default: - return Addr{}, fmt.Errorf("unknown family, %d", family) - } - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil - } - - laddr, err = parse(local) - if remote != "*.*" { // remote addr exists - raddr, err = parse(remote) - if err != nil { - return laddr, raddr, err - } - } - - return laddr, raddr, err -} - -func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - var ret []ConnectionStat - - args := []string{"-na"} - switch strings.ToLower(kind) { - default: - fallthrough - case "": - fallthrough - case "all": - fallthrough - case "inet": - // nothing to add - case "inet4": - args = append(args, "-finet") - case "inet6": - args = append(args, "-finet6") - case "tcp": - args = append(args, "-ptcp") - case "tcp4": - args = append(args, "-ptcp", "-finet") - case "tcp6": - args = append(args, "-ptcp", "-finet6") - case "udp": - args = append(args, "-pudp") - case "udp4": - args = append(args, "-pudp", "-finet") - case "udp6": - args = append(args, "-pudp", "-finet6") - case "unix": - return ret, common.ErrNotImplementedError - } - - netstat, err := exec.LookPath("netstat") - if err != nil { - return nil, err - } - out, err := invoke.CommandWithContext(ctx, netstat, args...) - if err != nil { - return nil, err - } - lines := strings.Split(string(out), "\n") - for _, line := range lines { - if !(strings.HasPrefix(line, "tcp") || strings.HasPrefix(line, "udp")) { - continue - } - n, err := parseNetstatLine(line) - if err != nil { - continue - } - - ret = append(ret, n) - } - - return ret, nil -} - -func ConnectionsPidWithContext(_ context.Context, _ string, _ int32) ([]ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsMaxWithContext(_ context.Context, _ string, _ int) ([]ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsPidMaxWithContext(_ context.Context, _ string, _ int32, _ int) ([]ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int) ([]ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_solaris.go b/vendor/github.com/shirou/gopsutil/v4/net/net_solaris.go deleted file mode 100644 index df067806c3..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_solaris.go +++ /dev/null @@ -1,169 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build solaris - -package net - -import ( - "context" - "errors" - "fmt" - "regexp" - "runtime" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var kstatSplit = regexp.MustCompile(`[:\s]+`) - -func IOCountersWithContext(ctx context.Context, pernic bool) ([]IOCountersStat, error) { - // collect all the net class's links with below statistics - filterstr := "/^(?!vnic)/::phys:/^rbytes64$|^ipackets64$|^idrops64$|^ierrors$|^obytes64$|^opackets64$|^odrops64$|^oerrors$/" - if runtime.GOOS == "illumos" { - filterstr = "/[^vnic]/::mac:/^rbytes64$|^ipackets64$|^idrops64$|^ierrors$|^obytes64$|^opackets64$|^odrops64$|^oerrors$/" - } - kstatSysOut, err := invoke.CommandWithContext(ctx, "kstat", "-c", "net", "-p", filterstr) - if err != nil { - return nil, fmt.Errorf("cannot execute kstat: %w", err) - } - - lines := strings.Split(strings.TrimSpace(string(kstatSysOut)), "\n") - if len(lines) == 0 { - return nil, errors.New("no interface found") - } - rbytes64arr := make(map[string]uint64) - ipackets64arr := make(map[string]uint64) - idrops64arr := make(map[string]uint64) - ierrorsarr := make(map[string]uint64) - obytes64arr := make(map[string]uint64) - opackets64arr := make(map[string]uint64) - odrops64arr := make(map[string]uint64) - oerrorsarr := make(map[string]uint64) - - for _, line := range lines { - fields := kstatSplit.Split(line, -1) - interfaceName := fields[0] - instance := fields[1] - switch fields[3] { - case "rbytes64": - rbytes64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse rbytes64: %w", err) - } - case "ipackets64": - ipackets64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse ipackets64: %w", err) - } - case "idrops64": - idrops64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse idrops64: %w", err) - } - case "ierrors": - ierrorsarr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse ierrors: %w", err) - } - case "obytes64": - obytes64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse obytes64: %w", err) - } - case "opackets64": - opackets64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse opackets64: %w", err) - } - case "odrops64": - odrops64arr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse odrops64: %w", err) - } - case "oerrors": - oerrorsarr[interfaceName+instance], err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, fmt.Errorf("cannot parse oerrors: %w", err) - } - } - } - ret := make([]IOCountersStat, 0) - for k := range rbytes64arr { - nic := IOCountersStat{ - Name: k, - BytesRecv: rbytes64arr[k], - PacketsRecv: ipackets64arr[k], - Errin: ierrorsarr[k], - Dropin: idrops64arr[k], - BytesSent: obytes64arr[k], - PacketsSent: opackets64arr[k], - Errout: oerrorsarr[k], - Dropout: odrops64arr[k], - } - ret = append(ret, nic) - } - - if !pernic { - return getIOCountersAll(ret), nil - } - - return ret, nil -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsWithContext(_ context.Context, _ string) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} - -func ConnectionsMaxWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, false) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, true) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int, _ bool) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go b/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go deleted file mode 100644 index ae7e9d81a5..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_unix.go +++ /dev/null @@ -1,188 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd || darwin - -package net - -import ( - "context" - "fmt" - "net" - "strconv" - "strings" - "syscall" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsPidWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithContext(_ context.Context, _ string, _ int) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} - -func ConnectionsPidWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - var ret []ConnectionStat - - args := []string{"-i"} - switch strings.ToLower(kind) { - default: - fallthrough - case "": - fallthrough - case "all": - fallthrough - case "inet": - args = append(args, "tcp", "-i", "udp") - case "inet4": - args = append(args, "4") - case "inet6": - args = append(args, "6") - case "tcp": - args = append(args, "tcp") - case "tcp4": - args = append(args, "4tcp") - case "tcp6": - args = append(args, "6tcp") - case "udp": - args = append(args, "udp") - case "udp4": - args = append(args, "4udp") - case "udp6": - args = append(args, "6udp") - case "unix": - args = []string{"-U"} - } - - r, err := common.CallLsofWithContext(ctx, invoke, pid, args...) - if err != nil { - return nil, err - } - for _, rr := range r { - if strings.HasPrefix(rr, "COMMAND") { - continue - } - n, err := parseNetLine(rr) - if err != nil { - continue - } - - ret = append(ret, n) - } - - return ret, nil -} - -var constMap = map[string]int{ - "unix": syscall.AF_UNIX, - "TCP": syscall.SOCK_STREAM, - "UDP": syscall.SOCK_DGRAM, - "IPv4": syscall.AF_INET, - "IPv6": syscall.AF_INET6, -} - -func parseNetLine(line string) (ConnectionStat, error) { - f := strings.Fields(line) - if len(f) < 8 { - return ConnectionStat{}, fmt.Errorf("wrong line,%s", line) - } - - if len(f) == 8 { - f = append(f, f[7]) - f[7] = "unix" - } - - pid, err := strconv.ParseInt(f[1], 10, 32) - if err != nil { - return ConnectionStat{}, err - } - fd, err := strconv.ParseInt(strings.Trim(f[3], "u"), 10, 32) - if err != nil { - return ConnectionStat{}, fmt.Errorf("unknown fd, %s", f[3]) - } - netFamily, ok := constMap[f[4]] - if !ok { - return ConnectionStat{}, fmt.Errorf("unknown family, %s", f[4]) - } - netType, ok := constMap[f[7]] - if !ok { - return ConnectionStat{}, fmt.Errorf("unknown type, %s", f[7]) - } - - var laddr, raddr Addr - if f[7] == "unix" { - laddr.IP = f[8] - } else { - laddr, raddr, err = parseNetAddr(f[8]) - if err != nil { - return ConnectionStat{}, fmt.Errorf("failed to parse netaddr, %s", f[8]) - } - } - - n := ConnectionStat{ - Fd: uint32(fd), - Family: uint32(netFamily), - Type: uint32(netType), - Laddr: laddr, - Raddr: raddr, - Pid: int32(pid), - } - if len(f) == 10 { - n.Status = strings.Trim(f[9], "()") - } - - return n, nil -} - -func parseNetAddr(line string) (laddr Addr, raddr Addr, err error) { - parse := func(l string) (Addr, error) { - host, port, err := net.SplitHostPort(l) - if err != nil { - return Addr{}, fmt.Errorf("wrong addr, %s", l) - } - lport, err := strconv.ParseInt(port, 10, 32) - if err != nil { - return Addr{}, err - } - return Addr{IP: host, Port: uint32(lport)}, nil - } - - addrs := strings.Split(line, "->") - if len(addrs) == 0 { - return laddr, raddr, fmt.Errorf("wrong netaddr, %s", line) - } - laddr, err = parse(addrs[0]) - if len(addrs) == 2 { // remote addr exists - raddr, err = parse(addrs[1]) - if err != nil { - return laddr, raddr, err - } - } - - return laddr, raddr, err -} - -func ConnectionsPidMaxWithContext(_ context.Context, _ string, _ int32, _ int) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/net/net_windows.go b/vendor/github.com/shirou/gopsutil/v4/net/net_windows.go deleted file mode 100644 index 9622896999..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/net/net_windows.go +++ /dev/null @@ -1,731 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package net - -import ( - "context" - "errors" - "fmt" - "net" - "os" - "syscall" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -var ( - modiphlpapi = windows.NewLazySystemDLL("iphlpapi.dll") - procGetExtendedTCPTable = modiphlpapi.NewProc("GetExtendedTcpTable") - procGetExtendedUDPTable = modiphlpapi.NewProc("GetExtendedUdpTable") - procGetIfEntry2 = modiphlpapi.NewProc("GetIfEntry2") -) - -const ( - TCPTableBasicListener = iota - TCPTableBasicConnections - TCPTableBasicAll - TCPTableOwnerPIDListener - TCPTableOwnerPIDConnections - TCPTableOwnerPIDAll - TCPTableOwnerModuleListener - TCPTableOwnerModuleConnections - TCPTableOwnerModuleAll -) - -type netConnectionKindType struct { - family uint32 - sockType uint32 - filename string -} - -var kindTCP4 = netConnectionKindType{ - family: syscall.AF_INET, - sockType: syscall.SOCK_STREAM, - filename: "tcp", -} - -var kindTCP6 = netConnectionKindType{ - family: syscall.AF_INET6, - sockType: syscall.SOCK_STREAM, - filename: "tcp6", -} - -var kindUDP4 = netConnectionKindType{ - family: syscall.AF_INET, - sockType: syscall.SOCK_DGRAM, - filename: "udp", -} - -var kindUDP6 = netConnectionKindType{ - family: syscall.AF_INET6, - sockType: syscall.SOCK_DGRAM, - filename: "udp6", -} - -var netConnectionKindMap = map[string][]netConnectionKindType{ - "all": {kindTCP4, kindTCP6, kindUDP4, kindUDP6}, - "tcp": {kindTCP4, kindTCP6}, - "tcp4": {kindTCP4}, - "tcp6": {kindTCP6}, - "udp": {kindUDP4, kindUDP6}, - "udp4": {kindUDP4}, - "udp6": {kindUDP6}, - "inet": {kindTCP4, kindTCP6, kindUDP4, kindUDP6}, - "inet4": {kindTCP4, kindUDP4}, - "inet6": {kindTCP6, kindUDP6}, -} - -// https://github.com/microsoft/ethr/blob/aecdaf923970e5a9b4c461b4e2e3963d781ad2cc/plt_windows.go#L114-L170 -type guid struct { - Data1 uint32 - Data2 uint16 - Data3 uint16 - Data4 [8]byte -} - -const ( - maxStringSize = 256 - maxPhysAddressLength = 32 - pad0for64_4for32 = 0 -) - -type mibIfRow2 struct { - InterfaceLuid uint64 - InterfaceIndex uint32 - InterfaceGuid guid //nolint:revive //FIXME - Alias [maxStringSize + 1]uint16 - Description [maxStringSize + 1]uint16 - PhysicalAddressLength uint32 - PhysicalAddress [maxPhysAddressLength]uint8 - PermanentPhysicalAddress [maxPhysAddressLength]uint8 - Mtu uint32 - Type uint32 - TunnelType uint32 - MediaType uint32 - PhysicalMediumType uint32 - AccessType uint32 - DirectionType uint32 - InterfaceAndOperStatusFlags uint32 - OperStatus uint32 - AdminStatus uint32 - MediaConnectState uint32 - NetworkGuid guid //nolint:revive //FIXME - ConnectionType uint32 - padding1 [pad0for64_4for32]byte - TransmitLinkSpeed uint64 - ReceiveLinkSpeed uint64 - InOctets uint64 - InUcastPkts uint64 - InNUcastPkts uint64 - InDiscards uint64 - InErrors uint64 - InUnknownProtos uint64 - InUcastOctets uint64 - InMulticastOctets uint64 - InBroadcastOctets uint64 - OutOctets uint64 - OutUcastPkts uint64 - OutNUcastPkts uint64 - OutDiscards uint64 - OutErrors uint64 - OutUcastOctets uint64 - OutMulticastOctets uint64 - OutBroadcastOctets uint64 - OutQLen uint64 -} - -func IOCountersWithContext(_ context.Context, pernic bool) ([]IOCountersStat, error) { - ifs, err := net.Interfaces() - if err != nil { - return nil, err - } - var counters []IOCountersStat - - err = procGetIfEntry2.Find() - if err == nil { // Vista+, uint64 values (issue#693) - for _, ifi := range ifs { - c := IOCountersStat{ - Name: ifi.Name, - } - - row := mibIfRow2{InterfaceIndex: uint32(ifi.Index)} - ret, _, err := procGetIfEntry2.Call(uintptr(unsafe.Pointer(&row))) - if ret != 0 { - return nil, os.NewSyscallError("GetIfEntry2", err) - } - c.BytesSent = uint64(row.OutOctets) - c.BytesRecv = uint64(row.InOctets) - c.PacketsSent = uint64(row.OutUcastPkts) - c.PacketsRecv = uint64(row.InUcastPkts) - c.Errin = uint64(row.InErrors) - c.Errout = uint64(row.OutErrors) - c.Dropin = uint64(row.InDiscards) - c.Dropout = uint64(row.OutDiscards) - - counters = append(counters, c) - } - } else { // WinXP fallback, uint32 values - for _, ifi := range ifs { - c := IOCountersStat{ - Name: ifi.Name, - } - - row := windows.MibIfRow{Index: uint32(ifi.Index)} - err = windows.GetIfEntry(&row) - if err != nil { - return nil, os.NewSyscallError("GetIfEntry", err) - } - c.BytesSent = uint64(row.OutOctets) - c.BytesRecv = uint64(row.InOctets) - c.PacketsSent = uint64(row.OutUcastPkts) - c.PacketsRecv = uint64(row.InUcastPkts) - c.Errin = uint64(row.InErrors) - c.Errout = uint64(row.OutErrors) - c.Dropin = uint64(row.InDiscards) - c.Dropout = uint64(row.OutDiscards) - - counters = append(counters, c) - } - } - - if !pernic { - return getIOCountersAll(counters), nil - } - return counters, nil -} - -func IOCountersByFileWithContext(ctx context.Context, pernic bool, _ string) ([]IOCountersStat, error) { - return IOCountersWithContext(ctx, pernic) -} - -func ConnectionsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsPidWithContext(ctx, kind, 0) -} - -func ConnectionsPidWithContext(_ context.Context, kind string, pid int32) ([]ConnectionStat, error) { - tmap, ok := netConnectionKindMap[kind] - if !ok { - return nil, fmt.Errorf("invalid kind, %s", kind) - } - return getProcInet(tmap, pid) -} - -func getProcInet(kinds []netConnectionKindType, pid int32) ([]ConnectionStat, error) { - stats := make([]ConnectionStat, 0) - - for _, kind := range kinds { - s, err := getNetStatWithKind(kind) - if err != nil { - continue - } - - if pid == 0 { - stats = append(stats, s...) - } else { - for _, ns := range s { - if ns.Pid != pid { - continue - } - stats = append(stats, ns) - } - } - } - - return stats, nil -} - -func getNetStatWithKind(kindType netConnectionKindType) ([]ConnectionStat, error) { - if kindType.filename == "" { - return nil, errors.New("kind filename must be required") - } - - switch kindType.filename { - case kindTCP4.filename: - return getTCPConnections(kindTCP4.family) - case kindTCP6.filename: - return getTCPConnections(kindTCP6.family) - case kindUDP4.filename: - return getUDPConnections(kindUDP4.family) - case kindUDP6.filename: - return getUDPConnections(kindUDP6.family) - } - - return nil, fmt.Errorf("invalid kind filename, %s", kindType.filename) -} - -// Deprecated: use process.PidsWithContext instead -func PidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func ConnectionsMaxWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsWithoutUidsWithContext(ctx context.Context, kind string) ([]ConnectionStat, error) { - return ConnectionsMaxWithoutUidsWithContext(ctx, kind, 0) -} - -func ConnectionsMaxWithoutUidsWithContext(ctx context.Context, kind string, maxConn int) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, 0, maxConn) -} - -func ConnectionsPidWithoutUidsWithContext(ctx context.Context, kind string, pid int32) ([]ConnectionStat, error) { - return ConnectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, 0) -} - -func ConnectionsPidMaxWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, false) -} - -func ConnectionsPidMaxWithoutUidsWithContext(ctx context.Context, kind string, pid int32, maxConn int) ([]ConnectionStat, error) { - return connectionsPidMaxWithoutUidsWithContext(ctx, kind, pid, maxConn, true) -} - -func connectionsPidMaxWithoutUidsWithContext(_ context.Context, _ string, _ int32, _ int, _ bool) ([]ConnectionStat, error) { - return []ConnectionStat{}, common.ErrNotImplementedError -} - -func FilterCountersWithContext(_ context.Context) ([]FilterStat, error) { - return nil, common.ErrNotImplementedError -} - -func ConntrackStatsWithContext(_ context.Context, _ bool) ([]ConntrackStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProtoCountersWithContext(_ context.Context, _ []string) ([]ProtoCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func getTableUintptr(family uint32, buf []byte) uintptr { - var ( - pmibTCPTable pmibTCPTableOwnerPidAll - pmibTCP6Table pmibTCP6TableOwnerPidAll - - p uintptr - ) - switch family { - case kindTCP4.family: - if len(buf) > 0 { - pmibTCPTable = (*mibTCPTableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibTCPTable)) - } else { - p = uintptr(unsafe.Pointer(pmibTCPTable)) - } - case kindTCP6.family: - if len(buf) > 0 { - pmibTCP6Table = (*mibTCP6TableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibTCP6Table)) - } else { - p = uintptr(unsafe.Pointer(pmibTCP6Table)) - } - } - return p -} - -func getTableInfo(filename string, table any) (index, step, length int) { - switch filename { - case kindTCP4.filename: - index = int(unsafe.Sizeof(table.(pmibTCPTableOwnerPidAll).DwNumEntries)) - step = int(unsafe.Sizeof(table.(pmibTCPTableOwnerPidAll).Table)) - length = int(table.(pmibTCPTableOwnerPidAll).DwNumEntries) - case kindTCP6.filename: - index = int(unsafe.Sizeof(table.(pmibTCP6TableOwnerPidAll).DwNumEntries)) - step = int(unsafe.Sizeof(table.(pmibTCP6TableOwnerPidAll).Table)) - length = int(table.(pmibTCP6TableOwnerPidAll).DwNumEntries) - case kindUDP4.filename: - index = int(unsafe.Sizeof(table.(pmibUDPTableOwnerPid).DwNumEntries)) - step = int(unsafe.Sizeof(table.(pmibUDPTableOwnerPid).Table)) - length = int(table.(pmibUDPTableOwnerPid).DwNumEntries) - case kindUDP6.filename: - index = int(unsafe.Sizeof(table.(pmibUDP6TableOwnerPid).DwNumEntries)) - step = int(unsafe.Sizeof(table.(pmibUDP6TableOwnerPid).Table)) - length = int(table.(pmibUDP6TableOwnerPid).DwNumEntries) - } - - return -} - -func getTCPConnections(family uint32) ([]ConnectionStat, error) { - var ( - p uintptr - buf []byte - size uint32 - - pmibTCPTable pmibTCPTableOwnerPidAll - pmibTCP6Table pmibTCP6TableOwnerPidAll - ) - - if family == 0 { - return nil, errors.New("faimly must be required") - } - - for { - switch family { - case kindTCP4.family: - if len(buf) > 0 { - pmibTCPTable = (*mibTCPTableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibTCPTable)) - } else { - p = uintptr(unsafe.Pointer(pmibTCPTable)) - } - case kindTCP6.family: - if len(buf) > 0 { - pmibTCP6Table = (*mibTCP6TableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibTCP6Table)) - } else { - p = uintptr(unsafe.Pointer(pmibTCP6Table)) - } - } - - err := getExtendedTCPTable(p, - &size, - true, - family, - tcpTableOwnerPidAll, - 0) - if err == nil { - break - } - if !errors.Is(err, windows.ERROR_INSUFFICIENT_BUFFER) { - return nil, err - } - buf = make([]byte, size) - } - - var ( - index, step int - length int - ) - - stats := make([]ConnectionStat, 0) - switch family { - case kindTCP4.family: - index, step, length = getTableInfo(kindTCP4.filename, pmibTCPTable) - case kindTCP6.family: - index, step, length = getTableInfo(kindTCP6.filename, pmibTCP6Table) - } - - if length == 0 { - return nil, nil - } - - for i := 0; i < length; i++ { - switch family { - case kindTCP4.family: - mibs := (*mibTCPRowOwnerPid)(unsafe.Pointer(&buf[index])) - ns := mibs.convertToConnectionStat() - stats = append(stats, ns) - case kindTCP6.family: - mibs := (*mibTCP6RowOwnerPid)(unsafe.Pointer(&buf[index])) - ns := mibs.convertToConnectionStat() - stats = append(stats, ns) - } - - index += step - } - return stats, nil -} - -func getUDPConnections(family uint32) ([]ConnectionStat, error) { - var ( - p uintptr - buf []byte - size uint32 - - pmibUDPTable pmibUDPTableOwnerPid - pmibUDP6Table pmibUDP6TableOwnerPid - ) - - if family == 0 { - return nil, errors.New("faimly must be required") - } - - for { - switch family { - case kindUDP4.family: - if len(buf) > 0 { - pmibUDPTable = (*mibUDPTableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibUDPTable)) - } else { - p = uintptr(unsafe.Pointer(pmibUDPTable)) - } - case kindUDP6.family: - if len(buf) > 0 { - pmibUDP6Table = (*mibUDP6TableOwnerPid)(unsafe.Pointer(&buf[0])) - p = uintptr(unsafe.Pointer(pmibUDP6Table)) - } else { - p = uintptr(unsafe.Pointer(pmibUDP6Table)) - } - } - - err := getExtendedUDPTable( - p, - &size, - true, - family, - udpTableOwnerPid, - 0, - ) - if err == nil { - break - } - if !errors.Is(err, windows.ERROR_INSUFFICIENT_BUFFER) { - return nil, err - } - buf = make([]byte, size) - } - - var index, step, length int - - stats := make([]ConnectionStat, 0) - switch family { - case kindUDP4.family: - index, step, length = getTableInfo(kindUDP4.filename, pmibUDPTable) - case kindUDP6.family: - index, step, length = getTableInfo(kindUDP6.filename, pmibUDP6Table) - } - - if length == 0 { - return nil, nil - } - - for i := 0; i < length; i++ { - switch family { - case kindUDP4.family: - mibs := (*mibUDPRowOwnerPid)(unsafe.Pointer(&buf[index])) - ns := mibs.convertToConnectionStat() - stats = append(stats, ns) - case kindUDP6.family: - mibs := (*mibUDP6RowOwnerPid)(unsafe.Pointer(&buf[index])) - ns := mibs.convertToConnectionStat() - stats = append(stats, ns) - } - - index += step - } - return stats, nil -} - -// tcpStatuses https://msdn.microsoft.com/en-us/library/windows/desktop/bb485761(v=vs.85).aspx -var tcpStatuses = map[mibTCPState]string{ - 1: "CLOSED", - 2: "LISTEN", - 3: "SYN_SENT", - 4: "SYN_RECEIVED", - 5: "ESTABLISHED", - 6: "FIN_WAIT_1", - 7: "FIN_WAIT_2", - 8: "CLOSE_WAIT", - 9: "CLOSING", - 10: "LAST_ACK", - 11: "TIME_WAIT", - 12: "DELETE", -} - -func getExtendedTCPTable(pTCPTable uintptr, pdwSize *uint32, bOrder bool, ulAf uint32, tableClass tcpTableClass, reserved uint32) (errcode error) { - r1, _, _ := syscall.Syscall6(procGetExtendedTCPTable.Addr(), 6, pTCPTable, uintptr(unsafe.Pointer(pdwSize)), getUintptrFromBool(bOrder), uintptr(ulAf), uintptr(tableClass), uintptr(reserved)) - if r1 != 0 { - errcode = syscall.Errno(r1) - } - return -} - -func getExtendedUDPTable(pUDPTable uintptr, pdwSize *uint32, bOrder bool, ulAf uint32, tableClass udpTableClass, reserved uint32) (errcode error) { - r1, _, _ := syscall.Syscall6(procGetExtendedUDPTable.Addr(), 6, pUDPTable, uintptr(unsafe.Pointer(pdwSize)), getUintptrFromBool(bOrder), uintptr(ulAf), uintptr(tableClass), uintptr(reserved)) - if r1 != 0 { - errcode = syscall.Errno(r1) - } - return -} - -func getUintptrFromBool(b bool) uintptr { - if b { - return 1 - } - return 0 -} - -const anySize = 1 - -// type MIB_TCP_STATE int32 -type mibTCPState int32 - -type tcpTableClass int32 - -const ( - tcpTableBasicListener tcpTableClass = iota - tcpTableBasicConnections - tcpTableBasicAll - tcpTableOwnerPidListener - tcpTableOwnerPidConnections - tcpTableOwnerPidAll - tcpTableOwnerModuleListener - tcpTableOwnerModuleConnections - tcpTableOwnerModuleAll -) - -type udpTableClass int32 - -const ( - udpTableBasic udpTableClass = iota - udpTableOwnerPid - udpTableOwnerModule -) - -// TCP - -type mibTCPRowOwnerPid struct { - DwState uint32 - DwLocalAddr uint32 - DwLocalPort uint32 - DwRemoteAddr uint32 - DwRemotePort uint32 - DwOwningPid uint32 -} - -func (m *mibTCPRowOwnerPid) convertToConnectionStat() ConnectionStat { - ns := ConnectionStat{ - Family: kindTCP4.family, - Type: kindTCP4.sockType, - Laddr: Addr{ - IP: parseIPv4HexString(m.DwLocalAddr), - Port: uint32(decodePort(m.DwLocalPort)), - }, - Raddr: Addr{ - IP: parseIPv4HexString(m.DwRemoteAddr), - Port: uint32(decodePort(m.DwRemotePort)), - }, - Pid: int32(m.DwOwningPid), - Status: tcpStatuses[mibTCPState(m.DwState)], - } - - return ns -} - -type mibTCPTableOwnerPid struct { - DwNumEntries uint32 - Table [anySize]mibTCPRowOwnerPid -} - -type mibTCP6RowOwnerPid struct { - UcLocalAddr [16]byte - DwLocalScopeId uint32 - DwLocalPort uint32 - UcRemoteAddr [16]byte - DwRemoteScopeId uint32 - DwRemotePort uint32 - DwState uint32 - DwOwningPid uint32 -} - -func (m *mibTCP6RowOwnerPid) convertToConnectionStat() ConnectionStat { - ns := ConnectionStat{ - Family: kindTCP6.family, - Type: kindTCP6.sockType, - Laddr: Addr{ - IP: parseIPv6HexString(m.UcLocalAddr), - Port: uint32(decodePort(m.DwLocalPort)), - }, - Raddr: Addr{ - IP: parseIPv6HexString(m.UcRemoteAddr), - Port: uint32(decodePort(m.DwRemotePort)), - }, - Pid: int32(m.DwOwningPid), - Status: tcpStatuses[mibTCPState(m.DwState)], - } - - return ns -} - -type mibTCP6TableOwnerPid struct { - DwNumEntries uint32 - Table [anySize]mibTCP6RowOwnerPid -} - -type ( - pmibTCPTableOwnerPidAll *mibTCPTableOwnerPid - pmibTCP6TableOwnerPidAll *mibTCP6TableOwnerPid -) - -// UDP - -type mibUDPRowOwnerPid struct { - DwLocalAddr uint32 - DwLocalPort uint32 - DwOwningPid uint32 -} - -func (m *mibUDPRowOwnerPid) convertToConnectionStat() ConnectionStat { - ns := ConnectionStat{ - Family: kindUDP4.family, - Type: kindUDP4.sockType, - Laddr: Addr{ - IP: parseIPv4HexString(m.DwLocalAddr), - Port: uint32(decodePort(m.DwLocalPort)), - }, - Pid: int32(m.DwOwningPid), - } - - return ns -} - -type mibUDPTableOwnerPid struct { - DwNumEntries uint32 - Table [anySize]mibUDPRowOwnerPid -} - -type mibUDP6RowOwnerPid struct { - UcLocalAddr [16]byte - DwLocalScopeId uint32 - DwLocalPort uint32 - DwOwningPid uint32 -} - -func (m *mibUDP6RowOwnerPid) convertToConnectionStat() ConnectionStat { - ns := ConnectionStat{ - Family: kindUDP6.family, - Type: kindUDP6.sockType, - Laddr: Addr{ - IP: parseIPv6HexString(m.UcLocalAddr), - Port: uint32(decodePort(m.DwLocalPort)), - }, - Pid: int32(m.DwOwningPid), - } - - return ns -} - -type mibUDP6TableOwnerPid struct { - DwNumEntries uint32 - Table [anySize]mibUDP6RowOwnerPid -} - -type ( - pmibUDPTableOwnerPid *mibUDPTableOwnerPid - pmibUDP6TableOwnerPid *mibUDP6TableOwnerPid -) - -func decodePort(port uint32) uint16 { - return syscall.Ntohs(uint16(port)) -} - -func parseIPv4HexString(addr uint32) string { - return fmt.Sprintf("%d.%d.%d.%d", addr&255, addr>>8&255, addr>>16&255, addr>>24&255) -} - -func parseIPv6HexString(addr [16]byte) string { - var ret [16]byte - for i := 0; i < 16; i++ { - ret[i] = uint8(addr[i]) - } - - // convert []byte to net.IP - ip := net.IP(ret[:]) - return ip.String() -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process.go b/vendor/github.com/shirou/gopsutil/v4/process/process.go deleted file mode 100644 index 0bd4d9e1a1..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process.go +++ /dev/null @@ -1,643 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package process - -import ( - "context" - "encoding/json" - "errors" - "runtime" - "sort" - "sync" - "time" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/mem" - "github.com/shirou/gopsutil/v4/net" -) - -var ( - invoke common.Invoker = common.Invoke{} - ErrorNoChildren = errors.New("process does not have children") // Deprecated: ErrorNoChildren is never returned by process.Children(), check its returned []*Process slice length instead - ErrorProcessNotRunning = errors.New("process does not exist") - ErrorNotPermitted = errors.New("operation not permitted") -) - -type Process struct { - Pid int32 `json:"pid"` - name string - status string - parent int32 - parentMutex sync.RWMutex // for windows ppid cache - numCtxSwitches *NumCtxSwitchesStat - uids []uint32 - gids []uint32 - groups []uint32 - numThreads int32 - memInfo *MemoryInfoStat - sigInfo *SignalInfoStat - createTime int64 - - lastCPUTimes *cpu.TimesStat - lastCPUTime time.Time - - tgid int32 -} - -// Process status -const ( - // Running marks a task a running or runnable (on the run queue) - Running = "running" - // Blocked marks a task waiting on a short, uninterruptible operation (usually I/O) - Blocked = "blocked" - // Idle marks a task sleeping for more than about 20 seconds - Idle = "idle" - // Lock marks a task waiting to acquire a lock - Lock = "lock" - // Sleep marks task waiting for short, interruptible operation - Sleep = "sleep" - // Stop marks a stopped process - Stop = "stop" - // Wait marks an idle interrupt thread (or paging in pre 2.6.xx Linux) - Wait = "wait" - // Zombie marks a defunct process, terminated but not reaped by its parent - Zombie = "zombie" - - // Solaris states. See https://github.com/collectd/collectd/blob/1da3305c10c8ff9a63081284cf3d4bb0f6daffd8/src/processes.c#L2115 - Daemon = "daemon" - Detached = "detached" - System = "system" - Orphan = "orphan" - - UnknownState = "" -) - -type OpenFilesStat struct { - Path string `json:"path"` - Fd uint64 `json:"fd"` -} - -type MemoryInfoStat struct { - RSS uint64 `json:"rss"` // bytes - VMS uint64 `json:"vms"` // bytes - HWM uint64 `json:"hwm"` // bytes - Data uint64 `json:"data"` // bytes - Stack uint64 `json:"stack"` // bytes - Locked uint64 `json:"locked"` // bytes - Swap uint64 `json:"swap"` // bytes -} - -type SignalInfoStat struct { - PendingProcess uint64 `json:"pending_process"` - PendingThread uint64 `json:"pending_thread"` - Blocked uint64 `json:"blocked"` - Ignored uint64 `json:"ignored"` - Caught uint64 `json:"caught"` -} - -type RlimitStat struct { - Resource int32 `json:"resource"` - Soft uint64 `json:"soft"` - Hard uint64 `json:"hard"` - Used uint64 `json:"used"` -} - -type IOCountersStat struct { - // ReadCount is a number of read I/O operations such as syscalls. - ReadCount uint64 `json:"readCount"` - // WriteCount is a number of read I/O operations such as syscalls. - WriteCount uint64 `json:"writeCount"` - // ReadBytes is a number of all I/O read in bytes. This includes disk I/O on Linux and Windows. - ReadBytes uint64 `json:"readBytes"` - // WriteBytes is a number of all I/O write in bytes. This includes disk I/O on Linux and Windows. - WriteBytes uint64 `json:"writeBytes"` - // DiskReadBytes is a number of disk I/O write in bytes. Currently only Linux has this value. - DiskReadBytes uint64 `json:"diskReadBytes"` - // DiskWriteBytes is a number of disk I/O read in bytes. Currently only Linux has this value. - DiskWriteBytes uint64 `json:"diskWriteBytes"` -} - -type NumCtxSwitchesStat struct { - Voluntary int64 `json:"voluntary"` - Involuntary int64 `json:"involuntary"` -} - -type PageFaultsStat struct { - MinorFaults uint64 `json:"minorFaults"` - MajorFaults uint64 `json:"majorFaults"` - ChildMinorFaults uint64 `json:"childMinorFaults"` - ChildMajorFaults uint64 `json:"childMajorFaults"` -} - -// Resource limit constants are from /usr/include/x86_64-linux-gnu/bits/resource.h -// from libc6-dev package in Ubuntu 16.10 -const ( - RLIMIT_CPU int32 = 0 - RLIMIT_FSIZE int32 = 1 - RLIMIT_DATA int32 = 2 - RLIMIT_STACK int32 = 3 - RLIMIT_CORE int32 = 4 - RLIMIT_RSS int32 = 5 - RLIMIT_NPROC int32 = 6 - RLIMIT_NOFILE int32 = 7 - RLIMIT_MEMLOCK int32 = 8 - RLIMIT_AS int32 = 9 - RLIMIT_LOCKS int32 = 10 - RLIMIT_SIGPENDING int32 = 11 - RLIMIT_MSGQUEUE int32 = 12 - RLIMIT_NICE int32 = 13 - RLIMIT_RTPRIO int32 = 14 - RLIMIT_RTTIME int32 = 15 -) - -func (p Process) String() string { - s, _ := json.Marshal(p) - return string(s) -} - -func (o OpenFilesStat) String() string { - s, _ := json.Marshal(o) - return string(s) -} - -func (m MemoryInfoStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -func (r RlimitStat) String() string { - s, _ := json.Marshal(r) - return string(s) -} - -func (i IOCountersStat) String() string { - s, _ := json.Marshal(i) - return string(s) -} - -func (p NumCtxSwitchesStat) String() string { - s, _ := json.Marshal(p) - return string(s) -} - -var enableBootTimeCache bool - -// EnableBootTimeCache change cache behavior of BootTime. If true, cache BootTime value. Default is false. -func EnableBootTimeCache(enable bool) { - enableBootTimeCache = enable -} - -// Pids returns a slice of process ID list which are running now. -func Pids() ([]int32, error) { - return PidsWithContext(context.Background()) -} - -func PidsWithContext(ctx context.Context) ([]int32, error) { - pids, err := pidsWithContext(ctx) - sort.Slice(pids, func(i, j int) bool { return pids[i] < pids[j] }) - return pids, err -} - -// Processes returns a slice of pointers to Process structs for all -// currently running processes. -func Processes() ([]*Process, error) { - return ProcessesWithContext(context.Background()) -} - -// NewProcess creates a new Process instance, it only stores the pid and -// checks that the process exists. Other method on Process can be used -// to get more information about the process. An error will be returned -// if the process does not exist. -func NewProcess(pid int32) (*Process, error) { - return NewProcessWithContext(context.Background(), pid) -} - -func NewProcessWithContext(ctx context.Context, pid int32) (*Process, error) { - p := &Process{ - Pid: pid, - } - - exists, err := PidExistsWithContext(ctx, pid) - if err != nil { - return p, err - } - if !exists { - return p, ErrorProcessNotRunning - } - p.CreateTimeWithContext(ctx) - return p, nil -} - -func PidExists(pid int32) (bool, error) { - return PidExistsWithContext(context.Background(), pid) -} - -// Background returns true if the process is in background, false otherwise. -func (p *Process) Background() (bool, error) { - return p.BackgroundWithContext(context.Background()) -} - -func (p *Process) BackgroundWithContext(ctx context.Context) (bool, error) { - fg, err := p.ForegroundWithContext(ctx) - if err != nil { - return false, err - } - return !fg, err -} - -// If interval is 0, return difference from last call(non-blocking). -// If interval > 0, wait interval sec and return difference between start and end. -func (p *Process) Percent(interval time.Duration) (float64, error) { - return p.PercentWithContext(context.Background(), interval) -} - -func (p *Process) PercentWithContext(ctx context.Context, interval time.Duration) (float64, error) { - cpuTimes, err := p.TimesWithContext(ctx) - if err != nil { - return 0, err - } - now := time.Now() - - if interval > 0 { - p.lastCPUTimes = cpuTimes - p.lastCPUTime = now - if err := common.Sleep(ctx, interval); err != nil { - return 0, err - } - cpuTimes, err = p.TimesWithContext(ctx) - now = time.Now() - if err != nil { - return 0, err - } - } else if p.lastCPUTimes == nil { - // invoked first time - p.lastCPUTimes = cpuTimes - p.lastCPUTime = now - return 0, nil - } - - numcpu := runtime.NumCPU() - delta := (now.Sub(p.lastCPUTime).Seconds()) * float64(numcpu) - ret := calculatePercent(p.lastCPUTimes, cpuTimes, delta, numcpu) - p.lastCPUTimes = cpuTimes - p.lastCPUTime = now - return ret, nil -} - -// IsRunning returns whether the process is still running or not. -func (p *Process) IsRunning() (bool, error) { - return p.IsRunningWithContext(context.Background()) -} - -func (p *Process) IsRunningWithContext(ctx context.Context) (bool, error) { - createTime, err := p.CreateTimeWithContext(ctx) - if err != nil { - return false, err - } - p2, err := NewProcessWithContext(ctx, p.Pid) - if errors.Is(err, ErrorProcessNotRunning) { - return false, nil - } - createTime2, err := p2.CreateTimeWithContext(ctx) - if err != nil { - return false, err - } - return createTime == createTime2, nil -} - -// CreateTime returns created time of the process in milliseconds since the epoch, in UTC. -func (p *Process) CreateTime() (int64, error) { - return p.CreateTimeWithContext(context.Background()) -} - -func (p *Process) CreateTimeWithContext(ctx context.Context) (int64, error) { - if p.createTime != 0 { - return p.createTime, nil - } - createTime, err := p.createTimeWithContext(ctx) - p.createTime = createTime - return p.createTime, err -} - -func calculatePercent(t1, t2 *cpu.TimesStat, delta float64, numcpu int) float64 { - if delta == 0 { - return 0 - } - // https://github.com/giampaolo/psutil/blob/c034e6692cf736b5e87d14418a8153bb03f6cf42/psutil/__init__.py#L1064 - deltaProc := (t2.User - t1.User) + (t2.System - t1.System) - if deltaProc <= 0 { - return 0 - } - overallPercent := ((deltaProc / delta) * 100) * float64(numcpu) - return overallPercent -} - -// MemoryPercent returns how many percent of the total RAM this process uses -func (p *Process) MemoryPercent() (float32, error) { - return p.MemoryPercentWithContext(context.Background()) -} - -func (p *Process) MemoryPercentWithContext(ctx context.Context) (float32, error) { - machineMemory, err := mem.VirtualMemoryWithContext(ctx) - if err != nil { - return 0, err - } - total := machineMemory.Total - - processMemory, err := p.MemoryInfoWithContext(ctx) - if err != nil { - return 0, err - } - used := processMemory.RSS - - return (100 * float32(used) / float32(total)), nil -} - -// CPUPercent returns how many percent of the CPU time this process uses -func (p *Process) CPUPercent() (float64, error) { - return p.CPUPercentWithContext(context.Background()) -} - -func (p *Process) CPUPercentWithContext(ctx context.Context) (float64, error) { - createTime, err := p.createTimeWithContext(ctx) - if err != nil { - return 0, err - } - - cput, err := p.TimesWithContext(ctx) - if err != nil { - return 0, err - } - - created := time.Unix(0, createTime*int64(time.Millisecond)) - totalTime := time.Since(created).Seconds() - if totalTime <= 0 { - return 0, nil - } - - return 100 * cput.Total() / totalTime, nil -} - -// Groups returns all group IDs(include supplementary groups) of the process as a slice of the int -func (p *Process) Groups() ([]uint32, error) { - return p.GroupsWithContext(context.Background()) -} - -// Ppid returns Parent Process ID of the process. -func (p *Process) Ppid() (int32, error) { - return p.PpidWithContext(context.Background()) -} - -// Name returns name of the process. -func (p *Process) Name() (string, error) { - return p.NameWithContext(context.Background()) -} - -// Exe returns executable path of the process. -func (p *Process) Exe() (string, error) { - return p.ExeWithContext(context.Background()) -} - -// Cmdline returns the command line arguments of the process as a string with -// each argument separated by 0x20 ascii character. -func (p *Process) Cmdline() (string, error) { - return p.CmdlineWithContext(context.Background()) -} - -// CmdlineSlice returns the command line arguments of the process as a slice with each -// element being an argument. -// -// On Windows, this assumes the command line is encoded according to the convention accepted by -// [golang.org/x/sys/windows.CmdlineToArgv] (the most common convention). If this is not suitable, -// you should instead use [Process.Cmdline] and parse the command line according to your specific -// requirements. -func (p *Process) CmdlineSlice() ([]string, error) { - return p.CmdlineSliceWithContext(context.Background()) -} - -// Cwd returns current working directory of the process. -func (p *Process) Cwd() (string, error) { - return p.CwdWithContext(context.Background()) -} - -// Parent returns parent Process of the process. -func (p *Process) Parent() (*Process, error) { - return p.ParentWithContext(context.Background()) -} - -// ParentWithContext returns parent Process of the process. -func (p *Process) ParentWithContext(ctx context.Context) (*Process, error) { - ppid, err := p.PpidWithContext(ctx) - if err != nil { - return nil, err - } - return NewProcessWithContext(ctx, ppid) -} - -// Status returns the process status. -// Return value could be one of these. -// R: Running S: Sleep T: Stop I: Idle -// Z: Zombie W: Wait L: Lock -// The character is same within all supported platforms. -func (p *Process) Status() ([]string, error) { - return p.StatusWithContext(context.Background()) -} - -// Foreground returns true if the process is in foreground, false otherwise. -func (p *Process) Foreground() (bool, error) { - return p.ForegroundWithContext(context.Background()) -} - -// Uids returns user ids of the process as a slice of the int -func (p *Process) Uids() ([]uint32, error) { - return p.UidsWithContext(context.Background()) -} - -// Gids returns group ids of the process as a slice of the int -func (p *Process) Gids() ([]uint32, error) { - return p.GidsWithContext(context.Background()) -} - -// Terminal returns a terminal which is associated with the process. -func (p *Process) Terminal() (string, error) { - return p.TerminalWithContext(context.Background()) -} - -// Nice returns a nice value (priority). -func (p *Process) Nice() (int32, error) { - return p.NiceWithContext(context.Background()) -} - -// IOnice returns process I/O nice value (priority). -func (p *Process) IOnice() (int32, error) { - return p.IOniceWithContext(context.Background()) -} - -// Rlimit returns Resource Limits. -func (p *Process) Rlimit() ([]RlimitStat, error) { - return p.RlimitWithContext(context.Background()) -} - -// RlimitUsage returns Resource Limits. -// If gatherUsed is true, the currently used value will be gathered and added -// to the resulting RlimitStat. -func (p *Process) RlimitUsage(gatherUsed bool) ([]RlimitStat, error) { - return p.RlimitUsageWithContext(context.Background(), gatherUsed) -} - -// IOCounters returns IO Counters. -func (p *Process) IOCounters() (*IOCountersStat, error) { - return p.IOCountersWithContext(context.Background()) -} - -// NumCtxSwitches returns the number of the context switches of the process. -func (p *Process) NumCtxSwitches() (*NumCtxSwitchesStat, error) { - return p.NumCtxSwitchesWithContext(context.Background()) -} - -// NumFDs returns the number of File Descriptors used by the process. -func (p *Process) NumFDs() (int32, error) { - return p.NumFDsWithContext(context.Background()) -} - -// NumThreads returns the number of threads used by the process. -func (p *Process) NumThreads() (int32, error) { - return p.NumThreadsWithContext(context.Background()) -} - -func (p *Process) Threads() (map[int32]*cpu.TimesStat, error) { - return p.ThreadsWithContext(context.Background()) -} - -// Times returns CPU times of the process. -func (p *Process) Times() (*cpu.TimesStat, error) { - return p.TimesWithContext(context.Background()) -} - -// CPUAffinity returns CPU affinity of the process. -func (p *Process) CPUAffinity() ([]int32, error) { - return p.CPUAffinityWithContext(context.Background()) -} - -// MemoryInfo returns generic process memory information, -// such as RSS and VMS. -func (p *Process) MemoryInfo() (*MemoryInfoStat, error) { - return p.MemoryInfoWithContext(context.Background()) -} - -// MemoryInfoEx returns platform-specific process memory information. -func (p *Process) MemoryInfoEx() (*MemoryInfoExStat, error) { - return p.MemoryInfoExWithContext(context.Background()) -} - -// PageFaults returns the process's page fault counters. -func (p *Process) PageFaults() (*PageFaultsStat, error) { - return p.PageFaultsWithContext(context.Background()) -} - -// Children returns the children of the process represented as a slice -// of pointers to Process type. -func (p *Process) Children() ([]*Process, error) { - return p.ChildrenWithContext(context.Background()) -} - -// OpenFiles returns a slice of OpenFilesStat opend by the process. -// OpenFilesStat includes a file path and file descriptor. -func (p *Process) OpenFiles() ([]OpenFilesStat, error) { - return p.OpenFilesWithContext(context.Background()) -} - -// Connections returns a slice of net.ConnectionStat used by the process. -// This returns all kind of the connection. This means TCP, UDP or UNIX. -func (p *Process) Connections() ([]net.ConnectionStat, error) { - return p.ConnectionsWithContext(context.Background()) -} - -// ConnectionsMax returns a slice of net.ConnectionStat used by the process at most `max`. -func (p *Process) ConnectionsMax(maxConn int) ([]net.ConnectionStat, error) { - return p.ConnectionsMaxWithContext(context.Background(), maxConn) -} - -// MemoryMaps get memory maps from /proc/(pid)/smaps -func (p *Process) MemoryMaps(grouped bool) (*[]MemoryMapsStat, error) { - return p.MemoryMapsWithContext(context.Background(), grouped) -} - -// Tgid returns thread group id of the process. -func (p *Process) Tgid() (int32, error) { - return p.TgidWithContext(context.Background()) -} - -// SendSignal sends a unix.Signal to the process. -func (p *Process) SendSignal(sig Signal) error { - return p.SendSignalWithContext(context.Background(), sig) -} - -// Suspend sends SIGSTOP to the process. -func (p *Process) Suspend() error { - return p.SuspendWithContext(context.Background()) -} - -// Resume sends SIGCONT to the process. -func (p *Process) Resume() error { - return p.ResumeWithContext(context.Background()) -} - -// Terminate sends SIGTERM to the process. -func (p *Process) Terminate() error { - return p.TerminateWithContext(context.Background()) -} - -// Kill sends SIGKILL to the process. -func (p *Process) Kill() error { - return p.KillWithContext(context.Background()) -} - -// Username returns a username of the process. -func (p *Process) Username() (string, error) { - return p.UsernameWithContext(context.Background()) -} - -// Environ returns the environment variables of the process. -func (p *Process) Environ() ([]string, error) { - return p.EnvironWithContext(context.Background()) -} - -// convertStatusChar as reported by the ps command across different platforms. -func convertStatusChar(letter string) string { - // Sources - // Darwin: http://www.mywebuniversity.com/Man_Pages/Darwin/man_ps.html - // FreeBSD: https://www.freebsd.org/cgi/man.cgi?ps - // Linux https://man7.org/linux/man-pages/man1/ps.1.html - // OpenBSD: https://man.openbsd.org/ps.1#state - // Solaris: https://github.com/collectd/collectd/blob/1da3305c10c8ff9a63081284cf3d4bb0f6daffd8/src/processes.c#L2115 - switch letter { - case "A": - return Daemon - case "D", "U": - return Blocked - case "E": - return Detached - case "I": - return Idle - case "L": - return Lock - case "O": - return Orphan - case "R": - return Running - case "S": - return Sleep - case "T", "t": - // "t" is used by Linux to signal stopped by the debugger during tracing - return Stop - case "W": - return Wait - case "Y": - return System - case "Z": - return Zombie - default: - return UnknownState - } -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go deleted file mode 100644 index 1a58c3eca3..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_bsd.go +++ /dev/null @@ -1,76 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin || freebsd || openbsd - -package process - -import ( - "bytes" - "context" - "encoding/binary" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" -) - -type MemoryInfoExStat struct{} - -type MemoryMapsStat struct{} - -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} - -func parseKinfoProc(buf []byte) (KinfoProc, error) { - var k KinfoProc - br := bytes.NewReader(buf) - err := common.Read(br, binary.LittleEndian, &k) - return k, err -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go deleted file mode 100644 index 5afafd8d00..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin.go +++ /dev/null @@ -1,482 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin - -package process - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "fmt" - "path/filepath" - "runtime" - "sort" - "strconv" - "strings" - "unsafe" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -// copied from sys/sysctl.h -const ( - CTLKern = 1 // "high kernel": proc, limits - KernProc = 14 // struct: process entries - KernProcPID = 1 // by process id - KernProcProc = 8 // only return procs - KernProcAll = 0 // everything - KernProcPathname = 12 // path to executable -) - -type _Ctype_struct___0 struct { //nolint:revive //FIXME - Pad uint64 -} - -func pidsWithContext(_ context.Context) ([]int32, error) { - var ret []int32 - - kprocs, err := unix.SysctlKinfoProcSlice("kern.proc.all") - if err != nil { - return ret, err - } - - for _, proc := range kprocs { - ret = append(ret, int32(proc.Proc.P_pid)) - } - - return ret, nil -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - - return k.Eproc.Ppid, nil -} - -func (p *Process) NameWithContext(ctx context.Context) (string, error) { - k, err := p.getKProc() - if err != nil { - return "", err - } - - name := common.ByteToString(k.Proc.P_comm[:]) - - if len(name) >= 15 { - cmdName, err := p.cmdNameWithContext(ctx) - if err != nil { - return "", err - } - if len(cmdName) > 0 { - extendedName := filepath.Base(cmdName) - if strings.HasPrefix(extendedName, p.name) { - name = extendedName - } - } - } - - return name, nil -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - - return k.Proc.P_starttime.Sec*1000 + int64(k.Proc.P_starttime.Usec)/1000, nil -} - -func (p *Process) StatusWithContext(ctx context.Context) ([]string, error) { - r, err := callPsWithContext(ctx, "state", p.Pid, false, false) - if err != nil { - return []string{""}, err - } - status := convertStatusChar(r[0][0][0:1]) - return []string{status}, err -} - -func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) { - // see https://github.com/shirou/gopsutil/issues/596#issuecomment-432707831 for implementation details - pid := p.Pid - out, err := invoke.CommandWithContext(ctx, "ps", "-o", "stat=", "-p", strconv.Itoa(int(pid))) - if err != nil { - return false, err - } - return strings.IndexByte(string(out), '+') != -1, nil -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - // See: http://unix.superglobalmegacorp.com/Net2/newsrc/sys/ucred.h.html - userEffectiveUID := uint32(k.Eproc.Ucred.Uid) - - return []uint32{userEffectiveUID}, nil -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - gids := make([]uint32, 0, 3) - gids = append(gids, uint32(k.Eproc.Pcred.P_rgid), uint32(k.Eproc.Pcred.P_rgid), uint32(k.Eproc.Pcred.P_svgid)) - - return gids, nil -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError - // k, err := p.getKProc() - // if err != nil { - // return nil, err - // } - - // groups := make([]int32, k.Eproc.Ucred.Ngroups) - // for i := int16(0); i < k.Eproc.Ucred.Ngroups; i++ { - // groups[i] = int32(k.Eproc.Ucred.Groups[i]) - // } - - // return groups, nil -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError - /* - k, err := p.getKProc() - if err != nil { - return "", err - } - - ttyNr := uint64(k.Eproc.Tdev) - termmap, err := getTerminalMap() - if err != nil { - return "", err - } - - return termmap[ttyNr], nil - */ -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - return int32(k.Proc.P_nice), nil -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { - procs, err := ProcessesWithContext(ctx) - if err != nil { - return nil, nil - } - ret := make([]*Process, 0, len(procs)) - for _, proc := range procs { - ppid, err := proc.PpidWithContext(ctx) - if err != nil { - continue - } - if ppid == p.Pid { - ret = append(ret, proc) - } - } - sort.Slice(ret, func(i, j int) bool { return ret[i].Pid < ret[j].Pid }) - return ret, nil -} - -func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) { - return net.ConnectionsPidWithContext(ctx, "all", p.Pid) -} - -func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error) { - return net.ConnectionsPidMaxWithContext(ctx, "all", p.Pid, maxConn) -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - out := []*Process{} - - pids, err := PidsWithContext(ctx) - if err != nil { - return out, err - } - - for _, pid := range pids { - p, err := NewProcessWithContext(ctx, pid) - if err != nil { - continue - } - out = append(out, p) - } - - return out, nil -} - -// Returns a proc as defined here: -// http://unix.superglobalmegacorp.com/Net2/newsrc/sys/kinfo_proc.h.html -func (p *Process) getKProc() (*unix.KinfoProc, error) { - return unix.SysctlKinfoProc("kern.proc.pid", int(p.Pid)) -} - -// call ps command. -// Return value deletes Header line(you must not input wrong arg). -// And splited by Space. Caller have responsibility to manage. -// If passed arg pid is 0, get information from all process. -func callPsWithContext(ctx context.Context, arg string, pid int32, threadOption bool, nameOption bool) ([][]string, error) { - var cmd []string - switch { - case pid == 0: // will get from all processes. - cmd = []string{"-ax", "-o", arg} - case threadOption: - cmd = []string{"-x", "-o", arg, "-M", "-p", strconv.Itoa(int(pid))} - default: - cmd = []string{"-x", "-o", arg, "-p", strconv.Itoa(int(pid))} - } - if nameOption { - cmd = append(cmd, "-c") - } - out, err := invoke.CommandWithContext(ctx, "ps", cmd...) - if err != nil { - return [][]string{}, err - } - lines := strings.Split(string(out), "\n") - - var ret [][]string - for _, l := range lines[1:] { - var lr []string - if nameOption { - lr = append(lr, l) - } else { - for _, r := range strings.Split(l, " ") { - if r == "" { - continue - } - lr = append(lr, strings.TrimSpace(r)) - } - } - if len(lr) != 0 { - ret = append(ret, lr) - } - } - - return ret, nil -} - -var ( - procPidPath common.ProcPidPathFunc - procPidInfo common.ProcPidInfoFunc - machTimeBaseInfo common.MachTimeBaseInfoFunc -) - -func registerFuncs() (*common.Library, error) { - lib, err := common.NewLibrary(common.System) - if err != nil { - return nil, err - } - - procPidPath = common.GetFunc[common.ProcPidPathFunc](lib, common.ProcPidPathSym) - procPidInfo = common.GetFunc[common.ProcPidInfoFunc](lib, common.ProcPidInfoSym) - machTimeBaseInfo = common.GetFunc[common.MachTimeBaseInfoFunc](lib, common.MachTimeBaseInfoSym) - - return lib, nil -} - -func getTimeScaleToNanoSeconds() float64 { - var timeBaseInfo common.MachTimeBaseInfo - - machTimeBaseInfo(uintptr(unsafe.Pointer(&timeBaseInfo))) - - return float64(timeBaseInfo.Numer) / float64(timeBaseInfo.Denom) -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - lib, err := registerFuncs() - if err != nil { - return "", err - } - defer lib.Close() - - buf := common.NewCStr(common.PROC_PIDPATHINFO_MAXSIZE) - ret := procPidPath(p.Pid, buf.Addr(), common.PROC_PIDPATHINFO_MAXSIZE) - - if ret <= 0 { - return "", fmt.Errorf("unknown error: proc_pidpath returned %d", ret) - } - - return buf.GoString(), nil -} - -// sys/proc_info.h -type vnodePathInfo struct { - _ [152]byte - vipPath [common.MAXPATHLEN]byte - _ [1176]byte -} - -// CwdWithContext retrieves the Current Working Directory for the given process. -// It uses the proc_pidinfo from libproc and will only work for processes the -// EUID can access. Otherwise "operation not permitted" will be returned as the -// error. -// Note: This might also work for other *BSD OSs. -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - lib, err := registerFuncs() - if err != nil { - return "", err - } - defer lib.Close() - - // Lock OS thread to ensure the errno does not change - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - var vpi vnodePathInfo - const vpiSize = int32(unsafe.Sizeof(vpi)) - ret := procPidInfo(p.Pid, common.PROC_PIDVNODEPATHINFO, 0, uintptr(unsafe.Pointer(&vpi)), vpiSize) - errno, _ := lib.Dlsym("errno") - err = *(**unix.Errno)(unsafe.Pointer(&errno)) - if errors.Is(err, unix.EPERM) { - return "", ErrorNotPermitted - } - - if ret <= 0 { - return "", fmt.Errorf("unknown error: proc_pidinfo returned %d", ret) - } - - if ret != vpiSize { - return "", fmt.Errorf("too few bytes; expected %d, got %d", vpiSize, ret) - } - return common.GoString(&vpi.vipPath[0]), nil -} - -func procArgs(pid int32) ([]byte, int, error) { - procargs, _, err := common.CallSyscall([]int32{common.CTL_KERN, common.KERN_PROCARGS2, pid}) - if err != nil { - return nil, 0, err - } - - // The first 4 bytes indicate the number of arguments. - nargs := procargs[:4] - return procargs, int(binary.LittleEndian.Uint32(nargs)), nil -} - -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { - return p.cmdlineSlice() -} - -func (p *Process) cmdlineSlice() ([]string, error) { - pargs, nargs, err := procArgs(p.Pid) - if err != nil { - return nil, err - } - // The first bytes hold the nargs int, skip it. - args := bytes.Split((pargs)[unsafe.Sizeof(int(0)):], []byte{0}) - var argStr string - // The first element is the actual binary/command path. - // command := args[0] - var argSlice []string - // var envSlice []string - // All other, non-zero elements are arguments. The first "nargs" elements - // are the arguments. Everything else in the slice is then the environment - // of the process. - for _, arg := range args[1:] { - argStr = string(arg) - if len(argStr) > 0 { - if nargs > 0 { - argSlice = append(argSlice, argStr) - nargs-- - continue - } - break - // envSlice = append(envSlice, argStr) - } - } - return argSlice, err -} - -// cmdNameWithContext returns the command name (including spaces) without any arguments -func (p *Process) cmdNameWithContext(_ context.Context) (string, error) { - r, err := p.cmdlineSlice() - if err != nil { - return "", err - } - - if len(r) == 0 { - return "", nil - } - - return r[0], err -} - -func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) { - r, err := p.CmdlineSliceWithContext(ctx) - if err != nil { - return "", err - } - return strings.Join(r, " "), err -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - lib, err := registerFuncs() - if err != nil { - return 0, err - } - defer lib.Close() - - var ti ProcTaskInfo - procPidInfo(p.Pid, common.PROC_PIDTASKINFO, 0, uintptr(unsafe.Pointer(&ti)), int32(unsafe.Sizeof(ti))) - - return int32(ti.Threadnum), nil -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - lib, err := registerFuncs() - if err != nil { - return nil, err - } - defer lib.Close() - - var ti ProcTaskInfo - procPidInfo(p.Pid, common.PROC_PIDTASKINFO, 0, uintptr(unsafe.Pointer(&ti)), int32(unsafe.Sizeof(ti))) - - timescaleToNanoSeconds := getTimeScaleToNanoSeconds() - ret := &cpu.TimesStat{ - CPU: "cpu", - User: float64(ti.Total_user) * timescaleToNanoSeconds / 1e9, - System: float64(ti.Total_system) * timescaleToNanoSeconds / 1e9, - } - return ret, nil -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - lib, err := registerFuncs() - if err != nil { - return nil, err - } - defer lib.Close() - - var ti ProcTaskInfo - procPidInfo(p.Pid, common.PROC_PIDTASKINFO, 0, uintptr(unsafe.Pointer(&ti)), int32(unsafe.Sizeof(ti))) - - ret := &MemoryInfoStat{ - RSS: uint64(ti.Resident_size), - VMS: uint64(ti.Virtual_size), - Swap: uint64(ti.Pageins), - } - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_amd64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_amd64.go deleted file mode 100644 index 890a5d5331..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_amd64.go +++ /dev/null @@ -1,258 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_darwin.go - -package process - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type UGid_t uint32 - -type KinfoProc struct { - Proc ExternProc - Eproc Eproc -} - -type Eproc struct { - Paddr *uint64 - Sess *Session - Pcred Upcred - Ucred Uucred - Pad_cgo_0 [4]byte - Vm Vmspace - Ppid int32 - Pgid int32 - Jobc int16 - Pad_cgo_1 [2]byte - Tdev int32 - Tpgid int32 - Pad_cgo_2 [4]byte - Tsess *Session - Wmesg [8]int8 - Xsize int32 - Xrssize int16 - Xccount int16 - Xswrss int16 - Pad_cgo_3 [2]byte - Flag int32 - Login [12]int8 - Spare [4]int32 - Pad_cgo_4 [4]byte -} - -type Proc struct{} - -type Session struct{} - -type ucred struct { - Link _Ctype_struct___0 - Ref uint64 - Posix Posix_cred - Label *Label - Audit Au_session -} - -type Uucred struct { - Ref int32 - UID uint32 - Ngroups int16 - Pad_cgo_0 [2]byte - Groups [16]uint32 -} - -type Upcred struct { - Pc_lock [72]int8 - Pc_ucred *ucred - P_ruid uint32 - P_svuid uint32 - P_rgid uint32 - P_svgid uint32 - P_refcnt int32 - Pad_cgo_0 [4]byte -} - -type Vmspace struct { - Dummy int32 - Pad_cgo_0 [4]byte - Dummy2 *int8 - Dummy3 [5]int32 - Pad_cgo_1 [4]byte - Dummy4 [3]*int8 -} - -type Sigacts struct{} - -type ExternProc struct { - P_un [16]byte - P_vmspace uint64 - P_sigacts uint64 - Pad_cgo_0 [3]byte - P_flag int32 - P_stat int8 - P_pid int32 - P_oppid int32 - P_dupfd int32 - Pad_cgo_1 [4]byte - User_stack uint64 - Exit_thread uint64 - P_debugger int32 - Sigwait int32 - P_estcpu uint32 - P_cpticks int32 - P_pctcpu uint32 - Pad_cgo_2 [4]byte - P_wchan uint64 - P_wmesg uint64 - P_swtime uint32 - P_slptime uint32 - P_realtimer Itimerval - P_rtime Timeval - P_uticks uint64 - P_sticks uint64 - P_iticks uint64 - P_traceflag int32 - Pad_cgo_3 [4]byte - P_tracep uint64 - P_siglist int32 - Pad_cgo_4 [4]byte - P_textvp uint64 - P_holdcnt int32 - P_sigmask uint32 - P_sigignore uint32 - P_sigcatch uint32 - P_priority uint8 - P_usrpri uint8 - P_nice int8 - P_comm [17]int8 - Pad_cgo_5 [4]byte - P_pgrp uint64 - P_addr uint64 - P_xstat uint16 - P_acflag uint16 - Pad_cgo_6 [4]byte - P_ru uint64 -} - -type Itimerval struct { - Interval Timeval - Value Timeval -} - -type Vnode struct{} - -type Pgrp struct{} - -type UserStruct struct{} - -type Au_session struct { - Aia_p *AuditinfoAddr - Mask AuMask -} - -type Posix_cred struct { - UID uint32 - Ruid uint32 - Svuid uint32 - Ngroups int16 - Pad_cgo_0 [2]byte - Groups [16]uint32 - Rgid uint32 - Svgid uint32 - Gmuid uint32 - Flags int32 -} - -type Label struct{} - -type ProcTaskInfo struct { - Virtual_size uint64 - Resident_size uint64 - Total_user uint64 - Total_system uint64 - Threads_user uint64 - Threads_system uint64 - Policy int32 - Faults int32 - Pageins int32 - Cow_faults int32 - Messages_sent int32 - Messages_received int32 - Syscalls_mach int32 - Syscalls_unix int32 - Csw int32 - Threadnum int32 - Numrunning int32 - Priority int32 -} - -type AuditinfoAddr struct { - Auid uint32 - Mask AuMask - Termid AuTidAddr - Asid int32 - Flags uint64 -} - -type AuMask struct { - Success uint32 - Failure uint32 -} - -type AuTidAddr struct { - Port int32 - Type uint32 - Addr [4]uint32 -} - -type UcredQueue struct { - Next *ucred - Prev **ucred -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_arm64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_arm64.go deleted file mode 100644 index 8075cf227d..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_darwin_arm64.go +++ /dev/null @@ -1,234 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build darwin && arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs process/types_darwin.go - -package process - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int32 - Pad_cgo_0 [4]byte -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type UGid_t uint32 - -type KinfoProc struct { - Proc ExternProc - Eproc Eproc -} - -type Eproc struct { - Paddr *Proc - Sess *Session - Pcred Upcred - Ucred Uucred - Vm Vmspace - Ppid int32 - Pgid int32 - Jobc int16 - Tdev int32 - Tpgid int32 - Tsess *Session - Wmesg [8]int8 - Xsize int32 - Xrssize int16 - Xccount int16 - Xswrss int16 - Flag int32 - Login [12]int8 - Spare [4]int32 - Pad_cgo_0 [4]byte -} - -type Proc struct{} - -type Session struct{} - -type ucred struct{} - -type Uucred struct { - Ref int32 - UID uint32 - Ngroups int16 - Groups [16]uint32 -} - -type Upcred struct { - Pc_lock [72]int8 - Pc_ucred *ucred - P_ruid uint32 - P_svuid uint32 - P_rgid uint32 - P_svgid uint32 - P_refcnt int32 - Pad_cgo_0 [4]byte -} - -type Vmspace struct { - Dummy int32 - Dummy2 *int8 - Dummy3 [5]int32 - Dummy4 [3]*int8 -} - -type Sigacts struct{} - -type ExternProc struct { - P_un [16]byte - P_vmspace uint64 - P_sigacts uint64 - Pad_cgo_0 [3]byte - P_flag int32 - P_stat int8 - P_pid int32 - P_oppid int32 - P_dupfd int32 - Pad_cgo_1 [4]byte - User_stack uint64 - Exit_thread uint64 - P_debugger int32 - Sigwait int32 - P_estcpu uint32 - P_cpticks int32 - P_pctcpu uint32 - Pad_cgo_2 [4]byte - P_wchan uint64 - P_wmesg uint64 - P_swtime uint32 - P_slptime uint32 - P_realtimer Itimerval - P_rtime Timeval - P_uticks uint64 - P_sticks uint64 - P_iticks uint64 - P_traceflag int32 - Pad_cgo_3 [4]byte - P_tracep uint64 - P_siglist int32 - Pad_cgo_4 [4]byte - P_textvp uint64 - P_holdcnt int32 - P_sigmask uint32 - P_sigignore uint32 - P_sigcatch uint32 - P_priority uint8 - P_usrpri uint8 - P_nice int8 - P_comm [17]int8 - Pad_cgo_5 [4]byte - P_pgrp uint64 - P_addr uint64 - P_xstat uint16 - P_acflag uint16 - Pad_cgo_6 [4]byte - P_ru uint64 -} - -type Itimerval struct { - Interval Timeval - Value Timeval -} - -type Vnode struct{} - -type Pgrp struct{} - -type UserStruct struct{} - -type Au_session struct { - Aia_p *AuditinfoAddr - Mask AuMask -} - -type Posix_cred struct{} - -type Label struct{} - -type ProcTaskInfo struct { - Virtual_size uint64 - Resident_size uint64 - Total_user uint64 - Total_system uint64 - Threads_user uint64 - Threads_system uint64 - Policy int32 - Faults int32 - Pageins int32 - Cow_faults int32 - Messages_sent int32 - Messages_received int32 - Syscalls_mach int32 - Syscalls_unix int32 - Csw int32 - Threadnum int32 - Numrunning int32 - Priority int32 -} - -type AuditinfoAddr struct { - Auid uint32 - Mask AuMask - Termid AuTidAddr - Asid int32 - Flags uint64 -} -type AuMask struct { - Success uint32 - Failure uint32 -} -type AuTidAddr struct { - Port int32 - Type uint32 - Addr [4]uint32 -} - -type UcredQueue struct { - Next *ucred - Prev **ucred -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go b/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go deleted file mode 100644 index b014297348..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_fallback.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build !darwin && !linux && !freebsd && !openbsd && !windows && !solaris && !plan9 - -package process - -import ( - "context" - "syscall" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -type Signal = syscall.Signal - -type MemoryMapsStat struct { - Path string `json:"path"` - Rss uint64 `json:"rss"` - Size uint64 `json:"size"` - Pss uint64 `json:"pss"` - SharedClean uint64 `json:"sharedClean"` - SharedDirty uint64 `json:"sharedDirty"` - PrivateClean uint64 `json:"privateClean"` - PrivateDirty uint64 `json:"privateDirty"` - Referenced uint64 `json:"referenced"` - Anonymous uint64 `json:"anonymous"` - Swap uint64 `json:"swap"` -} - -type MemoryInfoExStat struct{} - -func pidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func ProcessesWithContext(_ context.Context) ([]*Process, error) { - return nil, common.ErrNotImplementedError -} - -func PidExistsWithContext(_ context.Context, _ int32) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) NameWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - return []string{""}, common.ErrNotImplementedError -} - -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) SendSignalWithContext(_ context.Context, _ Signal) error { - return common.ErrNotImplementedError -} - -func (p *Process) SuspendWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) ResumeWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) TerminateWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) KillWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) UsernameWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go deleted file mode 100644 index 6df31421c3..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd.go +++ /dev/null @@ -1,363 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd - -package process - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "path/filepath" - "sort" - "strconv" - "strings" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -func pidsWithContext(ctx context.Context) ([]int32, error) { - var ret []int32 - procs, err := ProcessesWithContext(ctx) - if err != nil { - return ret, nil - } - - for _, p := range procs { - ret = append(ret, p.Pid) - } - - return ret, nil -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - - return k.Ppid, nil -} - -func (p *Process) NameWithContext(ctx context.Context) (string, error) { - k, err := p.getKProc() - if err != nil { - return "", err - } - name := common.IntToString(k.Comm[:]) - - if len(name) >= 15 { - cmdlineSlice, err := p.CmdlineSliceWithContext(ctx) - if err != nil { - return "", err - } - if len(cmdlineSlice) > 0 { - extendedName := filepath.Base(cmdlineSlice[0]) - if strings.HasPrefix(extendedName, p.name) { - name = extendedName - } - } - } - - return name, nil -} - -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - mib := []int32{CTLKern, KernProc, KernProcCwd, p.Pid} - buf, length, err := common.CallSyscall(mib) - if err != nil { - return "", err - } - - if length != sizeOfKinfoFile { - return "", errors.New("unexpected size of KinfoFile") - } - - var k kinfoFile - br := bytes.NewReader(buf) - if err := common.Read(br, binary.LittleEndian, &k); err != nil { - return "", err - } - cwd := common.IntToString(k.Path[:]) - - return cwd, nil -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - mib := []int32{CTLKern, KernProc, KernProcPathname, p.Pid} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return "", err - } - - return strings.Trim(string(buf), "\x00"), nil -} - -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { - mib := []int32{CTLKern, KernProc, KernProcArgs, p.Pid} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return "", err - } - ret := strings.FieldsFunc(string(buf), func(r rune) bool { - return r == '\u0000' - }) - - return strings.Join(ret, " "), nil -} - -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { - mib := []int32{CTLKern, KernProc, KernProcArgs, p.Pid} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return nil, err - } - if len(buf) == 0 { - return nil, nil - } - if buf[len(buf)-1] == 0 { - buf = buf[:len(buf)-1] - } - parts := bytes.Split(buf, []byte{0}) - var strParts []string - for _, p := range parts { - strParts = append(strParts, string(p)) - } - - return strParts, nil -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - return int64(k.Start.Sec)*1000 + int64(k.Start.Usec)/1000, nil -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - k, err := p.getKProc() - if err != nil { - return []string{""}, err - } - var s string - switch k.Stat { - case SIDL: - s = Idle - case SRUN: - s = Running - case SSLEEP: - s = Sleep - case SSTOP: - s = Stop - case SZOMB: - s = Zombie - case SWAIT: - s = Wait - case SLOCK: - s = Lock - } - - return []string{s}, nil -} - -func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) { - // see https://github.com/shirou/gopsutil/issues/596#issuecomment-432707831 for implementation details - pid := p.Pid - out, err := invoke.CommandWithContext(ctx, "ps", "-o", "stat=", "-p", strconv.Itoa(int(pid))) - if err != nil { - return false, err - } - return strings.IndexByte(string(out), '+') != -1, nil -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - uids := make([]uint32, 0, 3) - - uids = append(uids, uint32(k.Ruid), uint32(k.Uid), uint32(k.Svuid)) - - return uids, nil -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - gids := make([]uint32, 0, 3) - gids = append(gids, uint32(k.Rgid), uint32(k.Ngroups), uint32(k.Svgid)) - - return gids, nil -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - groups := make([]uint32, k.Ngroups) - for i := int16(0); i < k.Ngroups; i++ { - groups[i] = uint32(k.Groups[i]) - } - - return groups, nil -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - k, err := p.getKProc() - if err != nil { - return "", err - } - - ttyNr := uint64(k.Tdev) - - termmap, err := getTerminalMap() - if err != nil { - return "", err - } - - return termmap[ttyNr], nil -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - return int32(k.Nice), nil -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - return &IOCountersStat{ - ReadCount: uint64(k.Rusage.Inblock), - WriteCount: uint64(k.Rusage.Oublock), - }, nil -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - - return k.Numthreads, nil -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - return &cpu.TimesStat{ - CPU: "cpu", - User: float64(k.Rusage.Utime.Sec) + float64(k.Rusage.Utime.Usec)/1000000, - System: float64(k.Rusage.Stime.Sec) + float64(k.Rusage.Stime.Usec)/1000000, - }, nil -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - v, err := unix.Sysctl("vm.stats.vm.v_page_size") - if err != nil { - return nil, err - } - pageSize := common.LittleEndian.Uint16([]byte(v)) - - return &MemoryInfoStat{ - RSS: uint64(k.Rssize) * uint64(pageSize), - VMS: uint64(k.Size), - }, nil -} - -func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { - procs, err := ProcessesWithContext(ctx) - if err != nil { - return nil, nil - } - ret := make([]*Process, 0, len(procs)) - for _, proc := range procs { - ppid, err := proc.PpidWithContext(ctx) - if err != nil { - continue - } - if ppid == p.Pid { - ret = append(ret, proc) - } - } - sort.Slice(ret, func(i, j int) bool { return ret[i].Pid < ret[j].Pid }) - return ret, nil -} - -func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) { - return net.ConnectionsPidWithContext(ctx, "all", p.Pid) -} - -func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error) { - return net.ConnectionsPidMaxWithContext(ctx, "all", p.Pid, maxConn) -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - results := []*Process{} - - mib := []int32{CTLKern, KernProc, KernProcProc, 0} - buf, length, err := common.CallSyscall(mib) - if err != nil { - return results, err - } - - // get kinfo_proc size - count := int(length / uint64(sizeOfKinfoProc)) - - // parse buf to procs - for i := 0; i < count; i++ { - b := buf[i*sizeOfKinfoProc : (i+1)*sizeOfKinfoProc] - k, err := parseKinfoProc(b) - if err != nil { - continue - } - p, err := NewProcessWithContext(ctx, int32(k.Pid)) - if err != nil { - continue - } - - results = append(results, p) - } - - return results, nil -} - -func (p *Process) getKProc() (*KinfoProc, error) { - mib := []int32{CTLKern, KernProc, KernProcPID, p.Pid} - - buf, length, err := common.CallSyscall(mib) - if err != nil { - return nil, err - } - if length != sizeOfKinfoProc { - return nil, errors.New("unexpected size of KinfoProc") - } - - k, err := parseKinfoProc(buf) - if err != nil { - return nil, err - } - return &k, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_386.go b/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_386.go deleted file mode 100644 index 0193ba25b0..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_386.go +++ /dev/null @@ -1,218 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 14 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 7 - KernProcCwd = 42 -) - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x488 - sizeOfKinfoProc = 0x300 - sizeOfKinfoFile = 0x570 // TODO: should be changed by running on the target machine -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SWAIT = 6 - SLOCK = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int32 - Nsec int32 -} - -type Timeval struct { - Sec int32 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type KinfoProc struct { - Structsize int32 - Layout int32 - Args int32 /* pargs */ - Paddr int32 /* proc */ - Addr int32 /* user */ - Tracep int32 /* vnode */ - Textvp int32 /* vnode */ - Fd int32 /* filedesc */ - Vmspace int32 /* vmspace */ - Wchan int32 - Pid int32 - Ppid int32 - Pgid int32 - Tpgid int32 - Sid int32 - Tsid int32 - Jobc int16 - Spare_short1 int16 - Tdev uint32 - Siglist [16]byte /* sigset */ - Sigmask [16]byte /* sigset */ - Sigignore [16]byte /* sigset */ - Sigcatch [16]byte /* sigset */ - Uid uint32 - Ruid uint32 - Svuid uint32 - Rgid uint32 - Svgid uint32 - Ngroups int16 - Spare_short2 int16 - Groups [16]uint32 - Size uint32 - Rssize int32 - Swrss int32 - Tsize int32 - Dsize int32 - Ssize int32 - Xstat uint16 - Acflag uint16 - Pctcpu uint32 - Estcpu uint32 - Slptime uint32 - Swtime uint32 - Cow uint32 - Runtime uint64 - Start Timeval - Childtime Timeval - Flag int32 - Kiflag int32 - Traceflag int32 - Stat int8 - Nice int8 - Lock int8 - Rqindex int8 - Oncpu uint8 - Lastcpu uint8 - Tdname [17]int8 - Wmesg [9]int8 - Login [18]int8 - Lockname [9]int8 - Comm [20]int8 - Emul [17]int8 - Loginclass [18]int8 - Sparestrings [50]int8 - Spareints [7]int32 - Flag2 int32 - Fibnum int32 - Cr_flags uint32 - Jid int32 - Numthreads int32 - Tid int32 - Pri Priority - Rusage Rusage - Rusage_ch Rusage - Pcb int32 /* pcb */ - Kstack int32 - Udata int32 - Tdaddr int32 /* thread */ - Spareptrs [6]int32 - Sparelongs [12]int32 - Sflag int32 - Tdflags int32 -} - -type Priority struct { - Class uint8 - Level uint8 - Native uint8 - User uint8 -} - -type KinfoVmentry struct { - Structsize int32 - Type int32 - Start uint64 - End uint64 - Offset uint64 - Vn_fileid uint64 - Vn_fsid uint32 - Flags int32 - Resident int32 - Private_resident int32 - Protection int32 - Ref_count int32 - Shadow_count int32 - Vn_type int32 - Vn_size uint64 - Vn_rdev uint32 - Vn_mode uint16 - Status uint16 - X_kve_ispare [12]int32 - Path [1024]int8 -} - -// TODO: should be changed by running on the target machine -type kinfoFile struct { - Structsize int32 - Type int32 - Fd int32 - Ref_count int32 - Flags int32 - Pad0 int32 - Offset int64 - Anon0 [304]byte - Status uint16 - Pad1 uint16 - X_kf_ispare0 int32 - Cap_rights capRights - X_kf_cap_spare uint64 - Path [1024]int8 // changed from uint8 by hand -} - -// TODO: should be changed by running on the target machine -type capRights struct { - Rights [2]uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_amd64.go deleted file mode 100644 index 67970f64f5..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_amd64.go +++ /dev/null @@ -1,224 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 14 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 7 - KernProcCwd = 42 -) - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x488 - sizeOfKinfoProc = 0x440 - sizeOfKinfoFile = 0x570 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SWAIT = 6 - SLOCK = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type KinfoProc struct { - Structsize int32 - Layout int32 - Args int64 /* pargs */ - Paddr int64 /* proc */ - Addr int64 /* user */ - Tracep int64 /* vnode */ - Textvp int64 /* vnode */ - Fd int64 /* filedesc */ - Vmspace int64 /* vmspace */ - Wchan int64 - Pid int32 - Ppid int32 - Pgid int32 - Tpgid int32 - Sid int32 - Tsid int32 - Jobc int16 - Spare_short1 int16 - Tdev_freebsd11 uint32 - Siglist [16]byte /* sigset */ - Sigmask [16]byte /* sigset */ - Sigignore [16]byte /* sigset */ - Sigcatch [16]byte /* sigset */ - Uid uint32 - Ruid uint32 - Svuid uint32 - Rgid uint32 - Svgid uint32 - Ngroups int16 - Spare_short2 int16 - Groups [16]uint32 - Size uint64 - Rssize int64 - Swrss int64 - Tsize int64 - Dsize int64 - Ssize int64 - Xstat uint16 - Acflag uint16 - Pctcpu uint32 - Estcpu uint32 - Slptime uint32 - Swtime uint32 - Cow uint32 - Runtime uint64 - Start Timeval - Childtime Timeval - Flag int64 - Kiflag int64 - Traceflag int32 - Stat int8 - Nice int8 - Lock int8 - Rqindex int8 - Oncpu_old uint8 - Lastcpu_old uint8 - Tdname [17]int8 - Wmesg [9]int8 - Login [18]int8 - Lockname [9]int8 - Comm [20]int8 - Emul [17]int8 - Loginclass [18]int8 - Moretdname [4]int8 - Sparestrings [46]int8 - Spareints [2]int32 - Tdev uint64 - Oncpu int32 - Lastcpu int32 - Tracer int32 - Flag2 int32 - Fibnum int32 - Cr_flags uint32 - Jid int32 - Numthreads int32 - Tid int32 - Pri Priority - Rusage Rusage - Rusage_ch Rusage - Pcb int64 /* pcb */ - Kstack int64 - Udata int64 - Tdaddr int64 /* thread */ - Pd int64 /* pwddesc, not accurate */ - Spareptrs [5]int64 - Sparelongs [12]int64 - Sflag int64 - Tdflags int64 -} - -type Priority struct { - Class uint8 - Level uint8 - Native uint8 - User uint8 -} - -type KinfoVmentry struct { - Structsize int32 - Type int32 - Start uint64 - End uint64 - Offset uint64 - Vn_fileid uint64 - Vn_fsid_freebsd11 uint32 - Flags int32 - Resident int32 - Private_resident int32 - Protection int32 - Ref_count int32 - Shadow_count int32 - Vn_type int32 - Vn_size uint64 - Vn_rdev_freebsd11 uint32 - Vn_mode uint16 - Status uint16 - Type_spec [8]byte - Vn_rdev uint64 - X_kve_ispare [8]int32 - Path [1024]int8 -} - -type kinfoFile struct { - Structsize int32 - Type int32 - Fd int32 - Ref_count int32 - Flags int32 - Pad0 int32 - Offset int64 - Anon0 [304]byte - Status uint16 - Pad1 uint16 - X_kf_ispare0 int32 - Cap_rights capRights - X_kf_cap_spare uint64 - Path [1024]int8 -} - -type capRights struct { - Rights [2]uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm.go deleted file mode 100644 index 6c4fbf6988..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm.go +++ /dev/null @@ -1,218 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_freebsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 14 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 7 - KernProcCwd = 42 -) - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x488 - sizeOfKinfoProc = 0x440 - sizeOfKinfoFile = 0x570 // TODO: should be changed by running on the target machine -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SWAIT = 6 - SLOCK = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur int32 - Max int32 -} - -type KinfoProc struct { - Structsize int32 - Layout int32 - Args int32 /* pargs */ - Paddr int32 /* proc */ - Addr int32 /* user */ - Tracep int32 /* vnode */ - Textvp int32 /* vnode */ - Fd int32 /* filedesc */ - Vmspace int32 /* vmspace */ - Wchan int32 - Pid int32 - Ppid int32 - Pgid int32 - Tpgid int32 - Sid int32 - Tsid int32 - Jobc int16 - Spare_short1 int16 - Tdev uint32 - Siglist [16]byte /* sigset */ - Sigmask [16]byte /* sigset */ - Sigignore [16]byte /* sigset */ - Sigcatch [16]byte /* sigset */ - Uid uint32 - Ruid uint32 - Svuid uint32 - Rgid uint32 - Svgid uint32 - Ngroups int16 - Spare_short2 int16 - Groups [16]uint32 - Size uint32 - Rssize int32 - Swrss int32 - Tsize int32 - Dsize int32 - Ssize int32 - Xstat uint16 - Acflag uint16 - Pctcpu uint32 - Estcpu uint32 - Slptime uint32 - Swtime uint32 - Cow uint32 - Runtime uint64 - Start Timeval - Childtime Timeval - Flag int32 - Kiflag int32 - Traceflag int32 - Stat int8 - Nice int8 - Lock int8 - Rqindex int8 - Oncpu uint8 - Lastcpu uint8 - Tdname [17]int8 - Wmesg [9]int8 - Login [18]int8 - Lockname [9]int8 - Comm [20]int8 - Emul [17]int8 - Loginclass [18]int8 - Sparestrings [50]int8 - Spareints [4]int32 - Flag2 int32 - Fibnum int32 - Cr_flags uint32 - Jid int32 - Numthreads int32 - Tid int32 - Pri Priority - Rusage Rusage - Rusage_ch Rusage - Pcb int32 /* pcb */ - Kstack int32 - Udata int32 - Tdaddr int32 /* thread */ - Spareptrs [6]int64 - Sparelongs [12]int64 - Sflag int64 - Tdflags int64 -} - -type Priority struct { - Class uint8 - Level uint8 - Native uint8 - User uint8 -} - -type KinfoVmentry struct { - Structsize int32 - Type int32 - Start uint64 - End uint64 - Offset uint64 - Vn_fileid uint64 - Vn_fsid uint32 - Flags int32 - Resident int32 - Private_resident int32 - Protection int32 - Ref_count int32 - Shadow_count int32 - Vn_type int32 - Vn_size uint64 - Vn_rdev uint32 - Vn_mode uint16 - Status uint16 - X_kve_ispare [12]int32 - Path [1024]int8 -} - -// TODO: should be changed by running on the target machine -type kinfoFile struct { - Structsize int32 - Type int32 - Fd int32 - Ref_count int32 - Flags int32 - Pad0 int32 - Offset int64 - Anon0 [304]byte - Status uint16 - Pad1 uint16 - X_kf_ispare0 int32 - Cap_rights capRights - X_kf_cap_spare uint64 - Path [1024]int8 // changed from uint8 by hand -} - -// TODO: should be changed by running on the target machine -type capRights struct { - Rights [2]uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm64.go deleted file mode 100644 index dabdc3e309..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_freebsd_arm64.go +++ /dev/null @@ -1,226 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build freebsd && arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs types_freebsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 14 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 7 - KernProcCwd = 42 -) - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x488 - sizeOfKinfoProc = 0x440 - sizeOfKinfoFile = 0x570 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SWAIT = 6 - SLOCK = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur int64 - Max int64 -} - -type KinfoProc struct { - Structsize int32 - Layout int32 - Args int64 /* pargs */ - Paddr int64 /* proc */ - Addr int64 /* user */ - Tracep int64 /* vnode */ - Textvp int64 /* vnode */ - Fd int64 /* filedesc */ - Vmspace int64 /* vmspace */ - Wchan int64 - Pid int32 - Ppid int32 - Pgid int32 - Tpgid int32 - Sid int32 - Tsid int32 - Jobc int16 - Spare_short1 int16 - Tdev_freebsd11 uint32 - Siglist [16]byte /* sigset */ - Sigmask [16]byte /* sigset */ - Sigignore [16]byte /* sigset */ - Sigcatch [16]byte /* sigset */ - Uid uint32 - Ruid uint32 - Svuid uint32 - Rgid uint32 - Svgid uint32 - Ngroups int16 - Spare_short2 int16 - Groups [16]uint32 - Size uint64 - Rssize int64 - Swrss int64 - Tsize int64 - Dsize int64 - Ssize int64 - Xstat uint16 - Acflag uint16 - Pctcpu uint32 - Estcpu uint32 - Slptime uint32 - Swtime uint32 - Cow uint32 - Runtime uint64 - Start Timeval - Childtime Timeval - Flag int64 - Kiflag int64 - Traceflag int32 - Stat uint8 - Nice int8 - Lock uint8 - Rqindex uint8 - Oncpu_old uint8 - Lastcpu_old uint8 - Tdname [17]uint8 - Wmesg [9]uint8 - Login [18]uint8 - Lockname [9]uint8 - Comm [20]int8 // changed from uint8 by hand - Emul [17]uint8 - Loginclass [18]uint8 - Moretdname [4]uint8 - Sparestrings [46]uint8 - Spareints [2]int32 - Tdev uint64 - Oncpu int32 - Lastcpu int32 - Tracer int32 - Flag2 int32 - Fibnum int32 - Cr_flags uint32 - Jid int32 - Numthreads int32 - Tid int32 - Pri Priority - Rusage Rusage - Rusage_ch Rusage - Pcb int64 /* pcb */ - Kstack int64 - Udata int64 - Tdaddr int64 /* thread */ - Pd int64 /* pwddesc, not accurate */ - Spareptrs [5]int64 - Sparelongs [12]int64 - Sflag int64 - Tdflags int64 -} - -type Priority struct { - Class uint8 - Level uint8 - Native uint8 - User uint8 -} - -type KinfoVmentry struct { - Structsize int32 - Type int32 - Start uint64 - End uint64 - Offset uint64 - Vn_fileid uint64 - Vn_fsid_freebsd11 uint32 - Flags int32 - Resident int32 - Private_resident int32 - Protection int32 - Ref_count int32 - Shadow_count int32 - Vn_type int32 - Vn_size uint64 - Vn_rdev_freebsd11 uint32 - Vn_mode uint16 - Status uint16 - Type_spec [8]byte - Vn_rdev uint64 - X_kve_ispare [8]int32 - Path [1024]uint8 -} - -type kinfoFile struct { - Structsize int32 - Type int32 - Fd int32 - Ref_count int32 - Flags int32 - Pad0 int32 - Offset int64 - Anon0 [304]byte - Status uint16 - Pad1 uint16 - X_kf_ispare0 int32 - Cap_rights capRights - X_kf_cap_spare uint64 - Path [1024]int8 // changed from uint8 by hand -} - -type capRights struct { - Rights [2]uint64 -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go b/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go deleted file mode 100644 index bf96fd3864..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_linux.go +++ /dev/null @@ -1,1206 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux - -package process - -import ( - "bufio" - "bytes" - "context" - "encoding/json" - "fmt" - "math" - "os" - "path/filepath" - "sort" - "strconv" - "strings" - - "github.com/tklauser/go-sysconf" - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -var pageSize = uint64(os.Getpagesize()) - -const prioProcess = 0 // linux/resource.h - -var clockTicks = 100 // default value - -func init() { - clkTck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - // ignore errors - if err == nil { - clockTicks = int(clkTck) - } -} - -// MemoryInfoExStat is different between OSes -type MemoryInfoExStat struct { - RSS uint64 `json:"rss"` // bytes - VMS uint64 `json:"vms"` // bytes - Shared uint64 `json:"shared"` // bytes - Text uint64 `json:"text"` // bytes - Lib uint64 `json:"lib"` // bytes - Data uint64 `json:"data"` // bytes - Dirty uint64 `json:"dirty"` // bytes -} - -func (m MemoryInfoExStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -type MemoryMapsStat struct { - Path string `json:"path"` - Rss uint64 `json:"rss"` - Size uint64 `json:"size"` - Pss uint64 `json:"pss"` - SharedClean uint64 `json:"sharedClean"` - SharedDirty uint64 `json:"sharedDirty"` - PrivateClean uint64 `json:"privateClean"` - PrivateDirty uint64 `json:"privateDirty"` - Referenced uint64 `json:"referenced"` - Anonymous uint64 `json:"anonymous"` - Swap uint64 `json:"swap"` -} - -// String returns JSON value of the process. -func (m MemoryMapsStat) String() string { - s, _ := json.Marshal(m) - return string(s) -} - -func (p *Process) PpidWithContext(ctx context.Context) (int32, error) { - _, ppid, _, _, _, _, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return -1, err - } - return ppid, nil -} - -func (p *Process) NameWithContext(ctx context.Context) (string, error) { - if p.name == "" { - if err := p.fillNameWithContext(ctx); err != nil { - return "", err - } - } - return p.name, nil -} - -func (p *Process) TgidWithContext(ctx context.Context) (int32, error) { - if p.tgid == 0 { - if err := p.fillFromStatusWithContext(ctx); err != nil { - return 0, err - } - } - return p.tgid, nil -} - -func (p *Process) ExeWithContext(ctx context.Context) (string, error) { - return p.fillFromExeWithContext(ctx) -} - -func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) { - return p.fillFromCmdlineWithContext(ctx) -} - -func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) { - return p.fillSliceFromCmdlineWithContext(ctx) -} - -func (p *Process) createTimeWithContext(ctx context.Context) (int64, error) { - _, _, _, createTime, _, _, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return 0, err - } - return createTime, nil -} - -func (p *Process) CwdWithContext(ctx context.Context) (string, error) { - return p.fillFromCwdWithContext(ctx) -} - -func (p *Process) StatusWithContext(ctx context.Context) ([]string, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return []string{""}, err - } - return []string{p.status}, nil -} - -func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) { - // see https://github.com/shirou/gopsutil/issues/596#issuecomment-432707831 for implementation details - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "stat") - contents, err := os.ReadFile(statPath) - if err != nil { - return false, err - } - fields := strings.Fields(string(contents)) - if len(fields) < 8 { - return false, fmt.Errorf("insufficient data in %s", statPath) - } - pgid := fields[4] - tpgid := fields[7] - return pgid == tpgid, nil -} - -func (p *Process) UidsWithContext(ctx context.Context) ([]uint32, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return []uint32{}, err - } - return p.uids, nil -} - -func (p *Process) GidsWithContext(ctx context.Context) ([]uint32, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return []uint32{}, err - } - return p.gids, nil -} - -func (p *Process) GroupsWithContext(ctx context.Context) ([]uint32, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return []uint32{}, err - } - return p.groups, nil -} - -func (p *Process) TerminalWithContext(ctx context.Context) (string, error) { - t, _, _, _, _, _, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return "", err - } - termmap, err := getTerminalMap() - if err != nil { - return "", err - } - terminal := termmap[t] - return terminal, nil -} - -func (p *Process) NiceWithContext(ctx context.Context) (int32, error) { - _, _, _, _, _, nice, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return 0, err - } - return nice, nil -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(ctx context.Context) ([]RlimitStat, error) { - return p.RlimitUsageWithContext(ctx, false) -} - -func (p *Process) RlimitUsageWithContext(ctx context.Context, gatherUsed bool) ([]RlimitStat, error) { - rlimits, err := p.fillFromLimitsWithContext(ctx) - if !gatherUsed || err != nil { - return rlimits, err - } - - _, _, _, _, rtprio, nice, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return nil, err - } - if err := p.fillFromStatusWithContext(ctx); err != nil { - return nil, err - } - - for i := range rlimits { - rs := &rlimits[i] - switch rs.Resource { - case RLIMIT_CPU: - times, err := p.TimesWithContext(ctx) - if err != nil { - return nil, err - } - rs.Used = uint64(times.User + times.System) - case RLIMIT_DATA: - rs.Used = uint64(p.memInfo.Data) - case RLIMIT_STACK: - rs.Used = uint64(p.memInfo.Stack) - case RLIMIT_RSS: - rs.Used = uint64(p.memInfo.RSS) - case RLIMIT_NOFILE: - n, err := p.NumFDsWithContext(ctx) - if err != nil { - return nil, err - } - rs.Used = uint64(n) - case RLIMIT_MEMLOCK: - rs.Used = uint64(p.memInfo.Locked) - case RLIMIT_AS: - rs.Used = uint64(p.memInfo.VMS) - case RLIMIT_LOCKS: - // TODO we can get the used value from /proc/$pid/locks. But linux doesn't enforce it, so not a high priority. - case RLIMIT_SIGPENDING: - rs.Used = p.sigInfo.PendingProcess - case RLIMIT_NICE: - // The rlimit for nice is a little unusual, in that 0 means the niceness cannot be decreased beyond the current value, but it can be increased. - // So effectively: if rs.Soft == 0 { rs.Soft = rs.Used } - rs.Used = uint64(nice) - case RLIMIT_RTPRIO: - rs.Used = uint64(rtprio) - } - } - - return rlimits, err -} - -func (p *Process) IOCountersWithContext(ctx context.Context) (*IOCountersStat, error) { - return p.fillFromIOWithContext(ctx) -} - -func (p *Process) NumCtxSwitchesWithContext(ctx context.Context) (*NumCtxSwitchesStat, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return nil, err - } - return p.numCtxSwitches, nil -} - -func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) { - _, fnames, err := p.fillFromfdListWithContext(ctx) - return int32(len(fnames)), err -} - -func (p *Process) NumThreadsWithContext(ctx context.Context) (int32, error) { - err := p.fillFromStatusWithContext(ctx) - if err != nil { - return 0, err - } - return p.numThreads, nil -} - -func (p *Process) ThreadsWithContext(ctx context.Context) (map[int32]*cpu.TimesStat, error) { - ret := make(map[int32]*cpu.TimesStat) - taskPath := common.HostProcWithContext(ctx, strconv.Itoa(int(p.Pid)), "task") - - tids, err := readPidsFromDir(taskPath) - if err != nil { - return nil, err - } - - for _, tid := range tids { - _, _, cpuTimes, _, _, _, _, err := p.fillFromTIDStatWithContext(ctx, tid) - if err != nil { - return nil, err - } - ret[tid] = cpuTimes - } - - return ret, nil -} - -func (p *Process) TimesWithContext(ctx context.Context) (*cpu.TimesStat, error) { - _, _, cpuTimes, _, _, _, _, err := p.fillFromStatWithContext(ctx) - if err != nil { - return nil, err - } - return cpuTimes, nil -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoWithContext(ctx context.Context) (*MemoryInfoStat, error) { - meminfo, _, err := p.fillFromStatmWithContext(ctx) - if err != nil { - return nil, err - } - return meminfo, nil -} - -func (p *Process) MemoryInfoExWithContext(ctx context.Context) (*MemoryInfoExStat, error) { - _, memInfoEx, err := p.fillFromStatmWithContext(ctx) - if err != nil { - return nil, err - } - return memInfoEx, nil -} - -func (p *Process) PageFaultsWithContext(ctx context.Context) (*PageFaultsStat, error) { - _, _, _, _, _, _, pageFaults, err := p.fillFromStatWithContext(ctx) - if err != nil { - return nil, err - } - return pageFaults, nil -} - -func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { - statFiles, err := filepath.Glob(common.HostProcWithContext(ctx, "[0-9]*/stat")) - if err != nil { - return nil, err - } - ret := make([]*Process, 0, len(statFiles)) - for _, statFile := range statFiles { - statContents, err := os.ReadFile(statFile) - if err != nil { - continue - } - fields := splitProcStat(statContents) - pid, err := strconv.ParseInt(fields[1], 10, 32) - if err != nil { - continue - } - ppid, err := strconv.ParseInt(fields[4], 10, 32) - if err != nil { - continue - } - if int32(ppid) == p.Pid { - np, err := NewProcessWithContext(ctx, int32(pid)) - if err != nil { - continue - } - ret = append(ret, np) - } - } - sort.Slice(ret, func(i, j int) bool { return ret[i].Pid < ret[j].Pid }) - return ret, nil -} - -func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) { - _, ofs, err := p.fillFromfdWithContext(ctx) - if err != nil { - return nil, err - } - ret := make([]OpenFilesStat, len(ofs)) - for i, o := range ofs { - ret[i] = *o - } - - return ret, nil -} - -func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) { - return net.ConnectionsPidWithContext(ctx, "all", p.Pid) -} - -func (p *Process) ConnectionsMaxWithContext(ctx context.Context, maxConn int) ([]net.ConnectionStat, error) { - return net.ConnectionsPidMaxWithContext(ctx, "all", p.Pid, maxConn) -} - -func (p *Process) MemoryMapsWithContext(ctx context.Context, grouped bool) (*[]MemoryMapsStat, error) { - pid := p.Pid - var ret []MemoryMapsStat - smapsPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "smaps") - if grouped { - ret = make([]MemoryMapsStat, 1) - // If smaps_rollup exists (require kernel >= 4.15), then we will use it - // for pre-summed memory information for a process. - smapsRollupPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "smaps_rollup") - if _, err := os.Stat(smapsRollupPath); !os.IsNotExist(err) { - smapsPath = smapsRollupPath - } - } - contents, err := os.ReadFile(smapsPath) - if err != nil { - return nil, err - } - lines := strings.Split(string(contents), "\n") - - // function of parsing a block - getBlock := func(firstLine []string, block []string) (MemoryMapsStat, error) { - m := MemoryMapsStat{} - if len(firstLine) >= 6 { - m.Path = strings.Join(firstLine[5:], " ") - } - - for _, line := range block { - if strings.Contains(line, "VmFlags") { - continue - } - field := strings.Split(line, ":") - if len(field) < 2 { - continue - } - v := strings.Trim(field[1], "kB") // remove last "kB" - v = strings.TrimSpace(v) - t, err := strconv.ParseUint(v, 10, 64) - if err != nil { - return m, err - } - - switch field[0] { - case "Size": - m.Size = t - case "Rss": - m.Rss = t - case "Pss": - m.Pss = t - case "Shared_Clean": - m.SharedClean = t - case "Shared_Dirty": - m.SharedDirty = t - case "Private_Clean": - m.PrivateClean = t - case "Private_Dirty": - m.PrivateDirty = t - case "Referenced": - m.Referenced = t - case "Anonymous": - m.Anonymous = t - case "Swap": - m.Swap = t - } - } - return m, nil - } - - var firstLine []string - blocks := make([]string, 0, 16) - - for i, line := range lines { - fields := strings.Fields(line) - if (len(fields) > 0 && !strings.HasSuffix(fields[0], ":")) || i == len(lines)-1 { - // new block section - if len(firstLine) > 0 && len(blocks) > 0 { - g, err := getBlock(firstLine, blocks) - if err != nil { - return &ret, err - } - if grouped { - ret[0].Size += g.Size - ret[0].Rss += g.Rss - ret[0].Pss += g.Pss - ret[0].SharedClean += g.SharedClean - ret[0].SharedDirty += g.SharedDirty - ret[0].PrivateClean += g.PrivateClean - ret[0].PrivateDirty += g.PrivateDirty - ret[0].Referenced += g.Referenced - ret[0].Anonymous += g.Anonymous - ret[0].Swap += g.Swap - } else { - ret = append(ret, g) - } - } - // starts new block - blocks = make([]string, 0, 16) - firstLine = fields - } else { - blocks = append(blocks, line) - } - } - - return &ret, nil -} - -func (p *Process) EnvironWithContext(ctx context.Context) ([]string, error) { - environPath := common.HostProcWithContext(ctx, strconv.Itoa(int(p.Pid)), "environ") - - environContent, err := os.ReadFile(environPath) - if err != nil { - return nil, err - } - - return strings.Split(string(environContent), "\000"), nil -} - -/** -** Internal functions -**/ - -func limitToUint(val string) (uint64, error) { - if val == "unlimited" { - return math.MaxUint64, nil - } - res, err := strconv.ParseUint(val, 10, 64) - if err != nil { - return 0, err - } - return res, nil -} - -// Get num_fds from /proc/(pid)/limits -func (p *Process) fillFromLimitsWithContext(ctx context.Context) ([]RlimitStat, error) { - pid := p.Pid - limitsFile := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "limits") - d, err := os.Open(limitsFile) - if err != nil { - return nil, err - } - defer d.Close() - - var limitStats []RlimitStat - - limitsScanner := bufio.NewScanner(d) - for limitsScanner.Scan() { - var statItem RlimitStat - - str := strings.Fields(limitsScanner.Text()) - - // Remove the header line - if strings.Contains(str[len(str)-1], "Units") { - continue - } - - // Assert that last item is a Hard limit - statItem.Hard, err = limitToUint(str[len(str)-1]) - if err != nil { - // On error remove last item and try once again since it can be unit or header line - str = str[:len(str)-1] - statItem.Hard, err = limitToUint(str[len(str)-1]) - if err != nil { - return nil, err - } - } - // Remove last item from string - str = str[:len(str)-1] - - // Now last item is a Soft limit - statItem.Soft, err = limitToUint(str[len(str)-1]) - if err != nil { - return nil, err - } - // Remove last item from string - str = str[:len(str)-1] - - // The rest is a stats name - resourceName := strings.Join(str, " ") - switch resourceName { - case "Max cpu time": - statItem.Resource = RLIMIT_CPU - case "Max file size": - statItem.Resource = RLIMIT_FSIZE - case "Max data size": - statItem.Resource = RLIMIT_DATA - case "Max stack size": - statItem.Resource = RLIMIT_STACK - case "Max core file size": - statItem.Resource = RLIMIT_CORE - case "Max resident set": - statItem.Resource = RLIMIT_RSS - case "Max processes": - statItem.Resource = RLIMIT_NPROC - case "Max open files": - statItem.Resource = RLIMIT_NOFILE - case "Max locked memory": - statItem.Resource = RLIMIT_MEMLOCK - case "Max address space": - statItem.Resource = RLIMIT_AS - case "Max file locks": - statItem.Resource = RLIMIT_LOCKS - case "Max pending signals": - statItem.Resource = RLIMIT_SIGPENDING - case "Max msgqueue size": - statItem.Resource = RLIMIT_MSGQUEUE - case "Max nice priority": - statItem.Resource = RLIMIT_NICE - case "Max realtime priority": - statItem.Resource = RLIMIT_RTPRIO - case "Max realtime timeout": - statItem.Resource = RLIMIT_RTTIME - default: - continue - } - - limitStats = append(limitStats, statItem) - } - - if err := limitsScanner.Err(); err != nil { - return nil, err - } - - return limitStats, nil -} - -// Get list of /proc/(pid)/fd files -func (p *Process) fillFromfdListWithContext(ctx context.Context) (string, []string, error) { - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "fd") - d, err := os.Open(statPath) - if err != nil { - return statPath, []string{}, err - } - defer d.Close() - fnames, err := d.Readdirnames(-1) - return statPath, fnames, err -} - -// Get num_fds from /proc/(pid)/fd -func (p *Process) fillFromfdWithContext(ctx context.Context) (int32, []*OpenFilesStat, error) { - statPath, fnames, err := p.fillFromfdListWithContext(ctx) - if err != nil { - return 0, nil, err - } - numFDs := int32(len(fnames)) - - var openfiles []*OpenFilesStat - for _, fd := range fnames { - fpath := filepath.Join(statPath, fd) - filepath, err := os.Readlink(fpath) - if err != nil { - continue - } - t, err := strconv.ParseUint(fd, 10, 64) - if err != nil { - return numFDs, openfiles, err - } - o := &OpenFilesStat{ - Path: filepath, - Fd: t, - } - openfiles = append(openfiles, o) - } - - return numFDs, openfiles, nil -} - -// Get cwd from /proc/(pid)/cwd -func (p *Process) fillFromCwdWithContext(ctx context.Context) (string, error) { - pid := p.Pid - cwdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "cwd") - cwd, err := os.Readlink(cwdPath) - if err != nil { - return "", err - } - return string(cwd), nil -} - -// Get exe from /proc/(pid)/exe -func (p *Process) fillFromExeWithContext(ctx context.Context) (string, error) { - pid := p.Pid - exePath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "exe") - exe, err := os.Readlink(exePath) - if err != nil { - return "", err - } - return string(exe), nil -} - -// Get cmdline from /proc/(pid)/cmdline -func (p *Process) fillFromCmdlineWithContext(ctx context.Context) (string, error) { - pid := p.Pid - cmdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "cmdline") - cmdline, err := os.ReadFile(cmdPath) - if err != nil { - return "", err - } - ret := strings.FieldsFunc(string(cmdline), func(r rune) bool { - return r == '\u0000' - }) - - return strings.Join(ret, " "), nil -} - -func (p *Process) fillSliceFromCmdlineWithContext(ctx context.Context) ([]string, error) { - pid := p.Pid - cmdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "cmdline") - cmdline, err := os.ReadFile(cmdPath) - if err != nil { - return nil, err - } - if len(cmdline) == 0 { - return nil, nil - } - - cmdline = bytes.TrimRight(cmdline, "\x00") - - parts := bytes.Split(cmdline, []byte{0}) - var strParts []string - for _, p := range parts { - strParts = append(strParts, string(p)) - } - - return strParts, nil -} - -// Get IO status from /proc/(pid)/io -func (p *Process) fillFromIOWithContext(ctx context.Context) (*IOCountersStat, error) { - pid := p.Pid - ioPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "io") - ioline, err := os.ReadFile(ioPath) - if err != nil { - return nil, err - } - lines := strings.Split(string(ioline), "\n") - ret := &IOCountersStat{} - - for _, line := range lines { - field := strings.Fields(line) - if len(field) < 2 { - continue - } - t, err := strconv.ParseUint(field[1], 10, 64) - if err != nil { - return nil, err - } - param := strings.TrimSuffix(field[0], ":") - switch param { - case "syscr": - ret.ReadCount = t - case "syscw": - ret.WriteCount = t - case "read_bytes": - ret.DiskReadBytes = t - case "write_bytes": - ret.DiskWriteBytes = t - case "rchar": - ret.ReadBytes = t - case "wchar": - ret.WriteBytes = t - } - } - - return ret, nil -} - -// Get memory info from /proc/(pid)/statm -func (p *Process) fillFromStatmWithContext(ctx context.Context) (*MemoryInfoStat, *MemoryInfoExStat, error) { - pid := p.Pid - memPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "statm") - contents, err := os.ReadFile(memPath) - if err != nil { - return nil, nil, err - } - fields := strings.Split(string(contents), " ") - - vms, err := strconv.ParseUint(fields[0], 10, 64) - if err != nil { - return nil, nil, err - } - rss, err := strconv.ParseUint(fields[1], 10, 64) - if err != nil { - return nil, nil, err - } - memInfo := &MemoryInfoStat{ - RSS: rss * pageSize, - VMS: vms * pageSize, - } - - shared, err := strconv.ParseUint(fields[2], 10, 64) - if err != nil { - return nil, nil, err - } - text, err := strconv.ParseUint(fields[3], 10, 64) - if err != nil { - return nil, nil, err - } - lib, err := strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, nil, err - } - dirty, err := strconv.ParseUint(fields[5], 10, 64) - if err != nil { - return nil, nil, err - } - - memInfoEx := &MemoryInfoExStat{ - RSS: rss * pageSize, - VMS: vms * pageSize, - Shared: shared * pageSize, - Text: text * pageSize, - Lib: lib * pageSize, - Dirty: dirty * pageSize, - } - - return memInfo, memInfoEx, nil -} - -// Get name from /proc/(pid)/comm or /proc/(pid)/status -func (p *Process) fillNameWithContext(ctx context.Context) error { - err := p.fillFromCommWithContext(ctx) - if err == nil && p.name != "" && len(p.name) < 15 { - return nil - } - return p.fillFromStatusWithContext(ctx) -} - -// Get name from /proc/(pid)/comm -func (p *Process) fillFromCommWithContext(ctx context.Context) error { - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "comm") - contents, err := os.ReadFile(statPath) - if err != nil { - return err - } - - p.name = strings.TrimSuffix(string(contents), "\n") - return nil -} - -// Get various status from /proc/(pid)/status -func (p *Process) fillFromStatus() error { - return p.fillFromStatusWithContext(context.Background()) -} - -func (p *Process) fillFromStatusWithContext(ctx context.Context) error { - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "status") - contents, err := os.ReadFile(statPath) - if err != nil { - return err - } - lines := strings.Split(string(contents), "\n") - p.numCtxSwitches = &NumCtxSwitchesStat{} - p.memInfo = &MemoryInfoStat{} - p.sigInfo = &SignalInfoStat{} - for _, line := range lines { - tabParts := strings.SplitN(line, "\t", 2) - if len(tabParts) < 2 { - continue - } - value := tabParts[1] - switch strings.TrimRight(tabParts[0], ":") { - case "Name": - p.name = strings.Trim(value, " \t") - if len(p.name) >= 15 { - cmdlineSlice, err := p.CmdlineSliceWithContext(ctx) - if err != nil { - return err - } - if len(cmdlineSlice) > 0 { - extendedName := filepath.Base(cmdlineSlice[0]) - if strings.HasPrefix(extendedName, p.name) { - p.name = extendedName - } - } - } - // Ensure we have a copy and not reference into slice - p.name = string([]byte(p.name)) - case "State": - p.status = convertStatusChar(value[0:1]) - // Ensure we have a copy and not reference into slice - p.status = string([]byte(p.status)) - case "PPid", "Ppid": - pval, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - p.parent = int32(pval) - case "Tgid": - pval, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - p.tgid = int32(pval) - case "Uid": - p.uids = make([]uint32, 0, 4) - for _, i := range strings.Split(value, "\t") { - v, err := strconv.ParseInt(i, 10, 32) - if err != nil { - return err - } - p.uids = append(p.uids, uint32(v)) - } - case "Gid": - p.gids = make([]uint32, 0, 4) - for _, i := range strings.Split(value, "\t") { - v, err := strconv.ParseInt(i, 10, 32) - if err != nil { - return err - } - p.gids = append(p.gids, uint32(v)) - } - case "Groups": - groups := strings.Fields(value) - p.groups = make([]uint32, 0, len(groups)) - for _, i := range groups { - v, err := strconv.ParseUint(i, 10, 32) - if err != nil { - return err - } - p.groups = append(p.groups, uint32(v)) - } - case "Threads": - v, err := strconv.ParseInt(value, 10, 32) - if err != nil { - return err - } - p.numThreads = int32(v) - case "voluntary_ctxt_switches": - v, err := strconv.ParseInt(value, 10, 64) - if err != nil { - return err - } - p.numCtxSwitches.Voluntary = v - case "nonvoluntary_ctxt_switches": - v, err := strconv.ParseInt(value, 10, 64) - if err != nil { - return err - } - p.numCtxSwitches.Involuntary = v - case "VmRSS": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.RSS = v * 1024 - case "VmSize": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.VMS = v * 1024 - case "VmSwap": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.Swap = v * 1024 - case "VmHWM": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.HWM = v * 1024 - case "VmData": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.Data = v * 1024 - case "VmStk": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.Stack = v * 1024 - case "VmLck": - value := strings.Trim(value, " kB") // remove last "kB" - v, err := strconv.ParseUint(value, 10, 64) - if err != nil { - return err - } - p.memInfo.Locked = v * 1024 - case "SigPnd": - if len(value) > 16 { - value = value[len(value)-16:] - } - v, err := strconv.ParseUint(value, 16, 64) - if err != nil { - return err - } - p.sigInfo.PendingThread = v - case "ShdPnd": - if len(value) > 16 { - value = value[len(value)-16:] - } - v, err := strconv.ParseUint(value, 16, 64) - if err != nil { - return err - } - p.sigInfo.PendingProcess = v - case "SigBlk": - if len(value) > 16 { - value = value[len(value)-16:] - } - v, err := strconv.ParseUint(value, 16, 64) - if err != nil { - return err - } - p.sigInfo.Blocked = v - case "SigIgn": - if len(value) > 16 { - value = value[len(value)-16:] - } - v, err := strconv.ParseUint(value, 16, 64) - if err != nil { - return err - } - p.sigInfo.Ignored = v - case "SigCgt": - if len(value) > 16 { - value = value[len(value)-16:] - } - v, err := strconv.ParseUint(value, 16, 64) - if err != nil { - return err - } - p.sigInfo.Caught = v - } - - } - return nil -} - -func (p *Process) fillFromTIDStat(tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) { - return p.fillFromTIDStatWithContext(context.Background(), tid) -} - -func (p *Process) fillFromTIDStatWithContext(ctx context.Context, tid int32) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) { - pid := p.Pid - var statPath string - - if tid == -1 { - statPath = common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "stat") - } else { - statPath = common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "task", strconv.Itoa(int(tid)), "stat") - } - - contents, err := os.ReadFile(statPath) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - // Indexing from one, as described in `man proc` about the file /proc/[pid]/stat - fields := splitProcStat(contents) - - terminal, err := strconv.ParseUint(fields[7], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - - ppid, err := strconv.ParseInt(fields[4], 10, 32) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - utime, err := strconv.ParseFloat(fields[14], 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - - stime, err := strconv.ParseFloat(fields[15], 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - - // There is no such thing as iotime in stat file. As an approximation, we - // will use delayacct_blkio_ticks (aggregated block I/O delays, as per Linux - // docs). Note: I am assuming at least Linux 2.6.18 - var iotime float64 - if len(fields) > 42 { - iotime, err = strconv.ParseFloat(fields[42], 64) - if err != nil { - iotime = 0 // Ancient linux version, most likely - } - } else { - iotime = 0 // e.g. SmartOS containers - } - - cpuTimes := &cpu.TimesStat{ - CPU: "cpu", - User: utime / float64(clockTicks), - System: stime / float64(clockTicks), - Iowait: iotime / float64(clockTicks), - } - - bootTime, _ := common.BootTimeWithContext(ctx, enableBootTimeCache) - t, err := strconv.ParseUint(fields[22], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - createTime := int64((t * 1000 / uint64(clockTicks)) + uint64(bootTime*1000)) - - rtpriority, err := strconv.ParseInt(fields[18], 10, 32) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - if rtpriority < 0 { - rtpriority = rtpriority*-1 - 1 - } else { - rtpriority = 0 - } - - // p.Nice = mustParseInt32(fields[18]) - // use syscall instead of parse Stat file - snice, _ := unix.Getpriority(prioProcess, int(pid)) - nice := int32(snice) // FIXME: is this true? - - minFault, err := strconv.ParseUint(fields[10], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - cMinFault, err := strconv.ParseUint(fields[11], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - majFault, err := strconv.ParseUint(fields[12], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - cMajFault, err := strconv.ParseUint(fields[13], 10, 64) - if err != nil { - return 0, 0, nil, 0, 0, 0, nil, err - } - - faults := &PageFaultsStat{ - MinorFaults: minFault, - MajorFaults: majFault, - ChildMinorFaults: cMinFault, - ChildMajorFaults: cMajFault, - } - - return terminal, int32(ppid), cpuTimes, createTime, uint32(rtpriority), nice, faults, nil -} - -func (p *Process) fillFromStatWithContext(ctx context.Context) (uint64, int32, *cpu.TimesStat, int64, uint32, int32, *PageFaultsStat, error) { - return p.fillFromTIDStatWithContext(ctx, -1) -} - -func pidsWithContext(ctx context.Context) ([]int32, error) { - return readPidsFromDir(common.HostProcWithContext(ctx)) -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - out := []*Process{} - - pids, err := PidsWithContext(ctx) - if err != nil { - return out, err - } - - for _, pid := range pids { - p, err := NewProcessWithContext(ctx, pid) - if err != nil { - continue - } - out = append(out, p) - } - - return out, nil -} - -func readPidsFromDir(path string) ([]int32, error) { - var ret []int32 - - d, err := os.Open(path) - if err != nil { - return nil, err - } - defer d.Close() - - fnames, err := d.Readdirnames(-1) - if err != nil { - return nil, err - } - for _, fname := range fnames { - pid, err := strconv.ParseInt(fname, 10, 32) - if err != nil { - // if not numeric name, just skip - continue - } - ret = append(ret, int32(pid)) - } - - return ret, nil -} - -func splitProcStat(content []byte) []string { - nameStart := bytes.IndexByte(content, '(') - nameEnd := bytes.LastIndexByte(content, ')') - restFields := strings.Fields(string(content[nameEnd+2:])) // +2 skip ') ' - name := content[nameStart+1 : nameEnd] - pid := strings.TrimSpace(string(content[:nameStart])) - fields := make([]string, 3, len(restFields)+3) - fields[1] = string(pid) - fields[2] = string(name) - fields = append(fields, restFields...) - return fields -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go deleted file mode 100644 index 5a6d361dbf..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd.go +++ /dev/null @@ -1,397 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd - -package process - -import ( - "bytes" - "context" - "encoding/binary" - "errors" - "io" - "path/filepath" - "sort" - "strconv" - "strings" - "unsafe" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/mem" - "github.com/shirou/gopsutil/v4/net" -) - -func pidsWithContext(ctx context.Context) ([]int32, error) { - var ret []int32 - procs, err := ProcessesWithContext(ctx) - if err != nil { - return ret, nil - } - - for _, p := range procs { - ret = append(ret, p.Pid) - } - - return ret, nil -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - - return k.Ppid, nil -} - -func (p *Process) NameWithContext(ctx context.Context) (string, error) { - k, err := p.getKProc() - if err != nil { - return "", err - } - name := common.IntToString(k.Comm[:]) - - if len(name) >= 15 { - cmdlineSlice, err := p.CmdlineSliceWithContext(ctx) - if err != nil { - return "", err - } - if len(cmdlineSlice) > 0 { - extendedName := filepath.Base(cmdlineSlice[0]) - if strings.HasPrefix(extendedName, p.name) { - name = extendedName - } - } - } - - return name, nil -} - -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - mib := []int32{CTLKern, KernProcCwd, p.Pid} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return "", err - } - return common.ByteToString(buf), nil -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { - mib := []int32{CTLKern, KernProcArgs, p.Pid, KernProcArgv} - buf, _, err := common.CallSyscall(mib) - if err != nil { - return nil, err - } - - /* From man sysctl(2): - The buffer pointed to by oldp is filled with an array of char - pointers followed by the strings themselves. The last char - pointer is a NULL pointer. */ - var strParts []string - r := bytes.NewReader(buf) - baseAddr := uintptr(unsafe.Pointer(&buf[0])) - for { - argvp, err := readPtr(r) - if err != nil { - return nil, err - } - if argvp == 0 { // check for a NULL pointer - break - } - offset := argvp - baseAddr - length := uintptr(bytes.IndexByte(buf[offset:], 0)) - str := string(buf[offset : offset+length]) - strParts = append(strParts, str) - } - - return strParts, nil -} - -// readPtr reads a pointer data from a given reader. WARNING: only little -// endian architectures are supported. -func readPtr(r io.Reader) (uintptr, error) { - switch sizeofPtr { - case 4: - var p uint32 - if err := binary.Read(r, binary.LittleEndian, &p); err != nil { - return 0, err - } - return uintptr(p), nil - case 8: - var p uint64 - if err := binary.Read(r, binary.LittleEndian, &p); err != nil { - return 0, err - } - return uintptr(p), nil - default: - return 0, errors.New("unsupported pointer size") - } -} - -func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) { - argv, err := p.CmdlineSliceWithContext(ctx) - if err != nil { - return "", err - } - return strings.Join(argv, " "), nil -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - k, err := p.getKProc() - if err != nil { - return []string{""}, err - } - var s string - switch k.Stat { - case SIDL: - case SRUN: - case SONPROC: - s = Running - case SSLEEP: - s = Sleep - case SSTOP: - s = Stop - case SDEAD: - s = Zombie - } - - return []string{s}, nil -} - -func (p *Process) ForegroundWithContext(ctx context.Context) (bool, error) { - // see https://github.com/shirou/gopsutil/issues/596#issuecomment-432707831 for implementation details - pid := p.Pid - out, err := invoke.CommandWithContext(ctx, "ps", "-o", "stat=", "-p", strconv.Itoa(int(pid))) - if err != nil { - return false, err - } - return strings.IndexByte(string(out), '+') != -1, nil -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - uids := make([]uint32, 0, 3) - - uids = append(uids, uint32(k.Ruid), uint32(k.Uid), uint32(k.Svuid)) - - return uids, nil -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - gids := make([]uint32, 0, 3) - gids = append(gids, uint32(k.Rgid), uint32(k.Ngroups), uint32(k.Svgid)) - - return gids, nil -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - - groups := make([]uint32, k.Ngroups) - for i := int16(0); i < k.Ngroups; i++ { - groups[i] = uint32(k.Groups[i]) - } - - return groups, nil -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - k, err := p.getKProc() - if err != nil { - return "", err - } - - ttyNr := uint64(k.Tdev) - - termmap, err := getTerminalMap() - if err != nil { - return "", err - } - - return termmap[ttyNr], nil -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - k, err := p.getKProc() - if err != nil { - return 0, err - } - return int32(k.Nice), nil -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - return &IOCountersStat{ - ReadCount: uint64(k.Uru_inblock), - WriteCount: uint64(k.Uru_oublock), - }, nil -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - /* not supported, just return 1 */ - return 1, nil -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - return &cpu.TimesStat{ - CPU: "cpu", - User: float64(k.Uutime_sec) + float64(k.Uutime_usec)/1000000, - System: float64(k.Ustime_sec) + float64(k.Ustime_usec)/1000000, - }, nil -} - -func (p *Process) MemoryInfoWithContext(ctx context.Context) (*MemoryInfoStat, error) { - k, err := p.getKProc() - if err != nil { - return nil, err - } - pageSize, err := mem.GetPageSizeWithContext(ctx) - if err != nil { - return nil, err - } - - return &MemoryInfoStat{ - RSS: uint64(k.Vm_rssize) * pageSize, - VMS: uint64(k.Vm_tsize) + uint64(k.Vm_dsize) + - uint64(k.Vm_ssize), - }, nil -} - -func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { - procs, err := ProcessesWithContext(ctx) - if err != nil { - return nil, nil - } - ret := make([]*Process, 0, len(procs)) - for _, proc := range procs { - ppid, err := proc.PpidWithContext(ctx) - if err != nil { - continue - } - if ppid == p.Pid { - ret = append(ret, proc) - } - } - sort.Slice(ret, func(i, j int) bool { return ret[i].Pid < ret[j].Pid }) - return ret, nil -} - -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - results := []*Process{} - - buf, length, err := callKernProcSyscall(KernProcAll, 0) - if err != nil { - return results, err - } - - // get kinfo_proc size - count := int(length / uint64(sizeOfKinfoProc)) - - // parse buf to procs - for i := 0; i < count; i++ { - b := buf[i*sizeOfKinfoProc : (i+1)*sizeOfKinfoProc] - k, err := parseKinfoProc(b) - if err != nil { - continue - } - p, err := NewProcessWithContext(ctx, int32(k.Pid)) - if err != nil { - continue - } - - results = append(results, p) - } - - return results, nil -} - -func (p *Process) getKProc() (*KinfoProc, error) { - buf, length, err := callKernProcSyscall(KernProcPID, p.Pid) - if err != nil { - return nil, err - } - if length != sizeOfKinfoProc { - return nil, errors.New("unexpected size of KinfoProc") - } - - k, err := parseKinfoProc(buf) - if err != nil { - return nil, err - } - return &k, nil -} - -func callKernProcSyscall(op int32, arg int32) ([]byte, uint64, error) { - mib := []int32{CTLKern, KernProc, op, arg, sizeOfKinfoProc, 0} - mibptr := unsafe.Pointer(&mib[0]) - miblen := uint64(len(mib)) - length := uint64(0) - _, _, err := unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - 0, - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return nil, length, err - } - - count := int32(length / uint64(sizeOfKinfoProc)) - mib = []int32{CTLKern, KernProc, op, arg, sizeOfKinfoProc, count} - mibptr = unsafe.Pointer(&mib[0]) - miblen = uint64(len(mib)) - // get proc info itself - buf := make([]byte, length) - _, _, err = unix.Syscall6( - unix.SYS___SYSCTL, - uintptr(mibptr), - uintptr(miblen), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&length)), - 0, - 0) - if err != 0 { - return buf, length, err - } - - return buf, length, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_386.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_386.go deleted file mode 100644 index 5b84706a7c..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_386.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && 386 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs process/types_openbsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 66 - KernProcAll = 0 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 55 - KernProcCwd = 78 - KernProcArgv = 1 - KernProcEnv = 3 -) - -const ( - ArgMax = 256 * 1024 -) - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x38 - sizeOfKinfoProc = 0x264 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SDEAD = 6 - SONPROC = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 -} - -type Timeval struct { - Sec int64 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type KinfoProc struct { - Forw uint64 - Back uint64 - Paddr uint64 - Addr uint64 - Fd uint64 - Stats uint64 - Limit uint64 - Vmspace uint64 - Sigacts uint64 - Sess uint64 - Tsess uint64 - Ru uint64 - Eflag int32 - Exitsig int32 - Flag int32 - Pid int32 - Ppid int32 - Sid int32 - X_pgid int32 - Tpgid int32 - Uid uint32 - Ruid uint32 - Gid uint32 - Rgid uint32 - Groups [16]uint32 - Ngroups int16 - Jobc int16 - Tdev uint32 - Estcpu uint32 - Rtime_sec uint32 - Rtime_usec uint32 - Cpticks int32 - Pctcpu uint32 - Swtime uint32 - Slptime uint32 - Schedflags int32 - Uticks uint64 - Sticks uint64 - Iticks uint64 - Tracep uint64 - Traceflag int32 - Holdcnt int32 - Siglist int32 - Sigmask uint32 - Sigignore uint32 - Sigcatch uint32 - Stat int8 - Priority uint8 - Usrpri uint8 - Nice uint8 - Xstat uint16 - Acflag uint16 - Comm [24]int8 - Wmesg [8]int8 - Wchan uint64 - Login [32]int8 - Vm_rssize int32 - Vm_tsize int32 - Vm_dsize int32 - Vm_ssize int32 - Uvalid int64 - Ustart_sec uint64 - Ustart_usec uint32 - Uutime_sec uint32 - Uutime_usec uint32 - Ustime_sec uint32 - Ustime_usec uint32 - Uru_maxrss uint64 - Uru_ixrss uint64 - Uru_idrss uint64 - Uru_isrss uint64 - Uru_minflt uint64 - Uru_majflt uint64 - Uru_nswap uint64 - Uru_inblock uint64 - Uru_oublock uint64 - Uru_msgsnd uint64 - Uru_msgrcv uint64 - Uru_nsignals uint64 - Uru_nvcsw uint64 - Uru_nivcsw uint64 - Uctime_sec uint32 - Uctime_usec uint32 - Psflags int32 - Spare int32 - Svuid uint32 - Svgid uint32 - Emul [8]int8 - Rlim_rss_cur uint64 - Cpuid uint64 - Vm_map_size uint64 - Tid int32 - Rtableid uint32 -} - -type Priority struct{} - -type KinfoVmentry struct { - Start uint32 - End uint32 - Guard uint32 - Fspace uint32 - Fspace_augment uint32 - Offset uint64 - Wired_count int32 - Etype int32 - Protection int32 - Max_protection int32 - Advice int32 - Inheritance int32 - Flags uint8 - Pad_cgo_0 [3]byte -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_amd64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_amd64.go deleted file mode 100644 index 3229bb32c2..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_amd64.go +++ /dev/null @@ -1,202 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -// Created by cgo -godefs - DO NOT EDIT -// cgo -godefs types_openbsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 66 - KernProcAll = 0 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 55 - KernProcCwd = 78 - KernProcArgv = 1 - KernProcEnv = 3 -) - -const ( - ArgMax = 256 * 1024 -) - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x50 - sizeOfKinfoProc = 0x268 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SDEAD = 6 - SONPROC = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type KinfoProc struct { - Forw uint64 - Back uint64 - Paddr uint64 - Addr uint64 - Fd uint64 - Stats uint64 - Limit uint64 - Vmspace uint64 - Sigacts uint64 - Sess uint64 - Tsess uint64 - Ru uint64 - Eflag int32 - Exitsig int32 - Flag int32 - Pid int32 - Ppid int32 - Sid int32 - X_pgid int32 - Tpgid int32 - Uid uint32 - Ruid uint32 - Gid uint32 - Rgid uint32 - Groups [16]uint32 - Ngroups int16 - Jobc int16 - Tdev uint32 - Estcpu uint32 - Rtime_sec uint32 - Rtime_usec uint32 - Cpticks int32 - Pctcpu uint32 - Swtime uint32 - Slptime uint32 - Schedflags int32 - Uticks uint64 - Sticks uint64 - Iticks uint64 - Tracep uint64 - Traceflag int32 - Holdcnt int32 - Siglist int32 - Sigmask uint32 - Sigignore uint32 - Sigcatch uint32 - Stat int8 - Priority uint8 - Usrpri uint8 - Nice uint8 - Xstat uint16 - Acflag uint16 - Comm [24]int8 - Wmesg [8]int8 - Wchan uint64 - Login [32]int8 - Vm_rssize int32 - Vm_tsize int32 - Vm_dsize int32 - Vm_ssize int32 - Uvalid int64 - Ustart_sec uint64 - Ustart_usec uint32 - Uutime_sec uint32 - Uutime_usec uint32 - Ustime_sec uint32 - Ustime_usec uint32 - Pad_cgo_0 [4]byte - Uru_maxrss uint64 - Uru_ixrss uint64 - Uru_idrss uint64 - Uru_isrss uint64 - Uru_minflt uint64 - Uru_majflt uint64 - Uru_nswap uint64 - Uru_inblock uint64 - Uru_oublock uint64 - Uru_msgsnd uint64 - Uru_msgrcv uint64 - Uru_nsignals uint64 - Uru_nvcsw uint64 - Uru_nivcsw uint64 - Uctime_sec uint32 - Uctime_usec uint32 - Psflags int32 - Spare int32 - Svuid uint32 - Svgid uint32 - Emul [8]int8 - Rlim_rss_cur uint64 - Cpuid uint64 - Vm_map_size uint64 - Tid int32 - Rtableid uint32 -} - -type Priority struct{} - -type KinfoVmentry struct { - Start uint64 - End uint64 - Guard uint64 - Fspace uint64 - Fspace_augment uint64 - Offset uint64 - Wired_count int32 - Etype int32 - Protection int32 - Max_protection int32 - Advice int32 - Inheritance int32 - Flags uint8 - Pad_cgo_0 [7]byte -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm.go deleted file mode 100644 index 6f74ce7563..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && arm - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs process/types_openbsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 66 - KernProcAll = 0 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 55 - KernProcCwd = 78 - KernProcArgv = 1 - KernProcEnv = 3 -) - -const ( - ArgMax = 256 * 1024 -) - -const ( - sizeofPtr = 0x4 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x4 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x38 - sizeOfKinfoProc = 0x264 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SDEAD = 6 - SONPROC = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int32 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int32 -} - -type Timeval struct { - Sec int64 - Usec int32 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int32 - Ixrss int32 - Idrss int32 - Isrss int32 - Minflt int32 - Majflt int32 - Nswap int32 - Inblock int32 - Oublock int32 - Msgsnd int32 - Msgrcv int32 - Nsignals int32 - Nvcsw int32 - Nivcsw int32 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type KinfoProc struct { - Forw uint64 - Back uint64 - Paddr uint64 - Addr uint64 - Fd uint64 - Stats uint64 - Limit uint64 - Vmspace uint64 - Sigacts uint64 - Sess uint64 - Tsess uint64 - Ru uint64 - Eflag int32 - Exitsig int32 - Flag int32 - Pid int32 - Ppid int32 - Sid int32 - X_pgid int32 - Tpgid int32 - Uid uint32 - Ruid uint32 - Gid uint32 - Rgid uint32 - Groups [16]uint32 - Ngroups int16 - Jobc int16 - Tdev uint32 - Estcpu uint32 - Rtime_sec uint32 - Rtime_usec uint32 - Cpticks int32 - Pctcpu uint32 - Swtime uint32 - Slptime uint32 - Schedflags int32 - Uticks uint64 - Sticks uint64 - Iticks uint64 - Tracep uint64 - Traceflag int32 - Holdcnt int32 - Siglist int32 - Sigmask uint32 - Sigignore uint32 - Sigcatch uint32 - Stat int8 - Priority uint8 - Usrpri uint8 - Nice uint8 - Xstat uint16 - Acflag uint16 - Comm [24]int8 - Wmesg [8]int8 - Wchan uint64 - Login [32]int8 - Vm_rssize int32 - Vm_tsize int32 - Vm_dsize int32 - Vm_ssize int32 - Uvalid int64 - Ustart_sec uint64 - Ustart_usec uint32 - Uutime_sec uint32 - Uutime_usec uint32 - Ustime_sec uint32 - Ustime_usec uint32 - Uru_maxrss uint64 - Uru_ixrss uint64 - Uru_idrss uint64 - Uru_isrss uint64 - Uru_minflt uint64 - Uru_majflt uint64 - Uru_nswap uint64 - Uru_inblock uint64 - Uru_oublock uint64 - Uru_msgsnd uint64 - Uru_msgrcv uint64 - Uru_nsignals uint64 - Uru_nvcsw uint64 - Uru_nivcsw uint64 - Uctime_sec uint32 - Uctime_usec uint32 - Psflags int32 - Spare int32 - Svuid uint32 - Svgid uint32 - Emul [8]int8 - Rlim_rss_cur uint64 - Cpuid uint64 - Vm_map_size uint64 - Tid int32 - Rtableid uint32 -} - -type Priority struct{} - -type KinfoVmentry struct { - Start uint32 - End uint32 - Guard uint32 - Fspace uint32 - Fspace_augment uint32 - Offset uint64 - Wired_count int32 - Etype int32 - Protection int32 - Max_protection int32 - Advice int32 - Inheritance int32 - Flags uint8 - Pad_cgo_0 [3]byte -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm64.go deleted file mode 100644 index 9104545625..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_arm64.go +++ /dev/null @@ -1,204 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && arm64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs process/types_openbsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 66 - KernProcAll = 0 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 55 - KernProcCwd = 78 - KernProcArgv = 1 - KernProcEnv = 3 -) - -const ( - ArgMax = 256 * 1024 -) - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x50 - sizeOfKinfoProc = 0x270 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SDEAD = 6 - SONPROC = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type KinfoProc struct { - Forw uint64 - Back uint64 - Paddr uint64 - Addr uint64 - Fd uint64 - Stats uint64 - Limit uint64 - Vmspace uint64 - Sigacts uint64 - Sess uint64 - Tsess uint64 - Ru uint64 - Eflag int32 - Exitsig int32 - Flag int32 - Pid int32 - Ppid int32 - Sid int32 - X_pgid int32 - Tpgid int32 - Uid uint32 - Ruid uint32 - Gid uint32 - Rgid uint32 - Groups [16]uint32 - Ngroups int16 - Jobc int16 - Tdev uint32 - Estcpu uint32 - Rtime_sec uint32 - Rtime_usec uint32 - Cpticks int32 - Pctcpu uint32 - Swtime uint32 - Slptime uint32 - Schedflags int32 - Uticks uint64 - Sticks uint64 - Iticks uint64 - Tracep uint64 - Traceflag int32 - Holdcnt int32 - Siglist int32 - Sigmask uint32 - Sigignore uint32 - Sigcatch uint32 - Stat int8 - Priority uint8 - Usrpri uint8 - Nice uint8 - Xstat uint16 - Acflag uint16 - Comm [24]int8 - Wmesg [8]uint8 - Wchan uint64 - Login [32]uint8 - Vm_rssize int32 - Vm_tsize int32 - Vm_dsize int32 - Vm_ssize int32 - Uvalid int64 - Ustart_sec uint64 - Ustart_usec uint32 - Uutime_sec uint32 - Uutime_usec uint32 - Ustime_sec uint32 - Ustime_usec uint32 - Uru_maxrss uint64 - Uru_ixrss uint64 - Uru_idrss uint64 - Uru_isrss uint64 - Uru_minflt uint64 - Uru_majflt uint64 - Uru_nswap uint64 - Uru_inblock uint64 - Uru_oublock uint64 - Uru_msgsnd uint64 - Uru_msgrcv uint64 - Uru_nsignals uint64 - Uru_nvcsw uint64 - Uru_nivcsw uint64 - Uctime_sec uint32 - Uctime_usec uint32 - Psflags uint32 - Spare int32 - Svuid uint32 - Svgid uint32 - Emul [8]uint8 - Rlim_rss_cur uint64 - Cpuid uint64 - Vm_map_size uint64 - Tid int32 - Rtableid uint32 - Pledge uint64 -} - -type Priority struct{} - -type KinfoVmentry struct { - Start uint64 - End uint64 - Guard uint64 - Fspace uint64 - Fspace_augment uint64 - Offset uint64 - Wired_count int32 - Etype int32 - Protection int32 - Max_protection int32 - Advice int32 - Inheritance int32 - Flags uint8 - Pad_cgo_0 [7]byte -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_riscv64.go b/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_riscv64.go deleted file mode 100644 index e3e0d36a09..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_openbsd_riscv64.go +++ /dev/null @@ -1,205 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build openbsd && riscv64 - -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs process/types_openbsd.go - -package process - -const ( - CTLKern = 1 - KernProc = 66 - KernProcAll = 0 - KernProcPID = 1 - KernProcProc = 8 - KernProcPathname = 12 - KernProcArgs = 55 - KernProcCwd = 78 - KernProcArgv = 1 - KernProcEnv = 3 -) - -const ( - ArgMax = 256 * 1024 -) - -const ( - sizeofPtr = 0x8 - sizeofShort = 0x2 - sizeofInt = 0x4 - sizeofLong = 0x8 - sizeofLongLong = 0x8 -) - -const ( - sizeOfKinfoVmentry = 0x50 - sizeOfKinfoProc = 0x288 -) - -const ( - SIDL = 1 - SRUN = 2 - SSLEEP = 3 - SSTOP = 4 - SZOMB = 5 - SDEAD = 6 - SONPROC = 7 -) - -type ( - _C_short int16 - _C_int int32 - _C_long int64 - _C_long_long int64 -) - -type Timespec struct { - Sec int64 - Nsec int64 -} - -type Timeval struct { - Sec int64 - Usec int64 -} - -type Rusage struct { - Utime Timeval - Stime Timeval - Maxrss int64 - Ixrss int64 - Idrss int64 - Isrss int64 - Minflt int64 - Majflt int64 - Nswap int64 - Inblock int64 - Oublock int64 - Msgsnd int64 - Msgrcv int64 - Nsignals int64 - Nvcsw int64 - Nivcsw int64 -} - -type Rlimit struct { - Cur uint64 - Max uint64 -} - -type KinfoProc struct { - Forw uint64 - Back uint64 - Paddr uint64 - Addr uint64 - Fd uint64 - Stats uint64 - Limit uint64 - Vmspace uint64 - Sigacts uint64 - Sess uint64 - Tsess uint64 - Ru uint64 - Eflag int32 - Exitsig int32 - Flag int32 - Pid int32 - Ppid int32 - Sid int32 - X_pgid int32 - Tpgid int32 - Uid uint32 - Ruid uint32 - Gid uint32 - Rgid uint32 - Groups [16]uint32 - Ngroups int16 - Jobc int16 - Tdev uint32 - Estcpu uint32 - Rtime_sec uint32 - Rtime_usec uint32 - Cpticks int32 - Pctcpu uint32 - Swtime uint32 - Slptime uint32 - Schedflags int32 - Uticks uint64 - Sticks uint64 - Iticks uint64 - Tracep uint64 - Traceflag int32 - Holdcnt int32 - Siglist int32 - Sigmask uint32 - Sigignore uint32 - Sigcatch uint32 - Stat int8 - Priority uint8 - Usrpri uint8 - Nice uint8 - Xstat uint16 - Spare uint16 - Comm [24]int8 - Wmesg [8]uint8 - Wchan uint64 - Login [32]uint8 - Vm_rssize int32 - Vm_tsize int32 - Vm_dsize int32 - Vm_ssize int32 - Uvalid int64 - Ustart_sec uint64 - Ustart_usec uint32 - Uutime_sec uint32 - Uutime_usec uint32 - Ustime_sec uint32 - Ustime_usec uint32 - Uru_maxrss uint64 - Uru_ixrss uint64 - Uru_idrss uint64 - Uru_isrss uint64 - Uru_minflt uint64 - Uru_majflt uint64 - Uru_nswap uint64 - Uru_inblock uint64 - Uru_oublock uint64 - Uru_msgsnd uint64 - Uru_msgrcv uint64 - Uru_nsignals uint64 - Uru_nvcsw uint64 - Uru_nivcsw uint64 - Uctime_sec uint32 - Uctime_usec uint32 - Psflags uint32 - Acflag uint32 - Svuid uint32 - Svgid uint32 - Emul [8]uint8 - Rlim_rss_cur uint64 - Cpuid uint64 - Vm_map_size uint64 - Tid int32 - Rtableid uint32 - Pledge uint64 - Name [24]uint8 -} - -type Priority struct{} - -type KinfoVmentry struct { - Start uint64 - End uint64 - Guard uint64 - Fspace uint64 - Fspace_augment uint64 - Offset uint64 - Wired_count int32 - Etype int32 - Protection int32 - Max_protection int32 - Advice int32 - Inheritance int32 - Flags uint8 - Pad_cgo_0 [7]byte -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go b/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go deleted file mode 100644 index 7f68771823..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_plan9.go +++ /dev/null @@ -1,203 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build plan9 - -package process - -import ( - "context" - "syscall" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -type Signal = syscall.Note - -type MemoryMapsStat struct { - Path string `json:"path"` - Rss uint64 `json:"rss"` - Size uint64 `json:"size"` - Pss uint64 `json:"pss"` - SharedClean uint64 `json:"sharedClean"` - SharedDirty uint64 `json:"sharedDirty"` - PrivateClean uint64 `json:"privateClean"` - PrivateDirty uint64 `json:"privateDirty"` - Referenced uint64 `json:"referenced"` - Anonymous uint64 `json:"anonymous"` - Swap uint64 `json:"swap"` -} - -type MemoryInfoExStat struct{} - -func pidsWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func ProcessesWithContext(_ context.Context) ([]*Process, error) { - return nil, common.ErrNotImplementedError -} - -func PidExistsWithContext(_ context.Context, _ int32) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) NameWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) CmdlineSliceWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - return []string{""}, common.ErrNotImplementedError -} - -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) SendSignalWithContext(_ context.Context, _ Signal) error { - return common.ErrNotImplementedError -} - -func (p *Process) SuspendWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) ResumeWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) TerminateWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) KillWithContext(_ context.Context) error { - return common.ErrNotImplementedError -} - -func (p *Process) UsernameWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go b/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go deleted file mode 100644 index 12d5fe2555..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_posix.go +++ /dev/null @@ -1,187 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build linux || freebsd || openbsd || darwin || solaris - -package process - -import ( - "context" - "errors" - "fmt" - "os" - "os/user" - "path/filepath" - "strconv" - "strings" - "syscall" - - "golang.org/x/sys/unix" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -type Signal = syscall.Signal - -// POSIX -func getTerminalMap() (map[uint64]string, error) { - ret := make(map[uint64]string) - var termfiles []string - - d, err := os.Open("/dev") - if err != nil { - return nil, err - } - defer d.Close() - - devnames, err := d.Readdirnames(-1) - if err != nil { - return nil, err - } - for _, devname := range devnames { - if strings.HasPrefix(devname, "/dev/tty") { - termfiles = append(termfiles, "/dev/tty/"+devname) - } - } - - var ptsnames []string - ptsd, err := os.Open("/dev/pts") - if err != nil { - ptsnames, _ = filepath.Glob("/dev/ttyp*") - if ptsnames == nil { - return nil, err - } - } - defer ptsd.Close() - - if ptsnames == nil { - defer ptsd.Close() - ptsnames, err = ptsd.Readdirnames(-1) - if err != nil { - return nil, err - } - for _, ptsname := range ptsnames { - termfiles = append(termfiles, "/dev/pts/"+ptsname) - } - } else { - termfiles = ptsnames - } - - for _, name := range termfiles { - stat := unix.Stat_t{} - if err = unix.Stat(name, &stat); err != nil { - return nil, err - } - rdev := uint64(stat.Rdev) - ret[rdev] = strings.ReplaceAll(name, "/dev", "") - } - return ret, nil -} - -// isMount is a port of python's os.path.ismount() -// https://github.com/python/cpython/blob/08ff4369afca84587b1c82034af4e9f64caddbf2/Lib/posixpath.py#L186-L216 -// https://docs.python.org/3/library/os.path.html#os.path.ismount -func isMount(path string) bool { - // Check symlinkness with os.Lstat; unix.DT_LNK is not portable - fileInfo, err := os.Lstat(path) - if err != nil { - return false - } - if fileInfo.Mode()&os.ModeSymlink != 0 { - return false - } - var stat1 unix.Stat_t - if err := unix.Lstat(path, &stat1); err != nil { - return false - } - parent := filepath.Join(path, "..") - var stat2 unix.Stat_t - if err := unix.Lstat(parent, &stat2); err != nil { - return false - } - return stat1.Dev != stat2.Dev || stat1.Ino == stat2.Ino -} - -func PidExistsWithContext(ctx context.Context, pid int32) (bool, error) { - if pid <= 0 { - return false, fmt.Errorf("invalid pid %v", pid) - } - proc, err := os.FindProcess(int(pid)) - if err != nil { - return false, err - } - defer proc.Release() - - if isMount(common.HostProcWithContext(ctx)) { // if //proc exists and is mounted, check if //proc/ folder exists - _, err := os.Stat(common.HostProcWithContext(ctx, strconv.Itoa(int(pid)))) - if os.IsNotExist(err) { - return false, nil - } - return err == nil, err - } - - // procfs does not exist or is not mounted, check PID existence by signalling the pid - err = proc.Signal(syscall.Signal(0)) - if err == nil { - return true, nil - } - if errors.Is(err, os.ErrProcessDone) { - return false, nil - } - var errno syscall.Errno - if !errors.As(err, &errno) { - return false, err - } - switch errno { - case syscall.ESRCH: - return false, nil - case syscall.EPERM: - return true, nil - } - - return false, err -} - -func (p *Process) SendSignalWithContext(_ context.Context, sig syscall.Signal) error { - process, err := os.FindProcess(int(p.Pid)) - if err != nil { - return err - } - defer process.Release() - - err = process.Signal(sig) - if err != nil { - return err - } - - return nil -} - -func (p *Process) SuspendWithContext(ctx context.Context) error { - return p.SendSignalWithContext(ctx, unix.SIGSTOP) -} - -func (p *Process) ResumeWithContext(ctx context.Context) error { - return p.SendSignalWithContext(ctx, unix.SIGCONT) -} - -func (p *Process) TerminateWithContext(ctx context.Context) error { - return p.SendSignalWithContext(ctx, unix.SIGTERM) -} - -func (p *Process) KillWithContext(ctx context.Context) error { - return p.SendSignalWithContext(ctx, unix.SIGKILL) -} - -func (p *Process) UsernameWithContext(ctx context.Context) (string, error) { - uids, err := p.UidsWithContext(ctx) - if err != nil { - return "", err - } - if len(uids) > 0 { - u, err := user.LookupId(strconv.Itoa(int(uids[0]))) - if err != nil { - return "", err - } - return u.Username, nil - } - return "", nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go b/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go deleted file mode 100644 index 6af5633e06..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_solaris.go +++ /dev/null @@ -1,301 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -package process - -import ( - "bytes" - "context" - "os" - "strconv" - "strings" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -type MemoryMapsStat struct { - Path string `json:"path"` - Rss uint64 `json:"rss"` - Size uint64 `json:"size"` - Pss uint64 `json:"pss"` - SharedClean uint64 `json:"sharedClean"` - SharedDirty uint64 `json:"sharedDirty"` - PrivateClean uint64 `json:"privateClean"` - PrivateDirty uint64 `json:"privateDirty"` - Referenced uint64 `json:"referenced"` - Anonymous uint64 `json:"anonymous"` - Swap uint64 `json:"swap"` -} - -type MemoryInfoExStat struct{} - -func pidsWithContext(ctx context.Context) ([]int32, error) { - return readPidsFromDir(common.HostProcWithContext(ctx)) -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - out := []*Process{} - - pids, err := PidsWithContext(ctx) - if err != nil { - return out, err - } - - for _, pid := range pids { - p, err := NewProcessWithContext(ctx, pid) - if err != nil { - continue - } - out = append(out, p) - } - - return out, nil -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) NameWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ExeWithContext(ctx context.Context) (string, error) { - exe, err := p.fillFromPathAOutWithContext(ctx) - if os.IsNotExist(err) { - exe, err = p.fillFromExecnameWithContext(ctx) - } - return exe, err -} - -func (p *Process) CmdlineWithContext(ctx context.Context) (string, error) { - return p.fillFromCmdlineWithContext(ctx) -} - -func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) { - return p.fillSliceFromCmdlineWithContext(ctx) -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) CwdWithContext(ctx context.Context) (string, error) { - return p.fillFromPathCwdWithContext(ctx) -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - return []string{""}, common.ErrNotImplementedError -} - -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) NumFDsWithContext(ctx context.Context) (int32, error) { - _, fnames, err := p.fillFromfdListWithContext(ctx) - return int32(len(fnames)), err -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ChildrenWithContext(_ context.Context) ([]*Process, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) OpenFilesWithContext(_ context.Context) ([]OpenFilesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsWithContext(_ context.Context) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) EnvironWithContext(_ context.Context) ([]string, error) { - return nil, common.ErrNotImplementedError -} - -/** -** Internal functions -**/ - -func (p *Process) fillFromfdListWithContext(ctx context.Context) (string, []string, error) { - pid := p.Pid - statPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "fd") - d, err := os.Open(statPath) - if err != nil { - return statPath, []string{}, err - } - defer d.Close() - fnames, err := d.Readdirnames(-1) - return statPath, fnames, err -} - -func (p *Process) fillFromPathCwdWithContext(ctx context.Context) (string, error) { - pid := p.Pid - cwdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "path", "cwd") - cwd, err := os.Readlink(cwdPath) - if err != nil { - return "", err - } - return cwd, nil -} - -func (p *Process) fillFromPathAOutWithContext(ctx context.Context) (string, error) { - pid := p.Pid - cwdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "path", "a.out") - exe, err := os.Readlink(cwdPath) - if err != nil { - return "", err - } - return exe, nil -} - -func (p *Process) fillFromExecnameWithContext(ctx context.Context) (string, error) { - pid := p.Pid - execNamePath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "execname") - exe, err := os.ReadFile(execNamePath) - if err != nil { - return "", err - } - return string(exe), nil -} - -func (p *Process) fillFromCmdlineWithContext(ctx context.Context) (string, error) { - pid := p.Pid - cmdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "cmdline") - cmdline, err := os.ReadFile(cmdPath) - if err != nil { - return "", err - } - ret := strings.FieldsFunc(string(cmdline), func(r rune) bool { - return r == '\u0000' - }) - - return strings.Join(ret, " "), nil -} - -func (p *Process) fillSliceFromCmdlineWithContext(ctx context.Context) ([]string, error) { - pid := p.Pid - cmdPath := common.HostProcWithContext(ctx, strconv.Itoa(int(pid)), "cmdline") - cmdline, err := os.ReadFile(cmdPath) - if err != nil { - return nil, err - } - if len(cmdline) == 0 { - return nil, nil - } - if cmdline[len(cmdline)-1] == 0 { - cmdline = cmdline[:len(cmdline)-1] - } - parts := bytes.Split(cmdline, []byte{0}) - var strParts []string - for _, p := range parts { - strParts = append(strParts, string(p)) - } - - return strParts, nil -} - -func readPidsFromDir(path string) ([]int32, error) { - var ret []int32 - - d, err := os.Open(path) - if err != nil { - return nil, err - } - defer d.Close() - - fnames, err := d.Readdirnames(-1) - if err != nil { - return nil, err - } - for _, fname := range fnames { - pid, err := strconv.ParseInt(fname, 10, 32) - if err != nil { - // if not numeric name, just skip - continue - } - ret = append(ret, int32(pid)) - } - - return ret, nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go b/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go deleted file mode 100644 index c6069a58ed..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows.go +++ /dev/null @@ -1,1210 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build windows - -package process - -import ( - "bufio" - "context" - "errors" - "fmt" - "io" - "os" - "path/filepath" - "reflect" - "syscall" - "time" - "unicode/utf16" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/cpu" - "github.com/shirou/gopsutil/v4/internal/common" - "github.com/shirou/gopsutil/v4/net" -) - -type Signal = syscall.Signal - -var ( - modntdll = windows.NewLazySystemDLL("ntdll.dll") - procNtResumeProcess = modntdll.NewProc("NtResumeProcess") - procNtSuspendProcess = modntdll.NewProc("NtSuspendProcess") - - modpsapi = windows.NewLazySystemDLL("psapi.dll") - procGetProcessMemoryInfo = modpsapi.NewProc("GetProcessMemoryInfo") - procGetProcessImageFileNameW = modpsapi.NewProc("GetProcessImageFileNameW") - - advapi32 = windows.NewLazySystemDLL("advapi32.dll") - procLookupPrivilegeValue = advapi32.NewProc("LookupPrivilegeValueW") - procAdjustTokenPrivileges = advapi32.NewProc("AdjustTokenPrivileges") - - procQueryFullProcessImageNameW = common.Modkernel32.NewProc("QueryFullProcessImageNameW") - procGetPriorityClass = common.Modkernel32.NewProc("GetPriorityClass") - procGetProcessIoCounters = common.Modkernel32.NewProc("GetProcessIoCounters") - procGetNativeSystemInfo = common.Modkernel32.NewProc("GetNativeSystemInfo") - procGetProcessHandleCount = common.Modkernel32.NewProc("GetProcessHandleCount") - - processorArchitecture uint -) - -const processQueryInformation = windows.PROCESS_QUERY_LIMITED_INFORMATION - -type systemProcessorInformation struct { - ProcessorArchitecture uint16 - ProcessorLevel uint16 - ProcessorRevision uint16 - Reserved uint16 - ProcessorFeatureBits uint16 -} - -type systemInfo struct { - wProcessorArchitecture uint16 - wReserved uint16 - dwpageSize uint32 - lpMinimumApplicationAddress uintptr - lpMaximumApplicationAddress uintptr - dwActiveProcessorMask uintptr - dwNumberOfProcessors uint32 - dwProcessorType uint32 - dwAllocationGranularity uint32 - wProcessorLevel uint16 - wProcessorRevision uint16 -} - -// Memory_info_ex is different between OSes -type MemoryInfoExStat struct{} - -type MemoryMapsStat struct{} - -// ioCounters is an equivalent representation of IO_COUNTERS in the Windows API. -// https://docs.microsoft.com/windows/win32/api/winnt/ns-winnt-io_counters -type ioCounters struct { - ReadOperationCount uint64 - WriteOperationCount uint64 - OtherOperationCount uint64 - ReadTransferCount uint64 - WriteTransferCount uint64 - OtherTransferCount uint64 -} - -type processBasicInformation32 struct { - Reserved1 uint32 - PebBaseAddress uint32 - Reserved2 uint32 - Reserved3 uint32 - UniqueProcessId uint32 - Reserved4 uint32 -} - -type processBasicInformation64 struct { - Reserved1 uint64 - PebBaseAddress uint64 - Reserved2 uint64 - Reserved3 uint64 - UniqueProcessId uint64 - Reserved4 uint64 -} - -type processEnvironmentBlock32 struct { - Reserved1 [2]uint8 - BeingDebugged uint8 - Reserved2 uint8 - Reserved3 [2]uint32 - Ldr uint32 - ProcessParameters uint32 - // More fields which we don't use so far -} - -type processEnvironmentBlock64 struct { - Reserved1 [2]uint8 - BeingDebugged uint8 - Reserved2 uint8 - _ [4]uint8 // padding, since we are 64 bit, the next pointer is 64 bit aligned (when compiling for 32 bit, this is not the case without manual padding) - Reserved3 [2]uint64 - Ldr uint64 - ProcessParameters uint64 - // More fields which we don't use so far -} - -type rtlUserProcessParameters32 struct { - Reserved1 [16]uint8 - ConsoleHandle uint32 - ConsoleFlags uint32 - StdInputHandle uint32 - StdOutputHandle uint32 - StdErrorHandle uint32 - CurrentDirectoryPathNameLength uint16 - _ uint16 // Max Length - CurrentDirectoryPathAddress uint32 - CurrentDirectoryHandle uint32 - DllPathNameLength uint16 - _ uint16 // Max Length - DllPathAddress uint32 - ImagePathNameLength uint16 - _ uint16 // Max Length - ImagePathAddress uint32 - CommandLineLength uint16 - _ uint16 // Max Length - CommandLineAddress uint32 - EnvironmentAddress uint32 - // More fields which we don't use so far -} - -type rtlUserProcessParameters64 struct { - Reserved1 [16]uint8 - ConsoleHandle uint64 - ConsoleFlags uint64 - StdInputHandle uint64 - StdOutputHandle uint64 - StdErrorHandle uint64 - CurrentDirectoryPathNameLength uint16 - _ uint16 // Max Length - _ uint32 // Padding - CurrentDirectoryPathAddress uint64 - CurrentDirectoryHandle uint64 - DllPathNameLength uint16 - _ uint16 // Max Length - _ uint32 // Padding - DllPathAddress uint64 - ImagePathNameLength uint16 - _ uint16 // Max Length - _ uint32 // Padding - ImagePathAddress uint64 - CommandLineLength uint16 - _ uint16 // Max Length - _ uint32 // Padding - CommandLineAddress uint64 - EnvironmentAddress uint64 - // More fields which we don't use so far -} - -type winLUID struct { - LowPart winDWord - HighPart winLong -} - -// LUID_AND_ATTRIBUTES -type winLUIDAndAttributes struct { - Luid winLUID - Attributes winDWord -} - -// TOKEN_PRIVILEGES -type winTokenPrivileges struct { - PrivilegeCount winDWord - Privileges [1]winLUIDAndAttributes -} - -type ( - winLong int32 - winDWord uint32 -) - -func init() { - var systemInfo systemInfo - - procGetNativeSystemInfo.Call(uintptr(unsafe.Pointer(&systemInfo))) - processorArchitecture = uint(systemInfo.wProcessorArchitecture) - - // enable SeDebugPrivilege https://github.com/midstar/proci/blob/6ec79f57b90ba3d9efa2a7b16ef9c9369d4be875/proci_windows.go#L80-L119 - handle, err := syscall.GetCurrentProcess() - if err != nil { - return - } - - var token syscall.Token - err = syscall.OpenProcessToken(handle, 0x0028, &token) - if err != nil { - return - } - defer token.Close() - - tokenPrivileges := winTokenPrivileges{PrivilegeCount: 1} - lpName := syscall.StringToUTF16("SeDebugPrivilege") - ret, _, _ := procLookupPrivilegeValue.Call( - 0, - uintptr(unsafe.Pointer(&lpName[0])), - uintptr(unsafe.Pointer(&tokenPrivileges.Privileges[0].Luid))) - if ret == 0 { - return - } - - tokenPrivileges.Privileges[0].Attributes = 0x00000002 // SE_PRIVILEGE_ENABLED - - procAdjustTokenPrivileges.Call( - uintptr(token), - 0, - uintptr(unsafe.Pointer(&tokenPrivileges)), - uintptr(unsafe.Sizeof(tokenPrivileges)), - 0, - 0) -} - -func pidsWithContext(_ context.Context) ([]int32, error) { - // inspired by https://gist.github.com/henkman/3083408 - // and https://github.com/giampaolo/psutil/blob/1c3a15f637521ba5c0031283da39c733fda53e4c/psutil/arch/windows/process_info.c#L315-L329 - var ret []int32 - var read uint32 - var psSize uint32 = 1024 - const dwordSize uint32 = 4 - - for { - ps := make([]uint32, psSize) - if err := windows.EnumProcesses(ps, &read); err != nil { - return nil, err - } - if uint32(len(ps)) == read/dwordSize { // ps buffer was too small to host every results, retry with a bigger one - psSize += 1024 - continue - } - for _, pid := range ps[:read/dwordSize] { - ret = append(ret, int32(pid)) - } - return ret, nil - - } -} - -func PidExistsWithContext(ctx context.Context, pid int32) (bool, error) { - if pid == 0 { // special case for pid 0 System Idle Process - return true, nil - } - if pid < 0 { - return false, fmt.Errorf("invalid pid %v", pid) - } - if pid%4 != 0 { - // OpenProcess will succeed even on non-existing pid here https://devblogs.microsoft.com/oldnewthing/20080606-00/?p=22043 - // so we list every pid just to be sure and be future-proof - pids, err := PidsWithContext(ctx) - if err != nil { - return false, err - } - for _, i := range pids { - if i == pid { - return true, err - } - } - return false, err - } - h, err := windows.OpenProcess(windows.SYNCHRONIZE, false, uint32(pid)) - if errors.Is(err, windows.ERROR_ACCESS_DENIED) { - return true, nil - } - if errors.Is(err, windows.ERROR_INVALID_PARAMETER) { - return false, nil - } - if err != nil { - return false, err - } - defer windows.CloseHandle(h) - event, err := windows.WaitForSingleObject(h, 0) - return event == uint32(windows.WAIT_TIMEOUT), err -} - -func (p *Process) PpidWithContext(_ context.Context) (int32, error) { - // if cached already, return from cache - cachedPpid := p.getPpid() - if cachedPpid != 0 { - return cachedPpid, nil - } - - ppid, _, _, err := getFromSnapProcess(p.Pid) - if err != nil { - return 0, err - } - - // no errors and not cached already, so cache it - p.setPpid(ppid) - - return ppid, nil -} - -func (p *Process) NameWithContext(ctx context.Context) (string, error) { - if p.Pid == 0 { - return "System Idle Process", nil - } - if p.Pid == 4 { - return "System", nil - } - - exe, err := p.ExeWithContext(ctx) - if err != nil { - return "", fmt.Errorf("could not get Name: %w", err) - } - - return filepath.Base(exe), nil -} - -func (p *Process) TgidWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) ExeWithContext(_ context.Context) (string, error) { - c, err := windows.OpenProcess(processQueryInformation, false, uint32(p.Pid)) - if err != nil { - return "", err - } - defer windows.CloseHandle(c) - buf := make([]uint16, syscall.MAX_LONG_PATH) - size := uint32(syscall.MAX_LONG_PATH) - if err := procQueryFullProcessImageNameW.Find(); err == nil { // Vista+ - ret, _, err := procQueryFullProcessImageNameW.Call( - uintptr(c), - uintptr(0), - uintptr(unsafe.Pointer(&buf[0])), - uintptr(unsafe.Pointer(&size))) - if ret == 0 { - return "", err - } - return windows.UTF16ToString(buf), nil - } - // XP fallback - ret, _, err := procGetProcessImageFileNameW.Call(uintptr(c), uintptr(unsafe.Pointer(&buf[0])), uintptr(size)) - if ret == 0 { - return "", err - } - return common.ConvertDOSPath(windows.UTF16ToString(buf)), nil -} - -func (p *Process) CmdlineWithContext(_ context.Context) (string, error) { - cmdline, err := getProcessCommandLine(p.Pid) - if err != nil { - return "", fmt.Errorf("could not get CommandLine: %w", err) - } - return cmdline, nil -} - -func (p *Process) CmdlineSliceWithContext(ctx context.Context) ([]string, error) { - cmdline, err := p.CmdlineWithContext(ctx) - if err != nil { - return nil, err - } - return parseCmdline(cmdline) -} - -func parseCmdline(cmdline string) ([]string, error) { - cmdlineptr, err := windows.UTF16PtrFromString(cmdline) - if err != nil { - return nil, err - } - - var argc int32 - argvptr, err := windows.CommandLineToArgv(cmdlineptr, &argc) - if err != nil { - return nil, err - } - defer windows.LocalFree(windows.Handle(uintptr(unsafe.Pointer(argvptr)))) - - argv := make([]string, argc) - for i, v := range (*argvptr)[:argc] { - argv[i] = windows.UTF16ToString((*v)[:]) - } - return argv, nil -} - -func (p *Process) createTimeWithContext(_ context.Context) (int64, error) { - ru, err := getRusage(p.Pid) - if err != nil { - return 0, fmt.Errorf("could not get CreationDate: %w", err) - } - - return ru.CreationTime.Nanoseconds() / 1000000, nil -} - -func (p *Process) CwdWithContext(_ context.Context) (string, error) { - h, err := windows.OpenProcess(processQueryInformation|windows.PROCESS_VM_READ, false, uint32(p.Pid)) - if errors.Is(err, windows.ERROR_ACCESS_DENIED) || errors.Is(err, windows.ERROR_INVALID_PARAMETER) { - return "", nil - } - if err != nil { - return "", err - } - defer syscall.CloseHandle(syscall.Handle(h)) - - procIs32Bits := is32BitProcess(h) - - if procIs32Bits { - userProcParams, err := getUserProcessParams32(h) - if err != nil { - return "", err - } - if userProcParams.CurrentDirectoryPathNameLength > 0 { - cwd := readProcessMemory(syscall.Handle(h), procIs32Bits, uint64(userProcParams.CurrentDirectoryPathAddress), uint(userProcParams.CurrentDirectoryPathNameLength)) - if len(cwd) != int(userProcParams.CurrentDirectoryPathNameLength) { - return "", errors.New("cannot read current working directory") - } - - return convertUTF16ToString(cwd), nil - } - } else { - userProcParams, err := getUserProcessParams64(h) - if err != nil { - return "", err - } - if userProcParams.CurrentDirectoryPathNameLength > 0 { - cwd := readProcessMemory(syscall.Handle(h), procIs32Bits, userProcParams.CurrentDirectoryPathAddress, uint(userProcParams.CurrentDirectoryPathNameLength)) - if len(cwd) != int(userProcParams.CurrentDirectoryPathNameLength) { - return "", errors.New("cannot read current working directory") - } - - return convertUTF16ToString(cwd), nil - } - } - - // if we reach here, we have no cwd - return "", nil -} - -func (p *Process) StatusWithContext(_ context.Context) ([]string, error) { - return []string{""}, common.ErrNotImplementedError -} - -func (p *Process) ForegroundWithContext(_ context.Context) (bool, error) { - return false, common.ErrNotImplementedError -} - -func (p *Process) UsernameWithContext(_ context.Context) (string, error) { - pid := p.Pid - c, err := windows.OpenProcess(processQueryInformation, false, uint32(pid)) - if err != nil { - return "", err - } - defer windows.CloseHandle(c) - - var token syscall.Token - err = syscall.OpenProcessToken(syscall.Handle(c), syscall.TOKEN_QUERY, &token) - if err != nil { - return "", err - } - defer token.Close() - tokenUser, err := token.GetTokenUser() - if err != nil { - return "", err - } - - user, domain, _, err := tokenUser.User.Sid.LookupAccount("") - return domain + "\\" + user, err -} - -func (p *Process) UidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GidsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) GroupsWithContext(_ context.Context) ([]uint32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TerminalWithContext(_ context.Context) (string, error) { - return "", common.ErrNotImplementedError -} - -// priorityClasses maps a win32 priority class to its WMI equivalent Win32_Process.Priority -// https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getpriorityclass -// https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-process -var priorityClasses = map[int]int32{ - 0x00008000: 10, // ABOVE_NORMAL_PRIORITY_CLASS - 0x00004000: 6, // BELOW_NORMAL_PRIORITY_CLASS - 0x00000080: 13, // HIGH_PRIORITY_CLASS - 0x00000040: 4, // IDLE_PRIORITY_CLASS - 0x00000020: 8, // NORMAL_PRIORITY_CLASS - 0x00000100: 24, // REALTIME_PRIORITY_CLASS -} - -func (p *Process) NiceWithContext(_ context.Context) (int32, error) { - c, err := windows.OpenProcess(processQueryInformation, false, uint32(p.Pid)) - if err != nil { - return 0, err - } - defer windows.CloseHandle(c) - ret, _, err := procGetPriorityClass.Call(uintptr(c)) - if ret == 0 { - return 0, err - } - priority, ok := priorityClasses[int(ret)] - if !ok { - return 0, fmt.Errorf("unknown priority class %v", ret) - } - return priority, nil -} - -func (p *Process) IOniceWithContext(_ context.Context) (int32, error) { - return 0, common.ErrNotImplementedError -} - -func (p *Process) RlimitWithContext(_ context.Context) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) RlimitUsageWithContext(_ context.Context, _ bool) ([]RlimitStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) IOCountersWithContext(_ context.Context) (*IOCountersStat, error) { - c, err := windows.OpenProcess(processQueryInformation, false, uint32(p.Pid)) - if err != nil { - return nil, err - } - defer windows.CloseHandle(c) - var ioCounters ioCounters - ret, _, err := procGetProcessIoCounters.Call(uintptr(c), uintptr(unsafe.Pointer(&ioCounters))) - if ret == 0 { - return nil, err - } - stats := &IOCountersStat{ - ReadCount: ioCounters.ReadOperationCount, - ReadBytes: ioCounters.ReadTransferCount, - WriteCount: ioCounters.WriteOperationCount, - WriteBytes: ioCounters.WriteTransferCount, - } - - return stats, nil -} - -func (p *Process) NumCtxSwitchesWithContext(_ context.Context) (*NumCtxSwitchesStat, error) { - return nil, common.ErrNotImplementedError -} - -// NumFDsWithContext returns the number of handles for a process on Windows, -// not the number of file descriptors (FDs). -func (p *Process) NumFDsWithContext(_ context.Context) (int32, error) { - handle, err := windows.OpenProcess(processQueryInformation, false, uint32(p.Pid)) - if err != nil { - return 0, err - } - defer windows.CloseHandle(handle) - - var handleCount uint32 - ret, _, err := procGetProcessHandleCount.Call(uintptr(handle), uintptr(unsafe.Pointer(&handleCount))) - if ret == 0 { - return 0, err - } - return int32(handleCount), nil -} - -func (p *Process) NumThreadsWithContext(_ context.Context) (int32, error) { - ppid, ret, _, err := getFromSnapProcess(p.Pid) - if err != nil { - return 0, err - } - - // if no errors and not cached already, cache ppid - p.parent = ppid - if 0 == p.getPpid() { - p.setPpid(ppid) - } - - return ret, nil -} - -func (p *Process) ThreadsWithContext(_ context.Context) (map[int32]*cpu.TimesStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) TimesWithContext(_ context.Context) (*cpu.TimesStat, error) { - sysTimes, err := getProcessCPUTimes(p.Pid) - if err != nil { - return nil, err - } - - // User and kernel times are represented as a FILETIME structure - // which contains a 64-bit value representing the number of - // 100-nanosecond intervals since January 1, 1601 (UTC): - // http://msdn.microsoft.com/en-us/library/ms724284(VS.85).aspx - // To convert it into a float representing the seconds that the - // process has executed in user/kernel mode I borrowed the code - // below from psutil's _psutil_windows.c, and in turn from Python's - // Modules/posixmodule.c - - user := float64(sysTimes.UserTime.HighDateTime)*429.4967296 + float64(sysTimes.UserTime.LowDateTime)*1e-7 - kernel := float64(sysTimes.KernelTime.HighDateTime)*429.4967296 + float64(sysTimes.KernelTime.LowDateTime)*1e-7 - - return &cpu.TimesStat{ - User: user, - System: kernel, - }, nil -} - -func (p *Process) CPUAffinityWithContext(_ context.Context) ([]int32, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryInfoWithContext(_ context.Context) (*MemoryInfoStat, error) { - mem, err := getMemoryInfo(p.Pid) - if err != nil { - return nil, err - } - - ret := &MemoryInfoStat{ - RSS: uint64(mem.WorkingSetSize), - VMS: uint64(mem.PagefileUsage), - } - - return ret, nil -} - -func (p *Process) MemoryInfoExWithContext(_ context.Context) (*MemoryInfoExStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) PageFaultsWithContext(_ context.Context) (*PageFaultsStat, error) { - mem, err := getMemoryInfo(p.Pid) - if err != nil { - return nil, err - } - - ret := &PageFaultsStat{ - // Since Windows does not distinguish between Major and Minor faults, all faults are treated as Major - MajorFaults: uint64(mem.PageFaultCount), - } - - return ret, nil -} - -func (p *Process) ChildrenWithContext(ctx context.Context) ([]*Process, error) { - out := []*Process{} - snap, err := windows.CreateToolhelp32Snapshot(windows.TH32CS_SNAPPROCESS, uint32(0)) - if err != nil { - return out, err - } - defer windows.CloseHandle(snap) - var pe32 windows.ProcessEntry32 - pe32.Size = uint32(unsafe.Sizeof(pe32)) - if err := windows.Process32First(snap, &pe32); err != nil { - return out, err - } - for { - if pe32.ParentProcessID == uint32(p.Pid) { - p, err := NewProcessWithContext(ctx, int32(pe32.ProcessID)) - if err == nil { - out = append(out, p) - } - } - if err = windows.Process32Next(snap, &pe32); err != nil { - break - } - } - return out, nil -} - -func (p *Process) OpenFilesWithContext(ctx context.Context) ([]OpenFilesStat, error) { - files := make([]OpenFilesStat, 0) - fileExists := make(map[string]bool) - - process, err := windows.OpenProcess(common.ProcessQueryInformation, false, uint32(p.Pid)) - if err != nil { - return nil, err - } - - buffer := make([]byte, 1024) - var size uint32 - - st := common.CallWithExpandingBuffer( - func() common.NtStatus { - return common.NtQuerySystemInformation( - common.SystemExtendedHandleInformationClass, - &buffer[0], - uint32(len(buffer)), - &size, - ) - }, - &buffer, - &size, - ) - if st.IsError() { - return nil, st.Error() - } - - handlesList := (*common.SystemExtendedHandleInformation)(unsafe.Pointer(&buffer[0])) - handles := make([]common.SystemExtendedHandleTableEntryInformation, int(handlesList.NumberOfHandles)) - hdr := (*reflect.SliceHeader)(unsafe.Pointer(&handles)) - hdr.Data = uintptr(unsafe.Pointer(&handlesList.Handles[0])) - - currentProcess, err := windows.GetCurrentProcess() - if err != nil { - return nil, err - } - - for _, handle := range handles { - var file uintptr - if int32(handle.UniqueProcessId) != p.Pid { - continue - } - if windows.DuplicateHandle(process, windows.Handle(handle.HandleValue), currentProcess, (*windows.Handle)(&file), - 0, true, windows.DUPLICATE_SAME_ACCESS) != nil { - continue - } - // release the new handle - defer windows.CloseHandle(windows.Handle(file)) - - fileType, err := windows.GetFileType(windows.Handle(file)) - if err != nil || fileType != windows.FILE_TYPE_DISK { - continue - } - - var fileName string - ch := make(chan struct{}) - - go func() { - var buf [syscall.MAX_LONG_PATH]uint16 - n, err := windows.GetFinalPathNameByHandle(windows.Handle(file), &buf[0], syscall.MAX_LONG_PATH, 0) - if err != nil { - return - } - - fileName = string(utf16.Decode(buf[:n])) - ch <- struct{}{} - }() - - select { - case <-time.NewTimer(100 * time.Millisecond).C: - continue - case <-ch: - fileInfo, err := os.Stat(fileName) - if err != nil || fileInfo.IsDir() { - continue - } - - if _, exists := fileExists[fileName]; !exists { - files = append(files, OpenFilesStat{ - Path: fileName, - Fd: uint64(file), - }) - fileExists[fileName] = true - } - case <-ctx.Done(): - return files, ctx.Err() - } - } - - return files, nil -} - -func (p *Process) ConnectionsWithContext(ctx context.Context) ([]net.ConnectionStat, error) { - return net.ConnectionsPidWithContext(ctx, "all", p.Pid) -} - -func (p *Process) ConnectionsMaxWithContext(_ context.Context, _ int) ([]net.ConnectionStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) MemoryMapsWithContext(_ context.Context, _ bool) (*[]MemoryMapsStat, error) { - return nil, common.ErrNotImplementedError -} - -func (p *Process) SendSignalWithContext(_ context.Context, _ syscall.Signal) error { - return common.ErrNotImplementedError -} - -func (p *Process) SuspendWithContext(_ context.Context) error { - c, err := windows.OpenProcess(windows.PROCESS_SUSPEND_RESUME, false, uint32(p.Pid)) - if err != nil { - return err - } - defer windows.CloseHandle(c) - - r1, _, _ := procNtSuspendProcess.Call(uintptr(c)) - if r1 != 0 { - // See https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55 - return fmt.Errorf("NtStatus='0x%.8X'", r1) - } - - return nil -} - -func (p *Process) ResumeWithContext(_ context.Context) error { - c, err := windows.OpenProcess(windows.PROCESS_SUSPEND_RESUME, false, uint32(p.Pid)) - if err != nil { - return err - } - defer windows.CloseHandle(c) - - r1, _, _ := procNtResumeProcess.Call(uintptr(c)) - if r1 != 0 { - // See https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55 - return fmt.Errorf("NtStatus='0x%.8X'", r1) - } - - return nil -} - -func (p *Process) TerminateWithContext(_ context.Context) error { - proc, err := windows.OpenProcess(windows.PROCESS_TERMINATE, false, uint32(p.Pid)) - if err != nil { - return err - } - err = windows.TerminateProcess(proc, 0) - windows.CloseHandle(proc) - return err -} - -func (p *Process) KillWithContext(_ context.Context) error { - process, err := os.FindProcess(int(p.Pid)) - if err != nil { - return err - } - defer process.Release() - return process.Kill() -} - -func (p *Process) EnvironWithContext(ctx context.Context) ([]string, error) { - envVars, err := getProcessEnvironmentVariables(ctx, p.Pid) - if err != nil { - return nil, fmt.Errorf("could not get environment variables: %w", err) - } - return envVars, nil -} - -// retrieve Ppid in a thread-safe manner -func (p *Process) getPpid() int32 { - p.parentMutex.RLock() - defer p.parentMutex.RUnlock() - return p.parent -} - -// cache Ppid in a thread-safe manner (WINDOWS ONLY) -// see https://psutil.readthedocs.io/en/latest/#psutil.Process.ppid -func (p *Process) setPpid(ppid int32) { - p.parentMutex.Lock() - defer p.parentMutex.Unlock() - p.parent = ppid -} - -func getFromSnapProcess(pid int32) (int32, int32, string, error) { //nolint:unparam //FIXME - snap, err := windows.CreateToolhelp32Snapshot(windows.TH32CS_SNAPPROCESS, uint32(pid)) - if err != nil { - return 0, 0, "", err - } - defer windows.CloseHandle(snap) - var pe32 windows.ProcessEntry32 - pe32.Size = uint32(unsafe.Sizeof(pe32)) - if err = windows.Process32First(snap, &pe32); err != nil { - return 0, 0, "", err - } - for { - if pe32.ProcessID == uint32(pid) { - szexe := windows.UTF16ToString(pe32.ExeFile[:]) - return int32(pe32.ParentProcessID), int32(pe32.Threads), szexe, nil - } - if err = windows.Process32Next(snap, &pe32); err != nil { - break - } - } - return 0, 0, "", fmt.Errorf("couldn't find pid: %d", pid) -} - -func ProcessesWithContext(ctx context.Context) ([]*Process, error) { - out := []*Process{} - - pids, err := PidsWithContext(ctx) - if err != nil { - return out, fmt.Errorf("could not get Processes %w", err) - } - - for _, pid := range pids { - p, err := NewProcessWithContext(ctx, pid) - if err != nil { - continue - } - out = append(out, p) - } - - return out, nil -} - -func getRusage(pid int32) (*windows.Rusage, error) { - var CPU windows.Rusage - - c, err := windows.OpenProcess(processQueryInformation, false, uint32(pid)) - if err != nil { - return nil, err - } - defer windows.CloseHandle(c) - - if err := windows.GetProcessTimes(c, &CPU.CreationTime, &CPU.ExitTime, &CPU.KernelTime, &CPU.UserTime); err != nil { - return nil, err - } - - return &CPU, nil -} - -func getMemoryInfo(pid int32) (PROCESS_MEMORY_COUNTERS, error) { - var mem PROCESS_MEMORY_COUNTERS - c, err := windows.OpenProcess(processQueryInformation, false, uint32(pid)) - if err != nil { - return mem, err - } - defer windows.CloseHandle(c) - if err := getProcessMemoryInfo(c, &mem); err != nil { - return mem, err - } - - return mem, err -} - -func getProcessMemoryInfo(h windows.Handle, mem *PROCESS_MEMORY_COUNTERS) (err error) { - r1, _, e1 := syscall.Syscall(procGetProcessMemoryInfo.Addr(), 3, uintptr(h), uintptr(unsafe.Pointer(mem)), uintptr(unsafe.Sizeof(*mem))) - if r1 == 0 { - if e1 != 0 { - err = error(e1) - } else { - err = syscall.EINVAL - } - } - return -} - -type SYSTEM_TIMES struct { //nolint:revive //FIXME - CreateTime syscall.Filetime - ExitTime syscall.Filetime - KernelTime syscall.Filetime - UserTime syscall.Filetime -} - -func getProcessCPUTimes(pid int32) (SYSTEM_TIMES, error) { - var times SYSTEM_TIMES - - h, err := windows.OpenProcess(processQueryInformation, false, uint32(pid)) - if err != nil { - return times, err - } - defer windows.CloseHandle(h) - - err = syscall.GetProcessTimes( - syscall.Handle(h), - ×.CreateTime, - ×.ExitTime, - ×.KernelTime, - ×.UserTime, - ) - - return times, err -} - -func getUserProcessParams32(handle windows.Handle) (rtlUserProcessParameters32, error) { - pebAddress, err := queryPebAddress(syscall.Handle(handle), true) - if err != nil { - return rtlUserProcessParameters32{}, fmt.Errorf("cannot locate process PEB: %w", err) - } - - buf := readProcessMemory(syscall.Handle(handle), true, pebAddress, uint(unsafe.Sizeof(processEnvironmentBlock32{}))) - if len(buf) != int(unsafe.Sizeof(processEnvironmentBlock32{})) { - return rtlUserProcessParameters32{}, errors.New("cannot read process PEB") - } - peb := (*processEnvironmentBlock32)(unsafe.Pointer(&buf[0])) - userProcessAddress := uint64(peb.ProcessParameters) - buf = readProcessMemory(syscall.Handle(handle), true, userProcessAddress, uint(unsafe.Sizeof(rtlUserProcessParameters32{}))) - if len(buf) != int(unsafe.Sizeof(rtlUserProcessParameters32{})) { - return rtlUserProcessParameters32{}, errors.New("cannot read user process parameters") - } - return *(*rtlUserProcessParameters32)(unsafe.Pointer(&buf[0])), nil -} - -func getUserProcessParams64(handle windows.Handle) (rtlUserProcessParameters64, error) { - pebAddress, err := queryPebAddress(syscall.Handle(handle), false) - if err != nil { - return rtlUserProcessParameters64{}, fmt.Errorf("cannot locate process PEB: %w", err) - } - - buf := readProcessMemory(syscall.Handle(handle), false, pebAddress, uint(unsafe.Sizeof(processEnvironmentBlock64{}))) - if len(buf) != int(unsafe.Sizeof(processEnvironmentBlock64{})) { - return rtlUserProcessParameters64{}, errors.New("cannot read process PEB") - } - peb := (*processEnvironmentBlock64)(unsafe.Pointer(&buf[0])) - userProcessAddress := peb.ProcessParameters - buf = readProcessMemory(syscall.Handle(handle), false, userProcessAddress, uint(unsafe.Sizeof(rtlUserProcessParameters64{}))) - if len(buf) != int(unsafe.Sizeof(rtlUserProcessParameters64{})) { - return rtlUserProcessParameters64{}, errors.New("cannot read user process parameters") - } - return *(*rtlUserProcessParameters64)(unsafe.Pointer(&buf[0])), nil -} - -func is32BitProcess(h windows.Handle) bool { - const ( - PROCESSOR_ARCHITECTURE_INTEL = 0 - PROCESSOR_ARCHITECTURE_ARM = 5 - PROCESSOR_ARCHITECTURE_ARM64 = 12 - PROCESSOR_ARCHITECTURE_IA64 = 6 - PROCESSOR_ARCHITECTURE_AMD64 = 9 - ) - - var procIs32Bits bool - switch processorArchitecture { - case PROCESSOR_ARCHITECTURE_INTEL, PROCESSOR_ARCHITECTURE_ARM: - procIs32Bits = true - case PROCESSOR_ARCHITECTURE_ARM64, PROCESSOR_ARCHITECTURE_IA64, PROCESSOR_ARCHITECTURE_AMD64: - var wow64 uint - - ret, _, _ := common.ProcNtQueryInformationProcess.Call( - uintptr(h), - uintptr(common.ProcessWow64Information), - uintptr(unsafe.Pointer(&wow64)), - uintptr(unsafe.Sizeof(wow64)), - uintptr(0), - ) - if int(ret) >= 0 { - if wow64 != 0 { - procIs32Bits = true - } - } else { - // if the OS does not support the call, we fallback into the bitness of the app - if unsafe.Sizeof(wow64) == 4 { - procIs32Bits = true - } - } - - default: - // for other unknown platforms, we rely on process platform - if unsafe.Sizeof(processorArchitecture) == 8 { - procIs32Bits = false - } else { - procIs32Bits = true - } - } - return procIs32Bits -} - -func getProcessEnvironmentVariables(ctx context.Context, pid int32) ([]string, error) { - h, err := windows.OpenProcess(processQueryInformation|windows.PROCESS_VM_READ, false, uint32(pid)) - if errors.Is(err, windows.ERROR_ACCESS_DENIED) || errors.Is(err, windows.ERROR_INVALID_PARAMETER) { - return nil, nil - } - if err != nil { - return nil, err - } - defer syscall.CloseHandle(syscall.Handle(h)) - - procIs32Bits := is32BitProcess(h) - - var processParameterBlockAddress uint64 - - if procIs32Bits { - peb, err := getUserProcessParams32(h) - if err != nil { - return nil, err - } - processParameterBlockAddress = uint64(peb.EnvironmentAddress) - } else { - peb, err := getUserProcessParams64(h) - if err != nil { - return nil, err - } - processParameterBlockAddress = peb.EnvironmentAddress - } - envvarScanner := bufio.NewScanner(&processReader{ - processHandle: h, - is32BitProcess: procIs32Bits, - offset: processParameterBlockAddress, - }) - envvarScanner.Split(func(data []byte, atEOF bool) (advance int, token []byte, err error) { - if atEOF && len(data) == 0 { - return 0, nil, nil - } - // Check for UTF-16 zero character - for i := 0; i < len(data)-1; i += 2 { - if data[i] == 0 && data[i+1] == 0 { - return i + 2, data[0:i], nil - } - } - if atEOF { - return len(data), data, nil - } - // Request more data - return 0, nil, nil - }) - var envVars []string - for envvarScanner.Scan() { - entry := envvarScanner.Bytes() - if len(entry) == 0 { - break // Block is finished - } - envVars = append(envVars, convertUTF16ToString(entry)) - select { - case <-ctx.Done(): - break - default: - continue - } - } - if err := envvarScanner.Err(); err != nil { - return nil, err - } - return envVars, nil -} - -type processReader struct { - processHandle windows.Handle - is32BitProcess bool - offset uint64 -} - -func (p *processReader) Read(buf []byte) (int, error) { - processMemory := readProcessMemory(syscall.Handle(p.processHandle), p.is32BitProcess, p.offset, uint(len(buf))) - if len(processMemory) == 0 { - return 0, io.EOF - } - copy(buf, processMemory) - p.offset += uint64(len(processMemory)) - return len(processMemory), nil -} - -func getProcessCommandLine(pid int32) (string, error) { - h, err := windows.OpenProcess(processQueryInformation|windows.PROCESS_VM_READ, false, uint32(pid)) - if errors.Is(err, windows.ERROR_ACCESS_DENIED) || errors.Is(err, windows.ERROR_INVALID_PARAMETER) { - return "", nil - } - if err != nil { - return "", err - } - defer syscall.CloseHandle(syscall.Handle(h)) - - procIs32Bits := is32BitProcess(h) - - if procIs32Bits { - userProcParams, err := getUserProcessParams32(h) - if err != nil { - return "", err - } - if userProcParams.CommandLineLength > 0 { - cmdLine := readProcessMemory(syscall.Handle(h), procIs32Bits, uint64(userProcParams.CommandLineAddress), uint(userProcParams.CommandLineLength)) - if len(cmdLine) != int(userProcParams.CommandLineLength) { - return "", errors.New("cannot read cmdline") - } - - return convertUTF16ToString(cmdLine), nil - } - } else { - userProcParams, err := getUserProcessParams64(h) - if err != nil { - return "", err - } - if userProcParams.CommandLineLength > 0 { - cmdLine := readProcessMemory(syscall.Handle(h), procIs32Bits, userProcParams.CommandLineAddress, uint(userProcParams.CommandLineLength)) - if len(cmdLine) != int(userProcParams.CommandLineLength) { - return "", errors.New("cannot read cmdline") - } - - return convertUTF16ToString(cmdLine), nil - } - } - - // if we reach here, we have no command line - return "", nil -} - -func convertUTF16ToString(src []byte) string { - srcLen := len(src) / 2 - - codePoints := make([]uint16, srcLen) - - srcIdx := 0 - for i := 0; i < srcLen; i++ { - codePoints[i] = uint16(src[srcIdx]) | uint16(src[srcIdx+1])<<8 - srcIdx += 2 - } - return syscall.UTF16ToString(codePoints) -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_windows_32bit.go b/vendor/github.com/shirou/gopsutil/v4/process/process_windows_32bit.go deleted file mode 100644 index 911351b163..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows_32bit.go +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build (windows && 386) || (windows && arm) - -package process - -import ( - "errors" - "syscall" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -type PROCESS_MEMORY_COUNTERS struct { //nolint:revive //FIXME - CB uint32 - PageFaultCount uint32 - PeakWorkingSetSize uint32 - WorkingSetSize uint32 - QuotaPeakPagedPoolUsage uint32 - QuotaPagedPoolUsage uint32 - QuotaPeakNonPagedPoolUsage uint32 - QuotaNonPagedPoolUsage uint32 - PagefileUsage uint32 - PeakPagefileUsage uint32 -} - -func queryPebAddress(procHandle syscall.Handle, is32BitProcess bool) (uint64, error) { - if is32BitProcess { - // we are on a 32-bit process reading an external 32-bit process - var info processBasicInformation32 - - ret, _, _ := common.ProcNtQueryInformationProcess.Call( - uintptr(procHandle), - uintptr(common.ProcessBasicInformation), - uintptr(unsafe.Pointer(&info)), - uintptr(unsafe.Sizeof(info)), - uintptr(0), - ) - if status := windows.NTStatus(ret); status == windows.STATUS_SUCCESS { - return uint64(info.PebBaseAddress), nil - } - return 0, windows.NTStatus(ret) - } - // we are on a 32-bit process reading an external 64-bit process - if common.ProcNtWow64QueryInformationProcess64.Find() != nil { - return 0, errors.New("can't find API to query 64 bit process from 32 bit") - } - // avoid panic - var info processBasicInformation64 - - ret, _, _ := common.ProcNtWow64QueryInformationProcess64.Call( - uintptr(procHandle), - uintptr(common.ProcessBasicInformation), - uintptr(unsafe.Pointer(&info)), - uintptr(unsafe.Sizeof(info)), - uintptr(0), - ) - if status := windows.NTStatus(ret); status == windows.STATUS_SUCCESS { - return info.PebBaseAddress, nil - } - return 0, windows.NTStatus(ret) -} - -func readProcessMemory(h syscall.Handle, is32BitProcess bool, address uint64, size uint) []byte { - if is32BitProcess { - var read uint - - buffer := make([]byte, size) - - ret, _, _ := common.ProcNtReadVirtualMemory.Call( - uintptr(h), - uintptr(address), - uintptr(unsafe.Pointer(&buffer[0])), - uintptr(size), - uintptr(unsafe.Pointer(&read)), - ) - if int(ret) >= 0 && read > 0 { - return buffer[:read] - } - // reading a 64-bit process from a 32-bit one - } else if common.ProcNtWow64ReadVirtualMemory64.Find() == nil { // avoid panic - var read uint64 - - buffer := make([]byte, size) - - ret, _, _ := common.ProcNtWow64ReadVirtualMemory64.Call( - uintptr(h), - uintptr(address&0xFFFFFFFF), // the call expects a 64-bit value - uintptr(address>>32), - uintptr(unsafe.Pointer(&buffer[0])), - uintptr(size), // the call expects a 64-bit value - uintptr(0), // but size is 32-bit so pass zero as the high dword - uintptr(unsafe.Pointer(&read)), - ) - if int(ret) >= 0 && read > 0 { - return buffer[:uint(read)] - } - } - - // if we reach here, an error happened - return nil -} diff --git a/vendor/github.com/shirou/gopsutil/v4/process/process_windows_64bit.go b/vendor/github.com/shirou/gopsutil/v4/process/process_windows_64bit.go deleted file mode 100644 index 8cc26c375d..0000000000 --- a/vendor/github.com/shirou/gopsutil/v4/process/process_windows_64bit.go +++ /dev/null @@ -1,77 +0,0 @@ -// SPDX-License-Identifier: BSD-3-Clause -//go:build (windows && amd64) || (windows && arm64) - -package process - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" - - "github.com/shirou/gopsutil/v4/internal/common" -) - -type PROCESS_MEMORY_COUNTERS struct { //nolint:revive //FIXME - CB uint32 - PageFaultCount uint32 - PeakWorkingSetSize uint64 - WorkingSetSize uint64 - QuotaPeakPagedPoolUsage uint64 - QuotaPagedPoolUsage uint64 - QuotaPeakNonPagedPoolUsage uint64 - QuotaNonPagedPoolUsage uint64 - PagefileUsage uint64 - PeakPagefileUsage uint64 -} - -func queryPebAddress(procHandle syscall.Handle, is32BitProcess bool) (uint64, error) { - if is32BitProcess { - // we are on a 64-bit process reading an external 32-bit process - var wow64 uint - - ret, _, _ := common.ProcNtQueryInformationProcess.Call( - uintptr(procHandle), - uintptr(common.ProcessWow64Information), - uintptr(unsafe.Pointer(&wow64)), - uintptr(unsafe.Sizeof(wow64)), - uintptr(0), - ) - if status := windows.NTStatus(ret); status == windows.STATUS_SUCCESS { - return uint64(wow64), nil - } - return 0, windows.NTStatus(ret) - } - // we are on a 64-bit process reading an external 64-bit process - var info processBasicInformation64 - - ret, _, _ := common.ProcNtQueryInformationProcess.Call( - uintptr(procHandle), - uintptr(common.ProcessBasicInformation), - uintptr(unsafe.Pointer(&info)), - uintptr(unsafe.Sizeof(info)), - uintptr(0), - ) - if status := windows.NTStatus(ret); status == windows.STATUS_SUCCESS { - return info.PebBaseAddress, nil - } - return 0, windows.NTStatus(ret) -} - -func readProcessMemory(procHandle syscall.Handle, _ bool, address uint64, size uint) []byte { - var read uint - - buffer := make([]byte, size) - - ret, _, _ := common.ProcNtReadVirtualMemory.Call( - uintptr(procHandle), - uintptr(address), - uintptr(unsafe.Pointer(&buffer[0])), - uintptr(size), - uintptr(unsafe.Pointer(&read)), - ) - if int(ret) >= 0 && read > 0 { - return buffer[:read] - } - return nil -} diff --git a/vendor/github.com/stretchr/testify/LICENSE b/vendor/github.com/stretchr/testify/LICENSE deleted file mode 100644 index 4b0421cf9e..0000000000 --- a/vendor/github.com/stretchr/testify/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2012-2020 Mat Ryer, Tyler Bunnell and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/vendor/github.com/stretchr/testify/assert/assertion_compare.go b/vendor/github.com/stretchr/testify/assert/assertion_compare.go deleted file mode 100644 index ffb24e8e31..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_compare.go +++ /dev/null @@ -1,495 +0,0 @@ -package assert - -import ( - "bytes" - "fmt" - "reflect" - "time" -) - -// Deprecated: CompareType has only ever been for internal use and has accidentally been published since v1.6.0. Do not use it. -type CompareType = compareResult - -type compareResult int - -const ( - compareLess compareResult = iota - 1 - compareEqual - compareGreater -) - -var ( - intType = reflect.TypeOf(int(1)) - int8Type = reflect.TypeOf(int8(1)) - int16Type = reflect.TypeOf(int16(1)) - int32Type = reflect.TypeOf(int32(1)) - int64Type = reflect.TypeOf(int64(1)) - - uintType = reflect.TypeOf(uint(1)) - uint8Type = reflect.TypeOf(uint8(1)) - uint16Type = reflect.TypeOf(uint16(1)) - uint32Type = reflect.TypeOf(uint32(1)) - uint64Type = reflect.TypeOf(uint64(1)) - - uintptrType = reflect.TypeOf(uintptr(1)) - - float32Type = reflect.TypeOf(float32(1)) - float64Type = reflect.TypeOf(float64(1)) - - stringType = reflect.TypeOf("") - - timeType = reflect.TypeOf(time.Time{}) - bytesType = reflect.TypeOf([]byte{}) -) - -func compare(obj1, obj2 interface{}, kind reflect.Kind) (compareResult, bool) { - obj1Value := reflect.ValueOf(obj1) - obj2Value := reflect.ValueOf(obj2) - - // throughout this switch we try and avoid calling .Convert() if possible, - // as this has a pretty big performance impact - switch kind { - case reflect.Int: - { - intobj1, ok := obj1.(int) - if !ok { - intobj1 = obj1Value.Convert(intType).Interface().(int) - } - intobj2, ok := obj2.(int) - if !ok { - intobj2 = obj2Value.Convert(intType).Interface().(int) - } - if intobj1 > intobj2 { - return compareGreater, true - } - if intobj1 == intobj2 { - return compareEqual, true - } - if intobj1 < intobj2 { - return compareLess, true - } - } - case reflect.Int8: - { - int8obj1, ok := obj1.(int8) - if !ok { - int8obj1 = obj1Value.Convert(int8Type).Interface().(int8) - } - int8obj2, ok := obj2.(int8) - if !ok { - int8obj2 = obj2Value.Convert(int8Type).Interface().(int8) - } - if int8obj1 > int8obj2 { - return compareGreater, true - } - if int8obj1 == int8obj2 { - return compareEqual, true - } - if int8obj1 < int8obj2 { - return compareLess, true - } - } - case reflect.Int16: - { - int16obj1, ok := obj1.(int16) - if !ok { - int16obj1 = obj1Value.Convert(int16Type).Interface().(int16) - } - int16obj2, ok := obj2.(int16) - if !ok { - int16obj2 = obj2Value.Convert(int16Type).Interface().(int16) - } - if int16obj1 > int16obj2 { - return compareGreater, true - } - if int16obj1 == int16obj2 { - return compareEqual, true - } - if int16obj1 < int16obj2 { - return compareLess, true - } - } - case reflect.Int32: - { - int32obj1, ok := obj1.(int32) - if !ok { - int32obj1 = obj1Value.Convert(int32Type).Interface().(int32) - } - int32obj2, ok := obj2.(int32) - if !ok { - int32obj2 = obj2Value.Convert(int32Type).Interface().(int32) - } - if int32obj1 > int32obj2 { - return compareGreater, true - } - if int32obj1 == int32obj2 { - return compareEqual, true - } - if int32obj1 < int32obj2 { - return compareLess, true - } - } - case reflect.Int64: - { - int64obj1, ok := obj1.(int64) - if !ok { - int64obj1 = obj1Value.Convert(int64Type).Interface().(int64) - } - int64obj2, ok := obj2.(int64) - if !ok { - int64obj2 = obj2Value.Convert(int64Type).Interface().(int64) - } - if int64obj1 > int64obj2 { - return compareGreater, true - } - if int64obj1 == int64obj2 { - return compareEqual, true - } - if int64obj1 < int64obj2 { - return compareLess, true - } - } - case reflect.Uint: - { - uintobj1, ok := obj1.(uint) - if !ok { - uintobj1 = obj1Value.Convert(uintType).Interface().(uint) - } - uintobj2, ok := obj2.(uint) - if !ok { - uintobj2 = obj2Value.Convert(uintType).Interface().(uint) - } - if uintobj1 > uintobj2 { - return compareGreater, true - } - if uintobj1 == uintobj2 { - return compareEqual, true - } - if uintobj1 < uintobj2 { - return compareLess, true - } - } - case reflect.Uint8: - { - uint8obj1, ok := obj1.(uint8) - if !ok { - uint8obj1 = obj1Value.Convert(uint8Type).Interface().(uint8) - } - uint8obj2, ok := obj2.(uint8) - if !ok { - uint8obj2 = obj2Value.Convert(uint8Type).Interface().(uint8) - } - if uint8obj1 > uint8obj2 { - return compareGreater, true - } - if uint8obj1 == uint8obj2 { - return compareEqual, true - } - if uint8obj1 < uint8obj2 { - return compareLess, true - } - } - case reflect.Uint16: - { - uint16obj1, ok := obj1.(uint16) - if !ok { - uint16obj1 = obj1Value.Convert(uint16Type).Interface().(uint16) - } - uint16obj2, ok := obj2.(uint16) - if !ok { - uint16obj2 = obj2Value.Convert(uint16Type).Interface().(uint16) - } - if uint16obj1 > uint16obj2 { - return compareGreater, true - } - if uint16obj1 == uint16obj2 { - return compareEqual, true - } - if uint16obj1 < uint16obj2 { - return compareLess, true - } - } - case reflect.Uint32: - { - uint32obj1, ok := obj1.(uint32) - if !ok { - uint32obj1 = obj1Value.Convert(uint32Type).Interface().(uint32) - } - uint32obj2, ok := obj2.(uint32) - if !ok { - uint32obj2 = obj2Value.Convert(uint32Type).Interface().(uint32) - } - if uint32obj1 > uint32obj2 { - return compareGreater, true - } - if uint32obj1 == uint32obj2 { - return compareEqual, true - } - if uint32obj1 < uint32obj2 { - return compareLess, true - } - } - case reflect.Uint64: - { - uint64obj1, ok := obj1.(uint64) - if !ok { - uint64obj1 = obj1Value.Convert(uint64Type).Interface().(uint64) - } - uint64obj2, ok := obj2.(uint64) - if !ok { - uint64obj2 = obj2Value.Convert(uint64Type).Interface().(uint64) - } - if uint64obj1 > uint64obj2 { - return compareGreater, true - } - if uint64obj1 == uint64obj2 { - return compareEqual, true - } - if uint64obj1 < uint64obj2 { - return compareLess, true - } - } - case reflect.Float32: - { - float32obj1, ok := obj1.(float32) - if !ok { - float32obj1 = obj1Value.Convert(float32Type).Interface().(float32) - } - float32obj2, ok := obj2.(float32) - if !ok { - float32obj2 = obj2Value.Convert(float32Type).Interface().(float32) - } - if float32obj1 > float32obj2 { - return compareGreater, true - } - if float32obj1 == float32obj2 { - return compareEqual, true - } - if float32obj1 < float32obj2 { - return compareLess, true - } - } - case reflect.Float64: - { - float64obj1, ok := obj1.(float64) - if !ok { - float64obj1 = obj1Value.Convert(float64Type).Interface().(float64) - } - float64obj2, ok := obj2.(float64) - if !ok { - float64obj2 = obj2Value.Convert(float64Type).Interface().(float64) - } - if float64obj1 > float64obj2 { - return compareGreater, true - } - if float64obj1 == float64obj2 { - return compareEqual, true - } - if float64obj1 < float64obj2 { - return compareLess, true - } - } - case reflect.String: - { - stringobj1, ok := obj1.(string) - if !ok { - stringobj1 = obj1Value.Convert(stringType).Interface().(string) - } - stringobj2, ok := obj2.(string) - if !ok { - stringobj2 = obj2Value.Convert(stringType).Interface().(string) - } - if stringobj1 > stringobj2 { - return compareGreater, true - } - if stringobj1 == stringobj2 { - return compareEqual, true - } - if stringobj1 < stringobj2 { - return compareLess, true - } - } - // Check for known struct types we can check for compare results. - case reflect.Struct: - { - // All structs enter here. We're not interested in most types. - if !obj1Value.CanConvert(timeType) { - break - } - - // time.Time can be compared! - timeObj1, ok := obj1.(time.Time) - if !ok { - timeObj1 = obj1Value.Convert(timeType).Interface().(time.Time) - } - - timeObj2, ok := obj2.(time.Time) - if !ok { - timeObj2 = obj2Value.Convert(timeType).Interface().(time.Time) - } - - if timeObj1.Before(timeObj2) { - return compareLess, true - } - if timeObj1.Equal(timeObj2) { - return compareEqual, true - } - return compareGreater, true - } - case reflect.Slice: - { - // We only care about the []byte type. - if !obj1Value.CanConvert(bytesType) { - break - } - - // []byte can be compared! - bytesObj1, ok := obj1.([]byte) - if !ok { - bytesObj1 = obj1Value.Convert(bytesType).Interface().([]byte) - - } - bytesObj2, ok := obj2.([]byte) - if !ok { - bytesObj2 = obj2Value.Convert(bytesType).Interface().([]byte) - } - - return compareResult(bytes.Compare(bytesObj1, bytesObj2)), true - } - case reflect.Uintptr: - { - uintptrObj1, ok := obj1.(uintptr) - if !ok { - uintptrObj1 = obj1Value.Convert(uintptrType).Interface().(uintptr) - } - uintptrObj2, ok := obj2.(uintptr) - if !ok { - uintptrObj2 = obj2Value.Convert(uintptrType).Interface().(uintptr) - } - if uintptrObj1 > uintptrObj2 { - return compareGreater, true - } - if uintptrObj1 == uintptrObj2 { - return compareEqual, true - } - if uintptrObj1 < uintptrObj2 { - return compareLess, true - } - } - } - - return compareEqual, false -} - -// Greater asserts that the first element is greater than the second -// -// assert.Greater(t, 2, 1) -// assert.Greater(t, float64(2), float64(1)) -// assert.Greater(t, "b", "a") -func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - failMessage := fmt.Sprintf("\"%v\" is not greater than \"%v\"", e1, e2) - return compareTwoValues(t, e1, e2, []compareResult{compareGreater}, failMessage, msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqual(t, 2, 1) -// assert.GreaterOrEqual(t, 2, 2) -// assert.GreaterOrEqual(t, "b", "a") -// assert.GreaterOrEqual(t, "b", "b") -func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - failMessage := fmt.Sprintf("\"%v\" is not greater than or equal to \"%v\"", e1, e2) - return compareTwoValues(t, e1, e2, []compareResult{compareGreater, compareEqual}, failMessage, msgAndArgs...) -} - -// Less asserts that the first element is less than the second -// -// assert.Less(t, 1, 2) -// assert.Less(t, float64(1), float64(2)) -// assert.Less(t, "a", "b") -func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - failMessage := fmt.Sprintf("\"%v\" is not less than \"%v\"", e1, e2) - return compareTwoValues(t, e1, e2, []compareResult{compareLess}, failMessage, msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// assert.LessOrEqual(t, 1, 2) -// assert.LessOrEqual(t, 2, 2) -// assert.LessOrEqual(t, "a", "b") -// assert.LessOrEqual(t, "b", "b") -func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - failMessage := fmt.Sprintf("\"%v\" is not less than or equal to \"%v\"", e1, e2) - return compareTwoValues(t, e1, e2, []compareResult{compareLess, compareEqual}, failMessage, msgAndArgs...) -} - -// Positive asserts that the specified element is positive -// -// assert.Positive(t, 1) -// assert.Positive(t, 1.23) -func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - zero := reflect.Zero(reflect.TypeOf(e)) - failMessage := fmt.Sprintf("\"%v\" is not positive", e) - return compareTwoValues(t, e, zero.Interface(), []compareResult{compareGreater}, failMessage, msgAndArgs...) -} - -// Negative asserts that the specified element is negative -// -// assert.Negative(t, -1) -// assert.Negative(t, -1.23) -func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - zero := reflect.Zero(reflect.TypeOf(e)) - failMessage := fmt.Sprintf("\"%v\" is not negative", e) - return compareTwoValues(t, e, zero.Interface(), []compareResult{compareLess}, failMessage, msgAndArgs...) -} - -func compareTwoValues(t TestingT, e1 interface{}, e2 interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - e1Kind := reflect.ValueOf(e1).Kind() - e2Kind := reflect.ValueOf(e2).Kind() - if e1Kind != e2Kind { - return Fail(t, "Elements should be the same type", msgAndArgs...) - } - - compareResult, isComparable := compare(e1, e2, e1Kind) - if !isComparable { - return Fail(t, fmt.Sprintf(`Can not compare type "%T"`, e1), msgAndArgs...) - } - - if !containsValue(allowedComparesResults, compareResult) { - return Fail(t, failMessage, msgAndArgs...) - } - - return true -} - -func containsValue(values []compareResult, value compareResult) bool { - for _, v := range values { - if v == value { - return true - } - } - - return false -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go b/vendor/github.com/stretchr/testify/assert/assertion_format.go deleted file mode 100644 index c592f6ad5f..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go +++ /dev/null @@ -1,866 +0,0 @@ -// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp Comparison, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Condition(t, comp, append([]interface{}{msg}, args...)...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Contains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return DirExists(t, path, append([]interface{}{msg}, args...)...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) -} - -// Emptyf asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// assert.Emptyf(t, obj, "error message %s", "formatted") -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Empty(t, object, append([]interface{}{msg}, args...)...) -} - -// Equalf asserts that two objects are equal. -// -// assert.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Equal(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EqualError(t, theError, errString, append([]interface{}{msg}, args...)...) -} - -// EqualExportedValuesf asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// assert.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true -// assert.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false -func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EqualExportedValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. -// -// assert.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// assert.Errorf(t, err, "error message %s", "formatted") -func Errorf(t TestingT, err error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Error(t, err, append([]interface{}{msg}, args...)...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorAs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") -func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorContains(t, theError, contains, append([]interface{}{msg}, args...)...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return ErrorIs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Eventually(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) -} - -// EventuallyWithTf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// assert.EventuallyWithTf(t, func(c *assert.CollectT, "error message %s", "formatted") { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func EventuallyWithTf(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return EventuallyWithT(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// assert.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Exactly(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return FailNow(t, failureMessage, append([]interface{}{msg}, args...)...) -} - -// Falsef asserts that the specified value is false. -// -// assert.Falsef(t, myBool, "error message %s", "formatted") -func Falsef(t TestingT, value bool, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return False(t, value, append([]interface{}{msg}, args...)...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return FileExists(t, path, append([]interface{}{msg}, args...)...) -} - -// Greaterf asserts that the first element is greater than the second -// -// assert.Greaterf(t, 2, 1, "error message %s", "formatted") -// assert.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// assert.Greaterf(t, "b", "a", "error message %s", "formatted") -func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Greater(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// assert.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// assert.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") -func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContains(t, handler, method, url, values, str, append([]interface{}{msg}, args...)...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPError(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPRedirect(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCode(t, handler, method, url, values, statuscode, append([]interface{}{msg}, args...)...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return HTTPSuccess(t, handler, method, url, values, append([]interface{}{msg}, args...)...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// assert.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Implements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// assert.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDelta(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValues(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InDeltaSlice(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InEpsilon(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlice(t, expected, actual, epsilon, append([]interface{}{msg}, args...)...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// assert.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsDecreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// assert.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsIncreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// assert.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// assert.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// assert.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// assert.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasing(t, object, append([]interface{}{msg}, args...)...) -} - -// IsNotTypef asserts that the specified objects are not of the same type. -// -// assert.IsNotTypef(t, &NotMyStruct{}, &MyStruct{}, "error message %s", "formatted") -func IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsNotType(t, theType, object, append([]interface{}{msg}, args...)...) -} - -// IsTypef asserts that the specified objects are of the same type. -// -// assert.IsTypef(t, &MyStruct{}, &MyStruct{}, "error message %s", "formatted") -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return IsType(t, expectedType, object, append([]interface{}{msg}, args...)...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return JSONEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// assert.Lenf(t, mySlice, 3, "error message %s", "formatted") -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Len(t, object, length, append([]interface{}{msg}, args...)...) -} - -// Lessf asserts that the first element is less than the second -// -// assert.Lessf(t, 1, 2, "error message %s", "formatted") -// assert.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// assert.Lessf(t, "a", "b", "error message %s", "formatted") -func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Less(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// assert.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// assert.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// assert.LessOrEqualf(t, "b", "b", "error message %s", "formatted") -func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return LessOrEqual(t, e1, e2, append([]interface{}{msg}, args...)...) -} - -// Negativef asserts that the specified element is negative -// -// assert.Negativef(t, -1, "error message %s", "formatted") -// assert.Negativef(t, -1.23, "error message %s", "formatted") -func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Negative(t, e, append([]interface{}{msg}, args...)...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Never(t, condition, waitFor, tick, append([]interface{}{msg}, args...)...) -} - -// Nilf asserts that the specified object is nil. -// -// assert.Nilf(t, err, "error message %s", "formatted") -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Nil(t, object, append([]interface{}{msg}, args...)...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoDirExists(t, path, append([]interface{}{msg}, args...)...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoErrorf(t, err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoError(t, err, append([]interface{}{msg}, args...)...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NoFileExists(t, path, append([]interface{}{msg}, args...)...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotContains(t, s, contains, append([]interface{}{msg}, args...)...) -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// assert.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// assert.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...) -} - -// NotEmptyf asserts that the specified object is NOT [Empty]. -// -// if assert.NotEmptyf(t, obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEmpty(t, object, append([]interface{}{msg}, args...)...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEqual(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") -func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotEqualValues(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotErrorAs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// NotErrorIsf asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotErrorIs(t, err, target, append([]interface{}{msg}, args...)...) -} - -// NotImplementsf asserts that an object does not implement the specified interface. -// -// assert.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotImplements(t, interfaceObject, object, append([]interface{}{msg}, args...)...) -} - -// NotNilf asserts that the specified object is not nil. -// -// assert.NotNilf(t, err, "error message %s", "formatted") -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotNil(t, object, append([]interface{}{msg}, args...)...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -func NotPanicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotPanics(t, f, append([]interface{}{msg}, args...)...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// assert.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotRegexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// assert.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotSame(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// assert.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") -// assert.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") -// assert.NotSubsetf(t, [1, 3, 4], {1: "one", 2: "two"}, "error message %s", "formatted") -// assert.NotSubsetf(t, {"x": 1, "y": 2}, ["z"], "error message %s", "formatted") -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotSubset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// NotZerof asserts that i is not the zero value for its type. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return NotZero(t, i, append([]interface{}{msg}, args...)...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -func Panicsf(t TestingT, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Panics(t, f, append([]interface{}{msg}, args...)...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithErrorf(t TestingT, errString string, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return PanicsWithError(t, errString, f, append([]interface{}{msg}, args...)...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithValuef(t TestingT, expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return PanicsWithValue(t, expected, f, append([]interface{}{msg}, args...)...) -} - -// Positivef asserts that the specified element is positive -// -// assert.Positivef(t, 1, "error message %s", "formatted") -// assert.Positivef(t, 1.23, "error message %s", "formatted") -func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Positive(t, e, append([]interface{}{msg}, args...)...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// assert.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Regexp(t, rx, str, append([]interface{}{msg}, args...)...) -} - -// Samef asserts that two pointers reference the same object. -// -// assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Same(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Subsetf asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") -// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") -// assert.Subsetf(t, [1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted") -// assert.Subsetf(t, {"x": 1, "y": 2}, ["x"], "error message %s", "formatted") -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Subset(t, list, subset, append([]interface{}{msg}, args...)...) -} - -// Truef asserts that the specified value is true. -// -// assert.Truef(t, myBool, "error message %s", "formatted") -func Truef(t TestingT, value bool, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return True(t, value, append([]interface{}{msg}, args...)...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return WithinDuration(t, expected, actual, delta, append([]interface{}{msg}, args...)...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// assert.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return WithinRange(t, actual, start, end, append([]interface{}{msg}, args...)...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return YAMLEq(t, expected, actual, append([]interface{}{msg}, args...)...) -} - -// Zerof asserts that i is the zero value for its type. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Zero(t, i, append([]interface{}{msg}, args...)...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl deleted file mode 100644 index d2bb0b8177..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_format.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentFormat}} -func {{.DocInfo.Name}}f(t TestingT, {{.ParamsFormat}}) bool { - if h, ok := t.(tHelper); ok { h.Helper() } - return {{.DocInfo.Name}}(t, {{.ForwardedParamsFormat}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go b/vendor/github.com/stretchr/testify/assert/assertion_forward.go deleted file mode 100644 index 58db928450..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go +++ /dev/null @@ -1,1723 +0,0 @@ -// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. - -package assert - -import ( - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp Comparison, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// a.Empty(obj) -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// a.Emptyf(obj, "error message %s", "formatted") -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualExportedValues asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true -// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false -func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualExportedValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualExportedValuesf asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// a.EqualExportedValuesf(S{1, 2}, S{1, 3}, "error message %s", "formatted") => true -// a.EqualExportedValuesf(S{1, 2}, S{2, 3}, "error message %s", "formatted") => false -func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualExportedValuesf(a.t, expected, actual, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. -// -// a.EqualValues(uint32(123), int32(123)) -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. -// -// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// a.Error(err) -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Error(a.t, err, msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorAs(a.t, err, target, msgAndArgs...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorAsf(a.t, err, target, msg, args...) -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContains(err, expectedErrorSubString) -func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorContains(a.t, theError, contains, msgAndArgs...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") -func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorContainsf(a.t, theError, contains, msg, args...) -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorIs(a.t, err, target, msgAndArgs...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return ErrorIsf(a.t, err, target, msg, args...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// a.Errorf(err, "error message %s", "formatted") -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Errorf(a.t, err, msg, args...) -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Eventually(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// EventuallyWithT asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// a.EventuallyWithT(func(c *assert.CollectT) { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func (a *Assertions) EventuallyWithT(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// EventuallyWithTf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func (a *Assertions) EventuallyWithTf(condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Eventuallyf(a.t, condition, waitFor, tick, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return FileExistsf(a.t, path, msg, args...) -} - -// Greater asserts that the first element is greater than the second -// -// a.Greater(2, 1) -// a.Greater(float64(2), float64(1)) -// a.Greater("b", "a") -func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Greater(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqual(2, 1) -// a.GreaterOrEqual(2, 2) -// a.GreaterOrEqual("b", "a") -// a.GreaterOrEqual("b", "b") -func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") -// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") -// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") -// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return GreaterOrEqualf(a.t, e1, e2, msg, args...) -} - -// Greaterf asserts that the first element is greater than the second -// -// a.Greaterf(2, 1, "error message %s", "formatted") -// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") -// a.Greaterf("b", "a", "error message %s", "formatted") -func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Greaterf(a.t, e1, e2, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, 22/7.0, 0.01) -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// a.IsDecreasing([]int{2, 1, 0}) -// a.IsDecreasing([]float{2, 1}) -// a.IsDecreasing([]string{"b", "a"}) -func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsDecreasing(a.t, object, msgAndArgs...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") -// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsDecreasingf(a.t, object, msg, args...) -} - -// IsIncreasing asserts that the collection is increasing -// -// a.IsIncreasing([]int{1, 2, 3}) -// a.IsIncreasing([]float{1, 2}) -// a.IsIncreasing([]string{"a", "b"}) -func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsIncreasing(a.t, object, msgAndArgs...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") -// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsIncreasingf(a.t, object, msg, args...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// a.IsNonDecreasing([]int{1, 1, 2}) -// a.IsNonDecreasing([]float{1, 2}) -// a.IsNonDecreasing([]string{"a", "b"}) -func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasing(a.t, object, msgAndArgs...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonDecreasingf(a.t, object, msg, args...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// a.IsNonIncreasing([]int{2, 1, 1}) -// a.IsNonIncreasing([]float{2, 1}) -// a.IsNonIncreasing([]string{"b", "a"}) -func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasing(a.t, object, msgAndArgs...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNonIncreasingf(a.t, object, msg, args...) -} - -// IsNotType asserts that the specified objects are not of the same type. -// -// a.IsNotType(&NotMyStruct{}, &MyStruct{}) -func (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNotType(a.t, theType, object, msgAndArgs...) -} - -// IsNotTypef asserts that the specified objects are not of the same type. -// -// a.IsNotTypef(&NotMyStruct{}, &MyStruct{}, "error message %s", "formatted") -func (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsNotTypef(a.t, theType, object, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -// -// a.IsType(&MyStruct{}, &MyStruct{}) -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -// -// a.IsTypef(&MyStruct{}, &MyStruct{}, "error message %s", "formatted") -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Lenf(a.t, object, length, msg, args...) -} - -// Less asserts that the first element is less than the second -// -// a.Less(1, 2) -// a.Less(float64(1), float64(2)) -// a.Less("a", "b") -func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Less(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// a.LessOrEqual(1, 2) -// a.LessOrEqual(2, 2) -// a.LessOrEqual("a", "b") -// a.LessOrEqual("b", "b") -func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return LessOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// a.LessOrEqualf(1, 2, "error message %s", "formatted") -// a.LessOrEqualf(2, 2, "error message %s", "formatted") -// a.LessOrEqualf("a", "b", "error message %s", "formatted") -// a.LessOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return LessOrEqualf(a.t, e1, e2, msg, args...) -} - -// Lessf asserts that the first element is less than the second -// -// a.Lessf(1, 2, "error message %s", "formatted") -// a.Lessf(float64(1), float64(2), "error message %s", "formatted") -// a.Lessf("a", "b", "error message %s", "formatted") -func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Lessf(a.t, e1, e2, msg, args...) -} - -// Negative asserts that the specified element is negative -// -// a.Negative(-1) -// a.Negative(-1.23) -func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Negative(a.t, e, msgAndArgs...) -} - -// Negativef asserts that the specified element is negative -// -// a.Negativef(-1, "error message %s", "formatted") -// a.Negativef(-1.23, "error message %s", "formatted") -func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Negativef(a.t, e, msg, args...) -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Never(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Neverf(a.t, condition, waitFor, tick, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Nilf(a.t, object, msg, args...) -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoDirExists(a.t, path, msgAndArgs...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoDirExistsf(a.t, path, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoErrorf(a.t, err, msg, args...) -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoFileExists(a.t, path, msgAndArgs...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NoFileExistsf(a.t, path, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotContainsf(a.t, s, contains, msg, args...) -} - -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true -// -// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true -func (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotElementsMatchf(a.t, listA, listB, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT [Empty]. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT [Empty]. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValues(obj1, obj2) -func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualValues(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") -func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualValuesf(a.t, expected, actual, msg, args...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorAs(a.t, err, target, msgAndArgs...) -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorAsf(a.t, err, target, msg, args...) -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorIs(a.t, err, target, msgAndArgs...) -} - -// NotErrorIsf asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotErrorIsf(a.t, err, target, msg, args...) -} - -// NotImplements asserts that an object does not implement the specified interface. -// -// a.NotImplements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotImplements(a.t, interfaceObject, object, msgAndArgs...) -} - -// NotImplementsf asserts that an object does not implement the specified interface. -// -// a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotImplementsf(a.t, interfaceObject, object, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -func (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -func (a *Assertions) NotPanicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSame asserts that two pointers do not reference the same object. -// -// a.NotSame(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSame(a.t, expected, actual, msgAndArgs...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSamef(a.t, expected, actual, msg, args...) -} - -// NotSubset asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.NotSubset([1, 3, 4], [1, 2]) -// a.NotSubset({"x": 1, "y": 2}, {"z": 3}) -// a.NotSubset([1, 3, 4], {1: "one", 2: "two"}) -// a.NotSubset({"x": 1, "y": 2}, ["z"]) -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted") -// a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") -// a.NotSubsetf([1, 3, 4], {1: "one", 2: "two"}, "error message %s", "formatted") -// a.NotSubsetf({"x": 1, "y": 2}, ["z"], "error message %s", "formatted") -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -func (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithError("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithError(errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithError(a.t, errString, f, msgAndArgs...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithErrorf(errString string, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithErrorf(a.t, errString, f, msg, args...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithValue(expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithValuef(expected interface{}, f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) Panicsf(f PanicTestFunc, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Panicsf(a.t, f, msg, args...) -} - -// Positive asserts that the specified element is positive -// -// a.Positive(1) -// a.Positive(1.23) -func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Positive(a.t, e, msgAndArgs...) -} - -// Positivef asserts that the specified element is positive -// -// a.Positivef(1, "error message %s", "formatted") -// a.Positivef(1.23, "error message %s", "formatted") -func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Positivef(a.t, e, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Regexpf(a.t, rx, str, msg, args...) -} - -// Same asserts that two pointers reference the same object. -// -// a.Same(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Same(a.t, expected, actual, msgAndArgs...) -} - -// Samef asserts that two pointers reference the same object. -// -// a.Samef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Samef(a.t, expected, actual, msg, args...) -} - -// Subset asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.Subset([1, 2, 3], [1, 2]) -// a.Subset({"x": 1, "y": 2}, {"x": 1}) -// a.Subset([1, 2, 3], {1: "one", 2: "two"}) -// a.Subset({"x": 1, "y": 2}, ["x"]) -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") -// a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") -// a.Subsetf([1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted") -// a.Subsetf({"x": 1, "y": 2}, ["x"], "error message %s", "formatted") -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinRange(a.t, actual, start, end, msgAndArgs...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return WithinRangef(a.t, actual, start, end, msg, args...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEq(a.t, expected, actual, msgAndArgs...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return YAMLEqf(a.t, expected, actual, msg, args...) -} - -// Zero asserts that i is the zero value for its type. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) bool { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - return Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl b/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl deleted file mode 100644 index 188bb9e174..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { - if h, ok := a.t.(tHelper); ok { h.Helper() } - return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertion_order.go b/vendor/github.com/stretchr/testify/assert/assertion_order.go deleted file mode 100644 index 2fdf80fdd3..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertion_order.go +++ /dev/null @@ -1,81 +0,0 @@ -package assert - -import ( - "fmt" - "reflect" -) - -// isOrdered checks that collection contains orderable elements. -func isOrdered(t TestingT, object interface{}, allowedComparesResults []compareResult, failMessage string, msgAndArgs ...interface{}) bool { - objKind := reflect.TypeOf(object).Kind() - if objKind != reflect.Slice && objKind != reflect.Array { - return false - } - - objValue := reflect.ValueOf(object) - objLen := objValue.Len() - - if objLen <= 1 { - return true - } - - value := objValue.Index(0) - valueInterface := value.Interface() - firstValueKind := value.Kind() - - for i := 1; i < objLen; i++ { - prevValue := value - prevValueInterface := valueInterface - - value = objValue.Index(i) - valueInterface = value.Interface() - - compareResult, isComparable := compare(prevValueInterface, valueInterface, firstValueKind) - - if !isComparable { - return Fail(t, fmt.Sprintf(`Can not compare type "%T" and "%T"`, value, prevValue), msgAndArgs...) - } - - if !containsValue(allowedComparesResults, compareResult) { - return Fail(t, fmt.Sprintf(failMessage, prevValue, value), msgAndArgs...) - } - } - - return true -} - -// IsIncreasing asserts that the collection is increasing -// -// assert.IsIncreasing(t, []int{1, 2, 3}) -// assert.IsIncreasing(t, []float{1, 2}) -// assert.IsIncreasing(t, []string{"a", "b"}) -func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// assert.IsNonIncreasing(t, []int{2, 1, 1}) -// assert.IsNonIncreasing(t, []float{2, 1}) -// assert.IsNonIncreasing(t, []string{"b", "a"}) -func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// assert.IsDecreasing(t, []int{2, 1, 0}) -// assert.IsDecreasing(t, []float{2, 1}) -// assert.IsDecreasing(t, []string{"b", "a"}) -func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// assert.IsNonDecreasing(t, []int{1, 1, 2}) -// assert.IsNonDecreasing(t, []float{1, 2}) -// assert.IsNonDecreasing(t, []string{"a", "b"}) -func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - return isOrdered(t, object, []compareResult{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs...) -} diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go deleted file mode 100644 index de8de0cb6c..0000000000 --- a/vendor/github.com/stretchr/testify/assert/assertions.go +++ /dev/null @@ -1,2295 +0,0 @@ -package assert - -import ( - "bufio" - "bytes" - "encoding/json" - "errors" - "fmt" - "math" - "os" - "reflect" - "regexp" - "runtime" - "runtime/debug" - "strings" - "time" - "unicode" - "unicode/utf8" - - "github.com/davecgh/go-spew/spew" - "github.com/pmezard/go-difflib/difflib" - - // Wrapper around gopkg.in/yaml.v3 - "github.com/stretchr/testify/assert/yaml" -) - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_format.go.tmpl" - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) -} - -// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful -// for table driven tests. -type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) bool - -// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful -// for table driven tests. -type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) bool - -// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful -// for table driven tests. -type BoolAssertionFunc func(TestingT, bool, ...interface{}) bool - -// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful -// for table driven tests. -type ErrorAssertionFunc func(TestingT, error, ...interface{}) bool - -// PanicAssertionFunc is a common function prototype when validating a panic value. Can be useful -// for table driven tests. -type PanicAssertionFunc = func(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool - -// Comparison is a custom function that returns true on success and false on failure -type Comparison func() (success bool) - -/* - Helper functions -*/ - -// ObjectsAreEqual determines if two objects are considered equal. -// -// This function does no assertion of any kind. -func ObjectsAreEqual(expected, actual interface{}) bool { - if expected == nil || actual == nil { - return expected == actual - } - - exp, ok := expected.([]byte) - if !ok { - return reflect.DeepEqual(expected, actual) - } - - act, ok := actual.([]byte) - if !ok { - return false - } - if exp == nil || act == nil { - return exp == nil && act == nil - } - return bytes.Equal(exp, act) -} - -// copyExportedFields iterates downward through nested data structures and creates a copy -// that only contains the exported struct fields. -func copyExportedFields(expected interface{}) interface{} { - if isNil(expected) { - return expected - } - - expectedType := reflect.TypeOf(expected) - expectedKind := expectedType.Kind() - expectedValue := reflect.ValueOf(expected) - - switch expectedKind { - case reflect.Struct: - result := reflect.New(expectedType).Elem() - for i := 0; i < expectedType.NumField(); i++ { - field := expectedType.Field(i) - isExported := field.IsExported() - if isExported { - fieldValue := expectedValue.Field(i) - if isNil(fieldValue) || isNil(fieldValue.Interface()) { - continue - } - newValue := copyExportedFields(fieldValue.Interface()) - result.Field(i).Set(reflect.ValueOf(newValue)) - } - } - return result.Interface() - - case reflect.Ptr: - result := reflect.New(expectedType.Elem()) - unexportedRemoved := copyExportedFields(expectedValue.Elem().Interface()) - result.Elem().Set(reflect.ValueOf(unexportedRemoved)) - return result.Interface() - - case reflect.Array, reflect.Slice: - var result reflect.Value - if expectedKind == reflect.Array { - result = reflect.New(reflect.ArrayOf(expectedValue.Len(), expectedType.Elem())).Elem() - } else { - result = reflect.MakeSlice(expectedType, expectedValue.Len(), expectedValue.Len()) - } - for i := 0; i < expectedValue.Len(); i++ { - index := expectedValue.Index(i) - if isNil(index) { - continue - } - unexportedRemoved := copyExportedFields(index.Interface()) - result.Index(i).Set(reflect.ValueOf(unexportedRemoved)) - } - return result.Interface() - - case reflect.Map: - result := reflect.MakeMap(expectedType) - for _, k := range expectedValue.MapKeys() { - index := expectedValue.MapIndex(k) - unexportedRemoved := copyExportedFields(index.Interface()) - result.SetMapIndex(k, reflect.ValueOf(unexportedRemoved)) - } - return result.Interface() - - default: - return expected - } -} - -// ObjectsExportedFieldsAreEqual determines if the exported (public) fields of two objects are -// considered equal. This comparison of only exported fields is applied recursively to nested data -// structures. -// -// This function does no assertion of any kind. -// -// Deprecated: Use [EqualExportedValues] instead. -func ObjectsExportedFieldsAreEqual(expected, actual interface{}) bool { - expectedCleaned := copyExportedFields(expected) - actualCleaned := copyExportedFields(actual) - return ObjectsAreEqualValues(expectedCleaned, actualCleaned) -} - -// ObjectsAreEqualValues gets whether two objects are equal, or if their -// values are equal. -func ObjectsAreEqualValues(expected, actual interface{}) bool { - if ObjectsAreEqual(expected, actual) { - return true - } - - expectedValue := reflect.ValueOf(expected) - actualValue := reflect.ValueOf(actual) - if !expectedValue.IsValid() || !actualValue.IsValid() { - return false - } - - expectedType := expectedValue.Type() - actualType := actualValue.Type() - if !expectedType.ConvertibleTo(actualType) { - return false - } - - if !isNumericType(expectedType) || !isNumericType(actualType) { - // Attempt comparison after type conversion - return reflect.DeepEqual( - expectedValue.Convert(actualType).Interface(), actual, - ) - } - - // If BOTH values are numeric, there are chances of false positives due - // to overflow or underflow. So, we need to make sure to always convert - // the smaller type to a larger type before comparing. - if expectedType.Size() >= actualType.Size() { - return actualValue.Convert(expectedType).Interface() == expected - } - - return expectedValue.Convert(actualType).Interface() == actual -} - -// isNumericType returns true if the type is one of: -// int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64, -// float32, float64, complex64, complex128 -func isNumericType(t reflect.Type) bool { - return t.Kind() >= reflect.Int && t.Kind() <= reflect.Complex128 -} - -/* CallerInfo is necessary because the assert functions use the testing object -internally, causing it to print the file:line of the assert method, rather than where -the problem actually occurred in calling code.*/ - -// CallerInfo returns an array of strings containing the file and line number -// of each stack frame leading from the current test to the assert call that -// failed. -func CallerInfo() []string { - var pc uintptr - var file string - var line int - var name string - - const stackFrameBufferSize = 10 - pcs := make([]uintptr, stackFrameBufferSize) - - callers := []string{} - offset := 1 - - for { - n := runtime.Callers(offset, pcs) - - if n == 0 { - break - } - - frames := runtime.CallersFrames(pcs[:n]) - - for { - frame, more := frames.Next() - pc = frame.PC - file = frame.File - line = frame.Line - - // This is a huge edge case, but it will panic if this is the case, see #180 - if file == "" { - break - } - - f := runtime.FuncForPC(pc) - if f == nil { - break - } - name = f.Name() - - // testing.tRunner is the standard library function that calls - // tests. Subtests are called directly by tRunner, without going through - // the Test/Benchmark/Example function that contains the t.Run calls, so - // with subtests we should break when we hit tRunner, without adding it - // to the list of callers. - if name == "testing.tRunner" { - break - } - - parts := strings.Split(file, "/") - if len(parts) > 1 { - filename := parts[len(parts)-1] - dir := parts[len(parts)-2] - if (dir != "assert" && dir != "mock" && dir != "require") || filename == "mock_test.go" { - callers = append(callers, fmt.Sprintf("%s:%d", file, line)) - } - } - - // Drop the package - dotPos := strings.LastIndexByte(name, '.') - name = name[dotPos+1:] - if isTest(name, "Test") || - isTest(name, "Benchmark") || - isTest(name, "Example") { - break - } - - if !more { - break - } - } - - // Next batch - offset += cap(pcs) - } - - return callers -} - -// Stolen from the `go test` tool. -// isTest tells whether name looks like a test (or benchmark, according to prefix). -// It is a Test (say) if there is a character after Test that is not a lower-case letter. -// We don't want TesticularCancer. -func isTest(name, prefix string) bool { - if !strings.HasPrefix(name, prefix) { - return false - } - if len(name) == len(prefix) { // "Test" is ok - return true - } - r, _ := utf8.DecodeRuneInString(name[len(prefix):]) - return !unicode.IsLower(r) -} - -func messageFromMsgAndArgs(msgAndArgs ...interface{}) string { - if len(msgAndArgs) == 0 || msgAndArgs == nil { - return "" - } - if len(msgAndArgs) == 1 { - msg := msgAndArgs[0] - if msgAsStr, ok := msg.(string); ok { - return msgAsStr - } - return fmt.Sprintf("%+v", msg) - } - if len(msgAndArgs) > 1 { - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } - return "" -} - -// Aligns the provided message so that all lines after the first line start at the same location as the first line. -// Assumes that the first line starts at the correct location (after carriage return, tab, label, spacer and tab). -// The longestLabelLen parameter specifies the length of the longest label in the output (required because this is the -// basis on which the alignment occurs). -func indentMessageLines(message string, longestLabelLen int) string { - outBuf := new(bytes.Buffer) - - for i, scanner := 0, bufio.NewScanner(strings.NewReader(message)); scanner.Scan(); i++ { - // no need to align first line because it starts at the correct location (after the label) - if i != 0 { - // append alignLen+1 spaces to align with "{{longestLabel}}:" before adding tab - outBuf.WriteString("\n\t" + strings.Repeat(" ", longestLabelLen+1) + "\t") - } - outBuf.WriteString(scanner.Text()) - } - - return outBuf.String() -} - -type failNower interface { - FailNow() -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, failureMessage, msgAndArgs...) - - // We cannot extend TestingT with FailNow() and - // maintain backwards compatibility, so we fallback - // to panicking when FailNow is not available in - // TestingT. - // See issue #263 - - if t, ok := t.(failNower); ok { - t.FailNow() - } else { - panic("test failed and t is missing `FailNow()`") - } - return false -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - content := []labeledContent{ - {"Error Trace", strings.Join(CallerInfo(), "\n\t\t\t")}, - {"Error", failureMessage}, - } - - // Add test name if the Go version supports it - if n, ok := t.(interface { - Name() string - }); ok { - content = append(content, labeledContent{"Test", n.Name()}) - } - - message := messageFromMsgAndArgs(msgAndArgs...) - if len(message) > 0 { - content = append(content, labeledContent{"Messages", message}) - } - - t.Errorf("\n%s", ""+labeledOutput(content...)) - - return false -} - -type labeledContent struct { - label string - content string -} - -// labeledOutput returns a string consisting of the provided labeledContent. Each labeled output is appended in the following manner: -// -// \t{{label}}:{{align_spaces}}\t{{content}}\n -// -// The initial carriage return is required to undo/erase any padding added by testing.T.Errorf. The "\t{{label}}:" is for the label. -// If a label is shorter than the longest label provided, padding spaces are added to make all the labels match in length. Once this -// alignment is achieved, "\t{{content}}\n" is added for the output. -// -// If the content of the labeledOutput contains line breaks, the subsequent lines are aligned so that they start at the same location as the first line. -func labeledOutput(content ...labeledContent) string { - longestLabel := 0 - for _, v := range content { - if len(v.label) > longestLabel { - longestLabel = len(v.label) - } - } - var output string - for _, v := range content { - output += "\t" + v.label + ":" + strings.Repeat(" ", longestLabel-len(v.label)) + "\t" + indentMessageLines(v.content, longestLabel) + "\n" - } - return output -} - -// Implements asserts that an object is implemented by the specified interface. -// -// assert.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - interfaceType := reflect.TypeOf(interfaceObject).Elem() - - if object == nil { - return Fail(t, fmt.Sprintf("Cannot check if nil implements %v", interfaceType), msgAndArgs...) - } - if !reflect.TypeOf(object).Implements(interfaceType) { - return Fail(t, fmt.Sprintf("%T must implement %v", object, interfaceType), msgAndArgs...) - } - - return true -} - -// NotImplements asserts that an object does not implement the specified interface. -// -// assert.NotImplements(t, (*MyInterface)(nil), new(MyObject)) -func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - interfaceType := reflect.TypeOf(interfaceObject).Elem() - - if object == nil { - return Fail(t, fmt.Sprintf("Cannot check if nil does not implement %v", interfaceType), msgAndArgs...) - } - if reflect.TypeOf(object).Implements(interfaceType) { - return Fail(t, fmt.Sprintf("%T implements %v", object, interfaceType), msgAndArgs...) - } - - return true -} - -func isType(expectedType, object interface{}) bool { - return ObjectsAreEqual(reflect.TypeOf(object), reflect.TypeOf(expectedType)) -} - -// IsType asserts that the specified objects are of the same type. -// -// assert.IsType(t, &MyStruct{}, &MyStruct{}) -func IsType(t TestingT, expectedType, object interface{}, msgAndArgs ...interface{}) bool { - if isType(expectedType, object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Object expected to be of type %T, but was %T", expectedType, object), msgAndArgs...) -} - -// IsNotType asserts that the specified objects are not of the same type. -// -// assert.IsNotType(t, &NotMyStruct{}, &MyStruct{}) -func IsNotType(t TestingT, theType, object interface{}, msgAndArgs ...interface{}) bool { - if !isType(theType, object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Object type expected to be different than %T", theType), msgAndArgs...) -} - -// Equal asserts that two objects are equal. -// -// assert.Equal(t, 123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v == %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if !ObjectsAreEqual(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true -} - -// validateEqualArgs checks whether provided arguments can be safely used in the -// Equal/NotEqual functions. -func validateEqualArgs(expected, actual interface{}) error { - if expected == nil && actual == nil { - return nil - } - - if isFunction(expected) || isFunction(actual) { - return errors.New("cannot take func type as argument") - } - return nil -} - -// Same asserts that two pointers reference the same object. -// -// assert.Same(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Same(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - same, ok := samePointers(expected, actual) - if !ok { - return Fail(t, "Both arguments must be pointers", msgAndArgs...) - } - - if !same { - // both are pointers but not the same type & pointing to the same address - return Fail(t, fmt.Sprintf("Not same: \n"+ - "expected: %p %#[1]v\n"+ - "actual : %p %#[2]v", - expected, actual), msgAndArgs...) - } - - return true -} - -// NotSame asserts that two pointers do not reference the same object. -// -// assert.NotSame(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - same, ok := samePointers(expected, actual) - if !ok { - // fails when the arguments are not pointers - return !(Fail(t, "Both arguments must be pointers", msgAndArgs...)) - } - - if same { - return Fail(t, fmt.Sprintf( - "Expected and actual point to the same object: %p %#[1]v", - expected), msgAndArgs...) - } - return true -} - -// samePointers checks if two generic interface objects are pointers of the same -// type pointing to the same object. It returns two values: same indicating if -// they are the same type and point to the same object, and ok indicating that -// both inputs are pointers. -func samePointers(first, second interface{}) (same bool, ok bool) { - firstPtr, secondPtr := reflect.ValueOf(first), reflect.ValueOf(second) - if firstPtr.Kind() != reflect.Ptr || secondPtr.Kind() != reflect.Ptr { - return false, false // not both are pointers - } - - firstType, secondType := reflect.TypeOf(first), reflect.TypeOf(second) - if firstType != secondType { - return false, true // both are pointers, but of different types - } - - // compare pointer addresses - return first == second, true -} - -// formatUnequalValues takes two values of arbitrary types and returns string -// representations appropriate to be presented to the user. -// -// If the values are not of like type, the returned strings will be prefixed -// with the type name, and the value will be enclosed in parentheses similar -// to a type conversion in the Go grammar. -func formatUnequalValues(expected, actual interface{}) (e string, a string) { - if reflect.TypeOf(expected) != reflect.TypeOf(actual) { - return fmt.Sprintf("%T(%s)", expected, truncatingFormat(expected)), - fmt.Sprintf("%T(%s)", actual, truncatingFormat(actual)) - } - switch expected.(type) { - case time.Duration: - return fmt.Sprintf("%v", expected), fmt.Sprintf("%v", actual) - } - return truncatingFormat(expected), truncatingFormat(actual) -} - -// truncatingFormat formats the data and truncates it if it's too long. -// -// This helps keep formatted error messages lines from exceeding the -// bufio.MaxScanTokenSize max line length that the go testing framework imposes. -func truncatingFormat(data interface{}) string { - value := fmt.Sprintf("%#v", data) - max := bufio.MaxScanTokenSize - 100 // Give us some space the type info too if needed. - if len(value) > max { - value = value[0:max] + "<... truncated>" - } - return value -} - -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. -// -// assert.EqualValues(t, uint32(123), int32(123)) -func EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if !ObjectsAreEqualValues(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal: \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true -} - -// EqualExportedValues asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// assert.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true -// assert.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false -func EqualExportedValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - aType := reflect.TypeOf(expected) - bType := reflect.TypeOf(actual) - - if aType != bType { - return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) - } - - expected = copyExportedFields(expected) - actual = copyExportedFields(actual) - - if !ObjectsAreEqualValues(expected, actual) { - diff := diff(expected, actual) - expected, actual = formatUnequalValues(expected, actual) - return Fail(t, fmt.Sprintf("Not equal (comparing only exported fields): \n"+ - "expected: %s\n"+ - "actual : %s%s", expected, actual, diff), msgAndArgs...) - } - - return true -} - -// Exactly asserts that two objects are equal in value and type. -// -// assert.Exactly(t, int32(123), int64(123)) -func Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - aType := reflect.TypeOf(expected) - bType := reflect.TypeOf(actual) - - if aType != bType { - return Fail(t, fmt.Sprintf("Types expected to match exactly\n\t%v != %v", aType, bType), msgAndArgs...) - } - - return Equal(t, expected, actual, msgAndArgs...) -} - -// NotNil asserts that the specified object is not nil. -// -// assert.NotNil(t, err) -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if !isNil(object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Expected value not to be nil.", msgAndArgs...) -} - -// isNil checks if a specified object is nil or not, without Failing. -func isNil(object interface{}) bool { - if object == nil { - return true - } - - value := reflect.ValueOf(object) - switch value.Kind() { - case - reflect.Chan, reflect.Func, - reflect.Interface, reflect.Map, - reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - - return value.IsNil() - } - - return false -} - -// Nil asserts that the specified object is nil. -// -// assert.Nil(t, err) -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - if isNil(object) { - return true - } - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Expected nil, but got: %#v", object), msgAndArgs...) -} - -// isEmpty gets whether the specified object is considered empty or not. -func isEmpty(object interface{}) bool { - // get nil case out of the way - if object == nil { - return true - } - - return isEmptyValue(reflect.ValueOf(object)) -} - -// isEmptyValue gets whether the specified reflect.Value is considered empty or not. -func isEmptyValue(objValue reflect.Value) bool { - if objValue.IsZero() { - return true - } - // Special cases of non-zero values that we consider empty - switch objValue.Kind() { - // collection types are empty when they have no element - // Note: array types are empty when they match their zero-initialized state. - case reflect.Chan, reflect.Map, reflect.Slice: - return objValue.Len() == 0 - // non-nil pointers are empty if the value they point to is empty - case reflect.Ptr: - return isEmptyValue(objValue.Elem()) - } - return false -} - -// Empty asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// assert.Empty(t, obj) -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - pass := isEmpty(object) - if !pass { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, fmt.Sprintf("Should be empty, but was %v", object), msgAndArgs...) - } - - return pass -} - -// NotEmpty asserts that the specified object is NOT [Empty]. -// -// if assert.NotEmpty(t, obj) { -// assert.Equal(t, "two", obj[1]) -// } -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool { - pass := !isEmpty(object) - if !pass { - if h, ok := t.(tHelper); ok { - h.Helper() - } - Fail(t, fmt.Sprintf("Should NOT be empty, but was %v", object), msgAndArgs...) - } - - return pass -} - -// getLen tries to get the length of an object. -// It returns (0, false) if impossible. -func getLen(x interface{}) (length int, ok bool) { - v := reflect.ValueOf(x) - defer func() { - ok = recover() == nil - }() - return v.Len(), true -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// assert.Len(t, mySlice, 3) -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - l, ok := getLen(object) - if !ok { - return Fail(t, fmt.Sprintf("\"%v\" could not be applied builtin len()", object), msgAndArgs...) - } - - if l != length { - return Fail(t, fmt.Sprintf("\"%v\" should have %d item(s), but has %d", object, length, l), msgAndArgs...) - } - return true -} - -// True asserts that the specified value is true. -// -// assert.True(t, myBool) -func True(t TestingT, value bool, msgAndArgs ...interface{}) bool { - if !value { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Should be true", msgAndArgs...) - } - - return true -} - -// False asserts that the specified value is false. -// -// assert.False(t, myBool) -func False(t TestingT, value bool, msgAndArgs ...interface{}) bool { - if value { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "Should be false", msgAndArgs...) - } - - return true -} - -// NotEqual asserts that the specified values are NOT equal. -// -// assert.NotEqual(t, obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if err := validateEqualArgs(expected, actual); err != nil { - return Fail(t, fmt.Sprintf("Invalid operation: %#v != %#v (%s)", - expected, actual, err), msgAndArgs...) - } - - if ObjectsAreEqual(expected, actual) { - return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) - } - - return true -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// assert.NotEqualValues(t, obj1, obj2) -func NotEqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if ObjectsAreEqualValues(expected, actual) { - return Fail(t, fmt.Sprintf("Should not be: %#v\n", actual), msgAndArgs...) - } - - return true -} - -// containsElement try loop over the list check if the list includes the element. -// return (false, false) if impossible. -// return (true, false) if element was not found. -// return (true, true) if element was found. -func containsElement(list interface{}, element interface{}) (ok, found bool) { - listValue := reflect.ValueOf(list) - listType := reflect.TypeOf(list) - if listType == nil { - return false, false - } - listKind := listType.Kind() - defer func() { - if e := recover(); e != nil { - ok = false - found = false - } - }() - - if listKind == reflect.String { - elementValue := reflect.ValueOf(element) - return true, strings.Contains(listValue.String(), elementValue.String()) - } - - if listKind == reflect.Map { - mapKeys := listValue.MapKeys() - for i := 0; i < len(mapKeys); i++ { - if ObjectsAreEqual(mapKeys[i].Interface(), element) { - return true, true - } - } - return true, false - } - - for i := 0; i < listValue.Len(); i++ { - if ObjectsAreEqual(listValue.Index(i).Interface(), element) { - return true, true - } - } - return true, false -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// assert.Contains(t, "Hello World", "World") -// assert.Contains(t, ["Hello", "World"], "World") -// assert.Contains(t, {"Hello": "World"}, "Hello") -func Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ok, found := containsElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", s, contains), msgAndArgs...) - } - - return true -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// assert.NotContains(t, "Hello World", "Earth") -// assert.NotContains(t, ["Hello", "World"], "Earth") -// assert.NotContains(t, {"Hello": "World"}, "Earth") -func NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ok, found := containsElement(s, contains) - if !ok { - return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", s), msgAndArgs...) - } - if found { - return Fail(t, fmt.Sprintf("%#v should not contain %#v", s, contains), msgAndArgs...) - } - - return true -} - -// Subset asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// assert.Subset(t, [1, 2, 3], [1, 2]) -// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1}) -// assert.Subset(t, [1, 2, 3], {1: "one", 2: "two"}) -// assert.Subset(t, {"x": 1, "y": 2}, ["x"]) -func Subset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if subset == nil { - return true // we consider nil to be equal to the nil set - } - - listKind := reflect.TypeOf(list).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - subsetKind := reflect.TypeOf(subset).Kind() - if subsetKind != reflect.Array && subsetKind != reflect.Slice && subsetKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - if subsetKind == reflect.Map && listKind == reflect.Map { - subsetMap := reflect.ValueOf(subset) - actualMap := reflect.ValueOf(list) - - for _, k := range subsetMap.MapKeys() { - ev := subsetMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !av.IsValid() { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) - } - if !ObjectsAreEqual(ev.Interface(), av.Interface()) { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, subset), msgAndArgs...) - } - } - - return true - } - - subsetList := reflect.ValueOf(subset) - if subsetKind == reflect.Map { - keys := make([]interface{}, subsetList.Len()) - for idx, key := range subsetList.MapKeys() { - keys[idx] = key.Interface() - } - subsetList = reflect.ValueOf(keys) - } - for i := 0; i < subsetList.Len(); i++ { - element := subsetList.Index(i).Interface() - ok, found := containsElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("%#v could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return Fail(t, fmt.Sprintf("%#v does not contain %#v", list, element), msgAndArgs...) - } - } - - return true -} - -// NotSubset asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// assert.NotSubset(t, [1, 3, 4], [1, 2]) -// assert.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) -// assert.NotSubset(t, [1, 3, 4], {1: "one", 2: "two"}) -// assert.NotSubset(t, {"x": 1, "y": 2}, ["z"]) -func NotSubset(t TestingT, list, subset interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if subset == nil { - return Fail(t, "nil is the empty set which is a subset of every set", msgAndArgs...) - } - - listKind := reflect.TypeOf(list).Kind() - if listKind != reflect.Array && listKind != reflect.Slice && listKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", list, listKind), msgAndArgs...) - } - - subsetKind := reflect.TypeOf(subset).Kind() - if subsetKind != reflect.Array && subsetKind != reflect.Slice && subsetKind != reflect.Map { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s", subset, subsetKind), msgAndArgs...) - } - - if subsetKind == reflect.Map && listKind == reflect.Map { - subsetMap := reflect.ValueOf(subset) - actualMap := reflect.ValueOf(list) - - for _, k := range subsetMap.MapKeys() { - ev := subsetMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !av.IsValid() { - return true - } - if !ObjectsAreEqual(ev.Interface(), av.Interface()) { - return true - } - } - - return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) - } - - subsetList := reflect.ValueOf(subset) - if subsetKind == reflect.Map { - keys := make([]interface{}, subsetList.Len()) - for idx, key := range subsetList.MapKeys() { - keys[idx] = key.Interface() - } - subsetList = reflect.ValueOf(keys) - } - for i := 0; i < subsetList.Len(); i++ { - element := subsetList.Index(i).Interface() - ok, found := containsElement(list, element) - if !ok { - return Fail(t, fmt.Sprintf("%q could not be applied builtin len()", list), msgAndArgs...) - } - if !found { - return true - } - } - - return Fail(t, fmt.Sprintf("%q is a subset of %q", subset, list), msgAndArgs...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// assert.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) -func ElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if isEmpty(listA) && isEmpty(listB) { - return true - } - - if !isList(t, listA, msgAndArgs...) || !isList(t, listB, msgAndArgs...) { - return false - } - - extraA, extraB := diffLists(listA, listB) - - if len(extraA) == 0 && len(extraB) == 0 { - return true - } - - return Fail(t, formatListDiff(listA, listB, extraA, extraB), msgAndArgs...) -} - -// isList checks that the provided value is array or slice. -func isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) { - kind := reflect.TypeOf(list).Kind() - if kind != reflect.Array && kind != reflect.Slice { - return Fail(t, fmt.Sprintf("%q has an unsupported type %s, expecting array or slice", list, kind), - msgAndArgs...) - } - return true -} - -// diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B. -// If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and -// 5x in B, it will be 0x in extraA and 3x in extraB). The order of items in both lists is ignored. -func diffLists(listA, listB interface{}) (extraA, extraB []interface{}) { - aValue := reflect.ValueOf(listA) - bValue := reflect.ValueOf(listB) - - aLen := aValue.Len() - bLen := bValue.Len() - - // Mark indexes in bValue that we already used - visited := make([]bool, bLen) - for i := 0; i < aLen; i++ { - element := aValue.Index(i).Interface() - found := false - for j := 0; j < bLen; j++ { - if visited[j] { - continue - } - if ObjectsAreEqual(bValue.Index(j).Interface(), element) { - visited[j] = true - found = true - break - } - } - if !found { - extraA = append(extraA, element) - } - } - - for j := 0; j < bLen; j++ { - if visited[j] { - continue - } - extraB = append(extraB, bValue.Index(j).Interface()) - } - - return -} - -func formatListDiff(listA, listB interface{}, extraA, extraB []interface{}) string { - var msg bytes.Buffer - - msg.WriteString("elements differ") - if len(extraA) > 0 { - msg.WriteString("\n\nextra elements in list A:\n") - msg.WriteString(spewConfig.Sdump(extraA)) - } - if len(extraB) > 0 { - msg.WriteString("\n\nextra elements in list B:\n") - msg.WriteString(spewConfig.Sdump(extraB)) - } - msg.WriteString("\n\nlistA:\n") - msg.WriteString(spewConfig.Sdump(listA)) - msg.WriteString("\n\nlistB:\n") - msg.WriteString(spewConfig.Sdump(listB)) - - return msg.String() -} - -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// assert.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true -// -// assert.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true -func NotElementsMatch(t TestingT, listA, listB interface{}, msgAndArgs ...interface{}) (ok bool) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if isEmpty(listA) && isEmpty(listB) { - return Fail(t, "listA and listB contain the same elements", msgAndArgs) - } - - if !isList(t, listA, msgAndArgs...) { - return Fail(t, "listA is not a list type", msgAndArgs...) - } - if !isList(t, listB, msgAndArgs...) { - return Fail(t, "listB is not a list type", msgAndArgs...) - } - - extraA, extraB := diffLists(listA, listB) - if len(extraA) == 0 && len(extraB) == 0 { - return Fail(t, "listA and listB contain the same elements", msgAndArgs) - } - - return true -} - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - result := comp() - if !result { - Fail(t, "Condition failed!", msgAndArgs...) - } - return result -} - -// PanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics -// methods, and represents a simple func that takes no arguments, and returns nothing. -type PanicTestFunc func() - -// didPanic returns true if the function passed to it panics. Otherwise, it returns false. -func didPanic(f PanicTestFunc) (didPanic bool, message interface{}, stack string) { - didPanic = true - - defer func() { - message = recover() - if didPanic { - stack = string(debug.Stack()) - } - }() - - // call the target function - f() - didPanic = false - - return -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// assert.Panics(t, func(){ GoCrazy() }) -func Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if funcDidPanic, panicValue, _ := didPanic(f); !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - - return true -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithValue(t TestingT, expected interface{}, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - funcDidPanic, panicValue, panickedStack := didPanic(f) - if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - if panicValue != expected { - return Fail(t, fmt.Sprintf("func %#v should panic with value:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, expected, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// assert.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithError(t TestingT, errString string, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - funcDidPanic, panicValue, panickedStack := didPanic(f) - if !funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should panic\n\tPanic value:\t%#v", f, panicValue), msgAndArgs...) - } - panicErr, ok := panicValue.(error) - if !ok || panicErr.Error() != errString { - return Fail(t, fmt.Sprintf("func %#v should panic with error message:\t%#v\n\tPanic value:\t%#v\n\tPanic stack:\t%s", f, errString, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// assert.NotPanics(t, func(){ RemainCalm() }) -func NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if funcDidPanic, panicValue, panickedStack := didPanic(f); funcDidPanic { - return Fail(t, fmt.Sprintf("func %#v should not panic\n\tPanic value:\t%v\n\tPanic stack:\t%s", f, panicValue, panickedStack), msgAndArgs...) - } - - return true -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -func WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - dt := expected.Sub(actual) - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// assert.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func WithinRange(t TestingT, actual, start, end time.Time, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if end.Before(start) { - return Fail(t, "Start should be before end", msgAndArgs...) - } - - if actual.Before(start) { - return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is before the range", actual, start, end), msgAndArgs...) - } else if actual.After(end) { - return Fail(t, fmt.Sprintf("Time %v expected to be in time range %v to %v, but is after the range", actual, start, end), msgAndArgs...) - } - - return true -} - -func toFloat(x interface{}) (float64, bool) { - var xf float64 - xok := true - - switch xn := x.(type) { - case uint: - xf = float64(xn) - case uint8: - xf = float64(xn) - case uint16: - xf = float64(xn) - case uint32: - xf = float64(xn) - case uint64: - xf = float64(xn) - case int: - xf = float64(xn) - case int8: - xf = float64(xn) - case int16: - xf = float64(xn) - case int32: - xf = float64(xn) - case int64: - xf = float64(xn) - case float32: - xf = float64(xn) - case float64: - xf = xn - case time.Duration: - xf = float64(xn) - default: - xok = false - } - - return xf, xok -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// assert.InDelta(t, math.Pi, 22/7.0, 0.01) -func InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - af, aok := toFloat(expected) - bf, bok := toFloat(actual) - - if !aok || !bok { - return Fail(t, "Parameters must be numerical", msgAndArgs...) - } - - if math.IsNaN(af) && math.IsNaN(bf) { - return true - } - - if math.IsNaN(af) { - return Fail(t, "Expected must not be NaN", msgAndArgs...) - } - - if math.IsNaN(bf) { - return Fail(t, fmt.Sprintf("Expected %v with delta %v, but was NaN", expected, delta), msgAndArgs...) - } - - dt := af - bf - if dt < -delta || dt > delta { - return Fail(t, fmt.Sprintf("Max difference between %v and %v allowed is %v, but difference was %v", expected, actual, delta, dt), msgAndArgs...) - } - - return true -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Slice || - reflect.TypeOf(expected).Kind() != reflect.Slice { - return Fail(t, "Parameters must be slice", msgAndArgs...) - } - - actualSlice := reflect.ValueOf(actual) - expectedSlice := reflect.ValueOf(expected) - - for i := 0; i < actualSlice.Len(); i++ { - result := InDelta(t, actualSlice.Index(i).Interface(), expectedSlice.Index(i).Interface(), delta, msgAndArgs...) - if !result { - return result - } - } - - return true -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if expected == nil || actual == nil || - reflect.TypeOf(actual).Kind() != reflect.Map || - reflect.TypeOf(expected).Kind() != reflect.Map { - return Fail(t, "Arguments must be maps", msgAndArgs...) - } - - expectedMap := reflect.ValueOf(expected) - actualMap := reflect.ValueOf(actual) - - if expectedMap.Len() != actualMap.Len() { - return Fail(t, "Arguments must have the same number of keys", msgAndArgs...) - } - - for _, k := range expectedMap.MapKeys() { - ev := expectedMap.MapIndex(k) - av := actualMap.MapIndex(k) - - if !ev.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in expected map", k), msgAndArgs...) - } - - if !av.IsValid() { - return Fail(t, fmt.Sprintf("missing key %q in actual map", k), msgAndArgs...) - } - - if !InDelta( - t, - ev.Interface(), - av.Interface(), - delta, - msgAndArgs..., - ) { - return false - } - } - - return true -} - -func calcRelativeError(expected, actual interface{}) (float64, error) { - af, aok := toFloat(expected) - bf, bok := toFloat(actual) - if !aok || !bok { - return 0, fmt.Errorf("Parameters must be numerical") - } - if math.IsNaN(af) && math.IsNaN(bf) { - return 0, nil - } - if math.IsNaN(af) { - return 0, errors.New("expected value must not be NaN") - } - if af == 0 { - return 0, fmt.Errorf("expected value must have a value other than zero to calculate the relative error") - } - if math.IsNaN(bf) { - return 0, errors.New("actual value must not be NaN") - } - - return math.Abs(af-bf) / math.Abs(af), nil -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if math.IsNaN(epsilon) { - return Fail(t, "epsilon must not be NaN", msgAndArgs...) - } - actualEpsilon, err := calcRelativeError(expected, actual) - if err != nil { - return Fail(t, err.Error(), msgAndArgs...) - } - if math.IsNaN(actualEpsilon) { - return Fail(t, "relative error is NaN", msgAndArgs...) - } - if actualEpsilon > epsilon { - return Fail(t, fmt.Sprintf("Relative error is too high: %#v (expected)\n"+ - " < %#v (actual)", epsilon, actualEpsilon), msgAndArgs...) - } - - return true -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - if expected == nil || actual == nil { - return Fail(t, "Parameters must be slice", msgAndArgs...) - } - - expectedSlice := reflect.ValueOf(expected) - actualSlice := reflect.ValueOf(actual) - - if expectedSlice.Type().Kind() != reflect.Slice { - return Fail(t, "Expected value must be slice", msgAndArgs...) - } - - expectedLen := expectedSlice.Len() - if !IsType(t, expected, actual) || !Len(t, actual, expectedLen) { - return false - } - - for i := 0; i < expectedLen; i++ { - if !InEpsilon(t, expectedSlice.Index(i).Interface(), actualSlice.Index(i).Interface(), epsilon, "at index %d", i) { - return false - } - } - - return true -} - -/* - Errors -*/ - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if assert.NoError(t, err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func NoError(t TestingT, err error, msgAndArgs ...interface{}) bool { - if err != nil { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, fmt.Sprintf("Received unexpected error:\n%+v", err), msgAndArgs...) - } - - return true -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// assert.Error(t, err) -func Error(t TestingT, err error, msgAndArgs ...interface{}) bool { - if err == nil { - if h, ok := t.(tHelper); ok { - h.Helper() - } - return Fail(t, "An error is expected but got nil.", msgAndArgs...) - } - - return true -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// assert.EqualError(t, err, expectedErrorString) -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !Error(t, theError, msgAndArgs...) { - return false - } - expected := errString - actual := theError.Error() - // don't need to use deep equals here, we know they are both strings - if expected != actual { - return Fail(t, fmt.Sprintf("Error message not equal:\n"+ - "expected: %q\n"+ - "actual : %q", expected, actual), msgAndArgs...) - } - return true -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// assert.ErrorContains(t, err, expectedErrorSubString) -func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !Error(t, theError, msgAndArgs...) { - return false - } - - actual := theError.Error() - if !strings.Contains(actual, contains) { - return Fail(t, fmt.Sprintf("Error %#v does not contain %#v", actual, contains), msgAndArgs...) - } - - return true -} - -// matchRegexp return true if a specified regexp matches a string. -func matchRegexp(rx interface{}, str interface{}) bool { - var r *regexp.Regexp - if rr, ok := rx.(*regexp.Regexp); ok { - r = rr - } else { - r = regexp.MustCompile(fmt.Sprint(rx)) - } - - switch v := str.(type) { - case []byte: - return r.Match(v) - case string: - return r.MatchString(v) - default: - return r.MatchString(fmt.Sprint(v)) - } -} - -// Regexp asserts that a specified regexp matches a string. -// -// assert.Regexp(t, regexp.MustCompile("start"), "it's starting") -// assert.Regexp(t, "start...$", "it's not starting") -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - match := matchRegexp(rx, str) - - if !match { - Fail(t, fmt.Sprintf("Expect \"%v\" to match \"%v\"", str, rx), msgAndArgs...) - } - - return match -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// assert.NotRegexp(t, "^start", "it's not starting") -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - match := matchRegexp(rx, str) - - if match { - Fail(t, fmt.Sprintf("Expect \"%v\" to NOT match \"%v\"", str, rx), msgAndArgs...) - } - - return !match -} - -// Zero asserts that i is the zero value for its type. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if i != nil && !reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// NotZero asserts that i is not the zero value for its type. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if i == nil || reflect.DeepEqual(i, reflect.Zero(reflect.TypeOf(i)).Interface()) { - return Fail(t, fmt.Sprintf("Should not be zero, but was %v", i), msgAndArgs...) - } - return true -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a directory", path), msgAndArgs...) - } - return true -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - return true - } - if info.IsDir() { - return true - } - return Fail(t, fmt.Sprintf("file %q exists", path), msgAndArgs...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return Fail(t, fmt.Sprintf("unable to find file %q", path), msgAndArgs...) - } - return Fail(t, fmt.Sprintf("error when running os.Lstat(%q): %s", path, err), msgAndArgs...) - } - if !info.IsDir() { - return Fail(t, fmt.Sprintf("%q is a file", path), msgAndArgs...) - } - return true -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - info, err := os.Lstat(path) - if err != nil { - if os.IsNotExist(err) { - return true - } - return true - } - if !info.IsDir() { - return true - } - return Fail(t, fmt.Sprintf("directory %q exists", path), msgAndArgs...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - var expectedJSONAsInterface, actualJSONAsInterface interface{} - - if err := json.Unmarshal([]byte(expected), &expectedJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid json.\nJSON parsing error: '%s'", expected, err.Error()), msgAndArgs...) - } - - // Shortcut if same bytes - if actual == expected { - return true - } - - if err := json.Unmarshal([]byte(actual), &actualJSONAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid json.\nJSON parsing error: '%s'", actual, err.Error()), msgAndArgs...) - } - - return Equal(t, expectedJSONAsInterface, actualJSONAsInterface, msgAndArgs...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - var expectedYAMLAsInterface, actualYAMLAsInterface interface{} - - if err := yaml.Unmarshal([]byte(expected), &expectedYAMLAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Expected value ('%s') is not valid yaml.\nYAML parsing error: '%s'", expected, err.Error()), msgAndArgs...) - } - - // Shortcut if same bytes - if actual == expected { - return true - } - - if err := yaml.Unmarshal([]byte(actual), &actualYAMLAsInterface); err != nil { - return Fail(t, fmt.Sprintf("Input ('%s') needs to be valid yaml.\nYAML error: '%s'", actual, err.Error()), msgAndArgs...) - } - - return Equal(t, expectedYAMLAsInterface, actualYAMLAsInterface, msgAndArgs...) -} - -func typeAndKind(v interface{}) (reflect.Type, reflect.Kind) { - t := reflect.TypeOf(v) - k := t.Kind() - - if k == reflect.Ptr { - t = t.Elem() - k = t.Kind() - } - return t, k -} - -// diff returns a diff of both values as long as both are of the same type and -// are a struct, map, slice, array or string. Otherwise it returns an empty string. -func diff(expected interface{}, actual interface{}) string { - if expected == nil || actual == nil { - return "" - } - - et, ek := typeAndKind(expected) - at, _ := typeAndKind(actual) - - if et != at { - return "" - } - - if ek != reflect.Struct && ek != reflect.Map && ek != reflect.Slice && ek != reflect.Array && ek != reflect.String { - return "" - } - - var e, a string - - switch et { - case reflect.TypeOf(""): - e = reflect.ValueOf(expected).String() - a = reflect.ValueOf(actual).String() - case reflect.TypeOf(time.Time{}): - e = spewConfigStringerEnabled.Sdump(expected) - a = spewConfigStringerEnabled.Sdump(actual) - default: - e = spewConfig.Sdump(expected) - a = spewConfig.Sdump(actual) - } - - diff, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{ - A: difflib.SplitLines(e), - B: difflib.SplitLines(a), - FromFile: "Expected", - FromDate: "", - ToFile: "Actual", - ToDate: "", - Context: 1, - }) - - return "\n\nDiff:\n" + diff -} - -func isFunction(arg interface{}) bool { - if arg == nil { - return false - } - return reflect.TypeOf(arg).Kind() == reflect.Func -} - -var spewConfig = spew.ConfigState{ - Indent: " ", - DisablePointerAddresses: true, - DisableCapacities: true, - SortKeys: true, - DisableMethods: true, - MaxDepth: 10, -} - -var spewConfigStringerEnabled = spew.ConfigState{ - Indent: " ", - DisablePointerAddresses: true, - DisableCapacities: true, - SortKeys: true, - MaxDepth: 10, -} - -type tHelper = interface { - Helper() -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// assert.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) -func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ch := make(chan bool, 1) - checkCond := func() { ch <- condition() } - - timer := time.NewTimer(waitFor) - defer timer.Stop() - - ticker := time.NewTicker(tick) - defer ticker.Stop() - - var tickC <-chan time.Time - - // Check the condition once first on the initial call. - go checkCond() - - for { - select { - case <-timer.C: - return Fail(t, "Condition never satisfied", msgAndArgs...) - case <-tickC: - tickC = nil - go checkCond() - case v := <-ch: - if v { - return true - } - tickC = ticker.C - } - } -} - -// CollectT implements the TestingT interface and collects all errors. -type CollectT struct { - // A slice of errors. Non-nil slice denotes a failure. - // If it's non-nil but len(c.errors) == 0, this is also a failure - // obtained by direct c.FailNow() call. - errors []error -} - -// Helper is like [testing.T.Helper] but does nothing. -func (CollectT) Helper() {} - -// Errorf collects the error. -func (c *CollectT) Errorf(format string, args ...interface{}) { - c.errors = append(c.errors, fmt.Errorf(format, args...)) -} - -// FailNow stops execution by calling runtime.Goexit. -func (c *CollectT) FailNow() { - c.fail() - runtime.Goexit() -} - -// Deprecated: That was a method for internal usage that should not have been published. Now just panics. -func (*CollectT) Reset() { - panic("Reset() is deprecated") -} - -// Deprecated: That was a method for internal usage that should not have been published. Now just panics. -func (*CollectT) Copy(TestingT) { - panic("Copy() is deprecated") -} - -func (c *CollectT) fail() { - if !c.failed() { - c.errors = []error{} // Make it non-nil to mark a failure. - } -} - -func (c *CollectT) failed() bool { - return c.errors != nil -} - -// EventuallyWithT asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// assert.EventuallyWithT(t, func(c *assert.CollectT) { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func EventuallyWithT(t TestingT, condition func(collect *CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - var lastFinishedTickErrs []error - ch := make(chan *CollectT, 1) - - checkCond := func() { - collect := new(CollectT) - defer func() { - ch <- collect - }() - condition(collect) - } - - timer := time.NewTimer(waitFor) - defer timer.Stop() - - ticker := time.NewTicker(tick) - defer ticker.Stop() - - var tickC <-chan time.Time - - // Check the condition once first on the initial call. - go checkCond() - - for { - select { - case <-timer.C: - for _, err := range lastFinishedTickErrs { - t.Errorf("%v", err) - } - return Fail(t, "Condition never satisfied", msgAndArgs...) - case <-tickC: - tickC = nil - go checkCond() - case collect := <-ch: - if !collect.failed() { - return true - } - // Keep the errors from the last ended condition, so that they can be copied to t if timeout is reached. - lastFinishedTickErrs = collect.errors - tickC = ticker.C - } - } -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// assert.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) -func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - - ch := make(chan bool, 1) - checkCond := func() { ch <- condition() } - - timer := time.NewTimer(waitFor) - defer timer.Stop() - - ticker := time.NewTicker(tick) - defer ticker.Stop() - - var tickC <-chan time.Time - - // Check the condition once first on the initial call. - go checkCond() - - for { - select { - case <-timer.C: - return true - case <-tickC: - tickC = nil - go checkCond() - case v := <-ch: - if v { - return Fail(t, "Condition satisfied", msgAndArgs...) - } - tickC = ticker.C - } - } -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if errors.Is(err, target) { - return true - } - - var expectedText string - if target != nil { - expectedText = target.Error() - if err == nil { - return Fail(t, fmt.Sprintf("Expected error with %q in chain but got nil.", expectedText), msgAndArgs...) - } - } - - chain := buildErrorChainString(err, false) - - return Fail(t, fmt.Sprintf("Target error should be in err chain:\n"+ - "expected: %q\n"+ - "in chain: %s", expectedText, chain, - ), msgAndArgs...) -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIs(t TestingT, err, target error, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !errors.Is(err, target) { - return true - } - - var expectedText string - if target != nil { - expectedText = target.Error() - } - - chain := buildErrorChainString(err, false) - - return Fail(t, fmt.Sprintf("Target error should not be in err chain:\n"+ - "found: %q\n"+ - "in chain: %s", expectedText, chain, - ), msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if errors.As(err, target) { - return true - } - - expectedType := reflect.TypeOf(target).Elem().String() - if err == nil { - return Fail(t, fmt.Sprintf("An error is expected but got nil.\n"+ - "expected: %s", expectedType), msgAndArgs...) - } - - chain := buildErrorChainString(err, true) - - return Fail(t, fmt.Sprintf("Should be in error chain:\n"+ - "expected: %s\n"+ - "in chain: %s", expectedType, chain, - ), msgAndArgs...) -} - -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if !errors.As(err, target) { - return true - } - - chain := buildErrorChainString(err, true) - - return Fail(t, fmt.Sprintf("Target error should not be in err chain:\n"+ - "found: %s\n"+ - "in chain: %s", reflect.TypeOf(target).Elem().String(), chain, - ), msgAndArgs...) -} - -func unwrapAll(err error) (errs []error) { - errs = append(errs, err) - switch x := err.(type) { - case interface{ Unwrap() error }: - err = x.Unwrap() - if err == nil { - return - } - errs = append(errs, unwrapAll(err)...) - case interface{ Unwrap() []error }: - for _, err := range x.Unwrap() { - errs = append(errs, unwrapAll(err)...) - } - } - return -} - -func buildErrorChainString(err error, withType bool) string { - if err == nil { - return "" - } - - var chain string - errs := unwrapAll(err) - for i := range errs { - if i != 0 { - chain += "\n\t" - } - chain += fmt.Sprintf("%q", errs[i].Error()) - if withType { - chain += fmt.Sprintf(" (%T)", errs[i]) - } - } - return chain -} diff --git a/vendor/github.com/stretchr/testify/assert/doc.go b/vendor/github.com/stretchr/testify/assert/doc.go deleted file mode 100644 index a0b953aa5c..0000000000 --- a/vendor/github.com/stretchr/testify/assert/doc.go +++ /dev/null @@ -1,50 +0,0 @@ -// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system. -// -// # Note -// -// All functions in this package return a bool value indicating whether the assertion has passed. -// -// # Example Usage -// -// The following is a complete example using assert in a standard test function: -// -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// if you assert many times, use the format below: -// -// import ( -// "testing" -// "github.com/stretchr/testify/assert" -// ) -// -// func TestSomething(t *testing.T) { -// assert := assert.New(t) -// -// var a string = "Hello" -// var b string = "Hello" -// -// assert.Equal(a, b, "The two words should be the same.") -// } -// -// # Assertions -// -// Assertions allow you to easily write test code, and are global funcs in the `assert` package. -// All assertion functions take, as the first argument, the `*testing.T` object provided by the -// testing framework. This allows the assertion funcs to write the failings and other details to -// the correct place. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package assert diff --git a/vendor/github.com/stretchr/testify/assert/errors.go b/vendor/github.com/stretchr/testify/assert/errors.go deleted file mode 100644 index ac9dc9d1d6..0000000000 --- a/vendor/github.com/stretchr/testify/assert/errors.go +++ /dev/null @@ -1,10 +0,0 @@ -package assert - -import ( - "errors" -) - -// AnError is an error instance useful for testing. If the code does not care -// about error specifics, and only needs to return the error for example, this -// error should be used to make the test code more readable. -var AnError = errors.New("assert.AnError general error for testing") diff --git a/vendor/github.com/stretchr/testify/assert/forward_assertions.go b/vendor/github.com/stretchr/testify/assert/forward_assertions.go deleted file mode 100644 index df189d2348..0000000000 --- a/vendor/github.com/stretchr/testify/assert/forward_assertions.go +++ /dev/null @@ -1,16 +0,0 @@ -package assert - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=assert -template=assertion_forward.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/stretchr/testify/assert/http_assertions.go b/vendor/github.com/stretchr/testify/assert/http_assertions.go deleted file mode 100644 index 5a6bb75f2c..0000000000 --- a/vendor/github.com/stretchr/testify/assert/http_assertions.go +++ /dev/null @@ -1,165 +0,0 @@ -package assert - -import ( - "fmt" - "net/http" - "net/http/httptest" - "net/url" - "strings" -) - -// httpCode is a helper that returns HTTP code of the response. It returns -1 and -// an error if building a new request fails. -func httpCode(handler http.HandlerFunc, method, url string, values url.Values) (int, error) { - w := httptest.NewRecorder() - req, err := http.NewRequest(method, url, http.NoBody) - if err != nil { - return -1, err - } - req.URL.RawQuery = values.Encode() - handler(w, req) - return w.Code, nil -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) - } - - isSuccessCode := code >= http.StatusOK && code <= http.StatusPartialContent - if !isSuccessCode { - Fail(t, fmt.Sprintf("Expected HTTP success status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) - } - - return isSuccessCode -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) - } - - isRedirectCode := code >= http.StatusMultipleChoices && code <= http.StatusTemporaryRedirect - if !isRedirectCode { - Fail(t, fmt.Sprintf("Expected HTTP redirect status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) - } - - return isRedirectCode -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) - } - - isErrorCode := code >= http.StatusBadRequest - if !isErrorCode { - Fail(t, fmt.Sprintf("Expected HTTP error status code for %q but received %d", url+"?"+values.Encode(), code), msgAndArgs...) - } - - return isErrorCode -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// assert.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - code, err := httpCode(handler, method, url, values) - if err != nil { - Fail(t, fmt.Sprintf("Failed to build test request, got error: %s", err), msgAndArgs...) - } - - successful := code == statuscode - if !successful { - Fail(t, fmt.Sprintf("Expected HTTP status code %d for %q but received %d", statuscode, url+"?"+values.Encode(), code), msgAndArgs...) - } - - return successful -} - -// HTTPBody is a helper that returns HTTP body of the response. It returns -// empty string if building a new request fails. -func HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string { - w := httptest.NewRecorder() - if len(values) > 0 { - url += "?" + values.Encode() - } - req, err := http.NewRequest(method, url, http.NoBody) - if err != nil { - return "" - } - handler(w, req) - return w.Body.String() -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// assert.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if !contains { - Fail(t, fmt.Sprintf("Expected response body for %q to contain %q but found %q", url+"?"+values.Encode(), str, body), msgAndArgs...) - } - - return contains -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// assert.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) bool { - if h, ok := t.(tHelper); ok { - h.Helper() - } - body := HTTPBody(handler, method, url, values) - - contains := strings.Contains(body, fmt.Sprint(str)) - if contains { - Fail(t, fmt.Sprintf("Expected response body for %q to NOT contain %q but found %q", url+"?"+values.Encode(), str, body), msgAndArgs...) - } - - return !contains -} diff --git a/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go b/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go deleted file mode 100644 index 5a74c4f4d5..0000000000 --- a/vendor/github.com/stretchr/testify/assert/yaml/yaml_custom.go +++ /dev/null @@ -1,24 +0,0 @@ -//go:build testify_yaml_custom && !testify_yaml_fail && !testify_yaml_default - -// Package yaml is an implementation of YAML functions that calls a pluggable implementation. -// -// This implementation is selected with the testify_yaml_custom build tag. -// -// go test -tags testify_yaml_custom -// -// This implementation can be used at build time to replace the default implementation -// to avoid linking with [gopkg.in/yaml.v3]. -// -// In your test package: -// -// import assertYaml "github.com/stretchr/testify/assert/yaml" -// -// func init() { -// assertYaml.Unmarshal = func (in []byte, out interface{}) error { -// // ... -// return nil -// } -// } -package yaml - -var Unmarshal func(in []byte, out interface{}) error diff --git a/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go b/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go deleted file mode 100644 index 0bae80e34a..0000000000 --- a/vendor/github.com/stretchr/testify/assert/yaml/yaml_default.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build !testify_yaml_fail && !testify_yaml_custom - -// Package yaml is just an indirection to handle YAML deserialization. -// -// This package is just an indirection that allows the builder to override the -// indirection with an alternative implementation of this package that uses -// another implementation of YAML deserialization. This allows to not either not -// use YAML deserialization at all, or to use another implementation than -// [gopkg.in/yaml.v3] (for example for license compatibility reasons, see [PR #1120]). -// -// Alternative implementations are selected using build tags: -// -// - testify_yaml_fail: [Unmarshal] always fails with an error -// - testify_yaml_custom: [Unmarshal] is a variable. Caller must initialize it -// before calling any of [github.com/stretchr/testify/assert.YAMLEq] or -// [github.com/stretchr/testify/assert.YAMLEqf]. -// -// Usage: -// -// go test -tags testify_yaml_fail -// -// You can check with "go list" which implementation is linked: -// -// go list -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// go list -tags testify_yaml_fail -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// go list -tags testify_yaml_custom -f '{{.Imports}}' github.com/stretchr/testify/assert/yaml -// -// [PR #1120]: https://github.com/stretchr/testify/pull/1120 -package yaml - -import goyaml "gopkg.in/yaml.v3" - -// Unmarshal is just a wrapper of [gopkg.in/yaml.v3.Unmarshal]. -func Unmarshal(in []byte, out interface{}) error { - return goyaml.Unmarshal(in, out) -} diff --git a/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go b/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go deleted file mode 100644 index 8041803fd2..0000000000 --- a/vendor/github.com/stretchr/testify/assert/yaml/yaml_fail.go +++ /dev/null @@ -1,17 +0,0 @@ -//go:build testify_yaml_fail && !testify_yaml_custom && !testify_yaml_default - -// Package yaml is an implementation of YAML functions that always fail. -// -// This implementation can be used at build time to replace the default implementation -// to avoid linking with [gopkg.in/yaml.v3]: -// -// go test -tags testify_yaml_fail -package yaml - -import "errors" - -var errNotImplemented = errors.New("YAML functions are not available (see https://pkg.go.dev/github.com/stretchr/testify/assert/yaml)") - -func Unmarshal([]byte, interface{}) error { - return errNotImplemented -} diff --git a/vendor/github.com/stretchr/testify/require/doc.go b/vendor/github.com/stretchr/testify/require/doc.go deleted file mode 100644 index c8e3f94a80..0000000000 --- a/vendor/github.com/stretchr/testify/require/doc.go +++ /dev/null @@ -1,31 +0,0 @@ -// Package require implements the same assertions as the `assert` package but -// stops test execution when a test fails. -// -// # Example Usage -// -// The following is a complete example using require in a standard test function: -// -// import ( -// "testing" -// "github.com/stretchr/testify/require" -// ) -// -// func TestSomething(t *testing.T) { -// -// var a string = "Hello" -// var b string = "Hello" -// -// require.Equal(t, a, b, "The two words should be the same.") -// -// } -// -// # Assertions -// -// The `require` package have same global functions as in the `assert` package, -// but instead of returning a boolean result they call `t.FailNow()`. -// A consequence of this is that it must be called from the goroutine running -// the test function, not from other goroutines created during the test. -// -// Every assertion function also takes an optional string message as the final argument, -// allowing custom error messages to be appended to the message the assertion method outputs. -package require diff --git a/vendor/github.com/stretchr/testify/require/forward_requirements.go b/vendor/github.com/stretchr/testify/require/forward_requirements.go deleted file mode 100644 index 1dcb2338c4..0000000000 --- a/vendor/github.com/stretchr/testify/require/forward_requirements.go +++ /dev/null @@ -1,16 +0,0 @@ -package require - -// Assertions provides assertion methods around the -// TestingT interface. -type Assertions struct { - t TestingT -} - -// New makes a new Assertions object for the specified TestingT. -func New(t TestingT) *Assertions { - return &Assertions{ - t: t, - } -} - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require_forward.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/stretchr/testify/require/require.go b/vendor/github.com/stretchr/testify/require/require.go deleted file mode 100644 index 2d02f9bcef..0000000000 --- a/vendor/github.com/stretchr/testify/require/require.go +++ /dev/null @@ -1,2180 +0,0 @@ -// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Condition(t, comp, msgAndArgs...) { - return - } - t.FailNow() -} - -// Conditionf uses a Comparison to assert a complex condition. -func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Conditionf(t, comp, msg, args...) { - return - } - t.FailNow() -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// require.Contains(t, "Hello World", "World") -// require.Contains(t, ["Hello", "World"], "World") -// require.Contains(t, {"Hello": "World"}, "Hello") -func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Contains(t, s, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// require.Containsf(t, "Hello World", "World", "error message %s", "formatted") -// require.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted") -// require.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted") -func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Containsf(t, s, contains, msg, args...) { - return - } - t.FailNow() -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.DirExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func DirExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.DirExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) -func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ElementsMatch(t, listA, listB, msgAndArgs...) { - return - } - t.FailNow() -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// require.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ElementsMatchf(t, listA, listB, msg, args...) { - return - } - t.FailNow() -} - -// Empty asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// require.Empty(t, obj) -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Empty(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Emptyf asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// require.Emptyf(t, obj, "error message %s", "formatted") -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Emptyf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// Equal asserts that two objects are equal. -// -// require.Equal(t, 123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Equal(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// require.EqualError(t, err, expectedErrorString) -func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualError(t, theError, errString, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// require.EqualErrorf(t, err, expectedErrorString, "error message %s", "formatted") -func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualErrorf(t, theError, errString, msg, args...) { - return - } - t.FailNow() -} - -// EqualExportedValues asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// require.EqualExportedValues(t, S{1, 2}, S{1, 3}) => true -// require.EqualExportedValues(t, S{1, 2}, S{2, 3}) => false -func EqualExportedValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualExportedValues(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualExportedValuesf asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// require.EqualExportedValuesf(t, S{1, 2}, S{1, 3}, "error message %s", "formatted") => true -// require.EqualExportedValuesf(t, S{1, 2}, S{2, 3}, "error message %s", "formatted") => false -func EqualExportedValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualExportedValuesf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. -// -// require.EqualValues(t, uint32(123), int32(123)) -func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualValues(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. -// -// require.EqualValuesf(t, uint32(123), int32(123), "error message %s", "formatted") -func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EqualValuesf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Equalf asserts that two objects are equal. -// -// require.Equalf(t, 123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Equalf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// require.Error(t, err) -func Error(t TestingT, err error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Error(t, err, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorAs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func ErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorAsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// require.ErrorContains(t, err, expectedErrorSubString) -func ErrorContains(t TestingT, theError error, contains string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorContains(t, theError, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// require.ErrorContainsf(t, err, expectedErrorSubString, "error message %s", "formatted") -func ErrorContainsf(t TestingT, theError error, contains string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorContainsf(t, theError, contains, msg, args...) { - return - } - t.FailNow() -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorIs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func ErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.ErrorIsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// require.Errorf(t, err, "error message %s", "formatted") -func Errorf(t TestingT, err error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Errorf(t, err, msg, args...) { - return - } - t.FailNow() -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// require.Eventually(t, func() bool { return true; }, time.Second, 10*time.Millisecond) -func Eventually(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Eventually(t, condition, waitFor, tick, msgAndArgs...) { - return - } - t.FailNow() -} - -// EventuallyWithT asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// require.EventuallyWithT(t, func(c *require.CollectT) { -// // add assertions as needed; any assertion failure will fail the current tick -// require.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func EventuallyWithT(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EventuallyWithT(t, condition, waitFor, tick, msgAndArgs...) { - return - } - t.FailNow() -} - -// EventuallyWithTf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// require.EventuallyWithTf(t, func(c *require.CollectT, "error message %s", "formatted") { -// // add assertions as needed; any assertion failure will fail the current tick -// require.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func EventuallyWithTf(t TestingT, condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.EventuallyWithTf(t, condition, waitFor, tick, msg, args...) { - return - } - t.FailNow() -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// require.Eventuallyf(t, func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Eventuallyf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Eventuallyf(t, condition, waitFor, tick, msg, args...) { - return - } - t.FailNow() -} - -// Exactly asserts that two objects are equal in value and type. -// -// require.Exactly(t, int32(123), int64(123)) -func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Exactly(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// require.Exactlyf(t, int32(123), int64(123), "error message %s", "formatted") -func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Exactlyf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Fail reports a failure through -func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Fail(t, failureMessage, msgAndArgs...) { - return - } - t.FailNow() -} - -// FailNow fails test -func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FailNow(t, failureMessage, msgAndArgs...) { - return - } - t.FailNow() -} - -// FailNowf fails test -func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FailNowf(t, failureMessage, msg, args...) { - return - } - t.FailNow() -} - -// Failf reports a failure through -func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Failf(t, failureMessage, msg, args...) { - return - } - t.FailNow() -} - -// False asserts that the specified value is false. -// -// require.False(t, myBool) -func False(t TestingT, value bool, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.False(t, value, msgAndArgs...) { - return - } - t.FailNow() -} - -// Falsef asserts that the specified value is false. -// -// require.Falsef(t, myBool, "error message %s", "formatted") -func Falsef(t TestingT, value bool, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Falsef(t, value, msg, args...) { - return - } - t.FailNow() -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FileExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func FileExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.FileExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// Greater asserts that the first element is greater than the second -// -// require.Greater(t, 2, 1) -// require.Greater(t, float64(2), float64(1)) -// require.Greater(t, "b", "a") -func Greater(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Greater(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// require.GreaterOrEqual(t, 2, 1) -// require.GreaterOrEqual(t, 2, 2) -// require.GreaterOrEqual(t, "b", "a") -// require.GreaterOrEqual(t, "b", "b") -func GreaterOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.GreaterOrEqual(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// require.GreaterOrEqualf(t, 2, 1, "error message %s", "formatted") -// require.GreaterOrEqualf(t, 2, 2, "error message %s", "formatted") -// require.GreaterOrEqualf(t, "b", "a", "error message %s", "formatted") -// require.GreaterOrEqualf(t, "b", "b", "error message %s", "formatted") -func GreaterOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.GreaterOrEqualf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Greaterf asserts that the first element is greater than the second -// -// require.Greaterf(t, 2, 1, "error message %s", "formatted") -// require.Greaterf(t, float64(2), float64(1), "error message %s", "formatted") -// require.Greaterf(t, "b", "a", "error message %s", "formatted") -func Greaterf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Greaterf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// require.HTTPBodyContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyContains(t, handler, method, url, values, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// require.HTTPBodyContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyContainsf(t, handler, method, url, values, str, msg, args...) { - return - } - t.FailNow() -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// require.HTTPBodyNotContains(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyNotContains(t, handler, method, url, values, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// require.HTTPBodyNotContainsf(t, myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPBodyNotContainsf(t, handler, method, url, values, str, msg, args...) { - return - } - t.FailNow() -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// require.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPError(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// require.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPErrorf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// require.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPRedirect(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// require.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPRedirectf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// require.HTTPStatusCode(t, myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCode(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPStatusCode(t, handler, method, url, values, statuscode, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// require.HTTPStatusCodef(t, myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPStatusCodef(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPStatusCodef(t, handler, method, url, values, statuscode, msg, args...) { - return - } - t.FailNow() -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// require.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPSuccess(t, handler, method, url, values, msgAndArgs...) { - return - } - t.FailNow() -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// require.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.HTTPSuccessf(t, handler, method, url, values, msg, args...) { - return - } - t.FailNow() -} - -// Implements asserts that an object is implemented by the specified interface. -// -// require.Implements(t, (*MyInterface)(nil), new(MyObject)) -func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Implements(t, interfaceObject, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// require.Implementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Implementsf(t, interfaceObject, object, msg, args...) { - return - } - t.FailNow() -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// require.InDelta(t, math.Pi, 22/7.0, 0.01) -func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDelta(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValues(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaMapValues(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func InDeltaMapValuesf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaMapValuesf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// require.InDeltaf(t, math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InDeltaf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) { - return - } - t.FailNow() -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) { - return - } - t.FailNow() -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) { - return - } - t.FailNow() -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) { - return - } - t.FailNow() -} - -// IsDecreasing asserts that the collection is decreasing -// -// require.IsDecreasing(t, []int{2, 1, 0}) -// require.IsDecreasing(t, []float{2, 1}) -// require.IsDecreasing(t, []string{"b", "a"}) -func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsDecreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsDecreasingf asserts that the collection is decreasing -// -// require.IsDecreasingf(t, []int{2, 1, 0}, "error message %s", "formatted") -// require.IsDecreasingf(t, []float{2, 1}, "error message %s", "formatted") -// require.IsDecreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsDecreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsIncreasing asserts that the collection is increasing -// -// require.IsIncreasing(t, []int{1, 2, 3}) -// require.IsIncreasing(t, []float{1, 2}) -// require.IsIncreasing(t, []string{"a", "b"}) -func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsIncreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsIncreasingf asserts that the collection is increasing -// -// require.IsIncreasingf(t, []int{1, 2, 3}, "error message %s", "formatted") -// require.IsIncreasingf(t, []float{1, 2}, "error message %s", "formatted") -// require.IsIncreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsIncreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// require.IsNonDecreasing(t, []int{1, 1, 2}) -// require.IsNonDecreasing(t, []float{1, 2}) -// require.IsNonDecreasing(t, []string{"a", "b"}) -func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonDecreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// require.IsNonDecreasingf(t, []int{1, 1, 2}, "error message %s", "formatted") -// require.IsNonDecreasingf(t, []float{1, 2}, "error message %s", "formatted") -// require.IsNonDecreasingf(t, []string{"a", "b"}, "error message %s", "formatted") -func IsNonDecreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonDecreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// require.IsNonIncreasing(t, []int{2, 1, 1}) -// require.IsNonIncreasing(t, []float{2, 1}) -// require.IsNonIncreasing(t, []string{"b", "a"}) -func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonIncreasing(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// require.IsNonIncreasingf(t, []int{2, 1, 1}, "error message %s", "formatted") -// require.IsNonIncreasingf(t, []float{2, 1}, "error message %s", "formatted") -// require.IsNonIncreasingf(t, []string{"b", "a"}, "error message %s", "formatted") -func IsNonIncreasingf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNonIncreasingf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// IsNotType asserts that the specified objects are not of the same type. -// -// require.IsNotType(t, &NotMyStruct{}, &MyStruct{}) -func IsNotType(t TestingT, theType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNotType(t, theType, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsNotTypef asserts that the specified objects are not of the same type. -// -// require.IsNotTypef(t, &NotMyStruct{}, &MyStruct{}, "error message %s", "formatted") -func IsNotTypef(t TestingT, theType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsNotTypef(t, theType, object, msg, args...) { - return - } - t.FailNow() -} - -// IsType asserts that the specified objects are of the same type. -// -// require.IsType(t, &MyStruct{}, &MyStruct{}) -func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsType(t, expectedType, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// IsTypef asserts that the specified objects are of the same type. -// -// require.IsTypef(t, &MyStruct{}, &MyStruct{}, "error message %s", "formatted") -func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.IsTypef(t, expectedType, object, msg, args...) { - return - } - t.FailNow() -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// require.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.JSONEq(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// require.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.JSONEqf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// require.Len(t, mySlice, 3) -func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Len(t, object, length, msgAndArgs...) { - return - } - t.FailNow() -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// require.Lenf(t, mySlice, 3, "error message %s", "formatted") -func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Lenf(t, object, length, msg, args...) { - return - } - t.FailNow() -} - -// Less asserts that the first element is less than the second -// -// require.Less(t, 1, 2) -// require.Less(t, float64(1), float64(2)) -// require.Less(t, "a", "b") -func Less(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Less(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// require.LessOrEqual(t, 1, 2) -// require.LessOrEqual(t, 2, 2) -// require.LessOrEqual(t, "a", "b") -// require.LessOrEqual(t, "b", "b") -func LessOrEqual(t TestingT, e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.LessOrEqual(t, e1, e2, msgAndArgs...) { - return - } - t.FailNow() -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// require.LessOrEqualf(t, 1, 2, "error message %s", "formatted") -// require.LessOrEqualf(t, 2, 2, "error message %s", "formatted") -// require.LessOrEqualf(t, "a", "b", "error message %s", "formatted") -// require.LessOrEqualf(t, "b", "b", "error message %s", "formatted") -func LessOrEqualf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.LessOrEqualf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Lessf asserts that the first element is less than the second -// -// require.Lessf(t, 1, 2, "error message %s", "formatted") -// require.Lessf(t, float64(1), float64(2), "error message %s", "formatted") -// require.Lessf(t, "a", "b", "error message %s", "formatted") -func Lessf(t TestingT, e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Lessf(t, e1, e2, msg, args...) { - return - } - t.FailNow() -} - -// Negative asserts that the specified element is negative -// -// require.Negative(t, -1) -// require.Negative(t, -1.23) -func Negative(t TestingT, e interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Negative(t, e, msgAndArgs...) { - return - } - t.FailNow() -} - -// Negativef asserts that the specified element is negative -// -// require.Negativef(t, -1, "error message %s", "formatted") -// require.Negativef(t, -1.23, "error message %s", "formatted") -func Negativef(t TestingT, e interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Negativef(t, e, msg, args...) { - return - } - t.FailNow() -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// require.Never(t, func() bool { return false; }, time.Second, 10*time.Millisecond) -func Never(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Never(t, condition, waitFor, tick, msgAndArgs...) { - return - } - t.FailNow() -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// require.Neverf(t, func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func Neverf(t TestingT, condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Neverf(t, condition, waitFor, tick, msg, args...) { - return - } - t.FailNow() -} - -// Nil asserts that the specified object is nil. -// -// require.Nil(t, err) -func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Nil(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// Nilf asserts that the specified object is nil. -// -// require.Nilf(t, err, "error message %s", "formatted") -func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Nilf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoDirExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func NoDirExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoDirExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if require.NoError(t, err) { -// require.Equal(t, expectedObj, actualObj) -// } -func NoError(t TestingT, err error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoError(t, err, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if require.NoErrorf(t, err, "error message %s", "formatted") { -// require.Equal(t, expectedObj, actualObj) -// } -func NoErrorf(t TestingT, err error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoErrorf(t, err, msg, args...) { - return - } - t.FailNow() -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExists(t TestingT, path string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoFileExists(t, path, msgAndArgs...) { - return - } - t.FailNow() -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func NoFileExistsf(t TestingT, path string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NoFileExistsf(t, path, msg, args...) { - return - } - t.FailNow() -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// require.NotContains(t, "Hello World", "Earth") -// require.NotContains(t, ["Hello", "World"], "Earth") -// require.NotContains(t, {"Hello": "World"}, "Earth") -func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotContains(t, s, contains, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// require.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted") -// require.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted") -// require.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted") -func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotContainsf(t, s, contains, msg, args...) { - return - } - t.FailNow() -} - -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// require.NotElementsMatch(t, [1, 1, 2, 3], [1, 2, 3]) -> true -// -// require.NotElementsMatch(t, [1, 2, 3], [1, 2, 4]) -> true -func NotElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotElementsMatch(t, listA, listB, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// require.NotElementsMatchf(t, [1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// require.NotElementsMatchf(t, [1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func NotElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotElementsMatchf(t, listA, listB, msg, args...) { - return - } - t.FailNow() -} - -// NotEmpty asserts that the specified object is NOT [Empty]. -// -// if require.NotEmpty(t, obj) { -// require.Equal(t, "two", obj[1]) -// } -func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEmpty(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEmptyf asserts that the specified object is NOT [Empty]. -// -// if require.NotEmptyf(t, obj, "error message %s", "formatted") { -// require.Equal(t, "two", obj[1]) -// } -func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEmptyf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NotEqual asserts that the specified values are NOT equal. -// -// require.NotEqual(t, obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqual(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// require.NotEqualValues(t, obj1, obj2) -func NotEqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualValues(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// require.NotEqualValuesf(t, obj1, obj2, "error message %s", "formatted") -func NotEqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualValuesf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// require.NotEqualf(t, obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotEqualf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAs(t TestingT, err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorAs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func NotErrorAsf(t TestingT, err error, target interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorAsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIs(t TestingT, err error, target error, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorIs(t, err, target, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotErrorIsf asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func NotErrorIsf(t TestingT, err error, target error, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotErrorIsf(t, err, target, msg, args...) { - return - } - t.FailNow() -} - -// NotImplements asserts that an object does not implement the specified interface. -// -// require.NotImplements(t, (*MyInterface)(nil), new(MyObject)) -func NotImplements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotImplements(t, interfaceObject, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotImplementsf asserts that an object does not implement the specified interface. -// -// require.NotImplementsf(t, (*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func NotImplementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotImplementsf(t, interfaceObject, object, msg, args...) { - return - } - t.FailNow() -} - -// NotNil asserts that the specified object is not nil. -// -// require.NotNil(t, err) -func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotNil(t, object, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotNilf asserts that the specified object is not nil. -// -// require.NotNilf(t, err, "error message %s", "formatted") -func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotNilf(t, object, msg, args...) { - return - } - t.FailNow() -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// require.NotPanics(t, func(){ RemainCalm() }) -func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotPanics(t, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// require.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted") -func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotPanicsf(t, f, msg, args...) { - return - } - t.FailNow() -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// require.NotRegexp(t, regexp.MustCompile("starts"), "it's starting") -// require.NotRegexp(t, "^start", "it's not starting") -func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotRegexp(t, rx, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// require.NotRegexpf(t, regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// require.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted") -func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotRegexpf(t, rx, str, msg, args...) { - return - } - t.FailNow() -} - -// NotSame asserts that two pointers do not reference the same object. -// -// require.NotSame(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSame(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSame(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// require.NotSamef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func NotSamef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSamef(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// NotSubset asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// require.NotSubset(t, [1, 3, 4], [1, 2]) -// require.NotSubset(t, {"x": 1, "y": 2}, {"z": 3}) -// require.NotSubset(t, [1, 3, 4], {1: "one", 2: "two"}) -// require.NotSubset(t, {"x": 1, "y": 2}, ["z"]) -func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSubset(t, list, subset, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// require.NotSubsetf(t, [1, 3, 4], [1, 2], "error message %s", "formatted") -// require.NotSubsetf(t, {"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") -// require.NotSubsetf(t, [1, 3, 4], {1: "one", 2: "two"}, "error message %s", "formatted") -// require.NotSubsetf(t, {"x": 1, "y": 2}, ["z"], "error message %s", "formatted") -func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotSubsetf(t, list, subset, msg, args...) { - return - } - t.FailNow() -} - -// NotZero asserts that i is not the zero value for its type. -func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotZero(t, i, msgAndArgs...) { - return - } - t.FailNow() -} - -// NotZerof asserts that i is not the zero value for its type. -func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.NotZerof(t, i, msg, args...) { - return - } - t.FailNow() -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// require.Panics(t, func(){ GoCrazy() }) -func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Panics(t, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// require.PanicsWithError(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithError(t TestingT, errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithError(t, errString, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// require.PanicsWithErrorf(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithErrorf(t TestingT, errString string, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithErrorf(t, errString, f, msg, args...) { - return - } - t.FailNow() -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// require.PanicsWithValue(t, "crazy error", func(){ GoCrazy() }) -func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithValue(t, expected, f, msgAndArgs...) { - return - } - t.FailNow() -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// require.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.PanicsWithValuef(t, expected, f, msg, args...) { - return - } - t.FailNow() -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// require.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted") -func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Panicsf(t, f, msg, args...) { - return - } - t.FailNow() -} - -// Positive asserts that the specified element is positive -// -// require.Positive(t, 1) -// require.Positive(t, 1.23) -func Positive(t TestingT, e interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Positive(t, e, msgAndArgs...) { - return - } - t.FailNow() -} - -// Positivef asserts that the specified element is positive -// -// require.Positivef(t, 1, "error message %s", "formatted") -// require.Positivef(t, 1.23, "error message %s", "formatted") -func Positivef(t TestingT, e interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Positivef(t, e, msg, args...) { - return - } - t.FailNow() -} - -// Regexp asserts that a specified regexp matches a string. -// -// require.Regexp(t, regexp.MustCompile("start"), "it's starting") -// require.Regexp(t, "start...$", "it's not starting") -func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Regexp(t, rx, str, msgAndArgs...) { - return - } - t.FailNow() -} - -// Regexpf asserts that a specified regexp matches a string. -// -// require.Regexpf(t, regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// require.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted") -func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Regexpf(t, rx, str, msg, args...) { - return - } - t.FailNow() -} - -// Same asserts that two pointers reference the same object. -// -// require.Same(t, ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Same(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Same(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// Samef asserts that two pointers reference the same object. -// -// require.Samef(t, ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Samef(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Subset asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// require.Subset(t, [1, 2, 3], [1, 2]) -// require.Subset(t, {"x": 1, "y": 2}, {"x": 1}) -// require.Subset(t, [1, 2, 3], {1: "one", 2: "two"}) -// require.Subset(t, {"x": 1, "y": 2}, ["x"]) -func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Subset(t, list, subset, msgAndArgs...) { - return - } - t.FailNow() -} - -// Subsetf asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// require.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") -// require.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") -// require.Subsetf(t, [1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted") -// require.Subsetf(t, {"x": 1, "y": 2}, ["x"], "error message %s", "formatted") -func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Subsetf(t, list, subset, msg, args...) { - return - } - t.FailNow() -} - -// True asserts that the specified value is true. -// -// require.True(t, myBool) -func True(t TestingT, value bool, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.True(t, value, msgAndArgs...) { - return - } - t.FailNow() -} - -// Truef asserts that the specified value is true. -// -// require.Truef(t, myBool, "error message %s", "formatted") -func Truef(t TestingT, value bool, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Truef(t, value, msg, args...) { - return - } - t.FailNow() -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// require.WithinDuration(t, time.Now(), time.Now(), 10*time.Second) -func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) { - return - } - t.FailNow() -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// require.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinDurationf(t, expected, actual, delta, msg, args...) { - return - } - t.FailNow() -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// require.WithinRange(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func WithinRange(t TestingT, actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinRange(t, actual, start, end, msgAndArgs...) { - return - } - t.FailNow() -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// require.WithinRangef(t, time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func WithinRangef(t TestingT, actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.WithinRangef(t, actual, start, end, msg, args...) { - return - } - t.FailNow() -} - -// YAMLEq asserts that two YAML strings are equivalent. -func YAMLEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.YAMLEq(t, expected, actual, msgAndArgs...) { - return - } - t.FailNow() -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func YAMLEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.YAMLEqf(t, expected, actual, msg, args...) { - return - } - t.FailNow() -} - -// Zero asserts that i is the zero value for its type. -func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Zero(t, i, msgAndArgs...) { - return - } - t.FailNow() -} - -// Zerof asserts that i is the zero value for its type. -func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) { - if h, ok := t.(tHelper); ok { - h.Helper() - } - if assert.Zerof(t, i, msg, args...) { - return - } - t.FailNow() -} diff --git a/vendor/github.com/stretchr/testify/require/require.go.tmpl b/vendor/github.com/stretchr/testify/require/require.go.tmpl deleted file mode 100644 index 8b32836850..0000000000 --- a/vendor/github.com/stretchr/testify/require/require.go.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -{{ replace .Comment "assert." "require."}} -func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { - if h, ok := t.(tHelper); ok { h.Helper() } - if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return } - t.FailNow() -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go b/vendor/github.com/stretchr/testify/require/require_forward.go deleted file mode 100644 index e6f7e94468..0000000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go +++ /dev/null @@ -1,1724 +0,0 @@ -// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT. - -package require - -import ( - assert "github.com/stretchr/testify/assert" - http "net/http" - url "net/url" - time "time" -) - -// Condition uses a Comparison to assert a complex condition. -func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Condition(a.t, comp, msgAndArgs...) -} - -// Conditionf uses a Comparison to assert a complex condition. -func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Conditionf(a.t, comp, msg, args...) -} - -// Contains asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Contains("Hello World", "World") -// a.Contains(["Hello", "World"], "World") -// a.Contains({"Hello": "World"}, "Hello") -func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Contains(a.t, s, contains, msgAndArgs...) -} - -// Containsf asserts that the specified string, list(array, slice...) or map contains the -// specified substring or element. -// -// a.Containsf("Hello World", "World", "error message %s", "formatted") -// a.Containsf(["Hello", "World"], "World", "error message %s", "formatted") -// a.Containsf({"Hello": "World"}, "Hello", "error message %s", "formatted") -func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Containsf(a.t, s, contains, msg, args...) -} - -// DirExists checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - DirExists(a.t, path, msgAndArgs...) -} - -// DirExistsf checks whether a directory exists in the given path. It also fails -// if the path is a file rather a directory or there is an error checking whether it exists. -func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - DirExistsf(a.t, path, msg, args...) -} - -// ElementsMatch asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) -func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should match. -// -// a.ElementsMatchf([1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted") -func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ElementsMatchf(a.t, listA, listB, msg, args...) -} - -// Empty asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// a.Empty(obj) -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Empty(a.t, object, msgAndArgs...) -} - -// Emptyf asserts that the given value is "empty". -// -// [Zero values] are "empty". -// -// Arrays are "empty" if every element is the zero value of the type (stricter than "empty"). -// -// Slices, maps and channels with zero length are "empty". -// -// Pointer values are "empty" if the pointer is nil or if the pointed value is "empty". -// -// a.Emptyf(obj, "error message %s", "formatted") -// -// [Zero values]: https://go.dev/ref/spec#The_zero_value -func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Emptyf(a.t, object, msg, args...) -} - -// Equal asserts that two objects are equal. -// -// a.Equal(123, 123) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Equal(a.t, expected, actual, msgAndArgs...) -} - -// EqualError asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualError(err, expectedErrorString) -func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualError(a.t, theError, errString, msgAndArgs...) -} - -// EqualErrorf asserts that a function returned an error (i.e. not `nil`) -// and that it is equal to the provided error. -// -// actualObj, err := SomeFunction() -// a.EqualErrorf(err, expectedErrorString, "error message %s", "formatted") -func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualErrorf(a.t, theError, errString, msg, args...) -} - -// EqualExportedValues asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// a.EqualExportedValues(S{1, 2}, S{1, 3}) => true -// a.EqualExportedValues(S{1, 2}, S{2, 3}) => false -func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualExportedValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualExportedValuesf asserts that the types of two objects are equal and their public -// fields are also equal. This is useful for comparing structs that have private fields -// that could potentially differ. -// -// type S struct { -// Exported int -// notExported int -// } -// a.EqualExportedValuesf(S{1, 2}, S{1, 3}, "error message %s", "formatted") => true -// a.EqualExportedValuesf(S{1, 2}, S{2, 3}, "error message %s", "formatted") => false -func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualExportedValuesf(a.t, expected, actual, msg, args...) -} - -// EqualValues asserts that two objects are equal or convertible to the larger -// type and equal. -// -// a.EqualValues(uint32(123), int32(123)) -func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualValues(a.t, expected, actual, msgAndArgs...) -} - -// EqualValuesf asserts that two objects are equal or convertible to the larger -// type and equal. -// -// a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted") -func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EqualValuesf(a.t, expected, actual, msg, args...) -} - -// Equalf asserts that two objects are equal. -// -// a.Equalf(123, 123, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). Function equality -// cannot be determined and will always fail. -func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Equalf(a.t, expected, actual, msg, args...) -} - -// Error asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// a.Error(err) -func (a *Assertions) Error(err error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Error(a.t, err, msgAndArgs...) -} - -// ErrorAs asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorAs(a.t, err, target, msgAndArgs...) -} - -// ErrorAsf asserts that at least one of the errors in err's chain matches target, and if so, sets target to that error value. -// This is a wrapper for errors.As. -func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorAsf(a.t, err, target, msg, args...) -} - -// ErrorContains asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContains(err, expectedErrorSubString) -func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorContains(a.t, theError, contains, msgAndArgs...) -} - -// ErrorContainsf asserts that a function returned an error (i.e. not `nil`) -// and that the error contains the specified substring. -// -// actualObj, err := SomeFunction() -// a.ErrorContainsf(err, expectedErrorSubString, "error message %s", "formatted") -func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorContainsf(a.t, theError, contains, msg, args...) -} - -// ErrorIs asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorIs(a.t, err, target, msgAndArgs...) -} - -// ErrorIsf asserts that at least one of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - ErrorIsf(a.t, err, target, msg, args...) -} - -// Errorf asserts that a function returned an error (i.e. not `nil`). -// -// actualObj, err := SomeFunction() -// a.Errorf(err, "error message %s", "formatted") -func (a *Assertions) Errorf(err error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Errorf(a.t, err, msg, args...) -} - -// Eventually asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Eventually(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// EventuallyWithT asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// a.EventuallyWithT(func(c *assert.CollectT) { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// EventuallyWithTf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. In contrast to Eventually, -// it supplies a CollectT to the condition function, so that the condition -// function can use the CollectT to call other assertions. -// The condition is considered "met" if no errors are raised in a tick. -// The supplied CollectT collects all errors from one tick (if there are any). -// If the condition is not met before waitFor, the collected errors of -// the last tick are copied to t. -// -// externalValue := false -// go func() { -// time.Sleep(8*time.Second) -// externalValue = true -// }() -// a.EventuallyWithTf(func(c *assert.CollectT, "error message %s", "formatted") { -// // add assertions as needed; any assertion failure will fail the current tick -// assert.True(c, externalValue, "expected 'externalValue' to be true") -// }, 10*time.Second, 1*time.Second, "external state has not changed to 'true'; still false") -func (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...) -} - -// Eventuallyf asserts that given condition will be met in waitFor time, -// periodically checking target function each tick. -// -// a.Eventuallyf(func() bool { return true; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Eventuallyf(a.t, condition, waitFor, tick, msg, args...) -} - -// Exactly asserts that two objects are equal in value and type. -// -// a.Exactly(int32(123), int64(123)) -func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Exactly(a.t, expected, actual, msgAndArgs...) -} - -// Exactlyf asserts that two objects are equal in value and type. -// -// a.Exactlyf(int32(123), int64(123), "error message %s", "formatted") -func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Exactlyf(a.t, expected, actual, msg, args...) -} - -// Fail reports a failure through -func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Fail(a.t, failureMessage, msgAndArgs...) -} - -// FailNow fails test -func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FailNow(a.t, failureMessage, msgAndArgs...) -} - -// FailNowf fails test -func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FailNowf(a.t, failureMessage, msg, args...) -} - -// Failf reports a failure through -func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Failf(a.t, failureMessage, msg, args...) -} - -// False asserts that the specified value is false. -// -// a.False(myBool) -func (a *Assertions) False(value bool, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - False(a.t, value, msgAndArgs...) -} - -// Falsef asserts that the specified value is false. -// -// a.Falsef(myBool, "error message %s", "formatted") -func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Falsef(a.t, value, msg, args...) -} - -// FileExists checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FileExists(a.t, path, msgAndArgs...) -} - -// FileExistsf checks whether a file exists in the given path. It also fails if -// the path points to a directory or there is an error when trying to check the file. -func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - FileExistsf(a.t, path, msg, args...) -} - -// Greater asserts that the first element is greater than the second -// -// a.Greater(2, 1) -// a.Greater(float64(2), float64(1)) -// a.Greater("b", "a") -func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Greater(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqual asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqual(2, 1) -// a.GreaterOrEqual(2, 2) -// a.GreaterOrEqual("b", "a") -// a.GreaterOrEqual("b", "b") -func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - GreaterOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// GreaterOrEqualf asserts that the first element is greater than or equal to the second -// -// a.GreaterOrEqualf(2, 1, "error message %s", "formatted") -// a.GreaterOrEqualf(2, 2, "error message %s", "formatted") -// a.GreaterOrEqualf("b", "a", "error message %s", "formatted") -// a.GreaterOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - GreaterOrEqualf(a.t, e1, e2, msg, args...) -} - -// Greaterf asserts that the first element is greater than the second -// -// a.Greaterf(2, 1, "error message %s", "formatted") -// a.Greaterf(float64(2), float64(1), "error message %s", "formatted") -// a.Greaterf("b", "a", "error message %s", "formatted") -func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Greaterf(a.t, e1, e2, msg, args...) -} - -// HTTPBodyContains asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyContainsf asserts that a specified handler returns a -// body that contains a string. -// -// a.HTTPBodyContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPBodyNotContains asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...) -} - -// HTTPBodyNotContainsf asserts that a specified handler returns a -// body that does not contain a string. -// -// a.HTTPBodyNotContainsf(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...) -} - -// HTTPError asserts that a specified handler returns an error status code. -// -// a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPError(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPErrorf asserts that a specified handler returns an error status code. -// -// a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPErrorf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPRedirect asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPRedirectf asserts that a specified handler returns a redirect status code. -// -// a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPRedirectf(a.t, handler, method, url, values, msg, args...) -} - -// HTTPStatusCode asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...) -} - -// HTTPStatusCodef asserts that a specified handler returns a specified status code. -// -// a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...) -} - -// HTTPSuccess asserts that a specified handler returns a success status code. -// -// a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...) -} - -// HTTPSuccessf asserts that a specified handler returns a success status code. -// -// a.HTTPSuccessf(myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted") -// -// Returns whether the assertion was successful (true) or not (false). -func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - HTTPSuccessf(a.t, handler, method, url, values, msg, args...) -} - -// Implements asserts that an object is implemented by the specified interface. -// -// a.Implements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Implements(a.t, interfaceObject, object, msgAndArgs...) -} - -// Implementsf asserts that an object is implemented by the specified interface. -// -// a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Implementsf(a.t, interfaceObject, object, msg, args...) -} - -// InDelta asserts that the two numerals are within delta of each other. -// -// a.InDelta(math.Pi, 22/7.0, 0.01) -func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDelta(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaMapValuesf is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. -func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaSlice is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...) -} - -// InDeltaSlicef is the same as InDelta, except it compares two slices. -func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaSlicef(a.t, expected, actual, delta, msg, args...) -} - -// InDeltaf asserts that the two numerals are within delta of each other. -// -// a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted") -func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InDeltaf(a.t, expected, actual, delta, msg, args...) -} - -// InEpsilon asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...) -} - -// InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices. -func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...) -} - -// InEpsilonf asserts that expected and actual have a relative error less than epsilon -func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - InEpsilonf(a.t, expected, actual, epsilon, msg, args...) -} - -// IsDecreasing asserts that the collection is decreasing -// -// a.IsDecreasing([]int{2, 1, 0}) -// a.IsDecreasing([]float{2, 1}) -// a.IsDecreasing([]string{"b", "a"}) -func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsDecreasing(a.t, object, msgAndArgs...) -} - -// IsDecreasingf asserts that the collection is decreasing -// -// a.IsDecreasingf([]int{2, 1, 0}, "error message %s", "formatted") -// a.IsDecreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsDecreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsDecreasingf(a.t, object, msg, args...) -} - -// IsIncreasing asserts that the collection is increasing -// -// a.IsIncreasing([]int{1, 2, 3}) -// a.IsIncreasing([]float{1, 2}) -// a.IsIncreasing([]string{"a", "b"}) -func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsIncreasing(a.t, object, msgAndArgs...) -} - -// IsIncreasingf asserts that the collection is increasing -// -// a.IsIncreasingf([]int{1, 2, 3}, "error message %s", "formatted") -// a.IsIncreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsIncreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsIncreasingf(a.t, object, msg, args...) -} - -// IsNonDecreasing asserts that the collection is not decreasing -// -// a.IsNonDecreasing([]int{1, 1, 2}) -// a.IsNonDecreasing([]float{1, 2}) -// a.IsNonDecreasing([]string{"a", "b"}) -func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonDecreasing(a.t, object, msgAndArgs...) -} - -// IsNonDecreasingf asserts that the collection is not decreasing -// -// a.IsNonDecreasingf([]int{1, 1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]float{1, 2}, "error message %s", "formatted") -// a.IsNonDecreasingf([]string{"a", "b"}, "error message %s", "formatted") -func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonDecreasingf(a.t, object, msg, args...) -} - -// IsNonIncreasing asserts that the collection is not increasing -// -// a.IsNonIncreasing([]int{2, 1, 1}) -// a.IsNonIncreasing([]float{2, 1}) -// a.IsNonIncreasing([]string{"b", "a"}) -func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonIncreasing(a.t, object, msgAndArgs...) -} - -// IsNonIncreasingf asserts that the collection is not increasing -// -// a.IsNonIncreasingf([]int{2, 1, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]float{2, 1}, "error message %s", "formatted") -// a.IsNonIncreasingf([]string{"b", "a"}, "error message %s", "formatted") -func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNonIncreasingf(a.t, object, msg, args...) -} - -// IsNotType asserts that the specified objects are not of the same type. -// -// a.IsNotType(&NotMyStruct{}, &MyStruct{}) -func (a *Assertions) IsNotType(theType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNotType(a.t, theType, object, msgAndArgs...) -} - -// IsNotTypef asserts that the specified objects are not of the same type. -// -// a.IsNotTypef(&NotMyStruct{}, &MyStruct{}, "error message %s", "formatted") -func (a *Assertions) IsNotTypef(theType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsNotTypef(a.t, theType, object, msg, args...) -} - -// IsType asserts that the specified objects are of the same type. -// -// a.IsType(&MyStruct{}, &MyStruct{}) -func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsType(a.t, expectedType, object, msgAndArgs...) -} - -// IsTypef asserts that the specified objects are of the same type. -// -// a.IsTypef(&MyStruct{}, &MyStruct{}, "error message %s", "formatted") -func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - IsTypef(a.t, expectedType, object, msg, args...) -} - -// JSONEq asserts that two JSON strings are equivalent. -// -// a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) -func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - JSONEq(a.t, expected, actual, msgAndArgs...) -} - -// JSONEqf asserts that two JSON strings are equivalent. -// -// a.JSONEqf(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted") -func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - JSONEqf(a.t, expected, actual, msg, args...) -} - -// Len asserts that the specified object has specific length. -// Len also fails if the object has a type that len() not accept. -// -// a.Len(mySlice, 3) -func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Len(a.t, object, length, msgAndArgs...) -} - -// Lenf asserts that the specified object has specific length. -// Lenf also fails if the object has a type that len() not accept. -// -// a.Lenf(mySlice, 3, "error message %s", "formatted") -func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Lenf(a.t, object, length, msg, args...) -} - -// Less asserts that the first element is less than the second -// -// a.Less(1, 2) -// a.Less(float64(1), float64(2)) -// a.Less("a", "b") -func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Less(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqual asserts that the first element is less than or equal to the second -// -// a.LessOrEqual(1, 2) -// a.LessOrEqual(2, 2) -// a.LessOrEqual("a", "b") -// a.LessOrEqual("b", "b") -func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - LessOrEqual(a.t, e1, e2, msgAndArgs...) -} - -// LessOrEqualf asserts that the first element is less than or equal to the second -// -// a.LessOrEqualf(1, 2, "error message %s", "formatted") -// a.LessOrEqualf(2, 2, "error message %s", "formatted") -// a.LessOrEqualf("a", "b", "error message %s", "formatted") -// a.LessOrEqualf("b", "b", "error message %s", "formatted") -func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - LessOrEqualf(a.t, e1, e2, msg, args...) -} - -// Lessf asserts that the first element is less than the second -// -// a.Lessf(1, 2, "error message %s", "formatted") -// a.Lessf(float64(1), float64(2), "error message %s", "formatted") -// a.Lessf("a", "b", "error message %s", "formatted") -func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Lessf(a.t, e1, e2, msg, args...) -} - -// Negative asserts that the specified element is negative -// -// a.Negative(-1) -// a.Negative(-1.23) -func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Negative(a.t, e, msgAndArgs...) -} - -// Negativef asserts that the specified element is negative -// -// a.Negativef(-1, "error message %s", "formatted") -// a.Negativef(-1.23, "error message %s", "formatted") -func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Negativef(a.t, e, msg, args...) -} - -// Never asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) -func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Never(a.t, condition, waitFor, tick, msgAndArgs...) -} - -// Neverf asserts that the given condition doesn't satisfy in waitFor time, -// periodically checking the target function each tick. -// -// a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted") -func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Neverf(a.t, condition, waitFor, tick, msg, args...) -} - -// Nil asserts that the specified object is nil. -// -// a.Nil(err) -func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Nil(a.t, object, msgAndArgs...) -} - -// Nilf asserts that the specified object is nil. -// -// a.Nilf(err, "error message %s", "formatted") -func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Nilf(a.t, object, msg, args...) -} - -// NoDirExists checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoDirExists(a.t, path, msgAndArgs...) -} - -// NoDirExistsf checks whether a directory does not exist in the given path. -// It fails if the path points to an existing _directory_ only. -func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoDirExistsf(a.t, path, msg, args...) -} - -// NoError asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoError(err) { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoError(a.t, err, msgAndArgs...) -} - -// NoErrorf asserts that a function returned no error (i.e. `nil`). -// -// actualObj, err := SomeFunction() -// if a.NoErrorf(err, "error message %s", "formatted") { -// assert.Equal(t, expectedObj, actualObj) -// } -func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoErrorf(a.t, err, msg, args...) -} - -// NoFileExists checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoFileExists(a.t, path, msgAndArgs...) -} - -// NoFileExistsf checks whether a file does not exist in a given path. It fails -// if the path points to an existing _file_ only. -func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NoFileExistsf(a.t, path, msg, args...) -} - -// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContains("Hello World", "Earth") -// a.NotContains(["Hello", "World"], "Earth") -// a.NotContains({"Hello": "World"}, "Earth") -func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotContains(a.t, s, contains, msgAndArgs...) -} - -// NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the -// specified substring or element. -// -// a.NotContainsf("Hello World", "Earth", "error message %s", "formatted") -// a.NotContainsf(["Hello", "World"], "Earth", "error message %s", "formatted") -// a.NotContainsf({"Hello": "World"}, "Earth", "error message %s", "formatted") -func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotContainsf(a.t, s, contains, msg, args...) -} - -// NotElementsMatch asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 1, 2, 3]) -> false -// -// a.NotElementsMatch([1, 1, 2, 3], [1, 2, 3]) -> true -// -// a.NotElementsMatch([1, 2, 3], [1, 2, 4]) -> true -func (a *Assertions) NotElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotElementsMatch(a.t, listA, listB, msgAndArgs...) -} - -// NotElementsMatchf asserts that the specified listA(array, slice...) is NOT equal to specified -// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, -// the number of appearances of each of them in both lists should not match. -// This is an inverse of ElementsMatch. -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 1, 2, 3], "error message %s", "formatted") -> false -// -// a.NotElementsMatchf([1, 1, 2, 3], [1, 2, 3], "error message %s", "formatted") -> true -// -// a.NotElementsMatchf([1, 2, 3], [1, 2, 4], "error message %s", "formatted") -> true -func (a *Assertions) NotElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotElementsMatchf(a.t, listA, listB, msg, args...) -} - -// NotEmpty asserts that the specified object is NOT [Empty]. -// -// if a.NotEmpty(obj) { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEmpty(a.t, object, msgAndArgs...) -} - -// NotEmptyf asserts that the specified object is NOT [Empty]. -// -// if a.NotEmptyf(obj, "error message %s", "formatted") { -// assert.Equal(t, "two", obj[1]) -// } -func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEmptyf(a.t, object, msg, args...) -} - -// NotEqual asserts that the specified values are NOT equal. -// -// a.NotEqual(obj1, obj2) -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqual(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValues asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValues(obj1, obj2) -func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualValues(a.t, expected, actual, msgAndArgs...) -} - -// NotEqualValuesf asserts that two objects are not equal even when converted to the same type -// -// a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted") -func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualValuesf(a.t, expected, actual, msg, args...) -} - -// NotEqualf asserts that the specified values are NOT equal. -// -// a.NotEqualf(obj1, obj2, "error message %s", "formatted") -// -// Pointer variable equality is determined based on the equality of the -// referenced values (as opposed to the memory addresses). -func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotEqualf(a.t, expected, actual, msg, args...) -} - -// NotErrorAs asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAs(err error, target interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorAs(a.t, err, target, msgAndArgs...) -} - -// NotErrorAsf asserts that none of the errors in err's chain matches target, -// but if so, sets target to that error value. -func (a *Assertions) NotErrorAsf(err error, target interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorAsf(a.t, err, target, msg, args...) -} - -// NotErrorIs asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorIs(a.t, err, target, msgAndArgs...) -} - -// NotErrorIsf asserts that none of the errors in err's chain matches target. -// This is a wrapper for errors.Is. -func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotErrorIsf(a.t, err, target, msg, args...) -} - -// NotImplements asserts that an object does not implement the specified interface. -// -// a.NotImplements((*MyInterface)(nil), new(MyObject)) -func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotImplements(a.t, interfaceObject, object, msgAndArgs...) -} - -// NotImplementsf asserts that an object does not implement the specified interface. -// -// a.NotImplementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted") -func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotImplementsf(a.t, interfaceObject, object, msg, args...) -} - -// NotNil asserts that the specified object is not nil. -// -// a.NotNil(err) -func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotNil(a.t, object, msgAndArgs...) -} - -// NotNilf asserts that the specified object is not nil. -// -// a.NotNilf(err, "error message %s", "formatted") -func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotNilf(a.t, object, msg, args...) -} - -// NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanics(func(){ RemainCalm() }) -func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotPanics(a.t, f, msgAndArgs...) -} - -// NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic. -// -// a.NotPanicsf(func(){ RemainCalm() }, "error message %s", "formatted") -func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotPanicsf(a.t, f, msg, args...) -} - -// NotRegexp asserts that a specified regexp does not match a string. -// -// a.NotRegexp(regexp.MustCompile("starts"), "it's starting") -// a.NotRegexp("^start", "it's not starting") -func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotRegexp(a.t, rx, str, msgAndArgs...) -} - -// NotRegexpf asserts that a specified regexp does not match a string. -// -// a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted") -// a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted") -func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotRegexpf(a.t, rx, str, msg, args...) -} - -// NotSame asserts that two pointers do not reference the same object. -// -// a.NotSame(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSame(a.t, expected, actual, msgAndArgs...) -} - -// NotSamef asserts that two pointers do not reference the same object. -// -// a.NotSamef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSamef(a.t, expected, actual, msg, args...) -} - -// NotSubset asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.NotSubset([1, 3, 4], [1, 2]) -// a.NotSubset({"x": 1, "y": 2}, {"z": 3}) -// a.NotSubset([1, 3, 4], {1: "one", 2: "two"}) -// a.NotSubset({"x": 1, "y": 2}, ["z"]) -func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSubset(a.t, list, subset, msgAndArgs...) -} - -// NotSubsetf asserts that the list (array, slice, or map) does NOT contain all -// elements given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.NotSubsetf([1, 3, 4], [1, 2], "error message %s", "formatted") -// a.NotSubsetf({"x": 1, "y": 2}, {"z": 3}, "error message %s", "formatted") -// a.NotSubsetf([1, 3, 4], {1: "one", 2: "two"}, "error message %s", "formatted") -// a.NotSubsetf({"x": 1, "y": 2}, ["z"], "error message %s", "formatted") -func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotSubsetf(a.t, list, subset, msg, args...) -} - -// NotZero asserts that i is not the zero value for its type. -func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotZero(a.t, i, msgAndArgs...) -} - -// NotZerof asserts that i is not the zero value for its type. -func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - NotZerof(a.t, i, msg, args...) -} - -// Panics asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panics(func(){ GoCrazy() }) -func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Panics(a.t, f, msgAndArgs...) -} - -// PanicsWithError asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithError("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithError(a.t, errString, f, msgAndArgs...) -} - -// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc -// panics, and that the recovered panic value is an error that satisfies the -// EqualError comparison. -// -// a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithErrorf(a.t, errString, f, msg, args...) -} - -// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValue("crazy error", func(){ GoCrazy() }) -func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithValue(a.t, expected, f, msgAndArgs...) -} - -// PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that -// the recovered panic value equals the expected panic value. -// -// a.PanicsWithValuef("crazy error", func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - PanicsWithValuef(a.t, expected, f, msg, args...) -} - -// Panicsf asserts that the code inside the specified PanicTestFunc panics. -// -// a.Panicsf(func(){ GoCrazy() }, "error message %s", "formatted") -func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Panicsf(a.t, f, msg, args...) -} - -// Positive asserts that the specified element is positive -// -// a.Positive(1) -// a.Positive(1.23) -func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Positive(a.t, e, msgAndArgs...) -} - -// Positivef asserts that the specified element is positive -// -// a.Positivef(1, "error message %s", "formatted") -// a.Positivef(1.23, "error message %s", "formatted") -func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Positivef(a.t, e, msg, args...) -} - -// Regexp asserts that a specified regexp matches a string. -// -// a.Regexp(regexp.MustCompile("start"), "it's starting") -// a.Regexp("start...$", "it's not starting") -func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Regexp(a.t, rx, str, msgAndArgs...) -} - -// Regexpf asserts that a specified regexp matches a string. -// -// a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted") -// a.Regexpf("start...$", "it's not starting", "error message %s", "formatted") -func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Regexpf(a.t, rx, str, msg, args...) -} - -// Same asserts that two pointers reference the same object. -// -// a.Same(ptr1, ptr2) -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Same(a.t, expected, actual, msgAndArgs...) -} - -// Samef asserts that two pointers reference the same object. -// -// a.Samef(ptr1, ptr2, "error message %s", "formatted") -// -// Both arguments must be pointer variables. Pointer variable sameness is -// determined based on the equality of both type and value. -func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Samef(a.t, expected, actual, msg, args...) -} - -// Subset asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.Subset([1, 2, 3], [1, 2]) -// a.Subset({"x": 1, "y": 2}, {"x": 1}) -// a.Subset([1, 2, 3], {1: "one", 2: "two"}) -// a.Subset({"x": 1, "y": 2}, ["x"]) -func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Subset(a.t, list, subset, msgAndArgs...) -} - -// Subsetf asserts that the list (array, slice, or map) contains all elements -// given in the subset (array, slice, or map). -// Map elements are key-value pairs unless compared with an array or slice where -// only the map key is evaluated. -// -// a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") -// a.Subsetf({"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") -// a.Subsetf([1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted") -// a.Subsetf({"x": 1, "y": 2}, ["x"], "error message %s", "formatted") -func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Subsetf(a.t, list, subset, msg, args...) -} - -// True asserts that the specified value is true. -// -// a.True(myBool) -func (a *Assertions) True(value bool, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - True(a.t, value, msgAndArgs...) -} - -// Truef asserts that the specified value is true. -// -// a.Truef(myBool, "error message %s", "formatted") -func (a *Assertions) Truef(value bool, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Truef(a.t, value, msg, args...) -} - -// WithinDuration asserts that the two times are within duration delta of each other. -// -// a.WithinDuration(time.Now(), time.Now(), 10*time.Second) -func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinDuration(a.t, expected, actual, delta, msgAndArgs...) -} - -// WithinDurationf asserts that the two times are within duration delta of each other. -// -// a.WithinDurationf(time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted") -func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinDurationf(a.t, expected, actual, delta, msg, args...) -} - -// WithinRange asserts that a time is within a time range (inclusive). -// -// a.WithinRange(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second)) -func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinRange(a.t, actual, start, end, msgAndArgs...) -} - -// WithinRangef asserts that a time is within a time range (inclusive). -// -// a.WithinRangef(time.Now(), time.Now().Add(-time.Second), time.Now().Add(time.Second), "error message %s", "formatted") -func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - WithinRangef(a.t, actual, start, end, msg, args...) -} - -// YAMLEq asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - YAMLEq(a.t, expected, actual, msgAndArgs...) -} - -// YAMLEqf asserts that two YAML strings are equivalent. -func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - YAMLEqf(a.t, expected, actual, msg, args...) -} - -// Zero asserts that i is the zero value for its type. -func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Zero(a.t, i, msgAndArgs...) -} - -// Zerof asserts that i is the zero value for its type. -func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) { - if h, ok := a.t.(tHelper); ok { - h.Helper() - } - Zerof(a.t, i, msg, args...) -} diff --git a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl b/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl deleted file mode 100644 index 54124df1d3..0000000000 --- a/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl +++ /dev/null @@ -1,5 +0,0 @@ -{{.CommentWithoutT "a"}} -func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { - if h, ok := a.t.(tHelper); ok { h.Helper() } - {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) -} diff --git a/vendor/github.com/stretchr/testify/require/requirements.go b/vendor/github.com/stretchr/testify/require/requirements.go deleted file mode 100644 index 6b7ce929eb..0000000000 --- a/vendor/github.com/stretchr/testify/require/requirements.go +++ /dev/null @@ -1,29 +0,0 @@ -package require - -// TestingT is an interface wrapper around *testing.T -type TestingT interface { - Errorf(format string, args ...interface{}) - FailNow() -} - -type tHelper = interface { - Helper() -} - -// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful -// for table driven tests. -type ComparisonAssertionFunc func(TestingT, interface{}, interface{}, ...interface{}) - -// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful -// for table driven tests. -type ValueAssertionFunc func(TestingT, interface{}, ...interface{}) - -// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful -// for table driven tests. -type BoolAssertionFunc func(TestingT, bool, ...interface{}) - -// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful -// for table driven tests. -type ErrorAssertionFunc func(TestingT, error, ...interface{}) - -//go:generate sh -c "cd ../_codegen && go build && cd - && ../_codegen/_codegen -output-package=require -template=require.go.tmpl -include-format-funcs" diff --git a/vendor/github.com/tinylib/msgp/LICENSE b/vendor/github.com/tinylib/msgp/LICENSE deleted file mode 100644 index 14d60424e8..0000000000 --- a/vendor/github.com/tinylib/msgp/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2014 Philip Hofer -Portions Copyright (c) 2009 The Go Authors (license at http://golang.org) where indicated - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/tinylib/msgp/msgp/advise_linux.go b/vendor/github.com/tinylib/msgp/msgp/advise_linux.go deleted file mode 100644 index d2a66857be..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/advise_linux.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build linux && !appengine && !tinygo -// +build linux,!appengine,!tinygo - -package msgp - -import ( - "os" - "syscall" -) - -func adviseRead(mem []byte) { - syscall.Madvise(mem, syscall.MADV_SEQUENTIAL|syscall.MADV_WILLNEED) -} - -func adviseWrite(mem []byte) { - syscall.Madvise(mem, syscall.MADV_SEQUENTIAL) -} - -func fallocate(f *os.File, sz int64) error { - err := syscall.Fallocate(int(f.Fd()), 0, 0, sz) - if err == syscall.ENOTSUP { - return f.Truncate(sz) - } - return err -} diff --git a/vendor/github.com/tinylib/msgp/msgp/advise_other.go b/vendor/github.com/tinylib/msgp/msgp/advise_other.go deleted file mode 100644 index 07f524af7f..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/advise_other.go +++ /dev/null @@ -1,18 +0,0 @@ -//go:build (!linux && !tinygo && !windows) || appengine -// +build !linux,!tinygo,!windows appengine - -package msgp - -import ( - "os" -) - -// TODO: darwin, BSD support - -func adviseRead(mem []byte) {} - -func adviseWrite(mem []byte) {} - -func fallocate(f *os.File, sz int64) error { - return f.Truncate(sz) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/circular.go b/vendor/github.com/tinylib/msgp/msgp/circular.go deleted file mode 100644 index 5d2408e591..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/circular.go +++ /dev/null @@ -1,41 +0,0 @@ -package msgp - -type timer interface { - StartTimer() - StopTimer() -} - -// EndlessReader is an io.Reader -// that loops over the same data -// endlessly. It is used for benchmarking. -type EndlessReader struct { - tb timer - data []byte - offset int -} - -// NewEndlessReader returns a new endless reader -func NewEndlessReader(b []byte, tb timer) *EndlessReader { - // Double until we reach 4K. - for len(b) < 4<<10 { - b = append(b, b...) - } - return &EndlessReader{tb: tb, data: b, offset: 0} -} - -// Read implements io.Reader. In practice, it -// always returns (len(p), nil), although it -// fills the supplied slice while the benchmark -// timer is stopped. -func (c *EndlessReader) Read(p []byte) (int, error) { - var n int - l := len(p) - m := len(c.data) - nn := copy(p[n:], c.data[c.offset:]) - n += nn - for n < l { - n += copy(p[n:], c.data[:]) - } - c.offset = (c.offset + l) % m - return n, nil -} diff --git a/vendor/github.com/tinylib/msgp/msgp/defs.go b/vendor/github.com/tinylib/msgp/msgp/defs.go deleted file mode 100644 index 47a8c18345..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/defs.go +++ /dev/null @@ -1,151 +0,0 @@ -// This package is the support library for the msgp code generator (http://github.com/tinylib/msgp). -// -// This package defines the utilites used by the msgp code generator for encoding and decoding MessagePack -// from []byte and io.Reader/io.Writer types. Much of this package is devoted to helping the msgp code -// generator implement the Marshaler/Unmarshaler and Encodable/Decodable interfaces. -// -// This package defines four "families" of functions: -// - AppendXxxx() appends an object to a []byte in MessagePack encoding. -// - ReadXxxxBytes() reads an object from a []byte and returns the remaining bytes. -// - (*Writer).WriteXxxx() writes an object to the buffered *Writer type. -// - (*Reader).ReadXxxx() reads an object from a buffered *Reader type. -// -// Once a type has satisfied the `Encodable` and `Decodable` interfaces, -// it can be written and read from arbitrary `io.Writer`s and `io.Reader`s using -// -// msgp.Encode(io.Writer, msgp.Encodable) -// -// and -// -// msgp.Decode(io.Reader, msgp.Decodable) -// -// There are also methods for converting MessagePack to JSON without -// an explicit de-serialization step. -// -// For additional tips, tricks, and gotchas, please visit -// the wiki at http://github.com/tinylib/msgp -package msgp - -const ( - last4 = 0x0f - first4 = 0xf0 - last5 = 0x1f - first3 = 0xe0 - last7 = 0x7f - - // recursionLimit is the limit of recursive calls. - // This limits the call depth of dynamic code, like Skip and interface conversions. - recursionLimit = 100000 -) - -func isfixint(b byte) bool { - return b>>7 == 0 -} - -func isnfixint(b byte) bool { - return b&first3 == mnfixint -} - -func isfixmap(b byte) bool { - return b&first4 == mfixmap -} - -func isfixarray(b byte) bool { - return b&first4 == mfixarray -} - -func isfixstr(b byte) bool { - return b&first3 == mfixstr -} - -func wfixint(u uint8) byte { - return u & last7 -} - -func rfixint(b byte) uint8 { - return b -} - -func wnfixint(i int8) byte { - return byte(i) | mnfixint -} - -func rnfixint(b byte) int8 { - return int8(b) -} - -func rfixmap(b byte) uint8 { - return b & last4 -} - -func wfixmap(u uint8) byte { - return mfixmap | (u & last4) -} - -func rfixstr(b byte) uint8 { - return b & last5 -} - -func wfixstr(u uint8) byte { - return (u & last5) | mfixstr -} - -func rfixarray(b byte) uint8 { - return (b & last4) -} - -func wfixarray(u uint8) byte { - return (u & last4) | mfixarray -} - -// These are all the byte -// prefixes defined by the -// msgpack standard -const ( - // 0XXXXXXX - mfixint uint8 = 0x00 - - // 111XXXXX - mnfixint uint8 = 0xe0 - - // 1000XXXX - mfixmap uint8 = 0x80 - - // 1001XXXX - mfixarray uint8 = 0x90 - - // 101XXXXX - mfixstr uint8 = 0xa0 - - mnil uint8 = 0xc0 - mfalse uint8 = 0xc2 - mtrue uint8 = 0xc3 - mbin8 uint8 = 0xc4 - mbin16 uint8 = 0xc5 - mbin32 uint8 = 0xc6 - mext8 uint8 = 0xc7 - mext16 uint8 = 0xc8 - mext32 uint8 = 0xc9 - mfloat32 uint8 = 0xca - mfloat64 uint8 = 0xcb - muint8 uint8 = 0xcc - muint16 uint8 = 0xcd - muint32 uint8 = 0xce - muint64 uint8 = 0xcf - mint8 uint8 = 0xd0 - mint16 uint8 = 0xd1 - mint32 uint8 = 0xd2 - mint64 uint8 = 0xd3 - mfixext1 uint8 = 0xd4 - mfixext2 uint8 = 0xd5 - mfixext4 uint8 = 0xd6 - mfixext8 uint8 = 0xd7 - mfixext16 uint8 = 0xd8 - mstr8 uint8 = 0xd9 - mstr16 uint8 = 0xda - mstr32 uint8 = 0xdb - marray16 uint8 = 0xdc - marray32 uint8 = 0xdd - mmap16 uint8 = 0xde - mmap32 uint8 = 0xdf -) diff --git a/vendor/github.com/tinylib/msgp/msgp/edit.go b/vendor/github.com/tinylib/msgp/msgp/edit.go deleted file mode 100644 index b473a6f668..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/edit.go +++ /dev/null @@ -1,242 +0,0 @@ -package msgp - -import ( - "math" -) - -// Locate returns a []byte pointing to the field -// in a messagepack map with the provided key. (The returned []byte -// points to a sub-slice of 'raw'; Locate does no allocations.) If the -// key doesn't exist in the map, a zero-length []byte will be returned. -func Locate(key string, raw []byte) []byte { - s, n := locate(raw, key) - return raw[s:n] -} - -// Replace takes a key ("key") in a messagepack map ("raw") -// and replaces its value with the one provided and returns -// the new []byte. The returned []byte may point to the same -// memory as "raw". Replace makes no effort to evaluate the validity -// of the contents of 'val'. It may use up to the full capacity of 'raw.' -// Replace returns 'nil' if the field doesn't exist or if the object in 'raw' -// is not a map. -func Replace(key string, raw []byte, val []byte) []byte { - start, end := locate(raw, key) - if start == end { - return nil - } - return replace(raw, start, end, val, true) -} - -// CopyReplace works similarly to Replace except that the returned -// byte slice does not point to the same memory as 'raw'. CopyReplace -// returns 'nil' if the field doesn't exist or 'raw' isn't a map. -func CopyReplace(key string, raw []byte, val []byte) []byte { - start, end := locate(raw, key) - if start == end { - return nil - } - return replace(raw, start, end, val, false) -} - -// Remove removes a key-value pair from 'raw'. It returns -// 'raw' unchanged if the key didn't exist. -func Remove(key string, raw []byte) []byte { - start, end := locateKV(raw, key) - if start == end { - return raw - } - raw = raw[:start+copy(raw[start:], raw[end:])] - return resizeMap(raw, -1) -} - -// HasKey returns whether the map in 'raw' has -// a field with key 'key' -func HasKey(key string, raw []byte) bool { - sz, bts, err := ReadMapHeaderBytes(raw) - if err != nil { - return false - } - var field []byte - for i := uint32(0); i < sz; i++ { - field, bts, err = ReadStringZC(bts) - if err != nil { - return false - } - if UnsafeString(field) == key { - return true - } - } - return false -} - -func replace(raw []byte, start int, end int, val []byte, inplace bool) []byte { - ll := end - start // length of segment to replace - lv := len(val) - - if inplace { - extra := lv - ll - - // fastest case: we're doing - // a 1:1 replacement - if extra == 0 { - copy(raw[start:], val) - return raw - - } else if extra < 0 { - // 'val' smaller than replaced value - // copy in place and shift back - - x := copy(raw[start:], val) - y := copy(raw[start+x:], raw[end:]) - return raw[:start+x+y] - - } else if extra < cap(raw)-len(raw) { - // 'val' less than (cap-len) extra bytes - // copy in place and shift forward - raw = raw[0 : len(raw)+extra] - // shift end forward - copy(raw[end+extra:], raw[end:]) - copy(raw[start:], val) - return raw - } - } - - // we have to allocate new space - out := make([]byte, len(raw)+len(val)-ll) - x := copy(out, raw[:start]) - y := copy(out[x:], val) - copy(out[x+y:], raw[end:]) - return out -} - -// locate does a naive O(n) search for the map key; returns start, end -// (returns 0,0 on error) -func locate(raw []byte, key string) (start int, end int) { - var ( - sz uint32 - bts []byte - field []byte - err error - ) - sz, bts, err = ReadMapHeaderBytes(raw) - if err != nil { - return - } - - // loop and locate field - for i := uint32(0); i < sz; i++ { - field, bts, err = ReadStringZC(bts) - if err != nil { - return 0, 0 - } - if UnsafeString(field) == key { - // start location - l := len(raw) - start = l - len(bts) - bts, err = Skip(bts) - if err != nil { - return 0, 0 - } - end = l - len(bts) - return - } - bts, err = Skip(bts) - if err != nil { - return 0, 0 - } - } - return 0, 0 -} - -// locate key AND value -func locateKV(raw []byte, key string) (start int, end int) { - var ( - sz uint32 - bts []byte - field []byte - err error - ) - sz, bts, err = ReadMapHeaderBytes(raw) - if err != nil { - return 0, 0 - } - - for i := uint32(0); i < sz; i++ { - tmp := len(bts) - field, bts, err = ReadStringZC(bts) - if err != nil { - return 0, 0 - } - if UnsafeString(field) == key { - start = len(raw) - tmp - bts, err = Skip(bts) - if err != nil { - return 0, 0 - } - end = len(raw) - len(bts) - return - } - bts, err = Skip(bts) - if err != nil { - return 0, 0 - } - } - return 0, 0 -} - -// delta is delta on map size -func resizeMap(raw []byte, delta int64) []byte { - var sz int64 - switch raw[0] { - case mmap16: - sz = int64(big.Uint16(raw[1:])) - if sz+delta <= math.MaxUint16 { - big.PutUint16(raw[1:], uint16(sz+delta)) - return raw - } - if cap(raw)-len(raw) >= 2 { - raw = raw[0 : len(raw)+2] - copy(raw[5:], raw[3:]) - raw[0] = mmap32 - big.PutUint32(raw[1:], uint32(sz+delta)) - return raw - } - n := make([]byte, 0, len(raw)+5) - n = AppendMapHeader(n, uint32(sz+delta)) - return append(n, raw[3:]...) - - case mmap32: - sz = int64(big.Uint32(raw[1:])) - big.PutUint32(raw[1:], uint32(sz+delta)) - return raw - - default: - sz = int64(rfixmap(raw[0])) - if sz+delta < 16 { - raw[0] = wfixmap(uint8(sz + delta)) - return raw - } else if sz+delta <= math.MaxUint16 { - if cap(raw)-len(raw) >= 2 { - raw = raw[0 : len(raw)+2] - copy(raw[3:], raw[1:]) - raw[0] = mmap16 - big.PutUint16(raw[1:], uint16(sz+delta)) - return raw - } - n := make([]byte, 0, len(raw)+5) - n = AppendMapHeader(n, uint32(sz+delta)) - return append(n, raw[1:]...) - } - if cap(raw)-len(raw) >= 4 { - raw = raw[0 : len(raw)+4] - copy(raw[5:], raw[1:]) - raw[0] = mmap32 - big.PutUint32(raw[1:], uint32(sz+delta)) - return raw - } - n := make([]byte, 0, len(raw)+5) - n = AppendMapHeader(n, uint32(sz+delta)) - return append(n, raw[1:]...) - } -} diff --git a/vendor/github.com/tinylib/msgp/msgp/elsize.go b/vendor/github.com/tinylib/msgp/msgp/elsize.go deleted file mode 100644 index a05b0b21c2..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/elsize.go +++ /dev/null @@ -1,128 +0,0 @@ -package msgp - -func calcBytespec(v byte) bytespec { - // single byte values - switch v { - - case mnil: - return bytespec{size: 1, extra: constsize, typ: NilType} - case mfalse: - return bytespec{size: 1, extra: constsize, typ: BoolType} - case mtrue: - return bytespec{size: 1, extra: constsize, typ: BoolType} - case mbin8: - return bytespec{size: 2, extra: extra8, typ: BinType} - case mbin16: - return bytespec{size: 3, extra: extra16, typ: BinType} - case mbin32: - return bytespec{size: 5, extra: extra32, typ: BinType} - case mext8: - return bytespec{size: 3, extra: extra8, typ: ExtensionType} - case mext16: - return bytespec{size: 4, extra: extra16, typ: ExtensionType} - case mext32: - return bytespec{size: 6, extra: extra32, typ: ExtensionType} - case mfloat32: - return bytespec{size: 5, extra: constsize, typ: Float32Type} - case mfloat64: - return bytespec{size: 9, extra: constsize, typ: Float64Type} - case muint8: - return bytespec{size: 2, extra: constsize, typ: UintType} - case muint16: - return bytespec{size: 3, extra: constsize, typ: UintType} - case muint32: - return bytespec{size: 5, extra: constsize, typ: UintType} - case muint64: - return bytespec{size: 9, extra: constsize, typ: UintType} - case mint8: - return bytespec{size: 2, extra: constsize, typ: IntType} - case mint16: - return bytespec{size: 3, extra: constsize, typ: IntType} - case mint32: - return bytespec{size: 5, extra: constsize, typ: IntType} - case mint64: - return bytespec{size: 9, extra: constsize, typ: IntType} - case mfixext1: - return bytespec{size: 3, extra: constsize, typ: ExtensionType} - case mfixext2: - return bytespec{size: 4, extra: constsize, typ: ExtensionType} - case mfixext4: - return bytespec{size: 6, extra: constsize, typ: ExtensionType} - case mfixext8: - return bytespec{size: 10, extra: constsize, typ: ExtensionType} - case mfixext16: - return bytespec{size: 18, extra: constsize, typ: ExtensionType} - case mstr8: - return bytespec{size: 2, extra: extra8, typ: StrType} - case mstr16: - return bytespec{size: 3, extra: extra16, typ: StrType} - case mstr32: - return bytespec{size: 5, extra: extra32, typ: StrType} - case marray16: - return bytespec{size: 3, extra: array16v, typ: ArrayType} - case marray32: - return bytespec{size: 5, extra: array32v, typ: ArrayType} - case mmap16: - return bytespec{size: 3, extra: map16v, typ: MapType} - case mmap32: - return bytespec{size: 5, extra: map32v, typ: MapType} - } - - switch { - - // fixint - case v >= mfixint && v < 0x80: - return bytespec{size: 1, extra: constsize, typ: IntType} - - // fixstr gets constsize, since the prefix yields the size - case v >= mfixstr && v < 0xc0: - return bytespec{size: 1 + rfixstr(v), extra: constsize, typ: StrType} - - // fixmap - case v >= mfixmap && v < 0x90: - return bytespec{size: 1, extra: varmode(2 * rfixmap(v)), typ: MapType} - - // fixarray - case v >= mfixarray && v < 0xa0: - return bytespec{size: 1, extra: varmode(rfixarray(v)), typ: ArrayType} - - // nfixint - case v >= mnfixint && uint16(v) < 0x100: - return bytespec{size: 1, extra: constsize, typ: IntType} - - } - - // 0xC1 is unused per the spec and falls through to here, - // everything else is covered above - - return bytespec{} -} - -func getType(v byte) Type { - return getBytespec(v).typ -} - -// a valid bytespsec has -// non-zero 'size' and -// non-zero 'typ' -type bytespec struct { - size uint8 // prefix size information - extra varmode // extra size information - typ Type // type - _ byte // makes bytespec 4 bytes (yes, this matters) -} - -// size mode -// if positive, # elements for composites -type varmode int8 - -const ( - constsize varmode = 0 // constant size (size bytes + uint8(varmode) objects) - extra8 varmode = -1 // has uint8(p[1]) extra bytes - extra16 varmode = -2 // has be16(p[1:]) extra bytes - extra32 varmode = -3 // has be32(p[1:]) extra bytes - map16v varmode = -4 // use map16 - map32v varmode = -5 // use map32 - array16v varmode = -6 // use array16 - array32v varmode = -7 // use array32 -) diff --git a/vendor/github.com/tinylib/msgp/msgp/elsize_default.go b/vendor/github.com/tinylib/msgp/msgp/elsize_default.go deleted file mode 100644 index e7e8b547a9..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/elsize_default.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !tinygo -// +build !tinygo - -package msgp - -// size of every object on the wire, -// plus type information. gives us -// constant-time type information -// for traversing composite objects. -var sizes [256]bytespec - -func init() { - for i := 0; i < 256; i++ { - sizes[i] = calcBytespec(byte(i)) - } -} - -// getBytespec gets inlined to a simple array index -func getBytespec(v byte) bytespec { - return sizes[v] -} diff --git a/vendor/github.com/tinylib/msgp/msgp/elsize_tinygo.go b/vendor/github.com/tinylib/msgp/msgp/elsize_tinygo.go deleted file mode 100644 index 041f4ad694..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/elsize_tinygo.go +++ /dev/null @@ -1,13 +0,0 @@ -//go:build tinygo -// +build tinygo - -package msgp - -// for tinygo, getBytespec just calls calcBytespec -// a simple/slow function with a switch statement - -// doesn't require any heap alloc, moves the space -// requirements into code instad of ram - -func getBytespec(v byte) bytespec { - return calcBytespec(v) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/errors.go b/vendor/github.com/tinylib/msgp/msgp/errors.go deleted file mode 100644 index e6b42b6893..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/errors.go +++ /dev/null @@ -1,393 +0,0 @@ -package msgp - -import ( - "reflect" - "strconv" -) - -const resumableDefault = false - -var ( - // ErrShortBytes is returned when the - // slice being decoded is too short to - // contain the contents of the message - ErrShortBytes error = errShort{} - - // ErrRecursion is returned when the maximum recursion limit is reached for an operation. - // This should only realistically be seen on adversarial data trying to exhaust the stack. - ErrRecursion error = errRecursion{} - - // this error is only returned - // if we reach code that should - // be unreachable - fatal error = errFatal{} -) - -// Error is the interface satisfied -// by all of the errors that originate -// from this package. -type Error interface { - error - - // Resumable returns whether - // or not the error means that - // the stream of data is malformed - // and the information is unrecoverable. - Resumable() bool -} - -// contextError allows msgp Error instances to be enhanced with additional -// context about their origin. -type contextError interface { - Error - - // withContext must not modify the error instance - it must clone and - // return a new error with the context added. - withContext(ctx string) error -} - -// Cause returns the underlying cause of an error that has been wrapped -// with additional context. -func Cause(e error) error { - out := e - if e, ok := e.(errWrapped); ok && e.cause != nil { - out = e.cause - } - return out -} - -// Resumable returns whether or not the error means that the stream of data is -// malformed and the information is unrecoverable. -func Resumable(e error) bool { - if e, ok := e.(Error); ok { - return e.Resumable() - } - return resumableDefault -} - -// WrapError wraps an error with additional context that allows the part of the -// serialized type that caused the problem to be identified. Underlying errors -// can be retrieved using Cause() -// -// The input error is not modified - a new error should be returned. -// -// ErrShortBytes is not wrapped with any context due to backward compatibility -// issues with the public API. -func WrapError(err error, ctx ...interface{}) error { - switch e := err.(type) { - case errShort: - return e - case contextError: - return e.withContext(ctxString(ctx)) - default: - return errWrapped{cause: err, ctx: ctxString(ctx)} - } -} - -func addCtx(ctx, add string) string { - if ctx != "" { - return add + "/" + ctx - } else { - return add - } -} - -// errWrapped allows arbitrary errors passed to WrapError to be enhanced with -// context and unwrapped with Cause() -type errWrapped struct { - cause error - ctx string -} - -func (e errWrapped) Error() string { - if e.ctx != "" { - return e.cause.Error() + " at " + e.ctx - } else { - return e.cause.Error() - } -} - -func (e errWrapped) Resumable() bool { - if e, ok := e.cause.(Error); ok { - return e.Resumable() - } - return resumableDefault -} - -// Unwrap returns the cause. -func (e errWrapped) Unwrap() error { return e.cause } - -type errShort struct{} - -func (e errShort) Error() string { return "msgp: too few bytes left to read object" } -func (e errShort) Resumable() bool { return false } - -type errFatal struct { - ctx string -} - -func (f errFatal) Error() string { - out := "msgp: fatal decoding error (unreachable code)" - if f.ctx != "" { - out += " at " + f.ctx - } - return out -} - -func (f errFatal) Resumable() bool { return false } - -func (f errFatal) withContext(ctx string) error { f.ctx = addCtx(f.ctx, ctx); return f } - -type errRecursion struct{} - -func (e errRecursion) Error() string { return "msgp: recursion limit reached" } -func (e errRecursion) Resumable() bool { return false } - -// ArrayError is an error returned -// when decoding a fix-sized array -// of the wrong size -type ArrayError struct { - Wanted uint32 - Got uint32 - ctx string -} - -// Error implements the error interface -func (a ArrayError) Error() string { - out := "msgp: wanted array of size " + strconv.Itoa(int(a.Wanted)) + "; got " + strconv.Itoa(int(a.Got)) - if a.ctx != "" { - out += " at " + a.ctx - } - return out -} - -// Resumable is always 'true' for ArrayErrors -func (a ArrayError) Resumable() bool { return true } - -func (a ArrayError) withContext(ctx string) error { a.ctx = addCtx(a.ctx, ctx); return a } - -// IntOverflow is returned when a call -// would downcast an integer to a type -// with too few bits to hold its value. -type IntOverflow struct { - Value int64 // the value of the integer - FailedBitsize int // the bit size that the int64 could not fit into - ctx string -} - -// Error implements the error interface -func (i IntOverflow) Error() string { - str := "msgp: " + strconv.FormatInt(i.Value, 10) + " overflows int" + strconv.Itoa(i.FailedBitsize) - if i.ctx != "" { - str += " at " + i.ctx - } - return str -} - -// Resumable is always 'true' for overflows -func (i IntOverflow) Resumable() bool { return true } - -func (i IntOverflow) withContext(ctx string) error { i.ctx = addCtx(i.ctx, ctx); return i } - -// UintOverflow is returned when a call -// would downcast an unsigned integer to a type -// with too few bits to hold its value -type UintOverflow struct { - Value uint64 // value of the uint - FailedBitsize int // the bit size that couldn't fit the value - ctx string -} - -// Error implements the error interface -func (u UintOverflow) Error() string { - str := "msgp: " + strconv.FormatUint(u.Value, 10) + " overflows uint" + strconv.Itoa(u.FailedBitsize) - if u.ctx != "" { - str += " at " + u.ctx - } - return str -} - -// Resumable is always 'true' for overflows -func (u UintOverflow) Resumable() bool { return true } - -func (u UintOverflow) withContext(ctx string) error { u.ctx = addCtx(u.ctx, ctx); return u } - -// InvalidTimestamp is returned when an invalid timestamp is encountered -type InvalidTimestamp struct { - Nanos int64 // value of the nano, if invalid - FieldLength int // Unexpected field length. - ctx string -} - -// Error implements the error interface -func (u InvalidTimestamp) Error() (str string) { - if u.Nanos > 0 { - str = "msgp: timestamp nanosecond field value " + strconv.FormatInt(u.Nanos, 10) + " exceeds maximum allows of 999999999" - } else if u.FieldLength >= 0 { - str = "msgp: invalid timestamp field length " + strconv.FormatInt(int64(u.FieldLength), 10) + " - must be 4, 8 or 12" - } - if u.ctx != "" { - str += " at " + u.ctx - } - return str -} - -// Resumable is always 'true' for overflows -func (u InvalidTimestamp) Resumable() bool { return true } - -func (u InvalidTimestamp) withContext(ctx string) error { u.ctx = addCtx(u.ctx, ctx); return u } - -// UintBelowZero is returned when a call -// would cast a signed integer below zero -// to an unsigned integer. -type UintBelowZero struct { - Value int64 // value of the incoming int - ctx string -} - -// Error implements the error interface -func (u UintBelowZero) Error() string { - str := "msgp: attempted to cast int " + strconv.FormatInt(u.Value, 10) + " to unsigned" - if u.ctx != "" { - str += " at " + u.ctx - } - return str -} - -// Resumable is always 'true' for overflows -func (u UintBelowZero) Resumable() bool { return true } - -func (u UintBelowZero) withContext(ctx string) error { - u.ctx = ctx - return u -} - -// A TypeError is returned when a particular -// decoding method is unsuitable for decoding -// a particular MessagePack value. -type TypeError struct { - Method Type // Type expected by method - Encoded Type // Type actually encoded - - ctx string -} - -// Error implements the error interface -func (t TypeError) Error() string { - out := "msgp: attempted to decode type " + quoteStr(t.Encoded.String()) + " with method for " + quoteStr(t.Method.String()) - if t.ctx != "" { - out += " at " + t.ctx - } - return out -} - -// Resumable returns 'true' for TypeErrors -func (t TypeError) Resumable() bool { return true } - -func (t TypeError) withContext(ctx string) error { t.ctx = addCtx(t.ctx, ctx); return t } - -// returns either InvalidPrefixError or -// TypeError depending on whether or not -// the prefix is recognized -func badPrefix(want Type, lead byte) error { - t := getType(lead) - if t == InvalidType { - return InvalidPrefixError(lead) - } - return TypeError{Method: want, Encoded: t} -} - -// InvalidPrefixError is returned when a bad encoding -// uses a prefix that is not recognized in the MessagePack standard. -// This kind of error is unrecoverable. -type InvalidPrefixError byte - -// Error implements the error interface -func (i InvalidPrefixError) Error() string { - return "msgp: unrecognized type prefix 0x" + strconv.FormatInt(int64(i), 16) -} - -// Resumable returns 'false' for InvalidPrefixErrors -func (i InvalidPrefixError) Resumable() bool { return false } - -// ErrUnsupportedType is returned -// when a bad argument is supplied -// to a function that takes `interface{}`. -type ErrUnsupportedType struct { - T reflect.Type - - ctx string -} - -// Error implements error -func (e *ErrUnsupportedType) Error() string { - out := "msgp: type " + quoteStr(e.T.String()) + " not supported" - if e.ctx != "" { - out += " at " + e.ctx - } - return out -} - -// Resumable returns 'true' for ErrUnsupportedType -func (e *ErrUnsupportedType) Resumable() bool { return true } - -func (e *ErrUnsupportedType) withContext(ctx string) error { - o := *e - o.ctx = addCtx(o.ctx, ctx) - return &o -} - -// simpleQuoteStr is a simplified version of strconv.Quote for TinyGo, -// which takes up a lot less code space by escaping all non-ASCII -// (UTF-8) bytes with \x. Saves about 4k of code size -// (unicode tables, needed for IsPrint(), are big). -// It lives in errors.go just so we can test it in errors_test.go -func simpleQuoteStr(s string) string { - const ( - lowerhex = "0123456789abcdef" - ) - - sb := make([]byte, 0, len(s)+2) - - sb = append(sb, `"`...) - -l: // loop through string bytes (not UTF-8 characters) - for i := 0; i < len(s); i++ { - b := s[i] - // specific escape chars - switch b { - case '\\': - sb = append(sb, `\\`...) - case '"': - sb = append(sb, `\"`...) - case '\a': - sb = append(sb, `\a`...) - case '\b': - sb = append(sb, `\b`...) - case '\f': - sb = append(sb, `\f`...) - case '\n': - sb = append(sb, `\n`...) - case '\r': - sb = append(sb, `\r`...) - case '\t': - sb = append(sb, `\t`...) - case '\v': - sb = append(sb, `\v`...) - default: - // no escaping needed (printable ASCII) - if b >= 0x20 && b <= 0x7E { - sb = append(sb, b) - continue l - } - // anything else is \x - sb = append(sb, `\x`...) - sb = append(sb, lowerhex[byte(b)>>4]) - sb = append(sb, lowerhex[byte(b)&0xF]) - continue l - } - } - - sb = append(sb, `"`...) - return string(sb) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/errors_default.go b/vendor/github.com/tinylib/msgp/msgp/errors_default.go deleted file mode 100644 index e45c00a8b8..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/errors_default.go +++ /dev/null @@ -1,25 +0,0 @@ -//go:build !tinygo -// +build !tinygo - -package msgp - -import ( - "fmt" - "strconv" -) - -// ctxString converts the incoming interface{} slice into a single string. -func ctxString(ctx []interface{}) string { - out := "" - for idx, cv := range ctx { - if idx > 0 { - out += "/" - } - out += fmt.Sprintf("%v", cv) - } - return out -} - -func quoteStr(s string) string { - return strconv.Quote(s) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/errors_tinygo.go b/vendor/github.com/tinylib/msgp/msgp/errors_tinygo.go deleted file mode 100644 index 8691cd387e..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/errors_tinygo.go +++ /dev/null @@ -1,42 +0,0 @@ -//go:build tinygo -// +build tinygo - -package msgp - -import ( - "reflect" -) - -// ctxString converts the incoming interface{} slice into a single string, -// without using fmt under tinygo -func ctxString(ctx []interface{}) string { - out := "" - for idx, cv := range ctx { - if idx > 0 { - out += "/" - } - out += ifToStr(cv) - } - return out -} - -type stringer interface { - String() string -} - -func ifToStr(i interface{}) string { - switch v := i.(type) { - case stringer: - return v.String() - case error: - return v.Error() - case string: - return v - default: - return reflect.ValueOf(i).String() - } -} - -func quoteStr(s string) string { - return simpleQuoteStr(s) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/extension.go b/vendor/github.com/tinylib/msgp/msgp/extension.go deleted file mode 100644 index cda71c9840..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/extension.go +++ /dev/null @@ -1,561 +0,0 @@ -package msgp - -import ( - "errors" - "math" - "strconv" -) - -const ( - // Complex64Extension is the extension number used for complex64 - Complex64Extension = 3 - - // Complex128Extension is the extension number used for complex128 - Complex128Extension = 4 - - // TimeExtension is the extension number used for time.Time - TimeExtension = 5 - - // MsgTimeExtension is the extension number for timestamps as defined in - // https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type - MsgTimeExtension = -1 -) - -// msgTimeExtension is a painful workaround to avoid "constant -1 overflows byte". -var msgTimeExtension = int8(MsgTimeExtension) - -// our extensions live here -var extensionReg = make(map[int8]func() Extension) - -// RegisterExtension registers extensions so that they -// can be initialized and returned by methods that -// decode `interface{}` values. This should only -// be called during initialization. f() should return -// a newly-initialized zero value of the extension. Keep in -// mind that extensions 3, 4, and 5 are reserved for -// complex64, complex128, and time.Time, respectively, -// and that MessagePack reserves extension types from -127 to -1. -// -// For example, if you wanted to register a user-defined struct: -// -// msgp.RegisterExtension(10, func() msgp.Extension { &MyExtension{} }) -// -// RegisterExtension will panic if you call it multiple times -// with the same 'typ' argument, or if you use a reserved -// type (3, 4, or 5). -func RegisterExtension(typ int8, f func() Extension) { - switch typ { - case Complex64Extension, Complex128Extension, TimeExtension: - panic(errors.New("msgp: forbidden extension type: " + strconv.Itoa(int(typ)))) - } - if _, ok := extensionReg[typ]; ok { - panic(errors.New("msgp: RegisterExtension() called with typ " + strconv.Itoa(int(typ)) + " more than once")) - } - extensionReg[typ] = f -} - -// ExtensionTypeError is an error type returned -// when there is a mis-match between an extension type -// and the type encoded on the wire -type ExtensionTypeError struct { - Got int8 - Want int8 -} - -// Error implements the error interface -func (e ExtensionTypeError) Error() string { - return "msgp: error decoding extension: wanted type " + strconv.Itoa(int(e.Want)) + "; got type " + strconv.Itoa(int(e.Got)) -} - -// Resumable returns 'true' for ExtensionTypeErrors -func (e ExtensionTypeError) Resumable() bool { return true } - -func errExt(got int8, wanted int8) error { - return ExtensionTypeError{Got: got, Want: wanted} -} - -// Extension is the interface fulfilled -// by types that want to define their -// own binary encoding. -type Extension interface { - // ExtensionType should return - // a int8 that identifies the concrete - // type of the extension. (Types <0 are - // officially reserved by the MessagePack - // specifications.) - ExtensionType() int8 - - // Len should return the length - // of the data to be encoded - Len() int - - // MarshalBinaryTo should copy - // the data into the supplied slice, - // assuming that the slice has length Len() - MarshalBinaryTo([]byte) error - - UnmarshalBinary([]byte) error -} - -// RawExtension implements the Extension interface -type RawExtension struct { - Data []byte - Type int8 -} - -// ExtensionType implements Extension.ExtensionType, and returns r.Type -func (r *RawExtension) ExtensionType() int8 { return r.Type } - -// Len implements Extension.Len, and returns len(r.Data) -func (r *RawExtension) Len() int { return len(r.Data) } - -// MarshalBinaryTo implements Extension.MarshalBinaryTo, -// and returns a copy of r.Data -func (r *RawExtension) MarshalBinaryTo(d []byte) error { - copy(d, r.Data) - return nil -} - -// UnmarshalBinary implements Extension.UnmarshalBinary, -// and sets r.Data to the contents of the provided slice -func (r *RawExtension) UnmarshalBinary(b []byte) error { - if cap(r.Data) >= len(b) { - r.Data = r.Data[0:len(b)] - } else { - r.Data = make([]byte, len(b)) - } - copy(r.Data, b) - return nil -} - -func (mw *Writer) writeExtensionHeader(length int, extType int8) error { - switch length { - case 0: - o, err := mw.require(3) - if err != nil { - return err - } - mw.buf[o] = mext8 - mw.buf[o+1] = 0 - mw.buf[o+2] = byte(extType) - case 1: - o, err := mw.require(2) - if err != nil { - return err - } - mw.buf[o] = mfixext1 - mw.buf[o+1] = byte(extType) - case 2: - o, err := mw.require(2) - if err != nil { - return err - } - mw.buf[o] = mfixext2 - mw.buf[o+1] = byte(extType) - case 4: - o, err := mw.require(2) - if err != nil { - return err - } - mw.buf[o] = mfixext4 - mw.buf[o+1] = byte(extType) - case 8: - o, err := mw.require(2) - if err != nil { - return err - } - mw.buf[o] = mfixext8 - mw.buf[o+1] = byte(extType) - case 16: - o, err := mw.require(2) - if err != nil { - return err - } - mw.buf[o] = mfixext16 - mw.buf[o+1] = byte(extType) - default: - switch { - case length < math.MaxUint8: - o, err := mw.require(3) - if err != nil { - return err - } - mw.buf[o] = mext8 - mw.buf[o+1] = byte(uint8(length)) - mw.buf[o+2] = byte(extType) - case length < math.MaxUint16: - o, err := mw.require(4) - if err != nil { - return err - } - mw.buf[o] = mext16 - big.PutUint16(mw.buf[o+1:], uint16(length)) - mw.buf[o+3] = byte(extType) - default: - o, err := mw.require(6) - if err != nil { - return err - } - mw.buf[o] = mext32 - big.PutUint32(mw.buf[o+1:], uint32(length)) - mw.buf[o+5] = byte(extType) - } - } - - return nil -} - -// WriteExtension writes an extension type to the writer -func (mw *Writer) WriteExtension(e Extension) error { - length := e.Len() - - err := mw.writeExtensionHeader(length, e.ExtensionType()) - if err != nil { - return err - } - - // we can only write directly to the - // buffer if we're sure that it - // fits the object - if length <= mw.bufsize() { - o, err := mw.require(length) - if err != nil { - return err - } - return e.MarshalBinaryTo(mw.buf[o:]) - } - // here we create a new buffer - // just large enough for the body - // and save it as the write buffer - err = mw.flush() - if err != nil { - return err - } - buf := make([]byte, length) - err = e.MarshalBinaryTo(buf) - if err != nil { - return err - } - mw.buf = buf - mw.wloc = length - return nil -} - -// WriteExtensionRaw writes an extension type to the writer -func (mw *Writer) WriteExtensionRaw(extType int8, payload []byte) error { - if err := mw.writeExtensionHeader(len(payload), extType); err != nil { - return err - } - - // instead of using mw.Write(), we'll copy the data through the internal - // buffer, otherwise the payload would be moved to the heap - // (meaning we can use stack-allocated buffers with zero allocations) - for len(payload) > 0 { - chunkSize := mw.avail() - if chunkSize == 0 { - if err := mw.flush(); err != nil { - return err - } - chunkSize = mw.avail() - } - if chunkSize > len(payload) { - chunkSize = len(payload) - } - - mw.wloc += copy(mw.buf[mw.wloc:], payload[:chunkSize]) - payload = payload[chunkSize:] - } - - return nil -} - -// peek at the extension type, assuming the next -// kind to be read is Extension -func (m *Reader) peekExtensionType() (int8, error) { - _, _, extType, err := m.peekExtensionHeader() - - return extType, err -} - -// peekExtension peeks at the extension encoding type -// (must guarantee at least 1 byte in 'b') -func peekExtension(b []byte) (int8, error) { - spec := getBytespec(b[0]) - size := spec.size - if spec.typ != ExtensionType { - return 0, badPrefix(ExtensionType, b[0]) - } - if len(b) < int(size) { - return 0, ErrShortBytes - } - // for fixed extensions, - // the type information is in - // the second byte - if spec.extra == constsize { - return int8(b[1]), nil - } - // otherwise, it's in the last - // part of the prefix - return int8(b[size-1]), nil -} - -func (m *Reader) peekExtensionHeader() (offset int, length int, extType int8, err error) { - var p []byte - p, err = m.R.Peek(2) - if err != nil { - return - } - - offset = 2 - - lead := p[0] - switch lead { - case mfixext1: - extType = int8(p[1]) - length = 1 - return - - case mfixext2: - extType = int8(p[1]) - length = 2 - return - - case mfixext4: - extType = int8(p[1]) - length = 4 - return - - case mfixext8: - extType = int8(p[1]) - length = 8 - return - - case mfixext16: - extType = int8(p[1]) - length = 16 - return - - case mext8: - p, err = m.R.Peek(3) - if err != nil { - return - } - offset = 3 - extType = int8(p[2]) - length = int(uint8(p[1])) - - case mext16: - p, err = m.R.Peek(4) - if err != nil { - return - } - offset = 4 - extType = int8(p[3]) - length = int(big.Uint16(p[1:])) - - case mext32: - p, err = m.R.Peek(6) - if err != nil { - return - } - offset = 6 - extType = int8(p[5]) - length = int(big.Uint32(p[1:])) - - default: - err = badPrefix(ExtensionType, lead) - return - } - - return -} - -// ReadExtension reads the next object from the reader -// as an extension. ReadExtension will fail if the next -// object in the stream is not an extension, or if -// e.Type() is not the same as the wire type. -func (m *Reader) ReadExtension(e Extension) error { - offset, length, extType, err := m.peekExtensionHeader() - if err != nil { - return err - } - - if expectedType := e.ExtensionType(); extType != expectedType { - return errExt(extType, expectedType) - } - - p, err := m.R.Peek(offset + length) - if err != nil { - return err - } - err = e.UnmarshalBinary(p[offset:]) - if err == nil { - // consume the peeked bytes - _, err = m.R.Skip(offset + length) - } - return err -} - -// ReadExtensionRaw reads the next object from the reader -// as an extension. The returned slice is only -// valid until the next *Reader method call. -func (m *Reader) ReadExtensionRaw() (int8, []byte, error) { - offset, length, extType, err := m.peekExtensionHeader() - if err != nil { - return 0, nil, err - } - - payload, err := m.R.Next(offset + length) - if err != nil { - return 0, nil, err - } - - return extType, payload[offset:], nil -} - -// AppendExtension appends a MessagePack extension to the provided slice -func AppendExtension(b []byte, e Extension) ([]byte, error) { - l := e.Len() - var o []byte - var n int - switch l { - case 0: - o, n = ensure(b, 3) - o[n] = mext8 - o[n+1] = 0 - o[n+2] = byte(e.ExtensionType()) - return o[:n+3], nil - case 1: - o, n = ensure(b, 3) - o[n] = mfixext1 - o[n+1] = byte(e.ExtensionType()) - n += 2 - case 2: - o, n = ensure(b, 4) - o[n] = mfixext2 - o[n+1] = byte(e.ExtensionType()) - n += 2 - case 4: - o, n = ensure(b, 6) - o[n] = mfixext4 - o[n+1] = byte(e.ExtensionType()) - n += 2 - case 8: - o, n = ensure(b, 10) - o[n] = mfixext8 - o[n+1] = byte(e.ExtensionType()) - n += 2 - case 16: - o, n = ensure(b, 18) - o[n] = mfixext16 - o[n+1] = byte(e.ExtensionType()) - n += 2 - default: - switch { - case l < math.MaxUint8: - o, n = ensure(b, l+3) - o[n] = mext8 - o[n+1] = byte(uint8(l)) - o[n+2] = byte(e.ExtensionType()) - n += 3 - case l < math.MaxUint16: - o, n = ensure(b, l+4) - o[n] = mext16 - big.PutUint16(o[n+1:], uint16(l)) - o[n+3] = byte(e.ExtensionType()) - n += 4 - default: - o, n = ensure(b, l+6) - o[n] = mext32 - big.PutUint32(o[n+1:], uint32(l)) - o[n+5] = byte(e.ExtensionType()) - n += 6 - } - } - return o, e.MarshalBinaryTo(o[n:]) -} - -// ReadExtensionBytes reads an extension from 'b' into 'e' -// and returns any remaining bytes. -// Possible errors: -// - ErrShortBytes ('b' not long enough) -// - ExtensionTypeError{} (wire type not the same as e.Type()) -// - TypeError{} (next object not an extension) -// - InvalidPrefixError -// - An umarshal error returned from e.UnmarshalBinary -func ReadExtensionBytes(b []byte, e Extension) ([]byte, error) { - typ, remain, data, err := readExt(b) - if err != nil { - return b, err - } - if typ != e.ExtensionType() { - return b, errExt(typ, e.ExtensionType()) - } - return remain, e.UnmarshalBinary(data) -} - -// readExt will read the extension type, and return remaining bytes, -// as well as the data of the extension. -func readExt(b []byte) (typ int8, remain []byte, data []byte, err error) { - l := len(b) - if l < 3 { - return 0, b, nil, ErrShortBytes - } - lead := b[0] - var ( - sz int // size of 'data' - off int // offset of 'data' - ) - switch lead { - case mfixext1: - typ = int8(b[1]) - sz = 1 - off = 2 - case mfixext2: - typ = int8(b[1]) - sz = 2 - off = 2 - case mfixext4: - typ = int8(b[1]) - sz = 4 - off = 2 - case mfixext8: - typ = int8(b[1]) - sz = 8 - off = 2 - case mfixext16: - typ = int8(b[1]) - sz = 16 - off = 2 - case mext8: - sz = int(uint8(b[1])) - typ = int8(b[2]) - off = 3 - if sz == 0 { - return typ, b[3:], b[3:3], nil - } - case mext16: - if l < 4 { - return 0, b, nil, ErrShortBytes - } - sz = int(big.Uint16(b[1:])) - typ = int8(b[3]) - off = 4 - case mext32: - if l < 6 { - return 0, b, nil, ErrShortBytes - } - sz = int(big.Uint32(b[1:])) - typ = int8(b[5]) - off = 6 - default: - return 0, b, nil, badPrefix(ExtensionType, lead) - } - // the data of the extension starts - // at 'off' and is 'sz' bytes long - tot := off + sz - if len(b[off:]) < sz { - return 0, b, nil, ErrShortBytes - } - return typ, b[tot:], b[off:tot:tot], nil -} diff --git a/vendor/github.com/tinylib/msgp/msgp/file.go b/vendor/github.com/tinylib/msgp/msgp/file.go deleted file mode 100644 index a6d91ede14..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/file.go +++ /dev/null @@ -1,93 +0,0 @@ -//go:build (linux || darwin || dragonfly || freebsd || illumos || netbsd || openbsd) && !appengine && !tinygo -// +build linux darwin dragonfly freebsd illumos netbsd openbsd -// +build !appengine -// +build !tinygo - -package msgp - -import ( - "os" - "syscall" -) - -// ReadFile reads a file into 'dst' using -// a read-only memory mapping. Consequently, -// the file must be mmap-able, and the -// Unmarshaler should never write to -// the source memory. (Methods generated -// by the msgp tool obey that constraint, but -// user-defined implementations may not.) -// -// Reading and writing through file mappings -// is only efficient for large files; small -// files are best read and written using -// the ordinary streaming interfaces. -func ReadFile(dst Unmarshaler, file *os.File) error { - stat, err := file.Stat() - if err != nil { - return err - } - data, err := syscall.Mmap(int(file.Fd()), 0, int(stat.Size()), syscall.PROT_READ, syscall.MAP_SHARED) - if err != nil { - return err - } - adviseRead(data) - _, err = dst.UnmarshalMsg(data) - uerr := syscall.Munmap(data) - if err == nil { - err = uerr - } - return err -} - -// MarshalSizer is the combination -// of the Marshaler and Sizer -// interfaces. -type MarshalSizer interface { - Marshaler - Sizer -} - -// WriteFile writes a file from 'src' using -// memory mapping. It overwrites the entire -// contents of the previous file. -// The mapping size is calculated -// using the `Msgsize()` method -// of 'src', so it must produce a result -// equal to or greater than the actual encoded -// size of the object. Otherwise, -// a fault (SIGBUS) will occur. -// -// Reading and writing through file mappings -// is only efficient for large files; small -// files are best read and written using -// the ordinary streaming interfaces. -// -// NOTE: The performance of this call -// is highly OS- and filesystem-dependent. -// Users should take care to test that this -// performs as expected in a production environment. -// (Linux users should run a kernel and filesystem -// that support fallocate(2) for the best results.) -func WriteFile(src MarshalSizer, file *os.File) error { - sz := src.Msgsize() - err := fallocate(file, int64(sz)) - if err != nil { - return err - } - data, err := syscall.Mmap(int(file.Fd()), 0, sz, syscall.PROT_READ|syscall.PROT_WRITE, syscall.MAP_SHARED) - if err != nil { - return err - } - adviseWrite(data) - chunk := data[:0] - chunk, err = src.MarshalMsg(chunk) - if err != nil { - return err - } - uerr := syscall.Munmap(data) - if uerr != nil { - return uerr - } - return file.Truncate(int64(len(chunk))) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/file_port.go b/vendor/github.com/tinylib/msgp/msgp/file_port.go deleted file mode 100644 index dac0dba3fa..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/file_port.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build windows || appengine || tinygo -// +build windows appengine tinygo - -package msgp - -import ( - "io" - "os" -) - -// MarshalSizer is the combination -// of the Marshaler and Sizer -// interfaces. -type MarshalSizer interface { - Marshaler - Sizer -} - -func ReadFile(dst Unmarshaler, file *os.File) error { - if u, ok := dst.(Decodable); ok { - return u.DecodeMsg(NewReader(file)) - } - - data, err := io.ReadAll(file) - if err != nil { - return err - } - _, err = dst.UnmarshalMsg(data) - return err -} - -func WriteFile(src MarshalSizer, file *os.File) error { - if e, ok := src.(Encodable); ok { - w := NewWriter(file) - err := e.EncodeMsg(w) - if err == nil { - err = w.Flush() - } - return err - } - - raw, err := src.MarshalMsg(nil) - if err != nil { - return err - } - _, err = file.Write(raw) - return err -} diff --git a/vendor/github.com/tinylib/msgp/msgp/integers.go b/vendor/github.com/tinylib/msgp/msgp/integers.go deleted file mode 100644 index d07a5fba7f..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/integers.go +++ /dev/null @@ -1,199 +0,0 @@ -package msgp - -import "encoding/binary" - -/* ---------------------------------- - integer encoding utilities - (inline-able) - - TODO(tinylib): there are faster, - albeit non-portable solutions - to the code below. implement - byteswap? - ---------------------------------- */ - -func putMint64(b []byte, i int64) { - _ = b[8] // bounds check elimination - - b[0] = mint64 - b[1] = byte(i >> 56) - b[2] = byte(i >> 48) - b[3] = byte(i >> 40) - b[4] = byte(i >> 32) - b[5] = byte(i >> 24) - b[6] = byte(i >> 16) - b[7] = byte(i >> 8) - b[8] = byte(i) -} - -func getMint64(b []byte) int64 { - _ = b[8] // bounds check elimination - - return (int64(b[1]) << 56) | (int64(b[2]) << 48) | - (int64(b[3]) << 40) | (int64(b[4]) << 32) | - (int64(b[5]) << 24) | (int64(b[6]) << 16) | - (int64(b[7]) << 8) | (int64(b[8])) -} - -func putMint32(b []byte, i int32) { - _ = b[4] // bounds check elimination - - b[0] = mint32 - b[1] = byte(i >> 24) - b[2] = byte(i >> 16) - b[3] = byte(i >> 8) - b[4] = byte(i) -} - -func getMint32(b []byte) int32 { - _ = b[4] // bounds check elimination - - return (int32(b[1]) << 24) | (int32(b[2]) << 16) | (int32(b[3]) << 8) | (int32(b[4])) -} - -func putMint16(b []byte, i int16) { - _ = b[2] // bounds check elimination - - b[0] = mint16 - b[1] = byte(i >> 8) - b[2] = byte(i) -} - -func getMint16(b []byte) (i int16) { - _ = b[2] // bounds check elimination - - return (int16(b[1]) << 8) | int16(b[2]) -} - -func putMint8(b []byte, i int8) { - _ = b[1] // bounds check elimination - - b[0] = mint8 - b[1] = byte(i) -} - -func getMint8(b []byte) (i int8) { - return int8(b[1]) -} - -func putMuint64(b []byte, u uint64) { - _ = b[8] // bounds check elimination - - b[0] = muint64 - b[1] = byte(u >> 56) - b[2] = byte(u >> 48) - b[3] = byte(u >> 40) - b[4] = byte(u >> 32) - b[5] = byte(u >> 24) - b[6] = byte(u >> 16) - b[7] = byte(u >> 8) - b[8] = byte(u) -} - -func getMuint64(b []byte) uint64 { - _ = b[8] // bounds check elimination - - return (uint64(b[1]) << 56) | (uint64(b[2]) << 48) | - (uint64(b[3]) << 40) | (uint64(b[4]) << 32) | - (uint64(b[5]) << 24) | (uint64(b[6]) << 16) | - (uint64(b[7]) << 8) | (uint64(b[8])) -} - -func putMuint32(b []byte, u uint32) { - _ = b[4] // bounds check elimination - - b[0] = muint32 - b[1] = byte(u >> 24) - b[2] = byte(u >> 16) - b[3] = byte(u >> 8) - b[4] = byte(u) -} - -func getMuint32(b []byte) uint32 { - _ = b[4] // bounds check elimination - - return (uint32(b[1]) << 24) | (uint32(b[2]) << 16) | (uint32(b[3]) << 8) | (uint32(b[4])) -} - -func putMuint16(b []byte, u uint16) { - _ = b[2] // bounds check elimination - - b[0] = muint16 - b[1] = byte(u >> 8) - b[2] = byte(u) -} - -func getMuint16(b []byte) uint16 { - _ = b[2] // bounds check elimination - - return (uint16(b[1]) << 8) | uint16(b[2]) -} - -func putMuint8(b []byte, u uint8) { - _ = b[1] // bounds check elimination - - b[0] = muint8 - b[1] = byte(u) -} - -func getMuint8(b []byte) uint8 { - return uint8(b[1]) -} - -func getUnix(b []byte) (sec int64, nsec int32) { - sec = int64(binary.BigEndian.Uint64(b)) - nsec = int32(binary.BigEndian.Uint32(b[8:])) - - return -} - -func putUnix(b []byte, sec int64, nsec int32) { - binary.BigEndian.PutUint64(b, uint64(sec)) - binary.BigEndian.PutUint32(b[8:], uint32(nsec)) -} - -/* ----------------------------- - prefix utilities - ----------------------------- */ - -// write prefix and uint8 -func prefixu8(b []byte, pre byte, sz uint8) { - _ = b[1] // bounds check elimination - - b[0] = pre - b[1] = byte(sz) -} - -// write prefix and big-endian uint16 -func prefixu16(b []byte, pre byte, sz uint16) { - _ = b[2] // bounds check elimination - - b[0] = pre - b[1] = byte(sz >> 8) - b[2] = byte(sz) -} - -// write prefix and big-endian uint32 -func prefixu32(b []byte, pre byte, sz uint32) { - _ = b[4] // bounds check elimination - - b[0] = pre - b[1] = byte(sz >> 24) - b[2] = byte(sz >> 16) - b[3] = byte(sz >> 8) - b[4] = byte(sz) -} - -func prefixu64(b []byte, pre byte, sz uint64) { - _ = b[8] // bounds check elimination - - b[0] = pre - b[1] = byte(sz >> 56) - b[2] = byte(sz >> 48) - b[3] = byte(sz >> 40) - b[4] = byte(sz >> 32) - b[5] = byte(sz >> 24) - b[6] = byte(sz >> 16) - b[7] = byte(sz >> 8) - b[8] = byte(sz) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/json.go b/vendor/github.com/tinylib/msgp/msgp/json.go deleted file mode 100644 index 18593f64d5..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/json.go +++ /dev/null @@ -1,580 +0,0 @@ -package msgp - -import ( - "bufio" - "encoding/base64" - "encoding/json" - "io" - "strconv" - "unicode/utf8" -) - -var ( - null = []byte("null") - hex = []byte("0123456789abcdef") -) - -var defuns [_maxtype]func(jsWriter, *Reader) (int, error) - -// note: there is an initialization loop if -// this isn't set up during init() -func init() { - // since none of these functions are inline-able, - // there is not much of a penalty to the indirect - // call. however, this is best expressed as a jump-table... - defuns = [_maxtype]func(jsWriter, *Reader) (int, error){ - StrType: rwString, - BinType: rwBytes, - MapType: rwMap, - ArrayType: rwArray, - Float64Type: rwFloat64, - Float32Type: rwFloat32, - BoolType: rwBool, - IntType: rwInt, - UintType: rwUint, - NilType: rwNil, - ExtensionType: rwExtension, - Complex64Type: rwExtension, - Complex128Type: rwExtension, - TimeType: rwTime, - } -} - -// this is the interface -// used to write json -type jsWriter interface { - io.Writer - io.ByteWriter - WriteString(string) (int, error) -} - -// CopyToJSON reads MessagePack from 'src' and copies it -// as JSON to 'dst' until EOF. -func CopyToJSON(dst io.Writer, src io.Reader) (n int64, err error) { - r := NewReader(src) - n, err = r.WriteToJSON(dst) - freeR(r) - return -} - -// WriteToJSON translates MessagePack from 'r' and writes it as -// JSON to 'w' until the underlying reader returns io.EOF. It returns -// the number of bytes written, and an error if it stopped before EOF. -func (r *Reader) WriteToJSON(w io.Writer) (n int64, err error) { - var j jsWriter - var bf *bufio.Writer - if jsw, ok := w.(jsWriter); ok { - j = jsw - } else { - bf = bufio.NewWriter(w) - j = bf - } - var nn int - for err == nil { - nn, err = rwNext(j, r) - n += int64(nn) - } - if err != io.EOF { - if bf != nil { - bf.Flush() - } - return - } - err = nil - if bf != nil { - err = bf.Flush() - } - return -} - -func rwNext(w jsWriter, src *Reader) (int, error) { - t, err := src.NextType() - if err != nil { - return 0, err - } - return defuns[t](w, src) -} - -func rwMap(dst jsWriter, src *Reader) (n int, err error) { - var comma bool - var sz uint32 - var field []byte - - sz, err = src.ReadMapHeader() - if err != nil { - return - } - - if sz == 0 { - return dst.WriteString("{}") - } - - // This is potentially a recursive call. - if done, err := src.recursiveCall(); err != nil { - return 0, err - } else { - defer done() - } - - err = dst.WriteByte('{') - if err != nil { - return - } - n++ - var nn int - for i := uint32(0); i < sz; i++ { - if comma { - err = dst.WriteByte(',') - if err != nil { - return - } - n++ - } - - field, err = src.ReadMapKeyPtr() - if err != nil { - return - } - nn, err = rwquoted(dst, field) - n += nn - if err != nil { - return - } - - err = dst.WriteByte(':') - if err != nil { - return - } - n++ - nn, err = rwNext(dst, src) - n += nn - if err != nil { - return - } - if !comma { - comma = true - } - } - - err = dst.WriteByte('}') - if err != nil { - return - } - n++ - return -} - -func rwArray(dst jsWriter, src *Reader) (n int, err error) { - err = dst.WriteByte('[') - if err != nil { - return - } - // This is potentially a recursive call. - if done, err := src.recursiveCall(); err != nil { - return 0, err - } else { - defer done() - } - - var sz uint32 - var nn int - sz, err = src.ReadArrayHeader() - if err != nil { - return - } - comma := false - for i := uint32(0); i < sz; i++ { - if comma { - err = dst.WriteByte(',') - if err != nil { - return - } - n++ - } - nn, err = rwNext(dst, src) - n += nn - if err != nil { - return - } - comma = true - } - - err = dst.WriteByte(']') - if err != nil { - return - } - n++ - return -} - -func rwNil(dst jsWriter, src *Reader) (int, error) { - err := src.ReadNil() - if err != nil { - return 0, err - } - return dst.Write(null) -} - -func rwFloat32(dst jsWriter, src *Reader) (int, error) { - f, err := src.ReadFloat32() - if err != nil { - return 0, err - } - src.scratch = strconv.AppendFloat(src.scratch[:0], float64(f), 'f', -1, 32) - return dst.Write(src.scratch) -} - -func rwFloat64(dst jsWriter, src *Reader) (int, error) { - f, err := src.ReadFloat64() - if err != nil { - return 0, err - } - src.scratch = strconv.AppendFloat(src.scratch[:0], f, 'f', -1, 64) - return dst.Write(src.scratch) -} - -func rwInt(dst jsWriter, src *Reader) (int, error) { - i, err := src.ReadInt64() - if err != nil { - return 0, err - } - src.scratch = strconv.AppendInt(src.scratch[:0], i, 10) - return dst.Write(src.scratch) -} - -func rwUint(dst jsWriter, src *Reader) (int, error) { - u, err := src.ReadUint64() - if err != nil { - return 0, err - } - src.scratch = strconv.AppendUint(src.scratch[:0], u, 10) - return dst.Write(src.scratch) -} - -func rwBool(dst jsWriter, src *Reader) (int, error) { - b, err := src.ReadBool() - if err != nil { - return 0, err - } - if b { - return dst.WriteString("true") - } - return dst.WriteString("false") -} - -func rwTime(dst jsWriter, src *Reader) (int, error) { - t, err := src.ReadTime() - if err != nil { - return 0, err - } - bts, err := t.MarshalJSON() - if err != nil { - return 0, err - } - return dst.Write(bts) -} - -func rwExtension(dst jsWriter, src *Reader) (n int, err error) { - et, err := src.peekExtensionType() - if err != nil { - return 0, err - } - - // registered extensions can override - // the JSON encoding - if j, ok := extensionReg[et]; ok { - var bts []byte - e := j() - err = src.ReadExtension(e) - if err != nil { - return - } - bts, err = json.Marshal(e) - if err != nil { - return - } - return dst.Write(bts) - } - - e := RawExtension{} - e.Type = et - err = src.ReadExtension(&e) - if err != nil { - return - } - - var nn int - err = dst.WriteByte('{') - if err != nil { - return - } - n++ - - nn, err = dst.WriteString(`"type":`) - n += nn - if err != nil { - return - } - - src.scratch = strconv.AppendInt(src.scratch[0:0], int64(e.Type), 10) - nn, err = dst.Write(src.scratch) - n += nn - if err != nil { - return - } - - nn, err = dst.WriteString(`,"data":"`) - n += nn - if err != nil { - return - } - - enc := base64.NewEncoder(base64.StdEncoding, dst) - - nn, err = enc.Write(e.Data) - n += nn - if err != nil { - return - } - err = enc.Close() - if err != nil { - return - } - nn, err = dst.WriteString(`"}`) - n += nn - return -} - -func rwString(dst jsWriter, src *Reader) (n int, err error) { - lead, err := src.R.PeekByte() - if err != nil { - return - } - var read int - var p []byte - if isfixstr(lead) { - read = int(rfixstr(lead)) - src.R.Skip(1) - goto write - } - - switch lead { - case mstr8: - p, err = src.R.Next(2) - if err != nil { - return - } - read = int(uint8(p[1])) - case mstr16: - p, err = src.R.Next(3) - if err != nil { - return - } - read = int(big.Uint16(p[1:])) - case mstr32: - p, err = src.R.Next(5) - if err != nil { - return - } - read = int(big.Uint32(p[1:])) - default: - err = badPrefix(StrType, lead) - return - } -write: - p, err = src.R.Next(read) - if err != nil { - return - } - n, err = rwquoted(dst, p) - return -} - -func rwBytes(dst jsWriter, src *Reader) (n int, err error) { - var nn int - err = dst.WriteByte('"') - if err != nil { - return - } - n++ - src.scratch, err = src.ReadBytes(src.scratch[:0]) - if err != nil { - return - } - enc := base64.NewEncoder(base64.StdEncoding, dst) - nn, err = enc.Write(src.scratch) - n += nn - if err != nil { - return - } - err = enc.Close() - if err != nil { - return - } - err = dst.WriteByte('"') - if err != nil { - return - } - n++ - return -} - -// Below (c) The Go Authors, 2009-2014 -// Subject to the BSD-style license found at http://golang.org -// -// see: encoding/json/encode.go:(*encodeState).stringbytes() -func rwquoted(dst jsWriter, s []byte) (n int, err error) { - var nn int - err = dst.WriteByte('"') - if err != nil { - return - } - n++ - start := 0 - for i := 0; i < len(s); { - if b := s[i]; b < utf8.RuneSelf { - if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { - i++ - continue - } - if start < i { - nn, err = dst.Write(s[start:i]) - n += nn - if err != nil { - return - } - } - switch b { - case '\\', '"': - err = dst.WriteByte('\\') - if err != nil { - return - } - n++ - err = dst.WriteByte(b) - if err != nil { - return - } - n++ - case '\n': - err = dst.WriteByte('\\') - if err != nil { - return - } - n++ - err = dst.WriteByte('n') - if err != nil { - return - } - n++ - case '\r': - err = dst.WriteByte('\\') - if err != nil { - return - } - n++ - err = dst.WriteByte('r') - if err != nil { - return - } - n++ - case '\t': - err = dst.WriteByte('\\') - if err != nil { - return - } - n++ - err = dst.WriteByte('t') - if err != nil { - return - } - n++ - default: - // This encodes bytes < 0x20 except for \t, \n and \r. - // It also escapes <, >, and & - // because they can lead to security holes when - // user-controlled strings are rendered into JSON - // and served to some browsers. - nn, err = dst.WriteString(`\u00`) - n += nn - if err != nil { - return - } - err = dst.WriteByte(hex[b>>4]) - if err != nil { - return - } - n++ - err = dst.WriteByte(hex[b&0xF]) - if err != nil { - return - } - n++ - } - i++ - start = i - continue - } - c, size := utf8.DecodeRune(s[i:]) - if c == utf8.RuneError && size == 1 { - if start < i { - nn, err = dst.Write(s[start:i]) - n += nn - if err != nil { - return - } - } - nn, err = dst.WriteString(`\ufffd`) - n += nn - if err != nil { - return - } - i += size - start = i - continue - } - // U+2028 is LINE SEPARATOR. - // U+2029 is PARAGRAPH SEPARATOR. - // They are both technically valid characters in JSON strings, - // but don't work in JSONP, which has to be evaluated as JavaScript, - // and can lead to security holes there. It is valid JSON to - // escape them, so we do so unconditionally. - // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion. - if c == '\u2028' || c == '\u2029' { - if start < i { - nn, err = dst.Write(s[start:i]) - n += nn - if err != nil { - return - } - } - nn, err = dst.WriteString(`\u202`) - n += nn - if err != nil { - return - } - err = dst.WriteByte(hex[c&0xF]) - if err != nil { - return - } - n++ - i += size - start = i - continue - } - i += size - } - if start < len(s) { - nn, err = dst.Write(s[start:]) - n += nn - if err != nil { - return - } - } - err = dst.WriteByte('"') - if err != nil { - return - } - n++ - return -} diff --git a/vendor/github.com/tinylib/msgp/msgp/json_bytes.go b/vendor/github.com/tinylib/msgp/msgp/json_bytes.go deleted file mode 100644 index d4fbda6315..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/json_bytes.go +++ /dev/null @@ -1,347 +0,0 @@ -package msgp - -import ( - "bufio" - "encoding/base64" - "encoding/json" - "io" - "strconv" - "time" -) - -var unfuns [_maxtype]func(jsWriter, []byte, []byte, int) ([]byte, []byte, error) - -func init() { - // NOTE(pmh): this is best expressed as a jump table, - // but gc doesn't do that yet. revisit post-go1.5. - unfuns = [_maxtype]func(jsWriter, []byte, []byte, int) ([]byte, []byte, error){ - StrType: rwStringBytes, - BinType: rwBytesBytes, - MapType: rwMapBytes, - ArrayType: rwArrayBytes, - Float64Type: rwFloat64Bytes, - Float32Type: rwFloat32Bytes, - BoolType: rwBoolBytes, - IntType: rwIntBytes, - UintType: rwUintBytes, - NilType: rwNullBytes, - ExtensionType: rwExtensionBytes, - Complex64Type: rwExtensionBytes, - Complex128Type: rwExtensionBytes, - TimeType: rwTimeBytes, - } -} - -// UnmarshalAsJSON takes raw messagepack and writes -// it as JSON to 'w'. If an error is returned, the -// bytes not translated will also be returned. If -// no errors are encountered, the length of the returned -// slice will be zero. -func UnmarshalAsJSON(w io.Writer, msg []byte) ([]byte, error) { - var ( - scratch []byte - cast bool - dst jsWriter - err error - ) - if jsw, ok := w.(jsWriter); ok { - dst = jsw - cast = true - } else { - dst = bufio.NewWriterSize(w, 512) - } - for len(msg) > 0 && err == nil { - msg, scratch, err = writeNext(dst, msg, scratch, 0) - } - if !cast && err == nil { - err = dst.(*bufio.Writer).Flush() - } - return msg, err -} - -func writeNext(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - if len(msg) < 1 { - return msg, scratch, ErrShortBytes - } - t := getType(msg[0]) - if t == InvalidType { - return msg, scratch, InvalidPrefixError(msg[0]) - } - if t == ExtensionType { - et, err := peekExtension(msg) - if err != nil { - return nil, scratch, err - } - if et == TimeExtension || et == MsgTimeExtension { - t = TimeType - } - } - return unfuns[t](w, msg, scratch, depth) -} - -func rwArrayBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - if depth >= recursionLimit { - return msg, scratch, ErrRecursion - } - sz, msg, err := ReadArrayHeaderBytes(msg) - if err != nil { - return msg, scratch, err - } - err = w.WriteByte('[') - if err != nil { - return msg, scratch, err - } - for i := uint32(0); i < sz; i++ { - if i != 0 { - err = w.WriteByte(',') - if err != nil { - return msg, scratch, err - } - } - msg, scratch, err = writeNext(w, msg, scratch, depth+1) - if err != nil { - return msg, scratch, err - } - } - err = w.WriteByte(']') - return msg, scratch, err -} - -func rwMapBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - if depth >= recursionLimit { - return msg, scratch, ErrRecursion - } - sz, msg, err := ReadMapHeaderBytes(msg) - if err != nil { - return msg, scratch, err - } - err = w.WriteByte('{') - if err != nil { - return msg, scratch, err - } - for i := uint32(0); i < sz; i++ { - if i != 0 { - err = w.WriteByte(',') - if err != nil { - return msg, scratch, err - } - } - msg, scratch, err = rwMapKeyBytes(w, msg, scratch, depth) - if err != nil { - return msg, scratch, err - } - err = w.WriteByte(':') - if err != nil { - return msg, scratch, err - } - msg, scratch, err = writeNext(w, msg, scratch, depth+1) - if err != nil { - return msg, scratch, err - } - } - err = w.WriteByte('}') - return msg, scratch, err -} - -func rwMapKeyBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - msg, scratch, err := rwStringBytes(w, msg, scratch, depth) - if err != nil { - if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType { - return rwBytesBytes(w, msg, scratch, depth) - } - } - return msg, scratch, err -} - -func rwStringBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - str, msg, err := ReadStringZC(msg) - if err != nil { - return msg, scratch, err - } - _, err = rwquoted(w, str) - return msg, scratch, err -} - -func rwBytesBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - bts, msg, err := ReadBytesZC(msg) - if err != nil { - return msg, scratch, err - } - l := base64.StdEncoding.EncodedLen(len(bts)) - if cap(scratch) >= l { - scratch = scratch[0:l] - } else { - scratch = make([]byte, l) - } - base64.StdEncoding.Encode(scratch, bts) - err = w.WriteByte('"') - if err != nil { - return msg, scratch, err - } - _, err = w.Write(scratch) - if err != nil { - return msg, scratch, err - } - err = w.WriteByte('"') - return msg, scratch, err -} - -func rwNullBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - msg, err := ReadNilBytes(msg) - if err != nil { - return msg, scratch, err - } - _, err = w.Write(null) - return msg, scratch, err -} - -func rwBoolBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - b, msg, err := ReadBoolBytes(msg) - if err != nil { - return msg, scratch, err - } - if b { - _, err = w.WriteString("true") - return msg, scratch, err - } - _, err = w.WriteString("false") - return msg, scratch, err -} - -func rwIntBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - i, msg, err := ReadInt64Bytes(msg) - if err != nil { - return msg, scratch, err - } - scratch = strconv.AppendInt(scratch[0:0], i, 10) - _, err = w.Write(scratch) - return msg, scratch, err -} - -func rwUintBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - u, msg, err := ReadUint64Bytes(msg) - if err != nil { - return msg, scratch, err - } - scratch = strconv.AppendUint(scratch[0:0], u, 10) - _, err = w.Write(scratch) - return msg, scratch, err -} - -func rwFloat32Bytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - var f float32 - var err error - f, msg, err = ReadFloat32Bytes(msg) - if err != nil { - return msg, scratch, err - } - scratch = strconv.AppendFloat(scratch[:0], float64(f), 'f', -1, 32) - _, err = w.Write(scratch) - return msg, scratch, err -} - -func rwFloat64Bytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - var f float64 - var err error - f, msg, err = ReadFloat64Bytes(msg) - if err != nil { - return msg, scratch, err - } - scratch = strconv.AppendFloat(scratch[:0], f, 'f', -1, 64) - _, err = w.Write(scratch) - return msg, scratch, err -} - -func rwTimeBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - var t time.Time - var err error - t, msg, err = ReadTimeBytes(msg) - if err != nil { - return msg, scratch, err - } - bts, err := t.MarshalJSON() - if err != nil { - return msg, scratch, err - } - _, err = w.Write(bts) - return msg, scratch, err -} - -func rwExtensionBytes(w jsWriter, msg []byte, scratch []byte, depth int) ([]byte, []byte, error) { - var err error - var et int8 - et, err = peekExtension(msg) - if err != nil { - return msg, scratch, err - } - - // if it's time.Time - if et == TimeExtension || et == MsgTimeExtension { - var tm time.Time - tm, msg, err = ReadTimeBytes(msg) - if err != nil { - return msg, scratch, err - } - bts, err := tm.MarshalJSON() - if err != nil { - return msg, scratch, err - } - _, err = w.Write(bts) - return msg, scratch, err - } - - // if the extension is registered, - // use its canonical JSON form - if f, ok := extensionReg[et]; ok { - e := f() - msg, err = ReadExtensionBytes(msg, e) - if err != nil { - return msg, scratch, err - } - bts, err := json.Marshal(e) - if err != nil { - return msg, scratch, err - } - _, err = w.Write(bts) - return msg, scratch, err - } - - // otherwise, write `{"type": , "data": ""}` - r := RawExtension{} - r.Type = et - msg, err = ReadExtensionBytes(msg, &r) - if err != nil { - return msg, scratch, err - } - scratch, err = writeExt(w, r, scratch) - return msg, scratch, err -} - -func writeExt(w jsWriter, r RawExtension, scratch []byte) ([]byte, error) { - _, err := w.WriteString(`{"type":`) - if err != nil { - return scratch, err - } - scratch = strconv.AppendInt(scratch[0:0], int64(r.Type), 10) - _, err = w.Write(scratch) - if err != nil { - return scratch, err - } - _, err = w.WriteString(`,"data":"`) - if err != nil { - return scratch, err - } - l := base64.StdEncoding.EncodedLen(len(r.Data)) - if cap(scratch) >= l { - scratch = scratch[0:l] - } else { - scratch = make([]byte, l) - } - base64.StdEncoding.Encode(scratch, r.Data) - _, err = w.Write(scratch) - if err != nil { - return scratch, err - } - _, err = w.WriteString(`"}`) - return scratch, err -} diff --git a/vendor/github.com/tinylib/msgp/msgp/number.go b/vendor/github.com/tinylib/msgp/msgp/number.go deleted file mode 100644 index edfe328b44..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/number.go +++ /dev/null @@ -1,266 +0,0 @@ -package msgp - -import ( - "math" - "strconv" -) - -// The portable parts of the Number implementation - -// Number can be -// an int64, uint64, float32, -// or float64 internally. -// It can decode itself -// from any of the native -// messagepack number types. -// The zero-value of Number -// is Int(0). Using the equality -// operator with Number compares -// both the type and the value -// of the number. -type Number struct { - // internally, this - // is just a tagged union. - // the raw bits of the number - // are stored the same way regardless. - bits uint64 - typ Type -} - -// AsInt sets the number to an int64. -func (n *Number) AsInt(i int64) { - // we always store int(0) - // as {0, InvalidType} in - // order to preserve - // the behavior of the == operator - if i == 0 { - n.typ = InvalidType - n.bits = 0 - return - } - - n.typ = IntType - n.bits = uint64(i) -} - -// AsUint sets the number to a uint64. -func (n *Number) AsUint(u uint64) { - n.typ = UintType - n.bits = u -} - -// AsFloat32 sets the value of the number -// to a float32. -func (n *Number) AsFloat32(f float32) { - n.typ = Float32Type - n.bits = uint64(math.Float32bits(f)) -} - -// AsFloat64 sets the value of the -// number to a float64. -func (n *Number) AsFloat64(f float64) { - n.typ = Float64Type - n.bits = math.Float64bits(f) -} - -// Int casts the number as an int64, and -// returns whether or not that was the -// underlying type. -func (n *Number) Int() (int64, bool) { - return int64(n.bits), n.typ == IntType || n.typ == InvalidType -} - -// Uint casts the number as a uint64, and returns -// whether or not that was the underlying type. -func (n *Number) Uint() (uint64, bool) { - return n.bits, n.typ == UintType -} - -// Float casts the number to a float64, and -// returns whether or not that was the underlying -// type (either a float64 or a float32). -func (n *Number) Float() (float64, bool) { - switch n.typ { - case Float32Type: - return float64(math.Float32frombits(uint32(n.bits))), true - case Float64Type: - return math.Float64frombits(n.bits), true - default: - return 0.0, false - } -} - -// Type will return one of: -// Float64Type, Float32Type, UintType, or IntType. -func (n *Number) Type() Type { - if n.typ == InvalidType { - return IntType - } - return n.typ -} - -// DecodeMsg implements msgp.Decodable -func (n *Number) DecodeMsg(r *Reader) error { - typ, err := r.NextType() - if err != nil { - return err - } - switch typ { - case Float32Type: - f, err := r.ReadFloat32() - if err != nil { - return err - } - n.AsFloat32(f) - return nil - case Float64Type: - f, err := r.ReadFloat64() - if err != nil { - return err - } - n.AsFloat64(f) - return nil - case IntType: - i, err := r.ReadInt64() - if err != nil { - return err - } - n.AsInt(i) - return nil - case UintType: - u, err := r.ReadUint64() - if err != nil { - return err - } - n.AsUint(u) - return nil - default: - return TypeError{Encoded: typ, Method: IntType} - } -} - -// UnmarshalMsg implements msgp.Unmarshaler -func (n *Number) UnmarshalMsg(b []byte) ([]byte, error) { - typ := NextType(b) - switch typ { - case IntType: - i, o, err := ReadInt64Bytes(b) - if err != nil { - return b, err - } - n.AsInt(i) - return o, nil - case UintType: - u, o, err := ReadUint64Bytes(b) - if err != nil { - return b, err - } - n.AsUint(u) - return o, nil - case Float64Type: - f, o, err := ReadFloat64Bytes(b) - if err != nil { - return b, err - } - n.AsFloat64(f) - return o, nil - case Float32Type: - f, o, err := ReadFloat32Bytes(b) - if err != nil { - return b, err - } - n.AsFloat32(f) - return o, nil - default: - return b, TypeError{Method: IntType, Encoded: typ} - } -} - -// MarshalMsg implements msgp.Marshaler -func (n *Number) MarshalMsg(b []byte) ([]byte, error) { - switch n.typ { - case IntType: - return AppendInt64(b, int64(n.bits)), nil - case UintType: - return AppendUint64(b, uint64(n.bits)), nil - case Float64Type: - return AppendFloat64(b, math.Float64frombits(n.bits)), nil - case Float32Type: - return AppendFloat32(b, math.Float32frombits(uint32(n.bits))), nil - default: - return AppendInt64(b, 0), nil - } -} - -// EncodeMsg implements msgp.Encodable -func (n *Number) EncodeMsg(w *Writer) error { - switch n.typ { - case IntType: - return w.WriteInt64(int64(n.bits)) - case UintType: - return w.WriteUint64(n.bits) - case Float64Type: - return w.WriteFloat64(math.Float64frombits(n.bits)) - case Float32Type: - return w.WriteFloat32(math.Float32frombits(uint32(n.bits))) - default: - return w.WriteInt64(0) - } -} - -// Msgsize implements msgp.Sizer -func (n *Number) Msgsize() int { - switch n.typ { - case Float32Type: - return Float32Size - case Float64Type: - return Float64Size - case IntType: - return Int64Size - case UintType: - return Uint64Size - default: - return 1 // fixint(0) - } -} - -// MarshalJSON implements json.Marshaler -func (n *Number) MarshalJSON() ([]byte, error) { - t := n.Type() - if t == InvalidType { - return []byte{'0'}, nil - } - out := make([]byte, 0, 32) - switch t { - case Float32Type, Float64Type: - f, _ := n.Float() - return strconv.AppendFloat(out, f, 'f', -1, 64), nil - case IntType: - i, _ := n.Int() - return strconv.AppendInt(out, i, 10), nil - case UintType: - u, _ := n.Uint() - return strconv.AppendUint(out, u, 10), nil - default: - panic("(*Number).typ is invalid") - } -} - -// String implements fmt.Stringer -func (n *Number) String() string { - switch n.typ { - case InvalidType: - return "0" - case Float32Type, Float64Type: - f, _ := n.Float() - return strconv.FormatFloat(f, 'f', -1, 64) - case IntType: - i, _ := n.Int() - return strconv.FormatInt(i, 10) - case UintType: - u, _ := n.Uint() - return strconv.FormatUint(u, 10) - default: - panic("(*Number).typ is invalid") - } -} diff --git a/vendor/github.com/tinylib/msgp/msgp/purego.go b/vendor/github.com/tinylib/msgp/msgp/purego.go deleted file mode 100644 index fe8723412b..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/purego.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build (purego && !unsafe) || appengine -// +build purego,!unsafe appengine - -package msgp - -// let's just assume appengine -// uses 64-bit hardware... -const smallint = false - -func UnsafeString(b []byte) string { - return string(b) -} - -func UnsafeBytes(s string) []byte { - return []byte(s) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/read.go b/vendor/github.com/tinylib/msgp/msgp/read.go deleted file mode 100644 index d15355e2ef..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/read.go +++ /dev/null @@ -1,1487 +0,0 @@ -package msgp - -import ( - "encoding/binary" - "encoding/json" - "io" - "math" - "strconv" - "sync" - "time" - - "github.com/philhofer/fwd" -) - -// where we keep old *Readers -var readerPool = sync.Pool{New: func() interface{} { return &Reader{} }} - -// Type is a MessagePack wire type, -// including this package's built-in -// extension types. -type Type byte - -// MessagePack Types -// -// The zero value of Type -// is InvalidType. -const ( - InvalidType Type = iota - - // MessagePack built-in types - - StrType - BinType - MapType - ArrayType - Float64Type - Float32Type - BoolType - IntType - UintType - NilType - DurationType - ExtensionType - - // pseudo-types provided - // by extensions - - Complex64Type - Complex128Type - TimeType - NumberType - - _maxtype -) - -// String implements fmt.Stringer -func (t Type) String() string { - switch t { - case StrType: - return "str" - case BinType: - return "bin" - case MapType: - return "map" - case ArrayType: - return "array" - case Float64Type: - return "float64" - case Float32Type: - return "float32" - case BoolType: - return "bool" - case UintType: - return "uint" - case IntType: - return "int" - case ExtensionType: - return "ext" - case NilType: - return "nil" - case NumberType: - return "number" - default: - return "" - } -} - -func freeR(m *Reader) { - readerPool.Put(m) -} - -// Unmarshaler is the interface fulfilled -// by objects that know how to unmarshal -// themselves from MessagePack. -// UnmarshalMsg unmarshals the object -// from binary, returing any leftover -// bytes and any errors encountered. -type Unmarshaler interface { - UnmarshalMsg([]byte) ([]byte, error) -} - -// Decodable is the interface fulfilled -// by objects that know how to read -// themselves from a *Reader. -type Decodable interface { - DecodeMsg(*Reader) error -} - -// Decode decodes 'd' from 'r'. -func Decode(r io.Reader, d Decodable) error { - rd := NewReader(r) - err := d.DecodeMsg(rd) - freeR(rd) - return err -} - -// NewReader returns a *Reader that -// reads from the provided reader. The -// reader will be buffered. -func NewReader(r io.Reader) *Reader { - p := readerPool.Get().(*Reader) - if p.R == nil { - p.R = fwd.NewReader(r) - } else { - p.R.Reset(r) - } - return p -} - -// NewReaderSize returns a *Reader with a buffer of the given size. -// (This is vastly preferable to passing the decoder a reader that is already buffered.) -func NewReaderSize(r io.Reader, sz int) *Reader { - return &Reader{R: fwd.NewReaderSize(r, sz)} -} - -// NewReaderBuf returns a *Reader with a provided buffer. -func NewReaderBuf(r io.Reader, buf []byte) *Reader { - return &Reader{R: fwd.NewReaderBuf(r, buf)} -} - -// Reader wraps an io.Reader and provides -// methods to read MessagePack-encoded values -// from it. Readers are buffered. -type Reader struct { - // R is the buffered reader - // that the Reader uses - // to decode MessagePack. - // The Reader itself - // is stateless; all the - // buffering is done - // within R. - R *fwd.Reader - scratch []byte - recursionDepth int -} - -// Read implements `io.Reader` -func (m *Reader) Read(p []byte) (int, error) { - return m.R.Read(p) -} - -// CopyNext reads the next object from m without decoding it and writes it to w. -// It avoids unnecessary copies internally. -func (m *Reader) CopyNext(w io.Writer) (int64, error) { - sz, o, err := getNextSize(m.R) - if err != nil { - return 0, err - } - - var n int64 - // Opportunistic optimization: if we can fit the whole thing in the m.R - // buffer, then just get a pointer to that, and pass it to w.Write, - // avoiding an allocation. - if int(sz) <= m.R.BufferSize() { - var nn int - var buf []byte - buf, err = m.R.Next(int(sz)) - if err != nil { - if err == io.ErrUnexpectedEOF { - err = ErrShortBytes - } - return 0, err - } - nn, err = w.Write(buf) - n += int64(nn) - } else { - // Fall back to io.CopyN. - // May avoid allocating if w is a ReaderFrom (e.g. bytes.Buffer) - n, err = io.CopyN(w, m.R, int64(sz)) - if err == io.ErrUnexpectedEOF { - err = ErrShortBytes - } - } - if err != nil { - return n, err - } else if n < int64(sz) { - return n, io.ErrShortWrite - } - - if done, err := m.recursiveCall(); err != nil { - return n, err - } else { - defer done() - } - // for maps and slices, read elements - for x := uintptr(0); x < o; x++ { - var n2 int64 - n2, err = m.CopyNext(w) - if err != nil { - return n, err - } - n += n2 - } - return n, nil -} - -// recursiveCall will increment the recursion depth and return an error if it is exceeded. -// If a nil error is returned, done must be called to decrement the counter. -func (m *Reader) recursiveCall() (done func(), err error) { - if m.recursionDepth >= recursionLimit { - return func() {}, ErrRecursion - } - m.recursionDepth++ - return func() { - m.recursionDepth-- - }, nil -} - -// ReadFull implements `io.ReadFull` -func (m *Reader) ReadFull(p []byte) (int, error) { - return m.R.ReadFull(p) -} - -// Reset resets the underlying reader. -func (m *Reader) Reset(r io.Reader) { m.R.Reset(r) } - -// Buffered returns the number of bytes currently in the read buffer. -func (m *Reader) Buffered() int { return m.R.Buffered() } - -// BufferSize returns the capacity of the read buffer. -func (m *Reader) BufferSize() int { return m.R.BufferSize() } - -// NextType returns the next object type to be decoded. -func (m *Reader) NextType() (Type, error) { - next, err := m.R.PeekByte() - if err != nil { - return InvalidType, err - } - t := getType(next) - if t == InvalidType { - return t, InvalidPrefixError(next) - } - if t == ExtensionType { - v, err := m.peekExtensionType() - if err != nil { - return InvalidType, err - } - switch v { - case Complex64Extension: - return Complex64Type, nil - case Complex128Extension: - return Complex128Type, nil - case TimeExtension, MsgTimeExtension: - return TimeType, nil - } - } - return t, nil -} - -// IsNil returns whether or not -// the next byte is a null messagepack byte -func (m *Reader) IsNil() bool { - p, err := m.R.PeekByte() - return err == nil && p == mnil -} - -// getNextSize returns the size of the next object on the wire. -// returns (obj size, obj elements, error) -// only maps and arrays have non-zero obj elements -// for maps and arrays, obj size does not include elements -// -// use uintptr b/c it's guaranteed to be large enough -// to hold whatever we can fit in memory. -func getNextSize(r *fwd.Reader) (uintptr, uintptr, error) { - lead, err := r.PeekByte() - if err != nil { - return 0, 0, err - } - spec := getBytespec(lead) - size, mode := spec.size, spec.extra - if size == 0 { - return 0, 0, InvalidPrefixError(lead) - } - if mode >= 0 { - return uintptr(size), uintptr(mode), nil - } - b, err := r.Peek(int(size)) - if err != nil { - return 0, 0, err - } - switch mode { - case extra8: - return uintptr(size) + uintptr(b[1]), 0, nil - case extra16: - return uintptr(size) + uintptr(big.Uint16(b[1:])), 0, nil - case extra32: - return uintptr(size) + uintptr(big.Uint32(b[1:])), 0, nil - case map16v: - return uintptr(size), 2 * uintptr(big.Uint16(b[1:])), nil - case map32v: - return uintptr(size), 2 * uintptr(big.Uint32(b[1:])), nil - case array16v: - return uintptr(size), uintptr(big.Uint16(b[1:])), nil - case array32v: - return uintptr(size), uintptr(big.Uint32(b[1:])), nil - default: - return 0, 0, fatal - } -} - -// Skip skips over the next object, regardless of -// its type. If it is an array or map, the whole array -// or map will be skipped. -func (m *Reader) Skip() error { - var ( - v uintptr // bytes - o uintptr // objects - err error - p []byte - ) - - // we can use the faster - // method if we have enough - // buffered data - if m.R.Buffered() >= 5 { - p, err = m.R.Peek(5) - if err != nil { - return err - } - v, o, err = getSize(p) - if err != nil { - return err - } - } else { - v, o, err = getNextSize(m.R) - if err != nil { - return err - } - } - - // 'v' is always non-zero - // if err == nil - _, err = m.R.Skip(int(v)) - if err != nil { - return err - } - - // for maps and slices, skip elements with recursive call - if done, err := m.recursiveCall(); err != nil { - return err - } else { - defer done() - } - for x := uintptr(0); x < o; x++ { - err = m.Skip() - if err != nil { - return err - } - } - return nil -} - -// ReadMapHeader reads the next object -// as a map header and returns the size -// of the map and the number of bytes written. -// It will return a TypeError{} if the next -// object is not a map. -func (m *Reader) ReadMapHeader() (sz uint32, err error) { - var p []byte - var lead byte - lead, err = m.R.PeekByte() - if err != nil { - return - } - if isfixmap(lead) { - sz = uint32(rfixmap(lead)) - _, err = m.R.Skip(1) - return - } - switch lead { - case mmap16: - p, err = m.R.Next(3) - if err != nil { - return - } - sz = uint32(big.Uint16(p[1:])) - return - case mmap32: - p, err = m.R.Next(5) - if err != nil { - return - } - sz = big.Uint32(p[1:]) - return - default: - err = badPrefix(MapType, lead) - return - } -} - -// ReadMapKey reads either a 'str' or 'bin' field from -// the reader and returns the value as a []byte. It uses -// scratch for storage if it is large enough. -func (m *Reader) ReadMapKey(scratch []byte) ([]byte, error) { - out, err := m.ReadStringAsBytes(scratch) - if err != nil { - if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType { - return m.ReadBytes(scratch) - } - return nil, err - } - return out, nil -} - -// ReadMapKeyPtr returns a []byte pointing to the contents -// of a valid map key. The key cannot be empty, and it -// must be shorter than the total buffer size of the -// *Reader. Additionally, the returned slice is only -// valid until the next *Reader method call. Users -// should exercise extreme care when using this -// method; writing into the returned slice may -// corrupt future reads. -func (m *Reader) ReadMapKeyPtr() ([]byte, error) { - lead, err := m.R.PeekByte() - if err != nil { - return nil, err - } - var read int - var p []byte - if isfixstr(lead) { - read = int(rfixstr(lead)) - m.R.Skip(1) - goto fill - } - switch lead { - case mstr8, mbin8: - p, err = m.R.Next(2) - if err != nil { - return nil, err - } - read = int(p[1]) - case mstr16, mbin16: - p, err = m.R.Next(3) - if err != nil { - return nil, err - } - read = int(big.Uint16(p[1:])) - case mstr32, mbin32: - p, err = m.R.Next(5) - if err != nil { - return nil, err - } - read = int(big.Uint32(p[1:])) - default: - return nil, badPrefix(StrType, lead) - } -fill: - if read == 0 { - return nil, ErrShortBytes - } - return m.R.Next(read) -} - -// ReadArrayHeader reads the next object as an -// array header and returns the size of the array -// and the number of bytes read. -func (m *Reader) ReadArrayHeader() (sz uint32, err error) { - lead, err := m.R.PeekByte() - if err != nil { - return - } - if isfixarray(lead) { - sz = uint32(rfixarray(lead)) - _, err = m.R.Skip(1) - return - } - var p []byte - switch lead { - case marray16: - p, err = m.R.Next(3) - if err != nil { - return - } - sz = uint32(big.Uint16(p[1:])) - return - - case marray32: - p, err = m.R.Next(5) - if err != nil { - return - } - sz = big.Uint32(p[1:]) - return - - default: - err = badPrefix(ArrayType, lead) - return - } -} - -// ReadNil reads a 'nil' MessagePack byte from the reader -func (m *Reader) ReadNil() error { - p, err := m.R.PeekByte() - if err != nil { - return err - } - if p != mnil { - return badPrefix(NilType, p) - } - _, err = m.R.Skip(1) - return err -} - -// ReadFloat64 reads a float64 from the reader. -// (If the value on the wire is encoded as a float32, -// it will be up-cast to a float64.) -func (m *Reader) ReadFloat64() (f float64, err error) { - var p []byte - p, err = m.R.Peek(9) - if err != nil { - // we'll allow a coversion from float32 to float64, - // since we don't lose any precision - if err == io.EOF && len(p) > 0 && p[0] == mfloat32 { - ef, err := m.ReadFloat32() - return float64(ef), err - } - return - } - if p[0] != mfloat64 { - // see above - if p[0] == mfloat32 { - ef, err := m.ReadFloat32() - return float64(ef), err - } - err = badPrefix(Float64Type, p[0]) - return - } - f = math.Float64frombits(getMuint64(p)) - _, err = m.R.Skip(9) - return -} - -// ReadFloat32 reads a float32 from the reader -func (m *Reader) ReadFloat32() (f float32, err error) { - var p []byte - p, err = m.R.Peek(5) - if err != nil { - return - } - if p[0] != mfloat32 { - err = badPrefix(Float32Type, p[0]) - return - } - f = math.Float32frombits(getMuint32(p)) - _, err = m.R.Skip(5) - return -} - -// ReadBool reads a bool from the reader -func (m *Reader) ReadBool() (b bool, err error) { - var p byte - p, err = m.R.PeekByte() - if err != nil { - return - } - switch p { - case mtrue: - b = true - case mfalse: - default: - err = badPrefix(BoolType, p) - return - } - _, err = m.R.Skip(1) - return -} - -// ReadDuration reads a time.Duration from the reader -func (m *Reader) ReadDuration() (d time.Duration, err error) { - i, err := m.ReadInt64() - return time.Duration(i), err -} - -// ReadInt64 reads an int64 from the reader -func (m *Reader) ReadInt64() (i int64, err error) { - var p []byte - lead, err := m.R.PeekByte() - if err != nil { - return - } - - if isfixint(lead) { - i = int64(rfixint(lead)) - _, err = m.R.Skip(1) - return - } else if isnfixint(lead) { - i = int64(rnfixint(lead)) - _, err = m.R.Skip(1) - return - } - - switch lead { - case mint8: - p, err = m.R.Next(2) - if err != nil { - return - } - i = int64(getMint8(p)) - return - - case muint8: - p, err = m.R.Next(2) - if err != nil { - return - } - i = int64(getMuint8(p)) - return - - case mint16: - p, err = m.R.Next(3) - if err != nil { - return - } - i = int64(getMint16(p)) - return - - case muint16: - p, err = m.R.Next(3) - if err != nil { - return - } - i = int64(getMuint16(p)) - return - - case mint32: - p, err = m.R.Next(5) - if err != nil { - return - } - i = int64(getMint32(p)) - return - - case muint32: - p, err = m.R.Next(5) - if err != nil { - return - } - i = int64(getMuint32(p)) - return - - case mint64: - p, err = m.R.Next(9) - if err != nil { - return - } - i = getMint64(p) - return - - case muint64: - p, err = m.R.Next(9) - if err != nil { - return - } - u := getMuint64(p) - if u > math.MaxInt64 { - err = UintOverflow{Value: u, FailedBitsize: 64} - return - } - i = int64(u) - return - - default: - err = badPrefix(IntType, lead) - return - } -} - -// ReadInt32 reads an int32 from the reader -func (m *Reader) ReadInt32() (i int32, err error) { - var in int64 - in, err = m.ReadInt64() - if in > math.MaxInt32 || in < math.MinInt32 { - err = IntOverflow{Value: in, FailedBitsize: 32} - return - } - i = int32(in) - return -} - -// ReadInt16 reads an int16 from the reader -func (m *Reader) ReadInt16() (i int16, err error) { - var in int64 - in, err = m.ReadInt64() - if in > math.MaxInt16 || in < math.MinInt16 { - err = IntOverflow{Value: in, FailedBitsize: 16} - return - } - i = int16(in) - return -} - -// ReadInt8 reads an int8 from the reader -func (m *Reader) ReadInt8() (i int8, err error) { - var in int64 - in, err = m.ReadInt64() - if in > math.MaxInt8 || in < math.MinInt8 { - err = IntOverflow{Value: in, FailedBitsize: 8} - return - } - i = int8(in) - return -} - -// ReadInt reads an int from the reader -func (m *Reader) ReadInt() (i int, err error) { - if smallint { - var in int32 - in, err = m.ReadInt32() - i = int(in) - return - } - var in int64 - in, err = m.ReadInt64() - i = int(in) - return -} - -// ReadUint64 reads a uint64 from the reader -func (m *Reader) ReadUint64() (u uint64, err error) { - var p []byte - lead, err := m.R.PeekByte() - if err != nil { - return - } - if isfixint(lead) { - u = uint64(rfixint(lead)) - _, err = m.R.Skip(1) - return - } - switch lead { - case mint8: - p, err = m.R.Next(2) - if err != nil { - return - } - v := int64(getMint8(p)) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - return - - case muint8: - p, err = m.R.Next(2) - if err != nil { - return - } - u = uint64(getMuint8(p)) - return - - case mint16: - p, err = m.R.Next(3) - if err != nil { - return - } - v := int64(getMint16(p)) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - return - - case muint16: - p, err = m.R.Next(3) - if err != nil { - return - } - u = uint64(getMuint16(p)) - return - - case mint32: - p, err = m.R.Next(5) - if err != nil { - return - } - v := int64(getMint32(p)) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - return - - case muint32: - p, err = m.R.Next(5) - if err != nil { - return - } - u = uint64(getMuint32(p)) - return - - case mint64: - p, err = m.R.Next(9) - if err != nil { - return - } - v := int64(getMint64(p)) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - return - - case muint64: - p, err = m.R.Next(9) - if err != nil { - return - } - u = getMuint64(p) - return - - default: - if isnfixint(lead) { - err = UintBelowZero{Value: int64(rnfixint(lead))} - } else { - err = badPrefix(UintType, lead) - } - return - - } -} - -// ReadUint32 reads a uint32 from the reader -func (m *Reader) ReadUint32() (u uint32, err error) { - var in uint64 - in, err = m.ReadUint64() - if in > math.MaxUint32 { - err = UintOverflow{Value: in, FailedBitsize: 32} - return - } - u = uint32(in) - return -} - -// ReadUint16 reads a uint16 from the reader -func (m *Reader) ReadUint16() (u uint16, err error) { - var in uint64 - in, err = m.ReadUint64() - if in > math.MaxUint16 { - err = UintOverflow{Value: in, FailedBitsize: 16} - return - } - u = uint16(in) - return -} - -// ReadUint8 reads a uint8 from the reader -func (m *Reader) ReadUint8() (u uint8, err error) { - var in uint64 - in, err = m.ReadUint64() - if in > math.MaxUint8 { - err = UintOverflow{Value: in, FailedBitsize: 8} - return - } - u = uint8(in) - return -} - -// ReadUint reads a uint from the reader -func (m *Reader) ReadUint() (u uint, err error) { - if smallint { - var un uint32 - un, err = m.ReadUint32() - u = uint(un) - return - } - var un uint64 - un, err = m.ReadUint64() - u = uint(un) - return -} - -// ReadByte is analogous to ReadUint8. -// -// NOTE: this is *not* an implementation -// of io.ByteReader. -func (m *Reader) ReadByte() (b byte, err error) { - var in uint64 - in, err = m.ReadUint64() - if in > math.MaxUint8 { - err = UintOverflow{Value: in, FailedBitsize: 8} - return - } - b = byte(in) - return -} - -// ReadBytes reads a MessagePack 'bin' object -// from the reader and returns its value. It may -// use 'scratch' for storage if it is non-nil. -func (m *Reader) ReadBytes(scratch []byte) (b []byte, err error) { - var p []byte - var lead byte - p, err = m.R.Peek(2) - if err != nil { - return - } - lead = p[0] - var read int64 - switch lead { - case mbin8: - read = int64(p[1]) - m.R.Skip(2) - case mbin16: - p, err = m.R.Next(3) - if err != nil { - return - } - read = int64(big.Uint16(p[1:])) - case mbin32: - p, err = m.R.Next(5) - if err != nil { - return - } - read = int64(big.Uint32(p[1:])) - default: - err = badPrefix(BinType, lead) - return - } - if int64(cap(scratch)) < read { - b = make([]byte, read) - } else { - b = scratch[0:read] - } - _, err = m.R.ReadFull(b) - return -} - -// ReadBytesHeader reads the size header -// of a MessagePack 'bin' object. The user -// is responsible for dealing with the next -// 'sz' bytes from the reader in an application-specific -// way. -func (m *Reader) ReadBytesHeader() (sz uint32, err error) { - var p []byte - lead, err := m.R.PeekByte() - if err != nil { - return - } - switch lead { - case mbin8: - p, err = m.R.Next(2) - if err != nil { - return - } - sz = uint32(p[1]) - return - case mbin16: - p, err = m.R.Next(3) - if err != nil { - return - } - sz = uint32(big.Uint16(p[1:])) - return - case mbin32: - p, err = m.R.Next(5) - if err != nil { - return - } - sz = uint32(big.Uint32(p[1:])) - return - default: - err = badPrefix(BinType, p[0]) - return - } -} - -// ReadExactBytes reads a MessagePack 'bin'-encoded -// object off of the wire into the provided slice. An -// ArrayError will be returned if the object is not -// exactly the length of the input slice. -func (m *Reader) ReadExactBytes(into []byte) error { - p, err := m.R.Peek(2) - if err != nil { - return err - } - lead := p[0] - var read int64 // bytes to read - var skip int // prefix size to skip - switch lead { - case mbin8: - read = int64(p[1]) - skip = 2 - case mbin16: - p, err = m.R.Peek(3) - if err != nil { - return err - } - read = int64(big.Uint16(p[1:])) - skip = 3 - case mbin32: - p, err = m.R.Peek(5) - if err != nil { - return err - } - read = int64(big.Uint32(p[1:])) - skip = 5 - default: - return badPrefix(BinType, lead) - } - if read != int64(len(into)) { - return ArrayError{Wanted: uint32(len(into)), Got: uint32(read)} - } - m.R.Skip(skip) - _, err = m.R.ReadFull(into) - return err -} - -// ReadStringAsBytes reads a MessagePack 'str' (utf-8) string -// and returns its value as bytes. It may use 'scratch' for storage -// if it is non-nil. -func (m *Reader) ReadStringAsBytes(scratch []byte) (b []byte, err error) { - var p []byte - lead, err := m.R.PeekByte() - if err != nil { - return - } - var read int64 - - if isfixstr(lead) { - read = int64(rfixstr(lead)) - m.R.Skip(1) - goto fill - } - - switch lead { - case mstr8: - p, err = m.R.Next(2) - if err != nil { - return - } - read = int64(uint8(p[1])) - case mstr16: - p, err = m.R.Next(3) - if err != nil { - return - } - read = int64(big.Uint16(p[1:])) - case mstr32: - p, err = m.R.Next(5) - if err != nil { - return - } - read = int64(big.Uint32(p[1:])) - default: - err = badPrefix(StrType, lead) - return - } -fill: - if int64(cap(scratch)) < read { - b = make([]byte, read) - } else { - b = scratch[0:read] - } - _, err = m.R.ReadFull(b) - return -} - -// ReadStringHeader reads a string header -// off of the wire. The user is then responsible -// for dealing with the next 'sz' bytes from -// the reader in an application-specific manner. -func (m *Reader) ReadStringHeader() (sz uint32, err error) { - lead, err := m.R.PeekByte() - if err != nil { - return - } - if isfixstr(lead) { - sz = uint32(rfixstr(lead)) - m.R.Skip(1) - return - } - var p []byte - switch lead { - case mstr8: - p, err = m.R.Next(2) - if err != nil { - return - } - sz = uint32(p[1]) - return - case mstr16: - p, err = m.R.Next(3) - if err != nil { - return - } - sz = uint32(big.Uint16(p[1:])) - return - case mstr32: - p, err = m.R.Next(5) - if err != nil { - return - } - sz = big.Uint32(p[1:]) - return - default: - err = badPrefix(StrType, lead) - return - } -} - -// ReadString reads a utf-8 string from the reader -func (m *Reader) ReadString() (s string, err error) { - var read int64 - lead, err := m.R.PeekByte() - if err != nil { - return - } - - var p []byte - if isfixstr(lead) { - read = int64(rfixstr(lead)) - m.R.Skip(1) - goto fill - } - - switch lead { - case mstr8: - p, err = m.R.Next(2) - if err != nil { - return - } - read = int64(uint8(p[1])) - case mstr16: - p, err = m.R.Next(3) - if err != nil { - return - } - read = int64(big.Uint16(p[1:])) - case mstr32: - p, err = m.R.Next(5) - if err != nil { - return - } - read = int64(big.Uint32(p[1:])) - default: - err = badPrefix(StrType, lead) - return - } -fill: - if read == 0 { - s, err = "", nil - return - } - // reading into the memory - // that will become the string - // itself has vastly superior - // worst-case performance, because - // the reader buffer doesn't have - // to be large enough to hold the string. - // the idea here is to make it more - // difficult for someone malicious - // to cause the system to run out of - // memory by sending very large strings. - // - // NOTE: this works because the argument - // passed to (*fwd.Reader).ReadFull escapes - // to the heap; its argument may, in turn, - // be passed to the underlying reader, and - // thus escape analysis *must* conclude that - // 'out' escapes. - out := make([]byte, read) - _, err = m.R.ReadFull(out) - if err != nil { - return - } - s = UnsafeString(out) - return -} - -// ReadComplex64 reads a complex64 from the reader -func (m *Reader) ReadComplex64() (f complex64, err error) { - var p []byte - p, err = m.R.Peek(10) - if err != nil { - return - } - if p[0] != mfixext8 { - err = badPrefix(Complex64Type, p[0]) - return - } - if int8(p[1]) != Complex64Extension { - err = errExt(int8(p[1]), Complex64Extension) - return - } - f = complex(math.Float32frombits(big.Uint32(p[2:])), - math.Float32frombits(big.Uint32(p[6:]))) - _, err = m.R.Skip(10) - return -} - -// ReadComplex128 reads a complex128 from the reader -func (m *Reader) ReadComplex128() (f complex128, err error) { - var p []byte - p, err = m.R.Peek(18) - if err != nil { - return - } - if p[0] != mfixext16 { - err = badPrefix(Complex128Type, p[0]) - return - } - if int8(p[1]) != Complex128Extension { - err = errExt(int8(p[1]), Complex128Extension) - return - } - f = complex(math.Float64frombits(big.Uint64(p[2:])), - math.Float64frombits(big.Uint64(p[10:]))) - _, err = m.R.Skip(18) - return -} - -// ReadMapStrIntf reads a MessagePack map into a map[string]interface{}. -// (You must pass a non-nil map into the function.) -func (m *Reader) ReadMapStrIntf(mp map[string]interface{}) (err error) { - var sz uint32 - sz, err = m.ReadMapHeader() - if err != nil { - return - } - for key := range mp { - delete(mp, key) - } - for i := uint32(0); i < sz; i++ { - var key string - var val interface{} - key, err = m.ReadString() - if err != nil { - return - } - val, err = m.ReadIntf() - if err != nil { - return - } - mp[key] = val - } - return -} - -// ReadTime reads a time.Time object from the reader. -// The returned time's location will be set to time.Local. -func (m *Reader) ReadTime() (t time.Time, err error) { - offset, length, extType, err := m.peekExtensionHeader() - if err != nil { - return t, err - } - - switch extType { - case TimeExtension: - var p []byte - p, err = m.R.Peek(15) - if err != nil { - return - } - if p[0] != mext8 || p[1] != 12 { - err = badPrefix(TimeType, p[0]) - return - } - if int8(p[2]) != TimeExtension { - err = errExt(int8(p[2]), TimeExtension) - return - } - sec, nsec := getUnix(p[3:]) - t = time.Unix(sec, int64(nsec)).Local() - _, err = m.R.Skip(15) - return - case MsgTimeExtension: - switch length { - case 4, 8, 12: - var tmp [12]byte - _, err = m.R.Skip(offset) - if err != nil { - return - } - var n int - n, err = m.R.Read(tmp[:length]) - if err != nil { - return - } - if n != length { - err = ErrShortBytes - return - } - b := tmp[:length] - switch length { - case 4: - t = time.Unix(int64(binary.BigEndian.Uint32(b)), 0).Local() - case 8: - v := binary.BigEndian.Uint64(b) - nanos := int64(v >> 34) - if nanos > 999999999 { - // In timestamp 64 and timestamp 96 formats, nanoseconds must not be larger than 999999999. - err = InvalidTimestamp{Nanos: nanos} - return - } - t = time.Unix(int64(v&(1<<34-1)), nanos).Local() - case 12: - nanos := int64(binary.BigEndian.Uint32(b)) - if nanos > 999999999 { - // In timestamp 64 and timestamp 96 formats, nanoseconds must not be larger than 999999999. - err = InvalidTimestamp{Nanos: nanos} - return - } - ux := int64(binary.BigEndian.Uint64(b[4:])) - t = time.Unix(ux, nanos).Local() - } - default: - err = InvalidTimestamp{FieldLength: length} - } - default: - err = errExt(extType, TimeExtension) - } - return -} - -// ReadJSONNumber reads an integer or a float value and return as json.Number -func (m *Reader) ReadJSONNumber() (n json.Number, err error) { - t, err := m.NextType() - if err != nil { - return - } - switch t { - case IntType: - v, err := m.ReadInt64() - if err == nil { - return json.Number(strconv.FormatInt(v, 10)), nil - } - return "", err - case UintType: - v, err := m.ReadUint64() - if err == nil { - return json.Number(strconv.FormatUint(v, 10)), nil - } - return "", err - case Float32Type, Float64Type: - v, err := m.ReadFloat64() - if err == nil { - return json.Number(strconv.FormatFloat(v, 'f', -1, 64)), nil - } - return "", err - } - return "", TypeError{Method: NumberType, Encoded: t} -} - -// ReadIntf reads out the next object as a raw interface{}/any. -// Arrays are decoded as []interface{}, and maps are decoded -// as map[string]interface{}. Integers are decoded as int64 -// and unsigned integers are decoded as uint64. -func (m *Reader) ReadIntf() (i interface{}, err error) { - var t Type - t, err = m.NextType() - if err != nil { - return - } - switch t { - case BoolType: - i, err = m.ReadBool() - return - - case IntType: - i, err = m.ReadInt64() - return - - case UintType: - i, err = m.ReadUint64() - return - - case BinType: - i, err = m.ReadBytes(nil) - return - - case StrType: - i, err = m.ReadString() - return - - case Complex64Type: - i, err = m.ReadComplex64() - return - - case Complex128Type: - i, err = m.ReadComplex128() - return - - case TimeType: - i, err = m.ReadTime() - return - - case DurationType: - i, err = m.ReadDuration() - return - - case ExtensionType: - var t int8 - t, err = m.peekExtensionType() - if err != nil { - return - } - f, ok := extensionReg[t] - if ok { - e := f() - err = m.ReadExtension(e) - i = e - return - } - var e RawExtension - e.Type = t - err = m.ReadExtension(&e) - i = &e - return - - case MapType: - // This can call back here, so treat as recursive call. - if done, err := m.recursiveCall(); err != nil { - return nil, err - } else { - defer done() - } - - mp := make(map[string]interface{}) - err = m.ReadMapStrIntf(mp) - i = mp - return - - case NilType: - err = m.ReadNil() - i = nil - return - - case Float32Type: - i, err = m.ReadFloat32() - return - - case Float64Type: - i, err = m.ReadFloat64() - return - - case ArrayType: - var sz uint32 - sz, err = m.ReadArrayHeader() - - if err != nil { - return - } - - if done, err := m.recursiveCall(); err != nil { - return nil, err - } else { - defer done() - } - - out := make([]interface{}, int(sz)) - for j := range out { - out[j], err = m.ReadIntf() - if err != nil { - return - } - } - i = out - return - - default: - return nil, fatal // unreachable - } -} diff --git a/vendor/github.com/tinylib/msgp/msgp/read_bytes.go b/vendor/github.com/tinylib/msgp/msgp/read_bytes.go deleted file mode 100644 index 292704dd04..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/read_bytes.go +++ /dev/null @@ -1,1387 +0,0 @@ -package msgp - -import ( - "bytes" - "encoding/binary" - "encoding/json" - "math" - "strconv" - "time" -) - -var big = binary.BigEndian - -// NextType returns the type of the next -// object in the slice. If the length -// of the input is zero, it returns -// [InvalidType]. -func NextType(b []byte) Type { - if len(b) == 0 { - return InvalidType - } - spec := getBytespec(b[0]) - t := spec.typ - if t == ExtensionType && len(b) > int(spec.size) { - var tp int8 - if spec.extra == constsize { - tp = int8(b[1]) - } else { - tp = int8(b[spec.size-1]) - } - switch tp { - case TimeExtension, MsgTimeExtension: - return TimeType - case Complex128Extension: - return Complex128Type - case Complex64Extension: - return Complex64Type - default: - return ExtensionType - } - } - return t -} - -// IsNil returns true if len(b)>0 and -// the leading byte is a 'nil' MessagePack -// byte; false otherwise -func IsNil(b []byte) bool { - if len(b) != 0 && b[0] == mnil { - return true - } - return false -} - -// Raw is raw MessagePack. -// Raw allows you to read and write -// data without interpreting its contents. -type Raw []byte - -// MarshalMsg implements [Marshaler]. -// It appends the raw contents of 'raw' -// to the provided byte slice. If 'raw' -// is 0 bytes, 'nil' will be appended instead. -func (r Raw) MarshalMsg(b []byte) ([]byte, error) { - i := len(r) - if i == 0 { - return AppendNil(b), nil - } - o, l := ensure(b, i) - copy(o[l:], []byte(r)) - return o, nil -} - -// UnmarshalMsg implements [Unmarshaler]. -// It sets the contents of *Raw to be the next -// object in the provided byte slice. -func (r *Raw) UnmarshalMsg(b []byte) ([]byte, error) { - l := len(b) - out, err := Skip(b) - if err != nil { - return b, err - } - rlen := l - len(out) - if IsNil(b[:rlen]) { - rlen = 0 - } - if cap(*r) < rlen { - *r = make(Raw, rlen) - } else { - *r = (*r)[0:rlen] - } - copy(*r, b[:rlen]) - return out, nil -} - -// EncodeMsg implements [Encodable]. -// It writes the raw bytes to the writer. -// If r is empty, it writes 'nil' instead. -func (r Raw) EncodeMsg(w *Writer) error { - if len(r) == 0 { - return w.WriteNil() - } - _, err := w.Write([]byte(r)) - return err -} - -// DecodeMsg implements [Decodable]. -// It sets the value of *Raw to be the -// next object on the wire. -func (r *Raw) DecodeMsg(f *Reader) error { - *r = (*r)[:0] - err := appendNext(f, (*[]byte)(r)) - if IsNil(*r) { - *r = (*r)[:0] - } - return err -} - -// Msgsize implements [Sizer]. -func (r Raw) Msgsize() int { - l := len(r) - if l == 0 { - return 1 // for 'nil' - } - return l -} - -func appendNext(f *Reader, d *[]byte) error { - amt, o, err := getNextSize(f.R) - if err != nil { - return err - } - var i int - *d, i = ensure(*d, int(amt)) - _, err = f.R.ReadFull((*d)[i:]) - if err != nil { - return err - } - for o > 0 { - err = appendNext(f, d) - if err != nil { - return err - } - o-- - } - return nil -} - -// MarshalJSON implements [json.Marshaler]. -func (r *Raw) MarshalJSON() ([]byte, error) { - var buf bytes.Buffer - _, err := UnmarshalAsJSON(&buf, []byte(*r)) - return buf.Bytes(), err -} - -// ReadMapHeaderBytes reads a map header size -// from 'b' and returns the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a map) -func ReadMapHeaderBytes(b []byte) (sz uint32, o []byte, err error) { - l := len(b) - if l < 1 { - err = ErrShortBytes - return - } - - lead := b[0] - b = b[1:] - if isfixmap(lead) { - sz = uint32(rfixmap(lead)) - o = b - return - } - - switch lead { - case mmap16: - if len(b) < 2 { - err = ErrShortBytes - return - } - sz = uint32(big.Uint16(b)) - o = b[2:] - return - - case mmap32: - if len(b) < 4 { - err = ErrShortBytes - return - } - sz = big.Uint32(b) - o = b[4:] - return - - default: - err = badPrefix(MapType, lead) - return - } -} - -// ReadMapKeyZC attempts to read a map key -// from 'b' and returns the key bytes and the remaining bytes -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a str or bin) -func ReadMapKeyZC(b []byte) ([]byte, []byte, error) { - o, x, err := ReadStringZC(b) - if err != nil { - if tperr, ok := err.(TypeError); ok && tperr.Encoded == BinType { - return ReadBytesZC(b) - } - return nil, b, err - } - return o, x, nil -} - -// ReadArrayHeaderBytes attempts to read -// the array header size off of 'b' and return -// the size and remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not an array) -func ReadArrayHeaderBytes(b []byte) (sz uint32, o []byte, err error) { - if len(b) < 1 { - return 0, nil, ErrShortBytes - } - lead := b[0] - b = b[1:] - if isfixarray(lead) { - sz = uint32(rfixarray(lead)) - o = b - return - } - - switch lead { - case marray16: - if len(b) < 2 { - err = ErrShortBytes - return - } - sz = uint32(big.Uint16(b)) - o = b[2:] - return - - case marray32: - if len(b) < 4 { - err = ErrShortBytes - return - } - sz = big.Uint32(b) - o = b[4:] - return - - default: - err = badPrefix(ArrayType, lead) - return - } -} - -// ReadBytesHeader reads the 'bin' header size -// off of 'b' and returns the size and remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a bin object) -func ReadBytesHeader(b []byte) (sz uint32, o []byte, err error) { - if len(b) < 1 { - return 0, nil, ErrShortBytes - } - switch b[0] { - case mbin8: - if len(b) < 2 { - err = ErrShortBytes - return - } - sz = uint32(b[1]) - o = b[2:] - return - case mbin16: - if len(b) < 3 { - err = ErrShortBytes - return - } - sz = uint32(big.Uint16(b[1:])) - o = b[3:] - return - case mbin32: - if len(b) < 5 { - err = ErrShortBytes - return - } - sz = big.Uint32(b[1:]) - o = b[5:] - return - default: - err = badPrefix(BinType, b[0]) - return - } -} - -// ReadNilBytes tries to read a "nil" byte -// off of 'b' and return the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a 'nil') -// - [InvalidPrefixError] -func ReadNilBytes(b []byte) ([]byte, error) { - if len(b) < 1 { - return nil, ErrShortBytes - } - if b[0] != mnil { - return b, badPrefix(NilType, b[0]) - } - return b[1:], nil -} - -// ReadFloat64Bytes tries to read a float64 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a float64) -func ReadFloat64Bytes(b []byte) (f float64, o []byte, err error) { - if len(b) < 9 { - if len(b) >= 5 && b[0] == mfloat32 { - var tf float32 - tf, o, err = ReadFloat32Bytes(b) - f = float64(tf) - return - } - err = ErrShortBytes - return - } - - if b[0] != mfloat64 { - if b[0] == mfloat32 { - var tf float32 - tf, o, err = ReadFloat32Bytes(b) - f = float64(tf) - return - } - err = badPrefix(Float64Type, b[0]) - return - } - - f = math.Float64frombits(getMuint64(b)) - o = b[9:] - return -} - -// ReadFloat32Bytes tries to read a float64 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a float32) -func ReadFloat32Bytes(b []byte) (f float32, o []byte, err error) { - if len(b) < 5 { - err = ErrShortBytes - return - } - - if b[0] != mfloat32 { - err = TypeError{Method: Float32Type, Encoded: getType(b[0])} - return - } - - f = math.Float32frombits(getMuint32(b)) - o = b[5:] - return -} - -// ReadBoolBytes tries to read a float64 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a bool) -func ReadBoolBytes(b []byte) (bool, []byte, error) { - if len(b) < 1 { - return false, b, ErrShortBytes - } - switch b[0] { - case mtrue: - return true, b[1:], nil - case mfalse: - return false, b[1:], nil - default: - return false, b, badPrefix(BoolType, b[0]) - } -} - -// ReadDurationBytes tries to read a time.Duration -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - TypeError (not a int) -func ReadDurationBytes(b []byte) (d time.Duration, o []byte, err error) { - i, o, err := ReadInt64Bytes(b) - return time.Duration(i), o, err -} - -// ReadInt64Bytes tries to read an int64 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a int) -func ReadInt64Bytes(b []byte) (i int64, o []byte, err error) { - if len(b) < 1 { - return 0, nil, ErrShortBytes - } - - lead := b[0] - b = b[1:] - if isfixint(lead) { - i = int64(rfixint(lead)) - o = b - return - } - if isnfixint(lead) { - i = int64(rnfixint(lead)) - o = b - return - } - - switch lead { - case mint8: - if len(b) < 1 { - err = ErrShortBytes - return - } - i = int64(int8(b[0])) - o = b[1:] - return - - case muint8: - if len(b) < 1 { - err = ErrShortBytes - return - } - i = int64(b[0]) - o = b[1:] - return - - case mint16: - if len(b) < 2 { - err = ErrShortBytes - return - } - i = int64(int16(big.Uint16(b))) - o = b[2:] - return - - case muint16: - if len(b) < 2 { - err = ErrShortBytes - return - } - i = int64(big.Uint16(b)) - o = b[2:] - return - - case mint32: - if len(b) < 4 { - err = ErrShortBytes - return - } - i = int64(int32(big.Uint32(b))) - o = b[4:] - return - - case muint32: - if len(b) < 4 { - err = ErrShortBytes - return - } - i = int64(big.Uint32(b)) - o = b[4:] - return - - case mint64: - if len(b) < 8 { - err = ErrShortBytes - return - } - i = int64(big.Uint64(b)) - o = b[8:] - return - - case muint64: - if len(b) < 8 { - err = ErrShortBytes - return - } - u := big.Uint64(b) - if u > math.MaxInt64 { - err = UintOverflow{Value: u, FailedBitsize: 64} - return - } - i = int64(u) - o = b[8:] - return - - default: - err = badPrefix(IntType, lead) - return - } -} - -// ReadInt32Bytes tries to read an int32 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a int) -// - [IntOverflow] (value doesn't fit in int32) -func ReadInt32Bytes(b []byte) (int32, []byte, error) { - i, o, err := ReadInt64Bytes(b) - if i > math.MaxInt32 || i < math.MinInt32 { - return 0, o, IntOverflow{Value: i, FailedBitsize: 32} - } - return int32(i), o, err -} - -// ReadInt16Bytes tries to read an int16 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a int) -// - [IntOverflow] (value doesn't fit in int16) -func ReadInt16Bytes(b []byte) (int16, []byte, error) { - i, o, err := ReadInt64Bytes(b) - if i > math.MaxInt16 || i < math.MinInt16 { - return 0, o, IntOverflow{Value: i, FailedBitsize: 16} - } - return int16(i), o, err -} - -// ReadInt8Bytes tries to read an int16 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a int) -// - [IntOverflow] (value doesn't fit in int8) -func ReadInt8Bytes(b []byte) (int8, []byte, error) { - i, o, err := ReadInt64Bytes(b) - if i > math.MaxInt8 || i < math.MinInt8 { - return 0, o, IntOverflow{Value: i, FailedBitsize: 8} - } - return int8(i), o, err -} - -// ReadIntBytes tries to read an int -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a int) -// - [IntOverflow] (value doesn't fit in int; 32-bit platforms only) -func ReadIntBytes(b []byte) (int, []byte, error) { - if smallint { - i, b, err := ReadInt32Bytes(b) - return int(i), b, err - } - i, b, err := ReadInt64Bytes(b) - return int(i), b, err -} - -// ReadUint64Bytes tries to read a uint64 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a uint) -func ReadUint64Bytes(b []byte) (u uint64, o []byte, err error) { - if len(b) < 1 { - return 0, nil, ErrShortBytes - } - - lead := b[0] - b = b[1:] - if isfixint(lead) { - u = uint64(rfixint(lead)) - o = b - return - } - - switch lead { - case mint8: - if len(b) < 1 { - err = ErrShortBytes - return - } - v := int64(int8(b[0])) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - o = b[1:] - return - - case muint8: - if len(b) < 1 { - err = ErrShortBytes - return - } - u = uint64(b[0]) - o = b[1:] - return - - case mint16: - if len(b) < 2 { - err = ErrShortBytes - return - } - v := int64((int16(b[0]) << 8) | int16(b[1])) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - o = b[2:] - return - - case muint16: - if len(b) < 2 { - err = ErrShortBytes - return - } - u = uint64(big.Uint16(b)) - o = b[2:] - return - - case mint32: - if len(b) < 4 { - err = ErrShortBytes - return - } - v := int64(int32(big.Uint32(b))) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - o = b[4:] - return - - case muint32: - if len(b) < 4 { - err = ErrShortBytes - return - } - u = uint64(big.Uint32(b)) - o = b[4:] - return - - case mint64: - if len(b) < 8 { - err = ErrShortBytes - return - } - v := int64(big.Uint64(b)) - if v < 0 { - err = UintBelowZero{Value: v} - return - } - u = uint64(v) - o = b[8:] - return - - case muint64: - if len(b) < 8 { - err = ErrShortBytes - return - } - u = big.Uint64(b) - o = b[8:] - return - - default: - if isnfixint(lead) { - err = UintBelowZero{Value: int64(rnfixint(lead))} - } else { - err = badPrefix(UintType, lead) - } - return - } -} - -// ReadUint32Bytes tries to read a uint32 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a uint) -// - [UintOverflow] (value too large for uint32) -func ReadUint32Bytes(b []byte) (uint32, []byte, error) { - v, o, err := ReadUint64Bytes(b) - if v > math.MaxUint32 { - return 0, nil, UintOverflow{Value: v, FailedBitsize: 32} - } - return uint32(v), o, err -} - -// ReadUint16Bytes tries to read a uint16 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a uint) -// - [UintOverflow] (value too large for uint16) -func ReadUint16Bytes(b []byte) (uint16, []byte, error) { - v, o, err := ReadUint64Bytes(b) - if v > math.MaxUint16 { - return 0, nil, UintOverflow{Value: v, FailedBitsize: 16} - } - return uint16(v), o, err -} - -// ReadUint8Bytes tries to read a uint8 -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a uint) -// - [UintOverflow] (value too large for uint8) -func ReadUint8Bytes(b []byte) (uint8, []byte, error) { - v, o, err := ReadUint64Bytes(b) - if v > math.MaxUint8 { - return 0, nil, UintOverflow{Value: v, FailedBitsize: 8} - } - return uint8(v), o, err -} - -// ReadUintBytes tries to read a uint -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a uint) -// - [UintOverflow] (value too large for uint; 32-bit platforms only) -func ReadUintBytes(b []byte) (uint, []byte, error) { - if smallint { - u, b, err := ReadUint32Bytes(b) - return uint(u), b, err - } - u, b, err := ReadUint64Bytes(b) - return uint(u), b, err -} - -// ReadByteBytes is analogous to ReadUint8Bytes -func ReadByteBytes(b []byte) (byte, []byte, error) { - return ReadUint8Bytes(b) -} - -// ReadBytesBytes reads a 'bin' object -// from 'b' and returns its vaue and -// the remaining bytes in 'b'. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - [TypeError] (not a 'bin' object) -func ReadBytesBytes(b []byte, scratch []byte) (v []byte, o []byte, err error) { - return readBytesBytes(b, scratch, false) -} - -func readBytesBytes(b []byte, scratch []byte, zc bool) (v []byte, o []byte, err error) { - l := len(b) - if l < 1 { - return nil, nil, ErrShortBytes - } - - lead := b[0] - b = b[1:] - var read int - switch lead { - case mbin8: - if len(b) < 1 { - err = ErrShortBytes - return - } - - read = int(b[0]) - b = b[1:] - - case mbin16: - if len(b) < 2 { - err = ErrShortBytes - return - } - read = int(big.Uint16(b)) - b = b[2:] - - case mbin32: - if len(b) < 4 { - err = ErrShortBytes - return - } - read = int(big.Uint32(b)) - b = b[4:] - - default: - err = badPrefix(BinType, lead) - return - } - - if len(b) < read { - err = ErrShortBytes - return - } - - // zero-copy - if zc { - v = b[0:read] - o = b[read:] - return - } - - if cap(scratch) >= read { - v = scratch[0:read] - } else { - v = make([]byte, read) - } - - o = b[copy(v, b):] - return -} - -// ReadBytesZC extracts the messagepack-encoded -// binary field without copying. The returned []byte -// points to the same memory as the input slice. -// -// Possible errors: -// -// - [ErrShortBytes] (b not long enough) -// - [TypeError] (object not 'bin') -func ReadBytesZC(b []byte) (v []byte, o []byte, err error) { - return readBytesBytes(b, nil, true) -} - -func ReadExactBytes(b []byte, into []byte) (o []byte, err error) { - if len(b) < 1 { - err = ErrShortBytes - return - } - - lead := b[0] - var read uint32 - b = b[1:] - switch lead { - case mbin8: - if len(b) < 1 { - err = ErrShortBytes - return - } - - read = uint32(b[0]) - b = b[1:] - - case mbin16: - if len(b) < 2 { - err = ErrShortBytes - return - } - read = uint32(big.Uint16(b)) - b = b[2:] - - case mbin32: - if len(b) < 4 { - err = ErrShortBytes - return - } - read = big.Uint32(b) - b = b[4:] - - default: - err = badPrefix(BinType, lead) - return - } - - if read != uint32(len(into)) { - err = ArrayError{Wanted: uint32(len(into)), Got: read} - return - } - - o = b[copy(into, b):] - return -} - -// ReadStringZC reads a messagepack string field -// without copying. The returned []byte points -// to the same memory as the input slice. -// -// Possible errors: -// -// - [ErrShortBytes] (b not long enough) -// - [TypeError] (object not 'str') -func ReadStringZC(b []byte) (v []byte, o []byte, err error) { - if len(b) < 1 { - return nil, nil, ErrShortBytes - } - - lead := b[0] - var read int - - b = b[1:] - if isfixstr(lead) { - read = int(rfixstr(lead)) - } else { - switch lead { - case mstr8: - if len(b) < 1 { - err = ErrShortBytes - return - } - read = int(b[0]) - b = b[1:] - - case mstr16: - if len(b) < 2 { - err = ErrShortBytes - return - } - read = int(big.Uint16(b)) - b = b[2:] - - case mstr32: - if len(b) < 4 { - err = ErrShortBytes - return - } - read = int(big.Uint32(b)) - b = b[4:] - - default: - err = TypeError{Method: StrType, Encoded: getType(lead)} - return - } - } - - if len(b) < read { - err = ErrShortBytes - return - } - - v = b[0:read] - o = b[read:] - return -} - -// ReadStringBytes reads a 'str' object -// from 'b' and returns its value and the -// remaining bytes in 'b'. -// -// Possible errors: -// -// - [ErrShortBytes] (b not long enough) -// - [TypeError] (not 'str' type) -// - [InvalidPrefixError] -func ReadStringBytes(b []byte) (string, []byte, error) { - v, o, err := ReadStringZC(b) - return string(v), o, err -} - -// ReadStringAsBytes reads a 'str' object -// into a slice of bytes. 'v' is the value of -// the 'str' object, which may reside in memory -// pointed to by 'scratch.' 'o' is the remaining bytes -// in 'b'. -// -// Possible errors: -// -// - [ErrShortBytes] (b not long enough) -// - [TypeError] (not 'str' type) -// - [InvalidPrefixError] (unknown type marker) -func ReadStringAsBytes(b []byte, scratch []byte) (v []byte, o []byte, err error) { - var tmp []byte - tmp, o, err = ReadStringZC(b) - v = append(scratch[:0], tmp...) - return -} - -// ReadComplex128Bytes reads a complex128 -// extension object from 'b' and returns the -// remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (not enough bytes in 'b') -// - [TypeError] (object not a complex128) -// - [InvalidPrefixError] -// - [ExtensionTypeError] (object an extension of the correct size, but not a complex128) -func ReadComplex128Bytes(b []byte) (c complex128, o []byte, err error) { - if len(b) < 18 { - err = ErrShortBytes - return - } - if b[0] != mfixext16 { - err = badPrefix(Complex128Type, b[0]) - return - } - if int8(b[1]) != Complex128Extension { - err = errExt(int8(b[1]), Complex128Extension) - return - } - c = complex(math.Float64frombits(big.Uint64(b[2:])), - math.Float64frombits(big.Uint64(b[10:]))) - o = b[18:] - return -} - -// ReadComplex64Bytes reads a complex64 -// extension object from 'b' and returns the -// remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (not enough bytes in 'b') -// - [TypeError] (object not a complex64) -// - [ExtensionTypeError] (object an extension of the correct size, but not a complex64) -func ReadComplex64Bytes(b []byte) (c complex64, o []byte, err error) { - if len(b) < 10 { - err = ErrShortBytes - return - } - if b[0] != mfixext8 { - err = badPrefix(Complex64Type, b[0]) - return - } - if b[1] != Complex64Extension { - err = errExt(int8(b[1]), Complex64Extension) - return - } - c = complex(math.Float32frombits(big.Uint32(b[2:])), - math.Float32frombits(big.Uint32(b[6:]))) - o = b[10:] - return -} - -// ReadTimeBytes reads a time.Time -// extension object from 'b' and returns the -// remaining bytes. -// Both the official and the format in this package will be read. -// -// Possible errors: -// -// - [ErrShortBytes] (not enough bytes in 'b') -// - [TypeError] (object not a time extension 5 or -1) -// - [ExtensionTypeError] (object an extension of the correct size, but not a time.Time) -func ReadTimeBytes(b []byte) (t time.Time, o []byte, err error) { - if len(b) < 6 { - err = ErrShortBytes - return - } - typ, o, b, err := readExt(b) - if err != nil { - return - } - switch typ { - case TimeExtension: - if len(b) != 12 { - err = ErrShortBytes - return - } - sec, nsec := getUnix(b) - t = time.Unix(sec, int64(nsec)).Local() - return - case MsgTimeExtension: - switch len(b) { - case 4: - t = time.Unix(int64(binary.BigEndian.Uint32(b)), 0).Local() - return - case 8: - v := binary.BigEndian.Uint64(b) - nanos := int64(v >> 34) - if nanos > 999999999 { - // In timestamp 64 and timestamp 96 formats, nanoseconds must not be larger than 999999999. - err = InvalidTimestamp{Nanos: nanos} - return - } - t = time.Unix(int64(v&(1<<34-1)), nanos).Local() - return - case 12: - nanos := int64(binary.BigEndian.Uint32(b)) - if nanos > 999999999 { - // In timestamp 64 and timestamp 96 formats, nanoseconds must not be larger than 999999999. - err = InvalidTimestamp{Nanos: nanos} - return - } - ux := int64(binary.BigEndian.Uint64(b[4:])) - t = time.Unix(ux, nanos).Local() - return - default: - err = InvalidTimestamp{FieldLength: len(b)} - return - } - default: - err = errExt(int8(b[2]), TimeExtension) - return - } -} - -// ReadMapStrIntfBytes reads a map[string]interface{} -// out of 'b' and returns the map and remaining bytes. -// If 'old' is non-nil, the values will be read into that map. -func ReadMapStrIntfBytes(b []byte, old map[string]interface{}) (v map[string]interface{}, o []byte, err error) { - return readMapStrIntfBytesDepth(b, old, 0) -} - -func readMapStrIntfBytesDepth(b []byte, old map[string]interface{}, depth int) (v map[string]interface{}, o []byte, err error) { - if depth >= recursionLimit { - err = ErrRecursion - return - } - - var sz uint32 - o = b - sz, o, err = ReadMapHeaderBytes(o) - - if err != nil { - return - } - - if old != nil { - for key := range old { - delete(old, key) - } - v = old - } else { - v = make(map[string]interface{}, int(sz)) - } - - for z := uint32(0); z < sz; z++ { - if len(o) < 1 { - err = ErrShortBytes - return - } - var key []byte - key, o, err = ReadMapKeyZC(o) - if err != nil { - return - } - var val interface{} - val, o, err = readIntfBytesDepth(o, depth) - if err != nil { - return - } - v[string(key)] = val - } - return -} - -// ReadIntfBytes attempts to read -// the next object out of 'b' as a raw interface{} and -// return the remaining bytes. -func ReadIntfBytes(b []byte) (i interface{}, o []byte, err error) { - return readIntfBytesDepth(b, 0) -} - -func readIntfBytesDepth(b []byte, depth int) (i interface{}, o []byte, err error) { - if depth >= recursionLimit { - err = ErrRecursion - return - } - if len(b) < 1 { - err = ErrShortBytes - return - } - - k := NextType(b) - - switch k { - case MapType: - i, o, err = readMapStrIntfBytesDepth(b, nil, depth+1) - return - - case ArrayType: - var sz uint32 - sz, o, err = ReadArrayHeaderBytes(b) - if err != nil { - return - } - j := make([]interface{}, int(sz)) - i = j - for d := range j { - j[d], o, err = readIntfBytesDepth(o, depth+1) - if err != nil { - return - } - } - return - - case Float32Type: - i, o, err = ReadFloat32Bytes(b) - return - - case Float64Type: - i, o, err = ReadFloat64Bytes(b) - return - - case IntType: - i, o, err = ReadInt64Bytes(b) - return - - case UintType: - i, o, err = ReadUint64Bytes(b) - return - - case BoolType: - i, o, err = ReadBoolBytes(b) - return - - case TimeType: - i, o, err = ReadTimeBytes(b) - return - - case Complex64Type: - i, o, err = ReadComplex64Bytes(b) - return - - case Complex128Type: - i, o, err = ReadComplex128Bytes(b) - return - - case ExtensionType: - var t int8 - t, err = peekExtension(b) - if err != nil { - return - } - // use a user-defined extension, - // if it's been registered - f, ok := extensionReg[t] - if ok { - e := f() - o, err = ReadExtensionBytes(b, e) - i = e - return - } - // last resort is a raw extension - e := RawExtension{} - e.Type = int8(t) - o, err = ReadExtensionBytes(b, &e) - i = &e - return - - case NilType: - o, err = ReadNilBytes(b) - return - - case BinType: - i, o, err = ReadBytesBytes(b, nil) - return - - case StrType: - i, o, err = ReadStringBytes(b) - return - - default: - err = InvalidPrefixError(b[0]) - return - } -} - -// Skip skips the next object in 'b' and -// returns the remaining bytes. If the object -// is a map or array, all of its elements -// will be skipped. -// -// Possible errors: -// -// - [ErrShortBytes] (not enough bytes in b) -// - [InvalidPrefixError] (bad encoding) -// - [ErrRecursion] (too deeply nested data) -func Skip(b []byte) ([]byte, error) { - return skipDepth(b, 0) -} - -func skipDepth(b []byte, depth int) ([]byte, error) { - if depth >= recursionLimit { - return b, ErrRecursion - } - sz, asz, err := getSize(b) - if err != nil { - return b, err - } - if uintptr(len(b)) < sz { - return b, ErrShortBytes - } - b = b[sz:] - for asz > 0 { - b, err = skipDepth(b, depth+1) - if err != nil { - return b, err - } - asz-- - } - return b, nil -} - -// returns (skip N bytes, skip M objects, error) -func getSize(b []byte) (uintptr, uintptr, error) { - l := len(b) - if l == 0 { - return 0, 0, ErrShortBytes - } - lead := b[0] - spec := getBytespec(lead) // get type information - size, mode := spec.size, spec.extra - if size == 0 { - return 0, 0, InvalidPrefixError(lead) - } - if mode >= 0 { // fixed composites - return uintptr(size), uintptr(mode), nil - } - if l < int(size) { - return 0, 0, ErrShortBytes - } - switch mode { - case extra8: - return uintptr(size) + uintptr(b[1]), 0, nil - case extra16: - return uintptr(size) + uintptr(big.Uint16(b[1:])), 0, nil - case extra32: - return uintptr(size) + uintptr(big.Uint32(b[1:])), 0, nil - case map16v: - return uintptr(size), 2 * uintptr(big.Uint16(b[1:])), nil - case map32v: - return uintptr(size), 2 * uintptr(big.Uint32(b[1:])), nil - case array16v: - return uintptr(size), uintptr(big.Uint16(b[1:])), nil - case array32v: - return uintptr(size), uintptr(big.Uint32(b[1:])), nil - default: - return 0, 0, fatal - } -} - -// ReadJSONNumberBytes tries to read a number -// from 'b' and return the value and the remaining bytes. -// -// Possible errors: -// -// - [ErrShortBytes] (too few bytes) -// - TypeError (not a number (int/float)) -func ReadJSONNumberBytes(b []byte) (number json.Number, o []byte, err error) { - if len(b) < 1 { - return "", nil, ErrShortBytes - } - if i, o, err := ReadInt64Bytes(b); err == nil { - return json.Number(strconv.FormatInt(i, 10)), o, nil - } - f, o, err := ReadFloat64Bytes(b) - if err == nil { - return json.Number(strconv.FormatFloat(f, 'f', -1, 64)), o, nil - } - return "", nil, TypeError{Method: NumberType, Encoded: getType(b[0])} -} diff --git a/vendor/github.com/tinylib/msgp/msgp/size.go b/vendor/github.com/tinylib/msgp/msgp/size.go deleted file mode 100644 index 585a67fdb5..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/size.go +++ /dev/null @@ -1,40 +0,0 @@ -package msgp - -// The sizes provided -// are the worst-case -// encoded sizes for -// each type. For variable- -// length types ([]byte, string), -// the total encoded size is -// the prefix size plus the -// length of the object. -const ( - Int64Size = 9 - IntSize = Int64Size - UintSize = Int64Size - Int8Size = 2 - Int16Size = 3 - Int32Size = 5 - Uint8Size = 2 - ByteSize = Uint8Size - Uint16Size = 3 - Uint32Size = 5 - Uint64Size = Int64Size - Float64Size = 9 - Float32Size = 5 - Complex64Size = 10 - Complex128Size = 18 - - DurationSize = Int64Size - TimeSize = 15 - BoolSize = 1 - NilSize = 1 - JSONNumberSize = Int64Size // Same as Float64Size - - MapHeaderSize = 5 - ArrayHeaderSize = 5 - - BytesPrefixSize = 5 - StringPrefixSize = 5 - ExtensionPrefixSize = 6 -) diff --git a/vendor/github.com/tinylib/msgp/msgp/unsafe.go b/vendor/github.com/tinylib/msgp/msgp/unsafe.go deleted file mode 100644 index 7d36bfb1e3..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/unsafe.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build (!purego && !appengine) || (!appengine && purego && unsafe) -// +build !purego,!appengine !appengine,purego,unsafe - -package msgp - -import ( - "unsafe" -) - -// NOTE: -// all of the definition in this file -// should be repeated in appengine.go, -// but without using unsafe - -const ( - // spec says int and uint are always - // the same size, but that int/uint - // size may not be machine word size - smallint = unsafe.Sizeof(int(0)) == 4 -) - -// UnsafeString returns the byte slice as a volatile string -// THIS SHOULD ONLY BE USED BY THE CODE GENERATOR. -// THIS IS EVIL CODE. -// YOU HAVE BEEN WARNED. -func UnsafeString(b []byte) string { - return *(*string)(unsafe.Pointer(&b)) -} - -// UnsafeBytes returns the string as a byte slice -// -// Deprecated: -// Since this code is no longer used by the code generator, -// UnsafeBytes(s) is precisely equivalent to []byte(s) -func UnsafeBytes(s string) []byte { - return []byte(s) -} diff --git a/vendor/github.com/tinylib/msgp/msgp/write.go b/vendor/github.com/tinylib/msgp/msgp/write.go deleted file mode 100644 index 352350f904..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/write.go +++ /dev/null @@ -1,886 +0,0 @@ -package msgp - -import ( - "encoding/binary" - "encoding/json" - "errors" - "io" - "math" - "reflect" - "sync" - "time" -) - -const ( - // min buffer size for the writer - minWriterSize = 18 -) - -// Sizer is an interface implemented -// by types that can estimate their -// size when MessagePack encoded. -// This interface is optional, but -// encoding/marshaling implementations -// may use this as a way to pre-allocate -// memory for serialization. -type Sizer interface { - Msgsize() int -} - -var ( - // Nowhere is an io.Writer to nowhere - Nowhere io.Writer = nwhere{} - - btsType = reflect.TypeOf(([]byte)(nil)) - writerPool = sync.Pool{ - New: func() interface{} { - return &Writer{buf: make([]byte, 2048)} - }, - } -) - -func popWriter(w io.Writer) *Writer { - wr := writerPool.Get().(*Writer) - wr.Reset(w) - return wr -} - -func pushWriter(wr *Writer) { - wr.w = nil - wr.wloc = 0 - writerPool.Put(wr) -} - -// freeW frees a writer for use -// by other processes. It is not necessary -// to call freeW on a writer. However, maintaining -// a reference to a *Writer after calling freeW on -// it will cause undefined behavior. -func freeW(w *Writer) { pushWriter(w) } - -// Require ensures that cap(old)-len(old) >= extra. -func Require(old []byte, extra int) []byte { - l := len(old) - c := cap(old) - r := l + extra - if c >= r { - return old - } else if l == 0 { - return make([]byte, 0, extra) - } - // the new size is the greater - // of double the old capacity - // and the sum of the old length - // and the number of new bytes - // necessary. - c <<= 1 - if c < r { - c = r - } - n := make([]byte, l, c) - copy(n, old) - return n -} - -// nowhere writer -type nwhere struct{} - -func (n nwhere) Write(p []byte) (int, error) { return len(p), nil } - -// Marshaler is the interface implemented -// by types that know how to marshal themselves -// as MessagePack. MarshalMsg appends the marshalled -// form of the object to the provided -// byte slice, returning the extended -// slice and any errors encountered. -type Marshaler interface { - MarshalMsg([]byte) ([]byte, error) -} - -// Encodable is the interface implemented -// by types that know how to write themselves -// as MessagePack using a *msgp.Writer. -type Encodable interface { - EncodeMsg(*Writer) error -} - -// Writer is a buffered writer -// that can be used to write -// MessagePack objects to an io.Writer. -// You must call *Writer.Flush() in order -// to flush all of the buffered data -// to the underlying writer. -type Writer struct { - w io.Writer - buf []byte - wloc int -} - -// NewWriter returns a new *Writer. -func NewWriter(w io.Writer) *Writer { - if wr, ok := w.(*Writer); ok { - return wr - } - return popWriter(w) -} - -// NewWriterSize returns a writer with a custom buffer size. -func NewWriterSize(w io.Writer, sz int) *Writer { - // we must be able to require() 'minWriterSize' - // contiguous bytes, so that is the - // practical minimum buffer size - if sz < minWriterSize { - sz = minWriterSize - } - buf := make([]byte, sz) - return NewWriterBuf(w, buf) -} - -// NewWriterBuf returns a writer with a provided buffer. -// 'buf' is not used when the capacity is smaller than 18, -// custom buffer is allocated instead. -func NewWriterBuf(w io.Writer, buf []byte) *Writer { - if cap(buf) < minWriterSize { - buf = make([]byte, minWriterSize) - } - buf = buf[:cap(buf)] - return &Writer{ - w: w, - buf: buf, - } -} - -// Encode encodes an Encodable to an io.Writer. -func Encode(w io.Writer, e Encodable) error { - wr := NewWriter(w) - err := e.EncodeMsg(wr) - if err == nil { - err = wr.Flush() - } - freeW(wr) - return err -} - -func (mw *Writer) flush() error { - if mw.wloc == 0 { - return nil - } - n, err := mw.w.Write(mw.buf[:mw.wloc]) - if err != nil { - if n > 0 { - mw.wloc = copy(mw.buf, mw.buf[n:mw.wloc]) - } - return err - } - mw.wloc = 0 - return nil -} - -// Flush flushes all of the buffered -// data to the underlying writer. -func (mw *Writer) Flush() error { return mw.flush() } - -// Buffered returns the number bytes in the write buffer -func (mw *Writer) Buffered() int { return len(mw.buf) - mw.wloc } - -func (mw *Writer) avail() int { return len(mw.buf) - mw.wloc } - -func (mw *Writer) bufsize() int { return len(mw.buf) } - -// NOTE: this should only be called with -// a number that is guaranteed to be less than -// len(mw.buf). typically, it is called with a constant. -// -// NOTE: this is a hot code path -func (mw *Writer) require(n int) (int, error) { - c := len(mw.buf) - wl := mw.wloc - if c-wl < n { - if err := mw.flush(); err != nil { - return 0, err - } - wl = mw.wloc - } - mw.wloc += n - return wl, nil -} - -func (mw *Writer) Append(b ...byte) error { - if mw.avail() < len(b) { - err := mw.flush() - if err != nil { - return err - } - } - mw.wloc += copy(mw.buf[mw.wloc:], b) - return nil -} - -// push one byte onto the buffer -// -// NOTE: this is a hot code path -func (mw *Writer) push(b byte) error { - if mw.wloc == len(mw.buf) { - if err := mw.flush(); err != nil { - return err - } - } - mw.buf[mw.wloc] = b - mw.wloc++ - return nil -} - -func (mw *Writer) prefix8(b byte, u uint8) error { - const need = 2 - if len(mw.buf)-mw.wloc < need { - if err := mw.flush(); err != nil { - return err - } - } - prefixu8(mw.buf[mw.wloc:], b, u) - mw.wloc += need - return nil -} - -func (mw *Writer) prefix16(b byte, u uint16) error { - const need = 3 - if len(mw.buf)-mw.wloc < need { - if err := mw.flush(); err != nil { - return err - } - } - prefixu16(mw.buf[mw.wloc:], b, u) - mw.wloc += need - return nil -} - -func (mw *Writer) prefix32(b byte, u uint32) error { - const need = 5 - if len(mw.buf)-mw.wloc < need { - if err := mw.flush(); err != nil { - return err - } - } - prefixu32(mw.buf[mw.wloc:], b, u) - mw.wloc += need - return nil -} - -func (mw *Writer) prefix64(b byte, u uint64) error { - const need = 9 - if len(mw.buf)-mw.wloc < need { - if err := mw.flush(); err != nil { - return err - } - } - prefixu64(mw.buf[mw.wloc:], b, u) - mw.wloc += need - return nil -} - -// Write implements io.Writer, and writes -// data directly to the buffer. -func (mw *Writer) Write(p []byte) (int, error) { - l := len(p) - if mw.avail() < l { - if err := mw.flush(); err != nil { - return 0, err - } - if l > len(mw.buf) { - return mw.w.Write(p) - } - } - mw.wloc += copy(mw.buf[mw.wloc:], p) - return l, nil -} - -// implements io.WriteString -func (mw *Writer) writeString(s string) error { - l := len(s) - if mw.avail() < l { - if err := mw.flush(); err != nil { - return err - } - if l > len(mw.buf) { - _, err := io.WriteString(mw.w, s) - return err - } - } - mw.wloc += copy(mw.buf[mw.wloc:], s) - return nil -} - -// Reset changes the underlying writer used by the Writer -func (mw *Writer) Reset(w io.Writer) { - mw.buf = mw.buf[:cap(mw.buf)] - mw.w = w - mw.wloc = 0 -} - -// WriteMapHeader writes a map header of the given -// size to the writer -func (mw *Writer) WriteMapHeader(sz uint32) error { - switch { - case sz <= 15: - return mw.push(wfixmap(uint8(sz))) - case sz <= math.MaxUint16: - return mw.prefix16(mmap16, uint16(sz)) - default: - return mw.prefix32(mmap32, sz) - } -} - -// WriteArrayHeader writes an array header of the -// given size to the writer -func (mw *Writer) WriteArrayHeader(sz uint32) error { - switch { - case sz <= 15: - return mw.push(wfixarray(uint8(sz))) - case sz <= math.MaxUint16: - return mw.prefix16(marray16, uint16(sz)) - default: - return mw.prefix32(marray32, sz) - } -} - -// WriteNil writes a nil byte to the buffer -func (mw *Writer) WriteNil() error { - return mw.push(mnil) -} - -// WriteFloat writes a float to the writer as either float64 -// or float32 when it represents the exact same value -func (mw *Writer) WriteFloat(f float64) error { - f32 := float32(f) - if float64(f32) == f { - return mw.prefix32(mfloat32, math.Float32bits(f32)) - } - return mw.prefix64(mfloat64, math.Float64bits(f)) -} - -// WriteFloat64 writes a float64 to the writer -func (mw *Writer) WriteFloat64(f float64) error { - return mw.prefix64(mfloat64, math.Float64bits(f)) -} - -// WriteFloat32 writes a float32 to the writer -func (mw *Writer) WriteFloat32(f float32) error { - return mw.prefix32(mfloat32, math.Float32bits(f)) -} - -// WriteDuration writes a time.Duration to the writer -func (mw *Writer) WriteDuration(d time.Duration) error { - return mw.WriteInt64(int64(d)) -} - -// WriteInt64 writes an int64 to the writer -func (mw *Writer) WriteInt64(i int64) error { - if i >= 0 { - switch { - case i <= math.MaxInt8: - return mw.push(wfixint(uint8(i))) - case i <= math.MaxInt16: - return mw.prefix16(mint16, uint16(i)) - case i <= math.MaxInt32: - return mw.prefix32(mint32, uint32(i)) - default: - return mw.prefix64(mint64, uint64(i)) - } - } - switch { - case i >= -32: - return mw.push(wnfixint(int8(i))) - case i >= math.MinInt8: - return mw.prefix8(mint8, uint8(i)) - case i >= math.MinInt16: - return mw.prefix16(mint16, uint16(i)) - case i >= math.MinInt32: - return mw.prefix32(mint32, uint32(i)) - default: - return mw.prefix64(mint64, uint64(i)) - } -} - -// WriteInt8 writes an int8 to the writer -func (mw *Writer) WriteInt8(i int8) error { return mw.WriteInt64(int64(i)) } - -// WriteInt16 writes an int16 to the writer -func (mw *Writer) WriteInt16(i int16) error { return mw.WriteInt64(int64(i)) } - -// WriteInt32 writes an int32 to the writer -func (mw *Writer) WriteInt32(i int32) error { return mw.WriteInt64(int64(i)) } - -// WriteInt writes an int to the writer -func (mw *Writer) WriteInt(i int) error { return mw.WriteInt64(int64(i)) } - -// WriteUint64 writes a uint64 to the writer -func (mw *Writer) WriteUint64(u uint64) error { - switch { - case u <= (1<<7)-1: - return mw.push(wfixint(uint8(u))) - case u <= math.MaxUint8: - return mw.prefix8(muint8, uint8(u)) - case u <= math.MaxUint16: - return mw.prefix16(muint16, uint16(u)) - case u <= math.MaxUint32: - return mw.prefix32(muint32, uint32(u)) - default: - return mw.prefix64(muint64, u) - } -} - -// WriteByte is analogous to WriteUint8 -func (mw *Writer) WriteByte(u byte) error { return mw.WriteUint8(uint8(u)) } - -// WriteUint8 writes a uint8 to the writer -func (mw *Writer) WriteUint8(u uint8) error { return mw.WriteUint64(uint64(u)) } - -// WriteUint16 writes a uint16 to the writer -func (mw *Writer) WriteUint16(u uint16) error { return mw.WriteUint64(uint64(u)) } - -// WriteUint32 writes a uint32 to the writer -func (mw *Writer) WriteUint32(u uint32) error { return mw.WriteUint64(uint64(u)) } - -// WriteUint writes a uint to the writer -func (mw *Writer) WriteUint(u uint) error { return mw.WriteUint64(uint64(u)) } - -// WriteBytes writes binary as 'bin' to the writer -func (mw *Writer) WriteBytes(b []byte) error { - sz := uint32(len(b)) - var err error - switch { - case sz <= math.MaxUint8: - err = mw.prefix8(mbin8, uint8(sz)) - case sz <= math.MaxUint16: - err = mw.prefix16(mbin16, uint16(sz)) - default: - err = mw.prefix32(mbin32, sz) - } - if err != nil { - return err - } - _, err = mw.Write(b) - return err -} - -// WriteBytesHeader writes just the size header -// of a MessagePack 'bin' object. The user is responsible -// for then writing 'sz' more bytes into the stream. -func (mw *Writer) WriteBytesHeader(sz uint32) error { - switch { - case sz <= math.MaxUint8: - return mw.prefix8(mbin8, uint8(sz)) - case sz <= math.MaxUint16: - return mw.prefix16(mbin16, uint16(sz)) - default: - return mw.prefix32(mbin32, sz) - } -} - -// WriteBool writes a bool to the writer -func (mw *Writer) WriteBool(b bool) error { - if b { - return mw.push(mtrue) - } - return mw.push(mfalse) -} - -// WriteString writes a messagepack string to the writer. -// (This is NOT an implementation of io.StringWriter) -func (mw *Writer) WriteString(s string) error { - sz := uint32(len(s)) - var err error - switch { - case sz <= 31: - err = mw.push(wfixstr(uint8(sz))) - case sz <= math.MaxUint8: - err = mw.prefix8(mstr8, uint8(sz)) - case sz <= math.MaxUint16: - err = mw.prefix16(mstr16, uint16(sz)) - default: - err = mw.prefix32(mstr32, sz) - } - if err != nil { - return err - } - return mw.writeString(s) -} - -// WriteStringHeader writes just the string size -// header of a MessagePack 'str' object. The user -// is responsible for writing 'sz' more valid UTF-8 -// bytes to the stream. -func (mw *Writer) WriteStringHeader(sz uint32) error { - switch { - case sz <= 31: - return mw.push(wfixstr(uint8(sz))) - case sz <= math.MaxUint8: - return mw.prefix8(mstr8, uint8(sz)) - case sz <= math.MaxUint16: - return mw.prefix16(mstr16, uint16(sz)) - default: - return mw.prefix32(mstr32, sz) - } -} - -// WriteStringFromBytes writes a 'str' object -// from a []byte. -func (mw *Writer) WriteStringFromBytes(str []byte) error { - sz := uint32(len(str)) - var err error - switch { - case sz <= 31: - err = mw.push(wfixstr(uint8(sz))) - case sz <= math.MaxUint8: - err = mw.prefix8(mstr8, uint8(sz)) - case sz <= math.MaxUint16: - err = mw.prefix16(mstr16, uint16(sz)) - default: - err = mw.prefix32(mstr32, sz) - } - if err != nil { - return err - } - _, err = mw.Write(str) - return err -} - -// WriteComplex64 writes a complex64 to the writer -func (mw *Writer) WriteComplex64(f complex64) error { - o, err := mw.require(10) - if err != nil { - return err - } - mw.buf[o] = mfixext8 - mw.buf[o+1] = Complex64Extension - big.PutUint32(mw.buf[o+2:], math.Float32bits(real(f))) - big.PutUint32(mw.buf[o+6:], math.Float32bits(imag(f))) - return nil -} - -// WriteComplex128 writes a complex128 to the writer -func (mw *Writer) WriteComplex128(f complex128) error { - o, err := mw.require(18) - if err != nil { - return err - } - mw.buf[o] = mfixext16 - mw.buf[o+1] = Complex128Extension - big.PutUint64(mw.buf[o+2:], math.Float64bits(real(f))) - big.PutUint64(mw.buf[o+10:], math.Float64bits(imag(f))) - return nil -} - -// WriteMapStrStr writes a map[string]string to the writer -func (mw *Writer) WriteMapStrStr(mp map[string]string) (err error) { - err = mw.WriteMapHeader(uint32(len(mp))) - if err != nil { - return - } - for key, val := range mp { - err = mw.WriteString(key) - if err != nil { - return - } - err = mw.WriteString(val) - if err != nil { - return - } - } - return nil -} - -// WriteMapStrIntf writes a map[string]interface to the writer -func (mw *Writer) WriteMapStrIntf(mp map[string]interface{}) (err error) { - err = mw.WriteMapHeader(uint32(len(mp))) - if err != nil { - return - } - for key, val := range mp { - err = mw.WriteString(key) - if err != nil { - return - } - err = mw.WriteIntf(val) - if err != nil { - return - } - } - return -} - -// WriteTime writes a time.Time object to the wire. -// -// Time is encoded as Unix time, which means that -// location (time zone) data is removed from the object. -// The encoded object itself is 12 bytes: 8 bytes for -// a big-endian 64-bit integer denoting seconds -// elapsed since "zero" Unix time, followed by 4 bytes -// for a big-endian 32-bit signed integer denoting -// the nanosecond offset of the time. This encoding -// is intended to ease portability across languages. -// (Note that this is *not* the standard time.Time -// binary encoding, because its implementation relies -// heavily on the internal representation used by the -// time package.) -func (mw *Writer) WriteTime(t time.Time) error { - t = t.UTC() - o, err := mw.require(15) - if err != nil { - return err - } - mw.buf[o] = mext8 - mw.buf[o+1] = 12 - mw.buf[o+2] = TimeExtension - putUnix(mw.buf[o+3:], t.Unix(), int32(t.Nanosecond())) - return nil -} - -// WriteTimeExt will write t using the official msgpack extension spec. -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -func (mw *Writer) WriteTimeExt(t time.Time) error { - // Time rounded towards zero. - secPrec := t.Truncate(time.Second) - remain := t.Sub(secPrec).Nanoseconds() - asSecs := secPrec.Unix() - switch { - case remain == 0 && asSecs > 0 && asSecs <= math.MaxUint32: - // 4 bytes - o, err := mw.require(6) - if err != nil { - return err - } - mw.buf[o] = mfixext4 - mw.buf[o+1] = byte(msgTimeExtension) - binary.BigEndian.PutUint32(mw.buf[o+2:], uint32(asSecs)) - return nil - case asSecs < 0 || asSecs >= (1<<34): - // 12 bytes - o, err := mw.require(12 + 3) - if err != nil { - return err - } - mw.buf[o] = mext8 - mw.buf[o+1] = 12 - mw.buf[o+2] = byte(msgTimeExtension) - binary.BigEndian.PutUint32(mw.buf[o+3:], uint32(remain)) - binary.BigEndian.PutUint64(mw.buf[o+3+4:], uint64(asSecs)) - default: - // 8 bytes - o, err := mw.require(10) - if err != nil { - return err - } - mw.buf[o] = mfixext8 - mw.buf[o+1] = byte(msgTimeExtension) - binary.BigEndian.PutUint64(mw.buf[o+2:], uint64(asSecs)|(uint64(remain)<<34)) - } - return nil -} - -// WriteJSONNumber writes the json.Number to the stream as either integer or float. -func (mw *Writer) WriteJSONNumber(n json.Number) error { - if n == "" { - // The zero value outputs the 0 integer. - return mw.push(0) - } - ii, err := n.Int64() - if err == nil { - return mw.WriteInt64(ii) - } - ff, err := n.Float64() - if err == nil { - return mw.WriteFloat(ff) - } - return err -} - -// WriteIntf writes the concrete type of 'v'. -// WriteIntf will error if 'v' is not one of the following: -// - A bool, float, string, []byte, int, uint, or complex -// - A map of supported types (with string keys) -// - An array or slice of supported types -// - A pointer to a supported type -// - A type that satisfies the msgp.Encodable interface -// - A type that satisfies the msgp.Extension interface -func (mw *Writer) WriteIntf(v interface{}) error { - if v == nil { - return mw.WriteNil() - } - switch v := v.(type) { - - // preferred interfaces - - case Encodable: - return v.EncodeMsg(mw) - case Extension: - return mw.WriteExtension(v) - - // concrete types - - case bool: - return mw.WriteBool(v) - case float32: - return mw.WriteFloat32(v) - case float64: - return mw.WriteFloat64(v) - case complex64: - return mw.WriteComplex64(v) - case complex128: - return mw.WriteComplex128(v) - case uint8: - return mw.WriteUint8(v) - case uint16: - return mw.WriteUint16(v) - case uint32: - return mw.WriteUint32(v) - case uint64: - return mw.WriteUint64(v) - case uint: - return mw.WriteUint(v) - case int8: - return mw.WriteInt8(v) - case int16: - return mw.WriteInt16(v) - case int32: - return mw.WriteInt32(v) - case int64: - return mw.WriteInt64(v) - case int: - return mw.WriteInt(v) - case string: - return mw.WriteString(v) - case []byte: - return mw.WriteBytes(v) - case map[string]string: - return mw.WriteMapStrStr(v) - case map[string]interface{}: - return mw.WriteMapStrIntf(v) - case time.Time: - return mw.WriteTime(v) - case time.Duration: - return mw.WriteDuration(v) - case json.Number: - return mw.WriteJSONNumber(v) - } - - val := reflect.ValueOf(v) - if !isSupported(val.Kind()) || !val.IsValid() { - return errors.New("msgp: type " + val.String() + " not supported") - } - - switch val.Kind() { - case reflect.Ptr: - if val.IsNil() { - return mw.WriteNil() - } - return mw.WriteIntf(val.Elem().Interface()) - case reflect.Slice: - return mw.writeSlice(val) - case reflect.Map: - return mw.writeMap(val) - } - return &ErrUnsupportedType{T: val.Type()} -} - -func (mw *Writer) writeMap(v reflect.Value) (err error) { - if v.Type().Key().Kind() != reflect.String { - return errors.New("msgp: map keys must be strings") - } - ks := v.MapKeys() - err = mw.WriteMapHeader(uint32(len(ks))) - if err != nil { - return - } - for _, key := range ks { - val := v.MapIndex(key) - err = mw.WriteString(key.String()) - if err != nil { - return - } - err = mw.WriteIntf(val.Interface()) - if err != nil { - return - } - } - return -} - -func (mw *Writer) writeSlice(v reflect.Value) (err error) { - // is []byte - if v.Type().ConvertibleTo(btsType) { - return mw.WriteBytes(v.Bytes()) - } - - sz := uint32(v.Len()) - err = mw.WriteArrayHeader(sz) - if err != nil { - return - } - for i := uint32(0); i < sz; i++ { - err = mw.WriteIntf(v.Index(int(i)).Interface()) - if err != nil { - return - } - } - return -} - -// is the reflect.Kind encodable? -func isSupported(k reflect.Kind) bool { - switch k { - case reflect.Func, reflect.Chan, reflect.Invalid, reflect.UnsafePointer: - return false - default: - return true - } -} - -// GuessSize guesses the size of the underlying -// value of 'i'. If the underlying value is not -// a simple builtin (or []byte), GuessSize defaults -// to 512. -func GuessSize(i interface{}) int { - if i == nil { - return NilSize - } - - switch i := i.(type) { - case Sizer: - return i.Msgsize() - case Extension: - return ExtensionPrefixSize + i.Len() - case float64: - return Float64Size - case float32: - return Float32Size - case uint8, uint16, uint32, uint64, uint: - return UintSize - case int8, int16, int32, int64, int: - return IntSize - case []byte: - return BytesPrefixSize + len(i) - case string: - return StringPrefixSize + len(i) - case complex64: - return Complex64Size - case complex128: - return Complex128Size - case bool: - return BoolSize - case map[string]interface{}: - s := MapHeaderSize - for key, val := range i { - s += StringPrefixSize + len(key) + GuessSize(val) - } - return s - case map[string]string: - s := MapHeaderSize - for key, val := range i { - s += 2*StringPrefixSize + len(key) + len(val) - } - return s - default: - return 512 - } -} diff --git a/vendor/github.com/tinylib/msgp/msgp/write_bytes.go b/vendor/github.com/tinylib/msgp/msgp/write_bytes.go deleted file mode 100644 index 704501746a..0000000000 --- a/vendor/github.com/tinylib/msgp/msgp/write_bytes.go +++ /dev/null @@ -1,520 +0,0 @@ -package msgp - -import ( - "encoding/binary" - "encoding/json" - "errors" - "math" - "reflect" - "time" -) - -// ensure 'sz' extra bytes in 'b' btw len(b) and cap(b) -func ensure(b []byte, sz int) ([]byte, int) { - l := len(b) - c := cap(b) - if c-l < sz { - o := make([]byte, (2*c)+sz) // exponential growth - n := copy(o, b) - return o[:n+sz], n - } - return b[:l+sz], l -} - -// AppendMapHeader appends a map header with the -// given size to the slice -func AppendMapHeader(b []byte, sz uint32) []byte { - switch { - case sz <= 15: - return append(b, wfixmap(uint8(sz))) - - case sz <= math.MaxUint16: - o, n := ensure(b, 3) - prefixu16(o[n:], mmap16, uint16(sz)) - return o - - default: - o, n := ensure(b, 5) - prefixu32(o[n:], mmap32, sz) - return o - } -} - -// AppendArrayHeader appends an array header with -// the given size to the slice -func AppendArrayHeader(b []byte, sz uint32) []byte { - switch { - case sz <= 15: - return append(b, wfixarray(uint8(sz))) - - case sz <= math.MaxUint16: - o, n := ensure(b, 3) - prefixu16(o[n:], marray16, uint16(sz)) - return o - - default: - o, n := ensure(b, 5) - prefixu32(o[n:], marray32, sz) - return o - } -} - -// AppendNil appends a 'nil' byte to the slice -func AppendNil(b []byte) []byte { return append(b, mnil) } - -// AppendFloat appends a float to the slice as either float64 -// or float32 when it represents the exact same value -func AppendFloat(b []byte, f float64) []byte { - f32 := float32(f) - if float64(f32) == f { - return AppendFloat32(b, f32) - } - return AppendFloat64(b, f) -} - -// AppendFloat64 appends a float64 to the slice -func AppendFloat64(b []byte, f float64) []byte { - o, n := ensure(b, Float64Size) - prefixu64(o[n:], mfloat64, math.Float64bits(f)) - return o -} - -// AppendFloat32 appends a float32 to the slice -func AppendFloat32(b []byte, f float32) []byte { - o, n := ensure(b, Float32Size) - prefixu32(o[n:], mfloat32, math.Float32bits(f)) - return o -} - -// AppendDuration appends a time.Duration to the slice -func AppendDuration(b []byte, d time.Duration) []byte { - return AppendInt64(b, int64(d)) -} - -// AppendInt64 appends an int64 to the slice -func AppendInt64(b []byte, i int64) []byte { - if i >= 0 { - switch { - case i <= math.MaxInt8: - return append(b, wfixint(uint8(i))) - case i <= math.MaxInt16: - o, n := ensure(b, 3) - putMint16(o[n:], int16(i)) - return o - case i <= math.MaxInt32: - o, n := ensure(b, 5) - putMint32(o[n:], int32(i)) - return o - default: - o, n := ensure(b, 9) - putMint64(o[n:], i) - return o - } - } - switch { - case i >= -32: - return append(b, wnfixint(int8(i))) - case i >= math.MinInt8: - o, n := ensure(b, 2) - putMint8(o[n:], int8(i)) - return o - case i >= math.MinInt16: - o, n := ensure(b, 3) - putMint16(o[n:], int16(i)) - return o - case i >= math.MinInt32: - o, n := ensure(b, 5) - putMint32(o[n:], int32(i)) - return o - default: - o, n := ensure(b, 9) - putMint64(o[n:], i) - return o - } -} - -// AppendInt appends an int to the slice -func AppendInt(b []byte, i int) []byte { return AppendInt64(b, int64(i)) } - -// AppendInt8 appends an int8 to the slice -func AppendInt8(b []byte, i int8) []byte { return AppendInt64(b, int64(i)) } - -// AppendInt16 appends an int16 to the slice -func AppendInt16(b []byte, i int16) []byte { return AppendInt64(b, int64(i)) } - -// AppendInt32 appends an int32 to the slice -func AppendInt32(b []byte, i int32) []byte { return AppendInt64(b, int64(i)) } - -// AppendUint64 appends a uint64 to the slice -func AppendUint64(b []byte, u uint64) []byte { - switch { - case u <= (1<<7)-1: - return append(b, wfixint(uint8(u))) - - case u <= math.MaxUint8: - o, n := ensure(b, 2) - putMuint8(o[n:], uint8(u)) - return o - - case u <= math.MaxUint16: - o, n := ensure(b, 3) - putMuint16(o[n:], uint16(u)) - return o - - case u <= math.MaxUint32: - o, n := ensure(b, 5) - putMuint32(o[n:], uint32(u)) - return o - - default: - o, n := ensure(b, 9) - putMuint64(o[n:], u) - return o - - } -} - -// AppendUint appends a uint to the slice -func AppendUint(b []byte, u uint) []byte { return AppendUint64(b, uint64(u)) } - -// AppendUint8 appends a uint8 to the slice -func AppendUint8(b []byte, u uint8) []byte { return AppendUint64(b, uint64(u)) } - -// AppendByte is analogous to AppendUint8 -func AppendByte(b []byte, u byte) []byte { return AppendUint8(b, uint8(u)) } - -// AppendUint16 appends a uint16 to the slice -func AppendUint16(b []byte, u uint16) []byte { return AppendUint64(b, uint64(u)) } - -// AppendUint32 appends a uint32 to the slice -func AppendUint32(b []byte, u uint32) []byte { return AppendUint64(b, uint64(u)) } - -// AppendBytes appends bytes to the slice as MessagePack 'bin' data -func AppendBytes(b []byte, bts []byte) []byte { - sz := len(bts) - var o []byte - var n int - switch { - case sz <= math.MaxUint8: - o, n = ensure(b, 2+sz) - prefixu8(o[n:], mbin8, uint8(sz)) - n += 2 - case sz <= math.MaxUint16: - o, n = ensure(b, 3+sz) - prefixu16(o[n:], mbin16, uint16(sz)) - n += 3 - default: - o, n = ensure(b, 5+sz) - prefixu32(o[n:], mbin32, uint32(sz)) - n += 5 - } - return o[:n+copy(o[n:], bts)] -} - -// AppendBytesHeader appends an 'bin' header with -// the given size to the slice. -func AppendBytesHeader(b []byte, sz uint32) []byte { - var o []byte - var n int - switch { - case sz <= math.MaxUint8: - o, n = ensure(b, 2) - prefixu8(o[n:], mbin8, uint8(sz)) - return o - case sz <= math.MaxUint16: - o, n = ensure(b, 3) - prefixu16(o[n:], mbin16, uint16(sz)) - return o - } - o, n = ensure(b, 5) - prefixu32(o[n:], mbin32, sz) - return o -} - -// AppendBool appends a bool to the slice -func AppendBool(b []byte, t bool) []byte { - if t { - return append(b, mtrue) - } - return append(b, mfalse) -} - -// AppendString appends a string as a MessagePack 'str' to the slice -func AppendString(b []byte, s string) []byte { - sz := len(s) - var n int - var o []byte - switch { - case sz <= 31: - o, n = ensure(b, 1+sz) - o[n] = wfixstr(uint8(sz)) - n++ - case sz <= math.MaxUint8: - o, n = ensure(b, 2+sz) - prefixu8(o[n:], mstr8, uint8(sz)) - n += 2 - case sz <= math.MaxUint16: - o, n = ensure(b, 3+sz) - prefixu16(o[n:], mstr16, uint16(sz)) - n += 3 - default: - o, n = ensure(b, 5+sz) - prefixu32(o[n:], mstr32, uint32(sz)) - n += 5 - } - return o[:n+copy(o[n:], s)] -} - -// AppendStringFromBytes appends a []byte -// as a MessagePack 'str' to the slice 'b.' -func AppendStringFromBytes(b []byte, str []byte) []byte { - sz := len(str) - var n int - var o []byte - switch { - case sz <= 31: - o, n = ensure(b, 1+sz) - o[n] = wfixstr(uint8(sz)) - n++ - case sz <= math.MaxUint8: - o, n = ensure(b, 2+sz) - prefixu8(o[n:], mstr8, uint8(sz)) - n += 2 - case sz <= math.MaxUint16: - o, n = ensure(b, 3+sz) - prefixu16(o[n:], mstr16, uint16(sz)) - n += 3 - default: - o, n = ensure(b, 5+sz) - prefixu32(o[n:], mstr32, uint32(sz)) - n += 5 - } - return o[:n+copy(o[n:], str)] -} - -// AppendComplex64 appends a complex64 to the slice as a MessagePack extension -func AppendComplex64(b []byte, c complex64) []byte { - o, n := ensure(b, Complex64Size) - o[n] = mfixext8 - o[n+1] = Complex64Extension - big.PutUint32(o[n+2:], math.Float32bits(real(c))) - big.PutUint32(o[n+6:], math.Float32bits(imag(c))) - return o -} - -// AppendComplex128 appends a complex128 to the slice as a MessagePack extension -func AppendComplex128(b []byte, c complex128) []byte { - o, n := ensure(b, Complex128Size) - o[n] = mfixext16 - o[n+1] = Complex128Extension - big.PutUint64(o[n+2:], math.Float64bits(real(c))) - big.PutUint64(o[n+10:], math.Float64bits(imag(c))) - return o -} - -// AppendTime appends a time.Time to the slice as a MessagePack extension -func AppendTime(b []byte, t time.Time) []byte { - o, n := ensure(b, TimeSize) - t = t.UTC() - o[n] = mext8 - o[n+1] = 12 - o[n+2] = TimeExtension - putUnix(o[n+3:], t.Unix(), int32(t.Nanosecond())) - return o -} - -// AppendTimeExt will write t using the official msgpack extension spec. -// https://github.com/msgpack/msgpack/blob/master/spec.md#timestamp-extension-type -func AppendTimeExt(b []byte, t time.Time) []byte { - // Time rounded towards zero. - secPrec := t.Truncate(time.Second) - remain := t.Sub(secPrec).Nanoseconds() - asSecs := secPrec.Unix() - switch { - case remain == 0 && asSecs > 0 && asSecs <= math.MaxUint32: - // 4 bytes - o, n := ensure(b, 2+4) - o[n+0] = mfixext4 - o[n+1] = byte(msgTimeExtension) - binary.BigEndian.PutUint32(o[n+2:], uint32(asSecs)) - return o - case asSecs < 0 || asSecs >= (1<<34): - // 12 bytes - o, n := ensure(b, 3+12) - o[n+0] = mext8 - o[n+1] = 12 - o[n+2] = byte(msgTimeExtension) - binary.BigEndian.PutUint32(o[n+3:], uint32(remain)) - binary.BigEndian.PutUint64(o[n+3+4:], uint64(asSecs)) - return o - default: - // 8 bytes - o, n := ensure(b, 2+8) - o[n+0] = mfixext8 - o[n+1] = byte(msgTimeExtension) - binary.BigEndian.PutUint64(o[n+2:], uint64(asSecs)|(uint64(remain)<<34)) - return o - } -} - -// AppendMapStrStr appends a map[string]string to the slice -// as a MessagePack map with 'str'-type keys and values -func AppendMapStrStr(b []byte, m map[string]string) []byte { - sz := uint32(len(m)) - b = AppendMapHeader(b, sz) - for key, val := range m { - b = AppendString(b, key) - b = AppendString(b, val) - } - return b -} - -// AppendMapStrIntf appends a map[string]interface{} to the slice -// as a MessagePack map with 'str'-type keys. -func AppendMapStrIntf(b []byte, m map[string]interface{}) ([]byte, error) { - sz := uint32(len(m)) - b = AppendMapHeader(b, sz) - var err error - for key, val := range m { - b = AppendString(b, key) - b, err = AppendIntf(b, val) - if err != nil { - return b, err - } - } - return b, nil -} - -// AppendIntf appends the concrete type of 'i' to the -// provided []byte. 'i' must be one of the following: -// - 'nil' -// - A bool, float, string, []byte, int, uint, or complex -// - A map[string]T where T is another supported type -// - A []T, where T is another supported type -// - A *T, where T is another supported type -// - A type that satisfies the msgp.Marshaler interface -// - A type that satisfies the msgp.Extension interface -func AppendIntf(b []byte, i interface{}) ([]byte, error) { - if i == nil { - return AppendNil(b), nil - } - - // all the concrete types - // for which we have methods - switch i := i.(type) { - case Marshaler: - return i.MarshalMsg(b) - case Extension: - return AppendExtension(b, i) - case bool: - return AppendBool(b, i), nil - case float32: - return AppendFloat32(b, i), nil - case float64: - return AppendFloat64(b, i), nil - case complex64: - return AppendComplex64(b, i), nil - case complex128: - return AppendComplex128(b, i), nil - case string: - return AppendString(b, i), nil - case []byte: - return AppendBytes(b, i), nil - case int8: - return AppendInt8(b, i), nil - case int16: - return AppendInt16(b, i), nil - case int32: - return AppendInt32(b, i), nil - case int64: - return AppendInt64(b, i), nil - case int: - return AppendInt64(b, int64(i)), nil - case uint: - return AppendUint64(b, uint64(i)), nil - case uint8: - return AppendUint8(b, i), nil - case uint16: - return AppendUint16(b, i), nil - case uint32: - return AppendUint32(b, i), nil - case uint64: - return AppendUint64(b, i), nil - case time.Time: - return AppendTime(b, i), nil - case time.Duration: - return AppendDuration(b, i), nil - case map[string]interface{}: - return AppendMapStrIntf(b, i) - case map[string]string: - return AppendMapStrStr(b, i), nil - case json.Number: - return AppendJSONNumber(b, i) - case []interface{}: - b = AppendArrayHeader(b, uint32(len(i))) - var err error - for _, k := range i { - b, err = AppendIntf(b, k) - if err != nil { - return b, err - } - } - return b, nil - } - - var err error - v := reflect.ValueOf(i) - switch v.Kind() { - case reflect.Map: - if v.Type().Key().Kind() != reflect.String { - return b, errors.New("msgp: map keys must be strings") - } - ks := v.MapKeys() - b = AppendMapHeader(b, uint32(len(ks))) - for _, key := range ks { - val := v.MapIndex(key) - b = AppendString(b, key.String()) - b, err = AppendIntf(b, val.Interface()) - if err != nil { - return nil, err - } - } - return b, nil - case reflect.Array, reflect.Slice: - l := v.Len() - b = AppendArrayHeader(b, uint32(l)) - for i := 0; i < l; i++ { - b, err = AppendIntf(b, v.Index(i).Interface()) - if err != nil { - return b, err - } - } - return b, nil - case reflect.Ptr: - if v.IsNil() { - return AppendNil(b), err - } - b, err = AppendIntf(b, v.Elem().Interface()) - return b, err - default: - return b, &ErrUnsupportedType{T: v.Type()} - } -} - -// AppendJSONNumber appends a json.Number to the slice. -// An error will be returned if the json.Number returns error as both integer and float. -func AppendJSONNumber(b []byte, n json.Number) ([]byte, error) { - if n == "" { - // The zero value outputs the 0 integer. - return append(b, 0), nil - } - ii, err := n.Int64() - if err == nil { - return AppendInt64(b, ii), nil - } - ff, err := n.Float64() - if err == nil { - return AppendFloat(b, ff), nil - } - return b, err -} diff --git a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml b/vendor/github.com/tklauser/go-sysconf/.cirrus.yml deleted file mode 100644 index 495e5e633d..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/.cirrus.yml +++ /dev/null @@ -1,23 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.24.0 - -freebsd_13_task: - freebsd_instance: - image_family: freebsd-13-5 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... - -freebsd_14_task: - freebsd_instance: - image_family: freebsd-14-2 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... diff --git a/vendor/github.com/tklauser/go-sysconf/.gitignore b/vendor/github.com/tklauser/go-sysconf/.gitignore deleted file mode 100644 index e482715909..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_obj/ diff --git a/vendor/github.com/tklauser/go-sysconf/LICENSE b/vendor/github.com/tklauser/go-sysconf/LICENSE deleted file mode 100644 index 73c6b8991e..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/LICENSE +++ /dev/null @@ -1,29 +0,0 @@ -BSD 3-Clause License - -Copyright (c) 2018-2022, Tobias Klauser -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 the copyright holder 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 HOLDER 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/tklauser/go-sysconf/README.md b/vendor/github.com/tklauser/go-sysconf/README.md deleted file mode 100644 index b83d5abf1d..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# go-sysconf - -[![Go Reference](https://pkg.go.dev/badge/github.com/tklauser/go-sysconf.svg)](https://pkg.go.dev/github.com/tklauser/go-sysconf) -[![GitHub Action Status](https://github.com/tklauser/go-sysconf/workflows/Tests/badge.svg)](https://github.com/tklauser/go-sysconf/actions?query=workflow%3ATests) - -`sysconf` for Go, without using cgo or external binaries (e.g. getconf). - -Supported operating systems: Linux, macOS, DragonflyBSD, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos. - -All POSIX.1 and POSIX.2 variables are supported, see [References](#references) for a complete list. - -Additionally, the following non-standard variables are supported on some operating systems: - -| Variable | Supported on | -|---|---| -| `SC_PHYS_PAGES` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_AVPHYS_PAGES` | Linux, OpenBSD, Solaris/Illumos | -| `SC_NPROCESSORS_CONF` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_NPROCESSORS_ONLN` | Linux, macOS, FreeBSD, NetBSD, OpenBSD, Solaris/Illumos | -| `SC_UIO_MAXIOV` | Linux | - -## Usage - -```Go -package main - -import ( - "fmt" - - "github.com/tklauser/go-sysconf" -) - -func main() { - // get clock ticks, this will return the same as C.sysconf(C._SC_CLK_TCK) - clktck, err := sysconf.Sysconf(sysconf.SC_CLK_TCK) - if err == nil { - fmt.Printf("SC_CLK_TCK: %v\n", clktck) - } -} -``` - -## References - -* [POSIX documenation for `sysconf`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html) -* [Linux manpage for `sysconf(3)`](http://man7.org/linux/man-pages/man3/sysconf.3.html) -* [glibc constants for `sysconf` parameters](https://www.gnu.org/software/libc/manual/html_node/Constants-for-Sysconf.html) diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf.go b/vendor/github.com/tklauser/go-sysconf/sysconf.go deleted file mode 100644 index 9d674930e5..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package sysconf implements the sysconf(3) function and provides the -// associated SC_* constants to query system configuration values. -package sysconf - -import "errors" - -//go:generate go run mksysconf.go - -var errInvalid = errors.New("invalid parameter value") - -// Sysconf returns the value of a sysconf(3) runtime system parameter. -// The name parameter should be a SC_* constant define in this package. The -// implementation is GOOS-specific and certain SC_* constants might not be -// defined for all GOOSes. -func Sysconf(name int) (int64, error) { - return sysconf(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go deleted file mode 100644 index ec81c02ac8..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_bsd.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || netbsd || openbsd - -package sysconf - -import "golang.org/x/sys/unix" - -func pathconf(path string, name int) int64 { - if val, err := unix.Pathconf(path, name); err == nil { - return int64(val) - } - return -1 -} - -func sysctl32(name string) int64 { - if val, err := unix.SysctlUint32(name); err == nil { - return int64(val) - } - return -1 -} - -func sysctl64(name string) int64 { - if val, err := unix.SysctlUint64(name); err == nil { - return int64(val) - } - return -1 -} - -func yesno(val int64) int64 { - if val == 0 { - return -1 - } - return val -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go b/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go deleted file mode 100644 index b471ec1044..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_darwin.go +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "strconv" - "strings" - "sync" - - "golang.org/x/sys/unix" -) - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS - - // _PTHREAD_STACK_MIN changed in macOS 14 - _PTHREAD_STACK_MIN_LT_MACOS14 = 0x2000 - _PTHREAD_STACK_MIN_GE_MACOS14 = 0x4000 -) - -var uname struct { - sync.Once - macOSMajor int -} - -func getMacOSMajor() int { - uname.Once.Do(func() { - var u unix.Utsname - err := unix.Uname(&u) - if err != nil { - return - } - rel := unix.ByteSliceToString(u.Release[:]) - ver := strings.Split(rel, ".") - maj, _ := strconv.Atoi(ver[0]) - uname.macOSMajor = maj - }) - return uname.macOSMajor -} - -// sysconf implements sysconf(4) as in the Darwin libc (derived from the FreeBSD -// libc), version 1534.81.1. -// See https://github.com/apple-oss-distributions/Libc/tree/Libc-1534.81.1. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - fallthrough - case SC_AIO_MAX: - return sysctl32("kern.aiomax"), nil - case SC_AIO_PRIO_DELTA_MAX: - return -1, nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _INT_MAX, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return -1, nil - case SC_GETGR_R_SIZE_MAX: - return 4096, nil - case SC_GETPW_R_SIZE_MAX: - return 4096, nil - case SC_IOV_MAX: - return _IOV_MAX, nil - case SC_MQ_OPEN_MAX: - return -1, nil - case SC_MQ_PRIO_MAX: - return -1, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX, SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil { - return -1, nil - } - if rlim.Cur > unix.RLIM_INFINITY { - return -1, nil - } - if rlim.Cur > _LONG_MAX { - return -1, unix.EOVERFLOW - } - return int64(rlim.Cur), nil - case SC_RTSIG_MAX: - return -1, nil - case SC_SEM_NSEMS_MAX: - return sysctl32("kern.sysv.semmns"), nil - case SC_SEM_VALUE_MAX: - return _POSIX_SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - if getMacOSMajor() < 23 { - return _PTHREAD_STACK_MIN_LT_MACOS14, nil - } - return _PTHREAD_STACK_MIN_GE_MACOS14, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - // should be _PATH_DEV instead of "/" - return pathconf("/", _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - if getMacOSMajor() < 22 { - return -1, nil - } - // macOS 13 (Ventura) and later - return 200112, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SS_REPL_MAX: - return _POSIX_SS_REPL_MAX, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TRACE_EVENT_FILTER: - return _POSIX_TRACE_EVENT_FILTER, nil - case SC_TRACE_EVENT_NAME_MAX: - return _POSIX_TRACE_EVENT_NAME_MAX, nil - case SC_TRACE_INHERIT: - return _POSIX_TRACE_INHERIT, nil - case SC_TRACE_LOG: - return _POSIX_TRACE_LOG, nil - case SC_TRACE_NAME_MAX: - return _POSIX_TRACE_NAME_MAX, nil - case SC_TRACE_SYS_MAX: - return _POSIX_TRACE_SYS_MAX, nil - case SC_TRACE_USER_EVENT_MAX: - return _POSIX_TRACE_USER_EVENT_MAX, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): darwin libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - case SC_V6_ILP32_OFF32: - if _V6_ILP32_OFF32 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofInt == unix.SizeofLong && - unix.SizeofLong == unix.SizeofPtr && - unix.SizeofPtr == sizeofOffT { - return 1, nil - } - return -1, nil - } - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - if _V6_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofInt == unix.SizeofLong && - unix.SizeofLong == unix.SizeofPtr && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - if _V6_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofLong == unix.SizeofPtr && - unix.SizeofPtr == sizeofOffT { - return 1, nil - } - return -1, nil - } - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - if _V6_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _V6_LPBIG_OFFBIG, nil - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_VERSION: - return _XOPEN_VERSION, nil - case SC_XOPEN_XCU_VERSION: - return _XOPEN_XCU_VERSION, nil - - case SC_PHYS_PAGES: - return sysctl64("hw.memsize") / int64(unix.Getpagesize()), nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go b/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go deleted file mode 100644 index c2ed8d12b4..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_dragonfly.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS -) - -// sysconf implements sysconf(3) as in the FreeBSD 12 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return sysctl32("p1003_1b.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("p1003_1b.aio_max"), nil - case SC_AIO_PRIO_DELTA_MAX: - return sysctl32("p1003_1b.aio_prio_delta_max"), nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _ATEXIT_SIZE, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return yesno(sysctl32("p1003_1b.delaytimer_max")), nil - case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX: - return -1, nil - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_MQ_OPEN_MAX: - return sysctl32("kern.mqueue.mq_open_max"), nil - case SC_MQ_PRIO_MAX: - return sysctl32("kern.mqueue.mq_prio_max"), nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_RTSIG_MAX: - return yesno(sysctl32("p1003_1b.rtsig_max")), nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return -1, nil - case SC_SIGQUEUE_MAX: - return yesno(sysctl32("p1003_1b.sigqueue_max")), nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return yesno(sysctl32("p1003_1b.timer_max")), nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_ASYNCHRONOUS_IO: - if _POSIX_ASYNCHRONOUS_IO == 0 { - return sysctl64("p1003_1b.asynchronous_io"), nil - } - return _POSIX_ASYNCHRONOUS_IO, nil - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - /* TODO(tk): these need GOARCH-dependent integer size checks - case SC_V6_ILP32_OFF32: - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _V6_LPBIG_OFFBIG, nil - */ - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - - case SC_PHYS_PAGES: - return sysctl64("hw.availpages"), nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go deleted file mode 100644 index b7939888ae..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_freebsd.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - 1 - _LOGIN_NAME_MAX = _MAXLOGNAME - _SYMLOOP_MAX = _MAXSYMLINKS -) - -// sysconf implements sysconf(3) as in the FreeBSD 12 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return sysctl32("p1003_1b.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("p1003_1b.aio_max"), nil - case SC_AIO_PRIO_DELTA_MAX: - return sysctl32("p1003_1b.aio_prio_delta_max"), nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return _ATEXIT_SIZE, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return sysctl32("p1003_1b.delaytimer_max"), nil - case SC_GETGR_R_SIZE_MAX, SC_GETPW_R_SIZE_MAX: - return -1, nil - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_MQ_OPEN_MAX: - return yesno(sysctl32("p1003_1b.mq_open_max")), nil - case SC_MQ_PRIO_MAX: - return _MQ_PRIO_MAX, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return rlim.Cur, nil - } - } - return -1, nil - case SC_RTSIG_MAX: - return sysctl32("p1003_1b.rtsig_max"), nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return sysctl32("p1003_1b.sigqueue_max"), nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err != nil { - return -1, nil - } - if rlim.Cur == unix.RLIM_INFINITY { - return -1, nil - } - if rlim.Cur > _LONG_MAX { - return -1, unix.EOVERFLOW - } - if rlim.Cur > _SHRT_MAX { - return _SHRT_MAX, nil - } - return rlim.Cur, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return yesno(sysctl32("p1003_1b.timer_max")), nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TZNAME_MAX: - return pathconf(_PATH_ZONEINFO, _PC_NAME_MAX), nil - - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_MESSAGE_PASSING: - if _POSIX_MESSAGE_PASSING == 0 { - return yesno(sysctl32("p1003_1b.message_passing")), nil - } - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - if _POSIX_PRIORITIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.prioritized_io")), nil - } - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - if _POSIX_PRIORITY_SCHEDULING == 0 { - return yesno(sysctl32("p1003_1b.priority_scheduling")), nil - } - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_REALTIME_SIGNALS: - if _POSIX_REALTIME_SIGNALS == 0 { - return yesno(sysctl32("p1003_1b.realtime_signals")), nil - } - return _POSIX_REALTIME_SIGNALS, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_SEMAPHORES: - if _POSIX_SEMAPHORES == 0 { - return yesno(sysctl32("p1003_1b.semaphores")), nil - } - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - if _POSIX_SYNCHRONIZED_IO == 0 { - return yesno(sysctl32("p1003_1b.synchronized_io")), nil - } - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_TIMERS: - if _POSIX_TIMERS == 0 { - return yesno(sysctl32("p1003_1b.timers")), nil - } - return _POSIX_TIMERS, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - case SC_VERSION: - // TODO(tk): FreeBSD libc uses sysctl(CTL_KERN, KERN_POSIX1) - return _POSIX_VERSION, nil - - /* TODO(tk): these need GOARCH-dependent integer size checks - case SC_V6_ILP32_OFF32: - return _V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _V6_LPBIG_OFFBIG, nil - */ - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - - case SC_PHYS_PAGES: - if val, err := unix.SysctlUint64("hw.availpages"); err == nil { - return int64(val), nil - } - return -1, nil - case SC_NPROCESSORS_CONF: - fallthrough - case SC_NPROCESSORS_ONLN: - if val, err := unix.SysctlUint32("hw.ncpu"); err == nil { - return int64(val), nil - } - return -1, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go b/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go deleted file mode 100644 index 7dcc6f4cab..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_generic.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd - -package sysconf - -import "os" - -func sysconfGeneric(name int) (int64, error) { - // POSIX default values - if sc, err := sysconfPOSIX(name); err == nil { - return sc, nil - } - - switch name { - case SC_BC_BASE_MAX: - return _BC_BASE_MAX, nil - case SC_BC_DIM_MAX: - return _BC_DIM_MAX, nil - case SC_BC_SCALE_MAX: - return _BC_SCALE_MAX, nil - case SC_BC_STRING_MAX: - return _BC_STRING_MAX, nil - case SC_COLL_WEIGHTS_MAX: - return _COLL_WEIGHTS_MAX, nil - case SC_EXPR_NEST_MAX: - return _EXPR_NEST_MAX, nil - case SC_HOST_NAME_MAX: - return _HOST_NAME_MAX, nil - case SC_LINE_MAX: - return _LINE_MAX, nil - case SC_LOGIN_NAME_MAX: - return _LOGIN_NAME_MAX, nil - case SC_PAGESIZE: // same as SC_PAGE_SIZE - return int64(os.Getpagesize()), nil - case SC_RE_DUP_MAX: - return _RE_DUP_MAX, nil - case SC_SYMLOOP_MAX: - return _SYMLOOP_MAX, nil - } - - return -1, errInvalid -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go b/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go deleted file mode 100644 index 9af70070e2..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_linux.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "bufio" - "os" - "runtime" - "strconv" - "strings" - - "github.com/tklauser/numcpus" - "golang.org/x/sys/unix" -) - -const ( - // CLK_TCK is a constant on Linux for all architectures except alpha and ia64. - // See e.g. - // https://git.musl-libc.org/cgit/musl/tree/src/conf/sysconf.c#n30 - // https://github.com/containerd/cgroups/pull/12 - // https://lore.kernel.org/lkml/agtlq6$iht$1@penguin.transmeta.com/ - _SYSTEM_CLK_TCK = 100 -) - -func readProcFsInt64(path string, fallback int64) int64 { - data, err := os.ReadFile(path) - if err != nil { - return fallback - } - i, err := strconv.ParseInt(string(data[:len(data)-1]), 0, 64) - if err != nil { - return fallback - } - return i -} - -// getMemPages computes mem*unit/os.Getpagesize(), but avoids overflowing int64. -func getMemPages(mem uint64, unit uint32) int64 { - pageSize := os.Getpagesize() - for unit > 1 && pageSize > 1 { - unit >>= 1 - pageSize >>= 1 - } - mem *= uint64(unit) - for pageSize > 1 { - pageSize >>= 1 - mem >>= 1 - } - return int64(mem) -} - -func getPhysPages() int64 { - var si unix.Sysinfo_t - err := unix.Sysinfo(&si) - if err != nil { - return int64(0) - } - return getMemPages(uint64(si.Totalram), si.Unit) -} - -func getAvPhysPages() int64 { - var si unix.Sysinfo_t - err := unix.Sysinfo(&si) - if err != nil { - return int64(0) - } - return getMemPages(uint64(si.Freeram), si.Unit) -} - -func getNprocsSysfs() (int64, error) { - n, err := numcpus.GetOnline() - return int64(n), err -} - -func getNprocsProcStat() (int64, error) { - f, err := os.Open("/proc/stat") - if err != nil { - return -1, err - } - defer f.Close() - - count := int64(0) - s := bufio.NewScanner(f) - for s.Scan() { - if line := strings.TrimSpace(s.Text()); strings.HasPrefix(line, "cpu") { - cpu, _, found := strings.Cut(line, " ") - if found { - // skip first line with accumulated values - if cpu == "cpu" { - continue - } - _, err := strconv.ParseInt(cpu[len("cpu"):], 10, 64) - if err == nil { - count++ - } - } - } else { - // The current format of /proc/stat has all the - // cpu* lines at the beginning. Assume this - // stays this way. - break - } - } - if err := s.Err(); err != nil { - return -1, err - } - return count, nil -} - -func getNprocs() int64 { - count, err := getNprocsSysfs() - if err == nil { - return count - } - - count, err = getNprocsProcStat() - if err == nil { - return count - } - - // default to the value determined at runtime startup if all else fails - return int64(runtime.NumCPU()) -} - -func getNprocsConf() int64 { - count, err := numcpus.GetConfigured() - if err == nil { - return int64(count) - } - - // TODO(tk): fall back to reading /proc/cpuinfo on legacy systems - // without sysfs? - - return getNprocs() -} - -func hasClock(clockid int32) bool { - var res unix.Timespec - if err := unix.ClockGetres(clockid, &res); err != nil { - return false - } - return true -} - -func max(a, b int64) int64 { - if a > b { - return a - } - return b -} - -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX: - return -1, nil - case SC_AIO_MAX: - return -1, nil - case SC_AIO_PRIO_DELTA_MAX: - return _AIO_PRIO_DELTA_MAX, nil - case SC_ARG_MAX: - argMax := int64(_POSIX_ARG_MAX) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_STACK, &rlim); err == nil { - argMax = max(argMax, int64(rlim.Cur/4)) - } - return argMax, nil - case SC_ATEXIT_MAX: - return _INT_MAX, nil - case SC_CHILD_MAX: - childMax := int64(-1) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil && rlim.Cur != unix.RLIM_INFINITY { - childMax = int64(rlim.Cur) - } - return childMax, nil - case SC_CLK_TCK: - return _SYSTEM_CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return _DELAYTIMER_MAX, nil - case SC_GETGR_R_SIZE_MAX: - return _NSS_BUFLEN_GROUP, nil - case SC_GETPW_R_SIZE_MAX: - return _NSS_BUFLEN_PASSWD, nil - case SC_MQ_OPEN_MAX: - return -1, nil - case SC_MQ_PRIO_MAX: - return _MQ_PRIO_MAX, nil - case SC_NGROUPS_MAX: - return readProcFsInt64("/proc/sys/kernel/ngroups_max", _NGROUPS_MAX), nil - case SC_OPEN_MAX: - openMax := int64(_OPEN_MAX) - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - openMax = int64(rlim.Cur) - } - return openMax, nil - case SC_RTSIG_MAX: - return _RTSIG_MAX, nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_SIGPENDING, &rlim); err == nil { - return int64(rlim.Cur), nil - } - return readProcFsInt64("/proc/sys/kernel/rtsig-max", _POSIX_SIGQUEUE_MAX), nil - case SC_STREAM_MAX: - return _STREAM_MAX, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - return _TTY_NAME_MAX, nil - case SC_TZNAME_MAX: - return -1, nil - - case SC_CPUTIME: - if hasClock(unix.CLOCK_PROCESS_CPUTIME_ID) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_MONOTONIC_CLOCK: - if hasClock(unix.CLOCK_MONOTONIC) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_SAVED_IDS: - return _POSIX_SAVED_IDS, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - if hasClock(unix.CLOCK_THREAD_CPUTIME_ID) { - return _POSIX_VERSION, nil - } - return -1, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_TRACE: - return _POSIX_TRACE, nil - case SC_TRACE_EVENT_FILTER: - return _POSIX_TRACE_EVENT_FILTER, nil - case SC_TRACE_EVENT_NAME_MAX: - return -1, nil - case SC_TRACE_INHERIT: - return _POSIX_TRACE_INHERIT, nil - case SC_TRACE_LOG: - return _POSIX_TRACE_LOG, nil - case SC_TRACE_NAME_MAX: - return -1, nil - case SC_TRACE_SYS_MAX: - return -1, nil - case SC_TRACE_USER_EVENT_MAX: - return -1, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - - case SC_V7_ILP32_OFF32: - return _POSIX_V7_ILP32_OFF32, nil - case SC_V7_ILP32_OFFBIG: - return _POSIX_V7_ILP32_OFFBIG, nil - case SC_V7_LP64_OFF64: - return _POSIX_V7_LP64_OFF64, nil - case SC_V7_LPBIG_OFFBIG: - return _POSIX_V7_LPBIG_OFFBIG, nil - - case SC_V6_ILP32_OFF32: - return _POSIX_V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - return _POSIX_V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - return _POSIX_V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - return _POSIX_V6_LPBIG_OFFBIG, nil - - case SC_2_C_VERSION: - return _POSIX2_C_VERSION, nil - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return -1, nil - case SC_2_UPE: - return -1, nil - - case SC_XOPEN_CRYPT: - // removed in glibc 2.28 - return -1, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return -1, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_VERSION: - return _XOPEN_VERSION, nil - case SC_XOPEN_XCU_VERSION: - return _XOPEN_XCU_VERSION, nil - - case SC_PHYS_PAGES: - return getPhysPages(), nil - case SC_AVPHYS_PAGES: - return getAvPhysPages(), nil - case SC_NPROCESSORS_CONF: - return getNprocsConf(), nil - case SC_NPROCESSORS_ONLN: - return getNprocs(), nil - case SC_UIO_MAXIOV: // same as _SC_IOV_MAX - return _UIO_MAXIOV, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go deleted file mode 100644 index 40f6c345fc..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_netbsd.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import ( - "sync" - - "golang.org/x/sys/unix" -) - -const ( - _HOST_NAME_MAX = _MAXHOSTNAMELEN - _LOGIN_NAME_MAX = _MAXLOGNAME + 1 - _SYMLOOP_MAX = _MAXSYMLINKS - - _POSIX2_C_BIND = 1 - _POSIX2_C_DEV = -1 - _POSIX2_CHAR_TERM = -1 - _POSIX2_FORT_DEV = -1 - _POSIX2_FORT_RUN = -1 - _POSIX2_LOCALEDEF = -1 - _POSIX2_SW_DEV = -1 - _POSIX2_UPE = -1 -) - -var clktck struct { - sync.Once - v int64 -} - -func sysconfPOSIX(name int) (int64, error) { - // NetBSD does not define all _POSIX_* values used in sysconf_posix.go - // The supported ones are handled in sysconf below. - return -1, errInvalid -} - -func sysconf(name int) (int64, error) { - // NetBSD uses sysctl to get some of these values. For the user.* namespace, - // calls get handled by user_sysctl in /usr/src/lib/libc/gen/sysctl.c - // Duplicate the relevant values here. - - switch name { - // 1003.1 - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - // TODO: use sync.OnceValue once Go 1.21 is the minimal supported version - clktck.Do(func() { - clktck.v = -1 - if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil { - clktck.v = int64(ci.Hz) - } - }) - return clktck.v, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_JOB_CONTROL: - return sysctl32("kern.job_control"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - return int64(rlim.Cur), nil - } - return -1, nil - case SC_STREAM_MAX: - // sysctl("user.stream_max") - return _FOPEN_MAX, nil - case SC_TZNAME_MAX: - // sysctl("user.tzname_max") - return _NAME_MAX, nil - case SC_SAVED_IDS: - return yesno(sysctl32("kern.saved_ids")), nil - case SC_VERSION: - return sysctl32("kern.posix1version"), nil - - // 1003.1b - case SC_FSYNC: - return sysctl32("kern.fsync"), nil - case SC_SYNCHRONIZED_IO: - return sysctl32("kern.synchronized_io"), nil - case SC_MAPPED_FILES: - return sysctl32("kern.mapped_files"), nil - case SC_MEMLOCK: - return sysctl32("kern.memlock"), nil - case SC_MEMLOCK_RANGE: - return sysctl32("kern.memlock_range"), nil - case SC_MEMORY_PROTECTION: - return sysctl32("kern.memory_protection"), nil - case SC_MONOTONIC_CLOCK: - return sysctl32("kern.monotonic_clock"), nil - case SC_SEMAPHORES: - return sysctl32("kern.posix_semaphores"), nil - case SC_TIMERS: - return sysctl32("kern.posix_timers"), nil - - // 1003.1c - case SC_LOGIN_NAME_MAX: - return sysctl32("kern.login_name_max"), nil - case SC_THREADS: - return sysctl32("kern.posix_threads"), nil - - // 1003.1j - case SC_BARRIERS: - return yesno(sysctl32("kern.posix_barriers")), nil - case SC_SPIN_LOCKS: - return yesno(sysctl32("kern.posix_spin_locks")), nil - case SC_READER_WRITER_LOCKS: - return yesno(sysctl32("kern.posix_reader_writer_locks")), nil - - // 1003.2 - case SC_2_VERSION: - // sysctl user.posix2_version - return _POSIX2_VERSION, nil - case SC_2_C_BIND: - // sysctl user.posix2_c_bind - return _POSIX2_C_BIND, nil - case SC_2_C_DEV: - // sysctl user.posix2_c_dev - return _POSIX2_C_DEV, nil - case SC_2_CHAR_TERM: - // sysctl user.posix2_char_term - return _POSIX2_CHAR_TERM, nil - case SC_2_FORT_DEV: - // sysctl user.posix2_fort_dev - return _POSIX2_FORT_DEV, nil - case SC_2_FORT_RUN: - // sysctl user.posix2_fort_run - return _POSIX2_FORT_RUN, nil - case SC_2_LOCALEDEF: - // sysctl user.posix2_localedef - return _POSIX2_LOCALEDEF, nil - case SC_2_SW_DEV: - // sysctl user.posix2_sw_dev - return _POSIX2_SW_DEV, nil - case SC_2_UPE: - // sysctl user.posix2_upe - return _POSIX2_UPE, nil - - // XPG 4.2 - case SC_IOV_MAX: - return sysctl32("kern.iov_max"), nil - case SC_XOPEN_SHM: - return yesno(sysctl32("kern.ipc.sysvshm")), nil - - // 1003.1-2001, XSI Option Group - case SC_AIO_LISTIO_MAX: - return sysctl32("kern.aio_listio_max"), nil - case SC_AIO_MAX: - return sysctl32("kern.aio_max"), nil - case SC_ASYNCHRONOUS_IO: - return yesno(sysctl32("kern.posix_aio")), nil - case SC_MESSAGE_PASSING: - return yesno(sysctl32("kern.posix_msg")), nil - case SC_MQ_OPEN_MAX: - return sysctl32("kern.mqueue.mq_open_max"), nil - case SC_MQ_PRIO_MAX: - return sysctl32("kern.mqueue.mq_prio_max"), nil - case SC_PRIORITY_SCHEDULING: - return yesno(sysctl32("kern.posix_sched")), nil - case SC_ATEXIT_MAX: - // sysctl("user.atexit_max") - return -1, nil // TODO - - // 1003.1-2001, TSF - case SC_GETGR_R_SIZE_MAX: - return _GETGR_R_SIZE_MAX, nil - case SC_GETPW_R_SIZE_MAX: - return _GETPW_R_SIZE_MAX, nil - - // Unsorted - case SC_HOST_NAME_MAX: - return _MAXHOSTNAMELEN, nil - case SC_PASS_MAX: - return _PASSWORD_LEN, nil - case SC_REGEXP: - return _POSIX_REGEXP, nil - case SC_SHARED_MEMORY_OBJECTS: - return _POSIX_SHARED_MEMORY_OBJECTS, nil - case SC_SHELL: - return _POSIX_SHELL, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - - // Extensions - case SC_NPROCESSORS_CONF: - return sysctl32("hw.ncpu"), nil - case SC_NPROCESSORS_ONLN: - return sysctl32("hw.ncpuonline"), nil - - // Linux/Solaris - case SC_PHYS_PAGES: - return sysctl64("hw.physmem64") / int64(unix.Getpagesize()), nil - - // Native - case SC_SCHED_RT_TS: - return sysctl32("kern.sched.rtts"), nil - case SC_SCHED_PRI_MIN: - return sysctl32("kern.sched.pri_min"), nil - case SC_SCHED_PRI_MAX: - return sysctl32("kern.sched.pri_max"), nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _POSIX_THREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _POSIX_THREAD_KEYS_MAX, nil - case SC_THREAD_STACK_MIN: - return int64(unix.Getpagesize()), nil - case SC_THREAD_THREADS_MAX: - return sysctl32("kern.maxproc"), nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_PRIORITY_SCHEDULING, - SC_THREAD_PRIO_INHERIT, - SC_THREAD_PROCESS_SHARED: - return -1, nil - case SC_TTY_NAME_MAX: - return pathconf(_PATH_DEV, _PC_NAME_MAX), nil - case SC_TIMER_MAX: - return _POSIX_TIMER_MAX, nil - case SC_SEM_NSEMS_MAX: - return _LONG_MAX, nil - case SC_CPUTIME: - return _POSIX_CPUTIME, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_DELAYTIMER_MAX: - return _POSIX_DELAYTIMER_MAX, nil - case SC_SIGQUEUE_MAX: - return _POSIX_SIGQUEUE_MAX, nil - case SC_REALTIME_SIGNALS: - return 200112, nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go b/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go deleted file mode 100644 index c0c394abe4..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_openbsd.go +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -// sysconf implements sysconf(3) as in the OpenBSD 6.3 libc. -func sysconf(name int) (int64, error) { - switch name { - case SC_AIO_LISTIO_MAX, - SC_AIO_MAX, - SC_AIO_PRIO_DELTA_MAX: - return -1, nil - case SC_ARG_MAX: - return sysctl32("kern.argmax"), nil - case SC_ATEXIT_MAX: - return -1, nil - case SC_CHILD_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NPROC, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_CLK_TCK: - return _CLK_TCK, nil - case SC_DELAYTIMER_MAX: - return -1, nil - case SC_GETGR_R_SIZE_MAX: - return _GR_BUF_LEN, nil - case SC_GETPW_R_SIZE_MAX: - return _PW_BUF_LEN, nil - case SC_IOV_MAX: - return _IOV_MAX, nil - case SC_LOGIN_NAME_MAX: - return _LOGIN_NAME_MAX, nil - case SC_NGROUPS_MAX: - return sysctl32("kern.ngroups"), nil - case SC_OPEN_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_SEM_NSEMS_MAX: - return -1, nil - case SC_SEM_VALUE_MAX: - return _SEM_VALUE_MAX, nil - case SC_SIGQUEUE_MAX: - return -1, nil - case SC_STREAM_MAX: - var rlim unix.Rlimit - if err := unix.Getrlimit(unix.RLIMIT_NOFILE, &rlim); err == nil { - if rlim.Cur != unix.RLIM_INFINITY { - if rlim.Cur > _SHRT_MAX { - return _SHRT_MAX, nil - } - return int64(rlim.Cur), nil - } - } - return -1, nil - case SC_THREAD_DESTRUCTOR_ITERATIONS: - return _PTHREAD_DESTRUCTOR_ITERATIONS, nil - case SC_THREAD_KEYS_MAX: - return _PTHREAD_KEYS_MAX, nil - case SC_THREAD_STACK_MIN: - return _PTHREAD_STACK_MIN, nil - case SC_THREAD_THREADS_MAX: - return -1, nil - case SC_TIMER_MAX: - return -1, nil - case SC_TTY_NAME_MAX: - return _TTY_NAME_MAX, nil - case SC_TZNAME_MAX: - return _NAME_MAX, nil - - case SC_BARRIERS: - return _POSIX_BARRIERS, nil - case SC_FSYNC: - return _POSIX_FSYNC, nil - case SC_IPV6: - if _POSIX_IPV6 == 0 { - fd, err := unix.Socket(unix.AF_INET6, unix.SOCK_DGRAM, 0) - if err == nil && fd >= 0 { - unix.Close(fd) - return int64(200112), nil - } - return 0, nil - } - return _POSIX_IPV6, nil - case SC_JOB_CONTROL: - return _POSIX_JOB_CONTROL, nil - case SC_MAPPED_FILES: - return _POSIX_MAPPED_FILES, nil - case SC_MONOTONIC_CLOCK: - return _POSIX_MONOTONIC_CLOCK, nil - case SC_SAVED_IDS: - return _POSIX_SAVED_IDS, nil - case SC_SEMAPHORES: - return _POSIX_SEMAPHORES, nil - case SC_SPAWN: - return _POSIX_SPAWN, nil - case SC_SPIN_LOCKS: - return _POSIX_SPIN_LOCKS, nil - case SC_SPORADIC_SERVER: - return _POSIX_SPORADIC_SERVER, nil - case SC_SYNCHRONIZED_IO: - return _POSIX_SYNCHRONIZED_IO, nil - case SC_THREAD_ATTR_STACKADDR: - return _POSIX_THREAD_ATTR_STACKADDR, nil - case SC_THREAD_ATTR_STACKSIZE: - return _POSIX_THREAD_ATTR_STACKSIZE, nil - case SC_THREAD_CPUTIME: - return _POSIX_THREAD_CPUTIME, nil - case SC_THREAD_PRIO_INHERIT: - return _POSIX_THREAD_PRIO_INHERIT, nil - case SC_THREAD_PRIO_PROTECT: - return _POSIX_THREAD_PRIO_PROTECT, nil - case SC_THREAD_PRIORITY_SCHEDULING: - return _POSIX_THREAD_PRIORITY_SCHEDULING, nil - case SC_THREAD_PROCESS_SHARED: - return _POSIX_THREAD_PROCESS_SHARED, nil - case SC_THREAD_ROBUST_PRIO_INHERIT: - return _POSIX_THREAD_ROBUST_PRIO_INHERIT, nil - case SC_THREAD_ROBUST_PRIO_PROTECT: - return _POSIX_THREAD_ROBUST_PRIO_PROTECT, nil - case SC_THREAD_SAFE_FUNCTIONS: - return _POSIX_THREAD_SAFE_FUNCTIONS, nil - case SC_THREAD_SPORADIC_SERVER: - return _POSIX_THREAD_SPORADIC_SERVER, nil - case SC_THREADS: - return _POSIX_THREADS, nil - case SC_TIMEOUTS: - return _POSIX_TIMEOUTS, nil - case SC_TIMERS: - return _POSIX_TIMERS, nil - case SC_TRACE, - SC_TRACE_EVENT_FILTER, - SC_TRACE_EVENT_NAME_MAX, - SC_TRACE_INHERIT, - SC_TRACE_LOG: - return _POSIX_TRACE, nil - case SC_TYPED_MEMORY_OBJECTS: - return _POSIX_TYPED_MEMORY_OBJECTS, nil - - case SC_V7_ILP32_OFF32: - return _POSIX_V7_ILP32_OFF32, nil - case SC_V7_ILP32_OFFBIG: - if _POSIX_V7_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 32 && - unix.SizeofPtr*_CHAR_BIT == 32 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_ILP32_OFFBIG, nil - case SC_V7_LP64_OFF64: - if _POSIX_V7_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofPtr*_CHAR_BIT == 64 && - sizeofOffT*_CHAR_BIT == 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_LP64_OFF64, nil - case SC_V7_LPBIG_OFFBIG: - if _POSIX_V7_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V7_LPBIG_OFFBIG, nil - - case SC_V6_ILP32_OFF32: - return _POSIX_V6_ILP32_OFF32, nil - case SC_V6_ILP32_OFFBIG: - if _POSIX_V6_ILP32_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 32 && - unix.SizeofPtr*_CHAR_BIT == 32 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_ILP32_OFFBIG, nil - case SC_V6_LP64_OFF64: - if _POSIX_V6_LP64_OFF64 == 0 { - if unix.SizeofInt*_CHAR_BIT == 32 && - unix.SizeofLong*_CHAR_BIT == 64 && - unix.SizeofPtr*_CHAR_BIT == 64 && - sizeofOffT*_CHAR_BIT == 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_LP64_OFF64, nil - case SC_V6_LPBIG_OFFBIG: - if _POSIX_V6_LPBIG_OFFBIG == 0 { - if unix.SizeofInt*_CHAR_BIT >= 32 && - unix.SizeofLong*_CHAR_BIT >= 64 && - unix.SizeofPtr*_CHAR_BIT >= 64 && - sizeofOffT*_CHAR_BIT >= 64 { - return 1, nil - } - return -1, nil - } - return _POSIX_V6_LPBIG_OFFBIG, nil - - case SC_2_CHAR_TERM: - return _POSIX2_CHAR_TERM, nil - case SC_2_PBS, - SC_2_PBS_ACCOUNTING, - SC_2_PBS_CHECKPOINT, - SC_2_PBS_LOCATE, - SC_2_PBS_MESSAGE, - SC_2_PBS_TRACK: - return _POSIX2_PBS, nil - case SC_2_UPE: - return _POSIX2_UPE, nil - case SC_2_VERSION: - return _POSIX2_VERSION, nil - - case SC_XOPEN_CRYPT: - return _XOPEN_CRYPT, nil - case SC_XOPEN_ENH_I18N: - return _XOPEN_ENH_I18N, nil - case SC_XOPEN_REALTIME: - return _XOPEN_REALTIME, nil - case SC_XOPEN_REALTIME_THREADS: - return _XOPEN_REALTIME_THREADS, nil - case SC_XOPEN_SHM: - return _XOPEN_SHM, nil - case SC_XOPEN_STREAMS: - return _XOPEN_STREAMS, nil - case SC_XOPEN_UNIX: - return _XOPEN_UNIX, nil - case SC_XOPEN_UUCP: - return _XOPEN_UUCP, nil - - case SC_AVPHYS_PAGES: - if uvm, err := unix.SysctlUvmexp("vm.uvmexp"); err == nil { - return int64(uvm.Free), nil - } - return -1, nil - case SC_PHYS_PAGES: - return sysctl64("hw.physmem") / int64(unix.Getpagesize()), nil - case SC_NPROCESSORS_CONF: - return sysctl32("hw.ncpu"), nil - case SC_NPROCESSORS_ONLN: - if val, err := unix.SysctlUint32("hw.ncpuonline"); err == nil { - return int64(val), nil - } - return sysctl32("hw.ncpu"), nil - } - - return sysconfGeneric(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go b/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go deleted file mode 100644 index 830d8220b5..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_posix.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2018 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || linux || openbsd - -package sysconf - -func sysconfPOSIX(name int) (int64, error) { - switch name { - case SC_ADVISORY_INFO: - return _POSIX_ADVISORY_INFO, nil - case SC_ASYNCHRONOUS_IO: - return _POSIX_ASYNCHRONOUS_IO, nil - case SC_BARRIERS: - return _POSIX_BARRIERS, nil - case SC_CLOCK_SELECTION: - return _POSIX_CLOCK_SELECTION, nil - case SC_CPUTIME: - return _POSIX_CPUTIME, nil - case SC_FSYNC: - return _POSIX_FSYNC, nil - case SC_IPV6: - return _POSIX_IPV6, nil - case SC_JOB_CONTROL: - return _POSIX_JOB_CONTROL, nil - case SC_MAPPED_FILES: - return _POSIX_MAPPED_FILES, nil - case SC_MEMLOCK: - return _POSIX_MEMLOCK, nil - case SC_MEMLOCK_RANGE: - return _POSIX_MEMLOCK_RANGE, nil - case SC_MONOTONIC_CLOCK: - return _POSIX_MONOTONIC_CLOCK, nil - case SC_MEMORY_PROTECTION: - return _POSIX_MEMORY_PROTECTION, nil - case SC_MESSAGE_PASSING: - return _POSIX_MESSAGE_PASSING, nil - case SC_PRIORITIZED_IO: - return _POSIX_PRIORITIZED_IO, nil - case SC_PRIORITY_SCHEDULING: - return _POSIX_PRIORITY_SCHEDULING, nil - case SC_RAW_SOCKETS: - return _POSIX_RAW_SOCKETS, nil - case SC_READER_WRITER_LOCKS: - return _POSIX_READER_WRITER_LOCKS, nil - case SC_REALTIME_SIGNALS: - return _POSIX_REALTIME_SIGNALS, nil - case SC_REGEXP: - return _POSIX_REGEXP, nil - case SC_SEMAPHORES: - return _POSIX_SEMAPHORES, nil - case SC_SHARED_MEMORY_OBJECTS: - return _POSIX_SHARED_MEMORY_OBJECTS, nil - case SC_SHELL: - return _POSIX_SHELL, nil - case SC_THREADS: - return _POSIX_THREADS, nil - case SC_TIMEOUTS: - return _POSIX_TIMEOUTS, nil - case SC_TIMERS: - return _POSIX_TIMERS, nil - case SC_VERSION: - return _POSIX_VERSION, nil - - case SC_2_C_BIND: - return _POSIX2_C_BIND, nil - case SC_2_C_DEV: - return _POSIX2_C_DEV, nil - case SC_2_FORT_DEV: - return -1, nil - case SC_2_FORT_RUN: - return -1, nil - case SC_2_LOCALEDEF: - return _POSIX2_LOCALEDEF, nil - case SC_2_SW_DEV: - return _POSIX2_SW_DEV, nil - case SC_2_VERSION: - return _POSIX2_VERSION, nil - } - return -1, errInvalid -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go b/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go deleted file mode 100644 index 443b21439d..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_solaris.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package sysconf - -import "golang.org/x/sys/unix" - -func sysconf(name int) (int64, error) { - if name < 0 { - return -1, errInvalid - } - return unix.Sysconf(name) -} diff --git a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go b/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go deleted file mode 100644 index 5aa9119db7..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/sysconf_unsupported.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2021 Tobias Klauser. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris - -package sysconf - -import ( - "fmt" - "runtime" -) - -func sysconf(name int) (int64, error) { - return -1, fmt.Errorf("unsupported on %s", runtime.GOOS) -} diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go deleted file mode 100644 index 80b64393bc..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_darwin.go +++ /dev/null @@ -1,252 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_darwin.go - -//go:build darwin - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x1d - SC_PAGESIZE = 0x1d - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x2f - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SS_REPL_MAX = 0x7e - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_EVENT_NAME_MAX = 0x7f - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TRACE_NAME_MAX = 0x80 - SC_TRACE_SYS_MAX = 0x81 - SC_TRACE_USER_EVENT_MAX = 0x82 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x79 - - SC_PHYS_PAGES = 0xc8 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _IOV_MAX = 0x400 - _LINE_MAX = 0x800 - _NAME_MAX = 0xff - _RE_DUP_MAX = 0xff - - _CLK_TCK = 0x64 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0xff - _MAXSYMLINKS = 0x20 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = -0x1 - _POSIX_BARRIERS = -0x1 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = -0x1 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x30db0 - _POSIX_JOB_CONTROL = 0x30db0 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = -0x1 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = -0x1 - _POSIX_MONOTONIC_CLOCK = -0x1 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = -0x1 - _POSIX_RAW_SOCKETS = -0x1 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = -0x1 - _POSIX_REGEXP = 0x30db0 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = -0x1 - _POSIX_SHARED_MEMORY_OBJECTS = -0x1 - _POSIX_SHELL = 0x30db0 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPIN_LOCKS = -0x1 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SS_REPL_MAX = 0x4 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = -0x1 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_INHERIT = -0x1 - _POSIX_THREAD_PRIO_PROTECT = -0x1 - _POSIX_THREAD_PRIORITY_SCHEDULING = -0x1 - _POSIX_THREAD_PROCESS_SHARED = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = -0x1 - _POSIX_TIMERS = -0x1 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_EVENT_NAME_MAX = 0x1e - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TRACE_NAME_MAX = 0x8 - _POSIX_TRACE_SYS_MAX = 0x8 - _POSIX_TRACE_USER_EVENT_MAX = 0x20 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = -0x1 - _V6_LP64_OFF64 = 0x1 - _V6_LPBIG_OFFBIG = 0x1 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = 0x30db0 - _POSIX2_CHAR_TERM = 0x30db0 - _POSIX2_LOCALEDEF = 0x30db0 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x30db0 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x30db0 - - _XOPEN_CRYPT = 0x1 - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x258 - _XOPEN_XCU_VERSION = 0x4 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x200 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) - -const ( - _CHAR_BIT = 0x8 - - _INT_MAX = 0x7fffffff - _LONG_MAX = 0x7fffffffffffffff - - sizeofOffT = 0x8 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go deleted file mode 100644 index dae56570c0..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_dragonfly.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_dragonfly.go - -//go:build dragonfly - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x2f - SC_PAGESIZE = 0x2f - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x1d - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x75 - - SC_PHYS_PAGES = 0x79 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xa - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - _RE_DUP_MAX = 0xff - - _CLK_TCK = 0x80 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x11 - _MAXSYMLINKS = 0x20 - _ATEXIT_SIZE = 0x20 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x0 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x30db0 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = 0x30db0 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x30db0 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_PRIO_INHERIT = 0x30db0 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_THREAD_PROCESS_SHARED = -0x1 - _POSIX_THREAD_SAFE_FUNCTIONS = -0x1 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TIMERS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = 0x0 - _V6_LP64_OFF64 = 0x0 - _V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_UPE = 0x31069 - _POSIX2_VERSION = 0x30a2c - - _XOPEN_CRYPT = -0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = -0x1 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x4000 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go deleted file mode 100644 index 068f8a7eda..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_freebsd.go +++ /dev/null @@ -1,228 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_freebsd.go - -//go:build freebsd - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x6b - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x2d - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x46 - SC_GETPW_R_SIZE_MAX = 0x47 - SC_HOST_NAME_MAX = 0x48 - SC_IOV_MAX = 0x38 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x49 - SC_MQ_OPEN_MAX = 0x2e - SC_MQ_PRIO_MAX = 0x4b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x2f - SC_PAGESIZE = 0x2f - SC_RE_DUP_MAX = 0x10 - SC_RTSIG_MAX = 0x30 - SC_SEM_NSEMS_MAX = 0x31 - SC_SEM_VALUE_MAX = 0x32 - SC_SIGQUEUE_MAX = 0x33 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x78 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x55 - SC_THREAD_KEYS_MAX = 0x56 - SC_THREAD_STACK_MIN = 0x5d - SC_THREAD_THREADS_MAX = 0x5e - SC_TIMER_MAX = 0x34 - SC_TTY_NAME_MAX = 0x65 - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x41 - SC_ASYNCHRONOUS_IO = 0x1c - SC_BARRIERS = 0x42 - SC_CLOCK_SELECTION = 0x43 - SC_CPUTIME = 0x44 - SC_FSYNC = 0x26 - SC_IPV6 = 0x76 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x1d - SC_MEMLOCK = 0x1e - SC_MEMLOCK_RANGE = 0x1f - SC_MEMORY_PROTECTION = 0x20 - SC_MESSAGE_PASSING = 0x21 - SC_MONOTONIC_CLOCK = 0x4a - SC_PRIORITIZED_IO = 0x22 - SC_PRIORITY_SCHEDULING = 0x23 - SC_RAW_SOCKETS = 0x77 - SC_READER_WRITER_LOCKS = 0x4c - SC_REALTIME_SIGNALS = 0x24 - SC_REGEXP = 0x4d - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x25 - SC_SHARED_MEMORY_OBJECTS = 0x27 - SC_SHELL = 0x4e - SC_SPAWN = 0x4f - SC_SPIN_LOCKS = 0x50 - SC_SPORADIC_SERVER = 0x51 - SC_SYNCHRONIZED_IO = 0x28 - SC_THREAD_ATTR_STACKADDR = 0x52 - SC_THREAD_ATTR_STACKSIZE = 0x53 - SC_THREAD_CPUTIME = 0x54 - SC_THREAD_PRIO_INHERIT = 0x57 - SC_THREAD_PRIO_PROTECT = 0x58 - SC_THREAD_PRIORITY_SCHEDULING = 0x59 - SC_THREAD_PROCESS_SHARED = 0x5a - SC_THREAD_SAFE_FUNCTIONS = 0x5b - SC_THREAD_SPORADIC_SERVER = 0x5c - SC_THREADS = 0x60 - SC_TIMEOUTS = 0x5f - SC_TIMERS = 0x29 - SC_TRACE = 0x61 - SC_TRACE_EVENT_FILTER = 0x62 - SC_TRACE_INHERIT = 0x63 - SC_TRACE_LOG = 0x64 - SC_TYPED_MEMORY_OBJECTS = 0x66 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x67 - SC_V6_ILP32_OFFBIG = 0x68 - SC_V6_LP64_OFF64 = 0x69 - SC_V6_LPBIG_OFFBIG = 0x6a - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x3b - SC_2_PBS_ACCOUNTING = 0x3c - SC_2_PBS_CHECKPOINT = 0x3d - SC_2_PBS_LOCATE = 0x3e - SC_2_PBS_MESSAGE = 0x3f - SC_2_PBS_TRACK = 0x40 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x6c - SC_XOPEN_ENH_I18N = 0x6d - SC_XOPEN_REALTIME = 0x6f - SC_XOPEN_REALTIME_THREADS = 0x70 - SC_XOPEN_SHM = 0x71 - SC_XOPEN_STREAMS = 0x72 - SC_XOPEN_UNIX = 0x73 - SC_XOPEN_VERSION = 0x74 - SC_XOPEN_XCU_VERSION = 0x75 - - SC_PHYS_PAGES = 0x79 - SC_NPROCESSORS_CONF = 0x39 - SC_NPROCESSORS_ONLN = 0x3a -) - -const ( - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xa - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - _MQ_PRIO_MAX = 0x40 - _RE_DUP_MAX = 0xff - _SEM_VALUE_MAX = 0x7fffffff - - _CLK_TCK = 0x80 - - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x21 - _MAXSYMLINKS = 0x20 - _ATEXIT_SIZE = 0x20 - - _POSIX_ADVISORY_INFO = 0x30db0 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x30db0 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x30db0 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = -0x1 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = 0x30db0 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = 0x0 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SEM_VALUE_MAX = 0x7fff - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x30db0 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_PRIO_INHERIT = 0x30db0 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_THREAD_PROCESS_SHARED = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TIMERS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x30db0 - - _V6_ILP32_OFF32 = -0x1 - _V6_ILP32_OFFBIG = 0x0 - _V6_LP64_OFF64 = 0x0 - _V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = -0x1 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = -0x1 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = -0x1 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x30a2c - - _XOPEN_CRYPT = -0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = -0x1 - - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x800 -) - -const ( - _PC_NAME_MAX = 0x4 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go deleted file mode 100644 index 12f289d76f..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_linux.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_linux.go - -//go:build linux - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x17 - SC_AIO_MAX = 0x18 - SC_AIO_PRIO_DELTA_MAX = 0x19 - SC_ARG_MAX = 0x0 - SC_ATEXIT_MAX = 0x57 - SC_BC_BASE_MAX = 0x24 - SC_BC_DIM_MAX = 0x25 - SC_BC_SCALE_MAX = 0x26 - SC_BC_STRING_MAX = 0x27 - SC_CHILD_MAX = 0x1 - SC_CLK_TCK = 0x2 - SC_COLL_WEIGHTS_MAX = 0x28 - SC_DELAYTIMER_MAX = 0x1a - SC_EXPR_NEST_MAX = 0x2a - SC_GETGR_R_SIZE_MAX = 0x45 - SC_GETPW_R_SIZE_MAX = 0x46 - SC_HOST_NAME_MAX = 0xb4 - SC_IOV_MAX = 0x3c - SC_LINE_MAX = 0x2b - SC_LOGIN_NAME_MAX = 0x47 - SC_MQ_OPEN_MAX = 0x1b - SC_MQ_PRIO_MAX = 0x1c - SC_NGROUPS_MAX = 0x3 - SC_OPEN_MAX = 0x4 - SC_PAGE_SIZE = 0x1e - SC_PAGESIZE = 0x1e - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x49 - SC_THREAD_KEYS_MAX = 0x4a - SC_THREAD_STACK_MIN = 0x4b - SC_THREAD_THREADS_MAX = 0x4c - SC_RE_DUP_MAX = 0x2c - SC_RTSIG_MAX = 0x1f - SC_SEM_NSEMS_MAX = 0x20 - SC_SEM_VALUE_MAX = 0x21 - SC_SIGQUEUE_MAX = 0x22 - SC_STREAM_MAX = 0x5 - SC_SYMLOOP_MAX = 0xad - SC_TIMER_MAX = 0x23 - SC_TTY_NAME_MAX = 0x48 - SC_TZNAME_MAX = 0x6 - - SC_ADVISORY_INFO = 0x84 - SC_ASYNCHRONOUS_IO = 0xc - SC_BARRIERS = 0x85 - SC_CLOCK_SELECTION = 0x89 - SC_CPUTIME = 0x8a - SC_FSYNC = 0xf - SC_IPV6 = 0xeb - SC_JOB_CONTROL = 0x7 - SC_MAPPED_FILES = 0x10 - SC_MEMLOCK = 0x11 - SC_MEMLOCK_RANGE = 0x12 - SC_MEMORY_PROTECTION = 0x13 - SC_MESSAGE_PASSING = 0x14 - SC_MONOTONIC_CLOCK = 0x95 - SC_PRIORITIZED_IO = 0xd - SC_PRIORITY_SCHEDULING = 0xa - SC_RAW_SOCKETS = 0xec - SC_READER_WRITER_LOCKS = 0x99 - SC_REALTIME_SIGNALS = 0x9 - SC_REGEXP = 0x9b - SC_SAVED_IDS = 0x8 - SC_SEMAPHORES = 0x15 - SC_SHARED_MEMORY_OBJECTS = 0x16 - SC_SHELL = 0x9d - SC_SPAWN = 0x9f - SC_SPIN_LOCKS = 0x9a - SC_SPORADIC_SERVER = 0xa0 - SC_SS_REPL_MAX = 0xf1 - SC_SYNCHRONIZED_IO = 0xe - SC_THREAD_ATTR_STACKADDR = 0x4d - SC_THREAD_ATTR_STACKSIZE = 0x4e - SC_THREAD_CPUTIME = 0x8b - SC_THREAD_PRIO_INHERIT = 0x50 - SC_THREAD_PRIO_PROTECT = 0x51 - SC_THREAD_PRIORITY_SCHEDULING = 0x4f - SC_THREAD_PROCESS_SHARED = 0x52 - SC_THREAD_ROBUST_PRIO_INHERIT = 0xf7 - SC_THREAD_ROBUST_PRIO_PROTECT = 0xf8 - SC_THREAD_SAFE_FUNCTIONS = 0x44 - SC_THREAD_SPORADIC_SERVER = 0xa1 - SC_THREADS = 0x43 - SC_TIMEOUTS = 0xa4 - SC_TIMERS = 0xb - SC_TRACE = 0xb5 - SC_TRACE_EVENT_FILTER = 0xb6 - SC_TRACE_EVENT_NAME_MAX = 0xf2 - SC_TRACE_INHERIT = 0xb7 - SC_TRACE_LOG = 0xb8 - SC_TRACE_NAME_MAX = 0xf3 - SC_TRACE_SYS_MAX = 0xf4 - SC_TRACE_USER_EVENT_MAX = 0xf5 - SC_TYPED_MEMORY_OBJECTS = 0xa5 - SC_VERSION = 0x1d - - SC_V7_ILP32_OFF32 = 0xed - SC_V7_ILP32_OFFBIG = 0xee - SC_V7_LP64_OFF64 = 0xef - SC_V7_LPBIG_OFFBIG = 0xf0 - - SC_V6_ILP32_OFF32 = 0xb0 - SC_V6_ILP32_OFFBIG = 0xb1 - SC_V6_LP64_OFF64 = 0xb2 - SC_V6_LPBIG_OFFBIG = 0xb3 - - SC_2_C_BIND = 0x2f - SC_2_C_DEV = 0x30 - SC_2_C_VERSION = 0x60 - SC_2_CHAR_TERM = 0x5f - SC_2_FORT_DEV = 0x31 - SC_2_FORT_RUN = 0x32 - SC_2_LOCALEDEF = 0x34 - SC_2_PBS = 0xa8 - SC_2_PBS_ACCOUNTING = 0xa9 - SC_2_PBS_CHECKPOINT = 0xaf - SC_2_PBS_LOCATE = 0xaa - SC_2_PBS_MESSAGE = 0xab - SC_2_PBS_TRACK = 0xac - SC_2_SW_DEV = 0x33 - SC_2_UPE = 0x61 - SC_2_VERSION = 0x2e - - SC_XOPEN_CRYPT = 0x5c - SC_XOPEN_ENH_I18N = 0x5d - SC_XOPEN_REALTIME = 0x82 - SC_XOPEN_REALTIME_THREADS = 0x83 - SC_XOPEN_SHM = 0x5e - SC_XOPEN_STREAMS = 0xf6 - SC_XOPEN_UNIX = 0x5b - SC_XOPEN_VERSION = 0x59 - SC_XOPEN_XCU_VERSION = 0x5a - - SC_PHYS_PAGES = 0x55 - SC_AVPHYS_PAGES = 0x56 - SC_NPROCESSORS_CONF = 0x53 - SC_NPROCESSORS_ONLN = 0x54 - SC_UIO_MAXIOV = 0x3c -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go deleted file mode 100644 index 772af475a4..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_netbsd.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_netbsd.go - -//go:build netbsd - -package sysconf - -const ( - SC_ARG_MAX = 0x1 - SC_CHILD_MAX = 0x2 - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_JOB_CONTROL = 0x6 - SC_SAVED_IDS = 0x7 - SC_VERSION = 0x8 - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_COLL_WEIGHTS_MAX = 0xd - SC_EXPR_NEST_MAX = 0xe - SC_LINE_MAX = 0xf - SC_RE_DUP_MAX = 0x10 - SC_2_VERSION = 0x11 - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_STREAM_MAX = 0x1a - SC_TZNAME_MAX = 0x1b - SC_PAGESIZE = 0x1c - SC_PAGE_SIZE = 0x1c - SC_FSYNC = 0x1d - SC_XOPEN_SHM = 0x1e - SC_SYNCHRONIZED_IO = 0x1f - SC_IOV_MAX = 0x20 - SC_MAPPED_FILES = 0x21 - SC_MEMLOCK = 0x22 - SC_MEMLOCK_RANGE = 0x23 - SC_MEMORY_PROTECTION = 0x24 - SC_LOGIN_NAME_MAX = 0x25 - SC_MONOTONIC_CLOCK = 0x26 - SC_CLK_TCK = 0x27 - SC_ATEXIT_MAX = 0x28 - SC_THREADS = 0x29 - SC_SEMAPHORES = 0x2a - SC_BARRIERS = 0x2b - SC_TIMERS = 0x2c - SC_SPIN_LOCKS = 0x2d - SC_READER_WRITER_LOCKS = 0x2e - SC_GETGR_R_SIZE_MAX = 0x2f - SC_GETPW_R_SIZE_MAX = 0x30 - SC_CLOCK_SELECTION = 0x31 - SC_ASYNCHRONOUS_IO = 0x32 - SC_AIO_LISTIO_MAX = 0x33 - SC_AIO_MAX = 0x34 - SC_MESSAGE_PASSING = 0x35 - SC_MQ_OPEN_MAX = 0x36 - SC_MQ_PRIO_MAX = 0x37 - SC_PRIORITY_SCHEDULING = 0x38 - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x39 - SC_THREAD_KEYS_MAX = 0x3a - SC_THREAD_STACK_MIN = 0x3b - SC_THREAD_THREADS_MAX = 0x3c - SC_THREAD_ATTR_STACKADDR = 0x3d - SC_THREAD_ATTR_STACKSIZE = 0x3e - SC_THREAD_PRIORITY_SCHEDULING = 0x3f - SC_THREAD_PRIO_INHERIT = 0x40 - SC_THREAD_PRIO_PROTECT = 0x41 - SC_THREAD_PROCESS_SHARED = 0x42 - SC_THREAD_SAFE_FUNCTIONS = 0x43 - SC_TTY_NAME_MAX = 0x44 - SC_HOST_NAME_MAX = 0x45 - SC_PASS_MAX = 0x46 - SC_REGEXP = 0x47 - SC_SHELL = 0x48 - SC_SYMLOOP_MAX = 0x49 - - SC_V6_ILP32_OFF32 = 0x4a - SC_V6_ILP32_OFFBIG = 0x4b - SC_V6_LP64_OFF64 = 0x4c - SC_V6_LPBIG_OFFBIG = 0x4d - SC_2_PBS = 0x50 - SC_2_PBS_ACCOUNTING = 0x51 - SC_2_PBS_CHECKPOINT = 0x52 - SC_2_PBS_LOCATE = 0x53 - SC_2_PBS_MESSAGE = 0x54 - SC_2_PBS_TRACK = 0x55 - - SC_SPAWN = 0x56 - SC_SHARED_MEMORY_OBJECTS = 0x57 - - SC_TIMER_MAX = 0x58 - SC_SEM_NSEMS_MAX = 0x59 - SC_CPUTIME = 0x5a - SC_THREAD_CPUTIME = 0x5b - SC_DELAYTIMER_MAX = 0x5c - SC_SIGQUEUE_MAX = 0x5d - SC_REALTIME_SIGNALS = 0x5e - - SC_PHYS_PAGES = 0x79 - - SC_NPROCESSORS_CONF = 0x3e9 - SC_NPROCESSORS_ONLN = 0x3ea - - SC_SCHED_RT_TS = 0x7d1 - SC_SCHED_PRI_MIN = 0x7d2 - SC_SCHED_PRI_MAX = 0x7d3 -) - -const ( - _MAXHOSTNAMELEN = 0x100 - _MAXLOGNAME = 0x10 - _MAXSYMLINKS = 0x20 - - _POSIX_ARG_MAX = 0x1000 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CPUTIME = 0x30db0 - _POSIX_DELAYTIMER_MAX = 0x20 - _POSIX_PRIORITY_SCHEDULING = 0x30db0 - _POSIX_REGEXP = 0x1 - _POSIX_SHARED_MEMORY_OBJECTS = 0x0 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x30db0 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_PROTECT = 0x30db0 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_TIMER_MAX = 0x20 - _POSIX_VERSION = 0x30db0 - - _POSIX2_VERSION = 0x30db0 - - _FOPEN_MAX = 0x14 - _NAME_MAX = 0x1ff - _RE_DUP_MAX = 0xff - - _BC_BASE_MAX = 0x7fffffff - _BC_DIM_MAX = 0xffff - _BC_SCALE_MAX = 0x7fffffff - _BC_STRING_MAX = 0x7fffffff - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - - _GETGR_R_SIZE_MAX = 0x400 - _GETPW_R_SIZE_MAX = 0x400 - - _PATH_DEV = "/dev/" - _PATH_ZONEINFO = "/usr/share/zoneinfo" - - _PASSWORD_LEN = 0x80 -) - -const _PC_NAME_MAX = 0x4 diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go deleted file mode 100644 index 625b098f91..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_openbsd.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_openbsd.go - -//go:build openbsd - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x2a - SC_AIO_MAX = 0x2b - SC_AIO_PRIO_DELTA_MAX = 0x2c - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x2e - SC_BC_BASE_MAX = 0x9 - SC_BC_DIM_MAX = 0xa - SC_BC_SCALE_MAX = 0xb - SC_BC_STRING_MAX = 0xc - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0xd - SC_DELAYTIMER_MAX = 0x32 - SC_EXPR_NEST_MAX = 0xe - SC_GETGR_R_SIZE_MAX = 0x64 - SC_GETPW_R_SIZE_MAX = 0x65 - SC_HOST_NAME_MAX = 0x21 - SC_IOV_MAX = 0x33 - SC_LINE_MAX = 0xf - SC_LOGIN_NAME_MAX = 0x66 - SC_MQ_OPEN_MAX = 0x3a - SC_MQ_PRIO_MAX = 0x3b - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0x1c - SC_PAGESIZE = 0x1c - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x50 - SC_THREAD_KEYS_MAX = 0x51 - SC_THREAD_STACK_MIN = 0x59 - SC_THREAD_THREADS_MAX = 0x5a - SC_RE_DUP_MAX = 0x10 - SC_SEM_NSEMS_MAX = 0x1f - SC_SEM_VALUE_MAX = 0x20 - SC_SIGQUEUE_MAX = 0x46 - SC_STREAM_MAX = 0x1a - SC_SYMLOOP_MAX = 0x4c - SC_TIMER_MAX = 0x5d - SC_TTY_NAME_MAX = 0x6b - SC_TZNAME_MAX = 0x1b - - SC_ADVISORY_INFO = 0x29 - SC_ASYNCHRONOUS_IO = 0x2d - SC_BARRIERS = 0x2f - SC_CLOCK_SELECTION = 0x30 - SC_CPUTIME = 0x31 - SC_FSYNC = 0x1d - SC_IPV6 = 0x34 - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x35 - SC_MEMLOCK = 0x36 - SC_MEMLOCK_RANGE = 0x37 - SC_MEMORY_PROTECTION = 0x38 - SC_MESSAGE_PASSING = 0x39 - SC_MONOTONIC_CLOCK = 0x22 - SC_PRIORITIZED_IO = 0x3c - SC_PRIORITY_SCHEDULING = 0x3d - SC_RAW_SOCKETS = 0x3e - SC_READER_WRITER_LOCKS = 0x3f - SC_REALTIME_SIGNALS = 0x40 - SC_REGEXP = 0x41 - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x43 - SC_SHARED_MEMORY_OBJECTS = 0x44 - SC_SHELL = 0x45 - SC_SPAWN = 0x47 - SC_SPIN_LOCKS = 0x48 - SC_SPORADIC_SERVER = 0x49 - SC_SS_REPL_MAX = 0x4a - SC_SYNCHRONIZED_IO = 0x4b - SC_THREAD_ATTR_STACKADDR = 0x4d - SC_THREAD_ATTR_STACKSIZE = 0x4e - SC_THREAD_CPUTIME = 0x4f - SC_THREAD_PRIO_INHERIT = 0x52 - SC_THREAD_PRIO_PROTECT = 0x53 - SC_THREAD_PRIORITY_SCHEDULING = 0x54 - SC_THREAD_PROCESS_SHARED = 0x55 - SC_THREAD_ROBUST_PRIO_INHERIT = 0x56 - SC_THREAD_ROBUST_PRIO_PROTECT = 0x57 - SC_THREAD_SAFE_FUNCTIONS = 0x67 - SC_THREAD_SPORADIC_SERVER = 0x58 - SC_THREADS = 0x5b - SC_TIMEOUTS = 0x5c - SC_TIMERS = 0x5e - SC_TRACE = 0x5f - SC_TRACE_EVENT_FILTER = 0x60 - SC_TRACE_EVENT_NAME_MAX = 0x61 - SC_TRACE_INHERIT = 0x62 - SC_TRACE_LOG = 0x63 - SC_TRACE_NAME_MAX = 0x68 - SC_TRACE_SYS_MAX = 0x69 - SC_TRACE_USER_EVENT_MAX = 0x6a - SC_TYPED_MEMORY_OBJECTS = 0x6c - SC_VERSION = 0x8 - - SC_V7_ILP32_OFF32 = 0x71 - SC_V7_ILP32_OFFBIG = 0x72 - SC_V7_LP64_OFF64 = 0x73 - SC_V7_LPBIG_OFFBIG = 0x74 - - SC_V6_ILP32_OFF32 = 0x6d - SC_V6_ILP32_OFFBIG = 0x6e - SC_V6_LP64_OFF64 = 0x6f - SC_V6_LPBIG_OFFBIG = 0x70 - - SC_2_C_BIND = 0x12 - SC_2_C_DEV = 0x13 - SC_2_CHAR_TERM = 0x14 - SC_2_FORT_DEV = 0x15 - SC_2_FORT_RUN = 0x16 - SC_2_LOCALEDEF = 0x17 - SC_2_PBS = 0x23 - SC_2_PBS_ACCOUNTING = 0x24 - SC_2_PBS_CHECKPOINT = 0x25 - SC_2_PBS_LOCATE = 0x26 - SC_2_PBS_MESSAGE = 0x27 - SC_2_PBS_TRACK = 0x28 - SC_2_SW_DEV = 0x18 - SC_2_UPE = 0x19 - SC_2_VERSION = 0x11 - - SC_XOPEN_CRYPT = 0x75 - SC_XOPEN_ENH_I18N = 0x76 - SC_XOPEN_REALTIME = 0x78 - SC_XOPEN_REALTIME_THREADS = 0x79 - SC_XOPEN_SHM = 0x1e - SC_XOPEN_STREAMS = 0x7a - SC_XOPEN_UNIX = 0x7b - SC_XOPEN_UUCP = 0x7c - SC_XOPEN_VERSION = 0x7d - - SC_AVPHYS_PAGES = 0x1f5 - SC_PHYS_PAGES = 0x1f4 - SC_NPROCESSORS_CONF = 0x1f6 - SC_NPROCESSORS_ONLN = 0x1f7 -) - -const ( - _HOST_NAME_MAX = 0xff - _IOV_MAX = 0x400 - _LOGIN_NAME_MAX = 0x20 - _PTHREAD_DESTRUCTOR_ITERATIONS = 0x4 - _PTHREAD_KEYS_MAX = 0x100 - _PTHREAD_STACK_MIN = 0x1000 - _PTHREAD_THREADS_MAX = 0xffffffffffffffff - _SEM_VALUE_MAX = 0xffffffff - _SYMLOOP_MAX = 0x20 - _TTY_NAME_MAX = 0x104 - - _GR_BUF_LEN = 0xa40 - _PW_BUF_LEN = 0x400 - - _CLK_TCK = 0x64 - - _POSIX_ADVISORY_INFO = -0x1 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = -0x1 - _POSIX_BARRIERS = 0x30db0 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = -0x1 - _POSIX_CPUTIME = 0x31069 - _POSIX_FSYNC = 0x30db0 - _POSIX_IPV6 = 0x0 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x30db0 - _POSIX_MEMLOCK = 0x30db0 - _POSIX_MEMLOCK_RANGE = 0x30db0 - _POSIX_MEMORY_PROTECTION = 0x30db0 - _POSIX_MESSAGE_PASSING = -0x1 - _POSIX_MONOTONIC_CLOCK = 0x30db0 - _POSIX_PRIORITIZED_IO = -0x1 - _POSIX_PRIORITY_SCHEDULING = -0x1 - _POSIX_RAW_SOCKETS = 0x30db0 - _POSIX_READER_WRITER_LOCKS = 0x30db0 - _POSIX_REALTIME_SIGNALS = -0x1 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x30db0 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SPAWN = 0x30db0 - _POSIX_SPIN_LOCKS = 0x30db0 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = -0x1 - _POSIX_THREAD_ATTR_STACKADDR = 0x30db0 - _POSIX_THREAD_ATTR_STACKSIZE = 0x30db0 - _POSIX_THREAD_CPUTIME = 0x31069 - _POSIX_THREAD_KEYS_MAX = 0x80 - _POSIX_THREAD_PRIO_INHERIT = -0x1 - _POSIX_THREAD_PRIO_PROTECT = -0x1 - _POSIX_THREAD_PRIORITY_SCHEDULING = -0x1 - _POSIX_THREAD_PROCESS_SHARED = -0x1 - _POSIX_THREAD_ROBUST_PRIO_INHERIT = -0x1 - _POSIX_THREAD_ROBUST_PRIO_PROTECT = -0x1 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x30db0 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x30db0 - _POSIX_TIMERS = -0x1 - _POSIX_TIMEOUTS = 0x30db0 - _POSIX_TRACE = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = 0x0 - _POSIX_V7_LP64_OFF64 = 0x0 - _POSIX_V7_LPBIG_OFFBIG = 0x0 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = 0x0 - _POSIX_V6_LP64_OFF64 = 0x0 - _POSIX_V6_LPBIG_OFFBIG = 0x0 - - _POSIX2_C_BIND = 0x30db0 - _POSIX2_C_DEV = -0x1 - _POSIX2_CHAR_TERM = 0x1 - _POSIX2_LOCALEDEF = -0x1 - _POSIX2_PBS = -0x1 - _POSIX2_SW_DEV = 0x30db0 - _POSIX2_UPE = 0x30db0 - _POSIX2_VERSION = 0x31069 - - _XOPEN_CRYPT = 0x1 - _XOPEN_ENH_I18N = -0x1 - _XOPEN_REALTIME = -0x1 - _XOPEN_REALTIME_THREADS = -0x1 - _XOPEN_SHM = 0x1 - _XOPEN_STREAMS = -0x1 - _XOPEN_UNIX = -0x1 - _XOPEN_UUCP = -0x1 - - _FOPEN_MAX = 0x14 - _NAME_MAX = 0xff - _RE_DUP_MAX = 0xff - - _BC_BASE_MAX = 0x7fffffff - _BC_DIM_MAX = 0xffff - _BC_SCALE_MAX = 0x7fffffff - _BC_STRING_MAX = 0x7fffffff - _COLL_WEIGHTS_MAX = 0x2 - _EXPR_NEST_MAX = 0x20 - _LINE_MAX = 0x800 - - _SHRT_MAX = 0x7fff - - _PATH_ZONEINFO = "/usr/share/zoneinfo" -) - -const ( - _CHAR_BIT = 0x8 - - _INT_MAX = 0x7fffffff - - sizeofOffT = 0x8 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go deleted file mode 100644 index c155cf5796..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_defs_solaris.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_defs_solaris.go - -//go:build solaris - -package sysconf - -const ( - SC_AIO_LISTIO_MAX = 0x12 - SC_AIO_MAX = 0x13 - SC_AIO_PRIO_DELTA_MAX = 0x14 - SC_ARG_MAX = 0x1 - SC_ATEXIT_MAX = 0x4c - SC_BC_BASE_MAX = 0x36 - SC_BC_DIM_MAX = 0x37 - SC_BC_SCALE_MAX = 0x38 - SC_BC_STRING_MAX = 0x39 - SC_CHILD_MAX = 0x2 - SC_CLK_TCK = 0x3 - SC_COLL_WEIGHTS_MAX = 0x3a - SC_DELAYTIMER_MAX = 0x16 - SC_EXPR_NEST_MAX = 0x3b - SC_GETGR_R_SIZE_MAX = 0x239 - SC_GETPW_R_SIZE_MAX = 0x23a - SC_HOST_NAME_MAX = 0x2df - SC_IOV_MAX = 0x4d - SC_LINE_MAX = 0x3c - SC_LOGIN_NAME_MAX = 0x23b - SC_MQ_OPEN_MAX = 0x1d - SC_MQ_PRIO_MAX = 0x1e - SC_NGROUPS_MAX = 0x4 - SC_OPEN_MAX = 0x5 - SC_PAGE_SIZE = 0xb - SC_PAGESIZE = 0xb - SC_THREAD_DESTRUCTOR_ITERATIONS = 0x238 - SC_THREAD_KEYS_MAX = 0x23c - SC_THREAD_STACK_MIN = 0x23d - SC_THREAD_THREADS_MAX = 0x23e - SC_RE_DUP_MAX = 0x3d - SC_RTSIG_MAX = 0x22 - SC_SEM_NSEMS_MAX = 0x24 - SC_SEM_VALUE_MAX = 0x25 - SC_SIGQUEUE_MAX = 0x27 - SC_STREAM_MAX = 0x10 - SC_SYMLOOP_MAX = 0x2e8 - SC_TIMER_MAX = 0x2c - SC_TTY_NAME_MAX = 0x23f - SC_TZNAME_MAX = 0x11 - - SC_ADVISORY_INFO = 0x2db - SC_ASYNCHRONOUS_IO = 0x15 - SC_BARRIERS = 0x2dc - SC_CLOCK_SELECTION = 0x2dd - SC_CPUTIME = 0x2de - SC_FSYNC = 0x17 - SC_IPV6 = 0x2fa - SC_JOB_CONTROL = 0x6 - SC_MAPPED_FILES = 0x18 - SC_MEMLOCK = 0x19 - SC_MEMLOCK_RANGE = 0x1a - SC_MEMORY_PROTECTION = 0x1b - SC_MESSAGE_PASSING = 0x1c - SC_MONOTONIC_CLOCK = 0x2e0 - SC_PRIORITIZED_IO = 0x1f - SC_PRIORITY_SCHEDULING = 0x20 - SC_RAW_SOCKETS = 0x2fb - SC_READER_WRITER_LOCKS = 0x2e1 - SC_REALTIME_SIGNALS = 0x21 - SC_REGEXP = 0x2e2 - SC_SAVED_IDS = 0x7 - SC_SEMAPHORES = 0x23 - SC_SHARED_MEMORY_OBJECTS = 0x26 - SC_SHELL = 0x2e3 - SC_SPAWN = 0x2e4 - SC_SPIN_LOCKS = 0x2e5 - SC_SPORADIC_SERVER = 0x2e6 - SC_SS_REPL_MAX = 0x2e7 - SC_SYNCHRONIZED_IO = 0x2a - SC_THREAD_ATTR_STACKADDR = 0x241 - SC_THREAD_ATTR_STACKSIZE = 0x242 - SC_THREAD_CPUTIME = 0x2e9 - SC_THREAD_PRIO_INHERIT = 0x244 - SC_THREAD_PRIO_PROTECT = 0x245 - SC_THREAD_PRIORITY_SCHEDULING = 0x243 - SC_THREAD_PROCESS_SHARED = 0x246 - SC_THREAD_SAFE_FUNCTIONS = 0x247 - SC_THREAD_SPORADIC_SERVER = 0x2ea - SC_THREADS = 0x240 - SC_TIMEOUTS = 0x2eb - SC_TIMERS = 0x2b - SC_TRACE = 0x2ec - SC_TRACE_EVENT_FILTER = 0x2ed - SC_TRACE_EVENT_NAME_MAX = 0x2ee - SC_TRACE_INHERIT = 0x2ef - SC_TRACE_LOG = 0x2f0 - SC_TRACE_NAME_MAX = 0x2f1 - SC_TRACE_SYS_MAX = 0x2f2 - SC_TRACE_USER_EVENT_MAX = 0x2f3 - SC_TYPED_MEMORY_OBJECTS = 0x2f4 - SC_VERSION = 0x8 - - SC_V6_ILP32_OFF32 = 0x2f5 - SC_V6_ILP32_OFFBIG = 0x2f6 - SC_V6_LP64_OFF64 = 0x2f7 - SC_V6_LPBIG_OFFBIG = 0x2f8 - - SC_2_C_BIND = 0x2d - SC_2_C_DEV = 0x2e - SC_2_C_VERSION = 0x2f - SC_2_CHAR_TERM = 0x42 - SC_2_FORT_DEV = 0x30 - SC_2_FORT_RUN = 0x31 - SC_2_LOCALEDEF = 0x32 - SC_2_PBS = 0x2d4 - SC_2_PBS_ACCOUNTING = 0x2d5 - SC_2_PBS_CHECKPOINT = 0x2d6 - SC_2_PBS_LOCATE = 0x2d8 - SC_2_PBS_MESSAGE = 0x2d9 - SC_2_PBS_TRACK = 0x2da - SC_2_SW_DEV = 0x33 - SC_2_UPE = 0x34 - SC_2_VERSION = 0x35 - - SC_XOPEN_CRYPT = 0x3e - SC_XOPEN_ENH_I18N = 0x3f - SC_XOPEN_REALTIME = 0x2ce - SC_XOPEN_REALTIME_THREADS = 0x2cf - SC_XOPEN_SHM = 0x40 - SC_XOPEN_STREAMS = 0x2f9 - SC_XOPEN_UNIX = 0x4e - SC_XOPEN_VERSION = 0xc - SC_XOPEN_XCU_VERSION = 0x43 - - SC_PHYS_PAGES = 0x1f4 - SC_AVPHYS_PAGES = 0x1f5 - SC_NPROCESSORS_CONF = 0xe - SC_NPROCESSORS_ONLN = 0xf -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go deleted file mode 100644 index b5d4807482..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_386.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && 386 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go deleted file mode 100644 index 89c880aae2..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_amd64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && amd64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go deleted file mode 100644 index 7b65fdd6fb..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && arm - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go deleted file mode 100644 index a86cb32bdf..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_arm64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && arm64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go deleted file mode 100644 index 6c847aeeaa..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_freebsd_riscv64.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_freebsd.go - -//go:build freebsd && riscv64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff - _SHRT_MAX = 0x7fff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go deleted file mode 100644 index 90963eb422..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_386.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && 386 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go deleted file mode 100644 index 28ad6f1838..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_amd64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && amd64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go deleted file mode 100644 index ffbcf37d40..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && arm - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go deleted file mode 100644 index cc9f4d88d4..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_arm64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && arm64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go deleted file mode 100644 index f62b15a697..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_loong64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && loong64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go deleted file mode 100644 index 37f492a81f..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go deleted file mode 100644 index ae7b7f9c23..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go deleted file mode 100644 index fe14670f2a..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mips64le.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mips64le - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go deleted file mode 100644 index d204585be9..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_mipsle.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && mipsle - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = 0x1 - _POSIX_V7_ILP32_OFFBIG = 0x1 - _POSIX_V7_LP64_OFF64 = -0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = 0x1 - _POSIX_V6_ILP32_OFFBIG = 0x1 - _POSIX_V6_LP64_OFF64 = -0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go deleted file mode 100644 index 9ec78d335e..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && ppc64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go deleted file mode 100644 index a542067298..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_ppc64le.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && ppc64le - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x20000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go deleted file mode 100644 index bfb923920a..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_riscv64.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && riscv64 - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go deleted file mode 100644 index 6e935c8735..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_linux_s390x.go +++ /dev/null @@ -1,113 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_linux.go - -//go:build linux && s390x - -package sysconf - -const ( - _AIO_PRIO_DELTA_MAX = 0x14 - _BC_BASE_MAX = 0x63 - _BC_DIM_MAX = 0x800 - _BC_SCALE_MAX = 0x63 - _BC_STRING_MAX = 0x3e8 - _COLL_WEIGHTS_MAX = 0xff - _DELAYTIMER_MAX = 0x7fffffff - _EXPR_NEST_MAX = 0x20 - _HOST_NAME_MAX = 0x40 - _LINE_MAX = 0x800 - _LOGIN_NAME_MAX = 0x100 - _MQ_PRIO_MAX = 0x8000 - _NGROUPS_MAX = 0x10000 - _NSS_BUFLEN_GROUP = 0x400 - _NSS_BUFLEN_PASSWD = 0x400 - _OPEN_MAX = 0x100 - _PTHREAD_KEYS_MAX = 0x400 - _PTHREAD_STACK_MIN = 0x4000 - _RE_DUP_MAX = 0x7fff - _RTSIG_MAX = 0x20 - _SEM_VALUE_MAX = 0x7fffffff - _STREAM_MAX = 0x10 - _SYMLOOP_MAX = -0x1 - _TTY_NAME_MAX = 0x20 - - _UIO_MAXIOV = 0x400 - - _INT_MAX = 0x7fffffff - - _POSIX_ADVISORY_INFO = 0x31069 - _POSIX_ARG_MAX = 0x1000 - _POSIX_ASYNCHRONOUS_IO = 0x31069 - _POSIX_BARRIERS = 0x31069 - _POSIX_CHILD_MAX = 0x19 - _POSIX_CLOCK_SELECTION = 0x31069 - _POSIX_CPUTIME = 0x0 - _POSIX_FSYNC = 0x31069 - _POSIX_IPV6 = 0x31069 - _POSIX_JOB_CONTROL = 0x1 - _POSIX_MAPPED_FILES = 0x31069 - _POSIX_MEMLOCK = 0x31069 - _POSIX_MEMLOCK_RANGE = 0x31069 - _POSIX_MEMORY_PROTECTION = 0x31069 - _POSIX_MESSAGE_PASSING = 0x31069 - _POSIX_MONOTONIC_CLOCK = 0x0 - _POSIX_PRIORITIZED_IO = 0x31069 - _POSIX_PRIORITY_SCHEDULING = 0x31069 - _POSIX_RAW_SOCKETS = 0x31069 - _POSIX_READER_WRITER_LOCKS = 0x31069 - _POSIX_REALTIME_SIGNALS = 0x31069 - _POSIX_REGEXP = 0x1 - _POSIX_SAVED_IDS = 0x1 - _POSIX_SEMAPHORES = 0x31069 - _POSIX_SHARED_MEMORY_OBJECTS = 0x31069 - _POSIX_SHELL = 0x1 - _POSIX_SIGQUEUE_MAX = 0x20 - _POSIX_SPAWN = 0x31069 - _POSIX_SPIN_LOCKS = 0x31069 - _POSIX_SPORADIC_SERVER = -0x1 - _POSIX_SYNCHRONIZED_IO = 0x31069 - _POSIX_THREAD_ATTR_STACKADDR = 0x31069 - _POSIX_THREAD_ATTR_STACKSIZE = 0x31069 - _POSIX_THREAD_DESTRUCTOR_ITERATIONS = 0x4 - _POSIX_THREAD_PRIO_INHERIT = 0x31069 - _POSIX_THREAD_PRIO_PROTECT = 0x31069 - _POSIX_THREAD_PRIORITY_SCHEDULING = 0x31069 - _POSIX_THREAD_PROCESS_SHARED = 0x31069 - _POSIX_THREAD_SAFE_FUNCTIONS = 0x31069 - _POSIX_THREAD_SPORADIC_SERVER = -0x1 - _POSIX_THREADS = 0x31069 - _POSIX_TIMEOUTS = 0x31069 - _POSIX_TIMERS = 0x31069 - _POSIX_TRACE = -0x1 - _POSIX_TRACE_EVENT_FILTER = -0x1 - _POSIX_TRACE_INHERIT = -0x1 - _POSIX_TRACE_LOG = -0x1 - _POSIX_TYPED_MEMORY_OBJECTS = -0x1 - _POSIX_VERSION = 0x31069 - - _POSIX_V7_ILP32_OFF32 = -0x1 - _POSIX_V7_ILP32_OFFBIG = -0x1 - _POSIX_V7_LP64_OFF64 = 0x1 - _POSIX_V7_LPBIG_OFFBIG = -0x1 - - _POSIX_V6_ILP32_OFF32 = -0x1 - _POSIX_V6_ILP32_OFFBIG = -0x1 - _POSIX_V6_LP64_OFF64 = 0x1 - _POSIX_V6_LPBIG_OFFBIG = -0x1 - - _POSIX2_C_BIND = 0x31069 - _POSIX2_C_DEV = 0x31069 - _POSIX2_C_VERSION = 0x31069 - _POSIX2_CHAR_TERM = 0x31069 - _POSIX2_LOCALEDEF = 0x31069 - _POSIX2_SW_DEV = 0x31069 - _POSIX2_VERSION = 0x31069 - - _XOPEN_ENH_I18N = 0x1 - _XOPEN_REALTIME = 0x1 - _XOPEN_REALTIME_THREADS = 0x1 - _XOPEN_SHM = 0x1 - _XOPEN_UNIX = 0x1 - _XOPEN_VERSION = 0x2bc - _XOPEN_XCU_VERSION = 0x4 -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go deleted file mode 100644 index ea0b24a822..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_386.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && 386 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go deleted file mode 100644 index 2d377e253c..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_amd64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && amd64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go deleted file mode 100644 index 4a6d83670a..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && arm - -package sysconf - -const ( - _LONG_MAX = 0x7fffffff -) diff --git a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go b/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go deleted file mode 100644 index 49fb6725ef..0000000000 --- a/vendor/github.com/tklauser/go-sysconf/zsysconf_values_netbsd_arm64.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated by cmd/cgo -godefs; DO NOT EDIT. -// cgo -godefs sysconf_values_netbsd.go - -//go:build netbsd && arm64 - -package sysconf - -const ( - _LONG_MAX = 0x7fffffffffffffff -) diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml deleted file mode 100644 index 495e5e633d..0000000000 --- a/vendor/github.com/tklauser/numcpus/.cirrus.yml +++ /dev/null @@ -1,23 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: 1 - GO_VERSION: go1.24.0 - -freebsd_13_task: - freebsd_instance: - image_family: freebsd-13-5 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... - -freebsd_14_task: - freebsd_instance: - image_family: freebsd-14-2 - install_script: | - pkg install -y go - GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest - bin/${GO_VERSION} download - build_script: bin/${GO_VERSION} build -v ./... - test_script: bin/${GO_VERSION} test -race ./... diff --git a/vendor/github.com/tklauser/numcpus/LICENSE b/vendor/github.com/tklauser/numcpus/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/github.com/tklauser/numcpus/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/tklauser/numcpus/README.md b/vendor/github.com/tklauser/numcpus/README.md deleted file mode 100644 index 23612c5418..0000000000 --- a/vendor/github.com/tklauser/numcpus/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# numcpus - -[![Go Reference](https://pkg.go.dev/badge/github.com/tklauser/numcpus.svg)](https://pkg.go.dev/github.com/tklauser/numcpus) -[![GitHub Action Status](https://github.com/tklauser/numcpus/workflows/Tests/badge.svg)](https://github.com/tklauser/numcpus/actions?query=workflow%3ATests) - -Package numcpus provides information about the number of CPUs in the system. - -It gets the number of CPUs (online, offline, present, possible, configured or -kernel maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD or -Solaris/Illumos systems. - -On Linux, the information is retrieved by reading the corresponding CPU -topology files in `/sys/devices/system/cpu`. - -On BSD systems, the information is retrieved using the `hw.ncpu` and -`hw.ncpuonline` sysctls, if supported. - -Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD, -DragonflyBSD and Solaris/Illumos. ErrNotSupported is returned in case a -function is not supported on a particular platform. - -## Usage - -```Go -package main - -import ( - "fmt" - "os" - - "github.com/tklauser/numcpus" -) - -func main() { - online, err := numcpus.GetOnline() - if err != nil { - fmt.Fprintf(os.Stderr, "GetOnline: %v\n", err) - } - fmt.Printf("online CPUs: %v\n", online) - - possible, err := numcpus.GetPossible() - if err != nil { - fmt.Fprintf(os.Stderr, "GetPossible: %v\n", err) - } - fmt.Printf("possible CPUs: %v\n", possible) -} -``` - -## References - -* [Linux kernel sysfs documentation for CPU attributes](https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-devices-system-cpu) -* [Linux kernel CPU topology documentation](https://www.kernel.org/doc/Documentation/cputopology.txt) diff --git a/vendor/github.com/tklauser/numcpus/numcpus.go b/vendor/github.com/tklauser/numcpus/numcpus.go deleted file mode 100644 index de206f0612..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright 2018-2022 Tobias Klauser -// -// 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 numcpus provides information about the number of CPUs in the system. -// -// It gets the number of CPUs (online, offline, present, possible or kernel -// maximum) on Linux, Darwin, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, -// Solaris/Illumos or Windows systems. -// -// On Linux, the information is retrieved by reading the corresponding CPU -// topology files in /sys/devices/system/cpu. -// -// On BSD systems, the information is retrieved using the hw.ncpu and -// hw.ncpuonline sysctls, if supported. -// -// On Windows systems, the information is retrieved using the -// GetActiveProcessorCount and GetMaximumProcessorCount functions, respectively. -// -// Not all functions are supported on Darwin, FreeBSD, NetBSD, OpenBSD, -// DragonflyBSD, Solaris/Illumos and Windows. ErrNotSupported is returned in -// case a function is not supported on a particular platform. -package numcpus - -import "errors" - -// ErrNotSupported is the error returned when the function is not supported. -var ErrNotSupported = errors.New("function not supported") - -// GetConfigured returns the number of CPUs configured on the system. This -// function should return the same value as `getconf _SC_NPROCESSORS_CONF` on a -// unix system. -func GetConfigured() (int, error) { - return getConfigured() -} - -// GetKernelMax returns the maximum number of CPUs allowed by the kernel -// configuration. This function is only supported on Linux and Windows systems. -func GetKernelMax() (int, error) { - return getKernelMax() -} - -// GetOffline returns the number of offline CPUs, i.e. CPUs that are not online -// because they have been hotplugged off or exceed the limit of CPUs allowed by -// the kernel configuration (see GetKernelMax). This function is only supported -// on Linux systems. -func GetOffline() (int, error) { - return getOffline() -} - -// GetOnline returns the number of CPUs that are online and being scheduled. -func GetOnline() (int, error) { - return getOnline() -} - -// GetPossible returns the number of possible CPUs, i.e. CPUs that -// have been allocated resources and can be brought online if they are present. -func GetPossible() (int, error) { - return getPossible() -} - -// GetPresent returns the number of CPUs present in the system. -func GetPresent() (int, error) { - return getPresent() -} - -// ListOffline returns the list of offline CPUs. See [GetOffline] for details on -// when a CPU is considered offline. -func ListOffline() ([]int, error) { - return listOffline() -} - -// ListOnline returns the list of CPUs that are online and being scheduled. -func ListOnline() ([]int, error) { - return listOnline() -} - -// ListPossible returns the list of possible CPUs. See [GetPossible] for -// details on when a CPU is considered possible. -func ListPossible() ([]int, error) { - return listPossible() -} - -// ListPresent returns the list of present CPUs. See [GetPresent] for -// details on when a CPU is considered present. -func ListPresent() ([]int, error) { - return listPresent() -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go b/vendor/github.com/tklauser/numcpus/numcpus_bsd.go deleted file mode 100644 index efd8db0f1c..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_bsd.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2018 Tobias Klauser -// -// 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. - -//go:build darwin || dragonfly || freebsd || netbsd || openbsd - -package numcpus - -import ( - "runtime" - - "golang.org/x/sys/unix" -) - -func getConfigured() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} - -func getKernelMax() (int, error) { - if runtime.GOOS == "freebsd" { - n, err := unix.SysctlUint32("kern.smp.maxcpus") - return int(n), err - } - return 0, ErrNotSupported -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - var n uint32 - var err error - switch runtime.GOOS { - case "netbsd", "openbsd": - n, err = unix.SysctlUint32("hw.ncpuonline") - if err != nil { - n, err = unix.SysctlUint32("hw.ncpu") - } - default: - n, err = unix.SysctlUint32("hw.ncpu") - } - return int(n), err -} - -func getPossible() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} - -func getPresent() (int, error) { - n, err := unix.SysctlUint32("hw.ncpu") - return int(n), err -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_linux.go b/vendor/github.com/tklauser/numcpus/numcpus_linux.go deleted file mode 100644 index 7b991da468..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_linux.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright 2018 Tobias Klauser -// -// 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 numcpus - -import ( - "fmt" - "os" - "path/filepath" - "strconv" - "strings" - - "golang.org/x/sys/unix" -) - -const ( - sysfsCPUBasePath = "/sys/devices/system/cpu" - - offline = "offline" - online = "online" - possible = "possible" - present = "present" -) - -func getFromCPUAffinity() (int, error) { - var cpuSet unix.CPUSet - if err := unix.SchedGetaffinity(0, &cpuSet); err != nil { - return 0, err - } - return cpuSet.Count(), nil -} - -func readCPURangeWith[T any](file string, f func(cpus string) (T, error)) (T, error) { - var zero T - buf, err := os.ReadFile(filepath.Join(sysfsCPUBasePath, file)) - if err != nil { - return zero, err - } - return f(strings.Trim(string(buf), "\n ")) -} - -func countCPURange(cpus string) (int, error) { - // Treat empty file as valid. This might be the case if there are no offline CPUs in which - // case /sys/devices/system/cpu/offline is empty. - if cpus == "" { - return 0, nil - } - - n := int(0) - for _, cpuRange := range strings.Split(cpus, ",") { - if cpuRange == "" { - return 0, fmt.Errorf("empty CPU range in CPU string %q", cpus) - } - from, to, found := strings.Cut(cpuRange, "-") - first, err := strconv.ParseUint(from, 10, 32) - if err != nil { - return 0, err - } - if !found { - n++ - continue - } - last, err := strconv.ParseUint(to, 10, 32) - if err != nil { - return 0, err - } - if last < first { - return 0, fmt.Errorf("last CPU in range (%d) less than first (%d)", last, first) - } - n += int(last - first + 1) - } - return n, nil -} - -func listCPURange(cpus string) ([]int, error) { - // See comment in countCPURange. - if cpus == "" { - return []int{}, nil - } - - list := []int{} - for _, cpuRange := range strings.Split(cpus, ",") { - if cpuRange == "" { - return nil, fmt.Errorf("empty CPU range in CPU string %q", cpus) - } - from, to, found := strings.Cut(cpuRange, "-") - first, err := strconv.ParseUint(from, 10, 32) - if err != nil { - return nil, err - } - if !found { - // range containing a single element - list = append(list, int(first)) - continue - } - last, err := strconv.ParseUint(to, 10, 32) - if err != nil { - return nil, err - } - if last < first { - return nil, fmt.Errorf("last CPU in range (%d) less than first (%d)", last, first) - } - for cpu := int(first); cpu <= int(last); cpu++ { - list = append(list, cpu) - } - } - return list, nil -} - -func getConfigured() (int, error) { - d, err := os.Open(sysfsCPUBasePath) - if err != nil { - return 0, err - } - defer d.Close() - fis, err := d.Readdir(-1) - if err != nil { - return 0, err - } - count := 0 - for _, fi := range fis { - if name := fi.Name(); fi.IsDir() && strings.HasPrefix(name, "cpu") { - _, err := strconv.ParseInt(name[3:], 10, 64) - if err == nil { - count++ - } - } - } - return count, nil -} - -func getKernelMax() (int, error) { - buf, err := os.ReadFile(filepath.Join(sysfsCPUBasePath, "kernel_max")) - if err != nil { - return 0, err - } - n, err := strconv.ParseInt(strings.Trim(string(buf), "\n "), 10, 32) - if err != nil { - return 0, err - } - return int(n), nil -} - -func getOffline() (int, error) { - return readCPURangeWith(offline, countCPURange) -} - -func getOnline() (int, error) { - if n, err := getFromCPUAffinity(); err == nil { - return n, nil - } - return readCPURangeWith(online, countCPURange) -} - -func getPossible() (int, error) { - return readCPURangeWith(possible, countCPURange) -} - -func getPresent() (int, error) { - return readCPURangeWith(present, countCPURange) -} - -func listOffline() ([]int, error) { - return readCPURangeWith(offline, listCPURange) -} - -func listOnline() ([]int, error) { - return readCPURangeWith(online, listCPURange) -} - -func listPossible() ([]int, error) { - return readCPURangeWith(possible, listCPURange) -} - -func listPresent() ([]int, error) { - return readCPURangeWith(present, listCPURange) -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_list_unsupported.go b/vendor/github.com/tklauser/numcpus/numcpus_list_unsupported.go deleted file mode 100644 index af4efeacf4..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_list_unsupported.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Tobias Klauser -// -// 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. - -//go:build !linux - -package numcpus - -func listOffline() ([]int, error) { - return nil, ErrNotSupported -} - -func listOnline() ([]int, error) { - return nil, ErrNotSupported -} - -func listPossible() ([]int, error) { - return nil, ErrNotSupported -} - -func listPresent() ([]int, error) { - return nil, ErrNotSupported -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go b/vendor/github.com/tklauser/numcpus/numcpus_solaris.go deleted file mode 100644 index f3b632fe74..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_solaris.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Tobias Klauser -// -// 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. - -//go:build solaris - -package numcpus - -import "golang.org/x/sys/unix" - -// taken from /usr/include/sys/unistd.h -const ( - _SC_NPROCESSORS_CONF = 14 - _SC_NPROCESSORS_ONLN = 15 - _SC_NPROCESSORS_MAX = 516 -) - -func getConfigured() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} - -func getKernelMax() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_MAX) - return int(n), err -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_ONLN) - return int(n), err -} - -func getPossible() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} - -func getPresent() (int, error) { - n, err := unix.Sysconf(_SC_NPROCESSORS_CONF) - return int(n), err -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go b/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go deleted file mode 100644 index e72355eca5..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_unsupported.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2021 Tobias Klauser -// -// 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. - -//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows - -package numcpus - -func getConfigured() (int, error) { - return 0, ErrNotSupported -} - -func getKernelMax() (int, error) { - return 0, ErrNotSupported -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - return 0, ErrNotSupported -} - -func getPossible() (int, error) { - return 0, ErrNotSupported -} - -func getPresent() (int, error) { - return 0, ErrNotSupported -} diff --git a/vendor/github.com/tklauser/numcpus/numcpus_windows.go b/vendor/github.com/tklauser/numcpus/numcpus_windows.go deleted file mode 100644 index f7d5b40295..0000000000 --- a/vendor/github.com/tklauser/numcpus/numcpus_windows.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2022 Tobias Klauser -// -// 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 numcpus - -import "golang.org/x/sys/windows" - -func getConfigured() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getKernelMax() (int, error) { - return int(windows.GetMaximumProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getOffline() (int, error) { - return 0, ErrNotSupported -} - -func getOnline() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getPossible() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} - -func getPresent() (int, error) { - return int(windows.GetActiveProcessorCount(windows.ALL_PROCESSOR_GROUPS)), nil -} diff --git a/vendor/github.com/yusufpapurcu/wmi/LICENSE b/vendor/github.com/yusufpapurcu/wmi/LICENSE deleted file mode 100644 index ae80b67209..0000000000 --- a/vendor/github.com/yusufpapurcu/wmi/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Stack Exchange - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/yusufpapurcu/wmi/README.md b/vendor/github.com/yusufpapurcu/wmi/README.md deleted file mode 100644 index 426d1a46b4..0000000000 --- a/vendor/github.com/yusufpapurcu/wmi/README.md +++ /dev/null @@ -1,6 +0,0 @@ -wmi -=== - -Package wmi provides a WQL interface to Windows WMI. - -Note: It interfaces with WMI on the local machine, therefore it only runs on Windows. diff --git a/vendor/github.com/yusufpapurcu/wmi/swbemservices.go b/vendor/github.com/yusufpapurcu/wmi/swbemservices.go deleted file mode 100644 index a250c846d5..0000000000 --- a/vendor/github.com/yusufpapurcu/wmi/swbemservices.go +++ /dev/null @@ -1,261 +0,0 @@ -//go:build windows -// +build windows - -package wmi - -import ( - "fmt" - "reflect" - "runtime" - "sync" - - "github.com/go-ole/go-ole" - "github.com/go-ole/go-ole/oleutil" -) - -// SWbemServices is used to access wmi. See https://msdn.microsoft.com/en-us/library/aa393719(v=vs.85).aspx -type SWbemServices struct { - //TODO: track namespace. Not sure if we can re connect to a different namespace using the same instance - cWMIClient *Client //This could also be an embedded struct, but then we would need to branch on Client vs SWbemServices in the Query method - sWbemLocatorIUnknown *ole.IUnknown - sWbemLocatorIDispatch *ole.IDispatch - queries chan *queryRequest - closeError chan error - lQueryorClose sync.Mutex -} - -type queryRequest struct { - query string - dst interface{} - args []interface{} - finished chan error -} - -// InitializeSWbemServices will return a new SWbemServices object that can be used to query WMI -func InitializeSWbemServices(c *Client, connectServerArgs ...interface{}) (*SWbemServices, error) { - //fmt.Println("InitializeSWbemServices: Starting") - //TODO: implement connectServerArgs as optional argument for init with connectServer call - s := new(SWbemServices) - s.cWMIClient = c - s.queries = make(chan *queryRequest) - initError := make(chan error) - go s.process(initError) - - err, ok := <-initError - if ok { - return nil, err //Send error to caller - } - //fmt.Println("InitializeSWbemServices: Finished") - return s, nil -} - -// Close will clear and release all of the SWbemServices resources -func (s *SWbemServices) Close() error { - s.lQueryorClose.Lock() - if s == nil || s.sWbemLocatorIDispatch == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices is not Initialized") - } - if s.queries == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices has been closed") - } - //fmt.Println("Close: sending close request") - var result error - ce := make(chan error) - s.closeError = ce //Race condition if multiple callers to close. May need to lock here - close(s.queries) //Tell background to shut things down - s.lQueryorClose.Unlock() - err, ok := <-ce - if ok { - result = err - } - //fmt.Println("Close: finished") - return result -} - -func (s *SWbemServices) process(initError chan error) { - //fmt.Println("process: starting background thread initialization") - //All OLE/WMI calls must happen on the same initialized thead, so lock this goroutine - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - err := ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) - if err != nil { - oleCode := err.(*ole.OleError).Code() - if oleCode != ole.S_OK && oleCode != S_FALSE { - initError <- fmt.Errorf("ole.CoInitializeEx error: %v", err) - return - } - } - defer ole.CoUninitialize() - - unknown, err := oleutil.CreateObject("WbemScripting.SWbemLocator") - if err != nil { - initError <- fmt.Errorf("CreateObject SWbemLocator error: %v", err) - return - } else if unknown == nil { - initError <- ErrNilCreateObject - return - } - defer unknown.Release() - s.sWbemLocatorIUnknown = unknown - - dispatch, err := s.sWbemLocatorIUnknown.QueryInterface(ole.IID_IDispatch) - if err != nil { - initError <- fmt.Errorf("SWbemLocator QueryInterface error: %v", err) - return - } - defer dispatch.Release() - s.sWbemLocatorIDispatch = dispatch - - // we can't do the ConnectServer call outside the loop unless we find a way to track and re-init the connectServerArgs - //fmt.Println("process: initialized. closing initError") - close(initError) - //fmt.Println("process: waiting for queries") - for q := range s.queries { - //fmt.Printf("process: new query: len(query)=%d\n", len(q.query)) - errQuery := s.queryBackground(q) - //fmt.Println("process: s.queryBackground finished") - if errQuery != nil { - q.finished <- errQuery - } - close(q.finished) - } - //fmt.Println("process: queries channel closed") - s.queries = nil //set channel to nil so we know it is closed - //TODO: I think the Release/Clear calls can panic if things are in a bad state. - //TODO: May need to recover from panics and send error to method caller instead. - close(s.closeError) -} - -// Query runs the WQL query using a SWbemServices instance and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// http://msdn.microsoft.com/en-us/library/aa393720.aspx for details. -func (s *SWbemServices) Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - s.lQueryorClose.Lock() - if s == nil || s.sWbemLocatorIDispatch == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices is not Initialized") - } - if s.queries == nil { - s.lQueryorClose.Unlock() - return fmt.Errorf("SWbemServices has been closed") - } - - //fmt.Println("Query: Sending query request") - qr := queryRequest{ - query: query, - dst: dst, - args: connectServerArgs, - finished: make(chan error), - } - s.queries <- &qr - s.lQueryorClose.Unlock() - err, ok := <-qr.finished - if ok { - //fmt.Println("Query: Finished with error") - return err //Send error to caller - } - //fmt.Println("Query: Finished") - return nil -} - -func (s *SWbemServices) queryBackground(q *queryRequest) error { - if s == nil || s.sWbemLocatorIDispatch == nil { - return fmt.Errorf("SWbemServices is not Initialized") - } - wmi := s.sWbemLocatorIDispatch //Should just rename in the code, but this will help as we break things apart - //fmt.Println("queryBackground: Starting") - - dv := reflect.ValueOf(q.dst) - if dv.Kind() != reflect.Ptr || dv.IsNil() { - return ErrInvalidEntityType - } - dv = dv.Elem() - mat, elemType := checkMultiArg(dv) - if mat == multiArgTypeInvalid { - return ErrInvalidEntityType - } - - // service is a SWbemServices - serviceRaw, err := oleutil.CallMethod(wmi, "ConnectServer", q.args...) - if err != nil { - return err - } - service := serviceRaw.ToIDispatch() - defer serviceRaw.Clear() - - // result is a SWBemObjectSet - resultRaw, err := oleutil.CallMethod(service, "ExecQuery", q.query) - if err != nil { - return err - } - result := resultRaw.ToIDispatch() - defer resultRaw.Clear() - - count, err := oleInt64(result, "Count") - if err != nil { - return err - } - - enumProperty, err := result.GetProperty("_NewEnum") - if err != nil { - return err - } - defer enumProperty.Clear() - - enum, err := enumProperty.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) - if err != nil { - return err - } - if enum == nil { - return fmt.Errorf("can't get IEnumVARIANT, enum is nil") - } - defer enum.Release() - - // Initialize a slice with Count capacity - dv.Set(reflect.MakeSlice(dv.Type(), 0, int(count))) - - var errFieldMismatch error - for itemRaw, length, err := enum.Next(1); length > 0; itemRaw, length, err = enum.Next(1) { - if err != nil { - return err - } - - err := func() error { - // item is a SWbemObject, but really a Win32_Process - item := itemRaw.ToIDispatch() - defer item.Release() - - ev := reflect.New(elemType) - if err = s.cWMIClient.loadEntity(ev.Interface(), item); err != nil { - if _, ok := err.(*ErrFieldMismatch); ok { - // We continue loading entities even in the face of field mismatch errors. - // If we encounter any other error, that other error is returned. Otherwise, - // an ErrFieldMismatch is returned. - errFieldMismatch = err - } else { - return err - } - } - if mat != multiArgTypeStructPtr { - ev = ev.Elem() - } - dv.Set(reflect.Append(dv, ev)) - return nil - }() - if err != nil { - return err - } - } - //fmt.Println("queryBackground: Finished") - return errFieldMismatch -} diff --git a/vendor/github.com/yusufpapurcu/wmi/wmi.go b/vendor/github.com/yusufpapurcu/wmi/wmi.go deleted file mode 100644 index 03f386ed59..0000000000 --- a/vendor/github.com/yusufpapurcu/wmi/wmi.go +++ /dev/null @@ -1,603 +0,0 @@ -//go:build windows -// +build windows - -/* -Package wmi provides a WQL interface for WMI on Windows. - -Example code to print names of running processes: - - type Win32_Process struct { - Name string - } - - func main() { - var dst []Win32_Process - q := wmi.CreateQuery(&dst, "") - err := wmi.Query(q, &dst) - if err != nil { - log.Fatal(err) - } - for i, v := range dst { - println(i, v.Name) - } - } -*/ -package wmi - -import ( - "bytes" - "errors" - "fmt" - "log" - "os" - "reflect" - "runtime" - "strconv" - "strings" - "sync" - "time" - - "github.com/go-ole/go-ole" - "github.com/go-ole/go-ole/oleutil" -) - -var l = log.New(os.Stdout, "", log.LstdFlags) - -var ( - ErrInvalidEntityType = errors.New("wmi: invalid entity type") - // ErrNilCreateObject is the error returned if CreateObject returns nil even - // if the error was nil. - ErrNilCreateObject = errors.New("wmi: create object returned nil") - lock sync.Mutex -) - -// S_FALSE is returned by CoInitializeEx if it was already called on this thread. -const S_FALSE = 0x00000001 - -// QueryNamespace invokes Query with the given namespace on the local machine. -func QueryNamespace(query string, dst interface{}, namespace string) error { - return Query(query, dst, nil, namespace) -} - -// Query runs the WQL query and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -// -// Query is a wrapper around DefaultClient.Query. -func Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - if DefaultClient.SWbemServicesClient == nil { - return DefaultClient.Query(query, dst, connectServerArgs...) - } - return DefaultClient.SWbemServicesClient.Query(query, dst, connectServerArgs...) -} - -// CallMethod calls a method named methodName on an instance of the class named -// className, with the given params. -// -// CallMethod is a wrapper around DefaultClient.CallMethod. -func CallMethod(connectServerArgs []interface{}, className, methodName string, params []interface{}) (int32, error) { - return DefaultClient.CallMethod(connectServerArgs, className, methodName, params) -} - -// A Client is an WMI query client. -// -// Its zero value (DefaultClient) is a usable client. -type Client struct { - // NonePtrZero specifies if nil values for fields which aren't pointers - // should be returned as the field types zero value. - // - // Setting this to true allows stucts without pointer fields to be used - // without the risk failure should a nil value returned from WMI. - NonePtrZero bool - - // PtrNil specifies if nil values for pointer fields should be returned - // as nil. - // - // Setting this to true will set pointer fields to nil where WMI - // returned nil, otherwise the types zero value will be returned. - PtrNil bool - - // AllowMissingFields specifies that struct fields not present in the - // query result should not result in an error. - // - // Setting this to true allows custom queries to be used with full - // struct definitions instead of having to define multiple structs. - AllowMissingFields bool - - // SWbemServiceClient is an optional SWbemServices object that can be - // initialized and then reused across multiple queries. If it is null - // then the method will initialize a new temporary client each time. - SWbemServicesClient *SWbemServices -} - -// DefaultClient is the default Client and is used by Query, QueryNamespace, and CallMethod. -var DefaultClient = &Client{} - -// coinitService coinitializes WMI service. If no error is returned, a cleanup function -// is returned which must be executed (usually deferred) to clean up allocated resources. -func (c *Client) coinitService(connectServerArgs ...interface{}) (*ole.IDispatch, func(), error) { - var unknown *ole.IUnknown - var wmi *ole.IDispatch - var serviceRaw *ole.VARIANT - - // be sure teardown happens in the reverse - // order from that which they were created - deferFn := func() { - if serviceRaw != nil { - serviceRaw.Clear() - } - if wmi != nil { - wmi.Release() - } - if unknown != nil { - unknown.Release() - } - ole.CoUninitialize() - } - - // if we error'ed here, clean up immediately - var err error - defer func() { - if err != nil { - deferFn() - } - }() - - err = ole.CoInitializeEx(0, ole.COINIT_MULTITHREADED) - if err != nil { - oleCode := err.(*ole.OleError).Code() - if oleCode != ole.S_OK && oleCode != S_FALSE { - return nil, nil, err - } - } - - unknown, err = oleutil.CreateObject("WbemScripting.SWbemLocator") - if err != nil { - return nil, nil, err - } else if unknown == nil { - return nil, nil, ErrNilCreateObject - } - - wmi, err = unknown.QueryInterface(ole.IID_IDispatch) - if err != nil { - return nil, nil, err - } - - // service is a SWbemServices - serviceRaw, err = oleutil.CallMethod(wmi, "ConnectServer", connectServerArgs...) - if err != nil { - return nil, nil, err - } - - return serviceRaw.ToIDispatch(), deferFn, nil -} - -// CallMethod calls a WMI method named methodName on an instance -// of the class named className. It passes in the arguments given -// in params. Use connectServerArgs to customize the machine and -// namespace; by default, the local machine and default namespace -// are used. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -func (c *Client) CallMethod(connectServerArgs []interface{}, className, methodName string, params []interface{}) (int32, error) { - service, cleanup, err := c.coinitService(connectServerArgs...) - if err != nil { - return 0, fmt.Errorf("coinit: %v", err) - } - defer cleanup() - - // Get class - classRaw, err := oleutil.CallMethod(service, "Get", className) - if err != nil { - return 0, fmt.Errorf("CallMethod Get class %s: %v", className, err) - } - class := classRaw.ToIDispatch() - defer classRaw.Clear() - - // Run method - resultRaw, err := oleutil.CallMethod(class, methodName, params...) - if err != nil { - return 0, fmt.Errorf("CallMethod %s.%s: %v", className, methodName, err) - } - resultInt, ok := resultRaw.Value().(int32) - if !ok { - return 0, fmt.Errorf("return value was not an int32: %v (%T)", resultRaw, resultRaw) - } - - return resultInt, nil -} - -// Query runs the WQL query and appends the values to dst. -// -// dst must have type *[]S or *[]*S, for some struct type S. Fields selected in -// the query must have the same name in dst. Supported types are all signed and -// unsigned integers, time.Time, string, bool, or a pointer to one of those. -// Array types are not supported. -// -// By default, the local machine and default namespace are used. These can be -// changed using connectServerArgs. See -// https://docs.microsoft.com/en-us/windows/desktop/WmiSdk/swbemlocator-connectserver -// for details. -func (c *Client) Query(query string, dst interface{}, connectServerArgs ...interface{}) error { - dv := reflect.ValueOf(dst) - if dv.Kind() != reflect.Ptr || dv.IsNil() { - return ErrInvalidEntityType - } - dv = dv.Elem() - mat, elemType := checkMultiArg(dv) - if mat == multiArgTypeInvalid { - return ErrInvalidEntityType - } - - lock.Lock() - defer lock.Unlock() - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - service, cleanup, err := c.coinitService(connectServerArgs...) - if err != nil { - return err - } - defer cleanup() - - // result is a SWBemObjectSet - resultRaw, err := oleutil.CallMethod(service, "ExecQuery", query) - if err != nil { - return err - } - result := resultRaw.ToIDispatch() - defer resultRaw.Clear() - - count, err := oleInt64(result, "Count") - if err != nil { - return err - } - - enumProperty, err := result.GetProperty("_NewEnum") - if err != nil { - return err - } - defer enumProperty.Clear() - - enum, err := enumProperty.ToIUnknown().IEnumVARIANT(ole.IID_IEnumVariant) - if err != nil { - return err - } - if enum == nil { - return fmt.Errorf("can't get IEnumVARIANT, enum is nil") - } - defer enum.Release() - - // Initialize a slice with Count capacity - dv.Set(reflect.MakeSlice(dv.Type(), 0, int(count))) - - var errFieldMismatch error - for itemRaw, length, err := enum.Next(1); length > 0; itemRaw, length, err = enum.Next(1) { - if err != nil { - return err - } - - err := func() error { - // item is a SWbemObject, but really a Win32_Process - item := itemRaw.ToIDispatch() - defer item.Release() - - ev := reflect.New(elemType) - if err = c.loadEntity(ev.Interface(), item); err != nil { - if _, ok := err.(*ErrFieldMismatch); ok { - // We continue loading entities even in the face of field mismatch errors. - // If we encounter any other error, that other error is returned. Otherwise, - // an ErrFieldMismatch is returned. - errFieldMismatch = err - } else { - return err - } - } - if mat != multiArgTypeStructPtr { - ev = ev.Elem() - } - dv.Set(reflect.Append(dv, ev)) - return nil - }() - if err != nil { - return err - } - } - return errFieldMismatch -} - -// ErrFieldMismatch is returned when a field is to be loaded into a different -// type than the one it was stored from, or when a field is missing or -// unexported in the destination struct. -// StructType is the type of the struct pointed to by the destination argument. -type ErrFieldMismatch struct { - StructType reflect.Type - FieldName string - Reason string -} - -func (e *ErrFieldMismatch) Error() string { - return fmt.Sprintf("wmi: cannot load field %q into a %q: %s", - e.FieldName, e.StructType, e.Reason) -} - -var timeType = reflect.TypeOf(time.Time{}) - -// loadEntity loads a SWbemObject into a struct pointer. -func (c *Client) loadEntity(dst interface{}, src *ole.IDispatch) (errFieldMismatch error) { - v := reflect.ValueOf(dst).Elem() - for i := 0; i < v.NumField(); i++ { - f := v.Field(i) - of := f - isPtr := f.Kind() == reflect.Ptr - n := v.Type().Field(i).Name - if n[0] < 'A' || n[0] > 'Z' { - continue - } - if !f.CanSet() { - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "CanSet() is false", - } - } - prop, err := oleutil.GetProperty(src, n) - if err != nil { - if !c.AllowMissingFields { - errFieldMismatch = &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "no such struct field", - } - } - continue - } - defer prop.Clear() - - if isPtr && !(c.PtrNil && prop.VT == 0x1) { - ptr := reflect.New(f.Type().Elem()) - f.Set(ptr) - f = f.Elem() - } - - if prop.VT == 0x1 { //VT_NULL - continue - } - - switch val := prop.Value().(type) { - case int8, int16, int32, int64, int: - v := reflect.ValueOf(val).Int() - switch f.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - f.SetInt(v) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - f.SetUint(uint64(v)) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not an integer class", - } - } - case uint8, uint16, uint32, uint64: - v := reflect.ValueOf(val).Uint() - switch f.Kind() { - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - f.SetInt(int64(v)) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - f.SetUint(v) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not an integer class", - } - } - case string: - switch f.Kind() { - case reflect.String: - f.SetString(val) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - iv, err := strconv.ParseInt(val, 10, 64) - if err != nil { - return err - } - f.SetInt(iv) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - uv, err := strconv.ParseUint(val, 10, 64) - if err != nil { - return err - } - f.SetUint(uv) - case reflect.Struct: - switch f.Type() { - case timeType: - if len(val) == 25 { - mins, err := strconv.Atoi(val[22:]) - if err != nil { - return err - } - val = val[:22] + fmt.Sprintf("%02d%02d", mins/60, mins%60) - } - t, err := time.Parse("20060102150405.000000-0700", val) - if err != nil { - return err - } - f.Set(reflect.ValueOf(t)) - } - } - case bool: - switch f.Kind() { - case reflect.Bool: - f.SetBool(val) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not a bool", - } - } - case float32: - switch f.Kind() { - case reflect.Float32: - f.SetFloat(float64(val)) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not a Float32", - } - } - case float64: - switch f.Kind() { - case reflect.Float32, reflect.Float64: - f.SetFloat(val) - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: "not a Float64", - } - } - - default: - if f.Kind() == reflect.Slice { - switch f.Type().Elem().Kind() { - case reflect.String: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetString(v.(string)) - } - f.Set(fArr) - } - case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetUint(reflect.ValueOf(v).Uint()) - } - f.Set(fArr) - } - case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: - safeArray := prop.ToArray() - if safeArray != nil { - arr := safeArray.ToValueArray() - fArr := reflect.MakeSlice(f.Type(), len(arr), len(arr)) - for i, v := range arr { - s := fArr.Index(i) - s.SetInt(reflect.ValueOf(v).Int()) - } - f.Set(fArr) - } - default: - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: fmt.Sprintf("unsupported slice type (%T)", val), - } - } - } else { - typeof := reflect.TypeOf(val) - if typeof == nil && (isPtr || c.NonePtrZero) { - if (isPtr && c.PtrNil) || (!isPtr && c.NonePtrZero) { - of.Set(reflect.Zero(of.Type())) - } - break - } - return &ErrFieldMismatch{ - StructType: of.Type(), - FieldName: n, - Reason: fmt.Sprintf("unsupported type (%T)", val), - } - } - } - } - return errFieldMismatch -} - -type multiArgType int - -const ( - multiArgTypeInvalid multiArgType = iota - multiArgTypeStruct - multiArgTypeStructPtr -) - -// checkMultiArg checks that v has type []S, []*S for some struct type S. -// -// It returns what category the slice's elements are, and the reflect.Type -// that represents S. -func checkMultiArg(v reflect.Value) (m multiArgType, elemType reflect.Type) { - if v.Kind() != reflect.Slice { - return multiArgTypeInvalid, nil - } - elemType = v.Type().Elem() - switch elemType.Kind() { - case reflect.Struct: - return multiArgTypeStruct, elemType - case reflect.Ptr: - elemType = elemType.Elem() - if elemType.Kind() == reflect.Struct { - return multiArgTypeStructPtr, elemType - } - } - return multiArgTypeInvalid, nil -} - -func oleInt64(item *ole.IDispatch, prop string) (int64, error) { - v, err := oleutil.GetProperty(item, prop) - if err != nil { - return 0, err - } - defer v.Clear() - - i := int64(v.Val) - return i, nil -} - -// CreateQuery returns a WQL query string that queries all columns of src. where -// is an optional string that is appended to the query, to be used with WHERE -// clauses. In such a case, the "WHERE" string should appear at the beginning. -// The wmi class is obtained by the name of the type. You can pass a optional -// class throught the variadic class parameter which is useful for anonymous -// structs. -func CreateQuery(src interface{}, where string, class ...string) string { - var b bytes.Buffer - b.WriteString("SELECT ") - s := reflect.Indirect(reflect.ValueOf(src)) - t := s.Type() - if s.Kind() == reflect.Slice { - t = t.Elem() - } - if t.Kind() != reflect.Struct { - return "" - } - var fields []string - for i := 0; i < t.NumField(); i++ { - fields = append(fields, t.Field(i).Name) - } - b.WriteString(strings.Join(fields, ", ")) - b.WriteString(" FROM ") - if len(class) > 0 { - b.WriteString(class[0]) - } else { - b.WriteString(t.Name()) - } - b.WriteString(" " + where) - return b.String() -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md b/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md deleted file mode 100644 index 773c9b6431..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/CONTRIBUTING.md +++ /dev/null @@ -1,27 +0,0 @@ -# Contributing to go.opentelemetry.io/auto/sdk - -The `go.opentelemetry.io/auto/sdk` module is a purpose built OpenTelemetry SDK. -It is designed to be: - -0. An OpenTelemetry compliant SDK -1. Instrumented by auto-instrumentation (serializable into OTLP JSON) -2. Lightweight -3. User-friendly - -These design choices are listed in the order of their importance. - -The primary design goal of this module is to be an OpenTelemetry SDK. -This means that it needs to implement the Go APIs found in `go.opentelemetry.io/otel`. - -Having met the requirement of SDK compliance, this module needs to provide code that the `go.opentelemetry.io/auto` module can instrument. -The chosen approach to meet this goal is to ensure the telemetry from the SDK is serializable into JSON encoded OTLP. -This ensures then that the serialized form is compatible with other OpenTelemetry systems, and the auto-instrumentation can use these systems to deserialize any telemetry it is sent. - -Outside of these first two goals, the intended use becomes relevant. -This package is intended to be used in the `go.opentelemetry.io/otel` global API as a default when the auto-instrumentation is running. -Because of this, this package needs to not add unnecessary dependencies to that API. -Ideally, it adds none. -It also needs to operate efficiently. - -Finally, this module is designed to be user-friendly to Go development. -It hides complexity in order to provide simpler APIs when the previous goals can all still be met. diff --git a/vendor/go.opentelemetry.io/auto/sdk/LICENSE b/vendor/go.opentelemetry.io/auto/sdk/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/go.opentelemetry.io/auto/sdk/VERSIONING.md b/vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md deleted file mode 100644 index 088d19a6ce..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/VERSIONING.md +++ /dev/null @@ -1,15 +0,0 @@ -# Versioning - -This document describes the versioning policy for this module. -This policy is designed so the following goals can be achieved. - -**Users are provided a codebase of value that is stable and secure.** - -## Policy - -* Versioning of this module will be idiomatic of a Go project using [Go modules](https://github.com/golang/go/wiki/Modules). - * [Semantic import versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) will be used. - * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html). - * Any `v2` or higher version of this module will be included as a `/vN` at the end of the module path used in `go.mod` files and in the package import path. - -* GitHub releases will be made for all releases. diff --git a/vendor/go.opentelemetry.io/auto/sdk/doc.go b/vendor/go.opentelemetry.io/auto/sdk/doc.go deleted file mode 100644 index ad73d8cb9d..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/doc.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package sdk provides an auto-instrumentable OpenTelemetry SDK. - -An [go.opentelemetry.io/auto.Instrumentation] can be configured to target the -process running this SDK. In that case, all telemetry the SDK produces will be -processed and handled by that [go.opentelemetry.io/auto.Instrumentation]. - -By default, if there is no [go.opentelemetry.io/auto.Instrumentation] set to -auto-instrument the SDK, the SDK will not generate any telemetry. -*/ -package sdk diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go deleted file mode 100644 index af6ef171f6..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/attr.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -// Attr is a key-value pair. -type Attr struct { - Key string `json:"key,omitempty"` - Value Value `json:"value,omitempty"` -} - -// String returns an Attr for a string value. -func String(key, value string) Attr { - return Attr{key, StringValue(value)} -} - -// Int64 returns an Attr for an int64 value. -func Int64(key string, value int64) Attr { - return Attr{key, Int64Value(value)} -} - -// Int returns an Attr for an int value. -func Int(key string, value int) Attr { - return Int64(key, int64(value)) -} - -// Float64 returns an Attr for a float64 value. -func Float64(key string, value float64) Attr { - return Attr{key, Float64Value(value)} -} - -// Bool returns an Attr for a bool value. -func Bool(key string, value bool) Attr { - return Attr{key, BoolValue(value)} -} - -// Bytes returns an Attr for a []byte value. -// The passed slice must not be changed after it is passed. -func Bytes(key string, value []byte) Attr { - return Attr{key, BytesValue(value)} -} - -// Slice returns an Attr for a []Value value. -// The passed slice must not be changed after it is passed. -func Slice(key string, value ...Value) Attr { - return Attr{key, SliceValue(value...)} -} - -// Map returns an Attr for a map value. -// The passed slice must not be changed after it is passed. -func Map(key string, value ...Attr) Attr { - return Attr{key, MapValue(value...)} -} - -// Equal returns if a is equal to b. -func (a Attr) Equal(b Attr) bool { - return a.Key == b.Key && a.Value.Equal(b.Value) -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go deleted file mode 100644 index 949e2165c0..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package telemetry provides a lightweight representations of OpenTelemetry -telemetry that is compatible with the OTLP JSON protobuf encoding. -*/ -package telemetry diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go deleted file mode 100644 index 2950fdb42e..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/id.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "encoding/hex" - "errors" - "fmt" -) - -const ( - traceIDSize = 16 - spanIDSize = 8 -) - -// TraceID is a custom data type that is used for all trace IDs. -type TraceID [traceIDSize]byte - -// String returns the hex string representation form of a TraceID. -func (tid TraceID) String() string { - return hex.EncodeToString(tid[:]) -} - -// IsEmpty returns false if id contains at least one non-zero byte. -func (tid TraceID) IsEmpty() bool { - return tid == [traceIDSize]byte{} -} - -// MarshalJSON converts the trace ID into a hex string enclosed in quotes. -func (tid TraceID) MarshalJSON() ([]byte, error) { - if tid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(tid[:]) -} - -// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in -// quotes. -func (tid *TraceID) UnmarshalJSON(data []byte) error { - *tid = [traceIDSize]byte{} - return unmarshalJSON(tid[:], data) -} - -// SpanID is a custom data type that is used for all span IDs. -type SpanID [spanIDSize]byte - -// String returns the hex string representation form of a SpanID. -func (sid SpanID) String() string { - return hex.EncodeToString(sid[:]) -} - -// IsEmpty returns true if the span ID contains at least one non-zero byte. -func (sid SpanID) IsEmpty() bool { - return sid == [spanIDSize]byte{} -} - -// MarshalJSON converts span ID into a hex string enclosed in quotes. -func (sid SpanID) MarshalJSON() ([]byte, error) { - if sid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(sid[:]) -} - -// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes. -func (sid *SpanID) UnmarshalJSON(data []byte) error { - *sid = [spanIDSize]byte{} - return unmarshalJSON(sid[:], data) -} - -// marshalJSON converts id into a hex string enclosed in quotes. -func marshalJSON(id []byte) ([]byte, error) { - // Plus 2 quote chars at the start and end. - hexLen := hex.EncodedLen(len(id)) + 2 - - b := make([]byte, hexLen) - hex.Encode(b[1:hexLen-1], id) - b[0], b[hexLen-1] = '"', '"' - - return b, nil -} - -// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. -func unmarshalJSON(dst, src []byte) error { - if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' { - src = src[1 : l-1] - } - nLen := len(src) - if nLen == 0 { - return nil - } - - if len(dst) != hex.DecodedLen(nLen) { - return errors.New("invalid length for ID") - } - - _, err := hex.Decode(dst, src) - if err != nil { - return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go deleted file mode 100644 index 5bb3b16c70..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/number.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "encoding/json" - "strconv" -) - -// protoInt64 represents the protobuf encoding of integers which can be either -// strings or integers. -type protoInt64 int64 - -// Int64 returns the protoInt64 as an int64. -func (i *protoInt64) Int64() int64 { return int64(*i) } - -// UnmarshalJSON decodes both strings and integers. -func (i *protoInt64) UnmarshalJSON(data []byte) error { - if data[0] == '"' { - var str string - if err := json.Unmarshal(data, &str); err != nil { - return err - } - parsedInt, err := strconv.ParseInt(str, 10, 64) - if err != nil { - return err - } - *i = protoInt64(parsedInt) - } else { - var parsedInt int64 - if err := json.Unmarshal(data, &parsedInt); err != nil { - return err - } - *i = protoInt64(parsedInt) - } - return nil -} - -// protoUint64 represents the protobuf encoding of integers which can be either -// strings or integers. -type protoUint64 uint64 - -// Uint64 returns the protoUint64 as a uint64. -func (i *protoUint64) Uint64() uint64 { return uint64(*i) } - -// UnmarshalJSON decodes both strings and integers. -func (i *protoUint64) UnmarshalJSON(data []byte) error { - if data[0] == '"' { - var str string - if err := json.Unmarshal(data, &str); err != nil { - return err - } - parsedUint, err := strconv.ParseUint(str, 10, 64) - if err != nil { - return err - } - *i = protoUint64(parsedUint) - } else { - var parsedUint uint64 - if err := json.Unmarshal(data, &parsedUint); err != nil { - return err - } - *i = protoUint64(parsedUint) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go deleted file mode 100644 index cecad8bae3..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/resource.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Resource information. -type Resource struct { - // Attrs are the set of attributes that describe the resource. Attribute - // keys MUST be unique (it is not allowed to have more than one attribute - // with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // DroppedAttrs is the number of dropped attributes. If the value - // is 0, then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r. -func (r *Resource) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Resource type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Resource field: %#v", keyIface) - } - - switch key { - case "attributes": - err = decoder.Decode(&r.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&r.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go deleted file mode 100644 index b6f2e28d40..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/scope.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Scope is the identifying values of the instrumentation scope. -type Scope struct { - Name string `json:"name,omitempty"` - Version string `json:"version,omitempty"` - Attrs []Attr `json:"attributes,omitempty"` - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r. -func (s *Scope) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Scope type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Scope field: %#v", keyIface) - } - - switch key { - case "name": - err = decoder.Decode(&s.Name) - case "version": - err = decoder.Decode(&s.Version) - case "attributes": - err = decoder.Decode(&s.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&s.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go deleted file mode 100644 index 67f80b6aa0..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/span.go +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "bytes" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "time" -) - -// A Span represents a single operation performed by a single component of the -// system. -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. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - TraceID TraceID `json:"traceId,omitempty"` - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - SpanID SpanID `json:"spanId,omitempty"` - // trace_state conveys information about request position in multiple distributed tracing graphs. - // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header - // See also https://github.com/w3c/distributed-tracing for more details about this field. - TraceState string `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 SpanID `json:"parentSpanId,omitempty"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether a span's parent - // is remote. The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // When creating span messages, if the message is logically forwarded from another source - // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD - // be copied as-is. If creating from a source that does not have an equivalent flags field - // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST - // be set to zero. - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // - // [Optional]. - Flags uint32 `json:"flags,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 semantically required to be set to non-empty string. - // Empty value is equivalent to an unknown span name. - // - // This field is required. - Name string `json:"name"` - // Distinguishes between spans generated in a particular context. For example, - // two spans with the same name may be distinguished using `CLIENT` (caller) - // and `SERVER` (callee) to identify queueing latency associated with the span. - Kind SpanKind `json:"kind,omitempty"` - // start_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - StartTime time.Time `json:"startTimeUnixNano,omitempty"` - // end_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - EndTime time.Time `json:"endTimeUnixNano,omitempty"` - // attributes is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "example.com/myattribute": true - // "example.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is 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. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` - // events is a collection of Event items. - Events []*SpanEvent `json:"events,omitempty"` - // dropped_events_count is the number of dropped events. If the value is 0, then no - // events were dropped. - DroppedEvents uint32 `json:"droppedEventsCount,omitempty"` - // links is a collection of Links, which are references from this span to a span - // in the same or different trace. - Links []*SpanLink `json:"links,omitempty"` - // dropped_links_count is the number of dropped links after the maximum size was - // enforced. If this value is 0, then no links were dropped. - DroppedLinks uint32 `json:"droppedLinksCount,omitempty"` - // An optional final status for this span. Semantically when Status isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status *Status `json:"status,omitempty"` -} - -// MarshalJSON encodes s into OTLP formatted JSON. -func (s Span) MarshalJSON() ([]byte, error) { - startT := s.StartTime.UnixNano() - if s.StartTime.IsZero() || startT < 0 { - startT = 0 - } - - endT := s.EndTime.UnixNano() - if s.EndTime.IsZero() || endT < 0 { - endT = 0 - } - - // Override non-empty default SpanID marshal and omitempty. - var parentSpanId string - if !s.ParentSpanID.IsEmpty() { - b := make([]byte, hex.EncodedLen(spanIDSize)) - hex.Encode(b, s.ParentSpanID[:]) - parentSpanId = string(b) - } - - type Alias Span - return json.Marshal(struct { - Alias - ParentSpanID string `json:"parentSpanId,omitempty"` - StartTime uint64 `json:"startTimeUnixNano,omitempty"` - EndTime uint64 `json:"endTimeUnixNano,omitempty"` - }{ - Alias: Alias(s), - ParentSpanID: parentSpanId, - StartTime: uint64(startT), // nolint:gosec // >0 checked above. - EndTime: uint64(endT), // nolint:gosec // >0 checked above. - }) -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into s. -func (s *Span) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Span type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Span field: %#v", keyIface) - } - - switch key { - case "traceId", "trace_id": - err = decoder.Decode(&s.TraceID) - case "spanId", "span_id": - err = decoder.Decode(&s.SpanID) - case "traceState", "trace_state": - err = decoder.Decode(&s.TraceState) - case "parentSpanId", "parent_span_id": - err = decoder.Decode(&s.ParentSpanID) - case "flags": - err = decoder.Decode(&s.Flags) - case "name": - err = decoder.Decode(&s.Name) - case "kind": - err = decoder.Decode(&s.Kind) - case "startTimeUnixNano", "start_time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec // Overflow checked. - s.StartTime = time.Unix(0, v) - case "endTimeUnixNano", "end_time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec // Overflow checked. - s.EndTime = time.Unix(0, v) - case "attributes": - err = decoder.Decode(&s.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&s.DroppedAttrs) - case "events": - err = decoder.Decode(&s.Events) - case "droppedEventsCount", "dropped_events_count": - err = decoder.Decode(&s.DroppedEvents) - case "links": - err = decoder.Decode(&s.Links) - case "droppedLinksCount", "dropped_links_count": - err = decoder.Decode(&s.DroppedLinks) - case "status": - err = decoder.Decode(&s.Status) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// SpanFlags represents constants used to interpret the -// Span.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) -// -// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. -// -// Note that Span flags were introduced in version 1.1 of the -// OpenTelemetry protocol. Older Span producers do not set this -// field, consequently consumers should not rely on the absence of a -// particular flag bit to indicate the presence of a particular feature. -type SpanFlags int32 - -const ( - // SpanFlagsTraceFlagsMask is a mask for trace-flags. - // - // Bits 0-7 are used for trace flags. - SpanFlagsTraceFlagsMask SpanFlags = 255 - // SpanFlagsContextHasIsRemoteMask is a mask for HAS_IS_REMOTE status. - // - // Bits 8 and 9 are used to indicate that the parent span or link span is - // remote. Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. - SpanFlagsContextHasIsRemoteMask SpanFlags = 256 - // SpanFlagsContextIsRemoteMask is a mask for IS_REMOTE status. - // - // Bits 8 and 9 are used to indicate that the parent span or link span is - // remote. Bit 9 (`IS_REMOTE`) indicates whether the span or link is - // remote. - SpanFlagsContextIsRemoteMask SpanFlags = 512 -) - -// SpanKind is the type of span. Can be used to specify additional relationships between spans -// in addition to a parent/child relationship. -type SpanKind int32 - -const ( - // SpanKindInternal indicates that the span represents an internal - // operation within an application, as opposed to an operation happening at - // the boundaries. - SpanKindInternal SpanKind = 1 - // SpanKindServer indicates that the span covers server-side handling of an - // RPC or other remote network request. - SpanKindServer SpanKind = 2 - // SpanKindClient indicates that the span describes a request to some - // remote service. - SpanKindClient SpanKind = 3 - // SpanKindProducer indicates that the span describes a producer sending a - // message to a broker. Unlike SpanKindClient and SpanKindServer, there is - // often no direct critical path latency relationship between producer and - // consumer spans. A SpanKindProducer span ends when the message was - // accepted by the broker while the logical processing of the message might - // span a much longer time. - SpanKindProducer SpanKind = 4 - // SpanKindConsumer indicates that the span describes a consumer receiving - // a message from a broker. Like SpanKindProducer, there is often no direct - // critical path latency relationship between producer and consumer spans. - SpanKindConsumer SpanKind = 5 -) - -// SpanEvent is a time-stamped annotation of the span, consisting of user-supplied -// text description and key-value pairs. -type SpanEvent struct { - // time_unix_nano is the time the event occurred. - Time time.Time `json:"timeUnixNano,omitempty"` - // name of the event. - // This field is semantically required to be set to non-empty string. - Name string `json:"name,omitempty"` - // attributes is a collection of attribute key/value pairs on the event. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// MarshalJSON encodes e into OTLP formatted JSON. -func (e SpanEvent) MarshalJSON() ([]byte, error) { - t := e.Time.UnixNano() - if e.Time.IsZero() || t < 0 { - t = 0 - } - - type Alias SpanEvent - return json.Marshal(struct { - Alias - Time uint64 `json:"timeUnixNano,omitempty"` - }{ - Alias: Alias(e), - Time: uint64(t), //nolint:gosec // >0 checked above - }) -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into se. -func (se *SpanEvent) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid SpanEvent type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid SpanEvent field: %#v", keyIface) - } - - switch key { - case "timeUnixNano", "time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) //nolint:gosec // Overflow checked. - se.Time = time.Unix(0, v) - case "name": - err = decoder.Decode(&se.Name) - case "attributes": - err = decoder.Decode(&se.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&se.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// SpanLink is a reference 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 SpanLink struct { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceID TraceID `json:"traceId,omitempty"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanID SpanID `json:"spanId,omitempty"` - // The trace_state associated with the link. - TraceState string `json:"traceState,omitempty"` - // attributes is a collection of attribute key/value pairs on the link. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether the link is remote. - // The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. - // - // [Optional]. - Flags uint32 `json:"flags,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into sl. -func (sl *SpanLink) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid SpanLink type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid SpanLink field: %#v", keyIface) - } - - switch key { - case "traceId", "trace_id": - err = decoder.Decode(&sl.TraceID) - case "spanId", "span_id": - err = decoder.Decode(&sl.SpanID) - case "traceState", "trace_state": - err = decoder.Decode(&sl.TraceState) - case "attributes": - err = decoder.Decode(&sl.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&sl.DroppedAttrs) - case "flags": - err = decoder.Decode(&sl.Flags) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go deleted file mode 100644 index a2802764f8..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/status.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -// StatusCode is the status of a Span. -// -// For the semantics of status codes see -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status -type StatusCode int32 - -const ( - // StatusCodeUnset is the default status. - StatusCodeUnset StatusCode = 0 - // StatusCodeOK is used when the Span has been validated by an Application - // developer or Operator to have completed successfully. - StatusCodeOK StatusCode = 1 - // StatusCodeError is used when the Span contains an error. - StatusCodeError StatusCode = 2 -) - -var statusCodeStrings = []string{ - "Unset", - "OK", - "Error", -} - -func (s StatusCode) String() string { - if s >= 0 && int(s) < len(statusCodeStrings) { - return statusCodeStrings[s] - } - return "" -} - -// The Status type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. -type Status struct { - // A developer-facing human readable error message. - Message string `json:"message,omitempty"` - // The status code. - Code StatusCode `json:"code,omitempty"` -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go deleted file mode 100644 index 44197b8084..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/traces.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Traces represents the traces data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP traces data but do -// not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type Traces struct { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceSpans []*ResourceSpans `json:"resourceSpans,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into td. -func (td *Traces) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid TracesData type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid TracesData field: %#v", keyIface) - } - - switch key { - case "resourceSpans", "resource_spans": - err = decoder.Decode(&td.ResourceSpans) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// ResourceSpans is a collection of ScopeSpans from a Resource. -type ResourceSpans struct { - // The resource for the spans in this message. - // If this field is not set then no resource info is known. - Resource Resource `json:"resource"` - // A list of ScopeSpans that originate from a resource. - ScopeSpans []*ScopeSpans `json:"scopeSpans,omitempty"` - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_spans" field which have their own schema_url field. - SchemaURL string `json:"schemaUrl,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into rs. -func (rs *ResourceSpans) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid ResourceSpans type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid ResourceSpans field: %#v", keyIface) - } - - switch key { - case "resource": - err = decoder.Decode(&rs.Resource) - case "scopeSpans", "scope_spans": - err = decoder.Decode(&rs.ScopeSpans) - case "schemaUrl", "schema_url": - err = decoder.Decode(&rs.SchemaURL) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// ScopeSpans is a collection of Spans produced by an InstrumentationScope. -type ScopeSpans struct { - // The instrumentation scope information for the spans in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope *Scope `json:"scope"` - // A list of Spans that originate from an instrumentation scope. - Spans []*Span `json:"spans,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the span data - // is recorded in. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all spans and span events in the "spans" field. - SchemaURL string `json:"schemaUrl,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into ss. -func (ss *ScopeSpans) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid ScopeSpans type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid ScopeSpans field: %#v", keyIface) - } - - switch key { - case "scope": - err = decoder.Decode(&ss.Scope) - case "spans": - err = decoder.Decode(&ss.Spans) - case "schemaUrl", "schema_url": - err = decoder.Decode(&ss.SchemaURL) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go b/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go deleted file mode 100644 index 022768bb50..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/internal/telemetry/value.go +++ /dev/null @@ -1,450 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry - -import ( - "bytes" - "cmp" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "slices" - "strconv" - "unsafe" -) - -// A Value represents a structured value. -// A zero value is valid and represents an empty value. -type Value struct { - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint:unused // This is indeed used. - - // num holds the value for Int64, Float64, and Bool. It holds the length - // for String, Bytes, Slice, Map. - num uint64 - // any holds either the KindBool, KindInt64, KindFloat64, stringptr, - // bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64 - // then the value of Value is in num as described above. Otherwise, it - // contains the value wrapped in the appropriate type. - any any -} - -type ( - // sliceptr represents a value in Value.any for KindString Values. - stringptr *byte - // bytesptr represents a value in Value.any for KindBytes Values. - bytesptr *byte - // sliceptr represents a value in Value.any for KindSlice Values. - sliceptr *Value - // mapptr represents a value in Value.any for KindMap Values. - mapptr *Attr -) - -// ValueKind is the kind of a [Value]. -type ValueKind int - -// ValueKind values. -const ( - ValueKindEmpty ValueKind = iota - ValueKindBool - ValueKindFloat64 - ValueKindInt64 - ValueKindString - ValueKindBytes - ValueKindSlice - ValueKindMap -) - -var valueKindStrings = []string{ - "Empty", - "Bool", - "Float64", - "Int64", - "String", - "Bytes", - "Slice", - "Map", -} - -func (k ValueKind) String() string { - if k >= 0 && int(k) < len(valueKindStrings) { - return valueKindStrings[k] - } - return "" -} - -// StringValue returns a new [Value] for a string. -func StringValue(v string) Value { - return Value{ - num: uint64(len(v)), - any: stringptr(unsafe.StringData(v)), - } -} - -// IntValue returns a [Value] for an int. -func IntValue(v int) Value { return Int64Value(int64(v)) } - -// Int64Value returns a [Value] for an int64. -func Int64Value(v int64) Value { - return Value{num: uint64(v), any: ValueKindInt64} //nolint:gosec // Raw value conv. -} - -// Float64Value returns a [Value] for a float64. -func Float64Value(v float64) Value { - return Value{num: math.Float64bits(v), any: ValueKindFloat64} -} - -// BoolValue returns a [Value] for a bool. -func BoolValue(v bool) Value { //nolint:revive // Not a control flag. - var n uint64 - if v { - n = 1 - } - return Value{num: n, any: ValueKindBool} -} - -// BytesValue returns a [Value] for a byte slice. The passed slice must not be -// changed after it is passed. -func BytesValue(v []byte) Value { - return Value{ - num: uint64(len(v)), - any: bytesptr(unsafe.SliceData(v)), - } -} - -// SliceValue returns a [Value] for a slice of [Value]. The passed slice must -// not be changed after it is passed. -func SliceValue(vs ...Value) Value { - return Value{ - num: uint64(len(vs)), - any: sliceptr(unsafe.SliceData(vs)), - } -} - -// MapValue returns a new [Value] for a slice of key-value pairs. The passed -// slice must not be changed after it is passed. -func MapValue(kvs ...Attr) Value { - return Value{ - num: uint64(len(kvs)), - any: mapptr(unsafe.SliceData(kvs)), - } -} - -// AsString returns the value held by v as a string. -func (v Value) AsString() string { - if sp, ok := v.any.(stringptr); ok { - return unsafe.String(sp, v.num) - } - // TODO: error handle - return "" -} - -// asString returns the value held by v as a string. It will panic if the Value -// is not KindString. -func (v Value) asString() string { - return unsafe.String(v.any.(stringptr), v.num) -} - -// AsInt64 returns the value held by v as an int64. -func (v Value) AsInt64() int64 { - if v.Kind() != ValueKindInt64 { - // TODO: error handle - return 0 - } - return v.asInt64() -} - -// asInt64 returns the value held by v as an int64. If v is not of KindInt64, -// this will return garbage. -func (v Value) asInt64() int64 { - // Assumes v.num was a valid int64 (overflow not checked). - return int64(v.num) //nolint:gosec // Bounded. -} - -// AsBool returns the value held by v as a bool. -func (v Value) AsBool() bool { - if v.Kind() != ValueKindBool { - // TODO: error handle - return false - } - return v.asBool() -} - -// asBool returns the value held by v as a bool. If v is not of KindBool, this -// will return garbage. -func (v Value) asBool() bool { return v.num == 1 } - -// AsFloat64 returns the value held by v as a float64. -func (v Value) AsFloat64() float64 { - if v.Kind() != ValueKindFloat64 { - // TODO: error handle - return 0 - } - return v.asFloat64() -} - -// asFloat64 returns the value held by v as a float64. If v is not of -// KindFloat64, this will return garbage. -func (v Value) asFloat64() float64 { return math.Float64frombits(v.num) } - -// AsBytes returns the value held by v as a []byte. -func (v Value) AsBytes() []byte { - if sp, ok := v.any.(bytesptr); ok { - return unsafe.Slice((*byte)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asBytes returns the value held by v as a []byte. It will panic if the Value -// is not KindBytes. -func (v Value) asBytes() []byte { - return unsafe.Slice((*byte)(v.any.(bytesptr)), v.num) -} - -// AsSlice returns the value held by v as a []Value. -func (v Value) AsSlice() []Value { - if sp, ok := v.any.(sliceptr); ok { - return unsafe.Slice((*Value)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asSlice returns the value held by v as a []Value. It will panic if the Value -// is not KindSlice. -func (v Value) asSlice() []Value { - return unsafe.Slice((*Value)(v.any.(sliceptr)), v.num) -} - -// AsMap returns the value held by v as a []Attr. -func (v Value) AsMap() []Attr { - if sp, ok := v.any.(mapptr); ok { - return unsafe.Slice((*Attr)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asMap returns the value held by v as a []Attr. It will panic if the -// Value is not KindMap. -func (v Value) asMap() []Attr { - return unsafe.Slice((*Attr)(v.any.(mapptr)), v.num) -} - -// Kind returns the Kind of v. -func (v Value) Kind() ValueKind { - switch x := v.any.(type) { - case ValueKind: - return x - case stringptr: - return ValueKindString - case bytesptr: - return ValueKindBytes - case sliceptr: - return ValueKindSlice - case mapptr: - return ValueKindMap - default: - return ValueKindEmpty - } -} - -// Empty returns if v does not hold any value. -func (v Value) Empty() bool { return v.Kind() == ValueKindEmpty } - -// Equal returns if v is equal to w. -func (v Value) Equal(w Value) bool { - k1 := v.Kind() - k2 := w.Kind() - if k1 != k2 { - return false - } - switch k1 { - case ValueKindInt64, ValueKindBool: - return v.num == w.num - case ValueKindString: - return v.asString() == w.asString() - case ValueKindFloat64: - return v.asFloat64() == w.asFloat64() - case ValueKindSlice: - return slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal) - case ValueKindMap: - sv := sortMap(v.asMap()) - sw := sortMap(w.asMap()) - return slices.EqualFunc(sv, sw, Attr.Equal) - case ValueKindBytes: - return bytes.Equal(v.asBytes(), w.asBytes()) - case ValueKindEmpty: - return true - default: - // TODO: error handle - return false - } -} - -func sortMap(m []Attr) []Attr { - sm := make([]Attr, len(m)) - copy(sm, m) - slices.SortFunc(sm, func(a, b Attr) int { - return cmp.Compare(a.Key, b.Key) - }) - - return sm -} - -// String returns Value's value as a string, formatted like [fmt.Sprint]. -// -// The returned string is meant for debugging; -// the string representation is not stable. -func (v Value) String() string { - switch v.Kind() { - case ValueKindString: - return v.asString() - case ValueKindInt64: - // Assumes v.num was a valid int64 (overflow not checked). - return strconv.FormatInt(int64(v.num), 10) //nolint:gosec // Bounded. - case ValueKindFloat64: - return strconv.FormatFloat(v.asFloat64(), 'g', -1, 64) - case ValueKindBool: - return strconv.FormatBool(v.asBool()) - case ValueKindBytes: - return string(v.asBytes()) - case ValueKindMap: - return fmt.Sprint(v.asMap()) - case ValueKindSlice: - return fmt.Sprint(v.asSlice()) - case ValueKindEmpty: - return "" - default: - // Try to handle this as gracefully as possible. - // - // Don't panic here. The goal here is to have developers find this - // first if a slog.Kind is is not handled. It is - // preferable to have user's open issue asking why their attributes - // have a "unhandled: " prefix than say that their code is panicking. - return fmt.Sprintf("", v.Kind()) - } -} - -// MarshalJSON encodes v into OTLP formatted JSON. -func (v *Value) MarshalJSON() ([]byte, error) { - switch v.Kind() { - case ValueKindString: - return json.Marshal(struct { - Value string `json:"stringValue"` - }{v.asString()}) - case ValueKindInt64: - return json.Marshal(struct { - Value string `json:"intValue"` - }{strconv.FormatInt(int64(v.num), 10)}) //nolint:gosec // Raw value conv. - case ValueKindFloat64: - return json.Marshal(struct { - Value float64 `json:"doubleValue"` - }{v.asFloat64()}) - case ValueKindBool: - return json.Marshal(struct { - Value bool `json:"boolValue"` - }{v.asBool()}) - case ValueKindBytes: - return json.Marshal(struct { - Value []byte `json:"bytesValue"` - }{v.asBytes()}) - case ValueKindMap: - return json.Marshal(struct { - Value struct { - Values []Attr `json:"values"` - } `json:"kvlistValue"` - }{struct { - Values []Attr `json:"values"` - }{v.asMap()}}) - case ValueKindSlice: - return json.Marshal(struct { - Value struct { - Values []Value `json:"values"` - } `json:"arrayValue"` - }{struct { - Values []Value `json:"values"` - }{v.asSlice()}}) - case ValueKindEmpty: - return nil, nil - default: - return nil, fmt.Errorf("unknown Value kind: %s", v.Kind().String()) - } -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into v. -func (v *Value) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Value type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Value key: %#v", keyIface) - } - - switch key { - case "stringValue", "string_value": - var val string - err = decoder.Decode(&val) - *v = StringValue(val) - case "boolValue", "bool_value": - var val bool - err = decoder.Decode(&val) - *v = BoolValue(val) - case "intValue", "int_value": - var val protoInt64 - err = decoder.Decode(&val) - *v = Int64Value(val.Int64()) - case "doubleValue", "double_value": - var val float64 - err = decoder.Decode(&val) - *v = Float64Value(val) - case "bytesValue", "bytes_value": - var val64 string - if err := decoder.Decode(&val64); err != nil { - return err - } - var val []byte - val, err = base64.StdEncoding.DecodeString(val64) - *v = BytesValue(val) - case "arrayValue", "array_value": - var val struct{ Values []Value } - err = decoder.Decode(&val) - *v = SliceValue(val.Values...) - case "kvlistValue", "kvlist_value": - var val struct{ Values []Attr } - err = decoder.Decode(&val) - *v = MapValue(val.Values...) - default: - // Skip unknown. - continue - } - // Use first valid. Ignore the rest. - return err - } - - // Only unknown fields. Return nil without unmarshaling any value. - return nil -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/limit.go b/vendor/go.opentelemetry.io/auto/sdk/limit.go deleted file mode 100644 index 86babf1a88..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/limit.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sdk - -import ( - "log/slog" - "os" - "strconv" -) - -// maxSpan are the span limits resolved during startup. -var maxSpan = newSpanLimits() - -type spanLimits struct { - // Attrs is the number of allowed attributes for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the - // environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if - // that is not set, is used. - Attrs int - // AttrValueLen is the maximum attribute value length allowed for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the - // environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1 - // if that is not set, is used. - AttrValueLen int - // Events is the number of allowed events for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set. - Events int - // EventAttrs is the number of allowed attributes for a span event. - // - // The is resolved from the environment variable value for the - // OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set. - EventAttrs int - // Links is the number of allowed Links for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set. - Links int - // LinkAttrs is the number of allowed attributes for a span link. - // - // This is resolved from the environment variable value for the - // OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set. - LinkAttrs int -} - -func newSpanLimits() spanLimits { - return spanLimits{ - Attrs: firstEnv( - 128, - "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT", - "OTEL_ATTRIBUTE_COUNT_LIMIT", - ), - AttrValueLen: firstEnv( - -1, // Unlimited. - "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT", - "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT", - ), - Events: firstEnv(128, "OTEL_SPAN_EVENT_COUNT_LIMIT"), - EventAttrs: firstEnv(128, "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT"), - Links: firstEnv(128, "OTEL_SPAN_LINK_COUNT_LIMIT"), - LinkAttrs: firstEnv(128, "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT"), - } -} - -// firstEnv returns the parsed integer value of the first matching environment -// variable from keys. The defaultVal is returned if the value is not an -// integer or no match is found. -func firstEnv(defaultVal int, keys ...string) int { - for _, key := range keys { - strV := os.Getenv(key) - if strV == "" { - continue - } - - v, err := strconv.Atoi(strV) - if err == nil { - return v - } - slog.Warn( - "invalid limit environment variable", - "error", err, - "key", key, - "value", strV, - ) - } - - return defaultVal -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/span.go b/vendor/go.opentelemetry.io/auto/sdk/span.go deleted file mode 100644 index 815d271ffb..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/span.go +++ /dev/null @@ -1,447 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sdk - -import ( - "encoding/json" - "fmt" - "math" - "reflect" - "runtime" - "strings" - "sync" - "sync/atomic" - "time" - "unicode/utf8" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/auto/sdk/internal/telemetry" -) - -type span struct { - noop.Span - - spanContext trace.SpanContext - sampled atomic.Bool - - mu sync.Mutex - traces *telemetry.Traces - span *telemetry.Span -} - -func (s *span) SpanContext() trace.SpanContext { - if s == nil { - return trace.SpanContext{} - } - // s.spanContext is immutable, do not acquire lock s.mu. - return s.spanContext -} - -func (s *span) IsRecording() bool { - if s == nil { - return false - } - - return s.sampled.Load() -} - -func (s *span) SetStatus(c codes.Code, msg string) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - if s.span.Status == nil { - s.span.Status = new(telemetry.Status) - } - - s.span.Status.Message = msg - - switch c { - case codes.Unset: - s.span.Status.Code = telemetry.StatusCodeUnset - case codes.Error: - s.span.Status.Code = telemetry.StatusCodeError - case codes.Ok: - s.span.Status.Code = telemetry.StatusCodeOK - } -} - -func (s *span) SetAttributes(attrs ...attribute.KeyValue) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - limit := maxSpan.Attrs - if limit == 0 { - // No attributes allowed. - n := int64(len(attrs)) - if n > 0 { - s.span.DroppedAttrs += uint32( //nolint:gosec // Bounds checked. - min(n, math.MaxUint32), - ) - } - return - } - - m := make(map[string]int) - for i, a := range s.span.Attrs { - m[a.Key] = i - } - - for _, a := range attrs { - val := convAttrValue(a.Value) - if val.Empty() { - s.span.DroppedAttrs++ - continue - } - - if idx, ok := m[string(a.Key)]; ok { - s.span.Attrs[idx] = telemetry.Attr{ - Key: string(a.Key), - Value: val, - } - } else if limit < 0 || len(s.span.Attrs) < limit { - s.span.Attrs = append(s.span.Attrs, telemetry.Attr{ - Key: string(a.Key), - Value: val, - }) - m[string(a.Key)] = len(s.span.Attrs) - 1 - } else { - s.span.DroppedAttrs++ - } - } -} - -// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The -// number of dropped attributes is also returned. -func convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) { - n := len(attrs) - if limit == 0 { - var out uint32 - if n > 0 { - out = uint32(min(int64(n), math.MaxUint32)) //nolint:gosec // Bounds checked. - } - return nil, out - } - - if limit < 0 { - // Unlimited. - return convAttrs(attrs), 0 - } - - if n < 0 { - n = 0 - } - - limit = min(n, limit) - return convAttrs(attrs[:limit]), uint32(n - limit) //nolint:gosec // Bounds checked. -} - -func convAttrs(attrs []attribute.KeyValue) []telemetry.Attr { - if len(attrs) == 0 { - // Avoid allocations if not necessary. - return nil - } - - out := make([]telemetry.Attr, 0, len(attrs)) - for _, attr := range attrs { - key := string(attr.Key) - val := convAttrValue(attr.Value) - if val.Empty() { - continue - } - out = append(out, telemetry.Attr{Key: key, Value: val}) - } - return out -} - -func convAttrValue(value attribute.Value) telemetry.Value { - switch value.Type() { - case attribute.BOOL: - return telemetry.BoolValue(value.AsBool()) - case attribute.INT64: - return telemetry.Int64Value(value.AsInt64()) - case attribute.FLOAT64: - return telemetry.Float64Value(value.AsFloat64()) - case attribute.STRING: - v := truncate(maxSpan.AttrValueLen, value.AsString()) - return telemetry.StringValue(v) - case attribute.BOOLSLICE: - slice := value.AsBoolSlice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.BoolValue(v)) - } - return telemetry.SliceValue(out...) - case attribute.INT64SLICE: - slice := value.AsInt64Slice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.Int64Value(v)) - } - return telemetry.SliceValue(out...) - case attribute.FLOAT64SLICE: - slice := value.AsFloat64Slice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.Float64Value(v)) - } - return telemetry.SliceValue(out...) - case attribute.STRINGSLICE: - slice := value.AsStringSlice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - v = truncate(maxSpan.AttrValueLen, v) - out = append(out, telemetry.StringValue(v)) - } - return telemetry.SliceValue(out...) - } - return telemetry.Value{} -} - -// truncate returns a truncated version of s such that it contains less than -// the limit number of characters. Truncation is applied by returning the limit -// number of valid characters contained in s. -// -// If limit is negative, it returns the original string. -// -// UTF-8 is supported. When truncating, all invalid characters are dropped -// before applying truncation. -// -// If s already contains less than the limit number of bytes, it is returned -// unchanged. No invalid characters are removed. -func truncate(limit int, s string) string { - // This prioritize performance in the following order based on the most - // common expected use-cases. - // - // - Short values less than the default limit (128). - // - Strings with valid encodings that exceed the limit. - // - No limit. - // - Strings with invalid encodings that exceed the limit. - if limit < 0 || len(s) <= limit { - return s - } - - // Optimistically, assume all valid UTF-8. - var b strings.Builder - count := 0 - for i, c := range s { - if c != utf8.RuneError { - count++ - if count > limit { - return s[:i] - } - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // Invalid encoding. - b.Grow(len(s) - 1) - _, _ = b.WriteString(s[:i]) - s = s[i:] - break - } - } - - // Fast-path, no invalid input. - if b.Cap() == 0 { - return s - } - - // Truncate while validating UTF-8. - for i := 0; i < len(s) && count < limit; { - c := s[i] - if c < utf8.RuneSelf { - // Optimization for single byte runes (common case). - _ = b.WriteByte(c) - i++ - count++ - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // We checked for all 1-byte runes above, this is a RuneError. - i++ - continue - } - - _, _ = b.WriteString(s[i : i+size]) - i += size - count++ - } - - return b.String() -} - -func (s *span) End(opts ...trace.SpanEndOption) { - if s == nil || !s.sampled.Swap(false) { - return - } - - // s.end exists so the lock (s.mu) is not held while s.ended is called. - s.ended(s.end(opts)) -} - -func (s *span) end(opts []trace.SpanEndOption) []byte { - s.mu.Lock() - defer s.mu.Unlock() - - cfg := trace.NewSpanEndConfig(opts...) - if t := cfg.Timestamp(); !t.IsZero() { - s.span.EndTime = cfg.Timestamp() - } else { - s.span.EndTime = time.Now() - } - - b, _ := json.Marshal(s.traces) // TODO: do not ignore this error. - return b -} - -// Expected to be implemented in eBPF. -// -//go:noinline -func (*span) ended(buf []byte) { ended(buf) } - -// ended is used for testing. -var ended = func([]byte) {} - -func (s *span) RecordError(err error, opts ...trace.EventOption) { - if s == nil || err == nil || !s.sampled.Load() { - return - } - - cfg := trace.NewEventConfig(opts...) - - attrs := cfg.Attributes() - attrs = append(attrs, - semconv.ExceptionType(typeStr(err)), - semconv.ExceptionMessage(err.Error()), - ) - if cfg.StackTrace() { - buf := make([]byte, 2048) - n := runtime.Stack(buf, false) - attrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n]))) - } - - s.mu.Lock() - defer s.mu.Unlock() - - s.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs) -} - -func typeStr(i any) string { - t := reflect.TypeOf(i) - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - return t.String() - } - return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) -} - -func (s *span) AddEvent(name string, opts ...trace.EventOption) { - if s == nil || !s.sampled.Load() { - return - } - - cfg := trace.NewEventConfig(opts...) - - s.mu.Lock() - defer s.mu.Unlock() - - s.addEvent(name, cfg.Timestamp(), cfg.Attributes()) -} - -// addEvent adds an event with name and attrs at tStamp to the span. The span -// lock (s.mu) needs to be held by the caller. -func (s *span) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) { - limit := maxSpan.Events - - if limit == 0 { - s.span.DroppedEvents++ - return - } - - if limit > 0 && len(s.span.Events) == limit { - // Drop head while avoiding allocation of more capacity. - copy(s.span.Events[:limit-1], s.span.Events[1:]) - s.span.Events = s.span.Events[:limit-1] - s.span.DroppedEvents++ - } - - e := &telemetry.SpanEvent{Time: tStamp, Name: name} - e.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs) - - s.span.Events = append(s.span.Events, e) -} - -func (s *span) AddLink(link trace.Link) { - if s == nil || !s.sampled.Load() { - return - } - - l := maxSpan.Links - - s.mu.Lock() - defer s.mu.Unlock() - - if l == 0 { - s.span.DroppedLinks++ - return - } - - if l > 0 && len(s.span.Links) == l { - // Drop head while avoiding allocation of more capacity. - copy(s.span.Links[:l-1], s.span.Links[1:]) - s.span.Links = s.span.Links[:l-1] - s.span.DroppedLinks++ - } - - s.span.Links = append(s.span.Links, convLink(link)) -} - -func convLinks(links []trace.Link) []*telemetry.SpanLink { - out := make([]*telemetry.SpanLink, 0, len(links)) - for _, link := range links { - out = append(out, convLink(link)) - } - return out -} - -func convLink(link trace.Link) *telemetry.SpanLink { - l := &telemetry.SpanLink{ - TraceID: telemetry.TraceID(link.SpanContext.TraceID()), - SpanID: telemetry.SpanID(link.SpanContext.SpanID()), - TraceState: link.SpanContext.TraceState().String(), - Flags: uint32(link.SpanContext.TraceFlags()), - } - l.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes) - - return l -} - -func (s *span) SetName(name string) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - s.span.Name = name -} - -func (*span) TracerProvider() trace.TracerProvider { return TracerProvider() } diff --git a/vendor/go.opentelemetry.io/auto/sdk/tracer.go b/vendor/go.opentelemetry.io/auto/sdk/tracer.go deleted file mode 100644 index e09acf022f..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/tracer.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sdk - -import ( - "context" - "math" - "time" - - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/auto/sdk/internal/telemetry" -) - -type tracer struct { - noop.Tracer - - name, schemaURL, version string -} - -var _ trace.Tracer = tracer{} - -func (t tracer) Start( - ctx context.Context, - name string, - opts ...trace.SpanStartOption, -) (context.Context, trace.Span) { - var psc, sc trace.SpanContext - sampled := true - span := new(span) - - // Ask eBPF for sampling decision and span context info. - t.start(ctx, span, &psc, &sampled, &sc) - - span.sampled.Store(sampled) - span.spanContext = sc - - ctx = trace.ContextWithSpan(ctx, span) - - if sampled { - // Only build traces if sampled. - cfg := trace.NewSpanStartConfig(opts...) - span.traces, span.span = t.traces(name, cfg, span.spanContext, psc) - } - - return ctx, span -} - -// Expected to be implemented in eBPF. -// -//go:noinline -func (t *tracer) start( - ctx context.Context, - spanPtr *span, - psc *trace.SpanContext, - sampled *bool, - sc *trace.SpanContext, -) { - start(ctx, spanPtr, psc, sampled, sc) -} - -// start is used for testing. -var start = func(context.Context, *span, *trace.SpanContext, *bool, *trace.SpanContext) {} - -var intToUint32Bound = min(math.MaxInt, math.MaxUint32) - -func (t tracer) traces( - name string, - cfg trace.SpanConfig, - sc, psc trace.SpanContext, -) (*telemetry.Traces, *telemetry.Span) { - span := &telemetry.Span{ - TraceID: telemetry.TraceID(sc.TraceID()), - SpanID: telemetry.SpanID(sc.SpanID()), - Flags: uint32(sc.TraceFlags()), - TraceState: sc.TraceState().String(), - ParentSpanID: telemetry.SpanID(psc.SpanID()), - Name: name, - Kind: spanKind(cfg.SpanKind()), - } - - span.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes()) - - links := cfg.Links() - if limit := maxSpan.Links; limit == 0 { - n := len(links) - if n > 0 { - bounded := max(min(n, intToUint32Bound), 0) - span.DroppedLinks = uint32(bounded) //nolint:gosec // Bounds checked. - } - } else { - if limit > 0 { - n := max(len(links)-limit, 0) - bounded := min(n, intToUint32Bound) - span.DroppedLinks = uint32(bounded) //nolint:gosec // Bounds checked. - links = links[n:] - } - span.Links = convLinks(links) - } - - if t := cfg.Timestamp(); !t.IsZero() { - span.StartTime = cfg.Timestamp() - } else { - span.StartTime = time.Now() - } - - return &telemetry.Traces{ - ResourceSpans: []*telemetry.ResourceSpans{ - { - ScopeSpans: []*telemetry.ScopeSpans{ - { - Scope: &telemetry.Scope{ - Name: t.name, - Version: t.version, - }, - Spans: []*telemetry.Span{span}, - SchemaURL: t.schemaURL, - }, - }, - }, - }, - }, span -} - -func spanKind(kind trace.SpanKind) telemetry.SpanKind { - switch kind { - case trace.SpanKindInternal: - return telemetry.SpanKindInternal - case trace.SpanKindServer: - return telemetry.SpanKindServer - case trace.SpanKindClient: - return telemetry.SpanKindClient - case trace.SpanKindProducer: - return telemetry.SpanKindProducer - case trace.SpanKindConsumer: - return telemetry.SpanKindConsumer - } - return telemetry.SpanKind(0) // undefined. -} diff --git a/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go b/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go deleted file mode 100644 index dbc477a59a..0000000000 --- a/vendor/go.opentelemetry.io/auto/sdk/tracer_provider.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sdk - -import ( - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/noop" -) - -// TracerProvider returns an auto-instrumentable [trace.TracerProvider]. -// -// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument -// the process using the returned TracerProvider, all of the telemetry it -// produces will be processed and handled by that Instrumentation. By default, -// if no Instrumentation instruments the TracerProvider it will not generate -// any trace telemetry. -func TracerProvider() trace.TracerProvider { return tracerProviderInstance } - -var tracerProviderInstance = new(tracerProvider) - -type tracerProvider struct{ noop.TracerProvider } - -var _ trace.TracerProvider = tracerProvider{} - -func (p tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - cfg := trace.NewTracerConfig(opts...) - return tracer{ - name: name, - version: cfg.InstrumentationVersion(), - schemaURL: cfg.SchemaURL(), - } -} diff --git a/vendor/go.opentelemetry.io/collector/component/LICENSE b/vendor/go.opentelemetry.io/collector/component/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/go.opentelemetry.io/collector/component/Makefile b/vendor/go.opentelemetry.io/collector/component/Makefile deleted file mode 100644 index 39734bfaeb..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.Common diff --git a/vendor/go.opentelemetry.io/collector/component/build_info.go b/vendor/go.opentelemetry.io/collector/component/build_info.go deleted file mode 100644 index bcfa7430c1..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/build_info.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package component // import "go.opentelemetry.io/collector/component" - -// BuildInfo is the information that is logged at the application start and -// passed into each component. This information can be overridden in custom build. -type BuildInfo struct { - // Command is the executable file name, e.g. "otelcol". - Command string - - // Description is the full name of the collector, e.g. "OpenTelemetry Collector". - Description string - - // Version string. - Version string -} - -// NewDefaultBuildInfo returns a default BuildInfo. -func NewDefaultBuildInfo() BuildInfo { - return BuildInfo{ - Command: "otelcol", - Description: "OpenTelemetry Collector", - Version: "latest", - } -} diff --git a/vendor/go.opentelemetry.io/collector/component/component.go b/vendor/go.opentelemetry.io/collector/component/component.go deleted file mode 100644 index 5a32c5041d..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/component.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package component outlines the abstraction of components within the OpenTelemetry Collector. It provides details on the component -// lifecycle as well as defining the interface that components must fulfill. -package component // import "go.opentelemetry.io/collector/component" - -import ( - "context" - "fmt" - "strings" -) - -// Component is either a receiver, exporter, processor, connector, or an extension. -// -// A component's lifecycle has the following phases: -// -// 1. Creation: The component is created using its respective factory, via a Create* call. -// 2. Start: The component's Start method is called. -// 3. Running: The component is up and running. -// 4. Shutdown: The component's Shutdown method is called and the lifecycle is complete. -// -// Once the lifecycle is complete it may be repeated, in which case a new component -// is created, starts, runs and is shutdown again. -type Component interface { - // Start tells the component to start. Host parameter can be used for communicating - // with the host after Start() has already returned. If an error is returned by - // Start() then the collector startup will be aborted. - // If this is an exporter component it may prepare for exporting - // by connecting to the endpoint. - // - // If the component needs to perform a long-running starting operation then it is recommended - // that Start() returns quickly and the long-running operation is performed in background. - // In that case make sure that the long-running operation does not use the context passed - // to Start() function since that context will be cancelled soon and can abort the long-running - // operation. Create a new context from the context.Background() for long-running operations. - Start(ctx context.Context, host Host) error - - // Shutdown is invoked during service shutdown. After Shutdown() is called, if the component - // accepted data in any way, it should not accept it anymore. - // - // This method must be safe to call: - // - without Start() having been called - // - if the component is in a shutdown state already - // - // If there are any background operations running by the component they must be aborted before - // this function returns. Remember that if you started any long-running background operations from - // the Start() method, those operations must be also cancelled. If there are any buffers in the - // component, they should be cleared and the data sent immediately to the next component. - // - // The component's lifecycle is completed once the Shutdown() method returns. No other - // methods of the component are called after that. If necessary a new component with - // the same or different configuration may be created and started (this may happen - // for example if we want to restart the component). - Shutdown(ctx context.Context) error -} - -// StartFunc specifies the function invoked when the component.Component is being started. -type StartFunc func(context.Context, Host) error - -// Start starts the component. -func (f StartFunc) Start(ctx context.Context, host Host) error { - if f == nil { - return nil - } - return f(ctx, host) -} - -// ShutdownFunc specifies the function invoked when the component.Component is being shutdown. -type ShutdownFunc func(context.Context) error - -// Shutdown shuts down the component. -func (f ShutdownFunc) Shutdown(ctx context.Context) error { - if f == nil { - return nil - } - return f(ctx) -} - -// Kind represents component kinds. -type Kind struct { - name string -} - -var ( - KindReceiver = Kind{name: "Receiver"} - KindProcessor = Kind{name: "Processor"} - KindExporter = Kind{name: "Exporter"} - KindExtension = Kind{name: "Extension"} - KindConnector = Kind{name: "Connector"} -) - -func (k Kind) String() string { - return k.name -} - -// StabilityLevel represents the stability level of the component created by the factory. -// The stability level is used to determine if the component should be used in production -// or not. For more details see: -// https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#stability-levels -type StabilityLevel int - -const ( - StabilityLevelUndefined StabilityLevel = iota // skip 0, start types from 1. - StabilityLevelUnmaintained - StabilityLevelDeprecated - StabilityLevelDevelopment - StabilityLevelAlpha - StabilityLevelBeta - StabilityLevelStable -) - -func (sl *StabilityLevel) UnmarshalText(in []byte) error { - str := strings.ToLower(string(in)) - switch str { - case "undefined": - *sl = StabilityLevelUndefined - case "unmaintained": - *sl = StabilityLevelUnmaintained - case "deprecated": - *sl = StabilityLevelDeprecated - case "development": - *sl = StabilityLevelDevelopment - case "alpha": - *sl = StabilityLevelAlpha - case "beta": - *sl = StabilityLevelBeta - case "stable": - *sl = StabilityLevelStable - default: - return fmt.Errorf("unsupported stability level: %q", string(in)) - } - return nil -} - -func (sl StabilityLevel) String() string { - switch sl { - case StabilityLevelUndefined: - return "Undefined" - case StabilityLevelUnmaintained: - return "Unmaintained" - case StabilityLevelDeprecated: - return "Deprecated" - case StabilityLevelDevelopment: - return "Development" - case StabilityLevelAlpha: - return "Alpha" - case StabilityLevelBeta: - return "Beta" - case StabilityLevelStable: - return "Stable" - } - return "" -} - -func (sl StabilityLevel) LogMessage() string { - switch sl { - case StabilityLevelUnmaintained: - return "Unmaintained component. Actively looking for contributors. Component will become deprecated after 3 months of remaining unmaintained." - case StabilityLevelDeprecated: - return "Deprecated component. Will be removed in future releases." - case StabilityLevelDevelopment: - return "Development component. May change in the future." - case StabilityLevelAlpha: - return "Alpha component. May change in the future." - case StabilityLevelBeta: - return "Beta component. May change in the future." - case StabilityLevelStable: - return "Stable component." - default: - return "Stability level of component is undefined" - } -} - -// Factory is implemented by all Component factories. -type Factory interface { - // Type gets the type of the component created by this factory. - Type() Type - - // CreateDefaultConfig creates the default configuration for the Component. - // This method can be called multiple times depending on the pipeline - // configuration and should not cause side effects that prevent the creation - // of multiple instances of the Component. - // The object returned by this method needs to pass the checks implemented by - // 'componenttest.CheckConfigStruct'. It is recommended to have these checks in the - // tests of any implementation of the Factory interface. - CreateDefaultConfig() Config -} - -// CreateDefaultConfigFunc is the equivalent of Factory.CreateDefaultConfig(). -type CreateDefaultConfigFunc func() Config - -// CreateDefaultConfig implements Factory.CreateDefaultConfig(). -func (f CreateDefaultConfigFunc) CreateDefaultConfig() Config { - return f() -} diff --git a/vendor/go.opentelemetry.io/collector/component/config.go b/vendor/go.opentelemetry.io/collector/component/config.go deleted file mode 100644 index ca33da36a6..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/config.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package component // import "go.opentelemetry.io/collector/component" - -// Config defines the configuration for a component.Component. -// -// Implementations and/or any sub-configs (other types embedded or included in the Config implementation) -// MUST implement xconfmap.Validator if any validation is required for that part of the configuration -// (e.g. check if a required field is present). -// -// A valid implementation MUST pass the check componenttest.CheckConfigStruct (return nil error). -type Config any diff --git a/vendor/go.opentelemetry.io/collector/component/doc.go b/vendor/go.opentelemetry.io/collector/component/doc.go deleted file mode 100644 index c7ac848a1e..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package component outlines the components used in the collector -// and provides a foundation for the component’s creation and -// termination process. A component can be either a receiver, exporter, -// processor, an extension, or a connector. -package component // import "go.opentelemetry.io/collector/component" diff --git a/vendor/go.opentelemetry.io/collector/component/host.go b/vendor/go.opentelemetry.io/collector/component/host.go deleted file mode 100644 index dc8210ffbe..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/host.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package component // import "go.opentelemetry.io/collector/component" - -// Host represents the entity that is hosting a Component. It is used to allow communication -// between the Component and its host (normally the service.Collector is the host). -// -// Components may require `component.Host` to implement additional interfaces to properly function. -// The component is expected to cast the `component.Host` to the interface it needs and return -// an error if the type assertion fails. -type Host interface { - // GetExtensions returns the map of extensions. Only enabled and created extensions will be returned. - // Typically, it is used to find an extension by type or by full config name. Both cases - // can be done by iterating the returned map. There are typically very few extensions, - // so there are no performance implications due to iteration. - // - // GetExtensions can be called by the component anytime after Component.Start() begins and - // until Component.Shutdown() ends. - GetExtensions() map[ID]Component -} diff --git a/vendor/go.opentelemetry.io/collector/component/identifiable.go b/vendor/go.opentelemetry.io/collector/component/identifiable.go deleted file mode 100644 index 6b81476816..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/identifiable.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package component // import "go.opentelemetry.io/collector/component" - -import ( - "errors" - "fmt" - "regexp" - "strings" -) - -// typeAndNameSeparator is the separator that is used between type and name in type/name composite keys. -const typeAndNameSeparator = "/" - -var ( - // typeRegexp is used to validate the type of component. - // A type must start with an ASCII alphabetic character and - // can only contain ASCII alphanumeric characters and '_'. - // This must be kept in sync with the regex in cmd/mdatagen/validate.go. - typeRegexp = regexp.MustCompile(`^[a-zA-Z][0-9a-zA-Z_]{0,62}$`) - - // nameRegexp is used to validate the name of a component. A name can consist of - // 1 to 1024 Unicode characters excluding whitespace, control characters, and - // symbols. - nameRegexp = regexp.MustCompile(`^[^\pZ\pC\pS]+$`) -) - -var _ fmt.Stringer = Type{} - -// Type is the component type as it is used in the config. -type Type struct { - name string -} - -// String returns the string representation of the type. -func (t Type) String() string { - return t.name -} - -// MarshalText marshals returns the Type name. -func (t Type) MarshalText() ([]byte, error) { - return []byte(t.name), nil -} - -// NewType creates a type. It returns an error if the type is invalid. -// A type must -// - have at least one character, -// - start with an ASCII alphabetic character and -// - can only contain ASCII alphanumeric characters and '_'. -func NewType(ty string) (Type, error) { - if len(ty) == 0 { - return Type{}, errors.New("id must not be empty") - } - if !typeRegexp.MatchString(ty) { - return Type{}, fmt.Errorf("invalid character(s) in type %q", ty) - } - return Type{name: ty}, nil -} - -// MustNewType creates a type. It panics if the type is invalid. -// A type must -// - have at least one character, -// - start with an ASCII alphabetic character and -// - can only contain ASCII alphanumeric characters and '_'. -func MustNewType(strType string) Type { - ty, err := NewType(strType) - if err != nil { - panic(err) - } - return ty -} - -// ID represents the identity for a component. It combines two values: -// * type - the Type of the component. -// * name - the name of that component. -// The component ID (combination type + name) is unique for a given component.Kind. -type ID struct { - typeVal Type `mapstructure:"-"` - nameVal string `mapstructure:"-"` -} - -// NewID returns a new ID with the given Type and empty name. -func NewID(typeVal Type) ID { - return ID{typeVal: typeVal} -} - -// MustNewID builds a Type and returns a new ID with the given Type and empty name. -// This is equivalent to NewID(MustNewType(typeVal)). -// See MustNewType to check the valid values of typeVal. -func MustNewID(typeVal string) ID { - return NewID(MustNewType(typeVal)) -} - -// NewIDWithName returns a new ID with the given Type and name. -func NewIDWithName(typeVal Type, nameVal string) ID { - return ID{typeVal: typeVal, nameVal: nameVal} -} - -// MustNewIDWithName builds a Type and returns a new ID with the given Type and name. -// This is equivalent to NewIDWithName(MustNewType(typeVal), nameVal). -// See MustNewType to check the valid values of typeVal. -func MustNewIDWithName(typeVal string, nameVal string) ID { - return NewIDWithName(MustNewType(typeVal), nameVal) -} - -// Type returns the type of the component. -func (id ID) Type() Type { - return id.typeVal -} - -// Name returns the custom name of the component. -func (id ID) Name() string { - return id.nameVal -} - -// MarshalText implements the encoding.TextMarshaler interface. -// This marshals the type and name as one string in the config. -func (id ID) MarshalText() (text []byte, err error) { - return []byte(id.String()), nil -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (id *ID) UnmarshalText(text []byte) error { - idStr := string(text) - typeStr, nameStr, hasName := strings.Cut(idStr, typeAndNameSeparator) - typeStr = strings.TrimSpace(typeStr) - - if typeStr == "" { - if hasName { - return fmt.Errorf("in %q id: the part before %s should not be empty", idStr, typeAndNameSeparator) - } - return errors.New("id must not be empty") - } - - if hasName { - // "name" part is present. - nameStr = strings.TrimSpace(nameStr) - if nameStr == "" { - return fmt.Errorf("in %q id: the part after %s should not be empty", idStr, typeAndNameSeparator) - } - if err := validateName(nameStr); err != nil { - return fmt.Errorf("in %q id: %w", nameStr, err) - } - } - - var err error - if id.typeVal, err = NewType(typeStr); err != nil { - return fmt.Errorf("in %q id: %w", idStr, err) - } - id.nameVal = nameStr - - return nil -} - -// String returns the ID string representation as "type[/name]" format. -func (id ID) String() string { - if id.nameVal == "" { - return id.typeVal.String() - } - - return id.typeVal.String() + typeAndNameSeparator + id.nameVal -} - -func validateName(nameStr string) error { - if len(nameStr) > 1024 { - return fmt.Errorf("name %q is longer than 1024 characters (%d characters)", nameStr, len(nameStr)) - } - if !nameRegexp.MatchString(nameStr) { - return fmt.Errorf("invalid character(s) in name %q", nameStr) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/collector/component/telemetry.go b/vendor/go.opentelemetry.io/collector/component/telemetry.go deleted file mode 100644 index 461dead4b3..0000000000 --- a/vendor/go.opentelemetry.io/collector/component/telemetry.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package component // import "go.opentelemetry.io/collector/component" - -import ( - "go.opentelemetry.io/collector/internal/telemetry" -) - -// TelemetrySettings provides components with APIs to report telemetry. -type TelemetrySettings = telemetry.TelemetrySettings diff --git a/vendor/go.opentelemetry.io/collector/featuregate/LICENSE b/vendor/go.opentelemetry.io/collector/featuregate/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/go.opentelemetry.io/collector/featuregate/Makefile b/vendor/go.opentelemetry.io/collector/featuregate/Makefile deleted file mode 100644 index 39734bfaeb..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../Makefile.Common diff --git a/vendor/go.opentelemetry.io/collector/featuregate/README.md b/vendor/go.opentelemetry.io/collector/featuregate/README.md deleted file mode 100644 index d3e3c802d6..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Collector Feature Gates - -This package provides a mechanism that allows operators to enable and disable -experimental or transitional features at deployment time. These flags should -be able to govern the behavior of the application starting as early as possible -and should be available to every component such that decisions may be made -based on flags at the component level. - -## Usage - -Feature gates must be defined and registered with the global registry in -an `init()` function. This makes the `Gate` available to be configured and -queried with the defined [`Stage`](#feature-lifecycle) default value. -A `Gate` can have a list of associated issues that allow users to refer to -the issue and report any additional problems or understand the context of the `Gate`. -Once a `Gate` has been marked as `Stable`, it must have a `RemovalVersion` set. - -```go -var myFeatureGate = featuregate.GlobalRegistry().MustRegister( - "namespaced.uniqueIdentifier", - featuregate.Stable, - featuregate.WithRegisterFromVersion("v0.65.0") - featuregate.WithRegisterDescription("A brief description of what the gate controls"), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/issues/6167"), - featuregate.WithRegisterToVersion("v0.70.0")) -``` - -The status of the gate may later be checked by interrogating the global -feature gate registry: - -```go -if myFeatureGate.IsEnabled() { - setupNewFeature() -} -``` - -Note that querying the registry takes a read lock and accesses a map, so it -should be done once and the result cached for local use if repeated checks -are required. Avoid querying the registry in a loop. - -## Controlling Gates - -Feature gates can be enabled or disabled via the CLI, with the -`--feature-gates` flag. When using the CLI flag, gate -identifiers must be presented as a comma-delimited list. Gate identifiers -prefixed with `-` will disable the gate and prefixing with `+` or with no -prefix will enable the gate. - -```shell -otelcol --config=config.yaml --feature-gates=gate1,-gate2,+gate3 -``` - -This will enable `gate1` and `gate3` and disable `gate2`. - -## Feature Lifecycle - -Features controlled by a `Gate` should follow a three-stage lifecycle, -modeled after the [system used by Kubernetes](https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-stages): - -1. An `alpha` stage where the feature is disabled by default and must be enabled - through a `Gate`. -2. A `beta` stage where the feature has been well tested and is enabled by - default but can be disabled through a `Gate`. -3. A generally available or `stable` stage where the feature is permanently enabled. At this stage - the gate should no longer be explicitly used. Disabling the gate will produce an error and - explicitly enabling will produce a warning log. -4. A `stable` feature gate will be removed in the version specified by its `ToVersion` value. - -Features that prove unworkable in the `alpha` stage may be discontinued -without proceeding to the `beta` stage. Instead, they will proceed to the -`deprecated` stage, which will feature is permanently disabled. A feature gate will -be removed once it has been `deprecated` for at least 2 releases of the collector. - -Features that make it to the `beta` stage are intended to reach general availability but may still be discontinued. -If, after wider use, it is determined that the gate should be discontinued it will be reverted to the `alpha` stage -for 2 releases and then proceed to the `deprecated` stage. If instead it is ready for general availability it will -proceed to the `stable` stage. diff --git a/vendor/go.opentelemetry.io/collector/featuregate/flag.go b/vendor/go.opentelemetry.io/collector/featuregate/flag.go deleted file mode 100644 index 1c6f3a5e87..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/flag.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package featuregate // import "go.opentelemetry.io/collector/featuregate" - -import ( - "flag" - "strings" - - "go.uber.org/multierr" -) - -const ( - featureGatesFlag = "feature-gates" - featureGatesFlagDescription = "Comma-delimited list of feature gate identifiers. Prefix with '-' to disable the feature. '+' or no prefix will enable the feature." -) - -// RegisterFlagsOption is an option for RegisterFlags. -type RegisterFlagsOption interface { - private() -} - -// RegisterFlags that directly applies feature gate statuses to a Registry. -func (r *Registry) RegisterFlags(flagSet *flag.FlagSet, _ ...RegisterFlagsOption) { - flagSet.Var(&flagValue{reg: r}, featureGatesFlag, featureGatesFlagDescription) -} - -// flagValue implements the flag.Value interface and directly applies feature gate statuses to a Registry. -type flagValue struct { - reg *Registry -} - -func (f *flagValue) String() string { - // This function can be called by isZeroValue https://github.com/golang/go/blob/go1.23.3/src/flag/flag.go#L630 - // which creates an instance of flagValue using reflect.New. In this case, the field `reg` is nil. - if f.reg == nil { - return "" - } - - var ids []string - f.reg.VisitAll(func(g *Gate) { - id := g.ID() - if !g.IsEnabled() { - id = "-" + id - } - ids = append(ids, id) - }) - return strings.Join(ids, ",") -} - -func (f *flagValue) Set(s string) error { - if s == "" { - return nil - } - - var errs error - ids := strings.Split(s, ",") - for i := range ids { - id := ids[i] - val := true - switch id[0] { - case '-': - id = id[1:] - val = false - case '+': - id = id[1:] - } - errs = multierr.Append(errs, f.reg.Set(id, val)) - } - return errs -} diff --git a/vendor/go.opentelemetry.io/collector/featuregate/gate.go b/vendor/go.opentelemetry.io/collector/featuregate/gate.go deleted file mode 100644 index a250ceb9a8..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/gate.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package featuregate // import "go.opentelemetry.io/collector/featuregate" - -import ( - "fmt" - "sync/atomic" - - "github.com/hashicorp/go-version" -) - -// Gate is an immutable object that is owned by the Registry and represents an individual feature that -// may be enabled or disabled based on the lifecycle state of the feature and CLI flags specified by the user. -type Gate struct { - id string - description string - referenceURL string - fromVersion *version.Version - toVersion *version.Version - stage Stage - enabled *atomic.Bool -} - -// ID returns the id of the Gate. -func (g *Gate) ID() string { - return g.id -} - -// IsEnabled returns true if the feature described by the Gate is enabled. -func (g *Gate) IsEnabled() bool { - return g.enabled.Load() -} - -// Description returns the description for the Gate. -func (g *Gate) Description() string { - return g.description -} - -// Stage returns the Gate's lifecycle stage. -func (g *Gate) Stage() Stage { - return g.stage -} - -// ReferenceURL returns the URL to the contextual information about the Gate. -func (g *Gate) ReferenceURL() string { - return g.referenceURL -} - -// FromVersion returns the version information when the Gate's was added. -func (g *Gate) FromVersion() string { - return fmt.Sprintf("v%s", g.fromVersion) -} - -// ToVersion returns the version information when Gate's in StageStable. -func (g *Gate) ToVersion() string { - return fmt.Sprintf("v%s", g.toVersion) -} diff --git a/vendor/go.opentelemetry.io/collector/featuregate/registry.go b/vendor/go.opentelemetry.io/collector/featuregate/registry.go deleted file mode 100644 index 9309024c38..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/registry.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package featuregate // import "go.opentelemetry.io/collector/featuregate" - -import ( - "errors" - "fmt" - "net/url" - "regexp" - "sort" - "sync" - "sync/atomic" - - "github.com/hashicorp/go-version" -) - -var ( - globalRegistry = NewRegistry() - - // idRegexp is used to validate the ID of a Gate. - // IDs' characters must be alphanumeric or dots. - idRegexp = regexp.MustCompile(`^[0-9a-zA-Z\.]*$`) -) - -// ErrAlreadyRegistered is returned when adding a Gate that is already registered. -var ErrAlreadyRegistered = errors.New("gate is already registered") - -// GlobalRegistry returns the global Registry. -func GlobalRegistry() *Registry { - return globalRegistry -} - -type Registry struct { - gates sync.Map -} - -// NewRegistry returns a new empty Registry. -func NewRegistry() *Registry { - return &Registry{} -} - -// RegisterOption allows to configure additional information about a Gate during registration. -type RegisterOption interface { - apply(g *Gate) error -} - -type registerOptionFunc func(g *Gate) error - -func (ro registerOptionFunc) apply(g *Gate) error { - return ro(g) -} - -// WithRegisterDescription adds description for the Gate. -func WithRegisterDescription(description string) RegisterOption { - return registerOptionFunc(func(g *Gate) error { - g.description = description - return nil - }) -} - -// WithRegisterReferenceURL adds a URL that has all the contextual information about the Gate. -// referenceURL must be a valid URL as defined by `net/url.Parse`. -func WithRegisterReferenceURL(referenceURL string) RegisterOption { - return registerOptionFunc(func(g *Gate) error { - if _, err := url.Parse(referenceURL); err != nil { - return fmt.Errorf("WithRegisterReferenceURL: invalid reference URL %q: %w", referenceURL, err) - } - - g.referenceURL = referenceURL - return nil - }) -} - -// WithRegisterFromVersion is used to set the Gate "FromVersion". -// The "FromVersion" contains the Collector release when a feature is introduced. -// fromVersion must be a valid version string: it may start with 'v' and must be in the format Major.Minor.Patch[-PreRelease]. -// PreRelease is optional and may have dashes, tildes and ASCII alphanumeric characters. -func WithRegisterFromVersion(fromVersion string) RegisterOption { - return registerOptionFunc(func(g *Gate) error { - from, err := version.NewVersion(fromVersion) - if err != nil { - return fmt.Errorf("WithRegisterFromVersion: invalid version %q: %w", fromVersion, err) - } - - g.fromVersion = from - return nil - }) -} - -// WithRegisterToVersion is used to set the Gate "ToVersion". -// The "ToVersion", if not empty, contains the last Collector release in which you can still use a feature gate. -// If the feature stage is either "Deprecated" or "Stable", the "ToVersion" is the Collector release when the feature is removed. -// toVersion must be a valid version string: it may start with 'v' and must be in the format Major.Minor.Patch[-PreRelease]. -// PreRelease is optional and may have dashes, tildes and ASCII alphanumeric characters. -func WithRegisterToVersion(toVersion string) RegisterOption { - return registerOptionFunc(func(g *Gate) error { - to, err := version.NewVersion(toVersion) - if err != nil { - return fmt.Errorf("WithRegisterToVersion: invalid version %q: %w", toVersion, err) - } - - g.toVersion = to - return nil - }) -} - -// MustRegister like Register but panics if an invalid ID or gate options are provided. -func (r *Registry) MustRegister(id string, stage Stage, opts ...RegisterOption) *Gate { - g, err := r.Register(id, stage, opts...) - if err != nil { - panic(err) - } - return g -} - -func validateID(id string) error { - if id == "" { - return errors.New("empty ID") - } - - if !idRegexp.MatchString(id) { - return errors.New("invalid character(s) in ID") - } - return nil -} - -// Register a Gate and return it. The returned Gate can be used to check if is enabled or not. -// id must be an ASCII alphanumeric nonempty string. Dots are allowed for namespacing. -func (r *Registry) Register(id string, stage Stage, opts ...RegisterOption) (*Gate, error) { - if err := validateID(id); err != nil { - return nil, fmt.Errorf("invalid ID %q: %w", id, err) - } - - g := &Gate{ - id: id, - stage: stage, - } - for _, opt := range opts { - err := opt.apply(g) - if err != nil { - return nil, fmt.Errorf("failed to apply option: %w", err) - } - } - switch g.stage { - case StageAlpha, StageDeprecated: - g.enabled = &atomic.Bool{} - case StageBeta, StageStable: - enabled := &atomic.Bool{} - enabled.Store(true) - g.enabled = enabled - default: - return nil, fmt.Errorf("unknown stage value %q for gate %q", stage, id) - } - if (g.stage == StageStable || g.stage == StageDeprecated) && g.toVersion == nil { - return nil, fmt.Errorf("no removal version set for %v gate %q", g.stage.String(), id) - } - - if g.fromVersion != nil && g.toVersion != nil && g.toVersion.LessThan(g.fromVersion) { - return nil, fmt.Errorf("toVersion %q is before fromVersion %q", g.toVersion, g.fromVersion) - } - - if _, loaded := r.gates.LoadOrStore(id, g); loaded { - return nil, fmt.Errorf("failed to register %q: %w", id, ErrAlreadyRegistered) - } - return g, nil -} - -// Set the enabled valued for a Gate identified by the given id. -func (r *Registry) Set(id string, enabled bool) error { - v, ok := r.gates.Load(id) - if !ok { - validGates := []string{} - r.VisitAll(func(g *Gate) { - validGates = append(validGates, g.ID()) - }) - return fmt.Errorf("no such feature gate %q. valid gates: %v", id, validGates) - } - g := v.(*Gate) - - switch g.stage { - case StageStable: - if !enabled { - return fmt.Errorf("feature gate %q is stable, can not be disabled", id) - } - fmt.Printf("Feature gate %q is stable and already enabled. It will be removed in version %v and continued use of the gate after version %v will result in an error.\n", id, g.toVersion, g.toVersion) - case StageDeprecated: - if enabled { - return fmt.Errorf("feature gate %q is deprecated, can not be enabled", id) - } - fmt.Printf("Feature gate %q is deprecated and already disabled. It will be removed in version %v and continued use of the gate after version %v will result in an error.\n", id, g.toVersion, g.toVersion) - default: - g.enabled.Store(enabled) - } - return nil -} - -// VisitAll visits all the gates in lexicographical order, calling fn for each. -func (r *Registry) VisitAll(fn func(*Gate)) { - var gates []*Gate - r.gates.Range(func(_, value any) bool { - gates = append(gates, value.(*Gate)) - return true - }) - sort.Slice(gates, func(i, j int) bool { - return gates[i].ID() < gates[j].ID() - }) - for i := range gates { - fn(gates[i]) - } -} diff --git a/vendor/go.opentelemetry.io/collector/featuregate/stage.go b/vendor/go.opentelemetry.io/collector/featuregate/stage.go deleted file mode 100644 index f2be1b248d..0000000000 --- a/vendor/go.opentelemetry.io/collector/featuregate/stage.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package featuregate // import "go.opentelemetry.io/collector/featuregate" - -// Stage represents the Gate's lifecycle and what is the expected state of it. -type Stage int8 - -const ( - // StageAlpha is used when creating a new feature and the Gate must be explicitly enabled - // by the operator. - // - // The Gate will be disabled by default. - StageAlpha Stage = iota - // StageBeta is used when the feature gate is well tested and is enabled by default, - // but can be disabled by a Gate. - // - // The Gate will be enabled by default. - StageBeta - // StageStable is used when feature is permanently enabled and can not be disabled by a Gate. - // This value is used to provide feedback to the user that the gate will be removed in the next versions. - // - // The Gate will be enabled by default and will return an error if disabled. - StageStable - // StageDeprecated is used when feature is permanently disabled and can not be enabled by a Gate. - // This value is used to provide feedback to the user that the gate will be removed in the next versions. - // - // The Gate will be disabled by default and will return an error if modified. - StageDeprecated -) - -func (s Stage) String() string { - switch s { - case StageAlpha: - return "Alpha" - case StageBeta: - return "Beta" - case StageStable: - return "Stable" - case StageDeprecated: - return "Deprecated" - } - return "Unknown" -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/LICENSE b/vendor/go.opentelemetry.io/collector/internal/telemetry/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/go.opentelemetry.io/collector/internal/telemetry/Makefile b/vendor/go.opentelemetry.io/collector/internal/telemetry/Makefile deleted file mode 100644 index ded7a36092..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/attribute.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/attribute.go deleted file mode 100644 index a246af4da3..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/attribute.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package componentattribute // import "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - -import ( - "slices" - - "go.opentelemetry.io/otel/attribute" -) - -const ( - ComponentKindKey = "otelcol.component.kind" - ComponentIDKey = "otelcol.component.id" - PipelineIDKey = "otelcol.pipeline.id" - SignalKey = "otelcol.signal" - SignalOutputKey = "otelcol.signal.output" -) - -func RemoveAttributes(attrs attribute.Set, fields ...string) attribute.Set { - attrs, _ = attribute.NewSetWithFiltered(attrs.ToSlice(), func(kv attribute.KeyValue) bool { - return !slices.Contains(fields, string(kv.Key)) - }) - return attrs -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_provider.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_provider.go deleted file mode 100644 index 5aad00f246..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_provider.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package componentattribute // import "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - -import ( - "slices" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/log" -) - -type loggerProviderWithAttributes struct { - log.LoggerProvider - attrs []attribute.KeyValue -} - -// LoggerProviderWithAttributes creates a LoggerProvider with a new set of injected instrumentation scope attributes. -func LoggerProviderWithAttributes(lp log.LoggerProvider, attrs attribute.Set) log.LoggerProvider { - if lpwa, ok := lp.(loggerProviderWithAttributes); ok { - lp = lpwa.LoggerProvider - } - return loggerProviderWithAttributes{ - LoggerProvider: lp, - attrs: attrs.ToSlice(), - } -} - -func (lpwa loggerProviderWithAttributes) Logger(name string, opts ...log.LoggerOption) log.Logger { - conf := log.NewLoggerConfig(opts...) - attrSet := conf.InstrumentationAttributes() - // prepend our attributes so they can be overwritten - newAttrs := append(slices.Clone(lpwa.attrs), attrSet.ToSlice()...) - // append our attribute set option to overwrite the old one - opts = append(opts, log.WithInstrumentationAttributes(newAttrs...)) - return lpwa.LoggerProvider.Logger(name, opts...) -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_zap.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_zap.go deleted file mode 100644 index e20a4e5fd6..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/logger_zap.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package componentattribute // import "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - -import ( - "go.opentelemetry.io/contrib/bridges/otelzap" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/log" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" -) - -// Interface for Zap cores that support setting and resetting a set of component attributes. -// -// There are three wrappers that implement this interface: -// -// - [NewConsoleCoreWithAttributes] injects component attributes as Zap fields. -// -// This is used for the Collector's console output. -// -// - [NewOTelTeeCoreWithAttributes] copies logs to a [log.LoggerProvider] using [otelzap]. For the -// copied logs, component attributes are injected as instrumentation scope attributes. -// -// This is used when service::telemetry::logs::processors is configured. -// -// - [NewWrapperCoreWithAttributes] applies a wrapper function to a core, similar to -// [zap.WrapCore]. It allows setting component attributes on the inner core and reapplying the -// wrapper function when needed. -// -// This is used when adding [zapcore.NewSamplerWithOptions] to our logger stack. -type coreWithAttributes interface { - zapcore.Core - withAttributeSet(attribute.Set) zapcore.Core -} - -// Tries setting the component attribute set for a Zap core. -// -// Does nothing if the core does not implement [coreWithAttributes]. -func tryWithAttributeSet(c zapcore.Core, attrs attribute.Set) zapcore.Core { - if cwa, ok := c.(coreWithAttributes); ok { - return cwa.withAttributeSet(attrs) - } - zap.New(c).Debug("Logger core does not support injecting component attributes") - return c -} - -type consoleCoreWithAttributes struct { - zapcore.Core - from zapcore.Core -} - -var _ coreWithAttributes = (*consoleCoreWithAttributes)(nil) - -// NewConsoleCoreWithAttributes wraps a Zap core in order to inject component attributes as Zap fields. -// -// This is used for the Collector's console output. -func NewConsoleCoreWithAttributes(c zapcore.Core, attrs attribute.Set) zapcore.Core { - var fields []zap.Field - for _, kv := range attrs.ToSlice() { - fields = append(fields, zap.String(string(kv.Key), kv.Value.AsString())) - } - return &consoleCoreWithAttributes{ - Core: c.With(fields), - from: c, - } -} - -func (ccwa *consoleCoreWithAttributes) withAttributeSet(attrs attribute.Set) zapcore.Core { - return NewConsoleCoreWithAttributes(ccwa.from, attrs) -} - -type otelTeeCoreWithAttributes struct { - zapcore.Core - consoleCore zapcore.Core - lp log.LoggerProvider - scopeName string - level zapcore.Level -} - -var _ coreWithAttributes = (*otelTeeCoreWithAttributes)(nil) - -// NewOTelTeeCoreWithAttributes wraps a Zap core in order to copy logs to a [log.LoggerProvider] using [otelzap]. For the copied -// logs, component attributes are injected as instrumentation scope attributes. -// -// This is used when service::telemetry::logs::processors is configured. -func NewOTelTeeCoreWithAttributes(consoleCore zapcore.Core, lp log.LoggerProvider, scopeName string, level zapcore.Level, attrs attribute.Set) zapcore.Core { - // TODO: Use `otelzap.WithAttributes` and remove `LoggerProviderWithAttributes` - // once we've upgraded to otelzap v0.11.0. - lpwa := LoggerProviderWithAttributes(lp, attrs) - otelCore, err := zapcore.NewIncreaseLevelCore(otelzap.NewCore( - scopeName, - otelzap.WithLoggerProvider(lpwa), - ), zap.NewAtomicLevelAt(level)) - if err != nil { - panic(err) - } - - return &otelTeeCoreWithAttributes{ - Core: zapcore.NewTee(consoleCore, otelCore), - consoleCore: consoleCore, - lp: lp, - scopeName: scopeName, - level: level, - } -} - -func (ocwa *otelTeeCoreWithAttributes) withAttributeSet(attrs attribute.Set) zapcore.Core { - return NewOTelTeeCoreWithAttributes( - tryWithAttributeSet(ocwa.consoleCore, attrs), - ocwa.lp, ocwa.scopeName, ocwa.level, - attrs, - ) -} - -type wrapperCoreWithAttributes struct { - zapcore.Core - from zapcore.Core - wrapper func(zapcore.Core) zapcore.Core -} - -var _ coreWithAttributes = (*wrapperCoreWithAttributes)(nil) - -// NewWrapperCoreWithAttributes applies a wrapper function to a core, similar to [zap.WrapCore]. The resulting wrapped core -// allows setting component attributes on the inner core and reapplying the wrapper function when -// needed. -// -// This is used when adding [zapcore.NewSamplerWithOptions] to our logger stack. -func NewWrapperCoreWithAttributes(from zapcore.Core, wrapper func(zapcore.Core) zapcore.Core) zapcore.Core { - return &wrapperCoreWithAttributes{ - Core: wrapper(from), - from: from, - wrapper: wrapper, - } -} - -func (wcwa *wrapperCoreWithAttributes) withAttributeSet(attrs attribute.Set) zapcore.Core { - return NewWrapperCoreWithAttributes(tryWithAttributeSet(wcwa.from, attrs), wcwa.wrapper) -} - -// ZapLoggerWithAttributes creates a Zap Logger with a new set of injected component attributes. -func ZapLoggerWithAttributes(logger *zap.Logger, attrs attribute.Set) *zap.Logger { - return logger.WithOptions(zap.WrapCore(func(c zapcore.Core) zapcore.Core { - return tryWithAttributeSet(c, attrs) - })) -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/meter_provider.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/meter_provider.go deleted file mode 100644 index d17732dde5..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/meter_provider.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package componentattribute // import "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - -import ( - "slices" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" -) - -type meterProviderWithAttributes struct { - metric.MeterProvider - attrs []attribute.KeyValue -} - -// MeterProviderWithAttributes creates a MeterProvider with a new set of injected instrumentation scope attributes. -func MeterProviderWithAttributes(mp metric.MeterProvider, attrs attribute.Set) metric.MeterProvider { - if mpwa, ok := mp.(meterProviderWithAttributes); ok { - mp = mpwa.MeterProvider - } - return meterProviderWithAttributes{ - MeterProvider: mp, - attrs: attrs.ToSlice(), - } -} - -func (mpwa meterProviderWithAttributes) Meter(name string, opts ...metric.MeterOption) metric.Meter { - conf := metric.NewMeterConfig(opts...) - attrSet := conf.InstrumentationAttributes() - // prepend our attributes so they can be overwritten - newAttrs := append(slices.Clone(mpwa.attrs), attrSet.ToSlice()...) - // append our attribute set option to overwrite the old one - opts = append(opts, metric.WithInstrumentationAttributes(newAttrs...)) - return mpwa.MeterProvider.Meter(name, opts...) -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/tracer_provider.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/tracer_provider.go deleted file mode 100644 index de77ab0eed..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/componentattribute/tracer_provider.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package componentattribute // import "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - -import ( - "slices" - - "go.opentelemetry.io/otel/attribute" - sdkTrace "go.opentelemetry.io/otel/sdk/trace" - "go.opentelemetry.io/otel/trace" -) - -type tracerProviderWithAttributes struct { - trace.TracerProvider - attrs []attribute.KeyValue -} - -// Necessary for components that use SDK-only methods, such as zpagesextension -type tracerProviderWithAttributesSdk struct { - *sdkTrace.TracerProvider - attrs []attribute.KeyValue -} - -// TracerProviderWithAttributes creates a TracerProvider with a new set of injected instrumentation scope attributes. -func TracerProviderWithAttributes(tp trace.TracerProvider, attrs attribute.Set) trace.TracerProvider { - if tpwa, ok := tp.(tracerProviderWithAttributesSdk); ok { - tp = tpwa.TracerProvider - } else if tpwa, ok := tp.(tracerProviderWithAttributes); ok { - tp = tpwa.TracerProvider - } - if tpSdk, ok := tp.(*sdkTrace.TracerProvider); ok { - return tracerProviderWithAttributesSdk{ - TracerProvider: tpSdk, - attrs: attrs.ToSlice(), - } - } - return tracerProviderWithAttributes{ - TracerProvider: tp, - attrs: attrs.ToSlice(), - } -} - -func tracerWithAttributes(tp trace.TracerProvider, attrs []attribute.KeyValue, name string, opts ...trace.TracerOption) trace.Tracer { - conf := trace.NewTracerConfig(opts...) - attrSet := conf.InstrumentationAttributes() - // prepend our attributes so they can be overwritten - newAttrs := append(slices.Clone(attrs), attrSet.ToSlice()...) - // append our attribute set option to overwrite the old one - opts = append(opts, trace.WithInstrumentationAttributes(newAttrs...)) - return tp.Tracer(name, opts...) -} - -func (tpwa tracerProviderWithAttributes) Tracer(name string, options ...trace.TracerOption) trace.Tracer { - return tracerWithAttributes(tpwa.TracerProvider, tpwa.attrs, name, options...) -} - -func (tpwa tracerProviderWithAttributesSdk) Tracer(name string, options ...trace.TracerOption) trace.Tracer { - return tracerWithAttributes(tpwa.TracerProvider, tpwa.attrs, name, options...) -} diff --git a/vendor/go.opentelemetry.io/collector/internal/telemetry/telemetry.go b/vendor/go.opentelemetry.io/collector/internal/telemetry/telemetry.go deleted file mode 100644 index 5ebe2d55dd..0000000000 --- a/vendor/go.opentelemetry.io/collector/internal/telemetry/telemetry.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/collector/internal/telemetry" - -import ( - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/trace" - "go.uber.org/zap" - - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/internal/telemetry/componentattribute" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -var NewPipelineTelemetryGate = featuregate.GlobalRegistry().MustRegister( - "telemetry.newPipelineTelemetry", - featuregate.StageAlpha, - featuregate.WithRegisterFromVersion("v0.123.0"), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/rfcs/component-universal-telemetry.md"), - featuregate.WithRegisterDescription("Injects component-identifying scope attributes in internal Collector metrics"), -) - -// IMPORTANT: This struct is reexported as part of the public API of -// go.opentelemetry.io/collector/component, a stable module. -// DO NOT MAKE BREAKING CHANGES TO EXPORTED FIELDS. -type TelemetrySettings struct { - // Logger that the factory can use during creation and can pass to the created - // component to be used later as well. - Logger *zap.Logger - - // TracerProvider that the factory can pass to other instrumented third-party libraries. - TracerProvider trace.TracerProvider - - // MeterProvider that the factory can pass to other instrumented third-party libraries. - MeterProvider metric.MeterProvider - - // Resource contains the resource attributes for the collector's telemetry. - Resource pcommon.Resource - - // Extra attributes added to instrumentation scopes - extraAttributes attribute.Set -} - -// The publicization of this API is tracked in https://github.com/open-telemetry/opentelemetry-collector/issues/12405 - -func WithoutAttributes(ts TelemetrySettings, fields ...string) TelemetrySettings { - return WithAttributeSet(ts, componentattribute.RemoveAttributes(ts.extraAttributes, fields...)) -} - -func WithAttributeSet(ts TelemetrySettings, attrs attribute.Set) TelemetrySettings { - ts.extraAttributes = attrs - ts.Logger = componentattribute.ZapLoggerWithAttributes(ts.Logger, ts.extraAttributes) - ts.TracerProvider = componentattribute.TracerProviderWithAttributes(ts.TracerProvider, ts.extraAttributes) - if NewPipelineTelemetryGate.IsEnabled() { - ts.MeterProvider = componentattribute.MeterProviderWithAttributes(ts.MeterProvider, ts.extraAttributes) - } - return ts -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/LICENSE b/vendor/go.opentelemetry.io/collector/pdata/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/go.opentelemetry.io/collector/pdata/internal/.gitignore b/vendor/go.opentelemetry.io/collector/pdata/internal/.gitignore deleted file mode 100644 index 328ede1552..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.patched-otlp-proto -opentelemetry-proto diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go deleted file mode 100644 index ca86912af9..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/bytesid.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "encoding/hex" - "errors" - "fmt" -) - -// marshalJSON converts trace id into a hex string enclosed in quotes. -// Called by Protobuf JSON deserialization. -func marshalJSON(id []byte) ([]byte, error) { - // Plus 2 quote chars at the start and end. - hexLen := hex.EncodedLen(len(id)) + 2 - - b := make([]byte, hexLen) - hex.Encode(b[1:hexLen-1], id) - b[0], b[hexLen-1] = '"', '"' - - return b, nil -} - -// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func unmarshalJSON(dst []byte, src []byte) error { - if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' { - src = src[1 : l-1] - } - nLen := len(src) - if nLen == 0 { - return nil - } - - if len(dst) != hex.DecodedLen(nLen) { - return errors.New("invalid length for ID") - } - - _, err := hex.Decode(dst, src) - if err != nil { - return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go deleted file mode 100644 index 5b4e6f53ce..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/profileid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const profileIDSize = 16 - -var ( - errMarshalProfileID = errors.New("marshal: invalid buffer length for ProfileID") - errUnmarshalProfileID = errors.New("unmarshal: invalid ProfileID length") -) - -// ProfileID is a custom data type that is used for all profile_id fields in OTLP -// Protobuf messages. -type ProfileID [profileIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (tid ProfileID) Size() int { - if tid.IsEmpty() { - return 0 - } - return profileIDSize -} - -// IsEmpty returns true if id contains at leas one non-zero byte. -func (tid ProfileID) IsEmpty() bool { - return tid == [profileIDSize]byte{} -} - -// MarshalTo converts profile ID into a binary representation. Called by Protobuf serialization. -func (tid ProfileID) MarshalTo(data []byte) (n int, err error) { - if tid.IsEmpty() { - return 0, nil - } - - if len(data) < profileIDSize { - return 0, errMarshalProfileID - } - - return copy(data, tid[:]), nil -} - -// Unmarshal inflates this profile ID from binary representation. Called by Protobuf serialization. -func (tid *ProfileID) Unmarshal(data []byte) error { - if len(data) == 0 { - *tid = [profileIDSize]byte{} - return nil - } - - if len(data) != profileIDSize { - return errUnmarshalProfileID - } - - copy(tid[:], data) - return nil -} - -// MarshalJSON converts profile id into a hex string enclosed in quotes. -func (tid ProfileID) MarshalJSON() ([]byte, error) { - if tid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(tid[:]) -} - -// UnmarshalJSON inflates profile id from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (tid *ProfileID) UnmarshalJSON(data []byte) error { - *tid = [profileIDSize]byte{} - return unmarshalJSON(tid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go deleted file mode 100644 index 46f2323801..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1/logs_service.pb.go +++ /dev/null @@ -1,844 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/logs/v1/logs_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportLogsServiceRequest struct { - // An array of ResourceLogs. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - ResourceLogs []*v1.ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` -} - -func (m *ExportLogsServiceRequest) Reset() { *m = ExportLogsServiceRequest{} } -func (m *ExportLogsServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceRequest) ProtoMessage() {} -func (*ExportLogsServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{0} -} -func (m *ExportLogsServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceRequest.Merge(m, src) -} -func (m *ExportLogsServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceRequest proto.InternalMessageInfo - -func (m *ExportLogsServiceRequest) GetResourceLogs() []*v1.ResourceLogs { - if m != nil { - return m.ResourceLogs - } - return nil -} - -type ExportLogsServiceResponse struct { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - PartialSuccess ExportLogsPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -func (m *ExportLogsServiceResponse) Reset() { *m = ExportLogsServiceResponse{} } -func (m *ExportLogsServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportLogsServiceResponse) ProtoMessage() {} -func (*ExportLogsServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{1} -} -func (m *ExportLogsServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsServiceResponse.Merge(m, src) -} -func (m *ExportLogsServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsServiceResponse proto.InternalMessageInfo - -func (m *ExportLogsServiceResponse) GetPartialSuccess() ExportLogsPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportLogsPartialSuccess{} -} - -type ExportLogsPartialSuccess struct { - // The number of rejected log records. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedLogRecords int64 `protobuf:"varint,1,opt,name=rejected_log_records,json=rejectedLogRecords,proto3" json:"rejected_log_records,omitempty"` - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (m *ExportLogsPartialSuccess) Reset() { *m = ExportLogsPartialSuccess{} } -func (m *ExportLogsPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportLogsPartialSuccess) ProtoMessage() {} -func (*ExportLogsPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_8e3bf87aaa43acd4, []int{2} -} -func (m *ExportLogsPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportLogsPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportLogsPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportLogsPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportLogsPartialSuccess.Merge(m, src) -} -func (m *ExportLogsPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportLogsPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportLogsPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportLogsPartialSuccess proto.InternalMessageInfo - -func (m *ExportLogsPartialSuccess) GetRejectedLogRecords() int64 { - if m != nil { - return m.RejectedLogRecords - } - return 0 -} - -func (m *ExportLogsPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportLogsServiceRequest)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest") - proto.RegisterType((*ExportLogsServiceResponse)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse") - proto.RegisterType((*ExportLogsPartialSuccess)(nil), "opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/logs/v1/logs_service.proto", fileDescriptor_8e3bf87aaa43acd4) -} - -var fileDescriptor_8e3bf87aaa43acd4 = []byte{ - // 430 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x93, 0xc1, 0x6e, 0x13, 0x31, - 0x10, 0x86, 0xd7, 0x2d, 0xaa, 0x84, 0xd3, 0x02, 0xb2, 0x7a, 0x08, 0x39, 0x2c, 0x55, 0x50, 0x51, - 0xb8, 0x78, 0x49, 0xb8, 0x70, 0x03, 0x05, 0x71, 0x0b, 0x10, 0x6d, 0x11, 0x07, 0x2e, 0xab, 0xc5, - 0x19, 0x59, 0x5b, 0x6d, 0x77, 0xdc, 0xb1, 0x13, 0xc1, 0x33, 0x20, 0x24, 0x5e, 0x80, 0x17, 0xe0, - 0x49, 0x7a, 0xe0, 0xd0, 0x23, 0x27, 0x84, 0x92, 0x17, 0x41, 0x5e, 0x97, 0xb0, 0x0b, 0x39, 0x04, - 0x4e, 0xbb, 0x1e, 0xcf, 0xff, 0xfd, 0xff, 0xd8, 0x32, 0x7f, 0x84, 0x06, 0x2a, 0x07, 0x25, 0x9c, - 0x81, 0xa3, 0xf7, 0x89, 0x21, 0x74, 0x98, 0x28, 0x2c, 0x4b, 0x50, 0x0e, 0x29, 0x29, 0x51, 0xdb, - 0x64, 0x31, 0xac, 0xbf, 0x99, 0x05, 0x5a, 0x14, 0x0a, 0x64, 0xdd, 0x24, 0x8e, 0x5b, 0xca, 0x50, - 0x94, 0x6b, 0xa5, 0xf4, 0x0a, 0xb9, 0x18, 0xf6, 0x0e, 0x35, 0x6a, 0x0c, 0x58, 0xff, 0x17, 0xfa, - 0x7a, 0xf7, 0x36, 0xd9, 0x36, 0xcd, 0x42, 0x5f, 0xff, 0x94, 0x77, 0x9f, 0xbd, 0x33, 0x48, 0x6e, - 0x82, 0xda, 0x9e, 0x04, 0xff, 0x14, 0xce, 0xe7, 0x60, 0x9d, 0x78, 0xc1, 0x0f, 0x08, 0x2c, 0xce, - 0x49, 0x41, 0xe6, 0x25, 0x5d, 0x76, 0xb4, 0x3b, 0xe8, 0x8c, 0xee, 0xcb, 0x4d, 0xc1, 0xae, 0xe2, - 0xc8, 0xf4, 0x4a, 0xe1, 0x79, 0xe9, 0x3e, 0x35, 0x56, 0xfd, 0x0f, 0x8c, 0xdf, 0xde, 0x60, 0x66, - 0x0d, 0x56, 0x16, 0x44, 0xc5, 0x6f, 0x9a, 0x9c, 0x5c, 0x91, 0x97, 0x99, 0x9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b, 0xc8, 0xa7, 0xeb, 0x24, 0x3e, 0x80, 0x7c, 0x3d, 0x7c, 0xbb, 0x57, 0x33, 0x1e, - 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xf0, 0xaf, 0x6c, 0x7d, 0x83, 0x03, 0x00, 0x00, -} - -// 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 - -// LogsServiceClient is the client API for LogsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type LogsServiceClient interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) -} - -type logsServiceClient struct { - cc *grpc.ClientConn -} - -func NewLogsServiceClient(cc *grpc.ClientConn) LogsServiceClient { - return &logsServiceClient{cc} -} - -func (c *logsServiceClient) Export(ctx context.Context, in *ExportLogsServiceRequest, opts ...grpc.CallOption) (*ExportLogsServiceResponse, error) { - out := new(ExportLogsServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.logs.v1.LogsService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// LogsServiceServer is the server API for LogsService service. -type LogsServiceServer interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) -} - -// UnimplementedLogsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedLogsServiceServer struct { -} - -func (*UnimplementedLogsServiceServer) Export(ctx context.Context, req *ExportLogsServiceRequest) (*ExportLogsServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterLogsServiceServer(s *grpc.Server, srv LogsServiceServer) { - s.RegisterService(&_LogsService_serviceDesc, srv) -} - -func _LogsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportLogsServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(LogsServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.logs.v1.LogsService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(LogsServiceServer).Export(ctx, req.(*ExportLogsServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _LogsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.logs.v1.LogsService", - HandlerType: (*LogsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _LogsService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/logs/v1/logs_service.proto", -} - -func (m *ExportLogsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for iNdEx := len(m.ResourceLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportLogsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportLogsPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportLogsPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportLogsPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintLogsService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedLogRecords != 0 { - i = encodeVarintLogsService(dAtA, i, uint64(m.RejectedLogRecords)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintLogsService(dAtA []byte, offset int, v uint64) int { - offset -= sovLogsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportLogsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for _, e := range m.ResourceLogs { - l = e.Size() - n += 1 + l + sovLogsService(uint64(l)) - } - } - return n -} - -func (m *ExportLogsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovLogsService(uint64(l)) - return n -} - -func (m *ExportLogsPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedLogRecords != 0 { - n += 1 + sovLogsService(uint64(m.RejectedLogRecords)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovLogsService(uint64(l)) - } - return n -} - -func sovLogsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogsService(x uint64) (n int) { - return sovLogsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportLogsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceLogs = append(m.ResourceLogs, &v1.ResourceLogs{}) - if err := m.ResourceLogs[len(m.ResourceLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportLogsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportLogsPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportLogsPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportLogsPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedLogRecords", wireType) - } - m.RejectedLogRecords = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedLogRecords |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogsService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go deleted file mode 100644 index fa9bf1307e..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1/metrics_service.pb.go +++ /dev/null @@ -1,844 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/metrics/v1/metrics_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportMetricsServiceRequest struct { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - ResourceMetrics []*v1.ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` -} - -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_75fb6015e6e64798, []int{0} -} -func (m *ExportMetricsServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceRequest.Merge(m, src) -} -func (m *ExportMetricsServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsServiceRequest proto.InternalMessageInfo - -func (m *ExportMetricsServiceRequest) GetResourceMetrics() []*v1.ResourceMetrics { - if m != nil { - return m.ResourceMetrics - } - return nil -} - -type ExportMetricsServiceResponse struct { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - PartialSuccess ExportMetricsPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -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_75fb6015e6e64798, []int{1} -} -func (m *ExportMetricsServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsServiceResponse.Merge(m, src) -} -func (m *ExportMetricsServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsServiceResponse proto.InternalMessageInfo - -func (m *ExportMetricsServiceResponse) GetPartialSuccess() ExportMetricsPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportMetricsPartialSuccess{} -} - -type ExportMetricsPartialSuccess struct { - // The number of rejected data points. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedDataPoints int64 `protobuf:"varint,1,opt,name=rejected_data_points,json=rejectedDataPoints,proto3" json:"rejected_data_points,omitempty"` - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (m *ExportMetricsPartialSuccess) Reset() { *m = ExportMetricsPartialSuccess{} } -func (m *ExportMetricsPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportMetricsPartialSuccess) ProtoMessage() {} -func (*ExportMetricsPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_75fb6015e6e64798, []int{2} -} -func (m *ExportMetricsPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportMetricsPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportMetricsPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportMetricsPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportMetricsPartialSuccess.Merge(m, src) -} -func (m *ExportMetricsPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportMetricsPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportMetricsPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportMetricsPartialSuccess proto.InternalMessageInfo - -func (m *ExportMetricsPartialSuccess) GetRejectedDataPoints() int64 { - if m != nil { - return m.RejectedDataPoints - } - return 0 -} - -func (m *ExportMetricsPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportMetricsServiceRequest)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest") - proto.RegisterType((*ExportMetricsServiceResponse)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse") - proto.RegisterType((*ExportMetricsPartialSuccess)(nil), "opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/metrics/v1/metrics_service.proto", fileDescriptor_75fb6015e6e64798) -} - -var fileDescriptor_75fb6015e6e64798 = []byte{ - // 427 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0xbf, 0x8e, 0xd3, 0x30, -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a2, 0xfa, 0xab, - 0x36, 0xc9, 0xa0, 0x6c, 0x5d, 0xb5, 0xef, 0x47, 0xe1, 0x40, 0x42, 0xf9, 0x6e, 0x27, 0x57, 0x1b, - 0xd1, 0xd7, 0xbb, 0x48, 0x4d, 0x0c, 0xfa, 0xbe, 0xfb, 0xe1, 0xa4, 0x56, 0x7a, 0xf9, 0x3b, 0x00, - 0x00, 0xff, 0xff, 0x47, 0xf2, 0x5f, 0x42, 0xc8, 0x03, 0x00, 0x00, -} - -// 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, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) -} - -type metricsServiceClient struct { - cc *grpc.ClientConn -} - -func NewMetricsServiceClient(cc *grpc.ClientConn) MetricsServiceClient { - return &metricsServiceClient{cc} -} - -func (c *metricsServiceClient) Export(ctx context.Context, in *ExportMetricsServiceRequest, opts ...grpc.CallOption) (*ExportMetricsServiceResponse, error) { - out := new(ExportMetricsServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, 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(context.Context, *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) -} - -// UnimplementedMetricsServiceServer can be embedded to have forward compatible implementations. -type UnimplementedMetricsServiceServer struct { -} - -func (*UnimplementedMetricsServiceServer) Export(ctx context.Context, req *ExportMetricsServiceRequest) (*ExportMetricsServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterMetricsServiceServer(s *grpc.Server, srv MetricsServiceServer) { - s.RegisterService(&_MetricsService_serviceDesc, srv) -} - -func _MetricsService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportMetricsServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MetricsServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.metrics.v1.MetricsService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MetricsServiceServer).Export(ctx, req.(*ExportMetricsServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _MetricsService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.metrics.v1.MetricsService", - HandlerType: (*MetricsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _MetricsService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/metrics/v1/metrics_service.proto", -} - -func (m *ExportMetricsServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for iNdEx := len(m.ResourceMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportMetricsServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetricsService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportMetricsPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportMetricsPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportMetricsPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintMetricsService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedDataPoints != 0 { - i = encodeVarintMetricsService(dAtA, i, uint64(m.RejectedDataPoints)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintMetricsService(dAtA []byte, offset int, v uint64) int { - offset -= sovMetricsService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportMetricsServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for _, e := range m.ResourceMetrics { - l = e.Size() - n += 1 + l + sovMetricsService(uint64(l)) - } - } - return n -} - -func (m *ExportMetricsServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovMetricsService(uint64(l)) - return n -} - -func (m *ExportMetricsPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedDataPoints != 0 { - n += 1 + sovMetricsService(uint64(m.RejectedDataPoints)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovMetricsService(uint64(l)) - } - return n -} - -func sovMetricsService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetricsService(x uint64) (n int) { - return sovMetricsService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportMetricsServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceMetrics = append(m.ResourceMetrics, &v1.ResourceMetrics{}) - if err := m.ResourceMetrics[len(m.ResourceMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportMetricsServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportMetricsPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportMetricsPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportMetricsPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedDataPoints", wireType) - } - m.RejectedDataPoints = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedDataPoints |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetricsService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetricsService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetricsService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetricsService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetricsService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetricsService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetricsService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetricsService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetricsService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetricsService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetricsService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetricsService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetricsService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go deleted file mode 100644 index 9e0475e687..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development/profiles_service.pb.go +++ /dev/null @@ -1,845 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/profiles/v1development/profiles_service.proto - -package v1development - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1development "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportProfilesServiceRequest struct { - // An array of ResourceProfiles. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - ResourceProfiles []*v1development.ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` -} - -func (m *ExportProfilesServiceRequest) Reset() { *m = ExportProfilesServiceRequest{} } -func (m *ExportProfilesServiceRequest) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesServiceRequest) ProtoMessage() {} -func (*ExportProfilesServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{0} -} -func (m *ExportProfilesServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesServiceRequest.Merge(m, src) -} -func (m *ExportProfilesServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesServiceRequest proto.InternalMessageInfo - -func (m *ExportProfilesServiceRequest) GetResourceProfiles() []*v1development.ResourceProfiles { - if m != nil { - return m.ResourceProfiles - } - return nil -} - -type ExportProfilesServiceResponse struct { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - PartialSuccess ExportProfilesPartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -func (m *ExportProfilesServiceResponse) Reset() { *m = ExportProfilesServiceResponse{} } -func (m *ExportProfilesServiceResponse) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesServiceResponse) ProtoMessage() {} -func (*ExportProfilesServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{1} -} -func (m *ExportProfilesServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesServiceResponse.Merge(m, src) -} -func (m *ExportProfilesServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesServiceResponse proto.InternalMessageInfo - -func (m *ExportProfilesServiceResponse) GetPartialSuccess() ExportProfilesPartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportProfilesPartialSuccess{} -} - -type ExportProfilesPartialSuccess struct { - // The number of rejected profiles. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedProfiles int64 `protobuf:"varint,1,opt,name=rejected_profiles,json=rejectedProfiles,proto3" json:"rejected_profiles,omitempty"` - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (m *ExportProfilesPartialSuccess) Reset() { *m = ExportProfilesPartialSuccess{} } -func (m *ExportProfilesPartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportProfilesPartialSuccess) ProtoMessage() {} -func (*ExportProfilesPartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_ad3943ce836e7720, []int{2} -} -func (m *ExportProfilesPartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportProfilesPartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportProfilesPartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportProfilesPartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportProfilesPartialSuccess.Merge(m, src) -} -func (m *ExportProfilesPartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportProfilesPartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportProfilesPartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportProfilesPartialSuccess proto.InternalMessageInfo - -func (m *ExportProfilesPartialSuccess) GetRejectedProfiles() int64 { - if m != nil { - return m.RejectedProfiles - } - return 0 -} - -func (m *ExportProfilesPartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportProfilesServiceRequest)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceRequest") - proto.RegisterType((*ExportProfilesServiceResponse)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesServiceResponse") - proto.RegisterType((*ExportProfilesPartialSuccess)(nil), "opentelemetry.proto.collector.profiles.v1development.ExportProfilesPartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", fileDescriptor_ad3943ce836e7720) -} - -var fileDescriptor_ad3943ce836e7720 = []byte{ - // 438 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0x4d, 0x8b, 0xd3, 0x40, - 0x18, 0xce, 0xb4, 0x52, 0x70, 0xaa, 0x56, 0x43, 0x0f, 0xa5, 0x68, 0x2c, 0xf1, 0x12, 0x10, 0x26, - 0xb4, 0x16, 0x44, 0xf0, 0x54, 0xf5, 0x24, 0x62, 0x48, 0xc5, 0x83, 0x1e, 0x42, 0x4c, 0x5f, 0x43, - 0x24, 0xcd, 0x8c, 0x33, 0xd3, 0xa2, 0x47, 0x8f, 0xde, 0xf6, 0x3f, 0xec, 0x6d, 0xaf, 0xfb, 0x23, - 0xb6, 0xc7, 0x1e, 0xf7, 0xb4, 0x2c, 0xed, 0xef, 0x58, 0x58, 0x92, 0x69, 0xb2, 0x9b, 0xd0, 0xa5, - 0x50, 0x7a, 0x9b, 0x79, 0x86, 0xe7, 0xe3, 0x7d, 0x86, 0x17, 0x7f, 0xa4, 0x0c, 0x12, 0x09, 0x31, - 0x4c, 0x41, 0xf2, 0xbf, 0x36, 0xe3, 0x54, 0x52, 0x3b, 0xa0, 0x71, 0x0c, 0x81, 0xa4, 0x3c, 0xbd, - 0xff, 0x8c, 0x62, 0x10, 0xf6, 0xbc, 0x3f, 0x81, 0x39, 0xc4, 0x94, 0x4d, 0x21, 0x91, 0x05, 0xec, - 0x09, 0xe0, 0xf3, 0x28, 0x00, 0x92, 0xf1, 0xf4, 0x61, 0x49, 0x4c, 0x81, 0xa4, 0x10, 0x23, 0x39, - 0x8b, 0x94, 0xc4, 0xba, 0xed, 0x90, 0x86, 0x54, 0x19, 0xa7, 0x27, 0x45, 0xeb, 0xbe, 0xd9, 0x16, -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ca, 0x40, 0xcb, 0x95, 0x81, 0x2e, 0x57, 0x06, 0x3a, 0x5a, 0x1b, - 0xda, 0x72, 0x6d, 0x68, 0xe7, 0x6b, 0x43, 0xc3, 0xaf, 0x23, 0xba, 0x97, 0xe7, 0xa8, 0x5d, 0xb1, - 0x73, 0x52, 0x9a, 0x83, 0xbe, 0x7d, 0x0f, 0xab, 0x82, 0x51, 0x69, 0x5b, 0x27, 0xbe, 0xf4, 0xed, - 0x28, 0x91, 0xc0, 0x13, 0x3f, 0xb6, 0xb3, 0x5b, 0xe6, 0x18, 0x42, 0xb2, 0x73, 0xa9, 0x4f, 0x6a, - 0xc3, 0xcf, 0x0c, 0x92, 0x2f, 0x85, 0x74, 0x66, 0x4a, 0xde, 0x15, 0x59, 0xf3, 0x4c, 0xe4, 0x6b, - 0xff, 0xfd, 0x0d, 0xed, 0x47, 0x23, 0x73, 0x78, 0x75, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x8f, 0x35, - 0x8c, 0xea, 0x4a, 0x04, 0x00, 0x00, -} - -// 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 - -// ProfilesServiceClient is the client API for ProfilesService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ProfilesServiceClient interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) -} - -type profilesServiceClient struct { - cc *grpc.ClientConn -} - -func NewProfilesServiceClient(cc *grpc.ClientConn) ProfilesServiceClient { - return &profilesServiceClient{cc} -} - -func (c *profilesServiceClient) Export(ctx context.Context, in *ExportProfilesServiceRequest, opts ...grpc.CallOption) (*ExportProfilesServiceResponse, error) { - out := new(ExportProfilesServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ProfilesServiceServer is the server API for ProfilesService service. -type ProfilesServiceServer interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) -} - -// UnimplementedProfilesServiceServer can be embedded to have forward compatible implementations. -type UnimplementedProfilesServiceServer struct { -} - -func (*UnimplementedProfilesServiceServer) Export(ctx context.Context, req *ExportProfilesServiceRequest) (*ExportProfilesServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterProfilesServiceServer(s *grpc.Server, srv ProfilesServiceServer) { - s.RegisterService(&_ProfilesService_serviceDesc, srv) -} - -func _ProfilesService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportProfilesServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ProfilesServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.profiles.v1development.ProfilesService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ProfilesServiceServer).Export(ctx, req.(*ExportProfilesServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _ProfilesService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.profiles.v1development.ProfilesService", - HandlerType: (*ProfilesServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _ProfilesService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/profiles/v1development/profiles_service.proto", -} - -func (m *ExportProfilesServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfilesService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportProfilesServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfilesService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportProfilesPartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportProfilesPartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportProfilesPartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintProfilesService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedProfiles != 0 { - i = encodeVarintProfilesService(dAtA, i, uint64(m.RejectedProfiles)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintProfilesService(dAtA []byte, offset int, v uint64) int { - offset -= sovProfilesService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportProfilesServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for _, e := range m.ResourceProfiles { - l = e.Size() - n += 1 + l + sovProfilesService(uint64(l)) - } - } - return n -} - -func (m *ExportProfilesServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovProfilesService(uint64(l)) - return n -} - -func (m *ExportProfilesPartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedProfiles != 0 { - n += 1 + sovProfilesService(uint64(m.RejectedProfiles)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovProfilesService(uint64(l)) - } - return n -} - -func sovProfilesService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProfilesService(x uint64) (n int) { - return sovProfilesService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportProfilesServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceProfiles = append(m.ResourceProfiles, &v1development.ResourceProfiles{}) - if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportProfilesServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportProfilesPartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportProfilesPartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportProfilesPartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedProfiles", wireType) - } - m.RejectedProfiles = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedProfiles |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfilesService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfilesService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfilesService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfilesService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfilesService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProfilesService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfilesService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProfilesService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProfilesService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProfilesService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProfilesService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProfilesService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProfilesService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go deleted file mode 100644 index cd919100f9..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1/trace_service.pb.go +++ /dev/null @@ -1,843 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/collector/trace/v1/trace_service.proto - -package v1 - -import ( - context "context" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -type ExportTraceServiceRequest struct { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain one - // element. Intermediary nodes (such as OpenTelemetry Collector) that receive - // data from multiple origins typically batch the data before forwarding further and - // in that case this array will contain multiple elements. - ResourceSpans []*v1.ResourceSpans `protobuf:"bytes,1,rep,name=resource_spans,json=resourceSpans,proto3" json:"resource_spans,omitempty"` -} - -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_192a962890318cf4, []int{0} -} -func (m *ExportTraceServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTraceServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceRequest.Merge(m, src) -} -func (m *ExportTraceServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *ExportTraceServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTraceServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTraceServiceRequest proto.InternalMessageInfo - -func (m *ExportTraceServiceRequest) GetResourceSpans() []*v1.ResourceSpans { - if m != nil { - return m.ResourceSpans - } - return nil -} - -type ExportTraceServiceResponse struct { - // The details of a partially successful export request. - // - // If the request is only partially accepted - // (i.e. when the server accepts only parts of the data and rejects the rest) - // the server MUST initialize the `partial_success` field and MUST - // set the `rejected_` with the number of items it rejected. - // - // Servers MAY also make use of the `partial_success` field to convey - // warnings/suggestions to senders even when the request was fully accepted. - // In such cases, the `rejected_` MUST have a value of `0` and - // the `error_message` MUST be non-empty. - // - // A `partial_success` message with an empty value (rejected_ = 0 and - // `error_message` = "") is equivalent to it not being set/present. Senders - // SHOULD interpret it the same way as in the full success case. - PartialSuccess ExportTracePartialSuccess `protobuf:"bytes,1,opt,name=partial_success,json=partialSuccess,proto3" json:"partial_success"` -} - -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_192a962890318cf4, []int{1} -} -func (m *ExportTraceServiceResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTraceServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTraceServiceResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTraceServiceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTraceServiceResponse.Merge(m, src) -} -func (m *ExportTraceServiceResponse) XXX_Size() int { - return m.Size() -} -func (m *ExportTraceServiceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTraceServiceResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTraceServiceResponse proto.InternalMessageInfo - -func (m *ExportTraceServiceResponse) GetPartialSuccess() ExportTracePartialSuccess { - if m != nil { - return m.PartialSuccess - } - return ExportTracePartialSuccess{} -} - -type ExportTracePartialSuccess struct { - // The number of rejected spans. - // - // A `rejected_` field holding a `0` value indicates that the - // request was fully accepted. - RejectedSpans int64 `protobuf:"varint,1,opt,name=rejected_spans,json=rejectedSpans,proto3" json:"rejected_spans,omitempty"` - // A developer-facing human-readable message in English. It should be used - // either to explain why the server rejected parts of the data during a partial - // success or to convey warnings/suggestions during a full success. The message - // should offer guidance on how users can address such issues. - // - // error_message is an optional field. An error_message with an empty value - // is equivalent to it not being set. - ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (m *ExportTracePartialSuccess) Reset() { *m = ExportTracePartialSuccess{} } -func (m *ExportTracePartialSuccess) String() string { return proto.CompactTextString(m) } -func (*ExportTracePartialSuccess) ProtoMessage() {} -func (*ExportTracePartialSuccess) Descriptor() ([]byte, []int) { - return fileDescriptor_192a962890318cf4, []int{2} -} -func (m *ExportTracePartialSuccess) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExportTracePartialSuccess) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExportTracePartialSuccess.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExportTracePartialSuccess) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExportTracePartialSuccess.Merge(m, src) -} -func (m *ExportTracePartialSuccess) XXX_Size() int { - return m.Size() -} -func (m *ExportTracePartialSuccess) XXX_DiscardUnknown() { - xxx_messageInfo_ExportTracePartialSuccess.DiscardUnknown(m) -} - -var xxx_messageInfo_ExportTracePartialSuccess proto.InternalMessageInfo - -func (m *ExportTracePartialSuccess) GetRejectedSpans() int64 { - if m != nil { - return m.RejectedSpans - } - return 0 -} - -func (m *ExportTracePartialSuccess) GetErrorMessage() string { - if m != nil { - return m.ErrorMessage - } - return "" -} - -func init() { - proto.RegisterType((*ExportTraceServiceRequest)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest") - proto.RegisterType((*ExportTraceServiceResponse)(nil), "opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse") - proto.RegisterType((*ExportTracePartialSuccess)(nil), "opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/collector/trace/v1/trace_service.proto", fileDescriptor_192a962890318cf4) -} - -var fileDescriptor_192a962890318cf4 = []byte{ - // 413 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x53, 0x4f, 0xeb, 0xd3, 0x30, - 0x18, 0x6e, 0x36, 0x19, 0x98, 0xfd, 0x11, 0x8b, 0x87, 0xd9, 0x43, 0x1d, 0x15, 0x47, 0x45, 0x48, - 0xd9, 0xbc, 0x79, 0xb3, 0xe2, 0x71, 0x38, 0xba, 0xe1, 0xc1, 0xcb, 0x88, 0xdd, 0x4b, 0xa9, 0x74, - 0x4d, 0x4c, 0xb2, 0xa1, 0x5f, 0x42, 0xf4, 0x2b, 0x78, 0xf4, 0x93, 0xec, 0xb8, 0xa3, 0x27, 0x91, - 0xed, 0x8b, 0x48, 0x12, 0x2d, 0xad, 0xf4, 0x30, 0x7e, 0xbf, 0x5b, 0xf2, 0xf0, 0x3e, 0x7f, 0xde, - 0x27, 0x04, 0xbf, 0x60, 0x1c, 0x4a, 0x05, 0x05, 0xec, 0x40, 0x89, 0xcf, 0x11, 0x17, 0x4c, 0xb1, - 0x28, 0x65, 0x45, 0x01, 0xa9, 0x62, 0x22, 0x52, 0x82, 0xa6, 0x10, 0x1d, 0x66, 0xf6, 0xb0, 0x91, - 0x20, 0x0e, 0x79, 0x0a, 0xc4, 0x8c, 0xb9, 0xd3, 0x06, 0xd7, 0x82, 0xa4, 0xe2, 0x12, 0x43, 0x21, - 0x87, 0x99, 0xf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f, 0x70, 0xe2, 0x13, 0x3a, 0x9e, 0x7d, - 0x74, 0x3a, 0xfb, 0xe8, 0xf7, 0xd9, 0x47, 0x5f, 0x2f, 0xbe, 0x73, 0xba, 0xf8, 0xce, 0xcf, 0x8b, - 0xef, 0xe0, 0xa7, 0x39, 0xbb, 0xd2, 0x22, 0xbe, 0x5f, 0x57, 0x5f, 0xea, 0xa9, 0x25, 0x7a, 0xb7, - 0xc8, 0xfe, 0xe7, 0xe7, 0xf5, 0xef, 0xc0, 0xb7, 0x54, 0xd1, 0x28, 0x2f, 0x15, 0x88, 0x92, 0x16, - 0x91, 0xb9, 0x19, 0x83, 0x0c, 0xca, 0x96, 0x5f, 0xf3, 0xa3, 0x33, 0x7d, 0xc3, 0xa1, 0x5c, 0x57, - 0x62, 0xc6, 0x86, 0xbc, 0xaa, 0xc2, 0x98, 0x08, 0xe4, 0xed, 0xec, 0x7d, 0xcf, 0xa8, 0x3c, 0xff, - 0x13, 0x00, 0x00, 0xff, 0xff, 0x82, 0xce, 0x78, 0xc7, 0x8f, 0x03, 0x00, 0x00, -} - -// 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 { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) -} - -type traceServiceClient struct { - cc *grpc.ClientConn -} - -func NewTraceServiceClient(cc *grpc.ClientConn) TraceServiceClient { - return &traceServiceClient{cc} -} - -func (c *traceServiceClient) Export(ctx context.Context, in *ExportTraceServiceRequest, opts ...grpc.CallOption) (*ExportTraceServiceResponse, error) { - out := new(ExportTraceServiceResponse) - err := c.cc.Invoke(ctx, "/opentelemetry.proto.collector.trace.v1.TraceService/Export", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TraceServiceServer is the server API for TraceService service. -type TraceServiceServer interface { - // For performance reasons, it is recommended to keep this RPC - // alive for the entire life of the application. - Export(context.Context, *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) -} - -// UnimplementedTraceServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTraceServiceServer struct { -} - -func (*UnimplementedTraceServiceServer) Export(ctx context.Context, req *ExportTraceServiceRequest) (*ExportTraceServiceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Export not implemented") -} - -func RegisterTraceServiceServer(s *grpc.Server, srv TraceServiceServer) { - s.RegisterService(&_TraceService_serviceDesc, srv) -} - -func _TraceService_Export_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ExportTraceServiceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TraceServiceServer).Export(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/opentelemetry.proto.collector.trace.v1.TraceService/Export", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TraceServiceServer).Export(ctx, req.(*ExportTraceServiceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TraceService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "opentelemetry.proto.collector.trace.v1.TraceService", - HandlerType: (*TraceServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Export", - Handler: _TraceService_Export_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "opentelemetry/proto/collector/trace/v1/trace_service.proto", -} - -func (m *ExportTraceServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExportTraceServiceResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTraceServiceResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTraceServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.PartialSuccess.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTraceService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExportTracePartialSuccess) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExportTracePartialSuccess) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExportTracePartialSuccess) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ErrorMessage) > 0 { - i -= len(m.ErrorMessage) - copy(dAtA[i:], m.ErrorMessage) - i = encodeVarintTraceService(dAtA, i, uint64(len(m.ErrorMessage))) - i-- - dAtA[i] = 0x12 - } - if m.RejectedSpans != 0 { - i = encodeVarintTraceService(dAtA, i, uint64(m.RejectedSpans)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintTraceService(dAtA []byte, offset int, v uint64) int { - offset -= sovTraceService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ExportTraceServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for _, e := range m.ResourceSpans { - l = e.Size() - n += 1 + l + sovTraceService(uint64(l)) - } - } - return n -} - -func (m *ExportTraceServiceResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PartialSuccess.Size() - n += 1 + l + sovTraceService(uint64(l)) - return n -} - -func (m *ExportTracePartialSuccess) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RejectedSpans != 0 { - n += 1 + sovTraceService(uint64(m.RejectedSpans)) - } - l = len(m.ErrorMessage) - if l > 0 { - n += 1 + l + sovTraceService(uint64(l)) - } - return n -} - -func sovTraceService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTraceService(x uint64) (n int) { - return sovTraceService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ExportTraceServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceSpans = append(m.ResourceSpans, &v1.ResourceSpans{}) - if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportTraceServiceResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTraceServiceResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTraceServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PartialSuccess", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PartialSuccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExportTracePartialSuccess) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExportTracePartialSuccess: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExportTracePartialSuccess: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RejectedSpans", wireType) - } - m.RejectedSpans = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.RejectedSpans |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ErrorMessage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTraceService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTraceService - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTraceService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ErrorMessage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTraceService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTraceService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTraceService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTraceService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTraceService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTraceService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTraceService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTraceService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTraceService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTraceService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go deleted file mode 100644 index ed4df25713..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1/common.pb.go +++ /dev/null @@ -1,1721 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/common/v1/common.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AnyValue is used to represent any type of attribute value. AnyValue may contain a -// primitive value such as a string or integer or it may contain an arbitrary nested -// object containing arrays, key-value lists and primitives. -type AnyValue struct { - // The value is one of the listed fields. It is valid for all values to be unspecified - // in which case this AnyValue is considered to be "empty". - // - // Types that are valid to be assigned to Value: - // *AnyValue_StringValue - // *AnyValue_BoolValue - // *AnyValue_IntValue - // *AnyValue_DoubleValue - // *AnyValue_ArrayValue - // *AnyValue_KvlistValue - // *AnyValue_BytesValue - Value isAnyValue_Value `protobuf_oneof:"value"` -} - -func (m *AnyValue) Reset() { *m = AnyValue{} } -func (m *AnyValue) String() string { return proto.CompactTextString(m) } -func (*AnyValue) ProtoMessage() {} -func (*AnyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{0} -} -func (m *AnyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AnyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AnyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnyValue.Merge(m, src) -} -func (m *AnyValue) XXX_Size() int { - return m.Size() -} -func (m *AnyValue) XXX_DiscardUnknown() { - xxx_messageInfo_AnyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_AnyValue proto.InternalMessageInfo - -type isAnyValue_Value interface { - isAnyValue_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type AnyValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof" json:"string_value,omitempty"` -} -type AnyValue_BoolValue struct { - BoolValue bool `protobuf:"varint,2,opt,name=bool_value,json=boolValue,proto3,oneof" json:"bool_value,omitempty"` -} -type AnyValue_IntValue struct { - IntValue int64 `protobuf:"varint,3,opt,name=int_value,json=intValue,proto3,oneof" json:"int_value,omitempty"` -} -type AnyValue_DoubleValue struct { - DoubleValue float64 `protobuf:"fixed64,4,opt,name=double_value,json=doubleValue,proto3,oneof" json:"double_value,omitempty"` -} -type AnyValue_ArrayValue struct { - ArrayValue *ArrayValue `protobuf:"bytes,5,opt,name=array_value,json=arrayValue,proto3,oneof" json:"array_value,omitempty"` -} -type AnyValue_KvlistValue struct { - KvlistValue *KeyValueList `protobuf:"bytes,6,opt,name=kvlist_value,json=kvlistValue,proto3,oneof" json:"kvlist_value,omitempty"` -} -type AnyValue_BytesValue struct { - BytesValue []byte `protobuf:"bytes,7,opt,name=bytes_value,json=bytesValue,proto3,oneof" json:"bytes_value,omitempty"` -} - -func (*AnyValue_StringValue) isAnyValue_Value() {} -func (*AnyValue_BoolValue) isAnyValue_Value() {} -func (*AnyValue_IntValue) isAnyValue_Value() {} -func (*AnyValue_DoubleValue) isAnyValue_Value() {} -func (*AnyValue_ArrayValue) isAnyValue_Value() {} -func (*AnyValue_KvlistValue) isAnyValue_Value() {} -func (*AnyValue_BytesValue) isAnyValue_Value() {} - -func (m *AnyValue) GetValue() isAnyValue_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *AnyValue) GetStringValue() string { - if x, ok := m.GetValue().(*AnyValue_StringValue); ok { - return x.StringValue - } - return "" -} - -func (m *AnyValue) GetBoolValue() bool { - if x, ok := m.GetValue().(*AnyValue_BoolValue); ok { - return x.BoolValue - } - return false -} - -func (m *AnyValue) GetIntValue() int64 { - if x, ok := m.GetValue().(*AnyValue_IntValue); ok { - return x.IntValue - } - return 0 -} - -func (m *AnyValue) GetDoubleValue() float64 { - if x, ok := m.GetValue().(*AnyValue_DoubleValue); ok { - return x.DoubleValue - } - return 0 -} - -func (m *AnyValue) GetArrayValue() *ArrayValue { - if x, ok := m.GetValue().(*AnyValue_ArrayValue); ok { - return x.ArrayValue - } - return nil -} - -func (m *AnyValue) GetKvlistValue() *KeyValueList { - if x, ok := m.GetValue().(*AnyValue_KvlistValue); ok { - return x.KvlistValue - } - return nil -} - -func (m *AnyValue) GetBytesValue() []byte { - if x, ok := m.GetValue().(*AnyValue_BytesValue); ok { - return x.BytesValue - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*AnyValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*AnyValue_StringValue)(nil), - (*AnyValue_BoolValue)(nil), - (*AnyValue_IntValue)(nil), - (*AnyValue_DoubleValue)(nil), - (*AnyValue_ArrayValue)(nil), - (*AnyValue_KvlistValue)(nil), - (*AnyValue_BytesValue)(nil), - } -} - -// ArrayValue is a list of AnyValue messages. We need ArrayValue as a message -// since oneof in AnyValue does not allow repeated fields. -type ArrayValue struct { - // Array of values. The array may be empty (contain 0 elements). - Values []AnyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"` -} - -func (m *ArrayValue) Reset() { *m = ArrayValue{} } -func (m *ArrayValue) String() string { return proto.CompactTextString(m) } -func (*ArrayValue) ProtoMessage() {} -func (*ArrayValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{1} -} -func (m *ArrayValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArrayValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ArrayValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ArrayValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArrayValue.Merge(m, src) -} -func (m *ArrayValue) XXX_Size() int { - return m.Size() -} -func (m *ArrayValue) XXX_DiscardUnknown() { - xxx_messageInfo_ArrayValue.DiscardUnknown(m) -} - -var xxx_messageInfo_ArrayValue proto.InternalMessageInfo - -func (m *ArrayValue) GetValues() []AnyValue { - if m != nil { - return m.Values - } - return nil -} - -// KeyValueList is a list of KeyValue messages. We need KeyValueList as a message -// since `oneof` in AnyValue does not allow repeated fields. Everywhere else where we need -// a list of KeyValue messages (e.g. in Span) we use `repeated KeyValue` directly to -// avoid unnecessary extra wrapping (which slows down the protocol). The 2 approaches -// are semantically equivalent. -type KeyValueList struct { - // A collection of key/value pairs of key-value pairs. The list may be empty (may - // contain 0 elements). - // The keys MUST be unique (it is not allowed to have more than one - // value with the same key). - Values []KeyValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values"` -} - -func (m *KeyValueList) Reset() { *m = KeyValueList{} } -func (m *KeyValueList) String() string { return proto.CompactTextString(m) } -func (*KeyValueList) ProtoMessage() {} -func (*KeyValueList) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{2} -} -func (m *KeyValueList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValueList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValueList.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValueList) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValueList.Merge(m, src) -} -func (m *KeyValueList) XXX_Size() int { - return m.Size() -} -func (m *KeyValueList) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValueList.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValueList proto.InternalMessageInfo - -func (m *KeyValueList) GetValues() []KeyValue { - if m != nil { - return m.Values - } - return nil -} - -// KeyValue is a key-value pair that is used to store Span attributes, Link -// attributes, etc. -type KeyValue struct { - Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` - Value AnyValue `protobuf:"bytes,2,opt,name=value,proto3" json:"value"` -} - -func (m *KeyValue) Reset() { *m = KeyValue{} } -func (m *KeyValue) String() string { return proto.CompactTextString(m) } -func (*KeyValue) ProtoMessage() {} -func (*KeyValue) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{3} -} -func (m *KeyValue) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *KeyValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_KeyValue.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *KeyValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_KeyValue.Merge(m, src) -} -func (m *KeyValue) XXX_Size() int { - return m.Size() -} -func (m *KeyValue) XXX_DiscardUnknown() { - xxx_messageInfo_KeyValue.DiscardUnknown(m) -} - -var xxx_messageInfo_KeyValue proto.InternalMessageInfo - -func (m *KeyValue) GetKey() string { - if m != nil { - return m.Key - } - return "" -} - -func (m *KeyValue) GetValue() AnyValue { - if m != nil { - return m.Value - } - return AnyValue{} -} - -// InstrumentationScope is a message representing the instrumentation scope information -// such as the fully qualified name and version. -type InstrumentationScope struct { - // An empty instrumentation scope name means the name is unknown. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // Additional attributes that describe the scope. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes"` - DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` -} - -func (m *InstrumentationScope) Reset() { *m = InstrumentationScope{} } -func (m *InstrumentationScope) String() string { return proto.CompactTextString(m) } -func (*InstrumentationScope) ProtoMessage() {} -func (*InstrumentationScope) Descriptor() ([]byte, []int) { - return fileDescriptor_62ba46dcb97aa817, []int{4} -} -func (m *InstrumentationScope) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InstrumentationScope) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InstrumentationScope.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InstrumentationScope) XXX_Merge(src proto.Message) { - xxx_messageInfo_InstrumentationScope.Merge(m, src) -} -func (m *InstrumentationScope) XXX_Size() int { - return m.Size() -} -func (m *InstrumentationScope) XXX_DiscardUnknown() { - xxx_messageInfo_InstrumentationScope.DiscardUnknown(m) -} - -var xxx_messageInfo_InstrumentationScope proto.InternalMessageInfo - -func (m *InstrumentationScope) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *InstrumentationScope) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *InstrumentationScope) GetAttributes() []KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *InstrumentationScope) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func init() { - proto.RegisterType((*AnyValue)(nil), "opentelemetry.proto.common.v1.AnyValue") - proto.RegisterType((*ArrayValue)(nil), "opentelemetry.proto.common.v1.ArrayValue") - proto.RegisterType((*KeyValueList)(nil), "opentelemetry.proto.common.v1.KeyValueList") - proto.RegisterType((*KeyValue)(nil), "opentelemetry.proto.common.v1.KeyValue") - proto.RegisterType((*InstrumentationScope)(nil), "opentelemetry.proto.common.v1.InstrumentationScope") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/common/v1/common.proto", fileDescriptor_62ba46dcb97aa817) -} - -var fileDescriptor_62ba46dcb97aa817 = []byte{ - // 532 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6b, 0x13, 0x41, - 0x14, 0xdf, 0x69, 0xd2, 0xfc, 0x79, 0x1b, 0x41, 0x86, 0x22, 0x41, 0xc8, 0x76, 0x8d, 0x07, 0x57, - 0x85, 0x5d, 0x52, 0x2f, 0x5e, 0x93, 0x28, 0x44, 0xac, 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 0x42, 0x73, 0x2a, 0x45, 0x9e, 0xd3, 0xe9, 0x68, 0x8f, 0x8e, 0x26, - 0x62, 0xc1, 0x95, 0x79, 0xa1, 0x8f, 0xd2, 0x27, 0x8e, 0xef, 0xee, 0xe8, 0xbe, 0x66, 0x7b, 0x3f, - 0xd1, 0xe5, 0x3a, 0x40, 0x57, 0xeb, 0x00, 0x5d, 0xaf, 0x03, 0xf4, 0x7d, 0x13, 0x78, 0x57, 0x9b, - 0xc0, 0xfb, 0xbd, 0x09, 0x3c, 0x08, 0x99, 0xb8, 0x7b, 0xa2, 0x9e, 0xdf, 0x37, 0xe5, 0x50, 0xc3, - 0x43, 0xf4, 0xed, 0xdd, 0xec, 0xb6, 0x81, 0xe9, 0xbf, 0x7b, 0x96, 0xd1, 0x89, 0x12, 0x32, 0xc9, - 0xa7, 0x44, 0x91, 0x84, 0x71, 0x45, 0x25, 0x27, 0x59, 0x62, 0x4e, 0x26, 0x71, 0x46, 0xf9, 0xfe, - 0xab, 0xf0, 0xe3, 0xa0, 0xf5, 0x39, 0xa7, 0xfc, 0xcb, 0x2e, 0xc3, 0xa4, 0xc7, 0xb6, 0x53, 0x7c, - 0xde, 0x19, 0x57, 0x8c, 0xe7, 0xcd, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x04, 0x1b, 0xbb, 0x73, - 0x5d, 0x04, 0x00, 0x00, -} - -func (m *AnyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AnyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *AnyValue_StringValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_StringValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.StringValue) - copy(dAtA[i:], m.StringValue) - i = encodeVarintCommon(dAtA, i, uint64(len(m.StringValue))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} -func (m *AnyValue_BoolValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_BoolValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i-- - if m.BoolValue { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - return len(dAtA) - i, nil -} -func (m *AnyValue_IntValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_IntValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintCommon(dAtA, i, uint64(m.IntValue)) - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} -func (m *AnyValue_DoubleValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_DoubleValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.DoubleValue)))) - i-- - dAtA[i] = 0x21 - return len(dAtA) - i, nil -} -func (m *AnyValue_ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ArrayValue != nil { - { - size, err := m.ArrayValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *AnyValue_KvlistValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_KvlistValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.KvlistValue != nil { - { - size, err := m.KvlistValue.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *AnyValue_BytesValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyValue_BytesValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.BytesValue != nil { - i -= len(m.BytesValue) - copy(dAtA[i:], m.BytesValue) - i = encodeVarintCommon(dAtA, i, uint64(len(m.BytesValue))) - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *ArrayValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArrayValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ArrayValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValueList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValueList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValueList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Values) > 0 { - for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Values[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *KeyValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *KeyValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *KeyValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Value.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *InstrumentationScope) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InstrumentationScope) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InstrumentationScope) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DroppedAttributesCount != 0 { - i = encodeVarintCommon(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintCommon(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintCommon(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintCommon(dAtA []byte, offset int, v uint64) int { - offset -= sovCommon(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AnyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Value != nil { - n += m.Value.Size() - } - return n -} - -func (m *AnyValue_StringValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.StringValue) - n += 1 + l + sovCommon(uint64(l)) - return n -} -func (m *AnyValue_BoolValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} -func (m *AnyValue_IntValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovCommon(uint64(m.IntValue)) - return n -} -func (m *AnyValue_DoubleValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *AnyValue_ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ArrayValue != nil { - l = m.ArrayValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *AnyValue_KvlistValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KvlistValue != nil { - l = m.KvlistValue.Size() - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *AnyValue_BytesValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BytesValue != nil { - l = len(m.BytesValue) - n += 1 + l + sovCommon(uint64(l)) - } - return n -} -func (m *ArrayValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - return n -} - -func (m *KeyValueList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Values) > 0 { - for _, e := range m.Values { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - return n -} - -func (m *KeyValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = m.Value.Size() - n += 1 + l + sovCommon(uint64(l)) - return n -} - -func (m *InstrumentationScope) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovCommon(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovCommon(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovCommon(uint64(m.DroppedAttributesCount)) - } - return n -} - -func sovCommon(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozCommon(x uint64) (n int) { - return sovCommon(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AnyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AnyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AnyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringValue", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = &AnyValue_StringValue{string(dAtA[iNdEx:postIndex])} - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BoolValue", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Value = &AnyValue_BoolValue{b} - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntValue", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = &AnyValue_IntValue{v} - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field DoubleValue", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &AnyValue_DoubleValue{float64(math.Float64frombits(v))} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ArrayValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ArrayValue{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_ArrayValue{v} - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KvlistValue", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &KeyValueList{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Value = &AnyValue_KvlistValue{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BytesValue", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := make([]byte, postIndex-iNdEx) - copy(v, dAtA[iNdEx:postIndex]) - m.Value = &AnyValue_BytesValue{v} - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ArrayValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArrayValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArrayValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, AnyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValueList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValueList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValueList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Values = append(m.Values, KeyValue{}) - if err := m.Values[len(m.Values)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *KeyValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: KeyValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: KeyValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *InstrumentationScope) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InstrumentationScope: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InstrumentationScope: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthCommon - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthCommon - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowCommon - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipCommon(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthCommon - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipCommon(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowCommon - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthCommon - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupCommon - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthCommon - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthCommon = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowCommon = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go deleted file mode 100644 index 1fb0f2b685..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1/logs.pb.go +++ /dev/null @@ -1,1836 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/logs/v1/logs.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Possible values for LogRecord.SeverityNumber. -type SeverityNumber int32 - -const ( - // UNSPECIFIED is the default SeverityNumber, it MUST NOT be used. - SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED SeverityNumber = 0 - SeverityNumber_SEVERITY_NUMBER_TRACE SeverityNumber = 1 - SeverityNumber_SEVERITY_NUMBER_TRACE2 SeverityNumber = 2 - SeverityNumber_SEVERITY_NUMBER_TRACE3 SeverityNumber = 3 - SeverityNumber_SEVERITY_NUMBER_TRACE4 SeverityNumber = 4 - SeverityNumber_SEVERITY_NUMBER_DEBUG SeverityNumber = 5 - SeverityNumber_SEVERITY_NUMBER_DEBUG2 SeverityNumber = 6 - SeverityNumber_SEVERITY_NUMBER_DEBUG3 SeverityNumber = 7 - SeverityNumber_SEVERITY_NUMBER_DEBUG4 SeverityNumber = 8 - SeverityNumber_SEVERITY_NUMBER_INFO SeverityNumber = 9 - SeverityNumber_SEVERITY_NUMBER_INFO2 SeverityNumber = 10 - SeverityNumber_SEVERITY_NUMBER_INFO3 SeverityNumber = 11 - SeverityNumber_SEVERITY_NUMBER_INFO4 SeverityNumber = 12 - SeverityNumber_SEVERITY_NUMBER_WARN SeverityNumber = 13 - SeverityNumber_SEVERITY_NUMBER_WARN2 SeverityNumber = 14 - SeverityNumber_SEVERITY_NUMBER_WARN3 SeverityNumber = 15 - SeverityNumber_SEVERITY_NUMBER_WARN4 SeverityNumber = 16 - SeverityNumber_SEVERITY_NUMBER_ERROR SeverityNumber = 17 - SeverityNumber_SEVERITY_NUMBER_ERROR2 SeverityNumber = 18 - SeverityNumber_SEVERITY_NUMBER_ERROR3 SeverityNumber = 19 - SeverityNumber_SEVERITY_NUMBER_ERROR4 SeverityNumber = 20 - SeverityNumber_SEVERITY_NUMBER_FATAL SeverityNumber = 21 - SeverityNumber_SEVERITY_NUMBER_FATAL2 SeverityNumber = 22 - SeverityNumber_SEVERITY_NUMBER_FATAL3 SeverityNumber = 23 - SeverityNumber_SEVERITY_NUMBER_FATAL4 SeverityNumber = 24 -) - -var SeverityNumber_name = map[int32]string{ - 0: "SEVERITY_NUMBER_UNSPECIFIED", - 1: "SEVERITY_NUMBER_TRACE", - 2: "SEVERITY_NUMBER_TRACE2", - 3: "SEVERITY_NUMBER_TRACE3", - 4: "SEVERITY_NUMBER_TRACE4", - 5: "SEVERITY_NUMBER_DEBUG", - 6: "SEVERITY_NUMBER_DEBUG2", - 7: "SEVERITY_NUMBER_DEBUG3", - 8: "SEVERITY_NUMBER_DEBUG4", - 9: "SEVERITY_NUMBER_INFO", - 10: "SEVERITY_NUMBER_INFO2", - 11: "SEVERITY_NUMBER_INFO3", - 12: "SEVERITY_NUMBER_INFO4", - 13: "SEVERITY_NUMBER_WARN", - 14: "SEVERITY_NUMBER_WARN2", - 15: "SEVERITY_NUMBER_WARN3", - 16: "SEVERITY_NUMBER_WARN4", - 17: "SEVERITY_NUMBER_ERROR", - 18: "SEVERITY_NUMBER_ERROR2", - 19: "SEVERITY_NUMBER_ERROR3", - 20: "SEVERITY_NUMBER_ERROR4", - 21: "SEVERITY_NUMBER_FATAL", - 22: "SEVERITY_NUMBER_FATAL2", - 23: "SEVERITY_NUMBER_FATAL3", - 24: "SEVERITY_NUMBER_FATAL4", -} - -var SeverityNumber_value = map[string]int32{ - "SEVERITY_NUMBER_UNSPECIFIED": 0, - "SEVERITY_NUMBER_TRACE": 1, - "SEVERITY_NUMBER_TRACE2": 2, - "SEVERITY_NUMBER_TRACE3": 3, - "SEVERITY_NUMBER_TRACE4": 4, - "SEVERITY_NUMBER_DEBUG": 5, - "SEVERITY_NUMBER_DEBUG2": 6, - "SEVERITY_NUMBER_DEBUG3": 7, - "SEVERITY_NUMBER_DEBUG4": 8, - "SEVERITY_NUMBER_INFO": 9, - "SEVERITY_NUMBER_INFO2": 10, - "SEVERITY_NUMBER_INFO3": 11, - "SEVERITY_NUMBER_INFO4": 12, - "SEVERITY_NUMBER_WARN": 13, - "SEVERITY_NUMBER_WARN2": 14, - "SEVERITY_NUMBER_WARN3": 15, - "SEVERITY_NUMBER_WARN4": 16, - "SEVERITY_NUMBER_ERROR": 17, - "SEVERITY_NUMBER_ERROR2": 18, - "SEVERITY_NUMBER_ERROR3": 19, - "SEVERITY_NUMBER_ERROR4": 20, - "SEVERITY_NUMBER_FATAL": 21, - "SEVERITY_NUMBER_FATAL2": 22, - "SEVERITY_NUMBER_FATAL3": 23, - "SEVERITY_NUMBER_FATAL4": 24, -} - -func (x SeverityNumber) String() string { - return proto.EnumName(SeverityNumber_name, int32(x)) -} - -func (SeverityNumber) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} - -// LogRecordFlags represents constants used to interpret the -// LogRecord.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (logRecord.flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK) -type LogRecordFlags int32 - -const ( - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - LogRecordFlags_LOG_RECORD_FLAGS_DO_NOT_USE LogRecordFlags = 0 - // Bits 0-7 are used for trace flags. - LogRecordFlags_LOG_RECORD_FLAGS_TRACE_FLAGS_MASK LogRecordFlags = 255 -) - -var LogRecordFlags_name = map[int32]string{ - 0: "LOG_RECORD_FLAGS_DO_NOT_USE", - 255: "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK", -} - -var LogRecordFlags_value = map[string]int32{ - "LOG_RECORD_FLAGS_DO_NOT_USE": 0, - "LOG_RECORD_FLAGS_TRACE_FLAGS_MASK": 255, -} - -func (x LogRecordFlags) String() string { - return proto.EnumName(LogRecordFlags_name, int32(x)) -} - -func (LogRecordFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} - -// LogsData represents the logs data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP logs data but do not -// implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type LogsData struct { - // An array of ResourceLogs. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceLogs []*ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"` -} - -func (m *LogsData) Reset() { *m = LogsData{} } -func (m *LogsData) String() string { return proto.CompactTextString(m) } -func (*LogsData) ProtoMessage() {} -func (*LogsData) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{0} -} -func (m *LogsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogsData.Merge(m, src) -} -func (m *LogsData) XXX_Size() int { - return m.Size() -} -func (m *LogsData) XXX_DiscardUnknown() { - xxx_messageInfo_LogsData.DiscardUnknown(m) -} - -var xxx_messageInfo_LogsData proto.InternalMessageInfo - -func (m *LogsData) GetResourceLogs() []*ResourceLogs { - if m != nil { - return m.ResourceLogs - } - return nil -} - -// A collection of ScopeLogs from a Resource. -type ResourceLogs struct { - DeprecatedScopeLogs []*ScopeLogs `protobuf:"bytes,1000,rep,name=deprecated_scope_logs,json=deprecatedScopeLogs,proto3" json:"deprecated_scope_logs,omitempty"` - // The resource for the logs in this message. - // If this field is not set then resource info is unknown. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeLogs that originate from a resource. - ScopeLogs []*ScopeLogs `protobuf:"bytes,2,rep,name=scope_logs,json=scopeLogs,proto3" json:"scope_logs,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_logs" field which have their own schema_url field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ResourceLogs) Reset() { *m = ResourceLogs{} } -func (m *ResourceLogs) String() string { return proto.CompactTextString(m) } -func (*ResourceLogs) ProtoMessage() {} -func (*ResourceLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{1} -} -func (m *ResourceLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceLogs.Merge(m, src) -} -func (m *ResourceLogs) XXX_Size() int { - return m.Size() -} -func (m *ResourceLogs) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceLogs proto.InternalMessageInfo - -func (m *ResourceLogs) GetDeprecatedScopeLogs() []*ScopeLogs { - if m != nil { - return m.DeprecatedScopeLogs - } - return nil -} - -func (m *ResourceLogs) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceLogs) GetScopeLogs() []*ScopeLogs { - if m != nil { - return m.ScopeLogs - } - return nil -} - -func (m *ResourceLogs) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Logs produced by a Scope. -type ScopeLogs struct { - // The instrumentation scope information for the logs in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of log records. - LogRecords []*LogRecord `protobuf:"bytes,2,rep,name=log_records,json=logRecords,proto3" json:"log_records,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the log data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all logs in the "logs" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeLogs) Reset() { *m = ScopeLogs{} } -func (m *ScopeLogs) String() string { return proto.CompactTextString(m) } -func (*ScopeLogs) ProtoMessage() {} -func (*ScopeLogs) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{2} -} -func (m *ScopeLogs) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeLogs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeLogs.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeLogs) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeLogs.Merge(m, src) -} -func (m *ScopeLogs) XXX_Size() int { - return m.Size() -} -func (m *ScopeLogs) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeLogs.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeLogs proto.InternalMessageInfo - -func (m *ScopeLogs) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeLogs) GetLogRecords() []*LogRecord { - if m != nil { - return m.LogRecords - } - return nil -} - -func (m *ScopeLogs) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A log record according to OpenTelemetry Log Data Model: -// https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md -type LogRecord struct { - // time_unix_nano is the time when the event occurred. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // Time when the event was observed by the collection system. - // For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK) - // this timestamp is typically set at the generation time and is equal to Timestamp. - // For events originating externally and collected by OpenTelemetry (e.g. using - // Collector) this is the time when OpenTelemetry's code observed the event measured - // by the clock of the OpenTelemetry code. This field MUST be set once the event is - // observed by OpenTelemetry. - // - // For converting OpenTelemetry log data to formats that support only one timestamp or - // when receiving OpenTelemetry log data by recipients that support only one timestamp - // internally the following logic is recommended: - // - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // Value of 0 indicates unknown or missing timestamp. - ObservedTimeUnixNano uint64 `protobuf:"fixed64,11,opt,name=observed_time_unix_nano,json=observedTimeUnixNano,proto3" json:"observed_time_unix_nano,omitempty"` - // Numerical value of the severity, normalized to values described in Log Data Model. - // [Optional]. - SeverityNumber SeverityNumber `protobuf:"varint,2,opt,name=severity_number,json=severityNumber,proto3,enum=opentelemetry.proto.logs.v1.SeverityNumber" json:"severity_number,omitempty"` - // The severity text (also known as log level). The original string representation as - // it is known at the source. [Optional]. - SeverityText string `protobuf:"bytes,3,opt,name=severity_text,json=severityText,proto3" json:"severity_text,omitempty"` - // A value containing the body of the log record. Can be for example a human-readable - // string message (including multi-line) describing the event in a free form or it can - // be a structured data composed of arrays and maps of other values. [Optional]. - Body v11.AnyValue `protobuf:"bytes,5,opt,name=body,proto3" json:"body"` - // Additional attributes that describe the specific event occurrence. [Optional]. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,6,rep,name=attributes,proto3" json:"attributes"` - DroppedAttributesCount uint32 `protobuf:"varint,7,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Flags, a bit field. 8 least significant bits are the trace flags as - // defined in W3C Trace Context specification. 24 most significant bits are reserved - // and must be set to 0. Readers must not assume that 24 most significant bits - // will be zero and must correctly mask the bits when reading 8-bit trace flag (use - // flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional]. - Flags uint32 `protobuf:"fixed32,8,opt,name=flags,proto3" json:"flags,omitempty"` - // A unique identifier for a trace. All logs from the same trace share - // the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is optional. - // - // The receivers SHOULD assume that the log record is not associated with a - // trace if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,9,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is optional. If the sender specifies a valid span_id then it SHOULD also - // specify a valid trace_id. - // - // The receivers SHOULD assume that the log record is not associated with a - // span if any of the following is true: - // - the field is not present, - // - the field contains an invalid value. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,10,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // A unique identifier of event category/type. - // All events with the same event_name are expected to conform to the same - // schema for both their attributes and their body. - // - // Recommended to be fully qualified and short (no longer than 256 characters). - // - // Presence of event_name on the log record identifies this record - // as an event. - // - // [Optional]. - // - // Status: [Development] - EventName string `protobuf:"bytes,12,opt,name=event_name,json=eventName,proto3" json:"event_name,omitempty"` -} - -func (m *LogRecord) Reset() { *m = LogRecord{} } -func (m *LogRecord) String() string { return proto.CompactTextString(m) } -func (*LogRecord) ProtoMessage() {} -func (*LogRecord) Descriptor() ([]byte, []int) { - return fileDescriptor_d1c030a3ec7e961e, []int{3} -} -func (m *LogRecord) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *LogRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_LogRecord.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *LogRecord) XXX_Merge(src proto.Message) { - xxx_messageInfo_LogRecord.Merge(m, src) -} -func (m *LogRecord) XXX_Size() int { - return m.Size() -} -func (m *LogRecord) XXX_DiscardUnknown() { - xxx_messageInfo_LogRecord.DiscardUnknown(m) -} - -var xxx_messageInfo_LogRecord proto.InternalMessageInfo - -func (m *LogRecord) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *LogRecord) GetObservedTimeUnixNano() uint64 { - if m != nil { - return m.ObservedTimeUnixNano - } - return 0 -} - -func (m *LogRecord) GetSeverityNumber() SeverityNumber { - if m != nil { - return m.SeverityNumber - } - return SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED -} - -func (m *LogRecord) GetSeverityText() string { - if m != nil { - return m.SeverityText - } - return "" -} - -func (m *LogRecord) GetBody() v11.AnyValue { - if m != nil { - return m.Body - } - return v11.AnyValue{} -} - -func (m *LogRecord) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *LogRecord) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *LogRecord) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *LogRecord) GetEventName() string { - if m != nil { - return m.EventName - } - return "" -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.logs.v1.SeverityNumber", SeverityNumber_name, SeverityNumber_value) - proto.RegisterEnum("opentelemetry.proto.logs.v1.LogRecordFlags", LogRecordFlags_name, LogRecordFlags_value) - proto.RegisterType((*LogsData)(nil), "opentelemetry.proto.logs.v1.LogsData") - proto.RegisterType((*ResourceLogs)(nil), "opentelemetry.proto.logs.v1.ResourceLogs") - proto.RegisterType((*ScopeLogs)(nil), "opentelemetry.proto.logs.v1.ScopeLogs") - proto.RegisterType((*LogRecord)(nil), "opentelemetry.proto.logs.v1.LogRecord") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/logs/v1/logs.proto", fileDescriptor_d1c030a3ec7e961e) -} - -var fileDescriptor_d1c030a3ec7e961e = []byte{ - // 971 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0x41, 0x6f, 0xe2, 0x46, - 0x1b, 0xc7, 0x71, 0x12, 0x02, 0x4c, 0x08, 0x3b, 0xef, 0x2c, 0xc9, 0xfa, 0x4d, 0x54, 0x42, 0xd3, - 0x2a, 0xa5, 0xa9, 0x04, 0x0a, 0x50, 0x69, 0x7b, 0xab, 0x09, 0x26, 0xa2, 0x21, 0x10, 0x0d, 0x90, - 0x2a, 0xdb, 0x4a, 0x96, 0xc1, 0x53, 0x6a, 0xc9, 0xcc, 0x58, 0xf6, 0x80, 0x92, 0x6f, 0xd1, 0x4f, - 0xd0, 0x4b, 0x0f, 0x95, 0xfa, 0x35, 0xda, 0xc3, 0x1e, 0xf7, 0x58, 0xf5, 0xb0, 0xaa, 0x92, 0x4b, - 0xbf, 0x45, 0xab, 0x19, 0x0c, 0x21, 0xa9, 0x9d, 0x34, 0x27, 0x66, 0x9e, 0xdf, 0xff, 0xf9, 0x3f, - 0xcf, 0x78, 0xc6, 0x83, 0xc1, 0x01, 0x73, 0x09, 0xe5, 0xc4, 0x21, 0x63, 0xc2, 0xbd, 0xeb, 0x92, - 0xeb, 0x31, 0xce, 0x4a, 0x0e, 0x1b, 0xf9, 0xa5, 0xe9, 0x91, 0xfc, 0x2d, 0xca, 0x10, 0xda, 0xbd, - 0xa7, 0x9b, 0x05, 0x8b, 0x92, 0x4f, 0x8f, 0x76, 0xb2, 0x23, 0x36, 0x62, 0xb3, 0x54, 0x31, 0x9a, - 0xd1,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0x1e, 0xb9, 0x60, 0x7c, 0xa6, 0x75, 0x4f, - 0xe1, 0xdf, 0x4a, 0xed, 0x67, 0xe5, 0xed, 0x4d, 0x4e, 0x79, 0x77, 0x93, 0x53, 0xfe, 0xbc, 0xc9, - 0x29, 0x3f, 0xdc, 0xe6, 0x62, 0xef, 0x6e, 0x73, 0xb1, 0xdf, 0x6f, 0x73, 0x31, 0x90, 0xb3, 0xd9, - 0x63, 0xf7, 0x6b, 0x4d, 0x5c, 0xff, 0xfe, 0xb9, 0x08, 0x9d, 0x2b, 0x6f, 0x6a, 0xcf, 0x7e, 0x9f, - 0x67, 0x9f, 0x29, 0x23, 0x42, 0xe7, 0x1f, 0x4c, 0xbf, 0xac, 0xec, 0x76, 0x5c, 0x42, 0x7b, 0x0b, - 0x07, 0xe9, 0x2d, 0xfe, 0x9d, 0xfc, 0xe2, 0xc5, 0xd1, 0x60, 0x5d, 0xea, 0x2b, 0xff, 0x04, 0x00, - 0x00, 0xff, 0xff, 0xc9, 0xbc, 0x36, 0x44, 0x74, 0x09, 0x00, 0x00, -} - -func (m *LogsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for iNdEx := len(m.ResourceLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeLogs) > 0 { - for iNdEx := len(m.DeprecatedScopeLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeLogs) > 0 { - for iNdEx := len(m.ScopeLogs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeLogs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeLogs) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeLogs) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeLogs) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.LogRecords) > 0 { - for iNdEx := len(m.LogRecords) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LogRecords[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LogRecord) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LogRecord) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LogRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EventName) > 0 { - i -= len(m.EventName) - copy(dAtA[i:], m.EventName) - i = encodeVarintLogs(dAtA, i, uint64(len(m.EventName))) - i-- - dAtA[i] = 0x62 - } - if m.ObservedTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.ObservedTimeUnixNano)) - i-- - dAtA[i] = 0x59 - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x45 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x38 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - { - size, err := m.Body.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintLogs(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.SeverityText) > 0 { - i -= len(m.SeverityText) - copy(dAtA[i:], m.SeverityText) - i = encodeVarintLogs(dAtA, i, uint64(len(m.SeverityText))) - i-- - dAtA[i] = 0x1a - } - if m.SeverityNumber != 0 { - i = encodeVarintLogs(dAtA, i, uint64(m.SeverityNumber)) - i-- - dAtA[i] = 0x10 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func encodeVarintLogs(dAtA []byte, offset int, v uint64) int { - offset -= sovLogs(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *LogsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceLogs) > 0 { - for _, e := range m.ResourceLogs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - return n -} - -func (m *ResourceLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.ScopeLogs) > 0 { - for _, e := range m.ScopeLogs { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - if len(m.DeprecatedScopeLogs) > 0 { - for _, e := range m.DeprecatedScopeLogs { - l = e.Size() - n += 2 + l + sovLogs(uint64(l)) - } - } - return n -} - -func (m *ScopeLogs) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.LogRecords) > 0 { - for _, e := range m.LogRecords { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - return n -} - -func (m *LogRecord) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - if m.SeverityNumber != 0 { - n += 1 + sovLogs(uint64(m.SeverityNumber)) - } - l = len(m.SeverityText) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - l = m.Body.Size() - n += 1 + l + sovLogs(uint64(l)) - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovLogs(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovLogs(uint64(m.DroppedAttributesCount)) - } - if m.Flags != 0 { - n += 5 - } - l = m.TraceId.Size() - n += 1 + l + sovLogs(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovLogs(uint64(l)) - if m.ObservedTimeUnixNano != 0 { - n += 9 - } - l = len(m.EventName) - if l > 0 { - n += 1 + l + sovLogs(uint64(l)) - } - return n -} - -func sovLogs(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozLogs(x uint64) (n int) { - return sovLogs(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *LogsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceLogs = append(m.ResourceLogs, &ResourceLogs{}) - if err := m.ResourceLogs[len(m.ResourceLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeLogs = append(m.ScopeLogs, &ScopeLogs{}) - if err := m.ScopeLogs[len(m.ScopeLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeLogs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeLogs = append(m.DeprecatedScopeLogs, &ScopeLogs{}) - if err := m.DeprecatedScopeLogs[len(m.DeprecatedScopeLogs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeLogs) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeLogs: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeLogs: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogRecords", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogRecords = append(m.LogRecords, &LogRecord{}) - if err := m.LogRecords[len(m.LogRecords)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LogRecord) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LogRecord: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LogRecord: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityNumber", wireType) - } - m.SeverityNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SeverityNumber |= SeverityNumber(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SeverityText", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SeverityText = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Body", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Body.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedTimeUnixNano", wireType) - } - m.ObservedTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.ObservedTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowLogs - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthLogs - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthLogs - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipLogs(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthLogs - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipLogs(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowLogs - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthLogs - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupLogs - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthLogs - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthLogs = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowLogs = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupLogs = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go deleted file mode 100644 index 9021e432c5..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1/metrics.pb.go +++ /dev/null @@ -1,6650 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/metrics/v1/metrics.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// AggregationTemporality defines how a metric aggregator reports aggregated -// values. It describes how those values relate to the time interval over -// which they are aggregated. -type AggregationTemporality int32 - -const ( - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 - // DELTA is an AggregationTemporality for a metric aggregator which reports - // changes since last report time. Successive metrics contain aggregation of - // values from continuous and non-overlapping intervals. - // - // The values for a DELTA metric are based only on the time interval - // associated with one measurement cycle. There is no dependency on - // previous measurements like is the case for CUMULATIVE metrics. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // DELTA metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0+1 to - // t_0+2 with a value of 2. - AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 - // CUMULATIVE is an AggregationTemporality for a metric aggregator which - // reports changes since a fixed start time. This means that current values - // of a CUMULATIVE metric depend on all previous measurements since the - // start time. Because of this, the sender is required to retain this state - // in some form. If this state is lost or invalidated, the CUMULATIVE metric - // values MUST be reset and a new fixed start time following the last - // reported measurement time sent MUST be used. - // - // For example, consider a system measuring the number of requests that - // it receives and reports the sum of these requests every second as a - // CUMULATIVE metric: - // - // 1. The system starts receiving at time=t_0. - // 2. A request is received, the system measures 1 request. - // 3. A request is received, the system measures 1 request. - // 4. A request is received, the system measures 1 request. - // 5. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+1 with a value of 3. - // 6. A request is received, the system measures 1 request. - // 7. A request is received, the system measures 1 request. - // 8. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_0 to - // t_0+2 with a value of 5. - // 9. The system experiences a fault and loses state. - // 10. The system recovers and resumes receiving at time=t_1. - // 11. A request is received, the system measures 1 request. - // 12. The 1 second collection cycle ends. A metric is exported for the - // number of requests received over the interval of time t_1 to - // t_0+1 with a value of 1. - // - // Note: Even though, when reporting changes since last report time, using - // CUMULATIVE is valid, it is not recommended. This may cause problems for - // systems that do not use start_time to determine when the aggregation - // value was reset (e.g. Prometheus). - AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 -) - -var AggregationTemporality_name = map[int32]string{ - 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", - 1: "AGGREGATION_TEMPORALITY_DELTA", - 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", -} - -var AggregationTemporality_value = map[string]int32{ - "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, - "AGGREGATION_TEMPORALITY_DELTA": 1, - "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, -} - -func (x AggregationTemporality) String() string { - return proto.EnumName(AggregationTemporality_name, int32(x)) -} - -func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{0} -} - -// DataPointFlags is defined as a protobuf 'uint32' type and is to be used as a -// bit-field representing 32 distinct boolean flags. Each flag defined in this -// enum is a bit-mask. To test the presence of a single flag in the flags of -// a data point, for example, use an expression like: -// -// (point.flags & DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK) == DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK -type DataPointFlags int32 - -const ( - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - DataPointFlags_DATA_POINT_FLAGS_DO_NOT_USE DataPointFlags = 0 - // This DataPoint is valid but has no recorded value. This value - // SHOULD be used to reflect explicitly missing data in a series, as - // for an equivalent to the Prometheus "staleness marker". - DataPointFlags_DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK DataPointFlags = 1 -) - -var DataPointFlags_name = map[int32]string{ - 0: "DATA_POINT_FLAGS_DO_NOT_USE", - 1: "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK", -} - -var DataPointFlags_value = map[string]int32{ - "DATA_POINT_FLAGS_DO_NOT_USE": 0, - "DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK": 1, -} - -func (x DataPointFlags) String() string { - return proto.EnumName(DataPointFlags_name, int32(x)) -} - -func (DataPointFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{1} -} - -// MetricsData represents the metrics data that can be stored in a persistent -// storage, OR can be embedded by other protocols that transfer OTLP metrics -// data but do not implement the OTLP protocol. -// -// MetricsData -// └─── ResourceMetrics -// -// ├── Resource -// ├── SchemaURL -// └── ScopeMetrics -// ├── Scope -// ├── SchemaURL -// └── Metric -// ├── Name -// ├── Description -// ├── Unit -// └── data -// ├── Gauge -// ├── Sum -// ├── Histogram -// ├── ExponentialHistogram -// └── Summary -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type MetricsData struct { - // An array of ResourceMetrics. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceMetrics []*ResourceMetrics `protobuf:"bytes,1,rep,name=resource_metrics,json=resourceMetrics,proto3" json:"resource_metrics,omitempty"` -} - -func (m *MetricsData) Reset() { *m = MetricsData{} } -func (m *MetricsData) String() string { return proto.CompactTextString(m) } -func (*MetricsData) ProtoMessage() {} -func (*MetricsData) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{0} -} -func (m *MetricsData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MetricsData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MetricsData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MetricsData) XXX_Merge(src proto.Message) { - xxx_messageInfo_MetricsData.Merge(m, src) -} -func (m *MetricsData) XXX_Size() int { - return m.Size() -} -func (m *MetricsData) XXX_DiscardUnknown() { - xxx_messageInfo_MetricsData.DiscardUnknown(m) -} - -var xxx_messageInfo_MetricsData proto.InternalMessageInfo - -func (m *MetricsData) GetResourceMetrics() []*ResourceMetrics { - if m != nil { - return m.ResourceMetrics - } - return nil -} - -// A collection of ScopeMetrics from a Resource. -type ResourceMetrics struct { - DeprecatedScopeMetrics []*ScopeMetrics `protobuf:"bytes,1000,rep,name=deprecated_scope_metrics,json=deprecatedScopeMetrics,proto3" json:"deprecated_scope_metrics,omitempty"` - // The resource for the metrics in this message. - // If this field is not set then no resource info is known. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of metrics that originate from a resource. - ScopeMetrics []*ScopeMetrics `protobuf:"bytes,2,rep,name=scope_metrics,json=scopeMetrics,proto3" json:"scope_metrics,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_metrics" field which have their own schema_url field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ResourceMetrics) Reset() { *m = ResourceMetrics{} } -func (m *ResourceMetrics) String() string { return proto.CompactTextString(m) } -func (*ResourceMetrics) ProtoMessage() {} -func (*ResourceMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{1} -} -func (m *ResourceMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceMetrics.Merge(m, src) -} -func (m *ResourceMetrics) XXX_Size() int { - return m.Size() -} -func (m *ResourceMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceMetrics proto.InternalMessageInfo - -func (m *ResourceMetrics) GetDeprecatedScopeMetrics() []*ScopeMetrics { - if m != nil { - return m.DeprecatedScopeMetrics - } - return nil -} - -func (m *ResourceMetrics) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceMetrics) GetScopeMetrics() []*ScopeMetrics { - if m != nil { - return m.ScopeMetrics - } - return nil -} - -func (m *ResourceMetrics) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Metrics produced by an Scope. -type ScopeMetrics struct { - // The instrumentation scope information for the metrics in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of metrics that originate from an instrumentation library. - Metrics []*Metric `protobuf:"bytes,2,rep,name=metrics,proto3" json:"metrics,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the metric data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all metrics in the "metrics" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeMetrics) Reset() { *m = ScopeMetrics{} } -func (m *ScopeMetrics) String() string { return proto.CompactTextString(m) } -func (*ScopeMetrics) ProtoMessage() {} -func (*ScopeMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{2} -} -func (m *ScopeMetrics) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeMetrics.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeMetrics.Merge(m, src) -} -func (m *ScopeMetrics) XXX_Size() int { - return m.Size() -} -func (m *ScopeMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeMetrics.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeMetrics proto.InternalMessageInfo - -func (m *ScopeMetrics) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeMetrics) GetMetrics() []*Metric { - if m != nil { - return m.Metrics - } - return nil -} - -func (m *ScopeMetrics) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// Defines a Metric which has one or more timeseries. The following is a -// brief summary of the Metric data model. For more details, see: -// -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md -// -// The data model and relation between entities is shown in the -// diagram below. Here, "DataPoint" is the term used to refer to any -// one of the specific data point value types, and "points" is the term used -// to refer to any one of the lists of points contained in the Metric. -// -// - Metric is composed of a metadata and data. -// -// - Metadata part contains a name, description, unit. -// -// - Data is one of the possible types (Sum, Gauge, Histogram, Summary). -// -// - DataPoint contains timestamps, attributes, and one of the possible value type -// fields. -// -// Metric -// +------------+ -// |name | -// |description | -// |unit | +------------------------------------+ -// |data |---> |Gauge, Sum, Histogram, Summary, ... | -// +------------+ +------------------------------------+ -// -// Data [One of Gauge, Sum, Histogram, Summary, ...] -// +-----------+ -// |... | // Metadata about the Data. -// |points |--+ -// +-----------+ | -// | +---------------------------+ -// | |DataPoint 1 | -// v |+------+------+ +------+ | -// +-----+ ||label |label |...|label | | -// | 1 |-->||value1|value2|...|valueN| | -// +-----+ |+------+------+ +------+ | -// | . | |+-----+ | -// | . | ||value| | -// | . | |+-----+ | -// | . | +---------------------------+ -// | . | . -// | . | . -// | . | . -// | . | +---------------------------+ -// | . | |DataPoint M | -// +-----+ |+------+------+ +------+ | -// | M |-->||label |label |...|label | | -// +-----+ ||value1|value2|...|valueN| | -// |+------+------+ +------+ | -// |+-----+ | -// ||value| | -// |+-----+ | -// +---------------------------+ -// -// Each distinct type of DataPoint represents the output of a specific -// aggregation function, the result of applying the DataPoint's -// associated function of to one or more measurements. -// -// All DataPoint types have three common fields: -// - Attributes includes key-value pairs associated with the data point -// - TimeUnixNano is required, set to the end time of the aggregation -// - StartTimeUnixNano is optional, but strongly encouraged for DataPoints -// having an AggregationTemporality field, as discussed below. -// -// Both TimeUnixNano and StartTimeUnixNano values are expressed as -// UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. -// -// # TimeUnixNano -// -// This field is required, having consistent interpretation across -// DataPoint types. TimeUnixNano is the moment corresponding to when -// the data point's aggregate value was captured. -// -// Data points with the 0 value for TimeUnixNano SHOULD be rejected -// by consumers. -// -// # StartTimeUnixNano -// -// StartTimeUnixNano in general allows detecting when a sequence of -// observations is unbroken. This field indicates to consumers the -// start time for points with cumulative and delta -// AggregationTemporality, and it should be included whenever possible -// to support correct rate calculation. Although it may be omitted -// when the start time is truly unknown, setting StartTimeUnixNano is -// strongly encouraged. -type Metric struct { - // name of the metric. - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - // description of the metric, which can be used in documentation. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // 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"` - // Data determines the aggregation type (if any) of the metric, what is the - // reported value type for the data points, as well as the relatationship to - // the time interval over which they are reported. - // - // Types that are valid to be assigned to Data: - // *Metric_Gauge - // *Metric_Sum - // *Metric_Histogram - // *Metric_ExponentialHistogram - // *Metric_Summary - Data isMetric_Data `protobuf_oneof:"data"` - // Additional metadata attributes that describe the metric. [Optional]. - // Attributes are non-identifying. - // Consumers SHOULD NOT need to be aware of these attributes. - // These attributes MAY be used to encode information allowing - // for lossless roundtrip translation to / from another data model. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Metadata []v11.KeyValue `protobuf:"bytes,12,rep,name=metadata,proto3" json:"metadata"` -} - -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_3c3112f9fa006917, []int{3} -} -func (m *Metric) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Metric.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Metric) XXX_Merge(src proto.Message) { - xxx_messageInfo_Metric.Merge(m, src) -} -func (m *Metric) XXX_Size() int { - return m.Size() -} -func (m *Metric) XXX_DiscardUnknown() { - xxx_messageInfo_Metric.DiscardUnknown(m) -} - -var xxx_messageInfo_Metric proto.InternalMessageInfo - -type isMetric_Data interface { - isMetric_Data() - MarshalTo([]byte) (int, error) - Size() int -} - -type Metric_Gauge struct { - Gauge *Gauge `protobuf:"bytes,5,opt,name=gauge,proto3,oneof" json:"gauge,omitempty"` -} -type Metric_Sum struct { - Sum *Sum `protobuf:"bytes,7,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type Metric_Histogram struct { - Histogram *Histogram `protobuf:"bytes,9,opt,name=histogram,proto3,oneof" json:"histogram,omitempty"` -} -type Metric_ExponentialHistogram struct { - ExponentialHistogram *ExponentialHistogram `protobuf:"bytes,10,opt,name=exponential_histogram,json=exponentialHistogram,proto3,oneof" json:"exponential_histogram,omitempty"` -} -type Metric_Summary struct { - Summary *Summary `protobuf:"bytes,11,opt,name=summary,proto3,oneof" json:"summary,omitempty"` -} - -func (*Metric_Gauge) isMetric_Data() {} -func (*Metric_Sum) isMetric_Data() {} -func (*Metric_Histogram) isMetric_Data() {} -func (*Metric_ExponentialHistogram) isMetric_Data() {} -func (*Metric_Summary) isMetric_Data() {} - -func (m *Metric) GetData() isMetric_Data { - if m != nil { - return m.Data - } - return nil -} - -func (m *Metric) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Metric) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *Metric) GetUnit() string { - if m != nil { - return m.Unit - } - return "" -} - -func (m *Metric) GetGauge() *Gauge { - if x, ok := m.GetData().(*Metric_Gauge); ok { - return x.Gauge - } - return nil -} - -func (m *Metric) GetSum() *Sum { - if x, ok := m.GetData().(*Metric_Sum); ok { - return x.Sum - } - return nil -} - -func (m *Metric) GetHistogram() *Histogram { - if x, ok := m.GetData().(*Metric_Histogram); ok { - return x.Histogram - } - return nil -} - -func (m *Metric) GetExponentialHistogram() *ExponentialHistogram { - if x, ok := m.GetData().(*Metric_ExponentialHistogram); ok { - return x.ExponentialHistogram - } - return nil -} - -func (m *Metric) GetSummary() *Summary { - if x, ok := m.GetData().(*Metric_Summary); ok { - return x.Summary - } - return nil -} - -func (m *Metric) GetMetadata() []v11.KeyValue { - if m != nil { - return m.Metadata - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Metric) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Metric_Gauge)(nil), - (*Metric_Sum)(nil), - (*Metric_Histogram)(nil), - (*Metric_ExponentialHistogram)(nil), - (*Metric_Summary)(nil), - } -} - -// Gauge represents the type of a scalar metric that always exports the -// "current value" for every data point. It should be used for an "unknown" -// aggregation. -// -// A Gauge does not support different aggregation temporalities. Given the -// aggregation is unknown, points cannot be combined using the same -// aggregation, regardless of aggregation temporalities. Therefore, -// AggregationTemporality is not included. Consequently, this also means -// "StartTimeUnixNano" is ignored for all data points. -type Gauge struct { - DataPoints []*NumberDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` -} - -func (m *Gauge) Reset() { *m = Gauge{} } -func (m *Gauge) String() string { return proto.CompactTextString(m) } -func (*Gauge) ProtoMessage() {} -func (*Gauge) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{4} -} -func (m *Gauge) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Gauge.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Gauge) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gauge.Merge(m, src) -} -func (m *Gauge) XXX_Size() int { - return m.Size() -} -func (m *Gauge) XXX_DiscardUnknown() { - xxx_messageInfo_Gauge.DiscardUnknown(m) -} - -var xxx_messageInfo_Gauge proto.InternalMessageInfo - -func (m *Gauge) GetDataPoints() []*NumberDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// Sum represents the type of a scalar metric that is calculated as a sum of all -// reported measurements over a time interval. -type Sum struct { - DataPoints []*NumberDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` - // If "true" means that the sum is monotonic. - IsMonotonic bool `protobuf:"varint,3,opt,name=is_monotonic,json=isMonotonic,proto3" json:"is_monotonic,omitempty"` -} - -func (m *Sum) Reset() { *m = Sum{} } -func (m *Sum) String() string { return proto.CompactTextString(m) } -func (*Sum) ProtoMessage() {} -func (*Sum) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{5} -} -func (m *Sum) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Sum.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Sum) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sum.Merge(m, src) -} -func (m *Sum) XXX_Size() int { - return m.Size() -} -func (m *Sum) XXX_DiscardUnknown() { - xxx_messageInfo_Sum.DiscardUnknown(m) -} - -var xxx_messageInfo_Sum proto.InternalMessageInfo - -func (m *Sum) GetDataPoints() []*NumberDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *Sum) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -func (m *Sum) GetIsMonotonic() bool { - if m != nil { - return m.IsMonotonic - } - return false -} - -// Histogram represents the type of a metric that is calculated by aggregating -// as a Histogram of all reported measurements over a time interval. -type Histogram struct { - DataPoints []*HistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *Histogram) Reset() { *m = Histogram{} } -func (m *Histogram) String() string { return proto.CompactTextString(m) } -func (*Histogram) ProtoMessage() {} -func (*Histogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{6} -} -func (m *Histogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Histogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Histogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_Histogram.Merge(m, src) -} -func (m *Histogram) XXX_Size() int { - return m.Size() -} -func (m *Histogram) XXX_DiscardUnknown() { - xxx_messageInfo_Histogram.DiscardUnknown(m) -} - -var xxx_messageInfo_Histogram proto.InternalMessageInfo - -func (m *Histogram) GetDataPoints() []*HistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *Histogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// ExponentialHistogram represents the type of a metric that is calculated by aggregating -// as a ExponentialHistogram of all reported double measurements over a time interval. -type ExponentialHistogram struct { - DataPoints []*ExponentialHistogramDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` - // aggregation_temporality describes if the aggregator reports delta changes - // since last report time, or cumulative changes since a fixed start time. - AggregationTemporality AggregationTemporality `protobuf:"varint,2,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.metrics.v1.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *ExponentialHistogram) Reset() { *m = ExponentialHistogram{} } -func (m *ExponentialHistogram) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogram) ProtoMessage() {} -func (*ExponentialHistogram) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{7} -} -func (m *ExponentialHistogram) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogram.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogram) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogram.Merge(m, src) -} -func (m *ExponentialHistogram) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogram) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogram.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogram proto.InternalMessageInfo - -func (m *ExponentialHistogram) GetDataPoints() []*ExponentialHistogramDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -func (m *ExponentialHistogram) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// Summary metric data are used to convey quantile summaries, -// a Prometheus (see: https://prometheus.io/docs/concepts/metric_types/#summary) -// and OpenMetrics (see: https://github.com/OpenObservability/OpenMetrics/blob/4dbf6075567ab43296eed941037c12951faafb92/protos/prometheus.proto#L45) -// data type. These data points cannot always be merged in a meaningful way. -// While they can be useful in some applications, histogram data points are -// recommended for new applications. -// Summary metrics do not have an aggregation temporality field. This is -// because the count and sum fields of a SummaryDataPoint are assumed to be -// cumulative values. -type Summary struct { - DataPoints []*SummaryDataPoint `protobuf:"bytes,1,rep,name=data_points,json=dataPoints,proto3" json:"data_points,omitempty"` -} - -func (m *Summary) Reset() { *m = Summary{} } -func (m *Summary) String() string { return proto.CompactTextString(m) } -func (*Summary) ProtoMessage() {} -func (*Summary) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{8} -} -func (m *Summary) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Summary.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Summary) XXX_Merge(src proto.Message) { - xxx_messageInfo_Summary.Merge(m, src) -} -func (m *Summary) XXX_Size() int { - return m.Size() -} -func (m *Summary) XXX_DiscardUnknown() { - xxx_messageInfo_Summary.DiscardUnknown(m) -} - -var xxx_messageInfo_Summary proto.InternalMessageInfo - -func (m *Summary) GetDataPoints() []*SummaryDataPoint { - if m != nil { - return m.DataPoints - } - return nil -} - -// NumberDataPoint is a single data point in a timeseries that describes the -// time-varying scalar value of a metric. -type NumberDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // The value itself. A point is considered invalid when one of the recognized - // value fields is not present inside this oneof. - // - // Types that are valid to be assigned to Value: - // *NumberDataPoint_AsDouble - // *NumberDataPoint_AsInt - Value isNumberDataPoint_Value `protobuf_oneof:"value"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,5,rep,name=exemplars,proto3" json:"exemplars"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` -} - -func (m *NumberDataPoint) Reset() { *m = NumberDataPoint{} } -func (m *NumberDataPoint) String() string { return proto.CompactTextString(m) } -func (*NumberDataPoint) ProtoMessage() {} -func (*NumberDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{9} -} -func (m *NumberDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NumberDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_NumberDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *NumberDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_NumberDataPoint.Merge(m, src) -} -func (m *NumberDataPoint) XXX_Size() int { - return m.Size() -} -func (m *NumberDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_NumberDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_NumberDataPoint proto.InternalMessageInfo - -type isNumberDataPoint_Value interface { - isNumberDataPoint_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type NumberDataPoint_AsDouble struct { - AsDouble float64 `protobuf:"fixed64,4,opt,name=as_double,json=asDouble,proto3,oneof" json:"as_double,omitempty"` -} -type NumberDataPoint_AsInt struct { - AsInt int64 `protobuf:"fixed64,6,opt,name=as_int,json=asInt,proto3,oneof" json:"as_int,omitempty"` -} - -func (*NumberDataPoint_AsDouble) isNumberDataPoint_Value() {} -func (*NumberDataPoint_AsInt) isNumberDataPoint_Value() {} - -func (m *NumberDataPoint) GetValue() isNumberDataPoint_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *NumberDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *NumberDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *NumberDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *NumberDataPoint) GetAsDouble() float64 { - if x, ok := m.GetValue().(*NumberDataPoint_AsDouble); ok { - return x.AsDouble - } - return 0 -} - -func (m *NumberDataPoint) GetAsInt() int64 { - if x, ok := m.GetValue().(*NumberDataPoint_AsInt); ok { - return x.AsInt - } - return 0 -} - -func (m *NumberDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *NumberDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*NumberDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*NumberDataPoint_AsDouble)(nil), - (*NumberDataPoint_AsInt)(nil), - } -} - -// HistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Histogram. A Histogram contains summary statistics -// for a population of values, it may optionally contain the distribution of -// those values across a set of buckets. -// -// If the histogram contains the distribution of values, then both -// "explicit_bounds" and "bucket counts" fields must be defined. -// If the histogram does not contain the distribution of values, then both -// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and -// "sum" are known. -type HistogramDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be non-negative. This - // value must be equal to the sum of the "count" fields in buckets if a - // histogram is provided. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - // - // Types that are valid to be assigned to Sum_: - // *HistogramDataPoint_Sum - Sum_ isHistogramDataPoint_Sum_ `protobuf_oneof:"sum_"` - // bucket_counts is an optional field contains the count values of histogram - // for each bucket. - // - // The sum of the bucket_counts must equal the value in the count field. - // - // The number of elements in bucket_counts array must be by one greater than - // the number of elements in explicit_bounds array. - BucketCounts []uint64 `protobuf:"fixed64,6,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` - // explicit_bounds specifies buckets with explicitly defined bounds for values. - // - // The boundaries for bucket at index i are: - // - // (-infinity, explicit_bounds[i]] for i == 0 - // (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds) - // (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds) - // - // The values in the explicit_bounds array must be strictly increasing. - // - // Histogram buckets are inclusive of their upper boundary, except the last - // bucket where the boundary is at infinity. This format is intentionally - // compatible with the OpenMetrics histogram definition. - ExplicitBounds []float64 `protobuf:"fixed64,7,rep,packed,name=explicit_bounds,json=explicitBounds,proto3" json:"explicit_bounds,omitempty"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,8,rep,name=exemplars,proto3" json:"exemplars"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` - // min is the minimum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Min_: - // *HistogramDataPoint_Min - Min_ isHistogramDataPoint_Min_ `protobuf_oneof:"min_"` - // max is the maximum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Max_: - // *HistogramDataPoint_Max - Max_ isHistogramDataPoint_Max_ `protobuf_oneof:"max_"` -} - -func (m *HistogramDataPoint) Reset() { *m = HistogramDataPoint{} } -func (m *HistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*HistogramDataPoint) ProtoMessage() {} -func (*HistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{10} -} -func (m *HistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *HistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_HistogramDataPoint.Merge(m, src) -} -func (m *HistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *HistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_HistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_HistogramDataPoint proto.InternalMessageInfo - -type isHistogramDataPoint_Sum_ interface { - isHistogramDataPoint_Sum_() - MarshalTo([]byte) (int, error) - Size() int -} -type isHistogramDataPoint_Min_ interface { - isHistogramDataPoint_Min_() - MarshalTo([]byte) (int, error) - Size() int -} -type isHistogramDataPoint_Max_ interface { - isHistogramDataPoint_Max_() - MarshalTo([]byte) (int, error) - Size() int -} - -type HistogramDataPoint_Sum struct { - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type HistogramDataPoint_Min struct { - Min float64 `protobuf:"fixed64,11,opt,name=min,proto3,oneof" json:"min,omitempty"` -} -type HistogramDataPoint_Max struct { - Max float64 `protobuf:"fixed64,12,opt,name=max,proto3,oneof" json:"max,omitempty"` -} - -func (*HistogramDataPoint_Sum) isHistogramDataPoint_Sum_() {} -func (*HistogramDataPoint_Min) isHistogramDataPoint_Min_() {} -func (*HistogramDataPoint_Max) isHistogramDataPoint_Max_() {} - -func (m *HistogramDataPoint) GetSum_() isHistogramDataPoint_Sum_ { - if m != nil { - return m.Sum_ - } - return nil -} -func (m *HistogramDataPoint) GetMin_() isHistogramDataPoint_Min_ { - if m != nil { - return m.Min_ - } - return nil -} -func (m *HistogramDataPoint) GetMax_() isHistogramDataPoint_Max_ { - if m != nil { - return m.Max_ - } - return nil -} - -func (m *HistogramDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *HistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *HistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *HistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *HistogramDataPoint) GetSum() float64 { - if x, ok := m.GetSum_().(*HistogramDataPoint_Sum); ok { - return x.Sum - } - return 0 -} - -func (m *HistogramDataPoint) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -func (m *HistogramDataPoint) GetExplicitBounds() []float64 { - if m != nil { - return m.ExplicitBounds - } - return nil -} - -func (m *HistogramDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *HistogramDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *HistogramDataPoint) GetMin() float64 { - if x, ok := m.GetMin_().(*HistogramDataPoint_Min); ok { - return x.Min - } - return 0 -} - -func (m *HistogramDataPoint) GetMax() float64 { - if x, ok := m.GetMax_().(*HistogramDataPoint_Max); ok { - return x.Max - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*HistogramDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*HistogramDataPoint_Sum)(nil), - (*HistogramDataPoint_Min)(nil), - (*HistogramDataPoint_Max)(nil), - } -} - -// ExponentialHistogramDataPoint is a single data point in a timeseries that describes the -// time-varying values of a ExponentialHistogram of double values. A ExponentialHistogram contains -// summary statistics for a population of values, it may optionally contain the -// distribution of those values across a set of buckets. -type ExponentialHistogramDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be - // non-negative. This value must be equal to the sum of the "bucket_counts" - // values in the positive and negative Buckets plus the "zero_count" field. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#histogram - // - // Types that are valid to be assigned to Sum_: - // *ExponentialHistogramDataPoint_Sum - Sum_ isExponentialHistogramDataPoint_Sum_ `protobuf_oneof:"sum_"` - // scale describes the resolution of the histogram. Boundaries are - // located at powers of the base, where: - // - // base = (2^(2^-scale)) - // - // The histogram bucket identified by `index`, a signed integer, - // contains values that are greater than (base^index) and - // less than or equal to (base^(index+1)). - // - // The positive and negative ranges of the histogram are expressed - // separately. Negative values are mapped by their absolute value - // into the negative range using the same scale as the positive range. - // - // scale is not restricted by the protocol, as the permissible - // values depend on the range of the data. - Scale int32 `protobuf:"zigzag32,6,opt,name=scale,proto3" json:"scale,omitempty"` - // zero_count is the count of values that are either exactly zero or - // within the region considered zero by the instrumentation at the - // tolerated degree of precision. This bucket stores values that - // cannot be expressed using the standard exponential formula as - // well as values that have been rounded to zero. - // - // Implementations MAY consider the zero bucket to have probability - // mass equal to (zero_count / count). - ZeroCount uint64 `protobuf:"fixed64,7,opt,name=zero_count,json=zeroCount,proto3" json:"zero_count,omitempty"` - // positive carries the positive range of exponential bucket counts. - Positive ExponentialHistogramDataPoint_Buckets `protobuf:"bytes,8,opt,name=positive,proto3" json:"positive"` - // negative carries the negative range of exponential bucket counts. - Negative ExponentialHistogramDataPoint_Buckets `protobuf:"bytes,9,opt,name=negative,proto3" json:"negative"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,10,opt,name=flags,proto3" json:"flags,omitempty"` - // (Optional) List of exemplars collected from - // measurements that were used to form the data point - Exemplars []Exemplar `protobuf:"bytes,11,rep,name=exemplars,proto3" json:"exemplars"` - // min is the minimum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Min_: - // *ExponentialHistogramDataPoint_Min - Min_ isExponentialHistogramDataPoint_Min_ `protobuf_oneof:"min_"` - // max is the maximum value over (start_time, end_time]. - // - // Types that are valid to be assigned to Max_: - // *ExponentialHistogramDataPoint_Max - Max_ isExponentialHistogramDataPoint_Max_ `protobuf_oneof:"max_"` - // ZeroThreshold may be optionally set to convey the width of the zero - // region. Where the zero region is defined as the closed interval - // [-ZeroThreshold, ZeroThreshold]. - // When ZeroThreshold is 0, zero count bucket stores values that cannot be - // expressed using the standard exponential formula as well as values that - // have been rounded to zero. - ZeroThreshold float64 `protobuf:"fixed64,14,opt,name=zero_threshold,json=zeroThreshold,proto3" json:"zero_threshold,omitempty"` -} - -func (m *ExponentialHistogramDataPoint) Reset() { *m = ExponentialHistogramDataPoint{} } -func (m *ExponentialHistogramDataPoint) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogramDataPoint) ProtoMessage() {} -func (*ExponentialHistogramDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{11} -} -func (m *ExponentialHistogramDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogramDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogramDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogramDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogramDataPoint.Merge(m, src) -} -func (m *ExponentialHistogramDataPoint) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogramDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogramDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogramDataPoint proto.InternalMessageInfo - -type isExponentialHistogramDataPoint_Sum_ interface { - isExponentialHistogramDataPoint_Sum_() - MarshalTo([]byte) (int, error) - Size() int -} -type isExponentialHistogramDataPoint_Min_ interface { - isExponentialHistogramDataPoint_Min_() - MarshalTo([]byte) (int, error) - Size() int -} -type isExponentialHistogramDataPoint_Max_ interface { - isExponentialHistogramDataPoint_Max_() - MarshalTo([]byte) (int, error) - Size() int -} - -type ExponentialHistogramDataPoint_Sum struct { - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3,oneof" json:"sum,omitempty"` -} -type ExponentialHistogramDataPoint_Min struct { - Min float64 `protobuf:"fixed64,12,opt,name=min,proto3,oneof" json:"min,omitempty"` -} -type ExponentialHistogramDataPoint_Max struct { - Max float64 `protobuf:"fixed64,13,opt,name=max,proto3,oneof" json:"max,omitempty"` -} - -func (*ExponentialHistogramDataPoint_Sum) isExponentialHistogramDataPoint_Sum_() {} -func (*ExponentialHistogramDataPoint_Min) isExponentialHistogramDataPoint_Min_() {} -func (*ExponentialHistogramDataPoint_Max) isExponentialHistogramDataPoint_Max_() {} - -func (m *ExponentialHistogramDataPoint) GetSum_() isExponentialHistogramDataPoint_Sum_ { - if m != nil { - return m.Sum_ - } - return nil -} -func (m *ExponentialHistogramDataPoint) GetMin_() isExponentialHistogramDataPoint_Min_ { - if m != nil { - return m.Min_ - } - return nil -} -func (m *ExponentialHistogramDataPoint) GetMax_() isExponentialHistogramDataPoint_Max_ { - if m != nil { - return m.Max_ - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetSum() float64 { - if x, ok := m.GetSum_().(*ExponentialHistogramDataPoint_Sum); ok { - return x.Sum - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetScale() int32 { - if m != nil { - return m.Scale - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetZeroCount() uint64 { - if m != nil { - return m.ZeroCount - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetPositive() ExponentialHistogramDataPoint_Buckets { - if m != nil { - return m.Positive - } - return ExponentialHistogramDataPoint_Buckets{} -} - -func (m *ExponentialHistogramDataPoint) GetNegative() ExponentialHistogramDataPoint_Buckets { - if m != nil { - return m.Negative - } - return ExponentialHistogramDataPoint_Buckets{} -} - -func (m *ExponentialHistogramDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetExemplars() []Exemplar { - if m != nil { - return m.Exemplars - } - return nil -} - -func (m *ExponentialHistogramDataPoint) GetMin() float64 { - if x, ok := m.GetMin_().(*ExponentialHistogramDataPoint_Min); ok { - return x.Min - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetMax() float64 { - if x, ok := m.GetMax_().(*ExponentialHistogramDataPoint_Max); ok { - return x.Max - } - return 0 -} - -func (m *ExponentialHistogramDataPoint) GetZeroThreshold() float64 { - if m != nil { - return m.ZeroThreshold - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*ExponentialHistogramDataPoint) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*ExponentialHistogramDataPoint_Sum)(nil), - (*ExponentialHistogramDataPoint_Min)(nil), - (*ExponentialHistogramDataPoint_Max)(nil), - } -} - -// Buckets are a set of bucket counts, encoded in a contiguous array -// of counts. -type ExponentialHistogramDataPoint_Buckets struct { - // Offset is the bucket index of the first entry in the bucket_counts array. - // - // Note: This uses a varint encoding as a simple form of compression. - Offset int32 `protobuf:"zigzag32,1,opt,name=offset,proto3" json:"offset,omitempty"` - // bucket_counts is an array of count values, where bucket_counts[i] carries - // the count of the bucket at index (offset+i). bucket_counts[i] is the count - // of values greater than base^(offset+i) and less than or equal to - // base^(offset+i+1). - // - // Note: By contrast, the explicit HistogramDataPoint uses - // fixed64. This field is expected to have many buckets, - // especially zeros, so uint64 has been selected to ensure - // varint encoding. - BucketCounts []uint64 `protobuf:"varint,2,rep,packed,name=bucket_counts,json=bucketCounts,proto3" json:"bucket_counts,omitempty"` -} - -func (m *ExponentialHistogramDataPoint_Buckets) Reset() { *m = ExponentialHistogramDataPoint_Buckets{} } -func (m *ExponentialHistogramDataPoint_Buckets) String() string { return proto.CompactTextString(m) } -func (*ExponentialHistogramDataPoint_Buckets) ProtoMessage() {} -func (*ExponentialHistogramDataPoint_Buckets) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{11, 0} -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Merge(src proto.Message) { - xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.Merge(m, src) -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_Size() int { - return m.Size() -} -func (m *ExponentialHistogramDataPoint_Buckets) XXX_DiscardUnknown() { - xxx_messageInfo_ExponentialHistogramDataPoint_Buckets.DiscardUnknown(m) -} - -var xxx_messageInfo_ExponentialHistogramDataPoint_Buckets proto.InternalMessageInfo - -func (m *ExponentialHistogramDataPoint_Buckets) GetOffset() int32 { - if m != nil { - return m.Offset - } - return 0 -} - -func (m *ExponentialHistogramDataPoint_Buckets) GetBucketCounts() []uint64 { - if m != nil { - return m.BucketCounts - } - return nil -} - -// SummaryDataPoint is a single data point in a timeseries that describes the -// time-varying values of a Summary metric. The count and sum fields represent -// cumulative values. -type SummaryDataPoint struct { - // The set of key/value pairs that uniquely identify the timeseries from - // where this point belongs. The list may be empty (may contain 0 elements). - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,7,rep,name=attributes,proto3" json:"attributes"` - // StartTimeUnixNano is optional but strongly encouraged, see the - // the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - StartTimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // TimeUnixNano is required, see the detailed comments above Metric. - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,3,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // count is the number of values in the population. Must be non-negative. - Count uint64 `protobuf:"fixed64,4,opt,name=count,proto3" json:"count,omitempty"` - // sum of the values in the population. If count is zero then this field - // must be zero. - // - // Note: Sum should only be filled out when measuring non-negative discrete - // events, and is assumed to be monotonic over the values of these events. - // Negative events *can* be recorded, but sum should not be filled out when - // doing so. This is specifically to enforce compatibility w/ OpenMetrics, - // see: https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#summary - Sum float64 `protobuf:"fixed64,5,opt,name=sum,proto3" json:"sum,omitempty"` - // (Optional) list of values at different quantiles of the distribution calculated - // from the current snapshot. The quantiles must be strictly increasing. - QuantileValues []*SummaryDataPoint_ValueAtQuantile `protobuf:"bytes,6,rep,name=quantile_values,json=quantileValues,proto3" json:"quantile_values,omitempty"` - // Flags that apply to this specific data point. See DataPointFlags - // for the available flags and their meaning. - Flags uint32 `protobuf:"varint,8,opt,name=flags,proto3" json:"flags,omitempty"` -} - -func (m *SummaryDataPoint) Reset() { *m = SummaryDataPoint{} } -func (m *SummaryDataPoint) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint) ProtoMessage() {} -func (*SummaryDataPoint) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{12} -} -func (m *SummaryDataPoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SummaryDataPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SummaryDataPoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SummaryDataPoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint.Merge(m, src) -} -func (m *SummaryDataPoint) XXX_Size() int { - return m.Size() -} -func (m *SummaryDataPoint) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint proto.InternalMessageInfo - -func (m *SummaryDataPoint) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *SummaryDataPoint) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *SummaryDataPoint) GetCount() uint64 { - if m != nil { - return m.Count - } - return 0 -} - -func (m *SummaryDataPoint) GetSum() float64 { - if m != nil { - return m.Sum - } - return 0 -} - -func (m *SummaryDataPoint) GetQuantileValues() []*SummaryDataPoint_ValueAtQuantile { - if m != nil { - return m.QuantileValues - } - return nil -} - -func (m *SummaryDataPoint) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// Represents the value at a given quantile of a distribution. -// -// To record Min and Max values following conventions are used: -// - The 1.0 quantile is equivalent to the maximum value observed. -// - The 0.0 quantile is equivalent to the minimum value observed. -// -// See the following issue for more context: -// https://github.com/open-telemetry/opentelemetry-proto/issues/125 -type SummaryDataPoint_ValueAtQuantile struct { - // The quantile of a distribution. Must be in the interval - // [0.0, 1.0]. - Quantile float64 `protobuf:"fixed64,1,opt,name=quantile,proto3" json:"quantile,omitempty"` - // The value at the given quantile of a distribution. - // - // Quantile values must NOT be negative. - Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value,omitempty"` -} - -func (m *SummaryDataPoint_ValueAtQuantile) Reset() { *m = SummaryDataPoint_ValueAtQuantile{} } -func (m *SummaryDataPoint_ValueAtQuantile) String() string { return proto.CompactTextString(m) } -func (*SummaryDataPoint_ValueAtQuantile) ProtoMessage() {} -func (*SummaryDataPoint_ValueAtQuantile) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{12, 0} -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Merge(src proto.Message) { - xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.Merge(m, src) -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_Size() int { - return m.Size() -} -func (m *SummaryDataPoint_ValueAtQuantile) XXX_DiscardUnknown() { - xxx_messageInfo_SummaryDataPoint_ValueAtQuantile.DiscardUnknown(m) -} - -var xxx_messageInfo_SummaryDataPoint_ValueAtQuantile proto.InternalMessageInfo - -func (m *SummaryDataPoint_ValueAtQuantile) GetQuantile() float64 { - if m != nil { - return m.Quantile - } - return 0 -} - -func (m *SummaryDataPoint_ValueAtQuantile) GetValue() float64 { - if m != nil { - return m.Value - } - return 0 -} - -// A representation of an exemplar, which is a sample input measurement. -// Exemplars also hold information about the environment when the measurement -// was recorded, for example the span and trace ID of the active span when the -// exemplar was recorded. -type Exemplar struct { - // The set of key/value pairs that were filtered out by the aggregator, but - // recorded alongside the original measurement. Only key/value pairs that were - // filtered out by the aggregator should be included - FilteredAttributes []v11.KeyValue `protobuf:"bytes,7,rep,name=filtered_attributes,json=filteredAttributes,proto3" json:"filtered_attributes"` - // time_unix_nano is the exact time when this exemplar was recorded - // - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January - // 1970. - TimeUnixNano uint64 `protobuf:"fixed64,2,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // The value of the measurement that was recorded. An exemplar is - // considered invalid when one of the recognized value fields is not present - // inside this oneof. - // - // Types that are valid to be assigned to Value: - // *Exemplar_AsDouble - // *Exemplar_AsInt - Value isExemplar_Value `protobuf_oneof:"value"` - // (Optional) Span ID of the exemplar trace. - // span_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // (Optional) Trace ID of the exemplar trace. - // trace_id may be missing if the measurement is not recorded inside a trace - // or if the trace is not sampled. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,5,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` -} - -func (m *Exemplar) Reset() { *m = Exemplar{} } -func (m *Exemplar) String() string { return proto.CompactTextString(m) } -func (*Exemplar) ProtoMessage() {} -func (*Exemplar) Descriptor() ([]byte, []int) { - return fileDescriptor_3c3112f9fa006917, []int{13} -} -func (m *Exemplar) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Exemplar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Exemplar.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Exemplar) XXX_Merge(src proto.Message) { - xxx_messageInfo_Exemplar.Merge(m, src) -} -func (m *Exemplar) XXX_Size() int { - return m.Size() -} -func (m *Exemplar) XXX_DiscardUnknown() { - xxx_messageInfo_Exemplar.DiscardUnknown(m) -} - -var xxx_messageInfo_Exemplar proto.InternalMessageInfo - -type isExemplar_Value interface { - isExemplar_Value() - MarshalTo([]byte) (int, error) - Size() int -} - -type Exemplar_AsDouble struct { - AsDouble float64 `protobuf:"fixed64,3,opt,name=as_double,json=asDouble,proto3,oneof" json:"as_double,omitempty"` -} -type Exemplar_AsInt struct { - AsInt int64 `protobuf:"fixed64,6,opt,name=as_int,json=asInt,proto3,oneof" json:"as_int,omitempty"` -} - -func (*Exemplar_AsDouble) isExemplar_Value() {} -func (*Exemplar_AsInt) isExemplar_Value() {} - -func (m *Exemplar) GetValue() isExemplar_Value { - if m != nil { - return m.Value - } - return nil -} - -func (m *Exemplar) GetFilteredAttributes() []v11.KeyValue { - if m != nil { - return m.FilteredAttributes - } - return nil -} - -func (m *Exemplar) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *Exemplar) GetAsDouble() float64 { - if x, ok := m.GetValue().(*Exemplar_AsDouble); ok { - return x.AsDouble - } - return 0 -} - -func (m *Exemplar) GetAsInt() int64 { - if x, ok := m.GetValue().(*Exemplar_AsInt); ok { - return x.AsInt - } - return 0 -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Exemplar) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Exemplar_AsDouble)(nil), - (*Exemplar_AsInt)(nil), - } -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.metrics.v1.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) - proto.RegisterEnum("opentelemetry.proto.metrics.v1.DataPointFlags", DataPointFlags_name, DataPointFlags_value) - proto.RegisterType((*MetricsData)(nil), "opentelemetry.proto.metrics.v1.MetricsData") - proto.RegisterType((*ResourceMetrics)(nil), "opentelemetry.proto.metrics.v1.ResourceMetrics") - proto.RegisterType((*ScopeMetrics)(nil), "opentelemetry.proto.metrics.v1.ScopeMetrics") - proto.RegisterType((*Metric)(nil), "opentelemetry.proto.metrics.v1.Metric") - proto.RegisterType((*Gauge)(nil), "opentelemetry.proto.metrics.v1.Gauge") - proto.RegisterType((*Sum)(nil), "opentelemetry.proto.metrics.v1.Sum") - proto.RegisterType((*Histogram)(nil), "opentelemetry.proto.metrics.v1.Histogram") - proto.RegisterType((*ExponentialHistogram)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogram") - proto.RegisterType((*Summary)(nil), "opentelemetry.proto.metrics.v1.Summary") - proto.RegisterType((*NumberDataPoint)(nil), "opentelemetry.proto.metrics.v1.NumberDataPoint") - proto.RegisterType((*HistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.HistogramDataPoint") - proto.RegisterType((*ExponentialHistogramDataPoint)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint") - proto.RegisterType((*ExponentialHistogramDataPoint_Buckets)(nil), "opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets") - proto.RegisterType((*SummaryDataPoint)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint") - proto.RegisterType((*SummaryDataPoint_ValueAtQuantile)(nil), "opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile") - proto.RegisterType((*Exemplar)(nil), "opentelemetry.proto.metrics.v1.Exemplar") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/metrics/v1/metrics.proto", fileDescriptor_3c3112f9fa006917) -} - -var fileDescriptor_3c3112f9fa006917 = []byte{ - // 1568 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xcd, 0x4f, 0x1b, 0x49, - 0x16, 0x77, 0xfb, 0xdb, 0xcf, 0x06, 0x9c, 0x5a, 0x96, 0xb4, 0x58, 0xe1, 0x38, 0xce, 0x26, 0xb0, - 0xd9, 0xc8, 0x5e, 0xc8, 0x6a, 0x3f, 0x0e, 0x91, 0x62, 0x63, 0x03, 0x26, 0x80, 0x49, 0xd9, 0x20, - 0x25, 0x8a, 0xd2, 0x2a, 0xec, 0xc2, 0xb4, 0xd2, 0xdd, 0xe5, 0xed, 0xae, 0x46, 0xb0, 0xff, 0xc1, - 0x4a, 0x7b, 0xc8, 0xdf, 0xb1, 0xca, 0x6d, 0x4f, 0x73, 0x9b, 0x63, 0x8e, 0x99, 0xdb, 0x68, 0x34, - 0x8a, 0x46, 0xe4, 0x30, 0x23, 0xcd, 0x3f, 0x31, 0xaa, 0xea, 0x6e, 0xfc, 0x81, 0x89, 0xc9, 0xc7, - 0x21, 0x39, 0xb9, 0xea, 0xd5, 0x7b, 0xbf, 0x7a, 0xaf, 0xde, 0xef, 0xd5, 0x2b, 0x37, 0xdc, 0x63, - 0x3d, 0x6a, 0x71, 0x6a, 0x50, 0x93, 0x72, 0xfb, 0xb4, 0xd4, 0xb3, 0x19, 0x67, 0x25, 0x31, 0xd6, - 0xdb, 0x4e, 0xe9, 0x78, 0x39, 0x18, 0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f, 0xcb, 0x86, 0xef, 0x3e, 0x87, 0xe9, 0x73, 0xbe, 0xae, 0xc9, 0xfb, 0xed, 0x06, - 0xfc, 0xa1, 0x5a, 0x6e, 0x95, 0xb5, 0xdd, 0x46, 0x7d, 0xa7, 0xa5, 0xad, 0x6d, 0x95, 0xd7, 0x9b, - 0x5a, 0xb5, 0xa1, 0xed, 0x34, 0x5a, 0xda, 0x5e, 0xb3, 0x96, 0x0d, 0xa1, 0x3f, 0xc3, 0xe2, 0x05, - 0x85, 0x9d, 0x86, 0x86, 0x6b, 0xab, 0x0d, 0x5c, 0xad, 0x55, 0xb5, 0xfd, 0xf2, 0xd6, 0x5e, 0x4d, - 0xdb, 0x2e, 0x37, 0x1f, 0x65, 0x95, 0xca, 0xff, 0x95, 0xd7, 0x67, 0x39, 0xe5, 0xcd, 0x59, 0x4e, - 0xf9, 0xe9, 0x2c, 0xa7, 0xbc, 0x7c, 0x97, 0x0b, 0xbd, 0x79, 0x97, 0x0b, 0x7d, 0xff, 0x2e, 0x17, - 0x82, 0x9b, 0x3a, 0x9b, 0x50, 0x51, 0x95, 0x8c, 0xff, 0x35, 0x64, 0x57, 0x2c, 0xec, 0x2a, 0x4f, - 0x6b, 0x1f, 0x9c, 0x0f, 0xef, 0x03, 0x59, 0x97, 0x5a, 0x03, 0xdf, 0xec, 0xfe, 0x17, 0xce, 0x35, - 0x7a, 0xd4, 0x6a, 0x9d, 0x83, 0x48, 0x78, 0xff, 0x73, 0x87, 0x53, 0xdc, 0x5f, 0x3e, 0x88, 0x4b, - 0xab, 0xfb, 0xbf, 0x05, 0x00, 0x00, 0xff, 0xff, 0x00, 0xa3, 0x78, 0x2c, 0xfd, 0x13, 0x00, 0x00, -} - -func (m *MetricsData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MetricsData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MetricsData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for iNdEx := len(m.ResourceMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeMetrics) > 0 { - for iNdEx := len(m.DeprecatedScopeMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeMetrics) > 0 { - for iNdEx := len(m.ScopeMetrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeMetrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeMetrics) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeMetrics) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Metrics) > 0 { - for iNdEx := len(m.Metrics) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metrics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Metric) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Metric) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Metadata) > 0 { - for iNdEx := len(m.Metadata) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Metadata[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } - } - if m.Data != nil { - { - size := m.Data.Size() - i -= size - if _, err := m.Data.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Unit) > 0 { - i -= len(m.Unit) - copy(dAtA[i:], m.Unit) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Unit))) - i-- - dAtA[i] = 0x1a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintMetrics(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Metric_Gauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Gauge != nil { - { - size, err := m.Gauge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *Metric_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Sum != nil { - { - size, err := m.Sum.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *Metric_Histogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Histogram != nil { - { - size, err := m.Histogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *Metric_ExponentialHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_ExponentialHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.ExponentialHistogram != nil { - { - size, err := m.ExponentialHistogram.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - return len(dAtA) - i, nil -} -func (m *Metric_Summary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Metric_Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Summary != nil { - { - size, err := m.Summary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - return len(dAtA) - i, nil -} -func (m *Gauge) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Gauge) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Gauge) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Sum) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IsMonotonic { - i-- - if m.IsMonotonic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Histogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Histogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Histogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExponentialHistogram) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogram) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogram) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x10 - } - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Summary) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Summary) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Summary) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DataPoints) > 0 { - for iNdEx := len(m.DataPoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DataPoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *NumberDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NumberDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x40 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *NumberDataPoint_AsDouble) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint_AsDouble) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsDouble)))) - i-- - dAtA[i] = 0x21 - return len(dAtA) - i, nil -} -func (m *NumberDataPoint_AsInt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NumberDataPoint_AsInt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.AsInt)) - i-- - dAtA[i] = 0x31 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Max_ != nil { - { - size := m.Max_.Size() - i -= size - if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Min_ != nil { - { - size := m.Min_.Size() - i -= size - if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x50 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.ExplicitBounds) > 0 { - for iNdEx := len(m.ExplicitBounds) - 1; iNdEx >= 0; iNdEx-- { - f8 := math.Float64bits(float64(m.ExplicitBounds[iNdEx])) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(f8)) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.ExplicitBounds)*8)) - i-- - dAtA[i] = 0x3a - } - if len(m.BucketCounts) > 0 { - for iNdEx := len(m.BucketCounts) - 1; iNdEx >= 0; iNdEx-- { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.BucketCounts[iNdEx])) - } - i = encodeVarintMetrics(dAtA, i, uint64(len(m.BucketCounts)*8)) - i-- - dAtA[i] = 0x32 - } - if m.Sum_ != nil { - { - size := m.Sum_.Size() - i -= size - if _, err := m.Sum_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *HistogramDataPoint_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i-- - dAtA[i] = 0x59 - return len(dAtA) - i, nil -} -func (m *HistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i-- - dAtA[i] = 0x61 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogramDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ZeroThreshold != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.ZeroThreshold)))) - i-- - dAtA[i] = 0x71 - } - if m.Max_ != nil { - { - size := m.Max_.Size() - i -= size - if _, err := m.Max_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Min_ != nil { - { - size := m.Min_.Size() - i -= size - if _, err := m.Min_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.Exemplars) > 0 { - for iNdEx := len(m.Exemplars) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Exemplars[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x50 - } - { - size, err := m.Negative.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size, err := m.Positive.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - if m.ZeroCount != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.ZeroCount)) - i-- - dAtA[i] = 0x39 - } - if m.Scale != 0 { - i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.Scale)<<1)^uint32((m.Scale>>31)))) - i-- - dAtA[i] = 0x30 - } - if m.Sum_ != nil { - { - size := m.Sum_.Size() - i -= size - if _, err := m.Sum_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ExponentialHistogramDataPoint_Sum) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Sum) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Min) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Min) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Min)))) - i-- - dAtA[i] = 0x61 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Max) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Max) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Max)))) - i-- - dAtA[i] = 0x69 - return len(dAtA) - i, nil -} -func (m *ExponentialHistogramDataPoint_Buckets) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExponentialHistogramDataPoint_Buckets) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExponentialHistogramDataPoint_Buckets) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BucketCounts) > 0 { - dAtA12 := make([]byte, len(m.BucketCounts)*10) - var j11 int - for _, num := range m.BucketCounts { - for num >= 1<<7 { - dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j11++ - } - dAtA12[j11] = uint8(num) - j11++ - } - i -= j11 - copy(dAtA[i:], dAtA12[:j11]) - i = encodeVarintMetrics(dAtA, i, uint64(j11)) - i-- - dAtA[i] = 0x12 - } - if m.Offset != 0 { - i = encodeVarintMetrics(dAtA, i, uint64((uint32(m.Offset)<<1)^uint32((m.Offset>>31)))) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SummaryDataPoint) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SummaryDataPoint) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SummaryDataPoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i = encodeVarintMetrics(dAtA, i, uint64(m.Flags)) - i-- - dAtA[i] = 0x40 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.QuantileValues) > 0 { - for iNdEx := len(m.QuantileValues) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.QuantileValues[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Sum != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Sum)))) - i-- - dAtA[i] = 0x29 - } - if m.Count != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.Count)) - i-- - dAtA[i] = 0x21 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x19 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *SummaryDataPoint_ValueAtQuantile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SummaryDataPoint_ValueAtQuantile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SummaryDataPoint_ValueAtQuantile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Value != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Value)))) - i-- - dAtA[i] = 0x11 - } - if m.Quantile != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Quantile)))) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Exemplar) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Exemplar) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.FilteredAttributes) > 0 { - for iNdEx := len(m.FilteredAttributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FilteredAttributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Value != nil { - { - size := m.Value.Size() - i -= size - if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintMetrics(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x11 - } - return len(dAtA) - i, nil -} - -func (m *Exemplar_AsDouble) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar_AsDouble) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AsDouble)))) - i-- - dAtA[i] = 0x19 - return len(dAtA) - i, nil -} -func (m *Exemplar_AsInt) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Exemplar_AsInt) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.AsInt)) - i-- - dAtA[i] = 0x31 - return len(dAtA) - i, nil -} -func encodeVarintMetrics(dAtA []byte, offset int, v uint64) int { - offset -= sovMetrics(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MetricsData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceMetrics) > 0 { - for _, e := range m.ResourceMetrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *ResourceMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.ScopeMetrics) > 0 { - for _, e := range m.ScopeMetrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if len(m.DeprecatedScopeMetrics) > 0 { - for _, e := range m.DeprecatedScopeMetrics { - l = e.Size() - n += 2 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *ScopeMetrics) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.Metrics) > 0 { - for _, e := range m.Metrics { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} - -func (m *Metric) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - l = len(m.Unit) - if l > 0 { - n += 1 + l + sovMetrics(uint64(l)) - } - if m.Data != nil { - n += m.Data.Size() - } - if len(m.Metadata) > 0 { - for _, e := range m.Metadata { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Metric_Gauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Gauge != nil { - l = m.Gauge.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Sum != nil { - l = m.Sum.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Histogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Histogram != nil { - l = m.Histogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_ExponentialHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ExponentialHistogram != nil { - l = m.ExponentialHistogram.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Metric_Summary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Summary != nil { - l = m.Summary.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - return n -} -func (m *Gauge) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - if m.IsMonotonic { - n += 2 - } - return n -} - -func (m *Histogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *ExponentialHistogram) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.AggregationTemporality != 0 { - n += 1 + sovMetrics(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *Summary) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.DataPoints) > 0 { - for _, e := range m.DataPoints { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *NumberDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != nil { - n += m.Value.Size() - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - return n -} - -func (m *NumberDataPoint_AsDouble) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *NumberDataPoint_AsInt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum_ != nil { - n += m.Sum_.Size() - } - if len(m.BucketCounts) > 0 { - n += 1 + sovMetrics(uint64(len(m.BucketCounts)*8)) + len(m.BucketCounts)*8 - } - if len(m.ExplicitBounds) > 0 { - n += 1 + sovMetrics(uint64(len(m.ExplicitBounds)*8)) + len(m.ExplicitBounds)*8 - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - if m.Min_ != nil { - n += m.Min_.Size() - } - if m.Max_ != nil { - n += m.Max_.Size() - } - return n -} - -func (m *HistogramDataPoint_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint_Min) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *HistogramDataPoint_Max) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum_ != nil { - n += m.Sum_.Size() - } - if m.Scale != 0 { - n += 1 + sozMetrics(uint64(m.Scale)) - } - if m.ZeroCount != 0 { - n += 9 - } - l = m.Positive.Size() - n += 1 + l + sovMetrics(uint64(l)) - l = m.Negative.Size() - n += 1 + l + sovMetrics(uint64(l)) - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - if len(m.Exemplars) > 0 { - for _, e := range m.Exemplars { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Min_ != nil { - n += m.Min_.Size() - } - if m.Max_ != nil { - n += m.Max_.Size() - } - if m.ZeroThreshold != 0 { - n += 9 - } - return n -} - -func (m *ExponentialHistogramDataPoint_Sum) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Min) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Max) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *ExponentialHistogramDataPoint_Buckets) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Offset != 0 { - n += 1 + sozMetrics(uint64(m.Offset)) - } - if len(m.BucketCounts) > 0 { - l = 0 - for _, e := range m.BucketCounts { - l += sovMetrics(uint64(e)) - } - n += 1 + sovMetrics(uint64(l)) + l - } - return n -} - -func (m *SummaryDataPoint) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Count != 0 { - n += 9 - } - if m.Sum != 0 { - n += 9 - } - if len(m.QuantileValues) > 0 { - for _, e := range m.QuantileValues { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - if m.Flags != 0 { - n += 1 + sovMetrics(uint64(m.Flags)) - } - return n -} - -func (m *SummaryDataPoint_ValueAtQuantile) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Quantile != 0 { - n += 9 - } - if m.Value != 0 { - n += 9 - } - return n -} - -func (m *Exemplar) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - if m.Value != nil { - n += m.Value.Size() - } - l = m.SpanId.Size() - n += 1 + l + sovMetrics(uint64(l)) - l = m.TraceId.Size() - n += 1 + l + sovMetrics(uint64(l)) - if len(m.FilteredAttributes) > 0 { - for _, e := range m.FilteredAttributes { - l = e.Size() - n += 1 + l + sovMetrics(uint64(l)) - } - } - return n -} - -func (m *Exemplar_AsDouble) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} -func (m *Exemplar_AsInt) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 9 - return n -} - -func sovMetrics(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMetrics(x uint64) (n int) { - return sovMetrics(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MetricsData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MetricsData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MetricsData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceMetrics = append(m.ResourceMetrics, &ResourceMetrics{}) - if err := m.ResourceMetrics[len(m.ResourceMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeMetrics = append(m.ScopeMetrics, &ScopeMetrics{}) - if err := m.ScopeMetrics[len(m.ScopeMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeMetrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeMetrics = append(m.DeprecatedScopeMetrics, &ScopeMetrics{}) - if err := m.DeprecatedScopeMetrics[len(m.DeprecatedScopeMetrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeMetrics) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeMetrics: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeMetrics: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metrics = append(m.Metrics, &Metric{}) - if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Metric) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Metric: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Unit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Unit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gauge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Gauge{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Gauge{v} - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Sum{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Sum{v} - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Histogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Histogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Histogram{v} - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExponentialHistogram", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &ExponentialHistogram{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_ExponentialHistogram{v} - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Summary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - v := &Summary{} - if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - m.Data = &Metric_Summary{v} - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Metadata = append(m.Metadata, v11.KeyValue{}) - if err := m.Metadata[len(m.Metadata)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Gauge) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Gauge: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Gauge: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &NumberDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sum) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sum: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sum: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &NumberDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsMonotonic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsMonotonic = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Histogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Histogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Histogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &HistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogram) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExponentialHistogram: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExponentialHistogram: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &ExponentialHistogramDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Summary) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Summary: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Summary: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DataPoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DataPoints = append(m.DataPoints, &SummaryDataPoint{}) - if err := m.DataPoints[len(m.DataPoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NumberDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NumberDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NumberDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &NumberDataPoint_AsDouble{float64(math.Float64frombits(v))} - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &NumberDataPoint_AsInt{v} - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum_ = &HistogramDataPoint_Sum{float64(math.Float64frombits(v))} - case 6: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - case 7: - if wireType == 1 { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - elementCount = packedLen / 8 - if elementCount != 0 && len(m.ExplicitBounds) == 0 { - m.ExplicitBounds = make([]float64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.ExplicitBounds = append(m.ExplicitBounds, v2) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field ExplicitBounds", wireType) - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min_ = &HistogramDataPoint_Min{float64(math.Float64frombits(v))} - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max_ = &HistogramDataPoint_Max{float64(math.Float64frombits(v))} - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogramDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExponentialHistogramDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExponentialHistogramDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum_ = &ExponentialHistogramDataPoint_Sum{float64(math.Float64frombits(v))} - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Scale = v - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ZeroCount", wireType) - } - m.ZeroCount = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.ZeroCount = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Positive", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Positive.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Negative", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Negative.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Exemplars", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Exemplars = append(m.Exemplars, Exemplar{}) - if err := m.Exemplars[len(m.Exemplars)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Min_ = &ExponentialHistogramDataPoint_Min{float64(math.Float64frombits(v))} - case 13: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Max_ = &ExponentialHistogramDataPoint_Max{float64(math.Float64frombits(v))} - case 14: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field ZeroThreshold", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.ZeroThreshold = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExponentialHistogramDataPoint_Buckets) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Buckets: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Buckets: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - v = int32((uint32(v) >> 1) ^ uint32(((v&1)<<31)>>31)) - m.Offset = v - case 2: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BucketCounts = append(m.BucketCounts, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.BucketCounts) == 0 { - m.BucketCounts = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.BucketCounts = append(m.BucketCounts, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field BucketCounts", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SummaryDataPoint) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SummaryDataPoint: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SummaryDataPoint: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Count", wireType) - } - m.Count = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.Count = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Sum = float64(math.Float64frombits(v)) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QuantileValues", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QuantileValues = append(m.QuantileValues, &SummaryDataPoint_ValueAtQuantile{}) - if err := m.QuantileValues[len(m.QuantileValues)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Flags |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SummaryDataPoint_ValueAtQuantile) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValueAtQuantile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueAtQuantile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Quantile", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Quantile = float64(math.Float64frombits(v)) - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Exemplar) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Exemplar: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Exemplar: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 3: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsDouble", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &Exemplar_AsDouble{float64(math.Float64frombits(v))} - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AsInt", wireType) - } - var v int64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = int64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.Value = &Exemplar_AsInt{v} - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilteredAttributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMetrics - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthMetrics - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthMetrics - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilteredAttributes = append(m.FilteredAttributes, v11.KeyValue{}) - if err := m.FilteredAttributes[len(m.FilteredAttributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMetrics(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMetrics - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMetrics(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowMetrics - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthMetrics - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMetrics - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMetrics - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMetrics = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMetrics = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMetrics = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go deleted file mode 100644 index bafc9d85f0..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development/profiles.pb.go +++ /dev/null @@ -1,5348 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/profiles/v1development/profiles.proto - -package v1development - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Specifies the method of aggregating metric values, either DELTA (change since last report) -// or CUMULATIVE (total since a fixed start time). -type AggregationTemporality int32 - -const ( - // UNSPECIFIED is the default AggregationTemporality, it MUST not be used. - AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED AggregationTemporality = 0 - //* DELTA is an AggregationTemporality for a profiler which reports - //changes since last report time. Successive metrics contain aggregation of - //values from continuous and non-overlapping intervals. - // - //The values for a DELTA metric are based only on the time interval - //associated with one measurement cycle. There is no dependency on - //previous measurements like is the case for CUMULATIVE metrics. - // - //For example, consider a system measuring the number of requests that - //it receives and reports the sum of these requests every second as a - //DELTA metric: - // - //1. The system starts receiving at time=t_0. - //2. A request is received, the system measures 1 request. - //3. A request is received, the system measures 1 request. - //4. A request is received, the system measures 1 request. - //5. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+1 with a value of 3. - //6. A request is received, the system measures 1 request. - //7. A request is received, the system measures 1 request. - //8. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0+1 to - //t_0+2 with a value of 2. - AggregationTemporality_AGGREGATION_TEMPORALITY_DELTA AggregationTemporality = 1 - //* CUMULATIVE is an AggregationTemporality for a profiler which - //reports changes since a fixed start time. This means that current values - //of a CUMULATIVE metric depend on all previous measurements since the - //start time. Because of this, the sender is required to retain this state - //in some form. If this state is lost or invalidated, the CUMULATIVE metric - //values MUST be reset and a new fixed start time following the last - //reported measurement time sent MUST be used. - // - //For example, consider a system measuring the number of requests that - //it receives and reports the sum of these requests every second as a - //CUMULATIVE metric: - // - //1. The system starts receiving at time=t_0. - //2. A request is received, the system measures 1 request. - //3. A request is received, the system measures 1 request. - //4. A request is received, the system measures 1 request. - //5. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+1 with a value of 3. - //6. A request is received, the system measures 1 request. - //7. A request is received, the system measures 1 request. - //8. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_0 to - //t_0+2 with a value of 5. - //9. The system experiences a fault and loses state. - //10. The system recovers and resumes receiving at time=t_1. - //11. A request is received, the system measures 1 request. - //12. The 1 second collection cycle ends. A metric is exported for the - //number of requests received over the interval of time t_1 to - //t_1+1 with a value of 1. - // - //Note: Even though, when reporting changes since last report time, using - //CUMULATIVE is valid, it is not recommended. - AggregationTemporality_AGGREGATION_TEMPORALITY_CUMULATIVE AggregationTemporality = 2 -) - -var AggregationTemporality_name = map[int32]string{ - 0: "AGGREGATION_TEMPORALITY_UNSPECIFIED", - 1: "AGGREGATION_TEMPORALITY_DELTA", - 2: "AGGREGATION_TEMPORALITY_CUMULATIVE", -} - -var AggregationTemporality_value = map[string]int32{ - "AGGREGATION_TEMPORALITY_UNSPECIFIED": 0, - "AGGREGATION_TEMPORALITY_DELTA": 1, - "AGGREGATION_TEMPORALITY_CUMULATIVE": 2, -} - -func (x AggregationTemporality) String() string { - return proto.EnumName(AggregationTemporality_name, int32(x)) -} - -func (AggregationTemporality) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{0} -} - -// ProfilesData represents the profiles data that can be stored in persistent storage, -// OR can be embedded by other protocols that transfer OTLP profiles data but do not -// implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type ProfilesData struct { - // An array of ResourceProfiles. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceProfiles []*ResourceProfiles `protobuf:"bytes,1,rep,name=resource_profiles,json=resourceProfiles,proto3" json:"resource_profiles,omitempty"` -} - -func (m *ProfilesData) Reset() { *m = ProfilesData{} } -func (m *ProfilesData) String() string { return proto.CompactTextString(m) } -func (*ProfilesData) ProtoMessage() {} -func (*ProfilesData) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{0} -} -func (m *ProfilesData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ProfilesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ProfilesData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ProfilesData) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProfilesData.Merge(m, src) -} -func (m *ProfilesData) XXX_Size() int { - return m.Size() -} -func (m *ProfilesData) XXX_DiscardUnknown() { - xxx_messageInfo_ProfilesData.DiscardUnknown(m) -} - -var xxx_messageInfo_ProfilesData proto.InternalMessageInfo - -func (m *ProfilesData) GetResourceProfiles() []*ResourceProfiles { - if m != nil { - return m.ResourceProfiles - } - return nil -} - -// A collection of ScopeProfiles from a Resource. -type ResourceProfiles struct { - // The resource for the profiles in this message. - // If this field is not set then no resource info is known. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeProfiles that originate from a resource. - ScopeProfiles []*ScopeProfiles `protobuf:"bytes,2,rep,name=scope_profiles,json=scopeProfiles,proto3" json:"scope_profiles,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_profiles" field which have their own schema_url field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ResourceProfiles) Reset() { *m = ResourceProfiles{} } -func (m *ResourceProfiles) String() string { return proto.CompactTextString(m) } -func (*ResourceProfiles) ProtoMessage() {} -func (*ResourceProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{1} -} -func (m *ResourceProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceProfiles.Merge(m, src) -} -func (m *ResourceProfiles) XXX_Size() int { - return m.Size() -} -func (m *ResourceProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceProfiles proto.InternalMessageInfo - -func (m *ResourceProfiles) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceProfiles) GetScopeProfiles() []*ScopeProfiles { - if m != nil { - return m.ScopeProfiles - } - return nil -} - -func (m *ResourceProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Profiles produced by an InstrumentationScope. -type ScopeProfiles struct { - // The instrumentation scope information for the profiles in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of Profiles that originate from an instrumentation scope. - Profiles []*Profile `protobuf:"bytes,2,rep,name=profiles,proto3" json:"profiles,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the profile data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all profiles in the "profiles" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeProfiles) Reset() { *m = ScopeProfiles{} } -func (m *ScopeProfiles) String() string { return proto.CompactTextString(m) } -func (*ScopeProfiles) ProtoMessage() {} -func (*ScopeProfiles) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{2} -} -func (m *ScopeProfiles) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeProfiles) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeProfiles.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeProfiles) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeProfiles.Merge(m, src) -} -func (m *ScopeProfiles) XXX_Size() int { - return m.Size() -} -func (m *ScopeProfiles) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeProfiles.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeProfiles proto.InternalMessageInfo - -func (m *ScopeProfiles) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeProfiles) GetProfiles() []*Profile { - if m != nil { - return m.Profiles - } - return nil -} - -func (m *ScopeProfiles) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// Represents a complete profile, including sample types, samples, -// mappings to binaries, locations, functions, string table, and additional metadata. -// It modifies and annotates pprof Profile with OpenTelemetry specific fields. -// -// Note that whilst fields in this message retain the name and field id from pprof in most cases -// for ease of understanding data migration, it is not intended that pprof:Profile and -// OpenTelemetry:Profile encoding be wire compatible. -type Profile struct { - // A description of the samples associated with each Sample.value. - // For a cpu profile this might be: - // [["cpu","nanoseconds"]] or [["wall","seconds"]] or [["syscall","count"]] - // For a heap profile, this might be: - // [["allocations","count"], ["space","bytes"]], - // If one of the values represents the number of events represented - // by the sample, by convention it should be at index 0 and use - // sample_type.unit == "count". - SampleType []*ValueType `protobuf:"bytes,1,rep,name=sample_type,json=sampleType,proto3" json:"sample_type,omitempty"` - // The set of samples recorded in this profile. - Sample []*Sample `protobuf:"bytes,2,rep,name=sample,proto3" json:"sample,omitempty"` - // Mapping from address ranges to the image/binary/library mapped - // into that address range. mapping[0] will be the main binary. - // If multiple binaries contribute to the Profile and no main - // binary can be identified, mapping[0] has no special meaning. - MappingTable []*Mapping `protobuf:"bytes,3,rep,name=mapping_table,json=mappingTable,proto3" json:"mapping_table,omitempty"` - // Locations referenced by samples via location_indices. - LocationTable []*Location `protobuf:"bytes,4,rep,name=location_table,json=locationTable,proto3" json:"location_table,omitempty"` - // Array of locations referenced by samples. - LocationIndices []int32 `protobuf:"varint,5,rep,packed,name=location_indices,json=locationIndices,proto3" json:"location_indices,omitempty"` - // Functions referenced by locations. - FunctionTable []*Function `protobuf:"bytes,6,rep,name=function_table,json=functionTable,proto3" json:"function_table,omitempty"` - // Lookup table for attributes. - AttributeTable []v11.KeyValue `protobuf:"bytes,7,rep,name=attribute_table,json=attributeTable,proto3" json:"attribute_table"` - // Represents a mapping between Attribute Keys and Units. - AttributeUnits []*AttributeUnit `protobuf:"bytes,8,rep,name=attribute_units,json=attributeUnits,proto3" json:"attribute_units,omitempty"` - // Lookup table for links. - LinkTable []*Link `protobuf:"bytes,9,rep,name=link_table,json=linkTable,proto3" json:"link_table,omitempty"` - // A common table for strings referenced by various messages. - // string_table[0] must always be "". - StringTable []string `protobuf:"bytes,10,rep,name=string_table,json=stringTable,proto3" json:"string_table,omitempty"` - // Time of collection (UTC) represented as nanoseconds past the epoch. - TimeNanos int64 `protobuf:"varint,11,opt,name=time_nanos,json=timeNanos,proto3" json:"time_nanos,omitempty"` - // Duration of the profile, if a duration makes sense. - DurationNanos int64 `protobuf:"varint,12,opt,name=duration_nanos,json=durationNanos,proto3" json:"duration_nanos,omitempty"` - // The kind of events between sampled occurrences. - // e.g [ "cpu","cycles" ] or [ "heap","bytes" ] - PeriodType ValueType `protobuf:"bytes,13,opt,name=period_type,json=periodType,proto3" json:"period_type"` - // The number of events between sampled occurrences. - Period int64 `protobuf:"varint,14,opt,name=period,proto3" json:"period,omitempty"` - // Free-form text associated with the profile. The text is displayed as is - // to the user by the tools that read profiles (e.g. by pprof). This field - // should not be used to store any machine-readable information, it is only - // for human-friendly content. The profile must stay functional if this field - // is cleaned. - CommentStrindices []int32 `protobuf:"varint,15,rep,packed,name=comment_strindices,json=commentStrindices,proto3" json:"comment_strindices,omitempty"` - // Index into the string table of the type of the preferred sample - // value. If unset, clients should default to the last sample value. - DefaultSampleTypeStrindex int32 `protobuf:"varint,16,opt,name=default_sample_type_strindex,json=defaultSampleTypeStrindex,proto3" json:"default_sample_type_strindex,omitempty"` - // A globally unique identifier for a profile. The ID is a 16-byte array. An ID with - // all zeroes is considered invalid. - // - // This field is required. - ProfileId go_opentelemetry_io_collector_pdata_internal_data.ProfileID `protobuf:"bytes,17,opt,name=profile_id,json=profileId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.ProfileID" json:"profile_id"` - // dropped_attributes_count is 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 uint32 `protobuf:"varint,19,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Specifies format of the original payload. Common values are defined in semantic conventions. [required if original_payload is present] - OriginalPayloadFormat string `protobuf:"bytes,20,opt,name=original_payload_format,json=originalPayloadFormat,proto3" json:"original_payload_format,omitempty"` - // Original payload can be stored in this field. This can be useful for users who want to get the original payload. - // Formats such as JFR are highly extensible and can contain more information than what is defined in this spec. - // Inclusion of original payload should be configurable by the user. Default behavior should be to not include the original payload. - // If the original payload is in pprof format, it SHOULD not be included in this field. - // The field is optional, however if it is present then equivalent converted data should be populated in other fields - // of this message as far as is practicable. - OriginalPayload []byte `protobuf:"bytes,21,opt,name=original_payload,json=originalPayload,proto3" json:"original_payload,omitempty"` - // References to attributes in attribute_table. [optional] - // It is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "abc.com/myattribute": true - // "abc.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - AttributeIndices []int32 `protobuf:"varint,22,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` -} - -func (m *Profile) Reset() { *m = Profile{} } -func (m *Profile) String() string { return proto.CompactTextString(m) } -func (*Profile) ProtoMessage() {} -func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{3} -} -func (m *Profile) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Profile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Profile.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Profile) XXX_Merge(src proto.Message) { - xxx_messageInfo_Profile.Merge(m, src) -} -func (m *Profile) XXX_Size() int { - return m.Size() -} -func (m *Profile) XXX_DiscardUnknown() { - xxx_messageInfo_Profile.DiscardUnknown(m) -} - -var xxx_messageInfo_Profile proto.InternalMessageInfo - -func (m *Profile) GetSampleType() []*ValueType { - if m != nil { - return m.SampleType - } - return nil -} - -func (m *Profile) GetSample() []*Sample { - if m != nil { - return m.Sample - } - return nil -} - -func (m *Profile) GetMappingTable() []*Mapping { - if m != nil { - return m.MappingTable - } - return nil -} - -func (m *Profile) GetLocationTable() []*Location { - if m != nil { - return m.LocationTable - } - return nil -} - -func (m *Profile) GetLocationIndices() []int32 { - if m != nil { - return m.LocationIndices - } - return nil -} - -func (m *Profile) GetFunctionTable() []*Function { - if m != nil { - return m.FunctionTable - } - return nil -} - -func (m *Profile) GetAttributeTable() []v11.KeyValue { - if m != nil { - return m.AttributeTable - } - return nil -} - -func (m *Profile) GetAttributeUnits() []*AttributeUnit { - if m != nil { - return m.AttributeUnits - } - return nil -} - -func (m *Profile) GetLinkTable() []*Link { - if m != nil { - return m.LinkTable - } - return nil -} - -func (m *Profile) GetStringTable() []string { - if m != nil { - return m.StringTable - } - return nil -} - -func (m *Profile) GetTimeNanos() int64 { - if m != nil { - return m.TimeNanos - } - return 0 -} - -func (m *Profile) GetDurationNanos() int64 { - if m != nil { - return m.DurationNanos - } - return 0 -} - -func (m *Profile) GetPeriodType() ValueType { - if m != nil { - return m.PeriodType - } - return ValueType{} -} - -func (m *Profile) GetPeriod() int64 { - if m != nil { - return m.Period - } - return 0 -} - -func (m *Profile) GetCommentStrindices() []int32 { - if m != nil { - return m.CommentStrindices - } - return nil -} - -func (m *Profile) GetDefaultSampleTypeStrindex() int32 { - if m != nil { - return m.DefaultSampleTypeStrindex - } - return 0 -} - -func (m *Profile) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Profile) GetOriginalPayloadFormat() string { - if m != nil { - return m.OriginalPayloadFormat - } - return "" -} - -func (m *Profile) GetOriginalPayload() []byte { - if m != nil { - return m.OriginalPayload - } - return nil -} - -func (m *Profile) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -// Represents a mapping between Attribute Keys and Units. -type AttributeUnit struct { - // Index into string table. - AttributeKeyStrindex int32 `protobuf:"varint,1,opt,name=attribute_key_strindex,json=attributeKeyStrindex,proto3" json:"attribute_key_strindex,omitempty"` - // Index into string table. - UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` -} - -func (m *AttributeUnit) Reset() { *m = AttributeUnit{} } -func (m *AttributeUnit) String() string { return proto.CompactTextString(m) } -func (*AttributeUnit) ProtoMessage() {} -func (*AttributeUnit) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{4} -} -func (m *AttributeUnit) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AttributeUnit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AttributeUnit.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *AttributeUnit) XXX_Merge(src proto.Message) { - xxx_messageInfo_AttributeUnit.Merge(m, src) -} -func (m *AttributeUnit) XXX_Size() int { - return m.Size() -} -func (m *AttributeUnit) XXX_DiscardUnknown() { - xxx_messageInfo_AttributeUnit.DiscardUnknown(m) -} - -var xxx_messageInfo_AttributeUnit proto.InternalMessageInfo - -func (m *AttributeUnit) GetAttributeKeyStrindex() int32 { - if m != nil { - return m.AttributeKeyStrindex - } - return 0 -} - -func (m *AttributeUnit) GetUnitStrindex() int32 { - if m != nil { - return m.UnitStrindex - } - return 0 -} - -// A pointer from a profile Sample to a trace Span. -// Connects a profile sample to a trace span, identified by unique trace and span IDs. -type Link struct { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` -} - -func (m *Link) Reset() { *m = Link{} } -func (m *Link) String() string { return proto.CompactTextString(m) } -func (*Link) ProtoMessage() {} -func (*Link) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{5} -} -func (m *Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Link.Merge(m, src) -} -func (m *Link) XXX_Size() int { - return m.Size() -} -func (m *Link) XXX_DiscardUnknown() { - xxx_messageInfo_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Link proto.InternalMessageInfo - -// ValueType describes the type and units of a value, with an optional aggregation temporality. -type ValueType struct { - TypeStrindex int32 `protobuf:"varint,1,opt,name=type_strindex,json=typeStrindex,proto3" json:"type_strindex,omitempty"` - UnitStrindex int32 `protobuf:"varint,2,opt,name=unit_strindex,json=unitStrindex,proto3" json:"unit_strindex,omitempty"` - AggregationTemporality AggregationTemporality `protobuf:"varint,3,opt,name=aggregation_temporality,json=aggregationTemporality,proto3,enum=opentelemetry.proto.profiles.v1development.AggregationTemporality" json:"aggregation_temporality,omitempty"` -} - -func (m *ValueType) Reset() { *m = ValueType{} } -func (m *ValueType) String() string { return proto.CompactTextString(m) } -func (*ValueType) ProtoMessage() {} -func (*ValueType) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{6} -} -func (m *ValueType) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ValueType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ValueType.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ValueType) XXX_Merge(src proto.Message) { - xxx_messageInfo_ValueType.Merge(m, src) -} -func (m *ValueType) XXX_Size() int { - return m.Size() -} -func (m *ValueType) XXX_DiscardUnknown() { - xxx_messageInfo_ValueType.DiscardUnknown(m) -} - -var xxx_messageInfo_ValueType proto.InternalMessageInfo - -func (m *ValueType) GetTypeStrindex() int32 { - if m != nil { - return m.TypeStrindex - } - return 0 -} - -func (m *ValueType) GetUnitStrindex() int32 { - if m != nil { - return m.UnitStrindex - } - return 0 -} - -func (m *ValueType) GetAggregationTemporality() AggregationTemporality { - if m != nil { - return m.AggregationTemporality - } - return AggregationTemporality_AGGREGATION_TEMPORALITY_UNSPECIFIED -} - -// Each Sample records values encountered in some program -// context. The program context is typically a stack trace, perhaps -// augmented with auxiliary information like the thread-id, some -// indicator of a higher level request being handled etc. -type Sample struct { - // locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices. - LocationsStartIndex int32 `protobuf:"varint,1,opt,name=locations_start_index,json=locationsStartIndex,proto3" json:"locations_start_index,omitempty"` - // locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices. - // Supersedes location_index. - LocationsLength int32 `protobuf:"varint,2,opt,name=locations_length,json=locationsLength,proto3" json:"locations_length,omitempty"` - // The type and unit of each value is defined by the corresponding - // entry in Profile.sample_type. All samples must have the same - // number of values, the same as the length of Profile.sample_type. - // When aggregating multiple samples into a single sample, the - // result has a list of values that is the element-wise sum of the - // lists of the originals. - Value []int64 `protobuf:"varint,3,rep,packed,name=value,proto3" json:"value,omitempty"` - // References to attributes in Profile.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,4,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` - // Reference to link in Profile.link_table. [optional] - // - // Types that are valid to be assigned to LinkIndex_: - // *Sample_LinkIndex - LinkIndex_ isSample_LinkIndex_ `protobuf_oneof:"link_index_"` - // Timestamps associated with Sample represented in nanoseconds. These timestamps are expected - // to fall within the Profile's time range. [optional] - TimestampsUnixNano []uint64 `protobuf:"varint,6,rep,packed,name=timestamps_unix_nano,json=timestampsUnixNano,proto3" json:"timestamps_unix_nano,omitempty"` -} - -func (m *Sample) Reset() { *m = Sample{} } -func (m *Sample) String() string { return proto.CompactTextString(m) } -func (*Sample) ProtoMessage() {} -func (*Sample) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{7} -} -func (m *Sample) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sample) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Sample.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Sample) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sample.Merge(m, src) -} -func (m *Sample) XXX_Size() int { - return m.Size() -} -func (m *Sample) XXX_DiscardUnknown() { - xxx_messageInfo_Sample.DiscardUnknown(m) -} - -var xxx_messageInfo_Sample proto.InternalMessageInfo - -type isSample_LinkIndex_ interface { - isSample_LinkIndex_() - MarshalTo([]byte) (int, error) - Size() int -} - -type Sample_LinkIndex struct { - LinkIndex int32 `protobuf:"varint,5,opt,name=link_index,json=linkIndex,proto3,oneof" json:"link_index,omitempty"` -} - -func (*Sample_LinkIndex) isSample_LinkIndex_() {} - -func (m *Sample) GetLinkIndex_() isSample_LinkIndex_ { - if m != nil { - return m.LinkIndex_ - } - return nil -} - -func (m *Sample) GetLocationsStartIndex() int32 { - if m != nil { - return m.LocationsStartIndex - } - return 0 -} - -func (m *Sample) GetLocationsLength() int32 { - if m != nil { - return m.LocationsLength - } - return 0 -} - -func (m *Sample) GetValue() []int64 { - if m != nil { - return m.Value - } - return nil -} - -func (m *Sample) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -func (m *Sample) GetLinkIndex() int32 { - if x, ok := m.GetLinkIndex_().(*Sample_LinkIndex); ok { - return x.LinkIndex - } - return 0 -} - -func (m *Sample) GetTimestampsUnixNano() []uint64 { - if m != nil { - return m.TimestampsUnixNano - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Sample) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Sample_LinkIndex)(nil), - } -} - -// Describes the mapping of a binary in memory, including its address range, -// file offset, and metadata like build ID -type Mapping struct { - // Address at which the binary (or DLL) is loaded into memory. - MemoryStart uint64 `protobuf:"varint,1,opt,name=memory_start,json=memoryStart,proto3" json:"memory_start,omitempty"` - // The limit of the address range occupied by this mapping. - MemoryLimit uint64 `protobuf:"varint,2,opt,name=memory_limit,json=memoryLimit,proto3" json:"memory_limit,omitempty"` - // Offset in the binary that corresponds to the first mapped address. - FileOffset uint64 `protobuf:"varint,3,opt,name=file_offset,json=fileOffset,proto3" json:"file_offset,omitempty"` - // The object this entry is loaded from. This can be a filename on - // disk for the main binary and shared libraries, or virtual - // abstractions like "[vdso]". - FilenameStrindex int32 `protobuf:"varint,4,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` - // References to attributes in Profile.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` - // The following fields indicate the resolution of symbolic info. - HasFunctions bool `protobuf:"varint,6,opt,name=has_functions,json=hasFunctions,proto3" json:"has_functions,omitempty"` - HasFilenames bool `protobuf:"varint,7,opt,name=has_filenames,json=hasFilenames,proto3" json:"has_filenames,omitempty"` - HasLineNumbers bool `protobuf:"varint,8,opt,name=has_line_numbers,json=hasLineNumbers,proto3" json:"has_line_numbers,omitempty"` - HasInlineFrames bool `protobuf:"varint,9,opt,name=has_inline_frames,json=hasInlineFrames,proto3" json:"has_inline_frames,omitempty"` -} - -func (m *Mapping) Reset() { *m = Mapping{} } -func (m *Mapping) String() string { return proto.CompactTextString(m) } -func (*Mapping) ProtoMessage() {} -func (*Mapping) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{8} -} -func (m *Mapping) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Mapping.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Mapping) XXX_Merge(src proto.Message) { - xxx_messageInfo_Mapping.Merge(m, src) -} -func (m *Mapping) XXX_Size() int { - return m.Size() -} -func (m *Mapping) XXX_DiscardUnknown() { - xxx_messageInfo_Mapping.DiscardUnknown(m) -} - -var xxx_messageInfo_Mapping proto.InternalMessageInfo - -func (m *Mapping) GetMemoryStart() uint64 { - if m != nil { - return m.MemoryStart - } - return 0 -} - -func (m *Mapping) GetMemoryLimit() uint64 { - if m != nil { - return m.MemoryLimit - } - return 0 -} - -func (m *Mapping) GetFileOffset() uint64 { - if m != nil { - return m.FileOffset - } - return 0 -} - -func (m *Mapping) GetFilenameStrindex() int32 { - if m != nil { - return m.FilenameStrindex - } - return 0 -} - -func (m *Mapping) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -func (m *Mapping) GetHasFunctions() bool { - if m != nil { - return m.HasFunctions - } - return false -} - -func (m *Mapping) GetHasFilenames() bool { - if m != nil { - return m.HasFilenames - } - return false -} - -func (m *Mapping) GetHasLineNumbers() bool { - if m != nil { - return m.HasLineNumbers - } - return false -} - -func (m *Mapping) GetHasInlineFrames() bool { - if m != nil { - return m.HasInlineFrames - } - return false -} - -// Describes function and line table debug information. -type Location struct { - // Reference to mapping in Profile.mapping_table. - // It can be unset if the mapping is unknown or not applicable for - // this profile type. - // - // Types that are valid to be assigned to MappingIndex_: - // *Location_MappingIndex - MappingIndex_ isLocation_MappingIndex_ `protobuf_oneof:"mapping_index_"` - // The instruction address for this location, if available. It - // should be within [Mapping.memory_start...Mapping.memory_limit] - // for the corresponding mapping. A non-leaf address may be in the - // middle of a call instruction. It is up to display tools to find - // the beginning of the instruction if necessary. - Address uint64 `protobuf:"varint,2,opt,name=address,proto3" json:"address,omitempty"` - // Multiple line indicates this location has inlined functions, - // where the last entry represents the caller into which the - // preceding entries were inlined. - // - // E.g., if memcpy() is inlined into printf: - // line[0].function_name == "memcpy" - // line[1].function_name == "printf" - Line []*Line `protobuf:"bytes,3,rep,name=line,proto3" json:"line,omitempty"` - // Provides an indication that multiple symbols map to this location's - // address, for example due to identical code folding by the linker. In that - // case the line information above represents one of the multiple - // symbols. This field must be recomputed when the symbolization state of the - // profile changes. - IsFolded bool `protobuf:"varint,4,opt,name=is_folded,json=isFolded,proto3" json:"is_folded,omitempty"` - // References to attributes in Profile.attribute_table. [optional] - AttributeIndices []int32 `protobuf:"varint,5,rep,packed,name=attribute_indices,json=attributeIndices,proto3" json:"attribute_indices,omitempty"` -} - -func (m *Location) Reset() { *m = Location{} } -func (m *Location) String() string { return proto.CompactTextString(m) } -func (*Location) ProtoMessage() {} -func (*Location) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{9} -} -func (m *Location) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Location.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Location) XXX_Merge(src proto.Message) { - xxx_messageInfo_Location.Merge(m, src) -} -func (m *Location) XXX_Size() int { - return m.Size() -} -func (m *Location) XXX_DiscardUnknown() { - xxx_messageInfo_Location.DiscardUnknown(m) -} - -var xxx_messageInfo_Location proto.InternalMessageInfo - -type isLocation_MappingIndex_ interface { - isLocation_MappingIndex_() - MarshalTo([]byte) (int, error) - Size() int -} - -type Location_MappingIndex struct { - MappingIndex int32 `protobuf:"varint,1,opt,name=mapping_index,json=mappingIndex,proto3,oneof" json:"mapping_index,omitempty"` -} - -func (*Location_MappingIndex) isLocation_MappingIndex_() {} - -func (m *Location) GetMappingIndex_() isLocation_MappingIndex_ { - if m != nil { - return m.MappingIndex_ - } - return nil -} - -func (m *Location) GetMappingIndex() int32 { - if x, ok := m.GetMappingIndex_().(*Location_MappingIndex); ok { - return x.MappingIndex - } - return 0 -} - -func (m *Location) GetAddress() uint64 { - if m != nil { - return m.Address - } - return 0 -} - -func (m *Location) GetLine() []*Line { - if m != nil { - return m.Line - } - return nil -} - -func (m *Location) GetIsFolded() bool { - if m != nil { - return m.IsFolded - } - return false -} - -func (m *Location) GetAttributeIndices() []int32 { - if m != nil { - return m.AttributeIndices - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*Location) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*Location_MappingIndex)(nil), - } -} - -// Details a specific line in a source code, linked to a function. -type Line struct { - // Reference to function in Profile.function_table. - FunctionIndex int32 `protobuf:"varint,1,opt,name=function_index,json=functionIndex,proto3" json:"function_index,omitempty"` - // Line number in source code. - Line int64 `protobuf:"varint,2,opt,name=line,proto3" json:"line,omitempty"` - // Column number in source code. - Column int64 `protobuf:"varint,3,opt,name=column,proto3" json:"column,omitempty"` -} - -func (m *Line) Reset() { *m = Line{} } -func (m *Line) String() string { return proto.CompactTextString(m) } -func (*Line) ProtoMessage() {} -func (*Line) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{10} -} -func (m *Line) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Line) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Line.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Line) XXX_Merge(src proto.Message) { - xxx_messageInfo_Line.Merge(m, src) -} -func (m *Line) XXX_Size() int { - return m.Size() -} -func (m *Line) XXX_DiscardUnknown() { - xxx_messageInfo_Line.DiscardUnknown(m) -} - -var xxx_messageInfo_Line proto.InternalMessageInfo - -func (m *Line) GetFunctionIndex() int32 { - if m != nil { - return m.FunctionIndex - } - return 0 -} - -func (m *Line) GetLine() int64 { - if m != nil { - return m.Line - } - return 0 -} - -func (m *Line) GetColumn() int64 { - if m != nil { - return m.Column - } - return 0 -} - -// Describes a function, including its human-readable name, system name, -// source file, and starting line number in the source. -type Function struct { - // Name of the function, in human-readable form if available. - NameStrindex int32 `protobuf:"varint,1,opt,name=name_strindex,json=nameStrindex,proto3" json:"name_strindex,omitempty"` - // Name of the function, as identified by the system. - // For instance, it can be a C++ mangled name. - SystemNameStrindex int32 `protobuf:"varint,2,opt,name=system_name_strindex,json=systemNameStrindex,proto3" json:"system_name_strindex,omitempty"` - // Source file containing the function. - FilenameStrindex int32 `protobuf:"varint,3,opt,name=filename_strindex,json=filenameStrindex,proto3" json:"filename_strindex,omitempty"` - // Line number in source file. - StartLine int64 `protobuf:"varint,4,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"` -} - -func (m *Function) Reset() { *m = Function{} } -func (m *Function) String() string { return proto.CompactTextString(m) } -func (*Function) ProtoMessage() {} -func (*Function) Descriptor() ([]byte, []int) { - return fileDescriptor_ddd0cf081a2fe76f, []int{11} -} -func (m *Function) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Function) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Function.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Function) XXX_Merge(src proto.Message) { - xxx_messageInfo_Function.Merge(m, src) -} -func (m *Function) XXX_Size() int { - return m.Size() -} -func (m *Function) XXX_DiscardUnknown() { - xxx_messageInfo_Function.DiscardUnknown(m) -} - -var xxx_messageInfo_Function proto.InternalMessageInfo - -func (m *Function) GetNameStrindex() int32 { - if m != nil { - return m.NameStrindex - } - return 0 -} - -func (m *Function) GetSystemNameStrindex() int32 { - if m != nil { - return m.SystemNameStrindex - } - return 0 -} - -func (m *Function) GetFilenameStrindex() int32 { - if m != nil { - return m.FilenameStrindex - } - return 0 -} - -func (m *Function) GetStartLine() int64 { - if m != nil { - return m.StartLine - } - return 0 -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.profiles.v1development.AggregationTemporality", AggregationTemporality_name, AggregationTemporality_value) - proto.RegisterType((*ProfilesData)(nil), "opentelemetry.proto.profiles.v1development.ProfilesData") - proto.RegisterType((*ResourceProfiles)(nil), "opentelemetry.proto.profiles.v1development.ResourceProfiles") - proto.RegisterType((*ScopeProfiles)(nil), "opentelemetry.proto.profiles.v1development.ScopeProfiles") - proto.RegisterType((*Profile)(nil), "opentelemetry.proto.profiles.v1development.Profile") - proto.RegisterType((*AttributeUnit)(nil), "opentelemetry.proto.profiles.v1development.AttributeUnit") - proto.RegisterType((*Link)(nil), "opentelemetry.proto.profiles.v1development.Link") - proto.RegisterType((*ValueType)(nil), "opentelemetry.proto.profiles.v1development.ValueType") - proto.RegisterType((*Sample)(nil), "opentelemetry.proto.profiles.v1development.Sample") - proto.RegisterType((*Mapping)(nil), "opentelemetry.proto.profiles.v1development.Mapping") - proto.RegisterType((*Location)(nil), "opentelemetry.proto.profiles.v1development.Location") - proto.RegisterType((*Line)(nil), "opentelemetry.proto.profiles.v1development.Line") - proto.RegisterType((*Function)(nil), "opentelemetry.proto.profiles.v1development.Function") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/profiles/v1development/profiles.proto", fileDescriptor_ddd0cf081a2fe76f) -} - -var fileDescriptor_ddd0cf081a2fe76f = []byte{ - // 1591 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x58, 0xdb, 0x6f, 0x13, 0x57, - 0x1a, 0xcf, 0xd8, 0x8e, 0x2f, 0x9f, 0x2f, 0x71, 0x0e, 0x21, 0xcc, 0xb2, 0x4b, 0x62, 0x8c, 0x58, - 0x4c, 0x56, 0x24, 0x24, 0xb0, 0x2b, 0xd0, 0xae, 0xb4, 0x9b, 0xc4, 0x09, 0x18, 0x42, 0x92, 0x9d, - 0x38, 0x51, 0x69, 0x91, 0xa6, 0x27, 0x9e, 0x63, 0x67, 0xca, 0xdc, 0x34, 0xe7, 0x38, 0xc2, 0xea, - 0xbf, 0xc0, 0x43, 0xff, 0x8e, 0x4a, 0xfd, 0x1b, 0xfa, 0xca, 0x23, 0xea, 0x13, 0xea, 0x03, 0xaa, - 0xe0, 0x85, 0x56, 0xea, 0x6b, 0x9f, 0xab, 0x73, 0x99, 0xb1, 0x9d, 0x3a, 0x82, 0xe9, 0x4b, 0x34, - 0xe7, 0x3b, 0xbf, 0xf3, 0x3b, 0xdf, 0xfd, 0x3b, 0x0e, 0xdc, 0xf7, 0x03, 0xe2, 0x31, 0xe2, 0x10, - 0x97, 0xb0, 0x70, 0xb0, 0x12, 0x84, 0x3e, 0xf3, 0xf9, 0xdf, 0xae, 0xed, 0x10, 0xba, 0x72, 0xba, - 0x6a, 0x91, 0x53, 0xe2, 0xf8, 0x81, 0x4b, 0x3c, 0x16, 0x8b, 0x97, 0x05, 0x0a, 0x2d, 0x8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, 0x43, 0x2e, - 0x26, 0xe7, 0x6b, 0x66, 0x72, 0xbe, 0xa2, 0x45, 0xd5, 0x7d, 0xa5, 0x5a, 0xd3, 0xfc, 0x9e, 0x87, - 0x53, 0xb2, 0x9b, 0x4a, 0x75, 0x6e, 0xc3, 0x1c, 0x6f, 0x8c, 0x94, 0x61, 0x37, 0xa0, 0x7c, 0x06, - 0xbc, 0x10, 0x2d, 0x51, 0x4c, 0xaf, 0x8c, 0x81, 0x86, 0x7b, 0x87, 0x9e, 0xfd, 0x82, 0xf7, 0xc5, - 0x8d, 0x32, 0x14, 0x87, 0x94, 0x66, 0xfd, 0x97, 0x14, 0xe4, 0xd4, 0x68, 0xe6, 0xad, 0xd9, 0x25, - 0xae, 0x1f, 0x0e, 0xa4, 0x33, 0x84, 0x1b, 0x32, 0x46, 0x51, 0xca, 0x84, 0x0f, 0x46, 0x20, 0x8e, - 0xed, 0xda, 0x4c, 0x98, 0x1e, 0x43, 0x76, 0xb8, 0x08, 0x2d, 0x42, 0x51, 0xb4, 0x23, 0xbf, 0xdb, - 0xa5, 0x84, 0x89, 0x88, 0x66, 0x0c, 0xe0, 0xa2, 0x3d, 0x21, 0xe1, 0x1e, 0xe0, 0x2b, 0x0f, 0xbb, - 0x23, 0xc9, 0x94, 0x11, 0x3e, 0xac, 0x46, 0x1b, 0x71, 0xae, 0x4c, 0x74, 0xd7, 0xf4, 0x39, 0xee, - 0xba, 0x06, 0xe5, 0x13, 0x4c, 0xcd, 0x68, 0xfa, 0x52, 0x3d, 0x5b, 0xd3, 0x1a, 0x79, 0xa3, 0x74, - 0x82, 0x69, 0x34, 0x9b, 0x87, 0x20, 0x75, 0x13, 0xd5, 0x73, 0x43, 0x50, 0x24, 0x43, 0x0d, 0xa8, - 0x72, 0x90, 0x63, 0x7b, 0xc4, 0xf4, 0xfa, 0xee, 0x31, 0x09, 0xf9, 0x6c, 0xe5, 0xb8, 0xca, 0x09, - 0xa6, 0x3b, 0xb6, 0x47, 0x76, 0xa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, 0xc1, 0xd2, 0x4b, 0x0d, - 0xe6, 0x27, 0x77, 0x2a, 0x74, 0x03, 0xae, 0xad, 0x3f, 0x78, 0x60, 0x6c, 0x3d, 0x58, 0x6f, 0xb7, - 0xf6, 0x76, 0xcd, 0xf6, 0xd6, 0x93, 0xfd, 0x3d, 0x63, 0x7d, 0xa7, 0xd5, 0x7e, 0x6a, 0x1e, 0xee, - 0x1e, 0xec, 0x6f, 0x6d, 0xb6, 0xb6, 0x5b, 0x5b, 0xcd, 0xea, 0x14, 0xba, 0x0a, 0x57, 0xce, 0x03, - 0x36, 0xb7, 0x76, 0xda, 0xeb, 0x55, 0x0d, 0xfd, 0x1d, 0xea, 0xe7, 0x41, 0x36, 0x0f, 0x9f, 0x1c, - 0xee, 0xac, 0xb7, 0x5b, 0x47, 0x5b, 0xd5, 0xd4, 0xc6, 0x1b, 0xed, 0xd5, 0xbb, 0x05, 0xed, 0xf5, - 0xbb, 0x05, 0xed, 0xa7, 0x77, 0x0b, 0xda, 0x37, 0xef, 0x17, 0xa6, 0x5e, 0xbf, 0x5f, 0x98, 0x7a, - 0xf3, 0x7e, 0x61, 0x0a, 0x6e, 0xd9, 0x7e, 0x82, 0x54, 0xda, 0x28, 0x47, 0x3f, 0xcb, 0xf6, 0x39, - 0x6a, 0x5f, 0xfb, 0xfc, 0xff, 0x89, 0xe7, 0x8e, 0xfc, 0xa5, 0xdd, 0x23, 0xde, 0x39, 0xff, 0x15, - 0xf8, 0x36, 0xb5, 0xb4, 0x17, 0x10, 0xaf, 0x1d, 0x13, 0x8a, 0xab, 0xa2, 0xb7, 0x0a, 0x5d, 0x3e, - 0x5a, 0x6d, 0x0e, 0xc1, 0xc7, 0x59, 0xc1, 0x76, 0xe7, 0xf7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, - 0x20, 0xd9, 0xad, 0x77, 0x10, 0x00, 0x00, -} - -func (m *ProfilesData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProfilesData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProfilesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for iNdEx := len(m.ResourceProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeProfiles) > 0 { - for iNdEx := len(m.ScopeProfiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeProfiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeProfiles) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeProfiles) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeProfiles) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Profiles) > 0 { - for iNdEx := len(m.Profiles) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Profiles[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Profile) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Profile) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttributeIndices) > 0 { - dAtA4 := make([]byte, len(m.AttributeIndices)*10) - var j3 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA4[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA4[j3] = uint8(num) - j3++ - } - i -= j3 - copy(dAtA[i:], dAtA4[:j3]) - i = encodeVarintProfiles(dAtA, i, uint64(j3)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb2 - } - if len(m.OriginalPayload) > 0 { - i -= len(m.OriginalPayload) - copy(dAtA[i:], m.OriginalPayload) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayload))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - if len(m.OriginalPayloadFormat) > 0 { - i -= len(m.OriginalPayloadFormat) - copy(dAtA[i:], m.OriginalPayloadFormat) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.OriginalPayloadFormat))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x98 - } - { - size := m.ProfileId.Size() - i -= size - if _, err := m.ProfileId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x8a - if m.DefaultSampleTypeStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DefaultSampleTypeStrindex)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - if len(m.CommentStrindices) > 0 { - dAtA6 := make([]byte, len(m.CommentStrindices)*10) - var j5 int - for _, num1 := range m.CommentStrindices { - num := uint64(num1) - for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j5++ - } - dAtA6[j5] = uint8(num) - j5++ - } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintProfiles(dAtA, i, uint64(j5)) - i-- - dAtA[i] = 0x7a - } - if m.Period != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Period)) - i-- - dAtA[i] = 0x70 - } - { - size, err := m.PeriodType.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - if m.DurationNanos != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.DurationNanos)) - i-- - dAtA[i] = 0x60 - } - if m.TimeNanos != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.TimeNanos)) - i-- - dAtA[i] = 0x58 - } - if len(m.StringTable) > 0 { - for iNdEx := len(m.StringTable) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StringTable[iNdEx]) - copy(dAtA[i:], m.StringTable[iNdEx]) - i = encodeVarintProfiles(dAtA, i, uint64(len(m.StringTable[iNdEx]))) - i-- - dAtA[i] = 0x52 - } - } - if len(m.LinkTable) > 0 { - for iNdEx := len(m.LinkTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LinkTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.AttributeUnits) > 0 { - for iNdEx := len(m.AttributeUnits) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AttributeUnits[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.AttributeTable) > 0 { - for iNdEx := len(m.AttributeTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AttributeTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.FunctionTable) > 0 { - for iNdEx := len(m.FunctionTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.FunctionTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if len(m.LocationIndices) > 0 { - dAtA9 := make([]byte, len(m.LocationIndices)*10) - var j8 int - for _, num1 := range m.LocationIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA9[j8] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j8++ - } - dAtA9[j8] = uint8(num) - j8++ - } - i -= j8 - copy(dAtA[i:], dAtA9[:j8]) - i = encodeVarintProfiles(dAtA, i, uint64(j8)) - i-- - dAtA[i] = 0x2a - } - if len(m.LocationTable) > 0 { - for iNdEx := len(m.LocationTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LocationTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.MappingTable) > 0 { - for iNdEx := len(m.MappingTable) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.MappingTable[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Sample) > 0 { - for iNdEx := len(m.Sample) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Sample[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.SampleType) > 0 { - for iNdEx := len(m.SampleType) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SampleType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AttributeUnit) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AttributeUnit) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AttributeUnit) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UnitStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.AttributeKeyStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.AttributeKeyStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ValueType) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValueType) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValueType) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationTemporality != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.AggregationTemporality)) - i-- - dAtA[i] = 0x18 - } - if m.UnitStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.UnitStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.TypeStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.TypeStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Sample) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Sample) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sample) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TimestampsUnixNano) > 0 { - dAtA11 := make([]byte, len(m.TimestampsUnixNano)*10) - var j10 int - for _, num := range m.TimestampsUnixNano { - for num >= 1<<7 { - dAtA11[j10] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j10++ - } - dAtA11[j10] = uint8(num) - j10++ - } - i -= j10 - copy(dAtA[i:], dAtA11[:j10]) - i = encodeVarintProfiles(dAtA, i, uint64(j10)) - i-- - dAtA[i] = 0x32 - } - if m.LinkIndex_ != nil { - { - size := m.LinkIndex_.Size() - i -= size - if _, err := m.LinkIndex_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - if len(m.AttributeIndices) > 0 { - dAtA13 := make([]byte, len(m.AttributeIndices)*10) - var j12 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA13[j12] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j12++ - } - dAtA13[j12] = uint8(num) - j12++ - } - i -= j12 - copy(dAtA[i:], dAtA13[:j12]) - i = encodeVarintProfiles(dAtA, i, uint64(j12)) - i-- - dAtA[i] = 0x22 - } - if len(m.Value) > 0 { - dAtA15 := make([]byte, len(m.Value)*10) - var j14 int - for _, num1 := range m.Value { - num := uint64(num1) - for num >= 1<<7 { - dAtA15[j14] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j14++ - } - dAtA15[j14] = uint8(num) - j14++ - } - i -= j14 - copy(dAtA[i:], dAtA15[:j14]) - i = encodeVarintProfiles(dAtA, i, uint64(j14)) - i-- - dAtA[i] = 0x1a - } - if m.LocationsLength != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsLength)) - i-- - dAtA[i] = 0x10 - } - if m.LocationsStartIndex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.LocationsStartIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Sample_LinkIndex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Sample_LinkIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProfiles(dAtA, i, uint64(m.LinkIndex)) - i-- - dAtA[i] = 0x28 - return len(dAtA) - i, nil -} -func (m *Mapping) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Mapping) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Mapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasInlineFrames { - i-- - if m.HasInlineFrames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - } - if m.HasLineNumbers { - i-- - if m.HasLineNumbers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x40 - } - if m.HasFilenames { - i-- - if m.HasFilenames { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - } - if m.HasFunctions { - i-- - if m.HasFunctions { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - if len(m.AttributeIndices) > 0 { - dAtA17 := make([]byte, len(m.AttributeIndices)*10) - var j16 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA17[j16] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j16++ - } - dAtA17[j16] = uint8(num) - j16++ - } - i -= j16 - copy(dAtA[i:], dAtA17[:j16]) - i = encodeVarintProfiles(dAtA, i, uint64(j16)) - i-- - dAtA[i] = 0x2a - } - if m.FilenameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) - i-- - dAtA[i] = 0x20 - } - if m.FileOffset != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FileOffset)) - i-- - dAtA[i] = 0x18 - } - if m.MemoryLimit != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryLimit)) - i-- - dAtA[i] = 0x10 - } - if m.MemoryStart != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.MemoryStart)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Location) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Location) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Location) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AttributeIndices) > 0 { - dAtA19 := make([]byte, len(m.AttributeIndices)*10) - var j18 int - for _, num1 := range m.AttributeIndices { - num := uint64(num1) - for num >= 1<<7 { - dAtA19[j18] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j18++ - } - dAtA19[j18] = uint8(num) - j18++ - } - i -= j18 - copy(dAtA[i:], dAtA19[:j18]) - i = encodeVarintProfiles(dAtA, i, uint64(j18)) - i-- - dAtA[i] = 0x2a - } - if m.IsFolded { - i-- - if m.IsFolded { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - } - if len(m.Line) > 0 { - for iNdEx := len(m.Line) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Line[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProfiles(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Address != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Address)) - i-- - dAtA[i] = 0x10 - } - if m.MappingIndex_ != nil { - { - size := m.MappingIndex_.Size() - i -= size - if _, err := m.MappingIndex_.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } - } - return len(dAtA) - i, nil -} - -func (m *Location_MappingIndex) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Location_MappingIndex) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProfiles(dAtA, i, uint64(m.MappingIndex)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} -func (m *Line) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Line) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Line) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Column != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Column)) - i-- - dAtA[i] = 0x18 - } - if m.Line != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.Line)) - i-- - dAtA[i] = 0x10 - } - if m.FunctionIndex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FunctionIndex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Function) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Function) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Function) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.StartLine != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.StartLine)) - i-- - dAtA[i] = 0x20 - } - if m.FilenameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.FilenameStrindex)) - i-- - dAtA[i] = 0x18 - } - if m.SystemNameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.SystemNameStrindex)) - i-- - dAtA[i] = 0x10 - } - if m.NameStrindex != 0 { - i = encodeVarintProfiles(dAtA, i, uint64(m.NameStrindex)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintProfiles(dAtA []byte, offset int, v uint64) int { - offset -= sovProfiles(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ProfilesData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceProfiles) > 0 { - for _, e := range m.ResourceProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - return n -} - -func (m *ResourceProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.ScopeProfiles) > 0 { - for _, e := range m.ScopeProfiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func (m *ScopeProfiles) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovProfiles(uint64(l)) - if len(m.Profiles) > 0 { - for _, e := range m.Profiles { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovProfiles(uint64(l)) - } - return n -} - -func (m *Profile) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SampleType) > 0 { - for _, e := range m.SampleType { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.Sample) > 0 { - for _, e := range m.Sample { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.MappingTable) > 0 { - for _, e := range m.MappingTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LocationTable) > 0 { - for _, e := range m.LocationTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LocationIndices) > 0 { - l = 0 - for _, e := range m.LocationIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if len(m.FunctionTable) > 0 { - for _, e := range m.FunctionTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.AttributeTable) > 0 { - for _, e := range m.AttributeTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.AttributeUnits) > 0 { - for _, e := range m.AttributeUnits { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.LinkTable) > 0 { - for _, e := range m.LinkTable { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if len(m.StringTable) > 0 { - for _, s := range m.StringTable { - l = len(s) - n += 1 + l + sovProfiles(uint64(l)) - } - } - if m.TimeNanos != 0 { - n += 1 + sovProfiles(uint64(m.TimeNanos)) - } - if m.DurationNanos != 0 { - n += 1 + sovProfiles(uint64(m.DurationNanos)) - } - l = m.PeriodType.Size() - n += 1 + l + sovProfiles(uint64(l)) - if m.Period != 0 { - n += 1 + sovProfiles(uint64(m.Period)) - } - if len(m.CommentStrindices) > 0 { - l = 0 - for _, e := range m.CommentStrindices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.DefaultSampleTypeStrindex != 0 { - n += 2 + sovProfiles(uint64(m.DefaultSampleTypeStrindex)) - } - l = m.ProfileId.Size() - n += 2 + l + sovProfiles(uint64(l)) - if m.DroppedAttributesCount != 0 { - n += 2 + sovProfiles(uint64(m.DroppedAttributesCount)) - } - l = len(m.OriginalPayloadFormat) - if l > 0 { - n += 2 + l + sovProfiles(uint64(l)) - } - l = len(m.OriginalPayload) - if l > 0 { - n += 2 + l + sovProfiles(uint64(l)) - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 2 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *AttributeUnit) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AttributeKeyStrindex != 0 { - n += 1 + sovProfiles(uint64(m.AttributeKeyStrindex)) - } - if m.UnitStrindex != 0 { - n += 1 + sovProfiles(uint64(m.UnitStrindex)) - } - return n -} - -func (m *Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovProfiles(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovProfiles(uint64(l)) - return n -} - -func (m *ValueType) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TypeStrindex != 0 { - n += 1 + sovProfiles(uint64(m.TypeStrindex)) - } - if m.UnitStrindex != 0 { - n += 1 + sovProfiles(uint64(m.UnitStrindex)) - } - if m.AggregationTemporality != 0 { - n += 1 + sovProfiles(uint64(m.AggregationTemporality)) - } - return n -} - -func (m *Sample) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LocationsStartIndex != 0 { - n += 1 + sovProfiles(uint64(m.LocationsStartIndex)) - } - if m.LocationsLength != 0 { - n += 1 + sovProfiles(uint64(m.LocationsLength)) - } - if len(m.Value) > 0 { - l = 0 - for _, e := range m.Value { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.LinkIndex_ != nil { - n += m.LinkIndex_.Size() - } - if len(m.TimestampsUnixNano) > 0 { - l = 0 - for _, e := range m.TimestampsUnixNano { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *Sample_LinkIndex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProfiles(uint64(m.LinkIndex)) - return n -} -func (m *Mapping) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MemoryStart != 0 { - n += 1 + sovProfiles(uint64(m.MemoryStart)) - } - if m.MemoryLimit != 0 { - n += 1 + sovProfiles(uint64(m.MemoryLimit)) - } - if m.FileOffset != 0 { - n += 1 + sovProfiles(uint64(m.FileOffset)) - } - if m.FilenameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.FilenameStrindex)) - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - if m.HasFunctions { - n += 2 - } - if m.HasFilenames { - n += 2 - } - if m.HasLineNumbers { - n += 2 - } - if m.HasInlineFrames { - n += 2 - } - return n -} - -func (m *Location) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.MappingIndex_ != nil { - n += m.MappingIndex_.Size() - } - if m.Address != 0 { - n += 1 + sovProfiles(uint64(m.Address)) - } - if len(m.Line) > 0 { - for _, e := range m.Line { - l = e.Size() - n += 1 + l + sovProfiles(uint64(l)) - } - } - if m.IsFolded { - n += 2 - } - if len(m.AttributeIndices) > 0 { - l = 0 - for _, e := range m.AttributeIndices { - l += sovProfiles(uint64(e)) - } - n += 1 + sovProfiles(uint64(l)) + l - } - return n -} - -func (m *Location_MappingIndex) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProfiles(uint64(m.MappingIndex)) - return n -} -func (m *Line) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.FunctionIndex != 0 { - n += 1 + sovProfiles(uint64(m.FunctionIndex)) - } - if m.Line != 0 { - n += 1 + sovProfiles(uint64(m.Line)) - } - if m.Column != 0 { - n += 1 + sovProfiles(uint64(m.Column)) - } - return n -} - -func (m *Function) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.NameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.NameStrindex)) - } - if m.SystemNameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.SystemNameStrindex)) - } - if m.FilenameStrindex != 0 { - n += 1 + sovProfiles(uint64(m.FilenameStrindex)) - } - if m.StartLine != 0 { - n += 1 + sovProfiles(uint64(m.StartLine)) - } - return n -} - -func sovProfiles(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProfiles(x uint64) (n int) { - return sovProfiles(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *ProfilesData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProfilesData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProfilesData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceProfiles = append(m.ResourceProfiles, &ResourceProfiles{}) - if err := m.ResourceProfiles[len(m.ResourceProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeProfiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeProfiles = append(m.ScopeProfiles, &ScopeProfiles{}) - if err := m.ScopeProfiles[len(m.ScopeProfiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeProfiles) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeProfiles: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeProfiles: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Profiles", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Profiles = append(m.Profiles, &Profile{}) - if err := m.Profiles[len(m.Profiles)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Profile) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Profile: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Profile: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SampleType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SampleType = append(m.SampleType, &ValueType{}) - if err := m.SampleType[len(m.SampleType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sample", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sample = append(m.Sample, &Sample{}) - if err := m.Sample[len(m.Sample)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MappingTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MappingTable = append(m.MappingTable, &Mapping{}) - if err := m.MappingTable[len(m.MappingTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LocationTable = append(m.LocationTable, &Location{}) - if err := m.LocationTable[len(m.LocationTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.LocationIndices) == 0 { - m.LocationIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LocationIndices = append(m.LocationIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field LocationIndices", wireType) - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FunctionTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FunctionTable = append(m.FunctionTable, &Function{}) - if err := m.FunctionTable[len(m.FunctionTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttributeTable = append(m.AttributeTable, v11.KeyValue{}) - if err := m.AttributeTable[len(m.AttributeTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeUnits", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttributeUnits = append(m.AttributeUnits, &AttributeUnit{}) - if err := m.AttributeUnits[len(m.AttributeUnits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LinkTable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LinkTable = append(m.LinkTable, &Link{}) - if err := m.LinkTable[len(m.LinkTable)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StringTable", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StringTable = append(m.StringTable, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeNanos", wireType) - } - m.TimeNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TimeNanos |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationNanos", wireType) - } - m.DurationNanos = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationNanos |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PeriodType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PeriodType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Period", wireType) - } - m.Period = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Period |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CommentStrindices = append(m.CommentStrindices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.CommentStrindices) == 0 { - m.CommentStrindices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CommentStrindices = append(m.CommentStrindices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field CommentStrindices", wireType) - } - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultSampleTypeStrindex", wireType) - } - m.DefaultSampleTypeStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DefaultSampleTypeStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 17: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProfileId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProfileId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 19: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayloadFormat", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayloadFormat = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginalPayload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginalPayload = append(m.OriginalPayload[:0], dAtA[iNdEx:postIndex]...) - if m.OriginalPayload == nil { - m.OriginalPayload = []byte{} - } - iNdEx = postIndex - case 22: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AttributeUnit) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AttributeUnit: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AttributeUnit: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeKeyStrindex", wireType) - } - m.AttributeKeyStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AttributeKeyStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) - } - m.UnitStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnitStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValueType) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValueType: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValueType: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TypeStrindex", wireType) - } - m.TypeStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TypeStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnitStrindex", wireType) - } - m.UnitStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnitStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationTemporality", wireType) - } - m.AggregationTemporality = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AggregationTemporality |= AggregationTemporality(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sample) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sample: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sample: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsStartIndex", wireType) - } - m.LocationsStartIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsStartIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LocationsLength", wireType) - } - m.LocationsLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LocationsLength |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType == 0 { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = append(m.Value, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.Value) == 0 { - m.Value = make([]int64, 0, elementCount) - } - for iNdEx < postIndex { - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Value = append(m.Value, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - case 4: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LinkIndex", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LinkIndex_ = &Sample_LinkIndex{v} - case 6: - if wireType == 0 { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.TimestampsUnixNano) == 0 { - m.TimestampsUnixNano = make([]uint64, 0, elementCount) - } - for iNdEx < postIndex { - var v uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimestampsUnixNano = append(m.TimestampsUnixNano, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field TimestampsUnixNano", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Mapping) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Mapping: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Mapping: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryStart", wireType) - } - m.MemoryStart = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryStart |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MemoryLimit", wireType) - } - m.MemoryLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MemoryLimit |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FileOffset", wireType) - } - m.FileOffset = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FileOffset |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) - } - m.FilenameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FilenameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasFunctions", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasFunctions = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasFilenames", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasFilenames = bool(v != 0) - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasLineNumbers", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasLineNumbers = bool(v != 0) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HasInlineFrames", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.HasInlineFrames = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Location) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Location: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Location: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MappingIndex", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MappingIndex_ = &Location_MappingIndex{v} - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - m.Address = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Address |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Line = append(m.Line, &Line{}) - if err := m.Line[len(m.Line)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsFolded", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsFolded = bool(v != 0) - case 5: - if wireType == 0 { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthProfiles - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthProfiles - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(m.AttributeIndices) == 0 { - m.AttributeIndices = make([]int32, 0, elementCount) - } - for iNdEx < postIndex { - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AttributeIndices = append(m.AttributeIndices, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeIndices", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Line) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Line: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Line: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FunctionIndex", wireType) - } - m.FunctionIndex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FunctionIndex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Line", wireType) - } - m.Line = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Line |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Column", wireType) - } - m.Column = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Column |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Function) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Function: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Function: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NameStrindex", wireType) - } - m.NameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SystemNameStrindex", wireType) - } - m.SystemNameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SystemNameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FilenameStrindex", wireType) - } - m.FilenameStrindex = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FilenameStrindex |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartLine", wireType) - } - m.StartLine = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProfiles - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartLine |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProfiles(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthProfiles - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipProfiles(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowProfiles - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthProfiles - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProfiles - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthProfiles - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthProfiles = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProfiles = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProfiles = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go deleted file mode 100644 index d4d1565c76..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1/resource.pb.go +++ /dev/null @@ -1,381 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/resource/v1/resource.proto - -package v1 - -import ( - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Resource information. -type Resource struct { - // Set of attributes that describe the resource. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v1.KeyValue `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, then - // no attributes were dropped. - DroppedAttributesCount uint32 `protobuf:"varint,2,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` -} - -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_446f73eacf88f3f5, []int{0} -} -func (m *Resource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Resource.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Resource) XXX_Merge(src proto.Message) { - xxx_messageInfo_Resource.Merge(m, src) -} -func (m *Resource) XXX_Size() int { - return m.Size() -} -func (m *Resource) XXX_DiscardUnknown() { - xxx_messageInfo_Resource.DiscardUnknown(m) -} - -var xxx_messageInfo_Resource proto.InternalMessageInfo - -func (m *Resource) GetAttributes() []v1.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Resource) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func init() { - proto.RegisterType((*Resource)(nil), "opentelemetry.proto.resource.v1.Resource") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/resource/v1/resource.proto", fileDescriptor_446f73eacf88f3f5) -} - -var fileDescriptor_446f73eacf88f3f5 = []byte{ - // 302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2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0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x81, - 0x4b, 0x29, 0x33, 0x5f, 0x8f, 0x40, 0xb0, 0x38, 0xf1, 0xc2, 0x7c, 0x14, 0x00, 0x92, 0x0a, 0x60, - 0x8c, 0x72, 0x4b, 0x47, 0xd7, 0x94, 0x09, 0x0a, 0x91, 0x9c, 0x9c, 0xd4, 0xe4, 0x92, 0xfc, 0x22, - 0xfd, 0x82, 0x94, 0xc4, 0x92, 0x44, 0xfd, 0xcc, 0xbc, 0x92, 0xd4, 0xa2, 0xbc, 0xc4, 0x1c, 0x7d, - 0x30, 0x0f, 0x6c, 0x6a, 0x7a, 0x6a, 0x1e, 0x72, 0xfc, 0xac, 0x62, 0x92, 0xf7, 0x2f, 0x48, 0xcd, - 0x0b, 0x81, 0x9b, 0x02, 0x36, 0x5f, 0x0f, 0x66, 0x9b, 0x5e, 0x98, 0x61, 0x12, 0x1b, 0x58, 0x9f, - 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x8b, 0xcf, 0x38, 0xeb, 0x01, 0x00, 0x00, -} - -func (m *Resource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Resource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Resource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DroppedAttributesCount != 0 { - i = encodeVarintResource(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x10 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintResource(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintResource(dAtA []byte, offset int, v uint64) int { - offset -= sovResource(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Resource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovResource(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovResource(uint64(m.DroppedAttributesCount)) - } - return n -} - -func sovResource(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozResource(x uint64) (n int) { - return sovResource(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Resource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Resource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthResource - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthResource - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v1.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowResource - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipResource(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthResource - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipResource(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowResource - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthResource - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupResource - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthResource - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthResource = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowResource = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupResource = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go deleted file mode 100644 index b0bddfb985..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1/trace.pb.go +++ /dev/null @@ -1,3045 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: opentelemetry/proto/trace/v1/trace.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/gogo/protobuf/proto" - - go_opentelemetry_io_collector_pdata_internal_data "go.opentelemetry.io/collector/pdata/internal/data" - v11 "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" - v1 "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// SpanFlags represents constants used to interpret the -// Span.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) -// -// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. -// -// Note that Span flags were introduced in version 1.1 of the -// OpenTelemetry protocol. Older Span producers do not set this -// field, consequently consumers should not rely on the absence of a -// particular flag bit to indicate the presence of a particular feature. -type SpanFlags int32 - -const ( - // The zero value for the enum. Should not be used for comparisons. - // Instead use bitwise "and" with the appropriate mask as shown above. - SpanFlags_SPAN_FLAGS_DO_NOT_USE SpanFlags = 0 - // Bits 0-7 are used for trace flags. - SpanFlags_SPAN_FLAGS_TRACE_FLAGS_MASK SpanFlags = 255 - // Bits 8 and 9 are used to indicate that the parent span or link span is remote. - // Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. - // Bit 9 (`IS_REMOTE`) indicates whether the span or link is remote. - SpanFlags_SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK SpanFlags = 256 - SpanFlags_SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK SpanFlags = 512 -) - -var SpanFlags_name = map[int32]string{ - 0: "SPAN_FLAGS_DO_NOT_USE", - 255: "SPAN_FLAGS_TRACE_FLAGS_MASK", - 256: "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK", - 512: "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK", -} - -var SpanFlags_value = map[string]int32{ - "SPAN_FLAGS_DO_NOT_USE": 0, - "SPAN_FLAGS_TRACE_FLAGS_MASK": 255, - "SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK": 256, - "SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK": 512, -} - -func (x SpanFlags) String() string { - return proto.EnumName(SpanFlags_name, int32(x)) -} - -func (SpanFlags) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{0} -} - -// SpanKind is the 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. Do NOT use as default. - // Implementations MAY assume SpanKind to be INTERNAL when receiving UNSPECIFIED. - Span_SPAN_KIND_UNSPECIFIED Span_SpanKind = 0 - // Indicates that the span represents an internal operation within an application, - // as opposed to an operation happening at the boundaries. Default value. - Span_SPAN_KIND_INTERNAL Span_SpanKind = 1 - // Indicates that the span covers server-side handling of an RPC or other - // remote network request. - Span_SPAN_KIND_SERVER Span_SpanKind = 2 - // Indicates that the span describes a request to some remote service. - Span_SPAN_KIND_CLIENT Span_SpanKind = 3 - // Indicates that the span describes a producer sending a message to a broker. - // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship - // between producer and consumer spans. A PRODUCER span ends when the message was accepted - // by the broker while the logical processing of the message might span a much longer time. - Span_SPAN_KIND_PRODUCER Span_SpanKind = 4 - // Indicates that the span describes consumer receiving a message from a broker. - // Like the PRODUCER kind, there is often no direct critical path latency relationship - // between producer and consumer spans. - Span_SPAN_KIND_CONSUMER Span_SpanKind = 5 -) - -var Span_SpanKind_name = map[int32]string{ - 0: "SPAN_KIND_UNSPECIFIED", - 1: "SPAN_KIND_INTERNAL", - 2: "SPAN_KIND_SERVER", - 3: "SPAN_KIND_CLIENT", - 4: "SPAN_KIND_PRODUCER", - 5: "SPAN_KIND_CONSUMER", -} - -var Span_SpanKind_value = map[string]int32{ - "SPAN_KIND_UNSPECIFIED": 0, - "SPAN_KIND_INTERNAL": 1, - "SPAN_KIND_SERVER": 2, - "SPAN_KIND_CLIENT": 3, - "SPAN_KIND_PRODUCER": 4, - "SPAN_KIND_CONSUMER": 5, -} - -func (x Span_SpanKind) String() string { - return proto.EnumName(Span_SpanKind_name, int32(x)) -} - -func (Span_SpanKind) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3, 0} -} - -// For the semantics of status codes see -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status -type Status_StatusCode int32 - -const ( - // The default status. - Status_STATUS_CODE_UNSET Status_StatusCode = 0 - // The Span has been validated by an Application developer or Operator to - // have completed successfully. - Status_STATUS_CODE_OK Status_StatusCode = 1 - // The Span contains an error. - Status_STATUS_CODE_ERROR Status_StatusCode = 2 -) - -var Status_StatusCode_name = map[int32]string{ - 0: "STATUS_CODE_UNSET", - 1: "STATUS_CODE_OK", - 2: "STATUS_CODE_ERROR", -} - -var Status_StatusCode_value = map[string]int32{ - "STATUS_CODE_UNSET": 0, - "STATUS_CODE_OK": 1, - "STATUS_CODE_ERROR": 2, -} - -func (x Status_StatusCode) String() string { - return proto.EnumName(Status_StatusCode_name, int32(x)) -} - -func (Status_StatusCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{4, 0} -} - -// TracesData represents the traces data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP traces data but do -// not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type TracesData struct { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceSpans []*ResourceSpans `protobuf:"bytes,1,rep,name=resource_spans,json=resourceSpans,proto3" json:"resource_spans,omitempty"` -} - -func (m *TracesData) Reset() { *m = TracesData{} } -func (m *TracesData) String() string { return proto.CompactTextString(m) } -func (*TracesData) ProtoMessage() {} -func (*TracesData) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{0} -} -func (m *TracesData) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TracesData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TracesData.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TracesData) XXX_Merge(src proto.Message) { - xxx_messageInfo_TracesData.Merge(m, src) -} -func (m *TracesData) XXX_Size() int { - return m.Size() -} -func (m *TracesData) XXX_DiscardUnknown() { - xxx_messageInfo_TracesData.DiscardUnknown(m) -} - -var xxx_messageInfo_TracesData proto.InternalMessageInfo - -func (m *TracesData) GetResourceSpans() []*ResourceSpans { - if m != nil { - return m.ResourceSpans - } - return nil -} - -// A collection of ScopeSpans from a Resource. -type ResourceSpans struct { - DeprecatedScopeSpans []*ScopeSpans `protobuf:"bytes,1000,rep,name=deprecated_scope_spans,json=deprecatedScopeSpans,proto3" json:"deprecated_scope_spans,omitempty"` - // The resource for the spans in this message. - // If this field is not set then no resource info is known. - Resource v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource"` - // A list of ScopeSpans that originate from a resource. - ScopeSpans []*ScopeSpans `protobuf:"bytes,2,rep,name=scope_spans,json=scopeSpans,proto3" json:"scope_spans,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the resource data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_spans" field which have their own schema_url field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ResourceSpans) Reset() { *m = ResourceSpans{} } -func (m *ResourceSpans) String() string { return proto.CompactTextString(m) } -func (*ResourceSpans) ProtoMessage() {} -func (*ResourceSpans) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{1} -} -func (m *ResourceSpans) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ResourceSpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ResourceSpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceSpans.Merge(m, src) -} -func (m *ResourceSpans) XXX_Size() int { - return m.Size() -} -func (m *ResourceSpans) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceSpans.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceSpans proto.InternalMessageInfo - -func (m *ResourceSpans) GetDeprecatedScopeSpans() []*ScopeSpans { - if m != nil { - return m.DeprecatedScopeSpans - } - return nil -} - -func (m *ResourceSpans) GetResource() v1.Resource { - if m != nil { - return m.Resource - } - return v1.Resource{} -} - -func (m *ResourceSpans) GetScopeSpans() []*ScopeSpans { - if m != nil { - return m.ScopeSpans - } - return nil -} - -func (m *ResourceSpans) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A collection of Spans produced by an InstrumentationScope. -type ScopeSpans struct { - // The instrumentation scope information for the spans in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope"` - // A list of Spans that originate from an instrumentation scope. - Spans []*Span `protobuf:"bytes,2,rep,name=spans,proto3" json:"spans,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the span data - // is recorded in. Notably, the last part of the URL path is the version number of the - // schema: http[s]://server[:port]/path/. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all spans and span events in the "spans" field. - SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"` -} - -func (m *ScopeSpans) Reset() { *m = ScopeSpans{} } -func (m *ScopeSpans) String() string { return proto.CompactTextString(m) } -func (*ScopeSpans) ProtoMessage() {} -func (*ScopeSpans) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{2} -} -func (m *ScopeSpans) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ScopeSpans) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ScopeSpans.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ScopeSpans) XXX_Merge(src proto.Message) { - xxx_messageInfo_ScopeSpans.Merge(m, src) -} -func (m *ScopeSpans) XXX_Size() int { - return m.Size() -} -func (m *ScopeSpans) XXX_DiscardUnknown() { - xxx_messageInfo_ScopeSpans.DiscardUnknown(m) -} - -var xxx_messageInfo_ScopeSpans proto.InternalMessageInfo - -func (m *ScopeSpans) GetScope() v11.InstrumentationScope { - if m != nil { - return m.Scope - } - return v11.InstrumentationScope{} -} - -func (m *ScopeSpans) GetSpans() []*Span { - if m != nil { - return m.Spans - } - return nil -} - -func (m *ScopeSpans) GetSchemaUrl() string { - if m != nil { - return m.SchemaUrl - } - return "" -} - -// A Span represents a single operation performed by a single component of the system. -// -// The next available field id is 17. -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. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // trace_state conveys information about request position in multiple distributed tracing graphs. - // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header - // See also https://github.com/w3c/distributed-tracing for more details about this field. - TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,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 go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,4,opt,name=parent_span_id,json=parentSpanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"parent_span_id"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether a span's parent - // is remote. The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // When creating span messages, if the message is logically forwarded from another source - // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD - // be copied as-is. If creating from a source that does not have an equivalent flags field - // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST - // be set to zero. - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // - // [Optional]. - Flags uint32 `protobuf:"fixed32,16,opt,name=flags,proto3" json:"flags,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 semantically required to be set to non-empty string. - // Empty value is equivalent to an unknown span name. - // - // This field is required. - Name string `protobuf:"bytes,5,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` (caller) - // and `SERVER` (callee) to identify queueing latency associated with the span. - Kind Span_SpanKind `protobuf:"varint,6,opt,name=kind,proto3,enum=opentelemetry.proto.trace.v1.Span_SpanKind" json:"kind,omitempty"` - // start_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - StartTimeUnixNano uint64 `protobuf:"fixed64,7,opt,name=start_time_unix_nano,json=startTimeUnixNano,proto3" json:"start_time_unix_nano,omitempty"` - // end_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - EndTimeUnixNano uint64 `protobuf:"fixed64,8,opt,name=end_time_unix_nano,json=endTimeUnixNano,proto3" json:"end_time_unix_nano,omitempty"` - // attributes is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "example.com/myattribute": true - // "example.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes"` - // dropped_attributes_count is 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 uint32 `protobuf:"varint,10,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // events is a collection of Event items. - Events []*Span_Event `protobuf:"bytes,11,rep,name=events,proto3" json:"events,omitempty"` - // dropped_events_count is the number of dropped events. If the value is 0, then no - // events were dropped. - DroppedEventsCount uint32 `protobuf:"varint,12,opt,name=dropped_events_count,json=droppedEventsCount,proto3" json:"dropped_events_count,omitempty"` - // links is a collection of Links, which are references from this span to a span - // in the same or different trace. - Links []*Span_Link `protobuf:"bytes,13,rep,name=links,proto3" json:"links,omitempty"` - // dropped_links_count is the number of dropped links after the maximum size was - // enforced. If this value is 0, then no links were dropped. - DroppedLinksCount uint32 `protobuf:"varint,14,opt,name=dropped_links_count,json=droppedLinksCount,proto3" json:"dropped_links_count,omitempty"` - // An optional final status for this span. Semantically when Status isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status Status `protobuf:"bytes,15,opt,name=status,proto3" json:"status"` -} - -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_5c407ac9c675a601, []int{3} -} -func (m *Span) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span.Merge(m, src) -} -func (m *Span) XXX_Size() int { - return m.Size() -} -func (m *Span) XXX_DiscardUnknown() { - xxx_messageInfo_Span.DiscardUnknown(m) -} - -var xxx_messageInfo_Span proto.InternalMessageInfo - -func (m *Span) GetTraceState() string { - if m != nil { - return m.TraceState - } - return "" -} - -func (m *Span) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -func (m *Span) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Span) GetKind() Span_SpanKind { - if m != nil { - return m.Kind - } - return Span_SPAN_KIND_UNSPECIFIED -} - -func (m *Span) GetStartTimeUnixNano() uint64 { - if m != nil { - return m.StartTimeUnixNano - } - return 0 -} - -func (m *Span) GetEndTimeUnixNano() uint64 { - if m != nil { - return m.EndTimeUnixNano - } - return 0 -} - -func (m *Span) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Span) GetEvents() []*Span_Event { - if m != nil { - return m.Events - } - return nil -} - -func (m *Span) GetDroppedEventsCount() uint32 { - if m != nil { - return m.DroppedEventsCount - } - return 0 -} - -func (m *Span) GetLinks() []*Span_Link { - if m != nil { - return m.Links - } - return nil -} - -func (m *Span) GetDroppedLinksCount() uint32 { - if m != nil { - return m.DroppedLinksCount - } - return 0 -} - -func (m *Span) GetStatus() Status { - if m != nil { - return m.Status - } - return Status{} -} - -// Event is a time-stamped annotation of the span, consisting of user-supplied -// text description and key-value pairs. -type Span_Event struct { - // time_unix_nano is the time the event occurred. - TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"` - // name of the event. - // This field is semantically required to be set to non-empty string. - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - // attributes is a collection of attribute key/value pairs on the event. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttributesCount uint32 `protobuf:"varint,4,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` -} - -func (m *Span_Event) Reset() { *m = Span_Event{} } -func (m *Span_Event) String() string { return proto.CompactTextString(m) } -func (*Span_Event) ProtoMessage() {} -func (*Span_Event) Descriptor() ([]byte, []int) { - return fileDescriptor_5c407ac9c675a601, []int{3, 0} -} -func (m *Span_Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span_Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Event.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Event.Merge(m, src) -} -func (m *Span_Event) XXX_Size() int { - return m.Size() -} -func (m *Span_Event) XXX_DiscardUnknown() { - xxx_messageInfo_Span_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Span_Event proto.InternalMessageInfo - -func (m *Span_Event) GetTimeUnixNano() uint64 { - if m != nil { - return m.TimeUnixNano - } - return 0 -} - -func (m *Span_Event) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *Span_Event) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span_Event) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - 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 of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceId go_opentelemetry_io_collector_pdata_internal_data.TraceID `protobuf:"bytes,1,opt,name=trace_id,json=traceId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.TraceID" json:"trace_id"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanId go_opentelemetry_io_collector_pdata_internal_data.SpanID `protobuf:"bytes,2,opt,name=span_id,json=spanId,proto3,customtype=go.opentelemetry.io/collector/pdata/internal/data.SpanID" json:"span_id"` - // The trace_state associated with the link. - TraceState string `protobuf:"bytes,3,opt,name=trace_state,json=traceState,proto3" json:"trace_state,omitempty"` - // attributes is a collection of attribute key/value pairs on the link. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attributes []v11.KeyValue `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttributesCount uint32 `protobuf:"varint,5,opt,name=dropped_attributes_count,json=droppedAttributesCount,proto3" json:"dropped_attributes_count,omitempty"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether the link is remote. - // The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. - // - // [Optional]. - Flags uint32 `protobuf:"fixed32,6,opt,name=flags,proto3" json:"flags,omitempty"` -} - -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_5c407ac9c675a601, []int{3, 1} -} -func (m *Span_Link) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Span_Link) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Span_Link.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Span_Link) XXX_Merge(src proto.Message) { - xxx_messageInfo_Span_Link.Merge(m, src) -} -func (m *Span_Link) XXX_Size() int { - return m.Size() -} -func (m *Span_Link) XXX_DiscardUnknown() { - xxx_messageInfo_Span_Link.DiscardUnknown(m) -} - -var xxx_messageInfo_Span_Link proto.InternalMessageInfo - -func (m *Span_Link) GetTraceState() string { - if m != nil { - return m.TraceState - } - return "" -} - -func (m *Span_Link) GetAttributes() []v11.KeyValue { - if m != nil { - return m.Attributes - } - return nil -} - -func (m *Span_Link) GetDroppedAttributesCount() uint32 { - if m != nil { - return m.DroppedAttributesCount - } - return 0 -} - -func (m *Span_Link) GetFlags() uint32 { - if m != nil { - return m.Flags - } - return 0 -} - -// The Status type defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. -type Status struct { - // A developer-facing human readable error message. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // The status code. - Code Status_StatusCode `protobuf:"varint,3,opt,name=code,proto3,enum=opentelemetry.proto.trace.v1.Status_StatusCode" json:"code,omitempty"` -} - -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_5c407ac9c675a601, []int{4} -} -func (m *Status) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Status.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Status) XXX_Merge(src proto.Message) { - xxx_messageInfo_Status.Merge(m, src) -} -func (m *Status) XXX_Size() int { - return m.Size() -} -func (m *Status) XXX_DiscardUnknown() { - xxx_messageInfo_Status.DiscardUnknown(m) -} - -var xxx_messageInfo_Status proto.InternalMessageInfo - -func (m *Status) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Status) GetCode() Status_StatusCode { - if m != nil { - return m.Code - } - return Status_STATUS_CODE_UNSET -} - -func init() { - proto.RegisterEnum("opentelemetry.proto.trace.v1.SpanFlags", SpanFlags_name, SpanFlags_value) - proto.RegisterEnum("opentelemetry.proto.trace.v1.Span_SpanKind", Span_SpanKind_name, Span_SpanKind_value) - proto.RegisterEnum("opentelemetry.proto.trace.v1.Status_StatusCode", Status_StatusCode_name, Status_StatusCode_value) - proto.RegisterType((*TracesData)(nil), "opentelemetry.proto.trace.v1.TracesData") - proto.RegisterType((*ResourceSpans)(nil), "opentelemetry.proto.trace.v1.ResourceSpans") - proto.RegisterType((*ScopeSpans)(nil), "opentelemetry.proto.trace.v1.ScopeSpans") - proto.RegisterType((*Span)(nil), "opentelemetry.proto.trace.v1.Span") - proto.RegisterType((*Span_Event)(nil), "opentelemetry.proto.trace.v1.Span.Event") - proto.RegisterType((*Span_Link)(nil), "opentelemetry.proto.trace.v1.Span.Link") - proto.RegisterType((*Status)(nil), "opentelemetry.proto.trace.v1.Status") -} - -func init() { - proto.RegisterFile("opentelemetry/proto/trace/v1/trace.proto", fileDescriptor_5c407ac9c675a601) -} - -var fileDescriptor_5c407ac9c675a601 = []byte{ - // 1112 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x56, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xf6, 0x3a, 0x6b, 0x3b, 0x79, 0x49, 0xdc, 0xed, 0xe0, 0x56, 0x4b, 0x28, 0x8e, 0xb1, 0x0a, - 0x98, 0x56, 0xb2, 0x49, 0x7b, 0x29, 0x07, 0x44, 0x1d, 0x7b, 0x03, 0x8b, 0x13, 0x3b, 0x9a, 0x5d, - 0x47, 0x80, 0x90, 0x96, 0xad, 0x77, 0x6a, 0x56, 0xb1, 0x67, 0xad, 0xdd, 0x71, 0xd4, 0xde, 0xf8, - 0x13, 0xb8, 0x22, 0x71, 0x47, 0x02, 0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, 0xf0, 0x07, 0x57, 0x07, 0xe7, 0x72, 0xcd, 0x36, 0xce, 0x73, 0x40, 0xd3, 0x43, - 0xdb, 0xb0, 0x2e, 0x85, 0x47, 0xcc, 0x65, 0x24, 0xae, 0x10, 0x84, 0xc9, 0xe2, 0x16, 0xf4, 0x18, - 0x8a, 0x13, 0x37, 0x24, 0x94, 0x39, 0x89, 0x04, 0xf5, 0x3f, 0x92, 0xb0, 0x21, 0x71, 0x2d, 0x29, - 0xa4, 0x04, 0xb9, 0xc7, 0x23, 0x77, 0x18, 0xe9, 0x5a, 0x45, 0xa9, 0x15, 0xb0, 0xdc, 0x20, 0x04, - 0x2a, 0x75, 0xc7, 0x44, 0xcf, 0x09, 0x5d, 0x62, 0x8d, 0x3e, 0x01, 0xf5, 0xd8, 0xa7, 0x9e, 0x9e, - 0xaf, 0x28, 0xb5, 0xe2, 0x65, 0x37, 0x94, 0xa3, 0x8b, 0x3f, 0x1d, 0x9f, 0x7a, 0x58, 0x24, 0xa2, - 0x06, 0x94, 0x22, 0xe6, 0x86, 0xcc, 0x61, 0xfe, 0x98, 0x38, 0x53, 0xea, 0x3f, 0x71, 0xa8, 0x4b, - 0x03, 0xbd, 0x50, 0x51, 0x6a, 0x79, 0x7c, 0x5d, 0xf8, 0x6c, 0x7f, 0x4c, 0xfa, 0xd4, 0x7f, 0xd2, - 0x75, 0x69, 0x80, 0xee, 0x02, 0x22, 0xd4, 0x3b, 0x1f, 0xbe, 0x2a, 0xc2, 0xaf, 0x11, 0xea, 0x2d, - 0x04, 0x1f, 0x00, 0xb8, 0x8c, 0x85, 0xfe, 0xa3, 0x29, 0x23, 0x91, 0xbe, 0x26, 0x26, 0xee, 0xfd, - 0x4b, 0x46, 0xb8, 0x43, 0x9e, 0x1e, 0xb9, 0xa3, 0x69, 0x32, 0xb6, 0x29, 0x00, 0xf4, 0x00, 0x74, - 0x2f, 0x0c, 0x26, 0x13, 0xe2, 0x39, 0x73, 0xab, 0x33, 0x08, 0xa6, 0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 0x7d, 0xd0, 0xb4, 0x3a, 0xda, 0x4b, 0x05, 0xdd, 0x81, - 0x77, 0x53, 0x11, 0xad, 0x5e, 0xd7, 0x36, 0xbe, 0xb0, 0x9d, 0xcf, 0x9a, 0x96, 0x63, 0x5a, 0x0e, - 0x36, 0x0e, 0x7a, 0xb6, 0x21, 0x63, 0xbf, 0xcb, 0xa2, 0xf7, 0xe0, 0x9d, 0x0b, 0x62, 0xcf, 0xc7, - 0xa9, 0xbb, 0xbf, 0x28, 0xcf, 0x4e, 0xcb, 0xca, 0xf3, 0xd3, 0xb2, 0xf2, 0xf7, 0x69, 0x59, 0xf9, - 0xfe, 0xac, 0x9c, 0x79, 0x7e, 0x56, 0xce, 0xfc, 0x79, 0x56, 0xce, 0xc0, 0xb6, 0x1f, 0x2c, 0x6d, - 0xe4, 0xae, 0xfc, 0x18, 0x3d, 0xe4, 0xc6, 0x43, 0xe5, 0xab, 0xd6, 0x95, 0xaf, 0x91, 0xfc, 0xe0, - 0x1d, 0x12, 0x3a, 0xfb, 0xfa, 0xfe, 0x39, 0x7b, 0xab, 0x37, 0x21, 0xd4, 0x9e, 0x41, 0x08, 0x70, - 0x79, 0x97, 0xeb, 0x47, 0x3b, 0x8f, 0xf2, 0x22, 0xe3, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xfd, 0xbe, 0x84, 0xc3, 0xc3, 0x0b, 0x00, 0x00, -} - -func (m *TracesData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TracesData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TracesData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for iNdEx := len(m.ResourceSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ResourceSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceSpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceSpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DeprecatedScopeSpans) > 0 { - for iNdEx := len(m.DeprecatedScopeSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DeprecatedScopeSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3e - i-- - dAtA[i] = 0xc2 - } - } - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.ScopeSpans) > 0 { - for iNdEx := len(m.ScopeSpans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeSpans) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeSpans) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeSpans) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SchemaUrl) > 0 { - i -= len(m.SchemaUrl) - copy(dAtA[i:], m.SchemaUrl) - i = encodeVarintTrace(dAtA, i, uint64(len(m.SchemaUrl))) - i-- - dAtA[i] = 0x1a - } - if len(m.Spans) > 0 { - for iNdEx := len(m.Spans) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Spans[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Scope.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Span) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x85 - } - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - if m.DroppedLinksCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedLinksCount)) - i-- - dAtA[i] = 0x70 - } - if len(m.Links) > 0 { - for iNdEx := len(m.Links) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Links[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - } - if m.DroppedEventsCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedEventsCount)) - i-- - dAtA[i] = 0x60 - } - if len(m.Events) > 0 { - for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Events[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x50 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.EndTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.EndTimeUnixNano)) - i-- - dAtA[i] = 0x41 - } - if m.StartTimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.StartTimeUnixNano)) - i-- - dAtA[i] = 0x39 - } - if m.Kind != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Kind)) - i-- - dAtA[i] = 0x30 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - } - { - size := m.ParentSpanId.Size() - i -= size - if _, err := m.ParentSpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Span_Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Event) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Event) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x20 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.TimeUnixNano != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(m.TimeUnixNano)) - i-- - dAtA[i] = 0x9 - } - return len(dAtA) - i, nil -} - -func (m *Span_Link) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Span_Link) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Span_Link) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Flags != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(m.Flags)) - i-- - dAtA[i] = 0x35 - } - if m.DroppedAttributesCount != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.DroppedAttributesCount)) - i-- - dAtA[i] = 0x28 - } - if len(m.Attributes) > 0 { - for iNdEx := len(m.Attributes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attributes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.TraceState) > 0 { - i -= len(m.TraceState) - copy(dAtA[i:], m.TraceState) - i = encodeVarintTrace(dAtA, i, uint64(len(m.TraceState))) - i-- - dAtA[i] = 0x1a - } - { - size := m.SpanId.Size() - i -= size - if _, err := m.SpanId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size := m.TraceId.Size() - i -= size - if _, err := m.TraceId.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - i = encodeVarintTrace(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Status) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Status) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Code != 0 { - i = encodeVarintTrace(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x18 - } - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintTrace(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func encodeVarintTrace(dAtA []byte, offset int, v uint64) int { - offset -= sovTrace(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *TracesData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ResourceSpans) > 0 { - for _, e := range m.ResourceSpans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - return n -} - -func (m *ResourceSpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Resource.Size() - n += 1 + l + sovTrace(uint64(l)) - if len(m.ScopeSpans) > 0 { - for _, e := range m.ScopeSpans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.DeprecatedScopeSpans) > 0 { - for _, e := range m.DeprecatedScopeSpans { - l = e.Size() - n += 2 + l + sovTrace(uint64(l)) - } - } - return n -} - -func (m *ScopeSpans) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Scope.Size() - n += 1 + l + sovTrace(uint64(l)) - if len(m.Spans) > 0 { - for _, e := range m.Spans { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - l = len(m.SchemaUrl) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - return n -} - -func (m *Span) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - l = m.ParentSpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Kind != 0 { - n += 1 + sovTrace(uint64(m.Kind)) - } - if m.StartTimeUnixNano != 0 { - n += 9 - } - if m.EndTimeUnixNano != 0 { - n += 9 - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if len(m.Events) > 0 { - for _, e := range m.Events { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedEventsCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedEventsCount)) - } - if len(m.Links) > 0 { - for _, e := range m.Links { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedLinksCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedLinksCount)) - } - l = m.Status.Size() - n += 1 + l + sovTrace(uint64(l)) - if m.Flags != 0 { - n += 6 - } - return n -} - -func (m *Span_Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeUnixNano != 0 { - n += 9 - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - return n -} - -func (m *Span_Link) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TraceId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = m.SpanId.Size() - n += 1 + l + sovTrace(uint64(l)) - l = len(m.TraceState) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if len(m.Attributes) > 0 { - for _, e := range m.Attributes { - l = e.Size() - n += 1 + l + sovTrace(uint64(l)) - } - } - if m.DroppedAttributesCount != 0 { - n += 1 + sovTrace(uint64(m.DroppedAttributesCount)) - } - if m.Flags != 0 { - n += 5 - } - return n -} - -func (m *Status) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovTrace(uint64(l)) - } - if m.Code != 0 { - n += 1 + sovTrace(uint64(m.Code)) - } - return n -} - -func sovTrace(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTrace(x uint64) (n int) { - return sovTrace(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *TracesData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TracesData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TracesData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceSpans = append(m.ResourceSpans, &ResourceSpans{}) - if err := m.ResourceSpans[len(m.ResourceSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceSpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceSpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceSpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeSpans = append(m.ScopeSpans, &ScopeSpans{}) - if err := m.ScopeSpans[len(m.ScopeSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 1000: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecatedScopeSpans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DeprecatedScopeSpans = append(m.DeprecatedScopeSpans, &ScopeSpans{}) - if err := m.DeprecatedScopeSpans[len(m.DeprecatedScopeSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeSpans) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeSpans: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeSpans: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Scope.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spans", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Spans = append(m.Spans, &Span{}) - if err := m.Spans[len(m.Spans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SchemaUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Span: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ParentSpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ParentSpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - m.Kind = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Kind |= Span_SpanKind(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimeUnixNano", wireType) - } - m.StartTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.StartTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field EndTimeUnixNano", wireType) - } - m.EndTimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.EndTimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Events = append(m.Events, &Span_Event{}) - if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedEventsCount", wireType) - } - m.DroppedEventsCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedEventsCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Links", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Links = append(m.Links, &Span_Link{}) - if err := m.Links[len(m.Links)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedLinksCount", wireType) - } - m.DroppedLinksCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedLinksCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeUnixNano", wireType) - } - m.TimeUnixNano = 0 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - m.TimeUnixNano = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Span_Link) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Link: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Link: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TraceId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpanId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SpanId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TraceState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TraceState = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attributes = append(m.Attributes, v11.KeyValue{}) - if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DroppedAttributesCount", wireType) - } - m.DroppedAttributesCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DroppedAttributesCount |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) - } - m.Flags = 0 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - m.Flags = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Status) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Status: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTrace - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTrace - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTrace - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= Status_StatusCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTrace(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTrace - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTrace(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTrace - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTrace - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTrace - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTrace - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTrace = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTrace = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTrace = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go deleted file mode 100644 index 25110f8b44..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/spanid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const spanIDSize = 8 - -var ( - errMarshalSpanID = errors.New("marshal: invalid buffer length for SpanID") - errUnmarshalSpanID = errors.New("unmarshal: invalid SpanID length") -) - -// SpanID is a custom data type that is used for all span_id fields in OTLP -// Protobuf messages. -type SpanID [spanIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (sid SpanID) Size() int { - if sid.IsEmpty() { - return 0 - } - return spanIDSize -} - -// IsEmpty returns true if id contains at least one non-zero byte. -func (sid SpanID) IsEmpty() bool { - return sid == [spanIDSize]byte{} -} - -// MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization. -func (sid SpanID) MarshalTo(data []byte) (n int, err error) { - if sid.IsEmpty() { - return 0, nil - } - - if len(data) < spanIDSize { - return 0, errMarshalSpanID - } - - return copy(data, sid[:]), nil -} - -// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. -func (sid *SpanID) Unmarshal(data []byte) error { - if len(data) == 0 { - *sid = [spanIDSize]byte{} - return nil - } - - if len(data) != spanIDSize { - return errUnmarshalSpanID - } - - copy(sid[:], data) - return nil -} - -// MarshalJSON converts SpanID into a hex string enclosed in quotes. -func (sid SpanID) MarshalJSON() ([]byte, error) { - if sid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(sid[:]) -} - -// UnmarshalJSON decodes SpanID from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (sid *SpanID) UnmarshalJSON(data []byte) error { - *sid = [spanIDSize]byte{} - return unmarshalJSON(sid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go b/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go deleted file mode 100644 index 4828ee02bd..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/data/traceid.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package data // import "go.opentelemetry.io/collector/pdata/internal/data" - -import ( - "errors" - - "github.com/gogo/protobuf/proto" -) - -const traceIDSize = 16 - -var ( - errMarshalTraceID = errors.New("marshal: invalid buffer length for TraceID") - errUnmarshalTraceID = errors.New("unmarshal: invalid TraceID length") -) - -// TraceID is a custom data type that is used for all trace_id fields in OTLP -// Protobuf messages. -type TraceID [traceIDSize]byte - -var _ proto.Sizer = (*SpanID)(nil) - -// Size returns the size of the data to serialize. -func (tid TraceID) Size() int { - if tid.IsEmpty() { - return 0 - } - return traceIDSize -} - -// IsEmpty returns true if id contains at leas one non-zero byte. -func (tid TraceID) IsEmpty() bool { - return tid == [traceIDSize]byte{} -} - -// MarshalTo converts trace ID into a binary representation. Called by Protobuf serialization. -func (tid TraceID) MarshalTo(data []byte) (n int, err error) { - if tid.IsEmpty() { - return 0, nil - } - - if len(data) < traceIDSize { - return 0, errMarshalTraceID - } - - return copy(data, tid[:]), nil -} - -// Unmarshal inflates this trace ID from binary representation. Called by Protobuf serialization. -func (tid *TraceID) Unmarshal(data []byte) error { - if len(data) == 0 { - *tid = [traceIDSize]byte{} - return nil - } - - if len(data) != traceIDSize { - return errUnmarshalTraceID - } - - copy(tid[:], data) - return nil -} - -// MarshalJSON converts trace id into a hex string enclosed in quotes. -func (tid TraceID) MarshalJSON() ([]byte, error) { - if tid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(tid[:]) -} - -// UnmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. -// Called by Protobuf JSON deserialization. -func (tid *TraceID) UnmarshalJSON(data []byte) error { - *tid = [traceIDSize]byte{} - return unmarshalJSON(tid[:], data) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go deleted file mode 100644 index 1f3548b205..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_byteslice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type ByteSlice struct { - orig *[]byte - state *State -} - -func GetOrigByteSlice(ms ByteSlice) *[]byte { - return ms.orig -} - -func GetByteSliceState(ms ByteSlice) *State { - return ms.state -} - -func NewByteSlice(orig *[]byte, state *State) ByteSlice { - return ByteSlice{orig: orig, state: state} -} - -func FillTestByteSlice(tv ByteSlice) { -} - -func GenerateTestByteSlice() ByteSlice { - state := StateMutable - var orig []byte = nil - - return ByteSlice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go deleted file mode 100644 index f13349cded..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_float64slice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type Float64Slice struct { - orig *[]float64 - state *State -} - -func GetOrigFloat64Slice(ms Float64Slice) *[]float64 { - return ms.orig -} - -func GetFloat64SliceState(ms Float64Slice) *State { - return ms.state -} - -func NewFloat64Slice(orig *[]float64, state *State) Float64Slice { - return Float64Slice{orig: orig, state: state} -} - -func FillTestFloat64Slice(tv Float64Slice) { -} - -func GenerateTestFloat64Slice() Float64Slice { - state := StateMutable - var orig []float64 = nil - - return Float64Slice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go deleted file mode 100644 index 89b995bc98..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_instrumentationscope.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type InstrumentationScope struct { - orig *otlpcommon.InstrumentationScope - state *State -} - -func GetOrigInstrumentationScope(ms InstrumentationScope) *otlpcommon.InstrumentationScope { - return ms.orig -} - -func GetInstrumentationScopeState(ms InstrumentationScope) *State { - return ms.state -} - -func NewInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *State) InstrumentationScope { - return InstrumentationScope{orig: orig, state: state} -} - -func GenerateTestInstrumentationScope() InstrumentationScope { - orig := otlpcommon.InstrumentationScope{} - state := StateMutable - tv := NewInstrumentationScope(&orig, &state) - FillTestInstrumentationScope(tv) - return tv -} - -func FillTestInstrumentationScope(tv InstrumentationScope) { - tv.orig.Name = "test_name" - tv.orig.Version = "test_version" - FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) - tv.orig.DroppedAttributesCount = uint32(17) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go deleted file mode 100644 index 31f642d75b..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int32slice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type Int32Slice struct { - orig *[]int32 - state *State -} - -func GetOrigInt32Slice(ms Int32Slice) *[]int32 { - return ms.orig -} - -func GetInt32SliceState(ms Int32Slice) *State { - return ms.state -} - -func NewInt32Slice(orig *[]int32, state *State) Int32Slice { - return Int32Slice{orig: orig, state: state} -} - -func FillTestInt32Slice(tv Int32Slice) { -} - -func GenerateTestInt32Slice() Int32Slice { - state := StateMutable - var orig []int32 = nil - - return Int32Slice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go deleted file mode 100644 index cd85707b15..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_int64slice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type Int64Slice struct { - orig *[]int64 - state *State -} - -func GetOrigInt64Slice(ms Int64Slice) *[]int64 { - return ms.orig -} - -func GetInt64SliceState(ms Int64Slice) *State { - return ms.state -} - -func NewInt64Slice(orig *[]int64, state *State) Int64Slice { - return Int64Slice{orig: orig, state: state} -} - -func FillTestInt64Slice(tv Int64Slice) { -} - -func GenerateTestInt64Slice() Int64Slice { - state := StateMutable - var orig []int64 = nil - - return Int64Slice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go deleted file mode 100644 index 5f3fe569ba..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_intslice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type IntSlice struct { - orig *[]int - state *State -} - -func GetOrigIntSlice(ms IntSlice) *[]int { - return ms.orig -} - -func GetIntSliceState(ms IntSlice) *State { - return ms.state -} - -func NewIntSlice(orig *[]int, state *State) IntSlice { - return IntSlice{orig: orig, state: state} -} - -func FillTestIntSlice(tv IntSlice) { -} - -func GenerateTestIntSlice() IntSlice { - state := StateMutable - var orig []int = nil - - return IntSlice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go deleted file mode 100644 index 354b2457ba..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_resource.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -import ( - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -type Resource struct { - orig *otlpresource.Resource - state *State -} - -func GetOrigResource(ms Resource) *otlpresource.Resource { - return ms.orig -} - -func GetResourceState(ms Resource) *State { - return ms.state -} - -func NewResource(orig *otlpresource.Resource, state *State) Resource { - return Resource{orig: orig, state: state} -} - -func GenerateTestResource() Resource { - orig := otlpresource.Resource{} - state := StateMutable - tv := NewResource(&orig, &state) - FillTestResource(tv) - return tv -} - -func FillTestResource(tv Resource) { - FillTestMap(NewMap(&tv.orig.Attributes, tv.state)) - tv.orig.DroppedAttributesCount = uint32(17) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go deleted file mode 100644 index 508912653f..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_stringslice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type StringSlice struct { - orig *[]string - state *State -} - -func GetOrigStringSlice(ms StringSlice) *[]string { - return ms.orig -} - -func GetStringSliceState(ms StringSlice) *State { - return ms.state -} - -func NewStringSlice(orig *[]string, state *State) StringSlice { - return StringSlice{orig: orig, state: state} -} - -func FillTestStringSlice(tv StringSlice) { -} - -func GenerateTestStringSlice() StringSlice { - state := StateMutable - var orig []string = nil - - return StringSlice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go deleted file mode 100644 index bbb4a4fafe..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/generated_wrapper_uint64slice.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package internal - -type UInt64Slice struct { - orig *[]uint64 - state *State -} - -func GetOrigUInt64Slice(ms UInt64Slice) *[]uint64 { - return ms.orig -} - -func GetUInt64SliceState(ms UInt64Slice) *State { - return ms.state -} - -func NewUInt64Slice(orig *[]uint64, state *State) UInt64Slice { - return UInt64Slice{orig: orig, state: state} -} - -func FillTestUInt64Slice(tv UInt64Slice) { -} - -func GenerateTestUInt64Slice() UInt64Slice { - state := StateMutable - var orig []uint64 = nil - - return UInt64Slice{&orig, &state} -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go deleted file mode 100644 index 89d957a653..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/attribute.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "encoding/base64" - "fmt" - - jsoniter "github.com/json-iterator/go" - - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// ReadAttribute Unmarshal JSON data and return otlpcommon.KeyValue -func ReadAttribute(iter *jsoniter.Iterator) otlpcommon.KeyValue { - kv := otlpcommon.KeyValue{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "key": - kv.Key = iter.ReadString() - case "value": - ReadValue(iter, &kv.Value) - default: - iter.Skip() - } - return true - }) - return kv -} - -// ReadValue Unmarshal JSON data and return otlpcommon.AnyValue -func ReadValue(iter *jsoniter.Iterator, val *otlpcommon.AnyValue) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "stringValue", "string_value": - val.Value = &otlpcommon.AnyValue_StringValue{ - StringValue: iter.ReadString(), - } - - case "boolValue", "bool_value": - val.Value = &otlpcommon.AnyValue_BoolValue{ - BoolValue: iter.ReadBool(), - } - case "intValue", "int_value": - val.Value = &otlpcommon.AnyValue_IntValue{ - IntValue: ReadInt64(iter), - } - case "doubleValue", "double_value": - val.Value = &otlpcommon.AnyValue_DoubleValue{ - DoubleValue: ReadFloat64(iter), - } - case "bytesValue", "bytes_value": - v, err := base64.StdEncoding.DecodeString(iter.ReadString()) - if err != nil { - iter.ReportError("bytesValue", fmt.Sprintf("base64 decode:%v", err)) - break - } - val.Value = &otlpcommon.AnyValue_BytesValue{ - BytesValue: v, - } - case "arrayValue", "array_value": - val.Value = &otlpcommon.AnyValue_ArrayValue{ - ArrayValue: readArray(iter), - } - case "kvlistValue", "kvlist_value": - val.Value = &otlpcommon.AnyValue_KvlistValue{ - KvlistValue: readKvlistValue(iter), - } - default: - iter.Skip() - } - return true - }) -} - -func readArray(iter *jsoniter.Iterator) *otlpcommon.ArrayValue { - v := &otlpcommon.ArrayValue{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "values": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - v.Values = append(v.Values, otlpcommon.AnyValue{}) - ReadValue(iter, &v.Values[len(v.Values)-1]) - return true - }) - default: - iter.Skip() - } - return true - }) - return v -} - -func readKvlistValue(iter *jsoniter.Iterator) *otlpcommon.KeyValueList { - v := &otlpcommon.KeyValueList{} - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "values": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - v.Values = append(v.Values, ReadAttribute(iter)) - return true - }) - default: - iter.Skip() - } - return true - }) - return v -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go deleted file mode 100644 index 02dd2b7768..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/enum.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" -) - -// ReadEnumValue returns the enum integer value representation. Accepts both enum names and enum integer values. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadEnumValue(iter *jsoniter.Iterator, valueMap map[string]int32) int32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt32() - case jsoniter.StringValue: - val, ok := valueMap[iter.ReadString()] - // Same behavior with official protobuf JSON decoder, - // see https://github.com/open-telemetry/opentelemetry-proto-go/pull/81 - if !ok { - iter.ReportError("ReadEnumValue", "unknown string value") - return 0 - } - return val - default: - iter.ReportError("ReadEnumValue", "unsupported value type") - return 0 - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go deleted file mode 100644 index b77d934b69..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/json.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "io" - - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" -) - -var marshaler = &jsonpb.Marshaler{ - // https://github.com/open-telemetry/opentelemetry-specification/pull/2758 - EnumsAsInts: true, - // https://github.com/open-telemetry/opentelemetry-specification/pull/2829 - OrigName: false, -} - -func Marshal(out io.Writer, pb proto.Message) error { - return marshaler.Marshal(out, pb) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go deleted file mode 100644 index 23830b9713..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/number.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - "strconv" - - jsoniter "github.com/json-iterator/go" -) - -// ReadInt32 unmarshalls JSON data into an int32. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadInt32(iter *jsoniter.Iterator) int32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt32() - case jsoniter.StringValue: - val, err := strconv.ParseInt(iter.ReadString(), 10, 32) - if err != nil { - iter.ReportError("ReadInt32", err.Error()) - return 0 - } - return int32(val) - default: - iter.ReportError("ReadInt32", "unsupported value type") - return 0 - } -} - -// ReadUint32 unmarshalls JSON data into an uint32. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadUint32(iter *jsoniter.Iterator) uint32 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadUint32() - case jsoniter.StringValue: - val, err := strconv.ParseUint(iter.ReadString(), 10, 32) - if err != nil { - iter.ReportError("ReadUint32", err.Error()) - return 0 - } - return uint32(val) - default: - iter.ReportError("ReadUint32", "unsupported value type") - return 0 - } -} - -// ReadInt64 unmarshalls JSON data into an int64. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadInt64(iter *jsoniter.Iterator) int64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadInt64() - case jsoniter.StringValue: - val, err := strconv.ParseInt(iter.ReadString(), 10, 64) - if err != nil { - iter.ReportError("ReadInt64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadInt64", "unsupported value type") - return 0 - } -} - -// ReadUint64 unmarshalls JSON data into an uint64. Accepts both numbers and strings decimal. -// See https://developers.google.com/protocol-buffers/docs/proto3#json. -func ReadUint64(iter *jsoniter.Iterator) uint64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadUint64() - case jsoniter.StringValue: - val, err := strconv.ParseUint(iter.ReadString(), 10, 64) - if err != nil { - iter.ReportError("ReadUint64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadUint64", "unsupported value type") - return 0 - } -} - -func ReadFloat64(iter *jsoniter.Iterator) float64 { - switch iter.WhatIsNext() { - case jsoniter.NumberValue: - return iter.ReadFloat64() - case jsoniter.StringValue: - val, err := strconv.ParseFloat(iter.ReadString(), 64) - if err != nil { - iter.ReportError("ReadUint64", err.Error()) - return 0 - } - return val - default: - iter.ReportError("ReadUint64", "unsupported value type") - return 0 - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go deleted file mode 100644 index 302033bc44..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/resource.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" - - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -func ReadResource(iter *jsoniter.Iterator, resource *otlpresource.Resource) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - resource.Attributes = append(resource.Attributes, ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - resource.DroppedAttributesCount = ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go b/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go deleted file mode 100644 index 40ad41b15b..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/json/scope.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package json // import "go.opentelemetry.io/collector/pdata/internal/json" - -import ( - jsoniter "github.com/json-iterator/go" - - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -func ReadScope(iter *jsoniter.Iterator, scope *otlpcommon.InstrumentationScope) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "name": - scope.Name = iter.ReadString() - case "version": - scope.Version = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - scope.Attributes = append(scope.Attributes, ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - scope.DroppedAttributesCount = ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go deleted file mode 100644 index c0328a5b41..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/logs.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" - -import ( - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - -// MigrateLogs implements any translation needed due to deprecation in OTLP logs protocol. -// Any plog.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateLogs(rls []*otlplogs.ResourceLogs) { - for _, rl := range rls { - if len(rl.ScopeLogs) == 0 { - rl.ScopeLogs = rl.DeprecatedScopeLogs - } - rl.DeprecatedScopeLogs = nil - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go deleted file mode 100644 index 9a7da14868..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/metrics.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" - -import ( - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - -// MigrateMetrics implements any translation needed due to deprecation in OTLP metrics protocol. -// Any pmetric.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateMetrics(rms []*otlpmetrics.ResourceMetrics) { - for _, rm := range rms { - if len(rm.ScopeMetrics) == 0 { - rm.ScopeMetrics = rm.DeprecatedScopeMetrics - } - rm.DeprecatedScopeMetrics = nil - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go deleted file mode 100644 index 59c23cc672..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/profiles.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" - -import ( - otlpprofiles "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" -) - -// MigrateProfiles implements any translation needed due to deprecation in OTLP profiles protocol. -// Any pprofile.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateProfiles(_ []*otlpprofiles.ResourceProfiles) {} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go b/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go deleted file mode 100644 index 627881fc3d..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/otlp/traces.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otlp // import "go.opentelemetry.io/collector/pdata/internal/otlp" - -import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// MigrateTraces implements any translation needed due to deprecation in OTLP traces protocol. -// Any ptrace.Unmarshaler implementation from OTLP (proto/json) MUST call this, and the gRPC Server implementation. -func MigrateTraces(rss []*otlptrace.ResourceSpans) { - for _, rs := range rss { - if len(rs.ScopeSpans) == 0 { - rs.ScopeSpans = rs.DeprecatedScopeSpans - } - rs.DeprecatedScopeSpans = nil - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/state.go b/vendor/go.opentelemetry.io/collector/pdata/internal/state.go deleted file mode 100644 index f10de5eadf..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/state.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -// State defines an ownership state of pmetric.Metrics, plog.Logs or ptrace.Traces. -type State int32 - -const ( - // StateMutable indicates that the data is exclusive to the current consumer. - StateMutable State = iota - - // StateReadOnly indicates that the data is shared with other consumers. - StateReadOnly -) - -// AssertMutable panics if the state is not StateMutable. -func (state *State) AssertMutable() { - if *state != StateMutable { - panic("invalid access to shared data") - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go deleted file mode 100644 index 6b6c076cca..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_logs.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcollectorlog "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1" - otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1" -) - -type Logs struct { - orig *otlpcollectorlog.ExportLogsServiceRequest - state *State -} - -func GetOrigLogs(ms Logs) *otlpcollectorlog.ExportLogsServiceRequest { - return ms.orig -} - -func GetLogsState(ms Logs) *State { - return ms.state -} - -func SetLogsState(ms Logs, state State) { - *ms.state = state -} - -func NewLogs(orig *otlpcollectorlog.ExportLogsServiceRequest, state *State) Logs { - return Logs{orig: orig, state: state} -} - -// LogsToProto internal helper to convert Logs to protobuf representation. -func LogsToProto(l Logs) otlplogs.LogsData { - return otlplogs.LogsData{ - ResourceLogs: l.orig.ResourceLogs, - } -} - -// LogsFromProto internal helper to convert protobuf representation to Logs. -// This function set exclusive state assuming that it's called only once per Logs. -func LogsFromProto(orig otlplogs.LogsData) Logs { - state := StateMutable - return NewLogs(&otlpcollectorlog.ExportLogsServiceRequest{ - ResourceLogs: orig.ResourceLogs, - }, &state) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go deleted file mode 100644 index 23a1c9056c..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_map.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Map struct { - orig *[]otlpcommon.KeyValue - state *State -} - -func GetOrigMap(ms Map) *[]otlpcommon.KeyValue { - return ms.orig -} - -func GetMapState(ms Map) *State { - return ms.state -} - -func NewMap(orig *[]otlpcommon.KeyValue, state *State) Map { - return Map{orig: orig, state: state} -} - -func GenerateTestMap() Map { - var orig []otlpcommon.KeyValue - state := StateMutable - ms := NewMap(&orig, &state) - FillTestMap(ms) - return ms -} - -func FillTestMap(dest Map) { - *dest.orig = nil - *dest.orig = append(*dest.orig, otlpcommon.KeyValue{Key: "k", Value: otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: "v"}}}) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go deleted file mode 100644 index 85be497ea5..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_metrics.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcollectormetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1" - otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1" -) - -type Metrics struct { - orig *otlpcollectormetrics.ExportMetricsServiceRequest - state *State -} - -func GetOrigMetrics(ms Metrics) *otlpcollectormetrics.ExportMetricsServiceRequest { - return ms.orig -} - -func GetMetricsState(ms Metrics) *State { - return ms.state -} - -func SetMetricsState(ms Metrics, state State) { - *ms.state = state -} - -func NewMetrics(orig *otlpcollectormetrics.ExportMetricsServiceRequest, state *State) Metrics { - return Metrics{orig: orig, state: state} -} - -// MetricsToProto internal helper to convert Metrics to protobuf representation. -func MetricsToProto(l Metrics) otlpmetrics.MetricsData { - return otlpmetrics.MetricsData{ - ResourceMetrics: l.orig.ResourceMetrics, - } -} - -// MetricsFromProto internal helper to convert protobuf representation to Metrics. -// This function set exclusive state assuming that it's called only once per Metrics. -func MetricsFromProto(orig otlpmetrics.MetricsData) Metrics { - state := StateMutable - return NewMetrics(&otlpcollectormetrics.ExportMetricsServiceRequest{ - ResourceMetrics: orig.ResourceMetrics, - }, &state) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go deleted file mode 100644 index 2230b079c3..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_profiles.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcollectorprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development" - otlpprofile "go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development" -) - -type Profiles struct { - orig *otlpcollectorprofile.ExportProfilesServiceRequest - state *State -} - -func GetOrigProfiles(ms Profiles) *otlpcollectorprofile.ExportProfilesServiceRequest { - return ms.orig -} - -func GetProfilesState(ms Profiles) *State { - return ms.state -} - -func SetProfilesState(ms Profiles, state State) { - *ms.state = state -} - -func NewProfiles(orig *otlpcollectorprofile.ExportProfilesServiceRequest, state *State) Profiles { - return Profiles{orig: orig, state: state} -} - -// ProfilesToProto internal helper to convert Profiles to protobuf representation. -func ProfilesToProto(l Profiles) otlpprofile.ProfilesData { - return otlpprofile.ProfilesData{ - ResourceProfiles: l.orig.ResourceProfiles, - } -} - -// ProfilesFromProto internal helper to convert protobuf representation to Profiles. -// This function set exclusive state assuming that it's called only once per Profiles. -func ProfilesFromProto(orig otlpprofile.ProfilesData) Profiles { - state := StateMutable - return NewProfiles(&otlpcollectorprofile.ExportProfilesServiceRequest{ - ResourceProfiles: orig.ResourceProfiles, - }, &state) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go deleted file mode 100644 index 2f366199a2..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_slice.go +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Slice struct { - orig *[]otlpcommon.AnyValue - state *State -} - -func GetOrigSlice(ms Slice) *[]otlpcommon.AnyValue { - return ms.orig -} - -func GetSliceState(ms Slice) *State { - return ms.state -} - -func NewSlice(orig *[]otlpcommon.AnyValue, state *State) Slice { - return Slice{orig: orig, state: state} -} - -func GenerateTestSlice() Slice { - orig := []otlpcommon.AnyValue{} - state := StateMutable - tv := NewSlice(&orig, &state) - FillTestSlice(tv) - return tv -} - -func FillTestSlice(tv Slice) { - *tv.orig = make([]otlpcommon.AnyValue, 7) - for i := 0; i < 7; i++ { - state := StateMutable - FillTestValue(NewValue(&(*tv.orig)[i], &state)) - } -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go deleted file mode 100644 index 5a4cdadbde..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_traces.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -type Traces struct { - orig *otlpcollectortrace.ExportTraceServiceRequest - state *State -} - -func GetOrigTraces(ms Traces) *otlpcollectortrace.ExportTraceServiceRequest { - return ms.orig -} - -func GetTracesState(ms Traces) *State { - return ms.state -} - -func SetTracesState(ms Traces, state State) { - *ms.state = state -} - -func NewTraces(orig *otlpcollectortrace.ExportTraceServiceRequest, state *State) Traces { - return Traces{orig: orig, state: state} -} - -// TracesToProto internal helper to convert Traces to protobuf representation. -func TracesToProto(l Traces) otlptrace.TracesData { - return otlptrace.TracesData{ - ResourceSpans: l.orig.ResourceSpans, - } -} - -// TracesFromProto internal helper to convert protobuf representation to Traces. -// This function set exclusive state assuming that it's called only once per Traces. -func TracesFromProto(orig otlptrace.TracesData) Traces { - state := StateMutable - return NewTraces(&otlpcollectortrace.ExportTraceServiceRequest{ - ResourceSpans: orig.ResourceSpans, - }, &state) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go deleted file mode 100644 index 1a2f79f89d..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_tracestate.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -type TraceState struct { - orig *string - state *State -} - -func GetOrigTraceState(ms TraceState) *string { - return ms.orig -} - -func GetTraceStateState(ms TraceState) *State { - return ms.state -} - -func NewTraceState(orig *string, state *State) TraceState { - return TraceState{orig: orig, state: state} -} - -func GenerateTestTraceState() TraceState { - var orig string - state := StateMutable - ms := NewTraceState(&orig, &state) - FillTestTraceState(ms) - return ms -} - -func FillTestTraceState(dest TraceState) { - *dest.orig = "rojo=00f067aa0ba902b7" -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go b/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go deleted file mode 100644 index 0d5225052d..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/internal/wrapper_value.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package internal // import "go.opentelemetry.io/collector/pdata/internal" - -import ( - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -type Value struct { - orig *otlpcommon.AnyValue - state *State -} - -func GetOrigValue(ms Value) *otlpcommon.AnyValue { - return ms.orig -} - -func GetValueState(ms Value) *State { - return ms.state -} - -func NewValue(orig *otlpcommon.AnyValue, state *State) Value { - return Value{orig: orig, state: state} -} - -func FillTestValue(dest Value) { - dest.orig.Value = &otlpcommon.AnyValue_StringValue{StringValue: "v"} -} - -func GenerateTestValue() Value { - var orig otlpcommon.AnyValue - state := StateMutable - ms := NewValue(&orig, &state) - FillTestValue(ms) - return ms -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go deleted file mode 100644 index 4ca3faf037..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_byteslice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// ByteSlice represents a []byte slice. -// The instance of ByteSlice can be assigned to multiple objects since it's immutable. -// -// Must use NewByteSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type ByteSlice internal.ByteSlice - -func (ms ByteSlice) getOrig() *[]byte { - return internal.GetOrigByteSlice(internal.ByteSlice(ms)) -} - -func (ms ByteSlice) getState() *internal.State { - return internal.GetByteSliceState(internal.ByteSlice(ms)) -} - -// NewByteSlice creates a new empty ByteSlice. -func NewByteSlice() ByteSlice { - orig := []byte(nil) - state := internal.StateMutable - return ByteSlice(internal.NewByteSlice(&orig, &state)) -} - -// AsRaw returns a copy of the []byte slice. -func (ms ByteSlice) AsRaw() []byte { - return copyByteSlice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []byte into the slice ByteSlice. -func (ms ByteSlice) FromRaw(val []byte) { - ms.getState().AssertMutable() - *ms.getOrig() = copyByteSlice(*ms.getOrig(), val) -} - -// Len returns length of the []byte slice value. -// Equivalent of len(byteSlice). -func (ms ByteSlice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of byteSlice[i]. -func (ms ByteSlice) At(i int) byte { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms ByteSlice) All() iter.Seq2[int, byte] { - return func(yield func(int, byte) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets byte item at particular index. -// Equivalent of byteSlice[i] = val -func (ms ByteSlice) SetAt(i int, val byte) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures ByteSlice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]byte, len(byteSlice), newCap) -// copy(buf, byteSlice) -// byteSlice = buf -func (ms ByteSlice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]byte, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to ByteSlice. -// Equivalent of byteSlice = append(byteSlice, elms...) -func (ms ByteSlice) Append(elms ...byte) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms ByteSlice) MoveTo(dest ByteSlice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms ByteSlice) CopyTo(dest ByteSlice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyByteSlice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another ByteSlice -func (ms ByteSlice) Equal(val ByteSlice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyByteSlice(dst, src []byte) []byte { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go deleted file mode 100644 index a1bb52b096..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_float64slice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// Float64Slice represents a []float64 slice. -// The instance of Float64Slice can be assigned to multiple objects since it's immutable. -// -// Must use NewFloat64Slice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Float64Slice internal.Float64Slice - -func (ms Float64Slice) getOrig() *[]float64 { - return internal.GetOrigFloat64Slice(internal.Float64Slice(ms)) -} - -func (ms Float64Slice) getState() *internal.State { - return internal.GetFloat64SliceState(internal.Float64Slice(ms)) -} - -// NewFloat64Slice creates a new empty Float64Slice. -func NewFloat64Slice() Float64Slice { - orig := []float64(nil) - state := internal.StateMutable - return Float64Slice(internal.NewFloat64Slice(&orig, &state)) -} - -// AsRaw returns a copy of the []float64 slice. -func (ms Float64Slice) AsRaw() []float64 { - return copyFloat64Slice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []float64 into the slice Float64Slice. -func (ms Float64Slice) FromRaw(val []float64) { - ms.getState().AssertMutable() - *ms.getOrig() = copyFloat64Slice(*ms.getOrig(), val) -} - -// Len returns length of the []float64 slice value. -// Equivalent of len(float64Slice). -func (ms Float64Slice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of float64Slice[i]. -func (ms Float64Slice) At(i int) float64 { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms Float64Slice) All() iter.Seq2[int, float64] { - return func(yield func(int, float64) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets float64 item at particular index. -// Equivalent of float64Slice[i] = val -func (ms Float64Slice) SetAt(i int, val float64) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures Float64Slice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]float64, len(float64Slice), newCap) -// copy(buf, float64Slice) -// float64Slice = buf -func (ms Float64Slice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]float64, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to Float64Slice. -// Equivalent of float64Slice = append(float64Slice, elms...) -func (ms Float64Slice) Append(elms ...float64) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms Float64Slice) MoveTo(dest Float64Slice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms Float64Slice) CopyTo(dest Float64Slice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyFloat64Slice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another Float64Slice -func (ms Float64Slice) Equal(val Float64Slice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyFloat64Slice(dst, src []float64) []float64 { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go deleted file mode 100644 index d0913d9f07..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_instrumentationscope.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// InstrumentationScope is a message representing the instrumentation scope information. -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewInstrumentationScope function to create new instances. -// Important: zero-initialized instance is not valid for use. -type InstrumentationScope internal.InstrumentationScope - -func newInstrumentationScope(orig *otlpcommon.InstrumentationScope, state *internal.State) InstrumentationScope { - return InstrumentationScope(internal.NewInstrumentationScope(orig, state)) -} - -// NewInstrumentationScope creates a new empty InstrumentationScope. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewInstrumentationScope() InstrumentationScope { - state := internal.StateMutable - return newInstrumentationScope(&otlpcommon.InstrumentationScope{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms InstrumentationScope) MoveTo(dest InstrumentationScope) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = otlpcommon.InstrumentationScope{} -} - -func (ms InstrumentationScope) getOrig() *otlpcommon.InstrumentationScope { - return internal.GetOrigInstrumentationScope(internal.InstrumentationScope(ms)) -} - -func (ms InstrumentationScope) getState() *internal.State { - return internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)) -} - -// Name returns the name associated with this InstrumentationScope. -func (ms InstrumentationScope) Name() string { - return ms.getOrig().Name -} - -// SetName replaces the name associated with this InstrumentationScope. -func (ms InstrumentationScope) SetName(v string) { - ms.getState().AssertMutable() - ms.getOrig().Name = v -} - -// Version returns the version associated with this InstrumentationScope. -func (ms InstrumentationScope) Version() string { - return ms.getOrig().Version -} - -// SetVersion replaces the version associated with this InstrumentationScope. -func (ms InstrumentationScope) SetVersion(v string) { - ms.getState().AssertMutable() - ms.getOrig().Version = v -} - -// Attributes returns the Attributes associated with this InstrumentationScope. -func (ms InstrumentationScope) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetInstrumentationScopeState(internal.InstrumentationScope(ms)))) -} - -// DroppedAttributesCount returns the droppedattributescount associated with this InstrumentationScope. -func (ms InstrumentationScope) DroppedAttributesCount() uint32 { - return ms.getOrig().DroppedAttributesCount -} - -// SetDroppedAttributesCount replaces the droppedattributescount associated with this InstrumentationScope. -func (ms InstrumentationScope) SetDroppedAttributesCount(v uint32) { - ms.getState().AssertMutable() - ms.getOrig().DroppedAttributesCount = v -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms InstrumentationScope) CopyTo(dest InstrumentationScope) { - dest.getState().AssertMutable() - dest.SetName(ms.Name()) - dest.SetVersion(ms.Version()) - ms.Attributes().CopyTo(dest.Attributes()) - dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go deleted file mode 100644 index 6a7ed844da..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int32slice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// Int32Slice represents a []int32 slice. -// The instance of Int32Slice can be assigned to multiple objects since it's immutable. -// -// Must use NewInt32Slice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Int32Slice internal.Int32Slice - -func (ms Int32Slice) getOrig() *[]int32 { - return internal.GetOrigInt32Slice(internal.Int32Slice(ms)) -} - -func (ms Int32Slice) getState() *internal.State { - return internal.GetInt32SliceState(internal.Int32Slice(ms)) -} - -// NewInt32Slice creates a new empty Int32Slice. -func NewInt32Slice() Int32Slice { - orig := []int32(nil) - state := internal.StateMutable - return Int32Slice(internal.NewInt32Slice(&orig, &state)) -} - -// AsRaw returns a copy of the []int32 slice. -func (ms Int32Slice) AsRaw() []int32 { - return copyInt32Slice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []int32 into the slice Int32Slice. -func (ms Int32Slice) FromRaw(val []int32) { - ms.getState().AssertMutable() - *ms.getOrig() = copyInt32Slice(*ms.getOrig(), val) -} - -// Len returns length of the []int32 slice value. -// Equivalent of len(int32Slice). -func (ms Int32Slice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of int32Slice[i]. -func (ms Int32Slice) At(i int) int32 { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms Int32Slice) All() iter.Seq2[int, int32] { - return func(yield func(int, int32) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets int32 item at particular index. -// Equivalent of int32Slice[i] = val -func (ms Int32Slice) SetAt(i int, val int32) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures Int32Slice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]int32, len(int32Slice), newCap) -// copy(buf, int32Slice) -// int32Slice = buf -func (ms Int32Slice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]int32, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to Int32Slice. -// Equivalent of int32Slice = append(int32Slice, elms...) -func (ms Int32Slice) Append(elms ...int32) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms Int32Slice) MoveTo(dest Int32Slice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms Int32Slice) CopyTo(dest Int32Slice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyInt32Slice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another Int32Slice -func (ms Int32Slice) Equal(val Int32Slice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyInt32Slice(dst, src []int32) []int32 { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go deleted file mode 100644 index 768b0bb6e9..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_int64slice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// Int64Slice represents a []int64 slice. -// The instance of Int64Slice can be assigned to multiple objects since it's immutable. -// -// Must use NewInt64Slice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Int64Slice internal.Int64Slice - -func (ms Int64Slice) getOrig() *[]int64 { - return internal.GetOrigInt64Slice(internal.Int64Slice(ms)) -} - -func (ms Int64Slice) getState() *internal.State { - return internal.GetInt64SliceState(internal.Int64Slice(ms)) -} - -// NewInt64Slice creates a new empty Int64Slice. -func NewInt64Slice() Int64Slice { - orig := []int64(nil) - state := internal.StateMutable - return Int64Slice(internal.NewInt64Slice(&orig, &state)) -} - -// AsRaw returns a copy of the []int64 slice. -func (ms Int64Slice) AsRaw() []int64 { - return copyInt64Slice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []int64 into the slice Int64Slice. -func (ms Int64Slice) FromRaw(val []int64) { - ms.getState().AssertMutable() - *ms.getOrig() = copyInt64Slice(*ms.getOrig(), val) -} - -// Len returns length of the []int64 slice value. -// Equivalent of len(int64Slice). -func (ms Int64Slice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of int64Slice[i]. -func (ms Int64Slice) At(i int) int64 { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms Int64Slice) All() iter.Seq2[int, int64] { - return func(yield func(int, int64) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets int64 item at particular index. -// Equivalent of int64Slice[i] = val -func (ms Int64Slice) SetAt(i int, val int64) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures Int64Slice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]int64, len(int64Slice), newCap) -// copy(buf, int64Slice) -// int64Slice = buf -func (ms Int64Slice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]int64, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to Int64Slice. -// Equivalent of int64Slice = append(int64Slice, elms...) -func (ms Int64Slice) Append(elms ...int64) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms Int64Slice) MoveTo(dest Int64Slice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms Int64Slice) CopyTo(dest Int64Slice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyInt64Slice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another Int64Slice -func (ms Int64Slice) Equal(val Int64Slice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyInt64Slice(dst, src []int64) []int64 { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go deleted file mode 100644 index 1a72889d55..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_intslice.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "go.opentelemetry.io/collector/pdata/internal" -) - -// IntSlice represents a []int slice. -// The instance of IntSlice can be assigned to multiple objects since it's immutable. -// -// Must use NewIntSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type IntSlice internal.IntSlice - -func (ms IntSlice) getOrig() *[]int { - return internal.GetOrigIntSlice(internal.IntSlice(ms)) -} - -func (ms IntSlice) getState() *internal.State { - return internal.GetIntSliceState(internal.IntSlice(ms)) -} - -// NewIntSlice creates a new empty IntSlice. -func NewIntSlice() IntSlice { - orig := []int(nil) - state := internal.StateMutable - return IntSlice(internal.NewIntSlice(&orig, &state)) -} - -// AsRaw returns a copy of the []int slice. -func (ms IntSlice) AsRaw() []int { - return copyIntSlice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []int into the slice IntSlice. -func (ms IntSlice) FromRaw(val []int) { - ms.getState().AssertMutable() - *ms.getOrig() = copyIntSlice(*ms.getOrig(), val) -} - -// Len returns length of the []int slice value. -// Equivalent of len(intSlice). -func (ms IntSlice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of intSlice[i]. -func (ms IntSlice) At(i int) int { - return (*ms.getOrig())[i] -} - -// SetAt sets int item at particular index. -// Equivalent of intSlice[i] = val -func (ms IntSlice) SetAt(i int, val int) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures IntSlice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]int, len(intSlice), newCap) -// copy(buf, intSlice) -// intSlice = buf -func (ms IntSlice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]int, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to IntSlice. -// Equivalent of intSlice = append(intSlice, elms...) -func (ms IntSlice) Append(elms ...int) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms IntSlice) MoveTo(dest IntSlice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms IntSlice) CopyTo(dest IntSlice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyIntSlice(*dest.getOrig(), *ms.getOrig()) -} - -func copyIntSlice(dst, src []int) []int { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go deleted file mode 100644 index a40ab92eac..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_resource.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpresource "go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1" -) - -// Resource is a message representing the resource information. -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewResource function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Resource internal.Resource - -func newResource(orig *otlpresource.Resource, state *internal.State) Resource { - return Resource(internal.NewResource(orig, state)) -} - -// NewResource creates a new empty Resource. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewResource() Resource { - state := internal.StateMutable - return newResource(&otlpresource.Resource{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms Resource) MoveTo(dest Resource) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = otlpresource.Resource{} -} - -func (ms Resource) getOrig() *otlpresource.Resource { - return internal.GetOrigResource(internal.Resource(ms)) -} - -func (ms Resource) getState() *internal.State { - return internal.GetResourceState(internal.Resource(ms)) -} - -// Attributes returns the Attributes associated with this Resource. -func (ms Resource) Attributes() Map { - return Map(internal.NewMap(&ms.getOrig().Attributes, internal.GetResourceState(internal.Resource(ms)))) -} - -// DroppedAttributesCount returns the droppedattributescount associated with this Resource. -func (ms Resource) DroppedAttributesCount() uint32 { - return ms.getOrig().DroppedAttributesCount -} - -// SetDroppedAttributesCount replaces the droppedattributescount associated with this Resource. -func (ms Resource) SetDroppedAttributesCount(v uint32) { - ms.getState().AssertMutable() - ms.getOrig().DroppedAttributesCount = v -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms Resource) CopyTo(dest Resource) { - dest.getState().AssertMutable() - ms.Attributes().CopyTo(dest.Attributes()) - dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go deleted file mode 100644 index 57680fd185..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_stringslice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// StringSlice represents a []string slice. -// The instance of StringSlice can be assigned to multiple objects since it's immutable. -// -// Must use NewStringSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type StringSlice internal.StringSlice - -func (ms StringSlice) getOrig() *[]string { - return internal.GetOrigStringSlice(internal.StringSlice(ms)) -} - -func (ms StringSlice) getState() *internal.State { - return internal.GetStringSliceState(internal.StringSlice(ms)) -} - -// NewStringSlice creates a new empty StringSlice. -func NewStringSlice() StringSlice { - orig := []string(nil) - state := internal.StateMutable - return StringSlice(internal.NewStringSlice(&orig, &state)) -} - -// AsRaw returns a copy of the []string slice. -func (ms StringSlice) AsRaw() []string { - return copyStringSlice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []string into the slice StringSlice. -func (ms StringSlice) FromRaw(val []string) { - ms.getState().AssertMutable() - *ms.getOrig() = copyStringSlice(*ms.getOrig(), val) -} - -// Len returns length of the []string slice value. -// Equivalent of len(stringSlice). -func (ms StringSlice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of stringSlice[i]. -func (ms StringSlice) At(i int) string { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms StringSlice) All() iter.Seq2[int, string] { - return func(yield func(int, string) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets string item at particular index. -// Equivalent of stringSlice[i] = val -func (ms StringSlice) SetAt(i int, val string) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures StringSlice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]string, len(stringSlice), newCap) -// copy(buf, stringSlice) -// stringSlice = buf -func (ms StringSlice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]string, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to StringSlice. -// Equivalent of stringSlice = append(stringSlice, elms...) -func (ms StringSlice) Append(elms ...string) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms StringSlice) MoveTo(dest StringSlice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms StringSlice) CopyTo(dest StringSlice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyStringSlice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another StringSlice -func (ms StringSlice) Equal(val StringSlice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyStringSlice(dst, src []string) []string { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go deleted file mode 100644 index 17c9660261..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/generated_uint64slice.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package pcommon - -import ( - "iter" - "slices" - - "go.opentelemetry.io/collector/pdata/internal" -) - -// UInt64Slice represents a []uint64 slice. -// The instance of UInt64Slice can be assigned to multiple objects since it's immutable. -// -// Must use NewUInt64Slice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type UInt64Slice internal.UInt64Slice - -func (ms UInt64Slice) getOrig() *[]uint64 { - return internal.GetOrigUInt64Slice(internal.UInt64Slice(ms)) -} - -func (ms UInt64Slice) getState() *internal.State { - return internal.GetUInt64SliceState(internal.UInt64Slice(ms)) -} - -// NewUInt64Slice creates a new empty UInt64Slice. -func NewUInt64Slice() UInt64Slice { - orig := []uint64(nil) - state := internal.StateMutable - return UInt64Slice(internal.NewUInt64Slice(&orig, &state)) -} - -// AsRaw returns a copy of the []uint64 slice. -func (ms UInt64Slice) AsRaw() []uint64 { - return copyUInt64Slice(nil, *ms.getOrig()) -} - -// FromRaw copies raw []uint64 into the slice UInt64Slice. -func (ms UInt64Slice) FromRaw(val []uint64) { - ms.getState().AssertMutable() - *ms.getOrig() = copyUInt64Slice(*ms.getOrig(), val) -} - -// Len returns length of the []uint64 slice value. -// Equivalent of len(uInt64Slice). -func (ms UInt64Slice) Len() int { - return len(*ms.getOrig()) -} - -// At returns an item from particular index. -// Equivalent of uInt64Slice[i]. -func (ms UInt64Slice) At(i int) uint64 { - return (*ms.getOrig())[i] -} - -// All returns an iterator over index-value pairs in the slice. -func (ms UInt64Slice) All() iter.Seq2[int, uint64] { - return func(yield func(int, uint64) bool) { - for i := 0; i < ms.Len(); i++ { - if !yield(i, ms.At(i)) { - return - } - } - } -} - -// SetAt sets uint64 item at particular index. -// Equivalent of uInt64Slice[i] = val -func (ms UInt64Slice) SetAt(i int, val uint64) { - ms.getState().AssertMutable() - (*ms.getOrig())[i] = val -} - -// EnsureCapacity ensures UInt64Slice has at least the specified capacity. -// 1. If the newCap <= cap, then is no change in capacity. -// 2. If the newCap > cap, then the slice capacity will be expanded to the provided value which will be equivalent of: -// buf := make([]uint64, len(uInt64Slice), newCap) -// copy(buf, uInt64Slice) -// uInt64Slice = buf -func (ms UInt64Slice) EnsureCapacity(newCap int) { - ms.getState().AssertMutable() - oldCap := cap(*ms.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]uint64, len(*ms.getOrig()), newCap) - copy(newOrig, *ms.getOrig()) - *ms.getOrig() = newOrig -} - -// Append appends extra elements to UInt64Slice. -// Equivalent of uInt64Slice = append(uInt64Slice, elms...) -func (ms UInt64Slice) Append(elms ...uint64) { - ms.getState().AssertMutable() - *ms.getOrig() = append(*ms.getOrig(), elms...) -} - -// MoveTo moves all elements from the current slice overriding the destination and -// resetting the current instance to its zero value. -func (ms UInt64Slice) MoveTo(dest UInt64Slice) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = nil -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (ms UInt64Slice) CopyTo(dest UInt64Slice) { - dest.getState().AssertMutable() - *dest.getOrig() = copyUInt64Slice(*dest.getOrig(), *ms.getOrig()) -} - -// Equal checks equality with another UInt64Slice -func (ms UInt64Slice) Equal(val UInt64Slice) bool { - return slices.Equal(*ms.getOrig(), *val.getOrig()) -} - -func copyUInt64Slice(dst, src []uint64) []uint64 { - dst = dst[:0] - return append(dst, src...) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go deleted file mode 100644 index 32c148c03c..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/map.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "iter" - - "go.uber.org/multierr" - - "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// Map stores a map of string keys to elements of Value type. -// -// Must use NewMap function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Map internal.Map - -// NewMap creates a Map with 0 elements. -func NewMap() Map { - orig := []otlpcommon.KeyValue(nil) - state := internal.StateMutable - return Map(internal.NewMap(&orig, &state)) -} - -func (m Map) getOrig() *[]otlpcommon.KeyValue { - return internal.GetOrigMap(internal.Map(m)) -} - -func (m Map) getState() *internal.State { - return internal.GetMapState(internal.Map(m)) -} - -func newMap(orig *[]otlpcommon.KeyValue, state *internal.State) Map { - return Map(internal.NewMap(orig, state)) -} - -// Clear erases any existing entries in this Map instance. -func (m Map) Clear() { - m.getState().AssertMutable() - *m.getOrig() = nil -} - -// EnsureCapacity increases the capacity of this Map instance, if necessary, -// to ensure that it can hold at least the number of elements specified by the capacity argument. -func (m Map) EnsureCapacity(capacity int) { - m.getState().AssertMutable() - oldOrig := *m.getOrig() - if capacity <= cap(oldOrig) { - return - } - *m.getOrig() = make([]otlpcommon.KeyValue, len(oldOrig), capacity) - copy(*m.getOrig(), oldOrig) -} - -// Get returns the Value associated with the key and true. Returned -// Value is not a copy, it is a reference to the value stored in this map. -// It is allowed to modify the returned value using Value.Set* functions. -// Such modification will be applied to the value stored in this map. -// -// If the key does not exist returns a zero-initialized KeyValue and false. -// Calling any functions on the returned invalid instance may cause a panic. -func (m Map) Get(key string) (Value, bool) { - for i := range *m.getOrig() { - akv := &(*m.getOrig())[i] - if akv.Key == key { - return newValue(&akv.Value, m.getState()), true - } - } - return newValue(nil, m.getState()), false -} - -// Remove removes the entry associated with the key and returns true if the key -// was present in the map, otherwise returns false. -func (m Map) Remove(key string) bool { - m.getState().AssertMutable() - for i := range *m.getOrig() { - akv := &(*m.getOrig())[i] - if akv.Key == key { - *akv = (*m.getOrig())[len(*m.getOrig())-1] - *m.getOrig() = (*m.getOrig())[:len(*m.getOrig())-1] - return true - } - } - return false -} - -// RemoveIf removes the entries for which the function in question returns true -func (m Map) RemoveIf(f func(string, Value) bool) { - m.getState().AssertMutable() - newLen := 0 - for i := 0; i < len(*m.getOrig()); i++ { - akv := &(*m.getOrig())[i] - if f(akv.Key, newValue(&akv.Value, m.getState())) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*m.getOrig())[newLen] = (*m.getOrig())[i] - newLen++ - } - *m.getOrig() = (*m.getOrig())[:newLen] -} - -// PutEmpty inserts or updates an empty value to the map under given key -// and return the updated/inserted value. -func (m Map) PutEmpty(k string) Value { - m.getState().AssertMutable() - if av, existing := m.Get(k); existing { - av.getOrig().Value = nil - return newValue(av.getOrig(), m.getState()) - } - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k}) - return newValue(&(*m.getOrig())[len(*m.getOrig())-1].Value, m.getState()) -} - -// PutStr performs the Insert or Update action. The Value is -// inserted to the map that did not originally have the key. The key/value is -// updated to the map where the key already existed. -func (m Map) PutStr(k string, v string) { - m.getState().AssertMutable() - if av, existing := m.Get(k); existing { - av.SetStr(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueString(k, v)) - } -} - -// PutInt performs the Insert or Update action. The int Value is -// inserted to the map that did not originally have the key. The key/value is -// updated to the map where the key already existed. -func (m Map) PutInt(k string, v int64) { - m.getState().AssertMutable() - if av, existing := m.Get(k); existing { - av.SetInt(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueInt(k, v)) - } -} - -// PutDouble performs the Insert or Update action. The double Value is -// inserted to the map that did not originally have the key. The key/value is -// updated to the map where the key already existed. -func (m Map) PutDouble(k string, v float64) { - m.getState().AssertMutable() - if av, existing := m.Get(k); existing { - av.SetDouble(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueDouble(k, v)) - } -} - -// PutBool performs the Insert or Update action. The bool Value is -// inserted to the map that did not originally have the key. The key/value is -// updated to the map where the key already existed. -func (m Map) PutBool(k string, v bool) { - m.getState().AssertMutable() - if av, existing := m.Get(k); existing { - av.SetBool(v) - } else { - *m.getOrig() = append(*m.getOrig(), newKeyValueBool(k, v)) - } -} - -// PutEmptyBytes inserts or updates an empty byte slice under given key and returns it. -func (m Map) PutEmptyBytes(k string) ByteSlice { - m.getState().AssertMutable() - bv := otlpcommon.AnyValue_BytesValue{} - if av, existing := m.Get(k); existing { - av.getOrig().Value = &bv - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &bv}}) - } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, m.getState())) -} - -// PutEmptyMap inserts or updates an empty map under given key and returns it. -func (m Map) PutEmptyMap(k string) Map { - m.getState().AssertMutable() - kvl := otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{Values: []otlpcommon.KeyValue(nil)}} - if av, existing := m.Get(k); existing { - av.getOrig().Value = &kvl - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &kvl}}) - } - return Map(internal.NewMap(&kvl.KvlistValue.Values, m.getState())) -} - -// PutEmptySlice inserts or updates an empty slice under given key and returns it. -func (m Map) PutEmptySlice(k string) Slice { - m.getState().AssertMutable() - vl := otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{Values: []otlpcommon.AnyValue(nil)}} - if av, existing := m.Get(k); existing { - av.getOrig().Value = &vl - } else { - *m.getOrig() = append(*m.getOrig(), otlpcommon.KeyValue{Key: k, Value: otlpcommon.AnyValue{Value: &vl}}) - } - return Slice(internal.NewSlice(&vl.ArrayValue.Values, m.getState())) -} - -// Len returns the length of this map. -// -// Because the Map is represented internally by a slice of pointers, and the data are comping from the wire, -// it is possible that when iterating using "Range" to get access to fewer elements because nil elements are skipped. -func (m Map) Len() int { - return len(*m.getOrig()) -} - -// Range calls f sequentially for each key and value present in the map. If f returns false, range stops the iteration. -// -// Example: -// -// sm.Range(func(k string, v Value) bool { -// ... -// }) -func (m Map) Range(f func(k string, v Value) bool) { - for i := range *m.getOrig() { - kv := &(*m.getOrig())[i] - if !f(kv.Key, Value(internal.NewValue(&kv.Value, m.getState()))) { - break - } - } -} - -// All returns an iterator over key-value pairs in the Map. -// -// for k, v := range es.All() { -// ... // Do something with key-value pair -// } -func (m Map) All() iter.Seq2[string, Value] { - return func(yield func(string, Value) bool) { - for i := range *m.getOrig() { - kv := &(*m.getOrig())[i] - if !yield(kv.Key, Value(internal.NewValue(&kv.Value, m.getState()))) { - return - } - } - } -} - -// MoveTo moves all key/values from the current map overriding the destination and -// resetting the current instance to its zero value -func (m Map) MoveTo(dest Map) { - m.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if m.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *m.getOrig() - *m.getOrig() = nil -} - -// CopyTo copies all elements from the current map overriding the destination. -func (m Map) CopyTo(dest Map) { - dest.getState().AssertMutable() - newLen := len(*m.getOrig()) - oldCap := cap(*dest.getOrig()) - if newLen <= oldCap { - // New slice fits in existing slice, no need to reallocate. - *dest.getOrig() = (*dest.getOrig())[:newLen:oldCap] - for i := range *m.getOrig() { - akv := &(*m.getOrig())[i] - destAkv := &(*dest.getOrig())[i] - destAkv.Key = akv.Key - newValue(&akv.Value, m.getState()).CopyTo(newValue(&destAkv.Value, dest.getState())) - } - return - } - - // New slice is bigger than exist slice. Allocate new space. - origs := make([]otlpcommon.KeyValue, len(*m.getOrig())) - for i := range *m.getOrig() { - akv := &(*m.getOrig())[i] - origs[i].Key = akv.Key - newValue(&akv.Value, m.getState()).CopyTo(newValue(&origs[i].Value, dest.getState())) - } - *dest.getOrig() = origs -} - -// AsRaw returns a standard go map representation of this Map. -func (m Map) AsRaw() map[string]any { - rawMap := make(map[string]any, m.Len()) - m.Range(func(k string, v Value) bool { - rawMap[k] = v.AsRaw() - return true - }) - return rawMap -} - -// FromRaw overrides this Map instance from a standard go map. -func (m Map) FromRaw(rawMap map[string]any) error { - m.getState().AssertMutable() - if len(rawMap) == 0 { - *m.getOrig() = nil - return nil - } - - var errs error - origs := make([]otlpcommon.KeyValue, len(rawMap)) - ix := 0 - for k, iv := range rawMap { - origs[ix].Key = k - errs = multierr.Append(errs, newValue(&origs[ix].Value, m.getState()).FromRaw(iv)) - ix++ - } - *m.getOrig() = origs - return errs -} - -// Equal checks equality with another Map -func (m Map) Equal(val Map) bool { - if m.Len() != val.Len() { - return false - } - - fullEqual := true - - m.Range(func(k string, v Value) bool { - vv, ok := val.Get(k) - if !ok { - fullEqual = false - return fullEqual - } - - if !v.Equal(vv) { - fullEqual = false - } - return fullEqual - }) - return fullEqual -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go deleted file mode 100644 index 7e8037df32..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/slice.go +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "iter" - - "go.uber.org/multierr" - - "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// Slice logically represents a slice of Value. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Slice internal.Slice - -func newSlice(orig *[]otlpcommon.AnyValue, state *internal.State) Slice { - return Slice(internal.NewSlice(orig, state)) -} - -func (es Slice) getOrig() *[]otlpcommon.AnyValue { - return internal.GetOrigSlice(internal.Slice(es)) -} - -func (es Slice) getState() *internal.State { - return internal.GetSliceState(internal.Slice(es)) -} - -// NewSlice creates a Slice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewSlice() Slice { - orig := []otlpcommon.AnyValue(nil) - state := internal.StateMutable - return Slice(internal.NewSlice(&orig, &state)) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewSlice()". -func (es Slice) Len() int { - return len(*es.getOrig()) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es Slice) At(ix int) Value { - return newValue(&(*es.getOrig())[ix], es.getState()) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es Slice) All() iter.Seq2[int, Value] { - return func(yield func(int, Value) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es Slice) CopyTo(dest Slice) { - dest.getState().AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.getOrig()) - if srcLen <= destCap { - (*dest.getOrig()) = (*dest.getOrig())[:srcLen:destCap] - } else { - (*dest.getOrig()) = make([]otlpcommon.AnyValue, srcLen) - } - - for i := range *es.getOrig() { - newValue(&(*es.getOrig())[i], es.getState()).CopyTo(newValue(&(*dest.getOrig())[i], dest.getState())) - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new Slice can be initialized: -// -// es := NewSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es Slice) EnsureCapacity(newCap int) { - es.getState().AssertMutable() - oldCap := cap(*es.getOrig()) - if newCap <= oldCap { - return - } - - newOrig := make([]otlpcommon.AnyValue, len(*es.getOrig()), newCap) - copy(newOrig, *es.getOrig()) - *es.getOrig() = newOrig -} - -// AppendEmpty will append to the end of the slice an empty Value. -// It returns the newly added Value. -func (es Slice) AppendEmpty() Value { - es.getState().AssertMutable() - *es.getOrig() = append(*es.getOrig(), otlpcommon.AnyValue{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es Slice) MoveAndAppendTo(dest Slice) { - es.getState().AssertMutable() - dest.getState().AssertMutable() - if *dest.getOrig() == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.getOrig() = *es.getOrig() - } else { - *dest.getOrig() = append(*dest.getOrig(), *es.getOrig()...) - } - *es.getOrig() = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es Slice) RemoveIf(f func(Value) bool) { - es.getState().AssertMutable() - newLen := 0 - for i := 0; i < len(*es.getOrig()); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.getOrig())[newLen] = (*es.getOrig())[i] - newLen++ - } - *es.getOrig() = (*es.getOrig())[:newLen] -} - -// AsRaw return []any copy of the Slice. -func (es Slice) AsRaw() []any { - rawSlice := make([]any, 0, es.Len()) - for i := 0; i < es.Len(); i++ { - rawSlice = append(rawSlice, es.At(i).AsRaw()) - } - return rawSlice -} - -// FromRaw copies []any into the Slice. -func (es Slice) FromRaw(rawSlice []any) error { - es.getState().AssertMutable() - if len(rawSlice) == 0 { - *es.getOrig() = nil - return nil - } - var errs error - origs := make([]otlpcommon.AnyValue, len(rawSlice)) - for ix, iv := range rawSlice { - errs = multierr.Append(errs, newValue(&origs[ix], es.getState()).FromRaw(iv)) - } - *es.getOrig() = origs - return errs -} - -// Equal checks equality with another Slice -func (es Slice) Equal(val Slice) bool { - if es.Len() != val.Len() { - return false - } - - for i := 0; i < es.Len(); i++ { - if !es.At(i).Equal(val.At(i)) { - return false - } - } - return true -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go deleted file mode 100644 index 63399cb58c..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/spanid.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" -import ( - "encoding/hex" - - "go.opentelemetry.io/collector/pdata/internal/data" -) - -var emptySpanID = SpanID([8]byte{}) - -// SpanID is span identifier. -type SpanID [8]byte - -// NewSpanIDEmpty returns a new empty (all zero bytes) SpanID. -func NewSpanIDEmpty() SpanID { - return emptySpanID -} - -// String returns string representation of the SpanID. -// -// Important: Don't rely on this method to get a string identifier of SpanID, -// Use hex.EncodeToString explicitly instead. -// This method meant to implement Stringer interface for display purposes only. -func (ms SpanID) String() string { - if ms.IsEmpty() { - return "" - } - return hex.EncodeToString(ms[:]) -} - -// IsEmpty returns true if id doesn't contain at least one non-zero byte. -func (ms SpanID) IsEmpty() bool { - return data.SpanID(ms).IsEmpty() -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go deleted file mode 100644 index 037213a0ca..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/timestamp.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "time" -) - -// Timestamp is a time specified as UNIX Epoch time in nanoseconds since -// 1970-01-01 00:00:00 +0000 UTC. -type Timestamp uint64 - -// NewTimestampFromTime constructs a new Timestamp from the provided time.Time. -func NewTimestampFromTime(t time.Time) Timestamp { - //nolint:gosec - return Timestamp(uint64(t.UnixNano())) -} - -// AsTime converts this to a time.Time. -func (ts Timestamp) AsTime() time.Time { - //nolint:gosec - return time.Unix(0, int64(ts)).UTC() -} - -// String returns the string representation of this in UTC. -func (ts Timestamp) String() string { - return ts.AsTime().String() -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go deleted file mode 100644 index 3bde05482f..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/trace_state.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "go.opentelemetry.io/collector/pdata/internal" -) - -// TraceState represents the trace state from the w3c-trace-context. -// -// Must use NewTraceState function to create new instances. -// Important: zero-initialized instance is not valid for use. -type TraceState internal.TraceState - -func NewTraceState() TraceState { - state := internal.StateMutable - return TraceState(internal.NewTraceState(new(string), &state)) -} - -func (ms TraceState) getOrig() *string { - return internal.GetOrigTraceState(internal.TraceState(ms)) -} - -func (ms TraceState) getState() *internal.State { - return internal.GetTraceStateState(internal.TraceState(ms)) -} - -// AsRaw returns the string representation of the tracestate in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header -func (ms TraceState) AsRaw() string { - return *ms.getOrig() -} - -// FromRaw copies the string representation in w3c-trace-context format of the tracestate into this TraceState. -func (ms TraceState) FromRaw(v string) { - ms.getState().AssertMutable() - *ms.getOrig() = v -} - -// MoveTo moves the TraceState instance overriding the destination -// and resetting the current instance to its zero value. -func (ms TraceState) MoveTo(dest TraceState) { - ms.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *ms.getOrig() - *ms.getOrig() = "" -} - -// CopyTo copies the TraceState instance overriding the destination. -func (ms TraceState) CopyTo(dest TraceState) { - dest.getState().AssertMutable() - *dest.getOrig() = *ms.getOrig() -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go deleted file mode 100644 index 22ad5a5af4..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/traceid.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "encoding/hex" - - "go.opentelemetry.io/collector/pdata/internal/data" -) - -var emptyTraceID = TraceID([16]byte{}) - -// TraceID is a trace identifier. -type TraceID [16]byte - -// NewTraceIDEmpty returns a new empty (all zero bytes) TraceID. -func NewTraceIDEmpty() TraceID { - return emptyTraceID -} - -// String returns string representation of the TraceID. -// -// Important: Don't rely on this method to get a string identifier of TraceID. -// Use hex.EncodeToString explicitly instead. -// This method meant to implement Stringer interface for display purposes only. -func (ms TraceID) String() string { - if ms.IsEmpty() { - return "" - } - return hex.EncodeToString(ms[:]) -} - -// IsEmpty returns true if id doesn't contain at least one non-zero byte. -func (ms TraceID) IsEmpty() bool { - return data.TraceID(ms).IsEmpty() -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go b/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go deleted file mode 100644 index 89bb5c0d1a..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/pcommon/value.go +++ /dev/null @@ -1,526 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package pcommon // import "go.opentelemetry.io/collector/pdata/pcommon" - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "math" - "strconv" - - "go.opentelemetry.io/collector/pdata/internal" - otlpcommon "go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1" -) - -// ValueType specifies the type of Value. -type ValueType int32 - -const ( - ValueTypeEmpty ValueType = iota - ValueTypeStr - ValueTypeInt - ValueTypeDouble - ValueTypeBool - ValueTypeMap - ValueTypeSlice - ValueTypeBytes -) - -// String returns the string representation of the ValueType. -func (avt ValueType) String() string { - switch avt { - case ValueTypeEmpty: - return "Empty" - case ValueTypeStr: - return "Str" - case ValueTypeBool: - return "Bool" - case ValueTypeInt: - return "Int" - case ValueTypeDouble: - return "Double" - case ValueTypeMap: - return "Map" - case ValueTypeSlice: - return "Slice" - case ValueTypeBytes: - return "Bytes" - } - return "" -} - -// Value is a mutable cell containing any value. Typically used as an element of Map or Slice. -// Must use one of NewValue+ functions below to create new instances. -// -// Intended to be passed by value since internally it is just a pointer to actual -// value representation. For the same reason passing by value and calling setters -// will modify the original, e.g.: -// -// func f1(val Value) { val.SetInt(234) } -// func f2() { -// v := NewValueStr("a string") -// f1(v) -// _ := v.Type() // this will return ValueTypeInt -// } -// -// Important: zero-initialized instance is not valid for use. All Value functions below must -// be called only on instances that are created via NewValue+ functions. -type Value internal.Value - -// NewValueEmpty creates a new Value with an empty value. -func NewValueEmpty() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{}, &state) -} - -// NewValueStr creates a new Value with the given string value. -func NewValueStr(v string) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}}, &state) -} - -// NewValueInt creates a new Value with the given int64 value. -func NewValueInt(v int64) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{IntValue: v}}, &state) -} - -// NewValueDouble creates a new Value with the given float64 value. -func NewValueDouble(v float64) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_DoubleValue{DoubleValue: v}}, &state) -} - -// NewValueBool creates a new Value with the given bool value. -func NewValueBool(v bool) Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BoolValue{BoolValue: v}}, &state) -} - -// NewValueMap creates a new Value of map type. -func NewValueMap() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}}}, &state) -} - -// NewValueSlice creates a new Value of array type. -func NewValueSlice() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}}}, &state) -} - -// NewValueBytes creates a new empty Value of byte type. -func NewValueBytes() Value { - state := internal.StateMutable - return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_BytesValue{BytesValue: nil}}, &state) -} - -func newValue(orig *otlpcommon.AnyValue, state *internal.State) Value { - return Value(internal.NewValue(orig, state)) -} - -func (v Value) getOrig() *otlpcommon.AnyValue { - return internal.GetOrigValue(internal.Value(v)) -} - -func (v Value) getState() *internal.State { - return internal.GetValueState(internal.Value(v)) -} - -// FromRaw sets the value from the given raw value. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) FromRaw(iv any) error { - switch tv := iv.(type) { - case nil: - v.getOrig().Value = nil - case string: - v.SetStr(tv) - case int: - v.SetInt(int64(tv)) - case int8: - v.SetInt(int64(tv)) - case int16: - v.SetInt(int64(tv)) - case int32: - v.SetInt(int64(tv)) - case int64: - v.SetInt(tv) - case uint: - //nolint:gosec - v.SetInt(int64(tv)) - case uint8: - v.SetInt(int64(tv)) - case uint16: - v.SetInt(int64(tv)) - case uint32: - v.SetInt(int64(tv)) - case uint64: - //nolint:gosec - v.SetInt(int64(tv)) - case float32: - v.SetDouble(float64(tv)) - case float64: - v.SetDouble(tv) - case bool: - v.SetBool(tv) - case []byte: - v.SetEmptyBytes().FromRaw(tv) - case map[string]any: - return v.SetEmptyMap().FromRaw(tv) - case []any: - return v.SetEmptySlice().FromRaw(tv) - default: - return fmt.Errorf("", tv) - } - return nil -} - -// Type returns the type of the value for this Value. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) Type() ValueType { - switch v.getOrig().Value.(type) { - case *otlpcommon.AnyValue_StringValue: - return ValueTypeStr - case *otlpcommon.AnyValue_BoolValue: - return ValueTypeBool - case *otlpcommon.AnyValue_IntValue: - return ValueTypeInt - case *otlpcommon.AnyValue_DoubleValue: - return ValueTypeDouble - case *otlpcommon.AnyValue_KvlistValue: - return ValueTypeMap - case *otlpcommon.AnyValue_ArrayValue: - return ValueTypeSlice - case *otlpcommon.AnyValue_BytesValue: - return ValueTypeBytes - } - return ValueTypeEmpty -} - -// Str returns the string value associated with this Value. -// The shorter name is used instead of String to avoid implementing fmt.Stringer interface. -// If the Type() is not ValueTypeStr then returns empty string. -func (v Value) Str() string { - return v.getOrig().GetStringValue() -} - -// Int returns the int64 value associated with this Value. -// If the Type() is not ValueTypeInt then returns int64(0). -func (v Value) Int() int64 { - return v.getOrig().GetIntValue() -} - -// Double returns the float64 value associated with this Value. -// If the Type() is not ValueTypeDouble then returns float64(0). -func (v Value) Double() float64 { - return v.getOrig().GetDoubleValue() -} - -// Bool returns the bool value associated with this Value. -// If the Type() is not ValueTypeBool then returns false. -func (v Value) Bool() bool { - return v.getOrig().GetBoolValue() -} - -// Map returns the map value associated with this Value. -// If the function is called on zero-initialized Value or if the Type() is not ValueTypeMap -// then it returns an invalid map. Note that using such map can cause panic. -func (v Value) Map() Map { - kvlist := v.getOrig().GetKvlistValue() - if kvlist == nil { - return Map{} - } - return newMap(&kvlist.Values, internal.GetValueState(internal.Value(v))) -} - -// Slice returns the slice value associated with this Value. -// If the function is called on zero-initialized Value or if the Type() is not ValueTypeSlice -// then returns an invalid slice. Note that using such slice can cause panic. -func (v Value) Slice() Slice { - arr := v.getOrig().GetArrayValue() - if arr == nil { - return Slice{} - } - return newSlice(&arr.Values, internal.GetValueState(internal.Value(v))) -} - -// Bytes returns the ByteSlice value associated with this Value. -// If the function is called on zero-initialized Value or if the Type() is not ValueTypeBytes -// then returns an invalid ByteSlice object. Note that using such slice can cause panic. -func (v Value) Bytes() ByteSlice { - bv, ok := v.getOrig().GetValue().(*otlpcommon.AnyValue_BytesValue) - if !ok { - return ByteSlice{} - } - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, internal.GetValueState(internal.Value(v)))) -} - -// SetStr replaces the string value associated with this Value, -// it also changes the type to be ValueTypeStr. -// The shorter name is used instead of SetString to avoid implementing -// fmt.Stringer interface by the corresponding getter method. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetStr(sv string) { - v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_StringValue{StringValue: sv} -} - -// SetInt replaces the int64 value associated with this Value, -// it also changes the type to be ValueTypeInt. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetInt(iv int64) { - v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_IntValue{IntValue: iv} -} - -// SetDouble replaces the float64 value associated with this Value, -// it also changes the type to be ValueTypeDouble. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetDouble(dv float64) { - v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_DoubleValue{DoubleValue: dv} -} - -// SetBool replaces the bool value associated with this Value, -// it also changes the type to be ValueTypeBool. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetBool(bv bool) { - v.getState().AssertMutable() - v.getOrig().Value = &otlpcommon.AnyValue_BoolValue{BoolValue: bv} -} - -// SetEmptyBytes sets value to an empty byte slice and returns it. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetEmptyBytes() ByteSlice { - v.getState().AssertMutable() - bv := otlpcommon.AnyValue_BytesValue{BytesValue: nil} - v.getOrig().Value = &bv - return ByteSlice(internal.NewByteSlice(&bv.BytesValue, v.getState())) -} - -// SetEmptyMap sets value to an empty map and returns it. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetEmptyMap() Map { - v.getState().AssertMutable() - kv := &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}} - v.getOrig().Value = kv - return newMap(&kv.KvlistValue.Values, v.getState()) -} - -// SetEmptySlice sets value to an empty slice and returns it. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) SetEmptySlice() Slice { - v.getState().AssertMutable() - av := &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}} - v.getOrig().Value = av - return newSlice(&av.ArrayValue.Values, v.getState()) -} - -// MoveTo moves the Value from current overriding the destination and -// resetting the current instance to empty value. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) MoveTo(dest Value) { - v.getState().AssertMutable() - dest.getState().AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if v.getOrig() == dest.getOrig() { - return - } - *dest.getOrig() = *v.getOrig() - v.getOrig().Value = nil -} - -// CopyTo copies the Value instance overriding the destination. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) CopyTo(dest Value) { - dest.getState().AssertMutable() - destOrig := dest.getOrig() - switch ov := v.getOrig().Value.(type) { - case *otlpcommon.AnyValue_KvlistValue: - kv, ok := destOrig.Value.(*otlpcommon.AnyValue_KvlistValue) - if !ok { - kv = &otlpcommon.AnyValue_KvlistValue{KvlistValue: &otlpcommon.KeyValueList{}} - destOrig.Value = kv - } - if ov.KvlistValue == nil { - kv.KvlistValue = nil - return - } - // Deep copy to dest. - newMap(&ov.KvlistValue.Values, v.getState()).CopyTo(newMap(&kv.KvlistValue.Values, dest.getState())) - case *otlpcommon.AnyValue_ArrayValue: - av, ok := destOrig.Value.(*otlpcommon.AnyValue_ArrayValue) - if !ok { - av = &otlpcommon.AnyValue_ArrayValue{ArrayValue: &otlpcommon.ArrayValue{}} - destOrig.Value = av - } - if ov.ArrayValue == nil { - av.ArrayValue = nil - return - } - // Deep copy to dest. - newSlice(&ov.ArrayValue.Values, v.getState()).CopyTo(newSlice(&av.ArrayValue.Values, dest.getState())) - case *otlpcommon.AnyValue_BytesValue: - bv, ok := destOrig.Value.(*otlpcommon.AnyValue_BytesValue) - if !ok { - bv = &otlpcommon.AnyValue_BytesValue{} - destOrig.Value = bv - } - bv.BytesValue = make([]byte, len(ov.BytesValue)) - copy(bv.BytesValue, ov.BytesValue) - default: - // Primitive immutable type, no need for deep copy. - destOrig.Value = ov - } -} - -// AsString converts an OTLP Value object of any type to its equivalent string -// representation. This differs from Str which only returns a non-empty value -// if the ValueType is ValueTypeStr. -// Calling this function on zero-initialized Value will cause a panic. -func (v Value) AsString() string { - switch v.Type() { - case ValueTypeEmpty: - return "" - - case ValueTypeStr: - return v.Str() - - case ValueTypeBool: - return strconv.FormatBool(v.Bool()) - - case ValueTypeDouble: - return float64AsString(v.Double()) - - case ValueTypeInt: - return strconv.FormatInt(v.Int(), 10) - - case ValueTypeMap: - jsonStr, _ := json.Marshal(v.Map().AsRaw()) - return string(jsonStr) - - case ValueTypeBytes: - return base64.StdEncoding.EncodeToString(*v.Bytes().getOrig()) - - case ValueTypeSlice: - jsonStr, _ := json.Marshal(v.Slice().AsRaw()) - return string(jsonStr) - - default: - return fmt.Sprintf("", v.Type()) - } -} - -// See https://cs.opensource.google/go/go/+/refs/tags/go1.17.7:src/encoding/json/encode.go;l=585. -// This allows us to avoid using reflection. -func float64AsString(f float64) string { - if math.IsInf(f, 0) || math.IsNaN(f) { - return "json: unsupported value: " + strconv.FormatFloat(f, 'g', -1, 64) - } - - // Convert as if by ES6 number to string conversion. - // This matches most other JSON generators. - // See golang.org/issue/6384 and golang.org/issue/14135. - // Like fmt %g, but the exponent cutoffs are different - // and exponents themselves are not padded to two digits. - scratch := [64]byte{} - b := scratch[:0] - abs := math.Abs(f) - fmt := byte('f') - if abs != 0 && (abs < 1e-6 || abs >= 1e21) { - fmt = 'e' - } - b = strconv.AppendFloat(b, f, fmt, -1, 64) - if fmt == 'e' { - // clean up e-09 to e-9 - n := len(b) - if n >= 4 && b[n-4] == 'e' && b[n-3] == '-' && b[n-2] == '0' { - b[n-2] = b[n-1] - b = b[:n-1] - } - } - return string(b) -} - -func (v Value) AsRaw() any { - switch v.Type() { - case ValueTypeEmpty: - return nil - case ValueTypeStr: - return v.Str() - case ValueTypeBool: - return v.Bool() - case ValueTypeDouble: - return v.Double() - case ValueTypeInt: - return v.Int() - case ValueTypeBytes: - return v.Bytes().AsRaw() - case ValueTypeMap: - return v.Map().AsRaw() - case ValueTypeSlice: - return v.Slice().AsRaw() - } - return fmt.Sprintf("", v.Type()) -} - -func (v Value) Equal(c Value) bool { - if v.Type() != c.Type() { - return false - } - - switch v.Type() { - case ValueTypeEmpty: - return true - case ValueTypeStr: - return v.Str() == c.Str() - case ValueTypeBool: - return v.Bool() == c.Bool() - case ValueTypeDouble: - return v.Double() == c.Double() - case ValueTypeInt: - return v.Int() == c.Int() - case ValueTypeBytes: - return v.Bytes().Equal(c.Bytes()) - case ValueTypeMap: - return v.Map().Equal(c.Map()) - case ValueTypeSlice: - return v.Slice().Equal(c.Slice()) - } - - return false -} - -func newKeyValueString(k string, v string) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetStr(v) - return orig -} - -func newKeyValueInt(k string, v int64) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetInt(v) - return orig -} - -func newKeyValueDouble(k string, v float64) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetDouble(v) - return orig -} - -func newKeyValueBool(k string, v bool) otlpcommon.KeyValue { - orig := otlpcommon.KeyValue{Key: k} - state := internal.StateMutable - akv := newValue(&orig.Value, &state) - akv.SetBool(v) - return orig -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go deleted file mode 100644 index 8212a03e11..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/encoding.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -// MarshalSizer is the interface that groups the basic Marshal and Size methods -type MarshalSizer interface { - Marshaler - Sizer -} - -// Marshaler marshals pdata.Traces into bytes. -type Marshaler interface { - // MarshalTraces the given pdata.Traces into bytes. - // If the error is not nil, the returned bytes slice cannot be used. - MarshalTraces(td Traces) ([]byte, error) -} - -// Unmarshaler unmarshalls bytes into pdata.Traces. -type Unmarshaler interface { - // UnmarshalTraces the given bytes into pdata.Traces. - // If the error is not nil, the returned pdata.Traces cannot be used. - UnmarshalTraces(buf []byte) (Traces, error) -} - -// Sizer is an optional interface implemented by the Marshaler, -// that calculates the size of a marshaled Traces. -type Sizer interface { - // TracesSize returns the size in bytes of a marshaled Traces. - TracesSize(td Traces) int -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go deleted file mode 100644 index f4effe43cc..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespans.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// ResourceSpans is a collection of spans from a Resource. -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewResourceSpans function to create new instances. -// Important: zero-initialized instance is not valid for use. -type ResourceSpans struct { - orig *otlptrace.ResourceSpans - state *internal.State -} - -func newResourceSpans(orig *otlptrace.ResourceSpans, state *internal.State) ResourceSpans { - return ResourceSpans{orig: orig, state: state} -} - -// NewResourceSpans creates a new empty ResourceSpans. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewResourceSpans() ResourceSpans { - state := internal.StateMutable - return newResourceSpans(&otlptrace.ResourceSpans{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms ResourceSpans) MoveTo(dest ResourceSpans) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.ResourceSpans{} -} - -// Resource returns the resource associated with this ResourceSpans. -func (ms ResourceSpans) Resource() pcommon.Resource { - return pcommon.Resource(internal.NewResource(&ms.orig.Resource, ms.state)) -} - -// SchemaUrl returns the schemaurl associated with this ResourceSpans. -func (ms ResourceSpans) SchemaUrl() string { - return ms.orig.SchemaUrl -} - -// SetSchemaUrl replaces the schemaurl associated with this ResourceSpans. -func (ms ResourceSpans) SetSchemaUrl(v string) { - ms.state.AssertMutable() - ms.orig.SchemaUrl = v -} - -// ScopeSpans returns the ScopeSpans associated with this ResourceSpans. -func (ms ResourceSpans) ScopeSpans() ScopeSpansSlice { - return newScopeSpansSlice(&ms.orig.ScopeSpans, ms.state) -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms ResourceSpans) CopyTo(dest ResourceSpans) { - dest.state.AssertMutable() - ms.Resource().CopyTo(dest.Resource()) - dest.SetSchemaUrl(ms.SchemaUrl()) - ms.ScopeSpans().CopyTo(dest.ScopeSpans()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go deleted file mode 100644 index 48a6aa7668..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_resourcespansslice.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "iter" - "sort" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// ResourceSpansSlice logically represents a slice of ResourceSpans. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewResourceSpansSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type ResourceSpansSlice struct { - orig *[]*otlptrace.ResourceSpans - state *internal.State -} - -func newResourceSpansSlice(orig *[]*otlptrace.ResourceSpans, state *internal.State) ResourceSpansSlice { - return ResourceSpansSlice{orig: orig, state: state} -} - -// NewResourceSpansSlice creates a ResourceSpansSlice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewResourceSpansSlice() ResourceSpansSlice { - orig := []*otlptrace.ResourceSpans(nil) - state := internal.StateMutable - return newResourceSpansSlice(&orig, &state) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewResourceSpansSlice()". -func (es ResourceSpansSlice) Len() int { - return len(*es.orig) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es ResourceSpansSlice) At(i int) ResourceSpans { - return newResourceSpans((*es.orig)[i], es.state) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es ResourceSpansSlice) All() iter.Seq2[int, ResourceSpans] { - return func(yield func(int, ResourceSpans) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new ResourceSpansSlice can be initialized: -// -// es := NewResourceSpansSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es ResourceSpansSlice) EnsureCapacity(newCap int) { - es.state.AssertMutable() - oldCap := cap(*es.orig) - if newCap <= oldCap { - return - } - - newOrig := make([]*otlptrace.ResourceSpans, len(*es.orig), newCap) - copy(newOrig, *es.orig) - *es.orig = newOrig -} - -// AppendEmpty will append to the end of the slice an empty ResourceSpans. -// It returns the newly added ResourceSpans. -func (es ResourceSpansSlice) AppendEmpty() ResourceSpans { - es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.ResourceSpans{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es ResourceSpansSlice) MoveAndAppendTo(dest ResourceSpansSlice) { - es.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if es.orig == dest.orig { - return - } - if *dest.orig == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.orig = *es.orig - } else { - *dest.orig = append(*dest.orig, *es.orig...) - } - *es.orig = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es ResourceSpansSlice) RemoveIf(f func(ResourceSpans) bool) { - es.state.AssertMutable() - newLen := 0 - for i := 0; i < len(*es.orig); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.orig)[newLen] = (*es.orig)[i] - newLen++ - } - *es.orig = (*es.orig)[:newLen] -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es ResourceSpansSlice) CopyTo(dest ResourceSpansSlice) { - dest.state.AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.orig) - if srcLen <= destCap { - (*dest.orig) = (*dest.orig)[:srcLen:destCap] - for i := range *es.orig { - newResourceSpans((*es.orig)[i], es.state).CopyTo(newResourceSpans((*dest.orig)[i], dest.state)) - } - return - } - origs := make([]otlptrace.ResourceSpans, srcLen) - wrappers := make([]*otlptrace.ResourceSpans, srcLen) - for i := range *es.orig { - wrappers[i] = &origs[i] - newResourceSpans((*es.orig)[i], es.state).CopyTo(newResourceSpans(wrappers[i], dest.state)) - } - *dest.orig = wrappers -} - -// Sort sorts the ResourceSpans elements within ResourceSpansSlice given the -// provided less function so that two instances of ResourceSpansSlice -// can be compared. -func (es ResourceSpansSlice) Sort(less func(a, b ResourceSpans) bool) { - es.state.AssertMutable() - sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go deleted file mode 100644 index bf48b10a2f..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespans.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// ScopeSpans is a collection of spans from a LibraryInstrumentation. -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewScopeSpans function to create new instances. -// Important: zero-initialized instance is not valid for use. -type ScopeSpans struct { - orig *otlptrace.ScopeSpans - state *internal.State -} - -func newScopeSpans(orig *otlptrace.ScopeSpans, state *internal.State) ScopeSpans { - return ScopeSpans{orig: orig, state: state} -} - -// NewScopeSpans creates a new empty ScopeSpans. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewScopeSpans() ScopeSpans { - state := internal.StateMutable - return newScopeSpans(&otlptrace.ScopeSpans{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms ScopeSpans) MoveTo(dest ScopeSpans) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.ScopeSpans{} -} - -// Scope returns the scope associated with this ScopeSpans. -func (ms ScopeSpans) Scope() pcommon.InstrumentationScope { - return pcommon.InstrumentationScope(internal.NewInstrumentationScope(&ms.orig.Scope, ms.state)) -} - -// SchemaUrl returns the schemaurl associated with this ScopeSpans. -func (ms ScopeSpans) SchemaUrl() string { - return ms.orig.SchemaUrl -} - -// SetSchemaUrl replaces the schemaurl associated with this ScopeSpans. -func (ms ScopeSpans) SetSchemaUrl(v string) { - ms.state.AssertMutable() - ms.orig.SchemaUrl = v -} - -// Spans returns the Spans associated with this ScopeSpans. -func (ms ScopeSpans) Spans() SpanSlice { - return newSpanSlice(&ms.orig.Spans, ms.state) -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms ScopeSpans) CopyTo(dest ScopeSpans) { - dest.state.AssertMutable() - ms.Scope().CopyTo(dest.Scope()) - dest.SetSchemaUrl(ms.SchemaUrl()) - ms.Spans().CopyTo(dest.Spans()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go deleted file mode 100644 index 6640ddb450..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_scopespansslice.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "iter" - "sort" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// ScopeSpansSlice logically represents a slice of ScopeSpans. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewScopeSpansSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type ScopeSpansSlice struct { - orig *[]*otlptrace.ScopeSpans - state *internal.State -} - -func newScopeSpansSlice(orig *[]*otlptrace.ScopeSpans, state *internal.State) ScopeSpansSlice { - return ScopeSpansSlice{orig: orig, state: state} -} - -// NewScopeSpansSlice creates a ScopeSpansSlice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewScopeSpansSlice() ScopeSpansSlice { - orig := []*otlptrace.ScopeSpans(nil) - state := internal.StateMutable - return newScopeSpansSlice(&orig, &state) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewScopeSpansSlice()". -func (es ScopeSpansSlice) Len() int { - return len(*es.orig) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es ScopeSpansSlice) At(i int) ScopeSpans { - return newScopeSpans((*es.orig)[i], es.state) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es ScopeSpansSlice) All() iter.Seq2[int, ScopeSpans] { - return func(yield func(int, ScopeSpans) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new ScopeSpansSlice can be initialized: -// -// es := NewScopeSpansSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es ScopeSpansSlice) EnsureCapacity(newCap int) { - es.state.AssertMutable() - oldCap := cap(*es.orig) - if newCap <= oldCap { - return - } - - newOrig := make([]*otlptrace.ScopeSpans, len(*es.orig), newCap) - copy(newOrig, *es.orig) - *es.orig = newOrig -} - -// AppendEmpty will append to the end of the slice an empty ScopeSpans. -// It returns the newly added ScopeSpans. -func (es ScopeSpansSlice) AppendEmpty() ScopeSpans { - es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.ScopeSpans{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es ScopeSpansSlice) MoveAndAppendTo(dest ScopeSpansSlice) { - es.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if es.orig == dest.orig { - return - } - if *dest.orig == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.orig = *es.orig - } else { - *dest.orig = append(*dest.orig, *es.orig...) - } - *es.orig = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es ScopeSpansSlice) RemoveIf(f func(ScopeSpans) bool) { - es.state.AssertMutable() - newLen := 0 - for i := 0; i < len(*es.orig); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.orig)[newLen] = (*es.orig)[i] - newLen++ - } - *es.orig = (*es.orig)[:newLen] -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es ScopeSpansSlice) CopyTo(dest ScopeSpansSlice) { - dest.state.AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.orig) - if srcLen <= destCap { - (*dest.orig) = (*dest.orig)[:srcLen:destCap] - for i := range *es.orig { - newScopeSpans((*es.orig)[i], es.state).CopyTo(newScopeSpans((*dest.orig)[i], dest.state)) - } - return - } - origs := make([]otlptrace.ScopeSpans, srcLen) - wrappers := make([]*otlptrace.ScopeSpans, srcLen) - for i := range *es.orig { - wrappers[i] = &origs[i] - newScopeSpans((*es.orig)[i], es.state).CopyTo(newScopeSpans(wrappers[i], dest.state)) - } - *dest.orig = wrappers -} - -// Sort sorts the ScopeSpans elements within ScopeSpansSlice given the -// provided less function so that two instances of ScopeSpansSlice -// can be compared. -func (es ScopeSpansSlice) Sort(less func(a, b ScopeSpans) bool) { - es.state.AssertMutable() - sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go deleted file mode 100644 index 473ad37278..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_span.go +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// Span represents a single operation within a trace. -// See Span definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewSpan function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Span struct { - orig *otlptrace.Span - state *internal.State -} - -func newSpan(orig *otlptrace.Span, state *internal.State) Span { - return Span{orig: orig, state: state} -} - -// NewSpan creates a new empty Span. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewSpan() Span { - state := internal.StateMutable - return newSpan(&otlptrace.Span{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms Span) MoveTo(dest Span) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span{} -} - -// TraceID returns the traceid associated with this Span. -func (ms Span) TraceID() pcommon.TraceID { - return pcommon.TraceID(ms.orig.TraceId) -} - -// SetTraceID replaces the traceid associated with this Span. -func (ms Span) SetTraceID(v pcommon.TraceID) { - ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) -} - -// SpanID returns the spanid associated with this Span. -func (ms Span) SpanID() pcommon.SpanID { - return pcommon.SpanID(ms.orig.SpanId) -} - -// SetSpanID replaces the spanid associated with this Span. -func (ms Span) SetSpanID(v pcommon.SpanID) { - ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) -} - -// TraceState returns the tracestate associated with this Span. -func (ms Span) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) -} - -// ParentSpanID returns the parentspanid associated with this Span. -func (ms Span) ParentSpanID() pcommon.SpanID { - return pcommon.SpanID(ms.orig.ParentSpanId) -} - -// SetParentSpanID replaces the parentspanid associated with this Span. -func (ms Span) SetParentSpanID(v pcommon.SpanID) { - ms.state.AssertMutable() - ms.orig.ParentSpanId = data.SpanID(v) -} - -// Name returns the name associated with this Span. -func (ms Span) Name() string { - return ms.orig.Name -} - -// SetName replaces the name associated with this Span. -func (ms Span) SetName(v string) { - ms.state.AssertMutable() - ms.orig.Name = v -} - -// Flags returns the flags associated with this Span. -func (ms Span) Flags() uint32 { - return ms.orig.Flags -} - -// SetFlags replaces the flags associated with this Span. -func (ms Span) SetFlags(v uint32) { - ms.state.AssertMutable() - ms.orig.Flags = v -} - -// Kind returns the kind associated with this Span. -func (ms Span) Kind() SpanKind { - return SpanKind(ms.orig.Kind) -} - -// SetKind replaces the kind associated with this Span. -func (ms Span) SetKind(v SpanKind) { - ms.state.AssertMutable() - ms.orig.Kind = otlptrace.Span_SpanKind(v) -} - -// StartTimestamp returns the starttimestamp associated with this Span. -func (ms Span) StartTimestamp() pcommon.Timestamp { - return pcommon.Timestamp(ms.orig.StartTimeUnixNano) -} - -// SetStartTimestamp replaces the starttimestamp associated with this Span. -func (ms Span) SetStartTimestamp(v pcommon.Timestamp) { - ms.state.AssertMutable() - ms.orig.StartTimeUnixNano = uint64(v) -} - -// EndTimestamp returns the endtimestamp associated with this Span. -func (ms Span) EndTimestamp() pcommon.Timestamp { - return pcommon.Timestamp(ms.orig.EndTimeUnixNano) -} - -// SetEndTimestamp replaces the endtimestamp associated with this Span. -func (ms Span) SetEndTimestamp(v pcommon.Timestamp) { - ms.state.AssertMutable() - ms.orig.EndTimeUnixNano = uint64(v) -} - -// Attributes returns the Attributes associated with this Span. -func (ms Span) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) -} - -// DroppedAttributesCount returns the droppedattributescount associated with this Span. -func (ms Span) DroppedAttributesCount() uint32 { - return ms.orig.DroppedAttributesCount -} - -// SetDroppedAttributesCount replaces the droppedattributescount associated with this Span. -func (ms Span) SetDroppedAttributesCount(v uint32) { - ms.state.AssertMutable() - ms.orig.DroppedAttributesCount = v -} - -// Events returns the Events associated with this Span. -func (ms Span) Events() SpanEventSlice { - return newSpanEventSlice(&ms.orig.Events, ms.state) -} - -// DroppedEventsCount returns the droppedeventscount associated with this Span. -func (ms Span) DroppedEventsCount() uint32 { - return ms.orig.DroppedEventsCount -} - -// SetDroppedEventsCount replaces the droppedeventscount associated with this Span. -func (ms Span) SetDroppedEventsCount(v uint32) { - ms.state.AssertMutable() - ms.orig.DroppedEventsCount = v -} - -// Links returns the Links associated with this Span. -func (ms Span) Links() SpanLinkSlice { - return newSpanLinkSlice(&ms.orig.Links, ms.state) -} - -// DroppedLinksCount returns the droppedlinkscount associated with this Span. -func (ms Span) DroppedLinksCount() uint32 { - return ms.orig.DroppedLinksCount -} - -// SetDroppedLinksCount replaces the droppedlinkscount associated with this Span. -func (ms Span) SetDroppedLinksCount(v uint32) { - ms.state.AssertMutable() - ms.orig.DroppedLinksCount = v -} - -// Status returns the status associated with this Span. -func (ms Span) Status() Status { - return newStatus(&ms.orig.Status, ms.state) -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms Span) CopyTo(dest Span) { - dest.state.AssertMutable() - dest.SetTraceID(ms.TraceID()) - dest.SetSpanID(ms.SpanID()) - ms.TraceState().CopyTo(dest.TraceState()) - dest.SetParentSpanID(ms.ParentSpanID()) - dest.SetName(ms.Name()) - dest.SetFlags(ms.Flags()) - dest.SetKind(ms.Kind()) - dest.SetStartTimestamp(ms.StartTimestamp()) - dest.SetEndTimestamp(ms.EndTimestamp()) - ms.Attributes().CopyTo(dest.Attributes()) - dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) - ms.Events().CopyTo(dest.Events()) - dest.SetDroppedEventsCount(ms.DroppedEventsCount()) - ms.Links().CopyTo(dest.Links()) - dest.SetDroppedLinksCount(ms.DroppedLinksCount()) - ms.Status().CopyTo(dest.Status()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go deleted file mode 100644 index 54b5ad6971..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanevent.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// SpanEvent is a time-stamped annotation of the span, consisting of user-supplied -// text description and key-value pairs. See OTLP for event definition. -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewSpanEvent function to create new instances. -// Important: zero-initialized instance is not valid for use. -type SpanEvent struct { - orig *otlptrace.Span_Event - state *internal.State -} - -func newSpanEvent(orig *otlptrace.Span_Event, state *internal.State) SpanEvent { - return SpanEvent{orig: orig, state: state} -} - -// NewSpanEvent creates a new empty SpanEvent. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewSpanEvent() SpanEvent { - state := internal.StateMutable - return newSpanEvent(&otlptrace.Span_Event{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms SpanEvent) MoveTo(dest SpanEvent) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span_Event{} -} - -// Timestamp returns the timestamp associated with this SpanEvent. -func (ms SpanEvent) Timestamp() pcommon.Timestamp { - return pcommon.Timestamp(ms.orig.TimeUnixNano) -} - -// SetTimestamp replaces the timestamp associated with this SpanEvent. -func (ms SpanEvent) SetTimestamp(v pcommon.Timestamp) { - ms.state.AssertMutable() - ms.orig.TimeUnixNano = uint64(v) -} - -// Name returns the name associated with this SpanEvent. -func (ms SpanEvent) Name() string { - return ms.orig.Name -} - -// SetName replaces the name associated with this SpanEvent. -func (ms SpanEvent) SetName(v string) { - ms.state.AssertMutable() - ms.orig.Name = v -} - -// Attributes returns the Attributes associated with this SpanEvent. -func (ms SpanEvent) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) -} - -// DroppedAttributesCount returns the droppedattributescount associated with this SpanEvent. -func (ms SpanEvent) DroppedAttributesCount() uint32 { - return ms.orig.DroppedAttributesCount -} - -// SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanEvent. -func (ms SpanEvent) SetDroppedAttributesCount(v uint32) { - ms.state.AssertMutable() - ms.orig.DroppedAttributesCount = v -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms SpanEvent) CopyTo(dest SpanEvent) { - dest.state.AssertMutable() - dest.SetTimestamp(ms.Timestamp()) - dest.SetName(ms.Name()) - ms.Attributes().CopyTo(dest.Attributes()) - dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go deleted file mode 100644 index 7cf089a6e7..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spaneventslice.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "iter" - "sort" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// SpanEventSlice logically represents a slice of SpanEvent. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewSpanEventSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type SpanEventSlice struct { - orig *[]*otlptrace.Span_Event - state *internal.State -} - -func newSpanEventSlice(orig *[]*otlptrace.Span_Event, state *internal.State) SpanEventSlice { - return SpanEventSlice{orig: orig, state: state} -} - -// NewSpanEventSlice creates a SpanEventSlice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewSpanEventSlice() SpanEventSlice { - orig := []*otlptrace.Span_Event(nil) - state := internal.StateMutable - return newSpanEventSlice(&orig, &state) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewSpanEventSlice()". -func (es SpanEventSlice) Len() int { - return len(*es.orig) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es SpanEventSlice) At(i int) SpanEvent { - return newSpanEvent((*es.orig)[i], es.state) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es SpanEventSlice) All() iter.Seq2[int, SpanEvent] { - return func(yield func(int, SpanEvent) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new SpanEventSlice can be initialized: -// -// es := NewSpanEventSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es SpanEventSlice) EnsureCapacity(newCap int) { - es.state.AssertMutable() - oldCap := cap(*es.orig) - if newCap <= oldCap { - return - } - - newOrig := make([]*otlptrace.Span_Event, len(*es.orig), newCap) - copy(newOrig, *es.orig) - *es.orig = newOrig -} - -// AppendEmpty will append to the end of the slice an empty SpanEvent. -// It returns the newly added SpanEvent. -func (es SpanEventSlice) AppendEmpty() SpanEvent { - es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span_Event{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es SpanEventSlice) MoveAndAppendTo(dest SpanEventSlice) { - es.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if es.orig == dest.orig { - return - } - if *dest.orig == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.orig = *es.orig - } else { - *dest.orig = append(*dest.orig, *es.orig...) - } - *es.orig = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es SpanEventSlice) RemoveIf(f func(SpanEvent) bool) { - es.state.AssertMutable() - newLen := 0 - for i := 0; i < len(*es.orig); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.orig)[newLen] = (*es.orig)[i] - newLen++ - } - *es.orig = (*es.orig)[:newLen] -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es SpanEventSlice) CopyTo(dest SpanEventSlice) { - dest.state.AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.orig) - if srcLen <= destCap { - (*dest.orig) = (*dest.orig)[:srcLen:destCap] - for i := range *es.orig { - newSpanEvent((*es.orig)[i], es.state).CopyTo(newSpanEvent((*dest.orig)[i], dest.state)) - } - return - } - origs := make([]otlptrace.Span_Event, srcLen) - wrappers := make([]*otlptrace.Span_Event, srcLen) - for i := range *es.orig { - wrappers[i] = &origs[i] - newSpanEvent((*es.orig)[i], es.state).CopyTo(newSpanEvent(wrappers[i], dest.state)) - } - *dest.orig = wrappers -} - -// Sort sorts the SpanEvent elements within SpanEventSlice given the -// provided less function so that two instances of SpanEventSlice -// can be compared. -func (es SpanEventSlice) Sort(less func(a, b SpanEvent) bool) { - es.state.AssertMutable() - sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go deleted file mode 100644 index cb98d57755..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlink.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - "go.opentelemetry.io/collector/pdata/internal/data" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/pcommon" -) - -// SpanLink is a pointer from the current span to another span in the same trace or in a -// different trace. -// See Link definition in OTLP: https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/trace/v1/trace.proto -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewSpanLink function to create new instances. -// Important: zero-initialized instance is not valid for use. -type SpanLink struct { - orig *otlptrace.Span_Link - state *internal.State -} - -func newSpanLink(orig *otlptrace.Span_Link, state *internal.State) SpanLink { - return SpanLink{orig: orig, state: state} -} - -// NewSpanLink creates a new empty SpanLink. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewSpanLink() SpanLink { - state := internal.StateMutable - return newSpanLink(&otlptrace.Span_Link{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms SpanLink) MoveTo(dest SpanLink) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Span_Link{} -} - -// TraceID returns the traceid associated with this SpanLink. -func (ms SpanLink) TraceID() pcommon.TraceID { - return pcommon.TraceID(ms.orig.TraceId) -} - -// SetTraceID replaces the traceid associated with this SpanLink. -func (ms SpanLink) SetTraceID(v pcommon.TraceID) { - ms.state.AssertMutable() - ms.orig.TraceId = data.TraceID(v) -} - -// SpanID returns the spanid associated with this SpanLink. -func (ms SpanLink) SpanID() pcommon.SpanID { - return pcommon.SpanID(ms.orig.SpanId) -} - -// SetSpanID replaces the spanid associated with this SpanLink. -func (ms SpanLink) SetSpanID(v pcommon.SpanID) { - ms.state.AssertMutable() - ms.orig.SpanId = data.SpanID(v) -} - -// TraceState returns the tracestate associated with this SpanLink. -func (ms SpanLink) TraceState() pcommon.TraceState { - return pcommon.TraceState(internal.NewTraceState(&ms.orig.TraceState, ms.state)) -} - -// Flags returns the flags associated with this SpanLink. -func (ms SpanLink) Flags() uint32 { - return ms.orig.Flags -} - -// SetFlags replaces the flags associated with this SpanLink. -func (ms SpanLink) SetFlags(v uint32) { - ms.state.AssertMutable() - ms.orig.Flags = v -} - -// Attributes returns the Attributes associated with this SpanLink. -func (ms SpanLink) Attributes() pcommon.Map { - return pcommon.Map(internal.NewMap(&ms.orig.Attributes, ms.state)) -} - -// DroppedAttributesCount returns the droppedattributescount associated with this SpanLink. -func (ms SpanLink) DroppedAttributesCount() uint32 { - return ms.orig.DroppedAttributesCount -} - -// SetDroppedAttributesCount replaces the droppedattributescount associated with this SpanLink. -func (ms SpanLink) SetDroppedAttributesCount(v uint32) { - ms.state.AssertMutable() - ms.orig.DroppedAttributesCount = v -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms SpanLink) CopyTo(dest SpanLink) { - dest.state.AssertMutable() - dest.SetTraceID(ms.TraceID()) - dest.SetSpanID(ms.SpanID()) - ms.TraceState().CopyTo(dest.TraceState()) - dest.SetFlags(ms.Flags()) - ms.Attributes().CopyTo(dest.Attributes()) - dest.SetDroppedAttributesCount(ms.DroppedAttributesCount()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go deleted file mode 100644 index c34cc1283a..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanlinkslice.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "iter" - "sort" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// SpanLinkSlice logically represents a slice of SpanLink. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewSpanLinkSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type SpanLinkSlice struct { - orig *[]*otlptrace.Span_Link - state *internal.State -} - -func newSpanLinkSlice(orig *[]*otlptrace.Span_Link, state *internal.State) SpanLinkSlice { - return SpanLinkSlice{orig: orig, state: state} -} - -// NewSpanLinkSlice creates a SpanLinkSlice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewSpanLinkSlice() SpanLinkSlice { - orig := []*otlptrace.Span_Link(nil) - state := internal.StateMutable - return newSpanLinkSlice(&orig, &state) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewSpanLinkSlice()". -func (es SpanLinkSlice) Len() int { - return len(*es.orig) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es SpanLinkSlice) At(i int) SpanLink { - return newSpanLink((*es.orig)[i], es.state) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es SpanLinkSlice) All() iter.Seq2[int, SpanLink] { - return func(yield func(int, SpanLink) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new SpanLinkSlice can be initialized: -// -// es := NewSpanLinkSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es SpanLinkSlice) EnsureCapacity(newCap int) { - es.state.AssertMutable() - oldCap := cap(*es.orig) - if newCap <= oldCap { - return - } - - newOrig := make([]*otlptrace.Span_Link, len(*es.orig), newCap) - copy(newOrig, *es.orig) - *es.orig = newOrig -} - -// AppendEmpty will append to the end of the slice an empty SpanLink. -// It returns the newly added SpanLink. -func (es SpanLinkSlice) AppendEmpty() SpanLink { - es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span_Link{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es SpanLinkSlice) MoveAndAppendTo(dest SpanLinkSlice) { - es.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if es.orig == dest.orig { - return - } - if *dest.orig == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.orig = *es.orig - } else { - *dest.orig = append(*dest.orig, *es.orig...) - } - *es.orig = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es SpanLinkSlice) RemoveIf(f func(SpanLink) bool) { - es.state.AssertMutable() - newLen := 0 - for i := 0; i < len(*es.orig); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.orig)[newLen] = (*es.orig)[i] - newLen++ - } - *es.orig = (*es.orig)[:newLen] -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es SpanLinkSlice) CopyTo(dest SpanLinkSlice) { - dest.state.AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.orig) - if srcLen <= destCap { - (*dest.orig) = (*dest.orig)[:srcLen:destCap] - for i := range *es.orig { - newSpanLink((*es.orig)[i], es.state).CopyTo(newSpanLink((*dest.orig)[i], dest.state)) - } - return - } - origs := make([]otlptrace.Span_Link, srcLen) - wrappers := make([]*otlptrace.Span_Link, srcLen) - for i := range *es.orig { - wrappers[i] = &origs[i] - newSpanLink((*es.orig)[i], es.state).CopyTo(newSpanLink(wrappers[i], dest.state)) - } - *dest.orig = wrappers -} - -// Sort sorts the SpanLink elements within SpanLinkSlice given the -// provided less function so that two instances of SpanLinkSlice -// can be compared. -func (es SpanLinkSlice) Sort(less func(a, b SpanLink) bool) { - es.state.AssertMutable() - sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go deleted file mode 100644 index c53ea0f187..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_spanslice.go +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "iter" - "sort" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// SpanSlice logically represents a slice of Span. -// -// This is a reference type. If passed by value and callee modifies it, the -// caller will see the modification. -// -// Must use NewSpanSlice function to create new instances. -// Important: zero-initialized instance is not valid for use. -type SpanSlice struct { - orig *[]*otlptrace.Span - state *internal.State -} - -func newSpanSlice(orig *[]*otlptrace.Span, state *internal.State) SpanSlice { - return SpanSlice{orig: orig, state: state} -} - -// NewSpanSlice creates a SpanSlice with 0 elements. -// Can use "EnsureCapacity" to initialize with a given capacity. -func NewSpanSlice() SpanSlice { - orig := []*otlptrace.Span(nil) - state := internal.StateMutable - return newSpanSlice(&orig, &state) -} - -// Len returns the number of elements in the slice. -// -// Returns "0" for a newly instance created with "NewSpanSlice()". -func (es SpanSlice) Len() int { - return len(*es.orig) -} - -// At returns the element at the given index. -// -// This function is used mostly for iterating over all the values in the slice: -// -// for i := 0; i < es.Len(); i++ { -// e := es.At(i) -// ... // Do something with the element -// } -func (es SpanSlice) At(i int) Span { - return newSpan((*es.orig)[i], es.state) -} - -// All returns an iterator over index-value pairs in the slice. -// -// for i, v := range es.All() { -// ... // Do something with index-value pair -// } -func (es SpanSlice) All() iter.Seq2[int, Span] { - return func(yield func(int, Span) bool) { - for i := 0; i < es.Len(); i++ { - if !yield(i, es.At(i)) { - return - } - } - } -} - -// EnsureCapacity is an operation that ensures the slice has at least the specified capacity. -// 1. If the newCap <= cap then no change in capacity. -// 2. If the newCap > cap then the slice capacity will be expanded to equal newCap. -// -// Here is how a new SpanSlice can be initialized: -// -// es := NewSpanSlice() -// es.EnsureCapacity(4) -// for i := 0; i < 4; i++ { -// e := es.AppendEmpty() -// // Here should set all the values for e. -// } -func (es SpanSlice) EnsureCapacity(newCap int) { - es.state.AssertMutable() - oldCap := cap(*es.orig) - if newCap <= oldCap { - return - } - - newOrig := make([]*otlptrace.Span, len(*es.orig), newCap) - copy(newOrig, *es.orig) - *es.orig = newOrig -} - -// AppendEmpty will append to the end of the slice an empty Span. -// It returns the newly added Span. -func (es SpanSlice) AppendEmpty() Span { - es.state.AssertMutable() - *es.orig = append(*es.orig, &otlptrace.Span{}) - return es.At(es.Len() - 1) -} - -// MoveAndAppendTo moves all elements from the current slice and appends them to the dest. -// The current slice will be cleared. -func (es SpanSlice) MoveAndAppendTo(dest SpanSlice) { - es.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if es.orig == dest.orig { - return - } - if *dest.orig == nil { - // We can simply move the entire vector and avoid any allocations. - *dest.orig = *es.orig - } else { - *dest.orig = append(*dest.orig, *es.orig...) - } - *es.orig = nil -} - -// RemoveIf calls f sequentially for each element present in the slice. -// If f returns true, the element is removed from the slice. -func (es SpanSlice) RemoveIf(f func(Span) bool) { - es.state.AssertMutable() - newLen := 0 - for i := 0; i < len(*es.orig); i++ { - if f(es.At(i)) { - continue - } - if newLen == i { - // Nothing to move, element is at the right place. - newLen++ - continue - } - (*es.orig)[newLen] = (*es.orig)[i] - newLen++ - } - *es.orig = (*es.orig)[:newLen] -} - -// CopyTo copies all elements from the current slice overriding the destination. -func (es SpanSlice) CopyTo(dest SpanSlice) { - dest.state.AssertMutable() - srcLen := es.Len() - destCap := cap(*dest.orig) - if srcLen <= destCap { - (*dest.orig) = (*dest.orig)[:srcLen:destCap] - for i := range *es.orig { - newSpan((*es.orig)[i], es.state).CopyTo(newSpan((*dest.orig)[i], dest.state)) - } - return - } - origs := make([]otlptrace.Span, srcLen) - wrappers := make([]*otlptrace.Span, srcLen) - for i := range *es.orig { - wrappers[i] = &origs[i] - newSpan((*es.orig)[i], es.state).CopyTo(newSpan(wrappers[i], dest.state)) - } - *dest.orig = wrappers -} - -// Sort sorts the Span elements within SpanSlice given the -// provided less function so that two instances of SpanSlice -// can be compared. -func (es SpanSlice) Sort(less func(a, b Span) bool) { - es.state.AssertMutable() - sort.SliceStable(*es.orig, func(i, j int) bool { return less(es.At(i), es.At(j)) }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go deleted file mode 100644 index 3f637090ab..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/generated_status.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated by "pdata/internal/cmd/pdatagen/main.go". DO NOT EDIT. -// To regenerate this file run "make genpdata". - -package ptrace - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// Status is an optional final status for this span. Semantically, when Status was not -// set, that means the span ended without errors and to assume Status.Ok (code = 0). -// -// This is a reference type, if passed by value and callee modifies it the -// caller will see the modification. -// -// Must use NewStatus function to create new instances. -// Important: zero-initialized instance is not valid for use. -type Status struct { - orig *otlptrace.Status - state *internal.State -} - -func newStatus(orig *otlptrace.Status, state *internal.State) Status { - return Status{orig: orig, state: state} -} - -// NewStatus creates a new empty Status. -// -// This must be used only in testing code. Users should use "AppendEmpty" when part of a Slice, -// OR directly access the member if this is embedded in another struct. -func NewStatus() Status { - state := internal.StateMutable - return newStatus(&otlptrace.Status{}, &state) -} - -// MoveTo moves all properties from the current struct overriding the destination and -// resetting the current instance to its zero value -func (ms Status) MoveTo(dest Status) { - ms.state.AssertMutable() - dest.state.AssertMutable() - // If they point to the same data, they are the same, nothing to do. - if ms.orig == dest.orig { - return - } - *dest.orig = *ms.orig - *ms.orig = otlptrace.Status{} -} - -// Code returns the code associated with this Status. -func (ms Status) Code() StatusCode { - return StatusCode(ms.orig.Code) -} - -// SetCode replaces the code associated with this Status. -func (ms Status) SetCode(v StatusCode) { - ms.state.AssertMutable() - ms.orig.Code = otlptrace.Status_StatusCode(v) -} - -// Message returns the message associated with this Status. -func (ms Status) Message() string { - return ms.orig.Message -} - -// SetMessage replaces the message associated with this Status. -func (ms Status) SetMessage(v string) { - ms.state.AssertMutable() - ms.orig.Message = v -} - -// CopyTo copies all properties from the current struct overriding the destination. -func (ms Status) CopyTo(dest Status) { - dest.state.AssertMutable() - dest.SetCode(ms.Code()) - dest.SetMessage(ms.Message()) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go deleted file mode 100644 index 2e35a95913..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/json.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -import ( - "bytes" - "fmt" - - jsoniter "github.com/json-iterator/go" - - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" - "go.opentelemetry.io/collector/pdata/internal/json" - "go.opentelemetry.io/collector/pdata/internal/otlp" -) - -// JSONMarshaler marshals pdata.Traces to JSON bytes using the OTLP/JSON format. -type JSONMarshaler struct{} - -// MarshalTraces to the OTLP/JSON format. -func (*JSONMarshaler) MarshalTraces(td Traces) ([]byte, error) { - buf := bytes.Buffer{} - pb := internal.TracesToProto(internal.Traces(td)) - err := json.Marshal(&buf, &pb) - return buf.Bytes(), err -} - -// JSONUnmarshaler unmarshals OTLP/JSON formatted-bytes to pdata.Traces. -type JSONUnmarshaler struct{} - -// UnmarshalTraces from OTLP/JSON format into pdata.Traces. -func (*JSONUnmarshaler) UnmarshalTraces(buf []byte) (Traces, error) { - iter := jsoniter.ConfigFastest.BorrowIterator(buf) - defer jsoniter.ConfigFastest.ReturnIterator(iter) - td := NewTraces() - td.unmarshalJsoniter(iter) - if iter.Error != nil { - return Traces{}, iter.Error - } - otlp.MigrateTraces(td.getOrig().ResourceSpans) - return td, nil -} - -func (ms Traces) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resourceSpans", "resource_spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ResourceSpans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - default: - iter.Skip() - } - return true - }) -} - -func (ms ResourceSpans) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "resource": - json.ReadResource(iter, internal.GetOrigResource(internal.Resource(ms.Resource()))) - case "scopeSpans", "scope_spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.ScopeSpans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (ms ScopeSpans) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "scope": - json.ReadScope(iter, &ms.orig.Scope) - case "spans": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - ms.Spans().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "schemaUrl", "schema_url": - ms.orig.SchemaUrl = iter.ReadString() - default: - iter.Skip() - } - return true - }) -} - -func (dest Span) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "traceId", "trace_id": - if err := dest.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.traceId", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := dest.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.spanId", fmt.Sprintf("parse span_id:%v", err)) - } - case "traceState", "trace_state": - dest.TraceState().FromRaw(iter.ReadString()) - case "parentSpanId", "parent_span_id": - if err := dest.orig.ParentSpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpan.parentSpanId", fmt.Sprintf("parse parent_span_id:%v", err)) - } - case "flags": - dest.orig.Flags = json.ReadUint32(iter) - case "name": - dest.orig.Name = iter.ReadString() - case "kind": - dest.orig.Kind = otlptrace.Span_SpanKind(json.ReadEnumValue(iter, otlptrace.Span_SpanKind_value)) - case "startTimeUnixNano", "start_time_unix_nano": - dest.orig.StartTimeUnixNano = json.ReadUint64(iter) - case "endTimeUnixNano", "end_time_unix_nano": - dest.orig.EndTimeUnixNano = json.ReadUint64(iter) - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - case "events": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.Events().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "droppedEventsCount", "dropped_events_count": - dest.orig.DroppedEventsCount = json.ReadUint32(iter) - case "links": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.Links().AppendEmpty().unmarshalJsoniter(iter) - return true - }) - case "droppedLinksCount", "dropped_links_count": - dest.orig.DroppedLinksCount = json.ReadUint32(iter) - case "status": - dest.Status().unmarshalJsoniter(iter) - default: - iter.Skip() - } - return true - }) -} - -func (dest Status) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "message": - dest.orig.Message = iter.ReadString() - case "code": - dest.orig.Code = otlptrace.Status_StatusCode(json.ReadEnumValue(iter, otlptrace.Status_StatusCode_value)) - default: - iter.Skip() - } - return true - }) -} - -func (dest SpanLink) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "traceId", "trace_id": - if err := dest.orig.TraceId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpanLink", fmt.Sprintf("parse trace_id:%v", err)) - } - case "spanId", "span_id": - if err := dest.orig.SpanId.UnmarshalJSON([]byte(iter.ReadString())); err != nil { - iter.ReportError("readSpanLink", fmt.Sprintf("parse span_id:%v", err)) - } - case "traceState", "trace_state": - dest.orig.TraceState = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - case "flags": - dest.orig.Flags = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} - -func (dest SpanEvent) unmarshalJsoniter(iter *jsoniter.Iterator) { - iter.ReadObjectCB(func(iter *jsoniter.Iterator, f string) bool { - switch f { - case "timeUnixNano", "time_unix_nano": - dest.orig.TimeUnixNano = json.ReadUint64(iter) - case "name": - dest.orig.Name = iter.ReadString() - case "attributes": - iter.ReadArrayCB(func(iter *jsoniter.Iterator) bool { - dest.orig.Attributes = append(dest.orig.Attributes, json.ReadAttribute(iter)) - return true - }) - case "droppedAttributesCount", "dropped_attributes_count": - dest.orig.DroppedAttributesCount = json.ReadUint32(iter) - default: - iter.Skip() - } - return true - }) -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go deleted file mode 100644 index a3c78be27c..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/pb.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -var _ MarshalSizer = (*ProtoMarshaler)(nil) - -type ProtoMarshaler struct{} - -func (e *ProtoMarshaler) MarshalTraces(td Traces) ([]byte, error) { - pb := internal.TracesToProto(internal.Traces(td)) - return pb.Marshal() -} - -func (e *ProtoMarshaler) TracesSize(td Traces) int { - pb := internal.TracesToProto(internal.Traces(td)) - return pb.Size() -} - -func (e *ProtoMarshaler) ResourceSpansSize(rs ResourceSpans) int { - return rs.orig.Size() -} - -func (e *ProtoMarshaler) ScopeSpansSize(ss ScopeSpans) int { - return ss.orig.Size() -} - -func (e *ProtoMarshaler) SpanSize(span Span) int { - return span.orig.Size() -} - -type ProtoUnmarshaler struct{} - -func (d *ProtoUnmarshaler) UnmarshalTraces(buf []byte) (Traces, error) { - pb := otlptrace.TracesData{} - err := pb.Unmarshal(buf) - return Traces(internal.TracesFromProto(pb)), err -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go deleted file mode 100644 index 561d82cfff..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/span_kind.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// SpanKind is the type of span. Can be used to specify additional relationships between spans -// in addition to a parent/child relationship. -type SpanKind int32 - -const ( - // SpanKindUnspecified represents that the SpanKind is unspecified, it MUST NOT be used. - SpanKindUnspecified = SpanKind(otlptrace.Span_SPAN_KIND_UNSPECIFIED) - // SpanKindInternal indicates that the span represents an internal operation within an application, - // as opposed to an operation happening at the boundaries. Default value. - SpanKindInternal = SpanKind(otlptrace.Span_SPAN_KIND_INTERNAL) - // SpanKindServer indicates that the span covers server-side handling of an RPC or other - // remote network request. - SpanKindServer = SpanKind(otlptrace.Span_SPAN_KIND_SERVER) - // SpanKindClient indicates that the span describes a request to some remote service. - SpanKindClient = SpanKind(otlptrace.Span_SPAN_KIND_CLIENT) - // SpanKindProducer indicates that the span describes a producer sending a message to a broker. - // Unlike CLIENT and SERVER, there is often no direct critical path latency relationship - // between producer and consumer spans. - // A PRODUCER span ends when the message was accepted by the broker while the logical processing of - // the message might span a much longer time. - SpanKindProducer = SpanKind(otlptrace.Span_SPAN_KIND_PRODUCER) - // SpanKindConsumer indicates that the span describes consumer receiving a message from a broker. - // Like the PRODUCER kind, there is often no direct critical path latency relationship between - // producer and consumer spans. - SpanKindConsumer = SpanKind(otlptrace.Span_SPAN_KIND_CONSUMER) -) - -// String returns the string representation of the SpanKind. -func (sk SpanKind) String() string { - switch sk { - case SpanKindUnspecified: - return "Unspecified" - case SpanKindInternal: - return "Internal" - case SpanKindServer: - return "Server" - case SpanKindClient: - return "Client" - case SpanKindProducer: - return "Producer" - case SpanKindConsumer: - return "Consumer" - } - return "" -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go deleted file mode 100644 index 18a21f56ba..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/status_code.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -import ( - otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1" -) - -// StatusCode mirrors the codes defined at -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status -type StatusCode int32 - -const ( - StatusCodeUnset = StatusCode(otlptrace.Status_STATUS_CODE_UNSET) - StatusCodeOk = StatusCode(otlptrace.Status_STATUS_CODE_OK) - StatusCodeError = StatusCode(otlptrace.Status_STATUS_CODE_ERROR) -) - -// String returns the string representation of the StatusCode. -func (sc StatusCode) String() string { - switch sc { - case StatusCodeUnset: - return "Unset" - case StatusCodeOk: - return "Ok" - case StatusCodeError: - return "Error" - } - return "" -} diff --git a/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go b/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go deleted file mode 100644 index a4b71e1785..0000000000 --- a/vendor/go.opentelemetry.io/collector/pdata/ptrace/traces.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace" - -import ( - "go.opentelemetry.io/collector/pdata/internal" - otlpcollectortrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1" -) - -// Traces is the top-level struct that is propagated through the traces pipeline. -// Use NewTraces to create new instance, zero-initialized instance is not valid for use. -type Traces internal.Traces - -func newTraces(orig *otlpcollectortrace.ExportTraceServiceRequest) Traces { - state := internal.StateMutable - return Traces(internal.NewTraces(orig, &state)) -} - -func (ms Traces) getOrig() *otlpcollectortrace.ExportTraceServiceRequest { - return internal.GetOrigTraces(internal.Traces(ms)) -} - -func (ms Traces) getState() *internal.State { - return internal.GetTracesState(internal.Traces(ms)) -} - -// NewTraces creates a new Traces struct. -func NewTraces() Traces { - return newTraces(&otlpcollectortrace.ExportTraceServiceRequest{}) -} - -// IsReadOnly returns true if this Traces instance is read-only. -func (ms Traces) IsReadOnly() bool { - return *ms.getState() == internal.StateReadOnly -} - -// CopyTo copies the Traces instance overriding the destination. -func (ms Traces) CopyTo(dest Traces) { - ms.ResourceSpans().CopyTo(dest.ResourceSpans()) -} - -// SpanCount calculates the total number of spans. -func (ms Traces) SpanCount() int { - spanCount := 0 - rss := ms.ResourceSpans() - for i := 0; i < rss.Len(); i++ { - rs := rss.At(i) - ilss := rs.ScopeSpans() - for j := 0; j < ilss.Len(); j++ { - spanCount += ilss.At(j).Spans().Len() - } - } - return spanCount -} - -// ResourceSpans returns the ResourceSpansSlice associated with this Metrics. -func (ms Traces) ResourceSpans() ResourceSpansSlice { - return newResourceSpansSlice(&ms.getOrig().ResourceSpans, internal.GetTracesState(internal.Traces(ms))) -} - -// MarkReadOnly marks the Traces as shared so that no further modifications can be done on it. -func (ms Traces) MarkReadOnly() { - internal.SetTracesState(internal.Traces(ms), internal.StateReadOnly) -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/LICENSE b/vendor/go.opentelemetry.io/collector/semconv/LICENSE deleted file mode 100644 index d645695673..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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 - - 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] - - 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/go.opentelemetry.io/collector/semconv/v1.17.0/generated_event.go b/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_event.go deleted file mode 100644 index aaae5352a9..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_event.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -// This semantic convention defines the attributes used to represent a feature flag evaluation as an event. -const ( - // The unique identifier of the feature flag. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'logo-color' - AttributeFeatureFlagKey = "feature_flag.key" - // The name of the service provider that performs the flag evaluation. - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'Flag Manager' - AttributeFeatureFlagProviderName = "feature_flag.provider_name" - // SHOULD be a semantic identifier for a value. If one is unavailable, a - // stringified version of the value can be used. - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides a - // means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant red maybe be used for the value #c05543.A stringified - // version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - AttributeFeatureFlagVariant = "feature_flag.variant" -) - -// RPC received/sent message. -const ( - // Whether this is a received or sent message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeMessageType = "message.type" - // MUST be calculated as two different counters starting from 1 one for sent - // messages and one for received message. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Note: This way we guarantee that the values will be consistent between - // different implementations. - AttributeMessageID = "message.id" - // Compressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - AttributeMessageCompressedSize = "message.compressed_size" - // Uncompressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - AttributeMessageUncompressedSize = "message.uncompressed_size" -) - -const ( - // sent - AttributeMessageTypeSent = "SENT" - // received - AttributeMessageTypeReceived = "RECEIVED" -) - -// This document defines the attributes used to report a single exception associated with a span. -const ( - // SHOULD be set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's __exit__ method in Python) but will - // usually be caught at the point of recording the exception in most languages.It - // is usually not possible to determine at the point where an exception is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending the span, - // as done in the example above.It follows that an exception may still escape the - // scope of the span - // even if the exception.escaped attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - AttributeExceptionEscaped = "exception.escaped" -) - -func GetEventSemanticConventionAttributeNames() []string { - return []string{ - AttributeFeatureFlagKey, - AttributeFeatureFlagProviderName, - AttributeFeatureFlagVariant, - AttributeMessageType, - AttributeMessageID, - AttributeMessageCompressedSize, - AttributeMessageUncompressedSize, - AttributeExceptionEscaped, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_resource.go b/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_resource.go deleted file mode 100644 index 3ab9f86d56..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_resource.go +++ /dev/null @@ -1,1168 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -// The web browser in which the application represented by the resource is running. The `browser.*` attributes MUST be used only for resources that represent applications running in a web browser (regardless of whether running on a mobile or desktop device). -const ( - // Array of brand name and version separated by a space - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.brands). - AttributeBrowserBrands = "browser.brands" - // The platform on which the browser is running - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.platform). If unavailable, the legacy - // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be - // left unset in order for the values to be consistent. - // The list of possible values is defined in the W3C User-Agent Client Hints - // specification. Note that some (but not all) of these values can overlap with - // values in the os.type and os.name attributes. However, for consistency, the - // values in the browser.platform attribute should capture the exact value that - // the user agent provides. - AttributeBrowserPlatform = "browser.platform" - // A boolean that is true if the browser is running on a mobile device - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left - // unset. - AttributeBrowserMobile = "browser.mobile" - // Full user-agent string provided by the browser - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 - // (KHTML, ' - // 'like Gecko) Chrome/95.0.4638.54 Safari/537.36' - // Note: The user-agent value SHOULD be provided only from browsers that do not - // have a mechanism to retrieve brands and platform individually from the User- - // Agent Client Hints API. To retrieve the value, the legacy navigator.userAgent - // API can be used. - AttributeBrowserUserAgent = "browser.user_agent" - // Preferred language of the user using the browser - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // navigator.language. - AttributeBrowserLanguage = "browser.language" -) - -// A cloud environment (e.g. GCP, Azure, AWS) -const ( - // Name of the cloud provider. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeCloudProvider = "cloud.provider" - // The cloud account ID the resource is assigned to. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '111111111111', 'opentelemetry' - AttributeCloudAccountID = "cloud.account.id" - // The geographical region the resource is running. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for example - // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or - // Tencent Cloud regions. - AttributeCloudRegion = "cloud.region" - // Cloud regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the resource - // is running. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and - // Google Cloud. - AttributeCloudAvailabilityZone = "cloud.availability_zone" - // The cloud platform in use. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Note: The prefix of the service SHOULD match the one specified in - // cloud.provider. - AttributeCloudPlatform = "cloud.platform" -) - -const ( - // Alibaba Cloud - AttributeCloudProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeCloudProviderAWS = "aws" - // Microsoft Azure - AttributeCloudProviderAzure = "azure" - // Google Cloud Platform - AttributeCloudProviderGCP = "gcp" - // IBM Cloud - AttributeCloudProviderIbmCloud = "ibm_cloud" - // Tencent Cloud - AttributeCloudProviderTencentCloud = "tencent_cloud" -) - -const ( - // Alibaba Cloud Elastic Compute Service - AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" - // Alibaba Cloud Function Compute - AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" - // Red Hat OpenShift on Alibaba Cloud - AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" - // AWS Elastic Compute Cloud - AttributeCloudPlatformAWSEC2 = "aws_ec2" - // AWS Elastic Container Service - AttributeCloudPlatformAWSECS = "aws_ecs" - // AWS Elastic Kubernetes Service - AttributeCloudPlatformAWSEKS = "aws_eks" - // AWS Lambda - AttributeCloudPlatformAWSLambda = "aws_lambda" - // AWS Elastic Beanstalk - AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" - // AWS App Runner - AttributeCloudPlatformAWSAppRunner = "aws_app_runner" - // Red Hat OpenShift on AWS (ROSA) - AttributeCloudPlatformAWSOpenshift = "aws_openshift" - // Azure Virtual Machines - AttributeCloudPlatformAzureVM = "azure_vm" - // Azure Container Instances - AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" - // Azure Kubernetes Service - AttributeCloudPlatformAzureAKS = "azure_aks" - // Azure Functions - AttributeCloudPlatformAzureFunctions = "azure_functions" - // Azure App Service - AttributeCloudPlatformAzureAppService = "azure_app_service" - // Azure Red Hat OpenShift - AttributeCloudPlatformAzureOpenshift = "azure_openshift" - // Google Cloud Compute Engine (GCE) - AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" - // Google Cloud Run - AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" - // Google Cloud Kubernetes Engine (GKE) - AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" - // Google Cloud Functions (GCF) - AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" - // Google Cloud App Engine (GAE) - AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" - // Red Hat OpenShift on Google Cloud - AttributeCloudPlatformGoogleCloudOpenshift = "google_cloud_openshift" - // Red Hat OpenShift on IBM Cloud - AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" - // Tencent Cloud Cloud Virtual Machine (CVM) - AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" - // Tencent Cloud Elastic Kubernetes Service (EKS) - AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" - // Tencent Cloud Serverless Cloud Function (SCF) - AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" -) - -// Resources used by AWS Elastic Container Service (ECS). -const ( - // The Amazon Resource Name (ARN) of an ECS container instance. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AttributeAWSECSContainerARN = "aws.ecs.container.arn" - // The ARN of an ECS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" - // The launch type for an ECS task. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeAWSECSLaunchtype = "aws.ecs.launchtype" - // The ARN of an ECS task definition. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSECSTaskARN = "aws.ecs.task.arn" - // The task definition family this task definition is a member of. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry-family' - AttributeAWSECSTaskFamily = "aws.ecs.task.family" - // The revision for this task definition. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '8', '26' - AttributeAWSECSTaskRevision = "aws.ecs.task.revision" -) - -const ( - // ec2 - AttributeAWSECSLaunchtypeEC2 = "ec2" - // fargate - AttributeAWSECSLaunchtypeFargate = "fargate" -) - -// Resources used by AWS Elastic Kubernetes Service (EKS). -const ( - // The ARN of an EKS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" -) - -// Resources specific to Amazon Web Services. -const ( - // The name(s) of the AWS log group(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like multi-container - // applications, where a single application has sidecar containers, and each write - // to their own log group. - AttributeAWSLogGroupNames = "aws.log.group.names" - // The Amazon Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the log group ARN format documentation. - AttributeAWSLogGroupARNs = "aws.log.group.arns" - // The name(s) of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSLogStreamNames = "aws.log.stream.names" - // The ARN(s) of the AWS log stream(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- - // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the log stream ARN format documentation. One log group can contain - // several log streams, so these ARNs necessarily identify both a log group and a - // log stream. - AttributeAWSLogStreamARNs = "aws.log.stream.arns" -) - -// A container instance. -const ( - // Container name used by container runtime. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry-autoconf' - AttributeContainerName = "container.name" - // Container ID. Usually a UUID, as for example used to identify Docker - // containers. The UUID might be abbreviated. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'a3bf90e006b2' - AttributeContainerID = "container.id" - // The container runtime managing this container. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'docker', 'containerd', 'rkt' - AttributeContainerRuntime = "container.runtime" - // Name of the image the container was built on. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'gcr.io/opentelemetry/operator' - AttributeContainerImageName = "container.image.name" - // Container image tag. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '0.1' - AttributeContainerImageTag = "container.image.tag" -) - -// The software deployment. -const ( - // Name of the deployment environment (aka deployment tier). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'staging', 'production' - AttributeDeploymentEnvironment = "deployment.environment" -) - -// The device on which the process represented by this resource is running. -const ( - // A unique identifier representing the device - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values outlined - // below. This value is not an advertising identifier and MUST NOT be used as - // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor - // identifier. On Android (Java or Kotlin), this value MUST be equal to the - // Firebase Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found here on best - // practices and exact implementation details. Caution should be taken when - // storing personal data or anything which can identify a user. GDPR and data - // protection laws may apply, ensure you do your own due diligence. - AttributeDeviceID = "device.id" - // The model identifier for the device - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine readable version of the - // model identifier rather than the market or consumer-friendly name of the - // device. - AttributeDeviceModelIdentifier = "device.model.identifier" - // The marketing name for the device model - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human readable version of the - // device model rather than a machine readable alternative. - AttributeDeviceModelName = "device.model.name" - // The name of the device manufacturer - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode - // the value Apple. - AttributeDeviceManufacturer = "device.manufacturer" -) - -// A serverless instance. -const ( - // The name of the single function that this runtime instance executes. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // code.namespace/code.function - // span attributes).For some cloud providers, the above definition is ambiguous. - // The following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud providers/products:
      - //
    • Azure: The full name /, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the faas.id attribute).
    • - //
    - AttributeFaaSName = "faas.name" - // The unique ID of the single function that this runtime instance executes. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function' - // Note: On some cloud providers, it may not be possible to determine the full ID - // at startup, - // so consider setting faas.id as a span attribute instead.The exact value to use - // for faas.id depends on the cloud provider:
      - //
    • AWS Lambda: The function ARN. - // Take care not to use the "invoked ARN" directly but replace any - // alias suffix - // with the resolved function version, as the same runtime instance may be - // invocable with - // multiple different aliases.
    • - //
    • GCP: The URI of the resource
    • - //
    • Azure: The Fully Qualified Resource ID of the invoked function, - // not the function app, having the form - // /subscriptions//resourceGroups//providers/Microsoft.Web/s - // ites//functions/. - // This means that a span attribute MUST be used, as an Azure function app can - // host multiple functions that would usually share - // a TracerProvider.
    • - //
    - AttributeFaaSID = "faas.id" - // The immutable version of the function being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use:
      - //
    • AWS Lambda: The function version - // (an integer represented as a decimal string).
    • - //
    • Google Cloud Run: The revision - // (i.e., the function name plus the revision suffix).
    • - //
    • Google Cloud Functions: The value of the - // K_REVISION environment variable.
    • - //
    • Azure Functions: Not applicable. Do not set this attribute.
    • - //
    - AttributeFaaSVersion = "faas.version" - // The execution environment ID as a string, that will be potentially reused for - // other invocations to the same function/function version. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note:
      - //
    • AWS Lambda: Use the (full) log stream name.
    • - //
    - AttributeFaaSInstance = "faas.instance" - // The amount of memory available to the serverless function in MiB. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 128 - // Note: It's recommended to set this attribute since e.g. too little memory can - // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, - // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this - // information. - AttributeFaaSMaxMemory = "faas.max_memory" -) - -// A host is defined as a general computing instance. -const ( - // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud - // provider. For non-containerized Linux systems, the machine-id located in - // /etc/machine-id or /var/lib/dbus/machine-id may be used. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - AttributeHostID = "host.id" - // Name of the host. On Unix systems, it may contain what the hostname command - // returns, or the fully qualified hostname, or another name specified by the - // user. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry-test' - AttributeHostName = "host.name" - // Type of host. For Cloud, this must be the machine type. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'n1-standard-1' - AttributeHostType = "host.type" - // The CPU architecture the host system is running on. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeHostArch = "host.arch" - // Name of the VM image or OS install the host was instantiated from. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - AttributeHostImageName = "host.image.name" - // VM image ID. For Cloud, this value is from the provider. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'ami-07b06b442921831e5' - AttributeHostImageID = "host.image.id" - // The version string of the VM image as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '0.1' - AttributeHostImageVersion = "host.image.version" -) - -const ( - // AMD64 - AttributeHostArchAMD64 = "amd64" - // ARM32 - AttributeHostArchARM32 = "arm32" - // ARM64 - AttributeHostArchARM64 = "arm64" - // Itanium - AttributeHostArchIA64 = "ia64" - // 32-bit PowerPC - AttributeHostArchPPC32 = "ppc32" - // 64-bit PowerPC - AttributeHostArchPPC64 = "ppc64" - // IBM z/Architecture - AttributeHostArchS390x = "s390x" - // 32-bit x86 - AttributeHostArchX86 = "x86" -) - -// A Kubernetes Cluster. -const ( - // The name of the cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry-cluster' - AttributeK8SClusterName = "k8s.cluster.name" -) - -// A Kubernetes Node object. -const ( - // The name of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'node-1' - AttributeK8SNodeName = "k8s.node.name" - // The UID of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - AttributeK8SNodeUID = "k8s.node.uid" -) - -// A Kubernetes Namespace. -const ( - // The name of the namespace that the pod is running in. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'default' - AttributeK8SNamespaceName = "k8s.namespace.name" -) - -// A Kubernetes Pod object. -const ( - // The UID of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SPodUID = "k8s.pod.uid" - // The name of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry-pod-autoconf' - AttributeK8SPodName = "k8s.pod.name" -) - -// A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -const ( - // The name of the Container from Pod specification, must be unique within a Pod. - // Container runtime usually uses different globally unique name (container.name). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'redis' - AttributeK8SContainerName = "k8s.container.name" - // Number of times the container was restarted. This attribute can be used to - // identify a particular container (running or stopped) within a container spec. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 0, 2 - AttributeK8SContainerRestartCount = "k8s.container.restart_count" -) - -// A Kubernetes ReplicaSet object. -const ( - // The UID of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SReplicaSetUID = "k8s.replicaset.uid" - // The name of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SReplicaSetName = "k8s.replicaset.name" -) - -// A Kubernetes Deployment object. -const ( - // The UID of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDeploymentUID = "k8s.deployment.uid" - // The name of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SDeploymentName = "k8s.deployment.name" -) - -// A Kubernetes StatefulSet object. -const ( - // The UID of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SStatefulSetUID = "k8s.statefulset.uid" - // The name of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SStatefulSetName = "k8s.statefulset.name" -) - -// A Kubernetes DaemonSet object. -const ( - // The UID of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDaemonSetUID = "k8s.daemonset.uid" - // The name of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SDaemonSetName = "k8s.daemonset.name" -) - -// A Kubernetes Job object. -const ( - // The UID of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SJobUID = "k8s.job.uid" - // The name of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SJobName = "k8s.job.name" -) - -// A Kubernetes CronJob object. -const ( - // The UID of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SCronJobUID = "k8s.cronjob.uid" - // The name of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SCronJobName = "k8s.cronjob.name" -) - -// The operating system (OS) on which the process represented by this resource is running. -const ( - // The operating system type. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeOSType = "os.type" - // Human readable (not intended to be parsed) OS version information, like e.g. - // reported by ver or lsb_release -a commands. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' - AttributeOSDescription = "os.description" - // Human readable operating system name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'iOS', 'Android', 'Ubuntu' - AttributeOSName = "os.name" - // The version string of the operating system as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '14.2.1', '18.04.1' - AttributeOSVersion = "os.version" -) - -const ( - // Microsoft Windows - AttributeOSTypeWindows = "windows" - // Linux - AttributeOSTypeLinux = "linux" - // Apple Darwin - AttributeOSTypeDarwin = "darwin" - // FreeBSD - AttributeOSTypeFreeBSD = "freebsd" - // NetBSD - AttributeOSTypeNetBSD = "netbsd" - // OpenBSD - AttributeOSTypeOpenBSD = "openbsd" - // DragonFly BSD - AttributeOSTypeDragonflyBSD = "dragonflybsd" - // HP-UX (Hewlett Packard Unix) - AttributeOSTypeHPUX = "hpux" - // AIX (Advanced Interactive eXecutive) - AttributeOSTypeAIX = "aix" - // SunOS, Oracle Solaris - AttributeOSTypeSolaris = "solaris" - // IBM z/OS - AttributeOSTypeZOS = "z_os" -) - -// An operating system process. -const ( - // Process identifier (PID). - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 1234 - AttributeProcessPID = "process.pid" - // Parent Process identifier (PID). - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 111 - AttributeProcessParentPID = "process.parent_pid" - // The name of the process executable. On Linux based systems, can be set to the - // Name in proc/[pid]/status. On Windows, can be set to the base name of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Conditionally Required - See alternative attributes below. - // Stability: stable - // Examples: 'otelcol' - AttributeProcessExecutableName = "process.executable.name" - // The full path to the process executable. On Linux based systems, can be set to - // the target of proc/[pid]/exe. On Windows, can be set to the result of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Conditionally Required - See alternative attributes below. - // Stability: stable - // Examples: '/usr/bin/cmd/otelcol' - AttributeProcessExecutablePath = "process.executable.path" - // The command used to launch the process (i.e. the command name). On Linux based - // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can - // be set to the first parameter extracted from GetCommandLineW. - // - // Type: string - // Requirement Level: Conditionally Required - See alternative attributes below. - // Stability: stable - // Examples: 'cmd/otelcol' - AttributeProcessCommand = "process.command" - // The full command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of GetCommandLineW. Do not - // set this if you have to assemble it just for monitoring; use - // process.command_args instead. - // - // Type: string - // Requirement Level: Conditionally Required - See alternative attributes below. - // Stability: stable - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - AttributeProcessCommandLine = "process.command_line" - // All the command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited strings - // extracted from proc/[pid]/cmdline. For libc-based executables, this would be - // the full argv vector passed to main. - // - // Type: string[] - // Requirement Level: Conditionally Required - See alternative attributes below. - // Stability: stable - // Examples: 'cmd/otecol', '--config=config.yaml' - AttributeProcessCommandArgs = "process.command_args" - // The username of the user that owns the process. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'root' - AttributeProcessOwner = "process.owner" -) - -// The single (language) runtime instance which is monitored. -const ( - // The name of the runtime of this process. For compiled native binaries, this - // SHOULD be the name of the compiler. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'OpenJDK Runtime Environment' - AttributeProcessRuntimeName = "process.runtime.name" - // The version of the runtime of this process, as returned by the runtime without - // modification. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '14.0.2' - AttributeProcessRuntimeVersion = "process.runtime.version" - // An additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - AttributeProcessRuntimeDescription = "process.runtime.description" -) - -// A service instance. -const ( - // Logical name of the service. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled services. If - // the value was not specified, SDKs MUST fallback to unknown_service: - // concatenated with process.executable.name, e.g. unknown_service:bash. If - // process.executable.name is not available, the value MUST be set to - // unknown_service. - AttributeServiceName = "service.name" - // A namespace for service.name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group of - // services, for example the team name that owns a group of services. service.name - // is expected to be unique within the same namespace. If service.namespace is not - // specified in the Resource then service.name is expected to be unique for all - // services that have no explicit namespace defined (so the empty/unspecified - // namespace is simply one more valid namespace). Zero-length namespace string is - // assumed equal to unspecified namespace. - AttributeServiceNamespace = "service.namespace" - // The string ID of the service instance. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // service.namespace,service.name pair (in other words - // service.namespace,service.name,service.instance.id triplet MUST be globally - // unique). The ID helps to distinguish instances of the same service that exist - // at the same time (e.g. instances of a horizontally scaled service). It is - // preferable for the ID to be persistent and stay the same for the lifetime of - // the service instance, however it is acceptable that the ID is ephemeral and - // changes during important lifetime events for the service (e.g. service - // restarts). If the service has no inherent unique ID that can be used as the - // value of this attribute it is recommended to generate a random Version 1 or - // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use - // Version 5, see RFC 4122 for more recommendations). - AttributeServiceInstanceID = "service.instance.id" - // The version string of the service API or implementation. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2.0.0' - AttributeServiceVersion = "service.version" -) - -// The telemetry SDK used to capture data recorded by the instrumentation libraries. -const ( - // The name of the telemetry SDK as defined above. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'opentelemetry' - AttributeTelemetrySDKName = "telemetry.sdk.name" - // The language of the telemetry SDK. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeTelemetrySDKLanguage = "telemetry.sdk.language" - // The version string of the telemetry SDK. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetrySDKVersion = "telemetry.sdk.version" - // The version string of the auto instrumentation agent, if used. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetryAutoVersion = "telemetry.auto.version" -) - -const ( - // cpp - AttributeTelemetrySDKLanguageCPP = "cpp" - // dotnet - AttributeTelemetrySDKLanguageDotnet = "dotnet" - // erlang - AttributeTelemetrySDKLanguageErlang = "erlang" - // go - AttributeTelemetrySDKLanguageGo = "go" - // java - AttributeTelemetrySDKLanguageJava = "java" - // nodejs - AttributeTelemetrySDKLanguageNodejs = "nodejs" - // php - AttributeTelemetrySDKLanguagePHP = "php" - // python - AttributeTelemetrySDKLanguagePython = "python" - // ruby - AttributeTelemetrySDKLanguageRuby = "ruby" - // webjs - AttributeTelemetrySDKLanguageWebjs = "webjs" - // swift - AttributeTelemetrySDKLanguageSwift = "swift" -) - -// Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. -const ( - // The name of the web engine. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'WildFly' - AttributeWebEngineName = "webengine.name" - // The version of the web engine. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '21.0.0' - AttributeWebEngineVersion = "webengine.version" - // Additional description of the web engine (e.g. detailed version and edition - // information). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' - AttributeWebEngineDescription = "webengine.description" -) - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. -const ( - // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - AttributeOtelScopeName = "otel.scope.name" - // The version of the instrumentation scope - (InstrumentationScope.Version in - // OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.0.0' - AttributeOtelScopeVersion = "otel.scope.version" -) - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry Scope's concepts. -const ( - // Deprecated, use the otel.scope.name attribute. - // - // Type: string - // Requirement Level: Optional - // Stability: deprecated - // Examples: 'io.opentelemetry.contrib.mongodb' - AttributeOtelLibraryName = "otel.library.name" - // Deprecated, use the otel.scope.version attribute. - // - // Type: string - // Requirement Level: Optional - // Stability: deprecated - // Examples: '1.0.0' - AttributeOtelLibraryVersion = "otel.library.version" -) - -func GetResourceSemanticConventionAttributeNames() []string { - return []string{ - AttributeBrowserBrands, - AttributeBrowserPlatform, - AttributeBrowserMobile, - AttributeBrowserUserAgent, - AttributeBrowserLanguage, - AttributeCloudProvider, - AttributeCloudAccountID, - AttributeCloudRegion, - AttributeCloudAvailabilityZone, - AttributeCloudPlatform, - AttributeAWSECSContainerARN, - AttributeAWSECSClusterARN, - AttributeAWSECSLaunchtype, - AttributeAWSECSTaskARN, - AttributeAWSECSTaskFamily, - AttributeAWSECSTaskRevision, - AttributeAWSEKSClusterARN, - AttributeAWSLogGroupNames, - AttributeAWSLogGroupARNs, - AttributeAWSLogStreamNames, - AttributeAWSLogStreamARNs, - AttributeContainerName, - AttributeContainerID, - AttributeContainerRuntime, - AttributeContainerImageName, - AttributeContainerImageTag, - AttributeDeploymentEnvironment, - AttributeDeviceID, - AttributeDeviceModelIdentifier, - AttributeDeviceModelName, - AttributeDeviceManufacturer, - AttributeFaaSName, - AttributeFaaSID, - AttributeFaaSVersion, - AttributeFaaSInstance, - AttributeFaaSMaxMemory, - AttributeHostID, - AttributeHostName, - AttributeHostType, - AttributeHostArch, - AttributeHostImageName, - AttributeHostImageID, - AttributeHostImageVersion, - AttributeK8SClusterName, - AttributeK8SNodeName, - AttributeK8SNodeUID, - AttributeK8SNamespaceName, - AttributeK8SPodUID, - AttributeK8SPodName, - AttributeK8SContainerName, - AttributeK8SContainerRestartCount, - AttributeK8SReplicaSetUID, - AttributeK8SReplicaSetName, - AttributeK8SDeploymentUID, - AttributeK8SDeploymentName, - AttributeK8SStatefulSetUID, - AttributeK8SStatefulSetName, - AttributeK8SDaemonSetUID, - AttributeK8SDaemonSetName, - AttributeK8SJobUID, - AttributeK8SJobName, - AttributeK8SCronJobUID, - AttributeK8SCronJobName, - AttributeOSType, - AttributeOSDescription, - AttributeOSName, - AttributeOSVersion, - AttributeProcessPID, - AttributeProcessParentPID, - AttributeProcessExecutableName, - AttributeProcessExecutablePath, - AttributeProcessCommand, - AttributeProcessCommandLine, - AttributeProcessCommandArgs, - AttributeProcessOwner, - AttributeProcessRuntimeName, - AttributeProcessRuntimeVersion, - AttributeProcessRuntimeDescription, - AttributeServiceName, - AttributeServiceNamespace, - AttributeServiceInstanceID, - AttributeServiceVersion, - AttributeTelemetrySDKName, - AttributeTelemetrySDKLanguage, - AttributeTelemetrySDKVersion, - AttributeTelemetryAutoVersion, - AttributeWebEngineName, - AttributeWebEngineVersion, - AttributeWebEngineDescription, - AttributeOtelScopeName, - AttributeOtelScopeVersion, - AttributeOtelLibraryName, - AttributeOtelLibraryVersion, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_trace.go b/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_trace.go deleted file mode 100644 index 5afdfdf673..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/generated_trace.go +++ /dev/null @@ -1,2011 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -// This document defines the shared attributes used to report a single exception associated with a span or log. -const ( - // The type of the exception (its fully-qualified class name, if applicable). The - // dynamic type of the exception should be preferred over the static type in - // languages that support it. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - AttributeExceptionType = "exception.type" - // The exception message. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" - AttributeExceptionMessage = "exception.message" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeExceptionStacktrace = "exception.stacktrace" -) - -// This document defines attributes for Events represented using Log Records. -const ( - // The name identifies the event. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'click', 'exception' - AttributeEventName = "event.name" - // The domain identifies the business context for the events. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - // Note: Events across different domains may have same event.name, yet be - // unrelated events. - AttributeEventDomain = "event.domain" -) - -const ( - // Events from browser apps - AttributeEventDomainBrowser = "browser" - // Events from mobile apps - AttributeEventDomainDevice = "device" - // Events from Kubernetes - AttributeEventDomainK8S = "k8s" -) - -// Span attributes used by AWS Lambda (in addition to general `faas` attributes). -const ( - // The full invoked ARN as provided on the Context passed to the function (Lambda- - // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next - // applicable). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from faas.id if an alias is involved. - AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" -) - -// This document defines attributes for CloudEvents. CloudEvents is a specification on how to define event data in a standard way. These attributes can be attached to spans when performing operations with CloudEvents, regardless of the protocol being used. -const ( - // The event_id uniquely identifies the event. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - AttributeCloudeventsEventID = "cloudevents.event_id" - // The source identifies the context in which an event happened. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- - // service' - AttributeCloudeventsEventSource = "cloudevents.event_source" - // The version of the CloudEvents specification which the event uses. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.0' - AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" - // The event_type contains a value describing the type of event related to the - // originating occurrence. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' - AttributeCloudeventsEventType = "cloudevents.event_type" - // The subject of the event in the context of the event producer (identified by - // source). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'mynewfile.jpg' - AttributeCloudeventsEventSubject = "cloudevents.event_subject" -) - -// This document defines semantic conventions for the OpenTracing Shim -const ( - // Parent-child Reference type - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Note: The causal relationship between a child Span and a parent Span. - AttributeOpentracingRefType = "opentracing.ref_type" -) - -const ( - // The parent Span depends on the child Span in some capacity - AttributeOpentracingRefTypeChildOf = "child_of" - // The parent Span does not depend in any way on the result of the child Span - AttributeOpentracingRefTypeFollowsFrom = "follows_from" -) - -// This document defines the attributes used to perform database client calls. -const ( - // An identifier for the database management system (DBMS) product being used. See - // below for a list of well-known identifiers. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeDBSystem = "db.system" - // The connection string used to connect to the database. It is recommended to - // remove embedded credentials. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' - AttributeDBConnectionString = "db.connection_string" - // Username for accessing the database. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'readonly_user', 'reporting_user' - AttributeDBUser = "db.user" - // The fully-qualified class name of the Java Database Connectivity (JDBC) driver - // used to connect. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'org.postgresql.Driver', - // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' - AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" - // This attribute is used to report the name of the database being accessed. For - // commands that switch the database, this should be set to the target database - // (even if the command fails). - // - // Type: string - // Requirement Level: Conditionally Required - If applicable. - // Stability: stable - // Examples: 'customers', 'main' - // Note: In some SQL databases, the database name to be used is called - // "schema name". In case there are multiple layers that could be - // considered for database name (e.g. Oracle instance name and schema name), the - // database name to be used is the more specific layer (e.g. Oracle schema name). - AttributeDBName = "db.name" - // The database statement being executed. - // - // Type: string - // Requirement Level: Conditionally Required - If applicable and not explicitly - // disabled via instrumentation configuration. - // Stability: stable - // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' - // Note: The value may be sanitized to exclude sensitive information. - AttributeDBStatement = "db.statement" - // The name of the operation being executed, e.g. the MongoDB command name such as - // findAndModify, or the SQL keyword. - // - // Type: string - // Requirement Level: Conditionally Required - If `db.statement` is not - // applicable. - // Stability: stable - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: When setting this to an SQL keyword, it is not recommended to attempt any - // client-side parsing of db.statement just to get this property, but it should be - // set if the operation name is provided by the library being instrumented. If the - // SQL statement has an ambiguous operation, or performs more than one operation, - // this value may be omitted. - AttributeDBOperation = "db.operation" -) - -const ( - // Some other SQL database. Fallback only. See notes - AttributeDBSystemOtherSQL = "other_sql" - // Microsoft SQL Server - AttributeDBSystemMSSQL = "mssql" - // MySQL - AttributeDBSystemMySQL = "mysql" - // Oracle Database - AttributeDBSystemOracle = "oracle" - // IBM DB2 - AttributeDBSystemDB2 = "db2" - // PostgreSQL - AttributeDBSystemPostgreSQL = "postgresql" - // Amazon Redshift - AttributeDBSystemRedshift = "redshift" - // Apache Hive - AttributeDBSystemHive = "hive" - // Cloudscape - AttributeDBSystemCloudscape = "cloudscape" - // HyperSQL DataBase - AttributeDBSystemHSQLDB = "hsqldb" - // Progress Database - AttributeDBSystemProgress = "progress" - // SAP MaxDB - AttributeDBSystemMaxDB = "maxdb" - // SAP HANA - AttributeDBSystemHanaDB = "hanadb" - // Ingres - AttributeDBSystemIngres = "ingres" - // FirstSQL - AttributeDBSystemFirstSQL = "firstsql" - // EnterpriseDB - AttributeDBSystemEDB = "edb" - // InterSystems Caché - AttributeDBSystemCache = "cache" - // Adabas (Adaptable Database System) - AttributeDBSystemAdabas = "adabas" - // Firebird - AttributeDBSystemFirebird = "firebird" - // Apache Derby - AttributeDBSystemDerby = "derby" - // FileMaker - AttributeDBSystemFilemaker = "filemaker" - // Informix - AttributeDBSystemInformix = "informix" - // InstantDB - AttributeDBSystemInstantDB = "instantdb" - // InterBase - AttributeDBSystemInterbase = "interbase" - // MariaDB - AttributeDBSystemMariaDB = "mariadb" - // Netezza - AttributeDBSystemNetezza = "netezza" - // Pervasive PSQL - AttributeDBSystemPervasive = "pervasive" - // PointBase - AttributeDBSystemPointbase = "pointbase" - // SQLite - AttributeDBSystemSqlite = "sqlite" - // Sybase - AttributeDBSystemSybase = "sybase" - // Teradata - AttributeDBSystemTeradata = "teradata" - // Vertica - AttributeDBSystemVertica = "vertica" - // H2 - AttributeDBSystemH2 = "h2" - // ColdFusion IMQ - AttributeDBSystemColdfusion = "coldfusion" - // Apache Cassandra - AttributeDBSystemCassandra = "cassandra" - // Apache HBase - AttributeDBSystemHBase = "hbase" - // MongoDB - AttributeDBSystemMongoDB = "mongodb" - // Redis - AttributeDBSystemRedis = "redis" - // Couchbase - AttributeDBSystemCouchbase = "couchbase" - // CouchDB - AttributeDBSystemCouchDB = "couchdb" - // Microsoft Azure Cosmos DB - AttributeDBSystemCosmosDB = "cosmosdb" - // Amazon DynamoDB - AttributeDBSystemDynamoDB = "dynamodb" - // Neo4j - AttributeDBSystemNeo4j = "neo4j" - // Apache Geode - AttributeDBSystemGeode = "geode" - // Elasticsearch - AttributeDBSystemElasticsearch = "elasticsearch" - // Memcached - AttributeDBSystemMemcached = "memcached" - // CockroachDB - AttributeDBSystemCockroachdb = "cockroachdb" - // OpenSearch - AttributeDBSystemOpensearch = "opensearch" - // ClickHouse - AttributeDBSystemClickhouse = "clickhouse" -) - -// Connection-level attributes for Microsoft SQL Server -const ( - // The Microsoft SQL Server instance name connecting to. This name is used to - // determine the port of a named instance. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'MSSQLSERVER' - // Note: If setting a db.mssql.instance_name, net.peer.port is no longer required - // (but still recommended if non-standard). - AttributeDBMSSQLInstanceName = "db.mssql.instance_name" -) - -// Call-level attributes for Cassandra -const ( - // The fetch size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 5000 - AttributeDBCassandraPageSize = "db.cassandra.page_size" - // The consistency level of the query. Based on consistency values from CQL. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" - // The name of the primary table that the operation is acting upon, including the - // keyspace name (if applicable). - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'mytable' - // Note: This mirrors the db.sql.table attribute but references cassandra rather - // than sql. It is not recommended to attempt any client-side parsing of - // db.statement just to get this property, but it should be set if it is provided - // by the library being instrumented. If the operation is acting upon an anonymous - // table, or more than one table, this value MUST NOT be set. - AttributeDBCassandraTable = "db.cassandra.table" - // Whether or not the query is idempotent. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeDBCassandraIdempotence = "db.cassandra.idempotence" - // The number of times a query was speculatively executed. Not set or 0 if the - // query was not executed speculatively. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 0, 2 - AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" - // The ID of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" - // The data center of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'us-west-2' - AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" -) - -const ( - // all - AttributeDBCassandraConsistencyLevelAll = "all" - // each_quorum - AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" - // quorum - AttributeDBCassandraConsistencyLevelQuorum = "quorum" - // local_quorum - AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" - // one - AttributeDBCassandraConsistencyLevelOne = "one" - // two - AttributeDBCassandraConsistencyLevelTwo = "two" - // three - AttributeDBCassandraConsistencyLevelThree = "three" - // local_one - AttributeDBCassandraConsistencyLevelLocalOne = "local_one" - // any - AttributeDBCassandraConsistencyLevelAny = "any" - // serial - AttributeDBCassandraConsistencyLevelSerial = "serial" - // local_serial - AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" -) - -// Call-level attributes for Redis -const ( - // The index of the database being accessed as used in the SELECT command, - // provided as an integer. To be used instead of the generic db.name attribute. - // - // Type: int - // Requirement Level: Conditionally Required - If other than the default database - // (`0`). - // Stability: stable - // Examples: 0, 1, 15 - AttributeDBRedisDBIndex = "db.redis.database_index" -) - -// Call-level attributes for MongoDB -const ( - // The collection being accessed within the database stated in db.name. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'customers', 'products' - AttributeDBMongoDBCollection = "db.mongodb.collection" -) - -// Call-level attributes for SQL databases -const ( - // The name of the primary table that the operation is acting upon, including the - // database name (if applicable). - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'public.users', 'customers' - // Note: It is not recommended to attempt any client-side parsing of db.statement - // just to get this property, but it should be set if it is provided by the - // library being instrumented. If the operation is acting upon an anonymous table, - // or more than one table, this value MUST NOT be set. - AttributeDBSQLTable = "db.sql.table" -) - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's concepts. -const ( - // Name of the code, either "OK" or "ERROR". MUST NOT be set - // if the status code is UNSET. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeOtelStatusCode = "otel.status_code" - // Description of the Status if it has a value, otherwise not set. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'resource not found' - AttributeOtelStatusDescription = "otel.status_description" -) - -const ( - // The operation has been validated by an Application developer or Operator to have completed successfully - AttributeOtelStatusCodeOk = "OK" - // The operation contains an error - AttributeOtelStatusCodeError = "ERROR" -) - -// This semantic convention describes an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with spans. -const ( - // Type of the trigger which caused this function execution. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Note: For the server/consumer span on the incoming side, - // faas.trigger MUST be set.Clients invoking FaaS instances usually cannot set - // faas.trigger, - // since they would typically need to look in the payload to determine - // the event type. If clients set it, it should be the same as the - // trigger that corresponding incoming would have (i.e., this has - // nothing to do with the underlying transport used to make the API - // call to invoke the lambda, which is often HTTP). - AttributeFaaSTrigger = "faas.trigger" - // The execution ID of the current function execution. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - AttributeFaaSExecution = "faas.execution" -) - -const ( - // A response to some data source operation such as a database or filesystem read/write - AttributeFaaSTriggerDatasource = "datasource" - // To provide an answer to an inbound HTTP request - AttributeFaaSTriggerHTTP = "http" - // A function is set to be executed when messages are sent to a messaging system - AttributeFaaSTriggerPubsub = "pubsub" - // A function is scheduled to be executed regularly - AttributeFaaSTriggerTimer = "timer" - // If none of the others apply - AttributeFaaSTriggerOther = "other" -) - -// Semantic Convention for FaaS triggered as a response to some data source operation such as a database or filesystem read/write. -const ( - // The name of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos - // DB to the database name. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'myBucketName', 'myDBName' - AttributeFaaSDocumentCollection = "faas.document.collection" - // Describes the type of the operation that was performed on the data. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeFaaSDocumentOperation = "faas.document.operation" - // A string containing the time when the data was accessed in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSDocumentTime = "faas.document.time" - // The document name/table subjected to the operation. For example, in Cloud - // Storage or S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'myFile.txt', 'myTableName' - AttributeFaaSDocumentName = "faas.document.name" -) - -const ( - // When a new object is created - AttributeFaaSDocumentOperationInsert = "insert" - // When an object is modified - AttributeFaaSDocumentOperationEdit = "edit" - // When an object is deleted - AttributeFaaSDocumentOperationDelete = "delete" -) - -// Semantic Convention for FaaS scheduled to be executed regularly. -const ( - // A string containing the function invocation time in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSTime = "faas.time" - // A string containing the schedule period as Cron Expression. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '0/5 * * * ? *' - AttributeFaaSCron = "faas.cron" -) - -// Contains additional attributes for incoming FaaS spans. -const ( - // A boolean that is true if the serverless function is executed for the first - // time (aka cold-start). - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeFaaSColdstart = "faas.coldstart" -) - -// Contains additional attributes for outgoing FaaS spans. -const ( - // The name of the invoked function. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'my-function' - // Note: SHOULD be equal to the faas.name resource attribute of the invoked - // function. - AttributeFaaSInvokedName = "faas.invoked_name" - // The cloud provider of the invoked function. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked - // function. - AttributeFaaSInvokedProvider = "faas.invoked_provider" - // The cloud region of the invoked function. - // - // Type: string - // Requirement Level: Conditionally Required - For some cloud providers, like AWS - // or GCP, the region in which a function is hosted is essential to uniquely - // identify the function and also part of its endpoint. Since it's part of the - // endpoint being called, the region is always known to clients. In these cases, - // `faas.invoked_region` MUST be set accordingly. If the region is unknown to the - // client or not required for identifying the invoked function, setting - // `faas.invoked_region` is optional. - // Stability: stable - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the cloud.region resource attribute of the invoked - // function. - AttributeFaaSInvokedRegion = "faas.invoked_region" -) - -const ( - // Alibaba Cloud - AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeFaaSInvokedProviderAWS = "aws" - // Microsoft Azure - AttributeFaaSInvokedProviderAzure = "azure" - // Google Cloud Platform - AttributeFaaSInvokedProviderGCP = "gcp" - // Tencent Cloud - AttributeFaaSInvokedProviderTencentCloud = "tencent_cloud" -) - -// These attributes may be used for any network related operation. -const ( - // Transport protocol used. See note below. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeNetTransport = "net.transport" - // Application layer protocol used. The value SHOULD be normalized to lowercase. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - AttributeNetAppProtocolName = "net.app.protocol.name" - // Version of the application layer protocol used. See note below. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '3.1.1' - // Note: net.app.protocol.version refers to the version of the protocol used and - // might be different from the protocol client's version. If the HTTP client used - // has a version of 0.27.2, but sends HTTP version 1.1, this attribute should be - // set to 1.1. - AttributeNetAppProtocolVersion = "net.app.protocol.version" - // Remote socket peer name. - // - // Type: string - // Requirement Level: Recommended - If available and different from - // `net.peer.name` and if `net.sock.peer.addr` is set. - // Stability: stable - // Examples: 'proxy.example.com' - AttributeNetSockPeerName = "net.sock.peer.name" - // Remote socket peer address: IPv4 or IPv6 for internet protocols, path for local - // communication, etc. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '127.0.0.1', '/tmp/mysql.sock' - AttributeNetSockPeerAddr = "net.sock.peer.addr" - // Remote socket peer port. - // - // Type: int - // Requirement Level: Recommended - If defined for the address family and if - // different than `net.peer.port` and if `net.sock.peer.addr` is set. - // Stability: stable - // Examples: 16456 - AttributeNetSockPeerPort = "net.sock.peer.port" - // Protocol address family which is used for communication. - // - // Type: Enum - // Requirement Level: Conditionally Required - If different than `inet` and if any - // of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers of telemetry - // SHOULD accept both IPv4 and IPv6 formats for the address in - // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support - // instrumentations that follow previous versions of this document. - // Stability: stable - // Examples: 'inet6', 'bluetooth' - AttributeNetSockFamily = "net.sock.family" - // Logical remote hostname, see note below. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'example.com' - // Note: net.peer.name SHOULD NOT be set if capturing it would require an extra - // DNS lookup. - AttributeNetPeerName = "net.peer.name" - // Logical remote port number - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 80, 8080, 443 - AttributeNetPeerPort = "net.peer.port" - // Logical local hostname or similar, see note below. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'localhost' - AttributeNetHostName = "net.host.name" - // Logical local port number, preferably the one that the peer used to connect - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 8080 - AttributeNetHostPort = "net.host.port" - // Local socket address. Useful in case of a multi-IP host. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '192.168.0.1' - AttributeNetSockHostAddr = "net.sock.host.addr" - // Local socket port number. - // - // Type: int - // Requirement Level: Recommended - If defined for the address family and if - // different than `net.host.port` and if `net.sock.host.addr` is set. - // Stability: stable - // Examples: 35555 - AttributeNetSockHostPort = "net.sock.host.port" - // The internet connection type currently being used by the host. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'wifi' - AttributeNetHostConnectionType = "net.host.connection.type" - // This describes more details regarding the connection.type. It may be the type - // of cell technology connection, but it could be used for describing details - // about a wifi connection. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'LTE' - AttributeNetHostConnectionSubtype = "net.host.connection.subtype" - // The name of the mobile carrier. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'sprint' - AttributeNetHostCarrierName = "net.host.carrier.name" - // The mobile carrier country code. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '310' - AttributeNetHostCarrierMcc = "net.host.carrier.mcc" - // The mobile carrier network code. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '001' - AttributeNetHostCarrierMnc = "net.host.carrier.mnc" - // The ISO 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'DE' - AttributeNetHostCarrierIcc = "net.host.carrier.icc" -) - -const ( - // ip_tcp - AttributeNetTransportTCP = "ip_tcp" - // ip_udp - AttributeNetTransportUDP = "ip_udp" - // Named or anonymous pipe. See note below - AttributeNetTransportPipe = "pipe" - // In-process communication - AttributeNetTransportInProc = "inproc" - // Something else (non IP-based) - AttributeNetTransportOther = "other" -) - -const ( - // IPv4 address - AttributeNetSockFamilyInet = "inet" - // IPv6 address - AttributeNetSockFamilyInet6 = "inet6" - // Unix domain socket path - AttributeNetSockFamilyUnix = "unix" -) - -const ( - // wifi - AttributeNetHostConnectionTypeWifi = "wifi" - // wired - AttributeNetHostConnectionTypeWired = "wired" - // cell - AttributeNetHostConnectionTypeCell = "cell" - // unavailable - AttributeNetHostConnectionTypeUnavailable = "unavailable" - // unknown - AttributeNetHostConnectionTypeUnknown = "unknown" -) - -const ( - // GPRS - AttributeNetHostConnectionSubtypeGprs = "gprs" - // EDGE - AttributeNetHostConnectionSubtypeEdge = "edge" - // UMTS - AttributeNetHostConnectionSubtypeUmts = "umts" - // CDMA - AttributeNetHostConnectionSubtypeCdma = "cdma" - // EVDO Rel. 0 - AttributeNetHostConnectionSubtypeEvdo0 = "evdo_0" - // EVDO Rev. A - AttributeNetHostConnectionSubtypeEvdoA = "evdo_a" - // CDMA2000 1XRTT - AttributeNetHostConnectionSubtypeCdma20001xrtt = "cdma2000_1xrtt" - // HSDPA - AttributeNetHostConnectionSubtypeHsdpa = "hsdpa" - // HSUPA - AttributeNetHostConnectionSubtypeHsupa = "hsupa" - // HSPA - AttributeNetHostConnectionSubtypeHspa = "hspa" - // IDEN - AttributeNetHostConnectionSubtypeIden = "iden" - // EVDO Rev. B - AttributeNetHostConnectionSubtypeEvdoB = "evdo_b" - // LTE - AttributeNetHostConnectionSubtypeLte = "lte" - // EHRPD - AttributeNetHostConnectionSubtypeEhrpd = "ehrpd" - // HSPAP - AttributeNetHostConnectionSubtypeHspap = "hspap" - // GSM - AttributeNetHostConnectionSubtypeGsm = "gsm" - // TD-SCDMA - AttributeNetHostConnectionSubtypeTdScdma = "td_scdma" - // IWLAN - AttributeNetHostConnectionSubtypeIwlan = "iwlan" - // 5G NR (New Radio) - AttributeNetHostConnectionSubtypeNr = "nr" - // 5G NRNSA (New Radio Non-Standalone) - AttributeNetHostConnectionSubtypeNrnsa = "nrnsa" - // LTE CA - AttributeNetHostConnectionSubtypeLteCa = "lte_ca" -) - -// Operations that access some remote service. -const ( - // The service.name of the remote service. SHOULD be equal to the actual - // service.name resource attribute of the remote service if any. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'AuthTokenCache' - AttributePeerService = "peer.service" -) - -// These attributes may be used for any operation with an authenticated and/or authorized enduser. -const ( - // Username or client_id extracted from the access token or Authorization header - // in the inbound request from outside the system. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'username' - AttributeEnduserID = "enduser.id" - // Actual/assumed role the client is making the request under extracted from token - // or application security context. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'admin' - AttributeEnduserRole = "enduser.role" - // Scopes or granted authorities the client currently possesses extracted from - // token or application security context. The value would come from the scope - // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 - // Assertion. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'read:message, write:files' - AttributeEnduserScope = "enduser.scope" -) - -// These attributes may be used for any operation to store information about a thread that started a span. -const ( - // Current "managed" thread ID (as opposed to OS thread ID). - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 42 - AttributeThreadID = "thread.id" - // Current thread name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'main' - AttributeThreadName = "thread.name" -) - -// These attributes allow to report this unit of code and therefore to provide more context about the span. -const ( - // The method or function name, or equivalent (usually rightmost part of the code - // unit's name). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'serveRequest' - AttributeCodeFunction = "code.function" - // The "namespace" within which code.function is defined. Usually the - // qualified class or module name, such that code.namespace + some separator + - // code.function form a unique identifier for the code unit. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'com.example.MyHTTPService' - AttributeCodeNamespace = "code.namespace" - // The source code file name that identifies the code unit as uniquely as possible - // (preferably an absolute file path). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - AttributeCodeFilepath = "code.filepath" - // The line number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 42 - AttributeCodeLineNumber = "code.lineno" - // The column number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 16 - AttributeCodeColumn = "code.column" -) - -// This document defines semantic conventions for HTTP client and server Spans. -const ( - // HTTP request method. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - AttributeHTTPMethod = "http.method" - // HTTP response status code. - // - // Type: int - // Requirement Level: Conditionally Required - If and only if one was - // received/sent. - // Stability: stable - // Examples: 200 - AttributeHTTPStatusCode = "http.status_code" - // Kind of HTTP protocol used. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Note: If net.transport is not specified, it can be assumed to be IP.TCP except - // if http.flavor is QUIC, in which case IP.UDP is assumed. - AttributeHTTPFlavor = "http.flavor" - // Value of the HTTP User-Agent header sent by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' - AttributeHTTPUserAgent = "http.user_agent" - // The size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 3495 - AttributeHTTPRequestContentLength = "http.request_content_length" - // The size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 3495 - AttributeHTTPResponseContentLength = "http.response_content_length" -) - -const ( - // HTTP/1.0 - AttributeHTTPFlavorHTTP10 = "1.0" - // HTTP/1.1 - AttributeHTTPFlavorHTTP11 = "1.1" - // HTTP/2 - AttributeHTTPFlavorHTTP20 = "2.0" - // HTTP/3 - AttributeHTTPFlavorHTTP30 = "3.0" - // SPDY protocol - AttributeHTTPFlavorSPDY = "SPDY" - // QUIC protocol - AttributeHTTPFlavorQUIC = "QUIC" -) - -// Semantic Convention for HTTP Client -const ( - // Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment]. - // Usually the fragment is not transmitted over HTTP, but if it is known, it - // should be included nevertheless. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' - // Note: http.url MUST NOT contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case the attribute's value - // should be https://www.example.com/. - AttributeHTTPURL = "http.url" - // The ordinal number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // Requirement Level: Recommended - if and only if request was retried. - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets resent - // by the client, regardless of what was the cause of the resending (e.g. - // redirection, authorization failure, 503 Server Unavailable, network issues, or - // any other). - AttributeHTTPResendCount = "http.resend_count" -) - -// Semantic Convention for HTTP Server -const ( - // The URI scheme identifying the used protocol. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'http', 'https' - AttributeHTTPScheme = "http.scheme" - // The full request target as passed in a HTTP request line or equivalent. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: '/path/12314/?q=ddds' - AttributeHTTPTarget = "http.target" - // The matched route (path template in the format used by the respective server - // framework). See note below - // - // Type: string - // Requirement Level: Conditionally Required - If and only if it's available - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: 'http.route' MUST NOT be populated when this is not supported by the HTTP - // server framework as the route attribute should have low-cardinality and the URI - // path can NOT substitute it. - AttributeHTTPRoute = "http.route" - // The IP address of the original client behind all proxies, if known (e.g. from - // X-Forwarded-For). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '83.164.160.102' - // Note: This is not necessarily the same as net.sock.peer.addr, which would - // identify the network-level peer, which may be a proxy.This attribute should be - // set when a source of information different - // from the one used for net.sock.peer.addr, is available even if that other - // source just confirms the same value as net.sock.peer.addr. - // Rationale: For net.sock.peer.addr, one typically does not know if it - // comes from a proxy, reverse proxy, or the actual client. Setting - // http.client_ip when it's the same as net.sock.peer.addr means that - // one is at least somewhat confident that the address is not that of - // the closest proxy. - AttributeHTTPClientIP = "http.client_ip" -) - -// Attributes that exist for multiple DynamoDB request types. -const ( - // The keys in the RequestItems object field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'Users', 'Cats' - AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" - // The JSON-serialized value of each item in the ConsumedCapacity response field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { - // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, - // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": - // "string", "WriteCapacityUnits": number }' - AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" - // The JSON-serialized value of the ItemCollectionMetrics response field. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, - // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : - // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": - // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' - AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" - // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" - // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" - // The value of the ConsistentRead request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" - // The value of the ProjectionExpression request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, - // ProductReviews' - AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" - // The value of the Limit request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" - // The value of the AttributesToGet request parameter. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'lives', 'id' - AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" - // The value of the IndexName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'name_to_group' - AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" - // The value of the Select request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AttributeAWSDynamoDBSelect = "aws.dynamodb.select" -) - -// DynamoDB.CreateTable -const ( - // The JSON-serialized value of each item of the GlobalSecondaryIndexes request - // field - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": - // number, "WriteCapacityUnits": number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" - // The JSON-serialized value of each item of the LocalSecondaryIndexes request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": - // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" } }' - AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" -) - -// DynamoDB.ListTables -const ( - // The value of the ExclusiveStartTableName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Users', 'CatsTable' - AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" - // The the number of items in the TableNames response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 20 - AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" -) - -// DynamoDB.Query -const ( - // The value of the ScanIndexForward request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" -) - -// DynamoDB.Scan -const ( - // The value of the Segment request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" - // The value of the TotalSegments request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 100 - AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" - // The value of the Count response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBCount = "aws.dynamodb.count" - // The value of the ScannedCount response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 50 - AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" -) - -// DynamoDB.UpdateTable -const ( - // The JSON-serialized value of each item in the AttributeDefinitions request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" - // The JSON-serialized value of each item in the the GlobalSecondaryIndexUpdates - // request field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" -) - -// This document defines semantic conventions to apply when instrumenting the GraphQL implementation. They map GraphQL operations to attributes on a Span. -const ( - // The name of the operation being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'findBookByID' - AttributeGraphqlOperationName = "graphql.operation.name" - // The type of the operation being executed. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'query', 'mutation', 'subscription' - AttributeGraphqlOperationType = "graphql.operation.type" - // The GraphQL document being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - AttributeGraphqlDocument = "graphql.document" -) - -const ( - // GraphQL query - AttributeGraphqlOperationTypeQuery = "query" - // GraphQL mutation - AttributeGraphqlOperationTypeMutation = "mutation" - // GraphQL subscription - AttributeGraphqlOperationTypeSubscription = "subscription" -) - -// Semantic convention describing per-message attributes populated on messaging spans or links. -const ( - // A value used by the messaging system as an identifier for the message, - // represented as a string. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - AttributeMessagingMessageID = "messaging.message.id" - // The conversation ID identifying the conversation to which the message belongs, - // represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'MyConversationID' - AttributeMessagingMessageConversationID = "messaging.message.conversation_id" - // The (uncompressed) size of the message payload in bytes. Also use this - // attribute if it is unknown whether the compressed or uncompressed payload size - // is reported. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 2738 - AttributeMessagingMessagePayloadSizeBytes = "messaging.message.payload_size_bytes" - // The compressed size of the message payload in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 2048 - AttributeMessagingMessagePayloadCompressedSizeBytes = "messaging.message.payload_compressed_size_bytes" -) - -// Semantic convention for attributes that describe messaging destination on broker -const ( - // The message destination name - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic or - // other entity within the broker. If - // the broker does not have such notion, the destination name SHOULD uniquely - // identify the broker. - AttributeMessagingDestinationName = "messaging.destination.name" - // The kind of message destination - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeMessagingDestinationKind = "messaging.destination.kind" - // Low cardinality representation of the messaging destination name - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example would - // be a destination name involving a user name or product id. Although the - // destination name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and aggregation. - AttributeMessagingDestinationTemplate = "messaging.destination.template" - // A boolean that is true if the message destination is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeMessagingDestinationTemporary = "messaging.destination.temporary" - // A boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeMessagingDestinationAnonymous = "messaging.destination.anonymous" -) - -const ( - // A message sent to a queue - AttributeMessagingDestinationKindQueue = "queue" - // A message sent to a topic - AttributeMessagingDestinationKindTopic = "topic" -) - -// Semantic convention for attributes that describe messaging source on broker -const ( - // The message source name - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Source name SHOULD uniquely identify a specific queue, topic, or other - // entity within the broker. If - // the broker does not have such notion, the source name SHOULD uniquely identify - // the broker. - AttributeMessagingSourceName = "messaging.source.name" - // The kind of message source - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeMessagingSourceKind = "messaging.source.kind" - // Low cardinality representation of the messaging source name - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Source names could be constructed from templates. An example would be a - // source name involving a user name or product id. Although the source name in - // this case is of high cardinality, the underlying template is of low cardinality - // and can be effectively used for grouping and aggregation. - AttributeMessagingSourceTemplate = "messaging.source.template" - // A boolean that is true if the message source is temporary and might not exist - // anymore after messages are processed. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeMessagingSourceTemporary = "messaging.source.temporary" - // A boolean that is true if the message source is anonymous (could be unnamed or - // have auto-generated name). - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeMessagingSourceAnonymous = "messaging.source.anonymous" -) - -const ( - // A message received from a queue - AttributeMessagingSourceKindQueue = "queue" - // A message received from a topic - AttributeMessagingSourceKindTopic = "topic" -) - -// This document defines general attributes used in messaging systems. -const ( - // A string identifying the messaging system. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' - AttributeMessagingSystem = "messaging.system" - // A string identifying the kind of messaging operation as defined in the - // Operation names section above. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - // Note: If a custom value is used, it MUST be of low cardinality. - AttributeMessagingOperation = "messaging.operation" - // The number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // Requirement Level: Conditionally Required - If the span describes an operation - // on a batch of messages. - // Stability: stable - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans - // that operate with a single message. When a messaging client library supports - // both batch and single-message API for the same operation, instrumentations - // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use - // it for single-message APIs. - AttributeMessagingBatchMessageCount = "messaging.batch.message_count" -) - -const ( - // publish - AttributeMessagingOperationPublish = "publish" - // receive - AttributeMessagingOperationReceive = "receive" - // process - AttributeMessagingOperationProcess = "process" -) - -// Semantic convention for a consumer of messages received from a messaging system -const ( - // The identifier for the consumer receiving a message. For Kafka, set it to - // {messaging.kafka.consumer.group} - {messaging.kafka.client_id}, if both are - // present, or only messaging.kafka.consumer.group. For brokers, such as RabbitMQ - // and Artemis, set it to the client_id of the client consuming the message. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'mygroup - client-6' - AttributeMessagingConsumerID = "messaging.consumer.id" -) - -// Attributes for RabbitMQ -const ( - // RabbitMQ message routing key. - // - // Type: string - // Requirement Level: Conditionally Required - If not empty. - // Stability: stable - // Examples: 'myKey' - AttributeMessagingRabbitmqDestinationRoutingKey = "messaging.rabbitmq.destination.routing_key" -) - -// Attributes for Apache Kafka -const ( - // Message keys in Kafka are used for grouping alike messages to ensure they're - // processed on the same partition. They differ from messaging.message.id in that - // they're not unique. If the key is null, the attribute MUST NOT be set. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to be - // supplied for the attribute. If the key has no unambiguous, canonical string - // form, don't include its value. - AttributeMessagingKafkaMessageKey = "messaging.kafka.message.key" - // Name of the Kafka Consumer Group that is handling the message. Only applies to - // consumers, not producers. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'my-group' - AttributeMessagingKafkaConsumerGroup = "messaging.kafka.consumer.group" - // Client ID for the Consumer or Producer that is handling the message. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'client-5' - AttributeMessagingKafkaClientID = "messaging.kafka.client_id" - // Partition the message is sent to. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 2 - AttributeMessagingKafkaDestinationPartition = "messaging.kafka.destination.partition" - // Partition the message is received from. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 2 - AttributeMessagingKafkaSourcePartition = "messaging.kafka.source.partition" - // The offset of a record in the corresponding Kafka partition. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 42 - AttributeMessagingKafkaMessageOffset = "messaging.kafka.message.offset" - // A boolean that is true if the message is a tombstone. - // - // Type: boolean - // Requirement Level: Conditionally Required - If value is `true`. When missing, - // the value is assumed to be `false`. - // Stability: stable - AttributeMessagingKafkaMessageTombstone = "messaging.kafka.message.tombstone" -) - -// Attributes for Apache RocketMQ -const ( - // Namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'myNamespace' - AttributeMessagingRocketmqNamespace = "messaging.rocketmq.namespace" - // Name of the RocketMQ producer/consumer group that is handling the message. The - // client type is identified by the SpanKind. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'myConsumerGroup' - AttributeMessagingRocketmqClientGroup = "messaging.rocketmq.client_group" - // The unique identifier for each client. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'myhost@8742@s8083jm' - AttributeMessagingRocketmqClientID = "messaging.rocketmq.client_id" - // The timestamp in milliseconds that the delay message is expected to be - // delivered to consumer. - // - // Type: int - // Requirement Level: Conditionally Required - If the message type is delay and - // delay time level is not specified. - // Stability: stable - // Examples: 1665987217045 - AttributeMessagingRocketmqMessageDeliveryTimestamp = "messaging.rocketmq.message.delivery_timestamp" - // The delay time level for delay message, which determines the message delay - // time. - // - // Type: int - // Requirement Level: Conditionally Required - If the message type is delay and - // delivery timestamp is not specified. - // Stability: stable - // Examples: 3 - AttributeMessagingRocketmqMessageDelayTimeLevel = "messaging.rocketmq.message.delay_time_level" - // It is essential for FIFO message. Messages that belong to the same message - // group are always processed one by one within the same consumer group. - // - // Type: string - // Requirement Level: Conditionally Required - If the message type is FIFO. - // Stability: stable - // Examples: 'myMessageGroup' - AttributeMessagingRocketmqMessageGroup = "messaging.rocketmq.message.group" - // Type of message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeMessagingRocketmqMessageType = "messaging.rocketmq.message.type" - // The secondary classifier of message besides topic. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'tagA' - AttributeMessagingRocketmqMessageTag = "messaging.rocketmq.message.tag" - // Key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // Requirement Level: Optional - // Stability: stable - // Examples: 'keyA', 'keyB' - AttributeMessagingRocketmqMessageKeys = "messaging.rocketmq.message.keys" - // Model of message consumption. This only applies to consumer spans. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeMessagingRocketmqConsumptionModel = "messaging.rocketmq.consumption_model" -) - -const ( - // Normal message - AttributeMessagingRocketmqMessageTypeNormal = "normal" - // FIFO message - AttributeMessagingRocketmqMessageTypeFifo = "fifo" - // Delay message - AttributeMessagingRocketmqMessageTypeDelay = "delay" - // Transaction message - AttributeMessagingRocketmqMessageTypeTransaction = "transaction" -) - -const ( - // Clustering consumption model - AttributeMessagingRocketmqConsumptionModelClustering = "clustering" - // Broadcasting consumption model - AttributeMessagingRocketmqConsumptionModelBroadcasting = "broadcasting" -) - -// This document defines semantic conventions for remote procedure calls. -const ( - // A string identifying the remoting system. See below for a list of well-known - // identifiers. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeRPCSystem = "rpc.system" - // The full (logical) name of the service being called, including its package - // name, if applicable. - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing class. - // The code.namespace attribute may be used to store the latter (despite the - // attribute name, it may include a class name; e.g., class with method actually - // executing the call on the server side, RPC client stub class on the client - // side). - AttributeRPCService = "rpc.service" - // The name of the (logical) method being called, must be equal to the $method - // part in the span name. - // - // Type: string - // Requirement Level: Recommended - // Stability: stable - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The code.function attribute may be used to store the latter - // (e.g., method actually executing the call on the server side, RPC client stub - // method on the client side). - AttributeRPCMethod = "rpc.method" -) - -const ( - // gRPC - AttributeRPCSystemGRPC = "grpc" - // Java RMI - AttributeRPCSystemJavaRmi = "java_rmi" - // .NET WCF - AttributeRPCSystemDotnetWcf = "dotnet_wcf" - // Apache Dubbo - AttributeRPCSystemApacheDubbo = "apache_dubbo" -) - -// Tech-specific attributes for gRPC. -const ( - // The numeric status code of the gRPC request. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" -) - -const ( - // OK - AttributeRPCGRPCStatusCodeOk = "0" - // CANCELLED - AttributeRPCGRPCStatusCodeCancelled = "1" - // UNKNOWN - AttributeRPCGRPCStatusCodeUnknown = "2" - // INVALID_ARGUMENT - AttributeRPCGRPCStatusCodeInvalidArgument = "3" - // DEADLINE_EXCEEDED - AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" - // NOT_FOUND - AttributeRPCGRPCStatusCodeNotFound = "5" - // ALREADY_EXISTS - AttributeRPCGRPCStatusCodeAlreadyExists = "6" - // PERMISSION_DENIED - AttributeRPCGRPCStatusCodePermissionDenied = "7" - // RESOURCE_EXHAUSTED - AttributeRPCGRPCStatusCodeResourceExhausted = "8" - // FAILED_PRECONDITION - AttributeRPCGRPCStatusCodeFailedPrecondition = "9" - // ABORTED - AttributeRPCGRPCStatusCodeAborted = "10" - // OUT_OF_RANGE - AttributeRPCGRPCStatusCodeOutOfRange = "11" - // UNIMPLEMENTED - AttributeRPCGRPCStatusCodeUnimplemented = "12" - // INTERNAL - AttributeRPCGRPCStatusCodeInternal = "13" - // UNAVAILABLE - AttributeRPCGRPCStatusCodeUnavailable = "14" - // DATA_LOSS - AttributeRPCGRPCStatusCodeDataLoss = "15" - // UNAUTHENTICATED - AttributeRPCGRPCStatusCodeUnauthenticated = "16" -) - -// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). -const ( - // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 - // does not specify this, the value can be omitted. - // - // Type: string - // Requirement Level: Conditionally Required - If other than the default version - // (`1.0`) - // Stability: stable - // Examples: '2.0', '1.0' - AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" - // id property of request or response. Since protocol allows id to be int, string, - // null or missing (for notifications), value is expected to be cast to string for - // simplicity. Use empty string in case of null value. Omit entirely if this is a - // notification. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '10', 'request-7', '' - AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" - // error.code property of response if it is an error response. - // - // Type: int - // Requirement Level: Conditionally Required - If response is not successful. - // Stability: stable - // Examples: -32700, 100 - AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" - // error.message property of response if it is an error response. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Parse error', 'User already exists' - AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" -) - -func GetTraceSemanticConventionAttributeNames() []string { - return []string{ - AttributeExceptionType, - AttributeExceptionMessage, - AttributeExceptionStacktrace, - AttributeEventName, - AttributeEventDomain, - AttributeAWSLambdaInvokedARN, - AttributeCloudeventsEventID, - AttributeCloudeventsEventSource, - AttributeCloudeventsEventSpecVersion, - AttributeCloudeventsEventType, - AttributeCloudeventsEventSubject, - AttributeOpentracingRefType, - AttributeDBSystem, - AttributeDBConnectionString, - AttributeDBUser, - AttributeDBJDBCDriverClassname, - AttributeDBName, - AttributeDBStatement, - AttributeDBOperation, - AttributeDBMSSQLInstanceName, - AttributeDBCassandraPageSize, - AttributeDBCassandraConsistencyLevel, - AttributeDBCassandraTable, - AttributeDBCassandraIdempotence, - AttributeDBCassandraSpeculativeExecutionCount, - AttributeDBCassandraCoordinatorID, - AttributeDBCassandraCoordinatorDC, - AttributeDBRedisDBIndex, - AttributeDBMongoDBCollection, - AttributeDBSQLTable, - AttributeOtelStatusCode, - AttributeOtelStatusDescription, - AttributeFaaSTrigger, - AttributeFaaSExecution, - AttributeFaaSDocumentCollection, - AttributeFaaSDocumentOperation, - AttributeFaaSDocumentTime, - AttributeFaaSDocumentName, - AttributeFaaSTime, - AttributeFaaSCron, - AttributeFaaSColdstart, - AttributeFaaSInvokedName, - AttributeFaaSInvokedProvider, - AttributeFaaSInvokedRegion, - AttributeNetTransport, - AttributeNetAppProtocolName, - AttributeNetAppProtocolVersion, - AttributeNetSockPeerName, - AttributeNetSockPeerAddr, - AttributeNetSockPeerPort, - AttributeNetSockFamily, - AttributeNetPeerName, - AttributeNetPeerPort, - AttributeNetHostName, - AttributeNetHostPort, - AttributeNetSockHostAddr, - AttributeNetSockHostPort, - AttributeNetHostConnectionType, - AttributeNetHostConnectionSubtype, - AttributeNetHostCarrierName, - AttributeNetHostCarrierMcc, - AttributeNetHostCarrierMnc, - AttributeNetHostCarrierIcc, - AttributePeerService, - AttributeEnduserID, - AttributeEnduserRole, - AttributeEnduserScope, - AttributeThreadID, - AttributeThreadName, - AttributeCodeFunction, - AttributeCodeNamespace, - AttributeCodeFilepath, - AttributeCodeLineNumber, - AttributeCodeColumn, - AttributeHTTPMethod, - AttributeHTTPStatusCode, - AttributeHTTPFlavor, - AttributeHTTPUserAgent, - AttributeHTTPRequestContentLength, - AttributeHTTPResponseContentLength, - AttributeHTTPURL, - AttributeHTTPResendCount, - AttributeHTTPScheme, - AttributeHTTPTarget, - AttributeHTTPRoute, - AttributeHTTPClientIP, - AttributeAWSDynamoDBTableNames, - AttributeAWSDynamoDBConsumedCapacity, - AttributeAWSDynamoDBItemCollectionMetrics, - AttributeAWSDynamoDBProvisionedReadCapacity, - AttributeAWSDynamoDBProvisionedWriteCapacity, - AttributeAWSDynamoDBConsistentRead, - AttributeAWSDynamoDBProjection, - AttributeAWSDynamoDBLimit, - AttributeAWSDynamoDBAttributesToGet, - AttributeAWSDynamoDBIndexName, - AttributeAWSDynamoDBSelect, - AttributeAWSDynamoDBGlobalSecondaryIndexes, - AttributeAWSDynamoDBLocalSecondaryIndexes, - AttributeAWSDynamoDBExclusiveStartTable, - AttributeAWSDynamoDBTableCount, - AttributeAWSDynamoDBScanForward, - AttributeAWSDynamoDBSegment, - AttributeAWSDynamoDBTotalSegments, - AttributeAWSDynamoDBCount, - AttributeAWSDynamoDBScannedCount, - AttributeAWSDynamoDBAttributeDefinitions, - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, - AttributeGraphqlOperationName, - AttributeGraphqlOperationType, - AttributeGraphqlDocument, - AttributeMessagingMessageID, - AttributeMessagingMessageConversationID, - AttributeMessagingMessagePayloadSizeBytes, - AttributeMessagingMessagePayloadCompressedSizeBytes, - AttributeMessagingDestinationName, - AttributeMessagingDestinationKind, - AttributeMessagingDestinationTemplate, - AttributeMessagingDestinationTemporary, - AttributeMessagingDestinationAnonymous, - AttributeMessagingSourceName, - AttributeMessagingSourceKind, - AttributeMessagingSourceTemplate, - AttributeMessagingSourceTemporary, - AttributeMessagingSourceAnonymous, - AttributeMessagingSystem, - AttributeMessagingOperation, - AttributeMessagingBatchMessageCount, - AttributeMessagingConsumerID, - AttributeMessagingRabbitmqDestinationRoutingKey, - AttributeMessagingKafkaMessageKey, - AttributeMessagingKafkaConsumerGroup, - AttributeMessagingKafkaClientID, - AttributeMessagingKafkaDestinationPartition, - AttributeMessagingKafkaSourcePartition, - AttributeMessagingKafkaMessageOffset, - AttributeMessagingKafkaMessageTombstone, - AttributeMessagingRocketmqNamespace, - AttributeMessagingRocketmqClientGroup, - AttributeMessagingRocketmqClientID, - AttributeMessagingRocketmqMessageDeliveryTimestamp, - AttributeMessagingRocketmqMessageDelayTimeLevel, - AttributeMessagingRocketmqMessageGroup, - AttributeMessagingRocketmqMessageType, - AttributeMessagingRocketmqMessageTag, - AttributeMessagingRocketmqMessageKeys, - AttributeMessagingRocketmqConsumptionModel, - AttributeRPCSystem, - AttributeRPCService, - AttributeRPCMethod, - AttributeRPCGRPCStatusCode, - AttributeRPCJsonrpcVersion, - AttributeRPCJsonrpcRequestID, - AttributeRPCJsonrpcErrorCode, - AttributeRPCJsonrpcErrorMessage, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/schema.go b/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/schema.go deleted file mode 100644 index f7d82b68a2..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.17.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.17.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Conventions packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.17.0" diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/doc.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/doc.go deleted file mode 100644 index c8bb8c57e6..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the v1.26.0 -// version of the OpenTelemetry semantic conventions. -package semconv // import "go.opentelemetry.io/collector/semconv/v1.26.0" diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_attribute_group.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_attribute_group.go deleted file mode 100644 index 98e34f3b9f..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_attribute_group.go +++ /dev/null @@ -1,5331 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -// The Android platform on which the Android application is running. -const ( - // Uniquely identifies the framework API revision offered by a version - // (os.version) of the android operating system. More information can be found - // here. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '33', '32' - AttributeAndroidOSAPILevel = "android.os.api_level" -) - -// ASP.NET Core attributes -const ( - // Rate-limiting result, shows whether the lease was acquired or contains a - // rejection reason - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - // Examples: 'acquired', 'request_canceled' - AttributeAspnetcoreRateLimitingResult = "aspnetcore.rate_limiting.result" - // Full type name of the IExceptionHandler implementation that handled the - // exception. - // - // Type: string - // Requirement Level: Conditionally Required - if and only if the exception was - // handled by this handler. - // Stability: stable - // Examples: 'Contoso.MyHandler' - AttributeAspnetcoreDiagnosticsHandlerType = "aspnetcore.diagnostics.handler.type" - // ASP.NET Core exception middleware handling result - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'handled', 'unhandled' - AttributeAspnetcoreDiagnosticsExceptionResult = "aspnetcore.diagnostics.exception.result" - // Rate limiting policy name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'fixed', 'sliding', 'token' - AttributeAspnetcoreRateLimitingPolicy = "aspnetcore.rate_limiting.policy" - // Flag indicating if request was handled by the application pipeline. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Examples: True - AttributeAspnetcoreRequestIsUnhandled = "aspnetcore.request.is_unhandled" - // A value that indicates whether the matched route is a fallback route. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Examples: True - AttributeAspnetcoreRoutingIsFallback = "aspnetcore.routing.is_fallback" - // Match result - success or failure - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'success', 'failure' - AttributeAspnetcoreRoutingMatchStatus = "aspnetcore.routing.match_status" -) - -const ( - // Lease was acquired - AttributeAspnetcoreRateLimitingResultAcquired = "acquired" - // Lease request was rejected by the endpoint limiter - AttributeAspnetcoreRateLimitingResultEndpointLimiter = "endpoint_limiter" - // Lease request was rejected by the global limiter - AttributeAspnetcoreRateLimitingResultGlobalLimiter = "global_limiter" - // Lease request was canceled - AttributeAspnetcoreRateLimitingResultRequestCanceled = "request_canceled" -) - -const ( - // Exception was handled by the exception handling middleware - AttributeAspnetcoreDiagnosticsExceptionResultHandled = "handled" - // Exception was not handled by the exception handling middleware - AttributeAspnetcoreDiagnosticsExceptionResultUnhandled = "unhandled" - // Exception handling was skipped because the response had started - AttributeAspnetcoreDiagnosticsExceptionResultSkipped = "skipped" - // Exception handling didn't run because the request was aborted - AttributeAspnetcoreDiagnosticsExceptionResultAborted = "aborted" -) - -const ( - // Match succeeded - AttributeAspnetcoreRoutingMatchStatusSuccess = "success" - // Match failed - AttributeAspnetcoreRoutingMatchStatusFailure = "failure" -) - -// Generic attributes for AWS services. -const ( - // The AWS request ID as returned in the response headers x-amz-request-id or - // x-amz-requestid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' - AttributeAWSRequestID = "aws.request_id" -) - -// Attributes for AWS DynamoDB. -const ( - // The JSON-serialized value of each item in the AttributeDefinitions request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" - // The value of the AttributesToGet request parameter. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'lives', 'id' - AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" - // The value of the ConsistentRead request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" - // The JSON-serialized value of each item in the ConsumedCapacity response field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { - // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, - // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": - // "string", "WriteCapacityUnits": number }' - AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" - // The value of the Count response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBCount = "aws.dynamodb.count" - // The value of the ExclusiveStartTableName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Users', 'CatsTable' - AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" - // The JSON-serialized value of each item in the GlobalSecondaryIndexUpdates - // request field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" - // The JSON-serialized value of each item of the GlobalSecondaryIndexes request - // field - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": - // number, "WriteCapacityUnits": number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" - // The value of the IndexName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'name_to_group' - AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" - // The JSON-serialized value of the ItemCollectionMetrics response field. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, - // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : - // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": - // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' - AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" - // The value of the Limit request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" - // The JSON-serialized value of each item of the LocalSecondaryIndexes request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": - // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" } }' - AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" - // The value of the ProjectionExpression request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, - // ProductReviews' - AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" - // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" - // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" - // The value of the ScanIndexForward request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" - // The value of the ScannedCount response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 50 - AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" - // The value of the Segment request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" - // The value of the Select request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AttributeAWSDynamoDBSelect = "aws.dynamodb.select" - // The number of items in the TableNames response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 20 - AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" - // The keys in the RequestItems object field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Users', 'Cats' - AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" - // The value of the TotalSegments request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" -) - -// Attributes for AWS Elastic Container Service (ECS). -const ( - // The ID of a running ECS task. The ID MUST be extracted from task.arn. - // - // Type: string - // Requirement Level: Conditionally Required - If and only if `task.arn` is - // populated. - // Stability: experimental - // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', - // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AttributeAWSECSTaskID = "aws.ecs.task.id" - // The ARN of an ECS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" - // The Amazon Resource Name (ARN) of an ECS container instance. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AttributeAWSECSContainerARN = "aws.ecs.container.arn" - // The launch type for an ECS task. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeAWSECSLaunchtype = "aws.ecs.launchtype" - // The ARN of a running ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', - // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task- - // id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AttributeAWSECSTaskARN = "aws.ecs.task.arn" - // The family name of the ECS task definition used to create the ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-family' - AttributeAWSECSTaskFamily = "aws.ecs.task.family" - // The revision for the task definition used to create the ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '8', '26' - AttributeAWSECSTaskRevision = "aws.ecs.task.revision" -) - -const ( - // ec2 - AttributeAWSECSLaunchtypeEC2 = "ec2" - // fargate - AttributeAWSECSLaunchtypeFargate = "fargate" -) - -// Attributes for AWS Elastic Kubernetes Service (EKS). -const ( - // The ARN of an EKS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" -) - -// Attributes for AWS Logs. -const ( - // The Amazon Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the log group ARN format documentation. - AttributeAWSLogGroupARNs = "aws.log.group.arns" - // The name(s) of the AWS log group(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like multi-container - // applications, where a single application has sidecar containers, and each write - // to their own log group. - AttributeAWSLogGroupNames = "aws.log.group.names" - // The ARN(s) of the AWS log stream(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- - // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the log stream ARN format documentation. One log group can contain - // several log streams, so these ARNs necessarily identify both a log group and a - // log stream. - AttributeAWSLogStreamARNs = "aws.log.stream.arns" - // The name(s) of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSLogStreamNames = "aws.log.stream.names" -) - -// Attributes for AWS Lambda. -const ( - // The full invoked ARN as provided on the Context passed to the function (Lambda- - // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next - // applicable). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from cloud.resource_id if an alias is involved. - AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" -) - -// Attributes for AWS S3. -const ( - // The S3 bucket name the request refers to. Corresponds to the --bucket parameter - // of the S3 API operations. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'some-bucket-name' - // Note: The bucket attribute is applicable to all S3 operations that reference a - // bucket, i.e. that require the bucket name as a mandatory parameter. - // This applies to almost all S3 operations except list-buckets. - AttributeAWSS3Bucket = "aws.s3.bucket" - // The source object (in the form bucket/key) for the copy operation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The copy_source attribute applies to S3 copy operations and corresponds - // to the --copy-source parameter - // of the copy-object operation within the S3 API. - // This applies in particular to the following operations:
      - //
    • copy-object
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3CopySource = "aws.s3.copy_source" - // The delete request container that specifies the objects to be deleted. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string} - // ],Quiet=boolean' - // Note: The delete attribute is only applicable to the delete-object operation. - // The delete attribute corresponds to the --delete parameter of the - // delete-objects operation within the S3 API. - AttributeAWSS3Delete = "aws.s3.delete" - // The S3 object key the request refers to. Corresponds to the --key parameter of - // the S3 API operations. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The key attribute is applicable to all object-related S3 operations, i.e. - // that require the object key as a mandatory parameter. - // This applies in particular to the following operations:
      - //
    • copy-object
    • - //
    • delete-object
    • - //
    • get-object
    • - //
    • head-object
    • - //
    • put-object
    • - //
    • restore-object
    • - //
    • select-object-content
    • - //
    • abort-multipart-upload
    • - //
    • complete-multipart-upload
    • - //
    • create-multipart-upload
    • - //
    • list-parts
    • - //
    • upload-part
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3Key = "aws.s3.key" - // The part number of the part being uploaded in a multipart-upload operation. - // This is a positive integer between 1 and 10,000. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3456 - // Note: The part_number attribute is only applicable to the upload-part - // and upload-part-copy operations. - // The part_number attribute corresponds to the --part-number parameter of the - // upload-part operation within the S3 API. - AttributeAWSS3PartNumber = "aws.s3.part_number" - // Upload ID that identifies the multipart upload. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' - // Note: The upload_id attribute applies to S3 multipart-upload operations and - // corresponds to the --upload-id parameter - // of the S3 API multipart operations. - // This applies in particular to the following operations:
      - //
    • abort-multipart-upload
    • - //
    • complete-multipart-upload
    • - //
    • list-parts
    • - //
    • upload-part
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3UploadID = "aws.s3.upload_id" -) - -// The web browser attributes -const ( - // Array of brand name and version separated by a space - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.brands). - AttributeBrowserBrands = "browser.brands" - // Preferred language of the user using the browser - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // navigator.language. - AttributeBrowserLanguage = "browser.language" - // A boolean that is true if the browser is running on a mobile device - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left - // unset. - AttributeBrowserMobile = "browser.mobile" - // The platform on which the browser is running - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.platform). If unavailable, the legacy - // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be - // left unset in order for the values to be consistent. - // The list of possible values is defined in the W3C User-Agent Client Hints - // specification. Note that some (but not all) of these values can overlap with - // values in the os.type and os.name attributes. However, for consistency, the - // values in the browser.platform attribute should capture the exact value that - // the user agent provides. - AttributeBrowserPlatform = "browser.platform" -) - -// These attributes may be used to describe the client in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // Client address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the server side, and when communicating through an - // intermediary, client.address SHOULD represent the client address behind any - // intermediaries, for example proxies, if it's available. - AttributeClientAddress = "client.address" - // Client port number. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - // Note: When observed from the server side, and when communicating through an - // intermediary, client.port SHOULD represent the client port behind any - // intermediaries, for example proxies, if it's available. - AttributeClientPort = "client.port" -) - -// A cloud environment (e.g. GCP, Azure, AWS). -const ( - // The cloud account ID the resource is assigned to. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '111111111111', 'opentelemetry' - AttributeCloudAccountID = "cloud.account.id" - // Cloud regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the resource - // is running. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and - // Google Cloud. - AttributeCloudAvailabilityZone = "cloud.availability_zone" - // The cloud platform in use. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The prefix of the service SHOULD match the one specified in - // cloud.provider. - AttributeCloudPlatform = "cloud.platform" - // Name of the cloud provider. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeCloudProvider = "cloud.provider" - // The geographical region the resource is running. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for example - // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or - // Tencent Cloud regions. - AttributeCloudRegion = "cloud.region" - // Cloud provider-specific native identifier of the monitored cloud resource (e.g. - // an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on - // GCP) - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', '//run.googl - // eapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', '/sub - // scriptions//resourceGroups//providers/Microsoft.Web/sites - // //functions/' - // Note: On some cloud providers, it may not be possible to determine the full ID - // at startup, - // so it may be necessary to set cloud.resource_id as a span attribute instead.The - // exact value to use for cloud.resource_id depends on the cloud provider. - // The following well-known definitions MUST be used if you set this attribute and - // they apply:
      - //
    • AWS Lambda: The function ARN. - // Take care not to use the "invoked ARN" directly but replace any - // alias suffix - // with the resolved function version, as the same runtime instance may be - // invocable with - // multiple different aliases.
    • - //
    • GCP: The URI of the resource
    • - //
    • Azure: The Fully Qualified Resource ID of the invoked function, - // not the function app, having the form - // /subscriptions//resourceGroups//providers/Microsoft.Web/s - // ites//functions/. - // This means that a span attribute MUST be used, as an Azure function app can - // host multiple functions that would usually share - // a TracerProvider.
    • - //
    - AttributeCloudResourceID = "cloud.resource_id" -) - -const ( - // Alibaba Cloud Elastic Compute Service - AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" - // Alibaba Cloud Function Compute - AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" - // Red Hat OpenShift on Alibaba Cloud - AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" - // AWS Elastic Compute Cloud - AttributeCloudPlatformAWSEC2 = "aws_ec2" - // AWS Elastic Container Service - AttributeCloudPlatformAWSECS = "aws_ecs" - // AWS Elastic Kubernetes Service - AttributeCloudPlatformAWSEKS = "aws_eks" - // AWS Lambda - AttributeCloudPlatformAWSLambda = "aws_lambda" - // AWS Elastic Beanstalk - AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" - // AWS App Runner - AttributeCloudPlatformAWSAppRunner = "aws_app_runner" - // Red Hat OpenShift on AWS (ROSA) - AttributeCloudPlatformAWSOpenshift = "aws_openshift" - // Azure Virtual Machines - AttributeCloudPlatformAzureVM = "azure_vm" - // Azure Container Apps - AttributeCloudPlatformAzureContainerApps = "azure_container_apps" - // Azure Container Instances - AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" - // Azure Kubernetes Service - AttributeCloudPlatformAzureAKS = "azure_aks" - // Azure Functions - AttributeCloudPlatformAzureFunctions = "azure_functions" - // Azure App Service - AttributeCloudPlatformAzureAppService = "azure_app_service" - // Azure Red Hat OpenShift - AttributeCloudPlatformAzureOpenshift = "azure_openshift" - // Google Bare Metal Solution (BMS) - AttributeCloudPlatformGCPBareMetalSolution = "gcp_bare_metal_solution" - // Google Cloud Compute Engine (GCE) - AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" - // Google Cloud Run - AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" - // Google Cloud Kubernetes Engine (GKE) - AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" - // Google Cloud Functions (GCF) - AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" - // Google Cloud App Engine (GAE) - AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" - // Red Hat OpenShift on Google Cloud - AttributeCloudPlatformGCPOpenshift = "gcp_openshift" - // Red Hat OpenShift on IBM Cloud - AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" - // Tencent Cloud Cloud Virtual Machine (CVM) - AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" - // Tencent Cloud Elastic Kubernetes Service (EKS) - AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" - // Tencent Cloud Serverless Cloud Function (SCF) - AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" -) - -const ( - // Alibaba Cloud - AttributeCloudProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeCloudProviderAWS = "aws" - // Microsoft Azure - AttributeCloudProviderAzure = "azure" - // Google Cloud Platform - AttributeCloudProviderGCP = "gcp" - // Heroku Platform as a Service - AttributeCloudProviderHeroku = "heroku" - // IBM Cloud - AttributeCloudProviderIbmCloud = "ibm_cloud" - // Tencent Cloud - AttributeCloudProviderTencentCloud = "tencent_cloud" -) - -// Attributes for CloudEvents. -const ( - // The event_id uniquely identifies the event. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - AttributeCloudeventsEventID = "cloudevents.event_id" - // The source identifies the context in which an event happened. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- - // service' - AttributeCloudeventsEventSource = "cloudevents.event_source" - // The version of the CloudEvents specification which the event uses. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.0' - AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" - // The subject of the event in the context of the event producer (identified by - // source). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'mynewfile.jpg' - AttributeCloudeventsEventSubject = "cloudevents.event_subject" - // The event_type contains a value describing the type of event related to the - // originating occurrence. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' - AttributeCloudeventsEventType = "cloudevents.event_type" -) - -// These attributes allow to report this unit of code and therefore to provide -// more context about the span. -const ( - // The column number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 16 - AttributeCodeColumn = "code.column" - // The source code file name that identifies the code unit as uniquely as possible - // (preferably an absolute file path). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - AttributeCodeFilepath = "code.filepath" - // The method or function name, or equivalent (usually rightmost part of the code - // unit's name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'serveRequest' - AttributeCodeFunction = "code.function" - // The line number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeCodeLineNumber = "code.lineno" - // The "namespace" within which code.function is defined. Usually the - // qualified class or module name, such that code.namespace + some separator + - // code.function form a unique identifier for the code unit. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com.example.MyHTTPService' - AttributeCodeNamespace = "code.namespace" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeCodeStacktrace = "code.stacktrace" -) - -// A container instance. -const ( - // The command used to run the container (i.e. the command name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol' - // Note: If using embedded credentials or sensitive data, it is recommended to - // remove them to prevent potential leakage. - AttributeContainerCommand = "container.command" - // All the command arguments (including the command/executable itself) run by the - // container. [2] - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol, --config, config.yaml' - AttributeContainerCommandArgs = "container.command_args" - // The full command run by the container as a single string representing the full - // command. [2] - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol --config config.yaml' - AttributeContainerCommandLine = "container.command_line" - // The CPU state for this data point. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'user', 'kernel' - AttributeContainerCPUState = "container.cpu.state" - // Container ID. Usually a UUID, as for example used to identify Docker - // containers. The UUID might be abbreviated. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'a3bf90e006b2' - AttributeContainerID = "container.id" - // Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: - // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' - // Note: Docker defines a sha256 of the image id; container.image.id corresponds - // to the Image field from the Docker container inspect API endpoint. - // K8S defines a link to the container registry repository with digest "imageID": - // "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e - // 8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". - // The ID is assigned by the container runtime and can vary in different - // environments. Consider using oci.manifest.digest if it is important to identify - // the same image in different environments/runtimes. - AttributeContainerImageID = "container.image.id" - // Name of the image the container was built on. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gcr.io/opentelemetry/operator' - AttributeContainerImageName = "container.image.name" - // Repo digests of the container image as provided by the container runtime. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d7 - // 02d249a0ccb', 'internal.registry.example.com:5000/example@sha256:b69959407d21e8 - // a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' - // Note: Docker and CRI report those under the RepoDigests field. - AttributeContainerImageRepoDigests = "container.image.repo_digests" - // Container image tags. An example can be found in Docker Image Inspect. Should - // be only the section of the full name for example from - // registry.example.com/my-org/my-image:. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'v1.27.1', '3.5.7-0' - AttributeContainerImageTags = "container.image.tags" - // Container name used by container runtime. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-autoconf' - AttributeContainerName = "container.name" - // The container runtime managing this container. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'docker', 'containerd', 'rkt' - AttributeContainerRuntime = "container.runtime" -) - -const ( - // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows) - AttributeContainerCPUStateUser = "user" - // When CPU is used by the system (host OS) - AttributeContainerCPUStateSystem = "system" - // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows) - AttributeContainerCPUStateKernel = "kernel" -) - -// This group defines the attributes used to describe telemetry in the context -// of databases. -const ( - // The name of the connection pool; unique within the instrumented application. In - // case the connection pool implementation doesn't provide a name, instrumentation - // should use a combination of server.address and server.port attributes formatted - // as server.address:server.port. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myDataSource' - AttributeDBClientConnectionsPoolName = "db.client.connections.pool.name" - // The state of a connection in the pool - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'idle' - AttributeDBClientConnectionsState = "db.client.connections.state" - // The name of a collection (table, container) within the database. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'public.users', 'customers' - // Note: If the collection name is parsed from the query, it SHOULD match the - // value provided in the query and may be qualified with the schema and database - // name. - // It is RECOMMENDED to capture the value as provided by the application without - // attempting to do any case normalization. - AttributeDBCollectionName = "db.collection.name" - // The name of the database, fully qualified within the server address and port. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'customers', 'test.users' - // Note: If a database system has multiple namespace components, they SHOULD be - // concatenated (potentially using database system specific conventions) from most - // general to most specific namespace component, and more specific namespaces - // SHOULD NOT be captured without the more general namespaces, to ensure that - // "startswith" queries for the more general namespaces will be valid. - // Semantic conventions for individual database systems SHOULD document what - // db.namespace means in the context of that system. - // It is RECOMMENDED to capture the value as provided by the application without - // attempting to do any case normalization. - AttributeDBNamespace = "db.namespace" - // The name of the operation or command being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - AttributeDBOperationName = "db.operation.name" - // The database query being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey "WuValue"' - AttributeDBQueryText = "db.query.text" - // The database management system (DBMS) product as identified by the client - // instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The actual DBMS may differ from the one identified by the client. For - // example, when using PostgreSQL client libraries to connect to a CockroachDB, - // the db.system is set to postgresql based on the instrumentation's best - // knowledge. - AttributeDBSystem = "db.system" -) - -const ( - // idle - AttributeDBClientConnectionsStateIdle = "idle" - // used - AttributeDBClientConnectionsStateUsed = "used" -) - -const ( - // Some other SQL database. Fallback only. See notes - AttributeDBSystemOtherSQL = "other_sql" - // Microsoft SQL Server - AttributeDBSystemMSSQL = "mssql" - // Microsoft SQL Server Compact - AttributeDBSystemMssqlcompact = "mssqlcompact" - // MySQL - AttributeDBSystemMySQL = "mysql" - // Oracle Database - AttributeDBSystemOracle = "oracle" - // IBM DB2 - AttributeDBSystemDB2 = "db2" - // PostgreSQL - AttributeDBSystemPostgreSQL = "postgresql" - // Amazon Redshift - AttributeDBSystemRedshift = "redshift" - // Apache Hive - AttributeDBSystemHive = "hive" - // Cloudscape - AttributeDBSystemCloudscape = "cloudscape" - // HyperSQL DataBase - AttributeDBSystemHSQLDB = "hsqldb" - // Progress Database - AttributeDBSystemProgress = "progress" - // SAP MaxDB - AttributeDBSystemMaxDB = "maxdb" - // SAP HANA - AttributeDBSystemHanaDB = "hanadb" - // Ingres - AttributeDBSystemIngres = "ingres" - // FirstSQL - AttributeDBSystemFirstSQL = "firstsql" - // EnterpriseDB - AttributeDBSystemEDB = "edb" - // InterSystems Caché - AttributeDBSystemCache = "cache" - // Adabas (Adaptable Database System) - AttributeDBSystemAdabas = "adabas" - // Firebird - AttributeDBSystemFirebird = "firebird" - // Apache Derby - AttributeDBSystemDerby = "derby" - // FileMaker - AttributeDBSystemFilemaker = "filemaker" - // Informix - AttributeDBSystemInformix = "informix" - // InstantDB - AttributeDBSystemInstantDB = "instantdb" - // InterBase - AttributeDBSystemInterbase = "interbase" - // MariaDB - AttributeDBSystemMariaDB = "mariadb" - // Netezza - AttributeDBSystemNetezza = "netezza" - // Pervasive PSQL - AttributeDBSystemPervasive = "pervasive" - // PointBase - AttributeDBSystemPointbase = "pointbase" - // SQLite - AttributeDBSystemSqlite = "sqlite" - // Sybase - AttributeDBSystemSybase = "sybase" - // Teradata - AttributeDBSystemTeradata = "teradata" - // Vertica - AttributeDBSystemVertica = "vertica" - // H2 - AttributeDBSystemH2 = "h2" - // ColdFusion IMQ - AttributeDBSystemColdfusion = "coldfusion" - // Apache Cassandra - AttributeDBSystemCassandra = "cassandra" - // Apache HBase - AttributeDBSystemHBase = "hbase" - // MongoDB - AttributeDBSystemMongoDB = "mongodb" - // Redis - AttributeDBSystemRedis = "redis" - // Couchbase - AttributeDBSystemCouchbase = "couchbase" - // CouchDB - AttributeDBSystemCouchDB = "couchdb" - // Microsoft Azure Cosmos DB - AttributeDBSystemCosmosDB = "cosmosdb" - // Amazon DynamoDB - AttributeDBSystemDynamoDB = "dynamodb" - // Neo4j - AttributeDBSystemNeo4j = "neo4j" - // Apache Geode - AttributeDBSystemGeode = "geode" - // Elasticsearch - AttributeDBSystemElasticsearch = "elasticsearch" - // Memcached - AttributeDBSystemMemcached = "memcached" - // CockroachDB - AttributeDBSystemCockroachdb = "cockroachdb" - // OpenSearch - AttributeDBSystemOpensearch = "opensearch" - // ClickHouse - AttributeDBSystemClickhouse = "clickhouse" - // Cloud Spanner - AttributeDBSystemSpanner = "spanner" - // Trino - AttributeDBSystemTrino = "trino" -) - -// This group defines attributes for Cassandra. -const ( - // The consistency level of the query. Based on consistency values from CQL. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" - // The data center of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-west-2' - AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" - // The ID of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" - // Whether or not the query is idempotent. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeDBCassandraIdempotence = "db.cassandra.idempotence" - // The fetch size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 5000 - AttributeDBCassandraPageSize = "db.cassandra.page_size" - // The number of times a query was speculatively executed. Not set or 0 if the - // query was not executed speculatively. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 2 - AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" -) - -const ( - // all - AttributeDBCassandraConsistencyLevelAll = "all" - // each_quorum - AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" - // quorum - AttributeDBCassandraConsistencyLevelQuorum = "quorum" - // local_quorum - AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" - // one - AttributeDBCassandraConsistencyLevelOne = "one" - // two - AttributeDBCassandraConsistencyLevelTwo = "two" - // three - AttributeDBCassandraConsistencyLevelThree = "three" - // local_one - AttributeDBCassandraConsistencyLevelLocalOne = "local_one" - // any - AttributeDBCassandraConsistencyLevelAny = "any" - // serial - AttributeDBCassandraConsistencyLevelSerial = "serial" - // local_serial - AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" -) - -// This group defines attributes for Azure Cosmos DB. -const ( - // Unique Cosmos client instance id. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - AttributeDBCosmosDBClientID = "db.cosmosdb.client_id" - // Cosmos client connection mode. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBConnectionMode = "db.cosmosdb.connection_mode" - // CosmosDB Operation Type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBOperationType = "db.cosmosdb.operation_type" - // RU consumed for that operation - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 46.18, 1.0 - AttributeDBCosmosDBRequestCharge = "db.cosmosdb.request_charge" - // Request payload size in bytes - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBRequestContentLength = "db.cosmosdb.request_content_length" - // Cosmos DB status code. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 200, 201 - AttributeDBCosmosDBStatusCode = "db.cosmosdb.status_code" - // Cosmos DB sub status code. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1000, 1002 - AttributeDBCosmosDBSubStatusCode = "db.cosmosdb.sub_status_code" -) - -const ( - // Gateway (HTTP) connections mode - AttributeDBCosmosDBConnectionModeGateway = "gateway" - // Direct connection - AttributeDBCosmosDBConnectionModeDirect = "direct" -) - -const ( - // invalid - AttributeDBCosmosDBOperationTypeInvalid = "Invalid" - // create - AttributeDBCosmosDBOperationTypeCreate = "Create" - // patch - AttributeDBCosmosDBOperationTypePatch = "Patch" - // read - AttributeDBCosmosDBOperationTypeRead = "Read" - // read_feed - AttributeDBCosmosDBOperationTypeReadFeed = "ReadFeed" - // delete - AttributeDBCosmosDBOperationTypeDelete = "Delete" - // replace - AttributeDBCosmosDBOperationTypeReplace = "Replace" - // execute - AttributeDBCosmosDBOperationTypeExecute = "Execute" - // query - AttributeDBCosmosDBOperationTypeQuery = "Query" - // head - AttributeDBCosmosDBOperationTypeHead = "Head" - // head_feed - AttributeDBCosmosDBOperationTypeHeadFeed = "HeadFeed" - // upsert - AttributeDBCosmosDBOperationTypeUpsert = "Upsert" - // batch - AttributeDBCosmosDBOperationTypeBatch = "Batch" - // query_plan - AttributeDBCosmosDBOperationTypeQueryPlan = "QueryPlan" - // execute_javascript - AttributeDBCosmosDBOperationTypeExecuteJavascript = "ExecuteJavaScript" -) - -// This group defines attributes for Elasticsearch. -const ( - // Represents the identifier of an Elasticsearch cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' - AttributeDBElasticsearchClusterName = "db.elasticsearch.cluster.name" - // Represents the human-readable identifier of the node/instance to which a - // request was routed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'instance-0000000001' - AttributeDBElasticsearchNodeName = "db.elasticsearch.node.name" -) - -// Attributes for software deployments. -const ( - // Name of the deployment environment (aka deployment tier). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'staging', 'production' - // Note: deployment.environment does not affect the uniqueness constraints defined - // through - // the service.namespace, service.name and service.instance.id resource - // attributes. - // This implies that resources carrying the following attribute combinations MUST - // be - // considered to be identifying the same service:
      - //
    • service.name=frontend, deployment.environment=production
    • - //
    • service.name=frontend, deployment.environment=staging.
    • - //
    - AttributeDeploymentEnvironment = "deployment.environment" -) - -// Attributes that represents an occurrence of a lifecycle transition on the -// Android platform. -const ( - // Deprecated use the device.app.lifecycle event definition including - // android.state as a payload field instead. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The Android lifecycle states are defined in Activity lifecycle callbacks, - // and from which the OS identifiers are derived. - AttributeAndroidState = "android.state" -) - -const ( - // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time - AttributeAndroidStateCreated = "created" - // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state - AttributeAndroidStateBackground = "background" - // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states - AttributeAndroidStateForeground = "foreground" -) - -// These attributes may be used to describe the receiver of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // Destination address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the source side, and when communicating through an - // intermediary, destination.address SHOULD represent the destination address - // behind any intermediaries, for example proxies, if it's available. - AttributeDestinationAddress = "destination.address" - // Destination port number - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3389, 2888 - AttributeDestinationPort = "destination.port" -) - -// Describes device attributes. -const ( - // A unique identifier representing the device - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values outlined - // below. This value is not an advertising identifier and MUST NOT be used as - // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor - // identifier. On Android (Java or Kotlin), this value MUST be equal to the - // Firebase Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found here on best - // practices and exact implementation details. Caution should be taken when - // storing personal data or anything which can identify a user. GDPR and data - // protection laws may apply, ensure you do your own due diligence. - AttributeDeviceID = "device.id" - // The name of the device manufacturer - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode - // the value Apple. - AttributeDeviceManufacturer = "device.manufacturer" - // The model identifier for the device - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine-readable version of the - // model identifier rather than the market or consumer-friendly name of the - // device. - AttributeDeviceModelIdentifier = "device.model.identifier" - // The marketing name for the device model - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human-readable version of the - // device model rather than a machine-readable alternative. - AttributeDeviceModelName = "device.model.name" -) - -// These attributes may be used for any disk related operation. -const ( - // The disk IO operation direction. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'read' - AttributeDiskIoDirection = "disk.io.direction" -) - -const ( - // read - AttributeDiskIoDirectionRead = "read" - // write - AttributeDiskIoDirectionWrite = "write" -) - -// The shared attributes used to report a DNS query. -const ( - // The name being queried. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'www.example.com', 'opentelemetry.io' - // Note: If the name field contains non-printable characters (below 32 or above - // 126), those characters should be represented as escaped base 10 integers - // (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and - // line feeds should be converted to \t, \r, and \n respectively. - AttributeDNSQuestionName = "dns.question.name" -) - -// Attributes for operations with an authenticated and/or authorized enduser. -const ( - // Username or client_id extracted from the access token or Authorization header - // in the inbound request from outside the system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'username' - AttributeEnduserID = "enduser.id" - // Actual/assumed role the client is making the request under extracted from token - // or application security context. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'admin' - AttributeEnduserRole = "enduser.role" - // Scopes or granted authorities the client currently possesses extracted from - // token or application security context. The value would come from the scope - // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 - // Assertion. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'read:message, write:files' - AttributeEnduserScope = "enduser.scope" -) - -// The shared attributes used to report an error. -const ( - // Describes a class of error the operation ended with. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'timeout', 'java.net.UnknownHostException', - // 'server_certificate_invalid', '500' - // Note: The error.type SHOULD be predictable, and SHOULD have low - // cardinality.When error.type is set to a type (e.g., an exception type), its - // canonical class name identifying the type within the artifact SHOULD be - // used.Instrumentations SHOULD document the list of errors they report.The - // cardinality of error.type within one instrumentation library SHOULD be low. - // Telemetry consumers that aggregate data from multiple instrumentation libraries - // and applications - // should be prepared for error.type to have high cardinality at query time when - // no - // additional filters are applied.If the operation has completed successfully, - // instrumentations SHOULD NOT set error.type.If a specific domain defines its own - // set of error identifiers (such as HTTP or gRPC status codes), - // it's RECOMMENDED to:
      - //
    • Use a domain-specific attribute
    • - //
    • Set error.type to capture all errors, regardless of whether they are - // defined within the domain-specific set or not.
    • - //
    - AttributeErrorType = "error.type" -) - -const ( - // A fallback error value to be used when the instrumentation doesn't define a custom value - AttributeErrorTypeOther = "_OTHER" -) - -// Attributes for Events represented using Log Records. -const ( - // Identifies the class / type of event. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'browser.mouse.click', 'device.app.lifecycle' - // Note: Event names are subject to the same rules as attribute names. Notably, - // event names are namespaced to avoid collisions and provide a clean separation - // of semantics for events in separate domains like browser, mobile, and - // kubernetes. - AttributeEventName = "event.name" -) - -// The shared attributes used to report a single exception associated with a -// span or log. -const ( - // SHOULD be set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's __exit__ method in Python) but will - // usually be caught at the point of recording the exception in most languages.It - // is usually not possible to determine at the point where an exception is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending the span, - // as done in the example for recording span exceptions.It follows that an - // exception may still escape the scope of the span - // even if the exception.escaped attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - AttributeExceptionEscaped = "exception.escaped" - // The exception message. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" - AttributeExceptionMessage = "exception.message" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeExceptionStacktrace = "exception.stacktrace" - // The type of the exception (its fully-qualified class name, if applicable). The - // dynamic type of the exception should be preferred over the static type in - // languages that support it. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - AttributeExceptionType = "exception.type" -) - -// FaaS attributes -const ( - // A boolean that is true if the serverless function is executed for the first - // time (aka cold-start). - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSColdstart = "faas.coldstart" - // A string containing the schedule period as Cron Expression. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0/5 * * * ? *' - AttributeFaaSCron = "faas.cron" - // The name of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos - // DB to the database name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myBucketName', 'myDBName' - AttributeFaaSDocumentCollection = "faas.document.collection" - // The document name/table subjected to the operation. For example, in Cloud - // Storage or S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myFile.txt', 'myTableName' - AttributeFaaSDocumentName = "faas.document.name" - // Describes the type of the operation that was performed on the data. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSDocumentOperation = "faas.document.operation" - // A string containing the time when the data was accessed in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSDocumentTime = "faas.document.time" - // The execution environment ID as a string, that will be potentially reused for - // other invocations to the same function/function version. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note:
      - //
    • AWS Lambda: Use the (full) log stream name.
    • - //
    - AttributeFaaSInstance = "faas.instance" - // The invocation ID of the current function invocation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - AttributeFaaSInvocationID = "faas.invocation_id" - // The name of the invoked function. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-function' - // Note: SHOULD be equal to the faas.name resource attribute of the invoked - // function. - AttributeFaaSInvokedName = "faas.invoked_name" - // The cloud provider of the invoked function. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked - // function. - AttributeFaaSInvokedProvider = "faas.invoked_provider" - // The cloud region of the invoked function. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the cloud.region resource attribute of the invoked - // function. - AttributeFaaSInvokedRegion = "faas.invoked_region" - // The amount of memory available to the serverless function converted to Bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 134217728 - // Note: It's recommended to set this attribute since e.g. too little memory can - // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, - // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this - // information (which must be multiplied by 1,048,576). - AttributeFaaSMaxMemory = "faas.max_memory" - // The name of the single function that this runtime instance executes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // code.namespace/code.function - // span attributes).For some cloud providers, the above definition is ambiguous. - // The following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud providers/products:
      - //
    • Azure: The full name /, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the cloud.resource_id attribute).
    • - //
    - AttributeFaaSName = "faas.name" - // A string containing the function invocation time in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSTime = "faas.time" - // Type of the trigger which caused this function invocation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSTrigger = "faas.trigger" - // The immutable version of the function being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use:
      - //
    • AWS Lambda: The function version - // (an integer represented as a decimal string).
    • - //
    • Google Cloud Run (Services): The revision - // (i.e., the function name plus the revision suffix).
    • - //
    • Google Cloud Functions: The value of the - // K_REVISION environment variable.
    • - //
    • Azure Functions: Not applicable. Do not set this attribute.
    • - //
    - AttributeFaaSVersion = "faas.version" -) - -const ( - // When a new object is created - AttributeFaaSDocumentOperationInsert = "insert" - // When an object is modified - AttributeFaaSDocumentOperationEdit = "edit" - // When an object is deleted - AttributeFaaSDocumentOperationDelete = "delete" -) - -const ( - // Alibaba Cloud - AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeFaaSInvokedProviderAWS = "aws" - // Microsoft Azure - AttributeFaaSInvokedProviderAzure = "azure" - // Google Cloud Platform - AttributeFaaSInvokedProviderGCP = "gcp" - // Tencent Cloud - AttributeFaaSInvokedProviderTencentCloud = "tencent_cloud" -) - -const ( - // A response to some data source operation such as a database or filesystem read/write - AttributeFaaSTriggerDatasource = "datasource" - // To provide an answer to an inbound HTTP request - AttributeFaaSTriggerHTTP = "http" - // A function is set to be executed when messages are sent to a messaging system - AttributeFaaSTriggerPubsub = "pubsub" - // A function is scheduled to be executed regularly - AttributeFaaSTriggerTimer = "timer" - // If none of the others apply - AttributeFaaSTriggerOther = "other" -) - -// Attributes for Feature Flags. -const ( - // The unique identifier of the feature flag. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'logo-color' - AttributeFeatureFlagKey = "feature_flag.key" - // The name of the service provider that performs the flag evaluation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Flag Manager' - AttributeFeatureFlagProviderName = "feature_flag.provider_name" - // SHOULD be a semantic identifier for a value. If one is unavailable, a - // stringified version of the value can be used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides a - // means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant red maybe be used for the value #c05543.A stringified - // version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - AttributeFeatureFlagVariant = "feature_flag.variant" -) - -// Describes file attributes. -const ( - // Directory where the file is located. It should include the drive letter, when - // appropriate. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/home/user', 'C:\\Program Files\\MyApp' - AttributeFileDirectory = "file.directory" - // File extension, excluding the leading dot. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: When the file name has multiple extensions (example.tar.gz), only the - // last one should be captured ("gz", not "tar.gz"). - AttributeFileExtension = "file.extension" - // Name of the file including the extension, without the directory. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example.png' - AttributeFileName = "file.name" - // Full path to the file, including the file name. It should include the drive - // letter, when appropriate. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/home/alice/example.png', 'C:\\Program Files\\MyApp\\myapp.exe' - AttributeFilePath = "file.path" - // File size in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeFileSize = "file.size" -) - -// Attributes for Google Cloud Run. -const ( - // The name of the Cloud Run execution being run for the Job, as set by the - // CLOUD_RUN_EXECUTION environment variable. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'job-name-xxxx', 'sample-job-mdw84' - AttributeGCPCloudRunJobExecution = "gcp.cloud_run.job.execution" - // The index for a task within an execution as provided by the - // CLOUD_RUN_TASK_INDEX environment variable. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 1 - AttributeGCPCloudRunJobTaskIndex = "gcp.cloud_run.job.task_index" -) - -// Attributes for Google Compute Engine (GCE). -const ( - // The hostname of a GCE instance. This is the full value of the default or custom - // hostname. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-host1234.example.com', 'sample-vm.us-west1-b.c.my- - // project.internal' - AttributeGCPGceInstanceHostname = "gcp.gce.instance.hostname" - // The instance name of a GCE instance. This is the value provided by host.name, - // the visible name of the instance in the Cloud Console UI, and the prefix for - // the default hostname of the instance as defined by the default internal DNS - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'instance-1', 'my-vm-name' - AttributeGCPGceInstanceName = "gcp.gce.instance.name" -) - -// The attributes used to describe telemetry in the context of LLM (Large -// Language Models) requests and responses. -const ( - // The full response received from the LLM. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: "[{'role': 'assistant', 'content': 'The capital of France is - // Paris.'}]" - // Note: It's RECOMMENDED to format completions as JSON string matching OpenAI - // messages format - AttributeGenAiCompletion = "gen_ai.completion" - // The full prompt sent to an LLM. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: "[{'role': 'user', 'content': 'What is the capital of France?'}]" - // Note: It's RECOMMENDED to format prompts as JSON string matching OpenAI - // messages format - AttributeGenAiPrompt = "gen_ai.prompt" - // The maximum number of tokens the LLM generates for a request. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeGenAiRequestMaxTokens = "gen_ai.request.max_tokens" - // The name of the LLM a request is being made to. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gpt-4' - AttributeGenAiRequestModel = "gen_ai.request.model" - // The temperature setting for the LLM request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 0.0 - AttributeGenAiRequestTemperature = "gen_ai.request.temperature" - // The top_p sampling setting for the LLM request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0 - AttributeGenAiRequestTopP = "gen_ai.request.top_p" - // Array of reasons the model stopped generating tokens, corresponding to each - // generation received. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'stop' - AttributeGenAiResponseFinishReasons = "gen_ai.response.finish_reasons" - // The unique identifier for the completion. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'chatcmpl-123' - AttributeGenAiResponseID = "gen_ai.response.id" - // The name of the LLM a response was generated from. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gpt-4-0613' - AttributeGenAiResponseModel = "gen_ai.response.model" - // The Generative AI product as identified by the client instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'openai' - // Note: The actual GenAI product may differ from the one identified by the - // client. For example, when using OpenAI client libraries to communicate with - // Mistral, the gen_ai.system is set to openai based on the instrumentation's best - // knowledge. - AttributeGenAiSystem = "gen_ai.system" - // The number of tokens used in the LLM response (completion). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 180 - AttributeGenAiUsageCompletionTokens = "gen_ai.usage.completion_tokens" - // The number of tokens used in the LLM prompt. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeGenAiUsagePromptTokens = "gen_ai.usage.prompt_tokens" -) - -const ( - // OpenAI - AttributeGenAiSystemOpenai = "openai" -) - -// Attributes for GraphQL. -const ( - // The GraphQL document being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - AttributeGraphqlDocument = "graphql.document" - // The name of the operation being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'findBookByID' - AttributeGraphqlOperationName = "graphql.operation.name" - // The type of the operation being executed. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'query', 'mutation', 'subscription' - AttributeGraphqlOperationType = "graphql.operation.type" -) - -const ( - // GraphQL query - AttributeGraphqlOperationTypeQuery = "query" - // GraphQL mutation - AttributeGraphqlOperationTypeMutation = "mutation" - // GraphQL subscription - AttributeGraphqlOperationTypeSubscription = "subscription" -) - -// Attributes for the Android platform on which the Android application is -// running. -const ( - // Unique identifier for the application - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' - AttributeHerokuAppID = "heroku.app.id" - // Commit hash for the current release - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' - AttributeHerokuReleaseCommit = "heroku.release.commit" - // Time and date the release was created - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2022-10-23T18:00:42Z' - AttributeHerokuReleaseCreationTimestamp = "heroku.release.creation_timestamp" -) - -// A host is defined as a computing instance. For example, physical servers, -// virtual machines, switches or disk array. -const ( - // The CPU architecture the host system is running on. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeHostArch = "host.arch" - // The amount of level 2 memory cache available to the processor (in Bytes). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 12288000 - AttributeHostCPUCacheL2Size = "host.cpu.cache.l2.size" - // Family or generation of the CPU. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '6', 'PA-RISC 1.1e' - AttributeHostCPUFamily = "host.cpu.family" - // Model identifier. It provides more granular information about the CPU, - // distinguishing it from other CPUs within the same family. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '6', '9000/778/B180L' - AttributeHostCPUModelID = "host.cpu.model.id" - // Model designation of the processor. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' - AttributeHostCPUModelName = "host.cpu.model.name" - // Stepping or core revisions. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1', 'r1p1' - AttributeHostCPUStepping = "host.cpu.stepping" - // Processor manufacturer identifier. A maximum 12-character string. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'GenuineIntel' - // Note: CPUID command returns the vendor ID string in EBX, EDX and ECX registers. - // Writing these to memory in this order results in a 12-character string. - AttributeHostCPUVendorID = "host.cpu.vendor.id" - // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud - // provider. For non-containerized systems, this should be the machine-id. See the - // table below for the sources to use to determine the machine-id based on - // operating system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - AttributeHostID = "host.id" - // VM image ID or host OS image ID. For Cloud, this value is from the provider. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ami-07b06b442921831e5' - AttributeHostImageID = "host.image.id" - // Name of the VM image or OS install the host was instantiated from. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - AttributeHostImageName = "host.image.name" - // The version string of the VM image or host OS as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0.1' - AttributeHostImageVersion = "host.image.version" - // Available IP addresses of the host, excluding loopback interfaces. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' - // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses - // MUST be specified in the RFC 5952 format. - AttributeHostIP = "host.ip" - // Available MAC addresses of the host, excluding loopback interfaces. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' - // Note: MAC Addresses MUST be represented in IEEE RA hexadecimal form: as hyphen- - // separated octets in uppercase hexadecimal form from most to least significant. - AttributeHostMac = "host.mac" - // Name of the host. On Unix systems, it may contain what the hostname command - // returns, or the fully qualified hostname, or another name specified by the - // user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-test' - AttributeHostName = "host.name" - // Type of host. For Cloud, this must be the machine type. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'n1-standard-1' - AttributeHostType = "host.type" -) - -const ( - // AMD64 - AttributeHostArchAMD64 = "amd64" - // ARM32 - AttributeHostArchARM32 = "arm32" - // ARM64 - AttributeHostArchARM64 = "arm64" - // Itanium - AttributeHostArchIA64 = "ia64" - // 32-bit PowerPC - AttributeHostArchPPC32 = "ppc32" - // 64-bit PowerPC - AttributeHostArchPPC64 = "ppc64" - // IBM z/Architecture - AttributeHostArchS390x = "s390x" - // 32-bit x86 - AttributeHostArchX86 = "x86" -) - -// Semantic convention attributes in the HTTP namespace. -const ( - // State of the HTTP connection in the HTTP connection pool. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'active', 'idle' - AttributeHTTPConnectionState = "http.connection.state" - // The size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3495 - AttributeHTTPRequestBodySize = "http.request.body.size" - // HTTP request method. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - // Note: HTTP request method value SHOULD be "known" to the - // instrumentation. - // By default, this convention defines "known" methods as the ones - // listed in RFC9110 - // and the PATCH method defined in RFC5789.If the HTTP request method is not known - // to instrumentation, it MUST set the http.request.method attribute to _OTHER.If - // the HTTP instrumentation could end up converting valid HTTP request methods to - // _OTHER, then it MUST provide a way to override - // the list of known HTTP methods. If this override is done via environment - // variable, then the environment variable MUST be named - // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of - // case-sensitive known HTTP methods - // (this list MUST be a full override of the default known method, it is not a - // list of known methods in addition to the defaults).HTTP method names are case- - // sensitive and http.request.method attribute value MUST match a known HTTP - // method name exactly. - // Instrumentations for specific web frameworks that consider HTTP methods to be - // case insensitive, SHOULD populate a canonical equivalent. - // Tracing instrumentations that do so, MUST also set http.request.method_original - // to the original value. - AttributeHTTPRequestMethod = "http.request.method" - // Original HTTP method sent by the client in the request line. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'GeT', 'ACL', 'foo' - AttributeHTTPRequestMethodOriginal = "http.request.method_original" - // The ordinal number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets resent - // by the client, regardless of what was the cause of the resending (e.g. - // redirection, authorization failure, 503 Server Unavailable, network issues, or - // any other). - AttributeHTTPRequestResendCount = "http.request.resend_count" - // The total size of the request in bytes. This should be the total number of - // bytes sent over the wire, including the request line (HTTP/1.1), framing - // (HTTP/2 and HTTP/3), headers, and request body if any. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1437 - AttributeHTTPRequestSize = "http.request.size" - // The size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3495 - AttributeHTTPResponseBodySize = "http.response.body.size" - // The total size of the response in bytes. This should be the total number of - // bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 - // and HTTP/3), headers, and response body and trailers if any. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1437 - AttributeHTTPResponseSize = "http.response.size" - // HTTP response status code. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 200 - AttributeHTTPResponseStatusCode = "http.response.status_code" - // The matched route, that is, the path template in the format used by the - // respective server framework. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: MUST NOT be populated when this is not supported by the HTTP server - // framework as the route attribute should have low-cardinality and the URI path - // can NOT substitute it. - // SHOULD include the application root if there is one. - AttributeHTTPRoute = "http.route" -) - -const ( - // active state - AttributeHTTPConnectionStateActive = "active" - // idle state - AttributeHTTPConnectionStateIdle = "idle" -) - -const ( - // CONNECT method - AttributeHTTPRequestMethodConnect = "CONNECT" - // DELETE method - AttributeHTTPRequestMethodDelete = "DELETE" - // GET method - AttributeHTTPRequestMethodGet = "GET" - // HEAD method - AttributeHTTPRequestMethodHead = "HEAD" - // OPTIONS method - AttributeHTTPRequestMethodOptions = "OPTIONS" - // PATCH method - AttributeHTTPRequestMethodPatch = "PATCH" - // POST method - AttributeHTTPRequestMethodPost = "POST" - // PUT method - AttributeHTTPRequestMethodPut = "PUT" - // TRACE method - AttributeHTTPRequestMethodTrace = "TRACE" - // Any HTTP method that the instrumentation has no prior knowledge of - AttributeHTTPRequestMethodOther = "_OTHER" -) - -// Java Virtual machine related attributes. -const ( - // Name of the buffer pool. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'mapped', 'direct' - // Note: Pool names are generally obtained via BufferPoolMXBean#getName(). - AttributeJvmBufferPoolName = "jvm.buffer.pool.name" - // Name of the garbage collector action. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'end of minor GC', 'end of major GC' - // Note: Garbage collector action is generally obtained via - // GarbageCollectionNotificationInfo#getGcAction(). - AttributeJvmGcAction = "jvm.gc.action" - // Name of the garbage collector. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'G1 Young Generation', 'G1 Old Generation' - // Note: Garbage collector name is generally obtained via - // GarbageCollectionNotificationInfo#getGcName(). - AttributeJvmGcName = "jvm.gc.name" - // Name of the memory pool. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' - // Note: Pool names are generally obtained via MemoryPoolMXBean#getName(). - AttributeJvmMemoryPoolName = "jvm.memory.pool.name" - // The type of memory. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'heap', 'non_heap' - AttributeJvmMemoryType = "jvm.memory.type" - // Whether the thread is daemon or not. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeJvmThreadDaemon = "jvm.thread.daemon" - // State of the thread. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'runnable', 'blocked' - AttributeJvmThreadState = "jvm.thread.state" -) - -const ( - // Heap memory - AttributeJvmMemoryTypeHeap = "heap" - // Non-heap memory - AttributeJvmMemoryTypeNonHeap = "non_heap" -) - -const ( - // A thread that has not yet started is in this state - AttributeJvmThreadStateNew = "new" - // A thread executing in the Java virtual machine is in this state - AttributeJvmThreadStateRunnable = "runnable" - // A thread that is blocked waiting for a monitor lock is in this state - AttributeJvmThreadStateBlocked = "blocked" - // A thread that is waiting indefinitely for another thread to perform a particular action is in this state - AttributeJvmThreadStateWaiting = "waiting" - // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state - AttributeJvmThreadStateTimedWaiting = "timed_waiting" - // A thread that has exited is in this state - AttributeJvmThreadStateTerminated = "terminated" -) - -// Kubernetes resource attributes. -const ( - // The name of the cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-cluster' - AttributeK8SClusterName = "k8s.cluster.name" - // A pseudo-ID for the cluster, set to the UID of the kube-system namespace. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - // Note: K8S doesn't have support for obtaining a cluster ID. If this is ever - // added, we will recommend collecting the k8s.cluster.uid through the - // official APIs. In the meantime, we are able to use the uid of the - // kube-system namespace as a proxy for cluster ID. Read on for the - // rationale.Every object created in a K8S cluster is assigned a distinct UID. The - // kube-system namespace is used by Kubernetes itself and will exist - // for the lifetime of the cluster. Using the uid of the kube-system - // namespace is a reasonable proxy for the K8S ClusterID as it will only - // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are - // UUIDs as standardized by - // ISO/IEC 9834-8 and ITU-T X.667. - // Which states:
    - // If generated according to one of the mechanisms defined in Rec.
    - // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - // different from all other UUIDs generated before 3603 A.D., or is - // extremely likely to be different (depending on the mechanism - // chosen).Therefore, UIDs between clusters should be extremely unlikely to - // conflict. - AttributeK8SClusterUID = "k8s.cluster.uid" - // The name of the Container from Pod specification, must be unique within a Pod. - // Container runtime usually uses different globally unique name (container.name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'redis' - AttributeK8SContainerName = "k8s.container.name" - // Number of times the container was restarted. This attribute can be used to - // identify a particular container (running or stopped) within a container spec. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeK8SContainerRestartCount = "k8s.container.restart_count" - // Last terminated reason of the Container. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Evicted', 'Error' - AttributeK8SContainerStatusLastTerminatedReason = "k8s.container.status.last_terminated_reason" - // The name of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SCronJobName = "k8s.cronjob.name" - // The UID of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SCronJobUID = "k8s.cronjob.uid" - // The name of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SDaemonSetName = "k8s.daemonset.name" - // The UID of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDaemonSetUID = "k8s.daemonset.uid" - // The name of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SDeploymentName = "k8s.deployment.name" - // The UID of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDeploymentUID = "k8s.deployment.uid" - // The name of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SJobName = "k8s.job.name" - // The UID of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SJobUID = "k8s.job.uid" - // The name of the namespace that the pod is running in. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'default' - AttributeK8SNamespaceName = "k8s.namespace.name" - // The name of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'node-1' - AttributeK8SNodeName = "k8s.node.name" - // The UID of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - AttributeK8SNodeUID = "k8s.node.uid" - // The name of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-pod-autoconf' - AttributeK8SPodName = "k8s.pod.name" - // The UID of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SPodUID = "k8s.pod.uid" - // The name of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SReplicaSetName = "k8s.replicaset.name" - // The UID of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SReplicaSetUID = "k8s.replicaset.uid" - // The name of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SStatefulSetName = "k8s.statefulset.name" - // The UID of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SStatefulSetUID = "k8s.statefulset.uid" -) - -// Log attributes -const ( - // The stream associated with the log. See below for a list of well-known values. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeLogIostream = "log.iostream" -) - -const ( - // Logs from stdout stream - AttributeLogIostreamStdout = "stdout" - // Events from stderr stream - AttributeLogIostreamStderr = "stderr" -) - -// Attributes for a file to which log was emitted. -const ( - // The basename of the file. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'audit.log' - AttributeLogFileName = "log.file.name" - // The basename of the file, with symlinks resolved. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'uuid.log' - AttributeLogFileNameResolved = "log.file.name_resolved" - // The full path to the file. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/var/log/mysql/audit.log' - AttributeLogFilePath = "log.file.path" - // The full path to the file, with symlinks resolved. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/var/lib/docker/uuid.log' - AttributeLogFilePathResolved = "log.file.path_resolved" -) - -// The generic attributes that may be used in any Log Record. -const ( - // A unique identifier for the Log Record. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' - // Note: If an id is provided, other log records with the same id will be - // considered duplicates and can be removed safely. This means, that two - // distinguishable log records MUST have different values. - // The id MAY be an Universally Unique Lexicographically Sortable Identifier - // (ULID), but other identifiers (e.g. UUID) may be used as needed. - AttributeLogRecordUID = "log.record.uid" -) - -// Attributes describing telemetry around messaging systems and messaging -// activities. -const ( - // The number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans - // that operate with a single message. When a messaging client library supports - // both batch and single-message API for the same operation, instrumentations - // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use - // it for single-message APIs. - AttributeMessagingBatchMessageCount = "messaging.batch.message_count" - // A unique identifier for the client that consumes or produces a message. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'client-5', 'myhost@8742@s8083jm' - AttributeMessagingClientID = "messaging.client.id" - // A boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingDestinationAnonymous = "messaging.destination.anonymous" - // The message destination name - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic or - // other entity within the broker. If - // the broker doesn't have such notion, the destination name SHOULD uniquely - // identify the broker. - AttributeMessagingDestinationName = "messaging.destination.name" - // The identifier of the partition messages are sent to or received from, unique - // within the messaging.destination.name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1' - AttributeMessagingDestinationPartitionID = "messaging.destination.partition.id" - // Low cardinality representation of the messaging destination name - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example would - // be a destination name involving a user name or product id. Although the - // destination name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and aggregation. - AttributeMessagingDestinationTemplate = "messaging.destination.template" - // A boolean that is true if the message destination is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingDestinationTemporary = "messaging.destination.temporary" - // A boolean that is true if the publish message destination is anonymous (could - // be unnamed or have auto-generated name). - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingDestinationPublishAnonymous = "messaging.destination_publish.anonymous" - // The name of the original destination the message was published to - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MyQueue', 'MyTopic' - // Note: The name SHOULD uniquely identify a specific queue, topic, or other - // entity within the broker. If - // the broker doesn't have such notion, the original destination name SHOULD - // uniquely identify the broker. - AttributeMessagingDestinationPublishName = "messaging.destination_publish.name" - // The size of the message body in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1439 - // Note: This can refer to both the compressed or uncompressed body size. If both - // sizes are known, the uncompressed - // body size should be used. - AttributeMessagingMessageBodySize = "messaging.message.body.size" - // The conversation ID identifying the conversation to which the message belongs, - // represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MyConversationID' - AttributeMessagingMessageConversationID = "messaging.message.conversation_id" - // The size of the message body and metadata in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2738 - // Note: This can refer to both the compressed or uncompressed size. If both sizes - // are known, the uncompressed - // size should be used. - AttributeMessagingMessageEnvelopeSize = "messaging.message.envelope.size" - // A value used by the messaging system as an identifier for the message, - // represented as a string. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - AttributeMessagingMessageID = "messaging.message.id" - // The system-specific name of the messaging operation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ack', 'nack', 'send' - AttributeMessagingOperationName = "messaging.operation.name" - // A string identifying the type of the messaging operation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: If a custom value is used, it MUST be of low cardinality. - AttributeMessagingOperationType = "messaging.operation.type" - // The messaging system as identified by the client instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The actual messaging system may differ from the one known by the client. - // For example, when using Kafka client libraries to communicate with Azure Event - // Hubs, the messaging.system is set to kafka based on the instrumentation's best - // knowledge. - AttributeMessagingSystem = "messaging.system" -) - -const ( - // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created - AttributeMessagingOperationTypePublish = "publish" - // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios - AttributeMessagingOperationTypeCreate = "create" - // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages - AttributeMessagingOperationTypeReceive = "receive" - // One or more messages are delivered to or processed by a consumer - AttributeMessagingOperationTypeDeliver = "process" - // One or more messages are settled - AttributeMessagingOperationTypeSettle = "settle" -) - -const ( - // Apache ActiveMQ - AttributeMessagingSystemActivemq = "activemq" - // Amazon Simple Queue Service (SQS) - AttributeMessagingSystemAWSSqs = "aws_sqs" - // Azure Event Grid - AttributeMessagingSystemEventgrid = "eventgrid" - // Azure Event Hubs - AttributeMessagingSystemEventhubs = "eventhubs" - // Azure Service Bus - AttributeMessagingSystemServicebus = "servicebus" - // Google Cloud Pub/Sub - AttributeMessagingSystemGCPPubsub = "gcp_pubsub" - // Java Message Service - AttributeMessagingSystemJms = "jms" - // Apache Kafka - AttributeMessagingSystemKafka = "kafka" - // RabbitMQ - AttributeMessagingSystemRabbitmq = "rabbitmq" - // Apache RocketMQ - AttributeMessagingSystemRocketmq = "rocketmq" -) - -// This group describes attributes specific to Apache Kafka. -const ( - // Name of the Kafka Consumer Group that is handling the message. Only applies to - // consumers, not producers. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-group' - AttributeMessagingKafkaConsumerGroup = "messaging.kafka.consumer.group" - // Message keys in Kafka are used for grouping alike messages to ensure they're - // processed on the same partition. They differ from messaging.message.id in that - // they're not unique. If the key is null, the attribute MUST NOT be set. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to be - // supplied for the attribute. If the key has no unambiguous, canonical string - // form, don't include its value. - AttributeMessagingKafkaMessageKey = "messaging.kafka.message.key" - // The offset of a record in the corresponding Kafka partition. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeMessagingKafkaMessageOffset = "messaging.kafka.message.offset" - // A boolean that is true if the message is a tombstone. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingKafkaMessageTombstone = "messaging.kafka.message.tombstone" -) - -// This group describes attributes specific to RabbitMQ. -const ( - // RabbitMQ message routing key. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myKey' - AttributeMessagingRabbitmqDestinationRoutingKey = "messaging.rabbitmq.destination.routing_key" - // RabbitMQ message delivery tag - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 123 - AttributeMessagingRabbitmqMessageDeliveryTag = "messaging.rabbitmq.message.delivery_tag" -) - -// This group describes attributes specific to RocketMQ. -const ( - // Name of the RocketMQ producer/consumer group that is handling the message. The - // client type is identified by the SpanKind. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myConsumerGroup' - AttributeMessagingRocketmqClientGroup = "messaging.rocketmq.client_group" - // Model of message consumption. This only applies to consumer spans. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingRocketmqConsumptionModel = "messaging.rocketmq.consumption_model" - // The delay time level for delay message, which determines the message delay - // time. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3 - AttributeMessagingRocketmqMessageDelayTimeLevel = "messaging.rocketmq.message.delay_time_level" - // The timestamp in milliseconds that the delay message is expected to be - // delivered to consumer. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1665987217045 - AttributeMessagingRocketmqMessageDeliveryTimestamp = "messaging.rocketmq.message.delivery_timestamp" - // It is essential for FIFO message. Messages that belong to the same message - // group are always processed one by one within the same consumer group. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myMessageGroup' - AttributeMessagingRocketmqMessageGroup = "messaging.rocketmq.message.group" - // Key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'keyA', 'keyB' - AttributeMessagingRocketmqMessageKeys = "messaging.rocketmq.message.keys" - // The secondary classifier of message besides topic. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'tagA' - AttributeMessagingRocketmqMessageTag = "messaging.rocketmq.message.tag" - // Type of message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingRocketmqMessageType = "messaging.rocketmq.message.type" - // Namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myNamespace' - AttributeMessagingRocketmqNamespace = "messaging.rocketmq.namespace" -) - -const ( - // Clustering consumption model - AttributeMessagingRocketmqConsumptionModelClustering = "clustering" - // Broadcasting consumption model - AttributeMessagingRocketmqConsumptionModelBroadcasting = "broadcasting" -) - -const ( - // Normal message - AttributeMessagingRocketmqMessageTypeNormal = "normal" - // FIFO message - AttributeMessagingRocketmqMessageTypeFifo = "fifo" - // Delay message - AttributeMessagingRocketmqMessageTypeDelay = "delay" - // Transaction message - AttributeMessagingRocketmqMessageTypeTransaction = "transaction" -) - -// This group describes attributes specific to GCP Pub/Sub. -const ( - // The ack deadline in seconds set for the modify ack deadline request. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeMessagingGCPPubsubMessageAckDeadline = "messaging.gcp_pubsub.message.ack_deadline" - // The ack id for a given message. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ack_id' - AttributeMessagingGCPPubsubMessageAckID = "messaging.gcp_pubsub.message.ack_id" - // The delivery attempt for a given message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2 - AttributeMessagingGCPPubsubMessageDeliveryAttempt = "messaging.gcp_pubsub.message.delivery_attempt" - // The ordering key for a given message. If the attribute is not present, the - // message does not have an ordering key. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ordering_key' - AttributeMessagingGCPPubsubMessageOrderingKey = "messaging.gcp_pubsub.message.ordering_key" -) - -// This group describes attributes specific to Azure Service Bus. -const ( - // The name of the subscription in the topic messages are received from. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'mySubscription' - AttributeMessagingServicebusDestinationSubscriptionName = "messaging.servicebus.destination.subscription_name" - // Describes the settlement type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingServicebusDispositionStatus = "messaging.servicebus.disposition_status" - // Number of deliveries that have been attempted for this message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2 - AttributeMessagingServicebusMessageDeliveryCount = "messaging.servicebus.message.delivery_count" - // The UTC epoch seconds at which the message has been accepted and stored in the - // entity. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1701393730 - AttributeMessagingServicebusMessageEnqueuedTime = "messaging.servicebus.message.enqueued_time" -) - -const ( - // Message is completed - AttributeMessagingServicebusDispositionStatusComplete = "complete" - // Message is abandoned - AttributeMessagingServicebusDispositionStatusAbandon = "abandon" - // Message is sent to dead letter queue - AttributeMessagingServicebusDispositionStatusDeadLetter = "dead_letter" - // Message is deferred - AttributeMessagingServicebusDispositionStatusDefer = "defer" -) - -// This group describes attributes specific to Azure Event Hubs. -const ( - // The name of the consumer group the event consumer is associated with. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'indexer' - AttributeMessagingEventhubsConsumerGroup = "messaging.eventhubs.consumer.group" - // The UTC epoch seconds at which the message has been accepted and stored in the - // entity. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1701393730 - AttributeMessagingEventhubsMessageEnqueuedTime = "messaging.eventhubs.message.enqueued_time" -) - -// These attributes may be used for any network related operation. -const ( - // The ISO 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'DE' - AttributeNetworkCarrierIcc = "network.carrier.icc" - // The mobile carrier country code. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '310' - AttributeNetworkCarrierMcc = "network.carrier.mcc" - // The mobile carrier network code. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '001' - AttributeNetworkCarrierMnc = "network.carrier.mnc" - // The name of the mobile carrier. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'sprint' - AttributeNetworkCarrierName = "network.carrier.name" - // This describes more details regarding the connection.type. It may be the type - // of cell technology connection, but it could be used for describing details - // about a wifi connection. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'LTE' - AttributeNetworkConnectionSubtype = "network.connection.subtype" - // The internet connection type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'wifi' - AttributeNetworkConnectionType = "network.connection.type" - // The network IO operation direction. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'transmit' - AttributeNetworkIoDirection = "network.io.direction" - // Local address of the network connection - IP address or Unix domain socket - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - AttributeNetworkLocalAddress = "network.local.address" - // Local port number of the network connection. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - AttributeNetworkLocalPort = "network.local.port" - // Peer address of the network connection - IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - AttributeNetworkPeerAddress = "network.peer.address" - // Peer port number of the network connection. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - AttributeNetworkPeerPort = "network.peer.port" - // OSI application layer or non-OSI equivalent. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - // Note: The value SHOULD be normalized to lowercase. - AttributeNetworkProtocolName = "network.protocol.name" - // The actual version of the protocol used for network communication. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.1', '2' - // Note: If protocol version is subject to negotiation (for example using ALPN), - // this attribute SHOULD be set to the negotiated version. If the actual protocol - // version is not known, this attribute SHOULD NOT be set. - AttributeNetworkProtocolVersion = "network.protocol.version" - // OSI transport layer or inter-process communication method. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'tcp', 'udp' - // Note: The value SHOULD be normalized to lowercase.Consider always setting the - // transport when setting a port number, since - // a port number is ambiguous without knowing the transport. For example - // different processes could be listening on TCP port 12345 and UDP port 12345. - AttributeNetworkTransport = "network.transport" - // OSI network layer or non-OSI equivalent. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'ipv4', 'ipv6' - // Note: The value SHOULD be normalized to lowercase. - AttributeNetworkType = "network.type" -) - -const ( - // GPRS - AttributeNetworkConnectionSubtypeGprs = "gprs" - // EDGE - AttributeNetworkConnectionSubtypeEdge = "edge" - // UMTS - AttributeNetworkConnectionSubtypeUmts = "umts" - // CDMA - AttributeNetworkConnectionSubtypeCdma = "cdma" - // EVDO Rel. 0 - AttributeNetworkConnectionSubtypeEvdo0 = "evdo_0" - // EVDO Rev. A - AttributeNetworkConnectionSubtypeEvdoA = "evdo_a" - // CDMA2000 1XRTT - AttributeNetworkConnectionSubtypeCdma20001xrtt = "cdma2000_1xrtt" - // HSDPA - AttributeNetworkConnectionSubtypeHsdpa = "hsdpa" - // HSUPA - AttributeNetworkConnectionSubtypeHsupa = "hsupa" - // HSPA - AttributeNetworkConnectionSubtypeHspa = "hspa" - // IDEN - AttributeNetworkConnectionSubtypeIden = "iden" - // EVDO Rev. B - AttributeNetworkConnectionSubtypeEvdoB = "evdo_b" - // LTE - AttributeNetworkConnectionSubtypeLte = "lte" - // EHRPD - AttributeNetworkConnectionSubtypeEhrpd = "ehrpd" - // HSPAP - AttributeNetworkConnectionSubtypeHspap = "hspap" - // GSM - AttributeNetworkConnectionSubtypeGsm = "gsm" - // TD-SCDMA - AttributeNetworkConnectionSubtypeTdScdma = "td_scdma" - // IWLAN - AttributeNetworkConnectionSubtypeIwlan = "iwlan" - // 5G NR (New Radio) - AttributeNetworkConnectionSubtypeNr = "nr" - // 5G NRNSA (New Radio Non-Standalone) - AttributeNetworkConnectionSubtypeNrnsa = "nrnsa" - // LTE CA - AttributeNetworkConnectionSubtypeLteCa = "lte_ca" -) - -const ( - // wifi - AttributeNetworkConnectionTypeWifi = "wifi" - // wired - AttributeNetworkConnectionTypeWired = "wired" - // cell - AttributeNetworkConnectionTypeCell = "cell" - // unavailable - AttributeNetworkConnectionTypeUnavailable = "unavailable" - // unknown - AttributeNetworkConnectionTypeUnknown = "unknown" -) - -const ( - // transmit - AttributeNetworkIoDirectionTransmit = "transmit" - // receive - AttributeNetworkIoDirectionReceive = "receive" -) - -const ( - // TCP - AttributeNetworkTransportTCP = "tcp" - // UDP - AttributeNetworkTransportUDP = "udp" - // Named or anonymous pipe - AttributeNetworkTransportPipe = "pipe" - // Unix domain socket - AttributeNetworkTransportUnix = "unix" -) - -const ( - // IPv4 - AttributeNetworkTypeIpv4 = "ipv4" - // IPv6 - AttributeNetworkTypeIpv6 = "ipv6" -) - -// An OCI image manifest. -const ( - // The digest of the OCI image manifest. For container images specifically is the - // digest by which the container image is known. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: - // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' - // Note: Follows OCI Image Manifest Specification, and specifically the Digest - // property. - // An example can be found in Example Image Manifest. - AttributeOciManifestDigest = "oci.manifest.digest" -) - -// Attributes used by the OpenTracing Shim layer. -const ( - // Parent-child Reference type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The causal relationship between a child Span and a parent Span. - AttributeOpentracingRefType = "opentracing.ref_type" -) - -const ( - // The parent Span depends on the child Span in some capacity - AttributeOpentracingRefTypeChildOf = "child_of" - // The parent Span doesn't depend in any way on the result of the child Span - AttributeOpentracingRefTypeFollowsFrom = "follows_from" -) - -// The operating system (OS) on which the process represented by this resource -// is running. -const ( - // Unique identifier for a particular build or compilation of the operating - // system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' - AttributeOSBuildID = "os.build_id" - // Human readable (not intended to be parsed) OS version information, like e.g. - // reported by ver or lsb_release -a commands. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' - AttributeOSDescription = "os.description" - // Human readable operating system name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iOS', 'Android', 'Ubuntu' - AttributeOSName = "os.name" - // The operating system type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeOSType = "os.type" - // The version string of the operating system as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.2.1', '18.04.1' - AttributeOSVersion = "os.version" -) - -const ( - // Microsoft Windows - AttributeOSTypeWindows = "windows" - // Linux - AttributeOSTypeLinux = "linux" - // Apple Darwin - AttributeOSTypeDarwin = "darwin" - // FreeBSD - AttributeOSTypeFreeBSD = "freebsd" - // NetBSD - AttributeOSTypeNetBSD = "netbsd" - // OpenBSD - AttributeOSTypeOpenBSD = "openbsd" - // DragonFly BSD - AttributeOSTypeDragonflyBSD = "dragonflybsd" - // HP-UX (Hewlett Packard Unix) - AttributeOSTypeHPUX = "hpux" - // AIX (Advanced Interactive eXecutive) - AttributeOSTypeAIX = "aix" - // SunOS, Oracle Solaris - AttributeOSTypeSolaris = "solaris" - // IBM z/OS - AttributeOSTypeZOS = "z_os" -) - -// Attributes reserved for OpenTelemetry -const ( - // Name of the code, either "OK" or "ERROR". MUST NOT be set - // if the status code is UNSET. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeOTelStatusCode = "otel.status_code" - // Description of the Status if it has a value, otherwise not set. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'resource not found' - AttributeOTelStatusDescription = "otel.status_description" -) - -const ( - // The operation has been validated by an Application developer or Operator to have completed successfully - AttributeOTelStatusCodeOk = "OK" - // The operation contains an error - AttributeOTelStatusCodeError = "ERROR" -) - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's -// concepts. -const ( - // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - AttributeOTelScopeName = "otel.scope.name" - // The version of the instrumentation scope - (InstrumentationScope.Version in - // OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.0.0' - AttributeOTelScopeVersion = "otel.scope.version" -) - -// Operations that access some remote service. -const ( - // The service.name of the remote service. SHOULD be equal to the actual - // service.name resource attribute of the remote service if any. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'AuthTokenCache' - AttributePeerService = "peer.service" -) - -// An operating system process. -const ( - // The command used to launch the process (i.e. the command name). On Linux based - // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can - // be set to the first parameter extracted from GetCommandLineW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'cmd/otelcol' - AttributeProcessCommand = "process.command" - // All the command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited strings - // extracted from proc/[pid]/cmdline. For libc-based executables, this would be - // the full argv vector passed to main. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'cmd/otecol', '--config=config.yaml' - AttributeProcessCommandArgs = "process.command_args" - // The full command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of GetCommandLineW. Do not - // set this if you have to assemble it just for monitoring; use - // process.command_args instead. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - AttributeProcessCommandLine = "process.command_line" - // Specifies whether the context switches for this data point were voluntary or - // involuntary. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeProcessContextSwitchType = "process.context_switch_type" - // The date and time the process was created, in ISO 8601 format. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2023-11-21T09:25:34.853Z' - AttributeProcessCreationTime = "process.creation.time" - // The name of the process executable. On Linux based systems, can be set to the - // Name in proc/[pid]/status. On Windows, can be set to the base name of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcol' - AttributeProcessExecutableName = "process.executable.name" - // The full path to the process executable. On Linux based systems, can be set to - // the target of proc/[pid]/exe. On Windows, can be set to the result of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/usr/bin/cmd/otelcol' - AttributeProcessExecutablePath = "process.executable.path" - // The exit code of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 127 - AttributeProcessExitCode = "process.exit.code" - // The date and time the process exited, in ISO 8601 format. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2023-11-21T09:26:12.315Z' - AttributeProcessExitTime = "process.exit.time" - // The PID of the process's group leader. This is also the process group ID (PGID) - // of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 23 - AttributeProcessGroupLeaderPID = "process.group_leader.pid" - // Whether the process is connected to an interactive shell. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeProcessInteractive = "process.interactive" - // The username of the user that owns the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'root' - AttributeProcessOwner = "process.owner" - // The type of page fault for this data point. Type major is for major/hard page - // faults, and minor is for minor/soft page faults. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeProcessPagingFaultType = "process.paging.fault_type" - // Parent Process identifier (PPID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 111 - AttributeProcessParentPID = "process.parent_pid" - // Process identifier (PID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1234 - AttributeProcessPID = "process.pid" - // The real user ID (RUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1000 - AttributeProcessRealUserID = "process.real_user.id" - // The username of the real user of the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'operator' - AttributeProcessRealUserName = "process.real_user.name" - // An additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - AttributeProcessRuntimeDescription = "process.runtime.description" - // The name of the runtime of this process. For compiled native binaries, this - // SHOULD be the name of the compiler. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'OpenJDK Runtime Environment' - AttributeProcessRuntimeName = "process.runtime.name" - // The version of the runtime of this process, as returned by the runtime without - // modification. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.0.2' - AttributeProcessRuntimeVersion = "process.runtime.version" - // The saved user ID (SUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1002 - AttributeProcessSavedUserID = "process.saved_user.id" - // The username of the saved user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'operator' - AttributeProcessSavedUserName = "process.saved_user.name" - // The PID of the process's session leader. This is also the session ID (SID) of - // the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 14 - AttributeProcessSessionLeaderPID = "process.session_leader.pid" - // The effective user ID (EUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1001 - AttributeProcessUserID = "process.user.id" - // The username of the effective user of the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'root' - AttributeProcessUserName = "process.user.name" - // Virtual process identifier. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 12 - // Note: The process ID within a PID namespace. This is not necessarily unique - // across all processes on the host but it is unique within the process namespace - // that the process exists within. - AttributeProcessVpid = "process.vpid" -) - -const ( - // voluntary - AttributeProcessContextSwitchTypeVoluntary = "voluntary" - // involuntary - AttributeProcessContextSwitchTypeInvoluntary = "involuntary" -) - -const ( - // major - AttributeProcessPagingFaultTypeMajor = "major" - // minor - AttributeProcessPagingFaultTypeMinor = "minor" -) - -// Attributes for process CPU -const ( - // The CPU state of the process. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeProcessCPUState = "process.cpu.state" -) - -const ( - // system - AttributeProcessCPUStateSystem = "system" - // user - AttributeProcessCPUStateUser = "user" - // wait - AttributeProcessCPUStateWait = "wait" -) - -// Attributes for remote procedure calls. -const ( - // The error codes of the Connect request. Error codes are always string values. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCConnectRPCErrorCode = "rpc.connect_rpc.error_code" - // The numeric status code of the gRPC request. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" - // error.code property of response if it is an error response. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: -32700, 100 - AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" - // error.message property of response if it is an error response. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Parse error', 'User already exists' - AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" - // id property of request or response. Since protocol allows id to be int, string, - // null or missing (for notifications), value is expected to be cast to string for - // simplicity. Use empty string in case of null value. Omit entirely if this is a - // notification. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '10', 'request-7', '' - AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" - // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 - // doesn't specify this, the value can be omitted. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2.0', '1.0' - AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" - // Compressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageCompressedSize = "rpc.message.compressed_size" - // MUST be calculated as two different counters starting from 1 one for sent - // messages and one for received message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Note: This way we guarantee that the values will be consistent between - // different implementations. - AttributeRPCMessageID = "rpc.message.id" - // Whether this is a received or sent message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageType = "rpc.message.type" - // Uncompressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageUncompressedSize = "rpc.message.uncompressed_size" - // The name of the (logical) method being called, must be equal to the $method - // part in the span name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The code.function attribute may be used to store the latter - // (e.g., method actually executing the call on the server side, RPC client stub - // method on the client side). - AttributeRPCMethod = "rpc.method" - // The full (logical) name of the service being called, including its package - // name, if applicable. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing class. - // The code.namespace attribute may be used to store the latter (despite the - // attribute name, it may include a class name; e.g., class with method actually - // executing the call on the server side, RPC client stub class on the client - // side). - AttributeRPCService = "rpc.service" - // A string identifying the remoting system. See below for a list of well-known - // identifiers. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCSystem = "rpc.system" -) - -const ( - // cancelled - AttributeRPCConnectRPCErrorCodeCancelled = "cancelled" - // unknown - AttributeRPCConnectRPCErrorCodeUnknown = "unknown" - // invalid_argument - AttributeRPCConnectRPCErrorCodeInvalidArgument = "invalid_argument" - // deadline_exceeded - AttributeRPCConnectRPCErrorCodeDeadlineExceeded = "deadline_exceeded" - // not_found - AttributeRPCConnectRPCErrorCodeNotFound = "not_found" - // already_exists - AttributeRPCConnectRPCErrorCodeAlreadyExists = "already_exists" - // permission_denied - AttributeRPCConnectRPCErrorCodePermissionDenied = "permission_denied" - // resource_exhausted - AttributeRPCConnectRPCErrorCodeResourceExhausted = "resource_exhausted" - // failed_precondition - AttributeRPCConnectRPCErrorCodeFailedPrecondition = "failed_precondition" - // aborted - AttributeRPCConnectRPCErrorCodeAborted = "aborted" - // out_of_range - AttributeRPCConnectRPCErrorCodeOutOfRange = "out_of_range" - // unimplemented - AttributeRPCConnectRPCErrorCodeUnimplemented = "unimplemented" - // internal - AttributeRPCConnectRPCErrorCodeInternal = "internal" - // unavailable - AttributeRPCConnectRPCErrorCodeUnavailable = "unavailable" - // data_loss - AttributeRPCConnectRPCErrorCodeDataLoss = "data_loss" - // unauthenticated - AttributeRPCConnectRPCErrorCodeUnauthenticated = "unauthenticated" -) - -const ( - // OK - AttributeRPCGRPCStatusCodeOk = "0" - // CANCELLED - AttributeRPCGRPCStatusCodeCancelled = "1" - // UNKNOWN - AttributeRPCGRPCStatusCodeUnknown = "2" - // INVALID_ARGUMENT - AttributeRPCGRPCStatusCodeInvalidArgument = "3" - // DEADLINE_EXCEEDED - AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" - // NOT_FOUND - AttributeRPCGRPCStatusCodeNotFound = "5" - // ALREADY_EXISTS - AttributeRPCGRPCStatusCodeAlreadyExists = "6" - // PERMISSION_DENIED - AttributeRPCGRPCStatusCodePermissionDenied = "7" - // RESOURCE_EXHAUSTED - AttributeRPCGRPCStatusCodeResourceExhausted = "8" - // FAILED_PRECONDITION - AttributeRPCGRPCStatusCodeFailedPrecondition = "9" - // ABORTED - AttributeRPCGRPCStatusCodeAborted = "10" - // OUT_OF_RANGE - AttributeRPCGRPCStatusCodeOutOfRange = "11" - // UNIMPLEMENTED - AttributeRPCGRPCStatusCodeUnimplemented = "12" - // INTERNAL - AttributeRPCGRPCStatusCodeInternal = "13" - // UNAVAILABLE - AttributeRPCGRPCStatusCodeUnavailable = "14" - // DATA_LOSS - AttributeRPCGRPCStatusCodeDataLoss = "15" - // UNAUTHENTICATED - AttributeRPCGRPCStatusCodeUnauthenticated = "16" -) - -const ( - // sent - AttributeRPCMessageTypeSent = "SENT" - // received - AttributeRPCMessageTypeReceived = "RECEIVED" -) - -const ( - // gRPC - AttributeRPCSystemGRPC = "grpc" - // Java RMI - AttributeRPCSystemJavaRmi = "java_rmi" - // .NET WCF - AttributeRPCSystemDotnetWcf = "dotnet_wcf" - // Apache Dubbo - AttributeRPCSystemApacheDubbo = "apache_dubbo" - // Connect RPC - AttributeRPCSystemConnectRPC = "connect_rpc" -) - -// These attributes may be used to describe the server in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // Server domain name if available without reverse DNS lookup; otherwise, IP - // address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the client side, and when communicating through an - // intermediary, server.address SHOULD represent the server address behind any - // intermediaries, for example proxies, if it's available. - AttributeServerAddress = "server.address" - // Server port number. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 80, 8080, 443 - // Note: When observed from the client side, and when communicating through an - // intermediary, server.port SHOULD represent the server port behind any - // intermediaries, for example proxies, if it's available. - AttributeServerPort = "server.port" -) - -// A service instance. -const ( - // The string ID of the service instance. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // service.namespace,service.name pair (in other words - // service.namespace,service.name,service.instance.id triplet MUST be globally - // unique). The ID helps to - // distinguish instances of the same service that exist at the same time (e.g. - // instances of a horizontally scaled - // service).Implementations, such as SDKs, are recommended to generate a random - // Version 1 or Version 4 RFC - // 4122 UUID, but are free to use an inherent unique ID as the source of - // this value if stability is desirable. In that case, the ID SHOULD be used as - // source of a UUID Version 5 and - // SHOULD use the following UUID as the namespace: 4d63009a-8d0f-11ee- - // aad7-4c796ed8e320.UUIDs are typically recommended, as only an opaque value for - // the purposes of identifying a service instance is - // needed. Similar to what can be seen in the man page for the - // /etc/machine-id file, the underlying - // data, such as pod name and namespace should be treated as confidential, being - // the user's choice to expose it - // or not via another resource attribute.For applications running behind an - // application server (like unicorn), we do not recommend using one identifier - // for all processes participating in the application. Instead, it's recommended - // each division (e.g. a worker - // thread in unicorn) to have its own instance.id.It's not recommended for a - // Collector to set service.instance.id if it can't unambiguously determine the - // service instance that is generating that telemetry. For instance, creating an - // UUID based on pod.name will - // likely be wrong, as the Collector might not know from which container within - // that pod the telemetry originated. - // However, Collectors can set the service.instance.id if they can unambiguously - // determine the service instance - // for that telemetry. This is typically the case for scraping receivers, as they - // know the target address and - // port. - AttributeServiceInstanceID = "service.instance.id" - // Logical name of the service. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled services. If - // the value was not specified, SDKs MUST fallback to unknown_service: - // concatenated with process.executable.name, e.g. unknown_service:bash. If - // process.executable.name is not available, the value MUST be set to - // unknown_service. - AttributeServiceName = "service.name" - // A namespace for service.name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group of - // services, for example the team name that owns a group of services. service.name - // is expected to be unique within the same namespace. If service.namespace is not - // specified in the Resource then service.name is expected to be unique for all - // services that have no explicit namespace defined (so the empty/unspecified - // namespace is simply one more valid namespace). Zero-length namespace string is - // assumed equal to unspecified namespace. - AttributeServiceNamespace = "service.namespace" - // The version string of the service API or implementation. The format is not - // defined by these conventions. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2.0.0', 'a01dbef8a' - AttributeServiceVersion = "service.version" -) - -// Session is defined as the period of time encompassing all activities -// performed by the application and the actions executed by the end user. -// Consequently, a Session is represented as a collection of Logs, Events, and -// Spans emitted by the Client Application throughout the Session's duration. -// Each Session is assigned a unique identifier, which is included as an -// attribute in the Logs, Events, and Spans generated during the Session's -// lifecycle. -// When a session reaches end of life, typically due to user inactivity or -// session timeout, a new session identifier will be assigned. The previous -// session identifier may be provided by the instrumentation so that telemetry -// backends can link the two sessions. -const ( - // A unique id to identify a session. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - AttributeSessionID = "session.id" - // The previous session.id for this user, when known. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - AttributeSessionPreviousID = "session.previous_id" -) - -// SignalR attributes -const ( - // SignalR HTTP connection closure status. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'app_shutdown', 'timeout' - AttributeSignalrConnectionStatus = "signalr.connection.status" - // SignalR transport type - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'web_sockets', 'long_polling' - AttributeSignalrTransport = "signalr.transport" -) - -const ( - // The connection was closed normally - AttributeSignalrConnectionStatusNormalClosure = "normal_closure" - // The connection was closed due to a timeout - AttributeSignalrConnectionStatusTimeout = "timeout" - // The connection was closed because the app is shutting down - AttributeSignalrConnectionStatusAppShutdown = "app_shutdown" -) - -const ( - // ServerSentEvents protocol - AttributeSignalrTransportServerSentEvents = "server_sent_events" - // LongPolling protocol - AttributeSignalrTransportLongPolling = "long_polling" - // WebSockets protocol - AttributeSignalrTransportWebSockets = "web_sockets" -) - -// These attributes may be used to describe the sender of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // Source address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the destination side, and when communicating through - // an intermediary, source.address SHOULD represent the source address behind any - // intermediaries, for example proxies, if it's available. - AttributeSourceAddress = "source.address" - // Source port number - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3389, 2888 - AttributeSourcePort = "source.port" -) - -// Describes System attributes -const ( - // The device identifier - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '(identifier)' - AttributeSystemDevice = "system.device" -) - -// Describes System CPU attributes -const ( - // The logical CPU number [0..n-1] - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1 - AttributeSystemCPULogicalNumber = "system.cpu.logical_number" - // The state of the CPU - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'idle', 'interrupt' - AttributeSystemCPUState = "system.cpu.state" -) - -const ( - // user - AttributeSystemCPUStateUser = "user" - // system - AttributeSystemCPUStateSystem = "system" - // nice - AttributeSystemCPUStateNice = "nice" - // idle - AttributeSystemCPUStateIdle = "idle" - // iowait - AttributeSystemCPUStateIowait = "iowait" - // interrupt - AttributeSystemCPUStateInterrupt = "interrupt" - // steal - AttributeSystemCPUStateSteal = "steal" -) - -// Describes System Memory attributes -const ( - // The memory state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'free', 'cached' - AttributeSystemMemoryState = "system.memory.state" -) - -const ( - // used - AttributeSystemMemoryStateUsed = "used" - // free - AttributeSystemMemoryStateFree = "free" - // shared - AttributeSystemMemoryStateShared = "shared" - // buffers - AttributeSystemMemoryStateBuffers = "buffers" - // cached - AttributeSystemMemoryStateCached = "cached" -) - -// Describes System Memory Paging attributes -const ( - // The paging access direction - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'in' - AttributeSystemPagingDirection = "system.paging.direction" - // The memory paging state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'free' - AttributeSystemPagingState = "system.paging.state" - // The memory paging type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'minor' - AttributeSystemPagingType = "system.paging.type" -) - -const ( - // in - AttributeSystemPagingDirectionIn = "in" - // out - AttributeSystemPagingDirectionOut = "out" -) - -const ( - // used - AttributeSystemPagingStateUsed = "used" - // free - AttributeSystemPagingStateFree = "free" -) - -const ( - // major - AttributeSystemPagingTypeMajor = "major" - // minor - AttributeSystemPagingTypeMinor = "minor" -) - -// Describes Filesystem attributes -const ( - // The filesystem mode - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'rw, ro' - AttributeSystemFilesystemMode = "system.filesystem.mode" - // The filesystem mount path - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/mnt/data' - AttributeSystemFilesystemMountpoint = "system.filesystem.mountpoint" - // The filesystem state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'used' - AttributeSystemFilesystemState = "system.filesystem.state" - // The filesystem type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ext4' - AttributeSystemFilesystemType = "system.filesystem.type" -) - -const ( - // used - AttributeSystemFilesystemStateUsed = "used" - // free - AttributeSystemFilesystemStateFree = "free" - // reserved - AttributeSystemFilesystemStateReserved = "reserved" -) - -const ( - // fat32 - AttributeSystemFilesystemTypeFat32 = "fat32" - // exfat - AttributeSystemFilesystemTypeExfat = "exfat" - // ntfs - AttributeSystemFilesystemTypeNtfs = "ntfs" - // refs - AttributeSystemFilesystemTypeRefs = "refs" - // hfsplus - AttributeSystemFilesystemTypeHfsplus = "hfsplus" - // ext4 - AttributeSystemFilesystemTypeExt4 = "ext4" -) - -// Describes Network attributes -const ( - // A stateless protocol MUST NOT set this attribute - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'close_wait' - AttributeSystemNetworkState = "system.network.state" -) - -const ( - // close - AttributeSystemNetworkStateClose = "close" - // close_wait - AttributeSystemNetworkStateCloseWait = "close_wait" - // closing - AttributeSystemNetworkStateClosing = "closing" - // delete - AttributeSystemNetworkStateDelete = "delete" - // established - AttributeSystemNetworkStateEstablished = "established" - // fin_wait_1 - AttributeSystemNetworkStateFinWait1 = "fin_wait_1" - // fin_wait_2 - AttributeSystemNetworkStateFinWait2 = "fin_wait_2" - // last_ack - AttributeSystemNetworkStateLastAck = "last_ack" - // listen - AttributeSystemNetworkStateListen = "listen" - // syn_recv - AttributeSystemNetworkStateSynRecv = "syn_recv" - // syn_sent - AttributeSystemNetworkStateSynSent = "syn_sent" - // time_wait - AttributeSystemNetworkStateTimeWait = "time_wait" -) - -// Describes System Process attributes -const ( - // The process state, e.g., Linux Process State Codes - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'running' - AttributeSystemProcessStatus = "system.process.status" -) - -const ( - // running - AttributeSystemProcessStatusRunning = "running" - // sleeping - AttributeSystemProcessStatusSleeping = "sleeping" - // stopped - AttributeSystemProcessStatusStopped = "stopped" - // defunct - AttributeSystemProcessStatusDefunct = "defunct" -) - -// Attributes for telemetry SDK. -const ( - // The language of the telemetry SDK. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeTelemetrySDKLanguage = "telemetry.sdk.language" - // The name of the telemetry SDK as defined above. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'opentelemetry' - // Note: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to - // opentelemetry. - // If another SDK, like a fork or a vendor-provided implementation, is used, this - // SDK MUST set the - // telemetry.sdk.name attribute to the fully-qualified class or module name of - // this SDK's main entry point - // or another suitable identifier depending on the language. - // The identifier opentelemetry is reserved and MUST NOT be used in this case. - // All custom identifiers SHOULD be stable across different versions of an - // implementation. - AttributeTelemetrySDKName = "telemetry.sdk.name" - // The version string of the telemetry SDK. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetrySDKVersion = "telemetry.sdk.version" - // The name of the auto instrumentation agent or distribution, if used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'parts-unlimited-java' - // Note: Official auto instrumentation agents and distributions SHOULD set the - // telemetry.distro.name attribute to - // a string starting with opentelemetry-, e.g. opentelemetry-java-instrumentation. - AttributeTelemetryDistroName = "telemetry.distro.name" - // The version string of the auto instrumentation agent or distribution, if used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.2.3' - AttributeTelemetryDistroVersion = "telemetry.distro.version" -) - -const ( - // cpp - AttributeTelemetrySDKLanguageCPP = "cpp" - // dotnet - AttributeTelemetrySDKLanguageDotnet = "dotnet" - // erlang - AttributeTelemetrySDKLanguageErlang = "erlang" - // go - AttributeTelemetrySDKLanguageGo = "go" - // java - AttributeTelemetrySDKLanguageJava = "java" - // nodejs - AttributeTelemetrySDKLanguageNodejs = "nodejs" - // php - AttributeTelemetrySDKLanguagePHP = "php" - // python - AttributeTelemetrySDKLanguagePython = "python" - // ruby - AttributeTelemetrySDKLanguageRuby = "ruby" - // rust - AttributeTelemetrySDKLanguageRust = "rust" - // swift - AttributeTelemetrySDKLanguageSwift = "swift" - // webjs - AttributeTelemetrySDKLanguageWebjs = "webjs" -) - -// These attributes may be used for any operation to store information about a -// thread that started a span. -const ( - // Current "managed" thread ID (as opposed to OS thread ID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeThreadID = "thread.id" - // Current thread name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'main' - AttributeThreadName = "thread.name" -) - -// Semantic convention attributes in the TLS namespace. -const ( - // String indicating the cipher used during the current connection. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', - // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' - // Note: The values allowed for tls.cipher MUST be one of the Descriptions of the - // registered TLS Cipher Suits. - AttributeTLSCipher = "tls.cipher" - // PEM-encoded stand-alone certificate offered by the client. This is usually - // mutually-exclusive of client.certificate_chain since this value also exists in - // that list. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...' - AttributeTLSClientCertificate = "tls.client.certificate" - // Array of PEM-encoded certificates that make up the certificate chain offered by - // the client. This is usually mutually-exclusive of client.certificate since that - // value should be the first certificate in the chain. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - AttributeTLSClientCertificateChain = "tls.client.certificate_chain" - // Certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - AttributeTLSClientHashMd5 = "tls.client.hash.md5" - // Certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - AttributeTLSClientHashSha1 = "tls.client.hash.sha1" - // Certificate fingerprint using the SHA256 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - AttributeTLSClientHashSha256 = "tls.client.hash.sha256" - // Distinguished name of subject of the issuer of the x.509 certificate presented - // by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' - AttributeTLSClientIssuer = "tls.client.issuer" - // A hash that identifies clients based on how they perform an SSL/TLS handshake. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - AttributeTLSClientJa3 = "tls.client.ja3" - // Date/Time indicating when client certificate is no longer considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - AttributeTLSClientNotAfter = "tls.client.not_after" - // Date/Time indicating when client certificate is first considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - AttributeTLSClientNotBefore = "tls.client.not_before" - // Also called an SNI, this tells the server which hostname to which the client is - // attempting to connect to. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry.io' - AttributeTLSClientServerName = "tls.client.server_name" - // Distinguished name of subject of the x.509 certificate presented by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' - AttributeTLSClientSubject = "tls.client.subject" - // Array of ciphers offered by the client during the client hello. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' - AttributeTLSClientSupportedCiphers = "tls.client.supported_ciphers" - // String indicating the curve used for the given cipher, when applicable - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'secp256r1' - AttributeTLSCurve = "tls.curve" - // Boolean flag indicating if the TLS negotiation was successful and transitioned - // to an encrypted tunnel. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Examples: True - AttributeTLSEstablished = "tls.established" - // String indicating the protocol being tunneled. Per the values in the IANA - // registry, this string should be lower case. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'http/1.1' - AttributeTLSNextProtocol = "tls.next_protocol" - // Normalized lowercase protocol name parsed from original string of the - // negotiated SSL/TLS protocol version - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeTLSProtocolName = "tls.protocol.name" - // Numeric part of the version parsed from the original string of the negotiated - // SSL/TLS protocol version - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.2', '3' - AttributeTLSProtocolVersion = "tls.protocol.version" - // Boolean flag indicating if this TLS connection was resumed from an existing TLS - // negotiation. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Examples: True - AttributeTLSResumed = "tls.resumed" - // PEM-encoded stand-alone certificate offered by the server. This is usually - // mutually-exclusive of server.certificate_chain since this value also exists in - // that list. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...' - AttributeTLSServerCertificate = "tls.server.certificate" - // Array of PEM-encoded certificates that make up the certificate chain offered by - // the server. This is usually mutually-exclusive of server.certificate since that - // value should be the first certificate in the chain. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - AttributeTLSServerCertificateChain = "tls.server.certificate_chain" - // Certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - AttributeTLSServerHashMd5 = "tls.server.hash.md5" - // Certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - AttributeTLSServerHashSha1 = "tls.server.hash.sha1" - // Certificate fingerprint using the SHA256 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - AttributeTLSServerHashSha256 = "tls.server.hash.sha256" - // Distinguished name of subject of the issuer of the x.509 certificate presented - // by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' - AttributeTLSServerIssuer = "tls.server.issuer" - // A hash that identifies servers based on how they perform an SSL/TLS handshake. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - AttributeTLSServerJa3s = "tls.server.ja3s" - // Date/Time indicating when server certificate is no longer considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - AttributeTLSServerNotAfter = "tls.server.not_after" - // Date/Time indicating when server certificate is first considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - AttributeTLSServerNotBefore = "tls.server.not_before" - // Distinguished name of subject of the x.509 certificate presented by the server. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' - AttributeTLSServerSubject = "tls.server.subject" -) - -const ( - // ssl - AttributeTLSProtocolNameSsl = "ssl" - // tls - AttributeTLSProtocolNameTLS = "tls" -) - -// Attributes describing URL. -const ( - // Domain extracted from the url.full, such as "opentelemetry.io". - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', - // '[1080:0:0:0:8:800:200C:417A]' - // Note: In some cases a URL may refer to an IP and/or port directly, without a - // domain name. In this case, the IP address would go to the domain field. If the - // URL contains a literal IPv6 address enclosed by [ and ], the [ and ] characters - // should also be captured in the domain field. - AttributeURLDomain = "url.domain" - // The file extension extracted from the url.full, excluding the leading dot. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: The file extension is only set if it exists, as not every url has a file - // extension. When the file name has multiple extensions example.tar.gz, only the - // last one should be captured gz, not tar.gz. - AttributeURLExtension = "url.extension" - // The URI fragment component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'SemConv' - AttributeURLFragment = "url.fragment" - // Absolute URL describing a network resource according to RFC3986 - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', '//localhost' - // Note: For network calls, URL usually has - // scheme://host[:port][path][?query][#fragment] format, where the fragment is not - // transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. - // url.full MUST NOT contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case username and password - // SHOULD be redacted and attribute's value SHOULD be - // https://REDACTED:REDACTED@www.example.com/. - // url.full SHOULD capture the absolute URL when it is available (or can be - // reconstructed). Sensitive content provided in url.full SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLFull = "url.full" - // Unmodified original URL as seen in the event source. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', - // 'search?q=OpenTelemetry' - // Note: In network monitoring, the observed URL may be a full URL, whereas in - // access logs, the URL is often just represented as a path. This field is meant - // to represent the URL as it was observed, complete or not. - // url.original might contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case password and username - // SHOULD NOT be redacted and attribute's value SHOULD remain the same. - AttributeURLOriginal = "url.original" - // The URI path component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/search' - // Note: Sensitive content provided in url.path SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLPath = "url.path" - // Port extracted from the url.full - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 443 - AttributeURLPort = "url.port" - // The URI query component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'q=OpenTelemetry' - // Note: Sensitive content provided in url.query SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLQuery = "url.query" - // The highest registered url domain, stripped of the subdomain. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example.com', 'foo.co.uk' - // Note: This value can be determined precisely with the public suffix list. For - // example, the registered domain for foo.example.com is example.com. Trying to - // approximate this by simply taking the last two labels will not work well for - // TLDs such as co.uk. - AttributeURLRegisteredDomain = "url.registered_domain" - // The URI scheme component identifying the used protocol. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'https', 'ftp', 'telnet' - AttributeURLScheme = "url.scheme" - // The subdomain portion of a fully qualified domain name includes all of the - // names except the host name under the registered_domain. In a partially - // qualified domain, or if the qualification level of the full name cannot be - // determined, subdomain contains all of the names below the registered domain. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'east', 'sub2.sub1' - // Note: The subdomain portion of www.east.mydomain.co.uk is east. If the domain - // has multiple levels of subdomain, such as sub2.sub1.example.com, the subdomain - // field should contain sub2.sub1, with no trailing period. - AttributeURLSubdomain = "url.subdomain" - // The low-cardinality template of an absolute path reference. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/users/{id}', '/users/:id', '/users?id={id}' - AttributeURLTemplate = "url.template" - // The effective top level domain (eTLD), also known as the domain suffix, is the - // last part of the domain name. For example, the top level domain for example.com - // is com. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com', 'co.uk' - // Note: This value can be determined precisely with the public suffix list. - AttributeURLTopLevelDomain = "url.top_level_domain" -) - -// Describes user-agent attributes. -const ( - // Name of the user-agent extracted from original. Usually refers to the browser's - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Safari', 'YourApp' - // Note: Example of extracting browser's name from original string. In the case of - // using a user-agent for non-browser products, such as microservices with - // multiple names/versions inside the user_agent.original, the most significant - // name SHOULD be selected. In such a scenario it should align with - // user_agent.version - AttributeUserAgentName = "user_agent.name" - // Value of the HTTP User-Agent header sent by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU iPhone - // OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) - // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 grpc-java- - // okhttp/1.27.2' - AttributeUserAgentOriginal = "user_agent.original" - // Version of the user-agent extracted from original. Usually refers to the - // browser's version - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.1.2', '1.0.0' - // Note: Example of extracting browser's version from original string. In the case - // of using a user-agent for non-browser products, such as microservices with - // multiple names/versions inside the user_agent.original, the most significant - // version SHOULD be selected. In such a scenario it should align with - // user_agent.name - AttributeUserAgentVersion = "user_agent.version" -) - -// The attributes used to describe the packaged software running the -// application code. -const ( - // Additional description of the web engine (e.g. detailed version and edition - // information). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' - AttributeWebEngineDescription = "webengine.description" - // The name of the web engine. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'WildFly' - AttributeWebEngineName = "webengine.name" - // The version of the web engine. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '21.0.0' - AttributeWebEngineVersion = "webengine.version" -) - -func GetAttribute_groupSemanticConventionAttributeNames() []string { - return []string{ - AttributeAndroidOSAPILevel, - AttributeAspnetcoreRateLimitingResult, - AttributeAspnetcoreDiagnosticsHandlerType, - AttributeAspnetcoreDiagnosticsExceptionResult, - AttributeAspnetcoreRateLimitingPolicy, - AttributeAspnetcoreRequestIsUnhandled, - AttributeAspnetcoreRoutingIsFallback, - AttributeAspnetcoreRoutingMatchStatus, - AttributeAWSRequestID, - AttributeAWSDynamoDBAttributeDefinitions, - AttributeAWSDynamoDBAttributesToGet, - AttributeAWSDynamoDBConsistentRead, - AttributeAWSDynamoDBConsumedCapacity, - AttributeAWSDynamoDBCount, - AttributeAWSDynamoDBExclusiveStartTable, - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, - AttributeAWSDynamoDBGlobalSecondaryIndexes, - AttributeAWSDynamoDBIndexName, - AttributeAWSDynamoDBItemCollectionMetrics, - AttributeAWSDynamoDBLimit, - AttributeAWSDynamoDBLocalSecondaryIndexes, - AttributeAWSDynamoDBProjection, - AttributeAWSDynamoDBProvisionedReadCapacity, - AttributeAWSDynamoDBProvisionedWriteCapacity, - AttributeAWSDynamoDBScanForward, - AttributeAWSDynamoDBScannedCount, - AttributeAWSDynamoDBSegment, - AttributeAWSDynamoDBSelect, - AttributeAWSDynamoDBTableCount, - AttributeAWSDynamoDBTableNames, - AttributeAWSDynamoDBTotalSegments, - AttributeAWSECSTaskID, - AttributeAWSECSClusterARN, - AttributeAWSECSContainerARN, - AttributeAWSECSLaunchtype, - AttributeAWSECSTaskARN, - AttributeAWSECSTaskFamily, - AttributeAWSECSTaskRevision, - AttributeAWSEKSClusterARN, - AttributeAWSLogGroupARNs, - AttributeAWSLogGroupNames, - AttributeAWSLogStreamARNs, - AttributeAWSLogStreamNames, - AttributeAWSLambdaInvokedARN, - AttributeAWSS3Bucket, - AttributeAWSS3CopySource, - AttributeAWSS3Delete, - AttributeAWSS3Key, - AttributeAWSS3PartNumber, - AttributeAWSS3UploadID, - AttributeBrowserBrands, - AttributeBrowserLanguage, - AttributeBrowserMobile, - AttributeBrowserPlatform, - AttributeClientAddress, - AttributeClientPort, - AttributeCloudAccountID, - AttributeCloudAvailabilityZone, - AttributeCloudPlatform, - AttributeCloudProvider, - AttributeCloudRegion, - AttributeCloudResourceID, - AttributeCloudeventsEventID, - AttributeCloudeventsEventSource, - AttributeCloudeventsEventSpecVersion, - AttributeCloudeventsEventSubject, - AttributeCloudeventsEventType, - AttributeCodeColumn, - AttributeCodeFilepath, - AttributeCodeFunction, - AttributeCodeLineNumber, - AttributeCodeNamespace, - AttributeCodeStacktrace, - AttributeContainerCommand, - AttributeContainerCommandArgs, - AttributeContainerCommandLine, - AttributeContainerCPUState, - AttributeContainerID, - AttributeContainerImageID, - AttributeContainerImageName, - AttributeContainerImageRepoDigests, - AttributeContainerImageTags, - AttributeContainerName, - AttributeContainerRuntime, - AttributeDBClientConnectionsPoolName, - AttributeDBClientConnectionsState, - AttributeDBCollectionName, - AttributeDBNamespace, - AttributeDBOperationName, - AttributeDBQueryText, - AttributeDBSystem, - AttributeDBCassandraConsistencyLevel, - AttributeDBCassandraCoordinatorDC, - AttributeDBCassandraCoordinatorID, - AttributeDBCassandraIdempotence, - AttributeDBCassandraPageSize, - AttributeDBCassandraSpeculativeExecutionCount, - AttributeDBCosmosDBClientID, - AttributeDBCosmosDBConnectionMode, - AttributeDBCosmosDBOperationType, - AttributeDBCosmosDBRequestCharge, - AttributeDBCosmosDBRequestContentLength, - AttributeDBCosmosDBStatusCode, - AttributeDBCosmosDBSubStatusCode, - AttributeDBElasticsearchClusterName, - AttributeDBElasticsearchNodeName, - AttributeDeploymentEnvironment, - AttributeAndroidState, - AttributeDestinationAddress, - AttributeDestinationPort, - AttributeDeviceID, - AttributeDeviceManufacturer, - AttributeDeviceModelIdentifier, - AttributeDeviceModelName, - AttributeDiskIoDirection, - AttributeDNSQuestionName, - AttributeEnduserID, - AttributeEnduserRole, - AttributeEnduserScope, - AttributeErrorType, - AttributeEventName, - AttributeExceptionEscaped, - AttributeExceptionMessage, - AttributeExceptionStacktrace, - AttributeExceptionType, - AttributeFaaSColdstart, - AttributeFaaSCron, - AttributeFaaSDocumentCollection, - AttributeFaaSDocumentName, - AttributeFaaSDocumentOperation, - AttributeFaaSDocumentTime, - AttributeFaaSInstance, - AttributeFaaSInvocationID, - AttributeFaaSInvokedName, - AttributeFaaSInvokedProvider, - AttributeFaaSInvokedRegion, - AttributeFaaSMaxMemory, - AttributeFaaSName, - AttributeFaaSTime, - AttributeFaaSTrigger, - AttributeFaaSVersion, - AttributeFeatureFlagKey, - AttributeFeatureFlagProviderName, - AttributeFeatureFlagVariant, - AttributeFileDirectory, - AttributeFileExtension, - AttributeFileName, - AttributeFilePath, - AttributeFileSize, - AttributeGCPCloudRunJobExecution, - AttributeGCPCloudRunJobTaskIndex, - AttributeGCPGceInstanceHostname, - AttributeGCPGceInstanceName, - AttributeGenAiCompletion, - AttributeGenAiPrompt, - AttributeGenAiRequestMaxTokens, - AttributeGenAiRequestModel, - AttributeGenAiRequestTemperature, - AttributeGenAiRequestTopP, - AttributeGenAiResponseFinishReasons, - AttributeGenAiResponseID, - AttributeGenAiResponseModel, - AttributeGenAiSystem, - AttributeGenAiUsageCompletionTokens, - AttributeGenAiUsagePromptTokens, - AttributeGraphqlDocument, - AttributeGraphqlOperationName, - AttributeGraphqlOperationType, - AttributeHerokuAppID, - AttributeHerokuReleaseCommit, - AttributeHerokuReleaseCreationTimestamp, - AttributeHostArch, - AttributeHostCPUCacheL2Size, - AttributeHostCPUFamily, - AttributeHostCPUModelID, - AttributeHostCPUModelName, - AttributeHostCPUStepping, - AttributeHostCPUVendorID, - AttributeHostID, - AttributeHostImageID, - AttributeHostImageName, - AttributeHostImageVersion, - AttributeHostIP, - AttributeHostMac, - AttributeHostName, - AttributeHostType, - AttributeHTTPConnectionState, - AttributeHTTPRequestBodySize, - AttributeHTTPRequestMethod, - AttributeHTTPRequestMethodOriginal, - AttributeHTTPRequestResendCount, - AttributeHTTPRequestSize, - AttributeHTTPResponseBodySize, - AttributeHTTPResponseSize, - AttributeHTTPResponseStatusCode, - AttributeHTTPRoute, - AttributeJvmBufferPoolName, - AttributeJvmGcAction, - AttributeJvmGcName, - AttributeJvmMemoryPoolName, - AttributeJvmMemoryType, - AttributeJvmThreadDaemon, - AttributeJvmThreadState, - AttributeK8SClusterName, - AttributeK8SClusterUID, - AttributeK8SContainerName, - AttributeK8SContainerRestartCount, - AttributeK8SContainerStatusLastTerminatedReason, - AttributeK8SCronJobName, - AttributeK8SCronJobUID, - AttributeK8SDaemonSetName, - AttributeK8SDaemonSetUID, - AttributeK8SDeploymentName, - AttributeK8SDeploymentUID, - AttributeK8SJobName, - AttributeK8SJobUID, - AttributeK8SNamespaceName, - AttributeK8SNodeName, - AttributeK8SNodeUID, - AttributeK8SPodName, - AttributeK8SPodUID, - AttributeK8SReplicaSetName, - AttributeK8SReplicaSetUID, - AttributeK8SStatefulSetName, - AttributeK8SStatefulSetUID, - AttributeLogIostream, - AttributeLogFileName, - AttributeLogFileNameResolved, - AttributeLogFilePath, - AttributeLogFilePathResolved, - AttributeLogRecordUID, - AttributeMessagingBatchMessageCount, - AttributeMessagingClientID, - AttributeMessagingDestinationAnonymous, - AttributeMessagingDestinationName, - AttributeMessagingDestinationPartitionID, - AttributeMessagingDestinationTemplate, - AttributeMessagingDestinationTemporary, - AttributeMessagingDestinationPublishAnonymous, - AttributeMessagingDestinationPublishName, - AttributeMessagingMessageBodySize, - AttributeMessagingMessageConversationID, - AttributeMessagingMessageEnvelopeSize, - AttributeMessagingMessageID, - AttributeMessagingOperationName, - AttributeMessagingOperationType, - AttributeMessagingSystem, - AttributeMessagingKafkaConsumerGroup, - AttributeMessagingKafkaMessageKey, - AttributeMessagingKafkaMessageOffset, - AttributeMessagingKafkaMessageTombstone, - AttributeMessagingRabbitmqDestinationRoutingKey, - AttributeMessagingRabbitmqMessageDeliveryTag, - AttributeMessagingRocketmqClientGroup, - AttributeMessagingRocketmqConsumptionModel, - AttributeMessagingRocketmqMessageDelayTimeLevel, - AttributeMessagingRocketmqMessageDeliveryTimestamp, - AttributeMessagingRocketmqMessageGroup, - AttributeMessagingRocketmqMessageKeys, - AttributeMessagingRocketmqMessageTag, - AttributeMessagingRocketmqMessageType, - AttributeMessagingRocketmqNamespace, - AttributeMessagingGCPPubsubMessageAckDeadline, - AttributeMessagingGCPPubsubMessageAckID, - AttributeMessagingGCPPubsubMessageDeliveryAttempt, - AttributeMessagingGCPPubsubMessageOrderingKey, - AttributeMessagingServicebusDestinationSubscriptionName, - AttributeMessagingServicebusDispositionStatus, - AttributeMessagingServicebusMessageDeliveryCount, - AttributeMessagingServicebusMessageEnqueuedTime, - AttributeMessagingEventhubsConsumerGroup, - AttributeMessagingEventhubsMessageEnqueuedTime, - AttributeNetworkCarrierIcc, - AttributeNetworkCarrierMcc, - AttributeNetworkCarrierMnc, - AttributeNetworkCarrierName, - AttributeNetworkConnectionSubtype, - AttributeNetworkConnectionType, - AttributeNetworkIoDirection, - AttributeNetworkLocalAddress, - AttributeNetworkLocalPort, - AttributeNetworkPeerAddress, - AttributeNetworkPeerPort, - AttributeNetworkProtocolName, - AttributeNetworkProtocolVersion, - AttributeNetworkTransport, - AttributeNetworkType, - AttributeOciManifestDigest, - AttributeOpentracingRefType, - AttributeOSBuildID, - AttributeOSDescription, - AttributeOSName, - AttributeOSType, - AttributeOSVersion, - AttributeOTelStatusCode, - AttributeOTelStatusDescription, - AttributeOTelScopeName, - AttributeOTelScopeVersion, - AttributePeerService, - AttributeProcessCommand, - AttributeProcessCommandArgs, - AttributeProcessCommandLine, - AttributeProcessContextSwitchType, - AttributeProcessCreationTime, - AttributeProcessExecutableName, - AttributeProcessExecutablePath, - AttributeProcessExitCode, - AttributeProcessExitTime, - AttributeProcessGroupLeaderPID, - AttributeProcessInteractive, - AttributeProcessOwner, - AttributeProcessPagingFaultType, - AttributeProcessParentPID, - AttributeProcessPID, - AttributeProcessRealUserID, - AttributeProcessRealUserName, - AttributeProcessRuntimeDescription, - AttributeProcessRuntimeName, - AttributeProcessRuntimeVersion, - AttributeProcessSavedUserID, - AttributeProcessSavedUserName, - AttributeProcessSessionLeaderPID, - AttributeProcessUserID, - AttributeProcessUserName, - AttributeProcessVpid, - AttributeProcessCPUState, - AttributeRPCConnectRPCErrorCode, - AttributeRPCGRPCStatusCode, - AttributeRPCJsonrpcErrorCode, - AttributeRPCJsonrpcErrorMessage, - AttributeRPCJsonrpcRequestID, - AttributeRPCJsonrpcVersion, - AttributeRPCMessageCompressedSize, - AttributeRPCMessageID, - AttributeRPCMessageType, - AttributeRPCMessageUncompressedSize, - AttributeRPCMethod, - AttributeRPCService, - AttributeRPCSystem, - AttributeServerAddress, - AttributeServerPort, - AttributeServiceInstanceID, - AttributeServiceName, - AttributeServiceNamespace, - AttributeServiceVersion, - AttributeSessionID, - AttributeSessionPreviousID, - AttributeSignalrConnectionStatus, - AttributeSignalrTransport, - AttributeSourceAddress, - AttributeSourcePort, - AttributeSystemDevice, - AttributeSystemCPULogicalNumber, - AttributeSystemCPUState, - AttributeSystemMemoryState, - AttributeSystemPagingDirection, - AttributeSystemPagingState, - AttributeSystemPagingType, - AttributeSystemFilesystemMode, - AttributeSystemFilesystemMountpoint, - AttributeSystemFilesystemState, - AttributeSystemFilesystemType, - AttributeSystemNetworkState, - AttributeSystemProcessStatus, - AttributeTelemetrySDKLanguage, - AttributeTelemetrySDKName, - AttributeTelemetrySDKVersion, - AttributeTelemetryDistroName, - AttributeTelemetryDistroVersion, - AttributeThreadID, - AttributeThreadName, - AttributeTLSCipher, - AttributeTLSClientCertificate, - AttributeTLSClientCertificateChain, - AttributeTLSClientHashMd5, - AttributeTLSClientHashSha1, - AttributeTLSClientHashSha256, - AttributeTLSClientIssuer, - AttributeTLSClientJa3, - AttributeTLSClientNotAfter, - AttributeTLSClientNotBefore, - AttributeTLSClientServerName, - AttributeTLSClientSubject, - AttributeTLSClientSupportedCiphers, - AttributeTLSCurve, - AttributeTLSEstablished, - AttributeTLSNextProtocol, - AttributeTLSProtocolName, - AttributeTLSProtocolVersion, - AttributeTLSResumed, - AttributeTLSServerCertificate, - AttributeTLSServerCertificateChain, - AttributeTLSServerHashMd5, - AttributeTLSServerHashSha1, - AttributeTLSServerHashSha256, - AttributeTLSServerIssuer, - AttributeTLSServerJa3s, - AttributeTLSServerNotAfter, - AttributeTLSServerNotBefore, - AttributeTLSServerSubject, - AttributeURLDomain, - AttributeURLExtension, - AttributeURLFragment, - AttributeURLFull, - AttributeURLOriginal, - AttributeURLPath, - AttributeURLPort, - AttributeURLQuery, - AttributeURLRegisteredDomain, - AttributeURLScheme, - AttributeURLSubdomain, - AttributeURLTemplate, - AttributeURLTopLevelDomain, - AttributeUserAgentName, - AttributeUserAgentOriginal, - AttributeUserAgentVersion, - AttributeWebEngineDescription, - AttributeWebEngineName, - AttributeWebEngineVersion, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_event.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_event.go deleted file mode 100644 index ac6893c3b2..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_event.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetEventSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_resource.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_resource.go deleted file mode 100644 index bb89e4806f..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_resource.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetResourceSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_trace.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_trace.go deleted file mode 100644 index 380529563a..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/generated_trace.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetTraceSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/schema.go b/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/schema.go deleted file mode 100644 index dcd02283fa..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.26.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.26.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.26.0" diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/doc.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/doc.go deleted file mode 100644 index 5042d2eba8..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the v1.27.0 -// version of the OpenTelemetry semantic conventions. -package semconv // import "go.opentelemetry.io/collector/semconv/v1.27.0" diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_attribute_group.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_attribute_group.go deleted file mode 100644 index 6247b5d791..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_attribute_group.go +++ /dev/null @@ -1,5843 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -// The Android platform on which the Android application is running. -const ( - // Uniquely identifies the framework API revision offered by a version - // (os.version) of the android operating system. More information can be found - // here. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '33', '32' - AttributeAndroidOSAPILevel = "android.os.api_level" -) - -// This group describes attributes specific to artifacts. Artifacts are files -// or other immutable objects that are intended for distribution. This -// definition aligns directly with the -// [SLSA](https://slsa.dev/spec/v1.0/terminology#package-model) package model. -const ( - // The provenance filename of the built attestation which directly relates to the - // build artifact filename. This filename SHOULD accompany the artifact at publish - // time. See the SLSA Relationship specification for more information. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'golang-binary-amd64-v0.1.0.attestation', 'docker-image- - // amd64-v0.1.0.intoto.json1', 'release-1.tar.gz.attestation', 'file-name- - // package.tar.gz.intoto.json1' - AttributeArtifactAttestationFilename = "artifact.attestation.filename" - // The full hash value (see glossary), of the built attestation. Some envelopes in - // the software attestation space also refer to this as the digest. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408' - AttributeArtifactAttestationHash = "artifact.attestation.hash" - // The id of the build software attestation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '123' - AttributeArtifactAttestationID = "artifact.attestation.id" - // The human readable file name of the artifact, typically generated during build - // and release processes. Often includes the package name and version in the file - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'golang-binary-amd64-v0.1.0', 'docker-image-amd64-v0.1.0', - // 'release-1.tar.gz', 'file-name-package.tar.gz' - // Note: This file name can also act as the Package Name - // in cases where the package ecosystem maps accordingly. - // Additionally, the artifact can be published - // for others, but that is not a guarantee. - AttributeArtifactFilename = "artifact.filename" - // The full hash value (see glossary), often found in checksum.txt on a release of - // the artifact and used to verify package integrity. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9' - // Note: The specific algorithm used to create the cryptographic hash value is - // not defined. In situations where an artifact has multiple - // cryptographic hashes, it is up to the implementer to choose which - // hash value to set here; this should be the most secure hash algorithm - // that is suitable for the situation and consistent with the - // corresponding attestation. The implementer can then provide the other - // hash values through an additional set of attribute extensions as they - // deem necessary. - AttributeArtifactHash = "artifact.hash" - // The Package URL of the package artifact provides a standard way to identify and - // locate the packaged artifact. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'pkg:github/package-url/purl-spec@1209109710924', - // 'pkg:npm/foo@12.12.3' - AttributeArtifactPurl = "artifact.purl" - // The version of the artifact. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'v0.1.0', '1.2.1', '122691-build' - AttributeArtifactVersion = "artifact.version" -) - -// ASP.NET Core attributes -const ( - // Rate-limiting result, shows whether the lease was acquired or contains a - // rejection reason - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - // Examples: 'acquired', 'request_canceled' - AttributeAspnetcoreRateLimitingResult = "aspnetcore.rate_limiting.result" - // Full type name of the IExceptionHandler implementation that handled the - // exception. - // - // Type: string - // Requirement Level: Conditionally Required - if and only if the exception was - // handled by this handler. - // Stability: stable - // Examples: 'Contoso.MyHandler' - AttributeAspnetcoreDiagnosticsHandlerType = "aspnetcore.diagnostics.handler.type" - // ASP.NET Core exception middleware handling result - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'handled', 'unhandled' - AttributeAspnetcoreDiagnosticsExceptionResult = "aspnetcore.diagnostics.exception.result" - // Rate limiting policy name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'fixed', 'sliding', 'token' - AttributeAspnetcoreRateLimitingPolicy = "aspnetcore.rate_limiting.policy" - // Flag indicating if request was handled by the application pipeline. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Examples: True - AttributeAspnetcoreRequestIsUnhandled = "aspnetcore.request.is_unhandled" - // A value that indicates whether the matched route is a fallback route. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Examples: True - AttributeAspnetcoreRoutingIsFallback = "aspnetcore.routing.is_fallback" - // Match result - success or failure - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'success', 'failure' - AttributeAspnetcoreRoutingMatchStatus = "aspnetcore.routing.match_status" -) - -const ( - // Lease was acquired - AttributeAspnetcoreRateLimitingResultAcquired = "acquired" - // Lease request was rejected by the endpoint limiter - AttributeAspnetcoreRateLimitingResultEndpointLimiter = "endpoint_limiter" - // Lease request was rejected by the global limiter - AttributeAspnetcoreRateLimitingResultGlobalLimiter = "global_limiter" - // Lease request was canceled - AttributeAspnetcoreRateLimitingResultRequestCanceled = "request_canceled" -) - -const ( - // Exception was handled by the exception handling middleware - AttributeAspnetcoreDiagnosticsExceptionResultHandled = "handled" - // Exception was not handled by the exception handling middleware - AttributeAspnetcoreDiagnosticsExceptionResultUnhandled = "unhandled" - // Exception handling was skipped because the response had started - AttributeAspnetcoreDiagnosticsExceptionResultSkipped = "skipped" - // Exception handling didn't run because the request was aborted - AttributeAspnetcoreDiagnosticsExceptionResultAborted = "aborted" -) - -const ( - // Match succeeded - AttributeAspnetcoreRoutingMatchStatusSuccess = "success" - // Match failed - AttributeAspnetcoreRoutingMatchStatusFailure = "failure" -) - -// Generic attributes for AWS services. -const ( - // The AWS request ID as returned in the response headers x-amz-request-id or - // x-amz-requestid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' - AttributeAWSRequestID = "aws.request_id" -) - -// Attributes for AWS DynamoDB. -const ( - // The JSON-serialized value of each item in the AttributeDefinitions request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" - // The value of the AttributesToGet request parameter. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'lives', 'id' - AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" - // The value of the ConsistentRead request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" - // The JSON-serialized value of each item in the ConsumedCapacity response field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { - // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, - // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": - // "string", "WriteCapacityUnits": number }' - AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" - // The value of the Count response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBCount = "aws.dynamodb.count" - // The value of the ExclusiveStartTableName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Users', 'CatsTable' - AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" - // The JSON-serialized value of each item in the GlobalSecondaryIndexUpdates - // request field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" - // The JSON-serialized value of each item of the GlobalSecondaryIndexes request - // field - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": - // number, "WriteCapacityUnits": number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" - // The value of the IndexName request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'name_to_group' - AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" - // The JSON-serialized value of the ItemCollectionMetrics response field. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, - // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : - // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": - // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' - AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" - // The value of the Limit request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" - // The JSON-serialized value of each item of the LocalSecondaryIndexes request - // field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": - // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" } }' - AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" - // The value of the ProjectionExpression request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, - // ProductReviews' - AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" - // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" - // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" - // The value of the ScanIndexForward request parameter. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" - // The value of the ScannedCount response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 50 - AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" - // The value of the Segment request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" - // The value of the Select request parameter. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AttributeAWSDynamoDBSelect = "aws.dynamodb.select" - // The number of items in the TableNames response parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 20 - AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" - // The keys in the RequestItems object field. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Users', 'Cats' - AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" - // The value of the TotalSegments request parameter. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" -) - -// Attributes for AWS Elastic Container Service (ECS). -const ( - // The ID of a running ECS task. The ID MUST be extracted from task.arn. - // - // Type: string - // Requirement Level: Conditionally Required - If and only if `task.arn` is - // populated. - // Stability: experimental - // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', - // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AttributeAWSECSTaskID = "aws.ecs.task.id" - // The ARN of an ECS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" - // The Amazon Resource Name (ARN) of an ECS container instance. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AttributeAWSECSContainerARN = "aws.ecs.container.arn" - // The launch type for an ECS task. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeAWSECSLaunchtype = "aws.ecs.launchtype" - // The ARN of a running ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', - // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task- - // id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AttributeAWSECSTaskARN = "aws.ecs.task.arn" - // The family name of the ECS task definition used to create the ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-family' - AttributeAWSECSTaskFamily = "aws.ecs.task.family" - // The revision for the task definition used to create the ECS task. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '8', '26' - AttributeAWSECSTaskRevision = "aws.ecs.task.revision" -) - -const ( - // ec2 - AttributeAWSECSLaunchtypeEC2 = "ec2" - // fargate - AttributeAWSECSLaunchtypeFargate = "fargate" -) - -// Attributes for AWS Elastic Kubernetes Service (EKS). -const ( - // The ARN of an EKS cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" -) - -// Attributes for AWS Logs. -const ( - // The Amazon Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the log group ARN format documentation. - AttributeAWSLogGroupARNs = "aws.log.group.arns" - // The name(s) of the AWS log group(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like multi-container - // applications, where a single application has sidecar containers, and each write - // to their own log group. - AttributeAWSLogGroupNames = "aws.log.group.names" - // The ARN(s) of the AWS log stream(s). - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- - // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the log stream ARN format documentation. One log group can contain - // several log streams, so these ARNs necessarily identify both a log group and a - // log stream. - AttributeAWSLogStreamARNs = "aws.log.stream.arns" - // The name(s) of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSLogStreamNames = "aws.log.stream.names" -) - -// Attributes for AWS Lambda. -const ( - // The full invoked ARN as provided on the Context passed to the function (Lambda- - // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next - // applicable). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from cloud.resource_id if an alias is involved. - AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" -) - -// Attributes for AWS S3. -const ( - // The S3 bucket name the request refers to. Corresponds to the --bucket parameter - // of the S3 API operations. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'some-bucket-name' - // Note: The bucket attribute is applicable to all S3 operations that reference a - // bucket, i.e. that require the bucket name as a mandatory parameter. - // This applies to almost all S3 operations except list-buckets. - AttributeAWSS3Bucket = "aws.s3.bucket" - // The source object (in the form bucket/key) for the copy operation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The copy_source attribute applies to S3 copy operations and corresponds - // to the --copy-source parameter - // of the copy-object operation within the S3 API. - // This applies in particular to the following operations:
      - //
    • copy-object
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3CopySource = "aws.s3.copy_source" - // The delete request container that specifies the objects to be deleted. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string} - // ],Quiet=boolean' - // Note: The delete attribute is only applicable to the delete-object operation. - // The delete attribute corresponds to the --delete parameter of the - // delete-objects operation within the S3 API. - AttributeAWSS3Delete = "aws.s3.delete" - // The S3 object key the request refers to. Corresponds to the --key parameter of - // the S3 API operations. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The key attribute is applicable to all object-related S3 operations, i.e. - // that require the object key as a mandatory parameter. - // This applies in particular to the following operations:
      - //
    • copy-object
    • - //
    • delete-object
    • - //
    • get-object
    • - //
    • head-object
    • - //
    • put-object
    • - //
    • restore-object
    • - //
    • select-object-content
    • - //
    • abort-multipart-upload
    • - //
    • complete-multipart-upload
    • - //
    • create-multipart-upload
    • - //
    • list-parts
    • - //
    • upload-part
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3Key = "aws.s3.key" - // The part number of the part being uploaded in a multipart-upload operation. - // This is a positive integer between 1 and 10,000. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3456 - // Note: The part_number attribute is only applicable to the upload-part - // and upload-part-copy operations. - // The part_number attribute corresponds to the --part-number parameter of the - // upload-part operation within the S3 API. - AttributeAWSS3PartNumber = "aws.s3.part_number" - // Upload ID that identifies the multipart upload. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' - // Note: The upload_id attribute applies to S3 multipart-upload operations and - // corresponds to the --upload-id parameter - // of the S3 API multipart operations. - // This applies in particular to the following operations:
      - //
    • abort-multipart-upload
    • - //
    • complete-multipart-upload
    • - //
    • list-parts
    • - //
    • upload-part
    • - //
    • upload-part-copy
    • - //
    - AttributeAWSS3UploadID = "aws.s3.upload_id" -) - -// Generic attributes for Azure SDK. -const ( - // The unique identifier of the service request. It's generated by the Azure - // service and returned with the response. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '00000000-0000-0000-0000-000000000000' - AttributeAzServiceRequestID = "az.service_request_id" -) - -// The web browser attributes -const ( - // Array of brand name and version separated by a space - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.brands). - AttributeBrowserBrands = "browser.brands" - // Preferred language of the user using the browser - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // navigator.language. - AttributeBrowserLanguage = "browser.language" - // A boolean that is true if the browser is running on a mobile device - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.mobile). If unavailable, this attribute SHOULD be left - // unset. - AttributeBrowserMobile = "browser.mobile" - // The platform on which the browser is running - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the UA client hints API - // (navigator.userAgentData.platform). If unavailable, the legacy - // navigator.platform API SHOULD NOT be used instead and this attribute SHOULD be - // left unset in order for the values to be consistent. - // The list of possible values is defined in the W3C User-Agent Client Hints - // specification. Note that some (but not all) of these values can overlap with - // values in the os.type and os.name attributes. However, for consistency, the - // values in the browser.platform attribute should capture the exact value that - // the user agent provides. - AttributeBrowserPlatform = "browser.platform" -) - -// This group describes attributes specific to pipelines within a Continuous -// Integration and Continuous Deployment (CI/CD) system. A -// [pipeline](https://en.wikipedia.org/wiki/Pipeline_(computing)) in this case -// is a series of steps that are performed in order to deliver a new version of -// software. This aligns with the -// [Britannica](https://www.britannica.com/dictionary/pipeline) definition of a -// pipeline where a **pipeline** is the system for developing and producing -// something. In the context of CI/CD, a pipeline produces or delivers -// software. -const ( - // The human readable name of the pipeline within a CI/CD system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Build and Test', 'Lint', 'Deploy Go Project', - // 'deploy_to_environment' - AttributeCicdPipelineName = "cicd.pipeline.name" - // The unique identifier of a pipeline run within a CI/CD system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '120912' - AttributeCicdPipelineRunID = "cicd.pipeline.run.id" - // The human readable name of a task within a pipeline. Task here most closely - // aligns with a computing process in a pipeline. Other terms for tasks include - // commands, steps, and procedures. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Run GoLang Linter', 'Go Build', 'go-test', 'deploy_binary' - AttributeCicdPipelineTaskName = "cicd.pipeline.task.name" - // The unique identifier of a task run within a pipeline. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '12097' - AttributeCicdPipelineTaskRunID = "cicd.pipeline.task.run.id" - // The URL of the pipeline run providing the complete address in order to locate - // and identify the pipeline run. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://github.com/open-telemetry/semantic- - // conventions/actions/runs/9753949763/job/26920038674?pr=1075' - AttributeCicdPipelineTaskRunURLFull = "cicd.pipeline.task.run.url.full" - // The type of the task within a pipeline. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'build', 'test', 'deploy' - AttributeCicdPipelineTaskType = "cicd.pipeline.task.type" -) - -const ( - // build - AttributeCicdPipelineTaskTypeBuild = "build" - // test - AttributeCicdPipelineTaskTypeTest = "test" - // deploy - AttributeCicdPipelineTaskTypeDeploy = "deploy" -) - -// These attributes may be used to describe the client in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // Client address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the server side, and when communicating through an - // intermediary, client.address SHOULD represent the client address behind any - // intermediaries, for example proxies, if it's available. - AttributeClientAddress = "client.address" - // Client port number. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - // Note: When observed from the server side, and when communicating through an - // intermediary, client.port SHOULD represent the client port behind any - // intermediaries, for example proxies, if it's available. - AttributeClientPort = "client.port" -) - -// A cloud environment (e.g. GCP, Azure, AWS). -const ( - // The cloud account ID the resource is assigned to. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '111111111111', 'opentelemetry' - AttributeCloudAccountID = "cloud.account.id" - // Cloud regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the resource - // is running. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and - // Google Cloud. - AttributeCloudAvailabilityZone = "cloud.availability_zone" - // The cloud platform in use. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The prefix of the service SHOULD match the one specified in - // cloud.provider. - AttributeCloudPlatform = "cloud.platform" - // Name of the cloud provider. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeCloudProvider = "cloud.provider" - // The geographical region the resource is running. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for example - // Alibaba Cloud regions, AWS regions, Azure regions, Google Cloud regions, or - // Tencent Cloud regions. - AttributeCloudRegion = "cloud.region" - // Cloud provider-specific native identifier of the monitored cloud resource (e.g. - // an ARN on AWS, a fully qualified resource ID on Azure, a full resource name on - // GCP) - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', '//run.googl - // eapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', '/sub - // scriptions//resourceGroups//providers/Microsoft.Web/sites - // //functions/' - // Note: On some cloud providers, it may not be possible to determine the full ID - // at startup, - // so it may be necessary to set cloud.resource_id as a span attribute instead.The - // exact value to use for cloud.resource_id depends on the cloud provider. - // The following well-known definitions MUST be used if you set this attribute and - // they apply:
      - //
    • AWS Lambda: The function ARN. - // Take care not to use the "invoked ARN" directly but replace any - // alias suffix - // with the resolved function version, as the same runtime instance may be - // invocable with - // multiple different aliases.
    • - //
    • GCP: The URI of the resource
    • - //
    • Azure: The Fully Qualified Resource ID of the invoked function, - // not the function app, having the form - // /subscriptions//resourceGroups//providers/Microsoft.Web/s - // ites//functions/. - // This means that a span attribute MUST be used, as an Azure function app can - // host multiple functions that would usually share - // a TracerProvider.
    • - //
    - AttributeCloudResourceID = "cloud.resource_id" -) - -const ( - // Alibaba Cloud Elastic Compute Service - AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" - // Alibaba Cloud Function Compute - AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" - // Red Hat OpenShift on Alibaba Cloud - AttributeCloudPlatformAlibabaCloudOpenshift = "alibaba_cloud_openshift" - // AWS Elastic Compute Cloud - AttributeCloudPlatformAWSEC2 = "aws_ec2" - // AWS Elastic Container Service - AttributeCloudPlatformAWSECS = "aws_ecs" - // AWS Elastic Kubernetes Service - AttributeCloudPlatformAWSEKS = "aws_eks" - // AWS Lambda - AttributeCloudPlatformAWSLambda = "aws_lambda" - // AWS Elastic Beanstalk - AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" - // AWS App Runner - AttributeCloudPlatformAWSAppRunner = "aws_app_runner" - // Red Hat OpenShift on AWS (ROSA) - AttributeCloudPlatformAWSOpenshift = "aws_openshift" - // Azure Virtual Machines - AttributeCloudPlatformAzureVM = "azure_vm" - // Azure Container Apps - AttributeCloudPlatformAzureContainerApps = "azure_container_apps" - // Azure Container Instances - AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" - // Azure Kubernetes Service - AttributeCloudPlatformAzureAKS = "azure_aks" - // Azure Functions - AttributeCloudPlatformAzureFunctions = "azure_functions" - // Azure App Service - AttributeCloudPlatformAzureAppService = "azure_app_service" - // Azure Red Hat OpenShift - AttributeCloudPlatformAzureOpenshift = "azure_openshift" - // Google Bare Metal Solution (BMS) - AttributeCloudPlatformGCPBareMetalSolution = "gcp_bare_metal_solution" - // Google Cloud Compute Engine (GCE) - AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" - // Google Cloud Run - AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" - // Google Cloud Kubernetes Engine (GKE) - AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" - // Google Cloud Functions (GCF) - AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" - // Google Cloud App Engine (GAE) - AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" - // Red Hat OpenShift on Google Cloud - AttributeCloudPlatformGCPOpenshift = "gcp_openshift" - // Red Hat OpenShift on IBM Cloud - AttributeCloudPlatformIbmCloudOpenshift = "ibm_cloud_openshift" - // Tencent Cloud Cloud Virtual Machine (CVM) - AttributeCloudPlatformTencentCloudCvm = "tencent_cloud_cvm" - // Tencent Cloud Elastic Kubernetes Service (EKS) - AttributeCloudPlatformTencentCloudEKS = "tencent_cloud_eks" - // Tencent Cloud Serverless Cloud Function (SCF) - AttributeCloudPlatformTencentCloudScf = "tencent_cloud_scf" -) - -const ( - // Alibaba Cloud - AttributeCloudProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeCloudProviderAWS = "aws" - // Microsoft Azure - AttributeCloudProviderAzure = "azure" - // Google Cloud Platform - AttributeCloudProviderGCP = "gcp" - // Heroku Platform as a Service - AttributeCloudProviderHeroku = "heroku" - // IBM Cloud - AttributeCloudProviderIbmCloud = "ibm_cloud" - // Tencent Cloud - AttributeCloudProviderTencentCloud = "tencent_cloud" -) - -// Attributes for CloudEvents. -const ( - // The event_id uniquely identifies the event. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - AttributeCloudeventsEventID = "cloudevents.event_id" - // The source identifies the context in which an event happened. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://github.com/cloudevents', '/cloudevents/spec/pull/123', 'my- - // service' - AttributeCloudeventsEventSource = "cloudevents.event_source" - // The version of the CloudEvents specification which the event uses. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.0' - AttributeCloudeventsEventSpecVersion = "cloudevents.event_spec_version" - // The subject of the event in the context of the event producer (identified by - // source). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'mynewfile.jpg' - AttributeCloudeventsEventSubject = "cloudevents.event_subject" - // The event_type contains a value describing the type of event related to the - // originating occurrence. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com.github.pull_request.opened', 'com.example.object.deleted.v2' - AttributeCloudeventsEventType = "cloudevents.event_type" -) - -// These attributes allow to report this unit of code and therefore to provide -// more context about the span. -const ( - // The column number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 16 - AttributeCodeColumn = "code.column" - // The source code file name that identifies the code unit as uniquely as possible - // (preferably an absolute file path). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - AttributeCodeFilepath = "code.filepath" - // The method or function name, or equivalent (usually rightmost part of the code - // unit's name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'serveRequest' - AttributeCodeFunction = "code.function" - // The line number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeCodeLineNumber = "code.lineno" - // The "namespace" within which code.function is defined. Usually the - // qualified class or module name, such that code.namespace + some separator + - // code.function form a unique identifier for the code unit. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com.example.MyHTTPService' - AttributeCodeNamespace = "code.namespace" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeCodeStacktrace = "code.stacktrace" -) - -// A container instance. -const ( - // The command used to run the container (i.e. the command name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol' - // Note: If using embedded credentials or sensitive data, it is recommended to - // remove them to prevent potential leakage. - AttributeContainerCommand = "container.command" - // All the command arguments (including the command/executable itself) run by the - // container. [2] - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol, --config, config.yaml' - AttributeContainerCommandArgs = "container.command_args" - // The full command run by the container as a single string representing the full - // command. [2] - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcontribcol --config config.yaml' - AttributeContainerCommandLine = "container.command_line" - // Container ID. Usually a UUID, as for example used to identify Docker - // containers. The UUID might be abbreviated. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'a3bf90e006b2' - AttributeContainerID = "container.id" - // Runtime specific image identifier. Usually a hash algorithm followed by a UUID. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: - // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' - // Note: Docker defines a sha256 of the image id; container.image.id corresponds - // to the Image field from the Docker container inspect API endpoint. - // K8S defines a link to the container registry repository with digest "imageID": - // "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e - // 8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625". - // The ID is assigned by the container runtime and can vary in different - // environments. Consider using oci.manifest.digest if it is important to identify - // the same image in different environments/runtimes. - AttributeContainerImageID = "container.image.id" - // Name of the image the container was built on. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gcr.io/opentelemetry/operator' - AttributeContainerImageName = "container.image.name" - // Repo digests of the container image as provided by the container runtime. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d7 - // 02d249a0ccb', 'internal.registry.example.com:5000/example@sha256:b69959407d21e8 - // a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' - // Note: Docker and CRI report those under the RepoDigests field. - AttributeContainerImageRepoDigests = "container.image.repo_digests" - // Container image tags. An example can be found in Docker Image Inspect. Should - // be only the section of the full name for example from - // registry.example.com/my-org/my-image:. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'v1.27.1', '3.5.7-0' - AttributeContainerImageTags = "container.image.tags" - // Container name used by container runtime. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-autoconf' - AttributeContainerName = "container.name" - // The container runtime managing this container. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'docker', 'containerd', 'rkt' - AttributeContainerRuntime = "container.runtime" -) - -// Attributes specific to a cpu instance. -const ( - // The mode of the CPU - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'user', 'system' - AttributeCPUMode = "cpu.mode" -) - -const ( - // user - AttributeCPUModeUser = "user" - // system - AttributeCPUModeSystem = "system" - // nice - AttributeCPUModeNice = "nice" - // idle - AttributeCPUModeIdle = "idle" - // iowait - AttributeCPUModeIowait = "iowait" - // interrupt - AttributeCPUModeInterrupt = "interrupt" - // steal - AttributeCPUModeSteal = "steal" - // kernel - AttributeCPUModeKernel = "kernel" -) - -// This group defines the attributes used to describe telemetry in the context -// of databases. -const ( - // The name of the connection pool; unique within the instrumented application. In - // case the connection pool implementation doesn't provide a name, instrumentation - // SHOULD use a combination of parameters that would make the name unique, for - // example, combining attributes server.address, server.port, and db.namespace, - // formatted as server.address:server.port/db.namespace. Instrumentations that - // generate connection pool name following different patterns SHOULD document it. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myDataSource' - AttributeDBClientConnectionPoolName = "db.client.connection.pool.name" - // The state of a connection in the pool - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'idle' - AttributeDBClientConnectionState = "db.client.connection.state" - // The name of a collection (table, container) within the database. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'public.users', 'customers' - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - // If the collection name is parsed from the query text, it SHOULD be the first - // collection name found in the query and it SHOULD match the value provided in - // the query text including any schema and database name prefix. - // For batch operations, if the individual operations are known to have the same - // collection name then that collection name SHOULD be used, otherwise - // db.collection.name SHOULD NOT be captured. - AttributeDBCollectionName = "db.collection.name" - // The name of the database, fully qualified within the server address and port. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'customers', 'test.users' - // Note: If a database system has multiple namespace components, they SHOULD be - // concatenated (potentially using database system specific conventions) from most - // general to most specific namespace component, and more specific namespaces - // SHOULD NOT be captured without the more general namespaces, to ensure that - // "startswith" queries for the more general namespaces will be valid. - // Semantic conventions for individual database systems SHOULD document what - // db.namespace means in the context of that system. - // It is RECOMMENDED to capture the value as provided by the application without - // attempting to do any case normalization. - AttributeDBNamespace = "db.namespace" - // The number of queries included in a batch operation. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2, 3, 4 - // Note: Operations are only considered batches when they contain two or more - // operations, and so db.operation.batch.size SHOULD never be 1. - AttributeDBOperationBatchSize = "db.operation.batch.size" - // The name of the operation or command being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - // If the operation name is parsed from the query text, it SHOULD be the first - // operation name found in the query. - // For batch operations, if the individual operations are known to have the same - // operation name then that operation name SHOULD be used prepended by BATCH, - // otherwise db.operation.name SHOULD be BATCH or some other database system - // specific term if more applicable. - AttributeDBOperationName = "db.operation.name" - // The database query being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey "WuValue"' - // Note: For sanitization see Sanitization of db.query.text. - // For batch operations, if the individual operations are known to have the same - // query text then that query text SHOULD be used, otherwise all of the individual - // query texts SHOULD be concatenated with separator ; or some other database - // system specific separator if more applicable. - // Even though parameterized query text can potentially have sensitive data, by - // using a parameterized query the user is giving a strong signal that any - // sensitive data will be passed as parameter values, and the benefit to - // observability of capturing the static part of the query text by default - // outweighs the risk. - AttributeDBQueryText = "db.query.text" - // The database management system (DBMS) product as identified by the client - // instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The actual DBMS may differ from the one identified by the client. For - // example, when using PostgreSQL client libraries to connect to a CockroachDB, - // the db.system is set to postgresql based on the instrumentation's best - // knowledge. - AttributeDBSystem = "db.system" -) - -const ( - // idle - AttributeDBClientConnectionStateIdle = "idle" - // used - AttributeDBClientConnectionStateUsed = "used" -) - -const ( - // Some other SQL database. Fallback only. See notes - AttributeDBSystemOtherSQL = "other_sql" - // Adabas (Adaptable Database System) - AttributeDBSystemAdabas = "adabas" - // Deprecated, use `intersystems_cache` instead - AttributeDBSystemCache = "cache" - // InterSystems Caché - AttributeDBSystemIntersystemsCache = "intersystems_cache" - // Apache Cassandra - AttributeDBSystemCassandra = "cassandra" - // ClickHouse - AttributeDBSystemClickhouse = "clickhouse" - // Deprecated, use `other_sql` instead - AttributeDBSystemCloudscape = "cloudscape" - // CockroachDB - AttributeDBSystemCockroachdb = "cockroachdb" - // Deprecated, no replacement at this time - AttributeDBSystemColdfusion = "coldfusion" - // Microsoft Azure Cosmos DB - AttributeDBSystemCosmosDB = "cosmosdb" - // Couchbase - AttributeDBSystemCouchbase = "couchbase" - // CouchDB - AttributeDBSystemCouchDB = "couchdb" - // IBM DB2 - AttributeDBSystemDB2 = "db2" - // Apache Derby - AttributeDBSystemDerby = "derby" - // Amazon DynamoDB - AttributeDBSystemDynamoDB = "dynamodb" - // EnterpriseDB - AttributeDBSystemEDB = "edb" - // Elasticsearch - AttributeDBSystemElasticsearch = "elasticsearch" - // FileMaker - AttributeDBSystemFilemaker = "filemaker" - // Firebird - AttributeDBSystemFirebird = "firebird" - // Deprecated, use `other_sql` instead - AttributeDBSystemFirstSQL = "firstsql" - // Apache Geode - AttributeDBSystemGeode = "geode" - // H2 - AttributeDBSystemH2 = "h2" - // SAP HANA - AttributeDBSystemHanaDB = "hanadb" - // Apache HBase - AttributeDBSystemHBase = "hbase" - // Apache Hive - AttributeDBSystemHive = "hive" - // HyperSQL DataBase - AttributeDBSystemHSQLDB = "hsqldb" - // InfluxDB - AttributeDBSystemInfluxdb = "influxdb" - // Informix - AttributeDBSystemInformix = "informix" - // Ingres - AttributeDBSystemIngres = "ingres" - // InstantDB - AttributeDBSystemInstantDB = "instantdb" - // InterBase - AttributeDBSystemInterbase = "interbase" - // MariaDB - AttributeDBSystemMariaDB = "mariadb" - // SAP MaxDB - AttributeDBSystemMaxDB = "maxdb" - // Memcached - AttributeDBSystemMemcached = "memcached" - // MongoDB - AttributeDBSystemMongoDB = "mongodb" - // Microsoft SQL Server - AttributeDBSystemMSSQL = "mssql" - // Deprecated, Microsoft SQL Server Compact is discontinued - AttributeDBSystemMssqlcompact = "mssqlcompact" - // MySQL - AttributeDBSystemMySQL = "mysql" - // Neo4j - AttributeDBSystemNeo4j = "neo4j" - // Netezza - AttributeDBSystemNetezza = "netezza" - // OpenSearch - AttributeDBSystemOpensearch = "opensearch" - // Oracle Database - AttributeDBSystemOracle = "oracle" - // Pervasive PSQL - AttributeDBSystemPervasive = "pervasive" - // PointBase - AttributeDBSystemPointbase = "pointbase" - // PostgreSQL - AttributeDBSystemPostgreSQL = "postgresql" - // Progress Database - AttributeDBSystemProgress = "progress" - // Redis - AttributeDBSystemRedis = "redis" - // Amazon Redshift - AttributeDBSystemRedshift = "redshift" - // Cloud Spanner - AttributeDBSystemSpanner = "spanner" - // SQLite - AttributeDBSystemSqlite = "sqlite" - // Sybase - AttributeDBSystemSybase = "sybase" - // Teradata - AttributeDBSystemTeradata = "teradata" - // Trino - AttributeDBSystemTrino = "trino" - // Vertica - AttributeDBSystemVertica = "vertica" -) - -// This group defines attributes for Cassandra. -const ( - // The consistency level of the query. Based on consistency values from CQL. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" - // The data center of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'us-west-2' - AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" - // The ID of the coordinating node for a query. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" - // Whether or not the query is idempotent. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeDBCassandraIdempotence = "db.cassandra.idempotence" - // The fetch size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 5000 - AttributeDBCassandraPageSize = "db.cassandra.page_size" - // The number of times a query was speculatively executed. Not set or 0 if the - // query was not executed speculatively. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 2 - AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" -) - -const ( - // all - AttributeDBCassandraConsistencyLevelAll = "all" - // each_quorum - AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" - // quorum - AttributeDBCassandraConsistencyLevelQuorum = "quorum" - // local_quorum - AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" - // one - AttributeDBCassandraConsistencyLevelOne = "one" - // two - AttributeDBCassandraConsistencyLevelTwo = "two" - // three - AttributeDBCassandraConsistencyLevelThree = "three" - // local_one - AttributeDBCassandraConsistencyLevelLocalOne = "local_one" - // any - AttributeDBCassandraConsistencyLevelAny = "any" - // serial - AttributeDBCassandraConsistencyLevelSerial = "serial" - // local_serial - AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" -) - -// This group defines attributes for Azure Cosmos DB. -const ( - // Unique Cosmos client instance id. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - AttributeDBCosmosDBClientID = "db.cosmosdb.client_id" - // Cosmos client connection mode. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBConnectionMode = "db.cosmosdb.connection_mode" - // CosmosDB Operation Type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBOperationType = "db.cosmosdb.operation_type" - // RU consumed for that operation - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 46.18, 1.0 - AttributeDBCosmosDBRequestCharge = "db.cosmosdb.request_charge" - // Request payload size in bytes - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeDBCosmosDBRequestContentLength = "db.cosmosdb.request_content_length" - // Cosmos DB status code. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 200, 201 - AttributeDBCosmosDBStatusCode = "db.cosmosdb.status_code" - // Cosmos DB sub status code. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1000, 1002 - AttributeDBCosmosDBSubStatusCode = "db.cosmosdb.sub_status_code" -) - -const ( - // Gateway (HTTP) connections mode - AttributeDBCosmosDBConnectionModeGateway = "gateway" - // Direct connection - AttributeDBCosmosDBConnectionModeDirect = "direct" -) - -const ( - // invalid - AttributeDBCosmosDBOperationTypeInvalid = "Invalid" - // create - AttributeDBCosmosDBOperationTypeCreate = "Create" - // patch - AttributeDBCosmosDBOperationTypePatch = "Patch" - // read - AttributeDBCosmosDBOperationTypeRead = "Read" - // read_feed - AttributeDBCosmosDBOperationTypeReadFeed = "ReadFeed" - // delete - AttributeDBCosmosDBOperationTypeDelete = "Delete" - // replace - AttributeDBCosmosDBOperationTypeReplace = "Replace" - // execute - AttributeDBCosmosDBOperationTypeExecute = "Execute" - // query - AttributeDBCosmosDBOperationTypeQuery = "Query" - // head - AttributeDBCosmosDBOperationTypeHead = "Head" - // head_feed - AttributeDBCosmosDBOperationTypeHeadFeed = "HeadFeed" - // upsert - AttributeDBCosmosDBOperationTypeUpsert = "Upsert" - // batch - AttributeDBCosmosDBOperationTypeBatch = "Batch" - // query_plan - AttributeDBCosmosDBOperationTypeQueryPlan = "QueryPlan" - // execute_javascript - AttributeDBCosmosDBOperationTypeExecuteJavascript = "ExecuteJavaScript" -) - -// This group defines attributes for Elasticsearch. -const ( - // Represents the human-readable identifier of the node/instance to which a - // request was routed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'instance-0000000001' - AttributeDBElasticsearchNodeName = "db.elasticsearch.node.name" -) - -// Attributes for software deployments. -const ( - // Name of the deployment environment (aka deployment tier). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'staging', 'production' - // Note: deployment.environment.name does not affect the uniqueness constraints - // defined through - // the service.namespace, service.name and service.instance.id resource - // attributes. - // This implies that resources carrying the following attribute combinations MUST - // be - // considered to be identifying the same service:
      - //
    • service.name=frontend, deployment.environment.name=production
    • - //
    • service.name=frontend, deployment.environment.name=staging.
    • - //
    - AttributeDeploymentEnvironmentName = "deployment.environment.name" - // The id of the deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1208' - AttributeDeploymentID = "deployment.id" - // The name of the deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'deploy my app', 'deploy-frontend' - AttributeDeploymentName = "deployment.name" - // The status of the deployment. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeDeploymentStatus = "deployment.status" -) - -const ( - // failed - AttributeDeploymentStatusFailed = "failed" - // succeeded - AttributeDeploymentStatusSucceeded = "succeeded" -) - -// Attributes that represents an occurrence of a lifecycle transition on the -// Android platform. -const ( - // Deprecated use the device.app.lifecycle event definition including - // android.state as a payload field instead. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The Android lifecycle states are defined in Activity lifecycle callbacks, - // and from which the OS identifiers are derived. - AttributeAndroidState = "android.state" -) - -const ( - // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time - AttributeAndroidStateCreated = "created" - // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state - AttributeAndroidStateBackground = "background" - // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states - AttributeAndroidStateForeground = "foreground" -) - -// These attributes may be used to describe the receiver of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // Destination address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the source side, and when communicating through an - // intermediary, destination.address SHOULD represent the destination address - // behind any intermediaries, for example proxies, if it's available. - AttributeDestinationAddress = "destination.address" - // Destination port number - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3389, 2888 - AttributeDestinationPort = "destination.port" -) - -// Describes device attributes. -const ( - // A unique identifier representing the device - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values outlined - // below. This value is not an advertising identifier and MUST NOT be used as - // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor - // identifier. On Android (Java or Kotlin), this value MUST be equal to the - // Firebase Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found here on best - // practices and exact implementation details. Caution should be taken when - // storing personal data or anything which can identify a user. GDPR and data - // protection laws may apply, ensure you do your own due diligence. - AttributeDeviceID = "device.id" - // The name of the device manufacturer - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via Build. iOS apps SHOULD hardcode - // the value Apple. - AttributeDeviceManufacturer = "device.manufacturer" - // The model identifier for the device - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine-readable version of the - // model identifier rather than the market or consumer-friendly name of the - // device. - AttributeDeviceModelIdentifier = "device.model.identifier" - // The marketing name for the device model - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human-readable version of the - // device model rather than a machine-readable alternative. - AttributeDeviceModelName = "device.model.name" -) - -// These attributes may be used for any disk related operation. -const ( - // The disk IO operation direction. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'read' - AttributeDiskIoDirection = "disk.io.direction" -) - -const ( - // read - AttributeDiskIoDirectionRead = "read" - // write - AttributeDiskIoDirectionWrite = "write" -) - -// The shared attributes used to report a DNS query. -const ( - // The name being queried. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'www.example.com', 'opentelemetry.io' - // Note: If the name field contains non-printable characters (below 32 or above - // 126), those characters should be represented as escaped base 10 integers - // (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, and - // line feeds should be converted to \t, \r, and \n respectively. - AttributeDNSQuestionName = "dns.question.name" -) - -// The shared attributes used to report an error. -const ( - // Describes a class of error the operation ended with. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'timeout', 'java.net.UnknownHostException', - // 'server_certificate_invalid', '500' - // Note: The error.type SHOULD be predictable, and SHOULD have low - // cardinality.When error.type is set to a type (e.g., an exception type), its - // canonical class name identifying the type within the artifact SHOULD be - // used.Instrumentations SHOULD document the list of errors they report.The - // cardinality of error.type within one instrumentation library SHOULD be low. - // Telemetry consumers that aggregate data from multiple instrumentation libraries - // and applications - // should be prepared for error.type to have high cardinality at query time when - // no - // additional filters are applied.If the operation has completed successfully, - // instrumentations SHOULD NOT set error.type.If a specific domain defines its own - // set of error identifiers (such as HTTP or gRPC status codes), - // it's RECOMMENDED to:
      - //
    • Use a domain-specific attribute
    • - //
    • Set error.type to capture all errors, regardless of whether they are - // defined within the domain-specific set or not.
    • - //
    - AttributeErrorType = "error.type" -) - -const ( - // A fallback error value to be used when the instrumentation doesn't define a custom value - AttributeErrorTypeOther = "_OTHER" -) - -// Attributes for Events represented using Log Records. -const ( - // Identifies the class / type of event. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'browser.mouse.click', 'device.app.lifecycle' - // Note: Event names are subject to the same rules as attribute names. Notably, - // event names are namespaced to avoid collisions and provide a clean separation - // of semantics for events in separate domains like browser, mobile, and - // kubernetes. - AttributeEventName = "event.name" -) - -// The shared attributes used to report a single exception associated with a -// span or log. -const ( - // SHOULD be set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's __exit__ method in Python) but will - // usually be caught at the point of recording the exception in most languages.It - // is usually not possible to determine at the point where an exception is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending the span, - // as done in the example for recording span exceptions.It follows that an - // exception may still escape the scope of the span - // even if the exception.escaped attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - AttributeExceptionEscaped = "exception.escaped" - // The exception message. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" - AttributeExceptionMessage = "exception.message" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeExceptionStacktrace = "exception.stacktrace" - // The type of the exception (its fully-qualified class name, if applicable). The - // dynamic type of the exception should be preferred over the static type in - // languages that support it. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - AttributeExceptionType = "exception.type" -) - -// FaaS attributes -const ( - // A boolean that is true if the serverless function is executed for the first - // time (aka cold-start). - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSColdstart = "faas.coldstart" - // A string containing the schedule period as Cron Expression. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0/5 * * * ? *' - AttributeFaaSCron = "faas.cron" - // The name of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos - // DB to the database name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myBucketName', 'myDBName' - AttributeFaaSDocumentCollection = "faas.document.collection" - // The document name/table subjected to the operation. For example, in Cloud - // Storage or S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myFile.txt', 'myTableName' - AttributeFaaSDocumentName = "faas.document.name" - // Describes the type of the operation that was performed on the data. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSDocumentOperation = "faas.document.operation" - // A string containing the time when the data was accessed in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSDocumentTime = "faas.document.time" - // The execution environment ID as a string, that will be potentially reused for - // other invocations to the same function/function version. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note:
      - //
    • AWS Lambda: Use the (full) log stream name.
    • - //
    - AttributeFaaSInstance = "faas.instance" - // The invocation ID of the current function invocation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - AttributeFaaSInvocationID = "faas.invocation_id" - // The name of the invoked function. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-function' - // Note: SHOULD be equal to the faas.name resource attribute of the invoked - // function. - AttributeFaaSInvokedName = "faas.invoked_name" - // The cloud provider of the invoked function. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked - // function. - AttributeFaaSInvokedProvider = "faas.invoked_provider" - // The cloud region of the invoked function. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the cloud.region resource attribute of the invoked - // function. - AttributeFaaSInvokedRegion = "faas.invoked_region" - // The amount of memory available to the serverless function converted to Bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 134217728 - // Note: It's recommended to set this attribute since e.g. too little memory can - // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, - // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this - // information (which must be multiplied by 1,048,576). - AttributeFaaSMaxMemory = "faas.max_memory" - // The name of the single function that this runtime instance executes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // code.namespace/code.function - // span attributes).For some cloud providers, the above definition is ambiguous. - // The following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud providers/products:
      - //
    • Azure: The full name /, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the cloud.resource_id attribute).
    • - //
    - AttributeFaaSName = "faas.name" - // A string containing the function invocation time in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSTime = "faas.time" - // Type of the trigger which caused this function invocation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeFaaSTrigger = "faas.trigger" - // The immutable version of the function being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use:
      - //
    • AWS Lambda: The function version - // (an integer represented as a decimal string).
    • - //
    • Google Cloud Run (Services): The revision - // (i.e., the function name plus the revision suffix).
    • - //
    • Google Cloud Functions: The value of the - // K_REVISION environment variable.
    • - //
    • Azure Functions: Not applicable. Do not set this attribute.
    • - //
    - AttributeFaaSVersion = "faas.version" -) - -const ( - // When a new object is created - AttributeFaaSDocumentOperationInsert = "insert" - // When an object is modified - AttributeFaaSDocumentOperationEdit = "edit" - // When an object is deleted - AttributeFaaSDocumentOperationDelete = "delete" -) - -const ( - // Alibaba Cloud - AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeFaaSInvokedProviderAWS = "aws" - // Microsoft Azure - AttributeFaaSInvokedProviderAzure = "azure" - // Google Cloud Platform - AttributeFaaSInvokedProviderGCP = "gcp" - // Tencent Cloud - AttributeFaaSInvokedProviderTencentCloud = "tencent_cloud" -) - -const ( - // A response to some data source operation such as a database or filesystem read/write - AttributeFaaSTriggerDatasource = "datasource" - // To provide an answer to an inbound HTTP request - AttributeFaaSTriggerHTTP = "http" - // A function is set to be executed when messages are sent to a messaging system - AttributeFaaSTriggerPubsub = "pubsub" - // A function is scheduled to be executed regularly - AttributeFaaSTriggerTimer = "timer" - // If none of the others apply - AttributeFaaSTriggerOther = "other" -) - -// Attributes for Feature Flags. -const ( - // The unique identifier of the feature flag. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'logo-color' - AttributeFeatureFlagKey = "feature_flag.key" - // The name of the service provider that performs the flag evaluation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Flag Manager' - AttributeFeatureFlagProviderName = "feature_flag.provider_name" - // SHOULD be a semantic identifier for a value. If one is unavailable, a - // stringified version of the value can be used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides a - // means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant red maybe be used for the value #c05543.A stringified - // version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - AttributeFeatureFlagVariant = "feature_flag.variant" -) - -// Describes file attributes. -const ( - // Directory where the file is located. It should include the drive letter, when - // appropriate. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/home/user', 'C:\\Program Files\\MyApp' - AttributeFileDirectory = "file.directory" - // File extension, excluding the leading dot. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: When the file name has multiple extensions (example.tar.gz), only the - // last one should be captured ("gz", not "tar.gz"). - AttributeFileExtension = "file.extension" - // Name of the file including the extension, without the directory. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example.png' - AttributeFileName = "file.name" - // Full path to the file, including the file name. It should include the drive - // letter, when appropriate. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/home/alice/example.png', 'C:\\Program Files\\MyApp\\myapp.exe' - AttributeFilePath = "file.path" - // File size in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeFileSize = "file.size" -) - -// Attributes for Google Cloud client libraries. -const ( - // Identifies the Google Cloud service for which the official client library is - // intended. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'appengine', 'run', 'firestore', 'alloydb', 'spanner' - // Note: Intended to be a stable identifier for Google Cloud client libraries that - // is uniform across implementation languages. The value should be derived from - // the canonical service domain for the service; for example, 'foo.googleapis.com' - // should result in a value of 'foo'. - AttributeGCPClientService = "gcp.client.service" -) - -// Attributes for Google Cloud Run. -const ( - // The name of the Cloud Run execution being run for the Job, as set by the - // CLOUD_RUN_EXECUTION environment variable. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'job-name-xxxx', 'sample-job-mdw84' - AttributeGCPCloudRunJobExecution = "gcp.cloud_run.job.execution" - // The index for a task within an execution as provided by the - // CLOUD_RUN_TASK_INDEX environment variable. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 1 - AttributeGCPCloudRunJobTaskIndex = "gcp.cloud_run.job.task_index" -) - -// Attributes for Google Compute Engine (GCE). -const ( - // The hostname of a GCE instance. This is the full value of the default or custom - // hostname. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-host1234.example.com', 'sample-vm.us-west1-b.c.my- - // project.internal' - AttributeGCPGceInstanceHostname = "gcp.gce.instance.hostname" - // The instance name of a GCE instance. This is the value provided by host.name, - // the visible name of the instance in the Cloud Console UI, and the prefix for - // the default hostname of the instance as defined by the default internal DNS - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'instance-1', 'my-vm-name' - AttributeGCPGceInstanceName = "gcp.gce.instance.name" -) - -// The attributes used to describe telemetry in the context of Generative -// Artificial Intelligence (GenAI) Models requests and responses. -const ( - // The full response received from the GenAI model. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: "[{'role': 'assistant', 'content': 'The capital of France is - // Paris.'}]" - // Note: It's RECOMMENDED to format completions as JSON string matching OpenAI - // messages format - AttributeGenAiCompletion = "gen_ai.completion" - // The name of the operation being performed. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: If one of the predefined values applies, but specific system uses a - // different name it's RECOMMENDED to document it in the semantic conventions for - // specific GenAI system and use system-specific name in the instrumentation. If a - // different name is not documented, instrumentation libraries SHOULD use - // applicable predefined value. - AttributeGenAiOperationName = "gen_ai.operation.name" - // The full prompt sent to the GenAI model. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: "[{'role': 'user', 'content': 'What is the capital of France?'}]" - // Note: It's RECOMMENDED to format prompts as JSON string matching OpenAI - // messages format - AttributeGenAiPrompt = "gen_ai.prompt" - // The frequency penalty setting for the GenAI request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 0.1 - AttributeGenAiRequestFrequencyPenalty = "gen_ai.request.frequency_penalty" - // The maximum number of tokens the model generates for a request. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeGenAiRequestMaxTokens = "gen_ai.request.max_tokens" - // The name of the GenAI model a request is being made to. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gpt-4' - AttributeGenAiRequestModel = "gen_ai.request.model" - // The presence penalty setting for the GenAI request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 0.1 - AttributeGenAiRequestPresencePenalty = "gen_ai.request.presence_penalty" - // List of sequences that the model will use to stop generating further tokens. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'forest', 'lived' - AttributeGenAiRequestStopSequences = "gen_ai.request.stop_sequences" - // The temperature setting for the GenAI request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 0.0 - AttributeGenAiRequestTemperature = "gen_ai.request.temperature" - // The top_k sampling setting for the GenAI request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0 - AttributeGenAiRequestTopK = "gen_ai.request.top_k" - // The top_p sampling setting for the GenAI request. - // - // Type: double - // Requirement Level: Optional - // Stability: experimental - // Examples: 1.0 - AttributeGenAiRequestTopP = "gen_ai.request.top_p" - // Array of reasons the model stopped generating tokens, corresponding to each - // generation received. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'stop' - AttributeGenAiResponseFinishReasons = "gen_ai.response.finish_reasons" - // The unique identifier for the completion. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'chatcmpl-123' - AttributeGenAiResponseID = "gen_ai.response.id" - // The name of the model that generated the response. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'gpt-4-0613' - AttributeGenAiResponseModel = "gen_ai.response.model" - // The Generative AI product as identified by the client or server - // instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'openai' - // Note: The gen_ai.system describes a family of GenAI models with specific model - // identified - // by gen_ai.request.model and gen_ai.response.model attributes.The actual GenAI - // product may differ from the one identified by the client. - // For example, when using OpenAI client libraries to communicate with Mistral, - // the gen_ai.system - // is set to openai based on the instrumentation's best knowledge.For custom - // model, a custom friendly name SHOULD be used. - // If none of these options apply, the gen_ai.system SHOULD be set to _OTHER. - AttributeGenAiSystem = "gen_ai.system" - // The type of token being counted. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'input', 'output' - AttributeGenAiTokenType = "gen_ai.token.type" - // The number of tokens used in the GenAI input (prompt). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 100 - AttributeGenAiUsageInputTokens = "gen_ai.usage.input_tokens" - // The number of tokens used in the GenAI response (completion). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 180 - AttributeGenAiUsageOutputTokens = "gen_ai.usage.output_tokens" -) - -const ( - // Chat completion operation such as [OpenAI Chat API](https://platform.openai.com/docs/api-reference/chat) - AttributeGenAiOperationNameChat = "chat" - // Text completions operation such as [OpenAI Completions API (Legacy)](https://platform.openai.com/docs/api-reference/completions) - AttributeGenAiOperationNameTextCompletion = "text_completion" -) - -const ( - // OpenAI - AttributeGenAiSystemOpenai = "openai" - // Vertex AI - AttributeGenAiSystemVertexAi = "vertex_ai" - // Anthropic - AttributeGenAiSystemAnthropic = "anthropic" - // Cohere - AttributeGenAiSystemCohere = "cohere" -) - -const ( - // Input tokens (prompt, input, etc.) - AttributeGenAiTokenTypeInput = "input" - // Output tokens (completion, response, etc.) - AttributeGenAiTokenTypeCompletion = "output" -) - -// Go related attributes. -const ( - // The type of memory. - // - // Type: Enum - // Requirement Level: Recommended - // Stability: experimental - // Examples: 'other', 'stack' - AttributeGoMemoryType = "go.memory.type" -) - -const ( - // Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use - AttributeGoMemoryTypeStack = "stack" - // Memory used by the Go runtime, excluding other categories of memory usage described in this enumeration - AttributeGoMemoryTypeOther = "other" -) - -// Attributes for GraphQL. -const ( - // The GraphQL document being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - AttributeGraphqlDocument = "graphql.document" - // The name of the operation being executed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'findBookByID' - AttributeGraphqlOperationName = "graphql.operation.name" - // The type of the operation being executed. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'query', 'mutation', 'subscription' - AttributeGraphqlOperationType = "graphql.operation.type" -) - -const ( - // GraphQL query - AttributeGraphqlOperationTypeQuery = "query" - // GraphQL mutation - AttributeGraphqlOperationTypeMutation = "mutation" - // GraphQL subscription - AttributeGraphqlOperationTypeSubscription = "subscription" -) - -// Attributes for the Android platform on which the Android application is -// running. -const ( - // Unique identifier for the application - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' - AttributeHerokuAppID = "heroku.app.id" - // Commit hash for the current release - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' - AttributeHerokuReleaseCommit = "heroku.release.commit" - // Time and date the release was created - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2022-10-23T18:00:42Z' - AttributeHerokuReleaseCreationTimestamp = "heroku.release.creation_timestamp" -) - -// A host is defined as a computing instance. For example, physical servers, -// virtual machines, switches or disk array. -const ( - // The CPU architecture the host system is running on. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeHostArch = "host.arch" - // The amount of level 2 memory cache available to the processor (in Bytes). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 12288000 - AttributeHostCPUCacheL2Size = "host.cpu.cache.l2.size" - // Family or generation of the CPU. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '6', 'PA-RISC 1.1e' - AttributeHostCPUFamily = "host.cpu.family" - // Model identifier. It provides more granular information about the CPU, - // distinguishing it from other CPUs within the same family. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '6', '9000/778/B180L' - AttributeHostCPUModelID = "host.cpu.model.id" - // Model designation of the processor. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' - AttributeHostCPUModelName = "host.cpu.model.name" - // Stepping or core revisions. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1', 'r1p1' - AttributeHostCPUStepping = "host.cpu.stepping" - // Processor manufacturer identifier. A maximum 12-character string. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'GenuineIntel' - // Note: CPUID command returns the vendor ID string in EBX, EDX and ECX registers. - // Writing these to memory in this order results in a 12-character string. - AttributeHostCPUVendorID = "host.cpu.vendor.id" - // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud - // provider. For non-containerized systems, this should be the machine-id. See the - // table below for the sources to use to determine the machine-id based on - // operating system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - AttributeHostID = "host.id" - // VM image ID or host OS image ID. For Cloud, this value is from the provider. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ami-07b06b442921831e5' - AttributeHostImageID = "host.image.id" - // Name of the VM image or OS install the host was instantiated from. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - AttributeHostImageName = "host.image.name" - // The version string of the VM image or host OS as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0.1' - AttributeHostImageVersion = "host.image.version" - // Available IP addresses of the host, excluding loopback interfaces. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' - // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 addresses - // MUST be specified in the RFC 5952 format. - AttributeHostIP = "host.ip" - // Available MAC addresses of the host, excluding loopback interfaces. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' - // Note: MAC Addresses MUST be represented in IEEE RA hexadecimal form: as hyphen- - // separated octets in uppercase hexadecimal form from most to least significant. - AttributeHostMac = "host.mac" - // Name of the host. On Unix systems, it may contain what the hostname command - // returns, or the fully qualified hostname, or another name specified by the - // user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-test' - AttributeHostName = "host.name" - // Type of host. For Cloud, this must be the machine type. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'n1-standard-1' - AttributeHostType = "host.type" -) - -const ( - // AMD64 - AttributeHostArchAMD64 = "amd64" - // ARM32 - AttributeHostArchARM32 = "arm32" - // ARM64 - AttributeHostArchARM64 = "arm64" - // Itanium - AttributeHostArchIA64 = "ia64" - // 32-bit PowerPC - AttributeHostArchPPC32 = "ppc32" - // 64-bit PowerPC - AttributeHostArchPPC64 = "ppc64" - // IBM z/Architecture - AttributeHostArchS390x = "s390x" - // 32-bit x86 - AttributeHostArchX86 = "x86" -) - -// Semantic convention attributes in the HTTP namespace. -const ( - // State of the HTTP connection in the HTTP connection pool. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'active', 'idle' - AttributeHTTPConnectionState = "http.connection.state" - // The size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3495 - AttributeHTTPRequestBodySize = "http.request.body.size" - // HTTP request method. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - // Note: HTTP request method value SHOULD be "known" to the - // instrumentation. - // By default, this convention defines "known" methods as the ones - // listed in RFC9110 - // and the PATCH method defined in RFC5789.If the HTTP request method is not known - // to instrumentation, it MUST set the http.request.method attribute to _OTHER.If - // the HTTP instrumentation could end up converting valid HTTP request methods to - // _OTHER, then it MUST provide a way to override - // the list of known HTTP methods. If this override is done via environment - // variable, then the environment variable MUST be named - // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of - // case-sensitive known HTTP methods - // (this list MUST be a full override of the default known method, it is not a - // list of known methods in addition to the defaults).HTTP method names are case- - // sensitive and http.request.method attribute value MUST match a known HTTP - // method name exactly. - // Instrumentations for specific web frameworks that consider HTTP methods to be - // case insensitive, SHOULD populate a canonical equivalent. - // Tracing instrumentations that do so, MUST also set http.request.method_original - // to the original value. - AttributeHTTPRequestMethod = "http.request.method" - // Original HTTP method sent by the client in the request line. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'GeT', 'ACL', 'foo' - AttributeHTTPRequestMethodOriginal = "http.request.method_original" - // The ordinal number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets resent - // by the client, regardless of what was the cause of the resending (e.g. - // redirection, authorization failure, 503 Server Unavailable, network issues, or - // any other). - AttributeHTTPRequestResendCount = "http.request.resend_count" - // The total size of the request in bytes. This should be the total number of - // bytes sent over the wire, including the request line (HTTP/1.1), framing - // (HTTP/2 and HTTP/3), headers, and request body if any. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1437 - AttributeHTTPRequestSize = "http.request.size" - // The size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3495 - AttributeHTTPResponseBodySize = "http.response.body.size" - // The total size of the response in bytes. This should be the total number of - // bytes sent over the wire, including the status line (HTTP/1.1), framing (HTTP/2 - // and HTTP/3), headers, and response body and trailers if any. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1437 - AttributeHTTPResponseSize = "http.response.size" - // HTTP response status code. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 200 - AttributeHTTPResponseStatusCode = "http.response.status_code" - // The matched route, that is, the path template in the format used by the - // respective server framework. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: MUST NOT be populated when this is not supported by the HTTP server - // framework as the route attribute should have low-cardinality and the URI path - // can NOT substitute it. - // SHOULD include the application root if there is one. - AttributeHTTPRoute = "http.route" -) - -const ( - // active state - AttributeHTTPConnectionStateActive = "active" - // idle state - AttributeHTTPConnectionStateIdle = "idle" -) - -const ( - // CONNECT method - AttributeHTTPRequestMethodConnect = "CONNECT" - // DELETE method - AttributeHTTPRequestMethodDelete = "DELETE" - // GET method - AttributeHTTPRequestMethodGet = "GET" - // HEAD method - AttributeHTTPRequestMethodHead = "HEAD" - // OPTIONS method - AttributeHTTPRequestMethodOptions = "OPTIONS" - // PATCH method - AttributeHTTPRequestMethodPatch = "PATCH" - // POST method - AttributeHTTPRequestMethodPost = "POST" - // PUT method - AttributeHTTPRequestMethodPut = "PUT" - // TRACE method - AttributeHTTPRequestMethodTrace = "TRACE" - // Any HTTP method that the instrumentation has no prior knowledge of - AttributeHTTPRequestMethodOther = "_OTHER" -) - -// Java Virtual machine related attributes. -const ( - // Name of the buffer pool. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'mapped', 'direct' - // Note: Pool names are generally obtained via BufferPoolMXBean#getName(). - AttributeJvmBufferPoolName = "jvm.buffer.pool.name" - // Name of the garbage collector action. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'end of minor GC', 'end of major GC' - // Note: Garbage collector action is generally obtained via - // GarbageCollectionNotificationInfo#getGcAction(). - AttributeJvmGcAction = "jvm.gc.action" - // Name of the garbage collector. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'G1 Young Generation', 'G1 Old Generation' - // Note: Garbage collector name is generally obtained via - // GarbageCollectionNotificationInfo#getGcName(). - AttributeJvmGcName = "jvm.gc.name" - // Name of the memory pool. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' - // Note: Pool names are generally obtained via MemoryPoolMXBean#getName(). - AttributeJvmMemoryPoolName = "jvm.memory.pool.name" - // The type of memory. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'heap', 'non_heap' - AttributeJvmMemoryType = "jvm.memory.type" - // Whether the thread is daemon or not. - // - // Type: boolean - // Requirement Level: Optional - // Stability: stable - AttributeJvmThreadDaemon = "jvm.thread.daemon" - // State of the thread. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'runnable', 'blocked' - AttributeJvmThreadState = "jvm.thread.state" -) - -const ( - // Heap memory - AttributeJvmMemoryTypeHeap = "heap" - // Non-heap memory - AttributeJvmMemoryTypeNonHeap = "non_heap" -) - -const ( - // A thread that has not yet started is in this state - AttributeJvmThreadStateNew = "new" - // A thread executing in the Java virtual machine is in this state - AttributeJvmThreadStateRunnable = "runnable" - // A thread that is blocked waiting for a monitor lock is in this state - AttributeJvmThreadStateBlocked = "blocked" - // A thread that is waiting indefinitely for another thread to perform a particular action is in this state - AttributeJvmThreadStateWaiting = "waiting" - // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state - AttributeJvmThreadStateTimedWaiting = "timed_waiting" - // A thread that has exited is in this state - AttributeJvmThreadStateTerminated = "terminated" -) - -// Kubernetes resource attributes. -const ( - // The name of the cluster. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-cluster' - AttributeK8SClusterName = "k8s.cluster.name" - // A pseudo-ID for the cluster, set to the UID of the kube-system namespace. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - // Note: K8S doesn't have support for obtaining a cluster ID. If this is ever - // added, we will recommend collecting the k8s.cluster.uid through the - // official APIs. In the meantime, we are able to use the uid of the - // kube-system namespace as a proxy for cluster ID. Read on for the - // rationale.Every object created in a K8S cluster is assigned a distinct UID. The - // kube-system namespace is used by Kubernetes itself and will exist - // for the lifetime of the cluster. Using the uid of the kube-system - // namespace is a reasonable proxy for the K8S ClusterID as it will only - // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are - // UUIDs as standardized by - // ISO/IEC 9834-8 and ITU-T X.667. - // Which states:
    - // If generated according to one of the mechanisms defined in Rec.
    - // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - // different from all other UUIDs generated before 3603 A.D., or is - // extremely likely to be different (depending on the mechanism - // chosen).Therefore, UIDs between clusters should be extremely unlikely to - // conflict. - AttributeK8SClusterUID = "k8s.cluster.uid" - // The name of the Container from Pod specification, must be unique within a Pod. - // Container runtime usually uses different globally unique name (container.name). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'redis' - AttributeK8SContainerName = "k8s.container.name" - // Number of times the container was restarted. This attribute can be used to - // identify a particular container (running or stopped) within a container spec. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeK8SContainerRestartCount = "k8s.container.restart_count" - // Last terminated reason of the Container. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Evicted', 'Error' - AttributeK8SContainerStatusLastTerminatedReason = "k8s.container.status.last_terminated_reason" - // The name of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SCronJobName = "k8s.cronjob.name" - // The UID of the CronJob. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SCronJobUID = "k8s.cronjob.uid" - // The name of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SDaemonSetName = "k8s.daemonset.name" - // The UID of the DaemonSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDaemonSetUID = "k8s.daemonset.uid" - // The name of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SDeploymentName = "k8s.deployment.name" - // The UID of the Deployment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDeploymentUID = "k8s.deployment.uid" - // The name of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SJobName = "k8s.job.name" - // The UID of the Job. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SJobUID = "k8s.job.uid" - // The name of the namespace that the pod is running in. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'default' - AttributeK8SNamespaceName = "k8s.namespace.name" - // The name of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'node-1' - AttributeK8SNodeName = "k8s.node.name" - // The UID of the Node. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - AttributeK8SNodeUID = "k8s.node.uid" - // The name of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry-pod-autoconf' - AttributeK8SPodName = "k8s.pod.name" - // The UID of the Pod. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SPodUID = "k8s.pod.uid" - // The name of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SReplicaSetName = "k8s.replicaset.name" - // The UID of the ReplicaSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SReplicaSetUID = "k8s.replicaset.uid" - // The name of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'opentelemetry' - AttributeK8SStatefulSetName = "k8s.statefulset.name" - // The UID of the StatefulSet. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SStatefulSetUID = "k8s.statefulset.uid" -) - -// Describes Linux Memory attributes -const ( - // The Linux Slab memory state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'reclaimable', 'unreclaimable' - AttributeLinuxMemorySlabState = "linux.memory.slab.state" -) - -const ( - // reclaimable - AttributeLinuxMemorySlabStateReclaimable = "reclaimable" - // unreclaimable - AttributeLinuxMemorySlabStateUnreclaimable = "unreclaimable" -) - -// Log attributes -const ( - // The stream associated with the log. See below for a list of well-known values. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeLogIostream = "log.iostream" -) - -const ( - // Logs from stdout stream - AttributeLogIostreamStdout = "stdout" - // Events from stderr stream - AttributeLogIostreamStderr = "stderr" -) - -// Attributes for a file to which log was emitted. -const ( - // The basename of the file. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'audit.log' - AttributeLogFileName = "log.file.name" - // The basename of the file, with symlinks resolved. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'uuid.log' - AttributeLogFileNameResolved = "log.file.name_resolved" - // The full path to the file. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/var/log/mysql/audit.log' - AttributeLogFilePath = "log.file.path" - // The full path to the file, with symlinks resolved. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/var/lib/docker/uuid.log' - AttributeLogFilePathResolved = "log.file.path_resolved" -) - -// The generic attributes that may be used in any Log Record. -const ( - // The complete original Log Record. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - - // Something happened', '[INFO] 8/3/24 12:34:56 Something happened' - // Note: This value MAY be added when processing a Log Record which was originally - // transmitted as a string or equivalent data type AND the Body field of the Log - // Record does not contain the same value. (e.g. a syslog or a log record read - // from a file.) - AttributeLogRecordOriginal = "log.record.original" - // A unique identifier for the Log Record. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' - // Note: If an id is provided, other log records with the same id will be - // considered duplicates and can be removed safely. This means, that two - // distinguishable log records MUST have different values. - // The id MAY be an Universally Unique Lexicographically Sortable Identifier - // (ULID), but other identifiers (e.g. UUID) may be used as needed. - AttributeLogRecordUID = "log.record.uid" -) - -// Attributes describing telemetry around messaging systems and messaging -// activities. -const ( - // The number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set messaging.batch.message_count on spans - // that operate with a single message. When a messaging client library supports - // both batch and single-message API for the same operation, instrumentations - // SHOULD use messaging.batch.message_count for batching APIs and SHOULD NOT use - // it for single-message APIs. - AttributeMessagingBatchMessageCount = "messaging.batch.message_count" - // A unique identifier for the client that consumes or produces a message. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'client-5', 'myhost@8742@s8083jm' - AttributeMessagingClientID = "messaging.client.id" - // The name of the consumer group with which a consumer is associated. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-group', 'indexer' - // Note: Semantic conventions for individual messaging systems SHOULD document - // whether messaging.consumer.group.name is applicable and what it means in the - // context of that system. - AttributeMessagingConsumerGroupName = "messaging.consumer.group.name" - // A boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingDestinationAnonymous = "messaging.destination.anonymous" - // The message destination name - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic or - // other entity within the broker. If - // the broker doesn't have such notion, the destination name SHOULD uniquely - // identify the broker. - AttributeMessagingDestinationName = "messaging.destination.name" - // The identifier of the partition messages are sent to or received from, unique - // within the messaging.destination.name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1' - AttributeMessagingDestinationPartitionID = "messaging.destination.partition.id" - // The name of the destination subscription from which a message is consumed. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'subscription-a' - // Note: Semantic conventions for individual messaging systems SHOULD document - // whether messaging.destination.subscription.name is applicable and what it means - // in the context of that system. - AttributeMessagingDestinationSubscriptionName = "messaging.destination.subscription.name" - // Low cardinality representation of the messaging destination name - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example would - // be a destination name involving a user name or product id. Although the - // destination name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and aggregation. - AttributeMessagingDestinationTemplate = "messaging.destination.template" - // A boolean that is true if the message destination is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingDestinationTemporary = "messaging.destination.temporary" - // The size of the message body in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1439 - // Note: This can refer to both the compressed or uncompressed body size. If both - // sizes are known, the uncompressed - // body size should be used. - AttributeMessagingMessageBodySize = "messaging.message.body.size" - // The conversation ID identifying the conversation to which the message belongs, - // represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MyConversationID' - AttributeMessagingMessageConversationID = "messaging.message.conversation_id" - // The size of the message body and metadata in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2738 - // Note: This can refer to both the compressed or uncompressed size. If both sizes - // are known, the uncompressed - // size should be used. - AttributeMessagingMessageEnvelopeSize = "messaging.message.envelope.size" - // A value used by the messaging system as an identifier for the message, - // represented as a string. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - AttributeMessagingMessageID = "messaging.message.id" - // The system-specific name of the messaging operation. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ack', 'nack', 'send' - AttributeMessagingOperationName = "messaging.operation.name" - // A string identifying the type of the messaging operation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: If a custom value is used, it MUST be of low cardinality. - AttributeMessagingOperationType = "messaging.operation.type" - // The messaging system as identified by the client instrumentation. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The actual messaging system may differ from the one known by the client. - // For example, when using Kafka client libraries to communicate with Azure Event - // Hubs, the messaging.system is set to kafka based on the instrumentation's best - // knowledge. - AttributeMessagingSystem = "messaging.system" -) - -const ( - // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created - AttributeMessagingOperationTypePublish = "publish" - // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios - AttributeMessagingOperationTypeCreate = "create" - // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages - AttributeMessagingOperationTypeReceive = "receive" - // One or more messages are processed by a consumer - AttributeMessagingOperationTypeProcess = "process" - // One or more messages are settled - AttributeMessagingOperationTypeSettle = "settle" - // Deprecated. Use `process` instead - AttributeMessagingOperationTypeDeliver = "deliver" -) - -const ( - // Apache ActiveMQ - AttributeMessagingSystemActivemq = "activemq" - // Amazon Simple Queue Service (SQS) - AttributeMessagingSystemAWSSqs = "aws_sqs" - // Azure Event Grid - AttributeMessagingSystemEventgrid = "eventgrid" - // Azure Event Hubs - AttributeMessagingSystemEventhubs = "eventhubs" - // Azure Service Bus - AttributeMessagingSystemServicebus = "servicebus" - // Google Cloud Pub/Sub - AttributeMessagingSystemGCPPubsub = "gcp_pubsub" - // Java Message Service - AttributeMessagingSystemJms = "jms" - // Apache Kafka - AttributeMessagingSystemKafka = "kafka" - // RabbitMQ - AttributeMessagingSystemRabbitmq = "rabbitmq" - // Apache RocketMQ - AttributeMessagingSystemRocketmq = "rocketmq" - // Apache Pulsar - AttributeMessagingSystemPulsar = "pulsar" -) - -// This group describes attributes specific to Apache Kafka. -const ( - // Message keys in Kafka are used for grouping alike messages to ensure they're - // processed on the same partition. They differ from messaging.message.id in that - // they're not unique. If the key is null, the attribute MUST NOT be set. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to be - // supplied for the attribute. If the key has no unambiguous, canonical string - // form, don't include its value. - AttributeMessagingKafkaMessageKey = "messaging.kafka.message.key" - // A boolean that is true if the message is a tombstone. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingKafkaMessageTombstone = "messaging.kafka.message.tombstone" - // The offset of a record in the corresponding Kafka partition. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeMessagingKafkaOffset = "messaging.kafka.offset" -) - -// This group describes attributes specific to RabbitMQ. -const ( - // RabbitMQ message routing key. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myKey' - AttributeMessagingRabbitmqDestinationRoutingKey = "messaging.rabbitmq.destination.routing_key" - // RabbitMQ message delivery tag - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 123 - AttributeMessagingRabbitmqMessageDeliveryTag = "messaging.rabbitmq.message.delivery_tag" -) - -// This group describes attributes specific to RocketMQ. -const ( - // Model of message consumption. This only applies to consumer spans. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingRocketmqConsumptionModel = "messaging.rocketmq.consumption_model" - // The delay time level for delay message, which determines the message delay - // time. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3 - AttributeMessagingRocketmqMessageDelayTimeLevel = "messaging.rocketmq.message.delay_time_level" - // The timestamp in milliseconds that the delay message is expected to be - // delivered to consumer. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1665987217045 - AttributeMessagingRocketmqMessageDeliveryTimestamp = "messaging.rocketmq.message.delivery_timestamp" - // It is essential for FIFO message. Messages that belong to the same message - // group are always processed one by one within the same consumer group. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myMessageGroup' - AttributeMessagingRocketmqMessageGroup = "messaging.rocketmq.message.group" - // Key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'keyA', 'keyB' - AttributeMessagingRocketmqMessageKeys = "messaging.rocketmq.message.keys" - // The secondary classifier of message besides topic. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'tagA' - AttributeMessagingRocketmqMessageTag = "messaging.rocketmq.message.tag" - // Type of message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingRocketmqMessageType = "messaging.rocketmq.message.type" - // Namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myNamespace' - AttributeMessagingRocketmqNamespace = "messaging.rocketmq.namespace" -) - -const ( - // Clustering consumption model - AttributeMessagingRocketmqConsumptionModelClustering = "clustering" - // Broadcasting consumption model - AttributeMessagingRocketmqConsumptionModelBroadcasting = "broadcasting" -) - -const ( - // Normal message - AttributeMessagingRocketmqMessageTypeNormal = "normal" - // FIFO message - AttributeMessagingRocketmqMessageTypeFifo = "fifo" - // Delay message - AttributeMessagingRocketmqMessageTypeDelay = "delay" - // Transaction message - AttributeMessagingRocketmqMessageTypeTransaction = "transaction" -) - -// This group describes attributes specific to GCP Pub/Sub. -const ( - // The ack deadline in seconds set for the modify ack deadline request. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 10 - AttributeMessagingGCPPubsubMessageAckDeadline = "messaging.gcp_pubsub.message.ack_deadline" - // The ack id for a given message. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ack_id' - AttributeMessagingGCPPubsubMessageAckID = "messaging.gcp_pubsub.message.ack_id" - // The delivery attempt for a given message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2 - AttributeMessagingGCPPubsubMessageDeliveryAttempt = "messaging.gcp_pubsub.message.delivery_attempt" - // The ordering key for a given message. If the attribute is not present, the - // message does not have an ordering key. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ordering_key' - AttributeMessagingGCPPubsubMessageOrderingKey = "messaging.gcp_pubsub.message.ordering_key" -) - -// This group describes attributes specific to Azure Service Bus. -const ( - // Describes the settlement type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeMessagingServicebusDispositionStatus = "messaging.servicebus.disposition_status" - // Number of deliveries that have been attempted for this message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 2 - AttributeMessagingServicebusMessageDeliveryCount = "messaging.servicebus.message.delivery_count" - // The UTC epoch seconds at which the message has been accepted and stored in the - // entity. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1701393730 - AttributeMessagingServicebusMessageEnqueuedTime = "messaging.servicebus.message.enqueued_time" -) - -const ( - // Message is completed - AttributeMessagingServicebusDispositionStatusComplete = "complete" - // Message is abandoned - AttributeMessagingServicebusDispositionStatusAbandon = "abandon" - // Message is sent to dead letter queue - AttributeMessagingServicebusDispositionStatusDeadLetter = "dead_letter" - // Message is deferred - AttributeMessagingServicebusDispositionStatusDefer = "defer" -) - -// This group describes attributes specific to Azure Event Hubs. -const ( - // The UTC epoch seconds at which the message has been accepted and stored in the - // entity. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1701393730 - AttributeMessagingEventhubsMessageEnqueuedTime = "messaging.eventhubs.message.enqueued_time" -) - -// These attributes may be used for any network related operation. -const ( - // The ISO 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'DE' - AttributeNetworkCarrierIcc = "network.carrier.icc" - // The mobile carrier country code. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '310' - AttributeNetworkCarrierMcc = "network.carrier.mcc" - // The mobile carrier network code. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '001' - AttributeNetworkCarrierMnc = "network.carrier.mnc" - // The name of the mobile carrier. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'sprint' - AttributeNetworkCarrierName = "network.carrier.name" - // This describes more details regarding the connection.type. It may be the type - // of cell technology connection, but it could be used for describing details - // about a wifi connection. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'LTE' - AttributeNetworkConnectionSubtype = "network.connection.subtype" - // The internet connection type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'wifi' - AttributeNetworkConnectionType = "network.connection.type" - // The network IO operation direction. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'transmit' - AttributeNetworkIoDirection = "network.io.direction" - // Local address of the network connection - IP address or Unix domain socket - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - AttributeNetworkLocalAddress = "network.local.address" - // Local port number of the network connection. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - AttributeNetworkLocalPort = "network.local.port" - // Peer address of the network connection - IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - AttributeNetworkPeerAddress = "network.peer.address" - // Peer port number of the network connection. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 65123 - AttributeNetworkPeerPort = "network.peer.port" - // OSI application layer or non-OSI equivalent. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - // Note: The value SHOULD be normalized to lowercase. - AttributeNetworkProtocolName = "network.protocol.name" - // The actual version of the protocol used for network communication. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.1', '2' - // Note: If protocol version is subject to negotiation (for example using ALPN), - // this attribute SHOULD be set to the negotiated version. If the actual protocol - // version is not known, this attribute SHOULD NOT be set. - AttributeNetworkProtocolVersion = "network.protocol.version" - // OSI transport layer or inter-process communication method. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'tcp', 'udp' - // Note: The value SHOULD be normalized to lowercase.Consider always setting the - // transport when setting a port number, since - // a port number is ambiguous without knowing the transport. For example - // different processes could be listening on TCP port 12345 and UDP port 12345. - AttributeNetworkTransport = "network.transport" - // OSI network layer or non-OSI equivalent. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'ipv4', 'ipv6' - // Note: The value SHOULD be normalized to lowercase. - AttributeNetworkType = "network.type" -) - -const ( - // GPRS - AttributeNetworkConnectionSubtypeGprs = "gprs" - // EDGE - AttributeNetworkConnectionSubtypeEdge = "edge" - // UMTS - AttributeNetworkConnectionSubtypeUmts = "umts" - // CDMA - AttributeNetworkConnectionSubtypeCdma = "cdma" - // EVDO Rel. 0 - AttributeNetworkConnectionSubtypeEvdo0 = "evdo_0" - // EVDO Rev. A - AttributeNetworkConnectionSubtypeEvdoA = "evdo_a" - // CDMA2000 1XRTT - AttributeNetworkConnectionSubtypeCdma20001xrtt = "cdma2000_1xrtt" - // HSDPA - AttributeNetworkConnectionSubtypeHsdpa = "hsdpa" - // HSUPA - AttributeNetworkConnectionSubtypeHsupa = "hsupa" - // HSPA - AttributeNetworkConnectionSubtypeHspa = "hspa" - // IDEN - AttributeNetworkConnectionSubtypeIden = "iden" - // EVDO Rev. B - AttributeNetworkConnectionSubtypeEvdoB = "evdo_b" - // LTE - AttributeNetworkConnectionSubtypeLte = "lte" - // EHRPD - AttributeNetworkConnectionSubtypeEhrpd = "ehrpd" - // HSPAP - AttributeNetworkConnectionSubtypeHspap = "hspap" - // GSM - AttributeNetworkConnectionSubtypeGsm = "gsm" - // TD-SCDMA - AttributeNetworkConnectionSubtypeTdScdma = "td_scdma" - // IWLAN - AttributeNetworkConnectionSubtypeIwlan = "iwlan" - // 5G NR (New Radio) - AttributeNetworkConnectionSubtypeNr = "nr" - // 5G NRNSA (New Radio Non-Standalone) - AttributeNetworkConnectionSubtypeNrnsa = "nrnsa" - // LTE CA - AttributeNetworkConnectionSubtypeLteCa = "lte_ca" -) - -const ( - // wifi - AttributeNetworkConnectionTypeWifi = "wifi" - // wired - AttributeNetworkConnectionTypeWired = "wired" - // cell - AttributeNetworkConnectionTypeCell = "cell" - // unavailable - AttributeNetworkConnectionTypeUnavailable = "unavailable" - // unknown - AttributeNetworkConnectionTypeUnknown = "unknown" -) - -const ( - // transmit - AttributeNetworkIoDirectionTransmit = "transmit" - // receive - AttributeNetworkIoDirectionReceive = "receive" -) - -const ( - // TCP - AttributeNetworkTransportTCP = "tcp" - // UDP - AttributeNetworkTransportUDP = "udp" - // Named or anonymous pipe - AttributeNetworkTransportPipe = "pipe" - // Unix domain socket - AttributeNetworkTransportUnix = "unix" - // QUIC - AttributeNetworkTransportQUIC = "quic" -) - -const ( - // IPv4 - AttributeNetworkTypeIpv4 = "ipv4" - // IPv6 - AttributeNetworkTypeIpv6 = "ipv6" -) - -// An OCI image manifest. -const ( - // The digest of the OCI image manifest. For container images specifically is the - // digest by which the container image is known. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: - // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' - // Note: Follows OCI Image Manifest Specification, and specifically the Digest - // property. - // An example can be found in Example Image Manifest. - AttributeOciManifestDigest = "oci.manifest.digest" -) - -// Attributes used by the OpenTracing Shim layer. -const ( - // Parent-child Reference type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: The causal relationship between a child Span and a parent Span. - AttributeOpentracingRefType = "opentracing.ref_type" -) - -const ( - // The parent Span depends on the child Span in some capacity - AttributeOpentracingRefTypeChildOf = "child_of" - // The parent Span doesn't depend in any way on the result of the child Span - AttributeOpentracingRefTypeFollowsFrom = "follows_from" -) - -// The operating system (OS) on which the process represented by this resource -// is running. -const ( - // Unique identifier for a particular build or compilation of the operating - // system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' - AttributeOSBuildID = "os.build_id" - // Human readable (not intended to be parsed) OS version information, like e.g. - // reported by ver or lsb_release -a commands. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' - AttributeOSDescription = "os.description" - // Human readable operating system name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'iOS', 'Android', 'Ubuntu' - AttributeOSName = "os.name" - // The operating system type. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeOSType = "os.type" - // The version string of the operating system as defined in Version Attributes. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.2.1', '18.04.1' - AttributeOSVersion = "os.version" -) - -const ( - // Microsoft Windows - AttributeOSTypeWindows = "windows" - // Linux - AttributeOSTypeLinux = "linux" - // Apple Darwin - AttributeOSTypeDarwin = "darwin" - // FreeBSD - AttributeOSTypeFreeBSD = "freebsd" - // NetBSD - AttributeOSTypeNetBSD = "netbsd" - // OpenBSD - AttributeOSTypeOpenBSD = "openbsd" - // DragonFly BSD - AttributeOSTypeDragonflyBSD = "dragonflybsd" - // HP-UX (Hewlett Packard Unix) - AttributeOSTypeHPUX = "hpux" - // AIX (Advanced Interactive eXecutive) - AttributeOSTypeAIX = "aix" - // SunOS, Oracle Solaris - AttributeOSTypeSolaris = "solaris" - // IBM z/OS - AttributeOSTypeZOS = "z_os" -) - -// Attributes reserved for OpenTelemetry -const ( - // Name of the code, either "OK" or "ERROR". MUST NOT be set - // if the status code is UNSET. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - AttributeOTelStatusCode = "otel.status_code" - // Description of the Status if it has a value, otherwise not set. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'resource not found' - AttributeOTelStatusDescription = "otel.status_description" -) - -const ( - // The operation has been validated by an Application developer or Operator to have completed successfully - AttributeOTelStatusCodeOk = "OK" - // The operation contains an error - AttributeOTelStatusCodeError = "ERROR" -) - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's -// concepts. -const ( - // The name of the instrumentation scope - (InstrumentationScope.Name in OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - AttributeOTelScopeName = "otel.scope.name" - // The version of the instrumentation scope - (InstrumentationScope.Version in - // OTLP). - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '1.0.0' - AttributeOTelScopeVersion = "otel.scope.version" -) - -// Operations that access some remote service. -const ( - // The service.name of the remote service. SHOULD be equal to the actual - // service.name resource attribute of the remote service if any. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'AuthTokenCache' - AttributePeerService = "peer.service" -) - -// An operating system process. -const ( - // The command used to launch the process (i.e. the command name). On Linux based - // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can - // be set to the first parameter extracted from GetCommandLineW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'cmd/otelcol' - AttributeProcessCommand = "process.command" - // All the command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited strings - // extracted from proc/[pid]/cmdline. For libc-based executables, this would be - // the full argv vector passed to main. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'cmd/otecol', '--config=config.yaml' - AttributeProcessCommandArgs = "process.command_args" - // The full command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of GetCommandLineW. Do not - // set this if you have to assemble it just for monitoring; use - // process.command_args instead. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - AttributeProcessCommandLine = "process.command_line" - // Specifies whether the context switches for this data point were voluntary or - // involuntary. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeProcessContextSwitchType = "process.context_switch_type" - // The date and time the process was created, in ISO 8601 format. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2023-11-21T09:25:34.853Z' - AttributeProcessCreationTime = "process.creation.time" - // The name of the process executable. On Linux based systems, can be set to the - // Name in proc/[pid]/status. On Windows, can be set to the base name of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'otelcol' - AttributeProcessExecutableName = "process.executable.name" - // The full path to the process executable. On Linux based systems, can be set to - // the target of proc/[pid]/exe. On Windows, can be set to the result of - // GetProcessImageFileNameW. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/usr/bin/cmd/otelcol' - AttributeProcessExecutablePath = "process.executable.path" - // The exit code of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 127 - AttributeProcessExitCode = "process.exit.code" - // The date and time the process exited, in ISO 8601 format. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2023-11-21T09:26:12.315Z' - AttributeProcessExitTime = "process.exit.time" - // The PID of the process's group leader. This is also the process group ID (PGID) - // of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 23 - AttributeProcessGroupLeaderPID = "process.group_leader.pid" - // Whether the process is connected to an interactive shell. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - AttributeProcessInteractive = "process.interactive" - // The username of the user that owns the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'root' - AttributeProcessOwner = "process.owner" - // The type of page fault for this data point. Type major is for major/hard page - // faults, and minor is for minor/soft page faults. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeProcessPagingFaultType = "process.paging.fault_type" - // Parent Process identifier (PPID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 111 - AttributeProcessParentPID = "process.parent_pid" - // Process identifier (PID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1234 - AttributeProcessPID = "process.pid" - // The real user ID (RUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1000 - AttributeProcessRealUserID = "process.real_user.id" - // The username of the real user of the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'operator' - AttributeProcessRealUserName = "process.real_user.name" - // An additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - AttributeProcessRuntimeDescription = "process.runtime.description" - // The name of the runtime of this process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'OpenJDK Runtime Environment' - AttributeProcessRuntimeName = "process.runtime.name" - // The version of the runtime of this process, as returned by the runtime without - // modification. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.0.2' - AttributeProcessRuntimeVersion = "process.runtime.version" - // The saved user ID (SUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1002 - AttributeProcessSavedUserID = "process.saved_user.id" - // The username of the saved user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'operator' - AttributeProcessSavedUserName = "process.saved_user.name" - // The PID of the process's session leader. This is also the session ID (SID) of - // the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 14 - AttributeProcessSessionLeaderPID = "process.session_leader.pid" - // The effective user ID (EUID) of the process. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1001 - AttributeProcessUserID = "process.user.id" - // The username of the effective user of the process. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'root' - AttributeProcessUserName = "process.user.name" - // Virtual process identifier. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 12 - // Note: The process ID within a PID namespace. This is not necessarily unique - // across all processes on the host but it is unique within the process namespace - // that the process exists within. - AttributeProcessVpid = "process.vpid" -) - -const ( - // voluntary - AttributeProcessContextSwitchTypeVoluntary = "voluntary" - // involuntary - AttributeProcessContextSwitchTypeInvoluntary = "involuntary" -) - -const ( - // major - AttributeProcessPagingFaultTypeMajor = "major" - // minor - AttributeProcessPagingFaultTypeMinor = "minor" -) - -// Attributes for remote procedure calls. -const ( - // The error codes of the Connect request. Error codes are always string values. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCConnectRPCErrorCode = "rpc.connect_rpc.error_code" - // The numeric status code of the gRPC request. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" - // error.code property of response if it is an error response. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: -32700, 100 - AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" - // error.message property of response if it is an error response. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Parse error', 'User already exists' - AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" - // id property of request or response. Since protocol allows id to be int, string, - // null or missing (for notifications), value is expected to be cast to string for - // simplicity. Use empty string in case of null value. Omit entirely if this is a - // notification. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '10', 'request-7', '' - AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" - // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 - // doesn't specify this, the value can be omitted. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2.0', '1.0' - AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" - // Compressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageCompressedSize = "rpc.message.compressed_size" - // MUST be calculated as two different counters starting from 1 one for sent - // messages and one for received message. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Note: This way we guarantee that the values will be consistent between - // different implementations. - AttributeRPCMessageID = "rpc.message.id" - // Whether this is a received or sent message. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageType = "rpc.message.type" - // Uncompressed size of the message in bytes. - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - AttributeRPCMessageUncompressedSize = "rpc.message.uncompressed_size" - // The name of the (logical) method being called, must be equal to the $method - // part in the span name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The code.function attribute may be used to store the latter - // (e.g., method actually executing the call on the server side, RPC client stub - // method on the client side). - AttributeRPCMethod = "rpc.method" - // The full (logical) name of the service being called, including its package - // name, if applicable. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing class. - // The code.namespace attribute may be used to store the latter (despite the - // attribute name, it may include a class name; e.g., class with method actually - // executing the call on the server side, RPC client stub class on the client - // side). - AttributeRPCService = "rpc.service" - // A string identifying the remoting system. See below for a list of well-known - // identifiers. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeRPCSystem = "rpc.system" -) - -const ( - // cancelled - AttributeRPCConnectRPCErrorCodeCancelled = "cancelled" - // unknown - AttributeRPCConnectRPCErrorCodeUnknown = "unknown" - // invalid_argument - AttributeRPCConnectRPCErrorCodeInvalidArgument = "invalid_argument" - // deadline_exceeded - AttributeRPCConnectRPCErrorCodeDeadlineExceeded = "deadline_exceeded" - // not_found - AttributeRPCConnectRPCErrorCodeNotFound = "not_found" - // already_exists - AttributeRPCConnectRPCErrorCodeAlreadyExists = "already_exists" - // permission_denied - AttributeRPCConnectRPCErrorCodePermissionDenied = "permission_denied" - // resource_exhausted - AttributeRPCConnectRPCErrorCodeResourceExhausted = "resource_exhausted" - // failed_precondition - AttributeRPCConnectRPCErrorCodeFailedPrecondition = "failed_precondition" - // aborted - AttributeRPCConnectRPCErrorCodeAborted = "aborted" - // out_of_range - AttributeRPCConnectRPCErrorCodeOutOfRange = "out_of_range" - // unimplemented - AttributeRPCConnectRPCErrorCodeUnimplemented = "unimplemented" - // internal - AttributeRPCConnectRPCErrorCodeInternal = "internal" - // unavailable - AttributeRPCConnectRPCErrorCodeUnavailable = "unavailable" - // data_loss - AttributeRPCConnectRPCErrorCodeDataLoss = "data_loss" - // unauthenticated - AttributeRPCConnectRPCErrorCodeUnauthenticated = "unauthenticated" -) - -const ( - // OK - AttributeRPCGRPCStatusCodeOk = "0" - // CANCELLED - AttributeRPCGRPCStatusCodeCancelled = "1" - // UNKNOWN - AttributeRPCGRPCStatusCodeUnknown = "2" - // INVALID_ARGUMENT - AttributeRPCGRPCStatusCodeInvalidArgument = "3" - // DEADLINE_EXCEEDED - AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" - // NOT_FOUND - AttributeRPCGRPCStatusCodeNotFound = "5" - // ALREADY_EXISTS - AttributeRPCGRPCStatusCodeAlreadyExists = "6" - // PERMISSION_DENIED - AttributeRPCGRPCStatusCodePermissionDenied = "7" - // RESOURCE_EXHAUSTED - AttributeRPCGRPCStatusCodeResourceExhausted = "8" - // FAILED_PRECONDITION - AttributeRPCGRPCStatusCodeFailedPrecondition = "9" - // ABORTED - AttributeRPCGRPCStatusCodeAborted = "10" - // OUT_OF_RANGE - AttributeRPCGRPCStatusCodeOutOfRange = "11" - // UNIMPLEMENTED - AttributeRPCGRPCStatusCodeUnimplemented = "12" - // INTERNAL - AttributeRPCGRPCStatusCodeInternal = "13" - // UNAVAILABLE - AttributeRPCGRPCStatusCodeUnavailable = "14" - // DATA_LOSS - AttributeRPCGRPCStatusCodeDataLoss = "15" - // UNAUTHENTICATED - AttributeRPCGRPCStatusCodeUnauthenticated = "16" -) - -const ( - // sent - AttributeRPCMessageTypeSent = "SENT" - // received - AttributeRPCMessageTypeReceived = "RECEIVED" -) - -const ( - // gRPC - AttributeRPCSystemGRPC = "grpc" - // Java RMI - AttributeRPCSystemJavaRmi = "java_rmi" - // .NET WCF - AttributeRPCSystemDotnetWcf = "dotnet_wcf" - // Apache Dubbo - AttributeRPCSystemApacheDubbo = "apache_dubbo" - // Connect RPC - AttributeRPCSystemConnectRPC = "connect_rpc" -) - -// These attributes may be used to describe the server in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // Server domain name if available without reverse DNS lookup; otherwise, IP - // address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the client side, and when communicating through an - // intermediary, server.address SHOULD represent the server address behind any - // intermediaries, for example proxies, if it's available. - AttributeServerAddress = "server.address" - // Server port number. - // - // Type: int - // Requirement Level: Optional - // Stability: stable - // Examples: 80, 8080, 443 - // Note: When observed from the client side, and when communicating through an - // intermediary, server.port SHOULD represent the server port behind any - // intermediaries, for example proxies, if it's available. - AttributeServerPort = "server.port" -) - -// A service instance. -const ( - // The string ID of the service instance. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // service.namespace,service.name pair (in other words - // service.namespace,service.name,service.instance.id triplet MUST be globally - // unique). The ID helps to - // distinguish instances of the same service that exist at the same time (e.g. - // instances of a horizontally scaled - // service).Implementations, such as SDKs, are recommended to generate a random - // Version 1 or Version 4 RFC - // 4122 UUID, but are free to use an inherent unique ID as the source of - // this value if stability is desirable. In that case, the ID SHOULD be used as - // source of a UUID Version 5 and - // SHOULD use the following UUID as the namespace: 4d63009a-8d0f-11ee- - // aad7-4c796ed8e320.UUIDs are typically recommended, as only an opaque value for - // the purposes of identifying a service instance is - // needed. Similar to what can be seen in the man page for the - // /etc/machine-id file, the underlying - // data, such as pod name and namespace should be treated as confidential, being - // the user's choice to expose it - // or not via another resource attribute.For applications running behind an - // application server (like unicorn), we do not recommend using one identifier - // for all processes participating in the application. Instead, it's recommended - // each division (e.g. a worker - // thread in unicorn) to have its own instance.id.It's not recommended for a - // Collector to set service.instance.id if it can't unambiguously determine the - // service instance that is generating that telemetry. For instance, creating an - // UUID based on pod.name will - // likely be wrong, as the Collector might not know from which container within - // that pod the telemetry originated. - // However, Collectors can set the service.instance.id if they can unambiguously - // determine the service instance - // for that telemetry. This is typically the case for scraping receivers, as they - // know the target address and - // port. - AttributeServiceInstanceID = "service.instance.id" - // Logical name of the service. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled services. If - // the value was not specified, SDKs MUST fallback to unknown_service: - // concatenated with process.executable.name, e.g. unknown_service:bash. If - // process.executable.name is not available, the value MUST be set to - // unknown_service. - AttributeServiceName = "service.name" - // A namespace for service.name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group of - // services, for example the team name that owns a group of services. service.name - // is expected to be unique within the same namespace. If service.namespace is not - // specified in the Resource then service.name is expected to be unique for all - // services that have no explicit namespace defined (so the empty/unspecified - // namespace is simply one more valid namespace). Zero-length namespace string is - // assumed equal to unspecified namespace. - AttributeServiceNamespace = "service.namespace" - // The version string of the service API or implementation. The format is not - // defined by these conventions. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '2.0.0', 'a01dbef8a' - AttributeServiceVersion = "service.version" -) - -// Session is defined as the period of time encompassing all activities -// performed by the application and the actions executed by the end user. -// Consequently, a Session is represented as a collection of Logs, Events, and -// Spans emitted by the Client Application throughout the Session's duration. -// Each Session is assigned a unique identifier, which is included as an -// attribute in the Logs, Events, and Spans generated during the Session's -// lifecycle. -// When a session reaches end of life, typically due to user inactivity or -// session timeout, a new session identifier will be assigned. The previous -// session identifier may be provided by the instrumentation so that telemetry -// backends can link the two sessions. -const ( - // A unique id to identify a session. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - AttributeSessionID = "session.id" - // The previous session.id for this user, when known. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - AttributeSessionPreviousID = "session.previous_id" -) - -// SignalR attributes -const ( - // SignalR HTTP connection closure status. - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'app_shutdown', 'timeout' - AttributeSignalrConnectionStatus = "signalr.connection.status" - // SignalR transport type - // - // Type: Enum - // Requirement Level: Optional - // Stability: stable - // Examples: 'web_sockets', 'long_polling' - AttributeSignalrTransport = "signalr.transport" -) - -const ( - // The connection was closed normally - AttributeSignalrConnectionStatusNormalClosure = "normal_closure" - // The connection was closed due to a timeout - AttributeSignalrConnectionStatusTimeout = "timeout" - // The connection was closed because the app is shutting down - AttributeSignalrConnectionStatusAppShutdown = "app_shutdown" -) - -const ( - // ServerSentEvents protocol - AttributeSignalrTransportServerSentEvents = "server_sent_events" - // LongPolling protocol - AttributeSignalrTransportLongPolling = "long_polling" - // WebSockets protocol - AttributeSignalrTransportWebSockets = "web_sockets" -) - -// These attributes may be used to describe the sender of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // Source address - domain name if available without reverse DNS lookup; - // otherwise, IP address or Unix domain socket name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the destination side, and when communicating through - // an intermediary, source.address SHOULD represent the source address behind any - // intermediaries, for example proxies, if it's available. - AttributeSourceAddress = "source.address" - // Source port number - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 3389, 2888 - AttributeSourcePort = "source.port" -) - -// Describes System attributes -const ( - // The device identifier - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '(identifier)' - AttributeSystemDevice = "system.device" -) - -// Describes System CPU attributes -const ( - // The logical CPU number [0..n-1] - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 1 - AttributeSystemCPULogicalNumber = "system.cpu.logical_number" -) - -// Describes System Memory attributes -const ( - // The memory state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'free', 'cached' - AttributeSystemMemoryState = "system.memory.state" -) - -const ( - // used - AttributeSystemMemoryStateUsed = "used" - // free - AttributeSystemMemoryStateFree = "free" - // shared - AttributeSystemMemoryStateShared = "shared" - // buffers - AttributeSystemMemoryStateBuffers = "buffers" - // cached - AttributeSystemMemoryStateCached = "cached" -) - -// Describes System Memory Paging attributes -const ( - // The paging access direction - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'in' - AttributeSystemPagingDirection = "system.paging.direction" - // The memory paging state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'free' - AttributeSystemPagingState = "system.paging.state" - // The memory paging type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'minor' - AttributeSystemPagingType = "system.paging.type" -) - -const ( - // in - AttributeSystemPagingDirectionIn = "in" - // out - AttributeSystemPagingDirectionOut = "out" -) - -const ( - // used - AttributeSystemPagingStateUsed = "used" - // free - AttributeSystemPagingStateFree = "free" -) - -const ( - // major - AttributeSystemPagingTypeMajor = "major" - // minor - AttributeSystemPagingTypeMinor = "minor" -) - -// Describes Filesystem attributes -const ( - // The filesystem mode - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'rw, ro' - AttributeSystemFilesystemMode = "system.filesystem.mode" - // The filesystem mount path - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/mnt/data' - AttributeSystemFilesystemMountpoint = "system.filesystem.mountpoint" - // The filesystem state - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'used' - AttributeSystemFilesystemState = "system.filesystem.state" - // The filesystem type - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'ext4' - AttributeSystemFilesystemType = "system.filesystem.type" -) - -const ( - // used - AttributeSystemFilesystemStateUsed = "used" - // free - AttributeSystemFilesystemStateFree = "free" - // reserved - AttributeSystemFilesystemStateReserved = "reserved" -) - -const ( - // fat32 - AttributeSystemFilesystemTypeFat32 = "fat32" - // exfat - AttributeSystemFilesystemTypeExfat = "exfat" - // ntfs - AttributeSystemFilesystemTypeNtfs = "ntfs" - // refs - AttributeSystemFilesystemTypeRefs = "refs" - // hfsplus - AttributeSystemFilesystemTypeHfsplus = "hfsplus" - // ext4 - AttributeSystemFilesystemTypeExt4 = "ext4" -) - -// Describes Network attributes -const ( - // A stateless protocol MUST NOT set this attribute - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'close_wait' - AttributeSystemNetworkState = "system.network.state" -) - -const ( - // close - AttributeSystemNetworkStateClose = "close" - // close_wait - AttributeSystemNetworkStateCloseWait = "close_wait" - // closing - AttributeSystemNetworkStateClosing = "closing" - // delete - AttributeSystemNetworkStateDelete = "delete" - // established - AttributeSystemNetworkStateEstablished = "established" - // fin_wait_1 - AttributeSystemNetworkStateFinWait1 = "fin_wait_1" - // fin_wait_2 - AttributeSystemNetworkStateFinWait2 = "fin_wait_2" - // last_ack - AttributeSystemNetworkStateLastAck = "last_ack" - // listen - AttributeSystemNetworkStateListen = "listen" - // syn_recv - AttributeSystemNetworkStateSynRecv = "syn_recv" - // syn_sent - AttributeSystemNetworkStateSynSent = "syn_sent" - // time_wait - AttributeSystemNetworkStateTimeWait = "time_wait" -) - -// Describes System Process attributes -const ( - // The process state, e.g., Linux Process State Codes - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'running' - AttributeSystemProcessStatus = "system.process.status" -) - -const ( - // running - AttributeSystemProcessStatusRunning = "running" - // sleeping - AttributeSystemProcessStatusSleeping = "sleeping" - // stopped - AttributeSystemProcessStatusStopped = "stopped" - // defunct - AttributeSystemProcessStatusDefunct = "defunct" -) - -// Attributes for telemetry SDK. -const ( - // The language of the telemetry SDK. - // - // Type: Enum - // Requirement Level: Required - // Stability: stable - AttributeTelemetrySDKLanguage = "telemetry.sdk.language" - // The name of the telemetry SDK as defined above. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: 'opentelemetry' - // Note: The OpenTelemetry SDK MUST set the telemetry.sdk.name attribute to - // opentelemetry. - // If another SDK, like a fork or a vendor-provided implementation, is used, this - // SDK MUST set the - // telemetry.sdk.name attribute to the fully-qualified class or module name of - // this SDK's main entry point - // or another suitable identifier depending on the language. - // The identifier opentelemetry is reserved and MUST NOT be used in this case. - // All custom identifiers SHOULD be stable across different versions of an - // implementation. - AttributeTelemetrySDKName = "telemetry.sdk.name" - // The version string of the telemetry SDK. - // - // Type: string - // Requirement Level: Required - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetrySDKVersion = "telemetry.sdk.version" - // The name of the auto instrumentation agent or distribution, if used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'parts-unlimited-java' - // Note: Official auto instrumentation agents and distributions SHOULD set the - // telemetry.distro.name attribute to - // a string starting with opentelemetry-, e.g. opentelemetry-java-instrumentation. - AttributeTelemetryDistroName = "telemetry.distro.name" - // The version string of the auto instrumentation agent or distribution, if used. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.2.3' - AttributeTelemetryDistroVersion = "telemetry.distro.version" -) - -const ( - // cpp - AttributeTelemetrySDKLanguageCPP = "cpp" - // dotnet - AttributeTelemetrySDKLanguageDotnet = "dotnet" - // erlang - AttributeTelemetrySDKLanguageErlang = "erlang" - // go - AttributeTelemetrySDKLanguageGo = "go" - // java - AttributeTelemetrySDKLanguageJava = "java" - // nodejs - AttributeTelemetrySDKLanguageNodejs = "nodejs" - // php - AttributeTelemetrySDKLanguagePHP = "php" - // python - AttributeTelemetrySDKLanguagePython = "python" - // ruby - AttributeTelemetrySDKLanguageRuby = "ruby" - // rust - AttributeTelemetrySDKLanguageRust = "rust" - // swift - AttributeTelemetrySDKLanguageSwift = "swift" - // webjs - AttributeTelemetrySDKLanguageWebjs = "webjs" -) - -// This group describes attributes specific to [software -// tests](https://en.wikipedia.org/wiki/Software_testing). -const ( - // The fully qualified human readable name of the test case. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'org.example.TestCase1.test1', 'example/tests/TestCase1.test1', - // 'ExampleTestCase1_test1' - AttributeTestCaseName = "test.case.name" - // The status of the actual test case result from test execution. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'pass', 'fail' - AttributeTestCaseResultStatus = "test.case.result.status" - // The human readable name of a test suite. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TestSuite1' - AttributeTestSuiteName = "test.suite.name" - // The status of the test suite run. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'success', 'failure', 'skipped', 'aborted', 'timed_out', - // 'in_progress' - AttributeTestSuiteRunStatus = "test.suite.run.status" -) - -const ( - // pass - AttributeTestCaseResultStatusPass = "pass" - // fail - AttributeTestCaseResultStatusFail = "fail" -) - -const ( - // success - AttributeTestSuiteRunStatusSuccess = "success" - // failure - AttributeTestSuiteRunStatusFailure = "failure" - // skipped - AttributeTestSuiteRunStatusSkipped = "skipped" - // aborted - AttributeTestSuiteRunStatusAborted = "aborted" - // timed_out - AttributeTestSuiteRunStatusTimedOut = "timed_out" - // in_progress - AttributeTestSuiteRunStatusInProgress = "in_progress" -) - -// These attributes may be used for any operation to store information about a -// thread that started a span. -const ( - // Current "managed" thread ID (as opposed to OS thread ID). - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 42 - AttributeThreadID = "thread.id" - // Current thread name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'main' - AttributeThreadName = "thread.name" -) - -// Semantic convention attributes in the TLS namespace. -const ( - // String indicating the cipher used during the current connection. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', - // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' - // Note: The values allowed for tls.cipher MUST be one of the Descriptions of the - // registered TLS Cipher Suits. - AttributeTLSCipher = "tls.cipher" - // PEM-encoded stand-alone certificate offered by the client. This is usually - // mutually-exclusive of client.certificate_chain since this value also exists in - // that list. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...' - AttributeTLSClientCertificate = "tls.client.certificate" - // Array of PEM-encoded certificates that make up the certificate chain offered by - // the client. This is usually mutually-exclusive of client.certificate since that - // value should be the first certificate in the chain. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - AttributeTLSClientCertificateChain = "tls.client.certificate_chain" - // Certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - AttributeTLSClientHashMd5 = "tls.client.hash.md5" - // Certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - AttributeTLSClientHashSha1 = "tls.client.hash.sha1" - // Certificate fingerprint using the SHA256 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - AttributeTLSClientHashSha256 = "tls.client.hash.sha256" - // Distinguished name of subject of the issuer of the x.509 certificate presented - // by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' - AttributeTLSClientIssuer = "tls.client.issuer" - // A hash that identifies clients based on how they perform an SSL/TLS handshake. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - AttributeTLSClientJa3 = "tls.client.ja3" - // Date/Time indicating when client certificate is no longer considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - AttributeTLSClientNotAfter = "tls.client.not_after" - // Date/Time indicating when client certificate is first considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - AttributeTLSClientNotBefore = "tls.client.not_before" - // Distinguished name of subject of the x.509 certificate presented by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' - AttributeTLSClientSubject = "tls.client.subject" - // Array of ciphers offered by the client during the client hello. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384', - // 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384', '...' - AttributeTLSClientSupportedCiphers = "tls.client.supported_ciphers" - // String indicating the curve used for the given cipher, when applicable - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'secp256r1' - AttributeTLSCurve = "tls.curve" - // Boolean flag indicating if the TLS negotiation was successful and transitioned - // to an encrypted tunnel. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Examples: True - AttributeTLSEstablished = "tls.established" - // String indicating the protocol being tunneled. Per the values in the IANA - // registry, this string should be lower case. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'http/1.1' - AttributeTLSNextProtocol = "tls.next_protocol" - // Normalized lowercase protocol name parsed from original string of the - // negotiated SSL/TLS protocol version - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeTLSProtocolName = "tls.protocol.name" - // Numeric part of the version parsed from the original string of the negotiated - // SSL/TLS protocol version - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1.2', '3' - AttributeTLSProtocolVersion = "tls.protocol.version" - // Boolean flag indicating if this TLS connection was resumed from an existing TLS - // negotiation. - // - // Type: boolean - // Requirement Level: Optional - // Stability: experimental - // Examples: True - AttributeTLSResumed = "tls.resumed" - // PEM-encoded stand-alone certificate offered by the server. This is usually - // mutually-exclusive of server.certificate_chain since this value also exists in - // that list. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...' - AttributeTLSServerCertificate = "tls.server.certificate" - // Array of PEM-encoded certificates that make up the certificate chain offered by - // the server. This is usually mutually-exclusive of server.certificate since that - // value should be the first certificate in the chain. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - AttributeTLSServerCertificateChain = "tls.server.certificate_chain" - // Certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - AttributeTLSServerHashMd5 = "tls.server.hash.md5" - // Certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - AttributeTLSServerHashSha1 = "tls.server.hash.sha1" - // Certificate fingerprint using the SHA256 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash values, this - // value should be formatted as an uppercase hash. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - AttributeTLSServerHashSha256 = "tls.server.hash.sha256" - // Distinguished name of subject of the issuer of the x.509 certificate presented - // by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com' - AttributeTLSServerIssuer = "tls.server.issuer" - // A hash that identifies servers based on how they perform an SSL/TLS handshake. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - AttributeTLSServerJa3s = "tls.server.ja3s" - // Date/Time indicating when server certificate is no longer considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - AttributeTLSServerNotAfter = "tls.server.not_after" - // Date/Time indicating when server certificate is first considered valid. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - AttributeTLSServerNotBefore = "tls.server.not_before" - // Distinguished name of subject of the x.509 certificate presented by the server. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' - AttributeTLSServerSubject = "tls.server.subject" -) - -const ( - // ssl - AttributeTLSProtocolNameSsl = "ssl" - // tls - AttributeTLSProtocolNameTLS = "tls" -) - -// Attributes describing URL. -const ( - // Domain extracted from the url.full, such as "opentelemetry.io". - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', - // '[1080:0:0:0:8:800:200C:417A]' - // Note: In some cases a URL may refer to an IP and/or port directly, without a - // domain name. In this case, the IP address would go to the domain field. If the - // URL contains a literal IPv6 address enclosed by [ and ], the [ and ] characters - // should also be captured in the domain field. - AttributeURLDomain = "url.domain" - // The file extension extracted from the url.full, excluding the leading dot. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: The file extension is only set if it exists, as not every url has a file - // extension. When the file name has multiple extensions example.tar.gz, only the - // last one should be captured gz, not tar.gz. - AttributeURLExtension = "url.extension" - // The URI fragment component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'SemConv' - AttributeURLFragment = "url.fragment" - // Absolute URL describing a network resource according to RFC3986 - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', '//localhost' - // Note: For network calls, URL usually has - // scheme://host[:port][path][?query][#fragment] format, where the fragment is not - // transmitted over HTTP, but if it is known, it SHOULD be included nevertheless. - // url.full MUST NOT contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case username and password - // SHOULD be redacted and attribute's value SHOULD be - // https://REDACTED:REDACTED@www.example.com/. - // url.full SHOULD capture the absolute URL when it is available (or can be - // reconstructed). Sensitive content provided in url.full SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLFull = "url.full" - // Unmodified original URL as seen in the event source. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', - // 'search?q=OpenTelemetry' - // Note: In network monitoring, the observed URL may be a full URL, whereas in - // access logs, the URL is often just represented as a path. This field is meant - // to represent the URL as it was observed, complete or not. - // url.original might contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case password and username - // SHOULD NOT be redacted and attribute's value SHOULD remain the same. - AttributeURLOriginal = "url.original" - // The URI path component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: '/search' - // Note: Sensitive content provided in url.path SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLPath = "url.path" - // Port extracted from the url.full - // - // Type: int - // Requirement Level: Optional - // Stability: experimental - // Examples: 443 - AttributeURLPort = "url.port" - // The URI query component - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'q=OpenTelemetry' - // Note: Sensitive content provided in url.query SHOULD be scrubbed when - // instrumentations can identify it. - AttributeURLQuery = "url.query" - // The highest registered url domain, stripped of the subdomain. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'example.com', 'foo.co.uk' - // Note: This value can be determined precisely with the public suffix list. For - // example, the registered domain for foo.example.com is example.com. Trying to - // approximate this by simply taking the last two labels will not work well for - // TLDs such as co.uk. - AttributeURLRegisteredDomain = "url.registered_domain" - // The URI scheme component identifying the used protocol. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'https', 'ftp', 'telnet' - AttributeURLScheme = "url.scheme" - // The subdomain portion of a fully qualified domain name includes all of the - // names except the host name under the registered_domain. In a partially - // qualified domain, or if the qualification level of the full name cannot be - // determined, subdomain contains all of the names below the registered domain. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'east', 'sub2.sub1' - // Note: The subdomain portion of www.east.mydomain.co.uk is east. If the domain - // has multiple levels of subdomain, such as sub2.sub1.example.com, the subdomain - // field should contain sub2.sub1, with no trailing period. - AttributeURLSubdomain = "url.subdomain" - // The low-cardinality template of an absolute path reference. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '/users/{id}', '/users/:id', '/users?id={id}' - AttributeURLTemplate = "url.template" - // The effective top level domain (eTLD), also known as the domain suffix, is the - // last part of the domain name. For example, the top level domain for example.com - // is com. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'com', 'co.uk' - // Note: This value can be determined precisely with the public suffix list. - AttributeURLTopLevelDomain = "url.top_level_domain" -) - -// Describes user-agent attributes. -const ( - // Name of the user-agent extracted from original. Usually refers to the browser's - // name. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Safari', 'YourApp' - // Note: Example of extracting browser's name from original string. In the case of - // using a user-agent for non-browser products, such as microservices with - // multiple names/versions inside the user_agent.original, the most significant - // name SHOULD be selected. In such a scenario it should align with - // user_agent.version - AttributeUserAgentName = "user_agent.name" - // Value of the HTTP User-Agent header sent by the client. - // - // Type: string - // Requirement Level: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU iPhone - // OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) - // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 grpc-java- - // okhttp/1.27.2' - AttributeUserAgentOriginal = "user_agent.original" - // Version of the user-agent extracted from original. Usually refers to the - // browser's version - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '14.1.2', '1.0.0' - // Note: Example of extracting browser's version from original string. In the case - // of using a user-agent for non-browser products, such as microservices with - // multiple names/versions inside the user_agent.original, the most significant - // version SHOULD be selected. In such a scenario it should align with - // user_agent.name - AttributeUserAgentVersion = "user_agent.version" -) - -// Describes information about the user. -const ( - // User email address. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'a.einstein@example.com' - AttributeUserEmail = "user.email" - // User's full name - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Albert Einstein' - AttributeUserFullName = "user.full_name" - // Unique user hash to correlate information for a user in anonymized form. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '364fc68eaf4c8acec74a4e52d7d1feaa' - // Note: Useful if user.id or user.name contain confidential information and - // cannot be used. - AttributeUserHash = "user.hash" - // Unique identifier of the user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'S-1-5-21-202424912787-2692429404-2351956786-1000' - AttributeUserID = "user.id" - // Short name or login/username of the user. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'a.einstein' - AttributeUserName = "user.name" - // Array of user roles at the time of the event. - // - // Type: string[] - // Requirement Level: Optional - // Stability: experimental - // Examples: 'admin', 'reporting_user' - AttributeUserRoles = "user.roles" -) - -// Describes V8 JS Engine Runtime related attributes. -const ( - // The type of garbage collection. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - AttributeV8jsGcType = "v8js.gc.type" - // The name of the space type of heap memory. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Note: Value can be retrieved from value space_name of - // v8.getHeapSpaceStatistics() - AttributeV8jsHeapSpaceName = "v8js.heap.space.name" -) - -const ( - // Major (Mark Sweep Compact) - AttributeV8jsGcTypeMajor = "major" - // Minor (Scavenge) - AttributeV8jsGcTypeMinor = "minor" - // Incremental (Incremental Marking) - AttributeV8jsGcTypeIncremental = "incremental" - // Weak Callbacks (Process Weak Callbacks) - AttributeV8jsGcTypeWeakcb = "weakcb" -) - -const ( - // New memory space - AttributeV8jsHeapSpaceNameNewSpace = "new_space" - // Old memory space - AttributeV8jsHeapSpaceNameOldSpace = "old_space" - // Code memory space - AttributeV8jsHeapSpaceNameCodeSpace = "code_space" - // Map memory space - AttributeV8jsHeapSpaceNameMapSpace = "map_space" - // Large object memory space - AttributeV8jsHeapSpaceNameLargeObjectSpace = "large_object_space" -) - -// This group defines the attributes for [Version Control Systems -// (VCS)](https://en.wikipedia.org/wiki/Version_control). -const ( - // The ID of the change (pull request/merge request) if applicable. This is - // usually a unique (within repository) identifier generated by the VCS system. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '123' - AttributeVcsRepositoryChangeID = "vcs.repository.change.id" - // The human readable title of the change (pull request/merge request). This title - // is often a brief summary of the change and may get merged in to a ref as the - // commit summary. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'Fixes broken thing', 'feat: add my new feature', '[chore] update - // dependency' - AttributeVcsRepositoryChangeTitle = "vcs.repository.change.title" - // The name of the reference such as branch or tag in the repository. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'my-feature-branch', 'tag-1-test' - AttributeVcsRepositoryRefName = "vcs.repository.ref.name" - // The revision, literally revised version, The revision most often refers to a - // commit object in Git, or a revision number in SVN. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc', - // 'main', '123', 'HEAD' - // Note: The revision can be a full hash value (see glossary), - // of the recorded change to a ref within a repository pointing to a - // commit commit object. It does - // not necessarily have to be a hash; it can simply define a - // revision number - // which is an integer that is monotonically increasing. In cases where - // it is identical to the ref.name, it SHOULD still be included. It is - // up to the implementer to decide which value to set as the revision - // based on the VCS system and situational context. - AttributeVcsRepositoryRefRevision = "vcs.repository.ref.revision" - // The type of the reference in the repository. - // - // Type: Enum - // Requirement Level: Optional - // Stability: experimental - // Examples: 'branch', 'tag' - AttributeVcsRepositoryRefType = "vcs.repository.ref.type" - // The URL of the repository providing the complete address in order to locate and - // identify the repository. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'https://github.com/opentelemetry/open-telemetry-collector-contrib', - // 'https://gitlab.com/my-org/my-project/my-projects-project/repo' - AttributeVcsRepositoryURLFull = "vcs.repository.url.full" -) - -const ( - // [branch](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch) - AttributeVcsRepositoryRefTypeBranch = "branch" - // [tag](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag) - AttributeVcsRepositoryRefTypeTag = "tag" -) - -// The attributes used to describe the packaged software running the -// application code. -const ( - // Additional description of the web engine (e.g. detailed version and edition - // information). - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' - AttributeWebEngineDescription = "webengine.description" - // The name of the web engine. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: 'WildFly' - AttributeWebEngineName = "webengine.name" - // The version of the web engine. - // - // Type: string - // Requirement Level: Optional - // Stability: experimental - // Examples: '21.0.0' - AttributeWebEngineVersion = "webengine.version" -) - -func GetAttribute_groupSemanticConventionAttributeNames() []string { - return []string{ - AttributeAndroidOSAPILevel, - AttributeArtifactAttestationFilename, - AttributeArtifactAttestationHash, - AttributeArtifactAttestationID, - AttributeArtifactFilename, - AttributeArtifactHash, - AttributeArtifactPurl, - AttributeArtifactVersion, - AttributeAspnetcoreRateLimitingResult, - AttributeAspnetcoreDiagnosticsHandlerType, - AttributeAspnetcoreDiagnosticsExceptionResult, - AttributeAspnetcoreRateLimitingPolicy, - AttributeAspnetcoreRequestIsUnhandled, - AttributeAspnetcoreRoutingIsFallback, - AttributeAspnetcoreRoutingMatchStatus, - AttributeAWSRequestID, - AttributeAWSDynamoDBAttributeDefinitions, - AttributeAWSDynamoDBAttributesToGet, - AttributeAWSDynamoDBConsistentRead, - AttributeAWSDynamoDBConsumedCapacity, - AttributeAWSDynamoDBCount, - AttributeAWSDynamoDBExclusiveStartTable, - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, - AttributeAWSDynamoDBGlobalSecondaryIndexes, - AttributeAWSDynamoDBIndexName, - AttributeAWSDynamoDBItemCollectionMetrics, - AttributeAWSDynamoDBLimit, - AttributeAWSDynamoDBLocalSecondaryIndexes, - AttributeAWSDynamoDBProjection, - AttributeAWSDynamoDBProvisionedReadCapacity, - AttributeAWSDynamoDBProvisionedWriteCapacity, - AttributeAWSDynamoDBScanForward, - AttributeAWSDynamoDBScannedCount, - AttributeAWSDynamoDBSegment, - AttributeAWSDynamoDBSelect, - AttributeAWSDynamoDBTableCount, - AttributeAWSDynamoDBTableNames, - AttributeAWSDynamoDBTotalSegments, - AttributeAWSECSTaskID, - AttributeAWSECSClusterARN, - AttributeAWSECSContainerARN, - AttributeAWSECSLaunchtype, - AttributeAWSECSTaskARN, - AttributeAWSECSTaskFamily, - AttributeAWSECSTaskRevision, - AttributeAWSEKSClusterARN, - AttributeAWSLogGroupARNs, - AttributeAWSLogGroupNames, - AttributeAWSLogStreamARNs, - AttributeAWSLogStreamNames, - AttributeAWSLambdaInvokedARN, - AttributeAWSS3Bucket, - AttributeAWSS3CopySource, - AttributeAWSS3Delete, - AttributeAWSS3Key, - AttributeAWSS3PartNumber, - AttributeAWSS3UploadID, - AttributeAzServiceRequestID, - AttributeBrowserBrands, - AttributeBrowserLanguage, - AttributeBrowserMobile, - AttributeBrowserPlatform, - AttributeCicdPipelineName, - AttributeCicdPipelineRunID, - AttributeCicdPipelineTaskName, - AttributeCicdPipelineTaskRunID, - AttributeCicdPipelineTaskRunURLFull, - AttributeCicdPipelineTaskType, - AttributeClientAddress, - AttributeClientPort, - AttributeCloudAccountID, - AttributeCloudAvailabilityZone, - AttributeCloudPlatform, - AttributeCloudProvider, - AttributeCloudRegion, - AttributeCloudResourceID, - AttributeCloudeventsEventID, - AttributeCloudeventsEventSource, - AttributeCloudeventsEventSpecVersion, - AttributeCloudeventsEventSubject, - AttributeCloudeventsEventType, - AttributeCodeColumn, - AttributeCodeFilepath, - AttributeCodeFunction, - AttributeCodeLineNumber, - AttributeCodeNamespace, - AttributeCodeStacktrace, - AttributeContainerCommand, - AttributeContainerCommandArgs, - AttributeContainerCommandLine, - AttributeContainerID, - AttributeContainerImageID, - AttributeContainerImageName, - AttributeContainerImageRepoDigests, - AttributeContainerImageTags, - AttributeContainerName, - AttributeContainerRuntime, - AttributeCPUMode, - AttributeDBClientConnectionPoolName, - AttributeDBClientConnectionState, - AttributeDBCollectionName, - AttributeDBNamespace, - AttributeDBOperationBatchSize, - AttributeDBOperationName, - AttributeDBQueryText, - AttributeDBSystem, - AttributeDBCassandraConsistencyLevel, - AttributeDBCassandraCoordinatorDC, - AttributeDBCassandraCoordinatorID, - AttributeDBCassandraIdempotence, - AttributeDBCassandraPageSize, - AttributeDBCassandraSpeculativeExecutionCount, - AttributeDBCosmosDBClientID, - AttributeDBCosmosDBConnectionMode, - AttributeDBCosmosDBOperationType, - AttributeDBCosmosDBRequestCharge, - AttributeDBCosmosDBRequestContentLength, - AttributeDBCosmosDBStatusCode, - AttributeDBCosmosDBSubStatusCode, - AttributeDBElasticsearchNodeName, - AttributeDeploymentEnvironmentName, - AttributeDeploymentID, - AttributeDeploymentName, - AttributeDeploymentStatus, - AttributeAndroidState, - AttributeDestinationAddress, - AttributeDestinationPort, - AttributeDeviceID, - AttributeDeviceManufacturer, - AttributeDeviceModelIdentifier, - AttributeDeviceModelName, - AttributeDiskIoDirection, - AttributeDNSQuestionName, - AttributeErrorType, - AttributeEventName, - AttributeExceptionEscaped, - AttributeExceptionMessage, - AttributeExceptionStacktrace, - AttributeExceptionType, - AttributeFaaSColdstart, - AttributeFaaSCron, - AttributeFaaSDocumentCollection, - AttributeFaaSDocumentName, - AttributeFaaSDocumentOperation, - AttributeFaaSDocumentTime, - AttributeFaaSInstance, - AttributeFaaSInvocationID, - AttributeFaaSInvokedName, - AttributeFaaSInvokedProvider, - AttributeFaaSInvokedRegion, - AttributeFaaSMaxMemory, - AttributeFaaSName, - AttributeFaaSTime, - AttributeFaaSTrigger, - AttributeFaaSVersion, - AttributeFeatureFlagKey, - AttributeFeatureFlagProviderName, - AttributeFeatureFlagVariant, - AttributeFileDirectory, - AttributeFileExtension, - AttributeFileName, - AttributeFilePath, - AttributeFileSize, - AttributeGCPClientService, - AttributeGCPCloudRunJobExecution, - AttributeGCPCloudRunJobTaskIndex, - AttributeGCPGceInstanceHostname, - AttributeGCPGceInstanceName, - AttributeGenAiCompletion, - AttributeGenAiOperationName, - AttributeGenAiPrompt, - AttributeGenAiRequestFrequencyPenalty, - AttributeGenAiRequestMaxTokens, - AttributeGenAiRequestModel, - AttributeGenAiRequestPresencePenalty, - AttributeGenAiRequestStopSequences, - AttributeGenAiRequestTemperature, - AttributeGenAiRequestTopK, - AttributeGenAiRequestTopP, - AttributeGenAiResponseFinishReasons, - AttributeGenAiResponseID, - AttributeGenAiResponseModel, - AttributeGenAiSystem, - AttributeGenAiTokenType, - AttributeGenAiUsageInputTokens, - AttributeGenAiUsageOutputTokens, - AttributeGoMemoryType, - AttributeGraphqlDocument, - AttributeGraphqlOperationName, - AttributeGraphqlOperationType, - AttributeHerokuAppID, - AttributeHerokuReleaseCommit, - AttributeHerokuReleaseCreationTimestamp, - AttributeHostArch, - AttributeHostCPUCacheL2Size, - AttributeHostCPUFamily, - AttributeHostCPUModelID, - AttributeHostCPUModelName, - AttributeHostCPUStepping, - AttributeHostCPUVendorID, - AttributeHostID, - AttributeHostImageID, - AttributeHostImageName, - AttributeHostImageVersion, - AttributeHostIP, - AttributeHostMac, - AttributeHostName, - AttributeHostType, - AttributeHTTPConnectionState, - AttributeHTTPRequestBodySize, - AttributeHTTPRequestMethod, - AttributeHTTPRequestMethodOriginal, - AttributeHTTPRequestResendCount, - AttributeHTTPRequestSize, - AttributeHTTPResponseBodySize, - AttributeHTTPResponseSize, - AttributeHTTPResponseStatusCode, - AttributeHTTPRoute, - AttributeJvmBufferPoolName, - AttributeJvmGcAction, - AttributeJvmGcName, - AttributeJvmMemoryPoolName, - AttributeJvmMemoryType, - AttributeJvmThreadDaemon, - AttributeJvmThreadState, - AttributeK8SClusterName, - AttributeK8SClusterUID, - AttributeK8SContainerName, - AttributeK8SContainerRestartCount, - AttributeK8SContainerStatusLastTerminatedReason, - AttributeK8SCronJobName, - AttributeK8SCronJobUID, - AttributeK8SDaemonSetName, - AttributeK8SDaemonSetUID, - AttributeK8SDeploymentName, - AttributeK8SDeploymentUID, - AttributeK8SJobName, - AttributeK8SJobUID, - AttributeK8SNamespaceName, - AttributeK8SNodeName, - AttributeK8SNodeUID, - AttributeK8SPodName, - AttributeK8SPodUID, - AttributeK8SReplicaSetName, - AttributeK8SReplicaSetUID, - AttributeK8SStatefulSetName, - AttributeK8SStatefulSetUID, - AttributeLinuxMemorySlabState, - AttributeLogIostream, - AttributeLogFileName, - AttributeLogFileNameResolved, - AttributeLogFilePath, - AttributeLogFilePathResolved, - AttributeLogRecordOriginal, - AttributeLogRecordUID, - AttributeMessagingBatchMessageCount, - AttributeMessagingClientID, - AttributeMessagingConsumerGroupName, - AttributeMessagingDestinationAnonymous, - AttributeMessagingDestinationName, - AttributeMessagingDestinationPartitionID, - AttributeMessagingDestinationSubscriptionName, - AttributeMessagingDestinationTemplate, - AttributeMessagingDestinationTemporary, - AttributeMessagingMessageBodySize, - AttributeMessagingMessageConversationID, - AttributeMessagingMessageEnvelopeSize, - AttributeMessagingMessageID, - AttributeMessagingOperationName, - AttributeMessagingOperationType, - AttributeMessagingSystem, - AttributeMessagingKafkaMessageKey, - AttributeMessagingKafkaMessageTombstone, - AttributeMessagingKafkaOffset, - AttributeMessagingRabbitmqDestinationRoutingKey, - AttributeMessagingRabbitmqMessageDeliveryTag, - AttributeMessagingRocketmqConsumptionModel, - AttributeMessagingRocketmqMessageDelayTimeLevel, - AttributeMessagingRocketmqMessageDeliveryTimestamp, - AttributeMessagingRocketmqMessageGroup, - AttributeMessagingRocketmqMessageKeys, - AttributeMessagingRocketmqMessageTag, - AttributeMessagingRocketmqMessageType, - AttributeMessagingRocketmqNamespace, - AttributeMessagingGCPPubsubMessageAckDeadline, - AttributeMessagingGCPPubsubMessageAckID, - AttributeMessagingGCPPubsubMessageDeliveryAttempt, - AttributeMessagingGCPPubsubMessageOrderingKey, - AttributeMessagingServicebusDispositionStatus, - AttributeMessagingServicebusMessageDeliveryCount, - AttributeMessagingServicebusMessageEnqueuedTime, - AttributeMessagingEventhubsMessageEnqueuedTime, - AttributeNetworkCarrierIcc, - AttributeNetworkCarrierMcc, - AttributeNetworkCarrierMnc, - AttributeNetworkCarrierName, - AttributeNetworkConnectionSubtype, - AttributeNetworkConnectionType, - AttributeNetworkIoDirection, - AttributeNetworkLocalAddress, - AttributeNetworkLocalPort, - AttributeNetworkPeerAddress, - AttributeNetworkPeerPort, - AttributeNetworkProtocolName, - AttributeNetworkProtocolVersion, - AttributeNetworkTransport, - AttributeNetworkType, - AttributeOciManifestDigest, - AttributeOpentracingRefType, - AttributeOSBuildID, - AttributeOSDescription, - AttributeOSName, - AttributeOSType, - AttributeOSVersion, - AttributeOTelStatusCode, - AttributeOTelStatusDescription, - AttributeOTelScopeName, - AttributeOTelScopeVersion, - AttributePeerService, - AttributeProcessCommand, - AttributeProcessCommandArgs, - AttributeProcessCommandLine, - AttributeProcessContextSwitchType, - AttributeProcessCreationTime, - AttributeProcessExecutableName, - AttributeProcessExecutablePath, - AttributeProcessExitCode, - AttributeProcessExitTime, - AttributeProcessGroupLeaderPID, - AttributeProcessInteractive, - AttributeProcessOwner, - AttributeProcessPagingFaultType, - AttributeProcessParentPID, - AttributeProcessPID, - AttributeProcessRealUserID, - AttributeProcessRealUserName, - AttributeProcessRuntimeDescription, - AttributeProcessRuntimeName, - AttributeProcessRuntimeVersion, - AttributeProcessSavedUserID, - AttributeProcessSavedUserName, - AttributeProcessSessionLeaderPID, - AttributeProcessUserID, - AttributeProcessUserName, - AttributeProcessVpid, - AttributeRPCConnectRPCErrorCode, - AttributeRPCGRPCStatusCode, - AttributeRPCJsonrpcErrorCode, - AttributeRPCJsonrpcErrorMessage, - AttributeRPCJsonrpcRequestID, - AttributeRPCJsonrpcVersion, - AttributeRPCMessageCompressedSize, - AttributeRPCMessageID, - AttributeRPCMessageType, - AttributeRPCMessageUncompressedSize, - AttributeRPCMethod, - AttributeRPCService, - AttributeRPCSystem, - AttributeServerAddress, - AttributeServerPort, - AttributeServiceInstanceID, - AttributeServiceName, - AttributeServiceNamespace, - AttributeServiceVersion, - AttributeSessionID, - AttributeSessionPreviousID, - AttributeSignalrConnectionStatus, - AttributeSignalrTransport, - AttributeSourceAddress, - AttributeSourcePort, - AttributeSystemDevice, - AttributeSystemCPULogicalNumber, - AttributeSystemMemoryState, - AttributeSystemPagingDirection, - AttributeSystemPagingState, - AttributeSystemPagingType, - AttributeSystemFilesystemMode, - AttributeSystemFilesystemMountpoint, - AttributeSystemFilesystemState, - AttributeSystemFilesystemType, - AttributeSystemNetworkState, - AttributeSystemProcessStatus, - AttributeTelemetrySDKLanguage, - AttributeTelemetrySDKName, - AttributeTelemetrySDKVersion, - AttributeTelemetryDistroName, - AttributeTelemetryDistroVersion, - AttributeTestCaseName, - AttributeTestCaseResultStatus, - AttributeTestSuiteName, - AttributeTestSuiteRunStatus, - AttributeThreadID, - AttributeThreadName, - AttributeTLSCipher, - AttributeTLSClientCertificate, - AttributeTLSClientCertificateChain, - AttributeTLSClientHashMd5, - AttributeTLSClientHashSha1, - AttributeTLSClientHashSha256, - AttributeTLSClientIssuer, - AttributeTLSClientJa3, - AttributeTLSClientNotAfter, - AttributeTLSClientNotBefore, - AttributeTLSClientSubject, - AttributeTLSClientSupportedCiphers, - AttributeTLSCurve, - AttributeTLSEstablished, - AttributeTLSNextProtocol, - AttributeTLSProtocolName, - AttributeTLSProtocolVersion, - AttributeTLSResumed, - AttributeTLSServerCertificate, - AttributeTLSServerCertificateChain, - AttributeTLSServerHashMd5, - AttributeTLSServerHashSha1, - AttributeTLSServerHashSha256, - AttributeTLSServerIssuer, - AttributeTLSServerJa3s, - AttributeTLSServerNotAfter, - AttributeTLSServerNotBefore, - AttributeTLSServerSubject, - AttributeURLDomain, - AttributeURLExtension, - AttributeURLFragment, - AttributeURLFull, - AttributeURLOriginal, - AttributeURLPath, - AttributeURLPort, - AttributeURLQuery, - AttributeURLRegisteredDomain, - AttributeURLScheme, - AttributeURLSubdomain, - AttributeURLTemplate, - AttributeURLTopLevelDomain, - AttributeUserAgentName, - AttributeUserAgentOriginal, - AttributeUserAgentVersion, - AttributeUserEmail, - AttributeUserFullName, - AttributeUserHash, - AttributeUserID, - AttributeUserName, - AttributeUserRoles, - AttributeV8jsGcType, - AttributeV8jsHeapSpaceName, - AttributeVcsRepositoryChangeID, - AttributeVcsRepositoryChangeTitle, - AttributeVcsRepositoryRefName, - AttributeVcsRepositoryRefRevision, - AttributeVcsRepositoryRefType, - AttributeVcsRepositoryURLFull, - AttributeWebEngineDescription, - AttributeWebEngineName, - AttributeWebEngineVersion, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_event.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_event.go deleted file mode 100644 index ac6893c3b2..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_event.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetEventSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_resource.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_resource.go deleted file mode 100644 index bb89e4806f..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_resource.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetResourceSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_trace.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_trace.go deleted file mode 100644 index 380529563a..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/generated_trace.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv - -func GetTraceSemanticConventionAttributeNames() []string { - return []string{} -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/schema.go b/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/schema.go deleted file mode 100644 index be4e3241f2..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.27.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.27.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.27.0" diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_resource.go b/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_resource.go deleted file mode 100644 index 801970ec37..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_resource.go +++ /dev/null @@ -1,991 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.6.1" - -// A cloud environment (e.g. GCP, Azure, AWS) -const ( - // Name of the cloud provider. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeCloudProvider = "cloud.provider" - // The cloud account ID the resource is assigned to. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '111111111111', 'opentelemetry' - AttributeCloudAccountID = "cloud.account.id" - // The geographical region the resource is running. Refer to your provider's docs - // to see the available regions, for example Alibaba Cloud regions, AWS regions, - // Azure regions, or Google Cloud regions. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'us-central1', 'us-east-1' - AttributeCloudRegion = "cloud.region" - // Cloud regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the resource - // is running. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and - // Google Cloud. - AttributeCloudAvailabilityZone = "cloud.availability_zone" - // The cloud platform in use. - // - // Type: Enum - // Required: No - // Stability: stable - // Note: The prefix of the service SHOULD match the one specified in - // cloud.provider. - AttributeCloudPlatform = "cloud.platform" -) - -const ( - // Alibaba Cloud - AttributeCloudProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeCloudProviderAWS = "aws" - // Microsoft Azure - AttributeCloudProviderAzure = "azure" - // Google Cloud Platform - AttributeCloudProviderGCP = "gcp" -) - -const ( - // Alibaba Cloud Elastic Compute Service - AttributeCloudPlatformAlibabaCloudECS = "alibaba_cloud_ecs" - // Alibaba Cloud Function Compute - AttributeCloudPlatformAlibabaCloudFc = "alibaba_cloud_fc" - // AWS Elastic Compute Cloud - AttributeCloudPlatformAWSEC2 = "aws_ec2" - // AWS Elastic Container Service - AttributeCloudPlatformAWSECS = "aws_ecs" - // AWS Elastic Kubernetes Service - AttributeCloudPlatformAWSEKS = "aws_eks" - // AWS Lambda - AttributeCloudPlatformAWSLambda = "aws_lambda" - // AWS Elastic Beanstalk - AttributeCloudPlatformAWSElasticBeanstalk = "aws_elastic_beanstalk" - // Azure Virtual Machines - AttributeCloudPlatformAzureVM = "azure_vm" - // Azure Container Instances - AttributeCloudPlatformAzureContainerInstances = "azure_container_instances" - // Azure Kubernetes Service - AttributeCloudPlatformAzureAKS = "azure_aks" - // Azure Functions - AttributeCloudPlatformAzureFunctions = "azure_functions" - // Azure App Service - AttributeCloudPlatformAzureAppService = "azure_app_service" - // Google Cloud Compute Engine (GCE) - AttributeCloudPlatformGCPComputeEngine = "gcp_compute_engine" - // Google Cloud Run - AttributeCloudPlatformGCPCloudRun = "gcp_cloud_run" - // Google Cloud Kubernetes Engine (GKE) - AttributeCloudPlatformGCPKubernetesEngine = "gcp_kubernetes_engine" - // Google Cloud Functions (GCF) - AttributeCloudPlatformGCPCloudFunctions = "gcp_cloud_functions" - // Google Cloud App Engine (GAE) - AttributeCloudPlatformGCPAppEngine = "gcp_app_engine" -) - -// Resources used by AWS Elastic Container Service (ECS). -const ( - // The Amazon Resource Name (ARN) of an ECS container instance. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AttributeAWSECSContainerARN = "aws.ecs.container.arn" - // The ARN of an ECS cluster. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSECSClusterARN = "aws.ecs.cluster.arn" - // The launch type for an ECS task. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeAWSECSLaunchtype = "aws.ecs.launchtype" - // The ARN of an ECS task definition. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:ecs:us- - // west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSECSTaskARN = "aws.ecs.task.arn" - // The task definition family this task definition is a member of. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-family' - AttributeAWSECSTaskFamily = "aws.ecs.task.family" - // The revision for this task definition. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '8', '26' - AttributeAWSECSTaskRevision = "aws.ecs.task.revision" -) - -const ( - // ec2 - AttributeAWSECSLaunchtypeEC2 = "ec2" - // fargate - AttributeAWSECSLaunchtypeFargate = "fargate" -) - -// Resources used by AWS Elastic Kubernetes Service (EKS). -const ( - // The ARN of an EKS cluster. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AttributeAWSEKSClusterARN = "aws.eks.cluster.arn" -) - -// Resources specific to Amazon Web Services. -const ( - // The name(s) of the AWS log group(s) an application is writing to. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like multi-container - // applications, where a single application has sidecar containers, and each write - // to their own log group. - AttributeAWSLogGroupNames = "aws.log.group.names" - // The Amazon Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the log group ARN format documentation. - AttributeAWSLogGroupARNs = "aws.log.group.arns" - // The name(s) of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AttributeAWSLogStreamNames = "aws.log.stream.names" - // The ARN(s) of the AWS log stream(s). - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log- - // stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the log stream ARN format documentation. One log group can contain - // several log streams, so these ARNs necessarily identify both a log group and a - // log stream. - AttributeAWSLogStreamARNs = "aws.log.stream.arns" -) - -// A container instance. -const ( - // Container name. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-autoconf' - AttributeContainerName = "container.name" - // Container ID. Usually a UUID, as for example used to identify Docker - // containers. The UUID might be abbreviated. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'a3bf90e006b2' - AttributeContainerID = "container.id" - // The container runtime managing this container. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'docker', 'containerd', 'rkt' - AttributeContainerRuntime = "container.runtime" - // Name of the image the container was built on. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'gcr.io/opentelemetry/operator' - AttributeContainerImageName = "container.image.name" - // Container image tag. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '0.1' - AttributeContainerImageTag = "container.image.tag" -) - -// The software deployment. -const ( - // Name of the deployment environment (aka deployment tier). - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'staging', 'production' - AttributeDeploymentEnvironment = "deployment.environment" -) - -// The device on which the process represented by this resource is running. -const ( - // A unique identifier representing the device - // - // Type: string - // Required: No - // Stability: stable - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values outlined - // below. This value is not an advertising identifier and MUST NOT be used as - // such. On iOS (Swift or Objective-C), this value MUST be equal to the vendor - // identifier. On Android (Java or Kotlin), this value MUST be equal to the - // Firebase Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found here on best - // practices and exact implementation details. Caution should be taken when - // storing personal data or anything which can identify a user. GDPR and data - // protection laws may apply, ensure you do your own due diligence. - AttributeDeviceID = "device.id" - // The model identifier for the device - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine readable version of the - // model identifier rather than the market or consumer-friendly name of the - // device. - AttributeDeviceModelIdentifier = "device.model.identifier" - // The marketing name for the device model - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human readable version of the - // device model rather than a machine readable alternative. - AttributeDeviceModelName = "device.model.name" -) - -// A serverless instance. -const ( - // The name of the single function that this runtime instance executes. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'my-function' - // Note: This is the name of the function as configured/deployed on the FaaS - // platform and is usually different from the name of the callback function (which - // may be stored in the code.namespace/code.function span attributes). - AttributeFaaSName = "faas.name" - // The unique ID of the single function that this runtime instance executes. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:lambda:us-west-2:123456789012:function:my-function' - // Note: Depending on the cloud provider, use:
      - //
    • AWS Lambda: The function ARN.
    • - //
    - // Take care not to use the "invoked ARN" directly but replace any - // alias suffix with the resolved function version, as the same runtime instance - // may be invocable with multiple - // different aliases.
      - //
    • GCP: The URI of the resource
    • - //
    • Azure: The Fully Qualified Resource ID.
    • - //
    - // On some providers, it may not be possible to determine the full ID at startup, - // which is why this field cannot be made required. For example, on AWS the - // account ID - // part of the ARN is not available without calling another AWS API - // which may be deemed too slow for a short-running lambda function. - // As an alternative, consider setting faas.id as a span attribute instead. - AttributeFaaSID = "faas.id" - // The immutable version of the function being executed. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use:
      - //
    • AWS Lambda: The function version - // (an integer represented as a decimal string).
    • - //
    • Google Cloud Run: The revision - // (i.e., the function name plus the revision suffix).
    • - //
    • Google Cloud Functions: The value of the - // K_REVISION environment variable.
    • - //
    • Azure Functions: Not applicable. Do not set this attribute.
    • - //
    - AttributeFaaSVersion = "faas.version" - // The execution environment ID as a string, that will be potentially reused for - // other invocations to the same function/function version. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note:
      - //
    • AWS Lambda: Use the (full) log stream name.
    • - //
    - AttributeFaaSInstance = "faas.instance" - // The amount of memory available to the serverless function in MiB. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 128 - // Note: It's recommended to set this attribute since e.g. too little memory can - // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, - // the environment variable AWS_LAMBDA_FUNCTION_MEMORY_SIZE provides this - // information. - AttributeFaaSMaxMemory = "faas.max_memory" -) - -// A host is defined as a general computing instance. -const ( - // Unique host ID. For Cloud, this must be the instance_id assigned by the cloud - // provider. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-test' - AttributeHostID = "host.id" - // Name of the host. On Unix systems, it may contain what the hostname command - // returns, or the fully qualified hostname, or another name specified by the - // user. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-test' - AttributeHostName = "host.name" - // Type of host. For Cloud, this must be the machine type. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'n1-standard-1' - AttributeHostType = "host.type" - // The CPU architecture the host system is running on. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeHostArch = "host.arch" - // Name of the VM image or OS install the host was instantiated from. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - AttributeHostImageName = "host.image.name" - // VM image ID. For Cloud, this value is from the provider. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'ami-07b06b442921831e5' - AttributeHostImageID = "host.image.id" - // The version string of the VM image as defined in Version Attributes. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '0.1' - AttributeHostImageVersion = "host.image.version" -) - -const ( - // AMD64 - AttributeHostArchAMD64 = "amd64" - // ARM32 - AttributeHostArchARM32 = "arm32" - // ARM64 - AttributeHostArchARM64 = "arm64" - // Itanium - AttributeHostArchIA64 = "ia64" - // 32-bit PowerPC - AttributeHostArchPPC32 = "ppc32" - // 64-bit PowerPC - AttributeHostArchPPC64 = "ppc64" - // 32-bit x86 - AttributeHostArchX86 = "x86" -) - -// A Kubernetes Cluster. -const ( - // The name of the cluster. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-cluster' - AttributeK8SClusterName = "k8s.cluster.name" -) - -// A Kubernetes Node object. -const ( - // The name of the Node. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'node-1' - AttributeK8SNodeName = "k8s.node.name" - // The UID of the Node. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - AttributeK8SNodeUID = "k8s.node.uid" -) - -// A Kubernetes Namespace. -const ( - // The name of the namespace that the pod is running in. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'default' - AttributeK8SNamespaceName = "k8s.namespace.name" -) - -// A Kubernetes Pod object. -const ( - // The UID of the Pod. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SPodUID = "k8s.pod.uid" - // The name of the Pod. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry-pod-autoconf' - AttributeK8SPodName = "k8s.pod.name" -) - -// A container in a [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -const ( - // The name of the Container in a Pod template. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'redis' - AttributeK8SContainerName = "k8s.container.name" -) - -// A Kubernetes ReplicaSet object. -const ( - // The UID of the ReplicaSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SReplicaSetUID = "k8s.replicaset.uid" - // The name of the ReplicaSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SReplicaSetName = "k8s.replicaset.name" -) - -// A Kubernetes Deployment object. -const ( - // The UID of the Deployment. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDeploymentUID = "k8s.deployment.uid" - // The name of the Deployment. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SDeploymentName = "k8s.deployment.name" -) - -// A Kubernetes StatefulSet object. -const ( - // The UID of the StatefulSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SStatefulSetUID = "k8s.statefulset.uid" - // The name of the StatefulSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SStatefulSetName = "k8s.statefulset.name" -) - -// A Kubernetes DaemonSet object. -const ( - // The UID of the DaemonSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SDaemonSetUID = "k8s.daemonset.uid" - // The name of the DaemonSet. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SDaemonSetName = "k8s.daemonset.name" -) - -// A Kubernetes Job object. -const ( - // The UID of the Job. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SJobUID = "k8s.job.uid" - // The name of the Job. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SJobName = "k8s.job.name" -) - -// A Kubernetes CronJob object. -const ( - // The UID of the CronJob. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - AttributeK8SCronJobUID = "k8s.cronjob.uid" - // The name of the CronJob. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeK8SCronJobName = "k8s.cronjob.name" -) - -// The operating system (OS) on which the process represented by this resource is running. -const ( - // The operating system type. - // - // Type: Enum - // Required: Always - // Stability: stable - AttributeOSType = "os.type" - // Human readable (not intended to be parsed) OS version information, like e.g. - // reported by ver or lsb_release -a commands. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 LTS' - AttributeOSDescription = "os.description" - // Human readable operating system name. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'iOS', 'Android', 'Ubuntu' - AttributeOSName = "os.name" - // The version string of the operating system as defined in Version Attributes. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '14.2.1', '18.04.1' - AttributeOSVersion = "os.version" -) - -const ( - // Microsoft Windows - AttributeOSTypeWindows = "windows" - // Linux - AttributeOSTypeLinux = "linux" - // Apple Darwin - AttributeOSTypeDarwin = "darwin" - // FreeBSD - AttributeOSTypeFreeBSD = "freebsd" - // NetBSD - AttributeOSTypeNetBSD = "netbsd" - // OpenBSD - AttributeOSTypeOpenBSD = "openbsd" - // DragonFly BSD - AttributeOSTypeDragonflyBSD = "dragonflybsd" - // HP-UX (Hewlett Packard Unix) - AttributeOSTypeHPUX = "hpux" - // AIX (Advanced Interactive eXecutive) - AttributeOSTypeAIX = "aix" - // Oracle Solaris - AttributeOSTypeSolaris = "solaris" - // IBM z/OS - AttributeOSTypeZOS = "z_os" -) - -// An operating system process. -const ( - // Process identifier (PID). - // - // Type: int - // Required: No - // Stability: stable - // Examples: 1234 - AttributeProcessPID = "process.pid" - // The name of the process executable. On Linux based systems, can be set to the - // Name in proc/[pid]/status. On Windows, can be set to the base name of - // GetProcessImageFileNameW. - // - // Type: string - // Required: See below - // Stability: stable - // Examples: 'otelcol' - AttributeProcessExecutableName = "process.executable.name" - // The full path to the process executable. On Linux based systems, can be set to - // the target of proc/[pid]/exe. On Windows, can be set to the result of - // GetProcessImageFileNameW. - // - // Type: string - // Required: See below - // Stability: stable - // Examples: '/usr/bin/cmd/otelcol' - AttributeProcessExecutablePath = "process.executable.path" - // The command used to launch the process (i.e. the command name). On Linux based - // systems, can be set to the zeroth string in proc/[pid]/cmdline. On Windows, can - // be set to the first parameter extracted from GetCommandLineW. - // - // Type: string - // Required: See below - // Stability: stable - // Examples: 'cmd/otelcol' - AttributeProcessCommand = "process.command" - // The full command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of GetCommandLineW. Do not - // set this if you have to assemble it just for monitoring; use - // process.command_args instead. - // - // Type: string - // Required: See below - // Stability: stable - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - AttributeProcessCommandLine = "process.command_line" - // All the command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited strings - // extracted from proc/[pid]/cmdline. For libc-based executables, this would be - // the full argv vector passed to main. - // - // Type: string[] - // Required: See below - // Stability: stable - // Examples: 'cmd/otecol', '--config=config.yaml' - AttributeProcessCommandArgs = "process.command_args" - // The username of the user that owns the process. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'root' - AttributeProcessOwner = "process.owner" -) - -// The single (language) runtime instance which is monitored. -const ( - // The name of the runtime of this process. For compiled native binaries, this - // SHOULD be the name of the compiler. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'OpenJDK Runtime Environment' - AttributeProcessRuntimeName = "process.runtime.name" - // The version of the runtime of this process, as returned by the runtime without - // modification. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '14.0.2' - AttributeProcessRuntimeVersion = "process.runtime.version" - // An additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - AttributeProcessRuntimeDescription = "process.runtime.description" -) - -// A service instance. -const ( - // Logical name of the service. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled services. If - // the value was not specified, SDKs MUST fallback to unknown_service: - // concatenated with process.executable.name, e.g. unknown_service:bash. If - // process.executable.name is not available, the value MUST be set to - // unknown_service. - AttributeServiceName = "service.name" - // A namespace for service.name. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group of - // services, for example the team name that owns a group of services. service.name - // is expected to be unique within the same namespace. If service.namespace is not - // specified in the Resource then service.name is expected to be unique for all - // services that have no explicit namespace defined (so the empty/unspecified - // namespace is simply one more valid namespace). Zero-length namespace string is - // assumed equal to unspecified namespace. - AttributeServiceNamespace = "service.namespace" - // The string ID of the service instance. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // service.namespace,service.name pair (in other words - // service.namespace,service.name,service.instance.id triplet MUST be globally - // unique). The ID helps to distinguish instances of the same service that exist - // at the same time (e.g. instances of a horizontally scaled service). It is - // preferable for the ID to be persistent and stay the same for the lifetime of - // the service instance, however it is acceptable that the ID is ephemeral and - // changes during important lifetime events for the service (e.g. service - // restarts). If the service has no inherent unique ID that can be used as the - // value of this attribute it is recommended to generate a random Version 1 or - // Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use - // Version 5, see RFC 4122 for more recommendations). - AttributeServiceInstanceID = "service.instance.id" - // The version string of the service API or implementation. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '2.0.0' - AttributeServiceVersion = "service.version" -) - -// The telemetry SDK used to capture data recorded by the instrumentation libraries. -const ( - // The name of the telemetry SDK as defined above. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'opentelemetry' - AttributeTelemetrySDKName = "telemetry.sdk.name" - // The language of the telemetry SDK. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeTelemetrySDKLanguage = "telemetry.sdk.language" - // The version string of the telemetry SDK. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetrySDKVersion = "telemetry.sdk.version" - // The version string of the auto instrumentation agent, if used. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '1.2.3' - AttributeTelemetryAutoVersion = "telemetry.auto.version" -) - -const ( - // cpp - AttributeTelemetrySDKLanguageCPP = "cpp" - // dotnet - AttributeTelemetrySDKLanguageDotnet = "dotnet" - // erlang - AttributeTelemetrySDKLanguageErlang = "erlang" - // go - AttributeTelemetrySDKLanguageGo = "go" - // java - AttributeTelemetrySDKLanguageJava = "java" - // nodejs - AttributeTelemetrySDKLanguageNodejs = "nodejs" - // php - AttributeTelemetrySDKLanguagePHP = "php" - // python - AttributeTelemetrySDKLanguagePython = "python" - // ruby - AttributeTelemetrySDKLanguageRuby = "ruby" - // webjs - AttributeTelemetrySDKLanguageWebjs = "webjs" -) - -// Resource describing the packaged software running the application code. Web engines are typically executed using process.runtime. -const ( - // The name of the web engine. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'WildFly' - AttributeWebEngineName = "webengine.name" - // The version of the web engine. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '21.0.0' - AttributeWebEngineVersion = "webengine.version" - // Additional description of the web engine (e.g. detailed version and edition - // information). - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - 2.2.2.Final' - AttributeWebEngineDescription = "webengine.description" -) - -func GetResourceSemanticConventionAttributeNames() []string { - return []string{ - AttributeCloudProvider, - AttributeCloudAccountID, - AttributeCloudRegion, - AttributeCloudAvailabilityZone, - AttributeCloudPlatform, - AttributeAWSECSContainerARN, - AttributeAWSECSClusterARN, - AttributeAWSECSLaunchtype, - AttributeAWSECSTaskARN, - AttributeAWSECSTaskFamily, - AttributeAWSECSTaskRevision, - AttributeAWSEKSClusterARN, - AttributeAWSLogGroupNames, - AttributeAWSLogGroupARNs, - AttributeAWSLogStreamNames, - AttributeAWSLogStreamARNs, - AttributeContainerName, - AttributeContainerID, - AttributeContainerRuntime, - AttributeContainerImageName, - AttributeContainerImageTag, - AttributeDeploymentEnvironment, - AttributeDeviceID, - AttributeDeviceModelIdentifier, - AttributeDeviceModelName, - AttributeFaaSName, - AttributeFaaSID, - AttributeFaaSVersion, - AttributeFaaSInstance, - AttributeFaaSMaxMemory, - AttributeHostID, - AttributeHostName, - AttributeHostType, - AttributeHostArch, - AttributeHostImageName, - AttributeHostImageID, - AttributeHostImageVersion, - AttributeK8SClusterName, - AttributeK8SNodeName, - AttributeK8SNodeUID, - AttributeK8SNamespaceName, - AttributeK8SPodUID, - AttributeK8SPodName, - AttributeK8SContainerName, - AttributeK8SReplicaSetUID, - AttributeK8SReplicaSetName, - AttributeK8SDeploymentUID, - AttributeK8SDeploymentName, - AttributeK8SStatefulSetUID, - AttributeK8SStatefulSetName, - AttributeK8SDaemonSetUID, - AttributeK8SDaemonSetName, - AttributeK8SJobUID, - AttributeK8SJobName, - AttributeK8SCronJobUID, - AttributeK8SCronJobName, - AttributeOSType, - AttributeOSDescription, - AttributeOSName, - AttributeOSVersion, - AttributeProcessPID, - AttributeProcessExecutableName, - AttributeProcessExecutablePath, - AttributeProcessCommand, - AttributeProcessCommandLine, - AttributeProcessCommandArgs, - AttributeProcessOwner, - AttributeProcessRuntimeName, - AttributeProcessRuntimeVersion, - AttributeProcessRuntimeDescription, - AttributeServiceName, - AttributeServiceNamespace, - AttributeServiceInstanceID, - AttributeServiceVersion, - AttributeTelemetrySDKName, - AttributeTelemetrySDKLanguage, - AttributeTelemetrySDKVersion, - AttributeTelemetryAutoVersion, - AttributeWebEngineName, - AttributeWebEngineVersion, - AttributeWebEngineDescription, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_trace.go b/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_trace.go deleted file mode 100644 index 7418019848..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/generated_trace.go +++ /dev/null @@ -1,1587 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.6.1" - -// Span attributes used by AWS Lambda (in addition to general `faas` attributes). -const ( - // The full invoked ARN as provided on the Context passed to the function (Lambda- - // Runtime-Invoked-Function-ARN header on the /runtime/invocation/next - // applicable). - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from faas.id if an alias is involved. - AttributeAWSLambdaInvokedARN = "aws.lambda.invoked_arn" -) - -// This document defines the attributes used to perform database client calls. -const ( - // An identifier for the database management system (DBMS) product being used. See - // below for a list of well-known identifiers. - // - // Type: Enum - // Required: Always - // Stability: stable - AttributeDBSystem = "db.system" - // The connection string used to connect to the database. It is recommended to - // remove embedded credentials. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' - AttributeDBConnectionString = "db.connection_string" - // Username for accessing the database. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'readonly_user', 'reporting_user' - AttributeDBUser = "db.user" - // The fully-qualified class name of the Java Database Connectivity (JDBC) driver - // used to connect. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'org.postgresql.Driver', - // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' - AttributeDBJDBCDriverClassname = "db.jdbc.driver_classname" - // If no tech-specific attribute is defined, this attribute is used to report the - // name of the database being accessed. For commands that switch the database, - // this should be set to the target database (even if the command fails). - // - // Type: string - // Required: Required, if applicable and no more-specific attribute is defined. - // Stability: stable - // Examples: 'customers', 'main' - // Note: In some SQL databases, the database name to be used is called - // "schema name". - AttributeDBName = "db.name" - // The database statement being executed. - // - // Type: string - // Required: Required if applicable and not explicitly disabled via - // instrumentation configuration. - // Stability: stable - // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' - // Note: The value may be sanitized to exclude sensitive information. - AttributeDBStatement = "db.statement" - // The name of the operation being executed, e.g. the MongoDB command name such as - // findAndModify, or the SQL keyword. - // - // Type: string - // Required: Required, if `db.statement` is not applicable. - // Stability: stable - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: When setting this to an SQL keyword, it is not recommended to attempt any - // client-side parsing of db.statement just to get this property, but it should be - // set if the operation name is provided by the library being instrumented. If the - // SQL statement has an ambiguous operation, or performs more than one operation, - // this value may be omitted. - AttributeDBOperation = "db.operation" -) - -const ( - // Some other SQL database. Fallback only. See notes - AttributeDBSystemOtherSQL = "other_sql" - // Microsoft SQL Server - AttributeDBSystemMSSQL = "mssql" - // MySQL - AttributeDBSystemMySQL = "mysql" - // Oracle Database - AttributeDBSystemOracle = "oracle" - // IBM DB2 - AttributeDBSystemDB2 = "db2" - // PostgreSQL - AttributeDBSystemPostgreSQL = "postgresql" - // Amazon Redshift - AttributeDBSystemRedshift = "redshift" - // Apache Hive - AttributeDBSystemHive = "hive" - // Cloudscape - AttributeDBSystemCloudscape = "cloudscape" - // HyperSQL DataBase - AttributeDBSystemHSQLDB = "hsqldb" - // Progress Database - AttributeDBSystemProgress = "progress" - // SAP MaxDB - AttributeDBSystemMaxDB = "maxdb" - // SAP HANA - AttributeDBSystemHanaDB = "hanadb" - // Ingres - AttributeDBSystemIngres = "ingres" - // FirstSQL - AttributeDBSystemFirstSQL = "firstsql" - // EnterpriseDB - AttributeDBSystemEDB = "edb" - // InterSystems Caché - AttributeDBSystemCache = "cache" - // Adabas (Adaptable Database System) - AttributeDBSystemAdabas = "adabas" - // Firebird - AttributeDBSystemFirebird = "firebird" - // Apache Derby - AttributeDBSystemDerby = "derby" - // FileMaker - AttributeDBSystemFilemaker = "filemaker" - // Informix - AttributeDBSystemInformix = "informix" - // InstantDB - AttributeDBSystemInstantDB = "instantdb" - // InterBase - AttributeDBSystemInterbase = "interbase" - // MariaDB - AttributeDBSystemMariaDB = "mariadb" - // Netezza - AttributeDBSystemNetezza = "netezza" - // Pervasive PSQL - AttributeDBSystemPervasive = "pervasive" - // PointBase - AttributeDBSystemPointbase = "pointbase" - // SQLite - AttributeDBSystemSqlite = "sqlite" - // Sybase - AttributeDBSystemSybase = "sybase" - // Teradata - AttributeDBSystemTeradata = "teradata" - // Vertica - AttributeDBSystemVertica = "vertica" - // H2 - AttributeDBSystemH2 = "h2" - // ColdFusion IMQ - AttributeDBSystemColdfusion = "coldfusion" - // Apache Cassandra - AttributeDBSystemCassandra = "cassandra" - // Apache HBase - AttributeDBSystemHBase = "hbase" - // MongoDB - AttributeDBSystemMongoDB = "mongodb" - // Redis - AttributeDBSystemRedis = "redis" - // Couchbase - AttributeDBSystemCouchbase = "couchbase" - // CouchDB - AttributeDBSystemCouchDB = "couchdb" - // Microsoft Azure Cosmos DB - AttributeDBSystemCosmosDB = "cosmosdb" - // Amazon DynamoDB - AttributeDBSystemDynamoDB = "dynamodb" - // Neo4j - AttributeDBSystemNeo4j = "neo4j" - // Apache Geode - AttributeDBSystemGeode = "geode" - // Elasticsearch - AttributeDBSystemElasticsearch = "elasticsearch" - // Memcached - AttributeDBSystemMemcached = "memcached" - // CockroachDB - AttributeDBSystemCockroachdb = "cockroachdb" -) - -// Connection-level attributes for Microsoft SQL Server -const ( - // The Microsoft SQL Server instance name connecting to. This name is used to - // determine the port of a named instance. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'MSSQLSERVER' - // Note: If setting a db.mssql.instance_name, net.peer.port is no longer required - // (but still recommended if non-standard). - AttributeDBMSSQLInstanceName = "db.mssql.instance_name" -) - -// Call-level attributes for Cassandra -const ( - // The name of the keyspace being accessed. To be used instead of the generic - // db.name attribute. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'mykeyspace' - AttributeDBCassandraKeyspace = "db.cassandra.keyspace" - // The fetch size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 5000 - AttributeDBCassandraPageSize = "db.cassandra.page_size" - // The consistency level of the query. Based on consistency values from CQL. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeDBCassandraConsistencyLevel = "db.cassandra.consistency_level" - // The name of the primary table that the operation is acting upon, including the - // schema name (if applicable). - // - // Type: string - // Required: Recommended if available. - // Stability: stable - // Examples: 'mytable' - // Note: This mirrors the db.sql.table attribute but references cassandra rather - // than sql. It is not recommended to attempt any client-side parsing of - // db.statement just to get this property, but it should be set if it is provided - // by the library being instrumented. If the operation is acting upon an anonymous - // table, or more than one table, this value MUST NOT be set. - AttributeDBCassandraTable = "db.cassandra.table" - // Whether or not the query is idempotent. - // - // Type: boolean - // Required: No - // Stability: stable - AttributeDBCassandraIdempotence = "db.cassandra.idempotence" - // The number of times a query was speculatively executed. Not set or 0 if the - // query was not executed speculatively. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 0, 2 - AttributeDBCassandraSpeculativeExecutionCount = "db.cassandra.speculative_execution_count" - // The ID of the coordinating node for a query. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - AttributeDBCassandraCoordinatorID = "db.cassandra.coordinator.id" - // The data center of the coordinating node for a query. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'us-west-2' - AttributeDBCassandraCoordinatorDC = "db.cassandra.coordinator.dc" -) - -const ( - // all - AttributeDBCassandraConsistencyLevelAll = "all" - // each_quorum - AttributeDBCassandraConsistencyLevelEachQuorum = "each_quorum" - // quorum - AttributeDBCassandraConsistencyLevelQuorum = "quorum" - // local_quorum - AttributeDBCassandraConsistencyLevelLocalQuorum = "local_quorum" - // one - AttributeDBCassandraConsistencyLevelOne = "one" - // two - AttributeDBCassandraConsistencyLevelTwo = "two" - // three - AttributeDBCassandraConsistencyLevelThree = "three" - // local_one - AttributeDBCassandraConsistencyLevelLocalOne = "local_one" - // any - AttributeDBCassandraConsistencyLevelAny = "any" - // serial - AttributeDBCassandraConsistencyLevelSerial = "serial" - // local_serial - AttributeDBCassandraConsistencyLevelLocalSerial = "local_serial" -) - -// Call-level attributes for Apache HBase -const ( - // The HBase namespace being accessed. To be used instead of the generic db.name - // attribute. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'default' - AttributeDBHBaseNamespace = "db.hbase.namespace" -) - -// Call-level attributes for Redis -const ( - // The index of the database being accessed as used in the SELECT command, - // provided as an integer. To be used instead of the generic db.name attribute. - // - // Type: int - // Required: Required, if other than the default database (`0`). - // Stability: stable - // Examples: 0, 1, 15 - AttributeDBRedisDBIndex = "db.redis.database_index" -) - -// Call-level attributes for MongoDB -const ( - // The collection being accessed within the database stated in db.name. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'customers', 'products' - AttributeDBMongoDBCollection = "db.mongodb.collection" -) - -// Call-level attrbiutes for SQL databases -const ( - // The name of the primary table that the operation is acting upon, including the - // schema name (if applicable). - // - // Type: string - // Required: Recommended if available. - // Stability: stable - // Examples: 'public.users', 'customers' - // Note: It is not recommended to attempt any client-side parsing of db.statement - // just to get this property, but it should be set if it is provided by the - // library being instrumented. If the operation is acting upon an anonymous table, - // or more than one table, this value MUST NOT be set. - AttributeDBSQLTable = "db.sql.table" -) - -// This document defines the attributes used to report a single exception associated with a span. -const ( - // The type of the exception (its fully-qualified class name, if applicable). The - // dynamic type of the exception should be preferred over the static type in - // languages that support it. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - AttributeExceptionType = "exception.type" - // The exception message. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str implicitly" - AttributeExceptionMessage = "exception.message" - // A stacktrace as a string in the natural representation for the language - // runtime. The representation is to be determined and documented by each language - // SIG. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - AttributeExceptionStacktrace = "exception.stacktrace" - // SHOULD be set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // Required: No - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's __exit__ method in Python) but will - // usually be caught at the point of recording the exception in most languages.It - // is usually not possible to determine at the point where an exception is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending the span, - // as done in the example above.It follows that an exception may still escape the - // scope of the span - // even if the exception.escaped attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - AttributeExceptionEscaped = "exception.escaped" -) - -// This semantic convention describes an instance of a function that runs without provisioning or managing of servers (also known as serverless functions or Function as a Service (FaaS)) with spans. -const ( - // Type of the trigger on which the function is executed. - // - // Type: Enum - // Required: On FaaS instances, faas.trigger MUST be set on incoming invocations. - // Clients invoking FaaS instances MUST set `faas.trigger` on outgoing - // invocations, if it is known to the client. This is, for example, not the case, - // when the transport layer is abstracted in a FaaS client framework without - // access to its configuration. - // Stability: stable - AttributeFaaSTrigger = "faas.trigger" - // The execution ID of the current function execution. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - AttributeFaaSExecution = "faas.execution" -) - -const ( - // A response to some data source operation such as a database or filesystem read/write - AttributeFaaSTriggerDatasource = "datasource" - // To provide an answer to an inbound HTTP request - AttributeFaaSTriggerHTTP = "http" - // A function is set to be executed when messages are sent to a messaging system - AttributeFaaSTriggerPubsub = "pubsub" - // A function is scheduled to be executed regularly - AttributeFaaSTriggerTimer = "timer" - // If none of the others apply - AttributeFaaSTriggerOther = "other" -) - -// Semantic Convention for FaaS triggered as a response to some data source operation such as a database or filesystem read/write. -const ( - // The name of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos - // DB to the database name. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'myBucketName', 'myDBName' - AttributeFaaSDocumentCollection = "faas.document.collection" - // Describes the type of the operation that was performed on the data. - // - // Type: Enum - // Required: Always - // Stability: stable - AttributeFaaSDocumentOperation = "faas.document.operation" - // A string containing the time when the data was accessed in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSDocumentTime = "faas.document.time" - // The document name/table subjected to the operation. For example, in Cloud - // Storage or S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'myFile.txt', 'myTableName' - AttributeFaaSDocumentName = "faas.document.name" -) - -const ( - // When a new object is created - AttributeFaaSDocumentOperationInsert = "insert" - // When an object is modified - AttributeFaaSDocumentOperationEdit = "edit" - // When an object is deleted - AttributeFaaSDocumentOperationDelete = "delete" -) - -// Semantic Convention for FaaS scheduled to be executed regularly. -const ( - // A string containing the function invocation time in the ISO 8601 format - // expressed in UTC. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - AttributeFaaSTime = "faas.time" - // A string containing the schedule period as Cron Expression. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '0/5 * * * ? *' - AttributeFaaSCron = "faas.cron" -) - -// Contains additional attributes for incoming FaaS spans. -const ( - // A boolean that is true if the serverless function is executed for the first - // time (aka cold-start). - // - // Type: boolean - // Required: No - // Stability: stable - AttributeFaaSColdstart = "faas.coldstart" -) - -// Contains additional attributes for outgoing FaaS spans. -const ( - // The name of the invoked function. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'my-function' - // Note: SHOULD be equal to the faas.name resource attribute of the invoked - // function. - AttributeFaaSInvokedName = "faas.invoked_name" - // The cloud provider of the invoked function. - // - // Type: Enum - // Required: Always - // Stability: stable - // Note: SHOULD be equal to the cloud.provider resource attribute of the invoked - // function. - AttributeFaaSInvokedProvider = "faas.invoked_provider" - // The cloud region of the invoked function. - // - // Type: string - // Required: For some cloud providers, like AWS or GCP, the region in which a - // function is hosted is essential to uniquely identify the function and also part - // of its endpoint. Since it's part of the endpoint being called, the region is - // always known to clients. In these cases, `faas.invoked_region` MUST be set - // accordingly. If the region is unknown to the client or not required for - // identifying the invoked function, setting `faas.invoked_region` is optional. - // Stability: stable - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the cloud.region resource attribute of the invoked - // function. - AttributeFaaSInvokedRegion = "faas.invoked_region" -) - -const ( - // Alibaba Cloud - AttributeFaaSInvokedProviderAlibabaCloud = "alibaba_cloud" - // Amazon Web Services - AttributeFaaSInvokedProviderAWS = "aws" - // Microsoft Azure - AttributeFaaSInvokedProviderAzure = "azure" - // Google Cloud Platform - AttributeFaaSInvokedProviderGCP = "gcp" -) - -// These attributes may be used for any network related operation. -const ( - // Transport protocol used. See note below. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeNetTransport = "net.transport" - // Remote address of the peer (dotted decimal for IPv4 or RFC5952 for IPv6) - // - // Type: string - // Required: No - // Stability: stable - // Examples: '127.0.0.1' - AttributeNetPeerIP = "net.peer.ip" - // Remote port number. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 80, 8080, 443 - AttributeNetPeerPort = "net.peer.port" - // Remote hostname or similar, see note below. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'example.com' - AttributeNetPeerName = "net.peer.name" - // Like net.peer.ip but for the host IP. Useful in case of a multi-IP host. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '192.168.0.1' - AttributeNetHostIP = "net.host.ip" - // Like net.peer.port but for the host port. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 35555 - AttributeNetHostPort = "net.host.port" - // Local hostname or similar, see note below. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'localhost' - AttributeNetHostName = "net.host.name" - // The internet connection type currently being used by the host. - // - // Type: Enum - // Required: No - // Stability: stable - // Examples: 'wifi' - AttributeNetHostConnectionType = "net.host.connection.type" - // This describes more details regarding the connection.type. It may be the type - // of cell technology connection, but it could be used for describing details - // about a wifi connection. - // - // Type: Enum - // Required: No - // Stability: stable - // Examples: 'LTE' - AttributeNetHostConnectionSubtype = "net.host.connection.subtype" - // The name of the mobile carrier. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'sprint' - AttributeNetHostCarrierName = "net.host.carrier.name" - // The mobile carrier country code. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '310' - AttributeNetHostCarrierMcc = "net.host.carrier.mcc" - // The mobile carrier network code. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '001' - AttributeNetHostCarrierMnc = "net.host.carrier.mnc" - // The ISO 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'DE' - AttributeNetHostCarrierIcc = "net.host.carrier.icc" -) - -const ( - // ip_tcp - AttributeNetTransportTCP = "ip_tcp" - // ip_udp - AttributeNetTransportUDP = "ip_udp" - // Another IP-based protocol - AttributeNetTransportIP = "ip" - // Unix Domain socket. See below - AttributeNetTransportUnix = "unix" - // Named or anonymous pipe. See note below - AttributeNetTransportPipe = "pipe" - // In-process communication - AttributeNetTransportInProc = "inproc" - // Something else (non IP-based) - AttributeNetTransportOther = "other" -) - -const ( - // wifi - AttributeNetHostConnectionTypeWifi = "wifi" - // wired - AttributeNetHostConnectionTypeWired = "wired" - // cell - AttributeNetHostConnectionTypeCell = "cell" - // unavailable - AttributeNetHostConnectionTypeUnavailable = "unavailable" - // unknown - AttributeNetHostConnectionTypeUnknown = "unknown" -) - -const ( - // GPRS - AttributeNetHostConnectionSubtypeGprs = "gprs" - // EDGE - AttributeNetHostConnectionSubtypeEdge = "edge" - // UMTS - AttributeNetHostConnectionSubtypeUmts = "umts" - // CDMA - AttributeNetHostConnectionSubtypeCdma = "cdma" - // EVDO Rel. 0 - AttributeNetHostConnectionSubtypeEvdo0 = "evdo_0" - // EVDO Rev. A - AttributeNetHostConnectionSubtypeEvdoA = "evdo_a" - // CDMA2000 1XRTT - AttributeNetHostConnectionSubtypeCdma20001xrtt = "cdma2000_1xrtt" - // HSDPA - AttributeNetHostConnectionSubtypeHsdpa = "hsdpa" - // HSUPA - AttributeNetHostConnectionSubtypeHsupa = "hsupa" - // HSPA - AttributeNetHostConnectionSubtypeHspa = "hspa" - // IDEN - AttributeNetHostConnectionSubtypeIden = "iden" - // EVDO Rev. B - AttributeNetHostConnectionSubtypeEvdoB = "evdo_b" - // LTE - AttributeNetHostConnectionSubtypeLte = "lte" - // EHRPD - AttributeNetHostConnectionSubtypeEhrpd = "ehrpd" - // HSPAP - AttributeNetHostConnectionSubtypeHspap = "hspap" - // GSM - AttributeNetHostConnectionSubtypeGsm = "gsm" - // TD-SCDMA - AttributeNetHostConnectionSubtypeTdScdma = "td_scdma" - // IWLAN - AttributeNetHostConnectionSubtypeIwlan = "iwlan" - // 5G NR (New Radio) - AttributeNetHostConnectionSubtypeNr = "nr" - // 5G NRNSA (New Radio Non-Standalone) - AttributeNetHostConnectionSubtypeNrnsa = "nrnsa" - // LTE CA - AttributeNetHostConnectionSubtypeLteCa = "lte_ca" -) - -// Operations that access some remote service. -const ( - // The service.name of the remote service. SHOULD be equal to the actual - // service.name resource attribute of the remote service if any. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'AuthTokenCache' - AttributePeerService = "peer.service" -) - -// These attributes may be used for any operation with an authenticated and/or authorized enduser. -const ( - // Username or client_id extracted from the access token or Authorization header - // in the inbound request from outside the system. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'username' - AttributeEnduserID = "enduser.id" - // Actual/assumed role the client is making the request under extracted from token - // or application security context. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'admin' - AttributeEnduserRole = "enduser.role" - // Scopes or granted authorities the client currently possesses extracted from - // token or application security context. The value would come from the scope - // associated with an OAuth 2.0 Access Token or an attribute value in a SAML 2.0 - // Assertion. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'read:message, write:files' - AttributeEnduserScope = "enduser.scope" -) - -// These attributes may be used for any operation to store information about a thread that started a span. -const ( - // Current "managed" thread ID (as opposed to OS thread ID). - // - // Type: int - // Required: No - // Stability: stable - // Examples: 42 - AttributeThreadID = "thread.id" - // Current thread name. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'main' - AttributeThreadName = "thread.name" -) - -// These attributes allow to report this unit of code and therefore to provide more context about the span. -const ( - // The method or function name, or equivalent (usually rightmost part of the code - // unit's name). - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'serveRequest' - AttributeCodeFunction = "code.function" - // The "namespace" within which code.function is defined. Usually the - // qualified class or module name, such that code.namespace + some separator + - // code.function form a unique identifier for the code unit. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'com.example.MyHTTPService' - AttributeCodeNamespace = "code.namespace" - // The source code file name that identifies the code unit as uniquely as possible - // (preferably an absolute file path). - // - // Type: string - // Required: No - // Stability: stable - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - AttributeCodeFilepath = "code.filepath" - // The line number in code.filepath best representing the operation. It SHOULD - // point within the code unit named in code.function. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 42 - AttributeCodeLineNumber = "code.lineno" -) - -// This document defines semantic conventions for HTTP client and server Spans. -const ( - // HTTP request method. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - AttributeHTTPMethod = "http.method" - // Full HTTP request URL in the form scheme://host[:port]/path?query[#fragment]. - // Usually the fragment is not transmitted over HTTP, but if it is known, it - // should be included nevertheless. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' - // Note: http.url MUST NOT contain credentials passed via URL in form of - // https://username:password@www.example.com/. In such case the attribute's value - // should be https://www.example.com/. - AttributeHTTPURL = "http.url" - // The full request target as passed in a HTTP request line or equivalent. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '/path/12314/?q=ddds#123' - AttributeHTTPTarget = "http.target" - // The value of the HTTP host header. When the header is empty or not present, - // this attribute should be the same. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'www.example.org' - AttributeHTTPHost = "http.host" - // The URI scheme identifying the used protocol. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'http', 'https' - AttributeHTTPScheme = "http.scheme" - // HTTP response status code. - // - // Type: int - // Required: If and only if one was received/sent. - // Stability: stable - // Examples: 200 - AttributeHTTPStatusCode = "http.status_code" - // Kind of HTTP protocol used. - // - // Type: Enum - // Required: No - // Stability: stable - // Note: If net.transport is not specified, it can be assumed to be IP.TCP except - // if http.flavor is QUIC, in which case IP.UDP is assumed. - AttributeHTTPFlavor = "http.flavor" - // Value of the HTTP User-Agent header sent by the client. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' - AttributeHTTPUserAgent = "http.user_agent" - // The size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 3495 - AttributeHTTPRequestContentLength = "http.request_content_length" - // The size of the uncompressed request payload body after transport decoding. Not - // set if transport encoding not used. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 5493 - AttributeHTTPRequestContentLengthUncompressed = "http.request_content_length_uncompressed" - // The size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as the - // Content-Length header. For requests using transport encoding, this should be - // the compressed size. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 3495 - AttributeHTTPResponseContentLength = "http.response_content_length" - // The size of the uncompressed response payload body after transport decoding. - // Not set if transport encoding not used. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 5493 - AttributeHTTPResponseContentLengthUncompressed = "http.response_content_length_uncompressed" -) - -const ( - // HTTP 1.0 - AttributeHTTPFlavorHTTP10 = "1.0" - // HTTP 1.1 - AttributeHTTPFlavorHTTP11 = "1.1" - // HTTP 2 - AttributeHTTPFlavorHTTP20 = "2.0" - // SPDY protocol - AttributeHTTPFlavorSPDY = "SPDY" - // QUIC protocol - AttributeHTTPFlavorQUIC = "QUIC" -) - -// Semantic Convention for HTTP Server -const ( - // The primary server name of the matched virtual host. This should be obtained - // via configuration. If no such configuration can be obtained, this attribute - // MUST NOT be set ( net.host.name should be used instead). - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'example.com' - // Note: http.url is usually not readily available on the server side but would - // have to be assembled in a cumbersome and sometimes lossy process from other - // information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus - // preferred to supply the raw data that is available. - AttributeHTTPServerName = "http.server_name" - // The matched route (path template). - // - // Type: string - // Required: No - // Stability: stable - // Examples: '/users/:userID?' - AttributeHTTPRoute = "http.route" - // The IP address of the original client behind all proxies, if known (e.g. from - // X-Forwarded-For). - // - // Type: string - // Required: No - // Stability: stable - // Examples: '83.164.160.102' - // Note: This is not necessarily the same as net.peer.ip, which would identify the - // network-level peer, which may be a proxy. - AttributeHTTPClientIP = "http.client_ip" -) - -// Attributes that exist for multiple DynamoDB request types. -const ( - // The keys in the RequestItems object field. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: 'Users', 'Cats' - AttributeAWSDynamoDBTableNames = "aws.dynamodb.table_names" - // The JSON-serialized value of each item in the ConsumedCapacity response field. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : { - // "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, - // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": - // "string", "WriteCapacityUnits": number }' - AttributeAWSDynamoDBConsumedCapacity = "aws.dynamodb.consumed_capacity" - // The JSON-serialized value of the ItemCollectionMetrics response field. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, - // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : - // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": - // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }' - AttributeAWSDynamoDBItemCollectionMetrics = "aws.dynamodb.item_collection_metrics" - // The value of the ProvisionedThroughput.ReadCapacityUnits request parameter. - // - // Type: double - // Required: No - // Stability: stable - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedReadCapacity = "aws.dynamodb.provisioned_read_capacity" - // The value of the ProvisionedThroughput.WriteCapacityUnits request parameter. - // - // Type: double - // Required: No - // Stability: stable - // Examples: 1.0, 2.0 - AttributeAWSDynamoDBProvisionedWriteCapacity = "aws.dynamodb.provisioned_write_capacity" - // The value of the ConsistentRead request parameter. - // - // Type: boolean - // Required: No - // Stability: stable - AttributeAWSDynamoDBConsistentRead = "aws.dynamodb.consistent_read" - // The value of the ProjectionExpression request parameter. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, RelatedItems, - // ProductReviews' - AttributeAWSDynamoDBProjection = "aws.dynamodb.projection" - // The value of the Limit request parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBLimit = "aws.dynamodb.limit" - // The value of the AttributesToGet request parameter. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: 'lives', 'id' - AttributeAWSDynamoDBAttributesToGet = "aws.dynamodb.attributes_to_get" - // The value of the IndexName request parameter. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'name_to_group' - AttributeAWSDynamoDBIndexName = "aws.dynamodb.index_name" - // The value of the Select request parameter. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AttributeAWSDynamoDBSelect = "aws.dynamodb.select" -) - -// DynamoDB.CreateTable -const ( - // The JSON-serialized value of each item of the GlobalSecondaryIndexes request - // field - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": - // number, "WriteCapacityUnits": number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexes = "aws.dynamodb.global_secondary_indexes" - // The JSON-serialized value of each item of the LocalSecondaryIndexes request - // field. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '{ "IndexARN": "string", "IndexName": "string", "IndexSizeBytes": - // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" } }' - AttributeAWSDynamoDBLocalSecondaryIndexes = "aws.dynamodb.local_secondary_indexes" -) - -// DynamoDB.ListTables -const ( - // The value of the ExclusiveStartTableName request parameter. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Users', 'CatsTable' - AttributeAWSDynamoDBExclusiveStartTable = "aws.dynamodb.exclusive_start_table" - // The the number of items in the TableNames response parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 20 - AttributeAWSDynamoDBTableCount = "aws.dynamodb.table_count" -) - -// DynamoDB.Query -const ( - // The value of the ScanIndexForward request parameter. - // - // Type: boolean - // Required: No - // Stability: stable - AttributeAWSDynamoDBScanForward = "aws.dynamodb.scan_forward" -) - -// DynamoDB.Scan -const ( - // The value of the Segment request parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBSegment = "aws.dynamodb.segment" - // The value of the TotalSegments request parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 100 - AttributeAWSDynamoDBTotalSegments = "aws.dynamodb.total_segments" - // The value of the Count response parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 10 - AttributeAWSDynamoDBCount = "aws.dynamodb.count" - // The value of the ScannedCount response parameter. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 50 - AttributeAWSDynamoDBScannedCount = "aws.dynamodb.scanned_count" -) - -// DynamoDB.UpdateTable -const ( - // The JSON-serialized value of each item in the AttributeDefinitions request - // field. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AttributeAWSDynamoDBAttributeDefinitions = "aws.dynamodb.attribute_definitions" - // The JSON-serialized value of each item in the the GlobalSecondaryIndexUpdates - // request field. - // - // Type: string[] - // Required: No - // Stability: stable - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }' - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates = "aws.dynamodb.global_secondary_index_updates" -) - -// This document defines the attributes used in messaging systems. -const ( - // A string identifying the messaging system. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'kafka', 'rabbitmq', 'activemq', 'AmazonSQS' - AttributeMessagingSystem = "messaging.system" - // The message destination name. This might be equal to the span name but is - // required nevertheless. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - AttributeMessagingDestination = "messaging.destination" - // The kind of message destination - // - // Type: Enum - // Required: Required only if the message destination is either a `queue` or - // `topic`. - // Stability: stable - AttributeMessagingDestinationKind = "messaging.destination_kind" - // A boolean that is true if the message destination is temporary. - // - // Type: boolean - // Required: If missing, it is assumed to be false. - // Stability: stable - AttributeMessagingTempDestination = "messaging.temp_destination" - // The name of the transport protocol. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'AMQP', 'MQTT' - AttributeMessagingProtocol = "messaging.protocol" - // The version of the transport protocol. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '0.9.1' - AttributeMessagingProtocolVersion = "messaging.protocol_version" - // Connection string. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'tibjmsnaming://localhost:7222', - // 'https://queue.amazonaws.com/80398EXAMPLE/MyQueue' - AttributeMessagingURL = "messaging.url" - // A value used by the messaging system as an identifier for the message, - // represented as a string. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - AttributeMessagingMessageID = "messaging.message_id" - // The conversation ID identifying the conversation to which the message belongs, - // represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'MyConversationID' - AttributeMessagingConversationID = "messaging.conversation_id" - // The (uncompressed) size of the message payload in bytes. Also use this - // attribute if it is unknown whether the compressed or uncompressed payload size - // is reported. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 2738 - AttributeMessagingMessagePayloadSizeBytes = "messaging.message_payload_size_bytes" - // The compressed size of the message payload in bytes. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 2048 - AttributeMessagingMessagePayloadCompressedSizeBytes = "messaging.message_payload_compressed_size_bytes" -) - -const ( - // A message sent to a queue - AttributeMessagingDestinationKindQueue = "queue" - // A message sent to a topic - AttributeMessagingDestinationKindTopic = "topic" -) - -// Semantic convention for a consumer of messages received from a messaging system -const ( - // A string identifying the kind of message consumption as defined in the - // Operation names section above. If the operation is "send", this - // attribute MUST NOT be set, since the operation can be inferred from the span - // kind in that case. - // - // Type: Enum - // Required: No - // Stability: stable - AttributeMessagingOperation = "messaging.operation" -) - -const ( - // receive - AttributeMessagingOperationReceive = "receive" - // process - AttributeMessagingOperationProcess = "process" -) - -// Attributes for RabbitMQ -const ( - // RabbitMQ message routing key. - // - // Type: string - // Required: Unless it is empty. - // Stability: stable - // Examples: 'myKey' - AttributeMessagingRabbitmqRoutingKey = "messaging.rabbitmq.routing_key" -) - -// Attributes for Apache Kafka -const ( - // Message keys in Kafka are used for grouping alike messages to ensure they're - // processed on the same partition. They differ from messaging.message_id in that - // they're not unique. If the key is null, the attribute MUST NOT be set. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to be - // supplied for the attribute. If the key has no unambiguous, canonical string - // form, don't include its value. - AttributeMessagingKafkaMessageKey = "messaging.kafka.message_key" - // Name of the Kafka Consumer Group that is handling the message. Only applies to - // consumers, not producers. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'my-group' - AttributeMessagingKafkaConsumerGroup = "messaging.kafka.consumer_group" - // Client ID for the Consumer or Producer that is handling the message. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'client-5' - AttributeMessagingKafkaClientID = "messaging.kafka.client_id" - // Partition the message is sent to. - // - // Type: int - // Required: No - // Stability: stable - // Examples: 2 - AttributeMessagingKafkaPartition = "messaging.kafka.partition" - // A boolean that is true if the message is a tombstone. - // - // Type: boolean - // Required: If missing, it is assumed to be false. - // Stability: stable - AttributeMessagingKafkaTombstone = "messaging.kafka.tombstone" -) - -// This document defines semantic conventions for remote procedure calls. -const ( - // A string identifying the remoting system. - // - // Type: string - // Required: Always - // Stability: stable - // Examples: 'grpc', 'java_rmi', 'wcf' - AttributeRPCSystem = "rpc.system" - // The full (logical) name of the service being called, including its package - // name, if applicable. - // - // Type: string - // Required: No, but recommended - // Stability: stable - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing class. - // The code.namespace attribute may be used to store the latter (despite the - // attribute name, it may include a class name; e.g., class with method actually - // executing the call on the server side, RPC client stub class on the client - // side). - AttributeRPCService = "rpc.service" - // The name of the (logical) method being called, must be equal to the $method - // part in the span name. - // - // Type: string - // Required: No, but recommended - // Stability: stable - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The code.function attribute may be used to store the latter - // (e.g., method actually executing the call on the server side, RPC client stub - // method on the client side). - AttributeRPCMethod = "rpc.method" -) - -// Tech-specific attributes for gRPC. -const ( - // The numeric status code of the gRPC request. - // - // Type: Enum - // Required: Always - // Stability: stable - AttributeRPCGRPCStatusCode = "rpc.grpc.status_code" -) - -const ( - // OK - AttributeRPCGRPCStatusCodeOk = "0" - // CANCELLED - AttributeRPCGRPCStatusCodeCancelled = "1" - // UNKNOWN - AttributeRPCGRPCStatusCodeUnknown = "2" - // INVALID_ARGUMENT - AttributeRPCGRPCStatusCodeInvalidArgument = "3" - // DEADLINE_EXCEEDED - AttributeRPCGRPCStatusCodeDeadlineExceeded = "4" - // NOT_FOUND - AttributeRPCGRPCStatusCodeNotFound = "5" - // ALREADY_EXISTS - AttributeRPCGRPCStatusCodeAlreadyExists = "6" - // PERMISSION_DENIED - AttributeRPCGRPCStatusCodePermissionDenied = "7" - // RESOURCE_EXHAUSTED - AttributeRPCGRPCStatusCodeResourceExhausted = "8" - // FAILED_PRECONDITION - AttributeRPCGRPCStatusCodeFailedPrecondition = "9" - // ABORTED - AttributeRPCGRPCStatusCodeAborted = "10" - // OUT_OF_RANGE - AttributeRPCGRPCStatusCodeOutOfRange = "11" - // UNIMPLEMENTED - AttributeRPCGRPCStatusCodeUnimplemented = "12" - // INTERNAL - AttributeRPCGRPCStatusCodeInternal = "13" - // UNAVAILABLE - AttributeRPCGRPCStatusCodeUnavailable = "14" - // DATA_LOSS - AttributeRPCGRPCStatusCodeDataLoss = "15" - // UNAUTHENTICATED - AttributeRPCGRPCStatusCodeUnauthenticated = "16" -) - -// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). -const ( - // Protocol version as in jsonrpc property of request/response. Since JSON-RPC 1.0 - // does not specify this, the value can be omitted. - // - // Type: string - // Required: If missing, it is assumed to be "1.0". - // Stability: stable - // Examples: '2.0', '1.0' - AttributeRPCJsonrpcVersion = "rpc.jsonrpc.version" - // id property of request or response. Since protocol allows id to be int, string, - // null or missing (for notifications), value is expected to be cast to string for - // simplicity. Use empty string in case of null value. Omit entirely if this is a - // notification. - // - // Type: string - // Required: No - // Stability: stable - // Examples: '10', 'request-7', '' - AttributeRPCJsonrpcRequestID = "rpc.jsonrpc.request_id" - // error.code property of response if it is an error response. - // - // Type: int - // Required: If missing, response is assumed to be successful. - // Stability: stable - // Examples: -32700, 100 - AttributeRPCJsonrpcErrorCode = "rpc.jsonrpc.error_code" - // error.message property of response if it is an error response. - // - // Type: string - // Required: No - // Stability: stable - // Examples: 'Parse error', 'User already exists' - AttributeRPCJsonrpcErrorMessage = "rpc.jsonrpc.error_message" -) - -func GetTraceSemanticConventionAttributeNames() []string { - return []string{ - AttributeAWSLambdaInvokedARN, - AttributeDBSystem, - AttributeDBConnectionString, - AttributeDBUser, - AttributeDBJDBCDriverClassname, - AttributeDBName, - AttributeDBStatement, - AttributeDBOperation, - AttributeDBMSSQLInstanceName, - AttributeDBCassandraKeyspace, - AttributeDBCassandraPageSize, - AttributeDBCassandraConsistencyLevel, - AttributeDBCassandraTable, - AttributeDBCassandraIdempotence, - AttributeDBCassandraSpeculativeExecutionCount, - AttributeDBCassandraCoordinatorID, - AttributeDBCassandraCoordinatorDC, - AttributeDBHBaseNamespace, - AttributeDBRedisDBIndex, - AttributeDBMongoDBCollection, - AttributeDBSQLTable, - AttributeExceptionType, - AttributeExceptionMessage, - AttributeExceptionStacktrace, - AttributeExceptionEscaped, - AttributeFaaSTrigger, - AttributeFaaSExecution, - AttributeFaaSDocumentCollection, - AttributeFaaSDocumentOperation, - AttributeFaaSDocumentTime, - AttributeFaaSDocumentName, - AttributeFaaSTime, - AttributeFaaSCron, - AttributeFaaSColdstart, - AttributeFaaSInvokedName, - AttributeFaaSInvokedProvider, - AttributeFaaSInvokedRegion, - AttributeNetTransport, - AttributeNetPeerIP, - AttributeNetPeerPort, - AttributeNetPeerName, - AttributeNetHostIP, - AttributeNetHostPort, - AttributeNetHostName, - AttributeNetHostConnectionType, - AttributeNetHostConnectionSubtype, - AttributeNetHostCarrierName, - AttributeNetHostCarrierMcc, - AttributeNetHostCarrierMnc, - AttributeNetHostCarrierIcc, - AttributePeerService, - AttributeEnduserID, - AttributeEnduserRole, - AttributeEnduserScope, - AttributeThreadID, - AttributeThreadName, - AttributeCodeFunction, - AttributeCodeNamespace, - AttributeCodeFilepath, - AttributeCodeLineNumber, - AttributeHTTPMethod, - AttributeHTTPURL, - AttributeHTTPTarget, - AttributeHTTPHost, - AttributeHTTPScheme, - AttributeHTTPStatusCode, - AttributeHTTPFlavor, - AttributeHTTPUserAgent, - AttributeHTTPRequestContentLength, - AttributeHTTPRequestContentLengthUncompressed, - AttributeHTTPResponseContentLength, - AttributeHTTPResponseContentLengthUncompressed, - AttributeHTTPServerName, - AttributeHTTPRoute, - AttributeHTTPClientIP, - AttributeAWSDynamoDBTableNames, - AttributeAWSDynamoDBConsumedCapacity, - AttributeAWSDynamoDBItemCollectionMetrics, - AttributeAWSDynamoDBProvisionedReadCapacity, - AttributeAWSDynamoDBProvisionedWriteCapacity, - AttributeAWSDynamoDBConsistentRead, - AttributeAWSDynamoDBProjection, - AttributeAWSDynamoDBLimit, - AttributeAWSDynamoDBAttributesToGet, - AttributeAWSDynamoDBIndexName, - AttributeAWSDynamoDBSelect, - AttributeAWSDynamoDBGlobalSecondaryIndexes, - AttributeAWSDynamoDBLocalSecondaryIndexes, - AttributeAWSDynamoDBExclusiveStartTable, - AttributeAWSDynamoDBTableCount, - AttributeAWSDynamoDBScanForward, - AttributeAWSDynamoDBSegment, - AttributeAWSDynamoDBTotalSegments, - AttributeAWSDynamoDBCount, - AttributeAWSDynamoDBScannedCount, - AttributeAWSDynamoDBAttributeDefinitions, - AttributeAWSDynamoDBGlobalSecondaryIndexUpdates, - AttributeMessagingSystem, - AttributeMessagingDestination, - AttributeMessagingDestinationKind, - AttributeMessagingTempDestination, - AttributeMessagingProtocol, - AttributeMessagingProtocolVersion, - AttributeMessagingURL, - AttributeMessagingMessageID, - AttributeMessagingConversationID, - AttributeMessagingMessagePayloadSizeBytes, - AttributeMessagingMessagePayloadCompressedSizeBytes, - AttributeMessagingOperation, - AttributeMessagingRabbitmqRoutingKey, - AttributeMessagingKafkaMessageKey, - AttributeMessagingKafkaConsumerGroup, - AttributeMessagingKafkaClientID, - AttributeMessagingKafkaPartition, - AttributeMessagingKafkaTombstone, - AttributeRPCSystem, - AttributeRPCService, - AttributeRPCMethod, - AttributeRPCGRPCStatusCode, - AttributeRPCJsonrpcVersion, - AttributeRPCJsonrpcRequestID, - AttributeRPCJsonrpcErrorCode, - AttributeRPCJsonrpcErrorMessage, - } -} diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/nonstandard.go b/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/nonstandard.go deleted file mode 100644 index cea103bdf0..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/nonstandard.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.6.1" - -const ( - OtelLibraryName = "otel.library.name" - OtelLibraryVersion = "otel.library.version" - OtelStatusCode = "otel.status_code" - OtelStatusDescription = "otel.status_description" -) diff --git a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/schema.go b/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/schema.go deleted file mode 100644 index 589a94a053..0000000000 --- a/vendor/go.opentelemetry.io/collector/semconv/v1.6.1/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/collector/semconv/v1.6.1" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Conventions packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.6.1" diff --git a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/LICENSE b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/go.opentelemetry.io/contrib/bridges/otelzap/README.md b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/README.md deleted file mode 100644 index 5565260ae5..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# OpenTelemetry Zap Log Bridge - -[![Go Reference](https://pkg.go.dev/badge/go.opentelemetry.io/contrib/bridges/otelzap.svg)](https://pkg.go.dev/go.opentelemetry.io/contrib/bridges/otelzap) diff --git a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/convert.go b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/convert.go deleted file mode 100644 index 6f64c794b7..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/convert.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code created by gotmpl. DO NOT MODIFY. -// source: internal/shared/logutil/convert.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelzap // import "go.opentelemetry.io/contrib/bridges/otelzap" - -import ( - "fmt" - "math" - "reflect" - "strconv" - "time" - - "go.opentelemetry.io/otel/log" -) - -// convertValue converts various types to log.Value. -func convertValue(v any) log.Value { - // Handling the most common types without reflect is a small perf win. - switch val := v.(type) { - case bool: - return log.BoolValue(val) - case string: - return log.StringValue(val) - case int: - return log.Int64Value(int64(val)) - case int8: - return log.Int64Value(int64(val)) - case int16: - return log.Int64Value(int64(val)) - case int32: - return log.Int64Value(int64(val)) - case int64: - return log.Int64Value(val) - case uint: - return convertUintValue(uint64(val)) - case uint8: - return log.Int64Value(int64(val)) - case uint16: - return log.Int64Value(int64(val)) - case uint32: - return log.Int64Value(int64(val)) - case uint64: - return convertUintValue(val) - case uintptr: - return convertUintValue(uint64(val)) - case float32: - return log.Float64Value(float64(val)) - case float64: - return log.Float64Value(val) - case time.Duration: - return log.Int64Value(val.Nanoseconds()) - case complex64: - r := log.Float64("r", real(complex128(val))) - i := log.Float64("i", imag(complex128(val))) - return log.MapValue(r, i) - case complex128: - r := log.Float64("r", real(val)) - i := log.Float64("i", imag(val)) - return log.MapValue(r, i) - case time.Time: - return log.Int64Value(val.UnixNano()) - case []byte: - return log.BytesValue(val) - case error: - return log.StringValue(val.Error()) - } - - t := reflect.TypeOf(v) - if t == nil { - return log.Value{} - } - val := reflect.ValueOf(v) - switch t.Kind() { - case reflect.Struct: - return log.StringValue(fmt.Sprintf("%+v", v)) - case reflect.Slice, reflect.Array: - items := make([]log.Value, 0, val.Len()) - for i := 0; i < val.Len(); i++ { - items = append(items, convertValue(val.Index(i).Interface())) - } - return log.SliceValue(items...) - case reflect.Map: - kvs := make([]log.KeyValue, 0, val.Len()) - for _, k := range val.MapKeys() { - var key string - switch k.Kind() { - case reflect.String: - key = k.String() - default: - key = fmt.Sprintf("%+v", k.Interface()) - } - kvs = append(kvs, log.KeyValue{ - Key: key, - Value: convertValue(val.MapIndex(k).Interface()), - }) - } - return log.MapValue(kvs...) - case reflect.Ptr, reflect.Interface: - if val.IsNil() { - return log.Value{} - } - return convertValue(val.Elem().Interface()) - } - - // Try to handle this as gracefully as possible. - // - // Don't panic here. it is preferable to have user's open issue - // asking why their attributes have a "unhandled: " prefix than - // say that their code is panicking. - return log.StringValue(fmt.Sprintf("unhandled: (%s) %+v", t, v)) -} - -// convertUintValue converts a uint64 to a log.Value. -// If the value is too large to fit in an int64, it is converted to a string. -func convertUintValue(v uint64) log.Value { - if v > math.MaxInt64 { - return log.StringValue(strconv.FormatUint(v, 10)) - } - return log.Int64Value(int64(v)) -} diff --git a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/core.go b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/core.go deleted file mode 100644 index e3564247ef..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/core.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package otelzap provides a bridge between the [go.uber.org/zap] and -// [OpenTelemetry]. -// -// # Record Conversion -// -// The [zapcore.Entry] and [zapcore.Field] are converted to OpenTelemetry [log.Record] in the following -// way: -// -// - Time is set as the Timestamp. -// - Message is set as the Body using a [log.StringValue]. -// - Level is transformed and set as the Severity. The SeverityText is also -// set. -// - Fields are transformed and set as the Attributes. -// - Field value of type [context.Context] is used as context when emitting log records. -// - For named loggers, LoggerName is used to access [log.Logger] from [log.LoggerProvider] -// -// The Level is transformed to the OpenTelemetry Severity types in the following way. -// -// - [zapcore.DebugLevel] is transformed to [log.SeverityDebug] -// - [zapcore.InfoLevel] is transformed to [log.SeverityInfo] -// - [zapcore.WarnLevel] is transformed to [log.SeverityWarn] -// - [zapcore.ErrorLevel] is transformed to [log.SeverityError] -// - [zapcore.DPanicLevel] is transformed to [log.SeverityFatal1] -// - [zapcore.PanicLevel] is transformed to [log.SeverityFatal2] -// - [zapcore.FatalLevel] is transformed to [log.SeverityFatal3] -// -// Fields are transformed based on their type into log attributes, or -// into a string value encoded using [fmt.Sprintf] if there is no matching type. -// -// [OpenTelemetry]: https://opentelemetry.io/docs/concepts/signals/logs/ -package otelzap // import "go.opentelemetry.io/contrib/bridges/otelzap" - -import ( - "context" - "slices" - - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/otel/log" - "go.opentelemetry.io/otel/log/global" - semconv "go.opentelemetry.io/otel/semconv/v1.26.0" -) - -type config struct { - provider log.LoggerProvider - version string - schemaURL string -} - -func newConfig(options []Option) config { - var c config - for _, opt := range options { - c = opt.apply(c) - } - - if c.provider == nil { - c.provider = global.GetLoggerProvider() - } - - return c -} - -// Option configures a [Core]. -type Option interface { - apply(config) config -} - -type optFunc func(config) config - -func (f optFunc) apply(c config) config { return f(c) } - -// WithVersion returns an [Option] that configures the version of the -// [log.Logger] used by a [Core]. The version should be the version of the -// package that is being logged. -func WithVersion(version string) Option { - return optFunc(func(c config) config { - c.version = version - return c - }) -} - -// WithSchemaURL returns an [Option] that configures the semantic convention -// schema URL of the [log.Logger] used by a [Core]. The schemaURL should be -// the schema URL for the semantic conventions used in log records. -func WithSchemaURL(schemaURL string) Option { - return optFunc(func(c config) config { - c.schemaURL = schemaURL - return c - }) -} - -// WithLoggerProvider returns an [Option] that configures [log.LoggerProvider] -// used by a [Core] to create its [log.Logger]. -// -// By default if this Option is not provided, the Handler will use the global -// LoggerProvider. -func WithLoggerProvider(provider log.LoggerProvider) Option { - return optFunc(func(c config) config { - c.provider = provider - return c - }) -} - -// Core is a [zapcore.Core] that sends logging records to OpenTelemetry. -type Core struct { - provider log.LoggerProvider - logger log.Logger - opts []log.LoggerOption - attr []log.KeyValue - ctx context.Context -} - -// Compile-time check *Core implements zapcore.Core. -var _ zapcore.Core = (*Core)(nil) - -// NewCore creates a new [zapcore.Core] that can be used with [go.uber.org/zap.New]. -// The name should be the package import path that is being logged. -// The name is ignored for named loggers created using [go.uber.org/zap.Logger.Named]. -func NewCore(name string, opts ...Option) *Core { - cfg := newConfig(opts) - - var loggerOpts []log.LoggerOption - if cfg.version != "" { - loggerOpts = append(loggerOpts, log.WithInstrumentationVersion(cfg.version)) - } - if cfg.schemaURL != "" { - loggerOpts = append(loggerOpts, log.WithSchemaURL(cfg.schemaURL)) - } - - logger := cfg.provider.Logger(name, loggerOpts...) - - return &Core{ - provider: cfg.provider, - logger: logger, - opts: loggerOpts, - ctx: context.Background(), - } -} - -// Enabled decides whether a given logging level is enabled when logging a message. -func (o *Core) Enabled(level zapcore.Level) bool { - param := log.EnabledParameters{Severity: convertLevel(level)} - return o.logger.Enabled(context.Background(), param) -} - -// With adds structured context to the Core. -func (o *Core) With(fields []zapcore.Field) zapcore.Core { - cloned := o.clone() - if len(fields) > 0 { - ctx, attrbuf := convertField(fields) - if ctx != nil { - cloned.ctx = ctx - } - cloned.attr = append(cloned.attr, attrbuf...) - } - return cloned -} - -func (o *Core) clone() *Core { - return &Core{ - provider: o.provider, - opts: o.opts, - logger: o.logger, - attr: slices.Clone(o.attr), - ctx: o.ctx, - } -} - -// Sync flushes buffered logs (if any). -func (o *Core) Sync() error { - return nil -} - -// Check determines whether the supplied Entry should be logged. -// If the entry should be logged, the Core adds itself to the CheckedEntry and returns the result. -func (o *Core) Check(ent zapcore.Entry, ce *zapcore.CheckedEntry) *zapcore.CheckedEntry { - param := log.EnabledParameters{Severity: convertLevel(ent.Level)} - - logger := o.logger - if ent.LoggerName != "" { - logger = o.provider.Logger(ent.LoggerName, o.opts...) - } - - if logger.Enabled(context.Background(), param) { - return ce.AddCore(ent, o) - } - return ce -} - -// Write method encodes zap fields to OTel logs and emits them. -func (o *Core) Write(ent zapcore.Entry, fields []zapcore.Field) error { - r := log.Record{} - r.SetTimestamp(ent.Time) - r.SetBody(log.StringValue(ent.Message)) - r.SetSeverity(convertLevel(ent.Level)) - r.SetSeverityText(ent.Level.String()) - - r.AddAttributes(o.attr...) - if ent.Caller.Defined { - r.AddAttributes( - log.String(string(semconv.CodeFilepathKey), ent.Caller.File), - log.Int(string(semconv.CodeLineNumberKey), ent.Caller.Line), - log.String(string(semconv.CodeFunctionKey), ent.Caller.Function), - ) - } - if ent.Stack != "" { - r.AddAttributes(log.String(string(semconv.CodeStacktraceKey), ent.Stack)) - } - if len(fields) > 0 { - ctx, attrbuf := convertField(fields) - if ctx != nil { - o.ctx = ctx - } - r.AddAttributes(attrbuf...) - } - - logger := o.logger - if ent.LoggerName != "" { - logger = o.provider.Logger(ent.LoggerName, o.opts...) - } - logger.Emit(o.ctx, r) - return nil -} - -func convertField(fields []zapcore.Field) (context.Context, []log.KeyValue) { - var ctx context.Context - enc := newObjectEncoder(len(fields)) - for _, field := range fields { - if ctxFld, ok := field.Interface.(context.Context); ok { - ctx = ctxFld - continue - } - field.AddTo(enc) - } - - enc.calculate(enc.root) - return ctx, enc.root.attrs -} - -func convertLevel(level zapcore.Level) log.Severity { - switch level { - case zapcore.DebugLevel: - return log.SeverityDebug - case zapcore.InfoLevel: - return log.SeverityInfo - case zapcore.WarnLevel: - return log.SeverityWarn - case zapcore.ErrorLevel: - return log.SeverityError - case zapcore.DPanicLevel: - return log.SeverityFatal1 - case zapcore.PanicLevel: - return log.SeverityFatal2 - case zapcore.FatalLevel: - return log.SeverityFatal3 - default: - return log.SeverityUndefined - } -} diff --git a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/encoder.go b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/encoder.go deleted file mode 100644 index 8147576ae7..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/encoder.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelzap // import "go.opentelemetry.io/contrib/bridges/otelzap" - -import ( - "time" - - "go.uber.org/zap/zapcore" - - "go.opentelemetry.io/otel/log" -) - -var ( - _ zapcore.ObjectEncoder = (*objectEncoder)(nil) - _ zapcore.ArrayEncoder = (*arrayEncoder)(nil) -) - -type namespace struct { - name string - attrs []log.KeyValue - next *namespace -} - -// objectEncoder implements zapcore.ObjectEncoder. -// It encodes given fields to OTel key-values. -type objectEncoder struct { - // root is a pointer to the default namespace - root *namespace - // cur is a pointer to the namespace we're currently writing to. - cur *namespace -} - -func newObjectEncoder(n int) *objectEncoder { - keyval := make([]log.KeyValue, 0, n) - m := &namespace{ - attrs: keyval, - } - return &objectEncoder{ - root: m, - cur: m, - } -} - -// It iterates to the end of the linked list and appends namespace data. -// Run this function before accessing complete result. -func (m *objectEncoder) calculate(o *namespace) { - if o.next == nil { - return - } - m.calculate(o.next) - o.attrs = append(o.attrs, log.Map(o.next.name, o.next.attrs...)) -} - -func (m *objectEncoder) AddArray(key string, v zapcore.ArrayMarshaler) error { - arr := newArrayEncoder() - err := v.MarshalLogArray(arr) - m.cur.attrs = append(m.cur.attrs, log.Slice(key, arr.elems...)) - return err -} - -func (m *objectEncoder) AddObject(k string, v zapcore.ObjectMarshaler) error { - // Similar to console_encoder which uses capacity of 2: - // https://github.com/uber-go/zap/blob/bd0cf0447951b77aa98dcfc1ac19e6f58d3ee64f/zapcore/console_encoder.go#L33. - newobj := newObjectEncoder(2) - err := v.MarshalLogObject(newobj) - newobj.calculate(newobj.root) - m.cur.attrs = append(m.cur.attrs, log.Map(k, newobj.root.attrs...)) - return err -} - -func (m *objectEncoder) AddBinary(k string, v []byte) { - m.cur.attrs = append(m.cur.attrs, log.Bytes(k, v)) -} - -func (m *objectEncoder) AddByteString(k string, v []byte) { - m.cur.attrs = append(m.cur.attrs, log.String(k, string(v))) -} - -func (m *objectEncoder) AddBool(k string, v bool) { - m.cur.attrs = append(m.cur.attrs, log.Bool(k, v)) -} - -func (m *objectEncoder) AddDuration(k string, v time.Duration) { - m.AddInt64(k, v.Nanoseconds()) -} - -func (m *objectEncoder) AddComplex128(k string, v complex128) { - r := log.Float64("r", real(v)) - i := log.Float64("i", imag(v)) - m.cur.attrs = append(m.cur.attrs, log.Map(k, r, i)) -} - -func (m *objectEncoder) AddFloat64(k string, v float64) { - m.cur.attrs = append(m.cur.attrs, log.Float64(k, v)) -} - -func (m *objectEncoder) AddInt64(k string, v int64) { - m.cur.attrs = append(m.cur.attrs, log.Int64(k, v)) -} - -func (m *objectEncoder) AddInt(k string, v int) { - m.cur.attrs = append(m.cur.attrs, log.Int(k, v)) -} - -func (m *objectEncoder) AddString(k string, v string) { - m.cur.attrs = append(m.cur.attrs, log.String(k, v)) -} - -func (m *objectEncoder) AddUint64(k string, v uint64) { - m.cur.attrs = append(m.cur.attrs, - log.KeyValue{ - Key: k, - Value: assignUintValue(v), - }) -} - -func (m *objectEncoder) AddReflected(k string, v interface{}) error { - m.cur.attrs = append(m.cur.attrs, - log.KeyValue{ - Key: k, - Value: convertValue(v), - }) - return nil -} - -// OpenNamespace opens an isolated namespace where all subsequent fields will -// be added. -func (m *objectEncoder) OpenNamespace(k string) { - keyValue := make([]log.KeyValue, 0, 5) - s := &namespace{ - name: k, - attrs: keyValue, - } - m.cur.next = s - m.cur = s -} - -func (m *objectEncoder) AddComplex64(k string, v complex64) { - m.AddComplex128(k, complex128(v)) -} - -func (m *objectEncoder) AddTime(k string, v time.Time) { - m.AddInt64(k, v.UnixNano()) -} - -func (m *objectEncoder) AddFloat32(k string, v float32) { - m.AddFloat64(k, float64(v)) -} - -func (m *objectEncoder) AddInt32(k string, v int32) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddInt16(k string, v int16) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddInt8(k string, v int8) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddUint(k string, v uint) { - m.AddUint64(k, uint64(v)) -} - -func (m *objectEncoder) AddUint32(k string, v uint32) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddUint16(k string, v uint16) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddUint8(k string, v uint8) { - m.AddInt64(k, int64(v)) -} - -func (m *objectEncoder) AddUintptr(k string, v uintptr) { - m.AddUint64(k, uint64(v)) -} - -func assignUintValue(v uint64) log.Value { - const maxInt64 = ^uint64(0) >> 1 - if v > maxInt64 { - return log.Float64Value(float64(v)) - } - return log.Int64Value(int64(v)) // nolint:gosec // Overflow checked above. -} - -// arrayEncoder implements [zapcore.ArrayEncoder]. -type arrayEncoder struct { - elems []log.Value -} - -func newArrayEncoder() *arrayEncoder { - return &arrayEncoder{ - // Similar to console_encoder which uses capacity of 2: - // https://github.com/uber-go/zap/blob/bd0cf0447951b77aa98dcfc1ac19e6f58d3ee64f/zapcore/console_encoder.go#L33. - elems: make([]log.Value, 0, 2), - } -} - -func (a *arrayEncoder) AppendArray(v zapcore.ArrayMarshaler) error { - arr := newArrayEncoder() - err := v.MarshalLogArray(arr) - a.elems = append(a.elems, log.SliceValue(arr.elems...)) - return err -} - -func (a *arrayEncoder) AppendObject(v zapcore.ObjectMarshaler) error { - // Similar to console_encoder which uses capacity of 2: - // https://github.com/uber-go/zap/blob/bd0cf0447951b77aa98dcfc1ac19e6f58d3ee64f/zapcore/console_encoder.go#L33. - m := newObjectEncoder(2) - err := v.MarshalLogObject(m) - m.calculate(m.root) - a.elems = append(a.elems, log.MapValue(m.root.attrs...)) - return err -} - -func (a *arrayEncoder) AppendReflected(v interface{}) error { - a.elems = append(a.elems, convertValue(v)) - return nil -} - -func (a *arrayEncoder) AppendByteString(v []byte) { - a.elems = append(a.elems, log.StringValue(string(v))) -} - -func (a *arrayEncoder) AppendBool(v bool) { - a.elems = append(a.elems, log.BoolValue(v)) -} - -func (a *arrayEncoder) AppendFloat64(v float64) { - a.elems = append(a.elems, log.Float64Value(v)) -} - -func (a *arrayEncoder) AppendFloat32(v float32) { - a.AppendFloat64(float64(v)) -} - -func (a *arrayEncoder) AppendInt(v int) { - a.elems = append(a.elems, log.IntValue(v)) -} - -func (a *arrayEncoder) AppendInt64(v int64) { - a.elems = append(a.elems, log.Int64Value(v)) -} - -func (a *arrayEncoder) AppendString(v string) { - a.elems = append(a.elems, log.StringValue(v)) -} - -func (a *arrayEncoder) AppendComplex128(v complex128) { - r := log.Float64("r", real(v)) - i := log.Float64("i", imag(v)) - a.elems = append(a.elems, log.MapValue(r, i)) -} - -func (a *arrayEncoder) AppendUint64(v uint64) { - a.elems = append(a.elems, assignUintValue(v)) -} - -func (a *arrayEncoder) AppendComplex64(v complex64) { a.AppendComplex128(complex128(v)) } -func (a *arrayEncoder) AppendDuration(v time.Duration) { a.AppendInt64(v.Nanoseconds()) } -func (a *arrayEncoder) AppendInt32(v int32) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendInt16(v int16) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendInt8(v int8) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendTime(v time.Time) { a.AppendInt64(v.UnixNano()) } -func (a *arrayEncoder) AppendUint(v uint) { a.AppendUint64(uint64(v)) } -func (a *arrayEncoder) AppendUint32(v uint32) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendUint16(v uint16) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendUint8(v uint8) { a.AppendInt64(int64(v)) } -func (a *arrayEncoder) AppendUintptr(v uintptr) { a.AppendUint64(uint64(v)) } diff --git a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/gen.go b/vendor/go.opentelemetry.io/contrib/bridges/otelzap/gen.go deleted file mode 100644 index 5c8b2eea7e..0000000000 --- a/vendor/go.opentelemetry.io/contrib/bridges/otelzap/gen.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelzap // import "go.opentelemetry.io/contrib/bridges/otelzap" - -// Generate convert: -//go:generate gotmpl --body=../../internal/shared/logutil/convert_test.go.tmpl "--data={ \"pkg\": \"otelzap\" }" --out=convert_test.go -//go:generate gotmpl --body=../../internal/shared/logutil/convert.go.tmpl "--data={ \"pkg\": \"otelzap\" }" --out=convert.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go deleted file mode 100644 index b25641c55d..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/client.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "context" - "io" - "net/http" - "net/url" - "strings" -) - -// DefaultClient is the default Client and is used by Get, Head, Post and PostForm. -// Please be careful of initialization order - for example, if you change -// the global propagator, the DefaultClient might still be using the old one. -var DefaultClient = &http.Client{Transport: NewTransport(http.DefaultTransport)} - -// Get is a convenient replacement for http.Get that adds a span around the request. -func Get(ctx context.Context, targetURL string) (resp *http.Response, err error) { - req, err := http.NewRequestWithContext(ctx, http.MethodGet, targetURL, nil) - if err != nil { - return nil, err - } - return DefaultClient.Do(req) -} - -// Head is a convenient replacement for http.Head that adds a span around the request. -func Head(ctx context.Context, targetURL string) (resp *http.Response, err error) { - req, err := http.NewRequestWithContext(ctx, http.MethodHead, targetURL, nil) - if err != nil { - return nil, err - } - return DefaultClient.Do(req) -} - -// Post is a convenient replacement for http.Post that adds a span around the request. -func Post(ctx context.Context, targetURL, contentType string, body io.Reader) (resp *http.Response, err error) { - req, err := http.NewRequestWithContext(ctx, http.MethodPost, targetURL, body) - if err != nil { - return nil, err - } - req.Header.Set("Content-Type", contentType) - return DefaultClient.Do(req) -} - -// PostForm is a convenient replacement for http.PostForm that adds a span around the request. -func PostForm(ctx context.Context, targetURL string, data url.Values) (resp *http.Response, err error) { - return Post(ctx, targetURL, "application/x-www-form-urlencoded", strings.NewReader(data.Encode())) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go deleted file mode 100644 index a83a026274..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/common.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "net/http" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// Attribute keys that can be added to a span. -const ( - ReadBytesKey = attribute.Key("http.read_bytes") // if anything was read from the request body, the total number of bytes read - ReadErrorKey = attribute.Key("http.read_error") // If an error occurred while reading a request, the string of the error (io.EOF is not recorded) - WroteBytesKey = attribute.Key("http.wrote_bytes") // if anything was written to the response writer, the total number of bytes written - WriteErrorKey = attribute.Key("http.write_error") // if an error occurred while writing a reply, the string of the error (io.EOF is not recorded) -) - -// Filter is a predicate used to determine whether a given http.request should -// be traced. A Filter must return true if the request should be traced. -type Filter func(*http.Request) bool - -func newTracer(tp trace.TracerProvider) trace.Tracer { - return tp.Tracer(ScopeName, trace.WithInstrumentationVersion(Version())) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go deleted file mode 100644 index 6bd50d4c9b..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/config.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "context" - "net/http" - "net/http/httptrace" - - "go.opentelemetry.io/otel/attribute" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/trace" -) - -// ScopeName is the instrumentation scope name. -const ScopeName = "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -// config represents the configuration options available for the http.Handler -// and http.Transport types. -type config struct { - ServerName string - Tracer trace.Tracer - Meter metric.Meter - Propagators propagation.TextMapPropagator - SpanStartOptions []trace.SpanStartOption - PublicEndpoint bool - PublicEndpointFn func(*http.Request) bool - ReadEvent bool - WriteEvent bool - Filters []Filter - SpanNameFormatter func(string, *http.Request) string - ClientTrace func(context.Context) *httptrace.ClientTrace - - TracerProvider trace.TracerProvider - MeterProvider metric.MeterProvider - MetricAttributesFn func(*http.Request) []attribute.KeyValue -} - -// Option interface used for setting optional config properties. -type Option interface { - apply(*config) -} - -type optionFunc func(*config) - -func (o optionFunc) apply(c *config) { - o(c) -} - -// newConfig creates a new config struct and applies opts to it. -func newConfig(opts ...Option) *config { - c := &config{ - Propagators: otel.GetTextMapPropagator(), - MeterProvider: otel.GetMeterProvider(), - } - for _, opt := range opts { - opt.apply(c) - } - - // Tracer is only initialized if manually specified. Otherwise, can be passed with the tracing context. - if c.TracerProvider != nil { - c.Tracer = newTracer(c.TracerProvider) - } - - c.Meter = c.MeterProvider.Meter( - ScopeName, - metric.WithInstrumentationVersion(Version()), - ) - - return c -} - -// WithTracerProvider specifies a tracer provider to use for creating a tracer. -// If none is specified, the global provider is used. -func WithTracerProvider(provider trace.TracerProvider) Option { - return optionFunc(func(cfg *config) { - if provider != nil { - cfg.TracerProvider = provider - } - }) -} - -// WithMeterProvider specifies a meter provider to use for creating a meter. -// If none is specified, the global provider is used. -func WithMeterProvider(provider metric.MeterProvider) Option { - return optionFunc(func(cfg *config) { - if provider != nil { - cfg.MeterProvider = provider - } - }) -} - -// WithPublicEndpoint configures the Handler to link the span with an incoming -// span context. If this option is not provided, then the association is a child -// association instead of a link. -func WithPublicEndpoint() Option { - return optionFunc(func(c *config) { - c.PublicEndpoint = true - }) -} - -// WithPublicEndpointFn runs with every request, and allows conditionally -// configuring the Handler to link the span with an incoming span context. If -// this option is not provided or returns false, then the association is a -// child association instead of a link. -// Note: WithPublicEndpoint takes precedence over WithPublicEndpointFn. -func WithPublicEndpointFn(fn func(*http.Request) bool) Option { - return optionFunc(func(c *config) { - c.PublicEndpointFn = fn - }) -} - -// WithPropagators configures specific propagators. If this -// option isn't specified, then the global TextMapPropagator is used. -func WithPropagators(ps propagation.TextMapPropagator) Option { - return optionFunc(func(c *config) { - if ps != nil { - c.Propagators = ps - } - }) -} - -// WithSpanOptions configures an additional set of -// trace.SpanOptions, which are applied to each new span. -func WithSpanOptions(opts ...trace.SpanStartOption) Option { - return optionFunc(func(c *config) { - c.SpanStartOptions = append(c.SpanStartOptions, opts...) - }) -} - -// WithFilter adds a filter to the list of filters used by the handler. -// If any filter indicates to exclude a request then the request will not be -// traced. All filters must allow a request to be traced for a Span to be created. -// If no filters are provided then all requests are traced. -// Filters will be invoked for each processed request, it is advised to make them -// simple and fast. -func WithFilter(f Filter) Option { - return optionFunc(func(c *config) { - c.Filters = append(c.Filters, f) - }) -} - -type event int - -// Different types of events that can be recorded, see WithMessageEvents. -const ( - ReadEvents event = iota - WriteEvents -) - -// WithMessageEvents configures the Handler to record the specified events -// (span.AddEvent) on spans. By default only summary attributes are added at the -// end of the request. -// -// Valid events are: -// - ReadEvents: Record the number of bytes read after every http.Request.Body.Read -// using the ReadBytesKey -// - WriteEvents: Record the number of bytes written after every http.ResponeWriter.Write -// using the WriteBytesKey -func WithMessageEvents(events ...event) Option { - return optionFunc(func(c *config) { - for _, e := range events { - switch e { - case ReadEvents: - c.ReadEvent = true - case WriteEvents: - c.WriteEvent = true - } - } - }) -} - -// WithSpanNameFormatter takes a function that will be called on every -// request and the returned string will become the Span Name. -// -// When using [http.ServeMux] (or any middleware that sets the Pattern of [http.Request]), -// the span name formatter will run twice. Once when the span is created, and -// second time after the middleware, so the pattern can be used. -func WithSpanNameFormatter(f func(operation string, r *http.Request) string) Option { - return optionFunc(func(c *config) { - c.SpanNameFormatter = f - }) -} - -// WithClientTrace takes a function that returns client trace instance that will be -// applied to the requests sent through the otelhttp Transport. -func WithClientTrace(f func(context.Context) *httptrace.ClientTrace) Option { - return optionFunc(func(c *config) { - c.ClientTrace = f - }) -} - -// WithServerName returns an Option that sets the name of the (virtual) server -// handling requests. -func WithServerName(server string) Option { - return optionFunc(func(c *config) { - c.ServerName = server - }) -} - -// WithMetricAttributesFn returns an Option to set a function that maps an HTTP request to a slice of attribute.KeyValue. -// These attributes will be included in metrics for every request. -func WithMetricAttributesFn(metricAttributesFn func(r *http.Request) []attribute.KeyValue) Option { - return optionFunc(func(c *config) { - c.MetricAttributesFn = metricAttributesFn - }) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go deleted file mode 100644 index 56b24b982a..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package otelhttp provides an http.Handler and functions that are intended -// to be used to add tracing by wrapping existing handlers (with Handler) and -// routes WithRouteTag. -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go deleted file mode 100644 index 937f9b4e73..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/handler.go +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "net/http" - "time" - - "github.com/felixge/httpsnoop" - - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/trace" -) - -// middleware is an http middleware which wraps the next handler in a span. -type middleware struct { - operation string - server string - - tracer trace.Tracer - propagators propagation.TextMapPropagator - spanStartOptions []trace.SpanStartOption - readEvent bool - writeEvent bool - filters []Filter - spanNameFormatter func(string, *http.Request) string - publicEndpoint bool - publicEndpointFn func(*http.Request) bool - metricAttributesFn func(*http.Request) []attribute.KeyValue - - semconv semconv.HTTPServer -} - -func defaultHandlerFormatter(operation string, _ *http.Request) string { - return operation -} - -// NewHandler wraps the passed handler in a span named after the operation and -// enriches it with metrics. -func NewHandler(handler http.Handler, operation string, opts ...Option) http.Handler { - return NewMiddleware(operation, opts...)(handler) -} - -// NewMiddleware returns a tracing and metrics instrumentation middleware. -// The handler returned by the middleware wraps a handler -// in a span named after the operation and enriches it with metrics. -func NewMiddleware(operation string, opts ...Option) func(http.Handler) http.Handler { - h := middleware{ - operation: operation, - } - - defaultOpts := []Option{ - WithSpanOptions(trace.WithSpanKind(trace.SpanKindServer)), - WithSpanNameFormatter(defaultHandlerFormatter), - } - - c := newConfig(append(defaultOpts, opts...)...) - h.configure(c) - - return func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - h.serveHTTP(w, r, next) - }) - } -} - -func (h *middleware) configure(c *config) { - h.tracer = c.Tracer - h.propagators = c.Propagators - h.spanStartOptions = c.SpanStartOptions - h.readEvent = c.ReadEvent - h.writeEvent = c.WriteEvent - h.filters = c.Filters - h.spanNameFormatter = c.SpanNameFormatter - h.publicEndpoint = c.PublicEndpoint - h.publicEndpointFn = c.PublicEndpointFn - h.server = c.ServerName - h.semconv = semconv.NewHTTPServer(c.Meter) - h.metricAttributesFn = c.MetricAttributesFn -} - -// serveHTTP sets up tracing and calls the given next http.Handler with the span -// context injected into the request context. -func (h *middleware) serveHTTP(w http.ResponseWriter, r *http.Request, next http.Handler) { - requestStartTime := time.Now() - for _, f := range h.filters { - if !f(r) { - // Simply pass through to the handler if a filter rejects the request - next.ServeHTTP(w, r) - return - } - } - - ctx := h.propagators.Extract(r.Context(), propagation.HeaderCarrier(r.Header)) - opts := []trace.SpanStartOption{ - trace.WithAttributes(h.semconv.RequestTraceAttrs(h.server, r, semconv.RequestTraceAttrsOpts{})...), - } - - opts = append(opts, h.spanStartOptions...) - if h.publicEndpoint || (h.publicEndpointFn != nil && h.publicEndpointFn(r.WithContext(ctx))) { - opts = append(opts, trace.WithNewRoot()) - // Linking incoming span context if any for public endpoint. - if s := trace.SpanContextFromContext(ctx); s.IsValid() && s.IsRemote() { - opts = append(opts, trace.WithLinks(trace.Link{SpanContext: s})) - } - } - - tracer := h.tracer - - if tracer == nil { - if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { - tracer = newTracer(span.TracerProvider()) - } else { - tracer = newTracer(otel.GetTracerProvider()) - } - } - - if startTime := StartTimeFromContext(ctx); !startTime.IsZero() { - opts = append(opts, trace.WithTimestamp(startTime)) - requestStartTime = startTime - } - - ctx, span := tracer.Start(ctx, h.spanNameFormatter(h.operation, r), opts...) - defer span.End() - - readRecordFunc := func(int64) {} - if h.readEvent { - readRecordFunc = func(n int64) { - span.AddEvent("read", trace.WithAttributes(ReadBytesKey.Int64(n))) - } - } - - // if request body is nil or NoBody, we don't want to mutate the body as it - // will affect the identity of it in an unforeseeable way because we assert - // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. - bw := request.NewBodyWrapper(r.Body, readRecordFunc) - if r.Body != nil && r.Body != http.NoBody { - r.Body = bw - } - - writeRecordFunc := func(int64) {} - if h.writeEvent { - writeRecordFunc = func(n int64) { - span.AddEvent("write", trace.WithAttributes(WroteBytesKey.Int64(n))) - } - } - - rww := request.NewRespWriterWrapper(w, writeRecordFunc) - - // Wrap w to use our ResponseWriter methods while also exposing - // other interfaces that w may implement (http.CloseNotifier, - // http.Flusher, http.Hijacker, http.Pusher, io.ReaderFrom). - - w = httpsnoop.Wrap(w, httpsnoop.Hooks{ - Header: func(httpsnoop.HeaderFunc) httpsnoop.HeaderFunc { - return rww.Header - }, - Write: func(httpsnoop.WriteFunc) httpsnoop.WriteFunc { - return rww.Write - }, - WriteHeader: func(httpsnoop.WriteHeaderFunc) httpsnoop.WriteHeaderFunc { - return rww.WriteHeader - }, - Flush: func(httpsnoop.FlushFunc) httpsnoop.FlushFunc { - return rww.Flush - }, - }) - - labeler, found := LabelerFromContext(ctx) - if !found { - ctx = ContextWithLabeler(ctx, labeler) - } - - r = r.WithContext(ctx) - next.ServeHTTP(w, r) - - if r.Pattern != "" { - span.SetName(h.spanNameFormatter(h.operation, r)) - } - - statusCode := rww.StatusCode() - bytesWritten := rww.BytesWritten() - span.SetStatus(h.semconv.Status(statusCode)) - span.SetAttributes(h.semconv.ResponseTraceAttrs(semconv.ResponseTelemetry{ - StatusCode: statusCode, - ReadBytes: bw.BytesRead(), - ReadError: bw.Error(), - WriteBytes: bytesWritten, - WriteError: rww.Error(), - })...) - - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) - - metricAttributes := semconv.MetricAttributes{ - Req: r, - StatusCode: statusCode, - AdditionalAttributes: append(labeler.Get(), h.metricAttributesFromRequest(r)...), - } - - h.semconv.RecordMetrics(ctx, semconv.ServerMetricData{ - ServerName: h.server, - ResponseSize: bytesWritten, - MetricAttributes: metricAttributes, - MetricData: semconv.MetricData{ - RequestSize: bw.BytesRead(), - ElapsedTime: elapsedTime, - }, - }) -} - -func (h *middleware) metricAttributesFromRequest(r *http.Request) []attribute.KeyValue { - var attributeForRequest []attribute.KeyValue - if h.metricAttributesFn != nil { - attributeForRequest = h.metricAttributesFn(r) - } - return attributeForRequest -} - -// WithRouteTag annotates spans and metrics with the provided route name -// with HTTP route attribute. -func WithRouteTag(route string, h http.Handler) http.Handler { - attr := semconv.NewHTTPServer(nil).Route(route) - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - span := trace.SpanFromContext(r.Context()) - span.SetAttributes(attr) - - labeler, _ := LabelerFromContext(r.Context()) - labeler.Add(attr) - - h.ServeHTTP(w, r) - }) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go deleted file mode 100644 index d032aa841b..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/body_wrapper.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/request/body_wrapper.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package request provides types and functionality to handle HTTP request -// handling. -package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - -import ( - "io" - "sync" -) - -var _ io.ReadCloser = &BodyWrapper{} - -// BodyWrapper wraps a http.Request.Body (an io.ReadCloser) to track the number -// of bytes read and the last error. -type BodyWrapper struct { - io.ReadCloser - OnRead func(n int64) // must not be nil - - mu sync.Mutex - read int64 - err error -} - -// NewBodyWrapper creates a new BodyWrapper. -// -// The onRead attribute is a callback that will be called every time the data -// is read, with the number of bytes being read. -func NewBodyWrapper(body io.ReadCloser, onRead func(int64)) *BodyWrapper { - return &BodyWrapper{ - ReadCloser: body, - OnRead: onRead, - } -} - -// Read reads the data from the io.ReadCloser, and stores the number of bytes -// read and the error. -func (w *BodyWrapper) Read(b []byte) (int, error) { - n, err := w.ReadCloser.Read(b) - n1 := int64(n) - - w.updateReadData(n1, err) - w.OnRead(n1) - return n, err -} - -func (w *BodyWrapper) updateReadData(n int64, err error) { - w.mu.Lock() - defer w.mu.Unlock() - - w.read += n - if err != nil { - w.err = err - } -} - -// Close closes the io.ReadCloser. -func (w *BodyWrapper) Close() error { - return w.ReadCloser.Close() -} - -// BytesRead returns the number of bytes read up to this point. -func (w *BodyWrapper) BytesRead() int64 { - w.mu.Lock() - defer w.mu.Unlock() - - return w.read -} - -// Error returns the last error. -func (w *BodyWrapper) Error() error { - w.mu.Lock() - defer w.mu.Unlock() - - return w.err -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go deleted file mode 100644 index 9e00dd2fce..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - -// Generate request package: -//go:generate gotmpl --body=../../../../../../internal/shared/request/body_wrapper.go.tmpl "--data={}" --out=body_wrapper.go -//go:generate gotmpl --body=../../../../../../internal/shared/request/body_wrapper_test.go.tmpl "--data={}" --out=body_wrapper_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/request/resp_writer_wrapper.go.tmpl "--data={}" --out=resp_writer_wrapper.go -//go:generate gotmpl --body=../../../../../../internal/shared/request/resp_writer_wrapper_test.go.tmpl "--data={}" --out=resp_writer_wrapper_test.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go deleted file mode 100644 index ca2e4c14c7..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request/resp_writer_wrapper.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/request/resp_writer_wrapper.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package request // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - -import ( - "net/http" - "sync" -) - -var _ http.ResponseWriter = &RespWriterWrapper{} - -// RespWriterWrapper wraps a http.ResponseWriter in order to track the number of -// bytes written, the last error, and to catch the first written statusCode. -// TODO: The wrapped http.ResponseWriter doesn't implement any of the optional -// types (http.Hijacker, http.Pusher, http.CloseNotifier, etc) -// that may be useful when using it in real life situations. -type RespWriterWrapper struct { - http.ResponseWriter - OnWrite func(n int64) // must not be nil - - mu sync.RWMutex - written int64 - statusCode int - err error - wroteHeader bool -} - -// NewRespWriterWrapper creates a new RespWriterWrapper. -// -// The onWrite attribute is a callback that will be called every time the data -// is written, with the number of bytes that were written. -func NewRespWriterWrapper(w http.ResponseWriter, onWrite func(int64)) *RespWriterWrapper { - return &RespWriterWrapper{ - ResponseWriter: w, - OnWrite: onWrite, - statusCode: http.StatusOK, // default status code in case the Handler doesn't write anything - } -} - -// Write writes the bytes array into the [ResponseWriter], and tracks the -// number of bytes written and last error. -func (w *RespWriterWrapper) Write(p []byte) (int, error) { - w.mu.Lock() - defer w.mu.Unlock() - - if !w.wroteHeader { - w.writeHeader(http.StatusOK) - } - - n, err := w.ResponseWriter.Write(p) - n1 := int64(n) - w.OnWrite(n1) - w.written += n1 - w.err = err - return n, err -} - -// WriteHeader persists initial statusCode for span attribution. -// All calls to WriteHeader will be propagated to the underlying ResponseWriter -// and will persist the statusCode from the first call. -// Blocking consecutive calls to WriteHeader alters expected behavior and will -// remove warning logs from net/http where developers will notice incorrect handler implementations. -func (w *RespWriterWrapper) WriteHeader(statusCode int) { - w.mu.Lock() - defer w.mu.Unlock() - - w.writeHeader(statusCode) -} - -// writeHeader persists the status code for span attribution, and propagates -// the call to the underlying ResponseWriter. -// It does not acquire a lock, and therefore assumes that is being handled by a -// parent method. -func (w *RespWriterWrapper) writeHeader(statusCode int) { - if !w.wroteHeader { - w.wroteHeader = true - w.statusCode = statusCode - } - w.ResponseWriter.WriteHeader(statusCode) -} - -// Flush implements [http.Flusher]. -func (w *RespWriterWrapper) Flush() { - w.mu.Lock() - defer w.mu.Unlock() - - if !w.wroteHeader { - w.writeHeader(http.StatusOK) - } - - if f, ok := w.ResponseWriter.(http.Flusher); ok { - f.Flush() - } -} - -// BytesWritten returns the number of bytes written. -func (w *RespWriterWrapper) BytesWritten() int64 { - w.mu.RLock() - defer w.mu.RUnlock() - - return w.written -} - -// StatusCode returns the HTTP status code that was sent. -func (w *RespWriterWrapper) StatusCode() int { - w.mu.RLock() - defer w.mu.RUnlock() - - return w.statusCode -} - -// Error returns the last error. -func (w *RespWriterWrapper) Error() error { - w.mu.RLock() - defer w.mu.RUnlock() - - return w.err -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go deleted file mode 100644 index 7cb9693d98..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/env.go +++ /dev/null @@ -1,323 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/env.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "context" - "fmt" - "net/http" - "os" - "strings" - "sync" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/metric" -) - -// OTelSemConvStabilityOptIn is an environment variable. -// That can be set to "http/dup" to keep getting the old HTTP semantic conventions. -const OTelSemConvStabilityOptIn = "OTEL_SEMCONV_STABILITY_OPT_IN" - -type ResponseTelemetry struct { - StatusCode int - ReadBytes int64 - ReadError error - WriteBytes int64 - WriteError error -} - -type HTTPServer struct { - duplicate bool - - // Old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - serverLatencyMeasure metric.Float64Histogram - - // New metrics - requestBodySizeHistogram metric.Int64Histogram - responseBodySizeHistogram metric.Int64Histogram - requestDurationHistogram metric.Float64Histogram -} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (s HTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.RequestTraceAttrs(server, req, opts) - if s.duplicate { - return OldHTTPServer{}.RequestTraceAttrs(server, req, attrs) - } - return attrs -} - -func (s HTTPServer) NetworkTransportAttr(network string) []attribute.KeyValue { - if s.duplicate { - return []attribute.KeyValue{ - OldHTTPServer{}.NetworkTransportAttr(network), - CurrentHTTPServer{}.NetworkTransportAttr(network), - } - } - return []attribute.KeyValue{ - CurrentHTTPServer{}.NetworkTransportAttr(network), - } -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (s HTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - attrs := CurrentHTTPServer{}.ResponseTraceAttrs(resp) - if s.duplicate { - return OldHTTPServer{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -// Route returns the attribute for the route. -func (s HTTPServer) Route(route string) attribute.KeyValue { - return CurrentHTTPServer{}.Route(route) -} - -// Status returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (s HTTPServer) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} - -type ServerMetricData struct { - ServerName string - ResponseSize int64 - - MetricData - MetricAttributes -} - -type MetricAttributes struct { - Req *http.Request - StatusCode int - AdditionalAttributes []attribute.KeyValue -} - -type MetricData struct { - RequestSize int64 - - // The request duration, in milliseconds - ElapsedTime float64 -} - -var ( - metricAddOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.AddOption{} - }, - } - - metricRecordOptionPool = &sync.Pool{ - New: func() interface{} { - return &[]metric.RecordOption{} - }, - } -) - -func (s HTTPServer) RecordMetrics(ctx context.Context, md ServerMetricData) { - if s.requestDurationHistogram != nil && s.requestBodySizeHistogram != nil && s.responseBodySizeHistogram != nil { - attributes := CurrentHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - recordOpts := metricRecordOptionPool.Get().(*[]metric.RecordOption) - *recordOpts = append(*recordOpts, o) - s.requestBodySizeHistogram.Record(ctx, md.RequestSize, *recordOpts...) - s.responseBodySizeHistogram.Record(ctx, md.ResponseSize, *recordOpts...) - s.requestDurationHistogram.Record(ctx, md.ElapsedTime/1000.0, o) - *recordOpts = (*recordOpts)[:0] - metricRecordOptionPool.Put(recordOpts) - } - - if s.duplicate && s.requestBytesCounter != nil && s.responseBytesCounter != nil && s.serverLatencyMeasure != nil { - attributes := OldHTTPServer{}.MetricAttributes(md.ServerName, md.Req, md.StatusCode, md.AdditionalAttributes) - o := metric.WithAttributeSet(attribute.NewSet(attributes...)) - addOpts := metricAddOptionPool.Get().(*[]metric.AddOption) - *addOpts = append(*addOpts, o) - s.requestBytesCounter.Add(ctx, md.RequestSize, *addOpts...) - s.responseBytesCounter.Add(ctx, md.ResponseSize, *addOpts...) - s.serverLatencyMeasure.Record(ctx, md.ElapsedTime, o) - *addOpts = (*addOpts)[:0] - metricAddOptionPool.Put(addOpts) - } -} - -// hasOptIn returns true if the comma-separated version string contains the -// exact optIn value. -func hasOptIn(version, optIn string) bool { - for _, v := range strings.Split(version, ",") { - if strings.TrimSpace(v) == optIn { - return true - } - } - return false -} - -func NewHTTPServer(meter metric.Meter) HTTPServer { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - server := HTTPServer{ - duplicate: duplicate, - } - server.requestBodySizeHistogram, server.responseBodySizeHistogram, server.requestDurationHistogram = CurrentHTTPServer{}.createMeasures(meter) - if duplicate { - server.requestBytesCounter, server.responseBytesCounter, server.serverLatencyMeasure = OldHTTPServer{}.createMeasures(meter) - } - return server -} - -type HTTPClient struct { - duplicate bool - - // old metrics - requestBytesCounter metric.Int64Counter - responseBytesCounter metric.Int64Counter - latencyMeasure metric.Float64Histogram - - // new metrics - requestBodySize metric.Int64Histogram - requestDuration metric.Float64Histogram -} - -func NewHTTPClient(meter metric.Meter) HTTPClient { - env := strings.ToLower(os.Getenv(OTelSemConvStabilityOptIn)) - duplicate := hasOptIn(env, "http/dup") - client := HTTPClient{ - duplicate: duplicate, - } - client.requestBodySize, client.requestDuration = CurrentHTTPClient{}.createMeasures(meter) - if duplicate { - client.requestBytesCounter, client.responseBytesCounter, client.latencyMeasure = OldHTTPClient{}.createMeasures(meter) - } - - return client -} - -// RequestTraceAttrs returns attributes for an HTTP request made by a client. -func (c HTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.RequestTraceAttrs(req) - if c.duplicate { - return OldHTTPClient{}.RequestTraceAttrs(req, attrs) - } - return attrs -} - -// ResponseTraceAttrs returns metric attributes for an HTTP request made by a client. -func (c HTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.ResponseTraceAttrs(resp) - if c.duplicate { - return OldHTTPClient{}.ResponseTraceAttrs(resp, attrs) - } - return attrs -} - -func (c HTTPClient) Status(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -func (c HTTPClient) ErrorType(err error) attribute.KeyValue { - return CurrentHTTPClient{}.ErrorType(err) -} - -type MetricOpts struct { - measurement metric.MeasurementOption - addOptions metric.AddOption -} - -func (o MetricOpts) MeasurementOption() metric.MeasurementOption { - return o.measurement -} - -func (o MetricOpts) AddOptions() metric.AddOption { - return o.addOptions -} - -func (c HTTPClient) MetricOptions(ma MetricAttributes) map[string]MetricOpts { - opts := map[string]MetricOpts{} - - attributes := CurrentHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["new"] = MetricOpts{ - measurement: set, - addOptions: set, - } - - if c.duplicate { - attributes := OldHTTPClient{}.MetricAttributes(ma.Req, ma.StatusCode, ma.AdditionalAttributes) - set := metric.WithAttributeSet(attribute.NewSet(attributes...)) - opts["old"] = MetricOpts{ - measurement: set, - addOptions: set, - } - } - - return opts -} - -func (s HTTPClient) RecordMetrics(ctx context.Context, md MetricData, opts map[string]MetricOpts) { - if s.requestBodySize == nil || s.requestDuration == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.requestBodySize.Record(ctx, md.RequestSize, opts["new"].MeasurementOption()) - s.requestDuration.Record(ctx, md.ElapsedTime/1000, opts["new"].MeasurementOption()) - - if s.duplicate { - s.requestBytesCounter.Add(ctx, md.RequestSize, opts["old"].AddOptions()) - s.latencyMeasure.Record(ctx, md.ElapsedTime, opts["old"].MeasurementOption()) - } -} - -func (s HTTPClient) RecordResponseSize(ctx context.Context, responseData int64, opts map[string]MetricOpts) { - if s.responseBytesCounter == nil { - // This will happen if an HTTPClient{} is used instead of NewHTTPClient(). - return - } - - s.responseBytesCounter.Add(ctx, responseData, opts["old"].AddOptions()) -} - -func (s HTTPClient) TraceAttributes(host string) []attribute.KeyValue { - attrs := CurrentHTTPClient{}.TraceAttributes(host) - if s.duplicate { - return OldHTTPClient{}.TraceAttributes(host, attrs) - } - - return attrs -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go deleted file mode 100644 index f2cf8a152d..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/gen.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -// Generate semconv package: -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/bench_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=bench_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/env.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/env_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=env_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/httpconv_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=httpconv_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/util.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/util_test.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=util_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconv/v1.20.0.go.tmpl "--data={ \"pkg\": \"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp\" }" --out=v1.20.0.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go deleted file mode 100644 index 53976b0d5a..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/httpconv.go +++ /dev/null @@ -1,573 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv provides OpenTelemetry semantic convention types and -// functionality. -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "fmt" - "net/http" - "reflect" - "slices" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" -) - -type RequestTraceAttrsOpts struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -type CurrentHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (n CurrentHTTPServer) RequestTraceAttrs(server string, req *http.Request, opts RequestTraceAttrsOpts) []attribute.KeyValue { - count := 3 // ServerAddress, Method, Scheme - - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - count++ - } - - method, methodOriginal := n.method(req.Method) - if methodOriginal != (attribute.KeyValue{}) { - count++ - } - - scheme := n.scheme(req.TLS != nil) - - peer, peerPort := SplitHostPort(req.RemoteAddr) - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - count++ - if peerPort > 0 { - count++ - } - } - - useragent := req.UserAgent() - if useragent != "" { - count++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - count++ - } - - if req.URL != nil && req.URL.Path != "" { - count++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - count++ - } - if protoVersion != "" { - count++ - } - - route := httpRoute(req.Pattern) - if route != "" { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - attrs = append(attrs, - semconvNew.ServerAddress(host), - method, - scheme, - ) - - if hostPort > 0 { - attrs = append(attrs, semconvNew.ServerPort(hostPort)) - } - if methodOriginal != (attribute.KeyValue{}) { - attrs = append(attrs, methodOriginal) - } - - if peer, peerPort := SplitHostPort(req.RemoteAddr); peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, semconvNew.NetworkPeerAddress(peer)) - if peerPort > 0 { - attrs = append(attrs, semconvNew.NetworkPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, semconvNew.UserAgentOriginal(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, semconvNew.ClientAddress(clientIP)) - } - - if req.URL != nil && req.URL.Path != "" { - attrs = append(attrs, semconvNew.URLPath(req.URL.Path)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if route != "" { - attrs = append(attrs, n.Route(route)) - } - - return attrs -} - -func (n CurrentHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return semconvNew.NetworkTransportTCP - case "udp", "udp4", "udp6": - return semconvNew.NetworkTransportUDP - case "unix", "unixgram", "unixpacket": - return semconvNew.NetworkTransportUnix - default: - return semconvNew.NetworkTransportPipe - } -} - -func (n CurrentHTTPServer) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP -// response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will -// be omitted. -func (n CurrentHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry) []attribute.KeyValue { - var count int - - if resp.ReadBytes > 0 { - count++ - } - if resp.WriteBytes > 0 { - count++ - } - if resp.StatusCode > 0 { - count++ - } - - attributes := make([]attribute.KeyValue, 0, count) - - if resp.ReadBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPRequestBodySize(int(resp.ReadBytes)), - ) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseBodySize(int(resp.WriteBytes)), - ) - } - if resp.StatusCode > 0 { - attributes = append(attributes, - semconvNew.HTTPResponseStatusCode(resp.StatusCode), - ) - } - - return attributes -} - -// Route returns the attribute for the route. -func (n CurrentHTTPServer) Route(route string) attribute.KeyValue { - return semconvNew.HTTPRoute(route) -} - -func (n CurrentHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPServerRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerRequestBodySizeDescription), - ) - handleErr(err) - - responseBodySizeHistogram, err := meter.Int64Histogram( - semconvNew.HTTPServerResponseBodySizeName, - metric.WithUnit(semconvNew.HTTPServerResponseBodySizeUnit), - metric.WithDescription(semconvNew.HTTPServerResponseBodySizeDescription), - ) - handleErr(err) - requestDurationHistogram, err := meter.Float64Histogram( - semconvNew.HTTPServerRequestDurationName, - metric.WithUnit(semconvNew.HTTPServerRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPServerRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySizeHistogram, responseBodySizeHistogram, requestDurationHistogram -} - -func (n CurrentHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - num++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - n.scheme(req.TLS != nil), - semconvNew.ServerAddress(host)) - - if hostPort > 0 { - attributes = append(attributes, semconvNew.ServerPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -type CurrentHTTPClient struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request made by a client. -func (n CurrentHTTPClient) RequestTraceAttrs(req *http.Request) []attribute.KeyValue { - /* - below attributes are returned: - - http.request.method - - http.request.method.original - - url.full - - server.address - - server.port - - network.protocol.name - - network.protocol.version - */ - numOfAttributes := 3 // URL, server address, proto, and method. - - var urlHost string - if req.URL != nil { - urlHost = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{urlHost, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - eligiblePort := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if eligiblePort > 0 { - numOfAttributes++ - } - useragent := req.UserAgent() - if useragent != "" { - numOfAttributes++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - numOfAttributes++ - } - if protoVersion != "" { - numOfAttributes++ - } - - method, originalMethod := n.method(req.Method) - if originalMethod != (attribute.KeyValue{}) { - numOfAttributes++ - } - - attrs := make([]attribute.KeyValue, 0, numOfAttributes) - - attrs = append(attrs, method) - if originalMethod != (attribute.KeyValue{}) { - attrs = append(attrs, originalMethod) - } - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, semconvNew.URLFull(u)) - - attrs = append(attrs, semconvNew.ServerAddress(requestHost)) - if eligiblePort > 0 { - attrs = append(attrs, semconvNew.ServerPort(eligiblePort)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - return attrs -} - -// ResponseTraceAttrs returns trace attributes for an HTTP response made by a client. -func (n CurrentHTTPClient) ResponseTraceAttrs(resp *http.Response) []attribute.KeyValue { - /* - below attributes are returned: - - http.response.status_code - - error.type - */ - var count int - if resp.StatusCode > 0 { - count++ - } - - if isErrorStatusCode(resp.StatusCode) { - count++ - } - - attrs := make([]attribute.KeyValue, 0, count) - if resp.StatusCode > 0 { - attrs = append(attrs, semconvNew.HTTPResponseStatusCode(resp.StatusCode)) - } - - if isErrorStatusCode(resp.StatusCode) { - errorType := strconv.Itoa(resp.StatusCode) - attrs = append(attrs, semconvNew.ErrorTypeKey.String(errorType)) - } - return attrs -} - -func (n CurrentHTTPClient) ErrorType(err error) attribute.KeyValue { - t := reflect.TypeOf(err) - var value string - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - value = t.String() - } else { - value = fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) - } - - if value == "" { - return semconvNew.ErrorTypeOther - } - - return semconvNew.ErrorTypeKey.String(value) -} - -func (n CurrentHTTPClient) method(method string) (attribute.KeyValue, attribute.KeyValue) { - if method == "" { - return semconvNew.HTTPRequestMethodGet, attribute.KeyValue{} - } - if attr, ok := methodLookup[method]; ok { - return attr, attribute.KeyValue{} - } - - orig := semconvNew.HTTPRequestMethodOriginal(method) - if attr, ok := methodLookup[strings.ToUpper(method)]; ok { - return attr, orig - } - return semconvNew.HTTPRequestMethodGet, orig -} - -func (n CurrentHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Histogram, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Histogram{}, noop.Float64Histogram{} - } - - var err error - requestBodySize, err := meter.Int64Histogram( - semconvNew.HTTPClientRequestBodySizeName, - metric.WithUnit(semconvNew.HTTPClientRequestBodySizeUnit), - metric.WithDescription(semconvNew.HTTPClientRequestBodySizeDescription), - ) - handleErr(err) - - requestDuration, err := meter.Float64Histogram( - semconvNew.HTTPClientRequestDurationName, - metric.WithUnit(semconvNew.HTTPClientRequestDurationUnit), - metric.WithDescription(semconvNew.HTTPClientRequestDurationDescription), - metric.WithExplicitBucketBoundaries(0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1, 2.5, 5, 7.5, 10), - ) - handleErr(err) - - return requestBodySize, requestDuration -} - -func (n CurrentHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - num := len(additionalAttributes) + 2 - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - num++ - } - - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - num++ - } - if protoVersion != "" { - num++ - } - - if statusCode > 0 { - num++ - } - - attributes := slices.Grow(additionalAttributes, num) - attributes = append(attributes, - semconvNew.HTTPRequestMethodKey.String(standardizeHTTPMethod(req.Method)), - semconvNew.ServerAddress(requestHost), - n.scheme(req), - ) - - if port > 0 { - attributes = append(attributes, semconvNew.ServerPort(port)) - } - if protoName != "" { - attributes = append(attributes, semconvNew.NetworkProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconvNew.NetworkProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconvNew.HTTPResponseStatusCode(statusCode)) - } - return attributes -} - -// TraceAttributes returns attributes for httptrace. -func (n CurrentHTTPClient) TraceAttributes(host string) []attribute.KeyValue { - return []attribute.KeyValue{ - semconvNew.ServerAddress(host), - } -} - -func (n CurrentHTTPClient) scheme(req *http.Request) attribute.KeyValue { - if req.URL != nil && req.URL.Scheme != "" { - return semconvNew.URLScheme(req.URL.Scheme) - } - if req.TLS != nil { - return semconvNew.URLScheme("https") - } - return semconvNew.URLScheme("http") -} - -func isErrorStatusCode(code int) bool { - return code >= 400 || code < 100 -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go deleted file mode 100644 index bc1f7751db..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/util.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/util.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "net" - "net/http" - "strconv" - "strings" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - semconvNew "go.opentelemetry.io/otel/semconv/v1.26.0" -) - -// SplitHostPort splits a network address hostport of the form "host", -// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", -// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and -// port. -// -// An empty host is returned if it is not provided or unparsable. A negative -// port is returned if it is not provided or unparsable. -func SplitHostPort(hostport string) (host string, port int) { - port = -1 - - if strings.HasPrefix(hostport, "[") { - addrEnd := strings.LastIndexByte(hostport, ']') - if addrEnd < 0 { - // Invalid hostport. - return - } - if i := strings.LastIndexByte(hostport[addrEnd:], ':'); i < 0 { - host = hostport[1:addrEnd] - return - } - } else { - if i := strings.LastIndexByte(hostport, ':'); i < 0 { - host = hostport - return - } - } - - host, pStr, err := net.SplitHostPort(hostport) - if err != nil { - return - } - - p, err := strconv.ParseUint(pStr, 10, 16) - if err != nil { - return - } - return host, int(p) // nolint: gosec // Byte size checked 16 above. -} - -func requiredHTTPPort(https bool, port int) int { // nolint:revive - if https { - if port > 0 && port != 443 { - return port - } - } else { - if port > 0 && port != 80 { - return port - } - } - return -1 -} - -func serverClientIP(xForwardedFor string) string { - if idx := strings.IndexByte(xForwardedFor, ','); idx >= 0 { - xForwardedFor = xForwardedFor[:idx] - } - return xForwardedFor -} - -func httpRoute(pattern string) string { - if idx := strings.IndexByte(pattern, '/'); idx >= 0 { - return pattern[idx:] - } - return "" -} - -func netProtocol(proto string) (name string, version string) { - name, version, _ = strings.Cut(proto, "/") - switch name { - case "HTTP": - name = "http" - case "QUIC": - name = "quic" - case "SPDY": - name = "spdy" - default: - name = strings.ToLower(name) - } - return name, version -} - -var methodLookup = map[string]attribute.KeyValue{ - http.MethodConnect: semconvNew.HTTPRequestMethodConnect, - http.MethodDelete: semconvNew.HTTPRequestMethodDelete, - http.MethodGet: semconvNew.HTTPRequestMethodGet, - http.MethodHead: semconvNew.HTTPRequestMethodHead, - http.MethodOptions: semconvNew.HTTPRequestMethodOptions, - http.MethodPatch: semconvNew.HTTPRequestMethodPatch, - http.MethodPost: semconvNew.HTTPRequestMethodPost, - http.MethodPut: semconvNew.HTTPRequestMethodPut, - http.MethodTrace: semconvNew.HTTPRequestMethodTrace, -} - -func handleErr(err error) { - if err != nil { - otel.Handle(err) - } -} - -func standardizeHTTPMethod(method string) string { - method = strings.ToUpper(method) - switch method { - case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: - default: - method = "_OTHER" - } - return method -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go deleted file mode 100644 index ba7fccf1ef..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv/v1.20.0.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconv/v120.0.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - -import ( - "errors" - "io" - "net/http" - "slices" - - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type OldHTTPServer struct{} - -// RequestTraceAttrs returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -func (o OldHTTPServer) RequestTraceAttrs(server string, req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPServerRequest(server, req, semconvutil.HTTPServerRequestOptions{}, attrs) -} - -func (o OldHTTPServer) NetworkTransportAttr(network string) attribute.KeyValue { - return semconvutil.NetTransport(network) -} - -// ResponseTraceAttrs returns trace attributes for telemetry from an HTTP response. -// -// If any of the fields in the ResponseTelemetry are not set the attribute will be omitted. -func (o OldHTTPServer) ResponseTraceAttrs(resp ResponseTelemetry, attributes []attribute.KeyValue) []attribute.KeyValue { - if resp.ReadBytes > 0 { - attributes = append(attributes, semconv.HTTPRequestContentLength(int(resp.ReadBytes))) - } - if resp.ReadError != nil && !errors.Is(resp.ReadError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.read_error", resp.ReadError.Error())) - } - if resp.WriteBytes > 0 { - attributes = append(attributes, semconv.HTTPResponseContentLength(int(resp.WriteBytes))) - } - if resp.StatusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(resp.StatusCode)) - } - if resp.WriteError != nil && !errors.Is(resp.WriteError, io.EOF) { - // This is not in the semantic conventions, but is historically provided - attributes = append(attributes, attribute.String("http.write_error", resp.WriteError.Error())) - } - - return attributes -} - -// Route returns the attribute for the route. -func (o OldHTTPServer) Route(route string) attribute.KeyValue { - return semconv.HTTPRoute(route) -} - -// HTTPStatusCode returns the attribute for the HTTP status code. -// This is a temporary function needed by metrics. This will be removed when MetricsRequest is added. -func HTTPStatusCode(status int) attribute.KeyValue { - return semconv.HTTPStatusCode(status) -} - -// Server HTTP metrics. -const ( - serverRequestSize = "http.server.request.size" // Incoming request bytes total - serverResponseSize = "http.server.response.size" // Incoming response bytes total - serverDuration = "http.server.duration" // Incoming end to end duration, milliseconds -) - -func (h OldHTTPServer) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - var err error - requestBytesCounter, err := meter.Int64Counter( - serverRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - serverResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - serverLatencyMeasure, err := meter.Float64Histogram( - serverDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of inbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, serverLatencyMeasure -} - -func (o OldHTTPServer) MetricAttributes(server string, req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - n := len(additionalAttributes) + 3 - var host string - var p int - if server == "" { - host, p = SplitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = SplitHostPort(server) - if p < 0 { - _, p = SplitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - o.scheme(req.TLS != nil), - semconv.NetHostName(host)) - - if hostPort > 0 { - attributes = append(attributes, semconv.NetHostPort(hostPort)) - } - if protoName != "" { - attributes = append(attributes, semconv.NetProtocolName(protoName)) - } - if protoVersion != "" { - attributes = append(attributes, semconv.NetProtocolVersion(protoVersion)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -func (o OldHTTPServer) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return semconv.HTTPSchemeHTTPS - } - return semconv.HTTPSchemeHTTP -} - -type OldHTTPClient struct{} - -func (o OldHTTPClient) RequestTraceAttrs(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientRequest(req, attrs) -} - -func (o OldHTTPClient) ResponseTraceAttrs(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return semconvutil.HTTPClientResponse(resp, attrs) -} - -func (o OldHTTPClient) MetricAttributes(req *http.Request, statusCode int, additionalAttributes []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.status_code int - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - var requestHost string - var requestPort int - for _, hostport := range []string{h, req.Header.Get("Host")} { - requestHost, requestPort = SplitHostPort(hostport) - if requestHost != "" || requestPort > 0 { - break - } - } - - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", requestPort) - if port > 0 { - n++ - } - - if statusCode > 0 { - n++ - } - - attributes := slices.Grow(additionalAttributes, n) - attributes = append(attributes, - semconv.HTTPMethod(standardizeHTTPMethod(req.Method)), - semconv.NetPeerName(requestHost), - ) - - if port > 0 { - attributes = append(attributes, semconv.NetPeerPort(port)) - } - - if statusCode > 0 { - attributes = append(attributes, semconv.HTTPStatusCode(statusCode)) - } - return attributes -} - -// Client HTTP metrics. -const ( - clientRequestSize = "http.client.request.size" // Incoming request bytes total - clientResponseSize = "http.client.response.size" // Incoming response bytes total - clientDuration = "http.client.duration" // Incoming end to end duration, milliseconds -) - -func (o OldHTTPClient) createMeasures(meter metric.Meter) (metric.Int64Counter, metric.Int64Counter, metric.Float64Histogram) { - if meter == nil { - return noop.Int64Counter{}, noop.Int64Counter{}, noop.Float64Histogram{} - } - requestBytesCounter, err := meter.Int64Counter( - clientRequestSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP request messages."), - ) - handleErr(err) - - responseBytesCounter, err := meter.Int64Counter( - clientResponseSize, - metric.WithUnit("By"), - metric.WithDescription("Measures the size of HTTP response messages."), - ) - handleErr(err) - - latencyMeasure, err := meter.Float64Histogram( - clientDuration, - metric.WithUnit("ms"), - metric.WithDescription("Measures the duration of outbound HTTP requests."), - ) - handleErr(err) - - return requestBytesCounter, responseBytesCounter, latencyMeasure -} - -// TraceAttributes returns attributes for httptrace. -func (c OldHTTPClient) TraceAttributes(host string, attrs []attribute.KeyValue) []attribute.KeyValue { - return append(attrs, semconv.NetHostName(host)) -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go deleted file mode 100644 index 7aa5f99e81..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/gen.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -// Generate semconvutil package: -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv_test.go.tmpl "--data={}" --out=httpconv_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/httpconv.go.tmpl "--data={}" --out=httpconv.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv_test.go.tmpl "--data={}" --out=netconv_test.go -//go:generate gotmpl --body=../../../../../../internal/shared/semconvutil/netconv.go.tmpl "--data={}" --out=netconv.go diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go deleted file mode 100644 index b997354793..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/httpconv.go +++ /dev/null @@ -1,594 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/httpconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconvutil provides OpenTelemetry semantic convention utilities. -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -import ( - "fmt" - "net/http" - "slices" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -type HTTPServerRequestOptions struct { - // If set, this is used as value for the "http.client_ip" attribute. - HTTPClientIP string -} - -// HTTPClientResponse returns trace attributes for an HTTP response received by a -// client from a server. It will return the following attributes if the related -// values are defined in resp: "http.status.code", -// "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// HTTPClientResponse(resp, ClientRequest(resp.Request))) -func HTTPClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientResponse(resp, attrs) -} - -// HTTPClientRequest returns trace attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length". -func HTTPClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ClientRequest(req, attrs) -} - -// HTTPClientRequestMetrics returns metric attributes for an HTTP request made by a client. -// The following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the -// related values are defined in req: "net.peer.port". -func HTTPClientRequestMetrics(req *http.Request) []attribute.KeyValue { - return hc.ClientRequestMetrics(req) -} - -// HTTPClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func HTTPClientStatus(code int) (codes.Code, string) { - return hc.ClientStatus(code) -} - -// HTTPServerRequest returns trace attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if -// they related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip". -func HTTPServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - return hc.ServerRequest(server, req, opts, attrs) -} - -// HTTPServerRequestMetrics returns metric attributes for an HTTP request received by a -// server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func HTTPServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - return hc.ServerRequestMetrics(server, req) -} - -// HTTPServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func HTTPServerStatus(code int) (codes.Code, string) { - return hc.ServerStatus(code) -} - -// httpConv are the HTTP semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type httpConv struct { - NetConv *netConv - - HTTPClientIPKey attribute.Key - HTTPMethodKey attribute.Key - HTTPRequestContentLengthKey attribute.Key - HTTPResponseContentLengthKey attribute.Key - HTTPRouteKey attribute.Key - HTTPSchemeHTTP attribute.KeyValue - HTTPSchemeHTTPS attribute.KeyValue - HTTPStatusCodeKey attribute.Key - HTTPTargetKey attribute.Key - HTTPURLKey attribute.Key - UserAgentOriginalKey attribute.Key -} - -var hc = &httpConv{ - NetConv: nc, - - HTTPClientIPKey: semconv.HTTPClientIPKey, - HTTPMethodKey: semconv.HTTPMethodKey, - HTTPRequestContentLengthKey: semconv.HTTPRequestContentLengthKey, - HTTPResponseContentLengthKey: semconv.HTTPResponseContentLengthKey, - HTTPRouteKey: semconv.HTTPRouteKey, - HTTPSchemeHTTP: semconv.HTTPSchemeHTTP, - HTTPSchemeHTTPS: semconv.HTTPSchemeHTTPS, - HTTPStatusCodeKey: semconv.HTTPStatusCodeKey, - HTTPTargetKey: semconv.HTTPTargetKey, - HTTPURLKey: semconv.HTTPURLKey, - UserAgentOriginalKey: semconv.UserAgentOriginalKey, -} - -// ClientResponse returns attributes for an HTTP response received by a client -// from a server. The following attributes are returned if the related values -// are defined in resp: "http.status.code", "http.response_content_length". -// -// This does not add all OpenTelemetry required attributes for an HTTP event, -// it assumes ClientRequest was used to create the span with a complete set of -// attributes. If a complete set of attributes can be generated using the -// request contained in resp. For example: -// -// ClientResponse(resp, ClientRequest(resp.Request)) -func (c *httpConv) ClientResponse(resp *http.Response, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.status_code int - http.response_content_length int - */ - var n int - if resp.StatusCode > 0 { - n++ - } - if resp.ContentLength > 0 { - n++ - } - if n == 0 { - return attrs - } - - attrs = slices.Grow(attrs, n) - if resp.StatusCode > 0 { - attrs = append(attrs, c.HTTPStatusCodeKey.Int(resp.StatusCode)) - } - if resp.ContentLength > 0 { - attrs = append(attrs, c.HTTPResponseContentLengthKey.Int(int(resp.ContentLength))) - } - return attrs -} - -// ClientRequest returns attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.url", "http.method", -// "net.peer.name". The following attributes are returned if the related values -// are defined in req: "net.peer.port", "user_agent.original", -// "http.request_content_length", "user_agent.original". -func (c *httpConv) ClientRequest(req *http.Request, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - user_agent.original string - http.url string - net.peer.name string - net.peer.port int - http.request_content_length int - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. See ClientResponse. - http.response_content_length This requires the response. See ClientResponse. - net.sock.family This requires the socket used. - net.sock.peer.addr This requires the socket used. - net.sock.peer.name This requires the socket used. - net.sock.peer.port This requires the socket used. - http.resend_count This is something outside of a single request. - net.protocol.name The value is the Request is ignored, and the go client will always use "http". - net.protocol.version The value in the Request is ignored, and the go client will always use 1.1 or 2.0. - */ - n := 3 // URL, peer name, proto, and method. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - if req.ContentLength > 0 { - n++ - } - - attrs = slices.Grow(attrs, n) - attrs = append(attrs, c.method(req.Method)) - - var u string - if req.URL != nil { - // Remove any username/password info that may be in the URL. - userinfo := req.URL.User - req.URL.User = nil - u = req.URL.String() - // Restore any username/password info that was removed. - req.URL.User = userinfo - } - attrs = append(attrs, c.HTTPURLKey.String(u)) - - attrs = append(attrs, c.NetConv.PeerName(peer)) - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if l := req.ContentLength; l > 0 { - attrs = append(attrs, c.HTTPRequestContentLengthKey.Int64(l)) - } - - return attrs -} - -// ClientRequestMetrics returns metric attributes for an HTTP request made by a client. The -// following attributes are always returned: "http.method", "net.peer.name". -// The following attributes are returned if the related values -// are defined in req: "net.peer.port". -func (c *httpConv) ClientRequestMetrics(req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - net.peer.name string - net.peer.port int - */ - - n := 2 // method, peer name. - var h string - if req.URL != nil { - h = req.URL.Host - } - peer, p := firstHostPort(h, req.Header.Get("Host")) - port := requiredHTTPPort(req.URL != nil && req.URL.Scheme == "https", p) - if port > 0 { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.method(req.Method), c.NetConv.PeerName(peer)) - - if port > 0 { - attrs = append(attrs, c.NetConv.PeerPort(port)) - } - - return attrs -} - -// ServerRequest returns attributes for an HTTP request received by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "http.target", "net.host.name". The following attributes are returned if they -// related values are defined in req: "net.host.port", "net.sock.peer.addr", -// "net.sock.peer.port", "user_agent.original", "http.client_ip", -// "net.protocol.name", "net.protocol.version". -func (c *httpConv) ServerRequest(server string, req *http.Request, opts HTTPServerRequestOptions, attrs []attribute.KeyValue) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.method string - http.scheme string - net.host.name string - net.host.port int - net.sock.peer.addr string - net.sock.peer.port int - user_agent.original string - http.client_ip string - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - http.target string Note: doesn't include the query parameter. - */ - - /* The following semantic conventions are not returned: - http.status_code This requires the response. - http.request_content_length This requires the len() of body, which can mutate it. - http.response_content_length This requires the response. - http.route This is not available. - net.sock.peer.name This would require a DNS lookup. - net.sock.host.addr The request doesn't have access to the underlying socket. - net.sock.host.port The request doesn't have access to the underlying socket. - - */ - n := 4 // Method, scheme, proto, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - peer, peerPort := splitHostPort(req.RemoteAddr) - if peer != "" { - n++ - if peerPort > 0 { - n++ - } - } - useragent := req.UserAgent() - if useragent != "" { - n++ - } - - // For client IP, use, in order: - // 1. The value passed in the options - // 2. The value in the X-Forwarded-For header - // 3. The peer address - clientIP := opts.HTTPClientIP - if clientIP == "" { - clientIP = serverClientIP(req.Header.Get("X-Forwarded-For")) - if clientIP == "" { - clientIP = peer - } - } - if clientIP != "" { - n++ - } - - var target string - if req.URL != nil { - target = req.URL.Path - if target != "" { - n++ - } - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" && protoName != "http" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs = slices.Grow(attrs, n) - - attrs = append(attrs, c.method(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - - if peer != "" { - // The Go HTTP server sets RemoteAddr to "IP:port", this will not be a - // file-path that would be interpreted with a sock family. - attrs = append(attrs, c.NetConv.SockPeerAddr(peer)) - if peerPort > 0 { - attrs = append(attrs, c.NetConv.SockPeerPort(peerPort)) - } - } - - if useragent != "" { - attrs = append(attrs, c.UserAgentOriginalKey.String(useragent)) - } - - if clientIP != "" { - attrs = append(attrs, c.HTTPClientIPKey.String(clientIP)) - } - - if target != "" { - attrs = append(attrs, c.HTTPTargetKey.String(target)) - } - - if protoName != "" && protoName != "http" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -// ServerRequestMetrics returns metric attributes for an HTTP request received -// by a server. -// -// The server must be the primary server name if it is known. For example this -// would be the ServerName directive -// (https://httpd.apache.org/docs/2.4/mod/core.html#servername) for an Apache -// server, and the server_name directive -// (http://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) for an -// nginx server. More generically, the primary server name would be the host -// header value that matches the default virtual host of an HTTP server. It -// should include the host identifier and if a port is used to route to the -// server that port identifier should be included as an appropriate port -// suffix. -// -// If the primary server name is not known, server should be an empty string. -// The req Host will be used to determine the server instead. -// -// The following attributes are always returned: "http.method", "http.scheme", -// "net.host.name". The following attributes are returned if they related -// values are defined in req: "net.host.port". -func (c *httpConv) ServerRequestMetrics(server string, req *http.Request) []attribute.KeyValue { - /* The following semantic conventions are returned if present: - http.scheme string - http.route string - http.method string - http.status_code int - net.host.name string - net.host.port int - net.protocol.name string Note: not set if the value is "http". - net.protocol.version string - */ - - n := 3 // Method, scheme, and host name. - var host string - var p int - if server == "" { - host, p = splitHostPort(req.Host) - } else { - // Prioritize the primary server name. - host, p = splitHostPort(server) - if p < 0 { - _, p = splitHostPort(req.Host) - } - } - hostPort := requiredHTTPPort(req.TLS != nil, p) - if hostPort > 0 { - n++ - } - protoName, protoVersion := netProtocol(req.Proto) - if protoName != "" { - n++ - } - if protoVersion != "" { - n++ - } - - attrs := make([]attribute.KeyValue, 0, n) - - attrs = append(attrs, c.methodMetric(req.Method)) - attrs = append(attrs, c.scheme(req.TLS != nil)) - attrs = append(attrs, c.NetConv.HostName(host)) - - if hostPort > 0 { - attrs = append(attrs, c.NetConv.HostPort(hostPort)) - } - if protoName != "" { - attrs = append(attrs, c.NetConv.NetProtocolName.String(protoName)) - } - if protoVersion != "" { - attrs = append(attrs, c.NetConv.NetProtocolVersion.String(protoVersion)) - } - - return attrs -} - -func (c *httpConv) method(method string) attribute.KeyValue { - if method == "" { - return c.HTTPMethodKey.String(http.MethodGet) - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) methodMetric(method string) attribute.KeyValue { - method = strings.ToUpper(method) - switch method { - case http.MethodConnect, http.MethodDelete, http.MethodGet, http.MethodHead, http.MethodOptions, http.MethodPatch, http.MethodPost, http.MethodPut, http.MethodTrace: - default: - method = "_OTHER" - } - return c.HTTPMethodKey.String(method) -} - -func (c *httpConv) scheme(https bool) attribute.KeyValue { // nolint:revive - if https { - return c.HTTPSchemeHTTPS - } - return c.HTTPSchemeHTTP -} - -func serverClientIP(xForwardedFor string) string { - if idx := strings.Index(xForwardedFor, ","); idx >= 0 { - xForwardedFor = xForwardedFor[:idx] - } - return xForwardedFor -} - -func requiredHTTPPort(https bool, port int) int { // nolint:revive - if https { - if port > 0 && port != 443 { - return port - } - } else { - if port > 0 && port != 80 { - return port - } - } - return -1 -} - -// Return the request host and port from the first non-empty source. -func firstHostPort(source ...string) (host string, port int) { - for _, hostport := range source { - host, port = splitHostPort(hostport) - if host != "" || port > 0 { - break - } - } - return -} - -// ClientStatus returns a span status code and message for an HTTP status code -// value received by a client. -func (c *httpConv) ClientStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 400 { - return codes.Error, "" - } - return codes.Unset, "" -} - -// ServerStatus returns a span status code and message for an HTTP status code -// value returned by a server. Status codes in the 400-499 range are not -// returned as errors. -func (c *httpConv) ServerStatus(code int) (codes.Code, string) { - if code < 100 || code >= 600 { - return codes.Error, fmt.Sprintf("Invalid HTTP status code %d", code) - } - if code >= 500 { - return codes.Error, "" - } - return codes.Unset, "" -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go deleted file mode 100644 index df97255e41..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil/netconv.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/semconvutil/netconv.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconvutil // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil" - -import ( - "net" - "strconv" - "strings" - - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.20.0" -) - -// NetTransport returns a trace attribute describing the transport protocol of the -// passed network. See the net.Dial for information about acceptable network -// values. -func NetTransport(network string) attribute.KeyValue { - return nc.Transport(network) -} - -// netConv are the network semantic convention attributes defined for a version -// of the OpenTelemetry specification. -type netConv struct { - NetHostNameKey attribute.Key - NetHostPortKey attribute.Key - NetPeerNameKey attribute.Key - NetPeerPortKey attribute.Key - NetProtocolName attribute.Key - NetProtocolVersion attribute.Key - NetSockFamilyKey attribute.Key - NetSockPeerAddrKey attribute.Key - NetSockPeerPortKey attribute.Key - NetSockHostAddrKey attribute.Key - NetSockHostPortKey attribute.Key - NetTransportOther attribute.KeyValue - NetTransportTCP attribute.KeyValue - NetTransportUDP attribute.KeyValue - NetTransportInProc attribute.KeyValue -} - -var nc = &netConv{ - NetHostNameKey: semconv.NetHostNameKey, - NetHostPortKey: semconv.NetHostPortKey, - NetPeerNameKey: semconv.NetPeerNameKey, - NetPeerPortKey: semconv.NetPeerPortKey, - NetProtocolName: semconv.NetProtocolNameKey, - NetProtocolVersion: semconv.NetProtocolVersionKey, - NetSockFamilyKey: semconv.NetSockFamilyKey, - NetSockPeerAddrKey: semconv.NetSockPeerAddrKey, - NetSockPeerPortKey: semconv.NetSockPeerPortKey, - NetSockHostAddrKey: semconv.NetSockHostAddrKey, - NetSockHostPortKey: semconv.NetSockHostPortKey, - NetTransportOther: semconv.NetTransportOther, - NetTransportTCP: semconv.NetTransportTCP, - NetTransportUDP: semconv.NetTransportUDP, - NetTransportInProc: semconv.NetTransportInProc, -} - -func (c *netConv) Transport(network string) attribute.KeyValue { - switch network { - case "tcp", "tcp4", "tcp6": - return c.NetTransportTCP - case "udp", "udp4", "udp6": - return c.NetTransportUDP - case "unix", "unixgram", "unixpacket": - return c.NetTransportInProc - default: - // "ip:*", "ip4:*", and "ip6:*" all are considered other. - return c.NetTransportOther - } -} - -// Host returns attributes for a network host address. -func (c *netConv) Host(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.HostName(h)) - if p > 0 { - attrs = append(attrs, c.HostPort(p)) - } - return attrs -} - -func (c *netConv) HostName(name string) attribute.KeyValue { - return c.NetHostNameKey.String(name) -} - -func (c *netConv) HostPort(port int) attribute.KeyValue { - return c.NetHostPortKey.Int(port) -} - -func family(network, address string) string { - switch network { - case "unix", "unixgram", "unixpacket": - return "unix" - default: - if ip := net.ParseIP(address); ip != nil { - if ip.To4() == nil { - return "inet6" - } - return "inet" - } - } - return "" -} - -// Peer returns attributes for a network peer address. -func (c *netConv) Peer(address string) []attribute.KeyValue { - h, p := splitHostPort(address) - var n int - if h != "" { - n++ - if p > 0 { - n++ - } - } - - if n == 0 { - return nil - } - - attrs := make([]attribute.KeyValue, 0, n) - attrs = append(attrs, c.PeerName(h)) - if p > 0 { - attrs = append(attrs, c.PeerPort(p)) - } - return attrs -} - -func (c *netConv) PeerName(name string) attribute.KeyValue { - return c.NetPeerNameKey.String(name) -} - -func (c *netConv) PeerPort(port int) attribute.KeyValue { - return c.NetPeerPortKey.Int(port) -} - -func (c *netConv) SockPeerAddr(addr string) attribute.KeyValue { - return c.NetSockPeerAddrKey.String(addr) -} - -func (c *netConv) SockPeerPort(port int) attribute.KeyValue { - return c.NetSockPeerPortKey.Int(port) -} - -// splitHostPort splits a network address hostport of the form "host", -// "host%zone", "[host]", "[host%zone], "host:port", "host%zone:port", -// "[host]:port", "[host%zone]:port", or ":port" into host or host%zone and -// port. -// -// An empty host is returned if it is not provided or unparsable. A negative -// port is returned if it is not provided or unparsable. -func splitHostPort(hostport string) (host string, port int) { - port = -1 - - if strings.HasPrefix(hostport, "[") { - addrEnd := strings.LastIndex(hostport, "]") - if addrEnd < 0 { - // Invalid hostport. - return - } - if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 { - host = hostport[1:addrEnd] - return - } - } else { - if i := strings.LastIndex(hostport, ":"); i < 0 { - host = hostport - return - } - } - - host, pStr, err := net.SplitHostPort(hostport) - if err != nil { - return - } - - p, err := strconv.ParseUint(pStr, 10, 16) - if err != nil { - return - } - return host, int(p) // nolint: gosec // Bitsize checked to be 16 above. -} - -func netProtocol(proto string) (name string, version string) { - name, version, _ = strings.Cut(proto, "/") - switch name { - case "HTTP": - name = "http" - case "QUIC": - name = "quic" - case "SPDY": - name = "spdy" - default: - name = strings.ToLower(name) - } - return name, version -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go deleted file mode 100644 index d62ce44b00..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/labeler.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "context" - "sync" - - "go.opentelemetry.io/otel/attribute" -) - -// Labeler is used to allow instrumented HTTP handlers to add custom attributes to -// the metrics recorded by the net/http instrumentation. -type Labeler struct { - mu sync.Mutex - attributes []attribute.KeyValue -} - -// Add attributes to a Labeler. -func (l *Labeler) Add(ls ...attribute.KeyValue) { - l.mu.Lock() - defer l.mu.Unlock() - l.attributes = append(l.attributes, ls...) -} - -// Get returns a copy of the attributes added to the Labeler. -func (l *Labeler) Get() []attribute.KeyValue { - l.mu.Lock() - defer l.mu.Unlock() - ret := make([]attribute.KeyValue, len(l.attributes)) - copy(ret, l.attributes) - return ret -} - -type labelerContextKeyType int - -const labelerContextKey labelerContextKeyType = 0 - -// ContextWithLabeler returns a new context with the provided Labeler instance. -// Attributes added to the specified labeler will be injected into metrics -// emitted by the instrumentation. Only one labeller can be injected into the -// context. Injecting it multiple times will override the previous calls. -func ContextWithLabeler(parent context.Context, l *Labeler) context.Context { - return context.WithValue(parent, labelerContextKey, l) -} - -// LabelerFromContext retrieves a Labeler instance from the provided context if -// one is available. If no Labeler was found in the provided context a new, empty -// Labeler is returned and the second return value is false. In this case it is -// safe to use the Labeler but any attributes added to it will not be used. -func LabelerFromContext(ctx context.Context) (*Labeler, bool) { - l, ok := ctx.Value(labelerContextKey).(*Labeler) - if !ok { - l = &Labeler{} - } - return l, ok -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go deleted file mode 100644 index 9476ef01b0..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/start_time_context.go +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "context" - "time" -) - -type startTimeContextKeyType int - -const startTimeContextKey startTimeContextKeyType = 0 - -// ContextWithStartTime returns a new context with the provided start time. The -// start time will be used for metrics and traces emitted by the -// instrumentation. Only one labeller can be injected into the context. -// Injecting it multiple times will override the previous calls. -func ContextWithStartTime(parent context.Context, start time.Time) context.Context { - return context.WithValue(parent, startTimeContextKey, start) -} - -// StartTimeFromContext retrieves a time.Time from the provided context if one -// is available. If no start time was found in the provided context, a new, -// zero start time is returned and the second return value is false. -func StartTimeFromContext(ctx context.Context) time.Time { - t, _ := ctx.Value(startTimeContextKey).(time.Time) - return t -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go deleted file mode 100644 index 44b86ad860..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/transport.go +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -import ( - "context" - "io" - "net/http" - "net/http/httptrace" - "sync/atomic" - "time" - - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv" - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/propagation" - - "go.opentelemetry.io/otel/trace" -) - -// Transport implements the http.RoundTripper interface and wraps -// outbound HTTP(S) requests with a span and enriches it with metrics. -type Transport struct { - rt http.RoundTripper - - tracer trace.Tracer - propagators propagation.TextMapPropagator - spanStartOptions []trace.SpanStartOption - filters []Filter - spanNameFormatter func(string, *http.Request) string - clientTrace func(context.Context) *httptrace.ClientTrace - metricAttributesFn func(*http.Request) []attribute.KeyValue - - semconv semconv.HTTPClient -} - -var _ http.RoundTripper = &Transport{} - -// NewTransport wraps the provided http.RoundTripper with one that -// starts a span, injects the span context into the outbound request headers, -// and enriches it with metrics. -// -// If the provided http.RoundTripper is nil, http.DefaultTransport will be used -// as the base http.RoundTripper. -func NewTransport(base http.RoundTripper, opts ...Option) *Transport { - if base == nil { - base = http.DefaultTransport - } - - t := Transport{ - rt: base, - } - - defaultOpts := []Option{ - WithSpanOptions(trace.WithSpanKind(trace.SpanKindClient)), - WithSpanNameFormatter(defaultTransportFormatter), - } - - c := newConfig(append(defaultOpts, opts...)...) - t.applyConfig(c) - - return &t -} - -func (t *Transport) applyConfig(c *config) { - t.tracer = c.Tracer - t.propagators = c.Propagators - t.spanStartOptions = c.SpanStartOptions - t.filters = c.Filters - t.spanNameFormatter = c.SpanNameFormatter - t.clientTrace = c.ClientTrace - t.semconv = semconv.NewHTTPClient(c.Meter) - t.metricAttributesFn = c.MetricAttributesFn -} - -func defaultTransportFormatter(_ string, r *http.Request) string { - return "HTTP " + r.Method -} - -// RoundTrip creates a Span and propagates its context via the provided request's headers -// before handing the request to the configured base RoundTripper. The created span will -// end when the response body is closed or when a read from the body returns io.EOF. -func (t *Transport) RoundTrip(r *http.Request) (*http.Response, error) { - requestStartTime := time.Now() - for _, f := range t.filters { - if !f(r) { - // Simply pass through to the base RoundTripper if a filter rejects the request - return t.rt.RoundTrip(r) - } - } - - tracer := t.tracer - - if tracer == nil { - if span := trace.SpanFromContext(r.Context()); span.SpanContext().IsValid() { - tracer = newTracer(span.TracerProvider()) - } else { - tracer = newTracer(otel.GetTracerProvider()) - } - } - - opts := append([]trace.SpanStartOption{}, t.spanStartOptions...) // start with the configured options - - ctx, span := tracer.Start(r.Context(), t.spanNameFormatter("", r), opts...) - - if t.clientTrace != nil { - ctx = httptrace.WithClientTrace(ctx, t.clientTrace(ctx)) - } - - labeler, found := LabelerFromContext(ctx) - if !found { - ctx = ContextWithLabeler(ctx, labeler) - } - - r = r.Clone(ctx) // According to RoundTripper spec, we shouldn't modify the origin request. - - // if request body is nil or NoBody, we don't want to mutate the body as it - // will affect the identity of it in an unforeseeable way because we assert - // ReadCloser fulfills a certain interface and it is indeed nil or NoBody. - bw := request.NewBodyWrapper(r.Body, func(int64) {}) - if r.Body != nil && r.Body != http.NoBody { - r.Body = bw - } - - span.SetAttributes(t.semconv.RequestTraceAttrs(r)...) - t.propagators.Inject(ctx, propagation.HeaderCarrier(r.Header)) - - res, err := t.rt.RoundTrip(r) - if err != nil { - // set error type attribute if the error is part of the predefined - // error types. - // otherwise, record it as an exception - if errType := t.semconv.ErrorType(err); errType.Valid() { - span.SetAttributes(errType) - } else { - span.RecordError(err) - } - - span.SetStatus(codes.Error, err.Error()) - span.End() - return res, err - } - - // metrics - metricOpts := t.semconv.MetricOptions(semconv.MetricAttributes{ - Req: r, - StatusCode: res.StatusCode, - AdditionalAttributes: append(labeler.Get(), t.metricAttributesFromRequest(r)...), - }) - - // For handling response bytes we leverage a callback when the client reads the http response - readRecordFunc := func(n int64) { - t.semconv.RecordResponseSize(ctx, n, metricOpts) - } - - // traces - span.SetAttributes(t.semconv.ResponseTraceAttrs(res)...) - span.SetStatus(t.semconv.Status(res.StatusCode)) - - res.Body = newWrappedBody(span, readRecordFunc, res.Body) - - // Use floating point division here for higher precision (instead of Millisecond method). - elapsedTime := float64(time.Since(requestStartTime)) / float64(time.Millisecond) - - t.semconv.RecordMetrics(ctx, semconv.MetricData{ - RequestSize: bw.BytesRead(), - ElapsedTime: elapsedTime, - }, metricOpts) - - return res, nil -} - -func (t *Transport) metricAttributesFromRequest(r *http.Request) []attribute.KeyValue { - var attributeForRequest []attribute.KeyValue - if t.metricAttributesFn != nil { - attributeForRequest = t.metricAttributesFn(r) - } - return attributeForRequest -} - -// newWrappedBody returns a new and appropriately scoped *wrappedBody as an -// io.ReadCloser. If the passed body implements io.Writer, the returned value -// will implement io.ReadWriteCloser. -func newWrappedBody(span trace.Span, record func(n int64), body io.ReadCloser) io.ReadCloser { - // The successful protocol switch responses will have a body that - // implement an io.ReadWriteCloser. Ensure this interface type continues - // to be satisfied if that is the case. - if _, ok := body.(io.ReadWriteCloser); ok { - return &wrappedBody{span: span, record: record, body: body} - } - - // Remove the implementation of the io.ReadWriteCloser and only implement - // the io.ReadCloser. - return struct{ io.ReadCloser }{&wrappedBody{span: span, record: record, body: body}} -} - -// wrappedBody is the response body type returned by the transport -// instrumentation to complete a span. Errors encountered when using the -// response body are recorded in span tracking the response. -// -// The span tracking the response is ended when this body is closed. -// -// If the response body implements the io.Writer interface (i.e. for -// successful protocol switches), the wrapped body also will. -type wrappedBody struct { - span trace.Span - recorded atomic.Bool - record func(n int64) - body io.ReadCloser - read atomic.Int64 -} - -var _ io.ReadWriteCloser = &wrappedBody{} - -func (wb *wrappedBody) Write(p []byte) (int, error) { - // This will not panic given the guard in newWrappedBody. - n, err := wb.body.(io.Writer).Write(p) - if err != nil { - wb.span.RecordError(err) - wb.span.SetStatus(codes.Error, err.Error()) - } - return n, err -} - -func (wb *wrappedBody) Read(b []byte) (int, error) { - n, err := wb.body.Read(b) - // Record the number of bytes read - wb.read.Add(int64(n)) - - switch err { - case nil: - // nothing to do here but fall through to the return - case io.EOF: - wb.recordBytesRead() - wb.span.End() - default: - wb.span.RecordError(err) - wb.span.SetStatus(codes.Error, err.Error()) - } - return n, err -} - -// recordBytesRead is a function that ensures the number of bytes read is recorded once and only once. -func (wb *wrappedBody) recordBytesRead() { - // note: it is more performant (and equally correct) to use atomic.Bool over sync.Once here. In the event that - // two goroutines are racing to call this method, the number of bytes read will no longer increase. Using - // CompareAndSwap allows later goroutines to return quickly and not block waiting for the race winner to finish - // calling wb.record(wb.read.Load()). - if wb.recorded.CompareAndSwap(false, true) { - // Record the total number of bytes read - wb.record(wb.read.Load()) - } -} - -func (wb *wrappedBody) Close() error { - wb.recordBytesRead() - wb.span.End() - if wb.body != nil { - return wb.body.Close() - } - return nil -} diff --git a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go b/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go deleted file mode 100644 index 6be4c1fde2..0000000000 --- a/vendor/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/version.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otelhttp // import "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - -// Version is the current release version of the otelhttp instrumentation. -func Version() string { - return "0.61.0" - // This string is updated by the pre_release.sh script during release -} diff --git a/vendor/go.opentelemetry.io/otel/.clomonitor.yml b/vendor/go.opentelemetry.io/otel/.clomonitor.yml deleted file mode 100644 index 128d61a226..0000000000 --- a/vendor/go.opentelemetry.io/otel/.clomonitor.yml +++ /dev/null @@ -1,3 +0,0 @@ -exemptions: - - check: artifacthub_badge - reason: "Artifact Hub doesn't support Go packages" diff --git a/vendor/go.opentelemetry.io/otel/.codespellignore b/vendor/go.opentelemetry.io/otel/.codespellignore deleted file mode 100644 index a6d0cbcc9e..0000000000 --- a/vendor/go.opentelemetry.io/otel/.codespellignore +++ /dev/null @@ -1,11 +0,0 @@ -ot -fo -te -collison -consequentially -ans -nam -valu -thirdparty -addOpt -observ diff --git a/vendor/go.opentelemetry.io/otel/.codespellrc b/vendor/go.opentelemetry.io/otel/.codespellrc deleted file mode 100644 index e2cb3ea944..0000000000 --- a/vendor/go.opentelemetry.io/otel/.codespellrc +++ /dev/null @@ -1,10 +0,0 @@ -# https://github.com/codespell-project/codespell -[codespell] -builtin = clear,rare,informal -check-filenames = -check-hidden = -ignore-words = .codespellignore -interactive = 1 -skip = .git,go.mod,go.sum,go.work,go.work.sum,semconv,venv,.tools -uri-ignore-words-list = * -write = diff --git a/vendor/go.opentelemetry.io/otel/.gitattributes b/vendor/go.opentelemetry.io/otel/.gitattributes deleted file mode 100644 index 314766e91b..0000000000 --- a/vendor/go.opentelemetry.io/otel/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -* text=auto eol=lf -*.{cmd,[cC][mM][dD]} text eol=crlf -*.{bat,[bB][aA][tT]} text eol=crlf diff --git a/vendor/go.opentelemetry.io/otel/.gitignore b/vendor/go.opentelemetry.io/otel/.gitignore deleted file mode 100644 index 749e8e881b..0000000000 --- a/vendor/go.opentelemetry.io/otel/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -.DS_Store -Thumbs.db - -.cache/ -.tools/ -venv/ -.idea/ -.vscode/ -*.iml -*.so -coverage.* -go.work -go.work.sum - -gen/ diff --git a/vendor/go.opentelemetry.io/otel/.golangci.yml b/vendor/go.opentelemetry.io/otel/.golangci.yml deleted file mode 100644 index 1b1b2aff9a..0000000000 --- a/vendor/go.opentelemetry.io/otel/.golangci.yml +++ /dev/null @@ -1,263 +0,0 @@ -version: "2" -run: - issues-exit-code: 1 - tests: true -linters: - default: none - enable: - - asasalint - - bodyclose - - depguard - - errcheck - - errorlint - - gocritic - - godot - - gosec - - govet - - ineffassign - - misspell - - perfsprint - - revive - - staticcheck - - testifylint - - unconvert - - unparam - - unused - - usestdlibvars - - usetesting - settings: - depguard: - rules: - auto/sdk: - files: - - '!internal/global/trace.go' - - ~internal/global/trace_test.go - deny: - - pkg: go.opentelemetry.io/auto/sdk - desc: Do not use SDK from automatic instrumentation. - non-tests: - files: - - '!$test' - - '!**/*test/*.go' - - '!**/internal/matchers/*.go' - deny: - - pkg: testing - - pkg: github.com/stretchr/testify - - pkg: crypto/md5 - - pkg: crypto/sha1 - - pkg: crypto/**/pkix - otel-internal: - files: - - '**/sdk/*.go' - - '**/sdk/**/*.go' - - '**/exporters/*.go' - - '**/exporters/**/*.go' - - '**/schema/*.go' - - '**/schema/**/*.go' - - '**/metric/*.go' - - '**/metric/**/*.go' - - '**/bridge/*.go' - - '**/bridge/**/*.go' - - '**/trace/*.go' - - '**/trace/**/*.go' - - '**/log/*.go' - - '**/log/**/*.go' - deny: - - pkg: go.opentelemetry.io/otel/internal$ - desc: Do not use cross-module internal packages. - - pkg: go.opentelemetry.io/otel/internal/internaltest - desc: Do not use cross-module internal packages. - otlp-internal: - files: - - '!**/exporters/otlp/internal/**/*.go' - deny: - - pkg: go.opentelemetry.io/otel/exporters/otlp/internal - desc: Do not use cross-module internal packages. - otlpmetric-internal: - files: - - '!**/exporters/otlp/otlpmetric/internal/*.go' - - '!**/exporters/otlp/otlpmetric/internal/**/*.go' - deny: - - pkg: go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal - desc: Do not use cross-module internal packages. - otlptrace-internal: - files: - - '!**/exporters/otlp/otlptrace/*.go' - - '!**/exporters/otlp/otlptrace/internal/**.go' - deny: - - pkg: go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal - desc: Do not use cross-module internal packages. - gocritic: - disabled-checks: - - appendAssign - - commentedOutCode - - dupArg - - hugeParam - - importShadow - - preferDecodeRune - - rangeValCopy - - unnamedResult - - whyNoLint - enable-all: true - godot: - exclude: - # Exclude links. - - '^ *\[[^]]+\]:' - # Exclude sentence fragments for lists. - - ^[ ]*[-•] - # Exclude sentences prefixing a list. - - :$ - misspell: - locale: US - ignore-rules: - - cancelled - perfsprint: - int-conversion: true - err-error: true - errorf: true - sprintf1: true - strconcat: true - revive: - confidence: 0.01 - rules: - - name: blank-imports - - name: bool-literal-in-expr - - name: constant-logical-expr - - name: context-as-argument - arguments: - - allowTypesBefore: '*testing.T' - disabled: true - - name: context-keys-type - - name: deep-exit - - name: defer - arguments: - - - call-chain - - loop - - name: dot-imports - - name: duplicated-imports - - name: early-return - arguments: - - preserveScope - - name: empty-block - - name: empty-lines - - name: error-naming - - name: error-return - - name: error-strings - - name: errorf - - name: exported - arguments: - - sayRepetitiveInsteadOfStutters - - name: flag-parameter - - name: identical-branches - - name: if-return - - name: import-shadowing - - name: increment-decrement - - name: indent-error-flow - arguments: - - preserveScope - - name: package-comments - - name: range - - name: range-val-in-closure - - name: range-val-address - - name: redefines-builtin-id - - name: string-format - arguments: - - - panic - - /^[^\n]*$/ - - must not contain line breaks - - name: struct-tag - - name: superfluous-else - arguments: - - preserveScope - - name: time-equal - - name: unconditional-recursion - - name: unexported-return - - name: unhandled-error - arguments: - - fmt.Fprint - - fmt.Fprintf - - fmt.Fprintln - - fmt.Print - - fmt.Printf - - fmt.Println - - name: unused-parameter - - name: unused-receiver - - name: unnecessary-stmt - - name: use-any - - name: useless-break - - name: var-declaration - - name: var-naming - arguments: - - ["ID"] # AllowList - - ["Otel", "Aws", "Gcp"] # DenyList - - name: waitgroup-by-value - testifylint: - enable-all: true - disable: - - float-compare - - go-require - - require-error - usetesting: - context-background: true - context-todo: true - exclusions: - generated: lax - presets: - - common-false-positives - - legacy - - std-error-handling - rules: - - linters: - - revive - path: schema/v.*/types/.* - text: avoid meaningless package names - # TODO: Having appropriate comments for exported objects helps development, - # even for objects in internal packages. Appropriate comments for all - # exported objects should be added and this exclusion removed. - - linters: - - revive - path: .*internal/.* - text: exported (method|function|type|const) (.+) should have comment or be unexported - # Yes, they are, but it's okay in a test. - - linters: - - revive - path: _test\.go - text: exported func.*returns unexported type.*which can be annoying to use - # Example test functions should be treated like main. - - linters: - - revive - path: example.*_test\.go - text: calls to (.+) only in main[(][)] or init[(][)] functions - # It's okay to not run gosec and perfsprint in a test. - - linters: - - gosec - - perfsprint - path: _test\.go - # Ignoring gosec G404: Use of weak random number generator (math/rand instead of crypto/rand) - # as we commonly use it in tests and examples. - - linters: - - gosec - text: 'G404:' - # Ignoring gosec G402: TLS MinVersion too low - # as the https://pkg.go.dev/crypto/tls#Config handles MinVersion default well. - - linters: - - gosec - text: 'G402: TLS MinVersion too low.' -issues: - max-issues-per-linter: 0 - max-same-issues: 0 -formatters: - enable: - - gofumpt - - goimports - - golines - settings: - gofumpt: - extra-rules: true - goimports: - local-prefixes: - - go.opentelemetry.io/otel - golines: - max-len: 120 - exclusions: - generated: lax diff --git a/vendor/go.opentelemetry.io/otel/.lycheeignore b/vendor/go.opentelemetry.io/otel/.lycheeignore deleted file mode 100644 index 994b677df7..0000000000 --- a/vendor/go.opentelemetry.io/otel/.lycheeignore +++ /dev/null @@ -1,13 +0,0 @@ -http://localhost -https://localhost -http://jaeger-collector -https://github.com/open-telemetry/opentelemetry-go/milestone/ -https://github.com/open-telemetry/opentelemetry-go/projects -# Weaver model URL for semantic-conventions repository. -https?:\/\/github\.com\/open-telemetry\/semantic-conventions\/archive\/refs\/tags\/[^.]+\.zip\[[^]]+] -file:///home/runner/work/opentelemetry-go/opentelemetry-go/libraries -file:///home/runner/work/opentelemetry-go/opentelemetry-go/manual -http://4.3.2.1:78/user/123 -file:///home/runner/work/opentelemetry-go/opentelemetry-go/exporters/otlp/otlptrace/otlptracegrpc/internal/observ/dns:/:4317 -# URL works, but it has blocked link checkers. -https://dl.acm.org/doi/10.1145/198429.198435 diff --git a/vendor/go.opentelemetry.io/otel/.markdownlint.yaml b/vendor/go.opentelemetry.io/otel/.markdownlint.yaml deleted file mode 100644 index 3202496c35..0000000000 --- a/vendor/go.opentelemetry.io/otel/.markdownlint.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Default state for all rules -default: true - -# ul-style -MD004: false - -# hard-tabs -MD010: false - -# line-length -MD013: false - -# no-duplicate-header -MD024: - siblings_only: true - -#single-title -MD025: false - -# ol-prefix -MD029: - style: ordered - -# no-inline-html -MD033: false - -# fenced-code-language -MD040: false - diff --git a/vendor/go.opentelemetry.io/otel/CHANGELOG.md b/vendor/go.opentelemetry.io/otel/CHANGELOG.md deleted file mode 100644 index ecbe0582c4..0000000000 --- a/vendor/go.opentelemetry.io/otel/CHANGELOG.md +++ /dev/null @@ -1,3613 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - -This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [Unreleased] - - - - -## [1.39.0/0.61.0/0.15.0/0.0.14] 2025-12-05 - -### Added - -- Greatly reduce the cost of recording metrics in `go.opentelemetry.io/otel/sdk/metric` using hashing for map keys. (#7175) -- Add `WithInstrumentationAttributeSet` option to `go.opentelemetry.io/otel/log`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/trace` packages. - This provides a concurrent-safe and performant alternative to `WithInstrumentationAttributes` by accepting a pre-constructed `attribute.Set`. (#7287) -- Add experimental observability for the Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus`. - Check the `go.opentelemetry.io/otel/exporters/prometheus/internal/x` package documentation for more information. (#7345) -- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7353) -- Add temporality selector functions `DeltaTemporalitySelector`, `CumulativeTemporalitySelector`, `LowMemoryTemporalitySelector` to `go.opentelemetry.io/otel/sdk/metric`. (#7434) -- Add experimental observability metrics for simple log processor in `go.opentelemetry.io/otel/sdk/log`. (#7548) -- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7459) -- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7486) -- Add experimental observability metrics for simple span processor in `go.opentelemetry.io/otel/sdk/trace`. (#7374) -- Add experimental observability metrics in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7512) -- Add experimental observability metrics for manual reader in `go.opentelemetry.io/otel/sdk/metric`. (#7524) -- Add experimental observability metrics for periodic reader in `go.opentelemetry.io/otel/sdk/metric`. (#7571) -- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environmental variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7608) -- Add `Enabled` method to the `Processor` interface in `go.opentelemetry.io/otel/sdk/log`. - All `Processor` implementations now include an `Enabled` method. (#7639) -- The `go.opentelemetry.io/otel/semconv/v1.38.0` package. - The package contains semantic conventions from the `v1.38.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.38.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.37.0.`(#7648) - -### Changed - -- `Distinct` in `go.opentelemetry.io/otel/attribute` is no longer guaranteed to uniquely identify an attribute set. - Collisions between `Distinct` values for different Sets are possible with extremely high cardinality (billions of series per instrument), but are highly unlikely. (#7175) -- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/trace` synchronously de-duplicates the passed attributes instead of delegating it to the returned `TracerOption`. (#7266) -- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/meter` synchronously de-duplicates the passed attributes instead of delegating it to the returned `MeterOption`. (#7266) -- `WithInstrumentationAttributes` in `go.opentelemetry.io/otel/log` synchronously de-duplicates the passed attributes instead of delegating it to the returned `LoggerOption`. (#7266) -- Rename the `OTEL_GO_X_SELF_OBSERVABILITY` environment variable to `OTEL_GO_X_OBSERVABILITY` in `go.opentelemetry.io/otel/sdk/trace`, `go.opentelemetry.io/otel/sdk/log`, and `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7302) -- Improve performance of histogram `Record` in `go.opentelemetry.io/otel/sdk/metric` when min and max are disabled using `NoMinMax`. (#7306) -- Improve error handling for dropped data during translation by using `prometheus.NewInvalidMetric` in `go.opentelemetry.io/otel/exporters/prometheus`. - ⚠️ **Breaking Change:** Previously, these cases were only logged and scrapes succeeded. - Now, when translation would drop data (e.g., invalid label/value), the exporter emits a `NewInvalidMetric`, and Prometheus scrapes **fail with HTTP 500** by default. - To preserve the prior behavior (scrapes succeed while errors are logged), configure your Prometheus HTTP handler with: `promhttp.HandlerOpts{ ErrorHandling: promhttp.ContinueOnError }`. (#7363) -- Replace fnv hash with xxhash in `go.opentelemetry.io/otel/attribute` for better performance. (#7371) -- The default `TranslationStrategy` in `go.opentelemetry.io/exporters/prometheus` is changed from `otlptranslator.NoUTF8EscapingWithSuffixes` to `otlptranslator.UnderscoreEscapingWithSuffixes`. (#7421) -- Improve performance of concurrent measurements in `go.opentelemetry.io/otel/sdk/metric`. (#7427) -- Include W3C TraceFlags (bits 0–7) in the OTLP `Span.Flags` field in `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracehttp` and `go.opentelemetry.io/exporters/otlp/otlptrace/otlptracegrpc`. (#7438) -- The `ErrorType` function in `go.opentelemetry.io/otel/semconv/v1.37.0` now handles custom error types. - If an error implements an `ErrorType() string` method, the return value of that method will be used as the error type. (#7442) - -### Fixed - -- Fix `WithInstrumentationAttributes` options in `go.opentelemetry.io/otel/trace`, `go.opentelemetry.io/otel/metric`, and `go.opentelemetry.io/otel/log` to properly merge attributes when passed multiple times instead of replacing them. - Attributes with duplicate keys will use the last value passed. (#7300) -- The equality of `attribute.Set` when using the `Equal` method is not affected by the user overriding the empty set pointed to by `attribute.EmptySet` in `go.opentelemetry.io/otel/attribute`. (#7357) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#7372) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#7372) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#7372) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#7372) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#7372) -- Return partial OTLP export errors to the caller in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#7372) -- Fix `AddAttributes`, `SetAttributes`, `SetBody` on `Record` in `go.opentelemetry.io/otel/sdk/log` to not mutate input. (#7403) -- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.37.0`. (#7655) -- Do not double record measurements of `RecordSet` methods in `go.opentelemetry.io/otel/semconv/v1.36.0`. (#7656) - -### Removed - -- Drop support for [Go 1.23]. (#7274) -- Remove the `FilterProcessor` interface in `go.opentelemetry.io/otel/sdk/log`. - The `Enabled` method has been added to the `Processor` interface instead. - All `Processor` implementations must now implement the `Enabled` method. - Custom processors that do not filter records can implement `Enabled` to return `true`. (#7639) - -## [1.38.0/0.60.0/0.14.0/0.0.13] 2025-08-29 - -This release is the last to support [Go 1.23]. -The next release will require at least [Go 1.24]. - -### Added - -- Add native histogram exemplar support in `go.opentelemetry.io/otel/exporters/prometheus`. (#6772) -- Add template attribute functions to the `go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6939) - - `ContainerLabel` - - `DBOperationParameter` - - `DBSystemParameter` - - `HTTPRequestHeader` - - `HTTPResponseHeader` - - `K8SCronJobAnnotation` - - `K8SCronJobLabel` - - `K8SDaemonSetAnnotation` - - `K8SDaemonSetLabel` - - `K8SDeploymentAnnotation` - - `K8SDeploymentLabel` - - `K8SJobAnnotation` - - `K8SJobLabel` - - `K8SNamespaceAnnotation` - - `K8SNamespaceLabel` - - `K8SNodeAnnotation` - - `K8SNodeLabel` - - `K8SPodAnnotation` - - `K8SPodLabel` - - `K8SReplicaSetAnnotation` - - `K8SReplicaSetLabel` - - `K8SStatefulSetAnnotation` - - `K8SStatefulSetLabel` - - `ProcessEnvironmentVariable` - - `RPCConnectRPCRequestMetadata` - - `RPCConnectRPCResponseMetadata` - - `RPCGRPCRequestMetadata` - - `RPCGRPCResponseMetadata` -- Add `ErrorType` attribute helper function to the `go.opentelmetry.io/otel/semconv/v1.34.0` package. (#6962) -- Add `WithAllowKeyDuplication` in `go.opentelemetry.io/otel/sdk/log` which can be used to disable deduplication for log records. (#6968) -- Add `WithCardinalityLimit` option to configure the cardinality limit in `go.opentelemetry.io/otel/sdk/metric`. (#6996, #7065, #7081, #7164, #7165, #7179) -- Add `Clone` method to `Record` in `go.opentelemetry.io/otel/log` that returns a copy of the record with no shared state. (#7001) -- Add experimental self-observability span and batch span processor metrics in `go.opentelemetry.io/otel/sdk/trace`. - Check the `go.opentelemetry.io/otel/sdk/trace/internal/x` package documentation for more information. (#7027, #6393, #7209) -- The `go.opentelemetry.io/otel/semconv/v1.36.0` package. - The package contains semantic conventions from the `v1.36.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.36.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.34.0.`(#7032, #7041) -- Add support for configuring Prometheus name translation using `WithTranslationStrategy` option in `go.opentelemetry.io/otel/exporters/prometheus`. The current default translation strategy when UTF-8 mode is enabled is `NoUTF8EscapingWithSuffixes`, but a future release will change the default strategy to `UnderscoreEscapingWithSuffixes` for compliance with the specification. (#7111) -- Add experimental self-observability log metrics in `go.opentelemetry.io/otel/sdk/log`. - Check the `go.opentelemetry.io/otel/sdk/log/internal/x` package documentation for more information. (#7121) -- Add experimental self-observability trace exporter metrics in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. - Check the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace/internal/x` package documentation for more information. (#7133) -- Support testing of [Go 1.25]. (#7187) -- The `go.opentelemetry.io/otel/semconv/v1.37.0` package. - The package contains semantic conventions from the `v1.37.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.37.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.36.0.`(#7254) - -### Changed - -- Optimize `TraceIDFromHex` and `SpanIDFromHex` in `go.opentelemetry.io/otel/sdk/trace`. (#6791) -- Change `AssertEqual` in `go.opentelemetry.io/otel/log/logtest` to accept `TestingT` in order to support benchmarks and fuzz tests. (#6908) -- Change `DefaultExemplarReservoirProviderSelector` in `go.opentelemetry.io/otel/sdk/metric` to use `runtime.GOMAXPROCS(0)` instead of `runtime.NumCPU()` for the `FixedSizeReservoirProvider` default size. (#7094) - -### Fixed - -- `SetBody` method of `Record` in `go.opentelemetry.io/otel/sdk/log` now deduplicates key-value collections (`log.Value` of `log.KindMap` from `go.opentelemetry.io/otel/log`). (#7002) -- Fix `go.opentelemetry.io/otel/exporters/prometheus` to not append a suffix if it's already present in metric name. (#7088) -- Fix the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` self-observability component type and name. (#7195) -- Fix partial export count metric in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace`. (#7199) - -### Deprecated - -- Deprecate `WithoutUnits` and `WithoutCounterSuffixes` options, preferring `WithTranslationStrategy` instead. (#7111) -- Deprecate support for `OTEL_GO_X_CARDINALITY_LIMIT` environment variable in `go.opentelemetry.io/otel/sdk/metric`. Use `WithCardinalityLimit` option instead. (#7166) - -## [0.59.1] 2025-07-21 - -### Changed - -- Retract `v0.59.0` release of `go.opentelemetry.io/otel/exporters/prometheus` module which appends incorrect unit suffixes. (#7046) -- Change `go.opentelemetry.io/otel/exporters/prometheus` to no longer deduplicate suffixes when UTF8 is enabled. - It is recommended to disable unit and counter suffixes in the exporter, and manually add suffixes if you rely on the existing behavior. (#7044) - -### Fixed - -- Fix `go.opentelemetry.io/otel/exporters/prometheus` to properly handle unit suffixes when the unit is in brackets. - E.g. `{spans}`. (#7044) - -## [1.37.0/0.59.0/0.13.0] 2025-06-25 - -### Added - -- The `go.opentelemetry.io/otel/semconv/v1.33.0` package. - The package contains semantic conventions from the `v1.33.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.33.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.32.0.`(#6799) -- The `go.opentelemetry.io/otel/semconv/v1.34.0` package. - The package contains semantic conventions from the `v1.34.0` version of the OpenTelemetry Semantic Conventions. (#6812) -- Add metric's schema URL as `otel_scope_schema_url` label in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947) -- Add metric's scope attributes as `otel_scope_[attribute]` labels in `go.opentelemetry.io/otel/exporters/prometheus`. (#5947) -- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/log`. (#6825) -- Add `EventName` to `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6825) -- Changed handling of `go.opentelemetry.io/otel/exporters/prometheus` metric renaming to add unit suffixes when it doesn't match one of the pre-defined values in the unit suffix map. (#6839) - -### Changed - -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/bridge/opentracing`. (#6827) -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#6829) -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/metric`. (#6832) -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/resource`. (#6834) -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/sdk/trace`. (#6835) -- The semantic conventions have been upgraded from `v1.26.0` to `v1.34.0` in `go.opentelemetry.io/otel/trace`. (#6836) -- `Record.Resource` now returns `*resource.Resource` instead of `resource.Resource` in `go.opentelemetry.io/otel/sdk/log`. (#6864) -- Retry now shows error cause for context timeout in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6898) - -### Fixed - -- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#6710) -- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#6710) -- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#6710) -- Stop stripping trailing slashes from configured endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#6710) -- Validate exponential histogram scale range for Prometheus compatibility in `go.opentelemetry.io/otel/exporters/prometheus`. (#6822) -- Context cancellation during metric pipeline produce does not corrupt data in `go.opentelemetry.io/otel/sdk/metric`. (#6914) - -### Removed - -- `go.opentelemetry.io/otel/exporters/prometheus` no longer exports `otel_scope_info` metric. (#6770) - -## [0.12.2] 2025-05-22 - -### Fixed - -- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` module that contains invalid dependencies. (#6804) -- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` module that contains invalid dependencies. (#6804) -- Retract `v0.12.0` release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` module that contains invalid dependencies. (#6804) - -## [0.12.1] 2025-05-21 - -### Fixes - -- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6800) -- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6800) -- Use the proper dependency version of `go.opentelemetry.io/otel/sdk/log/logtest` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#6800) - -## [1.36.0/0.58.0/0.12.0] 2025-05-20 - -### Added - -- Add exponential histogram support in `go.opentelemetry.io/otel/exporters/prometheus`. (#6421) -- The `go.opentelemetry.io/otel/semconv/v1.31.0` package. - The package contains semantic conventions from the `v1.31.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.31.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.30.0`. (#6479) -- Add `Recording`, `Scope`, and `Record` types in `go.opentelemetry.io/otel/log/logtest`. (#6507) -- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#6751) -- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#6752) -- Add `WithHTTPClient` option to configure the `http.Client` used by `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6688) -- Add `ValuesGetter` in `go.opentelemetry.io/otel/propagation`, a `TextMapCarrier` that supports retrieving multiple values for a single key. (#5973) -- Add `Values` method to `HeaderCarrier` to implement the new `ValuesGetter` interface in `go.opentelemetry.io/otel/propagation`. (#5973) -- Update `Baggage` in `go.opentelemetry.io/otel/propagation` to retrieve multiple values for a key when the carrier implements `ValuesGetter`. (#5973) -- Add `AssertEqual` function in `go.opentelemetry.io/otel/log/logtest`. (#6662) -- The `go.opentelemetry.io/otel/semconv/v1.32.0` package. - The package contains semantic conventions from the `v1.32.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.32.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.31.0`(#6782) -- Add `Transform` option in `go.opentelemetry.io/otel/log/logtest`. (#6794) -- Add `Desc` option in `go.opentelemetry.io/otel/log/logtest`. (#6796) - -### Removed - -- Drop support for [Go 1.22]. (#6381, #6418) -- Remove `Resource` field from `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. (#6494) -- Remove `RecordFactory` type from `go.opentelemetry.io/otel/log/logtest`. (#6492) -- Remove `ScopeRecords`, `EmittedRecord`, and `RecordFactory` types from `go.opentelemetry.io/otel/log/logtest`. (#6507) -- Remove `AssertRecordEqual` function in `go.opentelemetry.io/otel/log/logtest`, use `AssertEqual` instead. (#6662) - -### Changed - -- ⚠️ Update `github.com/prometheus/client_golang` to `v1.21.1`, which changes the `NameValidationScheme` to `UTF8Validation`. - This allows metrics names to keep original delimiters (e.g. `.`), rather than replacing with underscores. - This can be reverted by setting `github.com/prometheus/common/model.NameValidationScheme` to `LegacyValidation` in `github.com/prometheus/common/model`. (#6433) -- Initialize map with `len(keys)` in `NewAllowKeysFilter` and `NewDenyKeysFilter` to avoid unnecessary allocations in `go.opentelemetry.io/otel/attribute`. (#6455) -- `go.opentelemetry.io/otel/log/logtest` is now a separate Go module. (#6465) -- `go.opentelemetry.io/otel/sdk/log/logtest` is now a separate Go module. (#6466) -- `Recorder` in `go.opentelemetry.io/otel/log/logtest` no longer separately stores records emitted by loggers with the same instrumentation scope. (#6507) -- Improve performance of `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` by not exporting when exporter cannot accept more. (#6569, #6641) - -### Deprecated - -- Deprecate support for `model.LegacyValidation` for `go.opentelemetry.io/otel/exporters/prometheus`. (#6449) - -### Fixes - -- Stop percent encoding header environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6392) -- Ensure the `noopSpan.tracerProvider` method is not inlined in `go.opentelemetry.io/otel/trace` so the `go.opentelemetry.io/auto` instrumentation can instrument non-recording spans. (#6456) -- Use a `sync.Pool` instead of allocating `metricdata.ResourceMetrics` in `go.opentelemetry.io/otel/exporters/prometheus`. (#6472) - -## [1.35.0/0.57.0/0.11.0] 2025-03-05 - -This release is the last to support [Go 1.22]. -The next release will require at least [Go 1.23]. - -### Added - -- Add `ValueFromAttribute` and `KeyValueFromAttribute` in `go.opentelemetry.io/otel/log`. (#6180) -- Add `EventName` and `SetEventName` to `Record` in `go.opentelemetry.io/otel/log`. (#6187) -- Add `EventName` to `RecordFactory` in `go.opentelemetry.io/otel/log/logtest`. (#6187) -- `AssertRecordEqual` in `go.opentelemetry.io/otel/log/logtest` checks `Record.EventName`. (#6187) -- Add `EventName` and `SetEventName` to `Record` in `go.opentelemetry.io/otel/sdk/log`. (#6193) -- Add `EventName` to `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest`. (#6193) -- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#6211) -- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#6211) -- Emit `Record.EventName` field in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` (#6210) -- The `go.opentelemetry.io/otel/semconv/v1.28.0` package. - The package contains semantic conventions from the `v1.28.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.28.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.27.0`(#6236) -- The `go.opentelemetry.io/otel/semconv/v1.30.0` package. - The package contains semantic conventions from the `v1.30.0` version of the OpenTelemetry Semantic Conventions. - See the [migration documentation](./semconv/v1.30.0/MIGRATION.md) for information on how to upgrade from `go.opentelemetry.io/otel/semconv/v1.28.0`(#6240) -- Document the pitfalls of using `Resource` as a comparable type. - `Resource.Equal` and `Resource.Equivalent` should be used instead. (#6272) -- Support [Go 1.24]. (#6304) -- Add `FilterProcessor` and `EnabledParameters` in `go.opentelemetry.io/otel/sdk/log`. - It replaces `go.opentelemetry.io/otel/sdk/log/internal/x.FilterProcessor`. - Compared to previous version it additionally gives the possibility to filter by resource and instrumentation scope. (#6317) - -### Changed - -- Update `github.com/prometheus/common` to `v0.62.0`, which changes the `NameValidationScheme` to `NoEscaping`. - This allows metrics names to keep original delimiters (e.g. `.`), rather than replacing with underscores. - This is controlled by the `Content-Type` header, or can be reverted by setting `NameValidationScheme` to `LegacyValidation` in `github.com/prometheus/common/model`. (#6198) - -### Fixes - -- Eliminate goroutine leak for the processor returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace` when `Shutdown` is called and the passed `ctx` is canceled and `SpanExporter.Shutdown` has not returned. (#6368) -- Eliminate goroutine leak for the processor returned by `NewBatchSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace` when `ForceFlush` is called and the passed `ctx` is canceled and `SpanExporter.Export` has not returned. (#6369) - -## [1.34.0/0.56.0/0.10.0] 2025-01-17 - -### Changed - -- Remove the notices from `Logger` to make the whole Logs API user-facing in `go.opentelemetry.io/otel/log`. (#6167) - -### Fixed - -- Relax minimum Go version to 1.22.0 in various modules. (#6073) -- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` client is corrected from `otlphttpgrpc` to `otlptracegrpc`. (#6143) -- The `Type` name logged for the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlphttpgrpc` client is corrected from `otlphttphttp` to `otlptracehttp`. (#6143) - -## [1.33.0/0.55.0/0.9.0/0.0.12] 2024-12-12 - -### Added - -- Add `Reset` method to `SpanRecorder` in `go.opentelemetry.io/otel/sdk/trace/tracetest`. (#5994) -- Add `EnabledInstrument` interface in `go.opentelemetry.io/otel/sdk/metric/internal/x`. - This is an experimental interface that is implemented by synchronous instruments provided by `go.opentelemetry.io/otel/sdk/metric`. - Users can use it to avoid performing computationally expensive operations when recording measurements. - It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#6016) - -### Changed - -- The default global API now supports full auto-instrumentation from the `go.opentelemetry.io/auto` package. - See that package for more information. (#5920) -- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5929) -- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5929) -- Propagate non-retryable error messages to client in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5929) -- Performance improvements for attribute value `AsStringSlice`, `AsFloat64Slice`, `AsInt64Slice`, `AsBoolSlice`. (#6011) -- Change `EnabledParameters` to have a `Severity` field instead of a getter and setter in `go.opentelemetry.io/otel/log`. (#6009) - -### Fixed - -- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5954) -- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5954) -- Fix inconsistent request body closing in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5954) -- Fix invalid exemplar keys in `go.opentelemetry.io/otel/exporters/prometheus`. (#5995) -- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/trace`. (#5997) -- Fix attribute value truncation in `go.opentelemetry.io/otel/sdk/log`. (#6032) - -## [1.32.0/0.54.0/0.8.0/0.0.11] 2024-11-08 - -### Added - -- Add `go.opentelemetry.io/otel/sdk/metric/exemplar.AlwaysOffFilter`, which can be used to disable exemplar recording. (#5850) -- Add `go.opentelemetry.io/otel/sdk/metric.WithExemplarFilter`, which can be used to configure the exemplar filter used by the metrics SDK. (#5850) -- Add `ExemplarReservoirProviderSelector` and `DefaultExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric`, which defines the exemplar reservoir to use based on the aggregation of the metric. (#5861) -- Add `ExemplarReservoirProviderSelector` to `go.opentelemetry.io/otel/sdk/metric.Stream` to allow using views to configure the exemplar reservoir to use for a metric. (#5861) -- Add `ReservoirProvider`, `HistogramReservoirProvider` and `FixedSizeReservoirProvider` to `go.opentelemetry.io/otel/sdk/metric/exemplar` to make it convenient to use providers of Reservoirs. (#5861) -- The `go.opentelemetry.io/otel/semconv/v1.27.0` package. - The package contains semantic conventions from the `v1.27.0` version of the OpenTelemetry Semantic Conventions. (#5894) -- Add `Attributes attribute.Set` field to `Scope` in `go.opentelemetry.io/otel/sdk/instrumentation`. (#5903) -- Add `Attributes attribute.Set` field to `ScopeRecords` in `go.opentelemetry.io/otel/log/logtest`. (#5927) -- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` adds instrumentation scope attributes. (#5934) -- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` adds instrumentation scope attributes. (#5934) -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` adds instrumentation scope attributes. (#5935) -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` adds instrumentation scope attributes. (#5935) -- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` adds instrumentation scope attributes. (#5933) -- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` adds instrumentation scope attributes. (#5933) -- `go.opentelemetry.io/otel/exporters/prometheus` adds instrumentation scope attributes in `otel_scope_info` metric as labels. (#5932) - -### Changed - -- Support scope attributes and make them as identifying for `Tracer` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/trace`. (#5924) -- Support scope attributes and make them as identifying for `Meter` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/metric`. (#5926) -- Support scope attributes and make them as identifying for `Logger` in `go.opentelemetry.io/otel` and `go.opentelemetry.io/otel/sdk/log`. (#5925) -- Make schema URL and scope attributes as identifying for `Tracer` in `go.opentelemetry.io/otel/bridge/opentracing`. (#5931) -- Clear unneeded slice elements to allow GC to collect the objects in `go.opentelemetry.io/otel/sdk/metric` and `go.opentelemetry.io/otel/sdk/trace`. (#5804) - -### Fixed - -- Global MeterProvider registration unwraps global instrument Observers, the undocumented Unwrap() methods are now private. (#5881) -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5892) -- `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5911) -- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` now keeps the metadata already present in the context when `WithHeaders` is used. (#5915) -- Fix `go.opentelemetry.io/otel/exporters/prometheus` trying to add exemplars to Gauge metrics, which is unsupported. (#5912) -- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#5944) -- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5944) -- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5944) -- Fix `WithEndpointURL` to always use a secure connection when an https URL is passed in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5944) -- Fix incorrect metrics generated from callbacks when multiple readers are used in `go.opentelemetry.io/otel/sdk/metric`. (#5900) - -### Removed - -- Remove all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5930) - -## [1.31.0/0.53.0/0.7.0/0.0.10] 2024-10-11 - -### Added - -- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes `Exemplar`, `Filter`, `TraceBasedFilter`, `AlwaysOnFilter`, `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and `ValueType` types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747, #5862) -- Add `WithExportBufferSize` option to log batch processor.(#5877) - -### Changed - -- Enable exemplars by default in `go.opentelemetry.io/otel/sdk/metric`. Exemplars can be disabled by setting `OTEL_METRICS_EXEMPLAR_FILTER=always_off` (#5778) -- `Logger.Enabled` in `go.opentelemetry.io/otel/log` now accepts a newly introduced `EnabledParameters` type instead of `Record`. (#5791) -- `FilterProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log/internal/x` now accepts `EnabledParameters` instead of `Record`. (#5791) -- The `Record` type in `go.opentelemetry.io/otel/log` is no longer comparable. (#5847) -- Performance improvements for the trace SDK `SetAttributes` method in `Span`. (#5864) -- Reduce memory allocations for the `Event` and `Link` lists in `Span`. (#5858) -- Performance improvements for the trace SDK `AddEvent`, `AddLink`, `RecordError` and `End` methods in `Span`. (#5874) - -### Deprecated - -- Deprecate all examples under `go.opentelemetry.io/otel/example` as they are moved to [Contrib repository](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples). (#5854) - -### Fixed - -- The race condition for multiple `FixedSize` exemplar reservoirs identified in #5814 is resolved. (#5819) -- Fix log records duplication in case of heterogeneous resource attributes by correctly mapping each log record to it's resource and scope. (#5803) -- Fix timer channel drain to avoid hanging on Go 1.23. (#5868) -- Fix delegation for global meter providers, and panic when calling otel.SetMeterProvider. (#5827) -- Change the `reflect.TypeOf` to use a nil pointer to not allocate on the heap unless necessary. (#5827) - -## [1.30.0/0.52.0/0.6.0/0.0.9] 2024-09-09 - -### Added - -- Support `OTEL_EXPORTER_OTLP_LOGS_INSECURE` and `OTEL_EXPORTER_OTLP_INSECURE` environments in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. (#5739) -- The `WithResource` option for `NewMeterProvider` now merges the provided resources with the ones from environment variables. (#5773) -- The `WithResource` option for `NewLoggerProvider` now merges the provided resources with the ones from environment variables. (#5773) -- Add UTF-8 support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5755) - -### Fixed - -- Fix memory leak in the global `MeterProvider` when identical instruments are repeatedly created. (#5754) -- Fix panic on instruments creation when setting meter provider. (#5758) -- Fix an issue where `SetMeterProvider` in `go.opentelemetry.io/otel` might miss the delegation for instruments and registries. (#5780) - -### Removed - -- Drop support for [Go 1.21]. (#5736, #5740, #5800) - -## [1.29.0/0.51.0/0.5.0] 2024-08-23 - -This release is the last to support [Go 1.21]. -The next release will require at least [Go 1.22]. - -### Added - -- Add MacOS ARM64 platform to the compatibility testing suite. (#5577) -- Add `InstrumentationScope` field to `SpanStub` in `go.opentelemetry.io/otel/sdk/trace/tracetest`, as a replacement for the deprecated `InstrumentationLibrary`. (#5627) -- Make the initial release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc`. - This new module contains an OTLP exporter that transmits log telemetry using gRPC. - This module is unstable and breaking changes may be introduced. - See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5629) -- Add `Walk` function to `TraceState` in `go.opentelemetry.io/otel/trace` to iterate all the key-value pairs. (#5651) -- Bridge the trace state in `go.opentelemetry.io/otel/bridge/opencensus`. (#5651) -- Zero value of `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` no longer panics. (#5665) -- The `FilterProcessor` interface type is added in `go.opentelemetry.io/otel/sdk/log/internal/x`. - This is an optional and experimental interface that log `Processor`s can implement to instruct the `Logger` if a `Record` will be processed or not. - It replaces the existing `Enabled` method that is removed from the `Processor` interface itself. - It does not fall within the scope of the OpenTelemetry Go versioning and stability [policy](./VERSIONING.md) and it may be changed in backwards incompatible ways or removed in feature releases. (#5692) -- Support [Go 1.23]. (#5720) - -### Changed - -- `NewMemberRaw`, `NewKeyProperty` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage` allow UTF-8 string in key. (#5132) -- `Processor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` now accepts a pointer to `Record` instead of a value so that the record modifications done in a processor are propagated to subsequent registered processors. (#5636) -- `SimpleProcessor.Enabled` in `go.opentelemetry.io/otel/sdk/log` now returns `false` if the exporter is `nil`. (#5665) -- Update the concurrency requirements of `Exporter` in `go.opentelemetry.io/otel/sdk/log`. (#5666) -- `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` synchronizes `OnEmit` calls. (#5666) -- The `Processor` interface in `go.opentelemetry.io/otel/sdk/log` no longer includes the `Enabled` method. - See the `FilterProcessor` interface type added in `go.opentelemetry.io/otel/sdk/log/internal/x` to continue providing this functionality. (#5692) -- The `SimpleProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693) -- The `BatchProcessor` type in `go.opentelemetry.io/otel/sdk/log` is no longer comparable. (#5693) - -### Fixed - -- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5584) -- Pass the underlying error rather than a generic retry-able failure in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`, `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#5541) -- Correct the `Tracer`, `Meter`, and `Logger` names used in `go.opentelemetry.io/otel/example/dice`. (#5612) -- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/namedtracer`. (#5612) -- Correct the `Tracer` name used in `go.opentelemetry.io/otel/example/opencensus`. (#5612) -- Correct the `Tracer` and `Meter` names used in `go.opentelemetry.io/otel/example/otel-collector`. (#5612) -- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/passthrough`. (#5612) -- Correct the `Meter` name used in `go.opentelemetry.io/otel/example/prometheus`. (#5612) -- Correct the `Tracer` names used in `go.opentelemetry.io/otel/example/zipkin`. (#5612) -- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#5641) -- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5650) -- Stop percent encoding header environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705) -- Remove invalid environment variable header keys in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`, `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`, `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` (#5705) - -### Removed - -- The `Enabled` method of the `SimpleProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692) -- The `Enabled` method of the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is removed. (#5692) - -## [1.28.0/0.50.0/0.4.0] 2024-07-02 - -### Added - -- The `IsEmpty` method is added to the `Instrument` type in `go.opentelemetry.io/otel/sdk/metric`. - This method is used to check if an `Instrument` instance is a zero-value. (#5431) -- Store and provide the emitted `context.Context` in `ScopeRecords` of `go.opentelemetry.io/otel/sdk/log/logtest`. (#5468) -- The `go.opentelemetry.io/otel/semconv/v1.26.0` package. - The package contains semantic conventions from the `v1.26.0` version of the OpenTelemetry Semantic Conventions. (#5476) -- The `AssertRecordEqual` method to `go.opentelemetry.io/otel/log/logtest` to allow comparison of two log records in tests. (#5499) -- The `WithHeaders` option to `go.opentelemetry.io/otel/exporters/zipkin` to allow configuring custom http headers while exporting spans. (#5530) - -### Changed - -- `Tracer.Start` in `go.opentelemetry.io/otel/trace/noop` no longer allocates a span for empty span context. (#5457) -- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/otel-collector`. (#5490) -- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/example/zipkin`. (#5490) -- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/exporters/zipkin`. (#5490) - - The exporter no longer exports the deprecated "otel.library.name" or "otel.library.version" attributes. -- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/resource`. (#5490) -- Upgrade `go.opentelemetry.io/otel/semconv/v1.25.0` to `go.opentelemetry.io/otel/semconv/v1.26.0` in `go.opentelemetry.io/otel/sdk/trace`. (#5490) -- `SimpleProcessor.OnEmit` in `go.opentelemetry.io/otel/sdk/log` no longer allocates a slice which makes it possible to have a zero-allocation log processing using `SimpleProcessor`. (#5493) -- Use non-generic functions in the `Start` method of `"go.opentelemetry.io/otel/sdk/trace".Trace` to reduce memory allocation. (#5497) -- `service.instance.id` is populated for a `Resource` created with `"go.opentelemetry.io/otel/sdk/resource".Default` with a default value when `OTEL_GO_X_RESOURCE` is set. (#5520) -- Improve performance of metric instruments in `go.opentelemetry.io/otel/sdk/metric` by removing unnecessary calls to `time.Now`. (#5545) - -### Fixed - -- Log a warning to the OpenTelemetry internal logger when a `Record` in `go.opentelemetry.io/otel/sdk/log` drops an attribute due to a limit being reached. (#5376) -- Identify the `Tracer` returned from the global `TracerProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) -- Identify the `Meter` returned from the global `MeterProvider` in `go.opentelemetry.io/otel/global` with its schema URL. (#5426) -- Log a warning to the OpenTelemetry internal logger when a `Span` in `go.opentelemetry.io/otel/sdk/trace` drops an attribute, event, or link due to a limit being reached. (#5434) -- Document instrument name requirements in `go.opentelemetry.io/otel/metric`. (#5435) -- Prevent random number generation data-race for experimental rand exemplars in `go.opentelemetry.io/otel/sdk/metric`. (#5456) -- Fix counting number of dropped attributes of `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5464) -- Fix panic in baggage creation when a member contains `0x80` char in key or value. (#5494) -- Correct comments for the priority of the `WithEndpoint` and `WithEndpointURL` options and their corresponding environment variables in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#5508) -- Retry trace and span ID generation if it generated an invalid one in `go.opentelemetry.io/otel/sdk/trace`. (#5514) -- Fix stale timestamps reported by the last-value aggregation. (#5517) -- Indicate the `Exporter` in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp` must be created by the `New` method. (#5521) -- Improved performance in all `{Bool,Int64,Float64,String}SliceValue` functions of `go.opentelemetry.io/attributes` by reducing the number of allocations. (#5549) -- Replace invalid percent-encoded octet sequences with replacement char in `go.opentelemetry.io/otel/baggage`. (#5528) - -## [1.27.0/0.49.0/0.3.0] 2024-05-21 - -### Added - -- Add example for `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5242) -- Add `RecordFactory` in `go.opentelemetry.io/otel/sdk/log/logtest` to facilitate testing exporter and processor implementations. (#5258) -- Add `RecordFactory` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing bridge implementations. (#5263) -- The count of dropped records from the `BatchProcessor` in `go.opentelemetry.io/otel/sdk/log` is logged. (#5276) -- Add metrics in the `otel-collector` example. (#5283) -- Add the synchronous gauge instrument to `go.opentelemetry.io/otel/metric`. (#5304) - - An `int64` or `float64` synchronous gauge instrument can now be created from a `Meter`. - - All implementations of the API (`go.opentelemetry.io/otel/metric/noop`, `go.opentelemetry.io/otel/sdk/metric`) are updated to support this instrument. -- Add logs to `go.opentelemetry.io/otel/example/dice`. (#5349) - -### Changed - -- The `Shutdown` method of `Exporter` in `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` ignores the context cancellation and always returns `nil`. (#5189) -- The `ForceFlush` and `Shutdown` methods of the exporter returned by `New` in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` ignore the context cancellation and always return `nil`. (#5189) -- Apply the value length limits to `Record` attributes in `go.opentelemetry.io/otel/sdk/log`. (#5230) -- De-duplicate map attributes added to a `Record` in `go.opentelemetry.io/otel/sdk/log`. (#5230) -- `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` won't print timestamps when `WithoutTimestamps` option is set. (#5241) -- The `go.opentelemetry.io/otel/exporters/stdout/stdoutlog` exporter won't print `AttributeValueLengthLimit` and `AttributeCountLimit` fields now, instead it prints the `DroppedAttributes` field. (#5272) -- Improved performance in the `Stringer` implementation of `go.opentelemetry.io/otel/baggage.Member` by reducing the number of allocations. (#5286) -- Set the start time for last-value aggregates in `go.opentelemetry.io/otel/sdk/metric`. (#5305) -- The `Span` in `go.opentelemetry.io/otel/sdk/trace` will record links without span context if either non-empty `TraceState` or attributes are provided. (#5315) -- Upgrade all dependencies of `go.opentelemetry.io/otel/semconv/v1.24.0` to `go.opentelemetry.io/otel/semconv/v1.25.0`. (#5374) - -### Fixed - -- Comparison of unordered maps for `go.opentelemetry.io/otel/log.KeyValue` and `go.opentelemetry.io/otel/log.Value`. (#5306) -- Fix the empty output of `go.opentelemetry.io/otel/log.Value` in `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. (#5311) -- Split the behavior of `Recorder` in `go.opentelemetry.io/otel/log/logtest` so it behaves as a `LoggerProvider` only. (#5365) -- Fix wrong package name of the error message when parsing endpoint URL in `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. (#5371) -- Identify the `Logger` returned from the global `LoggerProvider` in `go.opentelemetry.io/otel/log/global` with its schema URL. (#5375) - -## [1.26.0/0.48.0/0.2.0-alpha] 2024-04-24 - -### Added - -- Add `Recorder` in `go.opentelemetry.io/otel/log/logtest` to facilitate testing the log bridge implementations. (#5134) -- Add span flags to OTLP spans and links exported by `go.opentelemetry.io/otel/exporters/otlp/otlptrace`. (#5194) -- Make the initial alpha release of `go.opentelemetry.io/otel/sdk/log`. - This new module contains the Go implementation of the OpenTelemetry Logs SDK. - This module is unstable and breaking changes may be introduced. - See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) -- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp`. - This new module contains an OTLP exporter that transmits log telemetry using HTTP. - This module is unstable and breaking changes may be introduced. - See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) -- Make the initial alpha release of `go.opentelemetry.io/otel/exporters/stdout/stdoutlog`. - This new module contains an exporter prints log records to STDOUT. - This module is unstable and breaking changes may be introduced. - See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. (#5240) -- The `go.opentelemetry.io/otel/semconv/v1.25.0` package. - The package contains semantic conventions from the `v1.25.0` version of the OpenTelemetry Semantic Conventions. (#5254) - -### Changed - -- Update `go.opentelemetry.io/proto/otlp` from v1.1.0 to v1.2.0. (#5177) -- Improve performance of baggage member character validation in `go.opentelemetry.io/otel/baggage`. (#5214) -- The `otel-collector` example now uses docker compose to bring up services instead of kubernetes. (#5244) - -### Fixed - -- Slice attribute values in `go.opentelemetry.io/otel/attribute` are now emitted as their JSON representation. (#5159) - -## [1.25.0/0.47.0/0.0.8/0.1.0-alpha] 2024-04-05 - -### Added - -- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4906) -- Add `WithProxy` option in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp`. (#4906) -- Add `AddLink` method to the `Span` interface in `go.opentelemetry.io/otel/trace`. (#5032) -- The `Enabled` method is added to the `Logger` interface in `go.opentelemetry.io/otel/log`. - This method is used to notify users if a log record will be emitted or not. (#5071) -- Add `SeverityUndefined` `const` to `go.opentelemetry.io/otel/log`. - This value represents an unset severity level. (#5072) -- Add `Empty` function in `go.opentelemetry.io/otel/log` to return a `KeyValue` for an empty value. (#5076) -- Add `go.opentelemetry.io/otel/log/global` to manage the global `LoggerProvider`. - This package is provided with the anticipation that all functionality will be migrate to `go.opentelemetry.io/otel` when `go.opentelemetry.io/otel/log` stabilizes. - At which point, users will be required to migrage their code, and this package will be deprecated then removed. (#5085) -- Add support for `Summary` metrics in the `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` exporters. (#5100) -- Add `otel.scope.name` and `otel.scope.version` tags to spans exported by `go.opentelemetry.io/otel/exporters/zipkin`. (#5108) -- Add support for `AddLink` to `go.opentelemetry.io/otel/bridge/opencensus`. (#5116) -- Add `String` method to `Value` and `KeyValue` in `go.opentelemetry.io/otel/log`. (#5117) -- Add Exemplar support to `go.opentelemetry.io/otel/exporters/prometheus`. (#5111) -- Add metric semantic conventions to `go.opentelemetry.io/otel/semconv/v1.24.0`. Future `semconv` packages will include metric semantic conventions as well. (#4528) - -### Changed - -- `SpanFromContext` and `SpanContextFromContext` in `go.opentelemetry.io/otel/trace` no longer make a heap allocation when the passed context has no span. (#5049) -- `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` now create a gRPC client in idle mode and with "dns" as the default resolver using [`grpc.NewClient`](https://pkg.go.dev/google.golang.org/grpc#NewClient). (#5151) - Because of that `WithDialOption` ignores [`grpc.WithBlock`](https://pkg.go.dev/google.golang.org/grpc#WithBlock), [`grpc.WithTimeout`](https://pkg.go.dev/google.golang.org/grpc#WithTimeout), and [`grpc.WithReturnConnectionError`](https://pkg.go.dev/google.golang.org/grpc#WithReturnConnectionError). - Notice that [`grpc.DialContext`](https://pkg.go.dev/google.golang.org/grpc#DialContext) which was used before is now deprecated. - -### Fixed - -- Clarify the documentation about equivalence guarantees for the `Set` and `Distinct` types in `go.opentelemetry.io/otel/attribute`. (#5027) -- Prevent default `ErrorHandler` self-delegation. (#5137) -- Update all dependencies to address [GO-2024-2687]. (#5139) - -### Removed - -- Drop support for [Go 1.20]. (#4967) - -### Deprecated - -- Deprecate `go.opentelemetry.io/otel/attribute.Sortable` type. (#4734) -- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortable` function. (#4734) -- Deprecate `go.opentelemetry.io/otel/attribute.NewSetWithSortableFiltered` function. (#4734) - -## [1.24.0/0.46.0/0.0.1-alpha] 2024-02-23 - -This release is the last to support [Go 1.20]. -The next release will require at least [Go 1.21]. - -### Added - -- Support [Go 1.22]. (#4890) -- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4900) -- Add exemplar support to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4900) -- The `go.opentelemetry.io/otel/log` module is added. - This module includes OpenTelemetry Go's implementation of the Logs Bridge API. - This module is in an alpha state, it is subject to breaking changes. - See our [versioning policy](./VERSIONING.md) for more info. (#4961) -- Add ARM64 platform to the compatibility testing suite. (#4994) - -### Fixed - -- Fix registration of multiple callbacks when using the global meter provider from `go.opentelemetry.io/otel`. (#4945) -- Fix negative buckets in output of exponential histograms. (#4956) - -## [1.23.1] 2024-02-07 - -### Fixed - -- Register all callbacks passed during observable instrument creation instead of just the last one multiple times in `go.opentelemetry.io/otel/sdk/metric`. (#4888) - -## [1.23.0] 2024-02-06 - -This release contains the first stable, `v1`, release of the following modules: - -- `go.opentelemetry.io/otel/bridge/opencensus` -- `go.opentelemetry.io/otel/bridge/opencensus/test` -- `go.opentelemetry.io/otel/example/opencensus` -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` -- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` - -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Added - -- Add `WithEndpointURL` option to the `exporters/otlp/otlpmetric/otlpmetricgrpc`, `exporters/otlp/otlpmetric/otlpmetrichttp`, `exporters/otlp/otlptrace/otlptracegrpc` and `exporters/otlp/otlptrace/otlptracehttp` packages. (#4808) -- Experimental exemplar exporting is added to the metric SDK. - See [metric documentation](./sdk/metric/internal/x/README.md#exemplars) for more information about this feature and how to enable it. (#4871) -- `ErrSchemaURLConflict` is added to `go.opentelemetry.io/otel/sdk/resource`. - This error is returned when a merge of two `Resource`s with different (non-empty) schema URL is attempted. (#4876) - -### Changed - -- The `Merge` and `New` functions in `go.opentelemetry.io/otel/sdk/resource` now returns a partial result if there is a schema URL merge conflict. - Instead of returning `nil` when two `Resource`s with different (non-empty) schema URLs are merged the merged `Resource`, along with the new `ErrSchemaURLConflict` error, is returned. - It is up to the user to decide if they want to use the returned `Resource` or not. - It may have desired attributes overwritten or include stale semantic conventions. (#4876) - -### Fixed - -- Fix `ContainerID` resource detection on systemd when cgroup path has a colon. (#4449) -- Fix `go.opentelemetry.io/otel/sdk/metric` to cache instruments to avoid leaking memory when the same instrument is created multiple times. (#4820) -- Fix missing `Mix` and `Max` values for `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` by introducing `MarshalText` and `MarshalJSON` for the `Extrema` type in `go.opentelemetry.io/sdk/metric/metricdata`. (#4827) - -## [1.23.0-rc.1] 2024-01-18 - -This is a release candidate for the v1.23.0 release. -That release is expected to include the `v1` release of the following modules: - -- `go.opentelemetry.io/otel/bridge/opencensus` -- `go.opentelemetry.io/otel/bridge/opencensus/test` -- `go.opentelemetry.io/otel/example/opencensus` -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` -- `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` - -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -## [1.22.0/0.45.0] 2024-01-17 - -### Added - -- The `go.opentelemetry.io/otel/semconv/v1.22.0` package. - The package contains semantic conventions from the `v1.22.0` version of the OpenTelemetry Semantic Conventions. (#4735) -- The `go.opentelemetry.io/otel/semconv/v1.23.0` package. - The package contains semantic conventions from the `v1.23.0` version of the OpenTelemetry Semantic Conventions. (#4746) -- The `go.opentelemetry.io/otel/semconv/v1.23.1` package. - The package contains semantic conventions from the `v1.23.1` version of the OpenTelemetry Semantic Conventions. (#4749) -- The `go.opentelemetry.io/otel/semconv/v1.24.0` package. - The package contains semantic conventions from the `v1.24.0` version of the OpenTelemetry Semantic Conventions. (#4770) -- Add `WithResourceAsConstantLabels` option to apply resource attributes for every metric emitted by the Prometheus exporter. (#4733) -- Experimental cardinality limiting is added to the metric SDK. - See [metric documentation](./sdk/metric/internal/x/README.md#cardinality-limit) for more information about this feature and how to enable it. (#4457) -- Add `NewMemberRaw` and `NewKeyValuePropertyRaw` in `go.opentelemetry.io/otel/baggage`. (#4804) - -### Changed - -- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.24.0`. (#4754) -- Update transformations in `go.opentelemetry.io/otel/exporters/zipkin` to follow `v1.24.0` version of the OpenTelemetry specification. (#4754) -- Record synchronous measurements when the passed context is canceled instead of dropping in `go.opentelemetry.io/otel/sdk/metric`. - If you do not want to make a measurement when the context is cancelled, you need to handle it yourself (e.g `if ctx.Err() != nil`). (#4671) -- Improve `go.opentelemetry.io/otel/trace.TraceState`'s performance. (#4722) -- Improve `go.opentelemetry.io/otel/propagation.TraceContext`'s performance. (#4721) -- Improve `go.opentelemetry.io/otel/baggage` performance. (#4743) -- Improve performance of the `(*Set).Filter` method in `go.opentelemetry.io/otel/attribute` when the passed filter does not filter out any attributes from the set. (#4774) -- `Member.String` in `go.opentelemetry.io/otel/baggage` percent-encodes only when necessary. (#4775) -- Improve `go.opentelemetry.io/otel/trace.Span`'s performance when adding multiple attributes. (#4818) -- `Property.Value` in `go.opentelemetry.io/otel/baggage` now returns a raw string instead of a percent-encoded value. (#4804) - -### Fixed - -- Fix `Parse` in `go.opentelemetry.io/otel/baggage` to validate member value before percent-decoding. (#4755) -- Fix whitespace encoding of `Member.String` in `go.opentelemetry.io/otel/baggage`. (#4756) -- Fix observable not registered error when the asynchronous instrument has a drop aggregation in `go.opentelemetry.io/otel/sdk/metric`. (#4772) -- Fix baggage item key so that it is not canonicalized in `go.opentelemetry.io/otel/bridge/opentracing`. (#4776) -- Fix `go.opentelemetry.io/otel/bridge/opentracing` to properly handle baggage values that requires escaping during propagation. (#4804) -- Fix a bug where using multiple readers resulted in incorrect asynchronous counter values in `go.opentelemetry.io/otel/sdk/metric`. (#4742) - -## [1.21.0/0.44.0] 2023-11-16 - -### Removed - -- Remove the deprecated `go.opentelemetry.io/otel/bridge/opencensus.NewTracer`. (#4706) -- Remove the deprecated `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` module. (#4707) -- Remove the deprecated `go.opentelemetry.io/otel/example/view` module. (#4708) -- Remove the deprecated `go.opentelemetry.io/otel/example/fib` module. (#4723) - -### Fixed - -- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4719) -- Do not parse non-protobuf responses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4719) - -## [1.20.0/0.43.0] 2023-11-10 - -This release brings a breaking change for custom trace API implementations. Some interfaces (`TracerProvider`, `Tracer`, `Span`) now embed the `go.opentelemetry.io/otel/trace/embedded` types. Implementers need to update their implementations based on what they want the default behavior to be. See the "API Implementations" section of the [trace API] package documentation for more information about how to accomplish this. - -### Added - -- Add `go.opentelemetry.io/otel/bridge/opencensus.InstallTraceBridge`, which installs the OpenCensus trace bridge, and replaces `opencensus.NewTracer`. (#4567) -- Add scope version to trace and metric bridges in `go.opentelemetry.io/otel/bridge/opencensus`. (#4584) -- Add the `go.opentelemetry.io/otel/trace/embedded` package to be embedded in the exported trace API interfaces. (#4620) -- Add the `go.opentelemetry.io/otel/trace/noop` package as a default no-op implementation of the trace API. (#4620) -- Add context propagation in `go.opentelemetry.io/otel/example/dice`. (#4644) -- Add view configuration to `go.opentelemetry.io/otel/example/prometheus`. (#4649) -- Add `go.opentelemetry.io/otel/metric.WithExplicitBucketBoundaries`, which allows defining default explicit bucket boundaries when creating histogram instruments. (#4603) -- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4660) -- Add `Version` function in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4660) -- Add Summary, SummaryDataPoint, and QuantileValue to `go.opentelemetry.io/sdk/metric/metricdata`. (#4622) -- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` now supports exemplars from OpenCensus. (#4585) -- Add support for `WithExplicitBucketBoundaries` in `go.opentelemetry.io/otel/sdk/metric`. (#4605) -- Add support for Summary metrics in `go.opentelemetry.io/otel/bridge/opencensus`. (#4668) - -### Deprecated - -- Deprecate `go.opentelemetry.io/otel/bridge/opencensus.NewTracer` in favor of `opencensus.InstallTraceBridge`. (#4567) -- Deprecate `go.opentelemetry.io/otel/example/fib` package is in favor of `go.opentelemetry.io/otel/example/dice`. (#4618) -- Deprecate `go.opentelemetry.io/otel/trace.NewNoopTracerProvider`. - Use the added `NewTracerProvider` function in `go.opentelemetry.io/otel/trace/noop` instead. (#4620) -- Deprecate `go.opentelemetry.io/otel/example/view` package in favor of `go.opentelemetry.io/otel/example/prometheus`. (#4649) -- Deprecate `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4693) - -### Changed - -- `go.opentelemetry.io/otel/bridge/opencensus.NewMetricProducer` returns a `*MetricProducer` struct instead of the metric.Producer interface. (#4583) -- The `TracerProvider` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.TracerProvider` type. - This extends the `TracerProvider` interface and is is a breaking change for any existing implementation. - Implementers need to update their implementations based on what they want the default behavior of the interface to be. - See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) -- The `Tracer` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Tracer` type. - This extends the `Tracer` interface and is is a breaking change for any existing implementation. - Implementers need to update their implementations based on what they want the default behavior of the interface to be. - See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) -- The `Span` in `go.opentelemetry.io/otel/trace` now embeds the `go.opentelemetry.io/otel/trace/embedded.Span` type. - This extends the `Span` interface and is is a breaking change for any existing implementation. - Implementers need to update their implementations based on what they want the default behavior of the interface to be. - See the "API Implementations" section of the `go.opentelemetry.io/otel/trace` package documentation for more information about how to accomplish this. (#4620) -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) -- `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` does no longer depend on `go.opentelemetry.io/otel/exporters/otlp/otlpmetric`. (#4660) -- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4670) -- Retry for `502 Bad Gateway` and `504 Gateway Timeout` HTTP statuses in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4670) -- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4669) -- Retry for `RESOURCE_EXHAUSTED` only if RetryInfo is returned in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4669) -- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4679) -- Retry temporary HTTP request failures in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4679) - -### Fixed - -- Fix improper parsing of characters such us `+`, `/` by `Parse` in `go.opentelemetry.io/otel/baggage` as they were rendered as a whitespace. (#4667) -- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_RESOURCE_ATTRIBUTES` in `go.opentelemetry.io/otel/sdk/resource` as they were rendered as a whitespace. (#4699) -- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` as they were rendered as a whitespace. (#4699) -- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_METRICS_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` as they were rendered as a whitespace. (#4699) -- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracegrpc` as they were rendered as a whitespace. (#4699) -- Fix improper parsing of characters such us `+`, `/` passed via `OTEL_EXPORTER_OTLP_HEADERS` and `OTEL_EXPORTER_OTLP_TRACES_HEADERS` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlptracehttp` as they were rendered as a whitespace. (#4699) -- In `go.opentelemetry.op/otel/exporters/prometheus`, the exporter no longer `Collect`s metrics after `Shutdown` is invoked. (#4648) -- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc`. (#4695) -- Fix documentation for `WithCompressor` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4695) - -## [1.19.0/0.42.0/0.0.7] 2023-09-28 - -This release contains the first stable release of the OpenTelemetry Go [metric SDK]. -Our project stability guarantees now apply to the `go.opentelemetry.io/otel/sdk/metric` package. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Added - -- Add the "Roll the dice" getting started application example in `go.opentelemetry.io/otel/example/dice`. (#4539) -- The `WithWriter` and `WithPrettyPrint` options to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to set a custom `io.Writer`, and allow displaying the output in human-readable JSON. (#4507) - -### Changed - -- Allow '/' characters in metric instrument names. (#4501) -- The exporter in `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` does not prettify its output by default anymore. (#4507) -- Upgrade `gopkg.io/yaml` from `v2` to `v3` in `go.opentelemetry.io/otel/schema`. (#4535) - -### Fixed - -- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the Prometheus metric on every `Collect` if we know the scope is invalid. (#4499) - -### Removed - -- Remove `"go.opentelemetry.io/otel/bridge/opencensus".NewMetricExporter`, which is replaced by `NewMetricProducer`. (#4566) - -## [1.19.0-rc.1/0.42.0-rc.1] 2023-09-14 - -This is a release candidate for the v1.19.0/v0.42.0 release. -That release is expected to include the `v1` release of the OpenTelemetry Go metric SDK and will provide stability guarantees of that SDK. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Changed - -- Allow '/' characters in metric instrument names. (#4501) - -### Fixed - -- In `go.opentelemetry.op/otel/exporters/prometheus`, don't try to create the prometheus metric on every `Collect` if we know the scope is invalid. (#4499) - -## [1.18.0/0.41.0/0.0.6] 2023-09-12 - -This release drops the compatibility guarantee of [Go 1.19]. - -### Added - -- Add `WithProducer` option in `go.opentelemetry.op/otel/exporters/prometheus` to restore the ability to register producers on the prometheus exporter's manual reader. (#4473) -- Add `IgnoreValue` option in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest` to allow ignoring values when comparing metrics. (#4447) - -### Changed - -- Use a `TestingT` interface instead of `*testing.T` struct in `go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest`. (#4483) - -### Deprecated - -- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` was deprecated in `v0.35.0` (#3541). - The deprecation notice format for the function has been corrected to trigger Go documentation and build tooling. (#4470) - -### Removed - -- Removed the deprecated `go.opentelemetry.io/otel/exporters/jaeger` package. (#4467) -- Removed the deprecated `go.opentelemetry.io/otel/example/jaeger` package. (#4467) -- Removed the deprecated `go.opentelemetry.io/otel/sdk/metric/aggregation` package. (#4468) -- Removed the deprecated internal packages in `go.opentelemetry.io/otel/exporters/otlp` and its sub-packages. (#4469) -- Dropped guaranteed support for versions of Go less than 1.20. (#4481) - -## [1.17.0/0.40.0/0.0.5] 2023-08-28 - -### Added - -- Export the `ManualReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) -- Export the `PeriodicReader` struct in `go.opentelemetry.io/otel/sdk/metric`. (#4244) -- Add support for exponential histogram aggregations. - A histogram can be configured as an exponential histogram using a view with `"go.opentelemetry.io/otel/sdk/metric".ExponentialHistogram` as the aggregation. (#4245) -- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc`. (#4272) -- Export the `Exporter` struct in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#4272) -- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE` environment variable. (#4287) -- Add `WithoutCounterSuffixes` option in `go.opentelemetry.io/otel/exporters/prometheus` to disable addition of `_total` suffixes. (#4306) -- Add info and debug logging to the metric SDK in `go.opentelemetry.io/otel/sdk/metric`. (#4315) -- The `go.opentelemetry.io/otel/semconv/v1.21.0` package. - The package contains semantic conventions from the `v1.21.0` version of the OpenTelemetry Semantic Conventions. (#4362) -- Accept 201 to 299 HTTP status as success in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp`. (#4365) -- Document the `Temporality` and `Aggregation` methods of the `"go.opentelemetry.io/otel/sdk/metric".Exporter"` need to be concurrent safe. (#4381) -- Expand the set of units supported by the Prometheus exporter, and don't add unit suffixes if they are already present in `go.opentelemetry.op/otel/exporters/prometheus` (#4374) -- Move the `Aggregation` interface and its implementations from `go.opentelemetry.io/otel/sdk/metric/aggregation` to `go.opentelemetry.io/otel/sdk/metric`. (#4435) -- The exporters in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` now support the `OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION` environment variable. (#4437) -- Add the `NewAllowKeysFilter` and `NewDenyKeysFilter` functions to `go.opentelemetry.io/otel/attribute` to allow convenient creation of allow-keys and deny-keys filters. (#4444) -- Support Go 1.21. (#4463) - -### Changed - -- Starting from `v1.21.0` of semantic conventions, `go.opentelemetry.io/otel/semconv/{version}/httpconv` and `go.opentelemetry.io/otel/semconv/{version}/netconv` packages will no longer be published. (#4145) -- Log duplicate instrument conflict at a warning level instead of info in `go.opentelemetry.io/otel/sdk/metric`. (#4202) -- Return an error on the creation of new instruments in `go.opentelemetry.io/otel/sdk/metric` if their name doesn't pass regexp validation. (#4210) -- `NewManualReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*ManualReader` instead of `Reader`. (#4244) -- `NewPeriodicReader` in `go.opentelemetry.io/otel/sdk/metric` returns `*PeriodicReader` instead of `Reader`. (#4244) -- Count the Collect time in the `PeriodicReader` timeout in `go.opentelemetry.io/otel/sdk/metric`. (#4221) -- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) -- The function `New` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` returns `*Exporter` instead of `"go.opentelemetry.io/otel/sdk/metric".Exporter`. (#4272) -- If an attribute set is omitted from an async callback, the previous value will no longer be exported in `go.opentelemetry.io/otel/sdk/metric`. (#4290) -- If an attribute set is observed multiple times in an async callback in `go.opentelemetry.io/otel/sdk/metric`, the values will be summed instead of the last observation winning. (#4289) -- Allow the explicit bucket histogram aggregation to be used for the up-down counter, observable counter, observable up-down counter, and observable gauge in the `go.opentelemetry.io/otel/sdk/metric` package. (#4332) -- Restrict `Meter`s in `go.opentelemetry.io/otel/sdk/metric` to only register and collect instruments it created. (#4333) -- `PeriodicReader.Shutdown` and `PeriodicReader.ForceFlush` in `go.opentelemetry.io/otel/sdk/metric` now apply the periodic reader's timeout to the operation if the user provided context does not contain a deadline. (#4356, #4377) -- Upgrade all use of `go.opentelemetry.io/otel/semconv` to use `v1.21.0`. (#4408) -- Increase instrument name maximum length from 63 to 255 characters in `go.opentelemetry.io/otel/sdk/metric`. (#4434) -- Add `go.opentelemetry.op/otel/sdk/metric.WithProducer` as an `Option` for `"go.opentelemetry.io/otel/sdk/metric".NewManualReader` and `"go.opentelemetry.io/otel/sdk/metric".NewPeriodicReader`. (#4346) - -### Removed - -- Remove `Reader.RegisterProducer` in `go.opentelemetry.io/otel/metric`. - Use the added `WithProducer` option instead. (#4346) -- Remove `Reader.ForceFlush` in `go.opentelemetry.io/otel/metric`. - Notice that `PeriodicReader.ForceFlush` is still available. (#4375) - -### Fixed - -- Correctly format log messages from the `go.opentelemetry.io/otel/exporters/zipkin` exporter. (#4143) -- Log an error for calls to `NewView` in `go.opentelemetry.io/otel/sdk/metric` that have empty criteria. (#4307) -- Fix `"go.opentelemetry.io/otel/sdk/resource".WithHostID()` to not set an empty `host.id`. (#4317) -- Use the instrument identifying fields to cache aggregators and determine duplicate instrument registrations in `go.opentelemetry.io/otel/sdk/metric`. (#4337) -- Detect duplicate instruments for case-insensitive names in `go.opentelemetry.io/otel/sdk/metric`. (#4338) -- The `ManualReader` will not panic if `AggregationSelector` returns `nil` in `go.opentelemetry.io/otel/sdk/metric`. (#4350) -- If a `Reader`'s `AggregationSelector` returns `nil` or `DefaultAggregation` the pipeline will use the default aggregation. (#4350) -- Log a suggested view that fixes instrument conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4349) -- Fix possible panic, deadlock and race condition in batch span processor in `go.opentelemetry.io/otel/sdk/trace`. (#4353) -- Improve context cancellation handling in batch span processor's `ForceFlush` in `go.opentelemetry.io/otel/sdk/trace`. (#4369) -- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` using gotmpl. (#4397, #3846) -- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4404, #3846) -- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` using gotmpl. (#4407, #3846) -- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4400, #3846) -- Decouple `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp/internal` from `go.opentelemetry.io/otel/exporters/otlp/internal` and `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` using gotmpl. (#4401, #3846) -- Do not block the metric SDK when OTLP metric exports are blocked in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp`. (#3925, #4395) -- Do not append `_total` if the counter already has that suffix for the Prometheus exproter in `go.opentelemetry.io/otel/exporter/prometheus`. (#4373) -- Fix resource detection data race in `go.opentelemetry.io/otel/sdk/resource`. (#4409) -- Use the first-seen instrument name during instrument name conflicts in `go.opentelemetry.io/otel/sdk/metric`. (#4428) - -### Deprecated - -- The `go.opentelemetry.io/otel/exporters/jaeger` package is deprecated. - OpenTelemetry dropped support for Jaeger exporter in July 2023. - Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` - or `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` instead. (#4423) -- The `go.opentelemetry.io/otel/example/jaeger` package is deprecated. (#4423) -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal` package is deprecated. (#4420) -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/oconf` package is deprecated. (#4420) -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/otest` package is deprecated. (#4420) -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/internal/transform` package is deprecated. (#4420) -- The `go.opentelemetry.io/otel/exporters/otlp/internal` package is deprecated. (#4421) -- The `go.opentelemetry.io/otel/exporters/otlp/internal/envconfig` package is deprecated. (#4421) -- The `go.opentelemetry.io/otel/exporters/otlp/internal/retry` package is deprecated. (#4421) -- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal` package is deprecated. (#4425) -- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/envconfig` package is deprecated. (#4425) -- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlpconfig` package is deprecated. (#4425) -- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/otlptracetest` package is deprecated. (#4425) -- The `go.opentelemetry.io/otel/exporters/otlp/otlptrace/internal/retry` package is deprecated. (#4425) -- The `go.opentelemetry.io/otel/sdk/metric/aggregation` package is deprecated. - Use the aggregation types added to `go.opentelemetry.io/otel/sdk/metric` instead. (#4435) - -## [1.16.0/0.39.0] 2023-05-18 - -This release contains the first stable release of the OpenTelemetry Go [metric API]. -Our project stability guarantees now apply to the `go.opentelemetry.io/otel/metric` package. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Added - -- The `go.opentelemetry.io/otel/semconv/v1.19.0` package. - The package contains semantic conventions from the `v1.19.0` version of the OpenTelemetry specification. (#3848) -- The `go.opentelemetry.io/otel/semconv/v1.20.0` package. - The package contains semantic conventions from the `v1.20.0` version of the OpenTelemetry specification. (#4078) -- The Exponential Histogram data types in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#4165) -- OTLP metrics exporter now supports the Exponential Histogram Data Type. (#4222) -- Fix serialization of `time.Time` zero values in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp` packages. (#4271) - -### Changed - -- Use `strings.Cut()` instead of `string.SplitN()` for better readability and memory use. (#4049) -- `MeterProvider` returns noop meters once it has been shutdown. (#4154) - -### Removed - -- The deprecated `go.opentelemetry.io/otel/metric/instrument` package is removed. - Use `go.opentelemetry.io/otel/metric` instead. (#4055) - -### Fixed - -- Fix build for BSD based systems in `go.opentelemetry.io/otel/sdk/resource`. (#4077) - -## [1.16.0-rc.1/0.39.0-rc.1] 2023-05-03 - -This is a release candidate for the v1.16.0/v0.39.0 release. -That release is expected to include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Added - -- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#4039) - - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. - - Use `GetMeterProivder` for a global `metric.MeterProvider`. - - Use `SetMeterProivder` to set the global `metric.MeterProvider`. - -### Changed - -- Move the `go.opentelemetry.io/otel/metric` module to the `stable-v1` module set. - This stages the metric API to be released as a stable module. (#4038) - -### Removed - -- The `go.opentelemetry.io/otel/metric/global` package is removed. - Use `go.opentelemetry.io/otel` instead. (#4039) - -## [1.15.1/0.38.1] 2023-05-02 - -### Fixed - -- Remove unused imports from `sdk/resource/host_id_bsd.go` which caused build failures. (#4040, #4041) - -## [1.15.0/0.38.0] 2023-04-27 - -### Added - -- The `go.opentelemetry.io/otel/metric/embedded` package. (#3916) -- The `Version` function to `go.opentelemetry.io/otel/sdk` to return the SDK version. (#3949) -- Add a `WithNamespace` option to `go.opentelemetry.io/otel/exporters/prometheus` to allow users to prefix metrics with a namespace. (#3970) -- The following configuration types were added to `go.opentelemetry.io/otel/metric/instrument` to be used in the configuration of measurement methods. (#3971) - - The `AddConfig` used to hold configuration for addition measurements - - `NewAddConfig` used to create a new `AddConfig` - - `AddOption` used to configure an `AddConfig` - - The `RecordConfig` used to hold configuration for recorded measurements - - `NewRecordConfig` used to create a new `RecordConfig` - - `RecordOption` used to configure a `RecordConfig` - - The `ObserveConfig` used to hold configuration for observed measurements - - `NewObserveConfig` used to create a new `ObserveConfig` - - `ObserveOption` used to configure an `ObserveConfig` -- `WithAttributeSet` and `WithAttributes` are added to `go.opentelemetry.io/otel/metric/instrument`. - They return an option used during a measurement that defines the attribute Set associated with the measurement. (#3971) -- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` to return the OTLP metrics client version. (#3956) -- The `Version` function to `go.opentelemetry.io/otel/exporters/otlp/otlptrace` to return the OTLP trace client version. (#3956) - -### Changed - -- The `Extrema` in `go.opentelemetry.io/otel/sdk/metric/metricdata` is redefined with a generic argument of `[N int64 | float64]`. (#3870) -- Update all exported interfaces from `go.opentelemetry.io/otel/metric` to embed their corresponding interface from `go.opentelemetry.io/otel/metric/embedded`. - This adds an implementation requirement to set the interface default behavior for unimplemented methods. (#3916) -- Move No-Op implementation from `go.opentelemetry.io/otel/metric` into its own package `go.opentelemetry.io/otel/metric/noop`. (#3941) - - `metric.NewNoopMeterProvider` is replaced with `noop.NewMeterProvider` -- Add all the methods from `"go.opentelemetry.io/otel/trace".SpanContext` to `bridgeSpanContext` by embedding `otel.SpanContext` in `bridgeSpanContext`. (#3966) -- Wrap `UploadMetrics` error in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/` to improve error message when encountering generic grpc errors. (#3974) -- The measurement methods for all instruments in `go.opentelemetry.io/otel/metric/instrument` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) - - The `Int64Counter.Add` method now accepts `...AddOption` - - The `Float64Counter.Add` method now accepts `...AddOption` - - The `Int64UpDownCounter.Add` method now accepts `...AddOption` - - The `Float64UpDownCounter.Add` method now accepts `...AddOption` - - The `Int64Histogram.Record` method now accepts `...RecordOption` - - The `Float64Histogram.Record` method now accepts `...RecordOption` - - The `Int64Observer.Observe` method now accepts `...ObserveOption` - - The `Float64Observer.Observe` method now accepts `...ObserveOption` -- The `Observer` methods in `go.opentelemetry.io/otel/metric` accept an option instead of the variadic `"go.opentelemetry.io/otel/attribute".KeyValue`. (#3971) - - The `Observer.ObserveInt64` method now accepts `...ObserveOption` - - The `Observer.ObserveFloat64` method now accepts `...ObserveOption` -- Move global metric back to `go.opentelemetry.io/otel/metric/global` from `go.opentelemetry.io/otel`. (#3986) - -### Fixed - -- `TracerProvider` allows calling `Tracer()` while it's shutting down. - It used to deadlock. (#3924) -- Use the SDK version for the Telemetry SDK resource detector in `go.opentelemetry.io/otel/sdk/resource`. (#3949) -- Fix a data race in `SpanProcessor` returned by `NewSimpleSpanProcessor` in `go.opentelemetry.io/otel/sdk/trace`. (#3951) -- Automatically figure out the default aggregation with `aggregation.Default`. (#3967) - -### Deprecated - -- The `go.opentelemetry.io/otel/metric/instrument` package is deprecated. - Use the equivalent types added to `go.opentelemetry.io/otel/metric` instead. (#4018) - -## [1.15.0-rc.2/0.38.0-rc.2] 2023-03-23 - -This is a release candidate for the v1.15.0/v0.38.0 release. -That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -### Added - -- The `WithHostID` option to `go.opentelemetry.io/otel/sdk/resource`. (#3812) -- The `WithoutTimestamps` option to `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` to sets all timestamps to zero. (#3828) -- The new `Exemplar` type is added to `go.opentelemetry.io/otel/sdk/metric/metricdata`. - Both the `DataPoint` and `HistogramDataPoint` types from that package have a new field of `Exemplars` containing the sampled exemplars for their timeseries. (#3849) -- Configuration for each metric instrument in `go.opentelemetry.io/otel/sdk/metric/instrument`. (#3895) -- The internal logging introduces a warning level verbosity equal to `V(1)`. (#3900) -- Added a log message warning about usage of `SimpleSpanProcessor` in production environments. (#3854) - -### Changed - -- Optimize memory allocation when creation a new `Set` using `NewSet` or `NewSetWithFiltered` in `go.opentelemetry.io/otel/attribute`. (#3832) -- Optimize memory allocation when creation new metric instruments in `go.opentelemetry.io/otel/sdk/metric`. (#3832) -- Avoid creating new objects on all calls to `WithDeferredSetup` and `SkipContextSetup` in OpenTracing bridge. (#3833) -- The `New` and `Detect` functions from `go.opentelemetry.io/otel/sdk/resource` return errors that wrap underlying errors instead of just containing the underlying error strings. (#3844) -- Both the `Histogram` and `HistogramDataPoint` are redefined with a generic argument of `[N int64 | float64]` in `go.opentelemetry.io/otel/sdk/metric/metricdata`. (#3849) -- The metric `Export` interface from `go.opentelemetry.io/otel/sdk/metric` accepts a `*ResourceMetrics` instead of `ResourceMetrics`. (#3853) -- Rename `Asynchronous` to `Observable` in `go.opentelemetry.io/otel/metric/instrument`. (#3892) -- Rename `Int64ObserverOption` to `Int64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) -- Rename `Float64ObserverOption` to `Float64ObservableOption` in `go.opentelemetry.io/otel/metric/instrument`. (#3895) -- The internal logging changes the verbosity level of info to `V(4)`, the verbosity level of debug to `V(8)`. (#3900) - -### Fixed - -- `TracerProvider` consistently doesn't allow to register a `SpanProcessor` after shutdown. (#3845) - -### Removed - -- The deprecated `go.opentelemetry.io/otel/metric/global` package is removed. (#3829) -- The unneeded `Synchronous` interface in `go.opentelemetry.io/otel/metric/instrument` was removed. (#3892) -- The `Float64ObserverConfig` and `NewFloat64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. - Use the added `float64` instrument configuration instead. (#3895) -- The `Int64ObserverConfig` and `NewInt64ObserverConfig` in `go.opentelemetry.io/otel/sdk/metric/instrument`. - Use the added `int64` instrument configuration instead. (#3895) -- The `NewNoopMeter` function in `go.opentelemetry.io/otel/metric`, use `NewMeterProvider().Meter("")` instead. (#3893) - -## [1.15.0-rc.1/0.38.0-rc.1] 2023-03-01 - -This is a release candidate for the v1.15.0/v0.38.0 release. -That release will include the `v1` release of the OpenTelemetry Go metric API and will provide stability guarantees of that API. -See our [versioning policy](VERSIONING.md) for more information about these stability guarantees. - -This release drops the compatibility guarantee of [Go 1.18]. - -### Added - -- Support global `MeterProvider` in `go.opentelemetry.io/otel`. (#3818) - - Use `Meter` for a `metric.Meter` from the global `metric.MeterProvider`. - - Use `GetMeterProivder` for a global `metric.MeterProvider`. - - Use `SetMeterProivder` to set the global `metric.MeterProvider`. - -### Changed - -- Dropped compatibility testing for [Go 1.18]. - The project no longer guarantees support for this version of Go. (#3813) - -### Fixed - -- Handle empty environment variable as it they were not set. (#3764) -- Clarify the `httpconv` and `netconv` packages in `go.opentelemetry.io/otel/semconv/*` provide tracing semantic conventions. (#3823) -- Fix race conditions in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic. (#3899) -- Fix sending nil `scopeInfo` to metrics channel in `go.opentelemetry.io/otel/exporters/metric/prometheus` that could cause a panic in `github.com/prometheus/client_golang/prometheus`. (#3899) - -### Deprecated - -- The `go.opentelemetry.io/otel/metric/global` package is deprecated. - Use `go.opentelemetry.io/otel` instead. (#3818) - -### Removed - -- The deprecated `go.opentelemetry.io/otel/metric/unit` package is removed. (#3814) - -## [1.14.0/0.37.0/0.0.4] 2023-02-27 - -This release is the last to support [Go 1.18]. -The next release will require at least [Go 1.19]. - -### Added - -- The `event` type semantic conventions are added to `go.opentelemetry.io/otel/semconv/v1.17.0`. (#3697) -- Support [Go 1.20]. (#3693) -- The `go.opentelemetry.io/otel/semconv/v1.18.0` package. - The package contains semantic conventions from the `v1.18.0` version of the OpenTelemetry specification. (#3719) - - The following `const` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: - - `OtelScopeNameKey` -> `OTelScopeNameKey` - - `OtelScopeVersionKey` -> `OTelScopeVersionKey` - - `OtelLibraryNameKey` -> `OTelLibraryNameKey` - - `OtelLibraryVersionKey` -> `OTelLibraryVersionKey` - - `OtelStatusCodeKey` -> `OTelStatusCodeKey` - - `OtelStatusDescriptionKey` -> `OTelStatusDescriptionKey` - - `OtelStatusCodeOk` -> `OTelStatusCodeOk` - - `OtelStatusCodeError` -> `OTelStatusCodeError` - - The following `func` renames from `go.opentelemetry.io/otel/semconv/v1.17.0` are included: - - `OtelScopeName` -> `OTelScopeName` - - `OtelScopeVersion` -> `OTelScopeVersion` - - `OtelLibraryName` -> `OTelLibraryName` - - `OtelLibraryVersion` -> `OTelLibraryVersion` - - `OtelStatusDescription` -> `OTelStatusDescription` -- A `IsSampled` method is added to the `SpanContext` implementation in `go.opentelemetry.io/otel/bridge/opentracing` to expose the span sampled state. - See the [README](./bridge/opentracing/README.md) for more information. (#3570) -- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/metric`. (#3738) -- The `WithInstrumentationAttributes` option to `go.opentelemetry.io/otel/trace`. (#3739) -- The following environment variables are supported by the periodic `Reader` in `go.opentelemetry.io/otel/sdk/metric`. (#3763) - - `OTEL_METRIC_EXPORT_INTERVAL` sets the time between collections and exports. - - `OTEL_METRIC_EXPORT_TIMEOUT` sets the timeout an export is attempted. - -### Changed - -- Fall-back to `TextMapCarrier` when it's not `HttpHeader`s in `go.opentelemetry.io/otel/bridge/opentracing`. (#3679) -- The `Collect` method of the `"go.opentelemetry.io/otel/sdk/metric".Reader` interface is updated to accept the `metricdata.ResourceMetrics` value the collection will be made into. - This change is made to enable memory reuse by SDK users. (#3732) -- The `WithUnit` option in `go.opentelemetry.io/otel/sdk/metric/instrument` is updated to accept a `string` for the unit value. (#3776) - -### Fixed - -- Ensure `go.opentelemetry.io/otel` does not use generics. (#3723, #3725) -- Multi-reader `MeterProvider`s now export metrics for all readers, instead of just the first reader. (#3720, #3724) -- Remove use of deprecated `"math/rand".Seed` in `go.opentelemetry.io/otel/example/prometheus`. (#3733) -- Do not silently drop unknown schema data with `Parse` in `go.opentelemetry.io/otel/schema/v1.1`. (#3743) -- Data race issue in OTLP exporter retry mechanism. (#3755, #3756) -- Wrapping empty errors when exporting in `go.opentelemetry.io/otel/sdk/metric`. (#3698, #3772) -- Incorrect "all" and "resource" definition for schema files in `go.opentelemetry.io/otel/schema/v1.1`. (#3777) - -### Deprecated - -- The `go.opentelemetry.io/otel/metric/unit` package is deprecated. - Use the equivalent unit string instead. (#3776) - - Use `"1"` instead of `unit.Dimensionless` - - Use `"By"` instead of `unit.Bytes` - - Use `"ms"` instead of `unit.Milliseconds` - -## [1.13.0/0.36.0] 2023-02-07 - -### Added - -- Attribute `KeyValue` creations functions to `go.opentelemetry.io/otel/semconv/v1.17.0` for all non-enum semantic conventions. - These functions ensure semantic convention type correctness. (#3675) - -### Fixed - -- Removed the `http.target` attribute from being added by `ServerRequest` in the following packages. (#3687) - - `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv` - - `go.opentelemetry.io/otel/semconv/v1.14.0/httpconv` - - `go.opentelemetry.io/otel/semconv/v1.15.0/httpconv` - - `go.opentelemetry.io/otel/semconv/v1.16.0/httpconv` - - `go.opentelemetry.io/otel/semconv/v1.17.0/httpconv` - -### Removed - -- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is removed. (#3631) -- The deprecated `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is removed. (#3631) -- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is removed. (#3631) -- The deprecated `go.opentelemetry.io/otel/metric/instrument/syncint64` package is removed. (#3631) - -## [1.12.0/0.35.0] 2023-01-28 - -### Added - -- The `WithInt64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. - This options is used to configure `int64` Observer callbacks during their creation. (#3507) -- The `WithFloat64Callback` option to `go.opentelemetry.io/otel/metric/instrument`. - This options is used to configure `float64` Observer callbacks during their creation. (#3507) -- The `Producer` interface and `Reader.RegisterProducer(Producer)` to `go.opentelemetry.io/otel/sdk/metric`. - These additions are used to enable external metric Producers. (#3524) -- The `Callback` function type to `go.opentelemetry.io/otel/metric`. - This new named function type is registered with a `Meter`. (#3564) -- The `go.opentelemetry.io/otel/semconv/v1.13.0` package. - The package contains semantic conventions from the `v1.13.0` version of the OpenTelemetry specification. (#3499) - - The `EndUserAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientRequest` and `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `HTTPAttributesFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is merged into `ClientResponse` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `HTTPClientAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `HTTPServerAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `HTTPServerMetricAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `NetAttributesFromHTTPRequest` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `Transport` in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` and `ClientRequest` or `ServerRequest` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `SpanStatusFromHTTPStatusCode` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is replaced by `ClientStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `SpanStatusFromHTTPStatusCodeAndSpanKind` function in `go.opentelemetry.io/otel/semconv/v1.12.0` is split into `ClientStatus` and `ServerStatus` in `go.opentelemetry.io/otel/semconv/v1.13.0/httpconv`. - - The `Client` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Conn`. - - The `Server` function is included in `go.opentelemetry.io/otel/semconv/v1.13.0/netconv` to generate attributes for a `net.Listener`. -- The `go.opentelemetry.io/otel/semconv/v1.14.0` package. - The package contains semantic conventions from the `v1.14.0` version of the OpenTelemetry specification. (#3566) -- The `go.opentelemetry.io/otel/semconv/v1.15.0` package. - The package contains semantic conventions from the `v1.15.0` version of the OpenTelemetry specification. (#3578) -- The `go.opentelemetry.io/otel/semconv/v1.16.0` package. - The package contains semantic conventions from the `v1.16.0` version of the OpenTelemetry specification. (#3579) -- Metric instruments to `go.opentelemetry.io/otel/metric/instrument`. - These instruments are use as replacements of the deprecated `go.opentelemetry.io/otel/metric/instrument/{asyncfloat64,asyncint64,syncfloat64,syncint64}` packages.(#3575, #3586) - - `Float64ObservableCounter` replaces the `asyncfloat64.Counter` - - `Float64ObservableUpDownCounter` replaces the `asyncfloat64.UpDownCounter` - - `Float64ObservableGauge` replaces the `asyncfloat64.Gauge` - - `Int64ObservableCounter` replaces the `asyncint64.Counter` - - `Int64ObservableUpDownCounter` replaces the `asyncint64.UpDownCounter` - - `Int64ObservableGauge` replaces the `asyncint64.Gauge` - - `Float64Counter` replaces the `syncfloat64.Counter` - - `Float64UpDownCounter` replaces the `syncfloat64.UpDownCounter` - - `Float64Histogram` replaces the `syncfloat64.Histogram` - - `Int64Counter` replaces the `syncint64.Counter` - - `Int64UpDownCounter` replaces the `syncint64.UpDownCounter` - - `Int64Histogram` replaces the `syncint64.Histogram` -- `NewTracerProvider` to `go.opentelemetry.io/otel/bridge/opentracing`. - This is used to create `WrapperTracer` instances from a `TracerProvider`. (#3116) -- The `Extrema` type to `go.opentelemetry.io/otel/sdk/metric/metricdata`. - This type is used to represent min/max values and still be able to distinguish unset and zero values. (#3487) -- The `go.opentelemetry.io/otel/semconv/v1.17.0` package. - The package contains semantic conventions from the `v1.17.0` version of the OpenTelemetry specification. (#3599) - -### Changed - -- Jaeger and Zipkin exporter use `github.com/go-logr/logr` as the logging interface, and add the `WithLogr` option. (#3497, #3500) -- Instrument configuration in `go.opentelemetry.io/otel/metric/instrument` is split into specific options and configuration based on the instrument type. (#3507) - - Use the added `Int64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncint64`. - - Use the added `Float64Option` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/syncfloat64`. - - Use the added `Int64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncint64`. - - Use the added `Float64ObserverOption` type to configure instruments from `go.opentelemetry.io/otel/metric/instrument/asyncfloat64`. -- Return a `Registration` from the `RegisterCallback` method of a `Meter` in the `go.opentelemetry.io/otel/metric` package. - This `Registration` can be used to unregister callbacks. (#3522) -- Global error handler uses an atomic value instead of a mutex. (#3543) -- Add `NewMetricProducer` to `go.opentelemetry.io/otel/bridge/opencensus`, which can be used to pass OpenCensus metrics to an OpenTelemetry Reader. (#3541) -- Global logger uses an atomic value instead of a mutex. (#3545) -- The `Shutdown` method of the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` releases all computational resources when called the first time. (#3551) -- The `Sampler` returned from `TraceIDRatioBased` `go.opentelemetry.io/otel/sdk/trace` now uses the rightmost bits for sampling decisions. - This fixes random sampling when using ID generators like `xray.IDGenerator` and increasing parity with other language implementations. (#3557) -- Errors from `go.opentelemetry.io/otel/exporters/otlp/otlptrace` exporters are wrapped in errors identifying their signal name. - Existing users of the exporters attempting to identify specific errors will need to use `errors.Unwrap()` to get the underlying error. (#3516) -- Exporters from `go.opentelemetry.io/otel/exporters/otlp` will print the final retryable error message when attempts to retry time out. (#3514) -- The instrument kind names in `go.opentelemetry.io/otel/sdk/metric` are updated to match the API. (#3562) - - `InstrumentKindSyncCounter` is renamed to `InstrumentKindCounter` - - `InstrumentKindSyncUpDownCounter` is renamed to `InstrumentKindUpDownCounter` - - `InstrumentKindSyncHistogram` is renamed to `InstrumentKindHistogram` - - `InstrumentKindAsyncCounter` is renamed to `InstrumentKindObservableCounter` - - `InstrumentKindAsyncUpDownCounter` is renamed to `InstrumentKindObservableUpDownCounter` - - `InstrumentKindAsyncGauge` is renamed to `InstrumentKindObservableGauge` -- The `RegisterCallback` method of the `Meter` in `go.opentelemetry.io/otel/metric` changed. - - The named `Callback` replaces the inline function parameter. (#3564) - - `Callback` is required to return an error. (#3576) - - `Callback` accepts the added `Observer` parameter added. - This new parameter is used by `Callback` implementations to observe values for asynchronous instruments instead of calling the `Observe` method of the instrument directly. (#3584) - - The slice of `instrument.Asynchronous` is now passed as a variadic argument. (#3587) -- The exporter from `go.opentelemetry.io/otel/exporters/zipkin` is updated to use the `v1.16.0` version of semantic conventions. - This means it no longer uses the removed `net.peer.ip` or `http.host` attributes to determine the remote endpoint. - Instead it uses the `net.sock.peer` attributes. (#3581) -- The `Min` and `Max` fields of the `HistogramDataPoint` in `go.opentelemetry.io/otel/sdk/metric/metricdata` are now defined with the added `Extrema` type instead of a `*float64`. (#3487) - -### Fixed - -- Asynchronous instruments that use sum aggregators and attribute filters correctly add values from equivalent attribute sets that have been filtered. (#3439, #3549) -- The `RegisterCallback` method of the `Meter` from `go.opentelemetry.io/otel/sdk/metric` only registers a callback for instruments created by that meter. - Trying to register a callback with instruments from a different meter will result in an error being returned. (#3584) - -### Deprecated - -- The `NewMetricExporter` in `go.opentelemetry.io/otel/bridge/opencensus` is deprecated. - Use `NewMetricProducer` instead. (#3541) -- The `go.opentelemetry.io/otel/metric/instrument/asyncfloat64` package is deprecated. - Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) -- The `go.opentelemetry.io/otel/metric/instrument/asyncint64` package is deprecated. - Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) -- The `go.opentelemetry.io/otel/metric/instrument/syncfloat64` package is deprecated. - Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) -- The `go.opentelemetry.io/otel/metric/instrument/syncint64` package is deprecated. - Use the instruments from `go.opentelemetry.io/otel/metric/instrument` instead. (#3575) -- The `NewWrappedTracerProvider` in `go.opentelemetry.io/otel/bridge/opentracing` is now deprecated. - Use `NewTracerProvider` instead. (#3116) - -### Removed - -- The deprecated `go.opentelemetry.io/otel/sdk/metric/view` package is removed. (#3520) -- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncint64` is removed. - Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - - The `Counter` method is replaced by `Meter.Int64ObservableCounter` - - The `UpDownCounter` method is replaced by `Meter.Int64ObservableUpDownCounter` - - The `Gauge` method is replaced by `Meter.Int64ObservableGauge` -- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/asyncfloat64` is removed. - Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - - The `Counter` method is replaced by `Meter.Float64ObservableCounter` - - The `UpDownCounter` method is replaced by `Meter.Float64ObservableUpDownCounter` - - The `Gauge` method is replaced by `Meter.Float64ObservableGauge` -- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncint64` is removed. - Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - - The `Counter` method is replaced by `Meter.Int64Counter` - - The `UpDownCounter` method is replaced by `Meter.Int64UpDownCounter` - - The `Histogram` method is replaced by `Meter.Int64Histogram` -- The `InstrumentProvider` from `go.opentelemetry.io/otel/sdk/metric/syncfloat64` is removed. - Use the new creation methods of the `Meter` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3530) - - The `Counter` method is replaced by `Meter.Float64Counter` - - The `UpDownCounter` method is replaced by `Meter.Float64UpDownCounter` - - The `Histogram` method is replaced by `Meter.Float64Histogram` - -## [1.11.2/0.34.0] 2022-12-05 - -### Added - -- The `WithView` `Option` is added to the `go.opentelemetry.io/otel/sdk/metric` package. - This option is used to configure the view(s) a `MeterProvider` will use for all `Reader`s that are registered with it. (#3387) -- Add Instrumentation Scope and Version as info metric and label in Prometheus exporter. - This can be disabled using the `WithoutScopeInfo()` option added to that package.(#3273, #3357) -- OTLP exporters now recognize: (#3363) - - `OTEL_EXPORTER_OTLP_INSECURE` - - `OTEL_EXPORTER_OTLP_TRACES_INSECURE` - - `OTEL_EXPORTER_OTLP_METRICS_INSECURE` - - `OTEL_EXPORTER_OTLP_CLIENT_KEY` - - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY` - - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY` - - `OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE` - - `OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE` - - `OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE` -- The `View` type and related `NewView` function to create a view according to the OpenTelemetry specification are added to `go.opentelemetry.io/otel/sdk/metric`. - These additions are replacements for the `View` type and `New` function from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) -- The `Instrument` and `InstrumentKind` type are added to `go.opentelemetry.io/otel/sdk/metric`. - These additions are replacements for the `Instrument` and `InstrumentKind` types from `go.opentelemetry.io/otel/sdk/metric/view`. (#3459) -- The `Stream` type is added to `go.opentelemetry.io/otel/sdk/metric` to define a metric data stream a view will produce. (#3459) -- The `AssertHasAttributes` allows instrument authors to test that datapoints returned have appropriate attributes. (#3487) - -### Changed - -- The `"go.opentelemetry.io/otel/sdk/metric".WithReader` option no longer accepts views to associate with the `Reader`. - Instead, views are now registered directly with the `MeterProvider` via the new `WithView` option. - The views registered with the `MeterProvider` apply to all `Reader`s. (#3387) -- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/sdk/metric".Exporter` interface. (#3260) -- The `Temporality(view.InstrumentKind) metricdata.Temporality` and `Aggregation(view.InstrumentKind) aggregation.Aggregation` methods are added to the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric".Client` interface. (#3260) -- The `WithTemporalitySelector` and `WithAggregationSelector` `ReaderOption`s have been changed to `ManualReaderOption`s in the `go.opentelemetry.io/otel/sdk/metric` package. (#3260) -- The periodic reader in the `go.opentelemetry.io/otel/sdk/metric` package now uses the temporality and aggregation selectors from its configured exporter instead of accepting them as options. (#3260) - -### Fixed - -- The `go.opentelemetry.io/otel/exporters/prometheus` exporter fixes duplicated `_total` suffixes. (#3369) -- Remove comparable requirement for `Reader`s. (#3387) -- Cumulative metrics from the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) are defined as monotonic sums, instead of non-monotonic. (#3389) -- Asynchronous counters (`Counter` and `UpDownCounter`) from the metric SDK now produce delta sums when configured with delta temporality. (#3398) -- Exported `Status` codes in the `go.opentelemetry.io/otel/exporters/zipkin` exporter are now exported as all upper case values. (#3340) -- `Aggregation`s from `go.opentelemetry.io/otel/sdk/metric` with no data are not exported. (#3394, #3436) -- Re-enabled Attribute Filters in the Metric SDK. (#3396) -- Asynchronous callbacks are only called if they are registered with at least one instrument that does not use drop aggregation. (#3408) -- Do not report empty partial-success responses in the `go.opentelemetry.io/otel/exporters/otlp` exporters. (#3438, #3432) -- Handle partial success responses in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` exporters. (#3162, #3440) -- Prevent duplicate Prometheus description, unit, and type. (#3469) -- Prevents panic when using incorrect `attribute.Value.As[Type]Slice()`. (#3489) - -### Removed - -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.Client` interface is removed. (#3486) -- The `go.opentelemetry.io/otel/exporters/otlp/otlpmetric.New` function is removed. Use the `otlpmetric[http|grpc].New` directly. (#3486) - -### Deprecated - -- The `go.opentelemetry.io/otel/sdk/metric/view` package is deprecated. - Use `Instrument`, `InstrumentKind`, `View`, and `NewView` in `go.opentelemetry.io/otel/sdk/metric` instead. (#3476) - -## [1.11.1/0.33.0] 2022-10-19 - -### Added - -- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` registers with a Prometheus registerer on creation. - By default, it will register with the default Prometheus registerer. - A non-default registerer can be used by passing the `WithRegisterer` option. (#3239) -- Added the `WithAggregationSelector` option to the `go.opentelemetry.io/otel/exporters/prometheus` package to change the default `AggregationSelector` used. (#3341) -- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` converts the `Resource` associated with metric exports into a `target_info` metric. (#3285) - -### Changed - -- The `"go.opentelemetry.io/otel/exporters/prometheus".New` function is updated to return an error. - It will return an error if the exporter fails to register with Prometheus. (#3239) - -### Fixed - -- The URL-encoded values from the `OTEL_RESOURCE_ATTRIBUTES` environment variable are decoded. (#2963) -- The `baggage.NewMember` function decodes the `value` parameter instead of directly using it. - This fixes the implementation to be compliant with the W3C specification. (#3226) -- Slice attributes of the `attribute` package are now comparable based on their value, not instance. (#3108 #3252) -- The `Shutdown` and `ForceFlush` methods of the `"go.opentelemetry.io/otel/sdk/trace".TraceProvider` no longer return an error when no processor is registered. (#3268) -- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` cumulatively sums histogram buckets. (#3281) -- The sum of each histogram data point is now uniquely exported by the `go.opentelemetry.io/otel/exporters/otlpmetric` exporters. (#3284, #3293) -- Recorded values for asynchronous counters (`Counter` and `UpDownCounter`) are interpreted as exact, not incremental, sum values by the metric SDK. (#3350, #3278) -- `UpDownCounters` are now correctly output as Prometheus gauges in the `go.opentelemetry.io/otel/exporters/prometheus` exporter. (#3358) -- The Prometheus exporter in `go.opentelemetry.io/otel/exporters/prometheus` no longer describes the metrics it will send to Prometheus on startup. - Instead the exporter is defined as an "unchecked" collector for Prometheus. - This fixes the `reader is not registered` warning currently emitted on startup. (#3291 #3342) -- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now correctly adds `_total` suffixes to counter metrics. (#3360) -- The `go.opentelemetry.io/otel/exporters/prometheus` exporter now adds a unit suffix to metric names. - This can be disabled using the `WithoutUnits()` option added to that package. (#3352) - -## [1.11.0/0.32.3] 2022-10-12 - -### Added - -- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlptrace/otlptracegrpc` and `go.opentelemetry.io/otel/exporters/otlptrace/otlptracehttp`). (#3261) - -### Changed - -- `span.SetStatus` has been updated such that calls that lower the status are now no-ops. (#3214) -- Upgrade `golang.org/x/sys/unix` from `v0.0.0-20210423185535-09eb48e85fd7` to `v0.0.0-20220919091848-fb04ddd9f9c8`. - This addresses [GO-2022-0493](https://pkg.go.dev/vuln/GO-2022-0493). (#3235) - -## [0.32.2] Metric SDK (Alpha) - 2022-10-11 - -### Added - -- Added an example of using metric views to customize instruments. (#3177) -- Add default User-Agent header to OTLP exporter requests (`go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetricgrpc` and `go.opentelemetry.io/otel/exporters/otlpmetric/otlpmetrichttp`). (#3261) - -### Changed - -- Flush pending measurements with the `PeriodicReader` in the `go.opentelemetry.io/otel/sdk/metric` when `ForceFlush` or `Shutdown` are called. (#3220) -- Update histogram default bounds to match the requirements of the latest specification. (#3222) -- Encode the HTTP status code in the OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`) as an integer. (#3265) - -### Fixed - -- Use default view if instrument does not match any registered view of a reader. (#3224, #3237) -- Return the same instrument every time a user makes the exact same instrument creation call. (#3229, #3251) -- Return the existing instrument when a view transforms a creation call to match an existing instrument. (#3240, #3251) -- Log a warning when a conflicting instrument (e.g. description, unit, data-type) is created instead of returning an error. (#3251) -- The OpenCensus bridge no longer sends empty batches of metrics. (#3263) - -## [0.32.1] Metric SDK (Alpha) - 2022-09-22 - -### Changed - -- The Prometheus exporter sanitizes OpenTelemetry instrument names when exporting. - Invalid characters are replaced with `_`. (#3212) - -### Added - -- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been reintroduced. (#3192) -- The OpenCensus bridge example (`go.opentelemetry.io/otel/example/opencensus`) has been reintroduced. (#3206) - -### Fixed - -- Updated go.mods to point to valid versions of the sdk. (#3216) -- Set the `MeterProvider` resource on all exported metric data. (#3218) - -## [0.32.0] Revised Metric SDK (Alpha) - 2022-09-18 - -### Changed - -- The metric SDK in `go.opentelemetry.io/otel/sdk/metric` is completely refactored to comply with the OpenTelemetry specification. - Please see the package documentation for how the new SDK is initialized and configured. (#3175) -- Update the minimum supported go version to go1.18. Removes support for go1.17 (#3179) - -### Removed - -- The metric portion of the OpenCensus bridge (`go.opentelemetry.io/otel/bridge/opencensus`) has been removed. - A new bridge compliant with the revised metric SDK will be added back in a future release. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/aggregator/histogram` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/aggregator/sum` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/aggregator` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/controller/basic` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/controller/controllertest` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/controller/time` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/export/aggregation` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/export` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/metrictest` package is removed. - A replacement package that supports the new metric SDK will be added back in a future release. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/number` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/processor/basic` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/processor/processortest` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/processor/reducer` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/registry` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/sdkapi` package is removed, see the new metric SDK. (#3175) -- The `go.opentelemetry.io/otel/sdk/metric/selector/simple` package is removed, see the new metric SDK. (#3175) -- The `"go.opentelemetry.io/otel/sdk/metric".ErrUninitializedInstrument` variable was removed. (#3175) -- The `"go.opentelemetry.io/otel/sdk/metric".ErrBadInstrument` variable was removed. (#3175) -- The `"go.opentelemetry.io/otel/sdk/metric".Accumulator` type was removed, see the `MeterProvider`in the new metric SDK. (#3175) -- The `"go.opentelemetry.io/otel/sdk/metric".NewAccumulator` function was removed, see `NewMeterProvider`in the new metric SDK. (#3175) -- The deprecated `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets` function was removed. (#3175) - -## [1.10.0] - 2022-09-09 - -### Added - -- Support Go 1.19. (#3077) - Include compatibility testing and document support. (#3077) -- Support the OTLP ExportTracePartialSuccess response; these are passed to the registered error handler. (#3106) -- Upgrade go.opentelemetry.io/proto/otlp from v0.18.0 to v0.19.0 (#3107) - -### Changed - -- Fix misidentification of OpenTelemetry `SpanKind` in OpenTracing bridge (`go.opentelemetry.io/otel/bridge/opentracing`). (#3096) -- Attempting to start a span with a nil `context` will no longer cause a panic. (#3110) -- All exporters will be shutdown even if one reports an error (#3091) -- Ensure valid UTF-8 when truncating over-length attribute values. (#3156) - -## [1.9.0/0.0.3] - 2022-08-01 - -### Added - -- Add support for Schema Files format 1.1.x (metric "split" transform) with the new `go.opentelemetry.io/otel/schema/v1.1` package. (#2999) -- Add the `go.opentelemetry.io/otel/semconv/v1.11.0` package. - The package contains semantic conventions from the `v1.11.0` version of the OpenTelemetry specification. (#3009) -- Add the `go.opentelemetry.io/otel/semconv/v1.12.0` package. - The package contains semantic conventions from the `v1.12.0` version of the OpenTelemetry specification. (#3010) -- Add the `http.method` attribute to HTTP server metric from all `go.opentelemetry.io/otel/semconv/*` packages. (#3018) - -### Fixed - -- Invalid warning for context setup being deferred in `go.opentelemetry.io/otel/bridge/opentracing` package. (#3029) - -## [1.8.0/0.31.0] - 2022-07-08 - -### Added - -- Add support for `opentracing.TextMap` format in the `Inject` and `Extract` methods -of the `"go.opentelemetry.io/otel/bridge/opentracing".BridgeTracer` type. (#2911) - -### Changed - -- The `crosslink` make target has been updated to use the `go.opentelemetry.io/build-tools/crosslink` package. (#2886) -- In the `go.opentelemetry.io/otel/sdk/instrumentation` package rename `Library` to `Scope` and alias `Library` as `Scope` (#2976) -- Move metric no-op implementation form `nonrecording` to `metric` package. (#2866) - -### Removed - -- Support for go1.16. Support is now only for go1.17 and go1.18 (#2917) - -### Deprecated - -- The `Library` struct in the `go.opentelemetry.io/otel/sdk/instrumentation` package is deprecated. - Use the equivalent `Scope` struct instead. (#2977) -- The `ReadOnlySpan.InstrumentationLibrary` method from the `go.opentelemetry.io/otel/sdk/trace` package is deprecated. - Use the equivalent `ReadOnlySpan.InstrumentationScope` method instead. (#2977) - -## [1.7.0/0.30.0] - 2022-04-28 - -### Added - -- Add the `go.opentelemetry.io/otel/semconv/v1.8.0` package. - The package contains semantic conventions from the `v1.8.0` version of the OpenTelemetry specification. (#2763) -- Add the `go.opentelemetry.io/otel/semconv/v1.9.0` package. - The package contains semantic conventions from the `v1.9.0` version of the OpenTelemetry specification. (#2792) -- Add the `go.opentelemetry.io/otel/semconv/v1.10.0` package. - The package contains semantic conventions from the `v1.10.0` version of the OpenTelemetry specification. (#2842) -- Added an in-memory exporter to metrictest to aid testing with a full SDK. (#2776) - -### Fixed - -- Globally delegated instruments are unwrapped before delegating asynchronous callbacks. (#2784) -- Remove import of `testing` package in non-tests builds of the `go.opentelemetry.io/otel` package. (#2786) - -### Changed - -- The `WithLabelEncoder` option from the `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` package is renamed to `WithAttributeEncoder`. (#2790) -- The `LabelFilterSelector` interface from `go.opentelemetry.io/otel/sdk/metric/processor/reducer` is renamed to `AttributeFilterSelector`. - The method included in the renamed interface also changed from `LabelFilterFor` to `AttributeFilterFor`. (#2790) -- The `Metadata.Labels` method from the `go.opentelemetry.io/otel/sdk/metric/export` package is renamed to `Metadata.Attributes`. - Consequentially, the `Record` type from the same package also has had the embedded method renamed. (#2790) - -### Deprecated - -- The `Iterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. - Use the equivalent `Iterator.Attribute` method instead. (#2790) -- The `Iterator.IndexedLabel` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. - Use the equivalent `Iterator.IndexedAttribute` method instead. (#2790) -- The `MergeIterator.Label` method in the `go.opentelemetry.io/otel/attribute` package is deprecated. - Use the equivalent `MergeIterator.Attribute` method instead. (#2790) - -### Removed - -- Removed the `Batch` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) -- Removed the `Measurement` type from the `go.opentelemetry.io/otel/sdk/metric/metrictest` package. (#2864) - -## [0.29.0] - 2022-04-11 - -### Added - -- The metrics global package was added back into several test files. (#2764) -- The `Meter` function is added back to the `go.opentelemetry.io/otel/metric/global` package. - This function is a convenience function equivalent to calling `global.MeterProvider().Meter(...)`. (#2750) - -### Removed - -- Removed module the `go.opentelemetry.io/otel/sdk/export/metric`. - Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2720) - -### Changed - -- Don't panic anymore when setting a global MeterProvider to itself. (#2749) -- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` from `v0.12.1` to `v0.15.0`. - This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibraryMetrics` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeMetrics`. (#2748) - -## [1.6.3] - 2022-04-07 - -### Fixed - -- Allow non-comparable global `MeterProvider`, `TracerProvider`, and `TextMapPropagator` types to be set. (#2772, #2773) - -## [1.6.2] - 2022-04-06 - -### Changed - -- Don't panic anymore when setting a global TracerProvider or TextMapPropagator to itself. (#2749) -- Upgrade `go.opentelemetry.io/proto/otlp` in `go.opentelemetry.io/otel/exporters/otlp/otlptrace` from `v0.12.1` to `v0.15.0`. - This replaces the use of the now deprecated `InstrumentationLibrary` and `InstrumentationLibrarySpans` types and fields in the proto library with the equivalent `InstrumentationScope` and `ScopeSpans`. (#2748) - -## [1.6.1] - 2022-03-28 - -### Fixed - -- The `go.opentelemetry.io/otel/schema/*` packages now use the correct schema URL for their `SchemaURL` constant. - Instead of using `"https://opentelemetry.io/schemas/v"` they now use the correct URL without a `v` prefix, `"https://opentelemetry.io/schemas/"`. (#2743, #2744) - -### Security - -- Upgrade `go.opentelemetry.io/proto/otlp` from `v0.12.0` to `v0.12.1`. - This includes an indirect upgrade of `github.com/grpc-ecosystem/grpc-gateway` which resolves [a vulnerability](https://nvd.nist.gov/vuln/detail/CVE-2019-11254) from `gopkg.in/yaml.v2` in version `v2.2.3`. (#2724, #2728) - -## [1.6.0/0.28.0] - 2022-03-23 - -### ⚠️ Notice ⚠️ - -This update is a breaking change of the unstable Metrics API. -Code instrumented with the `go.opentelemetry.io/otel/metric` will need to be modified. - -### Added - -- Add metrics exponential histogram support. - New mapping functions have been made available in `sdk/metric/aggregator/exponential/mapping` for other OpenTelemetry projects to take dependencies on. (#2502) -- Add Go 1.18 to our compatibility tests. (#2679) -- Allow configuring the Sampler with the `OTEL_TRACES_SAMPLER` and `OTEL_TRACES_SAMPLER_ARG` environment variables. (#2305, #2517) -- Add the `metric/global` for obtaining and setting the global `MeterProvider`. (#2660) - -### Changed - -- The metrics API has been significantly changed to match the revised OpenTelemetry specification. - High-level changes include: - - - Synchronous and asynchronous instruments are now handled by independent `InstrumentProvider`s. - These `InstrumentProvider`s are managed with a `Meter`. - - Synchronous and asynchronous instruments are grouped into their own packages based on value types. - - Asynchronous callbacks can now be registered with a `Meter`. - - Be sure to check out the metric module documentation for more information on how to use the revised API. (#2587, #2660) - -### Fixed - -- Fallback to general attribute limits when span specific ones are not set in the environment. (#2675, #2677) - -## [1.5.0] - 2022-03-16 - -### Added - -- Log the Exporters configuration in the TracerProviders message. (#2578) -- Added support to configure the span limits with environment variables. - The following environment variables are supported. (#2606, #2637) - - `OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT` - - `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` - - `OTEL_SPAN_EVENT_COUNT_LIMIT` - - `OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT` - - `OTEL_SPAN_LINK_COUNT_LIMIT` - - `OTEL_LINK_ATTRIBUTE_COUNT_LIMIT` - - If the provided environment variables are invalid (negative), the default values would be used. -- Rename the `gc` runtime name to `go` (#2560) -- Add resource container ID detection. (#2418) -- Add span attribute value length limit. - The new `AttributeValueLengthLimit` field is added to the `"go.opentelemetry.io/otel/sdk/trace".SpanLimits` type to configure this limit for a `TracerProvider`. - The default limit for this resource is "unlimited". (#2637) -- Add the `WithRawSpanLimits` option to `go.opentelemetry.io/otel/sdk/trace`. - This option replaces the `WithSpanLimits` option. - Zero or negative values will not be changed to the default value like `WithSpanLimits` does. - Setting a limit to zero will effectively disable the related resource it limits and setting to a negative value will mean that resource is unlimited. - Consequentially, limits should be constructed using `NewSpanLimits` and updated accordingly. (#2637) - -### Changed - -- Drop oldest tracestate `Member` when capacity is reached. (#2592) -- Add event and link drop counts to the exported data from the `oltptrace` exporter. (#2601) -- Unify path cleaning functionally in the `otlpmetric` and `otlptrace` configuration. (#2639) -- Change the debug message from the `sdk/trace.BatchSpanProcessor` to reflect the count is cumulative. (#2640) -- Introduce new internal `envconfig` package for OTLP exporters. (#2608) -- If `http.Request.Host` is empty, fall back to use `URL.Host` when populating `http.host` in the `semconv` packages. (#2661) - -### Fixed - -- Remove the OTLP trace exporter limit of SpanEvents when exporting. (#2616) -- Default to port `4318` instead of `4317` for the `otlpmetrichttp` and `otlptracehttp` client. (#2614, #2625) -- Unlimited span limits are now supported (negative values). (#2636, #2637) - -### Deprecated - -- Deprecated `"go.opentelemetry.io/otel/sdk/trace".WithSpanLimits`. - Use `WithRawSpanLimits` instead. - That option allows setting unlimited and zero limits, this option does not. - This option will be kept until the next major version incremented release. (#2637) - -## [1.4.1] - 2022-02-16 - -### Fixed - -- Fix race condition in reading the dropped spans number for the `BatchSpanProcessor`. (#2615) - -## [1.4.0] - 2022-02-11 - -### Added - -- Use `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable to specify zipkin collector endpoint. (#2490) -- Log the configuration of `TracerProvider`s, and `Tracer`s for debugging. - To enable use a logger with Verbosity (V level) `>=1`. (#2500) -- Added support to configure the batch span-processor with environment variables. - The following environment variables are used. (#2515) - - `OTEL_BSP_SCHEDULE_DELAY` - - `OTEL_BSP_EXPORT_TIMEOUT` - - `OTEL_BSP_MAX_QUEUE_SIZE`. - - `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` - -### Changed - -- Zipkin exporter exports `Resource` attributes in the `Tags` field. (#2589) - -### Deprecated - -- Deprecate module the `go.opentelemetry.io/otel/sdk/export/metric`. - Use the `go.opentelemetry.io/otel/sdk/metric` module instead. (#2382) -- Deprecate `"go.opentelemetry.io/otel/sdk/metric".AtomicFieldOffsets`. (#2445) - -### Fixed - -- Fixed the instrument kind for noop async instruments to correctly report an implementation. (#2461) -- Fix UDP packets overflowing with Jaeger payloads. (#2489, #2512) -- Change the `otlpmetric.Client` interface's `UploadMetrics` method to accept a single `ResourceMetrics` instead of a slice of them. (#2491) -- Specify explicit buckets in Prometheus example, fixing issue where example only has `+inf` bucket. (#2419, #2493) -- W3C baggage will now decode urlescaped values. (#2529) -- Baggage members are now only validated once, when calling `NewMember` and not also when adding it to the baggage itself. (#2522) -- The order attributes are dropped from spans in the `go.opentelemetry.io/otel/sdk/trace` package when capacity is reached is fixed to be in compliance with the OpenTelemetry specification. - Instead of dropping the least-recently-used attribute, the last added attribute is dropped. - This drop order still only applies to attributes with unique keys not already contained in the span. - If an attribute is added with a key already contained in the span, that attribute is updated to the new value being added. (#2576) - -### Removed - -- Updated `go.opentelemetry.io/proto/otlp` from `v0.11.0` to `v0.12.0`. This version removes a number of deprecated methods. (#2546) - - [`Metric.GetIntGauge()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntGauge) - - [`Metric.GetIntHistogram()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntHistogram) - - [`Metric.GetIntSum()`](https://pkg.go.dev/go.opentelemetry.io/proto/otlp@v0.11.0/metrics/v1#Metric.GetIntSum) - -## [1.3.0] - 2021-12-10 - -### ⚠️ Notice ⚠️ - -We have updated the project minimum supported Go version to 1.16 - -### Added - -- Added an internal Logger. - This can be used by the SDK and API to provide users with feedback of the internal state. - To enable verbose logs configure the logger which will print V(1) logs. For debugging information configure to print V(5) logs. (#2343) -- Add the `WithRetry` `Option` and the `RetryConfig` type to the `go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp` package to specify retry behavior consistently. (#2425) -- Add `SpanStatusFromHTTPStatusCodeAndSpanKind` to all `semconv` packages to return a span status code similar to `SpanStatusFromHTTPStatusCode`, but exclude `4XX` HTTP errors as span errors if the span is of server kind. (#2296) - -### Changed - -- The `"go.opentelemetry.io/otel/exporter/otel/otlptrace/otlptracegrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2329) -- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".Client` now uses the underlying gRPC `ClientConn` to handle name resolution, TCP connection establishment (with retries and backoff) and TLS handshakes, and handling errors on established connections by re-resolving the name and reconnecting. (#2425) -- The `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetricgrpc".RetrySettings` type is renamed to `RetryConfig`. (#2425) -- The `go.opentelemetry.io/otel/exporter/otel/*` gRPC exporters now default to using the host's root CA set if none are provided by the user and `WithInsecure` is not specified. (#2432) -- Change `resource.Default` to be evaluated the first time it is called, rather than on import. This allows the caller the option to update `OTEL_RESOURCE_ATTRIBUTES` first, such as with `os.Setenv`. (#2371) - -### Fixed - -- The `go.opentelemetry.io/otel/exporter/otel/*` exporters are updated to handle per-signal and universal endpoints according to the OpenTelemetry specification. - Any per-signal endpoint set via an `OTEL_EXPORTER_OTLP__ENDPOINT` environment variable is now used without modification of the path. - When `OTEL_EXPORTER_OTLP_ENDPOINT` is set, if it contains a path, that path is used as a base path which per-signal paths are appended to. (#2433) -- Basic metric controller updated to use sync.Map to avoid blocking calls (#2381) -- The `go.opentelemetry.io/otel/exporter/jaeger` correctly sets the `otel.status_code` value to be a string of `ERROR` or `OK` instead of an integer code. (#2439, #2440) - -### Deprecated - -- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithMaxAttempts` `Option`, use the new `WithRetry` `Option` instead. (#2425) -- Deprecated the `"go.opentelemetry.io/otel/exporter/otel/otlpmetric/otlpmetrichttp".WithBackoff` `Option`, use the new `WithRetry` `Option` instead. (#2425) - -### Removed - -- Remove the metric Processor's ability to convert cumulative to delta aggregation temporality. (#2350) -- Remove the metric Bound Instruments interface and implementations. (#2399) -- Remove the metric MinMaxSumCount kind aggregation and the corresponding OTLP export path. (#2423) -- Metric SDK removes the "exact" aggregator for histogram instruments, as it performed a non-standard aggregation for OTLP export (creating repeated Gauge points) and worked its way into a number of confusing examples. (#2348) - -## [1.2.0] - 2021-11-12 - -### Changed - -- Metric SDK `export.ExportKind`, `export.ExportKindSelector` types have been renamed to `aggregation.Temporality` and `aggregation.TemporalitySelector` respectively to keep in line with current specification and protocol along with built-in selectors (e.g., `aggregation.CumulativeTemporalitySelector`, ...). (#2274) -- The Metric `Exporter` interface now requires a `TemporalitySelector` method instead of an `ExportKindSelector`. (#2274) -- Metrics API cleanup. The `metric/sdkapi` package has been created to relocate the API-to-SDK interface: - - The following interface types simply moved from `metric` to `metric/sdkapi`: `Descriptor`, `MeterImpl`, `InstrumentImpl`, `SyncImpl`, `BoundSyncImpl`, `AsyncImpl`, `AsyncRunner`, `AsyncSingleRunner`, and `AsyncBatchRunner` - - The following struct types moved and are replaced with type aliases, since they are exposed to the user: `Observation`, `Measurement`. - - The No-op implementations of sync and async instruments are no longer exported, new functions `sdkapi.NewNoopAsyncInstrument()` and `sdkapi.NewNoopSyncInstrument()` are provided instead. (#2271) -- Update the SDK `BatchSpanProcessor` to export all queued spans when `ForceFlush` is called. (#2080, #2335) - -### Added - -- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) -- Added a new `schema` module to help parse Schema Files in OTEP 0152 format. (#2267) -- Added a new `MapCarrier` to the `go.opentelemetry.io/otel/propagation` package to hold propagated cross-cutting concerns as a `map[string]string` held in memory. (#2334) - -## [1.1.0] - 2021-10-27 - -### Added - -- Add the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".WithGRPCConn` option so the exporter can reuse an existing gRPC connection. (#2002) -- Add the `go.opentelemetry.io/otel/semconv/v1.7.0` package. - The package contains semantic conventions from the `v1.7.0` version of the OpenTelemetry specification. (#2320) -- Add the `go.opentelemetry.io/otel/semconv/v1.6.1` package. - The package contains semantic conventions from the `v1.6.1` version of the OpenTelemetry specification. (#2321) -- Add the `go.opentelemetry.io/otel/semconv/v1.5.0` package. - The package contains semantic conventions from the `v1.5.0` version of the OpenTelemetry specification. (#2322) - - When upgrading from the `semconv/v1.4.0` package note the following name changes: - - `K8SReplicasetUIDKey` -> `K8SReplicaSetUIDKey` - - `K8SReplicasetNameKey` -> `K8SReplicaSetNameKey` - - `K8SStatefulsetUIDKey` -> `K8SStatefulSetUIDKey` - - `k8SStatefulsetNameKey` -> `K8SStatefulSetNameKey` - - `K8SDaemonsetUIDKey` -> `K8SDaemonSetUIDKey` - - `K8SDaemonsetNameKey` -> `K8SDaemonSetNameKey` - -### Changed - -- Links added to a span will be dropped by the SDK if they contain an invalid span context (#2275). - -### Fixed - -- The `"go.opentelemetry.io/otel/semconv/v1.4.0".HTTPServerAttributesFromHTTPRequest` now correctly only sets the HTTP client IP attribute even if the connection was routed with proxies and there are multiple addresses in the `X-Forwarded-For` header. (#2282, #2284) -- The `"go.opentelemetry.io/otel/semconv/v1.4.0".NetAttributesFromHTTPRequest` function correctly handles IPv6 addresses as IP addresses and sets the correct net peer IP instead of the net peer hostname attribute. (#2283, #2285) -- The simple span processor shutdown method deterministically returns the exporter error status if it simultaneously finishes when the deadline is reached. (#2290, #2289) - -## [1.0.1] - 2021-10-01 - -### Fixed - -- json stdout exporter no longer crashes due to concurrency bug. (#2265) - -## [Metrics 0.24.0] - 2021-10-01 - -### Changed - -- NoopMeterProvider is now private and NewNoopMeterProvider must be used to obtain a noopMeterProvider. (#2237) -- The Metric SDK `Export()` function takes a new two-level reader interface for iterating over results one instrumentation library at a time. (#2197) - - The former `"go.opentelemetry.io/otel/sdk/export/metric".CheckpointSet` is renamed `Reader`. - - The new interface is named `"go.opentelemetry.io/otel/sdk/export/metric".InstrumentationLibraryReader`. - -## [1.0.0] - 2021-09-20 - -This is the first stable release for the project. -This release includes an API and SDK for the tracing signal that will comply with the stability guarantees defined by the projects [versioning policy](./VERSIONING.md). - -### Added - -- OTLP trace exporter now sets the `SchemaURL` field in the exported telemetry if the Tracer has `WithSchemaURL` option. (#2242) - -### Fixed - -- Slice-valued attributes can correctly be used as map keys. (#2223) - -### Removed - -- Removed the `"go.opentelemetry.io/otel/exporters/zipkin".WithSDKOptions` function. (#2248) -- Removed the deprecated package `go.opentelemetry.io/otel/oteltest`. (#2234) -- Removed the deprecated package `go.opentelemetry.io/otel/bridge/opencensus/utils`. (#2233) -- Removed deprecated functions, types, and methods from `go.opentelemetry.io/otel/attribute` package. - Use the typed functions and methods added to the package instead. (#2235) - - The `Key.Array` method is removed. - - The `Array` function is removed. - - The `Any` function is removed. - - The `ArrayValue` function is removed. - - The `AsArray` function is removed. - -## [1.0.0-RC3] - 2021-09-02 - -### Added - -- Added `ErrorHandlerFunc` to use a function as an `"go.opentelemetry.io/otel".ErrorHandler`. (#2149) -- Added `"go.opentelemetry.io/otel/trace".WithStackTrace` option to add a stack trace when using `span.RecordError` or when panic is handled in `span.End`. (#2163) -- Added typed slice attribute types and functionality to the `go.opentelemetry.io/otel/attribute` package to replace the existing array type and functions. (#2162) - - `BoolSlice`, `IntSlice`, `Int64Slice`, `Float64Slice`, and `StringSlice` replace the use of the `Array` function in the package. -- Added the `go.opentelemetry.io/otel/example/fib` example package. - Included is an example application that computes Fibonacci numbers. (#2203) - -### Changed - -- Metric instruments have been renamed to match the (feature-frozen) metric API specification: - - ValueRecorder becomes Histogram - - ValueObserver becomes Gauge - - SumObserver becomes CounterObserver - - UpDownSumObserver becomes UpDownCounterObserver - The API exported from this project is still considered experimental. (#2202) -- Metric SDK/API implementation type `InstrumentKind` moves into `sdkapi` sub-package. (#2091) -- The Metrics SDK export record no longer contains a Resource pointer, the SDK `"go.opentelemetry.io/otel/sdk/trace/export/metric".Exporter.Export()` function for push-based exporters now takes a single Resource argument, pull-based exporters use `"go.opentelemetry.io/otel/sdk/metric/controller/basic".Controller.Resource()`. (#2120) -- The JSON output of the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` is harmonized now such that the output is "plain" JSON objects after each other of the form `{ ... } { ... } { ... }`. Earlier the JSON objects describing a span were wrapped in a slice for each `Exporter.ExportSpans` call, like `[ { ... } ][ { ... } { ... } ]`. Outputting JSON object directly after each other is consistent with JSON loggers, and a bit easier to parse and read. (#2196) -- Update the `NewTracerConfig`, `NewSpanStartConfig`, `NewSpanEndConfig`, and `NewEventConfig` function in the `go.opentelemetry.io/otel/trace` package to return their respective configurations as structs instead of pointers to the struct. (#2212) - -### Deprecated - -- The `go.opentelemetry.io/otel/bridge/opencensus/utils` package is deprecated. - All functionality from this package now exists in the `go.opentelemetry.io/otel/bridge/opencensus` package. - The functions from that package should be used instead. (#2166) -- The `"go.opentelemetry.io/otel/attribute".Array` function and the related `ARRAY` value type is deprecated. - Use the typed `*Slice` functions and types added to the package instead. (#2162) -- The `"go.opentelemetry.io/otel/attribute".Any` function is deprecated. - Use the typed functions instead. (#2181) -- The `go.opentelemetry.io/otel/oteltest` package is deprecated. - The `"go.opentelemetry.io/otel/sdk/trace/tracetest".SpanRecorder` can be registered with the default SDK (`go.opentelemetry.io/otel/sdk/trace`) as a `SpanProcessor` and used as a replacement for this deprecated package. (#2188) - -### Removed - -- Removed metrics test package `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#2105) - -### Fixed - -- The `fromEnv` detector no longer throws an error when `OTEL_RESOURCE_ATTRIBUTES` environment variable is not set or empty. (#2138) -- Setting the global `ErrorHandler` with `"go.opentelemetry.io/otel".SetErrorHandler` multiple times is now supported. (#2160, #2140) -- The `"go.opentelemetry.io/otel/attribute".Any` function now supports `int32` values. (#2169) -- Multiple calls to `"go.opentelemetry.io/otel/sdk/metric/controller/basic".WithResource()` are handled correctly, and when no resources are provided `"go.opentelemetry.io/otel/sdk/resource".Default()` is used. (#2120) -- The `WithoutTimestamps` option for the `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter causes the exporter to correctly omit timestamps. (#2195) -- Fixed typos in resources.go. (#2201) - -## [1.0.0-RC2] - 2021-07-26 - -### Added - -- Added `WithOSDescription` resource configuration option to set OS (Operating System) description resource attribute (`os.description`). (#1840) -- Added `WithOS` resource configuration option to set all OS (Operating System) resource attributes at once. (#1840) -- Added the `WithRetry` option to the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. - This option is a replacement for the removed `WithMaxAttempts` and `WithBackoff` options. (#2095) -- Added API `LinkFromContext` to return Link which encapsulates SpanContext from provided context and also encapsulates attributes. (#2115) -- Added a new `Link` type under the SDK `otel/sdk/trace` package that counts the number of attributes that were dropped for surpassing the `AttributePerLinkCountLimit` configured in the Span's `SpanLimits`. - This new type replaces the equal-named API `Link` type found in the `otel/trace` package for most usages within the SDK. - For example, instances of this type are now returned by the `Links()` function of `ReadOnlySpan`s provided in places like the `OnEnd` function of `SpanProcessor` implementations. (#2118) -- Added the `SpanRecorder` type to the `go.opentelemetry.io/otel/skd/trace/tracetest` package. - This type can be used with the default SDK as a `SpanProcessor` during testing. (#2132) - -### Changed - -- The `SpanModels` function is now exported from the `go.opentelemetry.io/otel/exporters/zipkin` package to convert OpenTelemetry spans into Zipkin model spans. (#2027) -- Rename the `"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc".RetrySettings` to `RetryConfig`. (#2095) - -### Deprecated - -- The `TextMapCarrier` and `TextMapPropagator` from the `go.opentelemetry.io/otel/oteltest` package and their associated creation functions (`TextMapCarrier`, `NewTextMapPropagator`) are deprecated. (#2114) -- The `Harness` type from the `go.opentelemetry.io/otel/oteltest` package and its associated creation function, `NewHarness` are deprecated and will be removed in the next release. (#2123) -- The `TraceStateFromKeyValues` function from the `go.opentelemetry.io/otel/oteltest` package is deprecated. - Use the `trace.ParseTraceState` function instead. (#2122) - -### Removed - -- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/jaeger`. (#2020) -- Removed the deprecated package `go.opentelemetry.io/otel/exporters/trace/zipkin`. (#2020) -- Removed the `"go.opentelemetry.io/otel/sdk/resource".WithBuiltinDetectors` function. - The explicit `With*` options for every built-in detector should be used instead. (#2026 #2097) -- Removed the `WithMaxAttempts` and `WithBackoff` options from the `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` package. - The retry logic of the package has been updated to match the `otlptracegrpc` package and accordingly a `WithRetry` option is added that should be used instead. (#2095) -- Removed `DroppedAttributeCount` field from `otel/trace.Link` struct. (#2118) - -### Fixed - -- When using WithNewRoot, don't use the parent context for making sampling decisions. (#2032) -- `oteltest.Tracer` now creates a valid `SpanContext` when using `WithNewRoot`. (#2073) -- OS type detector now sets the correct `dragonflybsd` value for DragonFly BSD. (#2092) -- The OTel span status is correctly transformed into the OTLP status in the `go.opentelemetry.io/otel/exporters/otlp/otlptrace` package. - This fix will by default set the status to `Unset` if it is not explicitly set to `Ok` or `Error`. (#2099 #2102) -- The `Inject` method for the `"go.opentelemetry.io/otel/propagation".TraceContext` type no longer injects empty `tracestate` values. (#2108) -- Use `6831` as default Jaeger agent port instead of `6832`. (#2131) - -## [Experimental Metrics v0.22.0] - 2021-07-19 - -### Added - -- Adds HTTP support for OTLP metrics exporter. (#2022) - -### Removed - -- Removed the deprecated package `go.opentelemetry.io/otel/exporters/metric/prometheus`. (#2020) - -## [1.0.0-RC1] / 0.21.0 - 2021-06-18 - -With this release we are introducing a split in module versions. The tracing API and SDK are entering the `v1.0.0` Release Candidate phase with `v1.0.0-RC1` -while the experimental metrics API and SDK continue with `v0.x` releases at `v0.21.0`. Modules at major version 1 or greater will not depend on modules -with major version 0. - -### Added - -- Adds `otlpgrpc.WithRetry`option for configuring the retry policy for transient errors on the otlp/gRPC exporter. (#1832) - - The following status codes are defined as transient errors: - | gRPC Status Code | Description | - | ---------------- | ----------- | - | 1 | Cancelled | - | 4 | Deadline Exceeded | - | 8 | Resource Exhausted | - | 10 | Aborted | - | 10 | Out of Range | - | 14 | Unavailable | - | 15 | Data Loss | -- Added `Status` type to the `go.opentelemetry.io/otel/sdk/trace` package to represent the status of a span. (#1874) -- Added `SpanStub` type and its associated functions to the `go.opentelemetry.io/otel/sdk/trace/tracetest` package. - This type can be used as a testing replacement for the `SpanSnapshot` that was removed from the `go.opentelemetry.io/otel/sdk/trace` package. (#1873) -- Adds support for scheme in `OTEL_EXPORTER_OTLP_ENDPOINT` according to the spec. (#1886) -- Adds `trace.WithSchemaURL` option for configuring the tracer with a Schema URL. (#1889) -- Added an example of using OpenTelemetry Go as a trace context forwarder. (#1912) -- `ParseTraceState` is added to the `go.opentelemetry.io/otel/trace` package. - It can be used to decode a `TraceState` from a `tracestate` header string value. (#1937) -- Added `Len` method to the `TraceState` type in the `go.opentelemetry.io/otel/trace` package. - This method returns the number of list-members the `TraceState` holds. (#1937) -- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace` that defines a trace exporter that uses a `otlptrace.Client` to send data. - Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc` implementing a gRPC `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing .(#1922) -- Added `Baggage`, `Member`, and `Property` types to the `go.opentelemetry.io/otel/baggage` package along with their related functions. (#1967) -- Added `ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext` functions to the `go.opentelemetry.io/otel/baggage` package. - These functions replace the `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions from that package and directly work with the new `Baggage` type. (#1967) -- The `OTEL_SERVICE_NAME` environment variable is the preferred source for `service.name`, used by the environment resource detector if a service name is present both there and in `OTEL_RESOURCE_ATTRIBUTES`. (#1969) -- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp` implementing an HTTP `otlptrace.Client` and offers convenience functions, `NewExportPipeline` and `InstallNewPipeline`, to setup and install a `otlptrace.Exporter` in tracing. (#1963) -- Changes `go.opentelemetry.io/otel/sdk/resource.NewWithAttributes` to require a schema URL. The old function is still available as `resource.NewSchemaless`. This is a breaking change. (#1938) -- Several builtin resource detectors now correctly populate the schema URL. (#1938) -- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric` that defines a metrics exporter that uses a `otlpmetric.Client` to send data. -- Creates package `go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc` implementing a gRPC `otlpmetric.Client` and offers convenience functions, `New` and `NewUnstarted`, to create an `otlpmetric.Exporter`.(#1991) -- Added `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` exporter. (#2005) -- Added `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` exporter. (#2005) -- Added a `TracerProvider()` method to the `"go.opentelemetry.io/otel/trace".Span` interface. This can be used to obtain a `TracerProvider` from a given span that utilizes the same trace processing pipeline. (#2009) - -### Changed - -- Make `NewSplitDriver` from `go.opentelemetry.io/otel/exporters/otlp` take variadic arguments instead of a `SplitConfig` item. - `NewSplitDriver` now automatically implements an internal `noopDriver` for `SplitConfig` fields that are not initialized. (#1798) -- `resource.New()` now creates a Resource without builtin detectors. Previous behavior is now achieved by using `WithBuiltinDetectors` Option. (#1810) -- Move the `Event` type from the `go.opentelemetry.io/otel` package to the `go.opentelemetry.io/otel/sdk/trace` package. (#1846) -- CI builds validate against last two versions of Go, dropping 1.14 and adding 1.16. (#1865) -- BatchSpanProcessor now report export failures when calling `ForceFlush()` method. (#1860) -- `Set.Encoded(Encoder)` no longer caches the result of an encoding. (#1855) -- Renamed `CloudZoneKey` to `CloudAvailabilityZoneKey` in Resource semantic conventions according to spec. (#1871) -- The `StatusCode` and `StatusMessage` methods of the `ReadOnlySpan` interface and the `Span` produced by the `go.opentelemetry.io/otel/sdk/trace` package have been replaced with a single `Status` method. - This method returns the status of a span using the new `Status` type. (#1874) -- Updated `ExportSpans` method of the`SpanExporter` interface type to accept `ReadOnlySpan`s instead of the removed `SpanSnapshot`. - This brings the export interface into compliance with the specification in that it now accepts an explicitly immutable type instead of just an implied one. (#1873) -- Unembed `SpanContext` in `Link`. (#1877) -- Generate Semantic conventions from the specification YAML. (#1891) -- Spans created by the global `Tracer` obtained from `go.opentelemetry.io/otel`, prior to a functioning `TracerProvider` being set, now propagate the span context from their parent if one exists. (#1901) -- The `"go.opentelemetry.io/otel".Tracer` function now accepts tracer options. (#1902) -- Move the `go.opentelemetry.io/otel/unit` package to `go.opentelemetry.io/otel/metric/unit`. (#1903) -- Changed `go.opentelemetry.io/otel/trace.TracerConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config.) (#1921) -- Changed `go.opentelemetry.io/otel/trace.SpanConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) -- Changed `span.End()` now only accepts Options that are allowed at `End()`. (#1921) -- Changed `go.opentelemetry.io/otel/metric.InstrumentConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) -- Changed `go.opentelemetry.io/otel/metric.MeterConfig` to conform to the [Contributing guidelines](CONTRIBUTING.md#config). (#1921) -- Refactored option types according to the contribution style guide. (#1882) -- Move the `go.opentelemetry.io/otel/trace.TraceStateFromKeyValues` function to the `go.opentelemetry.io/otel/oteltest` package. - This function is preserved for testing purposes where it may be useful to create a `TraceState` from `attribute.KeyValue`s, but it is not intended for production use. - The new `ParseTraceState` function should be used to create a `TraceState`. (#1931) -- Updated `MarshalJSON` method of the `go.opentelemetry.io/otel/trace.TraceState` type to marshal the type into the string representation of the `TraceState`. (#1931) -- The `TraceState.Delete` method from the `go.opentelemetry.io/otel/trace` package no longer returns an error in addition to a `TraceState`. (#1931) -- Updated `Get` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) -- Updated `Insert` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a pair of `string`s instead of an `attribute.KeyValue` type. (#1931) -- Updated `Delete` method of the `TraceState` type from the `go.opentelemetry.io/otel/trace` package to accept a `string` instead of an `attribute.Key` type. (#1931) -- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/stdout` package. (#1985) -- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/metric/prometheus` package. (#1985) -- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1985) -- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1985) -- Renamed `NewExporter` to `New` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) -- Renamed `NewUnstartedExporter` to `NewUnstarted` in the `go.opentelemetry.io/otel/exporters/otlp` package. (#1985) -- The `go.opentelemetry.io/otel/semconv` package has been moved to `go.opentelemetry.io/otel/semconv/v1.4.0` to allow for multiple [telemetry schema](https://github.com/open-telemetry/oteps/blob/main/text/0152-telemetry-schemas.md) versions to be used concurrently. (#1987) -- Metrics test helpers in `go.opentelemetry.io/otel/oteltest` have been moved to `go.opentelemetry.io/otel/metric/metrictest`. (#1988) - -### Deprecated - -- The `go.opentelemetry.io/otel/exporters/metric/prometheus` is deprecated, use `go.opentelemetry.io/otel/exporters/prometheus` instead. (#1993) -- The `go.opentelemetry.io/otel/exporters/trace/jaeger` is deprecated, use `go.opentelemetry.io/otel/exporters/jaeger` instead. (#1993) -- The `go.opentelemetry.io/otel/exporters/trace/zipkin` is deprecated, use `go.opentelemetry.io/otel/exporters/zipkin` instead. (#1993) - -### Removed - -- Removed `resource.WithoutBuiltin()`. Use `resource.New()`. (#1810) -- Unexported types `resource.FromEnv`, `resource.Host`, and `resource.TelemetrySDK`, Use the corresponding `With*()` to use individually. (#1810) -- Removed the `Tracer` and `IsRecording` method from the `ReadOnlySpan` in the `go.opentelemetry.io/otel/sdk/trace`. - The `Tracer` method is not a required to be included in this interface and given the mutable nature of the tracer that is associated with a span, this method is not appropriate. - The `IsRecording` method returns if the span is recording or not. - A read-only span value does not need to know if updates to it will be recorded or not. - By definition, it cannot be updated so there is no point in communicating if an update is recorded. (#1873) -- Removed the `SpanSnapshot` type from the `go.opentelemetry.io/otel/sdk/trace` package. - The use of this type has been replaced with the use of the explicitly immutable `ReadOnlySpan` type. - When a concrete representation of a read-only span is needed for testing, the newly added `SpanStub` in the `go.opentelemetry.io/otel/sdk/trace/tracetest` package should be used. (#1873) -- Removed the `Tracer` method from the `Span` interface in the `go.opentelemetry.io/otel/trace` package. - Using the same tracer that created a span introduces the error where an instrumentation library's `Tracer` is used by other code instead of their own. - The `"go.opentelemetry.io/otel".Tracer` function or a `TracerProvider` should be used to acquire a library specific `Tracer` instead. (#1900) - - The `TracerProvider()` method on the `Span` interface may also be used to obtain a `TracerProvider` using the same trace processing pipeline. (#2009) -- The `http.url` attribute generated by `HTTPClientAttributesFromHTTPRequest` will no longer include username or password information. (#1919) -- Removed `IsEmpty` method of the `TraceState` type in the `go.opentelemetry.io/otel/trace` package in favor of using the added `TraceState.Len` method. (#1931) -- Removed `Set`, `Value`, `ContextWithValue`, `ContextWithoutValue`, and `ContextWithEmpty` functions in the `go.opentelemetry.io/otel/baggage` package. - Handling of baggage is now done using the added `Baggage` type and related context functions (`ContextWithBaggage`, `ContextWithoutBaggage`, and `FromContext`) in that package. (#1967) -- The `InstallNewPipeline` and `NewExportPipeline` creation functions in all the exporters (prometheus, otlp, stdout, jaeger, and zipkin) have been removed. - These functions were deemed premature attempts to provide convenience that did not achieve this aim. (#1985) -- The `go.opentelemetry.io/otel/exporters/otlp` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/otlp/otlptrace` instead. (#1990) -- The `go.opentelemetry.io/otel/exporters/stdout` exporter has been removed. Use `go.opentelemetry.io/otel/exporters/stdout/stdouttrace` or `go.opentelemetry.io/otel/exporters/stdout/stdoutmetric` instead. (#2005) - -### Fixed - -- Only report errors from the `"go.opentelemetry.io/otel/sdk/resource".Environment` function when they are not `nil`. (#1850, #1851) -- The `Shutdown` method of the simple `SpanProcessor` in the `go.opentelemetry.io/otel/sdk/trace` package now honors the context deadline or cancellation. (#1616, #1856) -- BatchSpanProcessor now drops span batches that failed to be exported. (#1860) -- Use `http://localhost:14268/api/traces` as default Jaeger collector endpoint instead of `http://localhost:14250`. (#1898) -- Allow trailing and leading whitespace in the parsing of a `tracestate` header. (#1931) -- Add logic to determine if the channel is closed to fix Jaeger exporter test panic with close closed channel. (#1870, #1973) -- Avoid transport security when OTLP endpoint is a Unix socket. (#2001) - -### Security - -## [0.20.0] - 2021-04-23 - -### Added - -- The OTLP exporter now has two new convenience functions, `NewExportPipeline` and `InstallNewPipeline`, setup and install the exporter in tracing and metrics pipelines. (#1373) -- Adds semantic conventions for exceptions. (#1492) -- Added Jaeger Environment variables: `OTEL_EXPORTER_JAEGER_AGENT_HOST`, `OTEL_EXPORTER_JAEGER_AGENT_PORT` - These environment variables can be used to override Jaeger agent hostname and port (#1752) -- Option `ExportTimeout` was added to batch span processor. (#1755) -- `trace.TraceFlags` is now a defined type over `byte` and `WithSampled(bool) TraceFlags` and `IsSampled() bool` methods have been added to it. (#1770) -- The `Event` and `Link` struct types from the `go.opentelemetry.io/otel` package now include a `DroppedAttributeCount` field to record the number of attributes that were not recorded due to configured limits being reached. (#1771) -- The Jaeger exporter now reports dropped attributes for a Span event in the exported log. (#1771) -- Adds test to check BatchSpanProcessor ignores `OnEnd` and `ForceFlush` post `Shutdown`. (#1772) -- Extract resource attributes from the `OTEL_RESOURCE_ATTRIBUTES` environment variable and merge them with the `resource.Default` resource as well as resources provided to the `TracerProvider` and metric `Controller`. (#1785) -- Added `WithOSType` resource configuration option to set OS (Operating System) type resource attribute (`os.type`). (#1788) -- Added `WithProcess*` resource configuration options to set Process resource attributes. (#1788) - - `process.pid` - - `process.executable.name` - - `process.executable.path` - - `process.command_args` - - `process.owner` - - `process.runtime.name` - - `process.runtime.version` - - `process.runtime.description` -- Adds `k8s.node.name` and `k8s.node.uid` attribute keys to the `semconv` package. (#1789) -- Added support for configuring OTLP/HTTP and OTLP/gRPC Endpoints, TLS Certificates, Headers, Compression and Timeout via Environment Variables. (#1758, #1769 and #1811) - - `OTEL_EXPORTER_OTLP_ENDPOINT` - - `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` - - `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` - - `OTEL_EXPORTER_OTLP_HEADERS` - - `OTEL_EXPORTER_OTLP_TRACES_HEADERS` - - `OTEL_EXPORTER_OTLP_METRICS_HEADERS` - - `OTEL_EXPORTER_OTLP_COMPRESSION` - - `OTEL_EXPORTER_OTLP_TRACES_COMPRESSION` - - `OTEL_EXPORTER_OTLP_METRICS_COMPRESSION` - - `OTEL_EXPORTER_OTLP_TIMEOUT` - - `OTEL_EXPORTER_OTLP_TRACES_TIMEOUT` - - `OTEL_EXPORTER_OTLP_METRICS_TIMEOUT` - - `OTEL_EXPORTER_OTLP_CERTIFICATE` - - `OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE` - - `OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE` -- Adds `otlpgrpc.WithTimeout` option for configuring timeout to the otlp/gRPC exporter. (#1821) -- Adds `jaeger.WithMaxPacketSize` option for configuring maximum UDP packet size used when connecting to the Jaeger agent. (#1853) - -### Fixed - -- The `Span.IsRecording` implementation from `go.opentelemetry.io/otel/sdk/trace` always returns false when not being sampled. (#1750) -- The Jaeger exporter now correctly sets tags for the Span status code and message. - This means it uses the correct tag keys (`"otel.status_code"`, `"otel.status_description"`) and does not set the status message as a tag unless it is set on the span. (#1761) -- The Jaeger exporter now correctly records Span event's names using the `"event"` key for a tag. - Additionally, this tag is overridden, as specified in the OTel specification, if the event contains an attribute with that key. (#1768) -- Zipkin Exporter: Ensure mapping between OTel and Zipkin span data complies with the specification. (#1688) -- Fixed typo for default service name in Jaeger Exporter. (#1797) -- Fix flaky OTLP for the reconnnection of the client connection. (#1527, #1814) -- Fix Jaeger exporter dropping of span batches that exceed the UDP packet size limit. - Instead, the exporter now splits the batch into smaller sendable batches. (#1828) - -### Changed - -- Span `RecordError` now records an `exception` event to comply with the semantic convention specification. (#1492) -- Jaeger exporter was updated to use thrift v0.14.1. (#1712) -- Migrate from using internally built and maintained version of the OTLP to the one hosted at `go.opentelemetry.io/proto/otlp`. (#1713) -- Migrate from using `github.com/gogo/protobuf` to `google.golang.org/protobuf` to match `go.opentelemetry.io/proto/otlp`. (#1713) -- The storage of a local or remote Span in a `context.Context` using its SpanContext is unified to store just the current Span. - The Span's SpanContext can now self-identify as being remote or not. - This means that `"go.opentelemetry.io/otel/trace".ContextWithRemoteSpanContext` will now overwrite any existing current Span, not just existing remote Spans, and make it the current Span in a `context.Context`. (#1731) -- Improve OTLP/gRPC exporter connection errors. (#1737) -- Information about a parent span context in a `"go.opentelemetry.io/otel/export/trace".SpanSnapshot` is unified in a new `Parent` field. - The existing `ParentSpanID` and `HasRemoteParent` fields are removed in favor of this. (#1748) -- The `ParentContext` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is updated to hold a `context.Context` containing the parent span. - This changes it to make `SamplingParameters` conform with the OpenTelemetry specification. (#1749) -- Updated Jaeger Environment Variables: `JAEGER_ENDPOINT`, `JAEGER_USER`, `JAEGER_PASSWORD` - to `OTEL_EXPORTER_JAEGER_ENDPOINT`, `OTEL_EXPORTER_JAEGER_USER`, `OTEL_EXPORTER_JAEGER_PASSWORD` in compliance with OTel specification. (#1752) -- Modify `BatchSpanProcessor.ForceFlush` to abort after timeout/cancellation. (#1757) -- The `DroppedAttributeCount` field of the `Span` in the `go.opentelemetry.io/otel` package now only represents the number of attributes dropped for the span itself. - It no longer is a conglomerate of itself, events, and link attributes that have been dropped. (#1771) -- Make `ExportSpans` in Jaeger Exporter honor context deadline. (#1773) -- Modify Zipkin Exporter default service name, use default resource's serviceName instead of empty. (#1777) -- The `go.opentelemetry.io/otel/sdk/export/trace` package is merged into the `go.opentelemetry.io/otel/sdk/trace` package. (#1778) -- The prometheus.InstallNewPipeline example is moved from comment to example test (#1796) -- The convenience functions for the stdout exporter have been updated to return the `TracerProvider` implementation and enable the shutdown of the exporter. (#1800) -- Replace the flush function returned from the Jaeger exporter's convenience creation functions (`InstallNewPipeline` and `NewExportPipeline`) with the `TracerProvider` implementation they create. - This enables the caller to shutdown and flush using the related `TracerProvider` methods. (#1822) -- Updated the Jaeger exporter to have a default endpoint, `http://localhost:14250`, for the collector. (#1824) -- Changed the function `WithCollectorEndpoint` in the Jaeger exporter to no longer accept an endpoint as an argument. - The endpoint can be passed with the `CollectorEndpointOption` using the `WithEndpoint` function or by setting the `OTEL_EXPORTER_JAEGER_ENDPOINT` environment variable value appropriately. (#1824) -- The Jaeger exporter no longer batches exported spans itself, instead it relies on the SDK's `BatchSpanProcessor` for this functionality. (#1830) -- The Jaeger exporter creation functions (`NewRawExporter`, `NewExportPipeline`, and `InstallNewPipeline`) no longer accept the removed `Option` type as a variadic argument. (#1830) - -### Removed - -- Removed Jaeger Environment variables: `JAEGER_SERVICE_NAME`, `JAEGER_DISABLED`, `JAEGER_TAGS` - These environment variables will no longer be used to override values of the Jaeger exporter (#1752) -- No longer set the links for a `Span` in `go.opentelemetry.io/otel/sdk/trace` that is configured to be a new root. - This is unspecified behavior that the OpenTelemetry community plans to standardize in the future. - To prevent backwards incompatible changes when it is specified, these links are removed. (#1726) -- Setting error status while recording error with Span from oteltest package. (#1729) -- The concept of a remote and local Span stored in a context is unified to just the current Span. - Because of this `"go.opentelemetry.io/otel/trace".RemoteSpanContextFromContext` is removed as it is no longer needed. - Instead, `"go.opentelemetry.io/otel/trace".SpanContextFromContext` can be used to return the current Span. - If needed, that Span's `SpanContext.IsRemote()` can then be used to determine if it is remote or not. (#1731) -- The `HasRemoteParent` field of the `"go.opentelemetry.io/otel/sdk/trace".SamplingParameters` is removed. - This field is redundant to the information returned from the `Remote` method of the `SpanContext` held in the `ParentContext` field. (#1749) -- The `trace.FlagsDebug` and `trace.FlagsDeferred` constants have been removed and will be localized to the B3 propagator. (#1770) -- Remove `Process` configuration, `WithProcessFromEnv` and `ProcessFromEnv`, and type from the Jaeger exporter package. - The information that could be configured in the `Process` struct should be configured in a `Resource` instead. (#1776, #1804) -- Remove the `WithDisabled` option from the Jaeger exporter. - To disable the exporter unregister it from the `TracerProvider` or use a no-operation `TracerProvider`. (#1806) -- Removed the functions `CollectorEndpointFromEnv` and `WithCollectorEndpointOptionFromEnv` from the Jaeger exporter. - These functions for retrieving specific environment variable values are redundant of other internal functions and - are not intended for end user use. (#1824) -- Removed the Jaeger exporter `WithSDKOptions` `Option`. - This option was used to set SDK options for the exporter creation convenience functions. - These functions are provided as a way to easily setup or install the exporter with what are deemed reasonable SDK settings for common use cases. - If the SDK needs to be configured differently, the `NewRawExporter` function and direct setup of the SDK with the desired settings should be used. (#1825) -- The `WithBufferMaxCount` and `WithBatchMaxCount` `Option`s from the Jaeger exporter are removed. - The exporter no longer batches exports, instead relying on the SDK's `BatchSpanProcessor` for this functionality. (#1830) -- The Jaeger exporter `Option` type is removed. - The type is no longer used by the exporter to configure anything. - All the previous configurations these options provided were duplicates of SDK configuration. - They have been removed in favor of using the SDK configuration and focuses the exporter configuration to be only about the endpoints it will send telemetry to. (#1830) - -## [0.19.0] - 2021-03-18 - -### Added - -- Added `Marshaler` config option to `otlphttp` to enable otlp over json or protobufs. (#1586) -- A `ForceFlush` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` to flush all registered `SpanProcessor`s. (#1608) -- Added `WithSampler` and `WithSpanLimits` to tracer provider. (#1633, #1702) -- `"go.opentelemetry.io/otel/trace".SpanContext` now has a `remote` property, and `IsRemote()` predicate, that is true when the `SpanContext` has been extracted from remote context data. (#1701) -- A `Valid` method to the `"go.opentelemetry.io/otel/attribute".KeyValue` type. (#1703) - -### Changed - -- `trace.SpanContext` is now immutable and has no exported fields. (#1573) - - `trace.NewSpanContext()` can be used in conjunction with the `trace.SpanContextConfig` struct to initialize a new `SpanContext` where all values are known. -- Update the `ForceFlush` method signature to the `"go.opentelemetry.io/otel/sdk/trace".SpanProcessor` to accept a `context.Context` and return an error. (#1608) -- Update the `Shutdown` method to the `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` return an error on shutdown failure. (#1608) -- The SimpleSpanProcessor will now shut down the enclosed `SpanExporter` and gracefully ignore subsequent calls to `OnEnd` after `Shutdown` is called. (#1612) -- `"go.opentelemetry.io/sdk/metric/controller.basic".WithPusher` is replaced with `WithExporter` to provide consistent naming across project. (#1656) -- Added non-empty string check for trace `Attribute` keys. (#1659) -- Add `description` to SpanStatus only when `StatusCode` is set to error. (#1662) -- Jaeger exporter falls back to `resource.Default`'s `service.name` if the exported Span does not have one. (#1673) -- Jaeger exporter populates Jaeger's Span Process from Resource. (#1673) -- Renamed the `LabelSet` method of `"go.opentelemetry.io/otel/sdk/resource".Resource` to `Set`. (#1692) -- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/jaeger` package. (#1693) -- Changed `WithSDK` to `WithSDKOptions` to accept variadic arguments of `TracerProviderOption` type in `go.opentelemetry.io/otel/exporters/trace/zipkin` package. (#1693) - -### Removed - -- Removed `serviceName` parameter from Zipkin exporter and uses resource instead. (#1549) -- Removed `WithConfig` from tracer provider to avoid overriding configuration. (#1633) -- Removed the exported `SimpleSpanProcessor` and `BatchSpanProcessor` structs. - These are now returned as a SpanProcessor interface from their respective constructors. (#1638) -- Removed `WithRecord()` from `trace.SpanOption` when creating a span. (#1660) -- Removed setting status to `Error` while recording an error as a span event in `RecordError`. (#1663) -- Removed `jaeger.WithProcess` configuration option. (#1673) -- Removed `ApplyConfig` method from `"go.opentelemetry.io/otel/sdk/trace".TracerProvider` and the now unneeded `Config` struct. (#1693) - -### Fixed - -- Jaeger Exporter: Ensure mapping between OTEL and Jaeger span data complies with the specification. (#1626) -- `SamplingResult.TraceState` is correctly propagated to a newly created span's `SpanContext`. (#1655) -- The `otel-collector` example now correctly flushes metric events prior to shutting down the exporter. (#1678) -- Do not set span status message in `SpanStatusFromHTTPStatusCode` if it can be inferred from `http.status_code`. (#1681) -- Synchronization issues in global trace delegate implementation. (#1686) -- Reduced excess memory usage by global `TracerProvider`. (#1687) - -## [0.18.0] - 2021-03-03 - -### Added - -- Added `resource.Default()` for use with meter and tracer providers. (#1507) -- `AttributePerEventCountLimit` and `AttributePerLinkCountLimit` for `SpanLimits`. (#1535) -- Added `Keys()` method to `propagation.TextMapCarrier` and `propagation.HeaderCarrier` to adapt `http.Header` to this interface. (#1544) -- Added `code` attributes to `go.opentelemetry.io/otel/semconv` package. (#1558) -- Compatibility testing suite in the CI system for the following systems. (#1567) - | OS | Go Version | Architecture | - | ------- | ---------- | ------------ | - | Ubuntu | 1.15 | amd64 | - | Ubuntu | 1.14 | amd64 | - | Ubuntu | 1.15 | 386 | - | Ubuntu | 1.14 | 386 | - | MacOS | 1.15 | amd64 | - | MacOS | 1.14 | amd64 | - | Windows | 1.15 | amd64 | - | Windows | 1.14 | amd64 | - | Windows | 1.15 | 386 | - | Windows | 1.14 | 386 | - -### Changed - -- Replaced interface `oteltest.SpanRecorder` with its existing implementation - `StandardSpanRecorder`. (#1542) -- Default span limit values to 128. (#1535) -- Rename `MaxEventsPerSpan`, `MaxAttributesPerSpan` and `MaxLinksPerSpan` to `EventCountLimit`, `AttributeCountLimit` and `LinkCountLimit`, and move these fields into `SpanLimits`. (#1535) -- Renamed the `otel/label` package to `otel/attribute`. (#1541) -- Vendor the Jaeger exporter's dependency on Apache Thrift. (#1551) -- Parallelize the CI linting and testing. (#1567) -- Stagger timestamps in exact aggregator tests. (#1569) -- Changed all examples to use `WithBatchTimeout(5 * time.Second)` rather than `WithBatchTimeout(5)`. (#1621) -- Prevent end-users from implementing some interfaces (#1575) - - ``` - "otel/exporters/otlp/otlphttp".Option - "otel/exporters/stdout".Option - "otel/oteltest".Option - "otel/trace".TracerOption - "otel/trace".SpanOption - "otel/trace".EventOption - "otel/trace".LifeCycleOption - "otel/trace".InstrumentationOption - "otel/sdk/resource".Option - "otel/sdk/trace".ParentBasedSamplerOption - "otel/sdk/trace".ReadOnlySpan - "otel/sdk/trace".ReadWriteSpan - ``` - -### Removed - -- Removed attempt to resample spans upon changing the span name with `span.SetName()`. (#1545) -- The `test-benchmark` is no longer a dependency of the `precommit` make target. (#1567) -- Removed the `test-386` make target. - This was replaced with a full compatibility testing suite (i.e. multi OS/arch) in the CI system. (#1567) - -### Fixed - -- The sequential timing check of timestamps in the stdout exporter are now setup explicitly to be sequential (#1571). (#1572) -- Windows build of Jaeger tests now compiles with OS specific functions (#1576). (#1577) -- The sequential timing check of timestamps of go.opentelemetry.io/otel/sdk/metric/aggregator/lastvalue are now setup explicitly to be sequential (#1578). (#1579) -- Validate tracestate header keys with vendors according to the W3C TraceContext specification (#1475). (#1581) -- The OTLP exporter includes related labels for translations of a GaugeArray (#1563). (#1570) - -## [0.17.0] - 2021-02-12 - -### Changed - -- Rename project default branch from `master` to `main`. (#1505) -- Reverse order in which `Resource` attributes are merged, per change in spec. (#1501) -- Add tooling to maintain "replace" directives in go.mod files automatically. (#1528) -- Create new modules: otel/metric, otel/trace, otel/oteltest, otel/sdk/export/metric, otel/sdk/metric (#1528) -- Move metric-related public global APIs from otel to otel/metric/global. (#1528) - -## Fixed - -- Fixed otlpgrpc reconnection issue. -- The example code in the README.md of `go.opentelemetry.io/otel/exporters/otlp` is moved to a compiled example test and used the new `WithAddress` instead of `WithEndpoint`. (#1513) -- The otel-collector example now uses the default OTLP receiver port of the collector. - -## [0.16.0] - 2021-01-13 - -### Added - -- Add the `ReadOnlySpan` and `ReadWriteSpan` interfaces to provide better control for accessing span data. (#1360) -- `NewGRPCDriver` function returns a `ProtocolDriver` that maintains a single gRPC connection to the collector. (#1369) -- Added documentation about the project's versioning policy. (#1388) -- Added `NewSplitDriver` for OTLP exporter that allows sending traces and metrics to different endpoints. (#1418) -- Added codeql workflow to GitHub Actions (#1428) -- Added Gosec workflow to GitHub Actions (#1429) -- Add new HTTP driver for OTLP exporter in `exporters/otlp/otlphttp`. Currently it only supports the binary protobuf payloads. (#1420) -- Add an OpenCensus exporter bridge. (#1444) - -### Changed - -- Rename `internal/testing` to `internal/internaltest`. (#1449) -- Rename `export.SpanData` to `export.SpanSnapshot` and use it only for exporting spans. (#1360) -- Store the parent's full `SpanContext` rather than just its span ID in the `span` struct. (#1360) -- Improve span duration accuracy. (#1360) -- Migrated CI/CD from CircleCI to GitHub Actions (#1382) -- Remove duplicate checkout from GitHub Actions workflow (#1407) -- Metric `array` aggregator renamed `exact` to match its `aggregation.Kind` (#1412) -- Metric `exact` aggregator includes per-point timestamps (#1412) -- Metric stdout exporter uses MinMaxSumCount aggregator for ValueRecorder instruments (#1412) -- `NewExporter` from `exporters/otlp` now takes a `ProtocolDriver` as a parameter. (#1369) -- Many OTLP Exporter options became gRPC ProtocolDriver options. (#1369) -- Unify endpoint API that related to OTel exporter. (#1401) -- Optimize metric histogram aggregator to reuse its slice of buckets. (#1435) -- Metric aggregator Count() and histogram Bucket.Counts are consistently `uint64`. (1430) -- Histogram aggregator accepts functional options, uses default boundaries if none given. (#1434) -- `SamplingResult` now passed a `Tracestate` from the parent `SpanContext` (#1432) -- Moved gRPC driver for OTLP exporter to `exporters/otlp/otlpgrpc`. (#1420) -- The `TraceContext` propagator now correctly propagates `TraceState` through the `SpanContext`. (#1447) -- Metric Push and Pull Controller components are combined into a single "basic" Controller: - - `WithExporter()` and `Start()` to configure Push behavior - - `Start()` is optional; use `Collect()` and `ForEach()` for Pull behavior - - `Start()` and `Stop()` accept Context. (#1378) -- The `Event` type is moved from the `otel/sdk/export/trace` package to the `otel/trace` API package. (#1452) - -### Removed - -- Remove `errUninitializedSpan` as its only usage is now obsolete. (#1360) -- Remove Metric export functionality related to quantiles and summary data points: this is not specified (#1412) -- Remove DDSketch metric aggregator; our intention is to re-introduce this as an option of the histogram aggregator after [new OTLP histogram data types](https://github.com/open-telemetry/opentelemetry-proto/pull/226) are released (#1412) - -### Fixed - -- `BatchSpanProcessor.Shutdown()` will now shutdown underlying `export.SpanExporter`. (#1443) - -## [0.15.0] - 2020-12-10 - -### Added - -- The `WithIDGenerator` `TracerProviderOption` is added to the `go.opentelemetry.io/otel/trace` package to configure an `IDGenerator` for the `TracerProvider`. (#1363) - -### Changed - -- The Zipkin exporter now uses the Span status code to determine. (#1328) -- `NewExporter` and `Start` functions in `go.opentelemetry.io/otel/exporters/otlp` now receive `context.Context` as a first parameter. (#1357) -- Move the OpenCensus example into `example` directory. (#1359) -- Moved the SDK's `internal.IDGenerator` interface in to the `sdk/trace` package to enable support for externally-defined ID generators. (#1363) -- Bump `github.com/google/go-cmp` from 0.5.3 to 0.5.4 (#1374) -- Bump `github.com/golangci/golangci-lint` in `/internal/tools` (#1375) - -### Fixed - -- Metric SDK `SumObserver` and `UpDownSumObserver` instruments correctness fixes. (#1381) - -## [0.14.0] - 2020-11-19 - -### Added - -- An `EventOption` and the related `NewEventConfig` function are added to the `go.opentelemetry.io/otel` package to configure Span events. (#1254) -- A `TextMapPropagator` and associated `TextMapCarrier` are added to the `go.opentelemetry.io/otel/oteltest` package to test `TextMap` type propagators and their use. (#1259) -- `SpanContextFromContext` returns `SpanContext` from context. (#1255) -- `TraceState` has been added to `SpanContext`. (#1340) -- `DeploymentEnvironmentKey` added to `go.opentelemetry.io/otel/semconv` package. (#1323) -- Add an OpenCensus to OpenTelemetry tracing bridge. (#1305) -- Add a parent context argument to `SpanProcessor.OnStart` to follow the specification. (#1333) -- Add missing tests for `sdk/trace/attributes_map.go`. (#1337) - -### Changed - -- Move the `go.opentelemetry.io/otel/api/trace` package into `go.opentelemetry.io/otel/trace` with the following changes. (#1229) (#1307) - - `ID` has been renamed to `TraceID`. - - `IDFromHex` has been renamed to `TraceIDFromHex`. - - `EmptySpanContext` is removed. -- Move the `go.opentelemetry.io/otel/api/trace/tracetest` package into `go.opentelemetry.io/otel/oteltest`. (#1229) -- OTLP Exporter updates: - - supports OTLP v0.6.0 (#1230, #1354) - - supports configurable aggregation temporality (default: Cumulative, optional: Stateless). (#1296) -- The Sampler is now called on local child spans. (#1233) -- The `Kind` type from the `go.opentelemetry.io/otel/api/metric` package was renamed to `InstrumentKind` to more specifically describe what it is and avoid semantic ambiguity. (#1240) -- The `MetricKind` method of the `Descriptor` type in the `go.opentelemetry.io/otel/api/metric` package was renamed to `Descriptor.InstrumentKind`. - This matches the returned type and fixes misuse of the term metric. (#1240) -- Move test harness from the `go.opentelemetry.io/otel/api/apitest` package into `go.opentelemetry.io/otel/oteltest`. (#1241) -- Move the `go.opentelemetry.io/otel/api/metric/metrictest` package into `go.opentelemetry.io/oteltest` as part of #964. (#1252) -- Move the `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric` as part of #1303. (#1321) -- Move the `go.opentelemetry.io/otel/api/metric/registry` package into `go.opentelemetry.io/otel/metric/registry` as a part of #1303. (#1316) -- Move the `Number` type (together with related functions) from `go.opentelemetry.io/otel/api/metric` package into `go.opentelemetry.io/otel/metric/number` as a part of #1303. (#1316) -- The function signature of the Span `AddEvent` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required name and a variable number of `EventOption`s. (#1254) -- The function signature of the Span `RecordError` method in `go.opentelemetry.io/otel` is updated to no longer take an unused context and instead take a required error value and a variable number of `EventOption`s. (#1254) -- Move the `go.opentelemetry.io/otel/api/global` package to `go.opentelemetry.io/otel`. (#1262) (#1330) -- Move the `Version` function from `go.opentelemetry.io/otel/sdk` to `go.opentelemetry.io/otel`. (#1330) -- Rename correlation context header from `"otcorrelations"` to `"baggage"` to match the OpenTelemetry specification. (#1267) -- Fix `Code.UnmarshalJSON` to work with valid JSON only. (#1276) -- The `resource.New()` method changes signature to support builtin attributes and functional options, including `telemetry.sdk.*` and - `host.name` semantic conventions; the former method is renamed `resource.NewWithAttributes`. (#1235) -- The Prometheus exporter now exports non-monotonic counters (i.e. `UpDownCounter`s) as gauges. (#1210) -- Correct the `Span.End` method documentation in the `otel` API to state updates are not allowed on a span after it has ended. (#1310) -- Updated span collection limits for attribute, event and link counts to 1000 (#1318) -- Renamed `semconv.HTTPUrlKey` to `semconv.HTTPURLKey`. (#1338) - -### Removed - -- The `ErrInvalidHexID`, `ErrInvalidTraceIDLength`, `ErrInvalidSpanIDLength`, `ErrInvalidSpanIDLength`, or `ErrNilSpanID` from the `go.opentelemetry.io/otel` package are unexported now. (#1243) -- The `AddEventWithTimestamp` method on the `Span` interface in `go.opentelemetry.io/otel` is removed due to its redundancy. - It is replaced by using the `AddEvent` method with a `WithTimestamp` option. (#1254) -- The `MockSpan` and `MockTracer` types are removed from `go.opentelemetry.io/otel/oteltest`. - `Tracer` and `Span` from the same module should be used in their place instead. (#1306) -- `WorkerCount` option is removed from `go.opentelemetry.io/otel/exporters/otlp`. (#1350) -- Remove the following labels types: INT32, UINT32, UINT64 and FLOAT32. (#1314) - -### Fixed - -- Rename `MergeItererator` to `MergeIterator` in the `go.opentelemetry.io/otel/label` package. (#1244) -- The `go.opentelemetry.io/otel/api/global` packages global TextMapPropagator now delegates functionality to a globally set delegate for all previously returned propagators. (#1258) -- Fix condition in `label.Any`. (#1299) -- Fix global `TracerProvider` to pass options to its configured provider. (#1329) -- Fix missing handler for `ExactKind` aggregator in OTLP metrics transformer (#1309) - -## [0.13.0] - 2020-10-08 - -### Added - -- OTLP Metric exporter supports Histogram aggregation. (#1209) -- The `Code` struct from the `go.opentelemetry.io/otel/codes` package now supports JSON marshaling and unmarshaling as well as implements the `Stringer` interface. (#1214) -- A Baggage API to implement the OpenTelemetry specification. (#1217) -- Add Shutdown method to sdk/trace/provider, shutdown processors in the order they were registered. (#1227) - -### Changed - -- Set default propagator to no-op propagator. (#1184) -- The `HTTPSupplier`, `HTTPExtractor`, `HTTPInjector`, and `HTTPPropagator` from the `go.opentelemetry.io/otel/api/propagation` package were replaced with unified `TextMapCarrier` and `TextMapPropagator` in the `go.opentelemetry.io/otel/propagation` package. (#1212) (#1325) -- The `New` function from the `go.opentelemetry.io/otel/api/propagation` package was replaced with `NewCompositeTextMapPropagator` in the `go.opentelemetry.io/otel` package. (#1212) -- The status codes of the `go.opentelemetry.io/otel/codes` package have been updated to match the latest OpenTelemetry specification. - They now are `Unset`, `Error`, and `Ok`. - They no longer track the gRPC codes. (#1214) -- The `StatusCode` field of the `SpanData` struct in the `go.opentelemetry.io/otel/sdk/export/trace` package now uses the codes package from this package instead of the gRPC project. (#1214) -- Move the `go.opentelemetry.io/otel/api/baggage` package into `go.opentelemetry.io/otel/baggage`. (#1217) (#1325) -- A `Shutdown` method of `SpanProcessor` and all its implementations receives a context and returns an error. (#1264) - -### Fixed - -- Copies of data from arrays and slices passed to `go.opentelemetry.io/otel/label.ArrayValue()` are now used in the returned `Value` instead of using the mutable data itself. (#1226) - -### Removed - -- The `ExtractHTTP` and `InjectHTTP` functions from the `go.opentelemetry.io/otel/api/propagation` package were removed. (#1212) -- The `Propagators` interface from the `go.opentelemetry.io/otel/api/propagation` package was removed to conform to the OpenTelemetry specification. - The explicit `TextMapPropagator` type can be used in its place as this is the `Propagator` type the specification defines. (#1212) -- The `SetAttribute` method of the `Span` from the `go.opentelemetry.io/otel/api/trace` package was removed given its redundancy with the `SetAttributes` method. (#1216) -- The internal implementation of Baggage storage is removed in favor of using the new Baggage API functionality. (#1217) -- Remove duplicate hostname key `HostHostNameKey` in Resource semantic conventions. (#1219) -- Nested array/slice support has been removed. (#1226) - -## [0.12.0] - 2020-09-24 - -### Added - -- A `SpanConfigure` function in `go.opentelemetry.io/otel/api/trace` to create a new `SpanConfig` from `SpanOption`s. (#1108) -- In the `go.opentelemetry.io/otel/api/trace` package, `NewTracerConfig` was added to construct new `TracerConfig`s. - This addition was made to conform with our project option conventions. (#1155) -- Instrumentation library information was added to the Zipkin exporter. (#1119) -- The `SpanProcessor` interface now has a `ForceFlush()` method. (#1166) -- More semantic conventions for k8s as resource attributes. (#1167) - -### Changed - -- Add reconnecting udp connection type to Jaeger exporter. - This change adds a new optional implementation of the udp conn interface used to detect changes to an agent's host dns record. - It then adopts the new destination address to ensure the exporter doesn't get stuck. This change was ported from jaegertracing/jaeger-client-go#520. (#1063) -- Replace `StartOption` and `EndOption` in `go.opentelemetry.io/otel/api/trace` with `SpanOption`. - This change is matched by replacing the `StartConfig` and `EndConfig` with a unified `SpanConfig`. (#1108) -- Replace the `LinkedTo` span option in `go.opentelemetry.io/otel/api/trace` with `WithLinks`. - This is be more consistent with our other option patterns, i.e. passing the item to be configured directly instead of its component parts, and provides a cleaner function signature. (#1108) -- The `go.opentelemetry.io/otel/api/trace` `TracerOption` was changed to an interface to conform to project option conventions. (#1109) -- Move the `B3` and `TraceContext` from within the `go.opentelemetry.io/otel/api/trace` package to their own `go.opentelemetry.io/otel/propagators` package. - This removal of the propagators is reflective of the OpenTelemetry specification for these propagators as well as cleans up the `go.opentelemetry.io/otel/api/trace` API. (#1118) -- Rename Jaeger tags used for instrumentation library information to reflect changes in OpenTelemetry specification. (#1119) -- Rename `ProbabilitySampler` to `TraceIDRatioBased` and change semantics to ignore parent span sampling status. (#1115) -- Move `tools` package under `internal`. (#1141) -- Move `go.opentelemetry.io/otel/api/correlation` package to `go.opentelemetry.io/otel/api/baggage`. (#1142) - The `correlation.CorrelationContext` propagator has been renamed `baggage.Baggage`. Other exported functions and types are unchanged. -- Rename `ParentOrElse` sampler to `ParentBased` and allow setting samplers depending on parent span. (#1153) -- In the `go.opentelemetry.io/otel/api/trace` package, `SpanConfigure` was renamed to `NewSpanConfig`. (#1155) -- Change `dependabot.yml` to add a `Skip Changelog` label to dependabot-sourced PRs. (#1161) -- The [configuration style guide](https://github.com/open-telemetry/opentelemetry-go/blob/master/CONTRIBUTING.md#config) has been updated to - recommend the use of `newConfig()` instead of `configure()`. (#1163) -- The `otlp.Config` type has been unexported and changed to `otlp.config`, along with its initializer. (#1163) -- Ensure exported interface types include parameter names and update the - Style Guide to reflect this styling rule. (#1172) -- Don't consider unset environment variable for resource detection to be an error. (#1170) -- Rename `go.opentelemetry.io/otel/api/metric.ConfigureInstrument` to `NewInstrumentConfig` and - `go.opentelemetry.io/otel/api/metric.ConfigureMeter` to `NewMeterConfig`. -- ValueObserver instruments use LastValue aggregator by default. (#1165) -- OTLP Metric exporter supports LastValue aggregation. (#1165) -- Move the `go.opentelemetry.io/otel/api/unit` package to `go.opentelemetry.io/otel/unit`. (#1185) -- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) -- Rename `NoopProvider` to `NoopMeterProvider` in the `go.opentelemetry.io/otel/api/metric` package. (#1190) -- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metric/metrictest` package. (#1190) -- Rename `Provider` to `MeterProvider` in the `go.opentelemetry.io/otel/api/metric/registry` package. (#1190) -- Rename `NewProvider` to `NewMeterProvider` in the `go.opentelemetry.io/otel/api/metri/registryc` package. (#1190) -- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) -- Rename `NoopProvider` to `NoopTracerProvider` in the `go.opentelemetry.io/otel/api/trace` package. (#1190) -- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) -- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/api/trace/tracetest` package. (#1190) -- Rename `WrapperProvider` to `WrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) -- Rename `NewWrapperProvider` to `NewWrapperTracerProvider` in the `go.opentelemetry.io/otel/bridge/opentracing` package. (#1190) -- Rename `Provider` method of the pull controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/pull` package. (#1190) -- Rename `Provider` method of the push controller to `MeterProvider` in the `go.opentelemetry.io/otel/sdk/metric/controller/push` package. (#1190) -- Rename `ProviderOptions` to `TracerProviderConfig` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) -- Rename `ProviderOption` to `TracerProviderOption` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) -- Rename `Provider` to `TracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) -- Rename `NewProvider` to `NewTracerProvider` in the `go.opentelemetry.io/otel/sdk/trace` package. (#1190) -- Renamed `SamplingDecision` values to comply with OpenTelemetry specification change. (#1192) -- Renamed Zipkin attribute names from `ot.status_code & ot.status_description` to `otel.status_code & otel.status_description`. (#1201) -- The default SDK now invokes registered `SpanProcessor`s in the order they were registered with the `TracerProvider`. (#1195) -- Add test of spans being processed by the `SpanProcessor`s in the order they were registered. (#1203) - -### Removed - -- Remove the B3 propagator from `go.opentelemetry.io/otel/propagators`. It is now located in the - `go.opentelemetry.io/contrib/propagators/` module. (#1191) -- Remove the semantic convention for HTTP status text, `HTTPStatusTextKey` from package `go.opentelemetry.io/otel/semconv`. (#1194) - -### Fixed - -- Zipkin example no longer mentions `ParentSampler`, corrected to `ParentBased`. (#1171) -- Fix missing shutdown processor in otel-collector example. (#1186) -- Fix missing shutdown processor in basic and namedtracer examples. (#1197) - -## [0.11.0] - 2020-08-24 - -### Added - -- Support for exporting array-valued attributes via OTLP. (#992) -- `Noop` and `InMemory` `SpanBatcher` implementations to help with testing integrations. (#994) -- Support for filtering metric label sets. (#1047) -- A dimensionality-reducing metric Processor. (#1057) -- Integration tests for more OTel Collector Attribute types. (#1062) -- A new `WithSpanProcessor` `ProviderOption` is added to the `go.opentelemetry.io/otel/sdk/trace` package to create a `Provider` and automatically register the `SpanProcessor`. (#1078) - -### Changed - -- Rename `sdk/metric/processor/test` to `sdk/metric/processor/processortest`. (#1049) -- Rename `sdk/metric/controller/test` to `sdk/metric/controller/controllertest`. (#1049) -- Rename `api/testharness` to `api/apitest`. (#1049) -- Rename `api/trace/testtrace` to `api/trace/tracetest`. (#1049) -- Change Metric Processor to merge multiple observations. (#1024) -- The `go.opentelemetry.io/otel/bridge/opentracing` bridge package has been made into its own module. - This removes the package dependencies of this bridge from the rest of the OpenTelemetry based project. (#1038) -- Renamed `go.opentelemetry.io/otel/api/standard` package to `go.opentelemetry.io/otel/semconv` to avoid the ambiguous and generic name `standard` and better describe the package as containing OpenTelemetry semantic conventions. (#1016) -- The environment variable used for resource detection has been changed from `OTEL_RESOURCE_LABELS` to `OTEL_RESOURCE_ATTRIBUTES` (#1042) -- Replace `WithSyncer` with `WithBatcher` in examples. (#1044) -- Replace the `google.golang.org/grpc/codes` dependency in the API with an equivalent `go.opentelemetry.io/otel/codes` package. (#1046) -- Merge the `go.opentelemetry.io/otel/api/label` and `go.opentelemetry.io/otel/api/kv` into the new `go.opentelemetry.io/otel/label` package. (#1060) -- Unify Callback Function Naming. - Rename `*Callback` with `*Func`. (#1061) -- CI builds validate against last two versions of Go, dropping 1.13 and adding 1.15. (#1064) -- The `go.opentelemetry.io/otel/sdk/export/trace` interfaces `SpanSyncer` and `SpanBatcher` have been replaced with a specification compliant `Exporter` interface. - This interface still supports the export of `SpanData`, but only as a slice. - Implementation are also required now to return any error from `ExportSpans` if one occurs as well as implement a `Shutdown` method for exporter clean-up. (#1078) -- The `go.opentelemetry.io/otel/sdk/trace` `NewBatchSpanProcessor` function no longer returns an error. - If a `nil` exporter is passed as an argument to this function, instead of it returning an error, it now returns a `BatchSpanProcessor` that handles the export of `SpanData` by not taking any action. (#1078) -- The `go.opentelemetry.io/otel/sdk/trace` `NewProvider` function to create a `Provider` no longer returns an error, instead only a `*Provider`. - This change is related to `NewBatchSpanProcessor` not returning an error which was the only error this function would return. (#1078) - -### Removed - -- Duplicate, unused API sampler interface. (#999) - Use the [`Sampler` interface](https://github.com/open-telemetry/opentelemetry-go/blob/v0.11.0/sdk/trace/sampling.go) provided by the SDK instead. -- The `grpctrace` instrumentation was moved to the `go.opentelemetry.io/contrib` repository and out of this repository. - This move includes moving the `grpc` example to the `go.opentelemetry.io/contrib` as well. (#1027) -- The `WithSpan` method of the `Tracer` interface. - The functionality this method provided was limited compared to what a user can provide themselves. - It was removed with the understanding that if there is sufficient user need it can be added back based on actual user usage. (#1043) -- The `RegisterSpanProcessor` and `UnregisterSpanProcessor` functions. - These were holdovers from an approach prior to the TracerProvider design. They were not used anymore. (#1077) -- The `oterror` package. (#1026) -- The `othttp` and `httptrace` instrumentations were moved to `go.opentelemetry.io/contrib`. (#1032) - -### Fixed - -- The `semconv.HTTPServerMetricAttributesFromHTTPRequest()` function no longer generates the high-cardinality `http.request.content.length` label. (#1031) -- Correct instrumentation version tag in Jaeger exporter. (#1037) -- The SDK span will now set an error event if the `End` method is called during a panic (i.e. it was deferred). (#1043) -- Move internally generated protobuf code from the `go.opentelemetry.io/otel` to the OTLP exporter to reduce dependency overhead. (#1050) -- The `otel-collector` example referenced outdated collector processors. (#1006) - -## [0.10.0] - 2020-07-29 - -This release migrates the default OpenTelemetry SDK into its own Go module, decoupling the SDK from the API and reducing dependencies for instrumentation packages. - -### Added - -- The Zipkin exporter now has `NewExportPipeline` and `InstallNewPipeline` constructor functions to match the common pattern. - These function build a new exporter with default SDK options and register the exporter with the `global` package respectively. (#944) -- Add propagator option for gRPC instrumentation. (#986) -- The `testtrace` package now tracks the `trace.SpanKind` for each span. (#987) - -### Changed - -- Replace the `RegisterGlobal` `Option` in the Jaeger exporter with an `InstallNewPipeline` constructor function. - This matches the other exporter constructor patterns and will register a new exporter after building it with default configuration. (#944) -- The trace (`go.opentelemetry.io/otel/exporters/trace/stdout`) and metric (`go.opentelemetry.io/otel/exporters/metric/stdout`) `stdout` exporters are now merged into a single exporter at `go.opentelemetry.io/otel/exporters/stdout`. - This new exporter was made into its own Go module to follow the pattern of all exporters and decouple it from the `go.opentelemetry.io/otel` module. (#956, #963) -- Move the `go.opentelemetry.io/otel/exporters/test` test package to `go.opentelemetry.io/otel/sdk/export/metric/metrictest`. (#962) -- The `go.opentelemetry.io/otel/api/kv/value` package was merged into the parent `go.opentelemetry.io/otel/api/kv` package. (#968) - - `value.Bool` was replaced with `kv.BoolValue`. - - `value.Int64` was replaced with `kv.Int64Value`. - - `value.Uint64` was replaced with `kv.Uint64Value`. - - `value.Float64` was replaced with `kv.Float64Value`. - - `value.Int32` was replaced with `kv.Int32Value`. - - `value.Uint32` was replaced with `kv.Uint32Value`. - - `value.Float32` was replaced with `kv.Float32Value`. - - `value.String` was replaced with `kv.StringValue`. - - `value.Int` was replaced with `kv.IntValue`. - - `value.Uint` was replaced with `kv.UintValue`. - - `value.Array` was replaced with `kv.ArrayValue`. -- Rename `Infer` to `Any` in the `go.opentelemetry.io/otel/api/kv` package. (#972) -- Change `othttp` to use the `httpsnoop` package to wrap the `ResponseWriter` so that optional interfaces (`http.Hijacker`, `http.Flusher`, etc.) that are implemented by the original `ResponseWriter`are also implemented by the wrapped `ResponseWriter`. (#979) -- Rename `go.opentelemetry.io/otel/sdk/metric/aggregator/test` package to `go.opentelemetry.io/otel/sdk/metric/aggregator/aggregatortest`. (#980) -- Make the SDK into its own Go module called `go.opentelemetry.io/otel/sdk`. (#985) -- Changed the default trace `Sampler` from `AlwaysOn` to `ParentOrElse(AlwaysOn)`. (#989) - -### Removed - -- The `IndexedAttribute` function from the `go.opentelemetry.io/otel/api/label` package was removed in favor of `IndexedLabel` which it was synonymous with. (#970) - -### Fixed - -- Bump github.com/golangci/golangci-lint from 1.28.3 to 1.29.0 in /tools. (#953) -- Bump github.com/google/go-cmp from 0.5.0 to 0.5.1. (#957) -- Use `global.Handle` for span export errors in the OTLP exporter. (#946) -- Correct Go language formatting in the README documentation. (#961) -- Remove default SDK dependencies from the `go.opentelemetry.io/otel/api` package. (#977) -- Remove default SDK dependencies from the `go.opentelemetry.io/otel/instrumentation` package. (#983) -- Move documented examples for `go.opentelemetry.io/otel/instrumentation/grpctrace` interceptors into Go example tests. (#984) - -## [0.9.0] - 2020-07-20 - -### Added - -- A new Resource Detector interface is included to allow resources to be automatically detected and included. (#939) -- A Detector to automatically detect resources from an environment variable. (#939) -- Github action to generate protobuf Go bindings locally in `internal/opentelemetry-proto-gen`. (#938) -- OTLP .proto files from `open-telemetry/opentelemetry-proto` imported as a git submodule under `internal/opentelemetry-proto`. - References to `github.com/open-telemetry/opentelemetry-proto` changed to `go.opentelemetry.io/otel/internal/opentelemetry-proto-gen`. (#942) - -### Changed - -- Non-nil value `struct`s for key-value pairs will be marshalled using JSON rather than `Sprintf`. (#948) - -### Removed - -- Removed dependency on `github.com/open-telemetry/opentelemetry-collector`. (#943) - -## [0.8.0] - 2020-07-09 - -### Added - -- The `B3Encoding` type to represent the B3 encoding(s) the B3 propagator can inject. - A value for HTTP supported encodings (Multiple Header: `MultipleHeader`, Single Header: `SingleHeader`) are included. (#882) -- The `FlagsDeferred` trace flag to indicate if the trace sampling decision has been deferred. (#882) -- The `FlagsDebug` trace flag to indicate if the trace is a debug trace. (#882) -- Add `peer.service` semantic attribute. (#898) -- Add database-specific semantic attributes. (#899) -- Add semantic convention for `faas.coldstart` and `container.id`. (#909) -- Add http content size semantic conventions. (#905) -- Include `http.request_content_length` in HTTP request basic attributes. (#905) -- Add semantic conventions for operating system process resource attribute keys. (#919) -- The Jaeger exporter now has a `WithBatchMaxCount` option to specify the maximum number of spans sent in a batch. (#931) - -### Changed - -- Update `CONTRIBUTING.md` to ask for updates to `CHANGELOG.md` with each pull request. (#879) -- Use lowercase header names for B3 Multiple Headers. (#881) -- The B3 propagator `SingleHeader` field has been replaced with `InjectEncoding`. - This new field can be set to combinations of the `B3Encoding` bitmasks and will inject trace information in these encodings. - If no encoding is set, the propagator will default to `MultipleHeader` encoding. (#882) -- The B3 propagator now extracts from either HTTP encoding of B3 (Single Header or Multiple Header) based on what is contained in the header. - Preference is given to Single Header encoding with Multiple Header being the fallback if Single Header is not found or is invalid. - This behavior change is made to dynamically support all correctly encoded traces received instead of having to guess the expected encoding prior to receiving. (#882) -- Extend semantic conventions for RPC. (#900) -- To match constant naming conventions in the `api/standard` package, the `FaaS*` key names are appended with a suffix of `Key`. (#920) - - `"api/standard".FaaSName` -> `FaaSNameKey` - - `"api/standard".FaaSID` -> `FaaSIDKey` - - `"api/standard".FaaSVersion` -> `FaaSVersionKey` - - `"api/standard".FaaSInstance` -> `FaaSInstanceKey` - -### Removed - -- The `FlagsUnused` trace flag is removed. - The purpose of this flag was to act as the inverse of `FlagsSampled`, the inverse of `FlagsSampled` is used instead. (#882) -- The B3 header constants (`B3SingleHeader`, `B3DebugFlagHeader`, `B3TraceIDHeader`, `B3SpanIDHeader`, `B3SampledHeader`, `B3ParentSpanIDHeader`) are removed. - If B3 header keys are needed [the authoritative OpenZipkin package constants](https://pkg.go.dev/github.com/openzipkin/zipkin-go@v0.2.2/propagation/b3?tab=doc#pkg-constants) should be used instead. (#882) - -### Fixed - -- The B3 Single Header name is now correctly `b3` instead of the previous `X-B3`. (#881) -- The B3 propagator now correctly supports sampling only values (`b3: 0`, `b3: 1`, or `b3: d`) for a Single B3 Header. (#882) -- The B3 propagator now propagates the debug flag. - This removes the behavior of changing the debug flag into a set sampling bit. - Instead, this now follow the B3 specification and omits the `X-B3-Sampling` header. (#882) -- The B3 propagator now tracks "unset" sampling state (meaning "defer the decision") and does not set the `X-B3-Sampling` header when injecting. (#882) -- Bump github.com/itchyny/gojq from 0.10.3 to 0.10.4 in /tools. (#883) -- Bump github.com/opentracing/opentracing-go from v1.1.1-0.20190913142402-a7454ce5950e to v1.2.0. (#885) -- The tracing time conversion for OTLP spans is now correctly set to `UnixNano`. (#896) -- Ensure span status is not set to `Unknown` when no HTTP status code is provided as it is assumed to be `200 OK`. (#908) -- Ensure `httptrace.clientTracer` closes `http.headers` span. (#912) -- Prometheus exporter will not apply stale updates or forget inactive metrics. (#903) -- Add test for api.standard `HTTPClientAttributesFromHTTPRequest`. (#905) -- Bump github.com/golangci/golangci-lint from 1.27.0 to 1.28.1 in /tools. (#901, #913) -- Update otel-collector example to use the v0.5.0 collector. (#915) -- The `grpctrace` instrumentation uses a span name conforming to the OpenTelemetry semantic conventions (does not contain a leading slash (`/`)). (#922) -- The `grpctrace` instrumentation includes an `rpc.method` attribute now set to the gRPC method name. (#900, #922) -- The `grpctrace` instrumentation `rpc.service` attribute now contains the package name if one exists. - This is in accordance with OpenTelemetry semantic conventions. (#922) -- Correlation Context extractor will no longer insert an empty map into the returned context when no valid values are extracted. (#923) -- Bump google.golang.org/api from 0.28.0 to 0.29.0 in /exporters/trace/jaeger. (#925) -- Bump github.com/itchyny/gojq from 0.10.4 to 0.11.0 in /tools. (#926) -- Bump github.com/golangci/golangci-lint from 1.28.1 to 1.28.2 in /tools. (#930) - -## [0.7.0] - 2020-06-26 - -This release implements the v0.5.0 version of the OpenTelemetry specification. - -### Added - -- The othttp instrumentation now includes default metrics. (#861) -- This CHANGELOG file to track all changes in the project going forward. -- Support for array type attributes. (#798) -- Apply transitive dependabot go.mod dependency updates as part of a new automatic Github workflow. (#844) -- Timestamps are now passed to exporters for each export. (#835) -- Add new `Accumulation` type to metric SDK to transport telemetry from `Accumulator`s to `Processor`s. - This replaces the prior `Record` `struct` use for this purpose. (#835) -- New dependabot integration to automate package upgrades. (#814) -- `Meter` and `Tracer` implementations accept instrumentation version version as an optional argument. - This instrumentation version is passed on to exporters. (#811) (#805) (#802) -- The OTLP exporter includes the instrumentation version in telemetry it exports. (#811) -- Environment variables for Jaeger exporter are supported. (#796) -- New `aggregation.Kind` in the export metric API. (#808) -- New example that uses OTLP and the collector. (#790) -- Handle errors in the span `SetName` during span initialization. (#791) -- Default service config to enable retries for retry-able failed requests in the OTLP exporter and an option to override this default. (#777) -- New `go.opentelemetry.io/otel/api/oterror` package to uniformly support error handling and definitions for the project. (#778) -- New `global` default implementation of the `go.opentelemetry.io/otel/api/oterror.Handler` interface to be used to handle errors prior to an user defined `Handler`. - There is also functionality for the user to register their `Handler` as well as a convenience function `Handle` to handle an error with this global `Handler`(#778) -- Options to specify propagators for httptrace and grpctrace instrumentation. (#784) -- The required `application/json` header for the Zipkin exporter is included in all exports. (#774) -- Integrate HTTP semantics helpers from the contrib repository into the `api/standard` package. #769 - -### Changed - -- Rename `Integrator` to `Processor` in the metric SDK. (#863) -- Rename `AggregationSelector` to `AggregatorSelector`. (#859) -- Rename `SynchronizedCopy` to `SynchronizedMove`. (#858) -- Rename `simple` integrator to `basic` integrator. (#857) -- Merge otlp collector examples. (#841) -- Change the metric SDK to support cumulative, delta, and pass-through exporters directly. - With these changes, cumulative and delta specific exporters are able to request the correct kind of aggregation from the SDK. (#840) -- The `Aggregator.Checkpoint` API is renamed to `SynchronizedCopy` and adds an argument, a different `Aggregator` into which the copy is stored. (#812) -- The `export.Aggregator` contract is that `Update()` and `SynchronizedCopy()` are synchronized with each other. - All the aggregation interfaces (`Sum`, `LastValue`, ...) are not meant to be synchronized, as the caller is expected to synchronize aggregators at a higher level after the `Accumulator`. - Some of the `Aggregators` used unnecessary locking and that has been cleaned up. (#812) -- Use of `metric.Number` was replaced by `int64` now that we use `sync.Mutex` in the `MinMaxSumCount` and `Histogram` `Aggregators`. (#812) -- Replace `AlwaysParentSample` with `ParentSample(fallback)` to match the OpenTelemetry v0.5.0 specification. (#810) -- Rename `sdk/export/metric/aggregator` to `sdk/export/metric/aggregation`. #808 -- Send configured headers with every request in the OTLP exporter, instead of just on connection creation. (#806) -- Update error handling for any one off error handlers, replacing, instead, with the `global.Handle` function. (#791) -- Rename `plugin` directory to `instrumentation` to match the OpenTelemetry specification. (#779) -- Makes the argument order to Histogram and DDSketch `New()` consistent. (#781) - -### Removed - -- `Uint64NumberKind` and related functions from the API. (#864) -- Context arguments from `Aggregator.Checkpoint` and `Integrator.Process` as they were unused. (#803) -- `SpanID` is no longer included in parameters for sampling decision to match the OpenTelemetry specification. (#775) - -### Fixed - -- Upgrade OTLP exporter to opentelemetry-proto matching the opentelemetry-collector v0.4.0 release. (#866) -- Allow changes to `go.sum` and `go.mod` when running dependabot tidy-up. (#871) -- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1. (#824) -- Bump github.com/prometheus/client_golang from 1.7.0 to 1.7.1 in /exporters/metric/prometheus. (#867) -- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/jaeger. (#853) -- Bump google.golang.org/grpc from 1.29.1 to 1.30.0 in /exporters/trace/zipkin. (#854) -- Bumps github.com/golang/protobuf from 1.3.2 to 1.4.2 (#848) -- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/otlp (#817) -- Bump github.com/golangci/golangci-lint from 1.25.1 to 1.27.0 in /tools (#828) -- Bump github.com/prometheus/client_golang from 1.5.0 to 1.7.0 in /exporters/metric/prometheus (#838) -- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/jaeger (#829) -- Bump github.com/benbjohnson/clock from 1.0.0 to 1.0.3 (#815) -- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/trace/zipkin (#823) -- Bump github.com/itchyny/gojq from 0.10.1 to 0.10.3 in /tools (#830) -- Bump github.com/stretchr/testify from 1.4.0 to 1.6.1 in /exporters/metric/prometheus (#822) -- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/zipkin (#820) -- Bump google.golang.org/grpc from 1.27.1 to 1.29.1 in /exporters/trace/jaeger (#831) -- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 (#836) -- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/trace/jaeger (#837) -- Bump github.com/google/go-cmp from 0.4.0 to 0.5.0 in /exporters/otlp (#839) -- Bump google.golang.org/api from 0.20.0 to 0.28.0 in /exporters/trace/jaeger (#843) -- Set span status from HTTP status code in the othttp instrumentation. (#832) -- Fixed typo in push controller comment. (#834) -- The `Aggregator` testing has been updated and cleaned. (#812) -- `metric.Number(0)` expressions are replaced by `0` where possible. (#812) -- Fixed `global` `handler_test.go` test failure. #804 -- Fixed `BatchSpanProcessor.Shutdown` to wait until all spans are processed. (#766) -- Fixed OTLP example's accidental early close of exporter. (#807) -- Ensure zipkin exporter reads and closes response body. (#788) -- Update instrumentation to use `api/standard` keys instead of custom keys. (#782) -- Clean up tools and RELEASING documentation. (#762) - -## [0.6.0] - 2020-05-21 - -### Added - -- Support for `Resource`s in the prometheus exporter. (#757) -- New pull controller. (#751) -- New `UpDownSumObserver` instrument. (#750) -- OpenTelemetry collector demo. (#711) -- New `SumObserver` instrument. (#747) -- New `UpDownCounter` instrument. (#745) -- New timeout `Option` and configuration function `WithTimeout` to the push controller. (#742) -- New `api/standards` package to implement semantic conventions and standard key-value generation. (#731) - -### Changed - -- Rename `Register*` functions in the metric API to `New*` for all `Observer` instruments. (#761) -- Use `[]float64` for histogram boundaries, not `[]metric.Number`. (#758) -- Change OTLP example to use exporter as a trace `Syncer` instead of as an unneeded `Batcher`. (#756) -- Replace `WithResourceAttributes()` with `WithResource()` in the trace SDK. (#754) -- The prometheus exporter now uses the new pull controller. (#751) -- Rename `ScheduleDelayMillis` to `BatchTimeout` in the trace `BatchSpanProcessor`.(#752) -- Support use of synchronous instruments in asynchronous callbacks (#725) -- Move `Resource` from the `Export` method parameter into the metric export `Record`. (#739) -- Rename `Observer` instrument to `ValueObserver`. (#734) -- The push controller now has a method (`Provider()`) to return a `metric.Provider` instead of the old `Meter` method that acted as a `metric.Provider`. (#738) -- Replace `Measure` instrument by `ValueRecorder` instrument. (#732) -- Rename correlation context header from `"Correlation-Context"` to `"otcorrelations"` to match the OpenTelemetry specification. (#727) - -### Fixed - -- Ensure gRPC `ClientStream` override methods do not panic in grpctrace package. (#755) -- Disable parts of `BatchSpanProcessor` test until a fix is found. (#743) -- Fix `string` case in `kv` `Infer` function. (#746) -- Fix panic in grpctrace client interceptors. (#740) -- Refactor the `api/metrics` push controller and add `CheckpointSet` synchronization. (#737) -- Rewrite span batch process queue batching logic. (#719) -- Remove the push controller named Meter map. (#738) -- Fix Histogram aggregator initial state (fix #735). (#736) -- Ensure golang alpine image is running `golang-1.14` for examples. (#733) -- Added test for grpctrace `UnaryInterceptorClient`. (#695) -- Rearrange `api/metric` code layout. (#724) - -## [0.5.0] - 2020-05-13 - -### Added - -- Batch `Observer` callback support. (#717) -- Alias `api` types to root package of project. (#696) -- Create basic `othttp.Transport` for simple client instrumentation. (#678) -- `SetAttribute(string, interface{})` to the trace API. (#674) -- Jaeger exporter option that allows user to specify custom http client. (#671) -- `Stringer` and `Infer` methods to `key`s. (#662) - -### Changed - -- Rename `NewKey` in the `kv` package to just `Key`. (#721) -- Move `core` and `key` to `kv` package. (#720) -- Make the metric API `Meter` a `struct` so the abstract `MeterImpl` can be passed and simplify implementation. (#709) -- Rename SDK `Batcher` to `Integrator` to match draft OpenTelemetry SDK specification. (#710) -- Rename SDK `Ungrouped` integrator to `simple.Integrator` to match draft OpenTelemetry SDK specification. (#710) -- Rename SDK `SDK` `struct` to `Accumulator` to match draft OpenTelemetry SDK specification. (#710) -- Move `Number` from `core` to `api/metric` package. (#706) -- Move `SpanContext` from `core` to `trace` package. (#692) -- Change traceparent header from `Traceparent` to `traceparent` to implement the W3C specification. (#681) - -### Fixed - -- Update tooling to run generators in all submodules. (#705) -- gRPC interceptor regexp to match methods without a service name. (#683) -- Use a `const` for padding 64-bit B3 trace IDs. (#701) -- Update `mockZipkin` listen address from `:0` to `127.0.0.1:0`. (#700) -- Left-pad 64-bit B3 trace IDs with zero. (#698) -- Propagate at least the first W3C tracestate header. (#694) -- Remove internal `StateLocker` implementation. (#688) -- Increase instance size CI system uses. (#690) -- Add a `key` benchmark and use reflection in `key.Infer()`. (#679) -- Fix internal `global` test by using `global.Meter` with `RecordBatch()`. (#680) -- Reimplement histogram using mutex instead of `StateLocker`. (#669) -- Switch `MinMaxSumCount` to a mutex lock implementation instead of `StateLocker`. (#667) -- Update documentation to not include any references to `WithKeys`. (#672) -- Correct misspelling. (#668) -- Fix clobbering of the span context if extraction fails. (#656) -- Bump `golangci-lint` and work around the corrupting bug. (#666) (#670) - -## [0.4.3] - 2020-04-24 - -### Added - -- `Dockerfile` and `docker-compose.yml` to run example code. (#635) -- New `grpctrace` package that provides gRPC client and server interceptors for both unary and stream connections. (#621) -- New `api/label` package, providing common label set implementation. (#651) -- Support for JSON marshaling of `Resources`. (#654) -- `TraceID` and `SpanID` implementations for `Stringer` interface. (#642) -- `RemoteAddrKey` in the othttp plugin to include the HTTP client address in top-level spans. (#627) -- `WithSpanFormatter` option to the othttp plugin. (#617) -- Updated README to include section for compatible libraries and include reference to the contrib repository. (#612) -- The prometheus exporter now supports exporting histograms. (#601) -- A `String` method to the `Resource` to return a hashable identifier for a now unique resource. (#613) -- An `Iter` method to the `Resource` to return an array `AttributeIterator`. (#613) -- An `Equal` method to the `Resource` test the equivalence of resources. (#613) -- An iterable structure (`AttributeIterator`) for `Resource` attributes. - -### Changed - -- zipkin export's `NewExporter` now requires a `serviceName` argument to ensure this needed values is provided. (#644) -- Pass `Resources` through the metrics export pipeline. (#659) - -### Removed - -- `WithKeys` option from the metric API. (#639) - -### Fixed - -- Use the `label.Set.Equivalent` value instead of an encoding in the batcher. (#658) -- Correct typo `trace.Exporter` to `trace.SpanSyncer` in comments. (#653) -- Use type names for return values in jaeger exporter. (#648) -- Increase the visibility of the `api/key` package by updating comments and fixing usages locally. (#650) -- `Checkpoint` only after `Update`; Keep records in the `sync.Map` longer. (#647) -- Do not cache `reflect.ValueOf()` in metric Labels. (#649) -- Batch metrics exported from the OTLP exporter based on `Resource` and labels. (#626) -- Add error wrapping to the prometheus exporter. (#631) -- Update the OTLP exporter batching of traces to use a unique `string` representation of an associated `Resource` as the batching key. (#623) -- Update OTLP `SpanData` transform to only include the `ParentSpanID` if one exists. (#614) -- Update `Resource` internal representation to uniquely and reliably identify resources. (#613) -- Check return value from `CheckpointSet.ForEach` in prometheus exporter. (#622) -- Ensure spans created by httptrace client tracer reflect operation structure. (#618) -- Create a new recorder rather than reuse when multiple observations in same epoch for asynchronous instruments. #610 -- The default port the OTLP exporter uses to connect to the OpenTelemetry collector is updated to match the one the collector listens on by default. (#611) - -## [0.4.2] - 2020-03-31 - -### Fixed - -- Fix `pre_release.sh` to update version in `sdk/opentelemetry.go`. (#607) -- Fix time conversion from internal to OTLP in OTLP exporter. (#606) - -## [0.4.1] - 2020-03-31 - -### Fixed - -- Update `tag.sh` to create signed tags. (#604) - -## [0.4.0] - 2020-03-30 - -### Added - -- New API package `api/metric/registry` that exposes a `MeterImpl` wrapper for use by SDKs to generate unique instruments. (#580) -- Script to verify examples after a new release. (#579) - -### Removed - -- The dogstatsd exporter due to lack of support. - This additionally removes support for statsd. (#591) -- `LabelSet` from the metric API. - This is replaced by a `[]core.KeyValue` slice. (#595) -- `Labels` from the metric API's `Meter` interface. (#595) - -### Changed - -- The metric `export.Labels` became an interface which the SDK implements and the `export` package provides a simple, immutable implementation of this interface intended for testing purposes. (#574) -- Renamed `internal/metric.Meter` to `MeterImpl`. (#580) -- Renamed `api/global/internal.obsImpl` to `asyncImpl`. (#580) - -### Fixed - -- Corrected missing return in mock span. (#582) -- Update License header for all source files to match CNCF guidelines and include a test to ensure it is present. (#586) (#596) -- Update to v0.3.0 of the OTLP in the OTLP exporter. (#588) -- Update pre-release script to be compatible between GNU and BSD based systems. (#592) -- Add a `RecordBatch` benchmark. (#594) -- Moved span transforms of the OTLP exporter to the internal package. (#593) -- Build both go-1.13 and go-1.14 in circleci to test for all supported versions of Go. (#569) -- Removed unneeded allocation on empty labels in OLTP exporter. (#597) -- Update `BatchedSpanProcessor` to process the queue until no data but respect max batch size. (#599) -- Update project documentation godoc.org links to pkg.go.dev. (#602) - -## [0.3.0] - 2020-03-21 - -This is a first official beta release, which provides almost fully complete metrics, tracing, and context propagation functionality. -There is still a possibility of breaking changes. - -### Added - -- Add `Observer` metric instrument. (#474) -- Add global `Propagators` functionality to enable deferred initialization for propagators registered before the first Meter SDK is installed. (#494) -- Simplified export setup pipeline for the jaeger exporter to match other exporters. (#459) -- The zipkin trace exporter. (#495) -- The OTLP exporter to export metric and trace telemetry to the OpenTelemetry collector. (#497) (#544) (#545) -- Add `StatusMessage` field to the trace `Span`. (#524) -- Context propagation in OpenTracing bridge in terms of OpenTelemetry context propagation. (#525) -- The `Resource` type was added to the SDK. (#528) -- The global API now supports a `Tracer` and `Meter` function as shortcuts to getting a global `*Provider` and calling these methods directly. (#538) -- The metric API now defines a generic `MeterImpl` interface to support general purpose `Meter` construction. - Additionally, `SyncImpl` and `AsyncImpl` are added to support general purpose instrument construction. (#560) -- A metric `Kind` is added to represent the `MeasureKind`, `ObserverKind`, and `CounterKind`. (#560) -- Scripts to better automate the release process. (#576) - -### Changed - -- Default to to use `AlwaysSampler` instead of `ProbabilitySampler` to match OpenTelemetry specification. (#506) -- Renamed `AlwaysSampleSampler` to `AlwaysOnSampler` in the trace API. (#511) -- Renamed `NeverSampleSampler` to `AlwaysOffSampler` in the trace API. (#511) -- The `Status` field of the `Span` was changed to `StatusCode` to disambiguate with the added `StatusMessage`. (#524) -- Updated the trace `Sampler` interface conform to the OpenTelemetry specification. (#531) -- Rename metric API `Options` to `Config`. (#541) -- Rename metric `Counter` aggregator to be `Sum`. (#541) -- Unify metric options into `Option` from instrument specific options. (#541) -- The trace API's `TraceProvider` now support `Resource`s. (#545) -- Correct error in zipkin module name. (#548) -- The jaeger trace exporter now supports `Resource`s. (#551) -- Metric SDK now supports `Resource`s. - The `WithResource` option was added to configure a `Resource` on creation and the `Resource` method was added to the metric `Descriptor` to return the associated `Resource`. (#552) -- Replace `ErrNoLastValue` and `ErrEmptyDataSet` by `ErrNoData` in the metric SDK. (#557) -- The stdout trace exporter now supports `Resource`s. (#558) -- The metric `Descriptor` is now included at the API instead of the SDK. (#560) -- Replace `Ordered` with an iterator in `export.Labels`. (#567) - -### Removed - -- The vendor specific Stackdriver. It is now hosted on 3rd party vendor infrastructure. (#452) -- The `Unregister` method for metric observers as it is not in the OpenTelemetry specification. (#560) -- `GetDescriptor` from the metric SDK. (#575) -- The `Gauge` instrument from the metric API. (#537) - -### Fixed - -- Make histogram aggregator checkpoint consistent. (#438) -- Update README with import instructions and how to build and test. (#505) -- The default label encoding was updated to be unique. (#508) -- Use `NewRoot` in the othttp plugin for public endpoints. (#513) -- Fix data race in `BatchedSpanProcessor`. (#518) -- Skip test-386 for Mac OS 10.15.x (Catalina and upwards). #521 -- Use a variable-size array to represent ordered labels in maps. (#523) -- Update the OTLP protobuf and update changed import path. (#532) -- Use `StateLocker` implementation in `MinMaxSumCount`. (#546) -- Eliminate goroutine leak in histogram stress test. (#547) -- Update OTLP exporter with latest protobuf. (#550) -- Add filters to the othttp plugin. (#556) -- Provide an implementation of the `Header*` filters that do not depend on Go 1.14. (#565) -- Encode labels once during checkpoint. - The checkpoint function is executed in a single thread so we can do the encoding lazily before passing the encoded version of labels to the exporter. - This is a cheap and quick way to avoid encoding the labels on every collection interval. (#572) -- Run coverage over all packages in `COVERAGE_MOD_DIR`. (#573) - -## [0.2.3] - 2020-03-04 - -### Added - -- `RecordError` method on `Span`s in the trace API to Simplify adding error events to spans. (#473) -- Configurable push frequency for exporters setup pipeline. (#504) - -### Changed - -- Rename the `exporter` directory to `exporters`. - The `go.opentelemetry.io/otel/exporter/trace/jaeger` package was mistakenly released with a `v1.0.0` tag instead of `v0.1.0`. - This resulted in all subsequent releases not becoming the default latest. - A consequence of this was that all `go get`s pulled in the incompatible `v0.1.0` release of that package when pulling in more recent packages from other otel packages. - Renaming the `exporter` directory to `exporters` fixes this issue by renaming the package and therefore clearing any existing dependency tags. - Consequentially, this action also renames *all* exporter packages. (#502) - -### Removed - -- The `CorrelationContextHeader` constant in the `correlation` package is no longer exported. (#503) - -## [0.2.2] - 2020-02-27 - -### Added - -- `HTTPSupplier` interface in the propagation API to specify methods to retrieve and store a single value for a key to be associated with a carrier. (#467) -- `HTTPExtractor` interface in the propagation API to extract information from an `HTTPSupplier` into a context. (#467) -- `HTTPInjector` interface in the propagation API to inject information into an `HTTPSupplier.` (#467) -- `Config` and configuring `Option` to the propagator API. (#467) -- `Propagators` interface in the propagation API to contain the set of injectors and extractors for all supported carrier formats. (#467) -- `HTTPPropagator` interface in the propagation API to inject and extract from an `HTTPSupplier.` (#467) -- `WithInjectors` and `WithExtractors` functions to the propagator API to configure injectors and extractors to use. (#467) -- `ExtractHTTP` and `InjectHTTP` functions to apply configured HTTP extractors and injectors to a passed context. (#467) -- Histogram aggregator. (#433) -- `DefaultPropagator` function and have it return `trace.TraceContext` as the default context propagator. (#456) -- `AlwaysParentSample` sampler to the trace API. (#455) -- `WithNewRoot` option function to the trace API to specify the created span should be considered a root span. (#451) - -### Changed - -- Renamed `WithMap` to `ContextWithMap` in the correlation package. (#481) -- Renamed `FromContext` to `MapFromContext` in the correlation package. (#481) -- Move correlation context propagation to correlation package. (#479) -- Do not default to putting remote span context into links. (#480) -- `Tracer.WithSpan` updated to accept `StartOptions`. (#472) -- Renamed `MetricKind` to `Kind` to not stutter in the type usage. (#432) -- Renamed the `export` package to `metric` to match directory structure. (#432) -- Rename the `api/distributedcontext` package to `api/correlation`. (#444) -- Rename the `api/propagators` package to `api/propagation`. (#444) -- Move the propagators from the `propagators` package into the `trace` API package. (#444) -- Update `Float64Gauge`, `Int64Gauge`, `Float64Counter`, `Int64Counter`, `Float64Measure`, and `Int64Measure` metric methods to use value receivers instead of pointers. (#462) -- Moved all dependencies of tools package to a tools directory. (#466) - -### Removed - -- Binary propagators. (#467) -- NOOP propagator. (#467) - -### Fixed - -- Upgraded `github.com/golangci/golangci-lint` from `v1.21.0` to `v1.23.6` in `tools/`. (#492) -- Fix a possible nil-dereference crash (#478) -- Correct comments for `InstallNewPipeline` in the stdout exporter. (#483) -- Correct comments for `InstallNewPipeline` in the dogstatsd exporter. (#484) -- Correct comments for `InstallNewPipeline` in the prometheus exporter. (#482) -- Initialize `onError` based on `Config` in prometheus exporter. (#486) -- Correct module name in prometheus exporter README. (#475) -- Removed tracer name prefix from span names. (#430) -- Fix `aggregator_test.go` import package comment. (#431) -- Improved detail in stdout exporter. (#436) -- Fix a dependency issue (generate target should depend on stringer, not lint target) in Makefile. (#442) -- Reorders the Makefile targets within `precommit` target so we generate files and build the code before doing linting, so we can get much nicer errors about syntax errors from the compiler. (#442) -- Reword function documentation in gRPC plugin. (#446) -- Send the `span.kind` tag to Jaeger from the jaeger exporter. (#441) -- Fix `metadataSupplier` in the jaeger exporter to overwrite the header if existing instead of appending to it. (#441) -- Upgraded to Go 1.13 in CI. (#465) -- Correct opentelemetry.io URL in trace SDK documentation. (#464) -- Refactored reference counting logic in SDK determination of stale records. (#468) -- Add call to `runtime.Gosched` in instrument `acquireHandle` logic to not block the collector. (#469) - -## [0.2.1.1] - 2020-01-13 - -### Fixed - -- Use stateful batcher on Prometheus exporter fixing regression introduced in #395. (#428) - -## [0.2.1] - 2020-01-08 - -### Added - -- Global meter forwarding implementation. - This enables deferred initialization for metric instruments registered before the first Meter SDK is installed. (#392) -- Global trace forwarding implementation. - This enables deferred initialization for tracers registered before the first Trace SDK is installed. (#406) -- Standardize export pipeline creation in all exporters. (#395) -- A testing, organization, and comments for 64-bit field alignment. (#418) -- Script to tag all modules in the project. (#414) - -### Changed - -- Renamed `propagation` package to `propagators`. (#362) -- Renamed `B3Propagator` propagator to `B3`. (#362) -- Renamed `TextFormatPropagator` propagator to `TextFormat`. (#362) -- Renamed `BinaryPropagator` propagator to `Binary`. (#362) -- Renamed `BinaryFormatPropagator` propagator to `BinaryFormat`. (#362) -- Renamed `NoopTextFormatPropagator` propagator to `NoopTextFormat`. (#362) -- Renamed `TraceContextPropagator` propagator to `TraceContext`. (#362) -- Renamed `SpanOption` to `StartOption` in the trace API. (#369) -- Renamed `StartOptions` to `StartConfig` in the trace API. (#369) -- Renamed `EndOptions` to `EndConfig` in the trace API. (#369) -- `Number` now has a pointer receiver for its methods. (#375) -- Renamed `CurrentSpan` to `SpanFromContext` in the trace API. (#379) -- Renamed `SetCurrentSpan` to `ContextWithSpan` in the trace API. (#379) -- Renamed `Message` in Event to `Name` in the trace API. (#389) -- Prometheus exporter no longer aggregates metrics, instead it only exports them. (#385) -- Renamed `HandleImpl` to `BoundInstrumentImpl` in the metric API. (#400) -- Renamed `Float64CounterHandle` to `Float64CounterBoundInstrument` in the metric API. (#400) -- Renamed `Int64CounterHandle` to `Int64CounterBoundInstrument` in the metric API. (#400) -- Renamed `Float64GaugeHandle` to `Float64GaugeBoundInstrument` in the metric API. (#400) -- Renamed `Int64GaugeHandle` to `Int64GaugeBoundInstrument` in the metric API. (#400) -- Renamed `Float64MeasureHandle` to `Float64MeasureBoundInstrument` in the metric API. (#400) -- Renamed `Int64MeasureHandle` to `Int64MeasureBoundInstrument` in the metric API. (#400) -- Renamed `Release` method for bound instruments in the metric API to `Unbind`. (#400) -- Renamed `AcquireHandle` method for bound instruments in the metric API to `Bind`. (#400) -- Renamed the `File` option in the stdout exporter to `Writer`. (#404) -- Renamed all `Options` to `Config` for all metric exports where this wasn't already the case. - -### Fixed - -- Aggregator import path corrected. (#421) -- Correct links in README. (#368) -- The README was updated to match latest code changes in its examples. (#374) -- Don't capitalize error statements. (#375) -- Fix ignored errors. (#375) -- Fix ambiguous variable naming. (#375) -- Removed unnecessary type casting. (#375) -- Use named parameters. (#375) -- Updated release schedule. (#378) -- Correct http-stackdriver example module name. (#394) -- Removed the `http.request` span in `httptrace` package. (#397) -- Add comments in the metrics SDK (#399) -- Initialize checkpoint when creating ddsketch aggregator to prevent panic when merging into a empty one. (#402) (#403) -- Add documentation of compatible exporters in the README. (#405) -- Typo fix. (#408) -- Simplify span check logic in SDK tracer implementation. (#419) - -## [0.2.0] - 2019-12-03 - -### Added - -- Unary gRPC tracing example. (#351) -- Prometheus exporter. (#334) -- Dogstatsd metrics exporter. (#326) - -### Changed - -- Rename `MaxSumCount` aggregation to `MinMaxSumCount` and add the `Min` interface for this aggregation. (#352) -- Rename `GetMeter` to `Meter`. (#357) -- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) -- Rename `HTTPB3Propagator` to `B3Propagator`. (#355) -- Rename `HTTPTraceContextPropagator` to `TraceContextPropagator`. (#355) -- Move `/global` package to `/api/global`. (#356) -- Rename `GetTracer` to `Tracer`. (#347) - -### Removed - -- `SetAttribute` from the `Span` interface in the trace API. (#361) -- `AddLink` from the `Span` interface in the trace API. (#349) -- `Link` from the `Span` interface in the trace API. (#349) - -### Fixed - -- Exclude example directories from coverage report. (#365) -- Lint make target now implements automatic fixes with `golangci-lint` before a second run to report the remaining issues. (#360) -- Drop `GO111MODULE` environment variable in Makefile as Go 1.13 is the project specified minimum version and this is environment variable is not needed for that version of Go. (#359) -- Run the race checker for all test. (#354) -- Redundant commands in the Makefile are removed. (#354) -- Split the `generate` and `lint` targets of the Makefile. (#354) -- Renames `circle-ci` target to more generic `ci` in Makefile. (#354) -- Add example Prometheus binary to gitignore. (#358) -- Support negative numbers with the `MaxSumCount`. (#335) -- Resolve race conditions in `push_test.go` identified in #339. (#340) -- Use `/usr/bin/env bash` as a shebang in scripts rather than `/bin/bash`. (#336) -- Trace benchmark now tests both `AlwaysSample` and `NeverSample`. - Previously it was testing `AlwaysSample` twice. (#325) -- Trace benchmark now uses a `[]byte` for `TraceID` to fix failing test. (#325) -- Added a trace benchmark to test variadic functions in `setAttribute` vs `setAttributes` (#325) -- The `defaultkeys` batcher was only using the encoded label set as its map key while building a checkpoint. - This allowed distinct label sets through, but any metrics sharing a label set could be overwritten or merged incorrectly. - This was corrected. (#333) - -## [0.1.2] - 2019-11-18 - -### Fixed - -- Optimized the `simplelru` map for attributes to reduce the number of allocations. (#328) -- Removed unnecessary unslicing of parameters that are already a slice. (#324) - -## [0.1.1] - 2019-11-18 - -This release contains a Metrics SDK with stdout exporter and supports basic aggregations such as counter, gauges, array, maxsumcount, and ddsketch. - -### Added - -- Metrics stdout export pipeline. (#265) -- Array aggregation for raw measure metrics. (#282) -- The core.Value now have a `MarshalJSON` method. (#281) - -### Removed - -- `WithService`, `WithResources`, and `WithComponent` methods of tracers. (#314) -- Prefix slash in `Tracer.Start()` for the Jaeger example. (#292) - -### Changed - -- Allocation in LabelSet construction to reduce GC overhead. (#318) -- `trace.WithAttributes` to append values instead of replacing (#315) -- Use a formula for tolerance in sampling tests. (#298) -- Move export types into trace and metric-specific sub-directories. (#289) -- `SpanKind` back to being based on an `int` type. (#288) - -### Fixed - -- URL to OpenTelemetry website in README. (#323) -- Name of othttp default tracer. (#321) -- `ExportSpans` for the stackdriver exporter now handles `nil` context. (#294) -- CI modules cache to correctly restore/save from/to the cache. (#316) -- Fix metric SDK race condition between `LoadOrStore` and the assignment `rec.recorder = i.meter.exporter.AggregatorFor(rec)`. (#293) -- README now reflects the new code structure introduced with these changes. (#291) -- Make the basic example work. (#279) - -## [0.1.0] - 2019-11-04 - -This is the first release of open-telemetry go library. -It contains api and sdk for trace and meter. - -### Added - -- Initial OpenTelemetry trace and metric API prototypes. -- Initial OpenTelemetry trace, metric, and export SDK packages. -- A wireframe bridge to support compatibility with OpenTracing. -- Example code for a basic, http-stackdriver, http, jaeger, and named tracer setup. -- Exporters for Jaeger, Stackdriver, and stdout. -- Propagators for binary, B3, and trace-context protocols. -- Project information and guidelines in the form of a README and CONTRIBUTING. -- Tools to build the project and a Makefile to automate the process. -- Apache-2.0 license. -- CircleCI build CI manifest files. -- CODEOWNERS file to track owners of this project. - -[Unreleased]: https://github.com/open-telemetry/opentelemetry-go/compare/v1.39.0...HEAD -[1.39.0/0.61.0/0.15.0/0.0.14]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.39.0 -[1.38.0/0.60.0/0.14.0/0.0.13]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.38.0 -[0.59.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/exporters/prometheus/v0.59.1 -[1.37.0/0.59.0/0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.37.0 -[0.12.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.2 -[0.12.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/log/v0.12.1 -[1.36.0/0.58.0/0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.36.0 -[1.35.0/0.57.0/0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.35.0 -[1.34.0/0.56.0/0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.34.0 -[1.33.0/0.55.0/0.9.0/0.0.12]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.33.0 -[1.32.0/0.54.0/0.8.0/0.0.11]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.32.0 -[1.31.0/0.53.0/0.7.0/0.0.10]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.31.0 -[1.30.0/0.52.0/0.6.0/0.0.9]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.30.0 -[1.29.0/0.51.0/0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.29.0 -[1.28.0/0.50.0/0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.28.0 -[1.27.0/0.49.0/0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.27.0 -[1.26.0/0.48.0/0.2.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.26.0 -[1.25.0/0.47.0/0.0.8/0.1.0-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.25.0 -[1.24.0/0.46.0/0.0.1-alpha]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.24.0 -[1.23.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.1 -[1.23.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0 -[1.23.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.23.0-rc.1 -[1.22.0/0.45.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.22.0 -[1.21.0/0.44.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.21.0 -[1.20.0/0.43.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.20.0 -[1.19.0/0.42.0/0.0.7]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0 -[1.19.0-rc.1/0.42.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.19.0-rc.1 -[1.18.0/0.41.0/0.0.6]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.18.0 -[1.17.0/0.40.0/0.0.5]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.17.0 -[1.16.0/0.39.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0 -[1.16.0-rc.1/0.39.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.16.0-rc.1 -[1.15.1/0.38.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.1 -[1.15.0/0.38.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0 -[1.15.0-rc.2/0.38.0-rc.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.2 -[1.15.0-rc.1/0.38.0-rc.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.15.0-rc.1 -[1.14.0/0.37.0/0.0.4]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.14.0 -[1.13.0/0.36.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.13.0 -[1.12.0/0.35.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.12.0 -[1.11.2/0.34.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.2 -[1.11.1/0.33.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.1 -[1.11.0/0.32.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.11.0 -[0.32.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.2 -[0.32.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.1 -[0.32.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/sdk/metric/v0.32.0 -[1.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.10.0 -[1.9.0/0.0.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.9.0 -[1.8.0/0.31.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.8.0 -[1.7.0/0.30.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.7.0 -[0.29.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.29.0 -[1.6.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.3 -[1.6.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.2 -[1.6.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.1 -[1.6.0/0.28.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.6.0 -[1.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.5.0 -[1.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.1 -[1.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.4.0 -[1.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.3.0 -[1.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.2.0 -[1.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.1.0 -[1.0.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.1 -[Metrics 0.24.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.24.0 -[1.0.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0 -[1.0.0-RC3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC3 -[1.0.0-RC2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC2 -[Experimental Metrics v0.22.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/metric/v0.22.0 -[1.0.0-RC1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v1.0.0-RC1 -[0.20.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.20.0 -[0.19.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.19.0 -[0.18.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.18.0 -[0.17.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.17.0 -[0.16.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.16.0 -[0.15.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.15.0 -[0.14.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.14.0 -[0.13.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.13.0 -[0.12.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.12.0 -[0.11.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.11.0 -[0.10.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.10.0 -[0.9.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.9.0 -[0.8.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.8.0 -[0.7.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.7.0 -[0.6.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.6.0 -[0.5.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.5.0 -[0.4.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.3 -[0.4.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.2 -[0.4.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.1 -[0.4.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.4.0 -[0.3.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.3.0 -[0.2.3]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.3 -[0.2.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.2 -[0.2.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1.1 -[0.2.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.1 -[0.2.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.2.0 -[0.1.2]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.2 -[0.1.1]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.1 -[0.1.0]: https://github.com/open-telemetry/opentelemetry-go/releases/tag/v0.1.0 - - - -[Go 1.25]: https://go.dev/doc/go1.25 -[Go 1.24]: https://go.dev/doc/go1.24 -[Go 1.23]: https://go.dev/doc/go1.23 -[Go 1.22]: https://go.dev/doc/go1.22 -[Go 1.21]: https://go.dev/doc/go1.21 -[Go 1.20]: https://go.dev/doc/go1.20 -[Go 1.19]: https://go.dev/doc/go1.19 -[Go 1.18]: https://go.dev/doc/go1.18 - -[metric API]:https://pkg.go.dev/go.opentelemetry.io/otel/metric -[metric SDK]:https://pkg.go.dev/go.opentelemetry.io/otel/sdk/metric -[trace API]:https://pkg.go.dev/go.opentelemetry.io/otel/trace - -[GO-2024-2687]: https://pkg.go.dev/vuln/GO-2024-2687 diff --git a/vendor/go.opentelemetry.io/otel/CODEOWNERS b/vendor/go.opentelemetry.io/otel/CODEOWNERS deleted file mode 100644 index 26a03aed1d..0000000000 --- a/vendor/go.opentelemetry.io/otel/CODEOWNERS +++ /dev/null @@ -1,17 +0,0 @@ -##################################################### -# -# List of approvers for this repository -# -##################################################### -# -# Learn about membership in OpenTelemetry community: -# https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md -# -# -# Learn about CODEOWNERS file format: -# https://help.github.com/en/articles/about-code-owners -# - -* @MrAlias @XSAM @dashpole @pellared @dmathieu @flc1125 - -CODEOWNERS @MrAlias @pellared @dashpole @XSAM @dmathieu diff --git a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md b/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md deleted file mode 100644 index ff5e1f76ec..0000000000 --- a/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md +++ /dev/null @@ -1,1157 +0,0 @@ -# Contributing to opentelemetry-go - -The Go special interest group (SIG) meets regularly. See the -OpenTelemetry -[community](https://github.com/open-telemetry/community#golang-sdk) -repo for information on this and other language SIGs. - -See the [public meeting -notes](https://docs.google.com/document/d/1E5e7Ld0NuU1iVvf-42tOBpu2VBBLYnh73GJuITGJTTU/edit) -for a summary description of past meetings. To request edit access, -join the meeting or get in touch on -[Slack](https://cloud-native.slack.com/archives/C01NPAXACKT). - -## Development - -You can view and edit the source code by cloning this repository: - -```sh -git clone https://github.com/open-telemetry/opentelemetry-go.git -``` - -Run `make test` to run the tests instead of `go test`. - -There are some generated files checked into the repo. To make sure -that the generated files are up-to-date, run `make` (or `make -precommit` - the `precommit` target is the default). - -The `precommit` target also fixes the formatting of the code and -checks the status of the go module files. - -Additionally, there is a `codespell` target that checks for common -typos in the code. It is not run by default, but you can run it -manually with `make codespell`. It will set up a virtual environment -in `venv` and install `codespell` there. - -If after running `make precommit` the output of `git status` contains -`nothing to commit, working tree clean` then it means that everything -is up-to-date and properly formatted. - -## Pull Requests - -### How to Send Pull Requests - -Everyone is welcome to contribute code to `opentelemetry-go` via -GitHub pull requests (PRs). - -To create a new PR, fork the project in GitHub and clone the upstream -repo: - -```sh -go get -d go.opentelemetry.io/otel -``` - -(This may print some warning about "build constraints exclude all Go -files", just ignore it.) - -This will put the project in `${GOPATH}/src/go.opentelemetry.io/otel`. -Alternatively, you can use `git` directly with: - -```sh -git clone https://github.com/open-telemetry/opentelemetry-go -``` - -(Note that `git clone` is *not* using the `go.opentelemetry.io/otel` name - -that name is a kind of a redirector to GitHub that `go get` can -understand, but `git` does not.) - -This will add the project as `opentelemetry-go` within the current directory. - -Enter the newly created directory and add your fork as a new remote: - -```sh -git remote add git@github.com:/opentelemetry-go -``` - -Check out a new branch, make modifications, run linters and tests, update -`CHANGELOG.md`, and push the branch to your fork: - -```sh -git checkout -b -# edit files -# update changelog -make precommit -git add -p -git commit -git push -``` - -Open a pull request against the main `opentelemetry-go` repo. Be sure to add the pull -request ID to the entry you added to `CHANGELOG.md`. - -Avoid rebasing and force-pushing to your branch to facilitate reviewing the pull request. -Rewriting Git history makes it difficult to keep track of iterations during code review. -All pull requests are squashed to a single commit upon merge to `main`. - -### How to Receive Comments - -* If the PR is not ready for review, please put `[WIP]` in the title, - tag it as `work-in-progress`, or mark it as - [`draft`](https://github.blog/2019-02-14-introducing-draft-pull-requests/). -* Make sure CLA is signed and CI is clear. - -### How to Get PRs Merged - -A PR is considered **ready to merge** when: - -* It has received two qualified approvals[^1]. - - This is not enforced through automation, but needs to be validated by the - maintainer merging. - * At least one of the qualified approvals needs to be from an - [Approver]/[Maintainer] affiliated with a different company than the author - of the PR. - * PRs introducing changes that have already been discussed and consensus - reached only need one qualified approval. The discussion and resolution - needs to be linked to the PR. - * Trivial changes[^2] only need one qualified approval. - -* All feedback has been addressed. - * All PR comments and suggestions are resolved. - * All GitHub Pull Request reviews with a status of "Request changes" have - been addressed. Another review by the objecting reviewer with a different - status can be submitted to clear the original review, or the review can be - dismissed by a [Maintainer] when the issues from the original review have - been addressed. - * Any comments or reviews that cannot be resolved between the PR author and - reviewers can be submitted to the community [Approver]s and [Maintainer]s - during the weekly SIG meeting. If consensus is reached among the - [Approver]s and [Maintainer]s during the SIG meeting the objections to the - PR may be dismissed or resolved or the PR closed by a [Maintainer]. - * Any substantive changes to the PR require existing Approval reviews be - cleared unless the approver explicitly states that their approval persists - across changes. This includes changes resulting from other feedback. - [Approver]s and [Maintainer]s can help in clearing reviews and they should - be consulted if there are any questions. - -* The PR branch is up to date with the base branch it is merging into. - * To ensure this does not block the PR, it should be configured to allow - maintainers to update it. - -* It has been open for review for at least one working day. This gives people - reasonable time to review. - * Trivial changes[^2] do not have to wait for one day and may be merged with - a single [Maintainer]'s approval. - -* All required GitHub workflows have succeeded. -* Urgent fix can take exception as long as it has been actively communicated - among [Maintainer]s. - -Any [Maintainer] can merge the PR once the above criteria have been met. - -[^1]: A qualified approval is a GitHub Pull Request review with "Approve" - status from an OpenTelemetry Go [Approver] or [Maintainer]. -[^2]: Trivial changes include: typo corrections, cosmetic non-substantive - changes, documentation corrections or updates, dependency updates, etc. - -## Design Choices - -As with other OpenTelemetry clients, opentelemetry-go follows the -[OpenTelemetry Specification](https://opentelemetry.io/docs/specs/otel). - -It's especially valuable to read through the [library -guidelines](https://opentelemetry.io/docs/specs/otel/library-guidelines). - -### Focus on Capabilities, Not Structure Compliance - -OpenTelemetry is an evolving specification, one where the desires and -use cases are clear, but the methods to satisfy those use cases are -not. - -As such, Contributions should provide functionality and behavior that -conforms to the specification, but the interface and structure are -flexible. - -It is preferable to have contributions follow the idioms of the -language rather than conform to specific API names or argument -patterns in the spec. - -For a deeper discussion, see -[this](https://github.com/open-telemetry/opentelemetry-specification/issues/165). - -## Tests - -Each functionality should be covered by tests. - -Performance-critical functionality should also be covered by benchmarks. - -- Pull requests adding a performance-critical functionality -should have `go test -bench` output in their description. -- Pull requests changing a performance-critical functionality -should have [`benchstat`](https://pkg.go.dev/golang.org/x/perf/cmd/benchstat) -output in their description. - -## Dependencies - -This project uses [Go Modules] for dependency management. All modules will use -`go.mod` to explicitly list all direct and indirect dependencies, ensuring a -clear dependency graph. The `go.sum` file for each module will be committed to -the repository and used to verify the integrity of downloaded modules, -preventing malicious tampering. - -This project uses automated dependency update tools (i.e. dependabot, -renovatebot) to manage updates to dependencies. This ensures that dependencies -are kept up-to-date with the latest security patches and features and are -reviewed before being merged. If you would like to propose a change to a -dependency it should be done through a pull request that updates the `go.mod` -file and includes a description of the change. - -See the [versioning and compatibility](./VERSIONING.md) policy for more details -about dependency compatibility. - -[Go Modules]: https://pkg.go.dev/cmd/go#hdr-Modules__module_versions__and_more - -### Environment Dependencies - -This project does not partition dependencies based on the environment (i.e. -`development`, `staging`, `production`). - -Only the dependencies explicitly included in the released modules have been -tested and verified to work with the released code. No other guarantee is made -about the compatibility of other dependencies. - -## Documentation - -Each (non-internal, non-test) package must be documented using -[Go Doc Comments](https://go.dev/doc/comment), -preferably in a `doc.go` file. - -Prefer using [Examples](https://pkg.go.dev/testing#hdr-Examples) -instead of putting code snippets in Go doc comments. -In some cases, you can even create [Testable Examples](https://go.dev/blog/examples). - -You can install and run a "local Go Doc site" in the following way: - - ```sh - go install golang.org/x/pkgsite/cmd/pkgsite@latest - pkgsite - ``` - -[`go.opentelemetry.io/otel/metric`](https://pkg.go.dev/go.opentelemetry.io/otel/metric) -is an example of a very well-documented package. - -### README files - -Each (non-internal, non-test, non-documentation) package must contain a -`README.md` file containing at least a title, and a `pkg.go.dev` badge. - -The README should not be a repetition of Go doc comments. - -You can verify the presence of all README files with the `make verify-readmes` -command. - -## Style Guide - -One of the primary goals of this project is that it is actually used by -developers. With this goal in mind the project strives to build -user-friendly and idiomatic Go code adhering to the Go community's best -practices. - -For a non-comprehensive but foundational overview of these best practices -the [Effective Go](https://golang.org/doc/effective_go.html) documentation -is an excellent starting place. - -We also recommend following the -[Go Code Review Comments](https://go.dev/wiki/CodeReviewComments) -that collects common comments made during reviews of Go code. - -As a convenience for developers building this project the `make precommit` -will format, lint, validate, and in some cases fix the changes you plan to -submit. This check will need to pass for your changes to be able to be -merged. - -In addition to idiomatic Go, the project has adopted certain standards for -implementations of common patterns. These standards should be followed as a -default, and if they are not followed documentation needs to be included as -to the reasons why. - -### Configuration - -When creating an instantiation function for a complex `type T struct`, it is -useful to allow variable number of options to be applied. However, the strong -type system of Go restricts the function design options. There are a few ways -to solve this problem, but we have landed on the following design. - -#### `config` - -Configuration should be held in a `struct` named `config`, or prefixed with -specific type name this Configuration applies to if there are multiple -`config` in the package. This type must contain configuration options. - -```go -// config contains configuration options for a thing. -type config struct { - // options ... -} -``` - -In general the `config` type will not need to be used externally to the -package and should be unexported. If, however, it is expected that the user -will likely want to build custom options for the configuration, the `config` -should be exported. Please, include in the documentation for the `config` -how the user can extend the configuration. - -It is important that internal `config` are not shared across package boundaries. -Meaning a `config` from one package should not be directly used by another. The -one exception is the API packages. The configs from the base API, eg. -`go.opentelemetry.io/otel/trace.TracerConfig` and -`go.opentelemetry.io/otel/metric.InstrumentConfig`, are intended to be consumed -by the SDK therefore it is expected that these are exported. - -When a config is exported we want to maintain forward and backward -compatibility, to achieve this no fields should be exported but should -instead be accessed by methods. - -Optionally, it is common to include a `newConfig` function (with the same -naming scheme). This function wraps any defaults setting and looping over -all options to create a configured `config`. - -```go -// newConfig returns an appropriately configured config. -func newConfig(options ...Option) config { - // Set default values for config. - config := config{/* […] */} - for _, option := range options { - config = option.apply(config) - } - // Perform any validation here. - return config -} -``` - -If validation of the `config` options is also performed this can return an -error as well that is expected to be handled by the instantiation function -or propagated to the user. - -Given the design goal of not having the user need to work with the `config`, -the `newConfig` function should also be unexported. - -#### `Option` - -To set the value of the options a `config` contains, a corresponding -`Option` interface type should be used. - -```go -type Option interface { - apply(config) config -} -``` - -Having `apply` unexported makes sure that it will not be used externally. -Moreover, the interface becomes sealed so the user cannot easily implement -the interface on its own. - -The `apply` method should return a modified version of the passed config. -This approach, instead of passing a pointer, is used to prevent the config from being allocated to the heap. - -The name of the interface should be prefixed in the same way the -corresponding `config` is (if at all). - -#### Options - -All user configurable options for a `config` must have a related unexported -implementation of the `Option` interface and an exported configuration -function that wraps this implementation. - -The wrapping function name should be prefixed with `With*` (or in the -special case of a boolean options `Without*`) and should have the following -function signature. - -```go -func With*(…) Option { … } -``` - -##### `bool` Options - -```go -type defaultFalseOption bool - -func (o defaultFalseOption) apply(c config) config { - c.Bool = bool(o) - return c -} - -// WithOption sets a T to have an option included. -func WithOption() Option { - return defaultFalseOption(true) -} -``` - -```go -type defaultTrueOption bool - -func (o defaultTrueOption) apply(c config) config { - c.Bool = bool(o) - return c -} - -// WithoutOption sets a T to have Bool option excluded. -func WithoutOption() Option { - return defaultTrueOption(false) -} -``` - -##### Declared Type Options - -```go -type myTypeOption struct { - MyType MyType -} - -func (o myTypeOption) apply(c config) config { - c.MyType = o.MyType - return c -} - -// WithMyType sets T to have include MyType. -func WithMyType(t MyType) Option { - return myTypeOption{t} -} -``` - -##### Functional Options - -```go -type optionFunc func(config) config - -func (fn optionFunc) apply(c config) config { - return fn(c) -} - -// WithMyType sets t as MyType. -func WithMyType(t MyType) Option { - return optionFunc(func(c config) config { - c.MyType = t - return c - }) -} -``` - -#### Instantiation - -Using this configuration pattern to configure instantiation with a `NewT` -function. - -```go -func NewT(options ...Option) T {…} -``` - -Any required parameters can be declared before the variadic `options`. - -#### Dealing with Overlap - -Sometimes there are multiple complex `struct` that share common -configuration and also have distinct configuration. To avoid repeated -portions of `config`s, a common `config` can be used with the union of -options being handled with the `Option` interface. - -For example. - -```go -// config holds options for all animals. -type config struct { - Weight float64 - Color string - MaxAltitude float64 -} - -// DogOption apply Dog specific options. -type DogOption interface { - applyDog(config) config -} - -// BirdOption apply Bird specific options. -type BirdOption interface { - applyBird(config) config -} - -// Option apply options for all animals. -type Option interface { - BirdOption - DogOption -} - -type weightOption float64 - -func (o weightOption) applyDog(c config) config { - c.Weight = float64(o) - return c -} - -func (o weightOption) applyBird(c config) config { - c.Weight = float64(o) - return c -} - -func WithWeight(w float64) Option { return weightOption(w) } - -type furColorOption string - -func (o furColorOption) applyDog(c config) config { - c.Color = string(o) - return c -} - -func WithFurColor(c string) DogOption { return furColorOption(c) } - -type maxAltitudeOption float64 - -func (o maxAltitudeOption) applyBird(c config) config { - c.MaxAltitude = float64(o) - return c -} - -func WithMaxAltitude(a float64) BirdOption { return maxAltitudeOption(a) } - -func NewDog(name string, o ...DogOption) Dog {…} -func NewBird(name string, o ...BirdOption) Bird {…} -``` - -### Interfaces - -To allow other developers to better comprehend the code, it is important -to ensure it is sufficiently documented. One simple measure that contributes -to this aim is self-documenting by naming method parameters. Therefore, -where appropriate, methods of every exported interface type should have -their parameters appropriately named. - -#### Interface Stability - -All exported stable interfaces that include the following warning in their -documentation are allowed to be extended with additional methods. - -> Warning: methods may be added to this interface in minor releases. - -These interfaces are defined by the OpenTelemetry specification and will be -updated as the specification evolves. - -Otherwise, stable interfaces MUST NOT be modified. - -#### How to Change Specification Interfaces - -When an API change must be made, we will update the SDK with the new method one -release before the API change. This will allow the SDK one version before the -API change to work seamlessly with the new API. - -If an incompatible version of the SDK is used with the new API the application -will fail to compile. - -#### How Not to Change Specification Interfaces - -We have explored using a v2 of the API to change interfaces and found that there -was no way to introduce a v2 and have it work seamlessly with the v1 of the API. -Problems happened with libraries that upgraded to v2 when an application did not, -and would not produce any telemetry. - -More detail of the approaches considered and their limitations can be found in -the [Use a V2 API to evolve interfaces](https://github.com/open-telemetry/opentelemetry-go/issues/3920) -issue. - -#### How to Change Other Interfaces - -If new functionality is needed for an interface that cannot be changed it MUST -be added by including an additional interface. That added interface can be a -simple interface for the specific functionality that you want to add or it can -be a super-set of the original interface. For example, if you wanted to a -`Close` method to the `Exporter` interface: - -```go -type Exporter interface { - Export() -} -``` - -A new interface, `Closer`, can be added: - -```go -type Closer interface { - Close() -} -``` - -Code that is passed the `Exporter` interface can now check to see if the passed -value also satisfies the new interface. E.g. - -```go -func caller(e Exporter) { - /* ... */ - if c, ok := e.(Closer); ok { - c.Close() - } - /* ... */ -} -``` - -Alternatively, a new type that is the super-set of an `Exporter` can be created. - -```go -type ClosingExporter struct { - Exporter - Close() -} -``` - -This new type can be used similar to the simple interface above in that a -passed `Exporter` type can be asserted to satisfy the `ClosingExporter` type -and the `Close` method called. - -This super-set approach can be useful if there is explicit behavior that needs -to be coupled with the original type and passed as a unified type to a new -function, but, because of this coupling, it also limits the applicability of -the added functionality. If there exist other interfaces where this -functionality should be added, each one will need their own super-set -interfaces and will duplicate the pattern. For this reason, the simple targeted -interface that defines the specific functionality should be preferred. - -See also: -[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces). - -### Testing - -We allow using [`testify`](https://github.com/stretchr/testify) even though -it is seen as non-idiomatic according to -the [Go Test Comments](https://go.dev/wiki/TestComments#assert-libraries) page. - -The tests should never leak goroutines. - -Use the term `ConcurrentSafe` in the test name when it aims to verify the -absence of race conditions. The top-level tests with this term will be run -many times in the `test-concurrent-safe` CI job to increase the chance of -catching concurrency issues. This does not apply to subtests when this term -is not in their root name. - -### Internal packages - -The use of internal packages should be scoped to a single module. A sub-module -should never import from a parent internal package. This creates a coupling -between the two modules where a user can upgrade the parent without the child, -and if the internal package API has changed, it will fail to upgrade[^3]. - -There are two known exceptions to this rule: - -- `go.opentelemetry.io/otel/internal/global` - - This package manages global state for all of opentelemetry-go. It needs to - be a single package in order to ensure the uniqueness of the global state. -- `go.opentelemetry.io/otel/internal/baggage` - - This package provides values in a `context.Context` that need to be - recognized by `go.opentelemetry.io/otel/baggage` and - `go.opentelemetry.io/otel/bridge/opentracing` but remain private. - -If you have duplicate code in multiple modules, make that code into a Go -template stored in `go.opentelemetry.io/otel/internal/shared` and use [gotmpl] -to render the templates in the desired locations. See [#4404] for an example of -this. - -[^3]: https://github.com/open-telemetry/opentelemetry-go/issues/3548 - -### Ignoring context cancellation - -OpenTelemetry API implementations need to ignore the cancellation of the context that is -passed when recording a value (e.g. starting a span, recording a measurement, emitting a log). -Recording methods should not return an error describing the cancellation state of the context -when they complete, nor should they abort any work. - -This rule may not apply if the OpenTelemetry specification defines a timeout mechanism for -the method. In that case the context cancellation can be used for the timeout with the -restriction that this behavior is documented for the method. Otherwise, timeouts -are expected to be handled by the user calling the API, not the implementation. - -Stoppage of the telemetry pipeline is handled by calling the appropriate `Shutdown` method -of a provider. It is assumed the context passed from a user is not used for this purpose. - -Outside of the direct recording of telemetry from the API (e.g. exporting telemetry, -force flushing telemetry, shutting down a signal provider) the context cancellation -should be honored. This means all work done on behalf of the user provided context -should be canceled. - -### Observability - -OpenTelemetry Go SDK components should be instrumented to enable users observability for the health and performance of the telemetry pipeline itself. -This allows operators to understand how well their observability infrastructure is functioning and to identify potential issues before they impact their applications. - -This section outlines the best practices for building instrumentation in OpenTelemetry Go SDK components. - -#### Environment Variable Activation - -Observability features are currently experimental. -They should be disabled by default and activated through the `OTEL_GO_X_OBSERVABILITY` environment variable. -This follows the established experimental feature pattern used throughout the SDK. - -Components should check for this environment variable using a consistent pattern: - -```go -import "go.opentelemetry.io/otel/*/internal/x" - -if x.Observability.Enabled() { - // Initialize observability metrics -} -``` - -**References**: - -- [stdouttrace exporter](./exporters/stdout/stdouttrace/internal/x/x.go) -- [sdk](./sdk/internal/x/x.go) - -#### Encapsulation - -Instrumentation should be encapsulated within a dedicated `struct` (e.g. `instrumentation`). -It should not be mixed into the instrumented component. - -Prefer this: - -```go -type SDKComponent struct { - inst *instrumentation -} - -type instrumentation struct { - inflight otelconv.SDKComponentInflight - exported otelconv.SDKComponentExported -} -``` - -To this: - -```go -// ❌ Avoid this pattern. -type SDKComponent struct { - /* other SDKComponent fields... */ - - inflight otelconv.SDKComponentInflight - exported otelconv.SDKComponentExported -} -``` - -The instrumentation code should not bloat the code being instrumented. -Likely, this means its own file, or its own package if it is complex or reused. - -#### Initialization - -Instrumentation setup should be explicit, side-effect free, and local to the relevant component. -Avoid relying on global or implicit [side effects][side-effect] for initialization. - -Encapsulate setup in constructor functions, ensuring clear ownership and scope: - -```go -import ( - "errors" - - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" -) - -type SDKComponent struct { - inst *instrumentation -} - -func NewSDKComponent(config Config) (*SDKComponent, error) { - inst, err := newInstrumentation() - if err != nil { - return nil, err - } - return &SDKComponent{inst: inst}, nil -} - -type instrumentation struct { - inflight otelconv.SDKComponentInflight - exported otelconv.SDKComponentExported -} - -func newInstrumentation() (*instrumentation, error) { - if !x.Observability.Enabled() { - return nil, nil - } - - meter := otel.GetMeterProvider().Meter( - "", - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(semconv.SchemaURL), - ) - - inst := &instrumentation{} - - var err, e error - inst.inflight, e = otelconv.NewSDKComponentInflight(meter) - err = errors.Join(err, e) - - inst.exported, e = otelconv.NewSDKComponentExported(meter) - err = errors.Join(err, e) - - return inst, err -} -``` - -```go -// ❌ Avoid this pattern. -func (c *Component) initObservability() { - // Initialize observability metrics - if !x.Observability.Enabled() { - return - } - - // Initialize observability metrics - c.inst = &instrumentation{/* ... */} -} -``` - -[side-effect]: https://en.wikipedia.org/wiki/Side_effect_(computer_science) - -#### Performance - -When observability is disabled there should be little to no overhead. - -```go -func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { - if e.inst != nil { - attrs := expensiveOperation() - e.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...) - } - // Export spans... -} -``` - -```go -// ❌ Avoid this pattern. -func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { - attrs := expensiveOperation() - e.inst.recordSpanInflight(ctx, int64(len(spans)), attrs...) - // Export spans... -} - -func (i *instrumentation) recordSpanInflight(ctx context.Context, count int64, attrs ...attribute.KeyValue) { - if i == nil || i.inflight == nil { - return - } - i.inflight.Add(ctx, count, metric.WithAttributes(attrs...)) -} -``` - -When observability is enabled, the instrumentation code paths should be optimized to reduce allocation and computation overhead. - -##### Attribute and Option Allocation Management - -Pool attribute slices and options with [`sync.Pool`] to minimize allocations in measurement calls with dynamic attributes. - -```go -var ( - attrPool = sync.Pool{ - New: func() any { - // Pre-allocate common capacity - knownCap := 8 // Adjust based on expected usage - s := make([]attribute.KeyValue, 0, knownCap) - // Return a pointer to avoid extra allocation on Put(). - return &s - }, - } - - addOptPool = &sync.Pool{ - New: func() any { - const n = 1 // WithAttributeSet - o := make([]metric.AddOption, 0, n) - // Return a pointer to avoid extra allocation on Put(). - return &o - }, - } -) - -func (i *instrumentation) record(ctx context.Context, value int64, baseAttrs ...attribute.KeyValue) { - attrs := attrPool.Get().(*[]attribute.KeyValue) - defer func() { - *attrs = (*attrs)[:0] // Reset. - attrPool.Put(attrs) - }() - - *attrs = append(*attrs, baseAttrs...) - // Add any dynamic attributes. - *attrs = append(*attrs, semconv.OTelComponentName("exporter-1")) - - addOpt := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *addOpt = (*addOpt)[:0] - addOptPool.Put(addOpt) - }() - - set := attribute.NewSet(*attrs...) - *addOpt = append(*addOpt, metric.WithAttributeSet(set)) - - i.counter.Add(ctx, value, *addOpt...) -} -``` - -Pools are most effective when there are many pooled objects of the same sufficiently large size, and the objects are repeatedly used. -This amortizes the cost of allocation and synchronization. -Ideally, the pools should be scoped to be used as widely as possible within the component to maximize this efficiency while still ensuring correctness. - -[`sync.Pool`]: https://pkg.go.dev/sync#Pool - -##### Cache common attribute sets for repeated measurements - -If a static set of attributes are used for measurements and they are known at compile time, pre-compute and cache these attributes. - -```go -type spanLiveSetKey struct { - sampled bool -} - -var spanLiveSetCache = map[spanLiveSetKey]attribute.Set{ - {true}: attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordAndSample, - ), - ), - {false}: attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordOnly, - ), - ), -} - -func spanLiveSet(sampled bool) attribute.Set { - key := spanLiveSetKey{sampled: sampled} - return spanLiveSetCache[key] -} -``` - -##### Benchmarking - -Always provide benchmarks when introducing or refactoring instrumentation. -Demonstrate the impact (allocs/op, B/op, ns/op) in enabled/disabled scenarios: - -```go -func BenchmarkExportSpans(b *testing.B) { - scenarios := []struct { - name string - obsEnabled bool - }{ - {"ObsDisabled", false}, - {"ObsEnabled", true}, - } - - for _, scenario := range scenarios { - b.Run(scenario.name, func(b *testing.B) { - b.Setenv( - "OTEL_GO_X_OBSERVABILITY", - strconv.FormatBool(scenario.obsEnabled), - ) - - exporter := NewExporter() - spans := generateTestSpans(100) - - b.ResetTimer() - b.ReportAllocs() - - for i := 0; i < b.N; i++ { - _ = exporter.ExportSpans(context.Background(), spans) - } - }) - } -} -``` - -#### Error Handling and Robustness - -Errors should be reported back to the caller if possible, and partial failures should be handled as gracefully as possible. - -```go -func newInstrumentation() (*instrumentation, error) { - if !x.Observability.Enabled() { - return nil, nil - } - - m := otel.GetMeterProvider().Meter(/* initialize meter */) - counter, err := otelconv.NewSDKComponentCounter(m) - // Use the partially initialized counter if available. - i := &instrumentation{counter: counter} - // Return any error to the caller. - return i, err -} -``` - -```go -// ❌ Avoid this pattern. -func newInstrumentation() *instrumentation { - if !x.Observability.Enabled() { - return nil, nil - } - - m := otel.GetMeterProvider().Meter(/* initialize meter */) - counter, err := otelconv.NewSDKComponentCounter(m) - if err != nil { - // ❌ Do not dump the error to the OTel Handler. Return it to the - // caller. - otel.Handle(err) - // ❌ Do not return nil if we can still use the partially initialized - // counter. - return nil - } - return &instrumentation{counter: counter} -} -``` - -If the instrumented component cannot report the error to the user, let it report the error to `otel.Handle`. - -#### Context Propagation - -Ensure observability measurements receive the correct context, especially for trace exemplars and distributed context: - -```go -func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { - // Use the provided context for observability measurements - e.inst.recordSpanExportStarted(ctx, len(spans)) - - err := e.doExport(ctx, spans) - - if err != nil { - e.inst.recordSpanExportFailed(ctx, len(spans), err) - } else { - e.inst.recordSpanExportSucceeded(ctx, len(spans)) - } - - return err -} -``` - -```go -// ❌ Avoid this pattern. -func (e *Exporter) ExportSpans(ctx context.Context, spans []trace.ReadOnlySpan) error { - // ❌ Do not break the context propagation. - e.inst.recordSpanExportStarted(context.Background(), len(spans)) - - err := e.doExport(ctx, spans) - - /* ... */ - - return err -} -``` - -#### Semantic Conventions Compliance - -All observability metrics should follow the [OpenTelemetry Semantic Conventions for SDK metrics](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/otel/sdk-metrics.md). - -Use the metric semantic conventions convenience package [otelconv](./semconv/v1.37.0/otelconv/metric.go). - -##### Component Identification - -Component names and types should follow [semantic convention](https://github.com/open-telemetry/semantic-conventions/blob/1cf2476ae5e518225a766990a28a6d5602bd5a30/docs/registry/attributes/otel.md#otel-component-attributes). - -If a component is not a well-known type specified in the semantic conventions, use the package path scope type as a stable identifier. - -```go -componentType := "go.opentelemetry.io/otel/sdk/trace.Span" -``` - -```go -// ❌ Do not do this. -componentType := "trace-span" -``` - -The component name should be a stable unique identifier for the specific instance of the component. - -Use a global counter to ensure uniqueness if necessary. - -```go -// Unique 0-based ID counter for component instances. -var componentIDCounter atomic.Int64 - -// nextID returns the next unique ID for a component. -func nextID() int64 { - return componentIDCounter.Add(1) - 1 -} - -// componentName returns a unique name for the component instance. -func componentName() attribute.KeyValue { - id := nextID() - name := fmt.Sprintf("%s/%d", componentType, id) - return semconv.OTelComponentName(name) -} -``` - -The component ID will need to be resettable for deterministic testing. -If tests are in a different package than the component being tested (i.e. a `_test` package name), use a generated `counter` internal package to manage the counter. -See [stdouttrace exporter example](./exporters/stdout/stdouttrace/internal/gen.go) for reference. - -#### Testing - -Use deterministic testing with isolated state: - -```go -func TestObservability(t *testing.T) { - // Restore state after test to ensure this does not affect other tests. - prev := otel.GetMeterProvider() - t.Cleanup(func() { otel.SetMeterProvider(prev) }) - - // Isolate the meter provider for deterministic testing - reader := metric.NewManualReader() - meterProvider := metric.NewMeterProvider(metric.WithReader(reader)) - otel.SetMeterProvider(meterProvider) - - // Use t.Setenv to ensure environment variable is restored after test. - t.Setenv("OTEL_GO_X_OBSERVABILITY", "true") - - // Reset component ID counter to ensure deterministic component names. - componentIDCounter.Store(0) - - /* ... test code ... */ -} -``` - -Test order should not affect results. -Ensure that any global state (e.g. component ID counters) is reset between tests. - -## Approvers and Maintainers - -### Maintainers - -- [Damien Mathieu](https://github.com/dmathieu), Elastic ([GPG](https://keys.openpgp.org/search?q=5A126B972A81A6CE443E5E1B408B8E44F0873832)) -- [David Ashpole](https://github.com/dashpole), Google ([GPG](https://keys.openpgp.org/search?q=C0D1BDDCAAEAE573673085F176327DA4D864DC70)) -- [Robert Pająk](https://github.com/pellared), Splunk ([GPG](https://keys.openpgp.org/search?q=CDAD3A60476A3DE599AA5092E5F7C35A4DBE90C2)) -- [Sam Xie](https://github.com/XSAM), Splunk ([GPG](https://keys.openpgp.org/search?q=AEA033782371ABB18EE39188B8044925D6FEEBEA)) -- [Tyler Yahn](https://github.com/MrAlias), Splunk ([GPG](https://keys.openpgp.org/search?q=0x46B0F3E1A8B1BA5A)) - -For more information about the maintainer role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#maintainer). - -### Approvers - -- [Flc](https://github.com/flc1125), Independent - -For more information about the approver role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#approver). - -### Triagers - -- [Alex Kats](https://github.com/akats7), Capital One - -For more information about the triager role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#triager). - -### Emeritus - -- [Aaron Clawson](https://github.com/MadVikingGod) -- [Anthony Mirabella](https://github.com/Aneurysm9) -- [Cheng-Zhen Yang](https://github.com/scorpionknifes) -- [Chester Cheung](https://github.com/hanyuancheung) -- [Evan Torrie](https://github.com/evantorrie) -- [Gustavo Silva Paiva](https://github.com/paivagustavo) -- [Josh MacDonald](https://github.com/jmacd) -- [Liz Fong-Jones](https://github.com/lizthegrey) - -For more information about the emeritus role, see the [community repository](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md#emeritus-maintainerapprovertriager). - -### Become an Approver or a Maintainer - -See the [community membership document in OpenTelemetry community -repo](https://github.com/open-telemetry/community/blob/main/guides/contributor/membership.md). - -[Approver]: #approvers -[Maintainer]: #maintainers -[gotmpl]: https://pkg.go.dev/go.opentelemetry.io/build-tools/gotmpl -[#4404]: https://github.com/open-telemetry/opentelemetry-go/pull/4404 diff --git a/vendor/go.opentelemetry.io/otel/LICENSE b/vendor/go.opentelemetry.io/otel/LICENSE deleted file mode 100644 index f1aee0f110..0000000000 --- a/vendor/go.opentelemetry.io/otel/LICENSE +++ /dev/null @@ -1,231 +0,0 @@ - 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 - - 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] - - 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. - --------------------------------------------------------------------------------- - -Copyright 2009 The Go Authors. - -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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/Makefile b/vendor/go.opentelemetry.io/otel/Makefile deleted file mode 100644 index 44870248c3..0000000000 --- a/vendor/go.opentelemetry.io/otel/Makefile +++ /dev/null @@ -1,327 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -TOOLS_MOD_DIR := ./internal/tools - -ALL_DOCS := $(shell find . -name '*.md' -type f | sort) -ALL_GO_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | sort) -OTEL_GO_MOD_DIRS := $(filter-out $(TOOLS_MOD_DIR), $(ALL_GO_MOD_DIRS)) -ALL_COVERAGE_MOD_DIRS := $(shell find . -type f -name 'go.mod' -exec dirname {} \; | grep -E -v '^./example|^$(TOOLS_MOD_DIR)' | sort) - -GO = go -TIMEOUT = 60 - -# User to run as in docker images. -DOCKER_USER=$(shell id -u):$(shell id -g) -DEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile - -.DEFAULT_GOAL := precommit - -.PHONY: precommit ci -precommit: generate toolchain-check license-check misspell go-mod-tidy golangci-lint-fix verify-readmes verify-mods test-default -ci: generate toolchain-check license-check lint vanity-import-check verify-readmes verify-mods build test-default check-clean-work-tree test-coverage - -# Tools - -TOOLS = $(CURDIR)/.tools - -$(TOOLS): - @mkdir -p $@ -$(TOOLS)/%: $(TOOLS_MOD_DIR)/go.mod | $(TOOLS) - cd $(TOOLS_MOD_DIR) && \ - $(GO) build -o $@ $(PACKAGE) - -MULTIMOD = $(TOOLS)/multimod -$(TOOLS)/multimod: PACKAGE=go.opentelemetry.io/build-tools/multimod - -CROSSLINK = $(TOOLS)/crosslink -$(TOOLS)/crosslink: PACKAGE=go.opentelemetry.io/build-tools/crosslink - -SEMCONVKIT = $(TOOLS)/semconvkit -$(TOOLS)/semconvkit: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/semconvkit - -VERIFYREADMES = $(TOOLS)/verifyreadmes -$(TOOLS)/verifyreadmes: PACKAGE=go.opentelemetry.io/otel/$(TOOLS_MOD_DIR)/verifyreadmes - -GOLANGCI_LINT = $(TOOLS)/golangci-lint -$(TOOLS)/golangci-lint: PACKAGE=github.com/golangci/golangci-lint/v2/cmd/golangci-lint - -MISSPELL = $(TOOLS)/misspell -$(TOOLS)/misspell: PACKAGE=github.com/client9/misspell/cmd/misspell - -GOCOVMERGE = $(TOOLS)/gocovmerge -$(TOOLS)/gocovmerge: PACKAGE=github.com/wadey/gocovmerge - -STRINGER = $(TOOLS)/stringer -$(TOOLS)/stringer: PACKAGE=golang.org/x/tools/cmd/stringer - -PORTO = $(TOOLS)/porto -$(TOOLS)/porto: PACKAGE=github.com/jcchavezs/porto/cmd/porto - -GOTMPL = $(TOOLS)/gotmpl -$(GOTMPL): PACKAGE=go.opentelemetry.io/build-tools/gotmpl - -GORELEASE = $(TOOLS)/gorelease -$(GORELEASE): PACKAGE=golang.org/x/exp/cmd/gorelease - -GOVULNCHECK = $(TOOLS)/govulncheck -$(TOOLS)/govulncheck: PACKAGE=golang.org/x/vuln/cmd/govulncheck - -.PHONY: tools -tools: $(CROSSLINK) $(GOLANGCI_LINT) $(MISSPELL) $(GOCOVMERGE) $(STRINGER) $(PORTO) $(VERIFYREADMES) $(MULTIMOD) $(SEMCONVKIT) $(GOTMPL) $(GORELEASE) - -# Virtualized python tools via docker - -# The directory where the virtual environment is created. -VENVDIR := venv - -# The directory where the python tools are installed. -PYTOOLS := $(VENVDIR)/bin - -# The pip executable in the virtual environment. -PIP := $(PYTOOLS)/pip - -# The directory in the docker image where the current directory is mounted. -WORKDIR := /workdir - -# The python image to use for the virtual environment. -PYTHONIMAGE := $(shell awk '$$4=="python" {print $$2}' $(DEPENDENCIES_DOCKERFILE)) - -# Run the python image with the current directory mounted. -DOCKERPY := docker run --rm -u $(DOCKER_USER) -v "$(CURDIR):$(WORKDIR)" -w $(WORKDIR) $(PYTHONIMAGE) - -# Create a virtual environment for Python tools. -$(PYTOOLS): -# The `--upgrade` flag is needed to ensure that the virtual environment is -# created with the latest pip version. - @$(DOCKERPY) bash -c "python3 -m venv $(VENVDIR) && $(PIP) install --upgrade --cache-dir=$(WORKDIR)/.cache/pip pip" - -# Install python packages into the virtual environment. -$(PYTOOLS)/%: $(PYTOOLS) - @$(DOCKERPY) $(PIP) install --cache-dir=$(WORKDIR)/.cache/pip -r requirements.txt - -CODESPELL = $(PYTOOLS)/codespell -$(CODESPELL): PACKAGE=codespell - -# Generate - -.PHONY: generate -generate: go-generate vanity-import-fix - -.PHONY: go-generate -go-generate: $(OTEL_GO_MOD_DIRS:%=go-generate/%) -go-generate/%: DIR=$* -go-generate/%: $(STRINGER) $(GOTMPL) - @echo "$(GO) generate $(DIR)/..." \ - && cd $(DIR) \ - && PATH="$(TOOLS):$${PATH}" $(GO) generate ./... - -.PHONY: vanity-import-fix -vanity-import-fix: $(PORTO) - @$(PORTO) --include-internal -w . - -# Generate go.work file for local development. -.PHONY: go-work -go-work: $(CROSSLINK) - $(CROSSLINK) work --root=$(shell pwd) --go=1.22.7 - -# Build - -.PHONY: build - -build: $(OTEL_GO_MOD_DIRS:%=build/%) $(OTEL_GO_MOD_DIRS:%=build-tests/%) -build/%: DIR=$* -build/%: - @echo "$(GO) build $(DIR)/..." \ - && cd $(DIR) \ - && $(GO) build ./... - -build-tests/%: DIR=$* -build-tests/%: - @echo "$(GO) build tests $(DIR)/..." \ - && cd $(DIR) \ - && $(GO) list ./... \ - | grep -v third_party \ - | xargs $(GO) test -vet=off -run xxxxxMatchNothingxxxxx >/dev/null - -# Tests - -TEST_TARGETS := test-default test-bench test-short test-verbose test-race test-concurrent-safe test-fuzz -.PHONY: $(TEST_TARGETS) test -test-default test-race: ARGS=-race -test-bench: ARGS=-run=xxxxxMatchNothingxxxxx -test.benchtime=1ms -bench=. -test-short: ARGS=-short -test-fuzz: ARGS=-fuzztime=10s -fuzz -test-verbose: ARGS=-v -race -test-concurrent-safe: ARGS=-run=ConcurrentSafe -count=100 -race -test-concurrent-safe: TIMEOUT=120 -$(TEST_TARGETS): test -test: $(OTEL_GO_MOD_DIRS:%=test/%) -test/%: DIR=$* -test/%: - @echo "$(GO) test -timeout $(TIMEOUT)s $(ARGS) $(DIR)/..." \ - && cd $(DIR) \ - && $(GO) list ./... \ - | grep -v third_party \ - | xargs $(GO) test -timeout $(TIMEOUT)s $(ARGS) - -COVERAGE_MODE = atomic -COVERAGE_PROFILE = coverage.out -.PHONY: test-coverage -test-coverage: $(GOCOVMERGE) - @set -e; \ - printf "" > coverage.txt; \ - for dir in $(ALL_COVERAGE_MOD_DIRS); do \ - echo "$(GO) test -coverpkg=go.opentelemetry.io/otel/... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \ - (cd "$${dir}" && \ - $(GO) list ./... \ - | grep -v third_party \ - | grep -v 'semconv/v.*' \ - | xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \ - $(GO) tool cover -html=coverage.out -o coverage.html); \ - done; \ - $(GOCOVMERGE) $$(find . -name coverage.out) > coverage.txt - -.PHONY: benchmark -benchmark: $(OTEL_GO_MOD_DIRS:%=benchmark/%) -benchmark/%: - @echo "$(GO) test -run=xxxxxMatchNothingxxxxx -bench=. $*..." \ - && cd $* \ - && $(GO) list ./... \ - | grep -v third_party \ - | xargs $(GO) test -run=xxxxxMatchNothingxxxxx -bench=. - -.PHONY: golangci-lint golangci-lint-fix -golangci-lint-fix: ARGS=--fix -golangci-lint-fix: golangci-lint -golangci-lint: $(OTEL_GO_MOD_DIRS:%=golangci-lint/%) -golangci-lint/%: DIR=$* -golangci-lint/%: $(GOLANGCI_LINT) - @echo 'golangci-lint $(if $(ARGS),$(ARGS) ,)$(DIR)' \ - && cd $(DIR) \ - && $(GOLANGCI_LINT) run --allow-serial-runners $(ARGS) - -.PHONY: crosslink -crosslink: $(CROSSLINK) - @echo "Updating intra-repository dependencies in all go modules" \ - && $(CROSSLINK) --root=$(shell pwd) --prune - -.PHONY: go-mod-tidy -go-mod-tidy: $(ALL_GO_MOD_DIRS:%=go-mod-tidy/%) -go-mod-tidy/%: DIR=$* -go-mod-tidy/%: crosslink - @echo "$(GO) mod tidy in $(DIR)" \ - && cd $(DIR) \ - && $(GO) mod tidy -compat=1.21 - -.PHONY: lint -lint: misspell go-mod-tidy golangci-lint govulncheck - -.PHONY: vanity-import-check -vanity-import-check: $(PORTO) - @$(PORTO) --include-internal -l . || ( echo "(run: make vanity-import-fix)"; exit 1 ) - -.PHONY: misspell -misspell: $(MISSPELL) - @$(MISSPELL) -w $(ALL_DOCS) - -.PHONY: govulncheck -govulncheck: $(OTEL_GO_MOD_DIRS:%=govulncheck/%) -govulncheck/%: DIR=$* -govulncheck/%: $(GOVULNCHECK) - @echo "govulncheck ./... in $(DIR)" \ - && cd $(DIR) \ - && $(GOVULNCHECK) ./... - -.PHONY: codespell -codespell: $(CODESPELL) - @$(DOCKERPY) $(CODESPELL) - -.PHONY: toolchain-check -toolchain-check: - @toolchainRes=$$(for f in $(ALL_GO_MOD_DIRS); do \ - awk '/^toolchain/ { found=1; next } END { if (found) print FILENAME }' $$f/go.mod; \ - done); \ - if [ -n "$${toolchainRes}" ]; then \ - echo "toolchain checking failed:"; echo "$${toolchainRes}"; \ - exit 1; \ - fi - -.PHONY: license-check -license-check: - @licRes=$$(for f in $$(find . -type f \( -iname '*.go' -o -iname '*.sh' \) ! -path '**/third_party/*' ! -path './.git/*' ) ; do \ - awk '/Copyright The OpenTelemetry Authors|generated|GENERATED/ && NR<=4 { found=1; next } END { if (!found) print FILENAME }' $$f; \ - done); \ - if [ -n "$${licRes}" ]; then \ - echo "license header checking failed:"; echo "$${licRes}"; \ - exit 1; \ - fi - -.PHONY: check-clean-work-tree -check-clean-work-tree: - @if ! git diff --quiet; then \ - echo; \ - echo 'Working tree is not clean, did you forget to run "make precommit"?'; \ - echo; \ - git status; \ - exit 1; \ - fi - -# The weaver docker image to use for semconv-generate. -WEAVER_IMAGE := $(shell awk '$$4=="weaver" {print $$2}' $(DEPENDENCIES_DOCKERFILE)) - -SEMCONVPKG ?= "semconv/" -.PHONY: semconv-generate -semconv-generate: $(SEMCONVKIT) - [ "$(TAG)" ] || ( echo "TAG unset: missing opentelemetry semantic-conventions tag"; exit 1 ) - # Ensure the target directory for source code is available. - mkdir -p $(PWD)/$(SEMCONVPKG)/${TAG} - # Note: We mount a home directory for downloading/storing the semconv repository. - # Weaver will automatically clean the cache when finished, but the directories will remain. - mkdir -p ~/.weaver - docker run --rm \ - -u $(DOCKER_USER) \ - --env HOME=/tmp/weaver \ - --mount 'type=bind,source=$(PWD)/semconv/templates,target=/home/weaver/templates,readonly' \ - --mount 'type=bind,source=$(PWD)/semconv/${TAG},target=/home/weaver/target' \ - --mount 'type=bind,source=$(HOME)/.weaver,target=/tmp/weaver/.weaver' \ - $(WEAVER_IMAGE) registry generate \ - --registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/$(TAG).zip[model] \ - --templates=/home/weaver/templates \ - --param tag=$(TAG) \ - go \ - /home/weaver/target - $(SEMCONVKIT) -semconv "$(SEMCONVPKG)" -tag "$(TAG)" - -.PHONY: gorelease -gorelease: $(OTEL_GO_MOD_DIRS:%=gorelease/%) -gorelease/%: DIR=$* -gorelease/%:| $(GORELEASE) - @echo "gorelease in $(DIR):" \ - && cd $(DIR) \ - && $(GORELEASE) \ - || echo "" - -.PHONY: verify-mods -verify-mods: $(MULTIMOD) - $(MULTIMOD) verify - -.PHONY: prerelease -prerelease: verify-mods - @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) - $(MULTIMOD) prerelease -m ${MODSET} - -COMMIT ?= "HEAD" -.PHONY: add-tags -add-tags: verify-mods - @[ "${MODSET}" ] || ( echo ">> env var MODSET is not set"; exit 1 ) - $(MULTIMOD) tag -m ${MODSET} -c ${COMMIT} - -MARKDOWNIMAGE := $(shell awk '$$4=="markdown" {print $$2}' $(DEPENDENCIES_DOCKERFILE)) -.PHONY: lint-markdown -lint-markdown: - docker run --rm -u $(DOCKER_USER) -v "$(CURDIR):$(WORKDIR)" $(MARKDOWNIMAGE) -c $(WORKDIR)/.markdownlint.yaml $(WORKDIR)/**/*.md - -.PHONY: verify-readmes -verify-readmes: $(VERIFYREADMES) - $(VERIFYREADMES) diff --git a/vendor/go.opentelemetry.io/otel/README.md b/vendor/go.opentelemetry.io/otel/README.md deleted file mode 100644 index c633595431..0000000000 --- a/vendor/go.opentelemetry.io/otel/README.md +++ /dev/null @@ -1,115 +0,0 @@ -# OpenTelemetry-Go - -[![ci](https://github.com/open-telemetry/opentelemetry-go/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/open-telemetry/opentelemetry-go/actions/workflows/ci.yml) -[![codecov.io](https://codecov.io/gh/open-telemetry/opentelemetry-go/coverage.svg?branch=main)](https://app.codecov.io/gh/open-telemetry/opentelemetry-go?branch=main) -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel)](https://pkg.go.dev/go.opentelemetry.io/otel) -[![Go Report Card](https://goreportcard.com/badge/go.opentelemetry.io/otel)](https://goreportcard.com/report/go.opentelemetry.io/otel) -[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/open-telemetry/opentelemetry-go/badge)](https://scorecard.dev/viewer/?uri=github.com/open-telemetry/opentelemetry-go) -[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9996/badge)](https://www.bestpractices.dev/projects/9996) -[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/opentelemetry-go.svg)](https://issues.oss-fuzz.com/issues?q=project:opentelemetry-go) -[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go.svg?type=shield&issueType=license)](https://app.fossa.com/projects/custom%2B162%2Fgithub.com%2Fopen-telemetry%2Fopentelemetry-go?ref=badge_shield&issueType=license) -[![Slack](https://img.shields.io/badge/slack-@cncf/otel--go-brightgreen.svg?logo=slack)](https://cloud-native.slack.com/archives/C01NPAXACKT) - -OpenTelemetry-Go is the [Go](https://golang.org/) implementation of [OpenTelemetry](https://opentelemetry.io/). -It provides a set of APIs to directly measure performance and behavior of your software and send this data to observability platforms. - -## Project Status - -| Signal | Status | -|---------|--------------------| -| Traces | Stable | -| Metrics | Stable | -| Logs | Beta[^1] | - -Progress and status specific to this repository is tracked in our -[project boards](https://github.com/open-telemetry/opentelemetry-go/projects) -and -[milestones](https://github.com/open-telemetry/opentelemetry-go/milestones). - -Project versioning information and stability guarantees can be found in the -[versioning documentation](VERSIONING.md). - -[^1]: https://github.com/orgs/open-telemetry/projects/43 - -### Compatibility - -OpenTelemetry-Go ensures compatibility with the current supported versions of -the [Go language](https://golang.org/doc/devel/release#policy): - -> Each major Go release is supported until there are two newer major releases. -> For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. - -For versions of Go that are no longer supported upstream, opentelemetry-go will -stop ensuring compatibility with these versions in the following manner: - -- A minor release of opentelemetry-go will be made to add support for the new - supported release of Go. -- The following minor release of opentelemetry-go will remove compatibility - testing for the oldest (now archived upstream) version of Go. This, and - future, releases of opentelemetry-go may include features only supported by - the currently supported versions of Go. - -Currently, this project supports the following environments. - -| OS | Go Version | Architecture | -|----------|------------|--------------| -| Ubuntu | 1.25 | amd64 | -| Ubuntu | 1.24 | amd64 | -| Ubuntu | 1.25 | 386 | -| Ubuntu | 1.24 | 386 | -| Ubuntu | 1.25 | arm64 | -| Ubuntu | 1.24 | arm64 | -| macOS | 1.25 | amd64 | -| macOS | 1.24 | amd64 | -| macOS | 1.25 | arm64 | -| macOS | 1.24 | arm64 | -| Windows | 1.25 | amd64 | -| Windows | 1.24 | amd64 | -| Windows | 1.25 | 386 | -| Windows | 1.24 | 386 | - -While this project should work for other systems, no compatibility guarantees -are made for those systems currently. - -## Getting Started - -You can find a getting started guide on [opentelemetry.io](https://opentelemetry.io/docs/languages/go/getting-started/). - -OpenTelemetry's goal is to provide a single set of APIs to capture distributed -traces and metrics from your application and send them to an observability -platform. This project allows you to do just that for applications written in -Go. There are two steps to this process: instrument your application, and -configure an exporter. - -### Instrumentation - -To start capturing distributed traces and metric events from your application -it first needs to be instrumented. The easiest way to do this is by using an -instrumentation library for your code. Be sure to check out [the officially -supported instrumentation -libraries](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/instrumentation). - -If you need to extend the telemetry an instrumentation library provides or want -to build your own instrumentation for your application directly you will need -to use the -[Go otel](https://pkg.go.dev/go.opentelemetry.io/otel) -package. The [examples](https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/examples) -are a good way to see some practical uses of this process. - -### Export - -Now that your application is instrumented to collect telemetry, it needs an -export pipeline to send that telemetry to an observability platform. - -All officially supported exporters for the OpenTelemetry project are contained in the [exporters directory](./exporters). - -| Exporter | Logs | Metrics | Traces | -|---------------------------------------|:----:|:-------:|:------:| -| [OTLP](./exporters/otlp/) | ✓ | ✓ | ✓ | -| [Prometheus](./exporters/prometheus/) | | ✓ | | -| [stdout](./exporters/stdout/) | ✓ | ✓ | ✓ | -| [Zipkin](./exporters/zipkin/) | | | ✓ | - -## Contributing - -See the [contributing documentation](CONTRIBUTING.md). diff --git a/vendor/go.opentelemetry.io/otel/RELEASING.md b/vendor/go.opentelemetry.io/otel/RELEASING.md deleted file mode 100644 index 861756fd74..0000000000 --- a/vendor/go.opentelemetry.io/otel/RELEASING.md +++ /dev/null @@ -1,181 +0,0 @@ -# Release Process - -## Create a `Version Release` issue - -Create a `Version Release` issue to track the release process. - -## Semantic Convention Generation - -New versions of the [OpenTelemetry Semantic Conventions] mean new versions of the `semconv` package need to be generated. -The `semconv-generate` make target is used for this. - -1. Set the `TAG` environment variable to the semantic convention tag you want to generate. -2. Run the `make semconv-generate ...` target from this repository. - -For example, - -```sh -export TAG="v1.30.0" # Change to the release version you are generating. -make semconv-generate # Uses the exported TAG. -``` - -This should create a new sub-package of [`semconv`](./semconv). -Ensure things look correct before submitting a pull request to include the addition. - -## Breaking changes validation - -You can run `make gorelease` which runs [gorelease](https://pkg.go.dev/golang.org/x/exp/cmd/gorelease) to ensure that there are no unwanted changes made in the public API. - -You can check/report problems with `gorelease` [here](https://golang.org/issues/26420). - -## Verify changes for contrib repository - -If the changes in the main repository are going to affect the contrib repository, it is important to verify that the changes are compatible with the contrib repository. - -Follow [the steps](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md#verify-otel-changes) in the contrib repository to verify OTel changes. - -## Pre-Release - -First, decide which module sets will be released and update their versions -in `versions.yaml`. Commit this change to a new branch. - -Update go.mod for submodules to depend on the new release which will happen in the next step. - -1. Run the `prerelease` make target. It creates a branch - `prerelease__` that will contain all release changes. - - ``` - make prerelease MODSET= - ``` - -2. Verify the changes. - - ``` - git diff ...prerelease__ - ``` - - This should have changed the version for all modules to be ``. - If these changes look correct, merge them into your pre-release branch: - - ```go - git merge prerelease__ - ``` - -3. Update the [Changelog](./CHANGELOG.md). - - Make sure all relevant changes for this release are included and are written in language that non-contributors to the project can understand. - To verify this, you can look directly at the commits since the ``. - - ``` - git --no-pager log --pretty=oneline "..HEAD" - ``` - - - Move all the `Unreleased` changes into a new section following the title scheme (`[] - `). - - Make sure the new section is under the comment for released section, like ``, so it is protected from being overwritten in the future. - - Update all the appropriate links at the bottom. - -4. Push the changes to upstream and create a Pull Request on GitHub. - Be sure to include the curated changes from the [Changelog](./CHANGELOG.md) in the description. - -## Tag - -Once the Pull Request with all the version changes has been approved and merged it is time to tag the merged commit. - -***IMPORTANT***: It is critical you use the same tag that you used in the Pre-Release step! -Failure to do so will leave things in a broken state. As long as you do not -change `versions.yaml` between pre-release and this step, things should be fine. - -***IMPORTANT***: [There is currently no way to remove an incorrectly tagged version of a Go module](https://github.com/golang/go/issues/34189). -It is critical you make sure the version you push upstream is correct. -[Failure to do so will lead to minor emergencies and tough to work around](https://github.com/open-telemetry/opentelemetry-go/issues/331). - -1. For each module set that will be released, run the `add-tags` make target - using the `` of the commit on the main branch for the merged Pull Request. - - ``` - make add-tags MODSET= COMMIT= - ``` - - It should only be necessary to provide an explicit `COMMIT` value if the - current `HEAD` of your working directory is not the correct commit. - -2. Push tags to the upstream remote (not your fork: `github.com/open-telemetry/opentelemetry-go.git`). - Make sure you push all sub-modules as well. - - ``` - git push upstream - git push upstream - ... - ``` - -## Sign artifacts - -To ensure we comply with CNCF best practices, we need to sign the release artifacts. - -Download the `.tar.gz` and `.zip` archives from the [tags page](https://github.com/open-telemetry/opentelemetry-go/tags) for the new release tag. -Both archives need to be signed with your GPG key. - -You can use [this script] to verify the contents of the archives before signing them. - -To find your GPG key ID, run: - -```terminal -gpg --list-secret-keys --keyid-format=long -``` - -The key ID is the 16-character string after `sec rsa4096/` (or similar). - -Set environment variables and sign both artifacts: - -```terminal -export VERSION="" # e.g., v1.32.0 -export KEY_ID="" - -gpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.tar.gz -gpg --local-user $KEY_ID --armor --detach-sign opentelemetry-go-$VERSION.zip -``` - -You can verify the signatures with: - -```terminal -gpg --verify opentelemetry-go-$VERSION.tar.gz.asc opentelemetry-go-$VERSION.tar.gz -gpg --verify opentelemetry-go-$VERSION.zip.asc opentelemetry-go-$VERSION.zip -``` - -[this script]: https://github.com/MrAlias/attest-sh - -## Release - -Finally create a Release for the new `` on GitHub. -The release body should include all the release notes from the Changelog for this release. - -***IMPORTANT***: GitHub Releases are immutable once created. -You must upload the signed artifacts (`.tar.gz`, `.tar.gz.asc`, `.zip`, and `.zip.asc`) when creating the release, as they cannot be added or modified later. - -## Post-Release - -### Contrib Repository - -Once verified be sure to [make a release for the `contrib` repository](https://github.com/open-telemetry/opentelemetry-go-contrib/blob/main/RELEASING.md) that uses this release. - -### Website Documentation - -Update the [Go instrumentation documentation] in the OpenTelemetry website under [content/en/docs/languages/go]. -Importantly, bump any package versions referenced to be the latest one you just released and ensure all code examples still compile and are accurate. - -[OpenTelemetry Semantic Conventions]: https://github.com/open-telemetry/semantic-conventions -[Go instrumentation documentation]: https://opentelemetry.io/docs/languages/go/ -[content/en/docs/languages/go]: https://github.com/open-telemetry/opentelemetry.io/tree/main/content/en/docs/languages/go - -### Close the milestone - -Once a release is made, ensure all issues that were fixed and PRs that were merged as part of this release are added to the corresponding milestone. -This helps track what changes were included in each release. - -- To find issues that haven't been included in a milestone, use this [GitHub search query](https://github.com/open-telemetry/opentelemetry-go/issues?q=is%3Aissue%20no%3Amilestone%20is%3Aclosed%20sort%3Aupdated-desc%20reason%3Acompleted%20-label%3AStale%20linked%3Apr) -- To find merged PRs that haven't been included in a milestone, use this [GitHub search query](https://github.com/open-telemetry/opentelemetry-go/pulls?q=is%3Apr+no%3Amilestone+is%3Amerged). - -Once all related issues and PRs have been added to the milestone, close the milestone. - -### Close the `Version Release` issue - -Once the todo list in the `Version Release` issue is complete, close the issue. diff --git a/vendor/go.opentelemetry.io/otel/SECURITY-INSIGHTS.yml b/vendor/go.opentelemetry.io/otel/SECURITY-INSIGHTS.yml deleted file mode 100644 index 8041fc62e4..0000000000 --- a/vendor/go.opentelemetry.io/otel/SECURITY-INSIGHTS.yml +++ /dev/null @@ -1,203 +0,0 @@ -header: - schema-version: "1.0.0" - expiration-date: "2026-08-04T00:00:00.000Z" - last-updated: "2025-08-04" - last-reviewed: "2025-08-04" - commit-hash: 69e81088ad40f45a0764597326722dea8f3f00a8 - project-url: https://github.com/open-telemetry/opentelemetry-go - project-release: "v1.37.0" - changelog: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CHANGELOG.md - license: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/LICENSE - -project-lifecycle: - status: active - bug-fixes-only: false - core-maintainers: - - https://github.com/dmathieu - - https://github.com/dashpole - - https://github.com/pellared - - https://github.com/XSAM - - https://github.com/MrAlias - release-process: | - See https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/RELEASING.md - -contribution-policy: - accepts-pull-requests: true - accepts-automated-pull-requests: true - automated-tools-list: - - automated-tool: dependabot - action: allowed - comment: Automated dependency updates are accepted. - - automated-tool: renovatebot - action: allowed - comment: Automated dependency updates are accepted. - - automated-tool: opentelemetrybot - action: allowed - comment: Automated OpenTelemetry actions are accepted. - contributing-policy: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md - code-of-conduct: https://github.com/open-telemetry/.github/blob/ffa15f76b65ec7bcc41f6a0b277edbb74f832206/CODE_OF_CONDUCT.md - -documentation: - - https://pkg.go.dev/go.opentelemetry.io/otel - - https://opentelemetry.io/docs/instrumentation/go/ - -distribution-points: - - pkg:golang/go.opentelemetry.io/otel - - pkg:golang/go.opentelemetry.io/otel/bridge/opencensus - - pkg:golang/go.opentelemetry.io/otel/bridge/opencensus/test - - pkg:golang/go.opentelemetry.io/otel/bridge/opentracing - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp - - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdoutmetric - - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdouttrace - - pkg:golang/go.opentelemetry.io/otel/exporters/zipkin - - pkg:golang/go.opentelemetry.io/otel/metric - - pkg:golang/go.opentelemetry.io/otel/sdk - - pkg:golang/go.opentelemetry.io/otel/sdk/metric - - pkg:golang/go.opentelemetry.io/otel/trace - - pkg:golang/go.opentelemetry.io/otel/exporters/prometheus - - pkg:golang/go.opentelemetry.io/otel/log - - pkg:golang/go.opentelemetry.io/otel/log/logtest - - pkg:golang/go.opentelemetry.io/otel/sdk/log - - pkg:golang/go.opentelemetry.io/otel/sdk/log/logtest - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc - - pkg:golang/go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - - pkg:golang/go.opentelemetry.io/otel/exporters/stdout/stdoutlog - - pkg:golang/go.opentelemetry.io/otel/schema - -security-artifacts: - threat-model: - threat-model-created: false - comment: | - No formal threat model created yet. - self-assessment: - self-assessment-created: false - comment: | - No formal self-assessment yet. - -security-testing: - - tool-type: sca - tool-name: Dependabot - tool-version: latest - tool-url: https://github.com/dependabot - tool-rulesets: - - built-in - integration: - ad-hoc: false - ci: true - before-release: true - comment: | - Automated dependency updates. - - tool-type: sast - tool-name: golangci-lint - tool-version: latest - tool-url: https://github.com/golangci/golangci-lint - tool-rulesets: - - built-in - integration: - ad-hoc: false - ci: true - before-release: true - comment: | - Static analysis in CI. - - tool-type: fuzzing - tool-name: OSS-Fuzz - tool-version: latest - tool-url: https://github.com/google/oss-fuzz - tool-rulesets: - - default - integration: - ad-hoc: false - ci: false - before-release: false - comment: | - OpenTelemetry Go is integrated with OSS-Fuzz for continuous fuzz testing. See https://github.com/google/oss-fuzz/tree/f0f9b221190c6063a773bea606d192ebfc3d00cf/projects/opentelemetry-go for more details. - - tool-type: sast - tool-name: CodeQL - tool-version: latest - tool-url: https://github.com/github/codeql - tool-rulesets: - - default - integration: - ad-hoc: false - ci: true - before-release: true - comment: | - CodeQL static analysis is run in CI for all commits and pull requests to detect security vulnerabilities in the Go source code. See https://github.com/open-telemetry/opentelemetry-go/blob/d5b5b059849720144a03ca5c87561bfbdb940119/.github/workflows/codeql-analysis.yml for workflow details. - - tool-type: sca - tool-name: govulncheck - tool-version: latest - tool-url: https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck - tool-rulesets: - - default - integration: - ad-hoc: false - ci: true - before-release: true - comment: | - govulncheck is run in CI to detect known vulnerabilities in Go modules and code paths. See https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/.github/workflows/ci.yml for workflow configuration. - -security-assessments: - - auditor-name: 7ASecurity - auditor-url: https://7asecurity.com - auditor-report: https://7asecurity.com/reports/pentest-report-opentelemetry.pdf - report-year: 2023 - comment: | - This independent penetration test by 7ASecurity covered OpenTelemetry repositories including opentelemetry-go. The assessment focused on codebase review, threat modeling, and vulnerability identification. See the report for details of findings and recommendations applicable to opentelemetry-go. No critical vulnerabilities were found for this repository. - -security-contacts: - - type: email - value: cncf-opentelemetry-security@lists.cncf.io - primary: true - - type: website - value: https://github.com/open-telemetry/opentelemetry-go/security/policy - primary: false - -vulnerability-reporting: - accepts-vulnerability-reports: true - email-contact: cncf-opentelemetry-security@lists.cncf.io - security-policy: https://github.com/open-telemetry/opentelemetry-go/security/policy - comment: | - Security issues should be reported via email or GitHub security policy page. - -dependencies: - third-party-packages: true - dependencies-lists: - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opencensus/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opencensus/test/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/bridge/opentracing/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlplog/otlploggrpc/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlplog/otlploghttp/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlpmetric/otlpmetricgrpc/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlpmetric/otlpmetrichttp/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/otlptracegrpc/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/otlp/otlptrace/otlptracehttp/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/prometheus/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdoutlog/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdoutmetric/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/stdout/stdouttrace/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/exporters/zipkin/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/internal/tools/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/log/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/log/logtest/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/metric/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/schema/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/log/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/log/logtest/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/sdk/metric/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/trace/go.mod - - https://github.com/open-telemetry/opentelemetry-go/blob/v1.37.0/trace/internal/telemetry/test/go.mod - dependencies-lifecycle: - policy-url: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md - comment: | - Dependency lifecycle managed via go.mod and renovatebot. - env-dependencies-policy: - policy-url: https://github.com/open-telemetry/opentelemetry-go/blob/69e81088ad40f45a0764597326722dea8f3f00a8/CONTRIBUTING.md - comment: | - See contributing policy for environment usage. diff --git a/vendor/go.opentelemetry.io/otel/VERSIONING.md b/vendor/go.opentelemetry.io/otel/VERSIONING.md deleted file mode 100644 index b27c9e84f5..0000000000 --- a/vendor/go.opentelemetry.io/otel/VERSIONING.md +++ /dev/null @@ -1,224 +0,0 @@ -# Versioning - -This document describes the versioning policy for this repository. This policy -is designed so the following goals can be achieved. - -**Users are provided a codebase of value that is stable and secure.** - -## Policy - -* Versioning of this project will be idiomatic of a Go project using [Go - modules](https://github.com/golang/go/wiki/Modules). - * [Semantic import - versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) - will be used. - * Versions will comply with [semver - 2.0](https://semver.org/spec/v2.0.0.html) with the following exceptions. - * New methods may be added to exported API interfaces. All exported - interfaces that fall within this exception will include the following - paragraph in their public documentation. - - > Warning: methods may be added to this interface in minor releases. - - * If a module is version `v2` or higher, the major version of the module - must be included as a `/vN` at the end of the module paths used in - `go.mod` files (e.g., `module go.opentelemetry.io/otel/v2`, `require - go.opentelemetry.io/otel/v2 v2.0.1`) and in the package import path - (e.g., `import "go.opentelemetry.io/otel/v2/trace"`). This includes the - paths used in `go get` commands (e.g., `go get - go.opentelemetry.io/otel/v2@v2.0.1`). Note there is both a `/v2` and a - `@v2.0.1` in that example. One way to think about it is that the module - name now includes the `/v2`, so include `/v2` whenever you are using the - module name). - * If a module is version `v0` or `v1`, do not include the major version in - either the module path or the import path. - * Modules will be used to encapsulate signals and components. - * Experimental modules still under active development will be versioned at - `v0` to imply the stability guarantee defined by - [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). - - > Major version zero (0.y.z) is for initial development. Anything MAY - > change at any time. The public API SHOULD NOT be considered stable. - - * Mature modules for which we guarantee a stable public API will be versioned - with a major version greater than `v0`. - * The decision to make a module stable will be made on a case-by-case - basis by the maintainers of this project. - * Experimental modules will start their versioning at `v0.0.0` and will - increment their minor version when backwards incompatible changes are - released and increment their patch version when backwards compatible - changes are released. - * All stable modules that use the same major version number will use the - same entire version number. - * Stable modules may be released with an incremented minor or patch - version even though that module has not been changed, but rather so - that it will remain at the same version as other stable modules that - did undergo change. - * When an experimental module becomes stable a new stable module version - will be released and will include this now stable module. The new - stable module version will be an increment of the minor version number - and will be applied to all existing stable modules as well as the newly - stable module being released. -* Versioning of the associated [contrib - repository](https://github.com/open-telemetry/opentelemetry-go-contrib) of - this project will be idiomatic of a Go project using [Go - modules](https://github.com/golang/go/wiki/Modules). - * [Semantic import - versioning](https://github.com/golang/go/wiki/Modules#semantic-import-versioning) - will be used. - * Versions will comply with [semver 2.0](https://semver.org/spec/v2.0.0.html). - * If a module is version `v2` or higher, the - major version of the module must be included as a `/vN` at the end of the - module paths used in `go.mod` files (e.g., `module - go.opentelemetry.io/contrib/instrumentation/host/v2`, `require - go.opentelemetry.io/contrib/instrumentation/host/v2 v2.0.1`) and in the - package import path (e.g., `import - "go.opentelemetry.io/contrib/instrumentation/host/v2"`). This includes - the paths used in `go get` commands (e.g., `go get - go.opentelemetry.io/contrib/instrumentation/host/v2@v2.0.1`. Note there - is both a `/v2` and a `@v2.0.1` in that example. One way to think about - it is that the module name now includes the `/v2`, so include `/v2` - whenever you are using the module name). - * If a module is version `v0` or `v1`, do not include the major version - in either the module path or the import path. - * In addition to public APIs, telemetry produced by stable instrumentation - will remain stable and backwards compatible. This is to avoid breaking - alerts and dashboards. - * Modules will be used to encapsulate instrumentation, detectors, exporters, - propagators, and any other independent sets of related components. - * Experimental modules still under active development will be versioned at - `v0` to imply the stability guarantee defined by - [semver](https://semver.org/spec/v2.0.0.html#spec-item-4). - - > Major version zero (0.y.z) is for initial development. Anything MAY - > change at any time. The public API SHOULD NOT be considered stable. - - * Mature modules for which we guarantee a stable public API and telemetry will - be versioned with a major version greater than `v0`. - * Experimental modules will start their versioning at `v0.0.0` and will - increment their minor version when backwards incompatible changes are - released and increment their patch version when backwards compatible - changes are released. - * Stable contrib modules cannot depend on experimental modules from this - project. - * All stable contrib modules of the same major version with this project - will use the same entire version as this project. - * Stable modules may be released with an incremented minor or patch - version even though that module's code has not been changed. Instead - the only change that will have been included is to have updated that - modules dependency on this project's stable APIs. - * When an experimental module in contrib becomes stable a new stable - module version will be released and will include this now stable - module. The new stable module version will be an increment of the minor - version number and will be applied to all existing stable contrib - modules, this project's modules, and the newly stable module being - released. - * Contrib modules will be kept up to date with this project's releases. - * Due to the dependency contrib modules will implicitly have on this - project's modules the release of stable contrib modules to match the - released version number will be staggered after this project's release. - There is no explicit time guarantee for how long after this projects - release the contrib release will be. Effort should be made to keep them - as close in time as possible. - * No additional stable release in this project can be made until the - contrib repository has a matching stable release. - * No release can be made in the contrib repository after this project's - stable release except for a stable release of the contrib repository. -* GitHub releases will be made for all releases. -* Go modules will be made available at Go package mirrors. - -## Example Versioning Lifecycle - -To better understand the implementation of the above policy the following -example is provided. This project is simplified to include only the following -modules and their versions: - -* `otel`: `v0.14.0` -* `otel/trace`: `v0.14.0` -* `otel/metric`: `v0.14.0` -* `otel/baggage`: `v0.14.0` -* `otel/sdk/trace`: `v0.14.0` -* `otel/sdk/metric`: `v0.14.0` - -These modules have been developed to a point where the `otel/trace`, -`otel/baggage`, and `otel/sdk/trace` modules have reached a point that they -should be considered for a stable release. The `otel/metric` and -`otel/sdk/metric` are still under active development and the `otel` module -depends on both `otel/trace` and `otel/metric`. - -The `otel` package is refactored to remove its dependencies on `otel/metric` so -it can be released as stable as well. With that done the following release -candidates are made: - -* `otel`: `v1.0.0-RC1` -* `otel/trace`: `v1.0.0-RC1` -* `otel/baggage`: `v1.0.0-RC1` -* `otel/sdk/trace`: `v1.0.0-RC1` - -The `otel/metric` and `otel/sdk/metric` modules remain at `v0.14.0`. - -A few minor issues are discovered in the `otel/trace` package. These issues are -resolved with some minor, but backwards incompatible, changes and are released -as a second release candidate: - -* `otel`: `v1.0.0-RC2` -* `otel/trace`: `v1.0.0-RC2` -* `otel/baggage`: `v1.0.0-RC2` -* `otel/sdk/trace`: `v1.0.0-RC2` - -Notice that all module version numbers are incremented to adhere to our -versioning policy. - -After these release candidates have been evaluated to satisfaction, they are -released as version `v1.0.0`. - -* `otel`: `v1.0.0` -* `otel/trace`: `v1.0.0` -* `otel/baggage`: `v1.0.0` -* `otel/sdk/trace`: `v1.0.0` - -Since both the `go` utility and the Go module system support [the semantic -versioning definition of -precedence](https://semver.org/spec/v2.0.0.html#spec-item-11), this release -will correctly be interpreted as the successor to the previous release -candidates. - -Active development of this project continues. The `otel/metric` module now has -backwards incompatible changes to its API that need to be released and the -`otel/baggage` module has a minor bug fix that needs to be released. The -following release is made: - -* `otel`: `v1.0.1` -* `otel/trace`: `v1.0.1` -* `otel/metric`: `v0.15.0` -* `otel/baggage`: `v1.0.1` -* `otel/sdk/trace`: `v1.0.1` -* `otel/sdk/metric`: `v0.15.0` - -Notice that, again, all stable module versions are incremented in unison and -the `otel/sdk/metric` package, which depends on the `otel/metric` package, also -bumped its version. This bump of the `otel/sdk/metric` package makes sense -given their coupling, though it is not explicitly required by our versioning -policy. - -As we progress, the `otel/metric` and `otel/sdk/metric` packages have reached a -point where they should be evaluated for stability. The `otel` module is -reintegrated with the `otel/metric` package and the following release is made: - -* `otel`: `v1.1.0-RC1` -* `otel/trace`: `v1.1.0-RC1` -* `otel/metric`: `v1.1.0-RC1` -* `otel/baggage`: `v1.1.0-RC1` -* `otel/sdk/trace`: `v1.1.0-RC1` -* `otel/sdk/metric`: `v1.1.0-RC1` - -All the modules are evaluated and determined to a viable stable release. They -are then released as version `v1.1.0` (the minor version is incremented to -indicate the addition of new signal). - -* `otel`: `v1.1.0` -* `otel/trace`: `v1.1.0` -* `otel/metric`: `v1.1.0` -* `otel/baggage`: `v1.1.0` -* `otel/sdk/trace`: `v1.1.0` -* `otel/sdk/metric`: `v1.1.0` diff --git a/vendor/go.opentelemetry.io/otel/attribute/README.md b/vendor/go.opentelemetry.io/otel/attribute/README.md deleted file mode 100644 index 5b3da8f14c..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Attribute - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/attribute)](https://pkg.go.dev/go.opentelemetry.io/otel/attribute) diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go deleted file mode 100644 index eef51ebc2a..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/doc.go +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package attribute provides key and value attributes. -package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go deleted file mode 100644 index 6cc1a1655c..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "bytes" - "sync" - "sync/atomic" -) - -type ( - // Encoder is a mechanism for serializing an attribute set into a specific - // string representation that supports caching, to avoid repeated - // serialization. An example could be an exporter encoding the attribute - // set into a wire representation. - Encoder interface { - // Encode returns the serialized encoding of the attribute set using - // its Iterator. This result may be cached by an attribute.Set. - Encode(iterator Iterator) string - - // ID returns a value that is unique for each class of attribute - // encoder. Attribute encoders allocate these using `NewEncoderID`. - ID() EncoderID - } - - // EncoderID is used to identify distinct Encoder - // implementations, for caching encoded results. - EncoderID struct { - value uint64 - } - - // defaultAttrEncoder uses a sync.Pool of buffers to reduce the number of - // allocations used in encoding attributes. This implementation encodes a - // comma-separated list of key=value, with '/'-escaping of '=', ',', and - // '\'. - defaultAttrEncoder struct { - // pool is a pool of attribute set builders. The buffers in this pool - // grow to a size that most attribute encodings will not allocate new - // memory. - pool sync.Pool // *bytes.Buffer - } -) - -// escapeChar is used to ensure uniqueness of the attribute encoding where -// keys or values contain either '=' or ','. Since there is no parser needed -// for this encoding and its only requirement is to be unique, this choice is -// arbitrary. Users will see these in some exporters (e.g., stdout), so the -// backslash ('\') is used as a conventional choice. -const escapeChar = '\\' - -var ( - _ Encoder = &defaultAttrEncoder{} - - // encoderIDCounter is for generating IDs for other attribute encoders. - encoderIDCounter uint64 - - defaultEncoderOnce sync.Once - defaultEncoderID = NewEncoderID() - defaultEncoderInstance *defaultAttrEncoder -) - -// NewEncoderID returns a unique attribute encoder ID. It should be called -// once per each type of attribute encoder. Preferably in init() or in var -// definition. -func NewEncoderID() EncoderID { - return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} -} - -// DefaultEncoder returns an attribute encoder that encodes attributes in such -// a way that each escaped attribute's key is followed by an equal sign and -// then by an escaped attribute's value. All key-value pairs are separated by -// a comma. -// -// Escaping is done by prepending a backslash before either a backslash, equal -// sign or a comma. -func DefaultEncoder() Encoder { - defaultEncoderOnce.Do(func() { - defaultEncoderInstance = &defaultAttrEncoder{ - pool: sync.Pool{ - New: func() any { - return &bytes.Buffer{} - }, - }, - } - }) - return defaultEncoderInstance -} - -// Encode is a part of an implementation of the AttributeEncoder interface. -func (d *defaultAttrEncoder) Encode(iter Iterator) string { - buf := d.pool.Get().(*bytes.Buffer) - defer d.pool.Put(buf) - buf.Reset() - - for iter.Next() { - i, keyValue := iter.IndexedAttribute() - if i > 0 { - _ = buf.WriteByte(',') - } - copyAndEscape(buf, string(keyValue.Key)) - - _ = buf.WriteByte('=') - - if keyValue.Value.Type() == STRING { - copyAndEscape(buf, keyValue.Value.AsString()) - } else { - _, _ = buf.WriteString(keyValue.Value.Emit()) - } - } - return buf.String() -} - -// ID is a part of an implementation of the AttributeEncoder interface. -func (*defaultAttrEncoder) ID() EncoderID { - return defaultEncoderID -} - -// copyAndEscape escapes `=`, `,` and its own escape character (`\`), -// making the default encoding unique. -func copyAndEscape(buf *bytes.Buffer, val string) { - for _, ch := range val { - switch ch { - case '=', ',', escapeChar: - _ = buf.WriteByte(escapeChar) - } - _, _ = buf.WriteRune(ch) - } -} - -// Valid reports whether this encoder ID was allocated by -// [NewEncoderID]. Invalid encoder IDs will not be cached. -func (id EncoderID) Valid() bool { - return id.value != 0 -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/filter.go b/vendor/go.opentelemetry.io/otel/attribute/filter.go deleted file mode 100644 index 624ebbe381..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/filter.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Filter supports removing certain attributes from attribute sets. When -// the filter returns true, the attribute will be kept in the filtered -// attribute set. When the filter returns false, the attribute is excluded -// from the filtered attribute set, and the attribute instead appears in -// the removed list of excluded attributes. -type Filter func(KeyValue) bool - -// NewAllowKeysFilter returns a Filter that only allows attributes with one of -// the provided keys. -// -// If keys is empty a deny-all filter is returned. -func NewAllowKeysFilter(keys ...Key) Filter { - if len(keys) == 0 { - return func(KeyValue) bool { return false } - } - - allowed := make(map[Key]struct{}, len(keys)) - for _, k := range keys { - allowed[k] = struct{}{} - } - return func(kv KeyValue) bool { - _, ok := allowed[kv.Key] - return ok - } -} - -// NewDenyKeysFilter returns a Filter that only allows attributes -// that do not have one of the provided keys. -// -// If keys is empty an allow-all filter is returned. -func NewDenyKeysFilter(keys ...Key) Filter { - if len(keys) == 0 { - return func(KeyValue) bool { return true } - } - - forbid := make(map[Key]struct{}, len(keys)) - for _, k := range keys { - forbid[k] = struct{}{} - } - return func(kv KeyValue) bool { - _, ok := forbid[kv.Key] - return !ok - } -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/hash.go b/vendor/go.opentelemetry.io/otel/attribute/hash.go deleted file mode 100644 index 6aa69aeaec..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/hash.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "fmt" - "reflect" - - "go.opentelemetry.io/otel/attribute/internal/xxhash" -) - -// Type identifiers. These identifiers are hashed before the value of the -// corresponding type. This is done to distinguish values that are hashed with -// the same value representation (e.g. `int64(1)` and `true`, []int64{0} and -// int64(0)). -// -// These are all 8 byte length strings converted to a uint64 representation. A -// uint64 is used instead of the string directly as an optimization, it avoids -// the for loop in [xxhash] which adds minor overhead. -const ( - boolID uint64 = 7953749933313450591 // "_boolean" (little endian) - int64ID uint64 = 7592915492740740150 // "64_bit_i" (little endian) - float64ID uint64 = 7376742710626956342 // "64_bit_f" (little endian) - stringID uint64 = 6874584755375207263 // "_string_" (little endian) - boolSliceID uint64 = 6875993255270243167 // "_[]bool_" (little endian) - int64SliceID uint64 = 3762322556277578591 // "_[]int64" (little endian) - float64SliceID uint64 = 7308324551835016539 // "[]double" (little endian) - stringSliceID uint64 = 7453010373645655387 // "[]string" (little endian) -) - -// hashKVs returns a new xxHash64 hash of kvs. -func hashKVs(kvs []KeyValue) uint64 { - h := xxhash.New() - for _, kv := range kvs { - h = hashKV(h, kv) - } - return h.Sum64() -} - -// hashKV returns the xxHash64 hash of kv with h as the base. -func hashKV(h xxhash.Hash, kv KeyValue) xxhash.Hash { - h = h.String(string(kv.Key)) - - switch kv.Value.Type() { - case BOOL: - h = h.Uint64(boolID) - h = h.Uint64(kv.Value.numeric) - case INT64: - h = h.Uint64(int64ID) - h = h.Uint64(kv.Value.numeric) - case FLOAT64: - h = h.Uint64(float64ID) - // Assumes numeric stored with math.Float64bits. - h = h.Uint64(kv.Value.numeric) - case STRING: - h = h.Uint64(stringID) - h = h.String(kv.Value.stringly) - case BOOLSLICE: - h = h.Uint64(boolSliceID) - rv := reflect.ValueOf(kv.Value.slice) - for i := 0; i < rv.Len(); i++ { - h = h.Bool(rv.Index(i).Bool()) - } - case INT64SLICE: - h = h.Uint64(int64SliceID) - rv := reflect.ValueOf(kv.Value.slice) - for i := 0; i < rv.Len(); i++ { - h = h.Int64(rv.Index(i).Int()) - } - case FLOAT64SLICE: - h = h.Uint64(float64SliceID) - rv := reflect.ValueOf(kv.Value.slice) - for i := 0; i < rv.Len(); i++ { - h = h.Float64(rv.Index(i).Float()) - } - case STRINGSLICE: - h = h.Uint64(stringSliceID) - rv := reflect.ValueOf(kv.Value.slice) - for i := 0; i < rv.Len(); i++ { - h = h.String(rv.Index(i).String()) - } - case INVALID: - default: - // Logging is an alternative, but using the internal logger here - // causes an import cycle so it is not done. - v := kv.Value.AsInterface() - msg := fmt.Sprintf("unknown value type: %[1]v (%[1]T)", v) - panic(msg) - } - return h -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go b/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go deleted file mode 100644 index 0875504302..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/internal/attribute.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package attribute provide several helper functions for some commonly used -logic of processing attributes. -*/ -package attribute // import "go.opentelemetry.io/otel/attribute/internal" - -import ( - "reflect" -) - -// BoolSliceValue converts a bool slice into an array with same elements as slice. -func BoolSliceValue(v []bool) any { - var zero bool - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// Int64SliceValue converts an int64 slice into an array with same elements as slice. -func Int64SliceValue(v []int64) any { - var zero int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// Float64SliceValue converts a float64 slice into an array with same elements as slice. -func Float64SliceValue(v []float64) any { - var zero float64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// StringSliceValue converts a string slice into an array with same elements as slice. -func StringSliceValue(v []string) any { - var zero string - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(zero))).Elem() - reflect.Copy(cp, reflect.ValueOf(v)) - return cp.Interface() -} - -// AsBoolSlice converts a bool array into a slice into with same elements as array. -func AsBoolSlice(v any) []bool { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]bool, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsInt64Slice converts an int64 array into a slice into with same elements as array. -func AsInt64Slice(v any) []int64 { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]int64, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsFloat64Slice converts a float64 array into a slice into with same elements as array. -func AsFloat64Slice(v any) []float64 { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]float64, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} - -// AsStringSlice converts a string array into a slice into with same elements as array. -func AsStringSlice(v any) []string { - rv := reflect.ValueOf(v) - if rv.Type().Kind() != reflect.Array { - return nil - } - cpy := make([]string, rv.Len()) - if len(cpy) > 0 { - _ = reflect.Copy(reflect.ValueOf(cpy), rv) - } - return cpy -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go b/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go deleted file mode 100644 index 113a978383..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/internal/xxhash/xxhash.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package xxhash provides a wrapper around the xxhash library for attribute hashing. -package xxhash // import "go.opentelemetry.io/otel/attribute/internal/xxhash" - -import ( - "encoding/binary" - "math" - - "github.com/cespare/xxhash/v2" -) - -// Hash wraps xxhash.Digest to provide an API friendly for hashing attribute values. -type Hash struct { - d *xxhash.Digest -} - -// New returns a new initialized xxHash64 hasher. -func New() Hash { - return Hash{d: xxhash.New()} -} - -func (h Hash) Uint64(val uint64) Hash { - var buf [8]byte - binary.LittleEndian.PutUint64(buf[:], val) - // errors from Write are always nil for xxhash - // if it returns an err then panic - _, err := h.d.Write(buf[:]) - if err != nil { - panic("xxhash write of uint64 failed: " + err.Error()) - } - return h -} - -func (h Hash) Bool(val bool) Hash { // nolint:revive // This is a hashing function. - if val { - return h.Uint64(1) - } - return h.Uint64(0) -} - -func (h Hash) Float64(val float64) Hash { - return h.Uint64(math.Float64bits(val)) -} - -func (h Hash) Int64(val int64) Hash { - return h.Uint64(uint64(val)) // nolint:gosec // Overflow doesn't matter since we are hashing. -} - -func (h Hash) String(val string) Hash { - // errors from WriteString are always nil for xxhash - // if it returns an err then panic - _, err := h.d.WriteString(val) - if err != nil { - panic("xxhash write of string failed: " + err.Error()) - } - return h -} - -// Sum64 returns the current hash value. -func (h Hash) Sum64() uint64 { - return h.d.Sum64() -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go deleted file mode 100644 index 8df6249f02..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/iterator.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Iterator allows iterating over the set of attributes in order, sorted by -// key. -type Iterator struct { - storage *Set - idx int -} - -// MergeIterator supports iterating over two sets of attributes while -// eliminating duplicate values from the combined set. The first iterator -// value takes precedence. -type MergeIterator struct { - one oneIterator - two oneIterator - current KeyValue -} - -type oneIterator struct { - iter Iterator - done bool - attr KeyValue -} - -// Next moves the iterator to the next position. -// Next reports whether there are more attributes. -func (i *Iterator) Next() bool { - i.idx++ - return i.idx < i.Len() -} - -// Label returns current KeyValue. Must be called only after Next returns -// true. -// -// Deprecated: Use Attribute instead. -func (i *Iterator) Label() KeyValue { - return i.Attribute() -} - -// Attribute returns the current KeyValue of the Iterator. It must be called -// only after Next returns true. -func (i *Iterator) Attribute() KeyValue { - kv, _ := i.storage.Get(i.idx) - return kv -} - -// IndexedLabel returns current index and attribute. Must be called only -// after Next returns true. -// -// Deprecated: Use IndexedAttribute instead. -func (i *Iterator) IndexedLabel() (int, KeyValue) { - return i.idx, i.Attribute() -} - -// IndexedAttribute returns current index and attribute. Must be called only -// after Next returns true. -func (i *Iterator) IndexedAttribute() (int, KeyValue) { - return i.idx, i.Attribute() -} - -// Len returns a number of attributes in the iterated set. -func (i *Iterator) Len() int { - return i.storage.Len() -} - -// ToSlice is a convenience function that creates a slice of attributes from -// the passed iterator. The iterator is set up to start from the beginning -// before creating the slice. -func (i *Iterator) ToSlice() []KeyValue { - l := i.Len() - if l == 0 { - return nil - } - i.idx = -1 - slice := make([]KeyValue, 0, l) - for i.Next() { - slice = append(slice, i.Attribute()) - } - return slice -} - -// NewMergeIterator returns a MergeIterator for merging two attribute sets. -// Duplicates are resolved by taking the value from the first set. -func NewMergeIterator(s1, s2 *Set) MergeIterator { - mi := MergeIterator{ - one: makeOne(s1.Iter()), - two: makeOne(s2.Iter()), - } - return mi -} - -func makeOne(iter Iterator) oneIterator { - oi := oneIterator{ - iter: iter, - } - oi.advance() - return oi -} - -func (oi *oneIterator) advance() { - if oi.done = !oi.iter.Next(); !oi.done { - oi.attr = oi.iter.Attribute() - } -} - -// Next moves the iterator to the next position. -// Next reports whether there is another attribute available. -func (m *MergeIterator) Next() bool { - if m.one.done && m.two.done { - return false - } - if m.one.done { - m.current = m.two.attr - m.two.advance() - return true - } - if m.two.done { - m.current = m.one.attr - m.one.advance() - return true - } - if m.one.attr.Key == m.two.attr.Key { - m.current = m.one.attr // first iterator attribute value wins - m.one.advance() - m.two.advance() - return true - } - if m.one.attr.Key < m.two.attr.Key { - m.current = m.one.attr - m.one.advance() - return true - } - m.current = m.two.attr - m.two.advance() - return true -} - -// Label returns the current value after Next() returns true. -// -// Deprecated: Use Attribute instead. -func (m *MergeIterator) Label() KeyValue { - return m.current -} - -// Attribute returns the current value after Next() returns true. -func (m *MergeIterator) Attribute() KeyValue { - return m.current -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go deleted file mode 100644 index 80a9e5643f..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/key.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -// Key represents the key part in key-value pairs. It's a string. The -// allowed character set in the key depends on the use of the key. -type Key string - -// Bool creates a KeyValue instance with a BOOL Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Bool(name, value). -func (k Key) Bool(v bool) KeyValue { - return KeyValue{ - Key: k, - Value: BoolValue(v), - } -} - -// BoolSlice creates a KeyValue instance with a BOOLSLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- BoolSlice(name, value). -func (k Key) BoolSlice(v []bool) KeyValue { - return KeyValue{ - Key: k, - Value: BoolSliceValue(v), - } -} - -// Int creates a KeyValue instance with an INT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int(name, value). -func (k Key) Int(v int) KeyValue { - return KeyValue{ - Key: k, - Value: IntValue(v), - } -} - -// IntSlice creates a KeyValue instance with an INT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- IntSlice(name, value). -func (k Key) IntSlice(v []int) KeyValue { - return KeyValue{ - Key: k, - Value: IntSliceValue(v), - } -} - -// Int64 creates a KeyValue instance with an INT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int64(name, value). -func (k Key) Int64(v int64) KeyValue { - return KeyValue{ - Key: k, - Value: Int64Value(v), - } -} - -// Int64Slice creates a KeyValue instance with an INT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Int64Slice(name, value). -func (k Key) Int64Slice(v []int64) KeyValue { - return KeyValue{ - Key: k, - Value: Int64SliceValue(v), - } -} - -// Float64 creates a KeyValue instance with a FLOAT64 Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Float64(name, value). -func (k Key) Float64(v float64) KeyValue { - return KeyValue{ - Key: k, - Value: Float64Value(v), - } -} - -// Float64Slice creates a KeyValue instance with a FLOAT64SLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- Float64(name, value). -func (k Key) Float64Slice(v []float64) KeyValue { - return KeyValue{ - Key: k, - Value: Float64SliceValue(v), - } -} - -// String creates a KeyValue instance with a STRING Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- String(name, value). -func (k Key) String(v string) KeyValue { - return KeyValue{ - Key: k, - Value: StringValue(v), - } -} - -// StringSlice creates a KeyValue instance with a STRINGSLICE Value. -// -// If creating both a key and value at the same time, use the provided -// convenience function instead -- StringSlice(name, value). -func (k Key) StringSlice(v []string) KeyValue { - return KeyValue{ - Key: k, - Value: StringSliceValue(v), - } -} - -// Defined reports whether the key is not empty. -func (k Key) Defined() bool { - return len(k) != 0 -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go deleted file mode 100644 index 8c6928ca79..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/kv.go +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "fmt" -) - -// KeyValue holds a key and value pair. -type KeyValue struct { - Key Key - Value Value -} - -// Valid reports whether kv is a valid OpenTelemetry attribute. -func (kv KeyValue) Valid() bool { - return kv.Key.Defined() && kv.Value.Type() != INVALID -} - -// Bool creates a KeyValue with a BOOL Value type. -func Bool(k string, v bool) KeyValue { - return Key(k).Bool(v) -} - -// BoolSlice creates a KeyValue with a BOOLSLICE Value type. -func BoolSlice(k string, v []bool) KeyValue { - return Key(k).BoolSlice(v) -} - -// Int creates a KeyValue with an INT64 Value type. -func Int(k string, v int) KeyValue { - return Key(k).Int(v) -} - -// IntSlice creates a KeyValue with an INT64SLICE Value type. -func IntSlice(k string, v []int) KeyValue { - return Key(k).IntSlice(v) -} - -// Int64 creates a KeyValue with an INT64 Value type. -func Int64(k string, v int64) KeyValue { - return Key(k).Int64(v) -} - -// Int64Slice creates a KeyValue with an INT64SLICE Value type. -func Int64Slice(k string, v []int64) KeyValue { - return Key(k).Int64Slice(v) -} - -// Float64 creates a KeyValue with a FLOAT64 Value type. -func Float64(k string, v float64) KeyValue { - return Key(k).Float64(v) -} - -// Float64Slice creates a KeyValue with a FLOAT64SLICE Value type. -func Float64Slice(k string, v []float64) KeyValue { - return Key(k).Float64Slice(v) -} - -// String creates a KeyValue with a STRING Value type. -func String(k, v string) KeyValue { - return Key(k).String(v) -} - -// StringSlice creates a KeyValue with a STRINGSLICE Value type. -func StringSlice(k string, v []string) KeyValue { - return Key(k).StringSlice(v) -} - -// Stringer creates a new key-value pair with a passed name and a string -// value generated by the passed Stringer interface. -func Stringer(k string, v fmt.Stringer) KeyValue { - return Key(k).String(v.String()) -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go b/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go deleted file mode 100644 index 5791c6e7aa..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/rawhelpers.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "math" -) - -func boolToRaw(b bool) uint64 { // nolint:revive // b is not a control flag. - if b { - return 1 - } - return 0 -} - -func rawToBool(r uint64) bool { - return r != 0 -} - -func int64ToRaw(i int64) uint64 { - // Assumes original was a valid int64 (overflow not checked). - return uint64(i) // nolint: gosec -} - -func rawToInt64(r uint64) int64 { - // Assumes original was a valid int64 (overflow not checked). - return int64(r) // nolint: gosec -} - -func float64ToRaw(f float64) uint64 { - return math.Float64bits(f) -} - -func rawToFloat64(r uint64) float64 { - return math.Float64frombits(r) -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go deleted file mode 100644 index 911d557ee5..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/set.go +++ /dev/null @@ -1,436 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "cmp" - "encoding/json" - "reflect" - "slices" - "sort" - - "go.opentelemetry.io/otel/attribute/internal/xxhash" -) - -type ( - // Set is the representation for a distinct attribute set. It manages an - // immutable set of attributes, with an internal cache for storing - // attribute encodings. - // - // This type will remain comparable for backwards compatibility. The - // equivalence of Sets across versions is not guaranteed to be stable. - // Prior versions may find two Sets to be equal or not when compared - // directly (i.e. ==), but subsequent versions may not. Users should use - // the Equals method to ensure stable equivalence checking. - // - // Users should also use the Distinct returned from Equivalent as a map key - // instead of a Set directly. Set has relatively poor performance when used - // as a map key compared to Distinct. - Set struct { - hash uint64 - data any - } - - // Distinct is an identifier of a Set which is very likely to be unique. - // - // Distinct should be used as a map key instead of a Set for to provide better - // performance for map operations. - Distinct struct { - hash uint64 - } - - // Sortable implements sort.Interface, used for sorting KeyValue. - // - // Deprecated: This type is no longer used. It was added as a performance - // optimization for Go < 1.21 that is no longer needed (Go < 1.21 is no - // longer supported by the module). - Sortable []KeyValue -) - -// Compile time check these types remain comparable. -var ( - _ = isComparable(Set{}) - _ = isComparable(Distinct{}) -) - -func isComparable[T comparable](t T) T { return t } - -var ( - // keyValueType is used in computeDistinctReflect. - keyValueType = reflect.TypeOf(KeyValue{}) - - // emptyHash is the hash of an empty set. - emptyHash = xxhash.New().Sum64() - - // userDefinedEmptySet is an empty set. It was mistakenly exposed to users - // as something they can assign to, so it must remain addressable and - // mutable. - // - // This is kept for backwards compatibility, but should not be used in new code. - userDefinedEmptySet = &Set{ - hash: emptyHash, - data: [0]KeyValue{}, - } - - emptySet = Set{ - hash: emptyHash, - data: [0]KeyValue{}, - } -) - -// EmptySet returns a reference to a Set with no elements. -// -// This is a convenience provided for optimized calling utility. -func EmptySet() *Set { - // Continue to return the pointer to the user-defined empty set for - // backwards-compatibility. - // - // New code should not use this, instead use emptySet. - return userDefinedEmptySet -} - -// Valid reports whether this value refers to a valid Set. -func (d Distinct) Valid() bool { return d.hash != 0 } - -// reflectValue abbreviates reflect.ValueOf(d). -func (l Set) reflectValue() reflect.Value { - return reflect.ValueOf(l.data) -} - -// Len returns the number of attributes in this set. -func (l *Set) Len() int { - if l == nil || l.hash == 0 { - return 0 - } - return l.reflectValue().Len() -} - -// Get returns the KeyValue at ordered position idx in this set. -func (l *Set) Get(idx int) (KeyValue, bool) { - if l == nil || l.hash == 0 { - return KeyValue{}, false - } - value := l.reflectValue() - - if idx >= 0 && idx < value.Len() { - // Note: The Go compiler successfully avoids an allocation for - // the interface{} conversion here: - return value.Index(idx).Interface().(KeyValue), true - } - - return KeyValue{}, false -} - -// Value returns the value of a specified key in this set. -func (l *Set) Value(k Key) (Value, bool) { - if l == nil || l.hash == 0 { - return Value{}, false - } - rValue := l.reflectValue() - vlen := rValue.Len() - - idx := sort.Search(vlen, func(idx int) bool { - return rValue.Index(idx).Interface().(KeyValue).Key >= k - }) - if idx >= vlen { - return Value{}, false - } - keyValue := rValue.Index(idx).Interface().(KeyValue) - if k == keyValue.Key { - return keyValue.Value, true - } - return Value{}, false -} - -// HasValue reports whether a key is defined in this set. -func (l *Set) HasValue(k Key) bool { - if l == nil { - return false - } - _, ok := l.Value(k) - return ok -} - -// Iter returns an iterator for visiting the attributes in this set. -func (l *Set) Iter() Iterator { - return Iterator{ - storage: l, - idx: -1, - } -} - -// ToSlice returns the set of attributes belonging to this set, sorted, where -// keys appear no more than once. -func (l *Set) ToSlice() []KeyValue { - iter := l.Iter() - return iter.ToSlice() -} - -// Equivalent returns a value that may be used as a map key. Equal Distinct -// values are very likely to be equivalent attribute Sets. Distinct value of any -// attribute set with the same elements as this, where sets are made unique by -// choosing the last value in the input for any given key. -func (l *Set) Equivalent() Distinct { - if l == nil || l.hash == 0 { - return Distinct{hash: emptySet.hash} - } - return Distinct{hash: l.hash} -} - -// Equals reports whether the argument set is equivalent to this set. -func (l *Set) Equals(o *Set) bool { - if l.Equivalent() != o.Equivalent() { - return false - } - if l == nil || l.hash == 0 { - l = &emptySet - } - if o == nil || o.hash == 0 { - o = &emptySet - } - return l.data == o.data -} - -// Encoded returns the encoded form of this set, according to encoder. -func (l *Set) Encoded(encoder Encoder) string { - if l == nil || encoder == nil { - return "" - } - - return encoder.Encode(l.Iter()) -} - -// NewSet returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// Except for empty sets, this method adds an additional allocation compared -// with calls that include a Sortable. -func NewSet(kvs ...KeyValue) Set { - s, _ := NewSetWithFiltered(kvs, nil) - return s -} - -// NewSetWithSortable returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// This call includes a Sortable option as a memory optimization. -// -// Deprecated: Use [NewSet] instead. -func NewSetWithSortable(kvs []KeyValue, _ *Sortable) Set { - s, _ := NewSetWithFiltered(kvs, nil) - return s -} - -// NewSetWithFiltered returns a new Set. See the documentation for -// NewSetWithSortableFiltered for more details. -// -// This call includes a Filter to include/exclude attribute keys from the -// return value. Excluded keys are returned as a slice of attribute values. -func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { - // Check for empty set. - if len(kvs) == 0 { - return emptySet, nil - } - - // Stable sort so the following de-duplication can implement - // last-value-wins semantics. - slices.SortStableFunc(kvs, func(a, b KeyValue) int { - return cmp.Compare(a.Key, b.Key) - }) - - position := len(kvs) - 1 - offset := position - 1 - - // The requirements stated above require that the stable - // result be placed in the end of the input slice, while - // overwritten values are swapped to the beginning. - // - // De-duplicate with last-value-wins semantics. Preserve - // duplicate values at the beginning of the input slice. - for ; offset >= 0; offset-- { - if kvs[offset].Key == kvs[position].Key { - continue - } - position-- - kvs[offset], kvs[position] = kvs[position], kvs[offset] - } - kvs = kvs[position:] - - if filter != nil { - if div := filteredToFront(kvs, filter); div != 0 { - return newSet(kvs[div:]), kvs[:div] - } - } - return newSet(kvs), nil -} - -// NewSetWithSortableFiltered returns a new Set. -// -// Duplicate keys are eliminated by taking the last value. This -// re-orders the input slice so that unique last-values are contiguous -// at the end of the slice. -// -// This ensures the following: -// -// - Last-value-wins semantics -// - Caller sees the reordering, but doesn't lose values -// - Repeated call preserve last-value wins. -// -// Note that methods are defined on Set, although this returns Set. Callers -// can avoid memory allocations by: -// -// - allocating a Sortable for use as a temporary in this method -// - allocating a Set for storing the return value of this constructor. -// -// The result maintains a cache of encoded attributes, by attribute.EncoderID. -// This value should not be copied after its first use. -// -// The second []KeyValue return value is a list of attributes that were -// excluded by the Filter (if non-nil). -// -// Deprecated: Use [NewSetWithFiltered] instead. -func NewSetWithSortableFiltered(kvs []KeyValue, _ *Sortable, filter Filter) (Set, []KeyValue) { - return NewSetWithFiltered(kvs, filter) -} - -// filteredToFront filters slice in-place using keep function. All KeyValues that need to -// be removed are moved to the front. All KeyValues that need to be kept are -// moved (in-order) to the back. The index for the first KeyValue to be kept is -// returned. -func filteredToFront(slice []KeyValue, keep Filter) int { - n := len(slice) - j := n - for i := n - 1; i >= 0; i-- { - if keep(slice[i]) { - j-- - slice[i], slice[j] = slice[j], slice[i] - } - } - return j -} - -// Filter returns a filtered copy of this Set. See the documentation for -// NewSetWithSortableFiltered for more details. -func (l *Set) Filter(re Filter) (Set, []KeyValue) { - if re == nil { - return *l, nil - } - - // Iterate in reverse to the first attribute that will be filtered out. - n := l.Len() - first := n - 1 - for ; first >= 0; first-- { - kv, _ := l.Get(first) - if !re(kv) { - break - } - } - - // No attributes will be dropped, return the immutable Set l and nil. - if first < 0 { - return *l, nil - } - - // Copy now that we know we need to return a modified set. - // - // Do not do this in-place on the underlying storage of *Set l. Sets are - // immutable and filtering should not change this. - slice := l.ToSlice() - - // Don't re-iterate the slice if only slice[0] is filtered. - if first == 0 { - // It is safe to assume len(slice) >= 1 given we found at least one - // attribute above that needs to be filtered out. - return newSet(slice[1:]), slice[:1] - } - - // Move the filtered slice[first] to the front (preserving order). - kv := slice[first] - copy(slice[1:first+1], slice[:first]) - slice[0] = kv - - // Do not re-evaluate re(slice[first+1:]). - div := filteredToFront(slice[1:first+1], re) + 1 - return newSet(slice[div:]), slice[:div] -} - -// newSet returns a new set based on the sorted and uniqued kvs. -func newSet(kvs []KeyValue) Set { - s := Set{ - hash: hashKVs(kvs), - data: computeDataFixed(kvs), - } - if s.data == nil { - s.data = computeDataReflect(kvs) - } - return s -} - -// computeDataFixed computes a Set data for small slices. It returns nil if the -// input is too large for this code path. -func computeDataFixed(kvs []KeyValue) any { - switch len(kvs) { - case 1: - return [1]KeyValue(kvs) - case 2: - return [2]KeyValue(kvs) - case 3: - return [3]KeyValue(kvs) - case 4: - return [4]KeyValue(kvs) - case 5: - return [5]KeyValue(kvs) - case 6: - return [6]KeyValue(kvs) - case 7: - return [7]KeyValue(kvs) - case 8: - return [8]KeyValue(kvs) - case 9: - return [9]KeyValue(kvs) - case 10: - return [10]KeyValue(kvs) - default: - return nil - } -} - -// computeDataReflect computes a Set data using reflection, works for any size -// input. -func computeDataReflect(kvs []KeyValue) any { - at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() - for i, keyValue := range kvs { - *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue - } - return at.Interface() -} - -// MarshalJSON returns the JSON encoding of the Set. -func (l *Set) MarshalJSON() ([]byte, error) { - return json.Marshal(l.data) -} - -// MarshalLog is the marshaling function used by the logging system to represent this Set. -func (l Set) MarshalLog() any { - kvs := make(map[string]string) - for _, kv := range l.ToSlice() { - kvs[string(kv.Key)] = kv.Value.Emit() - } - return kvs -} - -// Len implements sort.Interface. -func (l *Sortable) Len() int { - return len(*l) -} - -// Swap implements sort.Interface. -func (l *Sortable) Swap(i, j int) { - (*l)[i], (*l)[j] = (*l)[j], (*l)[i] -} - -// Less implements sort.Interface. -func (l *Sortable) Less(i, j int) bool { - return (*l)[i].Key < (*l)[j].Key -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go deleted file mode 100644 index 24f1fa37db..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/type_string.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by "stringer -type=Type"; DO NOT EDIT. - -package attribute - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[INVALID-0] - _ = x[BOOL-1] - _ = x[INT64-2] - _ = x[FLOAT64-3] - _ = x[STRING-4] - _ = x[BOOLSLICE-5] - _ = x[INT64SLICE-6] - _ = x[FLOAT64SLICE-7] - _ = x[STRINGSLICE-8] -} - -const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGBOOLSLICEINT64SLICEFLOAT64SLICESTRINGSLICE" - -var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 38, 48, 60, 71} - -func (i Type) String() string { - idx := int(i) - 0 - if i < 0 || idx >= len(_Type_index)-1 { - return "Type(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Type_name[_Type_index[idx]:_Type_index[idx+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go deleted file mode 100644 index 653c33a861..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/value.go +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" - - attribute "go.opentelemetry.io/otel/attribute/internal" -) - -//go:generate stringer -type=Type - -// Type describes the type of the data Value holds. -type Type int // nolint: revive // redefines builtin Type. - -// Value represents the value part in key-value pairs. -type Value struct { - vtype Type - numeric uint64 - stringly string - slice any -} - -const ( - // INVALID is used for a Value with no value set. - INVALID Type = iota - // BOOL is a boolean Type Value. - BOOL - // INT64 is a 64-bit signed integral Type Value. - INT64 - // FLOAT64 is a 64-bit floating point Type Value. - FLOAT64 - // STRING is a string Type Value. - STRING - // BOOLSLICE is a slice of booleans Type Value. - BOOLSLICE - // INT64SLICE is a slice of 64-bit signed integral numbers Type Value. - INT64SLICE - // FLOAT64SLICE is a slice of 64-bit floating point numbers Type Value. - FLOAT64SLICE - // STRINGSLICE is a slice of strings Type Value. - STRINGSLICE -) - -// BoolValue creates a BOOL Value. -func BoolValue(v bool) Value { - return Value{ - vtype: BOOL, - numeric: boolToRaw(v), - } -} - -// BoolSliceValue creates a BOOLSLICE Value. -func BoolSliceValue(v []bool) Value { - return Value{vtype: BOOLSLICE, slice: attribute.BoolSliceValue(v)} -} - -// IntValue creates an INT64 Value. -func IntValue(v int) Value { - return Int64Value(int64(v)) -} - -// IntSliceValue creates an INTSLICE Value. -func IntSliceValue(v []int) Value { - var int64Val int64 - cp := reflect.New(reflect.ArrayOf(len(v), reflect.TypeOf(int64Val))) - for i, val := range v { - cp.Elem().Index(i).SetInt(int64(val)) - } - return Value{ - vtype: INT64SLICE, - slice: cp.Elem().Interface(), - } -} - -// Int64Value creates an INT64 Value. -func Int64Value(v int64) Value { - return Value{ - vtype: INT64, - numeric: int64ToRaw(v), - } -} - -// Int64SliceValue creates an INT64SLICE Value. -func Int64SliceValue(v []int64) Value { - return Value{vtype: INT64SLICE, slice: attribute.Int64SliceValue(v)} -} - -// Float64Value creates a FLOAT64 Value. -func Float64Value(v float64) Value { - return Value{ - vtype: FLOAT64, - numeric: float64ToRaw(v), - } -} - -// Float64SliceValue creates a FLOAT64SLICE Value. -func Float64SliceValue(v []float64) Value { - return Value{vtype: FLOAT64SLICE, slice: attribute.Float64SliceValue(v)} -} - -// StringValue creates a STRING Value. -func StringValue(v string) Value { - return Value{ - vtype: STRING, - stringly: v, - } -} - -// StringSliceValue creates a STRINGSLICE Value. -func StringSliceValue(v []string) Value { - return Value{vtype: STRINGSLICE, slice: attribute.StringSliceValue(v)} -} - -// Type returns a type of the Value. -func (v Value) Type() Type { - return v.vtype -} - -// AsBool returns the bool value. Make sure that the Value's type is -// BOOL. -func (v Value) AsBool() bool { - return rawToBool(v.numeric) -} - -// AsBoolSlice returns the []bool value. Make sure that the Value's type is -// BOOLSLICE. -func (v Value) AsBoolSlice() []bool { - if v.vtype != BOOLSLICE { - return nil - } - return v.asBoolSlice() -} - -func (v Value) asBoolSlice() []bool { - return attribute.AsBoolSlice(v.slice) -} - -// AsInt64 returns the int64 value. Make sure that the Value's type is -// INT64. -func (v Value) AsInt64() int64 { - return rawToInt64(v.numeric) -} - -// AsInt64Slice returns the []int64 value. Make sure that the Value's type is -// INT64SLICE. -func (v Value) AsInt64Slice() []int64 { - if v.vtype != INT64SLICE { - return nil - } - return v.asInt64Slice() -} - -func (v Value) asInt64Slice() []int64 { - return attribute.AsInt64Slice(v.slice) -} - -// AsFloat64 returns the float64 value. Make sure that the Value's -// type is FLOAT64. -func (v Value) AsFloat64() float64 { - return rawToFloat64(v.numeric) -} - -// AsFloat64Slice returns the []float64 value. Make sure that the Value's type is -// FLOAT64SLICE. -func (v Value) AsFloat64Slice() []float64 { - if v.vtype != FLOAT64SLICE { - return nil - } - return v.asFloat64Slice() -} - -func (v Value) asFloat64Slice() []float64 { - return attribute.AsFloat64Slice(v.slice) -} - -// AsString returns the string value. Make sure that the Value's type -// is STRING. -func (v Value) AsString() string { - return v.stringly -} - -// AsStringSlice returns the []string value. Make sure that the Value's type is -// STRINGSLICE. -func (v Value) AsStringSlice() []string { - if v.vtype != STRINGSLICE { - return nil - } - return v.asStringSlice() -} - -func (v Value) asStringSlice() []string { - return attribute.AsStringSlice(v.slice) -} - -type unknownValueType struct{} - -// AsInterface returns Value's data as any. -func (v Value) AsInterface() any { - switch v.Type() { - case BOOL: - return v.AsBool() - case BOOLSLICE: - return v.asBoolSlice() - case INT64: - return v.AsInt64() - case INT64SLICE: - return v.asInt64Slice() - case FLOAT64: - return v.AsFloat64() - case FLOAT64SLICE: - return v.asFloat64Slice() - case STRING: - return v.stringly - case STRINGSLICE: - return v.asStringSlice() - } - return unknownValueType{} -} - -// Emit returns a string representation of Value's data. -func (v Value) Emit() string { - switch v.Type() { - case BOOLSLICE: - return fmt.Sprint(v.asBoolSlice()) - case BOOL: - return strconv.FormatBool(v.AsBool()) - case INT64SLICE: - j, err := json.Marshal(v.asInt64Slice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asInt64Slice()) - } - return string(j) - case INT64: - return strconv.FormatInt(v.AsInt64(), 10) - case FLOAT64SLICE: - j, err := json.Marshal(v.asFloat64Slice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asFloat64Slice()) - } - return string(j) - case FLOAT64: - return fmt.Sprint(v.AsFloat64()) - case STRINGSLICE: - j, err := json.Marshal(v.asStringSlice()) - if err != nil { - return fmt.Sprintf("invalid: %v", v.asStringSlice()) - } - return string(j) - case STRING: - return v.stringly - default: - return "unknown" - } -} - -// MarshalJSON returns the JSON encoding of the Value. -func (v Value) MarshalJSON() ([]byte, error) { - var jsonVal struct { - Type string - Value any - } - jsonVal.Type = v.Type().String() - jsonVal.Value = v.AsInterface() - return json.Marshal(jsonVal) -} diff --git a/vendor/go.opentelemetry.io/otel/baggage/README.md b/vendor/go.opentelemetry.io/otel/baggage/README.md deleted file mode 100644 index 7d798435e1..0000000000 --- a/vendor/go.opentelemetry.io/otel/baggage/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Baggage - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/baggage)](https://pkg.go.dev/go.opentelemetry.io/otel/baggage) diff --git a/vendor/go.opentelemetry.io/otel/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/baggage/baggage.go deleted file mode 100644 index 78e98c4c0f..0000000000 --- a/vendor/go.opentelemetry.io/otel/baggage/baggage.go +++ /dev/null @@ -1,1018 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package baggage // import "go.opentelemetry.io/otel/baggage" - -import ( - "errors" - "fmt" - "net/url" - "strings" - "unicode/utf8" - - "go.opentelemetry.io/otel/internal/baggage" -) - -const ( - maxMembers = 180 - maxBytesPerMembers = 4096 - maxBytesPerBaggageString = 8192 - - listDelimiter = "," - keyValueDelimiter = "=" - propertyDelimiter = ";" -) - -var ( - errInvalidKey = errors.New("invalid key") - errInvalidValue = errors.New("invalid value") - errInvalidProperty = errors.New("invalid baggage list-member property") - errInvalidMember = errors.New("invalid baggage list-member") - errMemberNumber = errors.New("too many list-members in baggage-string") - errMemberBytes = errors.New("list-member too large") - errBaggageBytes = errors.New("baggage-string too large") -) - -// Property is an additional metadata entry for a baggage list-member. -type Property struct { - key, value string - - // hasValue indicates if a zero-value value means the property does not - // have a value or if it was the zero-value. - hasValue bool -} - -// NewKeyProperty returns a new Property for key. -// -// The passed key must be valid, non-empty UTF-8 string. -// If key is invalid, an error will be returned. -// However, the specific Propagators that are used to transmit baggage entries across -// component boundaries may impose their own restrictions on Property key. -// For example, the W3C Baggage specification restricts the Property keys to strings that -// satisfy the token definition from RFC7230, Section 3.2.6. -// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key. -func NewKeyProperty(key string) (Property, error) { - if !validateBaggageName(key) { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) - } - - p := Property{key: key} - return p, nil -} - -// NewKeyValueProperty returns a new Property for key with value. -// -// The passed key must be compliant with W3C Baggage specification. -// The passed value must be percent-encoded as defined in W3C Baggage specification. -// -// Notice: Consider using [NewKeyValuePropertyRaw] instead -// that does not require percent-encoding of the value. -func NewKeyValueProperty(key, value string) (Property, error) { - if !validateKey(key) { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) - } - - if !validateValue(value) { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) - } - decodedValue, err := url.PathUnescape(value) - if err != nil { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) - } - return NewKeyValuePropertyRaw(key, decodedValue) -} - -// NewKeyValuePropertyRaw returns a new Property for key with value. -// -// The passed key must be valid, non-empty UTF-8 string. -// The passed value must be valid UTF-8 string. -// However, the specific Propagators that are used to transmit baggage entries across -// component boundaries may impose their own restrictions on Property key. -// For example, the W3C Baggage specification restricts the Property keys to strings that -// satisfy the token definition from RFC7230, Section 3.2.6. -// For maximum compatibility, alphanumeric value are strongly recommended to be used as Property key. -func NewKeyValuePropertyRaw(key, value string) (Property, error) { - if !validateBaggageName(key) { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidKey, key) - } - if !validateBaggageValue(value) { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidValue, value) - } - - p := Property{ - key: key, - value: value, - hasValue: true, - } - return p, nil -} - -func newInvalidProperty() Property { - return Property{} -} - -// parseProperty attempts to decode a Property from the passed string. It -// returns an error if the input is invalid according to the W3C Baggage -// specification. -func parseProperty(property string) (Property, error) { - if property == "" { - return newInvalidProperty(), nil - } - - p, ok := parsePropertyInternal(property) - if !ok { - return newInvalidProperty(), fmt.Errorf("%w: %q", errInvalidProperty, property) - } - - return p, nil -} - -// validate ensures p conforms to the W3C Baggage specification, returning an -// error otherwise. -func (p Property) validate() error { - errFunc := func(err error) error { - return fmt.Errorf("invalid property: %w", err) - } - - if !validateBaggageName(p.key) { - return errFunc(fmt.Errorf("%w: %q", errInvalidKey, p.key)) - } - if !p.hasValue && p.value != "" { - return errFunc(errors.New("inconsistent value")) - } - if p.hasValue && !validateBaggageValue(p.value) { - return errFunc(fmt.Errorf("%w: %q", errInvalidValue, p.value)) - } - return nil -} - -// Key returns the Property key. -func (p Property) Key() string { - return p.key -} - -// Value returns the Property value. Additionally, a boolean value is returned -// indicating if the returned value is the empty if the Property has a value -// that is empty or if the value is not set. -func (p Property) Value() (string, bool) { - return p.value, p.hasValue -} - -// String encodes Property into a header string compliant with the W3C Baggage -// specification. -// It would return empty string if the key is invalid with the W3C Baggage -// specification. This could happen for a UTF-8 key, as it may contain -// invalid characters. -func (p Property) String() string { - // W3C Baggage specification does not allow percent-encoded keys. - if !validateKey(p.key) { - return "" - } - - if p.hasValue { - return fmt.Sprintf("%s%s%v", p.key, keyValueDelimiter, valueEscape(p.value)) - } - return p.key -} - -type properties []Property - -func fromInternalProperties(iProps []baggage.Property) properties { - if len(iProps) == 0 { - return nil - } - - props := make(properties, len(iProps)) - for i, p := range iProps { - props[i] = Property{ - key: p.Key, - value: p.Value, - hasValue: p.HasValue, - } - } - return props -} - -func (p properties) asInternal() []baggage.Property { - if len(p) == 0 { - return nil - } - - iProps := make([]baggage.Property, len(p)) - for i, prop := range p { - iProps[i] = baggage.Property{ - Key: prop.key, - Value: prop.value, - HasValue: prop.hasValue, - } - } - return iProps -} - -func (p properties) Copy() properties { - if len(p) == 0 { - return nil - } - - props := make(properties, len(p)) - copy(props, p) - return props -} - -// validate ensures each Property in p conforms to the W3C Baggage -// specification, returning an error otherwise. -func (p properties) validate() error { - for _, prop := range p { - if err := prop.validate(); err != nil { - return err - } - } - return nil -} - -// String encodes properties into a header string compliant with the W3C Baggage -// specification. -func (p properties) String() string { - props := make([]string, 0, len(p)) - for _, prop := range p { - s := prop.String() - - // Ignored empty properties. - if s != "" { - props = append(props, s) - } - } - return strings.Join(props, propertyDelimiter) -} - -// Member is a list-member of a baggage-string as defined by the W3C Baggage -// specification. -type Member struct { - key, value string - properties properties - - // hasData indicates whether the created property contains data or not. - // Properties that do not contain data are invalid with no other check - // required. - hasData bool -} - -// NewMember returns a new Member from the passed arguments. -// -// The passed key must be compliant with W3C Baggage specification. -// The passed value must be percent-encoded as defined in W3C Baggage specification. -// -// Notice: Consider using [NewMemberRaw] instead -// that does not require percent-encoding of the value. -func NewMember(key, value string, props ...Property) (Member, error) { - if !validateKey(key) { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key) - } - - if !validateValue(value) { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) - } - decodedValue, err := url.PathUnescape(value) - if err != nil { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, value) - } - return NewMemberRaw(key, decodedValue, props...) -} - -// NewMemberRaw returns a new Member from the passed arguments. -// -// The passed key must be valid, non-empty UTF-8 string. -// The passed value must be valid UTF-8 string. -// However, the specific Propagators that are used to transmit baggage entries across -// component boundaries may impose their own restrictions on baggage key. -// For example, the W3C Baggage specification restricts the baggage keys to strings that -// satisfy the token definition from RFC7230, Section 3.2.6. -// For maximum compatibility, alphanumeric value are strongly recommended to be used as baggage key. -func NewMemberRaw(key, value string, props ...Property) (Member, error) { - m := Member{ - key: key, - value: value, - properties: properties(props).Copy(), - hasData: true, - } - if err := m.validate(); err != nil { - return newInvalidMember(), err - } - return m, nil -} - -func newInvalidMember() Member { - return Member{} -} - -// parseMember attempts to decode a Member from the passed string. It returns -// an error if the input is invalid according to the W3C Baggage -// specification. -func parseMember(member string) (Member, error) { - if n := len(member); n > maxBytesPerMembers { - return newInvalidMember(), fmt.Errorf("%w: %d", errMemberBytes, n) - } - - var props properties - keyValue, properties, found := strings.Cut(member, propertyDelimiter) - if found { - // Parse the member properties. - for _, pStr := range strings.Split(properties, propertyDelimiter) { - p, err := parseProperty(pStr) - if err != nil { - return newInvalidMember(), err - } - props = append(props, p) - } - } - // Parse the member key/value pair. - - // Take into account a value can contain equal signs (=). - k, v, found := strings.Cut(keyValue, keyValueDelimiter) - if !found { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidMember, member) - } - // "Leading and trailing whitespaces are allowed but MUST be trimmed - // when converting the header into a data structure." - key := strings.TrimSpace(k) - if !validateKey(key) { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidKey, key) - } - - rawVal := strings.TrimSpace(v) - if !validateValue(rawVal) { - return newInvalidMember(), fmt.Errorf("%w: %q", errInvalidValue, v) - } - - // Decode a percent-encoded value. - unescapeVal, err := url.PathUnescape(rawVal) - if err != nil { - return newInvalidMember(), fmt.Errorf("%w: %w", errInvalidValue, err) - } - - value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal) - return Member{key: key, value: value, properties: props, hasData: true}, nil -} - -// replaceInvalidUTF8Sequences replaces invalid UTF-8 sequences with '�'. -func replaceInvalidUTF8Sequences(c int, unescapeVal string) string { - if utf8.ValidString(unescapeVal) { - return unescapeVal - } - // W3C baggage spec: - // https://github.com/w3c/baggage/blob/8c215efbeebd3fa4b1aceb937a747e56444f22f3/baggage/HTTP_HEADER_FORMAT.md?plain=1#L69 - - var b strings.Builder - b.Grow(c) - for i := 0; i < len(unescapeVal); { - r, size := utf8.DecodeRuneInString(unescapeVal[i:]) - if r == utf8.RuneError && size == 1 { - // Invalid UTF-8 sequence found, replace it with '�' - _, _ = b.WriteString("�") - } else { - _, _ = b.WriteRune(r) - } - i += size - } - - return b.String() -} - -// validate ensures m conforms to the W3C Baggage specification. -// A key must be an ASCII string, returning an error otherwise. -func (m Member) validate() error { - if !m.hasData { - return fmt.Errorf("%w: %q", errInvalidMember, m) - } - - if !validateBaggageName(m.key) { - return fmt.Errorf("%w: %q", errInvalidKey, m.key) - } - if !validateBaggageValue(m.value) { - return fmt.Errorf("%w: %q", errInvalidValue, m.value) - } - return m.properties.validate() -} - -// Key returns the Member key. -func (m Member) Key() string { return m.key } - -// Value returns the Member value. -func (m Member) Value() string { return m.value } - -// Properties returns a copy of the Member properties. -func (m Member) Properties() []Property { return m.properties.Copy() } - -// String encodes Member into a header string compliant with the W3C Baggage -// specification. -// It would return empty string if the key is invalid with the W3C Baggage -// specification. This could happen for a UTF-8 key, as it may contain -// invalid characters. -func (m Member) String() string { - // W3C Baggage specification does not allow percent-encoded keys. - if !validateKey(m.key) { - return "" - } - - s := m.key + keyValueDelimiter + valueEscape(m.value) - if len(m.properties) > 0 { - s += propertyDelimiter + m.properties.String() - } - return s -} - -// Baggage is a list of baggage members representing the baggage-string as -// defined by the W3C Baggage specification. -type Baggage struct { //nolint:golint - list baggage.List -} - -// New returns a new valid Baggage. It returns an error if it results in a -// Baggage exceeding limits set in that specification. -// -// It expects all the provided members to have already been validated. -func New(members ...Member) (Baggage, error) { - if len(members) == 0 { - return Baggage{}, nil - } - - b := make(baggage.List) - for _, m := range members { - if !m.hasData { - return Baggage{}, errInvalidMember - } - - // OpenTelemetry resolves duplicates by last-one-wins. - b[m.key] = baggage.Item{ - Value: m.value, - Properties: m.properties.asInternal(), - } - } - - // Check member numbers after deduplication. - if len(b) > maxMembers { - return Baggage{}, errMemberNumber - } - - bag := Baggage{b} - if n := len(bag.String()); n > maxBytesPerBaggageString { - return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) - } - - return bag, nil -} - -// Parse attempts to decode a baggage-string from the passed string. It -// returns an error if the input is invalid according to the W3C Baggage -// specification. -// -// If there are duplicate list-members contained in baggage, the last one -// defined (reading left-to-right) will be the only one kept. This diverges -// from the W3C Baggage specification which allows duplicate list-members, but -// conforms to the OpenTelemetry Baggage specification. -func Parse(bStr string) (Baggage, error) { - if bStr == "" { - return Baggage{}, nil - } - - if n := len(bStr); n > maxBytesPerBaggageString { - return Baggage{}, fmt.Errorf("%w: %d", errBaggageBytes, n) - } - - b := make(baggage.List) - for _, memberStr := range strings.Split(bStr, listDelimiter) { - m, err := parseMember(memberStr) - if err != nil { - return Baggage{}, err - } - // OpenTelemetry resolves duplicates by last-one-wins. - b[m.key] = baggage.Item{ - Value: m.value, - Properties: m.properties.asInternal(), - } - } - - // OpenTelemetry does not allow for duplicate list-members, but the W3C - // specification does. Now that we have deduplicated, ensure the baggage - // does not exceed list-member limits. - if len(b) > maxMembers { - return Baggage{}, errMemberNumber - } - - return Baggage{b}, nil -} - -// Member returns the baggage list-member identified by key. -// -// If there is no list-member matching the passed key the returned Member will -// be a zero-value Member. -// The returned member is not validated, as we assume the validation happened -// when it was added to the Baggage. -func (b Baggage) Member(key string) Member { - v, ok := b.list[key] - if !ok { - // We do not need to worry about distinguishing between the situation - // where a zero-valued Member is included in the Baggage because a - // zero-valued Member is invalid according to the W3C Baggage - // specification (it has an empty key). - return newInvalidMember() - } - - return Member{ - key: key, - value: v.Value, - properties: fromInternalProperties(v.Properties), - hasData: true, - } -} - -// Members returns all the baggage list-members. -// The order of the returned list-members is not significant. -// -// The returned members are not validated, as we assume the validation happened -// when they were added to the Baggage. -func (b Baggage) Members() []Member { - if len(b.list) == 0 { - return nil - } - - members := make([]Member, 0, len(b.list)) - for k, v := range b.list { - members = append(members, Member{ - key: k, - value: v.Value, - properties: fromInternalProperties(v.Properties), - hasData: true, - }) - } - return members -} - -// SetMember returns a copy of the Baggage with the member included. If the -// baggage contains a Member with the same key, the existing Member is -// replaced. -// -// If member is invalid according to the W3C Baggage specification, an error -// is returned with the original Baggage. -func (b Baggage) SetMember(member Member) (Baggage, error) { - if !member.hasData { - return b, errInvalidMember - } - - n := len(b.list) - if _, ok := b.list[member.key]; !ok { - n++ - } - list := make(baggage.List, n) - - for k, v := range b.list { - // Do not copy if we are just going to overwrite. - if k == member.key { - continue - } - list[k] = v - } - - list[member.key] = baggage.Item{ - Value: member.value, - Properties: member.properties.asInternal(), - } - - return Baggage{list: list}, nil -} - -// DeleteMember returns a copy of the Baggage with the list-member identified -// by key removed. -func (b Baggage) DeleteMember(key string) Baggage { - n := len(b.list) - if _, ok := b.list[key]; ok { - n-- - } - list := make(baggage.List, n) - - for k, v := range b.list { - if k == key { - continue - } - list[k] = v - } - - return Baggage{list: list} -} - -// Len returns the number of list-members in the Baggage. -func (b Baggage) Len() int { - return len(b.list) -} - -// String encodes Baggage into a header string compliant with the W3C Baggage -// specification. -// It would ignore members where the member key is invalid with the W3C Baggage -// specification. This could happen for a UTF-8 key, as it may contain -// invalid characters. -func (b Baggage) String() string { - members := make([]string, 0, len(b.list)) - for k, v := range b.list { - s := Member{ - key: k, - value: v.Value, - properties: fromInternalProperties(v.Properties), - }.String() - - // Ignored empty members. - if s != "" { - members = append(members, s) - } - } - return strings.Join(members, listDelimiter) -} - -// parsePropertyInternal attempts to decode a Property from the passed string. -// It follows the spec at https://www.w3.org/TR/baggage/#definition. -func parsePropertyInternal(s string) (p Property, ok bool) { - // For the entire function we will use " key = value " as an example. - // Attempting to parse the key. - // First skip spaces at the beginning "< >key = value " (they could be empty). - index := skipSpace(s, 0) - - // Parse the key: " = value ". - keyStart := index - keyEnd := index - for _, c := range s[keyStart:] { - if !validateKeyChar(c) { - break - } - keyEnd++ - } - - // If we couldn't find any valid key character, - // it means the key is either empty or invalid. - if keyStart == keyEnd { - return p, ok - } - - // Skip spaces after the key: " key< >= value ". - index = skipSpace(s, keyEnd) - - if index == len(s) { - // A key can have no value, like: " key ". - ok = true - p.key = s[keyStart:keyEnd] - return p, ok - } - - // If we have not reached the end and we can't find the '=' delimiter, - // it means the property is invalid. - if s[index] != keyValueDelimiter[0] { - return p, ok - } - - // Attempting to parse the value. - // Match: " key =< >value ". - index = skipSpace(s, index+1) - - // Match the value string: " key = ". - // A valid property can be: " key =". - // Therefore, we don't have to check if the value is empty. - valueStart := index - valueEnd := index - for _, c := range s[valueStart:] { - if !validateValueChar(c) { - break - } - valueEnd++ - } - - // Skip all trailing whitespaces: " key = value< >". - index = skipSpace(s, valueEnd) - - // If after looking for the value and skipping whitespaces - // we have not reached the end, it means the property is - // invalid, something like: " key = value value1". - if index != len(s) { - return p, ok - } - - // Decode a percent-encoded value. - rawVal := s[valueStart:valueEnd] - unescapeVal, err := url.PathUnescape(rawVal) - if err != nil { - return p, ok - } - value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal) - - ok = true - p.key = s[keyStart:keyEnd] - p.hasValue = true - - p.value = value - return p, ok -} - -func skipSpace(s string, offset int) int { - i := offset - for ; i < len(s); i++ { - c := s[i] - if c != ' ' && c != '\t' { - break - } - } - return i -} - -var safeKeyCharset = [utf8.RuneSelf]bool{ - // 0x23 to 0x27 - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - - // 0x30 to 0x39 - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - - // 0x41 to 0x5a - 'A': true, - 'B': true, - 'C': true, - 'D': true, - 'E': true, - 'F': true, - 'G': true, - 'H': true, - 'I': true, - 'J': true, - 'K': true, - 'L': true, - 'M': true, - 'N': true, - 'O': true, - 'P': true, - 'Q': true, - 'R': true, - 'S': true, - 'T': true, - 'U': true, - 'V': true, - 'W': true, - 'X': true, - 'Y': true, - 'Z': true, - - // 0x5e to 0x7a - '^': true, - '_': true, - '`': true, - 'a': true, - 'b': true, - 'c': true, - 'd': true, - 'e': true, - 'f': true, - 'g': true, - 'h': true, - 'i': true, - 'j': true, - 'k': true, - 'l': true, - 'm': true, - 'n': true, - 'o': true, - 'p': true, - 'q': true, - 'r': true, - 's': true, - 't': true, - 'u': true, - 'v': true, - 'w': true, - 'x': true, - 'y': true, - 'z': true, - - // remainder - '!': true, - '*': true, - '+': true, - '-': true, - '.': true, - '|': true, - '~': true, -} - -// validateBaggageName checks if the string is a valid OpenTelemetry Baggage name. -// Baggage name is a valid, non-empty UTF-8 string. -func validateBaggageName(s string) bool { - if s == "" { - return false - } - - return utf8.ValidString(s) -} - -// validateBaggageValue checks if the string is a valid OpenTelemetry Baggage value. -// Baggage value is a valid UTF-8 strings. -// Empty string is also a valid UTF-8 string. -func validateBaggageValue(s string) bool { - return utf8.ValidString(s) -} - -// validateKey checks if the string is a valid W3C Baggage key. -func validateKey(s string) bool { - if s == "" { - return false - } - - for _, c := range s { - if !validateKeyChar(c) { - return false - } - } - - return true -} - -func validateKeyChar(c int32) bool { - return c >= 0 && c < int32(utf8.RuneSelf) && safeKeyCharset[c] -} - -// validateValue checks if the string is a valid W3C Baggage value. -func validateValue(s string) bool { - for _, c := range s { - if !validateValueChar(c) { - return false - } - } - - return true -} - -var safeValueCharset = [utf8.RuneSelf]bool{ - '!': true, // 0x21 - - // 0x23 to 0x2b - '#': true, - '$': true, - '%': true, - '&': true, - '\'': true, - '(': true, - ')': true, - '*': true, - '+': true, - - // 0x2d to 0x3a - '-': true, - '.': true, - '/': true, - '0': true, - '1': true, - '2': true, - '3': true, - '4': true, - '5': true, - '6': true, - '7': true, - '8': true, - '9': true, - ':': true, - - // 0x3c to 0x5b - '<': true, // 0x3C - '=': true, // 0x3D - '>': true, // 0x3E - '?': true, // 0x3F - '@': true, // 0x40 - 'A': true, // 0x41 - 'B': true, // 0x42 - 'C': true, // 0x43 - 'D': true, // 0x44 - 'E': true, // 0x45 - 'F': true, // 0x46 - 'G': true, // 0x47 - 'H': true, // 0x48 - 'I': true, // 0x49 - 'J': true, // 0x4A - 'K': true, // 0x4B - 'L': true, // 0x4C - 'M': true, // 0x4D - 'N': true, // 0x4E - 'O': true, // 0x4F - 'P': true, // 0x50 - 'Q': true, // 0x51 - 'R': true, // 0x52 - 'S': true, // 0x53 - 'T': true, // 0x54 - 'U': true, // 0x55 - 'V': true, // 0x56 - 'W': true, // 0x57 - 'X': true, // 0x58 - 'Y': true, // 0x59 - 'Z': true, // 0x5A - '[': true, // 0x5B - - // 0x5d to 0x7e - ']': true, // 0x5D - '^': true, // 0x5E - '_': true, // 0x5F - '`': true, // 0x60 - 'a': true, // 0x61 - 'b': true, // 0x62 - 'c': true, // 0x63 - 'd': true, // 0x64 - 'e': true, // 0x65 - 'f': true, // 0x66 - 'g': true, // 0x67 - 'h': true, // 0x68 - 'i': true, // 0x69 - 'j': true, // 0x6A - 'k': true, // 0x6B - 'l': true, // 0x6C - 'm': true, // 0x6D - 'n': true, // 0x6E - 'o': true, // 0x6F - 'p': true, // 0x70 - 'q': true, // 0x71 - 'r': true, // 0x72 - 's': true, // 0x73 - 't': true, // 0x74 - 'u': true, // 0x75 - 'v': true, // 0x76 - 'w': true, // 0x77 - 'x': true, // 0x78 - 'y': true, // 0x79 - 'z': true, // 0x7A - '{': true, // 0x7B - '|': true, // 0x7C - '}': true, // 0x7D - '~': true, // 0x7E -} - -func validateValueChar(c int32) bool { - return c >= 0 && c < int32(utf8.RuneSelf) && safeValueCharset[c] -} - -// valueEscape escapes the string so it can be safely placed inside a baggage value, -// replacing special characters with %XX sequences as needed. -// -// The implementation is based on: -// https://github.com/golang/go/blob/f6509cf5cdbb5787061b784973782933c47f1782/src/net/url/url.go#L285. -func valueEscape(s string) string { - hexCount := 0 - for i := 0; i < len(s); i++ { - c := s[i] - if shouldEscape(c) { - hexCount++ - } - } - - if hexCount == 0 { - return s - } - - var buf [64]byte - var t []byte - - required := len(s) + 2*hexCount - if required <= len(buf) { - t = buf[:required] - } else { - t = make([]byte, required) - } - - j := 0 - for i := 0; i < len(s); i++ { - c := s[i] - if shouldEscape(s[i]) { - const upperhex = "0123456789ABCDEF" - t[j] = '%' - t[j+1] = upperhex[c>>4] - t[j+2] = upperhex[c&15] - j += 3 - } else { - t[j] = c - j++ - } - } - - return string(t) -} - -// shouldEscape returns true if the specified byte should be escaped when -// appearing in a baggage value string. -func shouldEscape(c byte) bool { - if c == '%' { - // The percent character must be encoded so that percent-encoding can work. - return true - } - return !validateValueChar(int32(c)) -} diff --git a/vendor/go.opentelemetry.io/otel/baggage/context.go b/vendor/go.opentelemetry.io/otel/baggage/context.go deleted file mode 100644 index a572461a05..0000000000 --- a/vendor/go.opentelemetry.io/otel/baggage/context.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package baggage // import "go.opentelemetry.io/otel/baggage" - -import ( - "context" - - "go.opentelemetry.io/otel/internal/baggage" -) - -// ContextWithBaggage returns a copy of parent with baggage. -func ContextWithBaggage(parent context.Context, b Baggage) context.Context { - // Delegate so any hooks for the OpenTracing bridge are handled. - return baggage.ContextWithList(parent, b.list) -} - -// ContextWithoutBaggage returns a copy of parent with no baggage. -func ContextWithoutBaggage(parent context.Context) context.Context { - // Delegate so any hooks for the OpenTracing bridge are handled. - return baggage.ContextWithList(parent, nil) -} - -// FromContext returns the baggage contained in ctx. -func FromContext(ctx context.Context) Baggage { - // Delegate so any hooks for the OpenTracing bridge are handled. - return Baggage{list: baggage.ListFromContext(ctx)} -} diff --git a/vendor/go.opentelemetry.io/otel/baggage/doc.go b/vendor/go.opentelemetry.io/otel/baggage/doc.go deleted file mode 100644 index b51d87cab7..0000000000 --- a/vendor/go.opentelemetry.io/otel/baggage/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package baggage provides functionality for storing and retrieving -baggage items in Go context. For propagating the baggage, see the -go.opentelemetry.io/otel/propagation package. -*/ -package baggage // import "go.opentelemetry.io/otel/baggage" diff --git a/vendor/go.opentelemetry.io/otel/codes/README.md b/vendor/go.opentelemetry.io/otel/codes/README.md deleted file mode 100644 index 24c52b387d..0000000000 --- a/vendor/go.opentelemetry.io/otel/codes/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Codes - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/codes)](https://pkg.go.dev/go.opentelemetry.io/otel/codes) diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go deleted file mode 100644 index d48847ed86..0000000000 --- a/vendor/go.opentelemetry.io/otel/codes/codes.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package codes // import "go.opentelemetry.io/otel/codes" - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" -) - -const ( - // Unset is the default status code. - Unset Code = 0 - - // Error indicates the operation contains an error. - // - // NOTE: The error code in OTLP is 2. - // The value of this enum is only relevant to the internals - // of the Go SDK. - Error Code = 1 - - // Ok indicates operation has been validated by an Application developers - // or Operator to have completed successfully, or contain no error. - // - // NOTE: The Ok code in OTLP is 1. - // The value of this enum is only relevant to the internals - // of the Go SDK. - Ok Code = 2 - - maxCode = 3 -) - -// Code is an 32-bit representation of a status state. -type Code uint32 - -var codeToStr = map[Code]string{ - Unset: "Unset", - Error: "Error", - Ok: "Ok", -} - -var strToCode = map[string]Code{ - `"Unset"`: Unset, - `"Error"`: Error, - `"Ok"`: Ok, -} - -// String returns the Code as a string. -func (c Code) String() string { - return codeToStr[c] -} - -// UnmarshalJSON unmarshals b into the Code. -// -// This is based on the functionality in the gRPC codes package: -// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 -func (c *Code) UnmarshalJSON(b []byte) error { - // From json.Unmarshaler: By convention, to approximate the behavior of - // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as - // a no-op. - if string(b) == "null" { - return nil - } - if c == nil { - return errors.New("nil receiver passed to UnmarshalJSON") - } - - var x any - if err := json.Unmarshal(b, &x); err != nil { - return err - } - switch x.(type) { - case string: - if jc, ok := strToCode[string(b)]; ok { - *c = jc - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - case float64: - if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { - if ci >= maxCode { - return fmt.Errorf("invalid code: %q", ci) - } - - *c = Code(ci) // nolint: gosec // Bit size of 32 check above. - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - default: - return fmt.Errorf("invalid code: %q", string(b)) - } -} - -// MarshalJSON returns c as the JSON encoding of c. -func (c *Code) MarshalJSON() ([]byte, error) { - if c == nil { - return []byte("null"), nil - } - str, ok := codeToStr[*c] - if !ok { - return nil, fmt.Errorf("invalid code: %d", *c) - } - return fmt.Appendf(nil, "%q", str), nil -} diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go deleted file mode 100644 index ee8db448b8..0000000000 --- a/vendor/go.opentelemetry.io/otel/codes/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package codes defines the canonical error codes used by OpenTelemetry. - -It conforms to [the OpenTelemetry -specification](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/trace/api.md#set-status). -*/ -package codes // import "go.opentelemetry.io/otel/codes" diff --git a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile b/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile deleted file mode 100644 index cadb87cc0e..0000000000 --- a/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -# This is a renovate-friendly source of Docker images. -FROM python:3.13.6-slim-bullseye@sha256:e98b521460ee75bca92175c16247bdf7275637a8faaeb2bcfa19d879ae5c4b9a AS python -FROM otel/weaver:v0.19.0@sha256:3d20814cef548f1d31f27f054fb4cd6a05125641a9f7cc29fc7eb234e8052cd9 AS weaver -FROM avtodev/markdown-lint:v1@sha256:6aeedc2f49138ce7a1cd0adffc1b1c0321b841dc2102408967d9301c031949ee AS markdown diff --git a/vendor/go.opentelemetry.io/otel/doc.go b/vendor/go.opentelemetry.io/otel/doc.go deleted file mode 100644 index 921f85961a..0000000000 --- a/vendor/go.opentelemetry.io/otel/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package otel provides global access to the OpenTelemetry API. The subpackages of -the otel package provide an implementation of the OpenTelemetry API. - -The provided API is used to instrument code and measure data about that code's -performance and operation. The measured data, by default, is not processed or -transmitted anywhere. An implementation of the OpenTelemetry SDK, like the -default SDK implementation (go.opentelemetry.io/otel/sdk), and associated -exporters are used to process and transport this data. - -To read the getting started guide, see https://opentelemetry.io/docs/languages/go/getting-started/. - -To read more about tracing, see go.opentelemetry.io/otel/trace. - -To read more about metrics, see go.opentelemetry.io/otel/metric. - -To read more about logs, see go.opentelemetry.io/otel/log. - -To read more about propagation, see go.opentelemetry.io/otel/propagation and -go.opentelemetry.io/otel/baggage. -*/ -package otel // import "go.opentelemetry.io/otel" diff --git a/vendor/go.opentelemetry.io/otel/error_handler.go b/vendor/go.opentelemetry.io/otel/error_handler.go deleted file mode 100644 index 67414c71e0..0000000000 --- a/vendor/go.opentelemetry.io/otel/error_handler.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -// ErrorHandler handles irremediable events. -type ErrorHandler interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Handle handles any error deemed irremediable by an OpenTelemetry - // component. - Handle(error) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -// ErrorHandlerFunc is a convenience adapter to allow the use of a function -// as an ErrorHandler. -type ErrorHandlerFunc func(error) - -var _ ErrorHandler = ErrorHandlerFunc(nil) - -// Handle handles the irremediable error by calling the ErrorHandlerFunc itself. -func (f ErrorHandlerFunc) Handle(err error) { - f(err) -} diff --git a/vendor/go.opentelemetry.io/otel/handler.go b/vendor/go.opentelemetry.io/otel/handler.go deleted file mode 100644 index 07623b6791..0000000000 --- a/vendor/go.opentelemetry.io/otel/handler.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -import ( - "go.opentelemetry.io/otel/internal/global" -) - -// Compile-time check global.ErrDelegator implements ErrorHandler. -var _ ErrorHandler = (*global.ErrDelegator)(nil) - -// GetErrorHandler returns the global ErrorHandler instance. -// -// The default ErrorHandler instance returned will log all errors to STDERR -// until an override ErrorHandler is set with SetErrorHandler. All -// ErrorHandler returned prior to this will automatically forward errors to -// the set instance instead of logging. -// -// Subsequent calls to SetErrorHandler after the first will not forward errors -// to the new ErrorHandler for prior returned instances. -func GetErrorHandler() ErrorHandler { return global.GetErrorHandler() } - -// SetErrorHandler sets the global ErrorHandler to h. -// -// The first time this is called all ErrorHandler previously returned from -// GetErrorHandler will send errors to h instead of the default logging -// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not -// delegate errors to h. -func SetErrorHandler(h ErrorHandler) { global.SetErrorHandler(h) } - -// Handle is a convenience function for GetErrorHandler().Handle(err). -func Handle(err error) { global.GetErrorHandler().Handle(err) } diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go deleted file mode 100644 index b4f85f44a9..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package baggage provides base types and functionality to store and retrieve -baggage in Go context. This package exists because the OpenTracing bridge to -OpenTelemetry needs to synchronize state whenever baggage for a context is -modified and that context contains an OpenTracing span. If it were not for -this need this package would not need to exist and the -`go.opentelemetry.io/otel/baggage` package would be the singular place where -W3C baggage is handled. -*/ -package baggage // import "go.opentelemetry.io/otel/internal/baggage" - -// List is the collection of baggage members. The W3C allows for duplicates, -// but OpenTelemetry does not, therefore, this is represented as a map. -type List map[string]Item - -// Item is the value and metadata properties part of a list-member. -type Item struct { - Value string - Properties []Property -} - -// Property is a metadata entry for a list-member. -type Property struct { - Key, Value string - - // HasValue indicates if a zero-value value means the property does not - // have a value or if it was the zero-value. - HasValue bool -} diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go b/vendor/go.opentelemetry.io/otel/internal/baggage/context.go deleted file mode 100644 index 3aea9c491f..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/baggage/context.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package baggage // import "go.opentelemetry.io/otel/internal/baggage" - -import "context" - -type baggageContextKeyType int - -const baggageKey baggageContextKeyType = iota - -// SetHookFunc is a callback called when storing baggage in the context. -type SetHookFunc func(context.Context, List) context.Context - -// GetHookFunc is a callback called when getting baggage from the context. -type GetHookFunc func(context.Context, List) List - -type baggageState struct { - list List - - setHook SetHookFunc - getHook GetHookFunc -} - -// ContextWithSetHook returns a copy of parent with hook configured to be -// invoked every time ContextWithBaggage is called. -// -// Passing nil SetHookFunc creates a context with no set hook to call. -func ContextWithSetHook(parent context.Context, hook SetHookFunc) context.Context { - var s baggageState - if v, ok := parent.Value(baggageKey).(baggageState); ok { - s = v - } - - s.setHook = hook - return context.WithValue(parent, baggageKey, s) -} - -// ContextWithGetHook returns a copy of parent with hook configured to be -// invoked every time FromContext is called. -// -// Passing nil GetHookFunc creates a context with no get hook to call. -func ContextWithGetHook(parent context.Context, hook GetHookFunc) context.Context { - var s baggageState - if v, ok := parent.Value(baggageKey).(baggageState); ok { - s = v - } - - s.getHook = hook - return context.WithValue(parent, baggageKey, s) -} - -// ContextWithList returns a copy of parent with baggage. Passing nil list -// returns a context without any baggage. -func ContextWithList(parent context.Context, list List) context.Context { - var s baggageState - if v, ok := parent.Value(baggageKey).(baggageState); ok { - s = v - } - - s.list = list - ctx := context.WithValue(parent, baggageKey, s) - if s.setHook != nil { - ctx = s.setHook(ctx, list) - } - - return ctx -} - -// ListFromContext returns the baggage contained in ctx. -func ListFromContext(ctx context.Context) List { - switch v := ctx.Value(baggageKey).(type) { - case baggageState: - if v.getHook != nil { - return v.getHook(ctx, v.list) - } - return v.list - default: - return nil - } -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/handler.go b/vendor/go.opentelemetry.io/otel/internal/global/handler.go deleted file mode 100644 index 2e47b2964c..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/handler.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package global provides the OpenTelemetry global API. -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "log" - "sync/atomic" -) - -// ErrorHandler handles irremediable events. -type ErrorHandler interface { - // Handle handles any error deemed irremediable by an OpenTelemetry - // component. - Handle(error) -} - -type ErrDelegator struct { - delegate atomic.Pointer[ErrorHandler] -} - -// Compile-time check that delegator implements ErrorHandler. -var _ ErrorHandler = (*ErrDelegator)(nil) - -func (d *ErrDelegator) Handle(err error) { - if eh := d.delegate.Load(); eh != nil { - (*eh).Handle(err) - return - } - log.Print(err) -} - -// setDelegate sets the ErrorHandler delegate. -func (d *ErrDelegator) setDelegate(eh ErrorHandler) { - d.delegate.Store(&eh) -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go b/vendor/go.opentelemetry.io/otel/internal/global/instruments.go deleted file mode 100644 index ae92a42516..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/instruments.go +++ /dev/null @@ -1,412 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "context" - "sync/atomic" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/embedded" -) - -// unwrapper unwraps to return the underlying instrument implementation. -type unwrapper interface { - unwrap() metric.Observable -} - -type afCounter struct { - embedded.Float64ObservableCounter - metric.Float64Observable - - name string - opts []metric.Float64ObservableCounterOption - - delegate atomic.Value // metric.Float64ObservableCounter -} - -var ( - _ unwrapper = (*afCounter)(nil) - _ metric.Float64ObservableCounter = (*afCounter)(nil) -) - -func (i *afCounter) setDelegate(m metric.Meter) { - ctr, err := m.Float64ObservableCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *afCounter) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Float64ObservableCounter) - } - return nil -} - -type afUpDownCounter struct { - embedded.Float64ObservableUpDownCounter - metric.Float64Observable - - name string - opts []metric.Float64ObservableUpDownCounterOption - - delegate atomic.Value // metric.Float64ObservableUpDownCounter -} - -var ( - _ unwrapper = (*afUpDownCounter)(nil) - _ metric.Float64ObservableUpDownCounter = (*afUpDownCounter)(nil) -) - -func (i *afUpDownCounter) setDelegate(m metric.Meter) { - ctr, err := m.Float64ObservableUpDownCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *afUpDownCounter) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Float64ObservableUpDownCounter) - } - return nil -} - -type afGauge struct { - embedded.Float64ObservableGauge - metric.Float64Observable - - name string - opts []metric.Float64ObservableGaugeOption - - delegate atomic.Value // metric.Float64ObservableGauge -} - -var ( - _ unwrapper = (*afGauge)(nil) - _ metric.Float64ObservableGauge = (*afGauge)(nil) -) - -func (i *afGauge) setDelegate(m metric.Meter) { - ctr, err := m.Float64ObservableGauge(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *afGauge) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Float64ObservableGauge) - } - return nil -} - -type aiCounter struct { - embedded.Int64ObservableCounter - metric.Int64Observable - - name string - opts []metric.Int64ObservableCounterOption - - delegate atomic.Value // metric.Int64ObservableCounter -} - -var ( - _ unwrapper = (*aiCounter)(nil) - _ metric.Int64ObservableCounter = (*aiCounter)(nil) -) - -func (i *aiCounter) setDelegate(m metric.Meter) { - ctr, err := m.Int64ObservableCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *aiCounter) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Int64ObservableCounter) - } - return nil -} - -type aiUpDownCounter struct { - embedded.Int64ObservableUpDownCounter - metric.Int64Observable - - name string - opts []metric.Int64ObservableUpDownCounterOption - - delegate atomic.Value // metric.Int64ObservableUpDownCounter -} - -var ( - _ unwrapper = (*aiUpDownCounter)(nil) - _ metric.Int64ObservableUpDownCounter = (*aiUpDownCounter)(nil) -) - -func (i *aiUpDownCounter) setDelegate(m metric.Meter) { - ctr, err := m.Int64ObservableUpDownCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *aiUpDownCounter) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Int64ObservableUpDownCounter) - } - return nil -} - -type aiGauge struct { - embedded.Int64ObservableGauge - metric.Int64Observable - - name string - opts []metric.Int64ObservableGaugeOption - - delegate atomic.Value // metric.Int64ObservableGauge -} - -var ( - _ unwrapper = (*aiGauge)(nil) - _ metric.Int64ObservableGauge = (*aiGauge)(nil) -) - -func (i *aiGauge) setDelegate(m metric.Meter) { - ctr, err := m.Int64ObservableGauge(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *aiGauge) unwrap() metric.Observable { - if ctr := i.delegate.Load(); ctr != nil { - return ctr.(metric.Int64ObservableGauge) - } - return nil -} - -// Sync Instruments. -type sfCounter struct { - embedded.Float64Counter - - name string - opts []metric.Float64CounterOption - - delegate atomic.Value // metric.Float64Counter -} - -var _ metric.Float64Counter = (*sfCounter)(nil) - -func (i *sfCounter) setDelegate(m metric.Meter) { - ctr, err := m.Float64Counter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *sfCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Float64Counter).Add(ctx, incr, opts...) - } -} - -type sfUpDownCounter struct { - embedded.Float64UpDownCounter - - name string - opts []metric.Float64UpDownCounterOption - - delegate atomic.Value // metric.Float64UpDownCounter -} - -var _ metric.Float64UpDownCounter = (*sfUpDownCounter)(nil) - -func (i *sfUpDownCounter) setDelegate(m metric.Meter) { - ctr, err := m.Float64UpDownCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *sfUpDownCounter) Add(ctx context.Context, incr float64, opts ...metric.AddOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Float64UpDownCounter).Add(ctx, incr, opts...) - } -} - -type sfHistogram struct { - embedded.Float64Histogram - - name string - opts []metric.Float64HistogramOption - - delegate atomic.Value // metric.Float64Histogram -} - -var _ metric.Float64Histogram = (*sfHistogram)(nil) - -func (i *sfHistogram) setDelegate(m metric.Meter) { - ctr, err := m.Float64Histogram(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *sfHistogram) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Float64Histogram).Record(ctx, x, opts...) - } -} - -type sfGauge struct { - embedded.Float64Gauge - - name string - opts []metric.Float64GaugeOption - - delegate atomic.Value // metric.Float64Gauge -} - -var _ metric.Float64Gauge = (*sfGauge)(nil) - -func (i *sfGauge) setDelegate(m metric.Meter) { - ctr, err := m.Float64Gauge(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *sfGauge) Record(ctx context.Context, x float64, opts ...metric.RecordOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Float64Gauge).Record(ctx, x, opts...) - } -} - -type siCounter struct { - embedded.Int64Counter - - name string - opts []metric.Int64CounterOption - - delegate atomic.Value // metric.Int64Counter -} - -var _ metric.Int64Counter = (*siCounter)(nil) - -func (i *siCounter) setDelegate(m metric.Meter) { - ctr, err := m.Int64Counter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *siCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Int64Counter).Add(ctx, x, opts...) - } -} - -type siUpDownCounter struct { - embedded.Int64UpDownCounter - - name string - opts []metric.Int64UpDownCounterOption - - delegate atomic.Value // metric.Int64UpDownCounter -} - -var _ metric.Int64UpDownCounter = (*siUpDownCounter)(nil) - -func (i *siUpDownCounter) setDelegate(m metric.Meter) { - ctr, err := m.Int64UpDownCounter(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *siUpDownCounter) Add(ctx context.Context, x int64, opts ...metric.AddOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Int64UpDownCounter).Add(ctx, x, opts...) - } -} - -type siHistogram struct { - embedded.Int64Histogram - - name string - opts []metric.Int64HistogramOption - - delegate atomic.Value // metric.Int64Histogram -} - -var _ metric.Int64Histogram = (*siHistogram)(nil) - -func (i *siHistogram) setDelegate(m metric.Meter) { - ctr, err := m.Int64Histogram(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *siHistogram) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Int64Histogram).Record(ctx, x, opts...) - } -} - -type siGauge struct { - embedded.Int64Gauge - - name string - opts []metric.Int64GaugeOption - - delegate atomic.Value // metric.Int64Gauge -} - -var _ metric.Int64Gauge = (*siGauge)(nil) - -func (i *siGauge) setDelegate(m metric.Meter) { - ctr, err := m.Int64Gauge(i.name, i.opts...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - i.delegate.Store(ctr) -} - -func (i *siGauge) Record(ctx context.Context, x int64, opts ...metric.RecordOption) { - if ctr := i.delegate.Load(); ctr != nil { - ctr.(metric.Int64Gauge).Record(ctx, x, opts...) - } -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go deleted file mode 100644 index 86d7f4ba08..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/internal_logging.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "log" - "os" - "sync/atomic" - - "github.com/go-logr/logr" - "github.com/go-logr/stdr" -) - -// globalLogger holds a reference to the [logr.Logger] used within -// go.opentelemetry.io/otel. -// -// The default logger uses stdr which is backed by the standard `log.Logger` -// interface. This logger will only show messages at the Error Level. -var globalLogger = func() *atomic.Pointer[logr.Logger] { - l := stdr.New(log.New(os.Stderr, "", log.LstdFlags|log.Lshortfile)) - - p := new(atomic.Pointer[logr.Logger]) - p.Store(&l) - return p -}() - -// SetLogger sets the global Logger to l. -// -// To see Warn messages use a logger with `l.V(1).Enabled() == true` -// To see Info messages use a logger with `l.V(4).Enabled() == true` -// To see Debug messages use a logger with `l.V(8).Enabled() == true`. -func SetLogger(l logr.Logger) { - globalLogger.Store(&l) -} - -// GetLogger returns the global logger. -func GetLogger() logr.Logger { - return *globalLogger.Load() -} - -// Info prints messages about the general state of the API or SDK. -// This should usually be less than 5 messages a minute. -func Info(msg string, keysAndValues ...any) { - GetLogger().V(4).Info(msg, keysAndValues...) -} - -// Error prints messages about exceptional states of the API or SDK. -func Error(err error, msg string, keysAndValues ...any) { - GetLogger().Error(err, msg, keysAndValues...) -} - -// Debug prints messages about all internal changes in the API or SDK. -func Debug(msg string, keysAndValues ...any) { - GetLogger().V(8).Info(msg, keysAndValues...) -} - -// Warn prints messages about warnings in the API or SDK. -// Not an error but is likely more important than an informational event. -func Warn(msg string, keysAndValues ...any) { - GetLogger().V(1).Info(msg, keysAndValues...) -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go deleted file mode 100644 index 6db969f73c..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ /dev/null @@ -1,625 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "container/list" - "context" - "reflect" - "sync" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/embedded" -) - -// meterProvider is a placeholder for a configured SDK MeterProvider. -// -// All MeterProvider functionality is forwarded to a delegate once -// configured. -type meterProvider struct { - embedded.MeterProvider - - mtx sync.Mutex - meters map[il]*meter - - delegate metric.MeterProvider -} - -// setDelegate configures p to delegate all MeterProvider functionality to -// provider. -// -// All Meters provided prior to this function call are switched out to be -// Meters provided by provider. All instruments and callbacks are recreated and -// delegated. -// -// It is guaranteed by the caller that this happens only once. -func (p *meterProvider) setDelegate(provider metric.MeterProvider) { - p.mtx.Lock() - defer p.mtx.Unlock() - - p.delegate = provider - - if len(p.meters) == 0 { - return - } - - for _, meter := range p.meters { - meter.setDelegate(provider) - } - - p.meters = nil -} - -// Meter implements MeterProvider. -func (p *meterProvider) Meter(name string, opts ...metric.MeterOption) metric.Meter { - p.mtx.Lock() - defer p.mtx.Unlock() - - if p.delegate != nil { - return p.delegate.Meter(name, opts...) - } - - // At this moment it is guaranteed that no sdk is installed, save the meter in the meters map. - - c := metric.NewMeterConfig(opts...) - key := il{ - name: name, - version: c.InstrumentationVersion(), - schema: c.SchemaURL(), - attrs: c.InstrumentationAttributes(), - } - - if p.meters == nil { - p.meters = make(map[il]*meter) - } - - if val, ok := p.meters[key]; ok { - return val - } - - t := &meter{name: name, opts: opts, instruments: make(map[instID]delegatedInstrument)} - p.meters[key] = t - return t -} - -// meter is a placeholder for a metric.Meter. -// -// All Meter functionality is forwarded to a delegate once configured. -// Otherwise, all functionality is forwarded to a NoopMeter. -type meter struct { - embedded.Meter - - name string - opts []metric.MeterOption - - mtx sync.Mutex - instruments map[instID]delegatedInstrument - - registry list.List - - delegate metric.Meter -} - -type delegatedInstrument interface { - setDelegate(metric.Meter) -} - -// instID are the identifying properties of an instrument. -type instID struct { - // name is the name of the stream. - name string - // description is the description of the stream. - description string - // kind defines the functional group of the instrument. - kind reflect.Type - // unit is the unit of the stream. - unit string -} - -// setDelegate configures m to delegate all Meter functionality to Meters -// created by provider. -// -// All subsequent calls to the Meter methods will be passed to the delegate. -// -// It is guaranteed by the caller that this happens only once. -func (m *meter) setDelegate(provider metric.MeterProvider) { - m.mtx.Lock() - defer m.mtx.Unlock() - - meter := provider.Meter(m.name, m.opts...) - m.delegate = meter - - for _, inst := range m.instruments { - inst.setDelegate(meter) - } - - var n *list.Element - for e := m.registry.Front(); e != nil; e = n { - r := e.Value.(*registration) - r.setDelegate(meter) - n = e.Next() - m.registry.Remove(e) - } - - m.instruments = nil - m.registry.Init() -} - -func (m *meter) Int64Counter(name string, options ...metric.Int64CounterOption) (metric.Int64Counter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64Counter(name, options...) - } - - cfg := metric.NewInt64CounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*siCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64Counter), nil - } - i := &siCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64UpDownCounter( - name string, - options ...metric.Int64UpDownCounterOption, -) (metric.Int64UpDownCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64UpDownCounter(name, options...) - } - - cfg := metric.NewInt64UpDownCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*siUpDownCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64UpDownCounter), nil - } - i := &siUpDownCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64Histogram(name string, options ...metric.Int64HistogramOption) (metric.Int64Histogram, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64Histogram(name, options...) - } - - cfg := metric.NewInt64HistogramConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*siHistogram)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64Histogram), nil - } - i := &siHistogram{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64Gauge(name string, options ...metric.Int64GaugeOption) (metric.Int64Gauge, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64Gauge(name, options...) - } - - cfg := metric.NewInt64GaugeConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*siGauge)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64Gauge), nil - } - i := &siGauge{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64ObservableCounter( - name string, - options ...metric.Int64ObservableCounterOption, -) (metric.Int64ObservableCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64ObservableCounter(name, options...) - } - - cfg := metric.NewInt64ObservableCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*aiCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64ObservableCounter), nil - } - i := &aiCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64ObservableUpDownCounter( - name string, - options ...metric.Int64ObservableUpDownCounterOption, -) (metric.Int64ObservableUpDownCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64ObservableUpDownCounter(name, options...) - } - - cfg := metric.NewInt64ObservableUpDownCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*aiUpDownCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64ObservableUpDownCounter), nil - } - i := &aiUpDownCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Int64ObservableGauge( - name string, - options ...metric.Int64ObservableGaugeOption, -) (metric.Int64ObservableGauge, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Int64ObservableGauge(name, options...) - } - - cfg := metric.NewInt64ObservableGaugeConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*aiGauge)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Int64ObservableGauge), nil - } - i := &aiGauge{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64Counter(name string, options ...metric.Float64CounterOption) (metric.Float64Counter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64Counter(name, options...) - } - - cfg := metric.NewFloat64CounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*sfCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64Counter), nil - } - i := &sfCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64UpDownCounter( - name string, - options ...metric.Float64UpDownCounterOption, -) (metric.Float64UpDownCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64UpDownCounter(name, options...) - } - - cfg := metric.NewFloat64UpDownCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*sfUpDownCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64UpDownCounter), nil - } - i := &sfUpDownCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64Histogram( - name string, - options ...metric.Float64HistogramOption, -) (metric.Float64Histogram, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64Histogram(name, options...) - } - - cfg := metric.NewFloat64HistogramConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*sfHistogram)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64Histogram), nil - } - i := &sfHistogram{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64Gauge(name string, options ...metric.Float64GaugeOption) (metric.Float64Gauge, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64Gauge(name, options...) - } - - cfg := metric.NewFloat64GaugeConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*sfGauge)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64Gauge), nil - } - i := &sfGauge{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64ObservableCounter( - name string, - options ...metric.Float64ObservableCounterOption, -) (metric.Float64ObservableCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64ObservableCounter(name, options...) - } - - cfg := metric.NewFloat64ObservableCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*afCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64ObservableCounter), nil - } - i := &afCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64ObservableUpDownCounter( - name string, - options ...metric.Float64ObservableUpDownCounterOption, -) (metric.Float64ObservableUpDownCounter, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64ObservableUpDownCounter(name, options...) - } - - cfg := metric.NewFloat64ObservableUpDownCounterConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*afUpDownCounter)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64ObservableUpDownCounter), nil - } - i := &afUpDownCounter{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -func (m *meter) Float64ObservableGauge( - name string, - options ...metric.Float64ObservableGaugeOption, -) (metric.Float64ObservableGauge, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.Float64ObservableGauge(name, options...) - } - - cfg := metric.NewFloat64ObservableGaugeConfig(options...) - id := instID{ - name: name, - kind: reflect.TypeOf((*afGauge)(nil)), - description: cfg.Description(), - unit: cfg.Unit(), - } - if f, ok := m.instruments[id]; ok { - return f.(metric.Float64ObservableGauge), nil - } - i := &afGauge{name: name, opts: options} - m.instruments[id] = i - return i, nil -} - -// RegisterCallback captures the function that will be called during Collect. -func (m *meter) RegisterCallback(f metric.Callback, insts ...metric.Observable) (metric.Registration, error) { - m.mtx.Lock() - defer m.mtx.Unlock() - - if m.delegate != nil { - return m.delegate.RegisterCallback(unwrapCallback(f), unwrapInstruments(insts)...) - } - - reg := ®istration{instruments: insts, function: f} - e := m.registry.PushBack(reg) - reg.unreg = func() error { - m.mtx.Lock() - _ = m.registry.Remove(e) - m.mtx.Unlock() - return nil - } - return reg, nil -} - -func unwrapInstruments(instruments []metric.Observable) []metric.Observable { - out := make([]metric.Observable, 0, len(instruments)) - - for _, inst := range instruments { - if in, ok := inst.(unwrapper); ok { - out = append(out, in.unwrap()) - } else { - out = append(out, inst) - } - } - - return out -} - -type registration struct { - embedded.Registration - - instruments []metric.Observable - function metric.Callback - - unreg func() error - unregMu sync.Mutex -} - -type unwrapObs struct { - embedded.Observer - obs metric.Observer -} - -// unwrapFloat64Observable returns an expected metric.Float64Observable after -// unwrapping the global object. -func unwrapFloat64Observable(inst metric.Float64Observable) metric.Float64Observable { - if unwrapped, ok := inst.(unwrapper); ok { - if floatObs, ok := unwrapped.unwrap().(metric.Float64Observable); ok { - // Note: if the unwrapped object does not - // unwrap as an observable for either of the - // predicates here, it means an internal bug in - // this package. We avoid logging an error in - // this case, because the SDK has to try its - // own type conversion on the object. The SDK - // will see this and be forced to respond with - // its own error. - // - // This code uses a double-nested if statement - // to avoid creating a branch that is - // impossible to cover. - inst = floatObs - } - } - return inst -} - -// unwrapInt64Observable returns an expected metric.Int64Observable after -// unwrapping the global object. -func unwrapInt64Observable(inst metric.Int64Observable) metric.Int64Observable { - if unwrapped, ok := inst.(unwrapper); ok { - if unint, ok := unwrapped.unwrap().(metric.Int64Observable); ok { - // See the comment in unwrapFloat64Observable(). - inst = unint - } - } - return inst -} - -func (uo *unwrapObs) ObserveFloat64(inst metric.Float64Observable, value float64, opts ...metric.ObserveOption) { - uo.obs.ObserveFloat64(unwrapFloat64Observable(inst), value, opts...) -} - -func (uo *unwrapObs) ObserveInt64(inst metric.Int64Observable, value int64, opts ...metric.ObserveOption) { - uo.obs.ObserveInt64(unwrapInt64Observable(inst), value, opts...) -} - -func unwrapCallback(f metric.Callback) metric.Callback { - return func(ctx context.Context, obs metric.Observer) error { - return f(ctx, &unwrapObs{obs: obs}) - } -} - -func (c *registration) setDelegate(m metric.Meter) { - c.unregMu.Lock() - defer c.unregMu.Unlock() - - if c.unreg == nil { - // Unregister already called. - return - } - - reg, err := m.RegisterCallback(unwrapCallback(c.function), unwrapInstruments(c.instruments)...) - if err != nil { - GetErrorHandler().Handle(err) - return - } - - c.unreg = reg.Unregister -} - -func (c *registration) Unregister() error { - c.unregMu.Lock() - defer c.unregMu.Unlock() - if c.unreg == nil { - // Unregister already called. - return nil - } - - var err error - err, c.unreg = c.unreg(), nil - return err -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go deleted file mode 100644 index 38560ff991..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "context" - "sync" - - "go.opentelemetry.io/otel/propagation" -) - -// textMapPropagator is a default TextMapPropagator that delegates calls to a -// registered delegate if one is set, otherwise it defaults to delegating the -// calls to a the default no-op propagation.TextMapPropagator. -type textMapPropagator struct { - mtx sync.Mutex - once sync.Once - delegate propagation.TextMapPropagator - noop propagation.TextMapPropagator -} - -// Compile-time guarantee that textMapPropagator implements the -// propagation.TextMapPropagator interface. -var _ propagation.TextMapPropagator = (*textMapPropagator)(nil) - -func newTextMapPropagator() *textMapPropagator { - return &textMapPropagator{ - noop: propagation.NewCompositeTextMapPropagator(), - } -} - -// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are -// forwarded to. Delegation can only be performed once, all subsequent calls -// perform no delegation. -func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) { - if delegate == nil { - return - } - - p.mtx.Lock() - p.once.Do(func() { p.delegate = delegate }) - p.mtx.Unlock() -} - -// effectiveDelegate returns the current delegate of p if one is set, -// otherwise the default noop TextMapPropagator is returned. This method -// can be called concurrently. -func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator { - p.mtx.Lock() - defer p.mtx.Unlock() - if p.delegate != nil { - return p.delegate - } - return p.noop -} - -// Inject set cross-cutting concerns from the Context into the carrier. -func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { - p.effectiveDelegate().Inject(ctx, carrier) -} - -// Extract reads cross-cutting concerns from the carrier into a Context. -func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { - return p.effectiveDelegate().Extract(ctx, carrier) -} - -// Fields returns the keys whose values are set with Inject. -func (p *textMapPropagator) Fields() []string { - return p.effectiveDelegate().Fields() -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go deleted file mode 100644 index 204ea142a5..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/state.go +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -import ( - "errors" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/trace" -) - -type ( - errorHandlerHolder struct { - eh ErrorHandler - } - - tracerProviderHolder struct { - tp trace.TracerProvider - } - - propagatorsHolder struct { - tm propagation.TextMapPropagator - } - - meterProviderHolder struct { - mp metric.MeterProvider - } -) - -var ( - globalErrorHandler = defaultErrorHandler() - globalTracer = defaultTracerValue() - globalPropagators = defaultPropagatorsValue() - globalMeterProvider = defaultMeterProvider() - - delegateErrorHandlerOnce sync.Once - delegateTraceOnce sync.Once - delegateTextMapPropagatorOnce sync.Once - delegateMeterOnce sync.Once -) - -// GetErrorHandler returns the global ErrorHandler instance. -// -// The default ErrorHandler instance returned will log all errors to STDERR -// until an override ErrorHandler is set with SetErrorHandler. All -// ErrorHandler returned prior to this will automatically forward errors to -// the set instance instead of logging. -// -// Subsequent calls to SetErrorHandler after the first will not forward errors -// to the new ErrorHandler for prior returned instances. -func GetErrorHandler() ErrorHandler { - return globalErrorHandler.Load().(errorHandlerHolder).eh -} - -// SetErrorHandler sets the global ErrorHandler to h. -// -// The first time this is called all ErrorHandler previously returned from -// GetErrorHandler will send errors to h instead of the default logging -// ErrorHandler. Subsequent calls will set the global ErrorHandler, but not -// delegate errors to h. -func SetErrorHandler(h ErrorHandler) { - current := GetErrorHandler() - - if _, cOk := current.(*ErrDelegator); cOk { - if _, ehOk := h.(*ErrDelegator); ehOk && current == h { - // Do not assign to the delegate of the default ErrDelegator to be - // itself. - Error( - errors.New("no ErrorHandler delegate configured"), - "ErrorHandler remains its current value.", - ) - return - } - } - - delegateErrorHandlerOnce.Do(func() { - if def, ok := current.(*ErrDelegator); ok { - def.setDelegate(h) - } - }) - globalErrorHandler.Store(errorHandlerHolder{eh: h}) -} - -// TracerProvider is the internal implementation for global.TracerProvider. -func TracerProvider() trace.TracerProvider { - return globalTracer.Load().(tracerProviderHolder).tp -} - -// SetTracerProvider is the internal implementation for global.SetTracerProvider. -func SetTracerProvider(tp trace.TracerProvider) { - current := TracerProvider() - - if _, cOk := current.(*tracerProvider); cOk { - if _, tpOk := tp.(*tracerProvider); tpOk && current == tp { - // Do not assign the default delegating TracerProvider to delegate - // to itself. - Error( - errors.New("no delegate configured in tracer provider"), - "Setting tracer provider to its current value. No delegate will be configured", - ) - return - } - } - - delegateTraceOnce.Do(func() { - if def, ok := current.(*tracerProvider); ok { - def.setDelegate(tp) - } - }) - globalTracer.Store(tracerProviderHolder{tp: tp}) -} - -// TextMapPropagator is the internal implementation for global.TextMapPropagator. -func TextMapPropagator() propagation.TextMapPropagator { - return globalPropagators.Load().(propagatorsHolder).tm -} - -// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator. -func SetTextMapPropagator(p propagation.TextMapPropagator) { - current := TextMapPropagator() - - if _, cOk := current.(*textMapPropagator); cOk { - if _, pOk := p.(*textMapPropagator); pOk && current == p { - // Do not assign the default delegating TextMapPropagator to - // delegate to itself. - Error( - errors.New("no delegate configured in text map propagator"), - "Setting text map propagator to its current value. No delegate will be configured", - ) - return - } - } - - // For the textMapPropagator already returned by TextMapPropagator - // delegate to p. - delegateTextMapPropagatorOnce.Do(func() { - if def, ok := current.(*textMapPropagator); ok { - def.SetDelegate(p) - } - }) - // Return p when subsequent calls to TextMapPropagator are made. - globalPropagators.Store(propagatorsHolder{tm: p}) -} - -// MeterProvider is the internal implementation for global.MeterProvider. -func MeterProvider() metric.MeterProvider { - return globalMeterProvider.Load().(meterProviderHolder).mp -} - -// SetMeterProvider is the internal implementation for global.SetMeterProvider. -func SetMeterProvider(mp metric.MeterProvider) { - current := MeterProvider() - if _, cOk := current.(*meterProvider); cOk { - if _, mpOk := mp.(*meterProvider); mpOk && current == mp { - // Do not assign the default delegating MeterProvider to delegate - // to itself. - Error( - errors.New("no delegate configured in meter provider"), - "Setting meter provider to its current value. No delegate will be configured", - ) - return - } - } - - delegateMeterOnce.Do(func() { - if def, ok := current.(*meterProvider); ok { - def.setDelegate(mp) - } - }) - globalMeterProvider.Store(meterProviderHolder{mp: mp}) -} - -func defaultErrorHandler() *atomic.Value { - v := &atomic.Value{} - v.Store(errorHandlerHolder{eh: &ErrDelegator{}}) - return v -} - -func defaultTracerValue() *atomic.Value { - v := &atomic.Value{} - v.Store(tracerProviderHolder{tp: &tracerProvider{}}) - return v -} - -func defaultPropagatorsValue() *atomic.Value { - v := &atomic.Value{} - v.Store(propagatorsHolder{tm: newTextMapPropagator()}) - return v -} - -func defaultMeterProvider() *atomic.Value { - v := &atomic.Value{} - v.Store(meterProviderHolder{mp: &meterProvider{}}) - return v -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go deleted file mode 100644 index bf5cf3119b..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/trace.go +++ /dev/null @@ -1,232 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/internal/global" - -/* -This file contains the forwarding implementation of the TracerProvider used as -the default global instance. Prior to initialization of an SDK, Tracers -returned by the global TracerProvider will provide no-op functionality. This -means that all Span created prior to initialization are no-op Spans. - -Once an SDK has been initialized, all provided no-op Tracers are swapped for -Tracers provided by the SDK defined TracerProvider. However, any Span started -prior to this initialization does not change its behavior. Meaning, the Span -remains a no-op Span. - -The implementation to track and swap Tracers locks all new Tracer creation -until the swap is complete. This assumes that this operation is not -performance-critical. If that assumption is incorrect, be sure to configure an -SDK prior to any Tracer creation. -*/ - -import ( - "context" - "sync" - "sync/atomic" - - "go.opentelemetry.io/auto/sdk" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/embedded" -) - -// tracerProvider is a placeholder for a configured SDK TracerProvider. -// -// All TracerProvider functionality is forwarded to a delegate once -// configured. -type tracerProvider struct { - embedded.TracerProvider - - mtx sync.Mutex - tracers map[il]*tracer - delegate trace.TracerProvider -} - -// Compile-time guarantee that tracerProvider implements the TracerProvider -// interface. -var _ trace.TracerProvider = &tracerProvider{} - -// setDelegate configures p to delegate all TracerProvider functionality to -// provider. -// -// All Tracers provided prior to this function call are switched out to be -// Tracers provided by provider. -// -// It is guaranteed by the caller that this happens only once. -func (p *tracerProvider) setDelegate(provider trace.TracerProvider) { - p.mtx.Lock() - defer p.mtx.Unlock() - - p.delegate = provider - - if len(p.tracers) == 0 { - return - } - - for _, t := range p.tracers { - t.setDelegate(provider) - } - - p.tracers = nil -} - -// Tracer implements TracerProvider. -func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - p.mtx.Lock() - defer p.mtx.Unlock() - - if p.delegate != nil { - return p.delegate.Tracer(name, opts...) - } - - // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map. - - c := trace.NewTracerConfig(opts...) - key := il{ - name: name, - version: c.InstrumentationVersion(), - schema: c.SchemaURL(), - attrs: c.InstrumentationAttributes(), - } - - if p.tracers == nil { - p.tracers = make(map[il]*tracer) - } - - if val, ok := p.tracers[key]; ok { - return val - } - - t := &tracer{name: name, opts: opts, provider: p} - p.tracers[key] = t - return t -} - -type il struct { - name string - version string - schema string - attrs attribute.Set -} - -// tracer is a placeholder for a trace.Tracer. -// -// All Tracer functionality is forwarded to a delegate once configured. -// Otherwise, all functionality is forwarded to a NoopTracer. -type tracer struct { - embedded.Tracer - - name string - opts []trace.TracerOption - provider *tracerProvider - - delegate atomic.Value -} - -// Compile-time guarantee that tracer implements the trace.Tracer interface. -var _ trace.Tracer = &tracer{} - -// setDelegate configures t to delegate all Tracer functionality to Tracers -// created by provider. -// -// All subsequent calls to the Tracer methods will be passed to the delegate. -// -// It is guaranteed by the caller that this happens only once. -func (t *tracer) setDelegate(provider trace.TracerProvider) { - t.delegate.Store(provider.Tracer(t.name, t.opts...)) -} - -// Start implements trace.Tracer by forwarding the call to t.delegate if -// set, otherwise it forwards the call to a NoopTracer. -func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanStartOption) (context.Context, trace.Span) { - delegate := t.delegate.Load() - if delegate != nil { - return delegate.(trace.Tracer).Start(ctx, name, opts...) - } - - return t.newSpan(ctx, autoInstEnabled, name, opts) -} - -// autoInstEnabled determines if the auto-instrumentation SDK span is returned -// from the tracer when not backed by a delegate and auto-instrumentation has -// attached to this process. -// -// The auto-instrumentation is expected to overwrite this value to true when it -// attaches. By default, this will point to false and mean a tracer will return -// a nonRecordingSpan by default. -var autoInstEnabled = new(bool) - -// newSpan is called by tracer.Start so auto-instrumentation can attach an eBPF -// uprobe to this code. -// -// "noinline" pragma prevents the method from ever being inlined. -// -//go:noinline -func (t *tracer) newSpan( - ctx context.Context, - autoSpan *bool, - name string, - opts []trace.SpanStartOption, -) (context.Context, trace.Span) { - // autoInstEnabled is passed to newSpan via the autoSpan parameter. This is - // so the auto-instrumentation can define a uprobe for (*t).newSpan and be - // provided with the address of the bool autoInstEnabled points to. It - // needs to be a parameter so that pointer can be reliably determined, it - // should not be read from the global. - - if *autoSpan { - tracer := sdk.TracerProvider().Tracer(t.name, t.opts...) - return tracer.Start(ctx, name, opts...) - } - - s := nonRecordingSpan{sc: trace.SpanContextFromContext(ctx), tracer: t} - ctx = trace.ContextWithSpan(ctx, s) - return ctx, s -} - -// nonRecordingSpan is a minimal implementation of a Span that wraps a -// SpanContext. It performs no operations other than to return the wrapped -// SpanContext. -type nonRecordingSpan struct { - embedded.Span - - sc trace.SpanContext - tracer *tracer -} - -var _ trace.Span = nonRecordingSpan{} - -// SpanContext returns the wrapped SpanContext. -func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc } - -// IsRecording always returns false. -func (nonRecordingSpan) IsRecording() bool { return false } - -// SetStatus does nothing. -func (nonRecordingSpan) SetStatus(codes.Code, string) {} - -// SetError does nothing. -func (nonRecordingSpan) SetError(bool) {} - -// SetAttributes does nothing. -func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (nonRecordingSpan) End(...trace.SpanEndOption) {} - -// RecordError does nothing. -func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} - -// AddEvent does nothing. -func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} - -// AddLink does nothing. -func (nonRecordingSpan) AddLink(trace.Link) {} - -// SetName does nothing. -func (nonRecordingSpan) SetName(string) {} - -func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider } diff --git a/vendor/go.opentelemetry.io/otel/internal_logging.go b/vendor/go.opentelemetry.io/otel/internal_logging.go deleted file mode 100644 index 6de7f2e4d8..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal_logging.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -import ( - "github.com/go-logr/logr" - - "go.opentelemetry.io/otel/internal/global" -) - -// SetLogger configures the logger used internally to opentelemetry. -func SetLogger(logger logr.Logger) { - global.SetLogger(logger) -} diff --git a/vendor/go.opentelemetry.io/otel/log/DESIGN.md b/vendor/go.opentelemetry.io/otel/log/DESIGN.md deleted file mode 100644 index 47d39d34bf..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/DESIGN.md +++ /dev/null @@ -1,634 +0,0 @@ -# Logs API - -## Abstract - -`go.opentelemetry.io/otel/log` provides -[Logs API](https://opentelemetry.io/docs/specs/otel/logs/api/). - -The prototype was created in -[#4725](https://github.com/open-telemetry/opentelemetry-go/pull/4725). - -## Background - -The key challenge is to create a performant API compliant with the [specification](https://opentelemetry.io/docs/specs/otel/logs/api/) -with an intuitive and user friendly design. -Performance is seen as one of the most important characteristics of logging libraries in Go. - -## Design - -This proposed design aims to: - -- be specification compliant, -- be similar to Trace and Metrics API, -- take advantage of both OpenTelemetry and `slog` experience to achieve acceptable performance. - -### Module structure - -The API is published as a single `go.opentelemetry.io/otel/log` Go module. - -The package structure is similar to Trace API and Metrics API. -The Go module consists of the following packages: - -- `go.opentelemetry.io/otel/log` -- `go.opentelemetry.io/otel/log/embedded` -- `go.opentelemetry.io/otel/log/logtest` -- `go.opentelemetry.io/otel/log/noop` - -Rejected alternative: - -- [Reuse slog](#reuse-slog) - -### LoggerProvider - -The [`LoggerProvider` abstraction](https://opentelemetry.io/docs/specs/otel/logs/api/#loggerprovider) -is defined as `LoggerProvider` interface in [provider.go](provider.go). - -The specification may add new operations to `LoggerProvider`. -The interface may have methods added without a package major version bump. -This embeds `embedded.LoggerProvider` to help inform an API implementation -author about this non-standard API evolution. -This approach is already used in Trace API and Metrics API. - -#### LoggerProvider.Logger - -The `Logger` method implements the [`Get a Logger` operation](https://opentelemetry.io/docs/specs/otel/logs/api/#get-a-logger). - -The required `name` parameter is accepted as a `string` method argument. - -The `LoggerOption` options are defined to support optional parameters. - -Implementation requirements: - -- The [specification requires](https://opentelemetry.io/docs/specs/otel/logs/api/#concurrency-requirements) - the method to be safe to be called concurrently. - -- The method should use some default name if the passed name is empty - in order to meet the [specification's SDK requirement](https://opentelemetry.io/docs/specs/otel/logs/sdk/#logger-creation) - to return a working logger when an invalid name is passed - as well as to resemble the behavior of getting tracers and meters. - -`Logger` can be extended by adding new `LoggerOption` options -and adding new exported fields to the `LoggerConfig` struct. -This design is already used in Trace API for getting tracers -and in Metrics API for getting meters. - -Rejected alternative: - -- [Passing struct as parameter to LoggerProvider.Logger](#passing-struct-as-parameter-to-loggerproviderlogger). - -### Logger - -The [`Logger` abstraction](https://opentelemetry.io/docs/specs/otel/logs/api/#logger) -is defined as `Logger` interface in [logger.go](logger.go). - -The specification may add new operations to `Logger`. -The interface may have methods added without a package major version bump. -This embeds `embedded.Logger` to help inform an API implementation -author about this non-standard API evolution. -This approach is already used in Trace API and Metrics API. - -### Logger.Emit - -The `Emit` method implements the [`Emit a LogRecord` operation](https://opentelemetry.io/docs/specs/otel/logs/api/#emit-a-logrecord). - -[`Context` associated with the `LogRecord`](https://opentelemetry.io/docs/specs/otel/context/) -is accepted as a `context.Context` method argument. - -Calls to `Emit` are supposed to be on the hot path. -Therefore, in order to reduce the number of heap allocations, -the [`LogRecord` abstraction](https://opentelemetry.io/docs/specs/otel/logs/api/#emit-a-logrecord), -is defined as `Record` struct in [record.go](record.go). - -[`Timestamp`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-timestamp) -is accessed using following methods: - -```go -func (r *Record) Timestamp() time.Time -func (r *Record) SetTimestamp(t time.Time) -``` - -[`ObservedTimestamp`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-observedtimestamp) -is accessed using following methods: - -```go -func (r *Record) ObservedTimestamp() time.Time -func (r *Record) SetObservedTimestamp(t time.Time) -``` - -[`EventName`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-eventname) -is accessed using following methods: - -```go -func (r *Record) EventName() string -func (r *Record) SetEventName(s string) -``` - -[`SeverityNumber`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitynumber) -is accessed using following methods: - -```go -func (r *Record) Severity() Severity -func (r *Record) SetSeverity(s Severity) -``` - -`Severity` type is defined in [severity.go](severity.go). -The constants are are based on -[Displaying Severity recommendation](https://opentelemetry.io/docs/specs/otel/logs/data-model/#displaying-severity). -Additionally, `Severity[Level]` constants are defined to make the API more readable and user friendly. - -[`SeverityText`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitytext) -is accessed using following methods: - -```go -func (r *Record) SeverityText() string -func (r *Record) SetSeverityText(s string) -``` - -[`Body`](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-body) -is accessed using following methods: - -```go -func (r *Record) Body() Value -func (r *Record) SetBody(v Value) -``` - -[Log record attributes](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-attributes) -are accessed using following methods: - -```go -func (r *Record) WalkAttributes(f func(KeyValue) bool) -func (r *Record) AddAttributes(attrs ...KeyValue) -``` - -`Record` has a `AttributesLen` method that returns -the number of attributes to allow slice preallocation -when converting records to a different representation: - -```go -func (r *Record) AttributesLen() int -``` - -The records attributes design and implementation is based on -[`slog.Record`](https://pkg.go.dev/log/slog#Record). -It allows achieving high-performance access and manipulation of the attributes -while keeping the API user friendly. -It relieves the user from making his own improvements -for reducing the number of allocations when passing attributes. - -The abstractions described in -[the specification](https://opentelemetry.io/docs/specs/otel/logs/#new-first-party-application-logs) -are defined in [keyvalue.go](keyvalue.go). - -`Value` is representing `any`. -`KeyValue` is representing a key(string)-value(`any`) pair. - -`Kind` is an enumeration used for specifying the underlying value type. -`KindEmpty` is used for an empty (zero) value. -`KindBool` is used for boolean value. -`KindFloat64` is used for a double precision floating point (IEEE 754-1985) value. -`KindInt64` is used for a signed integer value. -`KindString` is used for a string value. -`KindBytes` is used for a slice of bytes (in spec: A byte array). -`KindSlice` is used for a slice of values (in spec: an array (a list) of any values). -`KindMap` is used for a slice of key-value pairs (in spec: `map`). - -These types are defined in `go.opentelemetry.io/otel/log` package -as they are tightly coupled with the API and different from common attributes. - -The internal implementation of `Value` is based on -[`slog.Value`](https://pkg.go.dev/log/slog#Value) -and the API is mostly inspired by -[`attribute.Value`](https://pkg.go.dev/go.opentelemetry.io/otel/attribute#Value). -The benchmarks[^1] show that the implementation is more performant than -[`attribute.Value`](https://pkg.go.dev/go.opentelemetry.io/otel/attribute#Value). - -The value accessors (`func (v Value) As[Kind]` methods) must not panic, -as it would violate the [specification](https://opentelemetry.io/docs/specs/otel/error-handling/): - -> API methods MUST NOT throw unhandled exceptions when used incorrectly by end -> users. The API and SDK SHOULD provide safe defaults for missing or invalid -> arguments. [...] Whenever the library suppresses an error that would otherwise -> have been exposed to the user, the library SHOULD log the error using -> language-specific conventions. - -Therefore, the value accessors should return a zero value -and log an error when a bad accessor is called. - -The `Severity`, `Kind`, `Value`, `KeyValue` may implement -the [`fmt.Stringer`](https://pkg.go.dev/fmt#Stringer) interface. -However, it is not needed for the first stable release -and the `String` methods can be added later. - -The caller must not subsequently mutate the record passed to `Emit`. -This would allow the implementation to not clone the record, -but simply retain, modify or discard it. -The implementation may still choose to clone the record or copy its attributes -if it needs to retain or modify it, -e.g. in case of asynchronous processing to eliminate the possibility of data races, -because the user can technically reuse the record and add new attributes -after the call (even when the documentation says that the caller must not do it). - -Implementation requirements: - -- The [specification requires](https://opentelemetry.io/docs/specs/otel/logs/api/#concurrency-requirements) - the method to be safe to be called concurrently. - -- The method must not interrupt the record processing if the context is canceled - per ["ignoring context cancellation" guideline](../CONTRIBUTING.md#ignoring-context-cancellation). - -- The [specification requires](https://opentelemetry.io/docs/specs/otel/logs/api/#emit-a-logrecord) - use the current time as observed timestamp if the passed is empty. - -- The method should handle the trace context passed via `ctx` argument in order to meet the - [specification's SDK requirement](https://opentelemetry.io/docs/specs/otel/logs/sdk/#readablelogrecord) - to populate the trace context fields from the resolved context. - -`Emit` can be extended by adding new exported fields to the `Record` struct. - -Rejected alternatives: - -- [Record as interface](#record-as-interface) -- [Options as parameter to Logger.Emit](#options-as-parameter-to-loggeremit) -- [Passing record as pointer to Logger.Emit](#passing-record-as-pointer-to-loggeremit) -- [Logger.WithAttributes](#loggerwithattributes) -- [Record attributes as slice](#record-attributes-as-slice) -- [Use any instead of defining Value](#use-any-instead-of-defining-value) -- [Severity type encapsulating number and text](#severity-type-encapsulating-number-and-text) -- [Reuse attribute package](#reuse-attribute-package) -- [Mix receiver types for Record](#mix-receiver-types-for-record) -- [Add XYZ method to Logger](#add-xyz-method-to-logger) -- [Rename KeyValue to Attr](#rename-keyvalue-to-attr) - -### Logger.Enabled - -The `Enabled` method implements the [`Enabled` operation](https://opentelemetry.io/docs/specs/otel/logs/api/#enabled). - -[`Context` associated with the `LogRecord`](https://opentelemetry.io/docs/specs/otel/context/) -is accepted as a `context.Context` method argument. - -Calls to `Enabled` are supposed to be on the hot path and the list of arguments -can be extendend in future. Therefore, in order to reduce the number of heap -allocations and make it possible to handle new arguments, `Enabled` accepts -a `EnabledParameters` struct, defined in [logger.go](logger.go), as the second -method argument. - -The `EnabledParameters` uses fields, instead of getters and setters, to allow -simpler usage which allows configuring the `EnabledParameters` in the same line -where `Enabled` is called. - -### noop package - -The `go.opentelemetry.io/otel/log/noop` package provides -[Logs API No-Op Implementation](https://opentelemetry.io/docs/specs/otel/logs/noop/). - -### Trace context correlation - -The bridge implementation should do its best to pass -the `ctx` containing the trace context from the caller -so it can later be passed via `Logger.Emit`. - -It is not expected that users (caller or bridge implementation) reconstruct -a `context.Context`. Reconstructing a `context.Context` with -[`trace.ContextWithSpanContext`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#ContextWithSpanContext) -and [`trace.NewSpanContext`](https://pkg.go.dev/go.opentelemetry.io/otel/trace#NewSpanContext) -would usually involve more memory allocations. - -The logging libraries which have recording methods that accepts `context.Context`, -such us [`slog`](https://pkg.go.dev/log/slog), -[`logrus`](https://pkg.go.dev/github.com/sirupsen/logrus), -[`zerolog`](https://pkg.go.dev/github.com/rs/zerolog), -makes passing the trace context trivial. - -However, some libraries do not accept a `context.Context` in their recording methods. -Structured logging libraries, -such as [`logr`](https://pkg.go.dev/github.com/go-logr/logr) -and [`zap`](https://pkg.go.dev/go.uber.org/zap), -offer passing `any` type as a log attribute/field. -Therefore, their bridge implementations can define a "special" log attributes/field -that will be used to capture the trace context. - -[The prototype](https://github.com/open-telemetry/opentelemetry-go/pull/4725) -has bridge implementations that handle trace context correlation efficiently. - -## Benchmarking - -The benchmarks take inspiration from [`slog`](https://pkg.go.dev/log/slog), -because for the Go team it was also critical to create API that would be fast -and interoperable with existing logging packages.[^2][^3] - -The benchmark results can be found in [the prototype](https://github.com/open-telemetry/opentelemetry-go/pull/4725). - -## Rejected alternatives - -### Reuse slog - -The API must not be coupled to [`slog`](https://pkg.go.dev/log/slog), -nor any other logging library. - -The API needs to evolve orthogonally to `slog`. - -`slog` is not compliant with the [Logs API](https://opentelemetry.io/docs/specs/otel/logs/api/). -and we cannot expect the Go team to make `slog` compliant with it. - -The interoperability can be achieved using [a log bridge](https://opentelemetry.io/docs/specs/otel/glossary/#log-appender--bridge). - -You can read more about OpenTelemetry Logs design on [opentelemetry.io](https://opentelemetry.io/docs/concepts/signals/logs/). - -### Record as interface - -`Record` is defined as a `struct` because of the following reasons. - -Log record is a value object without any behavior. -It is used as data input for Logger methods. - -The log record resembles the instrument config structs like [metric.Float64CounterConfig](https://pkg.go.dev/go.opentelemetry.io/otel/metric#Float64CounterConfig). - -Using `struct` instead of `interface` improves the performance as e.g. -indirect calls are less optimized, -usage of interfaces tend to increase heap allocations.[^3] - -### Options as parameter to Logger.Emit - -One of the initial ideas was to have: - -```go -type Logger interface{ - embedded.Logger - Emit(ctx context.Context, options ...RecordOption) -} -``` - -The main reason was that design would be similar -to the [Meter API](https://pkg.go.dev/go.opentelemetry.io/otel/metric#Meter) -for creating instruments. - -However, passing `Record` directly, instead of using options, -is more performant as it reduces heap allocations.[^4] - -Another advantage of passing `Record` is that API would not have functions like `NewRecord(options...)`, -which would be used by the SDK and not by the users. - -Finally, the definition would be similar to [`slog.Handler.Handle`](https://pkg.go.dev/log/slog#Handler) -that was designed to provide optimization opportunities.[^2] - -### Passing record as pointer to Logger.Emit - -So far the benchmarks do not show differences that would -favor passing the record via pointer (and vice versa). - -Passing via value feels safer because of the following reasons. - -The user would not be able to pass `nil`. -Therefore, it reduces the possibility to have a nil pointer dereference. - -It should reduce the possibility of a heap allocation. - -It follows the design of [`slog.Handler`](https://pkg.go.dev/log/slog#Handler). - -If follows one of Google's Go Style Decisions -to prefer [passing values](https://google.github.io/styleguide/go/decisions#pass-values). - -### Passing struct as parameter to LoggerProvider.Logger - -Similarly to `Logger.Emit`, we could have something like: - -```go -type LoggerProvider interface{ - embedded.LoggerProvider - Logger(name string, config LoggerConfig) -} -``` - -The drawback of this idea would be that this would be -a different design from Trace and Metrics API. - -The performance of acquiring a logger is not as critical -as the performance of emitting a log record. While a single -HTTP/RPC handler could write hundreds of logs, it should not -create a new logger for each log entry. -The bridge implementation should reuse loggers whenever possible. - -### Logger.WithAttributes - -We could add `WithAttributes` to the `Logger` interface. -Then `Record` could be a simple struct with only exported fields. -The idea was that the SDK would implement the performance improvements -instead of doing it in the API. -This would allow having different optimization strategies. - -During the analysis[^5], it occurred that the main problem of this proposal -is that the variadic slice passed to an interface method is always heap allocated. - -Moreover, the logger returned by `WithAttribute` was allocated on the heap. - -Lastly, the proposal was not specification compliant. - -### Record attributes as slice - -One of the proposals[^6] was to have `Record` as a simple struct: - -```go -type Record struct { - Timestamp time.Time - ObservedTimestamp time.Time - EventName string - Severity Severity - SeverityText string - Body Value - Attributes []KeyValue -} -``` - -The bridge implementations could use [`sync.Pool`](https://pkg.go.dev/sync#Pool) -for reducing the number of allocations when passing attributes. - -The benchmarks results were better. - -In such a design, most bridges would have a `sync.Pool` -to reduce the number of heap allocations. -However, the `sync.Pool` will not work correctly with API implementations -that would take ownership of the record -(e.g. implementations that do not copy records for asynchronous processing). -The current design, even in case of improper API implementation, -has lower chances of encountering a bug as most bridges would -create a record, pass it, and forget about it. - -For reference, here is the reason why `slog` does not use `sync.Pool`[^3] -as well: - -> We can use a sync pool for records though we decided not to. -You can but it's a bad idea for us. Why? -Because users have control of Records. -Handler writers can get their hands on a record -and we'd have to ask them to free it -or try to free it magically at some some point. -But either way, they could get themselves in trouble by freeing it twice -or holding on to one after they free it. -That's a use after free bug and that's why `zerolog` was problematic for us. -`zerolog` as as part of its speed exposes a pool allocated value to users -if you use `zerolog` the normal way, that you'll see in all the examples, -you will never encounter a problem. -But if you do something a little out of the ordinary you can get -use after free bugs and we just didn't want to put that in the standard library. - -Therefore, we decided to not follow the proposal as it is -less user friendly (users and bridges would use e.g. a `sync.Pool` to reduce -the number of heap allocation), less safe (more prone to use after free bugs -and race conditions), and the benchmark differences were not significant. - -### Use any instead of defining Value - -[Logs Data Model](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-body) -defines Body to be `any`. -One could propose to define `Body` (and attribute values) as `any` -instead of a defining a new type (`Value`). - -First of all, [`any` type defined in the specification](https://opentelemetry.io/docs/specs/otel/logs/data-model/#type-any) -is not the same as `any` (`interface{}`) in Go. - -Moreover, using `any` as a field would decrease the performance.[^7] - -Notice it will be still possible to add following kind and factories -in a backwards compatible way: - -```go -const KindMap Kind - -func AnyValue(value any) KeyValue - -func Any(key string, value any) KeyValue -``` - -However, currently, it would not be specification compliant. - -### Severity type encapsulating number and text - -We could combine severity into a single field defining a type: - -```go -type Severity struct { - Number SeverityNumber - Text string -} -``` - -However, the [Logs Data Model](https://opentelemetry.io/docs/specs/otel/logs/data-model/#log-and-event-record-definition) -define it as independent fields. -It should be more user friendly to have them separated. -Especially when having getter and setter methods, setting one value -when the other is already set would be unpleasant. - -### Reuse attribute package - -It was tempting to reuse the existing -[https://pkg.go.dev/go.opentelemetry.io/otel/attribute] package -for defining log attributes and body. - -However, this would be wrong because [the log attribute definition](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-attributes) -is different from [the common attribute definition](https://opentelemetry.io/docs/specs/otel/common/#attribute). - -Moreover, it there is nothing telling that [the body definition](https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-body) -has anything in common with a common attribute value. - -Therefore, we define new types representing the abstract types defined -in the [Logs Data Model](https://opentelemetry.io/docs/specs/otel/logs/data-model/#definitions-used-in-this-document). - -### Mix receiver types for Record - -Methods of [`slog.Record`](https://pkg.go.dev/log/slog#Record) -have different receiver types. - -In `log/slog` GitHub issue we can only find that the reason is:[^8] - ->> some receiver of Record struct is by value -> Passing Records by value means they incur no heap allocation. -> That improves performance overall, even though they are copied. - -However, the benchmarks do not show any noticeable differences.[^9] - -The compiler is smart-enough to not make a heap allocation for any of these methods. -The use of a pointer receiver does not cause any heap allocation. -From Go FAQ:[^10] - -> In the current compilers, if a variable has its address taken, -> that variable is a candidate for allocation on the heap. -> However, a basic escape analysis recognizes some cases -> when such variables will not live past the return from the function -> and can reside on the stack. - -The [Understanding Allocations: the Stack and the Heap](https://www.youtube.com/watch?v=ZMZpH4yT7M0) -presentation by Jacob Walker describes the escape analysis with details. - -Moreover, also from Go FAQ:[^10] - -> Also, if a local variable is very large, -> it might make more sense to store it on the heap rather than the stack. - -Therefore, even if we use a value receiver and the value is very large -it may be heap allocated. - -Both [Go Code Review Comments](https://go.dev/wiki/CodeReviewComments#receiver-type) -and [Google's Go Style Decisions](https://google.github.io/styleguide/go/decisions#receiver-type) -highly recommend making the methods for a type either all pointer methods -or all value methods. Google's Go Style Decisions even goes further and says: - -> There is a lot of misinformation about whether passing a value or a pointer -> to a function can affect performance. -> The compiler can choose to pass pointers to values on the stack -> as well as copying values on the stack, -> but these considerations should not outweigh the readability -> and correctness of the code in most circumstances. -> When the performance does matter, it is important to profile both approaches -> with a realistic benchmark before deciding that one approach outperforms the other. - -Because, the benchmarks[^9] do not proof any performance difference -and the general recommendation is to not mix receiver types, -we decided to use pointer receivers for all `Record` methods. - -### Add XYZ method to Logger - -The `Logger` does not have methods like `SetSeverity`, etc. -as the Logs API needs to follow (be compliant with) -the [specification](https://opentelemetry.io/docs/specs/otel/logs/api/) - -### Rename KeyValue to Attr - -There was a proposal to rename `KeyValue` to `Attr` (or `Attribute`).[^11] -New developers may not intuitively know that `log.KeyValue` is an attribute in -the OpenTelemetry parlance. - -During the discussion we agreed to keep the `KeyValue` name. - -The type is used in multiple semantics: - -- as a log attribute, -- as a map item, -- as a log record Body. - -As for map item semantics, this type is a key-value pair, not an attribute. -Naming the type as `Attr` would convey semantical meaning -that would not be correct for a map. - -We expect that most of the Logs API users will be OpenTelemetry contributors. -We plan to implement bridges for the most popular logging libraries ourselves. -Given we will all have the context needed to disambiguate these overlapping -names, developers' confusion should not be an issue. - -For bridges not developed by us, -developers will likely look at our existing bridges for inspiration. -Our correct use of these types will be a reference to them. - -At last, we provide `ValueFromAttribute` and `KeyValueFromAttribute` -to offer reuse of `attribute.Value` and `attribute.KeyValue`. - -[^1]: [Handle structured body and attributes](https://github.com/pellared/opentelemetry-go/pull/7) -[^2]: Jonathan Amsterdam, [The Go Blog: Structured Logging with slog](https://go.dev/blog/slog) -[^3]: Jonathan Amsterdam, [GopherCon Europe 2023: A Fast Structured Logging Package](https://www.youtube.com/watch?v=tC4Jt3i62ns) -[^4]: [Emit definition discussion with benchmarks](https://github.com/open-telemetry/opentelemetry-go/pull/4725#discussion_r1400869566) -[^5]: [Logger.WithAttributes analysis](https://github.com/pellared/opentelemetry-go/pull/3) -[^6]: [Record attributes as field and use sync.Pool for reducing allocations](https://github.com/pellared/opentelemetry-go/pull/4) and [Record attributes based on slog.Record](https://github.com/pellared/opentelemetry-go/pull/6) -[^7]: [Record.Body as any](https://github.com/pellared/opentelemetry-go/pull/5) -[^8]: [log/slog: structured, leveled logging](https://github.com/golang/go/issues/56345#issuecomment-1302563756) -[^9]: [Record with pointer receivers only](https://github.com/pellared/opentelemetry-go/pull/8) -[^10]: [Go FAQ: Stack or heap](https://go.dev/doc/faq#stack_or_heap) -[^11]: [Rename KeyValue to Attr discussion](https://github.com/open-telemetry/opentelemetry-go/pull/4809#discussion_r1476080093) diff --git a/vendor/go.opentelemetry.io/otel/log/LICENSE b/vendor/go.opentelemetry.io/otel/log/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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 - - 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] - - 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/go.opentelemetry.io/otel/log/README.md b/vendor/go.opentelemetry.io/otel/log/README.md deleted file mode 100644 index 3f71427119..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Log API - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/log)](https://pkg.go.dev/go.opentelemetry.io/otel/log) diff --git a/vendor/go.opentelemetry.io/otel/log/doc.go b/vendor/go.opentelemetry.io/otel/log/doc.go deleted file mode 100644 index 18cbd1cb2e..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/doc.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package log provides the OpenTelemetry Logs API. - -This package is intended to be used by bridges between existing logging -libraries and OpenTelemetry. Users should not directly use this package as a -logging library. Instead, install one of the bridges listed in the -[registry], and use the associated logging library. - -# API Implementations - -This package does not conform to the standard Go versioning policy, all of its -interfaces may have methods added to them without a package major version bump. -This non-standard API evolution could surprise an uninformed implementation -author. They could unknowingly build their implementation in a way that would -result in a runtime panic for their users that update to the new API. - -The API is designed to help inform an instrumentation author about this -non-standard API evolution. It requires them to choose a default behavior for -unimplemented interface methods. There are three behavior choices they can -make: - - - Compilation failure - - Panic - - Default to another implementation - -All interfaces in this API embed a corresponding interface from -[go.opentelemetry.io/otel/log/embedded]. If an author wants the default -behavior of their implementations to be a compilation failure, signaling to -their users they need to update to the latest version of that implementation, -they need to embed the corresponding interface from -[go.opentelemetry.io/otel/log/embedded] in their implementation. For example, - - import "go.opentelemetry.io/otel/log/embedded" - - type LoggerProvider struct { - embedded.LoggerProvider - // ... - } - -If an author wants the default behavior of their implementations to a panic, -they need to embed the API interface directly. - - import "go.opentelemetry.io/otel/log" - - type LoggerProvider struct { - log.LoggerProvider - // ... - } - -This is not a recommended behavior as it could lead to publishing packages that -contain runtime panics when users update other package that use newer versions -of [go.opentelemetry.io/otel/log]. - -Finally, an author can embed another implementation in theirs. The embedded -implementation will be used for methods not defined by the author. For example, -an author who wants to default to silently dropping the call can use -[go.opentelemetry.io/otel/log/noop]: - - import "go.opentelemetry.io/otel/log/noop" - - type LoggerProvider struct { - noop.LoggerProvider - // ... - } - -It is strongly recommended that authors only embed -go.opentelemetry.io/otel/log/noop if they choose this default behavior. That -implementation is the only one OpenTelemetry authors can guarantee will fully -implement all the API interfaces when a user updates their API. - -[registry]: https://opentelemetry.io/ecosystem/registry/?language=go&component=log-bridge -*/ -package log // import "go.opentelemetry.io/otel/log" diff --git a/vendor/go.opentelemetry.io/otel/log/embedded/README.md b/vendor/go.opentelemetry.io/otel/log/embedded/README.md deleted file mode 100644 index bae4ac68f0..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/embedded/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Log Embedded - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/log/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/log/embedded) diff --git a/vendor/go.opentelemetry.io/otel/log/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/log/embedded/embedded.go deleted file mode 100644 index a3714c4c69..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/embedded/embedded.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package embedded provides interfaces embedded within the [OpenTelemetry Logs -// Bridge API]. -// -// Implementers of the [OpenTelemetry Logs Bridge API] can embed the relevant -// type from this package into their implementation directly. Doing so will -// result in a compilation error for users when the [OpenTelemetry Logs Bridge -// API] is extended (which is something that can happen without a major version -// bump of the API package). -// -// [OpenTelemetry Logs Bridge API]: https://pkg.go.dev/go.opentelemetry.io/otel/log -package embedded // import "go.opentelemetry.io/otel/log/embedded" - -// LoggerProvider is embedded in the [Logs Bridge API LoggerProvider]. -// -// Embed this interface in your implementation of the [Logs Bridge API -// LoggerProvider] if you want users to experience a compilation error, -// signaling they need to update to your latest implementation, when the [Logs -// Bridge API LoggerProvider] interface is extended (which is something that -// can happen without a major version bump of the API package). -// -// [Logs Bridge API LoggerProvider]: https://pkg.go.dev/go.opentelemetry.io/otel/log#LoggerProvider -type LoggerProvider interface{ loggerProvider() } - -// Logger is embedded in [Logs Bridge API Logger]. -// -// Embed this interface in your implementation of the [Logs Bridge API Logger] -// if you want users to experience a compilation error, signaling they need to -// update to your latest implementation, when the [Logs Bridge API Logger] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -// -// [Logs Bridge API Logger]: https://pkg.go.dev/go.opentelemetry.io/otel/log#Logger -type Logger interface{ logger() } diff --git a/vendor/go.opentelemetry.io/otel/log/global/README.md b/vendor/go.opentelemetry.io/otel/log/global/README.md deleted file mode 100644 index 11e5afefc0..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/global/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Log Global - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/log/global)](https://pkg.go.dev/go.opentelemetry.io/otel/log/global) diff --git a/vendor/go.opentelemetry.io/otel/log/global/log.go b/vendor/go.opentelemetry.io/otel/log/global/log.go deleted file mode 100644 index 71ec577986..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/global/log.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package global provides access to a global implementation of the OpenTelemetry -Logs Bridge API. - -This package is experimental. It will be deprecated and removed when the [log] -package becomes stable. Its functionality will be migrated to -go.opentelemetry.io/otel. -*/ -package global // import "go.opentelemetry.io/otel/log/global" - -import ( - "go.opentelemetry.io/otel/log" - "go.opentelemetry.io/otel/log/internal/global" -) - -// Logger returns a [log.Logger] configured with the provided name and options -// from the globally configured [log.LoggerProvider]. -// -// If this is called before a global LoggerProvider is configured, the returned -// Logger will be a No-Op implementation of a Logger. When a global -// LoggerProvider is registered for the first time, the returned Logger is -// updated in-place to report to this new LoggerProvider. There is no need to -// call this function again for an updated instance. -// -// This is a convenience function. It is equivalent to: -// -// GetLoggerProvider().Logger(name, options...) -func Logger(name string, options ...log.LoggerOption) log.Logger { - return GetLoggerProvider().Logger(name, options...) -} - -// GetLoggerProvider returns the globally configured [log.LoggerProvider]. -// -// If a global LoggerProvider has not been configured with [SetLoggerProvider], -// the returned Logger will be a No-Op implementation of a LoggerProvider. When -// a global LoggerProvider is registered for the first time, the returned -// LoggerProvider and all of its created Loggers are updated in-place. There is -// no need to call this function again for an updated instance. -func GetLoggerProvider() log.LoggerProvider { - return global.GetLoggerProvider() -} - -// SetLoggerProvider configures provider as the global [log.LoggerProvider]. -func SetLoggerProvider(provider log.LoggerProvider) { - global.SetLoggerProvider(provider) -} diff --git a/vendor/go.opentelemetry.io/otel/log/internal/global/log.go b/vendor/go.opentelemetry.io/otel/log/internal/global/log.go deleted file mode 100644 index d97ee96635..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/internal/global/log.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/log/internal/global" - -import ( - "context" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/log" - "go.opentelemetry.io/otel/log/embedded" -) - -// instLib defines the instrumentation library a logger is created for. -// -// Do not use sdk/instrumentation (API cannot depend on the SDK). -type instLib struct { - name string - version string - schemaURL string - attrs attribute.Set -} - -type loggerProvider struct { - embedded.LoggerProvider - - mu sync.Mutex - loggers map[instLib]*logger - delegate log.LoggerProvider -} - -// Compile-time guarantee loggerProvider implements LoggerProvider. -var _ log.LoggerProvider = (*loggerProvider)(nil) - -func (p *loggerProvider) Logger(name string, options ...log.LoggerOption) log.Logger { - p.mu.Lock() - defer p.mu.Unlock() - - if p.delegate != nil { - return p.delegate.Logger(name, options...) - } - - cfg := log.NewLoggerConfig(options...) - key := instLib{ - name: name, - version: cfg.InstrumentationVersion(), - schemaURL: cfg.SchemaURL(), - attrs: cfg.InstrumentationAttributes(), - } - - if p.loggers == nil { - l := &logger{name: name, options: options} - p.loggers = map[instLib]*logger{key: l} - return l - } - - if l, ok := p.loggers[key]; ok { - return l - } - - l := &logger{name: name, options: options} - p.loggers[key] = l - return l -} - -func (p *loggerProvider) setDelegate(provider log.LoggerProvider) { - p.mu.Lock() - defer p.mu.Unlock() - - p.delegate = provider - for _, l := range p.loggers { - l.setDelegate(provider) - } - p.loggers = nil // Only set logger delegates once. -} - -type logger struct { - embedded.Logger - - name string - options []log.LoggerOption - - delegate atomic.Value // log.Logger -} - -// Compile-time guarantee logger implements Logger. -var _ log.Logger = (*logger)(nil) - -func (l *logger) Emit(ctx context.Context, r log.Record) { - if del, ok := l.delegate.Load().(log.Logger); ok { - del.Emit(ctx, r) - } -} - -func (l *logger) Enabled(ctx context.Context, param log.EnabledParameters) bool { - var enabled bool - if del, ok := l.delegate.Load().(log.Logger); ok { - enabled = del.Enabled(ctx, param) - } - return enabled -} - -func (l *logger) setDelegate(provider log.LoggerProvider) { - l.delegate.Store(provider.Logger(l.name, l.options...)) -} diff --git a/vendor/go.opentelemetry.io/otel/log/internal/global/state.go b/vendor/go.opentelemetry.io/otel/log/internal/global/state.go deleted file mode 100644 index dbe1c2fbfb..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/internal/global/state.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package global // import "go.opentelemetry.io/otel/log/internal/global" - -import ( - "errors" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/log" -) - -var ( - globalLoggerProvider = defaultLoggerProvider() - - delegateLoggerOnce sync.Once -) - -func defaultLoggerProvider() *atomic.Value { - v := &atomic.Value{} - v.Store(loggerProviderHolder{provider: &loggerProvider{}}) - return v -} - -type loggerProviderHolder struct { - provider log.LoggerProvider -} - -// GetLoggerProvider returns the global LoggerProvider. -func GetLoggerProvider() log.LoggerProvider { - return globalLoggerProvider.Load().(loggerProviderHolder).provider -} - -// SetLoggerProvider sets the global LoggerProvider. -func SetLoggerProvider(provider log.LoggerProvider) { - current := GetLoggerProvider() - if _, cOk := current.(*loggerProvider); cOk { - if _, mpOk := provider.(*loggerProvider); mpOk && current == provider { - err := errors.New("invalid delegation: LoggerProvider self-delegation") - global.Error(err, "No delegate will be configured") - return - } - } - - delegateLoggerOnce.Do(func() { - if def, ok := current.(*loggerProvider); ok { - def.setDelegate(provider) - } - }) - globalLoggerProvider.Store(loggerProviderHolder{provider: provider}) -} diff --git a/vendor/go.opentelemetry.io/otel/log/keyvalue.go b/vendor/go.opentelemetry.io/otel/log/keyvalue.go deleted file mode 100644 index 73e4e7dca1..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/keyvalue.go +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate stringer -type=Kind -trimprefix=Kind - -package log // import "go.opentelemetry.io/otel/log" - -import ( - "bytes" - "cmp" - "errors" - "fmt" - "math" - "slices" - "strconv" - "unsafe" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/internal/global" -) - -// errKind is logged when a Value is decoded to an incompatible type. -var errKind = errors.New("invalid Kind") - -// Kind is the kind of a [Value]. -type Kind int - -// Kind values. -const ( - KindEmpty Kind = iota - KindBool - KindFloat64 - KindInt64 - KindString - KindBytes - KindSlice - KindMap -) - -// A Value represents a structured log value. -// A zero value is valid and represents an empty value. -type Value struct { - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint: unused // This is indeed used. - - // num holds the value for Int64, Float64, and Bool. It holds the length - // for String, Bytes, Slice, Map. - num uint64 - // any holds either the KindBool, KindInt64, KindFloat64, stringptr, - // bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64 - // then the value of Value is in num as described above. Otherwise, it - // contains the value wrapped in the appropriate type. - any any -} - -type ( - // sliceptr represents a value in Value.any for KindString Values. - stringptr *byte - // bytesptr represents a value in Value.any for KindBytes Values. - bytesptr *byte - // sliceptr represents a value in Value.any for KindSlice Values. - sliceptr *Value - // mapptr represents a value in Value.any for KindMap Values. - mapptr *KeyValue -) - -// StringValue returns a new [Value] for a string. -func StringValue(v string) Value { - return Value{ - num: uint64(len(v)), - any: stringptr(unsafe.StringData(v)), - } -} - -// IntValue returns a [Value] for an int. -func IntValue(v int) Value { return Int64Value(int64(v)) } - -// Int64Value returns a [Value] for an int64. -func Int64Value(v int64) Value { - // This can be later converted back to int64 (overflow not checked). - return Value{num: uint64(v), any: KindInt64} // nolint:gosec -} - -// Float64Value returns a [Value] for a float64. -func Float64Value(v float64) Value { - return Value{num: math.Float64bits(v), any: KindFloat64} -} - -// BoolValue returns a [Value] for a bool. -func BoolValue(v bool) Value { //nolint:revive // Not a control flag. - var n uint64 - if v { - n = 1 - } - return Value{num: n, any: KindBool} -} - -// BytesValue returns a [Value] for a byte slice. The passed slice must not be -// changed after it is passed. -func BytesValue(v []byte) Value { - return Value{ - num: uint64(len(v)), - any: bytesptr(unsafe.SliceData(v)), - } -} - -// SliceValue returns a [Value] for a slice of [Value]. The passed slice must -// not be changed after it is passed. -func SliceValue(vs ...Value) Value { - return Value{ - num: uint64(len(vs)), - any: sliceptr(unsafe.SliceData(vs)), - } -} - -// MapValue returns a new [Value] for a slice of key-value pairs. The passed -// slice must not be changed after it is passed. -func MapValue(kvs ...KeyValue) Value { - return Value{ - num: uint64(len(kvs)), - any: mapptr(unsafe.SliceData(kvs)), - } -} - -// AsString returns the value held by v as a string. -func (v Value) AsString() string { - if sp, ok := v.any.(stringptr); ok { - return unsafe.String(sp, v.num) - } - global.Error(errKind, "AsString", "Kind", v.Kind()) - return "" -} - -// asString returns the value held by v as a string. It will panic if the Value -// is not KindString. -func (v Value) asString() string { - return unsafe.String(v.any.(stringptr), v.num) -} - -// AsInt64 returns the value held by v as an int64. -func (v Value) AsInt64() int64 { - if v.Kind() != KindInt64 { - global.Error(errKind, "AsInt64", "Kind", v.Kind()) - return 0 - } - return v.asInt64() -} - -// asInt64 returns the value held by v as an int64. If v is not of KindInt64, -// this will return garbage. -func (v Value) asInt64() int64 { - // Assumes v.num was a valid int64 (overflow not checked). - return int64(v.num) // nolint: gosec -} - -// AsBool returns the value held by v as a bool. -func (v Value) AsBool() bool { - if v.Kind() != KindBool { - global.Error(errKind, "AsBool", "Kind", v.Kind()) - return false - } - return v.asBool() -} - -// asBool returns the value held by v as a bool. If v is not of KindBool, this -// will return garbage. -func (v Value) asBool() bool { return v.num == 1 } - -// AsFloat64 returns the value held by v as a float64. -func (v Value) AsFloat64() float64 { - if v.Kind() != KindFloat64 { - global.Error(errKind, "AsFloat64", "Kind", v.Kind()) - return 0 - } - return v.asFloat64() -} - -// asFloat64 returns the value held by v as a float64. If v is not of -// KindFloat64, this will return garbage. -func (v Value) asFloat64() float64 { return math.Float64frombits(v.num) } - -// AsBytes returns the value held by v as a []byte. -func (v Value) AsBytes() []byte { - if sp, ok := v.any.(bytesptr); ok { - return unsafe.Slice((*byte)(sp), v.num) - } - global.Error(errKind, "AsBytes", "Kind", v.Kind()) - return nil -} - -// asBytes returns the value held by v as a []byte. It will panic if the Value -// is not KindBytes. -func (v Value) asBytes() []byte { - return unsafe.Slice((*byte)(v.any.(bytesptr)), v.num) -} - -// AsSlice returns the value held by v as a []Value. -func (v Value) AsSlice() []Value { - if sp, ok := v.any.(sliceptr); ok { - return unsafe.Slice((*Value)(sp), v.num) - } - global.Error(errKind, "AsSlice", "Kind", v.Kind()) - return nil -} - -// asSlice returns the value held by v as a []Value. It will panic if the Value -// is not KindSlice. -func (v Value) asSlice() []Value { - return unsafe.Slice((*Value)(v.any.(sliceptr)), v.num) -} - -// AsMap returns the value held by v as a []KeyValue. -func (v Value) AsMap() []KeyValue { - if sp, ok := v.any.(mapptr); ok { - return unsafe.Slice((*KeyValue)(sp), v.num) - } - global.Error(errKind, "AsMap", "Kind", v.Kind()) - return nil -} - -// asMap returns the value held by v as a []KeyValue. It will panic if the -// Value is not KindMap. -func (v Value) asMap() []KeyValue { - return unsafe.Slice((*KeyValue)(v.any.(mapptr)), v.num) -} - -// Kind returns the Kind of v. -func (v Value) Kind() Kind { - switch x := v.any.(type) { - case Kind: - return x - case stringptr: - return KindString - case bytesptr: - return KindBytes - case sliceptr: - return KindSlice - case mapptr: - return KindMap - default: - return KindEmpty - } -} - -// Empty returns if v does not hold any value. -func (v Value) Empty() bool { return v.Kind() == KindEmpty } - -// Equal returns if v is equal to w. -func (v Value) Equal(w Value) bool { - k1 := v.Kind() - k2 := w.Kind() - if k1 != k2 { - return false - } - switch k1 { - case KindInt64, KindBool: - return v.num == w.num - case KindString: - return v.asString() == w.asString() - case KindFloat64: - return v.asFloat64() == w.asFloat64() - case KindSlice: - return slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal) - case KindMap: - sv := sortMap(v.asMap()) - sw := sortMap(w.asMap()) - return slices.EqualFunc(sv, sw, KeyValue.Equal) - case KindBytes: - return bytes.Equal(v.asBytes(), w.asBytes()) - case KindEmpty: - return true - default: - global.Error(errKind, "Equal", "Kind", k1) - return false - } -} - -func sortMap(m []KeyValue) []KeyValue { - sm := make([]KeyValue, len(m)) - copy(sm, m) - slices.SortFunc(sm, func(a, b KeyValue) int { - return cmp.Compare(a.Key, b.Key) - }) - - return sm -} - -// String returns Value's value as a string, formatted like [fmt.Sprint]. -// -// The returned string is meant for debugging; -// the string representation is not stable. -func (v Value) String() string { - switch v.Kind() { - case KindString: - return v.asString() - case KindInt64: - // Assumes v.num was a valid int64 (overflow not checked). - return strconv.FormatInt(int64(v.num), 10) // nolint: gosec - case KindFloat64: - return strconv.FormatFloat(v.asFloat64(), 'g', -1, 64) - case KindBool: - return strconv.FormatBool(v.asBool()) - case KindBytes: - return fmt.Sprint(v.asBytes()) - case KindMap: - return fmt.Sprint(v.asMap()) - case KindSlice: - return fmt.Sprint(v.asSlice()) - case KindEmpty: - return "" - default: - // Try to handle this as gracefully as possible. - // - // Don't panic here. The goal here is to have developers find this - // first if a slog.Kind is is not handled. It is - // preferable to have user's open issue asking why their attributes - // have a "unhandled: " prefix than say that their code is panicking. - return fmt.Sprintf("", v.Kind()) - } -} - -// A KeyValue is a key-value pair used to represent a log attribute (a -// superset of [go.opentelemetry.io/otel/attribute.KeyValue]) and map item. -type KeyValue struct { - Key string - Value Value -} - -// Equal returns if a is equal to b. -func (a KeyValue) Equal(b KeyValue) bool { - return a.Key == b.Key && a.Value.Equal(b.Value) -} - -// String returns a KeyValue for a string value. -func String(key, value string) KeyValue { - return KeyValue{key, StringValue(value)} -} - -// Int64 returns a KeyValue for an int64 value. -func Int64(key string, value int64) KeyValue { - return KeyValue{key, Int64Value(value)} -} - -// Int returns a KeyValue for an int value. -func Int(key string, value int) KeyValue { - return KeyValue{key, IntValue(value)} -} - -// Float64 returns a KeyValue for a float64 value. -func Float64(key string, value float64) KeyValue { - return KeyValue{key, Float64Value(value)} -} - -// Bool returns a KeyValue for a bool value. -func Bool(key string, value bool) KeyValue { - return KeyValue{key, BoolValue(value)} -} - -// Bytes returns a KeyValue for a []byte value. -// The passed slice must not be changed after it is passed. -func Bytes(key string, value []byte) KeyValue { - return KeyValue{key, BytesValue(value)} -} - -// Slice returns a KeyValue for a []Value value. -// The passed slice must not be changed after it is passed. -func Slice(key string, value ...Value) KeyValue { - return KeyValue{key, SliceValue(value...)} -} - -// Map returns a KeyValue for a map value. -// The passed slice must not be changed after it is passed. -func Map(key string, value ...KeyValue) KeyValue { - return KeyValue{key, MapValue(value...)} -} - -// Empty returns a KeyValue with an empty value. -func Empty(key string) KeyValue { - return KeyValue{key, Value{}} -} - -// String returns key-value pair as a string, formatted like "key:value". -// -// The returned string is meant for debugging; -// the string representation is not stable. -func (a KeyValue) String() string { - return fmt.Sprintf("%s:%s", a.Key, a.Value) -} - -// ValueFromAttribute converts [attribute.Value] to [Value]. -func ValueFromAttribute(value attribute.Value) Value { - switch value.Type() { - case attribute.INVALID: - return Value{} - case attribute.BOOL: - return BoolValue(value.AsBool()) - case attribute.BOOLSLICE: - val := value.AsBoolSlice() - res := make([]Value, 0, len(val)) - for _, v := range val { - res = append(res, BoolValue(v)) - } - return SliceValue(res...) - case attribute.INT64: - return Int64Value(value.AsInt64()) - case attribute.INT64SLICE: - val := value.AsInt64Slice() - res := make([]Value, 0, len(val)) - for _, v := range val { - res = append(res, Int64Value(v)) - } - return SliceValue(res...) - case attribute.FLOAT64: - return Float64Value(value.AsFloat64()) - case attribute.FLOAT64SLICE: - val := value.AsFloat64Slice() - res := make([]Value, 0, len(val)) - for _, v := range val { - res = append(res, Float64Value(v)) - } - return SliceValue(res...) - case attribute.STRING: - return StringValue(value.AsString()) - case attribute.STRINGSLICE: - val := value.AsStringSlice() - res := make([]Value, 0, len(val)) - for _, v := range val { - res = append(res, StringValue(v)) - } - return SliceValue(res...) - } - // This code should never be reached - // as log attributes are a superset of standard attributes. - panic("unknown attribute type") -} - -// KeyValueFromAttribute converts [attribute.KeyValue] to [KeyValue]. -func KeyValueFromAttribute(kv attribute.KeyValue) KeyValue { - return KeyValue{ - Key: string(kv.Key), - Value: ValueFromAttribute(kv.Value), - } -} diff --git a/vendor/go.opentelemetry.io/otel/log/kind_string.go b/vendor/go.opentelemetry.io/otel/log/kind_string.go deleted file mode 100644 index bdfaa18665..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/kind_string.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by "stringer -type=Kind -trimprefix=Kind"; DO NOT EDIT. - -package log - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[KindEmpty-0] - _ = x[KindBool-1] - _ = x[KindFloat64-2] - _ = x[KindInt64-3] - _ = x[KindString-4] - _ = x[KindBytes-5] - _ = x[KindSlice-6] - _ = x[KindMap-7] -} - -const _Kind_name = "EmptyBoolFloat64Int64StringBytesSliceMap" - -var _Kind_index = [...]uint8{0, 5, 9, 16, 21, 27, 32, 37, 40} - -func (i Kind) String() string { - if i < 0 || i >= Kind(len(_Kind_index)-1) { - return "Kind(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/log/logger.go b/vendor/go.opentelemetry.io/otel/log/logger.go deleted file mode 100644 index 1205f08e2c..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/logger.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package log // import "go.opentelemetry.io/otel/log" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/log/embedded" -) - -// Logger emits log records. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Logger interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Logger - - // Emit emits a log record. - // - // The record may be held by the implementation. Callers should not mutate - // the record after passed. - // - // Implementations of this method need to be safe for a user to call - // concurrently. - Emit(ctx context.Context, record Record) - - // Enabled returns whether the Logger emits for the given context and - // param. - // - // This is useful for users that want to know if a [Record] - // will be processed or dropped before they perform complex operations to - // construct the [Record]. - // - // The passed param is likely to be a partial record information being - // provided (e.g a param with only the Severity set). - // If a Logger needs more information than is provided, it - // is said to be in an indeterminate state (see below). - // - // The returned value will be true when the Logger will emit for the - // provided context and param, and will be false if the Logger will not - // emit. The returned value may be true or false in an indeterminate state. - // An implementation should default to returning true for an indeterminate - // state, but may return false if valid reasons in particular circumstances - // exist (e.g. performance, correctness). - // - // The param should not be held by the implementation. A copy should be - // made if the param needs to be held after the call returns. - // - // Implementations of this method need to be safe for a user to call - // concurrently. - Enabled(ctx context.Context, param EnabledParameters) bool -} - -// LoggerOption applies configuration options to a [Logger]. -type LoggerOption interface { - // applyLogger is used to set a LoggerOption value of a LoggerConfig. - applyLogger(LoggerConfig) LoggerConfig -} - -// LoggerConfig contains options for a [Logger]. -type LoggerConfig struct { - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint: unused // This is indeed used. - - version string - schemaURL string - attrs attribute.Set -} - -// NewLoggerConfig returns a new [LoggerConfig] with all the options applied. -func NewLoggerConfig(options ...LoggerOption) LoggerConfig { - var c LoggerConfig - for _, opt := range options { - c = opt.applyLogger(c) - } - return c -} - -// InstrumentationVersion returns the version of the library providing -// instrumentation. -func (cfg LoggerConfig) InstrumentationVersion() string { - return cfg.version -} - -// InstrumentationAttributes returns the attributes associated with the library -// providing instrumentation. -func (cfg LoggerConfig) InstrumentationAttributes() attribute.Set { - return cfg.attrs -} - -// SchemaURL returns the schema URL of the library providing instrumentation. -func (cfg LoggerConfig) SchemaURL() string { - return cfg.schemaURL -} - -type loggerOptionFunc func(LoggerConfig) LoggerConfig - -func (fn loggerOptionFunc) applyLogger(cfg LoggerConfig) LoggerConfig { - return fn(cfg) -} - -// WithInstrumentationVersion returns a [LoggerOption] that sets the -// instrumentation version of a [Logger]. -func WithInstrumentationVersion(version string) LoggerOption { - return loggerOptionFunc(func(config LoggerConfig) LoggerConfig { - config.version = version - return config - }) -} - -// WithInstrumentationAttributes returns a [LoggerOption] that sets the -// instrumentation attributes of a [Logger]. -// -// The passed attributes will be de-duplicated. -func WithInstrumentationAttributes(attr ...attribute.KeyValue) LoggerOption { - return loggerOptionFunc(func(config LoggerConfig) LoggerConfig { - config.attrs = attribute.NewSet(attr...) - return config - }) -} - -// WithSchemaURL returns a [LoggerOption] that sets the schema URL for a -// [Logger]. -func WithSchemaURL(schemaURL string) LoggerOption { - return loggerOptionFunc(func(config LoggerConfig) LoggerConfig { - config.schemaURL = schemaURL - return config - }) -} - -// EnabledParameters represents payload for [Logger]'s Enabled method. -type EnabledParameters struct { - Severity Severity -} diff --git a/vendor/go.opentelemetry.io/otel/log/provider.go b/vendor/go.opentelemetry.io/otel/log/provider.go deleted file mode 100644 index 5c8ca328f8..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/provider.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package log // import "go.opentelemetry.io/otel/log" - -import "go.opentelemetry.io/otel/log/embedded" - -// LoggerProvider provides access to [Logger]. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type LoggerProvider interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.LoggerProvider - - // Logger returns a new [Logger] with the provided name and configuration. - // - // The name needs to uniquely identify the source of logged code. It is - // recommended that name is the Go package name of the library using a log - // bridge (note: this is not the name of the bridge package). Most - // commonly, this means a bridge will need to accept this value from its - // users. - // - // If name is empty, implementations need to provide a default name. - // - // The version of the packages using a bridge can be critical information - // to include when logging. The bridge should accept this version - // information and use the [WithInstrumentationVersion] option to configure - // the Logger appropriately. - // - // Implementations of this method need to be safe for a user to call - // concurrently. - Logger(name string, options ...LoggerOption) Logger -} diff --git a/vendor/go.opentelemetry.io/otel/log/record.go b/vendor/go.opentelemetry.io/otel/log/record.go deleted file mode 100644 index 4d2f32d0fb..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/record.go +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package log // import "go.opentelemetry.io/otel/log" - -import ( - "slices" - "time" -) - -// attributesInlineCount is the number of attributes that are efficiently -// stored in an array within a Record. This value is borrowed from slog which -// performed a quantitative survey of log library use and found this value to -// cover 95% of all use-cases (https://go.dev/blog/slog#performance). -const attributesInlineCount = 5 - -// Record represents a log record. -// A log record with non-empty event name is interpreted as an event record. -type Record struct { - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint: unused // This is indeed used. - - eventName string - timestamp time.Time - observedTimestamp time.Time - severity Severity - severityText string - body Value - - // The fields below are for optimizing the implementation of Attributes and - // AddAttributes. This design is borrowed from the slog Record type: - // https://cs.opensource.google/go/go/+/refs/tags/go1.22.0:src/log/slog/record.go;l=20 - - // Allocation optimization: an inline array sized to hold - // the majority of log calls (based on examination of open-source - // code). It holds the start of the list of attributes. - front [attributesInlineCount]KeyValue - - // The number of attributes in front. - nFront int - - // The list of attributes except for those in front. - // Invariants: - // - len(back) > 0 if nFront == len(front) - // - Unused array elements are zero-ed. Used to detect mistakes. - back []KeyValue -} - -// EventName returns the event name. -// A log record with non-empty event name is interpreted as an event record. -func (r *Record) EventName() string { - return r.eventName -} - -// SetEventName sets the event name. -// A log record with non-empty event name is interpreted as an event record. -func (r *Record) SetEventName(s string) { - r.eventName = s -} - -// Timestamp returns the time when the log record occurred. -func (r *Record) Timestamp() time.Time { - return r.timestamp -} - -// SetTimestamp sets the time when the log record occurred. -func (r *Record) SetTimestamp(t time.Time) { - r.timestamp = t -} - -// ObservedTimestamp returns the time when the log record was observed. -func (r *Record) ObservedTimestamp() time.Time { - return r.observedTimestamp -} - -// SetObservedTimestamp sets the time when the log record was observed. -func (r *Record) SetObservedTimestamp(t time.Time) { - r.observedTimestamp = t -} - -// Severity returns the [Severity] of the log record. -func (r *Record) Severity() Severity { - return r.severity -} - -// SetSeverity sets the [Severity] level of the log record. -func (r *Record) SetSeverity(level Severity) { - r.severity = level -} - -// SeverityText returns severity (also known as log level) text. This is the -// original string representation of the severity as it is known at the source. -func (r *Record) SeverityText() string { - return r.severityText -} - -// SetSeverityText sets severity (also known as log level) text. This is the -// original string representation of the severity as it is known at the source. -func (r *Record) SetSeverityText(text string) { - r.severityText = text -} - -// Body returns the body of the log record. -func (r *Record) Body() Value { - return r.body -} - -// SetBody sets the body of the log record. -func (r *Record) SetBody(v Value) { - r.body = v -} - -// WalkAttributes walks all attributes the log record holds by calling f for -// each on each [KeyValue] in the [Record]. Iteration stops if f returns false. -func (r *Record) WalkAttributes(f func(KeyValue) bool) { - for i := 0; i < r.nFront; i++ { - if !f(r.front[i]) { - return - } - } - for _, a := range r.back { - if !f(a) { - return - } - } -} - -// AddAttributes adds attributes to the log record. -func (r *Record) AddAttributes(attrs ...KeyValue) { - var i int - for i = 0; i < len(attrs) && r.nFront < len(r.front); i++ { - a := attrs[i] - r.front[r.nFront] = a - r.nFront++ - } - - r.back = slices.Grow(r.back, len(attrs[i:])) - r.back = append(r.back, attrs[i:]...) -} - -// AttributesLen returns the number of attributes in the log record. -func (r *Record) AttributesLen() int { - return r.nFront + len(r.back) -} diff --git a/vendor/go.opentelemetry.io/otel/log/severity.go b/vendor/go.opentelemetry.io/otel/log/severity.go deleted file mode 100644 index 0240fd5acb..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/severity.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate stringer -type=Severity -linecomment - -package log // import "go.opentelemetry.io/otel/log" - -// Severity represents a log record severity (also known as log level). Smaller -// numerical values correspond to less severe log records (such as debug -// events), larger numerical values correspond to more severe log records (such -// as errors and critical events). -type Severity int - -// Severity values defined by OpenTelemetry. -const ( - // SeverityUndefined represents an unset Severity. - SeverityUndefined Severity = 0 // UNDEFINED - - // A fine-grained debugging log record. Typically disabled in default - // configurations. - SeverityTrace1 Severity = 1 // TRACE - SeverityTrace2 Severity = 2 // TRACE2 - SeverityTrace3 Severity = 3 // TRACE3 - SeverityTrace4 Severity = 4 // TRACE4 - - // A debugging log record. - SeverityDebug1 Severity = 5 // DEBUG - SeverityDebug2 Severity = 6 // DEBUG2 - SeverityDebug3 Severity = 7 // DEBUG3 - SeverityDebug4 Severity = 8 // DEBUG4 - - // An informational log record. Indicates that an event happened. - SeverityInfo1 Severity = 9 // INFO - SeverityInfo2 Severity = 10 // INFO2 - SeverityInfo3 Severity = 11 // INFO3 - SeverityInfo4 Severity = 12 // INFO4 - - // A warning log record. Not an error but is likely more important than an - // informational event. - SeverityWarn1 Severity = 13 // WARN - SeverityWarn2 Severity = 14 // WARN2 - SeverityWarn3 Severity = 15 // WARN3 - SeverityWarn4 Severity = 16 // WARN4 - - // An error log record. Something went wrong. - SeverityError1 Severity = 17 // ERROR - SeverityError2 Severity = 18 // ERROR2 - SeverityError3 Severity = 19 // ERROR3 - SeverityError4 Severity = 20 // ERROR4 - - // A fatal log record such as application or system crash. - SeverityFatal1 Severity = 21 // FATAL - SeverityFatal2 Severity = 22 // FATAL2 - SeverityFatal3 Severity = 23 // FATAL3 - SeverityFatal4 Severity = 24 // FATAL4 - - // Convenience definitions for the base severity of each level. - SeverityTrace = SeverityTrace1 - SeverityDebug = SeverityDebug1 - SeverityInfo = SeverityInfo1 - SeverityWarn = SeverityWarn1 - SeverityError = SeverityError1 - SeverityFatal = SeverityFatal1 -) diff --git a/vendor/go.opentelemetry.io/otel/log/severity_string.go b/vendor/go.opentelemetry.io/otel/log/severity_string.go deleted file mode 100644 index 4c20fa5e8a..0000000000 --- a/vendor/go.opentelemetry.io/otel/log/severity_string.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by "stringer -type=Severity -linecomment"; DO NOT EDIT. - -package log - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[SeverityUndefined-0] - _ = x[SeverityTrace1-1] - _ = x[SeverityTrace2-2] - _ = x[SeverityTrace3-3] - _ = x[SeverityTrace4-4] - _ = x[SeverityDebug1-5] - _ = x[SeverityDebug2-6] - _ = x[SeverityDebug3-7] - _ = x[SeverityDebug4-8] - _ = x[SeverityInfo1-9] - _ = x[SeverityInfo2-10] - _ = x[SeverityInfo3-11] - _ = x[SeverityInfo4-12] - _ = x[SeverityWarn1-13] - _ = x[SeverityWarn2-14] - _ = x[SeverityWarn3-15] - _ = x[SeverityWarn4-16] - _ = x[SeverityError1-17] - _ = x[SeverityError2-18] - _ = x[SeverityError3-19] - _ = x[SeverityError4-20] - _ = x[SeverityFatal1-21] - _ = x[SeverityFatal2-22] - _ = x[SeverityFatal3-23] - _ = x[SeverityFatal4-24] -} - -const _Severity_name = "UNDEFINEDTRACETRACE2TRACE3TRACE4DEBUGDEBUG2DEBUG3DEBUG4INFOINFO2INFO3INFO4WARNWARN2WARN3WARN4ERRORERROR2ERROR3ERROR4FATALFATAL2FATAL3FATAL4" - -var _Severity_index = [...]uint8{0, 9, 14, 20, 26, 32, 37, 43, 49, 55, 59, 64, 69, 74, 78, 83, 88, 93, 98, 104, 110, 116, 121, 127, 133, 139} - -func (i Severity) String() string { - if i < 0 || i >= Severity(len(_Severity_index)-1) { - return "Severity(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Severity_name[_Severity_index[i]:_Severity_index[i+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/metric.go b/vendor/go.opentelemetry.io/otel/metric.go deleted file mode 100644 index 527d9aec86..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -import ( - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/metric" -) - -// Meter returns a Meter from the global MeterProvider. The name must be the -// name of the library providing instrumentation. This name may be the same as -// the instrumented code only if that code provides built-in instrumentation. -// If the name is empty, then an implementation defined default name will be -// used instead. -// -// If this is called before a global MeterProvider is registered the returned -// Meter will be a No-op implementation of a Meter. When a global MeterProvider -// is registered for the first time, the returned Meter, and all the -// instruments it has created or will create, are recreated automatically from -// the new MeterProvider. -// -// This is short for GetMeterProvider().Meter(name). -func Meter(name string, opts ...metric.MeterOption) metric.Meter { - return GetMeterProvider().Meter(name, opts...) -} - -// GetMeterProvider returns the registered global meter provider. -// -// If no global GetMeterProvider has been registered, a No-op GetMeterProvider -// implementation is returned. When a global GetMeterProvider is registered for -// the first time, the returned GetMeterProvider, and all the Meters it has -// created or will create, are recreated automatically from the new -// GetMeterProvider. -func GetMeterProvider() metric.MeterProvider { - return global.MeterProvider() -} - -// SetMeterProvider registers mp as the global MeterProvider. -func SetMeterProvider(mp metric.MeterProvider) { - global.SetMeterProvider(mp) -} diff --git a/vendor/go.opentelemetry.io/otel/metric/LICENSE b/vendor/go.opentelemetry.io/otel/metric/LICENSE deleted file mode 100644 index f1aee0f110..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/LICENSE +++ /dev/null @@ -1,231 +0,0 @@ - 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 - - 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] - - 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. - --------------------------------------------------------------------------------- - -Copyright 2009 The Go Authors. - -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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/metric/README.md b/vendor/go.opentelemetry.io/otel/metric/README.md deleted file mode 100644 index 0cf902e01f..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Metric API - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric)](https://pkg.go.dev/go.opentelemetry.io/otel/metric) diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go deleted file mode 100644 index b7fc973a66..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go +++ /dev/null @@ -1,266 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/metric/embedded" -) - -// Float64Observable describes a set of instruments used asynchronously to -// record float64 measurements once per collection cycle. Observations of -// these instruments are only made within a callback. -// -// Warning: Methods may be added to this interface in minor releases. -type Float64Observable interface { - Observable - - float64Observable() -} - -// Float64ObservableCounter is an instrument used to asynchronously record -// increasing float64 measurements once per collection cycle. Observations are -// only made within a callback for this instrument. The value observed is -// assumed the to be the cumulative sum of the count. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for -// unimplemented methods. -type Float64ObservableCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64ObservableCounter - - Float64Observable -} - -// Float64ObservableCounterConfig contains options for asynchronous counter -// instruments that record float64 values. -type Float64ObservableCounterConfig struct { - description string - unit string - callbacks []Float64Callback -} - -// NewFloat64ObservableCounterConfig returns a new -// [Float64ObservableCounterConfig] with all opts applied. -func NewFloat64ObservableCounterConfig(opts ...Float64ObservableCounterOption) Float64ObservableCounterConfig { - var config Float64ObservableCounterConfig - for _, o := range opts { - config = o.applyFloat64ObservableCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Float64ObservableCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64ObservableCounterConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Float64ObservableCounterConfig) Callbacks() []Float64Callback { - return c.callbacks -} - -// Float64ObservableCounterOption applies options to a -// [Float64ObservableCounterConfig]. See [Float64ObservableOption] and -// [InstrumentOption] for other options that can be used as a -// Float64ObservableCounterOption. -type Float64ObservableCounterOption interface { - applyFloat64ObservableCounter(Float64ObservableCounterConfig) Float64ObservableCounterConfig -} - -// Float64ObservableUpDownCounter is an instrument used to asynchronously -// record float64 measurements once per collection cycle. Observations are only -// made within a callback for this instrument. The value observed is assumed -// the to be the cumulative sum of the count. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64ObservableUpDownCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64ObservableUpDownCounter - - Float64Observable -} - -// Float64ObservableUpDownCounterConfig contains options for asynchronous -// counter instruments that record float64 values. -type Float64ObservableUpDownCounterConfig struct { - description string - unit string - callbacks []Float64Callback -} - -// NewFloat64ObservableUpDownCounterConfig returns a new -// [Float64ObservableUpDownCounterConfig] with all opts applied. -func NewFloat64ObservableUpDownCounterConfig( - opts ...Float64ObservableUpDownCounterOption, -) Float64ObservableUpDownCounterConfig { - var config Float64ObservableUpDownCounterConfig - for _, o := range opts { - config = o.applyFloat64ObservableUpDownCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Float64ObservableUpDownCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64ObservableUpDownCounterConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Float64ObservableUpDownCounterConfig) Callbacks() []Float64Callback { - return c.callbacks -} - -// Float64ObservableUpDownCounterOption applies options to a -// [Float64ObservableUpDownCounterConfig]. See [Float64ObservableOption] and -// [InstrumentOption] for other options that can be used as a -// Float64ObservableUpDownCounterOption. -type Float64ObservableUpDownCounterOption interface { - applyFloat64ObservableUpDownCounter(Float64ObservableUpDownCounterConfig) Float64ObservableUpDownCounterConfig -} - -// Float64ObservableGauge is an instrument used to asynchronously record -// instantaneous float64 measurements once per collection cycle. Observations -// are only made within a callback for this instrument. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64ObservableGauge interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64ObservableGauge - - Float64Observable -} - -// Float64ObservableGaugeConfig contains options for asynchronous counter -// instruments that record float64 values. -type Float64ObservableGaugeConfig struct { - description string - unit string - callbacks []Float64Callback -} - -// NewFloat64ObservableGaugeConfig returns a new [Float64ObservableGaugeConfig] -// with all opts applied. -func NewFloat64ObservableGaugeConfig(opts ...Float64ObservableGaugeOption) Float64ObservableGaugeConfig { - var config Float64ObservableGaugeConfig - for _, o := range opts { - config = o.applyFloat64ObservableGauge(config) - } - return config -} - -// Description returns the configured description. -func (c Float64ObservableGaugeConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64ObservableGaugeConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Float64ObservableGaugeConfig) Callbacks() []Float64Callback { - return c.callbacks -} - -// Float64ObservableGaugeOption applies options to a -// [Float64ObservableGaugeConfig]. See [Float64ObservableOption] and -// [InstrumentOption] for other options that can be used as a -// Float64ObservableGaugeOption. -type Float64ObservableGaugeOption interface { - applyFloat64ObservableGauge(Float64ObservableGaugeConfig) Float64ObservableGaugeConfig -} - -// Float64Observer is a recorder of float64 measurements. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64Observer interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64Observer - - // Observe records the float64 value. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Observe(value float64, options ...ObserveOption) -} - -// Float64Callback is a function registered with a Meter that makes -// observations for a Float64Observable instrument it is registered with. -// Calls to the Float64Observer record measurement values for the -// Float64Observable. -// -// The function needs to complete in a finite amount of time and the deadline -// of the passed context is expected to be honored. -// -// The function needs to make unique observations across all registered -// Float64Callbacks. Meaning, it should not report measurements with the same -// attributes as another Float64Callbacks also registered for the same -// instrument. -// -// The function needs to be concurrent safe. -type Float64Callback func(context.Context, Float64Observer) error - -// Float64ObservableOption applies options to float64 Observer instruments. -type Float64ObservableOption interface { - Float64ObservableCounterOption - Float64ObservableUpDownCounterOption - Float64ObservableGaugeOption -} - -type float64CallbackOpt struct { - cback Float64Callback -} - -func (o float64CallbackOpt) applyFloat64ObservableCounter( - cfg Float64ObservableCounterConfig, -) Float64ObservableCounterConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -func (o float64CallbackOpt) applyFloat64ObservableUpDownCounter( - cfg Float64ObservableUpDownCounterConfig, -) Float64ObservableUpDownCounterConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -func (o float64CallbackOpt) applyFloat64ObservableGauge(cfg Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -// WithFloat64Callback adds callback to be called for an instrument. -func WithFloat64Callback(callback Float64Callback) Float64ObservableOption { - return float64CallbackOpt{callback} -} diff --git a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go b/vendor/go.opentelemetry.io/otel/metric/asyncint64.go deleted file mode 100644 index 4404b71a22..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/asyncint64.go +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/metric/embedded" -) - -// Int64Observable describes a set of instruments used asynchronously to record -// int64 measurements once per collection cycle. Observations of these -// instruments are only made within a callback. -// -// Warning: Methods may be added to this interface in minor releases. -type Int64Observable interface { - Observable - - int64Observable() -} - -// Int64ObservableCounter is an instrument used to asynchronously record -// increasing int64 measurements once per collection cycle. Observations are -// only made within a callback for this instrument. The value observed is -// assumed the to be the cumulative sum of the count. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64ObservableCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64ObservableCounter - - Int64Observable -} - -// Int64ObservableCounterConfig contains options for asynchronous counter -// instruments that record int64 values. -type Int64ObservableCounterConfig struct { - description string - unit string - callbacks []Int64Callback -} - -// NewInt64ObservableCounterConfig returns a new [Int64ObservableCounterConfig] -// with all opts applied. -func NewInt64ObservableCounterConfig(opts ...Int64ObservableCounterOption) Int64ObservableCounterConfig { - var config Int64ObservableCounterConfig - for _, o := range opts { - config = o.applyInt64ObservableCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Int64ObservableCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64ObservableCounterConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Int64ObservableCounterConfig) Callbacks() []Int64Callback { - return c.callbacks -} - -// Int64ObservableCounterOption applies options to a -// [Int64ObservableCounterConfig]. See [Int64ObservableOption] and -// [InstrumentOption] for other options that can be used as an -// Int64ObservableCounterOption. -type Int64ObservableCounterOption interface { - applyInt64ObservableCounter(Int64ObservableCounterConfig) Int64ObservableCounterConfig -} - -// Int64ObservableUpDownCounter is an instrument used to asynchronously record -// int64 measurements once per collection cycle. Observations are only made -// within a callback for this instrument. The value observed is assumed the to -// be the cumulative sum of the count. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64ObservableUpDownCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64ObservableUpDownCounter - - Int64Observable -} - -// Int64ObservableUpDownCounterConfig contains options for asynchronous counter -// instruments that record int64 values. -type Int64ObservableUpDownCounterConfig struct { - description string - unit string - callbacks []Int64Callback -} - -// NewInt64ObservableUpDownCounterConfig returns a new -// [Int64ObservableUpDownCounterConfig] with all opts applied. -func NewInt64ObservableUpDownCounterConfig( - opts ...Int64ObservableUpDownCounterOption, -) Int64ObservableUpDownCounterConfig { - var config Int64ObservableUpDownCounterConfig - for _, o := range opts { - config = o.applyInt64ObservableUpDownCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Int64ObservableUpDownCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64ObservableUpDownCounterConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Int64ObservableUpDownCounterConfig) Callbacks() []Int64Callback { - return c.callbacks -} - -// Int64ObservableUpDownCounterOption applies options to a -// [Int64ObservableUpDownCounterConfig]. See [Int64ObservableOption] and -// [InstrumentOption] for other options that can be used as an -// Int64ObservableUpDownCounterOption. -type Int64ObservableUpDownCounterOption interface { - applyInt64ObservableUpDownCounter(Int64ObservableUpDownCounterConfig) Int64ObservableUpDownCounterConfig -} - -// Int64ObservableGauge is an instrument used to asynchronously record -// instantaneous int64 measurements once per collection cycle. Observations are -// only made within a callback for this instrument. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64ObservableGauge interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64ObservableGauge - - Int64Observable -} - -// Int64ObservableGaugeConfig contains options for asynchronous counter -// instruments that record int64 values. -type Int64ObservableGaugeConfig struct { - description string - unit string - callbacks []Int64Callback -} - -// NewInt64ObservableGaugeConfig returns a new [Int64ObservableGaugeConfig] -// with all opts applied. -func NewInt64ObservableGaugeConfig(opts ...Int64ObservableGaugeOption) Int64ObservableGaugeConfig { - var config Int64ObservableGaugeConfig - for _, o := range opts { - config = o.applyInt64ObservableGauge(config) - } - return config -} - -// Description returns the configured description. -func (c Int64ObservableGaugeConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64ObservableGaugeConfig) Unit() string { - return c.unit -} - -// Callbacks returns the configured callbacks. -func (c Int64ObservableGaugeConfig) Callbacks() []Int64Callback { - return c.callbacks -} - -// Int64ObservableGaugeOption applies options to a -// [Int64ObservableGaugeConfig]. See [Int64ObservableOption] and -// [InstrumentOption] for other options that can be used as an -// Int64ObservableGaugeOption. -type Int64ObservableGaugeOption interface { - applyInt64ObservableGauge(Int64ObservableGaugeConfig) Int64ObservableGaugeConfig -} - -// Int64Observer is a recorder of int64 measurements. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64Observer interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64Observer - - // Observe records the int64 value. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Observe(value int64, options ...ObserveOption) -} - -// Int64Callback is a function registered with a Meter that makes observations -// for an Int64Observable instrument it is registered with. Calls to the -// Int64Observer record measurement values for the Int64Observable. -// -// The function needs to complete in a finite amount of time and the deadline -// of the passed context is expected to be honored. -// -// The function needs to make unique observations across all registered -// Int64Callbacks. Meaning, it should not report measurements with the same -// attributes as another Int64Callbacks also registered for the same -// instrument. -// -// The function needs to be concurrent safe. -type Int64Callback func(context.Context, Int64Observer) error - -// Int64ObservableOption applies options to int64 Observer instruments. -type Int64ObservableOption interface { - Int64ObservableCounterOption - Int64ObservableUpDownCounterOption - Int64ObservableGaugeOption -} - -type int64CallbackOpt struct { - cback Int64Callback -} - -func (o int64CallbackOpt) applyInt64ObservableCounter(cfg Int64ObservableCounterConfig) Int64ObservableCounterConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -func (o int64CallbackOpt) applyInt64ObservableUpDownCounter( - cfg Int64ObservableUpDownCounterConfig, -) Int64ObservableUpDownCounterConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -func (o int64CallbackOpt) applyInt64ObservableGauge(cfg Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { - cfg.callbacks = append(cfg.callbacks, o.cback) - return cfg -} - -// WithInt64Callback adds callback to be called for an instrument. -func WithInt64Callback(callback Int64Callback) Int64ObservableOption { - return int64CallbackOpt{callback} -} diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go deleted file mode 100644 index e42dd6e70a..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/config.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "slices" - - "go.opentelemetry.io/otel/attribute" -) - -// MeterConfig contains options for Meters. -type MeterConfig struct { - instrumentationVersion string - schemaURL string - attrs attribute.Set - - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint: unused // This is indeed used. -} - -// InstrumentationVersion returns the version of the library providing -// instrumentation. -func (cfg MeterConfig) InstrumentationVersion() string { - return cfg.instrumentationVersion -} - -// InstrumentationAttributes returns the attributes associated with the library -// providing instrumentation. -func (cfg MeterConfig) InstrumentationAttributes() attribute.Set { - return cfg.attrs -} - -// SchemaURL is the schema_url of the library providing instrumentation. -func (cfg MeterConfig) SchemaURL() string { - return cfg.schemaURL -} - -// MeterOption is an interface for applying Meter options. -type MeterOption interface { - // applyMeter is used to set a MeterOption value of a MeterConfig. - applyMeter(MeterConfig) MeterConfig -} - -// NewMeterConfig creates a new MeterConfig and applies -// all the given options. -func NewMeterConfig(opts ...MeterOption) MeterConfig { - var config MeterConfig - for _, o := range opts { - config = o.applyMeter(config) - } - return config -} - -type meterOptionFunc func(MeterConfig) MeterConfig - -func (fn meterOptionFunc) applyMeter(cfg MeterConfig) MeterConfig { - return fn(cfg) -} - -// WithInstrumentationVersion sets the instrumentation version. -func WithInstrumentationVersion(version string) MeterOption { - return meterOptionFunc(func(config MeterConfig) MeterConfig { - config.instrumentationVersion = version - return config - }) -} - -// WithInstrumentationAttributes adds the instrumentation attributes. -// -// This is equivalent to calling [WithInstrumentationAttributeSet] with an -// [attribute.Set] created from a clone of the passed attributes. -// [WithInstrumentationAttributeSet] is recommended for more control. -// -// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] -// options are passed, the attributes will be merged together in the order -// they are passed. Attributes with duplicate keys will use the last value passed. -func WithInstrumentationAttributes(attr ...attribute.KeyValue) MeterOption { - set := attribute.NewSet(slices.Clone(attr)...) - return WithInstrumentationAttributeSet(set) -} - -// WithInstrumentationAttributeSet adds the instrumentation attributes. -// -// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] -// options are passed, the attributes will be merged together in the order -// they are passed. Attributes with duplicate keys will use the last value passed. -func WithInstrumentationAttributeSet(set attribute.Set) MeterOption { - if set.Len() == 0 { - return meterOptionFunc(func(config MeterConfig) MeterConfig { - return config - }) - } - - return meterOptionFunc(func(config MeterConfig) MeterConfig { - if config.attrs.Len() == 0 { - config.attrs = set - } else { - config.attrs = mergeSets(config.attrs, set) - } - return config - }) -} - -// WithSchemaURL sets the schema URL. -func WithSchemaURL(schemaURL string) MeterOption { - return meterOptionFunc(func(config MeterConfig) MeterConfig { - config.schemaURL = schemaURL - return config - }) -} diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go deleted file mode 100644 index f153745b00..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/doc.go +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package metric provides the OpenTelemetry API used to measure metrics about -source code operation. - -This API is separate from its implementation so the instrumentation built from -it is reusable. See [go.opentelemetry.io/otel/sdk/metric] for the official -OpenTelemetry implementation of this API. - -All measurements made with this package are made via instruments. These -instruments are created by a [Meter] which itself is created by a -[MeterProvider]. Applications need to accept a [MeterProvider] implementation -as a starting point when instrumenting. This can be done directly, or by using -the OpenTelemetry global MeterProvider via [GetMeterProvider]. Using an -appropriately named [Meter] from the accepted [MeterProvider], instrumentation -can then be built from the [Meter]'s instruments. - -# Instruments - -Each instrument is designed to make measurements of a particular type. Broadly, -all instruments fall into two overlapping logical categories: asynchronous or -synchronous, and int64 or float64. - -All synchronous instruments ([Int64Counter], [Int64UpDownCounter], -[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and -[Float64Histogram]) are used to measure the operation and performance of source -code during the source code execution. These instruments only make measurements -when the source code they instrument is run. - -All asynchronous instruments ([Int64ObservableCounter], -[Int64ObservableUpDownCounter], [Int64ObservableGauge], -[Float64ObservableCounter], [Float64ObservableUpDownCounter], and -[Float64ObservableGauge]) are used to measure metrics outside of the execution -of source code. They are said to make "observations" via a callback function -called once every measurement collection cycle. - -Each instrument is also grouped by the value type it measures. Either int64 or -float64. The value being measured will dictate which instrument in these -categories to use. - -Outside of these two broad categories, instruments are described by the -function they are designed to serve. All Counters ([Int64Counter], -[Float64Counter], [Int64ObservableCounter], and [Float64ObservableCounter]) are -designed to measure values that never decrease in value, but instead only -incrementally increase in value. UpDownCounters ([Int64UpDownCounter], -[Float64UpDownCounter], [Int64ObservableUpDownCounter], and -[Float64ObservableUpDownCounter]) on the other hand, are designed to measure -values that can increase and decrease. When more information needs to be -conveyed about all the synchronous measurements made during a collection cycle, -a Histogram ([Int64Histogram] and [Float64Histogram]) should be used. Finally, -when just the most recent measurement needs to be conveyed about an -asynchronous measurement, a Gauge ([Int64ObservableGauge] and -[Float64ObservableGauge]) should be used. - -See the [OpenTelemetry documentation] for more information about instruments -and their intended use. - -# Instrument Name - -OpenTelemetry defines an [instrument name syntax] that restricts what -instrument names are allowed. - -Instrument names should ... - - - Not be empty. - - Have an alphabetic character as their first letter. - - Have any letter after the first be an alphanumeric character, ‘_’, ‘.’, - ‘-’, or ‘/’. - - Have a maximum length of 255 letters. - -To ensure compatibility with observability platforms, all instruments created -need to conform to this syntax. Not all implementations of the API will validate -these names, it is the callers responsibility to ensure compliance. - -# Measurements - -Measurements are made by recording values and information about the values with -an instrument. How these measurements are recorded depends on the instrument. - -Measurements for synchronous instruments ([Int64Counter], [Int64UpDownCounter], -[Int64Histogram], [Float64Counter], [Float64UpDownCounter], and -[Float64Histogram]) are recorded using the instrument methods directly. All -counter instruments have an Add method that is used to measure an increment -value, and all histogram instruments have a Record method to measure a data -point. - -Asynchronous instruments ([Int64ObservableCounter], -[Int64ObservableUpDownCounter], [Int64ObservableGauge], -[Float64ObservableCounter], [Float64ObservableUpDownCounter], and -[Float64ObservableGauge]) record measurements within a callback function. The -callback is registered with the Meter which ensures the callback is called once -per collection cycle. A callback can be registered two ways: during the -instrument's creation using an option, or later using the RegisterCallback -method of the [Meter] that created the instrument. - -If the following criteria are met, an option ([WithInt64Callback] or -[WithFloat64Callback]) can be used during the asynchronous instrument's -creation to register a callback ([Int64Callback] or [Float64Callback], -respectively): - - - The measurement process is known when the instrument is created - - Only that instrument will make a measurement within the callback - - The callback never needs to be unregistered - -If the criteria are not met, use the RegisterCallback method of the [Meter] that -created the instrument to register a [Callback]. - -# API Implementations - -This package does not conform to the standard Go versioning policy, all of its -interfaces may have methods added to them without a package major version bump. -This non-standard API evolution could surprise an uninformed implementation -author. They could unknowingly build their implementation in a way that would -result in a runtime panic for their users that update to the new API. - -The API is designed to help inform an instrumentation author about this -non-standard API evolution. It requires them to choose a default behavior for -unimplemented interface methods. There are three behavior choices they can -make: - - - Compilation failure - - Panic - - Default to another implementation - -All interfaces in this API embed a corresponding interface from -[go.opentelemetry.io/otel/metric/embedded]. If an author wants the default -behavior of their implementations to be a compilation failure, signaling to -their users they need to update to the latest version of that implementation, -they need to embed the corresponding interface from -[go.opentelemetry.io/otel/metric/embedded] in their implementation. For -example, - - import "go.opentelemetry.io/otel/metric/embedded" - - type MeterProvider struct { - embedded.MeterProvider - // ... - } - -If an author wants the default behavior of their implementations to a panic, -they need to embed the API interface directly. - - import "go.opentelemetry.io/otel/metric" - - type MeterProvider struct { - metric.MeterProvider - // ... - } - -This is not a recommended behavior as it could lead to publishing packages that -contain runtime panics when users update other package that use newer versions -of [go.opentelemetry.io/otel/metric]. - -Finally, an author can embed another implementation in theirs. The embedded -implementation will be used for methods not defined by the author. For example, -an author who wants to default to silently dropping the call can use -[go.opentelemetry.io/otel/metric/noop]: - - import "go.opentelemetry.io/otel/metric/noop" - - type MeterProvider struct { - noop.MeterProvider - // ... - } - -It is strongly recommended that authors only embed -[go.opentelemetry.io/otel/metric/noop] if they choose this default behavior. -That implementation is the only one OpenTelemetry authors can guarantee will -fully implement all the API interfaces when a user updates their API. - -[instrument name syntax]: https://opentelemetry.io/docs/specs/otel/metrics/api/#instrument-name-syntax -[OpenTelemetry documentation]: https://opentelemetry.io/docs/concepts/signals/metrics/ -[GetMeterProvider]: https://pkg.go.dev/go.opentelemetry.io/otel#GetMeterProvider -*/ -package metric // import "go.opentelemetry.io/otel/metric" diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/README.md b/vendor/go.opentelemetry.io/otel/metric/embedded/README.md deleted file mode 100644 index 1f6e0efa73..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/embedded/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Metric Embedded - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/embedded) diff --git a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go deleted file mode 100644 index 1a9dc68093..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/embedded/embedded.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package embedded provides interfaces embedded within the [OpenTelemetry -// metric API]. -// -// Implementers of the [OpenTelemetry metric API] can embed the relevant type -// from this package into their implementation directly. Doing so will result -// in a compilation error for users when the [OpenTelemetry metric API] is -// extended (which is something that can happen without a major version bump of -// the API package). -// -// [OpenTelemetry metric API]: https://pkg.go.dev/go.opentelemetry.io/otel/metric -package embedded // import "go.opentelemetry.io/otel/metric/embedded" - -// MeterProvider is embedded in -// [go.opentelemetry.io/otel/metric.MeterProvider]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.MeterProvider] if you want users to -// experience a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.MeterProvider] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type MeterProvider interface{ meterProvider() } - -// Meter is embedded in [go.opentelemetry.io/otel/metric.Meter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Meter] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.Meter] interface -// is extended (which is something that can happen without a major version bump -// of the API package). -type Meter interface{ meter() } - -// Float64Observer is embedded in -// [go.opentelemetry.io/otel/metric.Float64Observer]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64Observer] if you want -// users to experience a compilation error, signaling they need to update to -// your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64Observer] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Float64Observer interface{ float64Observer() } - -// Int64Observer is embedded in -// [go.opentelemetry.io/otel/metric.Int64Observer]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64Observer] if you want users -// to experience a compilation error, signaling they need to update to your -// latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64Observer] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Int64Observer interface{ int64Observer() } - -// Observer is embedded in [go.opentelemetry.io/otel/metric.Observer]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Observer] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.Observer] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Observer interface{ observer() } - -// Registration is embedded in [go.opentelemetry.io/otel/metric.Registration]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Registration] if you want users to -// experience a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.Registration] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Registration interface{ registration() } - -// Float64Counter is embedded in -// [go.opentelemetry.io/otel/metric.Float64Counter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64Counter] if you want -// users to experience a compilation error, signaling they need to update to -// your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64Counter] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Float64Counter interface{ float64Counter() } - -// Float64Histogram is embedded in -// [go.opentelemetry.io/otel/metric.Float64Histogram]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64Histogram] if you want -// users to experience a compilation error, signaling they need to update to -// your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64Histogram] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Float64Histogram interface{ float64Histogram() } - -// Float64Gauge is embedded in [go.opentelemetry.io/otel/metric.Float64Gauge]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64Gauge] if you want users to -// experience a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.Float64Gauge] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Float64Gauge interface{ float64Gauge() } - -// Float64ObservableCounter is embedded in -// [go.opentelemetry.io/otel/metric.Float64ObservableCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64ObservableCounter] if you -// want users to experience a compilation error, signaling they need to update -// to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64ObservableCounter] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Float64ObservableCounter interface{ float64ObservableCounter() } - -// Float64ObservableGauge is embedded in -// [go.opentelemetry.io/otel/metric.Float64ObservableGauge]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64ObservableGauge] if you -// want users to experience a compilation error, signaling they need to update -// to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64ObservableGauge] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Float64ObservableGauge interface{ float64ObservableGauge() } - -// Float64ObservableUpDownCounter is embedded in -// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] -// if you want users to experience a compilation error, signaling they need to -// update to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64ObservableUpDownCounter] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Float64ObservableUpDownCounter interface{ float64ObservableUpDownCounter() } - -// Float64UpDownCounter is embedded in -// [go.opentelemetry.io/otel/metric.Float64UpDownCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] if you -// want users to experience a compilation error, signaling they need to update -// to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Float64UpDownCounter] interface -// is extended (which is something that can happen without a major version bump -// of the API package). -type Float64UpDownCounter interface{ float64UpDownCounter() } - -// Int64Counter is embedded in -// [go.opentelemetry.io/otel/metric.Int64Counter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64Counter] if you want users -// to experience a compilation error, signaling they need to update to your -// latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64Counter] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Int64Counter interface{ int64Counter() } - -// Int64Histogram is embedded in -// [go.opentelemetry.io/otel/metric.Int64Histogram]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64Histogram] if you want -// users to experience a compilation error, signaling they need to update to -// your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64Histogram] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Int64Histogram interface{ int64Histogram() } - -// Int64Gauge is embedded in [go.opentelemetry.io/otel/metric.Int64Gauge]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64Gauge] if you want users to experience -// a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/metric.Int64Gauge] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Int64Gauge interface{ int64Gauge() } - -// Int64ObservableCounter is embedded in -// [go.opentelemetry.io/otel/metric.Int64ObservableCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64ObservableCounter] if you -// want users to experience a compilation error, signaling they need to update -// to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64ObservableCounter] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Int64ObservableCounter interface{ int64ObservableCounter() } - -// Int64ObservableGauge is embedded in -// [go.opentelemetry.io/otel/metric.Int64ObservableGauge]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] if you -// want users to experience a compilation error, signaling they need to update -// to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64ObservableGauge] interface -// is extended (which is something that can happen without a major version bump -// of the API package). -type Int64ObservableGauge interface{ int64ObservableGauge() } - -// Int64ObservableUpDownCounter is embedded in -// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] if -// you want users to experience a compilation error, signaling they need to -// update to your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64ObservableUpDownCounter] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type Int64ObservableUpDownCounter interface{ int64ObservableUpDownCounter() } - -// Int64UpDownCounter is embedded in -// [go.opentelemetry.io/otel/metric.Int64UpDownCounter]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] if you want -// users to experience a compilation error, signaling they need to update to -// your latest implementation, when the -// [go.opentelemetry.io/otel/metric.Int64UpDownCounter] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Int64UpDownCounter interface{ int64UpDownCounter() } diff --git a/vendor/go.opentelemetry.io/otel/metric/instrument.go b/vendor/go.opentelemetry.io/otel/metric/instrument.go deleted file mode 100644 index 9f48d5f117..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/instrument.go +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import "go.opentelemetry.io/otel/attribute" - -// Observable is used as a grouping mechanism for all instruments that are -// updated within a Callback. -type Observable interface { - observable() -} - -// InstrumentOption applies options to all instruments. -type InstrumentOption interface { - Int64CounterOption - Int64UpDownCounterOption - Int64HistogramOption - Int64GaugeOption - Int64ObservableCounterOption - Int64ObservableUpDownCounterOption - Int64ObservableGaugeOption - - Float64CounterOption - Float64UpDownCounterOption - Float64HistogramOption - Float64GaugeOption - Float64ObservableCounterOption - Float64ObservableUpDownCounterOption - Float64ObservableGaugeOption -} - -// HistogramOption applies options to histogram instruments. -type HistogramOption interface { - Int64HistogramOption - Float64HistogramOption -} - -type descOpt string - -func (o descOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64ObservableUpDownCounter( - c Float64ObservableUpDownCounterConfig, -) Float64ObservableUpDownCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64ObservableUpDownCounter( - c Int64ObservableUpDownCounterConfig, -) Int64ObservableUpDownCounterConfig { - c.description = string(o) - return c -} - -func (o descOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { - c.description = string(o) - return c -} - -// WithDescription sets the instrument description. -func WithDescription(desc string) InstrumentOption { return descOpt(desc) } - -type unitOpt string - -func (o unitOpt) applyFloat64Counter(c Float64CounterConfig) Float64CounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64UpDownCounter(c Float64UpDownCounterConfig) Float64UpDownCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64Gauge(c Float64GaugeConfig) Float64GaugeConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64ObservableCounter(c Float64ObservableCounterConfig) Float64ObservableCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64ObservableUpDownCounter( - c Float64ObservableUpDownCounterConfig, -) Float64ObservableUpDownCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyFloat64ObservableGauge(c Float64ObservableGaugeConfig) Float64ObservableGaugeConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64Counter(c Int64CounterConfig) Int64CounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64UpDownCounter(c Int64UpDownCounterConfig) Int64UpDownCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64Gauge(c Int64GaugeConfig) Int64GaugeConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64ObservableCounter(c Int64ObservableCounterConfig) Int64ObservableCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64ObservableUpDownCounter( - c Int64ObservableUpDownCounterConfig, -) Int64ObservableUpDownCounterConfig { - c.unit = string(o) - return c -} - -func (o unitOpt) applyInt64ObservableGauge(c Int64ObservableGaugeConfig) Int64ObservableGaugeConfig { - c.unit = string(o) - return c -} - -// WithUnit sets the instrument unit. -// -// The unit u should be defined using the appropriate [UCUM](https://ucum.org) case-sensitive code. -func WithUnit(u string) InstrumentOption { return unitOpt(u) } - -// WithExplicitBucketBoundaries sets the instrument explicit bucket boundaries. -// -// This option is considered "advisory", and may be ignored by API implementations. -func WithExplicitBucketBoundaries(bounds ...float64) HistogramOption { return bucketOpt(bounds) } - -type bucketOpt []float64 - -func (o bucketOpt) applyFloat64Histogram(c Float64HistogramConfig) Float64HistogramConfig { - c.explicitBucketBoundaries = o - return c -} - -func (o bucketOpt) applyInt64Histogram(c Int64HistogramConfig) Int64HistogramConfig { - c.explicitBucketBoundaries = o - return c -} - -// AddOption applies options to an addition measurement. See -// [MeasurementOption] for other options that can be used as an AddOption. -type AddOption interface { - applyAdd(AddConfig) AddConfig -} - -// AddConfig contains options for an addition measurement. -type AddConfig struct { - attrs attribute.Set -} - -// NewAddConfig returns a new [AddConfig] with all opts applied. -func NewAddConfig(opts []AddOption) AddConfig { - config := AddConfig{attrs: *attribute.EmptySet()} - for _, o := range opts { - config = o.applyAdd(config) - } - return config -} - -// Attributes returns the configured attribute set. -func (c AddConfig) Attributes() attribute.Set { - return c.attrs -} - -// RecordOption applies options to an addition measurement. See -// [MeasurementOption] for other options that can be used as a RecordOption. -type RecordOption interface { - applyRecord(RecordConfig) RecordConfig -} - -// RecordConfig contains options for a recorded measurement. -type RecordConfig struct { - attrs attribute.Set -} - -// NewRecordConfig returns a new [RecordConfig] with all opts applied. -func NewRecordConfig(opts []RecordOption) RecordConfig { - config := RecordConfig{attrs: *attribute.EmptySet()} - for _, o := range opts { - config = o.applyRecord(config) - } - return config -} - -// Attributes returns the configured attribute set. -func (c RecordConfig) Attributes() attribute.Set { - return c.attrs -} - -// ObserveOption applies options to an addition measurement. See -// [MeasurementOption] for other options that can be used as a ObserveOption. -type ObserveOption interface { - applyObserve(ObserveConfig) ObserveConfig -} - -// ObserveConfig contains options for an observed measurement. -type ObserveConfig struct { - attrs attribute.Set -} - -// NewObserveConfig returns a new [ObserveConfig] with all opts applied. -func NewObserveConfig(opts []ObserveOption) ObserveConfig { - config := ObserveConfig{attrs: *attribute.EmptySet()} - for _, o := range opts { - config = o.applyObserve(config) - } - return config -} - -// Attributes returns the configured attribute set. -func (c ObserveConfig) Attributes() attribute.Set { - return c.attrs -} - -// MeasurementOption applies options to all instrument measurement. -type MeasurementOption interface { - AddOption - RecordOption - ObserveOption -} - -type attrOpt struct { - set attribute.Set -} - -// mergeSets returns the union of keys between a and b. Any duplicate keys will -// use the value associated with b. -func mergeSets(a, b attribute.Set) attribute.Set { - // NewMergeIterator uses the first value for any duplicates. - iter := attribute.NewMergeIterator(&b, &a) - merged := make([]attribute.KeyValue, 0, a.Len()+b.Len()) - for iter.Next() { - merged = append(merged, iter.Attribute()) - } - return attribute.NewSet(merged...) -} - -func (o attrOpt) applyAdd(c AddConfig) AddConfig { - switch { - case o.set.Len() == 0: - case c.attrs.Len() == 0: - c.attrs = o.set - default: - c.attrs = mergeSets(c.attrs, o.set) - } - return c -} - -func (o attrOpt) applyRecord(c RecordConfig) RecordConfig { - switch { - case o.set.Len() == 0: - case c.attrs.Len() == 0: - c.attrs = o.set - default: - c.attrs = mergeSets(c.attrs, o.set) - } - return c -} - -func (o attrOpt) applyObserve(c ObserveConfig) ObserveConfig { - switch { - case o.set.Len() == 0: - case c.attrs.Len() == 0: - c.attrs = o.set - default: - c.attrs = mergeSets(c.attrs, o.set) - } - return c -} - -// WithAttributeSet sets the attribute Set associated with a measurement is -// made with. -// -// If multiple WithAttributeSet or WithAttributes options are passed the -// attributes will be merged together in the order they are passed. Attributes -// with duplicate keys will use the last value passed. -func WithAttributeSet(attributes attribute.Set) MeasurementOption { - return attrOpt{set: attributes} -} - -// WithAttributes converts attributes into an attribute Set and sets the Set to -// be associated with a measurement. This is shorthand for: -// -// cp := make([]attribute.KeyValue, len(attributes)) -// copy(cp, attributes) -// WithAttributeSet(attribute.NewSet(cp...)) -// -// [attribute.NewSet] may modify the passed attributes so this will make a copy -// of attributes before creating a set in order to ensure this function is -// concurrent safe. This makes this option function less optimized in -// comparison to [WithAttributeSet]. Therefore, [WithAttributeSet] should be -// preferred for performance sensitive code. -// -// See [WithAttributeSet] for information about how multiple WithAttributes are -// merged. -func WithAttributes(attributes ...attribute.KeyValue) MeasurementOption { - cp := make([]attribute.KeyValue, len(attributes)) - copy(cp, attributes) - return attrOpt{set: attribute.NewSet(cp...)} -} diff --git a/vendor/go.opentelemetry.io/otel/metric/meter.go b/vendor/go.opentelemetry.io/otel/metric/meter.go deleted file mode 100644 index fdd2a7011c..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/meter.go +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/metric/embedded" -) - -// MeterProvider provides access to named Meter instances, for instrumenting -// an application or package. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type MeterProvider interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.MeterProvider - - // Meter returns a new Meter with the provided name and configuration. - // - // A Meter should be scoped at most to a single package. The name needs to - // be unique so it does not collide with other names used by - // an application, nor other applications. To achieve this, the import path - // of the instrumentation package is recommended to be used as name. - // - // If the name is empty, then an implementation defined default name will - // be used instead. - Meter(name string, opts ...MeterOption) Meter -} - -// Meter provides access to instrument instances for recording metrics. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Meter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Meter - - // Int64Counter returns a new Int64Counter instrument identified by name - // and configured with options. The instrument is used to synchronously - // record increasing int64 measurements during a computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64Counter(name string, options ...Int64CounterOption) (Int64Counter, error) - - // Int64UpDownCounter returns a new Int64UpDownCounter instrument - // identified by name and configured with options. The instrument is used - // to synchronously record int64 measurements during a computational - // operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64UpDownCounter(name string, options ...Int64UpDownCounterOption) (Int64UpDownCounter, error) - - // Int64Histogram returns a new Int64Histogram instrument identified by - // name and configured with options. The instrument is used to - // synchronously record the distribution of int64 measurements during a - // computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64Histogram(name string, options ...Int64HistogramOption) (Int64Histogram, error) - - // Int64Gauge returns a new Int64Gauge instrument identified by name and - // configured with options. The instrument is used to synchronously record - // instantaneous int64 measurements during a computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64Gauge(name string, options ...Int64GaugeOption) (Int64Gauge, error) - - // Int64ObservableCounter returns a new Int64ObservableCounter identified - // by name and configured with options. The instrument is used to - // asynchronously record increasing int64 measurements once per a - // measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithInt64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64ObservableCounter(name string, options ...Int64ObservableCounterOption) (Int64ObservableCounter, error) - - // Int64ObservableUpDownCounter returns a new Int64ObservableUpDownCounter - // instrument identified by name and configured with options. The - // instrument is used to asynchronously record int64 measurements once per - // a measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithInt64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64ObservableUpDownCounter( - name string, - options ...Int64ObservableUpDownCounterOption, - ) (Int64ObservableUpDownCounter, error) - - // Int64ObservableGauge returns a new Int64ObservableGauge instrument - // identified by name and configured with options. The instrument is used - // to asynchronously record instantaneous int64 measurements once per a - // measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithInt64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Int64ObservableGauge(name string, options ...Int64ObservableGaugeOption) (Int64ObservableGauge, error) - - // Float64Counter returns a new Float64Counter instrument identified by - // name and configured with options. The instrument is used to - // synchronously record increasing float64 measurements during a - // computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64Counter(name string, options ...Float64CounterOption) (Float64Counter, error) - - // Float64UpDownCounter returns a new Float64UpDownCounter instrument - // identified by name and configured with options. The instrument is used - // to synchronously record float64 measurements during a computational - // operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64UpDownCounter(name string, options ...Float64UpDownCounterOption) (Float64UpDownCounter, error) - - // Float64Histogram returns a new Float64Histogram instrument identified by - // name and configured with options. The instrument is used to - // synchronously record the distribution of float64 measurements during a - // computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64Histogram(name string, options ...Float64HistogramOption) (Float64Histogram, error) - - // Float64Gauge returns a new Float64Gauge instrument identified by name and - // configured with options. The instrument is used to synchronously record - // instantaneous float64 measurements during a computational operation. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64Gauge(name string, options ...Float64GaugeOption) (Float64Gauge, error) - - // Float64ObservableCounter returns a new Float64ObservableCounter - // instrument identified by name and configured with options. The - // instrument is used to asynchronously record increasing float64 - // measurements once per a measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithFloat64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64ObservableCounter(name string, options ...Float64ObservableCounterOption) (Float64ObservableCounter, error) - - // Float64ObservableUpDownCounter returns a new - // Float64ObservableUpDownCounter instrument identified by name and - // configured with options. The instrument is used to asynchronously record - // float64 measurements once per a measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithFloat64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64ObservableUpDownCounter( - name string, - options ...Float64ObservableUpDownCounterOption, - ) (Float64ObservableUpDownCounter, error) - - // Float64ObservableGauge returns a new Float64ObservableGauge instrument - // identified by name and configured with options. The instrument is used - // to asynchronously record instantaneous float64 measurements once per a - // measurement collection cycle. - // - // Measurements for the returned instrument are made via a callback. Use - // the WithFloat64Callback option to register the callback here, or use the - // RegisterCallback method of this Meter to register one later. See the - // Measurements section of the package documentation for more information. - // - // The name needs to conform to the OpenTelemetry instrument name syntax. - // See the Instrument Name section of the package documentation for more - // information. - Float64ObservableGauge(name string, options ...Float64ObservableGaugeOption) (Float64ObservableGauge, error) - - // RegisterCallback registers f to be called during the collection of a - // measurement cycle. - // - // If Unregister of the returned Registration is called, f needs to be - // unregistered and not called during collection. - // - // The instruments f is registered with are the only instruments that f may - // observe values for. - // - // If no instruments are passed, f should not be registered nor called - // during collection. - // - // The function f needs to be concurrent safe. - RegisterCallback(f Callback, instruments ...Observable) (Registration, error) -} - -// Callback is a function registered with a Meter that makes observations for -// the set of instruments it is registered with. The Observer parameter is used -// to record measurement observations for these instruments. -// -// The function needs to complete in a finite amount of time and the deadline -// of the passed context is expected to be honored. -// -// The function needs to make unique observations across all registered -// Callbacks. Meaning, it should not report measurements for an instrument with -// the same attributes as another Callback will report. -// -// The function needs to be concurrent safe. -type Callback func(context.Context, Observer) error - -// Observer records measurements for multiple instruments in a Callback. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Observer interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Observer - - // ObserveFloat64 records the float64 value for obsrv. - ObserveFloat64(obsrv Float64Observable, value float64, opts ...ObserveOption) - - // ObserveInt64 records the int64 value for obsrv. - ObserveInt64(obsrv Int64Observable, value int64, opts ...ObserveOption) -} - -// Registration is an token representing the unique registration of a callback -// for a set of instruments with a Meter. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Registration interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Registration - - // Unregister removes the callback registration from a Meter. - // - // This method needs to be idempotent and concurrent safe. - Unregister() error -} diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/README.md b/vendor/go.opentelemetry.io/otel/metric/noop/README.md deleted file mode 100644 index bb89694356..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/noop/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Metric Noop - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/metric/noop)](https://pkg.go.dev/go.opentelemetry.io/otel/metric/noop) diff --git a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go b/vendor/go.opentelemetry.io/otel/metric/noop/noop.go deleted file mode 100644 index 9afb69e583..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/noop/noop.go +++ /dev/null @@ -1,296 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package noop provides an implementation of the OpenTelemetry metric API that -// produces no telemetry and minimizes used computation resources. -// -// Using this package to implement the OpenTelemetry metric API will -// effectively disable OpenTelemetry. -// -// This implementation can be embedded in other implementations of the -// OpenTelemetry metric API. Doing so will mean the implementation defaults to -// no operation for methods it does not implement. -package noop // import "go.opentelemetry.io/otel/metric/noop" - -import ( - "context" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/embedded" -) - -var ( - // Compile-time check this implements the OpenTelemetry API. - - _ metric.MeterProvider = MeterProvider{} - _ metric.Meter = Meter{} - _ metric.Observer = Observer{} - _ metric.Registration = Registration{} - _ metric.Int64Counter = Int64Counter{} - _ metric.Float64Counter = Float64Counter{} - _ metric.Int64UpDownCounter = Int64UpDownCounter{} - _ metric.Float64UpDownCounter = Float64UpDownCounter{} - _ metric.Int64Histogram = Int64Histogram{} - _ metric.Float64Histogram = Float64Histogram{} - _ metric.Int64Gauge = Int64Gauge{} - _ metric.Float64Gauge = Float64Gauge{} - _ metric.Int64ObservableCounter = Int64ObservableCounter{} - _ metric.Float64ObservableCounter = Float64ObservableCounter{} - _ metric.Int64ObservableGauge = Int64ObservableGauge{} - _ metric.Float64ObservableGauge = Float64ObservableGauge{} - _ metric.Int64ObservableUpDownCounter = Int64ObservableUpDownCounter{} - _ metric.Float64ObservableUpDownCounter = Float64ObservableUpDownCounter{} - _ metric.Int64Observer = Int64Observer{} - _ metric.Float64Observer = Float64Observer{} -) - -// MeterProvider is an OpenTelemetry No-Op MeterProvider. -type MeterProvider struct{ embedded.MeterProvider } - -// NewMeterProvider returns a MeterProvider that does not record any telemetry. -func NewMeterProvider() MeterProvider { - return MeterProvider{} -} - -// Meter returns an OpenTelemetry Meter that does not record any telemetry. -func (MeterProvider) Meter(string, ...metric.MeterOption) metric.Meter { - return Meter{} -} - -// Meter is an OpenTelemetry No-Op Meter. -type Meter struct{ embedded.Meter } - -// Int64Counter returns a Counter used to record int64 measurements that -// produces no telemetry. -func (Meter) Int64Counter(string, ...metric.Int64CounterOption) (metric.Int64Counter, error) { - return Int64Counter{}, nil -} - -// Int64UpDownCounter returns an UpDownCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64UpDownCounter(string, ...metric.Int64UpDownCounterOption) (metric.Int64UpDownCounter, error) { - return Int64UpDownCounter{}, nil -} - -// Int64Histogram returns a Histogram used to record int64 measurements that -// produces no telemetry. -func (Meter) Int64Histogram(string, ...metric.Int64HistogramOption) (metric.Int64Histogram, error) { - return Int64Histogram{}, nil -} - -// Int64Gauge returns a Gauge used to record int64 measurements that -// produces no telemetry. -func (Meter) Int64Gauge(string, ...metric.Int64GaugeOption) (metric.Int64Gauge, error) { - return Int64Gauge{}, nil -} - -// Int64ObservableCounter returns an ObservableCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64ObservableCounter( - string, - ...metric.Int64ObservableCounterOption, -) (metric.Int64ObservableCounter, error) { - return Int64ObservableCounter{}, nil -} - -// Int64ObservableUpDownCounter returns an ObservableUpDownCounter used to -// record int64 measurements that produces no telemetry. -func (Meter) Int64ObservableUpDownCounter( - string, - ...metric.Int64ObservableUpDownCounterOption, -) (metric.Int64ObservableUpDownCounter, error) { - return Int64ObservableUpDownCounter{}, nil -} - -// Int64ObservableGauge returns an ObservableGauge used to record int64 -// measurements that produces no telemetry. -func (Meter) Int64ObservableGauge(string, ...metric.Int64ObservableGaugeOption) (metric.Int64ObservableGauge, error) { - return Int64ObservableGauge{}, nil -} - -// Float64Counter returns a Counter used to record int64 measurements that -// produces no telemetry. -func (Meter) Float64Counter(string, ...metric.Float64CounterOption) (metric.Float64Counter, error) { - return Float64Counter{}, nil -} - -// Float64UpDownCounter returns an UpDownCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64UpDownCounter(string, ...metric.Float64UpDownCounterOption) (metric.Float64UpDownCounter, error) { - return Float64UpDownCounter{}, nil -} - -// Float64Histogram returns a Histogram used to record int64 measurements that -// produces no telemetry. -func (Meter) Float64Histogram(string, ...metric.Float64HistogramOption) (metric.Float64Histogram, error) { - return Float64Histogram{}, nil -} - -// Float64Gauge returns a Gauge used to record float64 measurements that -// produces no telemetry. -func (Meter) Float64Gauge(string, ...metric.Float64GaugeOption) (metric.Float64Gauge, error) { - return Float64Gauge{}, nil -} - -// Float64ObservableCounter returns an ObservableCounter used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64ObservableCounter( - string, - ...metric.Float64ObservableCounterOption, -) (metric.Float64ObservableCounter, error) { - return Float64ObservableCounter{}, nil -} - -// Float64ObservableUpDownCounter returns an ObservableUpDownCounter used to -// record int64 measurements that produces no telemetry. -func (Meter) Float64ObservableUpDownCounter( - string, - ...metric.Float64ObservableUpDownCounterOption, -) (metric.Float64ObservableUpDownCounter, error) { - return Float64ObservableUpDownCounter{}, nil -} - -// Float64ObservableGauge returns an ObservableGauge used to record int64 -// measurements that produces no telemetry. -func (Meter) Float64ObservableGauge( - string, - ...metric.Float64ObservableGaugeOption, -) (metric.Float64ObservableGauge, error) { - return Float64ObservableGauge{}, nil -} - -// RegisterCallback performs no operation. -func (Meter) RegisterCallback(metric.Callback, ...metric.Observable) (metric.Registration, error) { - return Registration{}, nil -} - -// Observer acts as a recorder of measurements for multiple instruments in a -// Callback, it performing no operation. -type Observer struct{ embedded.Observer } - -// ObserveFloat64 performs no operation. -func (Observer) ObserveFloat64(metric.Float64Observable, float64, ...metric.ObserveOption) { -} - -// ObserveInt64 performs no operation. -func (Observer) ObserveInt64(metric.Int64Observable, int64, ...metric.ObserveOption) { -} - -// Registration is the registration of a Callback with a No-Op Meter. -type Registration struct{ embedded.Registration } - -// Unregister unregisters the Callback the Registration represents with the -// No-Op Meter. This will always return nil because the No-Op Meter performs no -// operation, including hold any record of registrations. -func (Registration) Unregister() error { return nil } - -// Int64Counter is an OpenTelemetry Counter used to record int64 measurements. -// It produces no telemetry. -type Int64Counter struct{ embedded.Int64Counter } - -// Add performs no operation. -func (Int64Counter) Add(context.Context, int64, ...metric.AddOption) {} - -// Float64Counter is an OpenTelemetry Counter used to record float64 -// measurements. It produces no telemetry. -type Float64Counter struct{ embedded.Float64Counter } - -// Add performs no operation. -func (Float64Counter) Add(context.Context, float64, ...metric.AddOption) {} - -// Int64UpDownCounter is an OpenTelemetry UpDownCounter used to record int64 -// measurements. It produces no telemetry. -type Int64UpDownCounter struct{ embedded.Int64UpDownCounter } - -// Add performs no operation. -func (Int64UpDownCounter) Add(context.Context, int64, ...metric.AddOption) {} - -// Float64UpDownCounter is an OpenTelemetry UpDownCounter used to record -// float64 measurements. It produces no telemetry. -type Float64UpDownCounter struct{ embedded.Float64UpDownCounter } - -// Add performs no operation. -func (Float64UpDownCounter) Add(context.Context, float64, ...metric.AddOption) {} - -// Int64Histogram is an OpenTelemetry Histogram used to record int64 -// measurements. It produces no telemetry. -type Int64Histogram struct{ embedded.Int64Histogram } - -// Record performs no operation. -func (Int64Histogram) Record(context.Context, int64, ...metric.RecordOption) {} - -// Float64Histogram is an OpenTelemetry Histogram used to record float64 -// measurements. It produces no telemetry. -type Float64Histogram struct{ embedded.Float64Histogram } - -// Record performs no operation. -func (Float64Histogram) Record(context.Context, float64, ...metric.RecordOption) {} - -// Int64Gauge is an OpenTelemetry Gauge used to record instantaneous int64 -// measurements. It produces no telemetry. -type Int64Gauge struct{ embedded.Int64Gauge } - -// Record performs no operation. -func (Int64Gauge) Record(context.Context, int64, ...metric.RecordOption) {} - -// Float64Gauge is an OpenTelemetry Gauge used to record instantaneous float64 -// measurements. It produces no telemetry. -type Float64Gauge struct{ embedded.Float64Gauge } - -// Record performs no operation. -func (Float64Gauge) Record(context.Context, float64, ...metric.RecordOption) {} - -// Int64ObservableCounter is an OpenTelemetry ObservableCounter used to record -// int64 measurements. It produces no telemetry. -type Int64ObservableCounter struct { - metric.Int64Observable - embedded.Int64ObservableCounter -} - -// Float64ObservableCounter is an OpenTelemetry ObservableCounter used to record -// float64 measurements. It produces no telemetry. -type Float64ObservableCounter struct { - metric.Float64Observable - embedded.Float64ObservableCounter -} - -// Int64ObservableGauge is an OpenTelemetry ObservableGauge used to record -// int64 measurements. It produces no telemetry. -type Int64ObservableGauge struct { - metric.Int64Observable - embedded.Int64ObservableGauge -} - -// Float64ObservableGauge is an OpenTelemetry ObservableGauge used to record -// float64 measurements. It produces no telemetry. -type Float64ObservableGauge struct { - metric.Float64Observable - embedded.Float64ObservableGauge -} - -// Int64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter -// used to record int64 measurements. It produces no telemetry. -type Int64ObservableUpDownCounter struct { - metric.Int64Observable - embedded.Int64ObservableUpDownCounter -} - -// Float64ObservableUpDownCounter is an OpenTelemetry ObservableUpDownCounter -// used to record float64 measurements. It produces no telemetry. -type Float64ObservableUpDownCounter struct { - metric.Float64Observable - embedded.Float64ObservableUpDownCounter -} - -// Int64Observer is a recorder of int64 measurements that performs no operation. -type Int64Observer struct{ embedded.Int64Observer } - -// Observe performs no operation. -func (Int64Observer) Observe(int64, ...metric.ObserveOption) {} - -// Float64Observer is a recorder of float64 measurements that performs no -// operation. -type Float64Observer struct{ embedded.Float64Observer } - -// Observe performs no operation. -func (Float64Observer) Observe(float64, ...metric.ObserveOption) {} diff --git a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go b/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go deleted file mode 100644 index 8403a4bad2..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/metric/embedded" -) - -// Float64Counter is an instrument that records increasing float64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64Counter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64Counter - - // Add records a change to the counter. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Add(ctx context.Context, incr float64, options ...AddOption) -} - -// Float64CounterConfig contains options for synchronous counter instruments that -// record float64 values. -type Float64CounterConfig struct { - description string - unit string -} - -// NewFloat64CounterConfig returns a new [Float64CounterConfig] with all opts -// applied. -func NewFloat64CounterConfig(opts ...Float64CounterOption) Float64CounterConfig { - var config Float64CounterConfig - for _, o := range opts { - config = o.applyFloat64Counter(config) - } - return config -} - -// Description returns the configured description. -func (c Float64CounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64CounterConfig) Unit() string { - return c.unit -} - -// Float64CounterOption applies options to a [Float64CounterConfig]. See -// [InstrumentOption] for other options that can be used as a -// Float64CounterOption. -type Float64CounterOption interface { - applyFloat64Counter(Float64CounterConfig) Float64CounterConfig -} - -// Float64UpDownCounter is an instrument that records increasing or decreasing -// float64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64UpDownCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64UpDownCounter - - // Add records a change to the counter. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Add(ctx context.Context, incr float64, options ...AddOption) -} - -// Float64UpDownCounterConfig contains options for synchronous counter -// instruments that record float64 values. -type Float64UpDownCounterConfig struct { - description string - unit string -} - -// NewFloat64UpDownCounterConfig returns a new [Float64UpDownCounterConfig] -// with all opts applied. -func NewFloat64UpDownCounterConfig(opts ...Float64UpDownCounterOption) Float64UpDownCounterConfig { - var config Float64UpDownCounterConfig - for _, o := range opts { - config = o.applyFloat64UpDownCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Float64UpDownCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64UpDownCounterConfig) Unit() string { - return c.unit -} - -// Float64UpDownCounterOption applies options to a -// [Float64UpDownCounterConfig]. See [InstrumentOption] for other options that -// can be used as a Float64UpDownCounterOption. -type Float64UpDownCounterOption interface { - applyFloat64UpDownCounter(Float64UpDownCounterConfig) Float64UpDownCounterConfig -} - -// Float64Histogram is an instrument that records a distribution of float64 -// values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64Histogram interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64Histogram - - // Record adds an additional value to the distribution. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Record(ctx context.Context, incr float64, options ...RecordOption) -} - -// Float64HistogramConfig contains options for synchronous histogram -// instruments that record float64 values. -type Float64HistogramConfig struct { - description string - unit string - explicitBucketBoundaries []float64 -} - -// NewFloat64HistogramConfig returns a new [Float64HistogramConfig] with all -// opts applied. -func NewFloat64HistogramConfig(opts ...Float64HistogramOption) Float64HistogramConfig { - var config Float64HistogramConfig - for _, o := range opts { - config = o.applyFloat64Histogram(config) - } - return config -} - -// Description returns the configured description. -func (c Float64HistogramConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64HistogramConfig) Unit() string { - return c.unit -} - -// ExplicitBucketBoundaries returns the configured explicit bucket boundaries. -func (c Float64HistogramConfig) ExplicitBucketBoundaries() []float64 { - return c.explicitBucketBoundaries -} - -// Float64HistogramOption applies options to a [Float64HistogramConfig]. See -// [InstrumentOption] for other options that can be used as a -// Float64HistogramOption. -type Float64HistogramOption interface { - applyFloat64Histogram(Float64HistogramConfig) Float64HistogramConfig -} - -// Float64Gauge is an instrument that records instantaneous float64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Float64Gauge interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Float64Gauge - - // Record records the instantaneous value. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Record(ctx context.Context, value float64, options ...RecordOption) -} - -// Float64GaugeConfig contains options for synchronous gauge instruments that -// record float64 values. -type Float64GaugeConfig struct { - description string - unit string -} - -// NewFloat64GaugeConfig returns a new [Float64GaugeConfig] with all opts -// applied. -func NewFloat64GaugeConfig(opts ...Float64GaugeOption) Float64GaugeConfig { - var config Float64GaugeConfig - for _, o := range opts { - config = o.applyFloat64Gauge(config) - } - return config -} - -// Description returns the configured description. -func (c Float64GaugeConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Float64GaugeConfig) Unit() string { - return c.unit -} - -// Float64GaugeOption applies options to a [Float64GaugeConfig]. See -// [InstrumentOption] for other options that can be used as a -// Float64GaugeOption. -type Float64GaugeOption interface { - applyFloat64Gauge(Float64GaugeConfig) Float64GaugeConfig -} diff --git a/vendor/go.opentelemetry.io/otel/metric/syncint64.go b/vendor/go.opentelemetry.io/otel/metric/syncint64.go deleted file mode 100644 index 783fdfba77..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/syncint64.go +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/metric/embedded" -) - -// Int64Counter is an instrument that records increasing int64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64Counter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64Counter - - // Add records a change to the counter. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Add(ctx context.Context, incr int64, options ...AddOption) -} - -// Int64CounterConfig contains options for synchronous counter instruments that -// record int64 values. -type Int64CounterConfig struct { - description string - unit string -} - -// NewInt64CounterConfig returns a new [Int64CounterConfig] with all opts -// applied. -func NewInt64CounterConfig(opts ...Int64CounterOption) Int64CounterConfig { - var config Int64CounterConfig - for _, o := range opts { - config = o.applyInt64Counter(config) - } - return config -} - -// Description returns the configured description. -func (c Int64CounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64CounterConfig) Unit() string { - return c.unit -} - -// Int64CounterOption applies options to a [Int64CounterConfig]. See -// [InstrumentOption] for other options that can be used as an -// Int64CounterOption. -type Int64CounterOption interface { - applyInt64Counter(Int64CounterConfig) Int64CounterConfig -} - -// Int64UpDownCounter is an instrument that records increasing or decreasing -// int64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64UpDownCounter interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64UpDownCounter - - // Add records a change to the counter. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Add(ctx context.Context, incr int64, options ...AddOption) -} - -// Int64UpDownCounterConfig contains options for synchronous counter -// instruments that record int64 values. -type Int64UpDownCounterConfig struct { - description string - unit string -} - -// NewInt64UpDownCounterConfig returns a new [Int64UpDownCounterConfig] with -// all opts applied. -func NewInt64UpDownCounterConfig(opts ...Int64UpDownCounterOption) Int64UpDownCounterConfig { - var config Int64UpDownCounterConfig - for _, o := range opts { - config = o.applyInt64UpDownCounter(config) - } - return config -} - -// Description returns the configured description. -func (c Int64UpDownCounterConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64UpDownCounterConfig) Unit() string { - return c.unit -} - -// Int64UpDownCounterOption applies options to a [Int64UpDownCounterConfig]. -// See [InstrumentOption] for other options that can be used as an -// Int64UpDownCounterOption. -type Int64UpDownCounterOption interface { - applyInt64UpDownCounter(Int64UpDownCounterConfig) Int64UpDownCounterConfig -} - -// Int64Histogram is an instrument that records a distribution of int64 -// values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64Histogram interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64Histogram - - // Record adds an additional value to the distribution. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Record(ctx context.Context, incr int64, options ...RecordOption) -} - -// Int64HistogramConfig contains options for synchronous histogram instruments -// that record int64 values. -type Int64HistogramConfig struct { - description string - unit string - explicitBucketBoundaries []float64 -} - -// NewInt64HistogramConfig returns a new [Int64HistogramConfig] with all opts -// applied. -func NewInt64HistogramConfig(opts ...Int64HistogramOption) Int64HistogramConfig { - var config Int64HistogramConfig - for _, o := range opts { - config = o.applyInt64Histogram(config) - } - return config -} - -// Description returns the configured description. -func (c Int64HistogramConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64HistogramConfig) Unit() string { - return c.unit -} - -// ExplicitBucketBoundaries returns the configured explicit bucket boundaries. -func (c Int64HistogramConfig) ExplicitBucketBoundaries() []float64 { - return c.explicitBucketBoundaries -} - -// Int64HistogramOption applies options to a [Int64HistogramConfig]. See -// [InstrumentOption] for other options that can be used as an -// Int64HistogramOption. -type Int64HistogramOption interface { - applyInt64Histogram(Int64HistogramConfig) Int64HistogramConfig -} - -// Int64Gauge is an instrument that records instantaneous int64 values. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Int64Gauge interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Int64Gauge - - // Record records the instantaneous value. - // - // Use the WithAttributeSet (or, if performance is not a concern, - // the WithAttributes) option to include measurement attributes. - Record(ctx context.Context, value int64, options ...RecordOption) -} - -// Int64GaugeConfig contains options for synchronous gauge instruments that -// record int64 values. -type Int64GaugeConfig struct { - description string - unit string -} - -// NewInt64GaugeConfig returns a new [Int64GaugeConfig] with all opts -// applied. -func NewInt64GaugeConfig(opts ...Int64GaugeOption) Int64GaugeConfig { - var config Int64GaugeConfig - for _, o := range opts { - config = o.applyInt64Gauge(config) - } - return config -} - -// Description returns the configured description. -func (c Int64GaugeConfig) Description() string { - return c.description -} - -// Unit returns the configured unit. -func (c Int64GaugeConfig) Unit() string { - return c.unit -} - -// Int64GaugeOption applies options to a [Int64GaugeConfig]. See -// [InstrumentOption] for other options that can be used as a -// Int64GaugeOption. -type Int64GaugeOption interface { - applyInt64Gauge(Int64GaugeConfig) Int64GaugeConfig -} diff --git a/vendor/go.opentelemetry.io/otel/propagation.go b/vendor/go.opentelemetry.io/otel/propagation.go deleted file mode 100644 index 2fd9497338..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -import ( - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/propagation" -) - -// GetTextMapPropagator returns the global TextMapPropagator. If none has been -// set, a No-Op TextMapPropagator is returned. -func GetTextMapPropagator() propagation.TextMapPropagator { - return global.TextMapPropagator() -} - -// SetTextMapPropagator sets propagator as the global TextMapPropagator. -func SetTextMapPropagator(propagator propagation.TextMapPropagator) { - global.SetTextMapPropagator(propagator) -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/README.md b/vendor/go.opentelemetry.io/otel/propagation/README.md deleted file mode 100644 index e2959ac747..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Propagation - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/propagation)](https://pkg.go.dev/go.opentelemetry.io/otel/propagation) diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go deleted file mode 100644 index 0518826020..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/baggage.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - - "go.opentelemetry.io/otel/baggage" -) - -const baggageHeader = "baggage" - -// Baggage is a propagator that supports the W3C Baggage format. -// -// This propagates user-defined baggage associated with a trace. The complete -// specification is defined at https://www.w3.org/TR/baggage/. -type Baggage struct{} - -var _ TextMapPropagator = Baggage{} - -// Inject sets baggage key-values from ctx into the carrier. -func (Baggage) Inject(ctx context.Context, carrier TextMapCarrier) { - bStr := baggage.FromContext(ctx).String() - if bStr != "" { - carrier.Set(baggageHeader, bStr) - } -} - -// Extract returns a copy of parent with the baggage from the carrier added. -// If carrier implements [ValuesGetter] (e.g. [HeaderCarrier]), Values is invoked -// for multiple values extraction. Otherwise, Get is called. -func (Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context { - if multiCarrier, ok := carrier.(ValuesGetter); ok { - return extractMultiBaggage(parent, multiCarrier) - } - return extractSingleBaggage(parent, carrier) -} - -// Fields returns the keys who's values are set with Inject. -func (Baggage) Fields() []string { - return []string{baggageHeader} -} - -func extractSingleBaggage(parent context.Context, carrier TextMapCarrier) context.Context { - bStr := carrier.Get(baggageHeader) - if bStr == "" { - return parent - } - - bag, err := baggage.Parse(bStr) - if err != nil { - return parent - } - return baggage.ContextWithBaggage(parent, bag) -} - -func extractMultiBaggage(parent context.Context, carrier ValuesGetter) context.Context { - bVals := carrier.Values(baggageHeader) - if len(bVals) == 0 { - return parent - } - var members []baggage.Member - for _, bStr := range bVals { - currBag, err := baggage.Parse(bStr) - if err != nil { - continue - } - members = append(members, currBag.Members()...) - } - - b, err := baggage.New(members...) - if err != nil || b.Len() == 0 { - return parent - } - return baggage.ContextWithBaggage(parent, b) -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go deleted file mode 100644 index 33a3baf15f..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package propagation contains OpenTelemetry context propagators. - -OpenTelemetry propagators are used to extract and inject context data from and -into messages exchanged by applications. The propagator supported by this -package is the W3C Trace Context encoding -(https://www.w3.org/TR/trace-context/), and W3C Baggage -(https://www.w3.org/TR/baggage/). -*/ -package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go deleted file mode 100644 index 0a32c59aa3..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/propagation.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - "net/http" -) - -// TextMapCarrier is the storage medium used by a TextMapPropagator. -// See ValuesGetter for how a TextMapCarrier can get multiple values for a key. -type TextMapCarrier interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Get returns the value associated with the passed key. - Get(key string) string - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Set stores the key-value pair. - Set(key, value string) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Keys lists the keys stored in this carrier. - Keys() []string - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -// ValuesGetter can return multiple values for a single key, -// with contrast to TextMapCarrier.Get which returns a single value. -type ValuesGetter interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Values returns all values associated with the passed key. - Values(key string) []string - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -// MapCarrier is a TextMapCarrier that uses a map held in memory as a storage -// medium for propagated key-value pairs. -type MapCarrier map[string]string - -// Compile time check that MapCarrier implements the TextMapCarrier. -var _ TextMapCarrier = MapCarrier{} - -// Get returns the value associated with the passed key. -func (c MapCarrier) Get(key string) string { - return c[key] -} - -// Set stores the key-value pair. -func (c MapCarrier) Set(key, value string) { - c[key] = value -} - -// Keys lists the keys stored in this carrier. -func (c MapCarrier) Keys() []string { - keys := make([]string, 0, len(c)) - for k := range c { - keys = append(keys, k) - } - return keys -} - -// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier and ValuesGetter interfaces. -type HeaderCarrier http.Header - -// Compile time check that HeaderCarrier implements ValuesGetter. -var _ TextMapCarrier = HeaderCarrier{} - -// Compile time check that HeaderCarrier implements TextMapCarrier. -var _ ValuesGetter = HeaderCarrier{} - -// Get returns the first value associated with the passed key. -func (hc HeaderCarrier) Get(key string) string { - return http.Header(hc).Get(key) -} - -// Values returns all values associated with the passed key. -func (hc HeaderCarrier) Values(key string) []string { - return http.Header(hc).Values(key) -} - -// Set stores the key-value pair. -func (hc HeaderCarrier) Set(key, value string) { - http.Header(hc).Set(key, value) -} - -// Keys lists the keys stored in this carrier. -func (hc HeaderCarrier) Keys() []string { - keys := make([]string, 0, len(hc)) - for k := range hc { - keys = append(keys, k) - } - return keys -} - -// TextMapPropagator propagates cross-cutting concerns as key-value text -// pairs within a carrier that travels in-band across process boundaries. -type TextMapPropagator interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Inject set cross-cutting concerns from the Context into the carrier. - Inject(ctx context.Context, carrier TextMapCarrier) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Extract reads cross-cutting concerns from the carrier into a Context. - // Implementations may check if the carrier implements ValuesGetter, - // to support extraction of multiple values per key. - Extract(ctx context.Context, carrier TextMapCarrier) context.Context - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Fields returns the keys whose values are set with Inject. - Fields() []string - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -type compositeTextMapPropagator []TextMapPropagator - -func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) { - for _, i := range p { - i.Inject(ctx, carrier) - } -} - -func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { - for _, i := range p { - ctx = i.Extract(ctx, carrier) - } - return ctx -} - -func (p compositeTextMapPropagator) Fields() []string { - unique := make(map[string]struct{}) - for _, i := range p { - for _, k := range i.Fields() { - unique[k] = struct{}{} - } - } - - fields := make([]string, 0, len(unique)) - for k := range unique { - fields = append(fields, k) - } - return fields -} - -// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the -// group of passed TextMapPropagator. This allows different cross-cutting -// concerns to be propagates in a unified manner. -// -// The returned TextMapPropagator will inject and extract cross-cutting -// concerns in the order the TextMapPropagators were provided. Additionally, -// the Fields method will return a de-duplicated slice of the keys that are -// set with the Inject method. -func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator { - return compositeTextMapPropagator(p) -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go deleted file mode 100644 index 271ab71f1a..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - "encoding/hex" - "fmt" - "strings" - - "go.opentelemetry.io/otel/trace" -) - -const ( - supportedVersion = 0 - maxVersion = 254 - traceparentHeader = "traceparent" - tracestateHeader = "tracestate" - delimiter = "-" -) - -// TraceContext is a propagator that supports the W3C Trace Context format -// (https://www.w3.org/TR/trace-context/) -// -// This propagator will propagate the traceparent and tracestate headers to -// guarantee traces are not broken. It is up to the users of this propagator -// to choose if they want to participate in a trace by modifying the -// traceparent header and relevant parts of the tracestate header containing -// their proprietary information. -type TraceContext struct{} - -var ( - _ TextMapPropagator = TraceContext{} - versionPart = fmt.Sprintf("%.2X", supportedVersion) -) - -// Inject injects the trace context from ctx into carrier. -func (TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { - sc := trace.SpanContextFromContext(ctx) - if !sc.IsValid() { - return - } - - if ts := sc.TraceState().String(); ts != "" { - carrier.Set(tracestateHeader, ts) - } - - // Clear all flags other than the trace-context supported sampling bit. - flags := sc.TraceFlags() & trace.FlagsSampled - - var sb strings.Builder - sb.Grow(2 + 32 + 16 + 2 + 3) - _, _ = sb.WriteString(versionPart) - traceID := sc.TraceID() - spanID := sc.SpanID() - flagByte := [1]byte{byte(flags)} - var buf [32]byte - for _, src := range [][]byte{traceID[:], spanID[:], flagByte[:]} { - _ = sb.WriteByte(delimiter[0]) - n := hex.Encode(buf[:], src) - _, _ = sb.Write(buf[:n]) - } - carrier.Set(traceparentHeader, sb.String()) -} - -// Extract reads tracecontext from the carrier into a returned Context. -// -// The returned Context will be a copy of ctx and contain the extracted -// tracecontext as the remote SpanContext. If the extracted tracecontext is -// invalid, the passed ctx will be returned directly instead. -func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { - sc := tc.extract(carrier) - if !sc.IsValid() { - return ctx - } - return trace.ContextWithRemoteSpanContext(ctx, sc) -} - -func (TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { - h := carrier.Get(traceparentHeader) - if h == "" { - return trace.SpanContext{} - } - - var ver [1]byte - if !extractPart(ver[:], &h, 2) { - return trace.SpanContext{} - } - version := int(ver[0]) - if version > maxVersion { - return trace.SpanContext{} - } - - var scc trace.SpanContextConfig - if !extractPart(scc.TraceID[:], &h, 32) { - return trace.SpanContext{} - } - if !extractPart(scc.SpanID[:], &h, 16) { - return trace.SpanContext{} - } - - var opts [1]byte - if !extractPart(opts[:], &h, 2) { - return trace.SpanContext{} - } - if version == 0 && (h != "" || opts[0] > 2) { - // version 0 not allow extra - // version 0 not allow other flag - return trace.SpanContext{} - } - - // Clear all flags other than the trace-context supported sampling bit. - scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled // nolint:gosec // slice size already checked. - - // Ignore the error returned here. Failure to parse tracestate MUST NOT - // affect the parsing of traceparent according to the W3C tracecontext - // specification. - scc.TraceState, _ = trace.ParseTraceState(carrier.Get(tracestateHeader)) - scc.Remote = true - - sc := trace.NewSpanContext(scc) - if !sc.IsValid() { - return trace.SpanContext{} - } - - return sc -} - -// upperHex detect hex is upper case Unicode characters. -func upperHex(v string) bool { - for _, c := range v { - if c >= 'A' && c <= 'F' { - return true - } - } - return false -} - -func extractPart(dst []byte, h *string, n int) bool { - part, left, _ := strings.Cut(*h, delimiter) - *h = left - // hex.Decode decodes unsupported upper-case characters, so exclude explicitly. - if len(part) != n || upperHex(part) { - return false - } - if p, err := hex.Decode(dst, []byte(part)); err != nil || p != n/2 { - return false - } - return true -} - -// Fields returns the keys who's values are set with Inject. -func (TraceContext) Fields() []string { - return []string{traceparentHeader, tracestateHeader} -} diff --git a/vendor/go.opentelemetry.io/otel/renovate.json b/vendor/go.opentelemetry.io/otel/renovate.json deleted file mode 100644 index fa5acf2d3b..0000000000 --- a/vendor/go.opentelemetry.io/otel/renovate.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:best-practices", - "helpers:pinGitHubActionDigestsToSemver" - ], - "ignorePaths": [], - "labels": ["Skip Changelog", "dependencies"], - "postUpdateOptions" : [ - "gomodTidy" - ], - "packageRules": [ - { - "matchManagers": ["gomod"], - "matchDepTypes": ["indirect"], - "enabled": true - }, - { - "matchPackageNames": ["go.opentelemetry.io/build-tools/**"], - "groupName": "build-tools" - }, - { - "matchPackageNames": ["google.golang.org/genproto/googleapis/**"], - "groupName": "googleapis" - }, - { - "matchPackageNames": ["golang.org/x/**"], - "groupName": "golang.org/x" - }, - { - "matchPackageNames": ["go.opentelemetry.io/otel/sdk/log/logtest"], - "enabled": false - } - ] -} diff --git a/vendor/go.opentelemetry.io/otel/requirements.txt b/vendor/go.opentelemetry.io/otel/requirements.txt deleted file mode 100644 index 1bb55fb1cc..0000000000 --- a/vendor/go.opentelemetry.io/otel/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -codespell==2.4.1 diff --git a/vendor/go.opentelemetry.io/otel/sdk/LICENSE b/vendor/go.opentelemetry.io/otel/sdk/LICENSE deleted file mode 100644 index f1aee0f110..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/LICENSE +++ /dev/null @@ -1,231 +0,0 @@ - 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 - - 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] - - 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. - --------------------------------------------------------------------------------- - -Copyright 2009 The Go Authors. - -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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/sdk/README.md b/vendor/go.opentelemetry.io/otel/sdk/README.md deleted file mode 100644 index f81b1576ad..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# SDK - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/sdk)](https://pkg.go.dev/go.opentelemetry.io/otel/sdk) diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md deleted file mode 100644 index 06e6d86854..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# SDK Instrumentation - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/sdk/instrumentation)](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/instrumentation) diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go deleted file mode 100644 index a4faa6a03d..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package instrumentation provides types to represent the code libraries that -// provide OpenTelemetry instrumentation. These types are used in the -// OpenTelemetry signal pipelines to identify the source of telemetry. -// -// See -// https://github.com/open-telemetry/oteps/blob/d226b677d73a785523fe9b9701be13225ebc528d/text/0083-component.md -// and -// https://github.com/open-telemetry/oteps/blob/d226b677d73a785523fe9b9701be13225ebc528d/text/0201-scope-attributes.md -// for more information. -package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation" diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go deleted file mode 100644 index f2cdf3c651..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/library.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation" - -// Library represents the instrumentation library. -// -// Deprecated: use [Scope] instead. -type Library = Scope diff --git a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go b/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go deleted file mode 100644 index 34852a47b2..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/instrumentation/scope.go +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package instrumentation // import "go.opentelemetry.io/otel/sdk/instrumentation" - -import "go.opentelemetry.io/otel/attribute" - -// Scope represents the instrumentation scope. -type Scope struct { - // Name is the name of the instrumentation scope. This should be the - // Go package name of that scope. - Name string - // Version is the version of the instrumentation scope. - Version string - // SchemaURL of the telemetry emitted by the scope. - SchemaURL string - // Attributes of the telemetry emitted by the scope. - Attributes attribute.Set -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md b/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md deleted file mode 100644 index fab61647c2..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# Experimental Features - -The SDK contains features that have not yet stabilized in the OpenTelemetry specification. -These features are added to the OpenTelemetry Go SDK prior to stabilization in the specification so that users can start experimenting with them and provide feedback. - -These feature may change in backwards incompatible ways as feedback is applied. -See the [Compatibility and Stability](#compatibility-and-stability) section for more information. - -## Features - -- [Resource](#resource) - -### Resource - -[OpenTelemetry resource semantic conventions] include many attribute definitions that are defined as experimental. -To have experimental semantic conventions be added by [resource detectors] set the `OTEL_GO_X_RESOURCE` environment variable. -The value set must be the case-insensitive string of `"true"` to enable the feature. -All other values are ignored. - - - -[OpenTelemetry resource semantic conventions]: https://opentelemetry.io/docs/specs/semconv/resource/ -[resource detectors]: https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource#Detector - -#### Examples - -Enable experimental resource semantic conventions. - -```console -export OTEL_GO_X_RESOURCE=true -``` - -Disable experimental resource semantic conventions. - -```console -unset OTEL_GO_X_RESOURCE -``` - -## Compatibility and Stability - -Experimental features do not fall within the scope of the OpenTelemetry Go versioning and stability [policy](../../../VERSIONING.md). -These features may be removed or modified in successive version releases, including patch versions. - -When an experimental feature is promoted to a stable feature, a migration path will be included in the changelog entry of the release. -There is no guarantee that any environment variable feature flags that enabled the experimental feature will be supported by the stable version. -If they are supported, they may be accompanied with a deprecation notice stating a timeline for the removal of that support. diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go deleted file mode 100644 index bfeb73e811..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/features.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package x documents experimental features for [go.opentelemetry.io/otel/sdk]. -package x // import "go.opentelemetry.io/otel/sdk/internal/x" - -import "strings" - -// Resource is an experimental feature flag that defines if resource detectors -// should be included experimental semantic conventions. -// -// To enable this feature set the OTEL_GO_X_RESOURCE environment variable -// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" -// will also enable this). -var Resource = newFeature( - []string{"RESOURCE"}, - func(v string) (string, bool) { - if strings.EqualFold(v, "true") { - return v, true - } - return "", false - }, -) - -// Observability is an experimental feature flag that determines if SDK -// observability metrics are enabled. -// -// To enable this feature set the OTEL_GO_X_OBSERVABILITY environment variable -// to the case-insensitive string value of "true" (i.e. "True" and "TRUE" -// will also enable this). -var Observability = newFeature( - []string{"OBSERVABILITY", "SELF_OBSERVABILITY"}, - func(v string) (string, bool) { - if strings.EqualFold(v, "true") { - return v, true - } - return "", false - }, -) diff --git a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go b/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go deleted file mode 100644 index 13347e5605..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/internal/x/x.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by gotmpl. DO NOT MODIFY. -// source: internal/shared/x/x.go.tmpl - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package x documents experimental features for [go.opentelemetry.io/otel/sdk]. -package x // import "go.opentelemetry.io/otel/sdk/internal/x" - -import ( - "os" -) - -// Feature is an experimental feature control flag. It provides a uniform way -// to interact with these feature flags and parse their values. -type Feature[T any] struct { - keys []string - parse func(v string) (T, bool) -} - -func newFeature[T any](suffix []string, parse func(string) (T, bool)) Feature[T] { - const envKeyRoot = "OTEL_GO_X_" - keys := make([]string, 0, len(suffix)) - for _, s := range suffix { - keys = append(keys, envKeyRoot+s) - } - return Feature[T]{ - keys: keys, - parse: parse, - } -} - -// Keys returns the environment variable keys that can be set to enable the -// feature. -func (f Feature[T]) Keys() []string { return f.keys } - -// Lookup returns the user configured value for the feature and true if the -// user has enabled the feature. Otherwise, if the feature is not enabled, a -// zero-value and false are returned. -func (f Feature[T]) Lookup() (v T, ok bool) { - // https://github.com/open-telemetry/opentelemetry-specification/blob/62effed618589a0bec416a87e559c0a9d96289bb/specification/configuration/sdk-environment-variables.md#parsing-empty-value - // - // > The SDK MUST interpret an empty value of an environment variable the - // > same way as when the variable is unset. - for _, key := range f.keys { - vRaw := os.Getenv(key) - if vRaw != "" { - return f.parse(vRaw) - } - } - return v, ok -} - -// Enabled reports whether the feature is enabled. -func (f Feature[T]) Enabled() bool { - _, ok := f.Lookup() - return ok -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/README.md b/vendor/go.opentelemetry.io/otel/sdk/resource/README.md deleted file mode 100644 index 4ad864d716..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# SDK Resource - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/sdk/resource)](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/resource) diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go b/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go deleted file mode 100644 index c02aeefdde..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/auto.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "errors" - "fmt" -) - -// ErrPartialResource is returned by a detector when complete source -// information for a Resource is unavailable or the source information -// contains invalid values that are omitted from the returned Resource. -var ErrPartialResource = errors.New("partial resource") - -// Detector detects OpenTelemetry resource information. -type Detector interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Detect returns an initialized Resource based on gathered information. - // If the source information to construct a Resource contains invalid - // values, a Resource is returned with the valid parts of the source - // information used for initialization along with an appropriately - // wrapped ErrPartialResource error. - Detect(ctx context.Context) (*Resource, error) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -// Detect returns a new [Resource] merged from all the Resources each of the -// detectors produces. Each of the detectors are called sequentially, in the -// order they are passed, merging the produced resource into the previous. -// -// This may return a partial Resource along with an error containing -// [ErrPartialResource] if that error is returned from a detector. It may also -// return a merge-conflicting Resource along with an error containing -// [ErrSchemaURLConflict] if merging Resources from different detectors results -// in a schema URL conflict. It is up to the caller to determine if this -// returned Resource should be used or not. -// -// If one of the detectors returns an error that is not [ErrPartialResource], -// the resource produced by the detector will not be merged and the returned -// error will wrap that detector's error. -func Detect(ctx context.Context, detectors ...Detector) (*Resource, error) { - r := new(Resource) - return r, detect(ctx, r, detectors) -} - -// detect runs all detectors using ctx and merges the result into res. This -// assumes res is allocated and not nil, it will panic otherwise. -// -// If the detectors or merging resources produces any errors (i.e. -// [ErrPartialResource] [ErrSchemaURLConflict]), a single error wrapping all of -// these errors will be returned. Otherwise, nil is returned. -func detect(ctx context.Context, res *Resource, detectors []Detector) error { - var ( - r *Resource - err error - e error - ) - - for _, detector := range detectors { - if detector == nil { - continue - } - r, e = detector.Detect(ctx) - if e != nil { - err = errors.Join(err, e) - if !errors.Is(e, ErrPartialResource) { - continue - } - } - r, e = Merge(res, r) - if e != nil { - err = errors.Join(err, e) - } - *res = *r - } - - if err != nil { - if errors.Is(err, ErrSchemaURLConflict) { - // If there has been a merge conflict, ensure the resource has no - // schema URL. - res.schemaURL = "" - } - - err = fmt.Errorf("error detecting resource: %w", err) - } - return err -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go deleted file mode 100644 index 3f20eb7a56..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/builtin.go +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "fmt" - "os" - "path/filepath" - - "github.com/google/uuid" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -type ( - // telemetrySDK is a Detector that provides information about - // the OpenTelemetry SDK used. This Detector is included as a - // builtin. If these resource attributes are not wanted, use - // resource.New() to explicitly disable them. - telemetrySDK struct{} - - // host is a Detector that provides information about the host - // being run on. This Detector is included as a builtin. If - // these resource attributes are not wanted, use the - // resource.New() to explicitly disable them. - host struct{} - - stringDetector struct { - schemaURL string - K attribute.Key - F func() (string, error) - } - - defaultServiceNameDetector struct{} - - defaultServiceInstanceIDDetector struct{} -) - -var ( - _ Detector = telemetrySDK{} - _ Detector = host{} - _ Detector = stringDetector{} - _ Detector = defaultServiceNameDetector{} - _ Detector = defaultServiceInstanceIDDetector{} -) - -// Detect returns a *Resource that describes the OpenTelemetry SDK used. -func (telemetrySDK) Detect(context.Context) (*Resource, error) { - return NewWithAttributes( - semconv.SchemaURL, - semconv.TelemetrySDKName("opentelemetry"), - semconv.TelemetrySDKLanguageGo, - semconv.TelemetrySDKVersion(sdk.Version()), - ), nil -} - -// Detect returns a *Resource that describes the host being run on. -func (host) Detect(ctx context.Context) (*Resource, error) { - return StringDetector(semconv.SchemaURL, semconv.HostNameKey, os.Hostname).Detect(ctx) -} - -// StringDetector returns a Detector that will produce a *Resource -// containing the string as a value corresponding to k. The resulting Resource -// will have the specified schemaURL. -func StringDetector(schemaURL string, k attribute.Key, f func() (string, error)) Detector { - return stringDetector{schemaURL: schemaURL, K: k, F: f} -} - -// Detect returns a *Resource that describes the string as a value -// corresponding to attribute.Key as well as the specific schemaURL. -func (sd stringDetector) Detect(context.Context) (*Resource, error) { - value, err := sd.F() - if err != nil { - return nil, fmt.Errorf("%s: %w", string(sd.K), err) - } - a := sd.K.String(value) - if !a.Valid() { - return nil, fmt.Errorf("invalid attribute: %q -> %q", a.Key, a.Value.Emit()) - } - return NewWithAttributes(sd.schemaURL, sd.K.String(value)), nil -} - -// Detect implements Detector. -func (defaultServiceNameDetector) Detect(ctx context.Context) (*Resource, error) { - return StringDetector( - semconv.SchemaURL, - semconv.ServiceNameKey, - func() (string, error) { - executable, err := os.Executable() - if err != nil { - return "unknown_service:go", nil - } - return "unknown_service:" + filepath.Base(executable), nil - }, - ).Detect(ctx) -} - -// Detect implements Detector. -func (defaultServiceInstanceIDDetector) Detect(ctx context.Context) (*Resource, error) { - return StringDetector( - semconv.SchemaURL, - semconv.ServiceInstanceIDKey, - func() (string, error) { - version4Uuid, err := uuid.NewRandom() - if err != nil { - return "", err - } - - return version4Uuid.String(), nil - }, - ).Detect(ctx) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/config.go b/vendor/go.opentelemetry.io/otel/sdk/resource/config.go deleted file mode 100644 index 0d6e213d92..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/config.go +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" -) - -// config contains configuration for Resource creation. -type config struct { - // detectors that will be evaluated. - detectors []Detector - // SchemaURL to associate with the Resource. - schemaURL string -} - -// Option is the interface that applies a configuration option. -type Option interface { - // apply sets the Option value of a config. - apply(config) config -} - -// WithAttributes adds attributes to the configured Resource. -func WithAttributes(attributes ...attribute.KeyValue) Option { - return WithDetectors(detectAttributes{attributes}) -} - -type detectAttributes struct { - attributes []attribute.KeyValue -} - -func (d detectAttributes) Detect(context.Context) (*Resource, error) { - return NewSchemaless(d.attributes...), nil -} - -// WithDetectors adds detectors to be evaluated for the configured resource. -func WithDetectors(detectors ...Detector) Option { - return detectorsOption{detectors: detectors} -} - -type detectorsOption struct { - detectors []Detector -} - -func (o detectorsOption) apply(cfg config) config { - cfg.detectors = append(cfg.detectors, o.detectors...) - return cfg -} - -// WithFromEnv adds attributes from environment variables to the configured resource. -func WithFromEnv() Option { - return WithDetectors(fromEnv{}) -} - -// WithHost adds attributes from the host to the configured resource. -func WithHost() Option { - return WithDetectors(host{}) -} - -// WithHostID adds host ID information to the configured resource. -func WithHostID() Option { - return WithDetectors(hostIDDetector{}) -} - -// WithTelemetrySDK adds TelemetrySDK version info to the configured resource. -func WithTelemetrySDK() Option { - return WithDetectors(telemetrySDK{}) -} - -// WithSchemaURL sets the schema URL for the configured resource. -func WithSchemaURL(schemaURL string) Option { - return schemaURLOption(schemaURL) -} - -type schemaURLOption string - -func (o schemaURLOption) apply(cfg config) config { - cfg.schemaURL = string(o) - return cfg -} - -// WithOS adds all the OS attributes to the configured Resource. -// See individual WithOS* functions to configure specific attributes. -func WithOS() Option { - return WithDetectors( - osTypeDetector{}, - osDescriptionDetector{}, - ) -} - -// WithOSType adds an attribute with the operating system type to the configured Resource. -func WithOSType() Option { - return WithDetectors(osTypeDetector{}) -} - -// WithOSDescription adds an attribute with the operating system description to the -// configured Resource. The formatted string is equivalent to the output of the -// `uname -snrvm` command. -func WithOSDescription() Option { - return WithDetectors(osDescriptionDetector{}) -} - -// WithProcess adds all the Process attributes to the configured Resource. -// -// Warning! This option will include process command line arguments. If these -// contain sensitive information it will be included in the exported resource. -// -// This option is equivalent to calling WithProcessPID, -// WithProcessExecutableName, WithProcessExecutablePath, -// WithProcessCommandArgs, WithProcessOwner, WithProcessRuntimeName, -// WithProcessRuntimeVersion, and WithProcessRuntimeDescription. See each -// option function for information about what resource attributes each -// includes. -func WithProcess() Option { - return WithDetectors( - processPIDDetector{}, - processExecutableNameDetector{}, - processExecutablePathDetector{}, - processCommandArgsDetector{}, - processOwnerDetector{}, - processRuntimeNameDetector{}, - processRuntimeVersionDetector{}, - processRuntimeDescriptionDetector{}, - ) -} - -// WithProcessPID adds an attribute with the process identifier (PID) to the -// configured Resource. -func WithProcessPID() Option { - return WithDetectors(processPIDDetector{}) -} - -// WithProcessExecutableName adds an attribute with the name of the process -// executable to the configured Resource. -func WithProcessExecutableName() Option { - return WithDetectors(processExecutableNameDetector{}) -} - -// WithProcessExecutablePath adds an attribute with the full path to the process -// executable to the configured Resource. -func WithProcessExecutablePath() Option { - return WithDetectors(processExecutablePathDetector{}) -} - -// WithProcessCommandArgs adds an attribute with all the command arguments (including -// the command/executable itself) as received by the process to the configured -// Resource. -// -// Warning! This option will include process command line arguments. If these -// contain sensitive information it will be included in the exported resource. -func WithProcessCommandArgs() Option { - return WithDetectors(processCommandArgsDetector{}) -} - -// WithProcessOwner adds an attribute with the username of the user that owns the process -// to the configured Resource. -func WithProcessOwner() Option { - return WithDetectors(processOwnerDetector{}) -} - -// WithProcessRuntimeName adds an attribute with the name of the runtime of this -// process to the configured Resource. -func WithProcessRuntimeName() Option { - return WithDetectors(processRuntimeNameDetector{}) -} - -// WithProcessRuntimeVersion adds an attribute with the version of the runtime of -// this process to the configured Resource. -func WithProcessRuntimeVersion() Option { - return WithDetectors(processRuntimeVersionDetector{}) -} - -// WithProcessRuntimeDescription adds an attribute with an additional description -// about the runtime of the process to the configured Resource. -func WithProcessRuntimeDescription() Option { - return WithDetectors(processRuntimeDescriptionDetector{}) -} - -// WithContainer adds all the Container attributes to the configured Resource. -// See individual WithContainer* functions to configure specific attributes. -func WithContainer() Option { - return WithDetectors( - cgroupContainerIDDetector{}, - ) -} - -// WithContainerID adds an attribute with the id of the container to the configured Resource. -// Note: WithContainerID will not extract the correct container ID in an ECS environment. -// Please use the ECS resource detector instead (https://pkg.go.dev/go.opentelemetry.io/contrib/detectors/aws/ecs). -func WithContainerID() Option { - return WithDetectors(cgroupContainerIDDetector{}) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go b/vendor/go.opentelemetry.io/otel/sdk/resource/container.go deleted file mode 100644 index bbe142d203..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/container.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "bufio" - "context" - "errors" - "io" - "os" - "regexp" - - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -type containerIDProvider func() (string, error) - -var ( - containerID containerIDProvider = getContainerIDFromCGroup - cgroupContainerIDRe = regexp.MustCompile(`^.*/(?:.*[-:])?([0-9a-f]+)(?:\.|\s*$)`) -) - -type cgroupContainerIDDetector struct{} - -const cgroupPath = "/proc/self/cgroup" - -// Detect returns a *Resource that describes the id of the container. -// If no container id found, an empty resource will be returned. -func (cgroupContainerIDDetector) Detect(context.Context) (*Resource, error) { - containerID, err := containerID() - if err != nil { - return nil, err - } - - if containerID == "" { - return Empty(), nil - } - return NewWithAttributes(semconv.SchemaURL, semconv.ContainerID(containerID)), nil -} - -var ( - defaultOSStat = os.Stat - osStat = defaultOSStat - - defaultOSOpen = func(name string) (io.ReadCloser, error) { - return os.Open(name) - } - osOpen = defaultOSOpen -) - -// getContainerIDFromCGroup returns the id of the container from the cgroup file. -// If no container id found, an empty string will be returned. -func getContainerIDFromCGroup() (string, error) { - if _, err := osStat(cgroupPath); errors.Is(err, os.ErrNotExist) { - // File does not exist, skip - return "", nil - } - - file, err := osOpen(cgroupPath) - if err != nil { - return "", err - } - defer file.Close() - - return getContainerIDFromReader(file), nil -} - -// getContainerIDFromReader returns the id of the container from reader. -func getContainerIDFromReader(reader io.Reader) string { - scanner := bufio.NewScanner(reader) - for scanner.Scan() { - line := scanner.Text() - - if id := getContainerIDFromLine(line); id != "" { - return id - } - } - return "" -} - -// getContainerIDFromLine returns the id of the container from one string line. -func getContainerIDFromLine(line string) string { - matches := cgroupContainerIDRe.FindStringSubmatch(line) - if len(matches) <= 1 { - return "" - } - return matches[1] -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go b/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go deleted file mode 100644 index 64939a2713..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package resource provides detecting and representing resources. -// -// The fundamental struct is a Resource which holds identifying information -// about the entities for which telemetry is exported. -// -// To automatically construct Resources from an environment a Detector -// interface is defined. Implementations of this interface can be passed to -// the Detect function to generate a Resource from the merged information. -// -// To load a user defined Resource from the environment variable -// OTEL_RESOURCE_ATTRIBUTES the FromEnv Detector can be used. It will interpret -// the value as a list of comma delimited key/value pairs -// (e.g. `=,=,...`). -// -// While this package provides a stable API, -// the attributes added by resource detectors may change. -package resource // import "go.opentelemetry.io/otel/sdk/resource" diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go b/vendor/go.opentelemetry.io/otel/sdk/resource/env.go deleted file mode 100644 index 4a1b017eea..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/env.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "fmt" - "net/url" - "os" - "strings" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -const ( - // resourceAttrKey is the environment variable name OpenTelemetry Resource information will be read from. - resourceAttrKey = "OTEL_RESOURCE_ATTRIBUTES" //nolint:gosec // False positive G101: Potential hardcoded credentials - - // svcNameKey is the environment variable name that Service Name information will be read from. - svcNameKey = "OTEL_SERVICE_NAME" -) - -// errMissingValue is returned when a resource value is missing. -var errMissingValue = fmt.Errorf("%w: missing value", ErrPartialResource) - -// fromEnv is a Detector that implements the Detector and collects -// resources from environment. This Detector is included as a -// builtin. -type fromEnv struct{} - -// compile time assertion that FromEnv implements Detector interface. -var _ Detector = fromEnv{} - -// Detect collects resources from environment. -func (fromEnv) Detect(context.Context) (*Resource, error) { - attrs := strings.TrimSpace(os.Getenv(resourceAttrKey)) - svcName := strings.TrimSpace(os.Getenv(svcNameKey)) - - if attrs == "" && svcName == "" { - return Empty(), nil - } - - var res *Resource - - if svcName != "" { - res = NewSchemaless(semconv.ServiceName(svcName)) - } - - r2, err := constructOTResources(attrs) - - // Ensure that the resource with the service name from OTEL_SERVICE_NAME - // takes precedence, if it was defined. - res, err2 := Merge(r2, res) - - if err == nil { - err = err2 - } else if err2 != nil { - err = fmt.Errorf("detecting resources: %s", []string{err.Error(), err2.Error()}) - } - - return res, err -} - -func constructOTResources(s string) (*Resource, error) { - if s == "" { - return Empty(), nil - } - pairs := strings.Split(s, ",") - var attrs []attribute.KeyValue - var invalid []string - for _, p := range pairs { - k, v, found := strings.Cut(p, "=") - if !found { - invalid = append(invalid, p) - continue - } - key := strings.TrimSpace(k) - val, err := url.PathUnescape(strings.TrimSpace(v)) - if err != nil { - // Retain original value if decoding fails, otherwise it will be - // an empty string. - val = v - otel.Handle(err) - } - attrs = append(attrs, attribute.String(key, val)) - } - var err error - if len(invalid) > 0 { - err = fmt.Errorf("%w: %v", errMissingValue, invalid) - } - return NewSchemaless(attrs...), err -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go deleted file mode 100644 index 5fed33d4fb..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id.go +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "errors" - "strings" - - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -type hostIDProvider func() (string, error) - -var defaultHostIDProvider hostIDProvider = platformHostIDReader.read - -var hostID = defaultHostIDProvider - -type hostIDReader interface { - read() (string, error) -} - -type fileReader func(string) (string, error) - -type commandExecutor func(string, ...string) (string, error) - -// hostIDReaderBSD implements hostIDReader. -type hostIDReaderBSD struct { - execCommand commandExecutor - readFile fileReader -} - -// read attempts to read the machine-id from /etc/hostid. If not found it will -// execute `kenv -q smbios.system.uuid`. If neither location yields an id an -// error will be returned. -func (r *hostIDReaderBSD) read() (string, error) { - if result, err := r.readFile("/etc/hostid"); err == nil { - return strings.TrimSpace(result), nil - } - - if result, err := r.execCommand("kenv", "-q", "smbios.system.uuid"); err == nil { - return strings.TrimSpace(result), nil - } - - return "", errors.New("host id not found in: /etc/hostid or kenv") -} - -// hostIDReaderDarwin implements hostIDReader. -type hostIDReaderDarwin struct { - execCommand commandExecutor -} - -// read executes `ioreg -rd1 -c "IOPlatformExpertDevice"` and parses host id -// from the IOPlatformUUID line. If the command fails or the uuid cannot be -// parsed an error will be returned. -func (r *hostIDReaderDarwin) read() (string, error) { - result, err := r.execCommand("ioreg", "-rd1", "-c", "IOPlatformExpertDevice") - if err != nil { - return "", err - } - - lines := strings.Split(result, "\n") - for _, line := range lines { - if strings.Contains(line, "IOPlatformUUID") { - parts := strings.Split(line, " = ") - if len(parts) == 2 { - return strings.Trim(parts[1], "\""), nil - } - break - } - } - - return "", errors.New("could not parse IOPlatformUUID") -} - -type hostIDReaderLinux struct { - readFile fileReader -} - -// read attempts to read the machine-id from /etc/machine-id followed by -// /var/lib/dbus/machine-id. If neither location yields an ID an error will -// be returned. -func (r *hostIDReaderLinux) read() (string, error) { - if result, err := r.readFile("/etc/machine-id"); err == nil { - return strings.TrimSpace(result), nil - } - - if result, err := r.readFile("/var/lib/dbus/machine-id"); err == nil { - return strings.TrimSpace(result), nil - } - - return "", errors.New("host id not found in: /etc/machine-id or /var/lib/dbus/machine-id") -} - -type hostIDDetector struct{} - -// Detect returns a *Resource containing the platform specific host id. -func (hostIDDetector) Detect(context.Context) (*Resource, error) { - hostID, err := hostID() - if err != nil { - return nil, err - } - - return NewWithAttributes( - semconv.SchemaURL, - semconv.HostID(hostID), - ), nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go deleted file mode 100644 index 4c1c30f256..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_bsd.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build dragonfly || freebsd || netbsd || openbsd || solaris - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -var platformHostIDReader hostIDReader = &hostIDReaderBSD{ - execCommand: execCommand, - readFile: readFile, -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go deleted file mode 100644 index b09fde3b73..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_darwin.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -var platformHostIDReader hostIDReader = &hostIDReaderDarwin{ - execCommand: execCommand, -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go deleted file mode 100644 index d9e5d1a8ff..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_exec.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build darwin || dragonfly || freebsd || netbsd || openbsd || solaris - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import "os/exec" - -func execCommand(name string, arg ...string) (string, error) { - cmd := exec.Command(name, arg...) - b, err := cmd.Output() - if err != nil { - return "", err - } - - return string(b), nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go deleted file mode 100644 index 4a26096c8d..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_linux.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build linux - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -var platformHostIDReader hostIDReader = &hostIDReaderLinux{ - readFile: readFile, -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go deleted file mode 100644 index 6354b35602..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_readfile.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build linux || dragonfly || freebsd || netbsd || openbsd || solaris - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import "os" - -func readFile(filename string) (string, error) { - b, err := os.ReadFile(filename) - if err != nil { - return "", err - } - - return string(b), nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go deleted file mode 100644 index 63ad2fa4e0..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_unsupported.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -// hostIDReaderUnsupported is a placeholder implementation for operating systems -// for which this project currently doesn't support host.id -// attribute detection. See build tags declaration early on this file -// for a list of unsupported OSes. -type hostIDReaderUnsupported struct{} - -func (*hostIDReaderUnsupported) read() (string, error) { - return "", nil -} - -var platformHostIDReader hostIDReader = &hostIDReaderUnsupported{} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go deleted file mode 100644 index 2b8ca20b38..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/host_id_windows.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build windows - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "golang.org/x/sys/windows/registry" -) - -// implements hostIDReader. -type hostIDReaderWindows struct{} - -// read reads MachineGuid from the Windows registry key: -// SOFTWARE\Microsoft\Cryptography. -func (*hostIDReaderWindows) read() (string, error) { - k, err := registry.OpenKey( - registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Cryptography`, - registry.QUERY_VALUE|registry.WOW64_64KEY, - ) - if err != nil { - return "", err - } - defer k.Close() - - guid, _, err := k.GetStringValue("MachineGuid") - if err != nil { - return "", err - } - - return guid, nil -} - -var platformHostIDReader hostIDReader = &hostIDReaderWindows{} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os.go deleted file mode 100644 index 51da76e807..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "strings" - - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -type osDescriptionProvider func() (string, error) - -var defaultOSDescriptionProvider osDescriptionProvider = platformOSDescription - -var osDescription = defaultOSDescriptionProvider - -func setDefaultOSDescriptionProvider() { - setOSDescriptionProvider(defaultOSDescriptionProvider) -} - -func setOSDescriptionProvider(osDescriptionProvider osDescriptionProvider) { - osDescription = osDescriptionProvider -} - -type ( - osTypeDetector struct{} - osDescriptionDetector struct{} -) - -// Detect returns a *Resource that describes the operating system type the -// service is running on. -func (osTypeDetector) Detect(context.Context) (*Resource, error) { - osType := runtimeOS() - - osTypeAttribute := mapRuntimeOSToSemconvOSType(osType) - - return NewWithAttributes( - semconv.SchemaURL, - osTypeAttribute, - ), nil -} - -// Detect returns a *Resource that describes the operating system the -// service is running on. -func (osDescriptionDetector) Detect(context.Context) (*Resource, error) { - description, err := osDescription() - if err != nil { - return nil, err - } - - return NewWithAttributes( - semconv.SchemaURL, - semconv.OSDescription(description), - ), nil -} - -// mapRuntimeOSToSemconvOSType translates the OS name as provided by the Go runtime -// into an OS type attribute with the corresponding value defined by the semantic -// conventions. In case the provided OS name isn't mapped, it's transformed to lowercase -// and used as the value for the returned OS type attribute. -func mapRuntimeOSToSemconvOSType(osType string) attribute.KeyValue { - // the elements in this map are the intersection between - // available GOOS values and defined semconv OS types - osTypeAttributeMap := map[string]attribute.KeyValue{ - "aix": semconv.OSTypeAIX, - "darwin": semconv.OSTypeDarwin, - "dragonfly": semconv.OSTypeDragonflyBSD, - "freebsd": semconv.OSTypeFreeBSD, - "linux": semconv.OSTypeLinux, - "netbsd": semconv.OSTypeNetBSD, - "openbsd": semconv.OSTypeOpenBSD, - "solaris": semconv.OSTypeSolaris, - "windows": semconv.OSTypeWindows, - "zos": semconv.OSTypeZOS, - } - - var osTypeAttribute attribute.KeyValue - - if attr, ok := osTypeAttributeMap[osType]; ok { - osTypeAttribute = attr - } else { - osTypeAttribute = semconv.OSTypeKey.String(strings.ToLower(osType)) - } - - return osTypeAttribute -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go deleted file mode 100644 index 3d703c5d98..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_darwin.go +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "encoding/xml" - "errors" - "fmt" - "io" - "os" -) - -type plist struct { - XMLName xml.Name `xml:"plist"` - Dict dict `xml:"dict"` -} - -type dict struct { - Key []string `xml:"key"` - String []string `xml:"string"` -} - -// osRelease builds a string describing the operating system release based on the -// contents of the property list (.plist) system files. If no .plist files are found, -// or if the required properties to build the release description string are missing, -// an empty string is returned instead. The generated string resembles the output of -// the `sw_vers` commandline program, but in a single-line string. For more information -// about the `sw_vers` program, see: https://www.unix.com/man-page/osx/1/SW_VERS. -func osRelease() string { - file, err := getPlistFile() - if err != nil { - return "" - } - - defer file.Close() - - values, err := parsePlistFile(file) - if err != nil { - return "" - } - - return buildOSRelease(values) -} - -// getPlistFile returns a *os.File pointing to one of the well-known .plist files -// available on macOS. If no file can be opened, it returns an error. -func getPlistFile() (*os.File, error) { - return getFirstAvailableFile([]string{ - "/System/Library/CoreServices/SystemVersion.plist", - "/System/Library/CoreServices/ServerVersion.plist", - }) -} - -// parsePlistFile process the file pointed by `file` as a .plist file and returns -// a map with the key-values for each pair of correlated and elements -// contained in it. -func parsePlistFile(file io.Reader) (map[string]string, error) { - var v plist - - err := xml.NewDecoder(file).Decode(&v) - if err != nil { - return nil, err - } - - if len(v.Dict.Key) != len(v.Dict.String) { - return nil, errors.New("the number of and elements doesn't match") - } - - properties := make(map[string]string, len(v.Dict.Key)) - for i, key := range v.Dict.Key { - properties[key] = v.Dict.String[i] - } - - return properties, nil -} - -// buildOSRelease builds a string describing the OS release based on the properties -// available on the provided map. It tries to find the `ProductName`, `ProductVersion` -// and `ProductBuildVersion` properties. If some of these properties are not found, -// it returns an empty string. -func buildOSRelease(properties map[string]string) string { - productName := properties["ProductName"] - productVersion := properties["ProductVersion"] - productBuildVersion := properties["ProductBuildVersion"] - - if productName == "" || productVersion == "" || productBuildVersion == "" { - return "" - } - - return fmt.Sprintf("%s %s (%s)", productName, productVersion, productBuildVersion) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go deleted file mode 100644 index a1763267c2..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_release_unix.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build aix || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "bufio" - "fmt" - "io" - "os" - "strings" -) - -// osRelease builds a string describing the operating system release based on the -// properties of the os-release file. If no os-release file is found, or if the -// required properties to build the release description string are missing, an empty -// string is returned instead. For more information about os-release files, see: -// https://www.freedesktop.org/software/systemd/man/os-release.html -func osRelease() string { - file, err := getOSReleaseFile() - if err != nil { - return "" - } - - defer file.Close() - - values := parseOSReleaseFile(file) - - return buildOSRelease(values) -} - -// getOSReleaseFile returns a *os.File pointing to one of the well-known os-release -// files, according to their order of preference. If no file can be opened, it -// returns an error. -func getOSReleaseFile() (*os.File, error) { - return getFirstAvailableFile([]string{"/etc/os-release", "/usr/lib/os-release"}) -} - -// parseOSReleaseFile process the file pointed by `file` as an os-release file and -// returns a map with the key-values contained in it. Empty lines or lines starting -// with a '#' character are ignored, as well as lines with the missing key=value -// separator. Values are unquoted and unescaped. -func parseOSReleaseFile(file io.Reader) map[string]string { - values := make(map[string]string) - scanner := bufio.NewScanner(file) - - for scanner.Scan() { - line := scanner.Text() - - if skip(line) { - continue - } - - key, value, ok := parse(line) - if ok { - values[key] = value - } - } - - return values -} - -// skip reports whether the line is blank or starts with a '#' character, and -// therefore should be skipped from processing. -func skip(line string) bool { - line = strings.TrimSpace(line) - - return line == "" || strings.HasPrefix(line, "#") -} - -// parse attempts to split the provided line on the first '=' character, and then -// sanitize each side of the split before returning them as a key-value pair. -func parse(line string) (string, string, bool) { - k, v, found := strings.Cut(line, "=") - - if !found || k == "" { - return "", "", false - } - - key := strings.TrimSpace(k) - value := unescape(unquote(strings.TrimSpace(v))) - - return key, value, true -} - -// unquote checks whether the string `s` is quoted with double or single quotes -// and, if so, returns a version of the string without them. Otherwise it returns -// the provided string unchanged. -func unquote(s string) string { - if len(s) < 2 { - return s - } - - if (s[0] == '"' || s[0] == '\'') && s[0] == s[len(s)-1] { - return s[1 : len(s)-1] - } - - return s -} - -// unescape removes the `\` prefix from some characters that are expected -// to have it added in front of them for escaping purposes. -func unescape(s string) string { - return strings.NewReplacer( - `\$`, `$`, - `\"`, `"`, - `\'`, `'`, - `\\`, `\`, - "\\`", "`", - ).Replace(s) -} - -// buildOSRelease builds a string describing the OS release based on the properties -// available on the provided map. It favors a combination of the `NAME` and `VERSION` -// properties as first option (falling back to `VERSION_ID` if `VERSION` isn't -// found), and using `PRETTY_NAME` alone if some of the previous are not present. If -// none of these properties are found, it returns an empty string. -// -// The rationale behind not using `PRETTY_NAME` as first choice was that, for some -// Linux distributions, it doesn't include the same detail that can be found on the -// individual `NAME` and `VERSION` properties, and combining `PRETTY_NAME` with -// other properties can produce "pretty" redundant strings in some cases. -func buildOSRelease(values map[string]string) string { - var osRelease string - - name := values["NAME"] - version := values["VERSION"] - - if version == "" { - version = values["VERSION_ID"] - } - - if name != "" && version != "" { - osRelease = fmt.Sprintf("%s %s", name, version) - } else { - osRelease = values["PRETTY_NAME"] - } - - return osRelease -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go deleted file mode 100644 index 6c50ab6867..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unix.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "fmt" - "os" - - "golang.org/x/sys/unix" -) - -type unameProvider func(buf *unix.Utsname) (err error) - -var defaultUnameProvider unameProvider = unix.Uname - -var currentUnameProvider = defaultUnameProvider - -func setDefaultUnameProvider() { - setUnameProvider(defaultUnameProvider) -} - -func setUnameProvider(unameProvider unameProvider) { - currentUnameProvider = unameProvider -} - -// platformOSDescription returns a human readable OS version information string. -// The final string combines OS release information (where available) and the -// result of the `uname` system call. -func platformOSDescription() (string, error) { - uname, err := uname() - if err != nil { - return "", err - } - - osRelease := osRelease() - if osRelease != "" { - return fmt.Sprintf("%s (%s)", osRelease, uname), nil - } - - return uname, nil -} - -// uname issues a uname(2) system call (or equivalent on systems which doesn't -// have one) and formats the output in a single string, similar to the output -// of the `uname` commandline program. The final string resembles the one -// obtained with a call to `uname -snrvm`. -func uname() (string, error) { - var utsName unix.Utsname - - err := currentUnameProvider(&utsName) - if err != nil { - return "", err - } - - return fmt.Sprintf("%s %s %s %s %s", - unix.ByteSliceToString(utsName.Sysname[:]), - unix.ByteSliceToString(utsName.Nodename[:]), - unix.ByteSliceToString(utsName.Release[:]), - unix.ByteSliceToString(utsName.Version[:]), - unix.ByteSliceToString(utsName.Machine[:]), - ), nil -} - -// getFirstAvailableFile returns an *os.File of the first available -// file from a list of candidate file paths. -func getFirstAvailableFile(candidates []string) (*os.File, error) { - for _, c := range candidates { - file, err := os.Open(c) - if err == nil { - return file, nil - } - } - - return nil, fmt.Errorf("no candidate file available: %v", candidates) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go deleted file mode 100644 index 25f629532a..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_unsupported.go +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -// platformOSDescription is a placeholder implementation for OSes -// for which this project currently doesn't support os.description -// attribute detection. See build tags declaration early on this file -// for a list of unsupported OSes. -func platformOSDescription() (string, error) { - return "", nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go b/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go deleted file mode 100644 index a6a5a53c0e..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/os_windows.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "fmt" - "strconv" - - "golang.org/x/sys/windows/registry" -) - -// platformOSDescription returns a human readable OS version information string. -// It does so by querying registry values under the -// `SOFTWARE\Microsoft\Windows NT\CurrentVersion` key. The final string -// resembles the one displayed by the Version Reporter Applet (winver.exe). -func platformOSDescription() (string, error) { - k, err := registry.OpenKey( - registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) - if err != nil { - return "", err - } - - defer k.Close() - - var ( - productName = readProductName(k) - displayVersion = readDisplayVersion(k) - releaseID = readReleaseID(k) - currentMajorVersionNumber = readCurrentMajorVersionNumber(k) - currentMinorVersionNumber = readCurrentMinorVersionNumber(k) - currentBuildNumber = readCurrentBuildNumber(k) - ubr = readUBR(k) - ) - - if displayVersion != "" { - displayVersion += " " - } - - return fmt.Sprintf("%s %s(%s) [Version %s.%s.%s.%s]", - productName, - displayVersion, - releaseID, - currentMajorVersionNumber, - currentMinorVersionNumber, - currentBuildNumber, - ubr, - ), nil -} - -func getStringValue(name string, k registry.Key) string { - value, _, _ := k.GetStringValue(name) - - return value -} - -func getIntegerValue(name string, k registry.Key) uint64 { - value, _, _ := k.GetIntegerValue(name) - - return value -} - -func readProductName(k registry.Key) string { - return getStringValue("ProductName", k) -} - -func readDisplayVersion(k registry.Key) string { - return getStringValue("DisplayVersion", k) -} - -func readReleaseID(k registry.Key) string { - return getStringValue("ReleaseID", k) -} - -func readCurrentMajorVersionNumber(k registry.Key) string { - return strconv.FormatUint(getIntegerValue("CurrentMajorVersionNumber", k), 10) -} - -func readCurrentMinorVersionNumber(k registry.Key) string { - return strconv.FormatUint(getIntegerValue("CurrentMinorVersionNumber", k), 10) -} - -func readCurrentBuildNumber(k registry.Key) string { - return getStringValue("CurrentBuildNumber", k) -} - -func readUBR(k registry.Key) string { - return strconv.FormatUint(getIntegerValue("UBR", k), 10) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go b/vendor/go.opentelemetry.io/otel/sdk/resource/process.go deleted file mode 100644 index 138e57721b..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/process.go +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "fmt" - "os" - "os/user" - "path/filepath" - "runtime" - - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" -) - -type ( - pidProvider func() int - executablePathProvider func() (string, error) - commandArgsProvider func() []string - ownerProvider func() (*user.User, error) - runtimeNameProvider func() string - runtimeVersionProvider func() string - runtimeOSProvider func() string - runtimeArchProvider func() string -) - -var ( - defaultPidProvider pidProvider = os.Getpid - defaultExecutablePathProvider executablePathProvider = os.Executable - defaultCommandArgsProvider commandArgsProvider = func() []string { return os.Args } - defaultOwnerProvider ownerProvider = user.Current - defaultRuntimeNameProvider runtimeNameProvider = func() string { - if runtime.Compiler == "gc" { - return "go" - } - return runtime.Compiler - } - defaultRuntimeVersionProvider runtimeVersionProvider = runtime.Version - defaultRuntimeOSProvider runtimeOSProvider = func() string { return runtime.GOOS } - defaultRuntimeArchProvider runtimeArchProvider = func() string { return runtime.GOARCH } -) - -var ( - pid = defaultPidProvider - executablePath = defaultExecutablePathProvider - commandArgs = defaultCommandArgsProvider - owner = defaultOwnerProvider - runtimeName = defaultRuntimeNameProvider - runtimeVersion = defaultRuntimeVersionProvider - runtimeOS = defaultRuntimeOSProvider - runtimeArch = defaultRuntimeArchProvider -) - -func setDefaultOSProviders() { - setOSProviders( - defaultPidProvider, - defaultExecutablePathProvider, - defaultCommandArgsProvider, - ) -} - -func setOSProviders( - pidProvider pidProvider, - executablePathProvider executablePathProvider, - commandArgsProvider commandArgsProvider, -) { - pid = pidProvider - executablePath = executablePathProvider - commandArgs = commandArgsProvider -} - -func setDefaultRuntimeProviders() { - setRuntimeProviders( - defaultRuntimeNameProvider, - defaultRuntimeVersionProvider, - defaultRuntimeOSProvider, - defaultRuntimeArchProvider, - ) -} - -func setRuntimeProviders( - runtimeNameProvider runtimeNameProvider, - runtimeVersionProvider runtimeVersionProvider, - runtimeOSProvider runtimeOSProvider, - runtimeArchProvider runtimeArchProvider, -) { - runtimeName = runtimeNameProvider - runtimeVersion = runtimeVersionProvider - runtimeOS = runtimeOSProvider - runtimeArch = runtimeArchProvider -} - -func setDefaultUserProviders() { - setUserProviders(defaultOwnerProvider) -} - -func setUserProviders(ownerProvider ownerProvider) { - owner = ownerProvider -} - -type ( - processPIDDetector struct{} - processExecutableNameDetector struct{} - processExecutablePathDetector struct{} - processCommandArgsDetector struct{} - processOwnerDetector struct{} - processRuntimeNameDetector struct{} - processRuntimeVersionDetector struct{} - processRuntimeDescriptionDetector struct{} -) - -// Detect returns a *Resource that describes the process identifier (PID) of the -// executing process. -func (processPIDDetector) Detect(context.Context) (*Resource, error) { - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessPID(pid())), nil -} - -// Detect returns a *Resource that describes the name of the process executable. -func (processExecutableNameDetector) Detect(context.Context) (*Resource, error) { - executableName := filepath.Base(commandArgs()[0]) - - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessExecutableName(executableName)), nil -} - -// Detect returns a *Resource that describes the full path of the process executable. -func (processExecutablePathDetector) Detect(context.Context) (*Resource, error) { - executablePath, err := executablePath() - if err != nil { - return nil, err - } - - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessExecutablePath(executablePath)), nil -} - -// Detect returns a *Resource that describes all the command arguments as received -// by the process. -func (processCommandArgsDetector) Detect(context.Context) (*Resource, error) { - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessCommandArgs(commandArgs()...)), nil -} - -// Detect returns a *Resource that describes the username of the user that owns the -// process. -func (processOwnerDetector) Detect(context.Context) (*Resource, error) { - owner, err := owner() - if err != nil { - return nil, err - } - - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessOwner(owner.Username)), nil -} - -// Detect returns a *Resource that describes the name of the compiler used to compile -// this process image. -func (processRuntimeNameDetector) Detect(context.Context) (*Resource, error) { - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessRuntimeName(runtimeName())), nil -} - -// Detect returns a *Resource that describes the version of the runtime of this process. -func (processRuntimeVersionDetector) Detect(context.Context) (*Resource, error) { - return NewWithAttributes(semconv.SchemaURL, semconv.ProcessRuntimeVersion(runtimeVersion())), nil -} - -// Detect returns a *Resource that describes the runtime of this process. -func (processRuntimeDescriptionDetector) Detect(context.Context) (*Resource, error) { - runtimeDescription := fmt.Sprintf( - "go version %s %s/%s", runtimeVersion(), runtimeOS(), runtimeArch()) - - return NewWithAttributes( - semconv.SchemaURL, - semconv.ProcessRuntimeDescription(runtimeDescription), - ), nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go b/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go deleted file mode 100644 index 28e1e4f7eb..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/resource/resource.go +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package resource // import "go.opentelemetry.io/otel/sdk/resource" - -import ( - "context" - "errors" - "fmt" - "sync" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/internal/x" -) - -// Resource describes an entity about which identifying information -// and metadata is exposed. Resource is an immutable object, -// equivalent to a map from key to unique value. -// -// Resources should be passed and stored as pointers -// (`*resource.Resource`). The `nil` value is equivalent to an empty -// Resource. -// -// Note that the Go == operator compares not just the resource attributes but -// also all other internals of the Resource type. Therefore, Resource values -// should not be used as map or database keys. In general, the [Resource.Equal] -// method should be used instead of direct comparison with ==, since that -// method ensures the correct comparison of resource attributes, and the -// [attribute.Distinct] returned from [Resource.Equivalent] should be used for -// map and database keys instead. -type Resource struct { - attrs attribute.Set - schemaURL string -} - -// Compile-time check that the Resource remains comparable. -var _ map[Resource]struct{} = nil - -var ( - defaultResource *Resource - defaultResourceOnce sync.Once -) - -// ErrSchemaURLConflict is an error returned when two Resources are merged -// together that contain different, non-empty, schema URLs. -var ErrSchemaURLConflict = errors.New("conflicting Schema URL") - -// New returns a [Resource] built using opts. -// -// This may return a partial Resource along with an error containing -// [ErrPartialResource] if options that provide a [Detector] are used and that -// error is returned from one or more of the Detectors. It may also return a -// merge-conflict Resource along with an error containing -// [ErrSchemaURLConflict] if merging Resources from the opts results in a -// schema URL conflict (see [Resource.Merge] for more information). It is up to -// the caller to determine if this returned Resource should be used or not -// based on these errors. -func New(ctx context.Context, opts ...Option) (*Resource, error) { - cfg := config{} - for _, opt := range opts { - cfg = opt.apply(cfg) - } - - r := &Resource{schemaURL: cfg.schemaURL} - return r, detect(ctx, r, cfg.detectors) -} - -// NewWithAttributes creates a resource from attrs and associates the resource with a -// schema URL. If attrs contains duplicate keys, the last value will be used. If attrs -// contains any invalid items those items will be dropped. The attrs are assumed to be -// in a schema identified by schemaURL. -func NewWithAttributes(schemaURL string, attrs ...attribute.KeyValue) *Resource { - resource := NewSchemaless(attrs...) - resource.schemaURL = schemaURL - return resource -} - -// NewSchemaless creates a resource from attrs. If attrs contains duplicate keys, -// the last value will be used. If attrs contains any invalid items those items will -// be dropped. The resource will not be associated with a schema URL. If the schema -// of the attrs is known use NewWithAttributes instead. -func NewSchemaless(attrs ...attribute.KeyValue) *Resource { - if len(attrs) == 0 { - return &Resource{} - } - - // Ensure attributes comply with the specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/common/README.md#attribute - s, _ := attribute.NewSetWithFiltered(attrs, func(kv attribute.KeyValue) bool { - return kv.Valid() - }) - - // If attrs only contains invalid entries do not allocate a new resource. - if s.Len() == 0 { - return &Resource{} - } - - return &Resource{attrs: s} //nolint -} - -// String implements the Stringer interface and provides a -// human-readable form of the resource. -// -// Avoid using this representation as the key in a map of resources, -// use Equivalent() as the key instead. -func (r *Resource) String() string { - if r == nil { - return "" - } - return r.attrs.Encoded(attribute.DefaultEncoder()) -} - -// MarshalLog is the marshaling function used by the logging system to represent this Resource. -func (r *Resource) MarshalLog() any { - return struct { - Attributes attribute.Set - SchemaURL string - }{ - Attributes: r.attrs, - SchemaURL: r.schemaURL, - } -} - -// Attributes returns a copy of attributes from the resource in a sorted order. -// To avoid allocating a new slice, use an iterator. -func (r *Resource) Attributes() []attribute.KeyValue { - if r == nil { - r = Empty() - } - return r.attrs.ToSlice() -} - -// SchemaURL returns the schema URL associated with Resource r. -func (r *Resource) SchemaURL() string { - if r == nil { - return "" - } - return r.schemaURL -} - -// Iter returns an iterator of the Resource attributes. -// This is ideal to use if you do not want a copy of the attributes. -func (r *Resource) Iter() attribute.Iterator { - if r == nil { - r = Empty() - } - return r.attrs.Iter() -} - -// Equal reports whether r and o represent the same resource. Two resources can -// be equal even if they have different schema URLs. -// -// See the documentation on the [Resource] type for the pitfalls of using == -// with Resource values; most code should use Equal instead. -func (r *Resource) Equal(o *Resource) bool { - if r == nil { - r = Empty() - } - if o == nil { - o = Empty() - } - return r.Equivalent() == o.Equivalent() -} - -// Merge creates a new [Resource] by merging a and b. -// -// If there are common keys between a and b, then the value from b will -// overwrite the value from a, even if b's value is empty. -// -// The SchemaURL of the resources will be merged according to the -// [OpenTelemetry specification rules]: -// -// - If a's schema URL is empty then the returned Resource's schema URL will -// be set to the schema URL of b, -// - Else if b's schema URL is empty then the returned Resource's schema URL -// will be set to the schema URL of a, -// - Else if the schema URLs of a and b are the same then that will be the -// schema URL of the returned Resource, -// - Else this is a merging error. If the resources have different, -// non-empty, schema URLs an error containing [ErrSchemaURLConflict] will -// be returned with the merged Resource. The merged Resource will have an -// empty schema URL. It may be the case that some unintended attributes -// have been overwritten or old semantic conventions persisted in the -// returned Resource. It is up to the caller to determine if this returned -// Resource should be used or not. -// -// [OpenTelemetry specification rules]: https://github.com/open-telemetry/opentelemetry-specification/blob/v1.20.0/specification/resource/sdk.md#merge -func Merge(a, b *Resource) (*Resource, error) { - if a == nil && b == nil { - return Empty(), nil - } - if a == nil { - return b, nil - } - if b == nil { - return a, nil - } - - // Note: 'b' attributes will overwrite 'a' with last-value-wins in attribute.Key() - // Meaning this is equivalent to: append(a.Attributes(), b.Attributes()...) - mi := attribute.NewMergeIterator(b.Set(), a.Set()) - combine := make([]attribute.KeyValue, 0, a.Len()+b.Len()) - for mi.Next() { - combine = append(combine, mi.Attribute()) - } - - switch { - case a.schemaURL == "": - return NewWithAttributes(b.schemaURL, combine...), nil - case b.schemaURL == "": - return NewWithAttributes(a.schemaURL, combine...), nil - case a.schemaURL == b.schemaURL: - return NewWithAttributes(a.schemaURL, combine...), nil - } - // Return the merged resource with an appropriate error. It is up to - // the user to decide if the returned resource can be used or not. - return NewSchemaless(combine...), fmt.Errorf( - "%w: %s and %s", - ErrSchemaURLConflict, - a.schemaURL, - b.schemaURL, - ) -} - -// Empty returns an instance of Resource with no attributes. It is -// equivalent to a `nil` Resource. -func Empty() *Resource { - return &Resource{} -} - -// Default returns an instance of Resource with a default -// "service.name" and OpenTelemetrySDK attributes. -func Default() *Resource { - defaultResourceOnce.Do(func() { - var err error - defaultDetectors := []Detector{ - defaultServiceNameDetector{}, - fromEnv{}, - telemetrySDK{}, - } - if x.Resource.Enabled() { - defaultDetectors = append([]Detector{defaultServiceInstanceIDDetector{}}, defaultDetectors...) - } - defaultResource, err = Detect( - context.Background(), - defaultDetectors..., - ) - if err != nil { - otel.Handle(err) - } - // If Detect did not return a valid resource, fall back to emptyResource. - if defaultResource == nil { - defaultResource = &Resource{} - } - }) - return defaultResource -} - -// Environment returns an instance of Resource with attributes -// extracted from the OTEL_RESOURCE_ATTRIBUTES environment variable. -func Environment() *Resource { - detector := &fromEnv{} - resource, err := detector.Detect(context.Background()) - if err != nil { - otel.Handle(err) - } - return resource -} - -// Equivalent returns an object that can be compared for equality -// between two resources. This value is suitable for use as a key in -// a map. -func (r *Resource) Equivalent() attribute.Distinct { - return r.Set().Equivalent() -} - -// Set returns the equivalent *attribute.Set of this resource's attributes. -func (r *Resource) Set() *attribute.Set { - if r == nil { - r = Empty() - } - return &r.attrs -} - -// MarshalJSON encodes the resource attributes as a JSON list of { "Key": -// "...", "Value": ... } pairs in order sorted by key. -func (r *Resource) MarshalJSON() ([]byte, error) { - if r == nil { - r = Empty() - } - return r.attrs.MarshalJSON() -} - -// Len returns the number of unique key-values in this Resource. -func (r *Resource) Len() int { - if r == nil { - return 0 - } - return r.attrs.Len() -} - -// Encoded returns an encoded representation of the resource. -func (r *Resource) Encoded(enc attribute.Encoder) string { - if r == nil { - return "" - } - return r.attrs.Encoded(enc) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/README.md b/vendor/go.opentelemetry.io/otel/sdk/trace/README.md deleted file mode 100644 index f2936e1439..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# SDK Trace - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/sdk/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/sdk/trace) diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go deleted file mode 100644 index 7d15cbb9c0..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/batch_span_processor.go +++ /dev/null @@ -1,445 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "errors" - "sync" - "sync/atomic" - "time" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/sdk/trace/internal/env" - "go.opentelemetry.io/otel/sdk/trace/internal/observ" - "go.opentelemetry.io/otel/trace" -) - -// Defaults for BatchSpanProcessorOptions. -const ( - DefaultMaxQueueSize = 2048 - // DefaultScheduleDelay is the delay interval between two consecutive exports, in milliseconds. - DefaultScheduleDelay = 5000 - // DefaultExportTimeout is the duration after which an export is cancelled, in milliseconds. - DefaultExportTimeout = 30000 - DefaultMaxExportBatchSize = 512 -) - -// BatchSpanProcessorOption configures a BatchSpanProcessor. -type BatchSpanProcessorOption func(o *BatchSpanProcessorOptions) - -// BatchSpanProcessorOptions is configuration settings for a -// BatchSpanProcessor. -type BatchSpanProcessorOptions struct { - // MaxQueueSize is the maximum queue size to buffer spans for delayed processing. If the - // queue gets full it drops the spans. Use BlockOnQueueFull to change this behavior. - // The default value of MaxQueueSize is 2048. - MaxQueueSize int - - // BatchTimeout is the maximum duration for constructing a batch. Processor - // forcefully sends available spans when timeout is reached. - // The default value of BatchTimeout is 5000 msec. - BatchTimeout time.Duration - - // ExportTimeout specifies the maximum duration for exporting spans. If the timeout - // is reached, the export will be cancelled. - // The default value of ExportTimeout is 30000 msec. - ExportTimeout time.Duration - - // MaxExportBatchSize is the maximum number of spans to process in a single batch. - // If there are more than one batch worth of spans then it processes multiple batches - // of spans one batch after the other without any delay. - // The default value of MaxExportBatchSize is 512. - MaxExportBatchSize int - - // BlockOnQueueFull blocks onEnd() and onStart() method if the queue is full - // AND if BlockOnQueueFull is set to true. - // Blocking option should be used carefully as it can severely affect the performance of an - // application. - BlockOnQueueFull bool -} - -// batchSpanProcessor is a SpanProcessor that batches asynchronously-received -// spans and sends them to a trace.Exporter when complete. -type batchSpanProcessor struct { - e SpanExporter - o BatchSpanProcessorOptions - - queue chan ReadOnlySpan - dropped uint32 - - inst *observ.BSP - - batch []ReadOnlySpan - batchMutex sync.Mutex - timer *time.Timer - stopWait sync.WaitGroup - stopOnce sync.Once - stopCh chan struct{} - stopped atomic.Bool -} - -var _ SpanProcessor = (*batchSpanProcessor)(nil) - -// NewBatchSpanProcessor creates a new SpanProcessor that will send completed -// span batches to the exporter with the supplied options. -// -// If the exporter is nil, the span processor will perform no action. -func NewBatchSpanProcessor(exporter SpanExporter, options ...BatchSpanProcessorOption) SpanProcessor { - maxQueueSize := env.BatchSpanProcessorMaxQueueSize(DefaultMaxQueueSize) - maxExportBatchSize := env.BatchSpanProcessorMaxExportBatchSize(DefaultMaxExportBatchSize) - - if maxExportBatchSize > maxQueueSize { - maxExportBatchSize = min(DefaultMaxExportBatchSize, maxQueueSize) - } - - o := BatchSpanProcessorOptions{ - BatchTimeout: time.Duration(env.BatchSpanProcessorScheduleDelay(DefaultScheduleDelay)) * time.Millisecond, - ExportTimeout: time.Duration(env.BatchSpanProcessorExportTimeout(DefaultExportTimeout)) * time.Millisecond, - MaxQueueSize: maxQueueSize, - MaxExportBatchSize: maxExportBatchSize, - } - for _, opt := range options { - opt(&o) - } - bsp := &batchSpanProcessor{ - e: exporter, - o: o, - batch: make([]ReadOnlySpan, 0, o.MaxExportBatchSize), - timer: time.NewTimer(o.BatchTimeout), - queue: make(chan ReadOnlySpan, o.MaxQueueSize), - stopCh: make(chan struct{}), - } - - var err error - bsp.inst, err = observ.NewBSP( - nextProcessorID(), - func() int64 { return int64(len(bsp.queue)) }, - int64(bsp.o.MaxQueueSize), - ) - if err != nil { - otel.Handle(err) - } - - bsp.stopWait.Add(1) - go func() { - defer bsp.stopWait.Done() - bsp.processQueue() - bsp.drainQueue() - }() - - return bsp -} - -var processorIDCounter atomic.Int64 - -// nextProcessorID returns an identifier for this batch span processor, -// starting with 0 and incrementing by 1 each time it is called. -func nextProcessorID() int64 { - return processorIDCounter.Add(1) - 1 -} - -// OnStart method does nothing. -func (*batchSpanProcessor) OnStart(context.Context, ReadWriteSpan) {} - -// OnEnd method enqueues a ReadOnlySpan for later processing. -func (bsp *batchSpanProcessor) OnEnd(s ReadOnlySpan) { - // Do not enqueue spans after Shutdown. - if bsp.stopped.Load() { - return - } - - // Do not enqueue spans if we are just going to drop them. - if bsp.e == nil { - return - } - bsp.enqueue(s) -} - -// Shutdown flushes the queue and waits until all spans are processed. -// It only executes once. Subsequent call does nothing. -func (bsp *batchSpanProcessor) Shutdown(ctx context.Context) error { - var err error - bsp.stopOnce.Do(func() { - bsp.stopped.Store(true) - wait := make(chan struct{}) - go func() { - close(bsp.stopCh) - bsp.stopWait.Wait() - if bsp.e != nil { - if err := bsp.e.Shutdown(ctx); err != nil { - otel.Handle(err) - } - } - close(wait) - }() - // Wait until the wait group is done or the context is cancelled - select { - case <-wait: - case <-ctx.Done(): - err = ctx.Err() - } - if bsp.inst != nil { - err = errors.Join(err, bsp.inst.Shutdown()) - } - }) - return err -} - -type forceFlushSpan struct { - ReadOnlySpan - flushed chan struct{} -} - -func (forceFlushSpan) SpanContext() trace.SpanContext { - return trace.NewSpanContext(trace.SpanContextConfig{TraceFlags: trace.FlagsSampled}) -} - -// ForceFlush exports all ended spans that have not yet been exported. -func (bsp *batchSpanProcessor) ForceFlush(ctx context.Context) error { - // Interrupt if context is already canceled. - if err := ctx.Err(); err != nil { - return err - } - - // Do nothing after Shutdown. - if bsp.stopped.Load() { - return nil - } - - var err error - if bsp.e != nil { - flushCh := make(chan struct{}) - if bsp.enqueueBlockOnQueueFull(ctx, forceFlushSpan{flushed: flushCh}) { - select { - case <-bsp.stopCh: - // The batchSpanProcessor is Shutdown. - return nil - case <-flushCh: - // Processed any items in queue prior to ForceFlush being called - case <-ctx.Done(): - return ctx.Err() - } - } - - wait := make(chan error, 1) - go func() { - wait <- bsp.exportSpans(ctx) - }() - // Wait until the export is finished or the context is cancelled/timed out - select { - case err = <-wait: - case <-ctx.Done(): - err = ctx.Err() - } - } - return err -} - -// WithMaxQueueSize returns a BatchSpanProcessorOption that configures the -// maximum queue size allowed for a BatchSpanProcessor. -func WithMaxQueueSize(size int) BatchSpanProcessorOption { - return func(o *BatchSpanProcessorOptions) { - o.MaxQueueSize = size - } -} - -// WithMaxExportBatchSize returns a BatchSpanProcessorOption that configures -// the maximum export batch size allowed for a BatchSpanProcessor. -func WithMaxExportBatchSize(size int) BatchSpanProcessorOption { - return func(o *BatchSpanProcessorOptions) { - o.MaxExportBatchSize = size - } -} - -// WithBatchTimeout returns a BatchSpanProcessorOption that configures the -// maximum delay allowed for a BatchSpanProcessor before it will export any -// held span (whether the queue is full or not). -func WithBatchTimeout(delay time.Duration) BatchSpanProcessorOption { - return func(o *BatchSpanProcessorOptions) { - o.BatchTimeout = delay - } -} - -// WithExportTimeout returns a BatchSpanProcessorOption that configures the -// amount of time a BatchSpanProcessor waits for an exporter to export before -// abandoning the export. -func WithExportTimeout(timeout time.Duration) BatchSpanProcessorOption { - return func(o *BatchSpanProcessorOptions) { - o.ExportTimeout = timeout - } -} - -// WithBlocking returns a BatchSpanProcessorOption that configures a -// BatchSpanProcessor to wait for enqueue operations to succeed instead of -// dropping data when the queue is full. -func WithBlocking() BatchSpanProcessorOption { - return func(o *BatchSpanProcessorOptions) { - o.BlockOnQueueFull = true - } -} - -// exportSpans is a subroutine of processing and draining the queue. -func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error { - bsp.timer.Reset(bsp.o.BatchTimeout) - - bsp.batchMutex.Lock() - defer bsp.batchMutex.Unlock() - - if bsp.o.ExportTimeout > 0 { - var cancel context.CancelFunc - ctx, cancel = context.WithTimeoutCause(ctx, bsp.o.ExportTimeout, errors.New("processor export timeout")) - defer cancel() - } - - if l := len(bsp.batch); l > 0 { - global.Debug("exporting spans", "count", len(bsp.batch), "total_dropped", atomic.LoadUint32(&bsp.dropped)) - if bsp.inst != nil { - bsp.inst.Processed(ctx, int64(l)) - } - err := bsp.e.ExportSpans(ctx, bsp.batch) - - // A new batch is always created after exporting, even if the batch failed to be exported. - // - // It is up to the exporter to implement any type of retry logic if a batch is failing - // to be exported, since it is specific to the protocol and backend being sent to. - clear(bsp.batch) // Erase elements to let GC collect objects - bsp.batch = bsp.batch[:0] - - if err != nil { - return err - } - } - return nil -} - -// processQueue removes spans from the `queue` channel until processor -// is shut down. It calls the exporter in batches of up to MaxExportBatchSize -// waiting up to BatchTimeout to form a batch. -func (bsp *batchSpanProcessor) processQueue() { - defer bsp.timer.Stop() - - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - for { - select { - case <-bsp.stopCh: - return - case <-bsp.timer.C: - if err := bsp.exportSpans(ctx); err != nil { - otel.Handle(err) - } - case sd := <-bsp.queue: - if ffs, ok := sd.(forceFlushSpan); ok { - close(ffs.flushed) - continue - } - bsp.batchMutex.Lock() - bsp.batch = append(bsp.batch, sd) - shouldExport := len(bsp.batch) >= bsp.o.MaxExportBatchSize - bsp.batchMutex.Unlock() - if shouldExport { - if !bsp.timer.Stop() { - // Handle both GODEBUG=asynctimerchan=[0|1] properly. - select { - case <-bsp.timer.C: - default: - } - } - if err := bsp.exportSpans(ctx); err != nil { - otel.Handle(err) - } - } - } - } -} - -// drainQueue awaits the any caller that had added to bsp.stopWait -// to finish the enqueue, then exports the final batch. -func (bsp *batchSpanProcessor) drainQueue() { - ctx, cancel := context.WithCancel(context.Background()) - defer cancel() - for { - select { - case sd := <-bsp.queue: - if _, ok := sd.(forceFlushSpan); ok { - // Ignore flush requests as they are not valid spans. - continue - } - - bsp.batchMutex.Lock() - bsp.batch = append(bsp.batch, sd) - shouldExport := len(bsp.batch) == bsp.o.MaxExportBatchSize - bsp.batchMutex.Unlock() - - if shouldExport { - if err := bsp.exportSpans(ctx); err != nil { - otel.Handle(err) - } - } - default: - // There are no more enqueued spans. Make final export. - if err := bsp.exportSpans(ctx); err != nil { - otel.Handle(err) - } - return - } - } -} - -func (bsp *batchSpanProcessor) enqueue(sd ReadOnlySpan) { - ctx := context.TODO() - if bsp.o.BlockOnQueueFull { - bsp.enqueueBlockOnQueueFull(ctx, sd) - } else { - bsp.enqueueDrop(ctx, sd) - } -} - -func (bsp *batchSpanProcessor) enqueueBlockOnQueueFull(ctx context.Context, sd ReadOnlySpan) bool { - if !sd.SpanContext().IsSampled() { - return false - } - - select { - case bsp.queue <- sd: - return true - case <-ctx.Done(): - if bsp.inst != nil { - bsp.inst.ProcessedQueueFull(ctx, 1) - } - return false - } -} - -func (bsp *batchSpanProcessor) enqueueDrop(ctx context.Context, sd ReadOnlySpan) bool { - if !sd.SpanContext().IsSampled() { - return false - } - - select { - case bsp.queue <- sd: - return true - default: - atomic.AddUint32(&bsp.dropped, 1) - if bsp.inst != nil { - bsp.inst.ProcessedQueueFull(ctx, 1) - } - } - return false -} - -// MarshalLog is the marshaling function used by the logging system to represent this Span Processor. -func (bsp *batchSpanProcessor) MarshalLog() any { - return struct { - Type string - SpanExporter SpanExporter - Config BatchSpanProcessorOptions - }{ - Type: "BatchSpanProcessor", - SpanExporter: bsp.e, - Config: bsp.o, - } -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go deleted file mode 100644 index b502c7d479..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/doc.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package trace contains support for OpenTelemetry distributed tracing. - -The following assumes a basic familiarity with OpenTelemetry concepts. -See https://opentelemetry.io. - -See [go.opentelemetry.io/otel/sdk/internal/x] for information about -the experimental features. -*/ -package trace // import "go.opentelemetry.io/otel/sdk/trace" diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/event.go b/vendor/go.opentelemetry.io/otel/sdk/trace/event.go deleted file mode 100644 index 60a7ed1349..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/event.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "time" - - "go.opentelemetry.io/otel/attribute" -) - -// Event is a thing that happened during a Span's lifetime. -type Event struct { - // Name is the name of this event - Name string - - // Attributes describe the aspects of the event. - Attributes []attribute.KeyValue - - // DroppedAttributeCount is the number of attributes that were not - // recorded due to configured limits being reached. - DroppedAttributeCount int - - // Time at which this event was recorded. - Time time.Time -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go b/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go deleted file mode 100644 index 8c308dd60a..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/evictedqueue.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "slices" - "sync" - - "go.opentelemetry.io/otel/internal/global" -) - -// evictedQueue is a FIFO queue with a configurable capacity. -type evictedQueue[T any] struct { - queue []T - capacity int - droppedCount int - logDroppedMsg string - logDroppedOnce sync.Once -} - -func newEvictedQueueEvent(capacity int) evictedQueue[Event] { - // Do not pre-allocate queue, do this lazily. - return evictedQueue[Event]{ - capacity: capacity, - logDroppedMsg: "limit reached: dropping trace trace.Event", - } -} - -func newEvictedQueueLink(capacity int) evictedQueue[Link] { - // Do not pre-allocate queue, do this lazily. - return evictedQueue[Link]{ - capacity: capacity, - logDroppedMsg: "limit reached: dropping trace trace.Link", - } -} - -// add adds value to the evictedQueue eq. If eq is at capacity, the oldest -// queued value will be discarded and the drop count incremented. -func (eq *evictedQueue[T]) add(value T) { - if eq.capacity == 0 { - eq.droppedCount++ - eq.logDropped() - return - } - - if eq.capacity > 0 && len(eq.queue) == eq.capacity { - // Drop first-in while avoiding allocating more capacity to eq.queue. - copy(eq.queue[:eq.capacity-1], eq.queue[1:]) - eq.queue = eq.queue[:eq.capacity-1] - eq.droppedCount++ - eq.logDropped() - } - eq.queue = append(eq.queue, value) -} - -func (eq *evictedQueue[T]) logDropped() { - eq.logDroppedOnce.Do(func() { global.Warn(eq.logDroppedMsg) }) -} - -// copy returns a copy of the evictedQueue. -func (eq *evictedQueue[T]) copy() []T { - return slices.Clone(eq.queue) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go b/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go deleted file mode 100644 index 3649322a6e..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/id_generator.go +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "encoding/binary" - "math/rand/v2" - - "go.opentelemetry.io/otel/trace" -) - -// IDGenerator allows custom generators for TraceID and SpanID. -type IDGenerator interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // NewIDs returns a new trace and span ID. - NewIDs(ctx context.Context) (trace.TraceID, trace.SpanID) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // NewSpanID returns a ID for a new span in the trace with traceID. - NewSpanID(ctx context.Context, traceID trace.TraceID) trace.SpanID - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -type randomIDGenerator struct{} - -var _ IDGenerator = &randomIDGenerator{} - -// NewSpanID returns a non-zero span ID from a randomly-chosen sequence. -func (*randomIDGenerator) NewSpanID(context.Context, trace.TraceID) trace.SpanID { - sid := trace.SpanID{} - for { - binary.NativeEndian.PutUint64(sid[:], rand.Uint64()) - if sid.IsValid() { - break - } - } - return sid -} - -// NewIDs returns a non-zero trace ID and a non-zero span ID from a -// randomly-chosen sequence. -func (*randomIDGenerator) NewIDs(context.Context) (trace.TraceID, trace.SpanID) { - tid := trace.TraceID{} - sid := trace.SpanID{} - for { - binary.NativeEndian.PutUint64(tid[:8], rand.Uint64()) - binary.NativeEndian.PutUint64(tid[8:], rand.Uint64()) - if tid.IsValid() { - break - } - } - for { - binary.NativeEndian.PutUint64(sid[:], rand.Uint64()) - if sid.IsValid() { - break - } - } - return tid, sid -} - -func defaultIDGenerator() IDGenerator { - return &randomIDGenerator{} -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go deleted file mode 100644 index 58f68df441..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/env/env.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package env provides types and functionality for environment variable support -// in the OpenTelemetry SDK. -package env // import "go.opentelemetry.io/otel/sdk/trace/internal/env" - -import ( - "os" - "strconv" - - "go.opentelemetry.io/otel/internal/global" -) - -// Environment variable names. -const ( - // BatchSpanProcessorScheduleDelayKey is the delay interval between two - // consecutive exports (i.e. 5000). - BatchSpanProcessorScheduleDelayKey = "OTEL_BSP_SCHEDULE_DELAY" - // BatchSpanProcessorExportTimeoutKey is the maximum allowed time to - // export data (i.e. 3000). - BatchSpanProcessorExportTimeoutKey = "OTEL_BSP_EXPORT_TIMEOUT" - // BatchSpanProcessorMaxQueueSizeKey is the maximum queue size (i.e. 2048). - BatchSpanProcessorMaxQueueSizeKey = "OTEL_BSP_MAX_QUEUE_SIZE" - // BatchSpanProcessorMaxExportBatchSizeKey is the maximum batch size (i.e. - // 512). Note: it must be less than or equal to - // BatchSpanProcessorMaxQueueSize. - BatchSpanProcessorMaxExportBatchSizeKey = "OTEL_BSP_MAX_EXPORT_BATCH_SIZE" - - // AttributeValueLengthKey is the maximum allowed attribute value size. - AttributeValueLengthKey = "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT" - - // AttributeCountKey is the maximum allowed span attribute count. - AttributeCountKey = "OTEL_ATTRIBUTE_COUNT_LIMIT" - - // SpanAttributeValueLengthKey is the maximum allowed attribute value size - // for a span. - SpanAttributeValueLengthKey = "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT" - - // SpanAttributeCountKey is the maximum allowed span attribute count for a - // span. - SpanAttributeCountKey = "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT" - - // SpanEventCountKey is the maximum allowed span event count. - SpanEventCountKey = "OTEL_SPAN_EVENT_COUNT_LIMIT" - - // SpanEventAttributeCountKey is the maximum allowed attribute per span - // event count. - SpanEventAttributeCountKey = "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT" - - // SpanLinkCountKey is the maximum allowed span link count. - SpanLinkCountKey = "OTEL_SPAN_LINK_COUNT_LIMIT" - - // SpanLinkAttributeCountKey is the maximum allowed attribute per span - // link count. - SpanLinkAttributeCountKey = "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT" -) - -// firstInt returns the value of the first matching environment variable from -// keys. If the value is not an integer or no match is found, defaultValue is -// returned. -func firstInt(defaultValue int, keys ...string) int { - for _, key := range keys { - value := os.Getenv(key) - if value == "" { - continue - } - - intValue, err := strconv.Atoi(value) - if err != nil { - global.Info("Got invalid value, number value expected.", key, value) - return defaultValue - } - - return intValue - } - - return defaultValue -} - -// IntEnvOr returns the int value of the environment variable with name key if -// it exists, it is not empty, and the value is an int. Otherwise, defaultValue is returned. -func IntEnvOr(key string, defaultValue int) int { - value := os.Getenv(key) - if value == "" { - return defaultValue - } - - intValue, err := strconv.Atoi(value) - if err != nil { - global.Info("Got invalid value, number value expected.", key, value) - return defaultValue - } - - return intValue -} - -// BatchSpanProcessorScheduleDelay returns the environment variable value for -// the OTEL_BSP_SCHEDULE_DELAY key if it exists, otherwise defaultValue is -// returned. -func BatchSpanProcessorScheduleDelay(defaultValue int) int { - return IntEnvOr(BatchSpanProcessorScheduleDelayKey, defaultValue) -} - -// BatchSpanProcessorExportTimeout returns the environment variable value for -// the OTEL_BSP_EXPORT_TIMEOUT key if it exists, otherwise defaultValue is -// returned. -func BatchSpanProcessorExportTimeout(defaultValue int) int { - return IntEnvOr(BatchSpanProcessorExportTimeoutKey, defaultValue) -} - -// BatchSpanProcessorMaxQueueSize returns the environment variable value for -// the OTEL_BSP_MAX_QUEUE_SIZE key if it exists, otherwise defaultValue is -// returned. -func BatchSpanProcessorMaxQueueSize(defaultValue int) int { - return IntEnvOr(BatchSpanProcessorMaxQueueSizeKey, defaultValue) -} - -// BatchSpanProcessorMaxExportBatchSize returns the environment variable value for -// the OTEL_BSP_MAX_EXPORT_BATCH_SIZE key if it exists, otherwise defaultValue -// is returned. -func BatchSpanProcessorMaxExportBatchSize(defaultValue int) int { - return IntEnvOr(BatchSpanProcessorMaxExportBatchSizeKey, defaultValue) -} - -// SpanAttributeValueLength returns the environment variable value for the -// OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the -// environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT is -// returned or defaultValue if that is not set. -func SpanAttributeValueLength(defaultValue int) int { - return firstInt(defaultValue, SpanAttributeValueLengthKey, AttributeValueLengthKey) -} - -// SpanAttributeCount returns the environment variable value for the -// OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the -// environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT is returned or -// defaultValue if that is not set. -func SpanAttributeCount(defaultValue int) int { - return firstInt(defaultValue, SpanAttributeCountKey, AttributeCountKey) -} - -// SpanEventCount returns the environment variable value for the -// OTEL_SPAN_EVENT_COUNT_LIMIT key if it exists, otherwise defaultValue is -// returned. -func SpanEventCount(defaultValue int) int { - return IntEnvOr(SpanEventCountKey, defaultValue) -} - -// SpanEventAttributeCount returns the environment variable value for the -// OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key if it exists, otherwise defaultValue -// is returned. -func SpanEventAttributeCount(defaultValue int) int { - return IntEnvOr(SpanEventAttributeCountKey, defaultValue) -} - -// SpanLinkCount returns the environment variable value for the -// OTEL_SPAN_LINK_COUNT_LIMIT key if it exists, otherwise defaultValue is -// returned. -func SpanLinkCount(defaultValue int) int { - return IntEnvOr(SpanLinkCountKey, defaultValue) -} - -// SpanLinkAttributeCount returns the environment variable value for the -// OTEL_LINK_ATTRIBUTE_COUNT_LIMIT key if it exists, otherwise defaultValue is -// returned. -func SpanLinkAttributeCount(defaultValue int) int { - return IntEnvOr(SpanLinkAttributeCountKey, defaultValue) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go deleted file mode 100644 index bd7fe23629..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/batch_span_processor.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" - -import ( - "context" - "errors" - "fmt" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk" - "go.opentelemetry.io/otel/sdk/internal/x" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" -) - -const ( - // ScopeName is the name of the instrumentation scope. - ScopeName = "go.opentelemetry.io/otel/sdk/trace/internal/observ" - - // SchemaURL is the schema URL of the instrumentation. - SchemaURL = semconv.SchemaURL -) - -// ErrQueueFull is the attribute value for the "queue_full" error type. -var ErrQueueFull = otelconv.SDKProcessorSpanProcessed{}.AttrErrorType( - otelconv.ErrorTypeAttr("queue_full"), -) - -// BSPComponentName returns the component name attribute for a -// BatchSpanProcessor with the given ID. -func BSPComponentName(id int64) attribute.KeyValue { - t := otelconv.ComponentTypeBatchingSpanProcessor - name := fmt.Sprintf("%s/%d", t, id) - return semconv.OTelComponentName(name) -} - -// BSP is the instrumentation for an OTel SDK BatchSpanProcessor. -type BSP struct { - reg metric.Registration - - processed metric.Int64Counter - processedOpts []metric.AddOption - processedQueueFullOpts []metric.AddOption -} - -func NewBSP(id int64, qLen func() int64, qMax int64) (*BSP, error) { - if !x.Observability.Enabled() { - return nil, nil - } - - meter := otel.GetMeterProvider().Meter( - ScopeName, - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(SchemaURL), - ) - - qCap, err := otelconv.NewSDKProcessorSpanQueueCapacity(meter) - if err != nil { - err = fmt.Errorf("failed to create BSP queue capacity metric: %w", err) - } - qCapInst := qCap.Inst() - - qSize, e := otelconv.NewSDKProcessorSpanQueueSize(meter) - if e != nil { - e := fmt.Errorf("failed to create BSP queue size metric: %w", e) - err = errors.Join(err, e) - } - qSizeInst := qSize.Inst() - - cmpntT := semconv.OTelComponentTypeBatchingSpanProcessor - cmpnt := BSPComponentName(id) - set := attribute.NewSet(cmpnt, cmpntT) - - obsOpts := []metric.ObserveOption{metric.WithAttributeSet(set)} - reg, e := meter.RegisterCallback( - func(_ context.Context, o metric.Observer) error { - o.ObserveInt64(qSizeInst, qLen(), obsOpts...) - o.ObserveInt64(qCapInst, qMax, obsOpts...) - return nil - }, - qSizeInst, - qCapInst, - ) - if e != nil { - e := fmt.Errorf("failed to register BSP queue size/capacity callback: %w", e) - err = errors.Join(err, e) - } - - processed, e := otelconv.NewSDKProcessorSpanProcessed(meter) - if e != nil { - e := fmt.Errorf("failed to create BSP processed spans metric: %w", e) - err = errors.Join(err, e) - } - processedOpts := []metric.AddOption{metric.WithAttributeSet(set)} - - set = attribute.NewSet(cmpnt, cmpntT, ErrQueueFull) - processedQueueFullOpts := []metric.AddOption{metric.WithAttributeSet(set)} - - return &BSP{ - reg: reg, - processed: processed.Inst(), - processedOpts: processedOpts, - processedQueueFullOpts: processedQueueFullOpts, - }, err -} - -func (b *BSP) Shutdown() error { return b.reg.Unregister() } - -func (b *BSP) Processed(ctx context.Context, n int64) { - b.processed.Add(ctx, n, b.processedOpts...) -} - -func (b *BSP) ProcessedQueueFull(ctx context.Context, n int64) { - b.processed.Add(ctx, n, b.processedQueueFullOpts...) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go deleted file mode 100644 index b542121e6a..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package observ provides observability instrumentation for the OTel trace SDK -// package. -package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go deleted file mode 100644 index 7d33870613..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/simple_span_processor.go +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" - -import ( - "context" - "fmt" - "sync" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk" - "go.opentelemetry.io/otel/sdk/internal/x" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" -) - -var measureAttrsPool = sync.Pool{ - New: func() any { - // "component.name" + "component.type" + "error.type" - const n = 1 + 1 + 1 - s := make([]attribute.KeyValue, 0, n) - // Return a pointer to a slice instead of a slice itself - // to avoid allocations on every call. - return &s - }, -} - -// SSP is the instrumentation for an OTel SDK SimpleSpanProcessor. -type SSP struct { - spansProcessedCounter metric.Int64Counter - addOpts []metric.AddOption - attrs []attribute.KeyValue -} - -// SSPComponentName returns the component name attribute for a -// SimpleSpanProcessor with the given ID. -func SSPComponentName(id int64) attribute.KeyValue { - t := otelconv.ComponentTypeSimpleSpanProcessor - name := fmt.Sprintf("%s/%d", t, id) - return semconv.OTelComponentName(name) -} - -// NewSSP returns instrumentation for an OTel SDK SimpleSpanProcessor with the -// provided ID. -// -// If the experimental observability is disabled, nil is returned. -func NewSSP(id int64) (*SSP, error) { - if !x.Observability.Enabled() { - return nil, nil - } - - meter := otel.GetMeterProvider().Meter( - ScopeName, - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(SchemaURL), - ) - spansProcessedCounter, err := otelconv.NewSDKProcessorSpanProcessed(meter) - if err != nil { - err = fmt.Errorf("failed to create SSP processed spans metric: %w", err) - } - - componentName := SSPComponentName(id) - componentType := spansProcessedCounter.AttrComponentType(otelconv.ComponentTypeSimpleSpanProcessor) - attrs := []attribute.KeyValue{componentName, componentType} - addOpts := []metric.AddOption{metric.WithAttributeSet(attribute.NewSet(attrs...))} - - return &SSP{ - spansProcessedCounter: spansProcessedCounter.Inst(), - addOpts: addOpts, - attrs: attrs, - }, err -} - -// SpanProcessed records that a span has been processed by the SimpleSpanProcessor. -// If err is non-nil, it records the processing error as an attribute. -func (ssp *SSP) SpanProcessed(ctx context.Context, err error) { - ssp.spansProcessedCounter.Add(ctx, 1, ssp.addOption(err)...) -} - -func (ssp *SSP) addOption(err error) []metric.AddOption { - if err == nil { - return ssp.addOpts - } - attrs := measureAttrsPool.Get().(*[]attribute.KeyValue) - defer func() { - *attrs = (*attrs)[:0] // reset the slice for reuse - measureAttrsPool.Put(attrs) - }() - *attrs = append(*attrs, ssp.attrs...) - *attrs = append(*attrs, semconv.ErrorType(err)) - // Do not inefficiently make a copy of attrs by using - // WithAttributes instead of WithAttributeSet. - return []metric.AddOption{metric.WithAttributeSet(attribute.NewSet(*attrs...))} -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go deleted file mode 100644 index a8a1645898..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/internal/observ/tracer.go +++ /dev/null @@ -1,223 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package observ // import "go.opentelemetry.io/otel/sdk/trace/internal/observ" - -import ( - "context" - "errors" - "fmt" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/sdk" - "go.opentelemetry.io/otel/sdk/internal/x" - "go.opentelemetry.io/otel/semconv/v1.37.0/otelconv" - "go.opentelemetry.io/otel/trace" -) - -var meterOpts = []metric.MeterOption{ - metric.WithInstrumentationVersion(sdk.Version()), - metric.WithSchemaURL(SchemaURL), -} - -// Tracer is instrumentation for an OTel SDK Tracer. -type Tracer struct { - enabled bool - - live metric.Int64UpDownCounter - started metric.Int64Counter -} - -func NewTracer() (Tracer, error) { - if !x.Observability.Enabled() { - return Tracer{}, nil - } - meter := otel.GetMeterProvider().Meter(ScopeName, meterOpts...) - - var err error - l, e := otelconv.NewSDKSpanLive(meter) - if e != nil { - e = fmt.Errorf("failed to create span live metric: %w", e) - err = errors.Join(err, e) - } - - s, e := otelconv.NewSDKSpanStarted(meter) - if e != nil { - e = fmt.Errorf("failed to create span started metric: %w", e) - err = errors.Join(err, e) - } - - return Tracer{enabled: true, live: l.Inst(), started: s.Inst()}, err -} - -func (t Tracer) Enabled() bool { return t.enabled } - -func (t Tracer) SpanStarted(ctx context.Context, psc trace.SpanContext, span trace.Span) { - key := spanStartedKey{ - parent: parentStateNoParent, - sampling: samplingStateDrop, - } - - if psc.IsValid() { - if psc.IsRemote() { - key.parent = parentStateRemoteParent - } else { - key.parent = parentStateLocalParent - } - } - - if span.IsRecording() { - if span.SpanContext().IsSampled() { - key.sampling = samplingStateRecordAndSample - } else { - key.sampling = samplingStateRecordOnly - } - } - - opts := spanStartedOpts[key] - t.started.Add(ctx, 1, opts...) -} - -func (t Tracer) SpanLive(ctx context.Context, span trace.Span) { - t.spanLive(ctx, 1, span) -} - -func (t Tracer) SpanEnded(ctx context.Context, span trace.Span) { - t.spanLive(ctx, -1, span) -} - -func (t Tracer) spanLive(ctx context.Context, value int64, span trace.Span) { - key := spanLiveKey{sampled: span.SpanContext().IsSampled()} - opts := spanLiveOpts[key] - t.live.Add(ctx, value, opts...) -} - -type parentState int - -const ( - parentStateNoParent parentState = iota - parentStateLocalParent - parentStateRemoteParent -) - -type samplingState int - -const ( - samplingStateDrop samplingState = iota - samplingStateRecordOnly - samplingStateRecordAndSample -) - -type spanStartedKey struct { - parent parentState - sampling samplingState -} - -var spanStartedOpts = map[spanStartedKey][]metric.AddOption{ - { - parentStateNoParent, - samplingStateDrop, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - )), - }, - { - parentStateLocalParent, - samplingStateDrop, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - )), - }, - { - parentStateRemoteParent, - samplingStateDrop, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultDrop), - )), - }, - - { - parentStateNoParent, - samplingStateRecordOnly, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - )), - }, - { - parentStateLocalParent, - samplingStateRecordOnly, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - )), - }, - { - parentStateRemoteParent, - samplingStateRecordOnly, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordOnly), - )), - }, - - { - parentStateNoParent, - samplingStateRecordAndSample, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginNone), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - )), - }, - { - parentStateLocalParent, - samplingStateRecordAndSample, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginLocal), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - )), - }, - { - parentStateRemoteParent, - samplingStateRecordAndSample, - }: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanStarted{}.AttrSpanParentOrigin(otelconv.SpanParentOriginRemote), - otelconv.SDKSpanStarted{}.AttrSpanSamplingResult(otelconv.SpanSamplingResultRecordAndSample), - )), - }, -} - -type spanLiveKey struct { - sampled bool -} - -var spanLiveOpts = map[spanLiveKey][]metric.AddOption{ - {true}: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordAndSample, - ), - )), - }, - {false}: { - metric.WithAttributeSet(attribute.NewSet( - otelconv.SDKSpanLive{}.AttrSpanSamplingResult( - otelconv.SpanSamplingResultRecordOnly, - ), - )), - }, -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/link.go b/vendor/go.opentelemetry.io/otel/sdk/trace/link.go deleted file mode 100644 index c03bdc90f6..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/link.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// Link is the relationship between two Spans. The relationship can be within -// the same Trace or across different Traces. -type Link struct { - // SpanContext of the linked Span. - SpanContext trace.SpanContext - - // Attributes describe the aspects of the link. - Attributes []attribute.KeyValue - - // DroppedAttributeCount is the number of attributes that were not - // recorded due to configured limits being reached. - DroppedAttributeCount int -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go b/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go deleted file mode 100644 index d2cf4ebd3e..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/provider.go +++ /dev/null @@ -1,510 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "fmt" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/resource" - "go.opentelemetry.io/otel/sdk/trace/internal/observ" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/embedded" - "go.opentelemetry.io/otel/trace/noop" -) - -const defaultTracerName = "go.opentelemetry.io/otel/sdk/tracer" - -// tracerProviderConfig. -type tracerProviderConfig struct { - // processors contains collection of SpanProcessors that are processing pipeline - // for spans in the trace signal. - // SpanProcessors registered with a TracerProvider and are called at the start - // and end of a Span's lifecycle, and are called in the order they are - // registered. - processors []SpanProcessor - - // sampler is the default sampler used when creating new spans. - sampler Sampler - - // idGenerator is used to generate all Span and Trace IDs when needed. - idGenerator IDGenerator - - // spanLimits defines the attribute, event, and link limits for spans. - spanLimits SpanLimits - - // resource contains attributes representing an entity that produces telemetry. - resource *resource.Resource -} - -// MarshalLog is the marshaling function used by the logging system to represent this Provider. -func (cfg tracerProviderConfig) MarshalLog() any { - return struct { - SpanProcessors []SpanProcessor - SamplerType string - IDGeneratorType string - SpanLimits SpanLimits - Resource *resource.Resource - }{ - SpanProcessors: cfg.processors, - SamplerType: fmt.Sprintf("%T", cfg.sampler), - IDGeneratorType: fmt.Sprintf("%T", cfg.idGenerator), - SpanLimits: cfg.spanLimits, - Resource: cfg.resource, - } -} - -// TracerProvider is an OpenTelemetry TracerProvider. It provides Tracers to -// instrumentation so it can trace operational flow through a system. -type TracerProvider struct { - embedded.TracerProvider - - mu sync.Mutex - namedTracer map[instrumentation.Scope]*tracer - spanProcessors atomic.Pointer[spanProcessorStates] - - isShutdown atomic.Bool - - // These fields are not protected by the lock mu. They are assumed to be - // immutable after creation of the TracerProvider. - sampler Sampler - idGenerator IDGenerator - spanLimits SpanLimits - resource *resource.Resource -} - -var _ trace.TracerProvider = &TracerProvider{} - -// NewTracerProvider returns a new and configured TracerProvider. -// -// By default the returned TracerProvider is configured with: -// - a ParentBased(AlwaysSample) Sampler -// - a random number IDGenerator -// - the resource.Default() Resource -// - the default SpanLimits. -// -// The passed opts are used to override these default values and configure the -// returned TracerProvider appropriately. -func NewTracerProvider(opts ...TracerProviderOption) *TracerProvider { - o := tracerProviderConfig{ - spanLimits: NewSpanLimits(), - } - o = applyTracerProviderEnvConfigs(o) - - for _, opt := range opts { - o = opt.apply(o) - } - - o = ensureValidTracerProviderConfig(o) - - tp := &TracerProvider{ - namedTracer: make(map[instrumentation.Scope]*tracer), - sampler: o.sampler, - idGenerator: o.idGenerator, - spanLimits: o.spanLimits, - resource: o.resource, - } - global.Info("TracerProvider created", "config", o) - - spss := make(spanProcessorStates, 0, len(o.processors)) - for _, sp := range o.processors { - spss = append(spss, newSpanProcessorState(sp)) - } - tp.spanProcessors.Store(&spss) - - return tp -} - -// Tracer returns a Tracer with the given name and options. If a Tracer for -// the given name and options does not exist it is created, otherwise the -// existing Tracer is returned. -// -// If name is empty, DefaultTracerName is used instead. -// -// This method is safe to be called concurrently. -func (p *TracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - // This check happens before the mutex is acquired to avoid deadlocking if Tracer() is called from within Shutdown(). - if p.isShutdown.Load() { - return noop.NewTracerProvider().Tracer(name, opts...) - } - c := trace.NewTracerConfig(opts...) - if name == "" { - name = defaultTracerName - } - is := instrumentation.Scope{ - Name: name, - Version: c.InstrumentationVersion(), - SchemaURL: c.SchemaURL(), - Attributes: c.InstrumentationAttributes(), - } - - t, ok := func() (trace.Tracer, bool) { - p.mu.Lock() - defer p.mu.Unlock() - // Must check the flag after acquiring the mutex to avoid returning a valid tracer if Shutdown() ran - // after the first check above but before we acquired the mutex. - if p.isShutdown.Load() { - return noop.NewTracerProvider().Tracer(name, opts...), true - } - t, ok := p.namedTracer[is] - if !ok { - t = &tracer{ - provider: p, - instrumentationScope: is, - } - - var err error - t.inst, err = observ.NewTracer() - if err != nil { - otel.Handle(err) - } - - p.namedTracer[is] = t - } - return t, ok - }() - if !ok { - // This code is outside the mutex to not hold the lock while calling third party logging code: - // - That code may do slow things like I/O, which would prolong the duration the lock is held, - // slowing down all tracing consumers. - // - Logging code may be instrumented with tracing and deadlock because it could try - // acquiring the same non-reentrant mutex. - global.Info( - "Tracer created", - "name", - name, - "version", - is.Version, - "schemaURL", - is.SchemaURL, - "attributes", - is.Attributes, - ) - } - return t -} - -// RegisterSpanProcessor adds the given SpanProcessor to the list of SpanProcessors. -func (p *TracerProvider) RegisterSpanProcessor(sp SpanProcessor) { - // This check prevents calls during a shutdown. - if p.isShutdown.Load() { - return - } - p.mu.Lock() - defer p.mu.Unlock() - // This check prevents calls after a shutdown. - if p.isShutdown.Load() { - return - } - - current := p.getSpanProcessors() - newSPS := make(spanProcessorStates, 0, len(current)+1) - newSPS = append(newSPS, current...) - newSPS = append(newSPS, newSpanProcessorState(sp)) - p.spanProcessors.Store(&newSPS) -} - -// UnregisterSpanProcessor removes the given SpanProcessor from the list of SpanProcessors. -func (p *TracerProvider) UnregisterSpanProcessor(sp SpanProcessor) { - // This check prevents calls during a shutdown. - if p.isShutdown.Load() { - return - } - p.mu.Lock() - defer p.mu.Unlock() - // This check prevents calls after a shutdown. - if p.isShutdown.Load() { - return - } - old := p.getSpanProcessors() - if len(old) == 0 { - return - } - spss := make(spanProcessorStates, len(old)) - copy(spss, old) - - // stop the span processor if it is started and remove it from the list - var stopOnce *spanProcessorState - var idx int - for i, sps := range spss { - if sps.sp == sp { - stopOnce = sps - idx = i - } - } - if stopOnce != nil { - stopOnce.state.Do(func() { - if err := sp.Shutdown(context.Background()); err != nil { - otel.Handle(err) - } - }) - } - if len(spss) > 1 { - copy(spss[idx:], spss[idx+1:]) - } - spss[len(spss)-1] = nil - spss = spss[:len(spss)-1] - - p.spanProcessors.Store(&spss) -} - -// ForceFlush immediately exports all spans that have not yet been exported for -// all the registered span processors. -func (p *TracerProvider) ForceFlush(ctx context.Context) error { - spss := p.getSpanProcessors() - if len(spss) == 0 { - return nil - } - - for _, sps := range spss { - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - if err := sps.sp.ForceFlush(ctx); err != nil { - return err - } - } - return nil -} - -// Shutdown shuts down TracerProvider. All registered span processors are shut down -// in the order they were registered and any held computational resources are released. -// After Shutdown is called, all methods are no-ops. -func (p *TracerProvider) Shutdown(ctx context.Context) error { - // This check prevents deadlocks in case of recursive shutdown. - if p.isShutdown.Load() { - return nil - } - p.mu.Lock() - defer p.mu.Unlock() - // This check prevents calls after a shutdown has already been done concurrently. - if !p.isShutdown.CompareAndSwap(false, true) { // did toggle? - return nil - } - - var retErr error - for _, sps := range p.getSpanProcessors() { - select { - case <-ctx.Done(): - return ctx.Err() - default: - } - - var err error - sps.state.Do(func() { - err = sps.sp.Shutdown(ctx) - }) - if err != nil { - if retErr == nil { - retErr = err - } else { - // Poor man's list of errors - retErr = fmt.Errorf("%w; %w", retErr, err) - } - } - } - p.spanProcessors.Store(&spanProcessorStates{}) - return retErr -} - -func (p *TracerProvider) getSpanProcessors() spanProcessorStates { - return *(p.spanProcessors.Load()) -} - -// TracerProviderOption configures a TracerProvider. -type TracerProviderOption interface { - apply(tracerProviderConfig) tracerProviderConfig -} - -type traceProviderOptionFunc func(tracerProviderConfig) tracerProviderConfig - -func (fn traceProviderOptionFunc) apply(cfg tracerProviderConfig) tracerProviderConfig { - return fn(cfg) -} - -// WithSyncer registers the exporter with the TracerProvider using a -// SimpleSpanProcessor. -// -// This is not recommended for production use. The synchronous nature of the -// SimpleSpanProcessor that will wrap the exporter make it good for testing, -// debugging, or showing examples of other feature, but it will be slow and -// have a high computation resource usage overhead. The WithBatcher option is -// recommended for production use instead. -func WithSyncer(e SpanExporter) TracerProviderOption { - return WithSpanProcessor(NewSimpleSpanProcessor(e)) -} - -// WithBatcher registers the exporter with the TracerProvider using a -// BatchSpanProcessor configured with the passed opts. -func WithBatcher(e SpanExporter, opts ...BatchSpanProcessorOption) TracerProviderOption { - return WithSpanProcessor(NewBatchSpanProcessor(e, opts...)) -} - -// WithSpanProcessor registers the SpanProcessor with a TracerProvider. -func WithSpanProcessor(sp SpanProcessor) TracerProviderOption { - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - cfg.processors = append(cfg.processors, sp) - return cfg - }) -} - -// WithResource returns a TracerProviderOption that will configure the -// Resource r as a TracerProvider's Resource. The configured Resource is -// referenced by all the Tracers the TracerProvider creates. It represents the -// entity producing telemetry. -// -// If this option is not used, the TracerProvider will use the -// resource.Default() Resource by default. -func WithResource(r *resource.Resource) TracerProviderOption { - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - var err error - cfg.resource, err = resource.Merge(resource.Environment(), r) - if err != nil { - otel.Handle(err) - } - return cfg - }) -} - -// WithIDGenerator returns a TracerProviderOption that will configure the -// IDGenerator g as a TracerProvider's IDGenerator. The configured IDGenerator -// is used by the Tracers the TracerProvider creates to generate new Span and -// Trace IDs. -// -// If this option is not used, the TracerProvider will use a random number -// IDGenerator by default. -func WithIDGenerator(g IDGenerator) TracerProviderOption { - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - if g != nil { - cfg.idGenerator = g - } - return cfg - }) -} - -// WithSampler returns a TracerProviderOption that will configure the Sampler -// s as a TracerProvider's Sampler. The configured Sampler is used by the -// Tracers the TracerProvider creates to make their sampling decisions for the -// Spans they create. -// -// This option overrides the Sampler configured through the OTEL_TRACES_SAMPLER -// and OTEL_TRACES_SAMPLER_ARG environment variables. If this option is not used -// and the sampler is not configured through environment variables or the environment -// contains invalid/unsupported configuration, the TracerProvider will use a -// ParentBased(AlwaysSample) Sampler by default. -func WithSampler(s Sampler) TracerProviderOption { - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - if s != nil { - cfg.sampler = s - } - return cfg - }) -} - -// WithSpanLimits returns a TracerProviderOption that configures a -// TracerProvider to use the SpanLimits sl. These SpanLimits bound any Span -// created by a Tracer from the TracerProvider. -// -// If any field of sl is zero or negative it will be replaced with the default -// value for that field. -// -// If this or WithRawSpanLimits are not provided, the TracerProvider will use -// the limits defined by environment variables, or the defaults if unset. -// Refer to the NewSpanLimits documentation for information about this -// relationship. -// -// Deprecated: Use WithRawSpanLimits instead which allows setting unlimited -// and zero limits. This option will be kept until the next major version -// incremented release. -func WithSpanLimits(sl SpanLimits) TracerProviderOption { - if sl.AttributeValueLengthLimit <= 0 { - sl.AttributeValueLengthLimit = DefaultAttributeValueLengthLimit - } - if sl.AttributeCountLimit <= 0 { - sl.AttributeCountLimit = DefaultAttributeCountLimit - } - if sl.EventCountLimit <= 0 { - sl.EventCountLimit = DefaultEventCountLimit - } - if sl.AttributePerEventCountLimit <= 0 { - sl.AttributePerEventCountLimit = DefaultAttributePerEventCountLimit - } - if sl.LinkCountLimit <= 0 { - sl.LinkCountLimit = DefaultLinkCountLimit - } - if sl.AttributePerLinkCountLimit <= 0 { - sl.AttributePerLinkCountLimit = DefaultAttributePerLinkCountLimit - } - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - cfg.spanLimits = sl - return cfg - }) -} - -// WithRawSpanLimits returns a TracerProviderOption that configures a -// TracerProvider to use these limits. These limits bound any Span created by -// a Tracer from the TracerProvider. -// -// The limits will be used as-is. Zero or negative values will not be changed -// to the default value like WithSpanLimits does. Setting a limit to zero will -// effectively disable the related resource it limits and setting to a -// negative value will mean that resource is unlimited. Consequentially, this -// means that the zero-value SpanLimits will disable all span resources. -// Because of this, limits should be constructed using NewSpanLimits and -// updated accordingly. -// -// If this or WithSpanLimits are not provided, the TracerProvider will use the -// limits defined by environment variables, or the defaults if unset. Refer to -// the NewSpanLimits documentation for information about this relationship. -func WithRawSpanLimits(limits SpanLimits) TracerProviderOption { - return traceProviderOptionFunc(func(cfg tracerProviderConfig) tracerProviderConfig { - cfg.spanLimits = limits - return cfg - }) -} - -func applyTracerProviderEnvConfigs(cfg tracerProviderConfig) tracerProviderConfig { - for _, opt := range tracerProviderOptionsFromEnv() { - cfg = opt.apply(cfg) - } - - return cfg -} - -func tracerProviderOptionsFromEnv() []TracerProviderOption { - var opts []TracerProviderOption - - sampler, err := samplerFromEnv() - if err != nil { - otel.Handle(err) - } - - if sampler != nil { - opts = append(opts, WithSampler(sampler)) - } - - return opts -} - -// ensureValidTracerProviderConfig ensures that given TracerProviderConfig is valid. -func ensureValidTracerProviderConfig(cfg tracerProviderConfig) tracerProviderConfig { - if cfg.sampler == nil { - cfg.sampler = ParentBased(AlwaysSample()) - } - if cfg.idGenerator == nil { - cfg.idGenerator = defaultIDGenerator() - } - if cfg.resource == nil { - cfg.resource = resource.Default() - } - return cfg -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go deleted file mode 100644 index 9b672a1d70..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampler_env.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "errors" - "os" - "strconv" - "strings" -) - -const ( - tracesSamplerKey = "OTEL_TRACES_SAMPLER" - tracesSamplerArgKey = "OTEL_TRACES_SAMPLER_ARG" - - samplerAlwaysOn = "always_on" - samplerAlwaysOff = "always_off" - samplerTraceIDRatio = "traceidratio" - samplerParentBasedAlwaysOn = "parentbased_always_on" - samplerParsedBasedAlwaysOff = "parentbased_always_off" - samplerParentBasedTraceIDRatio = "parentbased_traceidratio" -) - -type errUnsupportedSampler string - -func (e errUnsupportedSampler) Error() string { - return "unsupported sampler: " + string(e) -} - -var ( - errNegativeTraceIDRatio = errors.New("invalid trace ID ratio: less than 0.0") - errGreaterThanOneTraceIDRatio = errors.New("invalid trace ID ratio: greater than 1.0") -) - -type samplerArgParseError struct { - parseErr error -} - -func (e samplerArgParseError) Error() string { - return "parsing sampler argument: " + e.parseErr.Error() -} - -func (e samplerArgParseError) Unwrap() error { - return e.parseErr -} - -func samplerFromEnv() (Sampler, error) { - sampler, ok := os.LookupEnv(tracesSamplerKey) - if !ok { - return nil, nil - } - - sampler = strings.ToLower(strings.TrimSpace(sampler)) - samplerArg, hasSamplerArg := os.LookupEnv(tracesSamplerArgKey) - samplerArg = strings.TrimSpace(samplerArg) - - switch sampler { - case samplerAlwaysOn: - return AlwaysSample(), nil - case samplerAlwaysOff: - return NeverSample(), nil - case samplerTraceIDRatio: - if !hasSamplerArg { - return TraceIDRatioBased(1.0), nil - } - return parseTraceIDRatio(samplerArg) - case samplerParentBasedAlwaysOn: - return ParentBased(AlwaysSample()), nil - case samplerParsedBasedAlwaysOff: - return ParentBased(NeverSample()), nil - case samplerParentBasedTraceIDRatio: - if !hasSamplerArg { - return ParentBased(TraceIDRatioBased(1.0)), nil - } - ratio, err := parseTraceIDRatio(samplerArg) - return ParentBased(ratio), err - default: - return nil, errUnsupportedSampler(sampler) - } -} - -func parseTraceIDRatio(arg string) (Sampler, error) { - v, err := strconv.ParseFloat(arg, 64) - if err != nil { - return TraceIDRatioBased(1.0), samplerArgParseError{err} - } - if v < 0.0 { - return TraceIDRatioBased(1.0), errNegativeTraceIDRatio - } - if v > 1.0 { - return TraceIDRatioBased(1.0), errGreaterThanOneTraceIDRatio - } - - return TraceIDRatioBased(v), nil -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go b/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go deleted file mode 100644 index 689663d48b..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/sampling.go +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "encoding/binary" - "fmt" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -// Sampler decides whether a trace should be sampled and exported. -type Sampler interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // ShouldSample returns a SamplingResult based on a decision made from the - // passed parameters. - ShouldSample(parameters SamplingParameters) SamplingResult - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Description returns information describing the Sampler. - Description() string - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -// SamplingParameters contains the values passed to a Sampler. -type SamplingParameters struct { - ParentContext context.Context - TraceID trace.TraceID - Name string - Kind trace.SpanKind - Attributes []attribute.KeyValue - Links []trace.Link -} - -// SamplingDecision indicates whether a span is dropped, recorded and/or sampled. -type SamplingDecision uint8 - -// Valid sampling decisions. -const ( - // Drop will not record the span and all attributes/events will be dropped. - Drop SamplingDecision = iota - - // RecordOnly indicates the span's IsRecording method returns true, but trace.FlagsSampled flag - // must not be set. - RecordOnly - - // RecordAndSample indicates the span's IsRecording method returns true and trace.FlagsSampled flag - // must be set. - RecordAndSample -) - -// SamplingResult conveys a SamplingDecision, set of Attributes and a Tracestate. -type SamplingResult struct { - Decision SamplingDecision - Attributes []attribute.KeyValue - Tracestate trace.TraceState -} - -type traceIDRatioSampler struct { - traceIDUpperBound uint64 - description string -} - -func (ts traceIDRatioSampler) ShouldSample(p SamplingParameters) SamplingResult { - psc := trace.SpanContextFromContext(p.ParentContext) - x := binary.BigEndian.Uint64(p.TraceID[8:16]) >> 1 - if x < ts.traceIDUpperBound { - return SamplingResult{ - Decision: RecordAndSample, - Tracestate: psc.TraceState(), - } - } - return SamplingResult{ - Decision: Drop, - Tracestate: psc.TraceState(), - } -} - -func (ts traceIDRatioSampler) Description() string { - return ts.description -} - -// TraceIDRatioBased samples a given fraction of traces. Fractions >= 1 will -// always sample. Fractions < 0 are treated as zero. To respect the -// parent trace's `SampledFlag`, the `TraceIDRatioBased` sampler should be used -// as a delegate of a `Parent` sampler. -// -//nolint:revive // revive complains about stutter of `trace.TraceIDRatioBased` -func TraceIDRatioBased(fraction float64) Sampler { - if fraction >= 1 { - return AlwaysSample() - } - - if fraction <= 0 { - fraction = 0 - } - - return &traceIDRatioSampler{ - traceIDUpperBound: uint64(fraction * (1 << 63)), - description: fmt.Sprintf("TraceIDRatioBased{%g}", fraction), - } -} - -type alwaysOnSampler struct{} - -func (alwaysOnSampler) ShouldSample(p SamplingParameters) SamplingResult { - return SamplingResult{ - Decision: RecordAndSample, - Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(), - } -} - -func (alwaysOnSampler) Description() string { - return "AlwaysOnSampler" -} - -// AlwaysSample returns a Sampler that samples every trace. -// Be careful about using this sampler in a production application with -// significant traffic: a new trace will be started and exported for every -// request. -func AlwaysSample() Sampler { - return alwaysOnSampler{} -} - -type alwaysOffSampler struct{} - -func (alwaysOffSampler) ShouldSample(p SamplingParameters) SamplingResult { - return SamplingResult{ - Decision: Drop, - Tracestate: trace.SpanContextFromContext(p.ParentContext).TraceState(), - } -} - -func (alwaysOffSampler) Description() string { - return "AlwaysOffSampler" -} - -// NeverSample returns a Sampler that samples no traces. -func NeverSample() Sampler { - return alwaysOffSampler{} -} - -// ParentBased returns a sampler decorator which behaves differently, -// based on the parent of the span. If the span has no parent, -// the decorated sampler is used to make sampling decision. If the span has -// a parent, depending on whether the parent is remote and whether it -// is sampled, one of the following samplers will apply: -// - remoteParentSampled(Sampler) (default: AlwaysOn) -// - remoteParentNotSampled(Sampler) (default: AlwaysOff) -// - localParentSampled(Sampler) (default: AlwaysOn) -// - localParentNotSampled(Sampler) (default: AlwaysOff) -func ParentBased(root Sampler, samplers ...ParentBasedSamplerOption) Sampler { - return parentBased{ - root: root, - config: configureSamplersForParentBased(samplers), - } -} - -type parentBased struct { - root Sampler - config samplerConfig -} - -func configureSamplersForParentBased(samplers []ParentBasedSamplerOption) samplerConfig { - c := samplerConfig{ - remoteParentSampled: AlwaysSample(), - remoteParentNotSampled: NeverSample(), - localParentSampled: AlwaysSample(), - localParentNotSampled: NeverSample(), - } - - for _, so := range samplers { - c = so.apply(c) - } - - return c -} - -// samplerConfig is a group of options for parentBased sampler. -type samplerConfig struct { - remoteParentSampled, remoteParentNotSampled Sampler - localParentSampled, localParentNotSampled Sampler -} - -// ParentBasedSamplerOption configures the sampler for a particular sampling case. -type ParentBasedSamplerOption interface { - apply(samplerConfig) samplerConfig -} - -// WithRemoteParentSampled sets the sampler for the case of sampled remote parent. -func WithRemoteParentSampled(s Sampler) ParentBasedSamplerOption { - return remoteParentSampledOption{s} -} - -type remoteParentSampledOption struct { - s Sampler -} - -func (o remoteParentSampledOption) apply(config samplerConfig) samplerConfig { - config.remoteParentSampled = o.s - return config -} - -// WithRemoteParentNotSampled sets the sampler for the case of remote parent -// which is not sampled. -func WithRemoteParentNotSampled(s Sampler) ParentBasedSamplerOption { - return remoteParentNotSampledOption{s} -} - -type remoteParentNotSampledOption struct { - s Sampler -} - -func (o remoteParentNotSampledOption) apply(config samplerConfig) samplerConfig { - config.remoteParentNotSampled = o.s - return config -} - -// WithLocalParentSampled sets the sampler for the case of sampled local parent. -func WithLocalParentSampled(s Sampler) ParentBasedSamplerOption { - return localParentSampledOption{s} -} - -type localParentSampledOption struct { - s Sampler -} - -func (o localParentSampledOption) apply(config samplerConfig) samplerConfig { - config.localParentSampled = o.s - return config -} - -// WithLocalParentNotSampled sets the sampler for the case of local parent -// which is not sampled. -func WithLocalParentNotSampled(s Sampler) ParentBasedSamplerOption { - return localParentNotSampledOption{s} -} - -type localParentNotSampledOption struct { - s Sampler -} - -func (o localParentNotSampledOption) apply(config samplerConfig) samplerConfig { - config.localParentNotSampled = o.s - return config -} - -func (pb parentBased) ShouldSample(p SamplingParameters) SamplingResult { - psc := trace.SpanContextFromContext(p.ParentContext) - if psc.IsValid() { - if psc.IsRemote() { - if psc.IsSampled() { - return pb.config.remoteParentSampled.ShouldSample(p) - } - return pb.config.remoteParentNotSampled.ShouldSample(p) - } - - if psc.IsSampled() { - return pb.config.localParentSampled.ShouldSample(p) - } - return pb.config.localParentNotSampled.ShouldSample(p) - } - return pb.root.ShouldSample(p) -} - -func (pb parentBased) Description() string { - return fmt.Sprintf("ParentBased{root:%s,remoteParentSampled:%s,"+ - "remoteParentNotSampled:%s,localParentSampled:%s,localParentNotSampled:%s}", - pb.root.Description(), - pb.config.remoteParentSampled.Description(), - pb.config.remoteParentNotSampled.Description(), - pb.config.localParentSampled.Description(), - pb.config.localParentNotSampled.Description(), - ) -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go deleted file mode 100644 index 771e427a4c..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/simple_span_processor.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel" - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/sdk/trace/internal/observ" - "go.opentelemetry.io/otel/trace" -) - -// simpleSpanProcessor is a SpanProcessor that synchronously sends all -// completed Spans to a trace.Exporter immediately. -type simpleSpanProcessor struct { - exporterMu sync.Mutex - exporter SpanExporter - stopOnce sync.Once - - inst *observ.SSP -} - -var _ SpanProcessor = (*simpleSpanProcessor)(nil) - -// NewSimpleSpanProcessor returns a new SpanProcessor that will synchronously -// send completed spans to the exporter immediately. -// -// This SpanProcessor is not recommended for production use. The synchronous -// nature of this SpanProcessor makes it good for testing, debugging, or showing -// examples of other features, but it will be slow and have a high computation -// resource usage overhead. The BatchSpanProcessor is recommended for production -// use instead. -func NewSimpleSpanProcessor(exporter SpanExporter) SpanProcessor { - ssp := &simpleSpanProcessor{ - exporter: exporter, - } - - var err error - ssp.inst, err = observ.NewSSP(nextSimpleProcessorID()) - if err != nil { - otel.Handle(err) - } - - global.Warn("SimpleSpanProcessor is not recommended for production use, consider using BatchSpanProcessor instead.") - - return ssp -} - -var simpleProcessorIDCounter atomic.Int64 - -// nextSimpleProcessorID returns an identifier for this simple span processor, -// starting with 0 and incrementing by 1 each time it is called. -func nextSimpleProcessorID() int64 { - return simpleProcessorIDCounter.Add(1) - 1 -} - -// OnStart does nothing. -func (*simpleSpanProcessor) OnStart(context.Context, ReadWriteSpan) {} - -// OnEnd immediately exports a ReadOnlySpan. -func (ssp *simpleSpanProcessor) OnEnd(s ReadOnlySpan) { - ssp.exporterMu.Lock() - defer ssp.exporterMu.Unlock() - - var err error - if ssp.exporter != nil && s.SpanContext().TraceFlags().IsSampled() { - err = ssp.exporter.ExportSpans(context.Background(), []ReadOnlySpan{s}) - if err != nil { - otel.Handle(err) - } - } - - if ssp.inst != nil { - // Add the span to the context to ensure the metric is recorded - // with the correct span context. - ctx := trace.ContextWithSpanContext(context.Background(), s.SpanContext()) - ssp.inst.SpanProcessed(ctx, err) - } -} - -// Shutdown shuts down the exporter this SimpleSpanProcessor exports to. -func (ssp *simpleSpanProcessor) Shutdown(ctx context.Context) error { - var err error - ssp.stopOnce.Do(func() { - stopFunc := func(exp SpanExporter) (<-chan error, func()) { - done := make(chan error, 1) - return done, func() { done <- exp.Shutdown(ctx) } - } - - // The exporter field of the simpleSpanProcessor needs to be zeroed to - // signal it is shut down, meaning all subsequent calls to OnEnd will - // be gracefully ignored. This needs to be done synchronously to avoid - // any race condition. - // - // A closure is used to keep reference to the exporter and then the - // field is zeroed. This ensures the simpleSpanProcessor is shut down - // before the exporter. This order is important as it avoids a potential - // deadlock. If the exporter shut down operation generates a span, that - // span would need to be exported. Meaning, OnEnd would be called and - // try acquiring the lock that is held here. - ssp.exporterMu.Lock() - done, shutdown := stopFunc(ssp.exporter) - ssp.exporter = nil - ssp.exporterMu.Unlock() - - go shutdown() - - // Wait for the exporter to shut down or the deadline to expire. - select { - case err = <-done: - case <-ctx.Done(): - // It is possible for the exporter to have immediately shut down and - // the context to be done simultaneously. In that case this outer - // select statement will randomly choose a case. This will result in - // a different returned error for similar scenarios. Instead, double - // check if the exporter shut down at the same time and return that - // error if so. This will ensure consistency as well as ensure - // the caller knows the exporter shut down successfully (they can - // already determine if the deadline is expired given they passed - // the context). - select { - case err = <-done: - default: - err = ctx.Err() - } - } - }) - return err -} - -// ForceFlush does nothing as there is no data to flush. -func (*simpleSpanProcessor) ForceFlush(context.Context) error { - return nil -} - -// MarshalLog is the marshaling function used by the logging system to represent -// this Span Processor. -func (ssp *simpleSpanProcessor) MarshalLog() any { - return struct { - Type string - Exporter SpanExporter - }{ - Type: "SimpleSpanProcessor", - Exporter: ssp.exporter, - } -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go b/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go deleted file mode 100644 index 63aa337800..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/snapshot.go +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "time" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/resource" - "go.opentelemetry.io/otel/trace" -) - -// snapshot is an record of a spans state at a particular checkpointed time. -// It is used as a read-only representation of that state. -type snapshot struct { - name string - spanContext trace.SpanContext - parent trace.SpanContext - spanKind trace.SpanKind - startTime time.Time - endTime time.Time - attributes []attribute.KeyValue - events []Event - links []Link - status Status - childSpanCount int - droppedAttributeCount int - droppedEventCount int - droppedLinkCount int - resource *resource.Resource - instrumentationScope instrumentation.Scope -} - -var _ ReadOnlySpan = snapshot{} - -func (snapshot) private() {} - -// Name returns the name of the span. -func (s snapshot) Name() string { - return s.name -} - -// SpanContext returns the unique SpanContext that identifies the span. -func (s snapshot) SpanContext() trace.SpanContext { - return s.spanContext -} - -// Parent returns the unique SpanContext that identifies the parent of the -// span if one exists. If the span has no parent the returned SpanContext -// will be invalid. -func (s snapshot) Parent() trace.SpanContext { - return s.parent -} - -// SpanKind returns the role the span plays in a Trace. -func (s snapshot) SpanKind() trace.SpanKind { - return s.spanKind -} - -// StartTime returns the time the span started recording. -func (s snapshot) StartTime() time.Time { - return s.startTime -} - -// EndTime returns the time the span stopped recording. It will be zero if -// the span has not ended. -func (s snapshot) EndTime() time.Time { - return s.endTime -} - -// Attributes returns the defining attributes of the span. -func (s snapshot) Attributes() []attribute.KeyValue { - return s.attributes -} - -// Links returns all the links the span has to other spans. -func (s snapshot) Links() []Link { - return s.links -} - -// Events returns all the events that occurred within in the spans -// lifetime. -func (s snapshot) Events() []Event { - return s.events -} - -// Status returns the spans status. -func (s snapshot) Status() Status { - return s.status -} - -// InstrumentationScope returns information about the instrumentation -// scope that created the span. -func (s snapshot) InstrumentationScope() instrumentation.Scope { - return s.instrumentationScope -} - -// InstrumentationLibrary returns information about the instrumentation -// library that created the span. -func (s snapshot) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility - return s.instrumentationScope -} - -// Resource returns information about the entity that produced the span. -func (s snapshot) Resource() *resource.Resource { - return s.resource -} - -// DroppedAttributes returns the number of attributes dropped by the span -// due to limits being reached. -func (s snapshot) DroppedAttributes() int { - return s.droppedAttributeCount -} - -// DroppedLinks returns the number of links dropped by the span due to limits -// being reached. -func (s snapshot) DroppedLinks() int { - return s.droppedLinkCount -} - -// DroppedEvents returns the number of events dropped by the span due to -// limits being reached. -func (s snapshot) DroppedEvents() int { - return s.droppedEventCount -} - -// ChildSpanCount returns the count of spans that consider the span a -// direct parent. -func (s snapshot) ChildSpanCount() int { - return s.childSpanCount -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span.go deleted file mode 100644 index 8cfd9f62e3..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span.go +++ /dev/null @@ -1,959 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "fmt" - "reflect" - "runtime" - rt "runtime/trace" - "slices" - "strings" - "sync" - "time" - "unicode/utf8" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/resource" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/embedded" -) - -// ReadOnlySpan allows reading information from the data structure underlying a -// trace.Span. It is used in places where reading information from a span is -// necessary but changing the span isn't necessary or allowed. -// -// Warning: methods may be added to this interface in minor releases. -type ReadOnlySpan interface { - // Name returns the name of the span. - Name() string - // SpanContext returns the unique SpanContext that identifies the span. - SpanContext() trace.SpanContext - // Parent returns the unique SpanContext that identifies the parent of the - // span if one exists. If the span has no parent the returned SpanContext - // will be invalid. - Parent() trace.SpanContext - // SpanKind returns the role the span plays in a Trace. - SpanKind() trace.SpanKind - // StartTime returns the time the span started recording. - StartTime() time.Time - // EndTime returns the time the span stopped recording. It will be zero if - // the span has not ended. - EndTime() time.Time - // Attributes returns the defining attributes of the span. - // The order of the returned attributes is not guaranteed to be stable across invocations. - Attributes() []attribute.KeyValue - // Links returns all the links the span has to other spans. - Links() []Link - // Events returns all the events that occurred within in the spans - // lifetime. - Events() []Event - // Status returns the spans status. - Status() Status - // InstrumentationScope returns information about the instrumentation - // scope that created the span. - InstrumentationScope() instrumentation.Scope - // InstrumentationLibrary returns information about the instrumentation - // library that created the span. - // - // Deprecated: please use InstrumentationScope instead. - InstrumentationLibrary() instrumentation.Library //nolint:staticcheck // This method needs to be define for backwards compatibility - // Resource returns information about the entity that produced the span. - Resource() *resource.Resource - // DroppedAttributes returns the number of attributes dropped by the span - // due to limits being reached. - DroppedAttributes() int - // DroppedLinks returns the number of links dropped by the span due to - // limits being reached. - DroppedLinks() int - // DroppedEvents returns the number of events dropped by the span due to - // limits being reached. - DroppedEvents() int - // ChildSpanCount returns the count of spans that consider the span a - // direct parent. - ChildSpanCount() int - - // A private method to prevent users implementing the - // interface and so future additions to it will not - // violate compatibility. - private() -} - -// ReadWriteSpan exposes the same methods as trace.Span and in addition allows -// reading information from the underlying data structure. -// This interface exposes the union of the methods of trace.Span (which is a -// "write-only" span) and ReadOnlySpan. New methods for writing or reading span -// information should be added under trace.Span or ReadOnlySpan, respectively. -// -// Warning: methods may be added to this interface in minor releases. -type ReadWriteSpan interface { - trace.Span - ReadOnlySpan -} - -// recordingSpan is an implementation of the OpenTelemetry Span API -// representing the individual component of a trace that is sampled. -type recordingSpan struct { - embedded.Span - - // mu protects the contents of this span. - mu sync.Mutex - - // parent holds the parent span of this span as a trace.SpanContext. - parent trace.SpanContext - - // spanKind represents the kind of this span as a trace.SpanKind. - spanKind trace.SpanKind - - // name is the name of this span. - name string - - // startTime is the time at which this span was started. - startTime time.Time - - // endTime is the time at which this span was ended. It contains the zero - // value of time.Time until the span is ended. - endTime time.Time - - // status is the status of this span. - status Status - - // childSpanCount holds the number of child spans created for this span. - childSpanCount int - - // spanContext holds the SpanContext of this span. - spanContext trace.SpanContext - - // attributes is a collection of user provided key/values. The collection - // is constrained by a configurable maximum held by the parent - // TracerProvider. When additional attributes are added after this maximum - // is reached these attributes the user is attempting to add are dropped. - // This dropped number of attributes is tracked and reported in the - // ReadOnlySpan exported when the span ends. - attributes []attribute.KeyValue - droppedAttributes int - logDropAttrsOnce sync.Once - - // events are stored in FIFO queue capped by configured limit. - events evictedQueue[Event] - - // links are stored in FIFO queue capped by configured limit. - links evictedQueue[Link] - - // executionTracerTaskEnd ends the execution tracer span. - executionTracerTaskEnd func() - - // tracer is the SDK tracer that created this span. - tracer *tracer - - // origCtx is the context used when starting this span that has the - // recordingSpan instance set as the active span. If not nil, it is used - // when ending the span to ensure any metrics are recorded with a context - // containing this span without requiring an additional allocation. - origCtx context.Context -} - -var ( - _ ReadWriteSpan = (*recordingSpan)(nil) - _ runtimeTracer = (*recordingSpan)(nil) -) - -func (s *recordingSpan) setOrigCtx(ctx context.Context) { - s.origCtx = ctx -} - -// SpanContext returns the SpanContext of this span. -func (s *recordingSpan) SpanContext() trace.SpanContext { - if s == nil { - return trace.SpanContext{} - } - return s.spanContext -} - -// IsRecording reports whether this span is being recorded. If this span has ended -// this will return false. -func (s *recordingSpan) IsRecording() bool { - if s == nil { - return false - } - s.mu.Lock() - defer s.mu.Unlock() - - return s.isRecording() -} - -// isRecording reports whether this span is being recorded. If this span has ended -// this will return false. -// -// This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) isRecording() bool { - if s == nil { - return false - } - return s.endTime.IsZero() -} - -// SetStatus sets the status of the Span in the form of a code and a -// description, overriding previous values set. The description is only -// included in the set status when the code is for an error. If this span is -// not being recorded than this method does nothing. -func (s *recordingSpan) SetStatus(code codes.Code, description string) { - if s == nil { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - if s.status.Code > code { - return - } - - status := Status{Code: code} - if code == codes.Error { - status.Description = description - } - - s.status = status -} - -// SetAttributes sets attributes of this span. -// -// If a key from attributes already exists the value associated with that key -// will be overwritten with the value contained in attributes. -// -// If this span is not being recorded than this method does nothing. -// -// If adding attributes to the span would exceed the maximum amount of -// attributes the span is configured to have, the last added attributes will -// be dropped. -func (s *recordingSpan) SetAttributes(attributes ...attribute.KeyValue) { - if s == nil || len(attributes) == 0 { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - - limit := s.tracer.provider.spanLimits.AttributeCountLimit - if limit == 0 { - // No attributes allowed. - s.addDroppedAttr(len(attributes)) - return - } - - // If adding these attributes could exceed the capacity of s perform a - // de-duplication and truncation while adding to avoid over allocation. - if limit > 0 && len(s.attributes)+len(attributes) > limit { - s.addOverCapAttrs(limit, attributes) - return - } - - // Otherwise, add without deduplication. When attributes are read they - // will be deduplicated, optimizing the operation. - s.attributes = slices.Grow(s.attributes, len(attributes)) - for _, a := range attributes { - if !a.Valid() { - // Drop all invalid attributes. - s.addDroppedAttr(1) - continue - } - a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) - s.attributes = append(s.attributes, a) - } -} - -// Declared as a var so tests can override. -var logDropAttrs = func() { - global.Warn("limit reached: dropping trace Span attributes") -} - -// addDroppedAttr adds incr to the count of dropped attributes. -// -// The first, and only the first, time this method is called a warning will be -// logged. -// -// This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) addDroppedAttr(incr int) { - s.droppedAttributes += incr - s.logDropAttrsOnce.Do(logDropAttrs) -} - -// addOverCapAttrs adds the attributes attrs to the span s while -// de-duplicating the attributes of s and attrs and dropping attributes that -// exceed the limit. -// -// This method assumes s.mu.Lock is held by the caller. -// -// This method should only be called when there is a possibility that adding -// attrs to s will exceed the limit. Otherwise, attrs should be added to s -// without checking for duplicates and all retrieval methods of the attributes -// for s will de-duplicate as needed. -// -// This method assumes limit is a value > 0. The argument should be validated -// by the caller. -func (s *recordingSpan) addOverCapAttrs(limit int, attrs []attribute.KeyValue) { - // In order to not allocate more capacity to s.attributes than needed, - // prune and truncate this addition of attributes while adding. - - // Do not set a capacity when creating this map. Benchmark testing has - // showed this to only add unused memory allocations in general use. - exists := make(map[attribute.Key]int, len(s.attributes)) - s.dedupeAttrsFromRecord(exists) - - // Now that s.attributes is deduplicated, adding unique attributes up to - // the capacity of s will not over allocate s.attributes. - - // max size = limit - maxCap := min(len(attrs)+len(s.attributes), limit) - if cap(s.attributes) < maxCap { - s.attributes = slices.Grow(s.attributes, maxCap-cap(s.attributes)) - } - for _, a := range attrs { - if !a.Valid() { - // Drop all invalid attributes. - s.addDroppedAttr(1) - continue - } - - if idx, ok := exists[a.Key]; ok { - // Perform all updates before dropping, even when at capacity. - a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) - s.attributes[idx] = a - continue - } - - if len(s.attributes) >= limit { - // Do not just drop all of the remaining attributes, make sure - // updates are checked and performed. - s.addDroppedAttr(1) - } else { - a = truncateAttr(s.tracer.provider.spanLimits.AttributeValueLengthLimit, a) - s.attributes = append(s.attributes, a) - exists[a.Key] = len(s.attributes) - 1 - } - } -} - -// truncateAttr returns a truncated version of attr. Only string and string -// slice attribute values are truncated. String values are truncated to at -// most a length of limit. Each string slice value is truncated in this fashion -// (the slice length itself is unaffected). -// -// No truncation is performed for a negative limit. -func truncateAttr(limit int, attr attribute.KeyValue) attribute.KeyValue { - if limit < 0 { - return attr - } - switch attr.Value.Type() { - case attribute.STRING: - v := attr.Value.AsString() - return attr.Key.String(truncate(limit, v)) - case attribute.STRINGSLICE: - v := attr.Value.AsStringSlice() - for i := range v { - v[i] = truncate(limit, v[i]) - } - return attr.Key.StringSlice(v) - } - return attr -} - -// truncate returns a truncated version of s such that it contains less than -// the limit number of characters. Truncation is applied by returning the limit -// number of valid characters contained in s. -// -// If limit is negative, it returns the original string. -// -// UTF-8 is supported. When truncating, all invalid characters are dropped -// before applying truncation. -// -// If s already contains less than the limit number of bytes, it is returned -// unchanged. No invalid characters are removed. -func truncate(limit int, s string) string { - // This prioritize performance in the following order based on the most - // common expected use-cases. - // - // - Short values less than the default limit (128). - // - Strings with valid encodings that exceed the limit. - // - No limit. - // - Strings with invalid encodings that exceed the limit. - if limit < 0 || len(s) <= limit { - return s - } - - // Optimistically, assume all valid UTF-8. - var b strings.Builder - count := 0 - for i, c := range s { - if c != utf8.RuneError { - count++ - if count > limit { - return s[:i] - } - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // Invalid encoding. - b.Grow(len(s) - 1) - _, _ = b.WriteString(s[:i]) - s = s[i:] - break - } - } - - // Fast-path, no invalid input. - if b.Cap() == 0 { - return s - } - - // Truncate while validating UTF-8. - for i := 0; i < len(s) && count < limit; { - c := s[i] - if c < utf8.RuneSelf { - // Optimization for single byte runes (common case). - _ = b.WriteByte(c) - i++ - count++ - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // We checked for all 1-byte runes above, this is a RuneError. - i++ - continue - } - - _, _ = b.WriteString(s[i : i+size]) - i += size - count++ - } - - return b.String() -} - -// End ends the span. This method does nothing if the span is already ended or -// is not being recorded. -// -// The only SpanEndOption currently supported are [trace.WithTimestamp], and -// [trace.WithStackTrace]. -// -// If this method is called while panicking an error event is added to the -// Span before ending it and the panic is continued. -func (s *recordingSpan) End(options ...trace.SpanEndOption) { - // Do not start by checking if the span is being recorded which requires - // acquiring a lock. Make a minimal check that the span is not nil. - if s == nil { - return - } - - // Store the end time as soon as possible to avoid artificially increasing - // the span's duration in case some operation below takes a while. - et := monotonicEndTime(s.startTime) - - // Lock the span now that we have an end time and see if we need to do any more processing. - s.mu.Lock() - if !s.isRecording() { - s.mu.Unlock() - return - } - - config := trace.NewSpanEndConfig(options...) - if recovered := recover(); recovered != nil { - // Record but don't stop the panic. - defer panic(recovered) - opts := []trace.EventOption{ - trace.WithAttributes( - semconv.ExceptionType(typeStr(recovered)), - semconv.ExceptionMessage(fmt.Sprint(recovered)), - ), - } - - if config.StackTrace() { - opts = append(opts, trace.WithAttributes( - semconv.ExceptionStacktrace(recordStackTrace()), - )) - } - - s.addEvent(semconv.ExceptionEventName, opts...) - } - - if s.executionTracerTaskEnd != nil { - s.mu.Unlock() - s.executionTracerTaskEnd() - s.mu.Lock() - } - - // Setting endTime to non-zero marks the span as ended and not recording. - if config.Timestamp().IsZero() { - s.endTime = et - } else { - s.endTime = config.Timestamp() - } - s.mu.Unlock() - - if s.tracer.inst.Enabled() { - ctx := s.origCtx - if ctx == nil { - // This should not happen as the origCtx should be set, but - // ensure trace information is propagated in the case of an - // error. - ctx = trace.ContextWithSpan(context.Background(), s) - } - defer s.tracer.inst.SpanEnded(ctx, s) - } - - sps := s.tracer.provider.getSpanProcessors() - if len(sps) == 0 { - return - } - snap := s.snapshot() - for _, sp := range sps { - sp.sp.OnEnd(snap) - } -} - -// monotonicEndTime returns the end time at present but offset from start, -// monotonically. -// -// The monotonic clock is used in subtractions hence the duration since start -// added back to start gives end as a monotonic time. See -// https://golang.org/pkg/time/#hdr-Monotonic_Clocks -func monotonicEndTime(start time.Time) time.Time { - return start.Add(time.Since(start)) -} - -// RecordError will record err as a span event for this span. An additional call to -// SetStatus is required if the Status of the Span should be set to Error, this method -// does not change the Span status. If this span is not being recorded or err is nil -// than this method does nothing. -func (s *recordingSpan) RecordError(err error, opts ...trace.EventOption) { - if s == nil || err == nil { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - - opts = append(opts, trace.WithAttributes( - semconv.ExceptionType(typeStr(err)), - semconv.ExceptionMessage(err.Error()), - )) - - c := trace.NewEventConfig(opts...) - if c.StackTrace() { - opts = append(opts, trace.WithAttributes( - semconv.ExceptionStacktrace(recordStackTrace()), - )) - } - - s.addEvent(semconv.ExceptionEventName, opts...) -} - -func typeStr(i any) string { - t := reflect.TypeOf(i) - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - return t.String() - } - return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) -} - -func recordStackTrace() string { - stackTrace := make([]byte, 2048) - n := runtime.Stack(stackTrace, false) - - return string(stackTrace[0:n]) -} - -// AddEvent adds an event with the provided name and options. If this span is -// not being recorded then this method does nothing. -func (s *recordingSpan) AddEvent(name string, o ...trace.EventOption) { - if s == nil { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - s.addEvent(name, o...) -} - -// addEvent adds an event with the provided name and options. -// -// This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) addEvent(name string, o ...trace.EventOption) { - c := trace.NewEventConfig(o...) - e := Event{Name: name, Attributes: c.Attributes(), Time: c.Timestamp()} - - // Discard attributes over limit. - limit := s.tracer.provider.spanLimits.AttributePerEventCountLimit - if limit == 0 { - // Drop all attributes. - e.DroppedAttributeCount = len(e.Attributes) - e.Attributes = nil - } else if limit > 0 && len(e.Attributes) > limit { - // Drop over capacity. - e.DroppedAttributeCount = len(e.Attributes) - limit - e.Attributes = e.Attributes[:limit] - } - - s.events.add(e) -} - -// SetName sets the name of this span. If this span is not being recorded than -// this method does nothing. -func (s *recordingSpan) SetName(name string) { - if s == nil { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - s.name = name -} - -// Name returns the name of this span. -func (s *recordingSpan) Name() string { - s.mu.Lock() - defer s.mu.Unlock() - return s.name -} - -// Name returns the SpanContext of this span's parent span. -func (s *recordingSpan) Parent() trace.SpanContext { - s.mu.Lock() - defer s.mu.Unlock() - return s.parent -} - -// SpanKind returns the SpanKind of this span. -func (s *recordingSpan) SpanKind() trace.SpanKind { - s.mu.Lock() - defer s.mu.Unlock() - return s.spanKind -} - -// StartTime returns the time this span started. -func (s *recordingSpan) StartTime() time.Time { - s.mu.Lock() - defer s.mu.Unlock() - return s.startTime -} - -// EndTime returns the time this span ended. For spans that have not yet -// ended, the returned value will be the zero value of time.Time. -func (s *recordingSpan) EndTime() time.Time { - s.mu.Lock() - defer s.mu.Unlock() - return s.endTime -} - -// Attributes returns the attributes of this span. -// -// The order of the returned attributes is not guaranteed to be stable. -func (s *recordingSpan) Attributes() []attribute.KeyValue { - s.mu.Lock() - defer s.mu.Unlock() - s.dedupeAttrs() - return s.attributes -} - -// dedupeAttrs deduplicates the attributes of s to fit capacity. -// -// This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) dedupeAttrs() { - // Do not set a capacity when creating this map. Benchmark testing has - // showed this to only add unused memory allocations in general use. - exists := make(map[attribute.Key]int, len(s.attributes)) - s.dedupeAttrsFromRecord(exists) -} - -// dedupeAttrsFromRecord deduplicates the attributes of s to fit capacity -// using record as the record of unique attribute keys to their index. -// -// This method assumes s.mu.Lock is held by the caller. -func (s *recordingSpan) dedupeAttrsFromRecord(record map[attribute.Key]int) { - // Use the fact that slices share the same backing array. - unique := s.attributes[:0] - for _, a := range s.attributes { - if idx, ok := record[a.Key]; ok { - unique[idx] = a - } else { - unique = append(unique, a) - record[a.Key] = len(unique) - 1 - } - } - clear(s.attributes[len(unique):]) // Erase unneeded elements to let GC collect objects. - s.attributes = unique -} - -// Links returns the links of this span. -func (s *recordingSpan) Links() []Link { - s.mu.Lock() - defer s.mu.Unlock() - if len(s.links.queue) == 0 { - return []Link{} - } - return s.links.copy() -} - -// Events returns the events of this span. -func (s *recordingSpan) Events() []Event { - s.mu.Lock() - defer s.mu.Unlock() - if len(s.events.queue) == 0 { - return []Event{} - } - return s.events.copy() -} - -// Status returns the status of this span. -func (s *recordingSpan) Status() Status { - s.mu.Lock() - defer s.mu.Unlock() - return s.status -} - -// InstrumentationScope returns the instrumentation.Scope associated with -// the Tracer that created this span. -func (s *recordingSpan) InstrumentationScope() instrumentation.Scope { - s.mu.Lock() - defer s.mu.Unlock() - return s.tracer.instrumentationScope -} - -// InstrumentationLibrary returns the instrumentation.Library associated with -// the Tracer that created this span. -func (s *recordingSpan) InstrumentationLibrary() instrumentation.Library { //nolint:staticcheck // This method needs to be define for backwards compatibility - s.mu.Lock() - defer s.mu.Unlock() - return s.tracer.instrumentationScope -} - -// Resource returns the Resource associated with the Tracer that created this -// span. -func (s *recordingSpan) Resource() *resource.Resource { - s.mu.Lock() - defer s.mu.Unlock() - return s.tracer.provider.resource -} - -func (s *recordingSpan) AddLink(link trace.Link) { - if s == nil { - return - } - if !link.SpanContext.IsValid() && len(link.Attributes) == 0 && - link.SpanContext.TraceState().Len() == 0 { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - - l := Link{SpanContext: link.SpanContext, Attributes: link.Attributes} - - // Discard attributes over limit. - limit := s.tracer.provider.spanLimits.AttributePerLinkCountLimit - if limit == 0 { - // Drop all attributes. - l.DroppedAttributeCount = len(l.Attributes) - l.Attributes = nil - } else if limit > 0 && len(l.Attributes) > limit { - l.DroppedAttributeCount = len(l.Attributes) - limit - l.Attributes = l.Attributes[:limit] - } - - s.links.add(l) -} - -// DroppedAttributes returns the number of attributes dropped by the span -// due to limits being reached. -func (s *recordingSpan) DroppedAttributes() int { - s.mu.Lock() - defer s.mu.Unlock() - return s.droppedAttributes -} - -// DroppedLinks returns the number of links dropped by the span due to limits -// being reached. -func (s *recordingSpan) DroppedLinks() int { - s.mu.Lock() - defer s.mu.Unlock() - return s.links.droppedCount -} - -// DroppedEvents returns the number of events dropped by the span due to -// limits being reached. -func (s *recordingSpan) DroppedEvents() int { - s.mu.Lock() - defer s.mu.Unlock() - return s.events.droppedCount -} - -// ChildSpanCount returns the count of spans that consider the span a -// direct parent. -func (s *recordingSpan) ChildSpanCount() int { - s.mu.Lock() - defer s.mu.Unlock() - return s.childSpanCount -} - -// TracerProvider returns a trace.TracerProvider that can be used to generate -// additional Spans on the same telemetry pipeline as the current Span. -func (s *recordingSpan) TracerProvider() trace.TracerProvider { - return s.tracer.provider -} - -// snapshot creates a read-only copy of the current state of the span. -func (s *recordingSpan) snapshot() ReadOnlySpan { - var sd snapshot - s.mu.Lock() - defer s.mu.Unlock() - - sd.endTime = s.endTime - sd.instrumentationScope = s.tracer.instrumentationScope - sd.name = s.name - sd.parent = s.parent - sd.resource = s.tracer.provider.resource - sd.spanContext = s.spanContext - sd.spanKind = s.spanKind - sd.startTime = s.startTime - sd.status = s.status - sd.childSpanCount = s.childSpanCount - - if len(s.attributes) > 0 { - s.dedupeAttrs() - sd.attributes = s.attributes - } - sd.droppedAttributeCount = s.droppedAttributes - if len(s.events.queue) > 0 { - sd.events = s.events.copy() - sd.droppedEventCount = s.events.droppedCount - } - if len(s.links.queue) > 0 { - sd.links = s.links.copy() - sd.droppedLinkCount = s.links.droppedCount - } - return &sd -} - -func (s *recordingSpan) addChild() { - if s == nil { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - if !s.isRecording() { - return - } - s.childSpanCount++ -} - -func (*recordingSpan) private() {} - -// runtimeTrace starts a "runtime/trace".Task for the span and returns a -// context containing the task. -func (s *recordingSpan) runtimeTrace(ctx context.Context) context.Context { - if !rt.IsEnabled() { - // Avoid additional overhead if runtime/trace is not enabled. - return ctx - } - nctx, task := rt.NewTask(ctx, s.name) - - s.mu.Lock() - s.executionTracerTaskEnd = task.End - s.mu.Unlock() - - return nctx -} - -// nonRecordingSpan is a minimal implementation of the OpenTelemetry Span API -// that wraps a SpanContext. It performs no operations other than to return -// the wrapped SpanContext or TracerProvider that created it. -type nonRecordingSpan struct { - embedded.Span - - // tracer is the SDK tracer that created this span. - tracer *tracer - sc trace.SpanContext -} - -var _ trace.Span = nonRecordingSpan{} - -// SpanContext returns the wrapped SpanContext. -func (s nonRecordingSpan) SpanContext() trace.SpanContext { return s.sc } - -// IsRecording always returns false. -func (nonRecordingSpan) IsRecording() bool { return false } - -// SetStatus does nothing. -func (nonRecordingSpan) SetStatus(codes.Code, string) {} - -// SetError does nothing. -func (nonRecordingSpan) SetError(bool) {} - -// SetAttributes does nothing. -func (nonRecordingSpan) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (nonRecordingSpan) End(...trace.SpanEndOption) {} - -// RecordError does nothing. -func (nonRecordingSpan) RecordError(error, ...trace.EventOption) {} - -// AddEvent does nothing. -func (nonRecordingSpan) AddEvent(string, ...trace.EventOption) {} - -// AddLink does nothing. -func (nonRecordingSpan) AddLink(trace.Link) {} - -// SetName does nothing. -func (nonRecordingSpan) SetName(string) {} - -// TracerProvider returns the trace.TracerProvider that provided the Tracer -// that created this span. -func (s nonRecordingSpan) TracerProvider() trace.TracerProvider { return s.tracer.provider } - -func isRecording(s SamplingResult) bool { - return s.Decision == RecordOnly || s.Decision == RecordAndSample -} - -func isSampled(s SamplingResult) bool { - return s.Decision == RecordAndSample -} - -// Status is the classified state of a Span. -type Status struct { - // Code is an identifier of a Spans state classification. - Code codes.Code - // Description is a user hint about why that status was set. It is only - // applicable when Code is Error. - Description string -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go deleted file mode 100644 index 6bdda3d94a..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_exporter.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import "context" - -// SpanExporter handles the delivery of spans to external receivers. This is -// the final component in the trace export pipeline. -type SpanExporter interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // ExportSpans exports a batch of spans. - // - // This function is called synchronously, so there is no concurrency - // safety requirement. However, due to the synchronous calling pattern, - // it is critical that all timeouts and cancellations contained in the - // passed context must be honored. - // - // Any retry logic must be contained in this function. The SDK that - // calls this function will not implement any retry logic. All errors - // returned by this function are considered unrecoverable and will be - // reported to a configured error Handler. - ExportSpans(ctx context.Context, spans []ReadOnlySpan) error - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Shutdown notifies the exporter of a pending halt to operations. The - // exporter is expected to perform any cleanup or synchronization it - // requires while honoring all timeouts and cancellations contained in - // the passed context. - Shutdown(ctx context.Context) error - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go deleted file mode 100644 index 321d974305..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_limits.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import "go.opentelemetry.io/otel/sdk/trace/internal/env" - -const ( - // DefaultAttributeValueLengthLimit is the default maximum allowed - // attribute value length, unlimited. - DefaultAttributeValueLengthLimit = -1 - - // DefaultAttributeCountLimit is the default maximum number of attributes - // a span can have. - DefaultAttributeCountLimit = 128 - - // DefaultEventCountLimit is the default maximum number of events a span - // can have. - DefaultEventCountLimit = 128 - - // DefaultLinkCountLimit is the default maximum number of links a span can - // have. - DefaultLinkCountLimit = 128 - - // DefaultAttributePerEventCountLimit is the default maximum number of - // attributes a span event can have. - DefaultAttributePerEventCountLimit = 128 - - // DefaultAttributePerLinkCountLimit is the default maximum number of - // attributes a span link can have. - DefaultAttributePerLinkCountLimit = 128 -) - -// SpanLimits represents the limits of a span. -type SpanLimits struct { - // AttributeValueLengthLimit is the maximum allowed attribute value length. - // - // This limit only applies to string and string slice attribute values. - // Any string longer than this value will be truncated to this length. - // - // Setting this to a negative value means no limit is applied. - AttributeValueLengthLimit int - - // AttributeCountLimit is the maximum allowed span attribute count. Any - // attribute added to a span once this limit is reached will be dropped. - // - // Setting this to zero means no attributes will be recorded. - // - // Setting this to a negative value means no limit is applied. - AttributeCountLimit int - - // EventCountLimit is the maximum allowed span event count. Any event - // added to a span once this limit is reached means it will be added but - // the oldest event will be dropped. - // - // Setting this to zero means no events we be recorded. - // - // Setting this to a negative value means no limit is applied. - EventCountLimit int - - // LinkCountLimit is the maximum allowed span link count. Any link added - // to a span once this limit is reached means it will be added but the - // oldest link will be dropped. - // - // Setting this to zero means no links we be recorded. - // - // Setting this to a negative value means no limit is applied. - LinkCountLimit int - - // AttributePerEventCountLimit is the maximum number of attributes allowed - // per span event. Any attribute added after this limit reached will be - // dropped. - // - // Setting this to zero means no attributes will be recorded for events. - // - // Setting this to a negative value means no limit is applied. - AttributePerEventCountLimit int - - // AttributePerLinkCountLimit is the maximum number of attributes allowed - // per span link. Any attribute added after this limit reached will be - // dropped. - // - // Setting this to zero means no attributes will be recorded for links. - // - // Setting this to a negative value means no limit is applied. - AttributePerLinkCountLimit int -} - -// NewSpanLimits returns a SpanLimits with all limits set to the value their -// corresponding environment variable holds, or the default if unset. -// -// • AttributeValueLengthLimit: OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT -// (default: unlimited) -// -// • AttributeCountLimit: OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT (default: 128) -// -// • EventCountLimit: OTEL_SPAN_EVENT_COUNT_LIMIT (default: 128) -// -// • AttributePerEventCountLimit: OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT (default: -// 128) -// -// • LinkCountLimit: OTEL_SPAN_LINK_COUNT_LIMIT (default: 128) -// -// • AttributePerLinkCountLimit: OTEL_LINK_ATTRIBUTE_COUNT_LIMIT (default: 128) -func NewSpanLimits() SpanLimits { - return SpanLimits{ - AttributeValueLengthLimit: env.SpanAttributeValueLength(DefaultAttributeValueLengthLimit), - AttributeCountLimit: env.SpanAttributeCount(DefaultAttributeCountLimit), - EventCountLimit: env.SpanEventCount(DefaultEventCountLimit), - LinkCountLimit: env.SpanLinkCount(DefaultLinkCountLimit), - AttributePerEventCountLimit: env.SpanEventAttributeCount(DefaultAttributePerEventCountLimit), - AttributePerLinkCountLimit: env.SpanLinkAttributeCount(DefaultAttributePerLinkCountLimit), - } -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go b/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go deleted file mode 100644 index af7f9177fc..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/span_processor.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "sync" -) - -// SpanProcessor is a processing pipeline for spans in the trace signal. -// SpanProcessors registered with a TracerProvider and are called at the start -// and end of a Span's lifecycle, and are called in the order they are -// registered. -type SpanProcessor interface { - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // OnStart is called when a span is started. It is called synchronously - // and should not block. - OnStart(parent context.Context, s ReadWriteSpan) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // OnEnd is called when span is finished. It is called synchronously and - // hence not block. - OnEnd(s ReadOnlySpan) - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // Shutdown is called when the SDK shuts down. Any cleanup or release of - // resources held by the processor should be done in this call. - // - // Calls to OnStart, OnEnd, or ForceFlush after this has been called - // should be ignored. - // - // All timeouts and cancellations contained in ctx must be honored, this - // should not block indefinitely. - Shutdown(ctx context.Context) error - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. - - // ForceFlush exports all ended spans to the configured Exporter that have not yet - // been exported. It should only be called when absolutely necessary, such as when - // using a FaaS provider that may suspend the process after an invocation, but before - // the Processor can export the completed spans. - ForceFlush(ctx context.Context) error - // DO NOT CHANGE: any modification will not be backwards compatible and - // must never be done outside of a new major release. -} - -type spanProcessorState struct { - sp SpanProcessor - state sync.Once -} - -func newSpanProcessorState(sp SpanProcessor) *spanProcessorState { - return &spanProcessorState{sp: sp} -} - -type spanProcessorStates []*spanProcessorState diff --git a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go b/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go deleted file mode 100644 index e1d08fd4d8..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/trace/tracer.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/sdk/trace" - -import ( - "context" - "time" - - "go.opentelemetry.io/otel/sdk/instrumentation" - "go.opentelemetry.io/otel/sdk/trace/internal/observ" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/embedded" -) - -type tracer struct { - embedded.Tracer - - provider *TracerProvider - instrumentationScope instrumentation.Scope - - inst observ.Tracer -} - -var _ trace.Tracer = &tracer{} - -// Start starts a Span and returns it along with a context containing it. -// -// The Span is created with the provided name and as a child of any existing -// span context found in the passed context. The created Span will be -// configured appropriately by any SpanOption passed. -func (tr *tracer) Start( - ctx context.Context, - name string, - options ...trace.SpanStartOption, -) (context.Context, trace.Span) { - config := trace.NewSpanStartConfig(options...) - - if ctx == nil { - // Prevent trace.ContextWithSpan from panicking. - ctx = context.Background() - } - - // For local spans created by this SDK, track child span count. - if p := trace.SpanFromContext(ctx); p != nil { - if sdkSpan, ok := p.(*recordingSpan); ok { - sdkSpan.addChild() - } - } - - s := tr.newSpan(ctx, name, &config) - newCtx := trace.ContextWithSpan(ctx, s) - if tr.inst.Enabled() { - if o, ok := s.(interface{ setOrigCtx(context.Context) }); ok { - // If this is a recording span, store the original context. - // This allows later retrieval of baggage and other information - // that may have been stored in the context at span start time and - // to avoid the allocation of repeatedly calling - // trace.ContextWithSpan. - o.setOrigCtx(newCtx) - } - psc := trace.SpanContextFromContext(ctx) - tr.inst.SpanStarted(newCtx, psc, s) - } - - if rw, ok := s.(ReadWriteSpan); ok && s.IsRecording() { - sps := tr.provider.getSpanProcessors() - for _, sp := range sps { - // Use original context. - sp.sp.OnStart(ctx, rw) - } - } - if rtt, ok := s.(runtimeTracer); ok { - newCtx = rtt.runtimeTrace(newCtx) - } - - return newCtx, s -} - -type runtimeTracer interface { - // runtimeTrace starts a "runtime/trace".Task for the span and - // returns a context containing the task. - runtimeTrace(ctx context.Context) context.Context -} - -// newSpan returns a new configured span. -func (tr *tracer) newSpan(ctx context.Context, name string, config *trace.SpanConfig) trace.Span { - // If told explicitly to make this a new root use a zero value SpanContext - // as a parent which contains an invalid trace ID and is not remote. - var psc trace.SpanContext - if config.NewRoot() { - ctx = trace.ContextWithSpanContext(ctx, psc) - } else { - psc = trace.SpanContextFromContext(ctx) - } - - // If there is a valid parent trace ID, use it to ensure the continuity of - // the trace. Always generate a new span ID so other components can rely - // on a unique span ID, even if the Span is non-recording. - var tid trace.TraceID - var sid trace.SpanID - if !psc.TraceID().IsValid() { - tid, sid = tr.provider.idGenerator.NewIDs(ctx) - } else { - tid = psc.TraceID() - sid = tr.provider.idGenerator.NewSpanID(ctx, tid) - } - - samplingResult := tr.provider.sampler.ShouldSample(SamplingParameters{ - ParentContext: ctx, - TraceID: tid, - Name: name, - Kind: config.SpanKind(), - Attributes: config.Attributes(), - Links: config.Links(), - }) - - scc := trace.SpanContextConfig{ - TraceID: tid, - SpanID: sid, - TraceState: samplingResult.Tracestate, - } - if isSampled(samplingResult) { - scc.TraceFlags = psc.TraceFlags() | trace.FlagsSampled - } else { - scc.TraceFlags = psc.TraceFlags() &^ trace.FlagsSampled - } - sc := trace.NewSpanContext(scc) - - if !isRecording(samplingResult) { - return tr.newNonRecordingSpan(sc) - } - return tr.newRecordingSpan(ctx, psc, sc, name, samplingResult, config) -} - -// newRecordingSpan returns a new configured recordingSpan. -func (tr *tracer) newRecordingSpan( - ctx context.Context, - psc, sc trace.SpanContext, - name string, - sr SamplingResult, - config *trace.SpanConfig, -) *recordingSpan { - startTime := config.Timestamp() - if startTime.IsZero() { - startTime = time.Now() - } - - s := &recordingSpan{ - // Do not pre-allocate the attributes slice here! Doing so will - // allocate memory that is likely never going to be used, or if used, - // will be over-sized. The default Go compiler has been tested to - // dynamically allocate needed space very well. Benchmarking has shown - // it to be more performant than what we can predetermine here, - // especially for the common use case of few to no added - // attributes. - - parent: psc, - spanContext: sc, - spanKind: trace.ValidateSpanKind(config.SpanKind()), - name: name, - startTime: startTime, - events: newEvictedQueueEvent(tr.provider.spanLimits.EventCountLimit), - links: newEvictedQueueLink(tr.provider.spanLimits.LinkCountLimit), - tracer: tr, - } - - for _, l := range config.Links() { - s.AddLink(l) - } - - s.SetAttributes(sr.Attributes...) - s.SetAttributes(config.Attributes()...) - - if tr.inst.Enabled() { - // Propagate any existing values from the context with the new span to - // the measurement context. - ctx = trace.ContextWithSpan(ctx, s) - tr.inst.SpanLive(ctx, s) - } - - return s -} - -// newNonRecordingSpan returns a new configured nonRecordingSpan. -func (tr *tracer) newNonRecordingSpan(sc trace.SpanContext) nonRecordingSpan { - return nonRecordingSpan{tracer: tr, sc: sc} -} diff --git a/vendor/go.opentelemetry.io/otel/sdk/version.go b/vendor/go.opentelemetry.io/otel/sdk/version.go deleted file mode 100644 index 0a3b366191..0000000000 --- a/vendor/go.opentelemetry.io/otel/sdk/version.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package sdk provides the OpenTelemetry default SDK for Go. -package sdk // import "go.opentelemetry.io/otel/sdk" - -// Version is the current release version of the OpenTelemetry SDK in use. -func Version() string { - return "1.39.0" -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md deleted file mode 100644 index 82e1f46b4e..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Semconv v1.20.0 - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.20.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.20.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go deleted file mode 100644 index 6685c392b5..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/attribute_group.go +++ /dev/null @@ -1,1198 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -import "go.opentelemetry.io/otel/attribute" - -// Describes HTTP attributes. -const ( - // HTTPMethodKey is the attribute Key conforming to the "http.method" - // semantic conventions. It represents the hTTP request method. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - HTTPMethodKey = attribute.Key("http.method") - - // HTTPStatusCodeKey is the attribute Key conforming to the - // "http.status_code" semantic conventions. It represents the [HTTP - // response status code](https://tools.ietf.org/html/rfc7231#section-6). - // - // Type: int - // RequirementLevel: ConditionallyRequired (If and only if one was - // received/sent.) - // Stability: stable - // Examples: 200 - HTTPStatusCodeKey = attribute.Key("http.status_code") -) - -// HTTPMethod returns an attribute KeyValue conforming to the "http.method" -// semantic conventions. It represents the hTTP request method. -func HTTPMethod(val string) attribute.KeyValue { - return HTTPMethodKey.String(val) -} - -// HTTPStatusCode returns an attribute KeyValue conforming to the -// "http.status_code" semantic conventions. It represents the [HTTP response -// status code](https://tools.ietf.org/html/rfc7231#section-6). -func HTTPStatusCode(val int) attribute.KeyValue { - return HTTPStatusCodeKey.Int(val) -} - -// HTTP Server spans attributes -const ( - // HTTPSchemeKey is the attribute Key conforming to the "http.scheme" - // semantic conventions. It represents the URI scheme identifying the used - // protocol. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'http', 'https' - HTTPSchemeKey = attribute.Key("http.scheme") - - // HTTPRouteKey is the attribute Key conforming to the "http.route" - // semantic conventions. It represents the matched route (path template in - // the format used by the respective server framework). See note below - // - // Type: string - // RequirementLevel: ConditionallyRequired (If and only if it's available) - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: MUST NOT be populated when this is not supported by the HTTP - // server framework as the route attribute should have low-cardinality and - // the URI path can NOT substitute it. - // SHOULD include the [application - // root](/specification/trace/semantic_conventions/http.md#http-server-definitions) - // if there is one. - HTTPRouteKey = attribute.Key("http.route") -) - -// HTTPScheme returns an attribute KeyValue conforming to the "http.scheme" -// semantic conventions. It represents the URI scheme identifying the used -// protocol. -func HTTPScheme(val string) attribute.KeyValue { - return HTTPSchemeKey.String(val) -} - -// HTTPRoute returns an attribute KeyValue conforming to the "http.route" -// semantic conventions. It represents the matched route (path template in the -// format used by the respective server framework). See note below -func HTTPRoute(val string) attribute.KeyValue { - return HTTPRouteKey.String(val) -} - -// Attributes for Events represented using Log Records. -const ( - // EventNameKey is the attribute Key conforming to the "event.name" - // semantic conventions. It represents the name identifies the event. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'click', 'exception' - EventNameKey = attribute.Key("event.name") - - // EventDomainKey is the attribute Key conforming to the "event.domain" - // semantic conventions. It represents the domain identifies the business - // context for the events. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: Events across different domains may have same `event.name`, yet be - // unrelated events. - EventDomainKey = attribute.Key("event.domain") -) - -var ( - // Events from browser apps - EventDomainBrowser = EventDomainKey.String("browser") - // Events from mobile apps - EventDomainDevice = EventDomainKey.String("device") - // Events from Kubernetes - EventDomainK8S = EventDomainKey.String("k8s") -) - -// EventName returns an attribute KeyValue conforming to the "event.name" -// semantic conventions. It represents the name identifies the event. -func EventName(val string) attribute.KeyValue { - return EventNameKey.String(val) -} - -// These attributes may be used for any network related operation. -const ( - // NetTransportKey is the attribute Key conforming to the "net.transport" - // semantic conventions. It represents the transport protocol used. See - // note below. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - NetTransportKey = attribute.Key("net.transport") - - // NetProtocolNameKey is the attribute Key conforming to the - // "net.protocol.name" semantic conventions. It represents the application - // layer protocol used. The value SHOULD be normalized to lowercase. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - NetProtocolNameKey = attribute.Key("net.protocol.name") - - // NetProtocolVersionKey is the attribute Key conforming to the - // "net.protocol.version" semantic conventions. It represents the version - // of the application layer protocol used. See note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '3.1.1' - // Note: `net.protocol.version` refers to the version of the protocol used - // and might be different from the protocol client's version. If the HTTP - // client used has a version of `0.27.2`, but sends HTTP version `1.1`, - // this attribute should be set to `1.1`. - NetProtocolVersionKey = attribute.Key("net.protocol.version") - - // NetSockPeerNameKey is the attribute Key conforming to the - // "net.sock.peer.name" semantic conventions. It represents the remote - // socket peer name. - // - // Type: string - // RequirementLevel: Recommended (If available and different from - // `net.peer.name` and if `net.sock.peer.addr` is set.) - // Stability: stable - // Examples: 'proxy.example.com' - NetSockPeerNameKey = attribute.Key("net.sock.peer.name") - - // NetSockPeerAddrKey is the attribute Key conforming to the - // "net.sock.peer.addr" semantic conventions. It represents the remote - // socket peer address: IPv4 or IPv6 for internet protocols, path for local - // communication, - // [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '127.0.0.1', '/tmp/mysql.sock' - NetSockPeerAddrKey = attribute.Key("net.sock.peer.addr") - - // NetSockPeerPortKey is the attribute Key conforming to the - // "net.sock.peer.port" semantic conventions. It represents the remote - // socket peer port. - // - // Type: int - // RequirementLevel: Recommended (If defined for the address family and if - // different than `net.peer.port` and if `net.sock.peer.addr` is set.) - // Stability: stable - // Examples: 16456 - NetSockPeerPortKey = attribute.Key("net.sock.peer.port") - - // NetSockFamilyKey is the attribute Key conforming to the - // "net.sock.family" semantic conventions. It represents the protocol - // [address - // family](https://man7.org/linux/man-pages/man7/address_families.7.html) - // which is used for communication. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (If different than `inet` and if - // any of `net.sock.peer.addr` or `net.sock.host.addr` are set. Consumers - // of telemetry SHOULD accept both IPv4 and IPv6 formats for the address in - // `net.sock.peer.addr` if `net.sock.family` is not set. This is to support - // instrumentations that follow previous versions of this document.) - // Stability: stable - // Examples: 'inet6', 'bluetooth' - NetSockFamilyKey = attribute.Key("net.sock.family") - - // NetPeerNameKey is the attribute Key conforming to the "net.peer.name" - // semantic conventions. It represents the logical remote hostname, see - // note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'example.com' - // Note: `net.peer.name` SHOULD NOT be set if capturing it would require an - // extra DNS lookup. - NetPeerNameKey = attribute.Key("net.peer.name") - - // NetPeerPortKey is the attribute Key conforming to the "net.peer.port" - // semantic conventions. It represents the logical remote port number - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 80, 8080, 443 - NetPeerPortKey = attribute.Key("net.peer.port") - - // NetHostNameKey is the attribute Key conforming to the "net.host.name" - // semantic conventions. It represents the logical local hostname or - // similar, see note below. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'localhost' - NetHostNameKey = attribute.Key("net.host.name") - - // NetHostPortKey is the attribute Key conforming to the "net.host.port" - // semantic conventions. It represents the logical local port number, - // preferably the one that the peer used to connect - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 8080 - NetHostPortKey = attribute.Key("net.host.port") - - // NetSockHostAddrKey is the attribute Key conforming to the - // "net.sock.host.addr" semantic conventions. It represents the local - // socket address. Useful in case of a multi-IP host. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '192.168.0.1' - NetSockHostAddrKey = attribute.Key("net.sock.host.addr") - - // NetSockHostPortKey is the attribute Key conforming to the - // "net.sock.host.port" semantic conventions. It represents the local - // socket port number. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If defined for the address - // family and if different than `net.host.port` and if `net.sock.host.addr` - // is set. In other cases, it is still recommended to set this.) - // Stability: stable - // Examples: 35555 - NetSockHostPortKey = attribute.Key("net.sock.host.port") -) - -var ( - // ip_tcp - NetTransportTCP = NetTransportKey.String("ip_tcp") - // ip_udp - NetTransportUDP = NetTransportKey.String("ip_udp") - // Named or anonymous pipe. See note below - NetTransportPipe = NetTransportKey.String("pipe") - // In-process communication - NetTransportInProc = NetTransportKey.String("inproc") - // Something else (non IP-based) - NetTransportOther = NetTransportKey.String("other") -) - -var ( - // IPv4 address - NetSockFamilyInet = NetSockFamilyKey.String("inet") - // IPv6 address - NetSockFamilyInet6 = NetSockFamilyKey.String("inet6") - // Unix domain socket path - NetSockFamilyUnix = NetSockFamilyKey.String("unix") -) - -// NetProtocolName returns an attribute KeyValue conforming to the -// "net.protocol.name" semantic conventions. It represents the application -// layer protocol used. The value SHOULD be normalized to lowercase. -func NetProtocolName(val string) attribute.KeyValue { - return NetProtocolNameKey.String(val) -} - -// NetProtocolVersion returns an attribute KeyValue conforming to the -// "net.protocol.version" semantic conventions. It represents the version of -// the application layer protocol used. See note below. -func NetProtocolVersion(val string) attribute.KeyValue { - return NetProtocolVersionKey.String(val) -} - -// NetSockPeerName returns an attribute KeyValue conforming to the -// "net.sock.peer.name" semantic conventions. It represents the remote socket -// peer name. -func NetSockPeerName(val string) attribute.KeyValue { - return NetSockPeerNameKey.String(val) -} - -// NetSockPeerAddr returns an attribute KeyValue conforming to the -// "net.sock.peer.addr" semantic conventions. It represents the remote socket -// peer address: IPv4 or IPv6 for internet protocols, path for local -// communication, -// [etc](https://man7.org/linux/man-pages/man7/address_families.7.html). -func NetSockPeerAddr(val string) attribute.KeyValue { - return NetSockPeerAddrKey.String(val) -} - -// NetSockPeerPort returns an attribute KeyValue conforming to the -// "net.sock.peer.port" semantic conventions. It represents the remote socket -// peer port. -func NetSockPeerPort(val int) attribute.KeyValue { - return NetSockPeerPortKey.Int(val) -} - -// NetPeerName returns an attribute KeyValue conforming to the -// "net.peer.name" semantic conventions. It represents the logical remote -// hostname, see note below. -func NetPeerName(val string) attribute.KeyValue { - return NetPeerNameKey.String(val) -} - -// NetPeerPort returns an attribute KeyValue conforming to the -// "net.peer.port" semantic conventions. It represents the logical remote port -// number -func NetPeerPort(val int) attribute.KeyValue { - return NetPeerPortKey.Int(val) -} - -// NetHostName returns an attribute KeyValue conforming to the -// "net.host.name" semantic conventions. It represents the logical local -// hostname or similar, see note below. -func NetHostName(val string) attribute.KeyValue { - return NetHostNameKey.String(val) -} - -// NetHostPort returns an attribute KeyValue conforming to the -// "net.host.port" semantic conventions. It represents the logical local port -// number, preferably the one that the peer used to connect -func NetHostPort(val int) attribute.KeyValue { - return NetHostPortKey.Int(val) -} - -// NetSockHostAddr returns an attribute KeyValue conforming to the -// "net.sock.host.addr" semantic conventions. It represents the local socket -// address. Useful in case of a multi-IP host. -func NetSockHostAddr(val string) attribute.KeyValue { - return NetSockHostAddrKey.String(val) -} - -// NetSockHostPort returns an attribute KeyValue conforming to the -// "net.sock.host.port" semantic conventions. It represents the local socket -// port number. -func NetSockHostPort(val int) attribute.KeyValue { - return NetSockHostPortKey.Int(val) -} - -// These attributes may be used for any network related operation. -const ( - // NetHostConnectionTypeKey is the attribute Key conforming to the - // "net.host.connection.type" semantic conventions. It represents the - // internet connection type currently being used by the host. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'wifi' - NetHostConnectionTypeKey = attribute.Key("net.host.connection.type") - - // NetHostConnectionSubtypeKey is the attribute Key conforming to the - // "net.host.connection.subtype" semantic conventions. It represents the - // this describes more details regarding the connection.type. It may be the - // type of cell technology connection, but it could be used for describing - // details about a wifi connection. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'LTE' - NetHostConnectionSubtypeKey = attribute.Key("net.host.connection.subtype") - - // NetHostCarrierNameKey is the attribute Key conforming to the - // "net.host.carrier.name" semantic conventions. It represents the name of - // the mobile carrier. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'sprint' - NetHostCarrierNameKey = attribute.Key("net.host.carrier.name") - - // NetHostCarrierMccKey is the attribute Key conforming to the - // "net.host.carrier.mcc" semantic conventions. It represents the mobile - // carrier country code. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '310' - NetHostCarrierMccKey = attribute.Key("net.host.carrier.mcc") - - // NetHostCarrierMncKey is the attribute Key conforming to the - // "net.host.carrier.mnc" semantic conventions. It represents the mobile - // carrier network code. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '001' - NetHostCarrierMncKey = attribute.Key("net.host.carrier.mnc") - - // NetHostCarrierIccKey is the attribute Key conforming to the - // "net.host.carrier.icc" semantic conventions. It represents the ISO - // 3166-1 alpha-2 2-character country code associated with the mobile - // carrier network. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'DE' - NetHostCarrierIccKey = attribute.Key("net.host.carrier.icc") -) - -var ( - // wifi - NetHostConnectionTypeWifi = NetHostConnectionTypeKey.String("wifi") - // wired - NetHostConnectionTypeWired = NetHostConnectionTypeKey.String("wired") - // cell - NetHostConnectionTypeCell = NetHostConnectionTypeKey.String("cell") - // unavailable - NetHostConnectionTypeUnavailable = NetHostConnectionTypeKey.String("unavailable") - // unknown - NetHostConnectionTypeUnknown = NetHostConnectionTypeKey.String("unknown") -) - -var ( - // GPRS - NetHostConnectionSubtypeGprs = NetHostConnectionSubtypeKey.String("gprs") - // EDGE - NetHostConnectionSubtypeEdge = NetHostConnectionSubtypeKey.String("edge") - // UMTS - NetHostConnectionSubtypeUmts = NetHostConnectionSubtypeKey.String("umts") - // CDMA - NetHostConnectionSubtypeCdma = NetHostConnectionSubtypeKey.String("cdma") - // EVDO Rel. 0 - NetHostConnectionSubtypeEvdo0 = NetHostConnectionSubtypeKey.String("evdo_0") - // EVDO Rev. A - NetHostConnectionSubtypeEvdoA = NetHostConnectionSubtypeKey.String("evdo_a") - // CDMA2000 1XRTT - NetHostConnectionSubtypeCdma20001xrtt = NetHostConnectionSubtypeKey.String("cdma2000_1xrtt") - // HSDPA - NetHostConnectionSubtypeHsdpa = NetHostConnectionSubtypeKey.String("hsdpa") - // HSUPA - NetHostConnectionSubtypeHsupa = NetHostConnectionSubtypeKey.String("hsupa") - // HSPA - NetHostConnectionSubtypeHspa = NetHostConnectionSubtypeKey.String("hspa") - // IDEN - NetHostConnectionSubtypeIden = NetHostConnectionSubtypeKey.String("iden") - // EVDO Rev. B - NetHostConnectionSubtypeEvdoB = NetHostConnectionSubtypeKey.String("evdo_b") - // LTE - NetHostConnectionSubtypeLte = NetHostConnectionSubtypeKey.String("lte") - // EHRPD - NetHostConnectionSubtypeEhrpd = NetHostConnectionSubtypeKey.String("ehrpd") - // HSPAP - NetHostConnectionSubtypeHspap = NetHostConnectionSubtypeKey.String("hspap") - // GSM - NetHostConnectionSubtypeGsm = NetHostConnectionSubtypeKey.String("gsm") - // TD-SCDMA - NetHostConnectionSubtypeTdScdma = NetHostConnectionSubtypeKey.String("td_scdma") - // IWLAN - NetHostConnectionSubtypeIwlan = NetHostConnectionSubtypeKey.String("iwlan") - // 5G NR (New Radio) - NetHostConnectionSubtypeNr = NetHostConnectionSubtypeKey.String("nr") - // 5G NRNSA (New Radio Non-Standalone) - NetHostConnectionSubtypeNrnsa = NetHostConnectionSubtypeKey.String("nrnsa") - // LTE CA - NetHostConnectionSubtypeLteCa = NetHostConnectionSubtypeKey.String("lte_ca") -) - -// NetHostCarrierName returns an attribute KeyValue conforming to the -// "net.host.carrier.name" semantic conventions. It represents the name of the -// mobile carrier. -func NetHostCarrierName(val string) attribute.KeyValue { - return NetHostCarrierNameKey.String(val) -} - -// NetHostCarrierMcc returns an attribute KeyValue conforming to the -// "net.host.carrier.mcc" semantic conventions. It represents the mobile -// carrier country code. -func NetHostCarrierMcc(val string) attribute.KeyValue { - return NetHostCarrierMccKey.String(val) -} - -// NetHostCarrierMnc returns an attribute KeyValue conforming to the -// "net.host.carrier.mnc" semantic conventions. It represents the mobile -// carrier network code. -func NetHostCarrierMnc(val string) attribute.KeyValue { - return NetHostCarrierMncKey.String(val) -} - -// NetHostCarrierIcc returns an attribute KeyValue conforming to the -// "net.host.carrier.icc" semantic conventions. It represents the ISO 3166-1 -// alpha-2 2-character country code associated with the mobile carrier network. -func NetHostCarrierIcc(val string) attribute.KeyValue { - return NetHostCarrierIccKey.String(val) -} - -// Semantic conventions for HTTP client and server Spans. -const ( - // HTTPRequestContentLengthKey is the attribute Key conforming to the - // "http.request_content_length" semantic conventions. It represents the - // size of the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3495 - HTTPRequestContentLengthKey = attribute.Key("http.request_content_length") - - // HTTPResponseContentLengthKey is the attribute Key conforming to the - // "http.response_content_length" semantic conventions. It represents the - // size of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3495 - HTTPResponseContentLengthKey = attribute.Key("http.response_content_length") -) - -// HTTPRequestContentLength returns an attribute KeyValue conforming to the -// "http.request_content_length" semantic conventions. It represents the size -// of the request payload body in bytes. This is the number of bytes -// transferred excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPRequestContentLength(val int) attribute.KeyValue { - return HTTPRequestContentLengthKey.Int(val) -} - -// HTTPResponseContentLength returns an attribute KeyValue conforming to the -// "http.response_content_length" semantic conventions. It represents the size -// of the response payload body in bytes. This is the number of bytes -// transferred excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPResponseContentLength(val int) attribute.KeyValue { - return HTTPResponseContentLengthKey.Int(val) -} - -// Semantic convention describing per-message attributes populated on messaging -// spans or links. -const ( - // MessagingMessageIDKey is the attribute Key conforming to the - // "messaging.message.id" semantic conventions. It represents a value used - // by the messaging system as an identifier for the message, represented as - // a string. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - MessagingMessageIDKey = attribute.Key("messaging.message.id") - - // MessagingMessageConversationIDKey is the attribute Key conforming to the - // "messaging.message.conversation_id" semantic conventions. It represents - // the [conversation ID](#conversations) identifying the conversation to - // which the message belongs, represented as a string. Sometimes called - // "Correlation ID". - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyConversationID' - MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") - - // MessagingMessagePayloadSizeBytesKey is the attribute Key conforming to - // the "messaging.message.payload_size_bytes" semantic conventions. It - // represents the (uncompressed) size of the message payload in bytes. Also - // use this attribute if it is unknown whether the compressed or - // uncompressed payload size is reported. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2738 - MessagingMessagePayloadSizeBytesKey = attribute.Key("messaging.message.payload_size_bytes") - - // MessagingMessagePayloadCompressedSizeBytesKey is the attribute Key - // conforming to the "messaging.message.payload_compressed_size_bytes" - // semantic conventions. It represents the compressed size of the message - // payload in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2048 - MessagingMessagePayloadCompressedSizeBytesKey = attribute.Key("messaging.message.payload_compressed_size_bytes") -) - -// MessagingMessageID returns an attribute KeyValue conforming to the -// "messaging.message.id" semantic conventions. It represents a value used by -// the messaging system as an identifier for the message, represented as a -// string. -func MessagingMessageID(val string) attribute.KeyValue { - return MessagingMessageIDKey.String(val) -} - -// MessagingMessageConversationID returns an attribute KeyValue conforming -// to the "messaging.message.conversation_id" semantic conventions. It -// represents the [conversation ID](#conversations) identifying the -// conversation to which the message belongs, represented as a string. -// Sometimes called "Correlation ID". -func MessagingMessageConversationID(val string) attribute.KeyValue { - return MessagingMessageConversationIDKey.String(val) -} - -// MessagingMessagePayloadSizeBytes returns an attribute KeyValue conforming -// to the "messaging.message.payload_size_bytes" semantic conventions. It -// represents the (uncompressed) size of the message payload in bytes. Also use -// this attribute if it is unknown whether the compressed or uncompressed -// payload size is reported. -func MessagingMessagePayloadSizeBytes(val int) attribute.KeyValue { - return MessagingMessagePayloadSizeBytesKey.Int(val) -} - -// MessagingMessagePayloadCompressedSizeBytes returns an attribute KeyValue -// conforming to the "messaging.message.payload_compressed_size_bytes" semantic -// conventions. It represents the compressed size of the message payload in -// bytes. -func MessagingMessagePayloadCompressedSizeBytes(val int) attribute.KeyValue { - return MessagingMessagePayloadCompressedSizeBytesKey.Int(val) -} - -// Semantic convention for attributes that describe messaging destination on -// broker -const ( - // MessagingDestinationNameKey is the attribute Key conforming to the - // "messaging.destination.name" semantic conventions. It represents the - // message destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic - // or other entity within the broker. If - // the broker does not have such notion, the destination name SHOULD - // uniquely identify the broker. - MessagingDestinationNameKey = attribute.Key("messaging.destination.name") - - // MessagingDestinationTemplateKey is the attribute Key conforming to the - // "messaging.destination.template" semantic conventions. It represents the - // low cardinality representation of the messaging destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example - // would be a destination name involving a user name or product id. - // Although the destination name in this case is of high cardinality, the - // underlying template is of low cardinality and can be effectively used - // for grouping and aggregation. - MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") - - // MessagingDestinationTemporaryKey is the attribute Key conforming to the - // "messaging.destination.temporary" semantic conventions. It represents a - // boolean that is true if the message destination is temporary and might - // not exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") - - // MessagingDestinationAnonymousKey is the attribute Key conforming to the - // "messaging.destination.anonymous" semantic conventions. It represents a - // boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") -) - -// MessagingDestinationName returns an attribute KeyValue conforming to the -// "messaging.destination.name" semantic conventions. It represents the message -// destination name -func MessagingDestinationName(val string) attribute.KeyValue { - return MessagingDestinationNameKey.String(val) -} - -// MessagingDestinationTemplate returns an attribute KeyValue conforming to -// the "messaging.destination.template" semantic conventions. It represents the -// low cardinality representation of the messaging destination name -func MessagingDestinationTemplate(val string) attribute.KeyValue { - return MessagingDestinationTemplateKey.String(val) -} - -// MessagingDestinationTemporary returns an attribute KeyValue conforming to -// the "messaging.destination.temporary" semantic conventions. It represents a -// boolean that is true if the message destination is temporary and might not -// exist anymore after messages are processed. -func MessagingDestinationTemporary(val bool) attribute.KeyValue { - return MessagingDestinationTemporaryKey.Bool(val) -} - -// MessagingDestinationAnonymous returns an attribute KeyValue conforming to -// the "messaging.destination.anonymous" semantic conventions. It represents a -// boolean that is true if the message destination is anonymous (could be -// unnamed or have auto-generated name). -func MessagingDestinationAnonymous(val bool) attribute.KeyValue { - return MessagingDestinationAnonymousKey.Bool(val) -} - -// Semantic convention for attributes that describe messaging source on broker -const ( - // MessagingSourceNameKey is the attribute Key conforming to the - // "messaging.source.name" semantic conventions. It represents the message - // source name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MyQueue', 'MyTopic' - // Note: Source name SHOULD uniquely identify a specific queue, topic, or - // other entity within the broker. If - // the broker does not have such notion, the source name SHOULD uniquely - // identify the broker. - MessagingSourceNameKey = attribute.Key("messaging.source.name") - - // MessagingSourceTemplateKey is the attribute Key conforming to the - // "messaging.source.template" semantic conventions. It represents the low - // cardinality representation of the messaging source name - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/customers/{customerID}' - // Note: Source names could be constructed from templates. An example would - // be a source name involving a user name or product id. Although the - // source name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and - // aggregation. - MessagingSourceTemplateKey = attribute.Key("messaging.source.template") - - // MessagingSourceTemporaryKey is the attribute Key conforming to the - // "messaging.source.temporary" semantic conventions. It represents a - // boolean that is true if the message source is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingSourceTemporaryKey = attribute.Key("messaging.source.temporary") - - // MessagingSourceAnonymousKey is the attribute Key conforming to the - // "messaging.source.anonymous" semantic conventions. It represents a - // boolean that is true if the message source is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - MessagingSourceAnonymousKey = attribute.Key("messaging.source.anonymous") -) - -// MessagingSourceName returns an attribute KeyValue conforming to the -// "messaging.source.name" semantic conventions. It represents the message -// source name -func MessagingSourceName(val string) attribute.KeyValue { - return MessagingSourceNameKey.String(val) -} - -// MessagingSourceTemplate returns an attribute KeyValue conforming to the -// "messaging.source.template" semantic conventions. It represents the low -// cardinality representation of the messaging source name -func MessagingSourceTemplate(val string) attribute.KeyValue { - return MessagingSourceTemplateKey.String(val) -} - -// MessagingSourceTemporary returns an attribute KeyValue conforming to the -// "messaging.source.temporary" semantic conventions. It represents a boolean -// that is true if the message source is temporary and might not exist anymore -// after messages are processed. -func MessagingSourceTemporary(val bool) attribute.KeyValue { - return MessagingSourceTemporaryKey.Bool(val) -} - -// MessagingSourceAnonymous returns an attribute KeyValue conforming to the -// "messaging.source.anonymous" semantic conventions. It represents a boolean -// that is true if the message source is anonymous (could be unnamed or have -// auto-generated name). -func MessagingSourceAnonymous(val bool) attribute.KeyValue { - return MessagingSourceAnonymousKey.Bool(val) -} - -// Attributes for RabbitMQ -const ( - // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key - // conforming to the "messaging.rabbitmq.destination.routing_key" semantic - // conventions. It represents the rabbitMQ message routing key. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If not empty.) - // Stability: stable - // Examples: 'myKey' - MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") -) - -// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue -// conforming to the "messaging.rabbitmq.destination.routing_key" semantic -// conventions. It represents the rabbitMQ message routing key. -func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { - return MessagingRabbitmqDestinationRoutingKeyKey.String(val) -} - -// Attributes for Apache Kafka -const ( - // MessagingKafkaMessageKeyKey is the attribute Key conforming to the - // "messaging.kafka.message.key" semantic conventions. It represents the - // message keys in Kafka are used for grouping alike messages to ensure - // they're processed on the same partition. They differ from - // `messaging.message.id` in that they're not unique. If the key is `null`, - // the attribute MUST NOT be set. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to - // be supplied for the attribute. If the key has no unambiguous, canonical - // string form, don't include its value. - MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") - - // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the - // "messaging.kafka.consumer.group" semantic conventions. It represents the - // name of the Kafka Consumer Group that is handling the message. Only - // applies to consumers, not producers. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'my-group' - MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") - - // MessagingKafkaClientIDKey is the attribute Key conforming to the - // "messaging.kafka.client_id" semantic conventions. It represents the - // client ID for the Consumer or Producer that is handling the message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'client-5' - MessagingKafkaClientIDKey = attribute.Key("messaging.kafka.client_id") - - // MessagingKafkaDestinationPartitionKey is the attribute Key conforming to - // the "messaging.kafka.destination.partition" semantic conventions. It - // represents the partition the message is sent to. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2 - MessagingKafkaDestinationPartitionKey = attribute.Key("messaging.kafka.destination.partition") - - // MessagingKafkaSourcePartitionKey is the attribute Key conforming to the - // "messaging.kafka.source.partition" semantic conventions. It represents - // the partition the message is received from. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 2 - MessagingKafkaSourcePartitionKey = attribute.Key("messaging.kafka.source.partition") - - // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the - // "messaging.kafka.message.offset" semantic conventions. It represents the - // offset of a record in the corresponding Kafka partition. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") - - // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the - // "messaging.kafka.message.tombstone" semantic conventions. It represents - // a boolean that is true if the message is a tombstone. - // - // Type: boolean - // RequirementLevel: ConditionallyRequired (If value is `true`. When - // missing, the value is assumed to be `false`.) - // Stability: stable - MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") -) - -// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the -// "messaging.kafka.message.key" semantic conventions. It represents the -// message keys in Kafka are used for grouping alike messages to ensure they're -// processed on the same partition. They differ from `messaging.message.id` in -// that they're not unique. If the key is `null`, the attribute MUST NOT be -// set. -func MessagingKafkaMessageKey(val string) attribute.KeyValue { - return MessagingKafkaMessageKeyKey.String(val) -} - -// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to -// the "messaging.kafka.consumer.group" semantic conventions. It represents the -// name of the Kafka Consumer Group that is handling the message. Only applies -// to consumers, not producers. -func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { - return MessagingKafkaConsumerGroupKey.String(val) -} - -// MessagingKafkaClientID returns an attribute KeyValue conforming to the -// "messaging.kafka.client_id" semantic conventions. It represents the client -// ID for the Consumer or Producer that is handling the message. -func MessagingKafkaClientID(val string) attribute.KeyValue { - return MessagingKafkaClientIDKey.String(val) -} - -// MessagingKafkaDestinationPartition returns an attribute KeyValue -// conforming to the "messaging.kafka.destination.partition" semantic -// conventions. It represents the partition the message is sent to. -func MessagingKafkaDestinationPartition(val int) attribute.KeyValue { - return MessagingKafkaDestinationPartitionKey.Int(val) -} - -// MessagingKafkaSourcePartition returns an attribute KeyValue conforming to -// the "messaging.kafka.source.partition" semantic conventions. It represents -// the partition the message is received from. -func MessagingKafkaSourcePartition(val int) attribute.KeyValue { - return MessagingKafkaSourcePartitionKey.Int(val) -} - -// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to -// the "messaging.kafka.message.offset" semantic conventions. It represents the -// offset of a record in the corresponding Kafka partition. -func MessagingKafkaMessageOffset(val int) attribute.KeyValue { - return MessagingKafkaMessageOffsetKey.Int(val) -} - -// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming -// to the "messaging.kafka.message.tombstone" semantic conventions. It -// represents a boolean that is true if the message is a tombstone. -func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { - return MessagingKafkaMessageTombstoneKey.Bool(val) -} - -// Attributes for Apache RocketMQ -const ( - // MessagingRocketmqNamespaceKey is the attribute Key conforming to the - // "messaging.rocketmq.namespace" semantic conventions. It represents the - // namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myNamespace' - MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") - - // MessagingRocketmqClientGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.client_group" semantic conventions. It represents - // the name of the RocketMQ producer/consumer group that is handling the - // message. The client type is identified by the SpanKind. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myConsumerGroup' - MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") - - // MessagingRocketmqClientIDKey is the attribute Key conforming to the - // "messaging.rocketmq.client_id" semantic conventions. It represents the - // unique identifier for each client. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myhost@8742@s8083jm' - MessagingRocketmqClientIDKey = attribute.Key("messaging.rocketmq.client_id") - - // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delivery_timestamp" - // semantic conventions. It represents the timestamp in milliseconds that - // the delay message is expected to be delivered to consumer. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the message type is delay - // and delay time level is not specified.) - // Stability: stable - // Examples: 1665987217045 - MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") - - // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delay_time_level" semantic - // conventions. It represents the delay time level for delay message, which - // determines the message delay time. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the message type is delay - // and delivery timestamp is not specified.) - // Stability: stable - // Examples: 3 - MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") - - // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.message.group" semantic conventions. It represents - // the it is essential for FIFO message. Messages that belong to the same - // message group are always processed one by one within the same consumer - // group. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If the message type is FIFO.) - // Stability: stable - // Examples: 'myMessageGroup' - MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") - - // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the - // "messaging.rocketmq.message.type" semantic conventions. It represents - // the type of message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") - - // MessagingRocketmqMessageTagKey is the attribute Key conforming to the - // "messaging.rocketmq.message.tag" semantic conventions. It represents the - // secondary classifier of message besides topic. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'tagA' - MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") - - // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the - // "messaging.rocketmq.message.keys" semantic conventions. It represents - // the key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'keyA', 'keyB' - MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") - - // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to - // the "messaging.rocketmq.consumption_model" semantic conventions. It - // represents the model of message consumption. This only applies to - // consumer spans. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") -) - -var ( - // Normal message - MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") - // FIFO message - MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") - // Delay message - MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") - // Transaction message - MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") -) - -var ( - // Clustering consumption model - MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") - // Broadcasting consumption model - MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") -) - -// MessagingRocketmqNamespace returns an attribute KeyValue conforming to -// the "messaging.rocketmq.namespace" semantic conventions. It represents the -// namespace of RocketMQ resources, resources in different namespaces are -// individual. -func MessagingRocketmqNamespace(val string) attribute.KeyValue { - return MessagingRocketmqNamespaceKey.String(val) -} - -// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.client_group" semantic conventions. It represents -// the name of the RocketMQ producer/consumer group that is handling the -// message. The client type is identified by the SpanKind. -func MessagingRocketmqClientGroup(val string) attribute.KeyValue { - return MessagingRocketmqClientGroupKey.String(val) -} - -// MessagingRocketmqClientID returns an attribute KeyValue conforming to the -// "messaging.rocketmq.client_id" semantic conventions. It represents the -// unique identifier for each client. -func MessagingRocketmqClientID(val string) attribute.KeyValue { - return MessagingRocketmqClientIDKey.String(val) -} - -// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic -// conventions. It represents the timestamp in milliseconds that the delay -// message is expected to be delivered to consumer. -func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { - return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) -} - -// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delay_time_level" semantic -// conventions. It represents the delay time level for delay message, which -// determines the message delay time. -func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { - return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) -} - -// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.group" semantic conventions. It represents -// the it is essential for FIFO message. Messages that belong to the same -// message group are always processed one by one within the same consumer -// group. -func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { - return MessagingRocketmqMessageGroupKey.String(val) -} - -// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.tag" semantic conventions. It represents the -// secondary classifier of message besides topic. -func MessagingRocketmqMessageTag(val string) attribute.KeyValue { - return MessagingRocketmqMessageTagKey.String(val) -} - -// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.keys" semantic conventions. It represents -// the key(s) of message, another way to mark message besides message id. -func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { - return MessagingRocketmqMessageKeysKey.StringSlice(val) -} - -// Describes user-agent attributes. -const ( - // UserAgentOriginalKey is the attribute Key conforming to the - // "user_agent.original" semantic conventions. It represents the value of - // the [HTTP - // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) - // header sent by the client. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3' - UserAgentOriginalKey = attribute.Key("user_agent.original") -) - -// UserAgentOriginal returns an attribute KeyValue conforming to the -// "user_agent.original" semantic conventions. It represents the value of the -// [HTTP -// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) -// header sent by the client. -func UserAgentOriginal(val string) attribute.KeyValue { - return UserAgentOriginalKey.String(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go deleted file mode 100644 index 0d1f55a8fe..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the conventions -// as of the v1.20.0 version of the OpenTelemetry specification. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go deleted file mode 100644 index 6377639321..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/event.go +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -import "go.opentelemetry.io/otel/attribute" - -// This semantic convention defines the attributes used to represent a feature -// flag evaluation as an event. -const ( - // FeatureFlagKeyKey is the attribute Key conforming to the - // "feature_flag.key" semantic conventions. It represents the unique - // identifier of the feature flag. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'logo-color' - FeatureFlagKeyKey = attribute.Key("feature_flag.key") - - // FeatureFlagProviderNameKey is the attribute Key conforming to the - // "feature_flag.provider_name" semantic conventions. It represents the - // name of the service provider that performs the flag evaluation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'Flag Manager' - FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") - - // FeatureFlagVariantKey is the attribute Key conforming to the - // "feature_flag.variant" semantic conventions. It represents the sHOULD be - // a semantic identifier for a value. If one is unavailable, a stringified - // version of the value can be used. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides - // a means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant `red` maybe be used for the value `#c05543`. - // - // A stringified version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - FeatureFlagVariantKey = attribute.Key("feature_flag.variant") -) - -// FeatureFlagKey returns an attribute KeyValue conforming to the -// "feature_flag.key" semantic conventions. It represents the unique identifier -// of the feature flag. -func FeatureFlagKey(val string) attribute.KeyValue { - return FeatureFlagKeyKey.String(val) -} - -// FeatureFlagProviderName returns an attribute KeyValue conforming to the -// "feature_flag.provider_name" semantic conventions. It represents the name of -// the service provider that performs the flag evaluation. -func FeatureFlagProviderName(val string) attribute.KeyValue { - return FeatureFlagProviderNameKey.String(val) -} - -// FeatureFlagVariant returns an attribute KeyValue conforming to the -// "feature_flag.variant" semantic conventions. It represents the sHOULD be a -// semantic identifier for a value. If one is unavailable, a stringified -// version of the value can be used. -func FeatureFlagVariant(val string) attribute.KeyValue { - return FeatureFlagVariantKey.String(val) -} - -// RPC received/sent message. -const ( - // MessageTypeKey is the attribute Key conforming to the "message.type" - // semantic conventions. It represents the whether this is a received or - // sent message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - MessageTypeKey = attribute.Key("message.type") - - // MessageIDKey is the attribute Key conforming to the "message.id" - // semantic conventions. It represents the mUST be calculated as two - // different counters starting from `1` one for sent messages and one for - // received message. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Note: This way we guarantee that the values will be consistent between - // different implementations. - MessageIDKey = attribute.Key("message.id") - - // MessageCompressedSizeKey is the attribute Key conforming to the - // "message.compressed_size" semantic conventions. It represents the - // compressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - MessageCompressedSizeKey = attribute.Key("message.compressed_size") - - // MessageUncompressedSizeKey is the attribute Key conforming to the - // "message.uncompressed_size" semantic conventions. It represents the - // uncompressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - MessageUncompressedSizeKey = attribute.Key("message.uncompressed_size") -) - -var ( - // sent - MessageTypeSent = MessageTypeKey.String("SENT") - // received - MessageTypeReceived = MessageTypeKey.String("RECEIVED") -) - -// MessageID returns an attribute KeyValue conforming to the "message.id" -// semantic conventions. It represents the mUST be calculated as two different -// counters starting from `1` one for sent messages and one for received -// message. -func MessageID(val int) attribute.KeyValue { - return MessageIDKey.Int(val) -} - -// MessageCompressedSize returns an attribute KeyValue conforming to the -// "message.compressed_size" semantic conventions. It represents the compressed -// size of the message in bytes. -func MessageCompressedSize(val int) attribute.KeyValue { - return MessageCompressedSizeKey.Int(val) -} - -// MessageUncompressedSize returns an attribute KeyValue conforming to the -// "message.uncompressed_size" semantic conventions. It represents the -// uncompressed size of the message in bytes. -func MessageUncompressedSize(val int) attribute.KeyValue { - return MessageUncompressedSizeKey.Int(val) -} - -// The attributes used to report a single exception associated with a span. -const ( - // ExceptionEscapedKey is the attribute Key conforming to the - // "exception.escaped" semantic conventions. It represents the sHOULD be - // set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of - // a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's `__exit__` method in Python) but will - // usually be caught at the point of recording the exception in most - // languages. - // - // It is usually not possible to determine at the point where an exception - // is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending - // the span, - // as done in the [example above](#recording-an-exception). - // - // It follows that an exception may still escape the scope of the span - // even if the `exception.escaped` attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - ExceptionEscapedKey = attribute.Key("exception.escaped") -) - -// ExceptionEscaped returns an attribute KeyValue conforming to the -// "exception.escaped" semantic conventions. It represents the sHOULD be set to -// true if the exception event is recorded at a point where it is known that -// the exception is escaping the scope of the span. -func ExceptionEscaped(val bool) attribute.KeyValue { - return ExceptionEscapedKey.Bool(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go deleted file mode 100644 index f40c97825a..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/exception.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -const ( - // ExceptionEventName is the name of the Span event representing an exception. - ExceptionEventName = "exception" -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go deleted file mode 100644 index 9c1840631b..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/http.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -// HTTP scheme attributes. -var ( - HTTPSchemeHTTP = HTTPSchemeKey.String("http") - HTTPSchemeHTTPS = HTTPSchemeKey.String("https") -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go deleted file mode 100644 index 3d44dae275..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/resource.go +++ /dev/null @@ -1,2060 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -import "go.opentelemetry.io/otel/attribute" - -// The web browser in which the application represented by the resource is -// running. The `browser.*` attributes MUST be used only for resources that -// represent applications running in a web browser (regardless of whether -// running on a mobile or desktop device). -const ( - // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" - // semantic conventions. It represents the array of brand name and version - // separated by a space - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.brands`). - BrowserBrandsKey = attribute.Key("browser.brands") - - // BrowserPlatformKey is the attribute Key conforming to the - // "browser.platform" semantic conventions. It represents the platform on - // which the browser is running - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.platform`). If unavailable, the legacy - // `navigator.platform` API SHOULD NOT be used instead and this attribute - // SHOULD be left unset in order for the values to be consistent. - // The list of possible values is defined in the [W3C User-Agent Client - // Hints - // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). - // Note that some (but not all) of these values can overlap with values in - // the [`os.type` and `os.name` attributes](./os.md). However, for - // consistency, the values in the `browser.platform` attribute should - // capture the exact value that the user agent provides. - BrowserPlatformKey = attribute.Key("browser.platform") - - // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" - // semantic conventions. It represents a boolean that is true if the - // browser is running on a mobile device - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.mobile`). If unavailable, this attribute - // SHOULD be left unset. - BrowserMobileKey = attribute.Key("browser.mobile") - - // BrowserLanguageKey is the attribute Key conforming to the - // "browser.language" semantic conventions. It represents the preferred - // language of the user using the browser - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // `navigator.language`. - BrowserLanguageKey = attribute.Key("browser.language") -) - -// BrowserBrands returns an attribute KeyValue conforming to the -// "browser.brands" semantic conventions. It represents the array of brand name -// and version separated by a space -func BrowserBrands(val ...string) attribute.KeyValue { - return BrowserBrandsKey.StringSlice(val) -} - -// BrowserPlatform returns an attribute KeyValue conforming to the -// "browser.platform" semantic conventions. It represents the platform on which -// the browser is running -func BrowserPlatform(val string) attribute.KeyValue { - return BrowserPlatformKey.String(val) -} - -// BrowserMobile returns an attribute KeyValue conforming to the -// "browser.mobile" semantic conventions. It represents a boolean that is true -// if the browser is running on a mobile device -func BrowserMobile(val bool) attribute.KeyValue { - return BrowserMobileKey.Bool(val) -} - -// BrowserLanguage returns an attribute KeyValue conforming to the -// "browser.language" semantic conventions. It represents the preferred -// language of the user using the browser -func BrowserLanguage(val string) attribute.KeyValue { - return BrowserLanguageKey.String(val) -} - -// A cloud environment (e.g. GCP, Azure, AWS) -const ( - // CloudProviderKey is the attribute Key conforming to the "cloud.provider" - // semantic conventions. It represents the name of the cloud provider. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - CloudProviderKey = attribute.Key("cloud.provider") - - // CloudAccountIDKey is the attribute Key conforming to the - // "cloud.account.id" semantic conventions. It represents the cloud account - // ID the resource is assigned to. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '111111111111', 'opentelemetry' - CloudAccountIDKey = attribute.Key("cloud.account.id") - - // CloudRegionKey is the attribute Key conforming to the "cloud.region" - // semantic conventions. It represents the geographical region the resource - // is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for - // example [Alibaba Cloud - // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS - // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), - // [Azure - // regions](https://azure.microsoft.com/en-us/global-infrastructure/geographies/), - // [Google Cloud regions](https://cloud.google.com/about/locations), or - // [Tencent Cloud - // regions](https://www.tencentcloud.com/document/product/213/6091). - CloudRegionKey = attribute.Key("cloud.region") - - // CloudResourceIDKey is the attribute Key conforming to the - // "cloud.resource_id" semantic conventions. It represents the cloud - // provider-specific native identifier of the monitored cloud resource - // (e.g. an - // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // on AWS, a [fully qualified resource - // ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) - // on Azure, a [full resource - // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // on GCP) - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', - // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', - // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' - // Note: On some cloud providers, it may not be possible to determine the - // full ID at startup, - // so it may be necessary to set `cloud.resource_id` as a span attribute - // instead. - // - // The exact value to use for `cloud.resource_id` depends on the cloud - // provider. - // The following well-known definitions MUST be used if you set this - // attribute and they apply: - // - // * **AWS Lambda:** The function - // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // Take care not to use the "invoked ARN" directly but replace any - // [alias - // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - // with the resolved function version, as the same runtime instance may - // be invokable with - // multiple different aliases. - // * **GCP:** The [URI of the - // resource](https://cloud.google.com/iam/docs/full-resource-names) - // * **Azure:** The [Fully Qualified Resource - // ID](https://docs.microsoft.com/en-us/rest/api/resources/resources/get-by-id) - // of the invoked function, - // *not* the function app, having the form - // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider. - CloudResourceIDKey = attribute.Key("cloud.resource_id") - - // CloudAvailabilityZoneKey is the attribute Key conforming to the - // "cloud.availability_zone" semantic conventions. It represents the cloud - // regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the - // resource is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and Google - // Cloud. - CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") - - // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" - // semantic conventions. It represents the cloud platform in use. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: The prefix of the service SHOULD match the one specified in - // `cloud.provider`. - CloudPlatformKey = attribute.Key("cloud.platform") -) - -var ( - // Alibaba Cloud - CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") - // Amazon Web Services - CloudProviderAWS = CloudProviderKey.String("aws") - // Microsoft Azure - CloudProviderAzure = CloudProviderKey.String("azure") - // Google Cloud Platform - CloudProviderGCP = CloudProviderKey.String("gcp") - // Heroku Platform as a Service - CloudProviderHeroku = CloudProviderKey.String("heroku") - // IBM Cloud - CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") - // Tencent Cloud - CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") -) - -var ( - // Alibaba Cloud Elastic Compute Service - CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") - // Alibaba Cloud Function Compute - CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") - // Red Hat OpenShift on Alibaba Cloud - CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") - // AWS Elastic Compute Cloud - CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") - // AWS Elastic Container Service - CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") - // AWS Elastic Kubernetes Service - CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") - // AWS Lambda - CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") - // AWS Elastic Beanstalk - CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") - // AWS App Runner - CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") - // Red Hat OpenShift on AWS (ROSA) - CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") - // Azure Virtual Machines - CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") - // Azure Container Instances - CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") - // Azure Kubernetes Service - CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") - // Azure Functions - CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") - // Azure App Service - CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") - // Azure Red Hat OpenShift - CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") - // Google Cloud Compute Engine (GCE) - CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") - // Google Cloud Run - CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") - // Google Cloud Kubernetes Engine (GKE) - CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") - // Google Cloud Functions (GCF) - CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") - // Google Cloud App Engine (GAE) - CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") - // Red Hat OpenShift on Google Cloud - CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") - // Red Hat OpenShift on IBM Cloud - CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") - // Tencent Cloud Cloud Virtual Machine (CVM) - CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") - // Tencent Cloud Elastic Kubernetes Service (EKS) - CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") - // Tencent Cloud Serverless Cloud Function (SCF) - CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") -) - -// CloudAccountID returns an attribute KeyValue conforming to the -// "cloud.account.id" semantic conventions. It represents the cloud account ID -// the resource is assigned to. -func CloudAccountID(val string) attribute.KeyValue { - return CloudAccountIDKey.String(val) -} - -// CloudRegion returns an attribute KeyValue conforming to the -// "cloud.region" semantic conventions. It represents the geographical region -// the resource is running. -func CloudRegion(val string) attribute.KeyValue { - return CloudRegionKey.String(val) -} - -// CloudResourceID returns an attribute KeyValue conforming to the -// "cloud.resource_id" semantic conventions. It represents the cloud -// provider-specific native identifier of the monitored cloud resource (e.g. an -// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) -// on AWS, a [fully qualified resource -// ID](https://learn.microsoft.com/en-us/rest/api/resources/resources/get-by-id) -// on Azure, a [full resource -// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) -// on GCP) -func CloudResourceID(val string) attribute.KeyValue { - return CloudResourceIDKey.String(val) -} - -// CloudAvailabilityZone returns an attribute KeyValue conforming to the -// "cloud.availability_zone" semantic conventions. It represents the cloud -// regions often have multiple, isolated locations known as zones to increase -// availability. Availability zone represents the zone where the resource is -// running. -func CloudAvailabilityZone(val string) attribute.KeyValue { - return CloudAvailabilityZoneKey.String(val) -} - -// Resources used by AWS Elastic Container Service (ECS). -const ( - // AWSECSContainerARNKey is the attribute Key conforming to the - // "aws.ecs.container.arn" semantic conventions. It represents the Amazon - // Resource Name (ARN) of an [ECS container - // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") - - // AWSECSClusterARNKey is the attribute Key conforming to the - // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an - // [ECS - // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") - - // AWSECSLaunchtypeKey is the attribute Key conforming to the - // "aws.ecs.launchtype" semantic conventions. It represents the [launch - // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // for an ECS task. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") - - // AWSECSTaskARNKey is the attribute Key conforming to the - // "aws.ecs.task.arn" semantic conventions. It represents the ARN of an - // [ECS task - // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b' - AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") - - // AWSECSTaskFamilyKey is the attribute Key conforming to the - // "aws.ecs.task.family" semantic conventions. It represents the task - // definition family this task definition is a member of. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-family' - AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") - - // AWSECSTaskRevisionKey is the attribute Key conforming to the - // "aws.ecs.task.revision" semantic conventions. It represents the revision - // for this task definition. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '8', '26' - AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") -) - -var ( - // ec2 - AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") - // fargate - AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") -) - -// AWSECSContainerARN returns an attribute KeyValue conforming to the -// "aws.ecs.container.arn" semantic conventions. It represents the Amazon -// Resource Name (ARN) of an [ECS container -// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). -func AWSECSContainerARN(val string) attribute.KeyValue { - return AWSECSContainerARNKey.String(val) -} - -// AWSECSClusterARN returns an attribute KeyValue conforming to the -// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS -// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). -func AWSECSClusterARN(val string) attribute.KeyValue { - return AWSECSClusterARNKey.String(val) -} - -// AWSECSTaskARN returns an attribute KeyValue conforming to the -// "aws.ecs.task.arn" semantic conventions. It represents the ARN of an [ECS -// task -// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html). -func AWSECSTaskARN(val string) attribute.KeyValue { - return AWSECSTaskARNKey.String(val) -} - -// AWSECSTaskFamily returns an attribute KeyValue conforming to the -// "aws.ecs.task.family" semantic conventions. It represents the task -// definition family this task definition is a member of. -func AWSECSTaskFamily(val string) attribute.KeyValue { - return AWSECSTaskFamilyKey.String(val) -} - -// AWSECSTaskRevision returns an attribute KeyValue conforming to the -// "aws.ecs.task.revision" semantic conventions. It represents the revision for -// this task definition. -func AWSECSTaskRevision(val string) attribute.KeyValue { - return AWSECSTaskRevisionKey.String(val) -} - -// Resources used by AWS Elastic Kubernetes Service (EKS). -const ( - // AWSEKSClusterARNKey is the attribute Key conforming to the - // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an - // EKS cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") -) - -// AWSEKSClusterARN returns an attribute KeyValue conforming to the -// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS -// cluster. -func AWSEKSClusterARN(val string) attribute.KeyValue { - return AWSEKSClusterARNKey.String(val) -} - -// Resources specific to Amazon Web Services. -const ( - // AWSLogGroupNamesKey is the attribute Key conforming to the - // "aws.log.group.names" semantic conventions. It represents the name(s) of - // the AWS log group(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like - // multi-container applications, where a single application has sidecar - // containers, and each write to their own log group. - AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") - - // AWSLogGroupARNsKey is the attribute Key conforming to the - // "aws.log.group.arns" semantic conventions. It represents the Amazon - // Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the [log group ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") - - // AWSLogStreamNamesKey is the attribute Key conforming to the - // "aws.log.stream.names" semantic conventions. It represents the name(s) - // of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") - - // AWSLogStreamARNsKey is the attribute Key conforming to the - // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of - // the AWS log stream(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the [log stream ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - // One log group can contain several log streams, so these ARNs necessarily - // identify both a log group and a log stream. - AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") -) - -// AWSLogGroupNames returns an attribute KeyValue conforming to the -// "aws.log.group.names" semantic conventions. It represents the name(s) of the -// AWS log group(s) an application is writing to. -func AWSLogGroupNames(val ...string) attribute.KeyValue { - return AWSLogGroupNamesKey.StringSlice(val) -} - -// AWSLogGroupARNs returns an attribute KeyValue conforming to the -// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource -// Name(s) (ARN) of the AWS log group(s). -func AWSLogGroupARNs(val ...string) attribute.KeyValue { - return AWSLogGroupARNsKey.StringSlice(val) -} - -// AWSLogStreamNames returns an attribute KeyValue conforming to the -// "aws.log.stream.names" semantic conventions. It represents the name(s) of -// the AWS log stream(s) an application is writing to. -func AWSLogStreamNames(val ...string) attribute.KeyValue { - return AWSLogStreamNamesKey.StringSlice(val) -} - -// AWSLogStreamARNs returns an attribute KeyValue conforming to the -// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the -// AWS log stream(s). -func AWSLogStreamARNs(val ...string) attribute.KeyValue { - return AWSLogStreamARNsKey.StringSlice(val) -} - -// Heroku dyno metadata -const ( - // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the - // "heroku.release.creation_timestamp" semantic conventions. It represents - // the time and date the release was created - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2022-10-23T18:00:42Z' - HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") - - // HerokuReleaseCommitKey is the attribute Key conforming to the - // "heroku.release.commit" semantic conventions. It represents the commit - // hash for the current release - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' - HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") - - // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" - // semantic conventions. It represents the unique identifier for the - // application - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' - HerokuAppIDKey = attribute.Key("heroku.app.id") -) - -// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming -// to the "heroku.release.creation_timestamp" semantic conventions. It -// represents the time and date the release was created -func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { - return HerokuReleaseCreationTimestampKey.String(val) -} - -// HerokuReleaseCommit returns an attribute KeyValue conforming to the -// "heroku.release.commit" semantic conventions. It represents the commit hash -// for the current release -func HerokuReleaseCommit(val string) attribute.KeyValue { - return HerokuReleaseCommitKey.String(val) -} - -// HerokuAppID returns an attribute KeyValue conforming to the -// "heroku.app.id" semantic conventions. It represents the unique identifier -// for the application -func HerokuAppID(val string) attribute.KeyValue { - return HerokuAppIDKey.String(val) -} - -// A container instance. -const ( - // ContainerNameKey is the attribute Key conforming to the "container.name" - // semantic conventions. It represents the container name used by container - // runtime. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-autoconf' - ContainerNameKey = attribute.Key("container.name") - - // ContainerIDKey is the attribute Key conforming to the "container.id" - // semantic conventions. It represents the container ID. Usually a UUID, as - // for example used to [identify Docker - // containers](https://docs.docker.com/engine/reference/run/#container-identification). - // The UUID might be abbreviated. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'a3bf90e006b2' - ContainerIDKey = attribute.Key("container.id") - - // ContainerRuntimeKey is the attribute Key conforming to the - // "container.runtime" semantic conventions. It represents the container - // runtime managing this container. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'docker', 'containerd', 'rkt' - ContainerRuntimeKey = attribute.Key("container.runtime") - - // ContainerImageNameKey is the attribute Key conforming to the - // "container.image.name" semantic conventions. It represents the name of - // the image the container was built on. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'gcr.io/opentelemetry/operator' - ContainerImageNameKey = attribute.Key("container.image.name") - - // ContainerImageTagKey is the attribute Key conforming to the - // "container.image.tag" semantic conventions. It represents the container - // image tag. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0.1' - ContainerImageTagKey = attribute.Key("container.image.tag") -) - -// ContainerName returns an attribute KeyValue conforming to the -// "container.name" semantic conventions. It represents the container name used -// by container runtime. -func ContainerName(val string) attribute.KeyValue { - return ContainerNameKey.String(val) -} - -// ContainerID returns an attribute KeyValue conforming to the -// "container.id" semantic conventions. It represents the container ID. Usually -// a UUID, as for example used to [identify Docker -// containers](https://docs.docker.com/engine/reference/run/#container-identification). -// The UUID might be abbreviated. -func ContainerID(val string) attribute.KeyValue { - return ContainerIDKey.String(val) -} - -// ContainerRuntime returns an attribute KeyValue conforming to the -// "container.runtime" semantic conventions. It represents the container -// runtime managing this container. -func ContainerRuntime(val string) attribute.KeyValue { - return ContainerRuntimeKey.String(val) -} - -// ContainerImageName returns an attribute KeyValue conforming to the -// "container.image.name" semantic conventions. It represents the name of the -// image the container was built on. -func ContainerImageName(val string) attribute.KeyValue { - return ContainerImageNameKey.String(val) -} - -// ContainerImageTag returns an attribute KeyValue conforming to the -// "container.image.tag" semantic conventions. It represents the container -// image tag. -func ContainerImageTag(val string) attribute.KeyValue { - return ContainerImageTagKey.String(val) -} - -// The software deployment. -const ( - // DeploymentEnvironmentKey is the attribute Key conforming to the - // "deployment.environment" semantic conventions. It represents the name of - // the [deployment - // environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka - // deployment tier). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'staging', 'production' - DeploymentEnvironmentKey = attribute.Key("deployment.environment") -) - -// DeploymentEnvironment returns an attribute KeyValue conforming to the -// "deployment.environment" semantic conventions. It represents the name of the -// [deployment -// environment](https://en.wikipedia.org/wiki/Deployment_environment) (aka -// deployment tier). -func DeploymentEnvironment(val string) attribute.KeyValue { - return DeploymentEnvironmentKey.String(val) -} - -// The device on which the process represented by this resource is running. -const ( - // DeviceIDKey is the attribute Key conforming to the "device.id" semantic - // conventions. It represents a unique identifier representing the device - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values - // outlined below. This value is not an advertising identifier and MUST NOT - // be used as such. On iOS (Swift or Objective-C), this value MUST be equal - // to the [vendor - // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). - // On Android (Java or Kotlin), this value MUST be equal to the Firebase - // Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found - // [here](https://developer.android.com/training/articles/user-data-ids) on - // best practices and exact implementation details. Caution should be taken - // when storing personal data or anything which can identify a user. GDPR - // and data protection laws may apply, ensure you do your own due - // diligence. - DeviceIDKey = attribute.Key("device.id") - - // DeviceModelIdentifierKey is the attribute Key conforming to the - // "device.model.identifier" semantic conventions. It represents the model - // identifier for the device - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine readable version - // of the model identifier rather than the market or consumer-friendly name - // of the device. - DeviceModelIdentifierKey = attribute.Key("device.model.identifier") - - // DeviceModelNameKey is the attribute Key conforming to the - // "device.model.name" semantic conventions. It represents the marketing - // name for the device model - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human readable version of - // the device model rather than a machine readable alternative. - DeviceModelNameKey = attribute.Key("device.model.name") - - // DeviceManufacturerKey is the attribute Key conforming to the - // "device.manufacturer" semantic conventions. It represents the name of - // the device manufacturer - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via - // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). - // iOS apps SHOULD hardcode the value `Apple`. - DeviceManufacturerKey = attribute.Key("device.manufacturer") -) - -// DeviceID returns an attribute KeyValue conforming to the "device.id" -// semantic conventions. It represents a unique identifier representing the -// device -func DeviceID(val string) attribute.KeyValue { - return DeviceIDKey.String(val) -} - -// DeviceModelIdentifier returns an attribute KeyValue conforming to the -// "device.model.identifier" semantic conventions. It represents the model -// identifier for the device -func DeviceModelIdentifier(val string) attribute.KeyValue { - return DeviceModelIdentifierKey.String(val) -} - -// DeviceModelName returns an attribute KeyValue conforming to the -// "device.model.name" semantic conventions. It represents the marketing name -// for the device model -func DeviceModelName(val string) attribute.KeyValue { - return DeviceModelNameKey.String(val) -} - -// DeviceManufacturer returns an attribute KeyValue conforming to the -// "device.manufacturer" semantic conventions. It represents the name of the -// device manufacturer -func DeviceManufacturer(val string) attribute.KeyValue { - return DeviceManufacturerKey.String(val) -} - -// A serverless instance. -const ( - // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic - // conventions. It represents the name of the single function that this - // runtime instance executes. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the - // FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // [`code.namespace`/`code.function`](../../trace/semantic_conventions/span-general.md#source-code-attributes) - // span attributes). - // - // For some cloud providers, the above definition is ambiguous. The - // following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud - // providers/products: - // - // * **Azure:** The full name `/`, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the `cloud.resource_id` attribute). - FaaSNameKey = attribute.Key("faas.name") - - // FaaSVersionKey is the attribute Key conforming to the "faas.version" - // semantic conventions. It represents the immutable version of the - // function being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use: - // - // * **AWS Lambda:** The [function - // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - // (an integer represented as a decimal string). - // * **Google Cloud Run:** The - // [revision](https://cloud.google.com/run/docs/managing/revisions) - // (i.e., the function name plus the revision suffix). - // * **Google Cloud Functions:** The value of the - // [`K_REVISION` environment - // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - // * **Azure Functions:** Not applicable. Do not set this attribute. - FaaSVersionKey = attribute.Key("faas.version") - - // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" - // semantic conventions. It represents the execution environment ID as a - // string, that will be potentially reused for other invocations to the - // same function/function version. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note: * **AWS Lambda:** Use the (full) log stream name. - FaaSInstanceKey = attribute.Key("faas.instance") - - // FaaSMaxMemoryKey is the attribute Key conforming to the - // "faas.max_memory" semantic conventions. It represents the amount of - // memory available to the serverless function converted to Bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 134217728 - // Note: It's recommended to set this attribute since e.g. too little - // memory can easily stop a Java AWS Lambda function from working - // correctly. On AWS Lambda, the environment variable - // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must - // be multiplied by 1,048,576). - FaaSMaxMemoryKey = attribute.Key("faas.max_memory") -) - -// FaaSName returns an attribute KeyValue conforming to the "faas.name" -// semantic conventions. It represents the name of the single function that -// this runtime instance executes. -func FaaSName(val string) attribute.KeyValue { - return FaaSNameKey.String(val) -} - -// FaaSVersion returns an attribute KeyValue conforming to the -// "faas.version" semantic conventions. It represents the immutable version of -// the function being executed. -func FaaSVersion(val string) attribute.KeyValue { - return FaaSVersionKey.String(val) -} - -// FaaSInstance returns an attribute KeyValue conforming to the -// "faas.instance" semantic conventions. It represents the execution -// environment ID as a string, that will be potentially reused for other -// invocations to the same function/function version. -func FaaSInstance(val string) attribute.KeyValue { - return FaaSInstanceKey.String(val) -} - -// FaaSMaxMemory returns an attribute KeyValue conforming to the -// "faas.max_memory" semantic conventions. It represents the amount of memory -// available to the serverless function converted to Bytes. -func FaaSMaxMemory(val int) attribute.KeyValue { - return FaaSMaxMemoryKey.Int(val) -} - -// A host is defined as a general computing instance. -const ( - // HostIDKey is the attribute Key conforming to the "host.id" semantic - // conventions. It represents the unique host ID. For Cloud, this must be - // the instance_id assigned by the cloud provider. For non-containerized - // systems, this should be the `machine-id`. See the table below for the - // sources to use to determine the `machine-id` based on operating system. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - HostIDKey = attribute.Key("host.id") - - // HostNameKey is the attribute Key conforming to the "host.name" semantic - // conventions. It represents the name of the host. On Unix systems, it may - // contain what the hostname command returns, or the fully qualified - // hostname, or another name specified by the user. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-test' - HostNameKey = attribute.Key("host.name") - - // HostTypeKey is the attribute Key conforming to the "host.type" semantic - // conventions. It represents the type of host. For Cloud, this must be the - // machine type. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'n1-standard-1' - HostTypeKey = attribute.Key("host.type") - - // HostArchKey is the attribute Key conforming to the "host.arch" semantic - // conventions. It represents the CPU architecture the host system is - // running on. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - HostArchKey = attribute.Key("host.arch") - - // HostImageNameKey is the attribute Key conforming to the - // "host.image.name" semantic conventions. It represents the name of the VM - // image or OS install the host was instantiated from. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - HostImageNameKey = attribute.Key("host.image.name") - - // HostImageIDKey is the attribute Key conforming to the "host.image.id" - // semantic conventions. It represents the vM image ID. For Cloud, this - // value is from the provider. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'ami-07b06b442921831e5' - HostImageIDKey = attribute.Key("host.image.id") - - // HostImageVersionKey is the attribute Key conforming to the - // "host.image.version" semantic conventions. It represents the version - // string of the VM image as defined in [Version - // Attributes](README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0.1' - HostImageVersionKey = attribute.Key("host.image.version") -) - -var ( - // AMD64 - HostArchAMD64 = HostArchKey.String("amd64") - // ARM32 - HostArchARM32 = HostArchKey.String("arm32") - // ARM64 - HostArchARM64 = HostArchKey.String("arm64") - // Itanium - HostArchIA64 = HostArchKey.String("ia64") - // 32-bit PowerPC - HostArchPPC32 = HostArchKey.String("ppc32") - // 64-bit PowerPC - HostArchPPC64 = HostArchKey.String("ppc64") - // IBM z/Architecture - HostArchS390x = HostArchKey.String("s390x") - // 32-bit x86 - HostArchX86 = HostArchKey.String("x86") -) - -// HostID returns an attribute KeyValue conforming to the "host.id" semantic -// conventions. It represents the unique host ID. For Cloud, this must be the -// instance_id assigned by the cloud provider. For non-containerized systems, -// this should be the `machine-id`. See the table below for the sources to use -// to determine the `machine-id` based on operating system. -func HostID(val string) attribute.KeyValue { - return HostIDKey.String(val) -} - -// HostName returns an attribute KeyValue conforming to the "host.name" -// semantic conventions. It represents the name of the host. On Unix systems, -// it may contain what the hostname command returns, or the fully qualified -// hostname, or another name specified by the user. -func HostName(val string) attribute.KeyValue { - return HostNameKey.String(val) -} - -// HostType returns an attribute KeyValue conforming to the "host.type" -// semantic conventions. It represents the type of host. For Cloud, this must -// be the machine type. -func HostType(val string) attribute.KeyValue { - return HostTypeKey.String(val) -} - -// HostImageName returns an attribute KeyValue conforming to the -// "host.image.name" semantic conventions. It represents the name of the VM -// image or OS install the host was instantiated from. -func HostImageName(val string) attribute.KeyValue { - return HostImageNameKey.String(val) -} - -// HostImageID returns an attribute KeyValue conforming to the -// "host.image.id" semantic conventions. It represents the vM image ID. For -// Cloud, this value is from the provider. -func HostImageID(val string) attribute.KeyValue { - return HostImageIDKey.String(val) -} - -// HostImageVersion returns an attribute KeyValue conforming to the -// "host.image.version" semantic conventions. It represents the version string -// of the VM image as defined in [Version -// Attributes](README.md#version-attributes). -func HostImageVersion(val string) attribute.KeyValue { - return HostImageVersionKey.String(val) -} - -// A Kubernetes Cluster. -const ( - // K8SClusterNameKey is the attribute Key conforming to the - // "k8s.cluster.name" semantic conventions. It represents the name of the - // cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-cluster' - K8SClusterNameKey = attribute.Key("k8s.cluster.name") -) - -// K8SClusterName returns an attribute KeyValue conforming to the -// "k8s.cluster.name" semantic conventions. It represents the name of the -// cluster. -func K8SClusterName(val string) attribute.KeyValue { - return K8SClusterNameKey.String(val) -} - -// A Kubernetes Node object. -const ( - // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" - // semantic conventions. It represents the name of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'node-1' - K8SNodeNameKey = attribute.Key("k8s.node.name") - - // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" - // semantic conventions. It represents the UID of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - K8SNodeUIDKey = attribute.Key("k8s.node.uid") -) - -// K8SNodeName returns an attribute KeyValue conforming to the -// "k8s.node.name" semantic conventions. It represents the name of the Node. -func K8SNodeName(val string) attribute.KeyValue { - return K8SNodeNameKey.String(val) -} - -// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" -// semantic conventions. It represents the UID of the Node. -func K8SNodeUID(val string) attribute.KeyValue { - return K8SNodeUIDKey.String(val) -} - -// A Kubernetes Namespace. -const ( - // K8SNamespaceNameKey is the attribute Key conforming to the - // "k8s.namespace.name" semantic conventions. It represents the name of the - // namespace that the pod is running in. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'default' - K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") -) - -// K8SNamespaceName returns an attribute KeyValue conforming to the -// "k8s.namespace.name" semantic conventions. It represents the name of the -// namespace that the pod is running in. -func K8SNamespaceName(val string) attribute.KeyValue { - return K8SNamespaceNameKey.String(val) -} - -// A Kubernetes Pod object. -const ( - // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" - // semantic conventions. It represents the UID of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SPodUIDKey = attribute.Key("k8s.pod.uid") - - // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" - // semantic conventions. It represents the name of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry-pod-autoconf' - K8SPodNameKey = attribute.Key("k8s.pod.name") -) - -// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" -// semantic conventions. It represents the UID of the Pod. -func K8SPodUID(val string) attribute.KeyValue { - return K8SPodUIDKey.String(val) -} - -// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" -// semantic conventions. It represents the name of the Pod. -func K8SPodName(val string) attribute.KeyValue { - return K8SPodNameKey.String(val) -} - -// A container in a -// [PodTemplate](https://kubernetes.io/docs/concepts/workloads/pods/#pod-templates). -const ( - // K8SContainerNameKey is the attribute Key conforming to the - // "k8s.container.name" semantic conventions. It represents the name of the - // Container from Pod specification, must be unique within a Pod. Container - // runtime usually uses different globally unique name (`container.name`). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'redis' - K8SContainerNameKey = attribute.Key("k8s.container.name") - - // K8SContainerRestartCountKey is the attribute Key conforming to the - // "k8s.container.restart_count" semantic conventions. It represents the - // number of times the container was restarted. This attribute can be used - // to identify a particular container (running or stopped) within a - // container spec. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 0, 2 - K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") -) - -// K8SContainerName returns an attribute KeyValue conforming to the -// "k8s.container.name" semantic conventions. It represents the name of the -// Container from Pod specification, must be unique within a Pod. Container -// runtime usually uses different globally unique name (`container.name`). -func K8SContainerName(val string) attribute.KeyValue { - return K8SContainerNameKey.String(val) -} - -// K8SContainerRestartCount returns an attribute KeyValue conforming to the -// "k8s.container.restart_count" semantic conventions. It represents the number -// of times the container was restarted. This attribute can be used to identify -// a particular container (running or stopped) within a container spec. -func K8SContainerRestartCount(val int) attribute.KeyValue { - return K8SContainerRestartCountKey.Int(val) -} - -// A Kubernetes ReplicaSet object. -const ( - // K8SReplicaSetUIDKey is the attribute Key conforming to the - // "k8s.replicaset.uid" semantic conventions. It represents the UID of the - // ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") - - // K8SReplicaSetNameKey is the attribute Key conforming to the - // "k8s.replicaset.name" semantic conventions. It represents the name of - // the ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") -) - -// K8SReplicaSetUID returns an attribute KeyValue conforming to the -// "k8s.replicaset.uid" semantic conventions. It represents the UID of the -// ReplicaSet. -func K8SReplicaSetUID(val string) attribute.KeyValue { - return K8SReplicaSetUIDKey.String(val) -} - -// K8SReplicaSetName returns an attribute KeyValue conforming to the -// "k8s.replicaset.name" semantic conventions. It represents the name of the -// ReplicaSet. -func K8SReplicaSetName(val string) attribute.KeyValue { - return K8SReplicaSetNameKey.String(val) -} - -// A Kubernetes Deployment object. -const ( - // K8SDeploymentUIDKey is the attribute Key conforming to the - // "k8s.deployment.uid" semantic conventions. It represents the UID of the - // Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") - - // K8SDeploymentNameKey is the attribute Key conforming to the - // "k8s.deployment.name" semantic conventions. It represents the name of - // the Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") -) - -// K8SDeploymentUID returns an attribute KeyValue conforming to the -// "k8s.deployment.uid" semantic conventions. It represents the UID of the -// Deployment. -func K8SDeploymentUID(val string) attribute.KeyValue { - return K8SDeploymentUIDKey.String(val) -} - -// K8SDeploymentName returns an attribute KeyValue conforming to the -// "k8s.deployment.name" semantic conventions. It represents the name of the -// Deployment. -func K8SDeploymentName(val string) attribute.KeyValue { - return K8SDeploymentNameKey.String(val) -} - -// A Kubernetes StatefulSet object. -const ( - // K8SStatefulSetUIDKey is the attribute Key conforming to the - // "k8s.statefulset.uid" semantic conventions. It represents the UID of the - // StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") - - // K8SStatefulSetNameKey is the attribute Key conforming to the - // "k8s.statefulset.name" semantic conventions. It represents the name of - // the StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") -) - -// K8SStatefulSetUID returns an attribute KeyValue conforming to the -// "k8s.statefulset.uid" semantic conventions. It represents the UID of the -// StatefulSet. -func K8SStatefulSetUID(val string) attribute.KeyValue { - return K8SStatefulSetUIDKey.String(val) -} - -// K8SStatefulSetName returns an attribute KeyValue conforming to the -// "k8s.statefulset.name" semantic conventions. It represents the name of the -// StatefulSet. -func K8SStatefulSetName(val string) attribute.KeyValue { - return K8SStatefulSetNameKey.String(val) -} - -// A Kubernetes DaemonSet object. -const ( - // K8SDaemonSetUIDKey is the attribute Key conforming to the - // "k8s.daemonset.uid" semantic conventions. It represents the UID of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") - - // K8SDaemonSetNameKey is the attribute Key conforming to the - // "k8s.daemonset.name" semantic conventions. It represents the name of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") -) - -// K8SDaemonSetUID returns an attribute KeyValue conforming to the -// "k8s.daemonset.uid" semantic conventions. It represents the UID of the -// DaemonSet. -func K8SDaemonSetUID(val string) attribute.KeyValue { - return K8SDaemonSetUIDKey.String(val) -} - -// K8SDaemonSetName returns an attribute KeyValue conforming to the -// "k8s.daemonset.name" semantic conventions. It represents the name of the -// DaemonSet. -func K8SDaemonSetName(val string) attribute.KeyValue { - return K8SDaemonSetNameKey.String(val) -} - -// A Kubernetes Job object. -const ( - // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" - // semantic conventions. It represents the UID of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SJobUIDKey = attribute.Key("k8s.job.uid") - - // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" - // semantic conventions. It represents the name of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SJobNameKey = attribute.Key("k8s.job.name") -) - -// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" -// semantic conventions. It represents the UID of the Job. -func K8SJobUID(val string) attribute.KeyValue { - return K8SJobUIDKey.String(val) -} - -// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" -// semantic conventions. It represents the name of the Job. -func K8SJobName(val string) attribute.KeyValue { - return K8SJobNameKey.String(val) -} - -// A Kubernetes CronJob object. -const ( - // K8SCronJobUIDKey is the attribute Key conforming to the - // "k8s.cronjob.uid" semantic conventions. It represents the UID of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") - - // K8SCronJobNameKey is the attribute Key conforming to the - // "k8s.cronjob.name" semantic conventions. It represents the name of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'opentelemetry' - K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") -) - -// K8SCronJobUID returns an attribute KeyValue conforming to the -// "k8s.cronjob.uid" semantic conventions. It represents the UID of the -// CronJob. -func K8SCronJobUID(val string) attribute.KeyValue { - return K8SCronJobUIDKey.String(val) -} - -// K8SCronJobName returns an attribute KeyValue conforming to the -// "k8s.cronjob.name" semantic conventions. It represents the name of the -// CronJob. -func K8SCronJobName(val string) attribute.KeyValue { - return K8SCronJobNameKey.String(val) -} - -// The operating system (OS) on which the process represented by this resource -// is running. -const ( - // OSTypeKey is the attribute Key conforming to the "os.type" semantic - // conventions. It represents the operating system type. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - OSTypeKey = attribute.Key("os.type") - - // OSDescriptionKey is the attribute Key conforming to the "os.description" - // semantic conventions. It represents the human readable (not intended to - // be parsed) OS version information, like e.g. reported by `ver` or - // `lsb_release -a` commands. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 - // LTS' - OSDescriptionKey = attribute.Key("os.description") - - // OSNameKey is the attribute Key conforming to the "os.name" semantic - // conventions. It represents the human readable operating system name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'iOS', 'Android', 'Ubuntu' - OSNameKey = attribute.Key("os.name") - - // OSVersionKey is the attribute Key conforming to the "os.version" - // semantic conventions. It represents the version string of the operating - // system as defined in [Version - // Attributes](../../resource/semantic_conventions/README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '14.2.1', '18.04.1' - OSVersionKey = attribute.Key("os.version") -) - -var ( - // Microsoft Windows - OSTypeWindows = OSTypeKey.String("windows") - // Linux - OSTypeLinux = OSTypeKey.String("linux") - // Apple Darwin - OSTypeDarwin = OSTypeKey.String("darwin") - // FreeBSD - OSTypeFreeBSD = OSTypeKey.String("freebsd") - // NetBSD - OSTypeNetBSD = OSTypeKey.String("netbsd") - // OpenBSD - OSTypeOpenBSD = OSTypeKey.String("openbsd") - // DragonFly BSD - OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") - // HP-UX (Hewlett Packard Unix) - OSTypeHPUX = OSTypeKey.String("hpux") - // AIX (Advanced Interactive eXecutive) - OSTypeAIX = OSTypeKey.String("aix") - // SunOS, Oracle Solaris - OSTypeSolaris = OSTypeKey.String("solaris") - // IBM z/OS - OSTypeZOS = OSTypeKey.String("z_os") -) - -// OSDescription returns an attribute KeyValue conforming to the -// "os.description" semantic conventions. It represents the human readable (not -// intended to be parsed) OS version information, like e.g. reported by `ver` -// or `lsb_release -a` commands. -func OSDescription(val string) attribute.KeyValue { - return OSDescriptionKey.String(val) -} - -// OSName returns an attribute KeyValue conforming to the "os.name" semantic -// conventions. It represents the human readable operating system name. -func OSName(val string) attribute.KeyValue { - return OSNameKey.String(val) -} - -// OSVersion returns an attribute KeyValue conforming to the "os.version" -// semantic conventions. It represents the version string of the operating -// system as defined in [Version -// Attributes](../../resource/semantic_conventions/README.md#version-attributes). -func OSVersion(val string) attribute.KeyValue { - return OSVersionKey.String(val) -} - -// An operating system process. -const ( - // ProcessPIDKey is the attribute Key conforming to the "process.pid" - // semantic conventions. It represents the process identifier (PID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 1234 - ProcessPIDKey = attribute.Key("process.pid") - - // ProcessParentPIDKey is the attribute Key conforming to the - // "process.parent_pid" semantic conventions. It represents the parent - // Process identifier (PID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 111 - ProcessParentPIDKey = attribute.Key("process.parent_pid") - - // ProcessExecutableNameKey is the attribute Key conforming to the - // "process.executable.name" semantic conventions. It represents the name - // of the process executable. On Linux based systems, can be set to the - // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name - // of `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'otelcol' - ProcessExecutableNameKey = attribute.Key("process.executable.name") - - // ProcessExecutablePathKey is the attribute Key conforming to the - // "process.executable.path" semantic conventions. It represents the full - // path to the process executable. On Linux based systems, can be set to - // the target of `proc/[pid]/exe`. On Windows, can be set to the result of - // `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: '/usr/bin/cmd/otelcol' - ProcessExecutablePathKey = attribute.Key("process.executable.path") - - // ProcessCommandKey is the attribute Key conforming to the - // "process.command" semantic conventions. It represents the command used - // to launch the process (i.e. the command name). On Linux based systems, - // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can - // be set to the first parameter extracted from `GetCommandLineW`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'cmd/otelcol' - ProcessCommandKey = attribute.Key("process.command") - - // ProcessCommandLineKey is the attribute Key conforming to the - // "process.command_line" semantic conventions. It represents the full - // command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of `GetCommandLineW`. - // Do not set this if you have to assemble it just for monitoring; use - // `process.command_args` instead. - // - // Type: string - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - ProcessCommandLineKey = attribute.Key("process.command_line") - - // ProcessCommandArgsKey is the attribute Key conforming to the - // "process.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited - // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, - // this would be the full argv vector passed to `main`. - // - // Type: string[] - // RequirementLevel: ConditionallyRequired (See alternative attributes - // below.) - // Stability: stable - // Examples: 'cmd/otecol', '--config=config.yaml' - ProcessCommandArgsKey = attribute.Key("process.command_args") - - // ProcessOwnerKey is the attribute Key conforming to the "process.owner" - // semantic conventions. It represents the username of the user that owns - // the process. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'root' - ProcessOwnerKey = attribute.Key("process.owner") -) - -// ProcessPID returns an attribute KeyValue conforming to the "process.pid" -// semantic conventions. It represents the process identifier (PID). -func ProcessPID(val int) attribute.KeyValue { - return ProcessPIDKey.Int(val) -} - -// ProcessParentPID returns an attribute KeyValue conforming to the -// "process.parent_pid" semantic conventions. It represents the parent Process -// identifier (PID). -func ProcessParentPID(val int) attribute.KeyValue { - return ProcessParentPIDKey.Int(val) -} - -// ProcessExecutableName returns an attribute KeyValue conforming to the -// "process.executable.name" semantic conventions. It represents the name of -// the process executable. On Linux based systems, can be set to the `Name` in -// `proc/[pid]/status`. On Windows, can be set to the base name of -// `GetProcessImageFileNameW`. -func ProcessExecutableName(val string) attribute.KeyValue { - return ProcessExecutableNameKey.String(val) -} - -// ProcessExecutablePath returns an attribute KeyValue conforming to the -// "process.executable.path" semantic conventions. It represents the full path -// to the process executable. On Linux based systems, can be set to the target -// of `proc/[pid]/exe`. On Windows, can be set to the result of -// `GetProcessImageFileNameW`. -func ProcessExecutablePath(val string) attribute.KeyValue { - return ProcessExecutablePathKey.String(val) -} - -// ProcessCommand returns an attribute KeyValue conforming to the -// "process.command" semantic conventions. It represents the command used to -// launch the process (i.e. the command name). On Linux based systems, can be -// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to -// the first parameter extracted from `GetCommandLineW`. -func ProcessCommand(val string) attribute.KeyValue { - return ProcessCommandKey.String(val) -} - -// ProcessCommandLine returns an attribute KeyValue conforming to the -// "process.command_line" semantic conventions. It represents the full command -// used to launch the process as a single string representing the full command. -// On Windows, can be set to the result of `GetCommandLineW`. Do not set this -// if you have to assemble it just for monitoring; use `process.command_args` -// instead. -func ProcessCommandLine(val string) attribute.KeyValue { - return ProcessCommandLineKey.String(val) -} - -// ProcessCommandArgs returns an attribute KeyValue conforming to the -// "process.command_args" semantic conventions. It represents the all the -// command arguments (including the command/executable itself) as received by -// the process. On Linux-based systems (and some other Unixoid systems -// supporting procfs), can be set according to the list of null-delimited -// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, -// this would be the full argv vector passed to `main`. -func ProcessCommandArgs(val ...string) attribute.KeyValue { - return ProcessCommandArgsKey.StringSlice(val) -} - -// ProcessOwner returns an attribute KeyValue conforming to the -// "process.owner" semantic conventions. It represents the username of the user -// that owns the process. -func ProcessOwner(val string) attribute.KeyValue { - return ProcessOwnerKey.String(val) -} - -// The single (language) runtime instance which is monitored. -const ( - // ProcessRuntimeNameKey is the attribute Key conforming to the - // "process.runtime.name" semantic conventions. It represents the name of - // the runtime of this process. For compiled native binaries, this SHOULD - // be the name of the compiler. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'OpenJDK Runtime Environment' - ProcessRuntimeNameKey = attribute.Key("process.runtime.name") - - // ProcessRuntimeVersionKey is the attribute Key conforming to the - // "process.runtime.version" semantic conventions. It represents the - // version of the runtime of this process, as returned by the runtime - // without modification. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '14.0.2' - ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") - - // ProcessRuntimeDescriptionKey is the attribute Key conforming to the - // "process.runtime.description" semantic conventions. It represents an - // additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") -) - -// ProcessRuntimeName returns an attribute KeyValue conforming to the -// "process.runtime.name" semantic conventions. It represents the name of the -// runtime of this process. For compiled native binaries, this SHOULD be the -// name of the compiler. -func ProcessRuntimeName(val string) attribute.KeyValue { - return ProcessRuntimeNameKey.String(val) -} - -// ProcessRuntimeVersion returns an attribute KeyValue conforming to the -// "process.runtime.version" semantic conventions. It represents the version of -// the runtime of this process, as returned by the runtime without -// modification. -func ProcessRuntimeVersion(val string) attribute.KeyValue { - return ProcessRuntimeVersionKey.String(val) -} - -// ProcessRuntimeDescription returns an attribute KeyValue conforming to the -// "process.runtime.description" semantic conventions. It represents an -// additional description about the runtime of the process, for example a -// specific vendor customization of the runtime environment. -func ProcessRuntimeDescription(val string) attribute.KeyValue { - return ProcessRuntimeDescriptionKey.String(val) -} - -// A service instance. -const ( - // ServiceNameKey is the attribute Key conforming to the "service.name" - // semantic conventions. It represents the logical name of the service. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled - // services. If the value was not specified, SDKs MUST fallback to - // `unknown_service:` concatenated with - // [`process.executable.name`](process.md#process), e.g. - // `unknown_service:bash`. If `process.executable.name` is not available, - // the value MUST be set to `unknown_service`. - ServiceNameKey = attribute.Key("service.name") -) - -// ServiceName returns an attribute KeyValue conforming to the -// "service.name" semantic conventions. It represents the logical name of the -// service. -func ServiceName(val string) attribute.KeyValue { - return ServiceNameKey.String(val) -} - -// A service instance. -const ( - // ServiceNamespaceKey is the attribute Key conforming to the - // "service.namespace" semantic conventions. It represents a namespace for - // `service.name`. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group - // of services, for example the team name that owns a group of services. - // `service.name` is expected to be unique within the same namespace. If - // `service.namespace` is not specified in the Resource then `service.name` - // is expected to be unique for all services that have no explicit - // namespace defined (so the empty/unspecified namespace is simply one more - // valid namespace). Zero-length namespace string is assumed equal to - // unspecified namespace. - ServiceNamespaceKey = attribute.Key("service.namespace") - - // ServiceInstanceIDKey is the attribute Key conforming to the - // "service.instance.id" semantic conventions. It represents the string ID - // of the service instance. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'my-k8s-pod-deployment-1', - // '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // `service.namespace,service.name` pair (in other words - // `service.namespace,service.name,service.instance.id` triplet MUST be - // globally unique). The ID helps to distinguish instances of the same - // service that exist at the same time (e.g. instances of a horizontally - // scaled service). It is preferable for the ID to be persistent and stay - // the same for the lifetime of the service instance, however it is - // acceptable that the ID is ephemeral and changes during important - // lifetime events for the service (e.g. service restarts). If the service - // has no inherent unique ID that can be used as the value of this - // attribute it is recommended to generate a random Version 1 or Version 4 - // RFC 4122 UUID (services aiming for reproducible UUIDs may also use - // Version 5, see RFC 4122 for more recommendations). - ServiceInstanceIDKey = attribute.Key("service.instance.id") - - // ServiceVersionKey is the attribute Key conforming to the - // "service.version" semantic conventions. It represents the version string - // of the service API or implementation. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2.0.0' - ServiceVersionKey = attribute.Key("service.version") -) - -// ServiceNamespace returns an attribute KeyValue conforming to the -// "service.namespace" semantic conventions. It represents a namespace for -// `service.name`. -func ServiceNamespace(val string) attribute.KeyValue { - return ServiceNamespaceKey.String(val) -} - -// ServiceInstanceID returns an attribute KeyValue conforming to the -// "service.instance.id" semantic conventions. It represents the string ID of -// the service instance. -func ServiceInstanceID(val string) attribute.KeyValue { - return ServiceInstanceIDKey.String(val) -} - -// ServiceVersion returns an attribute KeyValue conforming to the -// "service.version" semantic conventions. It represents the version string of -// the service API or implementation. -func ServiceVersion(val string) attribute.KeyValue { - return ServiceVersionKey.String(val) -} - -// The telemetry SDK used to capture data recorded by the instrumentation -// libraries. -const ( - // TelemetrySDKNameKey is the attribute Key conforming to the - // "telemetry.sdk.name" semantic conventions. It represents the name of the - // telemetry SDK as defined above. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'opentelemetry' - TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") - - // TelemetrySDKLanguageKey is the attribute Key conforming to the - // "telemetry.sdk.language" semantic conventions. It represents the - // language of the telemetry SDK. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") - - // TelemetrySDKVersionKey is the attribute Key conforming to the - // "telemetry.sdk.version" semantic conventions. It represents the version - // string of the telemetry SDK. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '1.2.3' - TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") -) - -var ( - // cpp - TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") - // dotnet - TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") - // erlang - TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") - // go - TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") - // java - TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") - // nodejs - TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") - // php - TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") - // python - TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") - // ruby - TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") - // webjs - TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") - // swift - TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") -) - -// TelemetrySDKName returns an attribute KeyValue conforming to the -// "telemetry.sdk.name" semantic conventions. It represents the name of the -// telemetry SDK as defined above. -func TelemetrySDKName(val string) attribute.KeyValue { - return TelemetrySDKNameKey.String(val) -} - -// TelemetrySDKVersion returns an attribute KeyValue conforming to the -// "telemetry.sdk.version" semantic conventions. It represents the version -// string of the telemetry SDK. -func TelemetrySDKVersion(val string) attribute.KeyValue { - return TelemetrySDKVersionKey.String(val) -} - -// The telemetry SDK used to capture data recorded by the instrumentation -// libraries. -const ( - // TelemetryAutoVersionKey is the attribute Key conforming to the - // "telemetry.auto.version" semantic conventions. It represents the version - // string of the auto instrumentation agent, if used. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.2.3' - TelemetryAutoVersionKey = attribute.Key("telemetry.auto.version") -) - -// TelemetryAutoVersion returns an attribute KeyValue conforming to the -// "telemetry.auto.version" semantic conventions. It represents the version -// string of the auto instrumentation agent, if used. -func TelemetryAutoVersion(val string) attribute.KeyValue { - return TelemetryAutoVersionKey.String(val) -} - -// Resource describing the packaged software running the application code. Web -// engines are typically executed using process.runtime. -const ( - // WebEngineNameKey is the attribute Key conforming to the "webengine.name" - // semantic conventions. It represents the name of the web engine. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'WildFly' - WebEngineNameKey = attribute.Key("webengine.name") - - // WebEngineVersionKey is the attribute Key conforming to the - // "webengine.version" semantic conventions. It represents the version of - // the web engine. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '21.0.0' - WebEngineVersionKey = attribute.Key("webengine.version") - - // WebEngineDescriptionKey is the attribute Key conforming to the - // "webengine.description" semantic conventions. It represents the - // additional description of the web engine (e.g. detailed version and - // edition information). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - - // 2.2.2.Final' - WebEngineDescriptionKey = attribute.Key("webengine.description") -) - -// WebEngineName returns an attribute KeyValue conforming to the -// "webengine.name" semantic conventions. It represents the name of the web -// engine. -func WebEngineName(val string) attribute.KeyValue { - return WebEngineNameKey.String(val) -} - -// WebEngineVersion returns an attribute KeyValue conforming to the -// "webengine.version" semantic conventions. It represents the version of the -// web engine. -func WebEngineVersion(val string) attribute.KeyValue { - return WebEngineVersionKey.String(val) -} - -// WebEngineDescription returns an attribute KeyValue conforming to the -// "webengine.description" semantic conventions. It represents the additional -// description of the web engine (e.g. detailed version and edition -// information). -func WebEngineDescription(val string) attribute.KeyValue { - return WebEngineDescriptionKey.String(val) -} - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's -// concepts. -const ( - // OTelScopeNameKey is the attribute Key conforming to the - // "otel.scope.name" semantic conventions. It represents the name of the - // instrumentation scope - (`InstrumentationScope.Name` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - OTelScopeNameKey = attribute.Key("otel.scope.name") - - // OTelScopeVersionKey is the attribute Key conforming to the - // "otel.scope.version" semantic conventions. It represents the version of - // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.0.0' - OTelScopeVersionKey = attribute.Key("otel.scope.version") -) - -// OTelScopeName returns an attribute KeyValue conforming to the -// "otel.scope.name" semantic conventions. It represents the name of the -// instrumentation scope - (`InstrumentationScope.Name` in OTLP). -func OTelScopeName(val string) attribute.KeyValue { - return OTelScopeNameKey.String(val) -} - -// OTelScopeVersion returns an attribute KeyValue conforming to the -// "otel.scope.version" semantic conventions. It represents the version of the -// instrumentation scope - (`InstrumentationScope.Version` in OTLP). -func OTelScopeVersion(val string) attribute.KeyValue { - return OTelScopeVersionKey.String(val) -} - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry -// Scope's concepts. -const ( - // OTelLibraryNameKey is the attribute Key conforming to the - // "otel.library.name" semantic conventions. It represents the deprecated, - // use the `otel.scope.name` attribute. - // - // Type: string - // RequirementLevel: Optional - // Stability: deprecated - // Examples: 'io.opentelemetry.contrib.mongodb' - OTelLibraryNameKey = attribute.Key("otel.library.name") - - // OTelLibraryVersionKey is the attribute Key conforming to the - // "otel.library.version" semantic conventions. It represents the - // deprecated, use the `otel.scope.version` attribute. - // - // Type: string - // RequirementLevel: Optional - // Stability: deprecated - // Examples: '1.0.0' - OTelLibraryVersionKey = attribute.Key("otel.library.version") -) - -// OTelLibraryName returns an attribute KeyValue conforming to the -// "otel.library.name" semantic conventions. It represents the deprecated, use -// the `otel.scope.name` attribute. -func OTelLibraryName(val string) attribute.KeyValue { - return OTelLibraryNameKey.String(val) -} - -// OTelLibraryVersion returns an attribute KeyValue conforming to the -// "otel.library.version" semantic conventions. It represents the deprecated, -// use the `otel.scope.version` attribute. -func OTelLibraryVersion(val string) attribute.KeyValue { - return OTelLibraryVersionKey.String(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go deleted file mode 100644 index 95d0210e38..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.20.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go b/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go deleted file mode 100644 index 90b1b0452c..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.20.0/trace.go +++ /dev/null @@ -1,2599 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.20.0" - -import "go.opentelemetry.io/otel/attribute" - -// The shared attributes used to report a single exception associated with a -// span or log. -const ( - // ExceptionTypeKey is the attribute Key conforming to the "exception.type" - // semantic conventions. It represents the type of the exception (its - // fully-qualified class name, if applicable). The dynamic type of the - // exception should be preferred over the static type in languages that - // support it. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - ExceptionTypeKey = attribute.Key("exception.type") - - // ExceptionMessageKey is the attribute Key conforming to the - // "exception.message" semantic conventions. It represents the exception - // message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str - // implicitly" - ExceptionMessageKey = attribute.Key("exception.message") - - // ExceptionStacktraceKey is the attribute Key conforming to the - // "exception.stacktrace" semantic conventions. It represents a stacktrace - // as a string in the natural representation for the language runtime. The - // representation is to be determined and documented by each language SIG. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - ExceptionStacktraceKey = attribute.Key("exception.stacktrace") -) - -// ExceptionType returns an attribute KeyValue conforming to the -// "exception.type" semantic conventions. It represents the type of the -// exception (its fully-qualified class name, if applicable). The dynamic type -// of the exception should be preferred over the static type in languages that -// support it. -func ExceptionType(val string) attribute.KeyValue { - return ExceptionTypeKey.String(val) -} - -// ExceptionMessage returns an attribute KeyValue conforming to the -// "exception.message" semantic conventions. It represents the exception -// message. -func ExceptionMessage(val string) attribute.KeyValue { - return ExceptionMessageKey.String(val) -} - -// ExceptionStacktrace returns an attribute KeyValue conforming to the -// "exception.stacktrace" semantic conventions. It represents a stacktrace as a -// string in the natural representation for the language runtime. The -// representation is to be determined and documented by each language SIG. -func ExceptionStacktrace(val string) attribute.KeyValue { - return ExceptionStacktraceKey.String(val) -} - -// The attributes described in this section are rather generic. They may be -// used in any Log Record they apply to. -const ( - // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" - // semantic conventions. It represents a unique identifier for the Log - // Record. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' - // Note: If an id is provided, other log records with the same id will be - // considered duplicates and can be removed safely. This means, that two - // distinguishable log records MUST have different values. - // The id MAY be an [Universally Unique Lexicographically Sortable - // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers - // (e.g. UUID) may be used as needed. - LogRecordUIDKey = attribute.Key("log.record.uid") -) - -// LogRecordUID returns an attribute KeyValue conforming to the -// "log.record.uid" semantic conventions. It represents a unique identifier for -// the Log Record. -func LogRecordUID(val string) attribute.KeyValue { - return LogRecordUIDKey.String(val) -} - -// Span attributes used by AWS Lambda (in addition to general `faas` -// attributes). -const ( - // AWSLambdaInvokedARNKey is the attribute Key conforming to the - // "aws.lambda.invoked_arn" semantic conventions. It represents the full - // invoked ARN as provided on the `Context` passed to the function - // (`Lambda-Runtime-Invoked-Function-ARN` header on the - // `/runtime/invocation/next` applicable). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from `cloud.resource_id` if an alias is - // involved. - AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") -) - -// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the -// "aws.lambda.invoked_arn" semantic conventions. It represents the full -// invoked ARN as provided on the `Context` passed to the function -// (`Lambda-Runtime-Invoked-Function-ARN` header on the -// `/runtime/invocation/next` applicable). -func AWSLambdaInvokedARN(val string) attribute.KeyValue { - return AWSLambdaInvokedARNKey.String(val) -} - -// Attributes for CloudEvents. CloudEvents is a specification on how to define -// event data in a standard way. These attributes can be attached to spans when -// performing operations with CloudEvents, regardless of the protocol being -// used. -const ( - // CloudeventsEventIDKey is the attribute Key conforming to the - // "cloudevents.event_id" semantic conventions. It represents the - // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) - // uniquely identifies the event. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") - - // CloudeventsEventSourceKey is the attribute Key conforming to the - // "cloudevents.event_source" semantic conventions. It represents the - // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) - // identifies the context in which an event happened. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'https://github.com/cloudevents', - // '/cloudevents/spec/pull/123', 'my-service' - CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") - - // CloudeventsEventSpecVersionKey is the attribute Key conforming to the - // "cloudevents.event_spec_version" semantic conventions. It represents the - // [version of the CloudEvents - // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) - // which the event uses. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.0' - CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") - - // CloudeventsEventTypeKey is the attribute Key conforming to the - // "cloudevents.event_type" semantic conventions. It represents the - // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) - // contains a value describing the type of event related to the originating - // occurrence. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'com.github.pull_request.opened', - // 'com.example.object.deleted.v2' - CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") - - // CloudeventsEventSubjectKey is the attribute Key conforming to the - // "cloudevents.event_subject" semantic conventions. It represents the - // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) - // of the event in the context of the event producer (identified by - // source). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'mynewfile.jpg' - CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") -) - -// CloudeventsEventID returns an attribute KeyValue conforming to the -// "cloudevents.event_id" semantic conventions. It represents the -// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) -// uniquely identifies the event. -func CloudeventsEventID(val string) attribute.KeyValue { - return CloudeventsEventIDKey.String(val) -} - -// CloudeventsEventSource returns an attribute KeyValue conforming to the -// "cloudevents.event_source" semantic conventions. It represents the -// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) -// identifies the context in which an event happened. -func CloudeventsEventSource(val string) attribute.KeyValue { - return CloudeventsEventSourceKey.String(val) -} - -// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to -// the "cloudevents.event_spec_version" semantic conventions. It represents the -// [version of the CloudEvents -// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) -// which the event uses. -func CloudeventsEventSpecVersion(val string) attribute.KeyValue { - return CloudeventsEventSpecVersionKey.String(val) -} - -// CloudeventsEventType returns an attribute KeyValue conforming to the -// "cloudevents.event_type" semantic conventions. It represents the -// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) -// contains a value describing the type of event related to the originating -// occurrence. -func CloudeventsEventType(val string) attribute.KeyValue { - return CloudeventsEventTypeKey.String(val) -} - -// CloudeventsEventSubject returns an attribute KeyValue conforming to the -// "cloudevents.event_subject" semantic conventions. It represents the -// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) -// of the event in the context of the event producer (identified by source). -func CloudeventsEventSubject(val string) attribute.KeyValue { - return CloudeventsEventSubjectKey.String(val) -} - -// Semantic conventions for the OpenTracing Shim -const ( - // OpentracingRefTypeKey is the attribute Key conforming to the - // "opentracing.ref_type" semantic conventions. It represents the - // parent-child Reference type - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: The causal relationship between a child Span and a parent Span. - OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") -) - -var ( - // The parent Span depends on the child Span in some capacity - OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") - // The parent Span does not depend in any way on the result of the child Span - OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") -) - -// The attributes used to perform database client calls. -const ( - // DBSystemKey is the attribute Key conforming to the "db.system" semantic - // conventions. It represents an identifier for the database management - // system (DBMS) product being used. See below for a list of well-known - // identifiers. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - DBSystemKey = attribute.Key("db.system") - - // DBConnectionStringKey is the attribute Key conforming to the - // "db.connection_string" semantic conventions. It represents the - // connection string used to connect to the database. It is recommended to - // remove embedded credentials. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Server=(localdb)\\v11.0;Integrated Security=true;' - DBConnectionStringKey = attribute.Key("db.connection_string") - - // DBUserKey is the attribute Key conforming to the "db.user" semantic - // conventions. It represents the username for accessing the database. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'readonly_user', 'reporting_user' - DBUserKey = attribute.Key("db.user") - - // DBJDBCDriverClassnameKey is the attribute Key conforming to the - // "db.jdbc.driver_classname" semantic conventions. It represents the - // fully-qualified class name of the [Java Database Connectivity - // (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) - // driver used to connect. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'org.postgresql.Driver', - // 'com.microsoft.sqlserver.jdbc.SQLServerDriver' - DBJDBCDriverClassnameKey = attribute.Key("db.jdbc.driver_classname") - - // DBNameKey is the attribute Key conforming to the "db.name" semantic - // conventions. It represents the this attribute is used to report the name - // of the database being accessed. For commands that switch the database, - // this should be set to the target database (even if the command fails). - // - // Type: string - // RequirementLevel: ConditionallyRequired (If applicable.) - // Stability: stable - // Examples: 'customers', 'main' - // Note: In some SQL databases, the database name to be used is called - // "schema name". In case there are multiple layers that could be - // considered for database name (e.g. Oracle instance name and schema - // name), the database name to be used is the more specific layer (e.g. - // Oracle schema name). - DBNameKey = attribute.Key("db.name") - - // DBStatementKey is the attribute Key conforming to the "db.statement" - // semantic conventions. It represents the database statement being - // executed. - // - // Type: string - // RequirementLevel: Recommended (Should be collected by default only if - // there is sanitization that excludes sensitive information.) - // Stability: stable - // Examples: 'SELECT * FROM wuser_table', 'SET mykey "WuValue"' - DBStatementKey = attribute.Key("db.statement") - - // DBOperationKey is the attribute Key conforming to the "db.operation" - // semantic conventions. It represents the name of the operation being - // executed, e.g. the [MongoDB command - // name](https://docs.mongodb.com/manual/reference/command/#database-operations) - // such as `findAndModify`, or the SQL keyword. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If `db.statement` is not - // applicable.) - // Stability: stable - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: When setting this to an SQL keyword, it is not recommended to - // attempt any client-side parsing of `db.statement` just to get this - // property, but it should be set if the operation name is provided by the - // library being instrumented. If the SQL statement has an ambiguous - // operation, or performs more than one operation, this value may be - // omitted. - DBOperationKey = attribute.Key("db.operation") -) - -var ( - // Some other SQL database. Fallback only. See notes - DBSystemOtherSQL = DBSystemKey.String("other_sql") - // Microsoft SQL Server - DBSystemMSSQL = DBSystemKey.String("mssql") - // Microsoft SQL Server Compact - DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") - // MySQL - DBSystemMySQL = DBSystemKey.String("mysql") - // Oracle Database - DBSystemOracle = DBSystemKey.String("oracle") - // IBM DB2 - DBSystemDB2 = DBSystemKey.String("db2") - // PostgreSQL - DBSystemPostgreSQL = DBSystemKey.String("postgresql") - // Amazon Redshift - DBSystemRedshift = DBSystemKey.String("redshift") - // Apache Hive - DBSystemHive = DBSystemKey.String("hive") - // Cloudscape - DBSystemCloudscape = DBSystemKey.String("cloudscape") - // HyperSQL DataBase - DBSystemHSQLDB = DBSystemKey.String("hsqldb") - // Progress Database - DBSystemProgress = DBSystemKey.String("progress") - // SAP MaxDB - DBSystemMaxDB = DBSystemKey.String("maxdb") - // SAP HANA - DBSystemHanaDB = DBSystemKey.String("hanadb") - // Ingres - DBSystemIngres = DBSystemKey.String("ingres") - // FirstSQL - DBSystemFirstSQL = DBSystemKey.String("firstsql") - // EnterpriseDB - DBSystemEDB = DBSystemKey.String("edb") - // InterSystems Caché - DBSystemCache = DBSystemKey.String("cache") - // Adabas (Adaptable Database System) - DBSystemAdabas = DBSystemKey.String("adabas") - // Firebird - DBSystemFirebird = DBSystemKey.String("firebird") - // Apache Derby - DBSystemDerby = DBSystemKey.String("derby") - // FileMaker - DBSystemFilemaker = DBSystemKey.String("filemaker") - // Informix - DBSystemInformix = DBSystemKey.String("informix") - // InstantDB - DBSystemInstantDB = DBSystemKey.String("instantdb") - // InterBase - DBSystemInterbase = DBSystemKey.String("interbase") - // MariaDB - DBSystemMariaDB = DBSystemKey.String("mariadb") - // Netezza - DBSystemNetezza = DBSystemKey.String("netezza") - // Pervasive PSQL - DBSystemPervasive = DBSystemKey.String("pervasive") - // PointBase - DBSystemPointbase = DBSystemKey.String("pointbase") - // SQLite - DBSystemSqlite = DBSystemKey.String("sqlite") - // Sybase - DBSystemSybase = DBSystemKey.String("sybase") - // Teradata - DBSystemTeradata = DBSystemKey.String("teradata") - // Vertica - DBSystemVertica = DBSystemKey.String("vertica") - // H2 - DBSystemH2 = DBSystemKey.String("h2") - // ColdFusion IMQ - DBSystemColdfusion = DBSystemKey.String("coldfusion") - // Apache Cassandra - DBSystemCassandra = DBSystemKey.String("cassandra") - // Apache HBase - DBSystemHBase = DBSystemKey.String("hbase") - // MongoDB - DBSystemMongoDB = DBSystemKey.String("mongodb") - // Redis - DBSystemRedis = DBSystemKey.String("redis") - // Couchbase - DBSystemCouchbase = DBSystemKey.String("couchbase") - // CouchDB - DBSystemCouchDB = DBSystemKey.String("couchdb") - // Microsoft Azure Cosmos DB - DBSystemCosmosDB = DBSystemKey.String("cosmosdb") - // Amazon DynamoDB - DBSystemDynamoDB = DBSystemKey.String("dynamodb") - // Neo4j - DBSystemNeo4j = DBSystemKey.String("neo4j") - // Apache Geode - DBSystemGeode = DBSystemKey.String("geode") - // Elasticsearch - DBSystemElasticsearch = DBSystemKey.String("elasticsearch") - // Memcached - DBSystemMemcached = DBSystemKey.String("memcached") - // CockroachDB - DBSystemCockroachdb = DBSystemKey.String("cockroachdb") - // OpenSearch - DBSystemOpensearch = DBSystemKey.String("opensearch") - // ClickHouse - DBSystemClickhouse = DBSystemKey.String("clickhouse") - // Cloud Spanner - DBSystemSpanner = DBSystemKey.String("spanner") - // Trino - DBSystemTrino = DBSystemKey.String("trino") -) - -// DBConnectionString returns an attribute KeyValue conforming to the -// "db.connection_string" semantic conventions. It represents the connection -// string used to connect to the database. It is recommended to remove embedded -// credentials. -func DBConnectionString(val string) attribute.KeyValue { - return DBConnectionStringKey.String(val) -} - -// DBUser returns an attribute KeyValue conforming to the "db.user" semantic -// conventions. It represents the username for accessing the database. -func DBUser(val string) attribute.KeyValue { - return DBUserKey.String(val) -} - -// DBJDBCDriverClassname returns an attribute KeyValue conforming to the -// "db.jdbc.driver_classname" semantic conventions. It represents the -// fully-qualified class name of the [Java Database Connectivity -// (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver -// used to connect. -func DBJDBCDriverClassname(val string) attribute.KeyValue { - return DBJDBCDriverClassnameKey.String(val) -} - -// DBName returns an attribute KeyValue conforming to the "db.name" semantic -// conventions. It represents the this attribute is used to report the name of -// the database being accessed. For commands that switch the database, this -// should be set to the target database (even if the command fails). -func DBName(val string) attribute.KeyValue { - return DBNameKey.String(val) -} - -// DBStatement returns an attribute KeyValue conforming to the -// "db.statement" semantic conventions. It represents the database statement -// being executed. -func DBStatement(val string) attribute.KeyValue { - return DBStatementKey.String(val) -} - -// DBOperation returns an attribute KeyValue conforming to the -// "db.operation" semantic conventions. It represents the name of the operation -// being executed, e.g. the [MongoDB command -// name](https://docs.mongodb.com/manual/reference/command/#database-operations) -// such as `findAndModify`, or the SQL keyword. -func DBOperation(val string) attribute.KeyValue { - return DBOperationKey.String(val) -} - -// Connection-level attributes for Microsoft SQL Server -const ( - // DBMSSQLInstanceNameKey is the attribute Key conforming to the - // "db.mssql.instance_name" semantic conventions. It represents the - // Microsoft SQL Server [instance - // name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) - // connecting to. This name is used to determine the port of a named - // instance. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'MSSQLSERVER' - // Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no - // longer required (but still recommended if non-standard). - DBMSSQLInstanceNameKey = attribute.Key("db.mssql.instance_name") -) - -// DBMSSQLInstanceName returns an attribute KeyValue conforming to the -// "db.mssql.instance_name" semantic conventions. It represents the Microsoft -// SQL Server [instance -// name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) -// connecting to. This name is used to determine the port of a named instance. -func DBMSSQLInstanceName(val string) attribute.KeyValue { - return DBMSSQLInstanceNameKey.String(val) -} - -// Call-level attributes for Cassandra -const ( - // DBCassandraPageSizeKey is the attribute Key conforming to the - // "db.cassandra.page_size" semantic conventions. It represents the fetch - // size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 5000 - DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") - - // DBCassandraConsistencyLevelKey is the attribute Key conforming to the - // "db.cassandra.consistency_level" semantic conventions. It represents the - // consistency level of the query. Based on consistency values from - // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") - - // DBCassandraTableKey is the attribute Key conforming to the - // "db.cassandra.table" semantic conventions. It represents the name of the - // primary table that the operation is acting upon, including the keyspace - // name (if applicable). - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'mytable' - // Note: This mirrors the db.sql.table attribute but references cassandra - // rather than sql. It is not recommended to attempt any client-side - // parsing of `db.statement` just to get this property, but it should be - // set if it is provided by the library being instrumented. If the - // operation is acting upon an anonymous table, or more than one table, - // this value MUST NOT be set. - DBCassandraTableKey = attribute.Key("db.cassandra.table") - - // DBCassandraIdempotenceKey is the attribute Key conforming to the - // "db.cassandra.idempotence" semantic conventions. It represents the - // whether or not the query is idempotent. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") - - // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming - // to the "db.cassandra.speculative_execution_count" semantic conventions. - // It represents the number of times a query was speculatively executed. - // Not set or `0` if the query was not executed speculatively. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 0, 2 - DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") - - // DBCassandraCoordinatorIDKey is the attribute Key conforming to the - // "db.cassandra.coordinator.id" semantic conventions. It represents the ID - // of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") - - // DBCassandraCoordinatorDCKey is the attribute Key conforming to the - // "db.cassandra.coordinator.dc" semantic conventions. It represents the - // data center of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'us-west-2' - DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") -) - -var ( - // all - DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") - // each_quorum - DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") - // quorum - DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") - // local_quorum - DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") - // one - DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") - // two - DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") - // three - DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") - // local_one - DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") - // any - DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") - // serial - DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") - // local_serial - DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") -) - -// DBCassandraPageSize returns an attribute KeyValue conforming to the -// "db.cassandra.page_size" semantic conventions. It represents the fetch size -// used for paging, i.e. how many rows will be returned at once. -func DBCassandraPageSize(val int) attribute.KeyValue { - return DBCassandraPageSizeKey.Int(val) -} - -// DBCassandraTable returns an attribute KeyValue conforming to the -// "db.cassandra.table" semantic conventions. It represents the name of the -// primary table that the operation is acting upon, including the keyspace name -// (if applicable). -func DBCassandraTable(val string) attribute.KeyValue { - return DBCassandraTableKey.String(val) -} - -// DBCassandraIdempotence returns an attribute KeyValue conforming to the -// "db.cassandra.idempotence" semantic conventions. It represents the whether -// or not the query is idempotent. -func DBCassandraIdempotence(val bool) attribute.KeyValue { - return DBCassandraIdempotenceKey.Bool(val) -} - -// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue -// conforming to the "db.cassandra.speculative_execution_count" semantic -// conventions. It represents the number of times a query was speculatively -// executed. Not set or `0` if the query was not executed speculatively. -func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { - return DBCassandraSpeculativeExecutionCountKey.Int(val) -} - -// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of -// the coordinating node for a query. -func DBCassandraCoordinatorID(val string) attribute.KeyValue { - return DBCassandraCoordinatorIDKey.String(val) -} - -// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.dc" semantic conventions. It represents the data -// center of the coordinating node for a query. -func DBCassandraCoordinatorDC(val string) attribute.KeyValue { - return DBCassandraCoordinatorDCKey.String(val) -} - -// Call-level attributes for Redis -const ( - // DBRedisDBIndexKey is the attribute Key conforming to the - // "db.redis.database_index" semantic conventions. It represents the index - // of the database being accessed as used in the [`SELECT` - // command](https://redis.io/commands/select), provided as an integer. To - // be used instead of the generic `db.name` attribute. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If other than the default - // database (`0`).) - // Stability: stable - // Examples: 0, 1, 15 - DBRedisDBIndexKey = attribute.Key("db.redis.database_index") -) - -// DBRedisDBIndex returns an attribute KeyValue conforming to the -// "db.redis.database_index" semantic conventions. It represents the index of -// the database being accessed as used in the [`SELECT` -// command](https://redis.io/commands/select), provided as an integer. To be -// used instead of the generic `db.name` attribute. -func DBRedisDBIndex(val int) attribute.KeyValue { - return DBRedisDBIndexKey.Int(val) -} - -// Call-level attributes for MongoDB -const ( - // DBMongoDBCollectionKey is the attribute Key conforming to the - // "db.mongodb.collection" semantic conventions. It represents the - // collection being accessed within the database stated in `db.name`. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'customers', 'products' - DBMongoDBCollectionKey = attribute.Key("db.mongodb.collection") -) - -// DBMongoDBCollection returns an attribute KeyValue conforming to the -// "db.mongodb.collection" semantic conventions. It represents the collection -// being accessed within the database stated in `db.name`. -func DBMongoDBCollection(val string) attribute.KeyValue { - return DBMongoDBCollectionKey.String(val) -} - -// Call-level attributes for SQL databases -const ( - // DBSQLTableKey is the attribute Key conforming to the "db.sql.table" - // semantic conventions. It represents the name of the primary table that - // the operation is acting upon, including the database name (if - // applicable). - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'public.users', 'customers' - // Note: It is not recommended to attempt any client-side parsing of - // `db.statement` just to get this property, but it should be set if it is - // provided by the library being instrumented. If the operation is acting - // upon an anonymous table, or more than one table, this value MUST NOT be - // set. - DBSQLTableKey = attribute.Key("db.sql.table") -) - -// DBSQLTable returns an attribute KeyValue conforming to the "db.sql.table" -// semantic conventions. It represents the name of the primary table that the -// operation is acting upon, including the database name (if applicable). -func DBSQLTable(val string) attribute.KeyValue { - return DBSQLTableKey.String(val) -} - -// Call-level attributes for Cosmos DB. -const ( - // DBCosmosDBClientIDKey is the attribute Key conforming to the - // "db.cosmosdb.client_id" semantic conventions. It represents the unique - // Cosmos client instance id. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") - - // DBCosmosDBOperationTypeKey is the attribute Key conforming to the - // "db.cosmosdb.operation_type" semantic conventions. It represents the - // cosmosDB Operation Type. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (when performing one of the - // operations in this list) - // Stability: stable - DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") - - // DBCosmosDBConnectionModeKey is the attribute Key conforming to the - // "db.cosmosdb.connection_mode" semantic conventions. It represents the - // cosmos client connection mode. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (if not `direct` (or pick gw as - // default)) - // Stability: stable - DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") - - // DBCosmosDBContainerKey is the attribute Key conforming to the - // "db.cosmosdb.container" semantic conventions. It represents the cosmos - // DB container name. - // - // Type: string - // RequirementLevel: ConditionallyRequired (if available) - // Stability: stable - // Examples: 'anystring' - DBCosmosDBContainerKey = attribute.Key("db.cosmosdb.container") - - // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the - // "db.cosmosdb.request_content_length" semantic conventions. It represents - // the request payload size in bytes - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") - - // DBCosmosDBStatusCodeKey is the attribute Key conforming to the - // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos - // DB status code. - // - // Type: int - // RequirementLevel: ConditionallyRequired (if response was received) - // Stability: stable - // Examples: 200, 201 - DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") - - // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the - // "db.cosmosdb.sub_status_code" semantic conventions. It represents the - // cosmos DB sub status code. - // - // Type: int - // RequirementLevel: ConditionallyRequired (when response was received and - // contained sub-code.) - // Stability: stable - // Examples: 1000, 1002 - DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") - - // DBCosmosDBRequestChargeKey is the attribute Key conforming to the - // "db.cosmosdb.request_charge" semantic conventions. It represents the rU - // consumed for that operation - // - // Type: double - // RequirementLevel: ConditionallyRequired (when available) - // Stability: stable - // Examples: 46.18, 1.0 - DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") -) - -var ( - // invalid - DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") - // create - DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") - // patch - DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") - // read - DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") - // read_feed - DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") - // delete - DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") - // replace - DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") - // execute - DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") - // query - DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") - // head - DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") - // head_feed - DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") - // upsert - DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") - // batch - DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") - // query_plan - DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") - // execute_javascript - DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") -) - -var ( - // Gateway (HTTP) connections mode - DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") - // Direct connection - DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") -) - -// DBCosmosDBClientID returns an attribute KeyValue conforming to the -// "db.cosmosdb.client_id" semantic conventions. It represents the unique -// Cosmos client instance id. -func DBCosmosDBClientID(val string) attribute.KeyValue { - return DBCosmosDBClientIDKey.String(val) -} - -// DBCosmosDBContainer returns an attribute KeyValue conforming to the -// "db.cosmosdb.container" semantic conventions. It represents the cosmos DB -// container name. -func DBCosmosDBContainer(val string) attribute.KeyValue { - return DBCosmosDBContainerKey.String(val) -} - -// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming -// to the "db.cosmosdb.request_content_length" semantic conventions. It -// represents the request payload size in bytes -func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { - return DBCosmosDBRequestContentLengthKey.Int(val) -} - -// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the -// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB -// status code. -func DBCosmosDBStatusCode(val int) attribute.KeyValue { - return DBCosmosDBStatusCodeKey.Int(val) -} - -// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the -// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos -// DB sub status code. -func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { - return DBCosmosDBSubStatusCodeKey.Int(val) -} - -// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the -// "db.cosmosdb.request_charge" semantic conventions. It represents the rU -// consumed for that operation -func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { - return DBCosmosDBRequestChargeKey.Float64(val) -} - -// Span attributes used by non-OTLP exporters to represent OpenTelemetry Span's -// concepts. -const ( - // OTelStatusCodeKey is the attribute Key conforming to the - // "otel.status_code" semantic conventions. It represents the name of the - // code, either "OK" or "ERROR". MUST NOT be set if the status code is - // UNSET. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - OTelStatusCodeKey = attribute.Key("otel.status_code") - - // OTelStatusDescriptionKey is the attribute Key conforming to the - // "otel.status_description" semantic conventions. It represents the - // description of the Status if it has a value, otherwise not set. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'resource not found' - OTelStatusDescriptionKey = attribute.Key("otel.status_description") -) - -var ( - // The operation has been validated by an Application developer or Operator to have completed successfully - OTelStatusCodeOk = OTelStatusCodeKey.String("OK") - // The operation contains an error - OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") -) - -// OTelStatusDescription returns an attribute KeyValue conforming to the -// "otel.status_description" semantic conventions. It represents the -// description of the Status if it has a value, otherwise not set. -func OTelStatusDescription(val string) attribute.KeyValue { - return OTelStatusDescriptionKey.String(val) -} - -// This semantic convention describes an instance of a function that runs -// without provisioning or managing of servers (also known as serverless -// functions or Function as a Service (FaaS)) with spans. -const ( - // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" - // semantic conventions. It represents the type of the trigger which caused - // this function invocation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Note: For the server/consumer span on the incoming side, - // `faas.trigger` MUST be set. - // - // Clients invoking FaaS instances usually cannot set `faas.trigger`, - // since they would typically need to look in the payload to determine - // the event type. If clients set it, it should be the same as the - // trigger that corresponding incoming would have (i.e., this has - // nothing to do with the underlying transport used to make the API - // call to invoke the lambda, which is often HTTP). - FaaSTriggerKey = attribute.Key("faas.trigger") - - // FaaSInvocationIDKey is the attribute Key conforming to the - // "faas.invocation_id" semantic conventions. It represents the invocation - // ID of the current function invocation. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - FaaSInvocationIDKey = attribute.Key("faas.invocation_id") -) - -var ( - // A response to some data source operation such as a database or filesystem read/write - FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") - // To provide an answer to an inbound HTTP request - FaaSTriggerHTTP = FaaSTriggerKey.String("http") - // A function is set to be executed when messages are sent to a messaging system - FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") - // A function is scheduled to be executed regularly - FaaSTriggerTimer = FaaSTriggerKey.String("timer") - // If none of the others apply - FaaSTriggerOther = FaaSTriggerKey.String("other") -) - -// FaaSInvocationID returns an attribute KeyValue conforming to the -// "faas.invocation_id" semantic conventions. It represents the invocation ID -// of the current function invocation. -func FaaSInvocationID(val string) attribute.KeyValue { - return FaaSInvocationIDKey.String(val) -} - -// Semantic Convention for FaaS triggered as a response to some data source -// operation such as a database or filesystem read/write. -const ( - // FaaSDocumentCollectionKey is the attribute Key conforming to the - // "faas.document.collection" semantic conventions. It represents the name - // of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in - // Cosmos DB to the database name. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'myBucketName', 'myDBName' - FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") - - // FaaSDocumentOperationKey is the attribute Key conforming to the - // "faas.document.operation" semantic conventions. It represents the - // describes the type of the operation that was performed on the data. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - FaaSDocumentOperationKey = attribute.Key("faas.document.operation") - - // FaaSDocumentTimeKey is the attribute Key conforming to the - // "faas.document.time" semantic conventions. It represents a string - // containing the time when the data was accessed in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - FaaSDocumentTimeKey = attribute.Key("faas.document.time") - - // FaaSDocumentNameKey is the attribute Key conforming to the - // "faas.document.name" semantic conventions. It represents the document - // name/table subjected to the operation. For example, in Cloud Storage or - // S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'myFile.txt', 'myTableName' - FaaSDocumentNameKey = attribute.Key("faas.document.name") -) - -var ( - // When a new object is created - FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") - // When an object is modified - FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") - // When an object is deleted - FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") -) - -// FaaSDocumentCollection returns an attribute KeyValue conforming to the -// "faas.document.collection" semantic conventions. It represents the name of -// the source on which the triggering operation was performed. For example, in -// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the -// database name. -func FaaSDocumentCollection(val string) attribute.KeyValue { - return FaaSDocumentCollectionKey.String(val) -} - -// FaaSDocumentTime returns an attribute KeyValue conforming to the -// "faas.document.time" semantic conventions. It represents a string containing -// the time when the data was accessed in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSDocumentTime(val string) attribute.KeyValue { - return FaaSDocumentTimeKey.String(val) -} - -// FaaSDocumentName returns an attribute KeyValue conforming to the -// "faas.document.name" semantic conventions. It represents the document -// name/table subjected to the operation. For example, in Cloud Storage or S3 -// is the name of the file, and in Cosmos DB the table name. -func FaaSDocumentName(val string) attribute.KeyValue { - return FaaSDocumentNameKey.String(val) -} - -// Semantic Convention for FaaS scheduled to be executed regularly. -const ( - // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic - // conventions. It represents a string containing the function invocation - // time in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2020-01-23T13:47:06Z' - FaaSTimeKey = attribute.Key("faas.time") - - // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic - // conventions. It represents a string containing the schedule period as - // [Cron - // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '0/5 * * * ? *' - FaaSCronKey = attribute.Key("faas.cron") -) - -// FaaSTime returns an attribute KeyValue conforming to the "faas.time" -// semantic conventions. It represents a string containing the function -// invocation time in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSTime(val string) attribute.KeyValue { - return FaaSTimeKey.String(val) -} - -// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" -// semantic conventions. It represents a string containing the schedule period -// as [Cron -// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). -func FaaSCron(val string) attribute.KeyValue { - return FaaSCronKey.String(val) -} - -// Contains additional attributes for incoming FaaS spans. -const ( - // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" - // semantic conventions. It represents a boolean that is true if the - // serverless function is executed for the first time (aka cold-start). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - FaaSColdstartKey = attribute.Key("faas.coldstart") -) - -// FaaSColdstart returns an attribute KeyValue conforming to the -// "faas.coldstart" semantic conventions. It represents a boolean that is true -// if the serverless function is executed for the first time (aka cold-start). -func FaaSColdstart(val bool) attribute.KeyValue { - return FaaSColdstartKey.Bool(val) -} - -// Contains additional attributes for outgoing FaaS spans. -const ( - // FaaSInvokedNameKey is the attribute Key conforming to the - // "faas.invoked_name" semantic conventions. It represents the name of the - // invoked function. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'my-function' - // Note: SHOULD be equal to the `faas.name` resource attribute of the - // invoked function. - FaaSInvokedNameKey = attribute.Key("faas.invoked_name") - - // FaaSInvokedProviderKey is the attribute Key conforming to the - // "faas.invoked_provider" semantic conventions. It represents the cloud - // provider of the invoked function. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: SHOULD be equal to the `cloud.provider` resource attribute of the - // invoked function. - FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") - - // FaaSInvokedRegionKey is the attribute Key conforming to the - // "faas.invoked_region" semantic conventions. It represents the cloud - // region of the invoked function. - // - // Type: string - // RequirementLevel: ConditionallyRequired (For some cloud providers, like - // AWS or GCP, the region in which a function is hosted is essential to - // uniquely identify the function and also part of its endpoint. Since it's - // part of the endpoint being called, the region is always known to - // clients. In these cases, `faas.invoked_region` MUST be set accordingly. - // If the region is unknown to the client or not required for identifying - // the invoked function, setting `faas.invoked_region` is optional.) - // Stability: stable - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the `cloud.region` resource attribute of the - // invoked function. - FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") -) - -var ( - // Alibaba Cloud - FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") - // Amazon Web Services - FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") - // Microsoft Azure - FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") - // Google Cloud Platform - FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") - // Tencent Cloud - FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") -) - -// FaaSInvokedName returns an attribute KeyValue conforming to the -// "faas.invoked_name" semantic conventions. It represents the name of the -// invoked function. -func FaaSInvokedName(val string) attribute.KeyValue { - return FaaSInvokedNameKey.String(val) -} - -// FaaSInvokedRegion returns an attribute KeyValue conforming to the -// "faas.invoked_region" semantic conventions. It represents the cloud region -// of the invoked function. -func FaaSInvokedRegion(val string) attribute.KeyValue { - return FaaSInvokedRegionKey.String(val) -} - -// Operations that access some remote service. -const ( - // PeerServiceKey is the attribute Key conforming to the "peer.service" - // semantic conventions. It represents the - // [`service.name`](../../resource/semantic_conventions/README.md#service) - // of the remote service. SHOULD be equal to the actual `service.name` - // resource attribute of the remote service if any. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'AuthTokenCache' - PeerServiceKey = attribute.Key("peer.service") -) - -// PeerService returns an attribute KeyValue conforming to the -// "peer.service" semantic conventions. It represents the -// [`service.name`](../../resource/semantic_conventions/README.md#service) of -// the remote service. SHOULD be equal to the actual `service.name` resource -// attribute of the remote service if any. -func PeerService(val string) attribute.KeyValue { - return PeerServiceKey.String(val) -} - -// These attributes may be used for any operation with an authenticated and/or -// authorized enduser. -const ( - // EnduserIDKey is the attribute Key conforming to the "enduser.id" - // semantic conventions. It represents the username or client_id extracted - // from the access token or - // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header - // in the inbound request from outside the system. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'username' - EnduserIDKey = attribute.Key("enduser.id") - - // EnduserRoleKey is the attribute Key conforming to the "enduser.role" - // semantic conventions. It represents the actual/assumed role the client - // is making the request under extracted from token or application security - // context. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'admin' - EnduserRoleKey = attribute.Key("enduser.role") - - // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" - // semantic conventions. It represents the scopes or granted authorities - // the client currently possesses extracted from token or application - // security context. The value would come from the scope associated with an - // [OAuth 2.0 Access - // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute - // value in a [SAML 2.0 - // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'read:message, write:files' - EnduserScopeKey = attribute.Key("enduser.scope") -) - -// EnduserID returns an attribute KeyValue conforming to the "enduser.id" -// semantic conventions. It represents the username or client_id extracted from -// the access token or -// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in -// the inbound request from outside the system. -func EnduserID(val string) attribute.KeyValue { - return EnduserIDKey.String(val) -} - -// EnduserRole returns an attribute KeyValue conforming to the -// "enduser.role" semantic conventions. It represents the actual/assumed role -// the client is making the request under extracted from token or application -// security context. -func EnduserRole(val string) attribute.KeyValue { - return EnduserRoleKey.String(val) -} - -// EnduserScope returns an attribute KeyValue conforming to the -// "enduser.scope" semantic conventions. It represents the scopes or granted -// authorities the client currently possesses extracted from token or -// application security context. The value would come from the scope associated -// with an [OAuth 2.0 Access -// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute -// value in a [SAML 2.0 -// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). -func EnduserScope(val string) attribute.KeyValue { - return EnduserScopeKey.String(val) -} - -// These attributes may be used for any operation to store information about a -// thread that started a span. -const ( - // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic - // conventions. It represents the current "managed" thread ID (as opposed - // to OS thread ID). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - ThreadIDKey = attribute.Key("thread.id") - - // ThreadNameKey is the attribute Key conforming to the "thread.name" - // semantic conventions. It represents the current thread name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'main' - ThreadNameKey = attribute.Key("thread.name") -) - -// ThreadID returns an attribute KeyValue conforming to the "thread.id" -// semantic conventions. It represents the current "managed" thread ID (as -// opposed to OS thread ID). -func ThreadID(val int) attribute.KeyValue { - return ThreadIDKey.Int(val) -} - -// ThreadName returns an attribute KeyValue conforming to the "thread.name" -// semantic conventions. It represents the current thread name. -func ThreadName(val string) attribute.KeyValue { - return ThreadNameKey.String(val) -} - -// These attributes allow to report this unit of code and therefore to provide -// more context about the span. -const ( - // CodeFunctionKey is the attribute Key conforming to the "code.function" - // semantic conventions. It represents the method or function name, or - // equivalent (usually rightmost part of the code unit's name). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'serveRequest' - CodeFunctionKey = attribute.Key("code.function") - - // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" - // semantic conventions. It represents the "namespace" within which - // `code.function` is defined. Usually the qualified class or module name, - // such that `code.namespace` + some separator + `code.function` form a - // unique identifier for the code unit. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'com.example.MyHTTPService' - CodeNamespaceKey = attribute.Key("code.namespace") - - // CodeFilepathKey is the attribute Key conforming to the "code.filepath" - // semantic conventions. It represents the source code file name that - // identifies the code unit as uniquely as possible (preferably an absolute - // file path). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - CodeFilepathKey = attribute.Key("code.filepath") - - // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" - // semantic conventions. It represents the line number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 42 - CodeLineNumberKey = attribute.Key("code.lineno") - - // CodeColumnKey is the attribute Key conforming to the "code.column" - // semantic conventions. It represents the column number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 16 - CodeColumnKey = attribute.Key("code.column") -) - -// CodeFunction returns an attribute KeyValue conforming to the -// "code.function" semantic conventions. It represents the method or function -// name, or equivalent (usually rightmost part of the code unit's name). -func CodeFunction(val string) attribute.KeyValue { - return CodeFunctionKey.String(val) -} - -// CodeNamespace returns an attribute KeyValue conforming to the -// "code.namespace" semantic conventions. It represents the "namespace" within -// which `code.function` is defined. Usually the qualified class or module -// name, such that `code.namespace` + some separator + `code.function` form a -// unique identifier for the code unit. -func CodeNamespace(val string) attribute.KeyValue { - return CodeNamespaceKey.String(val) -} - -// CodeFilepath returns an attribute KeyValue conforming to the -// "code.filepath" semantic conventions. It represents the source code file -// name that identifies the code unit as uniquely as possible (preferably an -// absolute file path). -func CodeFilepath(val string) attribute.KeyValue { - return CodeFilepathKey.String(val) -} - -// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" -// semantic conventions. It represents the line number in `code.filepath` best -// representing the operation. It SHOULD point within the code unit named in -// `code.function`. -func CodeLineNumber(val int) attribute.KeyValue { - return CodeLineNumberKey.Int(val) -} - -// CodeColumn returns an attribute KeyValue conforming to the "code.column" -// semantic conventions. It represents the column number in `code.filepath` -// best representing the operation. It SHOULD point within the code unit named -// in `code.function`. -func CodeColumn(val int) attribute.KeyValue { - return CodeColumnKey.Int(val) -} - -// Semantic Convention for HTTP Client -const ( - // HTTPURLKey is the attribute Key conforming to the "http.url" semantic - // conventions. It represents the full HTTP request URL in the form - // `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is - // not transmitted over HTTP, but if it is known, it should be included - // nevertheless. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv' - // Note: `http.url` MUST NOT contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. In such case the - // attribute's value should be `https://www.example.com/`. - HTTPURLKey = attribute.Key("http.url") - - // HTTPResendCountKey is the attribute Key conforming to the - // "http.resend_count" semantic conventions. It represents the ordinal - // number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // RequirementLevel: Recommended (if and only if request was retried.) - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets - // resent by the client, regardless of what was the cause of the resending - // (e.g. redirection, authorization failure, 503 Server Unavailable, - // network issues, or any other). - HTTPResendCountKey = attribute.Key("http.resend_count") -) - -// HTTPURL returns an attribute KeyValue conforming to the "http.url" -// semantic conventions. It represents the full HTTP request URL in the form -// `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not -// transmitted over HTTP, but if it is known, it should be included -// nevertheless. -func HTTPURL(val string) attribute.KeyValue { - return HTTPURLKey.String(val) -} - -// HTTPResendCount returns an attribute KeyValue conforming to the -// "http.resend_count" semantic conventions. It represents the ordinal number -// of request resending attempt (for any reason, including redirects). -func HTTPResendCount(val int) attribute.KeyValue { - return HTTPResendCountKey.Int(val) -} - -// Semantic Convention for HTTP Server -const ( - // HTTPTargetKey is the attribute Key conforming to the "http.target" - // semantic conventions. It represents the full request target as passed in - // a HTTP request line or equivalent. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '/users/12314/?q=ddds' - HTTPTargetKey = attribute.Key("http.target") - - // HTTPClientIPKey is the attribute Key conforming to the "http.client_ip" - // semantic conventions. It represents the IP address of the original - // client behind all proxies, if known (e.g. from - // [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '83.164.160.102' - // Note: This is not necessarily the same as `net.sock.peer.addr`, which - // would - // identify the network-level peer, which may be a proxy. - // - // This attribute should be set when a source of information different - // from the one used for `net.sock.peer.addr`, is available even if that - // other - // source just confirms the same value as `net.sock.peer.addr`. - // Rationale: For `net.sock.peer.addr`, one typically does not know if it - // comes from a proxy, reverse proxy, or the actual client. Setting - // `http.client_ip` when it's the same as `net.sock.peer.addr` means that - // one is at least somewhat confident that the address is not that of - // the closest proxy. - HTTPClientIPKey = attribute.Key("http.client_ip") -) - -// HTTPTarget returns an attribute KeyValue conforming to the "http.target" -// semantic conventions. It represents the full request target as passed in a -// HTTP request line or equivalent. -func HTTPTarget(val string) attribute.KeyValue { - return HTTPTargetKey.String(val) -} - -// HTTPClientIP returns an attribute KeyValue conforming to the -// "http.client_ip" semantic conventions. It represents the IP address of the -// original client behind all proxies, if known (e.g. from -// [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)). -func HTTPClientIP(val string) attribute.KeyValue { - return HTTPClientIPKey.String(val) -} - -// The `aws` conventions apply to operations using the AWS SDK. They map -// request or response parameters in AWS SDK API calls to attributes on a Span. -// The conventions have been collected over time based on feedback from AWS -// users of tracing and will continue to evolve as new interesting conventions -// are found. -// Some descriptions are also provided for populating general OpenTelemetry -// semantic conventions based on these APIs. -const ( - // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" - // semantic conventions. It represents the AWS request ID as returned in - // the response headers `x-amz-request-id` or `x-amz-requestid`. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' - AWSRequestIDKey = attribute.Key("aws.request_id") -) - -// AWSRequestID returns an attribute KeyValue conforming to the -// "aws.request_id" semantic conventions. It represents the AWS request ID as -// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. -func AWSRequestID(val string) attribute.KeyValue { - return AWSRequestIDKey.String(val) -} - -// Attributes that exist for multiple DynamoDB request types. -const ( - // AWSDynamoDBTableNamesKey is the attribute Key conforming to the - // "aws.dynamodb.table_names" semantic conventions. It represents the keys - // in the `RequestItems` object field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Users', 'Cats' - AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") - - // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the - // JSON-serialized value of each item in the `ConsumedCapacity` response - // field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { - // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number }, "TableName": "string", - // "WriteCapacityUnits": number }' - AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") - - // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to - // the "aws.dynamodb.item_collection_metrics" semantic conventions. It - // represents the JSON-serialized value of the `ItemCollectionMetrics` - // response field. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": - // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { - // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], - // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, - // "SizeEstimateRangeGB": [ number ] } ] }' - AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") - - // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to - // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It - // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` - // request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") - - // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming - // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. - // It represents the value of the - // `ProvisionedThroughput.WriteCapacityUnits` request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: stable - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") - - // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the - // "aws.dynamodb.consistent_read" semantic conventions. It represents the - // value of the `ConsistentRead` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") - - // AWSDynamoDBProjectionKey is the attribute Key conforming to the - // "aws.dynamodb.projection" semantic conventions. It represents the value - // of the `ProjectionExpression` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, - // RelatedItems, ProductReviews' - AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") - - // AWSDynamoDBLimitKey is the attribute Key conforming to the - // "aws.dynamodb.limit" semantic conventions. It represents the value of - // the `Limit` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") - - // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the - // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the - // value of the `AttributesToGet` request parameter. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: 'lives', 'id' - AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") - - // AWSDynamoDBIndexNameKey is the attribute Key conforming to the - // "aws.dynamodb.index_name" semantic conventions. It represents the value - // of the `IndexName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'name_to_group' - AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") - - // AWSDynamoDBSelectKey is the attribute Key conforming to the - // "aws.dynamodb.select" semantic conventions. It represents the value of - // the `Select` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") -) - -// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_names" semantic conventions. It represents the keys in -// the `RequestItems` object field. -func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { - return AWSDynamoDBTableNamesKey.StringSlice(val) -} - -// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to -// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the -// JSON-serialized value of each item in the `ConsumedCapacity` response field. -func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { - return AWSDynamoDBConsumedCapacityKey.StringSlice(val) -} - -// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming -// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It -// represents the JSON-serialized value of the `ItemCollectionMetrics` response -// field. -func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { - return AWSDynamoDBItemCollectionMetricsKey.String(val) -} - -// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.ReadCapacityUnits` request parameter. -func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) -} - -// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.WriteCapacityUnits` request parameter. -func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) -} - -// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the -// "aws.dynamodb.consistent_read" semantic conventions. It represents the value -// of the `ConsistentRead` request parameter. -func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { - return AWSDynamoDBConsistentReadKey.Bool(val) -} - -// AWSDynamoDBProjection returns an attribute KeyValue conforming to the -// "aws.dynamodb.projection" semantic conventions. It represents the value of -// the `ProjectionExpression` request parameter. -func AWSDynamoDBProjection(val string) attribute.KeyValue { - return AWSDynamoDBProjectionKey.String(val) -} - -// AWSDynamoDBLimit returns an attribute KeyValue conforming to the -// "aws.dynamodb.limit" semantic conventions. It represents the value of the -// `Limit` request parameter. -func AWSDynamoDBLimit(val int) attribute.KeyValue { - return AWSDynamoDBLimitKey.Int(val) -} - -// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to -// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the -// value of the `AttributesToGet` request parameter. -func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributesToGetKey.StringSlice(val) -} - -// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the -// "aws.dynamodb.index_name" semantic conventions. It represents the value of -// the `IndexName` request parameter. -func AWSDynamoDBIndexName(val string) attribute.KeyValue { - return AWSDynamoDBIndexNameKey.String(val) -} - -// AWSDynamoDBSelect returns an attribute KeyValue conforming to the -// "aws.dynamodb.select" semantic conventions. It represents the value of the -// `Select` request parameter. -func AWSDynamoDBSelect(val string) attribute.KeyValue { - return AWSDynamoDBSelectKey.String(val) -} - -// DynamoDB.CreateTable -const ( - // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `GlobalSecondaryIndexes` request field - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": - // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ - // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") - - // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `LocalSecondaryIndexes` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "IndexARN": "string", "IndexName": "string", - // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' - AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") -) - -// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_indexes" semantic -// conventions. It represents the JSON-serialized value of each item of the -// `GlobalSecondaryIndexes` request field -func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming -// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It -// represents the JSON-serialized value of each item of the -// `LocalSecondaryIndexes` request field. -func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) -} - -// DynamoDB.ListTables -const ( - // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the - // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents - // the value of the `ExclusiveStartTableName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Users', 'CatsTable' - AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") - - // AWSDynamoDBTableCountKey is the attribute Key conforming to the - // "aws.dynamodb.table_count" semantic conventions. It represents the the - // number of items in the `TableNames` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 20 - AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") -) - -// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming -// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It -// represents the value of the `ExclusiveStartTableName` request parameter. -func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { - return AWSDynamoDBExclusiveStartTableKey.String(val) -} - -// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_count" semantic conventions. It represents the the -// number of items in the `TableNames` response parameter. -func AWSDynamoDBTableCount(val int) attribute.KeyValue { - return AWSDynamoDBTableCountKey.Int(val) -} - -// DynamoDB.Query -const ( - // AWSDynamoDBScanForwardKey is the attribute Key conforming to the - // "aws.dynamodb.scan_forward" semantic conventions. It represents the - // value of the `ScanIndexForward` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") -) - -// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the -// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of -// the `ScanIndexForward` request parameter. -func AWSDynamoDBScanForward(val bool) attribute.KeyValue { - return AWSDynamoDBScanForwardKey.Bool(val) -} - -// DynamoDB.Scan -const ( - // AWSDynamoDBSegmentKey is the attribute Key conforming to the - // "aws.dynamodb.segment" semantic conventions. It represents the value of - // the `Segment` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") - - // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the - // "aws.dynamodb.total_segments" semantic conventions. It represents the - // value of the `TotalSegments` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 100 - AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") - - // AWSDynamoDBCountKey is the attribute Key conforming to the - // "aws.dynamodb.count" semantic conventions. It represents the value of - // the `Count` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 10 - AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") - - // AWSDynamoDBScannedCountKey is the attribute Key conforming to the - // "aws.dynamodb.scanned_count" semantic conventions. It represents the - // value of the `ScannedCount` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 50 - AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") -) - -// AWSDynamoDBSegment returns an attribute KeyValue conforming to the -// "aws.dynamodb.segment" semantic conventions. It represents the value of the -// `Segment` request parameter. -func AWSDynamoDBSegment(val int) attribute.KeyValue { - return AWSDynamoDBSegmentKey.Int(val) -} - -// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the -// "aws.dynamodb.total_segments" semantic conventions. It represents the value -// of the `TotalSegments` request parameter. -func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { - return AWSDynamoDBTotalSegmentsKey.Int(val) -} - -// AWSDynamoDBCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.count" semantic conventions. It represents the value of the -// `Count` response parameter. -func AWSDynamoDBCount(val int) attribute.KeyValue { - return AWSDynamoDBCountKey.Int(val) -} - -// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.scanned_count" semantic conventions. It represents the value -// of the `ScannedCount` response parameter. -func AWSDynamoDBScannedCount(val int) attribute.KeyValue { - return AWSDynamoDBScannedCountKey.Int(val) -} - -// DynamoDB.UpdateTable -const ( - // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to - // the "aws.dynamodb.attribute_definitions" semantic conventions. It - // represents the JSON-serialized value of each item in the - // `AttributeDefinitions` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") - - // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key - // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic - // conventions. It represents the JSON-serialized value of each item in the - // the `GlobalSecondaryIndexUpdates` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: stable - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") -) - -// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming -// to the "aws.dynamodb.attribute_definitions" semantic conventions. It -// represents the JSON-serialized value of each item in the -// `AttributeDefinitions` request field. -func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) -} - -// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic -// conventions. It represents the JSON-serialized value of each item in the the -// `GlobalSecondaryIndexUpdates` request field. -func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) -} - -// Attributes that exist for S3 request types. -const ( - // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" - // semantic conventions. It represents the S3 bucket name the request - // refers to. Corresponds to the `--bucket` parameter of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // operations. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'some-bucket-name' - // Note: The `bucket` attribute is applicable to all S3 operations that - // reference a bucket, i.e. that require the bucket name as a mandatory - // parameter. - // This applies to almost all S3 operations except `list-buckets`. - AWSS3BucketKey = attribute.Key("aws.s3.bucket") - - // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic - // conventions. It represents the S3 object key the request refers to. - // Corresponds to the `--key` parameter of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // operations. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'someFile.yml' - // Note: The `key` attribute is applicable to all object-related S3 - // operations, i.e. that require the object key as a mandatory parameter. - // This applies in particular to the following operations: - // - // - - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - // - - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) - // - - // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) - // - - // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) - // - - // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) - // - - // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) - // - - // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) - // - - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - // - - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - // - - // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) - // - - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - // - - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3KeyKey = attribute.Key("aws.s3.key") - - // AWSS3CopySourceKey is the attribute Key conforming to the - // "aws.s3.copy_source" semantic conventions. It represents the source - // object (in the form `bucket`/`key`) for the copy operation. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'someFile.yml' - // Note: The `copy_source` attribute applies to S3 copy operations and - // corresponds to the `--copy-source` parameter - // of the [copy-object operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). - // This applies in particular to the following operations: - // - // - - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") - - // AWSS3UploadIDKey is the attribute Key conforming to the - // "aws.s3.upload_id" semantic conventions. It represents the upload ID - // that identifies the multipart upload. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' - // Note: The `upload_id` attribute applies to S3 multipart-upload - // operations and corresponds to the `--upload-id` parameter - // of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // multipart operations. - // This applies in particular to the following operations: - // - // - - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - // - - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - // - - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - // - - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") - - // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" - // semantic conventions. It represents the delete request container that - // specifies the objects to be deleted. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: - // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' - // Note: The `delete` attribute is only applicable to the - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) - // operation. - // The `delete` attribute corresponds to the `--delete` parameter of the - // [delete-objects operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). - AWSS3DeleteKey = attribute.Key("aws.s3.delete") - - // AWSS3PartNumberKey is the attribute Key conforming to the - // "aws.s3.part_number" semantic conventions. It represents the part number - // of the part being uploaded in a multipart-upload operation. This is a - // positive integer between 1 and 10,000. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3456 - // Note: The `part_number` attribute is only applicable to the - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // and - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - // operations. - // The `part_number` attribute corresponds to the `--part-number` parameter - // of the - // [upload-part operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). - AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") -) - -// AWSS3Bucket returns an attribute KeyValue conforming to the -// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the -// request refers to. Corresponds to the `--bucket` parameter of the [S3 -// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) -// operations. -func AWSS3Bucket(val string) attribute.KeyValue { - return AWSS3BucketKey.String(val) -} - -// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" -// semantic conventions. It represents the S3 object key the request refers to. -// Corresponds to the `--key` parameter of the [S3 -// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) -// operations. -func AWSS3Key(val string) attribute.KeyValue { - return AWSS3KeyKey.String(val) -} - -// AWSS3CopySource returns an attribute KeyValue conforming to the -// "aws.s3.copy_source" semantic conventions. It represents the source object -// (in the form `bucket`/`key`) for the copy operation. -func AWSS3CopySource(val string) attribute.KeyValue { - return AWSS3CopySourceKey.String(val) -} - -// AWSS3UploadID returns an attribute KeyValue conforming to the -// "aws.s3.upload_id" semantic conventions. It represents the upload ID that -// identifies the multipart upload. -func AWSS3UploadID(val string) attribute.KeyValue { - return AWSS3UploadIDKey.String(val) -} - -// AWSS3Delete returns an attribute KeyValue conforming to the -// "aws.s3.delete" semantic conventions. It represents the delete request -// container that specifies the objects to be deleted. -func AWSS3Delete(val string) attribute.KeyValue { - return AWSS3DeleteKey.String(val) -} - -// AWSS3PartNumber returns an attribute KeyValue conforming to the -// "aws.s3.part_number" semantic conventions. It represents the part number of -// the part being uploaded in a multipart-upload operation. This is a positive -// integer between 1 and 10,000. -func AWSS3PartNumber(val int) attribute.KeyValue { - return AWSS3PartNumberKey.Int(val) -} - -// Semantic conventions to apply when instrumenting the GraphQL implementation. -// They map GraphQL operations to attributes on a Span. -const ( - // GraphqlOperationNameKey is the attribute Key conforming to the - // "graphql.operation.name" semantic conventions. It represents the name of - // the operation being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'findBookByID' - GraphqlOperationNameKey = attribute.Key("graphql.operation.name") - - // GraphqlOperationTypeKey is the attribute Key conforming to the - // "graphql.operation.type" semantic conventions. It represents the type of - // the operation being executed. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'query', 'mutation', 'subscription' - GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") - - // GraphqlDocumentKey is the attribute Key conforming to the - // "graphql.document" semantic conventions. It represents the GraphQL - // document being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - GraphqlDocumentKey = attribute.Key("graphql.document") -) - -var ( - // GraphQL query - GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") - // GraphQL mutation - GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") - // GraphQL subscription - GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") -) - -// GraphqlOperationName returns an attribute KeyValue conforming to the -// "graphql.operation.name" semantic conventions. It represents the name of the -// operation being executed. -func GraphqlOperationName(val string) attribute.KeyValue { - return GraphqlOperationNameKey.String(val) -} - -// GraphqlDocument returns an attribute KeyValue conforming to the -// "graphql.document" semantic conventions. It represents the GraphQL document -// being executed. -func GraphqlDocument(val string) attribute.KeyValue { - return GraphqlDocumentKey.String(val) -} - -// General attributes used in messaging systems. -const ( - // MessagingSystemKey is the attribute Key conforming to the - // "messaging.system" semantic conventions. It represents a string - // identifying the messaging system. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'kafka', 'rabbitmq', 'rocketmq', 'activemq', 'AmazonSQS' - MessagingSystemKey = attribute.Key("messaging.system") - - // MessagingOperationKey is the attribute Key conforming to the - // "messaging.operation" semantic conventions. It represents a string - // identifying the kind of messaging operation as defined in the [Operation - // names](#operation-names) section above. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Note: If a custom value is used, it MUST be of low cardinality. - MessagingOperationKey = attribute.Key("messaging.operation") - - // MessagingBatchMessageCountKey is the attribute Key conforming to the - // "messaging.batch.message_count" semantic conventions. It represents the - // number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If the span describes an - // operation on a batch of messages.) - // Stability: stable - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on - // spans that operate with a single message. When a messaging client - // library supports both batch and single-message API for the same - // operation, instrumentations SHOULD use `messaging.batch.message_count` - // for batching APIs and SHOULD NOT use it for single-message APIs. - MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") -) - -var ( - // publish - MessagingOperationPublish = MessagingOperationKey.String("publish") - // receive - MessagingOperationReceive = MessagingOperationKey.String("receive") - // process - MessagingOperationProcess = MessagingOperationKey.String("process") -) - -// MessagingSystem returns an attribute KeyValue conforming to the -// "messaging.system" semantic conventions. It represents a string identifying -// the messaging system. -func MessagingSystem(val string) attribute.KeyValue { - return MessagingSystemKey.String(val) -} - -// MessagingBatchMessageCount returns an attribute KeyValue conforming to -// the "messaging.batch.message_count" semantic conventions. It represents the -// number of messages sent, received, or processed in the scope of the batching -// operation. -func MessagingBatchMessageCount(val int) attribute.KeyValue { - return MessagingBatchMessageCountKey.Int(val) -} - -// Semantic convention for a consumer of messages received from a messaging -// system -const ( - // MessagingConsumerIDKey is the attribute Key conforming to the - // "messaging.consumer.id" semantic conventions. It represents the - // identifier for the consumer receiving a message. For Kafka, set it to - // `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if - // both are present, or only `messaging.kafka.consumer.group`. For brokers, - // such as RabbitMQ and Artemis, set it to the `client_id` of the client - // consuming the message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'mygroup - client-6' - MessagingConsumerIDKey = attribute.Key("messaging.consumer.id") -) - -// MessagingConsumerID returns an attribute KeyValue conforming to the -// "messaging.consumer.id" semantic conventions. It represents the identifier -// for the consumer receiving a message. For Kafka, set it to -// `{messaging.kafka.consumer.group} - {messaging.kafka.client_id}`, if both -// are present, or only `messaging.kafka.consumer.group`. For brokers, such as -// RabbitMQ and Artemis, set it to the `client_id` of the client consuming the -// message. -func MessagingConsumerID(val string) attribute.KeyValue { - return MessagingConsumerIDKey.String(val) -} - -// Semantic conventions for remote procedure calls. -const ( - // RPCSystemKey is the attribute Key conforming to the "rpc.system" - // semantic conventions. It represents a string identifying the remoting - // system. See below for a list of well-known identifiers. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - RPCSystemKey = attribute.Key("rpc.system") - - // RPCServiceKey is the attribute Key conforming to the "rpc.service" - // semantic conventions. It represents the full (logical) name of the - // service being called, including its package name, if applicable. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing - // class. The `code.namespace` attribute may be used to store the latter - // (despite the attribute name, it may include a class name; e.g., class - // with method actually executing the call on the server side, RPC client - // stub class on the client side). - RPCServiceKey = attribute.Key("rpc.service") - - // RPCMethodKey is the attribute Key conforming to the "rpc.method" - // semantic conventions. It represents the name of the (logical) method - // being called, must be equal to the $method part in the span name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: stable - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The `code.function` attribute may be used to store the - // latter (e.g., method actually executing the call on the server side, RPC - // client stub method on the client side). - RPCMethodKey = attribute.Key("rpc.method") -) - -var ( - // gRPC - RPCSystemGRPC = RPCSystemKey.String("grpc") - // Java RMI - RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") - // .NET WCF - RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") - // Apache Dubbo - RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") - // Connect RPC - RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") -) - -// RPCService returns an attribute KeyValue conforming to the "rpc.service" -// semantic conventions. It represents the full (logical) name of the service -// being called, including its package name, if applicable. -func RPCService(val string) attribute.KeyValue { - return RPCServiceKey.String(val) -} - -// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" -// semantic conventions. It represents the name of the (logical) method being -// called, must be equal to the $method part in the span name. -func RPCMethod(val string) attribute.KeyValue { - return RPCMethodKey.String(val) -} - -// Tech-specific attributes for gRPC. -const ( - // RPCGRPCStatusCodeKey is the attribute Key conforming to the - // "rpc.grpc.status_code" semantic conventions. It represents the [numeric - // status - // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of - // the gRPC request. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") -) - -var ( - // OK - RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) - // CANCELLED - RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) - // UNKNOWN - RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) - // INVALID_ARGUMENT - RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) - // DEADLINE_EXCEEDED - RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) - // NOT_FOUND - RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) - // ALREADY_EXISTS - RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) - // PERMISSION_DENIED - RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) - // RESOURCE_EXHAUSTED - RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) - // FAILED_PRECONDITION - RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) - // ABORTED - RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) - // OUT_OF_RANGE - RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) - // UNIMPLEMENTED - RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) - // INTERNAL - RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) - // UNAVAILABLE - RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) - // DATA_LOSS - RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) - // UNAUTHENTICATED - RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) -) - -// Tech-specific attributes for [JSON RPC](https://www.jsonrpc.org/). -const ( - // RPCJsonrpcVersionKey is the attribute Key conforming to the - // "rpc.jsonrpc.version" semantic conventions. It represents the protocol - // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 - // does not specify this, the value can be omitted. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If other than the default - // version (`1.0`)) - // Stability: stable - // Examples: '2.0', '1.0' - RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") - - // RPCJsonrpcRequestIDKey is the attribute Key conforming to the - // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` - // property of request or response. Since protocol allows id to be int, - // string, `null` or missing (for notifications), value is expected to be - // cast to string for simplicity. Use empty string in case of `null` value. - // Omit entirely if this is a notification. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '10', 'request-7', '' - RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") - - // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_code" semantic conventions. It represents the - // `error.code` property of response if it is an error response. - // - // Type: int - // RequirementLevel: ConditionallyRequired (If response is not successful.) - // Stability: stable - // Examples: -32700, 100 - RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") - - // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_message" semantic conventions. It represents the - // `error.message` property of response if it is an error response. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Parse error', 'User already exists' - RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") -) - -// RPCJsonrpcVersion returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.version" semantic conventions. It represents the protocol -// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 -// does not specify this, the value can be omitted. -func RPCJsonrpcVersion(val string) attribute.KeyValue { - return RPCJsonrpcVersionKey.String(val) -} - -// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` -// property of request or response. Since protocol allows id to be int, string, -// `null` or missing (for notifications), value is expected to be cast to -// string for simplicity. Use empty string in case of `null` value. Omit -// entirely if this is a notification. -func RPCJsonrpcRequestID(val string) attribute.KeyValue { - return RPCJsonrpcRequestIDKey.String(val) -} - -// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_code" semantic conventions. It represents the -// `error.code` property of response if it is an error response. -func RPCJsonrpcErrorCode(val int) attribute.KeyValue { - return RPCJsonrpcErrorCodeKey.Int(val) -} - -// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_message" semantic conventions. It represents the -// `error.message` property of response if it is an error response. -func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { - return RPCJsonrpcErrorMessageKey.String(val) -} - -// Tech-specific attributes for Connect RPC. -const ( - // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the - // "rpc.connect_rpc.error_code" semantic conventions. It represents the - // [error codes](https://connect.build/docs/protocol/#error-codes) of the - // Connect request. Error codes are always string values. - // - // Type: Enum - // RequirementLevel: ConditionallyRequired (If response is not successful - // and if error code available.) - // Stability: stable - RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") -) - -var ( - // cancelled - RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") - // unknown - RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") - // invalid_argument - RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") - // deadline_exceeded - RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") - // not_found - RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") - // already_exists - RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") - // permission_denied - RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") - // resource_exhausted - RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") - // failed_precondition - RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") - // aborted - RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") - // out_of_range - RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") - // unimplemented - RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") - // internal - RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") - // unavailable - RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") - // data_loss - RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") - // unauthenticated - RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md deleted file mode 100644 index 2de1fc3c6b..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Semconv v1.26.0 - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.26.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.26.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go deleted file mode 100644 index d8dc822b26..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/attribute_group.go +++ /dev/null @@ -1,8996 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" - -import "go.opentelemetry.io/otel/attribute" - -// The Android platform on which the Android application is running. -const ( - // AndroidOSAPILevelKey is the attribute Key conforming to the - // "android.os.api_level" semantic conventions. It represents the uniquely - // identifies the framework API revision offered by a version - // (`os.version`) of the android operating system. More information can be - // found - // [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '33', '32' - AndroidOSAPILevelKey = attribute.Key("android.os.api_level") -) - -// AndroidOSAPILevel returns an attribute KeyValue conforming to the -// "android.os.api_level" semantic conventions. It represents the uniquely -// identifies the framework API revision offered by a version (`os.version`) of -// the android operating system. More information can be found -// [here](https://developer.android.com/guide/topics/manifest/uses-sdk-element#APILevels). -func AndroidOSAPILevel(val string) attribute.KeyValue { - return AndroidOSAPILevelKey.String(val) -} - -// ASP.NET Core attributes -const ( - // AspnetcoreRateLimitingResultKey is the attribute Key conforming to the - // "aspnetcore.rate_limiting.result" semantic conventions. It represents - // the rate-limiting result, shows whether the lease was acquired or - // contains a rejection reason - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - // Examples: 'acquired', 'request_canceled' - AspnetcoreRateLimitingResultKey = attribute.Key("aspnetcore.rate_limiting.result") - - // AspnetcoreDiagnosticsHandlerTypeKey is the attribute Key conforming to - // the "aspnetcore.diagnostics.handler.type" semantic conventions. It - // represents the full type name of the - // [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) - // implementation that handled the exception. - // - // Type: string - // RequirementLevel: ConditionallyRequired (if and only if the exception - // was handled by this handler.) - // Stability: stable - // Examples: 'Contoso.MyHandler' - AspnetcoreDiagnosticsHandlerTypeKey = attribute.Key("aspnetcore.diagnostics.handler.type") - - // AspnetcoreDiagnosticsExceptionResultKey is the attribute Key conforming - // to the "aspnetcore.diagnostics.exception.result" semantic conventions. - // It represents the aSP.NET Core exception middleware handling result - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'handled', 'unhandled' - AspnetcoreDiagnosticsExceptionResultKey = attribute.Key("aspnetcore.diagnostics.exception.result") - - // AspnetcoreRateLimitingPolicyKey is the attribute Key conforming to the - // "aspnetcore.rate_limiting.policy" semantic conventions. It represents - // the rate limiting policy name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'fixed', 'sliding', 'token' - AspnetcoreRateLimitingPolicyKey = attribute.Key("aspnetcore.rate_limiting.policy") - - // AspnetcoreRequestIsUnhandledKey is the attribute Key conforming to the - // "aspnetcore.request.is_unhandled" semantic conventions. It represents - // the flag indicating if request was handled by the application pipeline. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Examples: True - AspnetcoreRequestIsUnhandledKey = attribute.Key("aspnetcore.request.is_unhandled") - - // AspnetcoreRoutingIsFallbackKey is the attribute Key conforming to the - // "aspnetcore.routing.is_fallback" semantic conventions. It represents a - // value that indicates whether the matched route is a fallback route. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Examples: True - AspnetcoreRoutingIsFallbackKey = attribute.Key("aspnetcore.routing.is_fallback") - - // AspnetcoreRoutingMatchStatusKey is the attribute Key conforming to the - // "aspnetcore.routing.match_status" semantic conventions. It represents - // the match result - success or failure - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'success', 'failure' - AspnetcoreRoutingMatchStatusKey = attribute.Key("aspnetcore.routing.match_status") -) - -var ( - // Lease was acquired - AspnetcoreRateLimitingResultAcquired = AspnetcoreRateLimitingResultKey.String("acquired") - // Lease request was rejected by the endpoint limiter - AspnetcoreRateLimitingResultEndpointLimiter = AspnetcoreRateLimitingResultKey.String("endpoint_limiter") - // Lease request was rejected by the global limiter - AspnetcoreRateLimitingResultGlobalLimiter = AspnetcoreRateLimitingResultKey.String("global_limiter") - // Lease request was canceled - AspnetcoreRateLimitingResultRequestCanceled = AspnetcoreRateLimitingResultKey.String("request_canceled") -) - -var ( - // Exception was handled by the exception handling middleware - AspnetcoreDiagnosticsExceptionResultHandled = AspnetcoreDiagnosticsExceptionResultKey.String("handled") - // Exception was not handled by the exception handling middleware - AspnetcoreDiagnosticsExceptionResultUnhandled = AspnetcoreDiagnosticsExceptionResultKey.String("unhandled") - // Exception handling was skipped because the response had started - AspnetcoreDiagnosticsExceptionResultSkipped = AspnetcoreDiagnosticsExceptionResultKey.String("skipped") - // Exception handling didn't run because the request was aborted - AspnetcoreDiagnosticsExceptionResultAborted = AspnetcoreDiagnosticsExceptionResultKey.String("aborted") -) - -var ( - // Match succeeded - AspnetcoreRoutingMatchStatusSuccess = AspnetcoreRoutingMatchStatusKey.String("success") - // Match failed - AspnetcoreRoutingMatchStatusFailure = AspnetcoreRoutingMatchStatusKey.String("failure") -) - -// AspnetcoreDiagnosticsHandlerType returns an attribute KeyValue conforming -// to the "aspnetcore.diagnostics.handler.type" semantic conventions. It -// represents the full type name of the -// [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) -// implementation that handled the exception. -func AspnetcoreDiagnosticsHandlerType(val string) attribute.KeyValue { - return AspnetcoreDiagnosticsHandlerTypeKey.String(val) -} - -// AspnetcoreRateLimitingPolicy returns an attribute KeyValue conforming to -// the "aspnetcore.rate_limiting.policy" semantic conventions. It represents -// the rate limiting policy name. -func AspnetcoreRateLimitingPolicy(val string) attribute.KeyValue { - return AspnetcoreRateLimitingPolicyKey.String(val) -} - -// AspnetcoreRequestIsUnhandled returns an attribute KeyValue conforming to -// the "aspnetcore.request.is_unhandled" semantic conventions. It represents -// the flag indicating if request was handled by the application pipeline. -func AspnetcoreRequestIsUnhandled(val bool) attribute.KeyValue { - return AspnetcoreRequestIsUnhandledKey.Bool(val) -} - -// AspnetcoreRoutingIsFallback returns an attribute KeyValue conforming to -// the "aspnetcore.routing.is_fallback" semantic conventions. It represents a -// value that indicates whether the matched route is a fallback route. -func AspnetcoreRoutingIsFallback(val bool) attribute.KeyValue { - return AspnetcoreRoutingIsFallbackKey.Bool(val) -} - -// Generic attributes for AWS services. -const ( - // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" - // semantic conventions. It represents the AWS request ID as returned in - // the response headers `x-amz-request-id` or `x-amz-requestid`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '79b9da39-b7ae-508a-a6bc-864b2829c622', 'C9ER4AJX75574TDJ' - AWSRequestIDKey = attribute.Key("aws.request_id") -) - -// AWSRequestID returns an attribute KeyValue conforming to the -// "aws.request_id" semantic conventions. It represents the AWS request ID as -// returned in the response headers `x-amz-request-id` or `x-amz-requestid`. -func AWSRequestID(val string) attribute.KeyValue { - return AWSRequestIDKey.String(val) -} - -// Attributes for AWS DynamoDB. -const ( - // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to - // the "aws.dynamodb.attribute_definitions" semantic conventions. It - // represents the JSON-serialized value of each item in the - // `AttributeDefinitions` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "AttributeName": "string", "AttributeType": "string" }' - AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") - - // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the - // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the - // value of the `AttributesToGet` request parameter. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'lives', 'id' - AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") - - // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the - // "aws.dynamodb.consistent_read" semantic conventions. It represents the - // value of the `ConsistentRead` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") - - // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the - // JSON-serialized value of each item in the `ConsumedCapacity` response - // field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "CapacityUnits": number, "GlobalSecondaryIndexes": { - // "string" : { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "LocalSecondaryIndexes": { "string" : - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }, "ReadCapacityUnits": number, "Table": - // { "CapacityUnits": number, "ReadCapacityUnits": number, - // "WriteCapacityUnits": number }, "TableName": "string", - // "WriteCapacityUnits": number }' - AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") - - // AWSDynamoDBCountKey is the attribute Key conforming to the - // "aws.dynamodb.count" semantic conventions. It represents the value of - // the `Count` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 10 - AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") - - // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the - // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents - // the value of the `ExclusiveStartTableName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Users', 'CatsTable' - AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") - - // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key - // conforming to the "aws.dynamodb.global_secondary_index_updates" semantic - // conventions. It represents the JSON-serialized value of each item in the - // `GlobalSecondaryIndexUpdates` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, - // "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") - - // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.global_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `GlobalSecondaryIndexes` request field - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "IndexName": "string", "KeySchema": [ { "AttributeName": - // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ - // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }' - AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") - - // AWSDynamoDBIndexNameKey is the attribute Key conforming to the - // "aws.dynamodb.index_name" semantic conventions. It represents the value - // of the `IndexName` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'name_to_group' - AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") - - // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to - // the "aws.dynamodb.item_collection_metrics" semantic conventions. It - // represents the JSON-serialized value of the `ItemCollectionMetrics` - // response field. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "string" : [ { "ItemCollectionKey": { "string" : { "B": - // blob, "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { - // "string" : "AttributeValue" }, "N": "string", "NS": [ "string" ], - // "NULL": boolean, "S": "string", "SS": [ "string" ] } }, - // "SizeEstimateRangeGB": [ number ] } ] }' - AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") - - // AWSDynamoDBLimitKey is the attribute Key conforming to the - // "aws.dynamodb.limit" semantic conventions. It represents the value of - // the `Limit` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 10 - AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") - - // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to - // the "aws.dynamodb.local_secondary_indexes" semantic conventions. It - // represents the JSON-serialized value of each item of the - // `LocalSecondaryIndexes` request field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '{ "IndexARN": "string", "IndexName": "string", - // "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } }' - AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") - - // AWSDynamoDBProjectionKey is the attribute Key conforming to the - // "aws.dynamodb.projection" semantic conventions. It represents the value - // of the `ProjectionExpression` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Title', 'Title, Price, Color', 'Title, Description, - // RelatedItems, ProductReviews' - AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") - - // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to - // the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It - // represents the value of the `ProvisionedThroughput.ReadCapacityUnits` - // request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") - - // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming - // to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. - // It represents the value of the - // `ProvisionedThroughput.WriteCapacityUnits` request parameter. - // - // Type: double - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") - - // AWSDynamoDBScanForwardKey is the attribute Key conforming to the - // "aws.dynamodb.scan_forward" semantic conventions. It represents the - // value of the `ScanIndexForward` request parameter. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") - - // AWSDynamoDBScannedCountKey is the attribute Key conforming to the - // "aws.dynamodb.scanned_count" semantic conventions. It represents the - // value of the `ScannedCount` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 50 - AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") - - // AWSDynamoDBSegmentKey is the attribute Key conforming to the - // "aws.dynamodb.segment" semantic conventions. It represents the value of - // the `Segment` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 10 - AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") - - // AWSDynamoDBSelectKey is the attribute Key conforming to the - // "aws.dynamodb.select" semantic conventions. It represents the value of - // the `Select` request parameter. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ALL_ATTRIBUTES', 'COUNT' - AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") - - // AWSDynamoDBTableCountKey is the attribute Key conforming to the - // "aws.dynamodb.table_count" semantic conventions. It represents the - // number of items in the `TableNames` response parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 20 - AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") - - // AWSDynamoDBTableNamesKey is the attribute Key conforming to the - // "aws.dynamodb.table_names" semantic conventions. It represents the keys - // in the `RequestItems` object field. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Users', 'Cats' - AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") - - // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the - // "aws.dynamodb.total_segments" semantic conventions. It represents the - // value of the `TotalSegments` request parameter. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 100 - AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") -) - -// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming -// to the "aws.dynamodb.attribute_definitions" semantic conventions. It -// represents the JSON-serialized value of each item in the -// `AttributeDefinitions` request field. -func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) -} - -// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to -// the "aws.dynamodb.attributes_to_get" semantic conventions. It represents the -// value of the `AttributesToGet` request parameter. -func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributesToGetKey.StringSlice(val) -} - -// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the -// "aws.dynamodb.consistent_read" semantic conventions. It represents the value -// of the `ConsistentRead` request parameter. -func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { - return AWSDynamoDBConsistentReadKey.Bool(val) -} - -// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to -// the "aws.dynamodb.consumed_capacity" semantic conventions. It represents the -// JSON-serialized value of each item in the `ConsumedCapacity` response field. -func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { - return AWSDynamoDBConsumedCapacityKey.StringSlice(val) -} - -// AWSDynamoDBCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.count" semantic conventions. It represents the value of the -// `Count` response parameter. -func AWSDynamoDBCount(val int) attribute.KeyValue { - return AWSDynamoDBCountKey.Int(val) -} - -// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming -// to the "aws.dynamodb.exclusive_start_table" semantic conventions. It -// represents the value of the `ExclusiveStartTableName` request parameter. -func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { - return AWSDynamoDBExclusiveStartTableKey.String(val) -} - -// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic -// conventions. It represents the JSON-serialized value of each item in the -// `GlobalSecondaryIndexUpdates` request field. -func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) -} - -// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_indexes" semantic -// conventions. It represents the JSON-serialized value of each item of the -// `GlobalSecondaryIndexes` request field -func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the -// "aws.dynamodb.index_name" semantic conventions. It represents the value of -// the `IndexName` request parameter. -func AWSDynamoDBIndexName(val string) attribute.KeyValue { - return AWSDynamoDBIndexNameKey.String(val) -} - -// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming -// to the "aws.dynamodb.item_collection_metrics" semantic conventions. It -// represents the JSON-serialized value of the `ItemCollectionMetrics` response -// field. -func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { - return AWSDynamoDBItemCollectionMetricsKey.String(val) -} - -// AWSDynamoDBLimit returns an attribute KeyValue conforming to the -// "aws.dynamodb.limit" semantic conventions. It represents the value of the -// `Limit` request parameter. -func AWSDynamoDBLimit(val int) attribute.KeyValue { - return AWSDynamoDBLimitKey.Int(val) -} - -// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming -// to the "aws.dynamodb.local_secondary_indexes" semantic conventions. It -// represents the JSON-serialized value of each item of the -// `LocalSecondaryIndexes` request field. -func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBProjection returns an attribute KeyValue conforming to the -// "aws.dynamodb.projection" semantic conventions. It represents the value of -// the `ProjectionExpression` request parameter. -func AWSDynamoDBProjection(val string) attribute.KeyValue { - return AWSDynamoDBProjectionKey.String(val) -} - -// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_read_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.ReadCapacityUnits` request parameter. -func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) -} - -// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue -// conforming to the "aws.dynamodb.provisioned_write_capacity" semantic -// conventions. It represents the value of the -// `ProvisionedThroughput.WriteCapacityUnits` request parameter. -func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) -} - -// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the -// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of -// the `ScanIndexForward` request parameter. -func AWSDynamoDBScanForward(val bool) attribute.KeyValue { - return AWSDynamoDBScanForwardKey.Bool(val) -} - -// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.scanned_count" semantic conventions. It represents the value -// of the `ScannedCount` response parameter. -func AWSDynamoDBScannedCount(val int) attribute.KeyValue { - return AWSDynamoDBScannedCountKey.Int(val) -} - -// AWSDynamoDBSegment returns an attribute KeyValue conforming to the -// "aws.dynamodb.segment" semantic conventions. It represents the value of the -// `Segment` request parameter. -func AWSDynamoDBSegment(val int) attribute.KeyValue { - return AWSDynamoDBSegmentKey.Int(val) -} - -// AWSDynamoDBSelect returns an attribute KeyValue conforming to the -// "aws.dynamodb.select" semantic conventions. It represents the value of the -// `Select` request parameter. -func AWSDynamoDBSelect(val string) attribute.KeyValue { - return AWSDynamoDBSelectKey.String(val) -} - -// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_count" semantic conventions. It represents the number of -// items in the `TableNames` response parameter. -func AWSDynamoDBTableCount(val int) attribute.KeyValue { - return AWSDynamoDBTableCountKey.Int(val) -} - -// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_names" semantic conventions. It represents the keys in -// the `RequestItems` object field. -func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { - return AWSDynamoDBTableNamesKey.StringSlice(val) -} - -// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the -// "aws.dynamodb.total_segments" semantic conventions. It represents the value -// of the `TotalSegments` request parameter. -func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { - return AWSDynamoDBTotalSegmentsKey.Int(val) -} - -// Attributes for AWS Elastic Container Service (ECS). -const ( - // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id" - // semantic conventions. It represents the ID of a running ECS task. The ID - // MUST be extracted from `task.arn`. - // - // Type: string - // RequirementLevel: ConditionallyRequired (If and only if `task.arn` is - // populated.) - // Stability: experimental - // Examples: '10838bed-421f-43ef-870a-f43feacbbb5b', - // '23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id") - - // AWSECSClusterARNKey is the attribute Key conforming to the - // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an - // [ECS - // cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") - - // AWSECSContainerARNKey is the attribute Key conforming to the - // "aws.ecs.container.arn" semantic conventions. It represents the Amazon - // Resource Name (ARN) of an [ECS container - // instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9' - AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") - - // AWSECSLaunchtypeKey is the attribute Key conforming to the - // "aws.ecs.launchtype" semantic conventions. It represents the [launch - // type](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) - // for an ECS task. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") - - // AWSECSTaskARNKey is the attribute Key conforming to the - // "aws.ecs.task.arn" semantic conventions. It represents the ARN of a - // running [ECS - // task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b', - // 'arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd' - AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") - - // AWSECSTaskFamilyKey is the attribute Key conforming to the - // "aws.ecs.task.family" semantic conventions. It represents the family - // name of the [ECS task - // definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) - // used to create the ECS task. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry-family' - AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") - - // AWSECSTaskRevisionKey is the attribute Key conforming to the - // "aws.ecs.task.revision" semantic conventions. It represents the revision - // for the task definition used to create the ECS task. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '8', '26' - AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") -) - -var ( - // ec2 - AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") - // fargate - AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") -) - -// AWSECSTaskID returns an attribute KeyValue conforming to the -// "aws.ecs.task.id" semantic conventions. It represents the ID of a running -// ECS task. The ID MUST be extracted from `task.arn`. -func AWSECSTaskID(val string) attribute.KeyValue { - return AWSECSTaskIDKey.String(val) -} - -// AWSECSClusterARN returns an attribute KeyValue conforming to the -// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an [ECS -// cluster](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html). -func AWSECSClusterARN(val string) attribute.KeyValue { - return AWSECSClusterARNKey.String(val) -} - -// AWSECSContainerARN returns an attribute KeyValue conforming to the -// "aws.ecs.container.arn" semantic conventions. It represents the Amazon -// Resource Name (ARN) of an [ECS container -// instance](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html). -func AWSECSContainerARN(val string) attribute.KeyValue { - return AWSECSContainerARNKey.String(val) -} - -// AWSECSTaskARN returns an attribute KeyValue conforming to the -// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running -// [ECS -// task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids). -func AWSECSTaskARN(val string) attribute.KeyValue { - return AWSECSTaskARNKey.String(val) -} - -// AWSECSTaskFamily returns an attribute KeyValue conforming to the -// "aws.ecs.task.family" semantic conventions. It represents the family name of -// the [ECS task -// definition](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html) -// used to create the ECS task. -func AWSECSTaskFamily(val string) attribute.KeyValue { - return AWSECSTaskFamilyKey.String(val) -} - -// AWSECSTaskRevision returns an attribute KeyValue conforming to the -// "aws.ecs.task.revision" semantic conventions. It represents the revision for -// the task definition used to create the ECS task. -func AWSECSTaskRevision(val string) attribute.KeyValue { - return AWSECSTaskRevisionKey.String(val) -} - -// Attributes for AWS Elastic Kubernetes Service (EKS). -const ( - // AWSEKSClusterARNKey is the attribute Key conforming to the - // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an - // EKS cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster' - AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") -) - -// AWSEKSClusterARN returns an attribute KeyValue conforming to the -// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS -// cluster. -func AWSEKSClusterARN(val string) attribute.KeyValue { - return AWSEKSClusterARNKey.String(val) -} - -// Attributes for AWS Logs. -const ( - // AWSLogGroupARNsKey is the attribute Key conforming to the - // "aws.log.group.arns" semantic conventions. It represents the Amazon - // Resource Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*' - // Note: See the [log group ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") - - // AWSLogGroupNamesKey is the attribute Key conforming to the - // "aws.log.group.names" semantic conventions. It represents the name(s) of - // the AWS log group(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/aws/lambda/my-function', 'opentelemetry-service' - // Note: Multiple log groups must be supported for cases like - // multi-container applications, where a single application has sidecar - // containers, and each write to their own log group. - AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") - - // AWSLogStreamARNsKey is the attribute Key conforming to the - // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of - // the AWS log stream(s). - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - // Note: See the [log stream ARN format - // documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format). - // One log group can contain several log streams, so these ARNs necessarily - // identify both a log group and a log stream. - AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") - - // AWSLogStreamNamesKey is the attribute Key conforming to the - // "aws.log.stream.names" semantic conventions. It represents the name(s) - // of the AWS log stream(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'logs/main/10838bed-421f-43ef-870a-f43feacbbb5b' - AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") -) - -// AWSLogGroupARNs returns an attribute KeyValue conforming to the -// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource -// Name(s) (ARN) of the AWS log group(s). -func AWSLogGroupARNs(val ...string) attribute.KeyValue { - return AWSLogGroupARNsKey.StringSlice(val) -} - -// AWSLogGroupNames returns an attribute KeyValue conforming to the -// "aws.log.group.names" semantic conventions. It represents the name(s) of the -// AWS log group(s) an application is writing to. -func AWSLogGroupNames(val ...string) attribute.KeyValue { - return AWSLogGroupNamesKey.StringSlice(val) -} - -// AWSLogStreamARNs returns an attribute KeyValue conforming to the -// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the -// AWS log stream(s). -func AWSLogStreamARNs(val ...string) attribute.KeyValue { - return AWSLogStreamARNsKey.StringSlice(val) -} - -// AWSLogStreamNames returns an attribute KeyValue conforming to the -// "aws.log.stream.names" semantic conventions. It represents the name(s) of -// the AWS log stream(s) an application is writing to. -func AWSLogStreamNames(val ...string) attribute.KeyValue { - return AWSLogStreamNamesKey.StringSlice(val) -} - -// Attributes for AWS Lambda. -const ( - // AWSLambdaInvokedARNKey is the attribute Key conforming to the - // "aws.lambda.invoked_arn" semantic conventions. It represents the full - // invoked ARN as provided on the `Context` passed to the function - // (`Lambda-Runtime-Invoked-Function-ARN` header on the - // `/runtime/invocation/next` applicable). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:us-east-1:123456:function:myfunction:myalias' - // Note: This may be different from `cloud.resource_id` if an alias is - // involved. - AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") -) - -// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the -// "aws.lambda.invoked_arn" semantic conventions. It represents the full -// invoked ARN as provided on the `Context` passed to the function -// (`Lambda-Runtime-Invoked-Function-ARN` header on the -// `/runtime/invocation/next` applicable). -func AWSLambdaInvokedARN(val string) attribute.KeyValue { - return AWSLambdaInvokedARNKey.String(val) -} - -// Attributes for AWS S3. -const ( - // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" - // semantic conventions. It represents the S3 bucket name the request - // refers to. Corresponds to the `--bucket` parameter of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // operations. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'some-bucket-name' - // Note: The `bucket` attribute is applicable to all S3 operations that - // reference a bucket, i.e. that require the bucket name as a mandatory - // parameter. - // This applies to almost all S3 operations except `list-buckets`. - AWSS3BucketKey = attribute.Key("aws.s3.bucket") - - // AWSS3CopySourceKey is the attribute Key conforming to the - // "aws.s3.copy_source" semantic conventions. It represents the source - // object (in the form `bucket`/`key`) for the copy operation. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The `copy_source` attribute applies to S3 copy operations and - // corresponds to the `--copy-source` parameter - // of the [copy-object operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html). - // This applies in particular to the following operations: - // - // - - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") - - // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" - // semantic conventions. It represents the delete request container that - // specifies the objects to be deleted. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'Objects=[{Key=string,VersionID=string},{Key=string,VersionID=string}],Quiet=boolean' - // Note: The `delete` attribute is only applicable to the - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) - // operation. - // The `delete` attribute corresponds to the `--delete` parameter of the - // [delete-objects operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html). - AWSS3DeleteKey = attribute.Key("aws.s3.delete") - - // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic - // conventions. It represents the S3 object key the request refers to. - // Corresponds to the `--key` parameter of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // operations. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'someFile.yml' - // Note: The `key` attribute is applicable to all object-related S3 - // operations, i.e. that require the object key as a mandatory parameter. - // This applies in particular to the following operations: - // - // - - // [copy-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html) - // - - // [delete-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html) - // - - // [get-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html) - // - - // [head-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html) - // - - // [put-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html) - // - - // [restore-object](https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html) - // - - // [select-object-content](https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html) - // - - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - // - - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - // - - // [create-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html) - // - - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - // - - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3KeyKey = attribute.Key("aws.s3.key") - - // AWSS3PartNumberKey is the attribute Key conforming to the - // "aws.s3.part_number" semantic conventions. It represents the part number - // of the part being uploaded in a multipart-upload operation. This is a - // positive integer between 1 and 10,000. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3456 - // Note: The `part_number` attribute is only applicable to the - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // and - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - // operations. - // The `part_number` attribute corresponds to the `--part-number` parameter - // of the - // [upload-part operation within the S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html). - AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") - - // AWSS3UploadIDKey is the attribute Key conforming to the - // "aws.s3.upload_id" semantic conventions. It represents the upload ID - // that identifies the multipart upload. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ' - // Note: The `upload_id` attribute applies to S3 multipart-upload - // operations and corresponds to the `--upload-id` parameter - // of the [S3 - // API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) - // multipart operations. - // This applies in particular to the following operations: - // - // - - // [abort-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html) - // - - // [complete-multipart-upload](https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html) - // - - // [list-parts](https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html) - // - - // [upload-part](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html) - // - - // [upload-part-copy](https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html) - AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") -) - -// AWSS3Bucket returns an attribute KeyValue conforming to the -// "aws.s3.bucket" semantic conventions. It represents the S3 bucket name the -// request refers to. Corresponds to the `--bucket` parameter of the [S3 -// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) -// operations. -func AWSS3Bucket(val string) attribute.KeyValue { - return AWSS3BucketKey.String(val) -} - -// AWSS3CopySource returns an attribute KeyValue conforming to the -// "aws.s3.copy_source" semantic conventions. It represents the source object -// (in the form `bucket`/`key`) for the copy operation. -func AWSS3CopySource(val string) attribute.KeyValue { - return AWSS3CopySourceKey.String(val) -} - -// AWSS3Delete returns an attribute KeyValue conforming to the -// "aws.s3.delete" semantic conventions. It represents the delete request -// container that specifies the objects to be deleted. -func AWSS3Delete(val string) attribute.KeyValue { - return AWSS3DeleteKey.String(val) -} - -// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" -// semantic conventions. It represents the S3 object key the request refers to. -// Corresponds to the `--key` parameter of the [S3 -// API](https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html) -// operations. -func AWSS3Key(val string) attribute.KeyValue { - return AWSS3KeyKey.String(val) -} - -// AWSS3PartNumber returns an attribute KeyValue conforming to the -// "aws.s3.part_number" semantic conventions. It represents the part number of -// the part being uploaded in a multipart-upload operation. This is a positive -// integer between 1 and 10,000. -func AWSS3PartNumber(val int) attribute.KeyValue { - return AWSS3PartNumberKey.Int(val) -} - -// AWSS3UploadID returns an attribute KeyValue conforming to the -// "aws.s3.upload_id" semantic conventions. It represents the upload ID that -// identifies the multipart upload. -func AWSS3UploadID(val string) attribute.KeyValue { - return AWSS3UploadIDKey.String(val) -} - -// The web browser attributes -const ( - // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" - // semantic conventions. It represents the array of brand name and version - // separated by a space - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: ' Not A;Brand 99', 'Chromium 99', 'Chrome 99' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.brands`). - BrowserBrandsKey = attribute.Key("browser.brands") - - // BrowserLanguageKey is the attribute Key conforming to the - // "browser.language" semantic conventions. It represents the preferred - // language of the user using the browser - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'en', 'en-US', 'fr', 'fr-FR' - // Note: This value is intended to be taken from the Navigator API - // `navigator.language`. - BrowserLanguageKey = attribute.Key("browser.language") - - // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" - // semantic conventions. It represents a boolean that is true if the - // browser is running on a mobile device - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.mobile`). If unavailable, this attribute - // SHOULD be left unset. - BrowserMobileKey = attribute.Key("browser.mobile") - - // BrowserPlatformKey is the attribute Key conforming to the - // "browser.platform" semantic conventions. It represents the platform on - // which the browser is running - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Windows', 'macOS', 'Android' - // Note: This value is intended to be taken from the [UA client hints - // API](https://wicg.github.io/ua-client-hints/#interface) - // (`navigator.userAgentData.platform`). If unavailable, the legacy - // `navigator.platform` API SHOULD NOT be used instead and this attribute - // SHOULD be left unset in order for the values to be consistent. - // The list of possible values is defined in the [W3C User-Agent Client - // Hints - // specification](https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform). - // Note that some (but not all) of these values can overlap with values in - // the [`os.type` and `os.name` attributes](./os.md). However, for - // consistency, the values in the `browser.platform` attribute should - // capture the exact value that the user agent provides. - BrowserPlatformKey = attribute.Key("browser.platform") -) - -// BrowserBrands returns an attribute KeyValue conforming to the -// "browser.brands" semantic conventions. It represents the array of brand name -// and version separated by a space -func BrowserBrands(val ...string) attribute.KeyValue { - return BrowserBrandsKey.StringSlice(val) -} - -// BrowserLanguage returns an attribute KeyValue conforming to the -// "browser.language" semantic conventions. It represents the preferred -// language of the user using the browser -func BrowserLanguage(val string) attribute.KeyValue { - return BrowserLanguageKey.String(val) -} - -// BrowserMobile returns an attribute KeyValue conforming to the -// "browser.mobile" semantic conventions. It represents a boolean that is true -// if the browser is running on a mobile device -func BrowserMobile(val bool) attribute.KeyValue { - return BrowserMobileKey.Bool(val) -} - -// BrowserPlatform returns an attribute KeyValue conforming to the -// "browser.platform" semantic conventions. It represents the platform on which -// the browser is running -func BrowserPlatform(val string) attribute.KeyValue { - return BrowserPlatformKey.String(val) -} - -// These attributes may be used to describe the client in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // ClientAddressKey is the attribute Key conforming to the "client.address" - // semantic conventions. It represents the client address - domain name if - // available without reverse DNS lookup; otherwise, IP address or Unix - // domain socket name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'client.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the server side, and when communicating through - // an intermediary, `client.address` SHOULD represent the client address - // behind any intermediaries, for example proxies, if it's available. - ClientAddressKey = attribute.Key("client.address") - - // ClientPortKey is the attribute Key conforming to the "client.port" - // semantic conventions. It represents the client port number. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 65123 - // Note: When observed from the server side, and when communicating through - // an intermediary, `client.port` SHOULD represent the client port behind - // any intermediaries, for example proxies, if it's available. - ClientPortKey = attribute.Key("client.port") -) - -// ClientAddress returns an attribute KeyValue conforming to the -// "client.address" semantic conventions. It represents the client address - -// domain name if available without reverse DNS lookup; otherwise, IP address -// or Unix domain socket name. -func ClientAddress(val string) attribute.KeyValue { - return ClientAddressKey.String(val) -} - -// ClientPort returns an attribute KeyValue conforming to the "client.port" -// semantic conventions. It represents the client port number. -func ClientPort(val int) attribute.KeyValue { - return ClientPortKey.Int(val) -} - -// A cloud environment (e.g. GCP, Azure, AWS). -const ( - // CloudAccountIDKey is the attribute Key conforming to the - // "cloud.account.id" semantic conventions. It represents the cloud account - // ID the resource is assigned to. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '111111111111', 'opentelemetry' - CloudAccountIDKey = attribute.Key("cloud.account.id") - - // CloudAvailabilityZoneKey is the attribute Key conforming to the - // "cloud.availability_zone" semantic conventions. It represents the cloud - // regions often have multiple, isolated locations known as zones to - // increase availability. Availability zone represents the zone where the - // resource is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'us-east-1c' - // Note: Availability zones are called "zones" on Alibaba Cloud and Google - // Cloud. - CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") - - // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" - // semantic conventions. It represents the cloud platform in use. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: The prefix of the service SHOULD match the one specified in - // `cloud.provider`. - CloudPlatformKey = attribute.Key("cloud.platform") - - // CloudProviderKey is the attribute Key conforming to the "cloud.provider" - // semantic conventions. It represents the name of the cloud provider. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - CloudProviderKey = attribute.Key("cloud.provider") - - // CloudRegionKey is the attribute Key conforming to the "cloud.region" - // semantic conventions. It represents the geographical region the resource - // is running. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'us-central1', 'us-east-1' - // Note: Refer to your provider's docs to see the available regions, for - // example [Alibaba Cloud - // regions](https://www.alibabacloud.com/help/doc-detail/40654.htm), [AWS - // regions](https://aws.amazon.com/about-aws/global-infrastructure/regions_az/), - // [Azure - // regions](https://azure.microsoft.com/global-infrastructure/geographies/), - // [Google Cloud regions](https://cloud.google.com/about/locations), or - // [Tencent Cloud - // regions](https://www.tencentcloud.com/document/product/213/6091). - CloudRegionKey = attribute.Key("cloud.region") - - // CloudResourceIDKey is the attribute Key conforming to the - // "cloud.resource_id" semantic conventions. It represents the cloud - // provider-specific native identifier of the monitored cloud resource - // (e.g. an - // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // on AWS, a [fully qualified resource - // ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) - // on Azure, a [full resource - // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) - // on GCP) - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function', - // '//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID', - // '/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/' - // Note: On some cloud providers, it may not be possible to determine the - // full ID at startup, - // so it may be necessary to set `cloud.resource_id` as a span attribute - // instead. - // - // The exact value to use for `cloud.resource_id` depends on the cloud - // provider. - // The following well-known definitions MUST be used if you set this - // attribute and they apply: - // - // * **AWS Lambda:** The function - // [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // Take care not to use the "invoked ARN" directly but replace any - // [alias - // suffix](https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html) - // with the resolved function version, as the same runtime instance may - // be invokable with - // multiple different aliases. - // * **GCP:** The [URI of the - // resource](https://cloud.google.com/iam/docs/full-resource-names) - // * **Azure:** The [Fully Qualified Resource - // ID](https://docs.microsoft.com/rest/api/resources/resources/get-by-id) - // of the invoked function, - // *not* the function app, having the form - // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/`. - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider. - CloudResourceIDKey = attribute.Key("cloud.resource_id") -) - -var ( - // Alibaba Cloud Elastic Compute Service - CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") - // Alibaba Cloud Function Compute - CloudPlatformAlibabaCloudFc = CloudPlatformKey.String("alibaba_cloud_fc") - // Red Hat OpenShift on Alibaba Cloud - CloudPlatformAlibabaCloudOpenshift = CloudPlatformKey.String("alibaba_cloud_openshift") - // AWS Elastic Compute Cloud - CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") - // AWS Elastic Container Service - CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") - // AWS Elastic Kubernetes Service - CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") - // AWS Lambda - CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") - // AWS Elastic Beanstalk - CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") - // AWS App Runner - CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") - // Red Hat OpenShift on AWS (ROSA) - CloudPlatformAWSOpenshift = CloudPlatformKey.String("aws_openshift") - // Azure Virtual Machines - CloudPlatformAzureVM = CloudPlatformKey.String("azure_vm") - // Azure Container Apps - CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure_container_apps") - // Azure Container Instances - CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure_container_instances") - // Azure Kubernetes Service - CloudPlatformAzureAKS = CloudPlatformKey.String("azure_aks") - // Azure Functions - CloudPlatformAzureFunctions = CloudPlatformKey.String("azure_functions") - // Azure App Service - CloudPlatformAzureAppService = CloudPlatformKey.String("azure_app_service") - // Azure Red Hat OpenShift - CloudPlatformAzureOpenshift = CloudPlatformKey.String("azure_openshift") - // Google Bare Metal Solution (BMS) - CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") - // Google Cloud Compute Engine (GCE) - CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") - // Google Cloud Run - CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") - // Google Cloud Kubernetes Engine (GKE) - CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") - // Google Cloud Functions (GCF) - CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") - // Google Cloud App Engine (GAE) - CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") - // Red Hat OpenShift on Google Cloud - CloudPlatformGCPOpenshift = CloudPlatformKey.String("gcp_openshift") - // Red Hat OpenShift on IBM Cloud - CloudPlatformIbmCloudOpenshift = CloudPlatformKey.String("ibm_cloud_openshift") - // Tencent Cloud Cloud Virtual Machine (CVM) - CloudPlatformTencentCloudCvm = CloudPlatformKey.String("tencent_cloud_cvm") - // Tencent Cloud Elastic Kubernetes Service (EKS) - CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") - // Tencent Cloud Serverless Cloud Function (SCF) - CloudPlatformTencentCloudScf = CloudPlatformKey.String("tencent_cloud_scf") -) - -var ( - // Alibaba Cloud - CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") - // Amazon Web Services - CloudProviderAWS = CloudProviderKey.String("aws") - // Microsoft Azure - CloudProviderAzure = CloudProviderKey.String("azure") - // Google Cloud Platform - CloudProviderGCP = CloudProviderKey.String("gcp") - // Heroku Platform as a Service - CloudProviderHeroku = CloudProviderKey.String("heroku") - // IBM Cloud - CloudProviderIbmCloud = CloudProviderKey.String("ibm_cloud") - // Tencent Cloud - CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") -) - -// CloudAccountID returns an attribute KeyValue conforming to the -// "cloud.account.id" semantic conventions. It represents the cloud account ID -// the resource is assigned to. -func CloudAccountID(val string) attribute.KeyValue { - return CloudAccountIDKey.String(val) -} - -// CloudAvailabilityZone returns an attribute KeyValue conforming to the -// "cloud.availability_zone" semantic conventions. It represents the cloud -// regions often have multiple, isolated locations known as zones to increase -// availability. Availability zone represents the zone where the resource is -// running. -func CloudAvailabilityZone(val string) attribute.KeyValue { - return CloudAvailabilityZoneKey.String(val) -} - -// CloudRegion returns an attribute KeyValue conforming to the -// "cloud.region" semantic conventions. It represents the geographical region -// the resource is running. -func CloudRegion(val string) attribute.KeyValue { - return CloudRegionKey.String(val) -} - -// CloudResourceID returns an attribute KeyValue conforming to the -// "cloud.resource_id" semantic conventions. It represents the cloud -// provider-specific native identifier of the monitored cloud resource (e.g. an -// [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) -// on AWS, a [fully qualified resource -// ID](https://learn.microsoft.com/rest/api/resources/resources/get-by-id) on -// Azure, a [full resource -// name](https://cloud.google.com/apis/design/resource_names#full_resource_name) -// on GCP) -func CloudResourceID(val string) attribute.KeyValue { - return CloudResourceIDKey.String(val) -} - -// Attributes for CloudEvents. -const ( - // CloudeventsEventIDKey is the attribute Key conforming to the - // "cloudevents.event_id" semantic conventions. It represents the - // [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) - // uniquely identifies the event. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '123e4567-e89b-12d3-a456-426614174000', '0001' - CloudeventsEventIDKey = attribute.Key("cloudevents.event_id") - - // CloudeventsEventSourceKey is the attribute Key conforming to the - // "cloudevents.event_source" semantic conventions. It represents the - // [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) - // identifies the context in which an event happened. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'https://github.com/cloudevents', - // '/cloudevents/spec/pull/123', 'my-service' - CloudeventsEventSourceKey = attribute.Key("cloudevents.event_source") - - // CloudeventsEventSpecVersionKey is the attribute Key conforming to the - // "cloudevents.event_spec_version" semantic conventions. It represents the - // [version of the CloudEvents - // specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) - // which the event uses. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1.0' - CloudeventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") - - // CloudeventsEventSubjectKey is the attribute Key conforming to the - // "cloudevents.event_subject" semantic conventions. It represents the - // [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) - // of the event in the context of the event producer (identified by - // source). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'mynewfile.jpg' - CloudeventsEventSubjectKey = attribute.Key("cloudevents.event_subject") - - // CloudeventsEventTypeKey is the attribute Key conforming to the - // "cloudevents.event_type" semantic conventions. It represents the - // [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) - // contains a value describing the type of event related to the originating - // occurrence. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'com.github.pull_request.opened', - // 'com.example.object.deleted.v2' - CloudeventsEventTypeKey = attribute.Key("cloudevents.event_type") -) - -// CloudeventsEventID returns an attribute KeyValue conforming to the -// "cloudevents.event_id" semantic conventions. It represents the -// [event_id](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id) -// uniquely identifies the event. -func CloudeventsEventID(val string) attribute.KeyValue { - return CloudeventsEventIDKey.String(val) -} - -// CloudeventsEventSource returns an attribute KeyValue conforming to the -// "cloudevents.event_source" semantic conventions. It represents the -// [source](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1) -// identifies the context in which an event happened. -func CloudeventsEventSource(val string) attribute.KeyValue { - return CloudeventsEventSourceKey.String(val) -} - -// CloudeventsEventSpecVersion returns an attribute KeyValue conforming to -// the "cloudevents.event_spec_version" semantic conventions. It represents the -// [version of the CloudEvents -// specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) -// which the event uses. -func CloudeventsEventSpecVersion(val string) attribute.KeyValue { - return CloudeventsEventSpecVersionKey.String(val) -} - -// CloudeventsEventSubject returns an attribute KeyValue conforming to the -// "cloudevents.event_subject" semantic conventions. It represents the -// [subject](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject) -// of the event in the context of the event producer (identified by source). -func CloudeventsEventSubject(val string) attribute.KeyValue { - return CloudeventsEventSubjectKey.String(val) -} - -// CloudeventsEventType returns an attribute KeyValue conforming to the -// "cloudevents.event_type" semantic conventions. It represents the -// [event_type](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) -// contains a value describing the type of event related to the originating -// occurrence. -func CloudeventsEventType(val string) attribute.KeyValue { - return CloudeventsEventTypeKey.String(val) -} - -// These attributes allow to report this unit of code and therefore to provide -// more context about the span. -const ( - // CodeColumnKey is the attribute Key conforming to the "code.column" - // semantic conventions. It represents the column number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 16 - CodeColumnKey = attribute.Key("code.column") - - // CodeFilepathKey is the attribute Key conforming to the "code.filepath" - // semantic conventions. It represents the source code file name that - // identifies the code unit as uniquely as possible (preferably an absolute - // file path). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/usr/local/MyApplication/content_root/app/index.php' - CodeFilepathKey = attribute.Key("code.filepath") - - // CodeFunctionKey is the attribute Key conforming to the "code.function" - // semantic conventions. It represents the method or function name, or - // equivalent (usually rightmost part of the code unit's name). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'serveRequest' - CodeFunctionKey = attribute.Key("code.function") - - // CodeLineNumberKey is the attribute Key conforming to the "code.lineno" - // semantic conventions. It represents the line number in `code.filepath` - // best representing the operation. It SHOULD point within the code unit - // named in `code.function`. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 42 - CodeLineNumberKey = attribute.Key("code.lineno") - - // CodeNamespaceKey is the attribute Key conforming to the "code.namespace" - // semantic conventions. It represents the "namespace" within which - // `code.function` is defined. Usually the qualified class or module name, - // such that `code.namespace` + some separator + `code.function` form a - // unique identifier for the code unit. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'com.example.MyHTTPService' - CodeNamespaceKey = attribute.Key("code.namespace") - - // CodeStacktraceKey is the attribute Key conforming to the - // "code.stacktrace" semantic conventions. It represents a stacktrace as a - // string in the natural representation for the language runtime. The - // representation is to be determined and documented by each language SIG. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'at - // com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - CodeStacktraceKey = attribute.Key("code.stacktrace") -) - -// CodeColumn returns an attribute KeyValue conforming to the "code.column" -// semantic conventions. It represents the column number in `code.filepath` -// best representing the operation. It SHOULD point within the code unit named -// in `code.function`. -func CodeColumn(val int) attribute.KeyValue { - return CodeColumnKey.Int(val) -} - -// CodeFilepath returns an attribute KeyValue conforming to the -// "code.filepath" semantic conventions. It represents the source code file -// name that identifies the code unit as uniquely as possible (preferably an -// absolute file path). -func CodeFilepath(val string) attribute.KeyValue { - return CodeFilepathKey.String(val) -} - -// CodeFunction returns an attribute KeyValue conforming to the -// "code.function" semantic conventions. It represents the method or function -// name, or equivalent (usually rightmost part of the code unit's name). -func CodeFunction(val string) attribute.KeyValue { - return CodeFunctionKey.String(val) -} - -// CodeLineNumber returns an attribute KeyValue conforming to the "code.lineno" -// semantic conventions. It represents the line number in `code.filepath` best -// representing the operation. It SHOULD point within the code unit named in -// `code.function`. -func CodeLineNumber(val int) attribute.KeyValue { - return CodeLineNumberKey.Int(val) -} - -// CodeNamespace returns an attribute KeyValue conforming to the -// "code.namespace" semantic conventions. It represents the "namespace" within -// which `code.function` is defined. Usually the qualified class or module -// name, such that `code.namespace` + some separator + `code.function` form a -// unique identifier for the code unit. -func CodeNamespace(val string) attribute.KeyValue { - return CodeNamespaceKey.String(val) -} - -// CodeStacktrace returns an attribute KeyValue conforming to the -// "code.stacktrace" semantic conventions. It represents a stacktrace as a -// string in the natural representation for the language runtime. The -// representation is to be determined and documented by each language SIG. -func CodeStacktrace(val string) attribute.KeyValue { - return CodeStacktraceKey.String(val) -} - -// A container instance. -const ( - // ContainerCommandKey is the attribute Key conforming to the - // "container.command" semantic conventions. It represents the command used - // to run the container (i.e. the command name). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'otelcontribcol' - // Note: If using embedded credentials or sensitive data, it is recommended - // to remove them to prevent potential leakage. - ContainerCommandKey = attribute.Key("container.command") - - // ContainerCommandArgsKey is the attribute Key conforming to the - // "container.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) run by the - // container. [2] - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'otelcontribcol, --config, config.yaml' - ContainerCommandArgsKey = attribute.Key("container.command_args") - - // ContainerCommandLineKey is the attribute Key conforming to the - // "container.command_line" semantic conventions. It represents the full - // command run by the container as a single string representing the full - // command. [2] - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'otelcontribcol --config config.yaml' - ContainerCommandLineKey = attribute.Key("container.command_line") - - // ContainerCPUStateKey is the attribute Key conforming to the - // "container.cpu.state" semantic conventions. It represents the CPU state - // for this data point. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'user', 'kernel' - ContainerCPUStateKey = attribute.Key("container.cpu.state") - - // ContainerIDKey is the attribute Key conforming to the "container.id" - // semantic conventions. It represents the container ID. Usually a UUID, as - // for example used to [identify Docker - // containers](https://docs.docker.com/engine/reference/run/#container-identification). - // The UUID might be abbreviated. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'a3bf90e006b2' - ContainerIDKey = attribute.Key("container.id") - - // ContainerImageIDKey is the attribute Key conforming to the - // "container.image.id" semantic conventions. It represents the runtime - // specific image identifier. Usually a hash algorithm followed by a UUID. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f' - // Note: Docker defines a sha256 of the image id; `container.image.id` - // corresponds to the `Image` field from the Docker container inspect - // [API](https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect) - // endpoint. - // K8S defines a link to the container registry repository with digest - // `"imageID": "registry.azurecr.io - // /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"`. - // The ID is assigned by the container runtime and can vary in different - // environments. Consider using `oci.manifest.digest` if it is important to - // identify the same image in different environments/runtimes. - ContainerImageIDKey = attribute.Key("container.image.id") - - // ContainerImageNameKey is the attribute Key conforming to the - // "container.image.name" semantic conventions. It represents the name of - // the image the container was built on. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'gcr.io/opentelemetry/operator' - ContainerImageNameKey = attribute.Key("container.image.name") - - // ContainerImageRepoDigestsKey is the attribute Key conforming to the - // "container.image.repo_digests" semantic conventions. It represents the - // repo digests of the container image as provided by the container - // runtime. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb', - // 'internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578' - // Note: - // [Docker](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect) - // and - // [CRI](https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238) - // report those under the `RepoDigests` field. - ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") - - // ContainerImageTagsKey is the attribute Key conforming to the - // "container.image.tags" semantic conventions. It represents the container - // image tags. An example can be found in [Docker Image - // Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). - // Should be only the `` section of the full name for example from - // `registry.example.com/my-org/my-image:`. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'v1.27.1', '3.5.7-0' - ContainerImageTagsKey = attribute.Key("container.image.tags") - - // ContainerNameKey is the attribute Key conforming to the "container.name" - // semantic conventions. It represents the container name used by container - // runtime. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry-autoconf' - ContainerNameKey = attribute.Key("container.name") - - // ContainerRuntimeKey is the attribute Key conforming to the - // "container.runtime" semantic conventions. It represents the container - // runtime managing this container. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'docker', 'containerd', 'rkt' - ContainerRuntimeKey = attribute.Key("container.runtime") -) - -var ( - // When tasks of the cgroup are in user mode (Linux). When all container processes are in user mode (Windows) - ContainerCPUStateUser = ContainerCPUStateKey.String("user") - // When CPU is used by the system (host OS) - ContainerCPUStateSystem = ContainerCPUStateKey.String("system") - // When tasks of the cgroup are in kernel mode (Linux). When all container processes are in kernel mode (Windows) - ContainerCPUStateKernel = ContainerCPUStateKey.String("kernel") -) - -// ContainerCommand returns an attribute KeyValue conforming to the -// "container.command" semantic conventions. It represents the command used to -// run the container (i.e. the command name). -func ContainerCommand(val string) attribute.KeyValue { - return ContainerCommandKey.String(val) -} - -// ContainerCommandArgs returns an attribute KeyValue conforming to the -// "container.command_args" semantic conventions. It represents the all the -// command arguments (including the command/executable itself) run by the -// container. [2] -func ContainerCommandArgs(val ...string) attribute.KeyValue { - return ContainerCommandArgsKey.StringSlice(val) -} - -// ContainerCommandLine returns an attribute KeyValue conforming to the -// "container.command_line" semantic conventions. It represents the full -// command run by the container as a single string representing the full -// command. [2] -func ContainerCommandLine(val string) attribute.KeyValue { - return ContainerCommandLineKey.String(val) -} - -// ContainerID returns an attribute KeyValue conforming to the -// "container.id" semantic conventions. It represents the container ID. Usually -// a UUID, as for example used to [identify Docker -// containers](https://docs.docker.com/engine/reference/run/#container-identification). -// The UUID might be abbreviated. -func ContainerID(val string) attribute.KeyValue { - return ContainerIDKey.String(val) -} - -// ContainerImageID returns an attribute KeyValue conforming to the -// "container.image.id" semantic conventions. It represents the runtime -// specific image identifier. Usually a hash algorithm followed by a UUID. -func ContainerImageID(val string) attribute.KeyValue { - return ContainerImageIDKey.String(val) -} - -// ContainerImageName returns an attribute KeyValue conforming to the -// "container.image.name" semantic conventions. It represents the name of the -// image the container was built on. -func ContainerImageName(val string) attribute.KeyValue { - return ContainerImageNameKey.String(val) -} - -// ContainerImageRepoDigests returns an attribute KeyValue conforming to the -// "container.image.repo_digests" semantic conventions. It represents the repo -// digests of the container image as provided by the container runtime. -func ContainerImageRepoDigests(val ...string) attribute.KeyValue { - return ContainerImageRepoDigestsKey.StringSlice(val) -} - -// ContainerImageTags returns an attribute KeyValue conforming to the -// "container.image.tags" semantic conventions. It represents the container -// image tags. An example can be found in [Docker Image -// Inspect](https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect). -// Should be only the `` section of the full name for example from -// `registry.example.com/my-org/my-image:`. -func ContainerImageTags(val ...string) attribute.KeyValue { - return ContainerImageTagsKey.StringSlice(val) -} - -// ContainerName returns an attribute KeyValue conforming to the -// "container.name" semantic conventions. It represents the container name used -// by container runtime. -func ContainerName(val string) attribute.KeyValue { - return ContainerNameKey.String(val) -} - -// ContainerRuntime returns an attribute KeyValue conforming to the -// "container.runtime" semantic conventions. It represents the container -// runtime managing this container. -func ContainerRuntime(val string) attribute.KeyValue { - return ContainerRuntimeKey.String(val) -} - -// This group defines the attributes used to describe telemetry in the context -// of databases. -const ( - // DBClientConnectionsPoolNameKey is the attribute Key conforming to the - // "db.client.connections.pool.name" semantic conventions. It represents - // the name of the connection pool; unique within the instrumented - // application. In case the connection pool implementation doesn't provide - // a name, instrumentation should use a combination of `server.address` and - // `server.port` attributes formatted as `server.address:server.port`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myDataSource' - DBClientConnectionsPoolNameKey = attribute.Key("db.client.connections.pool.name") - - // DBClientConnectionsStateKey is the attribute Key conforming to the - // "db.client.connections.state" semantic conventions. It represents the - // state of a connection in the pool - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'idle' - DBClientConnectionsStateKey = attribute.Key("db.client.connections.state") - - // DBCollectionNameKey is the attribute Key conforming to the - // "db.collection.name" semantic conventions. It represents the name of a - // collection (table, container) within the database. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'public.users', 'customers' - // Note: If the collection name is parsed from the query, it SHOULD match - // the value provided in the query and may be qualified with the schema and - // database name. - // It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - DBCollectionNameKey = attribute.Key("db.collection.name") - - // DBNamespaceKey is the attribute Key conforming to the "db.namespace" - // semantic conventions. It represents the name of the database, fully - // qualified within the server address and port. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'customers', 'test.users' - // Note: If a database system has multiple namespace components, they - // SHOULD be concatenated (potentially using database system specific - // conventions) from most general to most specific namespace component, and - // more specific namespaces SHOULD NOT be captured without the more general - // namespaces, to ensure that "startswith" queries for the more general - // namespaces will be valid. - // Semantic conventions for individual database systems SHOULD document - // what `db.namespace` means in the context of that system. - // It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - DBNamespaceKey = attribute.Key("db.namespace") - - // DBOperationNameKey is the attribute Key conforming to the - // "db.operation.name" semantic conventions. It represents the name of the - // operation or command being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'findAndModify', 'HMSET', 'SELECT' - // Note: It is RECOMMENDED to capture the value as provided by the - // application without attempting to do any case normalization. - DBOperationNameKey = attribute.Key("db.operation.name") - - // DBQueryTextKey is the attribute Key conforming to the "db.query.text" - // semantic conventions. It represents the database query being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'SELECT * FROM wuser_table where username = ?', 'SET mykey - // "WuValue"' - DBQueryTextKey = attribute.Key("db.query.text") - - // DBSystemKey is the attribute Key conforming to the "db.system" semantic - // conventions. It represents the database management system (DBMS) product - // as identified by the client instrumentation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: The actual DBMS may differ from the one identified by the client. - // For example, when using PostgreSQL client libraries to connect to a - // CockroachDB, the `db.system` is set to `postgresql` based on the - // instrumentation's best knowledge. - DBSystemKey = attribute.Key("db.system") -) - -var ( - // idle - DBClientConnectionsStateIdle = DBClientConnectionsStateKey.String("idle") - // used - DBClientConnectionsStateUsed = DBClientConnectionsStateKey.String("used") -) - -var ( - // Some other SQL database. Fallback only. See notes - DBSystemOtherSQL = DBSystemKey.String("other_sql") - // Microsoft SQL Server - DBSystemMSSQL = DBSystemKey.String("mssql") - // Microsoft SQL Server Compact - DBSystemMssqlcompact = DBSystemKey.String("mssqlcompact") - // MySQL - DBSystemMySQL = DBSystemKey.String("mysql") - // Oracle Database - DBSystemOracle = DBSystemKey.String("oracle") - // IBM DB2 - DBSystemDB2 = DBSystemKey.String("db2") - // PostgreSQL - DBSystemPostgreSQL = DBSystemKey.String("postgresql") - // Amazon Redshift - DBSystemRedshift = DBSystemKey.String("redshift") - // Apache Hive - DBSystemHive = DBSystemKey.String("hive") - // Cloudscape - DBSystemCloudscape = DBSystemKey.String("cloudscape") - // HyperSQL DataBase - DBSystemHSQLDB = DBSystemKey.String("hsqldb") - // Progress Database - DBSystemProgress = DBSystemKey.String("progress") - // SAP MaxDB - DBSystemMaxDB = DBSystemKey.String("maxdb") - // SAP HANA - DBSystemHanaDB = DBSystemKey.String("hanadb") - // Ingres - DBSystemIngres = DBSystemKey.String("ingres") - // FirstSQL - DBSystemFirstSQL = DBSystemKey.String("firstsql") - // EnterpriseDB - DBSystemEDB = DBSystemKey.String("edb") - // InterSystems Caché - DBSystemCache = DBSystemKey.String("cache") - // Adabas (Adaptable Database System) - DBSystemAdabas = DBSystemKey.String("adabas") - // Firebird - DBSystemFirebird = DBSystemKey.String("firebird") - // Apache Derby - DBSystemDerby = DBSystemKey.String("derby") - // FileMaker - DBSystemFilemaker = DBSystemKey.String("filemaker") - // Informix - DBSystemInformix = DBSystemKey.String("informix") - // InstantDB - DBSystemInstantDB = DBSystemKey.String("instantdb") - // InterBase - DBSystemInterbase = DBSystemKey.String("interbase") - // MariaDB - DBSystemMariaDB = DBSystemKey.String("mariadb") - // Netezza - DBSystemNetezza = DBSystemKey.String("netezza") - // Pervasive PSQL - DBSystemPervasive = DBSystemKey.String("pervasive") - // PointBase - DBSystemPointbase = DBSystemKey.String("pointbase") - // SQLite - DBSystemSqlite = DBSystemKey.String("sqlite") - // Sybase - DBSystemSybase = DBSystemKey.String("sybase") - // Teradata - DBSystemTeradata = DBSystemKey.String("teradata") - // Vertica - DBSystemVertica = DBSystemKey.String("vertica") - // H2 - DBSystemH2 = DBSystemKey.String("h2") - // ColdFusion IMQ - DBSystemColdfusion = DBSystemKey.String("coldfusion") - // Apache Cassandra - DBSystemCassandra = DBSystemKey.String("cassandra") - // Apache HBase - DBSystemHBase = DBSystemKey.String("hbase") - // MongoDB - DBSystemMongoDB = DBSystemKey.String("mongodb") - // Redis - DBSystemRedis = DBSystemKey.String("redis") - // Couchbase - DBSystemCouchbase = DBSystemKey.String("couchbase") - // CouchDB - DBSystemCouchDB = DBSystemKey.String("couchdb") - // Microsoft Azure Cosmos DB - DBSystemCosmosDB = DBSystemKey.String("cosmosdb") - // Amazon DynamoDB - DBSystemDynamoDB = DBSystemKey.String("dynamodb") - // Neo4j - DBSystemNeo4j = DBSystemKey.String("neo4j") - // Apache Geode - DBSystemGeode = DBSystemKey.String("geode") - // Elasticsearch - DBSystemElasticsearch = DBSystemKey.String("elasticsearch") - // Memcached - DBSystemMemcached = DBSystemKey.String("memcached") - // CockroachDB - DBSystemCockroachdb = DBSystemKey.String("cockroachdb") - // OpenSearch - DBSystemOpensearch = DBSystemKey.String("opensearch") - // ClickHouse - DBSystemClickhouse = DBSystemKey.String("clickhouse") - // Cloud Spanner - DBSystemSpanner = DBSystemKey.String("spanner") - // Trino - DBSystemTrino = DBSystemKey.String("trino") -) - -// DBClientConnectionsPoolName returns an attribute KeyValue conforming to -// the "db.client.connections.pool.name" semantic conventions. It represents -// the name of the connection pool; unique within the instrumented application. -// In case the connection pool implementation doesn't provide a name, -// instrumentation should use a combination of `server.address` and -// `server.port` attributes formatted as `server.address:server.port`. -func DBClientConnectionsPoolName(val string) attribute.KeyValue { - return DBClientConnectionsPoolNameKey.String(val) -} - -// DBCollectionName returns an attribute KeyValue conforming to the -// "db.collection.name" semantic conventions. It represents the name of a -// collection (table, container) within the database. -func DBCollectionName(val string) attribute.KeyValue { - return DBCollectionNameKey.String(val) -} - -// DBNamespace returns an attribute KeyValue conforming to the -// "db.namespace" semantic conventions. It represents the name of the database, -// fully qualified within the server address and port. -func DBNamespace(val string) attribute.KeyValue { - return DBNamespaceKey.String(val) -} - -// DBOperationName returns an attribute KeyValue conforming to the -// "db.operation.name" semantic conventions. It represents the name of the -// operation or command being executed. -func DBOperationName(val string) attribute.KeyValue { - return DBOperationNameKey.String(val) -} - -// DBQueryText returns an attribute KeyValue conforming to the -// "db.query.text" semantic conventions. It represents the database query being -// executed. -func DBQueryText(val string) attribute.KeyValue { - return DBQueryTextKey.String(val) -} - -// This group defines attributes for Cassandra. -const ( - // DBCassandraConsistencyLevelKey is the attribute Key conforming to the - // "db.cassandra.consistency_level" semantic conventions. It represents the - // consistency level of the query. Based on consistency values from - // [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html). - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - DBCassandraConsistencyLevelKey = attribute.Key("db.cassandra.consistency_level") - - // DBCassandraCoordinatorDCKey is the attribute Key conforming to the - // "db.cassandra.coordinator.dc" semantic conventions. It represents the - // data center of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'us-west-2' - DBCassandraCoordinatorDCKey = attribute.Key("db.cassandra.coordinator.dc") - - // DBCassandraCoordinatorIDKey is the attribute Key conforming to the - // "db.cassandra.coordinator.id" semantic conventions. It represents the ID - // of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'be13faa2-8574-4d71-926d-27f16cf8a7af' - DBCassandraCoordinatorIDKey = attribute.Key("db.cassandra.coordinator.id") - - // DBCassandraIdempotenceKey is the attribute Key conforming to the - // "db.cassandra.idempotence" semantic conventions. It represents the - // whether or not the query is idempotent. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - DBCassandraIdempotenceKey = attribute.Key("db.cassandra.idempotence") - - // DBCassandraPageSizeKey is the attribute Key conforming to the - // "db.cassandra.page_size" semantic conventions. It represents the fetch - // size used for paging, i.e. how many rows will be returned at once. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 5000 - DBCassandraPageSizeKey = attribute.Key("db.cassandra.page_size") - - // DBCassandraSpeculativeExecutionCountKey is the attribute Key conforming - // to the "db.cassandra.speculative_execution_count" semantic conventions. - // It represents the number of times a query was speculatively executed. - // Not set or `0` if the query was not executed speculatively. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 0, 2 - DBCassandraSpeculativeExecutionCountKey = attribute.Key("db.cassandra.speculative_execution_count") -) - -var ( - // all - DBCassandraConsistencyLevelAll = DBCassandraConsistencyLevelKey.String("all") - // each_quorum - DBCassandraConsistencyLevelEachQuorum = DBCassandraConsistencyLevelKey.String("each_quorum") - // quorum - DBCassandraConsistencyLevelQuorum = DBCassandraConsistencyLevelKey.String("quorum") - // local_quorum - DBCassandraConsistencyLevelLocalQuorum = DBCassandraConsistencyLevelKey.String("local_quorum") - // one - DBCassandraConsistencyLevelOne = DBCassandraConsistencyLevelKey.String("one") - // two - DBCassandraConsistencyLevelTwo = DBCassandraConsistencyLevelKey.String("two") - // three - DBCassandraConsistencyLevelThree = DBCassandraConsistencyLevelKey.String("three") - // local_one - DBCassandraConsistencyLevelLocalOne = DBCassandraConsistencyLevelKey.String("local_one") - // any - DBCassandraConsistencyLevelAny = DBCassandraConsistencyLevelKey.String("any") - // serial - DBCassandraConsistencyLevelSerial = DBCassandraConsistencyLevelKey.String("serial") - // local_serial - DBCassandraConsistencyLevelLocalSerial = DBCassandraConsistencyLevelKey.String("local_serial") -) - -// DBCassandraCoordinatorDC returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.dc" semantic conventions. It represents the data -// center of the coordinating node for a query. -func DBCassandraCoordinatorDC(val string) attribute.KeyValue { - return DBCassandraCoordinatorDCKey.String(val) -} - -// DBCassandraCoordinatorID returns an attribute KeyValue conforming to the -// "db.cassandra.coordinator.id" semantic conventions. It represents the ID of -// the coordinating node for a query. -func DBCassandraCoordinatorID(val string) attribute.KeyValue { - return DBCassandraCoordinatorIDKey.String(val) -} - -// DBCassandraIdempotence returns an attribute KeyValue conforming to the -// "db.cassandra.idempotence" semantic conventions. It represents the whether -// or not the query is idempotent. -func DBCassandraIdempotence(val bool) attribute.KeyValue { - return DBCassandraIdempotenceKey.Bool(val) -} - -// DBCassandraPageSize returns an attribute KeyValue conforming to the -// "db.cassandra.page_size" semantic conventions. It represents the fetch size -// used for paging, i.e. how many rows will be returned at once. -func DBCassandraPageSize(val int) attribute.KeyValue { - return DBCassandraPageSizeKey.Int(val) -} - -// DBCassandraSpeculativeExecutionCount returns an attribute KeyValue -// conforming to the "db.cassandra.speculative_execution_count" semantic -// conventions. It represents the number of times a query was speculatively -// executed. Not set or `0` if the query was not executed speculatively. -func DBCassandraSpeculativeExecutionCount(val int) attribute.KeyValue { - return DBCassandraSpeculativeExecutionCountKey.Int(val) -} - -// This group defines attributes for Azure Cosmos DB. -const ( - // DBCosmosDBClientIDKey is the attribute Key conforming to the - // "db.cosmosdb.client_id" semantic conventions. It represents the unique - // Cosmos client instance id. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '3ba4827d-4422-483f-b59f-85b74211c11d' - DBCosmosDBClientIDKey = attribute.Key("db.cosmosdb.client_id") - - // DBCosmosDBConnectionModeKey is the attribute Key conforming to the - // "db.cosmosdb.connection_mode" semantic conventions. It represents the - // cosmos client connection mode. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - DBCosmosDBConnectionModeKey = attribute.Key("db.cosmosdb.connection_mode") - - // DBCosmosDBOperationTypeKey is the attribute Key conforming to the - // "db.cosmosdb.operation_type" semantic conventions. It represents the - // cosmosDB Operation Type. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - DBCosmosDBOperationTypeKey = attribute.Key("db.cosmosdb.operation_type") - - // DBCosmosDBRequestChargeKey is the attribute Key conforming to the - // "db.cosmosdb.request_charge" semantic conventions. It represents the rU - // consumed for that operation - // - // Type: double - // RequirementLevel: Optional - // Stability: experimental - // Examples: 46.18, 1.0 - DBCosmosDBRequestChargeKey = attribute.Key("db.cosmosdb.request_charge") - - // DBCosmosDBRequestContentLengthKey is the attribute Key conforming to the - // "db.cosmosdb.request_content_length" semantic conventions. It represents - // the request payload size in bytes - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - DBCosmosDBRequestContentLengthKey = attribute.Key("db.cosmosdb.request_content_length") - - // DBCosmosDBStatusCodeKey is the attribute Key conforming to the - // "db.cosmosdb.status_code" semantic conventions. It represents the cosmos - // DB status code. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 200, 201 - DBCosmosDBStatusCodeKey = attribute.Key("db.cosmosdb.status_code") - - // DBCosmosDBSubStatusCodeKey is the attribute Key conforming to the - // "db.cosmosdb.sub_status_code" semantic conventions. It represents the - // cosmos DB sub status code. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1000, 1002 - DBCosmosDBSubStatusCodeKey = attribute.Key("db.cosmosdb.sub_status_code") -) - -var ( - // Gateway (HTTP) connections mode - DBCosmosDBConnectionModeGateway = DBCosmosDBConnectionModeKey.String("gateway") - // Direct connection - DBCosmosDBConnectionModeDirect = DBCosmosDBConnectionModeKey.String("direct") -) - -var ( - // invalid - DBCosmosDBOperationTypeInvalid = DBCosmosDBOperationTypeKey.String("Invalid") - // create - DBCosmosDBOperationTypeCreate = DBCosmosDBOperationTypeKey.String("Create") - // patch - DBCosmosDBOperationTypePatch = DBCosmosDBOperationTypeKey.String("Patch") - // read - DBCosmosDBOperationTypeRead = DBCosmosDBOperationTypeKey.String("Read") - // read_feed - DBCosmosDBOperationTypeReadFeed = DBCosmosDBOperationTypeKey.String("ReadFeed") - // delete - DBCosmosDBOperationTypeDelete = DBCosmosDBOperationTypeKey.String("Delete") - // replace - DBCosmosDBOperationTypeReplace = DBCosmosDBOperationTypeKey.String("Replace") - // execute - DBCosmosDBOperationTypeExecute = DBCosmosDBOperationTypeKey.String("Execute") - // query - DBCosmosDBOperationTypeQuery = DBCosmosDBOperationTypeKey.String("Query") - // head - DBCosmosDBOperationTypeHead = DBCosmosDBOperationTypeKey.String("Head") - // head_feed - DBCosmosDBOperationTypeHeadFeed = DBCosmosDBOperationTypeKey.String("HeadFeed") - // upsert - DBCosmosDBOperationTypeUpsert = DBCosmosDBOperationTypeKey.String("Upsert") - // batch - DBCosmosDBOperationTypeBatch = DBCosmosDBOperationTypeKey.String("Batch") - // query_plan - DBCosmosDBOperationTypeQueryPlan = DBCosmosDBOperationTypeKey.String("QueryPlan") - // execute_javascript - DBCosmosDBOperationTypeExecuteJavascript = DBCosmosDBOperationTypeKey.String("ExecuteJavaScript") -) - -// DBCosmosDBClientID returns an attribute KeyValue conforming to the -// "db.cosmosdb.client_id" semantic conventions. It represents the unique -// Cosmos client instance id. -func DBCosmosDBClientID(val string) attribute.KeyValue { - return DBCosmosDBClientIDKey.String(val) -} - -// DBCosmosDBRequestCharge returns an attribute KeyValue conforming to the -// "db.cosmosdb.request_charge" semantic conventions. It represents the rU -// consumed for that operation -func DBCosmosDBRequestCharge(val float64) attribute.KeyValue { - return DBCosmosDBRequestChargeKey.Float64(val) -} - -// DBCosmosDBRequestContentLength returns an attribute KeyValue conforming -// to the "db.cosmosdb.request_content_length" semantic conventions. It -// represents the request payload size in bytes -func DBCosmosDBRequestContentLength(val int) attribute.KeyValue { - return DBCosmosDBRequestContentLengthKey.Int(val) -} - -// DBCosmosDBStatusCode returns an attribute KeyValue conforming to the -// "db.cosmosdb.status_code" semantic conventions. It represents the cosmos DB -// status code. -func DBCosmosDBStatusCode(val int) attribute.KeyValue { - return DBCosmosDBStatusCodeKey.Int(val) -} - -// DBCosmosDBSubStatusCode returns an attribute KeyValue conforming to the -// "db.cosmosdb.sub_status_code" semantic conventions. It represents the cosmos -// DB sub status code. -func DBCosmosDBSubStatusCode(val int) attribute.KeyValue { - return DBCosmosDBSubStatusCodeKey.Int(val) -} - -// This group defines attributes for Elasticsearch. -const ( - // DBElasticsearchClusterNameKey is the attribute Key conforming to the - // "db.elasticsearch.cluster.name" semantic conventions. It represents the - // represents the identifier of an Elasticsearch cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'e9106fc68e3044f0b1475b04bf4ffd5f' - DBElasticsearchClusterNameKey = attribute.Key("db.elasticsearch.cluster.name") - - // DBElasticsearchNodeNameKey is the attribute Key conforming to the - // "db.elasticsearch.node.name" semantic conventions. It represents the - // represents the human-readable identifier of the node/instance to which a - // request was routed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'instance-0000000001' - DBElasticsearchNodeNameKey = attribute.Key("db.elasticsearch.node.name") -) - -// DBElasticsearchClusterName returns an attribute KeyValue conforming to -// the "db.elasticsearch.cluster.name" semantic conventions. It represents the -// represents the identifier of an Elasticsearch cluster. -func DBElasticsearchClusterName(val string) attribute.KeyValue { - return DBElasticsearchClusterNameKey.String(val) -} - -// DBElasticsearchNodeName returns an attribute KeyValue conforming to the -// "db.elasticsearch.node.name" semantic conventions. It represents the -// represents the human-readable identifier of the node/instance to which a -// request was routed. -func DBElasticsearchNodeName(val string) attribute.KeyValue { - return DBElasticsearchNodeNameKey.String(val) -} - -// Attributes for software deployments. -const ( - // DeploymentEnvironmentKey is the attribute Key conforming to the - // "deployment.environment" semantic conventions. It represents the name of - // the [deployment - // environment](https://wikipedia.org/wiki/Deployment_environment) (aka - // deployment tier). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'staging', 'production' - // Note: `deployment.environment` does not affect the uniqueness - // constraints defined through - // the `service.namespace`, `service.name` and `service.instance.id` - // resource attributes. - // This implies that resources carrying the following attribute - // combinations MUST be - // considered to be identifying the same service: - // - // * `service.name=frontend`, `deployment.environment=production` - // * `service.name=frontend`, `deployment.environment=staging`. - DeploymentEnvironmentKey = attribute.Key("deployment.environment") -) - -// DeploymentEnvironment returns an attribute KeyValue conforming to the -// "deployment.environment" semantic conventions. It represents the name of the -// [deployment environment](https://wikipedia.org/wiki/Deployment_environment) -// (aka deployment tier). -func DeploymentEnvironment(val string) attribute.KeyValue { - return DeploymentEnvironmentKey.String(val) -} - -// Attributes that represents an occurrence of a lifecycle transition on the -// Android platform. -const ( - // AndroidStateKey is the attribute Key conforming to the "android.state" - // semantic conventions. It represents the deprecated use the - // `device.app.lifecycle` event definition including `android.state` as a - // payload field instead. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: The Android lifecycle states are defined in [Activity lifecycle - // callbacks](https://developer.android.com/guide/components/activities/activity-lifecycle#lc), - // and from which the `OS identifiers` are derived. - AndroidStateKey = attribute.Key("android.state") -) - -var ( - // Any time before Activity.onResume() or, if the app has no Activity, Context.startService() has been called in the app for the first time - AndroidStateCreated = AndroidStateKey.String("created") - // Any time after Activity.onPause() or, if the app has no Activity, Context.stopService() has been called when the app was in the foreground state - AndroidStateBackground = AndroidStateKey.String("background") - // Any time after Activity.onResume() or, if the app has no Activity, Context.startService() has been called when the app was in either the created or background states - AndroidStateForeground = AndroidStateKey.String("foreground") -) - -// These attributes may be used to describe the receiver of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // DestinationAddressKey is the attribute Key conforming to the - // "destination.address" semantic conventions. It represents the - // destination address - domain name if available without reverse DNS - // lookup; otherwise, IP address or Unix domain socket name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'destination.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the source side, and when communicating through - // an intermediary, `destination.address` SHOULD represent the destination - // address behind any intermediaries, for example proxies, if it's - // available. - DestinationAddressKey = attribute.Key("destination.address") - - // DestinationPortKey is the attribute Key conforming to the - // "destination.port" semantic conventions. It represents the destination - // port number - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3389, 2888 - DestinationPortKey = attribute.Key("destination.port") -) - -// DestinationAddress returns an attribute KeyValue conforming to the -// "destination.address" semantic conventions. It represents the destination -// address - domain name if available without reverse DNS lookup; otherwise, IP -// address or Unix domain socket name. -func DestinationAddress(val string) attribute.KeyValue { - return DestinationAddressKey.String(val) -} - -// DestinationPort returns an attribute KeyValue conforming to the -// "destination.port" semantic conventions. It represents the destination port -// number -func DestinationPort(val int) attribute.KeyValue { - return DestinationPortKey.Int(val) -} - -// Describes device attributes. -const ( - // DeviceIDKey is the attribute Key conforming to the "device.id" semantic - // conventions. It represents a unique identifier representing the device - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2ab2916d-a51f-4ac8-80ee-45ac31a28092' - // Note: The device identifier MUST only be defined using the values - // outlined below. This value is not an advertising identifier and MUST NOT - // be used as such. On iOS (Swift or Objective-C), this value MUST be equal - // to the [vendor - // identifier](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor). - // On Android (Java or Kotlin), this value MUST be equal to the Firebase - // Installation ID or a globally unique UUID which is persisted across - // sessions in your application. More information can be found - // [here](https://developer.android.com/training/articles/user-data-ids) on - // best practices and exact implementation details. Caution should be taken - // when storing personal data or anything which can identify a user. GDPR - // and data protection laws may apply, ensure you do your own due - // diligence. - DeviceIDKey = attribute.Key("device.id") - - // DeviceManufacturerKey is the attribute Key conforming to the - // "device.manufacturer" semantic conventions. It represents the name of - // the device manufacturer - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Apple', 'Samsung' - // Note: The Android OS provides this field via - // [Build](https://developer.android.com/reference/android/os/Build#MANUFACTURER). - // iOS apps SHOULD hardcode the value `Apple`. - DeviceManufacturerKey = attribute.Key("device.manufacturer") - - // DeviceModelIdentifierKey is the attribute Key conforming to the - // "device.model.identifier" semantic conventions. It represents the model - // identifier for the device - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'iPhone3,4', 'SM-G920F' - // Note: It's recommended this value represents a machine-readable version - // of the model identifier rather than the market or consumer-friendly name - // of the device. - DeviceModelIdentifierKey = attribute.Key("device.model.identifier") - - // DeviceModelNameKey is the attribute Key conforming to the - // "device.model.name" semantic conventions. It represents the marketing - // name for the device model - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'iPhone 6s Plus', 'Samsung Galaxy S6' - // Note: It's recommended this value represents a human-readable version of - // the device model rather than a machine-readable alternative. - DeviceModelNameKey = attribute.Key("device.model.name") -) - -// DeviceID returns an attribute KeyValue conforming to the "device.id" -// semantic conventions. It represents a unique identifier representing the -// device -func DeviceID(val string) attribute.KeyValue { - return DeviceIDKey.String(val) -} - -// DeviceManufacturer returns an attribute KeyValue conforming to the -// "device.manufacturer" semantic conventions. It represents the name of the -// device manufacturer -func DeviceManufacturer(val string) attribute.KeyValue { - return DeviceManufacturerKey.String(val) -} - -// DeviceModelIdentifier returns an attribute KeyValue conforming to the -// "device.model.identifier" semantic conventions. It represents the model -// identifier for the device -func DeviceModelIdentifier(val string) attribute.KeyValue { - return DeviceModelIdentifierKey.String(val) -} - -// DeviceModelName returns an attribute KeyValue conforming to the -// "device.model.name" semantic conventions. It represents the marketing name -// for the device model -func DeviceModelName(val string) attribute.KeyValue { - return DeviceModelNameKey.String(val) -} - -// These attributes may be used for any disk related operation. -const ( - // DiskIoDirectionKey is the attribute Key conforming to the - // "disk.io.direction" semantic conventions. It represents the disk IO - // operation direction. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'read' - DiskIoDirectionKey = attribute.Key("disk.io.direction") -) - -var ( - // read - DiskIoDirectionRead = DiskIoDirectionKey.String("read") - // write - DiskIoDirectionWrite = DiskIoDirectionKey.String("write") -) - -// The shared attributes used to report a DNS query. -const ( - // DNSQuestionNameKey is the attribute Key conforming to the - // "dns.question.name" semantic conventions. It represents the name being - // queried. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'www.example.com', 'opentelemetry.io' - // Note: If the name field contains non-printable characters (below 32 or - // above 126), those characters should be represented as escaped base 10 - // integers (\DDD). Back slashes and quotes should be escaped. Tabs, - // carriage returns, and line feeds should be converted to \t, \r, and \n - // respectively. - DNSQuestionNameKey = attribute.Key("dns.question.name") -) - -// DNSQuestionName returns an attribute KeyValue conforming to the -// "dns.question.name" semantic conventions. It represents the name being -// queried. -func DNSQuestionName(val string) attribute.KeyValue { - return DNSQuestionNameKey.String(val) -} - -// Attributes for operations with an authenticated and/or authorized enduser. -const ( - // EnduserIDKey is the attribute Key conforming to the "enduser.id" - // semantic conventions. It represents the username or client_id extracted - // from the access token or - // [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header - // in the inbound request from outside the system. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'username' - EnduserIDKey = attribute.Key("enduser.id") - - // EnduserRoleKey is the attribute Key conforming to the "enduser.role" - // semantic conventions. It represents the actual/assumed role the client - // is making the request under extracted from token or application security - // context. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'admin' - EnduserRoleKey = attribute.Key("enduser.role") - - // EnduserScopeKey is the attribute Key conforming to the "enduser.scope" - // semantic conventions. It represents the scopes or granted authorities - // the client currently possesses extracted from token or application - // security context. The value would come from the scope associated with an - // [OAuth 2.0 Access - // Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute - // value in a [SAML 2.0 - // Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'read:message, write:files' - EnduserScopeKey = attribute.Key("enduser.scope") -) - -// EnduserID returns an attribute KeyValue conforming to the "enduser.id" -// semantic conventions. It represents the username or client_id extracted from -// the access token or -// [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in -// the inbound request from outside the system. -func EnduserID(val string) attribute.KeyValue { - return EnduserIDKey.String(val) -} - -// EnduserRole returns an attribute KeyValue conforming to the -// "enduser.role" semantic conventions. It represents the actual/assumed role -// the client is making the request under extracted from token or application -// security context. -func EnduserRole(val string) attribute.KeyValue { - return EnduserRoleKey.String(val) -} - -// EnduserScope returns an attribute KeyValue conforming to the -// "enduser.scope" semantic conventions. It represents the scopes or granted -// authorities the client currently possesses extracted from token or -// application security context. The value would come from the scope associated -// with an [OAuth 2.0 Access -// Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute -// value in a [SAML 2.0 -// Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html). -func EnduserScope(val string) attribute.KeyValue { - return EnduserScopeKey.String(val) -} - -// The shared attributes used to report an error. -const ( - // ErrorTypeKey is the attribute Key conforming to the "error.type" - // semantic conventions. It represents the describes a class of error the - // operation ended with. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'timeout', 'java.net.UnknownHostException', - // 'server_certificate_invalid', '500' - // Note: The `error.type` SHOULD be predictable, and SHOULD have low - // cardinality. - // - // When `error.type` is set to a type (e.g., an exception type), its - // canonical class name identifying the type within the artifact SHOULD be - // used. - // - // Instrumentations SHOULD document the list of errors they report. - // - // The cardinality of `error.type` within one instrumentation library - // SHOULD be low. - // Telemetry consumers that aggregate data from multiple instrumentation - // libraries and applications - // should be prepared for `error.type` to have high cardinality at query - // time when no - // additional filters are applied. - // - // If the operation has completed successfully, instrumentations SHOULD NOT - // set `error.type`. - // - // If a specific domain defines its own set of error identifiers (such as - // HTTP or gRPC status codes), - // it's RECOMMENDED to: - // - // * Use a domain-specific attribute - // * Set `error.type` to capture all errors, regardless of whether they are - // defined within the domain-specific set or not. - ErrorTypeKey = attribute.Key("error.type") -) - -var ( - // A fallback error value to be used when the instrumentation doesn't define a custom value - ErrorTypeOther = ErrorTypeKey.String("_OTHER") -) - -// Attributes for Events represented using Log Records. -const ( - // EventNameKey is the attribute Key conforming to the "event.name" - // semantic conventions. It represents the identifies the class / type of - // event. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'browser.mouse.click', 'device.app.lifecycle' - // Note: Event names are subject to the same rules as [attribute - // names](https://github.com/open-telemetry/opentelemetry-specification/tree/v1.33.0/specification/common/attribute-naming.md). - // Notably, event names are namespaced to avoid collisions and provide a - // clean separation of semantics for events in separate domains like - // browser, mobile, and kubernetes. - EventNameKey = attribute.Key("event.name") -) - -// EventName returns an attribute KeyValue conforming to the "event.name" -// semantic conventions. It represents the identifies the class / type of -// event. -func EventName(val string) attribute.KeyValue { - return EventNameKey.String(val) -} - -// The shared attributes used to report a single exception associated with a -// span or log. -const ( - // ExceptionEscapedKey is the attribute Key conforming to the - // "exception.escaped" semantic conventions. It represents the sHOULD be - // set to true if the exception event is recorded at a point where it is - // known that the exception is escaping the scope of the span. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - // Note: An exception is considered to have escaped (or left) the scope of - // a span, - // if that span is ended while the exception is still logically "in - // flight". - // This may be actually "in flight" in some languages (e.g. if the - // exception - // is passed to a Context manager's `__exit__` method in Python) but will - // usually be caught at the point of recording the exception in most - // languages. - // - // It is usually not possible to determine at the point where an exception - // is thrown - // whether it will escape the scope of a span. - // However, it is trivial to know that an exception - // will escape, if one checks for an active exception just before ending - // the span, - // as done in the [example for recording span - // exceptions](https://opentelemetry.io/docs/specs/semconv/exceptions/exceptions-spans/#recording-an-exception). - // - // It follows that an exception may still escape the scope of the span - // even if the `exception.escaped` attribute was not set or set to false, - // since the event might have been recorded at a time where it was not - // clear whether the exception will escape. - ExceptionEscapedKey = attribute.Key("exception.escaped") - - // ExceptionMessageKey is the attribute Key conforming to the - // "exception.message" semantic conventions. It represents the exception - // message. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Division by zero', "Can't convert 'int' object to str - // implicitly" - ExceptionMessageKey = attribute.Key("exception.message") - - // ExceptionStacktraceKey is the attribute Key conforming to the - // "exception.stacktrace" semantic conventions. It represents a stacktrace - // as a string in the natural representation for the language runtime. The - // representation is to be determined and documented by each language SIG. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'Exception in thread "main" java.lang.RuntimeException: Test - // exception\\n at ' - // 'com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\n at ' - // 'com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\n at ' - // 'com.example.GenerateTrace.main(GenerateTrace.java:5)' - ExceptionStacktraceKey = attribute.Key("exception.stacktrace") - - // ExceptionTypeKey is the attribute Key conforming to the "exception.type" - // semantic conventions. It represents the type of the exception (its - // fully-qualified class name, if applicable). The dynamic type of the - // exception should be preferred over the static type in languages that - // support it. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'java.net.ConnectException', 'OSError' - ExceptionTypeKey = attribute.Key("exception.type") -) - -// ExceptionEscaped returns an attribute KeyValue conforming to the -// "exception.escaped" semantic conventions. It represents the sHOULD be set to -// true if the exception event is recorded at a point where it is known that -// the exception is escaping the scope of the span. -func ExceptionEscaped(val bool) attribute.KeyValue { - return ExceptionEscapedKey.Bool(val) -} - -// ExceptionMessage returns an attribute KeyValue conforming to the -// "exception.message" semantic conventions. It represents the exception -// message. -func ExceptionMessage(val string) attribute.KeyValue { - return ExceptionMessageKey.String(val) -} - -// ExceptionStacktrace returns an attribute KeyValue conforming to the -// "exception.stacktrace" semantic conventions. It represents a stacktrace as a -// string in the natural representation for the language runtime. The -// representation is to be determined and documented by each language SIG. -func ExceptionStacktrace(val string) attribute.KeyValue { - return ExceptionStacktraceKey.String(val) -} - -// ExceptionType returns an attribute KeyValue conforming to the -// "exception.type" semantic conventions. It represents the type of the -// exception (its fully-qualified class name, if applicable). The dynamic type -// of the exception should be preferred over the static type in languages that -// support it. -func ExceptionType(val string) attribute.KeyValue { - return ExceptionTypeKey.String(val) -} - -// FaaS attributes -const ( - // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" - // semantic conventions. It represents a boolean that is true if the - // serverless function is executed for the first time (aka cold-start). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - FaaSColdstartKey = attribute.Key("faas.coldstart") - - // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic - // conventions. It represents a string containing the schedule period as - // [Cron - // Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '0/5 * * * ? *' - FaaSCronKey = attribute.Key("faas.cron") - - // FaaSDocumentCollectionKey is the attribute Key conforming to the - // "faas.document.collection" semantic conventions. It represents the name - // of the source on which the triggering operation was performed. For - // example, in Cloud Storage or S3 corresponds to the bucket name, and in - // Cosmos DB to the database name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myBucketName', 'myDBName' - FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") - - // FaaSDocumentNameKey is the attribute Key conforming to the - // "faas.document.name" semantic conventions. It represents the document - // name/table subjected to the operation. For example, in Cloud Storage or - // S3 is the name of the file, and in Cosmos DB the table name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myFile.txt', 'myTableName' - FaaSDocumentNameKey = attribute.Key("faas.document.name") - - // FaaSDocumentOperationKey is the attribute Key conforming to the - // "faas.document.operation" semantic conventions. It represents the - // describes the type of the operation that was performed on the data. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - FaaSDocumentOperationKey = attribute.Key("faas.document.operation") - - // FaaSDocumentTimeKey is the attribute Key conforming to the - // "faas.document.time" semantic conventions. It represents a string - // containing the time when the data was accessed in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - FaaSDocumentTimeKey = attribute.Key("faas.document.time") - - // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" - // semantic conventions. It represents the execution environment ID as a - // string, that will be potentially reused for other invocations to the - // same function/function version. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de' - // Note: * **AWS Lambda:** Use the (full) log stream name. - FaaSInstanceKey = attribute.Key("faas.instance") - - // FaaSInvocationIDKey is the attribute Key conforming to the - // "faas.invocation_id" semantic conventions. It represents the invocation - // ID of the current function invocation. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'af9d5aa4-a685-4c5f-a22b-444f80b3cc28' - FaaSInvocationIDKey = attribute.Key("faas.invocation_id") - - // FaaSInvokedNameKey is the attribute Key conforming to the - // "faas.invoked_name" semantic conventions. It represents the name of the - // invoked function. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'my-function' - // Note: SHOULD be equal to the `faas.name` resource attribute of the - // invoked function. - FaaSInvokedNameKey = attribute.Key("faas.invoked_name") - - // FaaSInvokedProviderKey is the attribute Key conforming to the - // "faas.invoked_provider" semantic conventions. It represents the cloud - // provider of the invoked function. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: SHOULD be equal to the `cloud.provider` resource attribute of the - // invoked function. - FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") - - // FaaSInvokedRegionKey is the attribute Key conforming to the - // "faas.invoked_region" semantic conventions. It represents the cloud - // region of the invoked function. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'eu-central-1' - // Note: SHOULD be equal to the `cloud.region` resource attribute of the - // invoked function. - FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") - - // FaaSMaxMemoryKey is the attribute Key conforming to the - // "faas.max_memory" semantic conventions. It represents the amount of - // memory available to the serverless function converted to Bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 134217728 - // Note: It's recommended to set this attribute since e.g. too little - // memory can easily stop a Java AWS Lambda function from working - // correctly. On AWS Lambda, the environment variable - // `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must - // be multiplied by 1,048,576). - FaaSMaxMemoryKey = attribute.Key("faas.max_memory") - - // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic - // conventions. It represents the name of the single function that this - // runtime instance executes. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'my-function', 'myazurefunctionapp/some-function-name' - // Note: This is the name of the function as configured/deployed on the - // FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // [`code.namespace`/`code.function`](/docs/general/attributes.md#source-code-attributes) - // span attributes). - // - // For some cloud providers, the above definition is ambiguous. The - // following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud - // providers/products: - // - // * **Azure:** The full name `/`, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the `cloud.resource_id` attribute). - FaaSNameKey = attribute.Key("faas.name") - - // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic - // conventions. It represents a string containing the function invocation - // time in the [ISO - // 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format - // expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2020-01-23T13:47:06Z' - FaaSTimeKey = attribute.Key("faas.time") - - // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" - // semantic conventions. It represents the type of the trigger which caused - // this function invocation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - FaaSTriggerKey = attribute.Key("faas.trigger") - - // FaaSVersionKey is the attribute Key conforming to the "faas.version" - // semantic conventions. It represents the immutable version of the - // function being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '26', 'pinkfroid-00002' - // Note: Depending on the cloud provider and platform, use: - // - // * **AWS Lambda:** The [function - // version](https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html) - // (an integer represented as a decimal string). - // * **Google Cloud Run (Services):** The - // [revision](https://cloud.google.com/run/docs/managing/revisions) - // (i.e., the function name plus the revision suffix). - // * **Google Cloud Functions:** The value of the - // [`K_REVISION` environment - // variable](https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically). - // * **Azure Functions:** Not applicable. Do not set this attribute. - FaaSVersionKey = attribute.Key("faas.version") -) - -var ( - // When a new object is created - FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") - // When an object is modified - FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") - // When an object is deleted - FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") -) - -var ( - // Alibaba Cloud - FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") - // Amazon Web Services - FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") - // Microsoft Azure - FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") - // Google Cloud Platform - FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") - // Tencent Cloud - FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") -) - -var ( - // A response to some data source operation such as a database or filesystem read/write - FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") - // To provide an answer to an inbound HTTP request - FaaSTriggerHTTP = FaaSTriggerKey.String("http") - // A function is set to be executed when messages are sent to a messaging system - FaaSTriggerPubsub = FaaSTriggerKey.String("pubsub") - // A function is scheduled to be executed regularly - FaaSTriggerTimer = FaaSTriggerKey.String("timer") - // If none of the others apply - FaaSTriggerOther = FaaSTriggerKey.String("other") -) - -// FaaSColdstart returns an attribute KeyValue conforming to the -// "faas.coldstart" semantic conventions. It represents a boolean that is true -// if the serverless function is executed for the first time (aka cold-start). -func FaaSColdstart(val bool) attribute.KeyValue { - return FaaSColdstartKey.Bool(val) -} - -// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" -// semantic conventions. It represents a string containing the schedule period -// as [Cron -// Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm). -func FaaSCron(val string) attribute.KeyValue { - return FaaSCronKey.String(val) -} - -// FaaSDocumentCollection returns an attribute KeyValue conforming to the -// "faas.document.collection" semantic conventions. It represents the name of -// the source on which the triggering operation was performed. For example, in -// Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the -// database name. -func FaaSDocumentCollection(val string) attribute.KeyValue { - return FaaSDocumentCollectionKey.String(val) -} - -// FaaSDocumentName returns an attribute KeyValue conforming to the -// "faas.document.name" semantic conventions. It represents the document -// name/table subjected to the operation. For example, in Cloud Storage or S3 -// is the name of the file, and in Cosmos DB the table name. -func FaaSDocumentName(val string) attribute.KeyValue { - return FaaSDocumentNameKey.String(val) -} - -// FaaSDocumentTime returns an attribute KeyValue conforming to the -// "faas.document.time" semantic conventions. It represents a string containing -// the time when the data was accessed in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSDocumentTime(val string) attribute.KeyValue { - return FaaSDocumentTimeKey.String(val) -} - -// FaaSInstance returns an attribute KeyValue conforming to the -// "faas.instance" semantic conventions. It represents the execution -// environment ID as a string, that will be potentially reused for other -// invocations to the same function/function version. -func FaaSInstance(val string) attribute.KeyValue { - return FaaSInstanceKey.String(val) -} - -// FaaSInvocationID returns an attribute KeyValue conforming to the -// "faas.invocation_id" semantic conventions. It represents the invocation ID -// of the current function invocation. -func FaaSInvocationID(val string) attribute.KeyValue { - return FaaSInvocationIDKey.String(val) -} - -// FaaSInvokedName returns an attribute KeyValue conforming to the -// "faas.invoked_name" semantic conventions. It represents the name of the -// invoked function. -func FaaSInvokedName(val string) attribute.KeyValue { - return FaaSInvokedNameKey.String(val) -} - -// FaaSInvokedRegion returns an attribute KeyValue conforming to the -// "faas.invoked_region" semantic conventions. It represents the cloud region -// of the invoked function. -func FaaSInvokedRegion(val string) attribute.KeyValue { - return FaaSInvokedRegionKey.String(val) -} - -// FaaSMaxMemory returns an attribute KeyValue conforming to the -// "faas.max_memory" semantic conventions. It represents the amount of memory -// available to the serverless function converted to Bytes. -func FaaSMaxMemory(val int) attribute.KeyValue { - return FaaSMaxMemoryKey.Int(val) -} - -// FaaSName returns an attribute KeyValue conforming to the "faas.name" -// semantic conventions. It represents the name of the single function that -// this runtime instance executes. -func FaaSName(val string) attribute.KeyValue { - return FaaSNameKey.String(val) -} - -// FaaSTime returns an attribute KeyValue conforming to the "faas.time" -// semantic conventions. It represents a string containing the function -// invocation time in the [ISO -// 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format -// expressed in [UTC](https://www.w3.org/TR/NOTE-datetime). -func FaaSTime(val string) attribute.KeyValue { - return FaaSTimeKey.String(val) -} - -// FaaSVersion returns an attribute KeyValue conforming to the -// "faas.version" semantic conventions. It represents the immutable version of -// the function being executed. -func FaaSVersion(val string) attribute.KeyValue { - return FaaSVersionKey.String(val) -} - -// Attributes for Feature Flags. -const ( - // FeatureFlagKeyKey is the attribute Key conforming to the - // "feature_flag.key" semantic conventions. It represents the unique - // identifier of the feature flag. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'logo-color' - FeatureFlagKeyKey = attribute.Key("feature_flag.key") - - // FeatureFlagProviderNameKey is the attribute Key conforming to the - // "feature_flag.provider_name" semantic conventions. It represents the - // name of the service provider that performs the flag evaluation. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Flag Manager' - FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider_name") - - // FeatureFlagVariantKey is the attribute Key conforming to the - // "feature_flag.variant" semantic conventions. It represents the sHOULD be - // a semantic identifier for a value. If one is unavailable, a stringified - // version of the value can be used. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'red', 'true', 'on' - // Note: A semantic identifier, commonly referred to as a variant, provides - // a means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant `red` maybe be used for the value `#c05543`. - // - // A stringified version of the value can be used in situations where a - // semantic identifier is unavailable. String representation of the value - // should be determined by the implementer. - FeatureFlagVariantKey = attribute.Key("feature_flag.variant") -) - -// FeatureFlagKey returns an attribute KeyValue conforming to the -// "feature_flag.key" semantic conventions. It represents the unique identifier -// of the feature flag. -func FeatureFlagKey(val string) attribute.KeyValue { - return FeatureFlagKeyKey.String(val) -} - -// FeatureFlagProviderName returns an attribute KeyValue conforming to the -// "feature_flag.provider_name" semantic conventions. It represents the name of -// the service provider that performs the flag evaluation. -func FeatureFlagProviderName(val string) attribute.KeyValue { - return FeatureFlagProviderNameKey.String(val) -} - -// FeatureFlagVariant returns an attribute KeyValue conforming to the -// "feature_flag.variant" semantic conventions. It represents the sHOULD be a -// semantic identifier for a value. If one is unavailable, a stringified -// version of the value can be used. -func FeatureFlagVariant(val string) attribute.KeyValue { - return FeatureFlagVariantKey.String(val) -} - -// Describes file attributes. -const ( - // FileDirectoryKey is the attribute Key conforming to the "file.directory" - // semantic conventions. It represents the directory where the file is - // located. It should include the drive letter, when appropriate. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/home/user', 'C:\\Program Files\\MyApp' - FileDirectoryKey = attribute.Key("file.directory") - - // FileExtensionKey is the attribute Key conforming to the "file.extension" - // semantic conventions. It represents the file extension, excluding the - // leading dot. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: When the file name has multiple extensions (example.tar.gz), only - // the last one should be captured ("gz", not "tar.gz"). - FileExtensionKey = attribute.Key("file.extension") - - // FileNameKey is the attribute Key conforming to the "file.name" semantic - // conventions. It represents the name of the file including the extension, - // without the directory. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'example.png' - FileNameKey = attribute.Key("file.name") - - // FilePathKey is the attribute Key conforming to the "file.path" semantic - // conventions. It represents the full path to the file, including the file - // name. It should include the drive letter, when appropriate. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/home/alice/example.png', 'C:\\Program - // Files\\MyApp\\myapp.exe' - FilePathKey = attribute.Key("file.path") - - // FileSizeKey is the attribute Key conforming to the "file.size" semantic - // conventions. It represents the file size in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - FileSizeKey = attribute.Key("file.size") -) - -// FileDirectory returns an attribute KeyValue conforming to the -// "file.directory" semantic conventions. It represents the directory where the -// file is located. It should include the drive letter, when appropriate. -func FileDirectory(val string) attribute.KeyValue { - return FileDirectoryKey.String(val) -} - -// FileExtension returns an attribute KeyValue conforming to the -// "file.extension" semantic conventions. It represents the file extension, -// excluding the leading dot. -func FileExtension(val string) attribute.KeyValue { - return FileExtensionKey.String(val) -} - -// FileName returns an attribute KeyValue conforming to the "file.name" -// semantic conventions. It represents the name of the file including the -// extension, without the directory. -func FileName(val string) attribute.KeyValue { - return FileNameKey.String(val) -} - -// FilePath returns an attribute KeyValue conforming to the "file.path" -// semantic conventions. It represents the full path to the file, including the -// file name. It should include the drive letter, when appropriate. -func FilePath(val string) attribute.KeyValue { - return FilePathKey.String(val) -} - -// FileSize returns an attribute KeyValue conforming to the "file.size" -// semantic conventions. It represents the file size in bytes. -func FileSize(val int) attribute.KeyValue { - return FileSizeKey.Int(val) -} - -// Attributes for Google Cloud Run. -const ( - // GCPCloudRunJobExecutionKey is the attribute Key conforming to the - // "gcp.cloud_run.job.execution" semantic conventions. It represents the - // name of the Cloud Run - // [execution](https://cloud.google.com/run/docs/managing/job-executions) - // being run for the Job, as set by the - // [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) - // environment variable. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'job-name-xxxx', 'sample-job-mdw84' - GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") - - // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the - // "gcp.cloud_run.job.task_index" semantic conventions. It represents the - // index for a task within an execution as provided by the - // [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) - // environment variable. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 0, 1 - GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") -) - -// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the -// "gcp.cloud_run.job.execution" semantic conventions. It represents the name -// of the Cloud Run -// [execution](https://cloud.google.com/run/docs/managing/job-executions) being -// run for the Job, as set by the -// [`CLOUD_RUN_EXECUTION`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) -// environment variable. -func GCPCloudRunJobExecution(val string) attribute.KeyValue { - return GCPCloudRunJobExecutionKey.String(val) -} - -// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the -// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index -// for a task within an execution as provided by the -// [`CLOUD_RUN_TASK_INDEX`](https://cloud.google.com/run/docs/container-contract#jobs-env-vars) -// environment variable. -func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { - return GCPCloudRunJobTaskIndexKey.Int(val) -} - -// Attributes for Google Compute Engine (GCE). -const ( - // GCPGceInstanceHostnameKey is the attribute Key conforming to the - // "gcp.gce.instance.hostname" semantic conventions. It represents the - // hostname of a GCE instance. This is the full value of the default or - // [custom - // hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'my-host1234.example.com', - // 'sample-vm.us-west1-b.c.my-project.internal' - GCPGceInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") - - // GCPGceInstanceNameKey is the attribute Key conforming to the - // "gcp.gce.instance.name" semantic conventions. It represents the instance - // name of a GCE instance. This is the value provided by `host.name`, the - // visible name of the instance in the Cloud Console UI, and the prefix for - // the default hostname of the instance as defined by the [default internal - // DNS - // name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'instance-1', 'my-vm-name' - GCPGceInstanceNameKey = attribute.Key("gcp.gce.instance.name") -) - -// GCPGceInstanceHostname returns an attribute KeyValue conforming to the -// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname -// of a GCE instance. This is the full value of the default or [custom -// hostname](https://cloud.google.com/compute/docs/instances/custom-hostname-vm). -func GCPGceInstanceHostname(val string) attribute.KeyValue { - return GCPGceInstanceHostnameKey.String(val) -} - -// GCPGceInstanceName returns an attribute KeyValue conforming to the -// "gcp.gce.instance.name" semantic conventions. It represents the instance -// name of a GCE instance. This is the value provided by `host.name`, the -// visible name of the instance in the Cloud Console UI, and the prefix for the -// default hostname of the instance as defined by the [default internal DNS -// name](https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names). -func GCPGceInstanceName(val string) attribute.KeyValue { - return GCPGceInstanceNameKey.String(val) -} - -// The attributes used to describe telemetry in the context of LLM (Large -// Language Models) requests and responses. -const ( - // GenAiCompletionKey is the attribute Key conforming to the - // "gen_ai.completion" semantic conventions. It represents the full - // response received from the LLM. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: "[{'role': 'assistant', 'content': 'The capital of France is - // Paris.'}]" - // Note: It's RECOMMENDED to format completions as JSON string matching - // [OpenAI messages - // format](https://platform.openai.com/docs/guides/text-generation) - GenAiCompletionKey = attribute.Key("gen_ai.completion") - - // GenAiPromptKey is the attribute Key conforming to the "gen_ai.prompt" - // semantic conventions. It represents the full prompt sent to an LLM. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: "[{'role': 'user', 'content': 'What is the capital of - // France?'}]" - // Note: It's RECOMMENDED to format prompts as JSON string matching [OpenAI - // messages - // format](https://platform.openai.com/docs/guides/text-generation) - GenAiPromptKey = attribute.Key("gen_ai.prompt") - - // GenAiRequestMaxTokensKey is the attribute Key conforming to the - // "gen_ai.request.max_tokens" semantic conventions. It represents the - // maximum number of tokens the LLM generates for a request. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 100 - GenAiRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens") - - // GenAiRequestModelKey is the attribute Key conforming to the - // "gen_ai.request.model" semantic conventions. It represents the name of - // the LLM a request is being made to. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'gpt-4' - GenAiRequestModelKey = attribute.Key("gen_ai.request.model") - - // GenAiRequestTemperatureKey is the attribute Key conforming to the - // "gen_ai.request.temperature" semantic conventions. It represents the - // temperature setting for the LLM request. - // - // Type: double - // RequirementLevel: Optional - // Stability: experimental - // Examples: 0.0 - GenAiRequestTemperatureKey = attribute.Key("gen_ai.request.temperature") - - // GenAiRequestTopPKey is the attribute Key conforming to the - // "gen_ai.request.top_p" semantic conventions. It represents the top_p - // sampling setting for the LLM request. - // - // Type: double - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1.0 - GenAiRequestTopPKey = attribute.Key("gen_ai.request.top_p") - - // GenAiResponseFinishReasonsKey is the attribute Key conforming to the - // "gen_ai.response.finish_reasons" semantic conventions. It represents the - // array of reasons the model stopped generating tokens, corresponding to - // each generation received. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'stop' - GenAiResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons") - - // GenAiResponseIDKey is the attribute Key conforming to the - // "gen_ai.response.id" semantic conventions. It represents the unique - // identifier for the completion. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'chatcmpl-123' - GenAiResponseIDKey = attribute.Key("gen_ai.response.id") - - // GenAiResponseModelKey is the attribute Key conforming to the - // "gen_ai.response.model" semantic conventions. It represents the name of - // the LLM a response was generated from. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'gpt-4-0613' - GenAiResponseModelKey = attribute.Key("gen_ai.response.model") - - // GenAiSystemKey is the attribute Key conforming to the "gen_ai.system" - // semantic conventions. It represents the Generative AI product as - // identified by the client instrumentation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'openai' - // Note: The actual GenAI product may differ from the one identified by the - // client. For example, when using OpenAI client libraries to communicate - // with Mistral, the `gen_ai.system` is set to `openai` based on the - // instrumentation's best knowledge. - GenAiSystemKey = attribute.Key("gen_ai.system") - - // GenAiUsageCompletionTokensKey is the attribute Key conforming to the - // "gen_ai.usage.completion_tokens" semantic conventions. It represents the - // number of tokens used in the LLM response (completion). - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 180 - GenAiUsageCompletionTokensKey = attribute.Key("gen_ai.usage.completion_tokens") - - // GenAiUsagePromptTokensKey is the attribute Key conforming to the - // "gen_ai.usage.prompt_tokens" semantic conventions. It represents the - // number of tokens used in the LLM prompt. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 100 - GenAiUsagePromptTokensKey = attribute.Key("gen_ai.usage.prompt_tokens") -) - -var ( - // OpenAI - GenAiSystemOpenai = GenAiSystemKey.String("openai") -) - -// GenAiCompletion returns an attribute KeyValue conforming to the -// "gen_ai.completion" semantic conventions. It represents the full response -// received from the LLM. -func GenAiCompletion(val string) attribute.KeyValue { - return GenAiCompletionKey.String(val) -} - -// GenAiPrompt returns an attribute KeyValue conforming to the -// "gen_ai.prompt" semantic conventions. It represents the full prompt sent to -// an LLM. -func GenAiPrompt(val string) attribute.KeyValue { - return GenAiPromptKey.String(val) -} - -// GenAiRequestMaxTokens returns an attribute KeyValue conforming to the -// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum -// number of tokens the LLM generates for a request. -func GenAiRequestMaxTokens(val int) attribute.KeyValue { - return GenAiRequestMaxTokensKey.Int(val) -} - -// GenAiRequestModel returns an attribute KeyValue conforming to the -// "gen_ai.request.model" semantic conventions. It represents the name of the -// LLM a request is being made to. -func GenAiRequestModel(val string) attribute.KeyValue { - return GenAiRequestModelKey.String(val) -} - -// GenAiRequestTemperature returns an attribute KeyValue conforming to the -// "gen_ai.request.temperature" semantic conventions. It represents the -// temperature setting for the LLM request. -func GenAiRequestTemperature(val float64) attribute.KeyValue { - return GenAiRequestTemperatureKey.Float64(val) -} - -// GenAiRequestTopP returns an attribute KeyValue conforming to the -// "gen_ai.request.top_p" semantic conventions. It represents the top_p -// sampling setting for the LLM request. -func GenAiRequestTopP(val float64) attribute.KeyValue { - return GenAiRequestTopPKey.Float64(val) -} - -// GenAiResponseFinishReasons returns an attribute KeyValue conforming to -// the "gen_ai.response.finish_reasons" semantic conventions. It represents the -// array of reasons the model stopped generating tokens, corresponding to each -// generation received. -func GenAiResponseFinishReasons(val ...string) attribute.KeyValue { - return GenAiResponseFinishReasonsKey.StringSlice(val) -} - -// GenAiResponseID returns an attribute KeyValue conforming to the -// "gen_ai.response.id" semantic conventions. It represents the unique -// identifier for the completion. -func GenAiResponseID(val string) attribute.KeyValue { - return GenAiResponseIDKey.String(val) -} - -// GenAiResponseModel returns an attribute KeyValue conforming to the -// "gen_ai.response.model" semantic conventions. It represents the name of the -// LLM a response was generated from. -func GenAiResponseModel(val string) attribute.KeyValue { - return GenAiResponseModelKey.String(val) -} - -// GenAiUsageCompletionTokens returns an attribute KeyValue conforming to -// the "gen_ai.usage.completion_tokens" semantic conventions. It represents the -// number of tokens used in the LLM response (completion). -func GenAiUsageCompletionTokens(val int) attribute.KeyValue { - return GenAiUsageCompletionTokensKey.Int(val) -} - -// GenAiUsagePromptTokens returns an attribute KeyValue conforming to the -// "gen_ai.usage.prompt_tokens" semantic conventions. It represents the number -// of tokens used in the LLM prompt. -func GenAiUsagePromptTokens(val int) attribute.KeyValue { - return GenAiUsagePromptTokensKey.Int(val) -} - -// Attributes for GraphQL. -const ( - // GraphqlDocumentKey is the attribute Key conforming to the - // "graphql.document" semantic conventions. It represents the GraphQL - // document being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'query findBookByID { bookByID(id: ?) { name } }' - // Note: The value may be sanitized to exclude sensitive information. - GraphqlDocumentKey = attribute.Key("graphql.document") - - // GraphqlOperationNameKey is the attribute Key conforming to the - // "graphql.operation.name" semantic conventions. It represents the name of - // the operation being executed. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'findBookByID' - GraphqlOperationNameKey = attribute.Key("graphql.operation.name") - - // GraphqlOperationTypeKey is the attribute Key conforming to the - // "graphql.operation.type" semantic conventions. It represents the type of - // the operation being executed. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'query', 'mutation', 'subscription' - GraphqlOperationTypeKey = attribute.Key("graphql.operation.type") -) - -var ( - // GraphQL query - GraphqlOperationTypeQuery = GraphqlOperationTypeKey.String("query") - // GraphQL mutation - GraphqlOperationTypeMutation = GraphqlOperationTypeKey.String("mutation") - // GraphQL subscription - GraphqlOperationTypeSubscription = GraphqlOperationTypeKey.String("subscription") -) - -// GraphqlDocument returns an attribute KeyValue conforming to the -// "graphql.document" semantic conventions. It represents the GraphQL document -// being executed. -func GraphqlDocument(val string) attribute.KeyValue { - return GraphqlDocumentKey.String(val) -} - -// GraphqlOperationName returns an attribute KeyValue conforming to the -// "graphql.operation.name" semantic conventions. It represents the name of the -// operation being executed. -func GraphqlOperationName(val string) attribute.KeyValue { - return GraphqlOperationNameKey.String(val) -} - -// Attributes for the Android platform on which the Android application is -// running. -const ( - // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" - // semantic conventions. It represents the unique identifier for the - // application - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2daa2797-e42b-4624-9322-ec3f968df4da' - HerokuAppIDKey = attribute.Key("heroku.app.id") - - // HerokuReleaseCommitKey is the attribute Key conforming to the - // "heroku.release.commit" semantic conventions. It represents the commit - // hash for the current release - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'e6134959463efd8966b20e75b913cafe3f5ec' - HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") - - // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the - // "heroku.release.creation_timestamp" semantic conventions. It represents - // the time and date the release was created - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2022-10-23T18:00:42Z' - HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") -) - -// HerokuAppID returns an attribute KeyValue conforming to the -// "heroku.app.id" semantic conventions. It represents the unique identifier -// for the application -func HerokuAppID(val string) attribute.KeyValue { - return HerokuAppIDKey.String(val) -} - -// HerokuReleaseCommit returns an attribute KeyValue conforming to the -// "heroku.release.commit" semantic conventions. It represents the commit hash -// for the current release -func HerokuReleaseCommit(val string) attribute.KeyValue { - return HerokuReleaseCommitKey.String(val) -} - -// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming -// to the "heroku.release.creation_timestamp" semantic conventions. It -// represents the time and date the release was created -func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { - return HerokuReleaseCreationTimestampKey.String(val) -} - -// A host is defined as a computing instance. For example, physical servers, -// virtual machines, switches or disk array. -const ( - // HostArchKey is the attribute Key conforming to the "host.arch" semantic - // conventions. It represents the CPU architecture the host system is - // running on. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - HostArchKey = attribute.Key("host.arch") - - // HostCPUCacheL2SizeKey is the attribute Key conforming to the - // "host.cpu.cache.l2.size" semantic conventions. It represents the amount - // of level 2 memory cache available to the processor (in Bytes). - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 12288000 - HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") - - // HostCPUFamilyKey is the attribute Key conforming to the - // "host.cpu.family" semantic conventions. It represents the family or - // generation of the CPU. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '6', 'PA-RISC 1.1e' - HostCPUFamilyKey = attribute.Key("host.cpu.family") - - // HostCPUModelIDKey is the attribute Key conforming to the - // "host.cpu.model.id" semantic conventions. It represents the model - // identifier. It provides more granular information about the CPU, - // distinguishing it from other CPUs within the same family. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '6', '9000/778/B180L' - HostCPUModelIDKey = attribute.Key("host.cpu.model.id") - - // HostCPUModelNameKey is the attribute Key conforming to the - // "host.cpu.model.name" semantic conventions. It represents the model - // designation of the processor. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz' - HostCPUModelNameKey = attribute.Key("host.cpu.model.name") - - // HostCPUSteppingKey is the attribute Key conforming to the - // "host.cpu.stepping" semantic conventions. It represents the stepping or - // core revisions. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1', 'r1p1' - HostCPUSteppingKey = attribute.Key("host.cpu.stepping") - - // HostCPUVendorIDKey is the attribute Key conforming to the - // "host.cpu.vendor.id" semantic conventions. It represents the processor - // manufacturer identifier. A maximum 12-character string. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'GenuineIntel' - // Note: [CPUID](https://wiki.osdev.org/CPUID) command returns the vendor - // ID string in EBX, EDX and ECX registers. Writing these to memory in this - // order results in a 12-character string. - HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") - - // HostIDKey is the attribute Key conforming to the "host.id" semantic - // conventions. It represents the unique host ID. For Cloud, this must be - // the instance_id assigned by the cloud provider. For non-containerized - // systems, this should be the `machine-id`. See the table below for the - // sources to use to determine the `machine-id` based on operating system. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'fdbf79e8af94cb7f9e8df36789187052' - HostIDKey = attribute.Key("host.id") - - // HostImageIDKey is the attribute Key conforming to the "host.image.id" - // semantic conventions. It represents the vM image ID or host OS image ID. - // For Cloud, this value is from the provider. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ami-07b06b442921831e5' - HostImageIDKey = attribute.Key("host.image.id") - - // HostImageNameKey is the attribute Key conforming to the - // "host.image.name" semantic conventions. It represents the name of the VM - // image or OS install the host was instantiated from. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'infra-ami-eks-worker-node-7d4ec78312', 'CentOS-8-x86_64-1905' - HostImageNameKey = attribute.Key("host.image.name") - - // HostImageVersionKey is the attribute Key conforming to the - // "host.image.version" semantic conventions. It represents the version - // string of the VM image or host OS as defined in [Version - // Attributes](/docs/resource/README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '0.1' - HostImageVersionKey = attribute.Key("host.image.version") - - // HostIPKey is the attribute Key conforming to the "host.ip" semantic - // conventions. It represents the available IP addresses of the host, - // excluding loopback interfaces. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '192.168.1.140', 'fe80::abc2:4a28:737a:609e' - // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 - // addresses MUST be specified in the [RFC - // 5952](https://www.rfc-editor.org/rfc/rfc5952.html) format. - HostIPKey = attribute.Key("host.ip") - - // HostMacKey is the attribute Key conforming to the "host.mac" semantic - // conventions. It represents the available MAC addresses of the host, - // excluding loopback interfaces. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'AC-DE-48-23-45-67', 'AC-DE-48-23-45-67-01-9F' - // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal - // form](https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf): - // as hyphen-separated octets in uppercase hexadecimal form from most to - // least significant. - HostMacKey = attribute.Key("host.mac") - - // HostNameKey is the attribute Key conforming to the "host.name" semantic - // conventions. It represents the name of the host. On Unix systems, it may - // contain what the hostname command returns, or the fully qualified - // hostname, or another name specified by the user. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry-test' - HostNameKey = attribute.Key("host.name") - - // HostTypeKey is the attribute Key conforming to the "host.type" semantic - // conventions. It represents the type of host. For Cloud, this must be the - // machine type. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'n1-standard-1' - HostTypeKey = attribute.Key("host.type") -) - -var ( - // AMD64 - HostArchAMD64 = HostArchKey.String("amd64") - // ARM32 - HostArchARM32 = HostArchKey.String("arm32") - // ARM64 - HostArchARM64 = HostArchKey.String("arm64") - // Itanium - HostArchIA64 = HostArchKey.String("ia64") - // 32-bit PowerPC - HostArchPPC32 = HostArchKey.String("ppc32") - // 64-bit PowerPC - HostArchPPC64 = HostArchKey.String("ppc64") - // IBM z/Architecture - HostArchS390x = HostArchKey.String("s390x") - // 32-bit x86 - HostArchX86 = HostArchKey.String("x86") -) - -// HostCPUCacheL2Size returns an attribute KeyValue conforming to the -// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of -// level 2 memory cache available to the processor (in Bytes). -func HostCPUCacheL2Size(val int) attribute.KeyValue { - return HostCPUCacheL2SizeKey.Int(val) -} - -// HostCPUFamily returns an attribute KeyValue conforming to the -// "host.cpu.family" semantic conventions. It represents the family or -// generation of the CPU. -func HostCPUFamily(val string) attribute.KeyValue { - return HostCPUFamilyKey.String(val) -} - -// HostCPUModelID returns an attribute KeyValue conforming to the -// "host.cpu.model.id" semantic conventions. It represents the model -// identifier. It provides more granular information about the CPU, -// distinguishing it from other CPUs within the same family. -func HostCPUModelID(val string) attribute.KeyValue { - return HostCPUModelIDKey.String(val) -} - -// HostCPUModelName returns an attribute KeyValue conforming to the -// "host.cpu.model.name" semantic conventions. It represents the model -// designation of the processor. -func HostCPUModelName(val string) attribute.KeyValue { - return HostCPUModelNameKey.String(val) -} - -// HostCPUStepping returns an attribute KeyValue conforming to the -// "host.cpu.stepping" semantic conventions. It represents the stepping or core -// revisions. -func HostCPUStepping(val string) attribute.KeyValue { - return HostCPUSteppingKey.String(val) -} - -// HostCPUVendorID returns an attribute KeyValue conforming to the -// "host.cpu.vendor.id" semantic conventions. It represents the processor -// manufacturer identifier. A maximum 12-character string. -func HostCPUVendorID(val string) attribute.KeyValue { - return HostCPUVendorIDKey.String(val) -} - -// HostID returns an attribute KeyValue conforming to the "host.id" semantic -// conventions. It represents the unique host ID. For Cloud, this must be the -// instance_id assigned by the cloud provider. For non-containerized systems, -// this should be the `machine-id`. See the table below for the sources to use -// to determine the `machine-id` based on operating system. -func HostID(val string) attribute.KeyValue { - return HostIDKey.String(val) -} - -// HostImageID returns an attribute KeyValue conforming to the -// "host.image.id" semantic conventions. It represents the vM image ID or host -// OS image ID. For Cloud, this value is from the provider. -func HostImageID(val string) attribute.KeyValue { - return HostImageIDKey.String(val) -} - -// HostImageName returns an attribute KeyValue conforming to the -// "host.image.name" semantic conventions. It represents the name of the VM -// image or OS install the host was instantiated from. -func HostImageName(val string) attribute.KeyValue { - return HostImageNameKey.String(val) -} - -// HostImageVersion returns an attribute KeyValue conforming to the -// "host.image.version" semantic conventions. It represents the version string -// of the VM image or host OS as defined in [Version -// Attributes](/docs/resource/README.md#version-attributes). -func HostImageVersion(val string) attribute.KeyValue { - return HostImageVersionKey.String(val) -} - -// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic -// conventions. It represents the available IP addresses of the host, excluding -// loopback interfaces. -func HostIP(val ...string) attribute.KeyValue { - return HostIPKey.StringSlice(val) -} - -// HostMac returns an attribute KeyValue conforming to the "host.mac" -// semantic conventions. It represents the available MAC addresses of the host, -// excluding loopback interfaces. -func HostMac(val ...string) attribute.KeyValue { - return HostMacKey.StringSlice(val) -} - -// HostName returns an attribute KeyValue conforming to the "host.name" -// semantic conventions. It represents the name of the host. On Unix systems, -// it may contain what the hostname command returns, or the fully qualified -// hostname, or another name specified by the user. -func HostName(val string) attribute.KeyValue { - return HostNameKey.String(val) -} - -// HostType returns an attribute KeyValue conforming to the "host.type" -// semantic conventions. It represents the type of host. For Cloud, this must -// be the machine type. -func HostType(val string) attribute.KeyValue { - return HostTypeKey.String(val) -} - -// Semantic convention attributes in the HTTP namespace. -const ( - // HTTPConnectionStateKey is the attribute Key conforming to the - // "http.connection.state" semantic conventions. It represents the state of - // the HTTP connection in the HTTP connection pool. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'active', 'idle' - HTTPConnectionStateKey = attribute.Key("http.connection.state") - - // HTTPRequestBodySizeKey is the attribute Key conforming to the - // "http.request.body.size" semantic conventions. It represents the size of - // the request payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3495 - HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") - - // HTTPRequestMethodKey is the attribute Key conforming to the - // "http.request.method" semantic conventions. It represents the hTTP - // request method. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'GET', 'POST', 'HEAD' - // Note: HTTP request method value SHOULD be "known" to the - // instrumentation. - // By default, this convention defines "known" methods as the ones listed - // in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods) - // and the PATCH method defined in - // [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html). - // - // If the HTTP request method is not known to instrumentation, it MUST set - // the `http.request.method` attribute to `_OTHER`. - // - // If the HTTP instrumentation could end up converting valid HTTP request - // methods to `_OTHER`, then it MUST provide a way to override - // the list of known HTTP methods. If this override is done via environment - // variable, then the environment variable MUST be named - // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated - // list of case-sensitive known HTTP methods - // (this list MUST be a full override of the default known method, it is - // not a list of known methods in addition to the defaults). - // - // HTTP method names are case-sensitive and `http.request.method` attribute - // value MUST match a known HTTP method name exactly. - // Instrumentations for specific web frameworks that consider HTTP methods - // to be case insensitive, SHOULD populate a canonical equivalent. - // Tracing instrumentations that do so, MUST also set - // `http.request.method_original` to the original value. - HTTPRequestMethodKey = attribute.Key("http.request.method") - - // HTTPRequestMethodOriginalKey is the attribute Key conforming to the - // "http.request.method_original" semantic conventions. It represents the - // original HTTP method sent by the client in the request line. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'GeT', 'ACL', 'foo' - HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") - - // HTTPRequestResendCountKey is the attribute Key conforming to the - // "http.request.resend_count" semantic conventions. It represents the - // ordinal number of request resending attempt (for any reason, including - // redirects). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 3 - // Note: The resend count SHOULD be updated each time an HTTP request gets - // resent by the client, regardless of what was the cause of the resending - // (e.g. redirection, authorization failure, 503 Server Unavailable, - // network issues, or any other). - HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") - - // HTTPRequestSizeKey is the attribute Key conforming to the - // "http.request.size" semantic conventions. It represents the total size - // of the request in bytes. This should be the total number of bytes sent - // over the wire, including the request line (HTTP/1.1), framing (HTTP/2 - // and HTTP/3), headers, and request body if any. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1437 - HTTPRequestSizeKey = attribute.Key("http.request.size") - - // HTTPResponseBodySizeKey is the attribute Key conforming to the - // "http.response.body.size" semantic conventions. It represents the size - // of the response payload body in bytes. This is the number of bytes - // transferred excluding headers and is often, but not always, present as - // the - // [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) - // header. For requests using transport encoding, this should be the - // compressed size. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3495 - HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") - - // HTTPResponseSizeKey is the attribute Key conforming to the - // "http.response.size" semantic conventions. It represents the total size - // of the response in bytes. This should be the total number of bytes sent - // over the wire, including the status line (HTTP/1.1), framing (HTTP/2 and - // HTTP/3), headers, and response body and trailers if any. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1437 - HTTPResponseSizeKey = attribute.Key("http.response.size") - - // HTTPResponseStatusCodeKey is the attribute Key conforming to the - // "http.response.status_code" semantic conventions. It represents the - // [HTTP response status - // code](https://tools.ietf.org/html/rfc7231#section-6). - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 200 - HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") - - // HTTPRouteKey is the attribute Key conforming to the "http.route" - // semantic conventions. It represents the matched route, that is, the path - // template in the format used by the respective server framework. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/users/:userID?', '{controller}/{action}/{id?}' - // Note: MUST NOT be populated when this is not supported by the HTTP - // server framework as the route attribute should have low-cardinality and - // the URI path can NOT substitute it. - // SHOULD include the [application - // root](/docs/http/http-spans.md#http-server-definitions) if there is one. - HTTPRouteKey = attribute.Key("http.route") -) - -var ( - // active state - HTTPConnectionStateActive = HTTPConnectionStateKey.String("active") - // idle state - HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle") -) - -var ( - // CONNECT method - HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") - // DELETE method - HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") - // GET method - HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") - // HEAD method - HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") - // OPTIONS method - HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") - // PATCH method - HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") - // POST method - HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") - // PUT method - HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") - // TRACE method - HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") - // Any HTTP method that the instrumentation has no prior knowledge of - HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") -) - -// HTTPRequestBodySize returns an attribute KeyValue conforming to the -// "http.request.body.size" semantic conventions. It represents the size of the -// request payload body in bytes. This is the number of bytes transferred -// excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPRequestBodySize(val int) attribute.KeyValue { - return HTTPRequestBodySizeKey.Int(val) -} - -// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the -// "http.request.method_original" semantic conventions. It represents the -// original HTTP method sent by the client in the request line. -func HTTPRequestMethodOriginal(val string) attribute.KeyValue { - return HTTPRequestMethodOriginalKey.String(val) -} - -// HTTPRequestResendCount returns an attribute KeyValue conforming to the -// "http.request.resend_count" semantic conventions. It represents the ordinal -// number of request resending attempt (for any reason, including redirects). -func HTTPRequestResendCount(val int) attribute.KeyValue { - return HTTPRequestResendCountKey.Int(val) -} - -// HTTPRequestSize returns an attribute KeyValue conforming to the -// "http.request.size" semantic conventions. It represents the total size of -// the request in bytes. This should be the total number of bytes sent over the -// wire, including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), -// headers, and request body if any. -func HTTPRequestSize(val int) attribute.KeyValue { - return HTTPRequestSizeKey.Int(val) -} - -// HTTPResponseBodySize returns an attribute KeyValue conforming to the -// "http.response.body.size" semantic conventions. It represents the size of -// the response payload body in bytes. This is the number of bytes transferred -// excluding headers and is often, but not always, present as the -// [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) -// header. For requests using transport encoding, this should be the compressed -// size. -func HTTPResponseBodySize(val int) attribute.KeyValue { - return HTTPResponseBodySizeKey.Int(val) -} - -// HTTPResponseSize returns an attribute KeyValue conforming to the -// "http.response.size" semantic conventions. It represents the total size of -// the response in bytes. This should be the total number of bytes sent over -// the wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), -// headers, and response body and trailers if any. -func HTTPResponseSize(val int) attribute.KeyValue { - return HTTPResponseSizeKey.Int(val) -} - -// HTTPResponseStatusCode returns an attribute KeyValue conforming to the -// "http.response.status_code" semantic conventions. It represents the [HTTP -// response status code](https://tools.ietf.org/html/rfc7231#section-6). -func HTTPResponseStatusCode(val int) attribute.KeyValue { - return HTTPResponseStatusCodeKey.Int(val) -} - -// HTTPRoute returns an attribute KeyValue conforming to the "http.route" -// semantic conventions. It represents the matched route, that is, the path -// template in the format used by the respective server framework. -func HTTPRoute(val string) attribute.KeyValue { - return HTTPRouteKey.String(val) -} - -// Java Virtual machine related attributes. -const ( - // JvmBufferPoolNameKey is the attribute Key conforming to the - // "jvm.buffer.pool.name" semantic conventions. It represents the name of - // the buffer pool. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'mapped', 'direct' - // Note: Pool names are generally obtained via - // [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). - JvmBufferPoolNameKey = attribute.Key("jvm.buffer.pool.name") - - // JvmGcActionKey is the attribute Key conforming to the "jvm.gc.action" - // semantic conventions. It represents the name of the garbage collector - // action. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'end of minor GC', 'end of major GC' - // Note: Garbage collector action is generally obtained via - // [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). - JvmGcActionKey = attribute.Key("jvm.gc.action") - - // JvmGcNameKey is the attribute Key conforming to the "jvm.gc.name" - // semantic conventions. It represents the name of the garbage collector. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'G1 Young Generation', 'G1 Old Generation' - // Note: Garbage collector name is generally obtained via - // [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). - JvmGcNameKey = attribute.Key("jvm.gc.name") - - // JvmMemoryPoolNameKey is the attribute Key conforming to the - // "jvm.memory.pool.name" semantic conventions. It represents the name of - // the memory pool. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'G1 Old Gen', 'G1 Eden space', 'G1 Survivor Space' - // Note: Pool names are generally obtained via - // [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()). - JvmMemoryPoolNameKey = attribute.Key("jvm.memory.pool.name") - - // JvmMemoryTypeKey is the attribute Key conforming to the - // "jvm.memory.type" semantic conventions. It represents the type of - // memory. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'heap', 'non_heap' - JvmMemoryTypeKey = attribute.Key("jvm.memory.type") - - // JvmThreadDaemonKey is the attribute Key conforming to the - // "jvm.thread.daemon" semantic conventions. It represents the whether the - // thread is daemon or not. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: stable - JvmThreadDaemonKey = attribute.Key("jvm.thread.daemon") - - // JvmThreadStateKey is the attribute Key conforming to the - // "jvm.thread.state" semantic conventions. It represents the state of the - // thread. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'runnable', 'blocked' - JvmThreadStateKey = attribute.Key("jvm.thread.state") -) - -var ( - // Heap memory - JvmMemoryTypeHeap = JvmMemoryTypeKey.String("heap") - // Non-heap memory - JvmMemoryTypeNonHeap = JvmMemoryTypeKey.String("non_heap") -) - -var ( - // A thread that has not yet started is in this state - JvmThreadStateNew = JvmThreadStateKey.String("new") - // A thread executing in the Java virtual machine is in this state - JvmThreadStateRunnable = JvmThreadStateKey.String("runnable") - // A thread that is blocked waiting for a monitor lock is in this state - JvmThreadStateBlocked = JvmThreadStateKey.String("blocked") - // A thread that is waiting indefinitely for another thread to perform a particular action is in this state - JvmThreadStateWaiting = JvmThreadStateKey.String("waiting") - // A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state - JvmThreadStateTimedWaiting = JvmThreadStateKey.String("timed_waiting") - // A thread that has exited is in this state - JvmThreadStateTerminated = JvmThreadStateKey.String("terminated") -) - -// JvmBufferPoolName returns an attribute KeyValue conforming to the -// "jvm.buffer.pool.name" semantic conventions. It represents the name of the -// buffer pool. -func JvmBufferPoolName(val string) attribute.KeyValue { - return JvmBufferPoolNameKey.String(val) -} - -// JvmGcAction returns an attribute KeyValue conforming to the -// "jvm.gc.action" semantic conventions. It represents the name of the garbage -// collector action. -func JvmGcAction(val string) attribute.KeyValue { - return JvmGcActionKey.String(val) -} - -// JvmGcName returns an attribute KeyValue conforming to the "jvm.gc.name" -// semantic conventions. It represents the name of the garbage collector. -func JvmGcName(val string) attribute.KeyValue { - return JvmGcNameKey.String(val) -} - -// JvmMemoryPoolName returns an attribute KeyValue conforming to the -// "jvm.memory.pool.name" semantic conventions. It represents the name of the -// memory pool. -func JvmMemoryPoolName(val string) attribute.KeyValue { - return JvmMemoryPoolNameKey.String(val) -} - -// JvmThreadDaemon returns an attribute KeyValue conforming to the -// "jvm.thread.daemon" semantic conventions. It represents the whether the -// thread is daemon or not. -func JvmThreadDaemon(val bool) attribute.KeyValue { - return JvmThreadDaemonKey.Bool(val) -} - -// Kubernetes resource attributes. -const ( - // K8SClusterNameKey is the attribute Key conforming to the - // "k8s.cluster.name" semantic conventions. It represents the name of the - // cluster. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry-cluster' - K8SClusterNameKey = attribute.Key("k8s.cluster.name") - - // K8SClusterUIDKey is the attribute Key conforming to the - // "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for - // the cluster, set to the UID of the `kube-system` namespace. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '218fc5a9-a5f1-4b54-aa05-46717d0ab26d' - // Note: K8S doesn't have support for obtaining a cluster ID. If this is - // ever - // added, we will recommend collecting the `k8s.cluster.uid` through the - // official APIs. In the meantime, we are able to use the `uid` of the - // `kube-system` namespace as a proxy for cluster ID. Read on for the - // rationale. - // - // Every object created in a K8S cluster is assigned a distinct UID. The - // `kube-system` namespace is used by Kubernetes itself and will exist - // for the lifetime of the cluster. Using the `uid` of the `kube-system` - // namespace is a reasonable proxy for the K8S ClusterID as it will only - // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are - // UUIDs as standardized by - // [ISO/IEC 9834-8 and ITU-T - // X.667](https://www.itu.int/ITU-T/studygroups/com17/oid.html). - // Which states: - // - // > If generated according to one of the mechanisms defined in Rec. - // ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - // different from all other UUIDs generated before 3603 A.D., or is - // extremely likely to be different (depending on the mechanism chosen). - // - // Therefore, UIDs between clusters should be extremely unlikely to - // conflict. - K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") - - // K8SContainerNameKey is the attribute Key conforming to the - // "k8s.container.name" semantic conventions. It represents the name of the - // Container from Pod specification, must be unique within a Pod. Container - // runtime usually uses different globally unique name (`container.name`). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'redis' - K8SContainerNameKey = attribute.Key("k8s.container.name") - - // K8SContainerRestartCountKey is the attribute Key conforming to the - // "k8s.container.restart_count" semantic conventions. It represents the - // number of times the container was restarted. This attribute can be used - // to identify a particular container (running or stopped) within a - // container spec. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") - - // K8SContainerStatusLastTerminatedReasonKey is the attribute Key - // conforming to the "k8s.container.status.last_terminated_reason" semantic - // conventions. It represents the last terminated reason of the Container. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Evicted', 'Error' - K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason") - - // K8SCronJobNameKey is the attribute Key conforming to the - // "k8s.cronjob.name" semantic conventions. It represents the name of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") - - // K8SCronJobUIDKey is the attribute Key conforming to the - // "k8s.cronjob.uid" semantic conventions. It represents the UID of the - // CronJob. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") - - // K8SDaemonSetNameKey is the attribute Key conforming to the - // "k8s.daemonset.name" semantic conventions. It represents the name of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") - - // K8SDaemonSetUIDKey is the attribute Key conforming to the - // "k8s.daemonset.uid" semantic conventions. It represents the UID of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") - - // K8SDeploymentNameKey is the attribute Key conforming to the - // "k8s.deployment.name" semantic conventions. It represents the name of - // the Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") - - // K8SDeploymentUIDKey is the attribute Key conforming to the - // "k8s.deployment.uid" semantic conventions. It represents the UID of the - // Deployment. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") - - // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" - // semantic conventions. It represents the name of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SJobNameKey = attribute.Key("k8s.job.name") - - // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" - // semantic conventions. It represents the UID of the Job. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SJobUIDKey = attribute.Key("k8s.job.uid") - - // K8SNamespaceNameKey is the attribute Key conforming to the - // "k8s.namespace.name" semantic conventions. It represents the name of the - // namespace that the pod is running in. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'default' - K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") - - // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" - // semantic conventions. It represents the name of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'node-1' - K8SNodeNameKey = attribute.Key("k8s.node.name") - - // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" - // semantic conventions. It represents the UID of the Node. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2' - K8SNodeUIDKey = attribute.Key("k8s.node.uid") - - // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" - // semantic conventions. It represents the name of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry-pod-autoconf' - K8SPodNameKey = attribute.Key("k8s.pod.name") - - // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" - // semantic conventions. It represents the UID of the Pod. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SPodUIDKey = attribute.Key("k8s.pod.uid") - - // K8SReplicaSetNameKey is the attribute Key conforming to the - // "k8s.replicaset.name" semantic conventions. It represents the name of - // the ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") - - // K8SReplicaSetUIDKey is the attribute Key conforming to the - // "k8s.replicaset.uid" semantic conventions. It represents the UID of the - // ReplicaSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") - - // K8SStatefulSetNameKey is the attribute Key conforming to the - // "k8s.statefulset.name" semantic conventions. It represents the name of - // the StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry' - K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") - - // K8SStatefulSetUIDKey is the attribute Key conforming to the - // "k8s.statefulset.uid" semantic conventions. It represents the UID of the - // StatefulSet. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '275ecb36-5aa8-4c2a-9c47-d8bb681b9aff' - K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") -) - -// K8SClusterName returns an attribute KeyValue conforming to the -// "k8s.cluster.name" semantic conventions. It represents the name of the -// cluster. -func K8SClusterName(val string) attribute.KeyValue { - return K8SClusterNameKey.String(val) -} - -// K8SClusterUID returns an attribute KeyValue conforming to the -// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the -// cluster, set to the UID of the `kube-system` namespace. -func K8SClusterUID(val string) attribute.KeyValue { - return K8SClusterUIDKey.String(val) -} - -// K8SContainerName returns an attribute KeyValue conforming to the -// "k8s.container.name" semantic conventions. It represents the name of the -// Container from Pod specification, must be unique within a Pod. Container -// runtime usually uses different globally unique name (`container.name`). -func K8SContainerName(val string) attribute.KeyValue { - return K8SContainerNameKey.String(val) -} - -// K8SContainerRestartCount returns an attribute KeyValue conforming to the -// "k8s.container.restart_count" semantic conventions. It represents the number -// of times the container was restarted. This attribute can be used to identify -// a particular container (running or stopped) within a container spec. -func K8SContainerRestartCount(val int) attribute.KeyValue { - return K8SContainerRestartCountKey.Int(val) -} - -// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue -// conforming to the "k8s.container.status.last_terminated_reason" semantic -// conventions. It represents the last terminated reason of the Container. -func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue { - return K8SContainerStatusLastTerminatedReasonKey.String(val) -} - -// K8SCronJobName returns an attribute KeyValue conforming to the -// "k8s.cronjob.name" semantic conventions. It represents the name of the -// CronJob. -func K8SCronJobName(val string) attribute.KeyValue { - return K8SCronJobNameKey.String(val) -} - -// K8SCronJobUID returns an attribute KeyValue conforming to the -// "k8s.cronjob.uid" semantic conventions. It represents the UID of the -// CronJob. -func K8SCronJobUID(val string) attribute.KeyValue { - return K8SCronJobUIDKey.String(val) -} - -// K8SDaemonSetName returns an attribute KeyValue conforming to the -// "k8s.daemonset.name" semantic conventions. It represents the name of the -// DaemonSet. -func K8SDaemonSetName(val string) attribute.KeyValue { - return K8SDaemonSetNameKey.String(val) -} - -// K8SDaemonSetUID returns an attribute KeyValue conforming to the -// "k8s.daemonset.uid" semantic conventions. It represents the UID of the -// DaemonSet. -func K8SDaemonSetUID(val string) attribute.KeyValue { - return K8SDaemonSetUIDKey.String(val) -} - -// K8SDeploymentName returns an attribute KeyValue conforming to the -// "k8s.deployment.name" semantic conventions. It represents the name of the -// Deployment. -func K8SDeploymentName(val string) attribute.KeyValue { - return K8SDeploymentNameKey.String(val) -} - -// K8SDeploymentUID returns an attribute KeyValue conforming to the -// "k8s.deployment.uid" semantic conventions. It represents the UID of the -// Deployment. -func K8SDeploymentUID(val string) attribute.KeyValue { - return K8SDeploymentUIDKey.String(val) -} - -// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" -// semantic conventions. It represents the name of the Job. -func K8SJobName(val string) attribute.KeyValue { - return K8SJobNameKey.String(val) -} - -// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" -// semantic conventions. It represents the UID of the Job. -func K8SJobUID(val string) attribute.KeyValue { - return K8SJobUIDKey.String(val) -} - -// K8SNamespaceName returns an attribute KeyValue conforming to the -// "k8s.namespace.name" semantic conventions. It represents the name of the -// namespace that the pod is running in. -func K8SNamespaceName(val string) attribute.KeyValue { - return K8SNamespaceNameKey.String(val) -} - -// K8SNodeName returns an attribute KeyValue conforming to the -// "k8s.node.name" semantic conventions. It represents the name of the Node. -func K8SNodeName(val string) attribute.KeyValue { - return K8SNodeNameKey.String(val) -} - -// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" -// semantic conventions. It represents the UID of the Node. -func K8SNodeUID(val string) attribute.KeyValue { - return K8SNodeUIDKey.String(val) -} - -// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" -// semantic conventions. It represents the name of the Pod. -func K8SPodName(val string) attribute.KeyValue { - return K8SPodNameKey.String(val) -} - -// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" -// semantic conventions. It represents the UID of the Pod. -func K8SPodUID(val string) attribute.KeyValue { - return K8SPodUIDKey.String(val) -} - -// K8SReplicaSetName returns an attribute KeyValue conforming to the -// "k8s.replicaset.name" semantic conventions. It represents the name of the -// ReplicaSet. -func K8SReplicaSetName(val string) attribute.KeyValue { - return K8SReplicaSetNameKey.String(val) -} - -// K8SReplicaSetUID returns an attribute KeyValue conforming to the -// "k8s.replicaset.uid" semantic conventions. It represents the UID of the -// ReplicaSet. -func K8SReplicaSetUID(val string) attribute.KeyValue { - return K8SReplicaSetUIDKey.String(val) -} - -// K8SStatefulSetName returns an attribute KeyValue conforming to the -// "k8s.statefulset.name" semantic conventions. It represents the name of the -// StatefulSet. -func K8SStatefulSetName(val string) attribute.KeyValue { - return K8SStatefulSetNameKey.String(val) -} - -// K8SStatefulSetUID returns an attribute KeyValue conforming to the -// "k8s.statefulset.uid" semantic conventions. It represents the UID of the -// StatefulSet. -func K8SStatefulSetUID(val string) attribute.KeyValue { - return K8SStatefulSetUIDKey.String(val) -} - -// Log attributes -const ( - // LogIostreamKey is the attribute Key conforming to the "log.iostream" - // semantic conventions. It represents the stream associated with the log. - // See below for a list of well-known values. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - LogIostreamKey = attribute.Key("log.iostream") -) - -var ( - // Logs from stdout stream - LogIostreamStdout = LogIostreamKey.String("stdout") - // Events from stderr stream - LogIostreamStderr = LogIostreamKey.String("stderr") -) - -// Attributes for a file to which log was emitted. -const ( - // LogFileNameKey is the attribute Key conforming to the "log.file.name" - // semantic conventions. It represents the basename of the file. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'audit.log' - LogFileNameKey = attribute.Key("log.file.name") - - // LogFileNameResolvedKey is the attribute Key conforming to the - // "log.file.name_resolved" semantic conventions. It represents the - // basename of the file, with symlinks resolved. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'uuid.log' - LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") - - // LogFilePathKey is the attribute Key conforming to the "log.file.path" - // semantic conventions. It represents the full path to the file. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/var/log/mysql/audit.log' - LogFilePathKey = attribute.Key("log.file.path") - - // LogFilePathResolvedKey is the attribute Key conforming to the - // "log.file.path_resolved" semantic conventions. It represents the full - // path to the file, with symlinks resolved. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/var/lib/docker/uuid.log' - LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") -) - -// LogFileName returns an attribute KeyValue conforming to the -// "log.file.name" semantic conventions. It represents the basename of the -// file. -func LogFileName(val string) attribute.KeyValue { - return LogFileNameKey.String(val) -} - -// LogFileNameResolved returns an attribute KeyValue conforming to the -// "log.file.name_resolved" semantic conventions. It represents the basename of -// the file, with symlinks resolved. -func LogFileNameResolved(val string) attribute.KeyValue { - return LogFileNameResolvedKey.String(val) -} - -// LogFilePath returns an attribute KeyValue conforming to the -// "log.file.path" semantic conventions. It represents the full path to the -// file. -func LogFilePath(val string) attribute.KeyValue { - return LogFilePathKey.String(val) -} - -// LogFilePathResolved returns an attribute KeyValue conforming to the -// "log.file.path_resolved" semantic conventions. It represents the full path -// to the file, with symlinks resolved. -func LogFilePathResolved(val string) attribute.KeyValue { - return LogFilePathResolvedKey.String(val) -} - -// The generic attributes that may be used in any Log Record. -const ( - // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" - // semantic conventions. It represents a unique identifier for the Log - // Record. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '01ARZ3NDEKTSV4RRFFQ69G5FAV' - // Note: If an id is provided, other log records with the same id will be - // considered duplicates and can be removed safely. This means, that two - // distinguishable log records MUST have different values. - // The id MAY be an [Universally Unique Lexicographically Sortable - // Identifier (ULID)](https://github.com/ulid/spec), but other identifiers - // (e.g. UUID) may be used as needed. - LogRecordUIDKey = attribute.Key("log.record.uid") -) - -// LogRecordUID returns an attribute KeyValue conforming to the -// "log.record.uid" semantic conventions. It represents a unique identifier for -// the Log Record. -func LogRecordUID(val string) attribute.KeyValue { - return LogRecordUIDKey.String(val) -} - -// Attributes describing telemetry around messaging systems and messaging -// activities. -const ( - // MessagingBatchMessageCountKey is the attribute Key conforming to the - // "messaging.batch.message_count" semantic conventions. It represents the - // number of messages sent, received, or processed in the scope of the - // batching operation. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on - // spans that operate with a single message. When a messaging client - // library supports both batch and single-message API for the same - // operation, instrumentations SHOULD use `messaging.batch.message_count` - // for batching APIs and SHOULD NOT use it for single-message APIs. - MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") - - // MessagingClientIDKey is the attribute Key conforming to the - // "messaging.client.id" semantic conventions. It represents a unique - // identifier for the client that consumes or produces a message. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'client-5', 'myhost@8742@s8083jm' - MessagingClientIDKey = attribute.Key("messaging.client.id") - - // MessagingDestinationAnonymousKey is the attribute Key conforming to the - // "messaging.destination.anonymous" semantic conventions. It represents a - // boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") - - // MessagingDestinationNameKey is the attribute Key conforming to the - // "messaging.destination.name" semantic conventions. It represents the - // message destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MyQueue', 'MyTopic' - // Note: Destination name SHOULD uniquely identify a specific queue, topic - // or other entity within the broker. If - // the broker doesn't have such notion, the destination name SHOULD - // uniquely identify the broker. - MessagingDestinationNameKey = attribute.Key("messaging.destination.name") - - // MessagingDestinationPartitionIDKey is the attribute Key conforming to - // the "messaging.destination.partition.id" semantic conventions. It - // represents the identifier of the partition messages are sent to or - // received from, unique within the `messaging.destination.name`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1' - MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id") - - // MessagingDestinationTemplateKey is the attribute Key conforming to the - // "messaging.destination.template" semantic conventions. It represents the - // low cardinality representation of the messaging destination name - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/customers/{customerID}' - // Note: Destination names could be constructed from templates. An example - // would be a destination name involving a user name or product id. - // Although the destination name in this case is of high cardinality, the - // underlying template is of low cardinality and can be effectively used - // for grouping and aggregation. - MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") - - // MessagingDestinationTemporaryKey is the attribute Key conforming to the - // "messaging.destination.temporary" semantic conventions. It represents a - // boolean that is true if the message destination is temporary and might - // not exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") - - // MessagingDestinationPublishAnonymousKey is the attribute Key conforming - // to the "messaging.destination_publish.anonymous" semantic conventions. - // It represents a boolean that is true if the publish message destination - // is anonymous (could be unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - MessagingDestinationPublishAnonymousKey = attribute.Key("messaging.destination_publish.anonymous") - - // MessagingDestinationPublishNameKey is the attribute Key conforming to - // the "messaging.destination_publish.name" semantic conventions. It - // represents the name of the original destination the message was - // published to - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MyQueue', 'MyTopic' - // Note: The name SHOULD uniquely identify a specific queue, topic, or - // other entity within the broker. If - // the broker doesn't have such notion, the original destination name - // SHOULD uniquely identify the broker. - MessagingDestinationPublishNameKey = attribute.Key("messaging.destination_publish.name") - - // MessagingMessageBodySizeKey is the attribute Key conforming to the - // "messaging.message.body.size" semantic conventions. It represents the - // size of the message body in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1439 - // Note: This can refer to both the compressed or uncompressed body size. - // If both sizes are known, the uncompressed - // body size should be used. - MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") - - // MessagingMessageConversationIDKey is the attribute Key conforming to the - // "messaging.message.conversation_id" semantic conventions. It represents - // the conversation ID identifying the conversation to which the message - // belongs, represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MyConversationID' - MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") - - // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the - // "messaging.message.envelope.size" semantic conventions. It represents - // the size of the message body and metadata in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 2738 - // Note: This can refer to both the compressed or uncompressed size. If - // both sizes are known, the uncompressed - // size should be used. - MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") - - // MessagingMessageIDKey is the attribute Key conforming to the - // "messaging.message.id" semantic conventions. It represents a value used - // by the messaging system as an identifier for the message, represented as - // a string. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '452a7c7c7c7048c2f887f61572b18fc2' - MessagingMessageIDKey = attribute.Key("messaging.message.id") - - // MessagingOperationNameKey is the attribute Key conforming to the - // "messaging.operation.name" semantic conventions. It represents the - // system-specific name of the messaging operation. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ack', 'nack', 'send' - MessagingOperationNameKey = attribute.Key("messaging.operation.name") - - // MessagingOperationTypeKey is the attribute Key conforming to the - // "messaging.operation.type" semantic conventions. It represents a string - // identifying the type of the messaging operation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: If a custom value is used, it MUST be of low cardinality. - MessagingOperationTypeKey = attribute.Key("messaging.operation.type") - - // MessagingSystemKey is the attribute Key conforming to the - // "messaging.system" semantic conventions. It represents the messaging - // system as identified by the client instrumentation. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: The actual messaging system may differ from the one known by the - // client. For example, when using Kafka client libraries to communicate - // with Azure Event Hubs, the `messaging.system` is set to `kafka` based on - // the instrumentation's best knowledge. - MessagingSystemKey = attribute.Key("messaging.system") -) - -var ( - // One or more messages are provided for publishing to an intermediary. If a single message is published, the context of the "Publish" span can be used as the creation context and no "Create" span needs to be created - MessagingOperationTypePublish = MessagingOperationTypeKey.String("publish") - // A message is created. "Create" spans always refer to a single message and are used to provide a unique creation context for messages in batch publishing scenarios - MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create") - // One or more messages are requested by a consumer. This operation refers to pull-based scenarios, where consumers explicitly call methods of messaging SDKs to receive messages - MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive") - // One or more messages are delivered to or processed by a consumer - MessagingOperationTypeDeliver = MessagingOperationTypeKey.String("process") - // One or more messages are settled - MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle") -) - -var ( - // Apache ActiveMQ - MessagingSystemActivemq = MessagingSystemKey.String("activemq") - // Amazon Simple Queue Service (SQS) - MessagingSystemAWSSqs = MessagingSystemKey.String("aws_sqs") - // Azure Event Grid - MessagingSystemEventgrid = MessagingSystemKey.String("eventgrid") - // Azure Event Hubs - MessagingSystemEventhubs = MessagingSystemKey.String("eventhubs") - // Azure Service Bus - MessagingSystemServicebus = MessagingSystemKey.String("servicebus") - // Google Cloud Pub/Sub - MessagingSystemGCPPubsub = MessagingSystemKey.String("gcp_pubsub") - // Java Message Service - MessagingSystemJms = MessagingSystemKey.String("jms") - // Apache Kafka - MessagingSystemKafka = MessagingSystemKey.String("kafka") - // RabbitMQ - MessagingSystemRabbitmq = MessagingSystemKey.String("rabbitmq") - // Apache RocketMQ - MessagingSystemRocketmq = MessagingSystemKey.String("rocketmq") -) - -// MessagingBatchMessageCount returns an attribute KeyValue conforming to -// the "messaging.batch.message_count" semantic conventions. It represents the -// number of messages sent, received, or processed in the scope of the batching -// operation. -func MessagingBatchMessageCount(val int) attribute.KeyValue { - return MessagingBatchMessageCountKey.Int(val) -} - -// MessagingClientID returns an attribute KeyValue conforming to the -// "messaging.client.id" semantic conventions. It represents a unique -// identifier for the client that consumes or produces a message. -func MessagingClientID(val string) attribute.KeyValue { - return MessagingClientIDKey.String(val) -} - -// MessagingDestinationAnonymous returns an attribute KeyValue conforming to -// the "messaging.destination.anonymous" semantic conventions. It represents a -// boolean that is true if the message destination is anonymous (could be -// unnamed or have auto-generated name). -func MessagingDestinationAnonymous(val bool) attribute.KeyValue { - return MessagingDestinationAnonymousKey.Bool(val) -} - -// MessagingDestinationName returns an attribute KeyValue conforming to the -// "messaging.destination.name" semantic conventions. It represents the message -// destination name -func MessagingDestinationName(val string) attribute.KeyValue { - return MessagingDestinationNameKey.String(val) -} - -// MessagingDestinationPartitionID returns an attribute KeyValue conforming -// to the "messaging.destination.partition.id" semantic conventions. It -// represents the identifier of the partition messages are sent to or received -// from, unique within the `messaging.destination.name`. -func MessagingDestinationPartitionID(val string) attribute.KeyValue { - return MessagingDestinationPartitionIDKey.String(val) -} - -// MessagingDestinationTemplate returns an attribute KeyValue conforming to -// the "messaging.destination.template" semantic conventions. It represents the -// low cardinality representation of the messaging destination name -func MessagingDestinationTemplate(val string) attribute.KeyValue { - return MessagingDestinationTemplateKey.String(val) -} - -// MessagingDestinationTemporary returns an attribute KeyValue conforming to -// the "messaging.destination.temporary" semantic conventions. It represents a -// boolean that is true if the message destination is temporary and might not -// exist anymore after messages are processed. -func MessagingDestinationTemporary(val bool) attribute.KeyValue { - return MessagingDestinationTemporaryKey.Bool(val) -} - -// MessagingDestinationPublishAnonymous returns an attribute KeyValue -// conforming to the "messaging.destination_publish.anonymous" semantic -// conventions. It represents a boolean that is true if the publish message -// destination is anonymous (could be unnamed or have auto-generated name). -func MessagingDestinationPublishAnonymous(val bool) attribute.KeyValue { - return MessagingDestinationPublishAnonymousKey.Bool(val) -} - -// MessagingDestinationPublishName returns an attribute KeyValue conforming -// to the "messaging.destination_publish.name" semantic conventions. It -// represents the name of the original destination the message was published to -func MessagingDestinationPublishName(val string) attribute.KeyValue { - return MessagingDestinationPublishNameKey.String(val) -} - -// MessagingMessageBodySize returns an attribute KeyValue conforming to the -// "messaging.message.body.size" semantic conventions. It represents the size -// of the message body in bytes. -func MessagingMessageBodySize(val int) attribute.KeyValue { - return MessagingMessageBodySizeKey.Int(val) -} - -// MessagingMessageConversationID returns an attribute KeyValue conforming -// to the "messaging.message.conversation_id" semantic conventions. It -// represents the conversation ID identifying the conversation to which the -// message belongs, represented as a string. Sometimes called "Correlation ID". -func MessagingMessageConversationID(val string) attribute.KeyValue { - return MessagingMessageConversationIDKey.String(val) -} - -// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to -// the "messaging.message.envelope.size" semantic conventions. It represents -// the size of the message body and metadata in bytes. -func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { - return MessagingMessageEnvelopeSizeKey.Int(val) -} - -// MessagingMessageID returns an attribute KeyValue conforming to the -// "messaging.message.id" semantic conventions. It represents a value used by -// the messaging system as an identifier for the message, represented as a -// string. -func MessagingMessageID(val string) attribute.KeyValue { - return MessagingMessageIDKey.String(val) -} - -// MessagingOperationName returns an attribute KeyValue conforming to the -// "messaging.operation.name" semantic conventions. It represents the -// system-specific name of the messaging operation. -func MessagingOperationName(val string) attribute.KeyValue { - return MessagingOperationNameKey.String(val) -} - -// This group describes attributes specific to Apache Kafka. -const ( - // MessagingKafkaConsumerGroupKey is the attribute Key conforming to the - // "messaging.kafka.consumer.group" semantic conventions. It represents the - // name of the Kafka Consumer Group that is handling the message. Only - // applies to consumers, not producers. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'my-group' - MessagingKafkaConsumerGroupKey = attribute.Key("messaging.kafka.consumer.group") - - // MessagingKafkaMessageKeyKey is the attribute Key conforming to the - // "messaging.kafka.message.key" semantic conventions. It represents the - // message keys in Kafka are used for grouping alike messages to ensure - // they're processed on the same partition. They differ from - // `messaging.message.id` in that they're not unique. If the key is `null`, - // the attribute MUST NOT be set. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myKey' - // Note: If the key type is not string, it's string representation has to - // be supplied for the attribute. If the key has no unambiguous, canonical - // string form, don't include its value. - MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") - - // MessagingKafkaMessageOffsetKey is the attribute Key conforming to the - // "messaging.kafka.message.offset" semantic conventions. It represents the - // offset of a record in the corresponding Kafka partition. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 42 - MessagingKafkaMessageOffsetKey = attribute.Key("messaging.kafka.message.offset") - - // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the - // "messaging.kafka.message.tombstone" semantic conventions. It represents - // a boolean that is true if the message is a tombstone. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") -) - -// MessagingKafkaConsumerGroup returns an attribute KeyValue conforming to -// the "messaging.kafka.consumer.group" semantic conventions. It represents the -// name of the Kafka Consumer Group that is handling the message. Only applies -// to consumers, not producers. -func MessagingKafkaConsumerGroup(val string) attribute.KeyValue { - return MessagingKafkaConsumerGroupKey.String(val) -} - -// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the -// "messaging.kafka.message.key" semantic conventions. It represents the -// message keys in Kafka are used for grouping alike messages to ensure they're -// processed on the same partition. They differ from `messaging.message.id` in -// that they're not unique. If the key is `null`, the attribute MUST NOT be -// set. -func MessagingKafkaMessageKey(val string) attribute.KeyValue { - return MessagingKafkaMessageKeyKey.String(val) -} - -// MessagingKafkaMessageOffset returns an attribute KeyValue conforming to -// the "messaging.kafka.message.offset" semantic conventions. It represents the -// offset of a record in the corresponding Kafka partition. -func MessagingKafkaMessageOffset(val int) attribute.KeyValue { - return MessagingKafkaMessageOffsetKey.Int(val) -} - -// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming -// to the "messaging.kafka.message.tombstone" semantic conventions. It -// represents a boolean that is true if the message is a tombstone. -func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { - return MessagingKafkaMessageTombstoneKey.Bool(val) -} - -// This group describes attributes specific to RabbitMQ. -const ( - // MessagingRabbitmqDestinationRoutingKeyKey is the attribute Key - // conforming to the "messaging.rabbitmq.destination.routing_key" semantic - // conventions. It represents the rabbitMQ message routing key. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myKey' - MessagingRabbitmqDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") - - // MessagingRabbitmqMessageDeliveryTagKey is the attribute Key conforming - // to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. - // It represents the rabbitMQ message delivery tag - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 123 - MessagingRabbitmqMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") -) - -// MessagingRabbitmqDestinationRoutingKey returns an attribute KeyValue -// conforming to the "messaging.rabbitmq.destination.routing_key" semantic -// conventions. It represents the rabbitMQ message routing key. -func MessagingRabbitmqDestinationRoutingKey(val string) attribute.KeyValue { - return MessagingRabbitmqDestinationRoutingKeyKey.String(val) -} - -// MessagingRabbitmqMessageDeliveryTag returns an attribute KeyValue -// conforming to the "messaging.rabbitmq.message.delivery_tag" semantic -// conventions. It represents the rabbitMQ message delivery tag -func MessagingRabbitmqMessageDeliveryTag(val int) attribute.KeyValue { - return MessagingRabbitmqMessageDeliveryTagKey.Int(val) -} - -// This group describes attributes specific to RocketMQ. -const ( - // MessagingRocketmqClientGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.client_group" semantic conventions. It represents - // the name of the RocketMQ producer/consumer group that is handling the - // message. The client type is identified by the SpanKind. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myConsumerGroup' - MessagingRocketmqClientGroupKey = attribute.Key("messaging.rocketmq.client_group") - - // MessagingRocketmqConsumptionModelKey is the attribute Key conforming to - // the "messaging.rocketmq.consumption_model" semantic conventions. It - // represents the model of message consumption. This only applies to - // consumer spans. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - MessagingRocketmqConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") - - // MessagingRocketmqMessageDelayTimeLevelKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delay_time_level" semantic - // conventions. It represents the delay time level for delay message, which - // determines the message delay time. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3 - MessagingRocketmqMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") - - // MessagingRocketmqMessageDeliveryTimestampKey is the attribute Key - // conforming to the "messaging.rocketmq.message.delivery_timestamp" - // semantic conventions. It represents the timestamp in milliseconds that - // the delay message is expected to be delivered to consumer. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1665987217045 - MessagingRocketmqMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") - - // MessagingRocketmqMessageGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.message.group" semantic conventions. It represents - // the it is essential for FIFO message. Messages that belong to the same - // message group are always processed one by one within the same consumer - // group. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myMessageGroup' - MessagingRocketmqMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") - - // MessagingRocketmqMessageKeysKey is the attribute Key conforming to the - // "messaging.rocketmq.message.keys" semantic conventions. It represents - // the key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'keyA', 'keyB' - MessagingRocketmqMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") - - // MessagingRocketmqMessageTagKey is the attribute Key conforming to the - // "messaging.rocketmq.message.tag" semantic conventions. It represents the - // secondary classifier of message besides topic. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'tagA' - MessagingRocketmqMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") - - // MessagingRocketmqMessageTypeKey is the attribute Key conforming to the - // "messaging.rocketmq.message.type" semantic conventions. It represents - // the type of message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - MessagingRocketmqMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") - - // MessagingRocketmqNamespaceKey is the attribute Key conforming to the - // "messaging.rocketmq.namespace" semantic conventions. It represents the - // namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myNamespace' - MessagingRocketmqNamespaceKey = attribute.Key("messaging.rocketmq.namespace") -) - -var ( - // Clustering consumption model - MessagingRocketmqConsumptionModelClustering = MessagingRocketmqConsumptionModelKey.String("clustering") - // Broadcasting consumption model - MessagingRocketmqConsumptionModelBroadcasting = MessagingRocketmqConsumptionModelKey.String("broadcasting") -) - -var ( - // Normal message - MessagingRocketmqMessageTypeNormal = MessagingRocketmqMessageTypeKey.String("normal") - // FIFO message - MessagingRocketmqMessageTypeFifo = MessagingRocketmqMessageTypeKey.String("fifo") - // Delay message - MessagingRocketmqMessageTypeDelay = MessagingRocketmqMessageTypeKey.String("delay") - // Transaction message - MessagingRocketmqMessageTypeTransaction = MessagingRocketmqMessageTypeKey.String("transaction") -) - -// MessagingRocketmqClientGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.client_group" semantic conventions. It represents -// the name of the RocketMQ producer/consumer group that is handling the -// message. The client type is identified by the SpanKind. -func MessagingRocketmqClientGroup(val string) attribute.KeyValue { - return MessagingRocketmqClientGroupKey.String(val) -} - -// MessagingRocketmqMessageDelayTimeLevel returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delay_time_level" semantic -// conventions. It represents the delay time level for delay message, which -// determines the message delay time. -func MessagingRocketmqMessageDelayTimeLevel(val int) attribute.KeyValue { - return MessagingRocketmqMessageDelayTimeLevelKey.Int(val) -} - -// MessagingRocketmqMessageDeliveryTimestamp returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic -// conventions. It represents the timestamp in milliseconds that the delay -// message is expected to be delivered to consumer. -func MessagingRocketmqMessageDeliveryTimestamp(val int) attribute.KeyValue { - return MessagingRocketmqMessageDeliveryTimestampKey.Int(val) -} - -// MessagingRocketmqMessageGroup returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.group" semantic conventions. It represents -// the it is essential for FIFO message. Messages that belong to the same -// message group are always processed one by one within the same consumer -// group. -func MessagingRocketmqMessageGroup(val string) attribute.KeyValue { - return MessagingRocketmqMessageGroupKey.String(val) -} - -// MessagingRocketmqMessageKeys returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.keys" semantic conventions. It represents -// the key(s) of message, another way to mark message besides message id. -func MessagingRocketmqMessageKeys(val ...string) attribute.KeyValue { - return MessagingRocketmqMessageKeysKey.StringSlice(val) -} - -// MessagingRocketmqMessageTag returns an attribute KeyValue conforming to -// the "messaging.rocketmq.message.tag" semantic conventions. It represents the -// secondary classifier of message besides topic. -func MessagingRocketmqMessageTag(val string) attribute.KeyValue { - return MessagingRocketmqMessageTagKey.String(val) -} - -// MessagingRocketmqNamespace returns an attribute KeyValue conforming to -// the "messaging.rocketmq.namespace" semantic conventions. It represents the -// namespace of RocketMQ resources, resources in different namespaces are -// individual. -func MessagingRocketmqNamespace(val string) attribute.KeyValue { - return MessagingRocketmqNamespaceKey.String(val) -} - -// This group describes attributes specific to GCP Pub/Sub. -const ( - // MessagingGCPPubsubMessageAckDeadlineKey is the attribute Key conforming - // to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. - // It represents the ack deadline in seconds set for the modify ack - // deadline request. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 10 - MessagingGCPPubsubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") - - // MessagingGCPPubsubMessageAckIDKey is the attribute Key conforming to the - // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It - // represents the ack id for a given message. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ack_id' - MessagingGCPPubsubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") - - // MessagingGCPPubsubMessageDeliveryAttemptKey is the attribute Key - // conforming to the "messaging.gcp_pubsub.message.delivery_attempt" - // semantic conventions. It represents the delivery attempt for a given - // message. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 2 - MessagingGCPPubsubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") - - // MessagingGCPPubsubMessageOrderingKeyKey is the attribute Key conforming - // to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. - // It represents the ordering key for a given message. If the attribute is - // not present, the message does not have an ordering key. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ordering_key' - MessagingGCPPubsubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") -) - -// MessagingGCPPubsubMessageAckDeadline returns an attribute KeyValue -// conforming to the "messaging.gcp_pubsub.message.ack_deadline" semantic -// conventions. It represents the ack deadline in seconds set for the modify -// ack deadline request. -func MessagingGCPPubsubMessageAckDeadline(val int) attribute.KeyValue { - return MessagingGCPPubsubMessageAckDeadlineKey.Int(val) -} - -// MessagingGCPPubsubMessageAckID returns an attribute KeyValue conforming -// to the "messaging.gcp_pubsub.message.ack_id" semantic conventions. It -// represents the ack id for a given message. -func MessagingGCPPubsubMessageAckID(val string) attribute.KeyValue { - return MessagingGCPPubsubMessageAckIDKey.String(val) -} - -// MessagingGCPPubsubMessageDeliveryAttempt returns an attribute KeyValue -// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic -// conventions. It represents the delivery attempt for a given message. -func MessagingGCPPubsubMessageDeliveryAttempt(val int) attribute.KeyValue { - return MessagingGCPPubsubMessageDeliveryAttemptKey.Int(val) -} - -// MessagingGCPPubsubMessageOrderingKey returns an attribute KeyValue -// conforming to the "messaging.gcp_pubsub.message.ordering_key" semantic -// conventions. It represents the ordering key for a given message. If the -// attribute is not present, the message does not have an ordering key. -func MessagingGCPPubsubMessageOrderingKey(val string) attribute.KeyValue { - return MessagingGCPPubsubMessageOrderingKeyKey.String(val) -} - -// This group describes attributes specific to Azure Service Bus. -const ( - // MessagingServicebusDestinationSubscriptionNameKey is the attribute Key - // conforming to the "messaging.servicebus.destination.subscription_name" - // semantic conventions. It represents the name of the subscription in the - // topic messages are received from. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'mySubscription' - MessagingServicebusDestinationSubscriptionNameKey = attribute.Key("messaging.servicebus.destination.subscription_name") - - // MessagingServicebusDispositionStatusKey is the attribute Key conforming - // to the "messaging.servicebus.disposition_status" semantic conventions. - // It represents the describes the [settlement - // type](https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock). - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - MessagingServicebusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") - - // MessagingServicebusMessageDeliveryCountKey is the attribute Key - // conforming to the "messaging.servicebus.message.delivery_count" semantic - // conventions. It represents the number of deliveries that have been - // attempted for this message. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 2 - MessagingServicebusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") - - // MessagingServicebusMessageEnqueuedTimeKey is the attribute Key - // conforming to the "messaging.servicebus.message.enqueued_time" semantic - // conventions. It represents the UTC epoch seconds at which the message - // has been accepted and stored in the entity. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1701393730 - MessagingServicebusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") -) - -var ( - // Message is completed - MessagingServicebusDispositionStatusComplete = MessagingServicebusDispositionStatusKey.String("complete") - // Message is abandoned - MessagingServicebusDispositionStatusAbandon = MessagingServicebusDispositionStatusKey.String("abandon") - // Message is sent to dead letter queue - MessagingServicebusDispositionStatusDeadLetter = MessagingServicebusDispositionStatusKey.String("dead_letter") - // Message is deferred - MessagingServicebusDispositionStatusDefer = MessagingServicebusDispositionStatusKey.String("defer") -) - -// MessagingServicebusDestinationSubscriptionName returns an attribute -// KeyValue conforming to the -// "messaging.servicebus.destination.subscription_name" semantic conventions. -// It represents the name of the subscription in the topic messages are -// received from. -func MessagingServicebusDestinationSubscriptionName(val string) attribute.KeyValue { - return MessagingServicebusDestinationSubscriptionNameKey.String(val) -} - -// MessagingServicebusMessageDeliveryCount returns an attribute KeyValue -// conforming to the "messaging.servicebus.message.delivery_count" semantic -// conventions. It represents the number of deliveries that have been attempted -// for this message. -func MessagingServicebusMessageDeliveryCount(val int) attribute.KeyValue { - return MessagingServicebusMessageDeliveryCountKey.Int(val) -} - -// MessagingServicebusMessageEnqueuedTime returns an attribute KeyValue -// conforming to the "messaging.servicebus.message.enqueued_time" semantic -// conventions. It represents the UTC epoch seconds at which the message has -// been accepted and stored in the entity. -func MessagingServicebusMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingServicebusMessageEnqueuedTimeKey.Int(val) -} - -// This group describes attributes specific to Azure Event Hubs. -const ( - // MessagingEventhubsConsumerGroupKey is the attribute Key conforming to - // the "messaging.eventhubs.consumer.group" semantic conventions. It - // represents the name of the consumer group the event consumer is - // associated with. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'indexer' - MessagingEventhubsConsumerGroupKey = attribute.Key("messaging.eventhubs.consumer.group") - - // MessagingEventhubsMessageEnqueuedTimeKey is the attribute Key conforming - // to the "messaging.eventhubs.message.enqueued_time" semantic conventions. - // It represents the UTC epoch seconds at which the message has been - // accepted and stored in the entity. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1701393730 - MessagingEventhubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") -) - -// MessagingEventhubsConsumerGroup returns an attribute KeyValue conforming -// to the "messaging.eventhubs.consumer.group" semantic conventions. It -// represents the name of the consumer group the event consumer is associated -// with. -func MessagingEventhubsConsumerGroup(val string) attribute.KeyValue { - return MessagingEventhubsConsumerGroupKey.String(val) -} - -// MessagingEventhubsMessageEnqueuedTime returns an attribute KeyValue -// conforming to the "messaging.eventhubs.message.enqueued_time" semantic -// conventions. It represents the UTC epoch seconds at which the message has -// been accepted and stored in the entity. -func MessagingEventhubsMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingEventhubsMessageEnqueuedTimeKey.Int(val) -} - -// These attributes may be used for any network related operation. -const ( - // NetworkCarrierIccKey is the attribute Key conforming to the - // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 - // alpha-2 2-character country code associated with the mobile carrier - // network. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'DE' - NetworkCarrierIccKey = attribute.Key("network.carrier.icc") - - // NetworkCarrierMccKey is the attribute Key conforming to the - // "network.carrier.mcc" semantic conventions. It represents the mobile - // carrier country code. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '310' - NetworkCarrierMccKey = attribute.Key("network.carrier.mcc") - - // NetworkCarrierMncKey is the attribute Key conforming to the - // "network.carrier.mnc" semantic conventions. It represents the mobile - // carrier network code. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '001' - NetworkCarrierMncKey = attribute.Key("network.carrier.mnc") - - // NetworkCarrierNameKey is the attribute Key conforming to the - // "network.carrier.name" semantic conventions. It represents the name of - // the mobile carrier. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'sprint' - NetworkCarrierNameKey = attribute.Key("network.carrier.name") - - // NetworkConnectionSubtypeKey is the attribute Key conforming to the - // "network.connection.subtype" semantic conventions. It represents the - // this describes more details regarding the connection.type. It may be the - // type of cell technology connection, but it could be used for describing - // details about a wifi connection. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'LTE' - NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") - - // NetworkConnectionTypeKey is the attribute Key conforming to the - // "network.connection.type" semantic conventions. It represents the - // internet connection type. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'wifi' - NetworkConnectionTypeKey = attribute.Key("network.connection.type") - - // NetworkIoDirectionKey is the attribute Key conforming to the - // "network.io.direction" semantic conventions. It represents the network - // IO operation direction. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'transmit' - NetworkIoDirectionKey = attribute.Key("network.io.direction") - - // NetworkLocalAddressKey is the attribute Key conforming to the - // "network.local.address" semantic conventions. It represents the local - // address of the network connection - IP address or Unix domain socket - // name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - NetworkLocalAddressKey = attribute.Key("network.local.address") - - // NetworkLocalPortKey is the attribute Key conforming to the - // "network.local.port" semantic conventions. It represents the local port - // number of the network connection. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 65123 - NetworkLocalPortKey = attribute.Key("network.local.port") - - // NetworkPeerAddressKey is the attribute Key conforming to the - // "network.peer.address" semantic conventions. It represents the peer - // address of the network connection - IP address or Unix domain socket - // name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '10.1.2.80', '/tmp/my.sock' - NetworkPeerAddressKey = attribute.Key("network.peer.address") - - // NetworkPeerPortKey is the attribute Key conforming to the - // "network.peer.port" semantic conventions. It represents the peer port - // number of the network connection. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 65123 - NetworkPeerPortKey = attribute.Key("network.peer.port") - - // NetworkProtocolNameKey is the attribute Key conforming to the - // "network.protocol.name" semantic conventions. It represents the [OSI - // application layer](https://osi-model.com/application-layer/) or non-OSI - // equivalent. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'amqp', 'http', 'mqtt' - // Note: The value SHOULD be normalized to lowercase. - NetworkProtocolNameKey = attribute.Key("network.protocol.name") - - // NetworkProtocolVersionKey is the attribute Key conforming to the - // "network.protocol.version" semantic conventions. It represents the - // actual version of the protocol used for network communication. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.1', '2' - // Note: If protocol version is subject to negotiation (for example using - // [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute - // SHOULD be set to the negotiated version. If the actual protocol version - // is not known, this attribute SHOULD NOT be set. - NetworkProtocolVersionKey = attribute.Key("network.protocol.version") - - // NetworkTransportKey is the attribute Key conforming to the - // "network.transport" semantic conventions. It represents the [OSI - // transport layer](https://osi-model.com/transport-layer/) or - // [inter-process communication - // method](https://wikipedia.org/wiki/Inter-process_communication). - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'tcp', 'udp' - // Note: The value SHOULD be normalized to lowercase. - // - // Consider always setting the transport when setting a port number, since - // a port number is ambiguous without knowing the transport. For example - // different processes could be listening on TCP port 12345 and UDP port - // 12345. - NetworkTransportKey = attribute.Key("network.transport") - - // NetworkTypeKey is the attribute Key conforming to the "network.type" - // semantic conventions. It represents the [OSI network - // layer](https://osi-model.com/network-layer/) or non-OSI equivalent. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'ipv4', 'ipv6' - // Note: The value SHOULD be normalized to lowercase. - NetworkTypeKey = attribute.Key("network.type") -) - -var ( - // GPRS - NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") - // EDGE - NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") - // UMTS - NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") - // CDMA - NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") - // EVDO Rel. 0 - NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") - // EVDO Rev. A - NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") - // CDMA2000 1XRTT - NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") - // HSDPA - NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") - // HSUPA - NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") - // HSPA - NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") - // IDEN - NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") - // EVDO Rev. B - NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") - // LTE - NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") - // EHRPD - NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") - // HSPAP - NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") - // GSM - NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") - // TD-SCDMA - NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") - // IWLAN - NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") - // 5G NR (New Radio) - NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") - // 5G NRNSA (New Radio Non-Standalone) - NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") - // LTE CA - NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") -) - -var ( - // wifi - NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") - // wired - NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") - // cell - NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") - // unavailable - NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") - // unknown - NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") -) - -var ( - // transmit - NetworkIoDirectionTransmit = NetworkIoDirectionKey.String("transmit") - // receive - NetworkIoDirectionReceive = NetworkIoDirectionKey.String("receive") -) - -var ( - // TCP - NetworkTransportTCP = NetworkTransportKey.String("tcp") - // UDP - NetworkTransportUDP = NetworkTransportKey.String("udp") - // Named or anonymous pipe - NetworkTransportPipe = NetworkTransportKey.String("pipe") - // Unix domain socket - NetworkTransportUnix = NetworkTransportKey.String("unix") -) - -var ( - // IPv4 - NetworkTypeIpv4 = NetworkTypeKey.String("ipv4") - // IPv6 - NetworkTypeIpv6 = NetworkTypeKey.String("ipv6") -) - -// NetworkCarrierIcc returns an attribute KeyValue conforming to the -// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 -// alpha-2 2-character country code associated with the mobile carrier network. -func NetworkCarrierIcc(val string) attribute.KeyValue { - return NetworkCarrierIccKey.String(val) -} - -// NetworkCarrierMcc returns an attribute KeyValue conforming to the -// "network.carrier.mcc" semantic conventions. It represents the mobile carrier -// country code. -func NetworkCarrierMcc(val string) attribute.KeyValue { - return NetworkCarrierMccKey.String(val) -} - -// NetworkCarrierMnc returns an attribute KeyValue conforming to the -// "network.carrier.mnc" semantic conventions. It represents the mobile carrier -// network code. -func NetworkCarrierMnc(val string) attribute.KeyValue { - return NetworkCarrierMncKey.String(val) -} - -// NetworkCarrierName returns an attribute KeyValue conforming to the -// "network.carrier.name" semantic conventions. It represents the name of the -// mobile carrier. -func NetworkCarrierName(val string) attribute.KeyValue { - return NetworkCarrierNameKey.String(val) -} - -// NetworkLocalAddress returns an attribute KeyValue conforming to the -// "network.local.address" semantic conventions. It represents the local -// address of the network connection - IP address or Unix domain socket name. -func NetworkLocalAddress(val string) attribute.KeyValue { - return NetworkLocalAddressKey.String(val) -} - -// NetworkLocalPort returns an attribute KeyValue conforming to the -// "network.local.port" semantic conventions. It represents the local port -// number of the network connection. -func NetworkLocalPort(val int) attribute.KeyValue { - return NetworkLocalPortKey.Int(val) -} - -// NetworkPeerAddress returns an attribute KeyValue conforming to the -// "network.peer.address" semantic conventions. It represents the peer address -// of the network connection - IP address or Unix domain socket name. -func NetworkPeerAddress(val string) attribute.KeyValue { - return NetworkPeerAddressKey.String(val) -} - -// NetworkPeerPort returns an attribute KeyValue conforming to the -// "network.peer.port" semantic conventions. It represents the peer port number -// of the network connection. -func NetworkPeerPort(val int) attribute.KeyValue { - return NetworkPeerPortKey.Int(val) -} - -// NetworkProtocolName returns an attribute KeyValue conforming to the -// "network.protocol.name" semantic conventions. It represents the [OSI -// application layer](https://osi-model.com/application-layer/) or non-OSI -// equivalent. -func NetworkProtocolName(val string) attribute.KeyValue { - return NetworkProtocolNameKey.String(val) -} - -// NetworkProtocolVersion returns an attribute KeyValue conforming to the -// "network.protocol.version" semantic conventions. It represents the actual -// version of the protocol used for network communication. -func NetworkProtocolVersion(val string) attribute.KeyValue { - return NetworkProtocolVersionKey.String(val) -} - -// An OCI image manifest. -const ( - // OciManifestDigestKey is the attribute Key conforming to the - // "oci.manifest.digest" semantic conventions. It represents the digest of - // the OCI image manifest. For container images specifically is the digest - // by which the container image is known. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // 'sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4' - // Note: Follows [OCI Image Manifest - // Specification](https://github.com/opencontainers/image-spec/blob/main/manifest.md), - // and specifically the [Digest - // property](https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests). - // An example can be found in [Example Image - // Manifest](https://docs.docker.com/registry/spec/manifest-v2-2/#example-image-manifest). - OciManifestDigestKey = attribute.Key("oci.manifest.digest") -) - -// OciManifestDigest returns an attribute KeyValue conforming to the -// "oci.manifest.digest" semantic conventions. It represents the digest of the -// OCI image manifest. For container images specifically is the digest by which -// the container image is known. -func OciManifestDigest(val string) attribute.KeyValue { - return OciManifestDigestKey.String(val) -} - -// Attributes used by the OpenTracing Shim layer. -const ( - // OpentracingRefTypeKey is the attribute Key conforming to the - // "opentracing.ref_type" semantic conventions. It represents the - // parent-child Reference type - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Note: The causal relationship between a child Span and a parent Span. - OpentracingRefTypeKey = attribute.Key("opentracing.ref_type") -) - -var ( - // The parent Span depends on the child Span in some capacity - OpentracingRefTypeChildOf = OpentracingRefTypeKey.String("child_of") - // The parent Span doesn't depend in any way on the result of the child Span - OpentracingRefTypeFollowsFrom = OpentracingRefTypeKey.String("follows_from") -) - -// The operating system (OS) on which the process represented by this resource -// is running. -const ( - // OSBuildIDKey is the attribute Key conforming to the "os.build_id" - // semantic conventions. It represents the unique identifier for a - // particular build or compilation of the operating system. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'TQ3C.230805.001.B2', '20E247', '22621' - OSBuildIDKey = attribute.Key("os.build_id") - - // OSDescriptionKey is the attribute Key conforming to the "os.description" - // semantic conventions. It represents the human readable (not intended to - // be parsed) OS version information, like e.g. reported by `ver` or - // `lsb_release -a` commands. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Microsoft Windows [Version 10.0.18363.778]', 'Ubuntu 18.04.1 - // LTS' - OSDescriptionKey = attribute.Key("os.description") - - // OSNameKey is the attribute Key conforming to the "os.name" semantic - // conventions. It represents the human readable operating system name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'iOS', 'Android', 'Ubuntu' - OSNameKey = attribute.Key("os.name") - - // OSTypeKey is the attribute Key conforming to the "os.type" semantic - // conventions. It represents the operating system type. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - OSTypeKey = attribute.Key("os.type") - - // OSVersionKey is the attribute Key conforming to the "os.version" - // semantic conventions. It represents the version string of the operating - // system as defined in [Version - // Attributes](/docs/resource/README.md#version-attributes). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '14.2.1', '18.04.1' - OSVersionKey = attribute.Key("os.version") -) - -var ( - // Microsoft Windows - OSTypeWindows = OSTypeKey.String("windows") - // Linux - OSTypeLinux = OSTypeKey.String("linux") - // Apple Darwin - OSTypeDarwin = OSTypeKey.String("darwin") - // FreeBSD - OSTypeFreeBSD = OSTypeKey.String("freebsd") - // NetBSD - OSTypeNetBSD = OSTypeKey.String("netbsd") - // OpenBSD - OSTypeOpenBSD = OSTypeKey.String("openbsd") - // DragonFly BSD - OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") - // HP-UX (Hewlett Packard Unix) - OSTypeHPUX = OSTypeKey.String("hpux") - // AIX (Advanced Interactive eXecutive) - OSTypeAIX = OSTypeKey.String("aix") - // SunOS, Oracle Solaris - OSTypeSolaris = OSTypeKey.String("solaris") - // IBM z/OS - OSTypeZOS = OSTypeKey.String("z_os") -) - -// OSBuildID returns an attribute KeyValue conforming to the "os.build_id" -// semantic conventions. It represents the unique identifier for a particular -// build or compilation of the operating system. -func OSBuildID(val string) attribute.KeyValue { - return OSBuildIDKey.String(val) -} - -// OSDescription returns an attribute KeyValue conforming to the -// "os.description" semantic conventions. It represents the human readable (not -// intended to be parsed) OS version information, like e.g. reported by `ver` -// or `lsb_release -a` commands. -func OSDescription(val string) attribute.KeyValue { - return OSDescriptionKey.String(val) -} - -// OSName returns an attribute KeyValue conforming to the "os.name" semantic -// conventions. It represents the human readable operating system name. -func OSName(val string) attribute.KeyValue { - return OSNameKey.String(val) -} - -// OSVersion returns an attribute KeyValue conforming to the "os.version" -// semantic conventions. It represents the version string of the operating -// system as defined in [Version -// Attributes](/docs/resource/README.md#version-attributes). -func OSVersion(val string) attribute.KeyValue { - return OSVersionKey.String(val) -} - -// Attributes reserved for OpenTelemetry -const ( - // OTelStatusCodeKey is the attribute Key conforming to the - // "otel.status_code" semantic conventions. It represents the name of the - // code, either "OK" or "ERROR". MUST NOT be set if the status code is - // UNSET. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - OTelStatusCodeKey = attribute.Key("otel.status_code") - - // OTelStatusDescriptionKey is the attribute Key conforming to the - // "otel.status_description" semantic conventions. It represents the - // description of the Status if it has a value, otherwise not set. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'resource not found' - OTelStatusDescriptionKey = attribute.Key("otel.status_description") -) - -var ( - // The operation has been validated by an Application developer or Operator to have completed successfully - OTelStatusCodeOk = OTelStatusCodeKey.String("OK") - // The operation contains an error - OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") -) - -// OTelStatusDescription returns an attribute KeyValue conforming to the -// "otel.status_description" semantic conventions. It represents the -// description of the Status if it has a value, otherwise not set. -func OTelStatusDescription(val string) attribute.KeyValue { - return OTelStatusDescriptionKey.String(val) -} - -// Attributes used by non-OTLP exporters to represent OpenTelemetry Scope's -// concepts. -const ( - // OTelScopeNameKey is the attribute Key conforming to the - // "otel.scope.name" semantic conventions. It represents the name of the - // instrumentation scope - (`InstrumentationScope.Name` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'io.opentelemetry.contrib.mongodb' - OTelScopeNameKey = attribute.Key("otel.scope.name") - - // OTelScopeVersionKey is the attribute Key conforming to the - // "otel.scope.version" semantic conventions. It represents the version of - // the instrumentation scope - (`InstrumentationScope.Version` in OTLP). - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '1.0.0' - OTelScopeVersionKey = attribute.Key("otel.scope.version") -) - -// OTelScopeName returns an attribute KeyValue conforming to the -// "otel.scope.name" semantic conventions. It represents the name of the -// instrumentation scope - (`InstrumentationScope.Name` in OTLP). -func OTelScopeName(val string) attribute.KeyValue { - return OTelScopeNameKey.String(val) -} - -// OTelScopeVersion returns an attribute KeyValue conforming to the -// "otel.scope.version" semantic conventions. It represents the version of the -// instrumentation scope - (`InstrumentationScope.Version` in OTLP). -func OTelScopeVersion(val string) attribute.KeyValue { - return OTelScopeVersionKey.String(val) -} - -// Operations that access some remote service. -const ( - // PeerServiceKey is the attribute Key conforming to the "peer.service" - // semantic conventions. It represents the - // [`service.name`](/docs/resource/README.md#service) of the remote - // service. SHOULD be equal to the actual `service.name` resource attribute - // of the remote service if any. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'AuthTokenCache' - PeerServiceKey = attribute.Key("peer.service") -) - -// PeerService returns an attribute KeyValue conforming to the -// "peer.service" semantic conventions. It represents the -// [`service.name`](/docs/resource/README.md#service) of the remote service. -// SHOULD be equal to the actual `service.name` resource attribute of the -// remote service if any. -func PeerService(val string) attribute.KeyValue { - return PeerServiceKey.String(val) -} - -// An operating system process. -const ( - // ProcessCommandKey is the attribute Key conforming to the - // "process.command" semantic conventions. It represents the command used - // to launch the process (i.e. the command name). On Linux based systems, - // can be set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can - // be set to the first parameter extracted from `GetCommandLineW`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'cmd/otelcol' - ProcessCommandKey = attribute.Key("process.command") - - // ProcessCommandArgsKey is the attribute Key conforming to the - // "process.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) as received - // by the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited - // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, - // this would be the full argv vector passed to `main`. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'cmd/otecol', '--config=config.yaml' - ProcessCommandArgsKey = attribute.Key("process.command_args") - - // ProcessCommandLineKey is the attribute Key conforming to the - // "process.command_line" semantic conventions. It represents the full - // command used to launch the process as a single string representing the - // full command. On Windows, can be set to the result of `GetCommandLineW`. - // Do not set this if you have to assemble it just for monitoring; use - // `process.command_args` instead. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'C:\\cmd\\otecol --config="my directory\\config.yaml"' - ProcessCommandLineKey = attribute.Key("process.command_line") - - // ProcessContextSwitchTypeKey is the attribute Key conforming to the - // "process.context_switch_type" semantic conventions. It represents the - // specifies whether the context switches for this data point were - // voluntary or involuntary. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type") - - // ProcessCreationTimeKey is the attribute Key conforming to the - // "process.creation.time" semantic conventions. It represents the date and - // time the process was created, in ISO 8601 format. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2023-11-21T09:25:34.853Z' - ProcessCreationTimeKey = attribute.Key("process.creation.time") - - // ProcessExecutableNameKey is the attribute Key conforming to the - // "process.executable.name" semantic conventions. It represents the name - // of the process executable. On Linux based systems, can be set to the - // `Name` in `proc/[pid]/status`. On Windows, can be set to the base name - // of `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'otelcol' - ProcessExecutableNameKey = attribute.Key("process.executable.name") - - // ProcessExecutablePathKey is the attribute Key conforming to the - // "process.executable.path" semantic conventions. It represents the full - // path to the process executable. On Linux based systems, can be set to - // the target of `proc/[pid]/exe`. On Windows, can be set to the result of - // `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/usr/bin/cmd/otelcol' - ProcessExecutablePathKey = attribute.Key("process.executable.path") - - // ProcessExitCodeKey is the attribute Key conforming to the - // "process.exit.code" semantic conventions. It represents the exit code of - // the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 127 - ProcessExitCodeKey = attribute.Key("process.exit.code") - - // ProcessExitTimeKey is the attribute Key conforming to the - // "process.exit.time" semantic conventions. It represents the date and - // time the process exited, in ISO 8601 format. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2023-11-21T09:26:12.315Z' - ProcessExitTimeKey = attribute.Key("process.exit.time") - - // ProcessGroupLeaderPIDKey is the attribute Key conforming to the - // "process.group_leader.pid" semantic conventions. It represents the PID - // of the process's group leader. This is also the process group ID (PGID) - // of the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 23 - ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid") - - // ProcessInteractiveKey is the attribute Key conforming to the - // "process.interactive" semantic conventions. It represents the whether - // the process is connected to an interactive shell. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - ProcessInteractiveKey = attribute.Key("process.interactive") - - // ProcessOwnerKey is the attribute Key conforming to the "process.owner" - // semantic conventions. It represents the username of the user that owns - // the process. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'root' - ProcessOwnerKey = attribute.Key("process.owner") - - // ProcessPagingFaultTypeKey is the attribute Key conforming to the - // "process.paging.fault_type" semantic conventions. It represents the type - // of page fault for this data point. Type `major` is for major/hard page - // faults, and `minor` is for minor/soft page faults. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type") - - // ProcessParentPIDKey is the attribute Key conforming to the - // "process.parent_pid" semantic conventions. It represents the parent - // Process identifier (PPID). - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 111 - ProcessParentPIDKey = attribute.Key("process.parent_pid") - - // ProcessPIDKey is the attribute Key conforming to the "process.pid" - // semantic conventions. It represents the process identifier (PID). - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1234 - ProcessPIDKey = attribute.Key("process.pid") - - // ProcessRealUserIDKey is the attribute Key conforming to the - // "process.real_user.id" semantic conventions. It represents the real user - // ID (RUID) of the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1000 - ProcessRealUserIDKey = attribute.Key("process.real_user.id") - - // ProcessRealUserNameKey is the attribute Key conforming to the - // "process.real_user.name" semantic conventions. It represents the - // username of the real user of the process. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'operator' - ProcessRealUserNameKey = attribute.Key("process.real_user.name") - - // ProcessRuntimeDescriptionKey is the attribute Key conforming to the - // "process.runtime.description" semantic conventions. It represents an - // additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0' - ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") - - // ProcessRuntimeNameKey is the attribute Key conforming to the - // "process.runtime.name" semantic conventions. It represents the name of - // the runtime of this process. For compiled native binaries, this SHOULD - // be the name of the compiler. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'OpenJDK Runtime Environment' - ProcessRuntimeNameKey = attribute.Key("process.runtime.name") - - // ProcessRuntimeVersionKey is the attribute Key conforming to the - // "process.runtime.version" semantic conventions. It represents the - // version of the runtime of this process, as returned by the runtime - // without modification. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '14.0.2' - ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") - - // ProcessSavedUserIDKey is the attribute Key conforming to the - // "process.saved_user.id" semantic conventions. It represents the saved - // user ID (SUID) of the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1002 - ProcessSavedUserIDKey = attribute.Key("process.saved_user.id") - - // ProcessSavedUserNameKey is the attribute Key conforming to the - // "process.saved_user.name" semantic conventions. It represents the - // username of the saved user. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'operator' - ProcessSavedUserNameKey = attribute.Key("process.saved_user.name") - - // ProcessSessionLeaderPIDKey is the attribute Key conforming to the - // "process.session_leader.pid" semantic conventions. It represents the PID - // of the process's session leader. This is also the session ID (SID) of - // the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 14 - ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid") - - // ProcessUserIDKey is the attribute Key conforming to the - // "process.user.id" semantic conventions. It represents the effective user - // ID (EUID) of the process. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1001 - ProcessUserIDKey = attribute.Key("process.user.id") - - // ProcessUserNameKey is the attribute Key conforming to the - // "process.user.name" semantic conventions. It represents the username of - // the effective user of the process. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'root' - ProcessUserNameKey = attribute.Key("process.user.name") - - // ProcessVpidKey is the attribute Key conforming to the "process.vpid" - // semantic conventions. It represents the virtual process identifier. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 12 - // Note: The process ID within a PID namespace. This is not necessarily - // unique across all processes on the host but it is unique within the - // process namespace that the process exists within. - ProcessVpidKey = attribute.Key("process.vpid") -) - -var ( - // voluntary - ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary") - // involuntary - ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary") -) - -var ( - // major - ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major") - // minor - ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor") -) - -// ProcessCommand returns an attribute KeyValue conforming to the -// "process.command" semantic conventions. It represents the command used to -// launch the process (i.e. the command name). On Linux based systems, can be -// set to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to -// the first parameter extracted from `GetCommandLineW`. -func ProcessCommand(val string) attribute.KeyValue { - return ProcessCommandKey.String(val) -} - -// ProcessCommandArgs returns an attribute KeyValue conforming to the -// "process.command_args" semantic conventions. It represents the all the -// command arguments (including the command/executable itself) as received by -// the process. On Linux-based systems (and some other Unixoid systems -// supporting procfs), can be set according to the list of null-delimited -// strings extracted from `proc/[pid]/cmdline`. For libc-based executables, -// this would be the full argv vector passed to `main`. -func ProcessCommandArgs(val ...string) attribute.KeyValue { - return ProcessCommandArgsKey.StringSlice(val) -} - -// ProcessCommandLine returns an attribute KeyValue conforming to the -// "process.command_line" semantic conventions. It represents the full command -// used to launch the process as a single string representing the full command. -// On Windows, can be set to the result of `GetCommandLineW`. Do not set this -// if you have to assemble it just for monitoring; use `process.command_args` -// instead. -func ProcessCommandLine(val string) attribute.KeyValue { - return ProcessCommandLineKey.String(val) -} - -// ProcessCreationTime returns an attribute KeyValue conforming to the -// "process.creation.time" semantic conventions. It represents the date and -// time the process was created, in ISO 8601 format. -func ProcessCreationTime(val string) attribute.KeyValue { - return ProcessCreationTimeKey.String(val) -} - -// ProcessExecutableName returns an attribute KeyValue conforming to the -// "process.executable.name" semantic conventions. It represents the name of -// the process executable. On Linux based systems, can be set to the `Name` in -// `proc/[pid]/status`. On Windows, can be set to the base name of -// `GetProcessImageFileNameW`. -func ProcessExecutableName(val string) attribute.KeyValue { - return ProcessExecutableNameKey.String(val) -} - -// ProcessExecutablePath returns an attribute KeyValue conforming to the -// "process.executable.path" semantic conventions. It represents the full path -// to the process executable. On Linux based systems, can be set to the target -// of `proc/[pid]/exe`. On Windows, can be set to the result of -// `GetProcessImageFileNameW`. -func ProcessExecutablePath(val string) attribute.KeyValue { - return ProcessExecutablePathKey.String(val) -} - -// ProcessExitCode returns an attribute KeyValue conforming to the -// "process.exit.code" semantic conventions. It represents the exit code of the -// process. -func ProcessExitCode(val int) attribute.KeyValue { - return ProcessExitCodeKey.Int(val) -} - -// ProcessExitTime returns an attribute KeyValue conforming to the -// "process.exit.time" semantic conventions. It represents the date and time -// the process exited, in ISO 8601 format. -func ProcessExitTime(val string) attribute.KeyValue { - return ProcessExitTimeKey.String(val) -} - -// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the -// "process.group_leader.pid" semantic conventions. It represents the PID of -// the process's group leader. This is also the process group ID (PGID) of the -// process. -func ProcessGroupLeaderPID(val int) attribute.KeyValue { - return ProcessGroupLeaderPIDKey.Int(val) -} - -// ProcessInteractive returns an attribute KeyValue conforming to the -// "process.interactive" semantic conventions. It represents the whether the -// process is connected to an interactive shell. -func ProcessInteractive(val bool) attribute.KeyValue { - return ProcessInteractiveKey.Bool(val) -} - -// ProcessOwner returns an attribute KeyValue conforming to the -// "process.owner" semantic conventions. It represents the username of the user -// that owns the process. -func ProcessOwner(val string) attribute.KeyValue { - return ProcessOwnerKey.String(val) -} - -// ProcessParentPID returns an attribute KeyValue conforming to the -// "process.parent_pid" semantic conventions. It represents the parent Process -// identifier (PPID). -func ProcessParentPID(val int) attribute.KeyValue { - return ProcessParentPIDKey.Int(val) -} - -// ProcessPID returns an attribute KeyValue conforming to the "process.pid" -// semantic conventions. It represents the process identifier (PID). -func ProcessPID(val int) attribute.KeyValue { - return ProcessPIDKey.Int(val) -} - -// ProcessRealUserID returns an attribute KeyValue conforming to the -// "process.real_user.id" semantic conventions. It represents the real user ID -// (RUID) of the process. -func ProcessRealUserID(val int) attribute.KeyValue { - return ProcessRealUserIDKey.Int(val) -} - -// ProcessRealUserName returns an attribute KeyValue conforming to the -// "process.real_user.name" semantic conventions. It represents the username of -// the real user of the process. -func ProcessRealUserName(val string) attribute.KeyValue { - return ProcessRealUserNameKey.String(val) -} - -// ProcessRuntimeDescription returns an attribute KeyValue conforming to the -// "process.runtime.description" semantic conventions. It represents an -// additional description about the runtime of the process, for example a -// specific vendor customization of the runtime environment. -func ProcessRuntimeDescription(val string) attribute.KeyValue { - return ProcessRuntimeDescriptionKey.String(val) -} - -// ProcessRuntimeName returns an attribute KeyValue conforming to the -// "process.runtime.name" semantic conventions. It represents the name of the -// runtime of this process. For compiled native binaries, this SHOULD be the -// name of the compiler. -func ProcessRuntimeName(val string) attribute.KeyValue { - return ProcessRuntimeNameKey.String(val) -} - -// ProcessRuntimeVersion returns an attribute KeyValue conforming to the -// "process.runtime.version" semantic conventions. It represents the version of -// the runtime of this process, as returned by the runtime without -// modification. -func ProcessRuntimeVersion(val string) attribute.KeyValue { - return ProcessRuntimeVersionKey.String(val) -} - -// ProcessSavedUserID returns an attribute KeyValue conforming to the -// "process.saved_user.id" semantic conventions. It represents the saved user -// ID (SUID) of the process. -func ProcessSavedUserID(val int) attribute.KeyValue { - return ProcessSavedUserIDKey.Int(val) -} - -// ProcessSavedUserName returns an attribute KeyValue conforming to the -// "process.saved_user.name" semantic conventions. It represents the username -// of the saved user. -func ProcessSavedUserName(val string) attribute.KeyValue { - return ProcessSavedUserNameKey.String(val) -} - -// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the -// "process.session_leader.pid" semantic conventions. It represents the PID of -// the process's session leader. This is also the session ID (SID) of the -// process. -func ProcessSessionLeaderPID(val int) attribute.KeyValue { - return ProcessSessionLeaderPIDKey.Int(val) -} - -// ProcessUserID returns an attribute KeyValue conforming to the -// "process.user.id" semantic conventions. It represents the effective user ID -// (EUID) of the process. -func ProcessUserID(val int) attribute.KeyValue { - return ProcessUserIDKey.Int(val) -} - -// ProcessUserName returns an attribute KeyValue conforming to the -// "process.user.name" semantic conventions. It represents the username of the -// effective user of the process. -func ProcessUserName(val string) attribute.KeyValue { - return ProcessUserNameKey.String(val) -} - -// ProcessVpid returns an attribute KeyValue conforming to the -// "process.vpid" semantic conventions. It represents the virtual process -// identifier. -func ProcessVpid(val int) attribute.KeyValue { - return ProcessVpidKey.Int(val) -} - -// Attributes for process CPU -const ( - // ProcessCPUStateKey is the attribute Key conforming to the - // "process.cpu.state" semantic conventions. It represents the CPU state of - // the process. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - ProcessCPUStateKey = attribute.Key("process.cpu.state") -) - -var ( - // system - ProcessCPUStateSystem = ProcessCPUStateKey.String("system") - // user - ProcessCPUStateUser = ProcessCPUStateKey.String("user") - // wait - ProcessCPUStateWait = ProcessCPUStateKey.String("wait") -) - -// Attributes for remote procedure calls. -const ( - // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the - // "rpc.connect_rpc.error_code" semantic conventions. It represents the - // [error codes](https://connect.build/docs/protocol/#error-codes) of the - // Connect request. Error codes are always string values. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") - - // RPCGRPCStatusCodeKey is the attribute Key conforming to the - // "rpc.grpc.status_code" semantic conventions. It represents the [numeric - // status - // code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of - // the gRPC request. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") - - // RPCJsonrpcErrorCodeKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_code" semantic conventions. It represents the - // `error.code` property of response if it is an error response. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: -32700, 100 - RPCJsonrpcErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") - - // RPCJsonrpcErrorMessageKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_message" semantic conventions. It represents the - // `error.message` property of response if it is an error response. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Parse error', 'User already exists' - RPCJsonrpcErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") - - // RPCJsonrpcRequestIDKey is the attribute Key conforming to the - // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` - // property of request or response. Since protocol allows id to be int, - // string, `null` or missing (for notifications), value is expected to be - // cast to string for simplicity. Use empty string in case of `null` value. - // Omit entirely if this is a notification. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '10', 'request-7', '' - RPCJsonrpcRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") - - // RPCJsonrpcVersionKey is the attribute Key conforming to the - // "rpc.jsonrpc.version" semantic conventions. It represents the protocol - // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 - // doesn't specify this, the value can be omitted. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2.0', '1.0' - RPCJsonrpcVersionKey = attribute.Key("rpc.jsonrpc.version") - - // RPCMessageCompressedSizeKey is the attribute Key conforming to the - // "rpc.message.compressed_size" semantic conventions. It represents the - // compressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") - - // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" - // semantic conventions. It represents the mUST be calculated as two - // different counters starting from `1` one for sent messages and one for - // received message. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Note: This way we guarantee that the values will be consistent between - // different implementations. - RPCMessageIDKey = attribute.Key("rpc.message.id") - - // RPCMessageTypeKey is the attribute Key conforming to the - // "rpc.message.type" semantic conventions. It represents the whether this - // is a received or sent message. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - RPCMessageTypeKey = attribute.Key("rpc.message.type") - - // RPCMessageUncompressedSizeKey is the attribute Key conforming to the - // "rpc.message.uncompressed_size" semantic conventions. It represents the - // uncompressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size") - - // RPCMethodKey is the attribute Key conforming to the "rpc.method" - // semantic conventions. It represents the name of the (logical) method - // being called, must be equal to the $method part in the span name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'exampleMethod' - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The `code.function` attribute may be used to store the - // latter (e.g., method actually executing the call on the server side, RPC - // client stub method on the client side). - RPCMethodKey = attribute.Key("rpc.method") - - // RPCServiceKey is the attribute Key conforming to the "rpc.service" - // semantic conventions. It represents the full (logical) name of the - // service being called, including its package name, if applicable. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'myservice.EchoService' - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing - // class. The `code.namespace` attribute may be used to store the latter - // (despite the attribute name, it may include a class name; e.g., class - // with method actually executing the call on the server side, RPC client - // stub class on the client side). - RPCServiceKey = attribute.Key("rpc.service") - - // RPCSystemKey is the attribute Key conforming to the "rpc.system" - // semantic conventions. It represents a string identifying the remoting - // system. See below for a list of well-known identifiers. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - RPCSystemKey = attribute.Key("rpc.system") -) - -var ( - // cancelled - RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") - // unknown - RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") - // invalid_argument - RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") - // deadline_exceeded - RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") - // not_found - RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") - // already_exists - RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") - // permission_denied - RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") - // resource_exhausted - RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") - // failed_precondition - RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") - // aborted - RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") - // out_of_range - RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") - // unimplemented - RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") - // internal - RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") - // unavailable - RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") - // data_loss - RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") - // unauthenticated - RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") -) - -var ( - // OK - RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) - // CANCELLED - RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) - // UNKNOWN - RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) - // INVALID_ARGUMENT - RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) - // DEADLINE_EXCEEDED - RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) - // NOT_FOUND - RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) - // ALREADY_EXISTS - RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) - // PERMISSION_DENIED - RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) - // RESOURCE_EXHAUSTED - RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) - // FAILED_PRECONDITION - RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) - // ABORTED - RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) - // OUT_OF_RANGE - RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) - // UNIMPLEMENTED - RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) - // INTERNAL - RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) - // UNAVAILABLE - RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) - // DATA_LOSS - RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) - // UNAUTHENTICATED - RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) -) - -var ( - // sent - RPCMessageTypeSent = RPCMessageTypeKey.String("SENT") - // received - RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") -) - -var ( - // gRPC - RPCSystemGRPC = RPCSystemKey.String("grpc") - // Java RMI - RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") - // .NET WCF - RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") - // Apache Dubbo - RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") - // Connect RPC - RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") -) - -// RPCJsonrpcErrorCode returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_code" semantic conventions. It represents the -// `error.code` property of response if it is an error response. -func RPCJsonrpcErrorCode(val int) attribute.KeyValue { - return RPCJsonrpcErrorCodeKey.Int(val) -} - -// RPCJsonrpcErrorMessage returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_message" semantic conventions. It represents the -// `error.message` property of response if it is an error response. -func RPCJsonrpcErrorMessage(val string) attribute.KeyValue { - return RPCJsonrpcErrorMessageKey.String(val) -} - -// RPCJsonrpcRequestID returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` -// property of request or response. Since protocol allows id to be int, string, -// `null` or missing (for notifications), value is expected to be cast to -// string for simplicity. Use empty string in case of `null` value. Omit -// entirely if this is a notification. -func RPCJsonrpcRequestID(val string) attribute.KeyValue { - return RPCJsonrpcRequestIDKey.String(val) -} - -// RPCJsonrpcVersion returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.version" semantic conventions. It represents the protocol -// version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 -// doesn't specify this, the value can be omitted. -func RPCJsonrpcVersion(val string) attribute.KeyValue { - return RPCJsonrpcVersionKey.String(val) -} - -// RPCMessageCompressedSize returns an attribute KeyValue conforming to the -// "rpc.message.compressed_size" semantic conventions. It represents the -// compressed size of the message in bytes. -func RPCMessageCompressedSize(val int) attribute.KeyValue { - return RPCMessageCompressedSizeKey.Int(val) -} - -// RPCMessageID returns an attribute KeyValue conforming to the -// "rpc.message.id" semantic conventions. It represents the mUST be calculated -// as two different counters starting from `1` one for sent messages and one -// for received message. -func RPCMessageID(val int) attribute.KeyValue { - return RPCMessageIDKey.Int(val) -} - -// RPCMessageUncompressedSize returns an attribute KeyValue conforming to -// the "rpc.message.uncompressed_size" semantic conventions. It represents the -// uncompressed size of the message in bytes. -func RPCMessageUncompressedSize(val int) attribute.KeyValue { - return RPCMessageUncompressedSizeKey.Int(val) -} - -// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" -// semantic conventions. It represents the name of the (logical) method being -// called, must be equal to the $method part in the span name. -func RPCMethod(val string) attribute.KeyValue { - return RPCMethodKey.String(val) -} - -// RPCService returns an attribute KeyValue conforming to the "rpc.service" -// semantic conventions. It represents the full (logical) name of the service -// being called, including its package name, if applicable. -func RPCService(val string) attribute.KeyValue { - return RPCServiceKey.String(val) -} - -// These attributes may be used to describe the server in a connection-based -// network interaction where there is one side that initiates the connection -// (the client is the side that initiates the connection). This covers all TCP -// network interactions since TCP is connection-based and one side initiates -// the connection (an exception is made for peer-to-peer communication over TCP -// where the "user-facing" surface of the protocol / API doesn't expose a clear -// notion of client and server). This also covers UDP network interactions -// where one side initiates the interaction, e.g. QUIC (HTTP/3) and DNS. -const ( - // ServerAddressKey is the attribute Key conforming to the "server.address" - // semantic conventions. It represents the server domain name if available - // without reverse DNS lookup; otherwise, IP address or Unix domain socket - // name. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the client side, and when communicating through - // an intermediary, `server.address` SHOULD represent the server address - // behind any intermediaries, for example proxies, if it's available. - ServerAddressKey = attribute.Key("server.address") - - // ServerPortKey is the attribute Key conforming to the "server.port" - // semantic conventions. It represents the server port number. - // - // Type: int - // RequirementLevel: Optional - // Stability: stable - // Examples: 80, 8080, 443 - // Note: When observed from the client side, and when communicating through - // an intermediary, `server.port` SHOULD represent the server port behind - // any intermediaries, for example proxies, if it's available. - ServerPortKey = attribute.Key("server.port") -) - -// ServerAddress returns an attribute KeyValue conforming to the -// "server.address" semantic conventions. It represents the server domain name -// if available without reverse DNS lookup; otherwise, IP address or Unix -// domain socket name. -func ServerAddress(val string) attribute.KeyValue { - return ServerAddressKey.String(val) -} - -// ServerPort returns an attribute KeyValue conforming to the "server.port" -// semantic conventions. It represents the server port number. -func ServerPort(val int) attribute.KeyValue { - return ServerPortKey.Int(val) -} - -// A service instance. -const ( - // ServiceInstanceIDKey is the attribute Key conforming to the - // "service.instance.id" semantic conventions. It represents the string ID - // of the service instance. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '627cc493-f310-47de-96bd-71410b7dec09' - // Note: MUST be unique for each instance of the same - // `service.namespace,service.name` pair (in other words - // `service.namespace,service.name,service.instance.id` triplet MUST be - // globally unique). The ID helps to - // distinguish instances of the same service that exist at the same time - // (e.g. instances of a horizontally scaled - // service). - // - // Implementations, such as SDKs, are recommended to generate a random - // Version 1 or Version 4 [RFC - // 4122](https://www.ietf.org/rfc/rfc4122.txt) UUID, but are free to use an - // inherent unique ID as the source of - // this value if stability is desirable. In that case, the ID SHOULD be - // used as source of a UUID Version 5 and - // SHOULD use the following UUID as the namespace: - // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. - // - // UUIDs are typically recommended, as only an opaque value for the - // purposes of identifying a service instance is - // needed. Similar to what can be seen in the man page for the - // [`/etc/machine-id`](https://www.freedesktop.org/software/systemd/man/machine-id.html) - // file, the underlying - // data, such as pod name and namespace should be treated as confidential, - // being the user's choice to expose it - // or not via another resource attribute. - // - // For applications running behind an application server (like unicorn), we - // do not recommend using one identifier - // for all processes participating in the application. Instead, it's - // recommended each division (e.g. a worker - // thread in unicorn) to have its own instance.id. - // - // It's not recommended for a Collector to set `service.instance.id` if it - // can't unambiguously determine the - // service instance that is generating that telemetry. For instance, - // creating an UUID based on `pod.name` will - // likely be wrong, as the Collector might not know from which container - // within that pod the telemetry originated. - // However, Collectors can set the `service.instance.id` if they can - // unambiguously determine the service instance - // for that telemetry. This is typically the case for scraping receivers, - // as they know the target address and - // port. - ServiceInstanceIDKey = attribute.Key("service.instance.id") - - // ServiceNameKey is the attribute Key conforming to the "service.name" - // semantic conventions. It represents the logical name of the service. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'shoppingcart' - // Note: MUST be the same for all instances of horizontally scaled - // services. If the value was not specified, SDKs MUST fallback to - // `unknown_service:` concatenated with - // [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If - // `process.executable.name` is not available, the value MUST be set to - // `unknown_service`. - ServiceNameKey = attribute.Key("service.name") - - // ServiceNamespaceKey is the attribute Key conforming to the - // "service.namespace" semantic conventions. It represents a namespace for - // `service.name`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Shop' - // Note: A string value having a meaning that helps to distinguish a group - // of services, for example the team name that owns a group of services. - // `service.name` is expected to be unique within the same namespace. If - // `service.namespace` is not specified in the Resource then `service.name` - // is expected to be unique for all services that have no explicit - // namespace defined (so the empty/unspecified namespace is simply one more - // valid namespace). Zero-length namespace string is assumed equal to - // unspecified namespace. - ServiceNamespaceKey = attribute.Key("service.namespace") - - // ServiceVersionKey is the attribute Key conforming to the - // "service.version" semantic conventions. It represents the version string - // of the service API or implementation. The format is not defined by these - // conventions. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '2.0.0', 'a01dbef8a' - ServiceVersionKey = attribute.Key("service.version") -) - -// ServiceInstanceID returns an attribute KeyValue conforming to the -// "service.instance.id" semantic conventions. It represents the string ID of -// the service instance. -func ServiceInstanceID(val string) attribute.KeyValue { - return ServiceInstanceIDKey.String(val) -} - -// ServiceName returns an attribute KeyValue conforming to the -// "service.name" semantic conventions. It represents the logical name of the -// service. -func ServiceName(val string) attribute.KeyValue { - return ServiceNameKey.String(val) -} - -// ServiceNamespace returns an attribute KeyValue conforming to the -// "service.namespace" semantic conventions. It represents a namespace for -// `service.name`. -func ServiceNamespace(val string) attribute.KeyValue { - return ServiceNamespaceKey.String(val) -} - -// ServiceVersion returns an attribute KeyValue conforming to the -// "service.version" semantic conventions. It represents the version string of -// the service API or implementation. The format is not defined by these -// conventions. -func ServiceVersion(val string) attribute.KeyValue { - return ServiceVersionKey.String(val) -} - -// Session is defined as the period of time encompassing all activities -// performed by the application and the actions executed by the end user. -// Consequently, a Session is represented as a collection of Logs, Events, and -// Spans emitted by the Client Application throughout the Session's duration. -// Each Session is assigned a unique identifier, which is included as an -// attribute in the Logs, Events, and Spans generated during the Session's -// lifecycle. -// When a session reaches end of life, typically due to user inactivity or -// session timeout, a new session identifier will be assigned. The previous -// session identifier may be provided by the instrumentation so that telemetry -// backends can link the two sessions. -const ( - // SessionIDKey is the attribute Key conforming to the "session.id" - // semantic conventions. It represents a unique id to identify a session. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - SessionIDKey = attribute.Key("session.id") - - // SessionPreviousIDKey is the attribute Key conforming to the - // "session.previous_id" semantic conventions. It represents the previous - // `session.id` for this user, when known. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '00112233-4455-6677-8899-aabbccddeeff' - SessionPreviousIDKey = attribute.Key("session.previous_id") -) - -// SessionID returns an attribute KeyValue conforming to the "session.id" -// semantic conventions. It represents a unique id to identify a session. -func SessionID(val string) attribute.KeyValue { - return SessionIDKey.String(val) -} - -// SessionPreviousID returns an attribute KeyValue conforming to the -// "session.previous_id" semantic conventions. It represents the previous -// `session.id` for this user, when known. -func SessionPreviousID(val string) attribute.KeyValue { - return SessionPreviousIDKey.String(val) -} - -// SignalR attributes -const ( - // SignalrConnectionStatusKey is the attribute Key conforming to the - // "signalr.connection.status" semantic conventions. It represents the - // signalR HTTP connection closure status. - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'app_shutdown', 'timeout' - SignalrConnectionStatusKey = attribute.Key("signalr.connection.status") - - // SignalrTransportKey is the attribute Key conforming to the - // "signalr.transport" semantic conventions. It represents the [SignalR - // transport - // type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md) - // - // Type: Enum - // RequirementLevel: Optional - // Stability: stable - // Examples: 'web_sockets', 'long_polling' - SignalrTransportKey = attribute.Key("signalr.transport") -) - -var ( - // The connection was closed normally - SignalrConnectionStatusNormalClosure = SignalrConnectionStatusKey.String("normal_closure") - // The connection was closed due to a timeout - SignalrConnectionStatusTimeout = SignalrConnectionStatusKey.String("timeout") - // The connection was closed because the app is shutting down - SignalrConnectionStatusAppShutdown = SignalrConnectionStatusKey.String("app_shutdown") -) - -var ( - // ServerSentEvents protocol - SignalrTransportServerSentEvents = SignalrTransportKey.String("server_sent_events") - // LongPolling protocol - SignalrTransportLongPolling = SignalrTransportKey.String("long_polling") - // WebSockets protocol - SignalrTransportWebSockets = SignalrTransportKey.String("web_sockets") -) - -// These attributes may be used to describe the sender of a network -// exchange/packet. These should be used when there is no client/server -// relationship between the two sides, or when that relationship is unknown. -// This covers low-level network interactions (e.g. packet tracing) where you -// don't know if there was a connection or which side initiated it. This also -// covers unidirectional UDP flows and peer-to-peer communication where the -// "user-facing" surface of the protocol / API doesn't expose a clear notion of -// client and server. -const ( - // SourceAddressKey is the attribute Key conforming to the "source.address" - // semantic conventions. It represents the source address - domain name if - // available without reverse DNS lookup; otherwise, IP address or Unix - // domain socket name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'source.example.com', '10.1.2.80', '/tmp/my.sock' - // Note: When observed from the destination side, and when communicating - // through an intermediary, `source.address` SHOULD represent the source - // address behind any intermediaries, for example proxies, if it's - // available. - SourceAddressKey = attribute.Key("source.address") - - // SourcePortKey is the attribute Key conforming to the "source.port" - // semantic conventions. It represents the source port number - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 3389, 2888 - SourcePortKey = attribute.Key("source.port") -) - -// SourceAddress returns an attribute KeyValue conforming to the -// "source.address" semantic conventions. It represents the source address - -// domain name if available without reverse DNS lookup; otherwise, IP address -// or Unix domain socket name. -func SourceAddress(val string) attribute.KeyValue { - return SourceAddressKey.String(val) -} - -// SourcePort returns an attribute KeyValue conforming to the "source.port" -// semantic conventions. It represents the source port number -func SourcePort(val int) attribute.KeyValue { - return SourcePortKey.Int(val) -} - -// Describes System attributes -const ( - // SystemDeviceKey is the attribute Key conforming to the "system.device" - // semantic conventions. It represents the device identifier - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '(identifier)' - SystemDeviceKey = attribute.Key("system.device") -) - -// SystemDevice returns an attribute KeyValue conforming to the -// "system.device" semantic conventions. It represents the device identifier -func SystemDevice(val string) attribute.KeyValue { - return SystemDeviceKey.String(val) -} - -// Describes System CPU attributes -const ( - // SystemCPULogicalNumberKey is the attribute Key conforming to the - // "system.cpu.logical_number" semantic conventions. It represents the - // logical CPU number [0..n-1] - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 1 - SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") - - // SystemCPUStateKey is the attribute Key conforming to the - // "system.cpu.state" semantic conventions. It represents the state of the - // CPU - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'idle', 'interrupt' - SystemCPUStateKey = attribute.Key("system.cpu.state") -) - -var ( - // user - SystemCPUStateUser = SystemCPUStateKey.String("user") - // system - SystemCPUStateSystem = SystemCPUStateKey.String("system") - // nice - SystemCPUStateNice = SystemCPUStateKey.String("nice") - // idle - SystemCPUStateIdle = SystemCPUStateKey.String("idle") - // iowait - SystemCPUStateIowait = SystemCPUStateKey.String("iowait") - // interrupt - SystemCPUStateInterrupt = SystemCPUStateKey.String("interrupt") - // steal - SystemCPUStateSteal = SystemCPUStateKey.String("steal") -) - -// SystemCPULogicalNumber returns an attribute KeyValue conforming to the -// "system.cpu.logical_number" semantic conventions. It represents the logical -// CPU number [0..n-1] -func SystemCPULogicalNumber(val int) attribute.KeyValue { - return SystemCPULogicalNumberKey.Int(val) -} - -// Describes System Memory attributes -const ( - // SystemMemoryStateKey is the attribute Key conforming to the - // "system.memory.state" semantic conventions. It represents the memory - // state - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'free', 'cached' - SystemMemoryStateKey = attribute.Key("system.memory.state") -) - -var ( - // used - SystemMemoryStateUsed = SystemMemoryStateKey.String("used") - // free - SystemMemoryStateFree = SystemMemoryStateKey.String("free") - // shared - SystemMemoryStateShared = SystemMemoryStateKey.String("shared") - // buffers - SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") - // cached - SystemMemoryStateCached = SystemMemoryStateKey.String("cached") -) - -// Describes System Memory Paging attributes -const ( - // SystemPagingDirectionKey is the attribute Key conforming to the - // "system.paging.direction" semantic conventions. It represents the paging - // access direction - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'in' - SystemPagingDirectionKey = attribute.Key("system.paging.direction") - - // SystemPagingStateKey is the attribute Key conforming to the - // "system.paging.state" semantic conventions. It represents the memory - // paging state - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'free' - SystemPagingStateKey = attribute.Key("system.paging.state") - - // SystemPagingTypeKey is the attribute Key conforming to the - // "system.paging.type" semantic conventions. It represents the memory - // paging type - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'minor' - SystemPagingTypeKey = attribute.Key("system.paging.type") -) - -var ( - // in - SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") - // out - SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") -) - -var ( - // used - SystemPagingStateUsed = SystemPagingStateKey.String("used") - // free - SystemPagingStateFree = SystemPagingStateKey.String("free") -) - -var ( - // major - SystemPagingTypeMajor = SystemPagingTypeKey.String("major") - // minor - SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") -) - -// Describes Filesystem attributes -const ( - // SystemFilesystemModeKey is the attribute Key conforming to the - // "system.filesystem.mode" semantic conventions. It represents the - // filesystem mode - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'rw, ro' - SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") - - // SystemFilesystemMountpointKey is the attribute Key conforming to the - // "system.filesystem.mountpoint" semantic conventions. It represents the - // filesystem mount path - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/mnt/data' - SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") - - // SystemFilesystemStateKey is the attribute Key conforming to the - // "system.filesystem.state" semantic conventions. It represents the - // filesystem state - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'used' - SystemFilesystemStateKey = attribute.Key("system.filesystem.state") - - // SystemFilesystemTypeKey is the attribute Key conforming to the - // "system.filesystem.type" semantic conventions. It represents the - // filesystem type - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'ext4' - SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") -) - -var ( - // used - SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") - // free - SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") - // reserved - SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") -) - -var ( - // fat32 - SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") - // exfat - SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") - // ntfs - SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") - // refs - SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") - // hfsplus - SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") - // ext4 - SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") -) - -// SystemFilesystemMode returns an attribute KeyValue conforming to the -// "system.filesystem.mode" semantic conventions. It represents the filesystem -// mode -func SystemFilesystemMode(val string) attribute.KeyValue { - return SystemFilesystemModeKey.String(val) -} - -// SystemFilesystemMountpoint returns an attribute KeyValue conforming to -// the "system.filesystem.mountpoint" semantic conventions. It represents the -// filesystem mount path -func SystemFilesystemMountpoint(val string) attribute.KeyValue { - return SystemFilesystemMountpointKey.String(val) -} - -// Describes Network attributes -const ( - // SystemNetworkStateKey is the attribute Key conforming to the - // "system.network.state" semantic conventions. It represents a stateless - // protocol MUST NOT set this attribute - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'close_wait' - SystemNetworkStateKey = attribute.Key("system.network.state") -) - -var ( - // close - SystemNetworkStateClose = SystemNetworkStateKey.String("close") - // close_wait - SystemNetworkStateCloseWait = SystemNetworkStateKey.String("close_wait") - // closing - SystemNetworkStateClosing = SystemNetworkStateKey.String("closing") - // delete - SystemNetworkStateDelete = SystemNetworkStateKey.String("delete") - // established - SystemNetworkStateEstablished = SystemNetworkStateKey.String("established") - // fin_wait_1 - SystemNetworkStateFinWait1 = SystemNetworkStateKey.String("fin_wait_1") - // fin_wait_2 - SystemNetworkStateFinWait2 = SystemNetworkStateKey.String("fin_wait_2") - // last_ack - SystemNetworkStateLastAck = SystemNetworkStateKey.String("last_ack") - // listen - SystemNetworkStateListen = SystemNetworkStateKey.String("listen") - // syn_recv - SystemNetworkStateSynRecv = SystemNetworkStateKey.String("syn_recv") - // syn_sent - SystemNetworkStateSynSent = SystemNetworkStateKey.String("syn_sent") - // time_wait - SystemNetworkStateTimeWait = SystemNetworkStateKey.String("time_wait") -) - -// Describes System Process attributes -const ( - // SystemProcessStatusKey is the attribute Key conforming to the - // "system.process.status" semantic conventions. It represents the process - // state, e.g., [Linux Process State - // Codes](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'running' - SystemProcessStatusKey = attribute.Key("system.process.status") -) - -var ( - // running - SystemProcessStatusRunning = SystemProcessStatusKey.String("running") - // sleeping - SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping") - // stopped - SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped") - // defunct - SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct") -) - -// Attributes for telemetry SDK. -const ( - // TelemetrySDKLanguageKey is the attribute Key conforming to the - // "telemetry.sdk.language" semantic conventions. It represents the - // language of the telemetry SDK. - // - // Type: Enum - // RequirementLevel: Required - // Stability: stable - TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") - - // TelemetrySDKNameKey is the attribute Key conforming to the - // "telemetry.sdk.name" semantic conventions. It represents the name of the - // telemetry SDK as defined above. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: 'opentelemetry' - // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute - // to `opentelemetry`. - // If another SDK, like a fork or a vendor-provided implementation, is - // used, this SDK MUST set the - // `telemetry.sdk.name` attribute to the fully-qualified class or module - // name of this SDK's main entry point - // or another suitable identifier depending on the language. - // The identifier `opentelemetry` is reserved and MUST NOT be used in this - // case. - // All custom identifiers SHOULD be stable across different versions of an - // implementation. - TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") - - // TelemetrySDKVersionKey is the attribute Key conforming to the - // "telemetry.sdk.version" semantic conventions. It represents the version - // string of the telemetry SDK. - // - // Type: string - // RequirementLevel: Required - // Stability: stable - // Examples: '1.2.3' - TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") - - // TelemetryDistroNameKey is the attribute Key conforming to the - // "telemetry.distro.name" semantic conventions. It represents the name of - // the auto instrumentation agent or distribution, if used. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'parts-unlimited-java' - // Note: Official auto instrumentation agents and distributions SHOULD set - // the `telemetry.distro.name` attribute to - // a string starting with `opentelemetry-`, e.g. - // `opentelemetry-java-instrumentation`. - TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") - - // TelemetryDistroVersionKey is the attribute Key conforming to the - // "telemetry.distro.version" semantic conventions. It represents the - // version string of the auto instrumentation agent or distribution, if - // used. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1.2.3' - TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") -) - -var ( - // cpp - TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") - // dotnet - TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") - // erlang - TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") - // go - TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") - // java - TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") - // nodejs - TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") - // php - TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") - // python - TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") - // ruby - TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") - // rust - TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") - // swift - TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") - // webjs - TelemetrySDKLanguageWebjs = TelemetrySDKLanguageKey.String("webjs") -) - -// TelemetrySDKName returns an attribute KeyValue conforming to the -// "telemetry.sdk.name" semantic conventions. It represents the name of the -// telemetry SDK as defined above. -func TelemetrySDKName(val string) attribute.KeyValue { - return TelemetrySDKNameKey.String(val) -} - -// TelemetrySDKVersion returns an attribute KeyValue conforming to the -// "telemetry.sdk.version" semantic conventions. It represents the version -// string of the telemetry SDK. -func TelemetrySDKVersion(val string) attribute.KeyValue { - return TelemetrySDKVersionKey.String(val) -} - -// TelemetryDistroName returns an attribute KeyValue conforming to the -// "telemetry.distro.name" semantic conventions. It represents the name of the -// auto instrumentation agent or distribution, if used. -func TelemetryDistroName(val string) attribute.KeyValue { - return TelemetryDistroNameKey.String(val) -} - -// TelemetryDistroVersion returns an attribute KeyValue conforming to the -// "telemetry.distro.version" semantic conventions. It represents the version -// string of the auto instrumentation agent or distribution, if used. -func TelemetryDistroVersion(val string) attribute.KeyValue { - return TelemetryDistroVersionKey.String(val) -} - -// These attributes may be used for any operation to store information about a -// thread that started a span. -const ( - // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic - // conventions. It represents the current "managed" thread ID (as opposed - // to OS thread ID). - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 42 - ThreadIDKey = attribute.Key("thread.id") - - // ThreadNameKey is the attribute Key conforming to the "thread.name" - // semantic conventions. It represents the current thread name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'main' - ThreadNameKey = attribute.Key("thread.name") -) - -// ThreadID returns an attribute KeyValue conforming to the "thread.id" -// semantic conventions. It represents the current "managed" thread ID (as -// opposed to OS thread ID). -func ThreadID(val int) attribute.KeyValue { - return ThreadIDKey.Int(val) -} - -// ThreadName returns an attribute KeyValue conforming to the "thread.name" -// semantic conventions. It represents the current thread name. -func ThreadName(val string) attribute.KeyValue { - return ThreadNameKey.String(val) -} - -// Semantic convention attributes in the TLS namespace. -const ( - // TLSCipherKey is the attribute Key conforming to the "tls.cipher" - // semantic conventions. It represents the string indicating the - // [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) - // used during the current connection. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'TLS_RSA_WITH_3DES_EDE_CBC_SHA', - // 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256' - // Note: The values allowed for `tls.cipher` MUST be one of the - // `Descriptions` of the [registered TLS Cipher - // Suits](https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4). - TLSCipherKey = attribute.Key("tls.cipher") - - // TLSClientCertificateKey is the attribute Key conforming to the - // "tls.client.certificate" semantic conventions. It represents the - // pEM-encoded stand-alone certificate offered by the client. This is - // usually mutually-exclusive of `client.certificate_chain` since this - // value also exists in that list. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MII...' - TLSClientCertificateKey = attribute.Key("tls.client.certificate") - - // TLSClientCertificateChainKey is the attribute Key conforming to the - // "tls.client.certificate_chain" semantic conventions. It represents the - // array of PEM-encoded certificates that make up the certificate chain - // offered by the client. This is usually mutually-exclusive of - // `client.certificate` since that value should be the first certificate in - // the chain. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") - - // TLSClientHashMd5Key is the attribute Key conforming to the - // "tls.client.hash.md5" semantic conventions. It represents the - // certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") - - // TLSClientHashSha1Key is the attribute Key conforming to the - // "tls.client.hash.sha1" semantic conventions. It represents the - // certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the client. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") - - // TLSClientHashSha256Key is the attribute Key conforming to the - // "tls.client.hash.sha256" semantic conventions. It represents the - // certificate fingerprint using the SHA256 digest of DER-encoded version - // of certificate offered by the client. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") - - // TLSClientIssuerKey is the attribute Key conforming to the - // "tls.client.issuer" semantic conventions. It represents the - // distinguished name of - // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) - // of the issuer of the x.509 certificate presented by the client. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, - // DC=com' - TLSClientIssuerKey = attribute.Key("tls.client.issuer") - - // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" - // semantic conventions. It represents a hash that identifies clients based - // on how they perform an SSL/TLS handshake. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - TLSClientJa3Key = attribute.Key("tls.client.ja3") - - // TLSClientNotAfterKey is the attribute Key conforming to the - // "tls.client.not_after" semantic conventions. It represents the date/Time - // indicating when client certificate is no longer considered valid. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - TLSClientNotAfterKey = attribute.Key("tls.client.not_after") - - // TLSClientNotBeforeKey is the attribute Key conforming to the - // "tls.client.not_before" semantic conventions. It represents the - // date/Time indicating when client certificate is first considered valid. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") - - // TLSClientServerNameKey is the attribute Key conforming to the - // "tls.client.server_name" semantic conventions. It represents the also - // called an SNI, this tells the server which hostname to which the client - // is attempting to connect to. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'opentelemetry.io' - TLSClientServerNameKey = attribute.Key("tls.client.server_name") - - // TLSClientSubjectKey is the attribute Key conforming to the - // "tls.client.subject" semantic conventions. It represents the - // distinguished name of subject of the x.509 certificate presented by the - // client. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'CN=myclient, OU=Documentation Team, DC=example, DC=com' - TLSClientSubjectKey = attribute.Key("tls.client.subject") - - // TLSClientSupportedCiphersKey is the attribute Key conforming to the - // "tls.client.supported_ciphers" semantic conventions. It represents the - // array of ciphers offered by the client during the client hello. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: '"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "..."' - TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") - - // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic - // conventions. It represents the string indicating the curve used for the - // given cipher, when applicable - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'secp256r1' - TLSCurveKey = attribute.Key("tls.curve") - - // TLSEstablishedKey is the attribute Key conforming to the - // "tls.established" semantic conventions. It represents the boolean flag - // indicating if the TLS negotiation was successful and transitioned to an - // encrypted tunnel. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - // Examples: True - TLSEstablishedKey = attribute.Key("tls.established") - - // TLSNextProtocolKey is the attribute Key conforming to the - // "tls.next_protocol" semantic conventions. It represents the string - // indicating the protocol being tunneled. Per the values in the [IANA - // registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), - // this string should be lower case. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'http/1.1' - TLSNextProtocolKey = attribute.Key("tls.next_protocol") - - // TLSProtocolNameKey is the attribute Key conforming to the - // "tls.protocol.name" semantic conventions. It represents the normalized - // lowercase protocol name parsed from original string of the negotiated - // [SSL/TLS protocol - // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) - // - // Type: Enum - // RequirementLevel: Optional - // Stability: experimental - TLSProtocolNameKey = attribute.Key("tls.protocol.name") - - // TLSProtocolVersionKey is the attribute Key conforming to the - // "tls.protocol.version" semantic conventions. It represents the numeric - // part of the version parsed from the original string of the negotiated - // [SSL/TLS protocol - // version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1.2', '3' - TLSProtocolVersionKey = attribute.Key("tls.protocol.version") - - // TLSResumedKey is the attribute Key conforming to the "tls.resumed" - // semantic conventions. It represents the boolean flag indicating if this - // TLS connection was resumed from an existing TLS negotiation. - // - // Type: boolean - // RequirementLevel: Optional - // Stability: experimental - // Examples: True - TLSResumedKey = attribute.Key("tls.resumed") - - // TLSServerCertificateKey is the attribute Key conforming to the - // "tls.server.certificate" semantic conventions. It represents the - // pEM-encoded stand-alone certificate offered by the server. This is - // usually mutually-exclusive of `server.certificate_chain` since this - // value also exists in that list. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MII...' - TLSServerCertificateKey = attribute.Key("tls.server.certificate") - - // TLSServerCertificateChainKey is the attribute Key conforming to the - // "tls.server.certificate_chain" semantic conventions. It represents the - // array of PEM-encoded certificates that make up the certificate chain - // offered by the server. This is usually mutually-exclusive of - // `server.certificate` since that value should be the first certificate in - // the chain. - // - // Type: string[] - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'MII...', 'MI...' - TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") - - // TLSServerHashMd5Key is the attribute Key conforming to the - // "tls.server.hash.md5" semantic conventions. It represents the - // certificate fingerprint using the MD5 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC' - TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") - - // TLSServerHashSha1Key is the attribute Key conforming to the - // "tls.server.hash.sha1" semantic conventions. It represents the - // certificate fingerprint using the SHA1 digest of DER-encoded version of - // certificate offered by the server. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '9E393D93138888D288266C2D915214D1D1CCEB2A' - TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") - - // TLSServerHashSha256Key is the attribute Key conforming to the - // "tls.server.hash.sha256" semantic conventions. It represents the - // certificate fingerprint using the SHA256 digest of DER-encoded version - // of certificate offered by the server. For consistency with other hash - // values, this value should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: - // '0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0' - TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") - - // TLSServerIssuerKey is the attribute Key conforming to the - // "tls.server.issuer" semantic conventions. It represents the - // distinguished name of - // [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) - // of the issuer of the x.509 certificate presented by the client. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'CN=Example Root CA, OU=Infrastructure Team, DC=example, - // DC=com' - TLSServerIssuerKey = attribute.Key("tls.server.issuer") - - // TLSServerJa3sKey is the attribute Key conforming to the - // "tls.server.ja3s" semantic conventions. It represents a hash that - // identifies servers based on how they perform an SSL/TLS handshake. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'd4e5b18d6b55c71272893221c96ba240' - TLSServerJa3sKey = attribute.Key("tls.server.ja3s") - - // TLSServerNotAfterKey is the attribute Key conforming to the - // "tls.server.not_after" semantic conventions. It represents the date/Time - // indicating when server certificate is no longer considered valid. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '2021-01-01T00:00:00.000Z' - TLSServerNotAfterKey = attribute.Key("tls.server.not_after") - - // TLSServerNotBeforeKey is the attribute Key conforming to the - // "tls.server.not_before" semantic conventions. It represents the - // date/Time indicating when server certificate is first considered valid. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '1970-01-01T00:00:00.000Z' - TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") - - // TLSServerSubjectKey is the attribute Key conforming to the - // "tls.server.subject" semantic conventions. It represents the - // distinguished name of subject of the x.509 certificate presented by the - // server. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'CN=myserver, OU=Documentation Team, DC=example, DC=com' - TLSServerSubjectKey = attribute.Key("tls.server.subject") -) - -var ( - // ssl - TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") - // tls - TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") -) - -// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" -// semantic conventions. It represents the string indicating the -// [cipher](https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5) used -// during the current connection. -func TLSCipher(val string) attribute.KeyValue { - return TLSCipherKey.String(val) -} - -// TLSClientCertificate returns an attribute KeyValue conforming to the -// "tls.client.certificate" semantic conventions. It represents the pEM-encoded -// stand-alone certificate offered by the client. This is usually -// mutually-exclusive of `client.certificate_chain` since this value also -// exists in that list. -func TLSClientCertificate(val string) attribute.KeyValue { - return TLSClientCertificateKey.String(val) -} - -// TLSClientCertificateChain returns an attribute KeyValue conforming to the -// "tls.client.certificate_chain" semantic conventions. It represents the array -// of PEM-encoded certificates that make up the certificate chain offered by -// the client. This is usually mutually-exclusive of `client.certificate` since -// that value should be the first certificate in the chain. -func TLSClientCertificateChain(val ...string) attribute.KeyValue { - return TLSClientCertificateChainKey.StringSlice(val) -} - -// TLSClientHashMd5 returns an attribute KeyValue conforming to the -// "tls.client.hash.md5" semantic conventions. It represents the certificate -// fingerprint using the MD5 digest of DER-encoded version of certificate -// offered by the client. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSClientHashMd5(val string) attribute.KeyValue { - return TLSClientHashMd5Key.String(val) -} - -// TLSClientHashSha1 returns an attribute KeyValue conforming to the -// "tls.client.hash.sha1" semantic conventions. It represents the certificate -// fingerprint using the SHA1 digest of DER-encoded version of certificate -// offered by the client. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSClientHashSha1(val string) attribute.KeyValue { - return TLSClientHashSha1Key.String(val) -} - -// TLSClientHashSha256 returns an attribute KeyValue conforming to the -// "tls.client.hash.sha256" semantic conventions. It represents the certificate -// fingerprint using the SHA256 digest of DER-encoded version of certificate -// offered by the client. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSClientHashSha256(val string) attribute.KeyValue { - return TLSClientHashSha256Key.String(val) -} - -// TLSClientIssuer returns an attribute KeyValue conforming to the -// "tls.client.issuer" semantic conventions. It represents the distinguished -// name of -// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of -// the issuer of the x.509 certificate presented by the client. -func TLSClientIssuer(val string) attribute.KeyValue { - return TLSClientIssuerKey.String(val) -} - -// TLSClientJa3 returns an attribute KeyValue conforming to the -// "tls.client.ja3" semantic conventions. It represents a hash that identifies -// clients based on how they perform an SSL/TLS handshake. -func TLSClientJa3(val string) attribute.KeyValue { - return TLSClientJa3Key.String(val) -} - -// TLSClientNotAfter returns an attribute KeyValue conforming to the -// "tls.client.not_after" semantic conventions. It represents the date/Time -// indicating when client certificate is no longer considered valid. -func TLSClientNotAfter(val string) attribute.KeyValue { - return TLSClientNotAfterKey.String(val) -} - -// TLSClientNotBefore returns an attribute KeyValue conforming to the -// "tls.client.not_before" semantic conventions. It represents the date/Time -// indicating when client certificate is first considered valid. -func TLSClientNotBefore(val string) attribute.KeyValue { - return TLSClientNotBeforeKey.String(val) -} - -// TLSClientServerName returns an attribute KeyValue conforming to the -// "tls.client.server_name" semantic conventions. It represents the also called -// an SNI, this tells the server which hostname to which the client is -// attempting to connect to. -func TLSClientServerName(val string) attribute.KeyValue { - return TLSClientServerNameKey.String(val) -} - -// TLSClientSubject returns an attribute KeyValue conforming to the -// "tls.client.subject" semantic conventions. It represents the distinguished -// name of subject of the x.509 certificate presented by the client. -func TLSClientSubject(val string) attribute.KeyValue { - return TLSClientSubjectKey.String(val) -} - -// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the -// "tls.client.supported_ciphers" semantic conventions. It represents the array -// of ciphers offered by the client during the client hello. -func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { - return TLSClientSupportedCiphersKey.StringSlice(val) -} - -// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" -// semantic conventions. It represents the string indicating the curve used for -// the given cipher, when applicable -func TLSCurve(val string) attribute.KeyValue { - return TLSCurveKey.String(val) -} - -// TLSEstablished returns an attribute KeyValue conforming to the -// "tls.established" semantic conventions. It represents the boolean flag -// indicating if the TLS negotiation was successful and transitioned to an -// encrypted tunnel. -func TLSEstablished(val bool) attribute.KeyValue { - return TLSEstablishedKey.Bool(val) -} - -// TLSNextProtocol returns an attribute KeyValue conforming to the -// "tls.next_protocol" semantic conventions. It represents the string -// indicating the protocol being tunneled. Per the values in the [IANA -// registry](https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids), -// this string should be lower case. -func TLSNextProtocol(val string) attribute.KeyValue { - return TLSNextProtocolKey.String(val) -} - -// TLSProtocolVersion returns an attribute KeyValue conforming to the -// "tls.protocol.version" semantic conventions. It represents the numeric part -// of the version parsed from the original string of the negotiated [SSL/TLS -// protocol -// version](https://www.openssl.org/docs/man1.1.1/man3/SSL_get_version.html#RETURN-VALUES) -func TLSProtocolVersion(val string) attribute.KeyValue { - return TLSProtocolVersionKey.String(val) -} - -// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" -// semantic conventions. It represents the boolean flag indicating if this TLS -// connection was resumed from an existing TLS negotiation. -func TLSResumed(val bool) attribute.KeyValue { - return TLSResumedKey.Bool(val) -} - -// TLSServerCertificate returns an attribute KeyValue conforming to the -// "tls.server.certificate" semantic conventions. It represents the pEM-encoded -// stand-alone certificate offered by the server. This is usually -// mutually-exclusive of `server.certificate_chain` since this value also -// exists in that list. -func TLSServerCertificate(val string) attribute.KeyValue { - return TLSServerCertificateKey.String(val) -} - -// TLSServerCertificateChain returns an attribute KeyValue conforming to the -// "tls.server.certificate_chain" semantic conventions. It represents the array -// of PEM-encoded certificates that make up the certificate chain offered by -// the server. This is usually mutually-exclusive of `server.certificate` since -// that value should be the first certificate in the chain. -func TLSServerCertificateChain(val ...string) attribute.KeyValue { - return TLSServerCertificateChainKey.StringSlice(val) -} - -// TLSServerHashMd5 returns an attribute KeyValue conforming to the -// "tls.server.hash.md5" semantic conventions. It represents the certificate -// fingerprint using the MD5 digest of DER-encoded version of certificate -// offered by the server. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSServerHashMd5(val string) attribute.KeyValue { - return TLSServerHashMd5Key.String(val) -} - -// TLSServerHashSha1 returns an attribute KeyValue conforming to the -// "tls.server.hash.sha1" semantic conventions. It represents the certificate -// fingerprint using the SHA1 digest of DER-encoded version of certificate -// offered by the server. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSServerHashSha1(val string) attribute.KeyValue { - return TLSServerHashSha1Key.String(val) -} - -// TLSServerHashSha256 returns an attribute KeyValue conforming to the -// "tls.server.hash.sha256" semantic conventions. It represents the certificate -// fingerprint using the SHA256 digest of DER-encoded version of certificate -// offered by the server. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSServerHashSha256(val string) attribute.KeyValue { - return TLSServerHashSha256Key.String(val) -} - -// TLSServerIssuer returns an attribute KeyValue conforming to the -// "tls.server.issuer" semantic conventions. It represents the distinguished -// name of -// [subject](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6) of -// the issuer of the x.509 certificate presented by the client. -func TLSServerIssuer(val string) attribute.KeyValue { - return TLSServerIssuerKey.String(val) -} - -// TLSServerJa3s returns an attribute KeyValue conforming to the -// "tls.server.ja3s" semantic conventions. It represents a hash that identifies -// servers based on how they perform an SSL/TLS handshake. -func TLSServerJa3s(val string) attribute.KeyValue { - return TLSServerJa3sKey.String(val) -} - -// TLSServerNotAfter returns an attribute KeyValue conforming to the -// "tls.server.not_after" semantic conventions. It represents the date/Time -// indicating when server certificate is no longer considered valid. -func TLSServerNotAfter(val string) attribute.KeyValue { - return TLSServerNotAfterKey.String(val) -} - -// TLSServerNotBefore returns an attribute KeyValue conforming to the -// "tls.server.not_before" semantic conventions. It represents the date/Time -// indicating when server certificate is first considered valid. -func TLSServerNotBefore(val string) attribute.KeyValue { - return TLSServerNotBeforeKey.String(val) -} - -// TLSServerSubject returns an attribute KeyValue conforming to the -// "tls.server.subject" semantic conventions. It represents the distinguished -// name of subject of the x.509 certificate presented by the server. -func TLSServerSubject(val string) attribute.KeyValue { - return TLSServerSubjectKey.String(val) -} - -// Attributes describing URL. -const ( - // URLDomainKey is the attribute Key conforming to the "url.domain" - // semantic conventions. It represents the domain extracted from the - // `url.full`, such as "opentelemetry.io". - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'www.foo.bar', 'opentelemetry.io', '3.12.167.2', - // '[1080:0:0:0:8:800:200C:417A]' - // Note: In some cases a URL may refer to an IP and/or port directly, - // without a domain name. In this case, the IP address would go to the - // domain field. If the URL contains a [literal IPv6 - // address](https://www.rfc-editor.org/rfc/rfc2732#section-2) enclosed by - // `[` and `]`, the `[` and `]` characters should also be captured in the - // domain field. - URLDomainKey = attribute.Key("url.domain") - - // URLExtensionKey is the attribute Key conforming to the "url.extension" - // semantic conventions. It represents the file extension extracted from - // the `url.full`, excluding the leading dot. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'png', 'gz' - // Note: The file extension is only set if it exists, as not every url has - // a file extension. When the file name has multiple extensions - // `example.tar.gz`, only the last one should be captured `gz`, not - // `tar.gz`. - URLExtensionKey = attribute.Key("url.extension") - - // URLFragmentKey is the attribute Key conforming to the "url.fragment" - // semantic conventions. It represents the [URI - // fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'SemConv' - URLFragmentKey = attribute.Key("url.fragment") - - // URLFullKey is the attribute Key conforming to the "url.full" semantic - // conventions. It represents the absolute URL describing a network - // resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', - // '//localhost' - // Note: For network calls, URL usually has - // `scheme://host[:port][path][?query][#fragment]` format, where the - // fragment is not transmitted over HTTP, but if it is known, it SHOULD be - // included nevertheless. - // `url.full` MUST NOT contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. In such case username and - // password SHOULD be redacted and attribute's value SHOULD be - // `https://REDACTED:REDACTED@www.example.com/`. - // `url.full` SHOULD capture the absolute URL when it is available (or can - // be reconstructed). Sensitive content provided in `url.full` SHOULD be - // scrubbed when instrumentations can identify it. - URLFullKey = attribute.Key("url.full") - - // URLOriginalKey is the attribute Key conforming to the "url.original" - // semantic conventions. It represents the unmodified original URL as seen - // in the event source. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'https://www.foo.bar/search?q=OpenTelemetry#SemConv', - // 'search?q=OpenTelemetry' - // Note: In network monitoring, the observed URL may be a full URL, whereas - // in access logs, the URL is often just represented as a path. This field - // is meant to represent the URL as it was observed, complete or not. - // `url.original` might contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. In such case password and - // username SHOULD NOT be redacted and attribute's value SHOULD remain the - // same. - URLOriginalKey = attribute.Key("url.original") - - // URLPathKey is the attribute Key conforming to the "url.path" semantic - // conventions. It represents the [URI - // path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: '/search' - // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when - // instrumentations can identify it. - URLPathKey = attribute.Key("url.path") - - // URLPortKey is the attribute Key conforming to the "url.port" semantic - // conventions. It represents the port extracted from the `url.full` - // - // Type: int - // RequirementLevel: Optional - // Stability: experimental - // Examples: 443 - URLPortKey = attribute.Key("url.port") - - // URLQueryKey is the attribute Key conforming to the "url.query" semantic - // conventions. It represents the [URI - // query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'q=OpenTelemetry' - // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when - // instrumentations can identify it. - URLQueryKey = attribute.Key("url.query") - - // URLRegisteredDomainKey is the attribute Key conforming to the - // "url.registered_domain" semantic conventions. It represents the highest - // registered url domain, stripped of the subdomain. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'example.com', 'foo.co.uk' - // Note: This value can be determined precisely with the [public suffix - // list](http://publicsuffix.org). For example, the registered domain for - // `foo.example.com` is `example.com`. Trying to approximate this by simply - // taking the last two labels will not work well for TLDs such as `co.uk`. - URLRegisteredDomainKey = attribute.Key("url.registered_domain") - - // URLSchemeKey is the attribute Key conforming to the "url.scheme" - // semantic conventions. It represents the [URI - // scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component - // identifying the used protocol. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'https', 'ftp', 'telnet' - URLSchemeKey = attribute.Key("url.scheme") - - // URLSubdomainKey is the attribute Key conforming to the "url.subdomain" - // semantic conventions. It represents the subdomain portion of a fully - // qualified domain name includes all of the names except the host name - // under the registered_domain. In a partially qualified domain, or if the - // qualification level of the full name cannot be determined, subdomain - // contains all of the names below the registered domain. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'east', 'sub2.sub1' - // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If - // the domain has multiple levels of subdomain, such as - // `sub2.sub1.example.com`, the subdomain field should contain `sub2.sub1`, - // with no trailing period. - URLSubdomainKey = attribute.Key("url.subdomain") - - // URLTemplateKey is the attribute Key conforming to the "url.template" - // semantic conventions. It represents the low-cardinality template of an - // [absolute path - // reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '/users/{id}', '/users/:id', '/users?id={id}' - URLTemplateKey = attribute.Key("url.template") - - // URLTopLevelDomainKey is the attribute Key conforming to the - // "url.top_level_domain" semantic conventions. It represents the effective - // top level domain (eTLD), also known as the domain suffix, is the last - // part of the domain name. For example, the top level domain for - // example.com is `com`. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'com', 'co.uk' - // Note: This value can be determined precisely with the [public suffix - // list](http://publicsuffix.org). - URLTopLevelDomainKey = attribute.Key("url.top_level_domain") -) - -// URLDomain returns an attribute KeyValue conforming to the "url.domain" -// semantic conventions. It represents the domain extracted from the -// `url.full`, such as "opentelemetry.io". -func URLDomain(val string) attribute.KeyValue { - return URLDomainKey.String(val) -} - -// URLExtension returns an attribute KeyValue conforming to the -// "url.extension" semantic conventions. It represents the file extension -// extracted from the `url.full`, excluding the leading dot. -func URLExtension(val string) attribute.KeyValue { - return URLExtensionKey.String(val) -} - -// URLFragment returns an attribute KeyValue conforming to the -// "url.fragment" semantic conventions. It represents the [URI -// fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component -func URLFragment(val string) attribute.KeyValue { - return URLFragmentKey.String(val) -} - -// URLFull returns an attribute KeyValue conforming to the "url.full" -// semantic conventions. It represents the absolute URL describing a network -// resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986) -func URLFull(val string) attribute.KeyValue { - return URLFullKey.String(val) -} - -// URLOriginal returns an attribute KeyValue conforming to the -// "url.original" semantic conventions. It represents the unmodified original -// URL as seen in the event source. -func URLOriginal(val string) attribute.KeyValue { - return URLOriginalKey.String(val) -} - -// URLPath returns an attribute KeyValue conforming to the "url.path" -// semantic conventions. It represents the [URI -// path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component -func URLPath(val string) attribute.KeyValue { - return URLPathKey.String(val) -} - -// URLPort returns an attribute KeyValue conforming to the "url.port" -// semantic conventions. It represents the port extracted from the `url.full` -func URLPort(val int) attribute.KeyValue { - return URLPortKey.Int(val) -} - -// URLQuery returns an attribute KeyValue conforming to the "url.query" -// semantic conventions. It represents the [URI -// query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component -func URLQuery(val string) attribute.KeyValue { - return URLQueryKey.String(val) -} - -// URLRegisteredDomain returns an attribute KeyValue conforming to the -// "url.registered_domain" semantic conventions. It represents the highest -// registered url domain, stripped of the subdomain. -func URLRegisteredDomain(val string) attribute.KeyValue { - return URLRegisteredDomainKey.String(val) -} - -// URLScheme returns an attribute KeyValue conforming to the "url.scheme" -// semantic conventions. It represents the [URI -// scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component -// identifying the used protocol. -func URLScheme(val string) attribute.KeyValue { - return URLSchemeKey.String(val) -} - -// URLSubdomain returns an attribute KeyValue conforming to the -// "url.subdomain" semantic conventions. It represents the subdomain portion of -// a fully qualified domain name includes all of the names except the host name -// under the registered_domain. In a partially qualified domain, or if the -// qualification level of the full name cannot be determined, subdomain -// contains all of the names below the registered domain. -func URLSubdomain(val string) attribute.KeyValue { - return URLSubdomainKey.String(val) -} - -// URLTemplate returns an attribute KeyValue conforming to the -// "url.template" semantic conventions. It represents the low-cardinality -// template of an [absolute path -// reference](https://www.rfc-editor.org/rfc/rfc3986#section-4.2). -func URLTemplate(val string) attribute.KeyValue { - return URLTemplateKey.String(val) -} - -// URLTopLevelDomain returns an attribute KeyValue conforming to the -// "url.top_level_domain" semantic conventions. It represents the effective top -// level domain (eTLD), also known as the domain suffix, is the last part of -// the domain name. For example, the top level domain for example.com is `com`. -func URLTopLevelDomain(val string) attribute.KeyValue { - return URLTopLevelDomainKey.String(val) -} - -// Describes user-agent attributes. -const ( - // UserAgentNameKey is the attribute Key conforming to the - // "user_agent.name" semantic conventions. It represents the name of the - // user-agent extracted from original. Usually refers to the browser's - // name. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'Safari', 'YourApp' - // Note: [Example](https://www.whatsmyua.info) of extracting browser's name - // from original string. In the case of using a user-agent for non-browser - // products, such as microservices with multiple names/versions inside the - // `user_agent.original`, the most significant name SHOULD be selected. In - // such a scenario it should align with `user_agent.version` - UserAgentNameKey = attribute.Key("user_agent.name") - - // UserAgentOriginalKey is the attribute Key conforming to the - // "user_agent.original" semantic conventions. It represents the value of - // the [HTTP - // User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) - // header sent by the client. - // - // Type: string - // RequirementLevel: Optional - // Stability: stable - // Examples: 'CERN-LineMode/2.15 libwww/2.17b3', 'Mozilla/5.0 (iPhone; CPU - // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) - // Version/14.1.2 Mobile/15E148 Safari/604.1', 'YourApp/1.0.0 - // grpc-java-okhttp/1.27.2' - UserAgentOriginalKey = attribute.Key("user_agent.original") - - // UserAgentVersionKey is the attribute Key conforming to the - // "user_agent.version" semantic conventions. It represents the version of - // the user-agent extracted from original. Usually refers to the browser's - // version - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '14.1.2', '1.0.0' - // Note: [Example](https://www.whatsmyua.info) of extracting browser's - // version from original string. In the case of using a user-agent for - // non-browser products, such as microservices with multiple names/versions - // inside the `user_agent.original`, the most significant version SHOULD be - // selected. In such a scenario it should align with `user_agent.name` - UserAgentVersionKey = attribute.Key("user_agent.version") -) - -// UserAgentName returns an attribute KeyValue conforming to the -// "user_agent.name" semantic conventions. It represents the name of the -// user-agent extracted from original. Usually refers to the browser's name. -func UserAgentName(val string) attribute.KeyValue { - return UserAgentNameKey.String(val) -} - -// UserAgentOriginal returns an attribute KeyValue conforming to the -// "user_agent.original" semantic conventions. It represents the value of the -// [HTTP -// User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) -// header sent by the client. -func UserAgentOriginal(val string) attribute.KeyValue { - return UserAgentOriginalKey.String(val) -} - -// UserAgentVersion returns an attribute KeyValue conforming to the -// "user_agent.version" semantic conventions. It represents the version of the -// user-agent extracted from original. Usually refers to the browser's version -func UserAgentVersion(val string) attribute.KeyValue { - return UserAgentVersionKey.String(val) -} - -// The attributes used to describe the packaged software running the -// application code. -const ( - // WebEngineDescriptionKey is the attribute Key conforming to the - // "webengine.description" semantic conventions. It represents the - // additional description of the web engine (e.g. detailed version and - // edition information). - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - - // 2.2.2.Final' - WebEngineDescriptionKey = attribute.Key("webengine.description") - - // WebEngineNameKey is the attribute Key conforming to the "webengine.name" - // semantic conventions. It represents the name of the web engine. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: 'WildFly' - WebEngineNameKey = attribute.Key("webengine.name") - - // WebEngineVersionKey is the attribute Key conforming to the - // "webengine.version" semantic conventions. It represents the version of - // the web engine. - // - // Type: string - // RequirementLevel: Optional - // Stability: experimental - // Examples: '21.0.0' - WebEngineVersionKey = attribute.Key("webengine.version") -) - -// WebEngineDescription returns an attribute KeyValue conforming to the -// "webengine.description" semantic conventions. It represents the additional -// description of the web engine (e.g. detailed version and edition -// information). -func WebEngineDescription(val string) attribute.KeyValue { - return WebEngineDescriptionKey.String(val) -} - -// WebEngineName returns an attribute KeyValue conforming to the -// "webengine.name" semantic conventions. It represents the name of the web -// engine. -func WebEngineName(val string) attribute.KeyValue { - return WebEngineNameKey.String(val) -} - -// WebEngineVersion returns an attribute KeyValue conforming to the -// "webengine.version" semantic conventions. It represents the version of the -// web engine. -func WebEngineVersion(val string) attribute.KeyValue { - return WebEngineVersionKey.String(val) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go deleted file mode 100644 index d031bbea78..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the v1.26.0 -// version of the OpenTelemetry semantic conventions. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go deleted file mode 100644 index bfaee0d56e..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/exception.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" - -const ( - // ExceptionEventName is the name of the Span event representing an exception. - ExceptionEventName = "exception" -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go deleted file mode 100644 index fcdb9f4859..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/metric.go +++ /dev/null @@ -1,1307 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" - -const ( - - // ContainerCPUTime is the metric conforming to the "container.cpu.time" - // semantic conventions. It represents the total CPU time consumed. - // Instrument: counter - // Unit: s - // Stability: Experimental - ContainerCPUTimeName = "container.cpu.time" - ContainerCPUTimeUnit = "s" - ContainerCPUTimeDescription = "Total CPU time consumed" - - // ContainerMemoryUsage is the metric conforming to the - // "container.memory.usage" semantic conventions. It represents the memory - // usage of the container. - // Instrument: counter - // Unit: By - // Stability: Experimental - ContainerMemoryUsageName = "container.memory.usage" - ContainerMemoryUsageUnit = "By" - ContainerMemoryUsageDescription = "Memory usage of the container." - - // ContainerDiskIo is the metric conforming to the "container.disk.io" semantic - // conventions. It represents the disk bytes for the container. - // Instrument: counter - // Unit: By - // Stability: Experimental - ContainerDiskIoName = "container.disk.io" - ContainerDiskIoUnit = "By" - ContainerDiskIoDescription = "Disk bytes for the container." - - // ContainerNetworkIo is the metric conforming to the "container.network.io" - // semantic conventions. It represents the network bytes for the container. - // Instrument: counter - // Unit: By - // Stability: Experimental - ContainerNetworkIoName = "container.network.io" - ContainerNetworkIoUnit = "By" - ContainerNetworkIoDescription = "Network bytes for the container." - - // DBClientOperationDuration is the metric conforming to the - // "db.client.operation.duration" semantic conventions. It represents the - // duration of database client operations. - // Instrument: histogram - // Unit: s - // Stability: Experimental - DBClientOperationDurationName = "db.client.operation.duration" - DBClientOperationDurationUnit = "s" - DBClientOperationDurationDescription = "Duration of database client operations." - - // DBClientConnectionCount is the metric conforming to the - // "db.client.connection.count" semantic conventions. It represents the number - // of connections that are currently in state described by the `state` - // attribute. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionCountName = "db.client.connection.count" - DBClientConnectionCountUnit = "{connection}" - DBClientConnectionCountDescription = "The number of connections that are currently in state described by the `state` attribute" - - // DBClientConnectionIdleMax is the metric conforming to the - // "db.client.connection.idle.max" semantic conventions. It represents the - // maximum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionIdleMaxName = "db.client.connection.idle.max" - DBClientConnectionIdleMaxUnit = "{connection}" - DBClientConnectionIdleMaxDescription = "The maximum number of idle open connections allowed" - - // DBClientConnectionIdleMin is the metric conforming to the - // "db.client.connection.idle.min" semantic conventions. It represents the - // minimum number of idle open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionIdleMinName = "db.client.connection.idle.min" - DBClientConnectionIdleMinUnit = "{connection}" - DBClientConnectionIdleMinDescription = "The minimum number of idle open connections allowed" - - // DBClientConnectionMax is the metric conforming to the - // "db.client.connection.max" semantic conventions. It represents the maximum - // number of open connections allowed. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionMaxName = "db.client.connection.max" - DBClientConnectionMaxUnit = "{connection}" - DBClientConnectionMaxDescription = "The maximum number of open connections allowed" - - // DBClientConnectionPendingRequests is the metric conforming to the - // "db.client.connection.pending_requests" semantic conventions. It represents - // the number of pending requests for an open connection, cumulative for the - // entire pool. - // Instrument: updowncounter - // Unit: {request} - // Stability: Experimental - DBClientConnectionPendingRequestsName = "db.client.connection.pending_requests" - DBClientConnectionPendingRequestsUnit = "{request}" - DBClientConnectionPendingRequestsDescription = "The number of pending requests for an open connection, cumulative for the entire pool" - - // DBClientConnectionTimeouts is the metric conforming to the - // "db.client.connection.timeouts" semantic conventions. It represents the - // number of connection timeouts that have occurred trying to obtain a - // connection from the pool. - // Instrument: counter - // Unit: {timeout} - // Stability: Experimental - DBClientConnectionTimeoutsName = "db.client.connection.timeouts" - DBClientConnectionTimeoutsUnit = "{timeout}" - DBClientConnectionTimeoutsDescription = "The number of connection timeouts that have occurred trying to obtain a connection from the pool" - - // DBClientConnectionCreateTime is the metric conforming to the - // "db.client.connection.create_time" semantic conventions. It represents the - // time it took to create a new connection. - // Instrument: histogram - // Unit: s - // Stability: Experimental - DBClientConnectionCreateTimeName = "db.client.connection.create_time" - DBClientConnectionCreateTimeUnit = "s" - DBClientConnectionCreateTimeDescription = "The time it took to create a new connection" - - // DBClientConnectionWaitTime is the metric conforming to the - // "db.client.connection.wait_time" semantic conventions. It represents the - // time it took to obtain an open connection from the pool. - // Instrument: histogram - // Unit: s - // Stability: Experimental - DBClientConnectionWaitTimeName = "db.client.connection.wait_time" - DBClientConnectionWaitTimeUnit = "s" - DBClientConnectionWaitTimeDescription = "The time it took to obtain an open connection from the pool" - - // DBClientConnectionUseTime is the metric conforming to the - // "db.client.connection.use_time" semantic conventions. It represents the time - // between borrowing a connection and returning it to the pool. - // Instrument: histogram - // Unit: s - // Stability: Experimental - DBClientConnectionUseTimeName = "db.client.connection.use_time" - DBClientConnectionUseTimeUnit = "s" - DBClientConnectionUseTimeDescription = "The time between borrowing a connection and returning it to the pool" - - // DBClientConnectionsUsage is the metric conforming to the - // "db.client.connections.usage" semantic conventions. It represents the - // deprecated, use `db.client.connection.count` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionsUsageName = "db.client.connections.usage" - DBClientConnectionsUsageUnit = "{connection}" - DBClientConnectionsUsageDescription = "Deprecated, use `db.client.connection.count` instead." - - // DBClientConnectionsIdleMax is the metric conforming to the - // "db.client.connections.idle.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionsIdleMaxName = "db.client.connections.idle.max" - DBClientConnectionsIdleMaxUnit = "{connection}" - DBClientConnectionsIdleMaxDescription = "Deprecated, use `db.client.connection.idle.max` instead." - - // DBClientConnectionsIdleMin is the metric conforming to the - // "db.client.connections.idle.min" semantic conventions. It represents the - // deprecated, use `db.client.connection.idle.min` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionsIdleMinName = "db.client.connections.idle.min" - DBClientConnectionsIdleMinUnit = "{connection}" - DBClientConnectionsIdleMinDescription = "Deprecated, use `db.client.connection.idle.min` instead." - - // DBClientConnectionsMax is the metric conforming to the - // "db.client.connections.max" semantic conventions. It represents the - // deprecated, use `db.client.connection.max` instead. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - DBClientConnectionsMaxName = "db.client.connections.max" - DBClientConnectionsMaxUnit = "{connection}" - DBClientConnectionsMaxDescription = "Deprecated, use `db.client.connection.max` instead." - - // DBClientConnectionsPendingRequests is the metric conforming to the - // "db.client.connections.pending_requests" semantic conventions. It represents - // the deprecated, use `db.client.connection.pending_requests` instead. - // Instrument: updowncounter - // Unit: {request} - // Stability: Experimental - DBClientConnectionsPendingRequestsName = "db.client.connections.pending_requests" - DBClientConnectionsPendingRequestsUnit = "{request}" - DBClientConnectionsPendingRequestsDescription = "Deprecated, use `db.client.connection.pending_requests` instead." - - // DBClientConnectionsTimeouts is the metric conforming to the - // "db.client.connections.timeouts" semantic conventions. It represents the - // deprecated, use `db.client.connection.timeouts` instead. - // Instrument: counter - // Unit: {timeout} - // Stability: Experimental - DBClientConnectionsTimeoutsName = "db.client.connections.timeouts" - DBClientConnectionsTimeoutsUnit = "{timeout}" - DBClientConnectionsTimeoutsDescription = "Deprecated, use `db.client.connection.timeouts` instead." - - // DBClientConnectionsCreateTime is the metric conforming to the - // "db.client.connections.create_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.create_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: Experimental - DBClientConnectionsCreateTimeName = "db.client.connections.create_time" - DBClientConnectionsCreateTimeUnit = "ms" - DBClientConnectionsCreateTimeDescription = "Deprecated, use `db.client.connection.create_time` instead. Note: the unit also changed from `ms` to `s`." - - // DBClientConnectionsWaitTime is the metric conforming to the - // "db.client.connections.wait_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.wait_time` instead. Note: the unit - // also changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: Experimental - DBClientConnectionsWaitTimeName = "db.client.connections.wait_time" - DBClientConnectionsWaitTimeUnit = "ms" - DBClientConnectionsWaitTimeDescription = "Deprecated, use `db.client.connection.wait_time` instead. Note: the unit also changed from `ms` to `s`." - - // DBClientConnectionsUseTime is the metric conforming to the - // "db.client.connections.use_time" semantic conventions. It represents the - // deprecated, use `db.client.connection.use_time` instead. Note: the unit also - // changed from `ms` to `s`. - // Instrument: histogram - // Unit: ms - // Stability: Experimental - DBClientConnectionsUseTimeName = "db.client.connections.use_time" - DBClientConnectionsUseTimeUnit = "ms" - DBClientConnectionsUseTimeDescription = "Deprecated, use `db.client.connection.use_time` instead. Note: the unit also changed from `ms` to `s`." - - // DNSLookupDuration is the metric conforming to the "dns.lookup.duration" - // semantic conventions. It represents the measures the time taken to perform a - // DNS lookup. - // Instrument: histogram - // Unit: s - // Stability: Experimental - DNSLookupDurationName = "dns.lookup.duration" - DNSLookupDurationUnit = "s" - DNSLookupDurationDescription = "Measures the time taken to perform a DNS lookup." - - // AspnetcoreRoutingMatchAttempts is the metric conforming to the - // "aspnetcore.routing.match_attempts" semantic conventions. It represents the - // number of requests that were attempted to be matched to an endpoint. - // Instrument: counter - // Unit: {match_attempt} - // Stability: Stable - AspnetcoreRoutingMatchAttemptsName = "aspnetcore.routing.match_attempts" - AspnetcoreRoutingMatchAttemptsUnit = "{match_attempt}" - AspnetcoreRoutingMatchAttemptsDescription = "Number of requests that were attempted to be matched to an endpoint." - - // AspnetcoreDiagnosticsExceptions is the metric conforming to the - // "aspnetcore.diagnostics.exceptions" semantic conventions. It represents the - // number of exceptions caught by exception handling middleware. - // Instrument: counter - // Unit: {exception} - // Stability: Stable - AspnetcoreDiagnosticsExceptionsName = "aspnetcore.diagnostics.exceptions" - AspnetcoreDiagnosticsExceptionsUnit = "{exception}" - AspnetcoreDiagnosticsExceptionsDescription = "Number of exceptions caught by exception handling middleware." - - // AspnetcoreRateLimitingActiveRequestLeases is the metric conforming to the - // "aspnetcore.rate_limiting.active_request_leases" semantic conventions. It - // represents the number of requests that are currently active on the server - // that hold a rate limiting lease. - // Instrument: updowncounter - // Unit: {request} - // Stability: Stable - AspnetcoreRateLimitingActiveRequestLeasesName = "aspnetcore.rate_limiting.active_request_leases" - AspnetcoreRateLimitingActiveRequestLeasesUnit = "{request}" - AspnetcoreRateLimitingActiveRequestLeasesDescription = "Number of requests that are currently active on the server that hold a rate limiting lease." - - // AspnetcoreRateLimitingRequestLeaseDuration is the metric conforming to the - // "aspnetcore.rate_limiting.request_lease.duration" semantic conventions. It - // represents the duration of rate limiting lease held by requests on the - // server. - // Instrument: histogram - // Unit: s - // Stability: Stable - AspnetcoreRateLimitingRequestLeaseDurationName = "aspnetcore.rate_limiting.request_lease.duration" - AspnetcoreRateLimitingRequestLeaseDurationUnit = "s" - AspnetcoreRateLimitingRequestLeaseDurationDescription = "The duration of rate limiting lease held by requests on the server." - - // AspnetcoreRateLimitingRequestTimeInQueue is the metric conforming to the - // "aspnetcore.rate_limiting.request.time_in_queue" semantic conventions. It - // represents the time the request spent in a queue waiting to acquire a rate - // limiting lease. - // Instrument: histogram - // Unit: s - // Stability: Stable - AspnetcoreRateLimitingRequestTimeInQueueName = "aspnetcore.rate_limiting.request.time_in_queue" - AspnetcoreRateLimitingRequestTimeInQueueUnit = "s" - AspnetcoreRateLimitingRequestTimeInQueueDescription = "The time the request spent in a queue waiting to acquire a rate limiting lease." - - // AspnetcoreRateLimitingQueuedRequests is the metric conforming to the - // "aspnetcore.rate_limiting.queued_requests" semantic conventions. It - // represents the number of requests that are currently queued, waiting to - // acquire a rate limiting lease. - // Instrument: updowncounter - // Unit: {request} - // Stability: Stable - AspnetcoreRateLimitingQueuedRequestsName = "aspnetcore.rate_limiting.queued_requests" - AspnetcoreRateLimitingQueuedRequestsUnit = "{request}" - AspnetcoreRateLimitingQueuedRequestsDescription = "Number of requests that are currently queued, waiting to acquire a rate limiting lease." - - // AspnetcoreRateLimitingRequests is the metric conforming to the - // "aspnetcore.rate_limiting.requests" semantic conventions. It represents the - // number of requests that tried to acquire a rate limiting lease. - // Instrument: counter - // Unit: {request} - // Stability: Stable - AspnetcoreRateLimitingRequestsName = "aspnetcore.rate_limiting.requests" - AspnetcoreRateLimitingRequestsUnit = "{request}" - AspnetcoreRateLimitingRequestsDescription = "Number of requests that tried to acquire a rate limiting lease." - - // KestrelActiveConnections is the metric conforming to the - // "kestrel.active_connections" semantic conventions. It represents the number - // of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Stable - KestrelActiveConnectionsName = "kestrel.active_connections" - KestrelActiveConnectionsUnit = "{connection}" - KestrelActiveConnectionsDescription = "Number of connections that are currently active on the server." - - // KestrelConnectionDuration is the metric conforming to the - // "kestrel.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: Stable - KestrelConnectionDurationName = "kestrel.connection.duration" - KestrelConnectionDurationUnit = "s" - KestrelConnectionDurationDescription = "The duration of connections on the server." - - // KestrelRejectedConnections is the metric conforming to the - // "kestrel.rejected_connections" semantic conventions. It represents the - // number of connections rejected by the server. - // Instrument: counter - // Unit: {connection} - // Stability: Stable - KestrelRejectedConnectionsName = "kestrel.rejected_connections" - KestrelRejectedConnectionsUnit = "{connection}" - KestrelRejectedConnectionsDescription = "Number of connections rejected by the server." - - // KestrelQueuedConnections is the metric conforming to the - // "kestrel.queued_connections" semantic conventions. It represents the number - // of connections that are currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Stable - KestrelQueuedConnectionsName = "kestrel.queued_connections" - KestrelQueuedConnectionsUnit = "{connection}" - KestrelQueuedConnectionsDescription = "Number of connections that are currently queued and are waiting to start." - - // KestrelQueuedRequests is the metric conforming to the - // "kestrel.queued_requests" semantic conventions. It represents the number of - // HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are - // currently queued and are waiting to start. - // Instrument: updowncounter - // Unit: {request} - // Stability: Stable - KestrelQueuedRequestsName = "kestrel.queued_requests" - KestrelQueuedRequestsUnit = "{request}" - KestrelQueuedRequestsDescription = "Number of HTTP requests on multiplexed connections (HTTP/2 and HTTP/3) that are currently queued and are waiting to start." - - // KestrelUpgradedConnections is the metric conforming to the - // "kestrel.upgraded_connections" semantic conventions. It represents the - // number of connections that are currently upgraded (WebSockets). . - // Instrument: updowncounter - // Unit: {connection} - // Stability: Stable - KestrelUpgradedConnectionsName = "kestrel.upgraded_connections" - KestrelUpgradedConnectionsUnit = "{connection}" - KestrelUpgradedConnectionsDescription = "Number of connections that are currently upgraded (WebSockets). ." - - // KestrelTLSHandshakeDuration is the metric conforming to the - // "kestrel.tls_handshake.duration" semantic conventions. It represents the - // duration of TLS handshakes on the server. - // Instrument: histogram - // Unit: s - // Stability: Stable - KestrelTLSHandshakeDurationName = "kestrel.tls_handshake.duration" - KestrelTLSHandshakeDurationUnit = "s" - KestrelTLSHandshakeDurationDescription = "The duration of TLS handshakes on the server." - - // KestrelActiveTLSHandshakes is the metric conforming to the - // "kestrel.active_tls_handshakes" semantic conventions. It represents the - // number of TLS handshakes that are currently in progress on the server. - // Instrument: updowncounter - // Unit: {handshake} - // Stability: Stable - KestrelActiveTLSHandshakesName = "kestrel.active_tls_handshakes" - KestrelActiveTLSHandshakesUnit = "{handshake}" - KestrelActiveTLSHandshakesDescription = "Number of TLS handshakes that are currently in progress on the server." - - // SignalrServerConnectionDuration is the metric conforming to the - // "signalr.server.connection.duration" semantic conventions. It represents the - // duration of connections on the server. - // Instrument: histogram - // Unit: s - // Stability: Stable - SignalrServerConnectionDurationName = "signalr.server.connection.duration" - SignalrServerConnectionDurationUnit = "s" - SignalrServerConnectionDurationDescription = "The duration of connections on the server." - - // SignalrServerActiveConnections is the metric conforming to the - // "signalr.server.active_connections" semantic conventions. It represents the - // number of connections that are currently active on the server. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Stable - SignalrServerActiveConnectionsName = "signalr.server.active_connections" - SignalrServerActiveConnectionsUnit = "{connection}" - SignalrServerActiveConnectionsDescription = "Number of connections that are currently active on the server." - - // FaaSInvokeDuration is the metric conforming to the "faas.invoke_duration" - // semantic conventions. It represents the measures the duration of the - // function's logic execution. - // Instrument: histogram - // Unit: s - // Stability: Experimental - FaaSInvokeDurationName = "faas.invoke_duration" - FaaSInvokeDurationUnit = "s" - FaaSInvokeDurationDescription = "Measures the duration of the function's logic execution" - - // FaaSInitDuration is the metric conforming to the "faas.init_duration" - // semantic conventions. It represents the measures the duration of the - // function's initialization, such as a cold start. - // Instrument: histogram - // Unit: s - // Stability: Experimental - FaaSInitDurationName = "faas.init_duration" - FaaSInitDurationUnit = "s" - FaaSInitDurationDescription = "Measures the duration of the function's initialization, such as a cold start" - - // FaaSColdstarts is the metric conforming to the "faas.coldstarts" semantic - // conventions. It represents the number of invocation cold starts. - // Instrument: counter - // Unit: {coldstart} - // Stability: Experimental - FaaSColdstartsName = "faas.coldstarts" - FaaSColdstartsUnit = "{coldstart}" - FaaSColdstartsDescription = "Number of invocation cold starts" - - // FaaSErrors is the metric conforming to the "faas.errors" semantic - // conventions. It represents the number of invocation errors. - // Instrument: counter - // Unit: {error} - // Stability: Experimental - FaaSErrorsName = "faas.errors" - FaaSErrorsUnit = "{error}" - FaaSErrorsDescription = "Number of invocation errors" - - // FaaSInvocations is the metric conforming to the "faas.invocations" semantic - // conventions. It represents the number of successful invocations. - // Instrument: counter - // Unit: {invocation} - // Stability: Experimental - FaaSInvocationsName = "faas.invocations" - FaaSInvocationsUnit = "{invocation}" - FaaSInvocationsDescription = "Number of successful invocations" - - // FaaSTimeouts is the metric conforming to the "faas.timeouts" semantic - // conventions. It represents the number of invocation timeouts. - // Instrument: counter - // Unit: {timeout} - // Stability: Experimental - FaaSTimeoutsName = "faas.timeouts" - FaaSTimeoutsUnit = "{timeout}" - FaaSTimeoutsDescription = "Number of invocation timeouts" - - // FaaSMemUsage is the metric conforming to the "faas.mem_usage" semantic - // conventions. It represents the distribution of max memory usage per - // invocation. - // Instrument: histogram - // Unit: By - // Stability: Experimental - FaaSMemUsageName = "faas.mem_usage" - FaaSMemUsageUnit = "By" - FaaSMemUsageDescription = "Distribution of max memory usage per invocation" - - // FaaSCPUUsage is the metric conforming to the "faas.cpu_usage" semantic - // conventions. It represents the distribution of CPU usage per invocation. - // Instrument: histogram - // Unit: s - // Stability: Experimental - FaaSCPUUsageName = "faas.cpu_usage" - FaaSCPUUsageUnit = "s" - FaaSCPUUsageDescription = "Distribution of CPU usage per invocation" - - // FaaSNetIo is the metric conforming to the "faas.net_io" semantic - // conventions. It represents the distribution of net I/O usage per invocation. - // Instrument: histogram - // Unit: By - // Stability: Experimental - FaaSNetIoName = "faas.net_io" - FaaSNetIoUnit = "By" - FaaSNetIoDescription = "Distribution of net I/O usage per invocation" - - // HTTPServerRequestDuration is the metric conforming to the - // "http.server.request.duration" semantic conventions. It represents the - // duration of HTTP server requests. - // Instrument: histogram - // Unit: s - // Stability: Stable - HTTPServerRequestDurationName = "http.server.request.duration" - HTTPServerRequestDurationUnit = "s" - HTTPServerRequestDurationDescription = "Duration of HTTP server requests." - - // HTTPServerActiveRequests is the metric conforming to the - // "http.server.active_requests" semantic conventions. It represents the number - // of active HTTP server requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: Experimental - HTTPServerActiveRequestsName = "http.server.active_requests" - HTTPServerActiveRequestsUnit = "{request}" - HTTPServerActiveRequestsDescription = "Number of active HTTP server requests." - - // HTTPServerRequestBodySize is the metric conforming to the - // "http.server.request.body.size" semantic conventions. It represents the size - // of HTTP server request bodies. - // Instrument: histogram - // Unit: By - // Stability: Experimental - HTTPServerRequestBodySizeName = "http.server.request.body.size" - HTTPServerRequestBodySizeUnit = "By" - HTTPServerRequestBodySizeDescription = "Size of HTTP server request bodies." - - // HTTPServerResponseBodySize is the metric conforming to the - // "http.server.response.body.size" semantic conventions. It represents the - // size of HTTP server response bodies. - // Instrument: histogram - // Unit: By - // Stability: Experimental - HTTPServerResponseBodySizeName = "http.server.response.body.size" - HTTPServerResponseBodySizeUnit = "By" - HTTPServerResponseBodySizeDescription = "Size of HTTP server response bodies." - - // HTTPClientRequestDuration is the metric conforming to the - // "http.client.request.duration" semantic conventions. It represents the - // duration of HTTP client requests. - // Instrument: histogram - // Unit: s - // Stability: Stable - HTTPClientRequestDurationName = "http.client.request.duration" - HTTPClientRequestDurationUnit = "s" - HTTPClientRequestDurationDescription = "Duration of HTTP client requests." - - // HTTPClientRequestBodySize is the metric conforming to the - // "http.client.request.body.size" semantic conventions. It represents the size - // of HTTP client request bodies. - // Instrument: histogram - // Unit: By - // Stability: Experimental - HTTPClientRequestBodySizeName = "http.client.request.body.size" - HTTPClientRequestBodySizeUnit = "By" - HTTPClientRequestBodySizeDescription = "Size of HTTP client request bodies." - - // HTTPClientResponseBodySize is the metric conforming to the - // "http.client.response.body.size" semantic conventions. It represents the - // size of HTTP client response bodies. - // Instrument: histogram - // Unit: By - // Stability: Experimental - HTTPClientResponseBodySizeName = "http.client.response.body.size" - HTTPClientResponseBodySizeUnit = "By" - HTTPClientResponseBodySizeDescription = "Size of HTTP client response bodies." - - // HTTPClientOpenConnections is the metric conforming to the - // "http.client.open_connections" semantic conventions. It represents the - // number of outbound HTTP connections that are currently active or idle on the - // client. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - HTTPClientOpenConnectionsName = "http.client.open_connections" - HTTPClientOpenConnectionsUnit = "{connection}" - HTTPClientOpenConnectionsDescription = "Number of outbound HTTP connections that are currently active or idle on the client." - - // HTTPClientConnectionDuration is the metric conforming to the - // "http.client.connection.duration" semantic conventions. It represents the - // duration of the successfully established outbound HTTP connections. - // Instrument: histogram - // Unit: s - // Stability: Experimental - HTTPClientConnectionDurationName = "http.client.connection.duration" - HTTPClientConnectionDurationUnit = "s" - HTTPClientConnectionDurationDescription = "The duration of the successfully established outbound HTTP connections." - - // HTTPClientActiveRequests is the metric conforming to the - // "http.client.active_requests" semantic conventions. It represents the number - // of active HTTP requests. - // Instrument: updowncounter - // Unit: {request} - // Stability: Experimental - HTTPClientActiveRequestsName = "http.client.active_requests" - HTTPClientActiveRequestsUnit = "{request}" - HTTPClientActiveRequestsDescription = "Number of active HTTP requests." - - // JvmMemoryInit is the metric conforming to the "jvm.memory.init" semantic - // conventions. It represents the measure of initial memory requested. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - JvmMemoryInitName = "jvm.memory.init" - JvmMemoryInitUnit = "By" - JvmMemoryInitDescription = "Measure of initial memory requested." - - // JvmSystemCPUUtilization is the metric conforming to the - // "jvm.system.cpu.utilization" semantic conventions. It represents the recent - // CPU utilization for the whole system as reported by the JVM. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - JvmSystemCPUUtilizationName = "jvm.system.cpu.utilization" - JvmSystemCPUUtilizationUnit = "1" - JvmSystemCPUUtilizationDescription = "Recent CPU utilization for the whole system as reported by the JVM." - - // JvmSystemCPULoad1m is the metric conforming to the "jvm.system.cpu.load_1m" - // semantic conventions. It represents the average CPU load of the whole system - // for the last minute as reported by the JVM. - // Instrument: gauge - // Unit: {run_queue_item} - // Stability: Experimental - JvmSystemCPULoad1mName = "jvm.system.cpu.load_1m" - JvmSystemCPULoad1mUnit = "{run_queue_item}" - JvmSystemCPULoad1mDescription = "Average CPU load of the whole system for the last minute as reported by the JVM." - - // JvmBufferMemoryUsage is the metric conforming to the - // "jvm.buffer.memory.usage" semantic conventions. It represents the measure of - // memory used by buffers. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - JvmBufferMemoryUsageName = "jvm.buffer.memory.usage" - JvmBufferMemoryUsageUnit = "By" - JvmBufferMemoryUsageDescription = "Measure of memory used by buffers." - - // JvmBufferMemoryLimit is the metric conforming to the - // "jvm.buffer.memory.limit" semantic conventions. It represents the measure of - // total memory capacity of buffers. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - JvmBufferMemoryLimitName = "jvm.buffer.memory.limit" - JvmBufferMemoryLimitUnit = "By" - JvmBufferMemoryLimitDescription = "Measure of total memory capacity of buffers." - - // JvmBufferCount is the metric conforming to the "jvm.buffer.count" semantic - // conventions. It represents the number of buffers in the pool. - // Instrument: updowncounter - // Unit: {buffer} - // Stability: Experimental - JvmBufferCountName = "jvm.buffer.count" - JvmBufferCountUnit = "{buffer}" - JvmBufferCountDescription = "Number of buffers in the pool." - - // JvmMemoryUsed is the metric conforming to the "jvm.memory.used" semantic - // conventions. It represents the measure of memory used. - // Instrument: updowncounter - // Unit: By - // Stability: Stable - JvmMemoryUsedName = "jvm.memory.used" - JvmMemoryUsedUnit = "By" - JvmMemoryUsedDescription = "Measure of memory used." - - // JvmMemoryCommitted is the metric conforming to the "jvm.memory.committed" - // semantic conventions. It represents the measure of memory committed. - // Instrument: updowncounter - // Unit: By - // Stability: Stable - JvmMemoryCommittedName = "jvm.memory.committed" - JvmMemoryCommittedUnit = "By" - JvmMemoryCommittedDescription = "Measure of memory committed." - - // JvmMemoryLimit is the metric conforming to the "jvm.memory.limit" semantic - // conventions. It represents the measure of max obtainable memory. - // Instrument: updowncounter - // Unit: By - // Stability: Stable - JvmMemoryLimitName = "jvm.memory.limit" - JvmMemoryLimitUnit = "By" - JvmMemoryLimitDescription = "Measure of max obtainable memory." - - // JvmMemoryUsedAfterLastGc is the metric conforming to the - // "jvm.memory.used_after_last_gc" semantic conventions. It represents the - // measure of memory used, as measured after the most recent garbage collection - // event on this pool. - // Instrument: updowncounter - // Unit: By - // Stability: Stable - JvmMemoryUsedAfterLastGcName = "jvm.memory.used_after_last_gc" - JvmMemoryUsedAfterLastGcUnit = "By" - JvmMemoryUsedAfterLastGcDescription = "Measure of memory used, as measured after the most recent garbage collection event on this pool." - - // JvmGcDuration is the metric conforming to the "jvm.gc.duration" semantic - // conventions. It represents the duration of JVM garbage collection actions. - // Instrument: histogram - // Unit: s - // Stability: Stable - JvmGcDurationName = "jvm.gc.duration" - JvmGcDurationUnit = "s" - JvmGcDurationDescription = "Duration of JVM garbage collection actions." - - // JvmThreadCount is the metric conforming to the "jvm.thread.count" semantic - // conventions. It represents the number of executing platform threads. - // Instrument: updowncounter - // Unit: {thread} - // Stability: Stable - JvmThreadCountName = "jvm.thread.count" - JvmThreadCountUnit = "{thread}" - JvmThreadCountDescription = "Number of executing platform threads." - - // JvmClassLoaded is the metric conforming to the "jvm.class.loaded" semantic - // conventions. It represents the number of classes loaded since JVM start. - // Instrument: counter - // Unit: {class} - // Stability: Stable - JvmClassLoadedName = "jvm.class.loaded" - JvmClassLoadedUnit = "{class}" - JvmClassLoadedDescription = "Number of classes loaded since JVM start." - - // JvmClassUnloaded is the metric conforming to the "jvm.class.unloaded" - // semantic conventions. It represents the number of classes unloaded since JVM - // start. - // Instrument: counter - // Unit: {class} - // Stability: Stable - JvmClassUnloadedName = "jvm.class.unloaded" - JvmClassUnloadedUnit = "{class}" - JvmClassUnloadedDescription = "Number of classes unloaded since JVM start." - - // JvmClassCount is the metric conforming to the "jvm.class.count" semantic - // conventions. It represents the number of classes currently loaded. - // Instrument: updowncounter - // Unit: {class} - // Stability: Stable - JvmClassCountName = "jvm.class.count" - JvmClassCountUnit = "{class}" - JvmClassCountDescription = "Number of classes currently loaded." - - // JvmCPUCount is the metric conforming to the "jvm.cpu.count" semantic - // conventions. It represents the number of processors available to the Java - // virtual machine. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: Stable - JvmCPUCountName = "jvm.cpu.count" - JvmCPUCountUnit = "{cpu}" - JvmCPUCountDescription = "Number of processors available to the Java virtual machine." - - // JvmCPUTime is the metric conforming to the "jvm.cpu.time" semantic - // conventions. It represents the cPU time used by the process as reported by - // the JVM. - // Instrument: counter - // Unit: s - // Stability: Stable - JvmCPUTimeName = "jvm.cpu.time" - JvmCPUTimeUnit = "s" - JvmCPUTimeDescription = "CPU time used by the process as reported by the JVM." - - // JvmCPURecentUtilization is the metric conforming to the - // "jvm.cpu.recent_utilization" semantic conventions. It represents the recent - // CPU utilization for the process as reported by the JVM. - // Instrument: gauge - // Unit: 1 - // Stability: Stable - JvmCPURecentUtilizationName = "jvm.cpu.recent_utilization" - JvmCPURecentUtilizationUnit = "1" - JvmCPURecentUtilizationDescription = "Recent CPU utilization for the process as reported by the JVM." - - // MessagingPublishDuration is the metric conforming to the - // "messaging.publish.duration" semantic conventions. It represents the - // measures the duration of publish operation. - // Instrument: histogram - // Unit: s - // Stability: Experimental - MessagingPublishDurationName = "messaging.publish.duration" - MessagingPublishDurationUnit = "s" - MessagingPublishDurationDescription = "Measures the duration of publish operation." - - // MessagingReceiveDuration is the metric conforming to the - // "messaging.receive.duration" semantic conventions. It represents the - // measures the duration of receive operation. - // Instrument: histogram - // Unit: s - // Stability: Experimental - MessagingReceiveDurationName = "messaging.receive.duration" - MessagingReceiveDurationUnit = "s" - MessagingReceiveDurationDescription = "Measures the duration of receive operation." - - // MessagingProcessDuration is the metric conforming to the - // "messaging.process.duration" semantic conventions. It represents the - // measures the duration of process operation. - // Instrument: histogram - // Unit: s - // Stability: Experimental - MessagingProcessDurationName = "messaging.process.duration" - MessagingProcessDurationUnit = "s" - MessagingProcessDurationDescription = "Measures the duration of process operation." - - // MessagingPublishMessages is the metric conforming to the - // "messaging.publish.messages" semantic conventions. It represents the - // measures the number of published messages. - // Instrument: counter - // Unit: {message} - // Stability: Experimental - MessagingPublishMessagesName = "messaging.publish.messages" - MessagingPublishMessagesUnit = "{message}" - MessagingPublishMessagesDescription = "Measures the number of published messages." - - // MessagingReceiveMessages is the metric conforming to the - // "messaging.receive.messages" semantic conventions. It represents the - // measures the number of received messages. - // Instrument: counter - // Unit: {message} - // Stability: Experimental - MessagingReceiveMessagesName = "messaging.receive.messages" - MessagingReceiveMessagesUnit = "{message}" - MessagingReceiveMessagesDescription = "Measures the number of received messages." - - // MessagingProcessMessages is the metric conforming to the - // "messaging.process.messages" semantic conventions. It represents the - // measures the number of processed messages. - // Instrument: counter - // Unit: {message} - // Stability: Experimental - MessagingProcessMessagesName = "messaging.process.messages" - MessagingProcessMessagesUnit = "{message}" - MessagingProcessMessagesDescription = "Measures the number of processed messages." - - // ProcessCPUTime is the metric conforming to the "process.cpu.time" semantic - // conventions. It represents the total CPU seconds broken down by different - // states. - // Instrument: counter - // Unit: s - // Stability: Experimental - ProcessCPUTimeName = "process.cpu.time" - ProcessCPUTimeUnit = "s" - ProcessCPUTimeDescription = "Total CPU seconds broken down by different states." - - // ProcessCPUUtilization is the metric conforming to the - // "process.cpu.utilization" semantic conventions. It represents the difference - // in process.cpu.time since the last measurement, divided by the elapsed time - // and number of CPUs available to the process. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - ProcessCPUUtilizationName = "process.cpu.utilization" - ProcessCPUUtilizationUnit = "1" - ProcessCPUUtilizationDescription = "Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process." - - // ProcessMemoryUsage is the metric conforming to the "process.memory.usage" - // semantic conventions. It represents the amount of physical memory in use. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - ProcessMemoryUsageName = "process.memory.usage" - ProcessMemoryUsageUnit = "By" - ProcessMemoryUsageDescription = "The amount of physical memory in use." - - // ProcessMemoryVirtual is the metric conforming to the - // "process.memory.virtual" semantic conventions. It represents the amount of - // committed virtual memory. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - ProcessMemoryVirtualName = "process.memory.virtual" - ProcessMemoryVirtualUnit = "By" - ProcessMemoryVirtualDescription = "The amount of committed virtual memory." - - // ProcessDiskIo is the metric conforming to the "process.disk.io" semantic - // conventions. It represents the disk bytes transferred. - // Instrument: counter - // Unit: By - // Stability: Experimental - ProcessDiskIoName = "process.disk.io" - ProcessDiskIoUnit = "By" - ProcessDiskIoDescription = "Disk bytes transferred." - - // ProcessNetworkIo is the metric conforming to the "process.network.io" - // semantic conventions. It represents the network bytes transferred. - // Instrument: counter - // Unit: By - // Stability: Experimental - ProcessNetworkIoName = "process.network.io" - ProcessNetworkIoUnit = "By" - ProcessNetworkIoDescription = "Network bytes transferred." - - // ProcessThreadCount is the metric conforming to the "process.thread.count" - // semantic conventions. It represents the process threads count. - // Instrument: updowncounter - // Unit: {thread} - // Stability: Experimental - ProcessThreadCountName = "process.thread.count" - ProcessThreadCountUnit = "{thread}" - ProcessThreadCountDescription = "Process threads count." - - // ProcessOpenFileDescriptorCount is the metric conforming to the - // "process.open_file_descriptor.count" semantic conventions. It represents the - // number of file descriptors in use by the process. - // Instrument: updowncounter - // Unit: {count} - // Stability: Experimental - ProcessOpenFileDescriptorCountName = "process.open_file_descriptor.count" - ProcessOpenFileDescriptorCountUnit = "{count}" - ProcessOpenFileDescriptorCountDescription = "Number of file descriptors in use by the process." - - // ProcessContextSwitches is the metric conforming to the - // "process.context_switches" semantic conventions. It represents the number of - // times the process has been context switched. - // Instrument: counter - // Unit: {count} - // Stability: Experimental - ProcessContextSwitchesName = "process.context_switches" - ProcessContextSwitchesUnit = "{count}" - ProcessContextSwitchesDescription = "Number of times the process has been context switched." - - // ProcessPagingFaults is the metric conforming to the "process.paging.faults" - // semantic conventions. It represents the number of page faults the process - // has made. - // Instrument: counter - // Unit: {fault} - // Stability: Experimental - ProcessPagingFaultsName = "process.paging.faults" - ProcessPagingFaultsUnit = "{fault}" - ProcessPagingFaultsDescription = "Number of page faults the process has made." - - // RPCServerDuration is the metric conforming to the "rpc.server.duration" - // semantic conventions. It represents the measures the duration of inbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: Experimental - RPCServerDurationName = "rpc.server.duration" - RPCServerDurationUnit = "ms" - RPCServerDurationDescription = "Measures the duration of inbound RPC." - - // RPCServerRequestSize is the metric conforming to the - // "rpc.server.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: Experimental - RPCServerRequestSizeName = "rpc.server.request.size" - RPCServerRequestSizeUnit = "By" - RPCServerRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - - // RPCServerResponseSize is the metric conforming to the - // "rpc.server.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: Experimental - RPCServerResponseSizeName = "rpc.server.response.size" - RPCServerResponseSizeUnit = "By" - RPCServerResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - - // RPCServerRequestsPerRPC is the metric conforming to the - // "rpc.server.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: Experimental - RPCServerRequestsPerRPCName = "rpc.server.requests_per_rpc" - RPCServerRequestsPerRPCUnit = "{count}" - RPCServerRequestsPerRPCDescription = "Measures the number of messages received per RPC." - - // RPCServerResponsesPerRPC is the metric conforming to the - // "rpc.server.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: Experimental - RPCServerResponsesPerRPCName = "rpc.server.responses_per_rpc" - RPCServerResponsesPerRPCUnit = "{count}" - RPCServerResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - - // RPCClientDuration is the metric conforming to the "rpc.client.duration" - // semantic conventions. It represents the measures the duration of outbound - // RPC. - // Instrument: histogram - // Unit: ms - // Stability: Experimental - RPCClientDurationName = "rpc.client.duration" - RPCClientDurationUnit = "ms" - RPCClientDurationDescription = "Measures the duration of outbound RPC." - - // RPCClientRequestSize is the metric conforming to the - // "rpc.client.request.size" semantic conventions. It represents the measures - // the size of RPC request messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: Experimental - RPCClientRequestSizeName = "rpc.client.request.size" - RPCClientRequestSizeUnit = "By" - RPCClientRequestSizeDescription = "Measures the size of RPC request messages (uncompressed)." - - // RPCClientResponseSize is the metric conforming to the - // "rpc.client.response.size" semantic conventions. It represents the measures - // the size of RPC response messages (uncompressed). - // Instrument: histogram - // Unit: By - // Stability: Experimental - RPCClientResponseSizeName = "rpc.client.response.size" - RPCClientResponseSizeUnit = "By" - RPCClientResponseSizeDescription = "Measures the size of RPC response messages (uncompressed)." - - // RPCClientRequestsPerRPC is the metric conforming to the - // "rpc.client.requests_per_rpc" semantic conventions. It represents the - // measures the number of messages received per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: Experimental - RPCClientRequestsPerRPCName = "rpc.client.requests_per_rpc" - RPCClientRequestsPerRPCUnit = "{count}" - RPCClientRequestsPerRPCDescription = "Measures the number of messages received per RPC." - - // RPCClientResponsesPerRPC is the metric conforming to the - // "rpc.client.responses_per_rpc" semantic conventions. It represents the - // measures the number of messages sent per RPC. - // Instrument: histogram - // Unit: {count} - // Stability: Experimental - RPCClientResponsesPerRPCName = "rpc.client.responses_per_rpc" - RPCClientResponsesPerRPCUnit = "{count}" - RPCClientResponsesPerRPCDescription = "Measures the number of messages sent per RPC." - - // SystemCPUTime is the metric conforming to the "system.cpu.time" semantic - // conventions. It represents the seconds each logical CPU spent on each mode. - // Instrument: counter - // Unit: s - // Stability: Experimental - SystemCPUTimeName = "system.cpu.time" - SystemCPUTimeUnit = "s" - SystemCPUTimeDescription = "Seconds each logical CPU spent on each mode" - - // SystemCPUUtilization is the metric conforming to the - // "system.cpu.utilization" semantic conventions. It represents the difference - // in system.cpu.time since the last measurement, divided by the elapsed time - // and number of logical CPUs. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - SystemCPUUtilizationName = "system.cpu.utilization" - SystemCPUUtilizationUnit = "1" - SystemCPUUtilizationDescription = "Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of logical CPUs" - - // SystemCPUFrequency is the metric conforming to the "system.cpu.frequency" - // semantic conventions. It represents the reports the current frequency of the - // CPU in Hz. - // Instrument: gauge - // Unit: {Hz} - // Stability: Experimental - SystemCPUFrequencyName = "system.cpu.frequency" - SystemCPUFrequencyUnit = "{Hz}" - SystemCPUFrequencyDescription = "Reports the current frequency of the CPU in Hz" - - // SystemCPUPhysicalCount is the metric conforming to the - // "system.cpu.physical.count" semantic conventions. It represents the reports - // the number of actual physical processor cores on the hardware. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: Experimental - SystemCPUPhysicalCountName = "system.cpu.physical.count" - SystemCPUPhysicalCountUnit = "{cpu}" - SystemCPUPhysicalCountDescription = "Reports the number of actual physical processor cores on the hardware" - - // SystemCPULogicalCount is the metric conforming to the - // "system.cpu.logical.count" semantic conventions. It represents the reports - // the number of logical (virtual) processor cores created by the operating - // system to manage multitasking. - // Instrument: updowncounter - // Unit: {cpu} - // Stability: Experimental - SystemCPULogicalCountName = "system.cpu.logical.count" - SystemCPULogicalCountUnit = "{cpu}" - SystemCPULogicalCountDescription = "Reports the number of logical (virtual) processor cores created by the operating system to manage multitasking" - - // SystemMemoryUsage is the metric conforming to the "system.memory.usage" - // semantic conventions. It represents the reports memory in use by state. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - SystemMemoryUsageName = "system.memory.usage" - SystemMemoryUsageUnit = "By" - SystemMemoryUsageDescription = "Reports memory in use by state." - - // SystemMemoryLimit is the metric conforming to the "system.memory.limit" - // semantic conventions. It represents the total memory available in the - // system. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - SystemMemoryLimitName = "system.memory.limit" - SystemMemoryLimitUnit = "By" - SystemMemoryLimitDescription = "Total memory available in the system." - - // SystemMemoryShared is the metric conforming to the "system.memory.shared" - // semantic conventions. It represents the shared memory used (mostly by - // tmpfs). - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - SystemMemorySharedName = "system.memory.shared" - SystemMemorySharedUnit = "By" - SystemMemorySharedDescription = "Shared memory used (mostly by tmpfs)." - - // SystemMemoryUtilization is the metric conforming to the - // "system.memory.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemMemoryUtilizationName = "system.memory.utilization" - SystemMemoryUtilizationUnit = "1" - - // SystemPagingUsage is the metric conforming to the "system.paging.usage" - // semantic conventions. It represents the unix swap or windows pagefile usage. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - SystemPagingUsageName = "system.paging.usage" - SystemPagingUsageUnit = "By" - SystemPagingUsageDescription = "Unix swap or windows pagefile usage" - - // SystemPagingUtilization is the metric conforming to the - // "system.paging.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingUtilizationName = "system.paging.utilization" - SystemPagingUtilizationUnit = "1" - - // SystemPagingFaults is the metric conforming to the "system.paging.faults" - // semantic conventions. - // Instrument: counter - // Unit: {fault} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingFaultsName = "system.paging.faults" - SystemPagingFaultsUnit = "{fault}" - - // SystemPagingOperations is the metric conforming to the - // "system.paging.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemPagingOperationsName = "system.paging.operations" - SystemPagingOperationsUnit = "{operation}" - - // SystemDiskIo is the metric conforming to the "system.disk.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskIoName = "system.disk.io" - SystemDiskIoUnit = "By" - - // SystemDiskOperations is the metric conforming to the - // "system.disk.operations" semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskOperationsName = "system.disk.operations" - SystemDiskOperationsUnit = "{operation}" - - // SystemDiskIoTime is the metric conforming to the "system.disk.io_time" - // semantic conventions. It represents the time disk spent activated. - // Instrument: counter - // Unit: s - // Stability: Experimental - SystemDiskIoTimeName = "system.disk.io_time" - SystemDiskIoTimeUnit = "s" - SystemDiskIoTimeDescription = "Time disk spent activated" - - // SystemDiskOperationTime is the metric conforming to the - // "system.disk.operation_time" semantic conventions. It represents the sum of - // the time each operation took to complete. - // Instrument: counter - // Unit: s - // Stability: Experimental - SystemDiskOperationTimeName = "system.disk.operation_time" - SystemDiskOperationTimeUnit = "s" - SystemDiskOperationTimeDescription = "Sum of the time each operation took to complete" - - // SystemDiskMerged is the metric conforming to the "system.disk.merged" - // semantic conventions. - // Instrument: counter - // Unit: {operation} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemDiskMergedName = "system.disk.merged" - SystemDiskMergedUnit = "{operation}" - - // SystemFilesystemUsage is the metric conforming to the - // "system.filesystem.usage" semantic conventions. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemFilesystemUsageName = "system.filesystem.usage" - SystemFilesystemUsageUnit = "By" - - // SystemFilesystemUtilization is the metric conforming to the - // "system.filesystem.utilization" semantic conventions. - // Instrument: gauge - // Unit: 1 - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemFilesystemUtilizationName = "system.filesystem.utilization" - SystemFilesystemUtilizationUnit = "1" - - // SystemNetworkDropped is the metric conforming to the - // "system.network.dropped" semantic conventions. It represents the count of - // packets that are dropped or discarded even though there was no error. - // Instrument: counter - // Unit: {packet} - // Stability: Experimental - SystemNetworkDroppedName = "system.network.dropped" - SystemNetworkDroppedUnit = "{packet}" - SystemNetworkDroppedDescription = "Count of packets that are dropped or discarded even though there was no error" - - // SystemNetworkPackets is the metric conforming to the - // "system.network.packets" semantic conventions. - // Instrument: counter - // Unit: {packet} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkPacketsName = "system.network.packets" - SystemNetworkPacketsUnit = "{packet}" - - // SystemNetworkErrors is the metric conforming to the "system.network.errors" - // semantic conventions. It represents the count of network errors detected. - // Instrument: counter - // Unit: {error} - // Stability: Experimental - SystemNetworkErrorsName = "system.network.errors" - SystemNetworkErrorsUnit = "{error}" - SystemNetworkErrorsDescription = "Count of network errors detected" - - // SystemNetworkIo is the metric conforming to the "system.network.io" semantic - // conventions. - // Instrument: counter - // Unit: By - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkIoName = "system.network.io" - SystemNetworkIoUnit = "By" - - // SystemNetworkConnections is the metric conforming to the - // "system.network.connections" semantic conventions. - // Instrument: updowncounter - // Unit: {connection} - // Stability: Experimental - // NOTE: The description (brief) for this metric is not defined in the semantic-conventions repository. - SystemNetworkConnectionsName = "system.network.connections" - SystemNetworkConnectionsUnit = "{connection}" - - // SystemProcessCount is the metric conforming to the "system.process.count" - // semantic conventions. It represents the total number of processes in each - // state. - // Instrument: updowncounter - // Unit: {process} - // Stability: Experimental - SystemProcessCountName = "system.process.count" - SystemProcessCountUnit = "{process}" - SystemProcessCountDescription = "Total number of processes in each state" - - // SystemProcessCreated is the metric conforming to the - // "system.process.created" semantic conventions. It represents the total - // number of processes created over uptime of the host. - // Instrument: counter - // Unit: {process} - // Stability: Experimental - SystemProcessCreatedName = "system.process.created" - SystemProcessCreatedUnit = "{process}" - SystemProcessCreatedDescription = "Total number of processes created over uptime of the host" - - // SystemLinuxMemoryAvailable is the metric conforming to the - // "system.linux.memory.available" semantic conventions. It represents an - // estimate of how much memory is available for starting new applications, - // without causing swapping. - // Instrument: updowncounter - // Unit: By - // Stability: Experimental - SystemLinuxMemoryAvailableName = "system.linux.memory.available" - SystemLinuxMemoryAvailableUnit = "By" - SystemLinuxMemoryAvailableDescription = "An estimate of how much memory is available for starting new applications, without causing swapping" -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go deleted file mode 100644 index 4c87c7adcc..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.26.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.26.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.26.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/MIGRATION.md b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/MIGRATION.md deleted file mode 100644 index 2480547895..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/MIGRATION.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Migration from v1.36.0 to v1.37.0 - -The `go.opentelemetry.io/otel/semconv/v1.37.0` package should be a drop-in replacement for `go.opentelemetry.io/otel/semconv/v1.36.0` with the following exceptions. - -## Removed - -The following declarations have been removed. -Refer to the [OpenTelemetry Semantic Conventions documentation] for deprecation instructions. - -If the type is not listed in the documentation as deprecated, it has been removed in this version due to lack of applicability or use. -If you use any of these non-deprecated declarations in your Go application, please [open an issue] describing your use-case. - -- `ContainerRuntime` -- `ContainerRuntimeKey` -- `GenAIOpenAIRequestServiceTierAuto` -- `GenAIOpenAIRequestServiceTierDefault` -- `GenAIOpenAIRequestServiceTierKey` -- `GenAIOpenAIResponseServiceTier` -- `GenAIOpenAIResponseServiceTierKey` -- `GenAIOpenAIResponseSystemFingerprint` -- `GenAIOpenAIResponseSystemFingerprintKey` -- `GenAISystemAWSBedrock` -- `GenAISystemAnthropic` -- `GenAISystemAzureAIInference` -- `GenAISystemAzureAIOpenAI` -- `GenAISystemCohere` -- `GenAISystemDeepseek` -- `GenAISystemGCPGemini` -- `GenAISystemGCPGenAI` -- `GenAISystemGCPVertexAI` -- `GenAISystemGroq` -- `GenAISystemIBMWatsonxAI` -- `GenAISystemKey` -- `GenAISystemMistralAI` -- `GenAISystemOpenAI` -- `GenAISystemPerplexity` -- `GenAISystemXai` - -[OpenTelemetry Semantic Conventions documentation]: https://github.com/open-telemetry/semantic-conventions -[open an issue]: https://github.com/open-telemetry/opentelemetry-go/issues/new?template=Blank+issue diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/README.md b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/README.md deleted file mode 100644 index d795247f32..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Semconv v1.37.0 - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/semconv/v1.37.0)](https://pkg.go.dev/go.opentelemetry.io/otel/semconv/v1.37.0) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go deleted file mode 100644 index b6b27498f2..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go +++ /dev/null @@ -1,15193 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Code generated from semantic convention specification. DO NOT EDIT. - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" - -import "go.opentelemetry.io/otel/attribute" - -// Namespace: android -const ( - // AndroidAppStateKey is the attribute Key conforming to the "android.app.state" - // semantic conventions. It represents the this attribute represents the state - // of the application. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "created" - // Note: The Android lifecycle states are defined in - // [Activity lifecycle callbacks], and from which the `OS identifiers` are - // derived. - // - // [Activity lifecycle callbacks]: https://developer.android.com/guide/components/activities/activity-lifecycle#lc - AndroidAppStateKey = attribute.Key("android.app.state") - - // AndroidOSAPILevelKey is the attribute Key conforming to the - // "android.os.api_level" semantic conventions. It represents the uniquely - // identifies the framework API revision offered by a version (`os.version`) of - // the android operating system. More information can be found in the - // [Android API levels documentation]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "33", "32" - // - // [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels - AndroidOSAPILevelKey = attribute.Key("android.os.api_level") -) - -// AndroidOSAPILevel returns an attribute KeyValue conforming to the -// "android.os.api_level" semantic conventions. It represents the uniquely -// identifies the framework API revision offered by a version (`os.version`) of -// the android operating system. More information can be found in the -// [Android API levels documentation]. -// -// [Android API levels documentation]: https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels -func AndroidOSAPILevel(val string) attribute.KeyValue { - return AndroidOSAPILevelKey.String(val) -} - -// Enum values for android.app.state -var ( - // Any time before Activity.onResume() or, if the app has no Activity, - // Context.startService() has been called in the app for the first time. - // - // Stability: development - AndroidAppStateCreated = AndroidAppStateKey.String("created") - // Any time after Activity.onPause() or, if the app has no Activity, - // Context.stopService() has been called when the app was in the foreground - // state. - // - // Stability: development - AndroidAppStateBackground = AndroidAppStateKey.String("background") - // Any time after Activity.onResume() or, if the app has no Activity, - // Context.startService() has been called when the app was in either the created - // or background states. - // - // Stability: development - AndroidAppStateForeground = AndroidAppStateKey.String("foreground") -) - -// Namespace: app -const ( - // AppBuildIDKey is the attribute Key conforming to the "app.build_id" semantic - // conventions. It represents the unique identifier for a particular build or - // compilation of the application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "6cff0a7e-cefc-4668-96f5-1273d8b334d0", - // "9f2b833506aa6973a92fde9733e6271f", "my-app-1.0.0-code-123" - AppBuildIDKey = attribute.Key("app.build_id") - - // AppInstallationIDKey is the attribute Key conforming to the - // "app.installation.id" semantic conventions. It represents a unique identifier - // representing the installation of an application on a specific device. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2ab2916d-a51f-4ac8-80ee-45ac31a28092" - // Note: Its value SHOULD persist across launches of the same application - // installation, including through application upgrades. - // It SHOULD change if the application is uninstalled or if all applications of - // the vendor are uninstalled. - // Additionally, users might be able to reset this value (e.g. by clearing - // application data). - // If an app is installed multiple times on the same device (e.g. in different - // accounts on Android), each `app.installation.id` SHOULD have a different - // value. - // If multiple OpenTelemetry SDKs are used within the same application, they - // SHOULD use the same value for `app.installation.id`. - // Hardware IDs (e.g. serial number, IMEI, MAC address) MUST NOT be used as the - // `app.installation.id`. - // - // For iOS, this value SHOULD be equal to the [vendor identifier]. - // - // For Android, examples of `app.installation.id` implementations include: - // - // - [Firebase Installation ID]. - // - A globally unique UUID which is persisted across sessions in your - // application. - // - [App set ID]. - // - [`Settings.getString(Settings.Secure.ANDROID_ID)`]. - // - // More information about Android identifier best practices can be found in the - // [Android user data IDs guide]. - // - // [vendor identifier]: https://developer.apple.com/documentation/uikit/uidevice/identifierforvendor - // [Firebase Installation ID]: https://firebase.google.com/docs/projects/manage-installations - // [App set ID]: https://developer.android.com/identity/app-set-id - // [`Settings.getString(Settings.Secure.ANDROID_ID)`]: https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID - // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids - AppInstallationIDKey = attribute.Key("app.installation.id") - - // AppJankFrameCountKey is the attribute Key conforming to the - // "app.jank.frame_count" semantic conventions. It represents a number of frame - // renders that experienced jank. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 9, 42 - // Note: Depending on platform limitations, the value provided MAY be - // approximation. - AppJankFrameCountKey = attribute.Key("app.jank.frame_count") - - // AppJankPeriodKey is the attribute Key conforming to the "app.jank.period" - // semantic conventions. It represents the time period, in seconds, for which - // this jank is being reported. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0, 5.0, 10.24 - AppJankPeriodKey = attribute.Key("app.jank.period") - - // AppJankThresholdKey is the attribute Key conforming to the - // "app.jank.threshold" semantic conventions. It represents the minimum - // rendering threshold for this jank, in seconds. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0.016, 0.7, 1.024 - AppJankThresholdKey = attribute.Key("app.jank.threshold") - - // AppScreenCoordinateXKey is the attribute Key conforming to the - // "app.screen.coordinate.x" semantic conventions. It represents the x - // (horizontal) coordinate of a screen coordinate, in screen pixels. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0, 131 - AppScreenCoordinateXKey = attribute.Key("app.screen.coordinate.x") - - // AppScreenCoordinateYKey is the attribute Key conforming to the - // "app.screen.coordinate.y" semantic conventions. It represents the y - // (vertical) component of a screen coordinate, in screen pixels. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 12, 99 - AppScreenCoordinateYKey = attribute.Key("app.screen.coordinate.y") - - // AppWidgetIDKey is the attribute Key conforming to the "app.widget.id" - // semantic conventions. It represents an identifier that uniquely - // differentiates this widget from other widgets in the same application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "f9bc787d-ff05-48ad-90e1-fca1d46130b3", "submit_order_1829" - // Note: A widget is an application component, typically an on-screen visual GUI - // element. - AppWidgetIDKey = attribute.Key("app.widget.id") - - // AppWidgetNameKey is the attribute Key conforming to the "app.widget.name" - // semantic conventions. It represents the name of an application widget. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "submit", "attack", "Clear Cart" - // Note: A widget is an application component, typically an on-screen visual GUI - // element. - AppWidgetNameKey = attribute.Key("app.widget.name") -) - -// AppBuildID returns an attribute KeyValue conforming to the "app.build_id" -// semantic conventions. It represents the unique identifier for a particular -// build or compilation of the application. -func AppBuildID(val string) attribute.KeyValue { - return AppBuildIDKey.String(val) -} - -// AppInstallationID returns an attribute KeyValue conforming to the -// "app.installation.id" semantic conventions. It represents a unique identifier -// representing the installation of an application on a specific device. -func AppInstallationID(val string) attribute.KeyValue { - return AppInstallationIDKey.String(val) -} - -// AppJankFrameCount returns an attribute KeyValue conforming to the -// "app.jank.frame_count" semantic conventions. It represents a number of frame -// renders that experienced jank. -func AppJankFrameCount(val int) attribute.KeyValue { - return AppJankFrameCountKey.Int(val) -} - -// AppJankPeriod returns an attribute KeyValue conforming to the -// "app.jank.period" semantic conventions. It represents the time period, in -// seconds, for which this jank is being reported. -func AppJankPeriod(val float64) attribute.KeyValue { - return AppJankPeriodKey.Float64(val) -} - -// AppJankThreshold returns an attribute KeyValue conforming to the -// "app.jank.threshold" semantic conventions. It represents the minimum rendering -// threshold for this jank, in seconds. -func AppJankThreshold(val float64) attribute.KeyValue { - return AppJankThresholdKey.Float64(val) -} - -// AppScreenCoordinateX returns an attribute KeyValue conforming to the -// "app.screen.coordinate.x" semantic conventions. It represents the x -// (horizontal) coordinate of a screen coordinate, in screen pixels. -func AppScreenCoordinateX(val int) attribute.KeyValue { - return AppScreenCoordinateXKey.Int(val) -} - -// AppScreenCoordinateY returns an attribute KeyValue conforming to the -// "app.screen.coordinate.y" semantic conventions. It represents the y (vertical) -// component of a screen coordinate, in screen pixels. -func AppScreenCoordinateY(val int) attribute.KeyValue { - return AppScreenCoordinateYKey.Int(val) -} - -// AppWidgetID returns an attribute KeyValue conforming to the "app.widget.id" -// semantic conventions. It represents an identifier that uniquely differentiates -// this widget from other widgets in the same application. -func AppWidgetID(val string) attribute.KeyValue { - return AppWidgetIDKey.String(val) -} - -// AppWidgetName returns an attribute KeyValue conforming to the -// "app.widget.name" semantic conventions. It represents the name of an -// application widget. -func AppWidgetName(val string) attribute.KeyValue { - return AppWidgetNameKey.String(val) -} - -// Namespace: artifact -const ( - // ArtifactAttestationFilenameKey is the attribute Key conforming to the - // "artifact.attestation.filename" semantic conventions. It represents the - // provenance filename of the built attestation which directly relates to the - // build artifact filename. This filename SHOULD accompany the artifact at - // publish time. See the [SLSA Relationship] specification for more information. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "golang-binary-amd64-v0.1.0.attestation", - // "docker-image-amd64-v0.1.0.intoto.json1", "release-1.tar.gz.attestation", - // "file-name-package.tar.gz.intoto.json1" - // - // [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations - ArtifactAttestationFilenameKey = attribute.Key("artifact.attestation.filename") - - // ArtifactAttestationHashKey is the attribute Key conforming to the - // "artifact.attestation.hash" semantic conventions. It represents the full - // [hash value (see glossary)], of the built attestation. Some envelopes in the - // [software attestation space] also refer to this as the **digest**. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1b31dfcd5b7f9267bf2ff47651df1cfb9147b9e4df1f335accf65b4cda498408" - // - // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf - // [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec - ArtifactAttestationHashKey = attribute.Key("artifact.attestation.hash") - - // ArtifactAttestationIDKey is the attribute Key conforming to the - // "artifact.attestation.id" semantic conventions. It represents the id of the - // build [software attestation]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "123" - // - // [software attestation]: https://slsa.dev/attestation-model - ArtifactAttestationIDKey = attribute.Key("artifact.attestation.id") - - // ArtifactFilenameKey is the attribute Key conforming to the - // "artifact.filename" semantic conventions. It represents the human readable - // file name of the artifact, typically generated during build and release - // processes. Often includes the package name and version in the file name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "golang-binary-amd64-v0.1.0", "docker-image-amd64-v0.1.0", - // "release-1.tar.gz", "file-name-package.tar.gz" - // Note: This file name can also act as the [Package Name] - // in cases where the package ecosystem maps accordingly. - // Additionally, the artifact [can be published] - // for others, but that is not a guarantee. - // - // [Package Name]: https://slsa.dev/spec/v1.0/terminology#package-model - // [can be published]: https://slsa.dev/spec/v1.0/terminology#software-supply-chain - ArtifactFilenameKey = attribute.Key("artifact.filename") - - // ArtifactHashKey is the attribute Key conforming to the "artifact.hash" - // semantic conventions. It represents the full [hash value (see glossary)], - // often found in checksum.txt on a release of the artifact and used to verify - // package integrity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9ff4c52759e2c4ac70b7d517bc7fcdc1cda631ca0045271ddd1b192544f8a3e9" - // Note: The specific algorithm used to create the cryptographic hash value is - // not defined. In situations where an artifact has multiple - // cryptographic hashes, it is up to the implementer to choose which - // hash value to set here; this should be the most secure hash algorithm - // that is suitable for the situation and consistent with the - // corresponding attestation. The implementer can then provide the other - // hash values through an additional set of attribute extensions as they - // deem necessary. - // - // [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf - ArtifactHashKey = attribute.Key("artifact.hash") - - // ArtifactPurlKey is the attribute Key conforming to the "artifact.purl" - // semantic conventions. It represents the [Package URL] of the - // [package artifact] provides a standard way to identify and locate the - // packaged artifact. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "pkg:github/package-url/purl-spec@1209109710924", - // "pkg:npm/foo@12.12.3" - // - // [Package URL]: https://github.com/package-url/purl-spec - // [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model - ArtifactPurlKey = attribute.Key("artifact.purl") - - // ArtifactVersionKey is the attribute Key conforming to the "artifact.version" - // semantic conventions. It represents the version of the artifact. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "v0.1.0", "1.2.1", "122691-build" - ArtifactVersionKey = attribute.Key("artifact.version") -) - -// ArtifactAttestationFilename returns an attribute KeyValue conforming to the -// "artifact.attestation.filename" semantic conventions. It represents the -// provenance filename of the built attestation which directly relates to the -// build artifact filename. This filename SHOULD accompany the artifact at -// publish time. See the [SLSA Relationship] specification for more information. -// -// [SLSA Relationship]: https://slsa.dev/spec/v1.0/distributing-provenance#relationship-between-artifacts-and-attestations -func ArtifactAttestationFilename(val string) attribute.KeyValue { - return ArtifactAttestationFilenameKey.String(val) -} - -// ArtifactAttestationHash returns an attribute KeyValue conforming to the -// "artifact.attestation.hash" semantic conventions. It represents the full -// [hash value (see glossary)], of the built attestation. Some envelopes in the -// [software attestation space] also refer to this as the **digest**. -// -// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf -// [software attestation space]: https://github.com/in-toto/attestation/tree/main/spec -func ArtifactAttestationHash(val string) attribute.KeyValue { - return ArtifactAttestationHashKey.String(val) -} - -// ArtifactAttestationID returns an attribute KeyValue conforming to the -// "artifact.attestation.id" semantic conventions. It represents the id of the -// build [software attestation]. -// -// [software attestation]: https://slsa.dev/attestation-model -func ArtifactAttestationID(val string) attribute.KeyValue { - return ArtifactAttestationIDKey.String(val) -} - -// ArtifactFilename returns an attribute KeyValue conforming to the -// "artifact.filename" semantic conventions. It represents the human readable -// file name of the artifact, typically generated during build and release -// processes. Often includes the package name and version in the file name. -func ArtifactFilename(val string) attribute.KeyValue { - return ArtifactFilenameKey.String(val) -} - -// ArtifactHash returns an attribute KeyValue conforming to the "artifact.hash" -// semantic conventions. It represents the full [hash value (see glossary)], -// often found in checksum.txt on a release of the artifact and used to verify -// package integrity. -// -// [hash value (see glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf -func ArtifactHash(val string) attribute.KeyValue { - return ArtifactHashKey.String(val) -} - -// ArtifactPurl returns an attribute KeyValue conforming to the "artifact.purl" -// semantic conventions. It represents the [Package URL] of the -// [package artifact] provides a standard way to identify and locate the packaged -// artifact. -// -// [Package URL]: https://github.com/package-url/purl-spec -// [package artifact]: https://slsa.dev/spec/v1.0/terminology#package-model -func ArtifactPurl(val string) attribute.KeyValue { - return ArtifactPurlKey.String(val) -} - -// ArtifactVersion returns an attribute KeyValue conforming to the -// "artifact.version" semantic conventions. It represents the version of the -// artifact. -func ArtifactVersion(val string) attribute.KeyValue { - return ArtifactVersionKey.String(val) -} - -// Namespace: aws -const ( - // AWSBedrockGuardrailIDKey is the attribute Key conforming to the - // "aws.bedrock.guardrail.id" semantic conventions. It represents the unique - // identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and - // prevent unwanted behavior from model responses or user messages. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "sgi5gkybzqak" - // - // [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html - AWSBedrockGuardrailIDKey = attribute.Key("aws.bedrock.guardrail.id") - - // AWSBedrockKnowledgeBaseIDKey is the attribute Key conforming to the - // "aws.bedrock.knowledge_base.id" semantic conventions. It represents the - // unique identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a - // bank of information that can be queried by models to generate more relevant - // responses and augment prompts. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "XFWUPB9PAW" - // - // [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html - AWSBedrockKnowledgeBaseIDKey = attribute.Key("aws.bedrock.knowledge_base.id") - - // AWSDynamoDBAttributeDefinitionsKey is the attribute Key conforming to the - // "aws.dynamodb.attribute_definitions" semantic conventions. It represents the - // JSON-serialized value of each item in the `AttributeDefinitions` request - // field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "AttributeName": "string", "AttributeType": "string" }" - AWSDynamoDBAttributeDefinitionsKey = attribute.Key("aws.dynamodb.attribute_definitions") - - // AWSDynamoDBAttributesToGetKey is the attribute Key conforming to the - // "aws.dynamodb.attributes_to_get" semantic conventions. It represents the - // value of the `AttributesToGet` request parameter. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "lives", "id" - AWSDynamoDBAttributesToGetKey = attribute.Key("aws.dynamodb.attributes_to_get") - - // AWSDynamoDBConsistentReadKey is the attribute Key conforming to the - // "aws.dynamodb.consistent_read" semantic conventions. It represents the value - // of the `ConsistentRead` request parameter. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - AWSDynamoDBConsistentReadKey = attribute.Key("aws.dynamodb.consistent_read") - - // AWSDynamoDBConsumedCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.consumed_capacity" semantic conventions. It represents the - // JSON-serialized value of each item in the `ConsumedCapacity` response field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "CapacityUnits": number, "GlobalSecondaryIndexes": { "string" : - // { "CapacityUnits": number, "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }, "LocalSecondaryIndexes": { "string" : { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, - // "ReadCapacityUnits": number, "Table": { "CapacityUnits": number, - // "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "TableName": - // "string", "WriteCapacityUnits": number }" - AWSDynamoDBConsumedCapacityKey = attribute.Key("aws.dynamodb.consumed_capacity") - - // AWSDynamoDBCountKey is the attribute Key conforming to the - // "aws.dynamodb.count" semantic conventions. It represents the value of the - // `Count` response parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 10 - AWSDynamoDBCountKey = attribute.Key("aws.dynamodb.count") - - // AWSDynamoDBExclusiveStartTableKey is the attribute Key conforming to the - // "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the - // value of the `ExclusiveStartTableName` request parameter. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Users", "CatsTable" - AWSDynamoDBExclusiveStartTableKey = attribute.Key("aws.dynamodb.exclusive_start_table") - - // AWSDynamoDBGlobalSecondaryIndexUpdatesKey is the attribute Key conforming to - // the "aws.dynamodb.global_secondary_index_updates" semantic conventions. It - // represents the JSON-serialized value of each item in the - // `GlobalSecondaryIndexUpdates` request field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "Create": { "IndexName": "string", "KeySchema": [ { - // "AttributeName": "string", "KeyType": "string" } ], "Projection": { - // "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, - // "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": - // number } }" - AWSDynamoDBGlobalSecondaryIndexUpdatesKey = attribute.Key("aws.dynamodb.global_secondary_index_updates") - - // AWSDynamoDBGlobalSecondaryIndexesKey is the attribute Key conforming to the - // "aws.dynamodb.global_secondary_indexes" semantic conventions. It represents - // the JSON-serialized value of each item of the `GlobalSecondaryIndexes` - // request field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "IndexName": "string", "KeySchema": [ { "AttributeName": - // "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ - // "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { - // "ReadCapacityUnits": number, "WriteCapacityUnits": number } }" - AWSDynamoDBGlobalSecondaryIndexesKey = attribute.Key("aws.dynamodb.global_secondary_indexes") - - // AWSDynamoDBIndexNameKey is the attribute Key conforming to the - // "aws.dynamodb.index_name" semantic conventions. It represents the value of - // the `IndexName` request parameter. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "name_to_group" - AWSDynamoDBIndexNameKey = attribute.Key("aws.dynamodb.index_name") - - // AWSDynamoDBItemCollectionMetricsKey is the attribute Key conforming to the - // "aws.dynamodb.item_collection_metrics" semantic conventions. It represents - // the JSON-serialized value of the `ItemCollectionMetrics` response field. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "string" : [ { "ItemCollectionKey": { "string" : { "B": blob, - // "BOOL": boolean, "BS": [ blob ], "L": [ "AttributeValue" ], "M": { "string" : - // "AttributeValue" }, "N": "string", "NS": [ "string" ], "NULL": boolean, "S": - // "string", "SS": [ "string" ] } }, "SizeEstimateRangeGB": [ number ] } ] }" - AWSDynamoDBItemCollectionMetricsKey = attribute.Key("aws.dynamodb.item_collection_metrics") - - // AWSDynamoDBLimitKey is the attribute Key conforming to the - // "aws.dynamodb.limit" semantic conventions. It represents the value of the - // `Limit` request parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 10 - AWSDynamoDBLimitKey = attribute.Key("aws.dynamodb.limit") - - // AWSDynamoDBLocalSecondaryIndexesKey is the attribute Key conforming to the - // "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents - // the JSON-serialized value of each item of the `LocalSecondaryIndexes` request - // field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "{ "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": - // number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", - // "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], - // "ProjectionType": "string" } }" - AWSDynamoDBLocalSecondaryIndexesKey = attribute.Key("aws.dynamodb.local_secondary_indexes") - - // AWSDynamoDBProjectionKey is the attribute Key conforming to the - // "aws.dynamodb.projection" semantic conventions. It represents the value of - // the `ProjectionExpression` request parameter. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Title", "Title, Price, Color", "Title, Description, RelatedItems, - // ProductReviews" - AWSDynamoDBProjectionKey = attribute.Key("aws.dynamodb.projection") - - // AWSDynamoDBProvisionedReadCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.provisioned_read_capacity" semantic conventions. It represents - // the value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedReadCapacityKey = attribute.Key("aws.dynamodb.provisioned_read_capacity") - - // AWSDynamoDBProvisionedWriteCapacityKey is the attribute Key conforming to the - // "aws.dynamodb.provisioned_write_capacity" semantic conventions. It represents - // the value of the `ProvisionedThroughput.WriteCapacityUnits` request - // parameter. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0, 2.0 - AWSDynamoDBProvisionedWriteCapacityKey = attribute.Key("aws.dynamodb.provisioned_write_capacity") - - // AWSDynamoDBScanForwardKey is the attribute Key conforming to the - // "aws.dynamodb.scan_forward" semantic conventions. It represents the value of - // the `ScanIndexForward` request parameter. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - AWSDynamoDBScanForwardKey = attribute.Key("aws.dynamodb.scan_forward") - - // AWSDynamoDBScannedCountKey is the attribute Key conforming to the - // "aws.dynamodb.scanned_count" semantic conventions. It represents the value of - // the `ScannedCount` response parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 50 - AWSDynamoDBScannedCountKey = attribute.Key("aws.dynamodb.scanned_count") - - // AWSDynamoDBSegmentKey is the attribute Key conforming to the - // "aws.dynamodb.segment" semantic conventions. It represents the value of the - // `Segment` request parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 10 - AWSDynamoDBSegmentKey = attribute.Key("aws.dynamodb.segment") - - // AWSDynamoDBSelectKey is the attribute Key conforming to the - // "aws.dynamodb.select" semantic conventions. It represents the value of the - // `Select` request parameter. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ALL_ATTRIBUTES", "COUNT" - AWSDynamoDBSelectKey = attribute.Key("aws.dynamodb.select") - - // AWSDynamoDBTableCountKey is the attribute Key conforming to the - // "aws.dynamodb.table_count" semantic conventions. It represents the number of - // items in the `TableNames` response parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 20 - AWSDynamoDBTableCountKey = attribute.Key("aws.dynamodb.table_count") - - // AWSDynamoDBTableNamesKey is the attribute Key conforming to the - // "aws.dynamodb.table_names" semantic conventions. It represents the keys in - // the `RequestItems` object field. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Users", "Cats" - AWSDynamoDBTableNamesKey = attribute.Key("aws.dynamodb.table_names") - - // AWSDynamoDBTotalSegmentsKey is the attribute Key conforming to the - // "aws.dynamodb.total_segments" semantic conventions. It represents the value - // of the `TotalSegments` request parameter. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 100 - AWSDynamoDBTotalSegmentsKey = attribute.Key("aws.dynamodb.total_segments") - - // AWSECSClusterARNKey is the attribute Key conforming to the - // "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an - // [ECS cluster]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster" - // - // [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html - AWSECSClusterARNKey = attribute.Key("aws.ecs.cluster.arn") - - // AWSECSContainerARNKey is the attribute Key conforming to the - // "aws.ecs.container.arn" semantic conventions. It represents the Amazon - // Resource Name (ARN) of an [ECS container instance]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "arn:aws:ecs:us-west-1:123456789123:container/32624152-9086-4f0e-acae-1a75b14fe4d9" - // - // [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html - AWSECSContainerARNKey = attribute.Key("aws.ecs.container.arn") - - // AWSECSLaunchtypeKey is the attribute Key conforming to the - // "aws.ecs.launchtype" semantic conventions. It represents the [launch type] - // for an ECS task. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [launch type]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html - AWSECSLaunchtypeKey = attribute.Key("aws.ecs.launchtype") - - // AWSECSTaskARNKey is the attribute Key conforming to the "aws.ecs.task.arn" - // semantic conventions. It represents the ARN of a running [ECS task]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "arn:aws:ecs:us-west-1:123456789123:task/10838bed-421f-43ef-870a-f43feacbbb5b", - // "arn:aws:ecs:us-west-1:123456789123:task/my-cluster/task-id/23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd" - // - // [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids - AWSECSTaskARNKey = attribute.Key("aws.ecs.task.arn") - - // AWSECSTaskFamilyKey is the attribute Key conforming to the - // "aws.ecs.task.family" semantic conventions. It represents the family name of - // the [ECS task definition] used to create the ECS task. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry-family" - // - // [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html - AWSECSTaskFamilyKey = attribute.Key("aws.ecs.task.family") - - // AWSECSTaskIDKey is the attribute Key conforming to the "aws.ecs.task.id" - // semantic conventions. It represents the ID of a running ECS task. The ID MUST - // be extracted from `task.arn`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "10838bed-421f-43ef-870a-f43feacbbb5b", - // "23ebb8ac-c18f-46c6-8bbe-d55d0e37cfbd" - AWSECSTaskIDKey = attribute.Key("aws.ecs.task.id") - - // AWSECSTaskRevisionKey is the attribute Key conforming to the - // "aws.ecs.task.revision" semantic conventions. It represents the revision for - // the task definition used to create the ECS task. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "8", "26" - AWSECSTaskRevisionKey = attribute.Key("aws.ecs.task.revision") - - // AWSEKSClusterARNKey is the attribute Key conforming to the - // "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS - // cluster. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:ecs:us-west-2:123456789123:cluster/my-cluster" - AWSEKSClusterARNKey = attribute.Key("aws.eks.cluster.arn") - - // AWSExtendedRequestIDKey is the attribute Key conforming to the - // "aws.extended_request_id" semantic conventions. It represents the AWS - // extended request ID as returned in the response header `x-amz-id-2`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "wzHcyEWfmOGDIE5QOhTAqFDoDWP3y8IUvpNINCwL9N4TEHbUw0/gZJ+VZTmCNCWR7fezEN3eCiQ=" - AWSExtendedRequestIDKey = attribute.Key("aws.extended_request_id") - - // AWSKinesisStreamNameKey is the attribute Key conforming to the - // "aws.kinesis.stream_name" semantic conventions. It represents the name of the - // AWS Kinesis [stream] the request refers to. Corresponds to the - // `--stream-name` parameter of the Kinesis [describe-stream] operation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "some-stream-name" - // - // [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html - // [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html - AWSKinesisStreamNameKey = attribute.Key("aws.kinesis.stream_name") - - // AWSLambdaInvokedARNKey is the attribute Key conforming to the - // "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked - // ARN as provided on the `Context` passed to the function ( - // `Lambda-Runtime-Invoked-Function-Arn` header on the - // `/runtime/invocation/next` applicable). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:lambda:us-east-1:123456:function:myfunction:myalias" - // Note: This may be different from `cloud.resource_id` if an alias is involved. - AWSLambdaInvokedARNKey = attribute.Key("aws.lambda.invoked_arn") - - // AWSLambdaResourceMappingIDKey is the attribute Key conforming to the - // "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID - // of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda - // function. It's contents are read by Lambda and used to trigger a function. - // This isn't available in the lambda execution context or the lambda runtime - // environtment. This is going to be populated by the AWS SDK for each language - // when that UUID is present. Some of these operations are - // Create/Delete/Get/List/Update EventSourceMapping. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "587ad24b-03b9-4413-8202-bbd56b36e5b7" - // - // [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html - AWSLambdaResourceMappingIDKey = attribute.Key("aws.lambda.resource_mapping.id") - - // AWSLogGroupARNsKey is the attribute Key conforming to the - // "aws.log.group.arns" semantic conventions. It represents the Amazon Resource - // Name(s) (ARN) of the AWS log group(s). - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:*" - // Note: See the [log group ARN format documentation]. - // - // [log group ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format - AWSLogGroupARNsKey = attribute.Key("aws.log.group.arns") - - // AWSLogGroupNamesKey is the attribute Key conforming to the - // "aws.log.group.names" semantic conventions. It represents the name(s) of the - // AWS log group(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/aws/lambda/my-function", "opentelemetry-service" - // Note: Multiple log groups must be supported for cases like multi-container - // applications, where a single application has sidecar containers, and each - // write to their own log group. - AWSLogGroupNamesKey = attribute.Key("aws.log.group.names") - - // AWSLogStreamARNsKey is the attribute Key conforming to the - // "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the - // AWS log stream(s). - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "arn:aws:logs:us-west-1:123456789012:log-group:/aws/my/group:log-stream:logs/main/10838bed-421f-43ef-870a-f43feacbbb5b" - // Note: See the [log stream ARN format documentation]. One log group can - // contain several log streams, so these ARNs necessarily identify both a log - // group and a log stream. - // - // [log stream ARN format documentation]: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/iam-access-control-overview-cwl.html#CWL_ARN_Format - AWSLogStreamARNsKey = attribute.Key("aws.log.stream.arns") - - // AWSLogStreamNamesKey is the attribute Key conforming to the - // "aws.log.stream.names" semantic conventions. It represents the name(s) of the - // AWS log stream(s) an application is writing to. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "logs/main/10838bed-421f-43ef-870a-f43feacbbb5b" - AWSLogStreamNamesKey = attribute.Key("aws.log.stream.names") - - // AWSRequestIDKey is the attribute Key conforming to the "aws.request_id" - // semantic conventions. It represents the AWS request ID as returned in the - // response headers `x-amzn-requestid`, `x-amzn-request-id` or - // `x-amz-request-id`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "79b9da39-b7ae-508a-a6bc-864b2829c622", "C9ER4AJX75574TDJ" - AWSRequestIDKey = attribute.Key("aws.request_id") - - // AWSS3BucketKey is the attribute Key conforming to the "aws.s3.bucket" - // semantic conventions. It represents the S3 bucket name the request refers to. - // Corresponds to the `--bucket` parameter of the [S3 API] operations. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "some-bucket-name" - // Note: The `bucket` attribute is applicable to all S3 operations that - // reference a bucket, i.e. that require the bucket name as a mandatory - // parameter. - // This applies to almost all S3 operations except `list-buckets`. - // - // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html - AWSS3BucketKey = attribute.Key("aws.s3.bucket") - - // AWSS3CopySourceKey is the attribute Key conforming to the - // "aws.s3.copy_source" semantic conventions. It represents the source object - // (in the form `bucket`/`key`) for the copy operation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "someFile.yml" - // Note: The `copy_source` attribute applies to S3 copy operations and - // corresponds to the `--copy-source` parameter - // of the [copy-object operation within the S3 API]. - // This applies in particular to the following operations: - // - // - [copy-object] - // - [upload-part-copy] - // - // - // [copy-object operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html - // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html - // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html - AWSS3CopySourceKey = attribute.Key("aws.s3.copy_source") - - // AWSS3DeleteKey is the attribute Key conforming to the "aws.s3.delete" - // semantic conventions. It represents the delete request container that - // specifies the objects to be deleted. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "Objects=[{Key=string,VersionId=string},{Key=string,VersionId=string}],Quiet=boolean" - // Note: The `delete` attribute is only applicable to the [delete-object] - // operation. - // The `delete` attribute corresponds to the `--delete` parameter of the - // [delete-objects operation within the S3 API]. - // - // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html - // [delete-objects operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-objects.html - AWSS3DeleteKey = attribute.Key("aws.s3.delete") - - // AWSS3KeyKey is the attribute Key conforming to the "aws.s3.key" semantic - // conventions. It represents the S3 object key the request refers to. - // Corresponds to the `--key` parameter of the [S3 API] operations. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "someFile.yml" - // Note: The `key` attribute is applicable to all object-related S3 operations, - // i.e. that require the object key as a mandatory parameter. - // This applies in particular to the following operations: - // - // - [copy-object] - // - [delete-object] - // - [get-object] - // - [head-object] - // - [put-object] - // - [restore-object] - // - [select-object-content] - // - [abort-multipart-upload] - // - [complete-multipart-upload] - // - [create-multipart-upload] - // - [list-parts] - // - [upload-part] - // - [upload-part-copy] - // - // - // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html - // [copy-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/copy-object.html - // [delete-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/delete-object.html - // [get-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/get-object.html - // [head-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/head-object.html - // [put-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/put-object.html - // [restore-object]: https://docs.aws.amazon.com/cli/latest/reference/s3api/restore-object.html - // [select-object-content]: https://docs.aws.amazon.com/cli/latest/reference/s3api/select-object-content.html - // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html - // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html - // [create-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/create-multipart-upload.html - // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html - // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html - // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html - AWSS3KeyKey = attribute.Key("aws.s3.key") - - // AWSS3PartNumberKey is the attribute Key conforming to the - // "aws.s3.part_number" semantic conventions. It represents the part number of - // the part being uploaded in a multipart-upload operation. This is a positive - // integer between 1 and 10,000. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 3456 - // Note: The `part_number` attribute is only applicable to the [upload-part] - // and [upload-part-copy] operations. - // The `part_number` attribute corresponds to the `--part-number` parameter of - // the - // [upload-part operation within the S3 API]. - // - // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html - // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html - // [upload-part operation within the S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html - AWSS3PartNumberKey = attribute.Key("aws.s3.part_number") - - // AWSS3UploadIDKey is the attribute Key conforming to the "aws.s3.upload_id" - // semantic conventions. It represents the upload ID that identifies the - // multipart upload. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "dfRtDYWFbkRONycy.Yxwh66Yjlx.cph0gtNBtJ" - // Note: The `upload_id` attribute applies to S3 multipart-upload operations and - // corresponds to the `--upload-id` parameter - // of the [S3 API] multipart operations. - // This applies in particular to the following operations: - // - // - [abort-multipart-upload] - // - [complete-multipart-upload] - // - [list-parts] - // - [upload-part] - // - [upload-part-copy] - // - // - // [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html - // [abort-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/abort-multipart-upload.html - // [complete-multipart-upload]: https://docs.aws.amazon.com/cli/latest/reference/s3api/complete-multipart-upload.html - // [list-parts]: https://docs.aws.amazon.com/cli/latest/reference/s3api/list-parts.html - // [upload-part]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part.html - // [upload-part-copy]: https://docs.aws.amazon.com/cli/latest/reference/s3api/upload-part-copy.html - AWSS3UploadIDKey = attribute.Key("aws.s3.upload_id") - - // AWSSecretsmanagerSecretARNKey is the attribute Key conforming to the - // "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN - // of the Secret stored in the Secrets Mangger. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "arn:aws:secretsmanager:us-east-1:123456789012:secret:SecretName-6RandomCharacters" - AWSSecretsmanagerSecretARNKey = attribute.Key("aws.secretsmanager.secret.arn") - - // AWSSNSTopicARNKey is the attribute Key conforming to the "aws.sns.topic.arn" - // semantic conventions. It represents the ARN of the AWS SNS Topic. An Amazon - // SNS [topic] is a logical access point that acts as a communication channel. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:sns:us-east-1:123456789012:mystack-mytopic-NZJ5JSMVGFIE" - // - // [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html - AWSSNSTopicARNKey = attribute.Key("aws.sns.topic.arn") - - // AWSSQSQueueURLKey is the attribute Key conforming to the "aws.sqs.queue.url" - // semantic conventions. It represents the URL of the AWS SQS Queue. It's a - // unique identifier for a queue in Amazon Simple Queue Service (SQS) and is - // used to access the queue and perform actions on it. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue" - AWSSQSQueueURLKey = attribute.Key("aws.sqs.queue.url") - - // AWSStepFunctionsActivityARNKey is the attribute Key conforming to the - // "aws.step_functions.activity.arn" semantic conventions. It represents the ARN - // of the AWS Step Functions Activity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:states:us-east-1:123456789012:activity:get-greeting" - AWSStepFunctionsActivityARNKey = attribute.Key("aws.step_functions.activity.arn") - - // AWSStepFunctionsStateMachineARNKey is the attribute Key conforming to the - // "aws.step_functions.state_machine.arn" semantic conventions. It represents - // the ARN of the AWS Step Functions State Machine. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "arn:aws:states:us-east-1:123456789012:stateMachine:myStateMachine:1" - AWSStepFunctionsStateMachineARNKey = attribute.Key("aws.step_functions.state_machine.arn") -) - -// AWSBedrockGuardrailID returns an attribute KeyValue conforming to the -// "aws.bedrock.guardrail.id" semantic conventions. It represents the unique -// identifier of the AWS Bedrock Guardrail. A [guardrail] helps safeguard and -// prevent unwanted behavior from model responses or user messages. -// -// [guardrail]: https://docs.aws.amazon.com/bedrock/latest/userguide/guardrails.html -func AWSBedrockGuardrailID(val string) attribute.KeyValue { - return AWSBedrockGuardrailIDKey.String(val) -} - -// AWSBedrockKnowledgeBaseID returns an attribute KeyValue conforming to the -// "aws.bedrock.knowledge_base.id" semantic conventions. It represents the unique -// identifier of the AWS Bedrock Knowledge base. A [knowledge base] is a bank of -// information that can be queried by models to generate more relevant responses -// and augment prompts. -// -// [knowledge base]: https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base.html -func AWSBedrockKnowledgeBaseID(val string) attribute.KeyValue { - return AWSBedrockKnowledgeBaseIDKey.String(val) -} - -// AWSDynamoDBAttributeDefinitions returns an attribute KeyValue conforming to -// the "aws.dynamodb.attribute_definitions" semantic conventions. It represents -// the JSON-serialized value of each item in the `AttributeDefinitions` request -// field. -func AWSDynamoDBAttributeDefinitions(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributeDefinitionsKey.StringSlice(val) -} - -// AWSDynamoDBAttributesToGet returns an attribute KeyValue conforming to the -// "aws.dynamodb.attributes_to_get" semantic conventions. It represents the value -// of the `AttributesToGet` request parameter. -func AWSDynamoDBAttributesToGet(val ...string) attribute.KeyValue { - return AWSDynamoDBAttributesToGetKey.StringSlice(val) -} - -// AWSDynamoDBConsistentRead returns an attribute KeyValue conforming to the -// "aws.dynamodb.consistent_read" semantic conventions. It represents the value -// of the `ConsistentRead` request parameter. -func AWSDynamoDBConsistentRead(val bool) attribute.KeyValue { - return AWSDynamoDBConsistentReadKey.Bool(val) -} - -// AWSDynamoDBConsumedCapacity returns an attribute KeyValue conforming to the -// "aws.dynamodb.consumed_capacity" semantic conventions. It represents the -// JSON-serialized value of each item in the `ConsumedCapacity` response field. -func AWSDynamoDBConsumedCapacity(val ...string) attribute.KeyValue { - return AWSDynamoDBConsumedCapacityKey.StringSlice(val) -} - -// AWSDynamoDBCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.count" semantic conventions. It represents the value of the -// `Count` response parameter. -func AWSDynamoDBCount(val int) attribute.KeyValue { - return AWSDynamoDBCountKey.Int(val) -} - -// AWSDynamoDBExclusiveStartTable returns an attribute KeyValue conforming to the -// "aws.dynamodb.exclusive_start_table" semantic conventions. It represents the -// value of the `ExclusiveStartTableName` request parameter. -func AWSDynamoDBExclusiveStartTable(val string) attribute.KeyValue { - return AWSDynamoDBExclusiveStartTableKey.String(val) -} - -// AWSDynamoDBGlobalSecondaryIndexUpdates returns an attribute KeyValue -// conforming to the "aws.dynamodb.global_secondary_index_updates" semantic -// conventions. It represents the JSON-serialized value of each item in the -// `GlobalSecondaryIndexUpdates` request field. -func AWSDynamoDBGlobalSecondaryIndexUpdates(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexUpdatesKey.StringSlice(val) -} - -// AWSDynamoDBGlobalSecondaryIndexes returns an attribute KeyValue conforming to -// the "aws.dynamodb.global_secondary_indexes" semantic conventions. It -// represents the JSON-serialized value of each item of the -// `GlobalSecondaryIndexes` request field. -func AWSDynamoDBGlobalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBGlobalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBIndexName returns an attribute KeyValue conforming to the -// "aws.dynamodb.index_name" semantic conventions. It represents the value of the -// `IndexName` request parameter. -func AWSDynamoDBIndexName(val string) attribute.KeyValue { - return AWSDynamoDBIndexNameKey.String(val) -} - -// AWSDynamoDBItemCollectionMetrics returns an attribute KeyValue conforming to -// the "aws.dynamodb.item_collection_metrics" semantic conventions. It represents -// the JSON-serialized value of the `ItemCollectionMetrics` response field. -func AWSDynamoDBItemCollectionMetrics(val string) attribute.KeyValue { - return AWSDynamoDBItemCollectionMetricsKey.String(val) -} - -// AWSDynamoDBLimit returns an attribute KeyValue conforming to the -// "aws.dynamodb.limit" semantic conventions. It represents the value of the -// `Limit` request parameter. -func AWSDynamoDBLimit(val int) attribute.KeyValue { - return AWSDynamoDBLimitKey.Int(val) -} - -// AWSDynamoDBLocalSecondaryIndexes returns an attribute KeyValue conforming to -// the "aws.dynamodb.local_secondary_indexes" semantic conventions. It represents -// the JSON-serialized value of each item of the `LocalSecondaryIndexes` request -// field. -func AWSDynamoDBLocalSecondaryIndexes(val ...string) attribute.KeyValue { - return AWSDynamoDBLocalSecondaryIndexesKey.StringSlice(val) -} - -// AWSDynamoDBProjection returns an attribute KeyValue conforming to the -// "aws.dynamodb.projection" semantic conventions. It represents the value of the -// `ProjectionExpression` request parameter. -func AWSDynamoDBProjection(val string) attribute.KeyValue { - return AWSDynamoDBProjectionKey.String(val) -} - -// AWSDynamoDBProvisionedReadCapacity returns an attribute KeyValue conforming to -// the "aws.dynamodb.provisioned_read_capacity" semantic conventions. It -// represents the value of the `ProvisionedThroughput.ReadCapacityUnits` request -// parameter. -func AWSDynamoDBProvisionedReadCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedReadCapacityKey.Float64(val) -} - -// AWSDynamoDBProvisionedWriteCapacity returns an attribute KeyValue conforming -// to the "aws.dynamodb.provisioned_write_capacity" semantic conventions. It -// represents the value of the `ProvisionedThroughput.WriteCapacityUnits` request -// parameter. -func AWSDynamoDBProvisionedWriteCapacity(val float64) attribute.KeyValue { - return AWSDynamoDBProvisionedWriteCapacityKey.Float64(val) -} - -// AWSDynamoDBScanForward returns an attribute KeyValue conforming to the -// "aws.dynamodb.scan_forward" semantic conventions. It represents the value of -// the `ScanIndexForward` request parameter. -func AWSDynamoDBScanForward(val bool) attribute.KeyValue { - return AWSDynamoDBScanForwardKey.Bool(val) -} - -// AWSDynamoDBScannedCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.scanned_count" semantic conventions. It represents the value of -// the `ScannedCount` response parameter. -func AWSDynamoDBScannedCount(val int) attribute.KeyValue { - return AWSDynamoDBScannedCountKey.Int(val) -} - -// AWSDynamoDBSegment returns an attribute KeyValue conforming to the -// "aws.dynamodb.segment" semantic conventions. It represents the value of the -// `Segment` request parameter. -func AWSDynamoDBSegment(val int) attribute.KeyValue { - return AWSDynamoDBSegmentKey.Int(val) -} - -// AWSDynamoDBSelect returns an attribute KeyValue conforming to the -// "aws.dynamodb.select" semantic conventions. It represents the value of the -// `Select` request parameter. -func AWSDynamoDBSelect(val string) attribute.KeyValue { - return AWSDynamoDBSelectKey.String(val) -} - -// AWSDynamoDBTableCount returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_count" semantic conventions. It represents the number of -// items in the `TableNames` response parameter. -func AWSDynamoDBTableCount(val int) attribute.KeyValue { - return AWSDynamoDBTableCountKey.Int(val) -} - -// AWSDynamoDBTableNames returns an attribute KeyValue conforming to the -// "aws.dynamodb.table_names" semantic conventions. It represents the keys in the -// `RequestItems` object field. -func AWSDynamoDBTableNames(val ...string) attribute.KeyValue { - return AWSDynamoDBTableNamesKey.StringSlice(val) -} - -// AWSDynamoDBTotalSegments returns an attribute KeyValue conforming to the -// "aws.dynamodb.total_segments" semantic conventions. It represents the value of -// the `TotalSegments` request parameter. -func AWSDynamoDBTotalSegments(val int) attribute.KeyValue { - return AWSDynamoDBTotalSegmentsKey.Int(val) -} - -// AWSECSClusterARN returns an attribute KeyValue conforming to the -// "aws.ecs.cluster.arn" semantic conventions. It represents the ARN of an -// [ECS cluster]. -// -// [ECS cluster]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/clusters.html -func AWSECSClusterARN(val string) attribute.KeyValue { - return AWSECSClusterARNKey.String(val) -} - -// AWSECSContainerARN returns an attribute KeyValue conforming to the -// "aws.ecs.container.arn" semantic conventions. It represents the Amazon -// Resource Name (ARN) of an [ECS container instance]. -// -// [ECS container instance]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_instances.html -func AWSECSContainerARN(val string) attribute.KeyValue { - return AWSECSContainerARNKey.String(val) -} - -// AWSECSTaskARN returns an attribute KeyValue conforming to the -// "aws.ecs.task.arn" semantic conventions. It represents the ARN of a running -// [ECS task]. -// -// [ECS task]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids -func AWSECSTaskARN(val string) attribute.KeyValue { - return AWSECSTaskARNKey.String(val) -} - -// AWSECSTaskFamily returns an attribute KeyValue conforming to the -// "aws.ecs.task.family" semantic conventions. It represents the family name of -// the [ECS task definition] used to create the ECS task. -// -// [ECS task definition]: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definitions.html -func AWSECSTaskFamily(val string) attribute.KeyValue { - return AWSECSTaskFamilyKey.String(val) -} - -// AWSECSTaskID returns an attribute KeyValue conforming to the "aws.ecs.task.id" -// semantic conventions. It represents the ID of a running ECS task. The ID MUST -// be extracted from `task.arn`. -func AWSECSTaskID(val string) attribute.KeyValue { - return AWSECSTaskIDKey.String(val) -} - -// AWSECSTaskRevision returns an attribute KeyValue conforming to the -// "aws.ecs.task.revision" semantic conventions. It represents the revision for -// the task definition used to create the ECS task. -func AWSECSTaskRevision(val string) attribute.KeyValue { - return AWSECSTaskRevisionKey.String(val) -} - -// AWSEKSClusterARN returns an attribute KeyValue conforming to the -// "aws.eks.cluster.arn" semantic conventions. It represents the ARN of an EKS -// cluster. -func AWSEKSClusterARN(val string) attribute.KeyValue { - return AWSEKSClusterARNKey.String(val) -} - -// AWSExtendedRequestID returns an attribute KeyValue conforming to the -// "aws.extended_request_id" semantic conventions. It represents the AWS extended -// request ID as returned in the response header `x-amz-id-2`. -func AWSExtendedRequestID(val string) attribute.KeyValue { - return AWSExtendedRequestIDKey.String(val) -} - -// AWSKinesisStreamName returns an attribute KeyValue conforming to the -// "aws.kinesis.stream_name" semantic conventions. It represents the name of the -// AWS Kinesis [stream] the request refers to. Corresponds to the `--stream-name` -// parameter of the Kinesis [describe-stream] operation. -// -// [stream]: https://docs.aws.amazon.com/streams/latest/dev/introduction.html -// [describe-stream]: https://docs.aws.amazon.com/cli/latest/reference/kinesis/describe-stream.html -func AWSKinesisStreamName(val string) attribute.KeyValue { - return AWSKinesisStreamNameKey.String(val) -} - -// AWSLambdaInvokedARN returns an attribute KeyValue conforming to the -// "aws.lambda.invoked_arn" semantic conventions. It represents the full invoked -// ARN as provided on the `Context` passed to the function ( -// `Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` -// applicable). -func AWSLambdaInvokedARN(val string) attribute.KeyValue { - return AWSLambdaInvokedARNKey.String(val) -} - -// AWSLambdaResourceMappingID returns an attribute KeyValue conforming to the -// "aws.lambda.resource_mapping.id" semantic conventions. It represents the UUID -// of the [AWS Lambda EvenSource Mapping]. An event source is mapped to a lambda -// function. It's contents are read by Lambda and used to trigger a function. -// This isn't available in the lambda execution context or the lambda runtime -// environtment. This is going to be populated by the AWS SDK for each language -// when that UUID is present. Some of these operations are -// Create/Delete/Get/List/Update EventSourceMapping. -// -// [AWS Lambda EvenSource Mapping]: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html -func AWSLambdaResourceMappingID(val string) attribute.KeyValue { - return AWSLambdaResourceMappingIDKey.String(val) -} - -// AWSLogGroupARNs returns an attribute KeyValue conforming to the -// "aws.log.group.arns" semantic conventions. It represents the Amazon Resource -// Name(s) (ARN) of the AWS log group(s). -func AWSLogGroupARNs(val ...string) attribute.KeyValue { - return AWSLogGroupARNsKey.StringSlice(val) -} - -// AWSLogGroupNames returns an attribute KeyValue conforming to the -// "aws.log.group.names" semantic conventions. It represents the name(s) of the -// AWS log group(s) an application is writing to. -func AWSLogGroupNames(val ...string) attribute.KeyValue { - return AWSLogGroupNamesKey.StringSlice(val) -} - -// AWSLogStreamARNs returns an attribute KeyValue conforming to the -// "aws.log.stream.arns" semantic conventions. It represents the ARN(s) of the -// AWS log stream(s). -func AWSLogStreamARNs(val ...string) attribute.KeyValue { - return AWSLogStreamARNsKey.StringSlice(val) -} - -// AWSLogStreamNames returns an attribute KeyValue conforming to the -// "aws.log.stream.names" semantic conventions. It represents the name(s) of the -// AWS log stream(s) an application is writing to. -func AWSLogStreamNames(val ...string) attribute.KeyValue { - return AWSLogStreamNamesKey.StringSlice(val) -} - -// AWSRequestID returns an attribute KeyValue conforming to the "aws.request_id" -// semantic conventions. It represents the AWS request ID as returned in the -// response headers `x-amzn-requestid`, `x-amzn-request-id` or `x-amz-request-id` -// . -func AWSRequestID(val string) attribute.KeyValue { - return AWSRequestIDKey.String(val) -} - -// AWSS3Bucket returns an attribute KeyValue conforming to the "aws.s3.bucket" -// semantic conventions. It represents the S3 bucket name the request refers to. -// Corresponds to the `--bucket` parameter of the [S3 API] operations. -// -// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html -func AWSS3Bucket(val string) attribute.KeyValue { - return AWSS3BucketKey.String(val) -} - -// AWSS3CopySource returns an attribute KeyValue conforming to the -// "aws.s3.copy_source" semantic conventions. It represents the source object (in -// the form `bucket`/`key`) for the copy operation. -func AWSS3CopySource(val string) attribute.KeyValue { - return AWSS3CopySourceKey.String(val) -} - -// AWSS3Delete returns an attribute KeyValue conforming to the "aws.s3.delete" -// semantic conventions. It represents the delete request container that -// specifies the objects to be deleted. -func AWSS3Delete(val string) attribute.KeyValue { - return AWSS3DeleteKey.String(val) -} - -// AWSS3Key returns an attribute KeyValue conforming to the "aws.s3.key" semantic -// conventions. It represents the S3 object key the request refers to. -// Corresponds to the `--key` parameter of the [S3 API] operations. -// -// [S3 API]: https://docs.aws.amazon.com/cli/latest/reference/s3api/index.html -func AWSS3Key(val string) attribute.KeyValue { - return AWSS3KeyKey.String(val) -} - -// AWSS3PartNumber returns an attribute KeyValue conforming to the -// "aws.s3.part_number" semantic conventions. It represents the part number of -// the part being uploaded in a multipart-upload operation. This is a positive -// integer between 1 and 10,000. -func AWSS3PartNumber(val int) attribute.KeyValue { - return AWSS3PartNumberKey.Int(val) -} - -// AWSS3UploadID returns an attribute KeyValue conforming to the -// "aws.s3.upload_id" semantic conventions. It represents the upload ID that -// identifies the multipart upload. -func AWSS3UploadID(val string) attribute.KeyValue { - return AWSS3UploadIDKey.String(val) -} - -// AWSSecretsmanagerSecretARN returns an attribute KeyValue conforming to the -// "aws.secretsmanager.secret.arn" semantic conventions. It represents the ARN of -// the Secret stored in the Secrets Mangger. -func AWSSecretsmanagerSecretARN(val string) attribute.KeyValue { - return AWSSecretsmanagerSecretARNKey.String(val) -} - -// AWSSNSTopicARN returns an attribute KeyValue conforming to the -// "aws.sns.topic.arn" semantic conventions. It represents the ARN of the AWS SNS -// Topic. An Amazon SNS [topic] is a logical access point that acts as a -// communication channel. -// -// [topic]: https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html -func AWSSNSTopicARN(val string) attribute.KeyValue { - return AWSSNSTopicARNKey.String(val) -} - -// AWSSQSQueueURL returns an attribute KeyValue conforming to the -// "aws.sqs.queue.url" semantic conventions. It represents the URL of the AWS SQS -// Queue. It's a unique identifier for a queue in Amazon Simple Queue Service -// (SQS) and is used to access the queue and perform actions on it. -func AWSSQSQueueURL(val string) attribute.KeyValue { - return AWSSQSQueueURLKey.String(val) -} - -// AWSStepFunctionsActivityARN returns an attribute KeyValue conforming to the -// "aws.step_functions.activity.arn" semantic conventions. It represents the ARN -// of the AWS Step Functions Activity. -func AWSStepFunctionsActivityARN(val string) attribute.KeyValue { - return AWSStepFunctionsActivityARNKey.String(val) -} - -// AWSStepFunctionsStateMachineARN returns an attribute KeyValue conforming to -// the "aws.step_functions.state_machine.arn" semantic conventions. It represents -// the ARN of the AWS Step Functions State Machine. -func AWSStepFunctionsStateMachineARN(val string) attribute.KeyValue { - return AWSStepFunctionsStateMachineARNKey.String(val) -} - -// Enum values for aws.ecs.launchtype -var ( - // Amazon EC2 - // Stability: development - AWSECSLaunchtypeEC2 = AWSECSLaunchtypeKey.String("ec2") - // Amazon Fargate - // Stability: development - AWSECSLaunchtypeFargate = AWSECSLaunchtypeKey.String("fargate") -) - -// Namespace: azure -const ( - // AzureClientIDKey is the attribute Key conforming to the "azure.client.id" - // semantic conventions. It represents the unique identifier of the client - // instance. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "3ba4827d-4422-483f-b59f-85b74211c11d", "storage-client-1" - AzureClientIDKey = attribute.Key("azure.client.id") - - // AzureCosmosDBConnectionModeKey is the attribute Key conforming to the - // "azure.cosmosdb.connection.mode" semantic conventions. It represents the - // cosmos client connection mode. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - AzureCosmosDBConnectionModeKey = attribute.Key("azure.cosmosdb.connection.mode") - - // AzureCosmosDBConsistencyLevelKey is the attribute Key conforming to the - // "azure.cosmosdb.consistency.level" semantic conventions. It represents the - // account or request [consistency level]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Eventual", "ConsistentPrefix", "BoundedStaleness", "Strong", - // "Session" - // - // [consistency level]: https://learn.microsoft.com/azure/cosmos-db/consistency-levels - AzureCosmosDBConsistencyLevelKey = attribute.Key("azure.cosmosdb.consistency.level") - - // AzureCosmosDBOperationContactedRegionsKey is the attribute Key conforming to - // the "azure.cosmosdb.operation.contacted_regions" semantic conventions. It - // represents the list of regions contacted during operation in the order that - // they were contacted. If there is more than one region listed, it indicates - // that the operation was performed on multiple regions i.e. cross-regional - // call. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "North Central US", "Australia East", "Australia Southeast" - // Note: Region name matches the format of `displayName` in [Azure Location API] - // - // [Azure Location API]: https://learn.microsoft.com/rest/api/subscription/subscriptions/list-locations?view=rest-subscription-2021-10-01&tabs=HTTP#location - AzureCosmosDBOperationContactedRegionsKey = attribute.Key("azure.cosmosdb.operation.contacted_regions") - - // AzureCosmosDBOperationRequestChargeKey is the attribute Key conforming to the - // "azure.cosmosdb.operation.request_charge" semantic conventions. It represents - // the number of request units consumed by the operation. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 46.18, 1.0 - AzureCosmosDBOperationRequestChargeKey = attribute.Key("azure.cosmosdb.operation.request_charge") - - // AzureCosmosDBRequestBodySizeKey is the attribute Key conforming to the - // "azure.cosmosdb.request.body.size" semantic conventions. It represents the - // request payload size in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - AzureCosmosDBRequestBodySizeKey = attribute.Key("azure.cosmosdb.request.body.size") - - // AzureCosmosDBResponseSubStatusCodeKey is the attribute Key conforming to the - // "azure.cosmosdb.response.sub_status_code" semantic conventions. It represents - // the cosmos DB sub status code. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1000, 1002 - AzureCosmosDBResponseSubStatusCodeKey = attribute.Key("azure.cosmosdb.response.sub_status_code") - - // AzureResourceProviderNamespaceKey is the attribute Key conforming to the - // "azure.resource_provider.namespace" semantic conventions. It represents the - // [Azure Resource Provider Namespace] as recognized by the client. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Microsoft.Storage", "Microsoft.KeyVault", "Microsoft.ServiceBus" - // - // [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers - AzureResourceProviderNamespaceKey = attribute.Key("azure.resource_provider.namespace") - - // AzureServiceRequestIDKey is the attribute Key conforming to the - // "azure.service.request.id" semantic conventions. It represents the unique - // identifier of the service request. It's generated by the Azure service and - // returned with the response. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "00000000-0000-0000-0000-000000000000" - AzureServiceRequestIDKey = attribute.Key("azure.service.request.id") -) - -// AzureClientID returns an attribute KeyValue conforming to the -// "azure.client.id" semantic conventions. It represents the unique identifier of -// the client instance. -func AzureClientID(val string) attribute.KeyValue { - return AzureClientIDKey.String(val) -} - -// AzureCosmosDBOperationContactedRegions returns an attribute KeyValue -// conforming to the "azure.cosmosdb.operation.contacted_regions" semantic -// conventions. It represents the list of regions contacted during operation in -// the order that they were contacted. If there is more than one region listed, -// it indicates that the operation was performed on multiple regions i.e. -// cross-regional call. -func AzureCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue { - return AzureCosmosDBOperationContactedRegionsKey.StringSlice(val) -} - -// AzureCosmosDBOperationRequestCharge returns an attribute KeyValue conforming -// to the "azure.cosmosdb.operation.request_charge" semantic conventions. It -// represents the number of request units consumed by the operation. -func AzureCosmosDBOperationRequestCharge(val float64) attribute.KeyValue { - return AzureCosmosDBOperationRequestChargeKey.Float64(val) -} - -// AzureCosmosDBRequestBodySize returns an attribute KeyValue conforming to the -// "azure.cosmosdb.request.body.size" semantic conventions. It represents the -// request payload size in bytes. -func AzureCosmosDBRequestBodySize(val int) attribute.KeyValue { - return AzureCosmosDBRequestBodySizeKey.Int(val) -} - -// AzureCosmosDBResponseSubStatusCode returns an attribute KeyValue conforming to -// the "azure.cosmosdb.response.sub_status_code" semantic conventions. It -// represents the cosmos DB sub status code. -func AzureCosmosDBResponseSubStatusCode(val int) attribute.KeyValue { - return AzureCosmosDBResponseSubStatusCodeKey.Int(val) -} - -// AzureResourceProviderNamespace returns an attribute KeyValue conforming to the -// "azure.resource_provider.namespace" semantic conventions. It represents the -// [Azure Resource Provider Namespace] as recognized by the client. -// -// [Azure Resource Provider Namespace]: https://learn.microsoft.com/azure/azure-resource-manager/management/azure-services-resource-providers -func AzureResourceProviderNamespace(val string) attribute.KeyValue { - return AzureResourceProviderNamespaceKey.String(val) -} - -// AzureServiceRequestID returns an attribute KeyValue conforming to the -// "azure.service.request.id" semantic conventions. It represents the unique -// identifier of the service request. It's generated by the Azure service and -// returned with the response. -func AzureServiceRequestID(val string) attribute.KeyValue { - return AzureServiceRequestIDKey.String(val) -} - -// Enum values for azure.cosmosdb.connection.mode -var ( - // Gateway (HTTP) connection. - // Stability: development - AzureCosmosDBConnectionModeGateway = AzureCosmosDBConnectionModeKey.String("gateway") - // Direct connection. - // Stability: development - AzureCosmosDBConnectionModeDirect = AzureCosmosDBConnectionModeKey.String("direct") -) - -// Enum values for azure.cosmosdb.consistency.level -var ( - // Strong - // Stability: development - AzureCosmosDBConsistencyLevelStrong = AzureCosmosDBConsistencyLevelKey.String("Strong") - // Bounded Staleness - // Stability: development - AzureCosmosDBConsistencyLevelBoundedStaleness = AzureCosmosDBConsistencyLevelKey.String("BoundedStaleness") - // Session - // Stability: development - AzureCosmosDBConsistencyLevelSession = AzureCosmosDBConsistencyLevelKey.String("Session") - // Eventual - // Stability: development - AzureCosmosDBConsistencyLevelEventual = AzureCosmosDBConsistencyLevelKey.String("Eventual") - // Consistent Prefix - // Stability: development - AzureCosmosDBConsistencyLevelConsistentPrefix = AzureCosmosDBConsistencyLevelKey.String("ConsistentPrefix") -) - -// Namespace: browser -const ( - // BrowserBrandsKey is the attribute Key conforming to the "browser.brands" - // semantic conventions. It represents the array of brand name and version - // separated by a space. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: " Not A;Brand 99", "Chromium 99", "Chrome 99" - // Note: This value is intended to be taken from the [UA client hints API] ( - // `navigator.userAgentData.brands`). - // - // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface - BrowserBrandsKey = attribute.Key("browser.brands") - - // BrowserLanguageKey is the attribute Key conforming to the "browser.language" - // semantic conventions. It represents the preferred language of the user using - // the browser. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "en", "en-US", "fr", "fr-FR" - // Note: This value is intended to be taken from the Navigator API - // `navigator.language`. - BrowserLanguageKey = attribute.Key("browser.language") - - // BrowserMobileKey is the attribute Key conforming to the "browser.mobile" - // semantic conventions. It represents a boolean that is true if the browser is - // running on a mobile device. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: This value is intended to be taken from the [UA client hints API] ( - // `navigator.userAgentData.mobile`). If unavailable, this attribute SHOULD be - // left unset. - // - // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface - BrowserMobileKey = attribute.Key("browser.mobile") - - // BrowserPlatformKey is the attribute Key conforming to the "browser.platform" - // semantic conventions. It represents the platform on which the browser is - // running. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Windows", "macOS", "Android" - // Note: This value is intended to be taken from the [UA client hints API] ( - // `navigator.userAgentData.platform`). If unavailable, the legacy - // `navigator.platform` API SHOULD NOT be used instead and this attribute SHOULD - // be left unset in order for the values to be consistent. - // The list of possible values is defined in the - // [W3C User-Agent Client Hints specification]. Note that some (but not all) of - // these values can overlap with values in the - // [`os.type` and `os.name` attributes]. However, for consistency, the values in - // the `browser.platform` attribute should capture the exact value that the user - // agent provides. - // - // [UA client hints API]: https://wicg.github.io/ua-client-hints/#interface - // [W3C User-Agent Client Hints specification]: https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform - // [`os.type` and `os.name` attributes]: ./os.md - BrowserPlatformKey = attribute.Key("browser.platform") -) - -// BrowserBrands returns an attribute KeyValue conforming to the "browser.brands" -// semantic conventions. It represents the array of brand name and version -// separated by a space. -func BrowserBrands(val ...string) attribute.KeyValue { - return BrowserBrandsKey.StringSlice(val) -} - -// BrowserLanguage returns an attribute KeyValue conforming to the -// "browser.language" semantic conventions. It represents the preferred language -// of the user using the browser. -func BrowserLanguage(val string) attribute.KeyValue { - return BrowserLanguageKey.String(val) -} - -// BrowserMobile returns an attribute KeyValue conforming to the "browser.mobile" -// semantic conventions. It represents a boolean that is true if the browser is -// running on a mobile device. -func BrowserMobile(val bool) attribute.KeyValue { - return BrowserMobileKey.Bool(val) -} - -// BrowserPlatform returns an attribute KeyValue conforming to the -// "browser.platform" semantic conventions. It represents the platform on which -// the browser is running. -func BrowserPlatform(val string) attribute.KeyValue { - return BrowserPlatformKey.String(val) -} - -// Namespace: cassandra -const ( - // CassandraConsistencyLevelKey is the attribute Key conforming to the - // "cassandra.consistency.level" semantic conventions. It represents the - // consistency level of the query. Based on consistency values from [CQL]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [CQL]: https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html - CassandraConsistencyLevelKey = attribute.Key("cassandra.consistency.level") - - // CassandraCoordinatorDCKey is the attribute Key conforming to the - // "cassandra.coordinator.dc" semantic conventions. It represents the data - // center of the coordinating node for a query. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: us-west-2 - CassandraCoordinatorDCKey = attribute.Key("cassandra.coordinator.dc") - - // CassandraCoordinatorIDKey is the attribute Key conforming to the - // "cassandra.coordinator.id" semantic conventions. It represents the ID of the - // coordinating node for a query. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: be13faa2-8574-4d71-926d-27f16cf8a7af - CassandraCoordinatorIDKey = attribute.Key("cassandra.coordinator.id") - - // CassandraPageSizeKey is the attribute Key conforming to the - // "cassandra.page.size" semantic conventions. It represents the fetch size used - // for paging, i.e. how many rows will be returned at once. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 5000 - CassandraPageSizeKey = attribute.Key("cassandra.page.size") - - // CassandraQueryIdempotentKey is the attribute Key conforming to the - // "cassandra.query.idempotent" semantic conventions. It represents the whether - // or not the query is idempotent. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - CassandraQueryIdempotentKey = attribute.Key("cassandra.query.idempotent") - - // CassandraSpeculativeExecutionCountKey is the attribute Key conforming to the - // "cassandra.speculative_execution.count" semantic conventions. It represents - // the number of times a query was speculatively executed. Not set or `0` if the - // query was not executed speculatively. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0, 2 - CassandraSpeculativeExecutionCountKey = attribute.Key("cassandra.speculative_execution.count") -) - -// CassandraCoordinatorDC returns an attribute KeyValue conforming to the -// "cassandra.coordinator.dc" semantic conventions. It represents the data center -// of the coordinating node for a query. -func CassandraCoordinatorDC(val string) attribute.KeyValue { - return CassandraCoordinatorDCKey.String(val) -} - -// CassandraCoordinatorID returns an attribute KeyValue conforming to the -// "cassandra.coordinator.id" semantic conventions. It represents the ID of the -// coordinating node for a query. -func CassandraCoordinatorID(val string) attribute.KeyValue { - return CassandraCoordinatorIDKey.String(val) -} - -// CassandraPageSize returns an attribute KeyValue conforming to the -// "cassandra.page.size" semantic conventions. It represents the fetch size used -// for paging, i.e. how many rows will be returned at once. -func CassandraPageSize(val int) attribute.KeyValue { - return CassandraPageSizeKey.Int(val) -} - -// CassandraQueryIdempotent returns an attribute KeyValue conforming to the -// "cassandra.query.idempotent" semantic conventions. It represents the whether -// or not the query is idempotent. -func CassandraQueryIdempotent(val bool) attribute.KeyValue { - return CassandraQueryIdempotentKey.Bool(val) -} - -// CassandraSpeculativeExecutionCount returns an attribute KeyValue conforming to -// the "cassandra.speculative_execution.count" semantic conventions. It -// represents the number of times a query was speculatively executed. Not set or -// `0` if the query was not executed speculatively. -func CassandraSpeculativeExecutionCount(val int) attribute.KeyValue { - return CassandraSpeculativeExecutionCountKey.Int(val) -} - -// Enum values for cassandra.consistency.level -var ( - // All - // Stability: development - CassandraConsistencyLevelAll = CassandraConsistencyLevelKey.String("all") - // Each Quorum - // Stability: development - CassandraConsistencyLevelEachQuorum = CassandraConsistencyLevelKey.String("each_quorum") - // Quorum - // Stability: development - CassandraConsistencyLevelQuorum = CassandraConsistencyLevelKey.String("quorum") - // Local Quorum - // Stability: development - CassandraConsistencyLevelLocalQuorum = CassandraConsistencyLevelKey.String("local_quorum") - // One - // Stability: development - CassandraConsistencyLevelOne = CassandraConsistencyLevelKey.String("one") - // Two - // Stability: development - CassandraConsistencyLevelTwo = CassandraConsistencyLevelKey.String("two") - // Three - // Stability: development - CassandraConsistencyLevelThree = CassandraConsistencyLevelKey.String("three") - // Local One - // Stability: development - CassandraConsistencyLevelLocalOne = CassandraConsistencyLevelKey.String("local_one") - // Any - // Stability: development - CassandraConsistencyLevelAny = CassandraConsistencyLevelKey.String("any") - // Serial - // Stability: development - CassandraConsistencyLevelSerial = CassandraConsistencyLevelKey.String("serial") - // Local Serial - // Stability: development - CassandraConsistencyLevelLocalSerial = CassandraConsistencyLevelKey.String("local_serial") -) - -// Namespace: cicd -const ( - // CICDPipelineActionNameKey is the attribute Key conforming to the - // "cicd.pipeline.action.name" semantic conventions. It represents the kind of - // action a pipeline run is performing. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "BUILD", "RUN", "SYNC" - CICDPipelineActionNameKey = attribute.Key("cicd.pipeline.action.name") - - // CICDPipelineNameKey is the attribute Key conforming to the - // "cicd.pipeline.name" semantic conventions. It represents the human readable - // name of the pipeline within a CI/CD system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Build and Test", "Lint", "Deploy Go Project", - // "deploy_to_environment" - CICDPipelineNameKey = attribute.Key("cicd.pipeline.name") - - // CICDPipelineResultKey is the attribute Key conforming to the - // "cicd.pipeline.result" semantic conventions. It represents the result of a - // pipeline run. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "success", "failure", "timeout", "skipped" - CICDPipelineResultKey = attribute.Key("cicd.pipeline.result") - - // CICDPipelineRunIDKey is the attribute Key conforming to the - // "cicd.pipeline.run.id" semantic conventions. It represents the unique - // identifier of a pipeline run within a CI/CD system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "120912" - CICDPipelineRunIDKey = attribute.Key("cicd.pipeline.run.id") - - // CICDPipelineRunStateKey is the attribute Key conforming to the - // "cicd.pipeline.run.state" semantic conventions. It represents the pipeline - // run goes through these states during its lifecycle. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "pending", "executing", "finalizing" - CICDPipelineRunStateKey = attribute.Key("cicd.pipeline.run.state") - - // CICDPipelineRunURLFullKey is the attribute Key conforming to the - // "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of - // the pipeline run, providing the complete address in order to locate and - // identify the pipeline run. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763?pr=1075" - // - // [URL]: https://wikipedia.org/wiki/URL - CICDPipelineRunURLFullKey = attribute.Key("cicd.pipeline.run.url.full") - - // CICDPipelineTaskNameKey is the attribute Key conforming to the - // "cicd.pipeline.task.name" semantic conventions. It represents the human - // readable name of a task within a pipeline. Task here most closely aligns with - // a [computing process] in a pipeline. Other terms for tasks include commands, - // steps, and procedures. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Run GoLang Linter", "Go Build", "go-test", "deploy_binary" - // - // [computing process]: https://wikipedia.org/wiki/Pipeline_(computing) - CICDPipelineTaskNameKey = attribute.Key("cicd.pipeline.task.name") - - // CICDPipelineTaskRunIDKey is the attribute Key conforming to the - // "cicd.pipeline.task.run.id" semantic conventions. It represents the unique - // identifier of a task run within a pipeline. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "12097" - CICDPipelineTaskRunIDKey = attribute.Key("cicd.pipeline.task.run.id") - - // CICDPipelineTaskRunResultKey is the attribute Key conforming to the - // "cicd.pipeline.task.run.result" semantic conventions. It represents the - // result of a task run. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "success", "failure", "timeout", "skipped" - CICDPipelineTaskRunResultKey = attribute.Key("cicd.pipeline.task.run.result") - - // CICDPipelineTaskRunURLFullKey is the attribute Key conforming to the - // "cicd.pipeline.task.run.url.full" semantic conventions. It represents the - // [URL] of the pipeline task run, providing the complete address in order to - // locate and identify the pipeline task run. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "https://github.com/open-telemetry/semantic-conventions/actions/runs/9753949763/job/26920038674?pr=1075" - // - // [URL]: https://wikipedia.org/wiki/URL - CICDPipelineTaskRunURLFullKey = attribute.Key("cicd.pipeline.task.run.url.full") - - // CICDPipelineTaskTypeKey is the attribute Key conforming to the - // "cicd.pipeline.task.type" semantic conventions. It represents the type of the - // task within a pipeline. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "build", "test", "deploy" - CICDPipelineTaskTypeKey = attribute.Key("cicd.pipeline.task.type") - - // CICDSystemComponentKey is the attribute Key conforming to the - // "cicd.system.component" semantic conventions. It represents the name of a - // component of the CICD system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "controller", "scheduler", "agent" - CICDSystemComponentKey = attribute.Key("cicd.system.component") - - // CICDWorkerIDKey is the attribute Key conforming to the "cicd.worker.id" - // semantic conventions. It represents the unique identifier of a worker within - // a CICD system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "abc123", "10.0.1.2", "controller" - CICDWorkerIDKey = attribute.Key("cicd.worker.id") - - // CICDWorkerNameKey is the attribute Key conforming to the "cicd.worker.name" - // semantic conventions. It represents the name of a worker within a CICD - // system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "agent-abc", "controller", "Ubuntu LTS" - CICDWorkerNameKey = attribute.Key("cicd.worker.name") - - // CICDWorkerStateKey is the attribute Key conforming to the "cicd.worker.state" - // semantic conventions. It represents the state of a CICD worker / agent. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "idle", "busy", "down" - CICDWorkerStateKey = attribute.Key("cicd.worker.state") - - // CICDWorkerURLFullKey is the attribute Key conforming to the - // "cicd.worker.url.full" semantic conventions. It represents the [URL] of the - // worker, providing the complete address in order to locate and identify the - // worker. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://cicd.example.org/worker/abc123" - // - // [URL]: https://wikipedia.org/wiki/URL - CICDWorkerURLFullKey = attribute.Key("cicd.worker.url.full") -) - -// CICDPipelineName returns an attribute KeyValue conforming to the -// "cicd.pipeline.name" semantic conventions. It represents the human readable -// name of the pipeline within a CI/CD system. -func CICDPipelineName(val string) attribute.KeyValue { - return CICDPipelineNameKey.String(val) -} - -// CICDPipelineRunID returns an attribute KeyValue conforming to the -// "cicd.pipeline.run.id" semantic conventions. It represents the unique -// identifier of a pipeline run within a CI/CD system. -func CICDPipelineRunID(val string) attribute.KeyValue { - return CICDPipelineRunIDKey.String(val) -} - -// CICDPipelineRunURLFull returns an attribute KeyValue conforming to the -// "cicd.pipeline.run.url.full" semantic conventions. It represents the [URL] of -// the pipeline run, providing the complete address in order to locate and -// identify the pipeline run. -// -// [URL]: https://wikipedia.org/wiki/URL -func CICDPipelineRunURLFull(val string) attribute.KeyValue { - return CICDPipelineRunURLFullKey.String(val) -} - -// CICDPipelineTaskName returns an attribute KeyValue conforming to the -// "cicd.pipeline.task.name" semantic conventions. It represents the human -// readable name of a task within a pipeline. Task here most closely aligns with -// a [computing process] in a pipeline. Other terms for tasks include commands, -// steps, and procedures. -// -// [computing process]: https://wikipedia.org/wiki/Pipeline_(computing) -func CICDPipelineTaskName(val string) attribute.KeyValue { - return CICDPipelineTaskNameKey.String(val) -} - -// CICDPipelineTaskRunID returns an attribute KeyValue conforming to the -// "cicd.pipeline.task.run.id" semantic conventions. It represents the unique -// identifier of a task run within a pipeline. -func CICDPipelineTaskRunID(val string) attribute.KeyValue { - return CICDPipelineTaskRunIDKey.String(val) -} - -// CICDPipelineTaskRunURLFull returns an attribute KeyValue conforming to the -// "cicd.pipeline.task.run.url.full" semantic conventions. It represents the -// [URL] of the pipeline task run, providing the complete address in order to -// locate and identify the pipeline task run. -// -// [URL]: https://wikipedia.org/wiki/URL -func CICDPipelineTaskRunURLFull(val string) attribute.KeyValue { - return CICDPipelineTaskRunURLFullKey.String(val) -} - -// CICDSystemComponent returns an attribute KeyValue conforming to the -// "cicd.system.component" semantic conventions. It represents the name of a -// component of the CICD system. -func CICDSystemComponent(val string) attribute.KeyValue { - return CICDSystemComponentKey.String(val) -} - -// CICDWorkerID returns an attribute KeyValue conforming to the "cicd.worker.id" -// semantic conventions. It represents the unique identifier of a worker within a -// CICD system. -func CICDWorkerID(val string) attribute.KeyValue { - return CICDWorkerIDKey.String(val) -} - -// CICDWorkerName returns an attribute KeyValue conforming to the -// "cicd.worker.name" semantic conventions. It represents the name of a worker -// within a CICD system. -func CICDWorkerName(val string) attribute.KeyValue { - return CICDWorkerNameKey.String(val) -} - -// CICDWorkerURLFull returns an attribute KeyValue conforming to the -// "cicd.worker.url.full" semantic conventions. It represents the [URL] of the -// worker, providing the complete address in order to locate and identify the -// worker. -// -// [URL]: https://wikipedia.org/wiki/URL -func CICDWorkerURLFull(val string) attribute.KeyValue { - return CICDWorkerURLFullKey.String(val) -} - -// Enum values for cicd.pipeline.action.name -var ( - // The pipeline run is executing a build. - // Stability: development - CICDPipelineActionNameBuild = CICDPipelineActionNameKey.String("BUILD") - // The pipeline run is executing. - // Stability: development - CICDPipelineActionNameRun = CICDPipelineActionNameKey.String("RUN") - // The pipeline run is executing a sync. - // Stability: development - CICDPipelineActionNameSync = CICDPipelineActionNameKey.String("SYNC") -) - -// Enum values for cicd.pipeline.result -var ( - // The pipeline run finished successfully. - // Stability: development - CICDPipelineResultSuccess = CICDPipelineResultKey.String("success") - // The pipeline run did not finish successfully, eg. due to a compile error or a - // failing test. Such failures are usually detected by non-zero exit codes of - // the tools executed in the pipeline run. - // Stability: development - CICDPipelineResultFailure = CICDPipelineResultKey.String("failure") - // The pipeline run failed due to an error in the CICD system, eg. due to the - // worker being killed. - // Stability: development - CICDPipelineResultError = CICDPipelineResultKey.String("error") - // A timeout caused the pipeline run to be interrupted. - // Stability: development - CICDPipelineResultTimeout = CICDPipelineResultKey.String("timeout") - // The pipeline run was cancelled, eg. by a user manually cancelling the - // pipeline run. - // Stability: development - CICDPipelineResultCancellation = CICDPipelineResultKey.String("cancellation") - // The pipeline run was skipped, eg. due to a precondition not being met. - // Stability: development - CICDPipelineResultSkip = CICDPipelineResultKey.String("skip") -) - -// Enum values for cicd.pipeline.run.state -var ( - // The run pending state spans from the event triggering the pipeline run until - // the execution of the run starts (eg. time spent in a queue, provisioning - // agents, creating run resources). - // - // Stability: development - CICDPipelineRunStatePending = CICDPipelineRunStateKey.String("pending") - // The executing state spans the execution of any run tasks (eg. build, test). - // Stability: development - CICDPipelineRunStateExecuting = CICDPipelineRunStateKey.String("executing") - // The finalizing state spans from when the run has finished executing (eg. - // cleanup of run resources). - // Stability: development - CICDPipelineRunStateFinalizing = CICDPipelineRunStateKey.String("finalizing") -) - -// Enum values for cicd.pipeline.task.run.result -var ( - // The task run finished successfully. - // Stability: development - CICDPipelineTaskRunResultSuccess = CICDPipelineTaskRunResultKey.String("success") - // The task run did not finish successfully, eg. due to a compile error or a - // failing test. Such failures are usually detected by non-zero exit codes of - // the tools executed in the task run. - // Stability: development - CICDPipelineTaskRunResultFailure = CICDPipelineTaskRunResultKey.String("failure") - // The task run failed due to an error in the CICD system, eg. due to the worker - // being killed. - // Stability: development - CICDPipelineTaskRunResultError = CICDPipelineTaskRunResultKey.String("error") - // A timeout caused the task run to be interrupted. - // Stability: development - CICDPipelineTaskRunResultTimeout = CICDPipelineTaskRunResultKey.String("timeout") - // The task run was cancelled, eg. by a user manually cancelling the task run. - // Stability: development - CICDPipelineTaskRunResultCancellation = CICDPipelineTaskRunResultKey.String("cancellation") - // The task run was skipped, eg. due to a precondition not being met. - // Stability: development - CICDPipelineTaskRunResultSkip = CICDPipelineTaskRunResultKey.String("skip") -) - -// Enum values for cicd.pipeline.task.type -var ( - // build - // Stability: development - CICDPipelineTaskTypeBuild = CICDPipelineTaskTypeKey.String("build") - // test - // Stability: development - CICDPipelineTaskTypeTest = CICDPipelineTaskTypeKey.String("test") - // deploy - // Stability: development - CICDPipelineTaskTypeDeploy = CICDPipelineTaskTypeKey.String("deploy") -) - -// Enum values for cicd.worker.state -var ( - // The worker is not performing work for the CICD system. It is available to the - // CICD system to perform work on (online / idle). - // Stability: development - CICDWorkerStateAvailable = CICDWorkerStateKey.String("available") - // The worker is performing work for the CICD system. - // Stability: development - CICDWorkerStateBusy = CICDWorkerStateKey.String("busy") - // The worker is not available to the CICD system (disconnected / down). - // Stability: development - CICDWorkerStateOffline = CICDWorkerStateKey.String("offline") -) - -// Namespace: client -const ( - // ClientAddressKey is the attribute Key conforming to the "client.address" - // semantic conventions. It represents the client address - domain name if - // available without reverse DNS lookup; otherwise, IP address or Unix domain - // socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "client.example.com", "10.1.2.80", "/tmp/my.sock" - // Note: When observed from the server side, and when communicating through an - // intermediary, `client.address` SHOULD represent the client address behind any - // intermediaries, for example proxies, if it's available. - ClientAddressKey = attribute.Key("client.address") - - // ClientPortKey is the attribute Key conforming to the "client.port" semantic - // conventions. It represents the client port number. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 65123 - // Note: When observed from the server side, and when communicating through an - // intermediary, `client.port` SHOULD represent the client port behind any - // intermediaries, for example proxies, if it's available. - ClientPortKey = attribute.Key("client.port") -) - -// ClientAddress returns an attribute KeyValue conforming to the "client.address" -// semantic conventions. It represents the client address - domain name if -// available without reverse DNS lookup; otherwise, IP address or Unix domain -// socket name. -func ClientAddress(val string) attribute.KeyValue { - return ClientAddressKey.String(val) -} - -// ClientPort returns an attribute KeyValue conforming to the "client.port" -// semantic conventions. It represents the client port number. -func ClientPort(val int) attribute.KeyValue { - return ClientPortKey.Int(val) -} - -// Namespace: cloud -const ( - // CloudAccountIDKey is the attribute Key conforming to the "cloud.account.id" - // semantic conventions. It represents the cloud account ID the resource is - // assigned to. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "111111111111", "opentelemetry" - CloudAccountIDKey = attribute.Key("cloud.account.id") - - // CloudAvailabilityZoneKey is the attribute Key conforming to the - // "cloud.availability_zone" semantic conventions. It represents the cloud - // regions often have multiple, isolated locations known as zones to increase - // availability. Availability zone represents the zone where the resource is - // running. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "us-east-1c" - // Note: Availability zones are called "zones" on Alibaba Cloud and Google - // Cloud. - CloudAvailabilityZoneKey = attribute.Key("cloud.availability_zone") - - // CloudPlatformKey is the attribute Key conforming to the "cloud.platform" - // semantic conventions. It represents the cloud platform in use. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: The prefix of the service SHOULD match the one specified in - // `cloud.provider`. - CloudPlatformKey = attribute.Key("cloud.platform") - - // CloudProviderKey is the attribute Key conforming to the "cloud.provider" - // semantic conventions. It represents the name of the cloud provider. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - CloudProviderKey = attribute.Key("cloud.provider") - - // CloudRegionKey is the attribute Key conforming to the "cloud.region" semantic - // conventions. It represents the geographical region within a cloud provider. - // When associated with a resource, this attribute specifies the region where - // the resource operates. When calling services or APIs deployed on a cloud, - // this attribute identifies the region where the called destination is - // deployed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "us-central1", "us-east-1" - // Note: Refer to your provider's docs to see the available regions, for example - // [Alibaba Cloud regions], [AWS regions], [Azure regions], - // [Google Cloud regions], or [Tencent Cloud regions]. - // - // [Alibaba Cloud regions]: https://www.alibabacloud.com/help/doc-detail/40654.htm - // [AWS regions]: https://aws.amazon.com/about-aws/global-infrastructure/regions_az/ - // [Azure regions]: https://azure.microsoft.com/global-infrastructure/geographies/ - // [Google Cloud regions]: https://cloud.google.com/about/locations - // [Tencent Cloud regions]: https://www.tencentcloud.com/document/product/213/6091 - CloudRegionKey = attribute.Key("cloud.region") - - // CloudResourceIDKey is the attribute Key conforming to the "cloud.resource_id" - // semantic conventions. It represents the cloud provider-specific native - // identifier of the monitored cloud resource (e.g. an [ARN] on AWS, a - // [fully qualified resource ID] on Azure, a [full resource name] on GCP). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "arn:aws:lambda:REGION:ACCOUNT_ID:function:my-function", - // "//run.googleapis.com/projects/PROJECT_ID/locations/LOCATION_ID/services/SERVICE_ID", - // "/subscriptions//resourceGroups/ - // /providers/Microsoft.Web/sites//functions/" - // Note: On some cloud providers, it may not be possible to determine the full - // ID at startup, - // so it may be necessary to set `cloud.resource_id` as a span attribute - // instead. - // - // The exact value to use for `cloud.resource_id` depends on the cloud provider. - // The following well-known definitions MUST be used if you set this attribute - // and they apply: - // - // - **AWS Lambda:** The function [ARN]. - // Take care not to use the "invoked ARN" directly but replace any - // [alias suffix] - // with the resolved function version, as the same runtime instance may be - // invocable with - // multiple different aliases. - // - **GCP:** The [URI of the resource] - // - **Azure:** The [Fully Qualified Resource ID] of the invoked function, - // *not* the function app, having the form - // - // `/subscriptions//resourceGroups//providers/Microsoft.Web/sites//functions/` - // . - // This means that a span attribute MUST be used, as an Azure function app - // can host multiple functions that would usually share - // a TracerProvider. - // - // - // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - // [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id - // [full resource name]: https://google.aip.dev/122#full-resource-names - // [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html - // [alias suffix]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-aliases.html - // [URI of the resource]: https://cloud.google.com/iam/docs/full-resource-names - // [Fully Qualified Resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id - CloudResourceIDKey = attribute.Key("cloud.resource_id") -) - -// CloudAccountID returns an attribute KeyValue conforming to the -// "cloud.account.id" semantic conventions. It represents the cloud account ID -// the resource is assigned to. -func CloudAccountID(val string) attribute.KeyValue { - return CloudAccountIDKey.String(val) -} - -// CloudAvailabilityZone returns an attribute KeyValue conforming to the -// "cloud.availability_zone" semantic conventions. It represents the cloud -// regions often have multiple, isolated locations known as zones to increase -// availability. Availability zone represents the zone where the resource is -// running. -func CloudAvailabilityZone(val string) attribute.KeyValue { - return CloudAvailabilityZoneKey.String(val) -} - -// CloudRegion returns an attribute KeyValue conforming to the "cloud.region" -// semantic conventions. It represents the geographical region within a cloud -// provider. When associated with a resource, this attribute specifies the region -// where the resource operates. When calling services or APIs deployed on a -// cloud, this attribute identifies the region where the called destination is -// deployed. -func CloudRegion(val string) attribute.KeyValue { - return CloudRegionKey.String(val) -} - -// CloudResourceID returns an attribute KeyValue conforming to the -// "cloud.resource_id" semantic conventions. It represents the cloud -// provider-specific native identifier of the monitored cloud resource (e.g. an -// [ARN] on AWS, a [fully qualified resource ID] on Azure, a [full resource name] -// on GCP). -// -// [ARN]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html -// [fully qualified resource ID]: https://learn.microsoft.com/rest/api/resources/resources/get-by-id -// [full resource name]: https://google.aip.dev/122#full-resource-names -func CloudResourceID(val string) attribute.KeyValue { - return CloudResourceIDKey.String(val) -} - -// Enum values for cloud.platform -var ( - // Alibaba Cloud Elastic Compute Service - // Stability: development - CloudPlatformAlibabaCloudECS = CloudPlatformKey.String("alibaba_cloud_ecs") - // Alibaba Cloud Function Compute - // Stability: development - CloudPlatformAlibabaCloudFC = CloudPlatformKey.String("alibaba_cloud_fc") - // Red Hat OpenShift on Alibaba Cloud - // Stability: development - CloudPlatformAlibabaCloudOpenShift = CloudPlatformKey.String("alibaba_cloud_openshift") - // AWS Elastic Compute Cloud - // Stability: development - CloudPlatformAWSEC2 = CloudPlatformKey.String("aws_ec2") - // AWS Elastic Container Service - // Stability: development - CloudPlatformAWSECS = CloudPlatformKey.String("aws_ecs") - // AWS Elastic Kubernetes Service - // Stability: development - CloudPlatformAWSEKS = CloudPlatformKey.String("aws_eks") - // AWS Lambda - // Stability: development - CloudPlatformAWSLambda = CloudPlatformKey.String("aws_lambda") - // AWS Elastic Beanstalk - // Stability: development - CloudPlatformAWSElasticBeanstalk = CloudPlatformKey.String("aws_elastic_beanstalk") - // AWS App Runner - // Stability: development - CloudPlatformAWSAppRunner = CloudPlatformKey.String("aws_app_runner") - // Red Hat OpenShift on AWS (ROSA) - // Stability: development - CloudPlatformAWSOpenShift = CloudPlatformKey.String("aws_openshift") - // Azure Virtual Machines - // Stability: development - CloudPlatformAzureVM = CloudPlatformKey.String("azure.vm") - // Azure Container Apps - // Stability: development - CloudPlatformAzureContainerApps = CloudPlatformKey.String("azure.container_apps") - // Azure Container Instances - // Stability: development - CloudPlatformAzureContainerInstances = CloudPlatformKey.String("azure.container_instances") - // Azure Kubernetes Service - // Stability: development - CloudPlatformAzureAKS = CloudPlatformKey.String("azure.aks") - // Azure Functions - // Stability: development - CloudPlatformAzureFunctions = CloudPlatformKey.String("azure.functions") - // Azure App Service - // Stability: development - CloudPlatformAzureAppService = CloudPlatformKey.String("azure.app_service") - // Azure Red Hat OpenShift - // Stability: development - CloudPlatformAzureOpenShift = CloudPlatformKey.String("azure.openshift") - // Google Bare Metal Solution (BMS) - // Stability: development - CloudPlatformGCPBareMetalSolution = CloudPlatformKey.String("gcp_bare_metal_solution") - // Google Cloud Compute Engine (GCE) - // Stability: development - CloudPlatformGCPComputeEngine = CloudPlatformKey.String("gcp_compute_engine") - // Google Cloud Run - // Stability: development - CloudPlatformGCPCloudRun = CloudPlatformKey.String("gcp_cloud_run") - // Google Cloud Kubernetes Engine (GKE) - // Stability: development - CloudPlatformGCPKubernetesEngine = CloudPlatformKey.String("gcp_kubernetes_engine") - // Google Cloud Functions (GCF) - // Stability: development - CloudPlatformGCPCloudFunctions = CloudPlatformKey.String("gcp_cloud_functions") - // Google Cloud App Engine (GAE) - // Stability: development - CloudPlatformGCPAppEngine = CloudPlatformKey.String("gcp_app_engine") - // Red Hat OpenShift on Google Cloud - // Stability: development - CloudPlatformGCPOpenShift = CloudPlatformKey.String("gcp_openshift") - // Red Hat OpenShift on IBM Cloud - // Stability: development - CloudPlatformIBMCloudOpenShift = CloudPlatformKey.String("ibm_cloud_openshift") - // Compute on Oracle Cloud Infrastructure (OCI) - // Stability: development - CloudPlatformOracleCloudCompute = CloudPlatformKey.String("oracle_cloud_compute") - // Kubernetes Engine (OKE) on Oracle Cloud Infrastructure (OCI) - // Stability: development - CloudPlatformOracleCloudOKE = CloudPlatformKey.String("oracle_cloud_oke") - // Tencent Cloud Cloud Virtual Machine (CVM) - // Stability: development - CloudPlatformTencentCloudCVM = CloudPlatformKey.String("tencent_cloud_cvm") - // Tencent Cloud Elastic Kubernetes Service (EKS) - // Stability: development - CloudPlatformTencentCloudEKS = CloudPlatformKey.String("tencent_cloud_eks") - // Tencent Cloud Serverless Cloud Function (SCF) - // Stability: development - CloudPlatformTencentCloudSCF = CloudPlatformKey.String("tencent_cloud_scf") -) - -// Enum values for cloud.provider -var ( - // Alibaba Cloud - // Stability: development - CloudProviderAlibabaCloud = CloudProviderKey.String("alibaba_cloud") - // Amazon Web Services - // Stability: development - CloudProviderAWS = CloudProviderKey.String("aws") - // Microsoft Azure - // Stability: development - CloudProviderAzure = CloudProviderKey.String("azure") - // Google Cloud Platform - // Stability: development - CloudProviderGCP = CloudProviderKey.String("gcp") - // Heroku Platform as a Service - // Stability: development - CloudProviderHeroku = CloudProviderKey.String("heroku") - // IBM Cloud - // Stability: development - CloudProviderIBMCloud = CloudProviderKey.String("ibm_cloud") - // Oracle Cloud Infrastructure (OCI) - // Stability: development - CloudProviderOracleCloud = CloudProviderKey.String("oracle_cloud") - // Tencent Cloud - // Stability: development - CloudProviderTencentCloud = CloudProviderKey.String("tencent_cloud") -) - -// Namespace: cloudevents -const ( - // CloudEventsEventIDKey is the attribute Key conforming to the - // "cloudevents.event_id" semantic conventions. It represents the [event_id] - // uniquely identifies the event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "123e4567-e89b-12d3-a456-426614174000", "0001" - // - // [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id - CloudEventsEventIDKey = attribute.Key("cloudevents.event_id") - - // CloudEventsEventSourceKey is the attribute Key conforming to the - // "cloudevents.event_source" semantic conventions. It represents the [source] - // identifies the context in which an event happened. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://github.com/cloudevents", "/cloudevents/spec/pull/123", - // "my-service" - // - // [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 - CloudEventsEventSourceKey = attribute.Key("cloudevents.event_source") - - // CloudEventsEventSpecVersionKey is the attribute Key conforming to the - // "cloudevents.event_spec_version" semantic conventions. It represents the - // [version of the CloudEvents specification] which the event uses. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0 - // - // [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion - CloudEventsEventSpecVersionKey = attribute.Key("cloudevents.event_spec_version") - - // CloudEventsEventSubjectKey is the attribute Key conforming to the - // "cloudevents.event_subject" semantic conventions. It represents the [subject] - // of the event in the context of the event producer (identified by source). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: mynewfile.jpg - // - // [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject - CloudEventsEventSubjectKey = attribute.Key("cloudevents.event_subject") - - // CloudEventsEventTypeKey is the attribute Key conforming to the - // "cloudevents.event_type" semantic conventions. It represents the [event_type] - // contains a value describing the type of event related to the originating - // occurrence. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "com.github.pull_request.opened", "com.example.object.deleted.v2" - // - // [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type - CloudEventsEventTypeKey = attribute.Key("cloudevents.event_type") -) - -// CloudEventsEventID returns an attribute KeyValue conforming to the -// "cloudevents.event_id" semantic conventions. It represents the [event_id] -// uniquely identifies the event. -// -// [event_id]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id -func CloudEventsEventID(val string) attribute.KeyValue { - return CloudEventsEventIDKey.String(val) -} - -// CloudEventsEventSource returns an attribute KeyValue conforming to the -// "cloudevents.event_source" semantic conventions. It represents the [source] -// identifies the context in which an event happened. -// -// [source]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1 -func CloudEventsEventSource(val string) attribute.KeyValue { - return CloudEventsEventSourceKey.String(val) -} - -// CloudEventsEventSpecVersion returns an attribute KeyValue conforming to the -// "cloudevents.event_spec_version" semantic conventions. It represents the -// [version of the CloudEvents specification] which the event uses. -// -// [version of the CloudEvents specification]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion -func CloudEventsEventSpecVersion(val string) attribute.KeyValue { - return CloudEventsEventSpecVersionKey.String(val) -} - -// CloudEventsEventSubject returns an attribute KeyValue conforming to the -// "cloudevents.event_subject" semantic conventions. It represents the [subject] -// of the event in the context of the event producer (identified by source). -// -// [subject]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#subject -func CloudEventsEventSubject(val string) attribute.KeyValue { - return CloudEventsEventSubjectKey.String(val) -} - -// CloudEventsEventType returns an attribute KeyValue conforming to the -// "cloudevents.event_type" semantic conventions. It represents the [event_type] -// contains a value describing the type of event related to the originating -// occurrence. -// -// [event_type]: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type -func CloudEventsEventType(val string) attribute.KeyValue { - return CloudEventsEventTypeKey.String(val) -} - -// Namespace: cloudfoundry -const ( - // CloudFoundryAppIDKey is the attribute Key conforming to the - // "cloudfoundry.app.id" semantic conventions. It represents the guid of the - // application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.application_id`. This is the same value as - // reported by `cf app --guid`. - CloudFoundryAppIDKey = attribute.Key("cloudfoundry.app.id") - - // CloudFoundryAppInstanceIDKey is the attribute Key conforming to the - // "cloudfoundry.app.instance.id" semantic conventions. It represents the index - // of the application instance. 0 when just one instance is active. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0", "1" - // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope] - // . - // It is used for logs and metrics emitted by CloudFoundry. It is - // supposed to contain the application instance index for applications - // deployed on the runtime. - // - // Application instrumentation should use the value from environment - // variable `CF_INSTANCE_INDEX`. - // - // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope - CloudFoundryAppInstanceIDKey = attribute.Key("cloudfoundry.app.instance.id") - - // CloudFoundryAppNameKey is the attribute Key conforming to the - // "cloudfoundry.app.name" semantic conventions. It represents the name of the - // application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-app-name" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.application_name`. This is the same value - // as reported by `cf apps`. - CloudFoundryAppNameKey = attribute.Key("cloudfoundry.app.name") - - // CloudFoundryOrgIDKey is the attribute Key conforming to the - // "cloudfoundry.org.id" semantic conventions. It represents the guid of the - // CloudFoundry org the application is running in. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.org_id`. This is the same value as - // reported by `cf org --guid`. - CloudFoundryOrgIDKey = attribute.Key("cloudfoundry.org.id") - - // CloudFoundryOrgNameKey is the attribute Key conforming to the - // "cloudfoundry.org.name" semantic conventions. It represents the name of the - // CloudFoundry organization the app is running in. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-org-name" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.org_name`. This is the same value as - // reported by `cf orgs`. - CloudFoundryOrgNameKey = attribute.Key("cloudfoundry.org.name") - - // CloudFoundryProcessIDKey is the attribute Key conforming to the - // "cloudfoundry.process.id" semantic conventions. It represents the UID - // identifying the process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.process_id`. It is supposed to be equal to - // `VCAP_APPLICATION.app_id` for applications deployed to the runtime. - // For system components, this could be the actual PID. - CloudFoundryProcessIDKey = attribute.Key("cloudfoundry.process.id") - - // CloudFoundryProcessTypeKey is the attribute Key conforming to the - // "cloudfoundry.process.type" semantic conventions. It represents the type of - // process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "web" - // Note: CloudFoundry applications can consist of multiple jobs. Usually the - // main process will be of type `web`. There can be additional background - // tasks or side-cars with different process types. - CloudFoundryProcessTypeKey = attribute.Key("cloudfoundry.process.type") - - // CloudFoundrySpaceIDKey is the attribute Key conforming to the - // "cloudfoundry.space.id" semantic conventions. It represents the guid of the - // CloudFoundry space the application is running in. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.space_id`. This is the same value as - // reported by `cf space --guid`. - CloudFoundrySpaceIDKey = attribute.Key("cloudfoundry.space.id") - - // CloudFoundrySpaceNameKey is the attribute Key conforming to the - // "cloudfoundry.space.name" semantic conventions. It represents the name of the - // CloudFoundry space the application is running in. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-space-name" - // Note: Application instrumentation should use the value from environment - // variable `VCAP_APPLICATION.space_name`. This is the same value as - // reported by `cf spaces`. - CloudFoundrySpaceNameKey = attribute.Key("cloudfoundry.space.name") - - // CloudFoundrySystemIDKey is the attribute Key conforming to the - // "cloudfoundry.system.id" semantic conventions. It represents a guid or - // another name describing the event source. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cf/gorouter" - // Note: CloudFoundry defines the `source_id` in the [Loggregator v2 envelope]. - // It is used for logs and metrics emitted by CloudFoundry. It is - // supposed to contain the component name, e.g. "gorouter", for - // CloudFoundry components. - // - // When system components are instrumented, values from the - // [Bosh spec] - // should be used. The `system.id` should be set to - // `spec.deployment/spec.name`. - // - // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope - // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec - CloudFoundrySystemIDKey = attribute.Key("cloudfoundry.system.id") - - // CloudFoundrySystemInstanceIDKey is the attribute Key conforming to the - // "cloudfoundry.system.instance.id" semantic conventions. It represents a guid - // describing the concrete instance of the event source. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: CloudFoundry defines the `instance_id` in the [Loggregator v2 envelope] - // . - // It is used for logs and metrics emitted by CloudFoundry. It is - // supposed to contain the vm id for CloudFoundry components. - // - // When system components are instrumented, values from the - // [Bosh spec] - // should be used. The `system.instance.id` should be set to `spec.id`. - // - // [Loggregator v2 envelope]: https://github.com/cloudfoundry/loggregator-api#v2-envelope - // [Bosh spec]: https://bosh.io/docs/jobs/#properties-spec - CloudFoundrySystemInstanceIDKey = attribute.Key("cloudfoundry.system.instance.id") -) - -// CloudFoundryAppID returns an attribute KeyValue conforming to the -// "cloudfoundry.app.id" semantic conventions. It represents the guid of the -// application. -func CloudFoundryAppID(val string) attribute.KeyValue { - return CloudFoundryAppIDKey.String(val) -} - -// CloudFoundryAppInstanceID returns an attribute KeyValue conforming to the -// "cloudfoundry.app.instance.id" semantic conventions. It represents the index -// of the application instance. 0 when just one instance is active. -func CloudFoundryAppInstanceID(val string) attribute.KeyValue { - return CloudFoundryAppInstanceIDKey.String(val) -} - -// CloudFoundryAppName returns an attribute KeyValue conforming to the -// "cloudfoundry.app.name" semantic conventions. It represents the name of the -// application. -func CloudFoundryAppName(val string) attribute.KeyValue { - return CloudFoundryAppNameKey.String(val) -} - -// CloudFoundryOrgID returns an attribute KeyValue conforming to the -// "cloudfoundry.org.id" semantic conventions. It represents the guid of the -// CloudFoundry org the application is running in. -func CloudFoundryOrgID(val string) attribute.KeyValue { - return CloudFoundryOrgIDKey.String(val) -} - -// CloudFoundryOrgName returns an attribute KeyValue conforming to the -// "cloudfoundry.org.name" semantic conventions. It represents the name of the -// CloudFoundry organization the app is running in. -func CloudFoundryOrgName(val string) attribute.KeyValue { - return CloudFoundryOrgNameKey.String(val) -} - -// CloudFoundryProcessID returns an attribute KeyValue conforming to the -// "cloudfoundry.process.id" semantic conventions. It represents the UID -// identifying the process. -func CloudFoundryProcessID(val string) attribute.KeyValue { - return CloudFoundryProcessIDKey.String(val) -} - -// CloudFoundryProcessType returns an attribute KeyValue conforming to the -// "cloudfoundry.process.type" semantic conventions. It represents the type of -// process. -func CloudFoundryProcessType(val string) attribute.KeyValue { - return CloudFoundryProcessTypeKey.String(val) -} - -// CloudFoundrySpaceID returns an attribute KeyValue conforming to the -// "cloudfoundry.space.id" semantic conventions. It represents the guid of the -// CloudFoundry space the application is running in. -func CloudFoundrySpaceID(val string) attribute.KeyValue { - return CloudFoundrySpaceIDKey.String(val) -} - -// CloudFoundrySpaceName returns an attribute KeyValue conforming to the -// "cloudfoundry.space.name" semantic conventions. It represents the name of the -// CloudFoundry space the application is running in. -func CloudFoundrySpaceName(val string) attribute.KeyValue { - return CloudFoundrySpaceNameKey.String(val) -} - -// CloudFoundrySystemID returns an attribute KeyValue conforming to the -// "cloudfoundry.system.id" semantic conventions. It represents a guid or another -// name describing the event source. -func CloudFoundrySystemID(val string) attribute.KeyValue { - return CloudFoundrySystemIDKey.String(val) -} - -// CloudFoundrySystemInstanceID returns an attribute KeyValue conforming to the -// "cloudfoundry.system.instance.id" semantic conventions. It represents a guid -// describing the concrete instance of the event source. -func CloudFoundrySystemInstanceID(val string) attribute.KeyValue { - return CloudFoundrySystemInstanceIDKey.String(val) -} - -// Namespace: code -const ( - // CodeColumnNumberKey is the attribute Key conforming to the - // "code.column.number" semantic conventions. It represents the column number in - // `code.file.path` best representing the operation. It SHOULD point within the - // code unit named in `code.function.name`. This attribute MUST NOT be used on - // the Profile signal since the data is already captured in 'message Line'. This - // constraint is imposed to prevent redundancy and maintain data integrity. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - CodeColumnNumberKey = attribute.Key("code.column.number") - - // CodeFilePathKey is the attribute Key conforming to the "code.file.path" - // semantic conventions. It represents the source code file name that identifies - // the code unit as uniquely as possible (preferably an absolute file path). - // This attribute MUST NOT be used on the Profile signal since the data is - // already captured in 'message Function'. This constraint is imposed to prevent - // redundancy and maintain data integrity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: /usr/local/MyApplication/content_root/app/index.php - CodeFilePathKey = attribute.Key("code.file.path") - - // CodeFunctionNameKey is the attribute Key conforming to the - // "code.function.name" semantic conventions. It represents the method or - // function fully-qualified name without arguments. The value should fit the - // natural representation of the language runtime, which is also likely the same - // used within `code.stacktrace` attribute value. This attribute MUST NOT be - // used on the Profile signal since the data is already captured in 'message - // Function'. This constraint is imposed to prevent redundancy and maintain data - // integrity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "com.example.MyHttpService.serveRequest", - // "GuzzleHttp\Client::transfer", "fopen" - // Note: Values and format depends on each language runtime, thus it is - // impossible to provide an exhaustive list of examples. - // The values are usually the same (or prefixes of) the ones found in native - // stack trace representation stored in - // `code.stacktrace` without information on arguments. - // - // Examples: - // - // - Java method: `com.example.MyHttpService.serveRequest` - // - Java anonymous class method: `com.mycompany.Main$1.myMethod` - // - Java lambda method: - // `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod` - // - PHP function: `GuzzleHttp\Client::transfer` - // - Go function: `github.com/my/repo/pkg.foo.func5` - // - Elixir: `OpenTelemetry.Ctx.new` - // - Erlang: `opentelemetry_ctx:new` - // - Rust: `playground::my_module::my_cool_func` - // - C function: `fopen` - CodeFunctionNameKey = attribute.Key("code.function.name") - - // CodeLineNumberKey is the attribute Key conforming to the "code.line.number" - // semantic conventions. It represents the line number in `code.file.path` best - // representing the operation. It SHOULD point within the code unit named in - // `code.function.name`. This attribute MUST NOT be used on the Profile signal - // since the data is already captured in 'message Line'. This constraint is - // imposed to prevent redundancy and maintain data integrity. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - CodeLineNumberKey = attribute.Key("code.line.number") - - // CodeStacktraceKey is the attribute Key conforming to the "code.stacktrace" - // semantic conventions. It represents a stacktrace as a string in the natural - // representation for the language runtime. The representation is identical to - // [`exception.stacktrace`]. This attribute MUST NOT be used on the Profile - // signal since the data is already captured in 'message Location'. This - // constraint is imposed to prevent redundancy and maintain data integrity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at - // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at - // com.example.GenerateTrace.main(GenerateTrace.java:5) - // - // [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation - CodeStacktraceKey = attribute.Key("code.stacktrace") -) - -// CodeColumnNumber returns an attribute KeyValue conforming to the -// "code.column.number" semantic conventions. It represents the column number in -// `code.file.path` best representing the operation. It SHOULD point within the -// code unit named in `code.function.name`. This attribute MUST NOT be used on -// the Profile signal since the data is already captured in 'message Line'. This -// constraint is imposed to prevent redundancy and maintain data integrity. -func CodeColumnNumber(val int) attribute.KeyValue { - return CodeColumnNumberKey.Int(val) -} - -// CodeFilePath returns an attribute KeyValue conforming to the "code.file.path" -// semantic conventions. It represents the source code file name that identifies -// the code unit as uniquely as possible (preferably an absolute file path). This -// attribute MUST NOT be used on the Profile signal since the data is already -// captured in 'message Function'. This constraint is imposed to prevent -// redundancy and maintain data integrity. -func CodeFilePath(val string) attribute.KeyValue { - return CodeFilePathKey.String(val) -} - -// CodeFunctionName returns an attribute KeyValue conforming to the -// "code.function.name" semantic conventions. It represents the method or -// function fully-qualified name without arguments. The value should fit the -// natural representation of the language runtime, which is also likely the same -// used within `code.stacktrace` attribute value. This attribute MUST NOT be used -// on the Profile signal since the data is already captured in 'message -// Function'. This constraint is imposed to prevent redundancy and maintain data -// integrity. -func CodeFunctionName(val string) attribute.KeyValue { - return CodeFunctionNameKey.String(val) -} - -// CodeLineNumber returns an attribute KeyValue conforming to the -// "code.line.number" semantic conventions. It represents the line number in -// `code.file.path` best representing the operation. It SHOULD point within the -// code unit named in `code.function.name`. This attribute MUST NOT be used on -// the Profile signal since the data is already captured in 'message Line'. This -// constraint is imposed to prevent redundancy and maintain data integrity. -func CodeLineNumber(val int) attribute.KeyValue { - return CodeLineNumberKey.Int(val) -} - -// CodeStacktrace returns an attribute KeyValue conforming to the -// "code.stacktrace" semantic conventions. It represents a stacktrace as a string -// in the natural representation for the language runtime. The representation is -// identical to [`exception.stacktrace`]. This attribute MUST NOT be used on the -// Profile signal since the data is already captured in 'message Location'. This -// constraint is imposed to prevent redundancy and maintain data integrity. -// -// [`exception.stacktrace`]: /docs/exceptions/exceptions-spans.md#stacktrace-representation -func CodeStacktrace(val string) attribute.KeyValue { - return CodeStacktraceKey.String(val) -} - -// Namespace: container -const ( - // ContainerCommandKey is the attribute Key conforming to the - // "container.command" semantic conventions. It represents the command used to - // run the container (i.e. the command name). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "otelcontribcol" - // Note: If using embedded credentials or sensitive data, it is recommended to - // remove them to prevent potential leakage. - ContainerCommandKey = attribute.Key("container.command") - - // ContainerCommandArgsKey is the attribute Key conforming to the - // "container.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) run by the - // container. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "otelcontribcol", "--config", "config.yaml" - ContainerCommandArgsKey = attribute.Key("container.command_args") - - // ContainerCommandLineKey is the attribute Key conforming to the - // "container.command_line" semantic conventions. It represents the full command - // run by the container as a single string representing the full command. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "otelcontribcol --config config.yaml" - ContainerCommandLineKey = attribute.Key("container.command_line") - - // ContainerCSIPluginNameKey is the attribute Key conforming to the - // "container.csi.plugin.name" semantic conventions. It represents the name of - // the CSI ([Container Storage Interface]) plugin used by the volume. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "pd.csi.storage.gke.io" - // Note: This can sometimes be referred to as a "driver" in CSI implementations. - // This should represent the `name` field of the GetPluginInfo RPC. - // - // [Container Storage Interface]: https://github.com/container-storage-interface/spec - ContainerCSIPluginNameKey = attribute.Key("container.csi.plugin.name") - - // ContainerCSIVolumeIDKey is the attribute Key conforming to the - // "container.csi.volume.id" semantic conventions. It represents the unique - // volume ID returned by the CSI ([Container Storage Interface]) plugin. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "projects/my-gcp-project/zones/my-gcp-zone/disks/my-gcp-disk" - // Note: This can sometimes be referred to as a "volume handle" in CSI - // implementations. This should represent the `Volume.volume_id` field in CSI - // spec. - // - // [Container Storage Interface]: https://github.com/container-storage-interface/spec - ContainerCSIVolumeIDKey = attribute.Key("container.csi.volume.id") - - // ContainerIDKey is the attribute Key conforming to the "container.id" semantic - // conventions. It represents the container ID. Usually a UUID, as for example - // used to [identify Docker containers]. The UUID might be abbreviated. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "a3bf90e006b2" - // - // [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification - ContainerIDKey = attribute.Key("container.id") - - // ContainerImageIDKey is the attribute Key conforming to the - // "container.image.id" semantic conventions. It represents the runtime specific - // image identifier. Usually a hash algorithm followed by a UUID. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "sha256:19c92d0a00d1b66d897bceaa7319bee0dd38a10a851c60bcec9474aa3f01e50f" - // Note: Docker defines a sha256 of the image id; `container.image.id` - // corresponds to the `Image` field from the Docker container inspect [API] - // endpoint. - // K8s defines a link to the container registry repository with digest - // `"imageID": "registry.azurecr.io /namespace/service/dockerfile@sha256:bdeabd40c3a8a492eaf9e8e44d0ebbb84bac7ee25ac0cf8a7159d25f62555625"` - // . - // The ID is assigned by the container runtime and can vary in different - // environments. Consider using `oci.manifest.digest` if it is important to - // identify the same image in different environments/runtimes. - // - // [API]: https://docs.docker.com/engine/api/v1.43/#tag/Container/operation/ContainerInspect - ContainerImageIDKey = attribute.Key("container.image.id") - - // ContainerImageNameKey is the attribute Key conforming to the - // "container.image.name" semantic conventions. It represents the name of the - // image the container was built on. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "gcr.io/opentelemetry/operator" - ContainerImageNameKey = attribute.Key("container.image.name") - - // ContainerImageRepoDigestsKey is the attribute Key conforming to the - // "container.image.repo_digests" semantic conventions. It represents the repo - // digests of the container image as provided by the container runtime. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "example@sha256:afcc7f1ac1b49db317a7196c902e61c6c3c4607d63599ee1a82d702d249a0ccb", - // "internal.registry.example.com:5000/example@sha256:b69959407d21e8a062e0416bf13405bb2b71ed7a84dde4158ebafacfa06f5578" - // Note: [Docker] and [CRI] report those under the `RepoDigests` field. - // - // [Docker]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect - // [CRI]: https://github.com/kubernetes/cri-api/blob/c75ef5b473bbe2d0a4fc92f82235efd665ea8e9f/pkg/apis/runtime/v1/api.proto#L1237-L1238 - ContainerImageRepoDigestsKey = attribute.Key("container.image.repo_digests") - - // ContainerImageTagsKey is the attribute Key conforming to the - // "container.image.tags" semantic conventions. It represents the container - // image tags. An example can be found in [Docker Image Inspect]. Should be only - // the `` section of the full name for example from - // `registry.example.com/my-org/my-image:`. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "v1.27.1", "3.5.7-0" - // - // [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect - ContainerImageTagsKey = attribute.Key("container.image.tags") - - // ContainerNameKey is the attribute Key conforming to the "container.name" - // semantic conventions. It represents the container name used by container - // runtime. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry-autoconf" - ContainerNameKey = attribute.Key("container.name") - - // ContainerRuntimeDescriptionKey is the attribute Key conforming to the - // "container.runtime.description" semantic conventions. It represents a - // description about the runtime which could include, for example details about - // the CRI/API version being used or other customisations. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "docker://19.3.1 - CRI: 1.22.0" - ContainerRuntimeDescriptionKey = attribute.Key("container.runtime.description") - - // ContainerRuntimeNameKey is the attribute Key conforming to the - // "container.runtime.name" semantic conventions. It represents the container - // runtime managing this container. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "docker", "containerd", "rkt" - ContainerRuntimeNameKey = attribute.Key("container.runtime.name") - - // ContainerRuntimeVersionKey is the attribute Key conforming to the - // "container.runtime.version" semantic conventions. It represents the version - // of the runtime of this process, as returned by the runtime without - // modification. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0.0 - ContainerRuntimeVersionKey = attribute.Key("container.runtime.version") -) - -// ContainerCommand returns an attribute KeyValue conforming to the -// "container.command" semantic conventions. It represents the command used to -// run the container (i.e. the command name). -func ContainerCommand(val string) attribute.KeyValue { - return ContainerCommandKey.String(val) -} - -// ContainerCommandArgs returns an attribute KeyValue conforming to the -// "container.command_args" semantic conventions. It represents the all the -// command arguments (including the command/executable itself) run by the -// container. -func ContainerCommandArgs(val ...string) attribute.KeyValue { - return ContainerCommandArgsKey.StringSlice(val) -} - -// ContainerCommandLine returns an attribute KeyValue conforming to the -// "container.command_line" semantic conventions. It represents the full command -// run by the container as a single string representing the full command. -func ContainerCommandLine(val string) attribute.KeyValue { - return ContainerCommandLineKey.String(val) -} - -// ContainerCSIPluginName returns an attribute KeyValue conforming to the -// "container.csi.plugin.name" semantic conventions. It represents the name of -// the CSI ([Container Storage Interface]) plugin used by the volume. -// -// [Container Storage Interface]: https://github.com/container-storage-interface/spec -func ContainerCSIPluginName(val string) attribute.KeyValue { - return ContainerCSIPluginNameKey.String(val) -} - -// ContainerCSIVolumeID returns an attribute KeyValue conforming to the -// "container.csi.volume.id" semantic conventions. It represents the unique -// volume ID returned by the CSI ([Container Storage Interface]) plugin. -// -// [Container Storage Interface]: https://github.com/container-storage-interface/spec -func ContainerCSIVolumeID(val string) attribute.KeyValue { - return ContainerCSIVolumeIDKey.String(val) -} - -// ContainerID returns an attribute KeyValue conforming to the "container.id" -// semantic conventions. It represents the container ID. Usually a UUID, as for -// example used to [identify Docker containers]. The UUID might be abbreviated. -// -// [identify Docker containers]: https://docs.docker.com/engine/containers/run/#container-identification -func ContainerID(val string) attribute.KeyValue { - return ContainerIDKey.String(val) -} - -// ContainerImageID returns an attribute KeyValue conforming to the -// "container.image.id" semantic conventions. It represents the runtime specific -// image identifier. Usually a hash algorithm followed by a UUID. -func ContainerImageID(val string) attribute.KeyValue { - return ContainerImageIDKey.String(val) -} - -// ContainerImageName returns an attribute KeyValue conforming to the -// "container.image.name" semantic conventions. It represents the name of the -// image the container was built on. -func ContainerImageName(val string) attribute.KeyValue { - return ContainerImageNameKey.String(val) -} - -// ContainerImageRepoDigests returns an attribute KeyValue conforming to the -// "container.image.repo_digests" semantic conventions. It represents the repo -// digests of the container image as provided by the container runtime. -func ContainerImageRepoDigests(val ...string) attribute.KeyValue { - return ContainerImageRepoDigestsKey.StringSlice(val) -} - -// ContainerImageTags returns an attribute KeyValue conforming to the -// "container.image.tags" semantic conventions. It represents the container image -// tags. An example can be found in [Docker Image Inspect]. Should be only the -// `` section of the full name for example from -// `registry.example.com/my-org/my-image:`. -// -// [Docker Image Inspect]: https://docs.docker.com/engine/api/v1.43/#tag/Image/operation/ImageInspect -func ContainerImageTags(val ...string) attribute.KeyValue { - return ContainerImageTagsKey.StringSlice(val) -} - -// ContainerLabel returns an attribute KeyValue conforming to the -// "container.label" semantic conventions. It represents the container labels, -// `` being the label name, the value being the label value. -func ContainerLabel(key string, val string) attribute.KeyValue { - return attribute.String("container.label."+key, val) -} - -// ContainerName returns an attribute KeyValue conforming to the "container.name" -// semantic conventions. It represents the container name used by container -// runtime. -func ContainerName(val string) attribute.KeyValue { - return ContainerNameKey.String(val) -} - -// ContainerRuntimeDescription returns an attribute KeyValue conforming to the -// "container.runtime.description" semantic conventions. It represents a -// description about the runtime which could include, for example details about -// the CRI/API version being used or other customisations. -func ContainerRuntimeDescription(val string) attribute.KeyValue { - return ContainerRuntimeDescriptionKey.String(val) -} - -// ContainerRuntimeName returns an attribute KeyValue conforming to the -// "container.runtime.name" semantic conventions. It represents the container -// runtime managing this container. -func ContainerRuntimeName(val string) attribute.KeyValue { - return ContainerRuntimeNameKey.String(val) -} - -// ContainerRuntimeVersion returns an attribute KeyValue conforming to the -// "container.runtime.version" semantic conventions. It represents the version of -// the runtime of this process, as returned by the runtime without modification. -func ContainerRuntimeVersion(val string) attribute.KeyValue { - return ContainerRuntimeVersionKey.String(val) -} - -// Namespace: cpu -const ( - // CPULogicalNumberKey is the attribute Key conforming to the - // "cpu.logical_number" semantic conventions. It represents the logical CPU - // number [0..n-1]. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1 - CPULogicalNumberKey = attribute.Key("cpu.logical_number") - - // CPUModeKey is the attribute Key conforming to the "cpu.mode" semantic - // conventions. It represents the mode of the CPU. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "user", "system" - CPUModeKey = attribute.Key("cpu.mode") -) - -// CPULogicalNumber returns an attribute KeyValue conforming to the -// "cpu.logical_number" semantic conventions. It represents the logical CPU -// number [0..n-1]. -func CPULogicalNumber(val int) attribute.KeyValue { - return CPULogicalNumberKey.Int(val) -} - -// Enum values for cpu.mode -var ( - // User - // Stability: development - CPUModeUser = CPUModeKey.String("user") - // System - // Stability: development - CPUModeSystem = CPUModeKey.String("system") - // Nice - // Stability: development - CPUModeNice = CPUModeKey.String("nice") - // Idle - // Stability: development - CPUModeIdle = CPUModeKey.String("idle") - // IO Wait - // Stability: development - CPUModeIOWait = CPUModeKey.String("iowait") - // Interrupt - // Stability: development - CPUModeInterrupt = CPUModeKey.String("interrupt") - // Steal - // Stability: development - CPUModeSteal = CPUModeKey.String("steal") - // Kernel - // Stability: development - CPUModeKernel = CPUModeKey.String("kernel") -) - -// Namespace: db -const ( - // DBClientConnectionPoolNameKey is the attribute Key conforming to the - // "db.client.connection.pool.name" semantic conventions. It represents the name - // of the connection pool; unique within the instrumented application. In case - // the connection pool implementation doesn't provide a name, instrumentation - // SHOULD use a combination of parameters that would make the name unique, for - // example, combining attributes `server.address`, `server.port`, and - // `db.namespace`, formatted as `server.address:server.port/db.namespace`. - // Instrumentations that generate connection pool name following different - // patterns SHOULD document it. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "myDataSource" - DBClientConnectionPoolNameKey = attribute.Key("db.client.connection.pool.name") - - // DBClientConnectionStateKey is the attribute Key conforming to the - // "db.client.connection.state" semantic conventions. It represents the state of - // a connection in the pool. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "idle" - DBClientConnectionStateKey = attribute.Key("db.client.connection.state") - - // DBCollectionNameKey is the attribute Key conforming to the - // "db.collection.name" semantic conventions. It represents the name of a - // collection (table, container) within the database. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "public.users", "customers" - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - // - // The collection name SHOULD NOT be extracted from `db.query.text`, - // when the database system supports query text with multiple collections - // in non-batch operations. - // - // For batch operations, if the individual operations are known to have the same - // collection name then that collection name SHOULD be used. - DBCollectionNameKey = attribute.Key("db.collection.name") - - // DBNamespaceKey is the attribute Key conforming to the "db.namespace" semantic - // conventions. It represents the name of the database, fully qualified within - // the server address and port. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "customers", "test.users" - // Note: If a database system has multiple namespace components, they SHOULD be - // concatenated from the most general to the most specific namespace component, - // using `|` as a separator between the components. Any missing components (and - // their associated separators) SHOULD be omitted. - // Semantic conventions for individual database systems SHOULD document what - // `db.namespace` means in the context of that system. - // It is RECOMMENDED to capture the value as provided by the application without - // attempting to do any case normalization. - DBNamespaceKey = attribute.Key("db.namespace") - - // DBOperationBatchSizeKey is the attribute Key conforming to the - // "db.operation.batch.size" semantic conventions. It represents the number of - // queries included in a batch operation. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 2, 3, 4 - // Note: Operations are only considered batches when they contain two or more - // operations, and so `db.operation.batch.size` SHOULD never be `1`. - DBOperationBatchSizeKey = attribute.Key("db.operation.batch.size") - - // DBOperationNameKey is the attribute Key conforming to the "db.operation.name" - // semantic conventions. It represents the name of the operation or command - // being executed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "findAndModify", "HMSET", "SELECT" - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - // - // The operation name SHOULD NOT be extracted from `db.query.text`, - // when the database system supports query text with multiple operations - // in non-batch operations. - // - // If spaces can occur in the operation name, multiple consecutive spaces - // SHOULD be normalized to a single space. - // - // For batch operations, if the individual operations are known to have the same - // operation name - // then that operation name SHOULD be used prepended by `BATCH `, - // otherwise `db.operation.name` SHOULD be `BATCH` or some other database - // system specific term if more applicable. - DBOperationNameKey = attribute.Key("db.operation.name") - - // DBQuerySummaryKey is the attribute Key conforming to the "db.query.summary" - // semantic conventions. It represents the low cardinality summary of a database - // query. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "SELECT wuser_table", "INSERT shipping_details SELECT orders", "get - // user by id" - // Note: The query summary describes a class of database queries and is useful - // as a grouping key, especially when analyzing telemetry for database - // calls involving complex queries. - // - // Summary may be available to the instrumentation through - // instrumentation hooks or other means. If it is not available, - // instrumentations - // that support query parsing SHOULD generate a summary following - // [Generating query summary] - // section. - // - // [Generating query summary]: /docs/database/database-spans.md#generating-a-summary-of-the-query - DBQuerySummaryKey = attribute.Key("db.query.summary") - - // DBQueryTextKey is the attribute Key conforming to the "db.query.text" - // semantic conventions. It represents the database query being executed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "SELECT * FROM wuser_table where username = ?", "SET mykey ?" - // Note: For sanitization see [Sanitization of `db.query.text`]. - // For batch operations, if the individual operations are known to have the same - // query text then that query text SHOULD be used, otherwise all of the - // individual query texts SHOULD be concatenated with separator `; ` or some - // other database system specific separator if more applicable. - // Parameterized query text SHOULD NOT be sanitized. Even though parameterized - // query text can potentially have sensitive data, by using a parameterized - // query the user is giving a strong signal that any sensitive data will be - // passed as parameter values, and the benefit to observability of capturing the - // static part of the query text by default outweighs the risk. - // - // [Sanitization of `db.query.text`]: /docs/database/database-spans.md#sanitization-of-dbquerytext - DBQueryTextKey = attribute.Key("db.query.text") - - // DBResponseReturnedRowsKey is the attribute Key conforming to the - // "db.response.returned_rows" semantic conventions. It represents the number of - // rows returned by the operation. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 10, 30, 1000 - DBResponseReturnedRowsKey = attribute.Key("db.response.returned_rows") - - // DBResponseStatusCodeKey is the attribute Key conforming to the - // "db.response.status_code" semantic conventions. It represents the database - // response status code. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "102", "ORA-17002", "08P01", "404" - // Note: The status code returned by the database. Usually it represents an - // error code, but may also represent partial success, warning, or differentiate - // between various types of successful outcomes. - // Semantic conventions for individual database systems SHOULD document what - // `db.response.status_code` means in the context of that system. - DBResponseStatusCodeKey = attribute.Key("db.response.status_code") - - // DBStoredProcedureNameKey is the attribute Key conforming to the - // "db.stored_procedure.name" semantic conventions. It represents the name of a - // stored procedure within the database. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "GetCustomer" - // Note: It is RECOMMENDED to capture the value as provided by the application - // without attempting to do any case normalization. - // - // For batch operations, if the individual operations are known to have the same - // stored procedure name then that stored procedure name SHOULD be used. - DBStoredProcedureNameKey = attribute.Key("db.stored_procedure.name") - - // DBSystemNameKey is the attribute Key conforming to the "db.system.name" - // semantic conventions. It represents the database management system (DBMS) - // product as identified by the client instrumentation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: - // Note: The actual DBMS may differ from the one identified by the client. For - // example, when using PostgreSQL client libraries to connect to a CockroachDB, - // the `db.system.name` is set to `postgresql` based on the instrumentation's - // best knowledge. - DBSystemNameKey = attribute.Key("db.system.name") -) - -// DBClientConnectionPoolName returns an attribute KeyValue conforming to the -// "db.client.connection.pool.name" semantic conventions. It represents the name -// of the connection pool; unique within the instrumented application. In case -// the connection pool implementation doesn't provide a name, instrumentation -// SHOULD use a combination of parameters that would make the name unique, for -// example, combining attributes `server.address`, `server.port`, and -// `db.namespace`, formatted as `server.address:server.port/db.namespace`. -// Instrumentations that generate connection pool name following different -// patterns SHOULD document it. -func DBClientConnectionPoolName(val string) attribute.KeyValue { - return DBClientConnectionPoolNameKey.String(val) -} - -// DBCollectionName returns an attribute KeyValue conforming to the -// "db.collection.name" semantic conventions. It represents the name of a -// collection (table, container) within the database. -func DBCollectionName(val string) attribute.KeyValue { - return DBCollectionNameKey.String(val) -} - -// DBNamespace returns an attribute KeyValue conforming to the "db.namespace" -// semantic conventions. It represents the name of the database, fully qualified -// within the server address and port. -func DBNamespace(val string) attribute.KeyValue { - return DBNamespaceKey.String(val) -} - -// DBOperationBatchSize returns an attribute KeyValue conforming to the -// "db.operation.batch.size" semantic conventions. It represents the number of -// queries included in a batch operation. -func DBOperationBatchSize(val int) attribute.KeyValue { - return DBOperationBatchSizeKey.Int(val) -} - -// DBOperationName returns an attribute KeyValue conforming to the -// "db.operation.name" semantic conventions. It represents the name of the -// operation or command being executed. -func DBOperationName(val string) attribute.KeyValue { - return DBOperationNameKey.String(val) -} - -// DBOperationParameter returns an attribute KeyValue conforming to the -// "db.operation.parameter" semantic conventions. It represents a database -// operation parameter, with `` being the parameter name, and the attribute -// value being a string representation of the parameter value. -func DBOperationParameter(key string, val string) attribute.KeyValue { - return attribute.String("db.operation.parameter."+key, val) -} - -// DBQueryParameter returns an attribute KeyValue conforming to the -// "db.query.parameter" semantic conventions. It represents a database query -// parameter, with `` being the parameter name, and the attribute value -// being a string representation of the parameter value. -func DBQueryParameter(key string, val string) attribute.KeyValue { - return attribute.String("db.query.parameter."+key, val) -} - -// DBQuerySummary returns an attribute KeyValue conforming to the -// "db.query.summary" semantic conventions. It represents the low cardinality -// summary of a database query. -func DBQuerySummary(val string) attribute.KeyValue { - return DBQuerySummaryKey.String(val) -} - -// DBQueryText returns an attribute KeyValue conforming to the "db.query.text" -// semantic conventions. It represents the database query being executed. -func DBQueryText(val string) attribute.KeyValue { - return DBQueryTextKey.String(val) -} - -// DBResponseReturnedRows returns an attribute KeyValue conforming to the -// "db.response.returned_rows" semantic conventions. It represents the number of -// rows returned by the operation. -func DBResponseReturnedRows(val int) attribute.KeyValue { - return DBResponseReturnedRowsKey.Int(val) -} - -// DBResponseStatusCode returns an attribute KeyValue conforming to the -// "db.response.status_code" semantic conventions. It represents the database -// response status code. -func DBResponseStatusCode(val string) attribute.KeyValue { - return DBResponseStatusCodeKey.String(val) -} - -// DBStoredProcedureName returns an attribute KeyValue conforming to the -// "db.stored_procedure.name" semantic conventions. It represents the name of a -// stored procedure within the database. -func DBStoredProcedureName(val string) attribute.KeyValue { - return DBStoredProcedureNameKey.String(val) -} - -// Enum values for db.client.connection.state -var ( - // idle - // Stability: development - DBClientConnectionStateIdle = DBClientConnectionStateKey.String("idle") - // used - // Stability: development - DBClientConnectionStateUsed = DBClientConnectionStateKey.String("used") -) - -// Enum values for db.system.name -var ( - // Some other SQL database. Fallback only. - // Stability: development - DBSystemNameOtherSQL = DBSystemNameKey.String("other_sql") - // [Adabas (Adaptable Database System)] - // Stability: development - // - // [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas - DBSystemNameSoftwareagAdabas = DBSystemNameKey.String("softwareag.adabas") - // [Actian Ingres] - // Stability: development - // - // [Actian Ingres]: https://www.actian.com/databases/ingres/ - DBSystemNameActianIngres = DBSystemNameKey.String("actian.ingres") - // [Amazon DynamoDB] - // Stability: development - // - // [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/ - DBSystemNameAWSDynamoDB = DBSystemNameKey.String("aws.dynamodb") - // [Amazon Redshift] - // Stability: development - // - // [Amazon Redshift]: https://aws.amazon.com/redshift/ - DBSystemNameAWSRedshift = DBSystemNameKey.String("aws.redshift") - // [Azure Cosmos DB] - // Stability: development - // - // [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db - DBSystemNameAzureCosmosDB = DBSystemNameKey.String("azure.cosmosdb") - // [InterSystems Caché] - // Stability: development - // - // [InterSystems Caché]: https://www.intersystems.com/products/cache/ - DBSystemNameIntersystemsCache = DBSystemNameKey.String("intersystems.cache") - // [Apache Cassandra] - // Stability: development - // - // [Apache Cassandra]: https://cassandra.apache.org/ - DBSystemNameCassandra = DBSystemNameKey.String("cassandra") - // [ClickHouse] - // Stability: development - // - // [ClickHouse]: https://clickhouse.com/ - DBSystemNameClickHouse = DBSystemNameKey.String("clickhouse") - // [CockroachDB] - // Stability: development - // - // [CockroachDB]: https://www.cockroachlabs.com/ - DBSystemNameCockroachDB = DBSystemNameKey.String("cockroachdb") - // [Couchbase] - // Stability: development - // - // [Couchbase]: https://www.couchbase.com/ - DBSystemNameCouchbase = DBSystemNameKey.String("couchbase") - // [Apache CouchDB] - // Stability: development - // - // [Apache CouchDB]: https://couchdb.apache.org/ - DBSystemNameCouchDB = DBSystemNameKey.String("couchdb") - // [Apache Derby] - // Stability: development - // - // [Apache Derby]: https://db.apache.org/derby/ - DBSystemNameDerby = DBSystemNameKey.String("derby") - // [Elasticsearch] - // Stability: development - // - // [Elasticsearch]: https://www.elastic.co/elasticsearch - DBSystemNameElasticsearch = DBSystemNameKey.String("elasticsearch") - // [Firebird] - // Stability: development - // - // [Firebird]: https://www.firebirdsql.org/ - DBSystemNameFirebirdSQL = DBSystemNameKey.String("firebirdsql") - // [Google Cloud Spanner] - // Stability: development - // - // [Google Cloud Spanner]: https://cloud.google.com/spanner - DBSystemNameGCPSpanner = DBSystemNameKey.String("gcp.spanner") - // [Apache Geode] - // Stability: development - // - // [Apache Geode]: https://geode.apache.org/ - DBSystemNameGeode = DBSystemNameKey.String("geode") - // [H2 Database] - // Stability: development - // - // [H2 Database]: https://h2database.com/ - DBSystemNameH2database = DBSystemNameKey.String("h2database") - // [Apache HBase] - // Stability: development - // - // [Apache HBase]: https://hbase.apache.org/ - DBSystemNameHBase = DBSystemNameKey.String("hbase") - // [Apache Hive] - // Stability: development - // - // [Apache Hive]: https://hive.apache.org/ - DBSystemNameHive = DBSystemNameKey.String("hive") - // [HyperSQL Database] - // Stability: development - // - // [HyperSQL Database]: https://hsqldb.org/ - DBSystemNameHSQLDB = DBSystemNameKey.String("hsqldb") - // [IBM Db2] - // Stability: development - // - // [IBM Db2]: https://www.ibm.com/db2 - DBSystemNameIBMDB2 = DBSystemNameKey.String("ibm.db2") - // [IBM Informix] - // Stability: development - // - // [IBM Informix]: https://www.ibm.com/products/informix - DBSystemNameIBMInformix = DBSystemNameKey.String("ibm.informix") - // [IBM Netezza] - // Stability: development - // - // [IBM Netezza]: https://www.ibm.com/products/netezza - DBSystemNameIBMNetezza = DBSystemNameKey.String("ibm.netezza") - // [InfluxDB] - // Stability: development - // - // [InfluxDB]: https://www.influxdata.com/ - DBSystemNameInfluxDB = DBSystemNameKey.String("influxdb") - // [Instant] - // Stability: development - // - // [Instant]: https://www.instantdb.com/ - DBSystemNameInstantDB = DBSystemNameKey.String("instantdb") - // [MariaDB] - // Stability: stable - // - // [MariaDB]: https://mariadb.org/ - DBSystemNameMariaDB = DBSystemNameKey.String("mariadb") - // [Memcached] - // Stability: development - // - // [Memcached]: https://memcached.org/ - DBSystemNameMemcached = DBSystemNameKey.String("memcached") - // [MongoDB] - // Stability: development - // - // [MongoDB]: https://www.mongodb.com/ - DBSystemNameMongoDB = DBSystemNameKey.String("mongodb") - // [Microsoft SQL Server] - // Stability: stable - // - // [Microsoft SQL Server]: https://www.microsoft.com/sql-server - DBSystemNameMicrosoftSQLServer = DBSystemNameKey.String("microsoft.sql_server") - // [MySQL] - // Stability: stable - // - // [MySQL]: https://www.mysql.com/ - DBSystemNameMySQL = DBSystemNameKey.String("mysql") - // [Neo4j] - // Stability: development - // - // [Neo4j]: https://neo4j.com/ - DBSystemNameNeo4j = DBSystemNameKey.String("neo4j") - // [OpenSearch] - // Stability: development - // - // [OpenSearch]: https://opensearch.org/ - DBSystemNameOpenSearch = DBSystemNameKey.String("opensearch") - // [Oracle Database] - // Stability: development - // - // [Oracle Database]: https://www.oracle.com/database/ - DBSystemNameOracleDB = DBSystemNameKey.String("oracle.db") - // [PostgreSQL] - // Stability: stable - // - // [PostgreSQL]: https://www.postgresql.org/ - DBSystemNamePostgreSQL = DBSystemNameKey.String("postgresql") - // [Redis] - // Stability: development - // - // [Redis]: https://redis.io/ - DBSystemNameRedis = DBSystemNameKey.String("redis") - // [SAP HANA] - // Stability: development - // - // [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html - DBSystemNameSAPHANA = DBSystemNameKey.String("sap.hana") - // [SAP MaxDB] - // Stability: development - // - // [SAP MaxDB]: https://maxdb.sap.com/ - DBSystemNameSAPMaxDB = DBSystemNameKey.String("sap.maxdb") - // [SQLite] - // Stability: development - // - // [SQLite]: https://www.sqlite.org/ - DBSystemNameSQLite = DBSystemNameKey.String("sqlite") - // [Teradata] - // Stability: development - // - // [Teradata]: https://www.teradata.com/ - DBSystemNameTeradata = DBSystemNameKey.String("teradata") - // [Trino] - // Stability: development - // - // [Trino]: https://trino.io/ - DBSystemNameTrino = DBSystemNameKey.String("trino") -) - -// Namespace: deployment -const ( - // DeploymentEnvironmentNameKey is the attribute Key conforming to the - // "deployment.environment.name" semantic conventions. It represents the name of - // the [deployment environment] (aka deployment tier). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "staging", "production" - // Note: `deployment.environment.name` does not affect the uniqueness - // constraints defined through - // the `service.namespace`, `service.name` and `service.instance.id` resource - // attributes. - // This implies that resources carrying the following attribute combinations - // MUST be - // considered to be identifying the same service: - // - // - `service.name=frontend`, `deployment.environment.name=production` - // - `service.name=frontend`, `deployment.environment.name=staging`. - // - // - // [deployment environment]: https://wikipedia.org/wiki/Deployment_environment - DeploymentEnvironmentNameKey = attribute.Key("deployment.environment.name") - - // DeploymentIDKey is the attribute Key conforming to the "deployment.id" - // semantic conventions. It represents the id of the deployment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1208" - DeploymentIDKey = attribute.Key("deployment.id") - - // DeploymentNameKey is the attribute Key conforming to the "deployment.name" - // semantic conventions. It represents the name of the deployment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "deploy my app", "deploy-frontend" - DeploymentNameKey = attribute.Key("deployment.name") - - // DeploymentStatusKey is the attribute Key conforming to the - // "deployment.status" semantic conventions. It represents the status of the - // deployment. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - DeploymentStatusKey = attribute.Key("deployment.status") -) - -// DeploymentEnvironmentName returns an attribute KeyValue conforming to the -// "deployment.environment.name" semantic conventions. It represents the name of -// the [deployment environment] (aka deployment tier). -// -// [deployment environment]: https://wikipedia.org/wiki/Deployment_environment -func DeploymentEnvironmentName(val string) attribute.KeyValue { - return DeploymentEnvironmentNameKey.String(val) -} - -// DeploymentID returns an attribute KeyValue conforming to the "deployment.id" -// semantic conventions. It represents the id of the deployment. -func DeploymentID(val string) attribute.KeyValue { - return DeploymentIDKey.String(val) -} - -// DeploymentName returns an attribute KeyValue conforming to the -// "deployment.name" semantic conventions. It represents the name of the -// deployment. -func DeploymentName(val string) attribute.KeyValue { - return DeploymentNameKey.String(val) -} - -// Enum values for deployment.status -var ( - // failed - // Stability: development - DeploymentStatusFailed = DeploymentStatusKey.String("failed") - // succeeded - // Stability: development - DeploymentStatusSucceeded = DeploymentStatusKey.String("succeeded") -) - -// Namespace: destination -const ( - // DestinationAddressKey is the attribute Key conforming to the - // "destination.address" semantic conventions. It represents the destination - // address - domain name if available without reverse DNS lookup; otherwise, IP - // address or Unix domain socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "destination.example.com", "10.1.2.80", "/tmp/my.sock" - // Note: When observed from the source side, and when communicating through an - // intermediary, `destination.address` SHOULD represent the destination address - // behind any intermediaries, for example proxies, if it's available. - DestinationAddressKey = attribute.Key("destination.address") - - // DestinationPortKey is the attribute Key conforming to the "destination.port" - // semantic conventions. It represents the destination port number. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 3389, 2888 - DestinationPortKey = attribute.Key("destination.port") -) - -// DestinationAddress returns an attribute KeyValue conforming to the -// "destination.address" semantic conventions. It represents the destination -// address - domain name if available without reverse DNS lookup; otherwise, IP -// address or Unix domain socket name. -func DestinationAddress(val string) attribute.KeyValue { - return DestinationAddressKey.String(val) -} - -// DestinationPort returns an attribute KeyValue conforming to the -// "destination.port" semantic conventions. It represents the destination port -// number. -func DestinationPort(val int) attribute.KeyValue { - return DestinationPortKey.Int(val) -} - -// Namespace: device -const ( - // DeviceIDKey is the attribute Key conforming to the "device.id" semantic - // conventions. It represents a unique identifier representing the device. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "123456789012345", "01:23:45:67:89:AB" - // Note: Its value SHOULD be identical for all apps on a device and it SHOULD - // NOT change if an app is uninstalled and re-installed. - // However, it might be resettable by the user for all apps on a device. - // Hardware IDs (e.g. vendor-specific serial number, IMEI or MAC address) MAY be - // used as values. - // - // More information about Android identifier best practices can be found in the - // [Android user data IDs guide]. - // - // > [!WARNING]> This attribute may contain sensitive (PII) information. Caution - // > should be taken when storing personal data or anything which can identify a - // > user. GDPR and data protection laws may apply, - // > ensure you do your own due diligence.> Due to these reasons, this - // > identifier is not recommended for consumer applications and will likely - // > result in rejection from both Google Play and App Store. - // > However, it may be appropriate for specific enterprise scenarios, such as - // > kiosk devices or enterprise-managed devices, with appropriate compliance - // > clearance. - // > Any instrumentation providing this identifier MUST implement it as an - // > opt-in feature.> See [`app.installation.id`]> for a more - // > privacy-preserving alternative. - // - // [Android user data IDs guide]: https://developer.android.com/training/articles/user-data-ids - // [`app.installation.id`]: /docs/registry/attributes/app.md#app-installation-id - DeviceIDKey = attribute.Key("device.id") - - // DeviceManufacturerKey is the attribute Key conforming to the - // "device.manufacturer" semantic conventions. It represents the name of the - // device manufacturer. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Apple", "Samsung" - // Note: The Android OS provides this field via [Build]. iOS apps SHOULD - // hardcode the value `Apple`. - // - // [Build]: https://developer.android.com/reference/android/os/Build#MANUFACTURER - DeviceManufacturerKey = attribute.Key("device.manufacturer") - - // DeviceModelIdentifierKey is the attribute Key conforming to the - // "device.model.identifier" semantic conventions. It represents the model - // identifier for the device. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "iPhone3,4", "SM-G920F" - // Note: It's recommended this value represents a machine-readable version of - // the model identifier rather than the market or consumer-friendly name of the - // device. - DeviceModelIdentifierKey = attribute.Key("device.model.identifier") - - // DeviceModelNameKey is the attribute Key conforming to the "device.model.name" - // semantic conventions. It represents the marketing name for the device model. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "iPhone 6s Plus", "Samsung Galaxy S6" - // Note: It's recommended this value represents a human-readable version of the - // device model rather than a machine-readable alternative. - DeviceModelNameKey = attribute.Key("device.model.name") -) - -// DeviceID returns an attribute KeyValue conforming to the "device.id" semantic -// conventions. It represents a unique identifier representing the device. -func DeviceID(val string) attribute.KeyValue { - return DeviceIDKey.String(val) -} - -// DeviceManufacturer returns an attribute KeyValue conforming to the -// "device.manufacturer" semantic conventions. It represents the name of the -// device manufacturer. -func DeviceManufacturer(val string) attribute.KeyValue { - return DeviceManufacturerKey.String(val) -} - -// DeviceModelIdentifier returns an attribute KeyValue conforming to the -// "device.model.identifier" semantic conventions. It represents the model -// identifier for the device. -func DeviceModelIdentifier(val string) attribute.KeyValue { - return DeviceModelIdentifierKey.String(val) -} - -// DeviceModelName returns an attribute KeyValue conforming to the -// "device.model.name" semantic conventions. It represents the marketing name for -// the device model. -func DeviceModelName(val string) attribute.KeyValue { - return DeviceModelNameKey.String(val) -} - -// Namespace: disk -const ( - // DiskIODirectionKey is the attribute Key conforming to the "disk.io.direction" - // semantic conventions. It represents the disk IO operation direction. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "read" - DiskIODirectionKey = attribute.Key("disk.io.direction") -) - -// Enum values for disk.io.direction -var ( - // read - // Stability: development - DiskIODirectionRead = DiskIODirectionKey.String("read") - // write - // Stability: development - DiskIODirectionWrite = DiskIODirectionKey.String("write") -) - -// Namespace: dns -const ( - // DNSAnswersKey is the attribute Key conforming to the "dns.answers" semantic - // conventions. It represents the list of IPv4 or IPv6 addresses resolved during - // DNS lookup. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "10.0.0.1", "2001:0db8:85a3:0000:0000:8a2e:0370:7334" - DNSAnswersKey = attribute.Key("dns.answers") - - // DNSQuestionNameKey is the attribute Key conforming to the "dns.question.name" - // semantic conventions. It represents the name being queried. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "www.example.com", "opentelemetry.io" - // Note: If the name field contains non-printable characters (below 32 or above - // 126), those characters should be represented as escaped base 10 integers - // (\DDD). Back slashes and quotes should be escaped. Tabs, carriage returns, - // and line feeds should be converted to \t, \r, and \n respectively. - DNSQuestionNameKey = attribute.Key("dns.question.name") -) - -// DNSAnswers returns an attribute KeyValue conforming to the "dns.answers" -// semantic conventions. It represents the list of IPv4 or IPv6 addresses -// resolved during DNS lookup. -func DNSAnswers(val ...string) attribute.KeyValue { - return DNSAnswersKey.StringSlice(val) -} - -// DNSQuestionName returns an attribute KeyValue conforming to the -// "dns.question.name" semantic conventions. It represents the name being -// queried. -func DNSQuestionName(val string) attribute.KeyValue { - return DNSQuestionNameKey.String(val) -} - -// Namespace: elasticsearch -const ( - // ElasticsearchNodeNameKey is the attribute Key conforming to the - // "elasticsearch.node.name" semantic conventions. It represents the represents - // the human-readable identifier of the node/instance to which a request was - // routed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "instance-0000000001" - ElasticsearchNodeNameKey = attribute.Key("elasticsearch.node.name") -) - -// ElasticsearchNodeName returns an attribute KeyValue conforming to the -// "elasticsearch.node.name" semantic conventions. It represents the represents -// the human-readable identifier of the node/instance to which a request was -// routed. -func ElasticsearchNodeName(val string) attribute.KeyValue { - return ElasticsearchNodeNameKey.String(val) -} - -// Namespace: enduser -const ( - // EnduserIDKey is the attribute Key conforming to the "enduser.id" semantic - // conventions. It represents the unique identifier of an end user in the - // system. It maybe a username, email address, or other identifier. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "username" - // Note: Unique identifier of an end user in the system. - // - // > [!Warning] - // > This field contains sensitive (PII) information. - EnduserIDKey = attribute.Key("enduser.id") - - // EnduserPseudoIDKey is the attribute Key conforming to the "enduser.pseudo.id" - // semantic conventions. It represents the pseudonymous identifier of an end - // user. This identifier should be a random value that is not directly linked or - // associated with the end user's actual identity. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "QdH5CAWJgqVT4rOr0qtumf" - // Note: Pseudonymous identifier of an end user. - // - // > [!Warning] - // > This field contains sensitive (linkable PII) information. - EnduserPseudoIDKey = attribute.Key("enduser.pseudo.id") -) - -// EnduserID returns an attribute KeyValue conforming to the "enduser.id" -// semantic conventions. It represents the unique identifier of an end user in -// the system. It maybe a username, email address, or other identifier. -func EnduserID(val string) attribute.KeyValue { - return EnduserIDKey.String(val) -} - -// EnduserPseudoID returns an attribute KeyValue conforming to the -// "enduser.pseudo.id" semantic conventions. It represents the pseudonymous -// identifier of an end user. This identifier should be a random value that is -// not directly linked or associated with the end user's actual identity. -func EnduserPseudoID(val string) attribute.KeyValue { - return EnduserPseudoIDKey.String(val) -} - -// Namespace: error -const ( - // ErrorMessageKey is the attribute Key conforming to the "error.message" - // semantic conventions. It represents a message providing more detail about an - // error in human-readable form. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Unexpected input type: string", "The user has exceeded their - // storage quota" - // Note: `error.message` should provide additional context and detail about an - // error. - // It is NOT RECOMMENDED to duplicate the value of `error.type` in - // `error.message`. - // It is also NOT RECOMMENDED to duplicate the value of `exception.message` in - // `error.message`. - // - // `error.message` is NOT RECOMMENDED for metrics or spans due to its unbounded - // cardinality and overlap with span status. - ErrorMessageKey = attribute.Key("error.message") - - // ErrorTypeKey is the attribute Key conforming to the "error.type" semantic - // conventions. It represents the describes a class of error the operation ended - // with. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "timeout", "java.net.UnknownHostException", - // "server_certificate_invalid", "500" - // Note: The `error.type` SHOULD be predictable, and SHOULD have low - // cardinality. - // - // When `error.type` is set to a type (e.g., an exception type), its - // canonical class name identifying the type within the artifact SHOULD be used. - // - // Instrumentations SHOULD document the list of errors they report. - // - // The cardinality of `error.type` within one instrumentation library SHOULD be - // low. - // Telemetry consumers that aggregate data from multiple instrumentation - // libraries and applications - // should be prepared for `error.type` to have high cardinality at query time - // when no - // additional filters are applied. - // - // If the operation has completed successfully, instrumentations SHOULD NOT set - // `error.type`. - // - // If a specific domain defines its own set of error identifiers (such as HTTP - // or gRPC status codes), - // it's RECOMMENDED to: - // - // - Use a domain-specific attribute - // - Set `error.type` to capture all errors, regardless of whether they are - // defined within the domain-specific set or not. - ErrorTypeKey = attribute.Key("error.type") -) - -// ErrorMessage returns an attribute KeyValue conforming to the "error.message" -// semantic conventions. It represents a message providing more detail about an -// error in human-readable form. -func ErrorMessage(val string) attribute.KeyValue { - return ErrorMessageKey.String(val) -} - -// Enum values for error.type -var ( - // A fallback error value to be used when the instrumentation doesn't define a - // custom value. - // - // Stability: stable - ErrorTypeOther = ErrorTypeKey.String("_OTHER") -) - -// Namespace: exception -const ( - // ExceptionMessageKey is the attribute Key conforming to the - // "exception.message" semantic conventions. It represents the exception - // message. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "Division by zero", "Can't convert 'int' object to str implicitly" - ExceptionMessageKey = attribute.Key("exception.message") - - // ExceptionStacktraceKey is the attribute Key conforming to the - // "exception.stacktrace" semantic conventions. It represents a stacktrace as a - // string in the natural representation for the language runtime. The - // representation is to be determined and documented by each language SIG. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: Exception in thread "main" java.lang.RuntimeException: Test - // exception\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\n at - // com.example.GenerateTrace.methodA(GenerateTrace.java:9)\n at - // com.example.GenerateTrace.main(GenerateTrace.java:5) - ExceptionStacktraceKey = attribute.Key("exception.stacktrace") - - // ExceptionTypeKey is the attribute Key conforming to the "exception.type" - // semantic conventions. It represents the type of the exception (its - // fully-qualified class name, if applicable). The dynamic type of the exception - // should be preferred over the static type in languages that support it. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "java.net.ConnectException", "OSError" - ExceptionTypeKey = attribute.Key("exception.type") -) - -// ExceptionMessage returns an attribute KeyValue conforming to the -// "exception.message" semantic conventions. It represents the exception message. -func ExceptionMessage(val string) attribute.KeyValue { - return ExceptionMessageKey.String(val) -} - -// ExceptionStacktrace returns an attribute KeyValue conforming to the -// "exception.stacktrace" semantic conventions. It represents a stacktrace as a -// string in the natural representation for the language runtime. The -// representation is to be determined and documented by each language SIG. -func ExceptionStacktrace(val string) attribute.KeyValue { - return ExceptionStacktraceKey.String(val) -} - -// ExceptionType returns an attribute KeyValue conforming to the "exception.type" -// semantic conventions. It represents the type of the exception (its -// fully-qualified class name, if applicable). The dynamic type of the exception -// should be preferred over the static type in languages that support it. -func ExceptionType(val string) attribute.KeyValue { - return ExceptionTypeKey.String(val) -} - -// Namespace: faas -const ( - // FaaSColdstartKey is the attribute Key conforming to the "faas.coldstart" - // semantic conventions. It represents a boolean that is true if the serverless - // function is executed for the first time (aka cold-start). - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - FaaSColdstartKey = attribute.Key("faas.coldstart") - - // FaaSCronKey is the attribute Key conforming to the "faas.cron" semantic - // conventions. It represents a string containing the schedule period as - // [Cron Expression]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0/5 * * * ? * - // - // [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm - FaaSCronKey = attribute.Key("faas.cron") - - // FaaSDocumentCollectionKey is the attribute Key conforming to the - // "faas.document.collection" semantic conventions. It represents the name of - // the source on which the triggering operation was performed. For example, in - // Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the - // database name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "myBucketName", "myDbName" - FaaSDocumentCollectionKey = attribute.Key("faas.document.collection") - - // FaaSDocumentNameKey is the attribute Key conforming to the - // "faas.document.name" semantic conventions. It represents the document - // name/table subjected to the operation. For example, in Cloud Storage or S3 is - // the name of the file, and in Cosmos DB the table name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "myFile.txt", "myTableName" - FaaSDocumentNameKey = attribute.Key("faas.document.name") - - // FaaSDocumentOperationKey is the attribute Key conforming to the - // "faas.document.operation" semantic conventions. It represents the describes - // the type of the operation that was performed on the data. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - FaaSDocumentOperationKey = attribute.Key("faas.document.operation") - - // FaaSDocumentTimeKey is the attribute Key conforming to the - // "faas.document.time" semantic conventions. It represents a string containing - // the time when the data was accessed in the [ISO 8601] format expressed in - // [UTC]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 2020-01-23T13:47:06Z - // - // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html - // [UTC]: https://www.w3.org/TR/NOTE-datetime - FaaSDocumentTimeKey = attribute.Key("faas.document.time") - - // FaaSInstanceKey is the attribute Key conforming to the "faas.instance" - // semantic conventions. It represents the execution environment ID as a string, - // that will be potentially reused for other invocations to the same - // function/function version. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de" - // Note: - **AWS Lambda:** Use the (full) log stream name. - FaaSInstanceKey = attribute.Key("faas.instance") - - // FaaSInvocationIDKey is the attribute Key conforming to the - // "faas.invocation_id" semantic conventions. It represents the invocation ID of - // the current function invocation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: af9d5aa4-a685-4c5f-a22b-444f80b3cc28 - FaaSInvocationIDKey = attribute.Key("faas.invocation_id") - - // FaaSInvokedNameKey is the attribute Key conforming to the "faas.invoked_name" - // semantic conventions. It represents the name of the invoked function. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: my-function - // Note: SHOULD be equal to the `faas.name` resource attribute of the invoked - // function. - FaaSInvokedNameKey = attribute.Key("faas.invoked_name") - - // FaaSInvokedProviderKey is the attribute Key conforming to the - // "faas.invoked_provider" semantic conventions. It represents the cloud - // provider of the invoked function. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: SHOULD be equal to the `cloud.provider` resource attribute of the - // invoked function. - FaaSInvokedProviderKey = attribute.Key("faas.invoked_provider") - - // FaaSInvokedRegionKey is the attribute Key conforming to the - // "faas.invoked_region" semantic conventions. It represents the cloud region of - // the invoked function. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: eu-central-1 - // Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked - // function. - FaaSInvokedRegionKey = attribute.Key("faas.invoked_region") - - // FaaSMaxMemoryKey is the attribute Key conforming to the "faas.max_memory" - // semantic conventions. It represents the amount of memory available to the - // serverless function converted to Bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Note: It's recommended to set this attribute since e.g. too little memory can - // easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, - // the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this - // information (which must be multiplied by 1,048,576). - FaaSMaxMemoryKey = attribute.Key("faas.max_memory") - - // FaaSNameKey is the attribute Key conforming to the "faas.name" semantic - // conventions. It represents the name of the single function that this runtime - // instance executes. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-function", "myazurefunctionapp/some-function-name" - // Note: This is the name of the function as configured/deployed on the FaaS - // platform and is usually different from the name of the callback - // function (which may be stored in the - // [`code.namespace`/`code.function.name`] - // span attributes). - // - // For some cloud providers, the above definition is ambiguous. The following - // definition of function name MUST be used for this attribute - // (and consequently the span name) for the listed cloud providers/products: - // - // - **Azure:** The full name `/`, i.e., function app name - // followed by a forward slash followed by the function name (this form - // can also be seen in the resource JSON for the function). - // This means that a span attribute MUST be used, as an Azure function - // app can host multiple functions that would usually share - // a TracerProvider (see also the `cloud.resource_id` attribute). - // - // - // [`code.namespace`/`code.function.name`]: /docs/general/attributes.md#source-code-attributes - FaaSNameKey = attribute.Key("faas.name") - - // FaaSTimeKey is the attribute Key conforming to the "faas.time" semantic - // conventions. It represents a string containing the function invocation time - // in the [ISO 8601] format expressed in [UTC]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 2020-01-23T13:47:06Z - // - // [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html - // [UTC]: https://www.w3.org/TR/NOTE-datetime - FaaSTimeKey = attribute.Key("faas.time") - - // FaaSTriggerKey is the attribute Key conforming to the "faas.trigger" semantic - // conventions. It represents the type of the trigger which caused this function - // invocation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - FaaSTriggerKey = attribute.Key("faas.trigger") - - // FaaSVersionKey is the attribute Key conforming to the "faas.version" semantic - // conventions. It represents the immutable version of the function being - // executed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "26", "pinkfroid-00002" - // Note: Depending on the cloud provider and platform, use: - // - // - **AWS Lambda:** The [function version] - // (an integer represented as a decimal string). - // - **Google Cloud Run (Services):** The [revision] - // (i.e., the function name plus the revision suffix). - // - **Google Cloud Functions:** The value of the - // [`K_REVISION` environment variable]. - // - **Azure Functions:** Not applicable. Do not set this attribute. - // - // - // [function version]: https://docs.aws.amazon.com/lambda/latest/dg/configuration-versions.html - // [revision]: https://cloud.google.com/run/docs/managing/revisions - // [`K_REVISION` environment variable]: https://cloud.google.com/functions/docs/env-var#runtime_environment_variables_set_automatically - FaaSVersionKey = attribute.Key("faas.version") -) - -// FaaSColdstart returns an attribute KeyValue conforming to the "faas.coldstart" -// semantic conventions. It represents a boolean that is true if the serverless -// function is executed for the first time (aka cold-start). -func FaaSColdstart(val bool) attribute.KeyValue { - return FaaSColdstartKey.Bool(val) -} - -// FaaSCron returns an attribute KeyValue conforming to the "faas.cron" semantic -// conventions. It represents a string containing the schedule period as -// [Cron Expression]. -// -// [Cron Expression]: https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm -func FaaSCron(val string) attribute.KeyValue { - return FaaSCronKey.String(val) -} - -// FaaSDocumentCollection returns an attribute KeyValue conforming to the -// "faas.document.collection" semantic conventions. It represents the name of the -// source on which the triggering operation was performed. For example, in Cloud -// Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database -// name. -func FaaSDocumentCollection(val string) attribute.KeyValue { - return FaaSDocumentCollectionKey.String(val) -} - -// FaaSDocumentName returns an attribute KeyValue conforming to the -// "faas.document.name" semantic conventions. It represents the document -// name/table subjected to the operation. For example, in Cloud Storage or S3 is -// the name of the file, and in Cosmos DB the table name. -func FaaSDocumentName(val string) attribute.KeyValue { - return FaaSDocumentNameKey.String(val) -} - -// FaaSDocumentTime returns an attribute KeyValue conforming to the -// "faas.document.time" semantic conventions. It represents a string containing -// the time when the data was accessed in the [ISO 8601] format expressed in -// [UTC]. -// -// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html -// [UTC]: https://www.w3.org/TR/NOTE-datetime -func FaaSDocumentTime(val string) attribute.KeyValue { - return FaaSDocumentTimeKey.String(val) -} - -// FaaSInstance returns an attribute KeyValue conforming to the "faas.instance" -// semantic conventions. It represents the execution environment ID as a string, -// that will be potentially reused for other invocations to the same -// function/function version. -func FaaSInstance(val string) attribute.KeyValue { - return FaaSInstanceKey.String(val) -} - -// FaaSInvocationID returns an attribute KeyValue conforming to the -// "faas.invocation_id" semantic conventions. It represents the invocation ID of -// the current function invocation. -func FaaSInvocationID(val string) attribute.KeyValue { - return FaaSInvocationIDKey.String(val) -} - -// FaaSInvokedName returns an attribute KeyValue conforming to the -// "faas.invoked_name" semantic conventions. It represents the name of the -// invoked function. -func FaaSInvokedName(val string) attribute.KeyValue { - return FaaSInvokedNameKey.String(val) -} - -// FaaSInvokedRegion returns an attribute KeyValue conforming to the -// "faas.invoked_region" semantic conventions. It represents the cloud region of -// the invoked function. -func FaaSInvokedRegion(val string) attribute.KeyValue { - return FaaSInvokedRegionKey.String(val) -} - -// FaaSMaxMemory returns an attribute KeyValue conforming to the -// "faas.max_memory" semantic conventions. It represents the amount of memory -// available to the serverless function converted to Bytes. -func FaaSMaxMemory(val int) attribute.KeyValue { - return FaaSMaxMemoryKey.Int(val) -} - -// FaaSName returns an attribute KeyValue conforming to the "faas.name" semantic -// conventions. It represents the name of the single function that this runtime -// instance executes. -func FaaSName(val string) attribute.KeyValue { - return FaaSNameKey.String(val) -} - -// FaaSTime returns an attribute KeyValue conforming to the "faas.time" semantic -// conventions. It represents a string containing the function invocation time in -// the [ISO 8601] format expressed in [UTC]. -// -// [ISO 8601]: https://www.iso.org/iso-8601-date-and-time-format.html -// [UTC]: https://www.w3.org/TR/NOTE-datetime -func FaaSTime(val string) attribute.KeyValue { - return FaaSTimeKey.String(val) -} - -// FaaSVersion returns an attribute KeyValue conforming to the "faas.version" -// semantic conventions. It represents the immutable version of the function -// being executed. -func FaaSVersion(val string) attribute.KeyValue { - return FaaSVersionKey.String(val) -} - -// Enum values for faas.document.operation -var ( - // When a new object is created. - // Stability: development - FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert") - // When an object is modified. - // Stability: development - FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit") - // When an object is deleted. - // Stability: development - FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete") -) - -// Enum values for faas.invoked_provider -var ( - // Alibaba Cloud - // Stability: development - FaaSInvokedProviderAlibabaCloud = FaaSInvokedProviderKey.String("alibaba_cloud") - // Amazon Web Services - // Stability: development - FaaSInvokedProviderAWS = FaaSInvokedProviderKey.String("aws") - // Microsoft Azure - // Stability: development - FaaSInvokedProviderAzure = FaaSInvokedProviderKey.String("azure") - // Google Cloud Platform - // Stability: development - FaaSInvokedProviderGCP = FaaSInvokedProviderKey.String("gcp") - // Tencent Cloud - // Stability: development - FaaSInvokedProviderTencentCloud = FaaSInvokedProviderKey.String("tencent_cloud") -) - -// Enum values for faas.trigger -var ( - // A response to some data source operation such as a database or filesystem - // read/write - // Stability: development - FaaSTriggerDatasource = FaaSTriggerKey.String("datasource") - // To provide an answer to an inbound HTTP request - // Stability: development - FaaSTriggerHTTP = FaaSTriggerKey.String("http") - // A function is set to be executed when messages are sent to a messaging system - // Stability: development - FaaSTriggerPubSub = FaaSTriggerKey.String("pubsub") - // A function is scheduled to be executed regularly - // Stability: development - FaaSTriggerTimer = FaaSTriggerKey.String("timer") - // If none of the others apply - // Stability: development - FaaSTriggerOther = FaaSTriggerKey.String("other") -) - -// Namespace: feature_flag -const ( - // FeatureFlagContextIDKey is the attribute Key conforming to the - // "feature_flag.context.id" semantic conventions. It represents the unique - // identifier for the flag evaluation context. For example, the targeting key. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "5157782b-2203-4c80-a857-dbbd5e7761db" - FeatureFlagContextIDKey = attribute.Key("feature_flag.context.id") - - // FeatureFlagKeyKey is the attribute Key conforming to the "feature_flag.key" - // semantic conventions. It represents the lookup key of the feature flag. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "logo-color" - FeatureFlagKeyKey = attribute.Key("feature_flag.key") - - // FeatureFlagProviderNameKey is the attribute Key conforming to the - // "feature_flag.provider.name" semantic conventions. It represents the - // identifies the feature flag provider. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "Flag Manager" - FeatureFlagProviderNameKey = attribute.Key("feature_flag.provider.name") - - // FeatureFlagResultReasonKey is the attribute Key conforming to the - // "feature_flag.result.reason" semantic conventions. It represents the reason - // code which shows how a feature flag value was determined. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "static", "targeting_match", "error", "default" - FeatureFlagResultReasonKey = attribute.Key("feature_flag.result.reason") - - // FeatureFlagResultValueKey is the attribute Key conforming to the - // "feature_flag.result.value" semantic conventions. It represents the evaluated - // value of the feature flag. - // - // Type: any - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "#ff0000", true, 3 - // Note: With some feature flag providers, feature flag results can be quite - // large or contain private or sensitive details. - // Because of this, `feature_flag.result.variant` is often the preferred - // attribute if it is available. - // - // It may be desirable to redact or otherwise limit the size and scope of - // `feature_flag.result.value` if possible. - // Because the evaluated flag value is unstructured and may be any type, it is - // left to the instrumentation author to determine how best to achieve this. - FeatureFlagResultValueKey = attribute.Key("feature_flag.result.value") - - // FeatureFlagResultVariantKey is the attribute Key conforming to the - // "feature_flag.result.variant" semantic conventions. It represents a semantic - // identifier for an evaluated flag value. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "red", "true", "on" - // Note: A semantic identifier, commonly referred to as a variant, provides a - // means - // for referring to a value without including the value itself. This can - // provide additional context for understanding the meaning behind a value. - // For example, the variant `red` maybe be used for the value `#c05543`. - FeatureFlagResultVariantKey = attribute.Key("feature_flag.result.variant") - - // FeatureFlagSetIDKey is the attribute Key conforming to the - // "feature_flag.set.id" semantic conventions. It represents the identifier of - // the [flag set] to which the feature flag belongs. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "proj-1", "ab98sgs", "service1/dev" - // - // [flag set]: https://openfeature.dev/specification/glossary/#flag-set - FeatureFlagSetIDKey = attribute.Key("feature_flag.set.id") - - // FeatureFlagVersionKey is the attribute Key conforming to the - // "feature_flag.version" semantic conventions. It represents the version of the - // ruleset used during the evaluation. This may be any stable value which - // uniquely identifies the ruleset. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Release_Candidate - // - // Examples: "1", "01ABCDEF" - FeatureFlagVersionKey = attribute.Key("feature_flag.version") -) - -// FeatureFlagContextID returns an attribute KeyValue conforming to the -// "feature_flag.context.id" semantic conventions. It represents the unique -// identifier for the flag evaluation context. For example, the targeting key. -func FeatureFlagContextID(val string) attribute.KeyValue { - return FeatureFlagContextIDKey.String(val) -} - -// FeatureFlagKey returns an attribute KeyValue conforming to the -// "feature_flag.key" semantic conventions. It represents the lookup key of the -// feature flag. -func FeatureFlagKey(val string) attribute.KeyValue { - return FeatureFlagKeyKey.String(val) -} - -// FeatureFlagProviderName returns an attribute KeyValue conforming to the -// "feature_flag.provider.name" semantic conventions. It represents the -// identifies the feature flag provider. -func FeatureFlagProviderName(val string) attribute.KeyValue { - return FeatureFlagProviderNameKey.String(val) -} - -// FeatureFlagResultVariant returns an attribute KeyValue conforming to the -// "feature_flag.result.variant" semantic conventions. It represents a semantic -// identifier for an evaluated flag value. -func FeatureFlagResultVariant(val string) attribute.KeyValue { - return FeatureFlagResultVariantKey.String(val) -} - -// FeatureFlagSetID returns an attribute KeyValue conforming to the -// "feature_flag.set.id" semantic conventions. It represents the identifier of -// the [flag set] to which the feature flag belongs. -// -// [flag set]: https://openfeature.dev/specification/glossary/#flag-set -func FeatureFlagSetID(val string) attribute.KeyValue { - return FeatureFlagSetIDKey.String(val) -} - -// FeatureFlagVersion returns an attribute KeyValue conforming to the -// "feature_flag.version" semantic conventions. It represents the version of the -// ruleset used during the evaluation. This may be any stable value which -// uniquely identifies the ruleset. -func FeatureFlagVersion(val string) attribute.KeyValue { - return FeatureFlagVersionKey.String(val) -} - -// Enum values for feature_flag.result.reason -var ( - // The resolved value is static (no dynamic evaluation). - // Stability: release_candidate - FeatureFlagResultReasonStatic = FeatureFlagResultReasonKey.String("static") - // The resolved value fell back to a pre-configured value (no dynamic evaluation - // occurred or dynamic evaluation yielded no result). - // Stability: release_candidate - FeatureFlagResultReasonDefault = FeatureFlagResultReasonKey.String("default") - // The resolved value was the result of a dynamic evaluation, such as a rule or - // specific user-targeting. - // Stability: release_candidate - FeatureFlagResultReasonTargetingMatch = FeatureFlagResultReasonKey.String("targeting_match") - // The resolved value was the result of pseudorandom assignment. - // Stability: release_candidate - FeatureFlagResultReasonSplit = FeatureFlagResultReasonKey.String("split") - // The resolved value was retrieved from cache. - // Stability: release_candidate - FeatureFlagResultReasonCached = FeatureFlagResultReasonKey.String("cached") - // The resolved value was the result of the flag being disabled in the - // management system. - // Stability: release_candidate - FeatureFlagResultReasonDisabled = FeatureFlagResultReasonKey.String("disabled") - // The reason for the resolved value could not be determined. - // Stability: release_candidate - FeatureFlagResultReasonUnknown = FeatureFlagResultReasonKey.String("unknown") - // The resolved value is non-authoritative or possibly out of date - // Stability: release_candidate - FeatureFlagResultReasonStale = FeatureFlagResultReasonKey.String("stale") - // The resolved value was the result of an error. - // Stability: release_candidate - FeatureFlagResultReasonError = FeatureFlagResultReasonKey.String("error") -) - -// Namespace: file -const ( - // FileAccessedKey is the attribute Key conforming to the "file.accessed" - // semantic conventions. It represents the time when the file was last accessed, - // in ISO 8601 format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T12:00:00Z" - // Note: This attribute might not be supported by some file systems — NFS, - // FAT32, in embedded OS, etc. - FileAccessedKey = attribute.Key("file.accessed") - - // FileAttributesKey is the attribute Key conforming to the "file.attributes" - // semantic conventions. It represents the array of file attributes. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "readonly", "hidden" - // Note: Attributes names depend on the OS or file system. Here’s a - // non-exhaustive list of values expected for this attribute: `archive`, - // `compressed`, `directory`, `encrypted`, `execute`, `hidden`, `immutable`, - // `journaled`, `read`, `readonly`, `symbolic link`, `system`, `temporary`, - // `write`. - FileAttributesKey = attribute.Key("file.attributes") - - // FileChangedKey is the attribute Key conforming to the "file.changed" semantic - // conventions. It represents the time when the file attributes or metadata was - // last changed, in ISO 8601 format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T12:00:00Z" - // Note: `file.changed` captures the time when any of the file's properties or - // attributes (including the content) are changed, while `file.modified` - // captures the timestamp when the file content is modified. - FileChangedKey = attribute.Key("file.changed") - - // FileCreatedKey is the attribute Key conforming to the "file.created" semantic - // conventions. It represents the time when the file was created, in ISO 8601 - // format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T12:00:00Z" - // Note: This attribute might not be supported by some file systems — NFS, - // FAT32, in embedded OS, etc. - FileCreatedKey = attribute.Key("file.created") - - // FileDirectoryKey is the attribute Key conforming to the "file.directory" - // semantic conventions. It represents the directory where the file is located. - // It should include the drive letter, when appropriate. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/home/user", "C:\Program Files\MyApp" - FileDirectoryKey = attribute.Key("file.directory") - - // FileExtensionKey is the attribute Key conforming to the "file.extension" - // semantic conventions. It represents the file extension, excluding the leading - // dot. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "png", "gz" - // Note: When the file name has multiple extensions (example.tar.gz), only the - // last one should be captured ("gz", not "tar.gz"). - FileExtensionKey = attribute.Key("file.extension") - - // FileForkNameKey is the attribute Key conforming to the "file.fork_name" - // semantic conventions. It represents the name of the fork. A fork is - // additional data associated with a filesystem object. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Zone.Identifier" - // Note: On Linux, a resource fork is used to store additional data with a - // filesystem object. A file always has at least one fork for the data portion, - // and additional forks may exist. - // On NTFS, this is analogous to an Alternate Data Stream (ADS), and the default - // data stream for a file is just called $DATA. Zone.Identifier is commonly used - // by Windows to track contents downloaded from the Internet. An ADS is - // typically of the form: C:\path\to\filename.extension:some_fork_name, and - // some_fork_name is the value that should populate `fork_name`. - // `filename.extension` should populate `file.name`, and `extension` should - // populate `file.extension`. The full path, `file.path`, will include the fork - // name. - FileForkNameKey = attribute.Key("file.fork_name") - - // FileGroupIDKey is the attribute Key conforming to the "file.group.id" - // semantic conventions. It represents the primary Group ID (GID) of the file. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1000" - FileGroupIDKey = attribute.Key("file.group.id") - - // FileGroupNameKey is the attribute Key conforming to the "file.group.name" - // semantic conventions. It represents the primary group name of the file. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "users" - FileGroupNameKey = attribute.Key("file.group.name") - - // FileInodeKey is the attribute Key conforming to the "file.inode" semantic - // conventions. It represents the inode representing the file in the filesystem. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "256383" - FileInodeKey = attribute.Key("file.inode") - - // FileModeKey is the attribute Key conforming to the "file.mode" semantic - // conventions. It represents the mode of the file in octal representation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0640" - FileModeKey = attribute.Key("file.mode") - - // FileModifiedKey is the attribute Key conforming to the "file.modified" - // semantic conventions. It represents the time when the file content was last - // modified, in ISO 8601 format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T12:00:00Z" - FileModifiedKey = attribute.Key("file.modified") - - // FileNameKey is the attribute Key conforming to the "file.name" semantic - // conventions. It represents the name of the file including the extension, - // without the directory. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "example.png" - FileNameKey = attribute.Key("file.name") - - // FileOwnerIDKey is the attribute Key conforming to the "file.owner.id" - // semantic conventions. It represents the user ID (UID) or security identifier - // (SID) of the file owner. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1000" - FileOwnerIDKey = attribute.Key("file.owner.id") - - // FileOwnerNameKey is the attribute Key conforming to the "file.owner.name" - // semantic conventions. It represents the username of the file owner. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "root" - FileOwnerNameKey = attribute.Key("file.owner.name") - - // FilePathKey is the attribute Key conforming to the "file.path" semantic - // conventions. It represents the full path to the file, including the file - // name. It should include the drive letter, when appropriate. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/home/alice/example.png", "C:\Program Files\MyApp\myapp.exe" - FilePathKey = attribute.Key("file.path") - - // FileSizeKey is the attribute Key conforming to the "file.size" semantic - // conventions. It represents the file size in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - FileSizeKey = attribute.Key("file.size") - - // FileSymbolicLinkTargetPathKey is the attribute Key conforming to the - // "file.symbolic_link.target_path" semantic conventions. It represents the path - // to the target of a symbolic link. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/usr/bin/python3" - // Note: This attribute is only applicable to symbolic links. - FileSymbolicLinkTargetPathKey = attribute.Key("file.symbolic_link.target_path") -) - -// FileAccessed returns an attribute KeyValue conforming to the "file.accessed" -// semantic conventions. It represents the time when the file was last accessed, -// in ISO 8601 format. -func FileAccessed(val string) attribute.KeyValue { - return FileAccessedKey.String(val) -} - -// FileAttributes returns an attribute KeyValue conforming to the -// "file.attributes" semantic conventions. It represents the array of file -// attributes. -func FileAttributes(val ...string) attribute.KeyValue { - return FileAttributesKey.StringSlice(val) -} - -// FileChanged returns an attribute KeyValue conforming to the "file.changed" -// semantic conventions. It represents the time when the file attributes or -// metadata was last changed, in ISO 8601 format. -func FileChanged(val string) attribute.KeyValue { - return FileChangedKey.String(val) -} - -// FileCreated returns an attribute KeyValue conforming to the "file.created" -// semantic conventions. It represents the time when the file was created, in ISO -// 8601 format. -func FileCreated(val string) attribute.KeyValue { - return FileCreatedKey.String(val) -} - -// FileDirectory returns an attribute KeyValue conforming to the "file.directory" -// semantic conventions. It represents the directory where the file is located. -// It should include the drive letter, when appropriate. -func FileDirectory(val string) attribute.KeyValue { - return FileDirectoryKey.String(val) -} - -// FileExtension returns an attribute KeyValue conforming to the "file.extension" -// semantic conventions. It represents the file extension, excluding the leading -// dot. -func FileExtension(val string) attribute.KeyValue { - return FileExtensionKey.String(val) -} - -// FileForkName returns an attribute KeyValue conforming to the "file.fork_name" -// semantic conventions. It represents the name of the fork. A fork is additional -// data associated with a filesystem object. -func FileForkName(val string) attribute.KeyValue { - return FileForkNameKey.String(val) -} - -// FileGroupID returns an attribute KeyValue conforming to the "file.group.id" -// semantic conventions. It represents the primary Group ID (GID) of the file. -func FileGroupID(val string) attribute.KeyValue { - return FileGroupIDKey.String(val) -} - -// FileGroupName returns an attribute KeyValue conforming to the -// "file.group.name" semantic conventions. It represents the primary group name -// of the file. -func FileGroupName(val string) attribute.KeyValue { - return FileGroupNameKey.String(val) -} - -// FileInode returns an attribute KeyValue conforming to the "file.inode" -// semantic conventions. It represents the inode representing the file in the -// filesystem. -func FileInode(val string) attribute.KeyValue { - return FileInodeKey.String(val) -} - -// FileMode returns an attribute KeyValue conforming to the "file.mode" semantic -// conventions. It represents the mode of the file in octal representation. -func FileMode(val string) attribute.KeyValue { - return FileModeKey.String(val) -} - -// FileModified returns an attribute KeyValue conforming to the "file.modified" -// semantic conventions. It represents the time when the file content was last -// modified, in ISO 8601 format. -func FileModified(val string) attribute.KeyValue { - return FileModifiedKey.String(val) -} - -// FileName returns an attribute KeyValue conforming to the "file.name" semantic -// conventions. It represents the name of the file including the extension, -// without the directory. -func FileName(val string) attribute.KeyValue { - return FileNameKey.String(val) -} - -// FileOwnerID returns an attribute KeyValue conforming to the "file.owner.id" -// semantic conventions. It represents the user ID (UID) or security identifier -// (SID) of the file owner. -func FileOwnerID(val string) attribute.KeyValue { - return FileOwnerIDKey.String(val) -} - -// FileOwnerName returns an attribute KeyValue conforming to the -// "file.owner.name" semantic conventions. It represents the username of the file -// owner. -func FileOwnerName(val string) attribute.KeyValue { - return FileOwnerNameKey.String(val) -} - -// FilePath returns an attribute KeyValue conforming to the "file.path" semantic -// conventions. It represents the full path to the file, including the file name. -// It should include the drive letter, when appropriate. -func FilePath(val string) attribute.KeyValue { - return FilePathKey.String(val) -} - -// FileSize returns an attribute KeyValue conforming to the "file.size" semantic -// conventions. It represents the file size in bytes. -func FileSize(val int) attribute.KeyValue { - return FileSizeKey.Int(val) -} - -// FileSymbolicLinkTargetPath returns an attribute KeyValue conforming to the -// "file.symbolic_link.target_path" semantic conventions. It represents the path -// to the target of a symbolic link. -func FileSymbolicLinkTargetPath(val string) attribute.KeyValue { - return FileSymbolicLinkTargetPathKey.String(val) -} - -// Namespace: gcp -const ( - // GCPAppHubApplicationContainerKey is the attribute Key conforming to the - // "gcp.apphub.application.container" semantic conventions. It represents the - // container within GCP where the AppHub application is defined. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "projects/my-container-project" - GCPAppHubApplicationContainerKey = attribute.Key("gcp.apphub.application.container") - - // GCPAppHubApplicationIDKey is the attribute Key conforming to the - // "gcp.apphub.application.id" semantic conventions. It represents the name of - // the application as configured in AppHub. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-application" - GCPAppHubApplicationIDKey = attribute.Key("gcp.apphub.application.id") - - // GCPAppHubApplicationLocationKey is the attribute Key conforming to the - // "gcp.apphub.application.location" semantic conventions. It represents the GCP - // zone or region where the application is defined. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "us-central1" - GCPAppHubApplicationLocationKey = attribute.Key("gcp.apphub.application.location") - - // GCPAppHubServiceCriticalityTypeKey is the attribute Key conforming to the - // "gcp.apphub.service.criticality_type" semantic conventions. It represents the - // criticality of a service indicates its importance to the business. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: [See AppHub type enum] - // - // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type - GCPAppHubServiceCriticalityTypeKey = attribute.Key("gcp.apphub.service.criticality_type") - - // GCPAppHubServiceEnvironmentTypeKey is the attribute Key conforming to the - // "gcp.apphub.service.environment_type" semantic conventions. It represents the - // environment of a service is the stage of a software lifecycle. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: [See AppHub environment type] - // - // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 - GCPAppHubServiceEnvironmentTypeKey = attribute.Key("gcp.apphub.service.environment_type") - - // GCPAppHubServiceIDKey is the attribute Key conforming to the - // "gcp.apphub.service.id" semantic conventions. It represents the name of the - // service as configured in AppHub. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-service" - GCPAppHubServiceIDKey = attribute.Key("gcp.apphub.service.id") - - // GCPAppHubWorkloadCriticalityTypeKey is the attribute Key conforming to the - // "gcp.apphub.workload.criticality_type" semantic conventions. It represents - // the criticality of a workload indicates its importance to the business. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: [See AppHub type enum] - // - // [See AppHub type enum]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type - GCPAppHubWorkloadCriticalityTypeKey = attribute.Key("gcp.apphub.workload.criticality_type") - - // GCPAppHubWorkloadEnvironmentTypeKey is the attribute Key conforming to the - // "gcp.apphub.workload.environment_type" semantic conventions. It represents - // the environment of a workload is the stage of a software lifecycle. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: [See AppHub environment type] - // - // [See AppHub environment type]: https://cloud.google.com/app-hub/docs/reference/rest/v1/Attributes#type_1 - GCPAppHubWorkloadEnvironmentTypeKey = attribute.Key("gcp.apphub.workload.environment_type") - - // GCPAppHubWorkloadIDKey is the attribute Key conforming to the - // "gcp.apphub.workload.id" semantic conventions. It represents the name of the - // workload as configured in AppHub. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-workload" - GCPAppHubWorkloadIDKey = attribute.Key("gcp.apphub.workload.id") - - // GCPClientServiceKey is the attribute Key conforming to the - // "gcp.client.service" semantic conventions. It represents the identifies the - // Google Cloud service for which the official client library is intended. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "appengine", "run", "firestore", "alloydb", "spanner" - // Note: Intended to be a stable identifier for Google Cloud client libraries - // that is uniform across implementation languages. The value should be derived - // from the canonical service domain for the service; for example, - // 'foo.googleapis.com' should result in a value of 'foo'. - GCPClientServiceKey = attribute.Key("gcp.client.service") - - // GCPCloudRunJobExecutionKey is the attribute Key conforming to the - // "gcp.cloud_run.job.execution" semantic conventions. It represents the name of - // the Cloud Run [execution] being run for the Job, as set by the - // [`CLOUD_RUN_EXECUTION`] environment variable. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "job-name-xxxx", "sample-job-mdw84" - // - // [execution]: https://cloud.google.com/run/docs/managing/job-executions - // [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars - GCPCloudRunJobExecutionKey = attribute.Key("gcp.cloud_run.job.execution") - - // GCPCloudRunJobTaskIndexKey is the attribute Key conforming to the - // "gcp.cloud_run.job.task_index" semantic conventions. It represents the index - // for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`] - // environment variable. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0, 1 - // - // [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars - GCPCloudRunJobTaskIndexKey = attribute.Key("gcp.cloud_run.job.task_index") - - // GCPGCEInstanceHostnameKey is the attribute Key conforming to the - // "gcp.gce.instance.hostname" semantic conventions. It represents the hostname - // of a GCE instance. This is the full value of the default or [custom hostname] - // . - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-host1234.example.com", - // "sample-vm.us-west1-b.c.my-project.internal" - // - // [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm - GCPGCEInstanceHostnameKey = attribute.Key("gcp.gce.instance.hostname") - - // GCPGCEInstanceNameKey is the attribute Key conforming to the - // "gcp.gce.instance.name" semantic conventions. It represents the instance name - // of a GCE instance. This is the value provided by `host.name`, the visible - // name of the instance in the Cloud Console UI, and the prefix for the default - // hostname of the instance as defined by the [default internal DNS name]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "instance-1", "my-vm-name" - // - // [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names - GCPGCEInstanceNameKey = attribute.Key("gcp.gce.instance.name") -) - -// GCPAppHubApplicationContainer returns an attribute KeyValue conforming to the -// "gcp.apphub.application.container" semantic conventions. It represents the -// container within GCP where the AppHub application is defined. -func GCPAppHubApplicationContainer(val string) attribute.KeyValue { - return GCPAppHubApplicationContainerKey.String(val) -} - -// GCPAppHubApplicationID returns an attribute KeyValue conforming to the -// "gcp.apphub.application.id" semantic conventions. It represents the name of -// the application as configured in AppHub. -func GCPAppHubApplicationID(val string) attribute.KeyValue { - return GCPAppHubApplicationIDKey.String(val) -} - -// GCPAppHubApplicationLocation returns an attribute KeyValue conforming to the -// "gcp.apphub.application.location" semantic conventions. It represents the GCP -// zone or region where the application is defined. -func GCPAppHubApplicationLocation(val string) attribute.KeyValue { - return GCPAppHubApplicationLocationKey.String(val) -} - -// GCPAppHubServiceID returns an attribute KeyValue conforming to the -// "gcp.apphub.service.id" semantic conventions. It represents the name of the -// service as configured in AppHub. -func GCPAppHubServiceID(val string) attribute.KeyValue { - return GCPAppHubServiceIDKey.String(val) -} - -// GCPAppHubWorkloadID returns an attribute KeyValue conforming to the -// "gcp.apphub.workload.id" semantic conventions. It represents the name of the -// workload as configured in AppHub. -func GCPAppHubWorkloadID(val string) attribute.KeyValue { - return GCPAppHubWorkloadIDKey.String(val) -} - -// GCPClientService returns an attribute KeyValue conforming to the -// "gcp.client.service" semantic conventions. It represents the identifies the -// Google Cloud service for which the official client library is intended. -func GCPClientService(val string) attribute.KeyValue { - return GCPClientServiceKey.String(val) -} - -// GCPCloudRunJobExecution returns an attribute KeyValue conforming to the -// "gcp.cloud_run.job.execution" semantic conventions. It represents the name of -// the Cloud Run [execution] being run for the Job, as set by the -// [`CLOUD_RUN_EXECUTION`] environment variable. -// -// [execution]: https://cloud.google.com/run/docs/managing/job-executions -// [`CLOUD_RUN_EXECUTION`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars -func GCPCloudRunJobExecution(val string) attribute.KeyValue { - return GCPCloudRunJobExecutionKey.String(val) -} - -// GCPCloudRunJobTaskIndex returns an attribute KeyValue conforming to the -// "gcp.cloud_run.job.task_index" semantic conventions. It represents the index -// for a task within an execution as provided by the [`CLOUD_RUN_TASK_INDEX`] -// environment variable. -// -// [`CLOUD_RUN_TASK_INDEX`]: https://cloud.google.com/run/docs/container-contract#jobs-env-vars -func GCPCloudRunJobTaskIndex(val int) attribute.KeyValue { - return GCPCloudRunJobTaskIndexKey.Int(val) -} - -// GCPGCEInstanceHostname returns an attribute KeyValue conforming to the -// "gcp.gce.instance.hostname" semantic conventions. It represents the hostname -// of a GCE instance. This is the full value of the default or [custom hostname] -// . -// -// [custom hostname]: https://cloud.google.com/compute/docs/instances/custom-hostname-vm -func GCPGCEInstanceHostname(val string) attribute.KeyValue { - return GCPGCEInstanceHostnameKey.String(val) -} - -// GCPGCEInstanceName returns an attribute KeyValue conforming to the -// "gcp.gce.instance.name" semantic conventions. It represents the instance name -// of a GCE instance. This is the value provided by `host.name`, the visible name -// of the instance in the Cloud Console UI, and the prefix for the default -// hostname of the instance as defined by the [default internal DNS name]. -// -// [default internal DNS name]: https://cloud.google.com/compute/docs/internal-dns#instance-fully-qualified-domain-names -func GCPGCEInstanceName(val string) attribute.KeyValue { - return GCPGCEInstanceNameKey.String(val) -} - -// Enum values for gcp.apphub.service.criticality_type -var ( - // Mission critical service. - // Stability: development - GCPAppHubServiceCriticalityTypeMissionCritical = GCPAppHubServiceCriticalityTypeKey.String("MISSION_CRITICAL") - // High impact. - // Stability: development - GCPAppHubServiceCriticalityTypeHigh = GCPAppHubServiceCriticalityTypeKey.String("HIGH") - // Medium impact. - // Stability: development - GCPAppHubServiceCriticalityTypeMedium = GCPAppHubServiceCriticalityTypeKey.String("MEDIUM") - // Low impact. - // Stability: development - GCPAppHubServiceCriticalityTypeLow = GCPAppHubServiceCriticalityTypeKey.String("LOW") -) - -// Enum values for gcp.apphub.service.environment_type -var ( - // Production environment. - // Stability: development - GCPAppHubServiceEnvironmentTypeProduction = GCPAppHubServiceEnvironmentTypeKey.String("PRODUCTION") - // Staging environment. - // Stability: development - GCPAppHubServiceEnvironmentTypeStaging = GCPAppHubServiceEnvironmentTypeKey.String("STAGING") - // Test environment. - // Stability: development - GCPAppHubServiceEnvironmentTypeTest = GCPAppHubServiceEnvironmentTypeKey.String("TEST") - // Development environment. - // Stability: development - GCPAppHubServiceEnvironmentTypeDevelopment = GCPAppHubServiceEnvironmentTypeKey.String("DEVELOPMENT") -) - -// Enum values for gcp.apphub.workload.criticality_type -var ( - // Mission critical service. - // Stability: development - GCPAppHubWorkloadCriticalityTypeMissionCritical = GCPAppHubWorkloadCriticalityTypeKey.String("MISSION_CRITICAL") - // High impact. - // Stability: development - GCPAppHubWorkloadCriticalityTypeHigh = GCPAppHubWorkloadCriticalityTypeKey.String("HIGH") - // Medium impact. - // Stability: development - GCPAppHubWorkloadCriticalityTypeMedium = GCPAppHubWorkloadCriticalityTypeKey.String("MEDIUM") - // Low impact. - // Stability: development - GCPAppHubWorkloadCriticalityTypeLow = GCPAppHubWorkloadCriticalityTypeKey.String("LOW") -) - -// Enum values for gcp.apphub.workload.environment_type -var ( - // Production environment. - // Stability: development - GCPAppHubWorkloadEnvironmentTypeProduction = GCPAppHubWorkloadEnvironmentTypeKey.String("PRODUCTION") - // Staging environment. - // Stability: development - GCPAppHubWorkloadEnvironmentTypeStaging = GCPAppHubWorkloadEnvironmentTypeKey.String("STAGING") - // Test environment. - // Stability: development - GCPAppHubWorkloadEnvironmentTypeTest = GCPAppHubWorkloadEnvironmentTypeKey.String("TEST") - // Development environment. - // Stability: development - GCPAppHubWorkloadEnvironmentTypeDevelopment = GCPAppHubWorkloadEnvironmentTypeKey.String("DEVELOPMENT") -) - -// Namespace: gen_ai -const ( - // GenAIAgentDescriptionKey is the attribute Key conforming to the - // "gen_ai.agent.description" semantic conventions. It represents the free-form - // description of the GenAI agent provided by the application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Helps with math problems", "Generates fiction stories" - GenAIAgentDescriptionKey = attribute.Key("gen_ai.agent.description") - - // GenAIAgentIDKey is the attribute Key conforming to the "gen_ai.agent.id" - // semantic conventions. It represents the unique identifier of the GenAI agent. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "asst_5j66UpCpwteGg4YSxUnt7lPY" - GenAIAgentIDKey = attribute.Key("gen_ai.agent.id") - - // GenAIAgentNameKey is the attribute Key conforming to the "gen_ai.agent.name" - // semantic conventions. It represents the human-readable name of the GenAI - // agent provided by the application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Math Tutor", "Fiction Writer" - GenAIAgentNameKey = attribute.Key("gen_ai.agent.name") - - // GenAIConversationIDKey is the attribute Key conforming to the - // "gen_ai.conversation.id" semantic conventions. It represents the unique - // identifier for a conversation (session, thread), used to store and correlate - // messages within this conversation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "conv_5j66UpCpwteGg4YSxUnt7lPY" - GenAIConversationIDKey = attribute.Key("gen_ai.conversation.id") - - // GenAIDataSourceIDKey is the attribute Key conforming to the - // "gen_ai.data_source.id" semantic conventions. It represents the data source - // identifier. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "H7STPQYOND" - // Note: Data sources are used by AI agents and RAG applications to store - // grounding data. A data source may be an external database, object store, - // document collection, website, or any other storage system used by the GenAI - // agent or application. The `gen_ai.data_source.id` SHOULD match the identifier - // used by the GenAI system rather than a name specific to the external storage, - // such as a database or object store. Semantic conventions referencing - // `gen_ai.data_source.id` MAY also leverage additional attributes, such as - // `db.*`, to further identify and describe the data source. - GenAIDataSourceIDKey = attribute.Key("gen_ai.data_source.id") - - // GenAIInputMessagesKey is the attribute Key conforming to the - // "gen_ai.input.messages" semantic conventions. It represents the chat history - // provided to the model as an input. - // - // Type: any - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "[\n {\n "role": "user",\n "parts": [\n {\n "type": "text",\n - // "content": "Weather in Paris?"\n }\n ]\n },\n {\n "role": "assistant",\n - // "parts": [\n {\n "type": "tool_call",\n "id": - // "call_VSPygqKTWdrhaFErNvMV18Yl",\n "name": "get_weather",\n "arguments": {\n - // "location": "Paris"\n }\n }\n ]\n },\n {\n "role": "tool",\n "parts": [\n {\n - // "type": "tool_call_response",\n "id": " call_VSPygqKTWdrhaFErNvMV18Yl",\n - // "result": "rainy, 57°F"\n }\n ]\n }\n]\n" - // Note: Instrumentations MUST follow [Input messages JSON schema]. - // When the attribute is recorded on events, it MUST be recorded in structured - // form. When recorded on spans, it MAY be recorded as a JSON string if - // structured - // format is not supported and SHOULD be recorded in structured form otherwise. - // - // Messages MUST be provided in the order they were sent to the model. - // Instrumentations MAY provide a way for users to filter or truncate - // input messages. - // - // > [!Warning] - // > This attribute is likely to contain sensitive information including - // > user/PII data. - // - // See [Recording content on attributes] - // section for more details. - // - // [Input messages JSON schema]: /docs/gen-ai/gen-ai-input-messages.json - // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes - GenAIInputMessagesKey = attribute.Key("gen_ai.input.messages") - - // GenAIOperationNameKey is the attribute Key conforming to the - // "gen_ai.operation.name" semantic conventions. It represents the name of the - // operation being performed. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: If one of the predefined values applies, but specific system uses a - // different name it's RECOMMENDED to document it in the semantic conventions - // for specific GenAI system and use system-specific name in the - // instrumentation. If a different name is not documented, instrumentation - // libraries SHOULD use applicable predefined value. - GenAIOperationNameKey = attribute.Key("gen_ai.operation.name") - - // GenAIOutputMessagesKey is the attribute Key conforming to the - // "gen_ai.output.messages" semantic conventions. It represents the messages - // returned by the model where each message represents a specific model response - // (choice, candidate). - // - // Type: any - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "[\n {\n "role": "assistant",\n "parts": [\n {\n "type": "text",\n - // "content": "The weather in Paris is currently rainy with a temperature of - // 57°F."\n }\n ],\n "finish_reason": "stop"\n }\n]\n" - // Note: Instrumentations MUST follow [Output messages JSON schema] - // - // Each message represents a single output choice/candidate generated by - // the model. Each message corresponds to exactly one generation - // (choice/candidate) and vice versa - one choice cannot be split across - // multiple messages or one message cannot contain parts from multiple choices. - // - // When the attribute is recorded on events, it MUST be recorded in structured - // form. When recorded on spans, it MAY be recorded as a JSON string if - // structured - // format is not supported and SHOULD be recorded in structured form otherwise. - // - // Instrumentations MAY provide a way for users to filter or truncate - // output messages. - // - // > [!Warning] - // > This attribute is likely to contain sensitive information including - // > user/PII data. - // - // See [Recording content on attributes] - // section for more details. - // - // [Output messages JSON schema]: /docs/gen-ai/gen-ai-output-messages.json - // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes - GenAIOutputMessagesKey = attribute.Key("gen_ai.output.messages") - - // GenAIOutputTypeKey is the attribute Key conforming to the - // "gen_ai.output.type" semantic conventions. It represents the represents the - // content type requested by the client. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: This attribute SHOULD be used when the client requests output of a - // specific type. The model may return zero or more outputs of this type. - // This attribute specifies the output modality and not the actual output - // format. For example, if an image is requested, the actual output could be a - // URL pointing to an image file. - // Additional output format details may be recorded in the future in the - // `gen_ai.output.{type}.*` attributes. - GenAIOutputTypeKey = attribute.Key("gen_ai.output.type") - - // GenAIProviderNameKey is the attribute Key conforming to the - // "gen_ai.provider.name" semantic conventions. It represents the Generative AI - // provider as identified by the client or server instrumentation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: The attribute SHOULD be set based on the instrumentation's best - // knowledge and may differ from the actual model provider. - // - // Multiple providers, including Azure OpenAI, Gemini, and AI hosting platforms - // are accessible using the OpenAI REST API and corresponding client libraries, - // but may proxy or host models from different providers. - // - // The `gen_ai.request.model`, `gen_ai.response.model`, and `server.address` - // attributes may help identify the actual system in use. - // - // The `gen_ai.provider.name` attribute acts as a discriminator that - // identifies the GenAI telemetry format flavor specific to that provider - // within GenAI semantic conventions. - // It SHOULD be set consistently with provider-specific attributes and signals. - // For example, GenAI spans, metrics, and events related to AWS Bedrock - // should have the `gen_ai.provider.name` set to `aws.bedrock` and include - // applicable `aws.bedrock.*` attributes and are not expected to include - // `openai.*` attributes. - GenAIProviderNameKey = attribute.Key("gen_ai.provider.name") - - // GenAIRequestChoiceCountKey is the attribute Key conforming to the - // "gen_ai.request.choice.count" semantic conventions. It represents the target - // number of candidate completions to return. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 3 - GenAIRequestChoiceCountKey = attribute.Key("gen_ai.request.choice.count") - - // GenAIRequestEncodingFormatsKey is the attribute Key conforming to the - // "gen_ai.request.encoding_formats" semantic conventions. It represents the - // encoding formats requested in an embeddings operation, if specified. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "base64"], ["float", "binary" - // Note: In some GenAI systems the encoding formats are called embedding types. - // Also, some GenAI systems only accept a single format per request. - GenAIRequestEncodingFormatsKey = attribute.Key("gen_ai.request.encoding_formats") - - // GenAIRequestFrequencyPenaltyKey is the attribute Key conforming to the - // "gen_ai.request.frequency_penalty" semantic conventions. It represents the - // frequency penalty setting for the GenAI request. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0.1 - GenAIRequestFrequencyPenaltyKey = attribute.Key("gen_ai.request.frequency_penalty") - - // GenAIRequestMaxTokensKey is the attribute Key conforming to the - // "gen_ai.request.max_tokens" semantic conventions. It represents the maximum - // number of tokens the model generates for a request. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 100 - GenAIRequestMaxTokensKey = attribute.Key("gen_ai.request.max_tokens") - - // GenAIRequestModelKey is the attribute Key conforming to the - // "gen_ai.request.model" semantic conventions. It represents the name of the - // GenAI model a request is being made to. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: gpt-4 - GenAIRequestModelKey = attribute.Key("gen_ai.request.model") - - // GenAIRequestPresencePenaltyKey is the attribute Key conforming to the - // "gen_ai.request.presence_penalty" semantic conventions. It represents the - // presence penalty setting for the GenAI request. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0.1 - GenAIRequestPresencePenaltyKey = attribute.Key("gen_ai.request.presence_penalty") - - // GenAIRequestSeedKey is the attribute Key conforming to the - // "gen_ai.request.seed" semantic conventions. It represents the requests with - // same seed value more likely to return same result. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 100 - GenAIRequestSeedKey = attribute.Key("gen_ai.request.seed") - - // GenAIRequestStopSequencesKey is the attribute Key conforming to the - // "gen_ai.request.stop_sequences" semantic conventions. It represents the list - // of sequences that the model will use to stop generating further tokens. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "forest", "lived" - GenAIRequestStopSequencesKey = attribute.Key("gen_ai.request.stop_sequences") - - // GenAIRequestTemperatureKey is the attribute Key conforming to the - // "gen_ai.request.temperature" semantic conventions. It represents the - // temperature setting for the GenAI request. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0.0 - GenAIRequestTemperatureKey = attribute.Key("gen_ai.request.temperature") - - // GenAIRequestTopKKey is the attribute Key conforming to the - // "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling - // setting for the GenAI request. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0 - GenAIRequestTopKKey = attribute.Key("gen_ai.request.top_k") - - // GenAIRequestTopPKey is the attribute Key conforming to the - // "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling - // setting for the GenAI request. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1.0 - GenAIRequestTopPKey = attribute.Key("gen_ai.request.top_p") - - // GenAIResponseFinishReasonsKey is the attribute Key conforming to the - // "gen_ai.response.finish_reasons" semantic conventions. It represents the - // array of reasons the model stopped generating tokens, corresponding to each - // generation received. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "stop"], ["stop", "length" - GenAIResponseFinishReasonsKey = attribute.Key("gen_ai.response.finish_reasons") - - // GenAIResponseIDKey is the attribute Key conforming to the - // "gen_ai.response.id" semantic conventions. It represents the unique - // identifier for the completion. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "chatcmpl-123" - GenAIResponseIDKey = attribute.Key("gen_ai.response.id") - - // GenAIResponseModelKey is the attribute Key conforming to the - // "gen_ai.response.model" semantic conventions. It represents the name of the - // model that generated the response. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "gpt-4-0613" - GenAIResponseModelKey = attribute.Key("gen_ai.response.model") - - // GenAISystemInstructionsKey is the attribute Key conforming to the - // "gen_ai.system_instructions" semantic conventions. It represents the system - // message or instructions provided to the GenAI model separately from the chat - // history. - // - // Type: any - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "[\n {\n "type": "text",\n "content": "You are an Agent that greet - // users, always use greetings tool to respond"\n }\n]\n", "[\n {\n "type": - // "text",\n "content": "You are a language translator."\n },\n {\n "type": - // "text",\n "content": "Your mission is to translate text in English to - // French."\n }\n]\n" - // Note: This attribute SHOULD be used when the corresponding provider or API - // allows to provide system instructions or messages separately from the - // chat history. - // - // Instructions that are part of the chat history SHOULD be recorded in - // `gen_ai.input.messages` attribute instead. - // - // Instrumentations MUST follow [System instructions JSON schema]. - // - // When recorded on spans, it MAY be recorded as a JSON string if structured - // format is not supported and SHOULD be recorded in structured form otherwise. - // - // Instrumentations MAY provide a way for users to filter or truncate - // system instructions. - // - // > [!Warning] - // > This attribute may contain sensitive information. - // - // See [Recording content on attributes] - // section for more details. - // - // [System instructions JSON schema]: /docs/gen-ai/gen-ai-system-instructions.json - // [Recording content on attributes]: /docs/gen-ai/gen-ai-spans.md#recording-content-on-attributes - GenAISystemInstructionsKey = attribute.Key("gen_ai.system_instructions") - - // GenAITokenTypeKey is the attribute Key conforming to the "gen_ai.token.type" - // semantic conventions. It represents the type of token being counted. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "input", "output" - GenAITokenTypeKey = attribute.Key("gen_ai.token.type") - - // GenAIToolCallIDKey is the attribute Key conforming to the - // "gen_ai.tool.call.id" semantic conventions. It represents the tool call - // identifier. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "call_mszuSIzqtI65i1wAUOE8w5H4" - GenAIToolCallIDKey = attribute.Key("gen_ai.tool.call.id") - - // GenAIToolDescriptionKey is the attribute Key conforming to the - // "gen_ai.tool.description" semantic conventions. It represents the tool - // description. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Multiply two numbers" - GenAIToolDescriptionKey = attribute.Key("gen_ai.tool.description") - - // GenAIToolNameKey is the attribute Key conforming to the "gen_ai.tool.name" - // semantic conventions. It represents the name of the tool utilized by the - // agent. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Flights" - GenAIToolNameKey = attribute.Key("gen_ai.tool.name") - - // GenAIToolTypeKey is the attribute Key conforming to the "gen_ai.tool.type" - // semantic conventions. It represents the type of the tool utilized by the - // agent. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "function", "extension", "datastore" - // Note: Extension: A tool executed on the agent-side to directly call external - // APIs, bridging the gap between the agent and real-world systems. - // Agent-side operations involve actions that are performed by the agent on the - // server or within the agent's controlled environment. - // Function: A tool executed on the client-side, where the agent generates - // parameters for a predefined function, and the client executes the logic. - // Client-side operations are actions taken on the user's end or within the - // client application. - // Datastore: A tool used by the agent to access and query structured or - // unstructured external data for retrieval-augmented tasks or knowledge - // updates. - GenAIToolTypeKey = attribute.Key("gen_ai.tool.type") - - // GenAIUsageInputTokensKey is the attribute Key conforming to the - // "gen_ai.usage.input_tokens" semantic conventions. It represents the number of - // tokens used in the GenAI input (prompt). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 100 - GenAIUsageInputTokensKey = attribute.Key("gen_ai.usage.input_tokens") - - // GenAIUsageOutputTokensKey is the attribute Key conforming to the - // "gen_ai.usage.output_tokens" semantic conventions. It represents the number - // of tokens used in the GenAI response (completion). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 180 - GenAIUsageOutputTokensKey = attribute.Key("gen_ai.usage.output_tokens") -) - -// GenAIAgentDescription returns an attribute KeyValue conforming to the -// "gen_ai.agent.description" semantic conventions. It represents the free-form -// description of the GenAI agent provided by the application. -func GenAIAgentDescription(val string) attribute.KeyValue { - return GenAIAgentDescriptionKey.String(val) -} - -// GenAIAgentID returns an attribute KeyValue conforming to the "gen_ai.agent.id" -// semantic conventions. It represents the unique identifier of the GenAI agent. -func GenAIAgentID(val string) attribute.KeyValue { - return GenAIAgentIDKey.String(val) -} - -// GenAIAgentName returns an attribute KeyValue conforming to the -// "gen_ai.agent.name" semantic conventions. It represents the human-readable -// name of the GenAI agent provided by the application. -func GenAIAgentName(val string) attribute.KeyValue { - return GenAIAgentNameKey.String(val) -} - -// GenAIConversationID returns an attribute KeyValue conforming to the -// "gen_ai.conversation.id" semantic conventions. It represents the unique -// identifier for a conversation (session, thread), used to store and correlate -// messages within this conversation. -func GenAIConversationID(val string) attribute.KeyValue { - return GenAIConversationIDKey.String(val) -} - -// GenAIDataSourceID returns an attribute KeyValue conforming to the -// "gen_ai.data_source.id" semantic conventions. It represents the data source -// identifier. -func GenAIDataSourceID(val string) attribute.KeyValue { - return GenAIDataSourceIDKey.String(val) -} - -// GenAIRequestChoiceCount returns an attribute KeyValue conforming to the -// "gen_ai.request.choice.count" semantic conventions. It represents the target -// number of candidate completions to return. -func GenAIRequestChoiceCount(val int) attribute.KeyValue { - return GenAIRequestChoiceCountKey.Int(val) -} - -// GenAIRequestEncodingFormats returns an attribute KeyValue conforming to the -// "gen_ai.request.encoding_formats" semantic conventions. It represents the -// encoding formats requested in an embeddings operation, if specified. -func GenAIRequestEncodingFormats(val ...string) attribute.KeyValue { - return GenAIRequestEncodingFormatsKey.StringSlice(val) -} - -// GenAIRequestFrequencyPenalty returns an attribute KeyValue conforming to the -// "gen_ai.request.frequency_penalty" semantic conventions. It represents the -// frequency penalty setting for the GenAI request. -func GenAIRequestFrequencyPenalty(val float64) attribute.KeyValue { - return GenAIRequestFrequencyPenaltyKey.Float64(val) -} - -// GenAIRequestMaxTokens returns an attribute KeyValue conforming to the -// "gen_ai.request.max_tokens" semantic conventions. It represents the maximum -// number of tokens the model generates for a request. -func GenAIRequestMaxTokens(val int) attribute.KeyValue { - return GenAIRequestMaxTokensKey.Int(val) -} - -// GenAIRequestModel returns an attribute KeyValue conforming to the -// "gen_ai.request.model" semantic conventions. It represents the name of the -// GenAI model a request is being made to. -func GenAIRequestModel(val string) attribute.KeyValue { - return GenAIRequestModelKey.String(val) -} - -// GenAIRequestPresencePenalty returns an attribute KeyValue conforming to the -// "gen_ai.request.presence_penalty" semantic conventions. It represents the -// presence penalty setting for the GenAI request. -func GenAIRequestPresencePenalty(val float64) attribute.KeyValue { - return GenAIRequestPresencePenaltyKey.Float64(val) -} - -// GenAIRequestSeed returns an attribute KeyValue conforming to the -// "gen_ai.request.seed" semantic conventions. It represents the requests with -// same seed value more likely to return same result. -func GenAIRequestSeed(val int) attribute.KeyValue { - return GenAIRequestSeedKey.Int(val) -} - -// GenAIRequestStopSequences returns an attribute KeyValue conforming to the -// "gen_ai.request.stop_sequences" semantic conventions. It represents the list -// of sequences that the model will use to stop generating further tokens. -func GenAIRequestStopSequences(val ...string) attribute.KeyValue { - return GenAIRequestStopSequencesKey.StringSlice(val) -} - -// GenAIRequestTemperature returns an attribute KeyValue conforming to the -// "gen_ai.request.temperature" semantic conventions. It represents the -// temperature setting for the GenAI request. -func GenAIRequestTemperature(val float64) attribute.KeyValue { - return GenAIRequestTemperatureKey.Float64(val) -} - -// GenAIRequestTopK returns an attribute KeyValue conforming to the -// "gen_ai.request.top_k" semantic conventions. It represents the top_k sampling -// setting for the GenAI request. -func GenAIRequestTopK(val float64) attribute.KeyValue { - return GenAIRequestTopKKey.Float64(val) -} - -// GenAIRequestTopP returns an attribute KeyValue conforming to the -// "gen_ai.request.top_p" semantic conventions. It represents the top_p sampling -// setting for the GenAI request. -func GenAIRequestTopP(val float64) attribute.KeyValue { - return GenAIRequestTopPKey.Float64(val) -} - -// GenAIResponseFinishReasons returns an attribute KeyValue conforming to the -// "gen_ai.response.finish_reasons" semantic conventions. It represents the array -// of reasons the model stopped generating tokens, corresponding to each -// generation received. -func GenAIResponseFinishReasons(val ...string) attribute.KeyValue { - return GenAIResponseFinishReasonsKey.StringSlice(val) -} - -// GenAIResponseID returns an attribute KeyValue conforming to the -// "gen_ai.response.id" semantic conventions. It represents the unique identifier -// for the completion. -func GenAIResponseID(val string) attribute.KeyValue { - return GenAIResponseIDKey.String(val) -} - -// GenAIResponseModel returns an attribute KeyValue conforming to the -// "gen_ai.response.model" semantic conventions. It represents the name of the -// model that generated the response. -func GenAIResponseModel(val string) attribute.KeyValue { - return GenAIResponseModelKey.String(val) -} - -// GenAIToolCallID returns an attribute KeyValue conforming to the -// "gen_ai.tool.call.id" semantic conventions. It represents the tool call -// identifier. -func GenAIToolCallID(val string) attribute.KeyValue { - return GenAIToolCallIDKey.String(val) -} - -// GenAIToolDescription returns an attribute KeyValue conforming to the -// "gen_ai.tool.description" semantic conventions. It represents the tool -// description. -func GenAIToolDescription(val string) attribute.KeyValue { - return GenAIToolDescriptionKey.String(val) -} - -// GenAIToolName returns an attribute KeyValue conforming to the -// "gen_ai.tool.name" semantic conventions. It represents the name of the tool -// utilized by the agent. -func GenAIToolName(val string) attribute.KeyValue { - return GenAIToolNameKey.String(val) -} - -// GenAIToolType returns an attribute KeyValue conforming to the -// "gen_ai.tool.type" semantic conventions. It represents the type of the tool -// utilized by the agent. -func GenAIToolType(val string) attribute.KeyValue { - return GenAIToolTypeKey.String(val) -} - -// GenAIUsageInputTokens returns an attribute KeyValue conforming to the -// "gen_ai.usage.input_tokens" semantic conventions. It represents the number of -// tokens used in the GenAI input (prompt). -func GenAIUsageInputTokens(val int) attribute.KeyValue { - return GenAIUsageInputTokensKey.Int(val) -} - -// GenAIUsageOutputTokens returns an attribute KeyValue conforming to the -// "gen_ai.usage.output_tokens" semantic conventions. It represents the number of -// tokens used in the GenAI response (completion). -func GenAIUsageOutputTokens(val int) attribute.KeyValue { - return GenAIUsageOutputTokensKey.Int(val) -} - -// Enum values for gen_ai.operation.name -var ( - // Chat completion operation such as [OpenAI Chat API] - // Stability: development - // - // [OpenAI Chat API]: https://platform.openai.com/docs/api-reference/chat - GenAIOperationNameChat = GenAIOperationNameKey.String("chat") - // Multimodal content generation operation such as [Gemini Generate Content] - // Stability: development - // - // [Gemini Generate Content]: https://ai.google.dev/api/generate-content - GenAIOperationNameGenerateContent = GenAIOperationNameKey.String("generate_content") - // Text completions operation such as [OpenAI Completions API (Legacy)] - // Stability: development - // - // [OpenAI Completions API (Legacy)]: https://platform.openai.com/docs/api-reference/completions - GenAIOperationNameTextCompletion = GenAIOperationNameKey.String("text_completion") - // Embeddings operation such as [OpenAI Create embeddings API] - // Stability: development - // - // [OpenAI Create embeddings API]: https://platform.openai.com/docs/api-reference/embeddings/create - GenAIOperationNameEmbeddings = GenAIOperationNameKey.String("embeddings") - // Create GenAI agent - // Stability: development - GenAIOperationNameCreateAgent = GenAIOperationNameKey.String("create_agent") - // Invoke GenAI agent - // Stability: development - GenAIOperationNameInvokeAgent = GenAIOperationNameKey.String("invoke_agent") - // Execute a tool - // Stability: development - GenAIOperationNameExecuteTool = GenAIOperationNameKey.String("execute_tool") -) - -// Enum values for gen_ai.output.type -var ( - // Plain text - // Stability: development - GenAIOutputTypeText = GenAIOutputTypeKey.String("text") - // JSON object with known or unknown schema - // Stability: development - GenAIOutputTypeJSON = GenAIOutputTypeKey.String("json") - // Image - // Stability: development - GenAIOutputTypeImage = GenAIOutputTypeKey.String("image") - // Speech - // Stability: development - GenAIOutputTypeSpeech = GenAIOutputTypeKey.String("speech") -) - -// Enum values for gen_ai.provider.name -var ( - // [OpenAI] - // Stability: development - // - // [OpenAI]: https://openai.com/ - GenAIProviderNameOpenAI = GenAIProviderNameKey.String("openai") - // Any Google generative AI endpoint - // Stability: development - GenAIProviderNameGCPGenAI = GenAIProviderNameKey.String("gcp.gen_ai") - // [Vertex AI] - // Stability: development - // - // [Vertex AI]: https://cloud.google.com/vertex-ai - GenAIProviderNameGCPVertexAI = GenAIProviderNameKey.String("gcp.vertex_ai") - // [Gemini] - // Stability: development - // - // [Gemini]: https://cloud.google.com/products/gemini - GenAIProviderNameGCPGemini = GenAIProviderNameKey.String("gcp.gemini") - // [Anthropic] - // Stability: development - // - // [Anthropic]: https://www.anthropic.com/ - GenAIProviderNameAnthropic = GenAIProviderNameKey.String("anthropic") - // [Cohere] - // Stability: development - // - // [Cohere]: https://cohere.com/ - GenAIProviderNameCohere = GenAIProviderNameKey.String("cohere") - // Azure AI Inference - // Stability: development - GenAIProviderNameAzureAIInference = GenAIProviderNameKey.String("azure.ai.inference") - // [Azure OpenAI] - // Stability: development - // - // [Azure OpenAI]: https://azure.microsoft.com/products/ai-services/openai-service/ - GenAIProviderNameAzureAIOpenAI = GenAIProviderNameKey.String("azure.ai.openai") - // [IBM Watsonx AI] - // Stability: development - // - // [IBM Watsonx AI]: https://www.ibm.com/products/watsonx-ai - GenAIProviderNameIBMWatsonxAI = GenAIProviderNameKey.String("ibm.watsonx.ai") - // [AWS Bedrock] - // Stability: development - // - // [AWS Bedrock]: https://aws.amazon.com/bedrock - GenAIProviderNameAWSBedrock = GenAIProviderNameKey.String("aws.bedrock") - // [Perplexity] - // Stability: development - // - // [Perplexity]: https://www.perplexity.ai/ - GenAIProviderNamePerplexity = GenAIProviderNameKey.String("perplexity") - // [xAI] - // Stability: development - // - // [xAI]: https://x.ai/ - GenAIProviderNameXAI = GenAIProviderNameKey.String("x_ai") - // [DeepSeek] - // Stability: development - // - // [DeepSeek]: https://www.deepseek.com/ - GenAIProviderNameDeepseek = GenAIProviderNameKey.String("deepseek") - // [Groq] - // Stability: development - // - // [Groq]: https://groq.com/ - GenAIProviderNameGroq = GenAIProviderNameKey.String("groq") - // [Mistral AI] - // Stability: development - // - // [Mistral AI]: https://mistral.ai/ - GenAIProviderNameMistralAI = GenAIProviderNameKey.String("mistral_ai") -) - -// Enum values for gen_ai.token.type -var ( - // Input tokens (prompt, input, etc.) - // Stability: development - GenAITokenTypeInput = GenAITokenTypeKey.String("input") - // Output tokens (completion, response, etc.) - // Stability: development - GenAITokenTypeOutput = GenAITokenTypeKey.String("output") -) - -// Namespace: geo -const ( - // GeoContinentCodeKey is the attribute Key conforming to the - // "geo.continent.code" semantic conventions. It represents the two-letter code - // representing continent’s name. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - GeoContinentCodeKey = attribute.Key("geo.continent.code") - - // GeoCountryISOCodeKey is the attribute Key conforming to the - // "geo.country.iso_code" semantic conventions. It represents the two-letter ISO - // Country Code ([ISO 3166-1 alpha2]). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CA" - // - // [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes - GeoCountryISOCodeKey = attribute.Key("geo.country.iso_code") - - // GeoLocalityNameKey is the attribute Key conforming to the "geo.locality.name" - // semantic conventions. It represents the locality name. Represents the name of - // a city, town, village, or similar populated place. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Montreal", "Berlin" - GeoLocalityNameKey = attribute.Key("geo.locality.name") - - // GeoLocationLatKey is the attribute Key conforming to the "geo.location.lat" - // semantic conventions. It represents the latitude of the geo location in - // [WGS84]. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 45.505918 - // - // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 - GeoLocationLatKey = attribute.Key("geo.location.lat") - - // GeoLocationLonKey is the attribute Key conforming to the "geo.location.lon" - // semantic conventions. It represents the longitude of the geo location in - // [WGS84]. - // - // Type: double - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: -73.61483 - // - // [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 - GeoLocationLonKey = attribute.Key("geo.location.lon") - - // GeoPostalCodeKey is the attribute Key conforming to the "geo.postal_code" - // semantic conventions. It represents the postal code associated with the - // location. Values appropriate for this field may also be known as a postcode - // or ZIP code and will vary widely from country to country. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "94040" - GeoPostalCodeKey = attribute.Key("geo.postal_code") - - // GeoRegionISOCodeKey is the attribute Key conforming to the - // "geo.region.iso_code" semantic conventions. It represents the region ISO code - // ([ISO 3166-2]). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CA-QC" - // - // [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 - GeoRegionISOCodeKey = attribute.Key("geo.region.iso_code") -) - -// GeoCountryISOCode returns an attribute KeyValue conforming to the -// "geo.country.iso_code" semantic conventions. It represents the two-letter ISO -// Country Code ([ISO 3166-1 alpha2]). -// -// [ISO 3166-1 alpha2]: https://wikipedia.org/wiki/ISO_3166-1#Codes -func GeoCountryISOCode(val string) attribute.KeyValue { - return GeoCountryISOCodeKey.String(val) -} - -// GeoLocalityName returns an attribute KeyValue conforming to the -// "geo.locality.name" semantic conventions. It represents the locality name. -// Represents the name of a city, town, village, or similar populated place. -func GeoLocalityName(val string) attribute.KeyValue { - return GeoLocalityNameKey.String(val) -} - -// GeoLocationLat returns an attribute KeyValue conforming to the -// "geo.location.lat" semantic conventions. It represents the latitude of the geo -// location in [WGS84]. -// -// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 -func GeoLocationLat(val float64) attribute.KeyValue { - return GeoLocationLatKey.Float64(val) -} - -// GeoLocationLon returns an attribute KeyValue conforming to the -// "geo.location.lon" semantic conventions. It represents the longitude of the -// geo location in [WGS84]. -// -// [WGS84]: https://wikipedia.org/wiki/World_Geodetic_System#WGS84 -func GeoLocationLon(val float64) attribute.KeyValue { - return GeoLocationLonKey.Float64(val) -} - -// GeoPostalCode returns an attribute KeyValue conforming to the -// "geo.postal_code" semantic conventions. It represents the postal code -// associated with the location. Values appropriate for this field may also be -// known as a postcode or ZIP code and will vary widely from country to country. -func GeoPostalCode(val string) attribute.KeyValue { - return GeoPostalCodeKey.String(val) -} - -// GeoRegionISOCode returns an attribute KeyValue conforming to the -// "geo.region.iso_code" semantic conventions. It represents the region ISO code -// ([ISO 3166-2]). -// -// [ISO 3166-2]: https://wikipedia.org/wiki/ISO_3166-2 -func GeoRegionISOCode(val string) attribute.KeyValue { - return GeoRegionISOCodeKey.String(val) -} - -// Enum values for geo.continent.code -var ( - // Africa - // Stability: development - GeoContinentCodeAf = GeoContinentCodeKey.String("AF") - // Antarctica - // Stability: development - GeoContinentCodeAn = GeoContinentCodeKey.String("AN") - // Asia - // Stability: development - GeoContinentCodeAs = GeoContinentCodeKey.String("AS") - // Europe - // Stability: development - GeoContinentCodeEu = GeoContinentCodeKey.String("EU") - // North America - // Stability: development - GeoContinentCodeNa = GeoContinentCodeKey.String("NA") - // Oceania - // Stability: development - GeoContinentCodeOc = GeoContinentCodeKey.String("OC") - // South America - // Stability: development - GeoContinentCodeSa = GeoContinentCodeKey.String("SA") -) - -// Namespace: go -const ( - // GoMemoryTypeKey is the attribute Key conforming to the "go.memory.type" - // semantic conventions. It represents the type of memory. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "other", "stack" - GoMemoryTypeKey = attribute.Key("go.memory.type") -) - -// Enum values for go.memory.type -var ( - // Memory allocated from the heap that is reserved for stack space, whether or - // not it is currently in-use. - // Stability: development - GoMemoryTypeStack = GoMemoryTypeKey.String("stack") - // Memory used by the Go runtime, excluding other categories of memory usage - // described in this enumeration. - // Stability: development - GoMemoryTypeOther = GoMemoryTypeKey.String("other") -) - -// Namespace: graphql -const ( - // GraphQLDocumentKey is the attribute Key conforming to the "graphql.document" - // semantic conventions. It represents the GraphQL document being executed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: query findBookById { bookById(id: ?) { name } } - // Note: The value may be sanitized to exclude sensitive information. - GraphQLDocumentKey = attribute.Key("graphql.document") - - // GraphQLOperationNameKey is the attribute Key conforming to the - // "graphql.operation.name" semantic conventions. It represents the name of the - // operation being executed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: findBookById - GraphQLOperationNameKey = attribute.Key("graphql.operation.name") - - // GraphQLOperationTypeKey is the attribute Key conforming to the - // "graphql.operation.type" semantic conventions. It represents the type of the - // operation being executed. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "query", "mutation", "subscription" - GraphQLOperationTypeKey = attribute.Key("graphql.operation.type") -) - -// GraphQLDocument returns an attribute KeyValue conforming to the -// "graphql.document" semantic conventions. It represents the GraphQL document -// being executed. -func GraphQLDocument(val string) attribute.KeyValue { - return GraphQLDocumentKey.String(val) -} - -// GraphQLOperationName returns an attribute KeyValue conforming to the -// "graphql.operation.name" semantic conventions. It represents the name of the -// operation being executed. -func GraphQLOperationName(val string) attribute.KeyValue { - return GraphQLOperationNameKey.String(val) -} - -// Enum values for graphql.operation.type -var ( - // GraphQL query - // Stability: development - GraphQLOperationTypeQuery = GraphQLOperationTypeKey.String("query") - // GraphQL mutation - // Stability: development - GraphQLOperationTypeMutation = GraphQLOperationTypeKey.String("mutation") - // GraphQL subscription - // Stability: development - GraphQLOperationTypeSubscription = GraphQLOperationTypeKey.String("subscription") -) - -// Namespace: heroku -const ( - // HerokuAppIDKey is the attribute Key conforming to the "heroku.app.id" - // semantic conventions. It represents the unique identifier for the - // application. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2daa2797-e42b-4624-9322-ec3f968df4da" - HerokuAppIDKey = attribute.Key("heroku.app.id") - - // HerokuReleaseCommitKey is the attribute Key conforming to the - // "heroku.release.commit" semantic conventions. It represents the commit hash - // for the current release. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "e6134959463efd8966b20e75b913cafe3f5ec" - HerokuReleaseCommitKey = attribute.Key("heroku.release.commit") - - // HerokuReleaseCreationTimestampKey is the attribute Key conforming to the - // "heroku.release.creation_timestamp" semantic conventions. It represents the - // time and date the release was created. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2022-10-23T18:00:42Z" - HerokuReleaseCreationTimestampKey = attribute.Key("heroku.release.creation_timestamp") -) - -// HerokuAppID returns an attribute KeyValue conforming to the "heroku.app.id" -// semantic conventions. It represents the unique identifier for the application. -func HerokuAppID(val string) attribute.KeyValue { - return HerokuAppIDKey.String(val) -} - -// HerokuReleaseCommit returns an attribute KeyValue conforming to the -// "heroku.release.commit" semantic conventions. It represents the commit hash -// for the current release. -func HerokuReleaseCommit(val string) attribute.KeyValue { - return HerokuReleaseCommitKey.String(val) -} - -// HerokuReleaseCreationTimestamp returns an attribute KeyValue conforming to the -// "heroku.release.creation_timestamp" semantic conventions. It represents the -// time and date the release was created. -func HerokuReleaseCreationTimestamp(val string) attribute.KeyValue { - return HerokuReleaseCreationTimestampKey.String(val) -} - -// Namespace: host -const ( - // HostArchKey is the attribute Key conforming to the "host.arch" semantic - // conventions. It represents the CPU architecture the host system is running - // on. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HostArchKey = attribute.Key("host.arch") - - // HostCPUCacheL2SizeKey is the attribute Key conforming to the - // "host.cpu.cache.l2.size" semantic conventions. It represents the amount of - // level 2 memory cache available to the processor (in Bytes). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 12288000 - HostCPUCacheL2SizeKey = attribute.Key("host.cpu.cache.l2.size") - - // HostCPUFamilyKey is the attribute Key conforming to the "host.cpu.family" - // semantic conventions. It represents the family or generation of the CPU. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "6", "PA-RISC 1.1e" - HostCPUFamilyKey = attribute.Key("host.cpu.family") - - // HostCPUModelIDKey is the attribute Key conforming to the "host.cpu.model.id" - // semantic conventions. It represents the model identifier. It provides more - // granular information about the CPU, distinguishing it from other CPUs within - // the same family. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "6", "9000/778/B180L" - HostCPUModelIDKey = attribute.Key("host.cpu.model.id") - - // HostCPUModelNameKey is the attribute Key conforming to the - // "host.cpu.model.name" semantic conventions. It represents the model - // designation of the processor. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz" - HostCPUModelNameKey = attribute.Key("host.cpu.model.name") - - // HostCPUSteppingKey is the attribute Key conforming to the "host.cpu.stepping" - // semantic conventions. It represents the stepping or core revisions. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1", "r1p1" - HostCPUSteppingKey = attribute.Key("host.cpu.stepping") - - // HostCPUVendorIDKey is the attribute Key conforming to the - // "host.cpu.vendor.id" semantic conventions. It represents the processor - // manufacturer identifier. A maximum 12-character string. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "GenuineIntel" - // Note: [CPUID] command returns the vendor ID string in EBX, EDX and ECX - // registers. Writing these to memory in this order results in a 12-character - // string. - // - // [CPUID]: https://wiki.osdev.org/CPUID - HostCPUVendorIDKey = attribute.Key("host.cpu.vendor.id") - - // HostIDKey is the attribute Key conforming to the "host.id" semantic - // conventions. It represents the unique host ID. For Cloud, this must be the - // instance_id assigned by the cloud provider. For non-containerized systems, - // this should be the `machine-id`. See the table below for the sources to use - // to determine the `machine-id` based on operating system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "fdbf79e8af94cb7f9e8df36789187052" - HostIDKey = attribute.Key("host.id") - - // HostImageIDKey is the attribute Key conforming to the "host.image.id" - // semantic conventions. It represents the VM image ID or host OS image ID. For - // Cloud, this value is from the provider. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ami-07b06b442921831e5" - HostImageIDKey = attribute.Key("host.image.id") - - // HostImageNameKey is the attribute Key conforming to the "host.image.name" - // semantic conventions. It represents the name of the VM image or OS install - // the host was instantiated from. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "infra-ami-eks-worker-node-7d4ec78312", "CentOS-8-x86_64-1905" - HostImageNameKey = attribute.Key("host.image.name") - - // HostImageVersionKey is the attribute Key conforming to the - // "host.image.version" semantic conventions. It represents the version string - // of the VM image or host OS as defined in [Version Attributes]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0.1" - // - // [Version Attributes]: /docs/resource/README.md#version-attributes - HostImageVersionKey = attribute.Key("host.image.version") - - // HostIPKey is the attribute Key conforming to the "host.ip" semantic - // conventions. It represents the available IP addresses of the host, excluding - // loopback interfaces. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "192.168.1.140", "fe80::abc2:4a28:737a:609e" - // Note: IPv4 Addresses MUST be specified in dotted-quad notation. IPv6 - // addresses MUST be specified in the [RFC 5952] format. - // - // [RFC 5952]: https://www.rfc-editor.org/rfc/rfc5952.html - HostIPKey = attribute.Key("host.ip") - - // HostMacKey is the attribute Key conforming to the "host.mac" semantic - // conventions. It represents the available MAC addresses of the host, excluding - // loopback interfaces. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "AC-DE-48-23-45-67", "AC-DE-48-23-45-67-01-9F" - // Note: MAC Addresses MUST be represented in [IEEE RA hexadecimal form]: as - // hyphen-separated octets in uppercase hexadecimal form from most to least - // significant. - // - // [IEEE RA hexadecimal form]: https://standards.ieee.org/wp-content/uploads/import/documents/tutorials/eui.pdf - HostMacKey = attribute.Key("host.mac") - - // HostNameKey is the attribute Key conforming to the "host.name" semantic - // conventions. It represents the name of the host. On Unix systems, it may - // contain what the hostname command returns, or the fully qualified hostname, - // or another name specified by the user. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry-test" - HostNameKey = attribute.Key("host.name") - - // HostTypeKey is the attribute Key conforming to the "host.type" semantic - // conventions. It represents the type of host. For Cloud, this must be the - // machine type. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "n1-standard-1" - HostTypeKey = attribute.Key("host.type") -) - -// HostCPUCacheL2Size returns an attribute KeyValue conforming to the -// "host.cpu.cache.l2.size" semantic conventions. It represents the amount of -// level 2 memory cache available to the processor (in Bytes). -func HostCPUCacheL2Size(val int) attribute.KeyValue { - return HostCPUCacheL2SizeKey.Int(val) -} - -// HostCPUFamily returns an attribute KeyValue conforming to the -// "host.cpu.family" semantic conventions. It represents the family or generation -// of the CPU. -func HostCPUFamily(val string) attribute.KeyValue { - return HostCPUFamilyKey.String(val) -} - -// HostCPUModelID returns an attribute KeyValue conforming to the -// "host.cpu.model.id" semantic conventions. It represents the model identifier. -// It provides more granular information about the CPU, distinguishing it from -// other CPUs within the same family. -func HostCPUModelID(val string) attribute.KeyValue { - return HostCPUModelIDKey.String(val) -} - -// HostCPUModelName returns an attribute KeyValue conforming to the -// "host.cpu.model.name" semantic conventions. It represents the model -// designation of the processor. -func HostCPUModelName(val string) attribute.KeyValue { - return HostCPUModelNameKey.String(val) -} - -// HostCPUStepping returns an attribute KeyValue conforming to the -// "host.cpu.stepping" semantic conventions. It represents the stepping or core -// revisions. -func HostCPUStepping(val string) attribute.KeyValue { - return HostCPUSteppingKey.String(val) -} - -// HostCPUVendorID returns an attribute KeyValue conforming to the -// "host.cpu.vendor.id" semantic conventions. It represents the processor -// manufacturer identifier. A maximum 12-character string. -func HostCPUVendorID(val string) attribute.KeyValue { - return HostCPUVendorIDKey.String(val) -} - -// HostID returns an attribute KeyValue conforming to the "host.id" semantic -// conventions. It represents the unique host ID. For Cloud, this must be the -// instance_id assigned by the cloud provider. For non-containerized systems, -// this should be the `machine-id`. See the table below for the sources to use to -// determine the `machine-id` based on operating system. -func HostID(val string) attribute.KeyValue { - return HostIDKey.String(val) -} - -// HostImageID returns an attribute KeyValue conforming to the "host.image.id" -// semantic conventions. It represents the VM image ID or host OS image ID. For -// Cloud, this value is from the provider. -func HostImageID(val string) attribute.KeyValue { - return HostImageIDKey.String(val) -} - -// HostImageName returns an attribute KeyValue conforming to the -// "host.image.name" semantic conventions. It represents the name of the VM image -// or OS install the host was instantiated from. -func HostImageName(val string) attribute.KeyValue { - return HostImageNameKey.String(val) -} - -// HostImageVersion returns an attribute KeyValue conforming to the -// "host.image.version" semantic conventions. It represents the version string of -// the VM image or host OS as defined in [Version Attributes]. -// -// [Version Attributes]: /docs/resource/README.md#version-attributes -func HostImageVersion(val string) attribute.KeyValue { - return HostImageVersionKey.String(val) -} - -// HostIP returns an attribute KeyValue conforming to the "host.ip" semantic -// conventions. It represents the available IP addresses of the host, excluding -// loopback interfaces. -func HostIP(val ...string) attribute.KeyValue { - return HostIPKey.StringSlice(val) -} - -// HostMac returns an attribute KeyValue conforming to the "host.mac" semantic -// conventions. It represents the available MAC addresses of the host, excluding -// loopback interfaces. -func HostMac(val ...string) attribute.KeyValue { - return HostMacKey.StringSlice(val) -} - -// HostName returns an attribute KeyValue conforming to the "host.name" semantic -// conventions. It represents the name of the host. On Unix systems, it may -// contain what the hostname command returns, or the fully qualified hostname, or -// another name specified by the user. -func HostName(val string) attribute.KeyValue { - return HostNameKey.String(val) -} - -// HostType returns an attribute KeyValue conforming to the "host.type" semantic -// conventions. It represents the type of host. For Cloud, this must be the -// machine type. -func HostType(val string) attribute.KeyValue { - return HostTypeKey.String(val) -} - -// Enum values for host.arch -var ( - // AMD64 - // Stability: development - HostArchAMD64 = HostArchKey.String("amd64") - // ARM32 - // Stability: development - HostArchARM32 = HostArchKey.String("arm32") - // ARM64 - // Stability: development - HostArchARM64 = HostArchKey.String("arm64") - // Itanium - // Stability: development - HostArchIA64 = HostArchKey.String("ia64") - // 32-bit PowerPC - // Stability: development - HostArchPPC32 = HostArchKey.String("ppc32") - // 64-bit PowerPC - // Stability: development - HostArchPPC64 = HostArchKey.String("ppc64") - // IBM z/Architecture - // Stability: development - HostArchS390x = HostArchKey.String("s390x") - // 32-bit x86 - // Stability: development - HostArchX86 = HostArchKey.String("x86") -) - -// Namespace: http -const ( - // HTTPConnectionStateKey is the attribute Key conforming to the - // "http.connection.state" semantic conventions. It represents the state of the - // HTTP connection in the HTTP connection pool. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "active", "idle" - HTTPConnectionStateKey = attribute.Key("http.connection.state") - - // HTTPRequestBodySizeKey is the attribute Key conforming to the - // "http.request.body.size" semantic conventions. It represents the size of the - // request payload body in bytes. This is the number of bytes transferred - // excluding headers and is often, but not always, present as the - // [Content-Length] header. For requests using transport encoding, this should - // be the compressed size. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length - HTTPRequestBodySizeKey = attribute.Key("http.request.body.size") - - // HTTPRequestMethodKey is the attribute Key conforming to the - // "http.request.method" semantic conventions. It represents the HTTP request - // method. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "GET", "POST", "HEAD" - // Note: HTTP request method value SHOULD be "known" to the instrumentation. - // By default, this convention defines "known" methods as the ones listed in - // [RFC9110] - // and the PATCH method defined in [RFC5789]. - // - // If the HTTP request method is not known to instrumentation, it MUST set the - // `http.request.method` attribute to `_OTHER`. - // - // If the HTTP instrumentation could end up converting valid HTTP request - // methods to `_OTHER`, then it MUST provide a way to override - // the list of known HTTP methods. If this override is done via environment - // variable, then the environment variable MUST be named - // OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of - // case-sensitive known HTTP methods - // (this list MUST be a full override of the default known method, it is not a - // list of known methods in addition to the defaults). - // - // HTTP method names are case-sensitive and `http.request.method` attribute - // value MUST match a known HTTP method name exactly. - // Instrumentations for specific web frameworks that consider HTTP methods to be - // case insensitive, SHOULD populate a canonical equivalent. - // Tracing instrumentations that do so, MUST also set - // `http.request.method_original` to the original value. - // - // [RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html#name-methods - // [RFC5789]: https://www.rfc-editor.org/rfc/rfc5789.html - HTTPRequestMethodKey = attribute.Key("http.request.method") - - // HTTPRequestMethodOriginalKey is the attribute Key conforming to the - // "http.request.method_original" semantic conventions. It represents the - // original HTTP method sent by the client in the request line. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "GeT", "ACL", "foo" - HTTPRequestMethodOriginalKey = attribute.Key("http.request.method_original") - - // HTTPRequestResendCountKey is the attribute Key conforming to the - // "http.request.resend_count" semantic conventions. It represents the ordinal - // number of request resending attempt (for any reason, including redirects). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Note: The resend count SHOULD be updated each time an HTTP request gets - // resent by the client, regardless of what was the cause of the resending (e.g. - // redirection, authorization failure, 503 Server Unavailable, network issues, - // or any other). - HTTPRequestResendCountKey = attribute.Key("http.request.resend_count") - - // HTTPRequestSizeKey is the attribute Key conforming to the "http.request.size" - // semantic conventions. It represents the total size of the request in bytes. - // This should be the total number of bytes sent over the wire, including the - // request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, and request - // body if any. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - HTTPRequestSizeKey = attribute.Key("http.request.size") - - // HTTPResponseBodySizeKey is the attribute Key conforming to the - // "http.response.body.size" semantic conventions. It represents the size of the - // response payload body in bytes. This is the number of bytes transferred - // excluding headers and is often, but not always, present as the - // [Content-Length] header. For requests using transport encoding, this should - // be the compressed size. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length - HTTPResponseBodySizeKey = attribute.Key("http.response.body.size") - - // HTTPResponseSizeKey is the attribute Key conforming to the - // "http.response.size" semantic conventions. It represents the total size of - // the response in bytes. This should be the total number of bytes sent over the - // wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), - // headers, and response body and trailers if any. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - HTTPResponseSizeKey = attribute.Key("http.response.size") - - // HTTPResponseStatusCodeKey is the attribute Key conforming to the - // "http.response.status_code" semantic conventions. It represents the - // [HTTP response status code]. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 200 - // - // [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 - HTTPResponseStatusCodeKey = attribute.Key("http.response.status_code") - - // HTTPRouteKey is the attribute Key conforming to the "http.route" semantic - // conventions. It represents the matched route, that is, the path template in - // the format used by the respective server framework. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "/users/:userID?", "{controller}/{action}/{id?}" - // Note: MUST NOT be populated when this is not supported by the HTTP server - // framework as the route attribute should have low-cardinality and the URI path - // can NOT substitute it. - // SHOULD include the [application root] if there is one. - // - // [application root]: /docs/http/http-spans.md#http-server-definitions - HTTPRouteKey = attribute.Key("http.route") -) - -// HTTPRequestBodySize returns an attribute KeyValue conforming to the -// "http.request.body.size" semantic conventions. It represents the size of the -// request payload body in bytes. This is the number of bytes transferred -// excluding headers and is often, but not always, present as the -// [Content-Length] header. For requests using transport encoding, this should be -// the compressed size. -// -// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length -func HTTPRequestBodySize(val int) attribute.KeyValue { - return HTTPRequestBodySizeKey.Int(val) -} - -// HTTPRequestHeader returns an attribute KeyValue conforming to the -// "http.request.header" semantic conventions. It represents the HTTP request -// headers, `` being the normalized HTTP Header name (lowercase), the value -// being the header values. -func HTTPRequestHeader(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("http.request.header."+key, val) -} - -// HTTPRequestMethodOriginal returns an attribute KeyValue conforming to the -// "http.request.method_original" semantic conventions. It represents the -// original HTTP method sent by the client in the request line. -func HTTPRequestMethodOriginal(val string) attribute.KeyValue { - return HTTPRequestMethodOriginalKey.String(val) -} - -// HTTPRequestResendCount returns an attribute KeyValue conforming to the -// "http.request.resend_count" semantic conventions. It represents the ordinal -// number of request resending attempt (for any reason, including redirects). -func HTTPRequestResendCount(val int) attribute.KeyValue { - return HTTPRequestResendCountKey.Int(val) -} - -// HTTPRequestSize returns an attribute KeyValue conforming to the -// "http.request.size" semantic conventions. It represents the total size of the -// request in bytes. This should be the total number of bytes sent over the wire, -// including the request line (HTTP/1.1), framing (HTTP/2 and HTTP/3), headers, -// and request body if any. -func HTTPRequestSize(val int) attribute.KeyValue { - return HTTPRequestSizeKey.Int(val) -} - -// HTTPResponseBodySize returns an attribute KeyValue conforming to the -// "http.response.body.size" semantic conventions. It represents the size of the -// response payload body in bytes. This is the number of bytes transferred -// excluding headers and is often, but not always, present as the -// [Content-Length] header. For requests using transport encoding, this should be -// the compressed size. -// -// [Content-Length]: https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length -func HTTPResponseBodySize(val int) attribute.KeyValue { - return HTTPResponseBodySizeKey.Int(val) -} - -// HTTPResponseHeader returns an attribute KeyValue conforming to the -// "http.response.header" semantic conventions. It represents the HTTP response -// headers, `` being the normalized HTTP Header name (lowercase), the value -// being the header values. -func HTTPResponseHeader(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("http.response.header."+key, val) -} - -// HTTPResponseSize returns an attribute KeyValue conforming to the -// "http.response.size" semantic conventions. It represents the total size of the -// response in bytes. This should be the total number of bytes sent over the -// wire, including the status line (HTTP/1.1), framing (HTTP/2 and HTTP/3), -// headers, and response body and trailers if any. -func HTTPResponseSize(val int) attribute.KeyValue { - return HTTPResponseSizeKey.Int(val) -} - -// HTTPResponseStatusCode returns an attribute KeyValue conforming to the -// "http.response.status_code" semantic conventions. It represents the -// [HTTP response status code]. -// -// [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 -func HTTPResponseStatusCode(val int) attribute.KeyValue { - return HTTPResponseStatusCodeKey.Int(val) -} - -// HTTPRoute returns an attribute KeyValue conforming to the "http.route" -// semantic conventions. It represents the matched route, that is, the path -// template in the format used by the respective server framework. -func HTTPRoute(val string) attribute.KeyValue { - return HTTPRouteKey.String(val) -} - -// Enum values for http.connection.state -var ( - // active state. - // Stability: development - HTTPConnectionStateActive = HTTPConnectionStateKey.String("active") - // idle state. - // Stability: development - HTTPConnectionStateIdle = HTTPConnectionStateKey.String("idle") -) - -// Enum values for http.request.method -var ( - // CONNECT method. - // Stability: stable - HTTPRequestMethodConnect = HTTPRequestMethodKey.String("CONNECT") - // DELETE method. - // Stability: stable - HTTPRequestMethodDelete = HTTPRequestMethodKey.String("DELETE") - // GET method. - // Stability: stable - HTTPRequestMethodGet = HTTPRequestMethodKey.String("GET") - // HEAD method. - // Stability: stable - HTTPRequestMethodHead = HTTPRequestMethodKey.String("HEAD") - // OPTIONS method. - // Stability: stable - HTTPRequestMethodOptions = HTTPRequestMethodKey.String("OPTIONS") - // PATCH method. - // Stability: stable - HTTPRequestMethodPatch = HTTPRequestMethodKey.String("PATCH") - // POST method. - // Stability: stable - HTTPRequestMethodPost = HTTPRequestMethodKey.String("POST") - // PUT method. - // Stability: stable - HTTPRequestMethodPut = HTTPRequestMethodKey.String("PUT") - // TRACE method. - // Stability: stable - HTTPRequestMethodTrace = HTTPRequestMethodKey.String("TRACE") - // Any HTTP method that the instrumentation has no prior knowledge of. - // Stability: stable - HTTPRequestMethodOther = HTTPRequestMethodKey.String("_OTHER") -) - -// Namespace: hw -const ( - // HwBatteryCapacityKey is the attribute Key conforming to the - // "hw.battery.capacity" semantic conventions. It represents the design capacity - // in Watts-hours or Amper-hours. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9.3Ah", "50Wh" - HwBatteryCapacityKey = attribute.Key("hw.battery.capacity") - - // HwBatteryChemistryKey is the attribute Key conforming to the - // "hw.battery.chemistry" semantic conventions. It represents the battery - // [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Li-ion", "NiMH" - // - // [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html - HwBatteryChemistryKey = attribute.Key("hw.battery.chemistry") - - // HwBatteryStateKey is the attribute Key conforming to the "hw.battery.state" - // semantic conventions. It represents the current state of the battery. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwBatteryStateKey = attribute.Key("hw.battery.state") - - // HwBiosVersionKey is the attribute Key conforming to the "hw.bios_version" - // semantic conventions. It represents the BIOS version of the hardware - // component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1.2.3" - HwBiosVersionKey = attribute.Key("hw.bios_version") - - // HwDriverVersionKey is the attribute Key conforming to the "hw.driver_version" - // semantic conventions. It represents the driver version for the hardware - // component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "10.2.1-3" - HwDriverVersionKey = attribute.Key("hw.driver_version") - - // HwEnclosureTypeKey is the attribute Key conforming to the "hw.enclosure.type" - // semantic conventions. It represents the type of the enclosure (useful for - // modular systems). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Computer", "Storage", "Switch" - HwEnclosureTypeKey = attribute.Key("hw.enclosure.type") - - // HwFirmwareVersionKey is the attribute Key conforming to the - // "hw.firmware_version" semantic conventions. It represents the firmware - // version of the hardware component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2.0.1" - HwFirmwareVersionKey = attribute.Key("hw.firmware_version") - - // HwGpuTaskKey is the attribute Key conforming to the "hw.gpu.task" semantic - // conventions. It represents the type of task the GPU is performing. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwGpuTaskKey = attribute.Key("hw.gpu.task") - - // HwIDKey is the attribute Key conforming to the "hw.id" semantic conventions. - // It represents an identifier for the hardware component, unique within the - // monitored host. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "win32battery_battery_testsysa33_1" - HwIDKey = attribute.Key("hw.id") - - // HwLimitTypeKey is the attribute Key conforming to the "hw.limit_type" - // semantic conventions. It represents the type of limit for hardware - // components. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwLimitTypeKey = attribute.Key("hw.limit_type") - - // HwLogicalDiskRaidLevelKey is the attribute Key conforming to the - // "hw.logical_disk.raid_level" semantic conventions. It represents the RAID - // Level of the logical disk. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "RAID0+1", "RAID5", "RAID10" - HwLogicalDiskRaidLevelKey = attribute.Key("hw.logical_disk.raid_level") - - // HwLogicalDiskStateKey is the attribute Key conforming to the - // "hw.logical_disk.state" semantic conventions. It represents the state of the - // logical disk space usage. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwLogicalDiskStateKey = attribute.Key("hw.logical_disk.state") - - // HwMemoryTypeKey is the attribute Key conforming to the "hw.memory.type" - // semantic conventions. It represents the type of the memory module. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "DDR4", "DDR5", "LPDDR5" - HwMemoryTypeKey = attribute.Key("hw.memory.type") - - // HwModelKey is the attribute Key conforming to the "hw.model" semantic - // conventions. It represents the descriptive model name of the hardware - // component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "PERC H740P", "Intel(R) Core(TM) i7-10700K", "Dell XPS 15 Battery" - HwModelKey = attribute.Key("hw.model") - - // HwNameKey is the attribute Key conforming to the "hw.name" semantic - // conventions. It represents an easily-recognizable name for the hardware - // component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "eth0" - HwNameKey = attribute.Key("hw.name") - - // HwNetworkLogicalAddressesKey is the attribute Key conforming to the - // "hw.network.logical_addresses" semantic conventions. It represents the - // logical addresses of the adapter (e.g. IP address, or WWPN). - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "172.16.8.21", "57.11.193.42" - HwNetworkLogicalAddressesKey = attribute.Key("hw.network.logical_addresses") - - // HwNetworkPhysicalAddressKey is the attribute Key conforming to the - // "hw.network.physical_address" semantic conventions. It represents the - // physical address of the adapter (e.g. MAC address, or WWNN). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "00-90-F5-E9-7B-36" - HwNetworkPhysicalAddressKey = attribute.Key("hw.network.physical_address") - - // HwParentKey is the attribute Key conforming to the "hw.parent" semantic - // conventions. It represents the unique identifier of the parent component - // (typically the `hw.id` attribute of the enclosure, or disk controller). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "dellStorage_perc_0" - HwParentKey = attribute.Key("hw.parent") - - // HwPhysicalDiskSmartAttributeKey is the attribute Key conforming to the - // "hw.physical_disk.smart_attribute" semantic conventions. It represents the - // [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute - // of the physical disk. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Spin Retry Count", "Seek Error Rate", "Raw Read Error Rate" - // - // [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T. - HwPhysicalDiskSmartAttributeKey = attribute.Key("hw.physical_disk.smart_attribute") - - // HwPhysicalDiskStateKey is the attribute Key conforming to the - // "hw.physical_disk.state" semantic conventions. It represents the state of the - // physical disk endurance utilization. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwPhysicalDiskStateKey = attribute.Key("hw.physical_disk.state") - - // HwPhysicalDiskTypeKey is the attribute Key conforming to the - // "hw.physical_disk.type" semantic conventions. It represents the type of the - // physical disk. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "HDD", "SSD", "10K" - HwPhysicalDiskTypeKey = attribute.Key("hw.physical_disk.type") - - // HwSensorLocationKey is the attribute Key conforming to the - // "hw.sensor_location" semantic conventions. It represents the location of the - // sensor. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cpu0", "ps1", "INLET", "CPU0_DIE", "AMBIENT", "MOTHERBOARD", "PS0 - // V3_3", "MAIN_12V", "CPU_VCORE" - HwSensorLocationKey = attribute.Key("hw.sensor_location") - - // HwSerialNumberKey is the attribute Key conforming to the "hw.serial_number" - // semantic conventions. It represents the serial number of the hardware - // component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CNFCP0123456789" - HwSerialNumberKey = attribute.Key("hw.serial_number") - - // HwStateKey is the attribute Key conforming to the "hw.state" semantic - // conventions. It represents the current state of the component. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwStateKey = attribute.Key("hw.state") - - // HwTapeDriveOperationTypeKey is the attribute Key conforming to the - // "hw.tape_drive.operation_type" semantic conventions. It represents the type - // of tape drive operation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - HwTapeDriveOperationTypeKey = attribute.Key("hw.tape_drive.operation_type") - - // HwTypeKey is the attribute Key conforming to the "hw.type" semantic - // conventions. It represents the type of the component. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: Describes the category of the hardware component for which `hw.state` - // is being reported. For example, `hw.type=temperature` along with - // `hw.state=degraded` would indicate that the temperature of the hardware - // component has been reported as `degraded`. - HwTypeKey = attribute.Key("hw.type") - - // HwVendorKey is the attribute Key conforming to the "hw.vendor" semantic - // conventions. It represents the vendor name of the hardware component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Dell", "HP", "Intel", "AMD", "LSI", "Lenovo" - HwVendorKey = attribute.Key("hw.vendor") -) - -// HwBatteryCapacity returns an attribute KeyValue conforming to the -// "hw.battery.capacity" semantic conventions. It represents the design capacity -// in Watts-hours or Amper-hours. -func HwBatteryCapacity(val string) attribute.KeyValue { - return HwBatteryCapacityKey.String(val) -} - -// HwBatteryChemistry returns an attribute KeyValue conforming to the -// "hw.battery.chemistry" semantic conventions. It represents the battery -// [chemistry], e.g. Lithium-Ion, Nickel-Cadmium, etc. -// -// [chemistry]: https://schemas.dmtf.org/wbem/cim-html/2.31.0/CIM_Battery.html -func HwBatteryChemistry(val string) attribute.KeyValue { - return HwBatteryChemistryKey.String(val) -} - -// HwBiosVersion returns an attribute KeyValue conforming to the -// "hw.bios_version" semantic conventions. It represents the BIOS version of the -// hardware component. -func HwBiosVersion(val string) attribute.KeyValue { - return HwBiosVersionKey.String(val) -} - -// HwDriverVersion returns an attribute KeyValue conforming to the -// "hw.driver_version" semantic conventions. It represents the driver version for -// the hardware component. -func HwDriverVersion(val string) attribute.KeyValue { - return HwDriverVersionKey.String(val) -} - -// HwEnclosureType returns an attribute KeyValue conforming to the -// "hw.enclosure.type" semantic conventions. It represents the type of the -// enclosure (useful for modular systems). -func HwEnclosureType(val string) attribute.KeyValue { - return HwEnclosureTypeKey.String(val) -} - -// HwFirmwareVersion returns an attribute KeyValue conforming to the -// "hw.firmware_version" semantic conventions. It represents the firmware version -// of the hardware component. -func HwFirmwareVersion(val string) attribute.KeyValue { - return HwFirmwareVersionKey.String(val) -} - -// HwID returns an attribute KeyValue conforming to the "hw.id" semantic -// conventions. It represents an identifier for the hardware component, unique -// within the monitored host. -func HwID(val string) attribute.KeyValue { - return HwIDKey.String(val) -} - -// HwLogicalDiskRaidLevel returns an attribute KeyValue conforming to the -// "hw.logical_disk.raid_level" semantic conventions. It represents the RAID -// Level of the logical disk. -func HwLogicalDiskRaidLevel(val string) attribute.KeyValue { - return HwLogicalDiskRaidLevelKey.String(val) -} - -// HwMemoryType returns an attribute KeyValue conforming to the "hw.memory.type" -// semantic conventions. It represents the type of the memory module. -func HwMemoryType(val string) attribute.KeyValue { - return HwMemoryTypeKey.String(val) -} - -// HwModel returns an attribute KeyValue conforming to the "hw.model" semantic -// conventions. It represents the descriptive model name of the hardware -// component. -func HwModel(val string) attribute.KeyValue { - return HwModelKey.String(val) -} - -// HwName returns an attribute KeyValue conforming to the "hw.name" semantic -// conventions. It represents an easily-recognizable name for the hardware -// component. -func HwName(val string) attribute.KeyValue { - return HwNameKey.String(val) -} - -// HwNetworkLogicalAddresses returns an attribute KeyValue conforming to the -// "hw.network.logical_addresses" semantic conventions. It represents the logical -// addresses of the adapter (e.g. IP address, or WWPN). -func HwNetworkLogicalAddresses(val ...string) attribute.KeyValue { - return HwNetworkLogicalAddressesKey.StringSlice(val) -} - -// HwNetworkPhysicalAddress returns an attribute KeyValue conforming to the -// "hw.network.physical_address" semantic conventions. It represents the physical -// address of the adapter (e.g. MAC address, or WWNN). -func HwNetworkPhysicalAddress(val string) attribute.KeyValue { - return HwNetworkPhysicalAddressKey.String(val) -} - -// HwParent returns an attribute KeyValue conforming to the "hw.parent" semantic -// conventions. It represents the unique identifier of the parent component -// (typically the `hw.id` attribute of the enclosure, or disk controller). -func HwParent(val string) attribute.KeyValue { - return HwParentKey.String(val) -} - -// HwPhysicalDiskSmartAttribute returns an attribute KeyValue conforming to the -// "hw.physical_disk.smart_attribute" semantic conventions. It represents the -// [S.M.A.R.T.] (Self-Monitoring, Analysis, and Reporting Technology) attribute -// of the physical disk. -// -// [S.M.A.R.T.]: https://wikipedia.org/wiki/S.M.A.R.T. -func HwPhysicalDiskSmartAttribute(val string) attribute.KeyValue { - return HwPhysicalDiskSmartAttributeKey.String(val) -} - -// HwPhysicalDiskType returns an attribute KeyValue conforming to the -// "hw.physical_disk.type" semantic conventions. It represents the type of the -// physical disk. -func HwPhysicalDiskType(val string) attribute.KeyValue { - return HwPhysicalDiskTypeKey.String(val) -} - -// HwSensorLocation returns an attribute KeyValue conforming to the -// "hw.sensor_location" semantic conventions. It represents the location of the -// sensor. -func HwSensorLocation(val string) attribute.KeyValue { - return HwSensorLocationKey.String(val) -} - -// HwSerialNumber returns an attribute KeyValue conforming to the -// "hw.serial_number" semantic conventions. It represents the serial number of -// the hardware component. -func HwSerialNumber(val string) attribute.KeyValue { - return HwSerialNumberKey.String(val) -} - -// HwVendor returns an attribute KeyValue conforming to the "hw.vendor" semantic -// conventions. It represents the vendor name of the hardware component. -func HwVendor(val string) attribute.KeyValue { - return HwVendorKey.String(val) -} - -// Enum values for hw.battery.state -var ( - // Charging - // Stability: development - HwBatteryStateCharging = HwBatteryStateKey.String("charging") - // Discharging - // Stability: development - HwBatteryStateDischarging = HwBatteryStateKey.String("discharging") -) - -// Enum values for hw.gpu.task -var ( - // Decoder - // Stability: development - HwGpuTaskDecoder = HwGpuTaskKey.String("decoder") - // Encoder - // Stability: development - HwGpuTaskEncoder = HwGpuTaskKey.String("encoder") - // General - // Stability: development - HwGpuTaskGeneral = HwGpuTaskKey.String("general") -) - -// Enum values for hw.limit_type -var ( - // Critical - // Stability: development - HwLimitTypeCritical = HwLimitTypeKey.String("critical") - // Degraded - // Stability: development - HwLimitTypeDegraded = HwLimitTypeKey.String("degraded") - // High Critical - // Stability: development - HwLimitTypeHighCritical = HwLimitTypeKey.String("high.critical") - // High Degraded - // Stability: development - HwLimitTypeHighDegraded = HwLimitTypeKey.String("high.degraded") - // Low Critical - // Stability: development - HwLimitTypeLowCritical = HwLimitTypeKey.String("low.critical") - // Low Degraded - // Stability: development - HwLimitTypeLowDegraded = HwLimitTypeKey.String("low.degraded") - // Maximum - // Stability: development - HwLimitTypeMax = HwLimitTypeKey.String("max") - // Throttled - // Stability: development - HwLimitTypeThrottled = HwLimitTypeKey.String("throttled") - // Turbo - // Stability: development - HwLimitTypeTurbo = HwLimitTypeKey.String("turbo") -) - -// Enum values for hw.logical_disk.state -var ( - // Used - // Stability: development - HwLogicalDiskStateUsed = HwLogicalDiskStateKey.String("used") - // Free - // Stability: development - HwLogicalDiskStateFree = HwLogicalDiskStateKey.String("free") -) - -// Enum values for hw.physical_disk.state -var ( - // Remaining - // Stability: development - HwPhysicalDiskStateRemaining = HwPhysicalDiskStateKey.String("remaining") -) - -// Enum values for hw.state -var ( - // Degraded - // Stability: development - HwStateDegraded = HwStateKey.String("degraded") - // Failed - // Stability: development - HwStateFailed = HwStateKey.String("failed") - // Needs Cleaning - // Stability: development - HwStateNeedsCleaning = HwStateKey.String("needs_cleaning") - // OK - // Stability: development - HwStateOk = HwStateKey.String("ok") - // Predicted Failure - // Stability: development - HwStatePredictedFailure = HwStateKey.String("predicted_failure") -) - -// Enum values for hw.tape_drive.operation_type -var ( - // Mount - // Stability: development - HwTapeDriveOperationTypeMount = HwTapeDriveOperationTypeKey.String("mount") - // Unmount - // Stability: development - HwTapeDriveOperationTypeUnmount = HwTapeDriveOperationTypeKey.String("unmount") - // Clean - // Stability: development - HwTapeDriveOperationTypeClean = HwTapeDriveOperationTypeKey.String("clean") -) - -// Enum values for hw.type -var ( - // Battery - // Stability: development - HwTypeBattery = HwTypeKey.String("battery") - // CPU - // Stability: development - HwTypeCPU = HwTypeKey.String("cpu") - // Disk controller - // Stability: development - HwTypeDiskController = HwTypeKey.String("disk_controller") - // Enclosure - // Stability: development - HwTypeEnclosure = HwTypeKey.String("enclosure") - // Fan - // Stability: development - HwTypeFan = HwTypeKey.String("fan") - // GPU - // Stability: development - HwTypeGpu = HwTypeKey.String("gpu") - // Logical disk - // Stability: development - HwTypeLogicalDisk = HwTypeKey.String("logical_disk") - // Memory - // Stability: development - HwTypeMemory = HwTypeKey.String("memory") - // Network - // Stability: development - HwTypeNetwork = HwTypeKey.String("network") - // Physical disk - // Stability: development - HwTypePhysicalDisk = HwTypeKey.String("physical_disk") - // Power supply - // Stability: development - HwTypePowerSupply = HwTypeKey.String("power_supply") - // Tape drive - // Stability: development - HwTypeTapeDrive = HwTypeKey.String("tape_drive") - // Temperature - // Stability: development - HwTypeTemperature = HwTypeKey.String("temperature") - // Voltage - // Stability: development - HwTypeVoltage = HwTypeKey.String("voltage") -) - -// Namespace: ios -const ( - // IOSAppStateKey is the attribute Key conforming to the "ios.app.state" - // semantic conventions. It represents the this attribute represents the state - // of the application. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: The iOS lifecycle states are defined in the - // [UIApplicationDelegate documentation], and from which the `OS terminology` - // column values are derived. - // - // [UIApplicationDelegate documentation]: https://developer.apple.com/documentation/uikit/uiapplicationdelegate - IOSAppStateKey = attribute.Key("ios.app.state") -) - -// Enum values for ios.app.state -var ( - // The app has become `active`. Associated with UIKit notification - // `applicationDidBecomeActive`. - // - // Stability: development - IOSAppStateActive = IOSAppStateKey.String("active") - // The app is now `inactive`. Associated with UIKit notification - // `applicationWillResignActive`. - // - // Stability: development - IOSAppStateInactive = IOSAppStateKey.String("inactive") - // The app is now in the background. This value is associated with UIKit - // notification `applicationDidEnterBackground`. - // - // Stability: development - IOSAppStateBackground = IOSAppStateKey.String("background") - // The app is now in the foreground. This value is associated with UIKit - // notification `applicationWillEnterForeground`. - // - // Stability: development - IOSAppStateForeground = IOSAppStateKey.String("foreground") - // The app is about to terminate. Associated with UIKit notification - // `applicationWillTerminate`. - // - // Stability: development - IOSAppStateTerminate = IOSAppStateKey.String("terminate") -) - -// Namespace: k8s -const ( - // K8SClusterNameKey is the attribute Key conforming to the "k8s.cluster.name" - // semantic conventions. It represents the name of the cluster. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry-cluster" - K8SClusterNameKey = attribute.Key("k8s.cluster.name") - - // K8SClusterUIDKey is the attribute Key conforming to the "k8s.cluster.uid" - // semantic conventions. It represents a pseudo-ID for the cluster, set to the - // UID of the `kube-system` namespace. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "218fc5a9-a5f1-4b54-aa05-46717d0ab26d" - // Note: K8s doesn't have support for obtaining a cluster ID. If this is ever - // added, we will recommend collecting the `k8s.cluster.uid` through the - // official APIs. In the meantime, we are able to use the `uid` of the - // `kube-system` namespace as a proxy for cluster ID. Read on for the - // rationale. - // - // Every object created in a K8s cluster is assigned a distinct UID. The - // `kube-system` namespace is used by Kubernetes itself and will exist - // for the lifetime of the cluster. Using the `uid` of the `kube-system` - // namespace is a reasonable proxy for the K8s ClusterID as it will only - // change if the cluster is rebuilt. Furthermore, Kubernetes UIDs are - // UUIDs as standardized by - // [ISO/IEC 9834-8 and ITU-T X.667]. - // Which states: - // - // > If generated according to one of the mechanisms defined in Rec. - // > ITU-T X.667 | ISO/IEC 9834-8, a UUID is either guaranteed to be - // > different from all other UUIDs generated before 3603 A.D., or is - // > extremely likely to be different (depending on the mechanism chosen). - // - // Therefore, UIDs between clusters should be extremely unlikely to - // conflict. - // - // [ISO/IEC 9834-8 and ITU-T X.667]: https://www.itu.int/ITU-T/studygroups/com17/oid.html - K8SClusterUIDKey = attribute.Key("k8s.cluster.uid") - - // K8SContainerNameKey is the attribute Key conforming to the - // "k8s.container.name" semantic conventions. It represents the name of the - // Container from Pod specification, must be unique within a Pod. Container - // runtime usually uses different globally unique name (`container.name`). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "redis" - K8SContainerNameKey = attribute.Key("k8s.container.name") - - // K8SContainerRestartCountKey is the attribute Key conforming to the - // "k8s.container.restart_count" semantic conventions. It represents the number - // of times the container was restarted. This attribute can be used to identify - // a particular container (running or stopped) within a container spec. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - K8SContainerRestartCountKey = attribute.Key("k8s.container.restart_count") - - // K8SContainerStatusLastTerminatedReasonKey is the attribute Key conforming to - // the "k8s.container.status.last_terminated_reason" semantic conventions. It - // represents the last terminated reason of the Container. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Evicted", "Error" - K8SContainerStatusLastTerminatedReasonKey = attribute.Key("k8s.container.status.last_terminated_reason") - - // K8SContainerStatusReasonKey is the attribute Key conforming to the - // "k8s.container.status.reason" semantic conventions. It represents the reason - // for the container state. Corresponds to the `reason` field of the: - // [K8s ContainerStateWaiting] or [K8s ContainerStateTerminated]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ContainerCreating", "CrashLoopBackOff", - // "CreateContainerConfigError", "ErrImagePull", "ImagePullBackOff", - // "OOMKilled", "Completed", "Error", "ContainerCannotRun" - // - // [K8s ContainerStateWaiting]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstatewaiting-v1-core - // [K8s ContainerStateTerminated]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstateterminated-v1-core - K8SContainerStatusReasonKey = attribute.Key("k8s.container.status.reason") - - // K8SContainerStatusStateKey is the attribute Key conforming to the - // "k8s.container.status.state" semantic conventions. It represents the state of - // the container. [K8s ContainerState]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "terminated", "running", "waiting" - // - // [K8s ContainerState]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#containerstate-v1-core - K8SContainerStatusStateKey = attribute.Key("k8s.container.status.state") - - // K8SCronJobNameKey is the attribute Key conforming to the "k8s.cronjob.name" - // semantic conventions. It represents the name of the CronJob. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SCronJobNameKey = attribute.Key("k8s.cronjob.name") - - // K8SCronJobUIDKey is the attribute Key conforming to the "k8s.cronjob.uid" - // semantic conventions. It represents the UID of the CronJob. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SCronJobUIDKey = attribute.Key("k8s.cronjob.uid") - - // K8SDaemonSetNameKey is the attribute Key conforming to the - // "k8s.daemonset.name" semantic conventions. It represents the name of the - // DaemonSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SDaemonSetNameKey = attribute.Key("k8s.daemonset.name") - - // K8SDaemonSetUIDKey is the attribute Key conforming to the "k8s.daemonset.uid" - // semantic conventions. It represents the UID of the DaemonSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SDaemonSetUIDKey = attribute.Key("k8s.daemonset.uid") - - // K8SDeploymentNameKey is the attribute Key conforming to the - // "k8s.deployment.name" semantic conventions. It represents the name of the - // Deployment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SDeploymentNameKey = attribute.Key("k8s.deployment.name") - - // K8SDeploymentUIDKey is the attribute Key conforming to the - // "k8s.deployment.uid" semantic conventions. It represents the UID of the - // Deployment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SDeploymentUIDKey = attribute.Key("k8s.deployment.uid") - - // K8SHPAMetricTypeKey is the attribute Key conforming to the - // "k8s.hpa.metric.type" semantic conventions. It represents the type of metric - // source for the horizontal pod autoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Resource", "ContainerResource" - // Note: This attribute reflects the `type` field of spec.metrics[] in the HPA. - K8SHPAMetricTypeKey = attribute.Key("k8s.hpa.metric.type") - - // K8SHPANameKey is the attribute Key conforming to the "k8s.hpa.name" semantic - // conventions. It represents the name of the horizontal pod autoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SHPANameKey = attribute.Key("k8s.hpa.name") - - // K8SHPAScaletargetrefAPIVersionKey is the attribute Key conforming to the - // "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the - // API version of the target resource to scale for the HorizontalPodAutoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "apps/v1", "autoscaling/v2" - // Note: This maps to the `apiVersion` field in the `scaleTargetRef` of the HPA - // spec. - K8SHPAScaletargetrefAPIVersionKey = attribute.Key("k8s.hpa.scaletargetref.api_version") - - // K8SHPAScaletargetrefKindKey is the attribute Key conforming to the - // "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of - // the target resource to scale for the HorizontalPodAutoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Deployment", "StatefulSet" - // Note: This maps to the `kind` field in the `scaleTargetRef` of the HPA spec. - K8SHPAScaletargetrefKindKey = attribute.Key("k8s.hpa.scaletargetref.kind") - - // K8SHPAScaletargetrefNameKey is the attribute Key conforming to the - // "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of - // the target resource to scale for the HorizontalPodAutoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-deployment", "my-statefulset" - // Note: This maps to the `name` field in the `scaleTargetRef` of the HPA spec. - K8SHPAScaletargetrefNameKey = attribute.Key("k8s.hpa.scaletargetref.name") - - // K8SHPAUIDKey is the attribute Key conforming to the "k8s.hpa.uid" semantic - // conventions. It represents the UID of the horizontal pod autoscaler. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SHPAUIDKey = attribute.Key("k8s.hpa.uid") - - // K8SHugepageSizeKey is the attribute Key conforming to the "k8s.hugepage.size" - // semantic conventions. It represents the size (identifier) of the K8s huge - // page. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2Mi" - K8SHugepageSizeKey = attribute.Key("k8s.hugepage.size") - - // K8SJobNameKey is the attribute Key conforming to the "k8s.job.name" semantic - // conventions. It represents the name of the Job. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SJobNameKey = attribute.Key("k8s.job.name") - - // K8SJobUIDKey is the attribute Key conforming to the "k8s.job.uid" semantic - // conventions. It represents the UID of the Job. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SJobUIDKey = attribute.Key("k8s.job.uid") - - // K8SNamespaceNameKey is the attribute Key conforming to the - // "k8s.namespace.name" semantic conventions. It represents the name of the - // namespace that the pod is running in. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "default" - K8SNamespaceNameKey = attribute.Key("k8s.namespace.name") - - // K8SNamespacePhaseKey is the attribute Key conforming to the - // "k8s.namespace.phase" semantic conventions. It represents the phase of the - // K8s namespace. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "active", "terminating" - // Note: This attribute aligns with the `phase` field of the - // [K8s NamespaceStatus] - // - // [K8s NamespaceStatus]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#namespacestatus-v1-core - K8SNamespacePhaseKey = attribute.Key("k8s.namespace.phase") - - // K8SNodeConditionStatusKey is the attribute Key conforming to the - // "k8s.node.condition.status" semantic conventions. It represents the status of - // the condition, one of True, False, Unknown. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "true", "false", "unknown" - // Note: This attribute aligns with the `status` field of the - // [NodeCondition] - // - // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core - K8SNodeConditionStatusKey = attribute.Key("k8s.node.condition.status") - - // K8SNodeConditionTypeKey is the attribute Key conforming to the - // "k8s.node.condition.type" semantic conventions. It represents the condition - // type of a K8s Node. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Ready", "DiskPressure" - // Note: K8s Node conditions as described - // by [K8s documentation]. - // - // This attribute aligns with the `type` field of the - // [NodeCondition] - // - // The set of possible values is not limited to those listed here. Managed - // Kubernetes environments, - // or custom controllers MAY introduce additional node condition types. - // When this occurs, the exact value as reported by the Kubernetes API SHOULD be - // used. - // - // [K8s documentation]: https://v1-32.docs.kubernetes.io/docs/reference/node/node-status/#condition - // [NodeCondition]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#nodecondition-v1-core - K8SNodeConditionTypeKey = attribute.Key("k8s.node.condition.type") - - // K8SNodeNameKey is the attribute Key conforming to the "k8s.node.name" - // semantic conventions. It represents the name of the Node. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "node-1" - K8SNodeNameKey = attribute.Key("k8s.node.name") - - // K8SNodeUIDKey is the attribute Key conforming to the "k8s.node.uid" semantic - // conventions. It represents the UID of the Node. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1eb3a0c6-0477-4080-a9cb-0cb7db65c6a2" - K8SNodeUIDKey = attribute.Key("k8s.node.uid") - - // K8SPodNameKey is the attribute Key conforming to the "k8s.pod.name" semantic - // conventions. It represents the name of the Pod. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry-pod-autoconf" - K8SPodNameKey = attribute.Key("k8s.pod.name") - - // K8SPodUIDKey is the attribute Key conforming to the "k8s.pod.uid" semantic - // conventions. It represents the UID of the Pod. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SPodUIDKey = attribute.Key("k8s.pod.uid") - - // K8SReplicaSetNameKey is the attribute Key conforming to the - // "k8s.replicaset.name" semantic conventions. It represents the name of the - // ReplicaSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SReplicaSetNameKey = attribute.Key("k8s.replicaset.name") - - // K8SReplicaSetUIDKey is the attribute Key conforming to the - // "k8s.replicaset.uid" semantic conventions. It represents the UID of the - // ReplicaSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SReplicaSetUIDKey = attribute.Key("k8s.replicaset.uid") - - // K8SReplicationControllerNameKey is the attribute Key conforming to the - // "k8s.replicationcontroller.name" semantic conventions. It represents the name - // of the replication controller. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SReplicationControllerNameKey = attribute.Key("k8s.replicationcontroller.name") - - // K8SReplicationControllerUIDKey is the attribute Key conforming to the - // "k8s.replicationcontroller.uid" semantic conventions. It represents the UID - // of the replication controller. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SReplicationControllerUIDKey = attribute.Key("k8s.replicationcontroller.uid") - - // K8SResourceQuotaNameKey is the attribute Key conforming to the - // "k8s.resourcequota.name" semantic conventions. It represents the name of the - // resource quota. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SResourceQuotaNameKey = attribute.Key("k8s.resourcequota.name") - - // K8SResourceQuotaResourceNameKey is the attribute Key conforming to the - // "k8s.resourcequota.resource_name" semantic conventions. It represents the - // name of the K8s resource a resource quota defines. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "count/replicationcontrollers" - // Note: The value for this attribute can be either the full - // `count/[.]` string (e.g., count/deployments.apps, - // count/pods), or, for certain core Kubernetes resources, just the resource - // name (e.g., pods, services, configmaps). Both forms are supported by - // Kubernetes for object count quotas. See - // [Kubernetes Resource Quotas documentation] for more details. - // - // [Kubernetes Resource Quotas documentation]: https://kubernetes.io/docs/concepts/policy/resource-quotas/#object-count-quota - K8SResourceQuotaResourceNameKey = attribute.Key("k8s.resourcequota.resource_name") - - // K8SResourceQuotaUIDKey is the attribute Key conforming to the - // "k8s.resourcequota.uid" semantic conventions. It represents the UID of the - // resource quota. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SResourceQuotaUIDKey = attribute.Key("k8s.resourcequota.uid") - - // K8SStatefulSetNameKey is the attribute Key conforming to the - // "k8s.statefulset.name" semantic conventions. It represents the name of the - // StatefulSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "opentelemetry" - K8SStatefulSetNameKey = attribute.Key("k8s.statefulset.name") - - // K8SStatefulSetUIDKey is the attribute Key conforming to the - // "k8s.statefulset.uid" semantic conventions. It represents the UID of the - // StatefulSet. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "275ecb36-5aa8-4c2a-9c47-d8bb681b9aff" - K8SStatefulSetUIDKey = attribute.Key("k8s.statefulset.uid") - - // K8SStorageclassNameKey is the attribute Key conforming to the - // "k8s.storageclass.name" semantic conventions. It represents the name of K8s - // [StorageClass] object. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "gold.storageclass.storage.k8s.io" - // - // [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io - K8SStorageclassNameKey = attribute.Key("k8s.storageclass.name") - - // K8SVolumeNameKey is the attribute Key conforming to the "k8s.volume.name" - // semantic conventions. It represents the name of the K8s volume. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "volume0" - K8SVolumeNameKey = attribute.Key("k8s.volume.name") - - // K8SVolumeTypeKey is the attribute Key conforming to the "k8s.volume.type" - // semantic conventions. It represents the type of the K8s volume. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "emptyDir", "persistentVolumeClaim" - K8SVolumeTypeKey = attribute.Key("k8s.volume.type") -) - -// K8SClusterName returns an attribute KeyValue conforming to the -// "k8s.cluster.name" semantic conventions. It represents the name of the -// cluster. -func K8SClusterName(val string) attribute.KeyValue { - return K8SClusterNameKey.String(val) -} - -// K8SClusterUID returns an attribute KeyValue conforming to the -// "k8s.cluster.uid" semantic conventions. It represents a pseudo-ID for the -// cluster, set to the UID of the `kube-system` namespace. -func K8SClusterUID(val string) attribute.KeyValue { - return K8SClusterUIDKey.String(val) -} - -// K8SContainerName returns an attribute KeyValue conforming to the -// "k8s.container.name" semantic conventions. It represents the name of the -// Container from Pod specification, must be unique within a Pod. Container -// runtime usually uses different globally unique name (`container.name`). -func K8SContainerName(val string) attribute.KeyValue { - return K8SContainerNameKey.String(val) -} - -// K8SContainerRestartCount returns an attribute KeyValue conforming to the -// "k8s.container.restart_count" semantic conventions. It represents the number -// of times the container was restarted. This attribute can be used to identify a -// particular container (running or stopped) within a container spec. -func K8SContainerRestartCount(val int) attribute.KeyValue { - return K8SContainerRestartCountKey.Int(val) -} - -// K8SContainerStatusLastTerminatedReason returns an attribute KeyValue -// conforming to the "k8s.container.status.last_terminated_reason" semantic -// conventions. It represents the last terminated reason of the Container. -func K8SContainerStatusLastTerminatedReason(val string) attribute.KeyValue { - return K8SContainerStatusLastTerminatedReasonKey.String(val) -} - -// K8SCronJobAnnotation returns an attribute KeyValue conforming to the -// "k8s.cronjob.annotation" semantic conventions. It represents the cronjob -// annotation placed on the CronJob, the `` being the annotation name, the -// value being the annotation value. -func K8SCronJobAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.cronjob.annotation."+key, val) -} - -// K8SCronJobLabel returns an attribute KeyValue conforming to the -// "k8s.cronjob.label" semantic conventions. It represents the label placed on -// the CronJob, the `` being the label name, the value being the label -// value. -func K8SCronJobLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.cronjob.label."+key, val) -} - -// K8SCronJobName returns an attribute KeyValue conforming to the -// "k8s.cronjob.name" semantic conventions. It represents the name of the -// CronJob. -func K8SCronJobName(val string) attribute.KeyValue { - return K8SCronJobNameKey.String(val) -} - -// K8SCronJobUID returns an attribute KeyValue conforming to the -// "k8s.cronjob.uid" semantic conventions. It represents the UID of the CronJob. -func K8SCronJobUID(val string) attribute.KeyValue { - return K8SCronJobUIDKey.String(val) -} - -// K8SDaemonSetAnnotation returns an attribute KeyValue conforming to the -// "k8s.daemonset.annotation" semantic conventions. It represents the annotation -// placed on the DaemonSet, the `` being the annotation name, the value -// being the annotation value, even if the value is empty. -func K8SDaemonSetAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.daemonset.annotation."+key, val) -} - -// K8SDaemonSetLabel returns an attribute KeyValue conforming to the -// "k8s.daemonset.label" semantic conventions. It represents the label placed on -// the DaemonSet, the `` being the label name, the value being the label -// value, even if the value is empty. -func K8SDaemonSetLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.daemonset.label."+key, val) -} - -// K8SDaemonSetName returns an attribute KeyValue conforming to the -// "k8s.daemonset.name" semantic conventions. It represents the name of the -// DaemonSet. -func K8SDaemonSetName(val string) attribute.KeyValue { - return K8SDaemonSetNameKey.String(val) -} - -// K8SDaemonSetUID returns an attribute KeyValue conforming to the -// "k8s.daemonset.uid" semantic conventions. It represents the UID of the -// DaemonSet. -func K8SDaemonSetUID(val string) attribute.KeyValue { - return K8SDaemonSetUIDKey.String(val) -} - -// K8SDeploymentAnnotation returns an attribute KeyValue conforming to the -// "k8s.deployment.annotation" semantic conventions. It represents the annotation -// placed on the Deployment, the `` being the annotation name, the value -// being the annotation value, even if the value is empty. -func K8SDeploymentAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.deployment.annotation."+key, val) -} - -// K8SDeploymentLabel returns an attribute KeyValue conforming to the -// "k8s.deployment.label" semantic conventions. It represents the label placed on -// the Deployment, the `` being the label name, the value being the label -// value, even if the value is empty. -func K8SDeploymentLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.deployment.label."+key, val) -} - -// K8SDeploymentName returns an attribute KeyValue conforming to the -// "k8s.deployment.name" semantic conventions. It represents the name of the -// Deployment. -func K8SDeploymentName(val string) attribute.KeyValue { - return K8SDeploymentNameKey.String(val) -} - -// K8SDeploymentUID returns an attribute KeyValue conforming to the -// "k8s.deployment.uid" semantic conventions. It represents the UID of the -// Deployment. -func K8SDeploymentUID(val string) attribute.KeyValue { - return K8SDeploymentUIDKey.String(val) -} - -// K8SHPAMetricType returns an attribute KeyValue conforming to the -// "k8s.hpa.metric.type" semantic conventions. It represents the type of metric -// source for the horizontal pod autoscaler. -func K8SHPAMetricType(val string) attribute.KeyValue { - return K8SHPAMetricTypeKey.String(val) -} - -// K8SHPAName returns an attribute KeyValue conforming to the "k8s.hpa.name" -// semantic conventions. It represents the name of the horizontal pod autoscaler. -func K8SHPAName(val string) attribute.KeyValue { - return K8SHPANameKey.String(val) -} - -// K8SHPAScaletargetrefAPIVersion returns an attribute KeyValue conforming to the -// "k8s.hpa.scaletargetref.api_version" semantic conventions. It represents the -// API version of the target resource to scale for the HorizontalPodAutoscaler. -func K8SHPAScaletargetrefAPIVersion(val string) attribute.KeyValue { - return K8SHPAScaletargetrefAPIVersionKey.String(val) -} - -// K8SHPAScaletargetrefKind returns an attribute KeyValue conforming to the -// "k8s.hpa.scaletargetref.kind" semantic conventions. It represents the kind of -// the target resource to scale for the HorizontalPodAutoscaler. -func K8SHPAScaletargetrefKind(val string) attribute.KeyValue { - return K8SHPAScaletargetrefKindKey.String(val) -} - -// K8SHPAScaletargetrefName returns an attribute KeyValue conforming to the -// "k8s.hpa.scaletargetref.name" semantic conventions. It represents the name of -// the target resource to scale for the HorizontalPodAutoscaler. -func K8SHPAScaletargetrefName(val string) attribute.KeyValue { - return K8SHPAScaletargetrefNameKey.String(val) -} - -// K8SHPAUID returns an attribute KeyValue conforming to the "k8s.hpa.uid" -// semantic conventions. It represents the UID of the horizontal pod autoscaler. -func K8SHPAUID(val string) attribute.KeyValue { - return K8SHPAUIDKey.String(val) -} - -// K8SHugepageSize returns an attribute KeyValue conforming to the -// "k8s.hugepage.size" semantic conventions. It represents the size (identifier) -// of the K8s huge page. -func K8SHugepageSize(val string) attribute.KeyValue { - return K8SHugepageSizeKey.String(val) -} - -// K8SJobAnnotation returns an attribute KeyValue conforming to the -// "k8s.job.annotation" semantic conventions. It represents the annotation placed -// on the Job, the `` being the annotation name, the value being the -// annotation value, even if the value is empty. -func K8SJobAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.job.annotation."+key, val) -} - -// K8SJobLabel returns an attribute KeyValue conforming to the "k8s.job.label" -// semantic conventions. It represents the label placed on the Job, the `` -// being the label name, the value being the label value, even if the value is -// empty. -func K8SJobLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.job.label."+key, val) -} - -// K8SJobName returns an attribute KeyValue conforming to the "k8s.job.name" -// semantic conventions. It represents the name of the Job. -func K8SJobName(val string) attribute.KeyValue { - return K8SJobNameKey.String(val) -} - -// K8SJobUID returns an attribute KeyValue conforming to the "k8s.job.uid" -// semantic conventions. It represents the UID of the Job. -func K8SJobUID(val string) attribute.KeyValue { - return K8SJobUIDKey.String(val) -} - -// K8SNamespaceAnnotation returns an attribute KeyValue conforming to the -// "k8s.namespace.annotation" semantic conventions. It represents the annotation -// placed on the Namespace, the `` being the annotation name, the value -// being the annotation value, even if the value is empty. -func K8SNamespaceAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.namespace.annotation."+key, val) -} - -// K8SNamespaceLabel returns an attribute KeyValue conforming to the -// "k8s.namespace.label" semantic conventions. It represents the label placed on -// the Namespace, the `` being the label name, the value being the label -// value, even if the value is empty. -func K8SNamespaceLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.namespace.label."+key, val) -} - -// K8SNamespaceName returns an attribute KeyValue conforming to the -// "k8s.namespace.name" semantic conventions. It represents the name of the -// namespace that the pod is running in. -func K8SNamespaceName(val string) attribute.KeyValue { - return K8SNamespaceNameKey.String(val) -} - -// K8SNodeAnnotation returns an attribute KeyValue conforming to the -// "k8s.node.annotation" semantic conventions. It represents the annotation -// placed on the Node, the `` being the annotation name, the value being the -// annotation value, even if the value is empty. -func K8SNodeAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.node.annotation."+key, val) -} - -// K8SNodeLabel returns an attribute KeyValue conforming to the "k8s.node.label" -// semantic conventions. It represents the label placed on the Node, the `` -// being the label name, the value being the label value, even if the value is -// empty. -func K8SNodeLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.node.label."+key, val) -} - -// K8SNodeName returns an attribute KeyValue conforming to the "k8s.node.name" -// semantic conventions. It represents the name of the Node. -func K8SNodeName(val string) attribute.KeyValue { - return K8SNodeNameKey.String(val) -} - -// K8SNodeUID returns an attribute KeyValue conforming to the "k8s.node.uid" -// semantic conventions. It represents the UID of the Node. -func K8SNodeUID(val string) attribute.KeyValue { - return K8SNodeUIDKey.String(val) -} - -// K8SPodAnnotation returns an attribute KeyValue conforming to the -// "k8s.pod.annotation" semantic conventions. It represents the annotation placed -// on the Pod, the `` being the annotation name, the value being the -// annotation value. -func K8SPodAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.pod.annotation."+key, val) -} - -// K8SPodLabel returns an attribute KeyValue conforming to the "k8s.pod.label" -// semantic conventions. It represents the label placed on the Pod, the `` -// being the label name, the value being the label value. -func K8SPodLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.pod.label."+key, val) -} - -// K8SPodName returns an attribute KeyValue conforming to the "k8s.pod.name" -// semantic conventions. It represents the name of the Pod. -func K8SPodName(val string) attribute.KeyValue { - return K8SPodNameKey.String(val) -} - -// K8SPodUID returns an attribute KeyValue conforming to the "k8s.pod.uid" -// semantic conventions. It represents the UID of the Pod. -func K8SPodUID(val string) attribute.KeyValue { - return K8SPodUIDKey.String(val) -} - -// K8SReplicaSetAnnotation returns an attribute KeyValue conforming to the -// "k8s.replicaset.annotation" semantic conventions. It represents the annotation -// placed on the ReplicaSet, the `` being the annotation name, the value -// being the annotation value, even if the value is empty. -func K8SReplicaSetAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.replicaset.annotation."+key, val) -} - -// K8SReplicaSetLabel returns an attribute KeyValue conforming to the -// "k8s.replicaset.label" semantic conventions. It represents the label placed on -// the ReplicaSet, the `` being the label name, the value being the label -// value, even if the value is empty. -func K8SReplicaSetLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.replicaset.label."+key, val) -} - -// K8SReplicaSetName returns an attribute KeyValue conforming to the -// "k8s.replicaset.name" semantic conventions. It represents the name of the -// ReplicaSet. -func K8SReplicaSetName(val string) attribute.KeyValue { - return K8SReplicaSetNameKey.String(val) -} - -// K8SReplicaSetUID returns an attribute KeyValue conforming to the -// "k8s.replicaset.uid" semantic conventions. It represents the UID of the -// ReplicaSet. -func K8SReplicaSetUID(val string) attribute.KeyValue { - return K8SReplicaSetUIDKey.String(val) -} - -// K8SReplicationControllerName returns an attribute KeyValue conforming to the -// "k8s.replicationcontroller.name" semantic conventions. It represents the name -// of the replication controller. -func K8SReplicationControllerName(val string) attribute.KeyValue { - return K8SReplicationControllerNameKey.String(val) -} - -// K8SReplicationControllerUID returns an attribute KeyValue conforming to the -// "k8s.replicationcontroller.uid" semantic conventions. It represents the UID of -// the replication controller. -func K8SReplicationControllerUID(val string) attribute.KeyValue { - return K8SReplicationControllerUIDKey.String(val) -} - -// K8SResourceQuotaName returns an attribute KeyValue conforming to the -// "k8s.resourcequota.name" semantic conventions. It represents the name of the -// resource quota. -func K8SResourceQuotaName(val string) attribute.KeyValue { - return K8SResourceQuotaNameKey.String(val) -} - -// K8SResourceQuotaResourceName returns an attribute KeyValue conforming to the -// "k8s.resourcequota.resource_name" semantic conventions. It represents the name -// of the K8s resource a resource quota defines. -func K8SResourceQuotaResourceName(val string) attribute.KeyValue { - return K8SResourceQuotaResourceNameKey.String(val) -} - -// K8SResourceQuotaUID returns an attribute KeyValue conforming to the -// "k8s.resourcequota.uid" semantic conventions. It represents the UID of the -// resource quota. -func K8SResourceQuotaUID(val string) attribute.KeyValue { - return K8SResourceQuotaUIDKey.String(val) -} - -// K8SStatefulSetAnnotation returns an attribute KeyValue conforming to the -// "k8s.statefulset.annotation" semantic conventions. It represents the -// annotation placed on the StatefulSet, the `` being the annotation name, -// the value being the annotation value, even if the value is empty. -func K8SStatefulSetAnnotation(key string, val string) attribute.KeyValue { - return attribute.String("k8s.statefulset.annotation."+key, val) -} - -// K8SStatefulSetLabel returns an attribute KeyValue conforming to the -// "k8s.statefulset.label" semantic conventions. It represents the label placed -// on the StatefulSet, the `` being the label name, the value being the -// label value, even if the value is empty. -func K8SStatefulSetLabel(key string, val string) attribute.KeyValue { - return attribute.String("k8s.statefulset.label."+key, val) -} - -// K8SStatefulSetName returns an attribute KeyValue conforming to the -// "k8s.statefulset.name" semantic conventions. It represents the name of the -// StatefulSet. -func K8SStatefulSetName(val string) attribute.KeyValue { - return K8SStatefulSetNameKey.String(val) -} - -// K8SStatefulSetUID returns an attribute KeyValue conforming to the -// "k8s.statefulset.uid" semantic conventions. It represents the UID of the -// StatefulSet. -func K8SStatefulSetUID(val string) attribute.KeyValue { - return K8SStatefulSetUIDKey.String(val) -} - -// K8SStorageclassName returns an attribute KeyValue conforming to the -// "k8s.storageclass.name" semantic conventions. It represents the name of K8s -// [StorageClass] object. -// -// [StorageClass]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#storageclass-v1-storage-k8s-io -func K8SStorageclassName(val string) attribute.KeyValue { - return K8SStorageclassNameKey.String(val) -} - -// K8SVolumeName returns an attribute KeyValue conforming to the -// "k8s.volume.name" semantic conventions. It represents the name of the K8s -// volume. -func K8SVolumeName(val string) attribute.KeyValue { - return K8SVolumeNameKey.String(val) -} - -// Enum values for k8s.container.status.reason -var ( - // The container is being created. - // Stability: development - K8SContainerStatusReasonContainerCreating = K8SContainerStatusReasonKey.String("ContainerCreating") - // The container is in a crash loop back off state. - // Stability: development - K8SContainerStatusReasonCrashLoopBackOff = K8SContainerStatusReasonKey.String("CrashLoopBackOff") - // There was an error creating the container configuration. - // Stability: development - K8SContainerStatusReasonCreateContainerConfigError = K8SContainerStatusReasonKey.String("CreateContainerConfigError") - // There was an error pulling the container image. - // Stability: development - K8SContainerStatusReasonErrImagePull = K8SContainerStatusReasonKey.String("ErrImagePull") - // The container image pull is in back off state. - // Stability: development - K8SContainerStatusReasonImagePullBackOff = K8SContainerStatusReasonKey.String("ImagePullBackOff") - // The container was killed due to out of memory. - // Stability: development - K8SContainerStatusReasonOomKilled = K8SContainerStatusReasonKey.String("OOMKilled") - // The container has completed execution. - // Stability: development - K8SContainerStatusReasonCompleted = K8SContainerStatusReasonKey.String("Completed") - // There was an error with the container. - // Stability: development - K8SContainerStatusReasonError = K8SContainerStatusReasonKey.String("Error") - // The container cannot run. - // Stability: development - K8SContainerStatusReasonContainerCannotRun = K8SContainerStatusReasonKey.String("ContainerCannotRun") -) - -// Enum values for k8s.container.status.state -var ( - // The container has terminated. - // Stability: development - K8SContainerStatusStateTerminated = K8SContainerStatusStateKey.String("terminated") - // The container is running. - // Stability: development - K8SContainerStatusStateRunning = K8SContainerStatusStateKey.String("running") - // The container is waiting. - // Stability: development - K8SContainerStatusStateWaiting = K8SContainerStatusStateKey.String("waiting") -) - -// Enum values for k8s.namespace.phase -var ( - // Active namespace phase as described by [K8s API] - // Stability: development - // - // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase - K8SNamespacePhaseActive = K8SNamespacePhaseKey.String("active") - // Terminating namespace phase as described by [K8s API] - // Stability: development - // - // [K8s API]: https://pkg.go.dev/k8s.io/api@v0.31.3/core/v1#NamespacePhase - K8SNamespacePhaseTerminating = K8SNamespacePhaseKey.String("terminating") -) - -// Enum values for k8s.node.condition.status -var ( - // condition_true - // Stability: development - K8SNodeConditionStatusConditionTrue = K8SNodeConditionStatusKey.String("true") - // condition_false - // Stability: development - K8SNodeConditionStatusConditionFalse = K8SNodeConditionStatusKey.String("false") - // condition_unknown - // Stability: development - K8SNodeConditionStatusConditionUnknown = K8SNodeConditionStatusKey.String("unknown") -) - -// Enum values for k8s.node.condition.type -var ( - // The node is healthy and ready to accept pods - // Stability: development - K8SNodeConditionTypeReady = K8SNodeConditionTypeKey.String("Ready") - // Pressure exists on the disk size—that is, if the disk capacity is low - // Stability: development - K8SNodeConditionTypeDiskPressure = K8SNodeConditionTypeKey.String("DiskPressure") - // Pressure exists on the node memory—that is, if the node memory is low - // Stability: development - K8SNodeConditionTypeMemoryPressure = K8SNodeConditionTypeKey.String("MemoryPressure") - // Pressure exists on the processes—that is, if there are too many processes - // on the node - // Stability: development - K8SNodeConditionTypePIDPressure = K8SNodeConditionTypeKey.String("PIDPressure") - // The network for the node is not correctly configured - // Stability: development - K8SNodeConditionTypeNetworkUnavailable = K8SNodeConditionTypeKey.String("NetworkUnavailable") -) - -// Enum values for k8s.volume.type -var ( - // A [persistentVolumeClaim] volume - // Stability: development - // - // [persistentVolumeClaim]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim - K8SVolumeTypePersistentVolumeClaim = K8SVolumeTypeKey.String("persistentVolumeClaim") - // A [configMap] volume - // Stability: development - // - // [configMap]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#configmap - K8SVolumeTypeConfigMap = K8SVolumeTypeKey.String("configMap") - // A [downwardAPI] volume - // Stability: development - // - // [downwardAPI]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#downwardapi - K8SVolumeTypeDownwardAPI = K8SVolumeTypeKey.String("downwardAPI") - // An [emptyDir] volume - // Stability: development - // - // [emptyDir]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#emptydir - K8SVolumeTypeEmptyDir = K8SVolumeTypeKey.String("emptyDir") - // A [secret] volume - // Stability: development - // - // [secret]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#secret - K8SVolumeTypeSecret = K8SVolumeTypeKey.String("secret") - // A [local] volume - // Stability: development - // - // [local]: https://v1-30.docs.kubernetes.io/docs/concepts/storage/volumes/#local - K8SVolumeTypeLocal = K8SVolumeTypeKey.String("local") -) - -// Namespace: linux -const ( - // LinuxMemorySlabStateKey is the attribute Key conforming to the - // "linux.memory.slab.state" semantic conventions. It represents the Linux Slab - // memory state. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "reclaimable", "unreclaimable" - LinuxMemorySlabStateKey = attribute.Key("linux.memory.slab.state") -) - -// Enum values for linux.memory.slab.state -var ( - // reclaimable - // Stability: development - LinuxMemorySlabStateReclaimable = LinuxMemorySlabStateKey.String("reclaimable") - // unreclaimable - // Stability: development - LinuxMemorySlabStateUnreclaimable = LinuxMemorySlabStateKey.String("unreclaimable") -) - -// Namespace: log -const ( - // LogFileNameKey is the attribute Key conforming to the "log.file.name" - // semantic conventions. It represents the basename of the file. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "audit.log" - LogFileNameKey = attribute.Key("log.file.name") - - // LogFileNameResolvedKey is the attribute Key conforming to the - // "log.file.name_resolved" semantic conventions. It represents the basename of - // the file, with symlinks resolved. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "uuid.log" - LogFileNameResolvedKey = attribute.Key("log.file.name_resolved") - - // LogFilePathKey is the attribute Key conforming to the "log.file.path" - // semantic conventions. It represents the full path to the file. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/var/log/mysql/audit.log" - LogFilePathKey = attribute.Key("log.file.path") - - // LogFilePathResolvedKey is the attribute Key conforming to the - // "log.file.path_resolved" semantic conventions. It represents the full path to - // the file, with symlinks resolved. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/var/lib/docker/uuid.log" - LogFilePathResolvedKey = attribute.Key("log.file.path_resolved") - - // LogIostreamKey is the attribute Key conforming to the "log.iostream" semantic - // conventions. It represents the stream associated with the log. See below for - // a list of well-known values. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - LogIostreamKey = attribute.Key("log.iostream") - - // LogRecordOriginalKey is the attribute Key conforming to the - // "log.record.original" semantic conventions. It represents the complete - // original Log Record. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "77 <86>1 2015-08-06T21:58:59.694Z 192.168.2.133 inactive - - - - // Something happened", "[INFO] 8/3/24 12:34:56 Something happened" - // Note: This value MAY be added when processing a Log Record which was - // originally transmitted as a string or equivalent data type AND the Body field - // of the Log Record does not contain the same value. (e.g. a syslog or a log - // record read from a file.) - LogRecordOriginalKey = attribute.Key("log.record.original") - - // LogRecordUIDKey is the attribute Key conforming to the "log.record.uid" - // semantic conventions. It represents a unique identifier for the Log Record. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "01ARZ3NDEKTSV4RRFFQ69G5FAV" - // Note: If an id is provided, other log records with the same id will be - // considered duplicates and can be removed safely. This means, that two - // distinguishable log records MUST have different values. - // The id MAY be an - // [Universally Unique Lexicographically Sortable Identifier (ULID)], but other - // identifiers (e.g. UUID) may be used as needed. - // - // [Universally Unique Lexicographically Sortable Identifier (ULID)]: https://github.com/ulid/spec - LogRecordUIDKey = attribute.Key("log.record.uid") -) - -// LogFileName returns an attribute KeyValue conforming to the "log.file.name" -// semantic conventions. It represents the basename of the file. -func LogFileName(val string) attribute.KeyValue { - return LogFileNameKey.String(val) -} - -// LogFileNameResolved returns an attribute KeyValue conforming to the -// "log.file.name_resolved" semantic conventions. It represents the basename of -// the file, with symlinks resolved. -func LogFileNameResolved(val string) attribute.KeyValue { - return LogFileNameResolvedKey.String(val) -} - -// LogFilePath returns an attribute KeyValue conforming to the "log.file.path" -// semantic conventions. It represents the full path to the file. -func LogFilePath(val string) attribute.KeyValue { - return LogFilePathKey.String(val) -} - -// LogFilePathResolved returns an attribute KeyValue conforming to the -// "log.file.path_resolved" semantic conventions. It represents the full path to -// the file, with symlinks resolved. -func LogFilePathResolved(val string) attribute.KeyValue { - return LogFilePathResolvedKey.String(val) -} - -// LogRecordOriginal returns an attribute KeyValue conforming to the -// "log.record.original" semantic conventions. It represents the complete -// original Log Record. -func LogRecordOriginal(val string) attribute.KeyValue { - return LogRecordOriginalKey.String(val) -} - -// LogRecordUID returns an attribute KeyValue conforming to the "log.record.uid" -// semantic conventions. It represents a unique identifier for the Log Record. -func LogRecordUID(val string) attribute.KeyValue { - return LogRecordUIDKey.String(val) -} - -// Enum values for log.iostream -var ( - // Logs from stdout stream - // Stability: development - LogIostreamStdout = LogIostreamKey.String("stdout") - // Events from stderr stream - // Stability: development - LogIostreamStderr = LogIostreamKey.String("stderr") -) - -// Namespace: mainframe -const ( - // MainframeLparNameKey is the attribute Key conforming to the - // "mainframe.lpar.name" semantic conventions. It represents the name of the - // logical partition that hosts a systems with a mainframe operating system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "LPAR01" - MainframeLparNameKey = attribute.Key("mainframe.lpar.name") -) - -// MainframeLparName returns an attribute KeyValue conforming to the -// "mainframe.lpar.name" semantic conventions. It represents the name of the -// logical partition that hosts a systems with a mainframe operating system. -func MainframeLparName(val string) attribute.KeyValue { - return MainframeLparNameKey.String(val) -} - -// Namespace: messaging -const ( - // MessagingBatchMessageCountKey is the attribute Key conforming to the - // "messaging.batch.message_count" semantic conventions. It represents the - // number of messages sent, received, or processed in the scope of the batching - // operation. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 0, 1, 2 - // Note: Instrumentations SHOULD NOT set `messaging.batch.message_count` on - // spans that operate with a single message. When a messaging client library - // supports both batch and single-message API for the same operation, - // instrumentations SHOULD use `messaging.batch.message_count` for batching APIs - // and SHOULD NOT use it for single-message APIs. - MessagingBatchMessageCountKey = attribute.Key("messaging.batch.message_count") - - // MessagingClientIDKey is the attribute Key conforming to the - // "messaging.client.id" semantic conventions. It represents a unique identifier - // for the client that consumes or produces a message. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "client-5", "myhost@8742@s8083jm" - MessagingClientIDKey = attribute.Key("messaging.client.id") - - // MessagingConsumerGroupNameKey is the attribute Key conforming to the - // "messaging.consumer.group.name" semantic conventions. It represents the name - // of the consumer group with which a consumer is associated. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-group", "indexer" - // Note: Semantic conventions for individual messaging systems SHOULD document - // whether `messaging.consumer.group.name` is applicable and what it means in - // the context of that system. - MessagingConsumerGroupNameKey = attribute.Key("messaging.consumer.group.name") - - // MessagingDestinationAnonymousKey is the attribute Key conforming to the - // "messaging.destination.anonymous" semantic conventions. It represents a - // boolean that is true if the message destination is anonymous (could be - // unnamed or have auto-generated name). - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - MessagingDestinationAnonymousKey = attribute.Key("messaging.destination.anonymous") - - // MessagingDestinationNameKey is the attribute Key conforming to the - // "messaging.destination.name" semantic conventions. It represents the message - // destination name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "MyQueue", "MyTopic" - // Note: Destination name SHOULD uniquely identify a specific queue, topic or - // other entity within the broker. If - // the broker doesn't have such notion, the destination name SHOULD uniquely - // identify the broker. - MessagingDestinationNameKey = attribute.Key("messaging.destination.name") - - // MessagingDestinationPartitionIDKey is the attribute Key conforming to the - // "messaging.destination.partition.id" semantic conventions. It represents the - // identifier of the partition messages are sent to or received from, unique - // within the `messaging.destination.name`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1 - MessagingDestinationPartitionIDKey = attribute.Key("messaging.destination.partition.id") - - // MessagingDestinationSubscriptionNameKey is the attribute Key conforming to - // the "messaging.destination.subscription.name" semantic conventions. It - // represents the name of the destination subscription from which a message is - // consumed. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "subscription-a" - // Note: Semantic conventions for individual messaging systems SHOULD document - // whether `messaging.destination.subscription.name` is applicable and what it - // means in the context of that system. - MessagingDestinationSubscriptionNameKey = attribute.Key("messaging.destination.subscription.name") - - // MessagingDestinationTemplateKey is the attribute Key conforming to the - // "messaging.destination.template" semantic conventions. It represents the low - // cardinality representation of the messaging destination name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/customers/{customerId}" - // Note: Destination names could be constructed from templates. An example would - // be a destination name involving a user name or product id. Although the - // destination name in this case is of high cardinality, the underlying template - // is of low cardinality and can be effectively used for grouping and - // aggregation. - MessagingDestinationTemplateKey = attribute.Key("messaging.destination.template") - - // MessagingDestinationTemporaryKey is the attribute Key conforming to the - // "messaging.destination.temporary" semantic conventions. It represents a - // boolean that is true if the message destination is temporary and might not - // exist anymore after messages are processed. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - MessagingDestinationTemporaryKey = attribute.Key("messaging.destination.temporary") - - // MessagingEventHubsMessageEnqueuedTimeKey is the attribute Key conforming to - // the "messaging.eventhubs.message.enqueued_time" semantic conventions. It - // represents the UTC epoch seconds at which the message has been accepted and - // stored in the entity. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingEventHubsMessageEnqueuedTimeKey = attribute.Key("messaging.eventhubs.message.enqueued_time") - - // MessagingGCPPubSubMessageAckDeadlineKey is the attribute Key conforming to - // the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It - // represents the ack deadline in seconds set for the modify ack deadline - // request. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingGCPPubSubMessageAckDeadlineKey = attribute.Key("messaging.gcp_pubsub.message.ack_deadline") - - // MessagingGCPPubSubMessageAckIDKey is the attribute Key conforming to the - // "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the - // ack id for a given message. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: ack_id - MessagingGCPPubSubMessageAckIDKey = attribute.Key("messaging.gcp_pubsub.message.ack_id") - - // MessagingGCPPubSubMessageDeliveryAttemptKey is the attribute Key conforming - // to the "messaging.gcp_pubsub.message.delivery_attempt" semantic conventions. - // It represents the delivery attempt for a given message. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingGCPPubSubMessageDeliveryAttemptKey = attribute.Key("messaging.gcp_pubsub.message.delivery_attempt") - - // MessagingGCPPubSubMessageOrderingKeyKey is the attribute Key conforming to - // the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It - // represents the ordering key for a given message. If the attribute is not - // present, the message does not have an ordering key. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: ordering_key - MessagingGCPPubSubMessageOrderingKeyKey = attribute.Key("messaging.gcp_pubsub.message.ordering_key") - - // MessagingKafkaMessageKeyKey is the attribute Key conforming to the - // "messaging.kafka.message.key" semantic conventions. It represents the message - // keys in Kafka are used for grouping alike messages to ensure they're - // processed on the same partition. They differ from `messaging.message.id` in - // that they're not unique. If the key is `null`, the attribute MUST NOT be set. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: myKey - // Note: If the key type is not string, it's string representation has to be - // supplied for the attribute. If the key has no unambiguous, canonical string - // form, don't include its value. - MessagingKafkaMessageKeyKey = attribute.Key("messaging.kafka.message.key") - - // MessagingKafkaMessageTombstoneKey is the attribute Key conforming to the - // "messaging.kafka.message.tombstone" semantic conventions. It represents a - // boolean that is true if the message is a tombstone. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - MessagingKafkaMessageTombstoneKey = attribute.Key("messaging.kafka.message.tombstone") - - // MessagingKafkaOffsetKey is the attribute Key conforming to the - // "messaging.kafka.offset" semantic conventions. It represents the offset of a - // record in the corresponding Kafka partition. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingKafkaOffsetKey = attribute.Key("messaging.kafka.offset") - - // MessagingMessageBodySizeKey is the attribute Key conforming to the - // "messaging.message.body.size" semantic conventions. It represents the size of - // the message body in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Note: This can refer to both the compressed or uncompressed body size. If - // both sizes are known, the uncompressed - // body size should be used. - MessagingMessageBodySizeKey = attribute.Key("messaging.message.body.size") - - // MessagingMessageConversationIDKey is the attribute Key conforming to the - // "messaging.message.conversation_id" semantic conventions. It represents the - // conversation ID identifying the conversation to which the message belongs, - // represented as a string. Sometimes called "Correlation ID". - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: MyConversationId - MessagingMessageConversationIDKey = attribute.Key("messaging.message.conversation_id") - - // MessagingMessageEnvelopeSizeKey is the attribute Key conforming to the - // "messaging.message.envelope.size" semantic conventions. It represents the - // size of the message body and metadata in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Note: This can refer to both the compressed or uncompressed size. If both - // sizes are known, the uncompressed - // size should be used. - MessagingMessageEnvelopeSizeKey = attribute.Key("messaging.message.envelope.size") - - // MessagingMessageIDKey is the attribute Key conforming to the - // "messaging.message.id" semantic conventions. It represents a value used by - // the messaging system as an identifier for the message, represented as a - // string. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 452a7c7c7c7048c2f887f61572b18fc2 - MessagingMessageIDKey = attribute.Key("messaging.message.id") - - // MessagingOperationNameKey is the attribute Key conforming to the - // "messaging.operation.name" semantic conventions. It represents the - // system-specific name of the messaging operation. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ack", "nack", "send" - MessagingOperationNameKey = attribute.Key("messaging.operation.name") - - // MessagingOperationTypeKey is the attribute Key conforming to the - // "messaging.operation.type" semantic conventions. It represents a string - // identifying the type of the messaging operation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: If a custom value is used, it MUST be of low cardinality. - MessagingOperationTypeKey = attribute.Key("messaging.operation.type") - - // MessagingRabbitMQDestinationRoutingKeyKey is the attribute Key conforming to - // the "messaging.rabbitmq.destination.routing_key" semantic conventions. It - // represents the rabbitMQ message routing key. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: myKey - MessagingRabbitMQDestinationRoutingKeyKey = attribute.Key("messaging.rabbitmq.destination.routing_key") - - // MessagingRabbitMQMessageDeliveryTagKey is the attribute Key conforming to the - // "messaging.rabbitmq.message.delivery_tag" semantic conventions. It represents - // the rabbitMQ message delivery tag. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingRabbitMQMessageDeliveryTagKey = attribute.Key("messaging.rabbitmq.message.delivery_tag") - - // MessagingRocketMQConsumptionModelKey is the attribute Key conforming to the - // "messaging.rocketmq.consumption_model" semantic conventions. It represents - // the model of message consumption. This only applies to consumer spans. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - MessagingRocketMQConsumptionModelKey = attribute.Key("messaging.rocketmq.consumption_model") - - // MessagingRocketMQMessageDelayTimeLevelKey is the attribute Key conforming to - // the "messaging.rocketmq.message.delay_time_level" semantic conventions. It - // represents the delay time level for delay message, which determines the - // message delay time. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingRocketMQMessageDelayTimeLevelKey = attribute.Key("messaging.rocketmq.message.delay_time_level") - - // MessagingRocketMQMessageDeliveryTimestampKey is the attribute Key conforming - // to the "messaging.rocketmq.message.delivery_timestamp" semantic conventions. - // It represents the timestamp in milliseconds that the delay message is - // expected to be delivered to consumer. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingRocketMQMessageDeliveryTimestampKey = attribute.Key("messaging.rocketmq.message.delivery_timestamp") - - // MessagingRocketMQMessageGroupKey is the attribute Key conforming to the - // "messaging.rocketmq.message.group" semantic conventions. It represents the it - // is essential for FIFO message. Messages that belong to the same message group - // are always processed one by one within the same consumer group. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: myMessageGroup - MessagingRocketMQMessageGroupKey = attribute.Key("messaging.rocketmq.message.group") - - // MessagingRocketMQMessageKeysKey is the attribute Key conforming to the - // "messaging.rocketmq.message.keys" semantic conventions. It represents the - // key(s) of message, another way to mark message besides message id. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "keyA", "keyB" - MessagingRocketMQMessageKeysKey = attribute.Key("messaging.rocketmq.message.keys") - - // MessagingRocketMQMessageTagKey is the attribute Key conforming to the - // "messaging.rocketmq.message.tag" semantic conventions. It represents the - // secondary classifier of message besides topic. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: tagA - MessagingRocketMQMessageTagKey = attribute.Key("messaging.rocketmq.message.tag") - - // MessagingRocketMQMessageTypeKey is the attribute Key conforming to the - // "messaging.rocketmq.message.type" semantic conventions. It represents the - // type of message. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - MessagingRocketMQMessageTypeKey = attribute.Key("messaging.rocketmq.message.type") - - // MessagingRocketMQNamespaceKey is the attribute Key conforming to the - // "messaging.rocketmq.namespace" semantic conventions. It represents the - // namespace of RocketMQ resources, resources in different namespaces are - // individual. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: myNamespace - MessagingRocketMQNamespaceKey = attribute.Key("messaging.rocketmq.namespace") - - // MessagingServiceBusDispositionStatusKey is the attribute Key conforming to - // the "messaging.servicebus.disposition_status" semantic conventions. It - // represents the describes the [settlement type]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [settlement type]: https://learn.microsoft.com/azure/service-bus-messaging/message-transfers-locks-settlement#peeklock - MessagingServiceBusDispositionStatusKey = attribute.Key("messaging.servicebus.disposition_status") - - // MessagingServiceBusMessageDeliveryCountKey is the attribute Key conforming to - // the "messaging.servicebus.message.delivery_count" semantic conventions. It - // represents the number of deliveries that have been attempted for this - // message. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingServiceBusMessageDeliveryCountKey = attribute.Key("messaging.servicebus.message.delivery_count") - - // MessagingServiceBusMessageEnqueuedTimeKey is the attribute Key conforming to - // the "messaging.servicebus.message.enqueued_time" semantic conventions. It - // represents the UTC epoch seconds at which the message has been accepted and - // stored in the entity. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - MessagingServiceBusMessageEnqueuedTimeKey = attribute.Key("messaging.servicebus.message.enqueued_time") - - // MessagingSystemKey is the attribute Key conforming to the "messaging.system" - // semantic conventions. It represents the messaging system as identified by the - // client instrumentation. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: The actual messaging system may differ from the one known by the - // client. For example, when using Kafka client libraries to communicate with - // Azure Event Hubs, the `messaging.system` is set to `kafka` based on the - // instrumentation's best knowledge. - MessagingSystemKey = attribute.Key("messaging.system") -) - -// MessagingBatchMessageCount returns an attribute KeyValue conforming to the -// "messaging.batch.message_count" semantic conventions. It represents the number -// of messages sent, received, or processed in the scope of the batching -// operation. -func MessagingBatchMessageCount(val int) attribute.KeyValue { - return MessagingBatchMessageCountKey.Int(val) -} - -// MessagingClientID returns an attribute KeyValue conforming to the -// "messaging.client.id" semantic conventions. It represents a unique identifier -// for the client that consumes or produces a message. -func MessagingClientID(val string) attribute.KeyValue { - return MessagingClientIDKey.String(val) -} - -// MessagingConsumerGroupName returns an attribute KeyValue conforming to the -// "messaging.consumer.group.name" semantic conventions. It represents the name -// of the consumer group with which a consumer is associated. -func MessagingConsumerGroupName(val string) attribute.KeyValue { - return MessagingConsumerGroupNameKey.String(val) -} - -// MessagingDestinationAnonymous returns an attribute KeyValue conforming to the -// "messaging.destination.anonymous" semantic conventions. It represents a -// boolean that is true if the message destination is anonymous (could be unnamed -// or have auto-generated name). -func MessagingDestinationAnonymous(val bool) attribute.KeyValue { - return MessagingDestinationAnonymousKey.Bool(val) -} - -// MessagingDestinationName returns an attribute KeyValue conforming to the -// "messaging.destination.name" semantic conventions. It represents the message -// destination name. -func MessagingDestinationName(val string) attribute.KeyValue { - return MessagingDestinationNameKey.String(val) -} - -// MessagingDestinationPartitionID returns an attribute KeyValue conforming to -// the "messaging.destination.partition.id" semantic conventions. It represents -// the identifier of the partition messages are sent to or received from, unique -// within the `messaging.destination.name`. -func MessagingDestinationPartitionID(val string) attribute.KeyValue { - return MessagingDestinationPartitionIDKey.String(val) -} - -// MessagingDestinationSubscriptionName returns an attribute KeyValue conforming -// to the "messaging.destination.subscription.name" semantic conventions. It -// represents the name of the destination subscription from which a message is -// consumed. -func MessagingDestinationSubscriptionName(val string) attribute.KeyValue { - return MessagingDestinationSubscriptionNameKey.String(val) -} - -// MessagingDestinationTemplate returns an attribute KeyValue conforming to the -// "messaging.destination.template" semantic conventions. It represents the low -// cardinality representation of the messaging destination name. -func MessagingDestinationTemplate(val string) attribute.KeyValue { - return MessagingDestinationTemplateKey.String(val) -} - -// MessagingDestinationTemporary returns an attribute KeyValue conforming to the -// "messaging.destination.temporary" semantic conventions. It represents a -// boolean that is true if the message destination is temporary and might not -// exist anymore after messages are processed. -func MessagingDestinationTemporary(val bool) attribute.KeyValue { - return MessagingDestinationTemporaryKey.Bool(val) -} - -// MessagingEventHubsMessageEnqueuedTime returns an attribute KeyValue conforming -// to the "messaging.eventhubs.message.enqueued_time" semantic conventions. It -// represents the UTC epoch seconds at which the message has been accepted and -// stored in the entity. -func MessagingEventHubsMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingEventHubsMessageEnqueuedTimeKey.Int(val) -} - -// MessagingGCPPubSubMessageAckDeadline returns an attribute KeyValue conforming -// to the "messaging.gcp_pubsub.message.ack_deadline" semantic conventions. It -// represents the ack deadline in seconds set for the modify ack deadline -// request. -func MessagingGCPPubSubMessageAckDeadline(val int) attribute.KeyValue { - return MessagingGCPPubSubMessageAckDeadlineKey.Int(val) -} - -// MessagingGCPPubSubMessageAckID returns an attribute KeyValue conforming to the -// "messaging.gcp_pubsub.message.ack_id" semantic conventions. It represents the -// ack id for a given message. -func MessagingGCPPubSubMessageAckID(val string) attribute.KeyValue { - return MessagingGCPPubSubMessageAckIDKey.String(val) -} - -// MessagingGCPPubSubMessageDeliveryAttempt returns an attribute KeyValue -// conforming to the "messaging.gcp_pubsub.message.delivery_attempt" semantic -// conventions. It represents the delivery attempt for a given message. -func MessagingGCPPubSubMessageDeliveryAttempt(val int) attribute.KeyValue { - return MessagingGCPPubSubMessageDeliveryAttemptKey.Int(val) -} - -// MessagingGCPPubSubMessageOrderingKey returns an attribute KeyValue conforming -// to the "messaging.gcp_pubsub.message.ordering_key" semantic conventions. It -// represents the ordering key for a given message. If the attribute is not -// present, the message does not have an ordering key. -func MessagingGCPPubSubMessageOrderingKey(val string) attribute.KeyValue { - return MessagingGCPPubSubMessageOrderingKeyKey.String(val) -} - -// MessagingKafkaMessageKey returns an attribute KeyValue conforming to the -// "messaging.kafka.message.key" semantic conventions. It represents the message -// keys in Kafka are used for grouping alike messages to ensure they're processed -// on the same partition. They differ from `messaging.message.id` in that they're -// not unique. If the key is `null`, the attribute MUST NOT be set. -func MessagingKafkaMessageKey(val string) attribute.KeyValue { - return MessagingKafkaMessageKeyKey.String(val) -} - -// MessagingKafkaMessageTombstone returns an attribute KeyValue conforming to the -// "messaging.kafka.message.tombstone" semantic conventions. It represents a -// boolean that is true if the message is a tombstone. -func MessagingKafkaMessageTombstone(val bool) attribute.KeyValue { - return MessagingKafkaMessageTombstoneKey.Bool(val) -} - -// MessagingKafkaOffset returns an attribute KeyValue conforming to the -// "messaging.kafka.offset" semantic conventions. It represents the offset of a -// record in the corresponding Kafka partition. -func MessagingKafkaOffset(val int) attribute.KeyValue { - return MessagingKafkaOffsetKey.Int(val) -} - -// MessagingMessageBodySize returns an attribute KeyValue conforming to the -// "messaging.message.body.size" semantic conventions. It represents the size of -// the message body in bytes. -func MessagingMessageBodySize(val int) attribute.KeyValue { - return MessagingMessageBodySizeKey.Int(val) -} - -// MessagingMessageConversationID returns an attribute KeyValue conforming to the -// "messaging.message.conversation_id" semantic conventions. It represents the -// conversation ID identifying the conversation to which the message belongs, -// represented as a string. Sometimes called "Correlation ID". -func MessagingMessageConversationID(val string) attribute.KeyValue { - return MessagingMessageConversationIDKey.String(val) -} - -// MessagingMessageEnvelopeSize returns an attribute KeyValue conforming to the -// "messaging.message.envelope.size" semantic conventions. It represents the size -// of the message body and metadata in bytes. -func MessagingMessageEnvelopeSize(val int) attribute.KeyValue { - return MessagingMessageEnvelopeSizeKey.Int(val) -} - -// MessagingMessageID returns an attribute KeyValue conforming to the -// "messaging.message.id" semantic conventions. It represents a value used by the -// messaging system as an identifier for the message, represented as a string. -func MessagingMessageID(val string) attribute.KeyValue { - return MessagingMessageIDKey.String(val) -} - -// MessagingOperationName returns an attribute KeyValue conforming to the -// "messaging.operation.name" semantic conventions. It represents the -// system-specific name of the messaging operation. -func MessagingOperationName(val string) attribute.KeyValue { - return MessagingOperationNameKey.String(val) -} - -// MessagingRabbitMQDestinationRoutingKey returns an attribute KeyValue -// conforming to the "messaging.rabbitmq.destination.routing_key" semantic -// conventions. It represents the rabbitMQ message routing key. -func MessagingRabbitMQDestinationRoutingKey(val string) attribute.KeyValue { - return MessagingRabbitMQDestinationRoutingKeyKey.String(val) -} - -// MessagingRabbitMQMessageDeliveryTag returns an attribute KeyValue conforming -// to the "messaging.rabbitmq.message.delivery_tag" semantic conventions. It -// represents the rabbitMQ message delivery tag. -func MessagingRabbitMQMessageDeliveryTag(val int) attribute.KeyValue { - return MessagingRabbitMQMessageDeliveryTagKey.Int(val) -} - -// MessagingRocketMQMessageDelayTimeLevel returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delay_time_level" semantic -// conventions. It represents the delay time level for delay message, which -// determines the message delay time. -func MessagingRocketMQMessageDelayTimeLevel(val int) attribute.KeyValue { - return MessagingRocketMQMessageDelayTimeLevelKey.Int(val) -} - -// MessagingRocketMQMessageDeliveryTimestamp returns an attribute KeyValue -// conforming to the "messaging.rocketmq.message.delivery_timestamp" semantic -// conventions. It represents the timestamp in milliseconds that the delay -// message is expected to be delivered to consumer. -func MessagingRocketMQMessageDeliveryTimestamp(val int) attribute.KeyValue { - return MessagingRocketMQMessageDeliveryTimestampKey.Int(val) -} - -// MessagingRocketMQMessageGroup returns an attribute KeyValue conforming to the -// "messaging.rocketmq.message.group" semantic conventions. It represents the it -// is essential for FIFO message. Messages that belong to the same message group -// are always processed one by one within the same consumer group. -func MessagingRocketMQMessageGroup(val string) attribute.KeyValue { - return MessagingRocketMQMessageGroupKey.String(val) -} - -// MessagingRocketMQMessageKeys returns an attribute KeyValue conforming to the -// "messaging.rocketmq.message.keys" semantic conventions. It represents the -// key(s) of message, another way to mark message besides message id. -func MessagingRocketMQMessageKeys(val ...string) attribute.KeyValue { - return MessagingRocketMQMessageKeysKey.StringSlice(val) -} - -// MessagingRocketMQMessageTag returns an attribute KeyValue conforming to the -// "messaging.rocketmq.message.tag" semantic conventions. It represents the -// secondary classifier of message besides topic. -func MessagingRocketMQMessageTag(val string) attribute.KeyValue { - return MessagingRocketMQMessageTagKey.String(val) -} - -// MessagingRocketMQNamespace returns an attribute KeyValue conforming to the -// "messaging.rocketmq.namespace" semantic conventions. It represents the -// namespace of RocketMQ resources, resources in different namespaces are -// individual. -func MessagingRocketMQNamespace(val string) attribute.KeyValue { - return MessagingRocketMQNamespaceKey.String(val) -} - -// MessagingServiceBusMessageDeliveryCount returns an attribute KeyValue -// conforming to the "messaging.servicebus.message.delivery_count" semantic -// conventions. It represents the number of deliveries that have been attempted -// for this message. -func MessagingServiceBusMessageDeliveryCount(val int) attribute.KeyValue { - return MessagingServiceBusMessageDeliveryCountKey.Int(val) -} - -// MessagingServiceBusMessageEnqueuedTime returns an attribute KeyValue -// conforming to the "messaging.servicebus.message.enqueued_time" semantic -// conventions. It represents the UTC epoch seconds at which the message has been -// accepted and stored in the entity. -func MessagingServiceBusMessageEnqueuedTime(val int) attribute.KeyValue { - return MessagingServiceBusMessageEnqueuedTimeKey.Int(val) -} - -// Enum values for messaging.operation.type -var ( - // A message is created. "Create" spans always refer to a single message and are - // used to provide a unique creation context for messages in batch sending - // scenarios. - // - // Stability: development - MessagingOperationTypeCreate = MessagingOperationTypeKey.String("create") - // One or more messages are provided for sending to an intermediary. If a single - // message is sent, the context of the "Send" span can be used as the creation - // context and no "Create" span needs to be created. - // - // Stability: development - MessagingOperationTypeSend = MessagingOperationTypeKey.String("send") - // One or more messages are requested by a consumer. This operation refers to - // pull-based scenarios, where consumers explicitly call methods of messaging - // SDKs to receive messages. - // - // Stability: development - MessagingOperationTypeReceive = MessagingOperationTypeKey.String("receive") - // One or more messages are processed by a consumer. - // - // Stability: development - MessagingOperationTypeProcess = MessagingOperationTypeKey.String("process") - // One or more messages are settled. - // - // Stability: development - MessagingOperationTypeSettle = MessagingOperationTypeKey.String("settle") -) - -// Enum values for messaging.rocketmq.consumption_model -var ( - // Clustering consumption model - // Stability: development - MessagingRocketMQConsumptionModelClustering = MessagingRocketMQConsumptionModelKey.String("clustering") - // Broadcasting consumption model - // Stability: development - MessagingRocketMQConsumptionModelBroadcasting = MessagingRocketMQConsumptionModelKey.String("broadcasting") -) - -// Enum values for messaging.rocketmq.message.type -var ( - // Normal message - // Stability: development - MessagingRocketMQMessageTypeNormal = MessagingRocketMQMessageTypeKey.String("normal") - // FIFO message - // Stability: development - MessagingRocketMQMessageTypeFifo = MessagingRocketMQMessageTypeKey.String("fifo") - // Delay message - // Stability: development - MessagingRocketMQMessageTypeDelay = MessagingRocketMQMessageTypeKey.String("delay") - // Transaction message - // Stability: development - MessagingRocketMQMessageTypeTransaction = MessagingRocketMQMessageTypeKey.String("transaction") -) - -// Enum values for messaging.servicebus.disposition_status -var ( - // Message is completed - // Stability: development - MessagingServiceBusDispositionStatusComplete = MessagingServiceBusDispositionStatusKey.String("complete") - // Message is abandoned - // Stability: development - MessagingServiceBusDispositionStatusAbandon = MessagingServiceBusDispositionStatusKey.String("abandon") - // Message is sent to dead letter queue - // Stability: development - MessagingServiceBusDispositionStatusDeadLetter = MessagingServiceBusDispositionStatusKey.String("dead_letter") - // Message is deferred - // Stability: development - MessagingServiceBusDispositionStatusDefer = MessagingServiceBusDispositionStatusKey.String("defer") -) - -// Enum values for messaging.system -var ( - // Apache ActiveMQ - // Stability: development - MessagingSystemActiveMQ = MessagingSystemKey.String("activemq") - // Amazon Simple Notification Service (SNS) - // Stability: development - MessagingSystemAWSSNS = MessagingSystemKey.String("aws.sns") - // Amazon Simple Queue Service (SQS) - // Stability: development - MessagingSystemAWSSQS = MessagingSystemKey.String("aws_sqs") - // Azure Event Grid - // Stability: development - MessagingSystemEventGrid = MessagingSystemKey.String("eventgrid") - // Azure Event Hubs - // Stability: development - MessagingSystemEventHubs = MessagingSystemKey.String("eventhubs") - // Azure Service Bus - // Stability: development - MessagingSystemServiceBus = MessagingSystemKey.String("servicebus") - // Google Cloud Pub/Sub - // Stability: development - MessagingSystemGCPPubSub = MessagingSystemKey.String("gcp_pubsub") - // Java Message Service - // Stability: development - MessagingSystemJMS = MessagingSystemKey.String("jms") - // Apache Kafka - // Stability: development - MessagingSystemKafka = MessagingSystemKey.String("kafka") - // RabbitMQ - // Stability: development - MessagingSystemRabbitMQ = MessagingSystemKey.String("rabbitmq") - // Apache RocketMQ - // Stability: development - MessagingSystemRocketMQ = MessagingSystemKey.String("rocketmq") - // Apache Pulsar - // Stability: development - MessagingSystemPulsar = MessagingSystemKey.String("pulsar") -) - -// Namespace: network -const ( - // NetworkCarrierICCKey is the attribute Key conforming to the - // "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 - // alpha-2 2-character country code associated with the mobile carrier network. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: DE - NetworkCarrierICCKey = attribute.Key("network.carrier.icc") - - // NetworkCarrierMCCKey is the attribute Key conforming to the - // "network.carrier.mcc" semantic conventions. It represents the mobile carrier - // country code. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 310 - NetworkCarrierMCCKey = attribute.Key("network.carrier.mcc") - - // NetworkCarrierMNCKey is the attribute Key conforming to the - // "network.carrier.mnc" semantic conventions. It represents the mobile carrier - // network code. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 001 - NetworkCarrierMNCKey = attribute.Key("network.carrier.mnc") - - // NetworkCarrierNameKey is the attribute Key conforming to the - // "network.carrier.name" semantic conventions. It represents the name of the - // mobile carrier. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: sprint - NetworkCarrierNameKey = attribute.Key("network.carrier.name") - - // NetworkConnectionStateKey is the attribute Key conforming to the - // "network.connection.state" semantic conventions. It represents the state of - // network connection. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "close_wait" - // Note: Connection states are defined as part of the [rfc9293] - // - // [rfc9293]: https://datatracker.ietf.org/doc/html/rfc9293#section-3.3.2 - NetworkConnectionStateKey = attribute.Key("network.connection.state") - - // NetworkConnectionSubtypeKey is the attribute Key conforming to the - // "network.connection.subtype" semantic conventions. It represents the this - // describes more details regarding the connection.type. It may be the type of - // cell technology connection, but it could be used for describing details about - // a wifi connection. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: LTE - NetworkConnectionSubtypeKey = attribute.Key("network.connection.subtype") - - // NetworkConnectionTypeKey is the attribute Key conforming to the - // "network.connection.type" semantic conventions. It represents the internet - // connection type. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: wifi - NetworkConnectionTypeKey = attribute.Key("network.connection.type") - - // NetworkInterfaceNameKey is the attribute Key conforming to the - // "network.interface.name" semantic conventions. It represents the network - // interface name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "lo", "eth0" - NetworkInterfaceNameKey = attribute.Key("network.interface.name") - - // NetworkIODirectionKey is the attribute Key conforming to the - // "network.io.direction" semantic conventions. It represents the network IO - // operation direction. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "transmit" - NetworkIODirectionKey = attribute.Key("network.io.direction") - - // NetworkLocalAddressKey is the attribute Key conforming to the - // "network.local.address" semantic conventions. It represents the local address - // of the network connection - IP address or Unix domain socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "10.1.2.80", "/tmp/my.sock" - NetworkLocalAddressKey = attribute.Key("network.local.address") - - // NetworkLocalPortKey is the attribute Key conforming to the - // "network.local.port" semantic conventions. It represents the local port - // number of the network connection. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 65123 - NetworkLocalPortKey = attribute.Key("network.local.port") - - // NetworkPeerAddressKey is the attribute Key conforming to the - // "network.peer.address" semantic conventions. It represents the peer address - // of the network connection - IP address or Unix domain socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "10.1.2.80", "/tmp/my.sock" - NetworkPeerAddressKey = attribute.Key("network.peer.address") - - // NetworkPeerPortKey is the attribute Key conforming to the "network.peer.port" - // semantic conventions. It represents the peer port number of the network - // connection. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 65123 - NetworkPeerPortKey = attribute.Key("network.peer.port") - - // NetworkProtocolNameKey is the attribute Key conforming to the - // "network.protocol.name" semantic conventions. It represents the - // [OSI application layer] or non-OSI equivalent. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "amqp", "http", "mqtt" - // Note: The value SHOULD be normalized to lowercase. - // - // [OSI application layer]: https://wikipedia.org/wiki/Application_layer - NetworkProtocolNameKey = attribute.Key("network.protocol.name") - - // NetworkProtocolVersionKey is the attribute Key conforming to the - // "network.protocol.version" semantic conventions. It represents the actual - // version of the protocol used for network communication. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "1.1", "2" - // Note: If protocol version is subject to negotiation (for example using [ALPN] - // ), this attribute SHOULD be set to the negotiated version. If the actual - // protocol version is not known, this attribute SHOULD NOT be set. - // - // [ALPN]: https://www.rfc-editor.org/rfc/rfc7301.html - NetworkProtocolVersionKey = attribute.Key("network.protocol.version") - - // NetworkTransportKey is the attribute Key conforming to the - // "network.transport" semantic conventions. It represents the - // [OSI transport layer] or [inter-process communication method]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "tcp", "udp" - // Note: The value SHOULD be normalized to lowercase. - // - // Consider always setting the transport when setting a port number, since - // a port number is ambiguous without knowing the transport. For example - // different processes could be listening on TCP port 12345 and UDP port 12345. - // - // [OSI transport layer]: https://wikipedia.org/wiki/Transport_layer - // [inter-process communication method]: https://wikipedia.org/wiki/Inter-process_communication - NetworkTransportKey = attribute.Key("network.transport") - - // NetworkTypeKey is the attribute Key conforming to the "network.type" semantic - // conventions. It represents the [OSI network layer] or non-OSI equivalent. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "ipv4", "ipv6" - // Note: The value SHOULD be normalized to lowercase. - // - // [OSI network layer]: https://wikipedia.org/wiki/Network_layer - NetworkTypeKey = attribute.Key("network.type") -) - -// NetworkCarrierICC returns an attribute KeyValue conforming to the -// "network.carrier.icc" semantic conventions. It represents the ISO 3166-1 -// alpha-2 2-character country code associated with the mobile carrier network. -func NetworkCarrierICC(val string) attribute.KeyValue { - return NetworkCarrierICCKey.String(val) -} - -// NetworkCarrierMCC returns an attribute KeyValue conforming to the -// "network.carrier.mcc" semantic conventions. It represents the mobile carrier -// country code. -func NetworkCarrierMCC(val string) attribute.KeyValue { - return NetworkCarrierMCCKey.String(val) -} - -// NetworkCarrierMNC returns an attribute KeyValue conforming to the -// "network.carrier.mnc" semantic conventions. It represents the mobile carrier -// network code. -func NetworkCarrierMNC(val string) attribute.KeyValue { - return NetworkCarrierMNCKey.String(val) -} - -// NetworkCarrierName returns an attribute KeyValue conforming to the -// "network.carrier.name" semantic conventions. It represents the name of the -// mobile carrier. -func NetworkCarrierName(val string) attribute.KeyValue { - return NetworkCarrierNameKey.String(val) -} - -// NetworkInterfaceName returns an attribute KeyValue conforming to the -// "network.interface.name" semantic conventions. It represents the network -// interface name. -func NetworkInterfaceName(val string) attribute.KeyValue { - return NetworkInterfaceNameKey.String(val) -} - -// NetworkLocalAddress returns an attribute KeyValue conforming to the -// "network.local.address" semantic conventions. It represents the local address -// of the network connection - IP address or Unix domain socket name. -func NetworkLocalAddress(val string) attribute.KeyValue { - return NetworkLocalAddressKey.String(val) -} - -// NetworkLocalPort returns an attribute KeyValue conforming to the -// "network.local.port" semantic conventions. It represents the local port number -// of the network connection. -func NetworkLocalPort(val int) attribute.KeyValue { - return NetworkLocalPortKey.Int(val) -} - -// NetworkPeerAddress returns an attribute KeyValue conforming to the -// "network.peer.address" semantic conventions. It represents the peer address of -// the network connection - IP address or Unix domain socket name. -func NetworkPeerAddress(val string) attribute.KeyValue { - return NetworkPeerAddressKey.String(val) -} - -// NetworkPeerPort returns an attribute KeyValue conforming to the -// "network.peer.port" semantic conventions. It represents the peer port number -// of the network connection. -func NetworkPeerPort(val int) attribute.KeyValue { - return NetworkPeerPortKey.Int(val) -} - -// NetworkProtocolName returns an attribute KeyValue conforming to the -// "network.protocol.name" semantic conventions. It represents the -// [OSI application layer] or non-OSI equivalent. -// -// [OSI application layer]: https://wikipedia.org/wiki/Application_layer -func NetworkProtocolName(val string) attribute.KeyValue { - return NetworkProtocolNameKey.String(val) -} - -// NetworkProtocolVersion returns an attribute KeyValue conforming to the -// "network.protocol.version" semantic conventions. It represents the actual -// version of the protocol used for network communication. -func NetworkProtocolVersion(val string) attribute.KeyValue { - return NetworkProtocolVersionKey.String(val) -} - -// Enum values for network.connection.state -var ( - // closed - // Stability: development - NetworkConnectionStateClosed = NetworkConnectionStateKey.String("closed") - // close_wait - // Stability: development - NetworkConnectionStateCloseWait = NetworkConnectionStateKey.String("close_wait") - // closing - // Stability: development - NetworkConnectionStateClosing = NetworkConnectionStateKey.String("closing") - // established - // Stability: development - NetworkConnectionStateEstablished = NetworkConnectionStateKey.String("established") - // fin_wait_1 - // Stability: development - NetworkConnectionStateFinWait1 = NetworkConnectionStateKey.String("fin_wait_1") - // fin_wait_2 - // Stability: development - NetworkConnectionStateFinWait2 = NetworkConnectionStateKey.String("fin_wait_2") - // last_ack - // Stability: development - NetworkConnectionStateLastAck = NetworkConnectionStateKey.String("last_ack") - // listen - // Stability: development - NetworkConnectionStateListen = NetworkConnectionStateKey.String("listen") - // syn_received - // Stability: development - NetworkConnectionStateSynReceived = NetworkConnectionStateKey.String("syn_received") - // syn_sent - // Stability: development - NetworkConnectionStateSynSent = NetworkConnectionStateKey.String("syn_sent") - // time_wait - // Stability: development - NetworkConnectionStateTimeWait = NetworkConnectionStateKey.String("time_wait") -) - -// Enum values for network.connection.subtype -var ( - // GPRS - // Stability: development - NetworkConnectionSubtypeGprs = NetworkConnectionSubtypeKey.String("gprs") - // EDGE - // Stability: development - NetworkConnectionSubtypeEdge = NetworkConnectionSubtypeKey.String("edge") - // UMTS - // Stability: development - NetworkConnectionSubtypeUmts = NetworkConnectionSubtypeKey.String("umts") - // CDMA - // Stability: development - NetworkConnectionSubtypeCdma = NetworkConnectionSubtypeKey.String("cdma") - // EVDO Rel. 0 - // Stability: development - NetworkConnectionSubtypeEvdo0 = NetworkConnectionSubtypeKey.String("evdo_0") - // EVDO Rev. A - // Stability: development - NetworkConnectionSubtypeEvdoA = NetworkConnectionSubtypeKey.String("evdo_a") - // CDMA2000 1XRTT - // Stability: development - NetworkConnectionSubtypeCdma20001xrtt = NetworkConnectionSubtypeKey.String("cdma2000_1xrtt") - // HSDPA - // Stability: development - NetworkConnectionSubtypeHsdpa = NetworkConnectionSubtypeKey.String("hsdpa") - // HSUPA - // Stability: development - NetworkConnectionSubtypeHsupa = NetworkConnectionSubtypeKey.String("hsupa") - // HSPA - // Stability: development - NetworkConnectionSubtypeHspa = NetworkConnectionSubtypeKey.String("hspa") - // IDEN - // Stability: development - NetworkConnectionSubtypeIden = NetworkConnectionSubtypeKey.String("iden") - // EVDO Rev. B - // Stability: development - NetworkConnectionSubtypeEvdoB = NetworkConnectionSubtypeKey.String("evdo_b") - // LTE - // Stability: development - NetworkConnectionSubtypeLte = NetworkConnectionSubtypeKey.String("lte") - // EHRPD - // Stability: development - NetworkConnectionSubtypeEhrpd = NetworkConnectionSubtypeKey.String("ehrpd") - // HSPAP - // Stability: development - NetworkConnectionSubtypeHspap = NetworkConnectionSubtypeKey.String("hspap") - // GSM - // Stability: development - NetworkConnectionSubtypeGsm = NetworkConnectionSubtypeKey.String("gsm") - // TD-SCDMA - // Stability: development - NetworkConnectionSubtypeTdScdma = NetworkConnectionSubtypeKey.String("td_scdma") - // IWLAN - // Stability: development - NetworkConnectionSubtypeIwlan = NetworkConnectionSubtypeKey.String("iwlan") - // 5G NR (New Radio) - // Stability: development - NetworkConnectionSubtypeNr = NetworkConnectionSubtypeKey.String("nr") - // 5G NRNSA (New Radio Non-Standalone) - // Stability: development - NetworkConnectionSubtypeNrnsa = NetworkConnectionSubtypeKey.String("nrnsa") - // LTE CA - // Stability: development - NetworkConnectionSubtypeLteCa = NetworkConnectionSubtypeKey.String("lte_ca") -) - -// Enum values for network.connection.type -var ( - // wifi - // Stability: development - NetworkConnectionTypeWifi = NetworkConnectionTypeKey.String("wifi") - // wired - // Stability: development - NetworkConnectionTypeWired = NetworkConnectionTypeKey.String("wired") - // cell - // Stability: development - NetworkConnectionTypeCell = NetworkConnectionTypeKey.String("cell") - // unavailable - // Stability: development - NetworkConnectionTypeUnavailable = NetworkConnectionTypeKey.String("unavailable") - // unknown - // Stability: development - NetworkConnectionTypeUnknown = NetworkConnectionTypeKey.String("unknown") -) - -// Enum values for network.io.direction -var ( - // transmit - // Stability: development - NetworkIODirectionTransmit = NetworkIODirectionKey.String("transmit") - // receive - // Stability: development - NetworkIODirectionReceive = NetworkIODirectionKey.String("receive") -) - -// Enum values for network.transport -var ( - // TCP - // Stability: stable - NetworkTransportTCP = NetworkTransportKey.String("tcp") - // UDP - // Stability: stable - NetworkTransportUDP = NetworkTransportKey.String("udp") - // Named or anonymous pipe. - // Stability: stable - NetworkTransportPipe = NetworkTransportKey.String("pipe") - // Unix domain socket - // Stability: stable - NetworkTransportUnix = NetworkTransportKey.String("unix") - // QUIC - // Stability: stable - NetworkTransportQUIC = NetworkTransportKey.String("quic") -) - -// Enum values for network.type -var ( - // IPv4 - // Stability: stable - NetworkTypeIPv4 = NetworkTypeKey.String("ipv4") - // IPv6 - // Stability: stable - NetworkTypeIPv6 = NetworkTypeKey.String("ipv6") -) - -// Namespace: oci -const ( - // OCIManifestDigestKey is the attribute Key conforming to the - // "oci.manifest.digest" semantic conventions. It represents the digest of the - // OCI image manifest. For container images specifically is the digest by which - // the container image is known. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "sha256:e4ca62c0d62f3e886e684806dfe9d4e0cda60d54986898173c1083856cfda0f4" - // Note: Follows [OCI Image Manifest Specification], and specifically the - // [Digest property]. - // An example can be found in [Example Image Manifest]. - // - // [OCI Image Manifest Specification]: https://github.com/opencontainers/image-spec/blob/main/manifest.md - // [Digest property]: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests - // [Example Image Manifest]: https://github.com/opencontainers/image-spec/blob/main/manifest.md#example-image-manifest - OCIManifestDigestKey = attribute.Key("oci.manifest.digest") -) - -// OCIManifestDigest returns an attribute KeyValue conforming to the -// "oci.manifest.digest" semantic conventions. It represents the digest of the -// OCI image manifest. For container images specifically is the digest by which -// the container image is known. -func OCIManifestDigest(val string) attribute.KeyValue { - return OCIManifestDigestKey.String(val) -} - -// Namespace: openai -const ( - // OpenAIRequestServiceTierKey is the attribute Key conforming to the - // "openai.request.service_tier" semantic conventions. It represents the service - // tier requested. May be a specific tier, default, or auto. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "auto", "default" - OpenAIRequestServiceTierKey = attribute.Key("openai.request.service_tier") - - // OpenAIResponseServiceTierKey is the attribute Key conforming to the - // "openai.response.service_tier" semantic conventions. It represents the - // service tier used for the response. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "scale", "default" - OpenAIResponseServiceTierKey = attribute.Key("openai.response.service_tier") - - // OpenAIResponseSystemFingerprintKey is the attribute Key conforming to the - // "openai.response.system_fingerprint" semantic conventions. It represents a - // fingerprint to track any eventual change in the Generative AI environment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "fp_44709d6fcb" - OpenAIResponseSystemFingerprintKey = attribute.Key("openai.response.system_fingerprint") -) - -// OpenAIResponseServiceTier returns an attribute KeyValue conforming to the -// "openai.response.service_tier" semantic conventions. It represents the service -// tier used for the response. -func OpenAIResponseServiceTier(val string) attribute.KeyValue { - return OpenAIResponseServiceTierKey.String(val) -} - -// OpenAIResponseSystemFingerprint returns an attribute KeyValue conforming to -// the "openai.response.system_fingerprint" semantic conventions. It represents a -// fingerprint to track any eventual change in the Generative AI environment. -func OpenAIResponseSystemFingerprint(val string) attribute.KeyValue { - return OpenAIResponseSystemFingerprintKey.String(val) -} - -// Enum values for openai.request.service_tier -var ( - // The system will utilize scale tier credits until they are exhausted. - // Stability: development - OpenAIRequestServiceTierAuto = OpenAIRequestServiceTierKey.String("auto") - // The system will utilize the default scale tier. - // Stability: development - OpenAIRequestServiceTierDefault = OpenAIRequestServiceTierKey.String("default") -) - -// Namespace: opentracing -const ( - // OpenTracingRefTypeKey is the attribute Key conforming to the - // "opentracing.ref_type" semantic conventions. It represents the parent-child - // Reference type. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: The causal relationship between a child Span and a parent Span. - OpenTracingRefTypeKey = attribute.Key("opentracing.ref_type") -) - -// Enum values for opentracing.ref_type -var ( - // The parent Span depends on the child Span in some capacity - // Stability: development - OpenTracingRefTypeChildOf = OpenTracingRefTypeKey.String("child_of") - // The parent Span doesn't depend in any way on the result of the child Span - // Stability: development - OpenTracingRefTypeFollowsFrom = OpenTracingRefTypeKey.String("follows_from") -) - -// Namespace: os -const ( - // OSBuildIDKey is the attribute Key conforming to the "os.build_id" semantic - // conventions. It represents the unique identifier for a particular build or - // compilation of the operating system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "TQ3C.230805.001.B2", "20E247", "22621" - OSBuildIDKey = attribute.Key("os.build_id") - - // OSDescriptionKey is the attribute Key conforming to the "os.description" - // semantic conventions. It represents the human readable (not intended to be - // parsed) OS version information, like e.g. reported by `ver` or - // `lsb_release -a` commands. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Microsoft Windows [Version 10.0.18363.778]", "Ubuntu 18.04.1 LTS" - OSDescriptionKey = attribute.Key("os.description") - - // OSNameKey is the attribute Key conforming to the "os.name" semantic - // conventions. It represents the human readable operating system name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "iOS", "Android", "Ubuntu" - OSNameKey = attribute.Key("os.name") - - // OSTypeKey is the attribute Key conforming to the "os.type" semantic - // conventions. It represents the operating system type. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - OSTypeKey = attribute.Key("os.type") - - // OSVersionKey is the attribute Key conforming to the "os.version" semantic - // conventions. It represents the version string of the operating system as - // defined in [Version Attributes]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "14.2.1", "18.04.1" - // - // [Version Attributes]: /docs/resource/README.md#version-attributes - OSVersionKey = attribute.Key("os.version") -) - -// OSBuildID returns an attribute KeyValue conforming to the "os.build_id" -// semantic conventions. It represents the unique identifier for a particular -// build or compilation of the operating system. -func OSBuildID(val string) attribute.KeyValue { - return OSBuildIDKey.String(val) -} - -// OSDescription returns an attribute KeyValue conforming to the "os.description" -// semantic conventions. It represents the human readable (not intended to be -// parsed) OS version information, like e.g. reported by `ver` or -// `lsb_release -a` commands. -func OSDescription(val string) attribute.KeyValue { - return OSDescriptionKey.String(val) -} - -// OSName returns an attribute KeyValue conforming to the "os.name" semantic -// conventions. It represents the human readable operating system name. -func OSName(val string) attribute.KeyValue { - return OSNameKey.String(val) -} - -// OSVersion returns an attribute KeyValue conforming to the "os.version" -// semantic conventions. It represents the version string of the operating system -// as defined in [Version Attributes]. -// -// [Version Attributes]: /docs/resource/README.md#version-attributes -func OSVersion(val string) attribute.KeyValue { - return OSVersionKey.String(val) -} - -// Enum values for os.type -var ( - // Microsoft Windows - // Stability: development - OSTypeWindows = OSTypeKey.String("windows") - // Linux - // Stability: development - OSTypeLinux = OSTypeKey.String("linux") - // Apple Darwin - // Stability: development - OSTypeDarwin = OSTypeKey.String("darwin") - // FreeBSD - // Stability: development - OSTypeFreeBSD = OSTypeKey.String("freebsd") - // NetBSD - // Stability: development - OSTypeNetBSD = OSTypeKey.String("netbsd") - // OpenBSD - // Stability: development - OSTypeOpenBSD = OSTypeKey.String("openbsd") - // DragonFly BSD - // Stability: development - OSTypeDragonflyBSD = OSTypeKey.String("dragonflybsd") - // HP-UX (Hewlett Packard Unix) - // Stability: development - OSTypeHPUX = OSTypeKey.String("hpux") - // AIX (Advanced Interactive eXecutive) - // Stability: development - OSTypeAIX = OSTypeKey.String("aix") - // SunOS, Oracle Solaris - // Stability: development - OSTypeSolaris = OSTypeKey.String("solaris") - // IBM z/OS - // Stability: development - OSTypeZOS = OSTypeKey.String("zos") -) - -// Namespace: otel -const ( - // OTelComponentNameKey is the attribute Key conforming to the - // "otel.component.name" semantic conventions. It represents a name uniquely - // identifying the instance of the OpenTelemetry component within its containing - // SDK instance. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "otlp_grpc_span_exporter/0", "custom-name" - // Note: Implementations SHOULD ensure a low cardinality for this attribute, - // even across application or SDK restarts. - // E.g. implementations MUST NOT use UUIDs as values for this attribute. - // - // Implementations MAY achieve these goals by following a - // `/` pattern, e.g. - // `batching_span_processor/0`. - // Hereby `otel.component.type` refers to the corresponding attribute value of - // the component. - // - // The value of `instance-counter` MAY be automatically assigned by the - // component and uniqueness within the enclosing SDK instance MUST be - // guaranteed. - // For example, `` MAY be implemented by using a monotonically - // increasing counter (starting with `0`), which is incremented every time an - // instance of the given component type is started. - // - // With this implementation, for example the first Batching Span Processor would - // have `batching_span_processor/0` - // as `otel.component.name`, the second one `batching_span_processor/1` and so - // on. - // These values will therefore be reused in the case of an application restart. - OTelComponentNameKey = attribute.Key("otel.component.name") - - // OTelComponentTypeKey is the attribute Key conforming to the - // "otel.component.type" semantic conventions. It represents a name identifying - // the type of the OpenTelemetry component. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "batching_span_processor", "com.example.MySpanExporter" - // Note: If none of the standardized values apply, implementations SHOULD use - // the language-defined name of the type. - // E.g. for Java the fully qualified classname SHOULD be used in this case. - OTelComponentTypeKey = attribute.Key("otel.component.type") - - // OTelScopeNameKey is the attribute Key conforming to the "otel.scope.name" - // semantic conventions. It represents the name of the instrumentation scope - ( - // `InstrumentationScope.Name` in OTLP). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "io.opentelemetry.contrib.mongodb" - OTelScopeNameKey = attribute.Key("otel.scope.name") - - // OTelScopeSchemaURLKey is the attribute Key conforming to the - // "otel.scope.schema_url" semantic conventions. It represents the schema URL of - // the instrumentation scope. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://opentelemetry.io/schemas/1.31.0" - OTelScopeSchemaURLKey = attribute.Key("otel.scope.schema_url") - - // OTelScopeVersionKey is the attribute Key conforming to the - // "otel.scope.version" semantic conventions. It represents the version of the - // instrumentation scope - (`InstrumentationScope.Version` in OTLP). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "1.0.0" - OTelScopeVersionKey = attribute.Key("otel.scope.version") - - // OTelSpanParentOriginKey is the attribute Key conforming to the - // "otel.span.parent.origin" semantic conventions. It represents the determines - // whether the span has a parent span, and if so, - // [whether it is a remote parent]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote - OTelSpanParentOriginKey = attribute.Key("otel.span.parent.origin") - - // OTelSpanSamplingResultKey is the attribute Key conforming to the - // "otel.span.sampling_result" semantic conventions. It represents the result - // value of the sampler for this span. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - OTelSpanSamplingResultKey = attribute.Key("otel.span.sampling_result") - - // OTelStatusCodeKey is the attribute Key conforming to the "otel.status_code" - // semantic conventions. It represents the name of the code, either "OK" or - // "ERROR". MUST NOT be set if the status code is UNSET. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: - OTelStatusCodeKey = attribute.Key("otel.status_code") - - // OTelStatusDescriptionKey is the attribute Key conforming to the - // "otel.status_description" semantic conventions. It represents the description - // of the Status if it has a value, otherwise not set. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "resource not found" - OTelStatusDescriptionKey = attribute.Key("otel.status_description") -) - -// OTelComponentName returns an attribute KeyValue conforming to the -// "otel.component.name" semantic conventions. It represents a name uniquely -// identifying the instance of the OpenTelemetry component within its containing -// SDK instance. -func OTelComponentName(val string) attribute.KeyValue { - return OTelComponentNameKey.String(val) -} - -// OTelScopeName returns an attribute KeyValue conforming to the -// "otel.scope.name" semantic conventions. It represents the name of the -// instrumentation scope - (`InstrumentationScope.Name` in OTLP). -func OTelScopeName(val string) attribute.KeyValue { - return OTelScopeNameKey.String(val) -} - -// OTelScopeSchemaURL returns an attribute KeyValue conforming to the -// "otel.scope.schema_url" semantic conventions. It represents the schema URL of -// the instrumentation scope. -func OTelScopeSchemaURL(val string) attribute.KeyValue { - return OTelScopeSchemaURLKey.String(val) -} - -// OTelScopeVersion returns an attribute KeyValue conforming to the -// "otel.scope.version" semantic conventions. It represents the version of the -// instrumentation scope - (`InstrumentationScope.Version` in OTLP). -func OTelScopeVersion(val string) attribute.KeyValue { - return OTelScopeVersionKey.String(val) -} - -// OTelStatusDescription returns an attribute KeyValue conforming to the -// "otel.status_description" semantic conventions. It represents the description -// of the Status if it has a value, otherwise not set. -func OTelStatusDescription(val string) attribute.KeyValue { - return OTelStatusDescriptionKey.String(val) -} - -// Enum values for otel.component.type -var ( - // The builtin SDK batching span processor - // - // Stability: development - OTelComponentTypeBatchingSpanProcessor = OTelComponentTypeKey.String("batching_span_processor") - // The builtin SDK simple span processor - // - // Stability: development - OTelComponentTypeSimpleSpanProcessor = OTelComponentTypeKey.String("simple_span_processor") - // The builtin SDK batching log record processor - // - // Stability: development - OTelComponentTypeBatchingLogProcessor = OTelComponentTypeKey.String("batching_log_processor") - // The builtin SDK simple log record processor - // - // Stability: development - OTelComponentTypeSimpleLogProcessor = OTelComponentTypeKey.String("simple_log_processor") - // OTLP span exporter over gRPC with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpGRPCSpanExporter = OTelComponentTypeKey.String("otlp_grpc_span_exporter") - // OTLP span exporter over HTTP with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPSpanExporter = OTelComponentTypeKey.String("otlp_http_span_exporter") - // OTLP span exporter over HTTP with JSON serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPJSONSpanExporter = OTelComponentTypeKey.String("otlp_http_json_span_exporter") - // Zipkin span exporter over HTTP - // - // Stability: development - OTelComponentTypeZipkinHTTPSpanExporter = OTelComponentTypeKey.String("zipkin_http_span_exporter") - // OTLP log record exporter over gRPC with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpGRPCLogExporter = OTelComponentTypeKey.String("otlp_grpc_log_exporter") - // OTLP log record exporter over HTTP with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPLogExporter = OTelComponentTypeKey.String("otlp_http_log_exporter") - // OTLP log record exporter over HTTP with JSON serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPJSONLogExporter = OTelComponentTypeKey.String("otlp_http_json_log_exporter") - // The builtin SDK periodically exporting metric reader - // - // Stability: development - OTelComponentTypePeriodicMetricReader = OTelComponentTypeKey.String("periodic_metric_reader") - // OTLP metric exporter over gRPC with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpGRPCMetricExporter = OTelComponentTypeKey.String("otlp_grpc_metric_exporter") - // OTLP metric exporter over HTTP with protobuf serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPMetricExporter = OTelComponentTypeKey.String("otlp_http_metric_exporter") - // OTLP metric exporter over HTTP with JSON serialization - // - // Stability: development - OTelComponentTypeOtlpHTTPJSONMetricExporter = OTelComponentTypeKey.String("otlp_http_json_metric_exporter") - // Prometheus metric exporter over HTTP with the default text-based format - // - // Stability: development - OTelComponentTypePrometheusHTTPTextMetricExporter = OTelComponentTypeKey.String("prometheus_http_text_metric_exporter") -) - -// Enum values for otel.span.parent.origin -var ( - // The span does not have a parent, it is a root span - // Stability: development - OTelSpanParentOriginNone = OTelSpanParentOriginKey.String("none") - // The span has a parent and the parent's span context [isRemote()] is false - // Stability: development - // - // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote - OTelSpanParentOriginLocal = OTelSpanParentOriginKey.String("local") - // The span has a parent and the parent's span context [isRemote()] is true - // Stability: development - // - // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote - OTelSpanParentOriginRemote = OTelSpanParentOriginKey.String("remote") -) - -// Enum values for otel.span.sampling_result -var ( - // The span is not sampled and not recording - // Stability: development - OTelSpanSamplingResultDrop = OTelSpanSamplingResultKey.String("DROP") - // The span is not sampled, but recording - // Stability: development - OTelSpanSamplingResultRecordOnly = OTelSpanSamplingResultKey.String("RECORD_ONLY") - // The span is sampled and recording - // Stability: development - OTelSpanSamplingResultRecordAndSample = OTelSpanSamplingResultKey.String("RECORD_AND_SAMPLE") -) - -// Enum values for otel.status_code -var ( - // The operation has been validated by an Application developer or Operator to - // have completed successfully. - // Stability: stable - OTelStatusCodeOk = OTelStatusCodeKey.String("OK") - // The operation contains an error. - // Stability: stable - OTelStatusCodeError = OTelStatusCodeKey.String("ERROR") -) - -// Namespace: peer -const ( - // PeerServiceKey is the attribute Key conforming to the "peer.service" semantic - // conventions. It represents the [`service.name`] of the remote service. SHOULD - // be equal to the actual `service.name` resource attribute of the remote - // service if any. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: AuthTokenCache - // - // [`service.name`]: /docs/resource/README.md#service - PeerServiceKey = attribute.Key("peer.service") -) - -// PeerService returns an attribute KeyValue conforming to the "peer.service" -// semantic conventions. It represents the [`service.name`] of the remote -// service. SHOULD be equal to the actual `service.name` resource attribute of -// the remote service if any. -// -// [`service.name`]: /docs/resource/README.md#service -func PeerService(val string) attribute.KeyValue { - return PeerServiceKey.String(val) -} - -// Namespace: process -const ( - // ProcessArgsCountKey is the attribute Key conforming to the - // "process.args_count" semantic conventions. It represents the length of the - // process.command_args array. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 4 - // Note: This field can be useful for querying or performing bucket analysis on - // how many arguments were provided to start a process. More arguments may be an - // indication of suspicious activity. - ProcessArgsCountKey = attribute.Key("process.args_count") - - // ProcessCommandKey is the attribute Key conforming to the "process.command" - // semantic conventions. It represents the command used to launch the process - // (i.e. the command name). On Linux based systems, can be set to the zeroth - // string in `proc/[pid]/cmdline`. On Windows, can be set to the first parameter - // extracted from `GetCommandLineW`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cmd/otelcol" - ProcessCommandKey = attribute.Key("process.command") - - // ProcessCommandArgsKey is the attribute Key conforming to the - // "process.command_args" semantic conventions. It represents the all the - // command arguments (including the command/executable itself) as received by - // the process. On Linux-based systems (and some other Unixoid systems - // supporting procfs), can be set according to the list of null-delimited - // strings extracted from `proc/[pid]/cmdline`. For libc-based executables, this - // would be the full argv vector passed to `main`. SHOULD NOT be collected by - // default unless there is sanitization that excludes sensitive data. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cmd/otecol", "--config=config.yaml" - ProcessCommandArgsKey = attribute.Key("process.command_args") - - // ProcessCommandLineKey is the attribute Key conforming to the - // "process.command_line" semantic conventions. It represents the full command - // used to launch the process as a single string representing the full command. - // On Windows, can be set to the result of `GetCommandLineW`. Do not set this if - // you have to assemble it just for monitoring; use `process.command_args` - // instead. SHOULD NOT be collected by default unless there is sanitization that - // excludes sensitive data. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "C:\cmd\otecol --config="my directory\config.yaml"" - ProcessCommandLineKey = attribute.Key("process.command_line") - - // ProcessContextSwitchTypeKey is the attribute Key conforming to the - // "process.context_switch_type" semantic conventions. It represents the - // specifies whether the context switches for this data point were voluntary or - // involuntary. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - ProcessContextSwitchTypeKey = attribute.Key("process.context_switch_type") - - // ProcessCreationTimeKey is the attribute Key conforming to the - // "process.creation.time" semantic conventions. It represents the date and time - // the process was created, in ISO 8601 format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2023-11-21T09:25:34.853Z" - ProcessCreationTimeKey = attribute.Key("process.creation.time") - - // ProcessExecutableBuildIDGNUKey is the attribute Key conforming to the - // "process.executable.build_id.gnu" semantic conventions. It represents the GNU - // build ID as found in the `.note.gnu.build-id` ELF section (hex string). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "c89b11207f6479603b0d49bf291c092c2b719293" - ProcessExecutableBuildIDGNUKey = attribute.Key("process.executable.build_id.gnu") - - // ProcessExecutableBuildIDGoKey is the attribute Key conforming to the - // "process.executable.build_id.go" semantic conventions. It represents the Go - // build ID as retrieved by `go tool buildid `. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "foh3mEXu7BLZjsN9pOwG/kATcXlYVCDEFouRMQed_/WwRFB1hPo9LBkekthSPG/x8hMC8emW2cCjXD0_1aY" - ProcessExecutableBuildIDGoKey = attribute.Key("process.executable.build_id.go") - - // ProcessExecutableBuildIDHtlhashKey is the attribute Key conforming to the - // "process.executable.build_id.htlhash" semantic conventions. It represents the - // profiling specific build ID for executables. See the OTel specification for - // Profiles for more information. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "600DCAFE4A110000F2BF38C493F5FB92" - ProcessExecutableBuildIDHtlhashKey = attribute.Key("process.executable.build_id.htlhash") - - // ProcessExecutableNameKey is the attribute Key conforming to the - // "process.executable.name" semantic conventions. It represents the name of the - // process executable. On Linux based systems, this SHOULD be set to the base - // name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to - // the base name of `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "otelcol" - ProcessExecutableNameKey = attribute.Key("process.executable.name") - - // ProcessExecutablePathKey is the attribute Key conforming to the - // "process.executable.path" semantic conventions. It represents the full path - // to the process executable. On Linux based systems, can be set to the target - // of `proc/[pid]/exe`. On Windows, can be set to the result of - // `GetProcessImageFileNameW`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/usr/bin/cmd/otelcol" - ProcessExecutablePathKey = attribute.Key("process.executable.path") - - // ProcessExitCodeKey is the attribute Key conforming to the "process.exit.code" - // semantic conventions. It represents the exit code of the process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 127 - ProcessExitCodeKey = attribute.Key("process.exit.code") - - // ProcessExitTimeKey is the attribute Key conforming to the "process.exit.time" - // semantic conventions. It represents the date and time the process exited, in - // ISO 8601 format. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2023-11-21T09:26:12.315Z" - ProcessExitTimeKey = attribute.Key("process.exit.time") - - // ProcessGroupLeaderPIDKey is the attribute Key conforming to the - // "process.group_leader.pid" semantic conventions. It represents the PID of the - // process's group leader. This is also the process group ID (PGID) of the - // process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 23 - ProcessGroupLeaderPIDKey = attribute.Key("process.group_leader.pid") - - // ProcessInteractiveKey is the attribute Key conforming to the - // "process.interactive" semantic conventions. It represents the whether the - // process is connected to an interactive shell. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - ProcessInteractiveKey = attribute.Key("process.interactive") - - // ProcessLinuxCgroupKey is the attribute Key conforming to the - // "process.linux.cgroup" semantic conventions. It represents the control group - // associated with the process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1:name=systemd:/user.slice/user-1000.slice/session-3.scope", - // "0::/user.slice/user-1000.slice/user@1000.service/tmux-spawn-0267755b-4639-4a27-90ed-f19f88e53748.scope" - // Note: Control groups (cgroups) are a kernel feature used to organize and - // manage process resources. This attribute provides the path(s) to the - // cgroup(s) associated with the process, which should match the contents of the - // [/proc/[PID]/cgroup] file. - // - // [/proc/[PID]/cgroup]: https://man7.org/linux/man-pages/man7/cgroups.7.html - ProcessLinuxCgroupKey = attribute.Key("process.linux.cgroup") - - // ProcessOwnerKey is the attribute Key conforming to the "process.owner" - // semantic conventions. It represents the username of the user that owns the - // process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "root" - ProcessOwnerKey = attribute.Key("process.owner") - - // ProcessPagingFaultTypeKey is the attribute Key conforming to the - // "process.paging.fault_type" semantic conventions. It represents the type of - // page fault for this data point. Type `major` is for major/hard page faults, - // and `minor` is for minor/soft page faults. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - ProcessPagingFaultTypeKey = attribute.Key("process.paging.fault_type") - - // ProcessParentPIDKey is the attribute Key conforming to the - // "process.parent_pid" semantic conventions. It represents the parent Process - // identifier (PPID). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 111 - ProcessParentPIDKey = attribute.Key("process.parent_pid") - - // ProcessPIDKey is the attribute Key conforming to the "process.pid" semantic - // conventions. It represents the process identifier (PID). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1234 - ProcessPIDKey = attribute.Key("process.pid") - - // ProcessRealUserIDKey is the attribute Key conforming to the - // "process.real_user.id" semantic conventions. It represents the real user ID - // (RUID) of the process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1000 - ProcessRealUserIDKey = attribute.Key("process.real_user.id") - - // ProcessRealUserNameKey is the attribute Key conforming to the - // "process.real_user.name" semantic conventions. It represents the username of - // the real user of the process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "operator" - ProcessRealUserNameKey = attribute.Key("process.real_user.name") - - // ProcessRuntimeDescriptionKey is the attribute Key conforming to the - // "process.runtime.description" semantic conventions. It represents an - // additional description about the runtime of the process, for example a - // specific vendor customization of the runtime environment. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: Eclipse OpenJ9 Eclipse OpenJ9 VM openj9-0.21.0 - ProcessRuntimeDescriptionKey = attribute.Key("process.runtime.description") - - // ProcessRuntimeNameKey is the attribute Key conforming to the - // "process.runtime.name" semantic conventions. It represents the name of the - // runtime of this process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "OpenJDK Runtime Environment" - ProcessRuntimeNameKey = attribute.Key("process.runtime.name") - - // ProcessRuntimeVersionKey is the attribute Key conforming to the - // "process.runtime.version" semantic conventions. It represents the version of - // the runtime of this process, as returned by the runtime without modification. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 14.0.2 - ProcessRuntimeVersionKey = attribute.Key("process.runtime.version") - - // ProcessSavedUserIDKey is the attribute Key conforming to the - // "process.saved_user.id" semantic conventions. It represents the saved user ID - // (SUID) of the process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1002 - ProcessSavedUserIDKey = attribute.Key("process.saved_user.id") - - // ProcessSavedUserNameKey is the attribute Key conforming to the - // "process.saved_user.name" semantic conventions. It represents the username of - // the saved user. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "operator" - ProcessSavedUserNameKey = attribute.Key("process.saved_user.name") - - // ProcessSessionLeaderPIDKey is the attribute Key conforming to the - // "process.session_leader.pid" semantic conventions. It represents the PID of - // the process's session leader. This is also the session ID (SID) of the - // process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 14 - ProcessSessionLeaderPIDKey = attribute.Key("process.session_leader.pid") - - // ProcessTitleKey is the attribute Key conforming to the "process.title" - // semantic conventions. It represents the process title (proctitle). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cat /etc/hostname", "xfce4-session", "bash" - // Note: In many Unix-like systems, process title (proctitle), is the string - // that represents the name or command line of a running process, displayed by - // system monitoring tools like ps, top, and htop. - ProcessTitleKey = attribute.Key("process.title") - - // ProcessUserIDKey is the attribute Key conforming to the "process.user.id" - // semantic conventions. It represents the effective user ID (EUID) of the - // process. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1001 - ProcessUserIDKey = attribute.Key("process.user.id") - - // ProcessUserNameKey is the attribute Key conforming to the "process.user.name" - // semantic conventions. It represents the username of the effective user of the - // process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "root" - ProcessUserNameKey = attribute.Key("process.user.name") - - // ProcessVpidKey is the attribute Key conforming to the "process.vpid" semantic - // conventions. It represents the virtual process identifier. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 12 - // Note: The process ID within a PID namespace. This is not necessarily unique - // across all processes on the host but it is unique within the process - // namespace that the process exists within. - ProcessVpidKey = attribute.Key("process.vpid") - - // ProcessWorkingDirectoryKey is the attribute Key conforming to the - // "process.working_directory" semantic conventions. It represents the working - // directory of the process. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/root" - ProcessWorkingDirectoryKey = attribute.Key("process.working_directory") -) - -// ProcessArgsCount returns an attribute KeyValue conforming to the -// "process.args_count" semantic conventions. It represents the length of the -// process.command_args array. -func ProcessArgsCount(val int) attribute.KeyValue { - return ProcessArgsCountKey.Int(val) -} - -// ProcessCommand returns an attribute KeyValue conforming to the -// "process.command" semantic conventions. It represents the command used to -// launch the process (i.e. the command name). On Linux based systems, can be set -// to the zeroth string in `proc/[pid]/cmdline`. On Windows, can be set to the -// first parameter extracted from `GetCommandLineW`. -func ProcessCommand(val string) attribute.KeyValue { - return ProcessCommandKey.String(val) -} - -// ProcessCommandArgs returns an attribute KeyValue conforming to the -// "process.command_args" semantic conventions. It represents the all the command -// arguments (including the command/executable itself) as received by the -// process. On Linux-based systems (and some other Unixoid systems supporting -// procfs), can be set according to the list of null-delimited strings extracted -// from `proc/[pid]/cmdline`. For libc-based executables, this would be the full -// argv vector passed to `main`. SHOULD NOT be collected by default unless there -// is sanitization that excludes sensitive data. -func ProcessCommandArgs(val ...string) attribute.KeyValue { - return ProcessCommandArgsKey.StringSlice(val) -} - -// ProcessCommandLine returns an attribute KeyValue conforming to the -// "process.command_line" semantic conventions. It represents the full command -// used to launch the process as a single string representing the full command. -// On Windows, can be set to the result of `GetCommandLineW`. Do not set this if -// you have to assemble it just for monitoring; use `process.command_args` -// instead. SHOULD NOT be collected by default unless there is sanitization that -// excludes sensitive data. -func ProcessCommandLine(val string) attribute.KeyValue { - return ProcessCommandLineKey.String(val) -} - -// ProcessCreationTime returns an attribute KeyValue conforming to the -// "process.creation.time" semantic conventions. It represents the date and time -// the process was created, in ISO 8601 format. -func ProcessCreationTime(val string) attribute.KeyValue { - return ProcessCreationTimeKey.String(val) -} - -// ProcessEnvironmentVariable returns an attribute KeyValue conforming to the -// "process.environment_variable" semantic conventions. It represents the process -// environment variables, `` being the environment variable name, the value -// being the environment variable value. -func ProcessEnvironmentVariable(key string, val string) attribute.KeyValue { - return attribute.String("process.environment_variable."+key, val) -} - -// ProcessExecutableBuildIDGNU returns an attribute KeyValue conforming to the -// "process.executable.build_id.gnu" semantic conventions. It represents the GNU -// build ID as found in the `.note.gnu.build-id` ELF section (hex string). -func ProcessExecutableBuildIDGNU(val string) attribute.KeyValue { - return ProcessExecutableBuildIDGNUKey.String(val) -} - -// ProcessExecutableBuildIDGo returns an attribute KeyValue conforming to the -// "process.executable.build_id.go" semantic conventions. It represents the Go -// build ID as retrieved by `go tool buildid `. -func ProcessExecutableBuildIDGo(val string) attribute.KeyValue { - return ProcessExecutableBuildIDGoKey.String(val) -} - -// ProcessExecutableBuildIDHtlhash returns an attribute KeyValue conforming to -// the "process.executable.build_id.htlhash" semantic conventions. It represents -// the profiling specific build ID for executables. See the OTel specification -// for Profiles for more information. -func ProcessExecutableBuildIDHtlhash(val string) attribute.KeyValue { - return ProcessExecutableBuildIDHtlhashKey.String(val) -} - -// ProcessExecutableName returns an attribute KeyValue conforming to the -// "process.executable.name" semantic conventions. It represents the name of the -// process executable. On Linux based systems, this SHOULD be set to the base -// name of the target of `/proc/[pid]/exe`. On Windows, this SHOULD be set to the -// base name of `GetProcessImageFileNameW`. -func ProcessExecutableName(val string) attribute.KeyValue { - return ProcessExecutableNameKey.String(val) -} - -// ProcessExecutablePath returns an attribute KeyValue conforming to the -// "process.executable.path" semantic conventions. It represents the full path to -// the process executable. On Linux based systems, can be set to the target of -// `proc/[pid]/exe`. On Windows, can be set to the result of -// `GetProcessImageFileNameW`. -func ProcessExecutablePath(val string) attribute.KeyValue { - return ProcessExecutablePathKey.String(val) -} - -// ProcessExitCode returns an attribute KeyValue conforming to the -// "process.exit.code" semantic conventions. It represents the exit code of the -// process. -func ProcessExitCode(val int) attribute.KeyValue { - return ProcessExitCodeKey.Int(val) -} - -// ProcessExitTime returns an attribute KeyValue conforming to the -// "process.exit.time" semantic conventions. It represents the date and time the -// process exited, in ISO 8601 format. -func ProcessExitTime(val string) attribute.KeyValue { - return ProcessExitTimeKey.String(val) -} - -// ProcessGroupLeaderPID returns an attribute KeyValue conforming to the -// "process.group_leader.pid" semantic conventions. It represents the PID of the -// process's group leader. This is also the process group ID (PGID) of the -// process. -func ProcessGroupLeaderPID(val int) attribute.KeyValue { - return ProcessGroupLeaderPIDKey.Int(val) -} - -// ProcessInteractive returns an attribute KeyValue conforming to the -// "process.interactive" semantic conventions. It represents the whether the -// process is connected to an interactive shell. -func ProcessInteractive(val bool) attribute.KeyValue { - return ProcessInteractiveKey.Bool(val) -} - -// ProcessLinuxCgroup returns an attribute KeyValue conforming to the -// "process.linux.cgroup" semantic conventions. It represents the control group -// associated with the process. -func ProcessLinuxCgroup(val string) attribute.KeyValue { - return ProcessLinuxCgroupKey.String(val) -} - -// ProcessOwner returns an attribute KeyValue conforming to the "process.owner" -// semantic conventions. It represents the username of the user that owns the -// process. -func ProcessOwner(val string) attribute.KeyValue { - return ProcessOwnerKey.String(val) -} - -// ProcessParentPID returns an attribute KeyValue conforming to the -// "process.parent_pid" semantic conventions. It represents the parent Process -// identifier (PPID). -func ProcessParentPID(val int) attribute.KeyValue { - return ProcessParentPIDKey.Int(val) -} - -// ProcessPID returns an attribute KeyValue conforming to the "process.pid" -// semantic conventions. It represents the process identifier (PID). -func ProcessPID(val int) attribute.KeyValue { - return ProcessPIDKey.Int(val) -} - -// ProcessRealUserID returns an attribute KeyValue conforming to the -// "process.real_user.id" semantic conventions. It represents the real user ID -// (RUID) of the process. -func ProcessRealUserID(val int) attribute.KeyValue { - return ProcessRealUserIDKey.Int(val) -} - -// ProcessRealUserName returns an attribute KeyValue conforming to the -// "process.real_user.name" semantic conventions. It represents the username of -// the real user of the process. -func ProcessRealUserName(val string) attribute.KeyValue { - return ProcessRealUserNameKey.String(val) -} - -// ProcessRuntimeDescription returns an attribute KeyValue conforming to the -// "process.runtime.description" semantic conventions. It represents an -// additional description about the runtime of the process, for example a -// specific vendor customization of the runtime environment. -func ProcessRuntimeDescription(val string) attribute.KeyValue { - return ProcessRuntimeDescriptionKey.String(val) -} - -// ProcessRuntimeName returns an attribute KeyValue conforming to the -// "process.runtime.name" semantic conventions. It represents the name of the -// runtime of this process. -func ProcessRuntimeName(val string) attribute.KeyValue { - return ProcessRuntimeNameKey.String(val) -} - -// ProcessRuntimeVersion returns an attribute KeyValue conforming to the -// "process.runtime.version" semantic conventions. It represents the version of -// the runtime of this process, as returned by the runtime without modification. -func ProcessRuntimeVersion(val string) attribute.KeyValue { - return ProcessRuntimeVersionKey.String(val) -} - -// ProcessSavedUserID returns an attribute KeyValue conforming to the -// "process.saved_user.id" semantic conventions. It represents the saved user ID -// (SUID) of the process. -func ProcessSavedUserID(val int) attribute.KeyValue { - return ProcessSavedUserIDKey.Int(val) -} - -// ProcessSavedUserName returns an attribute KeyValue conforming to the -// "process.saved_user.name" semantic conventions. It represents the username of -// the saved user. -func ProcessSavedUserName(val string) attribute.KeyValue { - return ProcessSavedUserNameKey.String(val) -} - -// ProcessSessionLeaderPID returns an attribute KeyValue conforming to the -// "process.session_leader.pid" semantic conventions. It represents the PID of -// the process's session leader. This is also the session ID (SID) of the -// process. -func ProcessSessionLeaderPID(val int) attribute.KeyValue { - return ProcessSessionLeaderPIDKey.Int(val) -} - -// ProcessTitle returns an attribute KeyValue conforming to the "process.title" -// semantic conventions. It represents the process title (proctitle). -func ProcessTitle(val string) attribute.KeyValue { - return ProcessTitleKey.String(val) -} - -// ProcessUserID returns an attribute KeyValue conforming to the -// "process.user.id" semantic conventions. It represents the effective user ID -// (EUID) of the process. -func ProcessUserID(val int) attribute.KeyValue { - return ProcessUserIDKey.Int(val) -} - -// ProcessUserName returns an attribute KeyValue conforming to the -// "process.user.name" semantic conventions. It represents the username of the -// effective user of the process. -func ProcessUserName(val string) attribute.KeyValue { - return ProcessUserNameKey.String(val) -} - -// ProcessVpid returns an attribute KeyValue conforming to the "process.vpid" -// semantic conventions. It represents the virtual process identifier. -func ProcessVpid(val int) attribute.KeyValue { - return ProcessVpidKey.Int(val) -} - -// ProcessWorkingDirectory returns an attribute KeyValue conforming to the -// "process.working_directory" semantic conventions. It represents the working -// directory of the process. -func ProcessWorkingDirectory(val string) attribute.KeyValue { - return ProcessWorkingDirectoryKey.String(val) -} - -// Enum values for process.context_switch_type -var ( - // voluntary - // Stability: development - ProcessContextSwitchTypeVoluntary = ProcessContextSwitchTypeKey.String("voluntary") - // involuntary - // Stability: development - ProcessContextSwitchTypeInvoluntary = ProcessContextSwitchTypeKey.String("involuntary") -) - -// Enum values for process.paging.fault_type -var ( - // major - // Stability: development - ProcessPagingFaultTypeMajor = ProcessPagingFaultTypeKey.String("major") - // minor - // Stability: development - ProcessPagingFaultTypeMinor = ProcessPagingFaultTypeKey.String("minor") -) - -// Namespace: profile -const ( - // ProfileFrameTypeKey is the attribute Key conforming to the - // "profile.frame.type" semantic conventions. It represents the describes the - // interpreter or compiler of a single frame. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "cpython" - ProfileFrameTypeKey = attribute.Key("profile.frame.type") -) - -// Enum values for profile.frame.type -var ( - // [.NET] - // - // Stability: development - // - // [.NET]: https://wikipedia.org/wiki/.NET - ProfileFrameTypeDotnet = ProfileFrameTypeKey.String("dotnet") - // [JVM] - // - // Stability: development - // - // [JVM]: https://wikipedia.org/wiki/Java_virtual_machine - ProfileFrameTypeJVM = ProfileFrameTypeKey.String("jvm") - // [Kernel] - // - // Stability: development - // - // [Kernel]: https://wikipedia.org/wiki/Kernel_(operating_system) - ProfileFrameTypeKernel = ProfileFrameTypeKey.String("kernel") - // Can be one of but not limited to [C], [C++], [Go] or [Rust]. If possible, a - // more precise value MUST be used. - // - // Stability: development - // - // [C]: https://wikipedia.org/wiki/C_(programming_language) - // [C++]: https://wikipedia.org/wiki/C%2B%2B - // [Go]: https://wikipedia.org/wiki/Go_(programming_language) - // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language) - ProfileFrameTypeNative = ProfileFrameTypeKey.String("native") - // [Perl] - // - // Stability: development - // - // [Perl]: https://wikipedia.org/wiki/Perl - ProfileFrameTypePerl = ProfileFrameTypeKey.String("perl") - // [PHP] - // - // Stability: development - // - // [PHP]: https://wikipedia.org/wiki/PHP - ProfileFrameTypePHP = ProfileFrameTypeKey.String("php") - // [Python] - // - // Stability: development - // - // [Python]: https://wikipedia.org/wiki/Python_(programming_language) - ProfileFrameTypeCpython = ProfileFrameTypeKey.String("cpython") - // [Ruby] - // - // Stability: development - // - // [Ruby]: https://wikipedia.org/wiki/Ruby_(programming_language) - ProfileFrameTypeRuby = ProfileFrameTypeKey.String("ruby") - // [V8JS] - // - // Stability: development - // - // [V8JS]: https://wikipedia.org/wiki/V8_(JavaScript_engine) - ProfileFrameTypeV8JS = ProfileFrameTypeKey.String("v8js") - // [Erlang] - // - // Stability: development - // - // [Erlang]: https://en.wikipedia.org/wiki/BEAM_(Erlang_virtual_machine) - ProfileFrameTypeBeam = ProfileFrameTypeKey.String("beam") - // [Go], - // - // Stability: development - // - // [Go]: https://wikipedia.org/wiki/Go_(programming_language) - ProfileFrameTypeGo = ProfileFrameTypeKey.String("go") - // [Rust] - // - // Stability: development - // - // [Rust]: https://wikipedia.org/wiki/Rust_(programming_language) - ProfileFrameTypeRust = ProfileFrameTypeKey.String("rust") -) - -// Namespace: rpc -const ( - // RPCConnectRPCErrorCodeKey is the attribute Key conforming to the - // "rpc.connect_rpc.error_code" semantic conventions. It represents the - // [error codes] of the Connect request. Error codes are always string values. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [error codes]: https://connectrpc.com//docs/protocol/#error-codes - RPCConnectRPCErrorCodeKey = attribute.Key("rpc.connect_rpc.error_code") - - // RPCGRPCStatusCodeKey is the attribute Key conforming to the - // "rpc.grpc.status_code" semantic conventions. It represents the - // [numeric status code] of the gRPC request. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [numeric status code]: https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md - RPCGRPCStatusCodeKey = attribute.Key("rpc.grpc.status_code") - - // RPCJSONRPCErrorCodeKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code` - // property of response if it is an error response. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: -32700, 100 - RPCJSONRPCErrorCodeKey = attribute.Key("rpc.jsonrpc.error_code") - - // RPCJSONRPCErrorMessageKey is the attribute Key conforming to the - // "rpc.jsonrpc.error_message" semantic conventions. It represents the - // `error.message` property of response if it is an error response. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Parse error", "User already exists" - RPCJSONRPCErrorMessageKey = attribute.Key("rpc.jsonrpc.error_message") - - // RPCJSONRPCRequestIDKey is the attribute Key conforming to the - // "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` - // property of request or response. Since protocol allows id to be int, string, - // `null` or missing (for notifications), value is expected to be cast to string - // for simplicity. Use empty string in case of `null` value. Omit entirely if - // this is a notification. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "10", "request-7", "" - RPCJSONRPCRequestIDKey = attribute.Key("rpc.jsonrpc.request_id") - - // RPCJSONRPCVersionKey is the attribute Key conforming to the - // "rpc.jsonrpc.version" semantic conventions. It represents the protocol - // version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 - // doesn't specify this, the value can be omitted. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2.0", "1.0" - RPCJSONRPCVersionKey = attribute.Key("rpc.jsonrpc.version") - - // RPCMessageCompressedSizeKey is the attribute Key conforming to the - // "rpc.message.compressed_size" semantic conventions. It represents the - // compressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - RPCMessageCompressedSizeKey = attribute.Key("rpc.message.compressed_size") - - // RPCMessageIDKey is the attribute Key conforming to the "rpc.message.id" - // semantic conventions. It MUST be calculated as two different counters - // starting from `1` one for sent messages and one for received message.. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: This way we guarantee that the values will be consistent between - // different implementations. - RPCMessageIDKey = attribute.Key("rpc.message.id") - - // RPCMessageTypeKey is the attribute Key conforming to the "rpc.message.type" - // semantic conventions. It represents the whether this is a received or sent - // message. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - RPCMessageTypeKey = attribute.Key("rpc.message.type") - - // RPCMessageUncompressedSizeKey is the attribute Key conforming to the - // "rpc.message.uncompressed_size" semantic conventions. It represents the - // uncompressed size of the message in bytes. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - RPCMessageUncompressedSizeKey = attribute.Key("rpc.message.uncompressed_size") - - // RPCMethodKey is the attribute Key conforming to the "rpc.method" semantic - // conventions. It represents the name of the (logical) method being called, - // must be equal to the $method part in the span name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: exampleMethod - // Note: This is the logical name of the method from the RPC interface - // perspective, which can be different from the name of any implementing - // method/function. The `code.function.name` attribute may be used to store the - // latter (e.g., method actually executing the call on the server side, RPC - // client stub method on the client side). - RPCMethodKey = attribute.Key("rpc.method") - - // RPCServiceKey is the attribute Key conforming to the "rpc.service" semantic - // conventions. It represents the full (logical) name of the service being - // called, including its package name, if applicable. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: myservice.EchoService - // Note: This is the logical name of the service from the RPC interface - // perspective, which can be different from the name of any implementing class. - // The `code.namespace` attribute may be used to store the latter (despite the - // attribute name, it may include a class name; e.g., class with method actually - // executing the call on the server side, RPC client stub class on the client - // side). - RPCServiceKey = attribute.Key("rpc.service") - - // RPCSystemKey is the attribute Key conforming to the "rpc.system" semantic - // conventions. It represents a string identifying the remoting system. See - // below for a list of well-known identifiers. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - RPCSystemKey = attribute.Key("rpc.system") -) - -// RPCConnectRPCRequestMetadata returns an attribute KeyValue conforming to the -// "rpc.connect_rpc.request.metadata" semantic conventions. It represents the -// connect request metadata, `` being the normalized Connect Metadata key -// (lowercase), the value being the metadata values. -func RPCConnectRPCRequestMetadata(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("rpc.connect_rpc.request.metadata."+key, val) -} - -// RPCConnectRPCResponseMetadata returns an attribute KeyValue conforming to the -// "rpc.connect_rpc.response.metadata" semantic conventions. It represents the -// connect response metadata, `` being the normalized Connect Metadata key -// (lowercase), the value being the metadata values. -func RPCConnectRPCResponseMetadata(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("rpc.connect_rpc.response.metadata."+key, val) -} - -// RPCGRPCRequestMetadata returns an attribute KeyValue conforming to the -// "rpc.grpc.request.metadata" semantic conventions. It represents the gRPC -// request metadata, `` being the normalized gRPC Metadata key (lowercase), -// the value being the metadata values. -func RPCGRPCRequestMetadata(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("rpc.grpc.request.metadata."+key, val) -} - -// RPCGRPCResponseMetadata returns an attribute KeyValue conforming to the -// "rpc.grpc.response.metadata" semantic conventions. It represents the gRPC -// response metadata, `` being the normalized gRPC Metadata key (lowercase), -// the value being the metadata values. -func RPCGRPCResponseMetadata(key string, val ...string) attribute.KeyValue { - return attribute.StringSlice("rpc.grpc.response.metadata."+key, val) -} - -// RPCJSONRPCErrorCode returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_code" semantic conventions. It represents the `error.code` -// property of response if it is an error response. -func RPCJSONRPCErrorCode(val int) attribute.KeyValue { - return RPCJSONRPCErrorCodeKey.Int(val) -} - -// RPCJSONRPCErrorMessage returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.error_message" semantic conventions. It represents the -// `error.message` property of response if it is an error response. -func RPCJSONRPCErrorMessage(val string) attribute.KeyValue { - return RPCJSONRPCErrorMessageKey.String(val) -} - -// RPCJSONRPCRequestID returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.request_id" semantic conventions. It represents the `id` property -// of request or response. Since protocol allows id to be int, string, `null` or -// missing (for notifications), value is expected to be cast to string for -// simplicity. Use empty string in case of `null` value. Omit entirely if this is -// a notification. -func RPCJSONRPCRequestID(val string) attribute.KeyValue { - return RPCJSONRPCRequestIDKey.String(val) -} - -// RPCJSONRPCVersion returns an attribute KeyValue conforming to the -// "rpc.jsonrpc.version" semantic conventions. It represents the protocol version -// as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 doesn't -// specify this, the value can be omitted. -func RPCJSONRPCVersion(val string) attribute.KeyValue { - return RPCJSONRPCVersionKey.String(val) -} - -// RPCMessageCompressedSize returns an attribute KeyValue conforming to the -// "rpc.message.compressed_size" semantic conventions. It represents the -// compressed size of the message in bytes. -func RPCMessageCompressedSize(val int) attribute.KeyValue { - return RPCMessageCompressedSizeKey.Int(val) -} - -// RPCMessageID returns an attribute KeyValue conforming to the "rpc.message.id" -// semantic conventions. It MUST be calculated as two different counters starting -// from `1` one for sent messages and one for received message.. -func RPCMessageID(val int) attribute.KeyValue { - return RPCMessageIDKey.Int(val) -} - -// RPCMessageUncompressedSize returns an attribute KeyValue conforming to the -// "rpc.message.uncompressed_size" semantic conventions. It represents the -// uncompressed size of the message in bytes. -func RPCMessageUncompressedSize(val int) attribute.KeyValue { - return RPCMessageUncompressedSizeKey.Int(val) -} - -// RPCMethod returns an attribute KeyValue conforming to the "rpc.method" -// semantic conventions. It represents the name of the (logical) method being -// called, must be equal to the $method part in the span name. -func RPCMethod(val string) attribute.KeyValue { - return RPCMethodKey.String(val) -} - -// RPCService returns an attribute KeyValue conforming to the "rpc.service" -// semantic conventions. It represents the full (logical) name of the service -// being called, including its package name, if applicable. -func RPCService(val string) attribute.KeyValue { - return RPCServiceKey.String(val) -} - -// Enum values for rpc.connect_rpc.error_code -var ( - // cancelled - // Stability: development - RPCConnectRPCErrorCodeCancelled = RPCConnectRPCErrorCodeKey.String("cancelled") - // unknown - // Stability: development - RPCConnectRPCErrorCodeUnknown = RPCConnectRPCErrorCodeKey.String("unknown") - // invalid_argument - // Stability: development - RPCConnectRPCErrorCodeInvalidArgument = RPCConnectRPCErrorCodeKey.String("invalid_argument") - // deadline_exceeded - // Stability: development - RPCConnectRPCErrorCodeDeadlineExceeded = RPCConnectRPCErrorCodeKey.String("deadline_exceeded") - // not_found - // Stability: development - RPCConnectRPCErrorCodeNotFound = RPCConnectRPCErrorCodeKey.String("not_found") - // already_exists - // Stability: development - RPCConnectRPCErrorCodeAlreadyExists = RPCConnectRPCErrorCodeKey.String("already_exists") - // permission_denied - // Stability: development - RPCConnectRPCErrorCodePermissionDenied = RPCConnectRPCErrorCodeKey.String("permission_denied") - // resource_exhausted - // Stability: development - RPCConnectRPCErrorCodeResourceExhausted = RPCConnectRPCErrorCodeKey.String("resource_exhausted") - // failed_precondition - // Stability: development - RPCConnectRPCErrorCodeFailedPrecondition = RPCConnectRPCErrorCodeKey.String("failed_precondition") - // aborted - // Stability: development - RPCConnectRPCErrorCodeAborted = RPCConnectRPCErrorCodeKey.String("aborted") - // out_of_range - // Stability: development - RPCConnectRPCErrorCodeOutOfRange = RPCConnectRPCErrorCodeKey.String("out_of_range") - // unimplemented - // Stability: development - RPCConnectRPCErrorCodeUnimplemented = RPCConnectRPCErrorCodeKey.String("unimplemented") - // internal - // Stability: development - RPCConnectRPCErrorCodeInternal = RPCConnectRPCErrorCodeKey.String("internal") - // unavailable - // Stability: development - RPCConnectRPCErrorCodeUnavailable = RPCConnectRPCErrorCodeKey.String("unavailable") - // data_loss - // Stability: development - RPCConnectRPCErrorCodeDataLoss = RPCConnectRPCErrorCodeKey.String("data_loss") - // unauthenticated - // Stability: development - RPCConnectRPCErrorCodeUnauthenticated = RPCConnectRPCErrorCodeKey.String("unauthenticated") -) - -// Enum values for rpc.grpc.status_code -var ( - // OK - // Stability: development - RPCGRPCStatusCodeOk = RPCGRPCStatusCodeKey.Int(0) - // CANCELLED - // Stability: development - RPCGRPCStatusCodeCancelled = RPCGRPCStatusCodeKey.Int(1) - // UNKNOWN - // Stability: development - RPCGRPCStatusCodeUnknown = RPCGRPCStatusCodeKey.Int(2) - // INVALID_ARGUMENT - // Stability: development - RPCGRPCStatusCodeInvalidArgument = RPCGRPCStatusCodeKey.Int(3) - // DEADLINE_EXCEEDED - // Stability: development - RPCGRPCStatusCodeDeadlineExceeded = RPCGRPCStatusCodeKey.Int(4) - // NOT_FOUND - // Stability: development - RPCGRPCStatusCodeNotFound = RPCGRPCStatusCodeKey.Int(5) - // ALREADY_EXISTS - // Stability: development - RPCGRPCStatusCodeAlreadyExists = RPCGRPCStatusCodeKey.Int(6) - // PERMISSION_DENIED - // Stability: development - RPCGRPCStatusCodePermissionDenied = RPCGRPCStatusCodeKey.Int(7) - // RESOURCE_EXHAUSTED - // Stability: development - RPCGRPCStatusCodeResourceExhausted = RPCGRPCStatusCodeKey.Int(8) - // FAILED_PRECONDITION - // Stability: development - RPCGRPCStatusCodeFailedPrecondition = RPCGRPCStatusCodeKey.Int(9) - // ABORTED - // Stability: development - RPCGRPCStatusCodeAborted = RPCGRPCStatusCodeKey.Int(10) - // OUT_OF_RANGE - // Stability: development - RPCGRPCStatusCodeOutOfRange = RPCGRPCStatusCodeKey.Int(11) - // UNIMPLEMENTED - // Stability: development - RPCGRPCStatusCodeUnimplemented = RPCGRPCStatusCodeKey.Int(12) - // INTERNAL - // Stability: development - RPCGRPCStatusCodeInternal = RPCGRPCStatusCodeKey.Int(13) - // UNAVAILABLE - // Stability: development - RPCGRPCStatusCodeUnavailable = RPCGRPCStatusCodeKey.Int(14) - // DATA_LOSS - // Stability: development - RPCGRPCStatusCodeDataLoss = RPCGRPCStatusCodeKey.Int(15) - // UNAUTHENTICATED - // Stability: development - RPCGRPCStatusCodeUnauthenticated = RPCGRPCStatusCodeKey.Int(16) -) - -// Enum values for rpc.message.type -var ( - // sent - // Stability: development - RPCMessageTypeSent = RPCMessageTypeKey.String("SENT") - // received - // Stability: development - RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED") -) - -// Enum values for rpc.system -var ( - // gRPC - // Stability: development - RPCSystemGRPC = RPCSystemKey.String("grpc") - // Java RMI - // Stability: development - RPCSystemJavaRmi = RPCSystemKey.String("java_rmi") - // .NET WCF - // Stability: development - RPCSystemDotnetWcf = RPCSystemKey.String("dotnet_wcf") - // Apache Dubbo - // Stability: development - RPCSystemApacheDubbo = RPCSystemKey.String("apache_dubbo") - // Connect RPC - // Stability: development - RPCSystemConnectRPC = RPCSystemKey.String("connect_rpc") -) - -// Namespace: security_rule -const ( - // SecurityRuleCategoryKey is the attribute Key conforming to the - // "security_rule.category" semantic conventions. It represents a categorization - // value keyword used by the entity using the rule for detection of this event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Attempted Information Leak" - SecurityRuleCategoryKey = attribute.Key("security_rule.category") - - // SecurityRuleDescriptionKey is the attribute Key conforming to the - // "security_rule.description" semantic conventions. It represents the - // description of the rule generating the event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Block requests to public DNS over HTTPS / TLS protocols" - SecurityRuleDescriptionKey = attribute.Key("security_rule.description") - - // SecurityRuleLicenseKey is the attribute Key conforming to the - // "security_rule.license" semantic conventions. It represents the name of the - // license under which the rule used to generate this event is made available. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Apache 2.0" - SecurityRuleLicenseKey = attribute.Key("security_rule.license") - - // SecurityRuleNameKey is the attribute Key conforming to the - // "security_rule.name" semantic conventions. It represents the name of the rule - // or signature generating the event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "BLOCK_DNS_over_TLS" - SecurityRuleNameKey = attribute.Key("security_rule.name") - - // SecurityRuleReferenceKey is the attribute Key conforming to the - // "security_rule.reference" semantic conventions. It represents the reference - // URL to additional information about the rule used to generate this event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://en.wikipedia.org/wiki/DNS_over_TLS" - // Note: The URL can point to the vendor’s documentation about the rule. If - // that’s not available, it can also be a link to a more general page - // describing this type of alert. - SecurityRuleReferenceKey = attribute.Key("security_rule.reference") - - // SecurityRuleRulesetNameKey is the attribute Key conforming to the - // "security_rule.ruleset.name" semantic conventions. It represents the name of - // the ruleset, policy, group, or parent category in which the rule used to - // generate this event is a member. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Standard_Protocol_Filters" - SecurityRuleRulesetNameKey = attribute.Key("security_rule.ruleset.name") - - // SecurityRuleUUIDKey is the attribute Key conforming to the - // "security_rule.uuid" semantic conventions. It represents a rule ID that is - // unique within the scope of a set or group of agents, observers, or other - // entities using the rule for detection of this event. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "550e8400-e29b-41d4-a716-446655440000", "1100110011" - SecurityRuleUUIDKey = attribute.Key("security_rule.uuid") - - // SecurityRuleVersionKey is the attribute Key conforming to the - // "security_rule.version" semantic conventions. It represents the version / - // revision of the rule being used for analysis. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1.0.0" - SecurityRuleVersionKey = attribute.Key("security_rule.version") -) - -// SecurityRuleCategory returns an attribute KeyValue conforming to the -// "security_rule.category" semantic conventions. It represents a categorization -// value keyword used by the entity using the rule for detection of this event. -func SecurityRuleCategory(val string) attribute.KeyValue { - return SecurityRuleCategoryKey.String(val) -} - -// SecurityRuleDescription returns an attribute KeyValue conforming to the -// "security_rule.description" semantic conventions. It represents the -// description of the rule generating the event. -func SecurityRuleDescription(val string) attribute.KeyValue { - return SecurityRuleDescriptionKey.String(val) -} - -// SecurityRuleLicense returns an attribute KeyValue conforming to the -// "security_rule.license" semantic conventions. It represents the name of the -// license under which the rule used to generate this event is made available. -func SecurityRuleLicense(val string) attribute.KeyValue { - return SecurityRuleLicenseKey.String(val) -} - -// SecurityRuleName returns an attribute KeyValue conforming to the -// "security_rule.name" semantic conventions. It represents the name of the rule -// or signature generating the event. -func SecurityRuleName(val string) attribute.KeyValue { - return SecurityRuleNameKey.String(val) -} - -// SecurityRuleReference returns an attribute KeyValue conforming to the -// "security_rule.reference" semantic conventions. It represents the reference -// URL to additional information about the rule used to generate this event. -func SecurityRuleReference(val string) attribute.KeyValue { - return SecurityRuleReferenceKey.String(val) -} - -// SecurityRuleRulesetName returns an attribute KeyValue conforming to the -// "security_rule.ruleset.name" semantic conventions. It represents the name of -// the ruleset, policy, group, or parent category in which the rule used to -// generate this event is a member. -func SecurityRuleRulesetName(val string) attribute.KeyValue { - return SecurityRuleRulesetNameKey.String(val) -} - -// SecurityRuleUUID returns an attribute KeyValue conforming to the -// "security_rule.uuid" semantic conventions. It represents a rule ID that is -// unique within the scope of a set or group of agents, observers, or other -// entities using the rule for detection of this event. -func SecurityRuleUUID(val string) attribute.KeyValue { - return SecurityRuleUUIDKey.String(val) -} - -// SecurityRuleVersion returns an attribute KeyValue conforming to the -// "security_rule.version" semantic conventions. It represents the version / -// revision of the rule being used for analysis. -func SecurityRuleVersion(val string) attribute.KeyValue { - return SecurityRuleVersionKey.String(val) -} - -// Namespace: server -const ( - // ServerAddressKey is the attribute Key conforming to the "server.address" - // semantic conventions. It represents the server domain name if available - // without reverse DNS lookup; otherwise, IP address or Unix domain socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "example.com", "10.1.2.80", "/tmp/my.sock" - // Note: When observed from the client side, and when communicating through an - // intermediary, `server.address` SHOULD represent the server address behind any - // intermediaries, for example proxies, if it's available. - ServerAddressKey = attribute.Key("server.address") - - // ServerPortKey is the attribute Key conforming to the "server.port" semantic - // conventions. It represents the server port number. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: 80, 8080, 443 - // Note: When observed from the client side, and when communicating through an - // intermediary, `server.port` SHOULD represent the server port behind any - // intermediaries, for example proxies, if it's available. - ServerPortKey = attribute.Key("server.port") -) - -// ServerAddress returns an attribute KeyValue conforming to the "server.address" -// semantic conventions. It represents the server domain name if available -// without reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func ServerAddress(val string) attribute.KeyValue { - return ServerAddressKey.String(val) -} - -// ServerPort returns an attribute KeyValue conforming to the "server.port" -// semantic conventions. It represents the server port number. -func ServerPort(val int) attribute.KeyValue { - return ServerPortKey.Int(val) -} - -// Namespace: service -const ( - // ServiceInstanceIDKey is the attribute Key conforming to the - // "service.instance.id" semantic conventions. It represents the string ID of - // the service instance. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "627cc493-f310-47de-96bd-71410b7dec09" - // Note: MUST be unique for each instance of the same - // `service.namespace,service.name` pair (in other words - // `service.namespace,service.name,service.instance.id` triplet MUST be globally - // unique). The ID helps to - // distinguish instances of the same service that exist at the same time (e.g. - // instances of a horizontally scaled - // service). - // - // Implementations, such as SDKs, are recommended to generate a random Version 1 - // or Version 4 [RFC - // 4122] UUID, but are free to use an inherent unique ID as - // the source of - // this value if stability is desirable. In that case, the ID SHOULD be used as - // source of a UUID Version 5 and - // SHOULD use the following UUID as the namespace: - // `4d63009a-8d0f-11ee-aad7-4c796ed8e320`. - // - // UUIDs are typically recommended, as only an opaque value for the purposes of - // identifying a service instance is - // needed. Similar to what can be seen in the man page for the - // [`/etc/machine-id`] file, the underlying - // data, such as pod name and namespace should be treated as confidential, being - // the user's choice to expose it - // or not via another resource attribute. - // - // For applications running behind an application server (like unicorn), we do - // not recommend using one identifier - // for all processes participating in the application. Instead, it's recommended - // each division (e.g. a worker - // thread in unicorn) to have its own instance.id. - // - // It's not recommended for a Collector to set `service.instance.id` if it can't - // unambiguously determine the - // service instance that is generating that telemetry. For instance, creating an - // UUID based on `pod.name` will - // likely be wrong, as the Collector might not know from which container within - // that pod the telemetry originated. - // However, Collectors can set the `service.instance.id` if they can - // unambiguously determine the service instance - // for that telemetry. This is typically the case for scraping receivers, as - // they know the target address and - // port. - // - // [RFC - // 4122]: https://www.ietf.org/rfc/rfc4122.txt - // [`/etc/machine-id`]: https://www.freedesktop.org/software/systemd/man/latest/machine-id.html - ServiceInstanceIDKey = attribute.Key("service.instance.id") - - // ServiceNameKey is the attribute Key conforming to the "service.name" semantic - // conventions. It represents the logical name of the service. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "shoppingcart" - // Note: MUST be the same for all instances of horizontally scaled services. If - // the value was not specified, SDKs MUST fallback to `unknown_service:` - // concatenated with [`process.executable.name`], e.g. `unknown_service:bash`. - // If `process.executable.name` is not available, the value MUST be set to - // `unknown_service`. - // - // [`process.executable.name`]: process.md - ServiceNameKey = attribute.Key("service.name") - - // ServiceNamespaceKey is the attribute Key conforming to the - // "service.namespace" semantic conventions. It represents a namespace for - // `service.name`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Shop" - // Note: A string value having a meaning that helps to distinguish a group of - // services, for example the team name that owns a group of services. - // `service.name` is expected to be unique within the same namespace. If - // `service.namespace` is not specified in the Resource then `service.name` is - // expected to be unique for all services that have no explicit namespace - // defined (so the empty/unspecified namespace is simply one more valid - // namespace). Zero-length namespace string is assumed equal to unspecified - // namespace. - ServiceNamespaceKey = attribute.Key("service.namespace") - - // ServiceVersionKey is the attribute Key conforming to the "service.version" - // semantic conventions. It represents the version string of the service API or - // implementation. The format is not defined by these conventions. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "2.0.0", "a01dbef8a" - ServiceVersionKey = attribute.Key("service.version") -) - -// ServiceInstanceID returns an attribute KeyValue conforming to the -// "service.instance.id" semantic conventions. It represents the string ID of the -// service instance. -func ServiceInstanceID(val string) attribute.KeyValue { - return ServiceInstanceIDKey.String(val) -} - -// ServiceName returns an attribute KeyValue conforming to the "service.name" -// semantic conventions. It represents the logical name of the service. -func ServiceName(val string) attribute.KeyValue { - return ServiceNameKey.String(val) -} - -// ServiceNamespace returns an attribute KeyValue conforming to the -// "service.namespace" semantic conventions. It represents a namespace for -// `service.name`. -func ServiceNamespace(val string) attribute.KeyValue { - return ServiceNamespaceKey.String(val) -} - -// ServiceVersion returns an attribute KeyValue conforming to the -// "service.version" semantic conventions. It represents the version string of -// the service API or implementation. The format is not defined by these -// conventions. -func ServiceVersion(val string) attribute.KeyValue { - return ServiceVersionKey.String(val) -} - -// Namespace: session -const ( - // SessionIDKey is the attribute Key conforming to the "session.id" semantic - // conventions. It represents a unique id to identify a session. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 00112233-4455-6677-8899-aabbccddeeff - SessionIDKey = attribute.Key("session.id") - - // SessionPreviousIDKey is the attribute Key conforming to the - // "session.previous_id" semantic conventions. It represents the previous - // `session.id` for this user, when known. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 00112233-4455-6677-8899-aabbccddeeff - SessionPreviousIDKey = attribute.Key("session.previous_id") -) - -// SessionID returns an attribute KeyValue conforming to the "session.id" -// semantic conventions. It represents a unique id to identify a session. -func SessionID(val string) attribute.KeyValue { - return SessionIDKey.String(val) -} - -// SessionPreviousID returns an attribute KeyValue conforming to the -// "session.previous_id" semantic conventions. It represents the previous -// `session.id` for this user, when known. -func SessionPreviousID(val string) attribute.KeyValue { - return SessionPreviousIDKey.String(val) -} - -// Namespace: signalr -const ( - // SignalRConnectionStatusKey is the attribute Key conforming to the - // "signalr.connection.status" semantic conventions. It represents the signalR - // HTTP connection closure status. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "app_shutdown", "timeout" - SignalRConnectionStatusKey = attribute.Key("signalr.connection.status") - - // SignalRTransportKey is the attribute Key conforming to the - // "signalr.transport" semantic conventions. It represents the - // [SignalR transport type]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "web_sockets", "long_polling" - // - // [SignalR transport type]: https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md - SignalRTransportKey = attribute.Key("signalr.transport") -) - -// Enum values for signalr.connection.status -var ( - // The connection was closed normally. - // Stability: stable - SignalRConnectionStatusNormalClosure = SignalRConnectionStatusKey.String("normal_closure") - // The connection was closed due to a timeout. - // Stability: stable - SignalRConnectionStatusTimeout = SignalRConnectionStatusKey.String("timeout") - // The connection was closed because the app is shutting down. - // Stability: stable - SignalRConnectionStatusAppShutdown = SignalRConnectionStatusKey.String("app_shutdown") -) - -// Enum values for signalr.transport -var ( - // ServerSentEvents protocol - // Stability: stable - SignalRTransportServerSentEvents = SignalRTransportKey.String("server_sent_events") - // LongPolling protocol - // Stability: stable - SignalRTransportLongPolling = SignalRTransportKey.String("long_polling") - // WebSockets protocol - // Stability: stable - SignalRTransportWebSockets = SignalRTransportKey.String("web_sockets") -) - -// Namespace: source -const ( - // SourceAddressKey is the attribute Key conforming to the "source.address" - // semantic conventions. It represents the source address - domain name if - // available without reverse DNS lookup; otherwise, IP address or Unix domain - // socket name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "source.example.com", "10.1.2.80", "/tmp/my.sock" - // Note: When observed from the destination side, and when communicating through - // an intermediary, `source.address` SHOULD represent the source address behind - // any intermediaries, for example proxies, if it's available. - SourceAddressKey = attribute.Key("source.address") - - // SourcePortKey is the attribute Key conforming to the "source.port" semantic - // conventions. It represents the source port number. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 3389, 2888 - SourcePortKey = attribute.Key("source.port") -) - -// SourceAddress returns an attribute KeyValue conforming to the "source.address" -// semantic conventions. It represents the source address - domain name if -// available without reverse DNS lookup; otherwise, IP address or Unix domain -// socket name. -func SourceAddress(val string) attribute.KeyValue { - return SourceAddressKey.String(val) -} - -// SourcePort returns an attribute KeyValue conforming to the "source.port" -// semantic conventions. It represents the source port number. -func SourcePort(val int) attribute.KeyValue { - return SourcePortKey.Int(val) -} - -// Namespace: system -const ( - // SystemCPULogicalNumberKey is the attribute Key conforming to the - // "system.cpu.logical_number" semantic conventions. It represents the - // deprecated, use `cpu.logical_number` instead. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 1 - SystemCPULogicalNumberKey = attribute.Key("system.cpu.logical_number") - - // SystemDeviceKey is the attribute Key conforming to the "system.device" - // semantic conventions. It represents the device identifier. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "(identifier)" - SystemDeviceKey = attribute.Key("system.device") - - // SystemFilesystemModeKey is the attribute Key conforming to the - // "system.filesystem.mode" semantic conventions. It represents the filesystem - // mode. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "rw, ro" - SystemFilesystemModeKey = attribute.Key("system.filesystem.mode") - - // SystemFilesystemMountpointKey is the attribute Key conforming to the - // "system.filesystem.mountpoint" semantic conventions. It represents the - // filesystem mount path. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/mnt/data" - SystemFilesystemMountpointKey = attribute.Key("system.filesystem.mountpoint") - - // SystemFilesystemStateKey is the attribute Key conforming to the - // "system.filesystem.state" semantic conventions. It represents the filesystem - // state. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "used" - SystemFilesystemStateKey = attribute.Key("system.filesystem.state") - - // SystemFilesystemTypeKey is the attribute Key conforming to the - // "system.filesystem.type" semantic conventions. It represents the filesystem - // type. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ext4" - SystemFilesystemTypeKey = attribute.Key("system.filesystem.type") - - // SystemMemoryStateKey is the attribute Key conforming to the - // "system.memory.state" semantic conventions. It represents the memory state. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "free", "cached" - SystemMemoryStateKey = attribute.Key("system.memory.state") - - // SystemPagingDirectionKey is the attribute Key conforming to the - // "system.paging.direction" semantic conventions. It represents the paging - // access direction. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "in" - SystemPagingDirectionKey = attribute.Key("system.paging.direction") - - // SystemPagingStateKey is the attribute Key conforming to the - // "system.paging.state" semantic conventions. It represents the memory paging - // state. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "free" - SystemPagingStateKey = attribute.Key("system.paging.state") - - // SystemPagingTypeKey is the attribute Key conforming to the - // "system.paging.type" semantic conventions. It represents the memory paging - // type. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "minor" - SystemPagingTypeKey = attribute.Key("system.paging.type") - - // SystemProcessStatusKey is the attribute Key conforming to the - // "system.process.status" semantic conventions. It represents the process - // state, e.g., [Linux Process State Codes]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "running" - // - // [Linux Process State Codes]: https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES - SystemProcessStatusKey = attribute.Key("system.process.status") -) - -// SystemCPULogicalNumber returns an attribute KeyValue conforming to the -// "system.cpu.logical_number" semantic conventions. It represents the -// deprecated, use `cpu.logical_number` instead. -func SystemCPULogicalNumber(val int) attribute.KeyValue { - return SystemCPULogicalNumberKey.Int(val) -} - -// SystemDevice returns an attribute KeyValue conforming to the "system.device" -// semantic conventions. It represents the device identifier. -func SystemDevice(val string) attribute.KeyValue { - return SystemDeviceKey.String(val) -} - -// SystemFilesystemMode returns an attribute KeyValue conforming to the -// "system.filesystem.mode" semantic conventions. It represents the filesystem -// mode. -func SystemFilesystemMode(val string) attribute.KeyValue { - return SystemFilesystemModeKey.String(val) -} - -// SystemFilesystemMountpoint returns an attribute KeyValue conforming to the -// "system.filesystem.mountpoint" semantic conventions. It represents the -// filesystem mount path. -func SystemFilesystemMountpoint(val string) attribute.KeyValue { - return SystemFilesystemMountpointKey.String(val) -} - -// Enum values for system.filesystem.state -var ( - // used - // Stability: development - SystemFilesystemStateUsed = SystemFilesystemStateKey.String("used") - // free - // Stability: development - SystemFilesystemStateFree = SystemFilesystemStateKey.String("free") - // reserved - // Stability: development - SystemFilesystemStateReserved = SystemFilesystemStateKey.String("reserved") -) - -// Enum values for system.filesystem.type -var ( - // fat32 - // Stability: development - SystemFilesystemTypeFat32 = SystemFilesystemTypeKey.String("fat32") - // exfat - // Stability: development - SystemFilesystemTypeExfat = SystemFilesystemTypeKey.String("exfat") - // ntfs - // Stability: development - SystemFilesystemTypeNtfs = SystemFilesystemTypeKey.String("ntfs") - // refs - // Stability: development - SystemFilesystemTypeRefs = SystemFilesystemTypeKey.String("refs") - // hfsplus - // Stability: development - SystemFilesystemTypeHfsplus = SystemFilesystemTypeKey.String("hfsplus") - // ext4 - // Stability: development - SystemFilesystemTypeExt4 = SystemFilesystemTypeKey.String("ext4") -) - -// Enum values for system.memory.state -var ( - // Actual used virtual memory in bytes. - // Stability: development - SystemMemoryStateUsed = SystemMemoryStateKey.String("used") - // free - // Stability: development - SystemMemoryStateFree = SystemMemoryStateKey.String("free") - // buffers - // Stability: development - SystemMemoryStateBuffers = SystemMemoryStateKey.String("buffers") - // cached - // Stability: development - SystemMemoryStateCached = SystemMemoryStateKey.String("cached") -) - -// Enum values for system.paging.direction -var ( - // in - // Stability: development - SystemPagingDirectionIn = SystemPagingDirectionKey.String("in") - // out - // Stability: development - SystemPagingDirectionOut = SystemPagingDirectionKey.String("out") -) - -// Enum values for system.paging.state -var ( - // used - // Stability: development - SystemPagingStateUsed = SystemPagingStateKey.String("used") - // free - // Stability: development - SystemPagingStateFree = SystemPagingStateKey.String("free") -) - -// Enum values for system.paging.type -var ( - // major - // Stability: development - SystemPagingTypeMajor = SystemPagingTypeKey.String("major") - // minor - // Stability: development - SystemPagingTypeMinor = SystemPagingTypeKey.String("minor") -) - -// Enum values for system.process.status -var ( - // running - // Stability: development - SystemProcessStatusRunning = SystemProcessStatusKey.String("running") - // sleeping - // Stability: development - SystemProcessStatusSleeping = SystemProcessStatusKey.String("sleeping") - // stopped - // Stability: development - SystemProcessStatusStopped = SystemProcessStatusKey.String("stopped") - // defunct - // Stability: development - SystemProcessStatusDefunct = SystemProcessStatusKey.String("defunct") -) - -// Namespace: telemetry -const ( - // TelemetryDistroNameKey is the attribute Key conforming to the - // "telemetry.distro.name" semantic conventions. It represents the name of the - // auto instrumentation agent or distribution, if used. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "parts-unlimited-java" - // Note: Official auto instrumentation agents and distributions SHOULD set the - // `telemetry.distro.name` attribute to - // a string starting with `opentelemetry-`, e.g. - // `opentelemetry-java-instrumentation`. - TelemetryDistroNameKey = attribute.Key("telemetry.distro.name") - - // TelemetryDistroVersionKey is the attribute Key conforming to the - // "telemetry.distro.version" semantic conventions. It represents the version - // string of the auto instrumentation agent or distribution, if used. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1.2.3" - TelemetryDistroVersionKey = attribute.Key("telemetry.distro.version") - - // TelemetrySDKLanguageKey is the attribute Key conforming to the - // "telemetry.sdk.language" semantic conventions. It represents the language of - // the telemetry SDK. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: - TelemetrySDKLanguageKey = attribute.Key("telemetry.sdk.language") - - // TelemetrySDKNameKey is the attribute Key conforming to the - // "telemetry.sdk.name" semantic conventions. It represents the name of the - // telemetry SDK as defined above. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "opentelemetry" - // Note: The OpenTelemetry SDK MUST set the `telemetry.sdk.name` attribute to - // `opentelemetry`. - // If another SDK, like a fork or a vendor-provided implementation, is used, - // this SDK MUST set the - // `telemetry.sdk.name` attribute to the fully-qualified class or module name of - // this SDK's main entry point - // or another suitable identifier depending on the language. - // The identifier `opentelemetry` is reserved and MUST NOT be used in this case. - // All custom identifiers SHOULD be stable across different versions of an - // implementation. - TelemetrySDKNameKey = attribute.Key("telemetry.sdk.name") - - // TelemetrySDKVersionKey is the attribute Key conforming to the - // "telemetry.sdk.version" semantic conventions. It represents the version - // string of the telemetry SDK. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "1.2.3" - TelemetrySDKVersionKey = attribute.Key("telemetry.sdk.version") -) - -// TelemetryDistroName returns an attribute KeyValue conforming to the -// "telemetry.distro.name" semantic conventions. It represents the name of the -// auto instrumentation agent or distribution, if used. -func TelemetryDistroName(val string) attribute.KeyValue { - return TelemetryDistroNameKey.String(val) -} - -// TelemetryDistroVersion returns an attribute KeyValue conforming to the -// "telemetry.distro.version" semantic conventions. It represents the version -// string of the auto instrumentation agent or distribution, if used. -func TelemetryDistroVersion(val string) attribute.KeyValue { - return TelemetryDistroVersionKey.String(val) -} - -// TelemetrySDKName returns an attribute KeyValue conforming to the -// "telemetry.sdk.name" semantic conventions. It represents the name of the -// telemetry SDK as defined above. -func TelemetrySDKName(val string) attribute.KeyValue { - return TelemetrySDKNameKey.String(val) -} - -// TelemetrySDKVersion returns an attribute KeyValue conforming to the -// "telemetry.sdk.version" semantic conventions. It represents the version string -// of the telemetry SDK. -func TelemetrySDKVersion(val string) attribute.KeyValue { - return TelemetrySDKVersionKey.String(val) -} - -// Enum values for telemetry.sdk.language -var ( - // cpp - // Stability: stable - TelemetrySDKLanguageCPP = TelemetrySDKLanguageKey.String("cpp") - // dotnet - // Stability: stable - TelemetrySDKLanguageDotnet = TelemetrySDKLanguageKey.String("dotnet") - // erlang - // Stability: stable - TelemetrySDKLanguageErlang = TelemetrySDKLanguageKey.String("erlang") - // go - // Stability: stable - TelemetrySDKLanguageGo = TelemetrySDKLanguageKey.String("go") - // java - // Stability: stable - TelemetrySDKLanguageJava = TelemetrySDKLanguageKey.String("java") - // nodejs - // Stability: stable - TelemetrySDKLanguageNodejs = TelemetrySDKLanguageKey.String("nodejs") - // php - // Stability: stable - TelemetrySDKLanguagePHP = TelemetrySDKLanguageKey.String("php") - // python - // Stability: stable - TelemetrySDKLanguagePython = TelemetrySDKLanguageKey.String("python") - // ruby - // Stability: stable - TelemetrySDKLanguageRuby = TelemetrySDKLanguageKey.String("ruby") - // rust - // Stability: stable - TelemetrySDKLanguageRust = TelemetrySDKLanguageKey.String("rust") - // swift - // Stability: stable - TelemetrySDKLanguageSwift = TelemetrySDKLanguageKey.String("swift") - // webjs - // Stability: stable - TelemetrySDKLanguageWebJS = TelemetrySDKLanguageKey.String("webjs") -) - -// Namespace: test -const ( - // TestCaseNameKey is the attribute Key conforming to the "test.case.name" - // semantic conventions. It represents the fully qualified human readable name - // of the [test case]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "org.example.TestCase1.test1", "example/tests/TestCase1.test1", - // "ExampleTestCase1_test1" - // - // [test case]: https://wikipedia.org/wiki/Test_case - TestCaseNameKey = attribute.Key("test.case.name") - - // TestCaseResultStatusKey is the attribute Key conforming to the - // "test.case.result.status" semantic conventions. It represents the status of - // the actual test case result from test execution. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "pass", "fail" - TestCaseResultStatusKey = attribute.Key("test.case.result.status") - - // TestSuiteNameKey is the attribute Key conforming to the "test.suite.name" - // semantic conventions. It represents the human readable name of a [test suite] - // . - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "TestSuite1" - // - // [test suite]: https://wikipedia.org/wiki/Test_suite - TestSuiteNameKey = attribute.Key("test.suite.name") - - // TestSuiteRunStatusKey is the attribute Key conforming to the - // "test.suite.run.status" semantic conventions. It represents the status of the - // test suite run. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "success", "failure", "skipped", "aborted", "timed_out", - // "in_progress" - TestSuiteRunStatusKey = attribute.Key("test.suite.run.status") -) - -// TestCaseName returns an attribute KeyValue conforming to the "test.case.name" -// semantic conventions. It represents the fully qualified human readable name of -// the [test case]. -// -// [test case]: https://wikipedia.org/wiki/Test_case -func TestCaseName(val string) attribute.KeyValue { - return TestCaseNameKey.String(val) -} - -// TestSuiteName returns an attribute KeyValue conforming to the -// "test.suite.name" semantic conventions. It represents the human readable name -// of a [test suite]. -// -// [test suite]: https://wikipedia.org/wiki/Test_suite -func TestSuiteName(val string) attribute.KeyValue { - return TestSuiteNameKey.String(val) -} - -// Enum values for test.case.result.status -var ( - // pass - // Stability: development - TestCaseResultStatusPass = TestCaseResultStatusKey.String("pass") - // fail - // Stability: development - TestCaseResultStatusFail = TestCaseResultStatusKey.String("fail") -) - -// Enum values for test.suite.run.status -var ( - // success - // Stability: development - TestSuiteRunStatusSuccess = TestSuiteRunStatusKey.String("success") - // failure - // Stability: development - TestSuiteRunStatusFailure = TestSuiteRunStatusKey.String("failure") - // skipped - // Stability: development - TestSuiteRunStatusSkipped = TestSuiteRunStatusKey.String("skipped") - // aborted - // Stability: development - TestSuiteRunStatusAborted = TestSuiteRunStatusKey.String("aborted") - // timed_out - // Stability: development - TestSuiteRunStatusTimedOut = TestSuiteRunStatusKey.String("timed_out") - // in_progress - // Stability: development - TestSuiteRunStatusInProgress = TestSuiteRunStatusKey.String("in_progress") -) - -// Namespace: thread -const ( - // ThreadIDKey is the attribute Key conforming to the "thread.id" semantic - // conventions. It represents the current "managed" thread ID (as opposed to OS - // thread ID). - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - ThreadIDKey = attribute.Key("thread.id") - - // ThreadNameKey is the attribute Key conforming to the "thread.name" semantic - // conventions. It represents the current thread name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: main - ThreadNameKey = attribute.Key("thread.name") -) - -// ThreadID returns an attribute KeyValue conforming to the "thread.id" semantic -// conventions. It represents the current "managed" thread ID (as opposed to OS -// thread ID). -func ThreadID(val int) attribute.KeyValue { - return ThreadIDKey.Int(val) -} - -// ThreadName returns an attribute KeyValue conforming to the "thread.name" -// semantic conventions. It represents the current thread name. -func ThreadName(val string) attribute.KeyValue { - return ThreadNameKey.String(val) -} - -// Namespace: tls -const ( - // TLSCipherKey is the attribute Key conforming to the "tls.cipher" semantic - // conventions. It represents the string indicating the [cipher] used during the - // current connection. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "TLS_RSA_WITH_3DES_EDE_CBC_SHA", - // "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - // Note: The values allowed for `tls.cipher` MUST be one of the `Descriptions` - // of the [registered TLS Cipher Suits]. - // - // [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5 - // [registered TLS Cipher Suits]: https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#table-tls-parameters-4 - TLSCipherKey = attribute.Key("tls.cipher") - - // TLSClientCertificateKey is the attribute Key conforming to the - // "tls.client.certificate" semantic conventions. It represents the PEM-encoded - // stand-alone certificate offered by the client. This is usually - // mutually-exclusive of `client.certificate_chain` since this value also exists - // in that list. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "MII..." - TLSClientCertificateKey = attribute.Key("tls.client.certificate") - - // TLSClientCertificateChainKey is the attribute Key conforming to the - // "tls.client.certificate_chain" semantic conventions. It represents the array - // of PEM-encoded certificates that make up the certificate chain offered by the - // client. This is usually mutually-exclusive of `client.certificate` since that - // value should be the first certificate in the chain. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "MII...", "MI..." - TLSClientCertificateChainKey = attribute.Key("tls.client.certificate_chain") - - // TLSClientHashMd5Key is the attribute Key conforming to the - // "tls.client.hash.md5" semantic conventions. It represents the certificate - // fingerprint using the MD5 digest of DER-encoded version of certificate - // offered by the client. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC" - TLSClientHashMd5Key = attribute.Key("tls.client.hash.md5") - - // TLSClientHashSha1Key is the attribute Key conforming to the - // "tls.client.hash.sha1" semantic conventions. It represents the certificate - // fingerprint using the SHA1 digest of DER-encoded version of certificate - // offered by the client. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A" - TLSClientHashSha1Key = attribute.Key("tls.client.hash.sha1") - - // TLSClientHashSha256Key is the attribute Key conforming to the - // "tls.client.hash.sha256" semantic conventions. It represents the certificate - // fingerprint using the SHA256 digest of DER-encoded version of certificate - // offered by the client. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0" - TLSClientHashSha256Key = attribute.Key("tls.client.hash.sha256") - - // TLSClientIssuerKey is the attribute Key conforming to the "tls.client.issuer" - // semantic conventions. It represents the distinguished name of [subject] of - // the issuer of the x.509 certificate presented by the client. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com" - // - // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 - TLSClientIssuerKey = attribute.Key("tls.client.issuer") - - // TLSClientJa3Key is the attribute Key conforming to the "tls.client.ja3" - // semantic conventions. It represents a hash that identifies clients based on - // how they perform an SSL/TLS handshake. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "d4e5b18d6b55c71272893221c96ba240" - TLSClientJa3Key = attribute.Key("tls.client.ja3") - - // TLSClientNotAfterKey is the attribute Key conforming to the - // "tls.client.not_after" semantic conventions. It represents the date/Time - // indicating when client certificate is no longer considered valid. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T00:00:00.000Z" - TLSClientNotAfterKey = attribute.Key("tls.client.not_after") - - // TLSClientNotBeforeKey is the attribute Key conforming to the - // "tls.client.not_before" semantic conventions. It represents the date/Time - // indicating when client certificate is first considered valid. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1970-01-01T00:00:00.000Z" - TLSClientNotBeforeKey = attribute.Key("tls.client.not_before") - - // TLSClientSubjectKey is the attribute Key conforming to the - // "tls.client.subject" semantic conventions. It represents the distinguished - // name of subject of the x.509 certificate presented by the client. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CN=myclient, OU=Documentation Team, DC=example, DC=com" - TLSClientSubjectKey = attribute.Key("tls.client.subject") - - // TLSClientSupportedCiphersKey is the attribute Key conforming to the - // "tls.client.supported_ciphers" semantic conventions. It represents the array - // of ciphers offered by the client during the client hello. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", - // "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TLSClientSupportedCiphersKey = attribute.Key("tls.client.supported_ciphers") - - // TLSCurveKey is the attribute Key conforming to the "tls.curve" semantic - // conventions. It represents the string indicating the curve used for the given - // cipher, when applicable. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "secp256r1" - TLSCurveKey = attribute.Key("tls.curve") - - // TLSEstablishedKey is the attribute Key conforming to the "tls.established" - // semantic conventions. It represents the boolean flag indicating if the TLS - // negotiation was successful and transitioned to an encrypted tunnel. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: true - TLSEstablishedKey = attribute.Key("tls.established") - - // TLSNextProtocolKey is the attribute Key conforming to the "tls.next_protocol" - // semantic conventions. It represents the string indicating the protocol being - // tunneled. Per the values in the [IANA registry], this string should be lower - // case. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "http/1.1" - // - // [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids - TLSNextProtocolKey = attribute.Key("tls.next_protocol") - - // TLSProtocolNameKey is the attribute Key conforming to the "tls.protocol.name" - // semantic conventions. It represents the normalized lowercase protocol name - // parsed from original string of the negotiated [SSL/TLS protocol version]. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // - // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values - TLSProtocolNameKey = attribute.Key("tls.protocol.name") - - // TLSProtocolVersionKey is the attribute Key conforming to the - // "tls.protocol.version" semantic conventions. It represents the numeric part - // of the version parsed from the original string of the negotiated - // [SSL/TLS protocol version]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1.2", "3" - // - // [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values - TLSProtocolVersionKey = attribute.Key("tls.protocol.version") - - // TLSResumedKey is the attribute Key conforming to the "tls.resumed" semantic - // conventions. It represents the boolean flag indicating if this TLS connection - // was resumed from an existing TLS negotiation. - // - // Type: boolean - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: true - TLSResumedKey = attribute.Key("tls.resumed") - - // TLSServerCertificateKey is the attribute Key conforming to the - // "tls.server.certificate" semantic conventions. It represents the PEM-encoded - // stand-alone certificate offered by the server. This is usually - // mutually-exclusive of `server.certificate_chain` since this value also exists - // in that list. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "MII..." - TLSServerCertificateKey = attribute.Key("tls.server.certificate") - - // TLSServerCertificateChainKey is the attribute Key conforming to the - // "tls.server.certificate_chain" semantic conventions. It represents the array - // of PEM-encoded certificates that make up the certificate chain offered by the - // server. This is usually mutually-exclusive of `server.certificate` since that - // value should be the first certificate in the chain. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "MII...", "MI..." - TLSServerCertificateChainKey = attribute.Key("tls.server.certificate_chain") - - // TLSServerHashMd5Key is the attribute Key conforming to the - // "tls.server.hash.md5" semantic conventions. It represents the certificate - // fingerprint using the MD5 digest of DER-encoded version of certificate - // offered by the server. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0F76C7F2C55BFD7D8E8B8F4BFBF0C9EC" - TLSServerHashMd5Key = attribute.Key("tls.server.hash.md5") - - // TLSServerHashSha1Key is the attribute Key conforming to the - // "tls.server.hash.sha1" semantic conventions. It represents the certificate - // fingerprint using the SHA1 digest of DER-encoded version of certificate - // offered by the server. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9E393D93138888D288266C2D915214D1D1CCEB2A" - TLSServerHashSha1Key = attribute.Key("tls.server.hash.sha1") - - // TLSServerHashSha256Key is the attribute Key conforming to the - // "tls.server.hash.sha256" semantic conventions. It represents the certificate - // fingerprint using the SHA256 digest of DER-encoded version of certificate - // offered by the server. For consistency with other hash values, this value - // should be formatted as an uppercase hash. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "0687F666A054EF17A08E2F2162EAB4CBC0D265E1D7875BE74BF3C712CA92DAF0" - TLSServerHashSha256Key = attribute.Key("tls.server.hash.sha256") - - // TLSServerIssuerKey is the attribute Key conforming to the "tls.server.issuer" - // semantic conventions. It represents the distinguished name of [subject] of - // the issuer of the x.509 certificate presented by the client. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CN=Example Root CA, OU=Infrastructure Team, DC=example, DC=com" - // - // [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 - TLSServerIssuerKey = attribute.Key("tls.server.issuer") - - // TLSServerJa3sKey is the attribute Key conforming to the "tls.server.ja3s" - // semantic conventions. It represents a hash that identifies servers based on - // how they perform an SSL/TLS handshake. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "d4e5b18d6b55c71272893221c96ba240" - TLSServerJa3sKey = attribute.Key("tls.server.ja3s") - - // TLSServerNotAfterKey is the attribute Key conforming to the - // "tls.server.not_after" semantic conventions. It represents the date/Time - // indicating when server certificate is no longer considered valid. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "2021-01-01T00:00:00.000Z" - TLSServerNotAfterKey = attribute.Key("tls.server.not_after") - - // TLSServerNotBeforeKey is the attribute Key conforming to the - // "tls.server.not_before" semantic conventions. It represents the date/Time - // indicating when server certificate is first considered valid. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "1970-01-01T00:00:00.000Z" - TLSServerNotBeforeKey = attribute.Key("tls.server.not_before") - - // TLSServerSubjectKey is the attribute Key conforming to the - // "tls.server.subject" semantic conventions. It represents the distinguished - // name of subject of the x.509 certificate presented by the server. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "CN=myserver, OU=Documentation Team, DC=example, DC=com" - TLSServerSubjectKey = attribute.Key("tls.server.subject") -) - -// TLSCipher returns an attribute KeyValue conforming to the "tls.cipher" -// semantic conventions. It represents the string indicating the [cipher] used -// during the current connection. -// -// [cipher]: https://datatracker.ietf.org/doc/html/rfc5246#appendix-A.5 -func TLSCipher(val string) attribute.KeyValue { - return TLSCipherKey.String(val) -} - -// TLSClientCertificate returns an attribute KeyValue conforming to the -// "tls.client.certificate" semantic conventions. It represents the PEM-encoded -// stand-alone certificate offered by the client. This is usually -// mutually-exclusive of `client.certificate_chain` since this value also exists -// in that list. -func TLSClientCertificate(val string) attribute.KeyValue { - return TLSClientCertificateKey.String(val) -} - -// TLSClientCertificateChain returns an attribute KeyValue conforming to the -// "tls.client.certificate_chain" semantic conventions. It represents the array -// of PEM-encoded certificates that make up the certificate chain offered by the -// client. This is usually mutually-exclusive of `client.certificate` since that -// value should be the first certificate in the chain. -func TLSClientCertificateChain(val ...string) attribute.KeyValue { - return TLSClientCertificateChainKey.StringSlice(val) -} - -// TLSClientHashMd5 returns an attribute KeyValue conforming to the -// "tls.client.hash.md5" semantic conventions. It represents the certificate -// fingerprint using the MD5 digest of DER-encoded version of certificate offered -// by the client. For consistency with other hash values, this value should be -// formatted as an uppercase hash. -func TLSClientHashMd5(val string) attribute.KeyValue { - return TLSClientHashMd5Key.String(val) -} - -// TLSClientHashSha1 returns an attribute KeyValue conforming to the -// "tls.client.hash.sha1" semantic conventions. It represents the certificate -// fingerprint using the SHA1 digest of DER-encoded version of certificate -// offered by the client. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSClientHashSha1(val string) attribute.KeyValue { - return TLSClientHashSha1Key.String(val) -} - -// TLSClientHashSha256 returns an attribute KeyValue conforming to the -// "tls.client.hash.sha256" semantic conventions. It represents the certificate -// fingerprint using the SHA256 digest of DER-encoded version of certificate -// offered by the client. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSClientHashSha256(val string) attribute.KeyValue { - return TLSClientHashSha256Key.String(val) -} - -// TLSClientIssuer returns an attribute KeyValue conforming to the -// "tls.client.issuer" semantic conventions. It represents the distinguished name -// of [subject] of the issuer of the x.509 certificate presented by the client. -// -// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 -func TLSClientIssuer(val string) attribute.KeyValue { - return TLSClientIssuerKey.String(val) -} - -// TLSClientJa3 returns an attribute KeyValue conforming to the "tls.client.ja3" -// semantic conventions. It represents a hash that identifies clients based on -// how they perform an SSL/TLS handshake. -func TLSClientJa3(val string) attribute.KeyValue { - return TLSClientJa3Key.String(val) -} - -// TLSClientNotAfter returns an attribute KeyValue conforming to the -// "tls.client.not_after" semantic conventions. It represents the date/Time -// indicating when client certificate is no longer considered valid. -func TLSClientNotAfter(val string) attribute.KeyValue { - return TLSClientNotAfterKey.String(val) -} - -// TLSClientNotBefore returns an attribute KeyValue conforming to the -// "tls.client.not_before" semantic conventions. It represents the date/Time -// indicating when client certificate is first considered valid. -func TLSClientNotBefore(val string) attribute.KeyValue { - return TLSClientNotBeforeKey.String(val) -} - -// TLSClientSubject returns an attribute KeyValue conforming to the -// "tls.client.subject" semantic conventions. It represents the distinguished -// name of subject of the x.509 certificate presented by the client. -func TLSClientSubject(val string) attribute.KeyValue { - return TLSClientSubjectKey.String(val) -} - -// TLSClientSupportedCiphers returns an attribute KeyValue conforming to the -// "tls.client.supported_ciphers" semantic conventions. It represents the array -// of ciphers offered by the client during the client hello. -func TLSClientSupportedCiphers(val ...string) attribute.KeyValue { - return TLSClientSupportedCiphersKey.StringSlice(val) -} - -// TLSCurve returns an attribute KeyValue conforming to the "tls.curve" semantic -// conventions. It represents the string indicating the curve used for the given -// cipher, when applicable. -func TLSCurve(val string) attribute.KeyValue { - return TLSCurveKey.String(val) -} - -// TLSEstablished returns an attribute KeyValue conforming to the -// "tls.established" semantic conventions. It represents the boolean flag -// indicating if the TLS negotiation was successful and transitioned to an -// encrypted tunnel. -func TLSEstablished(val bool) attribute.KeyValue { - return TLSEstablishedKey.Bool(val) -} - -// TLSNextProtocol returns an attribute KeyValue conforming to the -// "tls.next_protocol" semantic conventions. It represents the string indicating -// the protocol being tunneled. Per the values in the [IANA registry], this -// string should be lower case. -// -// [IANA registry]: https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids -func TLSNextProtocol(val string) attribute.KeyValue { - return TLSNextProtocolKey.String(val) -} - -// TLSProtocolVersion returns an attribute KeyValue conforming to the -// "tls.protocol.version" semantic conventions. It represents the numeric part of -// the version parsed from the original string of the negotiated -// [SSL/TLS protocol version]. -// -// [SSL/TLS protocol version]: https://docs.openssl.org/1.1.1/man3/SSL_get_version/#return-values -func TLSProtocolVersion(val string) attribute.KeyValue { - return TLSProtocolVersionKey.String(val) -} - -// TLSResumed returns an attribute KeyValue conforming to the "tls.resumed" -// semantic conventions. It represents the boolean flag indicating if this TLS -// connection was resumed from an existing TLS negotiation. -func TLSResumed(val bool) attribute.KeyValue { - return TLSResumedKey.Bool(val) -} - -// TLSServerCertificate returns an attribute KeyValue conforming to the -// "tls.server.certificate" semantic conventions. It represents the PEM-encoded -// stand-alone certificate offered by the server. This is usually -// mutually-exclusive of `server.certificate_chain` since this value also exists -// in that list. -func TLSServerCertificate(val string) attribute.KeyValue { - return TLSServerCertificateKey.String(val) -} - -// TLSServerCertificateChain returns an attribute KeyValue conforming to the -// "tls.server.certificate_chain" semantic conventions. It represents the array -// of PEM-encoded certificates that make up the certificate chain offered by the -// server. This is usually mutually-exclusive of `server.certificate` since that -// value should be the first certificate in the chain. -func TLSServerCertificateChain(val ...string) attribute.KeyValue { - return TLSServerCertificateChainKey.StringSlice(val) -} - -// TLSServerHashMd5 returns an attribute KeyValue conforming to the -// "tls.server.hash.md5" semantic conventions. It represents the certificate -// fingerprint using the MD5 digest of DER-encoded version of certificate offered -// by the server. For consistency with other hash values, this value should be -// formatted as an uppercase hash. -func TLSServerHashMd5(val string) attribute.KeyValue { - return TLSServerHashMd5Key.String(val) -} - -// TLSServerHashSha1 returns an attribute KeyValue conforming to the -// "tls.server.hash.sha1" semantic conventions. It represents the certificate -// fingerprint using the SHA1 digest of DER-encoded version of certificate -// offered by the server. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSServerHashSha1(val string) attribute.KeyValue { - return TLSServerHashSha1Key.String(val) -} - -// TLSServerHashSha256 returns an attribute KeyValue conforming to the -// "tls.server.hash.sha256" semantic conventions. It represents the certificate -// fingerprint using the SHA256 digest of DER-encoded version of certificate -// offered by the server. For consistency with other hash values, this value -// should be formatted as an uppercase hash. -func TLSServerHashSha256(val string) attribute.KeyValue { - return TLSServerHashSha256Key.String(val) -} - -// TLSServerIssuer returns an attribute KeyValue conforming to the -// "tls.server.issuer" semantic conventions. It represents the distinguished name -// of [subject] of the issuer of the x.509 certificate presented by the client. -// -// [subject]: https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6 -func TLSServerIssuer(val string) attribute.KeyValue { - return TLSServerIssuerKey.String(val) -} - -// TLSServerJa3s returns an attribute KeyValue conforming to the -// "tls.server.ja3s" semantic conventions. It represents a hash that identifies -// servers based on how they perform an SSL/TLS handshake. -func TLSServerJa3s(val string) attribute.KeyValue { - return TLSServerJa3sKey.String(val) -} - -// TLSServerNotAfter returns an attribute KeyValue conforming to the -// "tls.server.not_after" semantic conventions. It represents the date/Time -// indicating when server certificate is no longer considered valid. -func TLSServerNotAfter(val string) attribute.KeyValue { - return TLSServerNotAfterKey.String(val) -} - -// TLSServerNotBefore returns an attribute KeyValue conforming to the -// "tls.server.not_before" semantic conventions. It represents the date/Time -// indicating when server certificate is first considered valid. -func TLSServerNotBefore(val string) attribute.KeyValue { - return TLSServerNotBeforeKey.String(val) -} - -// TLSServerSubject returns an attribute KeyValue conforming to the -// "tls.server.subject" semantic conventions. It represents the distinguished -// name of subject of the x.509 certificate presented by the server. -func TLSServerSubject(val string) attribute.KeyValue { - return TLSServerSubjectKey.String(val) -} - -// Enum values for tls.protocol.name -var ( - // ssl - // Stability: development - TLSProtocolNameSsl = TLSProtocolNameKey.String("ssl") - // tls - // Stability: development - TLSProtocolNameTLS = TLSProtocolNameKey.String("tls") -) - -// Namespace: url -const ( - // URLDomainKey is the attribute Key conforming to the "url.domain" semantic - // conventions. It represents the domain extracted from the `url.full`, such as - // "opentelemetry.io". - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "www.foo.bar", "opentelemetry.io", "3.12.167.2", - // "[1080:0:0:0:8:800:200C:417A]" - // Note: In some cases a URL may refer to an IP and/or port directly, without a - // domain name. In this case, the IP address would go to the domain field. If - // the URL contains a [literal IPv6 address] enclosed by `[` and `]`, the `[` - // and `]` characters should also be captured in the domain field. - // - // [literal IPv6 address]: https://www.rfc-editor.org/rfc/rfc2732#section-2 - URLDomainKey = attribute.Key("url.domain") - - // URLExtensionKey is the attribute Key conforming to the "url.extension" - // semantic conventions. It represents the file extension extracted from the - // `url.full`, excluding the leading dot. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "png", "gz" - // Note: The file extension is only set if it exists, as not every url has a - // file extension. When the file name has multiple extensions `example.tar.gz`, - // only the last one should be captured `gz`, not `tar.gz`. - URLExtensionKey = attribute.Key("url.extension") - - // URLFragmentKey is the attribute Key conforming to the "url.fragment" semantic - // conventions. It represents the [URI fragment] component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "SemConv" - // - // [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5 - URLFragmentKey = attribute.Key("url.fragment") - - // URLFullKey is the attribute Key conforming to the "url.full" semantic - // conventions. It represents the absolute URL describing a network resource - // according to [RFC3986]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv", "//localhost" - // Note: For network calls, URL usually has - // `scheme://host[:port][path][?query][#fragment]` format, where the fragment - // is not transmitted over HTTP, but if it is known, it SHOULD be included - // nevertheless. - // - // `url.full` MUST NOT contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. - // In such case username and password SHOULD be redacted and attribute's value - // SHOULD be `https://REDACTED:REDACTED@www.example.com/`. - // - // `url.full` SHOULD capture the absolute URL when it is available (or can be - // reconstructed). - // - // Sensitive content provided in `url.full` SHOULD be scrubbed when - // instrumentations can identify it. - // - // - // Query string values for the following keys SHOULD be redacted by default and - // replaced by the - // value `REDACTED`: - // - // - [`AWSAccessKeyId`] - // - [`Signature`] - // - [`sig`] - // - [`X-Goog-Signature`] - // - // This list is subject to change over time. - // - // When a query string value is redacted, the query string key SHOULD still be - // preserved, e.g. - // `https://www.example.com/path?color=blue&sig=REDACTED`. - // - // [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986 - // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth - // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth - // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token - // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls - URLFullKey = attribute.Key("url.full") - - // URLOriginalKey is the attribute Key conforming to the "url.original" semantic - // conventions. It represents the unmodified original URL as seen in the event - // source. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "https://www.foo.bar/search?q=OpenTelemetry#SemConv", - // "search?q=OpenTelemetry" - // Note: In network monitoring, the observed URL may be a full URL, whereas in - // access logs, the URL is often just represented as a path. This field is meant - // to represent the URL as it was observed, complete or not. - // `url.original` might contain credentials passed via URL in form of - // `https://username:password@www.example.com/`. In such case password and - // username SHOULD NOT be redacted and attribute's value SHOULD remain the same. - URLOriginalKey = attribute.Key("url.original") - - // URLPathKey is the attribute Key conforming to the "url.path" semantic - // conventions. It represents the [URI path] component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "/search" - // Note: Sensitive content provided in `url.path` SHOULD be scrubbed when - // instrumentations can identify it. - // - // [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3 - URLPathKey = attribute.Key("url.path") - - // URLPortKey is the attribute Key conforming to the "url.port" semantic - // conventions. It represents the port extracted from the `url.full`. - // - // Type: int - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: 443 - URLPortKey = attribute.Key("url.port") - - // URLQueryKey is the attribute Key conforming to the "url.query" semantic - // conventions. It represents the [URI query] component. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "q=OpenTelemetry" - // Note: Sensitive content provided in `url.query` SHOULD be scrubbed when - // instrumentations can identify it. - // - // - // Query string values for the following keys SHOULD be redacted by default and - // replaced by the value `REDACTED`: - // - // - [`AWSAccessKeyId`] - // - [`Signature`] - // - [`sig`] - // - [`X-Goog-Signature`] - // - // This list is subject to change over time. - // - // When a query string value is redacted, the query string key SHOULD still be - // preserved, e.g. - // `q=OpenTelemetry&sig=REDACTED`. - // - // [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4 - // [`AWSAccessKeyId`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth - // [`Signature`]: https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth - // [`sig`]: https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token - // [`X-Goog-Signature`]: https://cloud.google.com/storage/docs/access-control/signed-urls - URLQueryKey = attribute.Key("url.query") - - // URLRegisteredDomainKey is the attribute Key conforming to the - // "url.registered_domain" semantic conventions. It represents the highest - // registered url domain, stripped of the subdomain. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "example.com", "foo.co.uk" - // Note: This value can be determined precisely with the [public suffix list]. - // For example, the registered domain for `foo.example.com` is `example.com`. - // Trying to approximate this by simply taking the last two labels will not work - // well for TLDs such as `co.uk`. - // - // [public suffix list]: https://publicsuffix.org/ - URLRegisteredDomainKey = attribute.Key("url.registered_domain") - - // URLSchemeKey is the attribute Key conforming to the "url.scheme" semantic - // conventions. It represents the [URI scheme] component identifying the used - // protocol. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "https", "ftp", "telnet" - // - // [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 - URLSchemeKey = attribute.Key("url.scheme") - - // URLSubdomainKey is the attribute Key conforming to the "url.subdomain" - // semantic conventions. It represents the subdomain portion of a fully - // qualified domain name includes all of the names except the host name under - // the registered_domain. In a partially qualified domain, or if the - // qualification level of the full name cannot be determined, subdomain contains - // all of the names below the registered domain. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "east", "sub2.sub1" - // Note: The subdomain portion of `www.east.mydomain.co.uk` is `east`. If the - // domain has multiple levels of subdomain, such as `sub2.sub1.example.com`, the - // subdomain field should contain `sub2.sub1`, with no trailing period. - URLSubdomainKey = attribute.Key("url.subdomain") - - // URLTemplateKey is the attribute Key conforming to the "url.template" semantic - // conventions. It represents the low-cardinality template of an - // [absolute path reference]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "/users/{id}", "/users/:id", "/users?id={id}" - // - // [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 - URLTemplateKey = attribute.Key("url.template") - - // URLTopLevelDomainKey is the attribute Key conforming to the - // "url.top_level_domain" semantic conventions. It represents the effective top - // level domain (eTLD), also known as the domain suffix, is the last part of the - // domain name. For example, the top level domain for example.com is `com`. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "com", "co.uk" - // Note: This value can be determined precisely with the [public suffix list]. - // - // [public suffix list]: https://publicsuffix.org/ - URLTopLevelDomainKey = attribute.Key("url.top_level_domain") -) - -// URLDomain returns an attribute KeyValue conforming to the "url.domain" -// semantic conventions. It represents the domain extracted from the `url.full`, -// such as "opentelemetry.io". -func URLDomain(val string) attribute.KeyValue { - return URLDomainKey.String(val) -} - -// URLExtension returns an attribute KeyValue conforming to the "url.extension" -// semantic conventions. It represents the file extension extracted from the -// `url.full`, excluding the leading dot. -func URLExtension(val string) attribute.KeyValue { - return URLExtensionKey.String(val) -} - -// URLFragment returns an attribute KeyValue conforming to the "url.fragment" -// semantic conventions. It represents the [URI fragment] component. -// -// [URI fragment]: https://www.rfc-editor.org/rfc/rfc3986#section-3.5 -func URLFragment(val string) attribute.KeyValue { - return URLFragmentKey.String(val) -} - -// URLFull returns an attribute KeyValue conforming to the "url.full" semantic -// conventions. It represents the absolute URL describing a network resource -// according to [RFC3986]. -// -// [RFC3986]: https://www.rfc-editor.org/rfc/rfc3986 -func URLFull(val string) attribute.KeyValue { - return URLFullKey.String(val) -} - -// URLOriginal returns an attribute KeyValue conforming to the "url.original" -// semantic conventions. It represents the unmodified original URL as seen in the -// event source. -func URLOriginal(val string) attribute.KeyValue { - return URLOriginalKey.String(val) -} - -// URLPath returns an attribute KeyValue conforming to the "url.path" semantic -// conventions. It represents the [URI path] component. -// -// [URI path]: https://www.rfc-editor.org/rfc/rfc3986#section-3.3 -func URLPath(val string) attribute.KeyValue { - return URLPathKey.String(val) -} - -// URLPort returns an attribute KeyValue conforming to the "url.port" semantic -// conventions. It represents the port extracted from the `url.full`. -func URLPort(val int) attribute.KeyValue { - return URLPortKey.Int(val) -} - -// URLQuery returns an attribute KeyValue conforming to the "url.query" semantic -// conventions. It represents the [URI query] component. -// -// [URI query]: https://www.rfc-editor.org/rfc/rfc3986#section-3.4 -func URLQuery(val string) attribute.KeyValue { - return URLQueryKey.String(val) -} - -// URLRegisteredDomain returns an attribute KeyValue conforming to the -// "url.registered_domain" semantic conventions. It represents the highest -// registered url domain, stripped of the subdomain. -func URLRegisteredDomain(val string) attribute.KeyValue { - return URLRegisteredDomainKey.String(val) -} - -// URLScheme returns an attribute KeyValue conforming to the "url.scheme" -// semantic conventions. It represents the [URI scheme] component identifying the -// used protocol. -// -// [URI scheme]: https://www.rfc-editor.org/rfc/rfc3986#section-3.1 -func URLScheme(val string) attribute.KeyValue { - return URLSchemeKey.String(val) -} - -// URLSubdomain returns an attribute KeyValue conforming to the "url.subdomain" -// semantic conventions. It represents the subdomain portion of a fully qualified -// domain name includes all of the names except the host name under the -// registered_domain. In a partially qualified domain, or if the qualification -// level of the full name cannot be determined, subdomain contains all of the -// names below the registered domain. -func URLSubdomain(val string) attribute.KeyValue { - return URLSubdomainKey.String(val) -} - -// URLTemplate returns an attribute KeyValue conforming to the "url.template" -// semantic conventions. It represents the low-cardinality template of an -// [absolute path reference]. -// -// [absolute path reference]: https://www.rfc-editor.org/rfc/rfc3986#section-4.2 -func URLTemplate(val string) attribute.KeyValue { - return URLTemplateKey.String(val) -} - -// URLTopLevelDomain returns an attribute KeyValue conforming to the -// "url.top_level_domain" semantic conventions. It represents the effective top -// level domain (eTLD), also known as the domain suffix, is the last part of the -// domain name. For example, the top level domain for example.com is `com`. -func URLTopLevelDomain(val string) attribute.KeyValue { - return URLTopLevelDomainKey.String(val) -} - -// Namespace: user -const ( - // UserEmailKey is the attribute Key conforming to the "user.email" semantic - // conventions. It represents the user email address. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "a.einstein@example.com" - UserEmailKey = attribute.Key("user.email") - - // UserFullNameKey is the attribute Key conforming to the "user.full_name" - // semantic conventions. It represents the user's full name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Albert Einstein" - UserFullNameKey = attribute.Key("user.full_name") - - // UserHashKey is the attribute Key conforming to the "user.hash" semantic - // conventions. It represents the unique user hash to correlate information for - // a user in anonymized form. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "364fc68eaf4c8acec74a4e52d7d1feaa" - // Note: Useful if `user.id` or `user.name` contain confidential information and - // cannot be used. - UserHashKey = attribute.Key("user.hash") - - // UserIDKey is the attribute Key conforming to the "user.id" semantic - // conventions. It represents the unique identifier of the user. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "S-1-5-21-202424912787-2692429404-2351956786-1000" - UserIDKey = attribute.Key("user.id") - - // UserNameKey is the attribute Key conforming to the "user.name" semantic - // conventions. It represents the short name or login/username of the user. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "a.einstein" - UserNameKey = attribute.Key("user.name") - - // UserRolesKey is the attribute Key conforming to the "user.roles" semantic - // conventions. It represents the array of user roles at the time of the event. - // - // Type: string[] - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "admin", "reporting_user" - UserRolesKey = attribute.Key("user.roles") -) - -// UserEmail returns an attribute KeyValue conforming to the "user.email" -// semantic conventions. It represents the user email address. -func UserEmail(val string) attribute.KeyValue { - return UserEmailKey.String(val) -} - -// UserFullName returns an attribute KeyValue conforming to the "user.full_name" -// semantic conventions. It represents the user's full name. -func UserFullName(val string) attribute.KeyValue { - return UserFullNameKey.String(val) -} - -// UserHash returns an attribute KeyValue conforming to the "user.hash" semantic -// conventions. It represents the unique user hash to correlate information for a -// user in anonymized form. -func UserHash(val string) attribute.KeyValue { - return UserHashKey.String(val) -} - -// UserID returns an attribute KeyValue conforming to the "user.id" semantic -// conventions. It represents the unique identifier of the user. -func UserID(val string) attribute.KeyValue { - return UserIDKey.String(val) -} - -// UserName returns an attribute KeyValue conforming to the "user.name" semantic -// conventions. It represents the short name or login/username of the user. -func UserName(val string) attribute.KeyValue { - return UserNameKey.String(val) -} - -// UserRoles returns an attribute KeyValue conforming to the "user.roles" -// semantic conventions. It represents the array of user roles at the time of the -// event. -func UserRoles(val ...string) attribute.KeyValue { - return UserRolesKey.StringSlice(val) -} - -// Namespace: user_agent -const ( - // UserAgentNameKey is the attribute Key conforming to the "user_agent.name" - // semantic conventions. It represents the name of the user-agent extracted from - // original. Usually refers to the browser's name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Safari", "YourApp" - // Note: [Example] of extracting browser's name from original string. In the - // case of using a user-agent for non-browser products, such as microservices - // with multiple names/versions inside the `user_agent.original`, the most - // significant name SHOULD be selected. In such a scenario it should align with - // `user_agent.version` - // - // [Example]: https://www.whatsmyua.info - UserAgentNameKey = attribute.Key("user_agent.name") - - // UserAgentOriginalKey is the attribute Key conforming to the - // "user_agent.original" semantic conventions. It represents the value of the - // [HTTP User-Agent] header sent by the client. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Stable - // - // Examples: "CERN-LineMode/2.15 libwww/2.17b3", "Mozilla/5.0 (iPhone; CPU - // iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) - // Version/14.1.2 Mobile/15E148 Safari/604.1", "YourApp/1.0.0 - // grpc-java-okhttp/1.27.2" - // - // [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent - UserAgentOriginalKey = attribute.Key("user_agent.original") - - // UserAgentOSNameKey is the attribute Key conforming to the - // "user_agent.os.name" semantic conventions. It represents the human readable - // operating system name. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "iOS", "Android", "Ubuntu" - // Note: For mapping user agent strings to OS names, libraries such as - // [ua-parser] can be utilized. - // - // [ua-parser]: https://github.com/ua-parser - UserAgentOSNameKey = attribute.Key("user_agent.os.name") - - // UserAgentOSVersionKey is the attribute Key conforming to the - // "user_agent.os.version" semantic conventions. It represents the version - // string of the operating system as defined in [Version Attributes]. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "14.2.1", "18.04.1" - // Note: For mapping user agent strings to OS versions, libraries such as - // [ua-parser] can be utilized. - // - // [Version Attributes]: /docs/resource/README.md#version-attributes - // [ua-parser]: https://github.com/ua-parser - UserAgentOSVersionKey = attribute.Key("user_agent.os.version") - - // UserAgentSyntheticTypeKey is the attribute Key conforming to the - // "user_agent.synthetic.type" semantic conventions. It represents the specifies - // the category of synthetic traffic, such as tests or bots. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // Note: This attribute MAY be derived from the contents of the - // `user_agent.original` attribute. Components that populate the attribute are - // responsible for determining what they consider to be synthetic bot or test - // traffic. This attribute can either be set for self-identification purposes, - // or on telemetry detected to be generated as a result of a synthetic request. - // This attribute is useful for distinguishing between genuine client traffic - // and synthetic traffic generated by bots or tests. - UserAgentSyntheticTypeKey = attribute.Key("user_agent.synthetic.type") - - // UserAgentVersionKey is the attribute Key conforming to the - // "user_agent.version" semantic conventions. It represents the version of the - // user-agent extracted from original. Usually refers to the browser's version. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "14.1.2", "1.0.0" - // Note: [Example] of extracting browser's version from original string. In the - // case of using a user-agent for non-browser products, such as microservices - // with multiple names/versions inside the `user_agent.original`, the most - // significant version SHOULD be selected. In such a scenario it should align - // with `user_agent.name` - // - // [Example]: https://www.whatsmyua.info - UserAgentVersionKey = attribute.Key("user_agent.version") -) - -// UserAgentName returns an attribute KeyValue conforming to the -// "user_agent.name" semantic conventions. It represents the name of the -// user-agent extracted from original. Usually refers to the browser's name. -func UserAgentName(val string) attribute.KeyValue { - return UserAgentNameKey.String(val) -} - -// UserAgentOriginal returns an attribute KeyValue conforming to the -// "user_agent.original" semantic conventions. It represents the value of the -// [HTTP User-Agent] header sent by the client. -// -// [HTTP User-Agent]: https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent -func UserAgentOriginal(val string) attribute.KeyValue { - return UserAgentOriginalKey.String(val) -} - -// UserAgentOSName returns an attribute KeyValue conforming to the -// "user_agent.os.name" semantic conventions. It represents the human readable -// operating system name. -func UserAgentOSName(val string) attribute.KeyValue { - return UserAgentOSNameKey.String(val) -} - -// UserAgentOSVersion returns an attribute KeyValue conforming to the -// "user_agent.os.version" semantic conventions. It represents the version string -// of the operating system as defined in [Version Attributes]. -// -// [Version Attributes]: /docs/resource/README.md#version-attributes -func UserAgentOSVersion(val string) attribute.KeyValue { - return UserAgentOSVersionKey.String(val) -} - -// UserAgentVersion returns an attribute KeyValue conforming to the -// "user_agent.version" semantic conventions. It represents the version of the -// user-agent extracted from original. Usually refers to the browser's version. -func UserAgentVersion(val string) attribute.KeyValue { - return UserAgentVersionKey.String(val) -} - -// Enum values for user_agent.synthetic.type -var ( - // Bot source. - // Stability: development - UserAgentSyntheticTypeBot = UserAgentSyntheticTypeKey.String("bot") - // Synthetic test source. - // Stability: development - UserAgentSyntheticTypeTest = UserAgentSyntheticTypeKey.String("test") -) - -// Namespace: vcs -const ( - // VCSChangeIDKey is the attribute Key conforming to the "vcs.change.id" - // semantic conventions. It represents the ID of the change (pull request/merge - // request/changelist) if applicable. This is usually a unique (within - // repository) identifier generated by the VCS system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "123" - VCSChangeIDKey = attribute.Key("vcs.change.id") - - // VCSChangeStateKey is the attribute Key conforming to the "vcs.change.state" - // semantic conventions. It represents the state of the change (pull - // request/merge request/changelist). - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "open", "closed", "merged" - VCSChangeStateKey = attribute.Key("vcs.change.state") - - // VCSChangeTitleKey is the attribute Key conforming to the "vcs.change.title" - // semantic conventions. It represents the human readable title of the change - // (pull request/merge request/changelist). This title is often a brief summary - // of the change and may get merged in to a ref as the commit summary. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "Fixes broken thing", "feat: add my new feature", "[chore] update - // dependency" - VCSChangeTitleKey = attribute.Key("vcs.change.title") - - // VCSLineChangeTypeKey is the attribute Key conforming to the - // "vcs.line_change.type" semantic conventions. It represents the type of line - // change being measured on a branch or change. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "added", "removed" - VCSLineChangeTypeKey = attribute.Key("vcs.line_change.type") - - // VCSOwnerNameKey is the attribute Key conforming to the "vcs.owner.name" - // semantic conventions. It represents the group owner within the version - // control system. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-org", "myteam", "business-unit" - VCSOwnerNameKey = attribute.Key("vcs.owner.name") - - // VCSProviderNameKey is the attribute Key conforming to the "vcs.provider.name" - // semantic conventions. It represents the name of the version control system - // provider. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "github", "gitlab", "gitea", "bitbucket" - VCSProviderNameKey = attribute.Key("vcs.provider.name") - - // VCSRefBaseNameKey is the attribute Key conforming to the "vcs.ref.base.name" - // semantic conventions. It represents the name of the [reference] such as - // **branch** or **tag** in the repository. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-feature-branch", "tag-1-test" - // Note: `base` refers to the starting point of a change. For example, `main` - // would be the base reference of type branch if you've created a new - // reference of type branch from it and created new commits. - // - // [reference]: https://git-scm.com/docs/gitglossary#def_ref - VCSRefBaseNameKey = attribute.Key("vcs.ref.base.name") - - // VCSRefBaseRevisionKey is the attribute Key conforming to the - // "vcs.ref.base.revision" semantic conventions. It represents the revision, - // literally [revised version], The revision most often refers to a commit - // object in Git, or a revision number in SVN. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", - // "main", "123", "HEAD" - // Note: `base` refers to the starting point of a change. For example, `main` - // would be the base reference of type branch if you've created a new - // reference of type branch from it and created new commits. The - // revision can be a full [hash value (see - // glossary)], - // of the recorded change to a ref within a repository pointing to a - // commit [commit] object. It does - // not necessarily have to be a hash; it can simply define a [revision - // number] - // which is an integer that is monotonically increasing. In cases where - // it is identical to the `ref.base.name`, it SHOULD still be included. - // It is up to the implementer to decide which value to set as the - // revision based on the VCS system and situational context. - // - // [revised version]: https://www.merriam-webster.com/dictionary/revision - // [hash value (see - // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf - // [commit]: https://git-scm.com/docs/git-commit - // [revision - // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html - VCSRefBaseRevisionKey = attribute.Key("vcs.ref.base.revision") - - // VCSRefBaseTypeKey is the attribute Key conforming to the "vcs.ref.base.type" - // semantic conventions. It represents the type of the [reference] in the - // repository. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "branch", "tag" - // Note: `base` refers to the starting point of a change. For example, `main` - // would be the base reference of type branch if you've created a new - // reference of type branch from it and created new commits. - // - // [reference]: https://git-scm.com/docs/gitglossary#def_ref - VCSRefBaseTypeKey = attribute.Key("vcs.ref.base.type") - - // VCSRefHeadNameKey is the attribute Key conforming to the "vcs.ref.head.name" - // semantic conventions. It represents the name of the [reference] such as - // **branch** or **tag** in the repository. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "my-feature-branch", "tag-1-test" - // Note: `head` refers to where you are right now; the current reference at a - // given time. - // - // [reference]: https://git-scm.com/docs/gitglossary#def_ref - VCSRefHeadNameKey = attribute.Key("vcs.ref.head.name") - - // VCSRefHeadRevisionKey is the attribute Key conforming to the - // "vcs.ref.head.revision" semantic conventions. It represents the revision, - // literally [revised version], The revision most often refers to a commit - // object in Git, or a revision number in SVN. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "9d59409acf479dfa0df1aa568182e43e43df8bbe28d60fcf2bc52e30068802cc", - // "main", "123", "HEAD" - // Note: `head` refers to where you are right now; the current reference at a - // given time.The revision can be a full [hash value (see - // glossary)], - // of the recorded change to a ref within a repository pointing to a - // commit [commit] object. It does - // not necessarily have to be a hash; it can simply define a [revision - // number] - // which is an integer that is monotonically increasing. In cases where - // it is identical to the `ref.head.name`, it SHOULD still be included. - // It is up to the implementer to decide which value to set as the - // revision based on the VCS system and situational context. - // - // [revised version]: https://www.merriam-webster.com/dictionary/revision - // [hash value (see - // glossary)]: https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5.pdf - // [commit]: https://git-scm.com/docs/git-commit - // [revision - // number]: https://svnbook.red-bean.com/en/1.7/svn.tour.revs.specifiers.html - VCSRefHeadRevisionKey = attribute.Key("vcs.ref.head.revision") - - // VCSRefHeadTypeKey is the attribute Key conforming to the "vcs.ref.head.type" - // semantic conventions. It represents the type of the [reference] in the - // repository. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "branch", "tag" - // Note: `head` refers to where you are right now; the current reference at a - // given time. - // - // [reference]: https://git-scm.com/docs/gitglossary#def_ref - VCSRefHeadTypeKey = attribute.Key("vcs.ref.head.type") - - // VCSRefTypeKey is the attribute Key conforming to the "vcs.ref.type" semantic - // conventions. It represents the type of the [reference] in the repository. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "branch", "tag" - // - // [reference]: https://git-scm.com/docs/gitglossary#def_ref - VCSRefTypeKey = attribute.Key("vcs.ref.type") - - // VCSRepositoryNameKey is the attribute Key conforming to the - // "vcs.repository.name" semantic conventions. It represents the human readable - // name of the repository. It SHOULD NOT include any additional identifier like - // Group/SubGroup in GitLab or organization in GitHub. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "semantic-conventions", "my-cool-repo" - // Note: Due to it only being the name, it can clash with forks of the same - // repository if collecting telemetry across multiple orgs or groups in - // the same backends. - VCSRepositoryNameKey = attribute.Key("vcs.repository.name") - - // VCSRepositoryURLFullKey is the attribute Key conforming to the - // "vcs.repository.url.full" semantic conventions. It represents the - // [canonical URL] of the repository providing the complete HTTP(S) address in - // order to locate and identify the repository through a browser. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: - // "https://github.com/opentelemetry/open-telemetry-collector-contrib", - // "https://gitlab.com/my-org/my-project/my-projects-project/repo" - // Note: In Git Version Control Systems, the canonical URL SHOULD NOT include - // the `.git` extension. - // - // [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical. - VCSRepositoryURLFullKey = attribute.Key("vcs.repository.url.full") - - // VCSRevisionDeltaDirectionKey is the attribute Key conforming to the - // "vcs.revision_delta.direction" semantic conventions. It represents the type - // of revision comparison. - // - // Type: Enum - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "ahead", "behind" - VCSRevisionDeltaDirectionKey = attribute.Key("vcs.revision_delta.direction") -) - -// VCSChangeID returns an attribute KeyValue conforming to the "vcs.change.id" -// semantic conventions. It represents the ID of the change (pull request/merge -// request/changelist) if applicable. This is usually a unique (within -// repository) identifier generated by the VCS system. -func VCSChangeID(val string) attribute.KeyValue { - return VCSChangeIDKey.String(val) -} - -// VCSChangeTitle returns an attribute KeyValue conforming to the -// "vcs.change.title" semantic conventions. It represents the human readable -// title of the change (pull request/merge request/changelist). This title is -// often a brief summary of the change and may get merged in to a ref as the -// commit summary. -func VCSChangeTitle(val string) attribute.KeyValue { - return VCSChangeTitleKey.String(val) -} - -// VCSOwnerName returns an attribute KeyValue conforming to the "vcs.owner.name" -// semantic conventions. It represents the group owner within the version control -// system. -func VCSOwnerName(val string) attribute.KeyValue { - return VCSOwnerNameKey.String(val) -} - -// VCSRefBaseName returns an attribute KeyValue conforming to the -// "vcs.ref.base.name" semantic conventions. It represents the name of the -// [reference] such as **branch** or **tag** in the repository. -// -// [reference]: https://git-scm.com/docs/gitglossary#def_ref -func VCSRefBaseName(val string) attribute.KeyValue { - return VCSRefBaseNameKey.String(val) -} - -// VCSRefBaseRevision returns an attribute KeyValue conforming to the -// "vcs.ref.base.revision" semantic conventions. It represents the revision, -// literally [revised version], The revision most often refers to a commit object -// in Git, or a revision number in SVN. -// -// [revised version]: https://www.merriam-webster.com/dictionary/revision -func VCSRefBaseRevision(val string) attribute.KeyValue { - return VCSRefBaseRevisionKey.String(val) -} - -// VCSRefHeadName returns an attribute KeyValue conforming to the -// "vcs.ref.head.name" semantic conventions. It represents the name of the -// [reference] such as **branch** or **tag** in the repository. -// -// [reference]: https://git-scm.com/docs/gitglossary#def_ref -func VCSRefHeadName(val string) attribute.KeyValue { - return VCSRefHeadNameKey.String(val) -} - -// VCSRefHeadRevision returns an attribute KeyValue conforming to the -// "vcs.ref.head.revision" semantic conventions. It represents the revision, -// literally [revised version], The revision most often refers to a commit object -// in Git, or a revision number in SVN. -// -// [revised version]: https://www.merriam-webster.com/dictionary/revision -func VCSRefHeadRevision(val string) attribute.KeyValue { - return VCSRefHeadRevisionKey.String(val) -} - -// VCSRepositoryName returns an attribute KeyValue conforming to the -// "vcs.repository.name" semantic conventions. It represents the human readable -// name of the repository. It SHOULD NOT include any additional identifier like -// Group/SubGroup in GitLab or organization in GitHub. -func VCSRepositoryName(val string) attribute.KeyValue { - return VCSRepositoryNameKey.String(val) -} - -// VCSRepositoryURLFull returns an attribute KeyValue conforming to the -// "vcs.repository.url.full" semantic conventions. It represents the -// [canonical URL] of the repository providing the complete HTTP(S) address in -// order to locate and identify the repository through a browser. -// -// [canonical URL]: https://support.google.com/webmasters/answer/10347851?hl=en#:~:text=A%20canonical%20URL%20is%20the,Google%20chooses%20one%20as%20canonical. -func VCSRepositoryURLFull(val string) attribute.KeyValue { - return VCSRepositoryURLFullKey.String(val) -} - -// Enum values for vcs.change.state -var ( - // Open means the change is currently active and under review. It hasn't been - // merged into the target branch yet, and it's still possible to make changes or - // add comments. - // Stability: development - VCSChangeStateOpen = VCSChangeStateKey.String("open") - // WIP (work-in-progress, draft) means the change is still in progress and not - // yet ready for a full review. It might still undergo significant changes. - // Stability: development - VCSChangeStateWip = VCSChangeStateKey.String("wip") - // Closed means the merge request has been closed without merging. This can - // happen for various reasons, such as the changes being deemed unnecessary, the - // issue being resolved in another way, or the author deciding to withdraw the - // request. - // Stability: development - VCSChangeStateClosed = VCSChangeStateKey.String("closed") - // Merged indicates that the change has been successfully integrated into the - // target codebase. - // Stability: development - VCSChangeStateMerged = VCSChangeStateKey.String("merged") -) - -// Enum values for vcs.line_change.type -var ( - // How many lines were added. - // Stability: development - VCSLineChangeTypeAdded = VCSLineChangeTypeKey.String("added") - // How many lines were removed. - // Stability: development - VCSLineChangeTypeRemoved = VCSLineChangeTypeKey.String("removed") -) - -// Enum values for vcs.provider.name -var ( - // [GitHub] - // Stability: development - // - // [GitHub]: https://github.com - VCSProviderNameGithub = VCSProviderNameKey.String("github") - // [GitLab] - // Stability: development - // - // [GitLab]: https://gitlab.com - VCSProviderNameGitlab = VCSProviderNameKey.String("gitlab") - // [Gitea] - // Stability: development - // - // [Gitea]: https://gitea.io - VCSProviderNameGitea = VCSProviderNameKey.String("gitea") - // [Bitbucket] - // Stability: development - // - // [Bitbucket]: https://bitbucket.org - VCSProviderNameBitbucket = VCSProviderNameKey.String("bitbucket") -) - -// Enum values for vcs.ref.base.type -var ( - // [branch] - // Stability: development - // - // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch - VCSRefBaseTypeBranch = VCSRefBaseTypeKey.String("branch") - // [tag] - // Stability: development - // - // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag - VCSRefBaseTypeTag = VCSRefBaseTypeKey.String("tag") -) - -// Enum values for vcs.ref.head.type -var ( - // [branch] - // Stability: development - // - // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch - VCSRefHeadTypeBranch = VCSRefHeadTypeKey.String("branch") - // [tag] - // Stability: development - // - // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag - VCSRefHeadTypeTag = VCSRefHeadTypeKey.String("tag") -) - -// Enum values for vcs.ref.type -var ( - // [branch] - // Stability: development - // - // [branch]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefbranchabranch - VCSRefTypeBranch = VCSRefTypeKey.String("branch") - // [tag] - // Stability: development - // - // [tag]: https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddeftagatag - VCSRefTypeTag = VCSRefTypeKey.String("tag") -) - -// Enum values for vcs.revision_delta.direction -var ( - // How many revisions the change is behind the target ref. - // Stability: development - VCSRevisionDeltaDirectionBehind = VCSRevisionDeltaDirectionKey.String("behind") - // How many revisions the change is ahead of the target ref. - // Stability: development - VCSRevisionDeltaDirectionAhead = VCSRevisionDeltaDirectionKey.String("ahead") -) - -// Namespace: webengine -const ( - // WebEngineDescriptionKey is the attribute Key conforming to the - // "webengine.description" semantic conventions. It represents the additional - // description of the web engine (e.g. detailed version and edition - // information). - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) - - // 2.2.2.Final" - WebEngineDescriptionKey = attribute.Key("webengine.description") - - // WebEngineNameKey is the attribute Key conforming to the "webengine.name" - // semantic conventions. It represents the name of the web engine. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "WildFly" - WebEngineNameKey = attribute.Key("webengine.name") - - // WebEngineVersionKey is the attribute Key conforming to the - // "webengine.version" semantic conventions. It represents the version of the - // web engine. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "21.0.0" - WebEngineVersionKey = attribute.Key("webengine.version") -) - -// WebEngineDescription returns an attribute KeyValue conforming to the -// "webengine.description" semantic conventions. It represents the additional -// description of the web engine (e.g. detailed version and edition information). -func WebEngineDescription(val string) attribute.KeyValue { - return WebEngineDescriptionKey.String(val) -} - -// WebEngineName returns an attribute KeyValue conforming to the "webengine.name" -// semantic conventions. It represents the name of the web engine. -func WebEngineName(val string) attribute.KeyValue { - return WebEngineNameKey.String(val) -} - -// WebEngineVersion returns an attribute KeyValue conforming to the -// "webengine.version" semantic conventions. It represents the version of the web -// engine. -func WebEngineVersion(val string) attribute.KeyValue { - return WebEngineVersionKey.String(val) -} - -// Namespace: zos -const ( - // ZOSSmfIDKey is the attribute Key conforming to the "zos.smf.id" semantic - // conventions. It represents the System Management Facility (SMF) Identifier - // uniquely identified a z/OS system within a SYSPLEX or mainframe environment - // and is used for system and performance analysis. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "SYS1" - ZOSSmfIDKey = attribute.Key("zos.smf.id") - - // ZOSSysplexNameKey is the attribute Key conforming to the "zos.sysplex.name" - // semantic conventions. It represents the name of the SYSPLEX to which the z/OS - // system belongs too. - // - // Type: string - // RequirementLevel: Recommended - // Stability: Development - // - // Examples: "SYSPLEX1" - ZOSSysplexNameKey = attribute.Key("zos.sysplex.name") -) - -// ZOSSmfID returns an attribute KeyValue conforming to the "zos.smf.id" semantic -// conventions. It represents the System Management Facility (SMF) Identifier -// uniquely identified a z/OS system within a SYSPLEX or mainframe environment -// and is used for system and performance analysis. -func ZOSSmfID(val string) attribute.KeyValue { - return ZOSSmfIDKey.String(val) -} - -// ZOSSysplexName returns an attribute KeyValue conforming to the -// "zos.sysplex.name" semantic conventions. It represents the name of the SYSPLEX -// to which the z/OS system belongs too. -func ZOSSysplexName(val string) attribute.KeyValue { - return ZOSSysplexNameKey.String(val) -} \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go deleted file mode 100644 index 1110103210..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package semconv implements OpenTelemetry semantic conventions. -// -// OpenTelemetry semantic conventions are agreed standardized naming -// patterns for OpenTelemetry things. This package represents the v1.37.0 -// version of the OpenTelemetry semantic conventions. -package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go deleted file mode 100644 index 267979c051..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/error_type.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" - -import ( - "reflect" - - "go.opentelemetry.io/otel/attribute" -) - -// ErrorType returns an [attribute.KeyValue] identifying the error type of err. -// -// If err is nil, the returned attribute has the default value -// [ErrorTypeOther]. -// -// If err's type has the method -// -// ErrorType() string -// -// then the returned attribute has the value of err.ErrorType(). Otherwise, the -// returned attribute has a value derived from the concrete type of err. -// -// The key of the returned attribute is [ErrorTypeKey]. -func ErrorType(err error) attribute.KeyValue { - if err == nil { - return ErrorTypeOther - } - - return ErrorTypeKey.String(errorType(err)) -} - -func errorType(err error) string { - var s string - if et, ok := err.(interface{ ErrorType() string }); ok { - // Prioritize the ErrorType method if available. - s = et.ErrorType() - } - if s == "" { - // Fallback to reflection if the ErrorType method is not supported or - // returns an empty value. - - t := reflect.TypeOf(err) - pkg, name := t.PkgPath(), t.Name() - if pkg != "" && name != "" { - s = pkg + "." + name - } else { - // The type has no package path or name (predeclared, not-defined, - // or alias for a not-defined type). - // - // This is not guaranteed to be unique, but is a best effort. - s = t.String() - } - } - return s -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go deleted file mode 100644 index e67469a4f6..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/exception.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" - -const ( - // ExceptionEventName is the name of the Span event representing an exception. - ExceptionEventName = "exception" -) diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go deleted file mode 100644 index fd064530c3..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/otelconv/metric.go +++ /dev/null @@ -1,2264 +0,0 @@ -// Code generated from semantic convention specification. DO NOT EDIT. - -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package otelconv provides types and functionality for OpenTelemetry semantic -// conventions in the "otel" namespace. -package otelconv - -import ( - "context" - "sync" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" -) - -var ( - addOptPool = &sync.Pool{New: func() any { return &[]metric.AddOption{} }} - recOptPool = &sync.Pool{New: func() any { return &[]metric.RecordOption{} }} -) - -// ErrorTypeAttr is an attribute conforming to the error.type semantic -// conventions. It represents the describes a class of error the operation ended -// with. -type ErrorTypeAttr string - -var ( - // ErrorTypeOther is a fallback error value to be used when the instrumentation - // doesn't define a custom value. - ErrorTypeOther ErrorTypeAttr = "_OTHER" -) - -// ComponentTypeAttr is an attribute conforming to the otel.component.type -// semantic conventions. It represents a name identifying the type of the -// OpenTelemetry component. -type ComponentTypeAttr string - -var ( - // ComponentTypeBatchingSpanProcessor is the builtin SDK batching span - // processor. - ComponentTypeBatchingSpanProcessor ComponentTypeAttr = "batching_span_processor" - // ComponentTypeSimpleSpanProcessor is the builtin SDK simple span processor. - ComponentTypeSimpleSpanProcessor ComponentTypeAttr = "simple_span_processor" - // ComponentTypeBatchingLogProcessor is the builtin SDK batching log record - // processor. - ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor" - // ComponentTypeSimpleLogProcessor is the builtin SDK simple log record - // processor. - ComponentTypeSimpleLogProcessor ComponentTypeAttr = "simple_log_processor" - // ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with - // protobuf serialization. - ComponentTypeOtlpGRPCSpanExporter ComponentTypeAttr = "otlp_grpc_span_exporter" - // ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with - // protobuf serialization. - ComponentTypeOtlpHTTPSpanExporter ComponentTypeAttr = "otlp_http_span_exporter" - // ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP - // with JSON serialization. - ComponentTypeOtlpHTTPJSONSpanExporter ComponentTypeAttr = "otlp_http_json_span_exporter" - // ComponentTypeZipkinHTTPSpanExporter is the zipkin span exporter over HTTP. - ComponentTypeZipkinHTTPSpanExporter ComponentTypeAttr = "zipkin_http_span_exporter" - // ComponentTypeOtlpGRPCLogExporter is the OTLP log record exporter over gRPC - // with protobuf serialization. - ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter" - // ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP - // with protobuf serialization. - ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter" - // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over - // HTTP with JSON serialization. - ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter" - // ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting - // metric reader. - ComponentTypePeriodicMetricReader ComponentTypeAttr = "periodic_metric_reader" - // ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC - // with protobuf serialization. - ComponentTypeOtlpGRPCMetricExporter ComponentTypeAttr = "otlp_grpc_metric_exporter" - // ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP - // with protobuf serialization. - ComponentTypeOtlpHTTPMetricExporter ComponentTypeAttr = "otlp_http_metric_exporter" - // ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP - // with JSON serialization. - ComponentTypeOtlpHTTPJSONMetricExporter ComponentTypeAttr = "otlp_http_json_metric_exporter" - // ComponentTypePrometheusHTTPTextMetricExporter is the prometheus metric - // exporter over HTTP with the default text-based format. - ComponentTypePrometheusHTTPTextMetricExporter ComponentTypeAttr = "prometheus_http_text_metric_exporter" -) - -// SpanParentOriginAttr is an attribute conforming to the otel.span.parent.origin -// semantic conventions. It represents the determines whether the span has a -// parent span, and if so, [whether it is a remote parent]. -// -// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote -type SpanParentOriginAttr string - -var ( - // SpanParentOriginNone is the span does not have a parent, it is a root span. - SpanParentOriginNone SpanParentOriginAttr = "none" - // SpanParentOriginLocal is the span has a parent and the parent's span context - // [isRemote()] is false. - // - // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote - SpanParentOriginLocal SpanParentOriginAttr = "local" - // SpanParentOriginRemote is the span has a parent and the parent's span context - // [isRemote()] is true. - // - // [isRemote()]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote - SpanParentOriginRemote SpanParentOriginAttr = "remote" -) - -// SpanSamplingResultAttr is an attribute conforming to the -// otel.span.sampling_result semantic conventions. It represents the result value -// of the sampler for this span. -type SpanSamplingResultAttr string - -var ( - // SpanSamplingResultDrop is the span is not sampled and not recording. - SpanSamplingResultDrop SpanSamplingResultAttr = "DROP" - // SpanSamplingResultRecordOnly is the span is not sampled, but recording. - SpanSamplingResultRecordOnly SpanSamplingResultAttr = "RECORD_ONLY" - // SpanSamplingResultRecordAndSample is the span is sampled and recording. - SpanSamplingResultRecordAndSample SpanSamplingResultAttr = "RECORD_AND_SAMPLE" -) - -// RPCGRPCStatusCodeAttr is an attribute conforming to the rpc.grpc.status_code -// semantic conventions. It represents the gRPC status code of the last gRPC -// requests performed in scope of this export call. -type RPCGRPCStatusCodeAttr int64 - -var ( - // RPCGRPCStatusCodeOk is the OK. - RPCGRPCStatusCodeOk RPCGRPCStatusCodeAttr = 0 - // RPCGRPCStatusCodeCancelled is the CANCELLED. - RPCGRPCStatusCodeCancelled RPCGRPCStatusCodeAttr = 1 - // RPCGRPCStatusCodeUnknown is the UNKNOWN. - RPCGRPCStatusCodeUnknown RPCGRPCStatusCodeAttr = 2 - // RPCGRPCStatusCodeInvalidArgument is the INVALID_ARGUMENT. - RPCGRPCStatusCodeInvalidArgument RPCGRPCStatusCodeAttr = 3 - // RPCGRPCStatusCodeDeadlineExceeded is the DEADLINE_EXCEEDED. - RPCGRPCStatusCodeDeadlineExceeded RPCGRPCStatusCodeAttr = 4 - // RPCGRPCStatusCodeNotFound is the NOT_FOUND. - RPCGRPCStatusCodeNotFound RPCGRPCStatusCodeAttr = 5 - // RPCGRPCStatusCodeAlreadyExists is the ALREADY_EXISTS. - RPCGRPCStatusCodeAlreadyExists RPCGRPCStatusCodeAttr = 6 - // RPCGRPCStatusCodePermissionDenied is the PERMISSION_DENIED. - RPCGRPCStatusCodePermissionDenied RPCGRPCStatusCodeAttr = 7 - // RPCGRPCStatusCodeResourceExhausted is the RESOURCE_EXHAUSTED. - RPCGRPCStatusCodeResourceExhausted RPCGRPCStatusCodeAttr = 8 - // RPCGRPCStatusCodeFailedPrecondition is the FAILED_PRECONDITION. - RPCGRPCStatusCodeFailedPrecondition RPCGRPCStatusCodeAttr = 9 - // RPCGRPCStatusCodeAborted is the ABORTED. - RPCGRPCStatusCodeAborted RPCGRPCStatusCodeAttr = 10 - // RPCGRPCStatusCodeOutOfRange is the OUT_OF_RANGE. - RPCGRPCStatusCodeOutOfRange RPCGRPCStatusCodeAttr = 11 - // RPCGRPCStatusCodeUnimplemented is the UNIMPLEMENTED. - RPCGRPCStatusCodeUnimplemented RPCGRPCStatusCodeAttr = 12 - // RPCGRPCStatusCodeInternal is the INTERNAL. - RPCGRPCStatusCodeInternal RPCGRPCStatusCodeAttr = 13 - // RPCGRPCStatusCodeUnavailable is the UNAVAILABLE. - RPCGRPCStatusCodeUnavailable RPCGRPCStatusCodeAttr = 14 - // RPCGRPCStatusCodeDataLoss is the DATA_LOSS. - RPCGRPCStatusCodeDataLoss RPCGRPCStatusCodeAttr = 15 - // RPCGRPCStatusCodeUnauthenticated is the UNAUTHENTICATED. - RPCGRPCStatusCodeUnauthenticated RPCGRPCStatusCodeAttr = 16 -) - -// SDKExporterLogExported is an instrument used to record metric values -// conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It -// represents the number of log records for which the export has finished, either -// successful or failed. -type SDKExporterLogExported struct { - metric.Int64Counter -} - -var newSDKExporterLogExportedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of log records for which the export has finished, either successful or failed."), - metric.WithUnit("{log_record}"), -} - -// NewSDKExporterLogExported returns a new SDKExporterLogExported instrument. -func NewSDKExporterLogExported( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKExporterLogExported, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterLogExported{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterLogExportedOpts - } else { - opt = append(opt, newSDKExporterLogExportedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.exporter.log.exported", - opt..., - ) - if err != nil { - return SDKExporterLogExported{noop.Int64Counter{}}, err - } - return SDKExporterLogExported{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterLogExported) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterLogExported) Name() string { - return "otel.sdk.exporter.log.exported" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterLogExported) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterLogExported) Description() string { - return "The number of log records for which the export has finished, either successful or failed." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with -// `rejected_log_records`), rejected log records MUST count as failed and only -// non-rejected log records count as success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterLogExported) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with -// `rejected_log_records`), rejected log records MUST count as failed and only -// non-rejected log records count as success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterLogExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents the describes a class of error the operation ended -// with. -func (SDKExporterLogExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterLogInflight is an instrument used to record metric values -// conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It -// represents the number of log records which were passed to the exporter, but -// that have not been exported yet (neither successful, nor failed). -type SDKExporterLogInflight struct { - metric.Int64UpDownCounter -} - -var newSDKExporterLogInflightOpts = []metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{log_record}"), -} - -// NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument. -func NewSDKExporterLogInflight( - m metric.Meter, - opt ...metric.Int64UpDownCounterOption, -) (SDKExporterLogInflight, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterLogInflightOpts - } else { - opt = append(opt, newSDKExporterLogInflightOpts...) - } - - i, err := m.Int64UpDownCounter( - "otel.sdk.exporter.log.inflight", - opt..., - ) - if err != nil { - return SDKExporterLogInflight{noop.Int64UpDownCounter{}}, err - } - return SDKExporterLogInflight{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter { - return m.Int64UpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterLogInflight) Name() string { - return "otel.sdk.exporter.log.inflight" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterLogInflight) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterLogInflight) Description() string { - return "The number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterLogInflight) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterLogInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterMetricDataPointExported is an instrument used to record metric -// values conforming to the "otel.sdk.exporter.metric_data_point.exported" -// semantic conventions. It represents the number of metric data points for which -// the export has finished, either successful or failed. -type SDKExporterMetricDataPointExported struct { - metric.Int64Counter -} - -var newSDKExporterMetricDataPointExportedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of metric data points for which the export has finished, either successful or failed."), - metric.WithUnit("{data_point}"), -} - -// NewSDKExporterMetricDataPointExported returns a new -// SDKExporterMetricDataPointExported instrument. -func NewSDKExporterMetricDataPointExported( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKExporterMetricDataPointExported, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterMetricDataPointExportedOpts - } else { - opt = append(opt, newSDKExporterMetricDataPointExportedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.exporter.metric_data_point.exported", - opt..., - ) - if err != nil { - return SDKExporterMetricDataPointExported{noop.Int64Counter{}}, err - } - return SDKExporterMetricDataPointExported{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterMetricDataPointExported) Name() string { - return "otel.sdk.exporter.metric_data_point.exported" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterMetricDataPointExported) Unit() string { - return "{data_point}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterMetricDataPointExported) Description() string { - return "The number of metric data points for which the export has finished, either successful or failed." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with -// `rejected_data_points`), rejected data points MUST count as failed and only -// non-rejected data points count as success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterMetricDataPointExported) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with -// `rejected_data_points`), rejected data points MUST count as failed and only -// non-rejected data points count as success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterMetricDataPointExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents the describes a class of error the operation ended -// with. -func (SDKExporterMetricDataPointExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterMetricDataPointExported) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterMetricDataPointExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterMetricDataPointExported) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterMetricDataPointInflight is an instrument used to record metric -// values conforming to the "otel.sdk.exporter.metric_data_point.inflight" -// semantic conventions. It represents the number of metric data points which -// were passed to the exporter, but that have not been exported yet (neither -// successful, nor failed). -type SDKExporterMetricDataPointInflight struct { - metric.Int64UpDownCounter -} - -var newSDKExporterMetricDataPointInflightOpts = []metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{data_point}"), -} - -// NewSDKExporterMetricDataPointInflight returns a new -// SDKExporterMetricDataPointInflight instrument. -func NewSDKExporterMetricDataPointInflight( - m metric.Meter, - opt ...metric.Int64UpDownCounterOption, -) (SDKExporterMetricDataPointInflight, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterMetricDataPointInflightOpts - } else { - opt = append(opt, newSDKExporterMetricDataPointInflightOpts...) - } - - i, err := m.Int64UpDownCounter( - "otel.sdk.exporter.metric_data_point.inflight", - opt..., - ) - if err != nil { - return SDKExporterMetricDataPointInflight{noop.Int64UpDownCounter{}}, err - } - return SDKExporterMetricDataPointInflight{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter { - return m.Int64UpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterMetricDataPointInflight) Name() string { - return "otel.sdk.exporter.metric_data_point.inflight" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterMetricDataPointInflight) Unit() string { - return "{data_point}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterMetricDataPointInflight) Description() string { - return "The number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterMetricDataPointInflight) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterMetricDataPointInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterMetricDataPointInflight) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterMetricDataPointInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterMetricDataPointInflight) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterOperationDuration is an instrument used to record metric values -// conforming to the "otel.sdk.exporter.operation.duration" semantic conventions. -// It represents the duration of exporting a batch of telemetry records. -type SDKExporterOperationDuration struct { - metric.Float64Histogram -} - -var newSDKExporterOperationDurationOpts = []metric.Float64HistogramOption{ - metric.WithDescription("The duration of exporting a batch of telemetry records."), - metric.WithUnit("s"), -} - -// NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration -// instrument. -func NewSDKExporterOperationDuration( - m metric.Meter, - opt ...metric.Float64HistogramOption, -) (SDKExporterOperationDuration, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterOperationDuration{noop.Float64Histogram{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterOperationDurationOpts - } else { - opt = append(opt, newSDKExporterOperationDurationOpts...) - } - - i, err := m.Float64Histogram( - "otel.sdk.exporter.operation.duration", - opt..., - ) - if err != nil { - return SDKExporterOperationDuration{noop.Float64Histogram{}}, err - } - return SDKExporterOperationDuration{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram { - return m.Float64Histogram -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterOperationDuration) Name() string { - return "otel.sdk.exporter.operation.duration" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterOperationDuration) Unit() string { - return "s" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterOperationDuration) Description() string { - return "The duration of exporting a batch of telemetry records." -} - -// Record records val to the current distribution for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// This metric defines successful operations using the full success definitions -// for [http] -// and [grpc]. Anything else is defined as an unsuccessful operation. For -// successful -// operations, `error.type` MUST NOT be set. For unsuccessful export operations, -// `error.type` MUST contain a relevant failure cause. -// -// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1 -// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success -func (m SDKExporterOperationDuration) Record( - ctx context.Context, - val float64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Float64Histogram.Record(ctx, val) - return - } - - o := recOptPool.Get().(*[]metric.RecordOption) - defer func() { - *o = (*o)[:0] - recOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Float64Histogram.Record(ctx, val, *o...) -} - -// RecordSet records val to the current distribution for set. -// -// This metric defines successful operations using the full success definitions -// for [http] -// and [grpc]. Anything else is defined as an unsuccessful operation. For -// successful -// operations, `error.type` MUST NOT be set. For unsuccessful export operations, -// `error.type` MUST contain a relevant failure cause. -// -// [http]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success-1 -// [grpc]: https://github.com/open-telemetry/opentelemetry-proto/blob/v1.5.0/docs/specification.md#full-success -func (m SDKExporterOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { - if set.Len() == 0 { - m.Float64Histogram.Record(ctx, val) - return - } - - o := recOptPool.Get().(*[]metric.RecordOption) - defer func() { - *o = (*o)[:0] - recOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Float64Histogram.Record(ctx, val, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents the describes a class of error the operation ended -// with. -func (SDKExporterOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrHTTPResponseStatusCode returns an optional attribute for the -// "http.response.status_code" semantic convention. It represents the HTTP status -// code of the last HTTP request performed in scope of this export call. -func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue { - return attribute.Int("http.response.status_code", val) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterOperationDuration) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterOperationDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrRPCGRPCStatusCode returns an optional attribute for the -// "rpc.grpc.status_code" semantic convention. It represents the gRPC status code -// of the last gRPC requests performed in scope of this export call. -func (SDKExporterOperationDuration) AttrRPCGRPCStatusCode(val RPCGRPCStatusCodeAttr) attribute.KeyValue { - return attribute.Int64("rpc.grpc.status_code", int64(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterOperationDuration) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterSpanExported is an instrument used to record metric values -// conforming to the "otel.sdk.exporter.span.exported" semantic conventions. It -// represents the number of spans for which the export has finished, either -// successful or failed. -type SDKExporterSpanExported struct { - metric.Int64Counter -} - -var newSDKExporterSpanExportedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of spans for which the export has finished, either successful or failed."), - metric.WithUnit("{span}"), -} - -// NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument. -func NewSDKExporterSpanExported( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKExporterSpanExported, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterSpanExported{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterSpanExportedOpts - } else { - opt = append(opt, newSDKExporterSpanExportedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.exporter.span.exported", - opt..., - ) - if err != nil { - return SDKExporterSpanExported{noop.Int64Counter{}}, err - } - return SDKExporterSpanExported{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterSpanExported) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterSpanExported) Name() string { - return "otel.sdk.exporter.span.exported" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterSpanExported) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterSpanExported) Description() string { - return "The number of spans for which the export has finished, either successful or failed." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with `rejected_spans` -// ), rejected spans MUST count as failed and only non-rejected spans count as -// success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterSpanExported) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -// For exporters with partial success semantics (e.g. OTLP with `rejected_spans` -// ), rejected spans MUST count as failed and only non-rejected spans count as -// success. -// If no rejection reason is available, `rejected` SHOULD be used as value for -// `error.type`. -func (m SDKExporterSpanExported) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents the describes a class of error the operation ended -// with. -func (SDKExporterSpanExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterSpanExported) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterSpanExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterSpanExported) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKExporterSpanInflight is an instrument used to record metric values -// conforming to the "otel.sdk.exporter.span.inflight" semantic conventions. It -// represents the number of spans which were passed to the exporter, but that -// have not been exported yet (neither successful, nor failed). -type SDKExporterSpanInflight struct { - metric.Int64UpDownCounter -} - -var newSDKExporterSpanInflightOpts = []metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)."), - metric.WithUnit("{span}"), -} - -// NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument. -func NewSDKExporterSpanInflight( - m metric.Meter, - opt ...metric.Int64UpDownCounterOption, -) (SDKExporterSpanInflight, error) { - // Check if the meter is nil. - if m == nil { - return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKExporterSpanInflightOpts - } else { - opt = append(opt, newSDKExporterSpanInflightOpts...) - } - - i, err := m.Int64UpDownCounter( - "otel.sdk.exporter.span.inflight", - opt..., - ) - if err != nil { - return SDKExporterSpanInflight{noop.Int64UpDownCounter{}}, err - } - return SDKExporterSpanInflight{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter { - return m.Int64UpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKExporterSpanInflight) Name() string { - return "otel.sdk.exporter.span.inflight" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKExporterSpanInflight) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKExporterSpanInflight) Description() string { - return "The number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed)." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterSpanInflight) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful exports, `error.type` MUST NOT be set. For failed exports, -// `error.type` MUST contain the failure cause. -func (m SDKExporterSpanInflight) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKExporterSpanInflight) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKExporterSpanInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// AttrServerAddress returns an optional attribute for the "server.address" -// semantic convention. It represents the server domain name if available without -// reverse DNS lookup; otherwise, IP address or Unix domain socket name. -func (SDKExporterSpanInflight) AttrServerAddress(val string) attribute.KeyValue { - return attribute.String("server.address", val) -} - -// AttrServerPort returns an optional attribute for the "server.port" semantic -// convention. It represents the server port number. -func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue { - return attribute.Int("server.port", val) -} - -// SDKLogCreated is an instrument used to record metric values conforming to the -// "otel.sdk.log.created" semantic conventions. It represents the number of logs -// submitted to enabled SDK Loggers. -type SDKLogCreated struct { - metric.Int64Counter -} - -var newSDKLogCreatedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of logs submitted to enabled SDK Loggers."), - metric.WithUnit("{log_record}"), -} - -// NewSDKLogCreated returns a new SDKLogCreated instrument. -func NewSDKLogCreated( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKLogCreated, error) { - // Check if the meter is nil. - if m == nil { - return SDKLogCreated{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKLogCreatedOpts - } else { - opt = append(opt, newSDKLogCreatedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.log.created", - opt..., - ) - if err != nil { - return SDKLogCreated{noop.Int64Counter{}}, err - } - return SDKLogCreated{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKLogCreated) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKLogCreated) Name() string { - return "otel.sdk.log.created" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKLogCreated) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKLogCreated) Description() string { - return "The number of logs submitted to enabled SDK Loggers." -} - -// Add adds incr to the existing count for attrs. -func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributes(attrs...)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -func (m SDKLogCreated) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// SDKMetricReaderCollectionDuration is an instrument used to record metric -// values conforming to the "otel.sdk.metric_reader.collection.duration" semantic -// conventions. It represents the duration of the collect operation of the metric -// reader. -type SDKMetricReaderCollectionDuration struct { - metric.Float64Histogram -} - -var newSDKMetricReaderCollectionDurationOpts = []metric.Float64HistogramOption{ - metric.WithDescription("The duration of the collect operation of the metric reader."), - metric.WithUnit("s"), -} - -// NewSDKMetricReaderCollectionDuration returns a new -// SDKMetricReaderCollectionDuration instrument. -func NewSDKMetricReaderCollectionDuration( - m metric.Meter, - opt ...metric.Float64HistogramOption, -) (SDKMetricReaderCollectionDuration, error) { - // Check if the meter is nil. - if m == nil { - return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, nil - } - - if len(opt) == 0 { - opt = newSDKMetricReaderCollectionDurationOpts - } else { - opt = append(opt, newSDKMetricReaderCollectionDurationOpts...) - } - - i, err := m.Float64Histogram( - "otel.sdk.metric_reader.collection.duration", - opt..., - ) - if err != nil { - return SDKMetricReaderCollectionDuration{noop.Float64Histogram{}}, err - } - return SDKMetricReaderCollectionDuration{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram { - return m.Float64Histogram -} - -// Name returns the semantic convention name of the instrument. -func (SDKMetricReaderCollectionDuration) Name() string { - return "otel.sdk.metric_reader.collection.duration" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKMetricReaderCollectionDuration) Unit() string { - return "s" -} - -// Description returns the semantic convention description of the instrument -func (SDKMetricReaderCollectionDuration) Description() string { - return "The duration of the collect operation of the metric reader." -} - -// Record records val to the current distribution for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful collections, `error.type` MUST NOT be set. For failed -// collections, `error.type` SHOULD contain the failure cause. -// It can happen that metrics collection is successful for some MetricProducers, -// while others fail. In that case `error.type` SHOULD be set to any of the -// failure causes. -func (m SDKMetricReaderCollectionDuration) Record( - ctx context.Context, - val float64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Float64Histogram.Record(ctx, val) - return - } - - o := recOptPool.Get().(*[]metric.RecordOption) - defer func() { - *o = (*o)[:0] - recOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Float64Histogram.Record(ctx, val, *o...) -} - -// RecordSet records val to the current distribution for set. -// -// For successful collections, `error.type` MUST NOT be set. For failed -// collections, `error.type` SHOULD contain the failure cause. -// It can happen that metrics collection is successful for some MetricProducers, -// while others fail. In that case `error.type` SHOULD be set to any of the -// failure causes. -func (m SDKMetricReaderCollectionDuration) RecordSet(ctx context.Context, val float64, set attribute.Set) { - if set.Len() == 0 { - m.Float64Histogram.Record(ctx, val) - return - } - - o := recOptPool.Get().(*[]metric.RecordOption) - defer func() { - *o = (*o)[:0] - recOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Float64Histogram.Record(ctx, val, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents the describes a class of error the operation ended -// with. -func (SDKMetricReaderCollectionDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKMetricReaderCollectionDuration) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKMetricReaderCollectionDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorLogProcessed is an instrument used to record metric values -// conforming to the "otel.sdk.processor.log.processed" semantic conventions. It -// represents the number of log records for which the processing has finished, -// either successful or failed. -type SDKProcessorLogProcessed struct { - metric.Int64Counter -} - -var newSDKProcessorLogProcessedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of log records for which the processing has finished, either successful or failed."), - metric.WithUnit("{log_record}"), -} - -// NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument. -func NewSDKProcessorLogProcessed( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKProcessorLogProcessed, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorLogProcessed{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorLogProcessedOpts - } else { - opt = append(opt, newSDKProcessorLogProcessedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.processor.log.processed", - opt..., - ) - if err != nil { - return SDKProcessorLogProcessed{noop.Int64Counter{}}, err - } - return SDKProcessorLogProcessed{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorLogProcessed) Name() string { - return "otel.sdk.processor.log.processed" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorLogProcessed) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorLogProcessed) Description() string { - return "The number of log records for which the processing has finished, either successful or failed." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful processing, `error.type` MUST NOT be set. For failed -// processing, `error.type` MUST contain the failure cause. -// For the SDK Simple and Batching Log Record Processor a log record is -// considered to be processed already when it has been submitted to the exporter, -// not when the corresponding export call has finished. -func (m SDKProcessorLogProcessed) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful processing, `error.type` MUST NOT be set. For failed -// processing, `error.type` MUST contain the failure cause. -// For the SDK Simple and Batching Log Record Processor a log record is -// considered to be processed already when it has been submitted to the exporter, -// not when the corresponding export call has finished. -func (m SDKProcessorLogProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents a low-cardinality description of the failure reason. -// SDK Batching Log Record Processors MUST use `queue_full` for log records -// dropped due to a full queue. -func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorLogQueueCapacity is an instrument used to record metric values -// conforming to the "otel.sdk.processor.log.queue.capacity" semantic -// conventions. It represents the maximum number of log records the queue of a -// given instance of an SDK Log Record processor can hold. -type SDKProcessorLogQueueCapacity struct { - metric.Int64ObservableUpDownCounter -} - -var newSDKProcessorLogQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold."), - metric.WithUnit("{log_record}"), -} - -// NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity -// instrument. -func NewSDKProcessorLogQueueCapacity( - m metric.Meter, - opt ...metric.Int64ObservableUpDownCounterOption, -) (SDKProcessorLogQueueCapacity, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorLogQueueCapacityOpts - } else { - opt = append(opt, newSDKProcessorLogQueueCapacityOpts...) - } - - i, err := m.Int64ObservableUpDownCounter( - "otel.sdk.processor.log.queue.capacity", - opt..., - ) - if err != nil { - return SDKProcessorLogQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err - } - return SDKProcessorLogQueueCapacity{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64ObservableUpDownCounter { - return m.Int64ObservableUpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorLogQueueCapacity) Name() string { - return "otel.sdk.processor.log.queue.capacity" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorLogQueueCapacity) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorLogQueueCapacity) Description() string { - return "The maximum number of log records the queue of a given instance of an SDK Log Record processor can hold." -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorLogQueueSize is an instrument used to record metric values -// conforming to the "otel.sdk.processor.log.queue.size" semantic conventions. It -// represents the number of log records in the queue of a given instance of an -// SDK log processor. -type SDKProcessorLogQueueSize struct { - metric.Int64ObservableUpDownCounter -} - -var newSDKProcessorLogQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The number of log records in the queue of a given instance of an SDK log processor."), - metric.WithUnit("{log_record}"), -} - -// NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument. -func NewSDKProcessorLogQueueSize( - m metric.Meter, - opt ...metric.Int64ObservableUpDownCounterOption, -) (SDKProcessorLogQueueSize, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorLogQueueSizeOpts - } else { - opt = append(opt, newSDKProcessorLogQueueSizeOpts...) - } - - i, err := m.Int64ObservableUpDownCounter( - "otel.sdk.processor.log.queue.size", - opt..., - ) - if err != nil { - return SDKProcessorLogQueueSize{noop.Int64ObservableUpDownCounter{}}, err - } - return SDKProcessorLogQueueSize{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorLogQueueSize) Inst() metric.Int64ObservableUpDownCounter { - return m.Int64ObservableUpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorLogQueueSize) Name() string { - return "otel.sdk.processor.log.queue.size" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorLogQueueSize) Unit() string { - return "{log_record}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorLogQueueSize) Description() string { - return "The number of log records in the queue of a given instance of an SDK log processor." -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorSpanProcessed is an instrument used to record metric values -// conforming to the "otel.sdk.processor.span.processed" semantic conventions. It -// represents the number of spans for which the processing has finished, either -// successful or failed. -type SDKProcessorSpanProcessed struct { - metric.Int64Counter -} - -var newSDKProcessorSpanProcessedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of spans for which the processing has finished, either successful or failed."), - metric.WithUnit("{span}"), -} - -// NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed -// instrument. -func NewSDKProcessorSpanProcessed( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKProcessorSpanProcessed, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorSpanProcessed{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorSpanProcessedOpts - } else { - opt = append(opt, newSDKProcessorSpanProcessedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.processor.span.processed", - opt..., - ) - if err != nil { - return SDKProcessorSpanProcessed{noop.Int64Counter{}}, err - } - return SDKProcessorSpanProcessed{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorSpanProcessed) Name() string { - return "otel.sdk.processor.span.processed" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorSpanProcessed) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorSpanProcessed) Description() string { - return "The number of spans for which the processing has finished, either successful or failed." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// For successful processing, `error.type` MUST NOT be set. For failed -// processing, `error.type` MUST contain the failure cause. -// For the SDK Simple and Batching Span Processor a span is considered to be -// processed already when it has been submitted to the exporter, not when the -// corresponding export call has finished. -func (m SDKProcessorSpanProcessed) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// For successful processing, `error.type` MUST NOT be set. For failed -// processing, `error.type` MUST contain the failure cause. -// For the SDK Simple and Batching Span Processor a span is considered to be -// processed already when it has been submitted to the exporter, not when the -// corresponding export call has finished. -func (m SDKProcessorSpanProcessed) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrErrorType returns an optional attribute for the "error.type" semantic -// convention. It represents a low-cardinality description of the failure reason. -// SDK Batching Span Processors MUST use `queue_full` for spans dropped due to a -// full queue. -func (SDKProcessorSpanProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue { - return attribute.String("error.type", string(val)) -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorSpanProcessed) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorSpanQueueCapacity is an instrument used to record metric values -// conforming to the "otel.sdk.processor.span.queue.capacity" semantic -// conventions. It represents the maximum number of spans the queue of a given -// instance of an SDK span processor can hold. -type SDKProcessorSpanQueueCapacity struct { - metric.Int64ObservableUpDownCounter -} - -var newSDKProcessorSpanQueueCapacityOpts = []metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The maximum number of spans the queue of a given instance of an SDK span processor can hold."), - metric.WithUnit("{span}"), -} - -// NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity -// instrument. -func NewSDKProcessorSpanQueueCapacity( - m metric.Meter, - opt ...metric.Int64ObservableUpDownCounterOption, -) (SDKProcessorSpanQueueCapacity, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorSpanQueueCapacityOpts - } else { - opt = append(opt, newSDKProcessorSpanQueueCapacityOpts...) - } - - i, err := m.Int64ObservableUpDownCounter( - "otel.sdk.processor.span.queue.capacity", - opt..., - ) - if err != nil { - return SDKProcessorSpanQueueCapacity{noop.Int64ObservableUpDownCounter{}}, err - } - return SDKProcessorSpanQueueCapacity{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64ObservableUpDownCounter { - return m.Int64ObservableUpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorSpanQueueCapacity) Name() string { - return "otel.sdk.processor.span.queue.capacity" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorSpanQueueCapacity) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorSpanQueueCapacity) Description() string { - return "The maximum number of spans the queue of a given instance of an SDK span processor can hold." -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKProcessorSpanQueueSize is an instrument used to record metric values -// conforming to the "otel.sdk.processor.span.queue.size" semantic conventions. -// It represents the number of spans in the queue of a given instance of an SDK -// span processor. -type SDKProcessorSpanQueueSize struct { - metric.Int64ObservableUpDownCounter -} - -var newSDKProcessorSpanQueueSizeOpts = []metric.Int64ObservableUpDownCounterOption{ - metric.WithDescription("The number of spans in the queue of a given instance of an SDK span processor."), - metric.WithUnit("{span}"), -} - -// NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize -// instrument. -func NewSDKProcessorSpanQueueSize( - m metric.Meter, - opt ...metric.Int64ObservableUpDownCounterOption, -) (SDKProcessorSpanQueueSize, error) { - // Check if the meter is nil. - if m == nil { - return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKProcessorSpanQueueSizeOpts - } else { - opt = append(opt, newSDKProcessorSpanQueueSizeOpts...) - } - - i, err := m.Int64ObservableUpDownCounter( - "otel.sdk.processor.span.queue.size", - opt..., - ) - if err != nil { - return SDKProcessorSpanQueueSize{noop.Int64ObservableUpDownCounter{}}, err - } - return SDKProcessorSpanQueueSize{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKProcessorSpanQueueSize) Inst() metric.Int64ObservableUpDownCounter { - return m.Int64ObservableUpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKProcessorSpanQueueSize) Name() string { - return "otel.sdk.processor.span.queue.size" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKProcessorSpanQueueSize) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKProcessorSpanQueueSize) Description() string { - return "The number of spans in the queue of a given instance of an SDK span processor." -} - -// AttrComponentName returns an optional attribute for the "otel.component.name" -// semantic convention. It represents a name uniquely identifying the instance of -// the OpenTelemetry component within its containing SDK instance. -func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue { - return attribute.String("otel.component.name", val) -} - -// AttrComponentType returns an optional attribute for the "otel.component.type" -// semantic convention. It represents a name identifying the type of the -// OpenTelemetry component. -func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue { - return attribute.String("otel.component.type", string(val)) -} - -// SDKSpanLive is an instrument used to record metric values conforming to the -// "otel.sdk.span.live" semantic conventions. It represents the number of created -// spans with `recording=true` for which the end operation has not been called -// yet. -type SDKSpanLive struct { - metric.Int64UpDownCounter -} - -var newSDKSpanLiveOpts = []metric.Int64UpDownCounterOption{ - metric.WithDescription("The number of created spans with `recording=true` for which the end operation has not been called yet."), - metric.WithUnit("{span}"), -} - -// NewSDKSpanLive returns a new SDKSpanLive instrument. -func NewSDKSpanLive( - m metric.Meter, - opt ...metric.Int64UpDownCounterOption, -) (SDKSpanLive, error) { - // Check if the meter is nil. - if m == nil { - return SDKSpanLive{noop.Int64UpDownCounter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKSpanLiveOpts - } else { - opt = append(opt, newSDKSpanLiveOpts...) - } - - i, err := m.Int64UpDownCounter( - "otel.sdk.span.live", - opt..., - ) - if err != nil { - return SDKSpanLive{noop.Int64UpDownCounter{}}, err - } - return SDKSpanLive{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKSpanLive) Inst() metric.Int64UpDownCounter { - return m.Int64UpDownCounter -} - -// Name returns the semantic convention name of the instrument. -func (SDKSpanLive) Name() string { - return "otel.sdk.span.live" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKSpanLive) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKSpanLive) Description() string { - return "The number of created spans with `recording=true` for which the end operation has not been called yet." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -func (m SDKSpanLive) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -func (m SDKSpanLive) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64UpDownCounter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64UpDownCounter.Add(ctx, incr, *o...) -} - -// AttrSpanSamplingResult returns an optional attribute for the -// "otel.span.sampling_result" semantic convention. It represents the result -// value of the sampler for this span. -func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue { - return attribute.String("otel.span.sampling_result", string(val)) -} - -// SDKSpanStarted is an instrument used to record metric values conforming to the -// "otel.sdk.span.started" semantic conventions. It represents the number of -// created spans. -type SDKSpanStarted struct { - metric.Int64Counter -} - -var newSDKSpanStartedOpts = []metric.Int64CounterOption{ - metric.WithDescription("The number of created spans."), - metric.WithUnit("{span}"), -} - -// NewSDKSpanStarted returns a new SDKSpanStarted instrument. -func NewSDKSpanStarted( - m metric.Meter, - opt ...metric.Int64CounterOption, -) (SDKSpanStarted, error) { - // Check if the meter is nil. - if m == nil { - return SDKSpanStarted{noop.Int64Counter{}}, nil - } - - if len(opt) == 0 { - opt = newSDKSpanStartedOpts - } else { - opt = append(opt, newSDKSpanStartedOpts...) - } - - i, err := m.Int64Counter( - "otel.sdk.span.started", - opt..., - ) - if err != nil { - return SDKSpanStarted{noop.Int64Counter{}}, err - } - return SDKSpanStarted{i}, nil -} - -// Inst returns the underlying metric instrument. -func (m SDKSpanStarted) Inst() metric.Int64Counter { - return m.Int64Counter -} - -// Name returns the semantic convention name of the instrument. -func (SDKSpanStarted) Name() string { - return "otel.sdk.span.started" -} - -// Unit returns the semantic convention unit of the instrument -func (SDKSpanStarted) Unit() string { - return "{span}" -} - -// Description returns the semantic convention description of the instrument -func (SDKSpanStarted) Description() string { - return "The number of created spans." -} - -// Add adds incr to the existing count for attrs. -// -// All additional attrs passed are included in the recorded value. -// -// Implementations MUST record this metric for all spans, even for non-recording -// ones. -func (m SDKSpanStarted) Add( - ctx context.Context, - incr int64, - attrs ...attribute.KeyValue, -) { - if len(attrs) == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append( - *o, - metric.WithAttributes( - attrs..., - ), - ) - - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AddSet adds incr to the existing count for set. -// -// Implementations MUST record this metric for all spans, even for non-recording -// ones. -func (m SDKSpanStarted) AddSet(ctx context.Context, incr int64, set attribute.Set) { - if set.Len() == 0 { - m.Int64Counter.Add(ctx, incr) - return - } - - o := addOptPool.Get().(*[]metric.AddOption) - defer func() { - *o = (*o)[:0] - addOptPool.Put(o) - }() - - *o = append(*o, metric.WithAttributeSet(set)) - m.Int64Counter.Add(ctx, incr, *o...) -} - -// AttrSpanParentOrigin returns an optional attribute for the -// "otel.span.parent.origin" semantic convention. It represents the determines -// whether the span has a parent span, and if so, [whether it is a remote parent] -// . -// -// [whether it is a remote parent]: https://opentelemetry.io/docs/specs/otel/trace/api/#isremote -func (SDKSpanStarted) AttrSpanParentOrigin(val SpanParentOriginAttr) attribute.KeyValue { - return attribute.String("otel.span.parent.origin", string(val)) -} - -// AttrSpanSamplingResult returns an optional attribute for the -// "otel.span.sampling_result" semantic convention. It represents the result -// value of the sampler for this span. -func (SDKSpanStarted) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue { - return attribute.String("otel.span.sampling_result", string(val)) -} diff --git a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go b/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go deleted file mode 100644 index f8a0b70441..0000000000 --- a/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/schema.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package semconv // import "go.opentelemetry.io/otel/semconv/v1.37.0" - -// SchemaURL is the schema URL that matches the version of the semantic conventions -// that this package defines. Semconv packages starting from v1.4.0 must declare -// non-empty schema URL in the form https://opentelemetry.io/schemas/ -const SchemaURL = "https://opentelemetry.io/schemas/1.37.0" diff --git a/vendor/go.opentelemetry.io/otel/trace.go b/vendor/go.opentelemetry.io/otel/trace.go deleted file mode 100644 index 6836c65478..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -import ( - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/trace" -) - -// Tracer creates a named tracer that implements Tracer interface. -// If the name is an empty string then provider uses default name. -// -// This is short for GetTracerProvider().Tracer(name, opts...) -func Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - return GetTracerProvider().Tracer(name, opts...) -} - -// GetTracerProvider returns the registered global trace provider. -// If none is registered then an instance of NoopTracerProvider is returned. -// -// Use the trace provider to create a named tracer. E.g. -// -// tracer := otel.GetTracerProvider().Tracer("example.com/foo") -// -// or -// -// tracer := otel.Tracer("example.com/foo") -func GetTracerProvider() trace.TracerProvider { - return global.TracerProvider() -} - -// SetTracerProvider registers `tp` as the global trace provider. -func SetTracerProvider(tp trace.TracerProvider) { - global.SetTracerProvider(tp) -} diff --git a/vendor/go.opentelemetry.io/otel/trace/LICENSE b/vendor/go.opentelemetry.io/otel/trace/LICENSE deleted file mode 100644 index f1aee0f110..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/LICENSE +++ /dev/null @@ -1,231 +0,0 @@ - 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 - - 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] - - 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. - --------------------------------------------------------------------------------- - -Copyright 2009 The Go Authors. - -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 LLC 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. \ No newline at end of file diff --git a/vendor/go.opentelemetry.io/otel/trace/README.md b/vendor/go.opentelemetry.io/otel/trace/README.md deleted file mode 100644 index 58ccaba69b..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trace API - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace)](https://pkg.go.dev/go.opentelemetry.io/otel/trace) diff --git a/vendor/go.opentelemetry.io/otel/trace/auto.go b/vendor/go.opentelemetry.io/otel/trace/auto.go deleted file mode 100644 index 8763936a84..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/auto.go +++ /dev/null @@ -1,662 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - "encoding/json" - "fmt" - "math" - "os" - "reflect" - "runtime" - "strconv" - "strings" - "sync" - "sync/atomic" - "time" - "unicode/utf8" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - semconv "go.opentelemetry.io/otel/semconv/v1.37.0" - "go.opentelemetry.io/otel/trace/embedded" - "go.opentelemetry.io/otel/trace/internal/telemetry" -) - -// newAutoTracerProvider returns an auto-instrumentable [trace.TracerProvider]. -// If an [go.opentelemetry.io/auto.Instrumentation] is configured to instrument -// the process using the returned TracerProvider, all of the telemetry it -// produces will be processed and handled by that Instrumentation. By default, -// if no Instrumentation instruments the TracerProvider it will not generate -// any trace telemetry. -func newAutoTracerProvider() TracerProvider { return tracerProviderInstance } - -var tracerProviderInstance = new(autoTracerProvider) - -type autoTracerProvider struct{ embedded.TracerProvider } - -var _ TracerProvider = autoTracerProvider{} - -func (autoTracerProvider) Tracer(name string, opts ...TracerOption) Tracer { - cfg := NewTracerConfig(opts...) - return autoTracer{ - name: name, - version: cfg.InstrumentationVersion(), - schemaURL: cfg.SchemaURL(), - } -} - -type autoTracer struct { - embedded.Tracer - - name, schemaURL, version string -} - -var _ Tracer = autoTracer{} - -func (t autoTracer) Start(ctx context.Context, name string, opts ...SpanStartOption) (context.Context, Span) { - var psc, sc SpanContext - sampled := true - span := new(autoSpan) - - // Ask eBPF for sampling decision and span context info. - t.start(ctx, span, &psc, &sampled, &sc) - - span.sampled.Store(sampled) - span.spanContext = sc - - ctx = ContextWithSpan(ctx, span) - - if sampled { - // Only build traces if sampled. - cfg := NewSpanStartConfig(opts...) - span.traces, span.span = t.traces(name, cfg, span.spanContext, psc) - } - - return ctx, span -} - -// Expected to be implemented in eBPF. -// -//go:noinline -func (*autoTracer) start( - ctx context.Context, - spanPtr *autoSpan, - psc *SpanContext, - sampled *bool, - sc *SpanContext, -) { - start(ctx, spanPtr, psc, sampled, sc) -} - -// start is used for testing. -var start = func(context.Context, *autoSpan, *SpanContext, *bool, *SpanContext) {} - -func (t autoTracer) traces(name string, cfg SpanConfig, sc, psc SpanContext) (*telemetry.Traces, *telemetry.Span) { - span := &telemetry.Span{ - TraceID: telemetry.TraceID(sc.TraceID()), - SpanID: telemetry.SpanID(sc.SpanID()), - Flags: uint32(sc.TraceFlags()), - TraceState: sc.TraceState().String(), - ParentSpanID: telemetry.SpanID(psc.SpanID()), - Name: name, - Kind: spanKind(cfg.SpanKind()), - } - - span.Attrs, span.DroppedAttrs = convCappedAttrs(maxSpan.Attrs, cfg.Attributes()) - - links := cfg.Links() - if limit := maxSpan.Links; limit == 0 { - n := int64(len(links)) - if n > 0 { - span.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked. - } - } else { - if limit > 0 { - n := int64(max(len(links)-limit, 0)) - span.DroppedLinks = uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked. - links = links[n:] - } - span.Links = convLinks(links) - } - - if t := cfg.Timestamp(); !t.IsZero() { - span.StartTime = cfg.Timestamp() - } else { - span.StartTime = time.Now() - } - - return &telemetry.Traces{ - ResourceSpans: []*telemetry.ResourceSpans{ - { - ScopeSpans: []*telemetry.ScopeSpans{ - { - Scope: &telemetry.Scope{ - Name: t.name, - Version: t.version, - }, - Spans: []*telemetry.Span{span}, - SchemaURL: t.schemaURL, - }, - }, - }, - }, - }, span -} - -func spanKind(kind SpanKind) telemetry.SpanKind { - switch kind { - case SpanKindInternal: - return telemetry.SpanKindInternal - case SpanKindServer: - return telemetry.SpanKindServer - case SpanKindClient: - return telemetry.SpanKindClient - case SpanKindProducer: - return telemetry.SpanKindProducer - case SpanKindConsumer: - return telemetry.SpanKindConsumer - } - return telemetry.SpanKind(0) // undefined. -} - -type autoSpan struct { - embedded.Span - - spanContext SpanContext - sampled atomic.Bool - - mu sync.Mutex - traces *telemetry.Traces - span *telemetry.Span -} - -func (s *autoSpan) SpanContext() SpanContext { - if s == nil { - return SpanContext{} - } - // s.spanContext is immutable, do not acquire lock s.mu. - return s.spanContext -} - -func (s *autoSpan) IsRecording() bool { - if s == nil { - return false - } - - return s.sampled.Load() -} - -func (s *autoSpan) SetStatus(c codes.Code, msg string) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - if s.span.Status == nil { - s.span.Status = new(telemetry.Status) - } - - s.span.Status.Message = msg - - switch c { - case codes.Unset: - s.span.Status.Code = telemetry.StatusCodeUnset - case codes.Error: - s.span.Status.Code = telemetry.StatusCodeError - case codes.Ok: - s.span.Status.Code = telemetry.StatusCodeOK - } -} - -func (s *autoSpan) SetAttributes(attrs ...attribute.KeyValue) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - limit := maxSpan.Attrs - if limit == 0 { - // No attributes allowed. - n := int64(len(attrs)) - if n > 0 { - s.span.DroppedAttrs += uint32(min(n, math.MaxUint32)) // nolint: gosec // Bounds checked. - } - return - } - - m := make(map[string]int) - for i, a := range s.span.Attrs { - m[a.Key] = i - } - - for _, a := range attrs { - val := convAttrValue(a.Value) - if val.Empty() { - s.span.DroppedAttrs++ - continue - } - - if idx, ok := m[string(a.Key)]; ok { - s.span.Attrs[idx] = telemetry.Attr{ - Key: string(a.Key), - Value: val, - } - } else if limit < 0 || len(s.span.Attrs) < limit { - s.span.Attrs = append(s.span.Attrs, telemetry.Attr{ - Key: string(a.Key), - Value: val, - }) - m[string(a.Key)] = len(s.span.Attrs) - 1 - } else { - s.span.DroppedAttrs++ - } - } -} - -// convCappedAttrs converts up to limit attrs into a []telemetry.Attr. The -// number of dropped attributes is also returned. -func convCappedAttrs(limit int, attrs []attribute.KeyValue) ([]telemetry.Attr, uint32) { - n := len(attrs) - if limit == 0 { - var out uint32 - if n > 0 { - out = uint32(min(int64(n), math.MaxUint32)) // nolint: gosec // Bounds checked. - } - return nil, out - } - - if limit < 0 { - // Unlimited. - return convAttrs(attrs), 0 - } - - if n < 0 { - n = 0 - } - - limit = min(n, limit) - return convAttrs(attrs[:limit]), uint32(n - limit) // nolint: gosec // Bounds checked. -} - -func convAttrs(attrs []attribute.KeyValue) []telemetry.Attr { - if len(attrs) == 0 { - // Avoid allocations if not necessary. - return nil - } - - out := make([]telemetry.Attr, 0, len(attrs)) - for _, attr := range attrs { - key := string(attr.Key) - val := convAttrValue(attr.Value) - if val.Empty() { - continue - } - out = append(out, telemetry.Attr{Key: key, Value: val}) - } - return out -} - -func convAttrValue(value attribute.Value) telemetry.Value { - switch value.Type() { - case attribute.BOOL: - return telemetry.BoolValue(value.AsBool()) - case attribute.INT64: - return telemetry.Int64Value(value.AsInt64()) - case attribute.FLOAT64: - return telemetry.Float64Value(value.AsFloat64()) - case attribute.STRING: - v := truncate(maxSpan.AttrValueLen, value.AsString()) - return telemetry.StringValue(v) - case attribute.BOOLSLICE: - slice := value.AsBoolSlice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.BoolValue(v)) - } - return telemetry.SliceValue(out...) - case attribute.INT64SLICE: - slice := value.AsInt64Slice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.Int64Value(v)) - } - return telemetry.SliceValue(out...) - case attribute.FLOAT64SLICE: - slice := value.AsFloat64Slice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - out = append(out, telemetry.Float64Value(v)) - } - return telemetry.SliceValue(out...) - case attribute.STRINGSLICE: - slice := value.AsStringSlice() - out := make([]telemetry.Value, 0, len(slice)) - for _, v := range slice { - v = truncate(maxSpan.AttrValueLen, v) - out = append(out, telemetry.StringValue(v)) - } - return telemetry.SliceValue(out...) - } - return telemetry.Value{} -} - -// truncate returns a truncated version of s such that it contains less than -// the limit number of characters. Truncation is applied by returning the limit -// number of valid characters contained in s. -// -// If limit is negative, it returns the original string. -// -// UTF-8 is supported. When truncating, all invalid characters are dropped -// before applying truncation. -// -// If s already contains less than the limit number of bytes, it is returned -// unchanged. No invalid characters are removed. -func truncate(limit int, s string) string { - // This prioritize performance in the following order based on the most - // common expected use-cases. - // - // - Short values less than the default limit (128). - // - Strings with valid encodings that exceed the limit. - // - No limit. - // - Strings with invalid encodings that exceed the limit. - if limit < 0 || len(s) <= limit { - return s - } - - // Optimistically, assume all valid UTF-8. - var b strings.Builder - count := 0 - for i, c := range s { - if c != utf8.RuneError { - count++ - if count > limit { - return s[:i] - } - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // Invalid encoding. - b.Grow(len(s) - 1) - _, _ = b.WriteString(s[:i]) - s = s[i:] - break - } - } - - // Fast-path, no invalid input. - if b.Cap() == 0 { - return s - } - - // Truncate while validating UTF-8. - for i := 0; i < len(s) && count < limit; { - c := s[i] - if c < utf8.RuneSelf { - // Optimization for single byte runes (common case). - _ = b.WriteByte(c) - i++ - count++ - continue - } - - _, size := utf8.DecodeRuneInString(s[i:]) - if size == 1 { - // We checked for all 1-byte runes above, this is a RuneError. - i++ - continue - } - - _, _ = b.WriteString(s[i : i+size]) - i += size - count++ - } - - return b.String() -} - -func (s *autoSpan) End(opts ...SpanEndOption) { - if s == nil || !s.sampled.Swap(false) { - return - } - - // s.end exists so the lock (s.mu) is not held while s.ended is called. - s.ended(s.end(opts)) -} - -func (s *autoSpan) end(opts []SpanEndOption) []byte { - s.mu.Lock() - defer s.mu.Unlock() - - cfg := NewSpanEndConfig(opts...) - if t := cfg.Timestamp(); !t.IsZero() { - s.span.EndTime = cfg.Timestamp() - } else { - s.span.EndTime = time.Now() - } - - b, _ := json.Marshal(s.traces) // TODO: do not ignore this error. - return b -} - -// Expected to be implemented in eBPF. -// -//go:noinline -func (*autoSpan) ended(buf []byte) { ended(buf) } - -// ended is used for testing. -var ended = func([]byte) {} - -func (s *autoSpan) RecordError(err error, opts ...EventOption) { - if s == nil || err == nil || !s.sampled.Load() { - return - } - - cfg := NewEventConfig(opts...) - - attrs := cfg.Attributes() - attrs = append(attrs, - semconv.ExceptionType(typeStr(err)), - semconv.ExceptionMessage(err.Error()), - ) - if cfg.StackTrace() { - buf := make([]byte, 2048) - n := runtime.Stack(buf, false) - attrs = append(attrs, semconv.ExceptionStacktrace(string(buf[0:n]))) - } - - s.mu.Lock() - defer s.mu.Unlock() - - s.addEvent(semconv.ExceptionEventName, cfg.Timestamp(), attrs) -} - -func typeStr(i any) string { - t := reflect.TypeOf(i) - if t.PkgPath() == "" && t.Name() == "" { - // Likely a builtin type. - return t.String() - } - return fmt.Sprintf("%s.%s", t.PkgPath(), t.Name()) -} - -func (s *autoSpan) AddEvent(name string, opts ...EventOption) { - if s == nil || !s.sampled.Load() { - return - } - - cfg := NewEventConfig(opts...) - - s.mu.Lock() - defer s.mu.Unlock() - - s.addEvent(name, cfg.Timestamp(), cfg.Attributes()) -} - -// addEvent adds an event with name and attrs at tStamp to the span. The span -// lock (s.mu) needs to be held by the caller. -func (s *autoSpan) addEvent(name string, tStamp time.Time, attrs []attribute.KeyValue) { - limit := maxSpan.Events - - if limit == 0 { - s.span.DroppedEvents++ - return - } - - if limit > 0 && len(s.span.Events) == limit { - // Drop head while avoiding allocation of more capacity. - copy(s.span.Events[:limit-1], s.span.Events[1:]) - s.span.Events = s.span.Events[:limit-1] - s.span.DroppedEvents++ - } - - e := &telemetry.SpanEvent{Time: tStamp, Name: name} - e.Attrs, e.DroppedAttrs = convCappedAttrs(maxSpan.EventAttrs, attrs) - - s.span.Events = append(s.span.Events, e) -} - -func (s *autoSpan) AddLink(link Link) { - if s == nil || !s.sampled.Load() { - return - } - - l := maxSpan.Links - - s.mu.Lock() - defer s.mu.Unlock() - - if l == 0 { - s.span.DroppedLinks++ - return - } - - if l > 0 && len(s.span.Links) == l { - // Drop head while avoiding allocation of more capacity. - copy(s.span.Links[:l-1], s.span.Links[1:]) - s.span.Links = s.span.Links[:l-1] - s.span.DroppedLinks++ - } - - s.span.Links = append(s.span.Links, convLink(link)) -} - -func convLinks(links []Link) []*telemetry.SpanLink { - out := make([]*telemetry.SpanLink, 0, len(links)) - for _, link := range links { - out = append(out, convLink(link)) - } - return out -} - -func convLink(link Link) *telemetry.SpanLink { - l := &telemetry.SpanLink{ - TraceID: telemetry.TraceID(link.SpanContext.TraceID()), - SpanID: telemetry.SpanID(link.SpanContext.SpanID()), - TraceState: link.SpanContext.TraceState().String(), - Flags: uint32(link.SpanContext.TraceFlags()), - } - l.Attrs, l.DroppedAttrs = convCappedAttrs(maxSpan.LinkAttrs, link.Attributes) - - return l -} - -func (s *autoSpan) SetName(name string) { - if s == nil || !s.sampled.Load() { - return - } - - s.mu.Lock() - defer s.mu.Unlock() - - s.span.Name = name -} - -func (*autoSpan) TracerProvider() TracerProvider { return newAutoTracerProvider() } - -// maxSpan are the span limits resolved during startup. -var maxSpan = newSpanLimits() - -type spanLimits struct { - // Attrs is the number of allowed attributes for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT key if it exists. Otherwise, the - // environment variable value for OTEL_ATTRIBUTE_COUNT_LIMIT, or 128 if - // that is not set, is used. - Attrs int - // AttrValueLen is the maximum attribute value length allowed for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT key if it exists. Otherwise, the - // environment variable value for OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT, or -1 - // if that is not set, is used. - AttrValueLen int - // Events is the number of allowed events for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_EVENT_COUNT_LIMIT key, or 128 is used if that is not set. - Events int - // EventAttrs is the number of allowed attributes for a span event. - // - // The is resolved from the environment variable value for the - // OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT key, or 128 is used if that is not set. - EventAttrs int - // Links is the number of allowed Links for a span. - // - // This is resolved from the environment variable value for the - // OTEL_SPAN_LINK_COUNT_LIMIT, or 128 is used if that is not set. - Links int - // LinkAttrs is the number of allowed attributes for a span link. - // - // This is resolved from the environment variable value for the - // OTEL_LINK_ATTRIBUTE_COUNT_LIMIT, or 128 is used if that is not set. - LinkAttrs int -} - -func newSpanLimits() spanLimits { - return spanLimits{ - Attrs: firstEnv( - 128, - "OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT", - "OTEL_ATTRIBUTE_COUNT_LIMIT", - ), - AttrValueLen: firstEnv( - -1, // Unlimited. - "OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT", - "OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT", - ), - Events: firstEnv(128, "OTEL_SPAN_EVENT_COUNT_LIMIT"), - EventAttrs: firstEnv(128, "OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT"), - Links: firstEnv(128, "OTEL_SPAN_LINK_COUNT_LIMIT"), - LinkAttrs: firstEnv(128, "OTEL_LINK_ATTRIBUTE_COUNT_LIMIT"), - } -} - -// firstEnv returns the parsed integer value of the first matching environment -// variable from keys. The defaultVal is returned if the value is not an -// integer or no match is found. -func firstEnv(defaultVal int, keys ...string) int { - for _, key := range keys { - strV := os.Getenv(key) - if strV == "" { - continue - } - - v, err := strconv.Atoi(strV) - if err == nil { - return v - } - // Ignore invalid environment variable. - } - - return defaultVal -} diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go deleted file mode 100644 index d9ecef1cad..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/config.go +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "slices" - "time" - - "go.opentelemetry.io/otel/attribute" -) - -// TracerConfig is a group of options for a Tracer. -type TracerConfig struct { - instrumentationVersion string - // Schema URL of the telemetry emitted by the Tracer. - schemaURL string - attrs attribute.Set -} - -// InstrumentationVersion returns the version of the library providing instrumentation. -func (t *TracerConfig) InstrumentationVersion() string { - return t.instrumentationVersion -} - -// InstrumentationAttributes returns the attributes associated with the library -// providing instrumentation. -func (t *TracerConfig) InstrumentationAttributes() attribute.Set { - return t.attrs -} - -// SchemaURL returns the Schema URL of the telemetry emitted by the Tracer. -func (t *TracerConfig) SchemaURL() string { - return t.schemaURL -} - -// NewTracerConfig applies all the options to a returned TracerConfig. -func NewTracerConfig(options ...TracerOption) TracerConfig { - var config TracerConfig - for _, option := range options { - config = option.apply(config) - } - return config -} - -// TracerOption applies an option to a TracerConfig. -type TracerOption interface { - apply(TracerConfig) TracerConfig -} - -type tracerOptionFunc func(TracerConfig) TracerConfig - -func (fn tracerOptionFunc) apply(cfg TracerConfig) TracerConfig { - return fn(cfg) -} - -// SpanConfig is a group of options for a Span. -type SpanConfig struct { - attributes []attribute.KeyValue - timestamp time.Time - links []Link - newRoot bool - spanKind SpanKind - stackTrace bool -} - -// Attributes describe the associated qualities of a Span. -func (cfg *SpanConfig) Attributes() []attribute.KeyValue { - return cfg.attributes -} - -// Timestamp is a time in a Span life-cycle. -func (cfg *SpanConfig) Timestamp() time.Time { - return cfg.timestamp -} - -// StackTrace reports whether stack trace capturing is enabled. -func (cfg *SpanConfig) StackTrace() bool { - return cfg.stackTrace -} - -// Links are the associations a Span has with other Spans. -func (cfg *SpanConfig) Links() []Link { - return cfg.links -} - -// NewRoot identifies a Span as the root Span for a new trace. This is -// commonly used when an existing trace crosses trust boundaries and the -// remote parent span context should be ignored for security. -func (cfg *SpanConfig) NewRoot() bool { - return cfg.newRoot -} - -// SpanKind is the role a Span has in a trace. -func (cfg *SpanConfig) SpanKind() SpanKind { - return cfg.spanKind -} - -// NewSpanStartConfig applies all the options to a returned SpanConfig. -// No validation is performed on the returned SpanConfig (e.g. no uniqueness -// checking or bounding of data), it is left to the SDK to perform this -// action. -func NewSpanStartConfig(options ...SpanStartOption) SpanConfig { - var c SpanConfig - for _, option := range options { - c = option.applySpanStart(c) - } - return c -} - -// NewSpanEndConfig applies all the options to a returned SpanConfig. -// No validation is performed on the returned SpanConfig (e.g. no uniqueness -// checking or bounding of data), it is left to the SDK to perform this -// action. -func NewSpanEndConfig(options ...SpanEndOption) SpanConfig { - var c SpanConfig - for _, option := range options { - c = option.applySpanEnd(c) - } - return c -} - -// SpanStartOption applies an option to a SpanConfig. These options are applicable -// only when the span is created. -type SpanStartOption interface { - applySpanStart(SpanConfig) SpanConfig -} - -type spanOptionFunc func(SpanConfig) SpanConfig - -func (fn spanOptionFunc) applySpanStart(cfg SpanConfig) SpanConfig { - return fn(cfg) -} - -// SpanEndOption applies an option to a SpanConfig. These options are -// applicable only when the span is ended. -type SpanEndOption interface { - applySpanEnd(SpanConfig) SpanConfig -} - -// EventConfig is a group of options for an Event. -type EventConfig struct { - attributes []attribute.KeyValue - timestamp time.Time - stackTrace bool -} - -// Attributes describe the associated qualities of an Event. -func (cfg *EventConfig) Attributes() []attribute.KeyValue { - return cfg.attributes -} - -// Timestamp is a time in an Event life-cycle. -func (cfg *EventConfig) Timestamp() time.Time { - return cfg.timestamp -} - -// StackTrace reports whether stack trace capturing is enabled. -func (cfg *EventConfig) StackTrace() bool { - return cfg.stackTrace -} - -// NewEventConfig applies all the EventOptions to a returned EventConfig. If no -// timestamp option is passed, the returned EventConfig will have a Timestamp -// set to the call time, otherwise no validation is performed on the returned -// EventConfig. -func NewEventConfig(options ...EventOption) EventConfig { - var c EventConfig - for _, option := range options { - c = option.applyEvent(c) - } - if c.timestamp.IsZero() { - c.timestamp = time.Now() - } - return c -} - -// EventOption applies span event options to an EventConfig. -type EventOption interface { - applyEvent(EventConfig) EventConfig -} - -// SpanOption are options that can be used at both the beginning and end of a span. -type SpanOption interface { - SpanStartOption - SpanEndOption -} - -// SpanStartEventOption are options that can be used at the start of a span, or with an event. -type SpanStartEventOption interface { - SpanStartOption - EventOption -} - -// SpanEndEventOption are options that can be used at the end of a span, or with an event. -type SpanEndEventOption interface { - SpanEndOption - EventOption -} - -type attributeOption []attribute.KeyValue - -func (o attributeOption) applySpan(c SpanConfig) SpanConfig { - c.attributes = append(c.attributes, []attribute.KeyValue(o)...) - return c -} -func (o attributeOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o attributeOption) applyEvent(c EventConfig) EventConfig { - c.attributes = append(c.attributes, []attribute.KeyValue(o)...) - return c -} - -var _ SpanStartEventOption = attributeOption{} - -// WithAttributes adds the attributes related to a span life-cycle event. -// These attributes are used to describe the work a Span represents when this -// option is provided to a Span's start event. Otherwise, these -// attributes provide additional information about the event being recorded -// (e.g. error, state change, processing progress, system event). -// -// If multiple of these options are passed the attributes of each successive -// option will extend the attributes instead of overwriting. There is no -// guarantee of uniqueness in the resulting attributes. -func WithAttributes(attributes ...attribute.KeyValue) SpanStartEventOption { - return attributeOption(attributes) -} - -// SpanEventOption are options that can be used with an event or a span. -type SpanEventOption interface { - SpanOption - EventOption -} - -type timestampOption time.Time - -func (o timestampOption) applySpan(c SpanConfig) SpanConfig { - c.timestamp = time.Time(o) - return c -} -func (o timestampOption) applySpanStart(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o timestampOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } -func (o timestampOption) applyEvent(c EventConfig) EventConfig { - c.timestamp = time.Time(o) - return c -} - -var _ SpanEventOption = timestampOption{} - -// WithTimestamp sets the time of a Span or Event life-cycle moment (e.g. -// started, stopped, errored). -func WithTimestamp(t time.Time) SpanEventOption { - return timestampOption(t) -} - -type stackTraceOption bool - -func (o stackTraceOption) applyEvent(c EventConfig) EventConfig { - c.stackTrace = bool(o) - return c -} - -func (o stackTraceOption) applySpan(c SpanConfig) SpanConfig { - c.stackTrace = bool(o) - return c -} -func (o stackTraceOption) applySpanEnd(c SpanConfig) SpanConfig { return o.applySpan(c) } - -// WithStackTrace sets the flag to capture the error with stack trace (e.g. true, false). -func WithStackTrace(b bool) SpanEndEventOption { - return stackTraceOption(b) -} - -// WithLinks adds links to a Span. The links are added to the existing Span -// links, i.e. this does not overwrite. Links with invalid span context are ignored. -func WithLinks(links ...Link) SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.links = append(cfg.links, links...) - return cfg - }) -} - -// WithNewRoot specifies that the Span should be treated as a root Span. Any -// existing parent span context will be ignored when defining the Span's trace -// identifiers. -func WithNewRoot() SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.newRoot = true - return cfg - }) -} - -// WithSpanKind sets the SpanKind of a Span. -func WithSpanKind(kind SpanKind) SpanStartOption { - return spanOptionFunc(func(cfg SpanConfig) SpanConfig { - cfg.spanKind = kind - return cfg - }) -} - -// WithInstrumentationVersion sets the instrumentation version. -func WithInstrumentationVersion(version string) TracerOption { - return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { - cfg.instrumentationVersion = version - return cfg - }) -} - -// mergeSets returns the union of keys between a and b. Any duplicate keys will -// use the value associated with b. -func mergeSets(a, b attribute.Set) attribute.Set { - // NewMergeIterator uses the first value for any duplicates. - iter := attribute.NewMergeIterator(&b, &a) - merged := make([]attribute.KeyValue, 0, a.Len()+b.Len()) - for iter.Next() { - merged = append(merged, iter.Attribute()) - } - return attribute.NewSet(merged...) -} - -// WithInstrumentationAttributes adds the instrumentation attributes. -// -// This is equivalent to calling [WithInstrumentationAttributeSet] with an -// [attribute.Set] created from a clone of the passed attributes. -// [WithInstrumentationAttributeSet] is recommended for more control. -// -// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] -// options are passed, the attributes will be merged together in the order -// they are passed. Attributes with duplicate keys will use the last value passed. -func WithInstrumentationAttributes(attr ...attribute.KeyValue) TracerOption { - set := attribute.NewSet(slices.Clone(attr)...) - return WithInstrumentationAttributeSet(set) -} - -// WithInstrumentationAttributeSet adds the instrumentation attributes. -// -// If multiple [WithInstrumentationAttributes] or [WithInstrumentationAttributeSet] -// options are passed, the attributes will be merged together in the order -// they are passed. Attributes with duplicate keys will use the last value passed. -func WithInstrumentationAttributeSet(set attribute.Set) TracerOption { - if set.Len() == 0 { - return tracerOptionFunc(func(config TracerConfig) TracerConfig { - return config - }) - } - - return tracerOptionFunc(func(config TracerConfig) TracerConfig { - if config.attrs.Len() == 0 { - config.attrs = set - } else { - config.attrs = mergeSets(config.attrs, set) - } - return config - }) -} - -// WithSchemaURL sets the schema URL for the Tracer. -func WithSchemaURL(schemaURL string) TracerOption { - return tracerOptionFunc(func(cfg TracerConfig) TracerConfig { - cfg.schemaURL = schemaURL - return cfg - }) -} diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go deleted file mode 100644 index 8c45a7107f..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/context.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import "context" - -type traceContextKeyType int - -const currentSpanKey traceContextKeyType = iota - -// ContextWithSpan returns a copy of parent with span set as the current Span. -func ContextWithSpan(parent context.Context, span Span) context.Context { - return context.WithValue(parent, currentSpanKey, span) -} - -// ContextWithSpanContext returns a copy of parent with sc as the current -// Span. The Span implementation that wraps sc is non-recording and performs -// no operations other than to return sc as the SpanContext from the -// SpanContext method. -func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { - return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) -} - -// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicitly -// as a remote SpanContext and as the current Span. The Span implementation -// that wraps rsc is non-recording and performs no operations other than to -// return rsc as the SpanContext from the SpanContext method. -func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { - return ContextWithSpanContext(parent, rsc.WithRemote(true)) -} - -// SpanFromContext returns the current Span from ctx. -// -// If no Span is currently set in ctx an implementation of a Span that -// performs no operations is returned. -func SpanFromContext(ctx context.Context) Span { - if ctx == nil { - return noopSpanInstance - } - if span, ok := ctx.Value(currentSpanKey).(Span); ok { - return span - } - return noopSpanInstance -} - -// SpanContextFromContext returns the current Span's SpanContext. -func SpanContextFromContext(ctx context.Context) SpanContext { - return SpanFromContext(ctx).SpanContext() -} diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go deleted file mode 100644 index cdbf41d6d7..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/doc.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package trace provides an implementation of the tracing part of the -OpenTelemetry API. - -To participate in distributed traces a Span needs to be created for the -operation being performed as part of a traced workflow. In its simplest form: - - var tracer trace.Tracer - - func init() { - tracer = otel.Tracer("instrumentation/package/name") - } - - func operation(ctx context.Context) { - var span trace.Span - ctx, span = tracer.Start(ctx, "operation") - defer span.End() - // ... - } - -A Tracer is unique to the instrumentation and is used to create Spans. -Instrumentation should be designed to accept a TracerProvider from which it -can create its own unique Tracer. Alternatively, the registered global -TracerProvider from the go.opentelemetry.io/otel package can be used as -a default. - - const ( - name = "instrumentation/package/name" - version = "0.1.0" - ) - - type Instrumentation struct { - tracer trace.Tracer - } - - func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { - if tp == nil { - tp = otel.TracerProvider() - } - return &Instrumentation{ - tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), - } - } - - func operation(ctx context.Context, inst *Instrumentation) { - var span trace.Span - ctx, span = inst.tracer.Start(ctx, "operation") - defer span.End() - // ... - } - -# API Implementations - -This package does not conform to the standard Go versioning policy; all of its -interfaces may have methods added to them without a package major version bump. -This non-standard API evolution could surprise an uninformed implementation -author. They could unknowingly build their implementation in a way that would -result in a runtime panic for their users that update to the new API. - -The API is designed to help inform an instrumentation author about this -non-standard API evolution. It requires them to choose a default behavior for -unimplemented interface methods. There are three behavior choices they can -make: - - - Compilation failure - - Panic - - Default to another implementation - -All interfaces in this API embed a corresponding interface from -[go.opentelemetry.io/otel/trace/embedded]. If an author wants the default -behavior of their implementations to be a compilation failure, signaling to -their users they need to update to the latest version of that implementation, -they need to embed the corresponding interface from -[go.opentelemetry.io/otel/trace/embedded] in their implementation. For -example, - - import "go.opentelemetry.io/otel/trace/embedded" - - type TracerProvider struct { - embedded.TracerProvider - // ... - } - -If an author wants the default behavior of their implementations to panic, they -can embed the API interface directly. - - import "go.opentelemetry.io/otel/trace" - - type TracerProvider struct { - trace.TracerProvider - // ... - } - -This option is not recommended. It will lead to publishing packages that -contain runtime panics when users update to newer versions of -[go.opentelemetry.io/otel/trace], which may be done with a transitive -dependency. - -Finally, an author can embed another implementation in theirs. The embedded -implementation will be used for methods not defined by the author. For example, -an author who wants to default to silently dropping the call can use -[go.opentelemetry.io/otel/trace/noop]: - - import "go.opentelemetry.io/otel/trace/noop" - - type TracerProvider struct { - noop.TracerProvider - // ... - } - -It is strongly recommended that authors only embed -[go.opentelemetry.io/otel/trace/noop] if they choose this default behavior. -That implementation is the only one OpenTelemetry authors can guarantee will -fully implement all the API interfaces when a user updates their API. -*/ -package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/README.md b/vendor/go.opentelemetry.io/otel/trace/embedded/README.md deleted file mode 100644 index 7754a239ee..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/embedded/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trace Embedded - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/embedded)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/embedded) diff --git a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go b/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go deleted file mode 100644 index 3e359a00bf..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/embedded/embedded.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package embedded provides interfaces embedded within the [OpenTelemetry -// trace API]. -// -// Implementers of the [OpenTelemetry trace API] can embed the relevant type -// from this package into their implementation directly. Doing so will result -// in a compilation error for users when the [OpenTelemetry trace API] is -// extended (which is something that can happen without a major version bump of -// the API package). -// -// [OpenTelemetry trace API]: https://pkg.go.dev/go.opentelemetry.io/otel/trace -package embedded // import "go.opentelemetry.io/otel/trace/embedded" - -// TracerProvider is embedded in -// [go.opentelemetry.io/otel/trace.TracerProvider]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.TracerProvider] if you want users to -// experience a compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.TracerProvider] -// interface is extended (which is something that can happen without a major -// version bump of the API package). -type TracerProvider interface{ tracerProvider() } - -// Tracer is embedded in [go.opentelemetry.io/otel/trace.Tracer]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.Tracer] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.Tracer] interface -// is extended (which is something that can happen without a major version bump -// of the API package). -type Tracer interface{ tracer() } - -// Span is embedded in [go.opentelemetry.io/otel/trace.Span]. -// -// Embed this interface in your implementation of the -// [go.opentelemetry.io/otel/trace.Span] if you want users to experience a -// compilation error, signaling they need to update to your latest -// implementation, when the [go.opentelemetry.io/otel/trace.Span] interface is -// extended (which is something that can happen without a major version bump of -// the API package). -type Span interface{ span() } diff --git a/vendor/go.opentelemetry.io/otel/trace/hex.go b/vendor/go.opentelemetry.io/otel/trace/hex.go deleted file mode 100644 index 1cbef1d4b9..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/hex.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -const ( - // hexLU is a hex lookup table of the 16 lowercase hex digits. - // The character values of the string are indexed at the equivalent - // hexadecimal value they represent. This table efficiently encodes byte data - // into a string representation of hexadecimal. - hexLU = "0123456789abcdef" - - // hexRev is a reverse hex lookup table for lowercase hex digits. - // The table is efficiently decodes a hexadecimal string into bytes. - // Valid hexadecimal characters are indexed at their respective values. All - // other invalid ASCII characters are represented with '\xff'. - // - // The '\xff' character is used as invalid because no valid character has - // the upper 4 bits set. Meaning, an efficient validation can be performed - // over multiple character parsing by checking these bits remain zero. - hexRev = "" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\x0a\x0b\x0c\x0d\x0e\x0f\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" + - "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff" -) diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go deleted file mode 100644 index ff0f6eac62..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/attr.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -// Attr is a key-value pair. -type Attr struct { - Key string `json:"key,omitempty"` - Value Value `json:"value,omitempty"` -} - -// String returns an Attr for a string value. -func String(key, value string) Attr { - return Attr{key, StringValue(value)} -} - -// Int64 returns an Attr for an int64 value. -func Int64(key string, value int64) Attr { - return Attr{key, Int64Value(value)} -} - -// Int returns an Attr for an int value. -func Int(key string, value int) Attr { - return Int64(key, int64(value)) -} - -// Float64 returns an Attr for a float64 value. -func Float64(key string, value float64) Attr { - return Attr{key, Float64Value(value)} -} - -// Bool returns an Attr for a bool value. -func Bool(key string, value bool) Attr { - return Attr{key, BoolValue(value)} -} - -// Bytes returns an Attr for a []byte value. -// The passed slice must not be changed after it is passed. -func Bytes(key string, value []byte) Attr { - return Attr{key, BytesValue(value)} -} - -// Slice returns an Attr for a []Value value. -// The passed slice must not be changed after it is passed. -func Slice(key string, value ...Value) Attr { - return Attr{key, SliceValue(value...)} -} - -// Map returns an Attr for a map value. -// The passed slice must not be changed after it is passed. -func Map(key string, value ...Attr) Attr { - return Attr{key, MapValue(value...)} -} - -// Equal reports whether a is equal to b. -func (a Attr) Equal(b Attr) bool { - return a.Key == b.Key && a.Value.Equal(b.Value) -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go deleted file mode 100644 index 5debe90bbb..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -/* -Package telemetry provides a lightweight representations of OpenTelemetry -telemetry that is compatible with the OTLP JSON protobuf encoding. -*/ -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go deleted file mode 100644 index bea56f2e7d..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/id.go +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "encoding/hex" - "errors" - "fmt" -) - -const ( - traceIDSize = 16 - spanIDSize = 8 -) - -// TraceID is a custom data type that is used for all trace IDs. -type TraceID [traceIDSize]byte - -// String returns the hex string representation form of a TraceID. -func (tid TraceID) String() string { - return hex.EncodeToString(tid[:]) -} - -// IsEmpty reports whether the TraceID contains only zero bytes. -func (tid TraceID) IsEmpty() bool { - return tid == [traceIDSize]byte{} -} - -// MarshalJSON converts the trace ID into a hex string enclosed in quotes. -func (tid TraceID) MarshalJSON() ([]byte, error) { - if tid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(tid[:]) -} - -// UnmarshalJSON inflates the trace ID from hex string, possibly enclosed in -// quotes. -func (tid *TraceID) UnmarshalJSON(data []byte) error { - *tid = [traceIDSize]byte{} - return unmarshalJSON(tid[:], data) -} - -// SpanID is a custom data type that is used for all span IDs. -type SpanID [spanIDSize]byte - -// String returns the hex string representation form of a SpanID. -func (sid SpanID) String() string { - return hex.EncodeToString(sid[:]) -} - -// IsEmpty reports whether the SpanID contains only zero bytes. -func (sid SpanID) IsEmpty() bool { - return sid == [spanIDSize]byte{} -} - -// MarshalJSON converts span ID into a hex string enclosed in quotes. -func (sid SpanID) MarshalJSON() ([]byte, error) { - if sid.IsEmpty() { - return []byte(`""`), nil - } - return marshalJSON(sid[:]) -} - -// UnmarshalJSON decodes span ID from hex string, possibly enclosed in quotes. -func (sid *SpanID) UnmarshalJSON(data []byte) error { - *sid = [spanIDSize]byte{} - return unmarshalJSON(sid[:], data) -} - -// marshalJSON converts id into a hex string enclosed in quotes. -func marshalJSON(id []byte) ([]byte, error) { - // Plus 2 quote chars at the start and end. - hexLen := hex.EncodedLen(len(id)) + 2 - - b := make([]byte, hexLen) - hex.Encode(b[1:hexLen-1], id) - b[0], b[hexLen-1] = '"', '"' - - return b, nil -} - -// unmarshalJSON inflates trace id from hex string, possibly enclosed in quotes. -func unmarshalJSON(dst, src []byte) error { - if l := len(src); l >= 2 && src[0] == '"' && src[l-1] == '"' { - src = src[1 : l-1] - } - nLen := len(src) - if nLen == 0 { - return nil - } - - if len(dst) != hex.DecodedLen(nLen) { - return errors.New("invalid length for ID") - } - - _, err := hex.Decode(dst, src) - if err != nil { - return fmt.Errorf("cannot unmarshal ID from string '%s': %w", string(src), err) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go deleted file mode 100644 index f5e3a8cec9..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/number.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "encoding/json" - "strconv" -) - -// protoInt64 represents the protobuf encoding of integers which can be either -// strings or integers. -type protoInt64 int64 - -// Int64 returns the protoInt64 as an int64. -func (i *protoInt64) Int64() int64 { return int64(*i) } - -// UnmarshalJSON decodes both strings and integers. -func (i *protoInt64) UnmarshalJSON(data []byte) error { - if data[0] == '"' { - var str string - if err := json.Unmarshal(data, &str); err != nil { - return err - } - parsedInt, err := strconv.ParseInt(str, 10, 64) - if err != nil { - return err - } - *i = protoInt64(parsedInt) - } else { - var parsedInt int64 - if err := json.Unmarshal(data, &parsedInt); err != nil { - return err - } - *i = protoInt64(parsedInt) - } - return nil -} - -// protoUint64 represents the protobuf encoding of integers which can be either -// strings or integers. -type protoUint64 uint64 - -// Int64 returns the protoUint64 as a uint64. -func (i *protoUint64) Uint64() uint64 { return uint64(*i) } - -// UnmarshalJSON decodes both strings and integers. -func (i *protoUint64) UnmarshalJSON(data []byte) error { - if data[0] == '"' { - var str string - if err := json.Unmarshal(data, &str); err != nil { - return err - } - parsedUint, err := strconv.ParseUint(str, 10, 64) - if err != nil { - return err - } - *i = protoUint64(parsedUint) - } else { - var parsedUint uint64 - if err := json.Unmarshal(data, &parsedUint); err != nil { - return err - } - *i = protoUint64(parsedUint) - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go deleted file mode 100644 index 1798a702d4..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/resource.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Resource information. -type Resource struct { - // Attrs are the set of attributes that describe the resource. Attribute - // keys MUST be unique (it is not allowed to have more than one attribute - // with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // DroppedAttrs is the number of dropped attributes. If the value - // is 0, then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r. -func (r *Resource) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Resource type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Resource field: %#v", keyIface) - } - - switch key { - case "attributes": - err = decoder.Decode(&r.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&r.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go deleted file mode 100644 index c2b4c635b7..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/scope.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Scope is the identifying values of the instrumentation scope. -type Scope struct { - Name string `json:"name,omitempty"` - Version string `json:"version,omitempty"` - Attrs []Attr `json:"attributes,omitempty"` - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into r. -func (s *Scope) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Scope type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Scope field: %#v", keyIface) - } - - switch key { - case "name": - err = decoder.Decode(&s.Name) - case "version": - err = decoder.Decode(&s.Version) - case "attributes": - err = decoder.Decode(&s.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&s.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go deleted file mode 100644 index e7ca62c660..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go +++ /dev/null @@ -1,472 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "bytes" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "time" -) - -// A Span represents a single operation performed by a single component of the -// system. -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. An ID with all zeroes OR - // of length other than 16 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - TraceID TraceID `json:"traceId,omitempty"` - // A unique identifier for a span within a trace, assigned when the span - // is created. The ID is an 8-byte array. An ID with all zeroes OR of length - // other than 8 bytes is considered invalid (empty string in OTLP/JSON - // is zero-length and thus is also invalid). - // - // This field is required. - SpanID SpanID `json:"spanId,omitempty"` - // trace_state conveys information about request position in multiple distributed tracing graphs. - // It is a trace_state in w3c-trace-context format: https://www.w3.org/TR/trace-context/#tracestate-header - // See also https://github.com/w3c/distributed-tracing for more details about this field. - TraceState string `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 SpanID `json:"parentSpanId,omitempty"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether a span's parent - // is remote. The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the span is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // When creating span messages, if the message is logically forwarded from another source - // with an equivalent flags fields (i.e., usually another OTLP span message), the field SHOULD - // be copied as-is. If creating from a source that does not have an equivalent flags field - // (such as a runtime representation of an OpenTelemetry span), the high 22 bits MUST - // be set to zero. - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // - // [Optional]. - Flags uint32 `json:"flags,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 semantically required to be set to non-empty string. - // Empty value is equivalent to an unknown span name. - // - // This field is required. - Name string `json:"name"` - // Distinguishes between spans generated in a particular context. For example, - // two spans with the same name may be distinguished using `CLIENT` (caller) - // and `SERVER` (callee) to identify queueing latency associated with the span. - Kind SpanKind `json:"kind,omitempty"` - // start_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - StartTime time.Time `json:"startTimeUnixNano,omitempty"` - // end_time_unix_nano is 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. - // Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970. - // - // This field is semantically required and it is expected that end_time >= start_time. - EndTime time.Time `json:"endTimeUnixNano,omitempty"` - // attributes is a collection of key/value pairs. Note, global attributes - // like server name can be set using the resource API. Examples of attributes: - // - // "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36" - // "/http/server_latency": 300 - // "example.com/myattribute": true - // "example.com/score": 10.239 - // - // The OpenTelemetry API specification further restricts the allowed value types: - // https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md#attribute - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is 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. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` - // events is a collection of Event items. - Events []*SpanEvent `json:"events,omitempty"` - // dropped_events_count is the number of dropped events. If the value is 0, then no - // events were dropped. - DroppedEvents uint32 `json:"droppedEventsCount,omitempty"` - // links is a collection of Links, which are references from this span to a span - // in the same or different trace. - Links []*SpanLink `json:"links,omitempty"` - // dropped_links_count is the number of dropped links after the maximum size was - // enforced. If this value is 0, then no links were dropped. - DroppedLinks uint32 `json:"droppedLinksCount,omitempty"` - // An optional final status for this span. Semantically when Status isn't set, it means - // span's status code is unset, i.e. assume STATUS_CODE_UNSET (code = 0). - Status *Status `json:"status,omitempty"` -} - -// MarshalJSON encodes s into OTLP formatted JSON. -func (s Span) MarshalJSON() ([]byte, error) { - startT := s.StartTime.UnixNano() - if s.StartTime.IsZero() || startT < 0 { - startT = 0 - } - - endT := s.EndTime.UnixNano() - if s.EndTime.IsZero() || endT < 0 { - endT = 0 - } - - // Override non-empty default SpanID marshal and omitempty. - var parentSpanId string - if !s.ParentSpanID.IsEmpty() { - b := make([]byte, hex.EncodedLen(spanIDSize)) - hex.Encode(b, s.ParentSpanID[:]) - parentSpanId = string(b) - } - - type Alias Span - return json.Marshal(struct { - Alias - ParentSpanID string `json:"parentSpanId,omitempty"` - StartTime uint64 `json:"startTimeUnixNano,omitempty"` - EndTime uint64 `json:"endTimeUnixNano,omitempty"` - }{ - Alias: Alias(s), - ParentSpanID: parentSpanId, - StartTime: uint64(startT), // nolint:gosec // >0 checked above. - EndTime: uint64(endT), // nolint:gosec // >0 checked above. - }) -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into s. -func (s *Span) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Span type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Span field: %#v", keyIface) - } - - switch key { - case "traceId", "trace_id": - err = decoder.Decode(&s.TraceID) - case "spanId", "span_id": - err = decoder.Decode(&s.SpanID) - case "traceState", "trace_state": - err = decoder.Decode(&s.TraceState) - case "parentSpanId", "parent_span_id": - err = decoder.Decode(&s.ParentSpanID) - case "flags": - err = decoder.Decode(&s.Flags) - case "name": - err = decoder.Decode(&s.Name) - case "kind": - err = decoder.Decode(&s.Kind) - case "startTimeUnixNano", "start_time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec // Overflow checked. - s.StartTime = time.Unix(0, v) - case "endTimeUnixNano", "end_time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec // Overflow checked. - s.EndTime = time.Unix(0, v) - case "attributes": - err = decoder.Decode(&s.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&s.DroppedAttrs) - case "events": - err = decoder.Decode(&s.Events) - case "droppedEventsCount", "dropped_events_count": - err = decoder.Decode(&s.DroppedEvents) - case "links": - err = decoder.Decode(&s.Links) - case "droppedLinksCount", "dropped_links_count": - err = decoder.Decode(&s.DroppedLinks) - case "status": - err = decoder.Decode(&s.Status) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// SpanFlags represents constants used to interpret the -// Span.flags field, which is protobuf 'fixed32' type and is to -// be used as bit-fields. Each non-zero value defined in this enum is -// a bit-mask. To extract the bit-field, for example, use an -// expression like: -// -// (span.flags & SPAN_FLAGS_TRACE_FLAGS_MASK) -// -// See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. -// -// Note that Span flags were introduced in version 1.1 of the -// OpenTelemetry protocol. Older Span producers do not set this -// field, consequently consumers should not rely on the absence of a -// particular flag bit to indicate the presence of a particular feature. -type SpanFlags int32 - -const ( - // SpanFlagsTraceFlagsMask is a mask for trace-flags. - // - // Bits 0-7 are used for trace flags. - SpanFlagsTraceFlagsMask SpanFlags = 255 - // SpanFlagsContextHasIsRemoteMask is a mask for HAS_IS_REMOTE status. - // - // Bits 8 and 9 are used to indicate that the parent span or link span is - // remote. Bit 8 (`HAS_IS_REMOTE`) indicates whether the value is known. - SpanFlagsContextHasIsRemoteMask SpanFlags = 256 - // SpanFlagsContextIsRemoteMask is a mask for IS_REMOTE status. - // - // Bits 8 and 9 are used to indicate that the parent span or link span is - // remote. Bit 9 (`IS_REMOTE`) indicates whether the span or link is - // remote. - SpanFlagsContextIsRemoteMask SpanFlags = 512 -) - -// SpanKind is the type of span. Can be used to specify additional relationships between spans -// in addition to a parent/child relationship. -type SpanKind int32 - -const ( - // SpanKindInternal indicates that the span represents an internal - // operation within an application, as opposed to an operation happening at - // the boundaries. - SpanKindInternal SpanKind = 1 - // SpanKindServer indicates that the span covers server-side handling of an - // RPC or other remote network request. - SpanKindServer SpanKind = 2 - // SpanKindClient indicates that the span describes a request to some - // remote service. - SpanKindClient SpanKind = 3 - // SpanKindProducer indicates that the span describes a producer sending a - // message to a broker. Unlike SpanKindClient and SpanKindServer, there is - // often no direct critical path latency relationship between producer and - // consumer spans. A SpanKindProducer span ends when the message was - // accepted by the broker while the logical processing of the message might - // span a much longer time. - SpanKindProducer SpanKind = 4 - // SpanKindConsumer indicates that the span describes a consumer receiving - // a message from a broker. Like SpanKindProducer, there is often no direct - // critical path latency relationship between producer and consumer spans. - SpanKindConsumer SpanKind = 5 -) - -// SpanEvent is a time-stamped annotation of the span, consisting of -// user-supplied text description and key-value pairs. -type SpanEvent struct { - // time_unix_nano is the time the event occurred. - Time time.Time `json:"timeUnixNano,omitempty"` - // name of the event. - // This field is semantically required to be set to non-empty string. - Name string `json:"name,omitempty"` - // attributes is a collection of attribute key/value pairs on the event. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` -} - -// MarshalJSON encodes e into OTLP formatted JSON. -func (e SpanEvent) MarshalJSON() ([]byte, error) { - t := e.Time.UnixNano() - if e.Time.IsZero() || t < 0 { - t = 0 - } - - type Alias SpanEvent - return json.Marshal(struct { - Alias - Time uint64 `json:"timeUnixNano,omitempty"` - }{ - Alias: Alias(e), - Time: uint64(t), // nolint: gosec // >0 checked above - }) -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into se. -func (se *SpanEvent) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid SpanEvent type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid SpanEvent field: %#v", keyIface) - } - - switch key { - case "timeUnixNano", "time_unix_nano": - var val protoUint64 - err = decoder.Decode(&val) - v := int64(min(val.Uint64(), math.MaxInt64)) // nolint: gosec // Overflow checked. - se.Time = time.Unix(0, v) - case "name": - err = decoder.Decode(&se.Name) - case "attributes": - err = decoder.Decode(&se.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&se.DroppedAttrs) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// SpanLink is a reference 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 SpanLink struct { - // A unique identifier of a trace that this linked span is part of. The ID is a - // 16-byte array. - TraceID TraceID `json:"traceId,omitempty"` - // A unique identifier for the linked span. The ID is an 8-byte array. - SpanID SpanID `json:"spanId,omitempty"` - // The trace_state associated with the link. - TraceState string `json:"traceState,omitempty"` - // attributes is a collection of attribute key/value pairs on the link. - // Attribute keys MUST be unique (it is not allowed to have more than one - // attribute with the same key). - Attrs []Attr `json:"attributes,omitempty"` - // dropped_attributes_count is the number of dropped attributes. If the value is 0, - // then no attributes were dropped. - DroppedAttrs uint32 `json:"droppedAttributesCount,omitempty"` - // Flags, a bit field. - // - // Bits 0-7 (8 least significant bits) are the trace flags as defined in W3C Trace - // Context specification. To read the 8-bit W3C trace flag, use - // `flags & SPAN_FLAGS_TRACE_FLAGS_MASK`. - // - // See https://www.w3.org/TR/trace-context-2/#trace-flags for the flag definitions. - // - // Bits 8 and 9 represent the 3 states of whether the link is remote. - // The states are (unknown, is not remote, is remote). - // To read whether the value is known, use `(flags & SPAN_FLAGS_CONTEXT_HAS_IS_REMOTE_MASK) != 0`. - // To read whether the link is remote, use `(flags & SPAN_FLAGS_CONTEXT_IS_REMOTE_MASK) != 0`. - // - // Readers MUST NOT assume that bits 10-31 (22 most significant bits) will be zero. - // When creating new spans, bits 10-31 (most-significant 22-bits) MUST be zero. - // - // [Optional]. - Flags uint32 `json:"flags,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into sl. -func (sl *SpanLink) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid SpanLink type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid SpanLink field: %#v", keyIface) - } - - switch key { - case "traceId", "trace_id": - err = decoder.Decode(&sl.TraceID) - case "spanId", "span_id": - err = decoder.Decode(&sl.SpanID) - case "traceState", "trace_state": - err = decoder.Decode(&sl.TraceState) - case "attributes": - err = decoder.Decode(&sl.Attrs) - case "droppedAttributesCount", "dropped_attributes_count": - err = decoder.Decode(&sl.DroppedAttrs) - case "flags": - err = decoder.Decode(&sl.Flags) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go deleted file mode 100644 index 1039bf40cd..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/status.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -// StatusCode is the status of a Span. -// -// For the semantics of status codes see -// https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-status -type StatusCode int32 - -const ( - // StatusCodeUnset is the default status. - StatusCodeUnset StatusCode = 0 - // StatusCodeOK is used when the Span has been validated by an Application - // developer or Operator to have completed successfully. - StatusCodeOK StatusCode = 1 - // StatusCodeError is used when the Span contains an error. - StatusCodeError StatusCode = 2 -) - -var statusCodeStrings = []string{ - "Unset", - "OK", - "Error", -} - -func (s StatusCode) String() string { - if s >= 0 && int(s) < len(statusCodeStrings) { - return statusCodeStrings[s] - } - return "" -} - -// Status defines a logical error model that is suitable for different -// programming environments, including REST APIs and RPC APIs. -type Status struct { - // A developer-facing human readable error message. - Message string `json:"message,omitempty"` - // The status code. - Code StatusCode `json:"code,omitempty"` -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go deleted file mode 100644 index e5f10767ca..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/traces.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" -) - -// Traces represents the traces data that can be stored in a persistent storage, -// OR can be embedded by other protocols that transfer OTLP traces data but do -// not implement the OTLP protocol. -// -// The main difference between this message and collector protocol is that -// in this message there will not be any "control" or "metadata" specific to -// OTLP protocol. -// -// When new fields are added into this message, the OTLP request MUST be updated -// as well. -type Traces struct { - // An array of ResourceSpans. - // For data coming from a single resource this array will typically contain - // one element. Intermediary nodes that receive data from multiple origins - // typically batch the data before forwarding further and in that case this - // array will contain multiple elements. - ResourceSpans []*ResourceSpans `json:"resourceSpans,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into td. -func (td *Traces) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid TracesData type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid TracesData field: %#v", keyIface) - } - - switch key { - case "resourceSpans", "resource_spans": - err = decoder.Decode(&td.ResourceSpans) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// ResourceSpans is a collection of ScopeSpans from a Resource. -type ResourceSpans struct { - // The resource for the spans in this message. - // If this field is not set then no resource info is known. - Resource Resource `json:"resource"` - // A list of ScopeSpans that originate from a resource. - ScopeSpans []*ScopeSpans `json:"scopeSpans,omitempty"` - // This schema_url applies to the data in the "resource" field. It does not apply - // to the data in the "scope_spans" field which have their own schema_url field. - SchemaURL string `json:"schemaUrl,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into rs. -func (rs *ResourceSpans) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid ResourceSpans type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid ResourceSpans field: %#v", keyIface) - } - - switch key { - case "resource": - err = decoder.Decode(&rs.Resource) - case "scopeSpans", "scope_spans": - err = decoder.Decode(&rs.ScopeSpans) - case "schemaUrl", "schema_url": - err = decoder.Decode(&rs.SchemaURL) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} - -// ScopeSpans is a collection of Spans produced by an InstrumentationScope. -type ScopeSpans struct { - // The instrumentation scope information for the spans in this message. - // Semantically when InstrumentationScope isn't set, it is equivalent with - // an empty instrumentation scope name (unknown). - Scope *Scope `json:"scope"` - // A list of Spans that originate from an instrumentation scope. - Spans []*Span `json:"spans,omitempty"` - // The Schema URL, if known. This is the identifier of the Schema that the span data - // is recorded in. To learn more about Schema URL see - // https://opentelemetry.io/docs/specs/otel/schemas/#schema-url - // This schema_url applies to all spans and span events in the "spans" field. - SchemaURL string `json:"schemaUrl,omitempty"` -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into ss. -func (ss *ScopeSpans) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid ScopeSpans type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid ScopeSpans field: %#v", keyIface) - } - - switch key { - case "scope": - err = decoder.Decode(&ss.Scope) - case "spans": - err = decoder.Decode(&ss.Spans) - case "schemaUrl", "schema_url": - err = decoder.Decode(&ss.SchemaURL) - default: - // Skip unknown. - } - - if err != nil { - return err - } - } - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go b/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go deleted file mode 100644 index cb7927b816..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/value.go +++ /dev/null @@ -1,453 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package telemetry // import "go.opentelemetry.io/otel/trace/internal/telemetry" - -import ( - "bytes" - "cmp" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "io" - "math" - "slices" - "strconv" - "unsafe" -) - -// A Value represents a structured value. -// A zero value is valid and represents an empty value. -type Value struct { - // Ensure forward compatibility by explicitly making this not comparable. - noCmp [0]func() //nolint: unused // This is indeed used. - - // num holds the value for Int64, Float64, and Bool. It holds the length - // for String, Bytes, Slice, Map. - num uint64 - // any holds either the KindBool, KindInt64, KindFloat64, stringptr, - // bytesptr, sliceptr, or mapptr. If KindBool, KindInt64, or KindFloat64 - // then the value of Value is in num as described above. Otherwise, it - // contains the value wrapped in the appropriate type. - any any -} - -type ( - // sliceptr represents a value in Value.any for KindString Values. - stringptr *byte - // bytesptr represents a value in Value.any for KindBytes Values. - bytesptr *byte - // sliceptr represents a value in Value.any for KindSlice Values. - sliceptr *Value - // mapptr represents a value in Value.any for KindMap Values. - mapptr *Attr -) - -// ValueKind is the kind of a [Value]. -type ValueKind int - -// ValueKind values. -const ( - ValueKindEmpty ValueKind = iota - ValueKindBool - ValueKindFloat64 - ValueKindInt64 - ValueKindString - ValueKindBytes - ValueKindSlice - ValueKindMap -) - -var valueKindStrings = []string{ - "Empty", - "Bool", - "Float64", - "Int64", - "String", - "Bytes", - "Slice", - "Map", -} - -func (k ValueKind) String() string { - if k >= 0 && int(k) < len(valueKindStrings) { - return valueKindStrings[k] - } - return "" -} - -// StringValue returns a new [Value] for a string. -func StringValue(v string) Value { - return Value{ - num: uint64(len(v)), - any: stringptr(unsafe.StringData(v)), - } -} - -// IntValue returns a [Value] for an int. -func IntValue(v int) Value { return Int64Value(int64(v)) } - -// Int64Value returns a [Value] for an int64. -func Int64Value(v int64) Value { - return Value{ - num: uint64(v), // nolint: gosec // Store raw bytes. - any: ValueKindInt64, - } -} - -// Float64Value returns a [Value] for a float64. -func Float64Value(v float64) Value { - return Value{num: math.Float64bits(v), any: ValueKindFloat64} -} - -// BoolValue returns a [Value] for a bool. -func BoolValue(v bool) Value { //nolint:revive // Not a control flag. - var n uint64 - if v { - n = 1 - } - return Value{num: n, any: ValueKindBool} -} - -// BytesValue returns a [Value] for a byte slice. The passed slice must not be -// changed after it is passed. -func BytesValue(v []byte) Value { - return Value{ - num: uint64(len(v)), - any: bytesptr(unsafe.SliceData(v)), - } -} - -// SliceValue returns a [Value] for a slice of [Value]. The passed slice must -// not be changed after it is passed. -func SliceValue(vs ...Value) Value { - return Value{ - num: uint64(len(vs)), - any: sliceptr(unsafe.SliceData(vs)), - } -} - -// MapValue returns a new [Value] for a slice of key-value pairs. The passed -// slice must not be changed after it is passed. -func MapValue(kvs ...Attr) Value { - return Value{ - num: uint64(len(kvs)), - any: mapptr(unsafe.SliceData(kvs)), - } -} - -// AsString returns the value held by v as a string. -func (v Value) AsString() string { - if sp, ok := v.any.(stringptr); ok { - return unsafe.String(sp, v.num) - } - // TODO: error handle - return "" -} - -// asString returns the value held by v as a string. It will panic if the Value -// is not KindString. -func (v Value) asString() string { - return unsafe.String(v.any.(stringptr), v.num) -} - -// AsInt64 returns the value held by v as an int64. -func (v Value) AsInt64() int64 { - if v.Kind() != ValueKindInt64 { - // TODO: error handle - return 0 - } - return v.asInt64() -} - -// asInt64 returns the value held by v as an int64. If v is not of KindInt64, -// this will return garbage. -func (v Value) asInt64() int64 { - // Assumes v.num was a valid int64 (overflow not checked). - return int64(v.num) // nolint: gosec -} - -// AsBool returns the value held by v as a bool. -func (v Value) AsBool() bool { - if v.Kind() != ValueKindBool { - // TODO: error handle - return false - } - return v.asBool() -} - -// asBool returns the value held by v as a bool. If v is not of KindBool, this -// will return garbage. -func (v Value) asBool() bool { return v.num == 1 } - -// AsFloat64 returns the value held by v as a float64. -func (v Value) AsFloat64() float64 { - if v.Kind() != ValueKindFloat64 { - // TODO: error handle - return 0 - } - return v.asFloat64() -} - -// asFloat64 returns the value held by v as a float64. If v is not of -// KindFloat64, this will return garbage. -func (v Value) asFloat64() float64 { return math.Float64frombits(v.num) } - -// AsBytes returns the value held by v as a []byte. -func (v Value) AsBytes() []byte { - if sp, ok := v.any.(bytesptr); ok { - return unsafe.Slice((*byte)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asBytes returns the value held by v as a []byte. It will panic if the Value -// is not KindBytes. -func (v Value) asBytes() []byte { - return unsafe.Slice((*byte)(v.any.(bytesptr)), v.num) -} - -// AsSlice returns the value held by v as a []Value. -func (v Value) AsSlice() []Value { - if sp, ok := v.any.(sliceptr); ok { - return unsafe.Slice((*Value)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asSlice returns the value held by v as a []Value. It will panic if the Value -// is not KindSlice. -func (v Value) asSlice() []Value { - return unsafe.Slice((*Value)(v.any.(sliceptr)), v.num) -} - -// AsMap returns the value held by v as a []Attr. -func (v Value) AsMap() []Attr { - if sp, ok := v.any.(mapptr); ok { - return unsafe.Slice((*Attr)(sp), v.num) - } - // TODO: error handle - return nil -} - -// asMap returns the value held by v as a []Attr. It will panic if the -// Value is not KindMap. -func (v Value) asMap() []Attr { - return unsafe.Slice((*Attr)(v.any.(mapptr)), v.num) -} - -// Kind returns the Kind of v. -func (v Value) Kind() ValueKind { - switch x := v.any.(type) { - case ValueKind: - return x - case stringptr: - return ValueKindString - case bytesptr: - return ValueKindBytes - case sliceptr: - return ValueKindSlice - case mapptr: - return ValueKindMap - default: - return ValueKindEmpty - } -} - -// Empty reports whether v does not hold any value. -func (v Value) Empty() bool { return v.Kind() == ValueKindEmpty } - -// Equal reports whether v is equal to w. -func (v Value) Equal(w Value) bool { - k1 := v.Kind() - k2 := w.Kind() - if k1 != k2 { - return false - } - switch k1 { - case ValueKindInt64, ValueKindBool: - return v.num == w.num - case ValueKindString: - return v.asString() == w.asString() - case ValueKindFloat64: - return v.asFloat64() == w.asFloat64() - case ValueKindSlice: - return slices.EqualFunc(v.asSlice(), w.asSlice(), Value.Equal) - case ValueKindMap: - sv := sortMap(v.asMap()) - sw := sortMap(w.asMap()) - return slices.EqualFunc(sv, sw, Attr.Equal) - case ValueKindBytes: - return bytes.Equal(v.asBytes(), w.asBytes()) - case ValueKindEmpty: - return true - default: - // TODO: error handle - return false - } -} - -func sortMap(m []Attr) []Attr { - sm := make([]Attr, len(m)) - copy(sm, m) - slices.SortFunc(sm, func(a, b Attr) int { - return cmp.Compare(a.Key, b.Key) - }) - - return sm -} - -// String returns Value's value as a string, formatted like [fmt.Sprint]. -// -// The returned string is meant for debugging; -// the string representation is not stable. -func (v Value) String() string { - switch v.Kind() { - case ValueKindString: - return v.asString() - case ValueKindInt64: - // Assumes v.num was a valid int64 (overflow not checked). - return strconv.FormatInt(int64(v.num), 10) // nolint: gosec - case ValueKindFloat64: - return strconv.FormatFloat(v.asFloat64(), 'g', -1, 64) - case ValueKindBool: - return strconv.FormatBool(v.asBool()) - case ValueKindBytes: - return string(v.asBytes()) - case ValueKindMap: - return fmt.Sprint(v.asMap()) - case ValueKindSlice: - return fmt.Sprint(v.asSlice()) - case ValueKindEmpty: - return "" - default: - // Try to handle this as gracefully as possible. - // - // Don't panic here. The goal here is to have developers find this - // first if a slog.Kind is is not handled. It is - // preferable to have user's open issue asking why their attributes - // have a "unhandled: " prefix than say that their code is panicking. - return fmt.Sprintf("", v.Kind()) - } -} - -// MarshalJSON encodes v into OTLP formatted JSON. -func (v *Value) MarshalJSON() ([]byte, error) { - switch v.Kind() { - case ValueKindString: - return json.Marshal(struct { - Value string `json:"stringValue"` - }{v.asString()}) - case ValueKindInt64: - return json.Marshal(struct { - Value string `json:"intValue"` - }{strconv.FormatInt(int64(v.num), 10)}) // nolint: gosec // From raw bytes. - case ValueKindFloat64: - return json.Marshal(struct { - Value float64 `json:"doubleValue"` - }{v.asFloat64()}) - case ValueKindBool: - return json.Marshal(struct { - Value bool `json:"boolValue"` - }{v.asBool()}) - case ValueKindBytes: - return json.Marshal(struct { - Value []byte `json:"bytesValue"` - }{v.asBytes()}) - case ValueKindMap: - return json.Marshal(struct { - Value struct { - Values []Attr `json:"values"` - } `json:"kvlistValue"` - }{struct { - Values []Attr `json:"values"` - }{v.asMap()}}) - case ValueKindSlice: - return json.Marshal(struct { - Value struct { - Values []Value `json:"values"` - } `json:"arrayValue"` - }{struct { - Values []Value `json:"values"` - }{v.asSlice()}}) - case ValueKindEmpty: - return nil, nil - default: - return nil, fmt.Errorf("unknown Value kind: %s", v.Kind().String()) - } -} - -// UnmarshalJSON decodes the OTLP formatted JSON contained in data into v. -func (v *Value) UnmarshalJSON(data []byte) error { - decoder := json.NewDecoder(bytes.NewReader(data)) - - t, err := decoder.Token() - if err != nil { - return err - } - if t != json.Delim('{') { - return errors.New("invalid Value type") - } - - for decoder.More() { - keyIface, err := decoder.Token() - if err != nil { - if errors.Is(err, io.EOF) { - // Empty. - return nil - } - return err - } - - key, ok := keyIface.(string) - if !ok { - return fmt.Errorf("invalid Value key: %#v", keyIface) - } - - switch key { - case "stringValue", "string_value": - var val string - err = decoder.Decode(&val) - *v = StringValue(val) - case "boolValue", "bool_value": - var val bool - err = decoder.Decode(&val) - *v = BoolValue(val) - case "intValue", "int_value": - var val protoInt64 - err = decoder.Decode(&val) - *v = Int64Value(val.Int64()) - case "doubleValue", "double_value": - var val float64 - err = decoder.Decode(&val) - *v = Float64Value(val) - case "bytesValue", "bytes_value": - var val64 string - if err := decoder.Decode(&val64); err != nil { - return err - } - var val []byte - val, err = base64.StdEncoding.DecodeString(val64) - *v = BytesValue(val) - case "arrayValue", "array_value": - var val struct{ Values []Value } - err = decoder.Decode(&val) - *v = SliceValue(val.Values...) - case "kvlistValue", "kvlist_value": - var val struct{ Values []Attr } - err = decoder.Decode(&val) - *v = MapValue(val.Values...) - default: - // Skip unknown. - continue - } - // Use first valid. Ignore the rest. - return err - } - - // Only unknown fields. Return nil without unmarshaling any value. - return nil -} diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go deleted file mode 100644 index c00221e7be..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -// nonRecordingSpan is a minimal implementation of a Span that wraps a -// SpanContext. It performs no operations other than to return the wrapped -// SpanContext. -type nonRecordingSpan struct { - noopSpan - - sc SpanContext -} - -// SpanContext returns the wrapped SpanContext. -func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go deleted file mode 100644 index 400fab1238..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/noop.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace/embedded" -) - -// NewNoopTracerProvider returns an implementation of TracerProvider that -// performs no operations. The Tracer and Spans created from the returned -// TracerProvider also perform no operations. -// -// Deprecated: Use [go.opentelemetry.io/otel/trace/noop.NewTracerProvider] -// instead. -func NewNoopTracerProvider() TracerProvider { - return noopTracerProvider{} -} - -type noopTracerProvider struct{ embedded.TracerProvider } - -var _ TracerProvider = noopTracerProvider{} - -// Tracer returns noop implementation of Tracer. -func (noopTracerProvider) Tracer(string, ...TracerOption) Tracer { - return noopTracer{} -} - -// noopTracer is an implementation of Tracer that performs no operations. -type noopTracer struct{ embedded.Tracer } - -var _ Tracer = noopTracer{} - -// Start carries forward a non-recording Span, if one is present in the context, otherwise it -// creates a no-op Span. -func (noopTracer) Start(ctx context.Context, _ string, _ ...SpanStartOption) (context.Context, Span) { - span := SpanFromContext(ctx) - if _, ok := span.(nonRecordingSpan); !ok { - // span is likely already a noopSpan, but let's be sure - span = noopSpanInstance - } - return ContextWithSpan(ctx, span), span -} - -// noopSpan is an implementation of Span that performs no operations. -type noopSpan struct{ embedded.Span } - -var noopSpanInstance Span = noopSpan{} - -// SpanContext returns an empty span context. -func (noopSpan) SpanContext() SpanContext { return SpanContext{} } - -// IsRecording always returns false. -func (noopSpan) IsRecording() bool { return false } - -// SetStatus does nothing. -func (noopSpan) SetStatus(codes.Code, string) {} - -// SetError does nothing. -func (noopSpan) SetError(bool) {} - -// SetAttributes does nothing. -func (noopSpan) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (noopSpan) End(...SpanEndOption) {} - -// RecordError does nothing. -func (noopSpan) RecordError(error, ...EventOption) {} - -// AddEvent does nothing. -func (noopSpan) AddEvent(string, ...EventOption) {} - -// AddLink does nothing. -func (noopSpan) AddLink(Link) {} - -// SetName does nothing. -func (noopSpan) SetName(string) {} - -// TracerProvider returns a no-op TracerProvider. -func (s noopSpan) TracerProvider() TracerProvider { - return s.tracerProvider(autoInstEnabled) -} - -// autoInstEnabled defines if the auto-instrumentation SDK is enabled. -// -// The auto-instrumentation is expected to overwrite this value to true when it -// attaches to the process. -var autoInstEnabled = new(bool) - -// tracerProvider return a noopTracerProvider if autoEnabled is false, -// otherwise it will return a TracerProvider from the sdk package used in -// auto-instrumentation. -// -//go:noinline -func (noopSpan) tracerProvider(autoEnabled *bool) TracerProvider { - if *autoEnabled { - return newAutoTracerProvider() - } - return noopTracerProvider{} -} diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/README.md b/vendor/go.opentelemetry.io/otel/trace/noop/README.md deleted file mode 100644 index cd382c82a1..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/noop/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Trace Noop - -[![PkgGoDev](https://pkg.go.dev/badge/go.opentelemetry.io/otel/trace/noop)](https://pkg.go.dev/go.opentelemetry.io/otel/trace/noop) diff --git a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop/noop.go deleted file mode 100644 index 689d220df7..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/noop/noop.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -// Package noop provides an implementation of the OpenTelemetry trace API that -// produces no telemetry and minimizes used computation resources. -// -// Using this package to implement the OpenTelemetry trace API will effectively -// disable OpenTelemetry. -// -// This implementation can be embedded in other implementations of the -// OpenTelemetry trace API. Doing so will mean the implementation defaults to -// no operation for methods it does not implement. -package noop // import "go.opentelemetry.io/otel/trace/noop" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/otel/trace/embedded" -) - -var ( - // Compile-time check this implements the OpenTelemetry API. - - _ trace.TracerProvider = TracerProvider{} - _ trace.Tracer = Tracer{} - _ trace.Span = Span{} -) - -// TracerProvider is an OpenTelemetry No-Op TracerProvider. -type TracerProvider struct{ embedded.TracerProvider } - -// NewTracerProvider returns a TracerProvider that does not record any telemetry. -func NewTracerProvider() TracerProvider { - return TracerProvider{} -} - -// Tracer returns an OpenTelemetry Tracer that does not record any telemetry. -func (TracerProvider) Tracer(string, ...trace.TracerOption) trace.Tracer { - return Tracer{} -} - -// Tracer is an OpenTelemetry No-Op Tracer. -type Tracer struct{ embedded.Tracer } - -// Start creates a span. The created span will be set in a child context of ctx -// and returned with the span. -// -// If ctx contains a span context, the returned span will also contain that -// span context. If the span context in ctx is for a non-recording span, that -// span instance will be returned directly. -func (Tracer) Start(ctx context.Context, _ string, _ ...trace.SpanStartOption) (context.Context, trace.Span) { - span := trace.SpanFromContext(ctx) - - // If the parent context contains a non-zero span context, that span - // context needs to be returned as a non-recording span - // (https://github.com/open-telemetry/opentelemetry-specification/blob/3a1dde966a4ce87cce5adf464359fe369741bbea/specification/trace/api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk). - var zeroSC trace.SpanContext - if sc := span.SpanContext(); !sc.Equal(zeroSC) { - if !span.IsRecording() { - // If the span is not recording return it directly. - return ctx, span - } - // Otherwise, return the span context needs in a non-recording span. - span = Span{sc: sc} - } else { - // No parent, return a No-Op span with an empty span context. - span = noopSpanInstance - } - return trace.ContextWithSpan(ctx, span), span -} - -var noopSpanInstance trace.Span = Span{} - -// Span is an OpenTelemetry No-Op Span. -type Span struct { - embedded.Span - - sc trace.SpanContext -} - -// SpanContext returns an empty span context. -func (s Span) SpanContext() trace.SpanContext { return s.sc } - -// IsRecording always returns false. -func (Span) IsRecording() bool { return false } - -// SetStatus does nothing. -func (Span) SetStatus(codes.Code, string) {} - -// SetAttributes does nothing. -func (Span) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (Span) End(...trace.SpanEndOption) {} - -// RecordError does nothing. -func (Span) RecordError(error, ...trace.EventOption) {} - -// AddEvent does nothing. -func (Span) AddEvent(string, ...trace.EventOption) {} - -// AddLink does nothing. -func (Span) AddLink(trace.Link) {} - -// SetName does nothing. -func (Span) SetName(string) {} - -// TracerProvider returns a No-Op TracerProvider. -func (Span) TracerProvider() trace.TracerProvider { return TracerProvider{} } diff --git a/vendor/go.opentelemetry.io/otel/trace/provider.go b/vendor/go.opentelemetry.io/otel/trace/provider.go deleted file mode 100644 index ef85cb70c6..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/provider.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import "go.opentelemetry.io/otel/trace/embedded" - -// TracerProvider provides Tracers that are used by instrumentation code to -// trace computational workflows. -// -// A TracerProvider is the collection destination of all Spans from Tracers it -// provides, it represents a unique telemetry collection pipeline. How that -// pipeline is defined, meaning how those Spans are collected, processed, and -// where they are exported, depends on its implementation. Instrumentation -// authors do not need to define this implementation, rather just use the -// provided Tracers to instrument code. -// -// Commonly, instrumentation code will accept a TracerProvider implementation -// at runtime from its users or it can simply use the globally registered one -// (see https://pkg.go.dev/go.opentelemetry.io/otel#GetTracerProvider). -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type TracerProvider interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.TracerProvider - - // Tracer returns a unique Tracer scoped to be used by instrumentation code - // to trace computational workflows. The scope and identity of that - // instrumentation code is uniquely defined by the name and options passed. - // - // The passed name needs to uniquely identify instrumentation code. - // Therefore, it is recommended that name is the Go package name of the - // library providing instrumentation (note: not the code being - // instrumented). Instrumentation libraries can have multiple versions, - // therefore, the WithInstrumentationVersion option should be used to - // distinguish these different codebases. Additionally, instrumentation - // libraries may sometimes use traces to communicate different domains of - // workflow data (i.e. using spans to communicate workflow events only). If - // this is the case, the WithScopeAttributes option should be used to - // uniquely identify Tracers that handle the different domains of workflow - // data. - // - // If the same name and options are passed multiple times, the same Tracer - // will be returned (it is up to the implementation if this will be the - // same underlying instance of that Tracer or not). It is not necessary to - // call this multiple times with the same name and options to get an - // up-to-date Tracer. All implementations will ensure any TracerProvider - // configuration changes are propagated to all provided Tracers. - // - // If name is empty, then an implementation defined default name will be - // used instead. - // - // This method is safe to call concurrently. - Tracer(name string, options ...TracerOption) Tracer -} diff --git a/vendor/go.opentelemetry.io/otel/trace/span.go b/vendor/go.opentelemetry.io/otel/trace/span.go deleted file mode 100644 index d01e793664..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/span.go +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" - "go.opentelemetry.io/otel/trace/embedded" -) - -// Span is the individual component of a trace. It represents a single named -// and timed operation of a workflow that is traced. A Tracer is used to -// create a Span and it is then up to the operation the Span represents to -// properly end the Span when the operation itself ends. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Span interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Span - - // End completes the Span. The Span is considered complete and ready to be - // delivered through the rest of the telemetry pipeline after this method - // is called. Therefore, updates to the Span are not allowed after this - // method has been called. - End(options ...SpanEndOption) - - // AddEvent adds an event with the provided name and options. - AddEvent(name string, options ...EventOption) - - // AddLink adds a link. - // Adding links at span creation using WithLinks is preferred to calling AddLink - // later, for contexts that are available during span creation, because head - // sampling decisions can only consider information present during span creation. - AddLink(link Link) - - // IsRecording returns the recording state of the Span. It will return - // true if the Span is active and events can be recorded. - IsRecording() bool - - // RecordError will record err as an exception span event for this span. An - // additional call to SetStatus is required if the Status of the Span should - // be set to Error, as this method does not change the Span status. If this - // span is not being recorded or err is nil then this method does nothing. - RecordError(err error, options ...EventOption) - - // SpanContext returns the SpanContext of the Span. The returned SpanContext - // is usable even after the End method has been called for the Span. - SpanContext() SpanContext - - // SetStatus sets the status of the Span in the form of a code and a - // description, provided the status hasn't already been set to a higher - // value before (OK > Error > Unset). The description is only included in a - // status when the code is for an error. - SetStatus(code codes.Code, description string) - - // SetName sets the Span name. - SetName(name string) - - // SetAttributes sets kv as attributes of the Span. If a key from kv - // already exists for an attribute of the Span it will be overwritten with - // the value contained in kv. - // - // Note that adding attributes at span creation using [WithAttributes] is preferred - // to calling SetAttribute later, as samplers can only consider information - // already present during span creation. - SetAttributes(kv ...attribute.KeyValue) - - // TracerProvider returns a TracerProvider that can be used to generate - // additional Spans on the same telemetry pipeline as the current Span. - TracerProvider() TracerProvider -} - -// Link is the relationship between two Spans. The relationship can be within -// the same Trace or across different Traces. -// -// For example, a Link is used in the following situations: -// -// 1. Batch Processing: A batch of operations may contain operations -// associated with one or more traces/spans. Since there can only be one -// parent SpanContext, a Link is used to keep reference to the -// SpanContext of all operations in the batch. -// 2. Public Endpoint: A SpanContext for an in incoming client request on a -// public endpoint should be considered untrusted. In such a case, a new -// trace with its own identity and sampling decision needs to be created, -// but this new trace needs to be related to the original trace in some -// form. A Link is used to keep reference to the original SpanContext and -// track the relationship. -type Link struct { - // SpanContext of the linked Span. - SpanContext SpanContext - - // Attributes describe the aspects of the link. - Attributes []attribute.KeyValue -} - -// LinkFromContext returns a link encapsulating the SpanContext in the provided -// ctx. -func LinkFromContext(ctx context.Context, attrs ...attribute.KeyValue) Link { - return Link{ - SpanContext: SpanContextFromContext(ctx), - Attributes: attrs, - } -} - -// SpanKind is the role a Span plays in a Trace. -type SpanKind int - -// As a convenience, these match the proto definition, see -// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 -// -// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` -// to coerce a span kind to a valid value. -const ( - // SpanKindUnspecified is an unspecified SpanKind and is not a valid - // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal - // if it is received. - SpanKindUnspecified SpanKind = 0 - // SpanKindInternal is a SpanKind for a Span that represents an internal - // operation within an application. - SpanKindInternal SpanKind = 1 - // SpanKindServer is a SpanKind for a Span that represents the operation - // of handling a request from a client. - SpanKindServer SpanKind = 2 - // SpanKindClient is a SpanKind for a Span that represents the operation - // of client making a request to a server. - SpanKindClient SpanKind = 3 - // SpanKindProducer is a SpanKind for a Span that represents the operation - // of a producer sending a message to a message broker. Unlike - // SpanKindClient and SpanKindServer, there is often no direct - // relationship between this kind of Span and a SpanKindConsumer kind. A - // SpanKindProducer Span will end once the message is accepted by the - // message broker which might not overlap with the processing of that - // message. - SpanKindProducer SpanKind = 4 - // SpanKindConsumer is a SpanKind for a Span that represents the operation - // of a consumer receiving a message from a message broker. Like - // SpanKindProducer Spans, there is often no direct relationship between - // this Span and the Span that produced the message. - SpanKindConsumer SpanKind = 5 -) - -// ValidateSpanKind returns a valid span kind value. This will coerce -// invalid values into the default value, SpanKindInternal. -func ValidateSpanKind(spanKind SpanKind) SpanKind { - switch spanKind { - case SpanKindInternal, - SpanKindServer, - SpanKindClient, - SpanKindProducer, - SpanKindConsumer: - // valid - return spanKind - default: - return SpanKindInternal - } -} - -// String returns the specified name of the SpanKind in lower-case. -func (sk SpanKind) String() string { - switch sk { - case SpanKindInternal: - return "internal" - case SpanKindServer: - return "server" - case SpanKindClient: - return "client" - case SpanKindProducer: - return "producer" - case SpanKindConsumer: - return "consumer" - default: - return "unspecified" - } -} diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go deleted file mode 100644 index ee6f4bcb2a..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/trace.go +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "encoding/json" -) - -const ( - // FlagsSampled is a bitmask with the sampled bit set. A SpanContext - // with the sampling bit set means the span is sampled. - FlagsSampled = TraceFlags(0x01) - - errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" - - errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" - errNilTraceID errorConst = "trace-id can't be all zero" - - errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" - errNilSpanID errorConst = "span-id can't be all zero" -) - -type errorConst string - -func (e errorConst) Error() string { - return string(e) -} - -// TraceID is a unique identity of a trace. -// nolint:revive // revive complains about stutter of `trace.TraceID`. -type TraceID [16]byte - -var ( - nilTraceID TraceID - _ json.Marshaler = nilTraceID -) - -// IsValid reports whether the trace TraceID is valid. A valid trace ID does -// not consist of zeros only. -func (t TraceID) IsValid() bool { - return t != nilTraceID -} - -// MarshalJSON implements a custom marshal function to encode TraceID -// as a hex string. -func (t TraceID) MarshalJSON() ([]byte, error) { - b := [32 + 2]byte{0: '"', 33: '"'} - h := t.hexBytes() - copy(b[1:], h[:]) - return b[:], nil -} - -// String returns the hex string representation form of a TraceID. -func (t TraceID) String() string { - h := t.hexBytes() - return string(h[:]) -} - -// hexBytes returns the hex string representation form of a TraceID. -func (t TraceID) hexBytes() [32]byte { - return [32]byte{ - hexLU[t[0x0]>>4], hexLU[t[0x0]&0xf], - hexLU[t[0x1]>>4], hexLU[t[0x1]&0xf], - hexLU[t[0x2]>>4], hexLU[t[0x2]&0xf], - hexLU[t[0x3]>>4], hexLU[t[0x3]&0xf], - hexLU[t[0x4]>>4], hexLU[t[0x4]&0xf], - hexLU[t[0x5]>>4], hexLU[t[0x5]&0xf], - hexLU[t[0x6]>>4], hexLU[t[0x6]&0xf], - hexLU[t[0x7]>>4], hexLU[t[0x7]&0xf], - hexLU[t[0x8]>>4], hexLU[t[0x8]&0xf], - hexLU[t[0x9]>>4], hexLU[t[0x9]&0xf], - hexLU[t[0xa]>>4], hexLU[t[0xa]&0xf], - hexLU[t[0xb]>>4], hexLU[t[0xb]&0xf], - hexLU[t[0xc]>>4], hexLU[t[0xc]&0xf], - hexLU[t[0xd]>>4], hexLU[t[0xd]&0xf], - hexLU[t[0xe]>>4], hexLU[t[0xe]&0xf], - hexLU[t[0xf]>>4], hexLU[t[0xf]&0xf], - } -} - -// SpanID is a unique identity of a span in a trace. -type SpanID [8]byte - -var ( - nilSpanID SpanID - _ json.Marshaler = nilSpanID -) - -// IsValid reports whether the SpanID is valid. A valid SpanID does not consist -// of zeros only. -func (s SpanID) IsValid() bool { - return s != nilSpanID -} - -// MarshalJSON implements a custom marshal function to encode SpanID -// as a hex string. -func (s SpanID) MarshalJSON() ([]byte, error) { - b := [16 + 2]byte{0: '"', 17: '"'} - h := s.hexBytes() - copy(b[1:], h[:]) - return b[:], nil -} - -// String returns the hex string representation form of a SpanID. -func (s SpanID) String() string { - b := s.hexBytes() - return string(b[:]) -} - -func (s SpanID) hexBytes() [16]byte { - return [16]byte{ - hexLU[s[0]>>4], hexLU[s[0]&0xf], - hexLU[s[1]>>4], hexLU[s[1]&0xf], - hexLU[s[2]>>4], hexLU[s[2]&0xf], - hexLU[s[3]>>4], hexLU[s[3]&0xf], - hexLU[s[4]>>4], hexLU[s[4]&0xf], - hexLU[s[5]>>4], hexLU[s[5]&0xf], - hexLU[s[6]>>4], hexLU[s[6]&0xf], - hexLU[s[7]>>4], hexLU[s[7]&0xf], - } -} - -// TraceIDFromHex returns a TraceID from a hex string if it is compliant with -// the W3C trace-context specification. See more at -// https://www.w3.org/TR/trace-context/#trace-id -// nolint:revive // revive complains about stutter of `trace.TraceIDFromHex`. -func TraceIDFromHex(h string) (TraceID, error) { - if len(h) != 32 { - return [16]byte{}, errInvalidTraceIDLength - } - var b [16]byte - invalidMark := byte(0) - for i := 0; i < len(h); i += 4 { - b[i/2] = (hexRev[h[i]] << 4) | hexRev[h[i+1]] - b[i/2+1] = (hexRev[h[i+2]] << 4) | hexRev[h[i+3]] - invalidMark |= hexRev[h[i]] | hexRev[h[i+1]] | hexRev[h[i+2]] | hexRev[h[i+3]] - } - // If the upper 4 bits of any byte are not zero, there was an invalid hex - // character since invalid hex characters are 0xff in hexRev. - if invalidMark&0xf0 != 0 { - return [16]byte{}, errInvalidHexID - } - // If we didn't set any bits, then h was all zeros. - if invalidMark == 0 { - return [16]byte{}, errNilTraceID - } - return b, nil -} - -// SpanIDFromHex returns a SpanID from a hex string if it is compliant -// with the w3c trace-context specification. -// See more at https://www.w3.org/TR/trace-context/#parent-id -func SpanIDFromHex(h string) (SpanID, error) { - if len(h) != 16 { - return [8]byte{}, errInvalidSpanIDLength - } - var b [8]byte - invalidMark := byte(0) - for i := 0; i < len(h); i += 4 { - b[i/2] = (hexRev[h[i]] << 4) | hexRev[h[i+1]] - b[i/2+1] = (hexRev[h[i+2]] << 4) | hexRev[h[i+3]] - invalidMark |= hexRev[h[i]] | hexRev[h[i+1]] | hexRev[h[i+2]] | hexRev[h[i+3]] - } - // If the upper 4 bits of any byte are not zero, there was an invalid hex - // character since invalid hex characters are 0xff in hexRev. - if invalidMark&0xf0 != 0 { - return [8]byte{}, errInvalidHexID - } - // If we didn't set any bits, then h was all zeros. - if invalidMark == 0 { - return [8]byte{}, errNilSpanID - } - return b, nil -} - -// TraceFlags contains flags that can be set on a SpanContext. -type TraceFlags byte //nolint:revive // revive complains about stutter of `trace.TraceFlags`. - -// IsSampled reports whether the sampling bit is set in the TraceFlags. -func (tf TraceFlags) IsSampled() bool { - return tf&FlagsSampled == FlagsSampled -} - -// WithSampled sets the sampling bit in a new copy of the TraceFlags. -func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { // nolint:revive // sampled is not a control flag. - if sampled { - return tf | FlagsSampled - } - - return tf &^ FlagsSampled -} - -// MarshalJSON implements a custom marshal function to encode TraceFlags -// as a hex string. -func (tf TraceFlags) MarshalJSON() ([]byte, error) { - b := [2 + 2]byte{0: '"', 3: '"'} - h := tf.hexBytes() - copy(b[1:], h[:]) - return b[:], nil -} - -// String returns the hex string representation form of TraceFlags. -func (tf TraceFlags) String() string { - h := tf.hexBytes() - return string(h[:]) -} - -func (tf TraceFlags) hexBytes() [2]byte { - return [2]byte{hexLU[tf>>4], hexLU[tf&0xf]} -} - -// SpanContextConfig contains mutable fields usable for constructing -// an immutable SpanContext. -type SpanContextConfig struct { - TraceID TraceID - SpanID SpanID - TraceFlags TraceFlags - TraceState TraceState - Remote bool -} - -// NewSpanContext constructs a SpanContext using values from the provided -// SpanContextConfig. -func NewSpanContext(config SpanContextConfig) SpanContext { - return SpanContext{ - traceID: config.TraceID, - spanID: config.SpanID, - traceFlags: config.TraceFlags, - traceState: config.TraceState, - remote: config.Remote, - } -} - -// SpanContext contains identifying trace information about a Span. -type SpanContext struct { - traceID TraceID - spanID SpanID - traceFlags TraceFlags - traceState TraceState - remote bool -} - -var _ json.Marshaler = SpanContext{} - -// IsValid reports whether the SpanContext is valid. A valid span context has a -// valid TraceID and SpanID. -func (sc SpanContext) IsValid() bool { - return sc.HasTraceID() && sc.HasSpanID() -} - -// IsRemote reports whether the SpanContext represents a remotely-created Span. -func (sc SpanContext) IsRemote() bool { - return sc.remote -} - -// WithRemote returns a copy of sc with the Remote property set to remote. -func (sc SpanContext) WithRemote(remote bool) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: remote, - } -} - -// TraceID returns the TraceID from the SpanContext. -func (sc SpanContext) TraceID() TraceID { - return sc.traceID -} - -// HasTraceID reports whether the SpanContext has a valid TraceID. -func (sc SpanContext) HasTraceID() bool { - return sc.traceID.IsValid() -} - -// WithTraceID returns a new SpanContext with the TraceID replaced. -func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { - return SpanContext{ - traceID: traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// SpanID returns the SpanID from the SpanContext. -func (sc SpanContext) SpanID() SpanID { - return sc.spanID -} - -// HasSpanID reports whether the SpanContext has a valid SpanID. -func (sc SpanContext) HasSpanID() bool { - return sc.spanID.IsValid() -} - -// WithSpanID returns a new SpanContext with the SpanID replaced. -func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceFlags returns the flags from the SpanContext. -func (sc SpanContext) TraceFlags() TraceFlags { - return sc.traceFlags -} - -// IsSampled reports whether the sampling bit is set in the SpanContext's TraceFlags. -func (sc SpanContext) IsSampled() bool { - return sc.traceFlags.IsSampled() -} - -// WithTraceFlags returns a new SpanContext with the TraceFlags replaced. -func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: flags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceState returns the TraceState from the SpanContext. -func (sc SpanContext) TraceState() TraceState { - return sc.traceState -} - -// WithTraceState returns a new SpanContext with the TraceState replaced. -func (sc SpanContext) WithTraceState(state TraceState) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: state, - remote: sc.remote, - } -} - -// Equal reports whether two SpanContext values are equal. -func (sc SpanContext) Equal(other SpanContext) bool { - return sc.traceID == other.traceID && - sc.spanID == other.spanID && - sc.traceFlags == other.traceFlags && - sc.traceState.String() == other.traceState.String() && - sc.remote == other.remote -} - -// MarshalJSON implements a custom marshal function to encode a SpanContext. -func (sc SpanContext) MarshalJSON() ([]byte, error) { - return json.Marshal(SpanContextConfig{ - TraceID: sc.traceID, - SpanID: sc.spanID, - TraceFlags: sc.traceFlags, - TraceState: sc.traceState, - Remote: sc.remote, - }) -} diff --git a/vendor/go.opentelemetry.io/otel/trace/tracer.go b/vendor/go.opentelemetry.io/otel/trace/tracer.go deleted file mode 100644 index 77952d2a0b..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/tracer.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/trace/embedded" -) - -// Tracer is the creator of Spans. -// -// Warning: Methods may be added to this interface in minor releases. See -// package documentation on API implementation for information on how to set -// default behavior for unimplemented methods. -type Tracer interface { - // Users of the interface can ignore this. This embedded type is only used - // by implementations of this interface. See the "API Implementations" - // section of the package documentation for more information. - embedded.Tracer - - // Start creates a span and a context.Context containing the newly-created span. - // - // If the context.Context provided in `ctx` contains a Span then the newly-created - // Span will be a child of that span, otherwise it will be a root span. This behavior - // can be overridden by providing `WithNewRoot()` as a SpanOption, causing the - // newly-created Span to be a root span even if `ctx` contains a Span. - // - // When creating a Span it is recommended to provide all known span attributes using - // the `WithAttributes()` SpanOption as samplers will only have access to the - // attributes provided when a Span is created. - // - // Any Span that is created MUST also be ended. This is the responsibility of the user. - // Implementations of this API may leak memory or other resources if Spans are not ended. - Start(ctx context.Context, spanName string, opts ...SpanStartOption) (context.Context, Span) -} diff --git a/vendor/go.opentelemetry.io/otel/trace/tracestate.go b/vendor/go.opentelemetry.io/otel/trace/tracestate.go deleted file mode 100644 index 073adae2fa..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/tracestate.go +++ /dev/null @@ -1,330 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package trace // import "go.opentelemetry.io/otel/trace" - -import ( - "encoding/json" - "fmt" - "strings" -) - -const ( - maxListMembers = 32 - - listDelimiters = "," - memberDelimiter = "=" - - errInvalidKey errorConst = "invalid tracestate key" - errInvalidValue errorConst = "invalid tracestate value" - errInvalidMember errorConst = "invalid tracestate list-member" - errMemberNumber errorConst = "too many list-members in tracestate" - errDuplicate errorConst = "duplicate list-member in tracestate" -) - -type member struct { - Key string - Value string -} - -// according to (chr = %x20 / (nblk-char = %x21-2B / %x2D-3C / %x3E-7E) ) -// means (chr = %x20-2B / %x2D-3C / %x3E-7E) . -func checkValueChar(v byte) bool { - return v >= '\x20' && v <= '\x7e' && v != '\x2c' && v != '\x3d' -} - -// according to (nblk-chr = %x21-2B / %x2D-3C / %x3E-7E) . -func checkValueLast(v byte) bool { - return v >= '\x21' && v <= '\x7e' && v != '\x2c' && v != '\x3d' -} - -// based on the W3C Trace Context specification -// -// value = (0*255(chr)) nblk-chr -// nblk-chr = %x21-2B / %x2D-3C / %x3E-7E -// chr = %x20 / nblk-chr -// -// see https://www.w3.org/TR/trace-context-1/#value -func checkValue(val string) bool { - n := len(val) - if n == 0 || n > 256 { - return false - } - for i := 0; i < n-1; i++ { - if !checkValueChar(val[i]) { - return false - } - } - return checkValueLast(val[n-1]) -} - -func checkKeyRemain(key string) bool { - // ( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) - for _, v := range key { - if isAlphaNum(byte(v)) { - continue - } - switch v { - case '_', '-', '*', '/': - continue - } - return false - } - return true -} - -// according to -// -// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// -// param n is remain part length, should be 255 in simple-key or 13 in system-id. -func checkKeyPart(key string, n int) bool { - if key == "" { - return false - } - first := key[0] // key's first char - ret := len(key[1:]) <= n - ret = ret && first >= 'a' && first <= 'z' - return ret && checkKeyRemain(key[1:]) -} - -func isAlphaNum(c byte) bool { - if c >= 'a' && c <= 'z' { - return true - } - return c >= '0' && c <= '9' -} - -// according to -// -// tenant-id = ( lcalpha / DIGIT ) 0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" ) -// -// param n is remain part length, should be 240 exactly. -func checkKeyTenant(key string, n int) bool { - if key == "" { - return false - } - return isAlphaNum(key[0]) && len(key[1:]) <= n && checkKeyRemain(key[1:]) -} - -// based on the W3C Trace Context specification -// -// key = simple-key / multi-tenant-key -// simple-key = lcalpha (0*255( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// multi-tenant-key = tenant-id "@" system-id -// tenant-id = ( lcalpha / DIGIT ) (0*240( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// system-id = lcalpha (0*13( lcalpha / DIGIT / "_" / "-"/ "*" / "/" )) -// lcalpha = %x61-7A ; a-z -// -// see https://www.w3.org/TR/trace-context-1/#tracestate-header. -func checkKey(key string) bool { - tenant, system, ok := strings.Cut(key, "@") - if !ok { - return checkKeyPart(key, 255) - } - return checkKeyTenant(tenant, 240) && checkKeyPart(system, 13) -} - -func newMember(key, value string) (member, error) { - if !checkKey(key) { - return member{}, errInvalidKey - } - if !checkValue(value) { - return member{}, errInvalidValue - } - return member{Key: key, Value: value}, nil -} - -func parseMember(m string) (member, error) { - key, val, ok := strings.Cut(m, memberDelimiter) - if !ok { - return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) - } - key = strings.TrimLeft(key, " \t") - val = strings.TrimRight(val, " \t") - result, e := newMember(key, val) - if e != nil { - return member{}, fmt.Errorf("%w: %s", errInvalidMember, m) - } - return result, nil -} - -// String encodes member into a string compliant with the W3C Trace Context -// specification. -func (m member) String() string { - return m.Key + "=" + m.Value -} - -// TraceState provides additional vendor-specific trace identification -// information across different distributed tracing systems. It represents an -// immutable list consisting of key/value pairs, each pair is referred to as a -// list-member. -// -// TraceState conforms to the W3C Trace Context specification -// (https://www.w3.org/TR/trace-context-1). All operations that create or copy -// a TraceState do so by validating all input and will only produce TraceState -// that conform to the specification. Specifically, this means that all -// list-member's key/value pairs are valid, no duplicate list-members exist, -// and the maximum number of list-members (32) is not exceeded. -type TraceState struct { //nolint:revive // revive complains about stutter of `trace.TraceState` - // list is the members in order. - list []member -} - -var _ json.Marshaler = TraceState{} - -// ParseTraceState attempts to decode a TraceState from the passed -// string. It returns an error if the input is invalid according to the W3C -// Trace Context specification. -func ParseTraceState(ts string) (TraceState, error) { - if ts == "" { - return TraceState{}, nil - } - - wrapErr := func(err error) error { - return fmt.Errorf("failed to parse tracestate: %w", err) - } - - var members []member - found := make(map[string]struct{}) - for ts != "" { - var memberStr string - memberStr, ts, _ = strings.Cut(ts, listDelimiters) - if memberStr == "" { - continue - } - - m, err := parseMember(memberStr) - if err != nil { - return TraceState{}, wrapErr(err) - } - - if _, ok := found[m.Key]; ok { - return TraceState{}, wrapErr(errDuplicate) - } - found[m.Key] = struct{}{} - - members = append(members, m) - if n := len(members); n > maxListMembers { - return TraceState{}, wrapErr(errMemberNumber) - } - } - - return TraceState{list: members}, nil -} - -// MarshalJSON marshals the TraceState into JSON. -func (ts TraceState) MarshalJSON() ([]byte, error) { - return json.Marshal(ts.String()) -} - -// String encodes the TraceState into a string compliant with the W3C -// Trace Context specification. The returned string will be invalid if the -// TraceState contains any invalid members. -func (ts TraceState) String() string { - if len(ts.list) == 0 { - return "" - } - var n int - n += len(ts.list) // member delimiters: '=' - n += len(ts.list) - 1 // list delimiters: ',' - for _, mem := range ts.list { - n += len(mem.Key) - n += len(mem.Value) - } - - var sb strings.Builder - sb.Grow(n) - _, _ = sb.WriteString(ts.list[0].Key) - _ = sb.WriteByte('=') - _, _ = sb.WriteString(ts.list[0].Value) - for i := 1; i < len(ts.list); i++ { - _ = sb.WriteByte(listDelimiters[0]) - _, _ = sb.WriteString(ts.list[i].Key) - _ = sb.WriteByte('=') - _, _ = sb.WriteString(ts.list[i].Value) - } - return sb.String() -} - -// Get returns the value paired with key from the corresponding TraceState -// list-member if it exists, otherwise an empty string is returned. -func (ts TraceState) Get(key string) string { - for _, member := range ts.list { - if member.Key == key { - return member.Value - } - } - - return "" -} - -// Walk walks all key value pairs in the TraceState by calling f -// Iteration stops if f returns false. -func (ts TraceState) Walk(f func(key, value string) bool) { - for _, m := range ts.list { - if !f(m.Key, m.Value) { - break - } - } -} - -// Insert adds a new list-member defined by the key/value pair to the -// TraceState. If a list-member already exists for the given key, that -// list-member's value is updated. The new or updated list-member is always -// moved to the beginning of the TraceState as specified by the W3C Trace -// Context specification. -// -// If key or value are invalid according to the W3C Trace Context -// specification an error is returned with the original TraceState. -// -// If adding a new list-member means the TraceState would have more members -// then is allowed, the new list-member will be inserted and the right-most -// list-member will be dropped in the returned TraceState. -func (ts TraceState) Insert(key, value string) (TraceState, error) { - m, err := newMember(key, value) - if err != nil { - return ts, err - } - n := len(ts.list) - found := n - for i := range ts.list { - if ts.list[i].Key == key { - found = i - } - } - cTS := TraceState{} - if found == n && n < maxListMembers { - cTS.list = make([]member, n+1) - } else { - cTS.list = make([]member, n) - } - cTS.list[0] = m - // When the number of members exceeds capacity, drop the "right-most". - copy(cTS.list[1:], ts.list[0:found]) - if found < n { - copy(cTS.list[1+found:], ts.list[found+1:]) - } - return cTS, nil -} - -// Delete returns a copy of the TraceState with the list-member identified by -// key removed. -func (ts TraceState) Delete(key string) TraceState { - members := make([]member, ts.Len()) - copy(members, ts.list) - for i, member := range ts.list { - if member.Key == key { - members = append(members[:i], members[i+1:]...) - // TraceState should contain no duplicate members. - break - } - } - return TraceState{list: members} -} - -// Len returns the number of list-members in the TraceState. -func (ts TraceState) Len() int { - return len(ts.list) -} diff --git a/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh b/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh deleted file mode 100644 index c9b7cdbbfe..0000000000 --- a/vendor/go.opentelemetry.io/otel/verify_released_changelog.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -set -euo pipefail - -TARGET="${1:?Must provide target ref}" - -FILE="CHANGELOG.md" -TEMP_DIR=$(mktemp -d) -echo "Temp folder: $TEMP_DIR" - -# Only the latest commit of the feature branch is available -# automatically. To diff with the base branch, we need to -# fetch that too (and we only need its latest commit). -git fetch origin "${TARGET}" --depth=1 - -# Checkout the previous version on the base branch of the changelog to tmpfolder -git --work-tree="$TEMP_DIR" checkout FETCH_HEAD $FILE - -PREVIOUS_FILE="$TEMP_DIR/$FILE" -CURRENT_FILE="$FILE" -PREVIOUS_LOCKED_FILE="$TEMP_DIR/previous_locked_section.md" -CURRENT_LOCKED_FILE="$TEMP_DIR/current_locked_section.md" - -# Extract released sections from the previous version -awk '/^/ {flag=1} /^/ {flag=0} flag' "$PREVIOUS_FILE" > "$PREVIOUS_LOCKED_FILE" - -# Extract released sections from the current version -awk '/^/ {flag=1} /^/ {flag=0} flag' "$CURRENT_FILE" > "$CURRENT_LOCKED_FILE" - -# Compare the released sections -if ! diff -q "$PREVIOUS_LOCKED_FILE" "$CURRENT_LOCKED_FILE"; then - echo "Error: The released sections of the changelog file have been modified." - diff "$PREVIOUS_LOCKED_FILE" "$CURRENT_LOCKED_FILE" - rm -rf "$TEMP_DIR" - false -fi - -rm -rf "$TEMP_DIR" -echo "The released sections remain unchanged." diff --git a/vendor/go.opentelemetry.io/otel/version.go b/vendor/go.opentelemetry.io/otel/version.go deleted file mode 100644 index 0d5b029187..0000000000 --- a/vendor/go.opentelemetry.io/otel/version.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package otel // import "go.opentelemetry.io/otel" - -// Version is the current release version of OpenTelemetry in use. -func Version() string { - return "1.39.0" -} diff --git a/vendor/go.opentelemetry.io/otel/versions.yaml b/vendor/go.opentelemetry.io/otel/versions.yaml deleted file mode 100644 index f4a3893eb5..0000000000 --- a/vendor/go.opentelemetry.io/otel/versions.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright The OpenTelemetry Authors -# SPDX-License-Identifier: Apache-2.0 - -module-sets: - stable-v1: - version: v1.39.0 - modules: - - go.opentelemetry.io/otel - - go.opentelemetry.io/otel/bridge/opencensus - - go.opentelemetry.io/otel/bridge/opencensus/test - - go.opentelemetry.io/otel/bridge/opentracing - - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc - - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp - - go.opentelemetry.io/otel/exporters/otlp/otlptrace - - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc - - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp - - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric - - go.opentelemetry.io/otel/exporters/stdout/stdouttrace - - go.opentelemetry.io/otel/exporters/zipkin - - go.opentelemetry.io/otel/metric - - go.opentelemetry.io/otel/sdk - - go.opentelemetry.io/otel/sdk/metric - - go.opentelemetry.io/otel/trace - experimental-metrics: - version: v0.61.0 - modules: - - go.opentelemetry.io/otel/exporters/prometheus - experimental-logs: - version: v0.15.0 - modules: - - go.opentelemetry.io/otel/log - - go.opentelemetry.io/otel/log/logtest - - go.opentelemetry.io/otel/sdk/log - - go.opentelemetry.io/otel/sdk/log/logtest - - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc - - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp - - go.opentelemetry.io/otel/exporters/stdout/stdoutlog - experimental-schema: - version: v0.0.14 - modules: - - go.opentelemetry.io/otel/schema -excluded-modules: - - go.opentelemetry.io/otel/internal/tools - - go.opentelemetry.io/otel/trace/internal/telemetry/test -modules: - go.opentelemetry.io/otel/exporters/stdout/stdouttrace: - version-refs: - - ./internal/version.go - go.opentelemetry.io/otel/exporters/prometheus: - version-refs: - - ./internal/version.go - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc: - version-refs: - - ./internal/version.go - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc: - version-refs: - - ./internal/version.go - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp: - version-refs: - - ./internal/version.go - go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploghttp: - version-refs: - - ./internal/version.go diff --git a/vendor/go.uber.org/atomic/.codecov.yml b/vendor/go.uber.org/atomic/.codecov.yml deleted file mode 100644 index 571116cc39..0000000000 --- a/vendor/go.uber.org/atomic/.codecov.yml +++ /dev/null @@ -1,19 +0,0 @@ -coverage: - range: 80..100 - round: down - precision: 2 - - status: - project: # measuring the overall project coverage - default: # context, you can create multiple ones with custom titles - enabled: yes # must be yes|true to enable this status - target: 100 # specify the target coverage for each commit status - # option: "auto" (must increase from parent commit or pull request base) - # option: "X%" a static target percentage to hit - if_not_found: success # if parent is not found report status as success, error, or failure - if_ci_failed: error # if ci fails report status as success, error, or failure - -# Also update COVER_IGNORE_PKGS in the Makefile. -ignore: - - /internal/gen-atomicint/ - - /internal/gen-valuewrapper/ diff --git a/vendor/go.uber.org/atomic/.gitignore b/vendor/go.uber.org/atomic/.gitignore deleted file mode 100644 index 2e337a0ed5..0000000000 --- a/vendor/go.uber.org/atomic/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -/bin -.DS_Store -/vendor -cover.html -cover.out -lint.log - -# Binaries -*.test - -# Profiling output -*.prof - -# Output of fossa analyzer -/fossa diff --git a/vendor/go.uber.org/atomic/CHANGELOG.md b/vendor/go.uber.org/atomic/CHANGELOG.md deleted file mode 100644 index 6f87f33fa9..0000000000 --- a/vendor/go.uber.org/atomic/CHANGELOG.md +++ /dev/null @@ -1,127 +0,0 @@ -# Changelog -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.11.0] - 2023-05-02 -### Fixed -- Fix initialization of `Value` wrappers. - -### Added -- Add `String` method to `atomic.Pointer[T]` type allowing users to safely print -underlying values of pointers. - -[1.11.0]: https://github.com/uber-go/atomic/compare/v1.10.0...v1.11.0 - -## [1.10.0] - 2022-08-11 -### Added -- Add `atomic.Float32` type for atomic operations on `float32`. -- Add `CompareAndSwap` and `Swap` methods to `atomic.String`, `atomic.Error`, - and `atomic.Value`. -- Add generic `atomic.Pointer[T]` type for atomic operations on pointers of any - type. This is present only for Go 1.18 or higher, and is a drop-in for - replacement for the standard library's `sync/atomic.Pointer` type. - -### Changed -- Deprecate `CAS` methods on all types in favor of corresponding - `CompareAndSwap` methods. - -Thanks to @eNV25 and @icpd for their contributions to this release. - -[1.10.0]: https://github.com/uber-go/atomic/compare/v1.9.0...v1.10.0 - -## [1.9.0] - 2021-07-15 -### Added -- Add `Float64.Swap` to match int atomic operations. -- Add `atomic.Time` type for atomic operations on `time.Time` values. - -[1.9.0]: https://github.com/uber-go/atomic/compare/v1.8.0...v1.9.0 - -## [1.8.0] - 2021-06-09 -### Added -- Add `atomic.Uintptr` type for atomic operations on `uintptr` values. -- Add `atomic.UnsafePointer` type for atomic operations on `unsafe.Pointer` values. - -[1.8.0]: https://github.com/uber-go/atomic/compare/v1.7.0...v1.8.0 - -## [1.7.0] - 2020-09-14 -### Added -- Support JSON serialization and deserialization of primitive atomic types. -- Support Text marshalling and unmarshalling for string atomics. - -### Changed -- Disallow incorrect comparison of atomic values in a non-atomic way. - -### Removed -- Remove dependency on `golang.org/x/{lint, tools}`. - -[1.7.0]: https://github.com/uber-go/atomic/compare/v1.6.0...v1.7.0 - -## [1.6.0] - 2020-02-24 -### Changed -- Drop library dependency on `golang.org/x/{lint, tools}`. - -[1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0 - -## [1.5.1] - 2019-11-19 -- Fix bug where `Bool.CAS` and `Bool.Toggle` do work correctly together - causing `CAS` to fail even though the old value matches. - -[1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1 - -## [1.5.0] - 2019-10-29 -### Changed -- With Go modules, only the `go.uber.org/atomic` import path is supported now. - If you need to use the old import path, please add a `replace` directive to - your `go.mod`. - -[1.5.0]: https://github.com/uber-go/atomic/compare/v1.4.0...v1.5.0 - -## [1.4.0] - 2019-05-01 -### Added - - Add `atomic.Error` type for atomic operations on `error` values. - -[1.4.0]: https://github.com/uber-go/atomic/compare/v1.3.2...v1.4.0 - -## [1.3.2] - 2018-05-02 -### Added -- Add `atomic.Duration` type for atomic operations on `time.Duration` values. - -[1.3.2]: https://github.com/uber-go/atomic/compare/v1.3.1...v1.3.2 - -## [1.3.1] - 2017-11-14 -### Fixed -- Revert optimization for `atomic.String.Store("")` which caused data races. - -[1.3.1]: https://github.com/uber-go/atomic/compare/v1.3.0...v1.3.1 - -## [1.3.0] - 2017-11-13 -### Added -- Add `atomic.Bool.CAS` for compare-and-swap semantics on bools. - -### Changed -- Optimize `atomic.String.Store("")` by avoiding an allocation. - -[1.3.0]: https://github.com/uber-go/atomic/compare/v1.2.0...v1.3.0 - -## [1.2.0] - 2017-04-12 -### Added -- Shadow `atomic.Value` from `sync/atomic`. - -[1.2.0]: https://github.com/uber-go/atomic/compare/v1.1.0...v1.2.0 - -## [1.1.0] - 2017-03-10 -### Added -- Add atomic `Float64` type. - -### Changed -- Support new `go.uber.org/atomic` import path. - -[1.1.0]: https://github.com/uber-go/atomic/compare/v1.0.0...v1.1.0 - -## [1.0.0] - 2016-07-18 - -- Initial release. - -[1.0.0]: https://github.com/uber-go/atomic/releases/tag/v1.0.0 diff --git a/vendor/go.uber.org/atomic/LICENSE.txt b/vendor/go.uber.org/atomic/LICENSE.txt deleted file mode 100644 index 8765c9fbc6..0000000000 --- a/vendor/go.uber.org/atomic/LICENSE.txt +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2016 Uber Technologies, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/vendor/go.uber.org/atomic/Makefile b/vendor/go.uber.org/atomic/Makefile deleted file mode 100644 index 46c945b32b..0000000000 --- a/vendor/go.uber.org/atomic/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# Directory to place `go install`ed binaries into. -export GOBIN ?= $(shell pwd)/bin - -GOLINT = $(GOBIN)/golint -GEN_ATOMICINT = $(GOBIN)/gen-atomicint -GEN_ATOMICWRAPPER = $(GOBIN)/gen-atomicwrapper -STATICCHECK = $(GOBIN)/staticcheck - -GO_FILES ?= $(shell find . '(' -path .git -o -path vendor ')' -prune -o -name '*.go' -print) - -# Also update ignore section in .codecov.yml. -COVER_IGNORE_PKGS = \ - go.uber.org/atomic/internal/gen-atomicint \ - go.uber.org/atomic/internal/gen-atomicwrapper - -.PHONY: build -build: - go build ./... - -.PHONY: test -test: - go test -race ./... - -.PHONY: gofmt -gofmt: - $(eval FMT_LOG := $(shell mktemp -t gofmt.XXXXX)) - gofmt -e -s -l $(GO_FILES) > $(FMT_LOG) || true - @[ ! -s "$(FMT_LOG)" ] || (echo "gofmt failed:" && cat $(FMT_LOG) && false) - -$(GOLINT): - cd tools && go install golang.org/x/lint/golint - -$(STATICCHECK): - cd tools && go install honnef.co/go/tools/cmd/staticcheck - -$(GEN_ATOMICWRAPPER): $(wildcard ./internal/gen-atomicwrapper/*) - go build -o $@ ./internal/gen-atomicwrapper - -$(GEN_ATOMICINT): $(wildcard ./internal/gen-atomicint/*) - go build -o $@ ./internal/gen-atomicint - -.PHONY: golint -golint: $(GOLINT) - $(GOLINT) ./... - -.PHONY: staticcheck -staticcheck: $(STATICCHECK) - $(STATICCHECK) ./... - -.PHONY: lint -lint: gofmt golint staticcheck generatenodirty - -# comma separated list of packages to consider for code coverage. -COVER_PKG = $(shell \ - go list -find ./... | \ - grep -v $(foreach pkg,$(COVER_IGNORE_PKGS),-e "^$(pkg)$$") | \ - paste -sd, -) - -.PHONY: cover -cover: - go test -coverprofile=cover.out -coverpkg $(COVER_PKG) -v ./... - go tool cover -html=cover.out -o cover.html - -.PHONY: generate -generate: $(GEN_ATOMICINT) $(GEN_ATOMICWRAPPER) - go generate ./... - -.PHONY: generatenodirty -generatenodirty: - @[ -z "$$(git status --porcelain)" ] || ( \ - echo "Working tree is dirty. Commit your changes first."; \ - git status; \ - exit 1 ) - @make generate - @status=$$(git status --porcelain); \ - [ -z "$$status" ] || ( \ - echo "Working tree is dirty after `make generate`:"; \ - echo "$$status"; \ - echo "Please ensure that the generated code is up-to-date." ) diff --git a/vendor/go.uber.org/atomic/README.md b/vendor/go.uber.org/atomic/README.md deleted file mode 100644 index 96b47a1f12..0000000000 --- a/vendor/go.uber.org/atomic/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][reportcard-img]][reportcard] - -Simple wrappers for primitive types to enforce atomic access. - -## Installation - -```shell -$ go get -u go.uber.org/atomic@v1 -``` - -### Legacy Import Path - -As of v1.5.0, the import path `go.uber.org/atomic` is the only supported way -of using this package. If you are using Go modules, this package will fail to -compile with the legacy import path path `github.com/uber-go/atomic`. - -We recommend migrating your code to the new import path but if you're unable -to do so, or if your dependencies are still using the old import path, you -will have to add a `replace` directive to your `go.mod` file downgrading the -legacy import path to an older version. - -``` -replace github.com/uber-go/atomic => github.com/uber-go/atomic v1.4.0 -``` - -You can do so automatically by running the following command. - -```shell -$ go mod edit -replace github.com/uber-go/atomic=github.com/uber-go/atomic@v1.4.0 -``` - -## Usage - -The standard library's `sync/atomic` is powerful, but it's easy to forget which -variables must be accessed atomically. `go.uber.org/atomic` preserves all the -functionality of the standard library, but wraps the primitive types to -provide a safer, more convenient API. - -```go -var atom atomic.Uint32 -atom.Store(42) -atom.Sub(2) -atom.CAS(40, 11) -``` - -See the [documentation][doc] for a complete API specification. - -## Development Status - -Stable. - ---- - -Released under the [MIT License](LICENSE.txt). - -[doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg -[doc]: https://godoc.org/go.uber.org/atomic -[ci-img]: https://github.com/uber-go/atomic/actions/workflows/go.yml/badge.svg -[ci]: https://github.com/uber-go/atomic/actions/workflows/go.yml -[cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg -[cov]: https://codecov.io/gh/uber-go/atomic -[reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic -[reportcard]: https://goreportcard.com/report/go.uber.org/atomic diff --git a/vendor/go.uber.org/atomic/bool.go b/vendor/go.uber.org/atomic/bool.go deleted file mode 100644 index f0a2ddd148..0000000000 --- a/vendor/go.uber.org/atomic/bool.go +++ /dev/null @@ -1,88 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" -) - -// Bool is an atomic type-safe wrapper for bool values. -type Bool struct { - _ nocmp // disallow non-atomic comparison - - v Uint32 -} - -var _zeroBool bool - -// NewBool creates a new Bool. -func NewBool(val bool) *Bool { - x := &Bool{} - if val != _zeroBool { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped bool. -func (x *Bool) Load() bool { - return truthy(x.v.Load()) -} - -// Store atomically stores the passed bool. -func (x *Bool) Store(val bool) { - x.v.Store(boolToInt(val)) -} - -// CAS is an atomic compare-and-swap for bool values. -// -// Deprecated: Use CompareAndSwap. -func (x *Bool) CAS(old, new bool) (swapped bool) { - return x.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap for bool values. -func (x *Bool) CompareAndSwap(old, new bool) (swapped bool) { - return x.v.CompareAndSwap(boolToInt(old), boolToInt(new)) -} - -// Swap atomically stores the given bool and returns the old -// value. -func (x *Bool) Swap(val bool) (old bool) { - return truthy(x.v.Swap(boolToInt(val))) -} - -// MarshalJSON encodes the wrapped bool into JSON. -func (x *Bool) MarshalJSON() ([]byte, error) { - return json.Marshal(x.Load()) -} - -// UnmarshalJSON decodes a bool from JSON. -func (x *Bool) UnmarshalJSON(b []byte) error { - var v bool - if err := json.Unmarshal(b, &v); err != nil { - return err - } - x.Store(v) - return nil -} diff --git a/vendor/go.uber.org/atomic/bool_ext.go b/vendor/go.uber.org/atomic/bool_ext.go deleted file mode 100644 index a2e60e9873..0000000000 --- a/vendor/go.uber.org/atomic/bool_ext.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "strconv" -) - -//go:generate bin/gen-atomicwrapper -name=Bool -type=bool -wrapped=Uint32 -pack=boolToInt -unpack=truthy -cas -swap -json -file=bool.go - -func truthy(n uint32) bool { - return n == 1 -} - -func boolToInt(b bool) uint32 { - if b { - return 1 - } - return 0 -} - -// Toggle atomically negates the Boolean and returns the previous value. -func (b *Bool) Toggle() (old bool) { - for { - old := b.Load() - if b.CAS(old, !old) { - return old - } - } -} - -// String encodes the wrapped value as a string. -func (b *Bool) String() string { - return strconv.FormatBool(b.Load()) -} diff --git a/vendor/go.uber.org/atomic/doc.go b/vendor/go.uber.org/atomic/doc.go deleted file mode 100644 index ae7390ee68..0000000000 --- a/vendor/go.uber.org/atomic/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// Package atomic provides simple wrappers around numerics to enforce atomic -// access. -package atomic diff --git a/vendor/go.uber.org/atomic/duration.go b/vendor/go.uber.org/atomic/duration.go deleted file mode 100644 index 7c23868fc8..0000000000 --- a/vendor/go.uber.org/atomic/duration.go +++ /dev/null @@ -1,89 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "time" -) - -// Duration is an atomic type-safe wrapper for time.Duration values. -type Duration struct { - _ nocmp // disallow non-atomic comparison - - v Int64 -} - -var _zeroDuration time.Duration - -// NewDuration creates a new Duration. -func NewDuration(val time.Duration) *Duration { - x := &Duration{} - if val != _zeroDuration { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped time.Duration. -func (x *Duration) Load() time.Duration { - return time.Duration(x.v.Load()) -} - -// Store atomically stores the passed time.Duration. -func (x *Duration) Store(val time.Duration) { - x.v.Store(int64(val)) -} - -// CAS is an atomic compare-and-swap for time.Duration values. -// -// Deprecated: Use CompareAndSwap. -func (x *Duration) CAS(old, new time.Duration) (swapped bool) { - return x.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap for time.Duration values. -func (x *Duration) CompareAndSwap(old, new time.Duration) (swapped bool) { - return x.v.CompareAndSwap(int64(old), int64(new)) -} - -// Swap atomically stores the given time.Duration and returns the old -// value. -func (x *Duration) Swap(val time.Duration) (old time.Duration) { - return time.Duration(x.v.Swap(int64(val))) -} - -// MarshalJSON encodes the wrapped time.Duration into JSON. -func (x *Duration) MarshalJSON() ([]byte, error) { - return json.Marshal(x.Load()) -} - -// UnmarshalJSON decodes a time.Duration from JSON. -func (x *Duration) UnmarshalJSON(b []byte) error { - var v time.Duration - if err := json.Unmarshal(b, &v); err != nil { - return err - } - x.Store(v) - return nil -} diff --git a/vendor/go.uber.org/atomic/duration_ext.go b/vendor/go.uber.org/atomic/duration_ext.go deleted file mode 100644 index 4c18b0a9ed..0000000000 --- a/vendor/go.uber.org/atomic/duration_ext.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import "time" - -//go:generate bin/gen-atomicwrapper -name=Duration -type=time.Duration -wrapped=Int64 -pack=int64 -unpack=time.Duration -cas -swap -json -imports time -file=duration.go - -// Add atomically adds to the wrapped time.Duration and returns the new value. -func (d *Duration) Add(delta time.Duration) time.Duration { - return time.Duration(d.v.Add(int64(delta))) -} - -// Sub atomically subtracts from the wrapped time.Duration and returns the new value. -func (d *Duration) Sub(delta time.Duration) time.Duration { - return time.Duration(d.v.Sub(int64(delta))) -} - -// String encodes the wrapped value as a string. -func (d *Duration) String() string { - return d.Load().String() -} diff --git a/vendor/go.uber.org/atomic/error.go b/vendor/go.uber.org/atomic/error.go deleted file mode 100644 index b7e3f1291a..0000000000 --- a/vendor/go.uber.org/atomic/error.go +++ /dev/null @@ -1,72 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -// Error is an atomic type-safe wrapper for error values. -type Error struct { - _ nocmp // disallow non-atomic comparison - - v Value -} - -var _zeroError error - -// NewError creates a new Error. -func NewError(val error) *Error { - x := &Error{} - if val != _zeroError { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped error. -func (x *Error) Load() error { - return unpackError(x.v.Load()) -} - -// Store atomically stores the passed error. -func (x *Error) Store(val error) { - x.v.Store(packError(val)) -} - -// CompareAndSwap is an atomic compare-and-swap for error values. -func (x *Error) CompareAndSwap(old, new error) (swapped bool) { - if x.v.CompareAndSwap(packError(old), packError(new)) { - return true - } - - if old == _zeroError { - // If the old value is the empty value, then it's possible the - // underlying Value hasn't been set and is nil, so retry with nil. - return x.v.CompareAndSwap(nil, packError(new)) - } - - return false -} - -// Swap atomically stores the given error and returns the old -// value. -func (x *Error) Swap(val error) (old error) { - return unpackError(x.v.Swap(packError(val))) -} diff --git a/vendor/go.uber.org/atomic/error_ext.go b/vendor/go.uber.org/atomic/error_ext.go deleted file mode 100644 index d31fb633bb..0000000000 --- a/vendor/go.uber.org/atomic/error_ext.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2020-2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -// atomic.Value panics on nil inputs, or if the underlying type changes. -// Stabilize by always storing a custom struct that we control. - -//go:generate bin/gen-atomicwrapper -name=Error -type=error -wrapped=Value -pack=packError -unpack=unpackError -compareandswap -swap -file=error.go - -type packedError struct{ Value error } - -func packError(v error) interface{} { - return packedError{v} -} - -func unpackError(v interface{}) error { - if err, ok := v.(packedError); ok { - return err.Value - } - return nil -} diff --git a/vendor/go.uber.org/atomic/float32.go b/vendor/go.uber.org/atomic/float32.go deleted file mode 100644 index 62c36334fd..0000000000 --- a/vendor/go.uber.org/atomic/float32.go +++ /dev/null @@ -1,77 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "math" -) - -// Float32 is an atomic type-safe wrapper for float32 values. -type Float32 struct { - _ nocmp // disallow non-atomic comparison - - v Uint32 -} - -var _zeroFloat32 float32 - -// NewFloat32 creates a new Float32. -func NewFloat32(val float32) *Float32 { - x := &Float32{} - if val != _zeroFloat32 { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped float32. -func (x *Float32) Load() float32 { - return math.Float32frombits(x.v.Load()) -} - -// Store atomically stores the passed float32. -func (x *Float32) Store(val float32) { - x.v.Store(math.Float32bits(val)) -} - -// Swap atomically stores the given float32 and returns the old -// value. -func (x *Float32) Swap(val float32) (old float32) { - return math.Float32frombits(x.v.Swap(math.Float32bits(val))) -} - -// MarshalJSON encodes the wrapped float32 into JSON. -func (x *Float32) MarshalJSON() ([]byte, error) { - return json.Marshal(x.Load()) -} - -// UnmarshalJSON decodes a float32 from JSON. -func (x *Float32) UnmarshalJSON(b []byte) error { - var v float32 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - x.Store(v) - return nil -} diff --git a/vendor/go.uber.org/atomic/float32_ext.go b/vendor/go.uber.org/atomic/float32_ext.go deleted file mode 100644 index b0cd8d9c82..0000000000 --- a/vendor/go.uber.org/atomic/float32_ext.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2020-2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "math" - "strconv" -) - -//go:generate bin/gen-atomicwrapper -name=Float32 -type=float32 -wrapped=Uint32 -pack=math.Float32bits -unpack=math.Float32frombits -swap -json -imports math -file=float32.go - -// Add atomically adds to the wrapped float32 and returns the new value. -func (f *Float32) Add(delta float32) float32 { - for { - old := f.Load() - new := old + delta - if f.CAS(old, new) { - return new - } - } -} - -// Sub atomically subtracts from the wrapped float32 and returns the new value. -func (f *Float32) Sub(delta float32) float32 { - return f.Add(-delta) -} - -// CAS is an atomic compare-and-swap for float32 values. -// -// Deprecated: Use CompareAndSwap -func (f *Float32) CAS(old, new float32) (swapped bool) { - return f.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap for float32 values. -// -// Note: CompareAndSwap handles NaN incorrectly. NaN != NaN using Go's inbuilt operators -// but CompareAndSwap allows a stored NaN to compare equal to a passed in NaN. -// This avoids typical CompareAndSwap loops from blocking forever, e.g., -// -// for { -// old := atom.Load() -// new = f(old) -// if atom.CompareAndSwap(old, new) { -// break -// } -// } -// -// If CompareAndSwap did not match NaN to match, then the above would loop forever. -func (f *Float32) CompareAndSwap(old, new float32) (swapped bool) { - return f.v.CompareAndSwap(math.Float32bits(old), math.Float32bits(new)) -} - -// String encodes the wrapped value as a string. -func (f *Float32) String() string { - // 'g' is the behavior for floats with %v. - return strconv.FormatFloat(float64(f.Load()), 'g', -1, 32) -} diff --git a/vendor/go.uber.org/atomic/float64.go b/vendor/go.uber.org/atomic/float64.go deleted file mode 100644 index 5bc11caabe..0000000000 --- a/vendor/go.uber.org/atomic/float64.go +++ /dev/null @@ -1,77 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "math" -) - -// Float64 is an atomic type-safe wrapper for float64 values. -type Float64 struct { - _ nocmp // disallow non-atomic comparison - - v Uint64 -} - -var _zeroFloat64 float64 - -// NewFloat64 creates a new Float64. -func NewFloat64(val float64) *Float64 { - x := &Float64{} - if val != _zeroFloat64 { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped float64. -func (x *Float64) Load() float64 { - return math.Float64frombits(x.v.Load()) -} - -// Store atomically stores the passed float64. -func (x *Float64) Store(val float64) { - x.v.Store(math.Float64bits(val)) -} - -// Swap atomically stores the given float64 and returns the old -// value. -func (x *Float64) Swap(val float64) (old float64) { - return math.Float64frombits(x.v.Swap(math.Float64bits(val))) -} - -// MarshalJSON encodes the wrapped float64 into JSON. -func (x *Float64) MarshalJSON() ([]byte, error) { - return json.Marshal(x.Load()) -} - -// UnmarshalJSON decodes a float64 from JSON. -func (x *Float64) UnmarshalJSON(b []byte) error { - var v float64 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - x.Store(v) - return nil -} diff --git a/vendor/go.uber.org/atomic/float64_ext.go b/vendor/go.uber.org/atomic/float64_ext.go deleted file mode 100644 index 48c52b0abf..0000000000 --- a/vendor/go.uber.org/atomic/float64_ext.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2020-2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "math" - "strconv" -) - -//go:generate bin/gen-atomicwrapper -name=Float64 -type=float64 -wrapped=Uint64 -pack=math.Float64bits -unpack=math.Float64frombits -swap -json -imports math -file=float64.go - -// Add atomically adds to the wrapped float64 and returns the new value. -func (f *Float64) Add(delta float64) float64 { - for { - old := f.Load() - new := old + delta - if f.CAS(old, new) { - return new - } - } -} - -// Sub atomically subtracts from the wrapped float64 and returns the new value. -func (f *Float64) Sub(delta float64) float64 { - return f.Add(-delta) -} - -// CAS is an atomic compare-and-swap for float64 values. -// -// Deprecated: Use CompareAndSwap -func (f *Float64) CAS(old, new float64) (swapped bool) { - return f.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap for float64 values. -// -// Note: CompareAndSwap handles NaN incorrectly. NaN != NaN using Go's inbuilt operators -// but CompareAndSwap allows a stored NaN to compare equal to a passed in NaN. -// This avoids typical CompareAndSwap loops from blocking forever, e.g., -// -// for { -// old := atom.Load() -// new = f(old) -// if atom.CompareAndSwap(old, new) { -// break -// } -// } -// -// If CompareAndSwap did not match NaN to match, then the above would loop forever. -func (f *Float64) CompareAndSwap(old, new float64) (swapped bool) { - return f.v.CompareAndSwap(math.Float64bits(old), math.Float64bits(new)) -} - -// String encodes the wrapped value as a string. -func (f *Float64) String() string { - // 'g' is the behavior for floats with %v. - return strconv.FormatFloat(f.Load(), 'g', -1, 64) -} diff --git a/vendor/go.uber.org/atomic/gen.go b/vendor/go.uber.org/atomic/gen.go deleted file mode 100644 index 1e9ef4f879..0000000000 --- a/vendor/go.uber.org/atomic/gen.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -//go:generate bin/gen-atomicint -name=Int32 -wrapped=int32 -file=int32.go -//go:generate bin/gen-atomicint -name=Int64 -wrapped=int64 -file=int64.go -//go:generate bin/gen-atomicint -name=Uint32 -wrapped=uint32 -unsigned -file=uint32.go -//go:generate bin/gen-atomicint -name=Uint64 -wrapped=uint64 -unsigned -file=uint64.go -//go:generate bin/gen-atomicint -name=Uintptr -wrapped=uintptr -unsigned -file=uintptr.go diff --git a/vendor/go.uber.org/atomic/int32.go b/vendor/go.uber.org/atomic/int32.go deleted file mode 100644 index 5320eac10f..0000000000 --- a/vendor/go.uber.org/atomic/int32.go +++ /dev/null @@ -1,109 +0,0 @@ -// @generated Code generated by gen-atomicint. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "strconv" - "sync/atomic" -) - -// Int32 is an atomic wrapper around int32. -type Int32 struct { - _ nocmp // disallow non-atomic comparison - - v int32 -} - -// NewInt32 creates a new Int32. -func NewInt32(val int32) *Int32 { - return &Int32{v: val} -} - -// Load atomically loads the wrapped value. -func (i *Int32) Load() int32 { - return atomic.LoadInt32(&i.v) -} - -// Add atomically adds to the wrapped int32 and returns the new value. -func (i *Int32) Add(delta int32) int32 { - return atomic.AddInt32(&i.v, delta) -} - -// Sub atomically subtracts from the wrapped int32 and returns the new value. -func (i *Int32) Sub(delta int32) int32 { - return atomic.AddInt32(&i.v, -delta) -} - -// Inc atomically increments the wrapped int32 and returns the new value. -func (i *Int32) Inc() int32 { - return i.Add(1) -} - -// Dec atomically decrements the wrapped int32 and returns the new value. -func (i *Int32) Dec() int32 { - return i.Sub(1) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap. -func (i *Int32) CAS(old, new int32) (swapped bool) { - return i.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (i *Int32) CompareAndSwap(old, new int32) (swapped bool) { - return atomic.CompareAndSwapInt32(&i.v, old, new) -} - -// Store atomically stores the passed value. -func (i *Int32) Store(val int32) { - atomic.StoreInt32(&i.v, val) -} - -// Swap atomically swaps the wrapped int32 and returns the old value. -func (i *Int32) Swap(val int32) (old int32) { - return atomic.SwapInt32(&i.v, val) -} - -// MarshalJSON encodes the wrapped int32 into JSON. -func (i *Int32) MarshalJSON() ([]byte, error) { - return json.Marshal(i.Load()) -} - -// UnmarshalJSON decodes JSON into the wrapped int32. -func (i *Int32) UnmarshalJSON(b []byte) error { - var v int32 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - i.Store(v) - return nil -} - -// String encodes the wrapped value as a string. -func (i *Int32) String() string { - v := i.Load() - return strconv.FormatInt(int64(v), 10) -} diff --git a/vendor/go.uber.org/atomic/int64.go b/vendor/go.uber.org/atomic/int64.go deleted file mode 100644 index 460821d009..0000000000 --- a/vendor/go.uber.org/atomic/int64.go +++ /dev/null @@ -1,109 +0,0 @@ -// @generated Code generated by gen-atomicint. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "strconv" - "sync/atomic" -) - -// Int64 is an atomic wrapper around int64. -type Int64 struct { - _ nocmp // disallow non-atomic comparison - - v int64 -} - -// NewInt64 creates a new Int64. -func NewInt64(val int64) *Int64 { - return &Int64{v: val} -} - -// Load atomically loads the wrapped value. -func (i *Int64) Load() int64 { - return atomic.LoadInt64(&i.v) -} - -// Add atomically adds to the wrapped int64 and returns the new value. -func (i *Int64) Add(delta int64) int64 { - return atomic.AddInt64(&i.v, delta) -} - -// Sub atomically subtracts from the wrapped int64 and returns the new value. -func (i *Int64) Sub(delta int64) int64 { - return atomic.AddInt64(&i.v, -delta) -} - -// Inc atomically increments the wrapped int64 and returns the new value. -func (i *Int64) Inc() int64 { - return i.Add(1) -} - -// Dec atomically decrements the wrapped int64 and returns the new value. -func (i *Int64) Dec() int64 { - return i.Sub(1) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap. -func (i *Int64) CAS(old, new int64) (swapped bool) { - return i.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (i *Int64) CompareAndSwap(old, new int64) (swapped bool) { - return atomic.CompareAndSwapInt64(&i.v, old, new) -} - -// Store atomically stores the passed value. -func (i *Int64) Store(val int64) { - atomic.StoreInt64(&i.v, val) -} - -// Swap atomically swaps the wrapped int64 and returns the old value. -func (i *Int64) Swap(val int64) (old int64) { - return atomic.SwapInt64(&i.v, val) -} - -// MarshalJSON encodes the wrapped int64 into JSON. -func (i *Int64) MarshalJSON() ([]byte, error) { - return json.Marshal(i.Load()) -} - -// UnmarshalJSON decodes JSON into the wrapped int64. -func (i *Int64) UnmarshalJSON(b []byte) error { - var v int64 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - i.Store(v) - return nil -} - -// String encodes the wrapped value as a string. -func (i *Int64) String() string { - v := i.Load() - return strconv.FormatInt(int64(v), 10) -} diff --git a/vendor/go.uber.org/atomic/nocmp.go b/vendor/go.uber.org/atomic/nocmp.go deleted file mode 100644 index 54b74174ab..0000000000 --- a/vendor/go.uber.org/atomic/nocmp.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -// nocmp is an uncomparable struct. Embed this inside another struct to make -// it uncomparable. -// -// type Foo struct { -// nocmp -// // ... -// } -// -// This DOES NOT: -// -// - Disallow shallow copies of structs -// - Disallow comparison of pointers to uncomparable structs -type nocmp [0]func() diff --git a/vendor/go.uber.org/atomic/pointer_go118.go b/vendor/go.uber.org/atomic/pointer_go118.go deleted file mode 100644 index 1fb6c03b26..0000000000 --- a/vendor/go.uber.org/atomic/pointer_go118.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -//go:build go1.18 -// +build go1.18 - -package atomic - -import "fmt" - -// String returns a human readable representation of a Pointer's underlying value. -func (p *Pointer[T]) String() string { - return fmt.Sprint(p.Load()) -} diff --git a/vendor/go.uber.org/atomic/pointer_go118_pre119.go b/vendor/go.uber.org/atomic/pointer_go118_pre119.go deleted file mode 100644 index e0f47dba46..0000000000 --- a/vendor/go.uber.org/atomic/pointer_go118_pre119.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -//go:build go1.18 && !go1.19 -// +build go1.18,!go1.19 - -package atomic - -import "unsafe" - -type Pointer[T any] struct { - _ nocmp // disallow non-atomic comparison - p UnsafePointer -} - -// NewPointer creates a new Pointer. -func NewPointer[T any](v *T) *Pointer[T] { - var p Pointer[T] - if v != nil { - p.p.Store(unsafe.Pointer(v)) - } - return &p -} - -// Load atomically loads the wrapped value. -func (p *Pointer[T]) Load() *T { - return (*T)(p.p.Load()) -} - -// Store atomically stores the passed value. -func (p *Pointer[T]) Store(val *T) { - p.p.Store(unsafe.Pointer(val)) -} - -// Swap atomically swaps the wrapped pointer and returns the old value. -func (p *Pointer[T]) Swap(val *T) (old *T) { - return (*T)(p.p.Swap(unsafe.Pointer(val))) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) { - return p.p.CompareAndSwap(unsafe.Pointer(old), unsafe.Pointer(new)) -} diff --git a/vendor/go.uber.org/atomic/pointer_go119.go b/vendor/go.uber.org/atomic/pointer_go119.go deleted file mode 100644 index 6726f17ad6..0000000000 --- a/vendor/go.uber.org/atomic/pointer_go119.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) 2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -//go:build go1.19 -// +build go1.19 - -package atomic - -import "sync/atomic" - -// Pointer is an atomic pointer of type *T. -type Pointer[T any] struct { - _ nocmp // disallow non-atomic comparison - p atomic.Pointer[T] -} - -// NewPointer creates a new Pointer. -func NewPointer[T any](v *T) *Pointer[T] { - var p Pointer[T] - if v != nil { - p.p.Store(v) - } - return &p -} - -// Load atomically loads the wrapped value. -func (p *Pointer[T]) Load() *T { - return p.p.Load() -} - -// Store atomically stores the passed value. -func (p *Pointer[T]) Store(val *T) { - p.p.Store(val) -} - -// Swap atomically swaps the wrapped pointer and returns the old value. -func (p *Pointer[T]) Swap(val *T) (old *T) { - return p.p.Swap(val) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) { - return p.p.CompareAndSwap(old, new) -} diff --git a/vendor/go.uber.org/atomic/string.go b/vendor/go.uber.org/atomic/string.go deleted file mode 100644 index 061466c5bd..0000000000 --- a/vendor/go.uber.org/atomic/string.go +++ /dev/null @@ -1,72 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -// String is an atomic type-safe wrapper for string values. -type String struct { - _ nocmp // disallow non-atomic comparison - - v Value -} - -var _zeroString string - -// NewString creates a new String. -func NewString(val string) *String { - x := &String{} - if val != _zeroString { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped string. -func (x *String) Load() string { - return unpackString(x.v.Load()) -} - -// Store atomically stores the passed string. -func (x *String) Store(val string) { - x.v.Store(packString(val)) -} - -// CompareAndSwap is an atomic compare-and-swap for string values. -func (x *String) CompareAndSwap(old, new string) (swapped bool) { - if x.v.CompareAndSwap(packString(old), packString(new)) { - return true - } - - if old == _zeroString { - // If the old value is the empty value, then it's possible the - // underlying Value hasn't been set and is nil, so retry with nil. - return x.v.CompareAndSwap(nil, packString(new)) - } - - return false -} - -// Swap atomically stores the given string and returns the old -// value. -func (x *String) Swap(val string) (old string) { - return unpackString(x.v.Swap(packString(val))) -} diff --git a/vendor/go.uber.org/atomic/string_ext.go b/vendor/go.uber.org/atomic/string_ext.go deleted file mode 100644 index 019109c86b..0000000000 --- a/vendor/go.uber.org/atomic/string_ext.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped Value -pack packString -unpack unpackString -compareandswap -swap -file=string.go - -func packString(s string) interface{} { - return s -} - -func unpackString(v interface{}) string { - if s, ok := v.(string); ok { - return s - } - return "" -} - -// String returns the wrapped value. -func (s *String) String() string { - return s.Load() -} - -// MarshalText encodes the wrapped string into a textual form. -// -// This makes it encodable as JSON, YAML, XML, and more. -func (s *String) MarshalText() ([]byte, error) { - return []byte(s.Load()), nil -} - -// UnmarshalText decodes text and replaces the wrapped string with it. -// -// This makes it decodable from JSON, YAML, XML, and more. -func (s *String) UnmarshalText(b []byte) error { - s.Store(string(b)) - return nil -} diff --git a/vendor/go.uber.org/atomic/time.go b/vendor/go.uber.org/atomic/time.go deleted file mode 100644 index cc2a230c00..0000000000 --- a/vendor/go.uber.org/atomic/time.go +++ /dev/null @@ -1,55 +0,0 @@ -// @generated Code generated by gen-atomicwrapper. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "time" -) - -// Time is an atomic type-safe wrapper for time.Time values. -type Time struct { - _ nocmp // disallow non-atomic comparison - - v Value -} - -var _zeroTime time.Time - -// NewTime creates a new Time. -func NewTime(val time.Time) *Time { - x := &Time{} - if val != _zeroTime { - x.Store(val) - } - return x -} - -// Load atomically loads the wrapped time.Time. -func (x *Time) Load() time.Time { - return unpackTime(x.v.Load()) -} - -// Store atomically stores the passed time.Time. -func (x *Time) Store(val time.Time) { - x.v.Store(packTime(val)) -} diff --git a/vendor/go.uber.org/atomic/time_ext.go b/vendor/go.uber.org/atomic/time_ext.go deleted file mode 100644 index 1e3dc978aa..0000000000 --- a/vendor/go.uber.org/atomic/time_ext.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) 2021 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import "time" - -//go:generate bin/gen-atomicwrapper -name=Time -type=time.Time -wrapped=Value -pack=packTime -unpack=unpackTime -imports time -file=time.go - -func packTime(t time.Time) interface{} { - return t -} - -func unpackTime(v interface{}) time.Time { - if t, ok := v.(time.Time); ok { - return t - } - return time.Time{} -} diff --git a/vendor/go.uber.org/atomic/uint32.go b/vendor/go.uber.org/atomic/uint32.go deleted file mode 100644 index 4adc294ac2..0000000000 --- a/vendor/go.uber.org/atomic/uint32.go +++ /dev/null @@ -1,109 +0,0 @@ -// @generated Code generated by gen-atomicint. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "strconv" - "sync/atomic" -) - -// Uint32 is an atomic wrapper around uint32. -type Uint32 struct { - _ nocmp // disallow non-atomic comparison - - v uint32 -} - -// NewUint32 creates a new Uint32. -func NewUint32(val uint32) *Uint32 { - return &Uint32{v: val} -} - -// Load atomically loads the wrapped value. -func (i *Uint32) Load() uint32 { - return atomic.LoadUint32(&i.v) -} - -// Add atomically adds to the wrapped uint32 and returns the new value. -func (i *Uint32) Add(delta uint32) uint32 { - return atomic.AddUint32(&i.v, delta) -} - -// Sub atomically subtracts from the wrapped uint32 and returns the new value. -func (i *Uint32) Sub(delta uint32) uint32 { - return atomic.AddUint32(&i.v, ^(delta - 1)) -} - -// Inc atomically increments the wrapped uint32 and returns the new value. -func (i *Uint32) Inc() uint32 { - return i.Add(1) -} - -// Dec atomically decrements the wrapped uint32 and returns the new value. -func (i *Uint32) Dec() uint32 { - return i.Sub(1) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap. -func (i *Uint32) CAS(old, new uint32) (swapped bool) { - return i.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (i *Uint32) CompareAndSwap(old, new uint32) (swapped bool) { - return atomic.CompareAndSwapUint32(&i.v, old, new) -} - -// Store atomically stores the passed value. -func (i *Uint32) Store(val uint32) { - atomic.StoreUint32(&i.v, val) -} - -// Swap atomically swaps the wrapped uint32 and returns the old value. -func (i *Uint32) Swap(val uint32) (old uint32) { - return atomic.SwapUint32(&i.v, val) -} - -// MarshalJSON encodes the wrapped uint32 into JSON. -func (i *Uint32) MarshalJSON() ([]byte, error) { - return json.Marshal(i.Load()) -} - -// UnmarshalJSON decodes JSON into the wrapped uint32. -func (i *Uint32) UnmarshalJSON(b []byte) error { - var v uint32 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - i.Store(v) - return nil -} - -// String encodes the wrapped value as a string. -func (i *Uint32) String() string { - v := i.Load() - return strconv.FormatUint(uint64(v), 10) -} diff --git a/vendor/go.uber.org/atomic/uint64.go b/vendor/go.uber.org/atomic/uint64.go deleted file mode 100644 index 0e2eddb303..0000000000 --- a/vendor/go.uber.org/atomic/uint64.go +++ /dev/null @@ -1,109 +0,0 @@ -// @generated Code generated by gen-atomicint. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "strconv" - "sync/atomic" -) - -// Uint64 is an atomic wrapper around uint64. -type Uint64 struct { - _ nocmp // disallow non-atomic comparison - - v uint64 -} - -// NewUint64 creates a new Uint64. -func NewUint64(val uint64) *Uint64 { - return &Uint64{v: val} -} - -// Load atomically loads the wrapped value. -func (i *Uint64) Load() uint64 { - return atomic.LoadUint64(&i.v) -} - -// Add atomically adds to the wrapped uint64 and returns the new value. -func (i *Uint64) Add(delta uint64) uint64 { - return atomic.AddUint64(&i.v, delta) -} - -// Sub atomically subtracts from the wrapped uint64 and returns the new value. -func (i *Uint64) Sub(delta uint64) uint64 { - return atomic.AddUint64(&i.v, ^(delta - 1)) -} - -// Inc atomically increments the wrapped uint64 and returns the new value. -func (i *Uint64) Inc() uint64 { - return i.Add(1) -} - -// Dec atomically decrements the wrapped uint64 and returns the new value. -func (i *Uint64) Dec() uint64 { - return i.Sub(1) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap. -func (i *Uint64) CAS(old, new uint64) (swapped bool) { - return i.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (i *Uint64) CompareAndSwap(old, new uint64) (swapped bool) { - return atomic.CompareAndSwapUint64(&i.v, old, new) -} - -// Store atomically stores the passed value. -func (i *Uint64) Store(val uint64) { - atomic.StoreUint64(&i.v, val) -} - -// Swap atomically swaps the wrapped uint64 and returns the old value. -func (i *Uint64) Swap(val uint64) (old uint64) { - return atomic.SwapUint64(&i.v, val) -} - -// MarshalJSON encodes the wrapped uint64 into JSON. -func (i *Uint64) MarshalJSON() ([]byte, error) { - return json.Marshal(i.Load()) -} - -// UnmarshalJSON decodes JSON into the wrapped uint64. -func (i *Uint64) UnmarshalJSON(b []byte) error { - var v uint64 - if err := json.Unmarshal(b, &v); err != nil { - return err - } - i.Store(v) - return nil -} - -// String encodes the wrapped value as a string. -func (i *Uint64) String() string { - v := i.Load() - return strconv.FormatUint(uint64(v), 10) -} diff --git a/vendor/go.uber.org/atomic/uintptr.go b/vendor/go.uber.org/atomic/uintptr.go deleted file mode 100644 index 7d5b000d61..0000000000 --- a/vendor/go.uber.org/atomic/uintptr.go +++ /dev/null @@ -1,109 +0,0 @@ -// @generated Code generated by gen-atomicint. - -// Copyright (c) 2020-2023 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "encoding/json" - "strconv" - "sync/atomic" -) - -// Uintptr is an atomic wrapper around uintptr. -type Uintptr struct { - _ nocmp // disallow non-atomic comparison - - v uintptr -} - -// NewUintptr creates a new Uintptr. -func NewUintptr(val uintptr) *Uintptr { - return &Uintptr{v: val} -} - -// Load atomically loads the wrapped value. -func (i *Uintptr) Load() uintptr { - return atomic.LoadUintptr(&i.v) -} - -// Add atomically adds to the wrapped uintptr and returns the new value. -func (i *Uintptr) Add(delta uintptr) uintptr { - return atomic.AddUintptr(&i.v, delta) -} - -// Sub atomically subtracts from the wrapped uintptr and returns the new value. -func (i *Uintptr) Sub(delta uintptr) uintptr { - return atomic.AddUintptr(&i.v, ^(delta - 1)) -} - -// Inc atomically increments the wrapped uintptr and returns the new value. -func (i *Uintptr) Inc() uintptr { - return i.Add(1) -} - -// Dec atomically decrements the wrapped uintptr and returns the new value. -func (i *Uintptr) Dec() uintptr { - return i.Sub(1) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap. -func (i *Uintptr) CAS(old, new uintptr) (swapped bool) { - return i.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (i *Uintptr) CompareAndSwap(old, new uintptr) (swapped bool) { - return atomic.CompareAndSwapUintptr(&i.v, old, new) -} - -// Store atomically stores the passed value. -func (i *Uintptr) Store(val uintptr) { - atomic.StoreUintptr(&i.v, val) -} - -// Swap atomically swaps the wrapped uintptr and returns the old value. -func (i *Uintptr) Swap(val uintptr) (old uintptr) { - return atomic.SwapUintptr(&i.v, val) -} - -// MarshalJSON encodes the wrapped uintptr into JSON. -func (i *Uintptr) MarshalJSON() ([]byte, error) { - return json.Marshal(i.Load()) -} - -// UnmarshalJSON decodes JSON into the wrapped uintptr. -func (i *Uintptr) UnmarshalJSON(b []byte) error { - var v uintptr - if err := json.Unmarshal(b, &v); err != nil { - return err - } - i.Store(v) - return nil -} - -// String encodes the wrapped value as a string. -func (i *Uintptr) String() string { - v := i.Load() - return strconv.FormatUint(uint64(v), 10) -} diff --git a/vendor/go.uber.org/atomic/unsafe_pointer.go b/vendor/go.uber.org/atomic/unsafe_pointer.go deleted file mode 100644 index 34868baf6a..0000000000 --- a/vendor/go.uber.org/atomic/unsafe_pointer.go +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2021-2022 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import ( - "sync/atomic" - "unsafe" -) - -// UnsafePointer is an atomic wrapper around unsafe.Pointer. -type UnsafePointer struct { - _ nocmp // disallow non-atomic comparison - - v unsafe.Pointer -} - -// NewUnsafePointer creates a new UnsafePointer. -func NewUnsafePointer(val unsafe.Pointer) *UnsafePointer { - return &UnsafePointer{v: val} -} - -// Load atomically loads the wrapped value. -func (p *UnsafePointer) Load() unsafe.Pointer { - return atomic.LoadPointer(&p.v) -} - -// Store atomically stores the passed value. -func (p *UnsafePointer) Store(val unsafe.Pointer) { - atomic.StorePointer(&p.v, val) -} - -// Swap atomically swaps the wrapped unsafe.Pointer and returns the old value. -func (p *UnsafePointer) Swap(val unsafe.Pointer) (old unsafe.Pointer) { - return atomic.SwapPointer(&p.v, val) -} - -// CAS is an atomic compare-and-swap. -// -// Deprecated: Use CompareAndSwap -func (p *UnsafePointer) CAS(old, new unsafe.Pointer) (swapped bool) { - return p.CompareAndSwap(old, new) -} - -// CompareAndSwap is an atomic compare-and-swap. -func (p *UnsafePointer) CompareAndSwap(old, new unsafe.Pointer) (swapped bool) { - return atomic.CompareAndSwapPointer(&p.v, old, new) -} diff --git a/vendor/go.uber.org/atomic/value.go b/vendor/go.uber.org/atomic/value.go deleted file mode 100644 index 52caedb9a5..0000000000 --- a/vendor/go.uber.org/atomic/value.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2020 Uber Technologies, Inc. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -package atomic - -import "sync/atomic" - -// Value shadows the type of the same name from sync/atomic -// https://godoc.org/sync/atomic#Value -type Value struct { - _ nocmp // disallow non-atomic comparison - - atomic.Value -} diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go deleted file mode 100644 index d25979d9f5..0000000000 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1.go +++ /dev/null @@ -1,825 +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 cryptobyte - -import ( - encoding_asn1 "encoding/asn1" - "fmt" - "math/big" - "reflect" - "time" - - "golang.org/x/crypto/cryptobyte/asn1" -) - -// This file contains ASN.1-related methods for String and Builder. - -// Builder - -// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1Int64(v int64) { - b.addASN1Signed(asn1.INTEGER, v) -} - -// AddASN1Int64WithTag appends a DER-encoded ASN.1 INTEGER with the -// given tag. -func (b *Builder) AddASN1Int64WithTag(v int64, tag asn1.Tag) { - b.addASN1Signed(tag, v) -} - -// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION. -func (b *Builder) AddASN1Enum(v int64) { - b.addASN1Signed(asn1.ENUM, v) -} - -func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) { - b.AddASN1(tag, func(c *Builder) { - length := 1 - for i := v; i >= 0x80 || i < -0x80; i >>= 8 { - length++ - } - - for ; length > 0; length-- { - i := v >> uint((length-1)*8) & 0xff - c.AddUint8(uint8(i)) - } - }) -} - -// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1Uint64(v uint64) { - b.AddASN1(asn1.INTEGER, func(c *Builder) { - length := 1 - for i := v; i >= 0x80; i >>= 8 { - length++ - } - - for ; length > 0; length-- { - i := v >> uint((length-1)*8) & 0xff - c.AddUint8(uint8(i)) - } - }) -} - -// AddASN1BigInt appends a DER-encoded ASN.1 INTEGER. -func (b *Builder) AddASN1BigInt(n *big.Int) { - if b.err != nil { - return - } - - b.AddASN1(asn1.INTEGER, func(c *Builder) { - if n.Sign() < 0 { - // A negative number has to be converted to two's-complement form. So we - // invert and subtract 1. If the most-significant-bit isn't set then - // we'll need to pad the beginning with 0xff in order to keep the number - // negative. - nMinus1 := new(big.Int).Neg(n) - nMinus1.Sub(nMinus1, bigOne) - bytes := nMinus1.Bytes() - for i := range bytes { - bytes[i] ^= 0xff - } - if len(bytes) == 0 || bytes[0]&0x80 == 0 { - c.add(0xff) - } - c.add(bytes...) - } else if n.Sign() == 0 { - c.add(0) - } else { - bytes := n.Bytes() - if bytes[0]&0x80 != 0 { - c.add(0) - } - c.add(bytes...) - } - }) -} - -// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING. -func (b *Builder) AddASN1OctetString(bytes []byte) { - b.AddASN1(asn1.OCTET_STRING, func(c *Builder) { - c.AddBytes(bytes) - }) -} - -const generalizedTimeFormatStr = "20060102150405Z0700" - -// AddASN1GeneralizedTime appends a DER-encoded ASN.1 GENERALIZEDTIME. -func (b *Builder) AddASN1GeneralizedTime(t time.Time) { - if t.Year() < 0 || t.Year() > 9999 { - b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t) - return - } - b.AddASN1(asn1.GeneralizedTime, func(c *Builder) { - c.AddBytes([]byte(t.Format(generalizedTimeFormatStr))) - }) -} - -// AddASN1UTCTime appends a DER-encoded ASN.1 UTCTime. -func (b *Builder) AddASN1UTCTime(t time.Time) { - b.AddASN1(asn1.UTCTime, func(c *Builder) { - // As utilized by the X.509 profile, UTCTime can only - // represent the years 1950 through 2049. - if t.Year() < 1950 || t.Year() >= 2050 { - b.err = fmt.Errorf("cryptobyte: cannot represent %v as a UTCTime", t) - return - } - c.AddBytes([]byte(t.Format(defaultUTCTimeFormatStr))) - }) -} - -// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not -// support BIT STRINGs that are not a whole number of bytes. -func (b *Builder) AddASN1BitString(data []byte) { - b.AddASN1(asn1.BIT_STRING, func(b *Builder) { - b.AddUint8(0) - b.AddBytes(data) - }) -} - -func (b *Builder) addBase128Int(n int64) { - var length int - if n == 0 { - length = 1 - } else { - for i := n; i > 0; i >>= 7 { - length++ - } - } - - for i := length - 1; i >= 0; i-- { - o := byte(n >> uint(i*7)) - o &= 0x7f - if i != 0 { - o |= 0x80 - } - - b.add(o) - } -} - -func isValidOID(oid encoding_asn1.ObjectIdentifier) bool { - if len(oid) < 2 { - return false - } - - if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) { - return false - } - - for _, v := range oid { - if v < 0 { - return false - } - } - - return true -} - -func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) { - b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) { - if !isValidOID(oid) { - b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid) - return - } - - b.addBase128Int(int64(oid[0])*40 + int64(oid[1])) - for _, v := range oid[2:] { - b.addBase128Int(int64(v)) - } - }) -} - -func (b *Builder) AddASN1Boolean(v bool) { - b.AddASN1(asn1.BOOLEAN, func(b *Builder) { - if v { - b.AddUint8(0xff) - } else { - b.AddUint8(0) - } - }) -} - -func (b *Builder) AddASN1NULL() { - b.add(uint8(asn1.NULL), 0) -} - -// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if -// successful or records an error if one occurred. -func (b *Builder) MarshalASN1(v interface{}) { - // NOTE(martinkr): This is somewhat of a hack to allow propagation of - // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a - // value embedded into a struct, its tag information is lost. - if b.err != nil { - return - } - bytes, err := encoding_asn1.Marshal(v) - if err != nil { - b.err = err - return - } - b.AddBytes(bytes) -} - -// AddASN1 appends an ASN.1 object. The object is prefixed with the given tag. -// Tags greater than 30 are not supported and result in an error (i.e. -// low-tag-number form only). The child builder passed to the -// BuilderContinuation can be used to build the content of the ASN.1 object. -func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) { - if b.err != nil { - return - } - // Identifiers with the low five bits set indicate high-tag-number format - // (two or more octets), which we don't support. - if tag&0x1f == 0x1f { - b.err = fmt.Errorf("cryptobyte: high-tag number identifier octets not supported: 0x%x", tag) - return - } - b.AddUint8(uint8(tag)) - b.addLengthPrefixed(1, true, f) -} - -// String - -// ReadASN1Boolean decodes an ASN.1 BOOLEAN and converts it to a boolean -// representation into out and advances. It reports whether the read -// was successful. -func (s *String) ReadASN1Boolean(out *bool) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.BOOLEAN) || len(bytes) != 1 { - return false - } - - switch bytes[0] { - case 0: - *out = false - case 0xff: - *out = true - default: - return false - } - - return true -} - -// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does -// not point to an integer, to a big.Int, or to a []byte it panics. Only -// positive and zero values can be decoded into []byte, and they are returned as -// big-endian binary values that share memory with s. Positive values will have -// no leading zeroes, and zero will be returned as a single zero byte. -// ReadASN1Integer reports whether the read was successful. -func (s *String) ReadASN1Integer(out interface{}) bool { - switch out := out.(type) { - case *int, *int8, *int16, *int32, *int64: - var i int64 - if !s.readASN1Int64(&i) || reflect.ValueOf(out).Elem().OverflowInt(i) { - return false - } - reflect.ValueOf(out).Elem().SetInt(i) - return true - case *uint, *uint8, *uint16, *uint32, *uint64: - var u uint64 - if !s.readASN1Uint64(&u) || reflect.ValueOf(out).Elem().OverflowUint(u) { - return false - } - reflect.ValueOf(out).Elem().SetUint(u) - return true - case *big.Int: - return s.readASN1BigInt(out) - case *[]byte: - return s.readASN1Bytes(out) - default: - panic("out does not point to an integer type") - } -} - -func checkASN1Integer(bytes []byte) bool { - if len(bytes) == 0 { - // An INTEGER is encoded with at least one octet. - return false - } - if len(bytes) == 1 { - return true - } - if bytes[0] == 0 && bytes[1]&0x80 == 0 || bytes[0] == 0xff && bytes[1]&0x80 == 0x80 { - // Value is not minimally encoded. - return false - } - return true -} - -var bigOne = big.NewInt(1) - -func (s *String) readASN1BigInt(out *big.Int) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) { - return false - } - if bytes[0]&0x80 == 0x80 { - // Negative number. - neg := make([]byte, len(bytes)) - for i, b := range bytes { - neg[i] = ^b - } - out.SetBytes(neg) - out.Add(out, bigOne) - out.Neg(out) - } else { - out.SetBytes(bytes) - } - return true -} - -func (s *String) readASN1Bytes(out *[]byte) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) { - return false - } - if bytes[0]&0x80 == 0x80 { - return false - } - for len(bytes) > 1 && bytes[0] == 0 { - bytes = bytes[1:] - } - *out = bytes - return true -} - -func (s *String) readASN1Int64(out *int64) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) { - return false - } - return true -} - -func asn1Signed(out *int64, n []byte) bool { - length := len(n) - if length > 8 { - return false - } - for i := 0; i < length; i++ { - *out <<= 8 - *out |= int64(n[i]) - } - // Shift up and down in order to sign extend the result. - *out <<= 64 - uint8(length)*8 - *out >>= 64 - uint8(length)*8 - return true -} - -func (s *String) readASN1Uint64(out *uint64) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) { - return false - } - return true -} - -func asn1Unsigned(out *uint64, n []byte) bool { - length := len(n) - if length > 9 || length == 9 && n[0] != 0 { - // Too large for uint64. - return false - } - if n[0]&0x80 != 0 { - // Negative number. - return false - } - for i := 0; i < length; i++ { - *out <<= 8 - *out |= uint64(n[i]) - } - return true -} - -// ReadASN1Int64WithTag decodes an ASN.1 INTEGER with the given tag into out -// and advances. It reports whether the read was successful and resulted in a -// value that can be represented in an int64. -func (s *String) ReadASN1Int64WithTag(out *int64, tag asn1.Tag) bool { - var bytes String - return s.ReadASN1(&bytes, tag) && checkASN1Integer(bytes) && asn1Signed(out, bytes) -} - -// ReadASN1Enum decodes an ASN.1 ENUMERATION into out and advances. It reports -// whether the read was successful. -func (s *String) ReadASN1Enum(out *int) bool { - var bytes String - var i int64 - if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) { - return false - } - if int64(int(i)) != i { - return false - } - *out = int(i) - return true -} - -func (s *String) readBase128Int(out *int) bool { - ret := 0 - for i := 0; len(*s) > 0; i++ { - if i == 5 { - return false - } - // Avoid overflowing int on a 32-bit platform. - // We don't want different behavior based on the architecture. - if ret >= 1<<(31-7) { - return false - } - ret <<= 7 - b := s.read(1)[0] - - // ITU-T X.690, section 8.19.2: - // The subidentifier shall be encoded in the fewest possible octets, - // that is, the leading octet of the subidentifier shall not have the value 0x80. - if i == 0 && b == 0x80 { - return false - } - - ret |= int(b & 0x7f) - if b&0x80 == 0 { - *out = ret - return true - } - } - return false // truncated -} - -// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and -// advances. It reports whether the read was successful. -func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 { - return false - } - - // In the worst case, we get two elements from the first byte (which is - // encoded differently) and then every varint is a single byte long. - components := make([]int, len(bytes)+1) - - // The first varint is 40*value1 + value2: - // According to this packing, value1 can take the values 0, 1 and 2 only. - // When value1 = 0 or value1 = 1, then value2 is <= 39. When value1 = 2, - // then there are no restrictions on value2. - var v int - if !bytes.readBase128Int(&v) { - return false - } - if v < 80 { - components[0] = v / 40 - components[1] = v % 40 - } else { - components[0] = 2 - components[1] = v - 80 - } - - i := 2 - for ; len(bytes) > 0; i++ { - if !bytes.readBase128Int(&v) { - return false - } - components[i] = v - } - *out = components[:i] - return true -} - -// ReadASN1GeneralizedTime decodes an ASN.1 GENERALIZEDTIME into out and -// advances. It reports whether the read was successful. -func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.GeneralizedTime) { - return false - } - t := string(bytes) - res, err := time.Parse(generalizedTimeFormatStr, t) - if err != nil { - return false - } - if serialized := res.Format(generalizedTimeFormatStr); serialized != t { - return false - } - *out = res - return true -} - -const defaultUTCTimeFormatStr = "060102150405Z0700" - -// ReadASN1UTCTime decodes an ASN.1 UTCTime into out and advances. -// It reports whether the read was successful. -func (s *String) ReadASN1UTCTime(out *time.Time) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.UTCTime) { - return false - } - t := string(bytes) - - formatStr := defaultUTCTimeFormatStr - var err error - res, err := time.Parse(formatStr, t) - if err != nil { - // Fallback to minute precision if we can't parse second - // precision. If we are following X.509 or X.690 we shouldn't - // support this, but we do. - formatStr = "0601021504Z0700" - res, err = time.Parse(formatStr, t) - } - if err != nil { - return false - } - - if serialized := res.Format(formatStr); serialized != t { - return false - } - - if res.Year() >= 2050 { - // UTCTime interprets the low order digits 50-99 as 1950-99. - // This only applies to its use in the X.509 profile. - // See https://tools.ietf.org/html/rfc5280#section-4.1.2.5.1 - res = res.AddDate(-100, 0, 0) - } - *out = res - return true -} - -// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. -// It reports whether the read was successful. -func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool { - var bytes String - if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 || - len(bytes)*8/8 != len(bytes) { - return false - } - - paddingBits := bytes[0] - bytes = bytes[1:] - if paddingBits > 7 || - len(bytes) == 0 && paddingBits != 0 || - len(bytes) > 0 && bytes[len(bytes)-1]&(1< 4 || len(*s) < int(2+lenLen) { - return false - } - - lenBytes := String((*s)[2 : 2+lenLen]) - if !lenBytes.readUnsigned(&len32, int(lenLen)) { - return false - } - - // ITU-T X.690 section 10.1 (DER length forms) requires encoding the length - // with the minimum number of octets. - if len32 < 128 { - // Length should have used short-form encoding. - return false - } - if len32>>((lenLen-1)*8) == 0 { - // Leading octet is 0. Length should have been at least one byte shorter. - return false - } - - headerLen = 2 + uint32(lenLen) - if headerLen+len32 < len32 { - // Overflow. - return false - } - length = headerLen + len32 - } - - if int(length) < 0 || !s.ReadBytes((*[]byte)(out), int(length)) { - return false - } - if skipHeader && !out.Skip(int(headerLen)) { - panic("cryptobyte: internal error") - } - - return true -} diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go deleted file mode 100644 index 90ef6a241d..0000000000 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go +++ /dev/null @@ -1,46 +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 asn1 contains supporting types for parsing and building ASN.1 -// messages with the cryptobyte package. -package asn1 - -// Tag represents an ASN.1 identifier octet, consisting of a tag number -// (indicating a type) and class (such as context-specific or constructed). -// -// Methods in the cryptobyte package only support the low-tag-number form, i.e. -// a single identifier octet with bits 7-8 encoding the class and bits 1-6 -// encoding the tag number. -type Tag uint8 - -const ( - classConstructed = 0x20 - classContextSpecific = 0x80 -) - -// Constructed returns t with the constructed class bit set. -func (t Tag) Constructed() Tag { return t | classConstructed } - -// ContextSpecific returns t with the context-specific class bit set. -func (t Tag) ContextSpecific() Tag { return t | classContextSpecific } - -// The following is a list of standard tag and class combinations. -const ( - BOOLEAN = Tag(1) - INTEGER = Tag(2) - BIT_STRING = Tag(3) - OCTET_STRING = Tag(4) - NULL = Tag(5) - OBJECT_IDENTIFIER = Tag(6) - ENUM = Tag(10) - UTF8String = Tag(12) - SEQUENCE = Tag(16 | classConstructed) - SET = Tag(17 | classConstructed) - PrintableString = Tag(19) - T61String = Tag(20) - IA5String = Tag(22) - UTCTime = Tag(23) - GeneralizedTime = Tag(24) - GeneralString = Tag(27) -) diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go deleted file mode 100644 index cf254f5f1e..0000000000 --- a/vendor/golang.org/x/crypto/cryptobyte/builder.go +++ /dev/null @@ -1,350 +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 cryptobyte - -import ( - "errors" - "fmt" -) - -// A Builder builds byte strings from fixed-length and length-prefixed values. -// Builders either allocate space as needed, or are ‘fixed’, which means that -// they write into a given buffer and produce an error if it's exhausted. -// -// The zero value is a usable Builder that allocates space as needed. -// -// Simple values are marshaled and appended to a Builder using methods on the -// Builder. Length-prefixed values are marshaled by providing a -// BuilderContinuation, which is a function that writes the inner contents of -// the value to a given Builder. See the documentation for BuilderContinuation -// for details. -type Builder struct { - err error - result []byte - fixedSize bool - child *Builder - offset int - pendingLenLen int - pendingIsASN1 bool - inContinuation *bool -} - -// NewBuilder creates a Builder that appends its output to the given buffer. -// Like append(), the slice will be reallocated if its capacity is exceeded. -// Use Bytes to get the final buffer. -func NewBuilder(buffer []byte) *Builder { - return &Builder{ - result: buffer, - } -} - -// NewFixedBuilder creates a Builder that appends its output into the given -// buffer. This builder does not reallocate the output buffer. Writes that -// would exceed the buffer's capacity are treated as an error. -func NewFixedBuilder(buffer []byte) *Builder { - return &Builder{ - result: buffer, - fixedSize: true, - } -} - -// SetError sets the value to be returned as the error from Bytes. Writes -// performed after calling SetError are ignored. -func (b *Builder) SetError(err error) { - b.err = err -} - -// Bytes returns the bytes written by the builder or an error if one has -// occurred during building. -func (b *Builder) Bytes() ([]byte, error) { - if b.err != nil { - return nil, b.err - } - return b.result[b.offset:], nil -} - -// BytesOrPanic returns the bytes written by the builder or panics if an error -// has occurred during building. -func (b *Builder) BytesOrPanic() []byte { - if b.err != nil { - panic(b.err) - } - return b.result[b.offset:] -} - -// AddUint8 appends an 8-bit value to the byte string. -func (b *Builder) AddUint8(v uint8) { - b.add(byte(v)) -} - -// AddUint16 appends a big-endian, 16-bit value to the byte string. -func (b *Builder) AddUint16(v uint16) { - b.add(byte(v>>8), byte(v)) -} - -// AddUint24 appends a big-endian, 24-bit value to the byte string. The highest -// byte of the 32-bit input value is silently truncated. -func (b *Builder) AddUint24(v uint32) { - b.add(byte(v>>16), byte(v>>8), byte(v)) -} - -// AddUint32 appends a big-endian, 32-bit value to the byte string. -func (b *Builder) AddUint32(v uint32) { - b.add(byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) -} - -// AddUint48 appends a big-endian, 48-bit value to the byte string. -func (b *Builder) AddUint48(v uint64) { - b.add(byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) -} - -// AddUint64 appends a big-endian, 64-bit value to the byte string. -func (b *Builder) AddUint64(v uint64) { - b.add(byte(v>>56), byte(v>>48), byte(v>>40), byte(v>>32), byte(v>>24), byte(v>>16), byte(v>>8), byte(v)) -} - -// AddBytes appends a sequence of bytes to the byte string. -func (b *Builder) AddBytes(v []byte) { - b.add(v...) -} - -// BuilderContinuation is a continuation-passing interface for building -// length-prefixed byte sequences. Builder methods for length-prefixed -// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation -// supplied to them. The child builder passed to the continuation can be used -// to build the content of the length-prefixed sequence. For example: -// -// parent := cryptobyte.NewBuilder() -// parent.AddUint8LengthPrefixed(func (child *Builder) { -// child.AddUint8(42) -// child.AddUint8LengthPrefixed(func (grandchild *Builder) { -// grandchild.AddUint8(5) -// }) -// }) -// -// It is an error to write more bytes to the child than allowed by the reserved -// length prefix. After the continuation returns, the child must be considered -// invalid, i.e. users must not store any copies or references of the child -// that outlive the continuation. -// -// If the continuation panics with a value of type BuildError then the inner -// error will be returned as the error from Bytes. If the child panics -// otherwise then Bytes will repanic with the same value. -type BuilderContinuation func(child *Builder) - -// BuildError wraps an error. If a BuilderContinuation panics with this value, -// the panic will be recovered and the inner error will be returned from -// Builder.Bytes. -type BuildError struct { - Err error -} - -// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence. -func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(1, false, f) -} - -// AddUint16LengthPrefixed adds a big-endian, 16-bit length-prefixed byte sequence. -func (b *Builder) AddUint16LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(2, false, f) -} - -// AddUint24LengthPrefixed adds a big-endian, 24-bit length-prefixed byte sequence. -func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(3, false, f) -} - -// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence. -func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) { - b.addLengthPrefixed(4, false, f) -} - -func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) { - if !*b.inContinuation { - *b.inContinuation = true - - defer func() { - *b.inContinuation = false - - r := recover() - if r == nil { - return - } - - if buildError, ok := r.(BuildError); ok { - b.err = buildError.Err - } else { - panic(r) - } - }() - } - - f(arg) -} - -func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) { - // Subsequent writes can be ignored if the builder has encountered an error. - if b.err != nil { - return - } - - offset := len(b.result) - b.add(make([]byte, lenLen)...) - - if b.inContinuation == nil { - b.inContinuation = new(bool) - } - - b.child = &Builder{ - result: b.result, - fixedSize: b.fixedSize, - offset: offset, - pendingLenLen: lenLen, - pendingIsASN1: isASN1, - inContinuation: b.inContinuation, - } - - b.callContinuation(f, b.child) - b.flushChild() - if b.child != nil { - panic("cryptobyte: internal error") - } -} - -func (b *Builder) flushChild() { - if b.child == nil { - return - } - b.child.flushChild() - child := b.child - b.child = nil - - if child.err != nil { - b.err = child.err - return - } - - length := len(child.result) - child.pendingLenLen - child.offset - - if length < 0 { - panic("cryptobyte: internal error") // result unexpectedly shrunk - } - - if child.pendingIsASN1 { - // For ASN.1, we reserved a single byte for the length. If that turned out - // to be incorrect, we have to move the contents along in order to make - // space. - if child.pendingLenLen != 1 { - panic("cryptobyte: internal error") - } - var lenLen, lenByte uint8 - if int64(length) > 0xfffffffe { - b.err = errors.New("pending ASN.1 child too long") - return - } else if length > 0xffffff { - lenLen = 5 - lenByte = 0x80 | 4 - } else if length > 0xffff { - lenLen = 4 - lenByte = 0x80 | 3 - } else if length > 0xff { - lenLen = 3 - lenByte = 0x80 | 2 - } else if length > 0x7f { - lenLen = 2 - lenByte = 0x80 | 1 - } else { - lenLen = 1 - lenByte = uint8(length) - length = 0 - } - - // Insert the initial length byte, make space for successive length bytes, - // and adjust the offset. - child.result[child.offset] = lenByte - extraBytes := int(lenLen - 1) - if extraBytes != 0 { - child.add(make([]byte, extraBytes)...) - childStart := child.offset + child.pendingLenLen - copy(child.result[childStart+extraBytes:], child.result[childStart:]) - } - child.offset++ - child.pendingLenLen = extraBytes - } - - l := length - for i := child.pendingLenLen - 1; i >= 0; i-- { - child.result[child.offset+i] = uint8(l) - l >>= 8 - } - if l != 0 { - b.err = fmt.Errorf("cryptobyte: pending child length %d exceeds %d-byte length prefix", length, child.pendingLenLen) - return - } - - if b.fixedSize && &b.result[0] != &child.result[0] { - panic("cryptobyte: BuilderContinuation reallocated a fixed-size buffer") - } - - b.result = child.result -} - -func (b *Builder) add(bytes ...byte) { - if b.err != nil { - return - } - if b.child != nil { - panic("cryptobyte: attempted write while child is pending") - } - if len(b.result)+len(bytes) < len(bytes) { - b.err = errors.New("cryptobyte: length overflow") - } - if b.fixedSize && len(b.result)+len(bytes) > cap(b.result) { - b.err = errors.New("cryptobyte: Builder is exceeding its fixed-size buffer") - return - } - b.result = append(b.result, bytes...) -} - -// Unwrite rolls back non-negative n bytes written directly to the Builder. -// An attempt by a child builder passed to a continuation to unwrite bytes -// from its parent will panic. -func (b *Builder) Unwrite(n int) { - if b.err != nil { - return - } - if b.child != nil { - panic("cryptobyte: attempted unwrite while child is pending") - } - length := len(b.result) - b.pendingLenLen - b.offset - if length < 0 { - panic("cryptobyte: internal error") - } - if n < 0 { - panic("cryptobyte: attempted to unwrite negative number of bytes") - } - if n > length { - panic("cryptobyte: attempted to unwrite more than was written") - } - b.result = b.result[:len(b.result)-n] -} - -// A MarshalingValue marshals itself into a Builder. -type MarshalingValue interface { - // Marshal is called by Builder.AddValue. It receives a pointer to a builder - // to marshal itself into. It may return an error that occurred during - // marshaling, such as unset or invalid values. - Marshal(b *Builder) error -} - -// AddValue calls Marshal on v, passing a pointer to the builder to append to. -// If Marshal returns an error, it is set on the Builder so that subsequent -// appends don't have an effect. -func (b *Builder) AddValue(v MarshalingValue) { - err := v.Marshal(b) - if err != nil { - b.err = err - } -} diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go deleted file mode 100644 index 4b0f8097f9..0000000000 --- a/vendor/golang.org/x/crypto/cryptobyte/string.go +++ /dev/null @@ -1,183 +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 cryptobyte contains types that help with parsing and constructing -// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage -// contains useful ASN.1 constants.) -// -// The String type is for parsing. It wraps a []byte slice and provides helper -// functions for consuming structures, value by value. -// -// The Builder type is for constructing messages. It providers helper functions -// for appending values and also for appending length-prefixed submessages – -// without having to worry about calculating the length prefix ahead of time. -// -// See the documentation and examples for the Builder and String types to get -// started. -package cryptobyte - -// String represents a string of bytes. It provides methods for parsing -// fixed-length and length-prefixed values from it. -type String []byte - -// read advances a String by n bytes and returns them. If less than n bytes -// remain, it returns nil. -func (s *String) read(n int) []byte { - if len(*s) < n || n < 0 { - return nil - } - v := (*s)[:n] - *s = (*s)[n:] - return v -} - -// Skip advances the String by n byte and reports whether it was successful. -func (s *String) Skip(n int) bool { - return s.read(n) != nil -} - -// ReadUint8 decodes an 8-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint8(out *uint8) bool { - v := s.read(1) - if v == nil { - return false - } - *out = uint8(v[0]) - return true -} - -// ReadUint16 decodes a big-endian, 16-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint16(out *uint16) bool { - v := s.read(2) - if v == nil { - return false - } - *out = uint16(v[0])<<8 | uint16(v[1]) - return true -} - -// ReadUint24 decodes a big-endian, 24-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint24(out *uint32) bool { - v := s.read(3) - if v == nil { - return false - } - *out = uint32(v[0])<<16 | uint32(v[1])<<8 | uint32(v[2]) - return true -} - -// ReadUint32 decodes a big-endian, 32-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint32(out *uint32) bool { - v := s.read(4) - if v == nil { - return false - } - *out = uint32(v[0])<<24 | uint32(v[1])<<16 | uint32(v[2])<<8 | uint32(v[3]) - return true -} - -// ReadUint48 decodes a big-endian, 48-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint48(out *uint64) bool { - v := s.read(6) - if v == nil { - return false - } - *out = uint64(v[0])<<40 | uint64(v[1])<<32 | uint64(v[2])<<24 | uint64(v[3])<<16 | uint64(v[4])<<8 | uint64(v[5]) - return true -} - -// ReadUint64 decodes a big-endian, 64-bit value into out and advances over it. -// It reports whether the read was successful. -func (s *String) ReadUint64(out *uint64) bool { - v := s.read(8) - if v == nil { - return false - } - *out = uint64(v[0])<<56 | uint64(v[1])<<48 | uint64(v[2])<<40 | uint64(v[3])<<32 | uint64(v[4])<<24 | uint64(v[5])<<16 | uint64(v[6])<<8 | uint64(v[7]) - return true -} - -func (s *String) readUnsigned(out *uint32, length int) bool { - v := s.read(length) - if v == nil { - return false - } - var result uint32 - for i := 0; i < length; i++ { - result <<= 8 - result |= uint32(v[i]) - } - *out = result - return true -} - -func (s *String) readLengthPrefixed(lenLen int, outChild *String) bool { - lenBytes := s.read(lenLen) - if lenBytes == nil { - return false - } - var length uint32 - for _, b := range lenBytes { - length = length << 8 - length = length | uint32(b) - } - v := s.read(int(length)) - if v == nil { - return false - } - *outChild = v - return true -} - -// ReadUint8LengthPrefixed reads the content of an 8-bit length-prefixed value -// into out and advances over it. It reports whether the read was successful. -func (s *String) ReadUint8LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(1, out) -} - -// ReadUint16LengthPrefixed reads the content of a big-endian, 16-bit -// length-prefixed value into out and advances over it. It reports whether the -// read was successful. -func (s *String) ReadUint16LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(2, out) -} - -// ReadUint24LengthPrefixed reads the content of a big-endian, 24-bit -// length-prefixed value into out and advances over it. It reports whether -// the read was successful. -func (s *String) ReadUint24LengthPrefixed(out *String) bool { - return s.readLengthPrefixed(3, out) -} - -// ReadBytes reads n bytes into out and advances over them. It reports -// whether the read was successful. -func (s *String) ReadBytes(out *[]byte, n int) bool { - v := s.read(n) - if v == nil { - return false - } - *out = v - return true -} - -// CopyBytes copies len(out) bytes into out and advances over them. It reports -// whether the copy operation was successful -func (s *String) CopyBytes(out []byte) bool { - n := len(out) - v := s.read(n) - if v == nil { - return false - } - return copy(out, v) == n -} - -// Empty reports whether the string does not contain any bytes. -func (s String) Empty() bool { - return len(s) == 0 -} diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go deleted file mode 100644 index df453dcce0..0000000000 --- a/vendor/golang.org/x/crypto/ed25519/ed25519.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2019 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 ed25519 implements the Ed25519 signature algorithm. -// -// These functions are also compatible with the “Ed25519” function defined in -// [RFC 8032]. However, unlike RFC 8032's formulation, this package's private key -// representation includes a public key suffix to make multiple signing -// operations with the same key more efficient. This package refers to the RFC -// 8032 private key as the “seed”. -// -// The ed25519 package is a wrapper for the Ed25519 implementation in the -// crypto/ed25519 package. It is [frozen] and is not accepting new features. -// -// [RFC 8032]: https://datatracker.ietf.org/doc/html/rfc8032 -// [frozen]: https://go.dev/wiki/Frozen -package ed25519 - -import ( - "crypto/ed25519" - "io" -) - -const ( - // PublicKeySize is the size, in bytes, of public keys as used in this package. - PublicKeySize = 32 - // PrivateKeySize is the size, in bytes, of private keys as used in this package. - PrivateKeySize = 64 - // SignatureSize is the size, in bytes, of signatures generated and verified by this package. - SignatureSize = 64 - // SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032. - SeedSize = 32 -) - -// PublicKey is the type of Ed25519 public keys. -// -// This type is an alias for crypto/ed25519's PublicKey type. -// See the crypto/ed25519 package for the methods on this type. -type PublicKey = ed25519.PublicKey - -// PrivateKey is the type of Ed25519 private keys. It implements crypto.Signer. -// -// This type is an alias for crypto/ed25519's PrivateKey type. -// See the crypto/ed25519 package for the methods on this type. -type PrivateKey = ed25519.PrivateKey - -// GenerateKey generates a public/private key pair using entropy from rand. -// If rand is nil, crypto/rand.Reader will be used. -func GenerateKey(rand io.Reader) (PublicKey, PrivateKey, error) { - return ed25519.GenerateKey(rand) -} - -// NewKeyFromSeed calculates a private key from a seed. It will panic if -// len(seed) is not SeedSize. This function is provided for interoperability -// with RFC 8032. RFC 8032's private keys correspond to seeds in this -// package. -func NewKeyFromSeed(seed []byte) PrivateKey { - return ed25519.NewKeyFromSeed(seed) -} - -// Sign signs the message with privateKey and returns a signature. It will -// panic if len(privateKey) is not PrivateKeySize. -func Sign(privateKey PrivateKey, message []byte) []byte { - return ed25519.Sign(privateKey, message) -} - -// Verify reports whether sig is a valid signature of message by publicKey. It -// will panic if len(publicKey) is not PublicKeySize. -func Verify(publicKey PublicKey, message, sig []byte) bool { - return ed25519.Verify(publicKey, message, sig) -} diff --git a/vendor/golang.org/x/crypto/pkcs12/bmp-string.go b/vendor/golang.org/x/crypto/pkcs12/bmp-string.go deleted file mode 100644 index 233b8b62cc..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/bmp-string.go +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "errors" - "unicode/utf16" -) - -// bmpString returns s encoded in UCS-2 with a zero terminator. -func bmpString(s string) ([]byte, error) { - // References: - // https://tools.ietf.org/html/rfc7292#appendix-B.1 - // https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane - // - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes - // EncodeRune returns 0xfffd if the rune does not need special encoding - // - the above RFC provides the info that BMPStrings are NULL terminated. - - ret := make([]byte, 0, 2*len(s)+2) - - for _, r := range s { - if t, _ := utf16.EncodeRune(r); t != 0xfffd { - return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2") - } - ret = append(ret, byte(r/256), byte(r%256)) - } - - return append(ret, 0, 0), nil -} - -func decodeBMPString(bmpString []byte) (string, error) { - if len(bmpString)%2 != 0 { - return "", errors.New("pkcs12: odd-length BMP string") - } - - // strip terminator if present - if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 { - bmpString = bmpString[:l-2] - } - - s := make([]uint16, 0, len(bmpString)/2) - for len(bmpString) > 0 { - s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1])) - bmpString = bmpString[2:] - } - - return string(utf16.Decode(s)), nil -} diff --git a/vendor/golang.org/x/crypto/pkcs12/crypto.go b/vendor/golang.org/x/crypto/pkcs12/crypto.go deleted file mode 100644 index 212538cb5a..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/crypto.go +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "crypto/cipher" - "crypto/des" - "crypto/x509/pkix" - "encoding/asn1" - "errors" - - "golang.org/x/crypto/pkcs12/internal/rc2" -) - -var ( - oidPBEWithSHAAnd3KeyTripleDESCBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 3}) - oidPBEWithSHAAnd40BitRC2CBC = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 1, 6}) -) - -// pbeCipher is an abstraction of a PKCS#12 cipher. -type pbeCipher interface { - // create returns a cipher.Block given a key. - create(key []byte) (cipher.Block, error) - // deriveKey returns a key derived from the given password and salt. - deriveKey(salt, password []byte, iterations int) []byte - // deriveIV returns an IV derived from the given password and salt. - deriveIV(salt, password []byte, iterations int) []byte -} - -type shaWithTripleDESCBC struct{} - -func (shaWithTripleDESCBC) create(key []byte) (cipher.Block, error) { - return des.NewTripleDESCipher(key) -} - -func (shaWithTripleDESCBC) deriveKey(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 24) -} - -func (shaWithTripleDESCBC) deriveIV(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) -} - -type shaWith40BitRC2CBC struct{} - -func (shaWith40BitRC2CBC) create(key []byte) (cipher.Block, error) { - return rc2.New(key, len(key)*8) -} - -func (shaWith40BitRC2CBC) deriveKey(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 1, 5) -} - -func (shaWith40BitRC2CBC) deriveIV(salt, password []byte, iterations int) []byte { - return pbkdf(sha1Sum, 20, 64, salt, password, iterations, 2, 8) -} - -type pbeParams struct { - Salt []byte - Iterations int -} - -func pbDecrypterFor(algorithm pkix.AlgorithmIdentifier, password []byte) (cipher.BlockMode, int, error) { - var cipherType pbeCipher - - switch { - case algorithm.Algorithm.Equal(oidPBEWithSHAAnd3KeyTripleDESCBC): - cipherType = shaWithTripleDESCBC{} - case algorithm.Algorithm.Equal(oidPBEWithSHAAnd40BitRC2CBC): - cipherType = shaWith40BitRC2CBC{} - default: - return nil, 0, NotImplementedError("algorithm " + algorithm.Algorithm.String() + " is not supported") - } - - var params pbeParams - if err := unmarshal(algorithm.Parameters.FullBytes, ¶ms); err != nil { - return nil, 0, err - } - - key := cipherType.deriveKey(params.Salt, password, params.Iterations) - iv := cipherType.deriveIV(params.Salt, password, params.Iterations) - - block, err := cipherType.create(key) - if err != nil { - return nil, 0, err - } - - return cipher.NewCBCDecrypter(block, iv), block.BlockSize(), nil -} - -func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error) { - cbc, blockSize, err := pbDecrypterFor(info.Algorithm(), password) - if err != nil { - return nil, err - } - - encrypted := info.Data() - if len(encrypted) == 0 { - return nil, errors.New("pkcs12: empty encrypted data") - } - if len(encrypted)%blockSize != 0 { - return nil, errors.New("pkcs12: input is not a multiple of the block size") - } - decrypted = make([]byte, len(encrypted)) - cbc.CryptBlocks(decrypted, encrypted) - - psLen := int(decrypted[len(decrypted)-1]) - if psLen == 0 || psLen > blockSize { - return nil, ErrDecryption - } - - if len(decrypted) < psLen { - return nil, ErrDecryption - } - ps := decrypted[len(decrypted)-psLen:] - decrypted = decrypted[:len(decrypted)-psLen] - if !bytes.Equal(ps, bytes.Repeat([]byte{byte(psLen)}, psLen)) { - return nil, ErrDecryption - } - - return -} - -// decryptable abstracts an object that contains ciphertext. -type decryptable interface { - Algorithm() pkix.AlgorithmIdentifier - Data() []byte -} diff --git a/vendor/golang.org/x/crypto/pkcs12/errors.go b/vendor/golang.org/x/crypto/pkcs12/errors.go deleted file mode 100644 index 7377ce6fb2..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/errors.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import "errors" - -var ( - // ErrDecryption represents a failure to decrypt the input. - ErrDecryption = errors.New("pkcs12: decryption error, incorrect padding") - - // ErrIncorrectPassword is returned when an incorrect password is detected. - // Usually, P12/PFX data is signed to be able to verify the password. - ErrIncorrectPassword = errors.New("pkcs12: decryption password incorrect") -) - -// NotImplementedError indicates that the input is not currently supported. -type NotImplementedError string - -func (e NotImplementedError) Error() string { - return "pkcs12: " + string(e) -} diff --git a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go b/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go deleted file mode 100644 index 05de9cc2cd..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/internal/rc2/rc2.go +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2015 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 rc2 implements the RC2 cipher -/* -https://www.ietf.org/rfc/rfc2268.txt -http://people.csail.mit.edu/rivest/pubs/KRRR98.pdf - -This code is licensed under the MIT license. -*/ -package rc2 - -import ( - "crypto/cipher" - "encoding/binary" - "math/bits" -) - -// The rc2 block size in bytes -const BlockSize = 8 - -type rc2Cipher struct { - k [64]uint16 -} - -// New returns a new rc2 cipher with the given key and effective key length t1 -func New(key []byte, t1 int) (cipher.Block, error) { - // TODO(dgryski): error checking for key length - return &rc2Cipher{ - k: expandKey(key, t1), - }, nil -} - -func (*rc2Cipher) BlockSize() int { return BlockSize } - -var piTable = [256]byte{ - 0xd9, 0x78, 0xf9, 0xc4, 0x19, 0xdd, 0xb5, 0xed, 0x28, 0xe9, 0xfd, 0x79, 0x4a, 0xa0, 0xd8, 0x9d, - 0xc6, 0x7e,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f, 0x29, 0x10, 0x67, 0x6c, 0xba, 0xc9, - 0xd3, 0x00, 0xe6, 0xcf, 0xe1, 0x9e, 0xa8, 0x2c, 0x63, 0x16, 0x01, 0x3f, 0x58, 0xe2, 0x89, 0xa9, - 0x0d, 0x38, 0x34, 0x1b, 0xab, 0x33, 0xff, 0xb0, 0xbb, 0x48, 0x0c, 0x5f, 0xb9, 0xb1, 0xcd, 0x2e, - 0xc5, 0xf3, 0xdb, 0x47, 0xe5, 0xa5, 0x9c, 0x77, 0x0a, 0xa6, 0x20, 0x68, 0xfe, 0x7f, 0xc1, 0xad, -} - -func expandKey(key []byte, t1 int) [64]uint16 { - - l := make([]byte, 128) - copy(l, key) - - var t = len(key) - var t8 = (t1 + 7) / 8 - var tm = byte(255 % uint(1<<(8+uint(t1)-8*uint(t8)))) - - for i := len(key); i < 128; i++ { - l[i] = piTable[l[i-1]+l[uint8(i-t)]] - } - - l[128-t8] = piTable[l[128-t8]&tm] - - for i := 127 - t8; i >= 0; i-- { - l[i] = piTable[l[i+1]^l[i+t8]] - } - - var k [64]uint16 - - for i := range k { - k[i] = uint16(l[2*i]) + uint16(l[2*i+1])*256 - } - - return k -} - -func (c *rc2Cipher) Encrypt(dst, src []byte) { - - r0 := binary.LittleEndian.Uint16(src[0:]) - r1 := binary.LittleEndian.Uint16(src[2:]) - r2 := binary.LittleEndian.Uint16(src[4:]) - r3 := binary.LittleEndian.Uint16(src[6:]) - - var j int - - for j <= 16 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = bits.RotateLeft16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = bits.RotateLeft16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = bits.RotateLeft16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = bits.RotateLeft16(r3, 5) - j++ - - } - - r0 = r0 + c.k[r3&63] - r1 = r1 + c.k[r0&63] - r2 = r2 + c.k[r1&63] - r3 = r3 + c.k[r2&63] - - for j <= 40 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = bits.RotateLeft16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = bits.RotateLeft16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = bits.RotateLeft16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = bits.RotateLeft16(r3, 5) - j++ - - } - - r0 = r0 + c.k[r3&63] - r1 = r1 + c.k[r0&63] - r2 = r2 + c.k[r1&63] - r3 = r3 + c.k[r2&63] - - for j <= 60 { - // mix r0 - r0 = r0 + c.k[j] + (r3 & r2) + ((^r3) & r1) - r0 = bits.RotateLeft16(r0, 1) - j++ - - // mix r1 - r1 = r1 + c.k[j] + (r0 & r3) + ((^r0) & r2) - r1 = bits.RotateLeft16(r1, 2) - j++ - - // mix r2 - r2 = r2 + c.k[j] + (r1 & r0) + ((^r1) & r3) - r2 = bits.RotateLeft16(r2, 3) - j++ - - // mix r3 - r3 = r3 + c.k[j] + (r2 & r1) + ((^r2) & r0) - r3 = bits.RotateLeft16(r3, 5) - j++ - } - - binary.LittleEndian.PutUint16(dst[0:], r0) - binary.LittleEndian.PutUint16(dst[2:], r1) - binary.LittleEndian.PutUint16(dst[4:], r2) - binary.LittleEndian.PutUint16(dst[6:], r3) -} - -func (c *rc2Cipher) Decrypt(dst, src []byte) { - - r0 := binary.LittleEndian.Uint16(src[0:]) - r1 := binary.LittleEndian.Uint16(src[2:]) - r2 := binary.LittleEndian.Uint16(src[4:]) - r3 := binary.LittleEndian.Uint16(src[6:]) - - j := 63 - - for j >= 44 { - // unmix r3 - r3 = bits.RotateLeft16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = bits.RotateLeft16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = bits.RotateLeft16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = bits.RotateLeft16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - } - - r3 = r3 - c.k[r2&63] - r2 = r2 - c.k[r1&63] - r1 = r1 - c.k[r0&63] - r0 = r0 - c.k[r3&63] - - for j >= 20 { - // unmix r3 - r3 = bits.RotateLeft16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = bits.RotateLeft16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = bits.RotateLeft16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = bits.RotateLeft16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - - } - - r3 = r3 - c.k[r2&63] - r2 = r2 - c.k[r1&63] - r1 = r1 - c.k[r0&63] - r0 = r0 - c.k[r3&63] - - for j >= 0 { - // unmix r3 - r3 = bits.RotateLeft16(r3, 16-5) - r3 = r3 - c.k[j] - (r2 & r1) - ((^r2) & r0) - j-- - - // unmix r2 - r2 = bits.RotateLeft16(r2, 16-3) - r2 = r2 - c.k[j] - (r1 & r0) - ((^r1) & r3) - j-- - - // unmix r1 - r1 = bits.RotateLeft16(r1, 16-2) - r1 = r1 - c.k[j] - (r0 & r3) - ((^r0) & r2) - j-- - - // unmix r0 - r0 = bits.RotateLeft16(r0, 16-1) - r0 = r0 - c.k[j] - (r3 & r2) - ((^r3) & r1) - j-- - - } - - binary.LittleEndian.PutUint16(dst[0:], r0) - binary.LittleEndian.PutUint16(dst[2:], r1) - binary.LittleEndian.PutUint16(dst[4:], r2) - binary.LittleEndian.PutUint16(dst[6:], r3) -} diff --git a/vendor/golang.org/x/crypto/pkcs12/mac.go b/vendor/golang.org/x/crypto/pkcs12/mac.go deleted file mode 100644 index 5f38aa7de8..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/mac.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "crypto/hmac" - "crypto/sha1" - "crypto/x509/pkix" - "encoding/asn1" -) - -type macData struct { - Mac digestInfo - MacSalt []byte - Iterations int `asn1:"optional,default:1"` -} - -// from PKCS#7: -type digestInfo struct { - Algorithm pkix.AlgorithmIdentifier - Digest []byte -} - -var ( - oidSHA1 = asn1.ObjectIdentifier([]int{1, 3, 14, 3, 2, 26}) -) - -func verifyMac(macData *macData, message, password []byte) error { - if !macData.Mac.Algorithm.Algorithm.Equal(oidSHA1) { - return NotImplementedError("unknown digest algorithm: " + macData.Mac.Algorithm.Algorithm.String()) - } - - key := pbkdf(sha1Sum, 20, 64, macData.MacSalt, password, macData.Iterations, 3, 20) - - mac := hmac.New(sha1.New, key) - mac.Write(message) - expectedMAC := mac.Sum(nil) - - if !hmac.Equal(macData.Mac.Digest, expectedMAC) { - return ErrIncorrectPassword - } - return nil -} diff --git a/vendor/golang.org/x/crypto/pkcs12/pbkdf.go b/vendor/golang.org/x/crypto/pkcs12/pbkdf.go deleted file mode 100644 index 5c419d41e3..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/pbkdf.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "bytes" - "crypto/sha1" - "math/big" -) - -var ( - one = big.NewInt(1) -) - -// sha1Sum returns the SHA-1 hash of in. -func sha1Sum(in []byte) []byte { - sum := sha1.Sum(in) - return sum[:] -} - -// fillWithRepeats returns v*ceiling(len(pattern) / v) bytes consisting of -// repeats of pattern. -func fillWithRepeats(pattern []byte, v int) []byte { - if len(pattern) == 0 { - return nil - } - outputLen := v * ((len(pattern) + v - 1) / v) - return bytes.Repeat(pattern, (outputLen+len(pattern)-1)/len(pattern))[:outputLen] -} - -func pbkdf(hash func([]byte) []byte, u, v int, salt, password []byte, r int, ID byte, size int) (key []byte) { - // implementation of https://tools.ietf.org/html/rfc7292#appendix-B.2 , RFC text verbatim in comments - - // Let H be a hash function built around a compression function f: - - // Z_2^u x Z_2^v -> Z_2^u - - // (that is, H has a chaining variable and output of length u bits, and - // the message input to the compression function of H is v bits). The - // values for u and v are as follows: - - // HASH FUNCTION VALUE u VALUE v - // MD2, MD5 128 512 - // SHA-1 160 512 - // SHA-224 224 512 - // SHA-256 256 512 - // SHA-384 384 1024 - // SHA-512 512 1024 - // SHA-512/224 224 1024 - // SHA-512/256 256 1024 - - // Furthermore, let r be the iteration count. - - // We assume here that u and v are both multiples of 8, as are the - // lengths of the password and salt strings (which we denote by p and s, - // respectively) and the number n of pseudorandom bits required. In - // addition, u and v are of course non-zero. - - // For information on security considerations for MD5 [19], see [25] and - // [1], and on those for MD2, see [18]. - - // The following procedure can be used to produce pseudorandom bits for - // a particular "purpose" that is identified by a byte called "ID". - // This standard specifies 3 different values for the ID byte: - - // 1. If ID=1, then the pseudorandom bits being produced are to be used - // as key material for performing encryption or decryption. - - // 2. If ID=2, then the pseudorandom bits being produced are to be used - // as an IV (Initial Value) for encryption or decryption. - - // 3. If ID=3, then the pseudorandom bits being produced are to be used - // as an integrity key for MACing. - - // 1. Construct a string, D (the "diversifier"), by concatenating v/8 - // copies of ID. - var D []byte - for i := 0; i < v; i++ { - D = append(D, ID) - } - - // 2. Concatenate copies of the salt together to create a string S of - // length v(ceiling(s/v)) bits (the final copy of the salt may be - // truncated to create S). Note that if the salt is the empty - // string, then so is S. - - S := fillWithRepeats(salt, v) - - // 3. Concatenate copies of the password together to create a string P - // of length v(ceiling(p/v)) bits (the final copy of the password - // may be truncated to create P). Note that if the password is the - // empty string, then so is P. - - P := fillWithRepeats(password, v) - - // 4. Set I=S||P to be the concatenation of S and P. - I := append(S, P...) - - // 5. Set c=ceiling(n/u). - c := (size + u - 1) / u - - // 6. For i=1, 2, ..., c, do the following: - A := make([]byte, c*20) - var IjBuf []byte - for i := 0; i < c; i++ { - // A. Set A2=H^r(D||I). (i.e., the r-th hash of D||1, - // H(H(H(... H(D||I)))) - Ai := hash(append(D, I...)) - for j := 1; j < r; j++ { - Ai = hash(Ai) - } - copy(A[i*20:], Ai[:]) - - if i < c-1 { // skip on last iteration - // B. Concatenate copies of Ai to create a string B of length v - // bits (the final copy of Ai may be truncated to create B). - var B []byte - for len(B) < v { - B = append(B, Ai[:]...) - } - B = B[:v] - - // C. Treating I as a concatenation I_0, I_1, ..., I_(k-1) of v-bit - // blocks, where k=ceiling(s/v)+ceiling(p/v), modify I by - // setting I_j=(I_j+B+1) mod 2^v for each j. - { - Bbi := new(big.Int).SetBytes(B) - Ij := new(big.Int) - - for j := 0; j < len(I)/v; j++ { - Ij.SetBytes(I[j*v : (j+1)*v]) - Ij.Add(Ij, Bbi) - Ij.Add(Ij, one) - Ijb := Ij.Bytes() - // We expect Ijb to be exactly v bytes, - // if it is longer or shorter we must - // adjust it accordingly. - if len(Ijb) > v { - Ijb = Ijb[len(Ijb)-v:] - } - if len(Ijb) < v { - if IjBuf == nil { - IjBuf = make([]byte, v) - } - bytesShort := v - len(Ijb) - for i := 0; i < bytesShort; i++ { - IjBuf[i] = 0 - } - copy(IjBuf[bytesShort:], Ijb) - Ijb = IjBuf - } - copy(I[j*v:(j+1)*v], Ijb) - } - } - } - } - // 7. Concatenate A_1, A_2, ..., A_c together to form a pseudorandom - // bit string, A. - - // 8. Use the first n bits of A as the output of this entire process. - return A[:size] - - // If the above process is being used to generate a DES key, the process - // should be used to create 64 random bits, and the key's parity bits - // should be set after the 64 bits have been produced. Similar concerns - // hold for 2-key and 3-key triple-DES keys, for CDMF keys, and for any - // similar keys with parity bits "built into them". -} diff --git a/vendor/golang.org/x/crypto/pkcs12/pkcs12.go b/vendor/golang.org/x/crypto/pkcs12/pkcs12.go deleted file mode 100644 index 374d9facf8..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/pkcs12.go +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright 2015 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 pkcs12 implements some of PKCS#12. -// -// This implementation is distilled from [RFC 7292] and referenced documents. -// It is intended for decoding P12/PFX-stored certificates and keys for use -// with the crypto/tls package. -// -// The pkcs12 package is [frozen] and is not accepting new features. -// If it's missing functionality you need, consider an alternative like -// software.sslmate.com/src/go-pkcs12. -// -// [RFC 7292]: https://datatracker.ietf.org/doc/html/rfc7292 -// [frozen]: https://go.dev/wiki/Frozen -package pkcs12 - -import ( - "crypto/ecdsa" - "crypto/rsa" - "crypto/x509" - "crypto/x509/pkix" - "encoding/asn1" - "encoding/hex" - "encoding/pem" - "errors" -) - -var ( - oidDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 1}) - oidEncryptedDataContentType = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 7, 6}) - - oidFriendlyName = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 20}) - oidLocalKeyID = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 21}) - oidMicrosoftCSPName = asn1.ObjectIdentifier([]int{1, 3, 6, 1, 4, 1, 311, 17, 1}) - - errUnknownAttributeOID = errors.New("pkcs12: unknown attribute OID") -) - -type pfxPdu struct { - Version int - AuthSafe contentInfo - MacData macData `asn1:"optional"` -} - -type contentInfo struct { - ContentType asn1.ObjectIdentifier - Content asn1.RawValue `asn1:"tag:0,explicit,optional"` -} - -type encryptedData struct { - Version int - EncryptedContentInfo encryptedContentInfo -} - -type encryptedContentInfo struct { - ContentType asn1.ObjectIdentifier - ContentEncryptionAlgorithm pkix.AlgorithmIdentifier - EncryptedContent []byte `asn1:"tag:0,optional"` -} - -func (i encryptedContentInfo) Algorithm() pkix.AlgorithmIdentifier { - return i.ContentEncryptionAlgorithm -} - -func (i encryptedContentInfo) Data() []byte { return i.EncryptedContent } - -type safeBag struct { - Id asn1.ObjectIdentifier - Value asn1.RawValue `asn1:"tag:0,explicit"` - Attributes []pkcs12Attribute `asn1:"set,optional"` -} - -type pkcs12Attribute struct { - Id asn1.ObjectIdentifier - Value asn1.RawValue `asn1:"set"` -} - -type encryptedPrivateKeyInfo struct { - AlgorithmIdentifier pkix.AlgorithmIdentifier - EncryptedData []byte -} - -func (i encryptedPrivateKeyInfo) Algorithm() pkix.AlgorithmIdentifier { - return i.AlgorithmIdentifier -} - -func (i encryptedPrivateKeyInfo) Data() []byte { - return i.EncryptedData -} - -// PEM block types -const ( - certificateType = "CERTIFICATE" - privateKeyType = "PRIVATE KEY" -) - -// unmarshal calls asn1.Unmarshal, but also returns an error if there is any -// trailing data after unmarshaling. -func unmarshal(in []byte, out interface{}) error { - trailing, err := asn1.Unmarshal(in, out) - if err != nil { - return err - } - if len(trailing) != 0 { - return errors.New("pkcs12: trailing data found") - } - return nil -} - -// ToPEM converts all "safe bags" contained in pfxData to PEM blocks. -// Unknown attributes are discarded. -// -// Note that although the returned PEM blocks for private keys have type -// "PRIVATE KEY", the bytes are not encoded according to PKCS #8, but according -// to PKCS #1 for RSA keys and SEC 1 for ECDSA keys. -func ToPEM(pfxData []byte, password string) ([]*pem.Block, error) { - encodedPassword, err := bmpString(password) - if err != nil { - return nil, ErrIncorrectPassword - } - - bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) - - if err != nil { - return nil, err - } - - blocks := make([]*pem.Block, 0, len(bags)) - for _, bag := range bags { - block, err := convertBag(&bag, encodedPassword) - if err != nil { - return nil, err - } - blocks = append(blocks, block) - } - - return blocks, nil -} - -func convertBag(bag *safeBag, password []byte) (*pem.Block, error) { - block := &pem.Block{ - Headers: make(map[string]string), - } - - for _, attribute := range bag.Attributes { - k, v, err := convertAttribute(&attribute) - if err == errUnknownAttributeOID { - continue - } - if err != nil { - return nil, err - } - block.Headers[k] = v - } - - switch { - case bag.Id.Equal(oidCertBag): - block.Type = certificateType - certsData, err := decodeCertBag(bag.Value.Bytes) - if err != nil { - return nil, err - } - block.Bytes = certsData - case bag.Id.Equal(oidPKCS8ShroundedKeyBag): - block.Type = privateKeyType - - key, err := decodePkcs8ShroudedKeyBag(bag.Value.Bytes, password) - if err != nil { - return nil, err - } - - switch key := key.(type) { - case *rsa.PrivateKey: - block.Bytes = x509.MarshalPKCS1PrivateKey(key) - case *ecdsa.PrivateKey: - block.Bytes, err = x509.MarshalECPrivateKey(key) - if err != nil { - return nil, err - } - default: - return nil, errors.New("found unknown private key type in PKCS#8 wrapping") - } - default: - return nil, errors.New("don't know how to convert a safe bag of type " + bag.Id.String()) - } - return block, nil -} - -func convertAttribute(attribute *pkcs12Attribute) (key, value string, err error) { - isString := false - - switch { - case attribute.Id.Equal(oidFriendlyName): - key = "friendlyName" - isString = true - case attribute.Id.Equal(oidLocalKeyID): - key = "localKeyId" - case attribute.Id.Equal(oidMicrosoftCSPName): - // This key is chosen to match OpenSSL. - key = "Microsoft CSP Name" - isString = true - default: - return "", "", errUnknownAttributeOID - } - - if isString { - if err := unmarshal(attribute.Value.Bytes, &attribute.Value); err != nil { - return "", "", err - } - if value, err = decodeBMPString(attribute.Value.Bytes); err != nil { - return "", "", err - } - } else { - var id []byte - if err := unmarshal(attribute.Value.Bytes, &id); err != nil { - return "", "", err - } - value = hex.EncodeToString(id) - } - - return key, value, nil -} - -// Decode extracts a certificate and private key from pfxData. This function -// assumes that there is only one certificate and only one private key in the -// pfxData; if there are more use ToPEM instead. -func Decode(pfxData []byte, password string) (privateKey interface{}, certificate *x509.Certificate, err error) { - encodedPassword, err := bmpString(password) - if err != nil { - return nil, nil, err - } - - bags, encodedPassword, err := getSafeContents(pfxData, encodedPassword) - if err != nil { - return nil, nil, err - } - - if len(bags) != 2 { - err = errors.New("pkcs12: expected exactly two safe bags in the PFX PDU") - return - } - - for _, bag := range bags { - switch { - case bag.Id.Equal(oidCertBag): - if certificate != nil { - err = errors.New("pkcs12: expected exactly one certificate bag") - } - - certsData, err := decodeCertBag(bag.Value.Bytes) - if err != nil { - return nil, nil, err - } - certs, err := x509.ParseCertificates(certsData) - if err != nil { - return nil, nil, err - } - if len(certs) != 1 { - err = errors.New("pkcs12: expected exactly one certificate in the certBag") - return nil, nil, err - } - certificate = certs[0] - - case bag.Id.Equal(oidPKCS8ShroundedKeyBag): - if privateKey != nil { - err = errors.New("pkcs12: expected exactly one key bag") - return nil, nil, err - } - - if privateKey, err = decodePkcs8ShroudedKeyBag(bag.Value.Bytes, encodedPassword); err != nil { - return nil, nil, err - } - } - } - - if certificate == nil { - return nil, nil, errors.New("pkcs12: certificate missing") - } - if privateKey == nil { - return nil, nil, errors.New("pkcs12: private key missing") - } - - return -} - -func getSafeContents(p12Data, password []byte) (bags []safeBag, updatedPassword []byte, err error) { - pfx := new(pfxPdu) - if err := unmarshal(p12Data, pfx); err != nil { - return nil, nil, errors.New("pkcs12: error reading P12 data: " + err.Error()) - } - - if pfx.Version != 3 { - return nil, nil, NotImplementedError("can only decode v3 PFX PDU's") - } - - if !pfx.AuthSafe.ContentType.Equal(oidDataContentType) { - return nil, nil, NotImplementedError("only password-protected PFX is implemented") - } - - // unmarshal the explicit bytes in the content for type 'data' - if err := unmarshal(pfx.AuthSafe.Content.Bytes, &pfx.AuthSafe.Content); err != nil { - return nil, nil, err - } - - if len(pfx.MacData.Mac.Algorithm.Algorithm) == 0 { - return nil, nil, errors.New("pkcs12: no MAC in data") - } - - if err := verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password); err != nil { - if err == ErrIncorrectPassword && len(password) == 2 && password[0] == 0 && password[1] == 0 { - // some implementations use an empty byte array - // for the empty string password try one more - // time with empty-empty password - password = nil - err = verifyMac(&pfx.MacData, pfx.AuthSafe.Content.Bytes, password) - } - if err != nil { - return nil, nil, err - } - } - - var authenticatedSafe []contentInfo - if err := unmarshal(pfx.AuthSafe.Content.Bytes, &authenticatedSafe); err != nil { - return nil, nil, err - } - - if len(authenticatedSafe) != 2 { - return nil, nil, NotImplementedError("expected exactly two items in the authenticated safe") - } - - for _, ci := range authenticatedSafe { - var data []byte - - switch { - case ci.ContentType.Equal(oidDataContentType): - if err := unmarshal(ci.Content.Bytes, &data); err != nil { - return nil, nil, err - } - case ci.ContentType.Equal(oidEncryptedDataContentType): - var encryptedData encryptedData - if err := unmarshal(ci.Content.Bytes, &encryptedData); err != nil { - return nil, nil, err - } - if encryptedData.Version != 0 { - return nil, nil, NotImplementedError("only version 0 of EncryptedData is supported") - } - if data, err = pbDecrypt(encryptedData.EncryptedContentInfo, password); err != nil { - return nil, nil, err - } - default: - return nil, nil, NotImplementedError("only data and encryptedData content types are supported in authenticated safe") - } - - var safeContents []safeBag - if err := unmarshal(data, &safeContents); err != nil { - return nil, nil, err - } - bags = append(bags, safeContents...) - } - - return bags, password, nil -} diff --git a/vendor/golang.org/x/crypto/pkcs12/safebags.go b/vendor/golang.org/x/crypto/pkcs12/safebags.go deleted file mode 100644 index def1f7b98d..0000000000 --- a/vendor/golang.org/x/crypto/pkcs12/safebags.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2015 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 pkcs12 - -import ( - "crypto/x509" - "encoding/asn1" - "errors" -) - -var ( - // see https://tools.ietf.org/html/rfc7292#appendix-D - oidCertTypeX509Certificate = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 9, 22, 1}) - oidPKCS8ShroundedKeyBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 2}) - oidCertBag = asn1.ObjectIdentifier([]int{1, 2, 840, 113549, 1, 12, 10, 1, 3}) -) - -type certBag struct { - Id asn1.ObjectIdentifier - Data []byte `asn1:"tag:0,explicit"` -} - -func decodePkcs8ShroudedKeyBag(asn1Data, password []byte) (privateKey interface{}, err error) { - pkinfo := new(encryptedPrivateKeyInfo) - if err = unmarshal(asn1Data, pkinfo); err != nil { - return nil, errors.New("pkcs12: error decoding PKCS#8 shrouded key bag: " + err.Error()) - } - - pkData, err := pbDecrypt(pkinfo, password) - if err != nil { - return nil, errors.New("pkcs12: error decrypting PKCS#8 shrouded key bag: " + err.Error()) - } - - ret := new(asn1.RawValue) - if err = unmarshal(pkData, ret); err != nil { - return nil, errors.New("pkcs12: error unmarshaling decrypted private key: " + err.Error()) - } - - if privateKey, err = x509.ParsePKCS8PrivateKey(pkData); err != nil { - return nil, errors.New("pkcs12: error parsing PKCS#8 private key: " + err.Error()) - } - - return privateKey, nil -} - -func decodeCertBag(asn1Data []byte) (x509Certificates []byte, err error) { - bag := new(certBag) - if err := unmarshal(asn1Data, bag); err != nil { - return nil, errors.New("pkcs12: error decoding cert bag: " + err.Error()) - } - if !bag.Id.Equal(oidCertTypeX509Certificate) { - return nil, NotImplementedError("only X509 certificates are supported") - } - return bag.Data, nil -} diff --git a/vendor/golang.org/x/exp/LICENSE b/vendor/golang.org/x/exp/LICENSE deleted file mode 100644 index 2a7cf70da6..0000000000 --- a/vendor/golang.org/x/exp/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2009 The Go Authors. - -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 LLC 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/exp/PATENTS b/vendor/golang.org/x/exp/PATENTS deleted file mode 100644 index 733099041f..0000000000 --- a/vendor/golang.org/x/exp/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/exp/constraints/constraints.go b/vendor/golang.org/x/exp/constraints/constraints.go deleted file mode 100644 index 9d260bab19..0000000000 --- a/vendor/golang.org/x/exp/constraints/constraints.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2021 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 constraints defines a set of useful constraints to be used -// with type parameters. -package constraints - -import "cmp" - -// Signed is a constraint that permits any signed integer type. -// If future releases of Go add new predeclared signed integer types, -// this constraint will be modified to include them. -type Signed interface { - ~int | ~int8 | ~int16 | ~int32 | ~int64 -} - -// Unsigned is a constraint that permits any unsigned integer type. -// If future releases of Go add new predeclared unsigned integer types, -// this constraint will be modified to include them. -type Unsigned interface { - ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr -} - -// Integer is a constraint that permits any integer type. -// If future releases of Go add new predeclared integer types, -// this constraint will be modified to include them. -type Integer interface { - Signed | Unsigned -} - -// Float is a constraint that permits any floating-point type. -// If future releases of Go add new predeclared floating-point types, -// this constraint will be modified to include them. -type Float interface { - ~float32 | ~float64 -} - -// Complex is a constraint that permits any complex numeric type. -// If future releases of Go add new predeclared complex numeric types, -// this constraint will be modified to include them. -type Complex interface { - ~complex64 | ~complex128 -} - -// Ordered is a constraint that permits any ordered type: any type -// that supports the operators < <= >= >. -// If future releases of Go add new ordered types, -// this constraint will be modified to include them. -// -// This type is redundant since Go 1.21 introduced [cmp.Ordered]. -// -//go:fix inline -type Ordered = cmp.Ordered diff --git a/vendor/golang.org/x/net/internal/socks/client.go b/vendor/golang.org/x/net/internal/socks/client.go deleted file mode 100644 index 3d6f516a59..0000000000 --- a/vendor/golang.org/x/net/internal/socks/client.go +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright 2018 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 socks - -import ( - "context" - "errors" - "io" - "net" - "strconv" - "time" -) - -var ( - noDeadline = time.Time{} - aLongTimeAgo = time.Unix(1, 0) -) - -func (d *Dialer) connect(ctx context.Context, c net.Conn, address string) (_ net.Addr, ctxErr error) { - host, port, err := splitHostPort(address) - if err != nil { - return nil, err - } - if deadline, ok := ctx.Deadline(); ok && !deadline.IsZero() { - c.SetDeadline(deadline) - defer c.SetDeadline(noDeadline) - } - if ctx != context.Background() { - errCh := make(chan error, 1) - done := make(chan struct{}) - defer func() { - close(done) - if ctxErr == nil { - ctxErr = <-errCh - } - }() - go func() { - select { - case <-ctx.Done(): - c.SetDeadline(aLongTimeAgo) - errCh <- ctx.Err() - case <-done: - errCh <- nil - } - }() - } - - b := make([]byte, 0, 6+len(host)) // the size here is just an estimate - b = append(b, Version5) - if len(d.AuthMethods) == 0 || d.Authenticate == nil { - b = append(b, 1, byte(AuthMethodNotRequired)) - } else { - ams := d.AuthMethods - if len(ams) > 255 { - return nil, errors.New("too many authentication methods") - } - b = append(b, byte(len(ams))) - for _, am := range ams { - b = append(b, byte(am)) - } - } - if _, ctxErr = c.Write(b); ctxErr != nil { - return - } - - if _, ctxErr = io.ReadFull(c, b[:2]); ctxErr != nil { - return - } - if b[0] != Version5 { - return nil, errors.New("unexpected protocol version " + strconv.Itoa(int(b[0]))) - } - am := AuthMethod(b[1]) - if am == AuthMethodNoAcceptableMethods { - return nil, errors.New("no acceptable authentication methods") - } - if d.Authenticate != nil { - if ctxErr = d.Authenticate(ctx, c, am); ctxErr != nil { - return - } - } - - b = b[:0] - b = append(b, Version5, byte(d.cmd), 0) - if ip := net.ParseIP(host); ip != nil { - if ip4 := ip.To4(); ip4 != nil { - b = append(b, AddrTypeIPv4) - b = append(b, ip4...) - } else if ip6 := ip.To16(); ip6 != nil { - b = append(b, AddrTypeIPv6) - b = append(b, ip6...) - } else { - return nil, errors.New("unknown address type") - } - } else { - if len(host) > 255 { - return nil, errors.New("FQDN too long") - } - b = append(b, AddrTypeFQDN) - b = append(b, byte(len(host))) - b = append(b, host...) - } - b = append(b, byte(port>>8), byte(port)) - if _, ctxErr = c.Write(b); ctxErr != nil { - return - } - - if _, ctxErr = io.ReadFull(c, b[:4]); ctxErr != nil { - return - } - if b[0] != Version5 { - return nil, errors.New("unexpected protocol version " + strconv.Itoa(int(b[0]))) - } - if cmdErr := Reply(b[1]); cmdErr != StatusSucceeded { - return nil, errors.New("unknown error " + cmdErr.String()) - } - if b[2] != 0 { - return nil, errors.New("non-zero reserved field") - } - l := 2 - var a Addr - switch b[3] { - case AddrTypeIPv4: - l += net.IPv4len - a.IP = make(net.IP, net.IPv4len) - case AddrTypeIPv6: - l += net.IPv6len - a.IP = make(net.IP, net.IPv6len) - case AddrTypeFQDN: - if _, err := io.ReadFull(c, b[:1]); err != nil { - return nil, err - } - l += int(b[0]) - default: - return nil, errors.New("unknown address type " + strconv.Itoa(int(b[3]))) - } - if cap(b) < l { - b = make([]byte, l) - } else { - b = b[:l] - } - if _, ctxErr = io.ReadFull(c, b); ctxErr != nil { - return - } - if a.IP != nil { - copy(a.IP, b) - } else { - a.Name = string(b[:len(b)-2]) - } - a.Port = int(b[len(b)-2])<<8 | int(b[len(b)-1]) - return &a, nil -} - -func splitHostPort(address string) (string, int, error) { - host, port, err := net.SplitHostPort(address) - if err != nil { - return "", 0, err - } - portnum, err := strconv.Atoi(port) - if err != nil { - return "", 0, err - } - if 1 > portnum || portnum > 0xffff { - return "", 0, errors.New("port number out of range " + port) - } - return host, portnum, nil -} diff --git a/vendor/golang.org/x/net/internal/socks/socks.go b/vendor/golang.org/x/net/internal/socks/socks.go deleted file mode 100644 index 8eedb84cec..0000000000 --- a/vendor/golang.org/x/net/internal/socks/socks.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2018 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 socks provides a SOCKS version 5 client implementation. -// -// SOCKS protocol version 5 is defined in RFC 1928. -// Username/Password authentication for SOCKS version 5 is defined in -// RFC 1929. -package socks - -import ( - "context" - "errors" - "io" - "net" - "strconv" -) - -// A Command represents a SOCKS command. -type Command int - -func (cmd Command) String() string { - switch cmd { - case CmdConnect: - return "socks connect" - case cmdBind: - return "socks bind" - default: - return "socks " + strconv.Itoa(int(cmd)) - } -} - -// An AuthMethod represents a SOCKS authentication method. -type AuthMethod int - -// A Reply represents a SOCKS command reply code. -type Reply int - -func (code Reply) String() string { - switch code { - case StatusSucceeded: - return "succeeded" - case 0x01: - return "general SOCKS server failure" - case 0x02: - return "connection not allowed by ruleset" - case 0x03: - return "network unreachable" - case 0x04: - return "host unreachable" - case 0x05: - return "connection refused" - case 0x06: - return "TTL expired" - case 0x07: - return "command not supported" - case 0x08: - return "address type not supported" - default: - return "unknown code: " + strconv.Itoa(int(code)) - } -} - -// Wire protocol constants. -const ( - Version5 = 0x05 - - AddrTypeIPv4 = 0x01 - AddrTypeFQDN = 0x03 - AddrTypeIPv6 = 0x04 - - CmdConnect Command = 0x01 // establishes an active-open forward proxy connection - cmdBind Command = 0x02 // establishes a passive-open forward proxy connection - - AuthMethodNotRequired AuthMethod = 0x00 // no authentication required - AuthMethodUsernamePassword AuthMethod = 0x02 // use username/password - AuthMethodNoAcceptableMethods AuthMethod = 0xff // no acceptable authentication methods - - StatusSucceeded Reply = 0x00 -) - -// An Addr represents a SOCKS-specific address. -// Either Name or IP is used exclusively. -type Addr struct { - Name string // fully-qualified domain name - IP net.IP - Port int -} - -func (a *Addr) Network() string { return "socks" } - -func (a *Addr) String() string { - if a == nil { - return "" - } - port := strconv.Itoa(a.Port) - if a.IP == nil { - return net.JoinHostPort(a.Name, port) - } - return net.JoinHostPort(a.IP.String(), port) -} - -// A Conn represents a forward proxy connection. -type Conn struct { - net.Conn - - boundAddr net.Addr -} - -// BoundAddr returns the address assigned by the proxy server for -// connecting to the command target address from the proxy server. -func (c *Conn) BoundAddr() net.Addr { - if c == nil { - return nil - } - return c.boundAddr -} - -// A Dialer holds SOCKS-specific options. -type Dialer struct { - cmd Command // either CmdConnect or cmdBind - proxyNetwork string // network between a proxy server and a client - proxyAddress string // proxy server address - - // ProxyDial specifies the optional dial function for - // establishing the transport connection. - ProxyDial func(context.Context, string, string) (net.Conn, error) - - // AuthMethods specifies the list of request authentication - // methods. - // If empty, SOCKS client requests only AuthMethodNotRequired. - AuthMethods []AuthMethod - - // Authenticate specifies the optional authentication - // function. It must be non-nil when AuthMethods is not empty. - // It must return an error when the authentication is failed. - Authenticate func(context.Context, io.ReadWriter, AuthMethod) error -} - -// DialContext connects to the provided address on the provided -// network. -// -// The returned error value may be a net.OpError. When the Op field of -// net.OpError contains "socks", the Source field contains a proxy -// server address and the Addr field contains a command target -// address. -// -// See func Dial of the net package of standard library for a -// description of the network and address parameters. -func (d *Dialer) DialContext(ctx context.Context, network, address string) (net.Conn, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if ctx == nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: errors.New("nil context")} - } - var err error - var c net.Conn - if d.ProxyDial != nil { - c, err = d.ProxyDial(ctx, d.proxyNetwork, d.proxyAddress) - } else { - var dd net.Dialer - c, err = dd.DialContext(ctx, d.proxyNetwork, d.proxyAddress) - } - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - a, err := d.connect(ctx, c, address) - if err != nil { - c.Close() - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - return &Conn{Conn: c, boundAddr: a}, nil -} - -// DialWithConn initiates a connection from SOCKS server to the target -// network and address using the connection c that is already -// connected to the SOCKS server. -// -// It returns the connection's local address assigned by the SOCKS -// server. -func (d *Dialer) DialWithConn(ctx context.Context, c net.Conn, network, address string) (net.Addr, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if ctx == nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: errors.New("nil context")} - } - a, err := d.connect(ctx, c, address) - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - return a, nil -} - -// Dial connects to the provided address on the provided network. -// -// Unlike DialContext, it returns a raw transport connection instead -// of a forward proxy connection. -// -// Deprecated: Use DialContext or DialWithConn instead. -func (d *Dialer) Dial(network, address string) (net.Conn, error) { - if err := d.validateTarget(network, address); err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - var err error - var c net.Conn - if d.ProxyDial != nil { - c, err = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress) - } else { - c, err = net.Dial(d.proxyNetwork, d.proxyAddress) - } - if err != nil { - proxy, dst, _ := d.pathAddrs(address) - return nil, &net.OpError{Op: d.cmd.String(), Net: network, Source: proxy, Addr: dst, Err: err} - } - if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil { - c.Close() - return nil, err - } - return c, nil -} - -func (d *Dialer) validateTarget(network, address string) error { - switch network { - case "tcp", "tcp6", "tcp4": - default: - return errors.New("network not implemented") - } - switch d.cmd { - case CmdConnect, cmdBind: - default: - return errors.New("command not implemented") - } - return nil -} - -func (d *Dialer) pathAddrs(address string) (proxy, dst net.Addr, err error) { - for i, s := range []string{d.proxyAddress, address} { - host, port, err := splitHostPort(s) - if err != nil { - return nil, nil, err - } - a := &Addr{Port: port} - a.IP = net.ParseIP(host) - if a.IP == nil { - a.Name = host - } - if i == 0 { - proxy = a - } else { - dst = a - } - } - return -} - -// NewDialer returns a new Dialer that dials through the provided -// proxy server's network and address. -func NewDialer(network, address string) *Dialer { - return &Dialer{proxyNetwork: network, proxyAddress: address, cmd: CmdConnect} -} - -const ( - authUsernamePasswordVersion = 0x01 - authStatusSucceeded = 0x00 -) - -// UsernamePassword are the credentials for the username/password -// authentication method. -type UsernamePassword struct { - Username string - Password string -} - -// Authenticate authenticates a pair of username and password with the -// proxy server. -func (up *UsernamePassword) Authenticate(ctx context.Context, rw io.ReadWriter, auth AuthMethod) error { - switch auth { - case AuthMethodNotRequired: - return nil - case AuthMethodUsernamePassword: - if len(up.Username) == 0 || len(up.Username) > 255 || len(up.Password) > 255 { - return errors.New("invalid username/password") - } - b := []byte{authUsernamePasswordVersion} - b = append(b, byte(len(up.Username))) - b = append(b, up.Username...) - b = append(b, byte(len(up.Password))) - b = append(b, up.Password...) - // TODO(mikio): handle IO deadlines and cancellation if - // necessary - if _, err := rw.Write(b); err != nil { - return err - } - if _, err := io.ReadFull(rw, b[:2]); err != nil { - return err - } - if b[0] != authUsernamePasswordVersion { - return errors.New("invalid username/password version") - } - if b[1] != authStatusSucceeded { - return errors.New("username/password authentication failed") - } - return nil - } - return errors.New("unsupported authentication method " + strconv.Itoa(int(auth))) -} diff --git a/vendor/golang.org/x/net/proxy/dial.go b/vendor/golang.org/x/net/proxy/dial.go deleted file mode 100644 index 811c2e4e96..0000000000 --- a/vendor/golang.org/x/net/proxy/dial.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2019 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 proxy - -import ( - "context" - "net" -) - -// A ContextDialer dials using a context. -type ContextDialer interface { - DialContext(ctx context.Context, network, address string) (net.Conn, error) -} - -// Dial works like DialContext on net.Dialer but using a dialer returned by FromEnvironment. -// -// The passed ctx is only used for returning the Conn, not the lifetime of the Conn. -// -// Custom dialers (registered via RegisterDialerType) that do not implement ContextDialer -// can leak a goroutine for as long as it takes the underlying Dialer implementation to timeout. -// -// A Conn returned from a successful Dial after the context has been cancelled will be immediately closed. -func Dial(ctx context.Context, network, address string) (net.Conn, error) { - d := FromEnvironment() - if xd, ok := d.(ContextDialer); ok { - return xd.DialContext(ctx, network, address) - } - return dialContext(ctx, d, network, address) -} - -// WARNING: this can leak a goroutine for as long as the underlying Dialer implementation takes to timeout -// A Conn returned from a successful Dial after the context has been cancelled will be immediately closed. -func dialContext(ctx context.Context, d Dialer, network, address string) (net.Conn, error) { - var ( - conn net.Conn - done = make(chan struct{}, 1) - err error - ) - go func() { - conn, err = d.Dial(network, address) - close(done) - if conn != nil && ctx.Err() != nil { - conn.Close() - } - }() - select { - case <-ctx.Done(): - err = ctx.Err() - case <-done: - } - return conn, err -} diff --git a/vendor/golang.org/x/net/proxy/direct.go b/vendor/golang.org/x/net/proxy/direct.go deleted file mode 100644 index 3d66bdef9d..0000000000 --- a/vendor/golang.org/x/net/proxy/direct.go +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2011 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 proxy - -import ( - "context" - "net" -) - -type direct struct{} - -// Direct implements Dialer by making network connections directly using net.Dial or net.DialContext. -var Direct = direct{} - -var ( - _ Dialer = Direct - _ ContextDialer = Direct -) - -// Dial directly invokes net.Dial with the supplied parameters. -func (direct) Dial(network, addr string) (net.Conn, error) { - return net.Dial(network, addr) -} - -// DialContext instantiates a net.Dialer and invokes its DialContext receiver with the supplied parameters. -func (direct) DialContext(ctx context.Context, network, addr string) (net.Conn, error) { - var d net.Dialer - return d.DialContext(ctx, network, addr) -} diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go deleted file mode 100644 index 32bdf435ec..0000000000 --- a/vendor/golang.org/x/net/proxy/per_host.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2011 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 proxy - -import ( - "context" - "net" - "net/netip" - "strings" -) - -// A PerHost directs connections to a default Dialer unless the host name -// requested matches one of a number of exceptions. -type PerHost struct { - def, bypass Dialer - - bypassNetworks []*net.IPNet - bypassIPs []net.IP - bypassZones []string - bypassHosts []string -} - -// NewPerHost returns a PerHost Dialer that directs connections to either -// defaultDialer or bypass, depending on whether the connection matches one of -// the configured rules. -func NewPerHost(defaultDialer, bypass Dialer) *PerHost { - return &PerHost{ - def: defaultDialer, - bypass: bypass, - } -} - -// Dial connects to the address addr on the given network through either -// defaultDialer or bypass. -func (p *PerHost) Dial(network, addr string) (c net.Conn, err error) { - host, _, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - - return p.dialerForRequest(host).Dial(network, addr) -} - -// DialContext connects to the address addr on the given network through either -// defaultDialer or bypass. -func (p *PerHost) DialContext(ctx context.Context, network, addr string) (c net.Conn, err error) { - host, _, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - d := p.dialerForRequest(host) - if x, ok := d.(ContextDialer); ok { - return x.DialContext(ctx, network, addr) - } - return dialContext(ctx, d, network, addr) -} - -func (p *PerHost) dialerForRequest(host string) Dialer { - if nip, err := netip.ParseAddr(host); err == nil { - ip := net.IP(nip.AsSlice()) - for _, net := range p.bypassNetworks { - if net.Contains(ip) { - return p.bypass - } - } - for _, bypassIP := range p.bypassIPs { - if bypassIP.Equal(ip) { - return p.bypass - } - } - return p.def - } - - for _, zone := range p.bypassZones { - if strings.HasSuffix(host, zone) { - return p.bypass - } - if host == zone[1:] { - // For a zone ".example.com", we match "example.com" - // too. - return p.bypass - } - } - for _, bypassHost := range p.bypassHosts { - if bypassHost == host { - return p.bypass - } - } - return p.def -} - -// AddFromString parses a string that contains comma-separated values -// specifying hosts that should use the bypass proxy. Each value is either an -// IP address, a CIDR range, a zone (*.example.com) or a host name -// (localhost). A best effort is made to parse the string and errors are -// ignored. -func (p *PerHost) AddFromString(s string) { - hosts := strings.Split(s, ",") - for _, host := range hosts { - host = strings.TrimSpace(host) - if len(host) == 0 { - continue - } - if strings.Contains(host, "/") { - // We assume that it's a CIDR address like 127.0.0.0/8 - if _, net, err := net.ParseCIDR(host); err == nil { - p.AddNetwork(net) - } - continue - } - if nip, err := netip.ParseAddr(host); err == nil { - p.AddIP(net.IP(nip.AsSlice())) - continue - } - if strings.HasPrefix(host, "*.") { - p.AddZone(host[1:]) - continue - } - p.AddHost(host) - } -} - -// AddIP specifies an IP address that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match an IP. -func (p *PerHost) AddIP(ip net.IP) { - p.bypassIPs = append(p.bypassIPs, ip) -} - -// AddNetwork specifies an IP range that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match. -func (p *PerHost) AddNetwork(net *net.IPNet) { - p.bypassNetworks = append(p.bypassNetworks, net) -} - -// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of -// "example.com" matches "example.com" and all of its subdomains. -func (p *PerHost) AddZone(zone string) { - zone = strings.TrimSuffix(zone, ".") - if !strings.HasPrefix(zone, ".") { - zone = "." + zone - } - p.bypassZones = append(p.bypassZones, zone) -} - -// AddHost specifies a host name that will use the bypass proxy. -func (p *PerHost) AddHost(host string) { - host = strings.TrimSuffix(host, ".") - p.bypassHosts = append(p.bypassHosts, host) -} diff --git a/vendor/golang.org/x/net/proxy/proxy.go b/vendor/golang.org/x/net/proxy/proxy.go deleted file mode 100644 index 9ff4b9a776..0000000000 --- a/vendor/golang.org/x/net/proxy/proxy.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2011 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 proxy provides support for a variety of protocols to proxy network -// data. -package proxy // import "golang.org/x/net/proxy" - -import ( - "errors" - "net" - "net/url" - "os" - "sync" -) - -// A Dialer is a means to establish a connection. -// Custom dialers should also implement ContextDialer. -type Dialer interface { - // Dial connects to the given address via the proxy. - Dial(network, addr string) (c net.Conn, err error) -} - -// Auth contains authentication parameters that specific Dialers may require. -type Auth struct { - User, Password string -} - -// FromEnvironment returns the dialer specified by the proxy-related -// variables in the environment and makes underlying connections -// directly. -func FromEnvironment() Dialer { - return FromEnvironmentUsing(Direct) -} - -// FromEnvironmentUsing returns the dialer specify by the proxy-related -// variables in the environment and makes underlying connections -// using the provided forwarding Dialer (for instance, a *net.Dialer -// with desired configuration). -func FromEnvironmentUsing(forward Dialer) Dialer { - allProxy := allProxyEnv.Get() - if len(allProxy) == 0 { - return forward - } - - proxyURL, err := url.Parse(allProxy) - if err != nil { - return forward - } - proxy, err := FromURL(proxyURL, forward) - if err != nil { - return forward - } - - noProxy := noProxyEnv.Get() - if len(noProxy) == 0 { - return proxy - } - - perHost := NewPerHost(proxy, forward) - perHost.AddFromString(noProxy) - return perHost -} - -// proxySchemes is a map from URL schemes to a function that creates a Dialer -// from a URL with such a scheme. -var proxySchemes map[string]func(*url.URL, Dialer) (Dialer, error) - -// RegisterDialerType takes a URL scheme and a function to generate Dialers from -// a URL with that scheme and a forwarding Dialer. Registered schemes are used -// by FromURL. -func RegisterDialerType(scheme string, f func(*url.URL, Dialer) (Dialer, error)) { - if proxySchemes == nil { - proxySchemes = make(map[string]func(*url.URL, Dialer) (Dialer, error)) - } - proxySchemes[scheme] = f -} - -// FromURL returns a Dialer given a URL specification and an underlying -// Dialer for it to make network requests. -func FromURL(u *url.URL, forward Dialer) (Dialer, error) { - var auth *Auth - if u.User != nil { - auth = new(Auth) - auth.User = u.User.Username() - if p, ok := u.User.Password(); ok { - auth.Password = p - } - } - - switch u.Scheme { - case "socks5", "socks5h": - addr := u.Hostname() - port := u.Port() - if port == "" { - port = "1080" - } - return SOCKS5("tcp", net.JoinHostPort(addr, port), auth, forward) - } - - // If the scheme doesn't match any of the built-in schemes, see if it - // was registered by another package. - if proxySchemes != nil { - if f, ok := proxySchemes[u.Scheme]; ok { - return f(u, forward) - } - } - - return nil, errors.New("proxy: unknown scheme: " + u.Scheme) -} - -var ( - allProxyEnv = &envOnce{ - names: []string{"ALL_PROXY", "all_proxy"}, - } - noProxyEnv = &envOnce{ - names: []string{"NO_PROXY", "no_proxy"}, - } -) - -// envOnce looks up an environment variable (optionally by multiple -// names) once. It mitigates expensive lookups on some platforms -// (e.g. Windows). -// (Borrowed from net/http/transport.go) -type envOnce struct { - names []string - once sync.Once - val string -} - -func (e *envOnce) Get() string { - e.once.Do(e.init) - return e.val -} - -func (e *envOnce) init() { - for _, n := range e.names { - e.val = os.Getenv(n) - if e.val != "" { - return - } - } -} - -// reset is used by tests -func (e *envOnce) reset() { - e.once = sync.Once{} - e.val = "" -} diff --git a/vendor/golang.org/x/net/proxy/socks5.go b/vendor/golang.org/x/net/proxy/socks5.go deleted file mode 100644 index c91651f96d..0000000000 --- a/vendor/golang.org/x/net/proxy/socks5.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2011 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 proxy - -import ( - "context" - "net" - - "golang.org/x/net/internal/socks" -) - -// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given -// address with an optional username and password. -// See RFC 1928 and RFC 1929. -func SOCKS5(network, address string, auth *Auth, forward Dialer) (Dialer, error) { - d := socks.NewDialer(network, address) - if forward != nil { - if f, ok := forward.(ContextDialer); ok { - d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { - return f.DialContext(ctx, network, address) - } - } else { - d.ProxyDial = func(ctx context.Context, network string, address string) (net.Conn, error) { - return dialContext(ctx, forward, network, address) - } - } - } - if auth != nil { - up := socks.UsernamePassword{ - Username: auth.User, - Password: auth.Password, - } - d.AuthMethods = []socks.AuthMethod{ - socks.AuthMethodNotRequired, - socks.AuthMethodUsernamePassword, - } - d.Authenticate = up.Authenticate - } - return d, nil -} diff --git a/vendor/golang.org/x/oauth2/authhandler/authhandler.go b/vendor/golang.org/x/oauth2/authhandler/authhandler.go deleted file mode 100644 index 46d1396f1f..0000000000 --- a/vendor/golang.org/x/oauth2/authhandler/authhandler.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2021 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 authhandler implements a TokenSource to support -// "three-legged OAuth 2.0" via a custom AuthorizationHandler. -package authhandler - -import ( - "context" - "errors" - - "golang.org/x/oauth2" -) - -const ( - // Parameter keys for AuthCodeURL method to support PKCE. - codeChallengeKey = "code_challenge" - codeChallengeMethodKey = "code_challenge_method" - - // Parameter key for Exchange method to support PKCE. - codeVerifierKey = "code_verifier" -) - -// PKCEParams holds parameters to support PKCE. -type PKCEParams struct { - Challenge string // The unpadded, base64-url-encoded string of the encrypted code verifier. - ChallengeMethod string // The encryption method (ex. S256). - Verifier string // The original, non-encrypted secret. -} - -// AuthorizationHandler is a 3-legged-OAuth helper that prompts -// the user for OAuth consent at the specified auth code URL -// and returns an auth code and state upon approval. -type AuthorizationHandler func(authCodeURL string) (code string, state string, err error) - -// TokenSourceWithPKCE is an enhanced version of [oauth2.TokenSource] with PKCE support. -// -// The pkce parameter supports PKCE flow, which uses code challenge and code verifier -// to prevent CSRF attacks. A unique code challenge and code verifier should be generated -// by the caller at runtime. See https://www.oauth.com/oauth2-servers/pkce/ for more info. -func TokenSourceWithPKCE(ctx context.Context, config *oauth2.Config, state string, authHandler AuthorizationHandler, pkce *PKCEParams) oauth2.TokenSource { - return oauth2.ReuseTokenSource(nil, authHandlerSource{config: config, ctx: ctx, authHandler: authHandler, state: state, pkce: pkce}) -} - -// TokenSource returns an [oauth2.TokenSource] that fetches access tokens -// using 3-legged-OAuth flow. -// -// The provided [context.Context] is used for oauth2 Exchange operation. -// -// The provided [oauth2.Config] should be a full configuration containing AuthURL, -// TokenURL, and Scope. -// -// An environment-specific AuthorizationHandler is used to obtain user consent. -// -// Per the OAuth protocol, a unique "state" string should be specified here. -// This token source will verify that the "state" is identical in the request -// and response before exchanging the auth code for OAuth token to prevent CSRF -// attacks. -func TokenSource(ctx context.Context, config *oauth2.Config, state string, authHandler AuthorizationHandler) oauth2.TokenSource { - return TokenSourceWithPKCE(ctx, config, state, authHandler, nil) -} - -type authHandlerSource struct { - ctx context.Context - config *oauth2.Config - authHandler AuthorizationHandler - state string - pkce *PKCEParams -} - -func (source authHandlerSource) Token() (*oauth2.Token, error) { - // Step 1: Obtain auth code. - var authCodeUrlOptions []oauth2.AuthCodeOption - if source.pkce != nil && source.pkce.Challenge != "" && source.pkce.ChallengeMethod != "" { - authCodeUrlOptions = []oauth2.AuthCodeOption{oauth2.SetAuthURLParam(codeChallengeKey, source.pkce.Challenge), - oauth2.SetAuthURLParam(codeChallengeMethodKey, source.pkce.ChallengeMethod)} - } - url := source.config.AuthCodeURL(source.state, authCodeUrlOptions...) - code, state, err := source.authHandler(url) - if err != nil { - return nil, err - } - if state != source.state { - return nil, errors.New("state mismatch in 3-legged-OAuth flow") - } - - // Step 2: Exchange auth code for access token. - var exchangeOptions []oauth2.AuthCodeOption - if source.pkce != nil && source.pkce.Verifier != "" { - exchangeOptions = []oauth2.AuthCodeOption{oauth2.SetAuthURLParam(codeVerifierKey, source.pkce.Verifier)} - } - return source.config.Exchange(source.ctx, code, exchangeOptions...) -} diff --git a/vendor/golang.org/x/oauth2/google/appengine.go b/vendor/golang.org/x/oauth2/google/appengine.go deleted file mode 100644 index 564920bd42..0000000000 --- a/vendor/golang.org/x/oauth2/google/appengine.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2014 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 google - -import ( - "context" - "log" - "sync" - - "golang.org/x/oauth2" -) - -var logOnce sync.Once // only spam about deprecation once - -// AppEngineTokenSource returns a token source that fetches tokens from either -// the current application's service account or from the metadata server, -// depending on the App Engine environment. See below for environment-specific -// details. If you are implementing a 3-legged OAuth 2.0 flow on App Engine that -// involves user accounts, see oauth2.Config instead. -// -// The current version of this library requires at least Go 1.17 to build, -// so first generation App Engine runtimes (<= Go 1.9) are unsupported. -// Previously, on first generation App Engine runtimes, AppEngineTokenSource -// returned a token source that fetches tokens issued to the -// current App Engine application's service account. The provided context must have -// come from appengine.NewContext. -// -// Second generation App Engine runtimes (>= Go 1.11) and App Engine flexible: -// AppEngineTokenSource is DEPRECATED on second generation runtimes and on the -// flexible environment. It delegates to ComputeTokenSource, and the provided -// context and scopes are not used. Please use DefaultTokenSource (or ComputeTokenSource, -// which DefaultTokenSource will use in this case) instead. -func AppEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - logOnce.Do(func() { - log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.") - }) - return ComputeTokenSource("") -} diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go deleted file mode 100644 index 0260935bab..0000000000 --- a/vendor/golang.org/x/oauth2/google/default.go +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2015 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 google - -import ( - "context" - "encoding/json" - "fmt" - "net/http" - "os" - "path/filepath" - "runtime" - "sync" - "time" - - "cloud.google.com/go/compute/metadata" - "golang.org/x/oauth2" - "golang.org/x/oauth2/authhandler" -) - -const ( - adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc" - defaultUniverseDomain = "googleapis.com" -) - -// Credentials holds Google credentials, including "Application Default Credentials". -// For more details, see: -// https://developers.google.com/accounts/docs/application-default-credentials -// Credentials from external accounts (workload identity federation) are used to -// identify a particular application from an on-prem or non-Google Cloud platform -// including Amazon Web Services (AWS), Microsoft Azure or any identity provider -// that supports OpenID Connect (OIDC). -type Credentials struct { - ProjectID string // may be empty - TokenSource oauth2.TokenSource - - // JSON contains the raw bytes from a JSON credentials file. - // This field may be nil if authentication is provided by the - // environment and not with a credentials file, e.g. when code is - // running on Google Cloud Platform. - JSON []byte - - // UniverseDomainProvider returns the default service domain for a given - // Cloud universe. Optional. - // - // On GCE, UniverseDomainProvider should return the universe domain value - // from Google Compute Engine (GCE)'s metadata server. See also [The attached service - // account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa). - // If the GCE metadata server returns a 404 error, the default universe - // domain value should be returned. If the GCE metadata server returns an - // error other than 404, the error should be returned. - UniverseDomainProvider func() (string, error) - - udMu sync.Mutex // guards universeDomain - // universeDomain is the default service domain for a given Cloud universe. - universeDomain string -} - -// UniverseDomain returns the default service domain for a given Cloud universe. -// -// The default value is "googleapis.com". -// -// Deprecated: Use instead (*Credentials).GetUniverseDomain(), which supports -// obtaining the universe domain when authenticating via the GCE metadata server. -// Unlike GetUniverseDomain, this method, UniverseDomain, will always return the -// default value when authenticating via the GCE metadata server. -// See also [The attached service account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa). -func (c *Credentials) UniverseDomain() string { - if c.universeDomain == "" { - return defaultUniverseDomain - } - return c.universeDomain -} - -// GetUniverseDomain returns the default service domain for a given Cloud -// universe. If present, UniverseDomainProvider will be invoked and its return -// value will be cached. -// -// The default value is "googleapis.com". -func (c *Credentials) GetUniverseDomain() (string, error) { - c.udMu.Lock() - defer c.udMu.Unlock() - if c.universeDomain == "" && c.UniverseDomainProvider != nil { - // On Google Compute Engine, an App Engine standard second generation - // runtime, or App Engine flexible, use an externally provided function - // to request the universe domain from the metadata server. - ud, err := c.UniverseDomainProvider() - if err != nil { - return "", err - } - c.universeDomain = ud - } - // If no UniverseDomainProvider (meaning not on Google Compute Engine), or - // in case of any (non-error) empty return value from - // UniverseDomainProvider, set the default universe domain. - if c.universeDomain == "" { - c.universeDomain = defaultUniverseDomain - } - return c.universeDomain, nil -} - -// DefaultCredentials is the old name of Credentials. -// -// Deprecated: use Credentials instead. -type DefaultCredentials = Credentials - -// CredentialsParams holds user supplied parameters that are used together -// with a credentials file for building a Credentials object. -type CredentialsParams struct { - // Scopes is the list OAuth scopes. Required. - // Example: https://www.googleapis.com/auth/cloud-platform - Scopes []string - - // Subject is the user email used for domain wide delegation (see - // https://developers.google.com/identity/protocols/oauth2/service-account#delegatingauthority). - // Optional. - Subject string - - // AuthHandler is the AuthorizationHandler used for 3-legged OAuth flow. Required for 3LO flow. - AuthHandler authhandler.AuthorizationHandler - - // State is a unique string used with AuthHandler. Required for 3LO flow. - State string - - // PKCE is used to support PKCE flow. Optional for 3LO flow. - PKCE *authhandler.PKCEParams - - // The OAuth2 TokenURL default override. This value overrides the default TokenURL, - // unless explicitly specified by the credentials config file. Optional. - TokenURL string - - // EarlyTokenRefresh is the amount of time before a token expires that a new - // token will be preemptively fetched. If unset the default value is 10 - // seconds. - // - // Note: This option is currently only respected when using credentials - // fetched from the GCE metadata server. - EarlyTokenRefresh time.Duration - - // UniverseDomain is the default service domain for a given Cloud universe. - // Only supported in authentication flows that support universe domains. - // This value takes precedence over a universe domain explicitly specified - // in a credentials config file or by the GCE metadata server. Optional. - UniverseDomain string -} - -func (params CredentialsParams) deepCopy() CredentialsParams { - paramsCopy := params - paramsCopy.Scopes = make([]string, len(params.Scopes)) - copy(paramsCopy.Scopes, params.Scopes) - return paramsCopy -} - -// DefaultClient returns an HTTP Client that uses the -// DefaultTokenSource to obtain authentication credentials. -func DefaultClient(ctx context.Context, scope ...string) (*http.Client, error) { - ts, err := DefaultTokenSource(ctx, scope...) - if err != nil { - return nil, err - } - return oauth2.NewClient(ctx, ts), nil -} - -// DefaultTokenSource returns the token source for -// "Application Default Credentials". -// It is a shortcut for FindDefaultCredentials(ctx, scope).TokenSource. -func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSource, error) { - creds, err := FindDefaultCredentials(ctx, scope...) - if err != nil { - return nil, err - } - return creds.TokenSource, nil -} - -// FindDefaultCredentialsWithParams searches for "Application Default Credentials". -// -// It looks for credentials in the following places, -// preferring the first location found: -// -// 1. A JSON file whose path is specified by the -// GOOGLE_APPLICATION_CREDENTIALS environment variable. -// For workload identity federation, refer to -// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation on -// how to generate the JSON configuration file for on-prem/non-Google cloud -// platforms. -// 2. A JSON file in a location known to the gcloud command-line tool. -// On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. -// On other systems, $HOME/.config/gcloud/application_default_credentials.json. -// 3. On Google Compute Engine, Google App Engine standard second generation runtimes -// (>= Go 1.11), and Google App Engine flexible environment, it fetches -// credentials from the metadata server. -func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) { - // Make defensive copy of the slices in params. - params = params.deepCopy() - - // First, try the environment variable. - const envVar = "GOOGLE_APPLICATION_CREDENTIALS" - if filename := os.Getenv(envVar); filename != "" { - creds, err := readCredentialsFile(ctx, filename, params) - if err != nil { - return nil, fmt.Errorf("google: error getting credentials using %v environment variable: %v", envVar, err) - } - return creds, nil - } - - // Second, try a well-known file. - filename := wellKnownFile() - if b, err := os.ReadFile(filename); err == nil { - return CredentialsFromJSONWithParams(ctx, b, params) - } - - // Third, if we're on Google Compute Engine, an App Engine standard second generation runtime, - // or App Engine flexible, use the metadata server. - if metadata.OnGCE() { - id, _ := metadata.ProjectID() - universeDomainProvider := func() (string, error) { - universeDomain, err := metadata.Get("universe/universe_domain") - if err != nil { - if _, ok := err.(metadata.NotDefinedError); ok { - // http.StatusNotFound (404) - return defaultUniverseDomain, nil - } else { - return "", err - } - } - return universeDomain, nil - } - return &Credentials{ - ProjectID: id, - TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...), - UniverseDomainProvider: universeDomainProvider, - universeDomain: params.UniverseDomain, - }, nil - } - - // None are found; return helpful error. - return nil, fmt.Errorf("google: could not find default credentials. See %v for more information", adcSetupURL) -} - -// FindDefaultCredentials invokes FindDefaultCredentialsWithParams with the specified scopes. -func FindDefaultCredentials(ctx context.Context, scopes ...string) (*Credentials, error) { - var params CredentialsParams - params.Scopes = scopes - return FindDefaultCredentialsWithParams(ctx, params) -} - -// CredentialsFromJSONWithParams obtains Google credentials from a JSON value. The JSON can -// represent either a Google Developers Console client_credentials.json file (as in ConfigFromJSON), -// a Google Developers service account key file, a gcloud user credentials file (a.k.a. refresh -// token JSON), or the JSON configuration file for workload identity federation in non-Google cloud -// platforms (see https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation). -// -// Important: If you accept a credential configuration (credential JSON/File/Stream) from an -// external source for authentication to Google Cloud Platform, you must validate it before -// providing it to any Google API or library. Providing an unvalidated credential configuration to -// Google APIs can compromise the security of your systems and data. For more information, refer to -// [Validate credential configurations from external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). -func CredentialsFromJSONWithParams(ctx context.Context, jsonData []byte, params CredentialsParams) (*Credentials, error) { - // Make defensive copy of the slices in params. - params = params.deepCopy() - - // First, attempt to parse jsonData as a Google Developers Console client_credentials.json. - config, _ := ConfigFromJSON(jsonData, params.Scopes...) - if config != nil { - return &Credentials{ - ProjectID: "", - TokenSource: authhandler.TokenSourceWithPKCE(ctx, config, params.State, params.AuthHandler, params.PKCE), - JSON: jsonData, - }, nil - } - - // Otherwise, parse jsonData as one of the other supported credentials files. - var f credentialsFile - if err := json.Unmarshal(jsonData, &f); err != nil { - return nil, err - } - - universeDomain := f.UniverseDomain - if params.UniverseDomain != "" { - universeDomain = params.UniverseDomain - } - // Authorized user credentials are only supported in the googleapis.com universe. - if f.Type == userCredentialsKey { - universeDomain = defaultUniverseDomain - } - - ts, err := f.tokenSource(ctx, params) - if err != nil { - return nil, err - } - ts = newErrWrappingTokenSource(ts) - return &Credentials{ - ProjectID: f.ProjectID, - TokenSource: ts, - JSON: jsonData, - universeDomain: universeDomain, - }, nil -} - -// CredentialsFromJSON invokes CredentialsFromJSONWithParams with the specified scopes. -// -// Important: If you accept a credential configuration (credential JSON/File/Stream) from an -// external source for authentication to Google Cloud Platform, you must validate it before -// providing it to any Google API or library. Providing an unvalidated credential configuration to -// Google APIs can compromise the security of your systems and data. For more information, refer to -// [Validate credential configurations from external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). -func CredentialsFromJSON(ctx context.Context, jsonData []byte, scopes ...string) (*Credentials, error) { - var params CredentialsParams - params.Scopes = scopes - return CredentialsFromJSONWithParams(ctx, jsonData, params) -} - -func wellKnownFile() string { - const f = "application_default_credentials.json" - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud", f) - } - return filepath.Join(guessUnixHomeDir(), ".config", "gcloud", f) -} - -func readCredentialsFile(ctx context.Context, filename string, params CredentialsParams) (*Credentials, error) { - b, err := os.ReadFile(filename) - if err != nil { - return nil, err - } - return CredentialsFromJSONWithParams(ctx, b, params) -} diff --git a/vendor/golang.org/x/oauth2/google/doc.go b/vendor/golang.org/x/oauth2/google/doc.go deleted file mode 100644 index 830d268c1e..0000000000 --- a/vendor/golang.org/x/oauth2/google/doc.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2018 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 google provides support for making OAuth2 authorized and authenticated -// HTTP requests to Google APIs. It supports the Web server flow, client-side -// credentials, service accounts, Google Compute Engine service accounts, -// Google App Engine service accounts and workload identity federation -// from non-Google cloud platforms. -// -// A brief overview of the package follows. For more information, please read -// https://developers.google.com/accounts/docs/OAuth2 -// and -// https://developers.google.com/accounts/docs/application-default-credentials. -// For more information on using workload identity federation, refer to -// https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation. -// -// # OAuth2 Configs -// -// Two functions in this package return golang.org/x/oauth2.Config values from Google credential -// data. Google supports two JSON formats for OAuth2 credentials: one is handled by ConfigFromJSON, -// the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or -// create an http.Client. -// -// # Workload and Workforce Identity Federation -// -// For information on how to use Workload and Workforce Identity Federation, see [golang.org/x/oauth2/google/externalaccount]. -// -// # Credentials -// -// The Credentials type represents Google credentials, including Application Default -// Credentials. -// -// Use FindDefaultCredentials to obtain Application Default Credentials. -// FindDefaultCredentials looks in some well-known places for a credentials file, and -// will call AppEngineTokenSource or ComputeTokenSource as needed. -// -// Application Default Credentials also support workload identity federation to -// access Google Cloud resources from non-Google Cloud platforms including Amazon -// Web Services (AWS), Microsoft Azure or any identity provider that supports -// OpenID Connect (OIDC). Workload identity federation is recommended for -// non-Google Cloud environments as it avoids the need to download, manage and -// store service account private keys locally. -// -// DefaultClient and DefaultTokenSource are convenience methods. They first call FindDefaultCredentials, -// then use the credentials to construct an http.Client or an oauth2.TokenSource. -// -// Use CredentialsFromJSON to obtain credentials from either of the two JSON formats -// described in OAuth2 Configs, above. The TokenSource in the returned value is the -// same as the one obtained from the oauth2.Config returned from ConfigFromJSON or -// JWTConfigFromJSON, but the Credentials may contain additional information -// that is useful is some circumstances. -package google // import "golang.org/x/oauth2/google" diff --git a/vendor/golang.org/x/oauth2/google/error.go b/vendor/golang.org/x/oauth2/google/error.go deleted file mode 100644 index d84dd00473..0000000000 --- a/vendor/golang.org/x/oauth2/google/error.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2022 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 google - -import ( - "errors" - - "golang.org/x/oauth2" -) - -// AuthenticationError indicates there was an error in the authentication flow. -// -// Use (*AuthenticationError).Temporary to check if the error can be retried. -type AuthenticationError struct { - err *oauth2.RetrieveError -} - -func newAuthenticationError(err error) error { - re := &oauth2.RetrieveError{} - if !errors.As(err, &re) { - return err - } - return &AuthenticationError{ - err: re, - } -} - -// Temporary indicates that the network error has one of the following status codes and may be retried: 500, 503, 408, or 429. -func (e *AuthenticationError) Temporary() bool { - if e.err.Response == nil { - return false - } - sc := e.err.Response.StatusCode - return sc == 500 || sc == 503 || sc == 408 || sc == 429 -} - -func (e *AuthenticationError) Error() string { - return e.err.Error() -} - -func (e *AuthenticationError) Unwrap() error { - return e.err -} - -type errWrappingTokenSource struct { - src oauth2.TokenSource -} - -func newErrWrappingTokenSource(ts oauth2.TokenSource) oauth2.TokenSource { - return &errWrappingTokenSource{src: ts} -} - -// Token returns the current token if it's still valid, else will -// refresh the current token (using r.Context for HTTP client -// information) and return the new one. -func (s *errWrappingTokenSource) Token() (*oauth2.Token, error) { - t, err := s.src.Token() - if err != nil { - return nil, newAuthenticationError(err) - } - return t, nil -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/aws.go b/vendor/golang.org/x/oauth2/google/externalaccount/aws.go deleted file mode 100644 index f62ec99a5f..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/aws.go +++ /dev/null @@ -1,575 +0,0 @@ -// Copyright 2021 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 externalaccount - -import ( - "context" - "crypto/hmac" - "crypto/sha256" - "encoding/hex" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "net/url" - "os" - "path" - "sort" - "strings" - "time" - - "golang.org/x/oauth2" -) - -// AwsSecurityCredentials models AWS security credentials. -type AwsSecurityCredentials struct { - // AccessKeyID is the AWS Access Key ID - Required. - AccessKeyID string `json:"AccessKeyID"` - // SecretAccessKey is the AWS Secret Access Key - Required. - SecretAccessKey string `json:"SecretAccessKey"` - // SessionToken is the AWS Session token. This should be provided for temporary AWS security credentials - Optional. - SessionToken string `json:"Token"` -} - -// awsRequestSigner is a utility class to sign http requests using a AWS V4 signature. -type awsRequestSigner struct { - RegionName string - AwsSecurityCredentials *AwsSecurityCredentials -} - -// getenv aliases os.Getenv for testing -var getenv = os.Getenv - -const ( - defaultRegionalCredentialVerificationUrl = "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" - - // AWS Signature Version 4 signing algorithm identifier. - awsAlgorithm = "AWS4-HMAC-SHA256" - - // The termination string for the AWS credential scope value as defined in - // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html - awsRequestType = "aws4_request" - - // The AWS authorization header name for the security session token if available. - awsSecurityTokenHeader = "x-amz-security-token" - - // The name of the header containing the session token for metadata endpoint calls - awsIMDSv2SessionTokenHeader = "X-aws-ec2-metadata-token" - - awsIMDSv2SessionTtlHeader = "X-aws-ec2-metadata-token-ttl-seconds" - - awsIMDSv2SessionTtl = "300" - - // The AWS authorization header name for the auto-generated date. - awsDateHeader = "x-amz-date" - - // Supported AWS configuration environment variables. - awsAccessKeyId = "AWS_ACCESS_KEY_ID" - awsDefaultRegion = "AWS_DEFAULT_REGION" - awsRegion = "AWS_REGION" - awsSecretAccessKey = "AWS_SECRET_ACCESS_KEY" - awsSessionToken = "AWS_SESSION_TOKEN" - - awsTimeFormatLong = "20060102T150405Z" - awsTimeFormatShort = "20060102" -) - -func getSha256(input []byte) (string, error) { - hash := sha256.New() - if _, err := hash.Write(input); err != nil { - return "", err - } - return hex.EncodeToString(hash.Sum(nil)), nil -} - -func getHmacSha256(key, input []byte) ([]byte, error) { - hash := hmac.New(sha256.New, key) - if _, err := hash.Write(input); err != nil { - return nil, err - } - return hash.Sum(nil), nil -} - -func cloneRequest(r *http.Request) *http.Request { - r2 := new(http.Request) - *r2 = *r - if r.Header != nil { - r2.Header = make(http.Header, len(r.Header)) - - // Find total number of values. - headerCount := 0 - for _, headerValues := range r.Header { - headerCount += len(headerValues) - } - copiedHeaders := make([]string, headerCount) // shared backing array for headers' values - - for headerKey, headerValues := range r.Header { - headerCount = copy(copiedHeaders, headerValues) - r2.Header[headerKey] = copiedHeaders[:headerCount:headerCount] - copiedHeaders = copiedHeaders[headerCount:] - } - } - return r2 -} - -func canonicalPath(req *http.Request) string { - result := req.URL.EscapedPath() - if result == "" { - return "/" - } - return path.Clean(result) -} - -func canonicalQuery(req *http.Request) string { - queryValues := req.URL.Query() - for queryKey := range queryValues { - sort.Strings(queryValues[queryKey]) - } - return queryValues.Encode() -} - -func canonicalHeaders(req *http.Request) (string, string) { - // Header keys need to be sorted alphabetically. - var headers []string - lowerCaseHeaders := make(http.Header) - for k, v := range req.Header { - k := strings.ToLower(k) - if _, ok := lowerCaseHeaders[k]; ok { - // include additional values - lowerCaseHeaders[k] = append(lowerCaseHeaders[k], v...) - } else { - headers = append(headers, k) - lowerCaseHeaders[k] = v - } - } - sort.Strings(headers) - - var fullHeaders strings.Builder - for _, header := range headers { - headerValue := strings.Join(lowerCaseHeaders[header], ",") - fullHeaders.WriteString(header) - fullHeaders.WriteByte(':') - fullHeaders.WriteString(headerValue) - fullHeaders.WriteByte('\n') - } - - return strings.Join(headers, ";"), fullHeaders.String() -} - -func requestDataHash(req *http.Request) (string, error) { - var requestData []byte - if req.Body != nil { - requestBody, err := req.GetBody() - if err != nil { - return "", err - } - defer requestBody.Close() - - requestData, err = io.ReadAll(io.LimitReader(requestBody, 1<<20)) - if err != nil { - return "", err - } - } - - return getSha256(requestData) -} - -func requestHost(req *http.Request) string { - if req.Host != "" { - return req.Host - } - return req.URL.Host -} - -func canonicalRequest(req *http.Request, canonicalHeaderColumns, canonicalHeaderData string) (string, error) { - dataHash, err := requestDataHash(req) - if err != nil { - return "", err - } - - return fmt.Sprintf("%s\n%s\n%s\n%s\n%s\n%s", req.Method, canonicalPath(req), canonicalQuery(req), canonicalHeaderData, canonicalHeaderColumns, dataHash), nil -} - -// SignRequest adds the appropriate headers to an http.Request -// or returns an error if something prevented this. -func (rs *awsRequestSigner) SignRequest(req *http.Request) error { - signedRequest := cloneRequest(req) - timestamp := now() - - signedRequest.Header.Add("host", requestHost(req)) - - if rs.AwsSecurityCredentials.SessionToken != "" { - signedRequest.Header.Add(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SessionToken) - } - - if signedRequest.Header.Get("date") == "" { - signedRequest.Header.Add(awsDateHeader, timestamp.Format(awsTimeFormatLong)) - } - - authorizationCode, err := rs.generateAuthentication(signedRequest, timestamp) - if err != nil { - return err - } - signedRequest.Header.Set("Authorization", authorizationCode) - - req.Header = signedRequest.Header - return nil -} - -func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp time.Time) (string, error) { - canonicalHeaderColumns, canonicalHeaderData := canonicalHeaders(req) - - dateStamp := timestamp.Format(awsTimeFormatShort) - serviceName := "" - if splitHost := strings.Split(requestHost(req), "."); len(splitHost) > 0 { - serviceName = splitHost[0] - } - - credentialScope := fmt.Sprintf("%s/%s/%s/%s", dateStamp, rs.RegionName, serviceName, awsRequestType) - - requestString, err := canonicalRequest(req, canonicalHeaderColumns, canonicalHeaderData) - if err != nil { - return "", err - } - requestHash, err := getSha256([]byte(requestString)) - if err != nil { - return "", err - } - - stringToSign := fmt.Sprintf("%s\n%s\n%s\n%s", awsAlgorithm, timestamp.Format(awsTimeFormatLong), credentialScope, requestHash) - - signingKey := []byte("AWS4" + rs.AwsSecurityCredentials.SecretAccessKey) - for _, signingInput := range []string{ - dateStamp, rs.RegionName, serviceName, awsRequestType, stringToSign, - } { - signingKey, err = getHmacSha256(signingKey, []byte(signingInput)) - if err != nil { - return "", err - } - } - - return fmt.Sprintf("%s Credential=%s/%s, SignedHeaders=%s, Signature=%s", awsAlgorithm, rs.AwsSecurityCredentials.AccessKeyID, credentialScope, canonicalHeaderColumns, hex.EncodeToString(signingKey)), nil -} - -type awsCredentialSource struct { - environmentID string - regionURL string - regionalCredVerificationURL string - credVerificationURL string - imdsv2SessionTokenURL string - targetResource string - requestSigner *awsRequestSigner - region string - ctx context.Context - client *http.Client - awsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier - supplierOptions SupplierOptions -} - -type awsRequestHeader struct { - Key string `json:"key"` - Value string `json:"value"` -} - -type awsRequest struct { - URL string `json:"url"` - Method string `json:"method"` - Headers []awsRequestHeader `json:"headers"` -} - -func (cs awsCredentialSource) doRequest(req *http.Request) (*http.Response, error) { - if cs.client == nil { - cs.client = oauth2.NewClient(cs.ctx, nil) - } - return cs.client.Do(req.WithContext(cs.ctx)) -} - -func canRetrieveRegionFromEnvironment() bool { - // The AWS region can be provided through AWS_REGION or AWS_DEFAULT_REGION. Only one is - // required. - return getenv(awsRegion) != "" || getenv(awsDefaultRegion) != "" -} - -func canRetrieveSecurityCredentialFromEnvironment() bool { - // Check if both AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are available. - return getenv(awsAccessKeyId) != "" && getenv(awsSecretAccessKey) != "" -} - -func (cs awsCredentialSource) shouldUseMetadataServer() bool { - return cs.awsSecurityCredentialsSupplier == nil && (!canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment()) -} - -func (cs awsCredentialSource) credentialSourceType() string { - if cs.awsSecurityCredentialsSupplier != nil { - return "programmatic" - } - return "aws" -} - -func (cs awsCredentialSource) subjectToken() (string, error) { - // Set Defaults - if cs.regionalCredVerificationURL == "" { - cs.regionalCredVerificationURL = defaultRegionalCredentialVerificationUrl - } - if cs.requestSigner == nil { - headers := make(map[string]string) - if cs.shouldUseMetadataServer() { - awsSessionToken, err := cs.getAWSSessionToken() - if err != nil { - return "", err - } - - if awsSessionToken != "" { - headers[awsIMDSv2SessionTokenHeader] = awsSessionToken - } - } - - awsSecurityCredentials, err := cs.getSecurityCredentials(headers) - if err != nil { - return "", err - } - cs.region, err = cs.getRegion(headers) - if err != nil { - return "", err - } - - cs.requestSigner = &awsRequestSigner{ - RegionName: cs.region, - AwsSecurityCredentials: awsSecurityCredentials, - } - } - - // Generate the signed request to AWS STS GetCallerIdentity API. - // Use the required regional endpoint. Otherwise, the request will fail. - req, err := http.NewRequest("POST", strings.Replace(cs.regionalCredVerificationURL, "{region}", cs.region, 1), nil) - if err != nil { - return "", err - } - // The full, canonical resource name of the workload identity pool - // provider, with or without the HTTPS prefix. - // Including this header as part of the signature is recommended to - // ensure data integrity. - if cs.targetResource != "" { - req.Header.Add("x-goog-cloud-target-resource", cs.targetResource) - } - cs.requestSigner.SignRequest(req) - - /* - The GCP STS endpoint expects the headers to be formatted as: - # [ - # {key: 'x-amz-date', value: '...'}, - # {key: 'Authorization', value: '...'}, - # ... - # ] - # And then serialized as: - # quote(json.dumps({ - # url: '...', - # method: 'POST', - # headers: [{key: 'x-amz-date', value: '...'}, ...] - # })) - */ - - awsSignedReq := awsRequest{ - URL: req.URL.String(), - Method: "POST", - } - for headerKey, headerList := range req.Header { - for _, headerValue := range headerList { - awsSignedReq.Headers = append(awsSignedReq.Headers, awsRequestHeader{ - Key: headerKey, - Value: headerValue, - }) - } - } - sort.Slice(awsSignedReq.Headers, func(i, j int) bool { - headerCompare := strings.Compare(awsSignedReq.Headers[i].Key, awsSignedReq.Headers[j].Key) - if headerCompare == 0 { - return strings.Compare(awsSignedReq.Headers[i].Value, awsSignedReq.Headers[j].Value) < 0 - } - return headerCompare < 0 - }) - - result, err := json.Marshal(awsSignedReq) - if err != nil { - return "", err - } - return url.QueryEscape(string(result)), nil -} - -func (cs *awsCredentialSource) getAWSSessionToken() (string, error) { - if cs.imdsv2SessionTokenURL == "" { - return "", nil - } - - req, err := http.NewRequest("PUT", cs.imdsv2SessionTokenURL, nil) - if err != nil { - return "", err - } - - req.Header.Add(awsIMDSv2SessionTtlHeader, awsIMDSv2SessionTtl) - - resp, err := cs.doRequest(req) - if err != nil { - return "", err - } - defer resp.Body.Close() - - respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return "", err - } - - if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS session token - %s", string(respBody)) - } - - return string(respBody), nil -} - -func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, error) { - if cs.awsSecurityCredentialsSupplier != nil { - return cs.awsSecurityCredentialsSupplier.AwsRegion(cs.ctx, cs.supplierOptions) - } - if canRetrieveRegionFromEnvironment() { - if envAwsRegion := getenv(awsRegion); envAwsRegion != "" { - cs.region = envAwsRegion - return envAwsRegion, nil - } - return getenv("AWS_DEFAULT_REGION"), nil - } - - if cs.regionURL == "" { - return "", errors.New("oauth2/google/externalaccount: unable to determine AWS region") - } - - req, err := http.NewRequest("GET", cs.regionURL, nil) - if err != nil { - return "", err - } - - for name, value := range headers { - req.Header.Add(name, value) - } - - resp, err := cs.doRequest(req) - if err != nil { - return "", err - } - defer resp.Body.Close() - - respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return "", err - } - - if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS region - %s", string(respBody)) - } - - // This endpoint will return the region in format: us-east-2b. - // Only the us-east-2 part should be used. - respBodyEnd := 0 - if len(respBody) > 1 { - respBodyEnd = len(respBody) - 1 - } - return string(respBody[:respBodyEnd]), nil -} - -func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) (result *AwsSecurityCredentials, err error) { - if cs.awsSecurityCredentialsSupplier != nil { - return cs.awsSecurityCredentialsSupplier.AwsSecurityCredentials(cs.ctx, cs.supplierOptions) - } - if canRetrieveSecurityCredentialFromEnvironment() { - return &AwsSecurityCredentials{ - AccessKeyID: getenv(awsAccessKeyId), - SecretAccessKey: getenv(awsSecretAccessKey), - SessionToken: getenv(awsSessionToken), - }, nil - } - - roleName, err := cs.getMetadataRoleName(headers) - if err != nil { - return - } - - credentials, err := cs.getMetadataSecurityCredentials(roleName, headers) - if err != nil { - return - } - - if credentials.AccessKeyID == "" { - return result, errors.New("oauth2/google/externalaccount: missing AccessKeyId credential") - } - - if credentials.SecretAccessKey == "" { - return result, errors.New("oauth2/google/externalaccount: missing SecretAccessKey credential") - } - - return &credentials, nil -} - -func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, headers map[string]string) (AwsSecurityCredentials, error) { - var result AwsSecurityCredentials - - req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", cs.credVerificationURL, roleName), nil) - if err != nil { - return result, err - } - - for name, value := range headers { - req.Header.Add(name, value) - } - - resp, err := cs.doRequest(req) - if err != nil { - return result, err - } - defer resp.Body.Close() - - respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return result, err - } - - if resp.StatusCode != 200 { - return result, fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS security credentials - %s", string(respBody)) - } - - err = json.Unmarshal(respBody, &result) - return result, err -} - -func (cs *awsCredentialSource) getMetadataRoleName(headers map[string]string) (string, error) { - if cs.credVerificationURL == "" { - return "", errors.New("oauth2/google/externalaccount: unable to determine the AWS metadata server security credentials endpoint") - } - - req, err := http.NewRequest("GET", cs.credVerificationURL, nil) - if err != nil { - return "", err - } - - for name, value := range headers { - req.Header.Add(name, value) - } - - resp, err := cs.doRequest(req) - if err != nil { - return "", err - } - defer resp.Body.Close() - - respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return "", err - } - - if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS role name - %s", string(respBody)) - } - - return string(respBody), nil -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go deleted file mode 100644 index 6f7662170e..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright 2020 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 externalaccount provides support for creating workload identity -federation and workforce identity federation token sources that can be -used to access Google Cloud resources from external identity providers. - -# Workload Identity Federation - -Using workload identity federation, your application can access Google Cloud -resources from Amazon Web Services (AWS), Microsoft Azure or any identity -provider that supports OpenID Connect (OIDC) or SAML 2.0. -Traditionally, applications running outside Google Cloud have used service -account keys to access Google Cloud resources. Using identity federation, -you can allow your workload to impersonate a service account. -This lets you access Google Cloud resources directly, eliminating the -maintenance and security burden associated with service account keys. - -Follow the detailed instructions on how to configure Workload Identity Federation -in various platforms: - -Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws -Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure -OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc -SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml - -For OIDC and SAML providers, the library can retrieve tokens in fours ways: -from a local file location (file-sourced credentials), from a server -(URL-sourced credentials), from a local executable (executable-sourced -credentials), or from a user defined function that returns an OIDC or SAML token. -For file-sourced credentials, a background process needs to be continuously -refreshing the file location with a new OIDC/SAML token prior to expiration. -For tokens with one hour lifetimes, the token needs to be updated in the file -every hour. The token can be stored directly as plain text or in JSON format. -For URL-sourced credentials, a local server needs to host a GET endpoint to -return the OIDC/SAML token. The response can be in plain text or JSON. -Additional required request headers can also be specified. -For executable-sourced credentials, an application needs to be available to -output the OIDC/SAML token and other information in a JSON format. -For more information on how these work (and how to implement -executable-sourced credentials), please check out: -https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration - -To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers, -or one that implements [AwsSecurityCredentialsSupplier] for AWS providers. This can then be used when building a [Config]. -The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used to access Google -Cloud resources. For instance, you can create a new client from the -[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource)) - -Note that this library does not perform any validation on the token_url, token_info_url, -or service_account_impersonation_url fields of the credential configuration. -It is not recommended to use a credential configuration that you did not generate with -the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. - -# Workforce Identity Federation - -Workforce identity federation lets you use an external identity provider (IdP) to -authenticate and authorize a workforce—a group of users, such as employees, partners, -and contractors—using IAM, so that the users can access Google Cloud services. -Workforce identity federation extends Google Cloud's identity capabilities to support -syncless, attribute-based single sign on. - -With workforce identity federation, your workforce can access Google Cloud resources -using an external identity provider (IdP) that supports OpenID Connect (OIDC) or -SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation -Services (AD FS), Okta, and others. - -Follow the detailed instructions on how to configure Workload Identity Federation -in various platforms: - -Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad -Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta -OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc -SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml - -For workforce identity federation, the library can retrieve tokens in four ways: -from a local file location (file-sourced credentials), from a server -(URL-sourced credentials), from a local executable (executable-sourced -credentials), or from a user supplied function that returns an OIDC or SAML token. -For file-sourced credentials, a background process needs to be continuously -refreshing the file location with a new OIDC/SAML token prior to expiration. -For tokens with one hour lifetimes, the token needs to be updated in the file -every hour. The token can be stored directly as plain text or in JSON format. -For URL-sourced credentials, a local server needs to host a GET endpoint to -return the OIDC/SAML token. The response can be in plain text or JSON. -Additional required request headers can also be specified. -For executable-sourced credentials, an application needs to be available to -output the OIDC/SAML token and other information in a JSON format. -For more information on how these work (and how to implement -executable-sourced credentials), please check out: -https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in - -To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers. -This can then be used when building a [Config]. -The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used access Google -Cloud resources. For instance, you can create a new client from the -[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource)) - -# Security considerations - -Note that this library does not perform any validation on the token_url, token_info_url, -or service_account_impersonation_url fields of the credential configuration. -It is not recommended to use a credential configuration that you did not generate with -the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. -*/ -package externalaccount - -import ( - "context" - "fmt" - "net/http" - "regexp" - "strconv" - "strings" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/google/internal/impersonate" - "golang.org/x/oauth2/google/internal/stsexchange" -) - -const ( - universeDomainPlaceholder = "UNIVERSE_DOMAIN" - defaultTokenURL = "https://sts.UNIVERSE_DOMAIN/v1/token" - defaultUniverseDomain = "googleapis.com" -) - -// now aliases time.Now for testing -var now = func() time.Time { - return time.Now().UTC() -} - -// Config stores the configuration for fetching tokens with external credentials. -type Config struct { - // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload - // identity pool or the workforce pool and the provider identifier in that pool. Required. - Audience string - // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec. - // Expected values include: - // “urn:ietf:params:oauth:token-type:jwt” - // “urn:ietf:params:oauth:token-type:id-token” - // “urn:ietf:params:oauth:token-type:saml2” - // “urn:ietf:params:aws:token-type:aws4_request” - // Required. - SubjectTokenType string - // TokenURL is the STS token exchange endpoint. If not provided, will default to - // https://sts.UNIVERSE_DOMAIN/v1/token, with UNIVERSE_DOMAIN set to the - // default service domain googleapis.com unless UniverseDomain is set. - // Optional. - TokenURL string - // TokenInfoURL is the token_info endpoint used to retrieve the account related information ( - // user attributes like account identifier, eg. email, username, uid, etc). This is - // needed for gCloud session account identification. Optional. - TokenInfoURL string - // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only - // required for workload identity pools when APIs to be accessed have not integrated with UberMint. Optional. - ServiceAccountImpersonationURL string - // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation - // token will be valid for. If not provided, it will default to 3600. Optional. - ServiceAccountImpersonationLifetimeSeconds int - // ClientSecret is currently only required if token_info endpoint also - // needs to be called with the generated GCP access token. When provided, STS will be - // called with additional basic authentication using ClientId as username and ClientSecret as password. Optional. - ClientSecret string - // ClientID is only required in conjunction with ClientSecret, as described above. Optional. - ClientID string - // CredentialSource contains the necessary information to retrieve the token itself, as well - // as some environmental information. One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or - // CredentialSource must be provided. Optional. - CredentialSource *CredentialSource - // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries - // will set the x-goog-user-project header which overrides the project associated with the credentials. Optional. - QuotaProjectID string - // Scopes contains the desired scopes for the returned access token. Optional. - Scopes []string - // WorkforcePoolUserProject is the workforce pool user project number when the credential - // corresponds to a workforce pool and not a workload identity pool. - // The underlying principal must still have serviceusage.services.use IAM - // permission to use the project for billing/quota. Optional. - WorkforcePoolUserProject string - // SubjectTokenSupplier is an optional token supplier for OIDC/SAML credentials. - // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional. - SubjectTokenSupplier SubjectTokenSupplier - // AwsSecurityCredentialsSupplier is an AWS Security Credential supplier for AWS credentials. - // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional. - AwsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier - // UniverseDomain is the default service domain for a given Cloud universe. - // This value will be used in the default STS token URL. The default value - // is "googleapis.com". It will not be used if TokenURL is set. Optional. - UniverseDomain string -} - -var ( - validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`) -) - -func validateWorkforceAudience(input string) bool { - return validWorkforceAudiencePattern.MatchString(input) -} - -// NewTokenSource Returns an external account TokenSource using the provided external account config. -func NewTokenSource(ctx context.Context, conf Config) (oauth2.TokenSource, error) { - if conf.Audience == "" { - return nil, fmt.Errorf("oauth2/google/externalaccount: Audience must be set") - } - if conf.SubjectTokenType == "" { - return nil, fmt.Errorf("oauth2/google/externalaccount: Subject token type must be set") - } - if conf.WorkforcePoolUserProject != "" { - valid := validateWorkforceAudience(conf.Audience) - if !valid { - return nil, fmt.Errorf("oauth2/google/externalaccount: Workforce pool user project should not be set for non-workforce pool credentials") - } - } - count := 0 - if conf.CredentialSource != nil { - count++ - } - if conf.SubjectTokenSupplier != nil { - count++ - } - if conf.AwsSecurityCredentialsSupplier != nil { - count++ - } - if count == 0 { - return nil, fmt.Errorf("oauth2/google/externalaccount: One of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set") - } - if count > 1 { - return nil, fmt.Errorf("oauth2/google/externalaccount: Only one of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set") - } - return conf.tokenSource(ctx, "https") -} - -// tokenSource is a private function that's directly called by some of the tests, -// because the unit test URLs are mocked, and would otherwise fail the -// validity check. -func (c *Config) tokenSource(ctx context.Context, scheme string) (oauth2.TokenSource, error) { - - ts := tokenSource{ - ctx: ctx, - conf: c, - } - if c.ServiceAccountImpersonationURL == "" { - return oauth2.ReuseTokenSource(nil, ts), nil - } - scopes := c.Scopes - ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"} - imp := impersonate.ImpersonateTokenSource{ - Ctx: ctx, - URL: c.ServiceAccountImpersonationURL, - Scopes: scopes, - Ts: oauth2.ReuseTokenSource(nil, ts), - TokenLifetimeSeconds: c.ServiceAccountImpersonationLifetimeSeconds, - } - return oauth2.ReuseTokenSource(nil, imp), nil -} - -// Subject token file types. -const ( - fileTypeText = "text" - fileTypeJSON = "json" -) - -// Format contains information needed to retrieve a subject token for URL or File sourced credentials. -type Format struct { - // Type should be either "text" or "json". This determines whether the file or URL sourced credentials - // expect a simple text subject token or if the subject token will be contained in a JSON object. - // When not provided "text" type is assumed. - Type string `json:"type"` - // SubjectTokenFieldName is only required for JSON format. This is the field name that the credentials will check - // for the subject token in the file or URL response. This would be "access_token" for azure. - SubjectTokenFieldName string `json:"subject_token_field_name"` -} - -// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange. -type CredentialSource struct { - // File is the location for file sourced credentials. - // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - File string `json:"file"` - - // Url is the URL to call for URL sourced credentials. - // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - URL string `json:"url"` - // Headers are the headers to attach to the request for URL sourced credentials. - Headers map[string]string `json:"headers"` - - // Executable is the configuration object for executable sourced credentials. - // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - Executable *ExecutableConfig `json:"executable"` - - // EnvironmentID is the EnvironmentID used for AWS sourced credentials. This should start with "AWS". - // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. - // - // Important: If you accept a credential configuration (credential - // JSON/File/Stream) from an external source for authentication to Google - // Cloud Platform, you must validate it before providing it to any Google - // API or library. Providing an unvalidated credential configuration to - // Google APIs can compromise the security of your systems and data. For - // more information, refer to [Validate credential configurations from - // external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - EnvironmentID string `json:"environment_id"` - // RegionURL is the metadata URL to retrieve the region from for EC2 AWS credentials. - RegionURL string `json:"region_url"` - // RegionalCredVerificationURL is the AWS regional credential verification URL, will default to - // "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" if not provided." - RegionalCredVerificationURL string `json:"regional_cred_verification_url"` - // IMDSv2SessionTokenURL is the URL to retrieve the session token when using IMDSv2 in AWS. - IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"` - // Format is the format type for the subject token. Used for File and URL sourced credentials. Expected values are "text" or "json". - Format Format `json:"format"` -} - -// ExecutableConfig contains information needed for executable sourced credentials. -type ExecutableConfig struct { - // Command is the the full command to run to retrieve the subject token. - // This can include arguments. Must be an absolute path for the program. Required. - Command string `json:"command"` - // TimeoutMillis is the timeout duration, in milliseconds. Defaults to 30000 milliseconds when not provided. Optional. - TimeoutMillis *int `json:"timeout_millis"` - // OutputFile is the absolute path to the output file where the executable will cache the response. - // If specified the auth libraries will first check this location before running the executable. Optional. - OutputFile string `json:"output_file"` -} - -// SubjectTokenSupplier can be used to supply a subject token to exchange for a GCP access token. -type SubjectTokenSupplier interface { - // SubjectToken should return a valid subject token or an error. - // The external account token source does not cache the returned subject token, so caching - // logic should be implemented in the supplier to prevent multiple requests for the same subject token. - SubjectToken(ctx context.Context, options SupplierOptions) (string, error) -} - -// AWSSecurityCredentialsSupplier can be used to supply AwsSecurityCredentials and an AWS Region to -// exchange for a GCP access token. -type AwsSecurityCredentialsSupplier interface { - // AwsRegion should return the AWS region or an error. - AwsRegion(ctx context.Context, options SupplierOptions) (string, error) - // AwsSecurityCredentials should return a valid set of AwsSecurityCredentials or an error. - // The external account token source does not cache the returned security credentials, so caching - // logic should be implemented in the supplier to prevent multiple requests for the same security credentials. - AwsSecurityCredentials(ctx context.Context, options SupplierOptions) (*AwsSecurityCredentials, error) -} - -// SupplierOptions contains information about the requested subject token or AWS security credentials from the -// Google external account credential. -type SupplierOptions struct { - // Audience is the requested audience for the external account credential. - Audience string - // Subject token type is the requested subject token type for the external account credential. Expected values include: - // “urn:ietf:params:oauth:token-type:jwt” - // “urn:ietf:params:oauth:token-type:id-token” - // “urn:ietf:params:oauth:token-type:saml2” - // “urn:ietf:params:aws:token-type:aws4_request” - SubjectTokenType string -} - -// tokenURL returns the default STS token endpoint with the configured universe -// domain. -func (c *Config) tokenURL() string { - if c.UniverseDomain == "" { - return strings.Replace(defaultTokenURL, universeDomainPlaceholder, defaultUniverseDomain, 1) - } - return strings.Replace(defaultTokenURL, universeDomainPlaceholder, c.UniverseDomain, 1) -} - -// parse determines the type of CredentialSource needed. -func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) { - //set Defaults - if c.TokenURL == "" { - c.TokenURL = c.tokenURL() - } - supplierOptions := SupplierOptions{Audience: c.Audience, SubjectTokenType: c.SubjectTokenType} - - if c.AwsSecurityCredentialsSupplier != nil { - awsCredSource := awsCredentialSource{ - awsSecurityCredentialsSupplier: c.AwsSecurityCredentialsSupplier, - targetResource: c.Audience, - supplierOptions: supplierOptions, - ctx: ctx, - } - return awsCredSource, nil - } else if c.SubjectTokenSupplier != nil { - return programmaticRefreshCredentialSource{subjectTokenSupplier: c.SubjectTokenSupplier, supplierOptions: supplierOptions, ctx: ctx}, nil - } else if len(c.CredentialSource.EnvironmentID) > 3 && c.CredentialSource.EnvironmentID[:3] == "aws" { - if awsVersion, err := strconv.Atoi(c.CredentialSource.EnvironmentID[3:]); err == nil { - if awsVersion != 1 { - return nil, fmt.Errorf("oauth2/google/externalaccount: aws version '%d' is not supported in the current build", awsVersion) - } - - awsCredSource := awsCredentialSource{ - environmentID: c.CredentialSource.EnvironmentID, - regionURL: c.CredentialSource.RegionURL, - regionalCredVerificationURL: c.CredentialSource.RegionalCredVerificationURL, - credVerificationURL: c.CredentialSource.URL, - targetResource: c.Audience, - ctx: ctx, - } - if c.CredentialSource.IMDSv2SessionTokenURL != "" { - awsCredSource.imdsv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL - } - - return awsCredSource, nil - } - } else if c.CredentialSource.File != "" { - return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}, nil - } else if c.CredentialSource.URL != "" { - return urlCredentialSource{URL: c.CredentialSource.URL, Headers: c.CredentialSource.Headers, Format: c.CredentialSource.Format, ctx: ctx}, nil - } else if c.CredentialSource.Executable != nil { - return createExecutableCredential(ctx, c.CredentialSource.Executable, c) - } - return nil, fmt.Errorf("oauth2/google/externalaccount: unable to parse credential source") -} - -type baseCredentialSource interface { - credentialSourceType() string - subjectToken() (string, error) -} - -// tokenSource is the source that handles external credentials. It is used to retrieve Tokens. -type tokenSource struct { - ctx context.Context - conf *Config -} - -func getMetricsHeaderValue(conf *Config, credSource baseCredentialSource) string { - return fmt.Sprintf("gl-go/%s auth/%s google-byoid-sdk source/%s sa-impersonation/%t config-lifetime/%t", - goVersion(), - "unknown", - credSource.credentialSourceType(), - conf.ServiceAccountImpersonationURL != "", - conf.ServiceAccountImpersonationLifetimeSeconds != 0) -} - -// Token allows tokenSource to conform to the oauth2.TokenSource interface. -func (ts tokenSource) Token() (*oauth2.Token, error) { - conf := ts.conf - - credSource, err := conf.parse(ts.ctx) - if err != nil { - return nil, err - } - subjectToken, err := credSource.subjectToken() - - if err != nil { - return nil, err - } - stsRequest := stsexchange.TokenExchangeRequest{ - GrantType: "urn:ietf:params:oauth:grant-type:token-exchange", - Audience: conf.Audience, - Scope: conf.Scopes, - RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token", - SubjectToken: subjectToken, - SubjectTokenType: conf.SubjectTokenType, - } - header := make(http.Header) - header.Add("Content-Type", "application/x-www-form-urlencoded") - header.Add("x-goog-api-client", getMetricsHeaderValue(conf, credSource)) - clientAuth := stsexchange.ClientAuthentication{ - AuthStyle: oauth2.AuthStyleInHeader, - ClientID: conf.ClientID, - ClientSecret: conf.ClientSecret, - } - var options map[string]any - // Do not pass workforce_pool_user_project when client authentication is used. - // The client ID is sufficient for determining the user project. - if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" { - options = map[string]any{ - "userProject": conf.WorkforcePoolUserProject, - } - } - stsResp, err := stsexchange.ExchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options) - if err != nil { - return nil, err - } - - accessToken := &oauth2.Token{ - AccessToken: stsResp.AccessToken, - TokenType: stsResp.TokenType, - } - - // The RFC8693 doesn't define the explicit 0 of "expires_in" field behavior. - if stsResp.ExpiresIn <= 0 { - return nil, fmt.Errorf("oauth2/google/externalaccount: got invalid expiry from security token service") - } - accessToken.Expiry = now().Add(time.Duration(stsResp.ExpiresIn) * time.Second) - - if stsResp.RefreshToken != "" { - accessToken.RefreshToken = stsResp.RefreshToken - } - return accessToken, nil -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go deleted file mode 100644 index b173c61f06..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright 2022 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 externalaccount - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "os" - "os/exec" - "regexp" - "strings" - "time" -) - -var serviceAccountImpersonationRE = regexp.MustCompile("https://iamcredentials\\..+/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken") - -const ( - executableSupportedMaxVersion = 1 - defaultTimeout = 30 * time.Second - timeoutMinimum = 5 * time.Second - timeoutMaximum = 120 * time.Second - executableSource = "response" - outputFileSource = "output file" -) - -type nonCacheableError struct { - message string -} - -func (nce nonCacheableError) Error() string { - return nce.message -} - -func missingFieldError(source, field string) error { - return fmt.Errorf("oauth2/google/externalaccount: %v missing `%q` field", source, field) -} - -func jsonParsingError(source, data string) error { - return fmt.Errorf("oauth2/google/externalaccount: unable to parse %v\nResponse: %v", source, data) -} - -func malformedFailureError() error { - return nonCacheableError{"oauth2/google/externalaccount: response must include `error` and `message` fields when unsuccessful"} -} - -func userDefinedError(code, message string) error { - return nonCacheableError{fmt.Sprintf("oauth2/google/externalaccount: response contains unsuccessful response: (%v) %v", code, message)} -} - -func unsupportedVersionError(source string, version int) error { - return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported version: %v", source, version) -} - -func tokenExpiredError() error { - return nonCacheableError{"oauth2/google/externalaccount: the token returned by the executable is expired"} -} - -func tokenTypeError(source string) error { - return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported token type", source) -} - -func exitCodeError(exitCode int) error { - return fmt.Errorf("oauth2/google/externalaccount: executable command failed with exit code %v", exitCode) -} - -func executableError(err error) error { - return fmt.Errorf("oauth2/google/externalaccount: executable command failed: %v", err) -} - -func executablesDisallowedError() error { - return errors.New("oauth2/google/externalaccount: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run") -} - -func timeoutRangeError() error { - return errors.New("oauth2/google/externalaccount: invalid `timeout_millis` field — executable timeout must be between 5 and 120 seconds") -} - -func commandMissingError() error { - return errors.New("oauth2/google/externalaccount: missing `command` field — executable command must be provided") -} - -type environment interface { - existingEnv() []string - getenv(string) string - run(ctx context.Context, command string, env []string) ([]byte, error) - now() time.Time -} - -type runtimeEnvironment struct{} - -func (r runtimeEnvironment) existingEnv() []string { - return os.Environ() -} - -func (r runtimeEnvironment) getenv(key string) string { - return os.Getenv(key) -} - -func (r runtimeEnvironment) now() time.Time { - return time.Now().UTC() -} - -func (r runtimeEnvironment) run(ctx context.Context, command string, env []string) ([]byte, error) { - splitCommand := strings.Fields(command) - cmd := exec.CommandContext(ctx, splitCommand[0], splitCommand[1:]...) - cmd.Env = env - - var stdout, stderr bytes.Buffer - cmd.Stdout = &stdout - cmd.Stderr = &stderr - - if err := cmd.Run(); err != nil { - if ctx.Err() == context.DeadlineExceeded { - return nil, context.DeadlineExceeded - } - - if exitError, ok := err.(*exec.ExitError); ok { - return nil, exitCodeError(exitError.ExitCode()) - } - - return nil, executableError(err) - } - - bytesStdout := bytes.TrimSpace(stdout.Bytes()) - if len(bytesStdout) > 0 { - return bytesStdout, nil - } - return bytes.TrimSpace(stderr.Bytes()), nil -} - -type executableCredentialSource struct { - Command string - Timeout time.Duration - OutputFile string - ctx context.Context - config *Config - env environment -} - -// CreateExecutableCredential creates an executableCredentialSource given an ExecutableConfig. -// It also performs defaulting and type conversions. -func createExecutableCredential(ctx context.Context, ec *ExecutableConfig, config *Config) (executableCredentialSource, error) { - if ec.Command == "" { - return executableCredentialSource{}, commandMissingError() - } - - result := executableCredentialSource{} - result.Command = ec.Command - if ec.TimeoutMillis == nil { - result.Timeout = defaultTimeout - } else { - result.Timeout = time.Duration(*ec.TimeoutMillis) * time.Millisecond - if result.Timeout < timeoutMinimum || result.Timeout > timeoutMaximum { - return executableCredentialSource{}, timeoutRangeError() - } - } - result.OutputFile = ec.OutputFile - result.ctx = ctx - result.config = config - result.env = runtimeEnvironment{} - return result, nil -} - -type executableResponse struct { - Version int `json:"version,omitempty"` - Success *bool `json:"success,omitempty"` - TokenType string `json:"token_type,omitempty"` - ExpirationTime int64 `json:"expiration_time,omitempty"` - IdToken string `json:"id_token,omitempty"` - SamlResponse string `json:"saml_response,omitempty"` - Code string `json:"code,omitempty"` - Message string `json:"message,omitempty"` -} - -func (cs executableCredentialSource) parseSubjectTokenFromSource(response []byte, source string, now int64) (string, error) { - var result executableResponse - if err := json.Unmarshal(response, &result); err != nil { - return "", jsonParsingError(source, string(response)) - } - - if result.Version == 0 { - return "", missingFieldError(source, "version") - } - - if result.Success == nil { - return "", missingFieldError(source, "success") - } - - if !*result.Success { - if result.Code == "" || result.Message == "" { - return "", malformedFailureError() - } - return "", userDefinedError(result.Code, result.Message) - } - - if result.Version > executableSupportedMaxVersion || result.Version < 0 { - return "", unsupportedVersionError(source, result.Version) - } - - if result.ExpirationTime == 0 && cs.OutputFile != "" { - return "", missingFieldError(source, "expiration_time") - } - - if result.TokenType == "" { - return "", missingFieldError(source, "token_type") - } - - if result.ExpirationTime != 0 && result.ExpirationTime < now { - return "", tokenExpiredError() - } - - if result.TokenType == "urn:ietf:params:oauth:token-type:jwt" || result.TokenType == "urn:ietf:params:oauth:token-type:id_token" { - if result.IdToken == "" { - return "", missingFieldError(source, "id_token") - } - return result.IdToken, nil - } - - if result.TokenType == "urn:ietf:params:oauth:token-type:saml2" { - if result.SamlResponse == "" { - return "", missingFieldError(source, "saml_response") - } - return result.SamlResponse, nil - } - - return "", tokenTypeError(source) -} - -func (cs executableCredentialSource) credentialSourceType() string { - return "executable" -} - -func (cs executableCredentialSource) subjectToken() (string, error) { - if token, err := cs.getTokenFromOutputFile(); token != "" || err != nil { - return token, err - } - - return cs.getTokenFromExecutableCommand() -} - -func (cs executableCredentialSource) getTokenFromOutputFile() (token string, err error) { - if cs.OutputFile == "" { - // This ExecutableCredentialSource doesn't use an OutputFile. - return "", nil - } - - file, err := os.Open(cs.OutputFile) - if err != nil { - // No OutputFile found. Hasn't been created yet, so skip it. - return "", nil - } - defer file.Close() - - data, err := io.ReadAll(io.LimitReader(file, 1<<20)) - if err != nil || len(data) == 0 { - // Cachefile exists, but no data found. Get new credential. - return "", nil - } - - token, err = cs.parseSubjectTokenFromSource(data, outputFileSource, cs.env.now().Unix()) - if err != nil { - if _, ok := err.(nonCacheableError); ok { - // If the cached token is expired we need a new token, - // and if the cache contains a failure, we need to try again. - return "", nil - } - - // There was an error in the cached token, and the developer should be aware of it. - return "", err - } - // Token parsing succeeded. Use found token. - return token, nil -} - -func (cs executableCredentialSource) executableEnvironment() []string { - result := cs.env.existingEnv() - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE=%v", cs.config.Audience)) - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE=%v", cs.config.SubjectTokenType)) - result = append(result, "GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE=0") - if cs.config.ServiceAccountImpersonationURL != "" { - matches := serviceAccountImpersonationRE.FindStringSubmatch(cs.config.ServiceAccountImpersonationURL) - if matches != nil { - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL=%v", matches[1])) - } - } - if cs.OutputFile != "" { - result = append(result, fmt.Sprintf("GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE=%v", cs.OutputFile)) - } - return result -} - -func (cs executableCredentialSource) getTokenFromExecutableCommand() (string, error) { - // For security reasons, we need our consumers to set this environment variable to allow executables to be run. - if cs.env.getenv("GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES") != "1" { - return "", executablesDisallowedError() - } - - ctx, cancel := context.WithDeadline(cs.ctx, cs.env.now().Add(cs.Timeout)) - defer cancel() - - output, err := cs.env.run(ctx, cs.Command, cs.executableEnvironment()) - if err != nil { - return "", err - } - return cs.parseSubjectTokenFromSource(output, executableSource, cs.env.now().Unix()) -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go deleted file mode 100644 index 46ebc18361..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2020 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 externalaccount - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "os" -) - -type fileCredentialSource struct { - File string - Format Format -} - -func (cs fileCredentialSource) credentialSourceType() string { - return "file" -} - -func (cs fileCredentialSource) subjectToken() (string, error) { - tokenFile, err := os.Open(cs.File) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: failed to open credential file %q", cs.File) - } - defer tokenFile.Close() - tokenBytes, err := io.ReadAll(io.LimitReader(tokenFile, 1<<20)) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: failed to read credential file: %v", err) - } - tokenBytes = bytes.TrimSpace(tokenBytes) - switch cs.Format.Type { - case "json": - jsonData := make(map[string]any) - err = json.Unmarshal(tokenBytes, &jsonData) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err) - } - val, ok := jsonData[cs.Format.SubjectTokenFieldName] - if !ok { - return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials") - } - token, ok := val.(string) - if !ok { - return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token") - } - return token, nil - case "text": - return string(tokenBytes), nil - case "": - return string(tokenBytes), nil - default: - return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type") - } - -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/header.go b/vendor/golang.org/x/oauth2/google/externalaccount/header.go deleted file mode 100644 index 1d5aad2e2d..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/header.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2023 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 externalaccount - -import ( - "runtime" - "strings" - "unicode" -) - -var ( - // version is a package internal global variable for testing purposes. - version = runtime.Version -) - -// versionUnknown is only used when the runtime version cannot be determined. -const versionUnknown = "UNKNOWN" - -// goVersion returns a Go runtime version derived from the runtime environment -// that is modified to be suitable for reporting in a header, meaning it has no -// whitespace. If it is unable to determine the Go runtime version, it returns -// versionUnknown. -func goVersion() string { - const develPrefix = "devel +" - - s := version() - if strings.HasPrefix(s, develPrefix) { - s = s[len(develPrefix):] - if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - return s - } else if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - - notSemverRune := func(r rune) bool { - return !strings.ContainsRune("0123456789.", r) - } - - if strings.HasPrefix(s, "go1") { - s = s[2:] - var prerelease string - if p := strings.IndexFunc(s, notSemverRune); p >= 0 { - s, prerelease = s[:p], s[p:] - } - if strings.HasSuffix(s, ".") { - s += "0" - } else if strings.Count(s, ".") < 2 { - s += ".0" - } - if prerelease != "" { - // Some release candidates already have a dash in them. - if !strings.HasPrefix(prerelease, "-") { - prerelease = "-" + prerelease - } - s += prerelease - } - return s - } - return "UNKNOWN" -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go deleted file mode 100644 index 6c1abdf2da..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2024 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 externalaccount - -import "context" - -type programmaticRefreshCredentialSource struct { - supplierOptions SupplierOptions - subjectTokenSupplier SubjectTokenSupplier - ctx context.Context -} - -func (cs programmaticRefreshCredentialSource) credentialSourceType() string { - return "programmatic" -} - -func (cs programmaticRefreshCredentialSource) subjectToken() (string, error) { - return cs.subjectTokenSupplier.SubjectToken(cs.ctx, cs.supplierOptions) -} diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go deleted file mode 100644 index 65bfd2046c..0000000000 --- a/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2020 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 externalaccount - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - - "golang.org/x/oauth2" -) - -type urlCredentialSource struct { - URL string - Headers map[string]string - Format Format - ctx context.Context -} - -func (cs urlCredentialSource) credentialSourceType() string { - return "url" -} - -func (cs urlCredentialSource) subjectToken() (string, error) { - client := oauth2.NewClient(cs.ctx, nil) - req, err := http.NewRequest("GET", cs.URL, nil) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: HTTP request for URL-sourced credential failed: %v", err) - } - req = req.WithContext(cs.ctx) - - for key, val := range cs.Headers { - req.Header.Add(key, val) - } - resp, err := client.Do(req) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: invalid response when retrieving subject token: %v", err) - } - defer resp.Body.Close() - - respBody, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: invalid body in subject token URL query: %v", err) - } - if c := resp.StatusCode; c < 200 || c > 299 { - return "", fmt.Errorf("oauth2/google/externalaccount: status code %d: %s", c, respBody) - } - - switch cs.Format.Type { - case "json": - jsonData := make(map[string]any) - err = json.Unmarshal(respBody, &jsonData) - if err != nil { - return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err) - } - val, ok := jsonData[cs.Format.SubjectTokenFieldName] - if !ok { - return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials") - } - token, ok := val.(string) - if !ok { - return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token") - } - return token, nil - case "text": - return string(respBody), nil - case "": - return string(respBody), nil - default: - return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type") - } - -} diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go deleted file mode 100644 index 7d1fdd31d3..0000000000 --- a/vendor/golang.org/x/oauth2/google/google.go +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright 2014 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 google - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "net/url" - "strings" - "time" - - "cloud.google.com/go/compute/metadata" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google/externalaccount" - "golang.org/x/oauth2/google/internal/externalaccountauthorizeduser" - "golang.org/x/oauth2/google/internal/impersonate" - "golang.org/x/oauth2/jwt" -) - -// Endpoint is Google's OAuth 2.0 default endpoint. -var Endpoint = oauth2.Endpoint{ - AuthURL: "https://accounts.google.com/o/oauth2/auth", - TokenURL: "https://oauth2.googleapis.com/token", - DeviceAuthURL: "https://oauth2.googleapis.com/device/code", - AuthStyle: oauth2.AuthStyleInParams, -} - -// MTLSTokenURL is Google's OAuth 2.0 default mTLS endpoint. -const MTLSTokenURL = "https://oauth2.mtls.googleapis.com/token" - -// JWTTokenURL is Google's OAuth 2.0 token URL to use with the JWT flow. -const JWTTokenURL = "https://oauth2.googleapis.com/token" - -// ConfigFromJSON uses a Google Developers Console client_credentials.json -// file to construct a config. -// client_credentials.json can be downloaded from -// https://console.developers.google.com, under "Credentials". Download the Web -// application credentials in the JSON format and provide the contents of the -// file as jsonKey. -func ConfigFromJSON(jsonKey []byte, scope ...string) (*oauth2.Config, error) { - type cred struct { - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - RedirectURIs []string `json:"redirect_uris"` - AuthURI string `json:"auth_uri"` - TokenURI string `json:"token_uri"` - } - var j struct { - Web *cred `json:"web"` - Installed *cred `json:"installed"` - } - if err := json.Unmarshal(jsonKey, &j); err != nil { - return nil, err - } - var c *cred - switch { - case j.Web != nil: - c = j.Web - case j.Installed != nil: - c = j.Installed - default: - return nil, fmt.Errorf("oauth2/google: no credentials found") - } - if len(c.RedirectURIs) < 1 { - return nil, errors.New("oauth2/google: missing redirect URL in the client_credentials.json") - } - return &oauth2.Config{ - ClientID: c.ClientID, - ClientSecret: c.ClientSecret, - RedirectURL: c.RedirectURIs[0], - Scopes: scope, - Endpoint: oauth2.Endpoint{ - AuthURL: c.AuthURI, - TokenURL: c.TokenURI, - }, - }, nil -} - -// JWTConfigFromJSON uses a Google Developers service account JSON key file to read -// the credentials that authorize and authenticate the requests. -// Create a service account on "Credentials" for your project at -// https://console.developers.google.com to download a JSON key file. -func JWTConfigFromJSON(jsonKey []byte, scope ...string) (*jwt.Config, error) { - var f credentialsFile - if err := json.Unmarshal(jsonKey, &f); err != nil { - return nil, err - } - if f.Type != serviceAccountKey { - return nil, fmt.Errorf("google: read JWT from JSON credentials: 'type' field is %q (expected %q)", f.Type, serviceAccountKey) - } - scope = append([]string(nil), scope...) // copy - return f.jwtConfig(scope, ""), nil -} - -// JSON key file types. -const ( - serviceAccountKey = "service_account" - userCredentialsKey = "authorized_user" - externalAccountKey = "external_account" - externalAccountAuthorizedUserKey = "external_account_authorized_user" - impersonatedServiceAccount = "impersonated_service_account" -) - -// credentialsFile is the unmarshalled representation of a credentials file. -type credentialsFile struct { - Type string `json:"type"` - - // Service Account fields - ClientEmail string `json:"client_email"` - PrivateKeyID string `json:"private_key_id"` - PrivateKey string `json:"private_key"` - AuthURL string `json:"auth_uri"` - TokenURL string `json:"token_uri"` - ProjectID string `json:"project_id"` - UniverseDomain string `json:"universe_domain"` - - // User Credential fields - // (These typically come from gcloud auth.) - ClientSecret string `json:"client_secret"` - ClientID string `json:"client_id"` - RefreshToken string `json:"refresh_token"` - - // External Account fields - Audience string `json:"audience"` - SubjectTokenType string `json:"subject_token_type"` - TokenURLExternal string `json:"token_url"` - TokenInfoURL string `json:"token_info_url"` - ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` - ServiceAccountImpersonation serviceAccountImpersonationInfo `json:"service_account_impersonation"` - Delegates []string `json:"delegates"` - CredentialSource externalaccount.CredentialSource `json:"credential_source"` - QuotaProjectID string `json:"quota_project_id"` - WorkforcePoolUserProject string `json:"workforce_pool_user_project"` - - // External Account Authorized User fields - RevokeURL string `json:"revoke_url"` - - // Service account impersonation - SourceCredentials *credentialsFile `json:"source_credentials"` -} - -type serviceAccountImpersonationInfo struct { - TokenLifetimeSeconds int `json:"token_lifetime_seconds"` -} - -func (f *credentialsFile) jwtConfig(scopes []string, subject string) *jwt.Config { - cfg := &jwt.Config{ - Email: f.ClientEmail, - PrivateKey: []byte(f.PrivateKey), - PrivateKeyID: f.PrivateKeyID, - Scopes: scopes, - TokenURL: f.TokenURL, - Subject: subject, // This is the user email to impersonate - Audience: f.Audience, - } - if cfg.TokenURL == "" { - cfg.TokenURL = JWTTokenURL - } - return cfg -} - -func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsParams) (oauth2.TokenSource, error) { - switch f.Type { - case serviceAccountKey: - cfg := f.jwtConfig(params.Scopes, params.Subject) - return cfg.TokenSource(ctx), nil - case userCredentialsKey: - cfg := &oauth2.Config{ - ClientID: f.ClientID, - ClientSecret: f.ClientSecret, - Scopes: params.Scopes, - Endpoint: oauth2.Endpoint{ - AuthURL: f.AuthURL, - TokenURL: f.TokenURL, - AuthStyle: oauth2.AuthStyleInParams, - }, - } - if cfg.Endpoint.AuthURL == "" { - cfg.Endpoint.AuthURL = Endpoint.AuthURL - } - if cfg.Endpoint.TokenURL == "" { - if params.TokenURL != "" { - cfg.Endpoint.TokenURL = params.TokenURL - } else { - cfg.Endpoint.TokenURL = Endpoint.TokenURL - } - } - tok := &oauth2.Token{RefreshToken: f.RefreshToken} - return cfg.TokenSource(ctx, tok), nil - case externalAccountKey: - cfg := &externalaccount.Config{ - Audience: f.Audience, - SubjectTokenType: f.SubjectTokenType, - TokenURL: f.TokenURLExternal, - TokenInfoURL: f.TokenInfoURL, - ServiceAccountImpersonationURL: f.ServiceAccountImpersonationURL, - ServiceAccountImpersonationLifetimeSeconds: f.ServiceAccountImpersonation.TokenLifetimeSeconds, - ClientSecret: f.ClientSecret, - ClientID: f.ClientID, - CredentialSource: &f.CredentialSource, - QuotaProjectID: f.QuotaProjectID, - Scopes: params.Scopes, - WorkforcePoolUserProject: f.WorkforcePoolUserProject, - } - return externalaccount.NewTokenSource(ctx, *cfg) - case externalAccountAuthorizedUserKey: - cfg := &externalaccountauthorizeduser.Config{ - Audience: f.Audience, - RefreshToken: f.RefreshToken, - TokenURL: f.TokenURLExternal, - TokenInfoURL: f.TokenInfoURL, - ClientID: f.ClientID, - ClientSecret: f.ClientSecret, - RevokeURL: f.RevokeURL, - QuotaProjectID: f.QuotaProjectID, - Scopes: params.Scopes, - } - return cfg.TokenSource(ctx) - case impersonatedServiceAccount: - if f.ServiceAccountImpersonationURL == "" || f.SourceCredentials == nil { - return nil, errors.New("missing 'source_credentials' field or 'service_account_impersonation_url' in credentials") - } - - ts, err := f.SourceCredentials.tokenSource(ctx, params) - if err != nil { - return nil, err - } - imp := impersonate.ImpersonateTokenSource{ - Ctx: ctx, - URL: f.ServiceAccountImpersonationURL, - Scopes: params.Scopes, - Ts: ts, - Delegates: f.Delegates, - } - return oauth2.ReuseTokenSource(nil, imp), nil - case "": - return nil, errors.New("missing 'type' field in credentials") - default: - return nil, fmt.Errorf("unknown credential type: %q", f.Type) - } -} - -// ComputeTokenSource returns a token source that fetches access tokens -// from Google Compute Engine (GCE)'s metadata server. It's only valid to use -// this token source if your program is running on a GCE instance. -// If no account is specified, "default" is used. -// If no scopes are specified, a set of default scopes are automatically granted. -// Further information about retrieving access tokens from the GCE metadata -// server can be found at https://cloud.google.com/compute/docs/authentication. -func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource { - // Refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any - // refreshes earlier are a waste of compute. - earlyExpirySecs := 225 * time.Second - return computeTokenSource(account, earlyExpirySecs, scope...) -} - -func computeTokenSource(account string, earlyExpiry time.Duration, scope ...string) oauth2.TokenSource { - return oauth2.ReuseTokenSourceWithExpiry(nil, computeSource{account: account, scopes: scope}, earlyExpiry) -} - -type computeSource struct { - account string - scopes []string -} - -func (cs computeSource) Token() (*oauth2.Token, error) { - if !metadata.OnGCE() { - return nil, errors.New("oauth2/google: can't get a token from the metadata service; not running on GCE") - } - acct := cs.account - if acct == "" { - acct = "default" - } - tokenURI := "instance/service-accounts/" + acct + "/token" - if len(cs.scopes) > 0 { - v := url.Values{} - v.Set("scopes", strings.Join(cs.scopes, ",")) - tokenURI = tokenURI + "?" + v.Encode() - } - tokenJSON, err := metadata.Get(tokenURI) - if err != nil { - return nil, err - } - var res oauth2.Token - err = json.NewDecoder(strings.NewReader(tokenJSON)).Decode(&res) - if err != nil { - return nil, fmt.Errorf("oauth2/google: invalid token JSON from metadata: %v", err) - } - if res.ExpiresIn == 0 || res.AccessToken == "" { - return nil, fmt.Errorf("oauth2/google: incomplete token received from metadata") - } - tok := &oauth2.Token{ - AccessToken: res.AccessToken, - TokenType: res.TokenType, - Expiry: time.Now().Add(time.Duration(res.ExpiresIn) * time.Second), - } - // NOTE(cbro): add hidden metadata about where the token is from. - // This is needed for detection by client libraries to know that credentials come from the metadata server. - // This may be removed in a future version of this library. - return tok.WithExtra(map[string]any{ - "oauth2.google.tokenSource": "compute-metadata", - "oauth2.google.serviceAccount": acct, - }), nil -} diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go b/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go deleted file mode 100644 index cb58207074..0000000000 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccountauthorizeduser/externalaccountauthorizeduser.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2023 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 externalaccountauthorizeduser - -import ( - "context" - "errors" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/google/internal/stsexchange" -) - -// now aliases time.Now for testing. -var now = func() time.Time { - return time.Now().UTC() -} - -var tokenValid = func(token oauth2.Token) bool { - return token.Valid() -} - -type Config struct { - // Audience is the Secure Token Service (STS) audience which contains the resource name for the workforce pool and - // the provider identifier in that pool. - Audience string - // RefreshToken is the optional OAuth 2.0 refresh token. If specified, credentials can be refreshed. - RefreshToken string - // TokenURL is the optional STS token exchange endpoint for refresh. Must be specified for refresh, can be left as - // None if the token can not be refreshed. - TokenURL string - // TokenInfoURL is the optional STS endpoint URL for token introspection. - TokenInfoURL string - // ClientID is only required in conjunction with ClientSecret, as described above. - ClientID string - // ClientSecret is currently only required if token_info endpoint also needs to be called with the generated GCP - // access token. When provided, STS will be called with additional basic authentication using client_id as username - // and client_secret as password. - ClientSecret string - // Token is the OAuth2.0 access token. Can be nil if refresh information is provided. - Token string - // Expiry is the optional expiration datetime of the OAuth 2.0 access token. - Expiry time.Time - // RevokeURL is the optional STS endpoint URL for revoking tokens. - RevokeURL string - // QuotaProjectID is the optional project ID used for quota and billing. This project may be different from the - // project used to create the credentials. - QuotaProjectID string - Scopes []string -} - -func (c *Config) canRefresh() bool { - return c.ClientID != "" && c.ClientSecret != "" && c.RefreshToken != "" && c.TokenURL != "" -} - -func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { - var token oauth2.Token - if c.Token != "" && !c.Expiry.IsZero() { - token = oauth2.Token{ - AccessToken: c.Token, - Expiry: c.Expiry, - TokenType: "Bearer", - } - } - if !tokenValid(token) && !c.canRefresh() { - return nil, errors.New("oauth2/google: Token should be created with fields to make it valid (`token` and `expiry`), or fields to allow it to refresh (`refresh_token`, `token_url`, `client_id`, `client_secret`).") - } - - ts := tokenSource{ - ctx: ctx, - conf: c, - } - - return oauth2.ReuseTokenSource(&token, ts), nil -} - -type tokenSource struct { - ctx context.Context - conf *Config -} - -func (ts tokenSource) Token() (*oauth2.Token, error) { - conf := ts.conf - if !conf.canRefresh() { - return nil, errors.New("oauth2/google: The credentials do not contain the necessary fields need to refresh the access token. You must specify refresh_token, token_url, client_id, and client_secret.") - } - - clientAuth := stsexchange.ClientAuthentication{ - AuthStyle: oauth2.AuthStyleInHeader, - ClientID: conf.ClientID, - ClientSecret: conf.ClientSecret, - } - - stsResponse, err := stsexchange.RefreshAccessToken(ts.ctx, conf.TokenURL, conf.RefreshToken, clientAuth, nil) - if err != nil { - return nil, err - } - if stsResponse.ExpiresIn < 0 { - return nil, errors.New("oauth2/google: got invalid expiry from security token service") - } - - if stsResponse.RefreshToken != "" { - conf.RefreshToken = stsResponse.RefreshToken - } - - token := &oauth2.Token{ - AccessToken: stsResponse.AccessToken, - Expiry: now().Add(time.Duration(stsResponse.ExpiresIn) * time.Second), - TokenType: "Bearer", - } - return token, nil -} diff --git a/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go b/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go deleted file mode 100644 index eaa8b5c71f..0000000000 --- a/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright 2021 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 impersonate - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "time" - - "golang.org/x/oauth2" -) - -// generateAccesstokenReq is used for service account impersonation -type generateAccessTokenReq struct { - Delegates []string `json:"delegates,omitempty"` - Lifetime string `json:"lifetime,omitempty"` - Scope []string `json:"scope,omitempty"` -} - -type impersonateTokenResponse struct { - AccessToken string `json:"accessToken"` - ExpireTime string `json:"expireTime"` -} - -// ImpersonateTokenSource uses a source credential, stored in Ts, to request an access token to the provided URL. -// Scopes can be defined when the access token is requested. -type ImpersonateTokenSource struct { - // Ctx is the execution context of the impersonation process - // used to perform http call to the URL. Required - Ctx context.Context - // Ts is the source credential used to generate a token on the - // impersonated service account. Required. - Ts oauth2.TokenSource - - // URL is the endpoint to call to generate a token - // on behalf the service account. Required. - URL string - // Scopes that the impersonated credential should have. Required. - Scopes []string - // Delegates are the service account email addresses in a delegation chain. - // Each service account must be granted roles/iam.serviceAccountTokenCreator - // on the next service account in the chain. Optional. - Delegates []string - // TokenLifetimeSeconds is the number of seconds the impersonation token will - // be valid for. - TokenLifetimeSeconds int -} - -// Token performs the exchange to get a temporary service account token to allow access to GCP. -func (its ImpersonateTokenSource) Token() (*oauth2.Token, error) { - lifetimeString := "3600s" - if its.TokenLifetimeSeconds != 0 { - lifetimeString = fmt.Sprintf("%ds", its.TokenLifetimeSeconds) - } - reqBody := generateAccessTokenReq{ - Lifetime: lifetimeString, - Scope: its.Scopes, - Delegates: its.Delegates, - } - b, err := json.Marshal(reqBody) - if err != nil { - return nil, fmt.Errorf("oauth2/google: unable to marshal request: %v", err) - } - client := oauth2.NewClient(its.Ctx, its.Ts) - req, err := http.NewRequest("POST", its.URL, bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("oauth2/google: unable to create impersonation request: %v", err) - } - req = req.WithContext(its.Ctx) - req.Header.Set("Content-Type", "application/json") - - resp, err := client.Do(req) - if err != nil { - return nil, fmt.Errorf("oauth2/google: unable to generate access token: %v", err) - } - defer resp.Body.Close() - body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return nil, fmt.Errorf("oauth2/google: unable to read body: %v", err) - } - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, fmt.Errorf("oauth2/google: status code %d: %s", c, body) - } - - var accessTokenResp impersonateTokenResponse - if err := json.Unmarshal(body, &accessTokenResp); err != nil { - return nil, fmt.Errorf("oauth2/google: unable to parse response: %v", err) - } - expiry, err := time.Parse(time.RFC3339, accessTokenResp.ExpireTime) - if err != nil { - return nil, fmt.Errorf("oauth2/google: unable to parse expiry: %v", err) - } - return &oauth2.Token{ - AccessToken: accessTokenResp.AccessToken, - Expiry: expiry, - TokenType: "Bearer", - }, nil -} diff --git a/vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go b/vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go deleted file mode 100644 index ebd520eace..0000000000 --- a/vendor/golang.org/x/oauth2/google/internal/stsexchange/clientauth.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2020 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 stsexchange - -import ( - "encoding/base64" - "net/http" - "net/url" - - "golang.org/x/oauth2" -) - -// ClientAuthentication represents an OAuth client ID and secret and the mechanism for passing these credentials as stated in rfc6749#2.3.1. -type ClientAuthentication struct { - // AuthStyle can be either basic or request-body - AuthStyle oauth2.AuthStyle - ClientID string - ClientSecret string -} - -// InjectAuthentication is used to add authentication to a Secure Token Service exchange -// request. It modifies either the passed url.Values or http.Header depending on the desired -// authentication format. -func (c *ClientAuthentication) InjectAuthentication(values url.Values, headers http.Header) { - if c.ClientID == "" || c.ClientSecret == "" || values == nil || headers == nil { - return - } - - switch c.AuthStyle { - case oauth2.AuthStyleInHeader: // AuthStyleInHeader corresponds to basic authentication as defined in rfc7617#2 - plainHeader := c.ClientID + ":" + c.ClientSecret - headers.Add("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(plainHeader))) - case oauth2.AuthStyleInParams: // AuthStyleInParams corresponds to request-body authentication with ClientID and ClientSecret in the message body. - values.Set("client_id", c.ClientID) - values.Set("client_secret", c.ClientSecret) - case oauth2.AuthStyleAutoDetect: - values.Set("client_id", c.ClientID) - values.Set("client_secret", c.ClientSecret) - default: - values.Set("client_id", c.ClientID) - values.Set("client_secret", c.ClientSecret) - } -} diff --git a/vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go b/vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go deleted file mode 100644 index edf700e215..0000000000 --- a/vendor/golang.org/x/oauth2/google/internal/stsexchange/sts_exchange.go +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright 2020 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 stsexchange - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strconv" - "strings" - - "golang.org/x/oauth2" -) - -func defaultHeader() http.Header { - header := make(http.Header) - header.Add("Content-Type", "application/x-www-form-urlencoded") - return header -} - -// ExchangeToken performs an oauth2 token exchange with the provided endpoint. -// The first 4 fields are all mandatory. headers can be used to pass additional -// headers beyond the bare minimum required by the token exchange. options can -// be used to pass additional JSON-structured options to the remote server. -func ExchangeToken(ctx context.Context, endpoint string, request *TokenExchangeRequest, authentication ClientAuthentication, headers http.Header, options map[string]any) (*Response, error) { - data := url.Values{} - data.Set("audience", request.Audience) - data.Set("grant_type", "urn:ietf:params:oauth:grant-type:token-exchange") - data.Set("requested_token_type", "urn:ietf:params:oauth:token-type:access_token") - data.Set("subject_token_type", request.SubjectTokenType) - data.Set("subject_token", request.SubjectToken) - data.Set("scope", strings.Join(request.Scope, " ")) - if options != nil { - opts, err := json.Marshal(options) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to marshal additional options: %v", err) - } - data.Set("options", string(opts)) - } - - return makeRequest(ctx, endpoint, data, authentication, headers) -} - -func RefreshAccessToken(ctx context.Context, endpoint string, refreshToken string, authentication ClientAuthentication, headers http.Header) (*Response, error) { - data := url.Values{} - data.Set("grant_type", "refresh_token") - data.Set("refresh_token", refreshToken) - - return makeRequest(ctx, endpoint, data, authentication, headers) -} - -func makeRequest(ctx context.Context, endpoint string, data url.Values, authentication ClientAuthentication, headers http.Header) (*Response, error) { - if headers == nil { - headers = defaultHeader() - } - client := oauth2.NewClient(ctx, nil) - authentication.InjectAuthentication(data, headers) - encodedData := data.Encode() - - req, err := http.NewRequest("POST", endpoint, strings.NewReader(encodedData)) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to properly build http request: %v", err) - } - req = req.WithContext(ctx) - for key, list := range headers { - for _, val := range list { - req.Header.Add(key, val) - } - } - req.Header.Add("Content-Length", strconv.Itoa(len(encodedData))) - - resp, err := client.Do(req) - - if err != nil { - return nil, fmt.Errorf("oauth2/google: invalid response from Secure Token Server: %v", err) - } - defer resp.Body.Close() - - body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return nil, err - } - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, fmt.Errorf("oauth2/google: status code %d: %s", c, body) - } - var stsResp Response - err = json.Unmarshal(body, &stsResp) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to unmarshal response body from Secure Token Server: %v", err) - - } - - return &stsResp, nil -} - -// TokenExchangeRequest contains fields necessary to make an oauth2 token exchange. -type TokenExchangeRequest struct { - ActingParty struct { - ActorToken string - ActorTokenType string - } - GrantType string - Resource string - Audience string - Scope []string - RequestedTokenType string - SubjectToken string - SubjectTokenType string -} - -// Response is used to decode the remote server response during an oauth2 token exchange. -type Response struct { - AccessToken string `json:"access_token"` - IssuedTokenType string `json:"issued_token_type"` - TokenType string `json:"token_type"` - ExpiresIn int `json:"expires_in"` - Scope string `json:"scope"` - RefreshToken string `json:"refresh_token"` -} diff --git a/vendor/golang.org/x/oauth2/google/jwt.go b/vendor/golang.org/x/oauth2/google/jwt.go deleted file mode 100644 index e89e6ae17b..0000000000 --- a/vendor/golang.org/x/oauth2/google/jwt.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2015 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 google - -import ( - "crypto/rsa" - "fmt" - "strings" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/internal" - "golang.org/x/oauth2/jws" -) - -// JWTAccessTokenSourceFromJSON uses a Google Developers service account JSON -// key file to read the credentials that authorize and authenticate the -// requests, and returns a TokenSource that does not use any OAuth2 flow but -// instead creates a JWT and sends that as the access token. -// The audience is typically a URL that specifies the scope of the credentials. -// -// Note that this is not a standard OAuth flow, but rather an -// optimization supported by a few Google services. -// Unless you know otherwise, you should use JWTConfigFromJSON instead. -func JWTAccessTokenSourceFromJSON(jsonKey []byte, audience string) (oauth2.TokenSource, error) { - return newJWTSource(jsonKey, audience, nil) -} - -// JWTAccessTokenSourceWithScope uses a Google Developers service account JSON -// key file to read the credentials that authorize and authenticate the -// requests, and returns a TokenSource that does not use any OAuth2 flow but -// instead creates a JWT and sends that as the access token. -// The scope is typically a list of URLs that specifies the scope of the -// credentials. -// -// Note that this is not a standard OAuth flow, but rather an -// optimization supported by a few Google services. -// Unless you know otherwise, you should use JWTConfigFromJSON instead. -func JWTAccessTokenSourceWithScope(jsonKey []byte, scope ...string) (oauth2.TokenSource, error) { - return newJWTSource(jsonKey, "", scope) -} - -func newJWTSource(jsonKey []byte, audience string, scopes []string) (oauth2.TokenSource, error) { - if len(scopes) == 0 && audience == "" { - return nil, fmt.Errorf("google: missing scope/audience for JWT access token") - } - - cfg, err := JWTConfigFromJSON(jsonKey) - if err != nil { - return nil, fmt.Errorf("google: could not parse JSON key: %v", err) - } - pk, err := internal.ParseKey(cfg.PrivateKey) - if err != nil { - return nil, fmt.Errorf("google: could not parse key: %v", err) - } - ts := &jwtAccessTokenSource{ - email: cfg.Email, - audience: audience, - scopes: scopes, - pk: pk, - pkID: cfg.PrivateKeyID, - } - tok, err := ts.Token() - if err != nil { - return nil, err - } - rts := newErrWrappingTokenSource(oauth2.ReuseTokenSource(tok, ts)) - return rts, nil -} - -type jwtAccessTokenSource struct { - email, audience string - scopes []string - pk *rsa.PrivateKey - pkID string -} - -func (ts *jwtAccessTokenSource) Token() (*oauth2.Token, error) { - iat := time.Now() - exp := iat.Add(time.Hour) - scope := strings.Join(ts.scopes, " ") - cs := &jws.ClaimSet{ - Iss: ts.email, - Sub: ts.email, - Aud: ts.audience, - Scope: scope, - Iat: iat.Unix(), - Exp: exp.Unix(), - } - hdr := &jws.Header{ - Algorithm: "RS256", - Typ: "JWT", - KeyID: string(ts.pkID), - } - msg, err := jws.Encode(hdr, cs, ts.pk) - if err != nil { - return nil, fmt.Errorf("google: could not encode JWT: %v", err) - } - return &oauth2.Token{AccessToken: msg, TokenType: "Bearer", Expiry: exp}, nil -} diff --git a/vendor/golang.org/x/oauth2/google/sdk.go b/vendor/golang.org/x/oauth2/google/sdk.go deleted file mode 100644 index 456224bc78..0000000000 --- a/vendor/golang.org/x/oauth2/google/sdk.go +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright 2015 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 google - -import ( - "bufio" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "os" - "os/user" - "path/filepath" - "runtime" - "strings" - "time" - - "golang.org/x/oauth2" -) - -type sdkCredentials struct { - Data []struct { - Credential struct { - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - AccessToken string `json:"access_token"` - RefreshToken string `json:"refresh_token"` - TokenExpiry *time.Time `json:"token_expiry"` - } `json:"credential"` - Key struct { - Account string `json:"account"` - Scope string `json:"scope"` - } `json:"key"` - } -} - -// An SDKConfig provides access to tokens from an account already -// authorized via the Google Cloud SDK. -type SDKConfig struct { - conf oauth2.Config - initialToken *oauth2.Token -} - -// NewSDKConfig creates an SDKConfig for the given Google Cloud SDK -// account. If account is empty, the account currently active in -// Google Cloud SDK properties is used. -// Google Cloud SDK credentials must be created by running `gcloud auth` -// before using this function. -// The Google Cloud SDK is available at https://cloud.google.com/sdk/. -func NewSDKConfig(account string) (*SDKConfig, error) { - configPath, err := sdkConfigPath() - if err != nil { - return nil, fmt.Errorf("oauth2/google: error getting SDK config path: %v", err) - } - credentialsPath := filepath.Join(configPath, "credentials") - f, err := os.Open(credentialsPath) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to load SDK credentials: %v", err) - } - defer f.Close() - - var c sdkCredentials - if err := json.NewDecoder(f).Decode(&c); err != nil { - return nil, fmt.Errorf("oauth2/google: failed to decode SDK credentials from %q: %v", credentialsPath, err) - } - if len(c.Data) == 0 { - return nil, fmt.Errorf("oauth2/google: no credentials found in %q, run `gcloud auth login` to create one", credentialsPath) - } - if account == "" { - propertiesPath := filepath.Join(configPath, "properties") - f, err := os.Open(propertiesPath) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to load SDK properties: %v", err) - } - defer f.Close() - ini, err := parseINI(f) - if err != nil { - return nil, fmt.Errorf("oauth2/google: failed to parse SDK properties %q: %v", propertiesPath, err) - } - core, ok := ini["core"] - if !ok { - return nil, fmt.Errorf("oauth2/google: failed to find [core] section in %v", ini) - } - active, ok := core["account"] - if !ok { - return nil, fmt.Errorf("oauth2/google: failed to find %q attribute in %v", "account", core) - } - account = active - } - - for _, d := range c.Data { - if account == "" || d.Key.Account == account { - if d.Credential.AccessToken == "" && d.Credential.RefreshToken == "" { - return nil, fmt.Errorf("oauth2/google: no token available for account %q", account) - } - var expiry time.Time - if d.Credential.TokenExpiry != nil { - expiry = *d.Credential.TokenExpiry - } - return &SDKConfig{ - conf: oauth2.Config{ - ClientID: d.Credential.ClientID, - ClientSecret: d.Credential.ClientSecret, - Scopes: strings.Split(d.Key.Scope, " "), - Endpoint: Endpoint, - RedirectURL: "oob", - }, - initialToken: &oauth2.Token{ - AccessToken: d.Credential.AccessToken, - RefreshToken: d.Credential.RefreshToken, - Expiry: expiry, - }, - }, nil - } - } - return nil, fmt.Errorf("oauth2/google: no such credentials for account %q", account) -} - -// Client returns an HTTP client using Google Cloud SDK credentials to -// authorize requests. The token will auto-refresh as necessary. The -// underlying http.RoundTripper will be obtained using the provided -// context. The returned client and its Transport should not be -// modified. -func (c *SDKConfig) Client(ctx context.Context) *http.Client { - return &http.Client{ - Transport: &oauth2.Transport{ - Source: c.TokenSource(ctx), - }, - } -} - -// TokenSource returns an oauth2.TokenSource that retrieve tokens from -// Google Cloud SDK credentials using the provided context. -// It will returns the current access token stored in the credentials, -// and refresh it when it expires, but it won't update the credentials -// with the new access token. -func (c *SDKConfig) TokenSource(ctx context.Context) oauth2.TokenSource { - return c.conf.TokenSource(ctx, c.initialToken) -} - -// Scopes are the OAuth 2.0 scopes the current account is authorized for. -func (c *SDKConfig) Scopes() []string { - return c.conf.Scopes -} - -func parseINI(ini io.Reader) (map[string]map[string]string, error) { - result := map[string]map[string]string{ - "": {}, // root section - } - scanner := bufio.NewScanner(ini) - currentSection := "" - for scanner.Scan() { - line := strings.TrimSpace(scanner.Text()) - if strings.HasPrefix(line, ";") { - // comment. - continue - } - if strings.HasPrefix(line, "[") && strings.HasSuffix(line, "]") { - currentSection = strings.TrimSpace(line[1 : len(line)-1]) - result[currentSection] = map[string]string{} - continue - } - parts := strings.SplitN(line, "=", 2) - if len(parts) == 2 && parts[0] != "" { - result[currentSection][strings.TrimSpace(parts[0])] = strings.TrimSpace(parts[1]) - } - } - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("error scanning ini: %v", err) - } - return result, nil -} - -// sdkConfigPath tries to guess where the gcloud config is located. -// It can be overridden during tests. -var sdkConfigPath = func() (string, error) { - if runtime.GOOS == "windows" { - return filepath.Join(os.Getenv("APPDATA"), "gcloud"), nil - } - homeDir := guessUnixHomeDir() - if homeDir == "" { - return "", errors.New("unable to get current user home directory: os/user lookup failed; $HOME is empty") - } - return filepath.Join(homeDir, ".config", "gcloud"), nil -} - -func guessUnixHomeDir() string { - // Prefer $HOME over user.Current due to glibc bug: golang.org/issue/13470 - if v := os.Getenv("HOME"); v != "" { - return v - } - // Else, fall back to user.Current: - if u, err := user.Current(); err == nil { - return u.HomeDir - } - return "" -} diff --git a/vendor/golang.org/x/oauth2/jws/jws.go b/vendor/golang.org/x/oauth2/jws/jws.go deleted file mode 100644 index 9bc484406e..0000000000 --- a/vendor/golang.org/x/oauth2/jws/jws.go +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright 2014 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 jws provides a partial implementation -// of JSON Web Signature encoding and decoding. -// It exists to support the [golang.org/x/oauth2] package. -// -// See RFC 7515. -// -// Deprecated: this package is not intended for public use and might be -// removed in the future. It exists for internal use only. -// Please switch to another JWS package or copy this package into your own -// source tree. -package jws // import "golang.org/x/oauth2/jws" - -import ( - "bytes" - "crypto" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "encoding/base64" - "encoding/json" - "errors" - "fmt" - "strings" - "time" -) - -// ClaimSet contains information about the JWT signature including the -// permissions being requested (scopes), the target of the token, the issuer, -// the time the token was issued, and the lifetime of the token. -type ClaimSet struct { - Iss string `json:"iss"` // email address of the client_id of the application making the access token request - Scope string `json:"scope,omitempty"` // space-delimited list of the permissions the application requests - Aud string `json:"aud"` // descriptor of the intended target of the assertion (Optional). - Exp int64 `json:"exp"` // the expiration time of the assertion (seconds since Unix epoch) - Iat int64 `json:"iat"` // the time the assertion was issued (seconds since Unix epoch) - Typ string `json:"typ,omitempty"` // token type (Optional). - - // Email for which the application is requesting delegated access (Optional). - Sub string `json:"sub,omitempty"` - - // The old name of Sub. Client keeps setting Prn to be - // complaint with legacy OAuth 2.0 providers. (Optional) - Prn string `json:"prn,omitempty"` - - // See http://tools.ietf.org/html/draft-jones-json-web-token-10#section-4.3 - // This array is marshalled using custom code (see (c *ClaimSet) encode()). - PrivateClaims map[string]any `json:"-"` -} - -func (c *ClaimSet) encode() (string, error) { - // Reverting time back for machines whose time is not perfectly in sync. - // If client machine's time is in the future according - // to Google servers, an access token will not be issued. - now := time.Now().Add(-10 * time.Second) - if c.Iat == 0 { - c.Iat = now.Unix() - } - if c.Exp == 0 { - c.Exp = now.Add(time.Hour).Unix() - } - if c.Exp < c.Iat { - return "", fmt.Errorf("jws: invalid Exp = %v; must be later than Iat = %v", c.Exp, c.Iat) - } - - b, err := json.Marshal(c) - if err != nil { - return "", err - } - - if len(c.PrivateClaims) == 0 { - return base64.RawURLEncoding.EncodeToString(b), nil - } - - // Marshal private claim set and then append it to b. - prv, err := json.Marshal(c.PrivateClaims) - if err != nil { - return "", fmt.Errorf("jws: invalid map of private claims %v", c.PrivateClaims) - } - - // Concatenate public and private claim JSON objects. - if !bytes.HasSuffix(b, []byte{'}'}) { - return "", fmt.Errorf("jws: invalid JSON %s", b) - } - if !bytes.HasPrefix(prv, []byte{'{'}) { - return "", fmt.Errorf("jws: invalid JSON %s", prv) - } - b[len(b)-1] = ',' // Replace closing curly brace with a comma. - b = append(b, prv[1:]...) // Append private claims. - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// Header represents the header for the signed JWS payloads. -type Header struct { - // The algorithm used for signature. - Algorithm string `json:"alg"` - - // Represents the token type. - Typ string `json:"typ"` - - // The optional hint of which key is being used. - KeyID string `json:"kid,omitempty"` -} - -func (h *Header) encode() (string, error) { - b, err := json.Marshal(h) - if err != nil { - return "", err - } - return base64.RawURLEncoding.EncodeToString(b), nil -} - -// Decode decodes a claim set from a JWS payload. -func Decode(payload string) (*ClaimSet, error) { - // decode returned id token to get expiry - _, claims, _, ok := parseToken(payload) - if !ok { - // TODO(jbd): Provide more context about the error. - return nil, errors.New("jws: invalid token received") - } - decoded, err := base64.RawURLEncoding.DecodeString(claims) - if err != nil { - return nil, err - } - c := &ClaimSet{} - err = json.NewDecoder(bytes.NewBuffer(decoded)).Decode(c) - return c, err -} - -// Signer returns a signature for the given data. -type Signer func(data []byte) (sig []byte, err error) - -// EncodeWithSigner encodes a header and claim set with the provided signer. -func EncodeWithSigner(header *Header, c *ClaimSet, sg Signer) (string, error) { - head, err := header.encode() - if err != nil { - return "", err - } - cs, err := c.encode() - if err != nil { - return "", err - } - ss := fmt.Sprintf("%s.%s", head, cs) - sig, err := sg([]byte(ss)) - if err != nil { - return "", err - } - return fmt.Sprintf("%s.%s", ss, base64.RawURLEncoding.EncodeToString(sig)), nil -} - -// Encode encodes a signed JWS with provided header and claim set. -// This invokes [EncodeWithSigner] using [crypto/rsa.SignPKCS1v15] with the given RSA private key. -func Encode(header *Header, c *ClaimSet, key *rsa.PrivateKey) (string, error) { - sg := func(data []byte) (sig []byte, err error) { - h := sha256.New() - h.Write(data) - return rsa.SignPKCS1v15(rand.Reader, key, crypto.SHA256, h.Sum(nil)) - } - return EncodeWithSigner(header, c, sg) -} - -// Verify tests whether the provided JWT token's signature was produced by the private key -// associated with the supplied public key. -func Verify(token string, key *rsa.PublicKey) error { - header, claims, sig, ok := parseToken(token) - if !ok { - return errors.New("jws: invalid token received, token must have 3 parts") - } - signatureString, err := base64.RawURLEncoding.DecodeString(sig) - if err != nil { - return err - } - - h := sha256.New() - h.Write([]byte(header + tokenDelim + claims)) - return rsa.VerifyPKCS1v15(key, crypto.SHA256, h.Sum(nil), signatureString) -} - -func parseToken(s string) (header, claims, sig string, ok bool) { - header, s, ok = strings.Cut(s, tokenDelim) - if !ok { // no period found - return "", "", "", false - } - claims, s, ok = strings.Cut(s, tokenDelim) - if !ok { // only one period found - return "", "", "", false - } - sig, _, ok = strings.Cut(s, tokenDelim) - if ok { // three periods found - return "", "", "", false - } - return header, claims, sig, true -} - -const tokenDelim = "." diff --git a/vendor/golang.org/x/oauth2/jwt/jwt.go b/vendor/golang.org/x/oauth2/jwt/jwt.go deleted file mode 100644 index 38a92daca8..0000000000 --- a/vendor/golang.org/x/oauth2/jwt/jwt.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright 2014 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 jwt implements the OAuth 2.0 JSON Web Token flow, commonly -// known as "two-legged OAuth 2.0". -// -// See: https://tools.ietf.org/html/draft-ietf-oauth-jwt-bearer-12 -package jwt - -import ( - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/internal" - "golang.org/x/oauth2/jws" -) - -var ( - defaultGrantType = "urn:ietf:params:oauth:grant-type:jwt-bearer" - defaultHeader = &jws.Header{Algorithm: "RS256", Typ: "JWT"} -) - -// Config is the configuration for using JWT to fetch tokens, -// commonly known as "two-legged OAuth 2.0". -type Config struct { - // Email is the OAuth client identifier used when communicating with - // the configured OAuth provider. - Email string - - // PrivateKey contains the contents of an RSA private key or the - // contents of a PEM file that contains a private key. The provided - // private key is used to sign JWT payloads. - // PEM containers with a passphrase are not supported. - // Use the following command to convert a PKCS 12 file into a PEM. - // - // $ openssl pkcs12 -in key.p12 -out key.pem -nodes - // - PrivateKey []byte - - // PrivateKeyID contains an optional hint indicating which key is being - // used. - PrivateKeyID string - - // Subject is the optional user to impersonate. - Subject string - - // Scopes optionally specifies a list of requested permission scopes. - Scopes []string - - // TokenURL is the endpoint required to complete the 2-legged JWT flow. - TokenURL string - - // Expires optionally specifies how long the token is valid for. - Expires time.Duration - - // Audience optionally specifies the intended audience of the - // request. If empty, the value of TokenURL is used as the - // intended audience. - Audience string - - // PrivateClaims optionally specifies custom private claims in the JWT. - // See http://tools.ietf.org/html/draft-jones-json-web-token-10#section-4.3 - PrivateClaims map[string]any - - // UseIDToken optionally specifies whether ID token should be used instead - // of access token when the server returns both. - UseIDToken bool -} - -// TokenSource returns a JWT TokenSource using the configuration -// in c and the HTTP client from the provided context. -func (c *Config) TokenSource(ctx context.Context) oauth2.TokenSource { - return oauth2.ReuseTokenSource(nil, jwtSource{ctx, c}) -} - -// Client returns an HTTP client wrapping the context's -// HTTP transport and adding Authorization headers with tokens -// obtained from c. -// -// The returned client and its Transport should not be modified. -func (c *Config) Client(ctx context.Context) *http.Client { - return oauth2.NewClient(ctx, c.TokenSource(ctx)) -} - -// jwtSource is a source that always does a signed JWT request for a token. -// It should typically be wrapped with a reuseTokenSource. -type jwtSource struct { - ctx context.Context - conf *Config -} - -func (js jwtSource) Token() (*oauth2.Token, error) { - pk, err := internal.ParseKey(js.conf.PrivateKey) - if err != nil { - return nil, err - } - hc := oauth2.NewClient(js.ctx, nil) - claimSet := &jws.ClaimSet{ - Iss: js.conf.Email, - Scope: strings.Join(js.conf.Scopes, " "), - Aud: js.conf.TokenURL, - PrivateClaims: js.conf.PrivateClaims, - } - if subject := js.conf.Subject; subject != "" { - claimSet.Sub = subject - // prn is the old name of sub. Keep setting it - // to be compatible with legacy OAuth 2.0 providers. - claimSet.Prn = subject - } - if t := js.conf.Expires; t > 0 { - claimSet.Exp = time.Now().Add(t).Unix() - } - if aud := js.conf.Audience; aud != "" { - claimSet.Aud = aud - } - h := *defaultHeader - h.KeyID = js.conf.PrivateKeyID - payload, err := jws.Encode(&h, claimSet, pk) - if err != nil { - return nil, err - } - v := url.Values{} - v.Set("grant_type", defaultGrantType) - v.Set("assertion", payload) - resp, err := hc.PostForm(js.conf.TokenURL, v) - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - defer resp.Body.Close() - body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, &oauth2.RetrieveError{ - Response: resp, - Body: body, - } - } - // tokenRes is the JSON response body. - var tokenRes struct { - oauth2.Token - IDToken string `json:"id_token"` - } - if err := json.Unmarshal(body, &tokenRes); err != nil { - return nil, fmt.Errorf("oauth2: cannot fetch token: %v", err) - } - token := &oauth2.Token{ - AccessToken: tokenRes.AccessToken, - TokenType: tokenRes.TokenType, - } - raw := make(map[string]any) - json.Unmarshal(body, &raw) // no error checks for optional fields - token = token.WithExtra(raw) - - if secs := tokenRes.ExpiresIn; secs > 0 { - token.Expiry = time.Now().Add(time.Duration(secs) * time.Second) - } - if v := tokenRes.IDToken; v != "" { - // decode returned id token to get expiry - claimSet, err := jws.Decode(v) - if err != nil { - return nil, fmt.Errorf("oauth2: error decoding JWT token: %v", err) - } - token.Expiry = time.Unix(claimSet.Exp, 0) - } - if js.conf.UseIDToken { - if tokenRes.IDToken == "" { - return nil, fmt.Errorf("oauth2: response doesn't have JWT token") - } - token.AccessToken = tokenRes.IDToken - } - return token, nil -} diff --git a/vendor/golang.org/x/sys/windows/registry/key.go b/vendor/golang.org/x/sys/windows/registry/key.go deleted file mode 100644 index 7cc6ff3afa..0000000000 --- a/vendor/golang.org/x/sys/windows/registry/key.go +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright 2015 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. - -//go:build windows - -// Package registry provides access to the Windows registry. -// -// Here is a simple example, opening a registry key and reading a string value from it. -// -// k, err := registry.OpenKey(registry.LOCAL_MACHINE, `SOFTWARE\Microsoft\Windows NT\CurrentVersion`, registry.QUERY_VALUE) -// if err != nil { -// log.Fatal(err) -// } -// defer k.Close() -// -// s, _, err := k.GetStringValue("SystemRoot") -// if err != nil { -// log.Fatal(err) -// } -// fmt.Printf("Windows system root is %q\n", s) -package registry - -import ( - "io" - "runtime" - "syscall" - "time" -) - -const ( - // Registry key security and access rights. - // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms724878.aspx - // for details. - ALL_ACCESS = 0xf003f - CREATE_LINK = 0x00020 - CREATE_SUB_KEY = 0x00004 - ENUMERATE_SUB_KEYS = 0x00008 - EXECUTE = 0x20019 - NOTIFY = 0x00010 - QUERY_VALUE = 0x00001 - READ = 0x20019 - SET_VALUE = 0x00002 - WOW64_32KEY = 0x00200 - WOW64_64KEY = 0x00100 - WRITE = 0x20006 -) - -// Key is a handle to an open Windows registry key. -// Keys can be obtained by calling OpenKey; there are -// also some predefined root keys such as CURRENT_USER. -// Keys can be used directly in the Windows API. -type Key syscall.Handle - -const ( - // Windows defines some predefined root keys that are always open. - // An application can use these keys as entry points to the registry. - // Normally these keys are used in OpenKey to open new keys, - // but they can also be used anywhere a Key is required. - CLASSES_ROOT = Key(syscall.HKEY_CLASSES_ROOT) - CURRENT_USER = Key(syscall.HKEY_CURRENT_USER) - LOCAL_MACHINE = Key(syscall.HKEY_LOCAL_MACHINE) - USERS = Key(syscall.HKEY_USERS) - CURRENT_CONFIG = Key(syscall.HKEY_CURRENT_CONFIG) - PERFORMANCE_DATA = Key(syscall.HKEY_PERFORMANCE_DATA) -) - -// Close closes open key k. -func (k Key) Close() error { - return syscall.RegCloseKey(syscall.Handle(k)) -} - -// OpenKey opens a new key with path name relative to key k. -// It accepts any open key, including CURRENT_USER and others, -// and returns the new key and an error. -// The access parameter specifies desired access rights to the -// key to be opened. -func OpenKey(k Key, path string, access uint32) (Key, error) { - p, err := syscall.UTF16PtrFromString(path) - if err != nil { - return 0, err - } - var subkey syscall.Handle - err = syscall.RegOpenKeyEx(syscall.Handle(k), p, 0, access, &subkey) - if err != nil { - return 0, err - } - return Key(subkey), nil -} - -// OpenRemoteKey opens a predefined registry key on another -// computer pcname. The key to be opened is specified by k, but -// can only be one of LOCAL_MACHINE, PERFORMANCE_DATA or USERS. -// If pcname is "", OpenRemoteKey returns local computer key. -func OpenRemoteKey(pcname string, k Key) (Key, error) { - var err error - var p *uint16 - if pcname != "" { - p, err = syscall.UTF16PtrFromString(`\\` + pcname) - if err != nil { - return 0, err - } - } - var remoteKey syscall.Handle - err = regConnectRegistry(p, syscall.Handle(k), &remoteKey) - if err != nil { - return 0, err - } - return Key(remoteKey), nil -} - -// ReadSubKeyNames returns the names of subkeys of key k. -// The parameter n controls the number of returned names, -// analogous to the way os.File.Readdirnames works. -func (k Key) ReadSubKeyNames(n int) ([]string, error) { - // RegEnumKeyEx must be called repeatedly and to completion. - // During this time, this goroutine cannot migrate away from - // its current thread. See https://golang.org/issue/49320 and - // https://golang.org/issue/49466. - runtime.LockOSThread() - defer runtime.UnlockOSThread() - - names := make([]string, 0) - // Registry key size limit is 255 bytes and described there: - // https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx - buf := make([]uint16, 256) //plus extra room for terminating zero byte -loopItems: - for i := uint32(0); ; i++ { - if n > 0 { - if len(names) == n { - return names, nil - } - } - l := uint32(len(buf)) - for { - err := syscall.RegEnumKeyEx(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) - if err == nil { - break - } - if err == syscall.ERROR_MORE_DATA { - // Double buffer size and try again. - l = uint32(2 * len(buf)) - buf = make([]uint16, l) - continue - } - if err == _ERROR_NO_MORE_ITEMS { - break loopItems - } - return names, err - } - names = append(names, syscall.UTF16ToString(buf[:l])) - } - if n > len(names) { - return names, io.EOF - } - return names, nil -} - -// CreateKey creates a key named path under open key k. -// CreateKey returns the new key and a boolean flag that reports -// whether the key already existed. -// The access parameter specifies the access rights for the key -// to be created. -func CreateKey(k Key, path string, access uint32) (newk Key, openedExisting bool, err error) { - var h syscall.Handle - var d uint32 - var pathPointer *uint16 - pathPointer, err = syscall.UTF16PtrFromString(path) - if err != nil { - return 0, false, err - } - err = regCreateKeyEx(syscall.Handle(k), pathPointer, - 0, nil, _REG_OPTION_NON_VOLATILE, access, nil, &h, &d) - if err != nil { - return 0, false, err - } - return Key(h), d == _REG_OPENED_EXISTING_KEY, nil -} - -// DeleteKey deletes the subkey path of key k and its values. -func DeleteKey(k Key, path string) error { - pathPointer, err := syscall.UTF16PtrFromString(path) - if err != nil { - return err - } - return regDeleteKey(syscall.Handle(k), pathPointer) -} - -// A KeyInfo describes the statistics of a key. It is returned by Stat. -type KeyInfo struct { - SubKeyCount uint32 - MaxSubKeyLen uint32 // size of the key's subkey with the longest name, in Unicode characters, not including the terminating zero byte - ValueCount uint32 - MaxValueNameLen uint32 // size of the key's longest value name, in Unicode characters, not including the terminating zero byte - MaxValueLen uint32 // longest data component among the key's values, in bytes - lastWriteTime syscall.Filetime -} - -// ModTime returns the key's last write time. -func (ki *KeyInfo) ModTime() time.Time { - lastHigh, lastLow := ki.lastWriteTime.HighDateTime, ki.lastWriteTime.LowDateTime - // 100-nanosecond intervals since January 1, 1601 - hsec := uint64(lastHigh)<<32 + uint64(lastLow) - // Convert _before_ gauging; the nanosecond difference between Epoch (00:00:00 - // UTC, January 1, 1970) and Filetime's zero offset (January 1, 1601) is out - // of bounds for int64: -11644473600*1e7*1e2 < math.MinInt64 - sec := int64(hsec/1e7) - 11644473600 - nsec := int64(hsec%1e7) * 100 - return time.Unix(sec, nsec) -} - -// modTimeZero reports whether the key's last write time is zero. -func (ki *KeyInfo) modTimeZero() bool { - return ki.lastWriteTime.LowDateTime == 0 && ki.lastWriteTime.HighDateTime == 0 -} - -// Stat retrieves information about the open key k. -func (k Key) Stat() (*KeyInfo, error) { - var ki KeyInfo - err := syscall.RegQueryInfoKey(syscall.Handle(k), nil, nil, nil, - &ki.SubKeyCount, &ki.MaxSubKeyLen, nil, &ki.ValueCount, - &ki.MaxValueNameLen, &ki.MaxValueLen, nil, &ki.lastWriteTime) - if err != nil { - return nil, err - } - return &ki, nil -} diff --git a/vendor/golang.org/x/sys/windows/registry/mksyscall.go b/vendor/golang.org/x/sys/windows/registry/mksyscall.go deleted file mode 100644 index bbf86ccf0c..0000000000 --- a/vendor/golang.org/x/sys/windows/registry/mksyscall.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2015 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. - -//go:build generate - -package registry - -//go:generate go run golang.org/x/sys/windows/mkwinsyscall -output zsyscall_windows.go syscall.go diff --git a/vendor/golang.org/x/sys/windows/registry/syscall.go b/vendor/golang.org/x/sys/windows/registry/syscall.go deleted file mode 100644 index f533091c19..0000000000 --- a/vendor/golang.org/x/sys/windows/registry/syscall.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2015 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. - -//go:build windows - -package registry - -import "syscall" - -const ( - _REG_OPTION_NON_VOLATILE = 0 - - _REG_CREATED_NEW_KEY = 1 - _REG_OPENED_EXISTING_KEY = 2 - - _ERROR_NO_MORE_ITEMS syscall.Errno = 259 -) - -func LoadRegLoadMUIString() error { - return procRegLoadMUIStringW.Find() -} - -//sys regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) = advapi32.RegCreateKeyExW -//sys regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) = advapi32.RegDeleteKeyW -//sys regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) = advapi32.RegSetValueExW -//sys regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegEnumValueW -//sys regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) = advapi32.RegDeleteValueW -//sys regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) = advapi32.RegLoadMUIStringW -//sys regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) = advapi32.RegConnectRegistryW - -//sys expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) = kernel32.ExpandEnvironmentStringsW diff --git a/vendor/golang.org/x/sys/windows/registry/value.go b/vendor/golang.org/x/sys/windows/registry/value.go deleted file mode 100644 index a1bcbb2362..0000000000 --- a/vendor/golang.org/x/sys/windows/registry/value.go +++ /dev/null @@ -1,390 +0,0 @@ -// Copyright 2015 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. - -//go:build windows - -package registry - -import ( - "errors" - "io" - "syscall" - "unicode/utf16" - "unsafe" -) - -const ( - // Registry value types. - NONE = 0 - SZ = 1 - EXPAND_SZ = 2 - BINARY = 3 - DWORD = 4 - DWORD_BIG_ENDIAN = 5 - LINK = 6 - MULTI_SZ = 7 - RESOURCE_LIST = 8 - FULL_RESOURCE_DESCRIPTOR = 9 - RESOURCE_REQUIREMENTS_LIST = 10 - QWORD = 11 -) - -var ( - // ErrShortBuffer is returned when the buffer was too short for the operation. - ErrShortBuffer = syscall.ERROR_MORE_DATA - - // ErrNotExist is returned when a registry key or value does not exist. - ErrNotExist = syscall.ERROR_FILE_NOT_FOUND - - // ErrUnexpectedType is returned by Get*Value when the value's type was unexpected. - ErrUnexpectedType = errors.New("unexpected key value type") -) - -// GetValue retrieves the type and data for the specified value associated -// with an open key k. It fills up buffer buf and returns the retrieved -// byte count n. If buf is too small to fit the stored value it returns -// ErrShortBuffer error along with the required buffer size n. -// If no buffer is provided, it returns true and actual buffer size n. -// If no buffer is provided, GetValue returns the value's type only. -// If the value does not exist, the error returned is ErrNotExist. -// -// GetValue is a low level function. If value's type is known, use the appropriate -// Get*Value function instead. -func (k Key) GetValue(name string, buf []byte) (n int, valtype uint32, err error) { - pname, err := syscall.UTF16PtrFromString(name) - if err != nil { - return 0, 0, err - } - var pbuf *byte - if len(buf) > 0 { - pbuf = (*byte)(unsafe.Pointer(&buf[0])) - } - l := uint32(len(buf)) - err = syscall.RegQueryValueEx(syscall.Handle(k), pname, nil, &valtype, pbuf, &l) - if err != nil { - return int(l), valtype, err - } - return int(l), valtype, nil -} - -func (k Key) getValue(name string, buf []byte) (data []byte, valtype uint32, err error) { - p, err := syscall.UTF16PtrFromString(name) - if err != nil { - return nil, 0, err - } - var t uint32 - n := uint32(len(buf)) - for { - err = syscall.RegQueryValueEx(syscall.Handle(k), p, nil, &t, (*byte)(unsafe.Pointer(&buf[0])), &n) - if err == nil { - return buf[:n], t, nil - } - if err != syscall.ERROR_MORE_DATA { - return nil, 0, err - } - if n <= uint32(len(buf)) { - return nil, 0, err - } - buf = make([]byte, n) - } -} - -// GetStringValue retrieves the string value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetStringValue returns ErrNotExist. -// If value is not SZ or EXPAND_SZ, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetStringValue(name string) (val string, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return "", typ, err2 - } - switch typ { - case SZ, EXPAND_SZ: - default: - return "", typ, ErrUnexpectedType - } - if len(data) == 0 { - return "", typ, nil - } - u := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[: len(data)/2 : len(data)/2] - return syscall.UTF16ToString(u), typ, nil -} - -// GetMUIStringValue retrieves the localized string value for -// the specified value name associated with an open key k. -// If the value name doesn't exist or the localized string value -// can't be resolved, GetMUIStringValue returns ErrNotExist. -// GetMUIStringValue panics if the system doesn't support -// regLoadMUIString; use LoadRegLoadMUIString to check if -// regLoadMUIString is supported before calling this function. -func (k Key) GetMUIStringValue(name string) (string, error) { - pname, err := syscall.UTF16PtrFromString(name) - if err != nil { - return "", err - } - - buf := make([]uint16, 1024) - var buflen uint32 - var pdir *uint16 - - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - if err == syscall.ERROR_FILE_NOT_FOUND { // Try fallback path - - // Try to resolve the string value using the system directory as - // a DLL search path; this assumes the string value is of the form - // @[path]\dllname,-strID but with no path given, e.g. @tzres.dll,-320. - - // This approach works with tzres.dll but may have to be revised - // in the future to allow callers to provide custom search paths. - - var s string - s, err = ExpandString("%SystemRoot%\\system32\\") - if err != nil { - return "", err - } - pdir, err = syscall.UTF16PtrFromString(s) - if err != nil { - return "", err - } - - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - } - - for err == syscall.ERROR_MORE_DATA { // Grow buffer if needed - if buflen <= uint32(len(buf)) { - break // Buffer not growing, assume race; break - } - buf = make([]uint16, buflen) - err = regLoadMUIString(syscall.Handle(k), pname, &buf[0], uint32(len(buf)), &buflen, 0, pdir) - } - - if err != nil { - return "", err - } - - return syscall.UTF16ToString(buf), nil -} - -// ExpandString expands environment-variable strings and replaces -// them with the values defined for the current user. -// Use ExpandString to expand EXPAND_SZ strings. -func ExpandString(value string) (string, error) { - if value == "" { - return "", nil - } - p, err := syscall.UTF16PtrFromString(value) - if err != nil { - return "", err - } - r := make([]uint16, 100) - for { - n, err := expandEnvironmentStrings(p, &r[0], uint32(len(r))) - if err != nil { - return "", err - } - if n <= uint32(len(r)) { - return syscall.UTF16ToString(r[:n]), nil - } - r = make([]uint16, n) - } -} - -// GetStringsValue retrieves the []string value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetStringsValue returns ErrNotExist. -// If value is not MULTI_SZ, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetStringsValue(name string) (val []string, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return nil, typ, err2 - } - if typ != MULTI_SZ { - return nil, typ, ErrUnexpectedType - } - if len(data) == 0 { - return nil, typ, nil - } - p := (*[1 << 29]uint16)(unsafe.Pointer(&data[0]))[: len(data)/2 : len(data)/2] - if len(p) == 0 { - return nil, typ, nil - } - if p[len(p)-1] == 0 { - p = p[:len(p)-1] // remove terminating null - } - val = make([]string, 0, 5) - from := 0 - for i, c := range p { - if c == 0 { - val = append(val, string(utf16.Decode(p[from:i]))) - from = i + 1 - } - } - return val, typ, nil -} - -// GetIntegerValue retrieves the integer value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetIntegerValue returns ErrNotExist. -// If value is not DWORD or QWORD, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetIntegerValue(name string) (val uint64, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 8)) - if err2 != nil { - return 0, typ, err2 - } - switch typ { - case DWORD: - if len(data) != 4 { - return 0, typ, errors.New("DWORD value is not 4 bytes long") - } - var val32 uint32 - copy((*[4]byte)(unsafe.Pointer(&val32))[:], data) - return uint64(val32), DWORD, nil - case QWORD: - if len(data) != 8 { - return 0, typ, errors.New("QWORD value is not 8 bytes long") - } - copy((*[8]byte)(unsafe.Pointer(&val))[:], data) - return val, QWORD, nil - default: - return 0, typ, ErrUnexpectedType - } -} - -// GetBinaryValue retrieves the binary value for the specified -// value name associated with an open key k. It also returns the value's type. -// If value does not exist, GetBinaryValue returns ErrNotExist. -// If value is not BINARY, it will return the correct value -// type and ErrUnexpectedType. -func (k Key) GetBinaryValue(name string) (val []byte, valtype uint32, err error) { - data, typ, err2 := k.getValue(name, make([]byte, 64)) - if err2 != nil { - return nil, typ, err2 - } - if typ != BINARY { - return nil, typ, ErrUnexpectedType - } - return data, typ, nil -} - -func (k Key) setValue(name string, valtype uint32, data []byte) error { - p, err := syscall.UTF16PtrFromString(name) - if err != nil { - return err - } - if len(data) == 0 { - return regSetValueEx(syscall.Handle(k), p, 0, valtype, nil, 0) - } - return regSetValueEx(syscall.Handle(k), p, 0, valtype, &data[0], uint32(len(data))) -} - -// SetDWordValue sets the data and type of a name value -// under key k to value and DWORD. -func (k Key) SetDWordValue(name string, value uint32) error { - return k.setValue(name, DWORD, (*[4]byte)(unsafe.Pointer(&value))[:]) -} - -// SetQWordValue sets the data and type of a name value -// under key k to value and QWORD. -func (k Key) SetQWordValue(name string, value uint64) error { - return k.setValue(name, QWORD, (*[8]byte)(unsafe.Pointer(&value))[:]) -} - -func (k Key) setStringValue(name string, valtype uint32, value string) error { - v, err := syscall.UTF16FromString(value) - if err != nil { - return err - } - buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[: len(v)*2 : len(v)*2] - return k.setValue(name, valtype, buf) -} - -// SetStringValue sets the data and type of a name value -// under key k to value and SZ. The value must not contain a zero byte. -func (k Key) SetStringValue(name, value string) error { - return k.setStringValue(name, SZ, value) -} - -// SetExpandStringValue sets the data and type of a name value -// under key k to value and EXPAND_SZ. The value must not contain a zero byte. -func (k Key) SetExpandStringValue(name, value string) error { - return k.setStringValue(name, EXPAND_SZ, value) -} - -// SetStringsValue sets the data and type of a name value -// under key k to value and MULTI_SZ. The value strings -// must not contain a zero byte. -func (k Key) SetStringsValue(name string, value []string) error { - ss := "" - for _, s := range value { - for i := 0; i < len(s); i++ { - if s[i] == 0 { - return errors.New("string cannot have 0 inside") - } - } - ss += s + "\x00" - } - v := utf16.Encode([]rune(ss + "\x00")) - buf := (*[1 << 29]byte)(unsafe.Pointer(&v[0]))[: len(v)*2 : len(v)*2] - return k.setValue(name, MULTI_SZ, buf) -} - -// SetBinaryValue sets the data and type of a name value -// under key k to value and BINARY. -func (k Key) SetBinaryValue(name string, value []byte) error { - return k.setValue(name, BINARY, value) -} - -// DeleteValue removes a named value from the key k. -func (k Key) DeleteValue(name string) error { - namePointer, err := syscall.UTF16PtrFromString(name) - if err != nil { - return err - } - return regDeleteValue(syscall.Handle(k), namePointer) -} - -// ReadValueNames returns the value names of key k. -// The parameter n controls the number of returned names, -// analogous to the way os.File.Readdirnames works. -func (k Key) ReadValueNames(n int) ([]string, error) { - ki, err := k.Stat() - if err != nil { - return nil, err - } - names := make([]string, 0, ki.ValueCount) - buf := make([]uint16, ki.MaxValueNameLen+1) // extra room for terminating null character -loopItems: - for i := uint32(0); ; i++ { - if n > 0 { - if len(names) == n { - return names, nil - } - } - l := uint32(len(buf)) - for { - err := regEnumValue(syscall.Handle(k), i, &buf[0], &l, nil, nil, nil, nil) - if err == nil { - break - } - if err == syscall.ERROR_MORE_DATA { - // Double buffer size and try again. - l = uint32(2 * len(buf)) - buf = make([]uint16, l) - continue - } - if err == _ERROR_NO_MORE_ITEMS { - break loopItems - } - return names, err - } - names = append(names, syscall.UTF16ToString(buf[:l])) - } - if n > len(names) { - return names, io.EOF - } - return names, nil -} diff --git a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go deleted file mode 100644 index bc1ce4360b..0000000000 --- a/vendor/golang.org/x/sys/windows/registry/zsyscall_windows.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by 'go generate'; DO NOT EDIT. - -package registry - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" -) - -var _ unsafe.Pointer - -// Do the interface allocations only once for common -// Errno values. -const ( - errnoERROR_IO_PENDING = 997 -) - -var ( - errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING) - errERROR_EINVAL error = syscall.EINVAL -) - -// errnoErr returns common boxed Errno values, to prevent -// allocations at runtime. -func errnoErr(e syscall.Errno) error { - switch e { - case 0: - return errERROR_EINVAL - case errnoERROR_IO_PENDING: - return errERROR_IO_PENDING - } - // TODO: add more here, after collecting data on the common - // error values see on Windows. (perhaps when running - // all.bat?) - return e -} - -var ( - modadvapi32 = windows.NewLazySystemDLL("advapi32.dll") - modkernel32 = windows.NewLazySystemDLL("kernel32.dll") - - procRegConnectRegistryW = modadvapi32.NewProc("RegConnectRegistryW") - procRegCreateKeyExW = modadvapi32.NewProc("RegCreateKeyExW") - procRegDeleteKeyW = modadvapi32.NewProc("RegDeleteKeyW") - procRegDeleteValueW = modadvapi32.NewProc("RegDeleteValueW") - procRegEnumValueW = modadvapi32.NewProc("RegEnumValueW") - procRegLoadMUIStringW = modadvapi32.NewProc("RegLoadMUIStringW") - procRegSetValueExW = modadvapi32.NewProc("RegSetValueExW") - procExpandEnvironmentStringsW = modkernel32.NewProc("ExpandEnvironmentStringsW") -) - -func regConnectRegistry(machinename *uint16, key syscall.Handle, result *syscall.Handle) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegConnectRegistryW.Addr(), uintptr(unsafe.Pointer(machinename)), uintptr(key), uintptr(unsafe.Pointer(result))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regCreateKeyEx(key syscall.Handle, subkey *uint16, reserved uint32, class *uint16, options uint32, desired uint32, sa *syscall.SecurityAttributes, result *syscall.Handle, disposition *uint32) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegCreateKeyExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(reserved), uintptr(unsafe.Pointer(class)), uintptr(options), uintptr(desired), uintptr(unsafe.Pointer(sa)), uintptr(unsafe.Pointer(result)), uintptr(unsafe.Pointer(disposition))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regDeleteKey(key syscall.Handle, subkey *uint16) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegDeleteKeyW.Addr(), uintptr(key), uintptr(unsafe.Pointer(subkey))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regDeleteValue(key syscall.Handle, name *uint16) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegDeleteValueW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regEnumValue(key syscall.Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegEnumValueW.Addr(), uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regLoadMUIString(key syscall.Handle, name *uint16, buf *uint16, buflen uint32, buflenCopied *uint32, flags uint32, dir *uint16) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegLoadMUIStringW.Addr(), uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(unsafe.Pointer(buflenCopied)), uintptr(flags), uintptr(unsafe.Pointer(dir))) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func regSetValueEx(key syscall.Handle, valueName *uint16, reserved uint32, vtype uint32, buf *byte, bufsize uint32) (regerrno error) { - r0, _, _ := syscall.SyscallN(procRegSetValueExW.Addr(), uintptr(key), uintptr(unsafe.Pointer(valueName)), uintptr(reserved), uintptr(vtype), uintptr(unsafe.Pointer(buf)), uintptr(bufsize)) - if r0 != 0 { - regerrno = syscall.Errno(r0) - } - return -} - -func expandEnvironmentStrings(src *uint16, dst *uint16, size uint32) (n uint32, err error) { - r0, _, e1 := syscall.SyscallN(procExpandEnvironmentStringsW.Addr(), uintptr(unsafe.Pointer(src)), uintptr(unsafe.Pointer(dst)), uintptr(size)) - n = uint32(r0) - if n == 0 { - err = errnoErr(e1) - } - return -} diff --git a/vendor/golang.org/x/xerrors/LICENSE b/vendor/golang.org/x/xerrors/LICENSE deleted file mode 100644 index e4a47e17f1..0000000000 --- a/vendor/golang.org/x/xerrors/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2019 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/xerrors/PATENTS b/vendor/golang.org/x/xerrors/PATENTS deleted file mode 100644 index 733099041f..0000000000 --- a/vendor/golang.org/x/xerrors/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/xerrors/README b/vendor/golang.org/x/xerrors/README deleted file mode 100644 index aac7867a56..0000000000 --- a/vendor/golang.org/x/xerrors/README +++ /dev/null @@ -1,2 +0,0 @@ -This repository holds the transition packages for the new Go 1.13 error values. -See golang.org/design/29934-error-values. diff --git a/vendor/golang.org/x/xerrors/adaptor.go b/vendor/golang.org/x/xerrors/adaptor.go deleted file mode 100644 index 4317f24833..0000000000 --- a/vendor/golang.org/x/xerrors/adaptor.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright 2018 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 xerrors - -import ( - "bytes" - "fmt" - "io" - "reflect" - "strconv" -) - -// FormatError calls the FormatError method of f with an errors.Printer -// configured according to s and verb, and writes the result to s. -func FormatError(f Formatter, s fmt.State, verb rune) { - // Assuming this function is only called from the Format method, and given - // that FormatError takes precedence over Format, it cannot be called from - // any package that supports errors.Formatter. It is therefore safe to - // disregard that State may be a specific printer implementation and use one - // of our choice instead. - - // limitations: does not support printing error as Go struct. - - var ( - sep = " " // separator before next error - p = &state{State: s} - direct = true - ) - - var err error = f - - switch verb { - // Note that this switch must match the preference order - // for ordinary string printing (%#v before %+v, and so on). - - case 'v': - if s.Flag('#') { - if stringer, ok := err.(fmt.GoStringer); ok { - io.WriteString(&p.buf, stringer.GoString()) - goto exit - } - // proceed as if it were %v - } else if s.Flag('+') { - p.printDetail = true - sep = "\n - " - } - case 's': - case 'q', 'x', 'X': - // Use an intermediate buffer in the rare cases that precision, - // truncation, or one of the alternative verbs (q, x, and X) are - // specified. - direct = false - - default: - p.buf.WriteString("%!") - p.buf.WriteRune(verb) - p.buf.WriteByte('(') - switch { - case err != nil: - p.buf.WriteString(reflect.TypeOf(f).String()) - default: - p.buf.WriteString("") - } - p.buf.WriteByte(')') - io.Copy(s, &p.buf) - return - } - -loop: - for { - switch v := err.(type) { - case Formatter: - err = v.FormatError((*printer)(p)) - case fmt.Formatter: - v.Format(p, 'v') - break loop - default: - io.WriteString(&p.buf, v.Error()) - break loop - } - if err == nil { - break - } - if p.needColon || !p.printDetail { - p.buf.WriteByte(':') - p.needColon = false - } - p.buf.WriteString(sep) - p.inDetail = false - p.needNewline = false - } - -exit: - width, okW := s.Width() - prec, okP := s.Precision() - - if !direct || (okW && width > 0) || okP { - // Construct format string from State s. - format := []byte{'%'} - if s.Flag('-') { - format = append(format, '-') - } - if s.Flag('+') { - format = append(format, '+') - } - if s.Flag(' ') { - format = append(format, ' ') - } - if okW { - format = strconv.AppendInt(format, int64(width), 10) - } - if okP { - format = append(format, '.') - format = strconv.AppendInt(format, int64(prec), 10) - } - format = append(format, string(verb)...) - fmt.Fprintf(s, string(format), p.buf.String()) - } else { - io.Copy(s, &p.buf) - } -} - -var detailSep = []byte("\n ") - -// state tracks error printing state. It implements fmt.State. -type state struct { - fmt.State - buf bytes.Buffer - - printDetail bool - inDetail bool - needColon bool - needNewline bool -} - -func (s *state) Write(b []byte) (n int, err error) { - if s.printDetail { - if len(b) == 0 { - return 0, nil - } - if s.inDetail && s.needColon { - s.needNewline = true - if b[0] == '\n' { - b = b[1:] - } - } - k := 0 - for i, c := range b { - if s.needNewline { - if s.inDetail && s.needColon { - s.buf.WriteByte(':') - s.needColon = false - } - s.buf.Write(detailSep) - s.needNewline = false - } - if c == '\n' { - s.buf.Write(b[k:i]) - k = i + 1 - s.needNewline = true - } - } - s.buf.Write(b[k:]) - if !s.inDetail { - s.needColon = true - } - } else if !s.inDetail { - s.buf.Write(b) - } - return len(b), nil -} - -// printer wraps a state to implement an xerrors.Printer. -type printer state - -func (s *printer) Print(args ...interface{}) { - if !s.inDetail || s.printDetail { - fmt.Fprint((*state)(s), args...) - } -} - -func (s *printer) Printf(format string, args ...interface{}) { - if !s.inDetail || s.printDetail { - fmt.Fprintf((*state)(s), format, args...) - } -} - -func (s *printer) Detail() bool { - s.inDetail = true - return s.printDetail -} diff --git a/vendor/golang.org/x/xerrors/codereview.cfg b/vendor/golang.org/x/xerrors/codereview.cfg deleted file mode 100644 index 3f8b14b64e..0000000000 --- a/vendor/golang.org/x/xerrors/codereview.cfg +++ /dev/null @@ -1 +0,0 @@ -issuerepo: golang/go diff --git a/vendor/golang.org/x/xerrors/doc.go b/vendor/golang.org/x/xerrors/doc.go deleted file mode 100644 index 2ef99f5a87..0000000000 --- a/vendor/golang.org/x/xerrors/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2019 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 xerrors implements functions to manipulate errors. -// -// This package is based on the Go 2 proposal for error values: -// -// https://golang.org/design/29934-error-values -// -// These functions were incorporated into the standard library's errors package -// in Go 1.13: -// - Is -// - As -// - Unwrap -// -// Also, Errorf's %w verb was incorporated into fmt.Errorf. -// -// Use this package to get equivalent behavior in all supported Go versions. -// -// No other features of this package were included in Go 1.13, and at present -// there are no plans to include any of them. -package xerrors // import "golang.org/x/xerrors" diff --git a/vendor/golang.org/x/xerrors/errors.go b/vendor/golang.org/x/xerrors/errors.go deleted file mode 100644 index e88d3772d8..0000000000 --- a/vendor/golang.org/x/xerrors/errors.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2011 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 xerrors - -import "fmt" - -// errorString is a trivial implementation of error. -type errorString struct { - s string - frame Frame -} - -// New returns an error that formats as the given text. -// -// The returned error contains a Frame set to the caller's location and -// implements Formatter to show this information when printed with details. -func New(text string) error { - return &errorString{text, Caller(1)} -} - -func (e *errorString) Error() string { - return e.s -} - -func (e *errorString) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *errorString) FormatError(p Printer) (next error) { - p.Print(e.s) - e.frame.Format(p) - return nil -} diff --git a/vendor/golang.org/x/xerrors/fmt.go b/vendor/golang.org/x/xerrors/fmt.go deleted file mode 100644 index 27a5d70bd6..0000000000 --- a/vendor/golang.org/x/xerrors/fmt.go +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright 2018 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 xerrors - -import ( - "fmt" - "strings" - "unicode" - "unicode/utf8" - - "golang.org/x/xerrors/internal" -) - -const percentBangString = "%!" - -// Errorf formats according to a format specifier and returns the string as a -// value that satisfies error. -// -// The returned error includes the file and line number of the caller when -// formatted with additional detail enabled. If the last argument is an error -// the returned error's Format method will return it if the format string ends -// with ": %s", ": %v", or ": %w". If the last argument is an error and the -// format string ends with ": %w", the returned error implements an Unwrap -// method returning it. -// -// If the format specifier includes a %w verb with an error operand in a -// position other than at the end, the returned error will still implement an -// Unwrap method returning the operand, but the error's Format method will not -// return the wrapped error. -// -// It is invalid to include more than one %w verb or to supply it with an -// operand that does not implement the error interface. The %w verb is otherwise -// a synonym for %v. -// -// Note that as of Go 1.13, the fmt.Errorf function will do error formatting, -// but it will not capture a stack backtrace. -func Errorf(format string, a ...interface{}) error { - format = formatPlusW(format) - // Support a ": %[wsv]" suffix, which works well with xerrors.Formatter. - wrap := strings.HasSuffix(format, ": %w") - idx, format2, ok := parsePercentW(format) - percentWElsewhere := !wrap && idx >= 0 - if !percentWElsewhere && (wrap || strings.HasSuffix(format, ": %s") || strings.HasSuffix(format, ": %v")) { - err := errorAt(a, len(a)-1) - if err == nil { - return &noWrapError{fmt.Sprintf(format, a...), nil, Caller(1)} - } - // TODO: this is not entirely correct. The error value could be - // printed elsewhere in format if it mixes numbered with unnumbered - // substitutions. With relatively small changes to doPrintf we can - // have it optionally ignore extra arguments and pass the argument - // list in its entirety. - msg := fmt.Sprintf(format[:len(format)-len(": %s")], a[:len(a)-1]...) - frame := Frame{} - if internal.EnableTrace { - frame = Caller(1) - } - if wrap { - return &wrapError{msg, err, frame} - } - return &noWrapError{msg, err, frame} - } - // Support %w anywhere. - // TODO: don't repeat the wrapped error's message when %w occurs in the middle. - msg := fmt.Sprintf(format2, a...) - if idx < 0 { - return &noWrapError{msg, nil, Caller(1)} - } - err := errorAt(a, idx) - if !ok || err == nil { - // Too many %ws or argument of %w is not an error. Approximate the Go - // 1.13 fmt.Errorf message. - return &noWrapError{fmt.Sprintf("%sw(%s)", percentBangString, msg), nil, Caller(1)} - } - frame := Frame{} - if internal.EnableTrace { - frame = Caller(1) - } - return &wrapError{msg, err, frame} -} - -func errorAt(args []interface{}, i int) error { - if i < 0 || i >= len(args) { - return nil - } - err, ok := args[i].(error) - if !ok { - return nil - } - return err -} - -// formatPlusW is used to avoid the vet check that will barf at %w. -func formatPlusW(s string) string { - return s -} - -// Return the index of the only %w in format, or -1 if none. -// Also return a rewritten format string with %w replaced by %v, and -// false if there is more than one %w. -// TODO: handle "%[N]w". -func parsePercentW(format string) (idx int, newFormat string, ok bool) { - // Loosely copied from golang.org/x/tools/go/analysis/passes/printf/printf.go. - idx = -1 - ok = true - n := 0 - sz := 0 - var isW bool - for i := 0; i < len(format); i += sz { - if format[i] != '%' { - sz = 1 - continue - } - // "%%" is not a format directive. - if i+1 < len(format) && format[i+1] == '%' { - sz = 2 - continue - } - sz, isW = parsePrintfVerb(format[i:]) - if isW { - if idx >= 0 { - ok = false - } else { - idx = n - } - // "Replace" the last character, the 'w', with a 'v'. - p := i + sz - 1 - format = format[:p] + "v" + format[p+1:] - } - n++ - } - return idx, format, ok -} - -// Parse the printf verb starting with a % at s[0]. -// Return how many bytes it occupies and whether the verb is 'w'. -func parsePrintfVerb(s string) (int, bool) { - // Assume only that the directive is a sequence of non-letters followed by a single letter. - sz := 0 - var r rune - for i := 1; i < len(s); i += sz { - r, sz = utf8.DecodeRuneInString(s[i:]) - if unicode.IsLetter(r) { - return i + sz, r == 'w' - } - } - return len(s), false -} - -type noWrapError struct { - msg string - err error - frame Frame -} - -func (e *noWrapError) Error() string { - return fmt.Sprint(e) -} - -func (e *noWrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *noWrapError) FormatError(p Printer) (next error) { - p.Print(e.msg) - e.frame.Format(p) - return e.err -} - -type wrapError struct { - msg string - err error - frame Frame -} - -func (e *wrapError) Error() string { - return fmt.Sprint(e) -} - -func (e *wrapError) Format(s fmt.State, v rune) { FormatError(e, s, v) } - -func (e *wrapError) FormatError(p Printer) (next error) { - p.Print(e.msg) - e.frame.Format(p) - return e.err -} - -func (e *wrapError) Unwrap() error { - return e.err -} diff --git a/vendor/golang.org/x/xerrors/format.go b/vendor/golang.org/x/xerrors/format.go deleted file mode 100644 index 1bc9c26b97..0000000000 --- a/vendor/golang.org/x/xerrors/format.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2018 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 xerrors - -// A Formatter formats error messages. -type Formatter interface { - error - - // FormatError prints the receiver's first error and returns the next error in - // the error chain, if any. - FormatError(p Printer) (next error) -} - -// A Printer formats error messages. -// -// The most common implementation of Printer is the one provided by package fmt -// during Printf (as of Go 1.13). Localization packages such as golang.org/x/text/message -// typically provide their own implementations. -type Printer interface { - // Print appends args to the message output. - Print(args ...interface{}) - - // Printf writes a formatted string. - Printf(format string, args ...interface{}) - - // Detail reports whether error detail is requested. - // After the first call to Detail, all text written to the Printer - // is formatted as additional detail, or ignored when - // detail has not been requested. - // If Detail returns false, the caller can avoid printing the detail at all. - Detail() bool -} diff --git a/vendor/golang.org/x/xerrors/frame.go b/vendor/golang.org/x/xerrors/frame.go deleted file mode 100644 index 0de628ec50..0000000000 --- a/vendor/golang.org/x/xerrors/frame.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2018 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 xerrors - -import ( - "runtime" -) - -// A Frame contains part of a call stack. -type Frame struct { - // Make room for three PCs: the one we were asked for, what it called, - // and possibly a PC for skipPleaseUseCallersFrames. See: - // https://go.googlesource.com/go/+/032678e0fb/src/runtime/extern.go#169 - frames [3]uintptr -} - -// Caller returns a Frame that describes a frame on the caller's stack. -// The argument skip is the number of frames to skip over. -// Caller(0) returns the frame for the caller of Caller. -func Caller(skip int) Frame { - var s Frame - runtime.Callers(skip+1, s.frames[:]) - return s -} - -// location reports the file, line, and function of a frame. -// -// The returned function may be "" even if file and line are not. -func (f Frame) location() (function, file string, line int) { - frames := runtime.CallersFrames(f.frames[:]) - if _, ok := frames.Next(); !ok { - return "", "", 0 - } - fr, ok := frames.Next() - if !ok { - return "", "", 0 - } - return fr.Function, fr.File, fr.Line -} - -// Format prints the stack as error detail. -// It should be called from an error's Format implementation -// after printing any other error detail. -func (f Frame) Format(p Printer) { - if p.Detail() { - function, file, line := f.location() - if function != "" { - p.Printf("%s\n ", function) - } - if file != "" { - p.Printf("%s:%d\n", file, line) - } - } -} diff --git a/vendor/golang.org/x/xerrors/internal/internal.go b/vendor/golang.org/x/xerrors/internal/internal.go deleted file mode 100644 index 89f4eca5df..0000000000 --- a/vendor/golang.org/x/xerrors/internal/internal.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2018 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 internal - -// EnableTrace indicates whether stack information should be recorded in errors. -var EnableTrace = true diff --git a/vendor/golang.org/x/xerrors/wrap.go b/vendor/golang.org/x/xerrors/wrap.go deleted file mode 100644 index 9842758ca7..0000000000 --- a/vendor/golang.org/x/xerrors/wrap.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2018 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 xerrors - -import ( - "reflect" -) - -// A Wrapper provides context around another error. -type Wrapper interface { - // Unwrap returns the next error in the error chain. - // If there is no next error, Unwrap returns nil. - Unwrap() error -} - -// Opaque returns an error with the same error formatting as err -// but that does not match err and cannot be unwrapped. -func Opaque(err error) error { - return noWrapper{err} -} - -type noWrapper struct { - error -} - -func (e noWrapper) FormatError(p Printer) (next error) { - if f, ok := e.error.(Formatter); ok { - return f.FormatError(p) - } - p.Print(e.error) - return nil -} - -// Unwrap returns the result of calling the Unwrap method on err, if err implements -// Unwrap. Otherwise, Unwrap returns nil. -// -// Deprecated: As of Go 1.13, use errors.Unwrap instead. -func Unwrap(err error) error { - u, ok := err.(Wrapper) - if !ok { - return nil - } - return u.Unwrap() -} - -// Is reports whether any error in err's chain matches target. -// -// An error is considered to match a target if it is equal to that target or if -// it implements a method Is(error) bool such that Is(target) returns true. -// -// Deprecated: As of Go 1.13, use errors.Is instead. -func Is(err, target error) bool { - if target == nil { - return err == target - } - - isComparable := reflect.TypeOf(target).Comparable() - for { - if isComparable && err == target { - return true - } - if x, ok := err.(interface{ Is(error) bool }); ok && x.Is(target) { - return true - } - // TODO: consider supporing target.Is(err). This would allow - // user-definable predicates, but also may allow for coping with sloppy - // APIs, thereby making it easier to get away with them. - if err = Unwrap(err); err == nil { - return false - } - } -} - -// As finds the first error in err's chain that matches the type to which target -// points, and if so, sets the target to its value and returns true. An error -// matches a type if it is assignable to the target type, or if it has a method -// As(interface{}) bool such that As(target) returns true. As will panic if target -// is not a non-nil pointer to a type which implements error or is of interface type. -// -// The As method should set the target to its value and return true if err -// matches the type to which target points. -// -// Deprecated: As of Go 1.13, use errors.As instead. -func As(err error, target interface{}) bool { - if target == nil { - panic("errors: target cannot be nil") - } - val := reflect.ValueOf(target) - typ := val.Type() - if typ.Kind() != reflect.Ptr || val.IsNil() { - panic("errors: target must be a non-nil pointer") - } - if e := typ.Elem(); e.Kind() != reflect.Interface && !e.Implements(errorType) { - panic("errors: *target must be interface or implement error") - } - targetType := typ.Elem() - for err != nil { - if reflect.TypeOf(err).AssignableTo(targetType) { - val.Elem().Set(reflect.ValueOf(err)) - return true - } - if x, ok := err.(interface{ As(interface{}) bool }); ok && x.As(target) { - return true - } - err = Unwrap(err) - } - return false -} - -var errorType = reflect.TypeOf((*error)(nil)).Elem() diff --git a/vendor/google.golang.org/api/AUTHORS b/vendor/google.golang.org/api/AUTHORS deleted file mode 100644 index f07029059d..0000000000 --- a/vendor/google.golang.org/api/AUTHORS +++ /dev/null @@ -1,11 +0,0 @@ -# This is the official list of authors for copyright purposes. -# This file is distinct from the CONTRIBUTORS files. -# See the latter for an explanation. - -# Names should be added to this file as -# Name or Organization -# The email address is not required for organizations. - -# Please keep the list sorted. -Google Inc. -LightStep Inc. diff --git a/vendor/google.golang.org/api/CONTRIBUTORS b/vendor/google.golang.org/api/CONTRIBUTORS deleted file mode 100644 index 788677b8f0..0000000000 --- a/vendor/google.golang.org/api/CONTRIBUTORS +++ /dev/null @@ -1,56 +0,0 @@ -# This is the official list of people who can contribute -# (and typically have contributed) code to the repository. -# The AUTHORS file lists the copyright holders; this file -# lists people. For example, Google employees are listed here -# but not in AUTHORS, because Google holds the copyright. -# -# The submission process automatically checks to make sure -# that people submitting code are listed in this file (by email address). -# -# Names should be added to this file only after verifying that -# the individual or the individual's organization has agreed to -# the appropriate Contributor License Agreement, found here: -# -# https://cla.developers.google.com/about/google-individual -# https://cla.developers.google.com/about/google-corporate -# -# The CLA can be filled out on the web: -# -# https://cla.developers.google.com/ -# -# When adding J Random Contributor's name to this file, -# either J's name or J's organization's name should be -# added to the AUTHORS file, depending on whether the -# individual or corporate CLA was used. - -# Names should be added to this file like so: -# Name -# -# An entry with two email addresses specifies that the -# first address should be used in the submit logs and -# that the second address should be recognized as the -# same person when interacting with Rietveld. - -# Please keep the list sorted. - -Alain Vongsouvanhalainv -Andrew Gerrand -Brad Fitzpatrick -Eric Koleda -Francesc Campoy -Garrick Evans -Glenn Lewis -Ivan Krasin -Jason Hall -Johan Euphrosine -Kostik Shtoyk -Kunpei Sakai -Matthew Dolan -Matthew Whisenhunt -Michael McGreevy -Nick Craig-Wood -Robbie Trencheny -Ross Light -Sarah Adams -Scott Van Woudenberg -Takashi Matsuo diff --git a/vendor/google.golang.org/api/LICENSE b/vendor/google.golang.org/api/LICENSE deleted file mode 100644 index 263aa7a0c1..0000000000 --- a/vendor/google.golang.org/api/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2011 Google 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 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/google.golang.org/api/dns/v1/dns-api.json b/vendor/google.golang.org/api/dns/v1/dns-api.json deleted file mode 100644 index aa1b3b17f2..0000000000 --- a/vendor/google.golang.org/api/dns/v1/dns-api.json +++ /dev/null @@ -1,3544 +0,0 @@ -{ - "auth": { - "oauth2": { - "scopes": { - "https://www.googleapis.com/auth/cloud-platform": { - "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." - }, - "https://www.googleapis.com/auth/cloud-platform.read-only": { - "description": "View your data across Google Cloud services and see the email address of your Google Account" - }, - "https://www.googleapis.com/auth/ndev.clouddns.readonly": { - "description": "View your DNS records hosted by Google Cloud DNS" - }, - "https://www.googleapis.com/auth/ndev.clouddns.readwrite": { - "description": "View and manage your DNS records hosted by Google Cloud DNS" - } - } - } - }, - "basePath": "", - "baseUrl": "https://dns.googleapis.com/", - "batchPath": "batch", - "canonicalName": "Dns", - "description": "", - "discoveryVersion": "v1", - "documentationLink": "https://cloud.google.com/dns/docs", - "fullyEncodeReservedExpansion": true, - "icons": { - "x16": "http://www.google.com/images/icons/product/search-16.gif", - "x32": "http://www.google.com/images/icons/product/search-32.gif" - }, - "id": "dns:v1", - "kind": "discovery#restDescription", - "mtlsRootUrl": "https://dns.mtls.googleapis.com/", - "name": "dns", - "ownerDomain": "google.com", - "ownerName": "Google", - "parameters": { - "$.xgafv": { - "description": "V1 error format.", - "enum": [ - "1", - "2" - ], - "enumDescriptions": [ - "v1 error format", - "v2 error format" - ], - "location": "query", - "type": "string" - }, - "access_token": { - "description": "OAuth access token.", - "location": "query", - "type": "string" - }, - "alt": { - "default": "json", - "description": "Data format for response.", - "enum": [ - "json", - "media", - "proto" - ], - "enumDescriptions": [ - "Responses with Content-Type of application/json", - "Media download with context-dependent Content-Type", - "Responses with Content-Type of application/x-protobuf" - ], - "location": "query", - "type": "string" - }, - "callback": { - "description": "JSONP", - "location": "query", - "type": "string" - }, - "fields": { - "description": "Selector specifying which fields to include in a partial response.", - "location": "query", - "type": "string" - }, - "key": { - "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", - "location": "query", - "type": "string" - }, - "oauth_token": { - "description": "OAuth 2.0 token for the current user.", - "location": "query", - "type": "string" - }, - "prettyPrint": { - "default": "true", - "description": "Returns response with indentations and line breaks.", - "location": "query", - "type": "boolean" - }, - "quotaUser": { - "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.", - "location": "query", - "type": "string" - }, - "uploadType": { - "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", - "location": "query", - "type": "string" - }, - "upload_protocol": { - "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", - "location": "query", - "type": "string" - } - }, - "protocol": "rest", - "resources": { - "changes": { - "methods": { - "create": { - "description": "Atomically updates the ResourceRecordSet collection.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/changes", - "httpMethod": "POST", - "id": "dns.changes.create", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/changes", - "request": { - "$ref": "Change" - }, - "response": { - "$ref": "Change" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing Change.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}", - "httpMethod": "GET", - "id": "dns.changes.get", - "parameterOrder": [ - "project", - "managedZone", - "changeId" - ], - "parameters": { - "changeId": { - "description": "The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse.", - "location": "path", - "required": true, - "type": "string" - }, - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}", - "response": { - "$ref": "Change" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates Changes to a ResourceRecordSet collection.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/changes", - "httpMethod": "GET", - "id": "dns.changes.list", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "sortBy": { - "default": "changeSequence", - "description": "Sorting criterion. The only supported value is change sequence.", - "enum": [ - "changeSequence" - ], - "enumDescriptions": [ - "" - ], - "location": "query", - "type": "string" - }, - "sortOrder": { - "description": "Sorting order direction: 'ascending' or 'descending'.", - "location": "query", - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/changes", - "response": { - "$ref": "ChangesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "dnsKeys": { - "methods": { - "get": { - "description": "Fetches the representation of an existing DnsKey.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", - "httpMethod": "GET", - "id": "dns.dnsKeys.get", - "parameterOrder": [ - "project", - "managedZone", - "dnsKeyId" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "digestType": { - "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", - "location": "query", - "type": "string" - }, - "dnsKeyId": { - "description": "The identifier of the requested DnsKey.", - "location": "path", - "required": true, - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}", - "response": { - "$ref": "DnsKey" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates DnsKeys to a ResourceRecordSet collection.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys", - "httpMethod": "GET", - "id": "dns.dnsKeys.list", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "digestType": { - "description": "An optional comma-separated list of digest types to compute and display for key signing keys. If omitted, the recommended digest type is computed and displayed.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys", - "response": { - "$ref": "DnsKeysListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "managedZoneOperations": { - "methods": { - "get": { - "description": "Fetches the representation of an existing Operation.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/operations/{operation}", - "httpMethod": "GET", - "id": "dns.managedZoneOperations.get", - "parameterOrder": [ - "project", - "managedZone", - "operation" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "operation": { - "description": "Identifies the operation addressed by this request (ID of the operation).", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/operations/{operation}", - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates Operations for the given ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/operations", - "httpMethod": "GET", - "id": "dns.managedZoneOperations.list", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "managedZone": { - "description": "Identifies the managed zone addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "sortBy": { - "default": "startTime", - "description": "Sorting criterion. The only supported values are START_TIME and ID.", - "enum": [ - "startTime", - "id" - ], - "enumDescriptions": [ - "", - "" - ], - "location": "query", - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/operations", - "response": { - "$ref": "ManagedZoneOperationsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "managedZones": { - "methods": { - "create": { - "description": "Creates a new ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones", - "httpMethod": "POST", - "id": "dns.managedZones.create", - "parameterOrder": [ - "project" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones", - "request": { - "$ref": "ManagedZone" - }, - "response": { - "$ref": "ManagedZone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "delete": { - "description": "Deletes a previously created ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", - "httpMethod": "DELETE", - "id": "dns.managedZones.delete", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", - "httpMethod": "GET", - "id": "dns.managedZones.get", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}", - "response": { - "$ref": "ManagedZone" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "getIamPolicy": { - "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", - "flatPath": "dns/v1/projects/{projectsId}/managedZones/{managedZonesId}:getIamPolicy", - "httpMethod": "POST", - "id": "dns.managedZones.getIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/managedZones/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/{+resource}:getIamPolicy", - "request": { - "$ref": "GoogleIamV1GetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates ManagedZones that have been created but not yet deleted.", - "flatPath": "dns/v1/projects/{project}/managedZones", - "httpMethod": "GET", - "id": "dns.managedZones.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "dnsName": { - "description": "Restricts the list to return only zones with this domain name.", - "location": "query", - "type": "string" - }, - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones", - "response": { - "$ref": "ManagedZonesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "patch": { - "description": "Applies a partial update to an existing ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", - "httpMethod": "PATCH", - "id": "dns.managedZones.patch", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}", - "request": { - "$ref": "ManagedZone" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "setIamPolicy": { - "description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", - "flatPath": "dns/v1/projects/{projectsId}/managedZones/{managedZonesId}:setIamPolicy", - "httpMethod": "POST", - "id": "dns.managedZones.setIamPolicy", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/managedZones/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/{+resource}:setIamPolicy", - "request": { - "$ref": "GoogleIamV1SetIamPolicyRequest" - }, - "response": { - "$ref": "GoogleIamV1Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "testIamPermissions": { - "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this returns an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", - "flatPath": "dns/v1/projects/{projectsId}/managedZones/{managedZonesId}:testIamPermissions", - "httpMethod": "POST", - "id": "dns.managedZones.testIamPermissions", - "parameterOrder": [ - "resource" - ], - "parameters": { - "resource": { - "description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", - "location": "path", - "pattern": "^projects/[^/]+/managedZones/[^/]+$", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/{+resource}:testIamPermissions", - "request": { - "$ref": "GoogleIamV1TestIamPermissionsRequest" - }, - "response": { - "$ref": "GoogleIamV1TestIamPermissionsResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "update": { - "description": "Updates an existing ManagedZone.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}", - "httpMethod": "PUT", - "id": "dns.managedZones.update", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}", - "request": { - "$ref": "ManagedZone" - }, - "response": { - "$ref": "Operation" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "policies": { - "methods": { - "create": { - "description": "Creates a new policy.", - "flatPath": "dns/v1/projects/{project}/policies", - "httpMethod": "POST", - "id": "dns.policies.create", - "parameterOrder": [ - "project" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "delete": { - "description": "Deletes a previously created policy. Fails if the policy is still being referenced by a network.", - "flatPath": "dns/v1/projects/{project}/policies/{policy}", - "httpMethod": "DELETE", - "id": "dns.policies.delete", - "parameterOrder": [ - "project", - "policy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "policy": { - "description": "User given friendly name of the policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies/{policy}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing policy.", - "flatPath": "dns/v1/projects/{project}/policies/{policy}", - "httpMethod": "GET", - "id": "dns.policies.get", - "parameterOrder": [ - "project", - "policy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "policy": { - "description": "User given friendly name of the policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies/{policy}", - "response": { - "$ref": "Policy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates all policies associated with a project.", - "flatPath": "dns/v1/projects/{project}/policies", - "httpMethod": "GET", - "id": "dns.policies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies", - "response": { - "$ref": "PoliciesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "patch": { - "description": "Applies a partial update to an existing policy.", - "flatPath": "dns/v1/projects/{project}/policies/{policy}", - "httpMethod": "PATCH", - "id": "dns.policies.patch", - "parameterOrder": [ - "project", - "policy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "policy": { - "description": "User given friendly name of the policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies/{policy}", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "PoliciesPatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "update": { - "description": "Updates an existing policy.", - "flatPath": "dns/v1/projects/{project}/policies/{policy}", - "httpMethod": "PUT", - "id": "dns.policies.update", - "parameterOrder": [ - "project", - "policy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "policy": { - "description": "User given friendly name of the policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/policies/{policy}", - "request": { - "$ref": "Policy" - }, - "response": { - "$ref": "PoliciesUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "projects": { - "methods": { - "get": { - "description": "Fetches the representation of an existing Project.", - "flatPath": "dns/v1/projects/{project}", - "httpMethod": "GET", - "id": "dns.projects.get", - "parameterOrder": [ - "project" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}", - "response": { - "$ref": "Project" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "resourceRecordSets": { - "methods": { - "create": { - "description": "Creates a new ResourceRecordSet.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets", - "httpMethod": "POST", - "id": "dns.resourceRecordSets.create", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets", - "request": { - "$ref": "ResourceRecordSet" - }, - "response": { - "$ref": "ResourceRecordSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "delete": { - "description": "Deletes a previously created ResourceRecordSet.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "httpMethod": "DELETE", - "id": "dns.resourceRecordSets.delete", - "parameterOrder": [ - "project", - "managedZone", - "name", - "type" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "Fully qualified domain name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "type": { - "description": "RRSet type.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "response": { - "$ref": "ResourceRecordSetsDeleteResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing ResourceRecordSet.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "httpMethod": "GET", - "id": "dns.resourceRecordSets.get", - "parameterOrder": [ - "project", - "managedZone", - "name", - "type" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "Fully qualified domain name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "type": { - "description": "RRSet type.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "response": { - "$ref": "ResourceRecordSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates ResourceRecordSets that you have created but not yet deleted.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets", - "httpMethod": "GET", - "id": "dns.resourceRecordSets.list", - "parameterOrder": [ - "project", - "managedZone" - ], - "parameters": { - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "name": { - "description": "Restricts the list to return only records with this fully qualified domain name. Mutually exclusive with the {@code filter} field.", - "location": "query", - "type": "string" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "type": { - "description": "Restricts the list to return only records of this type. If present, the \"name\" parameter must also be present. Mutually exclusive with the {@code filter} field.", - "location": "query", - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets", - "response": { - "$ref": "ResourceRecordSetsListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "patch": { - "description": "Applies a partial update to an existing ResourceRecordSet.", - "flatPath": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "httpMethod": "PATCH", - "id": "dns.resourceRecordSets.patch", - "parameterOrder": [ - "project", - "managedZone", - "name", - "type" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "managedZone": { - "description": "Identifies the managed zone addressed by this request. Can be the managed zone name or ID.", - "location": "path", - "required": true, - "type": "string" - }, - "name": { - "description": "Fully qualified domain name.", - "location": "path", - "required": true, - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "type": { - "description": "RRSet type.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}", - "request": { - "$ref": "ResourceRecordSet" - }, - "response": { - "$ref": "ResourceRecordSet" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "responsePolicies": { - "methods": { - "create": { - "description": "Creates a new Response Policy", - "flatPath": "dns/v1/projects/{project}/responsePolicies", - "httpMethod": "POST", - "id": "dns.responsePolicies.create", - "parameterOrder": [ - "project" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies", - "request": { - "$ref": "ResponsePolicy" - }, - "response": { - "$ref": "ResponsePolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "delete": { - "description": "Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "httpMethod": "DELETE", - "id": "dns.responsePolicies.delete", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing Response Policy.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "httpMethod": "GET", - "id": "dns.responsePolicies.get", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "response": { - "$ref": "ResponsePolicy" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates all Response Policies associated with a project.", - "flatPath": "dns/v1/projects/{project}/responsePolicies", - "httpMethod": "GET", - "id": "dns.responsePolicies.list", - "parameterOrder": [ - "project" - ], - "parameters": { - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies", - "response": { - "$ref": "ResponsePoliciesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "patch": { - "description": "Applies a partial update to an existing Response Policy.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "httpMethod": "PATCH", - "id": "dns.responsePolicies.patch", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the response policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "request": { - "$ref": "ResponsePolicy" - }, - "response": { - "$ref": "ResponsePoliciesPatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "update": { - "description": "Updates an existing Response Policy.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "httpMethod": "PUT", - "id": "dns.responsePolicies.update", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}", - "request": { - "$ref": "ResponsePolicy" - }, - "response": { - "$ref": "ResponsePoliciesUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - }, - "responsePolicyRules": { - "methods": { - "create": { - "description": "Creates a new Response Policy Rule.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules", - "httpMethod": "POST", - "id": "dns.responsePolicyRules.create", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy containing the Response Policy Rule.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules", - "request": { - "$ref": "ResponsePolicyRule" - }, - "response": { - "$ref": "ResponsePolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "delete": { - "description": "Deletes a previously created Response Policy Rule.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "httpMethod": "DELETE", - "id": "dns.responsePolicyRules.delete", - "parameterOrder": [ - "project", - "responsePolicy", - "responsePolicyRule" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy containing the Response Policy Rule.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicyRule": { - "description": "User assigned name of the Response Policy Rule addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "get": { - "description": "Fetches the representation of an existing Response Policy Rule.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "httpMethod": "GET", - "id": "dns.responsePolicyRules.get", - "parameterOrder": [ - "project", - "responsePolicy", - "responsePolicyRule" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy containing the Response Policy Rule.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicyRule": { - "description": "User assigned name of the Response Policy Rule addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "response": { - "$ref": "ResponsePolicyRule" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "list": { - "description": "Enumerates all Response Policy Rules associated with a project.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules", - "httpMethod": "GET", - "id": "dns.responsePolicyRules.list", - "parameterOrder": [ - "project", - "responsePolicy" - ], - "parameters": { - "maxResults": { - "description": "Optional. Maximum number of results to be returned. If unspecified, the server decides how many results to return.", - "format": "int32", - "location": "query", - "type": "integer" - }, - "pageToken": { - "description": "Optional. A tag returned by a previous list request that was truncated. Use this parameter to continue a previous list request.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy to list.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules", - "response": { - "$ref": "ResponsePolicyRulesListResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "patch": { - "description": "Applies a partial update to an existing Response Policy Rule.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "httpMethod": "PATCH", - "id": "dns.responsePolicyRules.patch", - "parameterOrder": [ - "project", - "responsePolicy", - "responsePolicyRule" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy containing the Response Policy Rule.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicyRule": { - "description": "User assigned name of the Response Policy Rule addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "request": { - "$ref": "ResponsePolicyRule" - }, - "response": { - "$ref": "ResponsePolicyRulesPatchResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - }, - "update": { - "description": "Updates an existing Response Policy Rule.", - "flatPath": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "httpMethod": "PUT", - "id": "dns.responsePolicyRules.update", - "parameterOrder": [ - "project", - "responsePolicy", - "responsePolicyRule" - ], - "parameters": { - "clientOperationId": { - "description": "For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection.", - "location": "query", - "type": "string" - }, - "project": { - "description": "Identifies the project addressed by this request.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicy": { - "description": "User assigned name of the Response Policy containing the Response Policy Rule.", - "location": "path", - "required": true, - "type": "string" - }, - "responsePolicyRule": { - "description": "User assigned name of the Response Policy Rule addressed by this request.", - "location": "path", - "required": true, - "type": "string" - } - }, - "path": "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}", - "request": { - "$ref": "ResponsePolicyRule" - }, - "response": { - "$ref": "ResponsePolicyRulesUpdateResponse" - }, - "scopes": [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite" - ] - } - } - } - }, - "revision": "20250828", - "rootUrl": "https://dns.googleapis.com/", - "schemas": { - "Change": { - "description": "A Change represents a set of `ResourceRecordSet` additions and deletions applied atomically to a ManagedZone. ResourceRecordSets within a ManagedZone are modified by creating a new Change element in the Changes collection. In turn the Changes collection also records the past modifications to the `ResourceRecordSets` in a `ManagedZone`. The current state of the `ManagedZone` is the sum effect of applying all `Change` elements in the `Changes` collection in sequence.", - "id": "Change", - "properties": { - "additions": { - "description": "Which ResourceRecordSets to add?", - "items": { - "$ref": "ResourceRecordSet" - }, - "type": "array" - }, - "deletions": { - "description": "Which ResourceRecordSets to remove? Must match existing data exactly.", - "items": { - "$ref": "ResourceRecordSet" - }, - "type": "array" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "type": "string" - }, - "isServing": { - "description": "If the DNS queries for the zone will be served.", - "type": "boolean" - }, - "kind": { - "default": "dns#change", - "type": "string" - }, - "startTime": { - "description": "The time that this operation was started by the server (output only). This is in RFC3339 text format.", - "type": "string" - }, - "status": { - "description": "Status of the operation (output only). A status of \"done\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", - "enum": [ - "pending", - "done" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "ChangesListResponse": { - "description": "The response to a request to enumerate Changes to a ResourceRecordSets collection.", - "id": "ChangesListResponse", - "properties": { - "changes": { - "description": "The requested changes.", - "items": { - "$ref": "Change" - }, - "type": "array" - }, - "kind": { - "default": "dns#changesListResponse", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - } - }, - "type": "object" - }, - "DnsKey": { - "description": "A DNSSEC key pair.", - "id": "DnsKey", - "properties": { - "algorithm": { - "description": "String mnemonic specifying the DNSSEC algorithm of this key. Immutable after creation time.", - "enum": [ - "rsasha1", - "rsasha256", - "rsasha512", - "ecdsap256sha256", - "ecdsap384sha384" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "creationTime": { - "description": "The time that this resource was created in the control plane. This is in RFC3339 text format. Output only.", - "type": "string" - }, - "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the resource's function.", - "type": "string" - }, - "digests": { - "description": "Cryptographic hashes of the DNSKEY resource record associated with this DnsKey. These digests are needed to construct a DS record that points at this DNS key. Output only.", - "items": { - "$ref": "DnsKeyDigest" - }, - "type": "array" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "type": "string" - }, - "isActive": { - "description": "Active keys are used to sign subsequent changes to the ManagedZone. Inactive keys are still present as DNSKEY Resource Records for the use of resolvers validating existing signatures.", - "type": "boolean" - }, - "keyLength": { - "description": "Length of the key in bits. Specified at creation time, and then immutable.", - "format": "uint32", - "type": "integer" - }, - "keyTag": { - "description": "The key tag is a non-cryptographic hash of the a DNSKEY resource record associated with this DnsKey. The key tag can be used to identify a DNSKEY more quickly (but it is not a unique identifier). In particular, the key tag is used in a parent zone's DS record to point at the DNSKEY in this child ManagedZone. The key tag is a number in the range [0, 65535] and the algorithm to calculate it is specified in RFC4034 Appendix B. Output only.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "dns#dnsKey", - "type": "string" - }, - "publicKey": { - "description": "Base64 encoded public half of this key. Output only.", - "type": "string" - }, - "type": { - "description": "One of \"KEY_SIGNING\" or \"ZONE_SIGNING\". Keys of type KEY_SIGNING have the Secure Entry Point flag set and, when active, are used to sign only resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag is cleared, and this key is used to sign only resource record sets of other types. Immutable after creation time.", - "enum": [ - "keySigning", - "zoneSigning" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "DnsKeyDigest": { - "id": "DnsKeyDigest", - "properties": { - "digest": { - "description": "The base-16 encoded bytes of this digest. Suitable for use in a DS resource record.", - "type": "string" - }, - "type": { - "description": "Specifies the algorithm used to calculate this digest.", - "enum": [ - "sha1", - "sha256", - "sha384" - ], - "enumDescriptions": [ - "", - "", - "" - ], - "type": "string" - } - }, - "type": "object" - }, - "DnsKeySpec": { - "description": "Parameters for DnsKey key generation. Used for generating initial keys for a new ManagedZone and as default when adding a new DnsKey.", - "id": "DnsKeySpec", - "properties": { - "algorithm": { - "description": "String mnemonic specifying the DNSSEC algorithm of this key.", - "enum": [ - "rsasha1", - "rsasha256", - "rsasha512", - "ecdsap256sha256", - "ecdsap384sha384" - ], - "enumDescriptions": [ - "", - "", - "", - "", - "" - ], - "type": "string" - }, - "keyLength": { - "description": "Length of the keys in bits.", - "format": "uint32", - "type": "integer" - }, - "keyType": { - "description": "Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, are only used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and are used to sign all other types of resource record sets.", - "enum": [ - "keySigning", - "zoneSigning" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "kind": { - "default": "dns#dnsKeySpec", - "type": "string" - } - }, - "type": "object" - }, - "DnsKeysListResponse": { - "description": "The response to a request to enumerate DnsKeys in a ManagedZone.", - "id": "DnsKeysListResponse", - "properties": { - "dnsKeys": { - "description": "The requested resources.", - "items": { - "$ref": "DnsKey" - }, - "type": "array" - }, - "kind": { - "default": "dns#dnsKeysListResponse", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - } - }, - "type": "object" - }, - "Expr": { - "description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() \u003c 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' \u0026\u0026 document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.", - "id": "Expr", - "properties": { - "description": { - "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", - "type": "string" - }, - "expression": { - "description": "Textual representation of an expression in Common Expression Language syntax.", - "type": "string" - }, - "location": { - "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", - "type": "string" - }, - "title": { - "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditConfig": { - "description": "Specifies the audit configuration for a service. The configuration determines which permission types are logged, and what identities, if any, are exempted from logging. An AuditConfig must have one or more AuditLogConfigs. If there are AuditConfigs for both `allServices` and a specific service, the union of the two AuditConfigs is used for that service: the log_types specified in each AuditConfig are enabled, and the exempted_members in each AuditLogConfig are exempted. Example Policy with multiple AuditConfigs: { \"audit_configs\": [ { \"service\": \"allServices\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" }, { \"log_type\": \"ADMIN_READ\" } ] }, { \"service\": \"sampleservice.googleapis.com\", \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\" }, { \"log_type\": \"DATA_WRITE\", \"exempted_members\": [ \"user:aliya@example.com\" ] } ] } ] } For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also exempts `jose@example.com` from DATA_READ logging, and `aliya@example.com` from DATA_WRITE logging.", - "id": "GoogleIamV1AuditConfig", - "properties": { - "auditLogConfigs": { - "description": "The configuration for logging of each type of permission.", - "items": { - "$ref": "GoogleIamV1AuditLogConfig" - }, - "type": "array" - }, - "service": { - "description": "Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services.", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1AuditLogConfig": { - "description": "Provides the configuration for logging a type of permissions. Example: { \"audit_log_configs\": [ { \"log_type\": \"DATA_READ\", \"exempted_members\": [ \"user:jose@example.com\" ] }, { \"log_type\": \"DATA_WRITE\" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from DATA_READ logging.", - "id": "GoogleIamV1AuditLogConfig", - "properties": { - "exemptedMembers": { - "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", - "items": { - "type": "string" - }, - "type": "array" - }, - "logType": { - "description": "The log type that this config enables.", - "enum": [ - "LOG_TYPE_UNSPECIFIED", - "ADMIN_READ", - "DATA_WRITE", - "DATA_READ" - ], - "enumDescriptions": [ - "Default case. Should never be this.", - "Admin reads. Example: CloudIAM getIamPolicy", - "Data writes. Example: CloudSQL Users create", - "Data reads. Example: CloudSQL Users list" - ], - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1Binding": { - "description": "Associates `members`, or principals, with a `role`.", - "id": "GoogleIamV1Binding", - "properties": { - "condition": { - "$ref": "Expr", - "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." - }, - "members": { - "description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", - "items": { - "type": "string" - }, - "type": "array" - }, - "role": { - "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1GetIamPolicyRequest": { - "description": "Request message for `GetIamPolicy` method.", - "id": "GoogleIamV1GetIamPolicyRequest", - "properties": { - "options": { - "$ref": "GoogleIamV1GetPolicyOptions", - "description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." - } - }, - "type": "object" - }, - "GoogleIamV1GetPolicyOptions": { - "description": "Encapsulates settings provided to GetIamPolicy.", - "id": "GoogleIamV1GetPolicyOptions", - "properties": { - "requestedPolicyVersion": { - "description": "Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleIamV1Policy": { - "description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time \u003c timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time \u003c timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).", - "id": "GoogleIamV1Policy", - "properties": { - "auditConfigs": { - "description": "Specifies cloud audit logging configuration for this policy.", - "items": { - "$ref": "GoogleIamV1AuditConfig" - }, - "type": "array" - }, - "bindings": { - "description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.", - "items": { - "$ref": "GoogleIamV1Binding" - }, - "type": "array" - }, - "etag": { - "description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.", - "format": "byte", - "type": "string" - }, - "version": { - "description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).", - "format": "int32", - "type": "integer" - } - }, - "type": "object" - }, - "GoogleIamV1SetIamPolicyRequest": { - "description": "Request message for `SetIamPolicy` method.", - "id": "GoogleIamV1SetIamPolicyRequest", - "properties": { - "policy": { - "$ref": "GoogleIamV1Policy", - "description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." - }, - "updateMask": { - "description": "OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only the fields in the mask will be modified. If no mask is provided, the following default mask is used: `paths: \"bindings, etag\"`", - "format": "google-fieldmask", - "type": "string" - } - }, - "type": "object" - }, - "GoogleIamV1TestIamPermissionsRequest": { - "description": "Request message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsRequest", - "properties": { - "permissions": { - "description": "The set of permissions to check for the `resource`. Permissions with wildcards (such as `*` or `storage.*`) are not allowed. For more information see [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "GoogleIamV1TestIamPermissionsResponse": { - "description": "Response message for `TestIamPermissions` method.", - "id": "GoogleIamV1TestIamPermissionsResponse", - "properties": { - "permissions": { - "description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "ManagedZone": { - "description": "A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.", - "id": "ManagedZone", - "properties": { - "cloudLoggingConfig": { - "$ref": "ManagedZoneCloudLoggingConfig" - }, - "creationTime": { - "description": "The time that this resource was created on the server. This is in RFC3339 text format. Output only.", - "type": "string" - }, - "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.", - "type": "string" - }, - "dnsName": { - "description": "The DNS name of this managed zone, for instance \"example.com.\".", - "type": "string" - }, - "dnssecConfig": { - "$ref": "ManagedZoneDnsSecConfig", - "description": "DNSSEC configuration." - }, - "forwardingConfig": { - "$ref": "ManagedZoneForwardingConfig", - "description": "The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to." - }, - "id": { - "description": "Unique identifier for the resource; defined by the server (output only)", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "dns#managedZone", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "User labels.", - "type": "object" - }, - "name": { - "description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", - "type": "string" - }, - "nameServerSet": { - "description": "Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users leave this field unset. If you need to use this field, contact your account team.", - "type": "string" - }, - "nameServers": { - "description": "Delegate your managed_zone to these virtual name servers; defined by the server (output only)", - "items": { - "type": "string" - }, - "type": "array" - }, - "peeringConfig": { - "$ref": "ManagedZonePeeringConfig", - "description": "The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with." - }, - "privateVisibilityConfig": { - "$ref": "ManagedZonePrivateVisibilityConfig", - "description": "For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from." - }, - "reverseLookupConfig": { - "$ref": "ManagedZoneReverseLookupConfig", - "description": "The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS resolves reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config." - }, - "serviceDirectoryConfig": { - "$ref": "ManagedZoneServiceDirectoryConfig", - "description": "This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones." - }, - "visibility": { - "description": "The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.", - "enum": [ - "public", - "private" - ], - "enumDescriptions": [ - "Indicates that records in this zone can be queried from the public internet.", - "Indicates that records in this zone cannot be queried from the public internet. Access to private zones depends on the zone configuration." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneCloudLoggingConfig": { - "description": "Cloud Logging configurations for publicly visible zones.", - "id": "ManagedZoneCloudLoggingConfig", - "properties": { - "enableLogging": { - "description": "If set, enable query logging for this ManagedZone. False by default, making logging opt-in.", - "type": "boolean" - }, - "kind": { - "default": "dns#managedZoneCloudLoggingConfig", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneDnsSecConfig": { - "id": "ManagedZoneDnsSecConfig", - "properties": { - "defaultKeySpecs": { - "description": "Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.", - "items": { - "$ref": "DnsKeySpec" - }, - "type": "array" - }, - "kind": { - "default": "dns#managedZoneDnsSecConfig", - "type": "string" - }, - "nonExistence": { - "description": "Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.", - "enum": [ - "nsec", - "nsec3" - ], - "enumDescriptions": [ - "Indicates that Cloud DNS will sign records in the managed zone according to RFC 4034 and respond with NSEC records for names that do not exist.", - "Indicates that Cloud DNS will sign records in the managed zone according to RFC 5155 and respond with NSEC3 records for names that do not exist." - ], - "type": "string" - }, - "state": { - "description": "Specifies whether DNSSEC is enabled, and what mode it is in.", - "enum": [ - "off", - "on", - "transfer" - ], - "enumDescriptions": [ - "DNSSEC is disabled; the zone is not signed.", - "DNSSEC is enabled; the zone is signed and fully managed.", - "DNSSEC is enabled, but in a \"transfer\" mode." - ], - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneForwardingConfig": { - "id": "ManagedZoneForwardingConfig", - "properties": { - "kind": { - "default": "dns#managedZoneForwardingConfig", - "type": "string" - }, - "targetNameServers": { - "description": "List of target name servers to forward to. Cloud DNS selects the best available name server if more than one target is given.", - "items": { - "$ref": "ManagedZoneForwardingConfigNameServerTarget" - }, - "type": "array" - } - }, - "type": "object" - }, - "ManagedZoneForwardingConfigNameServerTarget": { - "id": "ManagedZoneForwardingConfigNameServerTarget", - "properties": { - "domainName": { - "description": "Fully qualified domain name for the forwarding target.", - "type": "string" - }, - "forwardingPath": { - "description": "Forwarding path for this NameServerTarget. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target.", - "enum": [ - "default", - "private" - ], - "enumDescriptions": [ - "Cloud DNS makes forwarding decisions based on address ranges; that is, RFC1918 addresses forward to the target through the VPC and non-RFC1918 addresses forward to the target through the internet", - "Cloud DNS always forwards to this target through the VPC." - ], - "type": "string" - }, - "ipv4Address": { - "description": "IPv4 address of a target name server.", - "type": "string" - }, - "ipv6Address": { - "description": "IPv6 address of a target name server. Does not accept both fields (ipv4 \u0026 ipv6) being populated. Public preview as of November 2022.", - "type": "string" - }, - "kind": { - "default": "dns#managedZoneForwardingConfigNameServerTarget", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneOperationsListResponse": { - "id": "ManagedZoneOperationsListResponse", - "properties": { - "kind": { - "default": "dns#managedZoneOperationsListResponse", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - }, - "operations": { - "description": "The operation resources.", - "items": { - "$ref": "Operation" - }, - "type": "array" - } - }, - "type": "object" - }, - "ManagedZonePeeringConfig": { - "id": "ManagedZonePeeringConfig", - "properties": { - "kind": { - "default": "dns#managedZonePeeringConfig", - "type": "string" - }, - "targetNetwork": { - "$ref": "ManagedZonePeeringConfigTargetNetwork", - "description": "The network with which to peer." - } - }, - "type": "object" - }, - "ManagedZonePeeringConfigTargetNetwork": { - "id": "ManagedZonePeeringConfigTargetNetwork", - "properties": { - "deactivateTime": { - "description": "The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only.", - "type": "string" - }, - "kind": { - "default": "dns#managedZonePeeringConfigTargetNetwork", - "type": "string" - }, - "networkUrl": { - "description": "The fully qualified URL of the VPC network to forward queries to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZonePrivateVisibilityConfig": { - "id": "ManagedZonePrivateVisibilityConfig", - "properties": { - "gkeClusters": { - "description": "The list of Google Kubernetes Engine clusters that can see this zone.", - "items": { - "$ref": "ManagedZonePrivateVisibilityConfigGKECluster" - }, - "type": "array" - }, - "kind": { - "default": "dns#managedZonePrivateVisibilityConfig", - "type": "string" - }, - "networks": { - "description": "The list of VPC networks that can see this zone.", - "items": { - "$ref": "ManagedZonePrivateVisibilityConfigNetwork" - }, - "type": "array" - } - }, - "type": "object" - }, - "ManagedZonePrivateVisibilityConfigGKECluster": { - "id": "ManagedZonePrivateVisibilityConfigGKECluster", - "properties": { - "gkeClusterName": { - "description": "The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", - "type": "string" - }, - "kind": { - "default": "dns#managedZonePrivateVisibilityConfigGKECluster", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZonePrivateVisibilityConfigNetwork": { - "id": "ManagedZonePrivateVisibilityConfigNetwork", - "properties": { - "kind": { - "default": "dns#managedZonePrivateVisibilityConfigNetwork", - "type": "string" - }, - "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneReverseLookupConfig": { - "id": "ManagedZoneReverseLookupConfig", - "properties": { - "kind": { - "default": "dns#managedZoneReverseLookupConfig", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZoneServiceDirectoryConfig": { - "description": "Contains information about Service Directory-backed zones.", - "id": "ManagedZoneServiceDirectoryConfig", - "properties": { - "kind": { - "default": "dns#managedZoneServiceDirectoryConfig", - "type": "string" - }, - "namespace": { - "$ref": "ManagedZoneServiceDirectoryConfigNamespace", - "description": "Contains information about the namespace associated with the zone." - } - }, - "type": "object" - }, - "ManagedZoneServiceDirectoryConfigNamespace": { - "id": "ManagedZoneServiceDirectoryConfigNamespace", - "properties": { - "deletionTime": { - "description": "The time that the namespace backing this zone was deleted; an empty string if it still exists. This is in RFC3339 text format. Output only.", - "type": "string" - }, - "kind": { - "default": "dns#managedZoneServiceDirectoryConfigNamespace", - "type": "string" - }, - "namespaceUrl": { - "description": "The fully qualified URL of the namespace associated with the zone. Format must be `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}`", - "type": "string" - } - }, - "type": "object" - }, - "ManagedZonesListResponse": { - "id": "ManagedZonesListResponse", - "properties": { - "kind": { - "default": "dns#managedZonesListResponse", - "description": "Type of resource.", - "type": "string" - }, - "managedZones": { - "description": "The managed zone resources.", - "items": { - "$ref": "ManagedZone" - }, - "type": "array" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - } - }, - "type": "object" - }, - "Operation": { - "description": "An operation represents a successful mutation performed on a Cloud DNS resource. Operations provide: - An audit log of server resource mutations. - A way to recover/retry API calls in the case where the response is never received by the caller. Use the caller specified client_operation_id.", - "id": "Operation", - "properties": { - "dnsKeyContext": { - "$ref": "OperationDnsKeyContext", - "description": "Only populated if the operation targeted a DnsKey (output only)." - }, - "id": { - "description": "Unique identifier for the resource. This is the client_operation_id if the client specified it when the mutation was initiated, otherwise, it is generated by the server. The name must be 1-63 characters long and match the regular expression [-a-z0-9]? (output only)", - "type": "string" - }, - "kind": { - "default": "dns#operation", - "type": "string" - }, - "startTime": { - "description": "The time that this operation was started by the server. This is in RFC3339 text format (output only).", - "type": "string" - }, - "status": { - "description": "Status of the operation. Can be one of the following: \"PENDING\" or \"DONE\" (output only). A status of \"DONE\" means that the request to update the authoritative servers has been sent, but the servers might not be updated yet.", - "enum": [ - "pending", - "done" - ], - "enumDescriptions": [ - "", - "" - ], - "type": "string" - }, - "type": { - "description": "Type of the operation. Operations include insert, update, and delete (output only).", - "type": "string" - }, - "user": { - "description": "User who requested the operation, for example: user@example.com. cloud-dns-system for operations automatically done by the system. (output only)", - "type": "string" - }, - "zoneContext": { - "$ref": "OperationManagedZoneContext", - "description": "Only populated if the operation targeted a ManagedZone (output only)." - } - }, - "type": "object" - }, - "OperationDnsKeyContext": { - "id": "OperationDnsKeyContext", - "properties": { - "newValue": { - "$ref": "DnsKey", - "description": "The post-operation DnsKey resource." - }, - "oldValue": { - "$ref": "DnsKey", - "description": "The pre-operation DnsKey resource." - } - }, - "type": "object" - }, - "OperationManagedZoneContext": { - "id": "OperationManagedZoneContext", - "properties": { - "newValue": { - "$ref": "ManagedZone", - "description": "The post-operation ManagedZone resource." - }, - "oldValue": { - "$ref": "ManagedZone", - "description": "The pre-operation ManagedZone resource." - } - }, - "type": "object" - }, - "PoliciesListResponse": { - "id": "PoliciesListResponse", - "properties": { - "kind": { - "default": "dns#policiesListResponse", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - }, - "policies": { - "description": "The policy resources.", - "items": { - "$ref": "Policy" - }, - "type": "array" - } - }, - "type": "object" - }, - "PoliciesPatchResponse": { - "id": "PoliciesPatchResponse", - "properties": { - "policy": { - "$ref": "Policy" - } - }, - "type": "object" - }, - "PoliciesUpdateResponse": { - "id": "PoliciesUpdateResponse", - "properties": { - "policy": { - "$ref": "Policy" - } - }, - "type": "object" - }, - "Policy": { - "description": "A policy is a collection of DNS rules applied to one or more Virtual Private Cloud resources.", - "id": "Policy", - "properties": { - "alternativeNameServerConfig": { - "$ref": "PolicyAlternativeNameServerConfig", - "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified." - }, - "description": { - "description": "A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the policy's function.", - "type": "string" - }, - "dns64Config": { - "$ref": "PolicyDns64Config", - "description": "Configurations related to DNS64 for this policy." - }, - "enableInboundForwarding": { - "description": "Allows networks bound to this policy to receive DNS queries sent by VMs or applications over VPN connections. When enabled, a virtual IP address is allocated from each of the subnetworks that are bound to this policy.", - "type": "boolean" - }, - "enableLogging": { - "description": "Controls whether logging is enabled for the networks bound to this policy. Defaults to no logging if not set.", - "type": "boolean" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "format": "uint64", - "type": "string" - }, - "kind": { - "default": "dns#policy", - "type": "string" - }, - "name": { - "description": "User-assigned name for this policy.", - "type": "string" - }, - "networks": { - "description": "List of network names specifying networks to which this policy is applied.", - "items": { - "$ref": "PolicyNetwork" - }, - "type": "array" - } - }, - "type": "object" - }, - "PolicyAlternativeNameServerConfig": { - "id": "PolicyAlternativeNameServerConfig", - "properties": { - "kind": { - "default": "dns#policyAlternativeNameServerConfig", - "type": "string" - }, - "targetNameServers": { - "description": "Sets an alternative name server for the associated networks. When specified, all DNS queries are forwarded to a name server that you choose. Names such as .internal are not available when an alternative name server is specified.", - "items": { - "$ref": "PolicyAlternativeNameServerConfigTargetNameServer" - }, - "type": "array" - } - }, - "type": "object" - }, - "PolicyAlternativeNameServerConfigTargetNameServer": { - "id": "PolicyAlternativeNameServerConfigTargetNameServer", - "properties": { - "forwardingPath": { - "description": "Forwarding path for this TargetNameServer. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target.", - "enum": [ - "default", - "private" - ], - "enumDescriptions": [ - "Cloud DNS makes forwarding decision based on IP address ranges; that is, RFC1918 addresses forward to the target through the VPC and non-RFC1918 addresses forward to the target through the internet", - "Cloud DNS always forwards to this target through the VPC." - ], - "type": "string" - }, - "ipv4Address": { - "description": "IPv4 address to forward queries to.", - "type": "string" - }, - "ipv6Address": { - "description": "IPv6 address to forward to. Does not accept both fields (ipv4 \u0026 ipv6) being populated. Public preview as of November 2022.", - "type": "string" - }, - "kind": { - "default": "dns#policyAlternativeNameServerConfigTargetNameServer", - "type": "string" - } - }, - "type": "object" - }, - "PolicyDns64Config": { - "description": "DNS64 policies", - "id": "PolicyDns64Config", - "properties": { - "kind": { - "default": "dns#policyDns64Config", - "type": "string" - }, - "scope": { - "$ref": "PolicyDns64ConfigScope", - "description": "The scope to which DNS64 config will be applied to." - } - }, - "type": "object" - }, - "PolicyDns64ConfigScope": { - "id": "PolicyDns64ConfigScope", - "properties": { - "allQueries": { - "description": "Controls whether DNS64 is enabled globally for all networks bound to the policy.", - "type": "boolean" - }, - "kind": { - "default": "dns#policyDns64ConfigScope", - "type": "string" - } - }, - "type": "object" - }, - "PolicyNetwork": { - "id": "PolicyNetwork", - "properties": { - "kind": { - "default": "dns#policyNetwork", - "type": "string" - }, - "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}", - "type": "string" - } - }, - "type": "object" - }, - "Project": { - "description": "A project resource. The project is a top level container for resources including Cloud DNS ManagedZones. Projects can be created only in the APIs console.", - "id": "Project", - "properties": { - "id": { - "description": "User assigned unique identifier for the resource (output only).", - "type": "string" - }, - "kind": { - "default": "dns#project", - "type": "string" - }, - "number": { - "description": "Unique numeric identifier for the resource; defined by the server (output only).", - "format": "uint64", - "type": "string" - }, - "quota": { - "$ref": "Quota", - "description": "Quotas assigned to this project (output only)." - } - }, - "type": "object" - }, - "Quota": { - "description": "Limits associated with a Project.", - "id": "Quota", - "properties": { - "dnsKeysPerManagedZone": { - "description": "Maximum allowed number of DnsKeys per ManagedZone.", - "format": "int32", - "type": "integer" - }, - "gkeClustersPerManagedZone": { - "description": "Maximum allowed number of GKE clusters to which a privately scoped zone can be attached.", - "format": "int32", - "type": "integer" - }, - "gkeClustersPerPolicy": { - "description": "Maximum allowed number of GKE clusters per policy.", - "format": "int32", - "type": "integer" - }, - "gkeClustersPerResponsePolicy": { - "description": "Maximum allowed number of GKE clusters per response policy.", - "format": "int32", - "type": "integer" - }, - "internetHealthChecksPerManagedZone": { - "format": "int32", - "type": "integer" - }, - "itemsPerRoutingPolicy": { - "description": "Maximum allowed number of items per routing policy.", - "format": "int32", - "type": "integer" - }, - "kind": { - "default": "dns#quota", - "type": "string" - }, - "managedZones": { - "description": "Maximum allowed number of managed zones in the project.", - "format": "int32", - "type": "integer" - }, - "managedZonesPerGkeCluster": { - "description": "Maximum allowed number of managed zones which can be attached to a GKE cluster.", - "format": "int32", - "type": "integer" - }, - "managedZonesPerNetwork": { - "description": "Maximum allowed number of managed zones which can be attached to a network.", - "format": "int32", - "type": "integer" - }, - "nameserversPerDelegation": { - "description": "Maximum number of nameservers per delegation, meant to prevent abuse", - "format": "int32", - "type": "integer" - }, - "networksPerManagedZone": { - "description": "Maximum allowed number of networks to which a privately scoped zone can be attached.", - "format": "int32", - "type": "integer" - }, - "networksPerPolicy": { - "description": "Maximum allowed number of networks per policy.", - "format": "int32", - "type": "integer" - }, - "networksPerResponsePolicy": { - "description": "Maximum allowed number of networks per response policy.", - "format": "int32", - "type": "integer" - }, - "peeringZonesPerTargetNetwork": { - "description": "Maximum allowed number of consumer peering zones per target network owned by this producer project", - "format": "int32", - "type": "integer" - }, - "policies": { - "description": "Maximum allowed number of policies per project.", - "format": "int32", - "type": "integer" - }, - "resourceRecordsPerRrset": { - "description": "Maximum allowed number of ResourceRecords per ResourceRecordSet.", - "format": "int32", - "type": "integer" - }, - "responsePolicies": { - "description": "Maximum allowed number of response policies per project.", - "format": "int32", - "type": "integer" - }, - "responsePolicyRulesPerResponsePolicy": { - "description": "Maximum allowed number of rules per response policy.", - "format": "int32", - "type": "integer" - }, - "rrsetAdditionsPerChange": { - "description": "Maximum allowed number of ResourceRecordSets to add per ChangesCreateRequest.", - "format": "int32", - "type": "integer" - }, - "rrsetDeletionsPerChange": { - "description": "Maximum allowed number of ResourceRecordSets to delete per ChangesCreateRequest.", - "format": "int32", - "type": "integer" - }, - "rrsetsPerManagedZone": { - "description": "Maximum allowed number of ResourceRecordSets per zone in the project.", - "format": "int32", - "type": "integer" - }, - "targetNameServersPerManagedZone": { - "description": "Maximum allowed number of target name servers per managed forwarding zone.", - "format": "int32", - "type": "integer" - }, - "targetNameServersPerPolicy": { - "description": "Maximum allowed number of alternative target name servers per policy.", - "format": "int32", - "type": "integer" - }, - "totalRrdataSizePerChange": { - "description": "Maximum allowed size for total rrdata in one ChangesCreateRequest in bytes.", - "format": "int32", - "type": "integer" - }, - "whitelistedKeySpecs": { - "description": "DNSSEC algorithm and key length types that can be used for DnsKeys.", - "items": { - "$ref": "DnsKeySpec" - }, - "type": "array" - } - }, - "type": "object" - }, - "RRSetRoutingPolicy": { - "description": "A RRSetRoutingPolicy represents ResourceRecordSet data that is returned dynamically with the response varying based on configured properties such as geolocation or by weighted random selection.", - "id": "RRSetRoutingPolicy", - "properties": { - "geo": { - "$ref": "RRSetRoutingPolicyGeoPolicy" - }, - "healthCheck": { - "description": "The fully qualified URL of the HealthCheck to use for this RRSetRoutingPolicy. Format this URL like `https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks/{healthCheck}`. https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks", - "type": "string" - }, - "kind": { - "default": "dns#rRSetRoutingPolicy", - "type": "string" - }, - "primaryBackup": { - "$ref": "RRSetRoutingPolicyPrimaryBackupPolicy" - }, - "wrr": { - "$ref": "RRSetRoutingPolicyWrrPolicy" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyGeoPolicy": { - "description": "Configures a `RRSetRoutingPolicy` that routes based on the geo location of the querying user.", - "id": "RRSetRoutingPolicyGeoPolicy", - "properties": { - "enableFencing": { - "description": "Without fencing, if health check fails for all configured items in the current geo bucket, we failover to the next nearest geo bucket. With fencing, if health checking is enabled, as long as some targets in the current geo bucket are healthy, we return only the healthy targets. However, if all targets are unhealthy, we don't failover to the next nearest bucket; instead, we return all the items in the current bucket even when all targets are unhealthy.", - "type": "boolean" - }, - "items": { - "description": "The primary geo routing configuration. If there are multiple items with the same location, an error is returned instead.", - "items": { - "$ref": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem" - }, - "type": "array" - }, - "kind": { - "default": "dns#rRSetRoutingPolicyGeoPolicy", - "type": "string" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyGeoPolicyGeoPolicyItem": { - "description": "ResourceRecordSet data for one geo location.", - "id": "RRSetRoutingPolicyGeoPolicyGeoPolicyItem", - "properties": { - "healthCheckedTargets": { - "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "For A and AAAA types only. Endpoints to return in the query result only if they are healthy. These can be specified along with `rrdata` within this item." - }, - "kind": { - "default": "dns#rRSetRoutingPolicyGeoPolicyGeoPolicyItem", - "type": "string" - }, - "location": { - "description": "The geo-location granularity is a GCP region. This location string should correspond to a GCP region. e.g. \"us-east1\", \"southamerica-east1\", \"asia-east1\", etc.", - "type": "string" - }, - "rrdatas": { - "items": { - "type": "string" - }, - "type": "array" - }, - "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the `rrdata` within this item. When using health-checked targets for DNSSEC-enabled zones, you can only use at most one health-checked IP address per item.", - "items": { - "type": "string" - }, - "type": "array" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyHealthCheckTargets": { - "description": "HealthCheckTargets describes endpoints to health-check when responding to Routing Policy queries. Only the healthy endpoints will be included in the response. Set either `internal_load_balancer` or `external_endpoints`. Do not set both.", - "id": "RRSetRoutingPolicyHealthCheckTargets", - "properties": { - "externalEndpoints": { - "description": "The Internet IP addresses to be health checked. The format matches the format of ResourceRecordSet.rrdata as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1)", - "items": { - "type": "string" - }, - "type": "array" - }, - "internalLoadBalancers": { - "description": "Configuration for internal load balancers to be health checked.", - "items": { - "$ref": "RRSetRoutingPolicyLoadBalancerTarget" - }, - "type": "array" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyLoadBalancerTarget": { - "description": "The configuration for an individual load balancer to health check.", - "id": "RRSetRoutingPolicyLoadBalancerTarget", - "properties": { - "ipAddress": { - "description": "The frontend IP address of the load balancer to health check.", - "type": "string" - }, - "ipProtocol": { - "description": "The protocol of the load balancer to health check.", - "enum": [ - "undefined", - "tcp", - "udp" - ], - "enumDescriptions": [ - "", - "Indicates the load balancer is accessible via TCP.", - "Indicates the load balancer is accessible via UDP." - ], - "type": "string" - }, - "kind": { - "default": "dns#rRSetRoutingPolicyLoadBalancerTarget", - "type": "string" - }, - "loadBalancerType": { - "description": "The type of load balancer specified by this target. This value must match the configuration of the load balancer located at the LoadBalancerTarget's IP address, port, and region. Use the following: - *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - *regionalL7ilb*: for a regional internal Application Load Balancer. - *globalL7ilb*: for a global internal Application Load Balancer. ", - "enum": [ - "none", - "globalL7ilb", - "regionalL4ilb", - "regionalL7ilb" - ], - "enumDescriptions": [ - "", - "Indicates the load balancer is a Cross-Region Application Load Balancer.", - "Indicates the load balancer is a Regional Network Passthrough Load Balancer.", - "Indicates the load balancer is a Regional Application Load Balancer." - ], - "type": "string" - }, - "networkUrl": { - "description": "The fully qualified URL of the network that the load balancer is attached to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`.", - "type": "string" - }, - "port": { - "description": "The configured port of the load balancer.", - "type": "string" - }, - "project": { - "description": "The project ID in which the load balancer is located.", - "type": "string" - }, - "region": { - "description": "The region in which the load balancer is located.", - "type": "string" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyPrimaryBackupPolicy": { - "description": "Configures a RRSetRoutingPolicy such that all queries are responded with the primary_targets if they are healthy. And if all of them are unhealthy, then we fallback to a geo localized policy.", - "id": "RRSetRoutingPolicyPrimaryBackupPolicy", - "properties": { - "backupGeoTargets": { - "$ref": "RRSetRoutingPolicyGeoPolicy", - "description": "Backup targets provide a regional failover policy for the otherwise global primary targets. If serving state is set to `BACKUP`, this policy essentially becomes a geo routing policy." - }, - "kind": { - "default": "dns#rRSetRoutingPolicyPrimaryBackupPolicy", - "type": "string" - }, - "primaryTargets": { - "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. Unhealthy endpoints are omitted from the results. If all endpoints are unhealthy, we serve a response based on the `backup_geo_targets`." - }, - "trickleTraffic": { - "description": "When serving state is `PRIMARY`, this field provides the option of sending a small percentage of the traffic to the backup targets.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyWrrPolicy": { - "description": "Configures a RRSetRoutingPolicy that routes in a weighted round robin fashion.", - "id": "RRSetRoutingPolicyWrrPolicy", - "properties": { - "items": { - "items": { - "$ref": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem" - }, - "type": "array" - }, - "kind": { - "default": "dns#rRSetRoutingPolicyWrrPolicy", - "type": "string" - } - }, - "type": "object" - }, - "RRSetRoutingPolicyWrrPolicyWrrPolicyItem": { - "description": "A routing block which contains the routing information for one WRR item.", - "id": "RRSetRoutingPolicyWrrPolicyWrrPolicyItem", - "properties": { - "healthCheckedTargets": { - "$ref": "RRSetRoutingPolicyHealthCheckTargets", - "description": "Endpoints that are health checked before making the routing decision. The unhealthy endpoints are omitted from the result. If all endpoints within a bucket are unhealthy, we choose a different bucket (sampled with respect to its weight) for responding. If DNSSEC is enabled for this zone, only one of `rrdata` or `health_checked_targets` can be set." - }, - "kind": { - "default": "dns#rRSetRoutingPolicyWrrPolicyWrrPolicyItem", - "type": "string" - }, - "rrdatas": { - "items": { - "type": "string" - }, - "type": "array" - }, - "signatureRrdatas": { - "description": "DNSSEC generated signatures for all the `rrdata` within this item. When using health-checked targets for DNSSEC-enabled zones, you can only use at most one health-checked IP address per item.", - "items": { - "type": "string" - }, - "type": "array" - }, - "weight": { - "description": "The weight corresponding to this `WrrPolicyItem` object. When multiple `WrrPolicyItem` objects are configured, the probability of returning an `WrrPolicyItem` object's data is proportional to its weight relative to the sum of weights configured for all items. This weight must be non-negative.", - "format": "double", - "type": "number" - } - }, - "type": "object" - }, - "ResourceRecordSet": { - "description": "A unit of data that is returned by the DNS servers.", - "id": "ResourceRecordSet", - "properties": { - "kind": { - "default": "dns#resourceRecordSet", - "type": "string" - }, - "name": { - "description": "For example, www.example.com.", - "type": "string" - }, - "routingPolicy": { - "$ref": "RRSetRoutingPolicy", - "description": "Configures dynamic query responses based on either the geo location of the querying user or a weighted round robin based routing policy. A valid `ResourceRecordSet` contains only `rrdata` (for static resolution) or a `routing_policy` (for dynamic resolution)." - }, - "rrdatas": { - "description": "As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- see examples.", - "items": { - "type": "string" - }, - "type": "array" - }, - "signatureRrdatas": { - "description": "As defined in RFC 4034 (section 3.2).", - "items": { - "type": "string" - }, - "type": "array" - }, - "ttl": { - "description": "Number of seconds that this `ResourceRecordSet` can be cached by resolvers.", - "format": "int32", - "type": "integer" - }, - "type": { - "description": "The identifier of a supported record type. See the list of Supported DNS record types.", - "type": "string" - } - }, - "type": "object" - }, - "ResourceRecordSetsDeleteResponse": { - "id": "ResourceRecordSetsDeleteResponse", - "properties": {}, - "type": "object" - }, - "ResourceRecordSetsListResponse": { - "id": "ResourceRecordSetsListResponse", - "properties": { - "kind": { - "default": "dns#resourceRecordSetsListResponse", - "description": "Type of resource.", - "type": "string" - }, - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - }, - "rrsets": { - "description": "The resource record set resources.", - "items": { - "$ref": "ResourceRecordSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResponsePoliciesListResponse": { - "id": "ResponsePoliciesListResponse", - "properties": { - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - }, - "responsePolicies": { - "description": "The Response Policy resources.", - "items": { - "$ref": "ResponsePolicy" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResponsePoliciesPatchResponse": { - "id": "ResponsePoliciesPatchResponse", - "properties": { - "responsePolicy": { - "$ref": "ResponsePolicy" - } - }, - "type": "object" - }, - "ResponsePoliciesUpdateResponse": { - "id": "ResponsePoliciesUpdateResponse", - "properties": { - "responsePolicy": { - "$ref": "ResponsePolicy" - } - }, - "type": "object" - }, - "ResponsePolicy": { - "description": "A Response Policy is a collection of selectors that apply to queries made against one or more Virtual Private Cloud networks.", - "id": "ResponsePolicy", - "properties": { - "description": { - "description": "User-provided description for this Response Policy.", - "type": "string" - }, - "gkeClusters": { - "description": "The list of Google Kubernetes Engine clusters to which this response policy is applied.", - "items": { - "$ref": "ResponsePolicyGKECluster" - }, - "type": "array" - }, - "id": { - "description": "Unique identifier for the resource; defined by the server (output only).", - "format": "int64", - "type": "string" - }, - "kind": { - "default": "dns#responsePolicy", - "type": "string" - }, - "labels": { - "additionalProperties": { - "type": "string" - }, - "description": "User labels.", - "type": "object" - }, - "networks": { - "description": "List of network names specifying networks to which this policy is applied.", - "items": { - "$ref": "ResponsePolicyNetwork" - }, - "type": "array" - }, - "responsePolicyName": { - "description": "User assigned name for this Response Policy.", - "type": "string" - } - }, - "type": "object" - }, - "ResponsePolicyGKECluster": { - "id": "ResponsePolicyGKECluster", - "properties": { - "gkeClusterName": { - "description": "The resource name of the cluster to bind this response policy to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get", - "type": "string" - }, - "kind": { - "default": "dns#responsePolicyGKECluster", - "type": "string" - } - }, - "type": "object" - }, - "ResponsePolicyNetwork": { - "id": "ResponsePolicyNetwork", - "properties": { - "kind": { - "default": "dns#responsePolicyNetwork", - "type": "string" - }, - "networkUrl": { - "description": "The fully qualified URL of the VPC network to bind to. This should be formatted like `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}`", - "type": "string" - } - }, - "type": "object" - }, - "ResponsePolicyRule": { - "description": "A Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dns_name field with the longest matching suffix.", - "id": "ResponsePolicyRule", - "properties": { - "behavior": { - "description": "Answer this query with a behavior rather than DNS data.", - "enum": [ - "behaviorUnspecified", - "bypassResponsePolicy" - ], - "enumDescriptions": [ - "", - "Skip a less-specific Response Policy Rule and let the query logic continue. This mechanism, when used with wildcard selectors, lets you exempt specific subdomains from a broader Response Policy Rule and direct the queries to the public internet instead. For example, if the following rules exist: ``` *.example.com -\u003e LocalData 1.2.3.4 foo.example.com -\u003e Behavior 'passthrough' ``` A query for foo.example.com skips the wildcard rule. This functionality also facilitates allowlisting. Response Policy Zones (RPZs) can be applied at multiple levels within the hierarchy: for example, an organization, a folder, a project, or a VPC network. If an RPZ rule is applied at a higher level, adding a `passthrough` rule at a lower level will override it. Queries from affected virtual machines (VMs) to that domain bypass the RPZ and proceed with normal resolution." - ], - "type": "string" - }, - "dnsName": { - "description": "The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.", - "type": "string" - }, - "kind": { - "default": "dns#responsePolicyRule", - "type": "string" - }, - "localData": { - "$ref": "ResponsePolicyRuleLocalData", - "description": "Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed." - }, - "ruleName": { - "description": "An identifier for this rule. Must be unique with the ResponsePolicy.", - "type": "string" - } - }, - "type": "object" - }, - "ResponsePolicyRuleLocalData": { - "id": "ResponsePolicyRuleLocalData", - "properties": { - "localDatas": { - "description": "All resource record sets for this selector, one per resource record type. The name must match the dns_name.", - "items": { - "$ref": "ResourceRecordSet" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResponsePolicyRulesListResponse": { - "id": "ResponsePolicyRulesListResponse", - "properties": { - "nextPageToken": { - "description": "This field indicates that more results are available beyond the last page displayed. To fetch the results, make another list request and use this value as your page token. This lets you retrieve the complete contents of a very large collection one page at a time. However, if the contents of the collection change between the first and last paginated list request, the set of all elements returned are an inconsistent view of the collection. You can't retrieve a consistent snapshot of a collection larger than the maximum page size.", - "type": "string" - }, - "responsePolicyRules": { - "description": "The Response Policy Rule resources.", - "items": { - "$ref": "ResponsePolicyRule" - }, - "type": "array" - } - }, - "type": "object" - }, - "ResponsePolicyRulesPatchResponse": { - "id": "ResponsePolicyRulesPatchResponse", - "properties": { - "responsePolicyRule": { - "$ref": "ResponsePolicyRule" - } - }, - "type": "object" - }, - "ResponsePolicyRulesUpdateResponse": { - "id": "ResponsePolicyRulesUpdateResponse", - "properties": { - "responsePolicyRule": { - "$ref": "ResponsePolicyRule" - } - }, - "type": "object" - } - }, - "servicePath": "", - "title": "Cloud DNS API", - "version": "v1" -} \ No newline at end of file diff --git a/vendor/google.golang.org/api/dns/v1/dns-gen.go b/vendor/google.golang.org/api/dns/v1/dns-gen.go deleted file mode 100644 index b3cb254fda..0000000000 --- a/vendor/google.golang.org/api/dns/v1/dns-gen.go +++ /dev/null @@ -1,7627 +0,0 @@ -// Copyright 2025 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Code generated file. DO NOT EDIT. - -// Package dns provides access to the Cloud DNS API. -// -// For product documentation, see: https://cloud.google.com/dns/docs -// -// # Library status -// -// These client libraries are officially supported by Google. However, this -// library is considered complete and is in maintenance mode. This means -// that we will address critical bugs and security issues but will not add -// any new features. -// -// When possible, we recommend using our newer -// [Cloud Client Libraries for Go](https://pkg.go.dev/cloud.google.com/go) -// that are still actively being worked and iterated on. -// -// # Creating a client -// -// Usage example: -// -// import "google.golang.org/api/dns/v1" -// ... -// ctx := context.Background() -// dnsService, err := dns.NewService(ctx) -// -// In this example, Google Application Default Credentials are used for -// authentication. For information on how to create and obtain Application -// Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials. -// -// # Other authentication options -// -// By default, all available scopes (see "Constants") are used to authenticate. -// To restrict scopes, use [google.golang.org/api/option.WithScopes]: -// -// dnsService, err := dns.NewService(ctx, option.WithScopes(dns.NdevClouddnsReadwriteScope)) -// -// To use an API key for authentication (note: some APIs do not support API -// keys), use [google.golang.org/api/option.WithAPIKey]: -// -// dnsService, err := dns.NewService(ctx, option.WithAPIKey("AIza...")) -// -// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth -// flow, use [google.golang.org/api/option.WithTokenSource]: -// -// config := &oauth2.Config{...} -// // ... -// token, err := config.Exchange(ctx, ...) -// dnsService, err := dns.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token))) -// -// See [google.golang.org/api/option.ClientOption] for details on options. -package dns // import "google.golang.org/api/dns/v1" - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "io" - "log/slog" - "net/http" - "net/url" - "strconv" - "strings" - - "github.com/googleapis/gax-go/v2/internallog" - googleapi "google.golang.org/api/googleapi" - internal "google.golang.org/api/internal" - gensupport "google.golang.org/api/internal/gensupport" - option "google.golang.org/api/option" - internaloption "google.golang.org/api/option/internaloption" - htransport "google.golang.org/api/transport/http" -) - -// Always reference these packages, just in case the auto-generated code -// below doesn't. -var _ = bytes.NewBuffer -var _ = strconv.Itoa -var _ = fmt.Sprintf -var _ = json.NewDecoder -var _ = io.Copy -var _ = url.Parse -var _ = gensupport.MarshalJSON -var _ = googleapi.Version -var _ = errors.New -var _ = strings.Replace -var _ = context.Canceled -var _ = internaloption.WithDefaultEndpoint -var _ = internal.Version -var _ = internallog.New - -const apiId = "dns:v1" -const apiName = "dns" -const apiVersion = "v1" -const basePath = "https://dns.googleapis.com/" -const basePathTemplate = "https://dns.UNIVERSE_DOMAIN/" -const mtlsBasePath = "https://dns.mtls.googleapis.com/" - -// OAuth2 scopes used by this API. -const ( - // See, edit, configure, and delete your Google Cloud data and see the email - // address for your Google Account. - CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" - - // View your data across Google Cloud services and see the email address of - // your Google Account - CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/cloud-platform.read-only" - - // View your DNS records hosted by Google Cloud DNS - NdevClouddnsReadonlyScope = "https://www.googleapis.com/auth/ndev.clouddns.readonly" - - // View and manage your DNS records hosted by Google Cloud DNS - NdevClouddnsReadwriteScope = "https://www.googleapis.com/auth/ndev.clouddns.readwrite" -) - -// NewService creates a new Service. -func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) { - scopesOption := internaloption.WithDefaultScopes( - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/cloud-platform.read-only", - "https://www.googleapis.com/auth/ndev.clouddns.readonly", - "https://www.googleapis.com/auth/ndev.clouddns.readwrite", - ) - // NOTE: prepend, so we don't override user-specified scopes. - opts = append([]option.ClientOption{scopesOption}, opts...) - opts = append(opts, internaloption.WithDefaultEndpoint(basePath)) - opts = append(opts, internaloption.WithDefaultEndpointTemplate(basePathTemplate)) - opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath)) - opts = append(opts, internaloption.EnableNewAuthLibrary()) - client, endpoint, err := htransport.NewClient(ctx, opts...) - if err != nil { - return nil, err - } - s := &Service{client: client, BasePath: basePath, logger: internaloption.GetLogger(opts)} - s.Changes = NewChangesService(s) - s.DnsKeys = NewDnsKeysService(s) - s.ManagedZoneOperations = NewManagedZoneOperationsService(s) - s.ManagedZones = NewManagedZonesService(s) - s.Policies = NewPoliciesService(s) - s.Projects = NewProjectsService(s) - s.ResourceRecordSets = NewResourceRecordSetsService(s) - s.ResponsePolicies = NewResponsePoliciesService(s) - s.ResponsePolicyRules = NewResponsePolicyRulesService(s) - if endpoint != "" { - s.BasePath = endpoint - } - return s, nil -} - -// New creates a new Service. It uses the provided http.Client for requests. -// -// Deprecated: please use NewService instead. -// To provide a custom HTTP client, use option.WithHTTPClient. -// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead. -func New(client *http.Client) (*Service, error) { - if client == nil { - return nil, errors.New("client is nil") - } - return NewService(context.TODO(), option.WithHTTPClient(client)) -} - -type Service struct { - client *http.Client - logger *slog.Logger - BasePath string // API endpoint base URL - UserAgent string // optional additional User-Agent fragment - - Changes *ChangesService - - DnsKeys *DnsKeysService - - ManagedZoneOperations *ManagedZoneOperationsService - - ManagedZones *ManagedZonesService - - Policies *PoliciesService - - Projects *ProjectsService - - ResourceRecordSets *ResourceRecordSetsService - - ResponsePolicies *ResponsePoliciesService - - ResponsePolicyRules *ResponsePolicyRulesService -} - -func (s *Service) userAgent() string { - if s.UserAgent == "" { - return googleapi.UserAgent - } - return googleapi.UserAgent + " " + s.UserAgent -} - -func NewChangesService(s *Service) *ChangesService { - rs := &ChangesService{s: s} - return rs -} - -type ChangesService struct { - s *Service -} - -func NewDnsKeysService(s *Service) *DnsKeysService { - rs := &DnsKeysService{s: s} - return rs -} - -type DnsKeysService struct { - s *Service -} - -func NewManagedZoneOperationsService(s *Service) *ManagedZoneOperationsService { - rs := &ManagedZoneOperationsService{s: s} - return rs -} - -type ManagedZoneOperationsService struct { - s *Service -} - -func NewManagedZonesService(s *Service) *ManagedZonesService { - rs := &ManagedZonesService{s: s} - return rs -} - -type ManagedZonesService struct { - s *Service -} - -func NewPoliciesService(s *Service) *PoliciesService { - rs := &PoliciesService{s: s} - return rs -} - -type PoliciesService struct { - s *Service -} - -func NewProjectsService(s *Service) *ProjectsService { - rs := &ProjectsService{s: s} - return rs -} - -type ProjectsService struct { - s *Service -} - -func NewResourceRecordSetsService(s *Service) *ResourceRecordSetsService { - rs := &ResourceRecordSetsService{s: s} - return rs -} - -type ResourceRecordSetsService struct { - s *Service -} - -func NewResponsePoliciesService(s *Service) *ResponsePoliciesService { - rs := &ResponsePoliciesService{s: s} - return rs -} - -type ResponsePoliciesService struct { - s *Service -} - -func NewResponsePolicyRulesService(s *Service) *ResponsePolicyRulesService { - rs := &ResponsePolicyRulesService{s: s} - return rs -} - -type ResponsePolicyRulesService struct { - s *Service -} - -// Change: A Change represents a set of `ResourceRecordSet` additions and -// deletions applied atomically to a ManagedZone. ResourceRecordSets within a -// ManagedZone are modified by creating a new Change element in the Changes -// collection. In turn the Changes collection also records the past -// modifications to the `ResourceRecordSets` in a `ManagedZone`. The current -// state of the `ManagedZone` is the sum effect of applying all `Change` -// elements in the `Changes` collection in sequence. -type Change struct { - // Additions: Which ResourceRecordSets to add? - Additions []*ResourceRecordSet `json:"additions,omitempty"` - // Deletions: Which ResourceRecordSets to remove? Must match existing data - // exactly. - Deletions []*ResourceRecordSet `json:"deletions,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output only). - Id string `json:"id,omitempty"` - // IsServing: If the DNS queries for the zone will be served. - IsServing bool `json:"isServing,omitempty"` - Kind string `json:"kind,omitempty"` - // StartTime: The time that this operation was started by the server (output - // only). This is in RFC3339 text format. - StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation (output only). A status of "done" means that - // the request to update the authoritative servers has been sent, but the - // servers might not be updated yet. - // - // Possible values: - // "pending" - // "done" - Status string `json:"status,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Additions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Additions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Change) MarshalJSON() ([]byte, error) { - type NoMethod Change - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ChangesListResponse: The response to a request to enumerate Changes to a -// ResourceRecordSets collection. -type ChangesListResponse struct { - // Changes: The requested changes. - Changes []*Change `json:"changes,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Changes") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Changes") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ChangesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ChangesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsKey: A DNSSEC key pair. -type DnsKey struct { - // Algorithm: String mnemonic specifying the DNSSEC algorithm of this key. - // Immutable after creation time. - // - // Possible values: - // "rsasha1" - // "rsasha256" - // "rsasha512" - // "ecdsap256sha256" - // "ecdsap384sha384" - Algorithm string `json:"algorithm,omitempty"` - // CreationTime: The time that this resource was created in the control plane. - // This is in RFC3339 text format. Output only. - CreationTime string `json:"creationTime,omitempty"` - // Description: A mutable string of at most 1024 characters associated with - // this resource for the user's convenience. Has no effect on the resource's - // function. - Description string `json:"description,omitempty"` - // Digests: Cryptographic hashes of the DNSKEY resource record associated with - // this DnsKey. These digests are needed to construct a DS record that points - // at this DNS key. Output only. - Digests []*DnsKeyDigest `json:"digests,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output only). - Id string `json:"id,omitempty"` - // IsActive: Active keys are used to sign subsequent changes to the - // ManagedZone. Inactive keys are still present as DNSKEY Resource Records for - // the use of resolvers validating existing signatures. - IsActive bool `json:"isActive,omitempty"` - // KeyLength: Length of the key in bits. Specified at creation time, and then - // immutable. - KeyLength int64 `json:"keyLength,omitempty"` - // KeyTag: The key tag is a non-cryptographic hash of the a DNSKEY resource - // record associated with this DnsKey. The key tag can be used to identify a - // DNSKEY more quickly (but it is not a unique identifier). In particular, the - // key tag is used in a parent zone's DS record to point at the DNSKEY in this - // child ManagedZone. The key tag is a number in the range [0, 65535] and the - // algorithm to calculate it is specified in RFC4034 Appendix B. Output only. - KeyTag int64 `json:"keyTag,omitempty"` - Kind string `json:"kind,omitempty"` - // PublicKey: Base64 encoded public half of this key. Output only. - PublicKey string `json:"publicKey,omitempty"` - // Type: One of "KEY_SIGNING" or "ZONE_SIGNING". Keys of type KEY_SIGNING have - // the Secure Entry Point flag set and, when active, are used to sign only - // resource record sets of type DNSKEY. Otherwise, the Secure Entry Point flag - // is cleared, and this key is used to sign only resource record sets of other - // types. Immutable after creation time. - // - // Possible values: - // "keySigning" - // "zoneSigning" - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Algorithm") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Algorithm") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsKey) MarshalJSON() ([]byte, error) { - type NoMethod DnsKey - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type DnsKeyDigest struct { - // Digest: The base-16 encoded bytes of this digest. Suitable for use in a DS - // resource record. - Digest string `json:"digest,omitempty"` - // Type: Specifies the algorithm used to calculate this digest. - // - // Possible values: - // "sha1" - // "sha256" - // "sha384" - Type string `json:"type,omitempty"` - // ForceSendFields is a list of field names (e.g. "Digest") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Digest") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsKeyDigest) MarshalJSON() ([]byte, error) { - type NoMethod DnsKeyDigest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsKeySpec: Parameters for DnsKey key generation. Used for generating -// initial keys for a new ManagedZone and as default when adding a new DnsKey. -type DnsKeySpec struct { - // Algorithm: String mnemonic specifying the DNSSEC algorithm of this key. - // - // Possible values: - // "rsasha1" - // "rsasha256" - // "rsasha512" - // "ecdsap256sha256" - // "ecdsap384sha384" - Algorithm string `json:"algorithm,omitempty"` - // KeyLength: Length of the keys in bits. - KeyLength int64 `json:"keyLength,omitempty"` - // KeyType: Specifies whether this is a key signing key (KSK) or a zone signing - // key (ZSK). Key signing keys have the Secure Entry Point flag set and, when - // active, are only used to sign resource record sets of type DNSKEY. Zone - // signing keys do not have the Secure Entry Point flag set and are used to - // sign all other types of resource record sets. - // - // Possible values: - // "keySigning" - // "zoneSigning" - KeyType string `json:"keyType,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Algorithm") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Algorithm") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsKeySpec) MarshalJSON() ([]byte, error) { - type NoMethod DnsKeySpec - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// DnsKeysListResponse: The response to a request to enumerate DnsKeys in a -// ManagedZone. -type DnsKeysListResponse struct { - // DnsKeys: The requested resources. - DnsKeys []*DnsKey `json:"dnsKeys,omitempty"` - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DnsKeys") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsKeys") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s DnsKeysListResponse) MarshalJSON() ([]byte, error) { - type NoMethod DnsKeysListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Expr: Represents a textual expression in the Common Expression Language -// (CEL) syntax. CEL is a C-like expression language. The syntax and semantics -// of CEL are documented at https://github.com/google/cel-spec. Example -// (Comparison): title: "Summary size limit" description: "Determines if a -// summary is less than 100 chars" expression: "document.summary.size() < 100" -// Example (Equality): title: "Requestor is owner" description: "Determines if -// requestor is the document owner" expression: "document.owner == -// request.auth.claims.email" Example (Logic): title: "Public documents" -// description: "Determine whether the document should be publicly visible" -// expression: "document.type != 'private' && document.type != 'internal'" -// Example (Data Manipulation): title: "Notification string" description: -// "Create a notification string with a timestamp." expression: "'New message -// received at ' + string(document.create_time)" The exact variables and -// functions that may be referenced within an expression are determined by the -// service that evaluates it. See the service documentation for additional -// information. -type Expr struct { - // Description: Optional. Description of the expression. This is a longer text - // which describes the expression, e.g. when hovered over it in a UI. - Description string `json:"description,omitempty"` - // Expression: Textual representation of an expression in Common Expression - // Language syntax. - Expression string `json:"expression,omitempty"` - // Location: Optional. String indicating the location of the expression for - // error reporting, e.g. a file name and a position in the file. - Location string `json:"location,omitempty"` - // Title: Optional. Title for the expression, i.e. a short string describing - // its purpose. This can be used e.g. in UIs which allow to enter the - // expression. - Title string `json:"title,omitempty"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Expr) MarshalJSON() ([]byte, error) { - type NoMethod Expr - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1AuditConfig: Specifies the audit configuration for a service. The -// configuration determines which permission types are logged, and what -// identities, if any, are exempted from logging. An AuditConfig must have one -// or more AuditLogConfigs. If there are AuditConfigs for both `allServices` -// and a specific service, the union of the two AuditConfigs is used for that -// service: the log_types specified in each AuditConfig are enabled, and the -// exempted_members in each AuditLogConfig are exempted. Example Policy with -// multiple AuditConfigs: { "audit_configs": [ { "service": "allServices", -// "audit_log_configs": [ { "log_type": "DATA_READ", "exempted_members": [ -// "user:jose@example.com" ] }, { "log_type": "DATA_WRITE" }, { "log_type": -// "ADMIN_READ" } ] }, { "service": "sampleservice.googleapis.com", -// "audit_log_configs": [ { "log_type": "DATA_READ" }, { "log_type": -// "DATA_WRITE", "exempted_members": [ "user:aliya@example.com" ] } ] } ] } For -// sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ -// logging. It also exempts `jose@example.com` from DATA_READ logging, and -// `aliya@example.com` from DATA_WRITE logging. -type GoogleIamV1AuditConfig struct { - // AuditLogConfigs: The configuration for logging of each type of permission. - AuditLogConfigs []*GoogleIamV1AuditLogConfig `json:"auditLogConfigs,omitempty"` - // Service: Specifies a service that will be enabled for audit logging. For - // example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` - // is a special value that covers all services. - Service string `json:"service,omitempty"` - // ForceSendFields is a list of field names (e.g. "AuditLogConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditLogConfigs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1AuditConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1AuditLogConfig: Provides the configuration for logging a type of -// permissions. Example: { "audit_log_configs": [ { "log_type": "DATA_READ", -// "exempted_members": [ "user:jose@example.com" ] }, { "log_type": -// "DATA_WRITE" } ] } This enables 'DATA_READ' and 'DATA_WRITE' logging, while -// exempting jose@example.com from DATA_READ logging. -type GoogleIamV1AuditLogConfig struct { - // ExemptedMembers: Specifies the identities that do not cause logging for this - // type of permission. Follows the same format of Binding.members. - ExemptedMembers []string `json:"exemptedMembers,omitempty"` - // LogType: The log type that this config enables. - // - // Possible values: - // "LOG_TYPE_UNSPECIFIED" - Default case. Should never be this. - // "ADMIN_READ" - Admin reads. Example: CloudIAM getIamPolicy - // "DATA_WRITE" - Data writes. Example: CloudSQL Users create - // "DATA_READ" - Data reads. Example: CloudSQL Users list - LogType string `json:"logType,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExemptedMembers") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExemptedMembers") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1AuditLogConfig) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1AuditLogConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1Binding: Associates `members`, or principals, with a `role`. -type GoogleIamV1Binding struct { - // Condition: The condition that is associated with this binding. If the - // condition evaluates to `true`, then this binding applies to the current - // request. If the condition evaluates to `false`, then this binding does not - // apply to the current request. However, a different role binding might grant - // the same role to one or more of the principals in this binding. To learn - // which resources support conditions in their IAM policies, see the IAM - // documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Condition *Expr `json:"condition,omitempty"` - // Members: Specifies the principals requesting access for a Google Cloud - // resource. `members` can have the following values: * `allUsers`: A special - // identifier that represents anyone who is on the internet; with or without a - // Google account. * `allAuthenticatedUsers`: A special identifier that - // represents anyone who is authenticated with a Google account or a service - // account. Does not include identities that come from external identity - // providers (IdPs) through identity federation. * `user:{emailid}`: An email - // address that represents a specific Google account. For example, - // `alice@example.com` . * `serviceAccount:{emailid}`: An email address that - // represents a Google service account. For example, - // `my-other-app@appspot.gserviceaccount.com`. * - // `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An - // identifier for a Kubernetes service account - // (https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). - // For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * - // `group:{emailid}`: An email address that represents a Google group. For - // example, `admins@example.com`. * `domain:{domain}`: The G Suite domain - // (primary) that represents all the users of that domain. For example, - // `google.com` or `example.com`. * - // `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/sub - // ject/{subject_attribute_value}`: A single identity in a workforce identity - // pool. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // group/{group_id}`: All workforce identities in a group. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // attribute.{attribute_name}/{attribute_value}`: All workforce identities with - // a specific attribute value. * - // `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/ - // *`: All identities in a workforce identity pool. * - // `principal://iam.googleapis.com/projects/{project_number}/locations/global/wo - // rkloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single - // identity in a workload identity pool. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool - // group. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value} - // `: All identities in a workload identity pool with a certain attribute. * - // `principalSet://iam.googleapis.com/projects/{project_number}/locations/global - // /workloadIdentityPools/{pool_id}/*`: All identities in a workload identity - // pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a user that has been recently deleted. For - // example, `alice@example.com?uid=123456789012345678901`. If the user is - // recovered, this value reverts to `user:{emailid}` and the recovered user - // retains the role in the binding. * - // `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus - // unique identifier) representing a service account that has been recently - // deleted. For example, - // `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the - // service account is undeleted, this value reverts to - // `serviceAccount:{emailid}` and the undeleted service account retains the - // role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email - // address (plus unique identifier) representing a Google group that has been - // recently deleted. For example, - // `admins@example.com?uid=123456789012345678901`. If the group is recovered, - // this value reverts to `group:{emailid}` and the recovered group retains the - // role in the binding. * - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool - // _id}/subject/{subject_attribute_value}`: Deleted single identity in a - // workforce identity pool. For example, - // `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-po - // ol-id/subject/my-subject-attribute-value`. - Members []string `json:"members,omitempty"` - // Role: Role that is assigned to the list of `members`, or principals. For - // example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview - // of the IAM roles and permissions, see the IAM documentation - // (https://cloud.google.com/iam/docs/roles-overview). For a list of the - // available pre-defined roles, see here - // (https://cloud.google.com/iam/docs/understanding-roles). - Role string `json:"role,omitempty"` - // ForceSendFields is a list of field names (e.g. "Condition") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Condition") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1Binding) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Binding - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1GetIamPolicyRequest: Request message for `GetIamPolicy` method. -type GoogleIamV1GetIamPolicyRequest struct { - // Options: OPTIONAL: A `GetPolicyOptions` object for specifying options to - // `GetIamPolicy`. - Options *GoogleIamV1GetPolicyOptions `json:"options,omitempty"` - // ForceSendFields is a list of field names (e.g. "Options") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Options") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1GetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1GetIamPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1GetPolicyOptions: Encapsulates settings provided to GetIamPolicy. -type GoogleIamV1GetPolicyOptions struct { - // RequestedPolicyVersion: Optional. The maximum policy version that will be - // used to format the policy. Valid values are 0, 1, and 3. Requests specifying - // an invalid value will be rejected. Requests for policies with any - // conditional role bindings must specify version 3. Policies with no - // conditional role bindings may specify any valid value or leave the field - // unset. The policy in the response might use the policy version that you - // specified, or it might use a lower policy version. For example, if you - // specify version 3, but the policy has no conditional role bindings, the - // response uses version 1. To learn which resources support conditions in - // their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"` - // ForceSendFields is a list of field names (e.g. "RequestedPolicyVersion") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "RequestedPolicyVersion") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1GetPolicyOptions) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1GetPolicyOptions - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1Policy: An Identity and Access Management (IAM) policy, which -// specifies access controls for Google Cloud resources. A `Policy` is a -// collection of `bindings`. A `binding` binds one or more `members`, or -// principals, to a single `role`. Principals can be user accounts, service -// accounts, Google groups, and domains (such as G Suite). A `role` is a named -// list of permissions; each `role` can be an IAM predefined role or a -// user-created custom role. For some types of Google Cloud resources, a -// `binding` can also specify a `condition`, which is a logical expression that -// allows access to a resource only if the expression evaluates to `true`. A -// condition can add constraints based on attributes of the request, the -// resource, or both. To learn which resources support conditions in their IAM -// policies, see the IAM documentation -// (https://cloud.google.com/iam/help/conditions/resource-policies). **JSON -// example:** ``` { "bindings": [ { "role": -// "roles/resourcemanager.organizationAdmin", "members": [ -// "user:mike@example.com", "group:admins@example.com", "domain:google.com", -// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": -// "roles/resourcemanager.organizationViewer", "members": [ -// "user:eve@example.com" ], "condition": { "title": "expirable access", -// "description": "Does not grant access after Sep 2020", "expression": -// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": -// "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - -// members: - user:mike@example.com - group:admins@example.com - -// domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com -// role: roles/resourcemanager.organizationAdmin - members: - -// user:eve@example.com role: roles/resourcemanager.organizationViewer -// condition: title: expirable access description: Does not grant access after -// Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') -// etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, -// see the IAM documentation (https://cloud.google.com/iam/docs/). -type GoogleIamV1Policy struct { - // AuditConfigs: Specifies cloud audit logging configuration for this policy. - AuditConfigs []*GoogleIamV1AuditConfig `json:"auditConfigs,omitempty"` - // Bindings: Associates a list of `members`, or principals, with a `role`. - // Optionally, may specify a `condition` that determines how and when the - // `bindings` are applied. Each of the `bindings` must contain at least one - // principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; - // up to 250 of these principals can be Google groups. Each occurrence of a - // principal counts towards these limits. For example, if the `bindings` grant - // 50 different roles to `user:alice@example.com`, and not to any other - // principal, then you can add another 1,450 principals to the `bindings` in - // the `Policy`. - Bindings []*GoogleIamV1Binding `json:"bindings,omitempty"` - // Etag: `etag` is used for optimistic concurrency control as a way to help - // prevent simultaneous updates of a policy from overwriting each other. It is - // strongly suggested that systems make use of the `etag` in the - // read-modify-write cycle to perform policy updates in order to avoid race - // conditions: An `etag` is returned in the response to `getIamPolicy`, and - // systems are expected to put that etag in the request to `setIamPolicy` to - // ensure that their change will be applied to the same version of the policy. - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. - Etag string `json:"etag,omitempty"` - // Version: Specifies the format of the policy. Valid values are `0`, `1`, and - // `3`. Requests that specify an invalid value are rejected. Any operation that - // affects conditional role bindings must specify version `3`. This requirement - // applies to the following operations: * Getting a policy that includes a - // conditional role binding * Adding a conditional role binding to a policy * - // Changing a conditional role binding in a policy * Removing any role binding, - // with or without a condition, from a policy that includes conditions - // **Important:** If you use IAM Conditions, you must include the `etag` field - // whenever you call `setIamPolicy`. If you omit this field, then IAM allows - // you to overwrite a version `3` policy with a version `1` policy, and all of - // the conditions in the version `3` policy are lost. If a policy does not - // include any conditions, operations on that policy may specify any valid - // version or leave the field unset. To learn which resources support - // conditions in their IAM policies, see the IAM documentation - // (https://cloud.google.com/iam/help/conditions/resource-policies). - Version int64 `json:"version,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "AuditConfigs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AuditConfigs") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1Policy) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1SetIamPolicyRequest: Request message for `SetIamPolicy` method. -type GoogleIamV1SetIamPolicyRequest struct { - // Policy: REQUIRED: The complete policy to be applied to the `resource`. The - // size of the policy is limited to a few 10s of KB. An empty policy is a valid - // policy but certain Google Cloud services (such as Projects) might reject - // them. - Policy *GoogleIamV1Policy `json:"policy,omitempty"` - // UpdateMask: OPTIONAL: A FieldMask specifying which fields of the policy to - // modify. Only the fields in the mask will be modified. If no mask is - // provided, the following default mask is used: `paths: "bindings, etag" - UpdateMask string `json:"updateMask,omitempty"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1SetIamPolicyRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1SetIamPolicyRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1TestIamPermissionsRequest: Request message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsRequest struct { - // Permissions: The set of permissions to check for the `resource`. Permissions - // with wildcards (such as `*` or `storage.*`) are not allowed. For more - // information see IAM Overview - // (https://cloud.google.com/iam/docs/overview#permissions). - Permissions []string `json:"permissions,omitempty"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1TestIamPermissionsRequest) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsRequest - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// GoogleIamV1TestIamPermissionsResponse: Response message for -// `TestIamPermissions` method. -type GoogleIamV1TestIamPermissionsResponse struct { - // Permissions: A subset of `TestPermissionsRequest.permissions` that the - // caller is allowed. - Permissions []string `json:"permissions,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Permissions") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Permissions") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s GoogleIamV1TestIamPermissionsResponse) MarshalJSON() ([]byte, error) { - type NoMethod GoogleIamV1TestIamPermissionsResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedZone: A zone is a subtree of the DNS namespace under one -// administrative responsibility. A ManagedZone is a resource that represents a -// DNS zone hosted by the Cloud DNS service. -type ManagedZone struct { - CloudLoggingConfig *ManagedZoneCloudLoggingConfig `json:"cloudLoggingConfig,omitempty"` - // CreationTime: The time that this resource was created on the server. This is - // in RFC3339 text format. Output only. - CreationTime string `json:"creationTime,omitempty"` - // Description: A mutable string of at most 1024 characters associated with - // this resource for the user's convenience. Has no effect on the managed - // zone's function. - Description string `json:"description,omitempty"` - // DnsName: The DNS name of this managed zone, for instance "example.com.". - DnsName string `json:"dnsName,omitempty"` - // DnssecConfig: DNSSEC configuration. - DnssecConfig *ManagedZoneDnsSecConfig `json:"dnssecConfig,omitempty"` - // ForwardingConfig: The presence for this field indicates that outbound - // forwarding is enabled for this zone. The value of this field contains the - // set of destinations to forward to. - ForwardingConfig *ManagedZoneForwardingConfig `json:"forwardingConfig,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output only) - Id uint64 `json:"id,omitempty,string"` - Kind string `json:"kind,omitempty"` - // Labels: User labels. - Labels map[string]string `json:"labels,omitempty"` - // Name: User assigned name for this resource. Must be unique within the - // project. The name must be 1-63 characters long, must begin with a letter, - // end with a letter or digit, and only contain lowercase letters, digits or - // dashes. - Name string `json:"name,omitempty"` - // NameServerSet: Optionally specifies the NameServerSet for this ManagedZone. - // A NameServerSet is a set of DNS name servers that all host the same - // ManagedZones. Most users leave this field unset. If you need to use this - // field, contact your account team. - NameServerSet string `json:"nameServerSet,omitempty"` - // NameServers: Delegate your managed_zone to these virtual name servers; - // defined by the server (output only) - NameServers []string `json:"nameServers,omitempty"` - // PeeringConfig: The presence of this field indicates that DNS Peering is - // enabled for this zone. The value of this field contains the network to peer - // with. - PeeringConfig *ManagedZonePeeringConfig `json:"peeringConfig,omitempty"` - // PrivateVisibilityConfig: For privately visible zones, the set of Virtual - // Private Cloud resources that the zone is visible from. - PrivateVisibilityConfig *ManagedZonePrivateVisibilityConfig `json:"privateVisibilityConfig,omitempty"` - // ReverseLookupConfig: The presence of this field indicates that this is a - // managed reverse lookup zone and Cloud DNS resolves reverse lookup queries - // using automatically configured records for VPC resources. This only applies - // to networks listed under private_visibility_config. - ReverseLookupConfig *ManagedZoneReverseLookupConfig `json:"reverseLookupConfig,omitempty"` - // ServiceDirectoryConfig: This field links to the associated service directory - // namespace. Do not set this field for public zones or forwarding zones. - ServiceDirectoryConfig *ManagedZoneServiceDirectoryConfig `json:"serviceDirectoryConfig,omitempty"` - // Visibility: The zone's visibility: public zones are exposed to the Internet, - // while private zones are visible only to Virtual Private Cloud resources. - // - // Possible values: - // "public" - Indicates that records in this zone can be queried from the - // public internet. - // "private" - Indicates that records in this zone cannot be queried from the - // public internet. Access to private zones depends on the zone configuration. - Visibility string `json:"visibility,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "CloudLoggingConfig") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "CloudLoggingConfig") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZone) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZone - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedZoneCloudLoggingConfig: Cloud Logging configurations for publicly -// visible zones. -type ManagedZoneCloudLoggingConfig struct { - // EnableLogging: If set, enable query logging for this ManagedZone. False by - // default, making logging opt-in. - EnableLogging bool `json:"enableLogging,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableLogging") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableLogging") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneCloudLoggingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneCloudLoggingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneDnsSecConfig struct { - // DefaultKeySpecs: Specifies parameters for generating initial DnsKeys for - // this ManagedZone. Can only be changed while the state is OFF. - DefaultKeySpecs []*DnsKeySpec `json:"defaultKeySpecs,omitempty"` - Kind string `json:"kind,omitempty"` - // NonExistence: Specifies the mechanism for authenticated denial-of-existence - // responses. Can only be changed while the state is OFF. - // - // Possible values: - // "nsec" - Indicates that Cloud DNS will sign records in the managed zone - // according to RFC 4034 and respond with NSEC records for names that do not - // exist. - // "nsec3" - Indicates that Cloud DNS will sign records in the managed zone - // according to RFC 5155 and respond with NSEC3 records for names that do not - // exist. - NonExistence string `json:"nonExistence,omitempty"` - // State: Specifies whether DNSSEC is enabled, and what mode it is in. - // - // Possible values: - // "off" - DNSSEC is disabled; the zone is not signed. - // "on" - DNSSEC is enabled; the zone is signed and fully managed. - // "transfer" - DNSSEC is enabled, but in a "transfer" mode. - State string `json:"state,omitempty"` - // ForceSendFields is a list of field names (e.g. "DefaultKeySpecs") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DefaultKeySpecs") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneDnsSecConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneDnsSecConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneForwardingConfig struct { - Kind string `json:"kind,omitempty"` - // TargetNameServers: List of target name servers to forward to. Cloud DNS - // selects the best available name server if more than one target is given. - TargetNameServers []*ManagedZoneForwardingConfigNameServerTarget `json:"targetNameServers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneForwardingConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneForwardingConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneForwardingConfigNameServerTarget struct { - // DomainName: Fully qualified domain name for the forwarding target. - DomainName string `json:"domainName,omitempty"` - // ForwardingPath: Forwarding path for this NameServerTarget. If unset or set - // to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges; - // that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go - // to the internet. When set to PRIVATE, Cloud DNS always sends queries through - // the VPC network for this target. - // - // Possible values: - // "default" - Cloud DNS makes forwarding decisions based on address ranges; - // that is, RFC1918 addresses forward to the target through the VPC and - // non-RFC1918 addresses forward to the target through the internet - // "private" - Cloud DNS always forwards to this target through the VPC. - ForwardingPath string `json:"forwardingPath,omitempty"` - // Ipv4Address: IPv4 address of a target name server. - Ipv4Address string `json:"ipv4Address,omitempty"` - // Ipv6Address: IPv6 address of a target name server. Does not accept both - // fields (ipv4 & ipv6) being populated. Public preview as of November 2022. - Ipv6Address string `json:"ipv6Address,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "DomainName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DomainName") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneForwardingConfigNameServerTarget) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneForwardingConfigNameServerTarget - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneOperationsListResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - // Operations: The operation resources. - Operations []*Operation `json:"operations,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneOperationsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneOperationsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonePeeringConfig struct { - Kind string `json:"kind,omitempty"` - // TargetNetwork: The network with which to peer. - TargetNetwork *ManagedZonePeeringConfigTargetNetwork `json:"targetNetwork,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonePeeringConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonePeeringConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonePeeringConfigTargetNetwork struct { - // DeactivateTime: The time at which the zone was deactivated, in RFC 3339 - // date-time format. An empty string indicates that the peering connection is - // active. The producer network can deactivate a zone. The zone is - // automatically deactivated if the producer network that the zone targeted is - // deleted. Output only. - DeactivateTime string `json:"deactivateTime,omitempty"` - Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to forward queries - // to. This should be formatted like - // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne - // twork}` - NetworkUrl string `json:"networkUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeactivateTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeactivateTime") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonePeeringConfigTargetNetwork) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonePeeringConfigTargetNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonePrivateVisibilityConfig struct { - // GkeClusters: The list of Google Kubernetes Engine clusters that can see this - // zone. - GkeClusters []*ManagedZonePrivateVisibilityConfigGKECluster `json:"gkeClusters,omitempty"` - Kind string `json:"kind,omitempty"` - // Networks: The list of VPC networks that can see this zone. - Networks []*ManagedZonePrivateVisibilityConfigNetwork `json:"networks,omitempty"` - // ForceSendFields is a list of field names (e.g. "GkeClusters") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GkeClusters") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonePrivateVisibilityConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonePrivateVisibilityConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonePrivateVisibilityConfigGKECluster struct { - // GkeClusterName: The resource name of the cluster to bind this ManagedZone - // to. This should be specified in the format like: - // projects/*/locations/*/clusters/*. This is referenced from GKE - // projects.locations.clusters.get API: - // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get - GkeClusterName string `json:"gkeClusterName,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "GkeClusterName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GkeClusterName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonePrivateVisibilityConfigGKECluster) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonePrivateVisibilityConfigGKECluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonePrivateVisibilityConfigNetwork struct { - Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to bind to. Format - // this URL like - // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne - // twork}` - NetworkUrl string `json:"networkUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonePrivateVisibilityConfigNetwork) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonePrivateVisibilityConfigNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneReverseLookupConfig struct { - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneReverseLookupConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneReverseLookupConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ManagedZoneServiceDirectoryConfig: Contains information about Service -// Directory-backed zones. -type ManagedZoneServiceDirectoryConfig struct { - Kind string `json:"kind,omitempty"` - // Namespace: Contains information about the namespace associated with the - // zone. - Namespace *ManagedZoneServiceDirectoryConfigNamespace `json:"namespace,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneServiceDirectoryConfig) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneServiceDirectoryConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZoneServiceDirectoryConfigNamespace struct { - // DeletionTime: The time that the namespace backing this zone was deleted; an - // empty string if it still exists. This is in RFC3339 text format. Output - // only. - DeletionTime string `json:"deletionTime,omitempty"` - Kind string `json:"kind,omitempty"` - // NamespaceUrl: The fully qualified URL of the namespace associated with the - // zone. Format must be - // `https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{loc - // ation}/namespaces/{namespace}` - NamespaceUrl string `json:"namespaceUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "DeletionTime") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DeletionTime") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZoneServiceDirectoryConfigNamespace) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZoneServiceDirectoryConfigNamespace - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ManagedZonesListResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // ManagedZones: The managed zone resources. - ManagedZones []*ManagedZone `json:"managedZones,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ManagedZonesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ManagedZonesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Operation: An operation represents a successful mutation performed on a -// Cloud DNS resource. Operations provide: - An audit log of server resource -// mutations. - A way to recover/retry API calls in the case where the response -// is never received by the caller. Use the caller specified -// client_operation_id. -type Operation struct { - // DnsKeyContext: Only populated if the operation targeted a DnsKey (output - // only). - DnsKeyContext *OperationDnsKeyContext `json:"dnsKeyContext,omitempty"` - // Id: Unique identifier for the resource. This is the client_operation_id if - // the client specified it when the mutation was initiated, otherwise, it is - // generated by the server. The name must be 1-63 characters long and match the - // regular expression [-a-z0-9]? (output only) - Id string `json:"id,omitempty"` - Kind string `json:"kind,omitempty"` - // StartTime: The time that this operation was started by the server. This is - // in RFC3339 text format (output only). - StartTime string `json:"startTime,omitempty"` - // Status: Status of the operation. Can be one of the following: "PENDING" or - // "DONE" (output only). A status of "DONE" means that the request to update - // the authoritative servers has been sent, but the servers might not be - // updated yet. - // - // Possible values: - // "pending" - // "done" - Status string `json:"status,omitempty"` - // Type: Type of the operation. Operations include insert, update, and delete - // (output only). - Type string `json:"type,omitempty"` - // User: User who requested the operation, for example: user@example.com. - // cloud-dns-system for operations automatically done by the system. (output - // only) - User string `json:"user,omitempty"` - // ZoneContext: Only populated if the operation targeted a ManagedZone (output - // only). - ZoneContext *OperationManagedZoneContext `json:"zoneContext,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "DnsKeyContext") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsKeyContext") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Operation) MarshalJSON() ([]byte, error) { - type NoMethod Operation - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationDnsKeyContext struct { - // NewValue: The post-operation DnsKey resource. - NewValue *DnsKey `json:"newValue,omitempty"` - // OldValue: The pre-operation DnsKey resource. - OldValue *DnsKey `json:"oldValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationDnsKeyContext) MarshalJSON() ([]byte, error) { - type NoMethod OperationDnsKeyContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type OperationManagedZoneContext struct { - // NewValue: The post-operation ManagedZone resource. - NewValue *ManagedZone `json:"newValue,omitempty"` - // OldValue: The pre-operation ManagedZone resource. - OldValue *ManagedZone `json:"oldValue,omitempty"` - // ForceSendFields is a list of field names (e.g. "NewValue") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NewValue") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s OperationManagedZoneContext) MarshalJSON() ([]byte, error) { - type NoMethod OperationManagedZoneContext - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PoliciesListResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - // Policies: The policy resources. - Policies []*Policy `json:"policies,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PoliciesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod PoliciesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PoliciesPatchResponse struct { - Policy *Policy `json:"policy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PoliciesPatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod PoliciesPatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PoliciesUpdateResponse struct { - Policy *Policy `json:"policy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Policy") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Policy") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PoliciesUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod PoliciesUpdateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Policy: A policy is a collection of DNS rules applied to one or more Virtual -// Private Cloud resources. -type Policy struct { - // AlternativeNameServerConfig: Sets an alternative name server for the - // associated networks. When specified, all DNS queries are forwarded to a name - // server that you choose. Names such as .internal are not available when an - // alternative name server is specified. - AlternativeNameServerConfig *PolicyAlternativeNameServerConfig `json:"alternativeNameServerConfig,omitempty"` - // Description: A mutable string of at most 1024 characters associated with - // this resource for the user's convenience. Has no effect on the policy's - // function. - Description string `json:"description,omitempty"` - // Dns64Config: Configurations related to DNS64 for this policy. - Dns64Config *PolicyDns64Config `json:"dns64Config,omitempty"` - // EnableInboundForwarding: Allows networks bound to this policy to receive DNS - // queries sent by VMs or applications over VPN connections. When enabled, a - // virtual IP address is allocated from each of the subnetworks that are bound - // to this policy. - EnableInboundForwarding bool `json:"enableInboundForwarding,omitempty"` - // EnableLogging: Controls whether logging is enabled for the networks bound to - // this policy. Defaults to no logging if not set. - EnableLogging bool `json:"enableLogging,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output only). - Id uint64 `json:"id,omitempty,string"` - Kind string `json:"kind,omitempty"` - // Name: User-assigned name for this policy. - Name string `json:"name,omitempty"` - // Networks: List of network names specifying networks to which this policy is - // applied. - Networks []*PolicyNetwork `json:"networks,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. - // "AlternativeNameServerConfig") to unconditionally include in API requests. - // By default, fields with empty or default values are omitted from API - // requests. See https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields - // for more details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AlternativeNameServerConfig") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Policy) MarshalJSON() ([]byte, error) { - type NoMethod Policy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PolicyAlternativeNameServerConfig struct { - Kind string `json:"kind,omitempty"` - // TargetNameServers: Sets an alternative name server for the associated - // networks. When specified, all DNS queries are forwarded to a name server - // that you choose. Names such as .internal are not available when an - // alternative name server is specified. - TargetNameServers []*PolicyAlternativeNameServerConfigTargetNameServer `json:"targetNameServers,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyAlternativeNameServerConfig) MarshalJSON() ([]byte, error) { - type NoMethod PolicyAlternativeNameServerConfig - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PolicyAlternativeNameServerConfigTargetNameServer struct { - // ForwardingPath: Forwarding path for this TargetNameServer. If unset or set - // to DEFAULT, Cloud DNS makes forwarding decisions based on address ranges; - // that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go - // to the internet. When set to PRIVATE, Cloud DNS always sends queries through - // the VPC network for this target. - // - // Possible values: - // "default" - Cloud DNS makes forwarding decision based on IP address - // ranges; that is, RFC1918 addresses forward to the target through the VPC and - // non-RFC1918 addresses forward to the target through the internet - // "private" - Cloud DNS always forwards to this target through the VPC. - ForwardingPath string `json:"forwardingPath,omitempty"` - // Ipv4Address: IPv4 address to forward queries to. - Ipv4Address string `json:"ipv4Address,omitempty"` - // Ipv6Address: IPv6 address to forward to. Does not accept both fields (ipv4 & - // ipv6) being populated. Public preview as of November 2022. - Ipv6Address string `json:"ipv6Address,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "ForwardingPath") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ForwardingPath") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyAlternativeNameServerConfigTargetNameServer) MarshalJSON() ([]byte, error) { - type NoMethod PolicyAlternativeNameServerConfigTargetNameServer - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// PolicyDns64Config: DNS64 policies -type PolicyDns64Config struct { - Kind string `json:"kind,omitempty"` - // Scope: The scope to which DNS64 config will be applied to. - Scope *PolicyDns64ConfigScope `json:"scope,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyDns64Config) MarshalJSON() ([]byte, error) { - type NoMethod PolicyDns64Config - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PolicyDns64ConfigScope struct { - // AllQueries: Controls whether DNS64 is enabled globally for all networks - // bound to the policy. - AllQueries bool `json:"allQueries,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "AllQueries") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "AllQueries") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyDns64ConfigScope) MarshalJSON() ([]byte, error) { - type NoMethod PolicyDns64ConfigScope - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type PolicyNetwork struct { - Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to bind to. This - // should be formatted like - // https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} - NetworkUrl string `json:"networkUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s PolicyNetwork) MarshalJSON() ([]byte, error) { - type NoMethod PolicyNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Project: A project resource. The project is a top level container for -// resources including Cloud DNS ManagedZones. Projects can be created only in -// the APIs console. -type Project struct { - // Id: User assigned unique identifier for the resource (output only). - Id string `json:"id,omitempty"` - Kind string `json:"kind,omitempty"` - // Number: Unique numeric identifier for the resource; defined by the server - // (output only). - Number uint64 `json:"number,omitempty,string"` - // Quota: Quotas assigned to this project (output only). - Quota *Quota `json:"quota,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Id") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Id") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Project) MarshalJSON() ([]byte, error) { - type NoMethod Project - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// Quota: Limits associated with a Project. -type Quota struct { - // DnsKeysPerManagedZone: Maximum allowed number of DnsKeys per ManagedZone. - DnsKeysPerManagedZone int64 `json:"dnsKeysPerManagedZone,omitempty"` - // GkeClustersPerManagedZone: Maximum allowed number of GKE clusters to which a - // privately scoped zone can be attached. - GkeClustersPerManagedZone int64 `json:"gkeClustersPerManagedZone,omitempty"` - // GkeClustersPerPolicy: Maximum allowed number of GKE clusters per policy. - GkeClustersPerPolicy int64 `json:"gkeClustersPerPolicy,omitempty"` - // GkeClustersPerResponsePolicy: Maximum allowed number of GKE clusters per - // response policy. - GkeClustersPerResponsePolicy int64 `json:"gkeClustersPerResponsePolicy,omitempty"` - InternetHealthChecksPerManagedZone int64 `json:"internetHealthChecksPerManagedZone,omitempty"` - // ItemsPerRoutingPolicy: Maximum allowed number of items per routing policy. - ItemsPerRoutingPolicy int64 `json:"itemsPerRoutingPolicy,omitempty"` - Kind string `json:"kind,omitempty"` - // ManagedZones: Maximum allowed number of managed zones in the project. - ManagedZones int64 `json:"managedZones,omitempty"` - // ManagedZonesPerGkeCluster: Maximum allowed number of managed zones which can - // be attached to a GKE cluster. - ManagedZonesPerGkeCluster int64 `json:"managedZonesPerGkeCluster,omitempty"` - // ManagedZonesPerNetwork: Maximum allowed number of managed zones which can be - // attached to a network. - ManagedZonesPerNetwork int64 `json:"managedZonesPerNetwork,omitempty"` - // NameserversPerDelegation: Maximum number of nameservers per delegation, - // meant to prevent abuse - NameserversPerDelegation int64 `json:"nameserversPerDelegation,omitempty"` - // NetworksPerManagedZone: Maximum allowed number of networks to which a - // privately scoped zone can be attached. - NetworksPerManagedZone int64 `json:"networksPerManagedZone,omitempty"` - // NetworksPerPolicy: Maximum allowed number of networks per policy. - NetworksPerPolicy int64 `json:"networksPerPolicy,omitempty"` - // NetworksPerResponsePolicy: Maximum allowed number of networks per response - // policy. - NetworksPerResponsePolicy int64 `json:"networksPerResponsePolicy,omitempty"` - // PeeringZonesPerTargetNetwork: Maximum allowed number of consumer peering - // zones per target network owned by this producer project - PeeringZonesPerTargetNetwork int64 `json:"peeringZonesPerTargetNetwork,omitempty"` - // Policies: Maximum allowed number of policies per project. - Policies int64 `json:"policies,omitempty"` - // ResourceRecordsPerRrset: Maximum allowed number of ResourceRecords per - // ResourceRecordSet. - ResourceRecordsPerRrset int64 `json:"resourceRecordsPerRrset,omitempty"` - // ResponsePolicies: Maximum allowed number of response policies per project. - ResponsePolicies int64 `json:"responsePolicies,omitempty"` - // ResponsePolicyRulesPerResponsePolicy: Maximum allowed number of rules per - // response policy. - ResponsePolicyRulesPerResponsePolicy int64 `json:"responsePolicyRulesPerResponsePolicy,omitempty"` - // RrsetAdditionsPerChange: Maximum allowed number of ResourceRecordSets to add - // per ChangesCreateRequest. - RrsetAdditionsPerChange int64 `json:"rrsetAdditionsPerChange,omitempty"` - // RrsetDeletionsPerChange: Maximum allowed number of ResourceRecordSets to - // delete per ChangesCreateRequest. - RrsetDeletionsPerChange int64 `json:"rrsetDeletionsPerChange,omitempty"` - // RrsetsPerManagedZone: Maximum allowed number of ResourceRecordSets per zone - // in the project. - RrsetsPerManagedZone int64 `json:"rrsetsPerManagedZone,omitempty"` - // TargetNameServersPerManagedZone: Maximum allowed number of target name - // servers per managed forwarding zone. - TargetNameServersPerManagedZone int64 `json:"targetNameServersPerManagedZone,omitempty"` - // TargetNameServersPerPolicy: Maximum allowed number of alternative target - // name servers per policy. - TargetNameServersPerPolicy int64 `json:"targetNameServersPerPolicy,omitempty"` - // TotalRrdataSizePerChange: Maximum allowed size for total rrdata in one - // ChangesCreateRequest in bytes. - TotalRrdataSizePerChange int64 `json:"totalRrdataSizePerChange,omitempty"` - // WhitelistedKeySpecs: DNSSEC algorithm and key length types that can be used - // for DnsKeys. - WhitelistedKeySpecs []*DnsKeySpec `json:"whitelistedKeySpecs,omitempty"` - // ForceSendFields is a list of field names (e.g. "DnsKeysPerManagedZone") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "DnsKeysPerManagedZone") to - // include in API requests with the JSON null value. By default, fields with - // empty values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s Quota) MarshalJSON() ([]byte, error) { - type NoMethod Quota - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicy: A RRSetRoutingPolicy represents ResourceRecordSet data -// that is returned dynamically with the response varying based on configured -// properties such as geolocation or by weighted random selection. -type RRSetRoutingPolicy struct { - Geo *RRSetRoutingPolicyGeoPolicy `json:"geo,omitempty"` - // HealthCheck: The fully qualified URL of the HealthCheck to use for this - // RRSetRoutingPolicy. Format this URL like - // `https://www.googleapis.com/compute/v1/projects/{project}/global/healthChecks - // /{healthCheck}`. - // https://cloud.google.com/compute/docs/reference/rest/v1/healthChecks - HealthCheck string `json:"healthCheck,omitempty"` - Kind string `json:"kind,omitempty"` - PrimaryBackup *RRSetRoutingPolicyPrimaryBackupPolicy `json:"primaryBackup,omitempty"` - Wrr *RRSetRoutingPolicyWrrPolicy `json:"wrr,omitempty"` - // ForceSendFields is a list of field names (e.g. "Geo") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Geo") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyGeoPolicy: Configures a `RRSetRoutingPolicy` that routes -// based on the geo location of the querying user. -type RRSetRoutingPolicyGeoPolicy struct { - // EnableFencing: Without fencing, if health check fails for all configured - // items in the current geo bucket, we failover to the next nearest geo bucket. - // With fencing, if health checking is enabled, as long as some targets in the - // current geo bucket are healthy, we return only the healthy targets. However, - // if all targets are unhealthy, we don't failover to the next nearest bucket; - // instead, we return all the items in the current bucket even when all targets - // are unhealthy. - EnableFencing bool `json:"enableFencing,omitempty"` - // Items: The primary geo routing configuration. If there are multiple items - // with the same location, an error is returned instead. - Items []*RRSetRoutingPolicyGeoPolicyGeoPolicyItem `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "EnableFencing") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "EnableFencing") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyGeoPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyGeoPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyGeoPolicyGeoPolicyItem: ResourceRecordSet data for one geo -// location. -type RRSetRoutingPolicyGeoPolicyGeoPolicyItem struct { - // HealthCheckedTargets: For A and AAAA types only. Endpoints to return in the - // query result only if they are healthy. These can be specified along with - // `rrdata` within this item. - HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` - Kind string `json:"kind,omitempty"` - // Location: The geo-location granularity is a GCP region. This location string - // should correspond to a GCP region. e.g. "us-east1", "southamerica-east1", - // "asia-east1", etc. - Location string `json:"location,omitempty"` - Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within - // this item. When using health-checked targets for DNSSEC-enabled zones, you - // can only use at most one health-checked IP address per item. - SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheckedTargets") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyGeoPolicyGeoPolicyItem) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyGeoPolicyGeoPolicyItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyHealthCheckTargets: HealthCheckTargets describes endpoints -// to health-check when responding to Routing Policy queries. Only the healthy -// endpoints will be included in the response. Set either -// `internal_load_balancer` or `external_endpoints`. Do not set both. -type RRSetRoutingPolicyHealthCheckTargets struct { - // ExternalEndpoints: The Internet IP addresses to be health checked. The - // format matches the format of ResourceRecordSet.rrdata as defined in RFC 1035 - // (section 5) and RFC 1034 (section 3.6.1) - ExternalEndpoints []string `json:"externalEndpoints,omitempty"` - // InternalLoadBalancers: Configuration for internal load balancers to be - // health checked. - InternalLoadBalancers []*RRSetRoutingPolicyLoadBalancerTarget `json:"internalLoadBalancers,omitempty"` - // ForceSendFields is a list of field names (e.g. "ExternalEndpoints") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ExternalEndpoints") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyHealthCheckTargets) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyHealthCheckTargets - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyLoadBalancerTarget: The configuration for an individual -// load balancer to health check. -type RRSetRoutingPolicyLoadBalancerTarget struct { - // IpAddress: The frontend IP address of the load balancer to health check. - IpAddress string `json:"ipAddress,omitempty"` - // IpProtocol: The protocol of the load balancer to health check. - // - // Possible values: - // "undefined" - // "tcp" - Indicates the load balancer is accessible via TCP. - // "udp" - Indicates the load balancer is accessible via UDP. - IpProtocol string `json:"ipProtocol,omitempty"` - Kind string `json:"kind,omitempty"` - // LoadBalancerType: The type of load balancer specified by this target. This - // value must match the configuration of the load balancer located at the - // LoadBalancerTarget's IP address, port, and region. Use the following: - - // *regionalL4ilb*: for a regional internal passthrough Network Load Balancer. - // - *regionalL7ilb*: for a regional internal Application Load Balancer. - - // *globalL7ilb*: for a global internal Application Load Balancer. - // - // Possible values: - // "none" - // "globalL7ilb" - Indicates the load balancer is a Cross-Region Application - // Load Balancer. - // "regionalL4ilb" - Indicates the load balancer is a Regional Network - // Passthrough Load Balancer. - // "regionalL7ilb" - Indicates the load balancer is a Regional Application - // Load Balancer. - LoadBalancerType string `json:"loadBalancerType,omitempty"` - // NetworkUrl: The fully qualified URL of the network that the load balancer is - // attached to. This should be formatted like - // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne - // twork}`. - NetworkUrl string `json:"networkUrl,omitempty"` - // Port: The configured port of the load balancer. - Port string `json:"port,omitempty"` - // Project: The project ID in which the load balancer is located. - Project string `json:"project,omitempty"` - // Region: The region in which the load balancer is located. - Region string `json:"region,omitempty"` - // ForceSendFields is a list of field names (e.g. "IpAddress") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "IpAddress") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyLoadBalancerTarget) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyLoadBalancerTarget - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyPrimaryBackupPolicy: Configures a RRSetRoutingPolicy such -// that all queries are responded with the primary_targets if they are healthy. -// And if all of them are unhealthy, then we fallback to a geo localized -// policy. -type RRSetRoutingPolicyPrimaryBackupPolicy struct { - // BackupGeoTargets: Backup targets provide a regional failover policy for the - // otherwise global primary targets. If serving state is set to `BACKUP`, this - // policy essentially becomes a geo routing policy. - BackupGeoTargets *RRSetRoutingPolicyGeoPolicy `json:"backupGeoTargets,omitempty"` - Kind string `json:"kind,omitempty"` - // PrimaryTargets: Endpoints that are health checked before making the routing - // decision. Unhealthy endpoints are omitted from the results. If all endpoints - // are unhealthy, we serve a response based on the `backup_geo_targets`. - PrimaryTargets *RRSetRoutingPolicyHealthCheckTargets `json:"primaryTargets,omitempty"` - // TrickleTraffic: When serving state is `PRIMARY`, this field provides the - // option of sending a small percentage of the traffic to the backup targets. - TrickleTraffic float64 `json:"trickleTraffic,omitempty"` - // ForceSendFields is a list of field names (e.g. "BackupGeoTargets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "BackupGeoTargets") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyPrimaryBackupPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *RRSetRoutingPolicyPrimaryBackupPolicy) UnmarshalJSON(data []byte) error { - type NoMethod RRSetRoutingPolicyPrimaryBackupPolicy - var s1 struct { - TrickleTraffic gensupport.JSONFloat64 `json:"trickleTraffic"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.TrickleTraffic = float64(s1.TrickleTraffic) - return nil -} - -// RRSetRoutingPolicyWrrPolicy: Configures a RRSetRoutingPolicy that routes in -// a weighted round robin fashion. -type RRSetRoutingPolicyWrrPolicy struct { - Items []*RRSetRoutingPolicyWrrPolicyWrrPolicyItem `json:"items,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "Items") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Items") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyWrrPolicy) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyWrrPolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// RRSetRoutingPolicyWrrPolicyWrrPolicyItem: A routing block which contains the -// routing information for one WRR item. -type RRSetRoutingPolicyWrrPolicyWrrPolicyItem struct { - // HealthCheckedTargets: Endpoints that are health checked before making the - // routing decision. The unhealthy endpoints are omitted from the result. If - // all endpoints within a bucket are unhealthy, we choose a different bucket - // (sampled with respect to its weight) for responding. If DNSSEC is enabled - // for this zone, only one of `rrdata` or `health_checked_targets` can be set. - HealthCheckedTargets *RRSetRoutingPolicyHealthCheckTargets `json:"healthCheckedTargets,omitempty"` - Kind string `json:"kind,omitempty"` - Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: DNSSEC generated signatures for all the `rrdata` within - // this item. When using health-checked targets for DNSSEC-enabled zones, you - // can only use at most one health-checked IP address per item. - SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Weight: The weight corresponding to this `WrrPolicyItem` object. When - // multiple `WrrPolicyItem` objects are configured, the probability of - // returning an `WrrPolicyItem` object's data is proportional to its weight - // relative to the sum of weights configured for all items. This weight must be - // non-negative. - Weight float64 `json:"weight,omitempty"` - // ForceSendFields is a list of field names (e.g. "HealthCheckedTargets") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "HealthCheckedTargets") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s RRSetRoutingPolicyWrrPolicyWrrPolicyItem) MarshalJSON() ([]byte, error) { - type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -func (s *RRSetRoutingPolicyWrrPolicyWrrPolicyItem) UnmarshalJSON(data []byte) error { - type NoMethod RRSetRoutingPolicyWrrPolicyWrrPolicyItem - var s1 struct { - Weight gensupport.JSONFloat64 `json:"weight"` - *NoMethod - } - s1.NoMethod = (*NoMethod)(s) - if err := json.Unmarshal(data, &s1); err != nil { - return err - } - s.Weight = float64(s1.Weight) - return nil -} - -// ResourceRecordSet: A unit of data that is returned by the DNS servers. -type ResourceRecordSet struct { - Kind string `json:"kind,omitempty"` - // Name: For example, www.example.com. - Name string `json:"name,omitempty"` - // RoutingPolicy: Configures dynamic query responses based on either the geo - // location of the querying user or a weighted round robin based routing - // policy. A valid `ResourceRecordSet` contains only `rrdata` (for static - // resolution) or a `routing_policy` (for dynamic resolution). - RoutingPolicy *RRSetRoutingPolicy `json:"routingPolicy,omitempty"` - // Rrdatas: As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) -- - // see examples. - Rrdatas []string `json:"rrdatas,omitempty"` - // SignatureRrdatas: As defined in RFC 4034 (section 3.2). - SignatureRrdatas []string `json:"signatureRrdatas,omitempty"` - // Ttl: Number of seconds that this `ResourceRecordSet` can be cached by - // resolvers. - Ttl int64 `json:"ttl,omitempty"` - // Type: The identifier of a supported record type. See the list of Supported - // DNS record types. - Type string `json:"type,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceRecordSet) MarshalJSON() ([]byte, error) { - type NoMethod ResourceRecordSet - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResourceRecordSetsDeleteResponse struct { - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` -} - -type ResourceRecordSetsListResponse struct { - // Kind: Type of resource. - Kind string `json:"kind,omitempty"` - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - // Rrsets: The resource record set resources. - Rrsets []*ResourceRecordSet `json:"rrsets,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResourceRecordSetsListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResourceRecordSetsListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePoliciesListResponse struct { - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - // ResponsePolicies: The Response Policy resources. - ResponsePolicies []*ResponsePolicy `json:"responsePolicies,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePoliciesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePoliciesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePoliciesPatchResponse struct { - ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ResponsePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResponsePolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePoliciesPatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePoliciesPatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePoliciesUpdateResponse struct { - ResponsePolicy *ResponsePolicy `json:"responsePolicy,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ResponsePolicy") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResponsePolicy") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePoliciesUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePoliciesUpdateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResponsePolicy: A Response Policy is a collection of selectors that apply to -// queries made against one or more Virtual Private Cloud networks. -type ResponsePolicy struct { - // Description: User-provided description for this Response Policy. - Description string `json:"description,omitempty"` - // GkeClusters: The list of Google Kubernetes Engine clusters to which this - // response policy is applied. - GkeClusters []*ResponsePolicyGKECluster `json:"gkeClusters,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output only). - Id int64 `json:"id,omitempty,string"` - Kind string `json:"kind,omitempty"` - // Labels: User labels. - Labels map[string]string `json:"labels,omitempty"` - // Networks: List of network names specifying networks to which this policy is - // applied. - Networks []*ResponsePolicyNetwork `json:"networks,omitempty"` - // ResponsePolicyName: User assigned name for this Response Policy. - ResponsePolicyName string `json:"responsePolicyName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Description") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Description") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicy) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicy - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyGKECluster struct { - // GkeClusterName: The resource name of the cluster to bind this response - // policy to. This should be specified in the format like: - // projects/*/locations/*/clusters/*. This is referenced from GKE - // projects.locations.clusters.get API: - // https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get - GkeClusterName string `json:"gkeClusterName,omitempty"` - Kind string `json:"kind,omitempty"` - // ForceSendFields is a list of field names (e.g. "GkeClusterName") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "GkeClusterName") to include in - // API requests with the JSON null value. By default, fields with empty values - // are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyGKECluster) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyGKECluster - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyNetwork struct { - Kind string `json:"kind,omitempty"` - // NetworkUrl: The fully qualified URL of the VPC network to bind to. This - // should be formatted like - // `https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{ne - // twork}` - NetworkUrl string `json:"networkUrl,omitempty"` - // ForceSendFields is a list of field names (e.g. "Kind") to unconditionally - // include in API requests. By default, fields with empty or default values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Kind") to include in API requests - // with the JSON null value. By default, fields with empty values are omitted - // from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyNetwork) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyNetwork - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -// ResponsePolicyRule: A Response Policy Rule is a selector that applies its -// behavior to queries that match the selector. Selectors are DNS names, which -// may be wildcards or exact matches. Each DNS query subject to a Response -// Policy matches at most one ResponsePolicyRule, as identified by the dns_name -// field with the longest matching suffix. -type ResponsePolicyRule struct { - // Behavior: Answer this query with a behavior rather than DNS data. - // - // Possible values: - // "behaviorUnspecified" - // "bypassResponsePolicy" - Skip a less-specific Response Policy Rule and let - // the query logic continue. This mechanism, when used with wildcard selectors, - // lets you exempt specific subdomains from a broader Response Policy Rule and - // direct the queries to the public internet instead. For example, if the - // following rules exist: ``` *.example.com -> LocalData 1.2.3.4 - // foo.example.com -> Behavior 'passthrough' ``` A query for foo.example.com - // skips the wildcard rule. This functionality also facilitates allowlisting. - // Response Policy Zones (RPZs) can be applied at multiple levels within the - // hierarchy: for example, an organization, a folder, a project, or a VPC - // network. If an RPZ rule is applied at a higher level, adding a `passthrough` - // rule at a lower level will override it. Queries from affected virtual - // machines (VMs) to that domain bypass the RPZ and proceed with normal - // resolution. - Behavior string `json:"behavior,omitempty"` - // DnsName: The DNS name (wildcard or exact) to apply this rule to. Must be - // unique within the Response Policy Rule. - DnsName string `json:"dnsName,omitempty"` - Kind string `json:"kind,omitempty"` - // LocalData: Answer this query directly with DNS data. These - // ResourceRecordSets override any other DNS behavior for the matched name; in - // particular they override private zones, the public internet, and GCP - // internal DNS. No SOA nor NS types are allowed. - LocalData *ResponsePolicyRuleLocalData `json:"localData,omitempty"` - // RuleName: An identifier for this rule. Must be unique with the - // ResponsePolicy. - RuleName string `json:"ruleName,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "Behavior") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "Behavior") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyRule) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyRule - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyRuleLocalData struct { - // LocalDatas: All resource record sets for this selector, one per resource - // record type. The name must match the dns_name. - LocalDatas []*ResourceRecordSet `json:"localDatas,omitempty"` - // ForceSendFields is a list of field names (e.g. "LocalDatas") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "LocalDatas") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyRuleLocalData) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyRuleLocalData - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyRulesListResponse struct { - // NextPageToken: This field indicates that more results are available beyond - // the last page displayed. To fetch the results, make another list request and - // use this value as your page token. This lets you retrieve the complete - // contents of a very large collection one page at a time. However, if the - // contents of the collection change between the first and last paginated list - // request, the set of all elements returned are an inconsistent view of the - // collection. You can't retrieve a consistent snapshot of a collection larger - // than the maximum page size. - NextPageToken string `json:"nextPageToken,omitempty"` - // ResponsePolicyRules: The Response Policy Rule resources. - ResponsePolicyRules []*ResponsePolicyRule `json:"responsePolicyRules,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "NextPageToken") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "NextPageToken") to include in API - // requests with the JSON null value. By default, fields with empty values are - // omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyRulesListResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyRulesListResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyRulesPatchResponse struct { - ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ResponsePolicyRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResponsePolicyRule") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyRulesPatchResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyRulesPatchResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ResponsePolicyRulesUpdateResponse struct { - ResponsePolicyRule *ResponsePolicyRule `json:"responsePolicyRule,omitempty"` - - // ServerResponse contains the HTTP response code and headers from the server. - googleapi.ServerResponse `json:"-"` - // ForceSendFields is a list of field names (e.g. "ResponsePolicyRule") to - // unconditionally include in API requests. By default, fields with empty or - // default values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more - // details. - ForceSendFields []string `json:"-"` - // NullFields is a list of field names (e.g. "ResponsePolicyRule") to include - // in API requests with the JSON null value. By default, fields with empty - // values are omitted from API requests. See - // https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details. - NullFields []string `json:"-"` -} - -func (s ResponsePolicyRulesUpdateResponse) MarshalJSON() ([]byte, error) { - type NoMethod ResponsePolicyRulesUpdateResponse - return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields) -} - -type ChangesCreateCall struct { - s *Service - project string - managedZone string - change *Change - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Atomically updates the ResourceRecordSet collection. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ChangesService) Create(project string, managedZone string, change *Change) *ChangesCreateCall { - c := &ChangesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.change = change - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ChangesCreateCall) ClientOperationId(clientOperationId string) *ChangesCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ChangesCreateCall) Fields(s ...googleapi.Field) *ChangesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ChangesCreateCall) Context(ctx context.Context) *ChangesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ChangesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ChangesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.change) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.changes.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.changes.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Change.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ChangesCreateCall) Do(opts ...googleapi.CallOption) (*Change, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Change{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.changes.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ChangesGetCall struct { - s *Service - project string - managedZone string - changeId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing Change. -// -// - changeId: The identifier of the requested change, from a previous -// ResourceRecordSetsChangeResponse. -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ChangesService) Get(project string, managedZone string, changeId string) *ChangesGetCall { - c := &ChangesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.changeId = changeId - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ChangesGetCall) ClientOperationId(clientOperationId string) *ChangesGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ChangesGetCall) Fields(s ...googleapi.Field) *ChangesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ChangesGetCall) IfNoneMatch(entityTag string) *ChangesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ChangesGetCall) Context(ctx context.Context) *ChangesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ChangesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ChangesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes/{changeId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "changeId": c.changeId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.changes.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.changes.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Change.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ChangesGetCall) Do(opts ...googleapi.CallOption) (*Change, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Change{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.changes.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ChangesListCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates Changes to a ResourceRecordSet collection. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ChangesService) List(project string, managedZone string) *ChangesListCall { - c := &ChangesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ChangesListCall) MaxResults(maxResults int64) *ChangesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ChangesListCall) PageToken(pageToken string) *ChangesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SortBy sets the optional parameter "sortBy": Sorting criterion. The only -// supported value is change sequence. -// -// Possible values: -// -// "changeSequence" (default) -func (c *ChangesListCall) SortBy(sortBy string) *ChangesListCall { - c.urlParams_.Set("sortBy", sortBy) - return c -} - -// SortOrder sets the optional parameter "sortOrder": Sorting order direction: -// 'ascending' or 'descending'. -func (c *ChangesListCall) SortOrder(sortOrder string) *ChangesListCall { - c.urlParams_.Set("sortOrder", sortOrder) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ChangesListCall) Fields(s ...googleapi.Field) *ChangesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ChangesListCall) IfNoneMatch(entityTag string) *ChangesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ChangesListCall) Context(ctx context.Context) *ChangesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ChangesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ChangesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/changes") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.changes.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.changes.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ChangesListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ChangesListCall) Do(opts ...googleapi.CallOption) (*ChangesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ChangesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.changes.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ChangesListCall) Pages(ctx context.Context, f func(*ChangesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type DnsKeysGetCall struct { - s *Service - project string - managedZone string - dnsKeyId string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing DnsKey. -// -// - dnsKeyId: The identifier of the requested DnsKey. -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *DnsKeysService) Get(project string, managedZone string, dnsKeyId string) *DnsKeysGetCall { - c := &DnsKeysGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.dnsKeyId = dnsKeyId - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *DnsKeysGetCall) ClientOperationId(clientOperationId string) *DnsKeysGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// DigestType sets the optional parameter "digestType": An optional -// comma-separated list of digest types to compute and display for key signing -// keys. If omitted, the recommended digest type is computed and displayed. -func (c *DnsKeysGetCall) DigestType(digestType string) *DnsKeysGetCall { - c.urlParams_.Set("digestType", digestType) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DnsKeysGetCall) Fields(s ...googleapi.Field) *DnsKeysGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DnsKeysGetCall) IfNoneMatch(entityTag string) *DnsKeysGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DnsKeysGetCall) Context(ctx context.Context) *DnsKeysGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DnsKeysGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DnsKeysGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys/{dnsKeyId}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "dnsKeyId": c.dnsKeyId, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.dnsKeys.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.dnsKeys.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *DnsKey.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *DnsKeysGetCall) Do(opts ...googleapi.CallOption) (*DnsKey, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DnsKey{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.dnsKeys.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type DnsKeysListCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates DnsKeys to a ResourceRecordSet collection. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *DnsKeysService) List(project string, managedZone string) *DnsKeysListCall { - c := &DnsKeysListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// DigestType sets the optional parameter "digestType": An optional -// comma-separated list of digest types to compute and display for key signing -// keys. If omitted, the recommended digest type is computed and displayed. -func (c *DnsKeysListCall) DigestType(digestType string) *DnsKeysListCall { - c.urlParams_.Set("digestType", digestType) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *DnsKeysListCall) MaxResults(maxResults int64) *DnsKeysListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *DnsKeysListCall) PageToken(pageToken string) *DnsKeysListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *DnsKeysListCall) Fields(s ...googleapi.Field) *DnsKeysListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *DnsKeysListCall) IfNoneMatch(entityTag string) *DnsKeysListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *DnsKeysListCall) Context(ctx context.Context) *DnsKeysListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *DnsKeysListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *DnsKeysListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/dnsKeys") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.dnsKeys.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.dnsKeys.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *DnsKeysListResponse.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *DnsKeysListCall) Do(opts ...googleapi.CallOption) (*DnsKeysListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &DnsKeysListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.dnsKeys.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *DnsKeysListCall) Pages(ctx context.Context, f func(*DnsKeysListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ManagedZoneOperationsGetCall struct { - s *Service - project string - managedZone string - operation string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing Operation. -// -// - managedZone: Identifies the managed zone addressed by this request. -// - operation: Identifies the operation addressed by this request (ID of the -// operation). -// - project: Identifies the project addressed by this request. -func (r *ManagedZoneOperationsService) Get(project string, managedZone string, operation string) *ManagedZoneOperationsGetCall { - c := &ManagedZoneOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.operation = operation - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZoneOperationsGetCall) ClientOperationId(clientOperationId string) *ManagedZoneOperationsGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZoneOperationsGetCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ManagedZoneOperationsGetCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZoneOperationsGetCall) Context(ctx context.Context) *ManagedZoneOperationsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZoneOperationsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZoneOperationsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations/{operation}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "operation": c.operation, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZoneOperations.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZoneOperations.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ManagedZoneOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZoneOperations.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZoneOperationsListCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates Operations for the given ManagedZone. -// -// - managedZone: Identifies the managed zone addressed by this request. -// - project: Identifies the project addressed by this request. -func (r *ManagedZoneOperationsService) List(project string, managedZone string) *ManagedZoneOperationsListCall { - c := &ManagedZoneOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ManagedZoneOperationsListCall) MaxResults(maxResults int64) *ManagedZoneOperationsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ManagedZoneOperationsListCall) PageToken(pageToken string) *ManagedZoneOperationsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// SortBy sets the optional parameter "sortBy": Sorting criterion. The only -// supported values are START_TIME and ID. -// -// Possible values: -// -// "startTime" (default) -// "id" -func (c *ManagedZoneOperationsListCall) SortBy(sortBy string) *ManagedZoneOperationsListCall { - c.urlParams_.Set("sortBy", sortBy) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZoneOperationsListCall) Fields(s ...googleapi.Field) *ManagedZoneOperationsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ManagedZoneOperationsListCall) IfNoneMatch(entityTag string) *ManagedZoneOperationsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZoneOperationsListCall) Context(ctx context.Context) *ManagedZoneOperationsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZoneOperationsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZoneOperationsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/operations") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZoneOperations.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZoneOperations.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ManagedZoneOperationsListResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ManagedZoneOperationsListCall) Do(opts ...googleapi.CallOption) (*ManagedZoneOperationsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ManagedZoneOperationsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZoneOperations.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ManagedZoneOperationsListCall) Pages(ctx context.Context, f func(*ManagedZoneOperationsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ManagedZonesCreateCall struct { - s *Service - project string - managedzone *ManagedZone - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ManagedZone. -// -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) Create(project string, managedzone *ManagedZone) *ManagedZonesCreateCall { - c := &ManagedZonesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedzone = managedzone - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZonesCreateCall) ClientOperationId(clientOperationId string) *ManagedZonesCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesCreateCall) Fields(s ...googleapi.Field) *ManagedZonesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesCreateCall) Context(ctx context.Context) *ManagedZonesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.managedzone) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ManagedZone.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ManagedZonesCreateCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ManagedZone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesDeleteCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a previously created ManagedZone. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) Delete(project string, managedZone string) *ManagedZonesDeleteCall { - c := &ManagedZonesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZonesDeleteCall) ClientOperationId(clientOperationId string) *ManagedZonesDeleteCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesDeleteCall) Fields(s ...googleapi.Field) *ManagedZonesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesDeleteCall) Context(ctx context.Context) *ManagedZonesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.delete" call. -func (c *ManagedZonesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ManagedZonesGetCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing ManagedZone. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) Get(project string, managedZone string) *ManagedZonesGetCall { - c := &ManagedZonesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZonesGetCall) ClientOperationId(clientOperationId string) *ManagedZonesGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesGetCall) Fields(s ...googleapi.Field) *ManagedZonesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ManagedZonesGetCall) IfNoneMatch(entityTag string) *ManagedZonesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesGetCall) Context(ctx context.Context) *ManagedZonesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ManagedZone.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ManagedZonesGetCall) Do(opts ...googleapi.CallOption) (*ManagedZone, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ManagedZone{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesGetIamPolicyCall struct { - s *Service - resource string - googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// GetIamPolicy: Gets the access control policy for a resource. Returns an -// empty policy if the resource exists and does not have a policy set. -// -// - resource: REQUIRED: The resource for which the policy is being requested. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ManagedZonesService) GetIamPolicy(resource string, googleiamv1getiampolicyrequest *GoogleIamV1GetIamPolicyRequest) *ManagedZonesGetIamPolicyCall { - c := &ManagedZonesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1getiampolicyrequest = googleiamv1getiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesGetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesGetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesGetIamPolicyCall) Context(ctx context.Context) *ManagedZonesGetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesGetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1getiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:getIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.getIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.getIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ManagedZonesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.getIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates ManagedZones that have been created but not yet deleted. -// -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) List(project string) *ManagedZonesListCall { - c := &ManagedZonesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// DnsName sets the optional parameter "dnsName": Restricts the list to return -// only zones with this domain name. -func (c *ManagedZonesListCall) DnsName(dnsName string) *ManagedZonesListCall { - c.urlParams_.Set("dnsName", dnsName) - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ManagedZonesListCall) MaxResults(maxResults int64) *ManagedZonesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ManagedZonesListCall) PageToken(pageToken string) *ManagedZonesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesListCall) Fields(s ...googleapi.Field) *ManagedZonesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ManagedZonesListCall) IfNoneMatch(entityTag string) *ManagedZonesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesListCall) Context(ctx context.Context) *ManagedZonesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ManagedZonesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ManagedZonesListCall) Do(opts ...googleapi.CallOption) (*ManagedZonesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ManagedZonesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ManagedZonesListCall) Pages(ctx context.Context, f func(*ManagedZonesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ManagedZonesPatchCall struct { - s *Service - project string - managedZone string - managedzone *ManagedZone - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Applies a partial update to an existing ManagedZone. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) Patch(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesPatchCall { - c := &ManagedZonesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.managedzone = managedzone - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZonesPatchCall) ClientOperationId(clientOperationId string) *ManagedZonesPatchCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesPatchCall) Fields(s ...googleapi.Field) *ManagedZonesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesPatchCall) Context(ctx context.Context) *ManagedZonesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.managedzone) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ManagedZonesPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesSetIamPolicyCall struct { - s *Service - resource string - googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// SetIamPolicy: Sets the access control policy on the specified resource. -// Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, -// and `PERMISSION_DENIED` errors. -// -// - resource: REQUIRED: The resource for which the policy is being specified. -// See Resource names (https://cloud.google.com/apis/design/resource_names) -// for the appropriate value for this field. -func (r *ManagedZonesService) SetIamPolicy(resource string, googleiamv1setiampolicyrequest *GoogleIamV1SetIamPolicyRequest) *ManagedZonesSetIamPolicyCall { - c := &ManagedZonesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1setiampolicyrequest = googleiamv1setiampolicyrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesSetIamPolicyCall) Fields(s ...googleapi.Field) *ManagedZonesSetIamPolicyCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesSetIamPolicyCall) Context(ctx context.Context) *ManagedZonesSetIamPolicyCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesSetIamPolicyCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1setiampolicyrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:setIamPolicy") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.setIamPolicy", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.setIamPolicy" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1Policy.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ManagedZonesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.setIamPolicy", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesTestIamPermissionsCall struct { - s *Service - resource string - googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// TestIamPermissions: Returns permissions that a caller has on the specified -// resource. If the resource does not exist, this returns an empty set of -// permissions, not a `NOT_FOUND` error. Note: This operation is designed to be -// used for building permission-aware UIs and command-line tools, not for -// authorization checking. This operation may "fail open" without warning. -// -// - resource: REQUIRED: The resource for which the policy detail is being -// requested. See Resource names -// (https://cloud.google.com/apis/design/resource_names) for the appropriate -// value for this field. -func (r *ManagedZonesService) TestIamPermissions(resource string, googleiamv1testiampermissionsrequest *GoogleIamV1TestIamPermissionsRequest) *ManagedZonesTestIamPermissionsCall { - c := &ManagedZonesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.resource = resource - c.googleiamv1testiampermissionsrequest = googleiamv1testiampermissionsrequest - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ManagedZonesTestIamPermissionsCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesTestIamPermissionsCall) Context(ctx context.Context) *ManagedZonesTestIamPermissionsCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesTestIamPermissionsCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.googleiamv1testiampermissionsrequest) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/{+resource}:testIamPermissions") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "resource": c.resource, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.testIamPermissions", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.testIamPermissions" call. -// Any non-2xx status code is an error. Response headers are in either -// *GoogleIamV1TestIamPermissionsResponse.ServerResponse.Header or (if a -// response was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ManagedZonesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*GoogleIamV1TestIamPermissionsResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &GoogleIamV1TestIamPermissionsResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.testIamPermissions", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ManagedZonesUpdateCall struct { - s *Service - project string - managedZone string - managedzone *ManagedZone - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing ManagedZone. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ManagedZonesService) Update(project string, managedZone string, managedzone *ManagedZone) *ManagedZonesUpdateCall { - c := &ManagedZonesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.managedzone = managedzone - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ManagedZonesUpdateCall) ClientOperationId(clientOperationId string) *ManagedZonesUpdateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ManagedZonesUpdateCall) Fields(s ...googleapi.Field) *ManagedZonesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ManagedZonesUpdateCall) Context(ctx context.Context) *ManagedZonesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ManagedZonesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ManagedZonesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.managedzone) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.managedZones.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.managedZones.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *Operation.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ManagedZonesUpdateCall) Do(opts ...googleapi.CallOption) (*Operation, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Operation{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.managedZones.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PoliciesCreateCall struct { - s *Service - project string - policy *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new policy. -// -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) Create(project string, policy *Policy) *PoliciesCreateCall { - c := &PoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.policy = policy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *PoliciesCreateCall) ClientOperationId(clientOperationId string) *PoliciesCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesCreateCall) Fields(s ...googleapi.Field) *PoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesCreateCall) Context(ctx context.Context) *PoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.policy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PoliciesCreateCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PoliciesDeleteCall struct { - s *Service - project string - policy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a previously created policy. Fails if the policy is still -// being referenced by a network. -// -// - policy: User given friendly name of the policy addressed by this request. -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) Delete(project string, policy string) *PoliciesDeleteCall { - c := &PoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.policy = policy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *PoliciesDeleteCall) ClientOperationId(clientOperationId string) *PoliciesDeleteCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesDeleteCall) Fields(s ...googleapi.Field) *PoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesDeleteCall) Context(ctx context.Context) *PoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "policy": c.policy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.delete" call. -func (c *PoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type PoliciesGetCall struct { - s *Service - project string - policy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing policy. -// -// - policy: User given friendly name of the policy addressed by this request. -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) Get(project string, policy string) *PoliciesGetCall { - c := &PoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.policy = policy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *PoliciesGetCall) ClientOperationId(clientOperationId string) *PoliciesGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesGetCall) Fields(s ...googleapi.Field) *PoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PoliciesGetCall) IfNoneMatch(entityTag string) *PoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesGetCall) Context(ctx context.Context) *PoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "policy": c.policy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Policy.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *PoliciesGetCall) Do(opts ...googleapi.CallOption) (*Policy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Policy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates all policies associated with a project. -// -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) List(project string) *PoliciesListCall { - c := &PoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *PoliciesListCall) MaxResults(maxResults int64) *PoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *PoliciesListCall) PageToken(pageToken string) *PoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesListCall) Fields(s ...googleapi.Field) *PoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *PoliciesListCall) IfNoneMatch(entityTag string) *PoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesListCall) Context(ctx context.Context) *PoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *PoliciesListResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PoliciesListCall) Do(opts ...googleapi.CallOption) (*PoliciesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &PoliciesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *PoliciesListCall) Pages(ctx context.Context, f func(*PoliciesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type PoliciesPatchCall struct { - s *Service - project string - policy string - policy2 *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Applies a partial update to an existing policy. -// -// - policy: User given friendly name of the policy addressed by this request. -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) Patch(project string, policy string, policy2 *Policy) *PoliciesPatchCall { - c := &PoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.policy = policy - c.policy2 = policy2 - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *PoliciesPatchCall) ClientOperationId(clientOperationId string) *PoliciesPatchCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesPatchCall) Fields(s ...googleapi.Field) *PoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesPatchCall) Context(ctx context.Context) *PoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.policy2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "policy": c.policy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *PoliciesPatchResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PoliciesPatchCall) Do(opts ...googleapi.CallOption) (*PoliciesPatchResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &PoliciesPatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type PoliciesUpdateCall struct { - s *Service - project string - policy string - policy2 *Policy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing policy. -// -// - policy: User given friendly name of the policy addressed by this request. -// - project: Identifies the project addressed by this request. -func (r *PoliciesService) Update(project string, policy string, policy2 *Policy) *PoliciesUpdateCall { - c := &PoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.policy = policy - c.policy2 = policy2 - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *PoliciesUpdateCall) ClientOperationId(clientOperationId string) *PoliciesUpdateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *PoliciesUpdateCall) Fields(s ...googleapi.Field) *PoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *PoliciesUpdateCall) Context(ctx context.Context) *PoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *PoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *PoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.policy2) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/policies/{policy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "policy": c.policy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.policies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.policies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *PoliciesUpdateResponse.ServerResponse.Header or (if a response was returned -// at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *PoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*PoliciesUpdateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &PoliciesUpdateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.policies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ProjectsGetCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing Project. -// -// - project: Identifies the project addressed by this request. -func (r *ProjectsService) Get(project string) *ProjectsGetCall { - c := &ProjectsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ProjectsGetCall) ClientOperationId(clientOperationId string) *ProjectsGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ProjectsGetCall) Fields(s ...googleapi.Field) *ProjectsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ProjectsGetCall) IfNoneMatch(entityTag string) *ProjectsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ProjectsGetCall) Context(ctx context.Context) *ProjectsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ProjectsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ProjectsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.projects.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.projects.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *Project.ServerResponse.Header or (if a response was returned at all) in -// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ProjectsGetCall) Do(opts ...googleapi.CallOption) (*Project, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &Project{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.projects.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourceRecordSetsCreateCall struct { - s *Service - project string - managedZone string - resourcerecordset *ResourceRecordSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new ResourceRecordSet. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ResourceRecordSetsService) Create(project string, managedZone string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsCreateCall { - c := &ResourceRecordSetsCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.resourcerecordset = resourcerecordset - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResourceRecordSetsCreateCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourceRecordSetsCreateCall) Fields(s ...googleapi.Field) *ResourceRecordSetsCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourceRecordSetsCreateCall) Context(ctx context.Context) *ResourceRecordSetsCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourceRecordSetsCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourceRecordSetsCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcerecordset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.resourceRecordSets.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourceRecordSet.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResourceRecordSetsCreateCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResourceRecordSet{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourceRecordSetsDeleteCall struct { - s *Service - project string - managedZone string - name string - type_ string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a previously created ResourceRecordSet. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - name: Fully qualified domain name. -// - project: Identifies the project addressed by this request. -// - type: RRSet type. -func (r *ResourceRecordSetsService) Delete(project string, managedZone string, name string, type_ string) *ResourceRecordSetsDeleteCall { - c := &ResourceRecordSetsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.name = name - c.type_ = type_ - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResourceRecordSetsDeleteCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsDeleteCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourceRecordSetsDeleteCall) Fields(s ...googleapi.Field) *ResourceRecordSetsDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourceRecordSetsDeleteCall) Context(ctx context.Context) *ResourceRecordSetsDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourceRecordSetsDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourceRecordSetsDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "name": c.name, - "type": c.type_, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.resourceRecordSets.delete" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourceRecordSetsDeleteResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResourceRecordSetsDeleteCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsDeleteResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResourceRecordSetsDeleteResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.delete", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourceRecordSetsGetCall struct { - s *Service - project string - managedZone string - name string - type_ string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing ResourceRecordSet. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - name: Fully qualified domain name. -// - project: Identifies the project addressed by this request. -// - type: RRSet type. -func (r *ResourceRecordSetsService) Get(project string, managedZone string, name string, type_ string) *ResourceRecordSetsGetCall { - c := &ResourceRecordSetsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.name = name - c.type_ = type_ - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResourceRecordSetsGetCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourceRecordSetsGetCall) Fields(s ...googleapi.Field) *ResourceRecordSetsGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResourceRecordSetsGetCall) IfNoneMatch(entityTag string) *ResourceRecordSetsGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourceRecordSetsGetCall) Context(ctx context.Context) *ResourceRecordSetsGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourceRecordSetsGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourceRecordSetsGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "name": c.name, - "type": c.type_, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.resourceRecordSets.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourceRecordSet.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResourceRecordSetsGetCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResourceRecordSet{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResourceRecordSetsListCall struct { - s *Service - project string - managedZone string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates ResourceRecordSets that you have created but not yet -// deleted. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - project: Identifies the project addressed by this request. -func (r *ResourceRecordSetsService) List(project string, managedZone string) *ResourceRecordSetsListCall { - c := &ResourceRecordSetsListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ResourceRecordSetsListCall) MaxResults(maxResults int64) *ResourceRecordSetsListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// Name sets the optional parameter "name": Restricts the list to return only -// records with this fully qualified domain name. Mutually exclusive with the -// {@code filter} field. -func (c *ResourceRecordSetsListCall) Name(name string) *ResourceRecordSetsListCall { - c.urlParams_.Set("name", name) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ResourceRecordSetsListCall) PageToken(pageToken string) *ResourceRecordSetsListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Type sets the optional parameter "type": Restricts the list to return only -// records of this type. If present, the "name" parameter must also be present. -// Mutually exclusive with the {@code filter} field. -func (c *ResourceRecordSetsListCall) Type(type_ string) *ResourceRecordSetsListCall { - c.urlParams_.Set("type", type_) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourceRecordSetsListCall) Fields(s ...googleapi.Field) *ResourceRecordSetsListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResourceRecordSetsListCall) IfNoneMatch(entityTag string) *ResourceRecordSetsListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourceRecordSetsListCall) Context(ctx context.Context) *ResourceRecordSetsListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourceRecordSetsListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourceRecordSetsListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.resourceRecordSets.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourceRecordSetsListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResourceRecordSetsListCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSetsListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResourceRecordSetsListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ResourceRecordSetsListCall) Pages(ctx context.Context, f func(*ResourceRecordSetsListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ResourceRecordSetsPatchCall struct { - s *Service - project string - managedZone string - name string - type_ string - resourcerecordset *ResourceRecordSet - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Applies a partial update to an existing ResourceRecordSet. -// -// - managedZone: Identifies the managed zone addressed by this request. Can be -// the managed zone name or ID. -// - name: Fully qualified domain name. -// - project: Identifies the project addressed by this request. -// - type: RRSet type. -func (r *ResourceRecordSetsService) Patch(project string, managedZone string, name string, type_ string, resourcerecordset *ResourceRecordSet) *ResourceRecordSetsPatchCall { - c := &ResourceRecordSetsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.managedZone = managedZone - c.name = name - c.type_ = type_ - c.resourcerecordset = resourcerecordset - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResourceRecordSetsPatchCall) ClientOperationId(clientOperationId string) *ResourceRecordSetsPatchCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResourceRecordSetsPatchCall) Fields(s ...googleapi.Field) *ResourceRecordSetsPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResourceRecordSetsPatchCall) Context(ctx context.Context) *ResourceRecordSetsPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResourceRecordSetsPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResourceRecordSetsPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.resourcerecordset) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/managedZones/{managedZone}/rrsets/{name}/{type}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "managedZone": c.managedZone, - "name": c.name, - "type": c.type_, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.resourceRecordSets.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResourceRecordSet.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResourceRecordSetsPatchCall) Do(opts ...googleapi.CallOption) (*ResourceRecordSet, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResourceRecordSet{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.resourceRecordSets.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePoliciesCreateCall struct { - s *Service - project string - responsepolicy *ResponsePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Response Policy -// -// - project: Identifies the project addressed by this request. -func (r *ResponsePoliciesService) Create(project string, responsepolicy *ResponsePolicy) *ResponsePoliciesCreateCall { - c := &ResponsePoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsepolicy = responsepolicy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePoliciesCreateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesCreateCall) Fields(s ...googleapi.Field) *ResponsePoliciesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesCreateCall) Context(ctx context.Context) *ResponsePoliciesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResponsePoliciesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePoliciesDeleteCall struct { - s *Service - project string - responsePolicy string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a previously created Response Policy. Fails if the response -// policy is non-empty or still being referenced by a network. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy addressed by -// this request. -func (r *ResponsePoliciesService) Delete(project string, responsePolicy string) *ResponsePoliciesDeleteCall { - c := &ResponsePoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePoliciesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePoliciesDeleteCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesDeleteCall) Fields(s ...googleapi.Field) *ResponsePoliciesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesDeleteCall) Context(ctx context.Context) *ResponsePoliciesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.delete" call. -func (c *ResponsePoliciesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ResponsePoliciesGetCall struct { - s *Service - project string - responsePolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing Response Policy. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy addressed by -// this request. -func (r *ResponsePoliciesService) Get(project string, responsePolicy string) *ResponsePoliciesGetCall { - c := &ResponsePoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePoliciesGetCall) ClientOperationId(clientOperationId string) *ResponsePoliciesGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesGetCall) Fields(s ...googleapi.Field) *ResponsePoliciesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResponsePoliciesGetCall) IfNoneMatch(entityTag string) *ResponsePoliciesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesGetCall) Context(ctx context.Context) *ResponsePoliciesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicy.ServerResponse.Header or (if a response was returned at all) -// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check -// whether the returned error was because http.StatusNotModified was returned. -func (c *ResponsePoliciesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicy, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicy{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePoliciesListCall struct { - s *Service - project string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates all Response Policies associated with a project. -// -// - project: Identifies the project addressed by this request. -func (r *ResponsePoliciesService) List(project string) *ResponsePoliciesListCall { - c := &ResponsePoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ResponsePoliciesListCall) MaxResults(maxResults int64) *ResponsePoliciesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ResponsePoliciesListCall) PageToken(pageToken string) *ResponsePoliciesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesListCall) Fields(s ...googleapi.Field) *ResponsePoliciesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResponsePoliciesListCall) IfNoneMatch(entityTag string) *ResponsePoliciesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesListCall) Context(ctx context.Context) *ResponsePoliciesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePoliciesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePoliciesListCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePoliciesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ResponsePoliciesListCall) Pages(ctx context.Context, f func(*ResponsePoliciesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ResponsePoliciesPatchCall struct { - s *Service - project string - responsePolicy string - responsepolicy *ResponsePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Applies a partial update to an existing Response Policy. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the response policy addressed by -// this request. -func (r *ResponsePoliciesService) Patch(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesPatchCall { - c := &ResponsePoliciesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsepolicy = responsepolicy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePoliciesPatchCall) ClientOperationId(clientOperationId string) *ResponsePoliciesPatchCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesPatchCall) Fields(s ...googleapi.Field) *ResponsePoliciesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesPatchCall) Context(ctx context.Context) *ResponsePoliciesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePoliciesPatchResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePoliciesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesPatchResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePoliciesPatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePoliciesUpdateCall struct { - s *Service - project string - responsePolicy string - responsepolicy *ResponsePolicy - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing Response Policy. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy addressed by -// this request. -func (r *ResponsePoliciesService) Update(project string, responsePolicy string, responsepolicy *ResponsePolicy) *ResponsePoliciesUpdateCall { - c := &ResponsePoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsepolicy = responsepolicy - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePoliciesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePoliciesUpdateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePoliciesUpdateCall) Fields(s ...googleapi.Field) *ResponsePoliciesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePoliciesUpdateCall) Context(ctx context.Context) *ResponsePoliciesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePoliciesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePoliciesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicy) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicies.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicies.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePoliciesUpdateResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePoliciesUpdateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePoliciesUpdateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicies.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePolicyRulesCreateCall struct { - s *Service - project string - responsePolicy string - responsepolicyrule *ResponsePolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Create: Creates a new Response Policy Rule. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy containing the -// Response Policy Rule. -func (r *ResponsePolicyRulesService) Create(project string, responsePolicy string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesCreateCall { - c := &ResponsePolicyRulesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsepolicyrule = responsepolicyrule - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePolicyRulesCreateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesCreateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesCreateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesCreateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesCreateCall) Context(ctx context.Context) *ResponsePolicyRulesCreateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesCreateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesCreateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("POST", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.create", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.create" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResponsePolicyRulesCreateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.create", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePolicyRulesDeleteCall struct { - s *Service - project string - responsePolicy string - responsePolicyRule string - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Delete: Deletes a previously created Response Policy Rule. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy containing the -// Response Policy Rule. -// - responsePolicyRule: User assigned name of the Response Policy Rule -// addressed by this request. -func (r *ResponsePolicyRulesService) Delete(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesDeleteCall { - c := &ResponsePolicyRulesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsePolicyRule = responsePolicyRule - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePolicyRulesDeleteCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesDeleteCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesDeleteCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesDeleteCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesDeleteCall) Context(ctx context.Context) *ResponsePolicyRulesDeleteCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesDeleteCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesDeleteCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("DELETE", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - "responsePolicyRule": c.responsePolicyRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.delete", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.delete" call. -func (c *ResponsePolicyRulesDeleteCall) Do(opts ...googleapi.CallOption) error { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if err != nil { - return err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return gensupport.WrapError(err) - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.delete", "response", internallog.HTTPResponse(res, nil)) - return nil -} - -type ResponsePolicyRulesGetCall struct { - s *Service - project string - responsePolicy string - responsePolicyRule string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// Get: Fetches the representation of an existing Response Policy Rule. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy containing the -// Response Policy Rule. -// - responsePolicyRule: User assigned name of the Response Policy Rule -// addressed by this request. -func (r *ResponsePolicyRulesService) Get(project string, responsePolicy string, responsePolicyRule string) *ResponsePolicyRulesGetCall { - c := &ResponsePolicyRulesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsePolicyRule = responsePolicyRule - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePolicyRulesGetCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesGetCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesGetCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesGetCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResponsePolicyRulesGetCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesGetCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesGetCall) Context(ctx context.Context) *ResponsePolicyRulesGetCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesGetCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesGetCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - "responsePolicyRule": c.responsePolicyRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.get", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.get" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicyRule.ServerResponse.Header or (if a response was returned at -// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to -// check whether the returned error was because http.StatusNotModified was -// returned. -func (c *ResponsePolicyRulesGetCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRule, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicyRule{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.get", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePolicyRulesListCall struct { - s *Service - project string - responsePolicy string - urlParams_ gensupport.URLParams - ifNoneMatch_ string - ctx_ context.Context - header_ http.Header -} - -// List: Enumerates all Response Policy Rules associated with a project. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy to list. -func (r *ResponsePolicyRulesService) List(project string, responsePolicy string) *ResponsePolicyRulesListCall { - c := &ResponsePolicyRulesListCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - return c -} - -// MaxResults sets the optional parameter "maxResults": Maximum number of -// results to be returned. If unspecified, the server decides how many results -// to return. -func (c *ResponsePolicyRulesListCall) MaxResults(maxResults int64) *ResponsePolicyRulesListCall { - c.urlParams_.Set("maxResults", fmt.Sprint(maxResults)) - return c -} - -// PageToken sets the optional parameter "pageToken": A tag returned by a -// previous list request that was truncated. Use this parameter to continue a -// previous list request. -func (c *ResponsePolicyRulesListCall) PageToken(pageToken string) *ResponsePolicyRulesListCall { - c.urlParams_.Set("pageToken", pageToken) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesListCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesListCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// IfNoneMatch sets an optional parameter which makes the operation fail if the -// object's ETag matches the given value. This is useful for getting updates -// only after the object has changed since the last request. -func (c *ResponsePolicyRulesListCall) IfNoneMatch(entityTag string) *ResponsePolicyRulesListCall { - c.ifNoneMatch_ = entityTag - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesListCall) Context(ctx context.Context) *ResponsePolicyRulesListCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesListCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesListCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "", c.header_) - if c.ifNoneMatch_ != "" { - reqHeaders.Set("If-None-Match", c.ifNoneMatch_) - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("GET", urls, nil) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.list", "request", internallog.HTTPRequest(req, nil)) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.list" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicyRulesListResponse.ServerResponse.Header or (if a response was -// returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePolicyRulesListCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesListResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicyRulesListResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.list", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -// Pages invokes f for each page of results. -// A non-nil error returned from f will halt the iteration. -// The provided context supersedes any context provided to the Context method. -func (c *ResponsePolicyRulesListCall) Pages(ctx context.Context, f func(*ResponsePolicyRulesListResponse) error) error { - c.ctx_ = ctx - defer c.PageToken(c.urlParams_.Get("pageToken")) - for { - x, err := c.Do() - if err != nil { - return err - } - if err := f(x); err != nil { - return err - } - if x.NextPageToken == "" { - return nil - } - c.PageToken(x.NextPageToken) - } -} - -type ResponsePolicyRulesPatchCall struct { - s *Service - project string - responsePolicy string - responsePolicyRule string - responsepolicyrule *ResponsePolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Patch: Applies a partial update to an existing Response Policy Rule. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy containing the -// Response Policy Rule. -// - responsePolicyRule: User assigned name of the Response Policy Rule -// addressed by this request. -func (r *ResponsePolicyRulesService) Patch(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesPatchCall { - c := &ResponsePolicyRulesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsePolicyRule = responsePolicyRule - c.responsepolicyrule = responsepolicyrule - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePolicyRulesPatchCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesPatchCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesPatchCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesPatchCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesPatchCall) Context(ctx context.Context) *ResponsePolicyRulesPatchCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesPatchCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesPatchCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PATCH", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - "responsePolicyRule": c.responsePolicyRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.patch", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.patch" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicyRulesPatchResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePolicyRulesPatchCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesPatchResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicyRulesPatchResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.patch", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} - -type ResponsePolicyRulesUpdateCall struct { - s *Service - project string - responsePolicy string - responsePolicyRule string - responsepolicyrule *ResponsePolicyRule - urlParams_ gensupport.URLParams - ctx_ context.Context - header_ http.Header -} - -// Update: Updates an existing Response Policy Rule. -// -// - project: Identifies the project addressed by this request. -// - responsePolicy: User assigned name of the Response Policy containing the -// Response Policy Rule. -// - responsePolicyRule: User assigned name of the Response Policy Rule -// addressed by this request. -func (r *ResponsePolicyRulesService) Update(project string, responsePolicy string, responsePolicyRule string, responsepolicyrule *ResponsePolicyRule) *ResponsePolicyRulesUpdateCall { - c := &ResponsePolicyRulesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)} - c.project = project - c.responsePolicy = responsePolicy - c.responsePolicyRule = responsePolicyRule - c.responsepolicyrule = responsepolicyrule - return c -} - -// ClientOperationId sets the optional parameter "clientOperationId": For -// mutating operation requests only. An optional identifier specified by the -// client. Must be unique for operation resources in the Operations collection. -func (c *ResponsePolicyRulesUpdateCall) ClientOperationId(clientOperationId string) *ResponsePolicyRulesUpdateCall { - c.urlParams_.Set("clientOperationId", clientOperationId) - return c -} - -// Fields allows partial responses to be retrieved. See -// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more -// details. -func (c *ResponsePolicyRulesUpdateCall) Fields(s ...googleapi.Field) *ResponsePolicyRulesUpdateCall { - c.urlParams_.Set("fields", googleapi.CombineFields(s)) - return c -} - -// Context sets the context to be used in this call's Do method. -func (c *ResponsePolicyRulesUpdateCall) Context(ctx context.Context) *ResponsePolicyRulesUpdateCall { - c.ctx_ = ctx - return c -} - -// Header returns a http.Header that can be modified by the caller to add -// headers to the request. -func (c *ResponsePolicyRulesUpdateCall) Header() http.Header { - if c.header_ == nil { - c.header_ = make(http.Header) - } - return c.header_ -} - -func (c *ResponsePolicyRulesUpdateCall) doRequest(alt string) (*http.Response, error) { - reqHeaders := gensupport.SetHeaders(c.s.userAgent(), "application/json", c.header_) - body, err := googleapi.WithoutDataWrapper.JSONBuffer(c.responsepolicyrule) - if err != nil { - return nil, err - } - c.urlParams_.Set("alt", alt) - c.urlParams_.Set("prettyPrint", "false") - urls := googleapi.ResolveRelative(c.s.BasePath, "dns/v1/projects/{project}/responsePolicies/{responsePolicy}/rules/{responsePolicyRule}") - urls += "?" + c.urlParams_.Encode() - req, err := http.NewRequest("PUT", urls, body) - if err != nil { - return nil, err - } - req.Header = reqHeaders - googleapi.Expand(req.URL, map[string]string{ - "project": c.project, - "responsePolicy": c.responsePolicy, - "responsePolicyRule": c.responsePolicyRule, - }) - c.s.logger.DebugContext(c.ctx_, "api request", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.update", "request", internallog.HTTPRequest(req, body.Bytes())) - return gensupport.SendRequest(c.ctx_, c.s.client, req) -} - -// Do executes the "dns.responsePolicyRules.update" call. -// Any non-2xx status code is an error. Response headers are in either -// *ResponsePolicyRulesUpdateResponse.ServerResponse.Header or (if a response -// was returned at all) in error.(*googleapi.Error).Header. Use -// googleapi.IsNotModified to check whether the returned error was because -// http.StatusNotModified was returned. -func (c *ResponsePolicyRulesUpdateCall) Do(opts ...googleapi.CallOption) (*ResponsePolicyRulesUpdateResponse, error) { - gensupport.SetOptions(c.urlParams_, opts...) - res, err := c.doRequest("json") - if res != nil && res.StatusCode == http.StatusNotModified { - if res.Body != nil { - res.Body.Close() - } - return nil, gensupport.WrapError(&googleapi.Error{ - Code: res.StatusCode, - Header: res.Header, - }) - } - if err != nil { - return nil, err - } - defer googleapi.CloseBody(res) - if err := googleapi.CheckResponse(res); err != nil { - return nil, gensupport.WrapError(err) - } - ret := &ResponsePolicyRulesUpdateResponse{ - ServerResponse: googleapi.ServerResponse{ - Header: res.Header, - HTTPStatusCode: res.StatusCode, - }, - } - target := &ret - b, err := gensupport.DecodeResponseBytes(target, res) - if err != nil { - return nil, err - } - c.s.logger.DebugContext(c.ctx_, "api response", "serviceName", apiName, "rpcName", "dns.responsePolicyRules.update", "response", internallog.HTTPResponse(res, b)) - return ret, nil -} diff --git a/vendor/google.golang.org/api/googleapi/googleapi.go b/vendor/google.golang.org/api/googleapi/googleapi.go deleted file mode 100644 index f8a85d5a47..0000000000 --- a/vendor/google.golang.org/api/googleapi/googleapi.go +++ /dev/null @@ -1,537 +0,0 @@ -// Copyright 2011 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package googleapi contains the common code shared by all Google API -// libraries. -package googleapi // import "google.golang.org/api/googleapi" - -import ( - "bytes" - "encoding/json" - "fmt" - "io" - "net/http" - "net/url" - "strings" - "time" - - "google.golang.org/api/internal/third_party/uritemplates" -) - -// ContentTyper is an interface for Readers which know (or would like -// to override) their Content-Type. If a media body doesn't implement -// ContentTyper, the type is sniffed from the content using -// http.DetectContentType. -type ContentTyper interface { - ContentType() string -} - -// A SizeReaderAt is a ReaderAt with a Size method. -// An io.SectionReader implements SizeReaderAt. -type SizeReaderAt interface { - io.ReaderAt - Size() int64 -} - -// ServerResponse is embedded in each Do response and -// provides the HTTP status code and header sent by the server. -type ServerResponse struct { - // HTTPStatusCode is the server's response status code. When using a - // resource method's Do call, this will always be in the 2xx range. - HTTPStatusCode int - // Header contains the response header fields from the server. - Header http.Header -} - -const ( - // Version defines the gax version being used. This is typically sent - // in an HTTP header to services. - Version = "0.5" - - // UserAgent is the header string used to identify this package. - UserAgent = "google-api-go-client/" + Version - - // DefaultUploadChunkSize is the default chunk size to use for resumable - // uploads if not specified by the user. - DefaultUploadChunkSize = 16 * 1024 * 1024 - - // MinUploadChunkSize is the minimum chunk size that can be used for - // resumable uploads. All user-specified chunk sizes must be multiple of - // this value. - MinUploadChunkSize = 256 * 1024 -) - -// Error contains an error response from the server. -type Error struct { - // Code is the HTTP response status code and will always be populated. - Code int `json:"code"` - // Message is the server response message and is only populated when - // explicitly referenced by the JSON server response. - Message string `json:"message"` - // Details provide more context to an error. - Details []interface{} `json:"details"` - // Body is the raw response returned by the server. - // It is often but not always JSON, depending on how the request fails. - Body string - // Header contains the response header fields from the server. - Header http.Header - - Errors []ErrorItem - // err is typically a wrapped apierror.APIError, see - // google-api-go-client/internal/gensupport/error.go. - err error -} - -// ErrorItem is a detailed error code & message from the Google API frontend. -type ErrorItem struct { - // Reason is the typed error code. For example: "some_example". - Reason string `json:"reason"` - // Message is the human-readable description of the error. - Message string `json:"message"` -} - -func (e *Error) Error() string { - if len(e.Errors) == 0 && e.Message == "" { - return fmt.Sprintf("googleapi: got HTTP response code %d with body: %v", e.Code, e.Body) - } - var buf bytes.Buffer - fmt.Fprintf(&buf, "googleapi: Error %d: ", e.Code) - if e.Message != "" { - fmt.Fprintf(&buf, "%s", e.Message) - } - if len(e.Details) > 0 { - var detailBuf bytes.Buffer - enc := json.NewEncoder(&detailBuf) - enc.SetIndent("", " ") - if err := enc.Encode(e.Details); err == nil { - fmt.Fprint(&buf, "\nDetails:") - fmt.Fprintf(&buf, "\n%s", detailBuf.String()) - - } - } - if len(e.Errors) == 0 { - return strings.TrimSpace(buf.String()) - } - if len(e.Errors) == 1 && e.Errors[0].Message == e.Message { - fmt.Fprintf(&buf, ", %s", e.Errors[0].Reason) - return buf.String() - } - fmt.Fprintln(&buf, "\nMore details:") - for _, v := range e.Errors { - fmt.Fprintf(&buf, "Reason: %s, Message: %s\n", v.Reason, v.Message) - } - return buf.String() -} - -// Wrap allows an existing Error to wrap another error. See also [Error.Unwrap]. -func (e *Error) Wrap(err error) { - e.err = err -} - -func (e *Error) Unwrap() error { - return e.err -} - -type errorReply struct { - Error *Error `json:"error"` -} - -// CheckResponse returns an error (of type *Error) if the response -// status code is not 2xx. -func CheckResponse(res *http.Response) error { - if res.StatusCode >= 200 && res.StatusCode <= 299 { - return nil - } - slurp, err := io.ReadAll(res.Body) - if err == nil { - return CheckResponseWithBody(res, slurp) - } - return &Error{ - Code: res.StatusCode, - Body: string(slurp), - Header: res.Header, - } - -} - -// CheckResponseWithBody returns an error (of type *Error) if the response -// status code is not 2xx. Distinct from CheckResponse to allow for checking -// a previously-read body to maintain error detail content. -func CheckResponseWithBody(res *http.Response, body []byte) error { - if res.StatusCode >= 200 && res.StatusCode <= 299 { - return nil - } - - jerr, err := errorReplyFromBody(body) - if err == nil && jerr.Error != nil { - if jerr.Error.Code == 0 { - jerr.Error.Code = res.StatusCode - } - jerr.Error.Body = string(body) - jerr.Error.Header = res.Header - return jerr.Error - } - - return &Error{ - Code: res.StatusCode, - Body: string(body), - Header: res.Header, - } -} - -// errorReplyFromBody attempts to get the error from body. The body -// may be a JSON object or JSON array, or may be something else. -func errorReplyFromBody(body []byte) (*errorReply, error) { - jerr := new(errorReply) - if len(body) > 0 && body[0] == '[' { - // Attempt JSON array - jsonArr := []*errorReply{jerr} - err := json.Unmarshal(body, &jsonArr) - return jerr, err - } - // Attempt JSON object - err := json.Unmarshal(body, jerr) - return jerr, err -} - -// IsNotModified reports whether err is the result of the -// server replying with http.StatusNotModified. -// Such error values are sometimes returned by "Do" methods -// on calls when If-None-Match is used. -func IsNotModified(err error) bool { - if err == nil { - return false - } - ae, ok := err.(*Error) - return ok && ae.Code == http.StatusNotModified -} - -// CheckMediaResponse returns an error (of type *Error) if the response -// status code is not 2xx. Unlike CheckResponse it does not assume the -// body is a JSON error document. -// It is the caller's responsibility to close res.Body. -func CheckMediaResponse(res *http.Response) error { - if res.StatusCode >= 200 && res.StatusCode <= 299 { - return nil - } - slurp, _ := io.ReadAll(io.LimitReader(res.Body, 1<<20)) - return &Error{ - Code: res.StatusCode, - Body: string(slurp), - Header: res.Header, - } -} - -// MarshalStyle defines whether to marshal JSON with a {"data": ...} wrapper. -type MarshalStyle bool - -// WithDataWrapper marshals JSON with a {"data": ...} wrapper. -var WithDataWrapper = MarshalStyle(true) - -// WithoutDataWrapper marshals JSON without a {"data": ...} wrapper. -var WithoutDataWrapper = MarshalStyle(false) - -// JSONReader is like JSONBuffer, but returns an io.Reader instead. -func (wrap MarshalStyle) JSONReader(v interface{}) (io.Reader, error) { - buf, err := wrap.JSONBuffer(v) - if err != nil { - return nil, err - } - return buf, nil -} - -// JSONBuffer encodes the body and wraps it if needed. -func (wrap MarshalStyle) JSONBuffer(v interface{}) (*bytes.Buffer, error) { - buf := new(bytes.Buffer) - if wrap { - buf.Write([]byte(`{"data": `)) - } - err := json.NewEncoder(buf).Encode(v) - if err != nil { - return nil, err - } - if wrap { - buf.Write([]byte(`}`)) - } - return buf, nil -} - -// ProgressUpdater is a function that is called upon every progress update of a resumable upload. -// This is the only part of a resumable upload (from googleapi) that is usable by the developer. -// The remaining usable pieces of resumable uploads is exposed in each auto-generated API. -type ProgressUpdater func(current, total int64) - -// MediaOption defines the interface for setting media options. -type MediaOption interface { - setOptions(o *MediaOptions) -} - -type contentTypeOption string - -func (ct contentTypeOption) setOptions(o *MediaOptions) { - o.ContentType = string(ct) - if o.ContentType == "" { - o.ForceEmptyContentType = true - } -} - -// ContentType returns a MediaOption which sets the Content-Type header for media uploads. -// If ctype is empty, the Content-Type header will be omitted. -func ContentType(ctype string) MediaOption { - return contentTypeOption(ctype) -} - -type chunkSizeOption int - -func (cs chunkSizeOption) setOptions(o *MediaOptions) { - size := int(cs) - if size%MinUploadChunkSize != 0 { - size += MinUploadChunkSize - (size % MinUploadChunkSize) - } - o.ChunkSize = size -} - -// ChunkSize returns a MediaOption which sets the chunk size for media uploads. -// size will be rounded up to the nearest multiple of 256K. -// Media which contains fewer than size bytes will be uploaded in a single request. -// Media which contains size bytes or more will be uploaded in separate chunks. -// If size is zero, media will be uploaded in a single request. -func ChunkSize(size int) MediaOption { - return chunkSizeOption(size) -} - -type chunkTransferTimeoutOption time.Duration - -func (cd chunkTransferTimeoutOption) setOptions(o *MediaOptions) { - o.ChunkTransferTimeout = time.Duration(cd) -} - -// ChunkTransferTimeout returns a MediaOption which sets a per-chunk -// transfer timeout for resumable uploads. If a single chunk has been -// attempting to upload for longer than this time then the old req got canceled and retried. -// The default is no timeout for the request. -func ChunkTransferTimeout(timeout time.Duration) MediaOption { - return chunkTransferTimeoutOption(timeout) -} - -type chunkRetryDeadlineOption time.Duration - -func (cd chunkRetryDeadlineOption) setOptions(o *MediaOptions) { - o.ChunkRetryDeadline = time.Duration(cd) -} - -// ChunkRetryDeadline returns a MediaOption which sets a per-chunk retry -// deadline. If a single chunk has been attempting to upload for longer than -// this time and the request fails, it will no longer be retried, and the error -// will be returned to the caller. -// This is only applicable for files which are large enough to require -// a multi-chunk resumable upload. -// The default value is 32s. -// To set a deadline on the entire upload, use context timeout or cancellation. -func ChunkRetryDeadline(deadline time.Duration) MediaOption { - return chunkRetryDeadlineOption(deadline) -} - -// MediaOptions stores options for customizing media upload. It is not used by developers directly. -type MediaOptions struct { - ContentType string - ForceEmptyContentType bool - ChunkSize int - ChunkRetryDeadline time.Duration - ChunkTransferTimeout time.Duration -} - -// ProcessMediaOptions stores options from opts in a MediaOptions. -// It is not used by developers directly. -func ProcessMediaOptions(opts []MediaOption) *MediaOptions { - mo := &MediaOptions{ChunkSize: DefaultUploadChunkSize} - for _, o := range opts { - o.setOptions(mo) - } - return mo -} - -// ResolveRelative resolves relatives such as "http://www.golang.org/" and -// "topics/myproject/mytopic" into a single string, such as -// "http://www.golang.org/topics/myproject/mytopic". It strips all parent -// references (e.g. ../..) as well as anything after the host -// (e.g. /bar/gaz gets stripped out of foo.com/bar/gaz). -// -// ResolveRelative panics if either basestr or relstr is not able to be parsed. -func ResolveRelative(basestr, relstr string) string { - u, err := url.Parse(basestr) - if err != nil { - panic(fmt.Sprintf("failed to parse %q", basestr)) - } - afterColonPath := "" - if i := strings.IndexRune(relstr, ':'); i > 0 { - afterColonPath = relstr[i+1:] - relstr = relstr[:i] - } - rel, err := url.Parse(relstr) - if err != nil { - panic(fmt.Sprintf("failed to parse %q", relstr)) - } - u = u.ResolveReference(rel) - us := u.String() - if afterColonPath != "" { - us = fmt.Sprintf("%s:%s", us, afterColonPath) - } - us = strings.Replace(us, "%7B", "{", -1) - us = strings.Replace(us, "%7D", "}", -1) - us = strings.Replace(us, "%2A", "*", -1) - return us -} - -// Expand subsitutes any {encoded} strings in the URL passed in using -// the map supplied. -// -// This calls SetOpaque to avoid encoding of the parameters in the URL path. -func Expand(u *url.URL, expansions map[string]string) { - escaped, unescaped, err := uritemplates.Expand(u.Path, expansions) - if err == nil { - u.Path = unescaped - u.RawPath = escaped - } -} - -// CloseBody is used to close res.Body. -// Prior to calling Close, it also tries to Read a small amount to see an EOF. -// Not seeing an EOF can prevent HTTP Transports from reusing connections. -func CloseBody(res *http.Response) { - if res == nil || res.Body == nil { - return - } - // Justification for 3 byte reads: two for up to "\r\n" after - // a JSON/XML document, and then 1 to see EOF if we haven't yet. - // TODO(bradfitz): detect Go 1.3+ and skip these reads. - // See https://codereview.appspot.com/58240043 - // and https://codereview.appspot.com/49570044 - buf := make([]byte, 1) - for i := 0; i < 3; i++ { - _, err := res.Body.Read(buf) - if err != nil { - break - } - } - res.Body.Close() - -} - -// VariantType returns the type name of the given variant. -// If the map doesn't contain the named key or the value is not a []interface{}, "" is returned. -// This is used to support "variant" APIs that can return one of a number of different types. -func VariantType(t map[string]interface{}) string { - s, _ := t["type"].(string) - return s -} - -// ConvertVariant uses the JSON encoder/decoder to fill in the struct 'dst' with the fields found in variant 'v'. -// This is used to support "variant" APIs that can return one of a number of different types. -// It reports whether the conversion was successful. -func ConvertVariant(v map[string]interface{}, dst interface{}) bool { - var buf bytes.Buffer - err := json.NewEncoder(&buf).Encode(v) - if err != nil { - return false - } - return json.Unmarshal(buf.Bytes(), dst) == nil -} - -// A Field names a field to be retrieved with a partial response. -// https://cloud.google.com/storage/docs/json_api/v1/how-tos/performance -// -// Partial responses can dramatically reduce the amount of data that must be sent to your application. -// In order to request partial responses, you can specify the full list of fields -// that your application needs by adding the Fields option to your request. -// -// Field strings use camelCase with leading lower-case characters to identify fields within the response. -// -// For example, if your response has a "NextPageToken" and a slice of "Items" with "Id" fields, -// you could request just those fields like this: -// -// svc.Events.List().Fields("nextPageToken", "items/id").Do() -// -// or if you were also interested in each Item's "Updated" field, you can combine them like this: -// -// svc.Events.List().Fields("nextPageToken", "items(id,updated)").Do() -// -// Another way to find field names is through the Google API explorer: -// https://developers.google.com/apis-explorer/#p/ -type Field string - -// CombineFields combines fields into a single string. -func CombineFields(s []Field) string { - r := make([]string, len(s)) - for i, v := range s { - r[i] = string(v) - } - return strings.Join(r, ",") -} - -// A CallOption is an optional argument to an API call. -// It should be treated as an opaque value by users of Google APIs. -// -// A CallOption is something that configures an API call in a way that is -// not specific to that API; for instance, controlling the quota user for -// an API call is common across many APIs, and is thus a CallOption. -type CallOption interface { - Get() (key, value string) -} - -// A MultiCallOption is an option argument to an API call and can be passed -// anywhere a CallOption is accepted. It additionally supports returning a slice -// of values for a given key. -type MultiCallOption interface { - CallOption - GetMulti() (key string, value []string) -} - -// QuotaUser returns a CallOption that will set the quota user for a call. -// The quota user can be used by server-side applications to control accounting. -// It can be an arbitrary string up to 40 characters, and will override UserIP -// if both are provided. -func QuotaUser(u string) CallOption { return quotaUser(u) } - -type quotaUser string - -func (q quotaUser) Get() (string, string) { return "quotaUser", string(q) } - -// UserIP returns a CallOption that will set the "userIp" parameter of a call. -// This should be the IP address of the originating request. -func UserIP(ip string) CallOption { return userIP(ip) } - -type userIP string - -func (i userIP) Get() (string, string) { return "userIp", string(i) } - -// Trace returns a CallOption that enables diagnostic tracing for a call. -// traceToken is an ID supplied by Google support. -func Trace(traceToken string) CallOption { return traceTok(traceToken) } - -type traceTok string - -func (t traceTok) Get() (string, string) { return "trace", "token:" + string(t) } - -type queryParameter struct { - key string - values []string -} - -// QueryParameter allows setting the value(s) of an arbitrary key. -func QueryParameter(key string, values ...string) CallOption { - return queryParameter{key: key, values: append([]string{}, values...)} -} - -// Get will never actually be called -- GetMulti will. -func (q queryParameter) Get() (string, string) { - return "", "" -} - -// GetMulti returns the key and values values associated to that key. -func (q queryParameter) GetMulti() (string, []string) { - return q.key, q.values -} - -// TODO: Fields too diff --git a/vendor/google.golang.org/api/googleapi/transport/apikey.go b/vendor/google.golang.org/api/googleapi/transport/apikey.go deleted file mode 100644 index f5d826c2a1..0000000000 --- a/vendor/google.golang.org/api/googleapi/transport/apikey.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2012 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package transport contains HTTP transports used to make -// authenticated API requests. -// -// This package is DEPRECATED. Users should instead use, -// -// service, err := NewService(..., option.WithAPIKey(...)) -package transport - -import ( - "errors" - "net/http" -) - -// APIKey is an HTTP Transport which wraps an underlying transport and -// appends an API Key "key" parameter to the URL of outgoing requests. -// -// Deprecated: please use NewService(..., option.WithAPIKey(...)) instead. -type APIKey struct { - // Key is the API Key to set on requests. - Key string - - // Transport is the underlying HTTP transport. - // If nil, http.DefaultTransport is used. - Transport http.RoundTripper -} - -func (t *APIKey) RoundTrip(req *http.Request) (*http.Response, error) { - rt := t.Transport - if rt == nil { - rt = http.DefaultTransport - if rt == nil { - return nil, errors.New("googleapi/transport: no Transport specified or available") - } - } - newReq := *req - args := newReq.URL.Query() - args.Set("key", t.Key) - newReq.URL.RawQuery = args.Encode() - return rt.RoundTrip(&newReq) -} diff --git a/vendor/google.golang.org/api/googleapi/types.go b/vendor/google.golang.org/api/googleapi/types.go deleted file mode 100644 index fabf74d50d..0000000000 --- a/vendor/google.golang.org/api/googleapi/types.go +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2013 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package googleapi - -import ( - "encoding/json" - "errors" - "strconv" -) - -// Int64s is a slice of int64s that marshal as quoted strings in JSON. -type Int64s []int64 - -func (q *Int64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseInt(s, 10, 64) - if err != nil { - return err - } - *q = append(*q, int64(v)) - } - return nil -} - -// Int32s is a slice of int32s that marshal as quoted strings in JSON. -type Int32s []int32 - -func (q *Int32s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseInt(s, 10, 32) - if err != nil { - return err - } - *q = append(*q, int32(v)) - } - return nil -} - -// Uint64s is a slice of uint64s that marshal as quoted strings in JSON. -type Uint64s []uint64 - -func (q *Uint64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return err - } - *q = append(*q, uint64(v)) - } - return nil -} - -// Uint32s is a slice of uint32s that marshal as quoted strings in JSON. -type Uint32s []uint32 - -func (q *Uint32s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseUint(s, 10, 32) - if err != nil { - return err - } - *q = append(*q, uint32(v)) - } - return nil -} - -// Float64s is a slice of float64s that marshal as quoted strings in JSON. -type Float64s []float64 - -func (q *Float64s) UnmarshalJSON(raw []byte) error { - *q = (*q)[:0] - var ss []string - if err := json.Unmarshal(raw, &ss); err != nil { - return err - } - for _, s := range ss { - v, err := strconv.ParseFloat(s, 64) - if err != nil { - return err - } - *q = append(*q, float64(v)) - } - return nil -} - -func quotedList(n int, fn func(dst []byte, i int) []byte) ([]byte, error) { - dst := make([]byte, 0, 2+n*10) // somewhat arbitrary - dst = append(dst, '[') - for i := 0; i < n; i++ { - if i > 0 { - dst = append(dst, ',') - } - dst = append(dst, '"') - dst = fn(dst, i) - dst = append(dst, '"') - } - dst = append(dst, ']') - return dst, nil -} - -func (q Int64s) MarshalJSON() ([]byte, error) { - return quotedList(len(q), func(dst []byte, i int) []byte { - return strconv.AppendInt(dst, q[i], 10) - }) -} - -func (q Int32s) MarshalJSON() ([]byte, error) { - return quotedList(len(q), func(dst []byte, i int) []byte { - return strconv.AppendInt(dst, int64(q[i]), 10) - }) -} - -func (q Uint64s) MarshalJSON() ([]byte, error) { - return quotedList(len(q), func(dst []byte, i int) []byte { - return strconv.AppendUint(dst, q[i], 10) - }) -} - -func (q Uint32s) MarshalJSON() ([]byte, error) { - return quotedList(len(q), func(dst []byte, i int) []byte { - return strconv.AppendUint(dst, uint64(q[i]), 10) - }) -} - -func (q Float64s) MarshalJSON() ([]byte, error) { - return quotedList(len(q), func(dst []byte, i int) []byte { - return strconv.AppendFloat(dst, q[i], 'g', -1, 64) - }) -} - -// RawMessage is a raw encoded JSON value. -// It is identical to json.RawMessage, except it does not suffer from -// https://golang.org/issue/14493. -type RawMessage []byte - -// MarshalJSON returns m. -func (m RawMessage) MarshalJSON() ([]byte, error) { - return m, nil -} - -// UnmarshalJSON sets *m to a copy of data. -func (m *RawMessage) UnmarshalJSON(data []byte) error { - if m == nil { - return errors.New("googleapi.RawMessage: UnmarshalJSON on nil pointer") - } - *m = append((*m)[:0], data...) - return nil -} - -/* - * Helper routines for simplifying the creation of optional fields of basic type. - */ - -// Bool is a helper routine that allocates a new bool value -// to store v and returns a pointer to it. -func Bool(v bool) *bool { return &v } - -// Int32 is a helper routine that allocates a new int32 value -// to store v and returns a pointer to it. -func Int32(v int32) *int32 { return &v } - -// Int64 is a helper routine that allocates a new int64 value -// to store v and returns a pointer to it. -func Int64(v int64) *int64 { return &v } - -// Float64 is a helper routine that allocates a new float64 value -// to store v and returns a pointer to it. -func Float64(v float64) *float64 { return &v } - -// Uint32 is a helper routine that allocates a new uint32 value -// to store v and returns a pointer to it. -func Uint32(v uint32) *uint32 { return &v } - -// Uint64 is a helper routine that allocates a new uint64 value -// to store v and returns a pointer to it. -func Uint64(v uint64) *uint64 { return &v } - -// String is a helper routine that allocates a new string value -// to store v and returns a pointer to it. -func String(v string) *string { return &v } diff --git a/vendor/google.golang.org/api/internal/cba.go b/vendor/google.golang.org/api/internal/cba.go deleted file mode 100644 index 7b13dc8369..0000000000 --- a/vendor/google.golang.org/api/internal/cba.go +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright 2020 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// cba.go (certificate-based access) contains utils for implementing Device Certificate -// Authentication according to https://google.aip.dev/auth/4114 and Default Credentials -// for Google Cloud Virtual Environments according to https://google.aip.dev/auth/4115. -// -// The overall logic for DCA is as follows: -// 1. If both endpoint override and client certificate are specified, use them as is. -// 2. If user does not specify client certificate, we will attempt to use default -// client certificate. -// 3. If user does not specify endpoint override, we will use defaultMtlsEndpoint if -// client certificate is available and defaultEndpoint otherwise. -// -// Implications of the above logic: -// 1. If the user specifies a non-mTLS endpoint override but client certificate is -// available, we will pass along the cert anyway and let the server decide what to do. -// 2. If the user specifies an mTLS endpoint override but client certificate is not -// available, we will not fail-fast, but let backend throw error when connecting. -// -// If running within Google's cloud environment, and client certificate is not specified -// and not available through DCA, we will try mTLS with credentials held by -// the Secure Session Agent, which is part of Google's cloud infrastructure. -// -// We would like to avoid introducing client-side logic that parses whether the -// endpoint override is an mTLS url, since the url pattern may change at anytime. -// -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. - -// Package internal supports the options and transport packages. -package internal - -import ( - "context" - "crypto/tls" - "errors" - "net" - "net/url" - "os" - "strings" - - "github.com/google/s2a-go" - "google.golang.org/api/internal/cert" - "google.golang.org/grpc/credentials" -) - -const ( - mTLSModeAlways = "always" - mTLSModeNever = "never" - mTLSModeAuto = "auto" - - // Experimental: if true, the code will try MTLS with S2A as the default for transport security. Default value is false. - googleAPIUseS2AEnv = "EXPERIMENTAL_GOOGLE_API_USE_S2A" - - universeDomainPlaceholder = "UNIVERSE_DOMAIN" -) - -var ( - errUniverseNotSupportedMTLS = errors.New("mTLS is not supported in any universe other than googleapis.com") -) - -// getClientCertificateSourceAndEndpoint is a convenience function that invokes -// getClientCertificateSource and getEndpoint sequentially and returns the client -// cert source and endpoint as a tuple. -func getClientCertificateSourceAndEndpoint(settings *DialSettings) (cert.Source, string, error) { - clientCertSource, err := getClientCertificateSource(settings) - if err != nil { - return nil, "", err - } - endpoint, err := getEndpoint(settings, clientCertSource) - if err != nil { - return nil, "", err - } - // TODO(chrisdsmith): https://github.com/googleapis/google-api-go-client/issues/2359 - if settings.Endpoint == "" && !settings.IsUniverseDomainGDU() && settings.DefaultEndpointTemplate != "" { - // TODO(chrisdsmith): https://github.com/googleapis/google-api-go-client/issues/2359 - // if settings.DefaultEndpointTemplate == "" { - // return nil, "", errors.New("internaloption.WithDefaultEndpointTemplate is required if option.WithUniverseDomain is not googleapis.com") - // } - endpoint = resolvedDefaultEndpoint(settings) - } - return clientCertSource, endpoint, nil -} - -type transportConfig struct { - clientCertSource cert.Source // The client certificate source. - endpoint string // The corresponding endpoint to use based on client certificate source. - s2aAddress string // The S2A address if it can be used, otherwise an empty string. - s2aMTLSEndpoint string // The MTLS endpoint to use with S2A. -} - -func getTransportConfig(settings *DialSettings) (*transportConfig, error) { - clientCertSource, endpoint, err := getClientCertificateSourceAndEndpoint(settings) - if err != nil { - return nil, err - } - defaultTransportConfig := transportConfig{ - clientCertSource: clientCertSource, - endpoint: endpoint, - s2aAddress: "", - s2aMTLSEndpoint: "", - } - - if !shouldUseS2A(clientCertSource, settings) { - return &defaultTransportConfig, nil - } - if !settings.IsUniverseDomainGDU() { - return nil, errUniverseNotSupportedMTLS - } - - s2aAddress := GetS2AAddress() - if s2aAddress == "" { - return &defaultTransportConfig, nil - } - return &transportConfig{ - clientCertSource: clientCertSource, - endpoint: endpoint, - s2aAddress: s2aAddress, - s2aMTLSEndpoint: settings.DefaultMTLSEndpoint, - }, nil -} - -// getClientCertificateSource returns a default client certificate source, if -// not provided by the user. -// -// A nil default source can be returned if the source does not exist. Any exceptions -// encountered while initializing the default source will be reported as client -// error (ex. corrupt metadata file). -// -// Important Note: For now, the environment variable GOOGLE_API_USE_CLIENT_CERTIFICATE -// must be set to "true" to allow certificate to be used (including user provided -// certificates). For details, see AIP-4114. -func getClientCertificateSource(settings *DialSettings) (cert.Source, error) { - if !isClientCertificateEnabled() { - return nil, nil - } else if settings.ClientCertSource != nil { - return settings.ClientCertSource, nil - } else { - return cert.DefaultSource() - } -} - -func isClientCertificateEnabled() bool { - useClientCert := os.Getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE") - // TODO(andyrzhao): Update default to return "true" after DCA feature is fully released. - return strings.ToLower(useClientCert) == "true" -} - -// getEndpoint returns the endpoint for the service, taking into account the -// user-provided endpoint override "settings.Endpoint". -// -// If no endpoint override is specified, we will either return the default endpoint or -// the default mTLS endpoint if a client certificate is available. -// -// You can override the default endpoint choice (mtls vs. regular) by setting the -// GOOGLE_API_USE_MTLS_ENDPOINT environment variable. -// -// If the endpoint override is an address (host:port) rather than full base -// URL (ex. https://...), then the user-provided address will be merged into -// the default endpoint. For example, WithEndpoint("myhost:8000") and -// WithDefaultEndpoint("https://foo.com/bar/baz") will return "https://myhost:8080/bar/baz" -func getEndpoint(settings *DialSettings, clientCertSource cert.Source) (string, error) { - if settings.Endpoint == "" { - if isMTLS(clientCertSource) { - if !settings.IsUniverseDomainGDU() { - return "", errUniverseNotSupportedMTLS - } - return settings.DefaultMTLSEndpoint, nil - } - return resolvedDefaultEndpoint(settings), nil - } - if strings.Contains(settings.Endpoint, "://") { - // User passed in a full URL path, use it verbatim. - return settings.Endpoint, nil - } - if resolvedDefaultEndpoint(settings) == "" { - // If DefaultEndpoint is not configured, use the user provided endpoint verbatim. - // This allows a naked "host[:port]" URL to be used with GRPC Direct Path. - return settings.Endpoint, nil - } - - // Assume user-provided endpoint is host[:port], merge it with the default endpoint. - return mergeEndpoints(resolvedDefaultEndpoint(settings), settings.Endpoint) -} - -func isMTLS(clientCertSource cert.Source) bool { - mtlsMode := getMTLSMode() - return mtlsMode == mTLSModeAlways || (clientCertSource != nil && mtlsMode == mTLSModeAuto) -} - -// resolvedDefaultEndpoint returns the DefaultEndpointTemplate merged with the -// Universe Domain if the DefaultEndpointTemplate is set, otherwise returns the -// deprecated DefaultEndpoint value. -func resolvedDefaultEndpoint(settings *DialSettings) string { - if settings.DefaultEndpointTemplate == "" { - return settings.DefaultEndpoint - } - return strings.Replace(settings.DefaultEndpointTemplate, universeDomainPlaceholder, settings.GetUniverseDomain(), 1) -} - -func getMTLSMode() string { - mode := os.Getenv("GOOGLE_API_USE_MTLS_ENDPOINT") - if mode == "" { - mode = os.Getenv("GOOGLE_API_USE_MTLS") // Deprecated. - } - if mode == "" { - return mTLSModeAuto - } - return strings.ToLower(mode) -} - -func mergeEndpoints(baseURL, newHost string) (string, error) { - u, err := url.Parse(fixScheme(baseURL)) - if err != nil { - return "", err - } - return strings.Replace(baseURL, u.Host, newHost, 1), nil -} - -func fixScheme(baseURL string) string { - if !strings.Contains(baseURL, "://") { - return "https://" + baseURL - } - return baseURL -} - -// GetGRPCTransportConfigAndEndpoint returns an instance of credentials.TransportCredentials, and the -// corresponding endpoint to use for GRPC client. -func GetGRPCTransportConfigAndEndpoint(settings *DialSettings) (credentials.TransportCredentials, string, error) { - config, err := getTransportConfig(settings) - if err != nil { - return nil, "", err - } - - defaultTransportCreds := credentials.NewTLS(&tls.Config{ - GetClientCertificate: config.clientCertSource, - }) - if config.s2aAddress == "" { - return defaultTransportCreds, config.endpoint, nil - } - - s2aTransportCreds, err := s2a.NewClientCreds(&s2a.ClientOptions{ - S2AAddress: config.s2aAddress, - }) - if err != nil { - // Use default if we cannot initialize S2A client transport credentials. - return defaultTransportCreds, config.endpoint, nil - } - return s2aTransportCreds, config.s2aMTLSEndpoint, nil -} - -// GetHTTPTransportConfigAndEndpoint returns a client certificate source, a function for dialing MTLS with S2A, -// and the endpoint to use for HTTP client. -func GetHTTPTransportConfigAndEndpoint(settings *DialSettings) (cert.Source, func(context.Context, string, string) (net.Conn, error), string, error) { - config, err := getTransportConfig(settings) - if err != nil { - return nil, nil, "", err - } - - if config.s2aAddress == "" { - return config.clientCertSource, nil, config.endpoint, nil - } - - dialTLSContextFunc := s2a.NewS2ADialTLSContextFunc(&s2a.ClientOptions{ - S2AAddress: config.s2aAddress, - }) - return nil, dialTLSContextFunc, config.s2aMTLSEndpoint, nil -} - -func shouldUseS2A(clientCertSource cert.Source, settings *DialSettings) bool { - // If client cert is found, use that over S2A. - if clientCertSource != nil { - return false - } - // If EXPERIMENTAL_GOOGLE_API_USE_S2A is not set to true, skip S2A. - if !isGoogleS2AEnabled() { - return false - } - // If DefaultMTLSEndpoint is not set or has endpoint override, skip S2A. - if settings.DefaultMTLSEndpoint == "" || settings.Endpoint != "" { - return false - } - // If custom HTTP client is provided, skip S2A. - if settings.HTTPClient != nil { - return false - } - return !settings.EnableDirectPath && !settings.EnableDirectPathXds -} - -func isGoogleS2AEnabled() bool { - return strings.ToLower(os.Getenv(googleAPIUseS2AEnv)) == "true" -} diff --git a/vendor/google.golang.org/api/internal/cert/default_cert.go b/vendor/google.golang.org/api/internal/cert/default_cert.go deleted file mode 100644 index 21d0251531..0000000000 --- a/vendor/google.golang.org/api/internal/cert/default_cert.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2020 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cert contains certificate tools for Google API clients. -// This package is intended to be used with crypto/tls.Config.GetClientCertificate. -// -// The certificates can be used to satisfy Google's Endpoint Validation. -// See https://cloud.google.com/endpoint-verification/docs/overview -// -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. -package cert - -import ( - "crypto/tls" - "errors" - "sync" -) - -// defaultCertData holds all the variables pertaining to -// the default certficate source created by DefaultSource. -// -// A singleton model is used to allow the source to be reused -// by the transport layer. -type defaultCertData struct { - once sync.Once - source Source - err error -} - -var ( - defaultCert defaultCertData -) - -// Source is a function that can be passed into crypto/tls.Config.GetClientCertificate. -type Source func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - -// errSourceUnavailable is a sentinel error to indicate certificate source is unavailable. -var errSourceUnavailable = errors.New("certificate source is unavailable") - -// DefaultSource returns a certificate source using the preferred EnterpriseCertificateProxySource. -// If EnterpriseCertificateProxySource is not available, fall back to the legacy SecureConnectSource. -// -// If neither source is available (due to missing configurations), a nil Source and a nil Error are -// returned to indicate that a default certificate source is unavailable. -func DefaultSource() (Source, error) { - defaultCert.once.Do(func() { - defaultCert.source, defaultCert.err = NewEnterpriseCertificateProxySource("") - if errors.Is(defaultCert.err, errSourceUnavailable) { - defaultCert.source, defaultCert.err = NewSecureConnectSource("") - if errors.Is(defaultCert.err, errSourceUnavailable) { - defaultCert.source, defaultCert.err = nil, nil - } - } - }) - return defaultCert.source, defaultCert.err -} diff --git a/vendor/google.golang.org/api/internal/cert/enterprise_cert.go b/vendor/google.golang.org/api/internal/cert/enterprise_cert.go deleted file mode 100644 index 1061b5f05f..0000000000 --- a/vendor/google.golang.org/api/internal/cert/enterprise_cert.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cert contains certificate tools for Google API clients. -// This package is intended to be used with crypto/tls.Config.GetClientCertificate. -// -// The certificates can be used to satisfy Google's Endpoint Validation. -// See https://cloud.google.com/endpoint-verification/docs/overview -// -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. -package cert - -import ( - "crypto/tls" - "errors" - - "github.com/googleapis/enterprise-certificate-proxy/client" -) - -type ecpSource struct { - key *client.Key -} - -// NewEnterpriseCertificateProxySource creates a certificate source -// using the Enterprise Certificate Proxy client, which delegates -// certifcate related operations to an OS-specific "signer binary" -// that communicates with the native keystore (ex. keychain on MacOS). -// -// The configFilePath points to a config file containing relevant parameters -// such as the certificate issuer and the location of the signer binary. -// If configFilePath is empty, the client will attempt to load the config from -// a well-known gcloud location. -func NewEnterpriseCertificateProxySource(configFilePath string) (Source, error) { - key, err := client.Cred(configFilePath) - if err != nil { - if errors.Is(err, client.ErrCredUnavailable) { - return nil, errSourceUnavailable - } - return nil, err - } - - return (&ecpSource{ - key: key, - }).getClientCertificate, nil -} - -func (s *ecpSource) getClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error) { - var cert tls.Certificate - cert.PrivateKey = s.key - cert.Certificate = s.key.CertificateChain() - return &cert, nil -} diff --git a/vendor/google.golang.org/api/internal/cert/secureconnect_cert.go b/vendor/google.golang.org/api/internal/cert/secureconnect_cert.go deleted file mode 100644 index afd79ffe2b..0000000000 --- a/vendor/google.golang.org/api/internal/cert/secureconnect_cert.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2022 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package cert contains certificate tools for Google API clients. -// This package is intended to be used with crypto/tls.Config.GetClientCertificate. -// -// The certificates can be used to satisfy Google's Endpoint Validation. -// See https://cloud.google.com/endpoint-verification/docs/overview -// -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. -package cert - -import ( - "crypto/tls" - "crypto/x509" - "encoding/json" - "errors" - "fmt" - "os" - "os/exec" - "os/user" - "path/filepath" - "sync" - "time" -) - -const ( - metadataPath = ".secureConnect" - metadataFile = "context_aware_metadata.json" -) - -type secureConnectSource struct { - metadata secureConnectMetadata - - // Cache the cert to avoid executing helper command repeatedly. - cachedCertMutex sync.Mutex - cachedCert *tls.Certificate -} - -type secureConnectMetadata struct { - Cmd []string `json:"cert_provider_command"` -} - -// NewSecureConnectSource creates a certificate source using -// the Secure Connect Helper and its associated metadata file. -// -// The configFilePath points to the location of the context aware metadata file. -// If configFilePath is empty, use the default context aware metadata location. -func NewSecureConnectSource(configFilePath string) (Source, error) { - if configFilePath == "" { - user, err := user.Current() - if err != nil { - // Error locating the default config means Secure Connect is not supported. - return nil, errSourceUnavailable - } - configFilePath = filepath.Join(user.HomeDir, metadataPath, metadataFile) - } - - file, err := os.ReadFile(configFilePath) - if err != nil { - if errors.Is(err, os.ErrNotExist) { - // Config file missing means Secure Connect is not supported. - return nil, errSourceUnavailable - } - return nil, err - } - - var metadata secureConnectMetadata - if err := json.Unmarshal(file, &metadata); err != nil { - return nil, fmt.Errorf("cert: could not parse JSON in %q: %w", configFilePath, err) - } - if err := validateMetadata(metadata); err != nil { - return nil, fmt.Errorf("cert: invalid config in %q: %w", configFilePath, err) - } - return (&secureConnectSource{ - metadata: metadata, - }).getClientCertificate, nil -} - -func validateMetadata(metadata secureConnectMetadata) error { - if len(metadata.Cmd) == 0 { - return errors.New("empty cert_provider_command") - } - return nil -} - -func (s *secureConnectSource) getClientCertificate(info *tls.CertificateRequestInfo) (*tls.Certificate, error) { - s.cachedCertMutex.Lock() - defer s.cachedCertMutex.Unlock() - if s.cachedCert != nil && !isCertificateExpired(s.cachedCert) { - return s.cachedCert, nil - } - // Expand OS environment variables in the cert provider command such as "$HOME". - for i := 0; i < len(s.metadata.Cmd); i++ { - s.metadata.Cmd[i] = os.ExpandEnv(s.metadata.Cmd[i]) - } - command := s.metadata.Cmd - data, err := exec.Command(command[0], command[1:]...).Output() - if err != nil { - return nil, err - } - cert, err := tls.X509KeyPair(data, data) - if err != nil { - return nil, err - } - s.cachedCert = &cert - return &cert, nil -} - -// isCertificateExpired returns true if the given cert is expired or invalid. -func isCertificateExpired(cert *tls.Certificate) bool { - if len(cert.Certificate) == 0 { - return true - } - parsed, err := x509.ParseCertificate(cert.Certificate[0]) - if err != nil { - return true - } - return time.Now().After(parsed.NotAfter) -} diff --git a/vendor/google.golang.org/api/internal/conn_pool.go b/vendor/google.golang.org/api/internal/conn_pool.go deleted file mode 100644 index fedcce15b4..0000000000 --- a/vendor/google.golang.org/api/internal/conn_pool.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -import ( - "google.golang.org/grpc" -) - -// ConnPool is a pool of grpc.ClientConns. -type ConnPool interface { - // Conn returns a ClientConn from the pool. - // - // Conns aren't returned to the pool. - Conn() *grpc.ClientConn - - // Num returns the number of connections in the pool. - // - // It will always return the same value. - Num() int - - // Close closes every ClientConn in the pool. - // - // The error returned by Close may be a single error or multiple errors. - Close() error - - // ConnPool implements grpc.ClientConnInterface to enable it to be used directly with generated proto stubs. - grpc.ClientConnInterface -} diff --git a/vendor/google.golang.org/api/internal/creds.go b/vendor/google.golang.org/api/internal/creds.go deleted file mode 100644 index 92bb42c321..0000000000 --- a/vendor/google.golang.org/api/internal/creds.go +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright 2017 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -import ( - "context" - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "net" - "net/http" - "os" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials" - "cloud.google.com/go/auth/oauth2adapt" - "golang.org/x/oauth2" - "google.golang.org/api/internal/cert" - "google.golang.org/api/internal/impersonate" - - "golang.org/x/oauth2/google" -) - -const quotaProjectEnvVar = "GOOGLE_CLOUD_QUOTA_PROJECT" - -// Creds returns credential information obtained from DialSettings, or if none, then -// it returns default credential information. -func Creds(ctx context.Context, ds *DialSettings) (*google.Credentials, error) { - if ds.IsNewAuthLibraryEnabled() { - return credsNewAuth(ds) - } - creds, err := baseCreds(ctx, ds) - if err != nil { - return nil, err - } - if ds.ImpersonationConfig != nil { - return impersonateCredentials(ctx, creds, ds) - } - return creds, nil -} - -// AuthCreds returns [cloud.google.com/go/auth.Credentials] based on credentials -// options provided via [option.ClientOption], including legacy oauth2/google -// options. If there are no applicable options, then it returns the result of -// [cloud.google.com/go/auth/credentials.DetectDefault]. -// Note: If NoAuth is true, when [google.golang.org/api/option.WithoutAuthentication] -// is passed, then no authentication will be performed and this function will -// return nil, nil. -func AuthCreds(ctx context.Context, settings *DialSettings) (*auth.Credentials, error) { - if settings.NoAuth { - return nil, nil - } - if settings.AuthCredentials != nil { - return settings.AuthCredentials, nil - } - // Support oauth2/google options - var oauth2Creds *google.Credentials - if settings.InternalCredentials != nil { - oauth2Creds = settings.InternalCredentials - } else if settings.Credentials != nil { - oauth2Creds = settings.Credentials - } else if settings.TokenSource != nil { - oauth2Creds = &google.Credentials{TokenSource: settings.TokenSource} - } - if oauth2Creds != nil { - return oauth2adapt.AuthCredentialsFromOauth2Credentials(oauth2Creds), nil - } - - return detectDefaultFromDialSettings(settings) -} - -// GetOAuth2Configuration determines configurations for the OAuth2 transport, which is separate from the API transport. -// The OAuth2 transport and endpoint will be configured for mTLS if applicable. -func GetOAuth2Configuration(ctx context.Context, settings *DialSettings) (string, *http.Client, error) { - clientCertSource, err := getClientCertificateSource(settings) - if err != nil { - return "", nil, err - } - tokenURL := oAuth2Endpoint(clientCertSource) - var oauth2Client *http.Client - if clientCertSource != nil { - tlsConfig := &tls.Config{ - GetClientCertificate: clientCertSource, - } - oauth2Client = customHTTPClient(tlsConfig) - } else { - oauth2Client = oauth2.NewClient(ctx, nil) - } - return tokenURL, oauth2Client, nil -} - -func credsNewAuth(settings *DialSettings) (*google.Credentials, error) { - // Preserve old options behavior - if settings.InternalCredentials != nil { - return settings.InternalCredentials, nil - } else if settings.Credentials != nil { - return settings.Credentials, nil - } else if settings.TokenSource != nil { - return &google.Credentials{TokenSource: settings.TokenSource}, nil - } - - if settings.AuthCredentials != nil { - return oauth2adapt.Oauth2CredentialsFromAuthCredentials(settings.AuthCredentials), nil - } - - creds, err := detectDefaultFromDialSettings(settings) - if err != nil { - return nil, err - } - return oauth2adapt.Oauth2CredentialsFromAuthCredentials(creds), nil -} - -func detectDefaultFromDialSettings(settings *DialSettings) (*auth.Credentials, error) { - var useSelfSignedJWT bool - var aud string - var scopes []string - // If scoped JWTs are enabled user provided an aud, allow self-signed JWT. - if settings.EnableJwtWithScope || len(settings.Audiences) > 0 { - useSelfSignedJWT = true - } - - if len(settings.Scopes) > 0 { - scopes = make([]string, len(settings.Scopes)) - copy(scopes, settings.Scopes) - } - if len(settings.Audiences) > 0 { - aud = settings.Audiences[0] - } - // Only default scopes if user did not also set an audience. - if len(settings.Scopes) == 0 && aud == "" && len(settings.DefaultScopes) > 0 { - scopes = make([]string, len(settings.DefaultScopes)) - copy(scopes, settings.DefaultScopes) - } - if len(scopes) == 0 && aud == "" { - aud = settings.DefaultAudience - } - - return credentials.DetectDefault(&credentials.DetectOptions{ - Scopes: scopes, - Audience: aud, - CredentialsFile: settings.CredentialsFile, - CredentialsJSON: settings.CredentialsJSON, - UseSelfSignedJWT: useSelfSignedJWT, - Logger: settings.Logger, - }) -} - -func baseCreds(ctx context.Context, ds *DialSettings) (*google.Credentials, error) { - if ds.InternalCredentials != nil { - return ds.InternalCredentials, nil - } - if ds.Credentials != nil { - return ds.Credentials, nil - } - if len(ds.CredentialsJSON) > 0 { - return credentialsFromJSON(ctx, ds.CredentialsJSON, ds) - } - if ds.CredentialsFile != "" { - data, err := os.ReadFile(ds.CredentialsFile) - if err != nil { - return nil, fmt.Errorf("cannot read credentials file: %v", err) - } - return credentialsFromJSON(ctx, data, ds) - } - if ds.TokenSource != nil { - return &google.Credentials{TokenSource: ds.TokenSource}, nil - } - cred, err := google.FindDefaultCredentials(ctx, ds.GetScopes()...) - if err != nil { - return nil, err - } - if len(cred.JSON) > 0 { - return credentialsFromJSON(ctx, cred.JSON, ds) - } - // For GAE and GCE, the JSON is empty so return the default credentials directly. - return cred, nil -} - -// JSON key file type. -const ( - serviceAccountKey = "service_account" -) - -// credentialsFromJSON returns a google.Credentials from the JSON data -// -// - A self-signed JWT flow will be executed if the following conditions are -// met: -// -// (1) At least one of the following is true: -// (a) Scope for self-signed JWT flow is enabled -// (b) Audiences are explicitly provided by users -// (2) No service account impersontation -// -// - Otherwise, executes standard OAuth 2.0 flow -// More details: google.aip.dev/auth/4111 -func credentialsFromJSON(ctx context.Context, data []byte, ds *DialSettings) (*google.Credentials, error) { - var params google.CredentialsParams - params.Scopes = ds.GetScopes() - - tokenURL, oauth2Client, err := GetOAuth2Configuration(ctx, ds) - if err != nil { - return nil, err - } - params.TokenURL = tokenURL - ctx = context.WithValue(ctx, oauth2.HTTPClient, oauth2Client) - - // By default, a standard OAuth 2.0 token source is created - cred, err := google.CredentialsFromJSONWithParams(ctx, data, params) - if err != nil { - return nil, err - } - - // Override the token source to use self-signed JWT if conditions are met - isJWTFlow, err := isSelfSignedJWTFlow(data, ds) - if err != nil { - return nil, err - } - if isJWTFlow { - ts, err := selfSignedJWTTokenSource(data, ds) - if err != nil { - return nil, err - } - cred.TokenSource = ts - } - - return cred, err -} - -func oAuth2Endpoint(clientCertSource cert.Source) string { - if isMTLS(clientCertSource) { - return google.MTLSTokenURL - } - return google.Endpoint.TokenURL -} - -func isSelfSignedJWTFlow(data []byte, ds *DialSettings) (bool, error) { - // For non-GDU universe domains, token exchange is impossible and services - // must support self-signed JWTs with scopes. - if !ds.IsUniverseDomainGDU() { - return typeServiceAccount(data) - } - if (ds.EnableJwtWithScope || ds.HasCustomAudience()) && ds.ImpersonationConfig == nil { - return typeServiceAccount(data) - } - return false, nil -} - -// typeServiceAccount checks if JSON data is for a service account. -func typeServiceAccount(data []byte) (bool, error) { - var f struct { - Type string `json:"type"` - // The remaining JSON fields are omitted because they are not used. - } - if err := json.Unmarshal(data, &f); err != nil { - return false, err - } - return f.Type == serviceAccountKey, nil -} - -func selfSignedJWTTokenSource(data []byte, ds *DialSettings) (oauth2.TokenSource, error) { - if len(ds.GetScopes()) > 0 && !ds.HasCustomAudience() { - // Scopes are preferred in self-signed JWT unless the scope is not available - // or a custom audience is used. - return google.JWTAccessTokenSourceWithScope(data, ds.GetScopes()...) - } else if ds.GetAudience() != "" { - // Fallback to audience if scope is not provided - return google.JWTAccessTokenSourceFromJSON(data, ds.GetAudience()) - } else { - return nil, errors.New("neither scopes or audience are available for the self-signed JWT") - } -} - -// GetQuotaProject retrieves quota project with precedence being: client option, -// environment variable, creds file. -func GetQuotaProject(creds *google.Credentials, clientOpt string) string { - if clientOpt != "" { - return clientOpt - } - if env := os.Getenv(quotaProjectEnvVar); env != "" { - return env - } - if creds == nil { - return "" - } - var v struct { - QuotaProject string `json:"quota_project_id"` - } - if err := json.Unmarshal(creds.JSON, &v); err != nil { - return "" - } - return v.QuotaProject -} - -func impersonateCredentials(ctx context.Context, creds *google.Credentials, ds *DialSettings) (*google.Credentials, error) { - if len(ds.ImpersonationConfig.Scopes) == 0 { - ds.ImpersonationConfig.Scopes = ds.GetScopes() - } - ts, err := impersonate.TokenSource(ctx, creds.TokenSource, ds.ImpersonationConfig) - if err != nil { - return nil, err - } - return &google.Credentials{ - TokenSource: ts, - ProjectID: creds.ProjectID, - }, nil -} - -// customHTTPClient constructs an HTTPClient using the provided tlsConfig, to support mTLS. -func customHTTPClient(tlsConfig *tls.Config) *http.Client { - trans := baseTransport() - trans.TLSClientConfig = tlsConfig - return &http.Client{Transport: trans} -} - -func baseTransport() *http.Transport { - return &http.Transport{ - Proxy: http.ProxyFromEnvironment, - DialContext: (&net.Dialer{ - Timeout: 30 * time.Second, - KeepAlive: 30 * time.Second, - DualStack: true, - }).DialContext, - MaxIdleConns: 100, - MaxIdleConnsPerHost: 100, - IdleConnTimeout: 90 * time.Second, - TLSHandshakeTimeout: 10 * time.Second, - ExpectContinueTimeout: 1 * time.Second, - } -} diff --git a/vendor/google.golang.org/api/internal/gensupport/buffer.go b/vendor/google.golang.org/api/internal/gensupport/buffer.go deleted file mode 100644 index 3d0817ede9..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/buffer.go +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright 2016 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 gensupport - -import ( - "bytes" - "io" - - "google.golang.org/api/googleapi" -) - -// MediaBuffer buffers data from an io.Reader to support uploading media in -// retryable chunks. It should be created with NewMediaBuffer. -type MediaBuffer struct { - media io.Reader - - chunk []byte // The current chunk which is pending upload. The capacity is the chunk size. - err error // Any error generated when populating chunk by reading media. - - // The absolute position of chunk in the underlying media. - off int64 -} - -// NewMediaBuffer initializes a MediaBuffer. -func NewMediaBuffer(media io.Reader, chunkSize int) *MediaBuffer { - return &MediaBuffer{media: media, chunk: make([]byte, 0, chunkSize)} -} - -// Chunk returns the current buffered chunk, the offset in the underlying media -// from which the chunk is drawn, and the size of the chunk. -// Successive calls to Chunk return the same chunk between calls to Next. -func (mb *MediaBuffer) Chunk() (chunk io.Reader, off int64, size int, err error) { - // There may already be data in chunk if Next has not been called since the previous call to Chunk. - if mb.err == nil && len(mb.chunk) == 0 { - mb.err = mb.loadChunk() - } - return bytes.NewReader(mb.chunk), mb.off, len(mb.chunk), mb.err -} - -// loadChunk will read from media into chunk, up to the capacity of chunk. -func (mb *MediaBuffer) loadChunk() error { - bufSize := cap(mb.chunk) - mb.chunk = mb.chunk[:bufSize] - - read := 0 - var err error - for err == nil && read < bufSize { - var n int - n, err = mb.media.Read(mb.chunk[read:]) - read += n - } - mb.chunk = mb.chunk[:read] - return err -} - -// Next advances to the next chunk, which will be returned by the next call to Chunk. -// Calls to Next without a corresponding prior call to Chunk will have no effect. -func (mb *MediaBuffer) Next() { - mb.off += int64(len(mb.chunk)) - mb.chunk = mb.chunk[0:0] -} - -type readerTyper struct { - io.Reader - googleapi.ContentTyper -} - -// ReaderAtToReader adapts a ReaderAt to be used as a Reader. -// If ra implements googleapi.ContentTyper, then the returned reader -// will also implement googleapi.ContentTyper, delegating to ra. -func ReaderAtToReader(ra io.ReaderAt, size int64) io.Reader { - r := io.NewSectionReader(ra, 0, size) - if typer, ok := ra.(googleapi.ContentTyper); ok { - return readerTyper{r, typer} - } - return r -} diff --git a/vendor/google.golang.org/api/internal/gensupport/doc.go b/vendor/google.golang.org/api/internal/gensupport/doc.go deleted file mode 100644 index 752c4b411b..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2016 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 gensupport is an internal implementation detail used by code -// generated by the google-api-go-generator tool. -// -// This package may be modified at any time without regard for backwards -// compatibility. It should not be used directly by API users. -package gensupport diff --git a/vendor/google.golang.org/api/internal/gensupport/error.go b/vendor/google.golang.org/api/internal/gensupport/error.go deleted file mode 100644 index 886c6532b1..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/error.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2022 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "errors" - - "github.com/googleapis/gax-go/v2/apierror" - "google.golang.org/api/googleapi" -) - -// WrapError creates an [apierror.APIError] from err, wraps it in err, and -// returns err. If err is not a [googleapi.Error] (or a -// [google.golang.org/grpc/status.Status]), it returns err without modification. -func WrapError(err error) error { - var herr *googleapi.Error - apiError, ok := apierror.ParseError(err, false) - if ok && errors.As(err, &herr) { - herr.Wrap(apiError) - } - return err -} diff --git a/vendor/google.golang.org/api/internal/gensupport/json.go b/vendor/google.golang.org/api/internal/gensupport/json.go deleted file mode 100644 index eab49a11eb..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/json.go +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright 2015 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 gensupport - -import ( - "encoding/json" - "fmt" - "reflect" - "strings" -) - -// MarshalJSON returns a JSON encoding of schema containing only selected fields. -// A field is selected if any of the following is true: -// - it has a non-empty value -// - its field name is present in forceSendFields and it is not a nil pointer or nil interface -// - its field name is present in nullFields. -// -// The JSON key for each selected field is taken from the field's json: struct tag. -func MarshalJSON(schema interface{}, forceSendFields, nullFields []string) ([]byte, error) { - if len(forceSendFields) == 0 && len(nullFields) == 0 { - return json.Marshal(schema) - } - - mustInclude := make(map[string]bool) - for _, f := range forceSendFields { - mustInclude[f] = true - } - useNull := make(map[string]bool) - useNullMaps := make(map[string]map[string]bool) - for _, nf := range nullFields { - parts := strings.SplitN(nf, ".", 2) - field := parts[0] - if len(parts) == 1 { - useNull[field] = true - } else { - if useNullMaps[field] == nil { - useNullMaps[field] = map[string]bool{} - } - useNullMaps[field][parts[1]] = true - } - } - - dataMap, err := schemaToMap(schema, mustInclude, useNull, useNullMaps) - if err != nil { - return nil, err - } - return json.Marshal(dataMap) -} - -func schemaToMap(schema interface{}, mustInclude, useNull map[string]bool, useNullMaps map[string]map[string]bool) (map[string]interface{}, error) { - m := make(map[string]interface{}) - s := reflect.ValueOf(schema) - st := s.Type() - - for i := 0; i < s.NumField(); i++ { - jsonTag := st.Field(i).Tag.Get("json") - if jsonTag == "" { - continue - } - tag, err := parseJSONTag(jsonTag) - if err != nil { - return nil, err - } - if tag.ignore { - continue - } - - v := s.Field(i) - f := st.Field(i) - - if useNull[f.Name] { - if !isEmptyValue(v) { - return nil, fmt.Errorf("field %q in NullFields has non-empty value", f.Name) - } - m[tag.apiName] = nil - continue - } - - if !includeField(v, f, mustInclude) { - continue - } - - // If map fields are explicitly set to null, use a map[string]interface{}. - if f.Type.Kind() == reflect.Map && useNullMaps[f.Name] != nil { - ms, ok := v.Interface().(map[string]string) - if !ok { - mi, err := initMapSlow(v, f.Name, useNullMaps) - if err != nil { - return nil, err - } - m[tag.apiName] = mi - continue - } - mi := map[string]interface{}{} - for k, v := range ms { - mi[k] = v - } - for k := range useNullMaps[f.Name] { - mi[k] = nil - } - m[tag.apiName] = mi - continue - } - - // nil maps are treated as empty maps. - if f.Type.Kind() == reflect.Map && v.IsNil() { - m[tag.apiName] = map[string]string{} - continue - } - - // nil slices are treated as empty slices. - if f.Type.Kind() == reflect.Slice && v.IsNil() { - m[tag.apiName] = []bool{} - continue - } - - if tag.stringFormat { - m[tag.apiName] = formatAsString(v, f.Type.Kind()) - } else { - m[tag.apiName] = v.Interface() - } - } - return m, nil -} - -// initMapSlow uses reflection to build up a map object. This is slower than -// the default behavior so it should be used only as a fallback. -func initMapSlow(rv reflect.Value, fieldName string, useNullMaps map[string]map[string]bool) (map[string]interface{}, error) { - mi := map[string]interface{}{} - iter := rv.MapRange() - for iter.Next() { - k, ok := iter.Key().Interface().(string) - if !ok { - return nil, fmt.Errorf("field %q has keys in NullFields but is not a map[string]any", fieldName) - } - v := iter.Value().Interface() - mi[k] = v - } - for k := range useNullMaps[fieldName] { - mi[k] = nil - } - return mi, nil -} - -// formatAsString returns a string representation of v, dereferencing it first if possible. -func formatAsString(v reflect.Value, kind reflect.Kind) string { - if kind == reflect.Ptr && !v.IsNil() { - v = v.Elem() - } - - return fmt.Sprintf("%v", v.Interface()) -} - -// jsonTag represents a restricted version of the struct tag format used by encoding/json. -// It is used to describe the JSON encoding of fields in a Schema struct. -type jsonTag struct { - apiName string - stringFormat bool - ignore bool -} - -// parseJSONTag parses a restricted version of the struct tag format used by encoding/json. -// The format of the tag must match that generated by the Schema.writeSchemaStruct method -// in the api generator. -func parseJSONTag(val string) (jsonTag, error) { - if val == "-" { - return jsonTag{ignore: true}, nil - } - - var tag jsonTag - - i := strings.Index(val, ",") - if i == -1 || val[:i] == "" { - return tag, fmt.Errorf("malformed json tag: %s", val) - } - - tag = jsonTag{ - apiName: val[:i], - } - - switch val[i+1:] { - case "omitempty": - case "omitempty,string": - tag.stringFormat = true - default: - return tag, fmt.Errorf("malformed json tag: %s", val) - } - - return tag, nil -} - -// Reports whether the struct field "f" with value "v" should be included in JSON output. -func includeField(v reflect.Value, f reflect.StructField, mustInclude map[string]bool) bool { - // The regular JSON encoding of a nil pointer is "null", which means "delete this field". - // Therefore, we could enable field deletion by honoring pointer fields' presence in the mustInclude set. - // However, many fields are not pointers, so there would be no way to delete these fields. - // Rather than partially supporting field deletion, we ignore mustInclude for nil pointer fields. - // Deletion will be handled by a separate mechanism. - if f.Type.Kind() == reflect.Ptr && v.IsNil() { - return false - } - - // The "any" type is represented as an interface{}. If this interface - // is nil, there is no reasonable representation to send. We ignore - // these fields, for the same reasons as given above for pointers. - if f.Type.Kind() == reflect.Interface && v.IsNil() { - return false - } - - return mustInclude[f.Name] || !isEmptyValue(v) -} - -// isEmptyValue reports whether v is the empty value for its type. This -// implementation is based on that of the encoding/json package, but its -// correctness does not depend on it being identical. What's important is that -// this function return false in situations where v should not be sent as part -// of a PATCH operation. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - } - return false -} diff --git a/vendor/google.golang.org/api/internal/gensupport/jsonfloat.go b/vendor/google.golang.org/api/internal/gensupport/jsonfloat.go deleted file mode 100644 index 13c2f93020..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/jsonfloat.go +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2016 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "encoding/json" - "errors" - "fmt" - "math" -) - -// JSONFloat64 is a float64 that supports proper unmarshaling of special float -// values in JSON, according to -// https://developers.google.com/protocol-buffers/docs/proto3#json. Although -// that is a proto-to-JSON spec, it applies to all Google APIs. -// -// The jsonpb package -// (https://github.com/golang/protobuf/blob/master/jsonpb/jsonpb.go) has -// similar functionality, but only for direct translation from proto messages -// to JSON. -type JSONFloat64 float64 - -func (f *JSONFloat64) UnmarshalJSON(data []byte) error { - var ff float64 - if err := json.Unmarshal(data, &ff); err == nil { - *f = JSONFloat64(ff) - return nil - } - var s string - if err := json.Unmarshal(data, &s); err == nil { - switch s { - case "NaN": - ff = math.NaN() - case "Infinity": - ff = math.Inf(1) - case "-Infinity": - ff = math.Inf(-1) - default: - return fmt.Errorf("google.golang.org/api/internal: bad float string %q", s) - } - *f = JSONFloat64(ff) - return nil - } - return errors.New("google.golang.org/api/internal: data not float or string") -} diff --git a/vendor/google.golang.org/api/internal/gensupport/media.go b/vendor/google.golang.org/api/internal/gensupport/media.go deleted file mode 100644 index 8c7435de3e..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/media.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2016 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 gensupport - -import ( - "bytes" - "fmt" - "io" - "mime" - "mime/multipart" - "net/http" - "net/textproto" - "strings" - "sync" - "time" - - gax "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" -) - -type typeReader struct { - io.Reader - typ string -} - -// multipartReader combines the contents of multiple readers to create a multipart/related HTTP body. -// Close must be called if reads from the multipartReader are abandoned before reaching EOF. -type multipartReader struct { - pr *io.PipeReader - ctype string - mu sync.Mutex - pipeOpen bool -} - -// boundary optionally specifies the MIME boundary -func newMultipartReader(parts []typeReader, boundary string) *multipartReader { - mp := &multipartReader{pipeOpen: true} - var pw *io.PipeWriter - mp.pr, pw = io.Pipe() - mpw := multipart.NewWriter(pw) - if boundary != "" { - mpw.SetBoundary(boundary) - } - mp.ctype = "multipart/related; boundary=" + mpw.Boundary() - go func() { - for _, part := range parts { - w, err := mpw.CreatePart(typeHeader(part.typ)) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: CreatePart failed: %v", err)) - return - } - _, err = io.Copy(w, part.Reader) - if err != nil { - mpw.Close() - pw.CloseWithError(fmt.Errorf("googleapi: Copy failed: %v", err)) - return - } - } - - mpw.Close() - pw.Close() - }() - return mp -} - -func (mp *multipartReader) Read(data []byte) (n int, err error) { - return mp.pr.Read(data) -} - -func (mp *multipartReader) Close() error { - mp.mu.Lock() - if !mp.pipeOpen { - mp.mu.Unlock() - return nil - } - mp.pipeOpen = false - mp.mu.Unlock() - return mp.pr.Close() -} - -// CombineBodyMedia combines a json body with media content to create a multipart/related HTTP body. -// It returns a ReadCloser containing the combined body, and the overall "multipart/related" content type, with random boundary. -// -// The caller must call Close on the returned ReadCloser if reads are abandoned before reaching EOF. -func CombineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType string) (io.ReadCloser, string) { - return combineBodyMedia(body, bodyContentType, media, mediaContentType, "") -} - -// combineBodyMedia is CombineBodyMedia but with an optional mimeBoundary field. -func combineBodyMedia(body io.Reader, bodyContentType string, media io.Reader, mediaContentType, mimeBoundary string) (io.ReadCloser, string) { - mp := newMultipartReader([]typeReader{ - {body, bodyContentType}, - {media, mediaContentType}, - }, mimeBoundary) - return mp, mp.ctype -} - -func typeHeader(contentType string) textproto.MIMEHeader { - h := make(textproto.MIMEHeader) - if contentType != "" { - h.Set("Content-Type", contentType) - } - return h -} - -// PrepareUpload determines whether the data in the supplied reader should be -// uploaded in a single request, or in sequential chunks. -// chunkSize is the size of the chunk that media should be split into. -// -// If chunkSize is zero, media is returned as the first value, and the other -// two return values are nil, true. -// -// Otherwise, a MediaBuffer is returned, along with a bool indicating whether the -// contents of media fit in a single chunk. -// -// After PrepareUpload has been called, media should no longer be used: the -// media content should be accessed via one of the return values. -func PrepareUpload(media io.Reader, chunkSize int) (r io.Reader, mb *MediaBuffer, singleChunk bool) { - if chunkSize == 0 { // do not chunk - return media, nil, true - } - mb = NewMediaBuffer(media, chunkSize) - _, _, _, err := mb.Chunk() - // If err is io.EOF, we can upload this in a single request. Otherwise, err is - // either nil or a non-EOF error. If it is the latter, then the next call to - // mb.Chunk will return the same error. Returning a MediaBuffer ensures that this - // error will be handled at some point. - return nil, mb, err == io.EOF -} - -// MediaInfo holds information for media uploads. It is intended for use by generated -// code only. -type MediaInfo struct { - // At most one of Media and MediaBuffer will be set. - media io.Reader - buffer *MediaBuffer - singleChunk bool - mType string - size int64 // mediaSize, if known. Used only for calls to progressUpdater_. - progressUpdater googleapi.ProgressUpdater - chunkRetryDeadline time.Duration - chunkTransferTimeout time.Duration -} - -// NewInfoFromMedia should be invoked from the Media method of a call. It returns a -// MediaInfo populated with chunk size and content type, and a reader or MediaBuffer -// if needed. -func NewInfoFromMedia(r io.Reader, options []googleapi.MediaOption) *MediaInfo { - mi := &MediaInfo{} - opts := googleapi.ProcessMediaOptions(options) - if !opts.ForceEmptyContentType { - mi.mType = opts.ContentType - if mi.mType == "" { - r, mi.mType = gax.DetermineContentType(r) - } - } - mi.chunkRetryDeadline = opts.ChunkRetryDeadline - mi.chunkTransferTimeout = opts.ChunkTransferTimeout - mi.media, mi.buffer, mi.singleChunk = PrepareUpload(r, opts.ChunkSize) - return mi -} - -// NewInfoFromResumableMedia should be invoked from the ResumableMedia method of a -// call. It returns a MediaInfo using the given reader, size and media type. -func NewInfoFromResumableMedia(r io.ReaderAt, size int64, mediaType string) *MediaInfo { - rdr := ReaderAtToReader(r, size) - mType := mediaType - if mType == "" { - rdr, mType = gax.DetermineContentType(rdr) - } - - return &MediaInfo{ - size: size, - mType: mType, - buffer: NewMediaBuffer(rdr, googleapi.DefaultUploadChunkSize), - media: nil, - singleChunk: false, - } -} - -// SetProgressUpdater sets the progress updater for the media info. -func (mi *MediaInfo) SetProgressUpdater(pu googleapi.ProgressUpdater) { - if mi != nil { - mi.progressUpdater = pu - } -} - -// UploadType determines the type of upload: a single request, or a resumable -// series of requests. -func (mi *MediaInfo) UploadType() string { - if mi.singleChunk { - return "multipart" - } - return "resumable" -} - -// UploadRequest sets up an HTTP request for media upload. It adds headers -// as necessary, and returns a replacement for the body and a function for http.Request.GetBody. -func (mi *MediaInfo) UploadRequest(reqHeaders http.Header, body io.Reader) (newBody io.Reader, getBody func() (io.ReadCloser, error), cleanup func()) { - if body == nil { - body = new(bytes.Buffer) - } - cleanup = func() {} - if mi == nil { - return body, nil, cleanup - } - var media io.Reader - if mi.media != nil { - // This only happens when the caller has turned off chunking. In that - // case, we write all of media in a single non-retryable request. - media = mi.media - } else if mi.singleChunk { - // The data fits in a single chunk, which has now been read into the MediaBuffer. - // We obtain that chunk so we can write it in a single request. The request can - // be retried because the data is stored in the MediaBuffer. - media, _, _, _ = mi.buffer.Chunk() - } - toCleanup := []io.Closer{} - if media != nil { - fb := readerFunc(body) - fm := readerFunc(media) - combined, ctype := CombineBodyMedia(body, "application/json", media, mi.mType) - toCleanup = append(toCleanup, combined) - if fb != nil && fm != nil { - getBody = func() (io.ReadCloser, error) { - rb := io.NopCloser(fb()) - rm := io.NopCloser(fm()) - var mimeBoundary string - if _, params, err := mime.ParseMediaType(ctype); err == nil { - mimeBoundary = params["boundary"] - } - r, _ := combineBodyMedia(rb, "application/json", rm, mi.mType, mimeBoundary) - toCleanup = append(toCleanup, r) - return r, nil - } - } - reqHeaders.Set("Content-Type", ctype) - body = combined - } - if mi.buffer != nil && mi.mType != "" && !mi.singleChunk { - // This happens when initiating a resumable upload session. - // The initial request contains a JSON body rather than media. - // It can be retried with a getBody function that re-creates the request body. - fb := readerFunc(body) - if fb != nil { - getBody = func() (io.ReadCloser, error) { - rb := io.NopCloser(fb()) - toCleanup = append(toCleanup, rb) - return rb, nil - } - } - reqHeaders.Set("X-Upload-Content-Type", mi.mType) - } - // Ensure that any bodies created in getBody are cleaned up. - cleanup = func() { - for _, closer := range toCleanup { - _ = closer.Close() - } - - } - return body, getBody, cleanup -} - -// readerFunc returns a function that always returns an io.Reader that has the same -// contents as r, provided that can be done without consuming r. Otherwise, it -// returns nil. -// See http.NewRequest (in net/http/request.go). -func readerFunc(r io.Reader) func() io.Reader { - switch r := r.(type) { - case *bytes.Buffer: - buf := r.Bytes() - return func() io.Reader { return bytes.NewReader(buf) } - case *bytes.Reader: - snapshot := *r - return func() io.Reader { r := snapshot; return &r } - case *strings.Reader: - snapshot := *r - return func() io.Reader { r := snapshot; return &r } - default: - return nil - } -} - -// ResumableUpload returns an appropriately configured ResumableUpload value if the -// upload is resumable, or nil otherwise. -func (mi *MediaInfo) ResumableUpload(locURI string) *ResumableUpload { - if mi == nil || mi.singleChunk { - return nil - } - return &ResumableUpload{ - URI: locURI, - Media: mi.buffer, - MediaType: mi.mType, - Callback: func(curr int64) { - if mi.progressUpdater != nil { - mi.progressUpdater(curr, mi.size) - } - }, - ChunkRetryDeadline: mi.chunkRetryDeadline, - ChunkTransferTimeout: mi.chunkTransferTimeout, - } -} - -// SetGetBody sets the GetBody field of req to f. This was once needed -// to gracefully support Go 1.7 and earlier which didn't have that -// field. -// -// Deprecated: the code generator no longer uses this as of -// 2019-02-19. Nothing else should be calling this anyway, but we -// won't delete this immediately; it will be deleted in as early as 6 -// months. -func SetGetBody(req *http.Request, f func() (io.ReadCloser, error)) { - req.GetBody = f -} diff --git a/vendor/google.golang.org/api/internal/gensupport/params.go b/vendor/google.golang.org/api/internal/gensupport/params.go deleted file mode 100644 index 6a5326c089..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/params.go +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2015 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 gensupport - -import ( - "net/http" - "net/url" - - "google.golang.org/api/googleapi" - "google.golang.org/api/internal" -) - -// URLParams is a simplified replacement for url.Values -// that safely builds up URL parameters for encoding. -type URLParams map[string][]string - -// Get returns the first value for the given key, or "". -func (u URLParams) Get(key string) string { - vs := u[key] - if len(vs) == 0 { - return "" - } - return vs[0] -} - -// Set sets the key to value. -// It replaces any existing values. -func (u URLParams) Set(key, value string) { - u[key] = []string{value} -} - -// SetMulti sets the key to an array of values. -// It replaces any existing values. -// Note that values must not be modified after calling SetMulti -// so the caller is responsible for making a copy if necessary. -func (u URLParams) SetMulti(key string, values []string) { - u[key] = values -} - -// Encode encodes the values into “URL encoded” form -// ("bar=baz&foo=quux") sorted by key. -func (u URLParams) Encode() string { - return url.Values(u).Encode() -} - -// SetOptions sets the URL params and any additional `CallOption` or -// `MultiCallOption` passed in. -func SetOptions(u URLParams, opts ...googleapi.CallOption) { - for _, o := range opts { - m, ok := o.(googleapi.MultiCallOption) - if ok { - u.SetMulti(m.GetMulti()) - continue - } - u.Set(o.Get()) - } -} - -// SetHeaders sets common headers for all requests. The keyvals header pairs -// should have a corresponding value for every key provided. If there is an odd -// number of keyvals this method will panic. -func SetHeaders(userAgent, contentType string, userHeaders http.Header, keyvals ...string) http.Header { - reqHeaders := make(http.Header) - reqHeaders.Set("x-goog-api-client", "gl-go/"+GoVersion()+" gdcl/"+internal.Version) - for i := 0; i < len(keyvals); i = i + 2 { - reqHeaders.Set(keyvals[i], keyvals[i+1]) - } - reqHeaders.Set("User-Agent", userAgent) - if contentType != "" { - reqHeaders.Set("Content-Type", contentType) - } - for k, v := range userHeaders { - reqHeaders[k] = v - } - return reqHeaders -} diff --git a/vendor/google.golang.org/api/internal/gensupport/resumable.go b/vendor/google.golang.org/api/internal/gensupport/resumable.go deleted file mode 100644 index 91108d3273..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/resumable.go +++ /dev/null @@ -1,337 +0,0 @@ -// Copyright 2016 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 gensupport - -import ( - "context" - "errors" - "fmt" - "io" - "net/http" - "strings" - "sync" - "time" - - "github.com/google/uuid" - "google.golang.org/api/internal" -) - -// ResumableUpload is used by the generated APIs to provide resumable uploads. -// It is not used by developers directly. -type ResumableUpload struct { - Client *http.Client - // URI is the resumable resource destination provided by the server after specifying "&uploadType=resumable". - URI string - UserAgent string // User-Agent for header of the request - // Media is the object being uploaded. - Media *MediaBuffer - // MediaType defines the media type, e.g. "image/jpeg". - MediaType string - - mu sync.Mutex // guards progress - progress int64 // number of bytes uploaded so far - - // Callback is an optional function that will be periodically called with the cumulative number of bytes uploaded. - Callback func(int64) - - // Retry optionally configures retries for requests made against the upload. - Retry *RetryConfig - - // ChunkRetryDeadline configures the per-chunk deadline after which no further - // retries should happen. - ChunkRetryDeadline time.Duration - - // ChunkTransferTimeout configures the per-chunk transfer timeout. If a chunk upload stalls for longer than - // this duration, the upload will be retried. - ChunkTransferTimeout time.Duration - - // Track current request invocation ID and attempt count for retry metrics - // and idempotency headers. - invocationID string - attempts int -} - -// Progress returns the number of bytes uploaded at this point. -func (rx *ResumableUpload) Progress() int64 { - rx.mu.Lock() - defer rx.mu.Unlock() - return rx.progress -} - -// doUploadRequest performs a single HTTP request to upload data. -// off specifies the offset in rx.Media from which data is drawn. -// size is the number of bytes in data. -// final specifies whether data is the final chunk to be uploaded. -func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader, off, size int64, final bool) (*http.Response, error) { - req, err := http.NewRequest("POST", rx.URI, data) - if err != nil { - return nil, err - } - - req.ContentLength = size - var contentRange string - if final { - if size == 0 { - contentRange = fmt.Sprintf("bytes */%v", off) - } else { - contentRange = fmt.Sprintf("bytes %v-%v/%v", off, off+size-1, off+size) - } - } else { - contentRange = fmt.Sprintf("bytes %v-%v/*", off, off+size-1) - } - req.Header.Set("Content-Range", contentRange) - req.Header.Set("Content-Type", rx.MediaType) - req.Header.Set("User-Agent", rx.UserAgent) - - // TODO(b/274504690): Consider dropping gccl-invocation-id key since it - // duplicates the X-Goog-Gcs-Idempotency-Token header (added in v0.115.0). - baseXGoogHeader := "gl-go/" + GoVersion() + " gdcl/" + internal.Version - invocationHeader := fmt.Sprintf("gccl-invocation-id/%s gccl-attempt-count/%d", rx.invocationID, rx.attempts) - req.Header.Set("X-Goog-Api-Client", strings.Join([]string{baseXGoogHeader, invocationHeader}, " ")) - - // Set idempotency token header which is used by GCS uploads. - req.Header.Set("X-Goog-Gcs-Idempotency-Token", rx.invocationID) - - // Google's upload endpoint uses status code 308 for a - // different purpose than the "308 Permanent Redirect" - // since-standardized in RFC 7238. Because of the conflict in - // semantics, Google added this new request header which - // causes it to not use "308" and instead reply with 200 OK - // and sets the upload-specific "X-HTTP-Status-Code-Override: - // 308" response header. - req.Header.Set("X-GUploader-No-308", "yes") - - return SendRequest(ctx, rx.Client, req) -} - -func statusResumeIncomplete(resp *http.Response) bool { - // This is how the server signals "status resume incomplete" - // when X-GUploader-No-308 is set to "yes": - return resp != nil && resp.Header.Get("X-Http-Status-Code-Override") == "308" -} - -// reportProgress calls a user-supplied callback to report upload progress. -// If old==updated, the callback is not called. -func (rx *ResumableUpload) reportProgress(old, updated int64) { - if updated-old == 0 { - return - } - rx.mu.Lock() - rx.progress = updated - rx.mu.Unlock() - if rx.Callback != nil { - rx.Callback(updated) - } -} - -// transferChunk performs a single HTTP request to upload a single chunk. -// It uses a goroutine to perform the upload and a timer to enforce ChunkTransferTimeout. -func (rx *ResumableUpload) transferChunk(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) { - // If no timeout is specified, perform the request synchronously without a timer. - if rx.ChunkTransferTimeout == 0 { - res, err := rx.doUploadRequest(ctx, chunk, off, size, done) - if err != nil { - return res, err - } - return res, nil - } - - // Start a timer for the ChunkTransferTimeout duration. - timer := time.NewTimer(rx.ChunkTransferTimeout) - - // A struct to hold the result from the goroutine. - type uploadResult struct { - res *http.Response - err error - } - - // A buffered channel to receive the result of the upload. - resultCh := make(chan uploadResult, 1) - - // Create a cancellable context for the upload request. This allows us to - // abort the request if the timer fires first. - rCtx, cancel := context.WithCancel(ctx) - // NOTE: We do NOT use `defer cancel()` here. The context must remain valid - // for the caller to read the response body of a successful request. - // Cancellation is handled manually on timeout paths. - - // Starting the chunk upload in parallel. - go func() { - res, err := rx.doUploadRequest(rCtx, chunk, off, size, done) - resultCh <- uploadResult{res: res, err: err} - }() - - // Wait for timer to fire or result channel to have the uploadResult or ctx to be cancelled. - select { - // Note: Calling cancel() will guarantee that the goroutine finishes, - // so these two cases will never block forever on draining the resultCh. - case <-ctx.Done(): - // Context is cancelled for the overall upload. - cancel() - // Drain resultCh. - <-resultCh - return nil, ctx.Err() - case <-timer.C: - // Chunk Transfer timer fired before resultCh so we return context.DeadlineExceeded. - cancel() - // Drain resultCh. - <-resultCh - return nil, context.DeadlineExceeded - case result := <-resultCh: - // Handle the result from the upload. - if result.err != nil { - return result.res, result.err - } - return result.res, nil - } -} - -// uploadChunkWithRetries attempts to upload a single chunk, with retries -// within ChunkRetryDeadline if ChunkTransferTimeout is non-zero. -func (rx *ResumableUpload) uploadChunkWithRetries(ctx context.Context, chunk io.Reader, off, size int64, done bool) (*http.Response, error) { - // Configure error retryable criteria. - shouldRetry := rx.Retry.errorFunc() - - // Configure single chunk retry deadline. - chunkRetryDeadline := defaultRetryDeadline - if rx.ChunkRetryDeadline != 0 { - chunkRetryDeadline = rx.ChunkRetryDeadline - } - - // Each chunk gets its own initialized-at-zero backoff and invocation ID. - bo := rx.Retry.backoff() - quitAfterTimer := time.NewTimer(chunkRetryDeadline) - defer quitAfterTimer.Stop() - rx.attempts = 1 - rx.invocationID = uuid.New().String() - - var pause time.Duration - var resp *http.Response - var err error - - // Retry loop for a single chunk. - for { - // Wait for the backoff period, unless the context is canceled or the - // retry deadline is hit. - backoffPauseTimer := time.NewTimer(pause) - select { - case <-ctx.Done(): - backoffPauseTimer.Stop() - if err == nil { - err = ctx.Err() - } - return resp, err - case <-backoffPauseTimer.C: - case <-quitAfterTimer.C: - backoffPauseTimer.Stop() - return resp, err - } - backoffPauseTimer.Stop() - - // Check for context cancellation or timeout once more. If more than one - // case in the select statement above was satisfied at the same time, Go - // will choose one arbitrarily. - // That can cause an operation to go through even if the context was - // canceled before or the timeout was reached. - select { - case <-ctx.Done(): - if err == nil { - err = ctx.Err() - } - return resp, err - case <-quitAfterTimer.C: - return resp, err - default: - } - - // We close the response's body here, since we definitely will not - // return `resp` now. If we close it before the select case above, a - // timer may fire and cause us to return a response with a closed body - // (in which case, the caller will not get the error message in the body). - if resp != nil && resp.Body != nil { - // Read the body to EOF - if the Body is not both read to EOF and closed, - // the Client's underlying RoundTripper may not be able to re-use the - // persistent TCP connection to the server for a subsequent "keep-alive" request. - // See https://pkg.go.dev/net/http#Client.Do - io.Copy(io.Discard, resp.Body) - resp.Body.Close() - } - - resp, err = rx.transferChunk(ctx, chunk, off, size, done) - status := 0 - if resp != nil { - status = resp.StatusCode - } - // We sent "X-GUploader-No-308: yes" (see comment elsewhere in - // this file), so we don't expect to get a 308. - if status == 308 { - return nil, errors.New("unexpected 308 response status code") - } - // Chunk upload should be retried if the ChunkTransferTimeout is non-zero and err is context deadline exceeded - // or we encounter a retryable error. - if (rx.ChunkTransferTimeout != 0 && errors.Is(err, context.DeadlineExceeded)) || shouldRetry(status, err) { - rx.attempts++ - pause = bo.Pause() - chunk, _, _, _ = rx.Media.Chunk() - continue - } - return resp, err - } -} - -// Upload starts the process of a resumable upload with a cancellable context. -// It is called from the auto-generated API code and is not visible to the user. -// Before sending an HTTP request, Upload calls any registered hook functions, -// and calls the returned functions after the request returns (see send.go). -// rx is private to the auto-generated API code. -// Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. -// Upload does not parse the response into the error on a non 200 response; -// it is the caller's responsibility to call resp.Body.Close. -func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) { - for { - chunk, off, size, err := rx.Media.Chunk() - done := err == io.EOF - if !done && err != nil { - return nil, err - } - - resp, err := rx.uploadChunkWithRetries(ctx, chunk, off, int64(size), done) - // There are a couple of cases where it's possible for err and resp to both - // be non-nil. However, we expose a simpler contract to our callers: exactly - // one of resp and err will be non-nil. This means that any response body - // must be closed here before returning a non-nil error. - if err != nil { - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - // If there were retries, indicate this in the error message and wrap the final error. - if rx.attempts > 1 { - return nil, fmt.Errorf("chunk upload failed after %d attempts, final error: %w", rx.attempts, err) - } - return nil, err - } - - // This case is very unlikely but possible only if rx.ChunkRetryDeadline is - // set to a very small value, in which case no requests will be sent before - // the deadline. Return an error to avoid causing a panic. - if resp == nil { - return nil, fmt.Errorf("upload request to %v not sent, choose larger value for ChunkRetryDeadline", rx.URI) - } - if resp.StatusCode == http.StatusOK { - rx.reportProgress(off, off+int64(size)) - } - if statusResumeIncomplete(resp) { - // The upload is not yet complete, but the server has acknowledged this chunk. - // We don't have anything to do with the response body. - if resp.Body != nil { - io.Copy(io.Discard, resp.Body) - resp.Body.Close() - } - rx.Media.Next() - continue - } - return resp, nil - } -} diff --git a/vendor/google.golang.org/api/internal/gensupport/retry.go b/vendor/google.golang.org/api/internal/gensupport/retry.go deleted file mode 100644 index 089ee3189b..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/retry.go +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright 2021 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "errors" - "io" - "net" - "net/url" - "strings" - "time" - - "github.com/googleapis/gax-go/v2" - "google.golang.org/api/googleapi" -) - -// Backoff is an interface around gax.Backoff's Pause method, allowing tests to provide their -// own implementation. -type Backoff interface { - Pause() time.Duration -} - -// These are declared as global variables so that tests can overwrite them. -var ( - // Default per-chunk deadline for resumable uploads. - defaultRetryDeadline = 32 * time.Second - // Default backoff timer. - backoff = func() Backoff { - return &gax.Backoff{Initial: 100 * time.Millisecond} - } -) - -const ( - // statusTooManyRequests is returned by the storage API if the - // per-project limits have been temporarily exceeded. The request - // should be retried. - // https://cloud.google.com/storage/docs/json_api/v1/status-codes#standardcodes - statusTooManyRequests = 429 - - // statusRequestTimeout is returned by the storage API if the - // upload connection was broken. The request should be retried. - statusRequestTimeout = 408 -) - -// shouldRetry indicates whether an error is retryable for the purposes of this -// package, unless a ShouldRetry func is specified by the RetryConfig instead. -// It follows guidance from -// https://cloud.google.com/storage/docs/exponential-backoff . -func shouldRetry(status int, err error) bool { - if 500 <= status && status <= 599 { - return true - } - if status == statusTooManyRequests || status == statusRequestTimeout { - return true - } - if errors.Is(err, io.ErrUnexpectedEOF) { - return true - } - if errors.Is(err, net.ErrClosed) { - return true - } - switch e := err.(type) { - case *net.OpError, *url.Error: - // Retry socket-level errors ECONNREFUSED and ECONNRESET (from syscall). - // Unfortunately the error type is unexported, so we resort to string - // matching. - retriable := []string{"connection refused", "connection reset", "broken pipe"} - for _, s := range retriable { - if strings.Contains(e.Error(), s) { - return true - } - } - case interface{ Temporary() bool }: - if e.Temporary() { - return true - } - } - - // If error unwrapping is available, use this to examine wrapped - // errors. - if e, ok := err.(interface{ Unwrap() error }); ok { - return shouldRetry(status, e.Unwrap()) - } - return false -} - -// RetryConfig allows configuration of backoff timing and retryable errors. -type RetryConfig struct { - Backoff *gax.Backoff - ShouldRetry func(err error) bool -} - -// Get a new backoff object based on the configured values. -func (r *RetryConfig) backoff() Backoff { - if r == nil || r.Backoff == nil { - return backoff() - } - return &gax.Backoff{ - Initial: r.Backoff.Initial, - Max: r.Backoff.Max, - Multiplier: r.Backoff.Multiplier, - } -} - -// This is kind of hacky; it is necessary because ShouldRetry expects to -// handle HTTP errors via googleapi.Error, but the error has not yet been -// wrapped with a googleapi.Error at this layer, and the ErrorFunc type -// in the manual layer does not pass in a status explicitly as it does -// here. So, we must wrap error status codes in a googleapi.Error so that -// ShouldRetry can parse this correctly. -func (r *RetryConfig) errorFunc() func(status int, err error) bool { - if r == nil || r.ShouldRetry == nil { - return shouldRetry - } - return func(status int, err error) bool { - if status >= 400 { - return r.ShouldRetry(&googleapi.Error{Code: status}) - } - return r.ShouldRetry(err) - } -} diff --git a/vendor/google.golang.org/api/internal/gensupport/send.go b/vendor/google.golang.org/api/internal/gensupport/send.go deleted file mode 100644 index 1c91f147ab..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/send.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright 2016 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 gensupport - -import ( - "context" - "encoding/json" - "errors" - "fmt" - "io" - "net/http" - "strings" - "time" - - "github.com/google/uuid" - "github.com/googleapis/gax-go/v2" - "github.com/googleapis/gax-go/v2/callctx" -) - -// Use this error type to return an error which allows introspection of both -// the context error and the error from the service. -type wrappedCallErr struct { - ctxErr error - wrappedErr error -} - -func (e wrappedCallErr) Error() string { - return fmt.Sprintf("retry failed with %v; last error: %v", e.ctxErr, e.wrappedErr) -} - -func (e wrappedCallErr) Unwrap() error { - return e.wrappedErr -} - -// Is allows errors.Is to match the error from the call as well as context -// sentinel errors. -func (e wrappedCallErr) Is(target error) bool { - return errors.Is(e.ctxErr, target) || errors.Is(e.wrappedErr, target) -} - -// SendRequest sends a single HTTP request using the given client. -// If ctx is non-nil, it calls all hooks, then sends the request with -// req.WithContext, then calls any functions returned by the hooks in -// reverse order. -func SendRequest(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - // Add headers set in context metadata. - if ctx != nil { - headers := callctx.HeadersFromContext(ctx) - for k, vals := range headers { - if k == "x-goog-api-client" { - // Merge all values into a single "x-goog-api-client" header. - var mergedVal strings.Builder - baseXGoogHeader := req.Header.Get("X-Goog-Api-Client") - if baseXGoogHeader != "" { - mergedVal.WriteString(baseXGoogHeader) - mergedVal.WriteRune(' ') - } - for _, v := range vals { - mergedVal.WriteString(v) - mergedVal.WriteRune(' ') - } - // Remove the last space and replace the header on the request. - req.Header.Set(k, mergedVal.String()[:mergedVal.Len()-1]) - } else { - for _, v := range vals { - req.Header.Add(k, v) - } - } - } - } - - // Disallow Accept-Encoding because it interferes with the automatic gzip handling - // done by the default http.Transport. See https://github.com/google/google-api-go-client/issues/219. - if _, ok := req.Header["Accept-Encoding"]; ok { - return nil, errors.New("google api: custom Accept-Encoding headers not allowed") - } - if ctx == nil { - return client.Do(req) - } - return send(ctx, client, req) -} - -func send(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - resp, err := client.Do(req.WithContext(ctx)) - // If we got an error, and the context has been canceled, - // the context's error is probably more useful. - if err != nil { - select { - case <-ctx.Done(): - err = ctx.Err() - default: - } - } - return resp, err -} - -// SendRequestWithRetry sends a single HTTP request using the given client, -// with retries if a retryable error is returned. -// If ctx is non-nil, it calls all hooks, then sends the request with -// req.WithContext, then calls any functions returned by the hooks in -// reverse order. -func SendRequestWithRetry(ctx context.Context, client *http.Client, req *http.Request, retry *RetryConfig) (*http.Response, error) { - // Add headers set in context metadata. - if ctx != nil { - headers := callctx.HeadersFromContext(ctx) - for k, vals := range headers { - for _, v := range vals { - req.Header.Add(k, v) - } - } - } - - // Disallow Accept-Encoding because it interferes with the automatic gzip handling - // done by the default http.Transport. See https://github.com/google/google-api-go-client/issues/219. - if _, ok := req.Header["Accept-Encoding"]; ok { - return nil, errors.New("google api: custom Accept-Encoding headers not allowed") - } - if ctx == nil { - return client.Do(req) - } - return sendAndRetry(ctx, client, req, retry) -} - -func sendAndRetry(ctx context.Context, client *http.Client, req *http.Request, retry *RetryConfig) (*http.Response, error) { - if client == nil { - client = http.DefaultClient - } - - var resp *http.Response - var err error - attempts := 1 - invocationID := uuid.New().String() - - xGoogHeaderVals := req.Header.Values("X-Goog-Api-Client") - baseXGoogHeader := strings.Join(xGoogHeaderVals, " ") - - // Loop to retry the request, up to the context deadline. - var pause time.Duration - var bo Backoff - if retry != nil && retry.Backoff != nil { - bo = &gax.Backoff{ - Initial: retry.Backoff.Initial, - Max: retry.Backoff.Max, - Multiplier: retry.Backoff.Multiplier, - } - } else { - bo = backoff() - } - - var errorFunc = retry.errorFunc() - - for { - t := time.NewTimer(pause) - select { - case <-ctx.Done(): - t.Stop() - // If we got an error and the context has been canceled, return an error acknowledging - // both the context cancelation and the service error. - if err != nil { - return resp, wrappedCallErr{ctx.Err(), err} - } - return resp, ctx.Err() - case <-t.C: - } - - if ctx.Err() != nil { - // Check for context cancellation once more. If more than one case in a - // select is satisfied at the same time, Go will choose one arbitrarily. - // That can cause an operation to go through even if the context was - // canceled before. - if err != nil { - return resp, wrappedCallErr{ctx.Err(), err} - } - return resp, ctx.Err() - } - - // Set retry metrics and idempotency headers for GCS. - // TODO(b/274504690): Consider dropping gccl-invocation-id key since it - // duplicates the X-Goog-Gcs-Idempotency-Token header (added in v0.115.0). - invocationHeader := fmt.Sprintf("gccl-invocation-id/%s gccl-attempt-count/%d", invocationID, attempts) - xGoogHeader := strings.Join([]string{invocationHeader, baseXGoogHeader}, " ") - req.Header.Set("X-Goog-Api-Client", xGoogHeader) - req.Header.Set("X-Goog-Gcs-Idempotency-Token", invocationID) - - resp, err = client.Do(req.WithContext(ctx)) - - var status int - if resp != nil { - status = resp.StatusCode - } - - // Check if we can retry the request. A retry can only be done if the error - // is retryable and the request body can be re-created using GetBody (this - // will not be possible if the body was unbuffered). - if req.GetBody == nil || !errorFunc(status, err) { - break - } - attempts++ - var errBody error - req.Body, errBody = req.GetBody() - if errBody != nil { - break - } - - pause = bo.Pause() - if resp != nil && resp.Body != nil { - resp.Body.Close() - } - } - return resp, err -} - -// DecodeResponse decodes the body of res into target. If there is no body, -// target is unchanged. -func DecodeResponse(target interface{}, res *http.Response) error { - if res.StatusCode == http.StatusNoContent { - return nil - } - return json.NewDecoder(res.Body).Decode(target) -} - -// DecodeResponseBytes decodes the body of res into target and returns bytes read -// from the body. If there is no body, target is unchanged. -func DecodeResponseBytes(target interface{}, res *http.Response) ([]byte, error) { - if res.StatusCode == http.StatusNoContent { - return nil, nil - } - b, err := io.ReadAll(res.Body) - if err != nil { - return nil, err - } - if err := json.Unmarshal(b, target); err != nil { - return nil, err - } - return b, nil -} diff --git a/vendor/google.golang.org/api/internal/gensupport/version.go b/vendor/google.golang.org/api/internal/gensupport/version.go deleted file mode 100644 index 23f6aa24ea..0000000000 --- a/vendor/google.golang.org/api/internal/gensupport/version.go +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2020 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package gensupport - -import ( - "runtime" - "strings" - "unicode" -) - -// GoVersion returns the Go runtime version. The returned string -// has no whitespace. -func GoVersion() string { - return goVersion -} - -var goVersion = goVer(runtime.Version()) - -const develPrefix = "devel +" - -func goVer(s string) string { - if strings.HasPrefix(s, develPrefix) { - s = s[len(develPrefix):] - if p := strings.IndexFunc(s, unicode.IsSpace); p >= 0 { - s = s[:p] - } - return s - } - - if strings.HasPrefix(s, "go1") { - s = s[2:] - var prerelease string - if p := strings.IndexFunc(s, notSemverRune); p >= 0 { - s, prerelease = s[:p], s[p:] - } - if strings.HasSuffix(s, ".") { - s += "0" - } else if strings.Count(s, ".") < 2 { - s += ".0" - } - if prerelease != "" { - s += "-" + prerelease - } - return s - } - return "" -} - -func notSemverRune(r rune) bool { - return !strings.ContainsRune("0123456789.", r) -} diff --git a/vendor/google.golang.org/api/internal/impersonate/impersonate.go b/vendor/google.golang.org/api/internal/impersonate/impersonate.go deleted file mode 100644 index 4b2c775f21..0000000000 --- a/vendor/google.golang.org/api/internal/impersonate/impersonate.go +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright 2020 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 impersonate is used to impersonate Google Credentials. -package impersonate - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "io" - "net/http" - "time" - - "golang.org/x/oauth2" -) - -// Config for generating impersonated credentials. -type Config struct { - // Target is the service account to impersonate. Required. - Target string - // Scopes the impersonated credential should have. Required. - Scopes []string - // Delegates are the service accounts in a delegation chain. Each service - // account must be granted roles/iam.serviceAccountTokenCreator on the next - // service account in the chain. Optional. - Delegates []string -} - -// TokenSource returns an impersonated TokenSource configured with the provided -// config using ts as the base credential provider for making requests. -func TokenSource(ctx context.Context, ts oauth2.TokenSource, config *Config) (oauth2.TokenSource, error) { - if len(config.Scopes) == 0 { - return nil, fmt.Errorf("impersonate: scopes must be provided") - } - its := impersonatedTokenSource{ - ctx: ctx, - ts: ts, - name: formatIAMServiceAccountName(config.Target), - // Default to the longest acceptable value of one hour as the token will - // be refreshed automatically. - lifetime: "3600s", - } - - its.delegates = make([]string, len(config.Delegates)) - for i, v := range config.Delegates { - its.delegates[i] = formatIAMServiceAccountName(v) - } - its.scopes = make([]string, len(config.Scopes)) - copy(its.scopes, config.Scopes) - - return oauth2.ReuseTokenSource(nil, its), nil -} - -func formatIAMServiceAccountName(name string) string { - return fmt.Sprintf("projects/-/serviceAccounts/%s", name) -} - -type generateAccessTokenReq struct { - Delegates []string `json:"delegates,omitempty"` - Lifetime string `json:"lifetime,omitempty"` - Scope []string `json:"scope,omitempty"` -} - -type generateAccessTokenResp struct { - AccessToken string `json:"accessToken"` - ExpireTime string `json:"expireTime"` -} - -type impersonatedTokenSource struct { - ctx context.Context - ts oauth2.TokenSource - - name string - lifetime string - scopes []string - delegates []string -} - -// Token returns an impersonated Token. -func (i impersonatedTokenSource) Token() (*oauth2.Token, error) { - hc := oauth2.NewClient(i.ctx, i.ts) - reqBody := generateAccessTokenReq{ - Delegates: i.delegates, - Lifetime: i.lifetime, - Scope: i.scopes, - } - b, err := json.Marshal(reqBody) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to marshal request: %v", err) - } - url := fmt.Sprintf("https://iamcredentials.googleapis.com/v1/%s:generateAccessToken", i.name) - req, err := http.NewRequest("POST", url, bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to create request: %v", err) - } - req = req.WithContext(i.ctx) - req.Header.Set("Content-Type", "application/json") - - resp, err := hc.Do(req) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to generate access token: %v", err) - } - defer resp.Body.Close() - body, err := io.ReadAll(io.LimitReader(resp.Body, 1<<20)) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to read body: %v", err) - } - if c := resp.StatusCode; c < 200 || c > 299 { - return nil, fmt.Errorf("impersonate: status code %d: %s", c, body) - } - - var accessTokenResp generateAccessTokenResp - if err := json.Unmarshal(body, &accessTokenResp); err != nil { - return nil, fmt.Errorf("impersonate: unable to parse response: %v", err) - } - expiry, err := time.Parse(time.RFC3339, accessTokenResp.ExpireTime) - if err != nil { - return nil, fmt.Errorf("impersonate: unable to parse expiry: %v", err) - } - return &oauth2.Token{ - AccessToken: accessTokenResp.AccessToken, - Expiry: expiry, - }, nil -} diff --git a/vendor/google.golang.org/api/internal/s2a.go b/vendor/google.golang.org/api/internal/s2a.go deleted file mode 100644 index c70f2419b4..0000000000 --- a/vendor/google.golang.org/api/internal/s2a.go +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright 2023 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -import ( - "encoding/json" - "log" - "sync" - "time" - - "cloud.google.com/go/compute/metadata" -) - -const configEndpointSuffix = "instance/platform-security/auto-mtls-configuration" - -// The period an MTLS config can be reused before needing refresh. -var configExpiry = time.Hour - -// GetS2AAddress returns the S2A address to be reached via plaintext connection. -func GetS2AAddress() string { - c, err := getMetadataMTLSAutoConfig().Config() - if err != nil { - return "" - } - if !c.Valid() { - return "" - } - return c.S2A.PlaintextAddress -} - -type mtlsConfigSource interface { - Config() (*mtlsConfig, error) -} - -// mdsMTLSAutoConfigSource is an instance of reuseMTLSConfigSource, with metadataMTLSAutoConfig as its config source. -var ( - mdsMTLSAutoConfigSource mtlsConfigSource - once sync.Once -) - -// getMetadataMTLSAutoConfig returns mdsMTLSAutoConfigSource, which is backed by config from MDS with auto-refresh. -func getMetadataMTLSAutoConfig() mtlsConfigSource { - once.Do(func() { - mdsMTLSAutoConfigSource = &reuseMTLSConfigSource{ - src: &metadataMTLSAutoConfig{}, - } - }) - return mdsMTLSAutoConfigSource -} - -// reuseMTLSConfigSource caches a valid version of mtlsConfig, and uses `src` to refresh upon config expiry. -// It implements the mtlsConfigSource interface, so calling Config() on it returns an mtlsConfig. -type reuseMTLSConfigSource struct { - src mtlsConfigSource // src.Config() is called when config is expired - mu sync.Mutex // mutex guards config - config *mtlsConfig // cached config -} - -func (cs *reuseMTLSConfigSource) Config() (*mtlsConfig, error) { - cs.mu.Lock() - defer cs.mu.Unlock() - - if cs.config.Valid() { - return cs.config, nil - } - c, err := cs.src.Config() - if err != nil { - return nil, err - } - cs.config = c - return c, nil -} - -// metadataMTLSAutoConfig is an implementation of the interface mtlsConfigSource -// It has the logic to query MDS and return an mtlsConfig -type metadataMTLSAutoConfig struct{} - -var httpGetMetadataMTLSConfig = func() (string, error) { - return metadata.Get(configEndpointSuffix) -} - -func (cs *metadataMTLSAutoConfig) Config() (*mtlsConfig, error) { - resp, err := httpGetMetadataMTLSConfig() - if err != nil { - log.Printf("querying MTLS config from MDS endpoint failed: %v", err) - return defaultMTLSConfig(), nil - } - var config mtlsConfig - err = json.Unmarshal([]byte(resp), &config) - if err != nil { - log.Printf("unmarshalling MTLS config from MDS endpoint failed: %v", err) - return defaultMTLSConfig(), nil - } - - if config.S2A == nil { - log.Printf("returned MTLS config from MDS endpoint is invalid: %v", config) - return defaultMTLSConfig(), nil - } - - // set new expiry - config.Expiry = time.Now().Add(configExpiry) - return &config, nil -} - -func defaultMTLSConfig() *mtlsConfig { - return &mtlsConfig{ - S2A: &s2aAddresses{ - PlaintextAddress: "", - MTLSAddress: "", - }, - Expiry: time.Now().Add(configExpiry), - } -} - -// s2aAddresses contains the plaintext and/or MTLS S2A addresses. -type s2aAddresses struct { - // PlaintextAddress is the plaintext address to reach S2A - PlaintextAddress string `json:"plaintext_address"` - // MTLSAddress is the MTLS address to reach S2A - MTLSAddress string `json:"mtls_address"` -} - -// mtlsConfig contains the configuration for establishing MTLS connections with Google APIs. -type mtlsConfig struct { - S2A *s2aAddresses `json:"s2a"` - Expiry time.Time -} - -func (c *mtlsConfig) Valid() bool { - return c != nil && c.S2A != nil && !c.expired() -} -func (c *mtlsConfig) expired() bool { - return c.Expiry.Before(time.Now()) -} diff --git a/vendor/google.golang.org/api/internal/settings.go b/vendor/google.golang.org/api/internal/settings.go deleted file mode 100644 index a81d149ae2..0000000000 --- a/vendor/google.golang.org/api/internal/settings.go +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright 2017 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package internal supports the options and transport packages. -package internal - -import ( - "crypto/tls" - "errors" - "log/slog" - "net/http" - "os" - "strconv" - "time" - - "cloud.google.com/go/auth" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "google.golang.org/api/internal/impersonate" - "google.golang.org/grpc" -) - -const ( - newAuthLibEnvVar = "GOOGLE_API_GO_EXPERIMENTAL_ENABLE_NEW_AUTH_LIB" - newAuthLibDisabledEnVar = "GOOGLE_API_GO_EXPERIMENTAL_DISABLE_NEW_AUTH_LIB" - universeDomainEnvVar = "GOOGLE_CLOUD_UNIVERSE_DOMAIN" - defaultUniverseDomain = "googleapis.com" -) - -// DialSettings holds information needed to establish a connection with a -// Google API service. -type DialSettings struct { - Endpoint string - DefaultEndpoint string - DefaultEndpointTemplate string - DefaultMTLSEndpoint string - Scopes []string - DefaultScopes []string - EnableJwtWithScope bool - TokenSource oauth2.TokenSource - Credentials *google.Credentials - CredentialsFile string // if set, Token Source is ignored. - CredentialsJSON []byte - InternalCredentials *google.Credentials - UserAgent string - APIKey string - Audiences []string - DefaultAudience string - HTTPClient *http.Client - GRPCDialOpts []grpc.DialOption - GRPCConn *grpc.ClientConn - GRPCConnPool ConnPool - GRPCConnPoolSize int - NoAuth bool - TelemetryDisabled bool - ClientCertSource func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - CustomClaims map[string]interface{} - SkipValidation bool - ImpersonationConfig *impersonate.Config - EnableDirectPath bool - EnableDirectPathXds bool - AllowNonDefaultServiceAccount bool - DefaultUniverseDomain string - UniverseDomain string - AllowHardBoundTokens []string - Logger *slog.Logger - // Google API system parameters. For more information please read: - // https://cloud.google.com/apis/docs/system-parameters - QuotaProject string - RequestReason string - - // New Auth library Options - AuthCredentials *auth.Credentials - EnableNewAuthLibrary bool - - // TODO(b/372244283): Remove after b/358175516 has been fixed - EnableAsyncRefreshDryRun func() -} - -// GetScopes returns the user-provided scopes, if set, or else falls back to the -// default scopes. -func (ds *DialSettings) GetScopes() []string { - if len(ds.Scopes) > 0 { - return ds.Scopes - } - return ds.DefaultScopes -} - -// GetAudience returns the user-provided audience, if set, or else falls back to the default audience. -func (ds *DialSettings) GetAudience() string { - if ds.HasCustomAudience() { - return ds.Audiences[0] - } - return ds.DefaultAudience -} - -// HasCustomAudience returns true if a custom audience is provided by users. -func (ds *DialSettings) HasCustomAudience() bool { - return len(ds.Audiences) > 0 -} - -// IsNewAuthLibraryEnabled returns true if the new auth library should be used. -func (ds *DialSettings) IsNewAuthLibraryEnabled() bool { - // Disabled env is for future rollouts to make sure there is a way to easily - // disable this behaviour once we switch in on by default. - if b, err := strconv.ParseBool(os.Getenv(newAuthLibDisabledEnVar)); err == nil && b { - return false - } - if ds.EnableNewAuthLibrary { - return true - } - if ds.AuthCredentials != nil { - return true - } - if b, err := strconv.ParseBool(os.Getenv(newAuthLibEnvVar)); err == nil { - return b - } - return false -} - -// Validate reports an error if ds is invalid. -func (ds *DialSettings) Validate() error { - if ds.SkipValidation { - return nil - } - hasCreds := ds.APIKey != "" || ds.TokenSource != nil || ds.CredentialsFile != "" || ds.Credentials != nil - if ds.NoAuth && hasCreds { - return errors.New("options.WithoutAuthentication is incompatible with any option that provides credentials") - } - // Credentials should not appear with other options. - // We currently allow TokenSource and CredentialsFile to coexist. - // TODO(jba): make TokenSource & CredentialsFile an error (breaking change). - nCreds := 0 - if ds.Credentials != nil { - nCreds++ - } - if len(ds.CredentialsJSON) > 0 { - nCreds++ - } - if ds.CredentialsFile != "" { - nCreds++ - } - if ds.APIKey != "" { - nCreds++ - } - if ds.TokenSource != nil { - nCreds++ - } - if len(ds.Scopes) > 0 && len(ds.Audiences) > 0 { - return errors.New("WithScopes is incompatible with WithAudience") - } - // Accept only one form of credentials, except we allow TokenSource and CredentialsFile for backwards compatibility. - if nCreds > 1 && !(nCreds == 2 && ds.TokenSource != nil && ds.CredentialsFile != "") { - return errors.New("multiple credential options provided") - } - if ds.GRPCConn != nil && ds.GRPCConnPool != nil { - return errors.New("WithGRPCConn is incompatible with WithConnPool") - } - if ds.HTTPClient != nil && ds.GRPCConnPool != nil { - return errors.New("WithHTTPClient is incompatible with WithConnPool") - } - if ds.HTTPClient != nil && ds.GRPCConn != nil { - return errors.New("WithHTTPClient is incompatible with WithGRPCConn") - } - if ds.HTTPClient != nil && ds.GRPCDialOpts != nil { - return errors.New("WithHTTPClient is incompatible with gRPC dial options") - } - if ds.HTTPClient != nil && ds.QuotaProject != "" { - return errors.New("WithHTTPClient is incompatible with QuotaProject") - } - if ds.HTTPClient != nil && ds.RequestReason != "" { - return errors.New("WithHTTPClient is incompatible with RequestReason") - } - if ds.HTTPClient != nil && ds.ClientCertSource != nil { - return errors.New("WithHTTPClient is incompatible with WithClientCertSource") - } - if ds.ClientCertSource != nil && (ds.GRPCConn != nil || ds.GRPCConnPool != nil || ds.GRPCConnPoolSize != 0 || ds.GRPCDialOpts != nil) { - return errors.New("WithClientCertSource is currently only supported for HTTP. gRPC settings are incompatible") - } - if ds.ImpersonationConfig != nil && len(ds.ImpersonationConfig.Scopes) == 0 && len(ds.Scopes) == 0 { - return errors.New("WithImpersonatedCredentials requires scopes being provided") - } - return nil -} - -// GetDefaultUniverseDomain returns the Google default universe domain -// ("googleapis.com"). -func (ds *DialSettings) GetDefaultUniverseDomain() string { - return defaultUniverseDomain -} - -// GetUniverseDomain returns the default service domain for a given Cloud -// universe, with the following precedence: -// -// 1. A non-empty option.WithUniverseDomain. -// 2. A non-empty environment variable GOOGLE_CLOUD_UNIVERSE_DOMAIN. -// 3. The default value "googleapis.com". -func (ds *DialSettings) GetUniverseDomain() string { - if ds.UniverseDomain != "" { - return ds.UniverseDomain - } - if envUD := os.Getenv(universeDomainEnvVar); envUD != "" { - return envUD - } - return defaultUniverseDomain -} - -// IsUniverseDomainGDU returns true if the universe domain is the default Google -// universe ("googleapis.com"). -func (ds *DialSettings) IsUniverseDomainGDU() bool { - return ds.GetUniverseDomain() == defaultUniverseDomain -} - -// GetUniverseDomain returns the default service domain for a given Cloud -// universe, from google.Credentials. This wrapper function should be removed -// to close https://github.com/googleapis/google-api-go-client/issues/2399. -func GetUniverseDomain(creds *google.Credentials) (string, error) { - timer := time.NewTimer(time.Second) - defer timer.Stop() - errors := make(chan error) - results := make(chan string) - - go func() { - result, err := creds.GetUniverseDomain() - if err != nil { - errors <- err - return - } - results <- result - }() - - select { - case <-errors: - // An error that is returned before the timer expires is likely to be - // connection refused. Temporarily (2024-03-21) return the GDU domain. - return defaultUniverseDomain, nil - case res := <-results: - return res, nil - case <-timer.C: // Timer is expired. - // If err or res was not returned, it means that creds.GetUniverseDomain() - // did not complete in 1s. Assume that MDS is likely never responding to - // the endpoint and will timeout. This is the source of issues such as - // https://github.com/googleapis/google-cloud-go/issues/9350. - // Temporarily (2024-02-02) return the GDU domain. Restore the original - // calls to creds.GetUniverseDomain() in grpc/dial.go and http/dial.go - // and remove this method to close - // https://github.com/googleapis/google-api-go-client/issues/2399. - return defaultUniverseDomain, nil - } -} diff --git a/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE b/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE deleted file mode 100644 index 7109c6ef93..0000000000 --- a/vendor/google.golang.org/api/internal/third_party/uritemplates/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 Joshua Tacoma. 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/google.golang.org/api/internal/third_party/uritemplates/METADATA b/vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA deleted file mode 100644 index c7f86fcd5f..0000000000 --- a/vendor/google.golang.org/api/internal/third_party/uritemplates/METADATA +++ /dev/null @@ -1,14 +0,0 @@ -name: "uritemplates" -description: - "Package uritemplates is a level 4 implementation of RFC 6570 (URI " - "Template, http://tools.ietf.org/html/rfc6570)." - -third_party { - url { - type: GIT - value: "https://github.com/jtacoma/uritemplates" - } - version: "0.1" - last_upgrade_date { year: 2014 month: 8 day: 18 } - license_type: NOTICE -} diff --git a/vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go b/vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go deleted file mode 100644 index 8c27d19d75..0000000000 --- a/vendor/google.golang.org/api/internal/third_party/uritemplates/uritemplates.go +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright 2013 Joshua Tacoma. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package uritemplates is a level 3 implementation of RFC 6570 (URI -// Template, http://tools.ietf.org/html/rfc6570). -// uritemplates does not support composite values (in Go: slices or maps) -// and so does not qualify as a level 4 implementation. -package uritemplates - -import ( - "bytes" - "errors" - "regexp" - "strconv" - "strings" -) - -var ( - unreserved = regexp.MustCompile("[^A-Za-z0-9\\-._~]") - reserved = regexp.MustCompile("[^A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=]") - validname = regexp.MustCompile("^([A-Za-z0-9_\\.]|%[0-9A-Fa-f][0-9A-Fa-f])+$") - hex = []byte("0123456789ABCDEF") -) - -func pctEncode(src []byte) []byte { - dst := make([]byte, len(src)*3) - for i, b := range src { - buf := dst[i*3 : i*3+3] - buf[0] = 0x25 - buf[1] = hex[b/16] - buf[2] = hex[b%16] - } - return dst -} - -// pairWriter is a convenience struct which allows escaped and unescaped -// versions of the template to be written in parallel. -type pairWriter struct { - escaped, unescaped bytes.Buffer -} - -// Write writes the provided string directly without any escaping. -func (w *pairWriter) Write(s string) { - w.escaped.WriteString(s) - w.unescaped.WriteString(s) -} - -// Escape writes the provided string, escaping the string for the -// escaped output. -func (w *pairWriter) Escape(s string, allowReserved bool) { - w.unescaped.WriteString(s) - if allowReserved { - w.escaped.Write(reserved.ReplaceAllFunc([]byte(s), pctEncode)) - } else { - w.escaped.Write(unreserved.ReplaceAllFunc([]byte(s), pctEncode)) - } -} - -// Escaped returns the escaped string. -func (w *pairWriter) Escaped() string { - return w.escaped.String() -} - -// Unescaped returns the unescaped string. -func (w *pairWriter) Unescaped() string { - return w.unescaped.String() -} - -// A uriTemplate is a parsed representation of a URI template. -type uriTemplate struct { - raw string - parts []templatePart -} - -// parse parses a URI template string into a uriTemplate object. -func parse(rawTemplate string) (*uriTemplate, error) { - split := strings.Split(rawTemplate, "{") - parts := make([]templatePart, len(split)*2-1) - for i, s := range split { - if i == 0 { - if strings.Contains(s, "}") { - return nil, errors.New("unexpected }") - } - parts[i].raw = s - continue - } - subsplit := strings.Split(s, "}") - if len(subsplit) != 2 { - return nil, errors.New("malformed template") - } - expression := subsplit[0] - var err error - parts[i*2-1], err = parseExpression(expression) - if err != nil { - return nil, err - } - parts[i*2].raw = subsplit[1] - } - return &uriTemplate{ - raw: rawTemplate, - parts: parts, - }, nil -} - -type templatePart struct { - raw string - terms []templateTerm - first string - sep string - named bool - ifemp string - allowReserved bool -} - -type templateTerm struct { - name string - explode bool - truncate int -} - -func parseExpression(expression string) (result templatePart, err error) { - switch expression[0] { - case '+': - result.sep = "," - result.allowReserved = true - expression = expression[1:] - case '.': - result.first = "." - result.sep = "." - expression = expression[1:] - case '/': - result.first = "/" - result.sep = "/" - expression = expression[1:] - case ';': - result.first = ";" - result.sep = ";" - result.named = true - expression = expression[1:] - case '?': - result.first = "?" - result.sep = "&" - result.named = true - result.ifemp = "=" - expression = expression[1:] - case '&': - result.first = "&" - result.sep = "&" - result.named = true - result.ifemp = "=" - expression = expression[1:] - case '#': - result.first = "#" - result.sep = "," - result.allowReserved = true - expression = expression[1:] - default: - result.sep = "," - } - rawterms := strings.Split(expression, ",") - result.terms = make([]templateTerm, len(rawterms)) - for i, raw := range rawterms { - result.terms[i], err = parseTerm(raw) - if err != nil { - break - } - } - return result, err -} - -func parseTerm(term string) (result templateTerm, err error) { - // TODO(djd): Remove "*" suffix parsing once we check that no APIs have - // mistakenly used that attribute. - if strings.HasSuffix(term, "*") { - result.explode = true - term = term[:len(term)-1] - } - split := strings.Split(term, ":") - if len(split) == 1 { - result.name = term - } else if len(split) == 2 { - result.name = split[0] - var parsed int64 - parsed, err = strconv.ParseInt(split[1], 10, 0) - result.truncate = int(parsed) - } else { - err = errors.New("multiple colons in same term") - } - if !validname.MatchString(result.name) { - err = errors.New("not a valid name: " + result.name) - } - if result.explode && result.truncate > 0 { - err = errors.New("both explode and prefix modifiers on same term") - } - return result, err -} - -// Expand expands a URI template with a set of values to produce the -// resultant URI. Two forms of the result are returned: one with all the -// elements escaped, and one with the elements unescaped. -func (t *uriTemplate) Expand(values map[string]string) (escaped, unescaped string) { - var w pairWriter - for _, p := range t.parts { - p.expand(&w, values) - } - return w.Escaped(), w.Unescaped() -} - -func (tp *templatePart) expand(w *pairWriter, values map[string]string) { - if len(tp.raw) > 0 { - w.Write(tp.raw) - return - } - var first = true - for _, term := range tp.terms { - value, exists := values[term.name] - if !exists { - continue - } - if first { - w.Write(tp.first) - first = false - } else { - w.Write(tp.sep) - } - tp.expandString(w, term, value) - } -} - -func (tp *templatePart) expandName(w *pairWriter, name string, empty bool) { - if tp.named { - w.Write(name) - if empty { - w.Write(tp.ifemp) - } else { - w.Write("=") - } - } -} - -func (tp *templatePart) expandString(w *pairWriter, t templateTerm, s string) { - if len(s) > t.truncate && t.truncate > 0 { - s = s[:t.truncate] - } - tp.expandName(w, t.name, len(s) == 0) - w.Escape(s, tp.allowReserved) -} diff --git a/vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go b/vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go deleted file mode 100644 index 2e70b81543..0000000000 --- a/vendor/google.golang.org/api/internal/third_party/uritemplates/utils.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2016 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 uritemplates - -// Expand parses then expands a URI template with a set of values to produce -// the resultant URI. Two forms of the result are returned: one with all the -// elements escaped, and one with the elements unescaped. -func Expand(path string, values map[string]string) (escaped, unescaped string, err error) { - template, err := parse(path) - if err != nil { - return "", "", err - } - escaped, unescaped = template.Expand(values) - return escaped, unescaped, nil -} diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go deleted file mode 100644 index 6c965349fd..0000000000 --- a/vendor/google.golang.org/api/internal/version.go +++ /dev/null @@ -1,8 +0,0 @@ -// Copyright 2022 Google LLC. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package internal - -// Version is the current tagged release of the library. -const Version = "0.251.0" diff --git a/vendor/google.golang.org/api/option/internaloption/internaloption.go b/vendor/google.golang.org/api/option/internaloption/internaloption.go deleted file mode 100644 index 931f093d89..0000000000 --- a/vendor/google.golang.org/api/option/internaloption/internaloption.go +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2020 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package internaloption contains options used internally by Google client code. -package internaloption - -import ( - "context" - "log/slog" - - "cloud.google.com/go/auth" - "github.com/googleapis/gax-go/v2/internallog" - "golang.org/x/oauth2/google" - "google.golang.org/api/internal" - "google.golang.org/api/option" -) - -type defaultEndpointOption string - -func (o defaultEndpointOption) Apply(settings *internal.DialSettings) { - settings.DefaultEndpoint = string(o) -} - -// WithDefaultEndpoint is an option that indicates the default endpoint. -// -// It should only be used internally by generated clients. -// -// This is similar to WithEndpoint, but allows us to determine whether the user has overridden the default endpoint. -// -// Deprecated: WithDefaultEndpoint does not support setting the universe domain. -// Use WithDefaultEndpointTemplate and WithDefaultUniverseDomain to compose the -// default endpoint instead. -func WithDefaultEndpoint(url string) option.ClientOption { - return defaultEndpointOption(url) -} - -type defaultEndpointTemplateOption string - -func (o defaultEndpointTemplateOption) Apply(settings *internal.DialSettings) { - settings.DefaultEndpointTemplate = string(o) -} - -// WithDefaultEndpointTemplate provides a template for creating the endpoint -// using a universe domain. See also WithDefaultUniverseDomain and -// option.WithUniverseDomain. The placeholder UNIVERSE_DOMAIN should be used -// instead of a concrete universe domain such as "googleapis.com". -// -// Example: WithDefaultEndpointTemplate("https://logging.UNIVERSE_DOMAIN/") -// -// It should only be used internally by generated clients. -func WithDefaultEndpointTemplate(url string) option.ClientOption { - return defaultEndpointTemplateOption(url) -} - -type defaultMTLSEndpointOption string - -func (o defaultMTLSEndpointOption) Apply(settings *internal.DialSettings) { - settings.DefaultMTLSEndpoint = string(o) -} - -// WithDefaultMTLSEndpoint is an option that indicates the default mTLS endpoint. -// -// It should only be used internally by generated clients. -func WithDefaultMTLSEndpoint(url string) option.ClientOption { - return defaultMTLSEndpointOption(url) -} - -// SkipDialSettingsValidation bypasses validation on ClientOptions. -// -// It should only be used internally. -func SkipDialSettingsValidation() option.ClientOption { - return skipDialSettingsValidation{} -} - -type skipDialSettingsValidation struct{} - -func (s skipDialSettingsValidation) Apply(settings *internal.DialSettings) { - settings.SkipValidation = true -} - -// EnableDirectPath returns a ClientOption that overrides the default -// attempt to use DirectPath. -// -// It should only be used internally by generated clients. -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func EnableDirectPath(dp bool) option.ClientOption { - return enableDirectPath(dp) -} - -type enableDirectPath bool - -func (e enableDirectPath) Apply(o *internal.DialSettings) { - o.EnableDirectPath = bool(e) -} - -// EnableDirectPathXds returns a ClientOption that overrides the default -// DirectPath type. It is only valid when DirectPath is enabled. -// -// It should only be used internally by generated clients. -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func EnableDirectPathXds() option.ClientOption { - return enableDirectPathXds(true) -} - -type enableDirectPathXds bool - -func (x enableDirectPathXds) Apply(o *internal.DialSettings) { - o.EnableDirectPathXds = bool(x) -} - -// AllowNonDefaultServiceAccount returns a ClientOption that overrides the default -// requirement for using the default service account for DirectPath. -// -// It should only be used internally by generated clients. -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func AllowNonDefaultServiceAccount(nd bool) option.ClientOption { - return allowNonDefaultServiceAccount(nd) -} - -type allowNonDefaultServiceAccount bool - -func (a allowNonDefaultServiceAccount) Apply(o *internal.DialSettings) { - o.AllowNonDefaultServiceAccount = bool(a) -} - -// WithDefaultAudience returns a ClientOption that specifies a default audience -// to be used as the audience field ("aud") for the JWT token authentication. -// -// It should only be used internally by generated clients. -func WithDefaultAudience(audience string) option.ClientOption { - return withDefaultAudience(audience) -} - -type withDefaultAudience string - -func (w withDefaultAudience) Apply(o *internal.DialSettings) { - o.DefaultAudience = string(w) -} - -// WithDefaultScopes returns a ClientOption that overrides the default OAuth2 -// scopes to be used for a service. -// -// It should only be used internally by generated clients. -func WithDefaultScopes(scope ...string) option.ClientOption { - return withDefaultScopes(scope) -} - -type withDefaultScopes []string - -func (w withDefaultScopes) Apply(o *internal.DialSettings) { - o.DefaultScopes = make([]string, len(w)) - copy(o.DefaultScopes, w) -} - -// WithDefaultUniverseDomain returns a ClientOption that sets the default universe domain. -// -// It should only be used internally by generated clients. -// -// This is similar to the public WithUniverse, but allows us to determine whether the user has -// overridden the default universe. -func WithDefaultUniverseDomain(ud string) option.ClientOption { - return withDefaultUniverseDomain(ud) -} - -type withDefaultUniverseDomain string - -func (w withDefaultUniverseDomain) Apply(o *internal.DialSettings) { - o.DefaultUniverseDomain = string(w) -} - -// EnableJwtWithScope returns a ClientOption that specifies if scope can be used -// with self-signed JWT. -// -// EnableJwtWithScope is ignored when option.WithUniverseDomain is set -// to a value other than the Google Default Universe (GDU) of "googleapis.com". -// For non-GDU domains, token exchange is impossible and services must -// support self-signed JWTs with scopes. -func EnableJwtWithScope() option.ClientOption { - return enableJwtWithScope(true) -} - -type enableJwtWithScope bool - -func (w enableJwtWithScope) Apply(o *internal.DialSettings) { - o.EnableJwtWithScope = bool(w) -} - -// AllowHardBoundTokens returns a ClientOption that allows libraries to request a hard-bound token. -// Obtaining hard-bound tokens requires the connection to be established using either Application -// Layer Transport Security (ALTS) or mutual TLS (mTLS) with S2A. For more information on ALTS, -// see: https://cloud.google.com/docs/security/encryption-in-transit/application-layer-transport-security -// -// The AllowHardBoundTokens option accepts the following values (or a combination thereof): -// -// - "MTLS_S2A": Allows obtaining hard-bound tokens when the connection uses mutual TLS with S2A. -// - "ALTS": Allows obtaining hard-bound tokens when the connection uses ALTS. -// -// For example, to allow obtaining hard-bound tokens with either MTLS_S2A or ALTS, you would -// provide both values (e.g., {"MTLS_S2A","ALTS"}). If no value is provided, hard-bound tokens -// will not be requested. -// -// It should only be used internally by generated clients. -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func AllowHardBoundTokens(protocol ...string) option.ClientOption { - return allowHardBoundTokens(protocol) -} - -type allowHardBoundTokens []string - -func (a allowHardBoundTokens) Apply(o *internal.DialSettings) { - o.AllowHardBoundTokens = make([]string, len(a)) - copy(o.AllowHardBoundTokens, a) -} - -// WithCredentials returns a client option to specify credentials which will be used to authenticate API calls. -// This credential takes precedence over all other credential options. -func WithCredentials(creds *google.Credentials) option.ClientOption { - return (*withCreds)(creds) -} - -type withCreds google.Credentials - -func (w *withCreds) Apply(o *internal.DialSettings) { - o.InternalCredentials = (*google.Credentials)(w) -} - -// EnableNewAuthLibrary returns a ClientOption that specifies if libraries in this -// module to delegate auth to our new library. This option will be removed in -// the future once all clients have been moved to the new auth layer. -func EnableNewAuthLibrary() option.ClientOption { - return enableNewAuthLibrary(true) -} - -type enableNewAuthLibrary bool - -func (w enableNewAuthLibrary) Apply(o *internal.DialSettings) { - o.EnableNewAuthLibrary = bool(w) -} - -// EnableAsyncRefreshDryRun returns a ClientOption that specifies if libraries in this -// module should asynchronously refresh auth token in parallel to sync refresh. -// -// This option can be used to determine whether refreshing the token asymnchronously -// prior to its actual expiry works without any issues in a particular environment. -// -// errHandler function will be called when there is an error while refreshing -// the token asynchronously. -// -// This is an EXPERIMENTAL option and will be removed in the future. -// TODO(b/372244283): Remove after b/358175516 has been fixed -func EnableAsyncRefreshDryRun(errHandler func()) option.ClientOption { - return enableAsyncRefreshDryRun{ - errHandler: errHandler, - } -} - -// TODO(b/372244283): Remove after b/358175516 has been fixed -type enableAsyncRefreshDryRun struct { - errHandler func() -} - -// TODO(b/372244283): Remove after b/358175516 has been fixed -func (w enableAsyncRefreshDryRun) Apply(o *internal.DialSettings) { - o.EnableAsyncRefreshDryRun = w.errHandler -} - -// EmbeddableAdapter is a no-op option.ClientOption that allow libraries to -// create their own client options by embedding this type into their own -// client-specific option wrapper. See example for usage. -type EmbeddableAdapter struct{} - -func (*EmbeddableAdapter) Apply(_ *internal.DialSettings) {} - -// GetLogger is a helper for client libraries to extract the [slog.Logger] from -// the provided options or return a default logger if one is not found. -// -// It should only be used internally by generated clients. This is an EXPERIMENTAL API -// and may be changed or removed in the future. -func GetLogger(opts []option.ClientOption) *slog.Logger { - var ds internal.DialSettings - for _, opt := range opts { - opt.Apply(&ds) - } - return internallog.New(ds.Logger) -} - -// AuthCreds returns [cloud.google.com/go/auth.Credentials] using the following -// options provided via [option.ClientOption], including legacy oauth2/google -// options, in this order: -// -// - [option.WithoutAuthentication] -// - [option.WithAuthCredentials] -// - [WithCredentials] (internal use only) -// - [option.WithCredentials] -// - [option.WithTokenSource] -// -// If there are no applicable credentials options, then it passes the -// following options to [cloud.google.com/go/auth/credentials.DetectDefault] and -// returns the result: -// -// - [option.WithAudiences] -// - [option.WithCredentialsFile] -// - [option.WithCredentialsJSON] -// - [option.WithScopes] -// - [WithDefaultScopes] (internal use only) -// - [EnableJwtWithScope] (internal use only) -// -// This function should only be used internally by generated clients. This is an -// EXPERIMENTAL API and may be changed or removed in the future. -func AuthCreds(ctx context.Context, opts []option.ClientOption) (*auth.Credentials, error) { - var ds internal.DialSettings - for _, opt := range opts { - opt.Apply(&ds) - } - return internal.AuthCreds(ctx, &ds) -} diff --git a/vendor/google.golang.org/api/option/option.go b/vendor/google.golang.org/api/option/option.go deleted file mode 100644 index 1b134caa86..0000000000 --- a/vendor/google.golang.org/api/option/option.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright 2017 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package option contains options for Google API clients. -package option - -import ( - "crypto/tls" - "log/slog" - "net/http" - - "cloud.google.com/go/auth" - "golang.org/x/oauth2" - "golang.org/x/oauth2/google" - "google.golang.org/api/internal" - "google.golang.org/api/internal/impersonate" - "google.golang.org/grpc" -) - -// A ClientOption is an option for a Google API client. -type ClientOption interface { - Apply(*internal.DialSettings) -} - -// WithTokenSource returns a ClientOption that specifies an OAuth2 token -// source to be used as the basis for authentication. -func WithTokenSource(s oauth2.TokenSource) ClientOption { - return withTokenSource{s} -} - -type withTokenSource struct{ ts oauth2.TokenSource } - -func (w withTokenSource) Apply(o *internal.DialSettings) { - o.TokenSource = w.ts -} - -type withCredFile string - -func (w withCredFile) Apply(o *internal.DialSettings) { - o.CredentialsFile = string(w) -} - -// WithCredentialsFile returns a ClientOption that authenticates -// API calls with the given service account or refresh token JSON -// credentials file. -// -// Important: If you accept a credential configuration (credential -// JSON/File/Stream) from an external source for authentication to Google -// Cloud Platform, you must validate it before providing it to any Google -// API or library. Providing an unvalidated credential configuration to -// Google APIs can compromise the security of your systems and data. For -// more information, refer to [Validate credential configurations from -// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). -func WithCredentialsFile(filename string) ClientOption { - return withCredFile(filename) -} - -// WithServiceAccountFile returns a ClientOption that uses a Google service -// account credentials file to authenticate. -// -// Important: If you accept a credential configuration (credential -// JSON/File/Stream) from an external source for authentication to Google -// Cloud Platform, you must validate it before providing it to any Google -// API or library. Providing an unvalidated credential configuration to -// Google APIs can compromise the security of your systems and data. For -// more information, refer to [Validate credential configurations from -// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). -// -// Deprecated: Use WithCredentialsFile instead. -func WithServiceAccountFile(filename string) ClientOption { - return WithCredentialsFile(filename) -} - -// WithCredentialsJSON returns a ClientOption that authenticates -// API calls with the given service account or refresh token JSON -// credentials. -// -// Important: If you accept a credential configuration (credential -// JSON/File/Stream) from an external source for authentication to Google -// Cloud Platform, you must validate it before providing it to any Google -// API or library. Providing an unvalidated credential configuration to -// Google APIs can compromise the security of your systems and data. For -// more information, refer to [Validate credential configurations from -// external sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). -func WithCredentialsJSON(p []byte) ClientOption { - return withCredentialsJSON(p) -} - -type withCredentialsJSON []byte - -func (w withCredentialsJSON) Apply(o *internal.DialSettings) { - o.CredentialsJSON = make([]byte, len(w)) - copy(o.CredentialsJSON, w) -} - -// WithEndpoint returns a ClientOption that overrides the default endpoint -// to be used for a service. Please note that by default Google APIs only -// accept HTTPS traffic. -// -// For a gRPC client, the port number is typically included in the endpoint. -// Example: "us-central1-speech.googleapis.com:443". -// -// For a REST client, the port number is typically not included. Example: -// "https://speech.googleapis.com". -func WithEndpoint(url string) ClientOption { - return withEndpoint(url) -} - -type withEndpoint string - -func (w withEndpoint) Apply(o *internal.DialSettings) { - o.Endpoint = string(w) -} - -// WithScopes returns a ClientOption that overrides the default OAuth2 scopes -// to be used for a service. -// -// If both WithScopes and WithTokenSource are used, scope settings from the -// token source will be used instead. -func WithScopes(scope ...string) ClientOption { - return withScopes(scope) -} - -type withScopes []string - -func (w withScopes) Apply(o *internal.DialSettings) { - o.Scopes = make([]string, len(w)) - copy(o.Scopes, w) -} - -// WithUserAgent returns a ClientOption that sets the User-Agent. This option -// is incompatible with the [WithHTTPClient] option. If you wish to provide a -// custom client you will need to add this header via RoundTripper middleware. -func WithUserAgent(ua string) ClientOption { - return withUA(ua) -} - -type withUA string - -func (w withUA) Apply(o *internal.DialSettings) { o.UserAgent = string(w) } - -// WithHTTPClient returns a ClientOption that specifies the HTTP client to use -// as the basis of communications. This option may only be used with services -// that support HTTP as their communication transport. When used, the -// WithHTTPClient option takes precedent over all other supplied options. -func WithHTTPClient(client *http.Client) ClientOption { - return withHTTPClient{client} -} - -type withHTTPClient struct{ client *http.Client } - -func (w withHTTPClient) Apply(o *internal.DialSettings) { - o.HTTPClient = w.client -} - -// WithGRPCConn returns a ClientOption that specifies the gRPC client -// connection to use as the basis of communications. This option may only be -// used with services that support gRPC as their communication transport. When -// used, the WithGRPCConn option takes precedent over all other supplied -// options. -func WithGRPCConn(conn *grpc.ClientConn) ClientOption { - return withGRPCConn{conn} -} - -type withGRPCConn struct{ conn *grpc.ClientConn } - -func (w withGRPCConn) Apply(o *internal.DialSettings) { - o.GRPCConn = w.conn -} - -// WithGRPCDialOption returns a ClientOption that appends a new grpc.DialOption -// to an underlying gRPC dial. It does not work with WithGRPCConn. -func WithGRPCDialOption(opt grpc.DialOption) ClientOption { - return withGRPCDialOption{opt} -} - -type withGRPCDialOption struct{ opt grpc.DialOption } - -func (w withGRPCDialOption) Apply(o *internal.DialSettings) { - o.GRPCDialOpts = append(o.GRPCDialOpts, w.opt) -} - -// WithGRPCConnectionPool returns a ClientOption that creates a pool of gRPC -// connections that requests will be balanced between. -func WithGRPCConnectionPool(size int) ClientOption { - return withGRPCConnectionPool(size) -} - -type withGRPCConnectionPool int - -func (w withGRPCConnectionPool) Apply(o *internal.DialSettings) { - o.GRPCConnPoolSize = int(w) -} - -// WithAPIKey returns a ClientOption that specifies an API key to be used -// as the basis for authentication. -// -// API Keys can only be used for JSON-over-HTTP APIs, including those under -// the import path google.golang.org/api/.... -func WithAPIKey(apiKey string) ClientOption { - return withAPIKey(apiKey) -} - -type withAPIKey string - -func (w withAPIKey) Apply(o *internal.DialSettings) { o.APIKey = string(w) } - -// WithAudiences returns a ClientOption that specifies an audience to be used -// as the audience field ("aud") for the JWT token authentication. -func WithAudiences(audience ...string) ClientOption { - return withAudiences(audience) -} - -type withAudiences []string - -func (w withAudiences) Apply(o *internal.DialSettings) { - o.Audiences = make([]string, len(w)) - copy(o.Audiences, w) -} - -// WithoutAuthentication returns a ClientOption that specifies that no -// authentication should be used. It is suitable only for testing and for -// accessing public resources, like public Google Cloud Storage buckets. -// It is an error to provide both WithoutAuthentication and any of WithAPIKey, -// WithTokenSource, WithCredentialsFile or WithServiceAccountFile. -func WithoutAuthentication() ClientOption { - return withoutAuthentication{} -} - -type withoutAuthentication struct{} - -func (w withoutAuthentication) Apply(o *internal.DialSettings) { o.NoAuth = true } - -// WithQuotaProject returns a ClientOption that specifies the project used -// for quota and billing purposes. -// -// For more information please read: -// https://cloud.google.com/apis/docs/system-parameters -func WithQuotaProject(quotaProject string) ClientOption { - return withQuotaProject(quotaProject) -} - -type withQuotaProject string - -func (w withQuotaProject) Apply(o *internal.DialSettings) { - o.QuotaProject = string(w) -} - -// WithRequestReason returns a ClientOption that specifies a reason for -// making the request, which is intended to be recorded in audit logging. -// An example reason would be a support-case ticket number. -// -// For more information please read: -// https://cloud.google.com/apis/docs/system-parameters -func WithRequestReason(requestReason string) ClientOption { - return withRequestReason(requestReason) -} - -type withRequestReason string - -func (w withRequestReason) Apply(o *internal.DialSettings) { - o.RequestReason = string(w) -} - -// WithTelemetryDisabled returns a ClientOption that disables default telemetry (OpenCensus) -// settings on gRPC and HTTP clients. -// An example reason would be to bind custom telemetry that overrides the defaults. -func WithTelemetryDisabled() ClientOption { - return withTelemetryDisabled{} -} - -type withTelemetryDisabled struct{} - -func (w withTelemetryDisabled) Apply(o *internal.DialSettings) { - o.TelemetryDisabled = true -} - -// ClientCertSource is a function that returns a TLS client certificate to be used -// when opening TLS connections. -// -// It follows the same semantics as crypto/tls.Config.GetClientCertificate. -// -// This is an EXPERIMENTAL API and may be changed or removed in the future. -type ClientCertSource = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) - -// WithClientCertSource returns a ClientOption that specifies a -// callback function for obtaining a TLS client certificate. -// -// This option is used for supporting mTLS authentication, where the -// server validates the client certifcate when establishing a connection. -// -// The callback function will be invoked whenever the server requests a -// certificate from the client. Implementations of the callback function -// should try to ensure that a valid certificate can be repeatedly returned -// on demand for the entire life cycle of the transport client. If a nil -// Certificate is returned (i.e. no Certificate can be obtained), an error -// should be returned. -// -// This is an EXPERIMENTAL API and may be changed or removed in the future. -func WithClientCertSource(s ClientCertSource) ClientOption { - return withClientCertSource{s} -} - -type withClientCertSource struct{ s ClientCertSource } - -func (w withClientCertSource) Apply(o *internal.DialSettings) { - o.ClientCertSource = w.s -} - -// ImpersonateCredentials returns a ClientOption that will impersonate the -// target service account. -// -// In order to impersonate the target service account -// the base service account must have the Service Account Token Creator role, -// roles/iam.serviceAccountTokenCreator, on the target service account. -// See https://cloud.google.com/iam/docs/understanding-service-accounts. -// -// Optionally, delegates can be used during impersonation if the base service -// account lacks the token creator role on the target. When using delegates, -// each service account must be granted roles/iam.serviceAccountTokenCreator -// on the next service account in the chain. -// -// For example, if a base service account of SA1 is trying to impersonate target -// service account SA2 while using delegate service accounts DSA1 and DSA2, -// the following must be true: -// -// 1. Base service account SA1 has roles/iam.serviceAccountTokenCreator on -// DSA1. -// 2. DSA1 has roles/iam.serviceAccountTokenCreator on DSA2. -// 3. DSA2 has roles/iam.serviceAccountTokenCreator on target SA2. -// -// The resulting impersonated credential will either have the default scopes of -// the client being instantiating or the scopes from WithScopes if provided. -// Scopes are required for creating impersonated credentials, so if this option -// is used while not using a NewClient/NewService function, WithScopes must also -// be explicitly passed in as well. -// -// If the base credential is an authorized user and not a service account, or if -// the option WithQuotaProject is set, the target service account must have a -// role that grants the serviceusage.services.use permission such as -// roles/serviceusage.serviceUsageConsumer. -// -// This is an EXPERIMENTAL API and may be changed or removed in the future. -// -// Deprecated: This option has been replaced by `impersonate` package: -// `google.golang.org/api/impersonate`. Please use the `impersonate` package -// instead with the WithTokenSource option. -func ImpersonateCredentials(target string, delegates ...string) ClientOption { - return impersonateServiceAccount{ - target: target, - delegates: delegates, - } -} - -type impersonateServiceAccount struct { - target string - delegates []string -} - -func (i impersonateServiceAccount) Apply(o *internal.DialSettings) { - o.ImpersonationConfig = &impersonate.Config{ - Target: i.target, - } - o.ImpersonationConfig.Delegates = make([]string, len(i.delegates)) - copy(o.ImpersonationConfig.Delegates, i.delegates) -} - -type withCreds google.Credentials - -func (w *withCreds) Apply(o *internal.DialSettings) { - o.Credentials = (*google.Credentials)(w) -} - -// WithCredentials returns a ClientOption that authenticates API calls. -func WithCredentials(creds *google.Credentials) ClientOption { - return (*withCreds)(creds) -} - -// WithAuthCredentials returns a ClientOption that specifies an -// [cloud.google.com/go/auth.Credentials] to be used as the basis for -// authentication. -func WithAuthCredentials(creds *auth.Credentials) ClientOption { - return withAuthCredentials{creds} -} - -type withAuthCredentials struct{ creds *auth.Credentials } - -func (w withAuthCredentials) Apply(o *internal.DialSettings) { - o.AuthCredentials = w.creds -} - -// WithUniverseDomain returns a ClientOption that sets the universe domain. -func WithUniverseDomain(ud string) ClientOption { - return withUniverseDomain(ud) -} - -type withUniverseDomain string - -func (w withUniverseDomain) Apply(o *internal.DialSettings) { - o.UniverseDomain = string(w) -} - -// WithLogger returns a ClientOption that sets the logger used throughout the -// client library call stack. If this option is provided it takes precedence -// over the value set in GOOGLE_SDK_GO_LOGGING_LEVEL. Specifying this option -// enables logging at the provided logger's configured level. -func WithLogger(l *slog.Logger) ClientOption { - return withLogger{l} -} - -type withLogger struct{ l *slog.Logger } - -func (w withLogger) Apply(o *internal.DialSettings) { - o.Logger = w.l -} diff --git a/vendor/google.golang.org/api/transport/http/dial.go b/vendor/google.golang.org/api/transport/http/dial.go deleted file mode 100644 index a33df91203..0000000000 --- a/vendor/google.golang.org/api/transport/http/dial.go +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright 2015 Google LLC. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package http supports network connections to HTTP servers. -// This package is not intended for use by end developers. Use the -// google.golang.org/api/option package to configure API clients. -package http - -import ( - "context" - "crypto/tls" - "errors" - "net" - "net/http" - "time" - - "cloud.google.com/go/auth" - "cloud.google.com/go/auth/credentials" - "cloud.google.com/go/auth/httptransport" - "cloud.google.com/go/auth/oauth2adapt" - "go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp" - "golang.org/x/net/http2" - "golang.org/x/oauth2" - "google.golang.org/api/googleapi/transport" - "google.golang.org/api/internal" - "google.golang.org/api/internal/cert" - "google.golang.org/api/option" -) - -// NewClient returns an HTTP client for use communicating with a Google cloud -// service, configured with the given ClientOptions. It also returns the endpoint -// for the service as specified in the options. -func NewClient(ctx context.Context, opts ...option.ClientOption) (*http.Client, string, error) { - settings, err := newSettings(opts) - if err != nil { - return nil, "", err - } - clientCertSource, dialTLSContext, endpoint, err := internal.GetHTTPTransportConfigAndEndpoint(settings) - if err != nil { - return nil, "", err - } - // TODO(cbro): consider injecting the User-Agent even if an explicit HTTP client is provided? - if settings.HTTPClient != nil { - return settings.HTTPClient, endpoint, nil - } - - if settings.IsNewAuthLibraryEnabled() { - client, err := newClientNewAuth(ctx, nil, settings) - if err != nil { - return nil, "", err - } - return client, endpoint, nil - } - trans, err := newTransport(ctx, defaultBaseTransport(ctx, clientCertSource, dialTLSContext), settings) - if err != nil { - return nil, "", err - } - return &http.Client{Transport: trans}, endpoint, nil -} - -// newClientNewAuth is an adapter to call new auth library. -func newClientNewAuth(ctx context.Context, base http.RoundTripper, ds *internal.DialSettings) (*http.Client, error) { - // honor options if set - var creds *auth.Credentials - if ds.InternalCredentials != nil { - creds = oauth2adapt.AuthCredentialsFromOauth2Credentials(ds.InternalCredentials) - } else if ds.Credentials != nil { - creds = oauth2adapt.AuthCredentialsFromOauth2Credentials(ds.Credentials) - } else if ds.AuthCredentials != nil { - creds = ds.AuthCredentials - } else if ds.TokenSource != nil { - credOpts := &auth.CredentialsOptions{ - TokenProvider: oauth2adapt.TokenProviderFromTokenSource(ds.TokenSource), - } - if ds.QuotaProject != "" { - credOpts.QuotaProjectIDProvider = auth.CredentialsPropertyFunc(func(ctx context.Context) (string, error) { - return ds.QuotaProject, nil - }) - } - creds = auth.NewCredentials(credOpts) - } - - var skipValidation bool - // If our clients explicitly setup the credential skip validation as it is - // assumed correct - if ds.SkipValidation || ds.InternalCredentials != nil { - skipValidation = true - } - - // Defaults for older clients that don't set this value yet - defaultEndpointTemplate := ds.DefaultEndpointTemplate - if defaultEndpointTemplate == "" { - defaultEndpointTemplate = ds.DefaultEndpoint - } - - var aud string - if len(ds.Audiences) > 0 { - aud = ds.Audiences[0] - } - headers := http.Header{} - if ds.QuotaProject != "" { - headers.Set("X-goog-user-project", ds.QuotaProject) - } - if ds.RequestReason != "" { - headers.Set("X-goog-request-reason", ds.RequestReason) - } - if ds.UserAgent != "" { - headers.Set("User-Agent", ds.UserAgent) - } - client, err := httptransport.NewClient(&httptransport.Options{ - DisableTelemetry: ds.TelemetryDisabled, - DisableAuthentication: ds.NoAuth, - Headers: headers, - Endpoint: ds.Endpoint, - APIKey: ds.APIKey, - Credentials: creds, - ClientCertProvider: ds.ClientCertSource, - BaseRoundTripper: base, - DetectOpts: &credentials.DetectOptions{ - Scopes: ds.Scopes, - Audience: aud, - CredentialsFile: ds.CredentialsFile, - CredentialsJSON: ds.CredentialsJSON, - Logger: ds.Logger, - }, - InternalOptions: &httptransport.InternalOptions{ - EnableJWTWithScope: ds.EnableJwtWithScope, - DefaultAudience: ds.DefaultAudience, - DefaultEndpointTemplate: defaultEndpointTemplate, - DefaultMTLSEndpoint: ds.DefaultMTLSEndpoint, - DefaultScopes: ds.DefaultScopes, - SkipValidation: skipValidation, - }, - UniverseDomain: ds.UniverseDomain, - Logger: ds.Logger, - }) - if err != nil { - return nil, err - } - return client, nil -} - -// NewTransport creates an http.RoundTripper for use communicating with a Google -// cloud service, configured with the given ClientOptions. Its RoundTrip method delegates to base. -func NewTransport(ctx context.Context, base http.RoundTripper, opts ...option.ClientOption) (http.RoundTripper, error) { - settings, err := newSettings(opts) - if err != nil { - return nil, err - } - if settings.HTTPClient != nil { - return nil, errors.New("transport/http: WithHTTPClient passed to NewTransport") - } - if settings.IsNewAuthLibraryEnabled() { - client, err := newClientNewAuth(ctx, base, settings) - if err != nil { - return nil, err - } - return client.Transport, nil - } - return newTransport(ctx, base, settings) -} - -func newTransport(ctx context.Context, base http.RoundTripper, settings *internal.DialSettings) (http.RoundTripper, error) { - paramTransport := ¶meterTransport{ - base: base, - userAgent: settings.UserAgent, - requestReason: settings.RequestReason, - } - var trans http.RoundTripper = paramTransport - trans = addOpenTelemetryTransport(trans, settings) - switch { - case settings.NoAuth: - // Do nothing. - case settings.APIKey != "": - paramTransport.quotaProject = internal.GetQuotaProject(nil, settings.QuotaProject) - trans = &transport.APIKey{ - Transport: trans, - Key: settings.APIKey, - } - default: - creds, err := internal.Creds(ctx, settings) - if err != nil { - return nil, err - } - paramTransport.quotaProject = internal.GetQuotaProject(creds, settings.QuotaProject) - ts := creds.TokenSource - if settings.ImpersonationConfig == nil && settings.TokenSource != nil { - ts = settings.TokenSource - } - trans = &oauth2.Transport{ - Base: trans, - Source: ts, - } - } - return trans, nil -} - -func newSettings(opts []option.ClientOption) (*internal.DialSettings, error) { - var o internal.DialSettings - for _, opt := range opts { - opt.Apply(&o) - } - if err := o.Validate(); err != nil { - return nil, err - } - if o.GRPCConn != nil { - return nil, errors.New("unsupported gRPC connection specified") - } - return &o, nil -} - -type parameterTransport struct { - userAgent string - quotaProject string - requestReason string - - base http.RoundTripper -} - -func (t *parameterTransport) RoundTrip(req *http.Request) (*http.Response, error) { - rt := t.base - if rt == nil { - return nil, errors.New("transport: no Transport specified") - } - newReq := *req - newReq.Header = make(http.Header) - for k, vv := range req.Header { - newReq.Header[k] = vv - } - if t.userAgent != "" { - // TODO(cbro): append to existing User-Agent header? - newReq.Header.Set("User-Agent", t.userAgent) - } - - // Attach system parameters into the header - if t.quotaProject != "" { - newReq.Header.Set("X-Goog-User-Project", t.quotaProject) - } - if t.requestReason != "" { - newReq.Header.Set("X-Goog-Request-Reason", t.requestReason) - } - - return rt.RoundTrip(&newReq) -} - -// defaultBaseTransport returns the base HTTP transport. It uses a default -// transport, taking most defaults from http.DefaultTransport. -// If TLSCertificate is available, set TLSClientConfig as well. -func defaultBaseTransport(ctx context.Context, clientCertSource cert.Source, dialTLSContext func(context.Context, string, string) (net.Conn, error)) http.RoundTripper { - // Copy http.DefaultTransport except for MaxIdleConnsPerHost setting, - // which is increased due to reported performance issues under load in the - // GCS client. Transport.Clone is only available in Go 1.13 and up. - trans := clonedTransport(http.DefaultTransport) - if trans == nil { - trans = fallbackBaseTransport() - } - trans.MaxIdleConnsPerHost = 100 - - if clientCertSource != nil { - trans.TLSClientConfig = &tls.Config{ - GetClientCertificate: clientCertSource, - } - } - if dialTLSContext != nil { - // If DialTLSContext is set, TLSClientConfig wil be ignored - trans.DialTLSContext = dialTLSContext - } - - configureHTTP2(trans) - - return trans -} - -// configureHTTP2 configures the ReadIdleTimeout HTTP/2 option for the -// transport. This allows broken idle connections to be pruned more quickly, -// preventing the client from attempting to re-use connections that will no -// longer work. -func configureHTTP2(trans *http.Transport) { - http2Trans, err := http2.ConfigureTransports(trans) - if err == nil { - http2Trans.ReadIdleTimeout = time.Second * 31 - } -} - -// fallbackBaseTransport is used in " or "project:". - Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"` - // Describes what error is encountered when accessing this resource. - // For example, updating a cloud project may require the `writer` permission - // on the developer console project. - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *ResourceInfo) Reset() { - *x = ResourceInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceInfo) ProtoMessage() {} - -func (x *ResourceInfo) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceInfo.ProtoReflect.Descriptor instead. -func (*ResourceInfo) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{7} -} - -func (x *ResourceInfo) GetResourceType() string { - if x != nil { - return x.ResourceType - } - return "" -} - -func (x *ResourceInfo) GetResourceName() string { - if x != nil { - return x.ResourceName - } - return "" -} - -func (x *ResourceInfo) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *ResourceInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// Provides links to documentation or for performing an out of band action. -// -// For example, if a quota check failed with an error indicating the calling -// project hasn't enabled the accessed service, this can contain a URL pointing -// directly to the right place in the developer console to flip the bit. -type Help struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // URL(s) pointing to additional information on handling the current error. - Links []*Help_Link `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` -} - -func (x *Help) Reset() { - *x = Help{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Help) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Help) ProtoMessage() {} - -func (x *Help) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Help.ProtoReflect.Descriptor instead. -func (*Help) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{8} -} - -func (x *Help) GetLinks() []*Help_Link { - if x != nil { - return x.Links - } - return nil -} - -// Provides a localized error message that is safe to return to the user -// which can be attached to an RPC error. -type LocalizedMessage struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The locale used following the specification defined at - // https://www.rfc-editor.org/rfc/bcp/bcp47.txt. - // Examples are: "en-US", "fr-CH", "es-MX" - Locale string `protobuf:"bytes,1,opt,name=locale,proto3" json:"locale,omitempty"` - // The localized error message in the above locale. - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *LocalizedMessage) Reset() { - *x = LocalizedMessage{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LocalizedMessage) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LocalizedMessage) ProtoMessage() {} - -func (x *LocalizedMessage) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LocalizedMessage.ProtoReflect.Descriptor instead. -func (*LocalizedMessage) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{9} -} - -func (x *LocalizedMessage) GetLocale() string { - if x != nil { - return x.Locale - } - return "" -} - -func (x *LocalizedMessage) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -// A message type used to describe a single quota violation. For example, a -// daily quota or a custom quota that was exceeded. -type QuotaFailure_Violation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The subject on which the quota check failed. - // For example, "clientip:" or "project:". - Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the quota check failed. Clients can use this - // description to find more about the quota configuration in the service's - // public documentation, or find the relevant quota limit to adjust through - // developer console. - // - // For example: "Service disabled" or "Daily Limit for read operations - // exceeded". - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The API Service from which the `QuotaFailure.Violation` orginates. In - // some cases, Quota issues originate from an API Service other than the one - // that was called. In other words, a dependency of the called API Service - // could be the cause of the `QuotaFailure`, and this field would have the - // dependency API service name. - // - // For example, if the called API is Kubernetes Engine API - // (container.googleapis.com), and a quota violation occurs in the - // Kubernetes Engine API itself, this field would be - // "container.googleapis.com". On the other hand, if the quota violation - // occurs when the Kubernetes Engine API creates VMs in the Compute Engine - // API (compute.googleapis.com), this field would be - // "compute.googleapis.com". - ApiService string `protobuf:"bytes,3,opt,name=api_service,json=apiService,proto3" json:"api_service,omitempty"` - // The metric of the violated quota. A quota metric is a named counter to - // measure usage, such as API requests or CPUs. When an activity occurs in a - // service, such as Virtual Machine allocation, one or more quota metrics - // may be affected. - // - // For example, "compute.googleapis.com/cpus_per_vm_family", - // "storage.googleapis.com/internet_egress_bandwidth". - QuotaMetric string `protobuf:"bytes,4,opt,name=quota_metric,json=quotaMetric,proto3" json:"quota_metric,omitempty"` - // The id of the violated quota. Also know as "limit name", this is the - // unique identifier of a quota in the context of an API service. - // - // For example, "CPUS-PER-VM-FAMILY-per-project-region". - QuotaId string `protobuf:"bytes,5,opt,name=quota_id,json=quotaId,proto3" json:"quota_id,omitempty"` - // The dimensions of the violated quota. Every non-global quota is enforced - // on a set of dimensions. While quota metric defines what to count, the - // dimensions specify for what aspects the counter should be increased. - // - // For example, the quota "CPUs per region per VM family" enforces a limit - // on the metric "compute.googleapis.com/cpus_per_vm_family" on dimensions - // "region" and "vm_family". And if the violation occurred in region - // "us-central1" and for VM family "n1", the quota_dimensions would be, - // - // { - // "region": "us-central1", - // "vm_family": "n1", - // } - // - // When a quota is enforced globally, the quota_dimensions would always be - // empty. - QuotaDimensions map[string]string `protobuf:"bytes,6,rep,name=quota_dimensions,json=quotaDimensions,proto3" json:"quota_dimensions,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - // The enforced quota value at the time of the `QuotaFailure`. - // - // For example, if the enforced quota value at the time of the - // `QuotaFailure` on the number of CPUs is "10", then the value of this - // field would reflect this quantity. - QuotaValue int64 `protobuf:"varint,7,opt,name=quota_value,json=quotaValue,proto3" json:"quota_value,omitempty"` - // The new quota value being rolled out at the time of the violation. At the - // completion of the rollout, this value will be enforced in place of - // quota_value. If no rollout is in progress at the time of the violation, - // this field is not set. - // - // For example, if at the time of the violation a rollout is in progress - // changing the number of CPUs quota from 10 to 20, 20 would be the value of - // this field. - FutureQuotaValue *int64 `protobuf:"varint,8,opt,name=future_quota_value,json=futureQuotaValue,proto3,oneof" json:"future_quota_value,omitempty"` -} - -func (x *QuotaFailure_Violation) Reset() { - *x = QuotaFailure_Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QuotaFailure_Violation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QuotaFailure_Violation) ProtoMessage() {} - -func (x *QuotaFailure_Violation) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use QuotaFailure_Violation.ProtoReflect.Descriptor instead. -func (*QuotaFailure_Violation) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{3, 0} -} - -func (x *QuotaFailure_Violation) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *QuotaFailure_Violation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *QuotaFailure_Violation) GetApiService() string { - if x != nil { - return x.ApiService - } - return "" -} - -func (x *QuotaFailure_Violation) GetQuotaMetric() string { - if x != nil { - return x.QuotaMetric - } - return "" -} - -func (x *QuotaFailure_Violation) GetQuotaId() string { - if x != nil { - return x.QuotaId - } - return "" -} - -func (x *QuotaFailure_Violation) GetQuotaDimensions() map[string]string { - if x != nil { - return x.QuotaDimensions - } - return nil -} - -func (x *QuotaFailure_Violation) GetQuotaValue() int64 { - if x != nil { - return x.QuotaValue - } - return 0 -} - -func (x *QuotaFailure_Violation) GetFutureQuotaValue() int64 { - if x != nil && x.FutureQuotaValue != nil { - return *x.FutureQuotaValue - } - return 0 -} - -// A message type used to describe a single precondition failure. -type PreconditionFailure_Violation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The type of PreconditionFailure. We recommend using a service-specific - // enum type to define the supported precondition violation subjects. For - // example, "TOS" for "Terms of Service violation". - Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` - // The subject, relative to the type, that failed. - // For example, "google.com/cloud" relative to the "TOS" type would indicate - // which terms of service is being referenced. - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - // A description of how the precondition failed. Developers can use this - // description to understand how to fix the failure. - // - // For example: "Terms of service not accepted". - Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *PreconditionFailure_Violation) Reset() { - *x = PreconditionFailure_Violation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PreconditionFailure_Violation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PreconditionFailure_Violation) ProtoMessage() {} - -func (x *PreconditionFailure_Violation) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PreconditionFailure_Violation.ProtoReflect.Descriptor instead. -func (*PreconditionFailure_Violation) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{4, 0} -} - -func (x *PreconditionFailure_Violation) GetType() string { - if x != nil { - return x.Type - } - return "" -} - -func (x *PreconditionFailure_Violation) GetSubject() string { - if x != nil { - return x.Subject - } - return "" -} - -func (x *PreconditionFailure_Violation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -// A message type used to describe a single bad request field. -type BadRequest_FieldViolation struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // A path that leads to a field in the request body. The value will be a - // sequence of dot-separated identifiers that identify a protocol buffer - // field. - // - // Consider the following: - // - // message CreateContactRequest { - // message EmailAddress { - // enum Type { - // TYPE_UNSPECIFIED = 0; - // HOME = 1; - // WORK = 2; - // } - // - // optional string email = 1; - // repeated EmailType type = 2; - // } - // - // string full_name = 1; - // repeated EmailAddress email_addresses = 2; - // } - // - // In this example, in proto `field` could take one of the following values: - // - // - `full_name` for a violation in the `full_name` value - // - `email_addresses[1].email` for a violation in the `email` field of the - // first `email_addresses` message - // - `email_addresses[3].type[2]` for a violation in the second `type` - // value in the third `email_addresses` message. - // - // In JSON, the same values are represented as: - // - // - `fullName` for a violation in the `fullName` value - // - `emailAddresses[1].email` for a violation in the `email` field of the - // first `emailAddresses` message - // - `emailAddresses[3].type[2]` for a violation in the second `type` - // value in the third `emailAddresses` message. - Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` - // A description of why the request element is bad. - Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` - // The reason of the field-level error. This is a constant value that - // identifies the proximate cause of the field-level error. It should - // uniquely identify the type of the FieldViolation within the scope of the - // google.rpc.ErrorInfo.domain. This should be at most 63 - // characters and match a regular expression of `[A-Z][A-Z0-9_]+[A-Z0-9]`, - // which represents UPPER_SNAKE_CASE. - Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` - // Provides a localized error message for field-level errors that is safe to - // return to the API consumer. - LocalizedMessage *LocalizedMessage `protobuf:"bytes,4,opt,name=localized_message,json=localizedMessage,proto3" json:"localized_message,omitempty"` -} - -func (x *BadRequest_FieldViolation) Reset() { - *x = BadRequest_FieldViolation{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BadRequest_FieldViolation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BadRequest_FieldViolation) ProtoMessage() {} - -func (x *BadRequest_FieldViolation) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BadRequest_FieldViolation.ProtoReflect.Descriptor instead. -func (*BadRequest_FieldViolation) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{5, 0} -} - -func (x *BadRequest_FieldViolation) GetField() string { - if x != nil { - return x.Field - } - return "" -} - -func (x *BadRequest_FieldViolation) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *BadRequest_FieldViolation) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - -func (x *BadRequest_FieldViolation) GetLocalizedMessage() *LocalizedMessage { - if x != nil { - return x.LocalizedMessage - } - return nil -} - -// Describes a URL link. -type Help_Link struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Describes what the link offers. - Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"` - // The URL of the link. - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (x *Help_Link) Reset() { - *x = Help_Link{} - if protoimpl.UnsafeEnabled { - mi := &file_google_rpc_error_details_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Help_Link) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Help_Link) ProtoMessage() {} - -func (x *Help_Link) ProtoReflect() protoreflect.Message { - mi := &file_google_rpc_error_details_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Help_Link.ProtoReflect.Descriptor instead. -func (*Help_Link) Descriptor() ([]byte, []int) { - return file_google_rpc_error_details_proto_rawDescGZIP(), []int{8, 0} -} - -func (x *Help_Link) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Help_Link) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -var File_google_rpc_error_details_proto protoreflect.FileDescriptor - -var file_google_rpc_error_details_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x1e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb9, 0x01, 0x0a, - 0x09, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x49, - 0x6e, 0x66, 0x6f, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x47, 0x0a, 0x09, 0x52, 0x65, 0x74, 0x72, - 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x3a, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x64, - 0x65, 0x6c, 0x61, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x72, 0x79, 0x44, 0x65, 0x6c, 0x61, - 0x79, 0x22, 0x48, 0x0a, 0x09, 0x44, 0x65, 0x62, 0x75, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, - 0x0a, 0x0d, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x45, 0x6e, 0x74, 0x72, - 0x69, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0x8e, 0x04, 0x0a, 0x0c, - 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x12, 0x42, 0x0a, 0x0a, - 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, - 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x1a, 0xb9, 0x03, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, - 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x70, - 0x69, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x61, 0x70, 0x69, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x71, - 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x19, - 0x0a, 0x08, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x49, 0x64, 0x12, 0x62, 0x0a, 0x10, 0x71, 0x75, 0x6f, - 0x74, 0x61, 0x5f, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, - 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x44, 0x69, 0x6d, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x71, 0x75, - 0x6f, 0x74, 0x61, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1f, 0x0a, - 0x0b, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0a, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, - 0x0a, 0x12, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x10, 0x66, 0x75, - 0x74, 0x75, 0x72, 0x65, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x88, 0x01, - 0x01, 0x1a, 0x42, 0x0a, 0x14, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, - 0x5f, 0x71, 0x75, 0x6f, 0x74, 0x61, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xbd, 0x01, 0x0a, - 0x13, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x2e, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, - 0x5b, 0x0a, 0x09, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8c, 0x02, 0x0a, - 0x0a, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x10, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x76, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x42, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x46, 0x69, - 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x66, 0x69, - 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0xab, 0x01, - 0x0a, 0x0e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x56, 0x69, 0x6f, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x49, 0x0a, 0x11, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, - 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x4f, 0x0a, 0x0b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x22, 0x90, 0x01, 0x0a, - 0x0c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, - 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x20, 0x0a, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x6f, 0x0a, 0x04, 0x48, 0x65, 0x6c, 0x70, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x48, 0x65, 0x6c, 0x70, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, - 0x69, 0x6e, 0x6b, 0x73, 0x1a, 0x3a, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, - 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, - 0x22, 0x44, 0x0a, 0x10, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x42, 0x6c, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x11, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x44, - 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, - 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x61, 0x70, 0x69, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x65, 0x72, 0x72, 0x64, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x73, 0x3b, 0x65, 0x72, 0x72, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0xa2, 0x02, - 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_google_rpc_error_details_proto_rawDescOnce sync.Once - file_google_rpc_error_details_proto_rawDescData = file_google_rpc_error_details_proto_rawDesc -) - -func file_google_rpc_error_details_proto_rawDescGZIP() []byte { - file_google_rpc_error_details_proto_rawDescOnce.Do(func() { - file_google_rpc_error_details_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_error_details_proto_rawDescData) - }) - return file_google_rpc_error_details_proto_rawDescData -} - -var file_google_rpc_error_details_proto_msgTypes = make([]protoimpl.MessageInfo, 16) -var file_google_rpc_error_details_proto_goTypes = []interface{}{ - (*ErrorInfo)(nil), // 0: google.rpc.ErrorInfo - (*RetryInfo)(nil), // 1: google.rpc.RetryInfo - (*DebugInfo)(nil), // 2: google.rpc.DebugInfo - (*QuotaFailure)(nil), // 3: google.rpc.QuotaFailure - (*PreconditionFailure)(nil), // 4: google.rpc.PreconditionFailure - (*BadRequest)(nil), // 5: google.rpc.BadRequest - (*RequestInfo)(nil), // 6: google.rpc.RequestInfo - (*ResourceInfo)(nil), // 7: google.rpc.ResourceInfo - (*Help)(nil), // 8: google.rpc.Help - (*LocalizedMessage)(nil), // 9: google.rpc.LocalizedMessage - nil, // 10: google.rpc.ErrorInfo.MetadataEntry - (*QuotaFailure_Violation)(nil), // 11: google.rpc.QuotaFailure.Violation - nil, // 12: google.rpc.QuotaFailure.Violation.QuotaDimensionsEntry - (*PreconditionFailure_Violation)(nil), // 13: google.rpc.PreconditionFailure.Violation - (*BadRequest_FieldViolation)(nil), // 14: google.rpc.BadRequest.FieldViolation - (*Help_Link)(nil), // 15: google.rpc.Help.Link - (*durationpb.Duration)(nil), // 16: google.protobuf.Duration -} -var file_google_rpc_error_details_proto_depIdxs = []int32{ - 10, // 0: google.rpc.ErrorInfo.metadata:type_name -> google.rpc.ErrorInfo.MetadataEntry - 16, // 1: google.rpc.RetryInfo.retry_delay:type_name -> google.protobuf.Duration - 11, // 2: google.rpc.QuotaFailure.violations:type_name -> google.rpc.QuotaFailure.Violation - 13, // 3: google.rpc.PreconditionFailure.violations:type_name -> google.rpc.PreconditionFailure.Violation - 14, // 4: google.rpc.BadRequest.field_violations:type_name -> google.rpc.BadRequest.FieldViolation - 15, // 5: google.rpc.Help.links:type_name -> google.rpc.Help.Link - 12, // 6: google.rpc.QuotaFailure.Violation.quota_dimensions:type_name -> google.rpc.QuotaFailure.Violation.QuotaDimensionsEntry - 9, // 7: google.rpc.BadRequest.FieldViolation.localized_message:type_name -> google.rpc.LocalizedMessage - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_google_rpc_error_details_proto_init() } -func file_google_rpc_error_details_proto_init() { - if File_google_rpc_error_details_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_google_rpc_error_details_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ErrorInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RetryInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DebugInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuotaFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PreconditionFailure); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BadRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RequestInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Help); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LocalizedMessage); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QuotaFailure_Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PreconditionFailure_Violation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BadRequest_FieldViolation); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_google_rpc_error_details_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Help_Link); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_google_rpc_error_details_proto_msgTypes[11].OneofWrappers = []interface{}{} - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_google_rpc_error_details_proto_rawDesc, - NumEnums: 0, - NumMessages: 16, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_google_rpc_error_details_proto_goTypes, - DependencyIndexes: file_google_rpc_error_details_proto_depIdxs, - MessageInfos: file_google_rpc_error_details_proto_msgTypes, - }.Build() - File_google_rpc_error_details_proto = out.File - file_google_rpc_error_details_proto_rawDesc = nil - file_google_rpc_error_details_proto_goTypes = nil - file_google_rpc_error_details_proto_depIdxs = nil -} diff --git a/vendor/gopkg.in/ini.v1/.editorconfig b/vendor/gopkg.in/ini.v1/.editorconfig deleted file mode 100644 index 4a2d9180f9..0000000000 --- a/vendor/gopkg.in/ini.v1/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -# http://editorconfig.org - -root = true - -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -[*_test.go] -trim_trailing_whitespace = false diff --git a/vendor/gopkg.in/ini.v1/.gitignore b/vendor/gopkg.in/ini.v1/.gitignore deleted file mode 100644 index 588388bda2..0000000000 --- a/vendor/gopkg.in/ini.v1/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -testdata/conf_out.ini -ini.sublime-project -ini.sublime-workspace -testdata/conf_reflect.ini -.idea -/.vscode -.DS_Store diff --git a/vendor/gopkg.in/ini.v1/.golangci.yml b/vendor/gopkg.in/ini.v1/.golangci.yml deleted file mode 100644 index 631e369254..0000000000 --- a/vendor/gopkg.in/ini.v1/.golangci.yml +++ /dev/null @@ -1,27 +0,0 @@ -linters-settings: - staticcheck: - checks: [ - "all", - "-SA1019" # There are valid use cases of strings.Title - ] - nakedret: - max-func-lines: 0 # Disallow any unnamed return statement - -linters: - enable: - - deadcode - - errcheck - - gosimple - - govet - - ineffassign - - staticcheck - - structcheck - - typecheck - - unused - - varcheck - - nakedret - - gofmt - - rowserrcheck - - unconvert - - goimports - - unparam diff --git a/vendor/gopkg.in/ini.v1/LICENSE b/vendor/gopkg.in/ini.v1/LICENSE deleted file mode 100644 index d361bbcdf5..0000000000 --- a/vendor/gopkg.in/ini.v1/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ -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: - -You must give any other recipients of the Work or Derivative Works a copy of -this License; and -You must cause any modified files to carry prominent notices stating that You -changed the files; and -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 -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 - -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 2014 Unknwon - - 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/gopkg.in/ini.v1/Makefile b/vendor/gopkg.in/ini.v1/Makefile deleted file mode 100644 index f3b0dae2d2..0000000000 --- a/vendor/gopkg.in/ini.v1/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -.PHONY: build test bench vet coverage - -build: vet bench - -test: - go test -v -cover -race - -bench: - go test -v -cover -test.bench=. -test.benchmem - -vet: - go vet - -coverage: - go test -coverprofile=c.out && go tool cover -html=c.out && rm c.out diff --git a/vendor/gopkg.in/ini.v1/README.md b/vendor/gopkg.in/ini.v1/README.md deleted file mode 100644 index 30606d9700..0000000000 --- a/vendor/gopkg.in/ini.v1/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# INI - -[![GitHub Workflow Status](https://img.shields.io/github/checks-status/go-ini/ini/main?logo=github&style=for-the-badge)](https://github.com/go-ini/ini/actions?query=branch%3Amain) -[![codecov](https://img.shields.io/codecov/c/github/go-ini/ini/master?logo=codecov&style=for-the-badge)](https://codecov.io/gh/go-ini/ini) -[![GoDoc](https://img.shields.io/badge/GoDoc-Reference-blue?style=for-the-badge&logo=go)](https://pkg.go.dev/github.com/go-ini/ini?tab=doc) -[![Sourcegraph](https://img.shields.io/badge/view%20on-Sourcegraph-brightgreen.svg?style=for-the-badge&logo=sourcegraph)](https://sourcegraph.com/github.com/go-ini/ini) - -![](https://avatars0.githubusercontent.com/u/10216035?v=3&s=200) - -Package ini provides INI file read and write functionality in Go. - -## Features - -- Load from multiple data sources(file, `[]byte`, `io.Reader` and `io.ReadCloser`) with overwrites. -- Read with recursion values. -- Read with parent-child sections. -- Read with auto-increment key names. -- Read with multiple-line values. -- Read with tons of helper methods. -- Read and convert values to Go types. -- Read and **WRITE** comments of sections and keys. -- Manipulate sections, keys and comments with ease. -- Keep sections and keys in order as you parse and save. - -## Installation - -The minimum requirement of Go is **1.13**. - -```sh -$ go get gopkg.in/ini.v1 -``` - -Please add `-u` flag to update in the future. - -## Getting Help - -- [Getting Started](https://ini.unknwon.io/docs/intro/getting_started) -- [API Documentation](https://gowalker.org/gopkg.in/ini.v1) -- 中国大陆镜像:https://ini.unknwon.cn - -## License - -This project is under Apache v2 License. See the [LICENSE](LICENSE) file for the full license text. diff --git a/vendor/gopkg.in/ini.v1/codecov.yml b/vendor/gopkg.in/ini.v1/codecov.yml deleted file mode 100644 index e02ec84bc0..0000000000 --- a/vendor/gopkg.in/ini.v1/codecov.yml +++ /dev/null @@ -1,16 +0,0 @@ -coverage: - range: "60...95" - status: - project: - default: - threshold: 1% - informational: true - patch: - defualt: - only_pulls: true - informational: true - -comment: - layout: 'diff' - -github_checks: false diff --git a/vendor/gopkg.in/ini.v1/data_source.go b/vendor/gopkg.in/ini.v1/data_source.go deleted file mode 100644 index c3a541f1d1..0000000000 --- a/vendor/gopkg.in/ini.v1/data_source.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2019 Unknwon -// -// 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 ini - -import ( - "bytes" - "fmt" - "io" - "io/ioutil" - "os" -) - -var ( - _ dataSource = (*sourceFile)(nil) - _ dataSource = (*sourceData)(nil) - _ dataSource = (*sourceReadCloser)(nil) -) - -// dataSource is an interface that returns object which can be read and closed. -type dataSource interface { - ReadCloser() (io.ReadCloser, error) -} - -// sourceFile represents an object that contains content on the local file system. -type sourceFile struct { - name string -} - -func (s sourceFile) ReadCloser() (_ io.ReadCloser, err error) { - return os.Open(s.name) -} - -// sourceData represents an object that contains content in memory. -type sourceData struct { - data []byte -} - -func (s *sourceData) ReadCloser() (io.ReadCloser, error) { - return ioutil.NopCloser(bytes.NewReader(s.data)), nil -} - -// sourceReadCloser represents an input stream with Close method. -type sourceReadCloser struct { - reader io.ReadCloser -} - -func (s *sourceReadCloser) ReadCloser() (io.ReadCloser, error) { - return s.reader, nil -} - -func parseDataSource(source interface{}) (dataSource, error) { - switch s := source.(type) { - case string: - return sourceFile{s}, nil - case []byte: - return &sourceData{s}, nil - case io.ReadCloser: - return &sourceReadCloser{s}, nil - case io.Reader: - return &sourceReadCloser{ioutil.NopCloser(s)}, nil - default: - return nil, fmt.Errorf("error parsing data source: unknown type %q", s) - } -} diff --git a/vendor/gopkg.in/ini.v1/deprecated.go b/vendor/gopkg.in/ini.v1/deprecated.go deleted file mode 100644 index 48b8e66d6d..0000000000 --- a/vendor/gopkg.in/ini.v1/deprecated.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2019 Unknwon -// -// 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 ini - -var ( - // Deprecated: Use "DefaultSection" instead. - DEFAULT_SECTION = DefaultSection - // Deprecated: AllCapsUnderscore converts to format ALL_CAPS_UNDERSCORE. - AllCapsUnderscore = SnackCase -) diff --git a/vendor/gopkg.in/ini.v1/error.go b/vendor/gopkg.in/ini.v1/error.go deleted file mode 100644 index f66bc94b8b..0000000000 --- a/vendor/gopkg.in/ini.v1/error.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2016 Unknwon -// -// 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 ini - -import ( - "fmt" -) - -// ErrDelimiterNotFound indicates the error type of no delimiter is found which there should be one. -type ErrDelimiterNotFound struct { - Line string -} - -// IsErrDelimiterNotFound returns true if the given error is an instance of ErrDelimiterNotFound. -func IsErrDelimiterNotFound(err error) bool { - _, ok := err.(ErrDelimiterNotFound) - return ok -} - -func (err ErrDelimiterNotFound) Error() string { - return fmt.Sprintf("key-value delimiter not found: %s", err.Line) -} - -// ErrEmptyKeyName indicates the error type of no key name is found which there should be one. -type ErrEmptyKeyName struct { - Line string -} - -// IsErrEmptyKeyName returns true if the given error is an instance of ErrEmptyKeyName. -func IsErrEmptyKeyName(err error) bool { - _, ok := err.(ErrEmptyKeyName) - return ok -} - -func (err ErrEmptyKeyName) Error() string { - return fmt.Sprintf("empty key name: %s", err.Line) -} diff --git a/vendor/gopkg.in/ini.v1/file.go b/vendor/gopkg.in/ini.v1/file.go deleted file mode 100644 index f8b22408be..0000000000 --- a/vendor/gopkg.in/ini.v1/file.go +++ /dev/null @@ -1,541 +0,0 @@ -// Copyright 2017 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "io" - "io/ioutil" - "os" - "strings" - "sync" -) - -// File represents a combination of one or more INI files in memory. -type File struct { - options LoadOptions - dataSources []dataSource - - // Should make things safe, but sometimes doesn't matter. - BlockMode bool - lock sync.RWMutex - - // To keep data in order. - sectionList []string - // To keep track of the index of a section with same name. - // This meta list is only used with non-unique section names are allowed. - sectionIndexes []int - - // Actual data is stored here. - sections map[string][]*Section - - NameMapper - ValueMapper -} - -// newFile initializes File object with given data sources. -func newFile(dataSources []dataSource, opts LoadOptions) *File { - if len(opts.KeyValueDelimiters) == 0 { - opts.KeyValueDelimiters = "=:" - } - if len(opts.KeyValueDelimiterOnWrite) == 0 { - opts.KeyValueDelimiterOnWrite = "=" - } - if len(opts.ChildSectionDelimiter) == 0 { - opts.ChildSectionDelimiter = "." - } - - return &File{ - BlockMode: true, - dataSources: dataSources, - sections: make(map[string][]*Section), - options: opts, - } -} - -// Empty returns an empty file object. -func Empty(opts ...LoadOptions) *File { - var opt LoadOptions - if len(opts) > 0 { - opt = opts[0] - } - - // Ignore error here, we are sure our data is good. - f, _ := LoadSources(opt, []byte("")) - return f -} - -// NewSection creates a new section. -func (f *File) NewSection(name string) (*Section, error) { - if len(name) == 0 { - return nil, errors.New("empty section name") - } - - if (f.options.Insensitive || f.options.InsensitiveSections) && name != DefaultSection { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - if !f.options.AllowNonUniqueSections && inSlice(name, f.sectionList) { - return f.sections[name][0], nil - } - - f.sectionList = append(f.sectionList, name) - - // NOTE: Append to indexes must happen before appending to sections, - // otherwise index will have off-by-one problem. - f.sectionIndexes = append(f.sectionIndexes, len(f.sections[name])) - - sec := newSection(f, name) - f.sections[name] = append(f.sections[name], sec) - - return sec, nil -} - -// NewRawSection creates a new section with an unparseable body. -func (f *File) NewRawSection(name, body string) (*Section, error) { - section, err := f.NewSection(name) - if err != nil { - return nil, err - } - - section.isRawSection = true - section.rawBody = body - return section, nil -} - -// NewSections creates a list of sections. -func (f *File) NewSections(names ...string) (err error) { - for _, name := range names { - if _, err = f.NewSection(name); err != nil { - return err - } - } - return nil -} - -// GetSection returns section by given name. -func (f *File) GetSection(name string) (*Section, error) { - secs, err := f.SectionsByName(name) - if err != nil { - return nil, err - } - - return secs[0], err -} - -// HasSection returns true if the file contains a section with given name. -func (f *File) HasSection(name string) bool { - section, _ := f.GetSection(name) - return section != nil -} - -// SectionsByName returns all sections with given name. -func (f *File) SectionsByName(name string) ([]*Section, error) { - if len(name) == 0 { - name = DefaultSection - } - if f.options.Insensitive || f.options.InsensitiveSections { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - secs := f.sections[name] - if len(secs) == 0 { - return nil, fmt.Errorf("section %q does not exist", name) - } - - return secs, nil -} - -// Section assumes named section exists and returns a zero-value when not. -func (f *File) Section(name string) *Section { - sec, err := f.GetSection(name) - if err != nil { - if name == "" { - name = DefaultSection - } - sec, _ = f.NewSection(name) - return sec - } - return sec -} - -// SectionWithIndex assumes named section exists and returns a new section when not. -func (f *File) SectionWithIndex(name string, index int) *Section { - secs, err := f.SectionsByName(name) - if err != nil || len(secs) <= index { - // NOTE: It's OK here because the only possible error is empty section name, - // but if it's empty, this piece of code won't be executed. - newSec, _ := f.NewSection(name) - return newSec - } - - return secs[index] -} - -// Sections returns a list of Section stored in the current instance. -func (f *File) Sections() []*Section { - if f.BlockMode { - f.lock.RLock() - defer f.lock.RUnlock() - } - - sections := make([]*Section, len(f.sectionList)) - for i, name := range f.sectionList { - sections[i] = f.sections[name][f.sectionIndexes[i]] - } - return sections -} - -// ChildSections returns a list of child sections of given section name. -func (f *File) ChildSections(name string) []*Section { - return f.Section(name).ChildSections() -} - -// SectionStrings returns list of section names. -func (f *File) SectionStrings() []string { - list := make([]string, len(f.sectionList)) - copy(list, f.sectionList) - return list -} - -// DeleteSection deletes a section or all sections with given name. -func (f *File) DeleteSection(name string) { - secs, err := f.SectionsByName(name) - if err != nil { - return - } - - for i := 0; i < len(secs); i++ { - // For non-unique sections, it is always needed to remove the first one so - // in the next iteration, the subsequent section continue having index 0. - // Ignoring the error as index 0 never returns an error. - _ = f.DeleteSectionWithIndex(name, 0) - } -} - -// DeleteSectionWithIndex deletes a section with given name and index. -func (f *File) DeleteSectionWithIndex(name string, index int) error { - if !f.options.AllowNonUniqueSections && index != 0 { - return fmt.Errorf("delete section with non-zero index is only allowed when non-unique sections is enabled") - } - - if len(name) == 0 { - name = DefaultSection - } - if f.options.Insensitive || f.options.InsensitiveSections { - name = strings.ToLower(name) - } - - if f.BlockMode { - f.lock.Lock() - defer f.lock.Unlock() - } - - // Count occurrences of the sections - occurrences := 0 - - sectionListCopy := make([]string, len(f.sectionList)) - copy(sectionListCopy, f.sectionList) - - for i, s := range sectionListCopy { - if s != name { - continue - } - - if occurrences == index { - if len(f.sections[name]) <= 1 { - delete(f.sections, name) // The last one in the map - } else { - f.sections[name] = append(f.sections[name][:index], f.sections[name][index+1:]...) - } - - // Fix section lists - f.sectionList = append(f.sectionList[:i], f.sectionList[i+1:]...) - f.sectionIndexes = append(f.sectionIndexes[:i], f.sectionIndexes[i+1:]...) - - } else if occurrences > index { - // Fix the indices of all following sections with this name. - f.sectionIndexes[i-1]-- - } - - occurrences++ - } - - return nil -} - -func (f *File) reload(s dataSource) error { - r, err := s.ReadCloser() - if err != nil { - return err - } - defer r.Close() - - return f.parse(r) -} - -// Reload reloads and parses all data sources. -func (f *File) Reload() (err error) { - for _, s := range f.dataSources { - if err = f.reload(s); err != nil { - // In loose mode, we create an empty default section for nonexistent files. - if os.IsNotExist(err) && f.options.Loose { - _ = f.parse(bytes.NewBuffer(nil)) - continue - } - return err - } - if f.options.ShortCircuit { - return nil - } - } - return nil -} - -// Append appends one or more data sources and reloads automatically. -func (f *File) Append(source interface{}, others ...interface{}) error { - ds, err := parseDataSource(source) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - for _, s := range others { - ds, err = parseDataSource(s) - if err != nil { - return err - } - f.dataSources = append(f.dataSources, ds) - } - return f.Reload() -} - -func (f *File) writeToBuffer(indent string) (*bytes.Buffer, error) { - equalSign := DefaultFormatLeft + f.options.KeyValueDelimiterOnWrite + DefaultFormatRight - - if PrettyFormat || PrettyEqual { - equalSign = fmt.Sprintf(" %s ", f.options.KeyValueDelimiterOnWrite) - } - - // Use buffer to make sure target is safe until finish encoding. - buf := bytes.NewBuffer(nil) - lastSectionIdx := len(f.sectionList) - 1 - for i, sname := range f.sectionList { - sec := f.SectionWithIndex(sname, f.sectionIndexes[i]) - if len(sec.Comment) > 0 { - // Support multiline comments - lines := strings.Split(sec.Comment, LineBreak) - for i := range lines { - if lines[i][0] != '#' && lines[i][0] != ';' { - lines[i] = "; " + lines[i] - } else { - lines[i] = lines[i][:1] + " " + strings.TrimSpace(lines[i][1:]) - } - - if _, err := buf.WriteString(lines[i] + LineBreak); err != nil { - return nil, err - } - } - } - - if i > 0 || DefaultHeader || (i == 0 && strings.ToUpper(sec.name) != DefaultSection) { - if _, err := buf.WriteString("[" + sname + "]" + LineBreak); err != nil { - return nil, err - } - } else { - // Write nothing if default section is empty - if len(sec.keyList) == 0 { - continue - } - } - - isLastSection := i == lastSectionIdx - if sec.isRawSection { - if _, err := buf.WriteString(sec.rawBody); err != nil { - return nil, err - } - - if PrettySection && !isLastSection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - continue - } - - // Count and generate alignment length and buffer spaces using the - // longest key. Keys may be modified if they contain certain characters so - // we need to take that into account in our calculation. - alignLength := 0 - if PrettyFormat { - for _, kname := range sec.keyList { - keyLength := len(kname) - // First case will surround key by ` and second by """ - if strings.Contains(kname, "\"") || strings.ContainsAny(kname, f.options.KeyValueDelimiters) { - keyLength += 2 - } else if strings.Contains(kname, "`") { - keyLength += 6 - } - - if keyLength > alignLength { - alignLength = keyLength - } - } - } - alignSpaces := bytes.Repeat([]byte(" "), alignLength) - - KeyList: - for _, kname := range sec.keyList { - key := sec.Key(kname) - if len(key.Comment) > 0 { - if len(indent) > 0 && sname != DefaultSection { - buf.WriteString(indent) - } - - // Support multiline comments - lines := strings.Split(key.Comment, LineBreak) - for i := range lines { - if lines[i][0] != '#' && lines[i][0] != ';' { - lines[i] = "; " + strings.TrimSpace(lines[i]) - } else { - lines[i] = lines[i][:1] + " " + strings.TrimSpace(lines[i][1:]) - } - - if _, err := buf.WriteString(lines[i] + LineBreak); err != nil { - return nil, err - } - } - } - - if len(indent) > 0 && sname != DefaultSection { - buf.WriteString(indent) - } - - switch { - case key.isAutoIncrement: - kname = "-" - case strings.Contains(kname, "\"") || strings.ContainsAny(kname, f.options.KeyValueDelimiters): - kname = "`" + kname + "`" - case strings.Contains(kname, "`"): - kname = `"""` + kname + `"""` - } - - writeKeyValue := func(val string) (bool, error) { - if _, err := buf.WriteString(kname); err != nil { - return false, err - } - - if key.isBooleanType { - buf.WriteString(LineBreak) - return true, nil - } - - // Write out alignment spaces before "=" sign - if PrettyFormat { - buf.Write(alignSpaces[:alignLength-len(kname)]) - } - - // In case key value contains "\n", "`", "\"", "#" or ";" - if strings.ContainsAny(val, "\n`") { - val = `"""` + val + `"""` - } else if !f.options.IgnoreInlineComment && strings.ContainsAny(val, "#;") { - val = "`" + val + "`" - } else if len(strings.TrimSpace(val)) != len(val) { - val = `"` + val + `"` - } - if _, err := buf.WriteString(equalSign + val + LineBreak); err != nil { - return false, err - } - return false, nil - } - - shadows := key.ValueWithShadows() - if len(shadows) == 0 { - if _, err := writeKeyValue(""); err != nil { - return nil, err - } - } - - for _, val := range shadows { - exitLoop, err := writeKeyValue(val) - if err != nil { - return nil, err - } else if exitLoop { - continue KeyList - } - } - - for _, val := range key.nestedValues { - if _, err := buf.WriteString(indent + " " + val + LineBreak); err != nil { - return nil, err - } - } - } - - if PrettySection && !isLastSection { - // Put a line between sections - if _, err := buf.WriteString(LineBreak); err != nil { - return nil, err - } - } - } - - return buf, nil -} - -// WriteToIndent writes content into io.Writer with given indention. -// If PrettyFormat has been set to be true, -// it will align "=" sign with spaces under each section. -func (f *File) WriteToIndent(w io.Writer, indent string) (int64, error) { - buf, err := f.writeToBuffer(indent) - if err != nil { - return 0, err - } - return buf.WriteTo(w) -} - -// WriteTo writes file content into io.Writer. -func (f *File) WriteTo(w io.Writer) (int64, error) { - return f.WriteToIndent(w, "") -} - -// SaveToIndent writes content to file system with given value indention. -func (f *File) SaveToIndent(filename, indent string) error { - // Note: Because we are truncating with os.Create, - // so it's safer to save to a temporary file location and rename after done. - buf, err := f.writeToBuffer(indent) - if err != nil { - return err - } - - return ioutil.WriteFile(filename, buf.Bytes(), 0666) -} - -// SaveTo writes content to file system. -func (f *File) SaveTo(filename string) error { - return f.SaveToIndent(filename, "") -} diff --git a/vendor/gopkg.in/ini.v1/helper.go b/vendor/gopkg.in/ini.v1/helper.go deleted file mode 100644 index f9d80a682a..0000000000 --- a/vendor/gopkg.in/ini.v1/helper.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2019 Unknwon -// -// 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 ini - -func inSlice(str string, s []string) bool { - for _, v := range s { - if str == v { - return true - } - } - return false -} diff --git a/vendor/gopkg.in/ini.v1/ini.go b/vendor/gopkg.in/ini.v1/ini.go deleted file mode 100644 index 99e7f86511..0000000000 --- a/vendor/gopkg.in/ini.v1/ini.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini provides INI file read and write functionality in Go. -package ini - -import ( - "os" - "regexp" - "runtime" - "strings" -) - -const ( - // Maximum allowed depth when recursively substituing variable names. - depthValues = 99 -) - -var ( - // DefaultSection is the name of default section. You can use this var or the string literal. - // In most of cases, an empty string is all you need to access the section. - DefaultSection = "DEFAULT" - - // LineBreak is the delimiter to determine or compose a new line. - // This variable will be changed to "\r\n" automatically on Windows at package init time. - LineBreak = "\n" - - // Variable regexp pattern: %(variable)s - varPattern = regexp.MustCompile(`%\(([^)]+)\)s`) - - // DefaultHeader explicitly writes default section header. - DefaultHeader = false - - // PrettySection indicates whether to put a line between sections. - PrettySection = true - // PrettyFormat indicates whether to align "=" sign with spaces to produce pretty output - // or reduce all possible spaces for compact format. - PrettyFormat = true - // PrettyEqual places spaces around "=" sign even when PrettyFormat is false. - PrettyEqual = false - // DefaultFormatLeft places custom spaces on the left when PrettyFormat and PrettyEqual are both disabled. - DefaultFormatLeft = "" - // DefaultFormatRight places custom spaces on the right when PrettyFormat and PrettyEqual are both disabled. - DefaultFormatRight = "" -) - -var inTest = len(os.Args) > 0 && strings.HasSuffix(strings.TrimSuffix(os.Args[0], ".exe"), ".test") - -func init() { - if runtime.GOOS == "windows" && !inTest { - LineBreak = "\r\n" - } -} - -// LoadOptions contains all customized options used for load data source(s). -type LoadOptions struct { - // Loose indicates whether the parser should ignore nonexistent files or return error. - Loose bool - // Insensitive indicates whether the parser forces all section and key names to lowercase. - Insensitive bool - // InsensitiveSections indicates whether the parser forces all section to lowercase. - InsensitiveSections bool - // InsensitiveKeys indicates whether the parser forces all key names to lowercase. - InsensitiveKeys bool - // IgnoreContinuation indicates whether to ignore continuation lines while parsing. - IgnoreContinuation bool - // IgnoreInlineComment indicates whether to ignore comments at the end of value and treat it as part of value. - IgnoreInlineComment bool - // SkipUnrecognizableLines indicates whether to skip unrecognizable lines that do not conform to key/value pairs. - SkipUnrecognizableLines bool - // ShortCircuit indicates whether to ignore other configuration sources after loaded the first available configuration source. - ShortCircuit bool - // AllowBooleanKeys indicates whether to allow boolean type keys or treat as value is missing. - // This type of keys are mostly used in my.cnf. - AllowBooleanKeys bool - // AllowShadows indicates whether to keep track of keys with same name under same section. - AllowShadows bool - // AllowNestedValues indicates whether to allow AWS-like nested values. - // Docs: http://docs.aws.amazon.com/cli/latest/topic/config-vars.html#nested-values - AllowNestedValues bool - // AllowPythonMultilineValues indicates whether to allow Python-like multi-line values. - // Docs: https://docs.python.org/3/library/configparser.html#supported-ini-file-structure - // Relevant quote: Values can also span multiple lines, as long as they are indented deeper - // than the first line of the value. - AllowPythonMultilineValues bool - // SpaceBeforeInlineComment indicates whether to allow comment symbols (\# and \;) inside value. - // Docs: https://docs.python.org/2/library/configparser.html - // Quote: Comments may appear on their own in an otherwise empty line, or may be entered in lines holding values or section names. - // In the latter case, they need to be preceded by a whitespace character to be recognized as a comment. - SpaceBeforeInlineComment bool - // UnescapeValueDoubleQuotes indicates whether to unescape double quotes inside value to regular format - // when value is surrounded by double quotes, e.g. key="a \"value\"" => key=a "value" - UnescapeValueDoubleQuotes bool - // UnescapeValueCommentSymbols indicates to unescape comment symbols (\# and \;) inside value to regular format - // when value is NOT surrounded by any quotes. - // Note: UNSTABLE, behavior might change to only unescape inside double quotes but may noy necessary at all. - UnescapeValueCommentSymbols bool - // UnparseableSections stores a list of blocks that are allowed with raw content which do not otherwise - // conform to key/value pairs. Specify the names of those blocks here. - UnparseableSections []string - // KeyValueDelimiters is the sequence of delimiters that are used to separate key and value. By default, it is "=:". - KeyValueDelimiters string - // KeyValueDelimiterOnWrite is the delimiter that are used to separate key and value output. By default, it is "=". - KeyValueDelimiterOnWrite string - // ChildSectionDelimiter is the delimiter that is used to separate child sections. By default, it is ".". - ChildSectionDelimiter string - // PreserveSurroundedQuote indicates whether to preserve surrounded quote (single and double quotes). - PreserveSurroundedQuote bool - // DebugFunc is called to collect debug information (currently only useful to debug parsing Python-style multiline values). - DebugFunc DebugFunc - // ReaderBufferSize is the buffer size of the reader in bytes. - ReaderBufferSize int - // AllowNonUniqueSections indicates whether to allow sections with the same name multiple times. - AllowNonUniqueSections bool - // AllowDuplicateShadowValues indicates whether values for shadowed keys should be deduplicated. - AllowDuplicateShadowValues bool -} - -// DebugFunc is the type of function called to log parse events. -type DebugFunc func(message string) - -// LoadSources allows caller to apply customized options for loading from data source(s). -func LoadSources(opts LoadOptions, source interface{}, others ...interface{}) (_ *File, err error) { - sources := make([]dataSource, len(others)+1) - sources[0], err = parseDataSource(source) - if err != nil { - return nil, err - } - for i := range others { - sources[i+1], err = parseDataSource(others[i]) - if err != nil { - return nil, err - } - } - f := newFile(sources, opts) - if err = f.Reload(); err != nil { - return nil, err - } - return f, nil -} - -// Load loads and parses from INI data sources. -// Arguments can be mixed of file name with string type, or raw data in []byte. -// It will return error if list contains nonexistent files. -func Load(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{}, source, others...) -} - -// LooseLoad has exactly same functionality as Load function -// except it ignores nonexistent files instead of returning error. -func LooseLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Loose: true}, source, others...) -} - -// InsensitiveLoad has exactly same functionality as Load function -// except it forces all section and key names to be lowercased. -func InsensitiveLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{Insensitive: true}, source, others...) -} - -// ShadowLoad has exactly same functionality as Load function -// except it allows have shadow keys. -func ShadowLoad(source interface{}, others ...interface{}) (*File, error) { - return LoadSources(LoadOptions{AllowShadows: true}, source, others...) -} diff --git a/vendor/gopkg.in/ini.v1/key.go b/vendor/gopkg.in/ini.v1/key.go deleted file mode 100644 index a19d9f38ef..0000000000 --- a/vendor/gopkg.in/ini.v1/key.go +++ /dev/null @@ -1,837 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "strconv" - "strings" - "time" -) - -// Key represents a key under a section. -type Key struct { - s *Section - Comment string - name string - value string - isAutoIncrement bool - isBooleanType bool - - isShadow bool - shadows []*Key - - nestedValues []string -} - -// newKey simply return a key object with given values. -func newKey(s *Section, name, val string) *Key { - return &Key{ - s: s, - name: name, - value: val, - } -} - -func (k *Key) addShadow(val string) error { - if k.isShadow { - return errors.New("cannot add shadow to another shadow key") - } else if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add shadow to auto-increment or boolean key") - } - - if !k.s.f.options.AllowDuplicateShadowValues { - // Deduplicate shadows based on their values. - if k.value == val { - return nil - } - for i := range k.shadows { - if k.shadows[i].value == val { - return nil - } - } - } - - shadow := newKey(k.s, k.name, val) - shadow.isShadow = true - k.shadows = append(k.shadows, shadow) - return nil -} - -// AddShadow adds a new shadow key to itself. -func (k *Key) AddShadow(val string) error { - if !k.s.f.options.AllowShadows { - return errors.New("shadow key is not allowed") - } - return k.addShadow(val) -} - -func (k *Key) addNestedValue(val string) error { - if k.isAutoIncrement || k.isBooleanType { - return errors.New("cannot add nested value to auto-increment or boolean key") - } - - k.nestedValues = append(k.nestedValues, val) - return nil -} - -// AddNestedValue adds a nested value to the key. -func (k *Key) AddNestedValue(val string) error { - if !k.s.f.options.AllowNestedValues { - return errors.New("nested value is not allowed") - } - return k.addNestedValue(val) -} - -// ValueMapper represents a mapping function for values, e.g. os.ExpandEnv -type ValueMapper func(string) string - -// Name returns name of key. -func (k *Key) Name() string { - return k.name -} - -// Value returns raw value of key for performance purpose. -func (k *Key) Value() string { - return k.value -} - -// ValueWithShadows returns raw values of key and its shadows if any. Shadow -// keys with empty values are ignored from the returned list. -func (k *Key) ValueWithShadows() []string { - if len(k.shadows) == 0 { - if k.value == "" { - return []string{} - } - return []string{k.value} - } - - vals := make([]string, 0, len(k.shadows)+1) - if k.value != "" { - vals = append(vals, k.value) - } - for _, s := range k.shadows { - if s.value != "" { - vals = append(vals, s.value) - } - } - return vals -} - -// NestedValues returns nested values stored in the key. -// It is possible returned value is nil if no nested values stored in the key. -func (k *Key) NestedValues() []string { - return k.nestedValues -} - -// transformValue takes a raw value and transforms to its final string. -func (k *Key) transformValue(val string) string { - if k.s.f.ValueMapper != nil { - val = k.s.f.ValueMapper(val) - } - - // Fail-fast if no indicate char found for recursive value - if !strings.Contains(val, "%") { - return val - } - for i := 0; i < depthValues; i++ { - vr := varPattern.FindString(val) - if len(vr) == 0 { - break - } - - // Take off leading '%(' and trailing ')s'. - noption := vr[2 : len(vr)-2] - - // Search in the same section. - // If not found or found the key itself, then search again in default section. - nk, err := k.s.GetKey(noption) - if err != nil || k == nk { - nk, _ = k.s.f.Section("").GetKey(noption) - if nk == nil { - // Stop when no results found in the default section, - // and returns the value as-is. - break - } - } - - // Substitute by new value and take off leading '%(' and trailing ')s'. - val = strings.Replace(val, vr, nk.value, -1) - } - return val -} - -// String returns string representation of value. -func (k *Key) String() string { - return k.transformValue(k.value) -} - -// Validate accepts a validate function which can -// return modifed result as key value. -func (k *Key) Validate(fn func(string) string) string { - return fn(k.String()) -} - -// parseBool returns the boolean value represented by the string. -// -// It accepts 1, t, T, TRUE, true, True, YES, yes, Yes, y, ON, on, On, -// 0, f, F, FALSE, false, False, NO, no, No, n, OFF, off, Off. -// Any other value returns an error. -func parseBool(str string) (value bool, err error) { - switch str { - case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On": - return true, nil - case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off": - return false, nil - } - return false, fmt.Errorf("parsing \"%s\": invalid syntax", str) -} - -// Bool returns bool type value. -func (k *Key) Bool() (bool, error) { - return parseBool(k.String()) -} - -// Float64 returns float64 type value. -func (k *Key) Float64() (float64, error) { - return strconv.ParseFloat(k.String(), 64) -} - -// Int returns int type value. -func (k *Key) Int() (int, error) { - v, err := strconv.ParseInt(k.String(), 0, 64) - return int(v), err -} - -// Int64 returns int64 type value. -func (k *Key) Int64() (int64, error) { - return strconv.ParseInt(k.String(), 0, 64) -} - -// Uint returns uint type valued. -func (k *Key) Uint() (uint, error) { - u, e := strconv.ParseUint(k.String(), 0, 64) - return uint(u), e -} - -// Uint64 returns uint64 type value. -func (k *Key) Uint64() (uint64, error) { - return strconv.ParseUint(k.String(), 0, 64) -} - -// Duration returns time.Duration type value. -func (k *Key) Duration() (time.Duration, error) { - return time.ParseDuration(k.String()) -} - -// TimeFormat parses with given format and returns time.Time type value. -func (k *Key) TimeFormat(format string) (time.Time, error) { - return time.Parse(format, k.String()) -} - -// Time parses with RFC3339 format and returns time.Time type value. -func (k *Key) Time() (time.Time, error) { - return k.TimeFormat(time.RFC3339) -} - -// MustString returns default value if key value is empty. -func (k *Key) MustString(defaultVal string) string { - val := k.String() - if len(val) == 0 { - k.value = defaultVal - return defaultVal - } - return val -} - -// MustBool always returns value without error, -// it returns false if error occurs. -func (k *Key) MustBool(defaultVal ...bool) bool { - val, err := k.Bool() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatBool(defaultVal[0]) - return defaultVal[0] - } - return val -} - -// MustFloat64 always returns value without error, -// it returns 0.0 if error occurs. -func (k *Key) MustFloat64(defaultVal ...float64) float64 { - val, err := k.Float64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatFloat(defaultVal[0], 'f', -1, 64) - return defaultVal[0] - } - return val -} - -// MustInt always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt(defaultVal ...int) int { - val, err := k.Int() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(int64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustInt64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustInt64(defaultVal ...int64) int64 { - val, err := k.Int64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatInt(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustUint always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint(defaultVal ...uint) uint { - val, err := k.Uint() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(uint64(defaultVal[0]), 10) - return defaultVal[0] - } - return val -} - -// MustUint64 always returns value without error, -// it returns 0 if error occurs. -func (k *Key) MustUint64(defaultVal ...uint64) uint64 { - val, err := k.Uint64() - if len(defaultVal) > 0 && err != nil { - k.value = strconv.FormatUint(defaultVal[0], 10) - return defaultVal[0] - } - return val -} - -// MustDuration always returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustDuration(defaultVal ...time.Duration) time.Duration { - val, err := k.Duration() - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].String() - return defaultVal[0] - } - return val -} - -// MustTimeFormat always parses with given format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTimeFormat(format string, defaultVal ...time.Time) time.Time { - val, err := k.TimeFormat(format) - if len(defaultVal) > 0 && err != nil { - k.value = defaultVal[0].Format(format) - return defaultVal[0] - } - return val -} - -// MustTime always parses with RFC3339 format and returns value without error, -// it returns zero value if error occurs. -func (k *Key) MustTime(defaultVal ...time.Time) time.Time { - return k.MustTimeFormat(time.RFC3339, defaultVal...) -} - -// In always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) In(defaultVal string, candidates []string) string { - val := k.String() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InFloat64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InFloat64(defaultVal float64, candidates []float64) float64 { - val := k.MustFloat64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt(defaultVal int, candidates []int) int { - val := k.MustInt() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InInt64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InInt64(defaultVal int64, candidates []int64) int64 { - val := k.MustInt64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint(defaultVal uint, candidates []uint) uint { - val := k.MustUint() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InUint64 always returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InUint64(defaultVal uint64, candidates []uint64) uint64 { - val := k.MustUint64() - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTimeFormat always parses with given format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTimeFormat(format string, defaultVal time.Time, candidates []time.Time) time.Time { - val := k.MustTimeFormat(format) - for _, cand := range candidates { - if val == cand { - return val - } - } - return defaultVal -} - -// InTime always parses with RFC3339 format and returns value without error, -// it returns default value if error occurs or doesn't fit into candidates. -func (k *Key) InTime(defaultVal time.Time, candidates []time.Time) time.Time { - return k.InTimeFormat(time.RFC3339, defaultVal, candidates) -} - -// RangeFloat64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 { - val := k.MustFloat64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt(defaultVal, min, max int) int { - val := k.MustInt() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeInt64 checks if value is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeInt64(defaultVal, min, max int64) int64 { - val := k.MustInt64() - if val < min || val > max { - return defaultVal - } - return val -} - -// RangeTimeFormat checks if value with given format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTimeFormat(format string, defaultVal, min, max time.Time) time.Time { - val := k.MustTimeFormat(format) - if val.Unix() < min.Unix() || val.Unix() > max.Unix() { - return defaultVal - } - return val -} - -// RangeTime checks if value with RFC3339 format is in given range inclusively, -// and returns default value if it's not. -func (k *Key) RangeTime(defaultVal, min, max time.Time) time.Time { - return k.RangeTimeFormat(time.RFC3339, defaultVal, min, max) -} - -// Strings returns list of string divided by given delimiter. -func (k *Key) Strings(delim string) []string { - str := k.String() - if len(str) == 0 { - return []string{} - } - - runes := []rune(str) - vals := make([]string, 0, 2) - var buf bytes.Buffer - escape := false - idx := 0 - for { - if escape { - escape = false - if runes[idx] != '\\' && !strings.HasPrefix(string(runes[idx:]), delim) { - buf.WriteRune('\\') - } - buf.WriteRune(runes[idx]) - } else { - if runes[idx] == '\\' { - escape = true - } else if strings.HasPrefix(string(runes[idx:]), delim) { - idx += len(delim) - 1 - vals = append(vals, strings.TrimSpace(buf.String())) - buf.Reset() - } else { - buf.WriteRune(runes[idx]) - } - } - idx++ - if idx == len(runes) { - break - } - } - - if buf.Len() > 0 { - vals = append(vals, strings.TrimSpace(buf.String())) - } - - return vals -} - -// StringsWithShadows returns list of string divided by given delimiter. -// Shadows will also be appended if any. -func (k *Key) StringsWithShadows(delim string) []string { - vals := k.ValueWithShadows() - results := make([]string, 0, len(vals)*2) - for i := range vals { - if len(vals) == 0 { - continue - } - - results = append(results, strings.Split(vals[i], delim)...) - } - - for i := range results { - results[i] = k.transformValue(strings.TrimSpace(results[i])) - } - return results -} - -// Float64s returns list of float64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Float64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), true, false) - return vals -} - -// Ints returns list of int divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Ints(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), true, false) - return vals -} - -// Int64s returns list of int64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Int64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), true, false) - return vals -} - -// Uints returns list of uint divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), true, false) - return vals -} - -// Uint64s returns list of uint64 divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Uint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), true, false) - return vals -} - -// Bools returns list of bool divided by given delimiter. Any invalid input will be treated as zero value. -func (k *Key) Bools(delim string) []bool { - vals, _ := k.parseBools(k.Strings(delim), true, false) - return vals -} - -// TimesFormat parses with given format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) TimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), true, false) - return vals -} - -// Times parses with RFC3339 format and returns list of time.Time divided by given delimiter. -// Any invalid input will be treated as zero value (0001-01-01 00:00:00 +0000 UTC). -func (k *Key) Times(delim string) []time.Time { - return k.TimesFormat(time.RFC3339, delim) -} - -// ValidFloat64s returns list of float64 divided by given delimiter. If some value is not float, then -// it will not be included to result list. -func (k *Key) ValidFloat64s(delim string) []float64 { - vals, _ := k.parseFloat64s(k.Strings(delim), false, false) - return vals -} - -// ValidInts returns list of int divided by given delimiter. If some value is not integer, then it will -// not be included to result list. -func (k *Key) ValidInts(delim string) []int { - vals, _ := k.parseInts(k.Strings(delim), false, false) - return vals -} - -// ValidInt64s returns list of int64 divided by given delimiter. If some value is not 64-bit integer, -// then it will not be included to result list. -func (k *Key) ValidInt64s(delim string) []int64 { - vals, _ := k.parseInt64s(k.Strings(delim), false, false) - return vals -} - -// ValidUints returns list of uint divided by given delimiter. If some value is not unsigned integer, -// then it will not be included to result list. -func (k *Key) ValidUints(delim string) []uint { - vals, _ := k.parseUints(k.Strings(delim), false, false) - return vals -} - -// ValidUint64s returns list of uint64 divided by given delimiter. If some value is not 64-bit unsigned -// integer, then it will not be included to result list. -func (k *Key) ValidUint64s(delim string) []uint64 { - vals, _ := k.parseUint64s(k.Strings(delim), false, false) - return vals -} - -// ValidBools returns list of bool divided by given delimiter. If some value is not 64-bit unsigned -// integer, then it will not be included to result list. -func (k *Key) ValidBools(delim string) []bool { - vals, _ := k.parseBools(k.Strings(delim), false, false) - return vals -} - -// ValidTimesFormat parses with given format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimesFormat(format, delim string) []time.Time { - vals, _ := k.parseTimesFormat(format, k.Strings(delim), false, false) - return vals -} - -// ValidTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter. -func (k *Key) ValidTimes(delim string) []time.Time { - return k.ValidTimesFormat(time.RFC3339, delim) -} - -// StrictFloat64s returns list of float64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictFloat64s(delim string) ([]float64, error) { - return k.parseFloat64s(k.Strings(delim), false, true) -} - -// StrictInts returns list of int divided by given delimiter or error on first invalid input. -func (k *Key) StrictInts(delim string) ([]int, error) { - return k.parseInts(k.Strings(delim), false, true) -} - -// StrictInt64s returns list of int64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictInt64s(delim string) ([]int64, error) { - return k.parseInt64s(k.Strings(delim), false, true) -} - -// StrictUints returns list of uint divided by given delimiter or error on first invalid input. -func (k *Key) StrictUints(delim string) ([]uint, error) { - return k.parseUints(k.Strings(delim), false, true) -} - -// StrictUint64s returns list of uint64 divided by given delimiter or error on first invalid input. -func (k *Key) StrictUint64s(delim string) ([]uint64, error) { - return k.parseUint64s(k.Strings(delim), false, true) -} - -// StrictBools returns list of bool divided by given delimiter or error on first invalid input. -func (k *Key) StrictBools(delim string) ([]bool, error) { - return k.parseBools(k.Strings(delim), false, true) -} - -// StrictTimesFormat parses with given format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimesFormat(format, delim string) ([]time.Time, error) { - return k.parseTimesFormat(format, k.Strings(delim), false, true) -} - -// StrictTimes parses with RFC3339 format and returns list of time.Time divided by given delimiter -// or error on first invalid input. -func (k *Key) StrictTimes(delim string) ([]time.Time, error) { - return k.StrictTimesFormat(time.RFC3339, delim) -} - -// parseBools transforms strings to bools. -func (k *Key) parseBools(strs []string, addInvalid, returnOnInvalid bool) ([]bool, error) { - vals := make([]bool, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := parseBool(str) - return val, err - } - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, val.(bool)) - } - } - return vals, err -} - -// parseFloat64s transforms strings to float64s. -func (k *Key) parseFloat64s(strs []string, addInvalid, returnOnInvalid bool) ([]float64, error) { - vals := make([]float64, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := strconv.ParseFloat(str, 64) - return val, err - } - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, val.(float64)) - } - } - return vals, err -} - -// parseInts transforms strings to ints. -func (k *Key) parseInts(strs []string, addInvalid, returnOnInvalid bool) ([]int, error) { - vals := make([]int, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := strconv.ParseInt(str, 0, 64) - return val, err - } - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, int(val.(int64))) - } - } - return vals, err -} - -// parseInt64s transforms strings to int64s. -func (k *Key) parseInt64s(strs []string, addInvalid, returnOnInvalid bool) ([]int64, error) { - vals := make([]int64, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := strconv.ParseInt(str, 0, 64) - return val, err - } - - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, val.(int64)) - } - } - return vals, err -} - -// parseUints transforms strings to uints. -func (k *Key) parseUints(strs []string, addInvalid, returnOnInvalid bool) ([]uint, error) { - vals := make([]uint, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := strconv.ParseUint(str, 0, 64) - return val, err - } - - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, uint(val.(uint64))) - } - } - return vals, err -} - -// parseUint64s transforms strings to uint64s. -func (k *Key) parseUint64s(strs []string, addInvalid, returnOnInvalid bool) ([]uint64, error) { - vals := make([]uint64, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := strconv.ParseUint(str, 0, 64) - return val, err - } - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, val.(uint64)) - } - } - return vals, err -} - -type Parser func(str string) (interface{}, error) - -// parseTimesFormat transforms strings to times in given format. -func (k *Key) parseTimesFormat(format string, strs []string, addInvalid, returnOnInvalid bool) ([]time.Time, error) { - vals := make([]time.Time, 0, len(strs)) - parser := func(str string) (interface{}, error) { - val, err := time.Parse(format, str) - return val, err - } - rawVals, err := k.doParse(strs, addInvalid, returnOnInvalid, parser) - if err == nil { - for _, val := range rawVals { - vals = append(vals, val.(time.Time)) - } - } - return vals, err -} - -// doParse transforms strings to different types -func (k *Key) doParse(strs []string, addInvalid, returnOnInvalid bool, parser Parser) ([]interface{}, error) { - vals := make([]interface{}, 0, len(strs)) - for _, str := range strs { - val, err := parser(str) - if err != nil && returnOnInvalid { - return nil, err - } - if err == nil || addInvalid { - vals = append(vals, val) - } - } - return vals, nil -} - -// SetValue changes key value. -func (k *Key) SetValue(v string) { - if k.s.f.BlockMode { - k.s.f.lock.Lock() - defer k.s.f.lock.Unlock() - } - - k.value = v - k.s.keysHash[k.name] = v -} diff --git a/vendor/gopkg.in/ini.v1/parser.go b/vendor/gopkg.in/ini.v1/parser.go deleted file mode 100644 index 44fc526c2c..0000000000 --- a/vendor/gopkg.in/ini.v1/parser.go +++ /dev/null @@ -1,520 +0,0 @@ -// Copyright 2015 Unknwon -// -// 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 ini - -import ( - "bufio" - "bytes" - "fmt" - "io" - "regexp" - "strconv" - "strings" - "unicode" -) - -const minReaderBufferSize = 4096 - -var pythonMultiline = regexp.MustCompile(`^([\t\f ]+)(.*)`) - -type parserOptions struct { - IgnoreContinuation bool - IgnoreInlineComment bool - AllowPythonMultilineValues bool - SpaceBeforeInlineComment bool - UnescapeValueDoubleQuotes bool - UnescapeValueCommentSymbols bool - PreserveSurroundedQuote bool - DebugFunc DebugFunc - ReaderBufferSize int -} - -type parser struct { - buf *bufio.Reader - options parserOptions - - isEOF bool - count int - comment *bytes.Buffer -} - -func (p *parser) debug(format string, args ...interface{}) { - if p.options.DebugFunc != nil { - p.options.DebugFunc(fmt.Sprintf(format, args...)) - } -} - -func newParser(r io.Reader, opts parserOptions) *parser { - size := opts.ReaderBufferSize - if size < minReaderBufferSize { - size = minReaderBufferSize - } - - return &parser{ - buf: bufio.NewReaderSize(r, size), - options: opts, - count: 1, - comment: &bytes.Buffer{}, - } -} - -// BOM handles header of UTF-8, UTF-16 LE and UTF-16 BE's BOM format. -// http://en.wikipedia.org/wiki/Byte_order_mark#Representations_of_byte_order_marks_by_encoding -func (p *parser) BOM() error { - mask, err := p.buf.Peek(2) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 2 { - return nil - } - - switch { - case mask[0] == 254 && mask[1] == 255: - fallthrough - case mask[0] == 255 && mask[1] == 254: - _, err = p.buf.Read(mask) - if err != nil { - return err - } - case mask[0] == 239 && mask[1] == 187: - mask, err := p.buf.Peek(3) - if err != nil && err != io.EOF { - return err - } else if len(mask) < 3 { - return nil - } - if mask[2] == 191 { - _, err = p.buf.Read(mask) - if err != nil { - return err - } - } - } - return nil -} - -func (p *parser) readUntil(delim byte) ([]byte, error) { - data, err := p.buf.ReadBytes(delim) - if err != nil { - if err == io.EOF { - p.isEOF = true - } else { - return nil, err - } - } - return data, nil -} - -func cleanComment(in []byte) ([]byte, bool) { - i := bytes.IndexAny(in, "#;") - if i == -1 { - return nil, false - } - return in[i:], true -} - -func readKeyName(delimiters string, in []byte) (string, int, error) { - line := string(in) - - // Check if key name surrounded by quotes. - var keyQuote string - if line[0] == '"' { - if len(line) > 6 && line[0:3] == `"""` { - keyQuote = `"""` - } else { - keyQuote = `"` - } - } else if line[0] == '`' { - keyQuote = "`" - } - - // Get out key name - var endIdx int - if len(keyQuote) > 0 { - startIdx := len(keyQuote) - // FIXME: fail case -> """"""name"""=value - pos := strings.Index(line[startIdx:], keyQuote) - if pos == -1 { - return "", -1, fmt.Errorf("missing closing key quote: %s", line) - } - pos += startIdx - - // Find key-value delimiter - i := strings.IndexAny(line[pos+startIdx:], delimiters) - if i < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - endIdx = pos + i - return strings.TrimSpace(line[startIdx:pos]), endIdx + startIdx + 1, nil - } - - endIdx = strings.IndexAny(line, delimiters) - if endIdx < 0 { - return "", -1, ErrDelimiterNotFound{line} - } - if endIdx == 0 { - return "", -1, ErrEmptyKeyName{line} - } - - return strings.TrimSpace(line[0:endIdx]), endIdx + 1, nil -} - -func (p *parser) readMultilines(line, val, valQuote string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := string(data) - - pos := strings.LastIndex(next, valQuote) - if pos > -1 { - val += next[:pos] - - comment, has := cleanComment([]byte(next[pos:])) - if has { - p.comment.Write(bytes.TrimSpace(comment)) - } - break - } - val += next - if p.isEOF { - return "", fmt.Errorf("missing closing key quote from %q to %q", line, next) - } - } - return val, nil -} - -func (p *parser) readContinuationLines(val string) (string, error) { - for { - data, err := p.readUntil('\n') - if err != nil { - return "", err - } - next := strings.TrimSpace(string(data)) - - if len(next) == 0 { - break - } - val += next - if val[len(val)-1] != '\\' { - break - } - val = val[:len(val)-1] - } - return val, nil -} - -// hasSurroundedQuote check if and only if the first and last characters -// are quotes \" or \'. -// It returns false if any other parts also contain same kind of quotes. -func hasSurroundedQuote(in string, quote byte) bool { - return len(in) >= 2 && in[0] == quote && in[len(in)-1] == quote && - strings.IndexByte(in[1:], quote) == len(in)-2 -} - -func (p *parser) readValue(in []byte, bufferSize int) (string, error) { - - line := strings.TrimLeftFunc(string(in), unicode.IsSpace) - if len(line) == 0 { - if p.options.AllowPythonMultilineValues && len(in) > 0 && in[len(in)-1] == '\n' { - return p.readPythonMultilines(line, bufferSize) - } - return "", nil - } - - var valQuote string - if len(line) > 3 && line[0:3] == `"""` { - valQuote = `"""` - } else if line[0] == '`' { - valQuote = "`" - } else if p.options.UnescapeValueDoubleQuotes && line[0] == '"' { - valQuote = `"` - } - - if len(valQuote) > 0 { - startIdx := len(valQuote) - pos := strings.LastIndex(line[startIdx:], valQuote) - // Check for multi-line value - if pos == -1 { - return p.readMultilines(line, line[startIdx:], valQuote) - } - - if p.options.UnescapeValueDoubleQuotes && valQuote == `"` { - return strings.Replace(line[startIdx:pos+startIdx], `\"`, `"`, -1), nil - } - return line[startIdx : pos+startIdx], nil - } - - lastChar := line[len(line)-1] - // Won't be able to reach here if value only contains whitespace - line = strings.TrimSpace(line) - trimmedLastChar := line[len(line)-1] - - // Check continuation lines when desired - if !p.options.IgnoreContinuation && trimmedLastChar == '\\' { - return p.readContinuationLines(line[:len(line)-1]) - } - - // Check if ignore inline comment - if !p.options.IgnoreInlineComment { - var i int - if p.options.SpaceBeforeInlineComment { - i = strings.Index(line, " #") - if i == -1 { - i = strings.Index(line, " ;") - } - - } else { - i = strings.IndexAny(line, "#;") - } - - if i > -1 { - p.comment.WriteString(line[i:]) - line = strings.TrimSpace(line[:i]) - } - - } - - // Trim single and double quotes - if (hasSurroundedQuote(line, '\'') || - hasSurroundedQuote(line, '"')) && !p.options.PreserveSurroundedQuote { - line = line[1 : len(line)-1] - } else if len(valQuote) == 0 && p.options.UnescapeValueCommentSymbols { - line = strings.ReplaceAll(line, `\;`, ";") - line = strings.ReplaceAll(line, `\#`, "#") - } else if p.options.AllowPythonMultilineValues && lastChar == '\n' { - return p.readPythonMultilines(line, bufferSize) - } - - return line, nil -} - -func (p *parser) readPythonMultilines(line string, bufferSize int) (string, error) { - parserBufferPeekResult, _ := p.buf.Peek(bufferSize) - peekBuffer := bytes.NewBuffer(parserBufferPeekResult) - - for { - peekData, peekErr := peekBuffer.ReadBytes('\n') - if peekErr != nil && peekErr != io.EOF { - p.debug("readPythonMultilines: failed to peek with error: %v", peekErr) - return "", peekErr - } - - p.debug("readPythonMultilines: parsing %q", string(peekData)) - - peekMatches := pythonMultiline.FindStringSubmatch(string(peekData)) - p.debug("readPythonMultilines: matched %d parts", len(peekMatches)) - for n, v := range peekMatches { - p.debug(" %d: %q", n, v) - } - - // Return if not a Python multiline value. - if len(peekMatches) != 3 { - p.debug("readPythonMultilines: end of value, got: %q", line) - return line, nil - } - - // Advance the parser reader (buffer) in-sync with the peek buffer. - _, err := p.buf.Discard(len(peekData)) - if err != nil { - p.debug("readPythonMultilines: failed to skip to the end, returning error") - return "", err - } - - line += "\n" + peekMatches[0] - } -} - -// parse parses data through an io.Reader. -func (f *File) parse(reader io.Reader) (err error) { - p := newParser(reader, parserOptions{ - IgnoreContinuation: f.options.IgnoreContinuation, - IgnoreInlineComment: f.options.IgnoreInlineComment, - AllowPythonMultilineValues: f.options.AllowPythonMultilineValues, - SpaceBeforeInlineComment: f.options.SpaceBeforeInlineComment, - UnescapeValueDoubleQuotes: f.options.UnescapeValueDoubleQuotes, - UnescapeValueCommentSymbols: f.options.UnescapeValueCommentSymbols, - PreserveSurroundedQuote: f.options.PreserveSurroundedQuote, - DebugFunc: f.options.DebugFunc, - ReaderBufferSize: f.options.ReaderBufferSize, - }) - if err = p.BOM(); err != nil { - return fmt.Errorf("BOM: %v", err) - } - - // Ignore error because default section name is never empty string. - name := DefaultSection - if f.options.Insensitive || f.options.InsensitiveSections { - name = strings.ToLower(DefaultSection) - } - section, _ := f.NewSection(name) - - // This "last" is not strictly equivalent to "previous one" if current key is not the first nested key - var isLastValueEmpty bool - var lastRegularKey *Key - - var line []byte - var inUnparseableSection bool - - // NOTE: Iterate and increase `currentPeekSize` until - // the size of the parser buffer is found. - // TODO(unknwon): When Golang 1.10 is the lowest version supported, replace with `parserBufferSize := p.buf.Size()`. - parserBufferSize := 0 - // NOTE: Peek 4kb at a time. - currentPeekSize := minReaderBufferSize - - if f.options.AllowPythonMultilineValues { - for { - peekBytes, _ := p.buf.Peek(currentPeekSize) - peekBytesLength := len(peekBytes) - - if parserBufferSize >= peekBytesLength { - break - } - - currentPeekSize *= 2 - parserBufferSize = peekBytesLength - } - } - - for !p.isEOF { - line, err = p.readUntil('\n') - if err != nil { - return err - } - - if f.options.AllowNestedValues && - isLastValueEmpty && len(line) > 0 { - if line[0] == ' ' || line[0] == '\t' { - err = lastRegularKey.addNestedValue(string(bytes.TrimSpace(line))) - if err != nil { - return err - } - continue - } - } - - line = bytes.TrimLeftFunc(line, unicode.IsSpace) - if len(line) == 0 { - continue - } - - // Comments - if line[0] == '#' || line[0] == ';' { - // Note: we do not care ending line break, - // it is needed for adding second line, - // so just clean it once at the end when set to value. - p.comment.Write(line) - continue - } - - // Section - if line[0] == '[' { - // Read to the next ']' (TODO: support quoted strings) - closeIdx := bytes.LastIndexByte(line, ']') - if closeIdx == -1 { - return fmt.Errorf("unclosed section: %s", line) - } - - name := string(line[1:closeIdx]) - section, err = f.NewSection(name) - if err != nil { - return err - } - - comment, has := cleanComment(line[closeIdx+1:]) - if has { - p.comment.Write(comment) - } - - section.Comment = strings.TrimSpace(p.comment.String()) - - // Reset auto-counter and comments - p.comment.Reset() - p.count = 1 - // Nested values can't span sections - isLastValueEmpty = false - - inUnparseableSection = false - for i := range f.options.UnparseableSections { - if f.options.UnparseableSections[i] == name || - ((f.options.Insensitive || f.options.InsensitiveSections) && strings.EqualFold(f.options.UnparseableSections[i], name)) { - inUnparseableSection = true - continue - } - } - continue - } - - if inUnparseableSection { - section.isRawSection = true - section.rawBody += string(line) - continue - } - - kname, offset, err := readKeyName(f.options.KeyValueDelimiters, line) - if err != nil { - switch { - // Treat as boolean key when desired, and whole line is key name. - case IsErrDelimiterNotFound(err): - switch { - case f.options.AllowBooleanKeys: - kname, err := p.readValue(line, parserBufferSize) - if err != nil { - return err - } - key, err := section.NewBooleanKey(kname) - if err != nil { - return err - } - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - continue - - case f.options.SkipUnrecognizableLines: - continue - } - case IsErrEmptyKeyName(err) && f.options.SkipUnrecognizableLines: - continue - } - return err - } - - // Auto increment. - isAutoIncr := false - if kname == "-" { - isAutoIncr = true - kname = "#" + strconv.Itoa(p.count) - p.count++ - } - - value, err := p.readValue(line[offset:], parserBufferSize) - if err != nil { - return err - } - isLastValueEmpty = len(value) == 0 - - key, err := section.NewKey(kname, value) - if err != nil { - return err - } - key.isAutoIncrement = isAutoIncr - key.Comment = strings.TrimSpace(p.comment.String()) - p.comment.Reset() - lastRegularKey = key - } - return nil -} diff --git a/vendor/gopkg.in/ini.v1/section.go b/vendor/gopkg.in/ini.v1/section.go deleted file mode 100644 index a3615d820b..0000000000 --- a/vendor/gopkg.in/ini.v1/section.go +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "errors" - "fmt" - "strings" -) - -// Section represents a config section. -type Section struct { - f *File - Comment string - name string - keys map[string]*Key - keyList []string - keysHash map[string]string - - isRawSection bool - rawBody string -} - -func newSection(f *File, name string) *Section { - return &Section{ - f: f, - name: name, - keys: make(map[string]*Key), - keyList: make([]string, 0, 10), - keysHash: make(map[string]string), - } -} - -// Name returns name of Section. -func (s *Section) Name() string { - return s.name -} - -// Body returns rawBody of Section if the section was marked as unparseable. -// It still follows the other rules of the INI format surrounding leading/trailing whitespace. -func (s *Section) Body() string { - return strings.TrimSpace(s.rawBody) -} - -// SetBody updates body content only if section is raw. -func (s *Section) SetBody(body string) { - if !s.isRawSection { - return - } - s.rawBody = body -} - -// NewKey creates a new key to given section. -func (s *Section) NewKey(name, val string) (*Key, error) { - if len(name) == 0 { - return nil, errors.New("error creating new key: empty key name") - } else if s.f.options.Insensitive || s.f.options.InsensitiveKeys { - name = strings.ToLower(name) - } - - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - if inSlice(name, s.keyList) { - if s.f.options.AllowShadows { - if err := s.keys[name].addShadow(val); err != nil { - return nil, err - } - } else { - s.keys[name].value = val - s.keysHash[name] = val - } - return s.keys[name], nil - } - - s.keyList = append(s.keyList, name) - s.keys[name] = newKey(s, name, val) - s.keysHash[name] = val - return s.keys[name], nil -} - -// NewBooleanKey creates a new boolean type key to given section. -func (s *Section) NewBooleanKey(name string) (*Key, error) { - key, err := s.NewKey(name, "true") - if err != nil { - return nil, err - } - - key.isBooleanType = true - return key, nil -} - -// GetKey returns key in section by given name. -func (s *Section) GetKey(name string) (*Key, error) { - if s.f.BlockMode { - s.f.lock.RLock() - } - if s.f.options.Insensitive || s.f.options.InsensitiveKeys { - name = strings.ToLower(name) - } - key := s.keys[name] - if s.f.BlockMode { - s.f.lock.RUnlock() - } - - if key == nil { - // Check if it is a child-section. - sname := s.name - for { - if i := strings.LastIndex(sname, s.f.options.ChildSectionDelimiter); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - return sec.GetKey(name) - } - break - } - return nil, fmt.Errorf("error when getting key of section %q: key %q not exists", s.name, name) - } - return key, nil -} - -// HasKey returns true if section contains a key with given name. -func (s *Section) HasKey(name string) bool { - key, _ := s.GetKey(name) - return key != nil -} - -// Deprecated: Use "HasKey" instead. -func (s *Section) Haskey(name string) bool { - return s.HasKey(name) -} - -// HasValue returns true if section contains given raw value. -func (s *Section) HasValue(value string) bool { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - for _, k := range s.keys { - if value == k.value { - return true - } - } - return false -} - -// Key assumes named Key exists in section and returns a zero-value when not. -func (s *Section) Key(name string) *Key { - key, err := s.GetKey(name) - if err != nil { - // It's OK here because the only possible error is empty key name, - // but if it's empty, this piece of code won't be executed. - key, _ = s.NewKey(name, "") - return key - } - return key -} - -// Keys returns list of keys of section. -func (s *Section) Keys() []*Key { - keys := make([]*Key, len(s.keyList)) - for i := range s.keyList { - keys[i] = s.Key(s.keyList[i]) - } - return keys -} - -// ParentKeys returns list of keys of parent section. -func (s *Section) ParentKeys() []*Key { - var parentKeys []*Key - sname := s.name - for { - if i := strings.LastIndex(sname, s.f.options.ChildSectionDelimiter); i > -1 { - sname = sname[:i] - sec, err := s.f.GetSection(sname) - if err != nil { - continue - } - parentKeys = append(parentKeys, sec.Keys()...) - } else { - break - } - - } - return parentKeys -} - -// KeyStrings returns list of key names of section. -func (s *Section) KeyStrings() []string { - list := make([]string, len(s.keyList)) - copy(list, s.keyList) - return list -} - -// KeysHash returns keys hash consisting of names and values. -func (s *Section) KeysHash() map[string]string { - if s.f.BlockMode { - s.f.lock.RLock() - defer s.f.lock.RUnlock() - } - - hash := make(map[string]string, len(s.keysHash)) - for key, value := range s.keysHash { - hash[key] = value - } - return hash -} - -// DeleteKey deletes a key from section. -func (s *Section) DeleteKey(name string) { - if s.f.BlockMode { - s.f.lock.Lock() - defer s.f.lock.Unlock() - } - - for i, k := range s.keyList { - if k == name { - s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) - delete(s.keys, name) - delete(s.keysHash, name) - return - } - } -} - -// ChildSections returns a list of child sections of current section. -// For example, "[parent.child1]" and "[parent.child12]" are child sections -// of section "[parent]". -func (s *Section) ChildSections() []*Section { - prefix := s.name + s.f.options.ChildSectionDelimiter - children := make([]*Section, 0, 3) - for _, name := range s.f.sectionList { - if strings.HasPrefix(name, prefix) { - children = append(children, s.f.sections[name]...) - } - } - return children -} diff --git a/vendor/gopkg.in/ini.v1/struct.go b/vendor/gopkg.in/ini.v1/struct.go deleted file mode 100644 index a486b2fe0f..0000000000 --- a/vendor/gopkg.in/ini.v1/struct.go +++ /dev/null @@ -1,747 +0,0 @@ -// Copyright 2014 Unknwon -// -// 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 ini - -import ( - "bytes" - "errors" - "fmt" - "reflect" - "strings" - "time" - "unicode" -) - -// NameMapper represents a ini tag name mapper. -type NameMapper func(string) string - -// Built-in name getters. -var ( - // SnackCase converts to format SNACK_CASE. - SnackCase NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - } - newstr = append(newstr, unicode.ToUpper(chr)) - } - return string(newstr) - } - // TitleUnderscore converts to format title_underscore. - TitleUnderscore NameMapper = func(raw string) string { - newstr := make([]rune, 0, len(raw)) - for i, chr := range raw { - if isUpper := 'A' <= chr && chr <= 'Z'; isUpper { - if i > 0 { - newstr = append(newstr, '_') - } - chr -= 'A' - 'a' - } - newstr = append(newstr, chr) - } - return string(newstr) - } -) - -func (s *Section) parseFieldName(raw, actual string) string { - if len(actual) > 0 { - return actual - } - if s.f.NameMapper != nil { - return s.f.NameMapper(raw) - } - return raw -} - -func parseDelim(actual string) string { - if len(actual) > 0 { - return actual - } - return "," -} - -var reflectTime = reflect.TypeOf(time.Now()).Kind() - -// setSliceWithProperType sets proper values to slice based on its type. -func setSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - var strs []string - if allowShadow { - strs = key.StringsWithShadows(delim) - } else { - strs = key.Strings(delim) - } - - numVals := len(strs) - if numVals == 0 { - return nil - } - - var vals interface{} - var err error - - sliceOf := field.Type().Elem().Kind() - switch sliceOf { - case reflect.String: - vals = strs - case reflect.Int: - vals, err = key.parseInts(strs, true, false) - case reflect.Int64: - vals, err = key.parseInt64s(strs, true, false) - case reflect.Uint: - vals, err = key.parseUints(strs, true, false) - case reflect.Uint64: - vals, err = key.parseUint64s(strs, true, false) - case reflect.Float64: - vals, err = key.parseFloat64s(strs, true, false) - case reflect.Bool: - vals, err = key.parseBools(strs, true, false) - case reflectTime: - vals, err = key.parseTimesFormat(time.RFC3339, strs, true, false) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - if err != nil && isStrict { - return err - } - - slice := reflect.MakeSlice(field.Type(), numVals, numVals) - for i := 0; i < numVals; i++ { - switch sliceOf { - case reflect.String: - slice.Index(i).Set(reflect.ValueOf(vals.([]string)[i])) - case reflect.Int: - slice.Index(i).Set(reflect.ValueOf(vals.([]int)[i])) - case reflect.Int64: - slice.Index(i).Set(reflect.ValueOf(vals.([]int64)[i])) - case reflect.Uint: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint)[i])) - case reflect.Uint64: - slice.Index(i).Set(reflect.ValueOf(vals.([]uint64)[i])) - case reflect.Float64: - slice.Index(i).Set(reflect.ValueOf(vals.([]float64)[i])) - case reflect.Bool: - slice.Index(i).Set(reflect.ValueOf(vals.([]bool)[i])) - case reflectTime: - slice.Index(i).Set(reflect.ValueOf(vals.([]time.Time)[i])) - } - } - field.Set(slice) - return nil -} - -func wrapStrictError(err error, isStrict bool) error { - if isStrict { - return err - } - return nil -} - -// setWithProperType sets proper value to field based on its type, -// but it does not return error for failing parsing, -// because we want to use default value that is already assigned to struct. -func setWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow, isStrict bool) error { - vt := t - isPtr := t.Kind() == reflect.Ptr - if isPtr { - vt = t.Elem() - } - switch vt.Kind() { - case reflect.String: - stringVal := key.String() - if isPtr { - field.Set(reflect.ValueOf(&stringVal)) - } else if len(stringVal) > 0 { - field.SetString(key.String()) - } - case reflect.Bool: - boolVal, err := key.Bool() - if err != nil { - return wrapStrictError(err, isStrict) - } - if isPtr { - field.Set(reflect.ValueOf(&boolVal)) - } else { - field.SetBool(boolVal) - } - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - // ParseDuration will not return err for `0`, so check the type name - if vt.Name() == "Duration" { - durationVal, err := key.Duration() - if err != nil { - if intVal, err := key.Int64(); err == nil { - field.SetInt(intVal) - return nil - } - return wrapStrictError(err, isStrict) - } - if isPtr { - field.Set(reflect.ValueOf(&durationVal)) - } else if int64(durationVal) > 0 { - field.Set(reflect.ValueOf(durationVal)) - } - return nil - } - - intVal, err := key.Int64() - if err != nil { - return wrapStrictError(err, isStrict) - } - if isPtr { - pv := reflect.New(t.Elem()) - pv.Elem().SetInt(intVal) - field.Set(pv) - } else { - field.SetInt(intVal) - } - // byte is an alias for uint8, so supporting uint8 breaks support for byte - case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: - durationVal, err := key.Duration() - // Skip zero value - if err == nil && uint64(durationVal) > 0 { - if isPtr { - field.Set(reflect.ValueOf(&durationVal)) - } else { - field.Set(reflect.ValueOf(durationVal)) - } - return nil - } - - uintVal, err := key.Uint64() - if err != nil { - return wrapStrictError(err, isStrict) - } - if isPtr { - pv := reflect.New(t.Elem()) - pv.Elem().SetUint(uintVal) - field.Set(pv) - } else { - field.SetUint(uintVal) - } - - case reflect.Float32, reflect.Float64: - floatVal, err := key.Float64() - if err != nil { - return wrapStrictError(err, isStrict) - } - if isPtr { - pv := reflect.New(t.Elem()) - pv.Elem().SetFloat(floatVal) - field.Set(pv) - } else { - field.SetFloat(floatVal) - } - case reflectTime: - timeVal, err := key.Time() - if err != nil { - return wrapStrictError(err, isStrict) - } - if isPtr { - field.Set(reflect.ValueOf(&timeVal)) - } else { - field.Set(reflect.ValueOf(timeVal)) - } - case reflect.Slice: - return setSliceWithProperType(key, field, delim, allowShadow, isStrict) - default: - return fmt.Errorf("unsupported type %q", t) - } - return nil -} - -func parseTagOptions(tag string) (rawName string, omitEmpty bool, allowShadow bool, allowNonUnique bool, extends bool) { - opts := strings.SplitN(tag, ",", 5) - rawName = opts[0] - for _, opt := range opts[1:] { - omitEmpty = omitEmpty || (opt == "omitempty") - allowShadow = allowShadow || (opt == "allowshadow") - allowNonUnique = allowNonUnique || (opt == "nonunique") - extends = extends || (opt == "extends") - } - return rawName, omitEmpty, allowShadow, allowNonUnique, extends -} - -// mapToField maps the given value to the matching field of the given section. -// The sectionIndex is the index (if non unique sections are enabled) to which the value should be added. -func (s *Section) mapToField(val reflect.Value, isStrict bool, sectionIndex int, sectionName string) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - rawName, _, allowShadow, allowNonUnique, extends := parseTagOptions(tag) - fieldName := s.parseFieldName(tpField.Name, rawName) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - isStruct := tpField.Type.Kind() == reflect.Struct - isStructPtr := tpField.Type.Kind() == reflect.Ptr && tpField.Type.Elem().Kind() == reflect.Struct - isAnonymousPtr := tpField.Type.Kind() == reflect.Ptr && tpField.Anonymous - if isAnonymousPtr { - field.Set(reflect.New(tpField.Type.Elem())) - } - - if extends && (isAnonymousPtr || (isStruct && tpField.Anonymous)) { - if isStructPtr && field.IsNil() { - field.Set(reflect.New(tpField.Type.Elem())) - } - fieldSection := s - if rawName != "" { - sectionName = s.name + s.f.options.ChildSectionDelimiter + rawName - if secs, err := s.f.SectionsByName(sectionName); err == nil && sectionIndex < len(secs) { - fieldSection = secs[sectionIndex] - } - } - if err := fieldSection.mapToField(field, isStrict, sectionIndex, sectionName); err != nil { - return fmt.Errorf("map to field %q: %v", fieldName, err) - } - } else if isAnonymousPtr || isStruct || isStructPtr { - if secs, err := s.f.SectionsByName(fieldName); err == nil { - if len(secs) <= sectionIndex { - return fmt.Errorf("there are not enough sections (%d <= %d) for the field %q", len(secs), sectionIndex, fieldName) - } - // Only set the field to non-nil struct value if we have a section for it. - // Otherwise, we end up with a non-nil struct ptr even though there is no data. - if isStructPtr && field.IsNil() { - field.Set(reflect.New(tpField.Type.Elem())) - } - if err = secs[sectionIndex].mapToField(field, isStrict, sectionIndex, fieldName); err != nil { - return fmt.Errorf("map to field %q: %v", fieldName, err) - } - continue - } - } - - // Map non-unique sections - if allowNonUnique && tpField.Type.Kind() == reflect.Slice { - newField, err := s.mapToSlice(fieldName, field, isStrict) - if err != nil { - return fmt.Errorf("map to slice %q: %v", fieldName, err) - } - - field.Set(newField) - continue - } - - if key, err := s.GetKey(fieldName); err == nil { - delim := parseDelim(tpField.Tag.Get("delim")) - if err = setWithProperType(tpField.Type, key, field, delim, allowShadow, isStrict); err != nil { - return fmt.Errorf("set field %q: %v", fieldName, err) - } - } - } - return nil -} - -// mapToSlice maps all sections with the same name and returns the new value. -// The type of the Value must be a slice. -func (s *Section) mapToSlice(secName string, val reflect.Value, isStrict bool) (reflect.Value, error) { - secs, err := s.f.SectionsByName(secName) - if err != nil { - return reflect.Value{}, err - } - - typ := val.Type().Elem() - for i, sec := range secs { - elem := reflect.New(typ) - if err = sec.mapToField(elem, isStrict, i, sec.name); err != nil { - return reflect.Value{}, fmt.Errorf("map to field from section %q: %v", secName, err) - } - - val = reflect.Append(val, elem.Elem()) - } - return val, nil -} - -// mapTo maps a section to object v. -func (s *Section) mapTo(v interface{}, isStrict bool) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } else { - return errors.New("not a pointer to a struct") - } - - if typ.Kind() == reflect.Slice { - newField, err := s.mapToSlice(s.name, val, isStrict) - if err != nil { - return err - } - - val.Set(newField) - return nil - } - - return s.mapToField(val, isStrict, 0, s.name) -} - -// MapTo maps section to given struct. -func (s *Section) MapTo(v interface{}) error { - return s.mapTo(v, false) -} - -// StrictMapTo maps section to given struct in strict mode, -// which returns all possible error including value parsing error. -func (s *Section) StrictMapTo(v interface{}) error { - return s.mapTo(v, true) -} - -// MapTo maps file to given struct. -func (f *File) MapTo(v interface{}) error { - return f.Section("").MapTo(v) -} - -// StrictMapTo maps file to given struct in strict mode, -// which returns all possible error including value parsing error. -func (f *File) StrictMapTo(v interface{}) error { - return f.Section("").StrictMapTo(v) -} - -// MapToWithMapper maps data sources to given struct with name mapper. -func MapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.MapTo(v) -} - -// StrictMapToWithMapper maps data sources to given struct with name mapper in strict mode, -// which returns all possible error including value parsing error. -func StrictMapToWithMapper(v interface{}, mapper NameMapper, source interface{}, others ...interface{}) error { - cfg, err := Load(source, others...) - if err != nil { - return err - } - cfg.NameMapper = mapper - return cfg.StrictMapTo(v) -} - -// MapTo maps data sources to given struct. -func MapTo(v, source interface{}, others ...interface{}) error { - return MapToWithMapper(v, nil, source, others...) -} - -// StrictMapTo maps data sources to given struct in strict mode, -// which returns all possible error including value parsing error. -func StrictMapTo(v, source interface{}, others ...interface{}) error { - return StrictMapToWithMapper(v, nil, source, others...) -} - -// reflectSliceWithProperType does the opposite thing as setSliceWithProperType. -func reflectSliceWithProperType(key *Key, field reflect.Value, delim string, allowShadow bool) error { - slice := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - sliceOf := field.Type().Elem().Kind() - - if allowShadow { - var keyWithShadows *Key - for i := 0; i < field.Len(); i++ { - var val string - switch sliceOf { - case reflect.String: - val = slice.Index(i).String() - case reflect.Int, reflect.Int64: - val = fmt.Sprint(slice.Index(i).Int()) - case reflect.Uint, reflect.Uint64: - val = fmt.Sprint(slice.Index(i).Uint()) - case reflect.Float64: - val = fmt.Sprint(slice.Index(i).Float()) - case reflect.Bool: - val = fmt.Sprint(slice.Index(i).Bool()) - case reflectTime: - val = slice.Index(i).Interface().(time.Time).Format(time.RFC3339) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - - if i == 0 { - keyWithShadows = newKey(key.s, key.name, val) - } else { - _ = keyWithShadows.AddShadow(val) - } - } - *key = *keyWithShadows - return nil - } - - var buf bytes.Buffer - for i := 0; i < field.Len(); i++ { - switch sliceOf { - case reflect.String: - buf.WriteString(slice.Index(i).String()) - case reflect.Int, reflect.Int64: - buf.WriteString(fmt.Sprint(slice.Index(i).Int())) - case reflect.Uint, reflect.Uint64: - buf.WriteString(fmt.Sprint(slice.Index(i).Uint())) - case reflect.Float64: - buf.WriteString(fmt.Sprint(slice.Index(i).Float())) - case reflect.Bool: - buf.WriteString(fmt.Sprint(slice.Index(i).Bool())) - case reflectTime: - buf.WriteString(slice.Index(i).Interface().(time.Time).Format(time.RFC3339)) - default: - return fmt.Errorf("unsupported type '[]%s'", sliceOf) - } - buf.WriteString(delim) - } - key.SetValue(buf.String()[:buf.Len()-len(delim)]) - return nil -} - -// reflectWithProperType does the opposite thing as setWithProperType. -func reflectWithProperType(t reflect.Type, key *Key, field reflect.Value, delim string, allowShadow bool) error { - switch t.Kind() { - case reflect.String: - key.SetValue(field.String()) - case reflect.Bool: - key.SetValue(fmt.Sprint(field.Bool())) - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - key.SetValue(fmt.Sprint(field.Int())) - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64: - key.SetValue(fmt.Sprint(field.Uint())) - case reflect.Float32, reflect.Float64: - key.SetValue(fmt.Sprint(field.Float())) - case reflectTime: - key.SetValue(fmt.Sprint(field.Interface().(time.Time).Format(time.RFC3339))) - case reflect.Slice: - return reflectSliceWithProperType(key, field, delim, allowShadow) - case reflect.Ptr: - if !field.IsNil() { - return reflectWithProperType(t.Elem(), key, field.Elem(), delim, allowShadow) - } - default: - return fmt.Errorf("unsupported type %q", t) - } - return nil -} - -// CR: copied from encoding/json/encode.go with modifications of time.Time support. -// TODO: add more test coverage. -func isEmptyValue(v reflect.Value) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - return v.IsNil() - case reflectTime: - t, ok := v.Interface().(time.Time) - return ok && t.IsZero() - } - return false -} - -// StructReflector is the interface implemented by struct types that can extract themselves into INI objects. -type StructReflector interface { - ReflectINIStruct(*File) error -} - -func (s *Section) reflectFrom(val reflect.Value) error { - if val.Kind() == reflect.Ptr { - val = val.Elem() - } - typ := val.Type() - - for i := 0; i < typ.NumField(); i++ { - if !val.Field(i).CanInterface() { - continue - } - - field := val.Field(i) - tpField := typ.Field(i) - - tag := tpField.Tag.Get("ini") - if tag == "-" { - continue - } - - rawName, omitEmpty, allowShadow, allowNonUnique, extends := parseTagOptions(tag) - if omitEmpty && isEmptyValue(field) { - continue - } - - if r, ok := field.Interface().(StructReflector); ok { - return r.ReflectINIStruct(s.f) - } - - fieldName := s.parseFieldName(tpField.Name, rawName) - if len(fieldName) == 0 || !field.CanSet() { - continue - } - - if extends && tpField.Anonymous && (tpField.Type.Kind() == reflect.Ptr || tpField.Type.Kind() == reflect.Struct) { - if err := s.reflectFrom(field); err != nil { - return fmt.Errorf("reflect from field %q: %v", fieldName, err) - } - continue - } - - if (tpField.Type.Kind() == reflect.Ptr && tpField.Type.Elem().Kind() == reflect.Struct) || - (tpField.Type.Kind() == reflect.Struct && tpField.Type.Name() != "Time") { - // Note: The only error here is section doesn't exist. - sec, err := s.f.GetSection(fieldName) - if err != nil { - // Note: fieldName can never be empty here, ignore error. - sec, _ = s.f.NewSection(fieldName) - } - - // Add comment from comment tag - if len(sec.Comment) == 0 { - sec.Comment = tpField.Tag.Get("comment") - } - - if err = sec.reflectFrom(field); err != nil { - return fmt.Errorf("reflect from field %q: %v", fieldName, err) - } - continue - } - - if allowNonUnique && tpField.Type.Kind() == reflect.Slice { - slice := field.Slice(0, field.Len()) - if field.Len() == 0 { - return nil - } - sliceOf := field.Type().Elem().Kind() - - for i := 0; i < field.Len(); i++ { - if sliceOf != reflect.Struct && sliceOf != reflect.Ptr { - return fmt.Errorf("field %q is not a slice of pointer or struct", fieldName) - } - - sec, err := s.f.NewSection(fieldName) - if err != nil { - return err - } - - // Add comment from comment tag - if len(sec.Comment) == 0 { - sec.Comment = tpField.Tag.Get("comment") - } - - if err := sec.reflectFrom(slice.Index(i)); err != nil { - return fmt.Errorf("reflect from field %q: %v", fieldName, err) - } - } - continue - } - - // Note: Same reason as section. - key, err := s.GetKey(fieldName) - if err != nil { - key, _ = s.NewKey(fieldName, "") - } - - // Add comment from comment tag - if len(key.Comment) == 0 { - key.Comment = tpField.Tag.Get("comment") - } - - delim := parseDelim(tpField.Tag.Get("delim")) - if err = reflectWithProperType(tpField.Type, key, field, delim, allowShadow); err != nil { - return fmt.Errorf("reflect field %q: %v", fieldName, err) - } - - } - return nil -} - -// ReflectFrom reflects section from given struct. It overwrites existing ones. -func (s *Section) ReflectFrom(v interface{}) error { - typ := reflect.TypeOf(v) - val := reflect.ValueOf(v) - - if s.name != DefaultSection && s.f.options.AllowNonUniqueSections && - (typ.Kind() == reflect.Slice || typ.Kind() == reflect.Ptr) { - // Clear sections to make sure none exists before adding the new ones - s.f.DeleteSection(s.name) - - if typ.Kind() == reflect.Ptr { - sec, err := s.f.NewSection(s.name) - if err != nil { - return err - } - return sec.reflectFrom(val.Elem()) - } - - slice := val.Slice(0, val.Len()) - sliceOf := val.Type().Elem().Kind() - if sliceOf != reflect.Ptr { - return fmt.Errorf("not a slice of pointers") - } - - for i := 0; i < slice.Len(); i++ { - sec, err := s.f.NewSection(s.name) - if err != nil { - return err - } - - err = sec.reflectFrom(slice.Index(i)) - if err != nil { - return fmt.Errorf("reflect from %dth field: %v", i, err) - } - } - - return nil - } - - if typ.Kind() == reflect.Ptr { - val = val.Elem() - } else { - return errors.New("not a pointer to a struct") - } - - return s.reflectFrom(val) -} - -// ReflectFrom reflects file from given struct. -func (f *File) ReflectFrom(v interface{}) error { - return f.Section("").ReflectFrom(v) -} - -// ReflectFromWithMapper reflects data sources from given struct with name mapper. -func ReflectFromWithMapper(cfg *File, v interface{}, mapper NameMapper) error { - cfg.NameMapper = mapper - return cfg.ReflectFrom(v) -} - -// ReflectFrom reflects data sources from given struct. -func ReflectFrom(cfg *File, v interface{}) error { - return ReflectFromWithMapper(cfg, v, nil) -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 3144c0647b..a3530da4d4 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,354 +1,16 @@ -# cloud.google.com/go/auth v0.16.5 -## explicit; go 1.23.0 -cloud.google.com/go/auth -cloud.google.com/go/auth/credentials -cloud.google.com/go/auth/credentials/internal/externalaccount -cloud.google.com/go/auth/credentials/internal/externalaccountuser -cloud.google.com/go/auth/credentials/internal/gdch -cloud.google.com/go/auth/credentials/internal/impersonate -cloud.google.com/go/auth/credentials/internal/stsexchange -cloud.google.com/go/auth/httptransport -cloud.google.com/go/auth/internal -cloud.google.com/go/auth/internal/credsfile -cloud.google.com/go/auth/internal/jwt -cloud.google.com/go/auth/internal/transport -cloud.google.com/go/auth/internal/transport/cert -# cloud.google.com/go/auth/oauth2adapt v0.2.8 -## explicit; go 1.23.0 -cloud.google.com/go/auth/oauth2adapt -# cloud.google.com/go/compute/metadata v0.9.0 -## explicit; go 1.24.0 -cloud.google.com/go/compute/metadata -# github.com/Azure/azure-sdk-for-go v68.0.0+incompatible -## explicit -github.com/Azure/azure-sdk-for-go/profiles/latest/dns/mgmt/dns -github.com/Azure/azure-sdk-for-go/profiles/latest/privatedns/mgmt/privatedns -github.com/Azure/azure-sdk-for-go/services/dns/mgmt/2018-05-01/dns -github.com/Azure/azure-sdk-for-go/services/privatedns/mgmt/2020-06-01/privatedns -github.com/Azure/azure-sdk-for-go/version -# github.com/Azure/go-autorest v14.2.0+incompatible -## explicit -github.com/Azure/go-autorest -# github.com/Azure/go-autorest/autorest v0.11.30 -## explicit; go 1.15 -github.com/Azure/go-autorest/autorest -github.com/Azure/go-autorest/autorest/azure -# github.com/Azure/go-autorest/autorest/adal v0.9.22 -## explicit; go 1.15 -github.com/Azure/go-autorest/autorest/adal -# github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 -## explicit; go 1.15 -github.com/Azure/go-autorest/autorest/azure/auth -# github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 -## explicit; go 1.15 -github.com/Azure/go-autorest/autorest/azure/cli -# github.com/Azure/go-autorest/autorest/date v0.3.0 -## explicit; go 1.12 -github.com/Azure/go-autorest/autorest/date -# github.com/Azure/go-autorest/autorest/to v0.2.0 -## explicit; go 1.12 -github.com/Azure/go-autorest/autorest/to -# github.com/Azure/go-autorest/logger v0.2.1 -## explicit; go 1.12 -github.com/Azure/go-autorest/logger -# github.com/Azure/go-autorest/tracing v0.6.0 -## explicit; go 1.12 -github.com/Azure/go-autorest/tracing -# github.com/DataDog/appsec-internal-go v1.13.0 -## explicit; go 1.23.0 -github.com/DataDog/appsec-internal-go/apisec -github.com/DataDog/appsec-internal-go/apisec/internal/config -github.com/DataDog/appsec-internal-go/apisec/internal/timed -github.com/DataDog/appsec-internal-go/appsec -github.com/DataDog/appsec-internal-go/limiter -github.com/DataDog/appsec-internal-go/log -# github.com/DataDog/datadog-agent/comp/core/tagger/origindetection v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/comp/core/tagger/origindetection -# github.com/DataDog/datadog-agent/pkg/obfuscate v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/obfuscate -# github.com/DataDog/datadog-agent/pkg/proto v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/proto/pbgo/trace -# github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.69.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/remoteconfig/state -# github.com/DataDog/datadog-agent/pkg/trace v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/trace/config -github.com/DataDog/datadog-agent/pkg/trace/log -github.com/DataDog/datadog-agent/pkg/trace/sampler -github.com/DataDog/datadog-agent/pkg/trace/stats -github.com/DataDog/datadog-agent/pkg/trace/traceutil -github.com/DataDog/datadog-agent/pkg/trace/traceutil/normalize -github.com/DataDog/datadog-agent/pkg/trace/transform -github.com/DataDog/datadog-agent/pkg/trace/version -github.com/DataDog/datadog-agent/pkg/trace/watchdog -# github.com/DataDog/datadog-agent/pkg/util/log v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/util/log -# github.com/DataDog/datadog-agent/pkg/util/scrubber v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/util/scrubber -# github.com/DataDog/datadog-agent/pkg/version v0.67.0 -## explicit; go 1.23.0 -github.com/DataDog/datadog-agent/pkg/version -# github.com/DataDog/datadog-go/v5 v5.6.0 -## explicit; go 1.13 -github.com/DataDog/datadog-go/v5/statsd -# github.com/DataDog/dd-trace-go/v2 v2.2.3 -## explicit; go 1.23.0 -github.com/DataDog/dd-trace-go/v2/appsec/events -github.com/DataDog/dd-trace-go/v2/datastreams/options -github.com/DataDog/dd-trace-go/v2/ddtrace -github.com/DataDog/dd-trace-go/v2/ddtrace/ext -github.com/DataDog/dd-trace-go/v2/ddtrace/internal -github.com/DataDog/dd-trace-go/v2/ddtrace/internal/tracerstats -github.com/DataDog/dd-trace-go/v2/ddtrace/mocktracer -github.com/DataDog/dd-trace-go/v2/ddtrace/tracer -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/dyngo -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/graphqlsec -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/grpcsec -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/httpsec -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/ossec -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/sqlsec -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/actions -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/emitter/waf/addresses -github.com/DataDog/dd-trace-go/v2/instrumentation/appsec/trace -github.com/DataDog/dd-trace-go/v2/instrumentation/errortrace -github.com/DataDog/dd-trace-go/v2/instrumentation/options -github.com/DataDog/dd-trace-go/v2/internal -github.com/DataDog/dd-trace-go/v2/internal/appsec -github.com/DataDog/dd-trace-go/v2/internal/appsec/config -github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/usersec -github.com/DataDog/dd-trace-go/v2/internal/appsec/emitter/waf -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/graphqlsec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/grpcsec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/httpsec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/ossec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/sqlsec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/trace -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/usersec -github.com/DataDog/dd-trace-go/v2/internal/appsec/listener/waf -github.com/DataDog/dd-trace-go/v2/internal/civisibility -github.com/DataDog/dd-trace-go/v2/internal/civisibility/constants -github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils -github.com/DataDog/dd-trace-go/v2/internal/civisibility/utils/telemetry -github.com/DataDog/dd-trace-go/v2/internal/datastreams -github.com/DataDog/dd-trace-go/v2/internal/globalconfig -github.com/DataDog/dd-trace-go/v2/internal/hostname -github.com/DataDog/dd-trace-go/v2/internal/hostname/azure -github.com/DataDog/dd-trace-go/v2/internal/hostname/cachedfetch -github.com/DataDog/dd-trace-go/v2/internal/hostname/ec2 -github.com/DataDog/dd-trace-go/v2/internal/hostname/ecs -github.com/DataDog/dd-trace-go/v2/internal/hostname/gce -github.com/DataDog/dd-trace-go/v2/internal/hostname/httputils -github.com/DataDog/dd-trace-go/v2/internal/hostname/validate -github.com/DataDog/dd-trace-go/v2/internal/log -github.com/DataDog/dd-trace-go/v2/internal/namingschema -github.com/DataDog/dd-trace-go/v2/internal/normalizer -github.com/DataDog/dd-trace-go/v2/internal/orchestrion -github.com/DataDog/dd-trace-go/v2/internal/osinfo -github.com/DataDog/dd-trace-go/v2/internal/processtags -github.com/DataDog/dd-trace-go/v2/internal/remoteconfig -github.com/DataDog/dd-trace-go/v2/internal/samplernames -github.com/DataDog/dd-trace-go/v2/internal/stableconfig -github.com/DataDog/dd-trace-go/v2/internal/stacktrace -github.com/DataDog/dd-trace-go/v2/internal/telemetry -github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal -github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/knownmetrics -github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/mapper -github.com/DataDog/dd-trace-go/v2/internal/telemetry/internal/transport -github.com/DataDog/dd-trace-go/v2/internal/telemetry/log -github.com/DataDog/dd-trace-go/v2/internal/traceprof -github.com/DataDog/dd-trace-go/v2/internal/urlsanitizer -github.com/DataDog/dd-trace-go/v2/internal/version -# github.com/DataDog/go-libddwaf/v4 v4.3.2 -## explicit; go 1.23.0 -github.com/DataDog/go-libddwaf/v4 -github.com/DataDog/go-libddwaf/v4/internal/bindings -github.com/DataDog/go-libddwaf/v4/internal/lib -github.com/DataDog/go-libddwaf/v4/internal/log -github.com/DataDog/go-libddwaf/v4/internal/pin -github.com/DataDog/go-libddwaf/v4/internal/ruleset -github.com/DataDog/go-libddwaf/v4/internal/support -github.com/DataDog/go-libddwaf/v4/internal/unsafe -github.com/DataDog/go-libddwaf/v4/json -github.com/DataDog/go-libddwaf/v4/timer -github.com/DataDog/go-libddwaf/v4/waferrors -# github.com/DataDog/go-runtime-metrics-internal v0.0.4-0.20250721125240-fdf1ef85b633 -## explicit; go 1.23 -github.com/DataDog/go-runtime-metrics-internal/pkg/runtimemetrics -# github.com/DataDog/go-sqllexer v0.1.6 -## explicit; go 1.21 -github.com/DataDog/go-sqllexer -# github.com/DataDog/go-tuf v1.1.0-0.5.2 -## explicit; go 1.18 -github.com/DataDog/go-tuf/client -github.com/DataDog/go-tuf/data -github.com/DataDog/go-tuf/internal/roles -github.com/DataDog/go-tuf/internal/sets -github.com/DataDog/go-tuf/pkg/keys -github.com/DataDog/go-tuf/pkg/targets -github.com/DataDog/go-tuf/util -github.com/DataDog/go-tuf/verify -# github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.27.0 -## explicit; go 1.23.0 -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/azure -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/ec2 -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/gcp -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source -# github.com/DataDog/sketches-go v1.4.7 -## explicit; go 1.18 -github.com/DataDog/sketches-go/ddsketch -github.com/DataDog/sketches-go/ddsketch/encoding -github.com/DataDog/sketches-go/ddsketch/mapping -github.com/DataDog/sketches-go/ddsketch/pb/sketchpb -github.com/DataDog/sketches-go/ddsketch/stat -github.com/DataDog/sketches-go/ddsketch/store -# github.com/Masterminds/semver/v3 v3.3.1 -## explicit; go 1.21 -github.com/Masterminds/semver/v3 -# github.com/Microsoft/go-winio v0.6.2 -## explicit; go 1.21 -github.com/Microsoft/go-winio -github.com/Microsoft/go-winio/internal/fs -github.com/Microsoft/go-winio/internal/socket -github.com/Microsoft/go-winio/internal/stringbuffer -github.com/Microsoft/go-winio/pkg/guid # github.com/apparentlymart/go-cidr v1.1.0 ## explicit github.com/apparentlymart/go-cidr/cidr -# github.com/aws/aws-sdk-go-v2 v1.39.2 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/aws -github.com/aws/aws-sdk-go-v2/aws/defaults -github.com/aws/aws-sdk-go-v2/aws/middleware -github.com/aws/aws-sdk-go-v2/aws/protocol/query -github.com/aws/aws-sdk-go-v2/aws/protocol/restjson -github.com/aws/aws-sdk-go-v2/aws/protocol/xml -github.com/aws/aws-sdk-go-v2/aws/ratelimit -github.com/aws/aws-sdk-go-v2/aws/retry -github.com/aws/aws-sdk-go-v2/aws/signer/internal/v4 -github.com/aws/aws-sdk-go-v2/aws/signer/v4 -github.com/aws/aws-sdk-go-v2/aws/transport/http -github.com/aws/aws-sdk-go-v2/internal/auth -github.com/aws/aws-sdk-go-v2/internal/auth/smithy -github.com/aws/aws-sdk-go-v2/internal/context -github.com/aws/aws-sdk-go-v2/internal/endpoints -github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn -github.com/aws/aws-sdk-go-v2/internal/middleware -github.com/aws/aws-sdk-go-v2/internal/rand -github.com/aws/aws-sdk-go-v2/internal/sdk -github.com/aws/aws-sdk-go-v2/internal/sdkio -github.com/aws/aws-sdk-go-v2/internal/shareddefaults -github.com/aws/aws-sdk-go-v2/internal/strings -github.com/aws/aws-sdk-go-v2/internal/sync/singleflight -github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.31.12 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/config -# github.com/aws/aws-sdk-go-v2/credentials v1.18.16 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/credentials -github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds -github.com/aws/aws-sdk-go-v2/credentials/endpointcreds -github.com/aws/aws-sdk-go-v2/credentials/endpointcreds/internal/client -github.com/aws/aws-sdk-go-v2/credentials/processcreds -github.com/aws/aws-sdk-go-v2/credentials/ssocreds -github.com/aws/aws-sdk-go-v2/credentials/stscreds -# github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.9 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/feature/ec2/imds -github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.9 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.9 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 -# github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/internal/ini -# github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.1 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding -# github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.9 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url -# github.com/aws/aws-sdk-go-v2/service/route53 v1.58.4 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/route53 -github.com/aws/aws-sdk-go-v2/service/route53/internal/customizations -github.com/aws/aws-sdk-go-v2/service/route53/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/route53/types -# github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.39.6 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/secretsmanager -github.com/aws/aws-sdk-go-v2/service/secretsmanager/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/secretsmanager/types -# github.com/aws/aws-sdk-go-v2/service/sso v1.29.6 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/sso -github.com/aws/aws-sdk-go-v2/service/sso/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/sso/types -# github.com/aws/aws-sdk-go-v2/service/ssooidc v1.35.1 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/ssooidc -github.com/aws/aws-sdk-go-v2/service/ssooidc/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/ssooidc/types -# github.com/aws/aws-sdk-go-v2/service/sts v1.38.6 -## explicit; go 1.22 -github.com/aws/aws-sdk-go-v2/service/sts -github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints -github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.23.0 -## explicit; go 1.22 -github.com/aws/smithy-go -github.com/aws/smithy-go/auth -github.com/aws/smithy-go/auth/bearer -github.com/aws/smithy-go/context -github.com/aws/smithy-go/document -github.com/aws/smithy-go/encoding -github.com/aws/smithy-go/encoding/httpbinding -github.com/aws/smithy-go/encoding/json -github.com/aws/smithy-go/encoding/xml -github.com/aws/smithy-go/endpoints -github.com/aws/smithy-go/internal/sync/singleflight -github.com/aws/smithy-go/io -github.com/aws/smithy-go/logging -github.com/aws/smithy-go/metrics -github.com/aws/smithy-go/middleware -github.com/aws/smithy-go/private/requestcompression -github.com/aws/smithy-go/ptr -github.com/aws/smithy-go/rand -github.com/aws/smithy-go/time -github.com/aws/smithy-go/tracing -github.com/aws/smithy-go/transport/http -github.com/aws/smithy-go/transport/http/internal/io -github.com/aws/smithy-go/waiter # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11 github.com/beorn7/perks/quantile # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 -# github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 -## explicit -github.com/cihub/seelog -github.com/cihub/seelog/archive -github.com/cihub/seelog/archive/gzip -github.com/cihub/seelog/archive/tar -github.com/cihub/seelog/archive/zip # github.com/coredns/caddy v1.1.4-0.20250930002214-15135a999495 ## explicit; go 1.13 github.com/coredns/caddy github.com/coredns/caddy/caddyfile -github.com/coredns/caddy/onevent -github.com/coredns/caddy/onevent/hook # github.com/coreos/go-semver v0.3.1 ## explicit; go 1.8 github.com/coreos/go-semver/semver @@ -358,55 +20,16 @@ github.com/coreos/go-systemd/v22/journal # github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc ## explicit github.com/davecgh/go-spew/spew -# github.com/dimchansky/utfbom v1.1.1 -## explicit -github.com/dimchansky/utfbom # github.com/dnstap/golang-dnstap v0.4.0 ## explicit github.com/dnstap/golang-dnstap -# github.com/dustin/go-humanize v1.0.1 -## explicit; go 1.16 -github.com/dustin/go-humanize -# github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 -## explicit; go 1.20 -github.com/eapache/queue/v2 -# github.com/ebitengine/purego v0.8.3 -## explicit; go 1.18 -github.com/ebitengine/purego -github.com/ebitengine/purego/internal/cgo -github.com/ebitengine/purego/internal/fakecgo -github.com/ebitengine/purego/internal/strings # github.com/emicklei/go-restful/v3 v3.12.2 ## explicit; go 1.13 github.com/emicklei/go-restful/v3 github.com/emicklei/go-restful/v3/log -# github.com/expr-lang/expr v1.17.7 -## explicit; go 1.18 -github.com/expr-lang/expr -github.com/expr-lang/expr/ast -github.com/expr-lang/expr/builtin -github.com/expr-lang/expr/checker -github.com/expr-lang/expr/checker/nature -github.com/expr-lang/expr/compiler -github.com/expr-lang/expr/conf -github.com/expr-lang/expr/file -github.com/expr-lang/expr/internal/deref -github.com/expr-lang/expr/internal/ring -github.com/expr-lang/expr/optimizer -github.com/expr-lang/expr/parser -github.com/expr-lang/expr/parser/lexer -github.com/expr-lang/expr/parser/operator -github.com/expr-lang/expr/parser/utils -github.com/expr-lang/expr/patcher -github.com/expr-lang/expr/types -github.com/expr-lang/expr/vm -github.com/expr-lang/expr/vm/runtime # github.com/farsightsec/golang-framestream v0.3.0 ## explicit github.com/farsightsec/golang-framestream -# github.com/felixge/httpsnoop v1.0.4 -## explicit; go 1.13 -github.com/felixge/httpsnoop # github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 ## explicit github.com/flynn/go-shlex @@ -416,14 +39,6 @@ github.com/fxamacker/cbor/v2 # github.com/go-logr/logr v1.4.3 ## explicit; go 1.18 github.com/go-logr/logr -github.com/go-logr/logr/funcr -# github.com/go-logr/stdr v1.2.2 -## explicit; go 1.16 -github.com/go-logr/stdr -# github.com/go-ole/go-ole v1.3.0 -## explicit; go 1.12 -github.com/go-ole/go-ole -github.com/go-ole/go-ole/oleutil # github.com/go-openapi/jsonpointer v0.21.0 ## explicit; go 1.20 github.com/go-openapi/jsonpointer @@ -434,21 +49,12 @@ github.com/go-openapi/jsonreference/internal # github.com/go-openapi/swag v0.23.0 ## explicit; go 1.20 github.com/go-openapi/swag -# github.com/go-viper/mapstructure/v2 v2.4.0 -## explicit; go 1.18 -github.com/go-viper/mapstructure/v2 -github.com/go-viper/mapstructure/v2/internal/errors # github.com/gogo/protobuf v1.3.2 ## explicit; go 1.15 github.com/gogo/protobuf/gogoproto -github.com/gogo/protobuf/jsonpb github.com/gogo/protobuf/proto github.com/gogo/protobuf/protoc-gen-gogo/descriptor github.com/gogo/protobuf/sortkeys -github.com/gogo/protobuf/types -# github.com/golang-jwt/jwt/v4 v4.5.2 -## explicit; go 1.16 -github.com/golang-jwt/jwt/v4 # github.com/golang/protobuf v1.5.4 ## explicit; go 1.17 github.com/golang/protobuf/proto @@ -467,80 +73,15 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/s2a-go v0.1.9 -## explicit; go 1.20 -github.com/google/s2a-go -github.com/google/s2a-go/fallback -github.com/google/s2a-go/internal/authinfo -github.com/google/s2a-go/internal/handshaker -github.com/google/s2a-go/internal/handshaker/service -github.com/google/s2a-go/internal/proto/common_go_proto -github.com/google/s2a-go/internal/proto/s2a_context_go_proto -github.com/google/s2a-go/internal/proto/s2a_go_proto -github.com/google/s2a-go/internal/proto/v2/common_go_proto -github.com/google/s2a-go/internal/proto/v2/s2a_context_go_proto -github.com/google/s2a-go/internal/proto/v2/s2a_go_proto -github.com/google/s2a-go/internal/record -github.com/google/s2a-go/internal/record/internal/aeadcrypter -github.com/google/s2a-go/internal/record/internal/halfconn -github.com/google/s2a-go/internal/tokenmanager -github.com/google/s2a-go/internal/v2 -github.com/google/s2a-go/internal/v2/certverifier -github.com/google/s2a-go/internal/v2/remotesigner -github.com/google/s2a-go/internal/v2/tlsconfigstore -github.com/google/s2a-go/retry -github.com/google/s2a-go/stream # github.com/google/uuid v1.6.0 ## explicit github.com/google/uuid -# github.com/googleapis/enterprise-certificate-proxy v0.3.6 -## explicit; go 1.23.0 -github.com/googleapis/enterprise-certificate-proxy/client -github.com/googleapis/enterprise-certificate-proxy/client/util -# github.com/googleapis/gax-go/v2 v2.15.0 -## explicit; go 1.23.0 -github.com/googleapis/gax-go/v2 -github.com/googleapis/gax-go/v2/apierror -github.com/googleapis/gax-go/v2/apierror/internal/proto -github.com/googleapis/gax-go/v2/callctx -github.com/googleapis/gax-go/v2/internal -github.com/googleapis/gax-go/v2/internallog -github.com/googleapis/gax-go/v2/internallog/internal -# github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 -## explicit; go 1.20 -github.com/gorilla/websocket # github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 ## explicit; go 1.23.0 github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options # github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 ## explicit github.com/grpc-ecosystem/grpc-opentracing/go/otgrpc -# github.com/hashicorp/cronexpr v1.1.3 -## explicit -github.com/hashicorp/cronexpr -# github.com/hashicorp/errwrap v1.1.0 -## explicit -github.com/hashicorp/errwrap -# github.com/hashicorp/go-cleanhttp v0.5.2 -## explicit; go 1.13 -github.com/hashicorp/go-cleanhttp -# github.com/hashicorp/go-multierror v1.1.1 -## explicit; go 1.13 -github.com/hashicorp/go-multierror -# github.com/hashicorp/go-rootcerts v1.0.2 -## explicit; go 1.12 -github.com/hashicorp/go-rootcerts -# github.com/hashicorp/go-version v1.7.0 -## explicit -github.com/hashicorp/go-version -# github.com/hashicorp/nomad/api v0.0.0-20250909143645-a3b86c697f38 -## explicit; go 1.20 -github.com/hashicorp/nomad/api -github.com/hashicorp/nomad/api/contexts -# github.com/infobloxopen/go-trees v0.0.0-20200715205103-96a057b8dfb9 -## explicit; go 1.13 -github.com/infobloxopen/go-trees/iptree -github.com/infobloxopen/go-trees/numtree # github.com/josharian/intern v1.0.0 ## explicit; go 1.5 github.com/josharian/intern @@ -550,9 +91,6 @@ github.com/json-iterator/go # github.com/kylelemons/godebug v1.1.0 ## explicit; go 1.11 github.com/kylelemons/godebug/diff -# github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 -## explicit; go 1.21 -github.com/lufia/plan9stats # github.com/mailru/easyjson v0.7.7 ## explicit; go 1.12 github.com/mailru/easyjson/buffer @@ -564,12 +102,6 @@ github.com/matttproud/golang_protobuf_extensions/pbutil # github.com/miekg/dns v1.1.68 ## explicit; go 1.23.0 github.com/miekg/dns -# github.com/mitchellh/go-homedir v1.1.0 -## explicit -github.com/mitchellh/go-homedir -# github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c -## explicit; go 1.14 -github.com/mitchellh/mapstructure # github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd ## explicit github.com/modern-go/concurrent @@ -607,53 +139,17 @@ github.com/openshift/client-go/network/listers/network/v1alpha1 # github.com/openshift/coredns-ocp-dnsnameresolver v0.0.0-20251118200623-f7b15b30153f ## explicit; go 1.24.0 github.com/openshift/coredns-ocp-dnsnameresolver -# github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 -## explicit -github.com/opentracing-contrib/go-observer # github.com/opentracing/opentracing-go v1.2.0 ## explicit; go 1.14 github.com/opentracing/opentracing-go github.com/opentracing/opentracing-go/ext github.com/opentracing/opentracing-go/log -github.com/opentracing/opentracing-go/mocktracer -# github.com/openzipkin-contrib/zipkin-go-opentracing v0.5.0 -## explicit; go 1.18 -github.com/openzipkin-contrib/zipkin-go-opentracing -# github.com/openzipkin/zipkin-go v0.4.3 -## explicit; go 1.20 -github.com/openzipkin/zipkin-go -github.com/openzipkin/zipkin-go/idgenerator -github.com/openzipkin/zipkin-go/model -github.com/openzipkin/zipkin-go/propagation -github.com/openzipkin/zipkin-go/propagation/b3 -github.com/openzipkin/zipkin-go/reporter -github.com/openzipkin/zipkin-go/reporter/http -# github.com/oschwald/geoip2-golang v1.13.0 -## explicit; go 1.21 -github.com/oschwald/geoip2-golang -# github.com/oschwald/maxminddb-golang v1.13.0 -## explicit; go 1.21 -github.com/oschwald/maxminddb-golang -# github.com/outcaste-io/ristretto v0.2.3 -## explicit; go 1.12 -github.com/outcaste-io/ristretto -github.com/outcaste-io/ristretto/z -github.com/outcaste-io/ristretto/z/simd -# github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c -## explicit; go 1.20 -github.com/philhofer/fwd # github.com/pkg/errors v0.9.1 ## explicit github.com/pkg/errors -# github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 -## explicit; go 1.20 -github.com/planetscale/vtprotobuf/protohelpers # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 -## explicit; go 1.14 -github.com/power-devops/perfstat # github.com/prometheus/client_golang v1.23.0 ## explicit; go 1.23.0 github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil @@ -678,9 +174,6 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/puzpuzpuz/xsync/v3 v3.5.1 -## explicit; go 1.18 -github.com/puzpuzpuz/xsync/v3 # github.com/quic-go/quic-go v0.55.0 ## explicit; go 1.24 github.com/quic-go/quic-go @@ -697,40 +190,12 @@ github.com/quic-go/quic-go/internal/utils/ringbuffer github.com/quic-go/quic-go/internal/wire github.com/quic-go/quic-go/logging github.com/quic-go/quic-go/quicvarint -# github.com/secure-systems-lab/go-securesystemslib v0.9.0 -## explicit; go 1.20 -github.com/secure-systems-lab/go-securesystemslib/cjson -# github.com/shirou/gopsutil/v4 v4.25.3 -## explicit; go 1.23 -github.com/shirou/gopsutil/v4/common -github.com/shirou/gopsutil/v4/cpu -github.com/shirou/gopsutil/v4/internal/common -github.com/shirou/gopsutil/v4/mem -github.com/shirou/gopsutil/v4/net -github.com/shirou/gopsutil/v4/process # github.com/spf13/pflag v1.0.6 ## explicit; go 1.12 github.com/spf13/pflag -# github.com/stretchr/testify v1.11.1 -## explicit; go 1.17 -github.com/stretchr/testify/assert -github.com/stretchr/testify/assert/yaml -github.com/stretchr/testify/require -# github.com/tinylib/msgp v1.2.5 -## explicit; go 1.20 -github.com/tinylib/msgp/msgp -# github.com/tklauser/go-sysconf v0.3.15 -## explicit; go 1.23.0 -github.com/tklauser/go-sysconf -# github.com/tklauser/numcpus v0.10.0 -## explicit; go 1.23.0 -github.com/tklauser/numcpus # github.com/x448/float16 v0.8.4 ## explicit; go 1.11 github.com/x448/float16 -# github.com/yusufpapurcu/wmi v1.2.4 -## explicit; go 1.16 -github.com/yusufpapurcu/wmi # go.etcd.io/etcd/api/v3 v3.6.5 ## explicit; go 1.24 go.etcd.io/etcd/api/v3/authpb @@ -755,97 +220,6 @@ go.etcd.io/etcd/client/v3 go.etcd.io/etcd/client/v3/credentials go.etcd.io/etcd/client/v3/internal/endpoint go.etcd.io/etcd/client/v3/internal/resolver -# go.opentelemetry.io/auto/sdk v1.2.1 -## explicit; go 1.24.0 -go.opentelemetry.io/auto/sdk -go.opentelemetry.io/auto/sdk/internal/telemetry -# go.opentelemetry.io/collector/component v1.31.0 -## explicit; go 1.23.0 -go.opentelemetry.io/collector/component -# go.opentelemetry.io/collector/featuregate v1.31.0 -## explicit; go 1.23.0 -go.opentelemetry.io/collector/featuregate -# go.opentelemetry.io/collector/internal/telemetry v0.125.0 -## explicit; go 1.23.0 -go.opentelemetry.io/collector/internal/telemetry -go.opentelemetry.io/collector/internal/telemetry/componentattribute -# go.opentelemetry.io/collector/pdata v1.31.0 -## explicit; go 1.23.0 -go.opentelemetry.io/collector/pdata/internal -go.opentelemetry.io/collector/pdata/internal/data -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/logs/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/metrics/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/profiles/v1development -go.opentelemetry.io/collector/pdata/internal/data/protogen/collector/trace/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/common/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/profiles/v1development -go.opentelemetry.io/collector/pdata/internal/data/protogen/resource/v1 -go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1 -go.opentelemetry.io/collector/pdata/internal/json -go.opentelemetry.io/collector/pdata/internal/otlp -go.opentelemetry.io/collector/pdata/pcommon -go.opentelemetry.io/collector/pdata/ptrace -# go.opentelemetry.io/collector/semconv v0.125.0 -## explicit; go 1.23.0 -go.opentelemetry.io/collector/semconv/v1.17.0 -go.opentelemetry.io/collector/semconv/v1.26.0 -go.opentelemetry.io/collector/semconv/v1.27.0 -go.opentelemetry.io/collector/semconv/v1.6.1 -# go.opentelemetry.io/contrib/bridges/otelzap v0.10.0 -## explicit; go 1.22.0 -go.opentelemetry.io/contrib/bridges/otelzap -# go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 -## explicit; go 1.23.0 -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/request -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconv -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp/internal/semconvutil -# go.opentelemetry.io/otel v1.39.0 -## explicit; go 1.24.0 -go.opentelemetry.io/otel -go.opentelemetry.io/otel/attribute -go.opentelemetry.io/otel/attribute/internal -go.opentelemetry.io/otel/attribute/internal/xxhash -go.opentelemetry.io/otel/baggage -go.opentelemetry.io/otel/codes -go.opentelemetry.io/otel/internal/baggage -go.opentelemetry.io/otel/internal/global -go.opentelemetry.io/otel/propagation -go.opentelemetry.io/otel/semconv/v1.20.0 -go.opentelemetry.io/otel/semconv/v1.26.0 -go.opentelemetry.io/otel/semconv/v1.37.0 -go.opentelemetry.io/otel/semconv/v1.37.0/otelconv -# go.opentelemetry.io/otel/log v0.11.0 -## explicit; go 1.22.0 -go.opentelemetry.io/otel/log -go.opentelemetry.io/otel/log/embedded -go.opentelemetry.io/otel/log/global -go.opentelemetry.io/otel/log/internal/global -# go.opentelemetry.io/otel/metric v1.39.0 -## explicit; go 1.24.0 -go.opentelemetry.io/otel/metric -go.opentelemetry.io/otel/metric/embedded -go.opentelemetry.io/otel/metric/noop -# go.opentelemetry.io/otel/sdk v1.39.0 -## explicit; go 1.24.0 -go.opentelemetry.io/otel/sdk -go.opentelemetry.io/otel/sdk/instrumentation -go.opentelemetry.io/otel/sdk/internal/x -go.opentelemetry.io/otel/sdk/resource -go.opentelemetry.io/otel/sdk/trace -go.opentelemetry.io/otel/sdk/trace/internal/env -go.opentelemetry.io/otel/sdk/trace/internal/observ -# go.opentelemetry.io/otel/trace v1.39.0 -## explicit; go 1.24.0 -go.opentelemetry.io/otel/trace -go.opentelemetry.io/otel/trace/embedded -go.opentelemetry.io/otel/trace/internal/telemetry -go.opentelemetry.io/otel/trace/noop -# go.uber.org/atomic v1.11.0 -## explicit; go 1.18 -go.uber.org/atomic # go.uber.org/automaxprocs v1.6.0 ## explicit; go 1.20 go.uber.org/automaxprocs/internal/cgroups @@ -876,17 +250,9 @@ go.yaml.in/yaml/v3 ## explicit; go 1.25.0 golang.org/x/crypto/chacha20 golang.org/x/crypto/chacha20poly1305 -golang.org/x/crypto/cryptobyte -golang.org/x/crypto/cryptobyte/asn1 -golang.org/x/crypto/ed25519 golang.org/x/crypto/hkdf golang.org/x/crypto/internal/alias golang.org/x/crypto/internal/poly1305 -golang.org/x/crypto/pkcs12 -golang.org/x/crypto/pkcs12/internal/rc2 -# golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 -## explicit; go 1.23.0 -golang.org/x/exp/constraints # golang.org/x/mod v0.34.0 ## explicit; go 1.25.0 golang.org/x/mod/internal/lazyregexp @@ -904,24 +270,14 @@ golang.org/x/net/internal/httpcommon golang.org/x/net/internal/httpsfv golang.org/x/net/internal/iana golang.org/x/net/internal/socket -golang.org/x/net/internal/socks golang.org/x/net/internal/timeseries golang.org/x/net/ipv4 golang.org/x/net/ipv6 -golang.org/x/net/proxy golang.org/x/net/trace # golang.org/x/oauth2 v0.34.0 ## explicit; go 1.24.0 golang.org/x/oauth2 -golang.org/x/oauth2/authhandler -golang.org/x/oauth2/google -golang.org/x/oauth2/google/externalaccount -golang.org/x/oauth2/google/internal/externalaccountauthorizeduser -golang.org/x/oauth2/google/internal/impersonate -golang.org/x/oauth2/google/internal/stsexchange golang.org/x/oauth2/internal -golang.org/x/oauth2/jws -golang.org/x/oauth2/jwt # golang.org/x/sync v0.20.0 ## explicit; go 1.25.0 golang.org/x/sync/errgroup @@ -931,7 +287,6 @@ golang.org/x/sys/cpu golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -golang.org/x/sys/windows/registry # golang.org/x/term v0.42.0 ## explicit; go 1.25.0 golang.org/x/term @@ -970,31 +325,12 @@ golang.org/x/tools/internal/stdlib golang.org/x/tools/internal/typeparams golang.org/x/tools/internal/typesinternal golang.org/x/tools/internal/versions -# golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 -## explicit; go 1.18 -golang.org/x/xerrors -golang.org/x/xerrors/internal -# google.golang.org/api v0.251.0 -## explicit; go 1.24.0 -google.golang.org/api/dns/v1 -google.golang.org/api/googleapi -google.golang.org/api/googleapi/transport -google.golang.org/api/internal -google.golang.org/api/internal/cert -google.golang.org/api/internal/gensupport -google.golang.org/api/internal/impersonate -google.golang.org/api/internal/third_party/uritemplates -google.golang.org/api/option -google.golang.org/api/option/internaloption -google.golang.org/api/transport/http # google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 ## explicit; go 1.24.0 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations # google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 ## explicit; go 1.24.0 -google.golang.org/genproto/googleapis/rpc/code -google.golang.org/genproto/googleapis/rpc/errdetails google.golang.org/genproto/googleapis/rpc/status # google.golang.org/grpc v1.79.3 ## explicit; go 1.24.0 @@ -1107,9 +443,6 @@ gopkg.in/evanphx/json-patch.v4 # gopkg.in/inf.v0 v0.9.1 ## explicit gopkg.in/inf.v0 -# gopkg.in/ini.v1 v1.67.0 -## explicit -gopkg.in/ini.v1 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3
  • RMd`g25`LAMB&Fgl^i z!_!h_g@GBYV;$vs-&tdlawL>F_MQh|!C}f_cTNCe z>{}cb96d#_+_4BD6v_A<$H#8YKay6QUjhU*w#F)Ye3n>B&+VoMrLC&a>?W|>)#`ye zpqw1Bqg|RnQ%zG-r4^I2!|@%DdMG$8i$s4dqQ9z$=u8M99cM33;KlbygndZPR9ttm z9u<IrxP|%h3h6f1qgB&L)y+PF zEf%NA0fMDe9n5%G86DXF!|!-=we2%b%$CyK7D;EjzzGE&sR*-^?{iC<81Klzw|~IB z6c6)Dr6;e{Aoi1;u2V*Pg-+f=&dc6)jZmRA)9Wxf;$cpye3EV(lvYl!Blni6-wSCP zt!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